[slepc] 04/05: Imported Upstream version 3.7.0+dfsg1

Drew Parsons dparsons at moszumanska.debian.org
Tue May 24 09:19:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

dparsons pushed a commit to branch experimental
in repository slepc.

commit 4b6cec39d0288199dd46502146ccf7a5ab7252d5
Author: Drew Parsons <dparsons at debian.org>
Date:   Tue May 24 17:15:37 2016 +0800

    Imported Upstream version 3.7.0+dfsg1
---
 CTAGS                                              |  8390 ++++++-----
 README                                             |     2 +-
 TAGS                                               | 14115 ++++++++++---------
 TAGS_PYTHON                                        |   306 +-
 bin/maint/generatefortranstubs.py                  |     2 +-
 config/argdb.py                                    |     6 +-
 config/cmakeboot.py                                |     6 +-
 config/cmakegen.py                                 |     6 +-
 config/configure.py                                |    28 +-
 config/install.py                                  |     4 +-
 config/log.py                                      |     2 +-
 config/package.py                                  |   130 +-
 config/packages/arpack.py                          |    61 +-
 config/packages/blopex.py                          |   104 +-
 config/packages/blzpack.py                         |    22 +-
 config/packages/feast.py                           |    22 +-
 config/packages/lapack.py                          |    15 +-
 config/packages/petsc.py                           |    15 +-
 config/packages/primme.py                          |    84 +-
 config/packages/slepc.py                           |     2 +-
 config/packages/sowing.py                          |    16 +-
 config/packages/trlan.py                           |    71 +-
 docs/changes.htm                                   |    37 +-
 docs/index.html                                    |     4 +-
 docs/instal.htm                                    |     6 +-
 docs/makefile                                      |     2 +-
 docs/makefile.html                                 |     8 +-
 docs/manualpages/BV/BV.html                        |     4 +-
 docs/manualpages/BV/BVAXPY.html                    |    45 -
 docs/manualpages/BV/BVAppendOptionsPrefix.html     |    10 +-
 docs/manualpages/BV/BVApplyMatrix.html             |    14 +-
 docs/manualpages/BV/BVApplyMatrixBV.html           |    15 +-
 docs/manualpages/BV/BVCopy.html                    |    14 +-
 docs/manualpages/BV/BVCopyColumn.html              |    12 +-
 docs/manualpages/BV/BVCopyVec.html                 |    14 +-
 docs/manualpages/BV/BVCreate.html                  |    14 +-
 docs/manualpages/BV/BVCreateVec.html               |    14 +-
 docs/manualpages/BV/BVDestroy.html                 |    10 +-
 docs/manualpages/BV/BVDot.html                     |    14 +-
 docs/manualpages/BV/BVDotColumn.html               |    14 +-
 docs/manualpages/BV/BVDotColumnBegin.html          |    14 +-
 docs/manualpages/BV/BVDotColumnEnd.html            |    17 +-
 docs/manualpages/BV/BVDotVec.html                  |    14 +-
 docs/manualpages/BV/BVDotVecBegin.html             |    12 +-
 docs/manualpages/BV/BVDotVecEnd.html               |    12 +-
 docs/manualpages/BV/BVDuplicate.html               |    14 +-
 docs/manualpages/BV/BVDuplicateResize.html         |    14 +-
 docs/manualpages/BV/BVFinalizePackage.html         |     6 +-
 docs/manualpages/BV/BVGetActiveColumns.html        |    14 +-
 docs/manualpages/BV/BVGetArray.html                |    14 +-
 docs/manualpages/BV/BVGetArrayRead.html            |    45 +
 docs/manualpages/BV/BVGetCachedBV.html             |    14 +-
 docs/manualpages/BV/BVGetColumn.html               |    14 +-
 docs/manualpages/BV/BVGetMatMultMethod.html        |    16 +-
 docs/manualpages/BV/BVGetMatrix.html               |    14 +-
 docs/manualpages/BV/BVGetNumConstraints.html       |    14 +-
 docs/manualpages/BV/BVGetOptionsPrefix.html        |    17 +-
 docs/manualpages/BV/BVGetOrthogonalization.html    |    18 +-
 docs/manualpages/BV/BVGetRandomContext.html        |    37 +
 docs/manualpages/BV/BVGetSignature.html            |    14 +-
 docs/manualpages/BV/BVGetSizes.html                |    16 +-
 docs/manualpages/BV/BVGetType.html                 |    14 +-
 docs/manualpages/BV/BVInitializePackage.html       |     6 +-
 docs/manualpages/BV/BVInsertConstraints.html       |    14 +-
 docs/manualpages/BV/BVInsertVec.html               |    12 +-
 docs/manualpages/BV/BVInsertVecs.html              |    18 +-
 docs/manualpages/BV/BVMatMult.html                 |    14 +-
 docs/manualpages/BV/BVMatMultColumn.html           |    16 +-
 .../BV/BVMatMultHermitianTranspose.html            |    14 +-
 docs/manualpages/BV/BVMatMultType.html             |     4 +-
 docs/manualpages/BV/BVMatProject.html              |    18 +-
 docs/manualpages/BV/BVMult.html                    |    20 +-
 docs/manualpages/BV/BVMultColumn.html              |    14 +-
 docs/manualpages/BV/BVMultInPlace.html             |    14 +-
 docs/manualpages/BV/BVMultInPlaceTranspose.html    |    14 +-
 docs/manualpages/BV/BVMultVec.html                 |    18 +-
 docs/manualpages/BV/BVNorm.html                    |    14 +-
 docs/manualpages/BV/BVNormColumn.html              |    16 +-
 docs/manualpages/BV/BVNormColumnBegin.html         |    14 +-
 docs/manualpages/BV/BVNormColumnEnd.html           |    14 +-
 docs/manualpages/BV/BVNormVec.html                 |    16 +-
 docs/manualpages/BV/BVNormVecBegin.html            |    14 +-
 docs/manualpages/BV/BVNormVecEnd.html              |    14 +-
 docs/manualpages/BV/BVOrthogBlockType.html         |     4 +-
 docs/manualpages/BV/BVOrthogRefineType.html        |     4 +-
 docs/manualpages/BV/BVOrthogType.html              |     4 +-
 docs/manualpages/BV/BVOrthogonalize.html           |    20 +-
 docs/manualpages/BV/BVOrthogonalizeColumn.html     |    16 +-
 docs/manualpages/BV/BVOrthogonalizeSomeColumn.html |    18 +-
 docs/manualpages/BV/BVOrthogonalizeVec.html        |    16 +-
 docs/manualpages/BV/BVRegister.html                |    10 +-
 docs/manualpages/BV/BVRegisterAll.html             |     6 +-
 docs/manualpages/BV/BVResize.html                  |    12 +-
 docs/manualpages/BV/BVRestoreArray.html            |    10 +-
 docs/manualpages/BV/BVRestoreArrayRead.html        |    36 +
 docs/manualpages/BV/BVRestoreColumn.html           |    12 +-
 docs/manualpages/BV/BVScale.html                   |    10 +-
 docs/manualpages/BV/BVScaleColumn.html             |    12 +-
 docs/manualpages/BV/BVSetActiveColumns.html        |    12 +-
 docs/manualpages/BV/BVSetFromOptions.html          |    10 +-
 docs/manualpages/BV/BVSetMatMultMethod.html        |    27 +-
 docs/manualpages/BV/BVSetMatrix.html               |    12 +-
 docs/manualpages/BV/BVSetNumConstraints.html       |    10 +-
 docs/manualpages/BV/BVSetOptionsPrefix.html        |    10 +-
 docs/manualpages/BV/BVSetOrthogonalization.html    |    24 +-
 docs/manualpages/BV/BVSetRandom.html               |    14 +-
 docs/manualpages/BV/BVSetRandomColumn.html         |    21 +-
 docs/manualpages/BV/BVSetRandomContext.html        |    36 +
 docs/manualpages/BV/BVSetSignature.html            |    10 +-
 docs/manualpages/BV/BVSetSizes.html                |    14 +-
 docs/manualpages/BV/BVSetSizesFromVec.html         |    12 +-
 docs/manualpages/BV/BVSetType.html                 |    14 +-
 docs/manualpages/BV/BVType.html                    |     4 +-
 docs/manualpages/BV/BVView.html                    |    14 +-
 docs/manualpages/BV/index.html                     |    82 +-
 docs/manualpages/DS/DS.html                        |     4 +-
 docs/manualpages/DS/DSAllocate.html                |    10 +-
 docs/manualpages/DS/DSAppendOptionsPrefix.html     |    10 +-
 docs/manualpages/DS/DSCond.html                    |    10 +-
 docs/manualpages/DS/DSCopyMat.html                 |    26 +-
 docs/manualpages/DS/DSCreate.html                  |    14 +-
 docs/manualpages/DS/DSDestroy.html                 |    10 +-
 docs/manualpages/DS/DSFinalizePackage.html         |     6 +-
 docs/manualpages/DS/DSGetArray.html                |    14 +-
 docs/manualpages/DS/DSGetArrayReal.html            |    14 +-
 docs/manualpages/DS/DSGetBlockSize.html            |    14 +-
 docs/manualpages/DS/DSGetCompact.html              |    14 +-
 docs/manualpages/DS/DSGetDimensions.html           |    20 +-
 docs/manualpages/DS/DSGetExtraRow.html             |    14 +-
 docs/manualpages/DS/DSGetLeadingDimension.html     |    14 +-
 docs/manualpages/DS/DSGetMat.html                  |    14 +-
 docs/manualpages/DS/DSGetMethod.html               |    14 +-
 docs/manualpages/DS/DSGetOptionsPrefix.html        |    17 +-
 docs/manualpages/DS/DSGetRefined.html              |    14 +-
 docs/manualpages/DS/DSGetSlepcSC.html              |    14 +-
 docs/manualpages/DS/DSGetState.html                |    14 +-
 docs/manualpages/DS/DSGetType.html                 |    14 +-
 docs/manualpages/DS/DSInitializePackage.html       |     6 +-
 docs/manualpages/DS/DSMatType.html                 |    30 +-
 docs/manualpages/DS/DSNEPGetFN.html                |    14 +-
 docs/manualpages/DS/DSNEPGetNumFN.html             |    14 +-
 docs/manualpages/DS/DSNEPSetFN.html                |    12 +-
 docs/manualpages/DS/DSNormalize.html               |    12 +-
 docs/manualpages/DS/DSOrthogonalize.html           |    42 +
 docs/manualpages/DS/DSPEPGetDegree.html            |    14 +-
 docs/manualpages/DS/DSPEPSetDegree.html            |    10 +-
 docs/manualpages/DS/DSPseudoOrthogonalize.html     |    47 +
 docs/manualpages/DS/DSRegister.html                |    10 +-
 docs/manualpages/DS/DSRegisterAll.html             |     6 +-
 docs/manualpages/DS/DSReset.html                   |    10 +-
 docs/manualpages/DS/DSRestoreArray.html            |    12 +-
 docs/manualpages/DS/DSRestoreArrayReal.html        |    12 +-
 docs/manualpages/DS/DSRestoreMat.html              |    12 +-
 docs/manualpages/DS/DSSetBlockSize.html            |    10 +-
 docs/manualpages/DS/DSSetCompact.html              |    10 +-
 docs/manualpages/DS/DSSetDimensions.html           |    16 +-
 docs/manualpages/DS/DSSetExtraRow.html             |    10 +-
 docs/manualpages/DS/DSSetFromOptions.html          |    10 +-
 docs/manualpages/DS/DSSetIdentity.html             |    10 +-
 docs/manualpages/DS/DSSetMethod.html               |    10 +-
 docs/manualpages/DS/DSSetOptionsPrefix.html        |    10 +-
 docs/manualpages/DS/DSSetRefined.html              |    10 +-
 docs/manualpages/DS/DSSetSlepcSC.html              |    10 +-
 docs/manualpages/DS/DSSetState.html                |    10 +-
 docs/manualpages/DS/DSSetType.html                 |    10 +-
 docs/manualpages/DS/DSSolve.html                   |    12 +-
 docs/manualpages/DS/DSSort.html                    |    20 +-
 docs/manualpages/DS/DSStateType.html               |     4 +-
 docs/manualpages/DS/DSTranslateHarmonic.html       |    18 +-
 docs/manualpages/DS/DSTranslateRKS.html            |    10 +-
 docs/manualpages/DS/DSTruncate.html                |    10 +-
 docs/manualpages/DS/DSType.html                    |     4 +-
 docs/manualpages/DS/DSUpdateExtraRow.html          |    10 +-
 docs/manualpages/DS/DSVectors.html                 |    18 +-
 docs/manualpages/DS/DSView.html                    |    14 +-
 docs/manualpages/DS/DSViewMat.html                 |    12 +-
 docs/manualpages/DS/index.html                     |    20 +-
 docs/manualpages/EPS/EPS.html                      |     6 +-
 docs/manualpages/EPS/EPSAllocateSolution.html      |    10 +-
 docs/manualpages/EPS/EPSAppendOptionsPrefix.html   |    10 +-
 docs/manualpages/EPS/EPSArnoldiGetDelayed.html     |    14 +-
 docs/manualpages/EPS/EPSArnoldiSetDelayed.html     |    14 +-
 docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html    |    14 +-
 docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html    |    14 +-
 docs/manualpages/EPS/EPSBalance.html               |     4 +-
 docs/manualpages/EPS/EPSBlzpackSetBlockSize.html   |    14 +-
 docs/manualpages/EPS/EPSBlzpackSetNSteps.html      |    14 +-
 docs/manualpages/EPS/EPSCISSExtraction.html        |    27 +
 docs/manualpages/EPS/EPSCISSGetExtraction.html     |    38 +
 docs/manualpages/EPS/EPSCISSGetQuadRule.html       |    37 +
 docs/manualpages/EPS/EPSCISSGetRefinement.html     |    16 +-
 docs/manualpages/EPS/EPSCISSGetSizes.html          |    22 +-
 docs/manualpages/EPS/EPSCISSGetThreshold.html      |    14 +-
 docs/manualpages/EPS/EPSCISSGetUseST.html          |    15 +-
 docs/manualpages/EPS/EPSCISSQuadRule.html          |    27 +
 docs/manualpages/EPS/EPSCISSSetExtraction.html     |    47 +
 docs/manualpages/EPS/EPSCISSSetQuadRule.html       |    47 +
 docs/manualpages/EPS/EPSCISSSetRefinement.html     |    20 +-
 docs/manualpages/EPS/EPSCISSSetSizes.html          |    32 +-
 docs/manualpages/EPS/EPSCISSSetThreshold.html      |    16 +-
 docs/manualpages/EPS/EPSCISSSetUseST.html          |    15 +-
 docs/manualpages/EPS/EPSComputeError.html          |    17 +-
 docs/manualpages/EPS/EPSConv.html                  |     6 +-
 .../EPS/EPSConvMonitorSetFromOptions.html          |    42 +
 docs/manualpages/EPS/EPSConvergedReason.html       |    16 +-
 docs/manualpages/EPS/EPSCreate.html                |    14 +-
 docs/manualpages/EPS/EPSDestroy.html               |    10 +-
 docs/manualpages/EPS/EPSErrorType.html             |     4 +-
 docs/manualpages/EPS/EPSErrorView.html             |    18 +-
 docs/manualpages/EPS/EPSErrorViewFromOptions.html  |    10 +-
 docs/manualpages/EPS/EPSExtraction.html            |     4 +-
 docs/manualpages/EPS/EPSFEASTGetNumPoints.html     |    14 +-
 docs/manualpages/EPS/EPSFEASTSetNumPoints.html     |    14 +-
 docs/manualpages/EPS/EPSFinalizePackage.html       |     6 +-
 docs/manualpages/EPS/EPSGDGetBOrth.html            |    14 +-
 docs/manualpages/EPS/EPSGDGetBlockSize.html        |    14 +-
 docs/manualpages/EPS/EPSGDGetDoubleExpansion.html  |    14 +-
 docs/manualpages/EPS/EPSGDGetInitialSize.html      |    14 +-
 docs/manualpages/EPS/EPSGDGetKrylovStart.html      |    14 +-
 docs/manualpages/EPS/EPSGDGetRestart.html          |    14 +-
 docs/manualpages/EPS/EPSGDGetWindowSizes.html      |    14 +-
 docs/manualpages/EPS/EPSGDSetBOrth.html            |    14 +-
 docs/manualpages/EPS/EPSGDSetBlockSize.html        |    14 +-
 docs/manualpages/EPS/EPSGDSetDoubleExpansion.html  |    14 +-
 docs/manualpages/EPS/EPSGDSetInitialSize.html      |    14 +-
 docs/manualpages/EPS/EPSGDSetKrylovStart.html      |    14 +-
 docs/manualpages/EPS/EPSGDSetRestart.html          |    16 +-
 docs/manualpages/EPS/EPSGDSetWindowSizes.html      |    16 +-
 docs/manualpages/EPS/EPSGetBV.html                 |    14 +-
 docs/manualpages/EPS/EPSGetBalance.html            |    16 +-
 docs/manualpages/EPS/EPSGetConverged.html          |    16 +-
 docs/manualpages/EPS/EPSGetConvergedReason.html    |    26 +-
 docs/manualpages/EPS/EPSGetConvergenceTest.html    |    14 +-
 docs/manualpages/EPS/EPSGetDS.html                 |    14 +-
 docs/manualpages/EPS/EPSGetDimensions.html         |    16 +-
 docs/manualpages/EPS/EPSGetEigenpair.html          |    19 +-
 docs/manualpages/EPS/EPSGetEigenvalue.html         |    14 +-
 docs/manualpages/EPS/EPSGetEigenvector.html        |    14 +-
 docs/manualpages/EPS/EPSGetErrorEstimate.html      |    14 +-
 docs/manualpages/EPS/EPSGetExtraction.html         |    14 +-
 docs/manualpages/EPS/EPSGetInterval.html           |    14 +-
 docs/manualpages/EPS/EPSGetInvariantSubspace.html  |    14 +-
 docs/manualpages/EPS/EPSGetIterationNumber.html    |    16 +-
 docs/manualpages/EPS/EPSGetMonitorContext.html     |    14 +-
 docs/manualpages/EPS/EPSGetOperators.html          |    14 +-
 docs/manualpages/EPS/EPSGetOptionsPrefix.html      |    17 +-
 docs/manualpages/EPS/EPSGetProblemType.html        |    14 +-
 docs/manualpages/EPS/EPSGetPurify.html             |    14 +-
 docs/manualpages/EPS/EPSGetRG.html                 |    16 +-
 docs/manualpages/EPS/EPSGetST.html                 |    14 +-
 docs/manualpages/EPS/EPSGetStoppingTest.html       |    37 +
 docs/manualpages/EPS/EPSGetTarget.html             |    14 +-
 docs/manualpages/EPS/EPSGetTolerances.html         |    15 +-
 docs/manualpages/EPS/EPSGetTrackAll.html           |    14 +-
 docs/manualpages/EPS/EPSGetTrueResidual.html       |    14 +-
 docs/manualpages/EPS/EPSGetType.html               |    14 +-
 docs/manualpages/EPS/EPSGetWhichEigenpairs.html    |    14 +-
 docs/manualpages/EPS/EPSInitializePackage.html     |     6 +-
 docs/manualpages/EPS/EPSIsGeneralized.html         |    14 +-
 docs/manualpages/EPS/EPSIsHermitian.html           |    14 +-
 docs/manualpages/EPS/EPSIsPositive.html            |    14 +-
 docs/manualpages/EPS/EPSJDGetBOrth.html            |    14 +-
 docs/manualpages/EPS/EPSJDGetBlockSize.html        |    14 +-
 .../EPS/EPSJDGetConstCorrectionTol.html            |    14 +-
 docs/manualpages/EPS/EPSJDGetFix.html              |    14 +-
 docs/manualpages/EPS/EPSJDGetInitialSize.html      |    14 +-
 docs/manualpages/EPS/EPSJDGetKrylovStart.html      |    14 +-
 docs/manualpages/EPS/EPSJDGetRestart.html          |    14 +-
 docs/manualpages/EPS/EPSJDGetWindowSizes.html      |    14 +-
 docs/manualpages/EPS/EPSJDSetBOrth.html            |    14 +-
 docs/manualpages/EPS/EPSJDSetBlockSize.html        |    14 +-
 .../EPS/EPSJDSetConstCorrectionTol.html            |    14 +-
 docs/manualpages/EPS/EPSJDSetFix.html              |    14 +-
 docs/manualpages/EPS/EPSJDSetInitialSize.html      |    14 +-
 docs/manualpages/EPS/EPSJDSetKrylovStart.html      |    14 +-
 docs/manualpages/EPS/EPSJDSetRestart.html          |    16 +-
 docs/manualpages/EPS/EPSJDSetWindowSizes.html      |    16 +-
 .../EPS/EPSKrylovSchurGetDetectZeros.html          |    14 +-
 .../EPS/EPSKrylovSchurGetDimensions.html           |    16 +-
 .../manualpages/EPS/EPSKrylovSchurGetInertias.html |    16 +-
 docs/manualpages/EPS/EPSKrylovSchurGetLocking.html |    14 +-
 .../EPS/EPSKrylovSchurGetPartitions.html           |    14 +-
 docs/manualpages/EPS/EPSKrylovSchurGetRestart.html |    14 +-
 .../EPS/EPSKrylovSchurGetSubcommInfo.html          |    16 +-
 .../EPS/EPSKrylovSchurGetSubcommMats.html          |    46 +
 .../EPS/EPSKrylovSchurGetSubcommPairs.html         |    18 +-
 .../EPS/EPSKrylovSchurGetSubintervals.html         |    14 +-
 .../EPS/EPSKrylovSchurSetDetectZeros.html          |    14 +-
 .../EPS/EPSKrylovSchurSetDimensions.html           |    20 +-
 docs/manualpages/EPS/EPSKrylovSchurSetLocking.html |    14 +-
 .../EPS/EPSKrylovSchurSetPartitions.html           |    14 +-
 docs/manualpages/EPS/EPSKrylovSchurSetRestart.html |    14 +-
 .../EPS/EPSKrylovSchurSetSubintervals.html         |    10 +-
 .../EPS/EPSKrylovSchurUpdateSubcommMats.html       |    67 +
 docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html    |    15 +-
 docs/manualpages/EPS/EPSLOBPCGGetLocking.html      |    15 +-
 docs/manualpages/EPS/EPSLOBPCGGetRestart.html      |    37 +
 docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html    |    15 +-
 docs/manualpages/EPS/EPSLOBPCGSetLocking.html      |    15 +-
 docs/manualpages/EPS/EPSLOBPCGSetRestart.html      |    43 +
 docs/manualpages/EPS/EPSLanczosGetReorthog.html    |    14 +-
 docs/manualpages/EPS/EPSLanczosReorthogType.html   |     4 +-
 docs/manualpages/EPS/EPSLanczosSetReorthog.html    |    14 +-
 docs/manualpages/EPS/EPSMonitorAll.html            |    22 +-
 docs/manualpages/EPS/EPSMonitorCancel.html         |    14 +-
 docs/manualpages/EPS/EPSMonitorConverged.html      |    26 +-
 docs/manualpages/EPS/EPSMonitorFirst.html          |    22 +-
 docs/manualpages/EPS/EPSMonitorLGCreate.html       |    57 +
 docs/manualpages/EPS/EPSMonitorSet.html            |    42 +-
 docs/manualpages/EPS/EPSMonitorSetFromOptions.html |    44 +
 docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html    |    14 +-
 docs/manualpages/EPS/EPSPRIMMEGetMethod.html       |    20 +-
 docs/manualpages/EPS/EPSPRIMMEMethod.html          |     4 +-
 docs/manualpages/EPS/EPSPRIMMESetBlockSize.html    |    21 +-
 docs/manualpages/EPS/EPSPRIMMESetMethod.html       |    23 +-
 docs/manualpages/EPS/EPSPowerGetShiftType.html     |    14 +-
 docs/manualpages/EPS/EPSPowerSetShiftType.html     |    14 +-
 docs/manualpages/EPS/EPSPowerShiftType.html        |     4 +-
 docs/manualpages/EPS/EPSProblemType.html           |     4 +-
 docs/manualpages/EPS/EPSRQCGGetReset.html          |    14 +-
 docs/manualpages/EPS/EPSRQCGSetReset.html          |    14 +-
 docs/manualpages/EPS/EPSReasonView.html            |    14 +-
 docs/manualpages/EPS/EPSReasonViewFromOptions.html |    10 +-
 docs/manualpages/EPS/EPSRegister.html              |    10 +-
 docs/manualpages/EPS/EPSRegisterAll.html           |     6 +-
 docs/manualpages/EPS/EPSReset.html                 |    10 +-
 docs/manualpages/EPS/EPSSetArbitrarySelection.html |    26 +-
 docs/manualpages/EPS/EPSSetBV.html                 |    10 +-
 docs/manualpages/EPS/EPSSetBalance.html            |    20 +-
 docs/manualpages/EPS/EPSSetConvergenceTest.html    |    28 +-
 .../EPS/EPSSetConvergenceTestFunction.html         |    27 +-
 docs/manualpages/EPS/EPSSetDS.html                 |    10 +-
 docs/manualpages/EPS/EPSSetDeflationSpace.html     |    12 +-
 docs/manualpages/EPS/EPSSetDimensions.html         |    22 +-
 .../EPS/EPSSetEigenvalueComparison.html            |    30 +-
 docs/manualpages/EPS/EPSSetExtraction.html         |    24 +-
 docs/manualpages/EPS/EPSSetFromOptions.html        |    10 +-
 docs/manualpages/EPS/EPSSetInitialSpace.html       |    13 +-
 docs/manualpages/EPS/EPSSetInterval.html           |    16 +-
 docs/manualpages/EPS/EPSSetOperators.html          |    12 +-
 docs/manualpages/EPS/EPSSetOptionsPrefix.html      |    10 +-
 docs/manualpages/EPS/EPSSetProblemType.html        |    20 +-
 docs/manualpages/EPS/EPSSetPurify.html             |    14 +-
 docs/manualpages/EPS/EPSSetRG.html                 |    10 +-
 docs/manualpages/EPS/EPSSetST.html                 |    10 +-
 docs/manualpages/EPS/EPSSetStoppingTest.html       |    51 +
 .../EPS/EPSSetStoppingTestFunction.html            |    70 +
 docs/manualpages/EPS/EPSSetTarget.html             |    15 +-
 docs/manualpages/EPS/EPSSetTolerances.html         |    17 +-
 docs/manualpages/EPS/EPSSetTrackAll.html           |    10 +-
 docs/manualpages/EPS/EPSSetTrueResidual.html       |    14 +-
 docs/manualpages/EPS/EPSSetType.html               |    14 +-
 docs/manualpages/EPS/EPSSetUp.html                 |    10 +-
 docs/manualpages/EPS/EPSSetWhichEigenpairs.html    |    58 +-
 docs/manualpages/EPS/EPSSetWorkVecs.html           |    10 +-
 docs/manualpages/EPS/EPSSolve.html                 |    28 +-
 docs/manualpages/EPS/EPSStop.html                  |    27 +
 docs/manualpages/EPS/EPSStoppingBasic.html         |    62 +
 docs/manualpages/EPS/EPSType.html                  |     4 +-
 docs/manualpages/EPS/EPSValuesView.html            |    14 +-
 docs/manualpages/EPS/EPSValuesViewFromOptions.html |    10 +-
 docs/manualpages/EPS/EPSVectorsView.html           |    14 +-
 .../manualpages/EPS/EPSVectorsViewFromOptions.html |    10 +-
 docs/manualpages/EPS/EPSView.html                  |    18 +-
 docs/manualpages/EPS/EPSWhich.html                 |     4 +-
 docs/manualpages/EPS/index.html                    |   214 +-
 docs/manualpages/FN/FN.html                        |     4 +-
 docs/manualpages/FN/FNAppendOptionsPrefix.html     |    10 +-
 docs/manualpages/FN/FNCombineGetChildren.html      |    25 +-
 docs/manualpages/FN/FNCombineSetChildren.html      |    16 +-
 docs/manualpages/FN/FNCombineType.html             |     4 +-
 docs/manualpages/FN/FNCreate.html                  |    17 +-
 docs/manualpages/FN/FNDestroy.html                 |    13 +-
 docs/manualpages/FN/FNDuplicate.html               |    14 +-
 docs/manualpages/FN/FNEvaluateDerivative.html      |    14 +-
 docs/manualpages/FN/FNEvaluateFunction.html        |    14 +-
 docs/manualpages/FN/FNEvaluateFunctionMat.html     |    23 +-
 docs/manualpages/FN/FNEvaluateFunctionMatVec.html  |    44 +
 docs/manualpages/FN/FNFinalizePackage.html         |     6 +-
 docs/manualpages/FN/FNGetOptionsPrefix.html        |    17 +-
 docs/manualpages/FN/FNGetScale.html                |    14 +-
 docs/manualpages/FN/FNGetType.html                 |    14 +-
 docs/manualpages/FN/FNInitializePackage.html       |     6 +-
 docs/manualpages/FN/FNPhiGetIndex.html             |    14 +-
 docs/manualpages/FN/FNPhiSetIndex.html             |    10 +-
 docs/manualpages/FN/FNRationalGetDenominator.html  |    14 +-
 docs/manualpages/FN/FNRationalGetNumerator.html    |    14 +-
 docs/manualpages/FN/FNRationalSetDenominator.html  |    14 +-
 docs/manualpages/FN/FNRationalSetNumerator.html    |    15 +-
 docs/manualpages/FN/FNRegister.html                |    10 +-
 docs/manualpages/FN/FNRegisterAll.html             |     6 +-
 docs/manualpages/FN/FNSetFromOptions.html          |    10 +-
 docs/manualpages/FN/FNSetOptionsPrefix.html        |    10 +-
 docs/manualpages/FN/FNSetScale.html                |    13 +-
 docs/manualpages/FN/FNSetType.html                 |    14 +-
 docs/manualpages/FN/FNType.html                    |     5 +-
 docs/manualpages/FN/FNView.html                    |    14 +-
 docs/manualpages/FN/index.html                     |    16 +-
 docs/manualpages/MFN/MFN.html                      |     4 +-
 docs/manualpages/MFN/MFNAllocateSolution.html      |    10 +-
 docs/manualpages/MFN/MFNAppendOptionsPrefix.html   |    10 +-
 docs/manualpages/MFN/MFNConvergedReason.html       |     5 +-
 docs/manualpages/MFN/MFNCreate.html                |    15 +-
 docs/manualpages/MFN/MFNDestroy.html               |    11 +-
 docs/manualpages/MFN/MFNFinalizePackage.html       |     6 +-
 docs/manualpages/MFN/MFNGetBV.html                 |    14 +-
 docs/manualpages/MFN/MFNGetConvergedReason.html    |    31 +-
 docs/manualpages/MFN/MFNGetDimensions.html         |    14 +-
 .../manualpages/MFN/MFNGetErrorIfNotConverged.html |    14 +-
 docs/manualpages/MFN/MFNGetFN.html                 |    15 +-
 docs/manualpages/MFN/MFNGetIterationNumber.html    |    14 +-
 docs/manualpages/MFN/MFNGetMonitorContext.html     |    14 +-
 docs/manualpages/MFN/MFNGetOperator.html           |    14 +-
 docs/manualpages/MFN/MFNGetOptionsPrefix.html      |    17 +-
 docs/manualpages/MFN/MFNGetTolerances.html         |    14 +-
 docs/manualpages/MFN/MFNGetType.html               |    14 +-
 docs/manualpages/MFN/MFNInitializePackage.html     |     6 +-
 docs/manualpages/MFN/MFNMonitorCancel.html         |    14 +-
 docs/manualpages/MFN/MFNMonitorDefault.html        |    14 +-
 docs/manualpages/MFN/MFNMonitorLGCreate.html       |    54 +
 docs/manualpages/MFN/MFNMonitorSet.html            |    28 +-
 docs/manualpages/MFN/MFNMonitorSetFromOptions.html |    44 +
 docs/manualpages/MFN/MFNReasonView.html            |    14 +-
 docs/manualpages/MFN/MFNReasonViewFromOptions.html |    10 +-
 docs/manualpages/MFN/MFNRegister.html              |    10 +-
 docs/manualpages/MFN/MFNRegisterAll.html           |     6 +-
 docs/manualpages/MFN/MFNReset.html                 |    10 +-
 docs/manualpages/MFN/MFNSetBV.html                 |    10 +-
 docs/manualpages/MFN/MFNSetDimensions.html         |    14 +-
 .../manualpages/MFN/MFNSetErrorIfNotConverged.html |    14 +-
 docs/manualpages/MFN/MFNSetFN.html                 |    10 +-
 docs/manualpages/MFN/MFNSetFromOptions.html        |    11 +-
 docs/manualpages/MFN/MFNSetOperator.html           |    11 +-
 docs/manualpages/MFN/MFNSetOptionsPrefix.html      |    10 +-
 docs/manualpages/MFN/MFNSetTolerances.html         |    16 +-
 docs/manualpages/MFN/MFNSetType.html               |    14 +-
 docs/manualpages/MFN/MFNSetUp.html                 |    10 +-
 docs/manualpages/MFN/MFNSolve.html                 |    25 +-
 docs/manualpages/MFN/MFNType.html                  |     5 +-
 docs/manualpages/MFN/MFNView.html                  |    18 +-
 docs/manualpages/MFN/index.html                    |    46 +-
 docs/manualpages/NEP/NEP.html                      |     6 +-
 docs/manualpages/NEP/NEPAllocateSolution.html      |    10 +-
 docs/manualpages/NEP/NEPAppendOptionsPrefix.html   |    10 +-
 docs/manualpages/NEP/NEPApplyFunction.html         |    20 +-
 docs/manualpages/NEP/NEPApplyJacobian.html         |    18 +-
 docs/manualpages/NEP/NEPCISSGetRefinement.html     |    16 +-
 docs/manualpages/NEP/NEPCISSGetSizes.html          |    22 +-
 docs/manualpages/NEP/NEPCISSGetThreshold.html      |    14 +-
 docs/manualpages/NEP/NEPCISSSetRefinement.html     |    20 +-
 docs/manualpages/NEP/NEPCISSSetSizes.html          |    36 +-
 docs/manualpages/NEP/NEPCISSSetThreshold.html      |    16 +-
 docs/manualpages/NEP/NEPComputeError.html          |    16 +-
 docs/manualpages/NEP/NEPComputeFunction.html       |    14 +-
 docs/manualpages/NEP/NEPComputeJacobian.html       |    14 +-
 docs/manualpages/NEP/NEPConv.html                  |    29 +
 .../NEP/NEPConvMonitorSetFromOptions.html          |    42 +
 docs/manualpages/NEP/NEPConvergedReason.html       |    18 +-
 docs/manualpages/NEP/NEPCreate.html                |    17 +-
 docs/manualpages/NEP/NEPDestroy.html               |    13 +-
 docs/manualpages/NEP/NEPErrorType.html             |     7 +-
 docs/manualpages/NEP/NEPErrorView.html             |    21 +-
 docs/manualpages/NEP/NEPErrorViewFromOptions.html  |    10 +-
 docs/manualpages/NEP/NEPFinalizePackage.html       |     6 +-
 docs/manualpages/NEP/NEPGetBV.html                 |    14 +-
 docs/manualpages/NEP/NEPGetConstCorrectionTol.html |    37 -
 docs/manualpages/NEP/NEPGetConverged.html          |    14 +-
 docs/manualpages/NEP/NEPGetConvergedReason.html    |    30 +-
 docs/manualpages/NEP/NEPGetConvergenceTest.html    |    37 +
 docs/manualpages/NEP/NEPGetDS.html                 |    14 +-
 docs/manualpages/NEP/NEPGetDerivatives.html        |    42 +
 docs/manualpages/NEP/NEPGetDimensions.html         |    17 +-
 docs/manualpages/NEP/NEPGetEigenpair.html          |    18 +-
 docs/manualpages/NEP/NEPGetErrorEstimate.html      |    14 +-
 docs/manualpages/NEP/NEPGetFunction.html           |    18 +-
 docs/manualpages/NEP/NEPGetIterationNumber.html    |    16 +-
 docs/manualpages/NEP/NEPGetJacobian.html           |    18 +-
 docs/manualpages/NEP/NEPGetKSP.html                |    39 -
 docs/manualpages/NEP/NEPGetLagPreconditioner.html  |    37 -
 docs/manualpages/NEP/NEPGetMonitorContext.html     |    14 +-
 docs/manualpages/NEP/NEPGetOptionsPrefix.html      |    17 +-
 docs/manualpages/NEP/NEPGetRG.html                 |    16 +-
 docs/manualpages/NEP/NEPGetRefine.html             |    21 +-
 docs/manualpages/NEP/NEPGetSplitOperatorInfo.html  |    14 +-
 docs/manualpages/NEP/NEPGetSplitOperatorTerm.html  |    14 +-
 docs/manualpages/NEP/NEPGetStoppingTest.html       |    37 +
 docs/manualpages/NEP/NEPGetTarget.html             |    14 +-
 docs/manualpages/NEP/NEPGetTolerances.html         |    21 +-
 docs/manualpages/NEP/NEPGetTrackAll.html           |    14 +-
 docs/manualpages/NEP/NEPGetType.html               |    15 +-
 docs/manualpages/NEP/NEPGetWhichEigenpairs.html    |    14 +-
 docs/manualpages/NEP/NEPInitializePackage.html     |     6 +-
 docs/manualpages/NEP/NEPInterpolGetDegree.html     |    15 +-
 docs/manualpages/NEP/NEPInterpolGetPEP.html        |    15 +-
 docs/manualpages/NEP/NEPInterpolSetDegree.html     |    11 +-
 docs/manualpages/NEP/NEPInterpolSetPEP.html        |    11 +-
 docs/manualpages/NEP/NEPMonitorAll.html            |    22 +-
 docs/manualpages/NEP/NEPMonitorCancel.html         |    14 +-
 docs/manualpages/NEP/NEPMonitorConverged.html      |    26 +-
 docs/manualpages/NEP/NEPMonitorFirst.html          |    22 +-
 docs/manualpages/NEP/NEPMonitorLGCreate.html       |    57 +
 docs/manualpages/NEP/NEPMonitorSet.html            |    44 +-
 docs/manualpages/NEP/NEPMonitorSetFromOptions.html |    44 +
 docs/manualpages/NEP/NEPNArnoldiGetKSP.html        |    37 +
 docs/manualpages/NEP/NEPNArnoldiSetKSP.html        |    36 +
 .../manualpages/NEP/NEPNLEIGSGetInterpolation.html |    40 +
 docs/manualpages/NEP/NEPNLEIGSGetKSPs.html         |    34 +
 docs/manualpages/NEP/NEPNLEIGSGetLocking.html      |    37 +
 docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html     |    40 +
 docs/manualpages/NEP/NEPNLEIGSGetRestart.html      |    37 +
 .../NEP/NEPNLEIGSGetSingularitiesFunction.html     |    40 +
 docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html |    37 +
 .../manualpages/NEP/NEPNLEIGSSetInterpolation.html |    48 +
 docs/manualpages/NEP/NEPNLEIGSSetLocking.html      |    46 +
 docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html     |    51 +
 docs/manualpages/NEP/NEPNLEIGSSetRestart.html      |    43 +
 .../NEP/NEPNLEIGSSetSingularitiesFunction.html     |    60 +
 docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html |    46 +
 docs/manualpages/NEP/NEPProjectOperator.html       |    12 +-
 .../NEP/NEPRIIGetConstCorrectionTol.html           |    37 +
 docs/manualpages/NEP/NEPRIIGetKSP.html             |    39 +
 .../NEP/NEPRIIGetLagPreconditioner.html            |    37 +
 .../NEP/NEPRIIGetMaximumIterations.html            |    37 +
 .../NEP/NEPRIISetConstCorrectionTol.html           |    46 +
 docs/manualpages/NEP/NEPRIISetKSP.html             |    36 +
 .../NEP/NEPRIISetLagPreconditioner.html            |    48 +
 .../NEP/NEPRIISetMaximumIterations.html            |    36 +
 docs/manualpages/NEP/NEPReasonView.html            |    17 +-
 docs/manualpages/NEP/NEPReasonViewFromOptions.html |    10 +-
 docs/manualpages/NEP/NEPRefine.html                |     4 +-
 docs/manualpages/NEP/NEPRefineGetKSP.html          |    37 +
 docs/manualpages/NEP/NEPRefineScheme.html          |    28 +
 docs/manualpages/NEP/NEPRegister.html              |    10 +-
 docs/manualpages/NEP/NEPRegisterAll.html           |     6 +-
 docs/manualpages/NEP/NEPReset.html                 |    10 +-
 docs/manualpages/NEP/NEPSLPGetEPS.html             |    14 +-
 docs/manualpages/NEP/NEPSLPSetEPS.html             |    10 +-
 docs/manualpages/NEP/NEPSetBV.html                 |    10 +-
 docs/manualpages/NEP/NEPSetConstCorrectionTol.html |    45 -
 docs/manualpages/NEP/NEPSetConvergenceTest.html    |    46 +-
 .../NEP/NEPSetConvergenceTestFunction.html         |    63 +
 docs/manualpages/NEP/NEPSetDS.html                 |    10 +-
 docs/manualpages/NEP/NEPSetDerivatives.html        |    43 +
 docs/manualpages/NEP/NEPSetDimensions.html         |    20 +-
 .../NEP/NEPSetEigenvalueComparison.html            |    67 +
 docs/manualpages/NEP/NEPSetFromOptions.html        |    13 +-
 docs/manualpages/NEP/NEPSetFunction.html           |    17 +-
 docs/manualpages/NEP/NEPSetInitialSpace.html       |    12 +-
 docs/manualpages/NEP/NEPSetJacobian.html           |    14 +-
 docs/manualpages/NEP/NEPSetKSP.html                |    40 -
 docs/manualpages/NEP/NEPSetLagPreconditioner.html  |    48 -
 docs/manualpages/NEP/NEPSetOptionsPrefix.html      |    10 +-
 docs/manualpages/NEP/NEPSetRG.html                 |    10 +-
 docs/manualpages/NEP/NEPSetRefine.html             |    32 +-
 docs/manualpages/NEP/NEPSetSplitOperator.html      |    19 +-
 docs/manualpages/NEP/NEPSetStoppingTest.html       |    51 +
 .../NEP/NEPSetStoppingTestFunction.html            |    67 +
 docs/manualpages/NEP/NEPSetTarget.html             |    16 +-
 docs/manualpages/NEP/NEPSetTolerances.html         |    31 +-
 docs/manualpages/NEP/NEPSetTrackAll.html           |    10 +-
 docs/manualpages/NEP/NEPSetType.html               |    17 +-
 docs/manualpages/NEP/NEPSetUp.html                 |    10 +-
 docs/manualpages/NEP/NEPSetWhichEigenpairs.html    |    59 +-
 docs/manualpages/NEP/NEPSetWorkVecs.html           |    10 +-
 docs/manualpages/NEP/NEPSolve.html                 |    25 +-
 docs/manualpages/NEP/NEPStop.html                  |    27 +
 docs/manualpages/NEP/NEPStoppingBasic.html         |    59 +
 docs/manualpages/NEP/NEPType.html                  |     5 +-
 docs/manualpages/NEP/NEPValuesView.html            |    14 +-
 docs/manualpages/NEP/NEPValuesViewFromOptions.html |    10 +-
 docs/manualpages/NEP/NEPVectorsView.html           |    14 +-
 .../manualpages/NEP/NEPVectorsViewFromOptions.html |    10 +-
 docs/manualpages/NEP/NEPView.html                  |    18 +-
 docs/manualpages/NEP/NEPWhich.html                 |     8 +-
 docs/manualpages/NEP/index.html                    |   170 +-
 docs/manualpages/PEP/PEP.html                      |     4 +-
 docs/manualpages/PEP/PEPAllocateSolution.html      |    10 +-
 docs/manualpages/PEP/PEPAppendOptionsPrefix.html   |    10 +-
 docs/manualpages/PEP/PEPBasis.html                 |     4 +-
 docs/manualpages/PEP/PEPComputeError.html          |    18 +-
 docs/manualpages/PEP/PEPConv.html                  |     7 +-
 .../PEP/PEPConvMonitorSetFromOptions.html          |    42 +
 docs/manualpages/PEP/PEPConvergedReason.html       |    13 +-
 docs/manualpages/PEP/PEPCreate.html                |    22 +-
 docs/manualpages/PEP/PEPDestroy.html               |    18 +-
 docs/manualpages/PEP/PEPErrorType.html             |     4 +-
 docs/manualpages/PEP/PEPErrorView.html             |    26 +-
 docs/manualpages/PEP/PEPErrorViewFromOptions.html  |    10 +-
 docs/manualpages/PEP/PEPExtract.html               |     4 +-
 docs/manualpages/PEP/PEPFinalizePackage.html       |     6 +-
 docs/manualpages/PEP/PEPGetBV.html                 |    14 +-
 docs/manualpages/PEP/PEPGetBasis.html              |    14 +-
 docs/manualpages/PEP/PEPGetConverged.html          |    16 +-
 docs/manualpages/PEP/PEPGetConvergedReason.html    |    24 +-
 docs/manualpages/PEP/PEPGetConvergenceTest.html    |    14 +-
 docs/manualpages/PEP/PEPGetDS.html                 |    14 +-
 docs/manualpages/PEP/PEPGetDimensions.html         |    17 +-
 docs/manualpages/PEP/PEPGetEigenpair.html          |    20 +-
 docs/manualpages/PEP/PEPGetErrorEstimate.html      |    14 +-
 docs/manualpages/PEP/PEPGetExtract.html            |    14 +-
 docs/manualpages/PEP/PEPGetIterationNumber.html    |    14 +-
 docs/manualpages/PEP/PEPGetMonitorContext.html     |    14 +-
 docs/manualpages/PEP/PEPGetNumMatrices.html        |    14 +-
 docs/manualpages/PEP/PEPGetOperators.html          |    14 +-
 docs/manualpages/PEP/PEPGetOptionsPrefix.html      |    17 +-
 docs/manualpages/PEP/PEPGetProblemType.html        |    14 +-
 docs/manualpages/PEP/PEPGetRG.html                 |    14 +-
 docs/manualpages/PEP/PEPGetRefine.html             |    20 +-
 docs/manualpages/PEP/PEPGetST.html                 |    16 +-
 docs/manualpages/PEP/PEPGetScale.html              |    22 +-
 docs/manualpages/PEP/PEPGetStoppingTest.html       |    37 +
 docs/manualpages/PEP/PEPGetTarget.html             |    14 +-
 docs/manualpages/PEP/PEPGetTolerances.html         |    14 +-
 docs/manualpages/PEP/PEPGetTrackAll.html           |    14 +-
 docs/manualpages/PEP/PEPGetType.html               |    15 +-
 docs/manualpages/PEP/PEPGetWhichEigenpairs.html    |    14 +-
 docs/manualpages/PEP/PEPInitializePackage.html     |     6 +-
 docs/manualpages/PEP/PEPJDGetRestart.html          |    14 +-
 docs/manualpages/PEP/PEPJDGetTolerances.html       |    42 -
 docs/manualpages/PEP/PEPJDSetRestart.html          |    14 +-
 docs/manualpages/PEP/PEPJDSetTolerances.html       |    49 -
 .../manualpages/PEP/PEPLinearGetCompanionForm.html |    14 +-
 docs/manualpages/PEP/PEPLinearGetEPS.html          |    14 +-
 .../PEP/PEPLinearGetExplicitMatrix.html            |    14 +-
 .../manualpages/PEP/PEPLinearSetCompanionForm.html |    14 +-
 docs/manualpages/PEP/PEPLinearSetEPS.html          |    10 +-
 .../PEP/PEPLinearSetExplicitMatrix.html            |    14 +-
 docs/manualpages/PEP/PEPMonitorAll.html            |    22 +-
 docs/manualpages/PEP/PEPMonitorCancel.html         |    14 +-
 docs/manualpages/PEP/PEPMonitorConverged.html      |    26 +-
 docs/manualpages/PEP/PEPMonitorFirst.html          |    22 +-
 docs/manualpages/PEP/PEPMonitorLGCreate.html       |    57 +
 docs/manualpages/PEP/PEPMonitorSet.html            |    42 +-
 docs/manualpages/PEP/PEPMonitorSetFromOptions.html |    44 +
 docs/manualpages/PEP/PEPProblemType.html           |     4 +-
 docs/manualpages/PEP/PEPQArnoldiGetLocking.html    |    14 +-
 docs/manualpages/PEP/PEPQArnoldiGetRestart.html    |    14 +-
 docs/manualpages/PEP/PEPQArnoldiSetLocking.html    |    14 +-
 docs/manualpages/PEP/PEPQArnoldiSetRestart.html    |    14 +-
 docs/manualpages/PEP/PEPReasonView.html            |    24 +-
 docs/manualpages/PEP/PEPReasonViewFromOptions.html |    10 +-
 docs/manualpages/PEP/PEPRefine.html                |     4 +-
 docs/manualpages/PEP/PEPRefineGetKSP.html          |    14 +-
 docs/manualpages/PEP/PEPRefineScheme.html          |    28 +
 docs/manualpages/PEP/PEPRegister.html              |    10 +-
 docs/manualpages/PEP/PEPRegisterAll.html           |     6 +-
 docs/manualpages/PEP/PEPReset.html                 |    10 +-
 docs/manualpages/PEP/PEPSTOARGetLocking.html       |    14 +-
 docs/manualpages/PEP/PEPSTOARSetLocking.html       |    14 +-
 docs/manualpages/PEP/PEPScale.html                 |     4 +-
 docs/manualpages/PEP/PEPSetBV.html                 |    10 +-
 docs/manualpages/PEP/PEPSetBasis.html              |    14 +-
 docs/manualpages/PEP/PEPSetConvergenceTest.html    |    30 +-
 .../PEP/PEPSetConvergenceTestFunction.html         |    27 +-
 docs/manualpages/PEP/PEPSetDS.html                 |    10 +-
 docs/manualpages/PEP/PEPSetDimensions.html         |    22 +-
 .../PEP/PEPSetEigenvalueComparison.html            |    32 +-
 docs/manualpages/PEP/PEPSetExtract.html            |    14 +-
 docs/manualpages/PEP/PEPSetFromOptions.html        |    18 +-
 docs/manualpages/PEP/PEPSetInitialSpace.html       |    12 +-
 docs/manualpages/PEP/PEPSetOperators.html          |    20 +-
 docs/manualpages/PEP/PEPSetOptionsPrefix.html      |    10 +-
 docs/manualpages/PEP/PEPSetProblemType.html        |    16 +-
 docs/manualpages/PEP/PEPSetRG.html                 |    10 +-
 docs/manualpages/PEP/PEPSetRefine.html             |    34 +-
 docs/manualpages/PEP/PEPSetST.html                 |    10 +-
 docs/manualpages/PEP/PEPSetScale.html              |    28 +-
 docs/manualpages/PEP/PEPSetStoppingTest.html       |    51 +
 .../PEP/PEPSetStoppingTestFunction.html            |    67 +
 docs/manualpages/PEP/PEPSetTarget.html             |    14 +-
 docs/manualpages/PEP/PEPSetTolerances.html         |    16 +-
 docs/manualpages/PEP/PEPSetTrackAll.html           |    10 +-
 docs/manualpages/PEP/PEPSetType.html               |    14 +-
 docs/manualpages/PEP/PEPSetUp.html                 |    10 +-
 docs/manualpages/PEP/PEPSetWhichEigenpairs.html    |    48 +-
 docs/manualpages/PEP/PEPSetWorkVecs.html           |    10 +-
 docs/manualpages/PEP/PEPSolve.html                 |    34 +-
 docs/manualpages/PEP/PEPStop.html                  |    27 +
 docs/manualpages/PEP/PEPStoppingBasic.html         |    59 +
 docs/manualpages/PEP/PEPTOARGetLocking.html        |    14 +-
 docs/manualpages/PEP/PEPTOARGetRestart.html        |    14 +-
 docs/manualpages/PEP/PEPTOARSetLocking.html        |    14 +-
 docs/manualpages/PEP/PEPTOARSetRestart.html        |    14 +-
 docs/manualpages/PEP/PEPType.html                  |     4 +-
 docs/manualpages/PEP/PEPValuesView.html            |    14 +-
 docs/manualpages/PEP/PEPValuesViewFromOptions.html |    10 +-
 docs/manualpages/PEP/PEPVectorsView.html           |    14 +-
 .../manualpages/PEP/PEPVectorsViewFromOptions.html |    10 +-
 docs/manualpages/PEP/PEPView.html                  |    18 +-
 docs/manualpages/PEP/PEPWhich.html                 |     4 +-
 docs/manualpages/PEP/index.html                    |   110 +-
 docs/manualpages/RG/RG.html                        |     4 +-
 docs/manualpages/RG/RGAppendOptionsPrefix.html     |    10 +-
 docs/manualpages/RG/RGCheckInside.html             |    18 +-
 docs/manualpages/RG/RGComputeContour.html          |    14 +-
 docs/manualpages/RG/RGCreate.html                  |    14 +-
 docs/manualpages/RG/RGDestroy.html                 |    10 +-
 docs/manualpages/RG/RGEllipseGetParameters.html    |    16 +-
 docs/manualpages/RG/RGEllipseSetParameters.html    |    20 +-
 docs/manualpages/RG/RGFinalizePackage.html         |     6 +-
 docs/manualpages/RG/RGGetComplement.html           |    14 +-
 docs/manualpages/RG/RGGetOptionsPrefix.html        |    17 +-
 docs/manualpages/RG/RGGetScale.html                |    14 +-
 docs/manualpages/RG/RGGetType.html                 |    14 +-
 docs/manualpages/RG/RGInitializePackage.html       |     6 +-
 docs/manualpages/RG/RGIntervalGetEndpoints.html    |    14 +-
 docs/manualpages/RG/RGIntervalSetEndpoints.html    |    19 +-
 docs/manualpages/RG/RGIsTrivial.html               |    14 +-
 docs/manualpages/RG/RGPolygonGetVertices.html      |    16 +-
 docs/manualpages/RG/RGPolygonSetVertices.html      |    18 +-
 docs/manualpages/RG/RGPopScale.html                |    33 +
 docs/manualpages/RG/RGPushScale.html               |    42 +
 docs/manualpages/RG/RGRegister.html                |    10 +-
 docs/manualpages/RG/RGRegisterAll.html             |     6 +-
 docs/manualpages/RG/RGRingGetParameters.html       |    22 +-
 docs/manualpages/RG/RGRingSetParameters.html       |    32 +-
 docs/manualpages/RG/RGSetComplement.html           |    16 +-
 docs/manualpages/RG/RGSetFromOptions.html          |    10 +-
 docs/manualpages/RG/RGSetOptionsPrefix.html        |    10 +-
 docs/manualpages/RG/RGSetScale.html                |    16 +-
 docs/manualpages/RG/RGSetType.html                 |    13 +-
 docs/manualpages/RG/RGType.html                    |     4 +-
 docs/manualpages/RG/RGView.html                    |    14 +-
 docs/manualpages/RG/index.html                     |    38 +-
 docs/manualpages/ST/ST.html                        |     4 +-
 docs/manualpages/ST/STAppendOptionsPrefix.html     |    10 +-
 docs/manualpages/ST/STApply.html                   |    16 +-
 docs/manualpages/ST/STApplyTranspose.html          |    16 +-
 docs/manualpages/ST/STBackTransform.html           |     6 +-
 docs/manualpages/ST/STCayleyGetAntishift.html      |    14 +-
 docs/manualpages/ST/STCayleySetAntishift.html      |    14 +-
 docs/manualpages/ST/STCheckNullSpace.html          |    10 +-
 docs/manualpages/ST/STComputeExplicitOperator.html |    14 +-
 docs/manualpages/ST/STCreate.html                  |    14 +-
 docs/manualpages/ST/STDestroy.html                 |    10 +-
 docs/manualpages/ST/STFinalizePackage.html         |     6 +-
 docs/manualpages/ST/STGetBalanceMatrix.html        |    14 +-
 docs/manualpages/ST/STGetBilinearForm.html         |    14 +-
 docs/manualpages/ST/STGetKSP.html                  |    20 +-
 docs/manualpages/ST/STGetMatMode.html              |    14 +-
 docs/manualpages/ST/STGetMatStructure.html         |    14 +-
 docs/manualpages/ST/STGetNumMatrices.html          |    14 +-
 docs/manualpages/ST/STGetOperators.html            |    14 +-
 docs/manualpages/ST/STGetOptionsPrefix.html        |    17 +-
 docs/manualpages/ST/STGetShift.html                |    14 +-
 docs/manualpages/ST/STGetTOperators.html           |    14 +-
 docs/manualpages/ST/STGetTransform.html            |    14 +-
 docs/manualpages/ST/STGetType.html                 |    14 +-
 docs/manualpages/ST/STInitializePackage.html       |     6 +-
 docs/manualpages/ST/STMatCreateVecs.html           |    14 +-
 docs/manualpages/ST/STMatGetLocalSize.html         |    14 +-
 docs/manualpages/ST/STMatGetSize.html              |    14 +-
 docs/manualpages/ST/STMatMode.html                 |     4 +-
 docs/manualpages/ST/STMatMult.html                 |    16 +-
 docs/manualpages/ST/STMatMultTranspose.html        |    16 +-
 docs/manualpages/ST/STMatSetUp.html                |    12 +-
 docs/manualpages/ST/STMatSolve.html                |    14 +-
 docs/manualpages/ST/STMatSolveTranspose.html       |    18 +-
 docs/manualpages/ST/STPostSolve.html               |    10 +-
 docs/manualpages/ST/STPrecondGetKSPHasMat.html     |    14 +-
 docs/manualpages/ST/STPrecondGetMatForPC.html      |    14 +-
 docs/manualpages/ST/STPrecondSetKSPHasMat.html     |    10 +-
 docs/manualpages/ST/STPrecondSetMatForPC.html      |    10 +-
 docs/manualpages/ST/STRegister.html                |    10 +-
 docs/manualpages/ST/STRegisterAll.html             |     6 +-
 docs/manualpages/ST/STReset.html                   |    10 +-
 docs/manualpages/ST/STSHELL.html                   |     4 +-
 docs/manualpages/ST/STScaleShift.html              |    10 +-
 docs/manualpages/ST/STSetBalanceMatrix.html        |    10 +-
 docs/manualpages/ST/STSetDefaultShift.html         |    10 +-
 docs/manualpages/ST/STSetFromOptions.html          |    10 +-
 docs/manualpages/ST/STSetKSP.html                  |    11 +-
 docs/manualpages/ST/STSetMatMode.html              |    16 +-
 docs/manualpages/ST/STSetMatStructure.html         |    14 +-
 docs/manualpages/ST/STSetOperators.html            |    12 +-
 docs/manualpages/ST/STSetOptionsPrefix.html        |    10 +-
 docs/manualpages/ST/STSetShift.html                |    10 +-
 docs/manualpages/ST/STSetTransform.html            |    14 +-
 docs/manualpages/ST/STSetType.html                 |    14 +-
 docs/manualpages/ST/STSetUp.html                   |    10 +-
 docs/manualpages/ST/STShellGetContext.html         |    14 +-
 docs/manualpages/ST/STShellSetApply.html           |    16 +-
 docs/manualpages/ST/STShellSetApplyTranspose.html  |    16 +-
 docs/manualpages/ST/STShellSetBackTransform.html   |    16 +-
 docs/manualpages/ST/STShellSetContext.html         |    16 +-
 docs/manualpages/ST/STType.html                    |     4 +-
 docs/manualpages/ST/STView.html                    |    14 +-
 docs/manualpages/ST/index.html                     |    26 +-
 docs/manualpages/SVD/SVD.html                      |     4 +-
 docs/manualpages/SVD/SVDAllocateSolution.html      |    10 +-
 docs/manualpages/SVD/SVDAppendOptionsPrefix.html   |    10 +-
 docs/manualpages/SVD/SVDComputeError.html          |    16 +-
 docs/manualpages/SVD/SVDConv.html                  |    28 +
 .../SVD/SVDConvMonitorSetFromOptions.html          |    42 +
 docs/manualpages/SVD/SVDConvergedReason.html       |    11 +-
 docs/manualpages/SVD/SVDCreate.html                |    14 +-
 docs/manualpages/SVD/SVDCrossGetEPS.html           |    14 +-
 docs/manualpages/SVD/SVDCrossSetEPS.html           |    10 +-
 docs/manualpages/SVD/SVDCyclicGetEPS.html          |    14 +-
 .../SVD/SVDCyclicGetExplicitMatrix.html            |    14 +-
 docs/manualpages/SVD/SVDCyclicSetEPS.html          |    10 +-
 .../SVD/SVDCyclicSetExplicitMatrix.html            |    14 +-
 docs/manualpages/SVD/SVDDestroy.html               |    10 +-
 docs/manualpages/SVD/SVDErrorType.html             |     4 +-
 docs/manualpages/SVD/SVDErrorView.html             |    16 +-
 docs/manualpages/SVD/SVDErrorViewFromOptions.html  |    10 +-
 docs/manualpages/SVD/SVDFinalizePackage.html       |     6 +-
 docs/manualpages/SVD/SVDGetBV.html                 |    14 +-
 docs/manualpages/SVD/SVDGetConverged.html          |    14 +-
 docs/manualpages/SVD/SVDGetConvergedReason.html    |    27 +-
 docs/manualpages/SVD/SVDGetConvergenceTest.html    |    37 +
 docs/manualpages/SVD/SVDGetDS.html                 |    14 +-
 docs/manualpages/SVD/SVDGetDimensions.html         |    16 +-
 docs/manualpages/SVD/SVDGetImplicitTranspose.html  |    16 +-
 docs/manualpages/SVD/SVDGetIterationNumber.html    |    14 +-
 docs/manualpages/SVD/SVDGetMonitorContext.html     |    14 +-
 docs/manualpages/SVD/SVDGetOperator.html           |    14 +-
 docs/manualpages/SVD/SVDGetOptionsPrefix.html      |    17 +-
 docs/manualpages/SVD/SVDGetSingularTriplet.html    |    16 +-
 docs/manualpages/SVD/SVDGetStoppingTest.html       |    37 +
 docs/manualpages/SVD/SVDGetTolerances.html         |    14 +-
 docs/manualpages/SVD/SVDGetTrackAll.html           |    14 +-
 docs/manualpages/SVD/SVDGetType.html               |    14 +-
 .../SVD/SVDGetWhichSingularTriplets.html           |    14 +-
 docs/manualpages/SVD/SVDInitializePackage.html     |     6 +-
 docs/manualpages/SVD/SVDLanczosGetOneSide.html     |    14 +-
 docs/manualpages/SVD/SVDLanczosSetOneSide.html     |    14 +-
 docs/manualpages/SVD/SVDMonitorAll.html            |    20 +-
 docs/manualpages/SVD/SVDMonitorCancel.html         |    14 +-
 docs/manualpages/SVD/SVDMonitorConverged.html      |    24 +-
 docs/manualpages/SVD/SVDMonitorFirst.html          |    20 +-
 docs/manualpages/SVD/SVDMonitorLGCreate.html       |    57 +
 docs/manualpages/SVD/SVDMonitorSet.html            |    38 +-
 docs/manualpages/SVD/SVDMonitorSetFromOptions.html |    44 +
 docs/manualpages/SVD/SVDReasonView.html            |    14 +-
 docs/manualpages/SVD/SVDReasonViewFromOptions.html |    10 +-
 docs/manualpages/SVD/SVDRegister.html              |    10 +-
 docs/manualpages/SVD/SVDRegisterAll.html           |     6 +-
 docs/manualpages/SVD/SVDReset.html                 |    10 +-
 docs/manualpages/SVD/SVDSetBV.html                 |    12 +-
 docs/manualpages/SVD/SVDSetConvergenceTest.html    |    55 +
 .../SVD/SVDSetConvergenceTestFunction.html         |    61 +
 docs/manualpages/SVD/SVDSetDS.html                 |    10 +-
 docs/manualpages/SVD/SVDSetDimensions.html         |    22 +-
 docs/manualpages/SVD/SVDSetFromOptions.html        |    10 +-
 docs/manualpages/SVD/SVDSetImplicitTranspose.html  |    14 +-
 docs/manualpages/SVD/SVDSetInitialSpace.html       |    12 +-
 docs/manualpages/SVD/SVDSetInitialSpaceLeft.html   |    12 +-
 docs/manualpages/SVD/SVDSetOperator.html           |    10 +-
 docs/manualpages/SVD/SVDSetOptionsPrefix.html      |    10 +-
 docs/manualpages/SVD/SVDSetStoppingTest.html       |    51 +
 .../SVD/SVDSetStoppingTestFunction.html            |    67 +
 docs/manualpages/SVD/SVDSetTolerances.html         |    16 +-
 docs/manualpages/SVD/SVDSetTrackAll.html           |    10 +-
 docs/manualpages/SVD/SVDSetType.html               |    14 +-
 docs/manualpages/SVD/SVDSetUp.html                 |    10 +-
 .../SVD/SVDSetWhichSingularTriplets.html           |    22 +-
 docs/manualpages/SVD/SVDSolve.html                 |    24 +-
 docs/manualpages/SVD/SVDStop.html                  |    27 +
 docs/manualpages/SVD/SVDStoppingBasic.html         |    59 +
 docs/manualpages/SVD/SVDTRLanczosGetOneSide.html   |    14 +-
 docs/manualpages/SVD/SVDTRLanczosSetOneSide.html   |    14 +-
 docs/manualpages/SVD/SVDType.html                  |     4 +-
 docs/manualpages/SVD/SVDValuesView.html            |    14 +-
 docs/manualpages/SVD/SVDValuesViewFromOptions.html |    10 +-
 docs/manualpages/SVD/SVDVectorsView.html           |    14 +-
 .../manualpages/SVD/SVDVectorsViewFromOptions.html |    10 +-
 docs/manualpages/SVD/SVDView.html                  |    18 +-
 docs/manualpages/SVD/SVDWhich.html                 |     4 +-
 docs/manualpages/SVD/index.html                    |    92 +-
 docs/manualpages/singleindex.html                  |   846 +-
 docs/manualpages/sys/SlepcCheckOrthogonality.html  |    22 +-
 docs/manualpages/sys/SlepcConvMonitorCreate.html   |    47 +
 docs/manualpages/sys/SlepcConvMonitorDestroy.html  |    33 +
 docs/manualpages/sys/SlepcFinalize.html            |     6 +-
 docs/manualpages/sys/SlepcGetVersion.html          |    14 +-
 docs/manualpages/sys/SlepcInitialize.html          |    14 +-
 docs/manualpages/sys/SlepcInitializeFortran.html   |     6 +-
 .../sys/SlepcInitializeNoArguments.html            |     6 +-
 docs/manualpages/sys/SlepcInitialized.html         |     6 +-
 docs/manualpages/sys/SlepcMatConvertSeqDense.html  |    10 +-
 docs/manualpages/sys/SlepcMatTile.html             |    26 +-
 docs/manualpages/sys/SlepcSCCompare.html           |    20 +-
 docs/manualpages/sys/SlepcSNPrintfScalar.html      |    16 +-
 docs/manualpages/sys/SlepcSortEigenvalues.html     |    18 +-
 docs/manualpages/sys/SlepcVecNormalize.html        |    16 +-
 docs/manualpages/sys/SlepcVecPoolCreate.html       |    14 +-
 docs/manualpages/sys/SlepcVecPoolDestroy.html      |    10 +-
 docs/manualpages/sys/SlepcVecPoolGetVecs.html      |    16 +-
 docs/manualpages/sys/SlepcVecPoolRestoreVecs.html  |    12 +-
 docs/manualpages/sys/VecCompGetSubVecs.html        |    14 +-
 docs/manualpages/sys/VecCompSetSubVecs.html        |    12 +-
 docs/manualpages/sys/VecCreateComp.html            |    20 +-
 docs/manualpages/sys/VecCreateCompWithVecs.html    |    16 +-
 docs/manualpages/sys/index.html                    |    28 +-
 gmakefile                                          |    11 +-
 include/index.html                                 |     4 +-
 include/makefile                                   |     2 +-
 include/makefile.html                              |     8 +-
 include/slepc.h                                    |     2 +-
 include/slepc.h.html                               |     8 +-
 include/slepc/finclude/ftn-auto/slepcbv.h90        |    16 +-
 include/slepc/finclude/ftn-auto/slepcds.h90        |    14 +-
 include/slepc/finclude/ftn-auto/slepceps.h90       |   426 +-
 include/slepc/finclude/ftn-auto/slepcfn.h90        |    90 +-
 include/slepc/finclude/ftn-auto/slepcnep.h90       |   285 +-
 include/slepc/finclude/ftn-auto/slepcpep.h90       |    80 +-
 include/slepc/finclude/ftn-auto/slepcrg.h90        |    41 +-
 include/slepc/finclude/ftn-auto/slepcst.h90        |    65 +-
 include/slepc/finclude/ftn-auto/slepcsvd.h90       |    68 +-
 include/slepc/finclude/ftn-custom/makefile         |     2 +-
 include/slepc/finclude/ftn-custom/slepcbv.h90      |     2 +-
 include/slepc/finclude/ftn-custom/slepcbvdef.h90   |     2 +-
 include/slepc/finclude/ftn-custom/slepcds.h90      |     2 +-
 include/slepc/finclude/ftn-custom/slepcdsdef.h90   |     2 +-
 include/slepc/finclude/ftn-custom/slepceps.h90     |     2 +-
 include/slepc/finclude/ftn-custom/slepcepsdef.h90  |     2 +-
 include/slepc/finclude/ftn-custom/slepcfn.h90      |     2 +-
 include/slepc/finclude/ftn-custom/slepcfndef.h90   |     2 +-
 include/slepc/finclude/ftn-custom/slepcmfn.h90     |     2 +-
 include/slepc/finclude/ftn-custom/slepcmfndef.h90  |     2 +-
 include/slepc/finclude/ftn-custom/slepcnep.h90     |     2 +-
 include/slepc/finclude/ftn-custom/slepcnepdef.h90  |     2 +-
 include/slepc/finclude/ftn-custom/slepcpep.h90     |     2 +-
 include/slepc/finclude/ftn-custom/slepcpepdef.h90  |     2 +-
 include/slepc/finclude/ftn-custom/slepcrg.h90      |     2 +-
 include/slepc/finclude/ftn-custom/slepcrgdef.h90   |     2 +-
 include/slepc/finclude/ftn-custom/slepcst.h90      |     2 +-
 include/slepc/finclude/ftn-custom/slepcstdef.h90   |     2 +-
 include/slepc/finclude/ftn-custom/slepcsvd.h90     |     2 +-
 include/slepc/finclude/ftn-custom/slepcsvddef.h90  |     2 +-
 include/slepc/finclude/index.html                  |     4 +-
 include/slepc/finclude/makefile                    |     2 +-
 include/slepc/finclude/makefile.html               |     8 +-
 include/slepc/finclude/slepc.h                     |     2 +-
 include/slepc/finclude/slepc.h.html                |     8 +-
 include/slepc/finclude/slepc.h90                   |     2 +-
 include/slepc/finclude/slepc.h90.html              |     8 +-
 include/slepc/finclude/slepcbv.h                   |     2 +-
 include/slepc/finclude/slepcbv.h.html              |     8 +-
 include/slepc/finclude/slepcbv.h90                 |     2 +-
 include/slepc/finclude/slepcbv.h90.html            |     8 +-
 include/slepc/finclude/slepcbvdef.h                |    10 +-
 include/slepc/finclude/slepcbvdef.h.html           |    12 +-
 include/slepc/finclude/slepcdef.h                  |     2 +-
 include/slepc/finclude/slepcdef.h.html             |     8 +-
 include/slepc/finclude/slepcds.h                   |     2 +-
 include/slepc/finclude/slepcds.h.html              |     8 +-
 include/slepc/finclude/slepcds.h90                 |     2 +-
 include/slepc/finclude/slepcds.h90.html            |     8 +-
 include/slepc/finclude/slepcdsdef.h                |     6 +-
 include/slepc/finclude/slepcdsdef.h.html           |     8 +-
 include/slepc/finclude/slepceps.h                  |    37 +-
 include/slepc/finclude/slepceps.h.html             |   351 +-
 include/slepc/finclude/slepceps.h90                |     2 +-
 include/slepc/finclude/slepceps.h90.html           |     8 +-
 include/slepc/finclude/slepcepsdef.h               |    12 +-
 include/slepc/finclude/slepcepsdef.h.html          |    56 +-
 include/slepc/finclude/slepcfn.h                   |     2 +-
 include/slepc/finclude/slepcfn.h.html              |     8 +-
 include/slepc/finclude/slepcfn.h90                 |     2 +-
 include/slepc/finclude/slepcfn.h90.html            |     8 +-
 include/slepc/finclude/slepcfndef.h                |    11 +-
 include/slepc/finclude/slepcfndef.h.html           |    15 +-
 include/slepc/finclude/slepcmfn.h                  |     7 +-
 include/slepc/finclude/slepcmfn.h.html             |    51 +-
 include/slepc/finclude/slepcmfn.h90                |     2 +-
 include/slepc/finclude/slepcmfn.h90.html           |     8 +-
 include/slepc/finclude/slepcmfndef.h               |    14 +-
 include/slepc/finclude/slepcmfndef.h.html          |    18 +-
 include/slepc/finclude/slepcnep.h                  |    56 +-
 include/slepc/finclude/slepcnep.h.html             |   148 +-
 include/slepc/finclude/slepcnep.h90                |     2 +-
 include/slepc/finclude/slepcnep.h90.html           |     8 +-
 include/slepc/finclude/slepcnepdef.h               |    13 +-
 include/slepc/finclude/slepcnepdef.h.html          |    31 +-
 include/slepc/finclude/slepcpep.h                  |    36 +-
 include/slepc/finclude/slepcpep.h.html             |   252 +-
 include/slepc/finclude/slepcpep.h90                |     2 +-
 include/slepc/finclude/slepcpep.h90.html           |     8 +-
 include/slepc/finclude/slepcpepdef.h               |    10 +-
 include/slepc/finclude/slepcpepdef.h.html          |    32 +-
 include/slepc/finclude/slepcrg.h                   |     2 +-
 include/slepc/finclude/slepcrg.h.html              |     8 +-
 include/slepc/finclude/slepcrg.h90                 |     2 +-
 include/slepc/finclude/slepcrg.h90.html            |     8 +-
 include/slepc/finclude/slepcrgdef.h                |     9 +-
 include/slepc/finclude/slepcrgdef.h.html           |    21 +-
 include/slepc/finclude/slepcst.h                   |     2 +-
 include/slepc/finclude/slepcst.h.html              |     8 +-
 include/slepc/finclude/slepcst.h90                 |     2 +-
 include/slepc/finclude/slepcst.h90.html            |     8 +-
 include/slepc/finclude/slepcstdef.h                |    22 +-
 include/slepc/finclude/slepcstdef.h.html           |    24 +-
 include/slepc/finclude/slepcsvd.h                  |    27 +-
 include/slepc/finclude/slepcsvd.h.html             |    79 +-
 include/slepc/finclude/slepcsvd.h90                |     2 +-
 include/slepc/finclude/slepcsvd.h90.html           |     8 +-
 include/slepc/finclude/slepcsvddef.h               |    10 +-
 include/slepc/finclude/slepcsvddef.h.html          |    24 +-
 include/slepc/finclude/slepcsys.h                  |     6 +-
 include/slepc/finclude/slepcsys.h.html             |    36 +-
 include/slepc/finclude/slepcsysdef.h               |     8 +-
 include/slepc/finclude/slepcsysdef.h.html          |    12 +-
 include/slepc/private/bvimpl.h                     |    12 +-
 include/slepc/private/bvimpl.h.html                |   478 +-
 include/slepc/private/dsimpl.h                     |     4 +-
 include/slepc/private/dsimpl.h.html                |    46 +-
 include/slepc/private/epsimpl.h                    |    11 +-
 include/slepc/private/epsimpl.h.html               |   231 +-
 include/slepc/private/fnimpl.h                     |    62 +-
 include/slepc/private/fnimpl.h.html                |   125 +-
 include/slepc/private/index.html                   |     4 +-
 include/slepc/private/makefile                     |     2 +-
 include/slepc/private/makefile.html                |     8 +-
 include/slepc/private/mfnimpl.h                    |    61 +-
 include/slepc/private/mfnimpl.h.html               |   105 +-
 include/slepc/private/nepimpl.h                    |    90 +-
 include/slepc/private/nepimpl.h.html               |   246 +-
 include/slepc/private/pepimpl.h                    |    14 +-
 include/slepc/private/pepimpl.h.html               |   194 +-
 include/slepc/private/rgimpl.h                     |     5 +-
 include/slepc/private/rgimpl.h.html                |    21 +-
 include/slepc/private/slepcimpl.h                  |    10 +-
 include/slepc/private/slepcimpl.h.html             |    30 +-
 include/slepc/private/stimpl.h                     |    26 +-
 include/slepc/private/stimpl.h.html                |   116 +-
 include/slepc/private/svdimpl.h                    |    69 +-
 include/slepc/private/svdimpl.h.html               |   255 +-
 include/slepc/private/vecimplslepc.h               |     2 +-
 include/slepcblaslapack.h                          |    29 +-
 include/slepcblaslapack.h.html                     |   601 +-
 include/slepcbv.h                                  |    15 +-
 include/slepcbv.h.html                             |   257 +-
 include/slepcds.h                                  |     4 +-
 include/slepcds.h.html                             |    28 +-
 include/slepceps.h                                 |   104 +-
 include/slepceps.h.html                            |   590 +-
 include/slepcfn.h                                  |     4 +-
 include/slepcfn.h.html                             |    86 +-
 include/slepcmath.h                                |     2 +-
 include/slepcmath.h.html                           |     8 +-
 include/slepcmfn.h                                 |     8 +-
 include/slepcmfn.h.html                            |   148 +-
 include/slepcnep.h                                 |   135 +-
 include/slepcnep.h.html                            |   435 +-
 include/slepcpep.h                                 |    90 +-
 include/slepcpep.h.html                            |   362 +-
 include/slepcrg.h                                  |     4 +-
 include/slepcrg.h.html                             |    38 +-
 include/slepcrgtypes.h                             |     2 +-
 include/slepcrgtypes.h.html                        |     8 +-
 include/slepcsc.h                                  |     2 +-
 include/slepcst.h                                  |     2 +-
 include/slepcst.h.html                             |     8 +-
 include/slepcsvd.h                                 |    48 +-
 include/slepcsvd.h.html                            |   230 +-
 include/slepcsys.h                                 |     9 +-
 include/slepcsys.h.html                            |    51 +-
 include/slepcvec.h                                 |     2 +-
 include/slepcvec.h.html                            |     8 +-
 include/slepcversion.h                             |    12 +-
 include/slepcversion.h.html                        |    12 +-
 lib/slepc/conf/bfort-slepc.txt                     |    10 +
 lib/slepc/conf/slepc_common                        |     2 +-
 lib/slepc/conf/slepc_rules                         |    12 +-
 lib/slepc/conf/slepc_test                          |     3 +-
 lib/slepc/conf/slepc_variables                     |    11 +-
 makefile                                           |     6 +-
 src/eps/examples/index.html                        |     4 +-
 src/eps/examples/makefile                          |     2 +-
 src/eps/examples/makefile.html                     |     8 +-
 src/eps/examples/tests/index.html                  |     4 +-
 src/eps/examples/tests/makefile                    |    50 +-
 src/eps/examples/tests/makefile.html               |    56 +-
 src/eps/examples/tests/output/test14_1.out         |    46 +-
 src/eps/examples/tests/output/test14f_1.out        |    46 +-
 src/eps/examples/tests/output/test1_2.out          |     2 +-
 src/eps/examples/tests/test1.c                     |     8 +-
 src/eps/examples/tests/test1.c.html                |    14 +-
 src/eps/examples/tests/test10.c                    |     8 +-
 src/eps/examples/tests/test10.c.html               |    14 +-
 src/eps/examples/tests/test11.c                    |     8 +-
 src/eps/examples/tests/test11.c.html               |    14 +-
 src/eps/examples/tests/test12.c                    |     8 +-
 src/eps/examples/tests/test12.c.html               |    14 +-
 src/eps/examples/tests/test13.c                    |     6 +-
 src/eps/examples/tests/test13.c.html               |    12 +-
 src/eps/examples/tests/test14.c                    |     8 +-
 src/eps/examples/tests/test14.c.html               |   194 +-
 src/eps/examples/tests/test14f.F                   |    15 +-
 src/eps/examples/tests/test14f.F.html              |   375 +-
 src/eps/examples/tests/test15f.F                   |    11 +-
 src/eps/examples/tests/test15f.F.html              |   305 +-
 src/eps/examples/tests/test16.c                    |     6 +-
 src/eps/examples/tests/test16.c.html               |    12 +-
 src/eps/examples/tests/test2.c                     |     6 +-
 src/eps/examples/tests/test2.c.html                |    12 +-
 src/eps/examples/tests/test3.c                     |     6 +-
 src/eps/examples/tests/test3.c.html                |    12 +-
 src/eps/examples/tests/test4.c                     |     8 +-
 src/eps/examples/tests/test4.c.html                |    14 +-
 src/eps/examples/tests/test5.c                     |     8 +-
 src/eps/examples/tests/test5.c.html                |    14 +-
 src/eps/examples/tests/test6.c                     |     8 +-
 src/eps/examples/tests/test6.c.html                |    14 +-
 src/eps/examples/tests/test7f.F                    |     7 +-
 src/eps/examples/tests/test7f.F.html               |   199 +-
 src/eps/examples/tests/test8.c                     |     6 +-
 src/eps/examples/tests/test8.c.html                |    12 +-
 src/eps/examples/tests/test9.c                     |     6 +-
 src/eps/examples/tests/test9.c.html                |    12 +-
 src/eps/examples/tutorials/X.bin                   |   Bin 0 -> 152 bytes
 src/eps/examples/tutorials/Ybus.bin                |   Bin 0 -> 1384 bytes
 src/eps/examples/tutorials/ex1.c                   |     8 +-
 src/eps/examples/tutorials/ex1.c.html              |    14 +-
 src/eps/examples/tutorials/ex10.c                  |    10 +-
 src/eps/examples/tutorials/ex10.c.html             |    16 +-
 src/eps/examples/tutorials/ex11.c                  |    10 +-
 src/eps/examples/tutorials/ex11.c.html             |    16 +-
 src/eps/examples/tutorials/ex12.c                  |    10 +-
 src/eps/examples/tutorials/ex12.c.html             |    16 +-
 src/eps/examples/tutorials/ex13.c                  |    12 +-
 src/eps/examples/tutorials/ex13.c.html             |    18 +-
 src/eps/examples/tutorials/ex18.c                  |    20 +-
 src/eps/examples/tutorials/ex18.c.html             |   380 +-
 src/eps/examples/tutorials/ex19.c                  |     8 +-
 src/eps/examples/tutorials/ex19.c.html             |    14 +-
 src/eps/examples/tutorials/ex1f.F                  |     7 +-
 src/eps/examples/tutorials/ex1f.F.html             |   289 +-
 src/eps/examples/tutorials/ex1f90.F90              |    10 +-
 src/eps/examples/tutorials/ex1f90.F90.html         |   218 +-
 src/eps/examples/tutorials/ex2.c                   |    10 +-
 src/eps/examples/tutorials/ex2.c.html              |    16 +-
 src/eps/examples/tutorials/ex24.c                  |    63 +-
 src/eps/examples/tutorials/ex24.c.html             |   221 +-
 src/eps/examples/tutorials/ex25.c                  |    18 +-
 src/eps/examples/tutorials/ex25.c.html             |    24 +-
 src/eps/examples/tutorials/ex29.c                  |   204 +
 src/eps/examples/tutorials/ex29.c.html             |   211 +
 src/eps/examples/tutorials/ex3.c                   |     8 +-
 src/eps/examples/tutorials/ex3.c.html              |    14 +-
 src/eps/examples/tutorials/ex30.c                  |   306 +
 src/eps/examples/tutorials/ex30.c.html             |   304 +
 src/eps/examples/tutorials/ex31.c                  |   706 +
 src/eps/examples/tutorials/ex31.c.html             |   701 +
 src/eps/examples/tutorials/ex4.c                   |     8 +-
 src/eps/examples/tutorials/ex4.c.html              |    14 +-
 src/eps/examples/tutorials/ex5.c                   |     8 +-
 src/eps/examples/tutorials/ex5.c.html              |    14 +-
 src/eps/examples/tutorials/ex6f.F                  |    10 +-
 src/eps/examples/tutorials/ex6f.F.html             |   478 +-
 src/eps/examples/tutorials/ex7.c                   |    20 +-
 src/eps/examples/tutorials/ex7.c.html              |    26 +-
 src/eps/examples/tutorials/ex9.c                   |    18 +-
 src/eps/examples/tutorials/ex9.c.html              |    24 +-
 src/eps/examples/tutorials/index.html              |     7 +-
 src/eps/examples/tutorials/makefile                |   137 +-
 src/eps/examples/tutorials/makefile.html           |   143 +-
 src/eps/examples/tutorials/output/ex10_1.out       |     4 +-
 src/eps/examples/tutorials/output/ex12_1.out       |    12 +-
 src/eps/examples/tutorials/output/ex18_1.out       |     2 +-
 src/eps/examples/tutorials/output/ex24_1.out       |     8 +-
 src/eps/examples/tutorials/output/ex25_1.out       |     2 +-
 src/eps/examples/tutorials/output/ex29_1.out       |     5 +
 src/eps/examples/tutorials/output/ex2_ciss.out     |    10 +
 src/eps/examples/tutorials/output/ex30_1.out       |     4 +
 src/eps/examples/tutorials/output/ex31_1.out       |    10 +
 src/eps/examples/tutorials/output/ex4_ciss_1.out   |    12 +
 src/eps/examples/tutorials/output/ex7_ciss_1.out   |    14 +
 src/eps/examples/tutorials/output/ex9_2.out        |     9 +
 src/eps/f90-mod/index.html                         |     4 +-
 src/eps/f90-mod/makefile                           |     2 +-
 src/eps/f90-mod/makefile.html                      |     8 +-
 src/eps/f90-mod/slepcepsmod.F                      |     2 +-
 src/eps/f90-mod/slepcepsmod.F.html                 |     8 +-
 src/eps/impls/cg/index.html                        |     4 +-
 src/eps/impls/cg/lobpcg/ftn-auto/lobpcgf.c         |    19 +-
 src/eps/impls/cg/lobpcg/index.html                 |     4 +-
 src/eps/impls/cg/lobpcg/lobpcg.c                   |   269 +-
 src/eps/impls/cg/lobpcg/lobpcg.c.html              |  1149 +-
 src/eps/impls/cg/lobpcg/makefile                   |     2 +-
 src/eps/impls/cg/lobpcg/makefile.html              |     8 +-
 src/eps/impls/cg/makefile                          |     2 +-
 src/eps/impls/cg/makefile.html                     |     8 +-
 src/eps/impls/cg/rqcg/index.html                   |     4 +-
 src/eps/impls/cg/rqcg/makefile                     |     2 +-
 src/eps/impls/cg/rqcg/makefile.html                |     8 +-
 src/eps/impls/cg/rqcg/rqcg.c                       |    11 +-
 src/eps/impls/cg/rqcg/rqcg.c.html                  |   425 +-
 src/eps/impls/ciss/ciss.c                          |   903 +-
 src/eps/impls/ciss/ciss.c.html                     |  2900 ++--
 src/eps/impls/ciss/ftn-auto/cissf.c                |    52 +-
 src/eps/impls/ciss/index.html                      |     4 +-
 src/eps/impls/ciss/makefile                        |     2 +-
 src/eps/impls/ciss/makefile.html                   |     8 +-
 src/eps/impls/davidson/davidson.c                  |   149 +-
 src/eps/impls/davidson/davidson.c.html             |   889 +-
 src/eps/impls/davidson/davidson.h                  |   162 +-
 src/eps/impls/davidson/davidson.h.html             |   310 +
 src/eps/impls/davidson/dvdcalcpairs.c              |     9 +-
 src/eps/impls/davidson/dvdcalcpairs.c.html         |   505 +-
 src/eps/impls/davidson/dvdgd2.c                    |     3 +-
 src/eps/impls/davidson/dvdgd2.c.html               |   345 +-
 src/eps/impls/davidson/dvdimprovex.c               |    67 +-
 src/eps/impls/davidson/dvdimprovex.c.html          |  1205 +-
 src/eps/impls/davidson/dvdinitv.c                  |    14 +-
 src/eps/impls/davidson/dvdinitv.c.html             |    20 +-
 src/eps/impls/davidson/dvdschm.c                   |    42 +-
 src/eps/impls/davidson/dvdschm.c.html              |   112 +-
 src/eps/impls/davidson/dvdtestconv.c               |     6 +-
 src/eps/impls/davidson/dvdtestconv.c.html          |    12 +-
 src/eps/impls/davidson/dvdupdatev.c                |     5 +-
 src/eps/impls/davidson/dvdupdatev.c.html           |   723 +-
 src/eps/impls/davidson/dvdutils.c                  |   176 +-
 src/eps/impls/davidson/dvdutils.c.html             |   822 +-
 src/eps/impls/davidson/gd/ftn-auto/gdf.c           |     8 +-
 src/eps/impls/davidson/gd/gd.c                     |   133 +-
 src/eps/impls/davidson/gd/gd.c.html                |   729 +-
 src/eps/impls/davidson/gd/index.html               |     4 +-
 src/eps/impls/davidson/gd/makefile                 |     2 +-
 src/eps/impls/davidson/gd/makefile.html            |     8 +-
 src/eps/impls/davidson/index.html                  |     4 +-
 src/eps/impls/davidson/jd/index.html               |     4 +-
 src/eps/impls/davidson/jd/jd.c                     |    79 +-
 src/eps/impls/davidson/jd/jd.c.html                |   819 +-
 src/eps/impls/davidson/jd/makefile                 |     2 +-
 src/eps/impls/davidson/jd/makefile.html            |     8 +-
 src/eps/impls/davidson/makefile                    |     2 +-
 src/eps/impls/davidson/makefile.html               |     8 +-
 src/eps/impls/external/arpack/arpack.c             |     3 +-
 src/eps/impls/external/arpack/arpack.c.html        |   519 +-
 src/eps/impls/external/arpack/arpackp.h            |     2 +-
 src/eps/impls/external/arpack/arpackp.h.html       |     8 +-
 src/eps/impls/external/arpack/index.html           |     4 +-
 src/eps/impls/external/arpack/makefile             |     2 +-
 src/eps/impls/external/arpack/makefile.html        |     8 +-
 src/eps/impls/external/blopex/blopex.c             |    20 +-
 src/eps/impls/external/blopex/blopex.c.html        |   790 +-
 src/eps/impls/external/blopex/index.html           |     4 +-
 src/eps/impls/external/blopex/makefile             |     3 +-
 src/eps/impls/external/blopex/makefile.html        |     9 +-
 .../impls/external/blopex/petsc-interface.c.html   |     6 +-
 .../impls/external/blopex/petsc-interface.h.html   |     6 +-
 src/eps/impls/external/blopex/slepc-interface.c    |     4 +-
 .../impls/external/blopex/slepc-interface.c.html   |    10 +-
 src/eps/impls/external/blopex/slepc-interface.h    |     5 +-
 .../impls/external/blopex/slepc-interface.h.html   |    29 +-
 src/eps/impls/external/blzpack/blzpack.c           |     5 +-
 src/eps/impls/external/blzpack/blzpack.c.html      |   587 +-
 src/eps/impls/external/blzpack/blzpackp.h          |     2 +-
 src/eps/impls/external/blzpack/blzpackp.h.html     |     8 +-
 src/eps/impls/external/blzpack/index.html          |     4 +-
 src/eps/impls/external/blzpack/makefile            |     3 +-
 src/eps/impls/external/blzpack/makefile.html       |     9 +-
 src/eps/impls/external/feast/feast.c               |    12 +-
 src/eps/impls/external/feast/feast.c.html          |   483 +-
 src/eps/impls/external/feast/feastp.h              |     2 +-
 src/eps/impls/external/feast/feastp.h.html         |     8 +-
 src/eps/impls/external/feast/index.html            |     4 +-
 src/eps/impls/external/feast/makefile              |     3 +-
 src/eps/impls/external/feast/makefile.html         |     9 +-
 src/eps/impls/external/index.html                  |     4 +-
 src/eps/impls/external/makefile                    |     2 +-
 src/eps/impls/external/makefile.html               |     8 +-
 src/eps/impls/external/primme/index.html           |     4 +-
 src/eps/impls/external/primme/makefile             |     4 +-
 src/eps/impls/external/primme/makefile.html        |    10 +-
 src/eps/impls/external/primme/primme.c             |    71 +-
 src/eps/impls/external/primme/primme.c.html        |   855 +-
 src/eps/impls/external/trlan/index.html            |     4 +-
 src/eps/impls/external/trlan/makefile              |     5 +-
 src/eps/impls/external/trlan/makefile.html         |    11 +-
 src/eps/impls/external/trlan/trlan.c               |     3 +-
 src/eps/impls/external/trlan/trlan.c.html          |   257 +-
 src/eps/impls/external/trlan/trlanp.h              |     2 +-
 src/eps/impls/external/trlan/trlanp.h.html         |     8 +-
 src/eps/impls/index.html                           |     4 +-
 src/eps/impls/krylov/arnoldi/arnoldi.c             |    16 +-
 src/eps/impls/krylov/arnoldi/arnoldi.c.html        |   294 +-
 src/eps/impls/krylov/arnoldi/index.html            |     4 +-
 src/eps/impls/krylov/arnoldi/makefile              |     2 +-
 src/eps/impls/krylov/arnoldi/makefile.html         |     8 +-
 src/eps/impls/krylov/epskrylov.c                   |     7 +-
 src/eps/impls/krylov/epskrylov.c.html              |   729 +-
 src/eps/impls/krylov/index.html                    |     4 +-
 src/eps/impls/krylov/krylovschur/index.html        |     4 +-
 src/eps/impls/krylov/krylovschur/krylovschur.c     |   219 +-
 .../impls/krylov/krylovschur/krylovschur.c.html    |  2010 +--
 src/eps/impls/krylov/krylovschur/krylovschur.h     |    46 +-
 .../impls/krylov/krylovschur/krylovschur.h.html    |    56 +-
 src/eps/impls/krylov/krylovschur/ks-indef.c        |     5 +-
 src/eps/impls/krylov/krylovschur/ks-indef.c.html   |   135 +-
 src/eps/impls/krylov/krylovschur/ks-slice.c        |   163 +-
 src/eps/impls/krylov/krylovschur/ks-slice.c.html   |  2647 ++--
 src/eps/impls/krylov/krylovschur/ks-symm.c         |     5 +-
 src/eps/impls/krylov/krylovschur/ks-symm.c.html    |    87 +-
 src/eps/impls/krylov/krylovschur/makefile          |     2 +-
 src/eps/impls/krylov/krylovschur/makefile.html     |     8 +-
 src/eps/impls/krylov/lanczos/index.html            |     4 +-
 src/eps/impls/krylov/lanczos/lanczos.c             |    11 +-
 src/eps/impls/krylov/lanczos/lanczos.c.html        |   341 +-
 src/eps/impls/krylov/lanczos/makefile              |     2 +-
 src/eps/impls/krylov/lanczos/makefile.html         |     8 +-
 src/eps/impls/krylov/makefile                      |     2 +-
 src/eps/impls/krylov/makefile.html                 |     8 +-
 src/eps/impls/lapack/index.html                    |     4 +-
 src/eps/impls/lapack/lapack.c                      |     7 +-
 src/eps/impls/lapack/lapack.c.html                 |   255 +-
 src/eps/impls/lapack/makefile                      |     2 +-
 src/eps/impls/lapack/makefile.html                 |     8 +-
 src/eps/impls/makefile                             |     2 +-
 src/eps/impls/makefile.html                        |     8 +-
 src/eps/impls/power/index.html                     |     4 +-
 src/eps/impls/power/makefile                       |     2 +-
 src/eps/impls/power/makefile.html                  |     8 +-
 src/eps/impls/power/power.c                        |    15 +-
 src/eps/impls/power/power.c.html                   |   359 +-
 src/eps/impls/subspace/index.html                  |     4 +-
 src/eps/impls/subspace/makefile                    |     2 +-
 src/eps/impls/subspace/makefile.html               |     8 +-
 src/eps/impls/subspace/subspace.c                  |    14 +-
 src/eps/impls/subspace/subspace.c.html             |   170 +-
 src/eps/index.html                                 |     4 +-
 src/eps/interface/dlregiseps.c                     |    12 +-
 src/eps/interface/dlregiseps.c.html                |   170 +-
 src/eps/interface/epsbasic.c                       |    15 +-
 src/eps/interface/epsbasic.c.html                  |   747 +-
 src/eps/interface/epsdefault.c                     |    68 +-
 src/eps/interface/epsdefault.c.html                |   306 +-
 src/eps/interface/epsmon.c                         |   253 +-
 src/eps/interface/epsmon.c.html                    |   461 +-
 src/eps/interface/epsopts.c                        |   324 +-
 src/eps/interface/epsopts.c.html                   |  2530 ++--
 src/eps/interface/epsregis.c                       |    12 +-
 src/eps/interface/epsregis.c.html                  |    18 +-
 src/eps/interface/epssetup.c                       |     8 +-
 src/eps/interface/epssetup.c.html                  |   804 +-
 src/eps/interface/epssolve.c                       |    17 +-
 src/eps/interface/epssolve.c.html                  |   933 +-
 src/eps/interface/epsview.c                        |    42 +-
 src/eps/interface/epsview.c.html                   |  1236 +-
 src/eps/interface/ftn-auto/epsoptsf.c              |    18 +
 src/eps/interface/ftn-custom/makefile              |     2 +-
 src/eps/interface/ftn-custom/zepsf.c               |   105 +-
 src/eps/interface/index.html                       |     4 +-
 src/eps/interface/makefile                         |     2 +-
 src/eps/interface/makefile.html                    |     8 +-
 src/eps/makefile                                   |     2 +-
 src/eps/makefile.html                              |     8 +-
 src/index.html                                     |     4 +-
 src/makefile                                       |     2 +-
 src/makefile.html                                  |     8 +-
 src/mfn/examples/index.html                        |     4 +-
 src/mfn/examples/makefile                          |     2 +-
 src/mfn/examples/makefile.html                     |     8 +-
 src/mfn/examples/tests/index.html                  |     6 +-
 src/mfn/examples/tests/makefile                    |    33 +-
 src/mfn/examples/tests/makefile.html               |    39 +-
 src/mfn/examples/tests/output/test1.out            |     6 +
 src/mfn/examples/tests/test1.c                     |   103 +
 src/mfn/examples/tests/test1.c.html                |   117 +
 src/mfn/examples/tutorials/ex23.c                  |    23 +-
 src/mfn/examples/tutorials/ex23.c.html             |   323 +-
 src/mfn/examples/tutorials/ex26.c                  |   143 +
 src/mfn/examples/tutorials/ex26.c.html             |   157 +
 src/mfn/examples/tutorials/index.html              |     7 +-
 src/mfn/examples/tutorials/makefile                |    18 +-
 src/mfn/examples/tutorials/makefile.html           |    24 +-
 src/mfn/examples/tutorials/output/ex23_1.out       |     2 +-
 src/mfn/examples/tutorials/output/ex26_1.out       |     6 +
 src/mfn/f90-mod/index.html                         |     4 +-
 src/mfn/f90-mod/makefile                           |     2 +-
 src/mfn/f90-mod/makefile.html                      |     8 +-
 src/mfn/f90-mod/slepcmfnmod.F                      |     2 +-
 src/mfn/f90-mod/slepcmfnmod.F.html                 |     8 +-
 src/mfn/impls/expokit/index.html                   |    21 +
 src/mfn/impls/expokit/makefile                     |    36 +
 src/mfn/impls/expokit/makefile.html                |    51 +
 src/mfn/impls/expokit/mfnexpokit.c                 |   206 +
 src/mfn/impls/expokit/mfnexpokit.c.html            |   211 +
 src/mfn/impls/index.html                           |     5 +-
 src/mfn/impls/krylov/index.html                    |     4 +-
 src/mfn/impls/krylov/makefile                      |     2 +-
 src/mfn/impls/krylov/makefile.html                 |     8 +-
 src/mfn/impls/krylov/mfnkrylov.c                   |   263 +-
 src/mfn/impls/krylov/mfnkrylov.c.html              |   190 +
 src/mfn/impls/makefile                             |     4 +-
 src/mfn/impls/makefile.html                        |    10 +-
 src/mfn/index.html                                 |     4 +-
 src/mfn/interface/dlregismfn.c                     |     8 +-
 src/mfn/interface/dlregismfn.c.html                |    14 +-
 src/mfn/interface/ftn-custom/makefile              |     2 +-
 src/mfn/interface/ftn-custom/zmfnf.c               |     8 +-
 src/mfn/interface/index.html                       |     4 +-
 src/mfn/interface/makefile                         |     2 +-
 src/mfn/interface/makefile.html                    |     8 +-
 src/mfn/interface/mfnbasic.c                       |    10 +-
 src/mfn/interface/mfnbasic.c.html                  |   434 +-
 src/mfn/interface/mfnmon.c                         |    89 +-
 src/mfn/interface/mfnmon.c.html                    |   121 +-
 src/mfn/interface/mfnopts.c                        |    85 +-
 src/mfn/interface/mfnopts.c.html                   |   711 +-
 src/mfn/interface/mfnregis.c                       |     4 +-
 src/mfn/interface/mfnregis.c.html                  |    36 +-
 src/mfn/interface/mfnsetup.c                       |     5 +-
 src/mfn/interface/mfnsetup.c.html                  |   229 +-
 src/mfn/interface/mfnsolve.c                       |    18 +-
 src/mfn/interface/mfnsolve.c.html                  |   182 +-
 src/mfn/makefile                                   |     2 +-
 src/mfn/makefile.html                              |     8 +-
 src/nep/examples/index.html                        |     4 +-
 src/nep/examples/makefile                          |     2 +-
 src/nep/examples/makefile.html                     |     8 +-
 src/nep/examples/nlevp/gun.c                       |   180 +
 src/nep/examples/nlevp/gun.c.html                  |   190 +
 src/nep/examples/nlevp/index.html                  |     9 +-
 src/nep/examples/nlevp/loaded_string.c             |    16 +-
 src/nep/examples/nlevp/loaded_string.c.html        |    20 +-
 src/nep/examples/nlevp/makefile                    |    21 +-
 src/nep/examples/nlevp/makefile.html               |    27 +-
 src/nep/examples/nlevp/output/gun_1.out            |     5 +
 src/nep/examples/nlevp/output/loaded_string_1.out  |     2 +-
 src/nep/examples/tests/index.html                  |     6 +-
 src/nep/examples/tests/makefile                    |     2 +-
 src/nep/examples/tests/makefile.html               |     8 +-
 src/nep/examples/tutorials/ex20.c                  |    21 +-
 src/nep/examples/tutorials/ex20.c.html             |   627 +-
 src/nep/examples/tutorials/ex21.c                  |    20 +-
 src/nep/examples/tutorials/ex21.c.html             |   464 +-
 src/nep/examples/tutorials/ex22.c                  |    22 +-
 src/nep/examples/tutorials/ex22.c.html             |    82 +-
 src/nep/examples/tutorials/ex27.c                  |   245 +
 src/nep/examples/tutorials/ex27.c.html             |   251 +
 src/nep/examples/tutorials/index.html              |     7 +-
 src/nep/examples/tutorials/makefile                |    37 +-
 src/nep/examples/tutorials/makefile.html           |    43 +-
 src/nep/examples/tutorials/output/ex21_1.out       |     2 -
 src/nep/examples/tutorials/output/ex22_1.out       |     2 -
 src/nep/examples/tutorials/output/ex22_ciss_1.out  |     8 +
 src/nep/examples/tutorials/output/ex27_1.out       |     8 +
 src/nep/examples/tutorials/output/ex27_2.out       |     8 +
 src/nep/f90-mod/index.html                         |     6 +-
 src/nep/f90-mod/makefile                           |     2 +-
 src/nep/f90-mod/makefile.html                      |     8 +-
 src/nep/f90-mod/slepcnepmod.F                      |     2 +-
 src/nep/f90-mod/slepcnepmod.F.html                 |     8 +-
 src/nep/impls/ciss/ftn-auto/ncissf.c               |    16 +-
 src/nep/impls/ciss/index.html                      |     6 +-
 src/nep/impls/ciss/makefile                        |     2 +-
 src/nep/impls/ciss/makefile.html                   |     8 +-
 src/nep/impls/ciss/nciss.c                         |   235 +-
 src/nep/impls/ciss/nciss.c.html                    |  1942 +--
 src/nep/impls/index.html                           |     7 +-
 src/nep/impls/interpol/ftn-auto/interpolf.c        |     1 +
 src/nep/impls/interpol/index.html                  |     6 +-
 src/nep/impls/interpol/interpol.c                  |    80 +-
 src/nep/impls/interpol/interpol.c.html             |   676 +-
 src/nep/impls/interpol/makefile                    |     2 +-
 src/nep/impls/interpol/makefile.html               |     8 +-
 src/nep/impls/makefile                             |     4 +-
 src/nep/impls/makefile.html                        |    10 +-
 src/nep/impls/narnoldi/ftn-auto/makefile           |    13 +
 src/nep/impls/narnoldi/ftn-auto/narnoldif.c        |    58 +
 src/nep/impls/narnoldi/index.html                  |     6 +-
 src/nep/impls/narnoldi/makefile                    |     2 +-
 src/nep/impls/narnoldi/makefile.html               |     8 +-
 src/nep/impls/narnoldi/narnoldi.c                  |   215 +-
 src/nep/impls/narnoldi/narnoldi.c.html             |   399 +-
 src/nep/impls/nleigs/ftn-auto/makefile             |    13 +
 src/nep/impls/nleigs/ftn-auto/nleigsf.c            |   111 +
 src/nep/impls/nleigs/index.html                    |    25 +
 src/nep/impls/nleigs/makefile                      |    36 +
 src/nep/impls/nleigs/makefile.html                 |    51 +
 src/nep/impls/nleigs/nleigs.c                      |  2059 +++
 src/nep/impls/nleigs/nleigs.c.html                 |  1829 +++
 src/nep/impls/rii/ftn-auto/makefile                |    13 +
 src/nep/impls/rii/ftn-auto/riif.c                  |   112 +
 src/nep/impls/rii/index.html                       |     6 +-
 src/nep/impls/rii/makefile                         |     2 +-
 src/nep/impls/rii/makefile.html                    |     8 +-
 src/nep/impls/rii/rii.c                            |   550 +-
 src/nep/impls/rii/rii.c.html                       |   622 +-
 src/nep/impls/slp/index.html                       |     6 +-
 src/nep/impls/slp/makefile                         |     2 +-
 src/nep/impls/slp/makefile.html                    |     8 +-
 src/nep/impls/slp/slp.c                            |    60 +-
 src/nep/impls/slp/slp.c.html                       |   452 +-
 src/nep/index.html                                 |     6 +-
 src/nep/interface/dlregisnep.c                     |    12 +-
 src/nep/interface/dlregisnep.c.html                |   176 +-
 src/nep/interface/ftn-auto/nepbasicf.c             |    18 +-
 src/nep/interface/ftn-auto/nepoptsf.c              |    56 +-
 src/nep/interface/ftn-custom/makefile              |     2 +-
 src/nep/interface/ftn-custom/znepf.c               |   159 +-
 src/nep/interface/index.html                       |     6 +-
 src/nep/interface/makefile                         |     2 +-
 src/nep/interface/makefile.html                    |     8 +-
 src/nep/interface/nepbasic.c                       |   270 +-
 src/nep/interface/nepbasic.c.html                  |  1497 +-
 src/nep/interface/nepdefault.c                     |   150 +-
 src/nep/interface/nepdefault.c.html                |   202 +-
 src/nep/interface/nepmon.c                         |   225 +-
 src/nep/interface/nepmon.c.html                    |   607 +-
 src/nep/interface/nepopts.c                        |   651 +-
 src/nep/interface/nepopts.c.html                   |  1839 +--
 src/nep/interface/neprefine.c                      |   499 +-
 src/nep/interface/neprefine.c.html                 |   887 +-
 src/nep/interface/nepregis.c                       |     4 +-
 src/nep/interface/nepregis.c.html                  |    48 +-
 src/nep/interface/nepsetup.c                       |   118 +-
 src/nep/interface/nepsetup.c.html                  |   497 +-
 src/nep/interface/nepsolve.c                       |   164 +-
 src/nep/interface/nepsolve.c.html                  |  1067 +-
 src/nep/interface/nepview.c                        |   115 +-
 src/nep/interface/nepview.c.html                   |  1229 +-
 src/nep/makefile                                   |     2 +-
 src/nep/makefile.html                              |     8 +-
 src/pep/examples/index.html                        |     4 +-
 src/pep/examples/makefile                          |     2 +-
 src/pep/examples/makefile.html                     |     8 +-
 src/pep/examples/nlevp/acoustic_wave_1d.c          |    14 +-
 src/pep/examples/nlevp/acoustic_wave_1d.c.html     |    18 +-
 src/pep/examples/nlevp/acoustic_wave_2d.c          |    14 +-
 src/pep/examples/nlevp/acoustic_wave_2d.c.html     |    18 +-
 src/pep/examples/nlevp/butterfly.c                 |    14 +-
 src/pep/examples/nlevp/butterfly.c.html            |    18 +-
 src/pep/examples/nlevp/damped_beam.c               |    12 +-
 src/pep/examples/nlevp/damped_beam.c.html          |    16 +-
 src/pep/examples/nlevp/index.html                  |    22 +-
 src/pep/examples/nlevp/makefile                    |    20 +-
 src/pep/examples/nlevp/makefile.html               |    26 +-
 .../examples/nlevp/output/acoustic_wave_1d_1.out   |     2 +-
 .../examples/nlevp/output/acoustic_wave_2d_1.out   |     2 +-
 src/pep/examples/nlevp/output/spring_1.out         |     2 +-
 src/pep/examples/nlevp/pdde_stability.c            |    14 +-
 src/pep/examples/nlevp/pdde_stability.c.html       |    18 +-
 src/pep/examples/nlevp/planar_waveguide.c          |    12 +-
 src/pep/examples/nlevp/planar_waveguide.c.html     |    16 +-
 src/pep/examples/nlevp/sleeper.c                   |    12 +-
 src/pep/examples/nlevp/sleeper.c.html              |    16 +-
 src/pep/examples/nlevp/spring.c                    |    18 +-
 src/pep/examples/nlevp/spring.c.html               |    22 +-
 src/pep/examples/tests/index.html                  |     7 +-
 src/pep/examples/tests/makefile                    |    72 +-
 src/pep/examples/tests/makefile.html               |    78 +-
 src/pep/examples/tests/output/test1_1.out          |     8 +-
 src/pep/examples/tests/output/test2_3.out          |    36 +
 src/pep/examples/tests/output/test2_4.out          |    32 +
 src/pep/examples/tests/output/test3_1.out          |    55 +
 src/pep/examples/tests/output/test3f_1.out         |    56 +
 src/pep/examples/tests/test1.c                     |    36 +-
 src/pep/examples/tests/test1.c.html                |   232 +-
 src/pep/examples/tests/test2.c                     |    27 +-
 src/pep/examples/tests/test2.c.html                |   101 +-
 src/pep/examples/tests/test3.c                     |   173 +
 src/pep/examples/tests/test3.c.html                |   187 +
 src/pep/examples/tests/test3f.F                    |   266 +
 src/pep/examples/tests/test3f.F.html               |   282 +
 src/pep/examples/tutorials/ex16.c                  |    67 +-
 src/pep/examples/tutorials/ex16.c.html             |   261 +-
 src/pep/examples/tutorials/ex16f90.F90             |    36 +-
 src/pep/examples/tutorials/ex16f90.F90.html        |   272 +-
 src/pep/examples/tutorials/ex17.c                  |     8 +-
 src/pep/examples/tutorials/ex17.c.html             |    14 +-
 src/pep/examples/tutorials/ex28.c                  |   272 +
 src/pep/examples/tutorials/ex28.c.html             |   263 +
 src/pep/examples/tutorials/index.html              |     9 +-
 src/pep/examples/tutorials/makefile                |    23 +-
 src/pep/examples/tutorials/makefile.html           |    29 +-
 src/pep/examples/tutorials/output/ex16_1.out       |     2 +-
 src/pep/examples/tutorials/output/ex16f90_1.out    |     2 +-
 src/pep/examples/tutorials/output/ex28_1.out       |     9 +
 src/pep/f90-mod/index.html                         |     6 +-
 src/pep/f90-mod/makefile                           |     2 +-
 src/pep/f90-mod/makefile.html                      |     8 +-
 src/pep/f90-mod/slepcpepmod.F                      |     2 +-
 src/pep/f90-mod/slepcpepmod.F.html                 |     8 +-
 src/pep/impls/index.html                           |     6 +-
 src/pep/impls/jd/ftn-auto/pjdoptf.c                |    18 -
 src/pep/impls/jd/index.html                        |     6 +-
 src/pep/impls/jd/makefile                          |     2 +-
 src/pep/impls/jd/makefile.html                     |     8 +-
 src/pep/impls/jd/pjd.c                             |  1025 +-
 src/pep/impls/jd/pjd.c.html                        |  1301 +-
 src/pep/impls/jd/pjdopt.c                          |   130 +-
 src/pep/impls/jd/pjdopt.c.html                     |   278 +-
 src/pep/impls/jd/pjdp.h                            |    38 +-
 src/pep/impls/jd/pjdp.h.html                       |    68 +-
 src/pep/impls/krylov/index.html                    |     6 +-
 src/pep/impls/krylov/makefile                      |     2 +-
 src/pep/impls/krylov/makefile.html                 |     8 +-
 src/pep/impls/krylov/pepkrylov.c                   |     2 +-
 src/pep/impls/krylov/pepkrylov.c.html              |     8 +-
 src/pep/impls/krylov/pepkrylov.h                   |     2 +-
 src/pep/impls/krylov/pepkrylov.h.html              |     8 +-
 src/pep/impls/krylov/qarnoldi/index.html           |     6 +-
 src/pep/impls/krylov/qarnoldi/makefile             |     2 +-
 src/pep/impls/krylov/qarnoldi/makefile.html        |     8 +-
 src/pep/impls/krylov/qarnoldi/qarnoldi.c           |    21 +-
 src/pep/impls/krylov/qarnoldi/qarnoldi.c.html      |   507 +-
 src/pep/impls/krylov/stoar/index.html              |     6 +-
 src/pep/impls/krylov/stoar/makefile                |     2 +-
 src/pep/impls/krylov/stoar/makefile.html           |     8 +-
 src/pep/impls/krylov/stoar/stoar.c                 |   148 +-
 src/pep/impls/krylov/stoar/stoar.c.html            |  1297 +-
 src/pep/impls/krylov/toar/index.html               |     6 +-
 src/pep/impls/krylov/toar/makefile                 |     2 +-
 src/pep/impls/krylov/toar/makefile.html            |     8 +-
 src/pep/impls/krylov/toar/nrefine.c                |   943 +-
 src/pep/impls/krylov/toar/nrefine.c.html           |  2734 ++--
 src/pep/impls/krylov/toar/ptoar.c                  |   252 +-
 src/pep/impls/krylov/toar/ptoar.c.html             |  2184 ++-
 src/pep/impls/linear/index.html                    |     6 +-
 src/pep/impls/linear/linear.c                      |    39 +-
 src/pep/impls/linear/linear.c.html                 |  1497 +-
 src/pep/impls/linear/linearp.h                     |     2 +-
 src/pep/impls/linear/linearp.h.html                |     8 +-
 src/pep/impls/linear/makefile                      |     2 +-
 src/pep/impls/linear/makefile.html                 |     8 +-
 src/pep/impls/linear/qeplin.c                      |     2 +-
 src/pep/impls/linear/qeplin.c.html                 |     8 +-
 src/pep/impls/makefile                             |     2 +-
 src/pep/impls/makefile.html                        |     8 +-
 src/pep/index.html                                 |     6 +-
 src/pep/interface/dlregispep.c                     |    11 +-
 src/pep/interface/dlregispep.c.html                |   175 +-
 src/pep/interface/ftn-auto/pepoptsf.c              |    26 +-
 src/pep/interface/ftn-custom/makefile              |     2 +-
 src/pep/interface/ftn-custom/zpepf.c               |   104 +-
 src/pep/interface/index.html                       |     6 +-
 src/pep/interface/makefile                         |     2 +-
 src/pep/interface/makefile.html                    |     8 +-
 src/pep/interface/pepbasic.c                       |    17 +-
 src/pep/interface/pepbasic.c.html                  |   651 +-
 src/pep/interface/pepdefault.c                     |   144 +-
 src/pep/interface/pepdefault.c.html                |   923 +-
 src/pep/interface/pepmon.c                         |   204 +-
 src/pep/interface/pepmon.c.html                    |   410 +-
 src/pep/interface/pepopts.c                        |   355 +-
 src/pep/interface/pepopts.c.html                   |  2379 ++--
 src/pep/interface/peprefine.c                      |   498 +-
 src/pep/interface/peprefine.c.html                 |   894 +-
 src/pep/interface/pepregis.c                       |     2 +-
 src/pep/interface/pepregis.c.html                  |     8 +-
 src/pep/interface/pepsetup.c                       |    47 +-
 src/pep/interface/pepsetup.c.html                  |   737 +-
 src/pep/interface/pepsolve.c                       |    11 +-
 src/pep/interface/pepsolve.c.html                  |   611 +-
 src/pep/interface/pepview.c                        |    45 +-
 src/pep/interface/pepview.c.html                   |  1243 +-
 src/pep/makefile                                   |     2 +-
 src/pep/makefile.html                              |     8 +-
 src/svd/examples/index.html                        |     4 +-
 src/svd/examples/makefile                          |     2 +-
 src/svd/examples/makefile.html                     |     8 +-
 src/svd/examples/tests/index.html                  |     4 +-
 src/svd/examples/tests/makefile                    |    14 +-
 src/svd/examples/tests/makefile.html               |    20 +-
 src/svd/examples/tests/output/test3_1.out          |    14 +
 src/svd/examples/tests/test1.c                     |    10 +-
 src/svd/examples/tests/test1.c.html                |    16 +-
 src/svd/examples/tests/test2.c                     |     4 +-
 src/svd/examples/tests/test2.c.html                |    10 +-
 src/svd/examples/tests/test3.c                     |     8 +-
 src/svd/examples/tests/test3.c.html                |    14 +-
 src/svd/examples/tutorials/ex14.c                  |     8 +-
 src/svd/examples/tutorials/ex14.c.html             |    14 +-
 src/svd/examples/tutorials/ex15.c                  |     8 +-
 src/svd/examples/tutorials/ex15.c.html             |    14 +-
 src/svd/examples/tutorials/ex15f.F                 |    10 +-
 src/svd/examples/tutorials/ex15f.F.html            |   224 +-
 src/svd/examples/tutorials/ex8.c                   |     6 +-
 src/svd/examples/tutorials/ex8.c.html              |    12 +-
 src/svd/examples/tutorials/index.html              |     4 +-
 src/svd/examples/tutorials/makefile                |    10 +-
 src/svd/examples/tutorials/makefile.html           |    16 +-
 src/svd/f90-mod/index.html                         |     4 +-
 src/svd/f90-mod/makefile                           |     2 +-
 src/svd/f90-mod/makefile.html                      |     8 +-
 src/svd/f90-mod/slepcsvdmod.F                      |     2 +-
 src/svd/f90-mod/slepcsvdmod.F.html                 |     8 +-
 src/svd/impls/cross/cross.c                        |    58 +-
 src/svd/impls/cross/cross.c.html                   |   544 +-
 src/svd/impls/cross/index.html                     |     4 +-
 src/svd/impls/cross/makefile                       |     2 +-
 src/svd/impls/cross/makefile.html                  |     8 +-
 src/svd/impls/cyclic/cyclic.c                      |    45 +-
 src/svd/impls/cyclic/cyclic.c.html                 |   753 +-
 src/svd/impls/cyclic/index.html                    |     4 +-
 src/svd/impls/cyclic/makefile                      |     2 +-
 src/svd/impls/cyclic/makefile.html                 |     8 +-
 src/svd/impls/index.html                           |     4 +-
 src/svd/impls/lanczos/gklanczos.c                  |    47 +-
 src/svd/impls/lanczos/gklanczos.c.html             |   333 +-
 src/svd/impls/lanczos/index.html                   |     4 +-
 src/svd/impls/lanczos/makefile                     |     2 +-
 src/svd/impls/lanczos/makefile.html                |     8 +-
 src/svd/impls/lapack/index.html                    |     4 +-
 src/svd/impls/lapack/makefile                      |     2 +-
 src/svd/impls/lapack/makefile.html                 |     8 +-
 src/svd/impls/lapack/svdlapack.c                   |     3 +-
 src/svd/impls/lapack/svdlapack.c.html              |   155 +-
 src/svd/impls/makefile                             |     2 +-
 src/svd/impls/makefile.html                        |     8 +-
 src/svd/impls/trlanczos/index.html                 |     4 +-
 src/svd/impls/trlanczos/makefile                   |     2 +-
 src/svd/impls/trlanczos/makefile.html              |     8 +-
 src/svd/impls/trlanczos/trlanczos.c                |    57 +-
 src/svd/impls/trlanczos/trlanczos.c.html           |   841 +-
 src/svd/index.html                                 |     4 +-
 src/svd/interface/dlregissvd.c                     |     8 +-
 src/svd/interface/dlregissvd.c.html                |    14 +-
 src/svd/interface/ftn-auto/svdoptsf.c              |    36 +
 src/svd/interface/ftn-custom/makefile              |     2 +-
 src/svd/interface/ftn-custom/zsvdf.c               |   135 +-
 src/svd/interface/index.html                       |     5 +-
 src/svd/interface/makefile                         |     4 +-
 src/svd/interface/makefile.html                    |    10 +-
 src/svd/interface/svdbasic.c                       |    77 +-
 src/svd/interface/svdbasic.c.html                  |   675 +-
 src/svd/interface/svddefault.c                     |    99 +
 src/svd/interface/svddefault.c.html                |   105 +
 src/svd/interface/svdmon.c                         |   225 +-
 src/svd/interface/svdmon.c.html                    |   381 +-
 src/svd/interface/svdopts.c                        |   414 +-
 src/svd/interface/svdopts.c.html                   |  1429 +-
 src/svd/interface/svdregis.c                       |     2 +-
 src/svd/interface/svdregis.c.html                  |     8 +-
 src/svd/interface/svdsetup.c                       |     5 +-
 src/svd/interface/svdsetup.c.html                  |   521 +-
 src/svd/interface/svdsolve.c                       |    12 +-
 src/svd/interface/svdsolve.c.html                  |   392 +-
 src/svd/interface/svdview.c                        |    20 +-
 src/svd/interface/svdview.c.html                   |   932 +-
 src/svd/makefile                                   |     2 +-
 src/svd/makefile.html                              |     8 +-
 src/sys/classes/bv/examples/index.html             |     4 +-
 src/sys/classes/bv/examples/makefile               |     2 +-
 src/sys/classes/bv/examples/makefile.html          |     8 +-
 src/sys/classes/bv/examples/tests/index.html       |     5 +-
 src/sys/classes/bv/examples/tests/makefile         |   127 +-
 src/sys/classes/bv/examples/tests/makefile.html    |   133 +-
 .../classes/bv/examples/tests/output/test10_1.out  |     4 +-
 .../classes/bv/examples/tests/output/test12_1.out  |     3 +
 .../classes/bv/examples/tests/output/test1_1.out   |   206 +-
 .../classes/bv/examples/tests/output/test1_2.out   |   206 +-
 .../classes/bv/examples/tests/output/test1_3.out   |   206 +-
 .../classes/bv/examples/tests/output/test1_4.out   |     2 +-
 .../classes/bv/examples/tests/output/test7_1.out   |     4 +-
 .../classes/bv/examples/tests/output/test8_1.out   |     6 +-
 src/sys/classes/bv/examples/tests/test1.c          |    12 +-
 src/sys/classes/bv/examples/tests/test1.c.html     |    18 +-
 src/sys/classes/bv/examples/tests/test10.c         |    10 +-
 src/sys/classes/bv/examples/tests/test10.c.html    |    16 +-
 src/sys/classes/bv/examples/tests/test11.c         |    14 +-
 src/sys/classes/bv/examples/tests/test11.c.html    |    20 +-
 src/sys/classes/bv/examples/tests/test12.c         |   157 +
 src/sys/classes/bv/examples/tests/test12.c.html    |   170 +
 src/sys/classes/bv/examples/tests/test2.c          |    10 +-
 src/sys/classes/bv/examples/tests/test2.c.html     |    16 +-
 src/sys/classes/bv/examples/tests/test3.c          |    10 +-
 src/sys/classes/bv/examples/tests/test3.c.html     |    16 +-
 src/sys/classes/bv/examples/tests/test4.c          |    18 +-
 src/sys/classes/bv/examples/tests/test4.c.html     |    24 +-
 src/sys/classes/bv/examples/tests/test5.c          |    10 +-
 src/sys/classes/bv/examples/tests/test5.c.html     |    16 +-
 src/sys/classes/bv/examples/tests/test6.c          |    12 +-
 src/sys/classes/bv/examples/tests/test6.c.html     |    18 +-
 src/sys/classes/bv/examples/tests/test7.c          |    18 +-
 src/sys/classes/bv/examples/tests/test7.c.html     |    24 +-
 src/sys/classes/bv/examples/tests/test8.c          |    10 +-
 src/sys/classes/bv/examples/tests/test8.c.html     |    16 +-
 src/sys/classes/bv/examples/tests/test9.c          |    16 +-
 src/sys/classes/bv/examples/tests/test9.c.html     |    22 +-
 src/sys/classes/bv/impls/contiguous/contig.c       |    43 +-
 src/sys/classes/bv/impls/contiguous/contig.c.html  |   636 +-
 src/sys/classes/bv/impls/contiguous/index.html     |     4 +-
 src/sys/classes/bv/impls/contiguous/makefile       |     2 +-
 src/sys/classes/bv/impls/contiguous/makefile.html  |     8 +-
 src/sys/classes/bv/impls/index.html                |     4 +-
 src/sys/classes/bv/impls/makefile                  |     2 +-
 src/sys/classes/bv/impls/makefile.html             |     8 +-
 src/sys/classes/bv/impls/mat/bvmat.c               |    58 +-
 src/sys/classes/bv/impls/mat/bvmat.c.html          |   818 +-
 src/sys/classes/bv/impls/mat/index.html            |     4 +-
 src/sys/classes/bv/impls/mat/makefile              |     2 +-
 src/sys/classes/bv/impls/mat/makefile.html         |     8 +-
 src/sys/classes/bv/impls/svec/index.html           |     4 +-
 src/sys/classes/bv/impls/svec/makefile             |     2 +-
 src/sys/classes/bv/impls/svec/makefile.html        |     8 +-
 src/sys/classes/bv/impls/svec/svec.c               |    58 +-
 src/sys/classes/bv/impls/svec/svec.c.html          |   826 +-
 src/sys/classes/bv/impls/vecs/index.html           |     4 +-
 src/sys/classes/bv/impls/vecs/makefile             |     2 +-
 src/sys/classes/bv/impls/vecs/makefile.html        |     8 +-
 src/sys/classes/bv/impls/vecs/vecs.c               |   119 +-
 src/sys/classes/bv/impls/vecs/vecs.c.html          |   933 +-
 src/sys/classes/bv/index.html                      |     4 +-
 src/sys/classes/bv/interface/bvbasic.c             |   213 +-
 src/sys/classes/bv/interface/bvbasic.c.html        |  1248 +-
 src/sys/classes/bv/interface/bvblas.c              |    43 +-
 src/sys/classes/bv/interface/bvblas.c.html         |   461 +-
 src/sys/classes/bv/interface/bvfunc.c              |    31 +-
 src/sys/classes/bv/interface/bvfunc.c.html         |  1129 +-
 src/sys/classes/bv/interface/bvglobal.c            |    53 +-
 src/sys/classes/bv/interface/bvglobal.c.html       |  1915 +--
 src/sys/classes/bv/interface/bvops.c               |   189 +-
 src/sys/classes/bv/interface/bvops.c.html          |  1043 +-
 src/sys/classes/bv/interface/bvorthog.c            |    88 +-
 src/sys/classes/bv/interface/bvorthog.c.html       |   873 +-
 src/sys/classes/bv/interface/bvregis.c             |     2 +-
 src/sys/classes/bv/interface/bvregis.c.html        |     8 +-
 src/sys/classes/bv/interface/ftn-auto/bvbasicf.c   |    19 +
 src/sys/classes/bv/interface/ftn-auto/bvopsf.c     |    10 +-
 src/sys/classes/bv/interface/ftn-custom/makefile   |     2 +-
 src/sys/classes/bv/interface/ftn-custom/zbvf.c     |     2 +-
 src/sys/classes/bv/interface/index.html            |     4 +-
 src/sys/classes/bv/interface/makefile              |     2 +-
 src/sys/classes/bv/interface/makefile.html         |     8 +-
 src/sys/classes/bv/makefile                        |     2 +-
 src/sys/classes/bv/makefile.html                   |     8 +-
 src/sys/classes/ds/examples/index.html             |     4 +-
 src/sys/classes/ds/examples/makefile               |     2 +-
 src/sys/classes/ds/examples/makefile.html          |     8 +-
 src/sys/classes/ds/examples/tests/index.html       |     4 +-
 src/sys/classes/ds/examples/tests/makefile         |    28 +-
 src/sys/classes/ds/examples/tests/makefile.html    |    34 +-
 .../classes/ds/examples/tests/output/test1_1.out   |     2 +
 .../classes/ds/examples/tests/output/test2_1.out   |     2 +
 .../classes/ds/examples/tests/output/test4_1.out   |     2 +
 src/sys/classes/ds/examples/tests/test1.c          |    39 +-
 src/sys/classes/ds/examples/tests/test1.c.html     |    53 +-
 src/sys/classes/ds/examples/tests/test12.c         |    10 +-
 src/sys/classes/ds/examples/tests/test12.c.html    |    16 +-
 src/sys/classes/ds/examples/tests/test13.c         |    10 +-
 src/sys/classes/ds/examples/tests/test13.c.html    |    16 +-
 src/sys/classes/ds/examples/tests/test14f.F        |     9 +-
 src/sys/classes/ds/examples/tests/test14f.F.html   |   183 +-
 src/sys/classes/ds/examples/tests/test15.c         |     8 +-
 src/sys/classes/ds/examples/tests/test15.c.html    |    14 +-
 src/sys/classes/ds/examples/tests/test2.c          |    33 +-
 src/sys/classes/ds/examples/tests/test2.c.html     |   167 +-
 src/sys/classes/ds/examples/tests/test3.c          |    14 +-
 src/sys/classes/ds/examples/tests/test3.c.html     |    20 +-
 src/sys/classes/ds/examples/tests/test4.c          |    37 +-
 src/sys/classes/ds/examples/tests/test4.c.html     |    51 +-
 src/sys/classes/ds/examples/tests/test5.c          |     8 +-
 src/sys/classes/ds/examples/tests/test5.c.html     |    14 +-
 src/sys/classes/ds/examples/tests/test6.c          |    12 +-
 src/sys/classes/ds/examples/tests/test6.c.html     |    18 +-
 src/sys/classes/ds/examples/tests/test7.c          |    10 +-
 src/sys/classes/ds/examples/tests/test7.c.html     |    16 +-
 src/sys/classes/ds/examples/tests/test8.c          |    12 +-
 src/sys/classes/ds/examples/tests/test8.c.html     |    18 +-
 src/sys/classes/ds/examples/tests/test9.c          |     8 +-
 src/sys/classes/ds/examples/tests/test9.c.html     |    14 +-
 src/sys/classes/ds/impls/ghep/dsghep.c             |     2 +-
 src/sys/classes/ds/impls/ghep/dsghep.c.html        |     8 +-
 src/sys/classes/ds/impls/ghep/index.html           |     4 +-
 src/sys/classes/ds/impls/ghep/makefile             |     2 +-
 src/sys/classes/ds/impls/ghep/makefile.html        |     8 +-
 src/sys/classes/ds/impls/ghiep/dqds.c              |    46 +-
 src/sys/classes/ds/impls/ghiep/dqds.c.html         |  1398 +-
 src/sys/classes/ds/impls/ghiep/dsghiep.c           |    25 +-
 src/sys/classes/ds/impls/ghiep/dsghiep.c.html      |  1500 +-
 src/sys/classes/ds/impls/ghiep/hz.c                |     8 +-
 src/sys/classes/ds/impls/ghiep/hz.c.html           |   156 +-
 src/sys/classes/ds/impls/ghiep/index.html          |     4 +-
 src/sys/classes/ds/impls/ghiep/invit.c             |    65 +-
 src/sys/classes/ds/impls/ghiep/invit.c.html        |  1197 +-
 src/sys/classes/ds/impls/ghiep/makefile            |     2 +-
 src/sys/classes/ds/impls/ghiep/makefile.html       |     8 +-
 src/sys/classes/ds/impls/gnhep/dsgnhep.c           |    85 +-
 src/sys/classes/ds/impls/gnhep/dsgnhep.c.html      |   999 +-
 src/sys/classes/ds/impls/gnhep/index.html          |     4 +-
 src/sys/classes/ds/impls/gnhep/makefile            |     2 +-
 src/sys/classes/ds/impls/gnhep/makefile.html       |     8 +-
 src/sys/classes/ds/impls/hep/bdc/dibtdc.c          |     4 +-
 src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html     |    10 +-
 src/sys/classes/ds/impls/hep/bdc/dlaed3m.c         |     2 +-
 src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html    |     8 +-
 src/sys/classes/ds/impls/hep/bdc/dmerg2.c          |     2 +-
 src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html     |     8 +-
 src/sys/classes/ds/impls/hep/bdc/dsbtdc.c          |     4 +-
 src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html     |    10 +-
 src/sys/classes/ds/impls/hep/bdc/dsrtdf.c          |     2 +-
 src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html     |     8 +-
 src/sys/classes/ds/impls/hep/bdc/index.html        |     4 +-
 src/sys/classes/ds/impls/hep/bdc/makefile          |     2 +-
 src/sys/classes/ds/impls/hep/bdc/makefile.html     |     8 +-
 src/sys/classes/ds/impls/hep/dshep.c               |    28 +-
 src/sys/classes/ds/impls/hep/dshep.c.html          |   822 ++
 src/sys/classes/ds/impls/hep/index.html            |     4 +-
 src/sys/classes/ds/impls/hep/makefile              |     2 +-
 src/sys/classes/ds/impls/hep/makefile.html         |     8 +-
 src/sys/classes/ds/impls/index.html                |     4 +-
 src/sys/classes/ds/impls/makefile                  |     2 +-
 src/sys/classes/ds/impls/makefile.html             |     8 +-
 src/sys/classes/ds/impls/nep/dsnep.c               |    10 +-
 src/sys/classes/ds/impls/nep/dsnep.c.html          |    16 +-
 src/sys/classes/ds/impls/nep/index.html            |     4 +-
 src/sys/classes/ds/impls/nep/makefile              |     2 +-
 src/sys/classes/ds/impls/nep/makefile.html         |     8 +-
 src/sys/classes/ds/impls/nhep/dsnhep.c             |    25 +-
 src/sys/classes/ds/impls/nhep/dsnhep.c.html        |  1215 +-
 src/sys/classes/ds/impls/nhep/index.html           |     4 +-
 src/sys/classes/ds/impls/nhep/makefile             |     2 +-
 src/sys/classes/ds/impls/nhep/makefile.html        |     8 +-
 src/sys/classes/ds/impls/pep/dspep.c               |    34 +-
 src/sys/classes/ds/impls/pep/dspep.c.html          |   518 +-
 src/sys/classes/ds/impls/pep/index.html            |     4 +-
 src/sys/classes/ds/impls/pep/makefile              |     2 +-
 src/sys/classes/ds/impls/pep/makefile.html         |     8 +-
 src/sys/classes/ds/impls/svd/dssvd.c               |    10 +-
 src/sys/classes/ds/impls/svd/dssvd.c.html          |   303 +
 src/sys/classes/ds/impls/svd/index.html            |     4 +-
 src/sys/classes/ds/impls/svd/makefile              |     2 +-
 src/sys/classes/ds/impls/svd/makefile.html         |     8 +-
 src/sys/classes/ds/index.html                      |     4 +-
 src/sys/classes/ds/interface/dsbasic.c             |    11 +-
 src/sys/classes/ds/interface/dsbasic.c.html        |  1029 +-
 src/sys/classes/ds/interface/dsops.c               |     2 +-
 src/sys/classes/ds/interface/dsops.c.html          |     8 +-
 src/sys/classes/ds/interface/dspriv.c              |    83 +-
 src/sys/classes/ds/interface/dspriv.c.html         |  1004 +-
 src/sys/classes/ds/interface/ftn-custom/makefile   |     2 +-
 src/sys/classes/ds/interface/ftn-custom/zdsf.c     |     2 +-
 src/sys/classes/ds/interface/index.html            |     4 +-
 src/sys/classes/ds/interface/makefile              |     2 +-
 src/sys/classes/ds/interface/makefile.html         |     8 +-
 src/sys/classes/ds/makefile                        |     2 +-
 src/sys/classes/ds/makefile.html                   |     8 +-
 src/sys/classes/fn/examples/index.html             |     4 +-
 src/sys/classes/fn/examples/makefile               |     2 +-
 src/sys/classes/fn/examples/makefile.html          |     8 +-
 src/sys/classes/fn/examples/tests/index.html       |     6 +-
 src/sys/classes/fn/examples/tests/makefile         |    76 +-
 src/sys/classes/fn/examples/tests/makefile.html    |    82 +-
 .../classes/fn/examples/tests/output/test1_1.out   |     6 +-
 .../classes/fn/examples/tests/output/test7_1.out   |     7 +
 .../classes/fn/examples/tests/output/test8_1.out   |     7 +
 src/sys/classes/fn/examples/tests/test1.c          |     4 +-
 src/sys/classes/fn/examples/tests/test1.c.html     |    10 +-
 src/sys/classes/fn/examples/tests/test2.c          |     4 +-
 src/sys/classes/fn/examples/tests/test2.c.html     |    10 +-
 src/sys/classes/fn/examples/tests/test3.c          |   100 +-
 src/sys/classes/fn/examples/tests/test3.c.html     |   196 +-
 src/sys/classes/fn/examples/tests/test4.c          |     4 +-
 src/sys/classes/fn/examples/tests/test4.c.html     |    10 +-
 src/sys/classes/fn/examples/tests/test5.c          |    92 +-
 src/sys/classes/fn/examples/tests/test5.c.html     |   188 +-
 src/sys/classes/fn/examples/tests/test6.c          |    92 +-
 src/sys/classes/fn/examples/tests/test6.c.html     |   254 +-
 src/sys/classes/fn/examples/tests/test7.c          |   169 +
 src/sys/classes/fn/examples/tests/test7.c.html     |   178 +
 src/sys/classes/fn/examples/tests/test8.c          |   174 +
 src/sys/classes/fn/examples/tests/test8.c.html     |   183 +
 src/sys/classes/fn/impls/combine/fncombine.c       |    96 +-
 src/sys/classes/fn/impls/combine/fncombine.c.html  |   585 +-
 src/sys/classes/fn/impls/combine/index.html        |     4 +-
 src/sys/classes/fn/impls/combine/makefile          |     2 +-
 src/sys/classes/fn/impls/combine/makefile.html     |     8 +-
 src/sys/classes/fn/impls/exp/fnexp.c               |     4 +-
 src/sys/classes/fn/impls/exp/fnexp.c.html          |    42 +-
 src/sys/classes/fn/impls/exp/index.html            |     4 +-
 src/sys/classes/fn/impls/exp/makefile              |     2 +-
 src/sys/classes/fn/impls/exp/makefile.html         |     8 +-
 src/sys/classes/fn/impls/fnutil.c                  |   172 +
 src/sys/classes/fn/impls/fnutil.c.html             |   179 +
 src/sys/classes/fn/impls/index.html                |     6 +-
 src/sys/classes/fn/impls/invsqrt/fninvsqrt.c       |   157 +
 src/sys/classes/fn/impls/invsqrt/fninvsqrt.c.html  |   152 +
 src/sys/classes/fn/impls/invsqrt/index.html        |    21 +
 src/sys/classes/fn/impls/invsqrt/makefile          |    35 +
 src/sys/classes/fn/impls/invsqrt/makefile.html     |    50 +
 src/sys/classes/fn/impls/log/fnlog.c               |     5 +-
 src/sys/classes/fn/impls/log/fnlog.c.html          |    83 +-
 src/sys/classes/fn/impls/log/index.html            |     4 +-
 src/sys/classes/fn/impls/log/makefile              |     2 +-
 src/sys/classes/fn/impls/log/makefile.html         |     8 +-
 src/sys/classes/fn/impls/makefile                  |     9 +-
 src/sys/classes/fn/impls/makefile.html             |    15 +-
 src/sys/classes/fn/impls/phi/fnphi.c               |    12 +-
 src/sys/classes/fn/impls/phi/fnphi.c.html          |   160 +-
 src/sys/classes/fn/impls/phi/index.html            |     4 +-
 src/sys/classes/fn/impls/phi/makefile              |     2 +-
 src/sys/classes/fn/impls/phi/makefile.html         |     8 +-
 src/sys/classes/fn/impls/rational/fnrational.c     |   108 +-
 .../classes/fn/impls/rational/fnrational.c.html    |   854 +-
 src/sys/classes/fn/impls/rational/index.html       |     4 +-
 src/sys/classes/fn/impls/rational/makefile         |     2 +-
 src/sys/classes/fn/impls/rational/makefile.html    |     8 +-
 src/sys/classes/fn/impls/sqrt/fnsqrt.c             |    55 +-
 src/sys/classes/fn/impls/sqrt/fnsqrt.c.html        |   137 +-
 src/sys/classes/fn/impls/sqrt/index.html           |     4 +-
 src/sys/classes/fn/impls/sqrt/makefile             |     2 +-
 src/sys/classes/fn/impls/sqrt/makefile.html        |     8 +-
 src/sys/classes/fn/index.html                      |     4 +-
 src/sys/classes/fn/interface/fnbasic.c             |   255 +-
 src/sys/classes/fn/interface/fnbasic.c.html        |  1193 +-
 src/sys/classes/fn/interface/fnregis.c             |     4 +-
 src/sys/classes/fn/interface/fnregis.c.html        |    44 +-
 src/sys/classes/fn/interface/ftn-auto/fnbasicf.c   |    11 +
 src/sys/classes/fn/interface/ftn-custom/makefile   |     2 +-
 src/sys/classes/fn/interface/ftn-custom/zfnf.c     |     2 +-
 src/sys/classes/fn/interface/index.html            |     4 +-
 src/sys/classes/fn/interface/makefile              |     2 +-
 src/sys/classes/fn/interface/makefile.html         |     8 +-
 src/sys/classes/fn/makefile                        |     2 +-
 src/sys/classes/fn/makefile.html                   |     8 +-
 src/sys/classes/index.html                         |     4 +-
 src/sys/classes/makefile                           |     2 +-
 src/sys/classes/makefile.html                      |     8 +-
 src/sys/classes/rg/examples/index.html             |     4 +-
 src/sys/classes/rg/examples/makefile               |     2 +-
 src/sys/classes/rg/examples/makefile.html          |     8 +-
 src/sys/classes/rg/examples/tests/index.html       |     4 +-
 src/sys/classes/rg/examples/tests/makefile         |     4 +-
 src/sys/classes/rg/examples/tests/makefile.html    |    10 +-
 .../classes/rg/examples/tests/output/test1_1.out   |    10 +-
 src/sys/classes/rg/examples/tests/test1.c          |     4 +-
 src/sys/classes/rg/examples/tests/test1.c.html     |    10 +-
 src/sys/classes/rg/impls/ellipse/index.html        |     4 +-
 src/sys/classes/rg/impls/ellipse/makefile          |     2 +-
 src/sys/classes/rg/impls/ellipse/makefile.html     |     8 +-
 src/sys/classes/rg/impls/ellipse/rgellipse.c       |    20 +-
 src/sys/classes/rg/impls/ellipse/rgellipse.c.html  |    26 +-
 src/sys/classes/rg/impls/index.html                |     4 +-
 src/sys/classes/rg/impls/interval/index.html       |     4 +-
 src/sys/classes/rg/impls/interval/makefile         |     2 +-
 src/sys/classes/rg/impls/interval/makefile.html    |     8 +-
 src/sys/classes/rg/impls/interval/rginterval.c     |    48 +-
 .../classes/rg/impls/interval/rginterval.c.html    |   190 +-
 src/sys/classes/rg/impls/makefile                  |     2 +-
 src/sys/classes/rg/impls/makefile.html             |     8 +-
 src/sys/classes/rg/impls/polygon/index.html        |     4 +-
 src/sys/classes/rg/impls/polygon/makefile          |     2 +-
 src/sys/classes/rg/impls/polygon/makefile.html     |     8 +-
 src/sys/classes/rg/impls/polygon/rgpolygon.c       |    80 +-
 src/sys/classes/rg/impls/polygon/rgpolygon.c.html  |   336 +-
 src/sys/classes/rg/impls/ring/index.html           |     4 +-
 src/sys/classes/rg/impls/ring/makefile             |     2 +-
 src/sys/classes/rg/impls/ring/makefile.html        |     8 +-
 src/sys/classes/rg/impls/ring/rgring.c             |    36 +-
 src/sys/classes/rg/impls/ring/rgring.c.html        |   248 +-
 src/sys/classes/rg/index.html                      |     4 +-
 src/sys/classes/rg/interface/ftn-auto/rgbasicf.c   |    18 +
 src/sys/classes/rg/interface/ftn-custom/makefile   |     2 +-
 src/sys/classes/rg/interface/ftn-custom/zrgf.c     |     2 +-
 src/sys/classes/rg/interface/index.html            |     4 +-
 src/sys/classes/rg/interface/makefile              |     2 +-
 src/sys/classes/rg/interface/makefile.html         |     8 +-
 src/sys/classes/rg/interface/rgbasic.c             |   101 +-
 src/sys/classes/rg/interface/rgbasic.c.html        |   880 +-
 src/sys/classes/rg/interface/rgregis.c             |     2 +-
 src/sys/classes/rg/interface/rgregis.c.html        |     8 +-
 src/sys/classes/rg/makefile                        |     2 +-
 src/sys/classes/rg/makefile.html                   |     8 +-
 src/sys/classes/st/examples/index.html             |     4 +-
 src/sys/classes/st/examples/makefile               |     2 +-
 src/sys/classes/st/examples/makefile.html          |     8 +-
 src/sys/classes/st/examples/tests/index.html       |     4 +-
 src/sys/classes/st/examples/tests/makefile         |    26 +-
 src/sys/classes/st/examples/tests/makefile.html    |    32 +-
 .../classes/st/examples/tests/output/test1_1.out   |    20 +-
 .../classes/st/examples/tests/output/test2_1.out   |    42 +-
 .../classes/st/examples/tests/output/test3_1.out   |    40 +-
 .../classes/st/examples/tests/output/test4_1.out   |    84 +-
 .../classes/st/examples/tests/output/test4_2.out   |   328 +-
 src/sys/classes/st/examples/tests/test1.c          |     6 +-
 src/sys/classes/st/examples/tests/test1.c.html     |    12 +-
 src/sys/classes/st/examples/tests/test2.c          |     6 +-
 src/sys/classes/st/examples/tests/test2.c.html     |    12 +-
 src/sys/classes/st/examples/tests/test3.c          |     6 +-
 src/sys/classes/st/examples/tests/test3.c.html     |    12 +-
 src/sys/classes/st/examples/tests/test4.c          |     6 +-
 src/sys/classes/st/examples/tests/test4.c.html     |    12 +-
 src/sys/classes/st/impls/cayley/cayley.c           |    28 +-
 src/sys/classes/st/impls/cayley/cayley.c.html      |   406 +-
 src/sys/classes/st/impls/cayley/index.html         |     4 +-
 src/sys/classes/st/impls/cayley/makefile           |     2 +-
 src/sys/classes/st/impls/cayley/makefile.html      |     8 +-
 src/sys/classes/st/impls/index.html                |     4 +-
 src/sys/classes/st/impls/makefile                  |     2 +-
 src/sys/classes/st/impls/makefile.html             |     8 +-
 src/sys/classes/st/impls/precond/index.html        |     4 +-
 src/sys/classes/st/impls/precond/makefile          |     2 +-
 src/sys/classes/st/impls/precond/makefile.html     |     8 +-
 src/sys/classes/st/impls/precond/precond.c         |    10 +-
 src/sys/classes/st/impls/precond/precond.c.html    |    16 +-
 src/sys/classes/st/impls/shell/ftn-custom/makefile |     2 +-
 src/sys/classes/st/impls/shell/ftn-custom/zshell.c |     2 +-
 src/sys/classes/st/impls/shell/index.html          |     4 +-
 src/sys/classes/st/impls/shell/makefile            |     2 +-
 src/sys/classes/st/impls/shell/makefile.html       |     8 +-
 src/sys/classes/st/impls/shell/shell.c             |    52 +-
 src/sys/classes/st/impls/shell/shell.c.html        |   105 +-
 src/sys/classes/st/impls/shift/index.html          |     4 +-
 src/sys/classes/st/impls/shift/makefile            |     2 +-
 src/sys/classes/st/impls/shift/makefile.html       |     8 +-
 src/sys/classes/st/impls/shift/shift.c             |    16 +-
 src/sys/classes/st/impls/shift/shift.c.html        |    76 +-
 src/sys/classes/st/impls/sinvert/index.html        |     4 +-
 src/sys/classes/st/impls/sinvert/makefile          |     2 +-
 src/sys/classes/st/impls/sinvert/makefile.html     |     8 +-
 src/sys/classes/st/impls/sinvert/sinvert.c         |    15 +-
 src/sys/classes/st/impls/sinvert/sinvert.c.html    |   199 +-
 src/sys/classes/st/index.html                      |     4 +-
 src/sys/classes/st/interface/ftn-custom/makefile   |     2 +-
 src/sys/classes/st/interface/ftn-custom/zstf.c     |     2 +-
 src/sys/classes/st/interface/index.html            |     4 +-
 src/sys/classes/st/interface/makefile              |     2 +-
 src/sys/classes/st/interface/makefile.html         |     8 +-
 src/sys/classes/st/interface/stfunc.c              |    47 +-
 src/sys/classes/st/interface/stfunc.c.html         |   921 +-
 src/sys/classes/st/interface/stregis.c             |     2 +-
 src/sys/classes/st/interface/stregis.c.html        |     8 +-
 src/sys/classes/st/interface/stset.c               |    10 +-
 src/sys/classes/st/interface/stset.c.html          |    16 +-
 src/sys/classes/st/interface/stshellmat.c          |     2 +-
 src/sys/classes/st/interface/stshellmat.c.html     |     8 +-
 src/sys/classes/st/interface/stsles.c              |    21 +-
 src/sys/classes/st/interface/stsles.c.html         |   249 +-
 src/sys/classes/st/interface/stsolve.c             |    19 +-
 src/sys/classes/st/interface/stsolve.c.html        |   291 +-
 src/sys/classes/st/makefile                        |     2 +-
 src/sys/classes/st/makefile.html                   |     8 +-
 src/sys/dlregisslepc.c                             |     2 +-
 src/sys/dlregisslepc.c.html                        |     8 +-
 src/sys/f90-mod/index.html                         |     4 +-
 src/sys/f90-mod/makefile                           |     2 +-
 src/sys/f90-mod/makefile.html                      |     8 +-
 src/sys/f90-mod/slepcsysmod.F                      |     2 +-
 src/sys/f90-mod/slepcsysmod.F.html                 |     8 +-
 src/sys/ftn-custom/makefile                        |     4 +-
 src/sys/ftn-custom/zslepc_start.c                  |     2 +-
 src/sys/ftn-custom/zslepc_startf.c                 |     2 +-
 src/sys/ftn-custom/zslepcutil.c                    |    44 +
 src/sys/index.html                                 |     4 +-
 src/sys/makefile                                   |     2 +-
 src/sys/makefile.html                              |     8 +-
 src/sys/slepcinit.c                                |    17 +-
 src/sys/slepcinit.c.html                           |   284 +-
 src/sys/slepcsc.c                                  |     6 +-
 src/sys/slepcsc.c.html                             |    12 +-
 src/sys/slepcutil.c                                |    55 +-
 src/sys/slepcutil.c.html                           |   243 +-
 src/sys/vec/index.html                             |     4 +-
 src/sys/vec/makefile                               |     2 +-
 src/sys/vec/makefile.html                          |     8 +-
 src/sys/vec/pool.c                                 |     4 +-
 src/sys/vec/pool.c.html                            |    10 +-
 src/sys/vec/veccomp.c                              |    14 +-
 src/sys/vec/veccomp.c.html                         |   884 +-
 src/sys/vec/veccomp0.h                             |     2 +-
 src/sys/vec/veccomp0.h.html                        |     8 +-
 2157 files changed, 109301 insertions(+), 77339 deletions(-)

diff --git a/CTAGS b/CTAGS
index 8c18919..c51740e 100644
--- a/CTAGS
+++ b/CTAGS
@@ -11,12 +11,14 @@
 100	src/eps/examples/tests/test7f.F	/^ 100  format (\/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')$/;"	l	program:main	file:
 100	src/eps/examples/tutorials/ex1f.F	/^ 100  format (\/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')$/;"	l	program:main	file:
 100	src/eps/examples/tutorials/ex1f90.F90	/^ 100  format (\/'1-D Laplacian Eigenproblem, n =',I4,' (Fortran)')$/;"	l	program:main	file:
+100	src/pep/examples/tests/test3f.F	/^ 100  format (\/'Diagonal Quadratic Eigenproblem, n =',I3,' (Fortran)')$/;"	l	program:main	file:
 100	src/pep/examples/tutorials/ex16f90.F90	/^ 100  format (\/'Quadratic Eigenproblem, N=',I6,' (',I4,'x',I4,' grid)')$/;"	l	program:main	file:
 100	src/svd/examples/tutorials/ex15f.F	/^ 100  format (\/'Lauchli SVD, n =',I3,', mu=',E12.4,' (Fortran)')$/;"	l	program:main	file:
 100	src/sys/classes/ds/examples/tests/test14f.F	/^ 100  format (\/'Program currently limited to n=100, you set n=',I3)$/;"	l	program:main	file:
 110	docs/manual/ex1f.F	/^ 110  format (\/' Number of iterations of the method:',I4)$/;"	l	program:main	file:
 110	src/eps/examples/tests/test14f.F	/^ 110  format (' Type set to ',A)$/;"	l	program:main	file:
 110	src/eps/examples/tutorials/ex1f.F	/^ 110  format (\/' Number of iterations of the method:',I4)$/;"	l	program:main	file:
+110	src/pep/examples/tests/test3f.F	/^ 110  format (' Polynomial of degree ',I2)$/;"	l	program:main	file:
 110	src/svd/examples/tutorials/ex15f.F	/^ 110  format (\/' Number of iterations of the method:',I4)$/;"	l	program:main	file:
 110	src/sys/classes/ds/examples/tests/test14f.F	/^ 110  format (\/'Solve a Dense System of type NHEP, n =',I3,' (Fortran)')$/;"	l	program:main	file:
 120	docs/manual/ex1f.F	/^ 120  format (' Solution method: ',A)$/;"	l	program:main	file:
@@ -25,6 +27,7 @@
 120	src/eps/examples/tests/test7f.F	/^ 120  format (' Solution method: ',A)$/;"	l	program:main	file:
 120	src/eps/examples/tutorials/ex1f.F	/^ 120  format (' Solution method: ',A)$/;"	l	program:main	file:
 120	src/eps/examples/tutorials/ex1f90.F90	/^ 120  format (' Solution method: ',A)$/;"	l	program:main	file:
+120	src/pep/examples/tests/test3f.F	/^ 120  format (' Type set to ',A)$/;"	l	program:main	file:
 120	src/pep/examples/tutorials/ex16f90.F90	/^ 120  format (' Solution method: ',A)$/;"	l	program:main	file:
 120	src/svd/examples/tutorials/ex15f.F	/^ 120  format (' Solution method: ',A)$/;"	l	program:main	file:
 120	src/sys/classes/ds/examples/tests/test14f.F	/^ 120  format ('  ',F8.5)$/;"	l	program:main	file:
@@ -34,6 +37,7 @@
 130	src/eps/examples/tests/test7f.F	/^ 130  format (' Number of requested eigenvalues:',I2)$/;"	l	program:main	file:
 130	src/eps/examples/tutorials/ex1f.F	/^ 130  format (' Number of requested eigenvalues:',I2)$/;"	l	program:main	file:
 130	src/eps/examples/tutorials/ex1f90.F90	/^ 130  format (' Number of requested eigenvalues:',I4)$/;"	l	program:main	file:
+130	src/pep/examples/tests/test3f.F	/^ 130  format (' Problem type before changing = ',I2)$/;"	l	program:main	file:
 130	src/pep/examples/tutorials/ex16f90.F90	/^ 130  format (' Number of requested eigenvalues:',I4)$/;"	l	program:main	file:
 130	src/svd/examples/tutorials/ex15f.F	/^ 130  format (' Number of requested singular values:',I2)$/;"	l	program:main	file:
 130	src/sys/classes/ds/examples/tests/test14f.F	/^ 130  format ('  ',F8.5,SP,F8.5,'i')$/;"	l	program:main	file:
@@ -41,21 +45,32 @@
 140	src/eps/examples/tests/test14f.F	/^ 140  format (' Extraction before changing = ',I2)$/;"	l	program:main	file:
 140	src/eps/examples/tests/test15f.F	/^ 140  format(i3,' EPS nconv=',i2,' first unconverged value (error) ',   &$/;"	l	subroutine:MyEPSMonitor	file:
 140	src/eps/examples/tutorials/ex1f.F	/^ 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)$/;"	l	program:main	file:
+140	src/pep/examples/tests/test3f.F	/^ 140  format (' ... changed to ',I2)$/;"	l	program:main	file:
 140	src/svd/examples/tutorials/ex15f.F	/^ 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)$/;"	l	program:main	file:
 150	docs/manual/ex1f.F	/^ 150  format (' Number of converged eigenpairs:',I2\/)$/;"	l	program:main	file:
 150	src/eps/examples/tests/test14f.F	/^ 150  format (' ... changed to ',I2)$/;"	l	program:main	file:
 150	src/eps/examples/tutorials/ex1f.F	/^ 150  format (' Number of converged eigenpairs:',I2\/)$/;"	l	program:main	file:
+150	src/pep/examples/tests/test3f.F	/^ 150  format (' Extraction before changing = ',I2)$/;"	l	program:main	file:
 150	src/svd/examples/tutorials/ex15f.F	/^ 150  format (' Number of converged approximate singular triplets:',I2\/)$/;"	l	program:main	file:
 160	docs/manual/ex1f.F	/^ 160      format (1P,'   ',E12.4,'       ',E12.4)$/;"	l	program:main	file:
 160	src/eps/examples/tests/test14f.F	/^ 160  format (' Balance: ',I2,', its=',I2,', cutoff=',F8.6)$/;"	l	program:main	file:
 160	src/eps/examples/tutorials/ex1f.F	/^ 160      format (1P,'   ',E12.4,'       ',E12.4)$/;"	l	program:main	file:
+160	src/pep/examples/tests/test3f.F	/^ 160  format (' ... changed to ',I2)$/;"	l	program:main	file:
 160	src/svd/examples/tutorials/ex15f.F	/^ 160      format (1P,'   ',E12.4,'       ',E12.4)$/;"	l	program:main	file:
 170	src/eps/examples/tests/test14f.F	/^ 170  format (' Which = ',I2,', target = ',F3.1)$/;"	l	program:main	file:
+170	src/pep/examples/tests/test3f.F	/^ 170  format (' Scaling: ',I2,', alpha=',F6.4,', its=',I2)$/;"	l	program:main	file:
 180	src/eps/examples/tests/test14f.F	/^ 180  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)$/;"	l	program:main	file:
+180	src/pep/examples/tests/test3f.F	/^ 180  format (' Polynomial basis: ',I2)$/;"	l	program:main	file:
 190	src/eps/examples/tests/test14f.F	/^ 190  format (' Tolerance =',F7.5,', max_its =',I4)$/;"	l	program:main	file:
+190	src/pep/examples/tests/test3f.F	/^ 190  format (' Refinement: ',I2,', tol=',F6.4,', its=',I2', schem=',I2)$/;"	l	program:main	file:
 20	src/eps/examples/tutorials/ex6f.F	/^   20       CONTINUE  $/;"	l	subroutine:MVMISG	file:
 200	src/eps/examples/tests/test14f.F	/^ 200  format (' Convergence test =',I2)$/;"	l	program:main	file:
+200	src/pep/examples/tests/test3f.F	/^ 200  format (' Which = ',I2,', target = ',F3.1)$/;"	l	program:main	file:
 210	src/eps/examples/tests/test14f.F	/^ 210  format (' Finished - converged reason =',I2,', its=',I4)$/;"	l	program:main	file:
+210	src/pep/examples/tests/test3f.F	/^ 210  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)$/;"	l	program:main	file:
+220	src/pep/examples/tests/test3f.F	/^ 220  format (' Tolerance =',F7.5,', max_its =',I4)$/;"	l	program:main	file:
+230	src/pep/examples/tests/test3f.F	/^ 230  format (' Convergence test =',I2,', stopping test =',I2)$/;"	l	program:main	file:
+240	src/pep/examples/tests/test3f.F	/^ 240  format (' Finished - converged reason =',I2,', its=',I4)$/;"	l	program:main	file:
 30	src/eps/examples/tutorials/ex6f.F	/^   30    CONTINUE $/;"	l	subroutine:MVMISG	file:
 40	src/eps/examples/tutorials/ex6f.F	/^   40       CONTINUE  $/;"	l	subroutine:MVMISG	file:
 50	src/eps/examples/tutorials/ex6f.F	/^   50       CONTINUE$/;"	l	subroutine:MVMISG	file:
@@ -64,19 +79,20 @@
 A	include/slepc/private/mfnimpl.h	/^  Mat            A;              \/* the problem matrix *\/$/;"	m	struct:_p_MFN
 A	include/slepc/private/nepimpl.h	/^  Mat            *A;               \/* matrix coefficients of split form *\/$/;"	m	struct:_p_NEP
 A	include/slepc/private/pepimpl.h	/^  Mat            *A;               \/* coefficient matrices of the polynomial *\/$/;"	m	struct:_p_PEP
-A	include/slepc/private/stimpl.h	/^  Mat              *A;               \/* Matrices that define the eigensystem *\/$/;"	m	struct:_p_ST
-A	include/slepc/private/svdimpl.h	/^  Mat              A;           \/* problem matrix (m>n) *\/$/;"	m	struct:_p_SVD
+A	include/slepc/private/stimpl.h	/^  Mat              *A;               \/* matrices that define the eigensystem *\/$/;"	m	struct:_p_ST
+A	include/slepc/private/svdimpl.h	/^  Mat            A;                \/* problem matrix (m>n) *\/$/;"	m	struct:_p_SVD
 A	src/eps/examples/tutorials/ex1f90.F90	/^      type(Mat)      A$/;"	v	program:main
-A	src/eps/examples/tutorials/ex24.c	/^  Mat       A;$/;"	m	struct:__anon43	file:
+A	src/eps/examples/tutorials/ex24.c	/^  Mat       A;$/;"	m	struct:__anon55	file:
 A	src/eps/impls/davidson/davidson.h	/^  Mat         A,B;            \/* problem matrices *\/$/;"	m	struct:_dvdDashboard
-A	src/eps/impls/external/primme/primme.c	/^  Mat       A;                    \/* problem matrix *\/$/;"	m	struct:__anon66	file:
-A	src/nep/interface/neprefine.c	/^  Mat           *A;$/;"	m	struct:__anon81	file:
+A	src/eps/impls/external/primme/primme.c	/^  Mat       A;                    \/* problem matrix *\/$/;"	m	struct:__anon78	file:
+A	src/nep/impls/nleigs/nleigs.c	/^  Mat         A[MAX_NSHIFTS];$/;"	m	struct:__anon93	file:
+A	src/nep/interface/neprefine.c	/^  Mat           *A;$/;"	m	struct:__anon97	file:
 A	src/pep/examples/tutorials/ex16f90.F90	/^      type(Mat)      M, C, K, A(/;"	v	program:main
-A	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          *A;$/;"	m	struct:__anon86	file:
-A	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          *A;$/;"	m	struct:__anon87	file:
-A	src/pep/impls/linear/linearp.h	/^  Mat        A,B;              \/* matrices of generalized eigenproblem *\/$/;"	m	struct:__anon88
-A	src/pep/interface/peprefine.c	/^  Mat           *A;$/;"	m	struct:__anon90	file:
-A	src/sys/classes/bv/impls/mat/bvmat.c	/^  Mat       A;$/;"	m	struct:__anon97	file:
+A	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          *A,M1;$/;"	m	struct:__anon104	file:
+A	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          *A;$/;"	m	struct:__anon105	file:
+A	src/pep/impls/linear/linearp.h	/^  Mat        A,B;              \/* matrices of generalized eigenproblem *\/$/;"	m	struct:__anon106
+A	src/pep/interface/peprefine.c	/^  Mat        *A;$/;"	m	struct:__anon108	file:
+A	src/sys/classes/bv/impls/mat/bvmat.c	/^  Mat       A;$/;"	m	struct:__anon116	file:
 ARPACKnaupd_	src/eps/impls/external/arpack/arpackp.h	152;"	d
 ARPACKnaupd_	src/eps/impls/external/arpack/arpackp.h	159;"	d
 ARPACKnaupd_	src/eps/impls/external/arpack/arpackp.h	170;"	d
@@ -89,58 +105,57 @@ ARPACKsaupd_	src/eps/impls/external/arpack/arpackp.h	154;"	d
 ARPACKsaupd_	src/eps/impls/external/arpack/arpackp.h	172;"	d
 ARPACKseupd_	src/eps/impls/external/arpack/arpackp.h	155;"	d
 ARPACKseupd_	src/eps/impls/external/arpack/arpackp.h	173;"	d
-AT	include/slepc/private/svdimpl.h	/^  Mat              AT;          \/* transposed matrix *\/$/;"	m	struct:_p_SVD
+AT	include/slepc/private/svdimpl.h	/^  Mat            AT;               \/* transposed matrix *\/$/;"	m	struct:_p_SVD
 AUTODIRS	config/cmakegen.py	/^AUTODIRS = set('ftn-auto ftn-custom f90-custom'.split()) # Automatically recurse into these, if they exist$/;"	v
-AV	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon46	file:
-AV	src/eps/impls/krylov/lanczos/lanczos.c	/^  BV                     AV;$/;"	m	struct:__anon70	file:
+AV	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon60	file:
+AV	src/eps/impls/krylov/lanczos/lanczos.c	/^  BV                     AV;$/;"	m	struct:__anon82	file:
 AX	src/eps/impls/davidson/davidson.h	/^  BV       AX;                \/* A*V *\/$/;"	m	struct:_dvdDashboard
-AddDefine	config/configure.py	/^def AddDefine(conffile,name,value):$/;"	f
+AX	src/pep/impls/jd/pjdp.h	/^  BV          *AX;           \/* work basis vectors to store A_i*X for locked eigenvectors *\/$/;"	m	struct:__anon99
+AddDefine	config/configure.py	/^def AddDefine(conffile,name,value,prefix='SLEPC_'):$/;"	f
 AddNorm2	src/sys/vec/veccomp.c	/^PETSC_STATIC_INLINE void AddNorm2(PetscReal *ssq,PetscReal *scale,PetscReal x)$/;"	f
 Aid	include/slepc/private/bvimpl.h	/^  PetscObjectId      Aid;          \/* object id of matrix A of matmult operation *\/$/;"	m	struct:_p_BV
-ApplicationCtx	src/nep/examples/tutorials/ex20.c	/^} ApplicationCtx;$/;"	t	typeref:struct:__anon74	file:
-ApplicationCtx	src/nep/examples/tutorials/ex21.c	/^} ApplicationCtx;$/;"	t	typeref:struct:__anon76	file:
+Aid	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscObjectId    Aid,Bid;            \/* Id of subcommunicator matrices *\/$/;"	m	struct:__anon81
+ApplicationCtx	src/nep/examples/tutorials/ex20.c	/^} ApplicationCtx;$/;"	t	typeref:struct:__anon86	file:
+ApplicationCtx	src/nep/examples/tutorials/ex21.c	/^} ApplicationCtx;$/;"	t	typeref:struct:__anon88	file:
 Apply_Linear	src/pep/impls/linear/linear.c	/^static PetscErrorCode Apply_Linear(ST st,Vec x,Vec y)$/;"	f	file:
-Aq	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon65
+Aq	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon77
 ArgDB	config/argdb.py	/^class ArgDB:$/;"	c
 Arpack	config/packages/arpack.py	/^class Arpack(package.Package):$/;"	c
 ArrowTridiag	src/sys/classes/ds/impls/hep/dshep.c	/^static PetscErrorCode ArrowTridiag(PetscBLASInt n,PetscReal *d,PetscReal *e,PetscScalar *Q,PetscBLASInt ld)$/;"	f	file:
-Astate	include/slepc/private/stimpl.h	/^  PetscObjectState *Astate;          \/* State (to identify the original matrices) *\/$/;"	m	struct:_p_ST
+Astate	include/slepc/private/stimpl.h	/^  PetscObjectState *Astate;          \/* state (to identify the original matrices) *\/$/;"	m	struct:_p_ST
+Astate	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscObjectState Astate,Bstate;      \/* state of subcommunicator matrices *\/$/;"	m	struct:__anon81
 B	include/slepc/private/bvimpl.h	/^  Mat                B,C;          \/* auxiliary dense matrices for matmult operation *\/$/;"	m	struct:_p_BV
 B	src/eps/impls/davidson/davidson.h	/^  Mat         A,B;            \/* problem matrices *\/$/;"	m	struct:_dvdDashboard
-B	src/pep/impls/linear/linearp.h	/^  Mat        A,B;              \/* matrices of generalized eigenproblem *\/$/;"	m	struct:__anon88
+B	src/pep/impls/linear/linearp.h	/^  Mat        A,B;              \/* matrices of generalized eigenproblem *\/$/;"	m	struct:__anon106
 BDC_dibtdc_	src/sys/classes/ds/impls/hep/bdc/dibtdc.c	/^PetscErrorCode BDC_dibtdc_(const char *jobz,PetscBLASInt n,PetscBLASInt nblks, $/;"	f
 BDC_dlaed3m_	src/sys/classes/ds/impls/hep/bdc/dlaed3m.c	/^PetscErrorCode BDC_dlaed3m_(const char *jobz,const char *defl,PetscBLASInt k,PetscBLASInt n,$/;"	f
 BDC_dmerg2_	src/sys/classes/ds/impls/hep/bdc/dmerg2.c	/^PetscErrorCode BDC_dmerg2_(const char *jobz,PetscBLASInt rkct,PetscBLASInt n, $/;"	f
 BDC_dsbtdc_	src/sys/classes/ds/impls/hep/bdc/dsbtdc.c	/^PetscErrorCode BDC_dsbtdc_(const char *jobz,const char *jobacc,PetscBLASInt n, $/;"	f
 BDC_dsrtdf_	src/sys/classes/ds/impls/hep/bdc/dsrtdf.c	/^PetscErrorCode BDC_dsrtdf_(PetscBLASInt *k,PetscBLASInt n,PetscBLASInt n1, $/;"	f
-BLASrot_	include/slepcblaslapack.h	126;"	d
-BLASrot_	include/slepcblaslapack.h	129;"	d
-BLASrot_	include/slepcblaslapack.h	131;"	d
-BLASrot_	include/slepcblaslapack.h	133;"	d
-BLAStrmm_	include/slepcblaslapack.h	147;"	d
-BLAStrmm_	include/slepcblaslapack.h	199;"	d
+BLASrot_	include/slepcblaslapack.h	125;"	d
+BLASrot_	include/slepcblaslapack.h	128;"	d
+BLASrot_	include/slepcblaslapack.h	130;"	d
+BLASrot_	include/slepcblaslapack.h	132;"	d
+BLAStrmm_	include/slepcblaslapack.h	146;"	d
+BLAStrmm_	include/slepcblaslapack.h	202;"	d
 BLOCKSIZE	src/sys/classes/bv/interface/bvblas.c	27;"	d	file:
+BLOCKSIZE	src/sys/classes/fn/impls/fnutil.c	91;"	d	file:
 BLZistorr_	src/eps/impls/external/blzpack/blzpackp.h	64;"	d
 BLZpack_	src/eps/impls/external/blzpack/blzpackp.h	59;"	d
 BLZpack_	src/eps/impls/external/blzpack/blzpackp.h	61;"	d
 BLZrstorr_	src/eps/impls/external/blzpack/blzpackp.h	65;"	d
 BV	include/slepc/finclude/slepcbvdef.h	27;"	d
 BV	include/slepcbv.h	/^typedef struct _p_BV* BV;$/;"	t	typeref:struct:_p_BV
-BVAXPY	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVAXPY(BV Y,PetscScalar alpha,BV X)$/;"	f
-BVAXPY_BLAS_Private	src/sys/classes/bv/interface/bvblas.c	/^PetscErrorCode BVAXPY_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar *B)$/;"	f
-BVAXPY_Contiguous	src/sys/classes/bv/impls/contiguous/contig.c	/^PetscErrorCode BVAXPY_Contiguous(BV Y,PetscScalar alpha,BV X)$/;"	f
-BVAXPY_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVAXPY_Mat(BV Y,PetscScalar alpha,BV X)$/;"	f
-BVAXPY_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVAXPY_Svec(BV Y,PetscScalar alpha,BV X)$/;"	f
-BVAXPY_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVAXPY_Vecs(BV Y,PetscScalar alpha,BV X)$/;"	f
+BVAXPY_BLAS_Private	src/sys/classes/bv/interface/bvblas.c	/^PetscErrorCode BVAXPY_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar beta,PetscScalar *B)$/;"	f
 BVAllocateWork_Private	src/sys/classes/bv/interface/bvfunc.c	/^PetscErrorCode BVAllocateWork_Private(BV bv,PetscInt s)$/;"	f
 BVAppendOptionsPrefix	src/sys/classes/bv/interface/bvfunc.c	/^PetscErrorCode BVAppendOptionsPrefix(BV bv,const char *prefix)$/;"	f
 BVApplyMatrix	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVApplyMatrix(BV bv,Vec x,Vec y)$/;"	f
 BVApplyMatrixBV	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVApplyMatrixBV(BV X,BV Y)$/;"	f
-BVAvailableVec	include/slepc/private/bvimpl.h	267;"	d
+BVAvailableVec	include/slepc/private/bvimpl.h	271;"	d
 BVCONTIGUOUS	include/slepc/finclude/slepcbvdef.h	39;"	d
 BVCONTIGUOUS	include/slepcbv.h	50;"	d
-BVCheckSizes	include/slepc/private/bvimpl.h	274;"	d
 BVCheckSizes	include/slepc/private/bvimpl.h	278;"	d
+BVCheckSizes	include/slepc/private/bvimpl.h	282;"	d
 BVCopy	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVCopy(BV V,BV W)$/;"	f
 BVCopyColumn	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVCopyColumn(BV V,PetscInt j,PetscInt i)$/;"	f
 BVCopyVec	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVCopyVec(BV V,PetscInt j,Vec w)$/;"	f
@@ -184,9 +199,16 @@ BVDot_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVDot_Svec(BV X
 BVDot_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVDot_Vecs(BV X,BV Y,Mat M)$/;"	f
 BVDuplicate	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVDuplicate(BV V,BV *W)$/;"	f
 BVDuplicateResize	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVDuplicateResize(BV V,PetscInt m,BV *W)$/;"	f
+BVDuplicate_Private	src/sys/classes/bv/interface/bvbasic.c	/^PETSC_STATIC_INLINE PetscErrorCode BVDuplicate_Private(BV V,PetscInt m,BV *W)$/;"	f
+BVDuplicate_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVDuplicate_Vecs(BV V,BV *W)$/;"	f
 BVFinalizePackage	src/sys/classes/bv/interface/bvfunc.c	/^PetscErrorCode BVFinalizePackage(void)$/;"	f
 BVGetActiveColumns	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetActiveColumns(BV bv,PetscInt *l,PetscInt *k)$/;"	f
 BVGetArray	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetArray(BV bv,PetscScalar **a)$/;"	f
+BVGetArrayRead	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetArrayRead(BV bv,const PetscScalar **a)$/;"	f
+BVGetArrayRead_Contiguous	src/sys/classes/bv/impls/contiguous/contig.c	/^PetscErrorCode BVGetArrayRead_Contiguous(BV bv,const PetscScalar **a)$/;"	f
+BVGetArrayRead_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVGetArrayRead_Mat(BV bv,const PetscScalar **a)$/;"	f
+BVGetArrayRead_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVGetArrayRead_Svec(BV bv,const PetscScalar **a)$/;"	f
+BVGetArrayRead_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVGetArrayRead_Vecs(BV bv,const PetscScalar **a)$/;"	f
 BVGetArray_Contiguous	src/sys/classes/bv/impls/contiguous/contig.c	/^PetscErrorCode BVGetArray_Contiguous(BV bv,PetscScalar **a)$/;"	f
 BVGetArray_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVGetArray_Mat(BV bv,PetscScalar **a)$/;"	f
 BVGetArray_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVGetArray_Svec(BV bv,PetscScalar **a)$/;"	f
@@ -202,6 +224,7 @@ BVGetMatrix	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetMatrix(
 BVGetNumConstraints	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetNumConstraints(BV bv,PetscInt *nc)$/;"	f
 BVGetOptionsPrefix	src/sys/classes/bv/interface/bvfunc.c	/^PetscErrorCode BVGetOptionsPrefix(BV bv,const char *prefix[])$/;"	f
 BVGetOrthogonalization	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetOrthogonalization(BV bv,BVOrthogType *type,BVOrthogRefineType *refine,PetscReal *eta,BVOrthogBlockType *block)$/;"	f
+BVGetRandomContext	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetRandomContext(BV bv,PetscRandom* rand)$/;"	f
 BVGetSignature	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetSignature(BV bv,Vec omega)$/;"	f
 BVGetSizes	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetSizes(BV bv,PetscInt *n,PetscInt *N,PetscInt *m)$/;"	f
 BVGetType	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVGetType(BV bv,BVType *type)$/;"	f
@@ -217,7 +240,9 @@ BVMatMult	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVMatMult(BV V,M
 BVMatMultColumn	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVMatMultColumn(BV V,Mat A,PetscInt j)$/;"	f
 BVMatMultHermitianTranspose	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVMatMultHermitianTranspose(BV V,Mat A,BV Y)$/;"	f
 BVMatMultType	include/slepc/finclude/slepcbvdef.h	34;"	d
-BVMatMultType	include/slepcbv.h	/^               BV_MATMULT_MAT_SAVE } BVMatMultType;$/;"	t	typeref:enum:__anon10
+BVMatMultType	include/slepcbv.h	/^               BV_MATMULT_MAT_SAVE } BVMatMultType;$/;"	t	typeref:enum:__anon12
+BVMatMultTypes	include/slepcbv.h	/^PETSC_EXTERN const char *BVMatMultTypes[];$/;"	v
+BVMatMultTypes	src/sys/classes/bv/interface/bvfunc.c	/^const char *BVMatMultTypes[] = {"VECS","MAT","MAT_SAVE","BVMatMultType","BV_MATMULT_",0};$/;"	v
 BVMatMult_Contiguous	src/sys/classes/bv/impls/contiguous/contig.c	/^PetscErrorCode BVMatMult_Contiguous(BV V,Mat A,BV W)$/;"	f
 BVMatMult_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVMatMult_Mat(BV V,Mat A,BV W)$/;"	f
 BVMatMult_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVMatMult_Svec(BV V,Mat A,BV W)$/;"	f
@@ -242,7 +267,6 @@ BVMultInPlace_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVMultI
 BVMultInPlace_Vecs_Alloc	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVMultInPlace_Vecs_Alloc(BV V,Mat Q,PetscInt s,PetscInt e)$/;"	f
 BVMultInPlace_Vecs_ME	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVMultInPlace_Vecs_ME(BV V,Mat Q,PetscInt s,PetscInt e)$/;"	f
 BVMultInPlace_Vecs_Private	src/sys/classes/bv/interface/bvblas.c	/^PetscErrorCode BVMultInPlace_Vecs_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt k_,Vec *V,const PetscScalar *B,PetscBool btrans)$/;"	f
-BVMultS	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode BVMultS(BV X,BV Y,PetscScalar *H,PetscInt ldh)$/;"	f
 BVMultVec	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVMultVec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)$/;"	f
 BVMultVec_BLAS_Private	src/sys/classes/bv/interface/bvblas.c	/^PetscErrorCode BVMultVec_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,const PetscScalar *x,PetscScalar beta,PetscScalar *y)$/;"	f
 BVMultVec_Contiguous	src/sys/classes/bv/impls/contiguous/contig.c	/^PetscErrorCode BVMultVec_Contiguous(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)$/;"	f
@@ -276,11 +300,17 @@ BVNorm_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVNorm_Svec(BV
 BVNorm_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVNorm_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)$/;"	f
 BVOps	include/slepc/private/bvimpl.h	/^typedef struct _BVOps *BVOps;$/;"	t	typeref:struct:_BVOps
 BVOrthogBlockType	include/slepc/finclude/slepcbvdef.h	33;"	d
-BVOrthogBlockType	include/slepcbv.h	/^               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;$/;"	t	typeref:enum:__anon9
+BVOrthogBlockType	include/slepcbv.h	/^               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;$/;"	t	typeref:enum:__anon11
+BVOrthogBlockTypes	include/slepcbv.h	/^PETSC_EXTERN const char *BVOrthogBlockTypes[];$/;"	v
+BVOrthogBlockTypes	src/sys/classes/bv/interface/bvfunc.c	/^const char *BVOrthogBlockTypes[] = {"GS","CHOL","BVOrthogBlockType","BV_ORTHOG_BLOCK_",0};$/;"	v
 BVOrthogRefineType	include/slepc/finclude/slepcbvdef.h	32;"	d
-BVOrthogRefineType	include/slepcbv.h	/^               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;$/;"	t	typeref:enum:__anon8
+BVOrthogRefineType	include/slepcbv.h	/^               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;$/;"	t	typeref:enum:__anon10
+BVOrthogRefineTypes	include/slepcbv.h	/^PETSC_EXTERN const char *BVOrthogRefineTypes[];$/;"	v
+BVOrthogRefineTypes	src/sys/classes/bv/interface/bvfunc.c	/^const char *BVOrthogRefineTypes[] = {"IFNEEDED","NEVER","ALWAYS","BVOrthogRefineType","BV_ORTHOG_REFINE_",0};$/;"	v
 BVOrthogType	include/slepc/finclude/slepcbvdef.h	31;"	d
-BVOrthogType	include/slepcbv.h	/^               BV_ORTHOG_MGS } BVOrthogType;$/;"	t	typeref:enum:__anon7
+BVOrthogType	include/slepcbv.h	/^               BV_ORTHOG_MGS } BVOrthogType;$/;"	t	typeref:enum:__anon9
+BVOrthogTypes	include/slepcbv.h	/^PETSC_EXTERN const char *BVOrthogTypes[];$/;"	v
+BVOrthogTypes	src/sys/classes/bv/interface/bvfunc.c	/^const char *BVOrthogTypes[] = {"CGS","MGS","BVOrthogType","BV_ORTHOG_",0};$/;"	v
 BVOrthogonalize	src/sys/classes/bv/interface/bvorthog.c	/^PetscErrorCode BVOrthogonalize(BV V,Mat R)$/;"	f
 BVOrthogonalizeCGS	src/sys/classes/bv/interface/bvorthog.c	/^static PetscErrorCode BVOrthogonalizeCGS(BV bv,PetscInt j,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)$/;"	f	file:
 BVOrthogonalizeCGS1	src/sys/classes/bv/interface/bvorthog.c	/^PetscErrorCode BVOrthogonalizeCGS1(BV bv,PetscInt j,Vec v,PetscScalar *H,PetscReal *onorm,PetscReal *norm)$/;"	f
@@ -306,6 +336,10 @@ BVResize_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVResize_Mat(
 BVResize_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVResize_Svec(BV bv,PetscInt m,PetscBool copy)$/;"	f
 BVResize_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVResize_Vecs(BV bv,PetscInt m,PetscBool copy)$/;"	f
 BVRestoreArray	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVRestoreArray(BV bv,PetscScalar **a)$/;"	f
+BVRestoreArrayRead	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVRestoreArrayRead(BV bv,const PetscScalar **a)$/;"	f
+BVRestoreArrayRead_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVRestoreArrayRead_Mat(BV bv,const PetscScalar **a)$/;"	f
+BVRestoreArrayRead_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVRestoreArrayRead_Svec(BV bv,const PetscScalar **a)$/;"	f
+BVRestoreArrayRead_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVRestoreArrayRead_Vecs(BV bv,const PetscScalar **a)$/;"	f
 BVRestoreArray_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVRestoreArray_Mat(BV bv,PetscScalar **a)$/;"	f
 BVRestoreArray_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVRestoreArray_Svec(BV bv,PetscScalar **a)$/;"	f
 BVRestoreArray_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVRestoreArray_Vecs(BV bv,PetscScalar **a)$/;"	f
@@ -323,14 +357,15 @@ BVScale_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVScale_Svec(
 BVScale_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVScale_Vecs(BV bv,PetscInt j,PetscScalar alpha)$/;"	f
 BVSetActiveColumns	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetActiveColumns(BV bv,PetscInt l,PetscInt k)$/;"	f
 BVSetFromOptions	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetFromOptions(BV bv)$/;"	f
-BVSetFromOptions_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVSetFromOptions_Vecs(PetscOptions *PetscOptionsObject,BV bv)$/;"	f
+BVSetFromOptions_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVSetFromOptions_Vecs(PetscOptionItems *PetscOptionsObject,BV bv)$/;"	f
 BVSetMatMultMethod	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetMatMultMethod(BV bv,BVMatMultType method)$/;"	f
 BVSetMatrix	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetMatrix(BV bv,Mat B,PetscBool indef)$/;"	f
 BVSetNumConstraints	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetNumConstraints(BV V,PetscInt nc)$/;"	f
 BVSetOptionsPrefix	src/sys/classes/bv/interface/bvfunc.c	/^PetscErrorCode BVSetOptionsPrefix(BV bv,const char *prefix)$/;"	f
 BVSetOrthogonalization	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetOrthogonalization(BV bv,BVOrthogType type,BVOrthogRefineType refine,PetscReal eta,BVOrthogBlockType block)$/;"	f
-BVSetRandom	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVSetRandom(BV bv,PetscRandom rctx)$/;"	f
-BVSetRandomColumn	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j,PetscRandom rctx)$/;"	f
+BVSetRandom	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVSetRandom(BV bv)$/;"	f
+BVSetRandomColumn	src/sys/classes/bv/interface/bvops.c	/^PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j)$/;"	f
+BVSetRandomContext	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetRandomContext(BV bv,PetscRandom rand)$/;"	f
 BVSetSignature	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetSignature(BV bv,Vec omega)$/;"	f
 BVSetSizes	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetSizes(BV bv,PetscInt n,PetscInt N,PetscInt m)$/;"	f
 BVSetSizesFromVec	src/sys/classes/bv/interface/bvbasic.c	/^PetscErrorCode BVSetSizesFromVec(BV bv,Vec t,PetscInt m)$/;"	f
@@ -339,69 +374,82 @@ BVType	include/slepc/finclude/slepcbvdef.h	30;"	d
 BVType	include/slepcbv.h	/^typedef const char* BVType;$/;"	t
 BVVECS	include/slepc/finclude/slepcbvdef.h	38;"	d
 BVVECS	include/slepcbv.h	49;"	d
+BVVecsSetVmip	src/sys/classes/bv/impls/vecs/vecs.c	/^PETSC_STATIC_INLINE PetscErrorCode BVVecsSetVmip(BV bv,PetscInt vmip)$/;"	f
 BVView	src/sys/classes/bv/interface/bvfunc.c	/^PetscErrorCode BVView(BV bv,PetscViewer viewer)$/;"	f
 BVView_Default	src/sys/classes/bv/interface/bvfunc.c	/^static PetscErrorCode BVView_Default(BV bv,PetscViewer viewer)$/;"	f	file:
 BVView_Mat	src/sys/classes/bv/impls/mat/bvmat.c	/^PetscErrorCode BVView_Mat(BV bv,PetscViewer viewer)$/;"	f
 BVView_Svec	src/sys/classes/bv/impls/svec/svec.c	/^PetscErrorCode BVView_Svec(BV bv,PetscViewer viewer)$/;"	f
 BVView_Vecs	src/sys/classes/bv/impls/vecs/vecs.c	/^PetscErrorCode BVView_Vecs(BV bv,PetscViewer viewer)$/;"	f
-BV_AXPY	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_AXPY	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
 BV_AllocateCachedBV	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCachedBV(BV V)$/;"	f
 BV_AllocateCoeffs	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCoeffs(BV bv)$/;"	f
 BV_AllocateMatMult	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_AllocateMatMult(BV bv,Mat A,PetscInt m)$/;"	f
 BV_AllocateSignature	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_AllocateSignature(BV bv)$/;"	f
 BV_CLASSID	include/slepcbv.h	/^PETSC_EXTERN PetscClassId BV_CLASSID;$/;"	v
 BV_CLASSID	src/sys/classes/bv/interface/bvfunc.c	/^PetscClassId     BV_CLASSID = 0;$/;"	v
-BV_CONTIGUOUS	src/sys/classes/bv/impls/contiguous/contig.c	/^} BV_CONTIGUOUS;$/;"	t	typeref:struct:__anon96	file:
-BV_Copy	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Copy	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_Create	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Create	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_Dot	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Dot	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
+BV_CONTIGUOUS	src/sys/classes/bv/impls/contiguous/contig.c	/^} BV_CONTIGUOUS;$/;"	t	typeref:struct:__anon115	file:
+BV_Copy	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Copy	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_Create	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Create	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_Dot	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Dot	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_DotVec	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_DotVec	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
 BV_IPMatMult	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMult(BV bv,Vec x)$/;"	f
 BV_IPMatMultBV	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMultBV(BV bv)$/;"	f
-BV_MAT	src/sys/classes/bv/impls/mat/bvmat.c	/^} BV_MAT;$/;"	t	typeref:struct:__anon97	file:
-BV_MATMULT_MAT	include/slepcbv.h	/^               BV_MATMULT_MAT,$/;"	e	enum:__anon10
-BV_MATMULT_MAT_SAVE	include/slepcbv.h	/^               BV_MATMULT_MAT_SAVE } BVMatMultType;$/;"	e	enum:__anon10
-BV_MATMULT_VECS	include/slepcbv.h	/^typedef enum { BV_MATMULT_VECS,$/;"	e	enum:__anon10
-BV_MatMult	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_MatMult	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_MatProject	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_MatProject	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_Mult	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Mult	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_Norm	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Norm	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_ORTHOG_BLOCK_CHOL	include/slepcbv.h	/^               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;$/;"	e	enum:__anon9
-BV_ORTHOG_BLOCK_GS	include/slepcbv.h	/^typedef enum { BV_ORTHOG_BLOCK_GS,$/;"	e	enum:__anon9
-BV_ORTHOG_CGS	include/slepcbv.h	/^typedef enum { BV_ORTHOG_CGS,$/;"	e	enum:__anon7
-BV_ORTHOG_MGS	include/slepcbv.h	/^               BV_ORTHOG_MGS } BVOrthogType;$/;"	e	enum:__anon7
-BV_ORTHOG_REFINE_ALWAYS	include/slepcbv.h	/^               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;$/;"	e	enum:__anon8
-BV_ORTHOG_REFINE_IFNEEDED	include/slepcbv.h	/^typedef enum { BV_ORTHOG_REFINE_IFNEEDED,$/;"	e	enum:__anon8
-BV_ORTHOG_REFINE_NEVER	include/slepcbv.h	/^               BV_ORTHOG_REFINE_NEVER,$/;"	e	enum:__anon8
-BV_Orthogonalize	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Orthogonalize	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_SVEC	src/sys/classes/bv/impls/svec/svec.c	/^} BV_SVEC;$/;"	t	typeref:struct:__anon98	file:
+BV_MAT	src/sys/classes/bv/impls/mat/bvmat.c	/^} BV_MAT;$/;"	t	typeref:struct:__anon116	file:
+BV_MATMULT_MAT	include/slepcbv.h	/^               BV_MATMULT_MAT,$/;"	e	enum:__anon12
+BV_MATMULT_MAT_SAVE	include/slepcbv.h	/^               BV_MATMULT_MAT_SAVE } BVMatMultType;$/;"	e	enum:__anon12
+BV_MATMULT_VECS	include/slepcbv.h	/^typedef enum { BV_MATMULT_VECS,$/;"	e	enum:__anon12
+BV_MatMult	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_MatMult	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_MatMultVec	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_MatMultVec	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_MatProject	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_MatProject	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_Mult	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Mult	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_MultInPlace	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_MultInPlace	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_MultVec	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_MultVec	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_Norm	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Norm	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_NormVec	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_NormVec	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_ORTHOG_BLOCK_CHOL	include/slepcbv.h	/^               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;$/;"	e	enum:__anon11
+BV_ORTHOG_BLOCK_GS	include/slepcbv.h	/^typedef enum { BV_ORTHOG_BLOCK_GS,$/;"	e	enum:__anon11
+BV_ORTHOG_CGS	include/slepcbv.h	/^typedef enum { BV_ORTHOG_CGS,$/;"	e	enum:__anon9
+BV_ORTHOG_MGS	include/slepcbv.h	/^               BV_ORTHOG_MGS } BVOrthogType;$/;"	e	enum:__anon9
+BV_ORTHOG_REFINE_ALWAYS	include/slepcbv.h	/^               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;$/;"	e	enum:__anon10
+BV_ORTHOG_REFINE_IFNEEDED	include/slepcbv.h	/^typedef enum { BV_ORTHOG_REFINE_IFNEEDED,$/;"	e	enum:__anon10
+BV_ORTHOG_REFINE_NEVER	include/slepcbv.h	/^               BV_ORTHOG_REFINE_NEVER,$/;"	e	enum:__anon10
+BV_Orthogonalize	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Orthogonalize	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_OrthogonalizeVec	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_OrthogonalizeVec	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_SVEC	src/sys/classes/bv/impls/svec/svec.c	/^} BV_SVEC;$/;"	t	typeref:struct:__anon117	file:
 BV_SafeSqrt	include/slepc/private/bvimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode BV_SafeSqrt(BV bv,PetscScalar alpha,PetscReal *res)$/;"	f
-BV_Scale	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_Scale	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_SetRandom	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;$/;"	v
-BV_SetRandom	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;$/;"	v
-BV_VECS	src/sys/classes/bv/impls/vecs/vecs.c	/^} BV_VECS;$/;"	t	typeref:struct:__anon99	file:
+BV_Scale	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_Scale	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_SetRandom	include/slepc/private/bvimpl.h	/^PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;$/;"	v
+BV_SetRandom	src/sys/classes/bv/interface/bvfunc.c	/^PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;$/;"	v
+BV_VECS	src/sys/classes/bv/impls/vecs/vecs.c	/^} BV_VECS;$/;"	t	typeref:struct:__anon118	file:
 BV_shift	src/eps/impls/davidson/davidson.h	/^  PetscBool BV_shift;          \/* if true BV is shifted when vectors converge *\/$/;"	m	struct:_dvdDashboard
 BX	src/eps/impls/davidson/davidson.h	/^  BV       BX;                \/* B*V *\/$/;"	m	struct:_dvdDashboard
 BackTransform_Linear	src/pep/impls/linear/linear.c	/^static PetscErrorCode BackTransform_Linear(ST st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)$/;"	f	file:
+Bid	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscObjectId    Aid,Bid;            \/* Id of subcommunicator matrices *\/$/;"	m	struct:__anon81
 BlockHankel	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode BlockHankel(EPS eps,PetscScalar *Mu,PetscInt s,PetscScalar *H)$/;"	f	file:
 BlockHankel	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode BlockHankel(NEP nep,PetscScalar *Mu,PetscInt s,PetscScalar *H)$/;"	f	file:
 Blopex	config/packages/blopex.py	/^class Blopex(package.Package):$/;"	c
 Blzpack	config/packages/blzpack.py	/^class Blzpack(package.Package):$/;"	c
-Bp	src/pep/impls/jd/pjdp.h	/^  Vec         Bp;            \/* preconditioned residual of derivative polynomial, B\\p *\/$/;"	m	struct:__anon83
-Bq	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon65
+Bp	src/pep/impls/jd/pjdp.h	/^  Vec         Bp;            \/* preconditioned residual of derivative polynomial, B\\p *\/$/;"	m	struct:__anon100
+Bq	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon77
+Bstate	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscObjectState Astate,Bstate;      \/* state of subcommunicator matrices *\/$/;"	m	struct:__anon81
 Bx	include/slepc/private/bvimpl.h	/^  Vec                Bx;           \/* result of matrix times a vector x *\/$/;"	m	struct:_p_BV
 C	include/slepc/private/bvimpl.h	/^  Mat                B,C;          \/* auxiliary dense matrices for matmult operation *\/$/;"	m	struct:_p_BV
 C	src/pep/examples/tutorials/ex16f90.F90	/^      type(Mat)      M, C,/;"	v	program:main
-C	src/pep/impls/linear/linearp.h	/^  Mat        M,C,K;            \/* copy of PEP coefficient matrices *\/$/;"	m	struct:__anon88
+C	src/pep/impls/linear/linearp.h	/^  Mat        M,C,K;            \/* copy of PEP coefficient matrices *\/$/;"	m	struct:__anon106
 CFLAGS	docs/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	include/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	include/slepc/finclude/makefile	/^CFLAGS    =$/;"	m
@@ -433,6 +481,7 @@ CFLAGS	src/eps/interface/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/mfn/examples/tests/makefile	/^CFLAGS     =$/;"	m
 CFLAGS	src/mfn/examples/tutorials/makefile	/^CFLAGS     =$/;"	m
 CFLAGS	src/mfn/f90-mod/makefile	/^CFLAGS     =$/;"	m
+CFLAGS	src/mfn/impls/expokit/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/mfn/impls/krylov/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/mfn/interface/ftn-custom/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/mfn/interface/makefile	/^CFLAGS   =$/;"	m
@@ -443,6 +492,7 @@ CFLAGS	src/nep/f90-mod/makefile	/^CFLAGS     =$/;"	m
 CFLAGS	src/nep/impls/ciss/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/nep/impls/interpol/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/nep/impls/narnoldi/makefile	/^CFLAGS   =$/;"	m
+CFLAGS	src/nep/impls/nleigs/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/nep/impls/rii/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/nep/impls/slp/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/nep/interface/ftn-custom/makefile	/^CFLAGS   =$/;"	m
@@ -491,7 +541,9 @@ CFLAGS	src/sys/classes/ds/interface/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/classes/fn/examples/tests/makefile	/^CFLAGS     =$/;"	m
 CFLAGS	src/sys/classes/fn/impls/combine/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/classes/fn/impls/exp/makefile	/^CFLAGS   =$/;"	m
+CFLAGS	src/sys/classes/fn/impls/invsqrt/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/classes/fn/impls/log/makefile	/^CFLAGS   =$/;"	m
+CFLAGS	src/sys/classes/fn/impls/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/classes/fn/impls/phi/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/classes/fn/impls/rational/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/classes/fn/impls/sqrt/makefile	/^CFLAGS   =$/;"	m
@@ -520,8 +572,8 @@ CFLAGS	src/sys/makefile	/^CFLAGS   =$/;"	m
 CFLAGS	src/sys/vec/makefile	/^CFLAGS   =$/;"	m
 CISSRedundantMat	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode CISSRedundantMat(EPS eps)$/;"	f	file:
 CISSScatterVec	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode CISSScatterVec(EPS eps)$/;"	f	file:
-CISSVecSetRandom	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom rctx)$/;"	f	file:
-CISSVecSetRandom	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom rctx)$/;"	f	file:
+CISSVecSetRandom	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1)$/;"	f	file:
+CISSVecSetRandom	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1)$/;"	f	file:
 CLEANFILES	src/eps/f90-mod/makefile	/^CLEANFILES = *.mod$/;"	m
 CLEANFILES	src/mfn/f90-mod/makefile	/^CLEANFILES = *.mod$/;"	m
 CLEANFILES	src/nep/f90-mod/makefile	/^CLEANFILES = *.mod$/;"	m
@@ -548,8 +600,9 @@ CPPFLAGS	src/sys/classes/ds/examples/tests/makefile	/^CPPFLAGS   =$/;"	m
 CPPFLAGS	src/sys/classes/fn/examples/tests/makefile	/^CPPFLAGS   =$/;"	m
 CPPFLAGS	src/sys/classes/rg/examples/tests/makefile	/^CPPFLAGS   =$/;"	m
 CPPFLAGS	src/sys/classes/st/examples/tests/makefile	/^CPPFLAGS   =$/;"	m
-CTX_BRUSSEL	src/eps/examples/tutorials/ex9.c	/^} CTX_BRUSSEL;$/;"	t	typeref:struct:__anon44	file:
-CTX_FOLD	src/eps/examples/tutorials/ex24.c	/^} CTX_FOLD;$/;"	t	typeref:struct:__anon43	file:
+CTX_BRUSSEL	src/eps/examples/tutorials/ex30.c	/^} CTX_BRUSSEL;$/;"	t	typeref:struct:__anon56	file:
+CTX_BRUSSEL	src/eps/examples/tutorials/ex9.c	/^} CTX_BRUSSEL;$/;"	t	typeref:struct:__anon58	file:
+CTX_FOLD	src/eps/examples/tutorials/ex24.c	/^} CTX_FOLD;$/;"	t	typeref:struct:__anon55	file:
 CalcMu	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)$/;"	f	file:
 CalcMu	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode CalcMu(NEP nep, PetscScalar *Mu)$/;"	f	file:
 ChebyshevNodes	src/nep/impls/interpol/interpol.c	/^static PetscErrorCode ChebyshevNodes(PetscInt d,PetscReal a,PetscReal b,PetscScalar *x,PetscReal *dct2)$/;"	f	file:
@@ -563,18 +616,20 @@ Check	config/packages/trlan.py	/^  def Check(self,conf,vars,cmake,petsc):$/;"	m
 CheckSolution	src/nep/examples/tutorials/ex20.c	/^PetscErrorCode CheckSolution(PetscScalar lambda,Vec y,PetscReal *error,void *ctx)$/;"	f
 CleanDenseSchur	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^static PetscErrorCode CleanDenseSchur(PetscInt n,PetscInt k,PetscScalar *S,PetscInt ldS,PetscScalar *T,PetscInt ldT,PetscScalar *X,PetscInt ldX,PetscScalar *Y,PetscInt ldY,PetscBool doProd)$/;"	f	file:
 ComputeResidualNorm	src/eps/examples/tutorials/ex24.c	/^PetscErrorCode ComputeResidualNorm(Mat A,PetscScalar lambda,Vec x,PetscReal *r)$/;"	f
+ComputeSingularities	src/nep/examples/nlevp/gun.c	/^PetscErrorCode ComputeSingularities(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *pt)$/;"	f
+ComputeSingularities	src/nep/examples/tutorials/ex27.c	/^PetscErrorCode ComputeSingularities(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *pt)$/;"	f
 ConstructS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode ConstructS(EPS eps)$/;"	f	file:
 ConstructS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode ConstructS(NEP nep)$/;"	f	file:
-CreateDenseMat	src/mfn/impls/krylov/mfnkrylov.c	/^static PetscErrorCode CreateDenseMat(PetscInt k,Mat *A)$/;"	f	file:
 CreateDir	config/configure.py	/^def CreateDir(basedir,dirname,log):$/;"	f
 CreateDirTest	config/configure.py	/^def CreateDirTest(basedir,dirname,log):$/;"	f
 CreateDirTwo	config/configure.py	/^def CreateDirTwo(basedir,dir1,dir2,log):$/;"	f
 CreateFile	config/configure.py	/^def CreateFile(basedir,fname,log):$/;"	f
 D	include/slepc/private/epsimpl.h	/^  Vec            D;                \/* diagonal matrix for balancing *\/$/;"	m	struct:_p_EPS
 D	include/slepc/private/stimpl.h	/^  Vec              D;                \/* diagonal matrix for balancing *\/$/;"	m	struct:_p_ST
+D	src/eps/examples/tutorials/ex31.c	/^PetscScalar D[3]; \/* D = 0.1*M *\/$/;"	v
+D	src/nep/impls/nleigs/nleigs.c	/^  Mat            *D;        \/* divided difference matrices *\/$/;"	m	struct:__anon92	file:
 DATAPATH	src/eps/examples/tutorials/makefile	/^DATAPATH = ${SLEPC_DIR}\/share\/slepc\/datafiles\/matrices$/;"	m
-DATAPATH	src/nep/examples/nlevp/makefile	/^DATAPATH = ${SLEPC_DIR}\/share\/slepc\/datafiles\/matrices$/;"	m
-DATAPATH	src/pep/examples/nlevp/makefile	/^DATAPATH = ${SLEPC_DIR}\/share\/slepc\/datafiles\/matrices$/;"	m
+DATAPATH	src/mfn/examples/tests/makefile	/^DATAPATH = ${SLEPC_DIR}\/share\/slepc\/datafiles\/matrices$/;"	m
 DATAPATH	src/pep/examples/tutorials/makefile	/^DATAPATH = ${SLEPC_DIR}\/share\/slepc\/datafiles\/matrices$/;"	m
 DATAPATH	src/svd/examples/tutorials/makefile	/^DATAPATH = ${SLEPC_DIR}\/share\/slepc\/datafiles\/matrices$/;"	m
 DIRS	docs/makefile	/^DIRS     = $/;"	m
@@ -610,16 +665,18 @@ DIRS	src/eps/interface/makefile	/^DIRS     =$/;"	m
 DIRS	src/eps/makefile	/^DIRS     = interface impls examples f90-mod$/;"	m
 DIRS	src/makefile	/^DIRS     = sys eps svd pep nep mfn$/;"	m
 DIRS	src/mfn/examples/makefile	/^DIRS     = tests tutorials$/;"	m
+DIRS	src/mfn/impls/expokit/makefile	/^DIRS     =$/;"	m
 DIRS	src/mfn/impls/krylov/makefile	/^DIRS     =$/;"	m
-DIRS	src/mfn/impls/makefile	/^DIRS     = krylov$/;"	m
+DIRS	src/mfn/impls/makefile	/^DIRS     = krylov expokit$/;"	m
 DIRS	src/mfn/interface/ftn-custom/makefile	/^DIRS     =$/;"	m
 DIRS	src/mfn/interface/makefile	/^DIRS     =$/;"	m
 DIRS	src/mfn/makefile	/^DIRS     = interface impls examples f90-mod$/;"	m
 DIRS	src/nep/examples/makefile	/^DIRS     = tests tutorials nlevp$/;"	m
 DIRS	src/nep/impls/ciss/makefile	/^DIRS     =$/;"	m
 DIRS	src/nep/impls/interpol/makefile	/^DIRS     =$/;"	m
-DIRS	src/nep/impls/makefile	/^DIRS     = rii slp narnoldi interpol ciss$/;"	m
+DIRS	src/nep/impls/makefile	/^DIRS     = rii slp narnoldi interpol ciss nleigs$/;"	m
 DIRS	src/nep/impls/narnoldi/makefile	/^DIRS     =$/;"	m
+DIRS	src/nep/impls/nleigs/makefile	/^DIRS     =$/;"	m
 DIRS	src/nep/impls/rii/makefile	/^DIRS     =$/;"	m
 DIRS	src/nep/impls/slp/makefile	/^DIRS     =$/;"	m
 DIRS	src/nep/interface/ftn-custom/makefile	/^DIRS     =$/;"	m
@@ -672,8 +729,9 @@ DIRS	src/sys/classes/ds/makefile	/^DIRS     = interface impls examples$/;"	m
 DIRS	src/sys/classes/fn/examples/makefile	/^DIRS     = tests$/;"	m
 DIRS	src/sys/classes/fn/impls/combine/makefile	/^DIRS     =$/;"	m
 DIRS	src/sys/classes/fn/impls/exp/makefile	/^DIRS     =$/;"	m
+DIRS	src/sys/classes/fn/impls/invsqrt/makefile	/^DIRS     =$/;"	m
 DIRS	src/sys/classes/fn/impls/log/makefile	/^DIRS     =$/;"	m
-DIRS	src/sys/classes/fn/impls/makefile	/^DIRS     = combine exp log phi rational sqrt$/;"	m
+DIRS	src/sys/classes/fn/impls/makefile	/^DIRS     = combine exp log phi rational sqrt invsqrt$/;"	m
 DIRS	src/sys/classes/fn/impls/phi/makefile	/^DIRS     =$/;"	m
 DIRS	src/sys/classes/fn/impls/rational/makefile	/^DIRS     =$/;"	m
 DIRS	src/sys/classes/fn/impls/sqrt/makefile	/^DIRS     =$/;"	m
@@ -753,7 +811,7 @@ DSGHIEPComplexEigs	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSG
 DSGHIEPInverseIteration	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSGHIEPInverseIteration(DS ds,PetscScalar *wr,PetscScalar *wi)$/;"	f
 DSGHIEPOrthogEigenv	src/sys/classes/ds/impls/ghiep/invit.c	/^PetscErrorCode DSGHIEPOrthogEigenv(DS ds,DSMatType mat,PetscScalar *wr,PetscScalar *wi,PetscBool accum)$/;"	f
 DSGHIEPRealBlocks	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSGHIEPRealBlocks(DS ds)$/;"	f
-DSGHIEP_Eigen3DQDS	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work,PetscInt nw)$/;"	f	file:
+DSGHIEP_Eigen3DQDS	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work)$/;"	f	file:
 DSGNHEP	include/slepc/finclude/slepcdsdef.h	38;"	d
 DSGNHEP	include/slepcds.h	54;"	d
 DSGetArray	src/sys/classes/ds/interface/dsops.c	/^PetscErrorCode DSGetArray(DS ds,DSMatType m,PetscScalar *a[])$/;"	f
@@ -782,7 +840,7 @@ DSMatExtra	src/sys/classes/ds/interface/dsbasic.c	/^DSMatType         DSMatExtra
 DSMatName	include/slepc/private/dsimpl.h	/^PETSC_INTERN const char *DSMatName[];$/;"	v
 DSMatName	src/sys/classes/ds/interface/dsbasic.c	/^const char        *DSMatName[DS_NUM_MAT] = {"A","B","C","T","D","Q","Z","X","Y","U","VT","W","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9"};$/;"	v
 DSMatType	include/slepc/finclude/slepcdsdef.h	32;"	d
-DSMatType	include/slepcds.h	/^               DS_NUM_MAT } DSMatType;$/;"	t	typeref:enum:__anon12
+DSMatType	include/slepcds.h	/^               DS_NUM_MAT } DSMatType;$/;"	t	typeref:enum:__anon14
 DSNEP	include/slepc/finclude/slepcdsdef.h	41;"	d
 DSNEP	include/slepcds.h	57;"	d
 DSNEPComputeMatrix	src/sys/classes/ds/impls/nep/dsnep.c	/^static PetscErrorCode DSNEPComputeMatrix(DS ds,PetscScalar lambda,PetscBool deriv,DSMatType mat)$/;"	f	file:
@@ -858,17 +916,17 @@ DSSortEigenvalues_Private	src/sys/classes/ds/interface/dspriv.c	/^PetscErrorCode
 DSSort_GHEP	src/sys/classes/ds/impls/ghep/dsghep.c	/^PetscErrorCode DSSort_GHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
 DSSort_GHIEP	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSSort_GHIEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
 DSSort_GNHEP	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^PetscErrorCode DSSort_GNHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
-DSSort_GNHEP_Arbitrary	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
-DSSort_GNHEP_Total	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^PetscErrorCode DSSort_GNHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)$/;"	f
+DSSort_GNHEP_Arbitrary	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^static PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f	file:
+DSSort_GNHEP_Total	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^static PetscErrorCode DSSort_GNHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)$/;"	f	file:
 DSSort_HEP	src/sys/classes/ds/impls/hep/dshep.c	/^PetscErrorCode DSSort_HEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
 DSSort_NEP	src/sys/classes/ds/impls/nep/dsnep.c	/^PetscErrorCode DSSort_NEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
 DSSort_NHEP	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSSort_NHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
-DSSort_NHEP_Arbitrary	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
-DSSort_NHEP_Total	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSSort_NHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)$/;"	f
+DSSort_NHEP_Arbitrary	src/sys/classes/ds/impls/nhep/dsnhep.c	/^static PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f	file:
+DSSort_NHEP_Total	src/sys/classes/ds/impls/nhep/dsnhep.c	/^static PetscErrorCode DSSort_NHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)$/;"	f	file:
 DSSort_PEP	src/sys/classes/ds/impls/pep/dspep.c	/^PetscErrorCode DSSort_PEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *kout)$/;"	f
 DSSort_SVD	src/sys/classes/ds/impls/svd/dssvd.c	/^PetscErrorCode DSSort_SVD(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)$/;"	f
 DSStateType	include/slepc/finclude/slepcdsdef.h	31;"	d
-DSStateType	include/slepcds.h	/^               DS_STATE_TRUNCATED } DSStateType;$/;"	t	typeref:enum:__anon11
+DSStateType	include/slepcds.h	/^               DS_STATE_TRUNCATED } DSStateType;$/;"	t	typeref:enum:__anon13
 DSSwitchFormat_GHIEP	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSSwitchFormat_GHIEP(DS ds,PetscBool tocompact)$/;"	f
 DSSwitchFormat_HEP	src/sys/classes/ds/impls/hep/dshep.c	/^static PetscErrorCode DSSwitchFormat_HEP(DS ds,PetscBool tocompact)$/;"	f	file:
 DSSwitchFormat_SVD	src/sys/classes/ds/impls/svd/dssvd.c	/^static PetscErrorCode DSSwitchFormat_SVD(DS ds,PetscBool tocompact)$/;"	f	file:
@@ -887,17 +945,17 @@ DSUpdateExtraRow_NHEP	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DS
 DSVectors	src/sys/classes/ds/interface/dsops.c	/^PetscErrorCode DSVectors(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
 DSVectors_GHEP	src/sys/classes/ds/impls/ghep/dsghep.c	/^PetscErrorCode DSVectors_GHEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
 DSVectors_GHIEP	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSVectors_GHIEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)$/;"	f
-DSVectors_GHIEP_Eigen_Some	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)$/;"	f
+DSVectors_GHIEP_Eigen_Some	src/sys/classes/ds/impls/ghiep/dsghiep.c	/^static PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)$/;"	f	file:
 DSVectors_GNHEP	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^PetscErrorCode DSVectors_GNHEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)$/;"	f
-DSVectors_GNHEP_Eigen_All	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)$/;"	f
-DSVectors_GNHEP_Eigen_Some	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscBool left)$/;"	f
+DSVectors_GNHEP_Eigen_All	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^static PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)$/;"	f	file:
+DSVectors_GNHEP_Eigen_Some	src/sys/classes/ds/impls/gnhep/dsgnhep.c	/^static PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)$/;"	f	file:
 DSVectors_HEP	src/sys/classes/ds/impls/hep/dshep.c	/^PetscErrorCode DSVectors_HEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
 DSVectors_NEP	src/sys/classes/ds/impls/nep/dsnep.c	/^PetscErrorCode DSVectors_NEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
 DSVectors_NHEP	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSVectors_NHEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
-DSVectors_NHEP_Eigen_All	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSVectors_NHEP_Eigen_All(DS ds,PetscBool left)$/;"	f
-DSVectors_NHEP_Eigen_Some	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)$/;"	f
-DSVectors_NHEP_Refined_All	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)$/;"	f
-DSVectors_NHEP_Refined_Some	src/sys/classes/ds/impls/nhep/dsnhep.c	/^PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)$/;"	f
+DSVectors_NHEP_Eigen_All	src/sys/classes/ds/impls/nhep/dsnhep.c	/^static PetscErrorCode DSVectors_NHEP_Eigen_All(DS ds,PetscBool left)$/;"	f	file:
+DSVectors_NHEP_Eigen_Some	src/sys/classes/ds/impls/nhep/dsnhep.c	/^static PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)$/;"	f	file:
+DSVectors_NHEP_Refined_All	src/sys/classes/ds/impls/nhep/dsnhep.c	/^static PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)$/;"	f	file:
+DSVectors_NHEP_Refined_Some	src/sys/classes/ds/impls/nhep/dsnhep.c	/^static PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)$/;"	f	file:
 DSVectors_PEP	src/sys/classes/ds/impls/pep/dspep.c	/^PetscErrorCode DSVectors_PEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
 DSVectors_SVD	src/sys/classes/ds/impls/svd/dssvd.c	/^PetscErrorCode DSVectors_SVD(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)$/;"	f
 DSView	src/sys/classes/ds/interface/dsbasic.c	/^PetscErrorCode DSView(DS ds,PetscViewer viewer)$/;"	f
@@ -912,39 +970,39 @@ DSView_PEP	src/sys/classes/ds/impls/pep/dspep.c	/^PetscErrorCode DSView_PEP(DS d
 DSView_SVD	src/sys/classes/ds/impls/svd/dssvd.c	/^PetscErrorCode DSView_SVD(DS ds,PetscViewer viewer)$/;"	f
 DS_CLASSID	include/slepcds.h	/^PETSC_EXTERN PetscClassId DS_CLASSID;$/;"	v
 DS_CLASSID	src/sys/classes/ds/interface/dsbasic.c	/^PetscClassId      DS_CLASSID = 0;$/;"	v
-DS_MAT_A	include/slepcds.h	/^typedef enum { DS_MAT_A,$/;"	e	enum:__anon12
-DS_MAT_B	include/slepcds.h	/^               DS_MAT_B,$/;"	e	enum:__anon12
-DS_MAT_C	include/slepcds.h	/^               DS_MAT_C,$/;"	e	enum:__anon12
-DS_MAT_D	include/slepcds.h	/^               DS_MAT_D,$/;"	e	enum:__anon12
-DS_MAT_E0	include/slepcds.h	/^               DS_MAT_E0,$/;"	e	enum:__anon12
-DS_MAT_E1	include/slepcds.h	/^               DS_MAT_E1,$/;"	e	enum:__anon12
-DS_MAT_E2	include/slepcds.h	/^               DS_MAT_E2,$/;"	e	enum:__anon12
-DS_MAT_E3	include/slepcds.h	/^               DS_MAT_E3,$/;"	e	enum:__anon12
-DS_MAT_E4	include/slepcds.h	/^               DS_MAT_E4,$/;"	e	enum:__anon12
-DS_MAT_E5	include/slepcds.h	/^               DS_MAT_E5,$/;"	e	enum:__anon12
-DS_MAT_E6	include/slepcds.h	/^               DS_MAT_E6,$/;"	e	enum:__anon12
-DS_MAT_E7	include/slepcds.h	/^               DS_MAT_E7,$/;"	e	enum:__anon12
-DS_MAT_E8	include/slepcds.h	/^               DS_MAT_E8,$/;"	e	enum:__anon12
-DS_MAT_E9	include/slepcds.h	/^               DS_MAT_E9,$/;"	e	enum:__anon12
-DS_MAT_Q	include/slepcds.h	/^               DS_MAT_Q,$/;"	e	enum:__anon12
-DS_MAT_T	include/slepcds.h	/^               DS_MAT_T,$/;"	e	enum:__anon12
-DS_MAT_U	include/slepcds.h	/^               DS_MAT_U,$/;"	e	enum:__anon12
-DS_MAT_VT	include/slepcds.h	/^               DS_MAT_VT,$/;"	e	enum:__anon12
-DS_MAT_W	include/slepcds.h	/^               DS_MAT_W,$/;"	e	enum:__anon12
-DS_MAT_X	include/slepcds.h	/^               DS_MAT_X,$/;"	e	enum:__anon12
-DS_MAT_Y	include/slepcds.h	/^               DS_MAT_Y,$/;"	e	enum:__anon12
-DS_MAT_Z	include/slepcds.h	/^               DS_MAT_Z,$/;"	e	enum:__anon12
+DS_MAT_A	include/slepcds.h	/^typedef enum { DS_MAT_A,$/;"	e	enum:__anon14
+DS_MAT_B	include/slepcds.h	/^               DS_MAT_B,$/;"	e	enum:__anon14
+DS_MAT_C	include/slepcds.h	/^               DS_MAT_C,$/;"	e	enum:__anon14
+DS_MAT_D	include/slepcds.h	/^               DS_MAT_D,$/;"	e	enum:__anon14
+DS_MAT_E0	include/slepcds.h	/^               DS_MAT_E0,$/;"	e	enum:__anon14
+DS_MAT_E1	include/slepcds.h	/^               DS_MAT_E1,$/;"	e	enum:__anon14
+DS_MAT_E2	include/slepcds.h	/^               DS_MAT_E2,$/;"	e	enum:__anon14
+DS_MAT_E3	include/slepcds.h	/^               DS_MAT_E3,$/;"	e	enum:__anon14
+DS_MAT_E4	include/slepcds.h	/^               DS_MAT_E4,$/;"	e	enum:__anon14
+DS_MAT_E5	include/slepcds.h	/^               DS_MAT_E5,$/;"	e	enum:__anon14
+DS_MAT_E6	include/slepcds.h	/^               DS_MAT_E6,$/;"	e	enum:__anon14
+DS_MAT_E7	include/slepcds.h	/^               DS_MAT_E7,$/;"	e	enum:__anon14
+DS_MAT_E8	include/slepcds.h	/^               DS_MAT_E8,$/;"	e	enum:__anon14
+DS_MAT_E9	include/slepcds.h	/^               DS_MAT_E9,$/;"	e	enum:__anon14
+DS_MAT_Q	include/slepcds.h	/^               DS_MAT_Q,$/;"	e	enum:__anon14
+DS_MAT_T	include/slepcds.h	/^               DS_MAT_T,$/;"	e	enum:__anon14
+DS_MAT_U	include/slepcds.h	/^               DS_MAT_U,$/;"	e	enum:__anon14
+DS_MAT_VT	include/slepcds.h	/^               DS_MAT_VT,$/;"	e	enum:__anon14
+DS_MAT_W	include/slepcds.h	/^               DS_MAT_W,$/;"	e	enum:__anon14
+DS_MAT_X	include/slepcds.h	/^               DS_MAT_X,$/;"	e	enum:__anon14
+DS_MAT_Y	include/slepcds.h	/^               DS_MAT_Y,$/;"	e	enum:__anon14
+DS_MAT_Z	include/slepcds.h	/^               DS_MAT_Z,$/;"	e	enum:__anon14
 DS_MAX_SOLVE	include/slepcds.h	27;"	d
-DS_NEP	src/sys/classes/ds/impls/nep/dsnep.c	/^} DS_NEP;$/;"	t	typeref:struct:__anon100	file:
+DS_NEP	src/sys/classes/ds/impls/nep/dsnep.c	/^} DS_NEP;$/;"	t	typeref:struct:__anon119	file:
 DS_NUM_EXTRA	include/slepcds.h	130;"	d
-DS_NUM_MAT	include/slepcds.h	/^               DS_NUM_MAT } DSMatType;$/;"	e	enum:__anon12
+DS_NUM_MAT	include/slepcds.h	/^               DS_NUM_MAT } DSMatType;$/;"	e	enum:__anon14
 DS_Other	include/slepc/private/dsimpl.h	/^PETSC_EXTERN PetscLogEvent DS_Solve,DS_Vectors,DS_Other;$/;"	v
 DS_Other	src/sys/classes/ds/interface/dsbasic.c	/^PetscLogEvent     DS_Solve = 0,DS_Vectors = 0,DS_Other = 0;$/;"	v
-DS_PEP	src/sys/classes/ds/impls/pep/dspep.c	/^} DS_PEP;$/;"	t	typeref:struct:__anon101	file:
-DS_STATE_CONDENSED	include/slepcds.h	/^               DS_STATE_CONDENSED,$/;"	e	enum:__anon11
-DS_STATE_INTERMEDIATE	include/slepcds.h	/^               DS_STATE_INTERMEDIATE,$/;"	e	enum:__anon11
-DS_STATE_RAW	include/slepcds.h	/^typedef enum { DS_STATE_RAW,$/;"	e	enum:__anon11
-DS_STATE_TRUNCATED	include/slepcds.h	/^               DS_STATE_TRUNCATED } DSStateType;$/;"	e	enum:__anon11
+DS_PEP	src/sys/classes/ds/impls/pep/dspep.c	/^} DS_PEP;$/;"	t	typeref:struct:__anon120	file:
+DS_STATE_CONDENSED	include/slepcds.h	/^               DS_STATE_CONDENSED,$/;"	e	enum:__anon13
+DS_STATE_INTERMEDIATE	include/slepcds.h	/^               DS_STATE_INTERMEDIATE,$/;"	e	enum:__anon13
+DS_STATE_RAW	include/slepcds.h	/^typedef enum { DS_STATE_RAW,$/;"	e	enum:__anon13
+DS_STATE_TRUNCATED	include/slepcds.h	/^               DS_STATE_TRUNCATED } DSStateType;$/;"	e	enum:__anon13
 DS_Solve	include/slepc/private/dsimpl.h	/^PETSC_EXTERN PetscLogEvent DS_Solve,DS_Vectors,DS_Other;$/;"	v
 DS_Solve	src/sys/classes/ds/interface/dsbasic.c	/^PetscLogEvent     DS_Solve = 0,DS_Vectors = 0,DS_Other = 0;$/;"	v
 DS_Vectors	include/slepc/private/dsimpl.h	/^PETSC_EXTERN PetscLogEvent DS_Solve,DS_Vectors,DS_Other;$/;"	v
@@ -953,13 +1011,13 @@ DVD_CHECKSUM	src/eps/impls/davidson/dvdschm.c	24;"	d	file:
 DVD_EP_HERMITIAN	include/slepc/private/vecimplslepc.h	112;"	d
 DVD_EP_INDEFINITE	include/slepc/private/vecimplslepc.h	113;"	d
 DVD_EP_STD	include/slepc/private/vecimplslepc.h	111;"	d
-DVD_HARM_LEIGS	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_LEIGS$/;"	e	enum:__anon49
-DVD_HARM_NONE	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_NONE,$/;"	e	enum:__anon49
-DVD_HARM_REIGS	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_REIGS,$/;"	e	enum:__anon49
-DVD_HARM_RR	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_RR,$/;"	e	enum:__anon49
-DVD_HARM_RRR	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_RRR,$/;"	e	enum:__anon49
-DVD_INITV_CLASSIC	src/eps/impls/davidson/davidson.h	/^  DVD_INITV_CLASSIC,$/;"	e	enum:__anon50
-DVD_INITV_KRYLOV	src/eps/impls/davidson/davidson.h	/^  DVD_INITV_KRYLOV$/;"	e	enum:__anon50
+DVD_HARM_LEIGS	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_LEIGS$/;"	e	enum:__anon62
+DVD_HARM_NONE	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_NONE,$/;"	e	enum:__anon62
+DVD_HARM_REIGS	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_REIGS,$/;"	e	enum:__anon62
+DVD_HARM_RR	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_RR,$/;"	e	enum:__anon62
+DVD_HARM_RRR	src/eps/impls/davidson/davidson.h	/^  DVD_HARM_RRR,$/;"	e	enum:__anon62
+DVD_INITV_CLASSIC	src/eps/impls/davidson/davidson.h	/^  DVD_INITV_CLASSIC,$/;"	e	enum:__anon63
+DVD_INITV_KRYLOV	src/eps/impls/davidson/davidson.h	/^  DVD_INITV_KRYLOV$/;"	e	enum:__anon63
 DVD_IS	include/slepc/private/vecimplslepc.h	115;"	d
 DVD_ISNOT	include/slepc/private/vecimplslepc.h	116;"	d
 DVD_MAT_COMPLEX	include/slepc/private/vecimplslepc.h	101;"	d
@@ -974,35 +1032,26 @@ DVD_MAT_SINGULAR	include/slepc/private/vecimplslepc.h	100;"	d
 DVD_MAT_TRIANG	include/slepc/private/vecimplslepc.h	105;"	d
 DVD_MAT_UNITARY	include/slepc/private/vecimplslepc.h	108;"	d
 DVD_MAT_UTRIANG	include/slepc/private/vecimplslepc.h	106;"	d
-DVD_METH_GD	src/eps/impls/davidson/davidson.h	/^  DVD_METH_GD,$/;"	e	enum:__anon52
-DVD_METH_GD2	src/eps/impls/davidson/davidson.h	/^  DVD_METH_GD2$/;"	e	enum:__anon52
-DVD_METH_JD	src/eps/impls/davidson/davidson.h	/^  DVD_METH_JD,$/;"	e	enum:__anon52
-DVD_PROJ_KXX	src/eps/impls/davidson/davidson.h	/^  DVD_PROJ_KXX,$/;"	e	enum:__anon51
-DVD_PROJ_KZX	src/eps/impls/davidson/davidson.h	/^  DVD_PROJ_KZX$/;"	e	enum:__anon51
-DVD_STAGE_CALCPAIRS	src/eps/impls/davidson/dvdutils.c	61;"	d	file:
-DVD_STAGE_IMPROVEX	src/eps/impls/davidson/dvdutils.c	62;"	d	file:
-DVD_STAGE_INITV	src/eps/impls/davidson/dvdutils.c	59;"	d	file:
-DVD_STAGE_NEWITER	src/eps/impls/davidson/dvdutils.c	60;"	d	file:
-DVD_STAGE_ORTHV	src/eps/impls/davidson/dvdutils.c	64;"	d	file:
-DVD_STAGE_UPDATEV	src/eps/impls/davidson/dvdutils.c	63;"	d	file:
-DVD_STATE_CONF	src/eps/impls/davidson/davidson.h	253;"	d
-DVD_STATE_PRECONF	src/eps/impls/davidson/davidson.h	252;"	d
-DVD_STATE_RUN	src/eps/impls/davidson/davidson.h	254;"	d
+DVD_PROJ_KXX	src/eps/impls/davidson/davidson.h	/^  DVD_PROJ_KXX,$/;"	e	enum:__anon64
+DVD_PROJ_KZX	src/eps/impls/davidson/davidson.h	/^  DVD_PROJ_KZX$/;"	e	enum:__anon64
+DVD_STATE_CONF	src/eps/impls/davidson/davidson.h	263;"	d
+DVD_STATE_PRECONF	src/eps/impls/davidson/davidson.h	262;"	d
+DVD_STATE_RUN	src/eps/impls/davidson/davidson.h	264;"	d
 DenseTridiagonal	src/eps/impls/krylov/lanczos/lanczos.c	/^static PetscErrorCode DenseTridiagonal(PetscInt n_,PetscReal *D,PetscReal *E,PetscReal *w,PetscScalar *V)$/;"	f	file:
 Dl	include/slepc/private/pepimpl.h	/^  Vec            Dl,Dr;            \/* diagonal matrices for balancing *\/$/;"	m	struct:_p_PEP
+Download	config/package.py	/^  def Download(self,externdir,builddir,prefix=None):$/;"	m	class:Package
 Dr	include/slepc/private/pepimpl.h	/^  Vec            Dl,Dr;            \/* diagonal matrices for balancing *\/$/;"	m	struct:_p_PEP
 DvOps	src/sys/vec/veccomp.c	/^static struct _VecOps DvOps = {VecDuplicate_Comp, \/* 1 *\/$/;"	v	typeref:struct:_VecOps	file:
-DvdProfiler	src/eps/impls/davidson/dvdutils.c	/^} DvdProfiler;$/;"	t	typeref:struct:__anon61	file:
-E	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          E[2];$/;"	m	struct:__anon87	file:
+E	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          E[2],M1;$/;"	m	struct:__anon105	file:
 EPS	include/slepc/finclude/slepcepsdef.h	32;"	d
 EPS	include/slepceps.h	/^typedef struct _p_EPS* EPS;$/;"	t	typeref:struct:_p_EPS
 EPS	src/pep/examples/tests/makefile	/^EPS = krylovschur gd$/;"	m
 EPS	src/svd/examples/tests/makefile	/^EPS = krylovschur arnoldi lanczos gd jd$/;"	m
 EPSALL	src/eps/examples/tests/makefile	/^EPSALL = krylovschur arnoldi lanczos gd jd gd2$/;"	m
 EPSAR	src/eps/examples/tests/makefile	/^EPSAR  = gd jd gd2$/;"	m
-EPSARNOLDI	include/slepc/finclude/slepcepsdef.h	50;"	d
+EPSARNOLDI	include/slepc/finclude/slepcepsdef.h	52;"	d
 EPSARNOLDI	include/slepceps.h	53;"	d
-EPSARPACK	include/slepc/finclude/slepcepsdef.h	59;"	d
+EPSARPACK	include/slepc/finclude/slepcepsdef.h	61;"	d
 EPSARPACK	include/slepceps.h	62;"	d
 EPSAllocateSolution	src/eps/interface/epssetup.c	/^PetscErrorCode EPSAllocateSolution(EPS eps,PetscInt extra)$/;"	f
 EPSAppendOptionsPrefix	src/eps/interface/epsopts.c	/^PetscErrorCode EPSAppendOptionsPrefix(EPS eps,const char *prefix)$/;"	f
@@ -1010,20 +1059,20 @@ EPSArnoldiGetDelayed	src/eps/impls/krylov/arnoldi/arnoldi.c	/^PetscErrorCode EPS
 EPSArnoldiGetDelayed_Arnoldi	src/eps/impls/krylov/arnoldi/arnoldi.c	/^static PetscErrorCode EPSArnoldiGetDelayed_Arnoldi(EPS eps,PetscBool *delayed)$/;"	f	file:
 EPSArnoldiSetDelayed	src/eps/impls/krylov/arnoldi/arnoldi.c	/^PetscErrorCode EPSArnoldiSetDelayed(EPS eps,PetscBool delayed)$/;"	f
 EPSArnoldiSetDelayed_Arnoldi	src/eps/impls/krylov/arnoldi/arnoldi.c	/^static PetscErrorCode EPSArnoldiSetDelayed_Arnoldi(EPS eps,PetscBool delayed)$/;"	f	file:
-EPSBLOPEX	include/slepc/finclude/slepcepsdef.h	62;"	d
+EPSBLOPEX	include/slepc/finclude/slepcepsdef.h	64;"	d
 EPSBLOPEX	include/slepceps.h	65;"	d
 EPSBLOPEXGetBlockSize	src/eps/impls/external/blopex/blopex.c	/^PetscErrorCode EPSBLOPEXGetBlockSize(EPS eps,PetscInt *bs)$/;"	f
 EPSBLOPEXGetBlockSize_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^static PetscErrorCode EPSBLOPEXGetBlockSize_BLOPEX(EPS eps,PetscInt *bs)$/;"	f	file:
 EPSBLOPEXSetBlockSize	src/eps/impls/external/blopex/blopex.c	/^PetscErrorCode EPSBLOPEXSetBlockSize(EPS eps,PetscInt bs)$/;"	f
 EPSBLOPEXSetBlockSize_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^static PetscErrorCode EPSBLOPEXSetBlockSize_BLOPEX(EPS eps,PetscInt bs)$/;"	f	file:
-EPSBLZPACK	include/slepc/finclude/slepcepsdef.h	60;"	d
+EPSBLZPACK	include/slepc/finclude/slepcepsdef.h	62;"	d
 EPSBLZPACK	include/slepceps.h	63;"	d
 EPSBackTransform_ARPACK	src/eps/impls/external/arpack/arpack.c	/^PetscErrorCode EPSBackTransform_ARPACK(EPS eps)$/;"	f
 EPSBackTransform_BLZPACK	src/eps/impls/external/blzpack/blzpack.c	/^PetscErrorCode EPSBackTransform_BLZPACK(EPS eps)$/;"	f
 EPSBackTransform_Default	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSBackTransform_Default(EPS eps)$/;"	f
 EPSBackTransform_Power	src/eps/impls/power/power.c	/^PetscErrorCode EPSBackTransform_Power(EPS eps)$/;"	f
 EPSBalance	include/slepc/finclude/slepcepsdef.h	41;"	d
-EPSBalance	include/slepceps.h	/^               EPS_BALANCE_USER } EPSBalance;$/;"	t	typeref:enum:__anon16
+EPSBalance	include/slepceps.h	/^               EPS_BALANCE_USER } EPSBalance;$/;"	t	typeref:enum:__anon18
 EPSBalanceTypes	include/slepceps.h	/^PETSC_EXTERN const char *EPSBalanceTypes[];$/;"	v
 EPSBalanceTypes	src/eps/interface/dlregiseps.c	/^const char *EPSBalanceTypes[] = {"NONE","ONESIDE","TWOSIDE","USER","EPSBalance","EPS_BALANCE_",0};$/;"	v
 EPSBasicArnoldi	src/eps/impls/krylov/epskrylov.c	/^PetscErrorCode EPSBasicArnoldi(EPS eps,PetscBool trans,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)$/;"	f
@@ -1033,26 +1082,42 @@ EPSBlzpackSetBlockSize_BLZPACK	src/eps/impls/external/blzpack/blzpack.c	/^static
 EPSBlzpackSetNSteps	src/eps/impls/external/blzpack/blzpack.c	/^PetscErrorCode EPSBlzpackSetNSteps(EPS eps,PetscInt nsteps)$/;"	f
 EPSBlzpackSetNSteps_BLZPACK	src/eps/impls/external/blzpack/blzpack.c	/^static PetscErrorCode EPSBlzpackSetNSteps_BLZPACK(EPS eps,PetscInt nsteps)$/;"	f	file:
 EPSBuildBalance_Krylov	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSBuildBalance_Krylov(EPS eps)$/;"	f
-EPSCISS	include/slepc/finclude/slepcepsdef.h	57;"	d
+EPSCISS	include/slepc/finclude/slepcepsdef.h	59;"	d
 EPSCISS	include/slepceps.h	60;"	d
-EPSCISSGetRefinement	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *outer,PetscInt *blsize)$/;"	f
-EPSCISSGetRefinement_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt *outer,PetscInt *blsize)$/;"	f	file:
-EPSCISSGetSizes	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)$/;"	f
-EPSCISSGetSizes_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)$/;"	f	file:
+EPSCISSExtraction	include/slepc/finclude/slepcepsdef.h	48;"	d
+EPSCISSExtraction	include/slepceps.h	/^               EPS_CISS_EXTRACTION_HANKEL } EPSCISSExtraction;$/;"	t	typeref:enum:__anon27
+EPSCISSExtractions	include/slepceps.h	/^PETSC_EXTERN const char *EPSCISSExtractions[];$/;"	v
+EPSCISSExtractions	src/eps/interface/dlregiseps.c	/^const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",0};$/;"	v
+EPSCISSGetExtraction	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetExtraction(EPS eps,EPSCISSExtraction *extraction)$/;"	f
+EPSCISSGetExtraction_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetExtraction_CISS(EPS eps,EPSCISSExtraction *extraction)$/;"	f	file:
+EPSCISSGetQuadRule	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetQuadRule(EPS eps, EPSCISSQuadRule *quad)$/;"	f
+EPSCISSGetQuadRule_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetQuadRule_CISS(EPS eps,EPSCISSQuadRule *quad)$/;"	f	file:
+EPSCISSGetRefinement	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *blsize)$/;"	f
+EPSCISSGetRefinement_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt *blsize)$/;"	f	file:
+EPSCISSGetSizes	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)$/;"	f
+EPSCISSGetSizes_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)$/;"	f	file:
 EPSCISSGetThreshold	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetThreshold(EPS eps,PetscReal *delta,PetscReal *spur)$/;"	f
 EPSCISSGetThreshold_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetThreshold_CISS(EPS eps,PetscReal *delta,PetscReal *spur)$/;"	f	file:
-EPSCISSGetUseST	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetUseST(EPS eps, PetscBool *usest)$/;"	f
+EPSCISSGetUseST	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSGetUseST(EPS eps,PetscBool *usest)$/;"	f
 EPSCISSGetUseST_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSGetUseST_CISS(EPS eps,PetscBool *usest)$/;"	f	file:
-EPSCISSSetRefinement	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt outer,PetscInt blsize)$/;"	f
-EPSCISSSetRefinement_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt outer,PetscInt blsize)$/;"	f	file:
-EPSCISSSetSizes	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)$/;"	f
-EPSCISSSetSizes_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)$/;"	f	file:
+EPSCISSQuadRule	include/slepc/finclude/slepcepsdef.h	47;"	d
+EPSCISSQuadRule	include/slepceps.h	/^               EPS_CISS_QUADRULE_CHEBYSHEV } EPSCISSQuadRule;$/;"	t	typeref:enum:__anon26
+EPSCISSQuadRules	include/slepceps.h	/^PETSC_EXTERN const char *EPSCISSQuadRules[];$/;"	v
+EPSCISSQuadRules	src/eps/interface/dlregiseps.c	/^const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",0};$/;"	v
+EPSCISSSetExtraction	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetExtraction(EPS eps,EPSCISSExtraction extraction)$/;"	f
+EPSCISSSetExtraction_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetExtraction_CISS(EPS eps,EPSCISSExtraction extraction)$/;"	f	file:
+EPSCISSSetQuadRule	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetQuadRule(EPS eps,EPSCISSQuadRule quad)$/;"	f
+EPSCISSSetQuadRule_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetQuadRule_CISS(EPS eps,EPSCISSQuadRule quad)$/;"	f	file:
+EPSCISSSetRefinement	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt blsize)$/;"	f
+EPSCISSSetRefinement_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt blsize)$/;"	f	file:
+EPSCISSSetSizes	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)$/;"	f
+EPSCISSSetSizes_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)$/;"	f	file:
 EPSCISSSetThreshold	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetThreshold(EPS eps,PetscReal delta,PetscReal spur)$/;"	f
 EPSCISSSetThreshold_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetThreshold_CISS(EPS eps,PetscReal delta,PetscReal spur)$/;"	f	file:
 EPSCISSSetUseST	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSCISSSetUseST(EPS eps,PetscBool usest)$/;"	f
 EPSCISSSetUseST_CISS	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EPSCISSSetUseST_CISS(EPS eps,PetscBool usest)$/;"	f	file:
-EPSCheckSolved	include/slepc/private/epsimpl.h	128;"	d
-EPSCheckSolved	include/slepc/private/epsimpl.h	132;"	d
+EPSCheckSolved	include/slepc/private/epsimpl.h	131;"	d
+EPSCheckSolved	include/slepc/private/epsimpl.h	135;"	d
 EPSComputeError	src/eps/interface/epssolve.c	/^PetscErrorCode EPSComputeError(EPS eps,PetscInt i,EPSErrorType type,PetscReal *error)$/;"	f
 EPSComputeRelativeError	include/slepceps.h	/^PETSC_DEPRECATED("Use EPSComputeError()") PETSC_STATIC_INLINE PetscErrorCode EPSComputeRelativeError(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_RELATIVE,r);}$/;"	f
 EPSComputeResidualNorm	include/slepceps.h	/^PETSC_DEPRECATED("Use EPSComputeError() with EPS_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode EPSComputeResidualNorm(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_ABSOLUTE,r);}$/;"	f
@@ -1065,15 +1130,16 @@ EPSComputeVectors_Schur	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSCompu
 EPSComputeVectors_Slice	src/eps/impls/krylov/krylovschur/ks-slice.c	/^PetscErrorCode EPSComputeVectors_Slice(EPS eps)$/;"	f
 EPSComputeVectors_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSComputeVectors_XD(EPS eps)$/;"	f
 EPSConv	include/slepc/finclude/slepcepsdef.h	42;"	d
-EPSConv	include/slepceps.h	/^               EPS_CONV_USER } EPSConv;$/;"	t	typeref:enum:__anon18
+EPSConv	include/slepceps.h	/^               EPS_CONV_USER } EPSConv;$/;"	t	typeref:enum:__anon20
+EPSConvMonitorSetFromOptions	src/eps/interface/epsopts.c	/^PetscErrorCode EPSConvMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))$/;"	f
 EPSConvergedAbsolute	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSConvergedAbsolute(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
-EPSConvergedEigRelative	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSConvergedEigRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
-EPSConvergedNormRelative	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSConvergedNormRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
+EPSConvergedNorm	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSConvergedNorm(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 EPSConvergedReason	include/slepc/finclude/slepcepsdef.h	36;"	d
-EPSConvergedReason	include/slepceps.h	/^              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;$/;"	t	typeref:enum:__anon19
+EPSConvergedReason	include/slepceps.h	/^              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;$/;"	t	typeref:enum:__anon22
 EPSConvergedReasons	include/slepceps.h	/^PETSC_EXTERN const char *const*EPSConvergedReasons;$/;"	v
-EPSConvergedReasons	src/eps/interface/dlregiseps.c	/^const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 5;$/;"	v
-EPSConvergedReasons_Shifted	src/eps/interface/dlregiseps.c	/^const char *const EPSConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","EPSConvergedReason","EPS_",0};$/;"	v
+EPSConvergedReasons	src/eps/interface/dlregiseps.c	/^const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;$/;"	v
+EPSConvergedReasons_Shifted	src/eps/interface/dlregiseps.c	/^const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",0};$/;"	v
+EPSConvergedRelative	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSConvergedRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 EPSCreate	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)$/;"	f
 EPSCreateShift	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode EPSCreateShift(EPS eps,PetscReal val,EPS_shift neighb0,EPS_shift neighb1)$/;"	f	file:
 EPSCreate_ARPACK	src/eps/impls/external/arpack/arpack.c	/^PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(EPS eps)$/;"	f
@@ -1093,7 +1159,6 @@ EPSCreate_Power	src/eps/impls/power/power.c	/^PETSC_EXTERN PetscErrorCode EPSCre
 EPSCreate_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^PETSC_EXTERN PetscErrorCode EPSCreate_RQCG(EPS eps)$/;"	f
 EPSCreate_Subspace	src/eps/impls/subspace/subspace.c	/^PETSC_EXTERN PetscErrorCode EPSCreate_Subspace(EPS eps)$/;"	f
 EPSCreate_TRLAN	src/eps/impls/external/trlan/trlan.c	/^PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(EPS eps)$/;"	f
-EPSCreate_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSCreate_XD(EPS eps)$/;"	f
 EPSDavidsonFLAdd	src/eps/impls/davidson/davidson.h	/^PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLAdd(dvdFunctionList **fl,dvdCallback f)$/;"	f
 EPSDavidsonFLCall	src/eps/impls/davidson/davidson.h	/^PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLCall(dvdFunctionList *fl,dvdDashboard *d)$/;"	f
 EPSDavidsonFLDestroy	src/eps/impls/davidson/davidson.h	/^PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLDestroy(dvdFunctionList **fl)$/;"	f
@@ -1117,7 +1182,7 @@ EPSDestroy_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^PetscErrorCode EPSDestroy_RQCG(EP
 EPSDestroy_Subspace	src/eps/impls/subspace/subspace.c	/^PetscErrorCode EPSDestroy_Subspace(EPS eps)$/;"	f
 EPSDestroy_TRLAN	src/eps/impls/external/trlan/trlan.c	/^PetscErrorCode EPSDestroy_TRLAN(EPS eps)$/;"	f
 EPSErrorType	include/slepc/finclude/slepcepsdef.h	37;"	d
-EPSErrorType	include/slepceps.h	/^               EPS_ERROR_BACKWARD } EPSErrorType;$/;"	t	typeref:enum:__anon17
+EPSErrorType	include/slepceps.h	/^               EPS_ERROR_BACKWARD } EPSErrorType;$/;"	t	typeref:enum:__anon19
 EPSErrorTypes	include/slepceps.h	/^PETSC_EXTERN const char *EPSErrorTypes[];$/;"	v
 EPSErrorTypes	src/eps/interface/dlregiseps.c	/^const char *EPSErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","EPSErrorType","EPS_ERROR_",0};$/;"	v
 EPSErrorView	src/eps/interface/epsview.c	/^PetscErrorCode EPSErrorView(EPS eps,EPSErrorType etype,PetscViewer viewer)$/;"	f
@@ -1127,8 +1192,8 @@ EPSErrorView_DETAIL	src/eps/interface/epsview.c	/^static PetscErrorCode EPSError
 EPSErrorView_MATLAB	src/eps/interface/epsview.c	/^static PetscErrorCode EPSErrorView_MATLAB(EPS eps,EPSErrorType etype,PetscViewer viewer)$/;"	f	file:
 EPSExtractShift	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode EPSExtractShift(EPS eps)$/;"	f	file:
 EPSExtraction	include/slepc/finclude/slepcepsdef.h	40;"	d
-EPSExtraction	include/slepceps.h	/^               EPS_REFINED_HARMONIC } EPSExtraction;$/;"	t	typeref:enum:__anon14
-EPSFEAST	include/slepc/finclude/slepcepsdef.h	64;"	d
+EPSExtraction	include/slepceps.h	/^               EPS_REFINED_HARMONIC } EPSExtraction;$/;"	t	typeref:enum:__anon16
+EPSFEAST	include/slepc/finclude/slepcepsdef.h	66;"	d
 EPSFEAST	include/slepceps.h	67;"	d
 EPSFEASTGetNumPoints	src/eps/impls/external/feast/feast.c	/^PetscErrorCode EPSFEASTGetNumPoints(EPS eps,PetscInt *npoints)$/;"	f
 EPSFEASTGetNumPoints_FEAST	src/eps/impls/external/feast/feast.c	/^static PetscErrorCode EPSFEASTGetNumPoints_FEAST(EPS eps,PetscInt *npoints)$/;"	f	file:
@@ -1136,20 +1201,20 @@ EPSFEASTSetNumPoints	src/eps/impls/external/feast/feast.c	/^PetscErrorCode EPSFE
 EPSFEASTSetNumPoints_FEAST	src/eps/impls/external/feast/feast.c	/^static PetscErrorCode EPSFEASTSetNumPoints_FEAST(EPS eps,PetscInt npoints)$/;"	f	file:
 EPSFinalizePackage	src/eps/interface/dlregiseps.c	/^PetscErrorCode EPSFinalizePackage(void)$/;"	f
 EPSFullLanczos	src/eps/impls/krylov/epskrylov.c	/^PetscErrorCode EPSFullLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown)$/;"	f
-EPSGD	include/slepc/finclude/slepcepsdef.h	53;"	d
+EPSGD	include/slepc/finclude/slepcepsdef.h	55;"	d
 EPSGD	include/slepceps.h	56;"	d
 EPSGDGetBOrth	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetBOrth(EPS eps,PetscBool *borth)$/;"	f
 EPSGDGetBlockSize	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetBlockSize(EPS eps,PetscInt *blocksize)$/;"	f
-EPSGDGetDoubleExpansion	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *flg)$/;"	f
-EPSGDGetDoubleExpansion_GD	src/eps/impls/davidson/gd/gd.c	/^static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *flg)$/;"	f	file:
+EPSGDGetDoubleExpansion	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *doubleexp)$/;"	f
+EPSGDGetDoubleExpansion_GD	src/eps/impls/davidson/gd/gd.c	/^static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *doubleexp)$/;"	f	file:
 EPSGDGetInitialSize	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetInitialSize(EPS eps,PetscInt *initialsize)$/;"	f
 EPSGDGetKrylovStart	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetKrylovStart(EPS eps,PetscBool *krylovstart)$/;"	f
 EPSGDGetRestart	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)$/;"	f
 EPSGDGetWindowSizes	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)$/;"	f
 EPSGDSetBOrth	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetBOrth(EPS eps,PetscBool borth)$/;"	f
 EPSGDSetBlockSize	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetBlockSize(EPS eps,PetscInt blocksize)$/;"	f
-EPSGDSetDoubleExpansion	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool use_gd2)$/;"	f
-EPSGDSetDoubleExpansion_GD	src/eps/impls/davidson/gd/gd.c	/^static PetscErrorCode EPSGDSetDoubleExpansion_GD(EPS eps,PetscBool use_gd2)$/;"	f	file:
+EPSGDSetDoubleExpansion	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool doubleexp)$/;"	f
+EPSGDSetDoubleExpansion_GD	src/eps/impls/davidson/gd/gd.c	/^static PetscErrorCode EPSGDSetDoubleExpansion_GD(EPS eps,PetscBool doubleexp)$/;"	f	file:
 EPSGDSetInitialSize	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetInitialSize(EPS eps,PetscInt initialsize)$/;"	f
 EPSGDSetKrylovStart	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetKrylovStart(EPS eps,PetscBool krylovstart)$/;"	f
 EPSGDSetRestart	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSGDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)$/;"	f
@@ -1179,6 +1244,7 @@ EPSGetPurify	src/eps/interface/epsopts.c	/^PetscErrorCode EPSGetPurify(EPS eps,P
 EPSGetRG	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSGetRG(EPS eps,RG *rg)$/;"	f
 EPSGetST	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSGetST(EPS eps,ST *st)$/;"	f
 EPSGetStartVector	src/eps/interface/epssolve.c	/^PetscErrorCode EPSGetStartVector(EPS eps,PetscInt i,PetscBool *breakdown)$/;"	f
+EPSGetStoppingTest	src/eps/interface/epsopts.c	/^PetscErrorCode EPSGetStoppingTest(EPS eps,EPSStop *stop)$/;"	f
 EPSGetTarget	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSGetTarget(EPS eps,PetscScalar* target)$/;"	f
 EPSGetTolerances	src/eps/interface/epsopts.c	/^PetscErrorCode EPSGetTolerances(EPS eps,PetscReal *tol,PetscInt *maxits)$/;"	f
 EPSGetTrackAll	src/eps/interface/epsopts.c	/^PetscErrorCode EPSGetTrackAll(EPS eps,PetscBool *trackall)$/;"	f
@@ -1189,7 +1255,7 @@ EPSInitializePackage	src/eps/interface/dlregiseps.c	/^PetscErrorCode EPSInitiali
 EPSIsGeneralized	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSIsGeneralized(EPS eps,PetscBool* is)$/;"	f
 EPSIsHermitian	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSIsHermitian(EPS eps,PetscBool* is)$/;"	f
 EPSIsPositive	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSIsPositive(EPS eps,PetscBool* is)$/;"	f
-EPSJD	include/slepc/finclude/slepcepsdef.h	54;"	d
+EPSJD	include/slepc/finclude/slepcepsdef.h	56;"	d
 EPSJD	include/slepceps.h	57;"	d
 EPSJDGetBOrth	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSJDGetBOrth(EPS eps,PetscBool *borth)$/;"	f
 EPSJDGetBlockSize	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSJDGetBlockSize(EPS eps,PetscInt *blocksize)$/;"	f
@@ -1210,7 +1276,7 @@ EPSJDSetInitialSize	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSJDSetInit
 EPSJDSetKrylovStart	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSJDSetKrylovStart(EPS eps,PetscBool krylovstart)$/;"	f
 EPSJDSetRestart	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSJDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)$/;"	f
 EPSJDSetWindowSizes	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSJDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)$/;"	f
-EPSKRYLOVSCHUR	include/slepc/finclude/slepcepsdef.h	52;"	d
+EPSKRYLOVSCHUR	include/slepc/finclude/slepcepsdef.h	54;"	d
 EPSKRYLOVSCHUR	include/slepceps.h	55;"	d
 EPSKrylovConvergence	src/eps/impls/krylov/epskrylov.c	/^PetscErrorCode EPSKrylovConvergence(EPS eps,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscReal corrf,PetscInt *kout)$/;"	f
 EPSKrylovSchurGetDetectZeros	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurGetDetectZeros(EPS eps,PetscBool *detect)$/;"	f
@@ -1227,6 +1293,8 @@ EPSKrylovSchurGetRestart	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscE
 EPSKrylovSchurGetRestart_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurGetRestart_KrylovSchur(EPS eps,PetscReal *keep)$/;"	f	file:
 EPSKrylovSchurGetSubcommInfo	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS eps,PetscInt *k,PetscInt *n,Vec *v)$/;"	f
 EPSKrylovSchurGetSubcommInfo_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurGetSubcommInfo_KrylovSchur(EPS eps,PetscInt *k,PetscInt *n,Vec *v)$/;"	f	file:
+EPSKrylovSchurGetSubcommMats	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurGetSubcommMats(EPS eps,Mat *A,Mat *B)$/;"	f
+EPSKrylovSchurGetSubcommMats_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurGetSubcommMats_KrylovSchur(EPS eps,Mat *A,Mat *B)$/;"	f	file:
 EPSKrylovSchurGetSubcommPairs	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS eps,PetscInt i,PetscScalar *eig,Vec v)$/;"	f
 EPSKrylovSchurGetSubcommPairs_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(EPS eps,PetscInt i,PetscScalar *eig,Vec v)$/;"	f	file:
 EPSKrylovSchurGetSubintervals	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurGetSubintervals(EPS eps,PetscReal** subint)$/;"	f
@@ -1243,25 +1311,31 @@ EPSKrylovSchurSetRestart	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscE
 EPSKrylovSchurSetRestart_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurSetRestart_KrylovSchur(EPS eps,PetscReal keep)$/;"	f	file:
 EPSKrylovSchurSetSubintervals	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurSetSubintervals(EPS eps,PetscReal *subint)$/;"	f
 EPSKrylovSchurSetSubintervals_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurSetSubintervals_KrylovSchur(EPS eps,PetscReal* subint)$/;"	f	file:
+EPSKrylovSchurUpdateSubcommMats	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSKrylovSchurUpdateSubcommMats(EPS eps,PetscScalar s,PetscScalar a,Mat Au,PetscScalar t,PetscScalar b, Mat Bu,MatStructure str,PetscBool globalup)$/;"	f
+EPSKrylovSchurUpdateSubcommMats_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^static PetscErrorCode EPSKrylovSchurUpdateSubcommMats_KrylovSchur(EPS eps,PetscScalar a,PetscScalar ap,Mat Au,PetscScalar b,PetscScalar bp, Mat Bu,MatStructure str,PetscBool globalup)$/;"	f	file:
 EPSKrylovSchur_Slice	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode EPSKrylovSchur_Slice(EPS eps)$/;"	f	file:
-EPSLANCZOS	include/slepc/finclude/slepcepsdef.h	51;"	d
+EPSLANCZOS	include/slepc/finclude/slepcepsdef.h	53;"	d
 EPSLANCZOS	include/slepceps.h	54;"	d
-EPSLAPACK	include/slepc/finclude/slepcepsdef.h	58;"	d
+EPSLAPACK	include/slepc/finclude/slepcepsdef.h	60;"	d
 EPSLAPACK	include/slepceps.h	61;"	d
-EPSLOBPCG	include/slepc/finclude/slepcepsdef.h	56;"	d
+EPSLOBPCG	include/slepc/finclude/slepcepsdef.h	58;"	d
 EPSLOBPCG	include/slepceps.h	59;"	d
 EPSLOBPCGGetBlockSize	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSLOBPCGGetBlockSize(EPS eps,PetscInt *bs)$/;"	f
 EPSLOBPCGGetBlockSize_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^static PetscErrorCode EPSLOBPCGGetBlockSize_LOBPCG(EPS eps,PetscInt *bs)$/;"	f	file:
 EPSLOBPCGGetLocking	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSLOBPCGGetLocking(EPS eps,PetscBool *lock)$/;"	f
 EPSLOBPCGGetLocking_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^static PetscErrorCode EPSLOBPCGGetLocking_LOBPCG(EPS eps,PetscBool *lock)$/;"	f	file:
+EPSLOBPCGGetRestart	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSLOBPCGGetRestart(EPS eps,PetscReal *restart)$/;"	f
+EPSLOBPCGGetRestart_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^static PetscErrorCode EPSLOBPCGGetRestart_LOBPCG(EPS eps,PetscReal *restart)$/;"	f	file:
 EPSLOBPCGSetBlockSize	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSLOBPCGSetBlockSize(EPS eps,PetscInt bs)$/;"	f
 EPSLOBPCGSetBlockSize_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^static PetscErrorCode EPSLOBPCGSetBlockSize_LOBPCG(EPS eps,PetscInt bs)$/;"	f	file:
 EPSLOBPCGSetLocking	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSLOBPCGSetLocking(EPS eps,PetscBool lock)$/;"	f
 EPSLOBPCGSetLocking_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^static PetscErrorCode EPSLOBPCGSetLocking_LOBPCG(EPS eps,PetscBool lock)$/;"	f	file:
+EPSLOBPCGSetRestart	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSLOBPCGSetRestart(EPS eps,PetscReal restart)$/;"	f
+EPSLOBPCGSetRestart_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^static PetscErrorCode EPSLOBPCGSetRestart_LOBPCG(EPS eps,PetscReal restart)$/;"	f	file:
 EPSLanczosGetReorthog	src/eps/impls/krylov/lanczos/lanczos.c	/^PetscErrorCode EPSLanczosGetReorthog(EPS eps,EPSLanczosReorthogType *reorthog)$/;"	f
 EPSLanczosGetReorthog_Lanczos	src/eps/impls/krylov/lanczos/lanczos.c	/^static PetscErrorCode EPSLanczosGetReorthog_Lanczos(EPS eps,EPSLanczosReorthogType *reorthog)$/;"	f	file:
-EPSLanczosReorthogType	include/slepc/finclude/slepcepsdef.h	44;"	d
-EPSLanczosReorthogType	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;$/;"	t	typeref:enum:__anon21
+EPSLanczosReorthogType	include/slepc/finclude/slepcepsdef.h	45;"	d
+EPSLanczosReorthogType	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;$/;"	t	typeref:enum:__anon24
 EPSLanczosReorthogTypes	include/slepceps.h	/^PETSC_EXTERN const char *EPSLanczosReorthogTypes[];$/;"	v
 EPSLanczosReorthogTypes	src/eps/interface/dlregiseps.c	/^const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",0};$/;"	v
 EPSLanczosSetReorthog	src/eps/impls/krylov/lanczos/lanczos.c	/^PetscErrorCode EPSLanczosSetReorthog(EPS eps,EPSLanczosReorthogType reorthog)$/;"	f
@@ -1271,26 +1345,30 @@ EPSList	src/eps/interface/epsbasic.c	/^PetscFunctionList EPSList = 0;$/;"	v
 EPSLocalLanczos	src/eps/impls/krylov/lanczos/lanczos.c	/^static PetscErrorCode EPSLocalLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown)$/;"	f	file:
 EPSLookForDeflation	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode EPSLookForDeflation(EPS eps)$/;"	f	file:
 EPSMonitor	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitor(EPS eps,PetscInt it,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest)$/;"	f
-EPSMonitorAll	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+EPSMonitorAll	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
 EPSMonitorCancel	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorCancel(EPS eps)$/;"	f
-EPSMonitorConverged	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-EPSMonitorFirst	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-EPSMonitorLG	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorLG(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-EPSMonitorLGAll	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+EPSMonitorConverged	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)$/;"	f
+EPSMonitorFirst	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
+EPSMonitorLG	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorLG(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+EPSMonitorLGAll	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+EPSMonitorLGCreate	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)$/;"	f
 EPSMonitorSet	src/eps/interface/epsmon.c	/^PetscErrorCode EPSMonitorSet(EPS eps,PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))$/;"	f
+EPSMonitorSetFromOptions	src/eps/interface/epsopts.c	/^PetscErrorCode EPSMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)$/;"	f
+EPSMonitor_Cross	src/svd/impls/cross/cross.c	/^static PetscErrorCode EPSMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f	file:
+EPSMonitor_Cyclic	src/svd/impls/cyclic/cyclic.c	/^static PetscErrorCode EPSMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f	file:
 EPSMonitor_Linear	src/pep/impls/linear/linear.c	/^static PetscErrorCode EPSMonitor_Linear(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f	file:
 EPSNS	src/eps/examples/tests/makefile	/^EPSNS  = krylovschur arnoldi gd jd gd2$/;"	m
 EPSOps	include/slepc/private/epsimpl.h	/^typedef struct _EPSOps *EPSOps;$/;"	t	typeref:struct:_EPSOps
-EPSPOWER	include/slepc/finclude/slepcepsdef.h	48;"	d
+EPSPOWER	include/slepc/finclude/slepcepsdef.h	50;"	d
 EPSPOWER	include/slepceps.h	51;"	d
-EPSPRIMME	include/slepc/finclude/slepcepsdef.h	63;"	d
+EPSPRIMME	include/slepc/finclude/slepcepsdef.h	65;"	d
 EPSPRIMME	include/slepceps.h	66;"	d
 EPSPRIMMEGetBlockSize	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,PetscInt *bs)$/;"	f
 EPSPRIMMEGetBlockSize_PRIMME	src/eps/impls/external/primme/primme.c	/^static PetscErrorCode EPSPRIMMEGetBlockSize_PRIMME(EPS eps,PetscInt *bs)$/;"	f	file:
 EPSPRIMMEGetMethod	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSPRIMMEGetMethod(EPS eps,EPSPRIMMEMethod *method)$/;"	f
 EPSPRIMMEGetMethod_PRIMME	src/eps/impls/external/primme/primme.c	/^static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(EPS eps,EPSPRIMMEMethod *method)$/;"	f	file:
-EPSPRIMMEMethod	include/slepc/finclude/slepcepsdef.h	45;"	d
-EPSPRIMMEMethod	include/slepceps.h	/^               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;$/;"	t	typeref:enum:__anon22
+EPSPRIMMEMethod	include/slepc/finclude/slepcepsdef.h	46;"	d
+EPSPRIMMEMethod	include/slepceps.h	/^               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;$/;"	t	typeref:enum:__anon25
 EPSPRIMMEMethods	include/slepceps.h	/^PETSC_EXTERN const char *EPSPRIMMEMethods[];$/;"	v
 EPSPRIMMEMethods	src/eps/interface/dlregiseps.c	/^const char *EPSPRIMMEMethods[] = {"DYNAMIC","DEFAULT_MIN_TIME","DEFAULT_MIN_MATVECS","ARNOLDI","GD","GD_PLUSK","GD_OLSEN_PLUSK","JD_OLSEN_PLUSK","RQI","JDQR","JDQMR","JDQMR_ETOL","SUBSPACE_ITERATION","LOBPCG_ORTHOBASIS","LOBPCG_ORTHOBASISW","EPSPRIMMEMethod","EPS_PRIMME_",0};$/;"	v
 EPSPRIMMESetBlockSize	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,PetscInt bs)$/;"	f
@@ -1303,16 +1381,16 @@ EPSPowerGetShiftType	src/eps/impls/power/power.c	/^PetscErrorCode EPSPowerGetShi
 EPSPowerGetShiftType_Power	src/eps/impls/power/power.c	/^static PetscErrorCode EPSPowerGetShiftType_Power(EPS eps,EPSPowerShiftType *shift)$/;"	f	file:
 EPSPowerSetShiftType	src/eps/impls/power/power.c	/^PetscErrorCode EPSPowerSetShiftType(EPS eps,EPSPowerShiftType shift)$/;"	f
 EPSPowerSetShiftType_Power	src/eps/impls/power/power.c	/^static PetscErrorCode EPSPowerSetShiftType_Power(EPS eps,EPSPowerShiftType shift)$/;"	f	file:
-EPSPowerShiftType	include/slepc/finclude/slepcepsdef.h	43;"	d
-EPSPowerShiftType	include/slepceps.h	/^               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;$/;"	t	typeref:enum:__anon20
+EPSPowerShiftType	include/slepc/finclude/slepcepsdef.h	44;"	d
+EPSPowerShiftType	include/slepceps.h	/^               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;$/;"	t	typeref:enum:__anon23
 EPSPowerShiftTypes	include/slepceps.h	/^PETSC_EXTERN const char *EPSPowerShiftTypes[];$/;"	v
 EPSPowerShiftTypes	src/eps/interface/dlregiseps.c	/^const char *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",0};$/;"	v
 EPSPrepareRational	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode EPSPrepareRational(EPS eps)$/;"	f	file:
 EPSPrintSolution	include/slepceps.h	/^PETSC_DEPRECATED("Use EPSErrorView()") PETSC_STATIC_INLINE PetscErrorCode EPSPrintSolution(EPS eps,PetscViewer v) {return EPSErrorView(eps,EPS_ERROR_RELATIVE,v);}$/;"	f
 EPSProblemType	include/slepc/finclude/slepcepsdef.h	38;"	d
-EPSProblemType	include/slepceps.h	/^               EPS_GHIEP } EPSProblemType;$/;"	t	typeref:enum:__anon13
+EPSProblemType	include/slepceps.h	/^               EPS_GHIEP } EPSProblemType;$/;"	t	typeref:enum:__anon15
 EPSPseudoLanczos	src/eps/impls/krylov/epskrylov.c	/^PetscErrorCode EPSPseudoLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscReal *cos,Vec w)$/;"	f
-EPSRQCG	include/slepc/finclude/slepcepsdef.h	55;"	d
+EPSRQCG	include/slepc/finclude/slepcepsdef.h	57;"	d
 EPSRQCG	include/slepceps.h	58;"	d
 EPSRQCGGetReset	src/eps/impls/cg/rqcg/rqcg.c	/^PetscErrorCode EPSRQCGGetReset(EPS eps,PetscInt *nrest)$/;"	f
 EPSRQCGGetReset_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^static PetscErrorCode EPSRQCGGetReset_RQCG(EPS eps,PetscInt *nrest)$/;"	f	file:
@@ -1337,7 +1415,7 @@ EPSReset_PRIMME	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSReset
 EPSReset_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^PetscErrorCode EPSReset_RQCG(EPS eps)$/;"	f
 EPSReset_TRLAN	src/eps/impls/external/trlan/trlan.c	/^PetscErrorCode EPSReset_TRLAN(EPS eps)$/;"	f
 EPSReset_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSReset_XD(EPS eps)$/;"	f
-EPSSUBSPACE	include/slepc/finclude/slepcepsdef.h	49;"	d
+EPSSUBSPACE	include/slepc/finclude/slepcepsdef.h	51;"	d
 EPSSUBSPACE	include/slepceps.h	52;"	d
 EPSSelectiveLanczos	src/eps/impls/krylov/lanczos/lanczos.c	/^static PetscErrorCode EPSSelectiveLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscReal anorm)$/;"	f	file:
 EPSSetArbitrarySelection	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetArbitrarySelection(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)$/;"	f
@@ -1354,19 +1432,19 @@ EPSSetDimensions_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSSet
 EPSSetEigenvalueComparison	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetEigenvalueComparison(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)$/;"	f
 EPSSetExtraction	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetExtraction(EPS eps,EPSExtraction extr)$/;"	f
 EPSSetFromOptions	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetFromOptions(EPS eps)$/;"	f
-EPSSetFromOptions_Arnoldi	src/eps/impls/krylov/arnoldi/arnoldi.c	/^PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_BLZPACK	src/eps/impls/external/blzpack/blzpack.c	/^PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_CISS	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSSetFromOptions_CISS(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_FEAST	src/eps/impls/external/feast/feast.c	/^PetscErrorCode EPSSetFromOptions_FEAST(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_GD	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSSetFromOptions_GD(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_JD	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSSetFromOptions_JD(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_Lanczos	src/eps/impls/krylov/lanczos/lanczos.c	/^PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_PRIMME	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_Power	src/eps/impls/power/power.c	/^PetscErrorCode EPSSetFromOptions_Power(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
-EPSSetFromOptions_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^PetscErrorCode EPSSetFromOptions_RQCG(PetscOptions *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_Arnoldi	src/eps/impls/krylov/arnoldi/arnoldi.c	/^PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_BLZPACK	src/eps/impls/external/blzpack/blzpack.c	/^PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_CISS	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_FEAST	src/eps/impls/external/feast/feast.c	/^PetscErrorCode EPSSetFromOptions_FEAST(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_GD	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSSetFromOptions_GD(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_JD	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_Lanczos	src/eps/impls/krylov/lanczos/lanczos.c	/^PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_PRIMME	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_Power	src/eps/impls/power/power.c	/^PetscErrorCode EPSSetFromOptions_Power(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
+EPSSetFromOptions_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^PetscErrorCode EPSSetFromOptions_RQCG(PetscOptionItems *PetscOptionsObject,EPS eps)$/;"	f
 EPSSetInitialSpace	src/eps/interface/epssetup.c	/^PetscErrorCode EPSSetInitialSpace(EPS eps,PetscInt n,Vec *is)$/;"	f
 EPSSetInterval	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSSetInterval(EPS eps,PetscReal inta,PetscReal intb)$/;"	f
 EPSSetOperators	src/eps/interface/epssetup.c	/^PetscErrorCode EPSSetOperators(EPS eps,Mat A,Mat B)$/;"	f
@@ -1375,6 +1453,8 @@ EPSSetProblemType	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetProblemType
 EPSSetPurify	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetPurify(EPS eps,PetscBool purify)$/;"	f
 EPSSetRG	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSSetRG(EPS eps,RG rg)$/;"	f
 EPSSetST	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSSetST(EPS eps,ST st)$/;"	f
+EPSSetStoppingTest	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetStoppingTest(EPS eps,EPSStop stop)$/;"	f
+EPSSetStoppingTestFunction	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetStoppingTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
 EPSSetTarget	src/eps/interface/epsbasic.c	/^PetscErrorCode EPSSetTarget(EPS eps,PetscScalar target)$/;"	f
 EPSSetTolerances	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetTolerances(EPS eps,PetscReal tol,PetscInt maxits)$/;"	f
 EPSSetTrackAll	src/eps/interface/epsopts.c	/^PetscErrorCode EPSSetTrackAll(EPS eps,PetscBool trackall)$/;"	f
@@ -1431,10 +1511,13 @@ EPSSolve_Subspace	src/eps/impls/subspace/subspace.c	/^PetscErrorCode EPSSolve_Su
 EPSSolve_TRLAN	src/eps/impls/external/trlan/trlan.c	/^PetscErrorCode EPSSolve_TRLAN(EPS eps)$/;"	f
 EPSSolve_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSSolve_XD(EPS eps)$/;"	f
 EPSStateType	include/slepc/private/epsimpl.h	/^               EPS_STATE_EIGENVECTORS } EPSStateType;$/;"	t	typeref:enum:__anon1
+EPSStop	include/slepc/finclude/slepcepsdef.h	43;"	d
+EPSStop	include/slepceps.h	/^               EPS_STOP_USER } EPSStop;$/;"	t	typeref:enum:__anon21
+EPSStoppingBasic	src/eps/interface/epsdefault.c	/^PetscErrorCode EPSStoppingBasic(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)$/;"	f
 EPSStoreEigenpairs	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode EPSStoreEigenpairs(EPS eps)$/;"	f	file:
 EPSSubspaceFindGroup	src/eps/impls/subspace/subspace.c	/^static PetscErrorCode EPSSubspaceFindGroup(PetscInt l,PetscInt m,PetscScalar *wr,PetscScalar *wi,PetscReal *rsd,PetscReal grptol,PetscInt *ngrp,PetscReal *ctr,PetscReal *ae,PetscReal *arsd)$/;"	f	file:
 EPSSubspaceResidualNorms	src/eps/impls/subspace/subspace.c	/^static PetscErrorCode EPSSubspaceResidualNorms(BV V,BV AV,PetscScalar *T,PetscInt l,PetscInt m,PetscInt ldt,Vec w,PetscReal *rsd)$/;"	f	file:
-EPSTRLAN	include/slepc/finclude/slepcepsdef.h	61;"	d
+EPSTRLAN	include/slepc/finclude/slepcepsdef.h	63;"	d
 EPSTRLAN	include/slepceps.h	64;"	d
 EPSType	include/slepc/finclude/slepcepsdef.h	35;"	d
 EPSType	include/slepceps.h	/^typedef const char* EPSType;$/;"	t
@@ -1452,139 +1535,145 @@ EPSView_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^PetscErrorCode EPSView_B
 EPSView_BLZPACK	src/eps/impls/external/blzpack/blzpack.c	/^PetscErrorCode EPSView_BLZPACK(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_CISS	src/eps/impls/ciss/ciss.c	/^PetscErrorCode EPSView_CISS(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_FEAST	src/eps/impls/external/feast/feast.c	/^PetscErrorCode EPSView_FEAST(EPS eps,PetscViewer viewer)$/;"	f
+EPSView_GD	src/eps/impls/davidson/gd/gd.c	/^PetscErrorCode EPSView_GD(EPS eps,PetscViewer viewer)$/;"	f
+EPSView_JD	src/eps/impls/davidson/jd/jd.c	/^PetscErrorCode EPSView_JD(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_KrylovSchur	src/eps/impls/krylov/krylovschur/krylovschur.c	/^PetscErrorCode EPSView_KrylovSchur(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^PetscErrorCode EPSView_LOBPCG(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_Lanczos	src/eps/impls/krylov/lanczos/lanczos.c	/^PetscErrorCode EPSView_Lanczos(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_PRIMME	src/eps/impls/external/primme/primme.c	/^PetscErrorCode EPSView_PRIMME(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_Power	src/eps/impls/power/power.c	/^PetscErrorCode EPSView_Power(EPS eps,PetscViewer viewer)$/;"	f
 EPSView_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^PetscErrorCode EPSView_RQCG(EPS eps,PetscViewer viewer)$/;"	f
-EPSView_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSView_XD(EPS eps,PetscViewer viewer)$/;"	f
 EPSWhich	include/slepc/finclude/slepcepsdef.h	39;"	d
-EPSWhich	include/slepceps.h	/^               EPS_WHICH_USER } EPSWhich;$/;"	t	typeref:enum:__anon15
+EPSWhich	include/slepceps.h	/^               EPS_WHICH_USER } EPSWhich;$/;"	t	typeref:enum:__anon17
 EPSXDComputeDSConv	src/eps/impls/davidson/dvdcalcpairs.c	/^static PetscErrorCode EPSXDComputeDSConv(dvdDashboard *d)$/;"	f	file:
 EPSXDGetBOrth_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetBOrth_XD(EPS eps,PetscBool *borth)$/;"	f
 EPSXDGetBlockSize_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetBlockSize_XD(EPS eps,PetscInt *blocksize)$/;"	f
 EPSXDGetFix_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetFix_XD(EPS eps,PetscReal *fix)$/;"	f
 EPSXDGetInitialSize_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetInitialSize_XD(EPS eps,PetscInt *initialsize)$/;"	f
 EPSXDGetKrylovStart_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetKrylovStart_XD(EPS eps,PetscBool *krylovstart)$/;"	f
-EPSXDGetMethod_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetMethod_XD(EPS eps,Method_t *method)$/;"	f
 EPSXDGetRestart_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetRestart_XD(EPS eps,PetscInt *minv,PetscInt *plusk)$/;"	f
 EPSXDGetWindowSizes_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDGetWindowSizes_XD(EPS eps,PetscInt *pwindow,PetscInt *qwindow)$/;"	f
 EPSXDSetBOrth_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetBOrth_XD(EPS eps,PetscBool borth)$/;"	f
 EPSXDSetBlockSize_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetBlockSize_XD(EPS eps,PetscInt blocksize)$/;"	f
 EPSXDSetInitialSize_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetInitialSize_XD(EPS eps,PetscInt initialsize)$/;"	f
 EPSXDSetKrylovStart_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetKrylovStart_XD(EPS eps,PetscBool krylovstart)$/;"	f
-EPSXDSetMethod	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetMethod(EPS eps,Method_t method)$/;"	f
 EPSXDSetRestart_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetRestart_XD(EPS eps,PetscInt minv,PetscInt plusk)$/;"	f
 EPSXDSetWindowSizes_XD	src/eps/impls/davidson/davidson.c	/^PetscErrorCode EPSXDSetWindowSizes_XD(EPS eps,PetscInt pwindow,PetscInt qwindow)$/;"	f
 EPSXDUpdateProj	src/eps/impls/davidson/dvdcalcpairs.c	/^static PetscErrorCode EPSXDUpdateProj(Mat Q,Mat Z,PetscInt l,Mat A,PetscInt lA,PetscInt kA,Mat aux)$/;"	f	file:
-EPS_ALL	include/slepceps.h	/^               EPS_ALL,$/;"	e	enum:__anon15
-EPS_ARNOLDI	src/eps/impls/krylov/arnoldi/arnoldi.c	/^} EPS_ARNOLDI;$/;"	t	typeref:struct:__anon68	file:
-EPS_ARPACK	src/eps/impls/external/arpack/arpackp.h	/^} EPS_ARPACK;$/;"	t	typeref:struct:__anon62
-EPS_BALANCE_NONE	include/slepceps.h	/^typedef enum { EPS_BALANCE_NONE,$/;"	e	enum:__anon16
-EPS_BALANCE_ONESIDE	include/slepceps.h	/^               EPS_BALANCE_ONESIDE,$/;"	e	enum:__anon16
-EPS_BALANCE_TWOSIDE	include/slepceps.h	/^               EPS_BALANCE_TWOSIDE,$/;"	e	enum:__anon16
-EPS_BALANCE_USER	include/slepceps.h	/^               EPS_BALANCE_USER } EPSBalance;$/;"	e	enum:__anon16
-EPS_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^} EPS_BLOPEX;$/;"	t	typeref:struct:__anon63	file:
-EPS_BLZPACK	src/eps/impls/external/blzpack/blzpackp.h	/^} EPS_BLZPACK;$/;"	t	typeref:struct:__anon64
-EPS_CISS	src/eps/impls/ciss/ciss.c	/^} EPS_CISS;$/;"	t	typeref:struct:__anon47	file:
+EPS_ALL	include/slepceps.h	/^               EPS_ALL,$/;"	e	enum:__anon17
+EPS_ARNOLDI	src/eps/impls/krylov/arnoldi/arnoldi.c	/^} EPS_ARNOLDI;$/;"	t	typeref:struct:__anon80	file:
+EPS_ARPACK	src/eps/impls/external/arpack/arpackp.h	/^} EPS_ARPACK;$/;"	t	typeref:struct:__anon74
+EPS_BALANCE_NONE	include/slepceps.h	/^typedef enum { EPS_BALANCE_NONE,$/;"	e	enum:__anon18
+EPS_BALANCE_ONESIDE	include/slepceps.h	/^               EPS_BALANCE_ONESIDE,$/;"	e	enum:__anon18
+EPS_BALANCE_TWOSIDE	include/slepceps.h	/^               EPS_BALANCE_TWOSIDE,$/;"	e	enum:__anon18
+EPS_BALANCE_USER	include/slepceps.h	/^               EPS_BALANCE_USER } EPSBalance;$/;"	e	enum:__anon18
+EPS_BLOPEX	src/eps/impls/external/blopex/blopex.c	/^} EPS_BLOPEX;$/;"	t	typeref:struct:__anon75	file:
+EPS_BLZPACK	src/eps/impls/external/blzpack/blzpackp.h	/^} EPS_BLZPACK;$/;"	t	typeref:struct:__anon76
+EPS_CISS	src/eps/impls/ciss/ciss.c	/^} EPS_CISS;$/;"	t	typeref:struct:__anon61	file:
+EPS_CISS_EXTRACTION_HANKEL	include/slepceps.h	/^               EPS_CISS_EXTRACTION_HANKEL } EPSCISSExtraction;$/;"	e	enum:__anon27
+EPS_CISS_EXTRACTION_RITZ	include/slepceps.h	/^typedef enum { EPS_CISS_EXTRACTION_RITZ,$/;"	e	enum:__anon27
+EPS_CISS_QUADRULE_CHEBYSHEV	include/slepceps.h	/^               EPS_CISS_QUADRULE_CHEBYSHEV } EPSCISSQuadRule;$/;"	e	enum:__anon26
+EPS_CISS_QUADRULE_TRAPEZOIDAL	include/slepceps.h	/^typedef enum { EPS_CISS_QUADRULE_TRAPEZOIDAL=1,$/;"	e	enum:__anon26
 EPS_CLASSID	include/slepceps.h	/^PETSC_EXTERN PetscClassId EPS_CLASSID;$/;"	v
 EPS_CLASSID	src/eps/interface/epsbasic.c	/^PetscClassId      EPS_CLASSID = 0;$/;"	v
-EPS_CONVERGED_ITERATING	include/slepceps.h	/^              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;$/;"	e	enum:__anon19
-EPS_CONVERGED_TOL	include/slepceps.h	/^              EPS_CONVERGED_TOL                =  2,$/;"	e	enum:__anon19
-EPS_CONV_ABS	include/slepceps.h	/^typedef enum { EPS_CONV_ABS,$/;"	e	enum:__anon18
-EPS_CONV_EIG	include/slepceps.h	/^               EPS_CONV_EIG,$/;"	e	enum:__anon18
-EPS_CONV_NORM	include/slepceps.h	/^               EPS_CONV_NORM,$/;"	e	enum:__anon18
-EPS_CONV_USER	include/slepceps.h	/^               EPS_CONV_USER } EPSConv;$/;"	e	enum:__anon18
-EPS_DAVIDSON	src/eps/impls/davidson/davidson.c	/^} EPS_DAVIDSON;$/;"	t	typeref:struct:__anon48	file:
-EPS_DIVERGED_BREAKDOWN	include/slepceps.h	/^              EPS_DIVERGED_BREAKDOWN           = -4,$/;"	e	enum:__anon19
-EPS_DIVERGED_ITS	include/slepceps.h	/^              EPS_DIVERGED_ITS                 = -3,$/;"	e	enum:__anon19
-EPS_DIVERGED_SYMMETRY_LOST	include/slepceps.h	/^              EPS_DIVERGED_SYMMETRY_LOST       = -5,$/;"	e	enum:__anon19
-EPS_ERROR_ABSOLUTE	include/slepceps.h	/^typedef enum { EPS_ERROR_ABSOLUTE,$/;"	e	enum:__anon17
-EPS_ERROR_BACKWARD	include/slepceps.h	/^               EPS_ERROR_BACKWARD } EPSErrorType;$/;"	e	enum:__anon17
-EPS_ERROR_RELATIVE	include/slepceps.h	/^               EPS_ERROR_RELATIVE,$/;"	e	enum:__anon17
-EPS_FEAST	src/eps/impls/external/feast/feastp.h	/^} EPS_FEAST;$/;"	t	typeref:struct:__anon65
-EPS_GHEP	include/slepceps.h	/^               EPS_GHEP,$/;"	e	enum:__anon13
-EPS_GHIEP	include/slepceps.h	/^               EPS_GHIEP } EPSProblemType;$/;"	e	enum:__anon13
-EPS_GNHEP	include/slepceps.h	/^               EPS_GNHEP,$/;"	e	enum:__anon13
-EPS_HARMONIC	include/slepceps.h	/^               EPS_HARMONIC,$/;"	e	enum:__anon14
-EPS_HARMONIC_LARGEST	include/slepceps.h	/^               EPS_HARMONIC_LARGEST,$/;"	e	enum:__anon14
-EPS_HARMONIC_RELATIVE	include/slepceps.h	/^               EPS_HARMONIC_RELATIVE,$/;"	e	enum:__anon14
-EPS_HARMONIC_RIGHT	include/slepceps.h	/^               EPS_HARMONIC_RIGHT,$/;"	e	enum:__anon14
-EPS_HEP	include/slepceps.h	/^typedef enum { EPS_HEP=1,$/;"	e	enum:__anon13
-EPS_KRYLOVSCHUR	src/eps/impls/krylov/krylovschur/krylovschur.h	/^} EPS_KRYLOVSCHUR;$/;"	t	typeref:struct:__anon69
-EPS_LANCZOS	src/eps/impls/krylov/lanczos/lanczos.c	/^} EPS_LANCZOS;$/;"	t	typeref:struct:__anon70	file:
-EPS_LANCZOS_REORTHOG_DELAYED	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;$/;"	e	enum:__anon21
-EPS_LANCZOS_REORTHOG_FULL	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_FULL,$/;"	e	enum:__anon21
-EPS_LANCZOS_REORTHOG_LOCAL	include/slepceps.h	/^typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,$/;"	e	enum:__anon21
-EPS_LANCZOS_REORTHOG_PARTIAL	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_PARTIAL,$/;"	e	enum:__anon21
-EPS_LANCZOS_REORTHOG_PERIODIC	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_PERIODIC,$/;"	e	enum:__anon21
-EPS_LANCZOS_REORTHOG_SELECTIVE	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_SELECTIVE,$/;"	e	enum:__anon21
-EPS_LARGEST_IMAGINARY	include/slepceps.h	/^               EPS_LARGEST_IMAGINARY,$/;"	e	enum:__anon15
-EPS_LARGEST_MAGNITUDE	include/slepceps.h	/^typedef enum { EPS_LARGEST_MAGNITUDE=1,$/;"	e	enum:__anon15
-EPS_LARGEST_REAL	include/slepceps.h	/^               EPS_LARGEST_REAL,$/;"	e	enum:__anon15
-EPS_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^} EPS_LOBPCG;$/;"	t	typeref:struct:__anon45	file:
-EPS_NHEP	include/slepceps.h	/^               EPS_NHEP,$/;"	e	enum:__anon13
-EPS_PGNHEP	include/slepceps.h	/^               EPS_PGNHEP,$/;"	e	enum:__anon13
-EPS_POWER	src/eps/impls/power/power.c	/^} EPS_POWER;$/;"	t	typeref:struct:__anon71	file:
-EPS_POWER_SHIFT_CONSTANT	include/slepceps.h	/^typedef enum { EPS_POWER_SHIFT_CONSTANT,$/;"	e	enum:__anon20
-EPS_POWER_SHIFT_RAYLEIGH	include/slepceps.h	/^               EPS_POWER_SHIFT_RAYLEIGH,$/;"	e	enum:__anon20
-EPS_POWER_SHIFT_WILKINSON	include/slepceps.h	/^               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;$/;"	e	enum:__anon20
-EPS_PRIMME	src/eps/impls/external/primme/primme.c	/^} EPS_PRIMME;$/;"	t	typeref:struct:__anon66	file:
-EPS_PRIMME_ARNOLDI	include/slepceps.h	/^               EPS_PRIMME_ARNOLDI,$/;"	e	enum:__anon22
-EPS_PRIMME_DEFAULT_MIN_MATVECS	include/slepceps.h	/^               EPS_PRIMME_DEFAULT_MIN_MATVECS,$/;"	e	enum:__anon22
-EPS_PRIMME_DEFAULT_MIN_TIME	include/slepceps.h	/^               EPS_PRIMME_DEFAULT_MIN_TIME,$/;"	e	enum:__anon22
-EPS_PRIMME_DYNAMIC	include/slepceps.h	/^typedef enum { EPS_PRIMME_DYNAMIC,$/;"	e	enum:__anon22
-EPS_PRIMME_GD	include/slepceps.h	/^               EPS_PRIMME_GD,$/;"	e	enum:__anon22
-EPS_PRIMME_GD_OLSEN_PLUSK	include/slepceps.h	/^               EPS_PRIMME_GD_OLSEN_PLUSK,$/;"	e	enum:__anon22
-EPS_PRIMME_GD_PLUSK	include/slepceps.h	/^               EPS_PRIMME_GD_PLUSK,$/;"	e	enum:__anon22
-EPS_PRIMME_JDQMR	include/slepceps.h	/^               EPS_PRIMME_JDQMR,$/;"	e	enum:__anon22
-EPS_PRIMME_JDQMR_ETOL	include/slepceps.h	/^               EPS_PRIMME_JDQMR_ETOL,$/;"	e	enum:__anon22
-EPS_PRIMME_JDQR	include/slepceps.h	/^               EPS_PRIMME_JDQR,$/;"	e	enum:__anon22
-EPS_PRIMME_JD_OLSEN_PLUSK	include/slepceps.h	/^               EPS_PRIMME_JD_OLSEN_PLUSK,$/;"	e	enum:__anon22
-EPS_PRIMME_LOBPCG_ORTHOBASIS	include/slepceps.h	/^               EPS_PRIMME_LOBPCG_ORTHOBASIS,$/;"	e	enum:__anon22
-EPS_PRIMME_LOBPCG_ORTHOBASISW	include/slepceps.h	/^               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;$/;"	e	enum:__anon22
-EPS_PRIMME_RQI	include/slepceps.h	/^               EPS_PRIMME_RQI,$/;"	e	enum:__anon22
-EPS_PRIMME_SUBSPACE_ITERATION	include/slepceps.h	/^               EPS_PRIMME_SUBSPACE_ITERATION,$/;"	e	enum:__anon22
-EPS_REFINED	include/slepceps.h	/^               EPS_REFINED,$/;"	e	enum:__anon14
-EPS_REFINED_HARMONIC	include/slepceps.h	/^               EPS_REFINED_HARMONIC } EPSExtraction;$/;"	e	enum:__anon14
-EPS_RITZ	include/slepceps.h	/^typedef enum { EPS_RITZ,$/;"	e	enum:__anon14
-EPS_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^} EPS_RQCG;$/;"	t	typeref:struct:__anon46	file:
-EPS_SMALLEST_IMAGINARY	include/slepceps.h	/^               EPS_SMALLEST_IMAGINARY,$/;"	e	enum:__anon15
-EPS_SMALLEST_MAGNITUDE	include/slepceps.h	/^               EPS_SMALLEST_MAGNITUDE,$/;"	e	enum:__anon15
-EPS_SMALLEST_REAL	include/slepceps.h	/^               EPS_SMALLEST_REAL,$/;"	e	enum:__anon15
-EPS_SR	src/eps/impls/krylov/krylovschur/krylovschur.h	/^typedef struct _n_SR  *EPS_SR;$/;"	t	typeref:struct:_n_SR
+EPS_CONVERGED_ITERATING	include/slepceps.h	/^              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;$/;"	e	enum:__anon22
+EPS_CONVERGED_TOL	include/slepceps.h	/^              EPS_CONVERGED_TOL                =  1,$/;"	e	enum:__anon22
+EPS_CONVERGED_USER	include/slepceps.h	/^              EPS_CONVERGED_USER               =  2,$/;"	e	enum:__anon22
+EPS_CONV_ABS	include/slepceps.h	/^typedef enum { EPS_CONV_ABS,$/;"	e	enum:__anon20
+EPS_CONV_NORM	include/slepceps.h	/^               EPS_CONV_NORM,$/;"	e	enum:__anon20
+EPS_CONV_REL	include/slepceps.h	/^               EPS_CONV_REL,$/;"	e	enum:__anon20
+EPS_CONV_USER	include/slepceps.h	/^               EPS_CONV_USER } EPSConv;$/;"	e	enum:__anon20
+EPS_DAVIDSON	src/eps/impls/davidson/davidson.h	/^} EPS_DAVIDSON;$/;"	t	typeref:struct:__anon65
+EPS_DIVERGED_BREAKDOWN	include/slepceps.h	/^              EPS_DIVERGED_BREAKDOWN           = -2,$/;"	e	enum:__anon22
+EPS_DIVERGED_ITS	include/slepceps.h	/^              EPS_DIVERGED_ITS                 = -1,$/;"	e	enum:__anon22
+EPS_DIVERGED_SYMMETRY_LOST	include/slepceps.h	/^              EPS_DIVERGED_SYMMETRY_LOST       = -3,$/;"	e	enum:__anon22
+EPS_ERROR_ABSOLUTE	include/slepceps.h	/^typedef enum { EPS_ERROR_ABSOLUTE,$/;"	e	enum:__anon19
+EPS_ERROR_BACKWARD	include/slepceps.h	/^               EPS_ERROR_BACKWARD } EPSErrorType;$/;"	e	enum:__anon19
+EPS_ERROR_RELATIVE	include/slepceps.h	/^               EPS_ERROR_RELATIVE,$/;"	e	enum:__anon19
+EPS_FEAST	src/eps/impls/external/feast/feastp.h	/^} EPS_FEAST;$/;"	t	typeref:struct:__anon77
+EPS_GHEP	include/slepceps.h	/^               EPS_GHEP,$/;"	e	enum:__anon15
+EPS_GHIEP	include/slepceps.h	/^               EPS_GHIEP } EPSProblemType;$/;"	e	enum:__anon15
+EPS_GNHEP	include/slepceps.h	/^               EPS_GNHEP,$/;"	e	enum:__anon15
+EPS_HARMONIC	include/slepceps.h	/^               EPS_HARMONIC,$/;"	e	enum:__anon16
+EPS_HARMONIC_LARGEST	include/slepceps.h	/^               EPS_HARMONIC_LARGEST,$/;"	e	enum:__anon16
+EPS_HARMONIC_RELATIVE	include/slepceps.h	/^               EPS_HARMONIC_RELATIVE,$/;"	e	enum:__anon16
+EPS_HARMONIC_RIGHT	include/slepceps.h	/^               EPS_HARMONIC_RIGHT,$/;"	e	enum:__anon16
+EPS_HEP	include/slepceps.h	/^typedef enum { EPS_HEP=1,$/;"	e	enum:__anon15
+EPS_KRYLOVSCHUR	src/eps/impls/krylov/krylovschur/krylovschur.h	/^} EPS_KRYLOVSCHUR;$/;"	t	typeref:struct:__anon81
+EPS_LANCZOS	src/eps/impls/krylov/lanczos/lanczos.c	/^} EPS_LANCZOS;$/;"	t	typeref:struct:__anon82	file:
+EPS_LANCZOS_REORTHOG_DELAYED	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;$/;"	e	enum:__anon24
+EPS_LANCZOS_REORTHOG_FULL	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_FULL,$/;"	e	enum:__anon24
+EPS_LANCZOS_REORTHOG_LOCAL	include/slepceps.h	/^typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,$/;"	e	enum:__anon24
+EPS_LANCZOS_REORTHOG_PARTIAL	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_PARTIAL,$/;"	e	enum:__anon24
+EPS_LANCZOS_REORTHOG_PERIODIC	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_PERIODIC,$/;"	e	enum:__anon24
+EPS_LANCZOS_REORTHOG_SELECTIVE	include/slepceps.h	/^               EPS_LANCZOS_REORTHOG_SELECTIVE,$/;"	e	enum:__anon24
+EPS_LARGEST_IMAGINARY	include/slepceps.h	/^               EPS_LARGEST_IMAGINARY,$/;"	e	enum:__anon17
+EPS_LARGEST_MAGNITUDE	include/slepceps.h	/^typedef enum { EPS_LARGEST_MAGNITUDE=1,$/;"	e	enum:__anon17
+EPS_LARGEST_REAL	include/slepceps.h	/^               EPS_LARGEST_REAL,$/;"	e	enum:__anon17
+EPS_LOBPCG	src/eps/impls/cg/lobpcg/lobpcg.c	/^} EPS_LOBPCG;$/;"	t	typeref:struct:__anon59	file:
+EPS_NHEP	include/slepceps.h	/^               EPS_NHEP,$/;"	e	enum:__anon15
+EPS_PGNHEP	include/slepceps.h	/^               EPS_PGNHEP,$/;"	e	enum:__anon15
+EPS_POWER	src/eps/impls/power/power.c	/^} EPS_POWER;$/;"	t	typeref:struct:__anon83	file:
+EPS_POWER_SHIFT_CONSTANT	include/slepceps.h	/^typedef enum { EPS_POWER_SHIFT_CONSTANT,$/;"	e	enum:__anon23
+EPS_POWER_SHIFT_RAYLEIGH	include/slepceps.h	/^               EPS_POWER_SHIFT_RAYLEIGH,$/;"	e	enum:__anon23
+EPS_POWER_SHIFT_WILKINSON	include/slepceps.h	/^               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;$/;"	e	enum:__anon23
+EPS_PRIMME	src/eps/impls/external/primme/primme.c	/^} EPS_PRIMME;$/;"	t	typeref:struct:__anon78	file:
+EPS_PRIMME_ARNOLDI	include/slepceps.h	/^               EPS_PRIMME_ARNOLDI,$/;"	e	enum:__anon25
+EPS_PRIMME_DEFAULT_MIN_MATVECS	include/slepceps.h	/^               EPS_PRIMME_DEFAULT_MIN_MATVECS,$/;"	e	enum:__anon25
+EPS_PRIMME_DEFAULT_MIN_TIME	include/slepceps.h	/^               EPS_PRIMME_DEFAULT_MIN_TIME,$/;"	e	enum:__anon25
+EPS_PRIMME_DYNAMIC	include/slepceps.h	/^typedef enum { EPS_PRIMME_DYNAMIC,$/;"	e	enum:__anon25
+EPS_PRIMME_GD	include/slepceps.h	/^               EPS_PRIMME_GD,$/;"	e	enum:__anon25
+EPS_PRIMME_GD_OLSEN_PLUSK	include/slepceps.h	/^               EPS_PRIMME_GD_OLSEN_PLUSK,$/;"	e	enum:__anon25
+EPS_PRIMME_GD_PLUSK	include/slepceps.h	/^               EPS_PRIMME_GD_PLUSK,$/;"	e	enum:__anon25
+EPS_PRIMME_JDQMR	include/slepceps.h	/^               EPS_PRIMME_JDQMR,$/;"	e	enum:__anon25
+EPS_PRIMME_JDQMR_ETOL	include/slepceps.h	/^               EPS_PRIMME_JDQMR_ETOL,$/;"	e	enum:__anon25
+EPS_PRIMME_JDQR	include/slepceps.h	/^               EPS_PRIMME_JDQR,$/;"	e	enum:__anon25
+EPS_PRIMME_JD_OLSEN_PLUSK	include/slepceps.h	/^               EPS_PRIMME_JD_OLSEN_PLUSK,$/;"	e	enum:__anon25
+EPS_PRIMME_LOBPCG_ORTHOBASIS	include/slepceps.h	/^               EPS_PRIMME_LOBPCG_ORTHOBASIS,$/;"	e	enum:__anon25
+EPS_PRIMME_LOBPCG_ORTHOBASISW	include/slepceps.h	/^               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;$/;"	e	enum:__anon25
+EPS_PRIMME_RQI	include/slepceps.h	/^               EPS_PRIMME_RQI,$/;"	e	enum:__anon25
+EPS_PRIMME_SUBSPACE_ITERATION	include/slepceps.h	/^               EPS_PRIMME_SUBSPACE_ITERATION,$/;"	e	enum:__anon25
+EPS_REFINED	include/slepceps.h	/^               EPS_REFINED,$/;"	e	enum:__anon16
+EPS_REFINED_HARMONIC	include/slepceps.h	/^               EPS_REFINED_HARMONIC } EPSExtraction;$/;"	e	enum:__anon16
+EPS_RITZ	include/slepceps.h	/^typedef enum { EPS_RITZ,$/;"	e	enum:__anon16
+EPS_RQCG	src/eps/impls/cg/rqcg/rqcg.c	/^} EPS_RQCG;$/;"	t	typeref:struct:__anon60	file:
+EPS_SMALLEST_IMAGINARY	include/slepceps.h	/^               EPS_SMALLEST_IMAGINARY,$/;"	e	enum:__anon17
+EPS_SMALLEST_MAGNITUDE	include/slepceps.h	/^               EPS_SMALLEST_MAGNITUDE,$/;"	e	enum:__anon17
+EPS_SMALLEST_REAL	include/slepceps.h	/^               EPS_SMALLEST_REAL,$/;"	e	enum:__anon17
+EPS_SR	src/eps/impls/krylov/krylovschur/krylovschur.h	/^typedef struct _n_SR *EPS_SR;$/;"	t	typeref:struct:_n_SR
 EPS_STATE_EIGENVECTORS	include/slepc/private/epsimpl.h	/^               EPS_STATE_EIGENVECTORS } EPSStateType;$/;"	e	enum:__anon1
 EPS_STATE_INITIAL	include/slepc/private/epsimpl.h	/^typedef enum { EPS_STATE_INITIAL,$/;"	e	enum:__anon1
 EPS_STATE_SETUP	include/slepc/private/epsimpl.h	/^               EPS_STATE_SETUP,$/;"	e	enum:__anon1
 EPS_STATE_SOLVED	include/slepc/private/epsimpl.h	/^               EPS_STATE_SOLVED,$/;"	e	enum:__anon1
+EPS_STOP_BASIC	include/slepceps.h	/^typedef enum { EPS_STOP_BASIC,$/;"	e	enum:__anon21
+EPS_STOP_USER	include/slepceps.h	/^               EPS_STOP_USER } EPSStop;$/;"	e	enum:__anon21
 EPS_SetInnerProduct	include/slepc/private/epsimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode EPS_SetInnerProduct(EPS eps)$/;"	f
 EPS_SetUp	include/slepc/private/epsimpl.h	/^PETSC_EXTERN PetscLogEvent EPS_SetUp,EPS_Solve;$/;"	v
 EPS_SetUp	src/eps/interface/epsbasic.c	/^PetscLogEvent     EPS_SetUp = 0,EPS_Solve = 0;$/;"	v
 EPS_Solve	include/slepc/private/epsimpl.h	/^PETSC_EXTERN PetscLogEvent EPS_SetUp,EPS_Solve;$/;"	v
 EPS_Solve	src/eps/interface/epsbasic.c	/^PetscLogEvent     EPS_SetUp = 0,EPS_Solve = 0;$/;"	v
-EPS_TARGET_IMAGINARY	include/slepceps.h	/^               EPS_TARGET_IMAGINARY,$/;"	e	enum:__anon15
-EPS_TARGET_MAGNITUDE	include/slepceps.h	/^               EPS_TARGET_MAGNITUDE,$/;"	e	enum:__anon15
-EPS_TARGET_REAL	include/slepceps.h	/^               EPS_TARGET_REAL,$/;"	e	enum:__anon15
-EPS_TRLAN	src/eps/impls/external/trlan/trlanp.h	/^} EPS_TRLAN;$/;"	t	typeref:struct:__anon67
-EPS_WHICH_USER	include/slepceps.h	/^               EPS_WHICH_USER } EPSWhich;$/;"	e	enum:__anon15
+EPS_TARGET_IMAGINARY	include/slepceps.h	/^               EPS_TARGET_IMAGINARY,$/;"	e	enum:__anon17
+EPS_TARGET_MAGNITUDE	include/slepceps.h	/^               EPS_TARGET_MAGNITUDE,$/;"	e	enum:__anon17
+EPS_TARGET_REAL	include/slepceps.h	/^               EPS_TARGET_REAL,$/;"	e	enum:__anon17
+EPS_TRLAN	src/eps/impls/external/trlan/trlanp.h	/^} EPS_TRLAN;$/;"	t	typeref:struct:__anon79
+EPS_WHICH_USER	include/slepceps.h	/^               EPS_WHICH_USER } EPSWhich;$/;"	e	enum:__anon17
 EPS_shift	src/eps/impls/krylov/krylovschur/krylovschur.h	/^typedef struct _n_shift *EPS_shift;$/;"	t	typeref:struct:_n_shift
 EPType_t	include/slepc/private/vecimplslepc.h	/^typedef PetscInt EPType_t;$/;"	t
 EXAMPLESC	src/eps/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c \\$/;"	m
 EXAMPLESC	src/eps/examples/tutorials/makefile	/^EXAMPLESC  = ex1.c ex2.c ex3.c ex4.c ex5.c ex7.c ex9.c ex10.c ex11.c ex12.c ex13.c \\$/;"	m
-EXAMPLESC	src/mfn/examples/tests/makefile	/^EXAMPLESC  =$/;"	m
-EXAMPLESC	src/mfn/examples/tutorials/makefile	/^EXAMPLESC  = ex23.c$/;"	m
-EXAMPLESC	src/nep/examples/nlevp/makefile	/^EXAMPLESC  = loaded_string.c$/;"	m
+EXAMPLESC	src/mfn/examples/tests/makefile	/^EXAMPLESC  = test1.c$/;"	m
+EXAMPLESC	src/mfn/examples/tutorials/makefile	/^EXAMPLESC  = ex23.c ex26.c$/;"	m
+EXAMPLESC	src/nep/examples/nlevp/makefile	/^EXAMPLESC  = loaded_string.c gun.c$/;"	m
 EXAMPLESC	src/nep/examples/tests/makefile	/^EXAMPLESC  =$/;"	m
-EXAMPLESC	src/nep/examples/tutorials/makefile	/^EXAMPLESC  = ex20.c ex21.c ex22.c$/;"	m
+EXAMPLESC	src/nep/examples/tutorials/makefile	/^EXAMPLESC  = ex20.c ex21.c ex22.c ex27.c$/;"	m
 EXAMPLESC	src/pep/examples/nlevp/makefile	/^EXAMPLESC  = acoustic_wave_1d.c acoustic_wave_2d.c butterfly.c damped_beam.c \\$/;"	m
-EXAMPLESC	src/pep/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c$/;"	m
-EXAMPLESC	src/pep/examples/tutorials/makefile	/^EXAMPLESC  = ex16.c ex17.c$/;"	m
+EXAMPLESC	src/pep/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c$/;"	m
+EXAMPLESC	src/pep/examples/tutorials/makefile	/^EXAMPLESC  = ex16.c ex17.c ex28.c$/;"	m
 EXAMPLESC	src/svd/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c$/;"	m
 EXAMPLESC	src/svd/examples/tutorials/makefile	/^EXAMPLESC  = ex8.c ex14.c ex15.c$/;"	m
-EXAMPLESC	src/sys/classes/bv/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c$/;"	m
+EXAMPLESC	src/sys/classes/bv/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c test12.c$/;"	m
 EXAMPLESC	src/sys/classes/ds/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c \\$/;"	m
-EXAMPLESC	src/sys/classes/fn/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c$/;"	m
+EXAMPLESC	src/sys/classes/fn/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c$/;"	m
 EXAMPLESC	src/sys/classes/rg/examples/tests/makefile	/^EXAMPLESC  = test1.c$/;"	m
 EXAMPLESC	src/sys/classes/st/examples/tests/makefile	/^EXAMPLESC  = test1.c test2.c test3.c test4.c$/;"	m
 EXAMPLESF	src/eps/examples/tests/makefile	/^EXAMPLESF  = test7f.F test14f.F test15f.F$/;"	m
@@ -1595,7 +1684,7 @@ EXAMPLESF	src/nep/examples/nlevp/makefile	/^EXAMPLESF  = $/;"	m
 EXAMPLESF	src/nep/examples/tests/makefile	/^EXAMPLESF  =$/;"	m
 EXAMPLESF	src/nep/examples/tutorials/makefile	/^EXAMPLESF  =$/;"	m
 EXAMPLESF	src/pep/examples/nlevp/makefile	/^EXAMPLESF  = $/;"	m
-EXAMPLESF	src/pep/examples/tests/makefile	/^EXAMPLESF  =$/;"	m
+EXAMPLESF	src/pep/examples/tests/makefile	/^EXAMPLESF  = test3f.F$/;"	m
 EXAMPLESF	src/pep/examples/tutorials/makefile	/^EXAMPLESF  = ex16f90.F90$/;"	m
 EXAMPLESF	src/svd/examples/tests/makefile	/^EXAMPLESF  =$/;"	m
 EXAMPLESF	src/svd/examples/tutorials/makefile	/^EXAMPLESF  = ex15f.F$/;"	m
@@ -1604,10 +1693,10 @@ EXAMPLESF	src/sys/classes/ds/examples/tests/makefile	/^EXAMPLESF  = test14f.F$/;
 EXAMPLESF	src/sys/classes/fn/examples/tests/makefile	/^EXAMPLESF  =$/;"	m
 EXAMPLESF	src/sys/classes/rg/examples/tests/makefile	/^EXAMPLESF  =$/;"	m
 EXAMPLESF	src/sys/classes/st/examples/tests/makefile	/^EXAMPLESF  =$/;"	m
-EXLEN	src/eps/interface/epsview.c	356;"	d	file:
-EXLEN	src/nep/interface/nepview.c	292;"	d	file:
-EXLEN	src/pep/interface/pepview.c	351;"	d	file:
-EXLEN	src/svd/interface/svdview.c	224;"	d	file:
+EXLEN	src/eps/interface/epsview.c	371;"	d	file:
+EXLEN	src/nep/interface/nepview.c	325;"	d	file:
+EXLEN	src/pep/interface/pepview.c	345;"	d	file:
+EXLEN	src/svd/interface/svdview.c	235;"	d	file:
 ErrorIfNotEmpty	config/argdb.py	/^  def ErrorIfNotEmpty(self):$/;"	m	class:ArgDB
 EstimateNumberEigs	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode EstimateNumberEigs(EPS eps,PetscInt *L_add)$/;"	f	file:
 EstimateNumberEigs	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode EstimateNumberEigs(NEP nep,PetscInt *L_add)$/;"	f	file:
@@ -1646,6 +1735,7 @@ FFLAGS	src/eps/interface/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/mfn/examples/tests/makefile	/^FFLAGS     =$/;"	m
 FFLAGS	src/mfn/examples/tutorials/makefile	/^FFLAGS     =$/;"	m
 FFLAGS	src/mfn/f90-mod/makefile	/^FFLAGS     =$/;"	m
+FFLAGS	src/mfn/impls/expokit/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/mfn/impls/krylov/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/mfn/interface/ftn-custom/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/mfn/interface/makefile	/^FFLAGS   =$/;"	m
@@ -1656,6 +1746,7 @@ FFLAGS	src/nep/f90-mod/makefile	/^FFLAGS     =$/;"	m
 FFLAGS	src/nep/impls/ciss/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/nep/impls/interpol/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/nep/impls/narnoldi/makefile	/^FFLAGS   =$/;"	m
+FFLAGS	src/nep/impls/nleigs/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/nep/impls/rii/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/nep/impls/slp/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/nep/interface/ftn-custom/makefile	/^FFLAGS   =$/;"	m
@@ -1704,7 +1795,9 @@ FFLAGS	src/sys/classes/ds/interface/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/sys/classes/fn/examples/tests/makefile	/^FFLAGS     =$/;"	m
 FFLAGS	src/sys/classes/fn/impls/combine/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/sys/classes/fn/impls/exp/makefile	/^FFLAGS   =$/;"	m
+FFLAGS	src/sys/classes/fn/impls/invsqrt/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/sys/classes/fn/impls/log/makefile	/^FFLAGS   =$/;"	m
+FFLAGS	src/sys/classes/fn/impls/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/sys/classes/fn/impls/phi/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/sys/classes/fn/impls/rational/makefile	/^FFLAGS   =$/;"	m
 FFLAGS	src/sys/classes/fn/impls/sqrt/makefile	/^FFLAGS   =$/;"	m
@@ -1741,10 +1834,11 @@ FNCombineGetChildren_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^stat
 FNCombineSetChildren	src/sys/classes/fn/impls/combine/fncombine.c	/^PetscErrorCode FNCombineSetChildren(FN fn,FNCombineType comb,FN f1,FN f2)$/;"	f
 FNCombineSetChildren_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^static PetscErrorCode FNCombineSetChildren_Combine(FN fn,FNCombineType comb,FN f1,FN f2)$/;"	f	file:
 FNCombineType	include/slepc/finclude/slepcfndef.h	31;"	d
-FNCombineType	include/slepcfn.h	/^               FN_COMBINE_COMPOSE } FNCombineType;$/;"	t	typeref:enum:__anon23
+FNCombineType	include/slepcfn.h	/^               FN_COMBINE_COMPOSE } FNCombineType;$/;"	t	typeref:enum:__anon28
 FNCreate	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNCreate(MPI_Comm comm,FN *newfn)$/;"	f
 FNCreate_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^PETSC_EXTERN PetscErrorCode FNCreate_Combine(FN fn)$/;"	f
 FNCreate_Exp	src/sys/classes/fn/impls/exp/fnexp.c	/^PETSC_EXTERN PetscErrorCode FNCreate_Exp(FN fn)$/;"	f
+FNCreate_Invsqrt	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	/^PETSC_EXTERN PetscErrorCode FNCreate_Invsqrt(FN fn)$/;"	f
 FNCreate_Log	src/sys/classes/fn/impls/log/fnlog.c	/^PETSC_EXTERN PetscErrorCode FNCreate_Log(FN fn)$/;"	f
 FNCreate_Phi	src/sys/classes/fn/impls/phi/fnphi.c	/^PETSC_EXTERN PetscErrorCode FNCreate_Phi(FN fn)$/;"	f
 FNCreate_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PETSC_EXTERN PetscErrorCode FNCreate_Rational(FN fn)$/;"	f
@@ -1762,18 +1856,31 @@ FNEXP	include/slepcfn.h	46;"	d
 FNEvaluateDerivative	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNEvaluateDerivative(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateDerivative_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^PetscErrorCode FNEvaluateDerivative_Combine(FN fn,PetscScalar x,PetscScalar *yp)$/;"	f
 FNEvaluateDerivative_Exp	src/sys/classes/fn/impls/exp/fnexp.c	/^PetscErrorCode FNEvaluateDerivative_Exp(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
+FNEvaluateDerivative_Invsqrt	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	/^PetscErrorCode FNEvaluateDerivative_Invsqrt(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateDerivative_Log	src/sys/classes/fn/impls/log/fnlog.c	/^PetscErrorCode FNEvaluateDerivative_Log(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateDerivative_Phi	src/sys/classes/fn/impls/phi/fnphi.c	/^PetscErrorCode FNEvaluateDerivative_Phi(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateDerivative_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNEvaluateDerivative_Rational(FN fn,PetscScalar x,PetscScalar *yp)$/;"	f
 FNEvaluateDerivative_Sqrt	src/sys/classes/fn/impls/sqrt/fnsqrt.c	/^PetscErrorCode FNEvaluateDerivative_Sqrt(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateFunction	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNEvaluateFunction(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateFunctionMat	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNEvaluateFunctionMat(FN fn,Mat A,Mat B)$/;"	f
+FNEvaluateFunctionMatVec	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNEvaluateFunctionMatVec(FN fn,Mat A,Vec v)$/;"	f
+FNEvaluateFunctionMatVec_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^PetscErrorCode FNEvaluateFunctionMatVec_Combine(FN fn,Mat A,Vec v)$/;"	f
+FNEvaluateFunctionMatVec_Default	src/sys/classes/fn/interface/fnbasic.c	/^static PetscErrorCode FNEvaluateFunctionMatVec_Default(FN fn,Mat A,Vec v)$/;"	f	file:
+FNEvaluateFunctionMatVec_Invsqrt	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	/^PetscErrorCode FNEvaluateFunctionMatVec_Invsqrt(FN fn,Mat A,Vec v)$/;"	f
+FNEvaluateFunctionMatVec_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNEvaluateFunctionMatVec_Rational(FN fn,Mat A,Vec v)$/;"	f
+FNEvaluateFunctionMatVec_Sqrt	src/sys/classes/fn/impls/sqrt/fnsqrt.c	/^PetscErrorCode FNEvaluateFunctionMatVec_Sqrt(FN fn,Mat A,Vec v)$/;"	f
+FNEvaluateFunctionMatVec_Sym_Default	src/sys/classes/fn/interface/fnbasic.c	/^static PetscErrorCode FNEvaluateFunctionMatVec_Sym_Default(FN fn,Mat A,Vec v)$/;"	f	file:
 FNEvaluateFunctionMat_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^PetscErrorCode FNEvaluateFunctionMat_Combine(FN fn,Mat A,Mat B)$/;"	f
 FNEvaluateFunctionMat_Exp	src/sys/classes/fn/impls/exp/fnexp.c	/^PetscErrorCode FNEvaluateFunctionMat_Exp(FN fn,Mat A,Mat B)$/;"	f
+FNEvaluateFunctionMat_Invsqrt	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	/^PetscErrorCode FNEvaluateFunctionMat_Invsqrt(FN fn,Mat A,Mat B)$/;"	f
+FNEvaluateFunctionMat_Private	src/sys/classes/fn/impls/rational/fnrational.c	/^static PetscErrorCode FNEvaluateFunctionMat_Private(FN fn,PetscScalar *Aa,PetscScalar *Ba,PetscInt m,PetscBool firstonly)$/;"	f	file:
 FNEvaluateFunctionMat_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)$/;"	f
+FNEvaluateFunctionMat_Sqrt	src/sys/classes/fn/impls/sqrt/fnsqrt.c	/^PetscErrorCode FNEvaluateFunctionMat_Sqrt(FN fn,Mat A,Mat B)$/;"	f
 FNEvaluateFunctionMat_Sym_Default	src/sys/classes/fn/interface/fnbasic.c	/^static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)$/;"	f	file:
+FNEvaluateFunctionMat_Sym_Private	src/sys/classes/fn/interface/fnbasic.c	/^static PetscErrorCode FNEvaluateFunctionMat_Sym_Private(FN fn,PetscScalar *As,PetscScalar *Bs,PetscInt m,PetscBool firstonly)$/;"	f	file:
 FNEvaluateFunction_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^PetscErrorCode FNEvaluateFunction_Combine(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateFunction_Exp	src/sys/classes/fn/impls/exp/fnexp.c	/^PetscErrorCode FNEvaluateFunction_Exp(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
+FNEvaluateFunction_Invsqrt	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	/^PetscErrorCode FNEvaluateFunction_Invsqrt(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateFunction_Log	src/sys/classes/fn/impls/log/fnlog.c	/^PetscErrorCode FNEvaluateFunction_Log(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateFunction_Phi	src/sys/classes/fn/impls/phi/fnphi.c	/^PetscErrorCode FNEvaluateFunction_Phi(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
 FNEvaluateFunction_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNEvaluateFunction_Rational(FN fn,PetscScalar x,PetscScalar *y)$/;"	f
@@ -1782,6 +1889,8 @@ FNFinalizePackage	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNFina
 FNGetOptionsPrefix	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNGetOptionsPrefix(FN fn,const char *prefix[])$/;"	f
 FNGetScale	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNGetScale(FN fn,PetscScalar *alpha,PetscScalar *beta)$/;"	f
 FNGetType	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNGetType(FN fn,FNType *type)$/;"	f
+FNINVSQRT	include/slepc/finclude/slepcfndef.h	39;"	d
+FNINVSQRT	include/slepcfn.h	50;"	d
 FNInitializePackage	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNInitializePackage(void)$/;"	f
 FNLOG	include/slepc/finclude/slepcfndef.h	36;"	d
 FNLOG	include/slepcfn.h	47;"	d
@@ -1812,8 +1921,8 @@ FNRegisterAllCalled	src/sys/classes/fn/interface/fnbasic.c	/^PetscBool         F
 FNSQRT	include/slepc/finclude/slepcfndef.h	38;"	d
 FNSQRT	include/slepcfn.h	49;"	d
 FNSetFromOptions	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNSetFromOptions(FN fn)$/;"	f
-FNSetFromOptions_Phi	src/sys/classes/fn/impls/phi/fnphi.c	/^PetscErrorCode FNSetFromOptions_Phi(PetscOptions *PetscOptionsObject,FN fn)$/;"	f
-FNSetFromOptions_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNSetFromOptions_Rational(PetscOptions *PetscOptionsObject,FN fn)$/;"	f
+FNSetFromOptions_Phi	src/sys/classes/fn/impls/phi/fnphi.c	/^PetscErrorCode FNSetFromOptions_Phi(PetscOptionItems *PetscOptionsObject,FN fn)$/;"	f
+FNSetFromOptions_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNSetFromOptions_Rational(PetscOptionItems *PetscOptionsObject,FN fn)$/;"	f
 FNSetOptionsPrefix	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNSetOptionsPrefix(FN fn,const char *prefix)$/;"	f
 FNSetScale	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNSetScale(FN fn,PetscScalar alpha,PetscScalar beta)$/;"	f
 FNSetType	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNSetType(FN fn,FNType type)$/;"	f
@@ -1822,22 +1931,25 @@ FNType	include/slepcfn.h	/^typedef const char* FNType;$/;"	t
 FNView	src/sys/classes/fn/interface/fnbasic.c	/^PetscErrorCode FNView(FN fn,PetscViewer viewer)$/;"	f
 FNView_Combine	src/sys/classes/fn/impls/combine/fncombine.c	/^PetscErrorCode FNView_Combine(FN fn,PetscViewer viewer)$/;"	f
 FNView_Exp	src/sys/classes/fn/impls/exp/fnexp.c	/^PetscErrorCode FNView_Exp(FN fn,PetscViewer viewer)$/;"	f
+FNView_Invsqrt	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	/^PetscErrorCode FNView_Invsqrt(FN fn,PetscViewer viewer)$/;"	f
 FNView_Log	src/sys/classes/fn/impls/log/fnlog.c	/^PetscErrorCode FNView_Log(FN fn,PetscViewer viewer)$/;"	f
 FNView_Phi	src/sys/classes/fn/impls/phi/fnphi.c	/^PetscErrorCode FNView_Phi(FN fn,PetscViewer viewer)$/;"	f
 FNView_Rational	src/sys/classes/fn/impls/rational/fnrational.c	/^PetscErrorCode FNView_Rational(FN fn,PetscViewer viewer)$/;"	f
 FNView_Sqrt	src/sys/classes/fn/impls/sqrt/fnsqrt.c	/^PetscErrorCode FNView_Sqrt(FN fn,PetscViewer viewer)$/;"	f
-FN_AllocateWorkMat	include/slepc/private/fnimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(FN fn,Mat A)$/;"	f
+FN_AllocateWorkMat	include/slepc/private/fnimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(FN fn,Mat A,Mat *M)$/;"	f
 FN_CLASSID	include/slepcfn.h	/^PETSC_EXTERN PetscClassId FN_CLASSID;$/;"	v
 FN_CLASSID	src/sys/classes/fn/interface/fnbasic.c	/^PetscClassId      FN_CLASSID = 0;$/;"	v
-FN_COMBINE	src/sys/classes/fn/impls/combine/fncombine.c	/^} FN_COMBINE;$/;"	t	typeref:struct:__anon102	file:
-FN_COMBINE_ADD	include/slepcfn.h	/^typedef enum { FN_COMBINE_ADD,$/;"	e	enum:__anon23
-FN_COMBINE_COMPOSE	include/slepcfn.h	/^               FN_COMBINE_COMPOSE } FNCombineType;$/;"	e	enum:__anon23
-FN_COMBINE_DIVIDE	include/slepcfn.h	/^               FN_COMBINE_DIVIDE,$/;"	e	enum:__anon23
-FN_COMBINE_MULTIPLY	include/slepcfn.h	/^               FN_COMBINE_MULTIPLY,$/;"	e	enum:__anon23
+FN_COMBINE	src/sys/classes/fn/impls/combine/fncombine.c	/^} FN_COMBINE;$/;"	t	typeref:struct:__anon121	file:
+FN_COMBINE_ADD	include/slepcfn.h	/^typedef enum { FN_COMBINE_ADD,$/;"	e	enum:__anon28
+FN_COMBINE_COMPOSE	include/slepcfn.h	/^               FN_COMBINE_COMPOSE } FNCombineType;$/;"	e	enum:__anon28
+FN_COMBINE_DIVIDE	include/slepcfn.h	/^               FN_COMBINE_DIVIDE,$/;"	e	enum:__anon28
+FN_COMBINE_MULTIPLY	include/slepcfn.h	/^               FN_COMBINE_MULTIPLY,$/;"	e	enum:__anon28
 FN_Evaluate	include/slepc/private/fnimpl.h	/^PETSC_EXTERN PetscLogEvent FN_Evaluate;$/;"	v
 FN_Evaluate	src/sys/classes/fn/interface/fnbasic.c	/^PetscLogEvent     FN_Evaluate = 0;$/;"	v
-FN_PHI	src/sys/classes/fn/impls/phi/fnphi.c	/^} FN_PHI;$/;"	t	typeref:struct:__anon103	file:
-FN_RATIONAL	src/sys/classes/fn/impls/rational/fnrational.c	/^} FN_RATIONAL;$/;"	t	typeref:struct:__anon104	file:
+FN_FreeWorkMat	include/slepc/private/fnimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode FN_FreeWorkMat(FN fn,Mat *M)$/;"	f
+FN_MAX_W	include/slepc/private/fnimpl.h	47;"	d
+FN_PHI	src/sys/classes/fn/impls/phi/fnphi.c	/^} FN_PHI;$/;"	t	typeref:struct:__anon122	file:
+FN_RATIONAL	src/sys/classes/fn/impls/rational/fnrational.c	/^} FN_RATIONAL;$/;"	t	typeref:struct:__anon123	file:
 FPPFLAGS	src/eps/examples/tests/makefile	/^FPPFLAGS   =$/;"	m
 FPPFLAGS	src/eps/examples/tutorials/makefile	/^FPPFLAGS   =$/;"	m
 FPPFLAGS	src/mfn/examples/tests/makefile	/^FPPFLAGS   =$/;"	m
@@ -1855,7 +1967,9 @@ FPPFLAGS	src/sys/classes/ds/examples/tests/makefile	/^FPPFLAGS   =$/;"	m
 FPPFLAGS	src/sys/classes/fn/examples/tests/makefile	/^FPPFLAGS   =$/;"	m
 FPPFLAGS	src/sys/classes/rg/examples/tests/makefile	/^FPPFLAGS   =$/;"	m
 FPPFLAGS	src/sys/classes/st/examples/tests/makefile	/^FPPFLAGS   =$/;"	m
-FSubctx	src/pep/impls/krylov/toar/nrefine.c	/^} FSubctx;$/;"	t	typeref:struct:__anon86	file:
+FSubctx	src/nep/interface/neprefine.c	/^} FSubctx;$/;"	t	typeref:struct:__anon98	file:
+FSubctx	src/pep/impls/krylov/toar/nrefine.c	/^} FSubctx;$/;"	t	typeref:struct:__anon104	file:
+FSubctx	src/pep/interface/peprefine.c	/^} FSubctx;$/;"	t	typeref:struct:__anon109	file:
 Feast	config/packages/feast.py	/^class Feast(package.Package):$/;"	c
 FillMatrix	src/eps/examples/tutorials/ex19.c	/^PetscErrorCode FillMatrix(DM da,Mat A)$/;"	f
 FillUpMatrix	src/sys/classes/ds/examples/tests/test14f.F	/^      subroutine FillUpMatrix(/;"	s
@@ -1865,17 +1979,20 @@ FixFile	bin/maint/generatefortranstubs.py	/^def FixFile(filename):$/;"	f
 FixSign	src/nep/examples/tutorials/ex20.c	/^PetscErrorCode FixSign(Vec x)$/;"	f
 FormFunction	src/nep/examples/tutorials/ex20.c	/^PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)$/;"	f
 FormFunction	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)$/;"	f
+FormFunction	src/nep/examples/tutorials/ex27.c	/^PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)$/;"	f
 FormInitialGuess	src/nep/examples/tutorials/ex20.c	/^PetscErrorCode FormInitialGuess(Vec x)$/;"	f
 FormInitialGuess	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode FormInitialGuess(Vec x)$/;"	f
 FormJacobian	src/nep/examples/tutorials/ex20.c	/^PetscErrorCode FormJacobian(NEP nep,PetscScalar lambda,Mat jac,void *ctx)$/;"	f
 FormJacobian	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode FormJacobian(NEP nep,PetscScalar lambda,Mat jac,void *ctx)$/;"	f
 FortranLib	config/package.py	/^  def FortranLib(self,conf,vars,cmake,dirs,libs,functions,callbacks = []):$/;"	m	class:Package
 FortranLink	config/package.py	/^  def FortranLink(self,functions,callbacks,flags):$/;"	m	class:Package
-G	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon46	file:
+Functions	config/packages/arpack.py	/^  def Functions(self,petsc):$/;"	m	class:Arpack
+G	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon60	file:
 G	src/eps/impls/davidson/davidson.h	/^  Mat       H,G;               \/* projected problem matrices *\/$/;"	m	struct:_dvdDashboard
 GenerateGuesses	config/package.py	/^  def GenerateGuesses(self,name):$/;"	m	class:Package
 GetExactEigenvalues	src/eps/examples/tutorials/ex19.c	/^PetscErrorCode GetExactEigenvalues(PetscInt M,PetscInt N,PetscInt P,PetscInt nconv,PetscReal *exact)$/;"	f
 GetNorm2	src/sys/vec/veccomp.c	/^PETSC_STATIC_INLINE PetscReal GetNorm2(PetscReal ssq,PetscReal scale)$/;"	f
+H	src/eps/examples/tutorials/ex31.c	/^const PetscScalar H[3]    = {23.64,6.4,3.01};   \/* Inertia constant *\/$/;"	v
 H	src/eps/impls/davidson/davidson.h	/^  Mat       H,G;               \/* projected problem matrices *\/$/;"	m	struct:_dvdDashboard
 HERM	src/eps/interface/epsview.c	70;"	d	file:
 HERM	src/pep/interface/pepview.c	72;"	d	file:
@@ -1884,120 +2001,133 @@ HRGen	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode HRGen(Petsc
 HRtr	src/sys/classes/ds/impls/ghiep/invit.c	/^struct HRtr$/;"	s	file:
 HZIteration	src/sys/classes/ds/impls/ghiep/hz.c	/^static PetscErrorCode HZIteration(PetscBLASInt nn,PetscBLASInt cgd,PetscReal *aa,PetscReal *bb,PetscReal *dd,PetscScalar *uu,PetscBLASInt ld)$/;"	f	file:
 HZStep	src/sys/classes/ds/impls/ghiep/hz.c	/^static PetscErrorCode HZStep(PetscBLASInt ntop,PetscBLASInt nn,PetscReal tr,PetscReal dt,PetscReal *aa,PetscReal *bb,PetscReal *dd,PetscScalar *uu,PetscInt n,PetscInt ld,PetscBool *flag)$/;"	f	file:
-HarmType_t	src/eps/impls/davidson/davidson.h	/^} HarmType_t;$/;"	t	typeref:enum:__anon49
+HarmType_t	src/eps/impls/davidson/davidson.h	/^} HarmType_t;$/;"	t	typeref:enum:__anon62
 IS	include/slepc/private/epsimpl.h	/^  Vec            *IS;              \/* references to user-provided initial space *\/$/;"	m	struct:_p_EPS
 IS	include/slepc/private/nepimpl.h	/^  Vec            *IS;              \/* references to user-provided initial space *\/$/;"	m	struct:_p_NEP
 IS	include/slepc/private/pepimpl.h	/^  Vec            *IS;              \/* references to user-provided initial space *\/$/;"	m	struct:_p_PEP
-IS	include/slepc/private/svdimpl.h	/^  Vec              *IS,*ISL;    \/* placeholder for references to user-provided initial space *\/$/;"	m	struct:_p_SVD
-ISL	include/slepc/private/svdimpl.h	/^  Vec              *IS,*ISL;    \/* placeholder for references to user-provided initial space *\/$/;"	m	struct:_p_SVD
+IS	include/slepc/private/svdimpl.h	/^  Vec            *IS,*ISL;         \/* placeholder for references to user initial space *\/$/;"	m	struct:_p_SVD
+ISL	include/slepc/private/svdimpl.h	/^  Vec            *IS,*ISL;         \/* placeholder for references to user initial space *\/$/;"	m	struct:_p_SVD
 InitDir	config/packages/petsc.py	/^  def InitDir(self,prefixdir):$/;"	m	class:PETSc
 InitDir	config/packages/slepc.py	/^  def InitDir(self):$/;"	m	class:SLEPc
-InitType_t	src/eps/impls/davidson/davidson.h	/^} InitType_t;$/;"	t	typeref:enum:__anon50
+InitType_t	src/eps/impls/davidson/davidson.h	/^} InitType_t;$/;"	t	typeref:enum:__anon63
+Install	config/packages/arpack.py	/^  def Install(self,conf,vars,cmake,petsc,archdir):$/;"	m	class:Arpack
 Install	config/packages/blopex.py	/^  def Install(self,conf,vars,cmake,petsc,archdir):$/;"	m	class:Blopex
+Install	config/packages/primme.py	/^  def Install(self,conf,vars,cmake,petsc,archdir):$/;"	m	class:Primme
 Install	config/packages/sowing.py	/^  def Install(self,archdir,make):$/;"	m	class:Sowing
+Install	config/packages/trlan.py	/^  def Install(self,conf,vars,cmake,petsc,archdir):$/;"	m	class:Trlan
 Installer	config/install.py	/^class Installer:$/;"	c
 K	src/pep/examples/tutorials/ex16f90.F90	/^      type(Mat)      M, C, K,/;"	v	program:main
-K	src/pep/impls/linear/linearp.h	/^  Mat        M,C,K;            \/* copy of PEP coefficient matrices *\/$/;"	m	struct:__anon88
-KZ	src/eps/impls/davidson/dvdimprovex.c	/^  BV           KZ;                 \/* KZ vecs for the projector KZ*inv(X'*KZ)*X' *\/$/;"	m	struct:__anon55	file:
-L	src/eps/impls/ciss/ciss.c	/^  PetscInt    L;          \/* block size (16) *\/$/;"	m	struct:__anon47	file:
-L	src/nep/impls/ciss/nciss.c	/^  PetscInt     L;          \/* block size (16) *\/$/;"	m	struct:__anon77	file:
+K	src/pep/impls/linear/linearp.h	/^  Mat        M,C,K;            \/* copy of PEP coefficient matrices *\/$/;"	m	struct:__anon106
+KA	src/eps/examples/tutorials/ex31.c	/^const PetscScalar KA[3] = {20.0,20.0,20.0};  \/* Voltage regulartor gain constant *\/$/;"	v
+KE	src/eps/examples/tutorials/ex31.c	/^const PetscScalar KE[3] = {1.0,1.0,1.0};     \/* Exciter gain constant *\/$/;"	v
+KF	src/eps/examples/tutorials/ex31.c	/^const PetscScalar KF[3] = {0.063,0.063,0.063};  \/* Feedback stabilizer gain constant *\/$/;"	v
+KZ	src/eps/impls/davidson/dvdimprovex.c	/^  BV           KZ;                 \/* KZ vecs for the projector KZ*inv(X'*KZ)*X' *\/$/;"	m	struct:__anon68	file:
+L	src/eps/impls/ciss/ciss.c	/^  PetscInt          L;          \/* block size (16) *\/$/;"	m	struct:__anon61	file:
+L	src/nep/impls/ciss/nciss.c	/^  PetscInt     L;          \/* block size (16) *\/$/;"	m	struct:__anon89	file:
 LANGS	config/gmakegen.py	/^LANGS = dict(c='C', cxx='CXX', cu='CU', F='F')$/;"	v
-LAPACKbdsdc_	include/slepcblaslapack.h	154;"	d
-LAPACKbdsdc_	include/slepcblaslapack.h	206;"	d
-LAPACKgeevx_	include/slepcblaslapack.h	167;"	d
-LAPACKgeevx_	include/slepcblaslapack.h	182;"	d
-LAPACKgeevx_	include/slepcblaslapack.h	219;"	d
-LAPACKgeevx_	include/slepcblaslapack.h	234;"	d
+LAPACKbdsdc_	include/slepcblaslapack.h	155;"	d
+LAPACKbdsdc_	include/slepcblaslapack.h	211;"	d
+LAPACKgees_	include/slepcblaslapack.h	169;"	d
+LAPACKgees_	include/slepcblaslapack.h	185;"	d
+LAPACKgees_	include/slepcblaslapack.h	225;"	d
+LAPACKgees_	include/slepcblaslapack.h	241;"	d
+LAPACKgeevx_	include/slepcblaslapack.h	168;"	d
+LAPACKgeevx_	include/slepcblaslapack.h	184;"	d
+LAPACKgeevx_	include/slepcblaslapack.h	224;"	d
+LAPACKgeevx_	include/slepcblaslapack.h	240;"	d
 LAPACKgehrd_	include/slepcblaslapack.h	105;"	d
 LAPACKgelqf_	include/slepcblaslapack.h	106;"	d
-LAPACKgesdd_	include/slepcblaslapack.h	169;"	d
-LAPACKgesdd_	include/slepcblaslapack.h	184;"	d
-LAPACKgesdd_	include/slepcblaslapack.h	221;"	d
-LAPACKgesdd_	include/slepcblaslapack.h	236;"	d
-LAPACKggev_	include/slepcblaslapack.h	144;"	d
-LAPACKggev_	include/slepcblaslapack.h	196;"	d
-LAPACKggevx_	include/slepcblaslapack.h	143;"	d
-LAPACKggevx_	include/slepcblaslapack.h	195;"	d
-LAPACKhsein_	include/slepcblaslapack.h	171;"	d
-LAPACKhsein_	include/slepcblaslapack.h	186;"	d
-LAPACKhsein_	include/slepcblaslapack.h	223;"	d
-LAPACKhsein_	include/slepcblaslapack.h	238;"	d
-LAPACKlacpy_	include/slepcblaslapack.h	148;"	d
-LAPACKlacpy_	include/slepcblaslapack.h	200;"	d
-LAPACKlaed4_	include/slepcblaslapack.h	113;"	d
+LAPACKgeqp3_	include/slepcblaslapack.h	107;"	d
+LAPACKgesdd_	include/slepcblaslapack.h	171;"	d
+LAPACKgesdd_	include/slepcblaslapack.h	187;"	d
+LAPACKgesdd_	include/slepcblaslapack.h	227;"	d
+LAPACKgesdd_	include/slepcblaslapack.h	243;"	d
+LAPACKggev_	include/slepcblaslapack.h	143;"	d
+LAPACKggev_	include/slepcblaslapack.h	199;"	d
+LAPACKggevx_	include/slepcblaslapack.h	142;"	d
+LAPACKggevx_	include/slepcblaslapack.h	198;"	d
+LAPACKhsein_	include/slepcblaslapack.h	173;"	d
+LAPACKhsein_	include/slepcblaslapack.h	189;"	d
+LAPACKhsein_	include/slepcblaslapack.h	229;"	d
+LAPACKhsein_	include/slepcblaslapack.h	245;"	d
+LAPACKlacpy_	include/slepcblaslapack.h	147;"	d
+LAPACKlacpy_	include/slepcblaslapack.h	203;"	d
+LAPACKlaed4_	include/slepcblaslapack.h	114;"	d
 LAPACKlaev2_	include/slepcblaslapack.h	104;"	d
-LAPACKlag2_	include/slepcblaslapack.h	109;"	d
-LAPACKlaln2_	include/slepcblaslapack.h	112;"	d
-LAPACKlamc3_	include/slepcblaslapack.h	156;"	d
-LAPACKlamc3_	include/slepcblaslapack.h	208;"	d
-LAPACKlamch_	include/slepcblaslapack.h	155;"	d
-LAPACKlamch_	include/slepcblaslapack.h	207;"	d
-LAPACKlamrg_	include/slepcblaslapack.h	114;"	d
-LAPACKlange_	include/slepcblaslapack.h	142;"	d
-LAPACKlange_	include/slepcblaslapack.h	194;"	d
-LAPACKlanhs_	include/slepcblaslapack.h	141;"	d
-LAPACKlanhs_	include/slepcblaslapack.h	193;"	d
-LAPACKlansy_	include/slepcblaslapack.h	150;"	d
-LAPACKlansy_	include/slepcblaslapack.h	202;"	d
-LAPACKlapy2_	include/slepcblaslapack.h	115;"	d
-LAPACKlarf_	include/slepcblaslapack.h	146;"	d
-LAPACKlarf_	include/slepcblaslapack.h	198;"	d
-LAPACKlarfg_	include/slepcblaslapack.h	108;"	d
-LAPACKlartg_	include/slepcblaslapack.h	111;"	d
-LAPACKlascl_	include/slepcblaslapack.h	149;"	d
-LAPACKlascl_	include/slepcblaslapack.h	201;"	d
-LAPACKlaset_	include/slepcblaslapack.h	151;"	d
-LAPACKlaset_	include/slepcblaslapack.h	203;"	d
-LAPACKlasv2_	include/slepcblaslapack.h	110;"	d
-LAPACKorghr_	include/slepcblaslapack.h	117;"	d
+LAPACKlag2_	include/slepcblaslapack.h	110;"	d
+LAPACKlaln2_	include/slepcblaslapack.h	113;"	d
+LAPACKlamc3_	include/slepcblaslapack.h	157;"	d
+LAPACKlamc3_	include/slepcblaslapack.h	213;"	d
+LAPACKlamch_	include/slepcblaslapack.h	156;"	d
+LAPACKlamch_	include/slepcblaslapack.h	212;"	d
+LAPACKlamrg_	include/slepcblaslapack.h	115;"	d
+LAPACKlange_	include/slepcblaslapack.h	141;"	d
+LAPACKlange_	include/slepcblaslapack.h	197;"	d
+LAPACKlanhs_	include/slepcblaslapack.h	140;"	d
+LAPACKlanhs_	include/slepcblaslapack.h	196;"	d
+LAPACKlansy_	include/slepcblaslapack.h	149;"	d
+LAPACKlansy_	include/slepcblaslapack.h	205;"	d
+LAPACKlapy2_	include/slepcblaslapack.h	116;"	d
+LAPACKlarf_	include/slepcblaslapack.h	145;"	d
+LAPACKlarf_	include/slepcblaslapack.h	201;"	d
+LAPACKlarfg_	include/slepcblaslapack.h	109;"	d
+LAPACKlartg_	include/slepcblaslapack.h	112;"	d
+LAPACKlascl_	include/slepcblaslapack.h	148;"	d
+LAPACKlascl_	include/slepcblaslapack.h	204;"	d
+LAPACKlaset_	include/slepcblaslapack.h	150;"	d
+LAPACKlaset_	include/slepcblaslapack.h	206;"	d
+LAPACKlasv2_	include/slepcblaslapack.h	111;"	d
+LAPACKorghr_	include/slepcblaslapack.h	118;"	d
 LAPACKorghr_	include/slepcblaslapack.h	120;"	d
-LAPACKorgqr_	include/slepcblaslapack.h	118;"	d
-LAPACKorgqr_	include/slepcblaslapack.h	121;"	d
-LAPACKorgtr_	include/slepcblaslapack.h	164;"	d
-LAPACKorgtr_	include/slepcblaslapack.h	179;"	d
-LAPACKorgtr_	include/slepcblaslapack.h	216;"	d
-LAPACKorgtr_	include/slepcblaslapack.h	231;"	d
-LAPACKormlq_	include/slepcblaslapack.h	163;"	d
-LAPACKormlq_	include/slepcblaslapack.h	178;"	d
-LAPACKormlq_	include/slepcblaslapack.h	215;"	d
-LAPACKormlq_	include/slepcblaslapack.h	230;"	d
-LAPACKpbtrf_	include/slepcblaslapack.h	145;"	d
-LAPACKpbtrf_	include/slepcblaslapack.h	197;"	d
-LAPACKstedc_	include/slepcblaslapack.h	172;"	d
-LAPACKstedc_	include/slepcblaslapack.h	187;"	d
-LAPACKstedc_	include/slepcblaslapack.h	224;"	d
-LAPACKstedc_	include/slepcblaslapack.h	239;"	d
-LAPACKstevr_	include/slepcblaslapack.h	153;"	d
-LAPACKstevr_	include/slepcblaslapack.h	205;"	d
-LAPACKsyevd_	include/slepcblaslapack.h	161;"	d
-LAPACKsyevd_	include/slepcblaslapack.h	176;"	d
-LAPACKsyevd_	include/slepcblaslapack.h	213;"	d
-LAPACKsyevd_	include/slepcblaslapack.h	228;"	d
-LAPACKsyevr_	include/slepcblaslapack.h	160;"	d
-LAPACKsyevr_	include/slepcblaslapack.h	175;"	d
-LAPACKsyevr_	include/slepcblaslapack.h	212;"	d
-LAPACKsyevr_	include/slepcblaslapack.h	227;"	d
-LAPACKsygvd_	include/slepcblaslapack.h	162;"	d
-LAPACKsygvd_	include/slepcblaslapack.h	177;"	d
-LAPACKsygvd_	include/slepcblaslapack.h	214;"	d
-LAPACKsygvd_	include/slepcblaslapack.h	229;"	d
-LAPACKsytrd_	include/slepcblaslapack.h	165;"	d
-LAPACKsytrd_	include/slepcblaslapack.h	180;"	d
-LAPACKsytrd_	include/slepcblaslapack.h	217;"	d
-LAPACKsytrd_	include/slepcblaslapack.h	232;"	d
-LAPACKtgevc_	include/slepcblaslapack.h	170;"	d
-LAPACKtgevc_	include/slepcblaslapack.h	185;"	d
-LAPACKtgevc_	include/slepcblaslapack.h	222;"	d
-LAPACKtgevc_	include/slepcblaslapack.h	237;"	d
-LAPACKtgexc_	include/slepcblaslapack.h	107;"	d
-LAPACKtrevc_	include/slepcblaslapack.h	166;"	d
-LAPACKtrevc_	include/slepcblaslapack.h	181;"	d
-LAPACKtrevc_	include/slepcblaslapack.h	218;"	d
-LAPACKtrevc_	include/slepcblaslapack.h	233;"	d
-LAPACKtrexc_	include/slepcblaslapack.h	168;"	d
-LAPACKtrexc_	include/slepcblaslapack.h	183;"	d
-LAPACKtrexc_	include/slepcblaslapack.h	220;"	d
-LAPACKtrexc_	include/slepcblaslapack.h	235;"	d
+LAPACKorgtr_	include/slepcblaslapack.h	165;"	d
+LAPACKorgtr_	include/slepcblaslapack.h	181;"	d
+LAPACKorgtr_	include/slepcblaslapack.h	221;"	d
+LAPACKorgtr_	include/slepcblaslapack.h	237;"	d
+LAPACKormlq_	include/slepcblaslapack.h	164;"	d
+LAPACKormlq_	include/slepcblaslapack.h	180;"	d
+LAPACKormlq_	include/slepcblaslapack.h	220;"	d
+LAPACKormlq_	include/slepcblaslapack.h	236;"	d
+LAPACKpbtrf_	include/slepcblaslapack.h	144;"	d
+LAPACKpbtrf_	include/slepcblaslapack.h	200;"	d
+LAPACKstedc_	include/slepcblaslapack.h	174;"	d
+LAPACKstedc_	include/slepcblaslapack.h	190;"	d
+LAPACKstedc_	include/slepcblaslapack.h	230;"	d
+LAPACKstedc_	include/slepcblaslapack.h	246;"	d
+LAPACKstevr_	include/slepcblaslapack.h	154;"	d
+LAPACKstevr_	include/slepcblaslapack.h	210;"	d
+LAPACKsyevd_	include/slepcblaslapack.h	162;"	d
+LAPACKsyevd_	include/slepcblaslapack.h	178;"	d
+LAPACKsyevd_	include/slepcblaslapack.h	218;"	d
+LAPACKsyevd_	include/slepcblaslapack.h	234;"	d
+LAPACKsyevr_	include/slepcblaslapack.h	161;"	d
+LAPACKsyevr_	include/slepcblaslapack.h	177;"	d
+LAPACKsyevr_	include/slepcblaslapack.h	217;"	d
+LAPACKsyevr_	include/slepcblaslapack.h	233;"	d
+LAPACKsygvd_	include/slepcblaslapack.h	163;"	d
+LAPACKsygvd_	include/slepcblaslapack.h	179;"	d
+LAPACKsygvd_	include/slepcblaslapack.h	219;"	d
+LAPACKsygvd_	include/slepcblaslapack.h	235;"	d
+LAPACKsytrd_	include/slepcblaslapack.h	166;"	d
+LAPACKsytrd_	include/slepcblaslapack.h	182;"	d
+LAPACKsytrd_	include/slepcblaslapack.h	222;"	d
+LAPACKsytrd_	include/slepcblaslapack.h	238;"	d
+LAPACKtgevc_	include/slepcblaslapack.h	172;"	d
+LAPACKtgevc_	include/slepcblaslapack.h	188;"	d
+LAPACKtgevc_	include/slepcblaslapack.h	228;"	d
+LAPACKtgevc_	include/slepcblaslapack.h	244;"	d
+LAPACKtgexc_	include/slepcblaslapack.h	108;"	d
+LAPACKtrevc_	include/slepcblaslapack.h	167;"	d
+LAPACKtrevc_	include/slepcblaslapack.h	183;"	d
+LAPACKtrevc_	include/slepcblaslapack.h	223;"	d
+LAPACKtrevc_	include/slepcblaslapack.h	239;"	d
+LAPACKtrexc_	include/slepcblaslapack.h	170;"	d
+LAPACKtrexc_	include/slepcblaslapack.h	186;"	d
+LAPACKtrexc_	include/slepcblaslapack.h	226;"	d
+LAPACKtrexc_	include/slepcblaslapack.h	242;"	d
+LAPACKtrsyl_	include/slepcblaslapack.h	151;"	d
+LAPACKtrsyl_	include/slepcblaslapack.h	207;"	d
+LAPACKtrtri_	include/slepcblaslapack.h	152;"	d
+LAPACKtrtri_	include/slepcblaslapack.h	208;"	d
 LATEX	docs/manual/makefile	/^LATEX		= pdflatex --shell-escape$/;"	m
 LIBBASE	docs/makefile	/^LIBBASE  =$/;"	m
 LIBBASE	include/makefile	/^LIBBASE  = libslepcsys$/;"	m
@@ -2029,6 +2159,7 @@ LIBBASE	src/eps/impls/subspace/makefile	/^LIBBASE  = libslepceps$/;"	m
 LIBBASE	src/eps/interface/ftn-custom/makefile	/^LIBBASE  = libslepceps$/;"	m
 LIBBASE	src/eps/interface/makefile	/^LIBBASE  = libslepceps$/;"	m
 LIBBASE	src/mfn/f90-mod/makefile	/^LIBBASE    = libslepcmfn$/;"	m
+LIBBASE	src/mfn/impls/expokit/makefile	/^LIBBASE  = libslepcmfn$/;"	m
 LIBBASE	src/mfn/impls/krylov/makefile	/^LIBBASE  = libslepcmfn$/;"	m
 LIBBASE	src/mfn/impls/makefile	/^LIBBASE  = libslepcmfn$/;"	m
 LIBBASE	src/mfn/interface/ftn-custom/makefile	/^LIBBASE  = libslepcmfn$/;"	m
@@ -2038,6 +2169,7 @@ LIBBASE	src/nep/impls/ciss/makefile	/^LIBBASE  = libslepcnep$/;"	m
 LIBBASE	src/nep/impls/interpol/makefile	/^LIBBASE  = libslepcnep$/;"	m
 LIBBASE	src/nep/impls/makefile	/^LIBBASE  = libslepcnep$/;"	m
 LIBBASE	src/nep/impls/narnoldi/makefile	/^LIBBASE  = libslepcnep$/;"	m
+LIBBASE	src/nep/impls/nleigs/makefile	/^LIBBASE  = libslepc$/;"	m
 LIBBASE	src/nep/impls/rii/makefile	/^LIBBASE  = libslepcnep$/;"	m
 LIBBASE	src/nep/impls/slp/makefile	/^LIBBASE  = libslepcnep$/;"	m
 LIBBASE	src/nep/interface/ftn-custom/makefile	/^LIBBASE  = libslepcnep$/;"	m
@@ -2082,6 +2214,7 @@ LIBBASE	src/sys/classes/ds/interface/ftn-custom/makefile	/^LIBBASE  = libslepcsy
 LIBBASE	src/sys/classes/ds/interface/makefile	/^LIBBASE  = libslepcsys$/;"	m
 LIBBASE	src/sys/classes/fn/impls/combine/makefile	/^LIBBASE  = libslepcsys$/;"	m
 LIBBASE	src/sys/classes/fn/impls/exp/makefile	/^LIBBASE  = libslepcsys$/;"	m
+LIBBASE	src/sys/classes/fn/impls/invsqrt/makefile	/^LIBBASE  = libslepcsys$/;"	m
 LIBBASE	src/sys/classes/fn/impls/log/makefile	/^LIBBASE  = libslepcsys$/;"	m
 LIBBASE	src/sys/classes/fn/impls/makefile	/^LIBBASE  = libslepcsys$/;"	m
 LIBBASE	src/sys/classes/fn/impls/phi/makefile	/^LIBBASE  = libslepcsys$/;"	m
@@ -2156,6 +2289,7 @@ LOCDIR	src/mfn/examples/makefile	/^LOCDIR   = src\/mfn\/examples\/$/;"	m
 LOCDIR	src/mfn/examples/tests/makefile	/^LOCDIR     = src\/mfn\/examples\/tests\/$/;"	m
 LOCDIR	src/mfn/examples/tutorials/makefile	/^LOCDIR     = src\/mfn\/examples\/tutorials\/$/;"	m
 LOCDIR	src/mfn/f90-mod/makefile	/^LOCDIR     = src\/mfn\/f90-mod\/$/;"	m
+LOCDIR	src/mfn/impls/expokit/makefile	/^LOCDIR   = src\/mfn\/impls\/expokit\/$/;"	m
 LOCDIR	src/mfn/impls/krylov/makefile	/^LOCDIR   = src\/mfn\/impls\/krylov\/$/;"	m
 LOCDIR	src/mfn/impls/makefile	/^LOCDIR   = src\/mfn\/impls\/$/;"	m
 LOCDIR	src/mfn/interface/ftn-custom/makefile	/^LOCDIR   = src\/mfn\/interface\/ftn-custom\/$/;"	m
@@ -2170,6 +2304,7 @@ LOCDIR	src/nep/impls/ciss/makefile	/^LOCDIR   = src\/nep\/impls\/ciss\/$/;"	m
 LOCDIR	src/nep/impls/interpol/makefile	/^LOCDIR   = src\/nep\/impls\/interpol\/$/;"	m
 LOCDIR	src/nep/impls/makefile	/^LOCDIR   = src\/nep\/impls\/$/;"	m
 LOCDIR	src/nep/impls/narnoldi/makefile	/^LOCDIR   = src\/nep\/impls\/narnoldi\/$/;"	m
+LOCDIR	src/nep/impls/nleigs/makefile	/^LOCDIR   = src\/nep\/impls\/nleigs\/$/;"	m
 LOCDIR	src/nep/impls/rii/makefile	/^LOCDIR   = src\/nep\/impls\/rii\/$/;"	m
 LOCDIR	src/nep/impls/slp/makefile	/^LOCDIR   = src\/nep\/impls\/slp\/$/;"	m
 LOCDIR	src/nep/interface/ftn-custom/makefile	/^LOCDIR   = src\/nep\/interface\/ftn-custom\/$/;"	m
@@ -2232,6 +2367,7 @@ LOCDIR	src/sys/classes/fn/examples/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/
 LOCDIR	src/sys/classes/fn/examples/tests/makefile	/^LOCDIR     = src\/sys\/classes\/fn\/examples\/tests\/$/;"	m
 LOCDIR	src/sys/classes/fn/impls/combine/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/impls\/combine\/$/;"	m
 LOCDIR	src/sys/classes/fn/impls/exp/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/impls\/exp\/$/;"	m
+LOCDIR	src/sys/classes/fn/impls/invsqrt/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/impls\/invsqrt\/$/;"	m
 LOCDIR	src/sys/classes/fn/impls/log/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/impls\/log\/$/;"	m
 LOCDIR	src/sys/classes/fn/impls/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/impls\/$/;"	m
 LOCDIR	src/sys/classes/fn/impls/phi/makefile	/^LOCDIR   = src\/sys\/classes\/fn\/impls\/phi\/$/;"	m
@@ -2267,9 +2403,9 @@ LOCDIR	src/sys/f90-mod/makefile	/^LOCDIR     = src\/sys\/f90-mod\/$/;"	m
 LOCDIR	src/sys/ftn-custom/makefile	/^LOCDIR   = src\/sys\/ftn-custom\/$/;"	m
 LOCDIR	src/sys/makefile	/^LOCDIR   = src\/sys\/$/;"	m
 LOCDIR	src/sys/vec/makefile	/^LOCDIR   = src\/sys\/vec\/$/;"	m
-LUfac	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work,PetscInt nw)$/;"	f	file:
-L_max	src/eps/impls/ciss/ciss.c	/^  PetscInt    L_max;      \/* maximum number of columns of the source matrix V *\/$/;"	m	struct:__anon47	file:
-L_max	src/nep/impls/ciss/nciss.c	/^  PetscInt     L_max;      \/* maximum number of columns of the source matrix V *\/$/;"	m	struct:__anon77	file:
+LUfac	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work)$/;"	f	file:
+L_max	src/eps/impls/ciss/ciss.c	/^  PetscInt          L_max;      \/* maximum number of columns of the source matrix V *\/$/;"	m	struct:__anon61	file:
+L_max	src/nep/impls/ciss/nciss.c	/^  PetscInt     L_max;      \/* maximum number of columns of the source matrix V *\/$/;"	m	struct:__anon89	file:
 Lapack	config/packages/lapack.py	/^class Lapack(package.Package):$/;"	c
 Link	config/package.py	/^  def Link(self,functions,callbacks,flags):$/;"	m	class:Package
 LinkWithOutput	config/package.py	/^  def LinkWithOutput(self,functions,callbacks,flags):$/;"	m	class:Package
@@ -2277,10 +2413,28 @@ LoadConf	config/packages/petsc.py	/^  def LoadConf(self):$/;"	m	class:PETSc
 LoadVersion	config/packages/petsc.py	/^  def LoadVersion(self):$/;"	m	class:PETSc
 LoadVersion	config/packages/slepc.py	/^  def LoadVersion(self):$/;"	m	class:SLEPc
 Log	config/log.py	/^class Log:$/;"	c
-M	src/eps/impls/ciss/ciss.c	/^  PetscInt    M;          \/* moment degree (N\/4 = 4) *\/$/;"	m	struct:__anon47	file:
-M	src/nep/impls/ciss/nciss.c	/^  PetscInt     M;          \/* moment degree (N\/4 = 4) *\/$/;"	m	struct:__anon77	file:
+M	src/eps/examples/tutorials/ex31.c	/^PetscScalar M[3]; \/* M = 2*H\/w_s *\/$/;"	v
+M	src/eps/impls/ciss/ciss.c	/^  PetscInt          M;          \/* moment degree (N\/4 = 4) *\/$/;"	m	struct:__anon61	file:
+M	src/nep/impls/ciss/nciss.c	/^  PetscInt     M;          \/* moment degree (N\/4 = 4) *\/$/;"	m	struct:__anon89	file:
 M	src/pep/examples/tutorials/ex16f90.F90	/^      type(Ma/;"	v	program:main
-M	src/pep/impls/linear/linearp.h	/^  Mat        M,C,K;            \/* copy of PEP coefficient matrices *\/$/;"	m	struct:__anon88
+M	src/pep/impls/jd/pjdp.h	/^  PetscScalar *M;$/;"	m	struct:__anon100
+M	src/pep/impls/linear/linearp.h	/^  Mat        M,C,K;            \/* copy of PEP coefficient matrices *\/$/;"	m	struct:__anon106
+M1	src/nep/interface/neprefine.c	/^  Mat          M1;$/;"	m	struct:__anon98	file:
+M1	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          *A,M1;$/;"	m	struct:__anon104	file:
+M1	src/pep/impls/krylov/toar/nrefine.c	/^  Mat          E[2],M1;$/;"	m	struct:__anon105	file:
+M1	src/pep/interface/peprefine.c	/^  Mat          M1;$/;"	m	struct:__anon109	file:
+M2	src/nep/interface/neprefine.c	/^  Vec          M2,M3;$/;"	m	struct:__anon98	file:
+M2	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,M2,M3,W;$/;"	m	struct:__anon104	file:
+M2	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W,M2,M3,Wt;$/;"	m	struct:__anon105	file:
+M2	src/pep/interface/peprefine.c	/^  Vec          M2,M3;$/;"	m	struct:__anon109	file:
+M3	src/nep/interface/neprefine.c	/^  Vec          M2,M3;$/;"	m	struct:__anon98	file:
+M3	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,M2,M3,W;$/;"	m	struct:__anon104	file:
+M3	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W,M2,M3,Wt;$/;"	m	struct:__anon105	file:
+M3	src/pep/interface/peprefine.c	/^  Vec          M2,M3;$/;"	m	struct:__anon109	file:
+M4	src/nep/interface/neprefine.c	/^  PetscScalar  M4,m3;$/;"	m	struct:__anon98	file:
+M4	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *M4,*w,*wt,*d,*dt;$/;"	m	struct:__anon105	file:
+M4	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *fih,*work,*M4;$/;"	m	struct:__anon104	file:
+M4	src/pep/interface/peprefine.c	/^  PetscScalar  M4,m3;$/;"	m	struct:__anon109	file:
 MANSEC	include/makefile	/^MANSEC   = $/;"	m
 MANSEC	include/slepc/finclude/makefile	/^MANSEC    = $/;"	m
 MANSEC	include/slepc/private/makefile	/^MANSEC   = $/;"	m
@@ -2314,6 +2468,7 @@ MANSEC	src/eps/makefile	/^MANSEC   = EPS$/;"	m
 MANSEC	src/mfn/examples/tests/makefile	/^MANSEC     = MFN$/;"	m
 MANSEC	src/mfn/examples/tutorials/makefile	/^MANSEC     = MFN$/;"	m
 MANSEC	src/mfn/f90-mod/makefile	/^MANSEC     = MFN$/;"	m
+MANSEC	src/mfn/impls/expokit/makefile	/^MANSEC   = MFN$/;"	m
 MANSEC	src/mfn/impls/krylov/makefile	/^MANSEC   = MFN$/;"	m
 MANSEC	src/mfn/impls/makefile	/^MANSEC   = MFN$/;"	m
 MANSEC	src/mfn/interface/makefile	/^MANSEC   = MFN$/;"	m
@@ -2326,6 +2481,7 @@ MANSEC	src/nep/impls/ciss/makefile	/^MANSEC   = NEP$/;"	m
 MANSEC	src/nep/impls/interpol/makefile	/^MANSEC   = NEP$/;"	m
 MANSEC	src/nep/impls/makefile	/^MANSEC   = NEP$/;"	m
 MANSEC	src/nep/impls/narnoldi/makefile	/^MANSEC   = NEP$/;"	m
+MANSEC	src/nep/impls/nleigs/makefile	/^MANSEC   = NEP$/;"	m
 MANSEC	src/nep/impls/rii/makefile	/^MANSEC   = NEP$/;"	m
 MANSEC	src/nep/impls/slp/makefile	/^MANSEC   = NEP$/;"	m
 MANSEC	src/nep/interface/makefile	/^MANSEC   = NEP$/;"	m
@@ -2378,6 +2534,7 @@ MANSEC	src/sys/classes/ds/makefile	/^MANSEC   = DS$/;"	m
 MANSEC	src/sys/classes/fn/examples/tests/makefile	/^MANSEC     = FN$/;"	m
 MANSEC	src/sys/classes/fn/impls/combine/makefile	/^MANSEC   = FN$/;"	m
 MANSEC	src/sys/classes/fn/impls/exp/makefile	/^MANSEC   = FN$/;"	m
+MANSEC	src/sys/classes/fn/impls/invsqrt/makefile	/^MANSEC   = FN$/;"	m
 MANSEC	src/sys/classes/fn/impls/log/makefile	/^MANSEC   = FN$/;"	m
 MANSEC	src/sys/classes/fn/impls/makefile	/^MANSEC   = FN$/;"	m
 MANSEC	src/sys/classes/fn/impls/phi/makefile	/^MANSEC   = FN$/;"	m
@@ -2412,21 +2569,26 @@ MAXMFNMONITORS	include/slepc/private/mfnimpl.h	47;"	d
 MAXNEPMONITORS	include/slepc/private/nepimpl.h	48;"	d
 MAXPEPMONITORS	include/slepc/private/pepimpl.h	50;"	d
 MAXSVDMONITORS	include/slepc/private/svdimpl.h	47;"	d
+MAX_LBPOINTS	src/nep/impls/nleigs/nleigs.c	40;"	d	file:
 MAX_MATRICES	src/pep/examples/tutorials/ex17.c	28;"	d	file:
+MAX_NSHIFTS	src/nep/impls/nleigs/nleigs.c	42;"	d	file:
 MAX_PADE	src/sys/classes/fn/impls/exp/fnexp.c	45;"	d	file:
 MFN	include/slepc/finclude/slepcmfndef.h	31;"	d
 MFN	include/slepcmfn.h	/^typedef struct _p_MFN* MFN;$/;"	t	typeref:struct:_p_MFN
 MFNAllocateSolution	src/mfn/interface/mfnsetup.c	/^PetscErrorCode MFNAllocateSolution(MFN mfn,PetscInt extra)$/;"	f
 MFNAppendOptionsPrefix	src/mfn/interface/mfnopts.c	/^PetscErrorCode MFNAppendOptionsPrefix(MFN mfn,const char *prefix)$/;"	f
-MFNBasicArnoldi	src/mfn/impls/krylov/mfnkrylov.c	/^static PetscErrorCode MFNBasicArnoldi(BV V, Mat A,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown)$/;"	f	file:
+MFNBasicArnoldi	src/mfn/impls/krylov/mfnkrylov.c	/^PetscErrorCode MFNBasicArnoldi(MFN mfn,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)$/;"	f
 MFNConvergedReason	include/slepc/finclude/slepcmfndef.h	35;"	d
-MFNConvergedReason	include/slepcmfn.h	/^              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;$/;"	t	typeref:enum:__anon24
+MFNConvergedReason	include/slepcmfn.h	/^              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;$/;"	t	typeref:enum:__anon29
 MFNConvergedReasons	include/slepcmfn.h	/^PETSC_EXTERN const char *const*MFNConvergedReasons;$/;"	v
 MFNConvergedReasons	src/mfn/interface/dlregismfn.c	/^const char *const*MFNConvergedReasons = MFNConvergedReasons_Shifted + 4;$/;"	v
-MFNConvergedReasons_Shifted	src/mfn/interface/dlregismfn.c	/^const char *const MFNConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","MFNConvergedReason","MFN_",0};$/;"	v
+MFNConvergedReasons_Shifted	src/mfn/interface/dlregismfn.c	/^const char *const MFNConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","CONVERGED_ITS","MFNConvergedReason","MFN_",0};$/;"	v
 MFNCreate	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNCreate(MPI_Comm comm,MFN *outmfn)$/;"	f
+MFNCreate_Expokit	src/mfn/impls/expokit/mfnexpokit.c	/^PETSC_EXTERN PetscErrorCode MFNCreate_Expokit(MFN mfn)$/;"	f
 MFNCreate_Krylov	src/mfn/impls/krylov/mfnkrylov.c	/^PETSC_EXTERN PetscErrorCode MFNCreate_Krylov(MFN mfn)$/;"	f
 MFNDestroy	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNDestroy(MFN *mfn)$/;"	f
+MFNEXPOKIT	include/slepc/finclude/slepcmfndef.h	38;"	d
+MFNEXPOKIT	include/slepcmfn.h	49;"	d
 MFNFinalizePackage	src/mfn/interface/dlregismfn.c	/^PetscErrorCode MFNFinalizePackage(void)$/;"	f
 MFNGetBV	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNGetBV(MFN mfn,BV *bv)$/;"	f
 MFNGetConvergedReason	src/mfn/interface/mfnsolve.c	/^PetscErrorCode MFNGetConvergedReason(MFN mfn,MFNConvergedReason *reason)$/;"	f
@@ -2440,15 +2602,17 @@ MFNGetOptionsPrefix	src/mfn/interface/mfnopts.c	/^PetscErrorCode MFNGetOptionsPr
 MFNGetTolerances	src/mfn/interface/mfnopts.c	/^PetscErrorCode MFNGetTolerances(MFN mfn,PetscReal *tol,PetscInt *maxits)$/;"	f
 MFNGetType	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNGetType(MFN mfn,MFNType *type)$/;"	f
 MFNInitializePackage	src/mfn/interface/dlregismfn.c	/^PetscErrorCode MFNInitializePackage(void)$/;"	f
-MFNKRYLOV	include/slepc/finclude/slepcmfndef.h	38;"	d
+MFNKRYLOV	include/slepc/finclude/slepcmfndef.h	37;"	d
 MFNKRYLOV	include/slepcmfn.h	48;"	d
 MFNList	include/slepcmfn.h	/^PETSC_EXTERN PetscFunctionList MFNList;$/;"	v
 MFNList	src/mfn/interface/mfnbasic.c	/^PetscFunctionList MFNList = 0;$/;"	v
 MFNMonitor	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitor(MFN mfn,PetscInt it,PetscReal errest)$/;"	f
 MFNMonitorCancel	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorCancel(MFN mfn)$/;"	f
-MFNMonitorDefault	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,void *monctx)$/;"	f
-MFNMonitorLG	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorLG(MFN mfn,PetscInt its,PetscReal errest,void *monctx)$/;"	f
+MFNMonitorDefault	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,PetscViewerAndFormat *vf)$/;"	f
+MFNMonitorLG	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorLG(MFN mfn,PetscInt its,PetscReal errest,void *ctx)$/;"	f
+MFNMonitorLGCreate	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)$/;"	f
 MFNMonitorSet	src/mfn/interface/mfnmon.c	/^PetscErrorCode MFNMonitorSet(MFN mfn,PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))$/;"	f
+MFNMonitorSetFromOptions	src/mfn/interface/mfnopts.c	/^PetscErrorCode MFNMonitorSetFromOptions(MFN mfn,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,PetscViewerAndFormat*))$/;"	f
 MFNOps	include/slepc/private/mfnimpl.h	/^typedef struct _MFNOps *MFNOps;$/;"	t	typeref:struct:_MFNOps
 MFNPackageInitialized	src/mfn/interface/dlregismfn.c	/^static PetscBool MFNPackageInitialized = PETSC_FALSE;$/;"	v	file:
 MFNReasonView	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNReasonView(MFN mfn,PetscViewer viewer)$/;"	f
@@ -2468,8 +2632,10 @@ MFNSetOptionsPrefix	src/mfn/interface/mfnopts.c	/^PetscErrorCode MFNSetOptionsPr
 MFNSetTolerances	src/mfn/interface/mfnopts.c	/^PetscErrorCode MFNSetTolerances(MFN mfn,PetscReal tol,PetscInt maxits)$/;"	f
 MFNSetType	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNSetType(MFN mfn,MFNType type)$/;"	f
 MFNSetUp	src/mfn/interface/mfnsetup.c	/^PetscErrorCode MFNSetUp(MFN mfn)$/;"	f
+MFNSetUp_Expokit	src/mfn/impls/expokit/mfnexpokit.c	/^PetscErrorCode MFNSetUp_Expokit(MFN mfn)$/;"	f
 MFNSetUp_Krylov	src/mfn/impls/krylov/mfnkrylov.c	/^PetscErrorCode MFNSetUp_Krylov(MFN mfn)$/;"	f
 MFNSolve	src/mfn/interface/mfnsolve.c	/^PetscErrorCode MFNSolve(MFN mfn,Vec b,Vec x)$/;"	f
+MFNSolve_Expokit	src/mfn/impls/expokit/mfnexpokit.c	/^PetscErrorCode MFNSolve_Expokit(MFN mfn,Vec b,Vec x)$/;"	f
 MFNSolve_Krylov	src/mfn/impls/krylov/mfnkrylov.c	/^PetscErrorCode MFNSolve_Krylov(MFN mfn,Vec b,Vec x)$/;"	f
 MFNType	include/slepc/finclude/slepcmfndef.h	34;"	d
 MFNType	include/slepcmfn.h	/^typedef const char* MFNType;$/;"	t
@@ -2477,10 +2643,13 @@ MFNView	src/mfn/interface/mfnbasic.c	/^PetscErrorCode MFNView(MFN mfn,PetscViewe
 MFNViewFromOptions	include/slepcmfn.h	/^PETSC_STATIC_INLINE PetscErrorCode MFNViewFromOptions(MFN mfn,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)mfn,obj,name);}$/;"	f
 MFN_CLASSID	include/slepcmfn.h	/^PETSC_EXTERN PetscClassId MFN_CLASSID;$/;"	v
 MFN_CLASSID	src/mfn/interface/mfnbasic.c	/^PetscClassId      MFN_CLASSID = 0;$/;"	v
-MFN_CONVERGED_ITERATING	include/slepcmfn.h	/^              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;$/;"	e	enum:__anon24
-MFN_CONVERGED_TOL	include/slepcmfn.h	/^              MFN_CONVERGED_TOL                =  2,$/;"	e	enum:__anon24
-MFN_DIVERGED_BREAKDOWN	include/slepcmfn.h	/^              MFN_DIVERGED_BREAKDOWN           = -4,$/;"	e	enum:__anon24
-MFN_DIVERGED_ITS	include/slepcmfn.h	/^              MFN_DIVERGED_ITS                 = -3,$/;"	e	enum:__anon24
+MFN_CONVERGED_ITERATING	include/slepcmfn.h	/^              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;$/;"	e	enum:__anon29
+MFN_CONVERGED_ITS	include/slepcmfn.h	/^              MFN_CONVERGED_ITS                =  3,$/;"	e	enum:__anon29
+MFN_CONVERGED_TOL	include/slepcmfn.h	/^              MFN_CONVERGED_TOL                =  2,$/;"	e	enum:__anon29
+MFN_CreateDenseMat	include/slepc/private/mfnimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode MFN_CreateDenseMat(PetscInt k,Mat *A)$/;"	f
+MFN_CreateVec	include/slepc/private/mfnimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode MFN_CreateVec(PetscInt k,Vec *v)$/;"	f
+MFN_DIVERGED_BREAKDOWN	include/slepcmfn.h	/^              MFN_DIVERGED_BREAKDOWN           = -4,$/;"	e	enum:__anon29
+MFN_DIVERGED_ITS	include/slepcmfn.h	/^              MFN_DIVERGED_ITS                 = -3,$/;"	e	enum:__anon29
 MFN_SetUp	include/slepc/private/mfnimpl.h	/^PETSC_EXTERN PetscLogEvent MFN_SetUp, MFN_Solve;$/;"	v
 MFN_SetUp	src/mfn/interface/mfnbasic.c	/^PetscLogEvent     MFN_SetUp = 0,MFN_Solve = 0;$/;"	v
 MFN_Solve	include/slepc/private/mfnimpl.h	/^PETSC_EXTERN PetscLogEvent MFN_SetUp, MFN_Solve;$/;"	v
@@ -2489,7 +2658,8 @@ MPIU_NORM1_AND_2	src/sys/vec/veccomp.c	/^static MPI_Datatype MPIU_NORM2=0, MPIU_
 MPIU_NORM2	src/sys/vec/veccomp.c	/^static MPI_Datatype MPIU_NORM2=0, MPIU_NORM1_AND_2=0;$/;"	v	file:
 MPIU_NORM2_SUM	src/sys/vec/veccomp.c	/^static MPI_Op MPIU_NORM2_SUM=0;$/;"	v	file:
 MVMISG	src/eps/examples/tutorials/ex6f.F	/^      SUBROUTINE MVMISG(/;"	s
-MadeHRtr	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work,PetscInt lw)$/;"	f	file:
+MadeHRtr	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work)$/;"	f	file:
+MatAXPY_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatAXPY_Fun(Mat Y,PetscScalar a,Mat X,MatStructure str)$/;"	f	file:
 MatCholeskyFactorInvert	src/sys/classes/bv/interface/bvorthog.c	/^static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)$/;"	f	file:
 MatCreateExplicit_Linear_H1A	src/pep/impls/linear/qeplin.c	/^PetscErrorCode MatCreateExplicit_Linear_H1A(MPI_Comm comm,PEP_LINEAR *ctx,Mat *A)$/;"	f
 MatCreateExplicit_Linear_H1B	src/pep/impls/linear/qeplin.c	/^PetscErrorCode MatCreateExplicit_Linear_H1B(MPI_Comm comm,PEP_LINEAR *ctx,Mat *B)$/;"	f
@@ -2503,52 +2673,69 @@ MatCreateExplicit_Linear_S1A	src/pep/impls/linear/qeplin.c	/^PetscErrorCode MatC
 MatCreateExplicit_Linear_S1B	src/pep/impls/linear/qeplin.c	/^PetscErrorCode MatCreateExplicit_Linear_S1B(MPI_Comm comm,PEP_LINEAR *ctx,Mat *B)$/;"	f
 MatCreateExplicit_Linear_S2A	src/pep/impls/linear/qeplin.c	/^PetscErrorCode MatCreateExplicit_Linear_S2A(MPI_Comm comm,PEP_LINEAR *ctx,Mat *A)$/;"	f
 MatCreateExplicit_Linear_S2B	src/pep/impls/linear/qeplin.c	/^PetscErrorCode MatCreateExplicit_Linear_S2B(MPI_Comm comm,PEP_LINEAR *ctx,Mat *B)$/;"	f
+MatCreateVecs_Cross	src/svd/impls/cross/cross.c	/^static PetscErrorCode MatCreateVecs_Cross(Mat B,Vec *right,Vec *left)$/;"	f	file:
 MatCreateVecs_dvd_jd	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode MatCreateVecs_dvd_jd(Mat A,Vec *right,Vec *left)$/;"	f	file:
-MatCtx	src/nep/examples/tutorials/ex21.c	/^} MatCtx;$/;"	t	typeref:struct:__anon75	file:
+MatCtx	src/nep/examples/tutorials/ex21.c	/^} MatCtx;$/;"	t	typeref:struct:__anon87	file:
 MatDestroy_Fun	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode MatDestroy_Fun(Mat A)$/;"	f
+MatDestroy_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatDestroy_Fun(Mat A)$/;"	f	file:
 MatDestroy_Jac	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode MatDestroy_Jac(Mat A)$/;"	f
 MatDestroy_Shell	src/sys/classes/st/interface/stshellmat.c	/^static PetscErrorCode MatDestroy_Shell(Mat A)$/;"	f	file:
 MatDuplicate_Fun	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)$/;"	f
+MatDuplicate_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)$/;"	f	file:
 MatDuplicate_Shell	src/sys/classes/st/examples/tests/test1.c	/^static PetscErrorCode MatDuplicate_Shell(Mat S,MatDuplicateOption op,Mat *M)$/;"	f	file:
-MatExplicitCtx	src/pep/impls/krylov/toar/nrefine.c	/^} MatExplicitCtx;$/;"	t	typeref:struct:__anon87	file:
+MatExplicitCtx	src/pep/impls/krylov/toar/nrefine.c	/^} MatExplicitCtx;$/;"	t	typeref:struct:__anon105	file:
+MatFSMult	src/nep/interface/neprefine.c	/^static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)$/;"	f	file:
 MatFSMult	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)$/;"	f	file:
+MatFSMult	src/pep/interface/peprefine.c	/^static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)$/;"	f	file:
+MatGetDiagonal_Brussel	src/eps/examples/tutorials/ex30.c	/^PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)$/;"	f
 MatGetDiagonal_Brussel	src/eps/examples/tutorials/ex9.c	/^PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)$/;"	f
 MatGetDiagonal_Cross	src/svd/impls/cross/cross.c	/^static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)$/;"	f	file:
 MatGetDiagonal_Cyclic	src/svd/impls/cyclic/cyclic.c	/^static PetscErrorCode MatGetDiagonal_Cyclic(Mat B,Vec diag)$/;"	f	file:
 MatGetDiagonal_Fun	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)$/;"	f
+MatGetDiagonal_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)$/;"	f	file:
+MatGetDiagonal_Identity	src/pep/examples/tutorials/ex28.c	/^PetscErrorCode MatGetDiagonal_Identity(Mat A,Vec diag)$/;"	f
 MatGetDiagonal_Laplacian2D	src/eps/examples/tests/test8.c	/^PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)$/;"	f
 MatGetDiagonal_Laplacian2D	src/eps/examples/tutorials/ex3.c	/^PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)$/;"	f
+MatGetDiagonal_Laplacian2D	src/pep/examples/tutorials/ex28.c	/^PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)$/;"	f
 MatGetDiagonal_Shell	src/sys/classes/st/examples/tests/test1.c	/^static PetscErrorCode MatGetDiagonal_Shell(Mat S,Vec diag)$/;"	f	file:
 MatGetDiagonal_Shell	src/sys/classes/st/interface/stshellmat.c	/^static PetscErrorCode MatGetDiagonal_Shell(Mat A,Vec diag)$/;"	f	file:
+MatGetDiagonal_Zero	src/pep/examples/tutorials/ex28.c	/^PetscErrorCode MatGetDiagonal_Zero(Mat A,Vec diag)$/;"	f
 MatIsing_Mult	src/eps/examples/tutorials/ex6f.F	/^      subroutine MatIsing_Mult(/;"	s
 MatMarkovModel	src/eps/examples/tests/test11.c	/^PetscErrorCode MatMarkovModel(PetscInt m,Mat A)$/;"	f
 MatMarkovModel	src/eps/examples/tests/test9.c	/^PetscErrorCode MatMarkovModel(PetscInt m,Mat A)$/;"	f
 MatMarkovModel	src/eps/examples/tutorials/ex18.c	/^PetscErrorCode MatMarkovModel(PetscInt m,Mat A)$/;"	f
+MatMarkovModel	src/eps/examples/tutorials/ex29.c	/^PetscErrorCode MatMarkovModel(PetscInt m,Mat A)$/;"	f
 MatMarkovModel	src/eps/examples/tutorials/ex5.c	/^PetscErrorCode MatMarkovModel(PetscInt m,Mat A)$/;"	f
 MatMarkovModel	src/mfn/examples/tutorials/ex23.c	/^PetscErrorCode MatMarkovModel(PetscInt m,Mat A)$/;"	f
+MatMultTranspose_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatMultTranspose_Fun(Mat A,Vec x,Vec y)$/;"	f	file:
 MatMultTranspose_Shell	src/sys/classes/st/examples/tests/test1.c	/^static PetscErrorCode MatMultTranspose_Shell(Mat S,Vec x,Vec y)$/;"	f	file:
 MatMultTranspose_Shell	src/sys/classes/st/interface/stshellmat.c	/^static PetscErrorCode MatMultTranspose_Shell(Mat A,Vec x,Vec y)$/;"	f	file:
 MatMultTranspose_dvd_jd	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode MatMultTranspose_dvd_jd(Mat A,Vec in,Vec out)$/;"	f	file:
+MatMult_Brussel	src/eps/examples/tutorials/ex30.c	/^PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)$/;"	f
 MatMult_Brussel	src/eps/examples/tutorials/ex9.c	/^PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)$/;"	f
 MatMult_Cayley	src/sys/classes/st/impls/cayley/cayley.c	/^static PetscErrorCode MatMult_Cayley(Mat B,Vec x,Vec y)$/;"	f	file:
 MatMult_Cross	src/svd/impls/cross/cross.c	/^static PetscErrorCode MatMult_Cross(Mat B,Vec x,Vec y)$/;"	f	file:
 MatMult_Cyclic	src/svd/impls/cyclic/cyclic.c	/^static PetscErrorCode MatMult_Cyclic(Mat B,Vec x,Vec y)$/;"	f	file:
 MatMult_Fold	src/eps/examples/tutorials/ex24.c	/^PetscErrorCode MatMult_Fold(Mat M,Vec x,Vec y)$/;"	f
 MatMult_Fun	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)$/;"	f
+MatMult_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)$/;"	f	file:
+MatMult_Identity	src/pep/examples/tutorials/ex28.c	/^PetscErrorCode MatMult_Identity(Mat A,Vec x,Vec y)$/;"	f
 MatMult_Jac	src/nep/examples/tutorials/ex21.c	/^PetscErrorCode MatMult_Jac(Mat A,Vec x,Vec y)$/;"	f
 MatMult_Laplacian2D	src/eps/examples/tests/test8.c	/^PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)$/;"	f
 MatMult_Laplacian2D	src/eps/examples/tutorials/ex3.c	/^PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)$/;"	f
+MatMult_Laplacian2D	src/pep/examples/tutorials/ex28.c	/^PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)$/;"	f
 MatMult_Linear_Shift	src/pep/impls/linear/linear.c	/^static PetscErrorCode MatMult_Linear_Shift(Mat M,Vec x,Vec y)$/;"	f	file:
 MatMult_Linear_Sinvert	src/pep/impls/linear/linear.c	/^static PetscErrorCode MatMult_Linear_Sinvert(Mat M,Vec x,Vec y)$/;"	f	file:
 MatMult_Shell	src/sys/classes/st/examples/tests/test1.c	/^static PetscErrorCode MatMult_Shell(Mat S,Vec x,Vec y)$/;"	f	file:
 MatMult_Shell	src/sys/classes/st/interface/stshellmat.c	/^static PetscErrorCode MatMult_Shell(Mat A,Vec x,Vec y)$/;"	f	file:
 MatMult_TRLAN	src/eps/impls/external/trlan/trlan.c	/^static PetscBLASInt MatMult_TRLAN(PetscBLASInt *n,PetscBLASInt *m,PetscReal *xin,PetscBLASInt *ldx,PetscReal *yout,PetscBLASInt *ldy)$/;"	f	file:
+MatMult_Zero	src/pep/examples/tutorials/ex28.c	/^PetscErrorCode MatMult_Zero(Mat A,Vec x,Vec y)$/;"	f
 MatMult_dvd_jd	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode MatMult_dvd_jd(Mat A,Vec in,Vec out)$/;"	f	file:
+MatScale_Fun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode MatScale_Fun(Mat M,PetscScalar a)$/;"	f	file:
+MatShift_Brussel	src/eps/examples/tutorials/ex30.c	/^PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)$/;"	f
 MatShift_Brussel	src/eps/examples/tutorials/ex9.c	/^PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)$/;"	f
 MatType_t	include/slepc/private/vecimplslepc.h	/^typedef PetscInt MatType_t;$/;"	t
-Method_t	src/eps/impls/davidson/davidson.h	/^} Method_t;$/;"	t	typeref:enum:__anon52
 Mistakes	config/cmakegen.py	/^class Mistakes(object):$/;"	c
-Mm	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *Mm;$/;"	m	struct:__anon86	file:
 MyArbitrarySelection	src/eps/examples/tests/test13.c	/^PetscErrorCode MyArbitrarySelection(PetscScalar eigr,PetscScalar eigi,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx)$/;"	f
 MyConvergedAbsolute	src/eps/examples/tests/test16.c	/^PetscErrorCode MyConvergedAbsolute(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 MyEPSMonitor	src/eps/examples/tests/test15f.F	/^      subroutine MyEPSMonitor(/;"	s
@@ -2557,32 +2744,43 @@ MyEigenSort	src/eps/examples/tests/test9.c	/^PetscErrorCode MyEigenSort(PetscSca
 MyEigenSort	src/eps/examples/tutorials/ex18.c	/^PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)$/;"	f
 MyEigenSort	src/pep/examples/nlevp/pdde_stability.c	/^PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)$/;"	f
 MyShellMatCreate	src/sys/classes/st/examples/tests/test1.c	/^static PetscErrorCode MyShellMatCreate(Mat *A,Mat *M)$/;"	f	file:
+MyStoppingTest	src/eps/examples/tutorials/ex29.c	/^PetscErrorCode MyStoppingTest(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)$/;"	f
+MyStoppingTest	src/eps/examples/tutorials/ex30.c	/^PetscErrorCode MyStoppingTest(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ptr)$/;"	f
 N	include/slepc/private/bvimpl.h	/^  PetscInt           n,N;          \/* dimensions of vectors (local, global) *\/$/;"	m	struct:_p_BV
-N	include/slepc/private/vecimplslepc.h	/^  PetscInt      N;        \/* virtual global size *\/$/;"	m	struct:__anon5
-N	src/eps/impls/ciss/ciss.c	/^  PetscInt    N;          \/* number of integration points (32) *\/$/;"	m	struct:__anon47	file:
-N	src/nep/impls/ciss/nciss.c	/^  PetscInt     N;          \/* number of integration points (32) *\/$/;"	m	struct:__anon77	file:
+N	include/slepc/private/vecimplslepc.h	/^  PetscInt      N;        \/* virtual global size *\/$/;"	m	struct:__anon7
+N	src/eps/impls/ciss/ciss.c	/^  PetscInt          N;          \/* number of integration points (32) *\/$/;"	m	struct:__anon61	file:
+N	src/nep/impls/ciss/nciss.c	/^  PetscInt     N;          \/* number of integration points (32) *\/$/;"	m	struct:__anon89	file:
+NDPOINTS	src/nep/impls/nleigs/nleigs.c	41;"	d	file:
 NEP	include/slepc/finclude/slepcnepdef.h	34;"	d
 NEP	include/slepcnep.h	/^typedef struct _p_NEP* NEP;$/;"	t	typeref:struct:_p_NEP
 NEPAllocateSolution	src/nep/interface/nepsetup.c	/^PetscErrorCode NEPAllocateSolution(NEP nep,PetscInt extra)$/;"	f
 NEPAppendOptionsPrefix	src/nep/interface/nepopts.c	/^PetscErrorCode NEPAppendOptionsPrefix(NEP nep,const char *prefix)$/;"	f
 NEPApplyFunction	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A,Mat B)$/;"	f
 NEPApplyJacobian	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPApplyJacobian(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)$/;"	f
-NEPCISS	include/slepc/finclude/slepcnepdef.h	46;"	d
+NEPCISS	include/slepc/finclude/slepcnepdef.h	49;"	d
 NEPCISS	include/slepcnep.h	53;"	d
-NEPCISSGetRefinement	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *outer,PetscInt *blsize)$/;"	f
-NEPCISSGetRefinement_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt *outer,PetscInt *blsize)$/;"	f	file:
-NEPCISSGetSizes	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)$/;"	f
-NEPCISSGetSizes_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)$/;"	f	file:
+NEPCISSGetRefinement	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *blsize)$/;"	f
+NEPCISSGetRefinement_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt *blsize)$/;"	f	file:
+NEPCISSGetSizes	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)$/;"	f
+NEPCISSGetSizes_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)$/;"	f	file:
 NEPCISSGetThreshold	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSGetThreshold(NEP nep,PetscReal *delta,PetscReal *spur)$/;"	f
 NEPCISSGetThreshold_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSGetThreshold_CISS(NEP nep,PetscReal *delta,PetscReal *spur)$/;"	f	file:
-NEPCISSSetRefinement	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt outer,PetscInt blsize)$/;"	f
-NEPCISSSetRefinement_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt outer,PetscInt blsize)$/;"	f	file:
-NEPCISSSetSizes	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)$/;"	f
-NEPCISSSetSizes_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)$/;"	f	file:
+NEPCISSSetRefinement	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt blsize)$/;"	f
+NEPCISSSetRefinement_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt blsize)$/;"	f	file:
+NEPCISSSetSizes	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)$/;"	f
+NEPCISSSetSizes_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)$/;"	f	file:
 NEPCISSSetThreshold	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPCISSSetThreshold(NEP nep,PetscReal delta,PetscReal spur)$/;"	f
 NEPCISSSetThreshold_CISS	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode NEPCISSSetThreshold_CISS(NEP nep,PetscReal delta,PetscReal spur)$/;"	f	file:
-NEPCheckSolved	include/slepc/private/nepimpl.h	131;"	d
-NEPCheckSolved	include/slepc/private/nepimpl.h	135;"	d
+NEPCheckCallback	include/slepc/private/nepimpl.h	145;"	d
+NEPCheckCallback	include/slepc/private/nepimpl.h	157;"	d
+NEPCheckDerivatives	include/slepc/private/nepimpl.h	147;"	d
+NEPCheckDerivatives	include/slepc/private/nepimpl.h	167;"	d
+NEPCheckProblem	include/slepc/private/nepimpl.h	144;"	d
+NEPCheckProblem	include/slepc/private/nepimpl.h	152;"	d
+NEPCheckSolved	include/slepc/private/nepimpl.h	148;"	d
+NEPCheckSolved	include/slepc/private/nepimpl.h	172;"	d
+NEPCheckSplit	include/slepc/private/nepimpl.h	146;"	d
+NEPCheckSplit	include/slepc/private/nepimpl.h	162;"	d
 NEPComputeError	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *error)$/;"	f
 NEPComputeFunction	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPComputeFunction(NEP nep,PetscScalar lambda,Mat A,Mat B)$/;"	f
 NEPComputeJacobian	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPComputeJacobian(NEP nep,PetscScalar lambda,Mat A)$/;"	f
@@ -2590,24 +2788,34 @@ NEPComputeRelativeError	include/slepcnep.h	/^PETSC_DEPRECATED("Use NEPComputeErr
 NEPComputeResidualNorm	include/slepcnep.h	/^PETSC_DEPRECATED("Use NEPComputeError() with NEP_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode NEPComputeResidualNorm(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_ABSOLUTE,r);}$/;"	f
 NEPComputeResidualNorm_Private	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPComputeResidualNorm_Private(NEP nep,PetscScalar lambda,Vec x,Vec *w,PetscReal *norm)$/;"	f
 NEPComputeVectors	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPComputeVectors(NEP nep)$/;"	f
-NEPConvergedDefault	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPConvergedDefault(NEP nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,NEPConvergedReason *reason,void *ctx)$/;"	f
+NEPComputeVectors_Schur	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPComputeVectors_Schur(NEP nep)$/;"	f
+NEPConv	include/slepc/finclude/slepcnepdef.h	41;"	d
+NEPConv	include/slepcnep.h	/^               NEP_CONV_USER } NEPConv;$/;"	t	typeref:enum:__anon34
+NEPConvMonitorSetFromOptions	src/nep/interface/nepopts.c	/^PetscErrorCode NEPConvMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))$/;"	f
+NEPConvergedAbsolute	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPConvergedAbsolute(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
+NEPConvergedNorm	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPConvergedNorm(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 NEPConvergedReason	include/slepc/finclude/slepcnepdef.h	38;"	d
-NEPConvergedReason	include/slepcnep.h	/^              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;$/;"	t	typeref:enum:__anon28
+NEPConvergedReason	include/slepcnep.h	/^              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;$/;"	t	typeref:enum:__anon36
 NEPConvergedReasons	include/slepcnep.h	/^PETSC_EXTERN const char *const*NEPConvergedReasons;$/;"	v
-NEPConvergedReasons	src/nep/interface/dlregisnep.c	/^const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 5;$/;"	v
-NEPConvergedReasons_Shifted	src/nep/interface/dlregisnep.c	/^const char *const NEPConvergedReasons_Shifted[] = {"DIVERGED_FNORM_NAN","DIVERGED_BREAKDOWN","DIVERGED_MAX_IT","DIVERGED_FUNCTION_COUNT","DIVERGED_LINEAR_SOLVE","CONVERGED_ITERATING","","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE","CONVERGED_SNORM_RELATIVE","NEPConvergedReason","NEP_",0};$/;"	v
+NEPConvergedReasons	src/nep/interface/dlregisnep.c	/^const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 4;$/;"	v
+NEPConvergedReasons_Shifted	src/nep/interface/dlregisnep.c	/^const char *const NEPConvergedReasons_Shifted[] = {"DIVERGED_LINEAR_SOLVE","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","NEPConvergedReason","NEP_",0};$/;"	v
+NEPConvergedRelative	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPConvergedRelative(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 NEPCreate	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPCreate(MPI_Comm comm,NEP *outnep)$/;"	f
 NEPCreate_CISS	src/nep/impls/ciss/nciss.c	/^PETSC_EXTERN PetscErrorCode NEPCreate_CISS(NEP nep)$/;"	f
 NEPCreate_Interpol	src/nep/impls/interpol/interpol.c	/^PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(NEP nep)$/;"	f
 NEPCreate_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(NEP nep)$/;"	f
+NEPCreate_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PETSC_EXTERN PetscErrorCode NEPCreate_NLEIGS(NEP nep)$/;"	f
 NEPCreate_RII	src/nep/impls/rii/rii.c	/^PETSC_EXTERN PetscErrorCode NEPCreate_RII(NEP nep)$/;"	f
 NEPCreate_SLP	src/nep/impls/slp/slp.c	/^PETSC_EXTERN PetscErrorCode NEPCreate_SLP(NEP nep)$/;"	f
 NEPDestroy	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPDestroy(NEP *nep)$/;"	f
 NEPDestroy_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPDestroy_CISS(NEP nep)$/;"	f
 NEPDestroy_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPDestroy_Interpol(NEP nep)$/;"	f
+NEPDestroy_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPDestroy_NArnoldi(NEP nep)$/;"	f
+NEPDestroy_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPDestroy_NLEIGS(NEP nep)$/;"	f
+NEPDestroy_RII	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPDestroy_RII(NEP nep)$/;"	f
 NEPDestroy_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPDestroy_SLP(NEP nep)$/;"	f
 NEPErrorType	include/slepc/finclude/slepcnepdef.h	39;"	d
-NEPErrorType	include/slepcnep.h	/^               NEP_ERROR_RELATIVE } NEPErrorType;$/;"	t	typeref:enum:__anon26
+NEPErrorType	include/slepcnep.h	/^               NEP_ERROR_BACKWARD } NEPErrorType;$/;"	t	typeref:enum:__anon31
 NEPErrorTypes	include/slepcnep.h	/^PETSC_EXTERN const char *NEPErrorTypes[];$/;"	v
 NEPErrorTypes	src/nep/interface/dlregisnep.c	/^const char *NEPErrorTypes[] = {"ABSOLUTE","RELATIVE","NEPErrorType","NEP_ERROR_",0};$/;"	v
 NEPErrorView	src/nep/interface/nepview.c	/^PetscErrorCode NEPErrorView(NEP nep,NEPErrorType etype,PetscViewer viewer)$/;"	f
@@ -2617,31 +2825,31 @@ NEPErrorView_DETAIL	src/nep/interface/nepview.c	/^static PetscErrorCode NEPError
 NEPErrorView_MATLAB	src/nep/interface/nepview.c	/^static PetscErrorCode NEPErrorView_MATLAB(NEP nep,NEPErrorType etype,PetscViewer viewer)$/;"	f	file:
 NEPFinalizePackage	src/nep/interface/dlregisnep.c	/^PetscErrorCode NEPFinalizePackage(void)$/;"	f
 NEPGetBV	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetBV(NEP nep,BV *bv)$/;"	f
-NEPGetConstCorrectionTol	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetConstCorrectionTol(NEP nep,PetscBool *cct)$/;"	f
 NEPGetConverged	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPGetConverged(NEP nep,PetscInt *nconv)$/;"	f
 NEPGetConvergedReason	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPGetConvergedReason(NEP nep,NEPConvergedReason *reason)$/;"	f
+NEPGetConvergenceTest	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetConvergenceTest(NEP nep,NEPConv *conv)$/;"	f
 NEPGetDS	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetDS(NEP nep,DS *ds)$/;"	f
 NEPGetDefaultShift	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPGetDefaultShift(NEP nep,PetscScalar *sigma)$/;"	f
+NEPGetDerivatives	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetDerivatives(NEP nep,Mat *A,PetscErrorCode (**der)(NEP,PetscScalar,PetscInt,Mat,void*),void **ctx)$/;"	f
 NEPGetDimensions	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetDimensions(NEP nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)$/;"	f
 NEPGetEigenpair	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPGetEigenpair(NEP nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)$/;"	f
 NEPGetErrorEstimate	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPGetErrorEstimate(NEP nep,PetscInt i,PetscReal *errest)$/;"	f
 NEPGetFunction	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetFunction(NEP nep,Mat *A,Mat *B,PetscErrorCode (**fun)(NEP,PetscScalar,Mat,Mat,void*),void **ctx)$/;"	f
 NEPGetIterationNumber	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPGetIterationNumber(NEP nep,PetscInt *its)$/;"	f
 NEPGetJacobian	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetJacobian(NEP nep,Mat *A,PetscErrorCode (**jac)(NEP,PetscScalar,Mat,void*),void **ctx)$/;"	f
-NEPGetKSP	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetKSP(NEP nep,KSP *ksp)$/;"	f
-NEPGetLagPreconditioner	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetLagPreconditioner(NEP nep,PetscInt *lag)$/;"	f
 NEPGetMonitorContext	src/nep/interface/nepmon.c	/^PetscErrorCode NEPGetMonitorContext(NEP nep,void **ctx)$/;"	f
 NEPGetOptionsPrefix	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetOptionsPrefix(NEP nep,const char *prefix[])$/;"	f
 NEPGetRG	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetRG(NEP nep,RG *rg)$/;"	f
-NEPGetRefine	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its)$/;"	f
+NEPGetRefine	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,NEPRefineScheme *scheme)$/;"	f
 NEPGetSplitOperatorInfo	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetSplitOperatorInfo(NEP nep,PetscInt *n,MatStructure *str)$/;"	f
 NEPGetSplitOperatorTerm	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetSplitOperatorTerm(NEP nep,PetscInt k,Mat *A,FN *f)$/;"	f
+NEPGetStoppingTest	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetStoppingTest(NEP nep,NEPStop *stop)$/;"	f
 NEPGetTarget	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetTarget(NEP nep,PetscScalar* target)$/;"	f
-NEPGetTolerances	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf)$/;"	f
+NEPGetTolerances	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *tol,PetscInt *maxits)$/;"	f
 NEPGetTrackAll	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetTrackAll(NEP nep,PetscBool *trackall)$/;"	f
 NEPGetType	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPGetType(NEP nep,NEPType *type)$/;"	f
 NEPGetWhichEigenpairs	src/nep/interface/nepopts.c	/^PetscErrorCode NEPGetWhichEigenpairs(NEP nep,NEPWhich *which)$/;"	f
-NEPINTERPOL	include/slepc/finclude/slepcnepdef.h	47;"	d
+NEPINTERPOL	include/slepc/finclude/slepcnepdef.h	50;"	d
 NEPINTERPOL	include/slepcnep.h	54;"	d
 NEPInitializePackage	src/nep/interface/dlregisnep.c	/^PetscErrorCode NEPInitializePackage(void)$/;"	f
 NEPInterpolGetDegree	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPInterpolGetDegree(NEP nep,PetscInt *deg)$/;"	f
@@ -2654,26 +2862,94 @@ NEPInterpolSetPEP	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPInterpol
 NEPInterpolSetPEP_Interpol	src/nep/impls/interpol/interpol.c	/^static PetscErrorCode NEPInterpolSetPEP_Interpol(NEP nep,PEP pep)$/;"	f	file:
 NEPList	include/slepcnep.h	/^PETSC_EXTERN PetscFunctionList NEPList;$/;"	v
 NEPList	src/nep/interface/nepbasic.c	/^PetscFunctionList NEPList = 0;$/;"	v
-NEPMonitor	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest)$/;"	f
-NEPMonitorAll	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+NEPMonitor	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest)$/;"	f
+NEPMonitorAll	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
 NEPMonitorCancel	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorCancel(NEP nep)$/;"	f
-NEPMonitorConverged	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-NEPMonitorFirst	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-NEPMonitorLG	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorLG(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-NEPMonitorLGAll	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-NEPMonitorSet	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))$/;"	f
-NEPNARNOLDI	include/slepc/finclude/slepcnepdef.h	45;"	d
+NEPMonitorConverged	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)$/;"	f
+NEPMonitorFirst	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
+NEPMonitorLG	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorLG(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+NEPMonitorLGAll	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+NEPMonitorLGCreate	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)$/;"	f
+NEPMonitorSet	src/nep/interface/nepmon.c	/^PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))$/;"	f
+NEPMonitorSetFromOptions	src/nep/interface/nepopts.c	/^PetscErrorCode NEPMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)$/;"	f
+NEPNARNOLDI	include/slepc/finclude/slepcnepdef.h	48;"	d
 NEPNARNOLDI	include/slepcnep.h	52;"	d
-NEPNewtonRefinementSimple	src/nep/interface/neprefine.c	/^PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol,PetscInt k)$/;"	f
+NEPNArnoldiGetKSP	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPNArnoldiGetKSP(NEP nep,KSP *ksp)$/;"	f
+NEPNArnoldiGetKSP_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^static PetscErrorCode NEPNArnoldiGetKSP_NArnoldi(NEP nep,KSP *ksp)$/;"	f	file:
+NEPNArnoldiSetKSP	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPNArnoldiSetKSP(NEP nep,KSP ksp)$/;"	f
+NEPNArnoldiSetKSP_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^static PetscErrorCode NEPNArnoldiSetKSP_NArnoldi(NEP nep,KSP ksp)$/;"	f	file:
+NEPNArnoldi_KSPSolve	src/nep/impls/narnoldi/narnoldi.c	/^PETSC_STATIC_INLINE PetscErrorCode NEPNArnoldi_KSPSolve(NEP nep,Vec b,Vec x)$/;"	f
+NEPNLEIGS	include/slepc/finclude/slepcnepdef.h	51;"	d
+NEPNLEIGS	include/slepcnep.h	55;"	d
+NEPNLEIGSBackTransform	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSBackTransform(PetscObject ob,PetscInt n,PetscScalar *valr,PetscScalar *vali)$/;"	f	file:
+NEPNLEIGSDividedDifferences_callback	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSDividedDifferences_callback(NEP nep)$/;"	f	file:
+NEPNLEIGSDividedDifferences_split	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSDividedDifferences_split(NEP nep)$/;"	f	file:
+NEPNLEIGSEvalNRTFunct	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSEvalNRTFunct(NEP nep,PetscInt k,PetscScalar sigma,PetscScalar *b)$/;"	f	file:
+NEPNLEIGSGetInterpolation	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetInterpolation(NEP nep,PetscReal *tol,PetscInt *maxits)$/;"	f
+NEPNLEIGSGetInterpolation_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetInterpolation_NLEIGS(NEP nep,PetscReal *tol,PetscInt *maxits)$/;"	f	file:
+NEPNLEIGSGetKSPs	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetKSPs(NEP nep,KSP **ksp)$/;"	f
+NEPNLEIGSGetKSPs_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetKSPs_NLEIGS(NEP nep,KSP **ksp)$/;"	f	file:
+NEPNLEIGSGetLocking	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetLocking(NEP nep,PetscBool *lock)$/;"	f
+NEPNLEIGSGetLocking_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetLocking_NLEIGS(NEP nep,PetscBool *lock)$/;"	f	file:
+NEPNLEIGSGetRKShifts	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetRKShifts(NEP nep,PetscInt *ns,PetscScalar **shifts)$/;"	f
+NEPNLEIGSGetRKShifts_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetRKShifts_NLEIGS(NEP nep,PetscInt *ns,PetscScalar **shifts)$/;"	f	file:
+NEPNLEIGSGetRestart	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetRestart(NEP nep,PetscReal *keep)$/;"	f
+NEPNLEIGSGetRestart_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetRestart_NLEIGS(NEP nep,PetscReal *keep)$/;"	f	file:
+NEPNLEIGSGetSingularitiesFunction	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetSingularitiesFunction(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)$/;"	f
+NEPNLEIGSGetSingularitiesFunction_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetSingularitiesFunction_NLEIGS(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)$/;"	f	file:
+NEPNLEIGSGetTrueResidual	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSGetTrueResidual(NEP nep,PetscBool *trueres)$/;"	f
+NEPNLEIGSGetTrueResidual_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSGetTrueResidual_NLEIGS(NEP nep,PetscBool *trueres)$/;"	f	file:
+NEPNLEIGSKrylovConvergence	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSKrylovConvergence(NEP nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscBool getall,PetscInt kini,PetscInt nits,PetscScalar betak,PetscReal betah,PetscInt *kout,Vec *w)$/;"	f	file:
+NEPNLEIGSLejaBagbyPoints	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSLejaBagbyPoints(NEP nep)$/;"	f	file:
+NEPNLEIGSNormEstimation	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSNormEstimation(NEP nep,Mat M,PetscReal *norm,Vec *w)$/;"	f	file:
+NEPNLEIGSRitzVector	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSRitzVector(NEP nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscInt k,Vec t)$/;"	f	file:
+NEPNLEIGSSetInterpolation	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSSetInterpolation(NEP nep,PetscReal tol,PetscInt maxits)$/;"	f
+NEPNLEIGSSetInterpolation_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSSetInterpolation_NLEIGS(NEP nep,PetscReal tol,PetscInt maxits)$/;"	f	file:
+NEPNLEIGSSetLocking	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSSetLocking(NEP nep,PetscBool lock)$/;"	f
+NEPNLEIGSSetLocking_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSSetLocking_NLEIGS(NEP nep,PetscBool lock)$/;"	f	file:
+NEPNLEIGSSetRKShifts	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSSetRKShifts(NEP nep,PetscInt ns,PetscScalar *shifts)$/;"	f
+NEPNLEIGSSetRKShifts_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSSetRKShifts_NLEIGS(NEP nep,PetscInt ns,PetscScalar *shifts)$/;"	f	file:
+NEPNLEIGSSetRestart	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSSetRestart(NEP nep,PetscReal keep)$/;"	f
+NEPNLEIGSSetRestart_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSSetRestart_NLEIGS(NEP nep,PetscReal keep)$/;"	f	file:
+NEPNLEIGSSetShifts	src/nep/impls/nleigs/nleigs.c	/^PETSC_STATIC_INLINE PetscErrorCode NEPNLEIGSSetShifts(NEP nep)$/;"	f
+NEPNLEIGSSetSingularitiesFunction	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSSetSingularitiesFunction(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)$/;"	f
+NEPNLEIGSSetSingularitiesFunction_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSSetSingularitiesFunction_NLEIGS(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)$/;"	f	file:
+NEPNLEIGSSetTrueResidual	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPNLEIGSSetTrueResidual(NEP nep,PetscBool trueres)$/;"	f
+NEPNLEIGSSetTrueResidual_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSSetTrueResidual_NLEIGS(NEP nep,PetscBool trueres)$/;"	f	file:
+NEPNLEIGSTOARrun	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGSTOARrun(NEP nep,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *K,PetscScalar *H,PetscInt ldh,BV V,PetscInt k,PetscInt *M,PetscBool *breakdown,Vec *t_)$/;"	f	file:
+NEPNLEIGS_RKcontinuation	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPNLEIGS_RKcontinuation(NEP nep,PetscInt ini,PetscInt end,PetscScalar *K,PetscScalar *H,PetscInt ld,PetscScalar sigma,PetscScalar *S,PetscInt lds,PetscScalar *cont,PetscScalar *t,PetscScalar *work)$/;"	f	file:
+NEPNewtonRefinementSimple	src/nep/interface/neprefine.c	/^PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal tol,PetscInt k)$/;"	f
 NEPOps	include/slepc/private/nepimpl.h	/^typedef struct _NEPOps *NEPOps;$/;"	t	typeref:struct:_NEPOps
 NEPPackageInitialized	src/nep/interface/dlregisnep.c	/^static PetscBool NEPPackageInitialized = PETSC_FALSE;$/;"	v	file:
 NEPProjectOperator	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPProjectOperator(NEP nep,PetscInt j0,PetscInt j1)$/;"	f
-NEPRII	include/slepc/finclude/slepcnepdef.h	43;"	d
+NEPRII	include/slepc/finclude/slepcnepdef.h	46;"	d
 NEPRII	include/slepcnep.h	50;"	d
+NEPRIIGetConstCorrectionTol	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIIGetConstCorrectionTol(NEP nep,PetscBool *cct)$/;"	f
+NEPRIIGetConstCorrectionTol_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIIGetConstCorrectionTol_RII(NEP nep,PetscBool *cct)$/;"	f	file:
+NEPRIIGetKSP	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIIGetKSP(NEP nep,KSP *ksp)$/;"	f
+NEPRIIGetKSP_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIIGetKSP_RII(NEP nep,KSP *ksp)$/;"	f	file:
+NEPRIIGetLagPreconditioner	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIIGetLagPreconditioner(NEP nep,PetscInt *lag)$/;"	f
+NEPRIIGetLagPreconditioner_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIIGetLagPreconditioner_RII(NEP nep,PetscInt *lag)$/;"	f	file:
+NEPRIIGetMaximumIterations	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIIGetMaximumIterations(NEP nep,PetscInt *its)$/;"	f
+NEPRIIGetMaximumIterations_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIIGetMaximumIterations_RII(NEP nep,PetscInt *its)$/;"	f	file:
+NEPRIISetConstCorrectionTol	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIISetConstCorrectionTol(NEP nep,PetscBool cct)$/;"	f
+NEPRIISetConstCorrectionTol_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIISetConstCorrectionTol_RII(NEP nep,PetscBool cct)$/;"	f	file:
+NEPRIISetKSP	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIISetKSP(NEP nep,KSP ksp)$/;"	f
+NEPRIISetKSP_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIISetKSP_RII(NEP nep,KSP ksp)$/;"	f	file:
+NEPRIISetLagPreconditioner	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIISetLagPreconditioner(NEP nep,PetscInt lag)$/;"	f
+NEPRIISetLagPreconditioner_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIISetLagPreconditioner_RII(NEP nep,PetscInt lag)$/;"	f	file:
+NEPRIISetMaximumIterations	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPRIISetMaximumIterations(NEP nep,PetscInt its)$/;"	f
+NEPRIISetMaximumIterations_RII	src/nep/impls/rii/rii.c	/^static PetscErrorCode NEPRIISetMaximumIterations_RII(NEP nep,PetscInt its)$/;"	f	file:
+NEPRII_KSPSolve	src/nep/impls/rii/rii.c	/^PETSC_STATIC_INLINE PetscErrorCode NEPRII_KSPSolve(NEP nep,Vec b,Vec x)$/;"	f
 NEPReasonView	src/nep/interface/nepview.c	/^PetscErrorCode NEPReasonView(NEP nep,PetscViewer viewer)$/;"	f
 NEPReasonViewFromOptions	src/nep/interface/nepview.c	/^PetscErrorCode NEPReasonViewFromOptions(NEP nep)$/;"	f
-NEPRefine	include/slepc/finclude/slepcnepdef.h	41;"	d
-NEPRefine	include/slepcnep.h	/^               NEP_REFINE_MULTIPLE } NEPRefine;$/;"	t	typeref:enum:__anon27
+NEPRefine	include/slepc/finclude/slepcnepdef.h	43;"	d
+NEPRefine	include/slepcnep.h	/^               NEP_REFINE_MULTIPLE } NEPRefine;$/;"	t	typeref:enum:__anon32
+NEPRefineGetKSP	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPRefineGetKSP(NEP nep,KSP *ksp)$/;"	f
+NEPRefineScheme	include/slepc/finclude/slepcnepdef.h	44;"	d
+NEPRefineScheme	include/slepcnep.h	/^               NEP_REFINE_SCHEME_EXPLICIT } NEPRefineScheme;$/;"	t	typeref:enum:__anon33
+NEPRefineSchemes	include/slepcnep.h	/^PETSC_EXTERN const char *NEPRefineSchemes[];$/;"	v
+NEPRefineSchemes	src/nep/interface/dlregisnep.c	/^const char *NEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","NEPRefineScheme","NEP_REFINE_SCHEME_",0};$/;"	v
 NEPRefineTypes	include/slepcnep.h	/^PETSC_EXTERN const char *NEPRefineTypes[];$/;"	v
 NEPRefineTypes	src/nep/interface/dlregisnep.c	/^const char *NEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","NEPRefine","NEP_REFINE_",0};$/;"	v
 NEPRegister	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPRegister(const char *name,PetscErrorCode (*function)(NEP))$/;"	f
@@ -2683,57 +2959,77 @@ NEPRegisterAllCalled	src/nep/interface/nepbasic.c	/^PetscBool         NEPRegiste
 NEPReset	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPReset(NEP nep)$/;"	f
 NEPReset_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPReset_CISS(NEP nep)$/;"	f
 NEPReset_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPReset_Interpol(NEP nep)$/;"	f
+NEPReset_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPReset_NLEIGS(NEP nep)$/;"	f
+NEPReset_Problem	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPReset_Problem(NEP nep)$/;"	f
 NEPReset_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPReset_SLP(NEP nep)$/;"	f
-NEPSLP	include/slepc/finclude/slepcnepdef.h	44;"	d
+NEPSLP	include/slepc/finclude/slepcnepdef.h	47;"	d
 NEPSLP	include/slepcnep.h	51;"	d
 NEPSLPGetEPS	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPSLPGetEPS(NEP nep,EPS *eps)$/;"	f
 NEPSLPGetEPS_SLP	src/nep/impls/slp/slp.c	/^static PetscErrorCode NEPSLPGetEPS_SLP(NEP nep,EPS *eps)$/;"	f	file:
 NEPSLPSetEPS	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPSLPSetEPS(NEP nep,EPS eps)$/;"	f
 NEPSLPSetEPS_SLP	src/nep/impls/slp/slp.c	/^static PetscErrorCode NEPSLPSetEPS_SLP(NEP nep,EPS eps)$/;"	f	file:
 NEPSetBV	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetBV(NEP nep,BV bv)$/;"	f
-NEPSetConstCorrectionTol	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetConstCorrectionTol(NEP nep,PetscBool cct)$/;"	f
-NEPSetConvergenceTest	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetConvergenceTest(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
+NEPSetConvergenceTest	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetConvergenceTest(NEP nep,NEPConv conv)$/;"	f
+NEPSetConvergenceTestFunction	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetConvergenceTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
 NEPSetDS	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetDS(NEP nep,DS ds)$/;"	f
+NEPSetDerivatives	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetDerivatives(NEP nep,Mat A,PetscErrorCode (*der)(NEP,PetscScalar,PetscInt,Mat,void*),void *ctx)$/;"	f
 NEPSetDimensions	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)$/;"	f
+NEPSetDimensions_Default	src/nep/interface/nepsetup.c	/^PetscErrorCode NEPSetDimensions_Default(NEP nep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)$/;"	f
+NEPSetEigenvalueComparison	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetEigenvalueComparison(NEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)$/;"	f
 NEPSetFromOptions	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetFromOptions(NEP nep)$/;"	f
-NEPSetFromOptions_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPSetFromOptions_CISS(PetscOptions *PetscOptionsObject,NEP nep)$/;"	f
-NEPSetFromOptions_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPSetFromOptions_Interpol(PetscOptions *PetscOptionsObject,NEP nep)$/;"	f
-NEPSetFromOptions_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPSetFromOptions_SLP(PetscOptions *PetscOptionsObject,NEP nep)$/;"	f
+NEPSetFromOptions_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,NEP nep)$/;"	f
+NEPSetFromOptions_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPSetFromOptions_Interpol(PetscOptionItems *PetscOptionsObject,NEP nep)$/;"	f
+NEPSetFromOptions_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPSetFromOptions_NArnoldi(PetscOptionItems *PetscOptionsObject,NEP nep)$/;"	f
+NEPSetFromOptions_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPSetFromOptions_NLEIGS(PetscOptionItems *PetscOptionsObject,NEP nep)$/;"	f
+NEPSetFromOptions_RII	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPSetFromOptions_RII(PetscOptionItems *PetscOptionsObject,NEP nep)$/;"	f
+NEPSetFromOptions_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPSetFromOptions_SLP(PetscOptionItems *PetscOptionsObject,NEP nep)$/;"	f
 NEPSetFunction	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetFunction(NEP nep,Mat A,Mat B,PetscErrorCode (*fun)(NEP,PetscScalar,Mat,Mat,void*),void *ctx)$/;"	f
 NEPSetInitialSpace	src/nep/interface/nepsetup.c	/^PetscErrorCode NEPSetInitialSpace(NEP nep,PetscInt n,Vec *is)$/;"	f
 NEPSetJacobian	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScalar,Mat,void*),void *ctx)$/;"	f
-NEPSetKSP	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetKSP(NEP nep,KSP ksp)$/;"	f
-NEPSetLagPreconditioner	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetLagPreconditioner(NEP nep,PetscInt lag)$/;"	f
 NEPSetOptionsPrefix	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetOptionsPrefix(NEP nep,const char *prefix)$/;"	f
 NEPSetRG	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetRG(NEP nep,RG rg)$/;"	f
-NEPSetRefine	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its)$/;"	f
+NEPSetRefine	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,NEPRefineScheme scheme)$/;"	f
 NEPSetSplitOperator	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetSplitOperator(NEP nep,PetscInt n,Mat A[],FN f[],MatStructure str)$/;"	f
+NEPSetStoppingTest	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetStoppingTest(NEP nep,NEPStop stop)$/;"	f
+NEPSetStoppingTestFunction	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetStoppingTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
 NEPSetTarget	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetTarget(NEP nep,PetscScalar target)$/;"	f
-NEPSetTolerances	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetTolerances(NEP nep,PetscReal abstol,PetscReal rtol,PetscReal stol,PetscInt maxit,PetscInt maxf)$/;"	f
+NEPSetTolerances	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetTolerances(NEP nep,PetscReal tol,PetscInt maxits)$/;"	f
 NEPSetTrackAll	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetTrackAll(NEP nep,PetscBool trackall)$/;"	f
 NEPSetType	src/nep/interface/nepbasic.c	/^PetscErrorCode NEPSetType(NEP nep,NEPType type)$/;"	f
 NEPSetUp	src/nep/interface/nepsetup.c	/^PetscErrorCode NEPSetUp(NEP nep)$/;"	f
 NEPSetUp_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPSetUp_CISS(NEP nep)$/;"	f
 NEPSetUp_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPSetUp_Interpol(NEP nep)$/;"	f
 NEPSetUp_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPSetUp_NArnoldi(NEP nep)$/;"	f
+NEPSetUp_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPSetUp_NLEIGS(NEP nep)$/;"	f
 NEPSetUp_RII	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPSetUp_RII(NEP nep)$/;"	f
 NEPSetUp_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPSetUp_SLP(NEP nep)$/;"	f
 NEPSetWhichEigenpairs	src/nep/interface/nepopts.c	/^PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)$/;"	f
 NEPSetWorkVecs	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPSetWorkVecs(NEP nep,PetscInt nw)$/;"	f
-NEPSimpNRefctx	src/nep/interface/neprefine.c	/^} NEPSimpNRefctx;$/;"	t	typeref:struct:__anon81	file:
-NEPSimpleNRefGatherEigenpair	src/nep/interface/neprefine.c	/^PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)$/;"	f
-NEPSimpleNRefScatterEigenvector	src/nep/interface/neprefine.c	/^PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)$/;"	f
+NEPSimpNRefctx	src/nep/interface/neprefine.c	/^} NEPSimpNRefctx;$/;"	t	typeref:struct:__anon97	file:
+NEPSimpleNRefGatherEigenpair	src/nep/interface/neprefine.c	/^static PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)$/;"	f	file:
+NEPSimpleNRefScatterEigenvector	src/nep/interface/neprefine.c	/^static PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)$/;"	f	file:
 NEPSimpleNRefSetUp	src/nep/interface/neprefine.c	/^static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)$/;"	f	file:
-NEPSimpleNRefSetUpSystem	src/nep/interface/neprefine.c	/^static PetscErrorCode NEPSimpleNRefSetUpSystem(NEP nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)$/;"	f	file:
+NEPSimpleNRefSetUpSystem	src/nep/interface/neprefine.c	/^static PetscErrorCode NEPSimpleNRefSetUpSystem(NEP nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)$/;"	f	file:
 NEPSolve	src/nep/interface/nepsolve.c	/^PetscErrorCode NEPSolve(NEP nep)$/;"	f
 NEPSolve_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPSolve_CISS(NEP nep)$/;"	f
 NEPSolve_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPSolve_Interpol(NEP nep)$/;"	f
 NEPSolve_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPSolve_NArnoldi(NEP nep)$/;"	f
+NEPSolve_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPSolve_NLEIGS(NEP nep)$/;"	f
 NEPSolve_RII	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPSolve_RII(NEP nep)$/;"	f
 NEPSolve_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPSolve_SLP(NEP nep)$/;"	f
 NEPStateType	include/slepc/private/nepimpl.h	/^               NEP_STATE_EIGENVECTORS } NEPStateType;$/;"	t	typeref:enum:__anon2
+NEPStop	include/slepc/finclude/slepcnepdef.h	42;"	d
+NEPStop	include/slepcnep.h	/^               NEP_STOP_USER } NEPStop;$/;"	t	typeref:enum:__anon35
+NEPStoppingBasic	src/nep/interface/nepdefault.c	/^PetscErrorCode NEPStoppingBasic(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)$/;"	f
+NEPTOARCoefficients	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPTOARCoefficients(NEP nep,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x,PetscScalar *work)$/;"	f	file:
+NEPTOARExtendBasis	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPTOARExtendBasis(NEP nep,PetscInt idxrktg,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)$/;"	f	file:
+NEPTOAROrth2	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPTOAROrth2(NEP nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)$/;"	f	file:
+NEPTOARSNorm2	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)$/;"	f	file:
+NEPTOARSupdate	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)$/;"	f	file:
+NEPTOARTrunc	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NEPTOARTrunc(NEP nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *nq,PetscInt cs1,PetscScalar *work,PetscReal *rwork)$/;"	f	file:
 NEPType	include/slepc/finclude/slepcnepdef.h	37;"	d
 NEPType	include/slepcnep.h	/^typedef const char* NEPType;$/;"	t
+NEPUserInterface	include/slepc/private/nepimpl.h	/^               NEP_USER_INTERFACE_DERIVATIVES } NEPUserInterface;$/;"	t	typeref:enum:__anon3
 NEPValuesView	src/nep/interface/nepview.c	/^PetscErrorCode NEPValuesView(NEP nep,PetscViewer viewer)$/;"	f
 NEPValuesViewFromOptions	src/nep/interface/nepview.c	/^PetscErrorCode NEPValuesViewFromOptions(NEP nep)$/;"	f
 NEPValuesView_ASCII	src/nep/interface/nepview.c	/^static PetscErrorCode NEPValuesView_ASCII(NEP nep,PetscViewer viewer)$/;"	f	file:
@@ -2745,90 +3041,114 @@ NEPView	src/nep/interface/nepview.c	/^PetscErrorCode NEPView(NEP nep,PetscViewer
 NEPViewFromOptions	include/slepcnep.h	/^PETSC_STATIC_INLINE PetscErrorCode NEPViewFromOptions(NEP nep,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)nep,obj,name);}$/;"	f
 NEPView_CISS	src/nep/impls/ciss/nciss.c	/^PetscErrorCode NEPView_CISS(NEP nep,PetscViewer viewer)$/;"	f
 NEPView_Interpol	src/nep/impls/interpol/interpol.c	/^PetscErrorCode NEPView_Interpol(NEP nep,PetscViewer viewer)$/;"	f
+NEPView_NArnoldi	src/nep/impls/narnoldi/narnoldi.c	/^PetscErrorCode NEPView_NArnoldi(NEP nep,PetscViewer viewer)$/;"	f
+NEPView_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^PetscErrorCode NEPView_NLEIGS(NEP nep,PetscViewer viewer)$/;"	f
+NEPView_RII	src/nep/impls/rii/rii.c	/^PetscErrorCode NEPView_RII(NEP nep,PetscViewer viewer)$/;"	f
 NEPView_SLP	src/nep/impls/slp/slp.c	/^PetscErrorCode NEPView_SLP(NEP nep,PetscViewer viewer)$/;"	f
 NEPWhich	include/slepc/finclude/slepcnepdef.h	40;"	d
-NEPWhich	include/slepcnep.h	/^               NEP_TARGET_IMAGINARY} NEPWhich;$/;"	t	typeref:enum:__anon25
-NEP_CISS	src/nep/impls/ciss/nciss.c	/^} NEP_CISS;$/;"	t	typeref:struct:__anon77	file:
+NEPWhich	include/slepcnep.h	/^               NEP_WHICH_USER } NEPWhich;$/;"	t	typeref:enum:__anon30
+NEP_ALL	include/slepcnep.h	/^               NEP_ALL,$/;"	e	enum:__anon30
+NEP_CISS	src/nep/impls/ciss/nciss.c	/^} NEP_CISS;$/;"	t	typeref:struct:__anon89	file:
 NEP_CLASSID	include/slepcnep.h	/^PETSC_EXTERN PetscClassId NEP_CLASSID;$/;"	v
 NEP_CLASSID	src/nep/interface/nepbasic.c	/^PetscClassId      NEP_CLASSID = 0;$/;"	v
-NEP_CONVERGED_FNORM_ABS	include/slepcnep.h	/^              NEP_CONVERGED_FNORM_ABS          =  2,$/;"	e	enum:__anon28
-NEP_CONVERGED_FNORM_RELATIVE	include/slepcnep.h	/^              NEP_CONVERGED_FNORM_RELATIVE     =  3,$/;"	e	enum:__anon28
-NEP_CONVERGED_ITERATING	include/slepcnep.h	/^              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;$/;"	e	enum:__anon28
-NEP_CONVERGED_SNORM_RELATIVE	include/slepcnep.h	/^              NEP_CONVERGED_SNORM_RELATIVE     =  4,$/;"	e	enum:__anon28
-NEP_DIVERGED_BREAKDOWN	include/slepcnep.h	/^              NEP_DIVERGED_BREAKDOWN           = -4,$/;"	e	enum:__anon28
-NEP_DIVERGED_FNORM_NAN	include/slepcnep.h	/^              NEP_DIVERGED_FNORM_NAN           = -5,$/;"	e	enum:__anon28
-NEP_DIVERGED_FUNCTION_COUNT	include/slepcnep.h	/^              NEP_DIVERGED_FUNCTION_COUNT      = -2,$/;"	e	enum:__anon28
-NEP_DIVERGED_LINEAR_SOLVE	include/slepcnep.h	/^              NEP_DIVERGED_LINEAR_SOLVE        = -1,$/;"	e	enum:__anon28
-NEP_DIVERGED_MAX_IT	include/slepcnep.h	/^              NEP_DIVERGED_MAX_IT              = -3,$/;"	e	enum:__anon28
-NEP_ERROR_ABSOLUTE	include/slepcnep.h	/^typedef enum { NEP_ERROR_ABSOLUTE,$/;"	e	enum:__anon26
-NEP_ERROR_RELATIVE	include/slepcnep.h	/^               NEP_ERROR_RELATIVE } NEPErrorType;$/;"	e	enum:__anon26
-NEP_FunctionEval	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;$/;"	v
-NEP_FunctionEval	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;$/;"	v
-NEP_INTERPOL	src/nep/impls/interpol/interpol.c	/^} NEP_INTERPOL;$/;"	t	typeref:struct:__anon78	file:
-NEP_JacobianEval	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;$/;"	v
-NEP_JacobianEval	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;$/;"	v
-NEP_KSPSolve	include/slepc/private/nepimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode NEP_KSPSolve(NEP nep,Vec b,Vec x)$/;"	f
-NEP_LARGEST_IMAGINARY	include/slepcnep.h	/^               NEP_LARGEST_IMAGINARY,$/;"	e	enum:__anon25
-NEP_LARGEST_MAGNITUDE	include/slepcnep.h	/^typedef enum { NEP_LARGEST_MAGNITUDE=1,$/;"	e	enum:__anon25
-NEP_LARGEST_REAL	include/slepcnep.h	/^               NEP_LARGEST_REAL,$/;"	e	enum:__anon25
-NEP_REFINE_MULTIPLE	include/slepcnep.h	/^               NEP_REFINE_MULTIPLE } NEPRefine;$/;"	e	enum:__anon27
-NEP_REFINE_NONE	include/slepcnep.h	/^typedef enum { NEP_REFINE_NONE,$/;"	e	enum:__anon27
-NEP_REFINE_SIMPLE	include/slepcnep.h	/^               NEP_REFINE_SIMPLE,$/;"	e	enum:__anon27
-NEP_Refine	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;$/;"	v
-NEP_Refine	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;$/;"	v
-NEP_SLP	src/nep/impls/slp/slp.c	/^} NEP_SLP;$/;"	t	typeref:struct:__anon79	file:
-NEP_SMALLEST_IMAGINARY	include/slepcnep.h	/^               NEP_SMALLEST_IMAGINARY,$/;"	e	enum:__anon25
-NEP_SMALLEST_MAGNITUDE	include/slepcnep.h	/^               NEP_SMALLEST_MAGNITUDE,$/;"	e	enum:__anon25
-NEP_SMALLEST_REAL	include/slepcnep.h	/^               NEP_SMALLEST_REAL,$/;"	e	enum:__anon25
+NEP_CONVERGED_ITERATING	include/slepcnep.h	/^              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;$/;"	e	enum:__anon36
+NEP_CONVERGED_TOL	include/slepcnep.h	/^              NEP_CONVERGED_TOL                =  1,$/;"	e	enum:__anon36
+NEP_CONVERGED_USER	include/slepcnep.h	/^              NEP_CONVERGED_USER               =  2,$/;"	e	enum:__anon36
+NEP_CONV_ABS	include/slepcnep.h	/^typedef enum { NEP_CONV_ABS,$/;"	e	enum:__anon34
+NEP_CONV_NORM	include/slepcnep.h	/^               NEP_CONV_NORM,$/;"	e	enum:__anon34
+NEP_CONV_REL	include/slepcnep.h	/^               NEP_CONV_REL,$/;"	e	enum:__anon34
+NEP_CONV_USER	include/slepcnep.h	/^               NEP_CONV_USER } NEPConv;$/;"	e	enum:__anon34
+NEP_DIVERGED_BREAKDOWN	include/slepcnep.h	/^              NEP_DIVERGED_BREAKDOWN           = -2,$/;"	e	enum:__anon36
+NEP_DIVERGED_ITS	include/slepcnep.h	/^              NEP_DIVERGED_ITS                 = -1,$/;"	e	enum:__anon36
+NEP_DIVERGED_LINEAR_SOLVE	include/slepcnep.h	/^              NEP_DIVERGED_LINEAR_SOLVE        = -4,$/;"	e	enum:__anon36
+NEP_DerivativesEval	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;$/;"	v
+NEP_DerivativesEval	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;$/;"	v
+NEP_ERROR_ABSOLUTE	include/slepcnep.h	/^typedef enum { NEP_ERROR_ABSOLUTE,$/;"	e	enum:__anon31
+NEP_ERROR_BACKWARD	include/slepcnep.h	/^               NEP_ERROR_BACKWARD } NEPErrorType;$/;"	e	enum:__anon31
+NEP_ERROR_RELATIVE	include/slepcnep.h	/^               NEP_ERROR_RELATIVE,$/;"	e	enum:__anon31
+NEP_FunctionEval	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;$/;"	v
+NEP_FunctionEval	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;$/;"	v
+NEP_INTERPOL	src/nep/impls/interpol/interpol.c	/^} NEP_INTERPOL;$/;"	t	typeref:struct:__anon90	file:
+NEP_JacobianEval	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;$/;"	v
+NEP_JacobianEval	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;$/;"	v
+NEP_LARGEST_IMAGINARY	include/slepcnep.h	/^               NEP_LARGEST_IMAGINARY,$/;"	e	enum:__anon30
+NEP_LARGEST_MAGNITUDE	include/slepcnep.h	/^typedef enum { NEP_LARGEST_MAGNITUDE=1,$/;"	e	enum:__anon30
+NEP_LARGEST_REAL	include/slepcnep.h	/^               NEP_LARGEST_REAL,$/;"	e	enum:__anon30
+NEP_NARNOLDI	src/nep/impls/narnoldi/narnoldi.c	/^} NEP_NARNOLDI;$/;"	t	typeref:struct:__anon91	file:
+NEP_NLEIGS	src/nep/impls/nleigs/nleigs.c	/^} NEP_NLEIGS;$/;"	t	typeref:struct:__anon92	file:
+NEP_REFINE_MULTIPLE	include/slepcnep.h	/^               NEP_REFINE_MULTIPLE } NEPRefine;$/;"	e	enum:__anon32
+NEP_REFINE_NONE	include/slepcnep.h	/^typedef enum { NEP_REFINE_NONE,$/;"	e	enum:__anon32
+NEP_REFINE_SCHEME_EXPLICIT	include/slepcnep.h	/^               NEP_REFINE_SCHEME_EXPLICIT } NEPRefineScheme;$/;"	e	enum:__anon33
+NEP_REFINE_SCHEME_MBE	include/slepcnep.h	/^               NEP_REFINE_SCHEME_MBE,$/;"	e	enum:__anon33
+NEP_REFINE_SCHEME_SCHUR	include/slepcnep.h	/^typedef enum { NEP_REFINE_SCHEME_SCHUR=1,$/;"	e	enum:__anon33
+NEP_REFINE_SIMPLE	include/slepcnep.h	/^               NEP_REFINE_SIMPLE,$/;"	e	enum:__anon32
+NEP_RII	src/nep/impls/rii/rii.c	/^} NEP_RII;$/;"	t	typeref:struct:__anon94	file:
+NEP_Refine	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;$/;"	v
+NEP_Refine	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;$/;"	v
+NEP_SLP	src/nep/impls/slp/slp.c	/^} NEP_SLP;$/;"	t	typeref:struct:__anon95	file:
+NEP_SMALLEST_IMAGINARY	include/slepcnep.h	/^               NEP_SMALLEST_IMAGINARY,$/;"	e	enum:__anon30
+NEP_SMALLEST_MAGNITUDE	include/slepcnep.h	/^               NEP_SMALLEST_MAGNITUDE,$/;"	e	enum:__anon30
+NEP_SMALLEST_REAL	include/slepcnep.h	/^               NEP_SMALLEST_REAL,$/;"	e	enum:__anon30
 NEP_STATE_EIGENVECTORS	include/slepc/private/nepimpl.h	/^               NEP_STATE_EIGENVECTORS } NEPStateType;$/;"	e	enum:__anon2
 NEP_STATE_INITIAL	include/slepc/private/nepimpl.h	/^typedef enum { NEP_STATE_INITIAL,$/;"	e	enum:__anon2
 NEP_STATE_SETUP	include/slepc/private/nepimpl.h	/^               NEP_STATE_SETUP,$/;"	e	enum:__anon2
 NEP_STATE_SOLVED	include/slepc/private/nepimpl.h	/^               NEP_STATE_SOLVED,$/;"	e	enum:__anon2
-NEP_SetUp	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;$/;"	v
-NEP_SetUp	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;$/;"	v
-NEP_Solve	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;$/;"	v
-NEP_Solve	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;$/;"	v
-NEP_TARGET_IMAGINARY	include/slepcnep.h	/^               NEP_TARGET_IMAGINARY} NEPWhich;$/;"	e	enum:__anon25
-NEP_TARGET_MAGNITUDE	include/slepcnep.h	/^               NEP_TARGET_MAGNITUDE,$/;"	e	enum:__anon25
-NEP_TARGET_REAL	include/slepcnep.h	/^               NEP_TARGET_REAL,$/;"	e	enum:__anon25
+NEP_STOP_BASIC	include/slepcnep.h	/^typedef enum { NEP_STOP_BASIC,$/;"	e	enum:__anon35
+NEP_STOP_USER	include/slepcnep.h	/^               NEP_STOP_USER } NEPStop;$/;"	e	enum:__anon35
+NEP_SetUp	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;$/;"	v
+NEP_SetUp	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;$/;"	v
+NEP_Solve	include/slepc/private/nepimpl.h	/^PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;$/;"	v
+NEP_Solve	src/nep/interface/nepbasic.c	/^PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;$/;"	v
+NEP_TARGET_IMAGINARY	include/slepcnep.h	/^               NEP_TARGET_IMAGINARY,$/;"	e	enum:__anon30
+NEP_TARGET_MAGNITUDE	include/slepcnep.h	/^               NEP_TARGET_MAGNITUDE,$/;"	e	enum:__anon30
+NEP_TARGET_REAL	include/slepcnep.h	/^               NEP_TARGET_REAL,$/;"	e	enum:__anon30
+NEP_USER_INTERFACE_CALLBACK	include/slepc/private/nepimpl.h	/^typedef enum { NEP_USER_INTERFACE_CALLBACK=1,$/;"	e	enum:__anon3
+NEP_USER_INTERFACE_DERIVATIVES	include/slepc/private/nepimpl.h	/^               NEP_USER_INTERFACE_DERIVATIVES } NEPUserInterface;$/;"	e	enum:__anon3
+NEP_USER_INTERFACE_SPLIT	include/slepc/private/nepimpl.h	/^               NEP_USER_INTERFACE_SPLIT,$/;"	e	enum:__anon3
+NEP_WHICH_USER	include/slepcnep.h	/^               NEP_WHICH_USER } NEPWhich;$/;"	e	enum:__anon30
 NL	src/pep/examples/nlevp/planar_waveguide.c	41;"	d	file:
+NLEIGSMatToMatShellArray	src/nep/impls/nleigs/nleigs.c	/^static PetscErrorCode NLEIGSMatToMatShellArray(Mat M,Mat *Ms)$/;"	f	file:
+NMAT	src/nep/examples/nlevp/gun.c	42;"	d	file:
 NMAT	src/nep/examples/nlevp/loaded_string.c	41;"	d	file:
 NMAT	src/pep/examples/nlevp/butterfly.c	39;"	d	file:
 NMAT	src/pep/examples/nlevp/pdde_stability.c	41;"	d	file:
 NMAT	src/pep/examples/nlevp/planar_waveguide.c	40;"	d	file:
-NMLEN	src/eps/interface/epsview.c	732;"	d	file:
-NMLEN	src/nep/interface/nepview.c	657;"	d	file:
-NMLEN	src/pep/interface/pepview.c	727;"	d	file:
-NMLEN	src/svd/interface/svdview.c	538;"	d	file:
+NMLEN	src/eps/interface/epsview.c	748;"	d	file:
+NMLEN	src/nep/interface/nepview.c	702;"	d	file:
+NMLEN	src/pep/interface/pepview.c	722;"	d	file:
+NMLEN	src/svd/interface/svdview.c	550;"	d	file:
 NOWARNDIRS	config/cmakegen.py	/^NOWARNDIRS = set('tests tutorials'.split())              # Do not warn about mismatch in these$/;"	v
 NREF_MAXIT	src/nep/interface/neprefine.c	27;"	d	file:
 NREF_MAXIT	src/pep/interface/peprefine.c	27;"	d	file:
-NRefOrthogStep	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs,PetscScalar *work,PetscInt lwork)$/;"	f	file:
-NRefRightSide	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,BV V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,BV dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,BV W,Vec t,PetscScalar *work,PetscInt lw)$/;"	f	file:
+NRefOrthogStep	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs)$/;"	f	file:
+NRefRightSide	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,BV V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,BV dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,BV W,Vec t)$/;"	f	file:
 NRefSubcommDestroy	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSubcommDestroy(PEP pep,MatExplicitCtx *matctx)$/;"	f	file:
 NRefSubcommSetup	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSubcommSetup(PEP pep,PetscInt k,MatExplicitCtx *matctx,PetscInt nsubc)$/;"	f	file:
-NRefSysIter_explicit	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysIter_explicit(PetscInt i,PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,BV W,PetscScalar *work,PetscInt lwork)$/;"	f	file:
-NRefSysIter_shell	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysIter_shell(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,BV W,Vec t,PetscScalar *work,PetscInt lwork)$/;"	f	file:
-NRefSysSetup_explicit	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx,BV W,PetscScalar *work,PetscInt lwork)$/;"	f	file:
-NRefSysSetup_shell	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSetup_shell(PetscInt nmat,PetscReal *pcf,PetscInt k,PetscInt deg,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,PetscScalar *Mm,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12)$/;"	f	file:
+NRefSysIter	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysIter(PetscInt i,PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,BV W)$/;"	f	file:
+NRefSysSetup_explicit	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx,BV W)$/;"	f	file:
+NRefSysSetup_mbe	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSetup_mbe(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx)$/;"	f	file:
+NRefSysSetup_shell	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSetup_shell(PEP pep,PetscInt k,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,FSubctx *ctx)$/;"	f	file:
 NRefSysSolve_explicit	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScalar *Rh,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx)$/;"	f	file:
-NRefSysSolve_shell	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSolve_shell(Mat *A,KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12,BV V,Vec dVi,PetscScalar *dHi,BV W,Vec t,PetscScalar *work,PetscInt lw)$/;"	f	file:
+NRefSysSolve_mbe	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSolve_mbe(PetscInt k,PetscInt sz,BV W,PetscScalar *w,BV Wt,PetscScalar *wt,PetscScalar *d,PetscScalar *dt,KSP ksp,BV T2,BV T3 ,PetscScalar *T4,PetscBool trans,Vec x1,PetscScalar *x2,Vec sol1,PetscScalar *sol2,Vec vw)$/;"	f	file:
+NRefSysSolve_shell	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode NRefSysSolve_shell(KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,Vec dVi,PetscScalar *dHi)$/;"	f	file:
 NewSection	config/log.py	/^  def NewSection(self,string):$/;"	m	class:Log
-OP	include/slepc/private/svdimpl.h	/^  Mat              OP;          \/* problem matrix *\/$/;"	m	struct:_p_SVD
+OP	include/slepc/private/svdimpl.h	/^  Mat            OP;               \/* problem matrix *\/$/;"	m	struct:_p_SVD
 OPTLEN	src/pep/interface/pepsolve.c	98;"	d	file:
 Open	config/log.py	/^  def Open(self,filename):$/;"	m	class:Log
 OperatorAMultiVector	src/eps/impls/external/blopex/blopex.c	/^static void OperatorAMultiVector(void *data,void *x,void *y)$/;"	f	file:
 OperatorASingleVector	src/eps/impls/external/blopex/blopex.c	/^static void OperatorASingleVector(void *data,void *x,void *y)$/;"	f	file:
 OperatorBMultiVector	src/eps/impls/external/blopex/blopex.c	/^static void OperatorBMultiVector(void *data,void *x,void *y)$/;"	f	file:
 OperatorBSingleVector	src/eps/impls/external/blopex/blopex.c	/^static void OperatorBSingleVector(void *data,void *x,void *y)$/;"	f	file:
-P	include/slepc/private/stimpl.h	/^  Mat              P;                \/* Matrix from which preconditioner is built *\/$/;"	m	struct:_p_ST
-P	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon46	file:
-PARMAX	src/sys/classes/fn/impls/rational/fnrational.c	433;"	d	file:
+P	include/slepc/private/stimpl.h	/^  Mat              P;                \/* matrix from which preconditioner is built *\/$/;"	m	struct:_p_ST
+P	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon60	file:
+P	src/pep/impls/jd/pjdp.h	/^  Mat         P;             \/*  *\/$/;"	m	struct:__anon101
+PARMAX	src/sys/classes/fn/impls/rational/fnrational.c	488;"	d	file:
 PCApplyBA_dvd	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode PCApplyBA_dvd(PC pc,PCSide side,Vec in,Vec out,Vec w)$/;"	f	file:
 PCApplyTranspose_dvd	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode PCApplyTranspose_dvd(PC pc,Vec in,Vec out)$/;"	f	file:
 PCApply_User	src/eps/examples/tests/test12.c	/^PetscErrorCode PCApply_User(PC pc,Vec x,Vec y)$/;"	f
 PCApply_dvd	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode PCApply_dvd(PC pc,Vec in,Vec out)$/;"	f	file:
 PCShellApply_PEPJD	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PCShellApply_PEPJD(PC pc,Vec x,Vec y)$/;"	f	file:
+PD0	src/eps/examples/tutorials/ex31.c	/^const PetscScalar PD0[3] = {1.25,0.9,1.0};$/;"	v
 PEP	include/slepc/finclude/slepcpepdef.h	33;"	d
 PEP	include/slepcpep.h	/^typedef struct _p_PEP* PEP;$/;"	t	typeref:struct:_p_PEP
 PEP	src/pep/examples/tests/makefile	/^PEP = toar qarnoldi$/;"	m
@@ -2836,33 +3156,31 @@ PEPAllocateSolution	src/pep/interface/pepsetup.c	/^PetscErrorCode PEPAllocateSol
 PEPAppendOptionsPrefix	src/pep/interface/pepopts.c	/^PetscErrorCode PEPAppendOptionsPrefix(PEP pep,const char *prefix)$/;"	f
 PEPBackTransform_Default	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPBackTransform_Default(PEP pep)$/;"	f
 PEPBasis	include/slepc/finclude/slepcpepdef.h	39;"	d
-PEPBasis	include/slepcpep.h	/^               PEP_BASIS_HERMITE } PEPBasis;$/;"	t	typeref:enum:__anon31
+PEPBasis	include/slepcpep.h	/^               PEP_BASIS_HERMITE } PEPBasis;$/;"	t	typeref:enum:__anon39
 PEPBasisCoefficients	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPBasisCoefficients(PEP pep,PetscReal *pbc)$/;"	f
 PEPBasisTypes	include/slepcpep.h	/^PETSC_EXTERN const char *PEPBasisTypes[];$/;"	v
 PEPBasisTypes	src/pep/interface/dlregispep.c	/^const char *PEPBasisTypes[] = {"MONOMIAL","CHEBYSHEV1","CHEBYSHEV2","LEGENDRE","LAGUERRE","HERMITE","PEPBasis","PEP_BASIS_",0};$/;"	v
 PEPBuildDiagonalScaling	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPBuildDiagonalScaling(PEP pep)$/;"	f
-PEPCheckSolved	include/slepc/private/pepimpl.h	134;"	d
-PEPCheckSolved	include/slepc/private/pepimpl.h	138;"	d
+PEPCheckSolved	include/slepc/private/pepimpl.h	137;"	d
+PEPCheckSolved	include/slepc/private/pepimpl.h	141;"	d
 PEPComputeError	src/pep/interface/pepsolve.c	/^PetscErrorCode PEPComputeError(PEP pep,PetscInt i,PEPErrorType type,PetscReal *error)$/;"	f
-PEPComputeLinearNorms	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPComputeLinearNorms(PEP pep)$/;"	f
 PEPComputeRelativeError	include/slepcpep.h	/^PETSC_DEPRECATED("Use PEPComputeError()") PETSC_STATIC_INLINE PetscErrorCode PEPComputeRelativeError(PEP pep,PetscInt i,PetscReal *r) {return PEPComputeError(pep,i,PEP_ERROR_BACKWARD,r);}$/;"	f
 PEPComputeResidualNorm	include/slepcpep.h	/^PETSC_DEPRECATED("Use PEPComputeError() with PEP_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode PEPComputeResidualNorm(PEP pep,PetscInt i,PetscReal *r) {return PEPComputeError(pep,i,PEP_ERROR_ABSOLUTE,r);}$/;"	f
 PEPComputeResidualNorm_Private	src/pep/interface/pepsolve.c	/^PetscErrorCode PEPComputeResidualNorm_Private(PEP pep,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)$/;"	f
 PEPComputeScaleFactor	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPComputeScaleFactor(PEP pep)$/;"	f
 PEPComputeVectors	src/pep/interface/pepsolve.c	/^PetscErrorCode PEPComputeVectors(PEP pep)$/;"	f
 PEPComputeVectors_Default	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPComputeVectors_Default(PEP pep)$/;"	f
-PEPComputeVectors_JD	src/pep/impls/jd/pjd.c	/^PetscErrorCode PEPComputeVectors_JD(PEP pep)$/;"	f
-PEPConv	include/slepc/finclude/slepcpepdef.h	43;"	d
-PEPConv	include/slepcpep.h	/^               PEP_CONV_USER } PEPConv;$/;"	t	typeref:enum:__anon36
+PEPConv	include/slepc/finclude/slepcpepdef.h	44;"	d
+PEPConv	include/slepcpep.h	/^               PEP_CONV_USER } PEPConv;$/;"	t	typeref:enum:__anon45
+PEPConvMonitorSetFromOptions	src/pep/interface/pepopts.c	/^PetscErrorCode PEPConvMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))$/;"	f
 PEPConvergedAbsolute	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPConvergedAbsolute(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
-PEPConvergedEigRelative	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPConvergedEigRelative(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
-PEPConvergedLinear	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPConvergedLinear(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 PEPConvergedNorm	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPConvergedNorm(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
-PEPConvergedReason	include/slepc/finclude/slepcpepdef.h	45;"	d
-PEPConvergedReason	include/slepcpep.h	/^              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;$/;"	t	typeref:enum:__anon37
+PEPConvergedReason	include/slepc/finclude/slepcpepdef.h	47;"	d
+PEPConvergedReason	include/slepcpep.h	/^              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;$/;"	t	typeref:enum:__anon47
 PEPConvergedReasons	include/slepcpep.h	/^PETSC_EXTERN const char *const*PEPConvergedReasons;$/;"	v
-PEPConvergedReasons	src/pep/interface/dlregispep.c	/^const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 5;$/;"	v
-PEPConvergedReasons_Shifted	src/pep/interface/dlregispep.c	/^const char *const PEPConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","PEPConvergedReason","PEP_",0};$/;"	v
+PEPConvergedReasons	src/pep/interface/dlregispep.c	/^const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 4;$/;"	v
+PEPConvergedReasons_Shifted	src/pep/interface/dlregispep.c	/^const char *const PEPConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","PEPConvergedReason","PEP_",0};$/;"	v
+PEPConvergedRelative	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPConvergedRelative(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 PEPCreate	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPCreate(MPI_Comm comm,PEP *outpep)$/;"	f
 PEPCreate_JD	src/pep/impls/jd/pjd.c	/^PETSC_EXTERN PetscErrorCode PEPCreate_JD(PEP pep)$/;"	f
 PEPCreate_Linear	src/pep/impls/linear/linear.c	/^PETSC_EXTERN PetscErrorCode PEPCreate_Linear(PEP pep)$/;"	f
@@ -2875,8 +3193,8 @@ PEPDestroy_Linear	src/pep/impls/linear/linear.c	/^PetscErrorCode PEPDestroy_Line
 PEPDestroy_QArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^PetscErrorCode PEPDestroy_QArnoldi(PEP pep)$/;"	f
 PEPDestroy_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPDestroy_STOAR(PEP pep)$/;"	f
 PEPDestroy_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPDestroy_TOAR(PEP pep)$/;"	f
-PEPErrorType	include/slepc/finclude/slepcpepdef.h	44;"	d
-PEPErrorType	include/slepcpep.h	/^               PEP_ERROR_BACKWARD } PEPErrorType;$/;"	t	typeref:enum:__anon35
+PEPErrorType	include/slepc/finclude/slepcpepdef.h	46;"	d
+PEPErrorType	include/slepcpep.h	/^               PEP_ERROR_BACKWARD } PEPErrorType;$/;"	t	typeref:enum:__anon44
 PEPErrorTypes	include/slepcpep.h	/^PETSC_EXTERN const char *PEPErrorTypes[];$/;"	v
 PEPErrorTypes	src/pep/interface/dlregispep.c	/^const char *PEPErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","PEPErrorType","PEP_ERROR_",0};$/;"	v
 PEPErrorView	src/pep/interface/pepview.c	/^PetscErrorCode PEPErrorView(PEP pep,PEPErrorType etype,PetscViewer viewer)$/;"	f
@@ -2888,9 +3206,9 @@ PEPEvaluateBasis	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPEvaluateBasi
 PEPEvaluateBasisM	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPEvaluateBasisM(PEP pep,PetscInt k,PetscScalar *T,PetscInt ldt,PetscInt idx,PetscScalar **Tp,PetscScalar **Tj)$/;"	f	file:
 PEPEvaluateBasisforMatrix	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPEvaluateBasisforMatrix(PEP pep,PetscInt nm,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH)$/;"	f	file:
 PEPEvaluateFunctionDerivatives	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPEvaluateFunctionDerivatives(PEP pep,PetscScalar alpha,PetscScalar *vals)$/;"	f	file:
-PEPExtract	include/slepc/finclude/slepcpepdef.h	42;"	d
-PEPExtract	include/slepcpep.h	/^               PEP_EXTRACT_STRUCTURED } PEPExtract;$/;"	t	typeref:enum:__anon34
-PEPExtractInvariantPair	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work,PetscInt nw)$/;"	f	file:
+PEPExtract	include/slepc/finclude/slepcpepdef.h	43;"	d
+PEPExtract	include/slepcpep.h	/^               PEP_EXTRACT_STRUCTURED } PEPExtract;$/;"	t	typeref:enum:__anon43
+PEPExtractInvariantPair	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work)$/;"	f	file:
 PEPExtractTypes	include/slepcpep.h	/^PETSC_EXTERN const char *PEPExtractTypes[];$/;"	v
 PEPExtractTypes	src/pep/interface/dlregispep.c	/^const char *PEPExtractTypes[] = {"","NONE","NORM","RESIDUAL","STRUCTURED","PEPExtract","PEP_EXTRACT_",0};$/;"	v
 PEPExtractVectors	src/pep/interface/pepsolve.c	/^PetscErrorCode PEPExtractVectors(PEP pep)$/;"	f
@@ -2915,29 +3233,37 @@ PEPGetOperators	src/pep/interface/pepsetup.c	/^PetscErrorCode PEPGetOperators(PE
 PEPGetOptionsPrefix	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetOptionsPrefix(PEP pep,const char *prefix[])$/;"	f
 PEPGetProblemType	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetProblemType(PEP pep,PEPProblemType *type)$/;"	f
 PEPGetRG	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPGetRG(PEP pep,RG *rg)$/;"	f
-PEPGetRefine	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur)$/;"	f
+PEPGetRefine	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PEPRefineScheme *scheme)$/;"	f
 PEPGetST	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPGetST(PEP pep,ST *st)$/;"	f
 PEPGetScale	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetScale(PEP pep,PEPScale *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)$/;"	f
+PEPGetStoppingTest	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetStoppingTest(PEP pep,PEPStop *stop)$/;"	f
 PEPGetTarget	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPGetTarget(PEP pep,PetscScalar* target)$/;"	f
 PEPGetTolerances	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetTolerances(PEP pep,PetscReal *tol,PetscInt *maxits)$/;"	f
 PEPGetTrackAll	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetTrackAll(PEP pep,PetscBool *trackall)$/;"	f
 PEPGetType	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPGetType(PEP pep,PEPType *type)$/;"	f
 PEPGetWhichEigenpairs	src/pep/interface/pepopts.c	/^PetscErrorCode PEPGetWhichEigenpairs(PEP pep,PEPWhich *which)$/;"	f
 PEPInitializePackage	src/pep/interface/dlregispep.c	/^PetscErrorCode PEPInitializePackage(void)$/;"	f
-PEPJD	include/slepc/finclude/slepcpepdef.h	51;"	d
+PEPJD	include/slepc/finclude/slepcpepdef.h	53;"	d
 PEPJD	include/slepcpep.h	52;"	d
-PEPJDDiffMatMult	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDDiffMatMult(PEP pep,PetscScalar theta,Vec x,Vec y,Vec w)$/;"	f	file:
+PEPJDComputePResidual	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDComputePResidual(PEP pep,Vec u,PetscScalar theta,Vec p,Vec *work)$/;"	f	file:
+PEPJDCopyToExtendedVec	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDCopyToExtendedVec(PEP pep,Vec v,PetscScalar *a,PetscInt na,PetscInt off,Vec vex,PetscBool back)$/;"	f	file:
+PEPJDCreateShellPC	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDCreateShellPC(PEP pep)$/;"	f	file:
+PEPJDDuplicateBasis	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDDuplicateBasis(PEP pep,BV *basis)$/;"	f	file:
+PEPJDEigenvectors	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDEigenvectors(PEP pep)$/;"	f	file:
+PEPJDExtendedPCApply	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDExtendedPCApply(PC pc,Vec x,Vec y)$/;"	f	file:
 PEPJDGetRestart	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDGetRestart(PEP pep,PetscReal *keep)$/;"	f
 PEPJDGetRestart_JD	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDGetRestart_JD(PEP pep,PetscReal *keep)$/;"	f
-PEPJDGetTolerances	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDGetTolerances(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)$/;"	f
-PEPJDGetTolerances_JD	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDGetTolerances_JD(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)$/;"	f
-PEPJDPurgeDuplicates	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDPurgeDuplicates(PEP pep)$/;"	f	file:
+PEPJDLockConverged	src/pep/impls/jd/pjd.c	/^PetscErrorCode PEPJDLockConverged(PEP pep,PetscInt *nv,Vec u,Vec *ww)$/;"	f
+PEPJDOrthogonalize	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDOrthogonalize(PetscInt row,PetscInt col,PetscScalar *X,PetscInt ldx,PetscInt *rk,PetscInt *P,PetscScalar *R,PetscInt ldr)$/;"	f	file:
+PEPJDPCMatSetUp	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDPCMatSetUp(PEP pep,PetscScalar theta)$/;"	f	file:
+PEPJDProcessInitialSpace	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDProcessInitialSpace(PEP pep,Vec *w)$/;"	f	file:
 PEPJDSetRestart	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDSetRestart(PEP pep,PetscReal keep)$/;"	f
 PEPJDSetRestart_JD	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDSetRestart_JD(PEP pep,PetscReal keep)$/;"	f
-PEPJDSetTolerances	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDSetTolerances(PEP pep,PetscReal mtol,PetscReal htol,PetscReal stol)$/;"	f
-PEPJDSetTolerances_JD	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPJDSetTolerances_JD(PEP pep,PetscReal mtol,PetscReal htol,PetscReal stol)$/;"	f
+PEPJDShellMatMult	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDShellMatMult(Mat P,Vec x,Vec y)$/;"	f	file:
+PEPJDUpdateExtendedPC	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDUpdateExtendedPC(PEP pep,PetscScalar theta)$/;"	f	file:
+PEPJDUpdateTV	src/pep/impls/jd/pjd.c	/^static PetscErrorCode PEPJDUpdateTV(PEP pep,PetscInt low,PetscInt high,Vec *w)$/;"	f	file:
 PEPKrylovConvergence	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPKrylovConvergence(PEP pep,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscInt *kout)$/;"	f
-PEPLINEAR	include/slepc/finclude/slepcpepdef.h	47;"	d
+PEPLINEAR	include/slepc/finclude/slepcpepdef.h	49;"	d
 PEPLINEAR	include/slepcpep.h	48;"	d
 PEPLinearExtract_None	src/pep/impls/linear/linear.c	/^static PetscErrorCode PEPLinearExtract_None(PEP pep,EPS eps)$/;"	f	file:
 PEPLinearExtract_Norm	src/pep/impls/linear/linear.c	/^static PetscErrorCode PEPLinearExtract_Norm(PEP pep,EPS eps)$/;"	f	file:
@@ -2956,27 +3282,29 @@ PEPLinearSetExplicitMatrix	src/pep/impls/linear/linear.c	/^PetscErrorCode PEPLin
 PEPLinearSetExplicitMatrix_Linear	src/pep/impls/linear/linear.c	/^static PetscErrorCode PEPLinearSetExplicitMatrix_Linear(PEP pep,PetscBool explicitmatrix)$/;"	f	file:
 PEPList	include/slepcpep.h	/^PETSC_EXTERN PetscFunctionList PEPList;$/;"	v
 PEPList	src/pep/interface/pepbasic.c	/^PetscFunctionList PEPList = 0;$/;"	v
-PEPLookfordeflation	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPLookfordeflation(PEP pep,PetscInt *nl)$/;"	f	file:
 PEPMonitor	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitor(PEP pep,PetscInt it,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest)$/;"	f
-PEPMonitorAll	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+PEPMonitorAll	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
 PEPMonitorCancel	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorCancel(PEP pep)$/;"	f
-PEPMonitorConverged	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-PEPMonitorFirst	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+PEPMonitorConverged	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)$/;"	f
+PEPMonitorFirst	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
 PEPMonitorGetTrueEig	src/pep/interface/pepmon.c	/^static PetscErrorCode PEPMonitorGetTrueEig(PEP pep,PetscScalar *er,PetscScalar *ei)$/;"	f	file:
-PEPMonitorLG	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorLG(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-PEPMonitorLGAll	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorLGAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+PEPMonitorLG	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorLG(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+PEPMonitorLGAll	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorLGAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+PEPMonitorLGCreate	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)$/;"	f
 PEPMonitorSet	src/pep/interface/pepmon.c	/^PetscErrorCode PEPMonitorSet(PEP pep,PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))$/;"	f
-PEPNRefForwardSubstitution	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,BV dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,PetscScalar *work,PetscInt lw,MatExplicitCtx *matctx)$/;"	f	file:
-PEPNRefSetUpMatrices	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,Mat *M,Mat *P,MatExplicitCtx *matctx,PetscBool ini)$/;"	f	file:
-PEPNRefUpdateInvPair	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,BV dV,PetscScalar *dVS,PetscInt rds,PetscScalar *work,PetscInt lwork)$/;"	f	file:
-PEPNewtonRefinementSimple	src/pep/interface/peprefine.c	/^PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol,PetscInt k)$/;"	f
+PEPMonitorSetFromOptions	src/pep/interface/pepopts.c	/^PetscErrorCode PEPMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)$/;"	f
+PEPMonitor_Interpol	src/nep/impls/interpol/interpol.c	/^static PetscErrorCode PEPMonitor_Interpol(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f	file:
+PEPNRefForwardSubstitution	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,BV dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,MatExplicitCtx *matctx)$/;"	f	file:
+PEPNRefSetUp	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPNRefSetUp(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,MatExplicitCtx *matctx,PetscBool ini)$/;"	f	file:
+PEPNRefUpdateInvPair	src/pep/impls/krylov/toar/nrefine.c	/^static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,BV dV,PetscScalar *dVS,PetscInt rds)$/;"	f	file:
+PEPNewtonRefinementSimple	src/pep/interface/peprefine.c	/^PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal tol,PetscInt k)$/;"	f
 PEPNewtonRefinement_TOAR	src/pep/impls/krylov/toar/nrefine.c	/^PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxits,PetscReal *tol,PetscInt k,PetscScalar *S,PetscInt lds,PetscInt *prs)$/;"	f
 PEPOps	include/slepc/private/pepimpl.h	/^typedef struct _PEPOps *PEPOps;$/;"	t	typeref:struct:_PEPOps
 PEPPackageInitialized	src/pep/interface/dlregispep.c	/^static PetscBool PEPPackageInitialized = PETSC_FALSE;$/;"	v	file:
 PEPPrintSolution	include/slepcpep.h	/^PETSC_DEPRECATED("Use PEPErrorView()") PETSC_STATIC_INLINE PetscErrorCode PEPPrintSolution(PEP pep,PetscViewer v) {return PEPErrorView(pep,PEP_ERROR_BACKWARD,v);}$/;"	f
 PEPProblemType	include/slepc/finclude/slepcpepdef.h	37;"	d
-PEPProblemType	include/slepcpep.h	/^             } PEPProblemType;$/;"	t	typeref:enum:__anon29
-PEPQARNOLDI	include/slepc/finclude/slepcpepdef.h	48;"	d
+PEPProblemType	include/slepcpep.h	/^             } PEPProblemType;$/;"	t	typeref:enum:__anon37
+PEPQARNOLDI	include/slepc/finclude/slepcpepdef.h	50;"	d
 PEPQARNOLDI	include/slepcpep.h	49;"	d
 PEPQArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^static PetscErrorCode PEPQArnoldi(PEP pep,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,Vec v,Vec w,PetscReal *beta,PetscBool *breakdown,PetscScalar *work)$/;"	f	file:
 PEPQArnoldiCGS	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^static PetscErrorCode PEPQArnoldiCGS(PEP pep,PetscScalar *H,PetscBLASInt ldh,PetscScalar *h,PetscBLASInt j,BV V,Vec t,Vec v,Vec w,PetscReal *onorm,PetscReal *norm,PetscScalar *work)$/;"	f	file:
@@ -2991,8 +3319,12 @@ PEPQArnoldiSetRestart_QArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^static
 PEPReasonView	src/pep/interface/pepview.c	/^PetscErrorCode PEPReasonView(PEP pep,PetscViewer viewer)$/;"	f
 PEPReasonViewFromOptions	src/pep/interface/pepview.c	/^PetscErrorCode PEPReasonViewFromOptions(PEP pep)$/;"	f
 PEPRefine	include/slepc/finclude/slepcpepdef.h	41;"	d
-PEPRefine	include/slepcpep.h	/^               PEP_REFINE_MULTIPLE } PEPRefine;$/;"	t	typeref:enum:__anon33
+PEPRefine	include/slepcpep.h	/^               PEP_REFINE_MULTIPLE } PEPRefine;$/;"	t	typeref:enum:__anon41
 PEPRefineGetKSP	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPRefineGetKSP(PEP pep,KSP *ksp)$/;"	f
+PEPRefineScheme	include/slepc/finclude/slepcpepdef.h	42;"	d
+PEPRefineScheme	include/slepcpep.h	/^               PEP_REFINE_SCHEME_EXPLICIT } PEPRefineScheme;$/;"	t	typeref:enum:__anon42
+PEPRefineSchemes	include/slepcpep.h	/^PETSC_EXTERN const char *PEPRefineSchemes[];$/;"	v
+PEPRefineSchemes	src/pep/interface/dlregispep.c	/^const char *PEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","PEPRefineScheme","PEP_REFINE_SCHEME_",0};$/;"	v
 PEPRefineTypes	include/slepcpep.h	/^PETSC_EXTERN const char *PEPRefineTypes[];$/;"	v
 PEPRefineTypes	src/pep/interface/dlregispep.c	/^const char *PEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","PEPRefine","PEP_REFINE_",0};$/;"	v
 PEPRegister	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPRegister(const char *name,PetscErrorCode (*function)(PEP))$/;"	f
@@ -3003,7 +3335,7 @@ PEPReset	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPReset(PEP pep)$/;"	f
 PEPReset_JD	src/pep/impls/jd/pjd.c	/^PetscErrorCode PEPReset_JD(PEP pep)$/;"	f
 PEPReset_Linear	src/pep/impls/linear/linear.c	/^PetscErrorCode PEPReset_Linear(PEP pep)$/;"	f
 PEPReset_TOAR	src/pep/impls/krylov/pepkrylov.c	/^PetscErrorCode PEPReset_TOAR(PEP pep)$/;"	f
-PEPSTOAR	include/slepc/finclude/slepcpepdef.h	50;"	d
+PEPSTOAR	include/slepc/finclude/slepcpepdef.h	52;"	d
 PEPSTOAR	include/slepcpep.h	51;"	d
 PEPSTOARGetLocking	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPSTOARGetLocking(PEP pep,PetscBool *lock)$/;"	f
 PEPSTOARGetLocking_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARGetLocking_STOAR(PEP pep,PetscBool *lock)$/;"	f	file:
@@ -3011,12 +3343,12 @@ PEPSTOARNorm	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOAR
 PEPSTOAROrth2	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOAROrth2(PEP pep,PetscInt k,PetscReal *Omega,PetscScalar *y)$/;"	f	file:
 PEPSTOARSetLocking	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPSTOARSetLocking(PEP pep,PetscBool lock)$/;"	f
 PEPSTOARSetLocking_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARSetLocking_STOAR(PEP pep,PetscBool lock)$/;"	f	file:
-PEPSTOARSupdate	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)$/;"	f	file:
-PEPSTOARTrunc	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)$/;"	f	file:
-PEPSTOARqKqMupdates	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv,PetscInt nwv)$/;"	f	file:
-PEPSTOARrun	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)$/;"	f	file:
+PEPSTOARSupdate	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)$/;"	f	file:
+PEPSTOARTrunc	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscReal *rwork)$/;"	f	file:
+PEPSTOARqKqMupdates	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv)$/;"	f	file:
+PEPSTOARrun	src/pep/impls/krylov/stoar/stoar.c	/^static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,Vec *t_)$/;"	f	file:
 PEPScale	include/slepc/finclude/slepcpepdef.h	40;"	d
-PEPScale	include/slepcpep.h	/^               PEP_SCALE_BOTH } PEPScale;$/;"	t	typeref:enum:__anon32
+PEPScale	include/slepcpep.h	/^               PEP_SCALE_BOTH } PEPScale;$/;"	t	typeref:enum:__anon40
 PEPScaleTypes	include/slepcpep.h	/^PETSC_EXTERN const char *PEPScaleTypes[];$/;"	v
 PEPScaleTypes	src/pep/interface/dlregispep.c	/^const char *PEPScaleTypes[] = {"NONE","SCALAR","DIAGONAL","BOTH","PEPScale","PEP_SCALE_",0};$/;"	v
 PEPSetBV	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPSetBV(PEP pep,BV bv)$/;"	f
@@ -3029,19 +3361,21 @@ PEPSetDimensions_Default	src/pep/interface/pepsetup.c	/^PetscErrorCode PEPSetDim
 PEPSetEigenvalueComparison	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetEigenvalueComparison(PEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)$/;"	f
 PEPSetExtract	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetExtract(PEP pep,PEPExtract extract)$/;"	f
 PEPSetFromOptions	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetFromOptions(PEP pep)$/;"	f
-PEPSetFromOptions_JD	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPSetFromOptions_JD(PetscOptions *PetscOptionsObject,PEP pep)$/;"	f
-PEPSetFromOptions_Linear	src/pep/impls/linear/linear.c	/^PetscErrorCode PEPSetFromOptions_Linear(PetscOptions *PetscOptionsObject,PEP pep)$/;"	f
-PEPSetFromOptions_QArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptions *PetscOptionsObject,PEP pep)$/;"	f
-PEPSetFromOptions_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPSetFromOptions_STOAR(PetscOptions *PetscOptionsObject,PEP pep)$/;"	f
-PEPSetFromOptions_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPSetFromOptions_TOAR(PetscOptions *PetscOptionsObject,PEP pep)$/;"	f
+PEPSetFromOptions_JD	src/pep/impls/jd/pjdopt.c	/^PetscErrorCode PEPSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,PEP pep)$/;"	f
+PEPSetFromOptions_Linear	src/pep/impls/linear/linear.c	/^PetscErrorCode PEPSetFromOptions_Linear(PetscOptionItems *PetscOptionsObject,PEP pep)$/;"	f
+PEPSetFromOptions_QArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptionItems *PetscOptionsObject,PEP pep)$/;"	f
+PEPSetFromOptions_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPSetFromOptions_STOAR(PetscOptionItems *PetscOptionsObject,PEP pep)$/;"	f
+PEPSetFromOptions_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPSetFromOptions_TOAR(PetscOptionItems *PetscOptionsObject,PEP pep)$/;"	f
 PEPSetInitialSpace	src/pep/interface/pepsetup.c	/^PetscErrorCode PEPSetInitialSpace(PEP pep,PetscInt n,Vec *is)$/;"	f
 PEPSetOperators	src/pep/interface/pepsetup.c	/^PetscErrorCode PEPSetOperators(PEP pep,PetscInt nmat,Mat A[])$/;"	f
 PEPSetOptionsPrefix	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetOptionsPrefix(PEP pep,const char *prefix)$/;"	f
 PEPSetProblemType	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetProblemType(PEP pep,PEPProblemType type)$/;"	f
 PEPSetRG	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPSetRG(PEP pep,RG rg)$/;"	f
-PEPSetRefine	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PetscBool schur)$/;"	f
+PEPSetRefine	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PEPRefineScheme scheme)$/;"	f
 PEPSetST	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPSetST(PEP pep,ST st)$/;"	f
 PEPSetScale	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetScale(PEP pep,PEPScale scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)$/;"	f
+PEPSetStoppingTest	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetStoppingTest(PEP pep,PEPStop stop)$/;"	f
+PEPSetStoppingTestFunction	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetStoppingTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
 PEPSetTarget	src/pep/interface/pepbasic.c	/^PetscErrorCode PEPSetTarget(PEP pep,PetscScalar target)$/;"	f
 PEPSetTolerances	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetTolerances(PEP pep,PetscReal tol,PetscInt maxits)$/;"	f
 PEPSetTrackAll	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetTrackAll(PEP pep,PetscBool trackall)$/;"	f
@@ -3054,35 +3388,38 @@ PEPSetUp_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPSetUp_STOA
 PEPSetUp_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPSetUp_TOAR(PEP pep)$/;"	f
 PEPSetWhichEigenpairs	src/pep/interface/pepopts.c	/^PetscErrorCode PEPSetWhichEigenpairs(PEP pep,PEPWhich which)$/;"	f
 PEPSetWorkVecs	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPSetWorkVecs(PEP pep,PetscInt nw)$/;"	f
-PEPSimpNRefctx	src/pep/interface/peprefine.c	/^} PEPSimpNRefctx;$/;"	t	typeref:struct:__anon90	file:
-PEPSimpleNRefGatherEigenpair	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)$/;"	f	file:
+PEPSimpNRefctx	src/pep/interface/peprefine.c	/^} PEPSimpNRefctx;$/;"	t	typeref:struct:__anon108	file:
+PEPSimpleNRefGatherEigenpair	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)$/;"	f	file:
 PEPSimpleNRefScatterEigenvector	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPSimpleNRefScatterEigenvector(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)$/;"	f	file:
 PEPSimpleNRefSetUp	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPSimpleNRefSetUp(PEP pep,PEPSimpNRefctx **ctx_)$/;"	f	file:
-PEPSimpleNRefSetUpSystem	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPSimpleNRefSetUpSystem(PEP pep,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)$/;"	f	file:
+PEPSimpleNRefSetUpSystem	src/pep/interface/peprefine.c	/^static PetscErrorCode PEPSimpleNRefSetUpSystem(PEP pep,Mat *A,PEPSimpNRefctx *ctx,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)$/;"	f	file:
 PEPSolve	src/pep/interface/pepsolve.c	/^PetscErrorCode PEPSolve(PEP pep)$/;"	f
 PEPSolve_JD	src/pep/impls/jd/pjd.c	/^PetscErrorCode PEPSolve_JD(PEP pep)$/;"	f
 PEPSolve_Linear	src/pep/impls/linear/linear.c	/^PetscErrorCode PEPSolve_Linear(PEP pep)$/;"	f
 PEPSolve_QArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^PetscErrorCode PEPSolve_QArnoldi(PEP pep)$/;"	f
 PEPSolve_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPSolve_STOAR(PEP pep)$/;"	f
 PEPSolve_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPSolve_TOAR(PEP pep)$/;"	f
-PEPStateType	include/slepc/private/pepimpl.h	/^               PEP_STATE_EIGENVECTORS } PEPStateType;$/;"	t	typeref:enum:__anon3
-PEPTOAR	include/slepc/finclude/slepcpepdef.h	49;"	d
+PEPStateType	include/slepc/private/pepimpl.h	/^               PEP_STATE_EIGENVECTORS } PEPStateType;$/;"	t	typeref:enum:__anon4
+PEPStop	include/slepc/finclude/slepcpepdef.h	45;"	d
+PEPStop	include/slepcpep.h	/^               PEP_STOP_USER } PEPStop;$/;"	t	typeref:enum:__anon46
+PEPStoppingBasic	src/pep/interface/pepdefault.c	/^PetscErrorCode PEPStoppingBasic(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)$/;"	f
+PEPTOAR	include/slepc/finclude/slepcpepdef.h	51;"	d
 PEPTOAR	include/slepcpep.h	50;"	d
 PEPTOARCoefficients	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARCoefficients(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x)$/;"	f	file:
-PEPTOARExtendBasis	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_,PetscInt nwv)$/;"	f	file:
+PEPTOARExtendBasis	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)$/;"	f	file:
 PEPTOARGetLocking	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPTOARGetLocking(PEP pep,PetscBool *lock)$/;"	f
 PEPTOARGetLocking_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARGetLocking_TOAR(PEP pep,PetscBool *lock)$/;"	f	file:
 PEPTOARGetRestart	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPTOARGetRestart(PEP pep,PetscReal *keep)$/;"	f
 PEPTOARGetRestart_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARGetRestart_TOAR(PEP pep,PetscReal *keep)$/;"	f	file:
-PEPTOAROrth2	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work,PetscInt nw)$/;"	f	file:
+PEPTOAROrth2	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)$/;"	f	file:
 PEPTOARSNorm2	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)$/;"	f	file:
 PEPTOARSetLocking	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPTOARSetLocking(PEP pep,PetscBool lock)$/;"	f
 PEPTOARSetLocking_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARSetLocking_TOAR(PEP pep,PetscBool lock)$/;"	f	file:
 PEPTOARSetRestart	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPTOARSetRestart(PEP pep,PetscReal keep)$/;"	f
 PEPTOARSetRestart_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARSetRestart_TOAR(PEP pep,PetscReal keep)$/;"	f	file:
-PEPTOARSupdate	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)$/;"	f	file:
-PEPTOARTrunc	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)$/;"	f	file:
-PEPTOARrun	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)$/;"	f	file:
+PEPTOARSupdate	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)$/;"	f	file:
+PEPTOARTrunc	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscReal *rwork)$/;"	f	file:
+PEPTOARrun	src/pep/impls/krylov/toar/ptoar.c	/^static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,Vec *t_)$/;"	f	file:
 PEPType	include/slepc/finclude/slepcpepdef.h	36;"	d
 PEPType	include/slepcpep.h	/^typedef const char* PEPType;$/;"	t
 PEPValuesView	src/pep/interface/pepview.c	/^PetscErrorCode PEPValuesView(PEP pep,PetscViewer viewer)$/;"	f
@@ -3100,67 +3437,73 @@ PEPView_QArnoldi	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^PetscErrorCode PEPVi
 PEPView_STOAR	src/pep/impls/krylov/stoar/stoar.c	/^PetscErrorCode PEPView_STOAR(PEP pep,PetscViewer viewer)$/;"	f
 PEPView_TOAR	src/pep/impls/krylov/toar/ptoar.c	/^PetscErrorCode PEPView_TOAR(PEP pep,PetscViewer viewer)$/;"	f
 PEPWhich	include/slepc/finclude/slepcpepdef.h	38;"	d
-PEPWhich	include/slepcpep.h	/^               PEP_WHICH_USER } PEPWhich;$/;"	t	typeref:enum:__anon30
-PEP_BASIS_CHEBYSHEV1	include/slepcpep.h	/^               PEP_BASIS_CHEBYSHEV1,$/;"	e	enum:__anon31
-PEP_BASIS_CHEBYSHEV2	include/slepcpep.h	/^               PEP_BASIS_CHEBYSHEV2,$/;"	e	enum:__anon31
-PEP_BASIS_HERMITE	include/slepcpep.h	/^               PEP_BASIS_HERMITE } PEPBasis;$/;"	e	enum:__anon31
-PEP_BASIS_LAGUERRE	include/slepcpep.h	/^               PEP_BASIS_LAGUERRE,$/;"	e	enum:__anon31
-PEP_BASIS_LEGENDRE	include/slepcpep.h	/^               PEP_BASIS_LEGENDRE,$/;"	e	enum:__anon31
-PEP_BASIS_MONOMIAL	include/slepcpep.h	/^typedef enum { PEP_BASIS_MONOMIAL,$/;"	e	enum:__anon31
+PEPWhich	include/slepcpep.h	/^               PEP_WHICH_USER } PEPWhich;$/;"	t	typeref:enum:__anon38
+PEP_BASIS_CHEBYSHEV1	include/slepcpep.h	/^               PEP_BASIS_CHEBYSHEV1,$/;"	e	enum:__anon39
+PEP_BASIS_CHEBYSHEV2	include/slepcpep.h	/^               PEP_BASIS_CHEBYSHEV2,$/;"	e	enum:__anon39
+PEP_BASIS_HERMITE	include/slepcpep.h	/^               PEP_BASIS_HERMITE } PEPBasis;$/;"	e	enum:__anon39
+PEP_BASIS_LAGUERRE	include/slepcpep.h	/^               PEP_BASIS_LAGUERRE,$/;"	e	enum:__anon39
+PEP_BASIS_LEGENDRE	include/slepcpep.h	/^               PEP_BASIS_LEGENDRE,$/;"	e	enum:__anon39
+PEP_BASIS_MONOMIAL	include/slepcpep.h	/^typedef enum { PEP_BASIS_MONOMIAL,$/;"	e	enum:__anon39
 PEP_CLASSID	include/slepcpep.h	/^PETSC_EXTERN PetscClassId PEP_CLASSID;$/;"	v
 PEP_CLASSID	src/pep/interface/pepbasic.c	/^PetscClassId      PEP_CLASSID = 0;$/;"	v
-PEP_CONVERGED_ITERATING	include/slepcpep.h	/^              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;$/;"	e	enum:__anon37
-PEP_CONVERGED_TOL	include/slepcpep.h	/^              PEP_CONVERGED_TOL                =  2,$/;"	e	enum:__anon37
-PEP_CONV_ABS	include/slepcpep.h	/^typedef enum { PEP_CONV_ABS,$/;"	e	enum:__anon36
-PEP_CONV_EIG	include/slepcpep.h	/^               PEP_CONV_EIG,$/;"	e	enum:__anon36
-PEP_CONV_LINEAR	include/slepcpep.h	/^               PEP_CONV_LINEAR,$/;"	e	enum:__anon36
-PEP_CONV_NORM	include/slepcpep.h	/^               PEP_CONV_NORM,$/;"	e	enum:__anon36
-PEP_CONV_USER	include/slepcpep.h	/^               PEP_CONV_USER } PEPConv;$/;"	e	enum:__anon36
-PEP_DIVERGED_BREAKDOWN	include/slepcpep.h	/^              PEP_DIVERGED_BREAKDOWN           = -4,$/;"	e	enum:__anon37
-PEP_DIVERGED_ITS	include/slepcpep.h	/^              PEP_DIVERGED_ITS                 = -3,$/;"	e	enum:__anon37
-PEP_DIVERGED_SYMMETRY_LOST	include/slepcpep.h	/^              PEP_DIVERGED_SYMMETRY_LOST       = -5,$/;"	e	enum:__anon37
-PEP_ERROR_ABSOLUTE	include/slepcpep.h	/^typedef enum { PEP_ERROR_ABSOLUTE,$/;"	e	enum:__anon35
-PEP_ERROR_BACKWARD	include/slepcpep.h	/^               PEP_ERROR_BACKWARD } PEPErrorType;$/;"	e	enum:__anon35
-PEP_ERROR_RELATIVE	include/slepcpep.h	/^               PEP_ERROR_RELATIVE,$/;"	e	enum:__anon35
-PEP_EXTRACT_NONE	include/slepcpep.h	/^typedef enum { PEP_EXTRACT_NONE=1,$/;"	e	enum:__anon34
-PEP_EXTRACT_NORM	include/slepcpep.h	/^               PEP_EXTRACT_NORM,$/;"	e	enum:__anon34
-PEP_EXTRACT_RESIDUAL	include/slepcpep.h	/^               PEP_EXTRACT_RESIDUAL,$/;"	e	enum:__anon34
-PEP_EXTRACT_STRUCTURED	include/slepcpep.h	/^               PEP_EXTRACT_STRUCTURED } PEPExtract;$/;"	e	enum:__anon34
-PEP_GENERAL	include/slepcpep.h	/^typedef enum { PEP_GENERAL=1,$/;"	e	enum:__anon29
-PEP_GYROSCOPIC	include/slepcpep.h	/^               PEP_GYROSCOPIC   \/* QEP with M, K  Hermitian, M>0, C skew-Hermitian *\/$/;"	e	enum:__anon29
-PEP_HERMITIAN	include/slepcpep.h	/^               PEP_HERMITIAN,   \/* All A_i  Hermitian *\/$/;"	e	enum:__anon29
-PEP_JD	src/pep/impls/jd/pjdp.h	/^} PEP_JD;$/;"	t	typeref:struct:__anon82
-PEP_JD_PCSHELL	src/pep/impls/jd/pjdp.h	/^} PEP_JD_PCSHELL;$/;"	t	typeref:struct:__anon83
-PEP_LARGEST_IMAGINARY	include/slepcpep.h	/^               PEP_LARGEST_IMAGINARY,$/;"	e	enum:__anon30
-PEP_LARGEST_MAGNITUDE	include/slepcpep.h	/^typedef enum { PEP_LARGEST_MAGNITUDE=1,$/;"	e	enum:__anon30
-PEP_LARGEST_REAL	include/slepcpep.h	/^               PEP_LARGEST_REAL,$/;"	e	enum:__anon30
-PEP_LINEAR	src/pep/impls/linear/linearp.h	/^} PEP_LINEAR;$/;"	t	typeref:struct:__anon88
-PEP_QARNOLDI	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^} PEP_QARNOLDI;$/;"	t	typeref:struct:__anon85	file:
-PEP_REFINE_MULTIPLE	include/slepcpep.h	/^               PEP_REFINE_MULTIPLE } PEPRefine;$/;"	e	enum:__anon33
-PEP_REFINE_NONE	include/slepcpep.h	/^typedef enum { PEP_REFINE_NONE,$/;"	e	enum:__anon33
-PEP_REFINE_SIMPLE	include/slepcpep.h	/^               PEP_REFINE_SIMPLE,$/;"	e	enum:__anon33
+PEP_CONVERGED_ITERATING	include/slepcpep.h	/^              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;$/;"	e	enum:__anon47
+PEP_CONVERGED_TOL	include/slepcpep.h	/^              PEP_CONVERGED_TOL                =  1,$/;"	e	enum:__anon47
+PEP_CONVERGED_USER	include/slepcpep.h	/^              PEP_CONVERGED_USER               =  2,$/;"	e	enum:__anon47
+PEP_CONV_ABS	include/slepcpep.h	/^typedef enum { PEP_CONV_ABS,$/;"	e	enum:__anon45
+PEP_CONV_NORM	include/slepcpep.h	/^               PEP_CONV_NORM,$/;"	e	enum:__anon45
+PEP_CONV_REL	include/slepcpep.h	/^               PEP_CONV_REL,$/;"	e	enum:__anon45
+PEP_CONV_USER	include/slepcpep.h	/^               PEP_CONV_USER } PEPConv;$/;"	e	enum:__anon45
+PEP_DIVERGED_BREAKDOWN	include/slepcpep.h	/^              PEP_DIVERGED_BREAKDOWN           = -2,$/;"	e	enum:__anon47
+PEP_DIVERGED_ITS	include/slepcpep.h	/^              PEP_DIVERGED_ITS                 = -1,$/;"	e	enum:__anon47
+PEP_DIVERGED_SYMMETRY_LOST	include/slepcpep.h	/^              PEP_DIVERGED_SYMMETRY_LOST       = -3,$/;"	e	enum:__anon47
+PEP_ERROR_ABSOLUTE	include/slepcpep.h	/^typedef enum { PEP_ERROR_ABSOLUTE,$/;"	e	enum:__anon44
+PEP_ERROR_BACKWARD	include/slepcpep.h	/^               PEP_ERROR_BACKWARD } PEPErrorType;$/;"	e	enum:__anon44
+PEP_ERROR_RELATIVE	include/slepcpep.h	/^               PEP_ERROR_RELATIVE,$/;"	e	enum:__anon44
+PEP_EXTRACT_NONE	include/slepcpep.h	/^typedef enum { PEP_EXTRACT_NONE=1,$/;"	e	enum:__anon43
+PEP_EXTRACT_NORM	include/slepcpep.h	/^               PEP_EXTRACT_NORM,$/;"	e	enum:__anon43
+PEP_EXTRACT_RESIDUAL	include/slepcpep.h	/^               PEP_EXTRACT_RESIDUAL,$/;"	e	enum:__anon43
+PEP_EXTRACT_STRUCTURED	include/slepcpep.h	/^               PEP_EXTRACT_STRUCTURED } PEPExtract;$/;"	e	enum:__anon43
+PEP_GENERAL	include/slepcpep.h	/^typedef enum { PEP_GENERAL=1,$/;"	e	enum:__anon37
+PEP_GYROSCOPIC	include/slepcpep.h	/^               PEP_GYROSCOPIC   \/* QEP with M, K  Hermitian, M>0, C skew-Hermitian *\/$/;"	e	enum:__anon37
+PEP_HERMITIAN	include/slepcpep.h	/^               PEP_HERMITIAN,   \/* All A_i  Hermitian *\/$/;"	e	enum:__anon37
+PEP_JD	src/pep/impls/jd/pjdp.h	/^} PEP_JD;$/;"	t	typeref:struct:__anon99
+PEP_JD_MATSHELL	src/pep/impls/jd/pjdp.h	/^} PEP_JD_MATSHELL;$/;"	t	typeref:struct:__anon101
+PEP_JD_PCSHELL	src/pep/impls/jd/pjdp.h	/^} PEP_JD_PCSHELL;$/;"	t	typeref:struct:__anon100
+PEP_LARGEST_IMAGINARY	include/slepcpep.h	/^               PEP_LARGEST_IMAGINARY,$/;"	e	enum:__anon38
+PEP_LARGEST_MAGNITUDE	include/slepcpep.h	/^typedef enum { PEP_LARGEST_MAGNITUDE=1,$/;"	e	enum:__anon38
+PEP_LARGEST_REAL	include/slepcpep.h	/^               PEP_LARGEST_REAL,$/;"	e	enum:__anon38
+PEP_LINEAR	src/pep/impls/linear/linearp.h	/^} PEP_LINEAR;$/;"	t	typeref:struct:__anon106
+PEP_QARNOLDI	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^} PEP_QARNOLDI;$/;"	t	typeref:struct:__anon103	file:
+PEP_REFINE_MULTIPLE	include/slepcpep.h	/^               PEP_REFINE_MULTIPLE } PEPRefine;$/;"	e	enum:__anon41
+PEP_REFINE_NONE	include/slepcpep.h	/^typedef enum { PEP_REFINE_NONE,$/;"	e	enum:__anon41
+PEP_REFINE_SCHEME_EXPLICIT	include/slepcpep.h	/^               PEP_REFINE_SCHEME_EXPLICIT } PEPRefineScheme;$/;"	e	enum:__anon42
+PEP_REFINE_SCHEME_MBE	include/slepcpep.h	/^               PEP_REFINE_SCHEME_MBE,$/;"	e	enum:__anon42
+PEP_REFINE_SCHEME_SCHUR	include/slepcpep.h	/^typedef enum { PEP_REFINE_SCHEME_SCHUR=1,$/;"	e	enum:__anon42
+PEP_REFINE_SIMPLE	include/slepcpep.h	/^               PEP_REFINE_SIMPLE,$/;"	e	enum:__anon41
 PEP_Refine	include/slepc/private/pepimpl.h	/^PETSC_EXTERN PetscLogEvent PEP_SetUp,PEP_Solve,PEP_Refine;$/;"	v
 PEP_Refine	src/pep/interface/pepbasic.c	/^PetscLogEvent     PEP_SetUp = 0,PEP_Solve = 0,PEP_Refine = 0;$/;"	v
-PEP_SCALE_BOTH	include/slepcpep.h	/^               PEP_SCALE_BOTH } PEPScale;$/;"	e	enum:__anon32
-PEP_SCALE_DIAGONAL	include/slepcpep.h	/^               PEP_SCALE_DIAGONAL,$/;"	e	enum:__anon32
-PEP_SCALE_NONE	include/slepcpep.h	/^typedef enum { PEP_SCALE_NONE,$/;"	e	enum:__anon32
-PEP_SCALE_SCALAR	include/slepcpep.h	/^               PEP_SCALE_SCALAR,$/;"	e	enum:__anon32
-PEP_SMALLEST_IMAGINARY	include/slepcpep.h	/^               PEP_SMALLEST_IMAGINARY,$/;"	e	enum:__anon30
-PEP_SMALLEST_MAGNITUDE	include/slepcpep.h	/^               PEP_SMALLEST_MAGNITUDE,$/;"	e	enum:__anon30
-PEP_SMALLEST_REAL	include/slepcpep.h	/^               PEP_SMALLEST_REAL,$/;"	e	enum:__anon30
-PEP_STATE_EIGENVECTORS	include/slepc/private/pepimpl.h	/^               PEP_STATE_EIGENVECTORS } PEPStateType;$/;"	e	enum:__anon3
-PEP_STATE_INITIAL	include/slepc/private/pepimpl.h	/^typedef enum { PEP_STATE_INITIAL,$/;"	e	enum:__anon3
-PEP_STATE_SETUP	include/slepc/private/pepimpl.h	/^               PEP_STATE_SETUP,$/;"	e	enum:__anon3
-PEP_STATE_SOLVED	include/slepc/private/pepimpl.h	/^               PEP_STATE_SOLVED,$/;"	e	enum:__anon3
+PEP_SCALE_BOTH	include/slepcpep.h	/^               PEP_SCALE_BOTH } PEPScale;$/;"	e	enum:__anon40
+PEP_SCALE_DIAGONAL	include/slepcpep.h	/^               PEP_SCALE_DIAGONAL,$/;"	e	enum:__anon40
+PEP_SCALE_NONE	include/slepcpep.h	/^typedef enum { PEP_SCALE_NONE,$/;"	e	enum:__anon40
+PEP_SCALE_SCALAR	include/slepcpep.h	/^               PEP_SCALE_SCALAR,$/;"	e	enum:__anon40
+PEP_SMALLEST_IMAGINARY	include/slepcpep.h	/^               PEP_SMALLEST_IMAGINARY,$/;"	e	enum:__anon38
+PEP_SMALLEST_MAGNITUDE	include/slepcpep.h	/^               PEP_SMALLEST_MAGNITUDE,$/;"	e	enum:__anon38
+PEP_SMALLEST_REAL	include/slepcpep.h	/^               PEP_SMALLEST_REAL,$/;"	e	enum:__anon38
+PEP_STATE_EIGENVECTORS	include/slepc/private/pepimpl.h	/^               PEP_STATE_EIGENVECTORS } PEPStateType;$/;"	e	enum:__anon4
+PEP_STATE_INITIAL	include/slepc/private/pepimpl.h	/^typedef enum { PEP_STATE_INITIAL,$/;"	e	enum:__anon4
+PEP_STATE_SETUP	include/slepc/private/pepimpl.h	/^               PEP_STATE_SETUP,$/;"	e	enum:__anon4
+PEP_STATE_SOLVED	include/slepc/private/pepimpl.h	/^               PEP_STATE_SOLVED,$/;"	e	enum:__anon4
+PEP_STOP_BASIC	include/slepcpep.h	/^typedef enum { PEP_STOP_BASIC,$/;"	e	enum:__anon46
+PEP_STOP_USER	include/slepcpep.h	/^               PEP_STOP_USER } PEPStop;$/;"	e	enum:__anon46
 PEP_SetUp	include/slepc/private/pepimpl.h	/^PETSC_EXTERN PetscLogEvent PEP_SetUp,PEP_Solve,PEP_Refine;$/;"	v
 PEP_SetUp	src/pep/interface/pepbasic.c	/^PetscLogEvent     PEP_SetUp = 0,PEP_Solve = 0,PEP_Refine = 0;$/;"	v
 PEP_Solve	include/slepc/private/pepimpl.h	/^PETSC_EXTERN PetscLogEvent PEP_SetUp,PEP_Solve,PEP_Refine;$/;"	v
 PEP_Solve	src/pep/interface/pepbasic.c	/^PetscLogEvent     PEP_SetUp = 0,PEP_Solve = 0,PEP_Refine = 0;$/;"	v
-PEP_TARGET_IMAGINARY	include/slepcpep.h	/^               PEP_TARGET_IMAGINARY,$/;"	e	enum:__anon30
-PEP_TARGET_MAGNITUDE	include/slepcpep.h	/^               PEP_TARGET_MAGNITUDE,$/;"	e	enum:__anon30
-PEP_TARGET_REAL	include/slepcpep.h	/^               PEP_TARGET_REAL,$/;"	e	enum:__anon30
-PEP_TOAR	src/pep/impls/krylov/pepkrylov.h	/^} PEP_TOAR;$/;"	t	typeref:struct:__anon84
-PEP_WHICH_USER	include/slepcpep.h	/^               PEP_WHICH_USER } PEPWhich;$/;"	e	enum:__anon30
+PEP_TARGET_IMAGINARY	include/slepcpep.h	/^               PEP_TARGET_IMAGINARY,$/;"	e	enum:__anon38
+PEP_TARGET_MAGNITUDE	include/slepcpep.h	/^               PEP_TARGET_MAGNITUDE,$/;"	e	enum:__anon38
+PEP_TARGET_REAL	include/slepcpep.h	/^               PEP_TARGET_REAL,$/;"	e	enum:__anon38
+PEP_TOAR	src/pep/impls/krylov/pepkrylov.h	/^} PEP_TOAR;$/;"	t	typeref:struct:__anon102
+PEP_WHICH_USER	include/slepcpep.h	/^               PEP_WHICH_USER } PEPWhich;$/;"	e	enum:__anon38
 PETSCSetupInterpreter	src/eps/impls/external/blopex/petsc-interface.c	/^int PETSCSetupInterpreter(mv_InterfaceInterpreter *i)$/;"	f
 PETSC_Axpy	src/eps/impls/external/blopex/petsc-interface.c	/^BlopexInt PETSC_Axpy(void *alpha,void *x,void *y)$/;"	f
 PETSC_ClearVector	src/eps/impls/external/blopex/petsc-interface.c	/^BlopexInt PETSC_ClearVector(void *x)$/;"	f
@@ -3179,10 +3522,11 @@ PETSC_zpotrf_interface	src/eps/impls/external/blopex/petsc-interface.c	/^BlopexI
 PETSC_zsygv_interface	src/eps/impls/external/blopex/petsc-interface.c	/^BlopexInt PETSC_zsygv_interface (BlopexInt *itype,char *jobz,char *uplo,BlopexInt *n,komplex *a,BlopexInt *lda,komplex *b,BlopexInt *ldb,double *w,komplex *work,BlopexInt *lwork,double *rwork,BlopexInt *info)$/;"	f
 PETSc	config/packages/petsc.py	/^class PETSc(package.Package):$/;"	c
 PETScMaker	config/cmakeboot.py	/^class PETScMaker(script.Script):$/;"	c
+PG	src/eps/examples/tutorials/ex31.c	/^const PetscScalar PG[3] = {0.716786142395021,1.630000000000000,0.850000000000000};$/;"	v
 PKGS	config/gmakegen.py	/^PKGS = 'sys eps svd pep nep mfn'.split()$/;"	v
-Pa	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Pa,Pb;       \/* H=W'*(Pa*AV - Pb*BV), G=W'*(Wa*AV - Wb*BV) *\/$/;"	m	struct:__anon59	file:
+Pa	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Pa,Pb;       \/* H=W'*(Pa*AV - Pb*BV), G=W'*(Wa*AV - Wb*BV) *\/$/;"	m	struct:__anon72	file:
 Package	config/package.py	/^class Package:$/;"	c
-Pb	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Pa,Pb;       \/* H=W'*(Pa*AV - Pb*BV), G=W'*(Wa*AV - Wb*BV) *\/$/;"	m	struct:__anon59	file:
+Pb	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Pa,Pb;       \/* H=W'*(Pa*AV - Pb*BV), G=W'*(Wa*AV - Wb*BV) *\/$/;"	m	struct:__anon72	file:
 PetscBeganMPI	src/sys/slepcinit.c	/^PETSC_EXTERN PetscBool PetscBeganMPI;$/;"	v
 PetscDLLibraryRegister_slepc	src/sys/dlregisslepc.c	/^PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepc(void)$/;"	f
 PetscDLLibraryRegister_slepceps	src/eps/interface/dlregiseps.c	/^PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()$/;"	f
@@ -3197,8 +3541,10 @@ PopHelp	config/argdb.py	/^  def PopHelp(self):$/;"	m	class:ArgDB
 PopPath	config/argdb.py	/^  def PopPath(self,keyword):$/;"	m	class:ArgDB
 PopString	config/argdb.py	/^  def PopString(self,keyword):$/;"	m	class:ArgDB
 PopUrl	config/argdb.py	/^  def PopUrl(self,keyword):$/;"	m	class:ArgDB
+PreallocateJacobian	src/eps/examples/tutorials/ex31.c	/^PetscErrorCode PreallocateJacobian(Mat J,Userctx *user)$/;"	f
 Precond_FnMultiVector	src/eps/impls/external/blopex/blopex.c	/^static void Precond_FnMultiVector(void *data,void *x,void *y)$/;"	f	file:
 Precond_FnSingleVector	src/eps/impls/external/blopex/blopex.c	/^static void Precond_FnSingleVector(void *data,void *x,void *y)$/;"	f	file:
+Precondition	config/package.py	/^  def Precondition(self,petsc):$/;"	m	class:Package
 PrepFtnDir	bin/maint/generatefortranstubs.py	/^def PrepFtnDir(dir):$/;"	f
 Primme	config/packages/primme.py	/^class Primme(package.Package):$/;"	c
 Print	config/log.py	/^  def Print(self,string):$/;"	m	class:Log
@@ -3206,9 +3552,12 @@ Println	config/log.py	/^  def Println(self,string):$/;"	m	class:Log
 Process	config/package.py	/^  def Process(self,conf,vars,cmake,petsc,archdir=''):$/;"	m	class:Package
 Process	config/packages/lapack.py	/^  def Process(self,conf,vars,cmake,petsc,archdir=''):$/;"	m	class:Lapack
 ProcessArgs	config/package.py	/^  def ProcessArgs(self,argdb):$/;"	m	class:Package
-ProjType_t	src/eps/impls/davidson/davidson.h	/^} ProjType_t;$/;"	t	typeref:enum:__anon51
-Prologue	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work,PetscReal nw)$/;"	f	file:
-PseudoOrthog_HR	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work,PetscInt nw)$/;"	f	file:
+ProjType_t	src/eps/impls/davidson/davidson.h	/^} ProjType_t;$/;"	t	typeref:enum:__anon64
+Prologue	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work)$/;"	f	file:
+PseudoOrthog_HR	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work)$/;"	f	file:
+Pshell	src/pep/impls/jd/pjdp.h	/^  Mat         Pshell;        \/* auxiliary shell matrix *\/$/;"	m	struct:__anon99
+QD0	src/eps/examples/tutorials/ex31.c	/^const PetscScalar QD0[3] = {0.5,0.3,0.35};$/;"	v
+QG	src/eps/examples/tutorials/ex31.c	/^const PetscScalar QG[3] = {0.270702180178785,0.066120127797275,-0.108402221791588};$/;"	v
 RG	include/slepc/finclude/slepcrgdef.h	27;"	d
 RG	include/slepcrgtypes.h	/^typedef struct _p_RG* RG;$/;"	t	typeref:struct:_p_RG
 RGAppendOptionsPrefix	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGAppendOptionsPrefix(RG rg,const char *prefix)$/;"	f
@@ -3232,7 +3581,7 @@ RGDestroy_Ellipse	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^PetscErrorCode
 RGDestroy_Interval	src/sys/classes/rg/impls/interval/rginterval.c	/^PetscErrorCode RGDestroy_Interval(RG rg)$/;"	f
 RGDestroy_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCode RGDestroy_Polygon(RG rg)$/;"	f
 RGDestroy_Ring	src/sys/classes/rg/impls/ring/rgring.c	/^PetscErrorCode RGDestroy_Ring(RG rg)$/;"	f
-RGELLIPSE	include/slepc/finclude/slepcrgdef.h	35;"	d
+RGELLIPSE	include/slepc/finclude/slepcrgdef.h	34;"	d
 RGELLIPSE	include/slepcrg.h	39;"	d
 RGEllipseGetParameters	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^PetscErrorCode RGEllipseGetParameters(RG rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale)$/;"	f
 RGEllipseGetParameters_Ellipse	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^static PetscErrorCode RGEllipseGetParameters_Ellipse(RG rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale)$/;"	f	file:
@@ -3243,7 +3592,7 @@ RGGetComplement	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGGetCom
 RGGetOptionsPrefix	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGGetOptionsPrefix(RG rg,const char *prefix[])$/;"	f
 RGGetScale	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGGetScale(RG rg,PetscReal *sfactor)$/;"	f
 RGGetType	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGGetType(RG rg,RGType *type)$/;"	f
-RGINTERVAL	include/slepc/finclude/slepcrgdef.h	33;"	d
+RGINTERVAL	include/slepc/finclude/slepcrgdef.h	32;"	d
 RGINTERVAL	include/slepcrg.h	37;"	d
 RGInitializePackage	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGInitializePackage(void)$/;"	f
 RGIntervalGetEndpoints	src/sys/classes/rg/impls/interval/rginterval.c	/^PetscErrorCode RGIntervalGetEndpoints(RG rg,PetscReal *a,PetscReal *b,PetscReal *c,PetscReal *d)$/;"	f
@@ -3257,16 +3606,17 @@ RGIsTrivial_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCod
 RGIsTrivial_Ring	src/sys/classes/rg/impls/ring/rgring.c	/^PetscErrorCode RGIsTrivial_Ring(RG rg,PetscBool *trivial)$/;"	f
 RGList	include/slepcrg.h	/^PETSC_EXTERN PetscFunctionList RGList;$/;"	v
 RGList	src/sys/classes/rg/interface/rgbasic.c	/^PetscFunctionList RGList = 0;$/;"	v
-RGNONE	include/slepc/finclude/slepcrgdef.h	32;"	d
 RGOps	include/slepc/private/rgimpl.h	/^typedef struct _RGOps *RGOps;$/;"	t	typeref:struct:_RGOps
-RGPOLYGON	include/slepc/finclude/slepcrgdef.h	34;"	d
+RGPOLYGON	include/slepc/finclude/slepcrgdef.h	33;"	d
 RGPOLYGON	include/slepcrg.h	38;"	d
 RGPackageInitialized	src/sys/classes/rg/interface/rgbasic.c	/^static PetscBool  RGPackageInitialized = PETSC_FALSE;$/;"	v	file:
 RGPolygonGetVertices	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCode RGPolygonGetVertices(RG rg,PetscInt *n,PetscScalar **vr,PetscScalar **vi)$/;"	f
 RGPolygonGetVertices_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^static PetscErrorCode RGPolygonGetVertices_Polygon(RG rg,PetscInt *n,PetscScalar **vr,PetscScalar **vi)$/;"	f	file:
 RGPolygonSetVertices	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCode RGPolygonSetVertices(RG rg,PetscInt n,PetscScalar *vr,PetscScalar *vi)$/;"	f
 RGPolygonSetVertices_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^static PetscErrorCode RGPolygonSetVertices_Polygon(RG rg,PetscInt n,PetscScalar *vr,PetscScalar *vi)$/;"	f	file:
-RGRING	include/slepc/finclude/slepcrgdef.h	36;"	d
+RGPopScale	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGPopScale(RG rg)$/;"	f
+RGPushScale	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGPushScale(RG rg,PetscReal sfactor)$/;"	f
+RGRING	include/slepc/finclude/slepcrgdef.h	35;"	d
 RGRING	include/slepcrg.h	40;"	d
 RGRegister	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGRegister(const char *name,PetscErrorCode (*function)(RG))$/;"	f
 RGRegisterAll	src/sys/classes/rg/interface/rgregis.c	/^PetscErrorCode RGRegisterAll(void)$/;"	f
@@ -3278,14 +3628,14 @@ RGRingSetParameters	src/sys/classes/rg/impls/ring/rgring.c	/^PetscErrorCode RGRi
 RGRingSetParameters_Ring	src/sys/classes/rg/impls/ring/rgring.c	/^static PetscErrorCode RGRingSetParameters_Ring(RG rg,PetscScalar center,PetscReal radius,PetscReal vscale,PetscReal start_ang,PetscReal end_ang,PetscReal width)$/;"	f	file:
 RGSetComplement	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGSetComplement(RG rg,PetscBool flg)$/;"	f
 RGSetFromOptions	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGSetFromOptions(RG rg)$/;"	f
-RGSetFromOptions_Ellipse	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^PetscErrorCode RGSetFromOptions_Ellipse(PetscOptions *PetscOptionsObject,RG rg)$/;"	f
-RGSetFromOptions_Interval	src/sys/classes/rg/impls/interval/rginterval.c	/^PetscErrorCode RGSetFromOptions_Interval(PetscOptions *PetscOptionsObject,RG rg)$/;"	f
-RGSetFromOptions_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCode RGSetFromOptions_Polygon(PetscOptions *PetscOptionsObject,RG rg)$/;"	f
-RGSetFromOptions_Ring	src/sys/classes/rg/impls/ring/rgring.c	/^PetscErrorCode RGSetFromOptions_Ring(PetscOptions *PetscOptionsObject,RG rg)$/;"	f
+RGSetFromOptions_Ellipse	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^PetscErrorCode RGSetFromOptions_Ellipse(PetscOptionItems *PetscOptionsObject,RG rg)$/;"	f
+RGSetFromOptions_Interval	src/sys/classes/rg/impls/interval/rginterval.c	/^PetscErrorCode RGSetFromOptions_Interval(PetscOptionItems *PetscOptionsObject,RG rg)$/;"	f
+RGSetFromOptions_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCode RGSetFromOptions_Polygon(PetscOptionItems *PetscOptionsObject,RG rg)$/;"	f
+RGSetFromOptions_Ring	src/sys/classes/rg/impls/ring/rgring.c	/^PetscErrorCode RGSetFromOptions_Ring(PetscOptionItems *PetscOptionsObject,RG rg)$/;"	f
 RGSetOptionsPrefix	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGSetOptionsPrefix(RG rg,const char *prefix)$/;"	f
 RGSetScale	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGSetScale(RG rg,PetscReal sfactor)$/;"	f
 RGSetType	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGSetType(RG rg,RGType type)$/;"	f
-RGShowReal	include/slepc/private/rgimpl.h	50;"	d
+RGShowReal	include/slepc/private/rgimpl.h	51;"	d
 RGType	include/slepc/finclude/slepcrgdef.h	30;"	d
 RGType	include/slepcrg.h	/^typedef const char* RGType;$/;"	t
 RGView	src/sys/classes/rg/interface/rgbasic.c	/^PetscErrorCode RGView(RG rg,PetscViewer viewer)$/;"	f
@@ -3295,17 +3645,21 @@ RGView_Polygon	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^PetscErrorCode RGV
 RGView_Ring	src/sys/classes/rg/impls/ring/rgring.c	/^PetscErrorCode RGView_Ring(RG rg,PetscViewer viewer)$/;"	f
 RG_CLASSID	include/slepcrg.h	/^PETSC_EXTERN PetscClassId RG_CLASSID;$/;"	v
 RG_CLASSID	src/sys/classes/rg/interface/rgbasic.c	/^PetscClassId      RG_CLASSID = 0;$/;"	v
-RG_ELLIPSE	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^} RG_ELLIPSE;$/;"	t	typeref:struct:__anon105	file:
-RG_INTERVAL	src/sys/classes/rg/impls/interval/rginterval.c	/^} RG_INTERVAL;$/;"	t	typeref:struct:__anon106	file:
-RG_POLYGON	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^} RG_POLYGON;$/;"	t	typeref:struct:__anon107	file:
-RG_RING	src/sys/classes/rg/impls/ring/rgring.c	/^} RG_RING;$/;"	t	typeref:struct:__anon108	file:
+RG_ELLIPSE	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^} RG_ELLIPSE;$/;"	t	typeref:struct:__anon124	file:
+RG_INTERVAL	src/sys/classes/rg/impls/interval/rginterval.c	/^} RG_INTERVAL;$/;"	t	typeref:struct:__anon125	file:
+RG_POLYGON	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^} RG_POLYGON;$/;"	t	typeref:struct:__anon126	file:
+RG_RING	src/sys/classes/rg/impls/ring/rgring.c	/^} RG_RING;$/;"	t	typeref:struct:__anon127	file:
 RayleighQuotient	src/eps/examples/tutorials/ex24.c	/^PetscErrorCode RayleighQuotient(Mat A,Vec x,PetscScalar *r)$/;"	f
 RealDQDS	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode RealDQDS(PetscInt n,PetscReal *L,PetscReal *U,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L1,PetscReal *U1,PetscInt *fail)$/;"	f	file:
-Rv	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon87	file:
-S	src/eps/impls/ciss/ciss.c	/^  BV           S;$/;"	m	struct:__anon47	file:
+ResidualJacobian	src/eps/examples/tutorials/ex31.c	/^PetscErrorCode ResidualJacobian(Vec X,Mat J,void *ctx)$/;"	f
+Rs	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Rs[3]   = {0.0,0.0,0.0}; \/* Stator Resistance *\/$/;"	v
+Rv	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon105	file:
+S	src/eps/impls/ciss/ciss.c	/^  BV                S;$/;"	m	struct:__anon61	file:
 S	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscScalar   *S;           \/* Matrix for projected problem *\/$/;"	m	struct:_n_SR
-S	src/nep/impls/ciss/nciss.c	/^  BV           S;$/;"	m	struct:__anon77	file:
-S	src/pep/impls/krylov/pepkrylov.h	/^  PetscScalar *S,*qB;       \/* auxiliary matrices *\/$/;"	m	struct:__anon84
+S	src/nep/impls/ciss/nciss.c	/^  BV           S;$/;"	m	struct:__anon89	file:
+S	src/pep/impls/krylov/pepkrylov.h	/^  PetscScalar *S,*qB;       \/* auxiliary matrices *\/$/;"	m	struct:__anon102
+SHIFTMAX	src/nep/impls/nleigs/nleigs.c	1823;"	d	file:
+SIGMA	src/nep/examples/nlevp/gun.c	43;"	d	file:
 SKIPDIRS	config/cmakegen.py	/^SKIPDIRS = set('benchmarks'.split())                     # Skip these during the build$/;"	v
 SLEPCSetupInterpreter	src/eps/impls/external/blopex/slepc-interface.c	/^int SLEPCSetupInterpreter(mv_InterfaceInterpreter *i)$/;"	f
 SLEPCSetupInterpreterForDignifiedDeath	src/eps/impls/external/blopex/slepc-interface.c	/^void SLEPCSetupInterpreterForDignifiedDeath(mv_InterfaceInterpreter *i)$/;"	f
@@ -3361,7 +3715,6 @@ SLEPC_BLASLAPACKREAL	include/slepcblaslapack.h	69;"	d
 SLEPC_BLASLAPACKREAL	include/slepcblaslapack.h	79;"	d
 SLEPC_BLASLAPACKREAL	include/slepcblaslapack.h	86;"	d
 SLEPC_BLASLAPACKREAL	include/slepcblaslapack.h	93;"	d
-SLEPC_BLOPEX_USECONSTR	src/eps/impls/external/blopex/slepc-interface.h	32;"	d
 SLEPC_BLZPACK	src/eps/impls/external/blzpack/blzpackp.h	43;"	d
 SLEPC_BLZPACK	src/eps/impls/external/blzpack/blzpackp.h	45;"	d
 SLEPC_BLZPACK	src/eps/impls/external/blzpack/blzpackp.h	47;"	d
@@ -3384,7 +3737,7 @@ SLEPC_FEASTM	src/eps/impls/external/feast/feastp.h	77;"	d
 SLEPC_FEASTM	src/eps/impls/external/feast/feastp.h	83;"	d
 SLEPC_FEASTM	src/eps/impls/external/feast/feastp.h	85;"	d
 SLEPC_FEASTM	src/eps/impls/external/feast/feastp.h	87;"	d
-SLEPC_INTERFACE_HEADER	src/eps/impls/external/blopex/slepc-interface.h	27;"	d
+SLEPC_INTERFACE_HEADER	src/eps/impls/external/blopex/slepc-interface.h	26;"	d
 SLEPC_RELEASE_DATE	include/slepcversion.h	9;"	d
 SLEPC_VERSION	makefile	/^	- at grep "define SLEPC_VERSION" ${SLEPC_DIR}\/include\/slepcversion.h | ${SED} "s\/........\/\/"$/;"	m
 SLEPC_VERSION_	include/slepcversion.h	20;"	d
@@ -3401,7 +3754,7 @@ SLEPC_VERSION_PATCH	include/slepcversion.h	8;"	d
 SLEPC_VERSION_RELEASE	include/slepcversion.h	4;"	d
 SLEPC_VERSION_SUBMINOR	include/slepcversion.h	7;"	d
 SLEPc	config/packages/slepc.py	/^class SLEPc:$/;"	c
-SLICE_PTOL	src/eps/impls/krylov/krylovschur/ks-slice.c	40;"	d	file:
+SLICE_PTOL	src/eps/impls/krylov/krylovschur/ks-slice.c	53;"	d	file:
 SOURCEC	docs/makefile	/^SOURCEC  =$/;"	m
 SOURCEC	include/makefile	/^SOURCEC  =$/;"	m
 SOURCEC	include/slepc/finclude/makefile	/^SOURCEC   =$/;"	m
@@ -3429,6 +3782,7 @@ SOURCEC	src/eps/impls/subspace/makefile	/^SOURCEC  = subspace.c$/;"	m
 SOURCEC	src/eps/interface/ftn-custom/makefile	/^SOURCEC  = zepsf.c$/;"	m
 SOURCEC	src/eps/interface/makefile	/^SOURCEC  = epsmon.c epsbasic.c epsview.c epsdefault.c epsregis.c epsopts.c epssetup.c epssolve.c dlregiseps.c$/;"	m
 SOURCEC	src/mfn/f90-mod/makefile	/^SOURCEC    =$/;"	m
+SOURCEC	src/mfn/impls/expokit/makefile	/^SOURCEC  = mfnexpokit.c$/;"	m
 SOURCEC	src/mfn/impls/krylov/makefile	/^SOURCEC  = mfnkrylov.c$/;"	m
 SOURCEC	src/mfn/interface/ftn-custom/makefile	/^SOURCEC  = zmfnf.c$/;"	m
 SOURCEC	src/mfn/interface/makefile	/^SOURCEC  = mfnmon.c mfnbasic.c mfnregis.c mfnopts.c mfnsetup.c mfnsolve.c dlregismfn.c$/;"	m
@@ -3436,6 +3790,7 @@ SOURCEC	src/nep/f90-mod/makefile	/^SOURCEC    =$/;"	m
 SOURCEC	src/nep/impls/ciss/makefile	/^SOURCEC  = nciss.c$/;"	m
 SOURCEC	src/nep/impls/interpol/makefile	/^SOURCEC  = interpol.c$/;"	m
 SOURCEC	src/nep/impls/narnoldi/makefile	/^SOURCEC  = narnoldi.c$/;"	m
+SOURCEC	src/nep/impls/nleigs/makefile	/^SOURCEC  = nleigs.c$/;"	m
 SOURCEC	src/nep/impls/rii/makefile	/^SOURCEC  = rii.c$/;"	m
 SOURCEC	src/nep/impls/slp/makefile	/^SOURCEC  = slp.c$/;"	m
 SOURCEC	src/nep/interface/ftn-custom/makefile	/^SOURCEC  = znepf.c$/;"	m
@@ -3456,7 +3811,7 @@ SOURCEC	src/svd/impls/lanczos/makefile	/^SOURCEC  = gklanczos.c$/;"	m
 SOURCEC	src/svd/impls/lapack/makefile	/^SOURCEC  = svdlapack.c$/;"	m
 SOURCEC	src/svd/impls/trlanczos/makefile	/^SOURCEC  = trlanczos.c$/;"	m
 SOURCEC	src/svd/interface/ftn-custom/makefile	/^SOURCEC  = zsvdf.c$/;"	m
-SOURCEC	src/svd/interface/makefile	/^SOURCEC  = svdregis.c svdbasic.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.c$/;"	m
+SOURCEC	src/svd/interface/makefile	/^SOURCEC  = svdregis.c svdbasic.c svddefault.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.c$/;"	m
 SOURCEC	src/sys/classes/bv/impls/contiguous/makefile	/^SOURCEC  = contig.c$/;"	m
 SOURCEC	src/sys/classes/bv/impls/mat/makefile	/^SOURCEC  = bvmat.c$/;"	m
 SOURCEC	src/sys/classes/bv/impls/svec/makefile	/^SOURCEC  = svec.c$/;"	m
@@ -3476,7 +3831,9 @@ SOURCEC	src/sys/classes/ds/interface/ftn-custom/makefile	/^SOURCEC  = zdsf.c$/;"
 SOURCEC	src/sys/classes/ds/interface/makefile	/^SOURCEC  = dsbasic.c dsops.c dspriv.c$/;"	m
 SOURCEC	src/sys/classes/fn/impls/combine/makefile	/^SOURCEC  = fncombine.c$/;"	m
 SOURCEC	src/sys/classes/fn/impls/exp/makefile	/^SOURCEC  = fnexp.c$/;"	m
+SOURCEC	src/sys/classes/fn/impls/invsqrt/makefile	/^SOURCEC  = fninvsqrt.c$/;"	m
 SOURCEC	src/sys/classes/fn/impls/log/makefile	/^SOURCEC  = fnlog.c$/;"	m
+SOURCEC	src/sys/classes/fn/impls/makefile	/^SOURCEC  = fnutil.c$/;"	m
 SOURCEC	src/sys/classes/fn/impls/phi/makefile	/^SOURCEC  = fnphi.c$/;"	m
 SOURCEC	src/sys/classes/fn/impls/rational/makefile	/^SOURCEC  = fnrational.c$/;"	m
 SOURCEC	src/sys/classes/fn/impls/sqrt/makefile	/^SOURCEC  = fnsqrt.c$/;"	m
@@ -3498,7 +3855,7 @@ SOURCEC	src/sys/classes/st/impls/sinvert/makefile	/^SOURCEC  = sinvert.c$/;"	m
 SOURCEC	src/sys/classes/st/interface/ftn-custom/makefile	/^SOURCEC  = zstf.c$/;"	m
 SOURCEC	src/sys/classes/st/interface/makefile	/^SOURCEC  = stfunc.c stset.c stsolve.c stsles.c stregis.c stshellmat.c$/;"	m
 SOURCEC	src/sys/f90-mod/makefile	/^SOURCEC    =$/;"	m
-SOURCEC	src/sys/ftn-custom/makefile	/^SOURCEC  = zslepc_start.c zslepc_startf.c$/;"	m
+SOURCEC	src/sys/ftn-custom/makefile	/^SOURCEC  = zslepcutil.c zslepc_start.c zslepc_startf.c$/;"	m
 SOURCEC	src/sys/makefile	/^SOURCEC  = slepcinit.c slepcutil.c slepcsc.c dlregisslepc.c$/;"	m
 SOURCEC	src/sys/vec/makefile	/^SOURCEC  = veccomp.c pool.c$/;"	m
 SOURCEF	docs/makefile	/^SOURCEF  =$/;"	m
@@ -3528,6 +3885,7 @@ SOURCEF	src/eps/impls/subspace/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/eps/interface/ftn-custom/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/eps/interface/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/mfn/f90-mod/makefile	/^SOURCEF    = slepcmfnmod.F$/;"	m
+SOURCEF	src/mfn/impls/expokit/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/mfn/impls/krylov/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/mfn/interface/ftn-custom/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/mfn/interface/makefile	/^SOURCEF  =$/;"	m
@@ -3535,6 +3893,7 @@ SOURCEF	src/nep/f90-mod/makefile	/^SOURCEF    = slepcnepmod.F$/;"	m
 SOURCEF	src/nep/impls/ciss/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/nep/impls/interpol/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/nep/impls/narnoldi/makefile	/^SOURCEF  = $/;"	m
+SOURCEF	src/nep/impls/nleigs/makefile	/^SOURCEF  = $/;"	m
 SOURCEF	src/nep/impls/rii/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/nep/impls/slp/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/nep/interface/ftn-custom/makefile	/^SOURCEF  =$/;"	m
@@ -3575,7 +3934,9 @@ SOURCEF	src/sys/classes/ds/interface/ftn-custom/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/ds/interface/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/fn/impls/combine/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/fn/impls/exp/makefile	/^SOURCEF  =$/;"	m
+SOURCEF	src/sys/classes/fn/impls/invsqrt/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/fn/impls/log/makefile	/^SOURCEF  =$/;"	m
+SOURCEF	src/sys/classes/fn/impls/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/fn/impls/phi/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/fn/impls/rational/makefile	/^SOURCEF  =$/;"	m
 SOURCEF	src/sys/classes/fn/impls/sqrt/makefile	/^SOURCEF  =$/;"	m
@@ -3628,6 +3989,7 @@ SOURCEH	src/eps/interface/ftn-custom/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/eps/interface/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/eps/makefile	/^SOURCEH  = ..\/..\/include\/slepc\/private\/epsimpl.h ..\/..\/include\/slepceps.h$/;"	m
 SOURCEH	src/mfn/f90-mod/makefile	/^SOURCEH    =$/;"	m
+SOURCEH	src/mfn/impls/expokit/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/mfn/impls/krylov/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/mfn/interface/ftn-custom/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/mfn/interface/makefile	/^SOURCEH  =$/;"	m
@@ -3636,6 +3998,7 @@ SOURCEH	src/nep/f90-mod/makefile	/^SOURCEH    =$/;"	m
 SOURCEH	src/nep/impls/ciss/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/nep/impls/interpol/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/nep/impls/narnoldi/makefile	/^SOURCEH  =$/;"	m
+SOURCEH	src/nep/impls/nleigs/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/nep/impls/rii/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/nep/impls/slp/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/nep/interface/ftn-custom/makefile	/^SOURCEH  =$/;"	m
@@ -3681,7 +4044,9 @@ SOURCEH	src/sys/classes/ds/interface/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/sys/classes/ds/makefile	/^SOURCEH  = ..\/..\/..\/..\/include\/slepc\/private\/dsimpl.h ..\/..\/..\/..\/include\/slepcds.h$/;"	m
 SOURCEH	src/sys/classes/fn/impls/combine/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/sys/classes/fn/impls/exp/makefile	/^SOURCEH  =$/;"	m
+SOURCEH	src/sys/classes/fn/impls/invsqrt/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/sys/classes/fn/impls/log/makefile	/^SOURCEH  =$/;"	m
+SOURCEH	src/sys/classes/fn/impls/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/sys/classes/fn/impls/phi/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/sys/classes/fn/impls/rational/makefile	/^SOURCEH  =$/;"	m
 SOURCEH	src/sys/classes/fn/impls/sqrt/makefile	/^SOURCEH  =$/;"	m
@@ -3748,8 +4113,8 @@ STCayleyGetAntishift_Cayley	src/sys/classes/st/impls/cayley/cayley.c	/^static Pe
 STCayleySetAntishift	src/sys/classes/st/impls/cayley/cayley.c	/^PetscErrorCode STCayleySetAntishift(ST st,PetscScalar nu)$/;"	f
 STCayleySetAntishift_Cayley	src/sys/classes/st/impls/cayley/cayley.c	/^static PetscErrorCode STCayleySetAntishift_Cayley(ST st,PetscScalar newshift)$/;"	f	file:
 STCheckFactorPackage	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STCheckFactorPackage(ST st)$/;"	f
-STCheckMatrices	include/slepc/private/stimpl.h	78;"	d
-STCheckMatrices	include/slepc/private/stimpl.h	82;"	d
+STCheckMatrices	include/slepc/private/stimpl.h	86;"	d
+STCheckMatrices	include/slepc/private/stimpl.h	90;"	d
 STCheckNullSpace	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STCheckNullSpace(ST st,BV V)$/;"	f
 STCheckNullSpace_Default	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STCheckNullSpace_Default(ST st,BV V)$/;"	f
 STCoeffs_Monomial	src/sys/classes/st/interface/stsolve.c	/^PetscErrorCode STCoeffs_Monomial(ST st, PetscScalar *coeffs)$/;"	f
@@ -3789,7 +4154,7 @@ STMatGetLocalSize	src/sys/classes/st/interface/stfunc.c	/^PetscErrorCode STMatGe
 STMatGetSize	src/sys/classes/st/interface/stfunc.c	/^PetscErrorCode STMatGetSize(ST st,PetscInt *m,PetscInt *n)$/;"	f
 STMatMAXPY_Private	src/sys/classes/st/interface/stsolve.c	/^PetscErrorCode STMatMAXPY_Private(ST st,PetscScalar alpha,PetscScalar beta,PetscInt k,PetscScalar *coeffs,PetscBool initial,Mat *S)$/;"	f
 STMatMode	include/slepc/finclude/slepcstdef.h	33;"	d
-STMatMode	include/slepcst.h	/^               ST_MATMODE_SHELL } STMatMode;$/;"	t	typeref:enum:__anon38
+STMatMode	include/slepcst.h	/^               ST_MATMODE_SHELL } STMatMode;$/;"	t	typeref:enum:__anon48
 STMatMult	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STMatMult(ST st,PetscInt k,Vec x,Vec y)$/;"	f
 STMatMultTranspose	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STMatMultTranspose(ST st,PetscInt k,Vec x,Vec y)$/;"	f
 STMatSetHermitian	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STMatSetHermitian(ST st,Mat M)$/;"	f
@@ -3830,11 +4195,11 @@ STScaleShift	src/sys/classes/st/interface/stfunc.c	/^PetscErrorCode STScaleShift
 STSetBalanceMatrix	src/sys/classes/st/interface/stfunc.c	/^PetscErrorCode STSetBalanceMatrix(ST st,Vec D)$/;"	f
 STSetDefaultShift	src/sys/classes/st/interface/stfunc.c	/^PetscErrorCode STSetDefaultShift(ST st,PetscScalar defaultshift)$/;"	f
 STSetFromOptions	src/sys/classes/st/interface/stset.c	/^PetscErrorCode STSetFromOptions(ST st)$/;"	f
-STSetFromOptions_Cayley	src/sys/classes/st/impls/cayley/cayley.c	/^PetscErrorCode STSetFromOptions_Cayley(PetscOptions *PetscOptionsObject,ST st)$/;"	f
-STSetFromOptions_Precond	src/sys/classes/st/impls/precond/precond.c	/^PetscErrorCode STSetFromOptions_Precond(PetscOptions *PetscOptionsObject,ST st)$/;"	f
-STSetFromOptions_Shell	src/sys/classes/st/impls/shell/shell.c	/^PetscErrorCode STSetFromOptions_Shell(PetscOptions *PetscOptionsObject,ST st)$/;"	f
-STSetFromOptions_Shift	src/sys/classes/st/impls/shift/shift.c	/^PetscErrorCode STSetFromOptions_Shift(PetscOptions *PetscOptionsObject,ST st)$/;"	f
-STSetFromOptions_Sinvert	src/sys/classes/st/impls/sinvert/sinvert.c	/^PetscErrorCode STSetFromOptions_Sinvert(PetscOptions *PetscOptionsObject,ST st)$/;"	f
+STSetFromOptions_Cayley	src/sys/classes/st/impls/cayley/cayley.c	/^PetscErrorCode STSetFromOptions_Cayley(PetscOptionItems *PetscOptionsObject,ST st)$/;"	f
+STSetFromOptions_Precond	src/sys/classes/st/impls/precond/precond.c	/^PetscErrorCode STSetFromOptions_Precond(PetscOptionItems *PetscOptionsObject,ST st)$/;"	f
+STSetFromOptions_Shell	src/sys/classes/st/impls/shell/shell.c	/^PetscErrorCode STSetFromOptions_Shell(PetscOptionItems *PetscOptionsObject,ST st)$/;"	f
+STSetFromOptions_Shift	src/sys/classes/st/impls/shift/shift.c	/^PetscErrorCode STSetFromOptions_Shift(PetscOptionItems *PetscOptionsObject,ST st)$/;"	f
+STSetFromOptions_Sinvert	src/sys/classes/st/impls/sinvert/sinvert.c	/^PetscErrorCode STSetFromOptions_Sinvert(PetscOptionItems *PetscOptionsObject,ST st)$/;"	f
 STSetKSP	src/sys/classes/st/interface/stsles.c	/^PetscErrorCode STSetKSP(ST st,KSP ksp)$/;"	f
 STSetMatMode	src/sys/classes/st/interface/stset.c	/^PetscErrorCode STSetMatMode(ST st,STMatMode mode)$/;"	f
 STSetMatStructure	src/sys/classes/st/interface/stset.c	/^PetscErrorCode STSetMatStructure(ST st,MatStructure str)$/;"	f
@@ -3861,6 +4226,7 @@ STShellSetApply_Shell	src/sys/classes/st/impls/shell/shell.c	/^static PetscError
 STShellSetBackTransform	src/sys/classes/st/impls/shell/shell.c	/^PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))$/;"	f
 STShellSetBackTransform_Shell	src/sys/classes/st/impls/shell/shell.c	/^static PetscErrorCode STShellSetBackTransform_Shell(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))$/;"	f	file:
 STShellSetContext	src/sys/classes/st/impls/shell/shell.c	/^PetscErrorCode STShellSetContext(ST st,void *ctx)$/;"	f
+STStateType	include/slepc/private/stimpl.h	/^               ST_STATE_UPDATED } STStateType;$/;"	t	typeref:enum:__anon5
 STType	include/slepc/finclude/slepcstdef.h	32;"	d
 STType	include/slepcst.h	/^typedef const char* STType;$/;"	t
 STView	src/sys/classes/st/interface/stfunc.c	/^PetscErrorCode STView(ST st,PetscViewer viewer)$/;"	f
@@ -3869,12 +4235,12 @@ ST_Apply	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp,ST
 ST_Apply	src/sys/classes/st/interface/stfunc.c	/^PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;$/;"	v
 ST_ApplyTranspose	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyTranspose,ST_MatSetUp,ST_MatMult,ST_MatMultTranspose,ST_MatSolve,ST_MatSolveTranspose;$/;"	v
 ST_ApplyTranspose	src/sys/classes/st/interface/stfunc.c	/^PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;$/;"	v
-ST_CAYLEY	src/sys/classes/st/impls/cayley/cayley.c	/^} ST_CAYLEY;$/;"	t	typeref:struct:__anon109	file:
+ST_CAYLEY	src/sys/classes/st/impls/cayley/cayley.c	/^} ST_CAYLEY;$/;"	t	typeref:struct:__anon128	file:
 ST_CLASSID	include/slepcst.h	/^PETSC_EXTERN PetscClassId ST_CLASSID;$/;"	v
 ST_CLASSID	src/sys/classes/st/interface/stfunc.c	/^PetscClassId     ST_CLASSID = 0;$/;"	v
-ST_MATMODE_COPY	include/slepcst.h	/^typedef enum { ST_MATMODE_COPY,$/;"	e	enum:__anon38
-ST_MATMODE_INPLACE	include/slepcst.h	/^               ST_MATMODE_INPLACE,$/;"	e	enum:__anon38
-ST_MATMODE_SHELL	include/slepcst.h	/^               ST_MATMODE_SHELL } STMatMode;$/;"	e	enum:__anon38
+ST_MATMODE_COPY	include/slepcst.h	/^typedef enum { ST_MATMODE_COPY,$/;"	e	enum:__anon48
+ST_MATMODE_INPLACE	include/slepcst.h	/^               ST_MATMODE_INPLACE,$/;"	e	enum:__anon48
+ST_MATMODE_SHELL	include/slepcst.h	/^               ST_MATMODE_SHELL } STMatMode;$/;"	e	enum:__anon48
 ST_MatMult	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyTranspose,ST_MatSetUp,ST_MatMult,ST_MatMultTranspose,ST_MatSolve,ST_MatSolveTranspose;$/;"	v
 ST_MatMult	src/sys/classes/st/interface/stfunc.c	/^PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;$/;"	v
 ST_MatMultTranspose	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyTranspose,ST_MatSetUp,ST_MatMult,ST_MatMultTranspose,ST_MatSolve,ST_MatSolveTranspose;$/;"	v
@@ -3885,9 +4251,12 @@ ST_MatSolve	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp
 ST_MatSolve	src/sys/classes/st/interface/stfunc.c	/^PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;$/;"	v
 ST_MatSolveTranspose	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyTranspose,ST_MatSetUp,ST_MatMult,ST_MatMultTranspose,ST_MatSolve,ST_MatSolveTranspose;$/;"	v
 ST_MatSolveTranspose	src/sys/classes/st/interface/stfunc.c	/^PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;$/;"	v
-ST_PRECOND	src/sys/classes/st/impls/precond/precond.c	/^} ST_PRECOND;$/;"	t	typeref:struct:__anon110	file:
-ST_SHELL	src/sys/classes/st/impls/shell/shell.c	/^} ST_SHELL;$/;"	t	typeref:struct:__anon112	file:
-ST_SHELLMAT	src/sys/classes/st/interface/stshellmat.c	/^} ST_SHELLMAT;$/;"	t	typeref:struct:__anon113	file:
+ST_PRECOND	src/sys/classes/st/impls/precond/precond.c	/^} ST_PRECOND;$/;"	t	typeref:struct:__anon129	file:
+ST_SHELL	src/sys/classes/st/impls/shell/shell.c	/^} ST_SHELL;$/;"	t	typeref:struct:__anon131	file:
+ST_SHELLMAT	src/sys/classes/st/interface/stshellmat.c	/^} ST_SHELLMAT;$/;"	t	typeref:struct:__anon132	file:
+ST_STATE_INITIAL	include/slepc/private/stimpl.h	/^typedef enum { ST_STATE_INITIAL,$/;"	e	enum:__anon5
+ST_STATE_SETUP	include/slepc/private/stimpl.h	/^               ST_STATE_SETUP,$/;"	e	enum:__anon5
+ST_STATE_UPDATED	include/slepc/private/stimpl.h	/^               ST_STATE_UPDATED } STStateType;$/;"	e	enum:__anon5
 ST_SetUp	include/slepc/private/stimpl.h	/^PETSC_EXTERN PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyTranspose,ST_MatSetUp,ST_MatMult,ST_MatMultTranspose,ST_MatSolve,ST_MatSolveTranspose;$/;"	v
 ST_SetUp	src/sys/classes/st/interface/stfunc.c	/^PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;$/;"	v
 SVD	include/slepc/finclude/slepcsvddef.h	31;"	d
@@ -3895,22 +4264,27 @@ SVD	include/slepcsvd.h	/^typedef struct _p_SVD* SVD;$/;"	t	typeref:struct:_p_SVD
 SVD	src/svd/examples/tests/makefile	/^SVD = lanczos lapack trlanczos$/;"	m
 SVDAllocateSolution	src/svd/interface/svdsetup.c	/^PetscErrorCode SVDAllocateSolution(SVD svd,PetscInt extra)$/;"	f
 SVDAppendOptionsPrefix	src/svd/interface/svdopts.c	/^PetscErrorCode SVDAppendOptionsPrefix(SVD svd,const char *prefix)$/;"	f
-SVDCROSS	include/slepc/finclude/slepcsvddef.h	39;"	d
+SVDCROSS	include/slepc/finclude/slepcsvddef.h	41;"	d
 SVDCROSS	include/slepcsvd.h	50;"	d
-SVDCYCLIC	include/slepc/finclude/slepcsvddef.h	40;"	d
+SVDCYCLIC	include/slepc/finclude/slepcsvddef.h	42;"	d
 SVDCYCLIC	include/slepcsvd.h	51;"	d
-SVDCheckSolved	include/slepc/private/svdimpl.h	103;"	d
-SVDCheckSolved	include/slepc/private/svdimpl.h	107;"	d
+SVDCheckSolved	include/slepc/private/svdimpl.h	110;"	d
+SVDCheckSolved	include/slepc/private/svdimpl.h	114;"	d
 SVDComputeError	src/svd/interface/svdsolve.c	/^PetscErrorCode SVDComputeError(SVD svd,PetscInt i,SVDErrorType type,PetscReal *error)$/;"	f
 SVDComputeRelativeError	include/slepcsvd.h	/^PETSC_DEPRECATED("Use SVDComputeError()") PETSC_STATIC_INLINE PetscErrorCode SVDComputeRelativeError(SVD svd,PetscInt i,PetscReal *r) {return SVDComputeError(svd,i,SVD_ERROR_RELATIVE,r);}$/;"	f
 SVDComputeResidualNorms	include/slepcsvd.h	/^PETSC_DEPRECATED("Use SVDComputeError() with SVD_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode SVDComputeResidualNorms(SVD svd,PetscInt i,PetscReal *r1,PetscReal *r2) {return SVDComputeError(svd,i,SVD_ERROR_ABSOLUTE,r1);}$/;"	f
 SVDComputeResidualNorms_Private	src/svd/interface/svdsolve.c	/^static PetscErrorCode SVDComputeResidualNorms_Private(SVD svd,PetscInt i,PetscReal *norm1,PetscReal *norm2)$/;"	f	file:
 SVDComputeVectors	src/svd/interface/svdsolve.c	/^PetscErrorCode SVDComputeVectors(SVD svd)$/;"	f
+SVDConv	include/slepc/finclude/slepcsvddef.h	38;"	d
+SVDConv	include/slepcsvd.h	/^               SVD_CONV_USER } SVDConv;$/;"	t	typeref:enum:__anon51
+SVDConvMonitorSetFromOptions	src/svd/interface/svdopts.c	/^PetscErrorCode SVDConvMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor))$/;"	f
+SVDConvergedAbsolute	src/svd/interface/svddefault.c	/^PetscErrorCode SVDConvergedAbsolute(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 SVDConvergedReason	include/slepc/finclude/slepcsvddef.h	35;"	d
-SVDConvergedReason	include/slepcsvd.h	/^              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;$/;"	t	typeref:enum:__anon41
+SVDConvergedReason	include/slepcsvd.h	/^              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;$/;"	t	typeref:enum:__anon53
 SVDConvergedReasons	include/slepcsvd.h	/^PETSC_EXTERN const char *const*SVDConvergedReasons;$/;"	v
 SVDConvergedReasons	src/svd/interface/dlregissvd.c	/^const char *const*SVDConvergedReasons = SVDConvergedReasons_Shifted + 4;$/;"	v
-SVDConvergedReasons_Shifted	src/svd/interface/dlregissvd.c	/^const char *const SVDConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","SVDConvergedReason","SVD_",0};$/;"	v
+SVDConvergedReasons_Shifted	src/svd/interface/dlregissvd.c	/^const char *const SVDConvergedReasons_Shifted[] = {"","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","SVDConvergedReason","SVD_",0};$/;"	v
+SVDConvergedRelative	src/svd/interface/svddefault.c	/^PetscErrorCode SVDConvergedRelative(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)$/;"	f
 SVDCreate	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDCreate(MPI_Comm comm,SVD *outsvd)$/;"	f
 SVDCreate_Cross	src/svd/impls/cross/cross.c	/^PETSC_EXTERN PetscErrorCode SVDCreate_Cross(SVD svd)$/;"	f
 SVDCreate_Cyclic	src/svd/impls/cyclic/cyclic.c	/^PETSC_EXTERN PetscErrorCode SVDCreate_Cyclic(SVD svd)$/;"	f
@@ -3936,7 +4310,7 @@ SVDDestroy_Lanczos	src/svd/impls/lanczos/gklanczos.c	/^PetscErrorCode SVDDestroy
 SVDDestroy_TRLanczos	src/svd/impls/trlanczos/trlanczos.c	/^PetscErrorCode SVDDestroy_TRLanczos(SVD svd)$/;"	f
 SVDEPS	src/svd/examples/tests/makefile	/^SVDEPS = cross cyclic$/;"	m
 SVDErrorType	include/slepc/finclude/slepcsvddef.h	36;"	d
-SVDErrorType	include/slepcsvd.h	/^               SVD_ERROR_RELATIVE } SVDErrorType;$/;"	t	typeref:enum:__anon40
+SVDErrorType	include/slepcsvd.h	/^               SVD_ERROR_RELATIVE } SVDErrorType;$/;"	t	typeref:enum:__anon50
 SVDErrorTypes	include/slepcsvd.h	/^PETSC_EXTERN const char *SVDErrorTypes[];$/;"	v
 SVDErrorTypes	src/svd/interface/dlregissvd.c	/^const char *SVDErrorTypes[] = {"ABSOLUTE","RELATIVE","SVDErrorType","SVD_ERROR_",0};$/;"	v
 SVDErrorView	src/svd/interface/svdview.c	/^PetscErrorCode SVDErrorView(SVD svd,SVDErrorType etype,PetscViewer viewer)$/;"	f
@@ -3948,6 +4322,7 @@ SVDFinalizePackage	src/svd/interface/dlregissvd.c	/^PetscErrorCode SVDFinalizePa
 SVDGetBV	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDGetBV(SVD svd,BV *V,BV *U)$/;"	f
 SVDGetConverged	src/svd/interface/svdsolve.c	/^PetscErrorCode SVDGetConverged(SVD svd,PetscInt *nconv)$/;"	f
 SVDGetConvergedReason	src/svd/interface/svdsolve.c	/^PetscErrorCode SVDGetConvergedReason(SVD svd,SVDConvergedReason *reason)$/;"	f
+SVDGetConvergenceTest	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetConvergenceTest(SVD svd,SVDConv *conv)$/;"	f
 SVDGetDS	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDGetDS(SVD svd,DS *ds)$/;"	f
 SVDGetDimensions	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetDimensions(SVD svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)$/;"	f
 SVDGetImplicitTranspose	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetImplicitTranspose(SVD svd,PetscBool *impl)$/;"	f
@@ -3956,14 +4331,15 @@ SVDGetMonitorContext	src/svd/interface/svdmon.c	/^PetscErrorCode SVDGetMonitorCo
 SVDGetOperator	src/svd/interface/svdsetup.c	/^PetscErrorCode SVDGetOperator(SVD svd,Mat *A)$/;"	f
 SVDGetOptionsPrefix	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetOptionsPrefix(SVD svd,const char *prefix[])$/;"	f
 SVDGetSingularTriplet	src/svd/interface/svdsolve.c	/^PetscErrorCode SVDGetSingularTriplet(SVD svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)$/;"	f
+SVDGetStoppingTest	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetStoppingTest(SVD svd,SVDStop *stop)$/;"	f
 SVDGetTolerances	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetTolerances(SVD svd,PetscReal *tol,PetscInt *maxits)$/;"	f
 SVDGetTrackAll	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetTrackAll(SVD svd,PetscBool *trackall)$/;"	f
 SVDGetType	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDGetType(SVD svd,SVDType *type)$/;"	f
 SVDGetWhichSingularTriplets	src/svd/interface/svdopts.c	/^PetscErrorCode SVDGetWhichSingularTriplets(SVD svd,SVDWhich *which)$/;"	f
 SVDInitializePackage	src/svd/interface/dlregissvd.c	/^PetscErrorCode SVDInitializePackage(void)$/;"	f
-SVDLANCZOS	include/slepc/finclude/slepcsvddef.h	42;"	d
+SVDLANCZOS	include/slepc/finclude/slepcsvddef.h	44;"	d
 SVDLANCZOS	include/slepcsvd.h	53;"	d
-SVDLAPACK	include/slepc/finclude/slepcsvddef.h	41;"	d
+SVDLAPACK	include/slepc/finclude/slepcsvddef.h	43;"	d
 SVDLAPACK	include/slepcsvd.h	52;"	d
 SVDLanczosGetOneSide	src/svd/impls/lanczos/gklanczos.c	/^PetscErrorCode SVDLanczosGetOneSide(SVD svd,PetscBool *oneside)$/;"	f
 SVDLanczosGetOneSide_Lanczos	src/svd/impls/lanczos/gklanczos.c	/^static PetscErrorCode SVDLanczosGetOneSide_Lanczos(SVD svd,PetscBool *oneside)$/;"	f	file:
@@ -3976,15 +4352,15 @@ SVDMatGetLocalSize	include/slepc/private/svdimpl.h	/^PETSC_STATIC_INLINE PetscEr
 SVDMatGetSize	include/slepc/private/svdimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode SVDMatGetSize(SVD svd,PetscInt *m,PetscInt *n)$/;"	f
 SVDMatMult	include/slepc/private/svdimpl.h	/^PETSC_STATIC_INLINE PetscErrorCode SVDMatMult(SVD svd,PetscBool trans,Vec x,Vec y)$/;"	f
 SVDMonitor	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitor(SVD svd,PetscInt it,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest)$/;"	f
-SVDMonitorAll	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+SVDMonitorAll	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
 SVDMonitorCancel	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorCancel(SVD svd)$/;"	f
-SVDMonitorConverged	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-SVDMonitorFirst	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-SVDMonitorLG	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorLG(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
-SVDMonitorLGAll	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)$/;"	f
+SVDMonitorConverged	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)$/;"	f
+SVDMonitorFirst	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)$/;"	f
+SVDMonitorLG	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorLG(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+SVDMonitorLGAll	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f
+SVDMonitorLGCreate	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)$/;"	f
 SVDMonitorSet	src/svd/interface/svdmon.c	/^PetscErrorCode SVDMonitorSet(SVD svd,PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))$/;"	f
-SVDMonitor_Cross	src/svd/impls/cross/cross.c	/^static PetscErrorCode SVDMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f	file:
-SVDMonitor_Cyclic	src/svd/impls/cyclic/cyclic.c	/^static PetscErrorCode SVDMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)$/;"	f	file:
+SVDMonitorSetFromOptions	src/svd/interface/svdopts.c	/^PetscErrorCode SVDMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)$/;"	f
 SVDOneSideLanczos	src/svd/impls/lanczos/gklanczos.c	/^static PetscErrorCode SVDOneSideLanczos(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,Vec u,Vec u_1,PetscInt k,PetscInt n,PetscScalar* work)$/;"	f	file:
 SVDOneSideTRLanczosCGS	src/svd/impls/trlanczos/trlanczos.c	/^static PetscErrorCode SVDOneSideTRLanczosCGS(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)$/;"	f	file:
 SVDOneSideTRLanczosMGS	src/svd/impls/trlanczos/trlanczos.c	/^static PetscErrorCode SVDOneSideTRLanczosMGS(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)$/;"	f	file:
@@ -4002,19 +4378,23 @@ SVDReset	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDReset(SVD svd)$/;"	f
 SVDReset_Cross	src/svd/impls/cross/cross.c	/^PetscErrorCode SVDReset_Cross(SVD svd)$/;"	f
 SVDReset_Cyclic	src/svd/impls/cyclic/cyclic.c	/^PetscErrorCode SVDReset_Cyclic(SVD svd)$/;"	f
 SVDSetBV	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDSetBV(SVD svd,BV V,BV U)$/;"	f
+SVDSetConvergenceTest	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetConvergenceTest(SVD svd,SVDConv conv)$/;"	f
+SVDSetConvergenceTestFunction	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetConvergenceTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscReal,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
 SVDSetDS	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDSetDS(SVD svd,DS ds)$/;"	f
 SVDSetDimensions	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetDimensions(SVD svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)$/;"	f
 SVDSetDimensions_Default	src/svd/interface/svdsetup.c	/^PetscErrorCode SVDSetDimensions_Default(SVD svd)$/;"	f
 SVDSetFromOptions	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetFromOptions(SVD svd)$/;"	f
-SVDSetFromOptions_Cross	src/svd/impls/cross/cross.c	/^PetscErrorCode SVDSetFromOptions_Cross(PetscOptions *PetscOptionsObject,SVD svd)$/;"	f
-SVDSetFromOptions_Cyclic	src/svd/impls/cyclic/cyclic.c	/^PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptions *PetscOptionsObject,SVD svd)$/;"	f
-SVDSetFromOptions_Lanczos	src/svd/impls/lanczos/gklanczos.c	/^PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,SVD svd)$/;"	f
-SVDSetFromOptions_TRLanczos	src/svd/impls/trlanczos/trlanczos.c	/^PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptions *PetscOptionsObject,SVD svd)$/;"	f
+SVDSetFromOptions_Cross	src/svd/impls/cross/cross.c	/^PetscErrorCode SVDSetFromOptions_Cross(PetscOptionItems *PetscOptionsObject,SVD svd)$/;"	f
+SVDSetFromOptions_Cyclic	src/svd/impls/cyclic/cyclic.c	/^PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptionItems *PetscOptionsObject,SVD svd)$/;"	f
+SVDSetFromOptions_Lanczos	src/svd/impls/lanczos/gklanczos.c	/^PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,SVD svd)$/;"	f
+SVDSetFromOptions_TRLanczos	src/svd/impls/trlanczos/trlanczos.c	/^PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptionItems *PetscOptionsObject,SVD svd)$/;"	f
 SVDSetImplicitTranspose	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetImplicitTranspose(SVD svd,PetscBool impl)$/;"	f
 SVDSetInitialSpace	src/svd/interface/svdsetup.c	/^PetscErrorCode SVDSetInitialSpace(SVD svd,PetscInt n,Vec *is)$/;"	f
 SVDSetInitialSpaceLeft	src/svd/interface/svdsetup.c	/^PetscErrorCode SVDSetInitialSpaceLeft(SVD svd,PetscInt n,Vec *is)$/;"	f
 SVDSetOperator	src/svd/interface/svdsetup.c	/^PetscErrorCode SVDSetOperator(SVD svd,Mat mat)$/;"	f
 SVDSetOptionsPrefix	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetOptionsPrefix(SVD svd,const char *prefix)$/;"	f
+SVDSetStoppingTest	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetStoppingTest(SVD svd,SVDStop stop)$/;"	f
+SVDSetStoppingTestFunction	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetStoppingTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))$/;"	f
 SVDSetTolerances	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetTolerances(SVD svd,PetscReal tol,PetscInt maxits)$/;"	f
 SVDSetTrackAll	src/svd/interface/svdopts.c	/^PetscErrorCode SVDSetTrackAll(SVD svd,PetscBool trackall)$/;"	f
 SVDSetType	src/svd/interface/svdbasic.c	/^PetscErrorCode SVDSetType(SVD svd,SVDType type)$/;"	f
@@ -4031,8 +4411,11 @@ SVDSolve_Cyclic	src/svd/impls/cyclic/cyclic.c	/^PetscErrorCode SVDSolve_Cyclic(S
 SVDSolve_LAPACK	src/svd/impls/lapack/svdlapack.c	/^PetscErrorCode SVDSolve_LAPACK(SVD svd)$/;"	f
 SVDSolve_Lanczos	src/svd/impls/lanczos/gklanczos.c	/^PetscErrorCode SVDSolve_Lanczos(SVD svd)$/;"	f
 SVDSolve_TRLanczos	src/svd/impls/trlanczos/trlanczos.c	/^PetscErrorCode SVDSolve_TRLanczos(SVD svd)$/;"	f
-SVDStateType	include/slepc/private/svdimpl.h	/^               SVD_STATE_VECTORS } SVDStateType;$/;"	t	typeref:enum:__anon4
-SVDTRLANCZOS	include/slepc/finclude/slepcsvddef.h	43;"	d
+SVDStateType	include/slepc/private/svdimpl.h	/^               SVD_STATE_VECTORS } SVDStateType;$/;"	t	typeref:enum:__anon6
+SVDStop	include/slepc/finclude/slepcsvddef.h	39;"	d
+SVDStop	include/slepcsvd.h	/^               SVD_STOP_USER } SVDStop;$/;"	t	typeref:enum:__anon52
+SVDStoppingBasic	src/svd/interface/svddefault.c	/^PetscErrorCode SVDStoppingBasic(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)$/;"	f
+SVDTRLANCZOS	include/slepc/finclude/slepcsvddef.h	45;"	d
 SVDTRLANCZOS	include/slepcsvd.h	54;"	d
 SVDTRLanczosGetOneSide	src/svd/impls/trlanczos/trlanczos.c	/^PetscErrorCode SVDTRLanczosGetOneSide(SVD svd,PetscBool *oneside)$/;"	f
 SVDTRLanczosGetOneSide_TRLanczos	src/svd/impls/trlanczos/trlanczos.c	/^static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(SVD svd,PetscBool *oneside)$/;"	f	file:
@@ -4055,40 +4438,48 @@ SVDView_Cyclic	src/svd/impls/cyclic/cyclic.c	/^PetscErrorCode SVDView_Cyclic(SVD
 SVDView_Lanczos	src/svd/impls/lanczos/gklanczos.c	/^PetscErrorCode SVDView_Lanczos(SVD svd,PetscViewer viewer)$/;"	f
 SVDView_TRLanczos	src/svd/impls/trlanczos/trlanczos.c	/^PetscErrorCode SVDView_TRLanczos(SVD svd,PetscViewer viewer)$/;"	f
 SVDWhich	include/slepc/finclude/slepcsvddef.h	37;"	d
-SVDWhich	include/slepcsvd.h	/^               SVD_SMALLEST } SVDWhich;$/;"	t	typeref:enum:__anon39
+SVDWhich	include/slepcsvd.h	/^               SVD_SMALLEST } SVDWhich;$/;"	t	typeref:enum:__anon49
 SVD_CLASSID	include/slepcsvd.h	/^PETSC_EXTERN PetscClassId SVD_CLASSID;$/;"	v
 SVD_CLASSID	src/svd/interface/svdbasic.c	/^PetscClassId      SVD_CLASSID = 0;$/;"	v
-SVD_CONVERGED_ITERATING	include/slepcsvd.h	/^              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;$/;"	e	enum:__anon41
-SVD_CONVERGED_TOL	include/slepcsvd.h	/^              SVD_CONVERGED_TOL                =  2,$/;"	e	enum:__anon41
-SVD_CROSS	src/svd/impls/cross/cross.c	/^} SVD_CROSS;$/;"	t	typeref:struct:__anon91	file:
-SVD_CYCLIC	src/svd/impls/cyclic/cyclic.c	/^} SVD_CYCLIC;$/;"	t	typeref:struct:__anon92	file:
-SVD_DIVERGED_BREAKDOWN	include/slepcsvd.h	/^              SVD_DIVERGED_BREAKDOWN           = -4,$/;"	e	enum:__anon41
-SVD_DIVERGED_ITS	include/slepcsvd.h	/^              SVD_DIVERGED_ITS                 = -3,$/;"	e	enum:__anon41
-SVD_ERROR_ABSOLUTE	include/slepcsvd.h	/^typedef enum { SVD_ERROR_ABSOLUTE,$/;"	e	enum:__anon40
-SVD_ERROR_RELATIVE	include/slepcsvd.h	/^               SVD_ERROR_RELATIVE } SVDErrorType;$/;"	e	enum:__anon40
+SVD_CONVERGED_ITERATING	include/slepcsvd.h	/^              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;$/;"	e	enum:__anon53
+SVD_CONVERGED_TOL	include/slepcsvd.h	/^              SVD_CONVERGED_TOL                =  1,$/;"	e	enum:__anon53
+SVD_CONVERGED_USER	include/slepcsvd.h	/^              SVD_CONVERGED_USER               =  2,$/;"	e	enum:__anon53
+SVD_CONV_ABS	include/slepcsvd.h	/^typedef enum { SVD_CONV_ABS,$/;"	e	enum:__anon51
+SVD_CONV_REL	include/slepcsvd.h	/^               SVD_CONV_REL,$/;"	e	enum:__anon51
+SVD_CONV_USER	include/slepcsvd.h	/^               SVD_CONV_USER } SVDConv;$/;"	e	enum:__anon51
+SVD_CROSS	src/svd/impls/cross/cross.c	/^} SVD_CROSS;$/;"	t	typeref:struct:__anon110	file:
+SVD_CYCLIC	src/svd/impls/cyclic/cyclic.c	/^} SVD_CYCLIC;$/;"	t	typeref:struct:__anon111	file:
+SVD_DIVERGED_BREAKDOWN	include/slepcsvd.h	/^              SVD_DIVERGED_BREAKDOWN           = -2,$/;"	e	enum:__anon53
+SVD_DIVERGED_ITS	include/slepcsvd.h	/^              SVD_DIVERGED_ITS                 = -1,$/;"	e	enum:__anon53
+SVD_ERROR_ABSOLUTE	include/slepcsvd.h	/^typedef enum { SVD_ERROR_ABSOLUTE,$/;"	e	enum:__anon50
+SVD_ERROR_RELATIVE	include/slepcsvd.h	/^               SVD_ERROR_RELATIVE } SVDErrorType;$/;"	e	enum:__anon50
 SVD_H0	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode SVD_H0(EPS eps,PetscScalar *S,PetscInt *K)$/;"	f	file:
 SVD_H0	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode SVD_H0(NEP nep,PetscScalar *S,PetscInt *K)$/;"	f	file:
-SVD_LANCZOS	src/svd/impls/lanczos/gklanczos.c	/^} SVD_LANCZOS;$/;"	t	typeref:struct:__anon93	file:
-SVD_LARGEST	include/slepcsvd.h	/^typedef enum { SVD_LARGEST,$/;"	e	enum:__anon39
+SVD_LANCZOS	src/svd/impls/lanczos/gklanczos.c	/^} SVD_LANCZOS;$/;"	t	typeref:struct:__anon112	file:
+SVD_LARGEST	include/slepcsvd.h	/^typedef enum { SVD_LARGEST,$/;"	e	enum:__anon49
 SVD_S	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,PetscInt *K)$/;"	f	file:
-SVD_SMALLEST	include/slepcsvd.h	/^               SVD_SMALLEST } SVDWhich;$/;"	e	enum:__anon39
-SVD_STATE_INITIAL	include/slepc/private/svdimpl.h	/^typedef enum { SVD_STATE_INITIAL,$/;"	e	enum:__anon4
-SVD_STATE_SETUP	include/slepc/private/svdimpl.h	/^               SVD_STATE_SETUP,$/;"	e	enum:__anon4
-SVD_STATE_SOLVED	include/slepc/private/svdimpl.h	/^               SVD_STATE_SOLVED,$/;"	e	enum:__anon4
-SVD_STATE_VECTORS	include/slepc/private/svdimpl.h	/^               SVD_STATE_VECTORS } SVDStateType;$/;"	e	enum:__anon4
+SVD_SMALLEST	include/slepcsvd.h	/^               SVD_SMALLEST } SVDWhich;$/;"	e	enum:__anon49
+SVD_STATE_INITIAL	include/slepc/private/svdimpl.h	/^typedef enum { SVD_STATE_INITIAL,$/;"	e	enum:__anon6
+SVD_STATE_SETUP	include/slepc/private/svdimpl.h	/^               SVD_STATE_SETUP,$/;"	e	enum:__anon6
+SVD_STATE_SOLVED	include/slepc/private/svdimpl.h	/^               SVD_STATE_SOLVED,$/;"	e	enum:__anon6
+SVD_STATE_VECTORS	include/slepc/private/svdimpl.h	/^               SVD_STATE_VECTORS } SVDStateType;$/;"	e	enum:__anon6
+SVD_STOP_BASIC	include/slepcsvd.h	/^typedef enum { SVD_STOP_BASIC,$/;"	e	enum:__anon52
+SVD_STOP_USER	include/slepcsvd.h	/^               SVD_STOP_USER } SVDStop;$/;"	e	enum:__anon52
 SVD_SetUp	include/slepc/private/svdimpl.h	/^PETSC_EXTERN PetscLogEvent SVD_SetUp,SVD_Solve;$/;"	v
 SVD_SetUp	src/svd/interface/svdbasic.c	/^PetscLogEvent     SVD_SetUp = 0,SVD_Solve = 0;$/;"	v
 SVD_Solve	include/slepc/private/svdimpl.h	/^PETSC_EXTERN PetscLogEvent SVD_SetUp,SVD_Solve;$/;"	v
 SVD_Solve	src/svd/interface/svdbasic.c	/^PetscLogEvent     SVD_SetUp = 0,SVD_Solve = 0;$/;"	v
-SVD_TRLANCZOS	src/svd/impls/trlanczos/trlanczos.c	/^} SVD_TRLANCZOS;$/;"	t	typeref:struct:__anon94	file:
-SWAP	src/eps/impls/krylov/krylovschur/ks-slice.c	550;"	d	file:
+SVD_TRLANCZOS	src/svd/impls/trlanczos/trlanczos.c	/^} SVD_TRLANCZOS;$/;"	t	typeref:struct:__anon113	file:
+SWAP	src/eps/impls/krylov/krylovschur/ks-slice.c	614;"	d	file:
 SWAP	src/sys/classes/fn/impls/exp/fnexp.c	46;"	d	file:
-SampleShellST	src/eps/examples/tutorials/ex10.c	/^} SampleShellST;$/;"	t	typeref:struct:__anon42	file:
+SampleShellST	src/eps/examples/tutorials/ex10.c	/^} SampleShellST;$/;"	t	typeref:struct:__anon54	file:
 ScanJ	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode ScanJ(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *gl,PetscReal *gr,PetscReal *sigma)$/;"	f	file:
+SetInitialGuess	src/eps/examples/tutorials/ex31.c	/^PetscErrorCode SetInitialGuess(Vec X,Userctx *user)$/;"	f
 SetPathParameter	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode SetPathParameter(EPS eps)$/;"	f	file:
 SetPathParameter	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode SetPathParameter(NEP nep)$/;"	f	file:
 SetSolverComm	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode SetSolverComm(EPS eps)$/;"	f	file:
 SetSolverComm	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode SetSolverComm(NEP nep)$/;"	f	file:
+ShellMatCtx	src/nep/impls/nleigs/nleigs.c	/^} ShellMatCtx;$/;"	t	typeref:struct:__anon93	file:
 ShowHelp	config/package.py	/^  def ShowHelp(self):$/;"	m	class:Package
 ShowHelp	config/packages/slepc.py	/^  def ShowHelp(self):$/;"	m	class:SLEPc
 ShowInfo	config/package.py	/^  def ShowInfo(self):$/;"	m	class:Package
@@ -4113,7 +4504,9 @@ SlepcCompareSmallestReal	src/sys/slepcsc.c	/^PetscErrorCode SlepcCompareSmallest
 SlepcCompareTargetImaginary	src/sys/slepcsc.c	/^PetscErrorCode SlepcCompareTargetImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)$/;"	f
 SlepcCompareTargetMagnitude	src/sys/slepcsc.c	/^PetscErrorCode SlepcCompareTargetMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)$/;"	f
 SlepcCompareTargetReal	src/sys/slepcsc.c	/^PetscErrorCode SlepcCompareTargetReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)$/;"	f
-SlepcConvMonitor	include/slepc/private/slepcimpl.h	/^typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;$/;"	t	typeref:struct:_n_SlepcConvMonitor
+SlepcConvMonitor	include/slepc/finclude/slepcsysdef.h	27;"	d
+SlepcConvMonitor	include/slepcsys.h	/^typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;$/;"	t	typeref:struct:_n_SlepcConvMonitor
+SlepcConvMonitorCreate	src/sys/slepcutil.c	/^PetscErrorCode SlepcConvMonitorCreate(PetscViewer viewer,PetscViewerFormat format,SlepcConvMonitor *ctx)$/;"	f
 SlepcConvMonitorDestroy	src/sys/slepcutil.c	/^PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx)$/;"	f
 SlepcFinalize	src/sys/slepcinit.c	/^PetscErrorCode SlepcFinalize(void)$/;"	f
 SlepcGetVersion	src/sys/slepcinit.c	/^PetscErrorCode SlepcGetVersion(char version[],size_t len)$/;"	f
@@ -4130,6 +4523,7 @@ SlepcLoadDynamicLibrary	src/sys/slepcinit.c	/^static PetscErrorCode SlepcLoadDyn
 SlepcMap_ST	src/sys/slepcsc.c	/^PetscErrorCode SlepcMap_ST(PetscObject obj,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)$/;"	f
 SlepcMatConvertSeqDense	src/sys/slepcutil.c	/^PetscErrorCode SlepcMatConvertSeqDense(Mat mat,Mat *newmat)$/;"	f
 SlepcMatDenseMult	src/sys/classes/ds/interface/dspriv.c	/^static PetscErrorCode SlepcMatDenseMult(PetscScalar *C,PetscInt _ldC,PetscScalar b,PetscScalar a,const PetscScalar *A,PetscInt _ldA,PetscInt rA,PetscInt cA,PetscBool At,const PetscScalar *B,PetscInt _ldB,PetscInt rB,PetscInt cB,PetscBool Bt)$/;"	f	file:
+SlepcMatDenseSqrt	src/sys/classes/fn/impls/fnutil.c	/^PetscErrorCode SlepcMatDenseSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld)$/;"	f
 SlepcMatTile	src/sys/slepcutil.c	/^PetscErrorCode SlepcMatTile(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar c,Mat C,PetscScalar d,Mat D,Mat *G)$/;"	f
 SlepcMatTile_MPIAIJ	src/sys/slepcutil.c	/^static PetscErrorCode SlepcMatTile_MPIAIJ(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar c,Mat C,PetscScalar d,Mat D,Mat G)$/;"	f	file:
 SlepcMatTile_SeqAIJ	src/sys/slepcutil.c	/^static PetscErrorCode SlepcMatTile_SeqAIJ(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar c,Mat C,PetscScalar d,Mat D,Mat G)$/;"	f	file:
@@ -4138,6 +4532,7 @@ SlepcPrintVersion	src/sys/slepcinit.c	/^static PetscErrorCode SlepcPrintVersion(
 SlepcSC	include/slepcsc.h	/^typedef struct _n_SlepcSC* SlepcSC;$/;"	t	typeref:struct:_n_SlepcSC
 SlepcSCCompare	src/sys/slepcsc.c	/^PetscErrorCode SlepcSCCompare(SlepcSC sc,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res)$/;"	f
 SlepcSNPrintfScalar	src/sys/slepcutil.c	/^PetscErrorCode SlepcSNPrintfScalar(char *str,size_t len,PetscScalar val,PetscBool exp)$/;"	f
+SlepcSchurParlettSqrt	src/sys/classes/fn/impls/fnutil.c	/^PetscErrorCode SlepcSchurParlettSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld,PetscBool firstonly)$/;"	f
 SlepcSortEigenvalues	src/sys/slepcsc.c	/^PetscErrorCode SlepcSortEigenvalues(SlepcSC sc,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,PetscInt *perm)$/;"	f
 SlepcSumNorm2_Local	src/sys/vec/veccomp.c	/^static void SlepcSumNorm2_Local(void *in,void *out,PetscMPIInt *cnt,MPI_Datatype *datatype)$/;"	f	file:
 SlepcValidVecComp	include/slepc/private/vecimplslepc.h	30;"	d
@@ -4153,23 +4548,26 @@ Sowing	config/packages/sowing.py	/^class Sowing(package.Package):$/;"	c
 StdoutLogger	config/cmakeboot.py	/^class StdoutLogger(object):$/;"	c
 StdoutLogger	config/cmakegen.py	/^class StdoutLogger(object):$/;"	c
 SumNorm2	src/sys/vec/veccomp.c	/^PETSC_STATIC_INLINE void SumNorm2(PetscReal *ssq0,PetscReal *scale0,PetscReal *ssq1,PetscReal *scale1)$/;"	f
-T	include/slepc/private/stimpl.h	/^  Mat              *T;               \/* Matrices resulting from transformation *\/$/;"	m	struct:_p_ST
-T	src/eps/examples/tutorials/ex9.c	/^  Mat         T;$/;"	m	struct:__anon44	file:
+T	include/slepc/private/stimpl.h	/^  Mat              *T;               \/* matrices resulting from transformation *\/$/;"	m	struct:_p_ST
+T	src/eps/examples/tutorials/ex30.c	/^  Mat         T;$/;"	m	struct:__anon56	file:
+T	src/eps/examples/tutorials/ex9.c	/^  Mat         T;$/;"	m	struct:__anon58	file:
+T	src/pep/impls/jd/pjdp.h	/^  PetscScalar *T;            \/* matrix of the invariant pair *\/$/;"	m	struct:__anon99
+TA	src/eps/examples/tutorials/ex31.c	/^const PetscScalar TA[3] = {0.2,0.2,0.2};     \/* Voltage regulator time constant *\/$/;"	v
+TE	src/eps/examples/tutorials/ex31.c	/^const PetscScalar TE[3] = {0.314,0.314,0.314}; \/* Exciter time constant *\/$/;"	v
 TESTCODE	src/eps/examples/tests/makefile	/^TESTCODE = \\$/;"	m
 TESTCODE	src/pep/examples/tests/makefile	/^TESTCODE = \\$/;"	m
 TESTCODE	src/sys/classes/bv/examples/tests/makefile	/^TESTCODE = \\$/;"	m
 TESTCODE	src/sys/classes/st/examples/tests/makefile	/^TESTCODE = \\$/;"	m
 TESTEXAMPLES_BLOPEX	src/eps/examples/tests/makefile	/^TESTEXAMPLES_BLOPEX      = test5.PETSc runtest5_blopex test5.rm$/;"	m
 TESTEXAMPLES_C	src/eps/examples/tests/makefile	/^TESTEXAMPLES_C           = test1.PETSc runtest1_1 test1.rm \\$/;"	m
-TESTEXAMPLES_C	src/eps/examples/tutorials/makefile	/^TESTEXAMPLES_C                 = ex2.PETSc runex2_1 ex2.rm \\$/;"	m
-TESTEXAMPLES_C	src/mfn/examples/tests/makefile	/^TESTEXAMPLES_C           =$/;"	m
-TESTEXAMPLES_C	src/mfn/examples/tutorials/makefile	/^TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm$/;"	m
+TESTEXAMPLES_C	src/eps/examples/tutorials/makefile	/^TESTEXAMPLES_C                 = ex2.PETSc runex2_1 runex2_ciss_1 runex2_ciss_2 ex2.rm \\$/;"	m
+TESTEXAMPLES_C	src/mfn/examples/tutorials/makefile	/^TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm ex26.PETSc runex26_1 ex26.rm$/;"	m
 TESTEXAMPLES_C	src/nep/examples/nlevp/makefile	/^TESTEXAMPLES_C = loaded_string.PETSc runloaded_string loaded_string.rm$/;"	m
 TESTEXAMPLES_C	src/nep/examples/tests/makefile	/^TESTEXAMPLES_C       =$/;"	m
 TESTEXAMPLES_C	src/nep/examples/tutorials/makefile	/^TESTEXAMPLES_C           = ex21.PETSc runex21_1 ex21.rm \\$/;"	m
 TESTEXAMPLES_C	src/pep/examples/nlevp/makefile	/^TESTEXAMPLES_C = acoustic_wave_1d.PETSc runacoustic_wave_1d_1 acoustic_wave_1d.rm \\$/;"	m
 TESTEXAMPLES_C	src/pep/examples/tests/makefile	/^TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \\$/;"	m
-TESTEXAMPLES_C	src/pep/examples/tutorials/makefile	/^TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm$/;"	m
+TESTEXAMPLES_C	src/pep/examples/tutorials/makefile	/^TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm \\$/;"	m
 TESTEXAMPLES_C	src/svd/examples/tests/makefile	/^TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \\$/;"	m
 TESTEXAMPLES_C	src/svd/examples/tutorials/makefile	/^TESTEXAMPLES_C           = ex8.PETSc runex8_1 ex8.rm$/;"	m
 TESTEXAMPLES_C	src/sys/classes/bv/examples/tests/makefile	/^TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 test1.rm \\$/;"	m
@@ -4177,88 +4575,106 @@ TESTEXAMPLES_C	src/sys/classes/ds/examples/tests/makefile	/^TESTEXAMPLES_C
 TESTEXAMPLES_C	src/sys/classes/fn/examples/tests/makefile	/^TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \\$/;"	m
 TESTEXAMPLES_C	src/sys/classes/rg/examples/tests/makefile	/^TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm$/;"	m
 TESTEXAMPLES_C	src/sys/classes/st/examples/tests/makefile	/^TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 test1.rm \\$/;"	m
+TESTEXAMPLES_C_COMPLEX	src/nep/examples/tutorials/makefile	/^TESTEXAMPLES_C_COMPLEX   = ex22.PETSc runex22_ciss_1 ex22.rm$/;"	m
 TESTEXAMPLES_C_COMPLEX	src/pep/examples/nlevp/makefile	/^TESTEXAMPLES_C_COMPLEX = pdde_stability.PETSc runpdde_stability pdde_stability.rm$/;"	m
 TESTEXAMPLES_C_NOCOMPLEX	src/eps/examples/tests/makefile	/^TESTEXAMPLES_C_NOCOMPLEX = test1.PETSc runtest1_2 test1.rm$/;"	m
 TESTEXAMPLES_C_NOCOMPLEX	src/eps/examples/tutorials/makefile	/^TESTEXAMPLES_C_NOCOMPLEX       = ex4.PETSc runex4_1 ex4.rm \\$/;"	m
-TESTEXAMPLES_C_NOCOMPLEX	src/nep/examples/tutorials/makefile	/^TESTEXAMPLES_C_NOCOMPLEX =$/;"	m
+TESTEXAMPLES_C_NOCOMPLEX	src/mfn/examples/tests/makefile	/^TESTEXAMPLES_C_NOCOMPLEX = test1.PETSc runtest1_1 runtest1_2 test1.rm$/;"	m
 TESTEXAMPLES_C_NOCOMPLEX	src/pep/examples/tutorials/makefile	/^TESTEXAMPLES_C_NOCOMPLEX = ex17.PETSc runex17_1 ex17.rm$/;"	m
 TESTEXAMPLES_C_NOCOMPLEX	src/svd/examples/tutorials/makefile	/^TESTEXAMPLES_C_NOCOMPLEX = ex14.PETSc runex14_1 ex14.rm$/;"	m
 TESTEXAMPLES_C_NOCOMPLEX	src/sys/classes/ds/examples/tests/makefile	/^TESTEXAMPLES_C_NOCOMPLEX = test13.PETSc runtest13_1 test13.rm$/;"	m
 TESTEXAMPLES_C_NOF128	src/eps/examples/tests/makefile	/^TESTEXAMPLES_C_NOF128    = test5.PETSc runtest5_1 test5.rm$/;"	m
 TESTEXAMPLES_C_NOF128	src/svd/examples/tests/makefile	/^TESTEXAMPLES_C_NOF128= test2.PETSc runtest2_1 test2.rm$/;"	m
+TESTEXAMPLES_DATAFILESPATH_COMPLEX	src/eps/examples/tutorials/makefile	/^TESTEXAMPLES_DATAFILESPATH_COMPLEX = ex4.PETSc runex4_ciss_1 ex4.rm \\$/;"	m
+TESTEXAMPLES_DATAFILESPATH_COMPLEX	src/nep/examples/nlevp/makefile	/^TESTEXAMPLES_DATAFILESPATH_COMPLEX = gun.PETSc rungun gun.rm$/;"	m
 TESTEXAMPLES_F90	src/eps/examples/tutorials/makefile	/^TESTEXAMPLES_F90               = ex1f90.PETSc runex1f90_1 ex1f90.rm$/;"	m
 TESTEXAMPLES_F90	src/nep/examples/tutorials/makefile	/^TESTEXAMPLES_F90         =$/;"	m
 TESTEXAMPLES_F90	src/pep/examples/tutorials/makefile	/^TESTEXAMPLES_F90         = ex16f90.PETSc runex16f90_1 ex16f90.rm$/;"	m
 TESTEXAMPLES_FORTRAN	src/eps/examples/tests/makefile	/^TESTEXAMPLES_FORTRAN     = test7f.PETSc runtest7f_1 test7f.rm \\$/;"	m
+TESTEXAMPLES_FORTRAN	src/pep/examples/tests/makefile	/^TESTEXAMPLES_FORTRAN = test3f.PETSc runtest3f_1 test3f.rm \\$/;"	m
 TESTEXAMPLES_FORTRAN	src/svd/examples/tutorials/makefile	/^TESTEXAMPLES_FORTRAN     =$/;"	m
 TESTEXAMPLES_FORTRAN	src/sys/classes/ds/examples/tests/makefile	/^TESTEXAMPLES_FORTRAN     = test14f.PETSc runtest14f_1 test14f.rm$/;"	m
 TESTEXAMPLES_FORTRAN_NOCOMPLEX	src/eps/examples/tutorials/makefile	/^TESTEXAMPLES_FORTRAN_NOCOMPLEX = ex6f.PETSc runex6f_1 ex6f.rm$/;"	m
 TESTS	src/eps/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4 test5 test6 test7f test8 test9 test10 \\$/;"	m
 TESTS	src/mfn/examples/tests/makefile	/^TESTS      =$/;"	m
-TESTS	src/nep/examples/nlevp/makefile	/^TESTS      = loaded_string$/;"	m
+TESTS	src/nep/examples/nlevp/makefile	/^TESTS      = loaded_string gun$/;"	m
 TESTS	src/nep/examples/tests/makefile	/^TESTS      =$/;"	m
 TESTS	src/pep/examples/nlevp/makefile	/^TESTS      = acoustic_wave_1d acoustic_wave_2d butterfly damped_beam \\$/;"	m
-TESTS	src/pep/examples/tests/makefile	/^TESTS      = test1 test2$/;"	m
+TESTS	src/pep/examples/tests/makefile	/^TESTS      = test1 test2 test3 test3f$/;"	m
 TESTS	src/svd/examples/tests/makefile	/^TESTS      = test1 test2 test3$/;"	m
-TESTS	src/sys/classes/bv/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11$/;"	m
+TESTS	src/sys/classes/bv/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12$/;"	m
 TESTS	src/sys/classes/ds/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test12 test13 \\$/;"	m
-TESTS	src/sys/classes/fn/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4 test5 test6$/;"	m
+TESTS	src/sys/classes/fn/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4 test5 test6 test7 test8$/;"	m
 TESTS	src/sys/classes/rg/examples/tests/makefile	/^TESTS      = test1$/;"	m
 TESTS	src/sys/classes/st/examples/tests/makefile	/^TESTS      = test1 test2 test3 test4$/;"	m
+TF	src/eps/examples/tutorials/ex31.c	/^const PetscScalar TF[3] = {0.35,0.35,0.35};    \/* Feedback stabilizer time constant *\/$/;"	v
+TM	src/eps/examples/tutorials/ex31.c	/^PetscScalar TM[3]; \/* Mechanical Torque *\/$/;"	v
 TOLMAX	src/sys/classes/ds/impls/hep/bdc/dsbtdc.c	264;"	d	file:
 TRLan_	src/eps/impls/external/trlan/trlanp.h	40;"	d
 TRLan_	src/eps/impls/external/trlan/trlanp.h	42;"	d
 TRLan_	src/eps/impls/external/trlan/trlanp.h	44;"	d
-TridiagDiag_HHR	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nwr,PetscBLASInt *iwork,PetscInt nwi)$/;"	f	file:
+TV	src/pep/impls/jd/pjdp.h	/^  BV          *TV;           \/* work basis vectors to store T*V (each TV[i] is the coefficient for \\lambda^i of T*V for the extended T) *\/$/;"	m	struct:__anon99
+Td0p	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Td0p[3] = {8.96,6.0,5.89}; \/* d-axis open circuit time constant *\/$/;"	v
+TestMatCombine	src/sys/classes/fn/examples/tests/test6.c	/^PetscErrorCode TestMatCombine(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)$/;"	f
+TestMatExp	src/sys/classes/fn/examples/tests/test3.c	/^PetscErrorCode TestMatExp(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)$/;"	f
+TestMatInvSqrt	src/sys/classes/fn/examples/tests/test8.c	/^PetscErrorCode TestMatInvSqrt(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)$/;"	f
+TestMatRational	src/sys/classes/fn/examples/tests/test5.c	/^PetscErrorCode TestMatRational(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)$/;"	f
+TestMatSqrt	src/sys/classes/fn/examples/tests/test7.c	/^PetscErrorCode TestMatSqrt(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)$/;"	f
+Tj	src/pep/impls/jd/pjdp.h	/^  PetscScalar *Tj;           \/* matrix containing the powers of the invariant pair matrix *\/$/;"	m	struct:__anon99
+Tq0p	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Tq0p[3] = {0.31,0.535,0.6}; \/* q-axis open circuit time constant *\/$/;"	v
+TridiagDiag_HHR	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscReal *rwork,PetscBLASInt *iwork)$/;"	f	file:
 TridqdsZhuang	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode TridqdsZhuang(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscReal *e1,PetscReal *q1,PetscInt *fail)$/;"	f	file:
 TridqdsZhuang3	src/sys/classes/ds/impls/ghiep/dqds.c	/^static PetscErrorCode TridqdsZhuang3(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscInt *fail)$/;"	f	file:
 Trlan	config/packages/trlan.py	/^class Trlan(package.Package):$/;"	c
-TryHRIt	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work,PetscInt nw)$/;"	f	file:
-U	include/slepc/private/svdimpl.h	/^  BV               U,V;         \/* left and right singular vectors *\/$/;"	m	struct:_p_SVD
-U	src/eps/impls/davidson/dvdimprovex.c	/^  BV           U;                  \/* new X vectors *\/$/;"	m	struct:__anon55	file:
+TryHRIt	src/sys/classes/ds/impls/ghiep/invit.c	/^static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work)$/;"	f	file:
+U	include/slepc/private/svdimpl.h	/^  BV             U,V;              \/* left and right singular vectors *\/$/;"	m	struct:_p_SVD
+U	src/eps/impls/davidson/dvdimprovex.c	/^  BV           U;                  \/* new X vectors *\/$/;"	m	struct:__anon68	file:
 UnifiedRotation	src/sys/classes/ds/impls/ghiep/hz.c	/^static PetscErrorCode UnifiedRotation(PetscReal x,PetscReal y,PetscReal sygn,PetscReal *rot,PetscReal *rcond,PetscBool *swap)$/;"	f	file:
+Userctx	src/eps/examples/tutorials/ex31.c	/^} Userctx;$/;"	t	typeref:struct:__anon57	file:
 V	include/slepc/private/epsimpl.h	/^  BV             V;                \/* set of basis vectors and computed eigenvectors *\/$/;"	m	struct:_p_EPS
 V	include/slepc/private/mfnimpl.h	/^  BV             V;              \/* set of basis vectors *\/$/;"	m	struct:_p_MFN
 V	include/slepc/private/nepimpl.h	/^  BV             V;                \/* set of basis vectors and computed eigenvectors *\/$/;"	m	struct:_p_NEP
 V	include/slepc/private/pepimpl.h	/^  BV             V;                \/* set of basis vectors and computed eigenvectors *\/$/;"	m	struct:_p_PEP
-V	include/slepc/private/svdimpl.h	/^  BV               U,V;         \/* left and right singular vectors *\/$/;"	m	struct:_p_SVD
-V	src/eps/impls/ciss/ciss.c	/^  BV           V;$/;"	m	struct:__anon47	file:
+V	include/slepc/private/svdimpl.h	/^  BV             U,V;              \/* left and right singular vectors *\/$/;"	m	struct:_p_SVD
+V	src/eps/impls/ciss/ciss.c	/^  BV                V;$/;"	m	struct:__anon61	file:
 V	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  BV            V;            \/* working basis (for subsolve) *\/$/;"	m	struct:_n_SR
-V	src/nep/impls/ciss/nciss.c	/^  BV           V;$/;"	m	struct:__anon77	file:
-V	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W;$/;"	m	struct:__anon87	file:
-V	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V;$/;"	m	struct:__anon86	file:
-V	src/sys/classes/bv/impls/contiguous/contig.c	/^  Vec         *V;$/;"	m	struct:__anon96	file:
-V	src/sys/classes/bv/impls/vecs/vecs.c	/^  Vec      *V;$/;"	m	struct:__anon99	file:
+V	src/nep/impls/ciss/nciss.c	/^  BV           V;$/;"	m	struct:__anon89	file:
+V	src/pep/impls/jd/pjdp.h	/^  BV          V;             \/* work basis vectors to store the search space *\/$/;"	m	struct:__anon99
+V	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,M2,M3,W;$/;"	m	struct:__anon104	file:
+V	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W,M2,M3,Wt;$/;"	m	struct:__anon105	file:
+V	src/sys/classes/bv/impls/contiguous/contig.c	/^  Vec         *V;$/;"	m	struct:__anon115	file:
+V	src/sys/classes/bv/impls/vecs/vecs.c	/^  Vec      *V;$/;"	m	struct:__anon118	file:
+V0	src/eps/examples/tutorials/ex31.c	/^  Vec      V0;           \/* Initial voltage vector (Power flow solution) *\/$/;"	m	struct:__anon57	file:
 VECCOMP	include/slepcvec.h	30;"	d
 VERTMAX	src/sys/classes/rg/impls/polygon/rgpolygon.c	26;"	d	file:
 V_new_e	src/eps/impls/davidson/davidson.h	/^  PetscInt  V_new_e;           \/* added to V the columns V_new_s:V_new_e *\/$/;"	m	struct:_dvdDashboard
 V_new_s	src/eps/impls/davidson/davidson.h	/^  PetscInt  V_new_s;$/;"	m	struct:_dvdDashboard
 V_tra_e	src/eps/impls/davidson/davidson.h	/^  PetscInt  V_tra_e;       \/* cX <- [cX V*MT(0:V_tra_s-1)], V <- V*MT(V_tra_s:V_tra_e) *\/$/;"	m	struct:_dvdDashboard
 V_tra_s	src/eps/impls/davidson/davidson.h	/^  PetscInt  V_tra_s;$/;"	m	struct:_dvdDashboard
-Valencia	include/slepc/finclude/slepc.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcbv.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcbvdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcds.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcdsdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepceps.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcepsdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcfn.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcfndef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcmfn.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcmfndef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcnep.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcnepdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcpep.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcpepdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcrg.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcrgdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcst.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcstdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcsvd.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcsvddef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcsys.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
-Valencia	include/slepc/finclude/slepcsysdef.h	/^!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepc.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcbv.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcbvdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcds.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcdsdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepceps.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcepsdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcfn.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcfndef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcmfn.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcmfndef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcnep.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcnepdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcpep.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcpepdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcrg.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcrgdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcst.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcstdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcsvd.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcsvddef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcsys.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
+Valencia	include/slepc/finclude/slepcsysdef.h	/^!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain$/;"	v
 VecAXPBYPCZ_Comp	src/sys/vec/veccomp.c	/^PetscErrorCode VecAXPBYPCZ_Comp(Vec v,PetscScalar alpha,PetscScalar beta,PetscScalar gamma,Vec w,Vec z)$/;"	f
 VecAXPBY_Comp	src/sys/vec/veccomp.c	/^PetscErrorCode VecAXPBY_Comp(Vec v,PetscScalar alpha,PetscScalar beta,Vec w)$/;"	f
 VecAXPY_Comp	src/sys/vec/veccomp.c	/^PetscErrorCode VecAXPY_Comp(Vec v,PetscScalar alpha,Vec w)$/;"	f
@@ -4293,15 +4709,18 @@ VecPool_	include/slepc/private/vecimplslepc.h	/^} VecPool_;$/;"	t	typeref:struct
 VecScatterVecs	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode VecScatterVecs(EPS eps,BV Vin,PetscInt n)$/;"	f	file:
 VecTDot_Comp	src/sys/vec/veccomp0.h	/^PetscErrorCode __SUF__(VecTDot_Comp)(Vec a,Vec b,PetscScalar *z)$/;"	f
 VecWAXPY_Comp	src/sys/vec/veccomp.c	/^PetscErrorCode VecWAXPY_Comp(Vec v,PetscScalar alpha,Vec w,Vec z)$/;"	f
-Vec_Comp	include/slepc/private/vecimplslepc.h	/^} Vec_Comp;$/;"	t	typeref:struct:__anon6
-Vec_Comp_N	include/slepc/private/vecimplslepc.h	/^} Vec_Comp_N;$/;"	t	typeref:struct:__anon5
-Vi	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon87	file:
+Vec_Comp	include/slepc/private/vecimplslepc.h	/^} Vec_Comp;$/;"	t	typeref:struct:__anon8
+Vec_Comp_N	include/slepc/private/vecimplslepc.h	/^} Vec_Comp_N;$/;"	t	typeref:struct:__anon7
+Vi	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon105	file:
 Vnext	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  BV            Vnext;        \/* temporary working basis during change of shift *\/$/;"	m	struct:_n_SR
-W	include/slepc/private/fnimpl.h	/^  Mat                W;       \/* workspace matrix *\/$/;"	m	struct:_p_FN
-W	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon46	file:
+Vref	src/eps/examples/tutorials/ex31.c	/^PetscScalar Vref[3];$/;"	v
+W	include/slepc/private/fnimpl.h	/^  Mat         W[FN_MAX_W];    \/* workspace matrices *\/$/;"	m	struct:_p_FN
+W	src/eps/impls/cg/rqcg/rqcg.c	/^  BV       AV,W,P,G;$/;"	m	struct:__anon60	file:
 W	src/eps/impls/davidson/davidson.h	/^  BV       W;                 \/* left basis for harmonic case *\/$/;"	m	struct:_dvdDashboard
-W	src/pep/impls/jd/pjdp.h	/^  BV          *W;            \/* work basis vectors to store A_i*V *\/$/;"	m	struct:__anon82
-W	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W;$/;"	m	struct:__anon87	file:
+W	src/nep/impls/nleigs/nleigs.c	/^  BV             W;         \/* auxiliary BV object *\/$/;"	m	struct:__anon92	file:
+W	src/pep/impls/jd/pjdp.h	/^  BV          W;             \/* work basis vectors to store the test space *\/$/;"	m	struct:__anon99
+W	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,M2,M3,W;$/;"	m	struct:__anon104	file:
+W	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W,M2,M3,Wt;$/;"	m	struct:__anon105	file:
 WARRANTY	include/slepc/finclude/slepc.h	/^!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS$/;"	v
 WARRANTY	include/slepc/finclude/slepcbv.h	/^!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS$/;"	v
 WARRANTY	include/slepc/finclude/slepcbvdef.h	/^!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS$/;"	v
@@ -4327,16 +4746,25 @@ WARRANTY	include/slepc/finclude/slepcsvddef.h	/^!  WARRANTY;  without even the i
 WARRANTY	include/slepc/finclude/slepcsys.h	/^!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS$/;"	v
 WARRANTY	include/slepc/finclude/slepcsysdef.h	/^!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS$/;"	v
 W_shift	src/eps/impls/davidson/davidson.h	/^  PetscBool W_shift;           \/* if true W is shifted when vectors converge *\/$/;"	m	struct:_dvdDashboard
-Wa	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Wa,Wb;       \/* span{W} = span{Wa*AV - Wb*BV} *\/$/;"	m	struct:__anon59	file:
-Wb	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Wa,Wb;       \/* span{W} = span{Wa*AV - Wb*BV} *\/$/;"	m	struct:__anon59	file:
+Wa	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Wa,Wb;       \/* span{W} = span{Wa*AV - Wb*BV} *\/$/;"	m	struct:__anon72	file:
+Wb	src/eps/impls/davidson/dvdutils.c	/^  PetscScalar Wa,Wb;       \/* span{W} = span{Wa*AV - Wb*BV} *\/$/;"	m	struct:__anon72	file:
 WindowsError	config/install.py	/^  WindowsError = None$/;"	v
 WriteCMakeConfigFile	config/configure.py	/^def WriteCMakeConfigFile(cmakeconf):$/;"	f
 WriteGnuMake	config/gmakegen.py	/^def WriteGnuMake(slepc):$/;"	f
 WriteModulesFile	config/configure.py	/^def WriteModulesFile(modules,version,sdir):$/;"	f
 WritePkgconfigFile	config/configure.py	/^def WritePkgconfigFile(pkgconfig,version,pversion,sdir,isinstall,prefixdir):$/;"	f
-XKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  *XKZ;               \/* X'*KZ *\/$/;"	m	struct:__anon55	file:
-Y	src/eps/impls/ciss/ciss.c	/^  BV           Y;$/;"	m	struct:__anon47	file:
-Y	src/nep/impls/ciss/nciss.c	/^  BV           Y;$/;"	m	struct:__anon77	file:
+Wt	src/pep/impls/krylov/toar/nrefine.c	/^  BV           V,W,M2,M3,Wt;$/;"	m	struct:__anon105	file:
+X	src/pep/impls/jd/pjdp.h	/^  BV          X;             \/* locked eigenvectors *\/$/;"	m	struct:__anon99
+X	src/pep/impls/jd/pjdp.h	/^  BV          X;$/;"	m	struct:__anon100
+XKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  *XKZ;               \/* X'*KZ *\/$/;"	m	struct:__anon68	file:
+Xd	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Xd[3]   = {0.146,0.8958,1.3125};  \/* d-axis reactance *\/$/;"	v
+Xdp	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Xdp[3]  = {0.0608,0.1198,0.1813}; \/* d-axis transient reactance *\/$/;"	v
+XpX	src/pep/impls/jd/pjdp.h	/^  PetscScalar *XpX;          \/* X^H*X *\/$/;"	m	struct:__anon99
+Xq	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Xq[3]   = {0.0969,0.8645,1.2578}; \/* q-axis reactance Xq(1) set to 0.4360, value given in text 0.0969 *\/$/;"	v
+Xqp	src/eps/examples/tutorials/ex31.c	/^const PetscScalar Xqp[3]  = {0.0969,0.1969,0.25}; \/* q-axis transient reactance *\/$/;"	v
+Y	src/eps/impls/ciss/ciss.c	/^  BV                Y;$/;"	m	struct:__anon61	file:
+Y	src/nep/impls/ciss/nciss.c	/^  BV           Y;$/;"	m	struct:__anon89	file:
+Ybus	src/eps/examples/tutorials/ex31.c	/^  Mat      Ybus;         \/* Network admittance matrix *\/$/;"	m	struct:__anon57	file:
 _BVIMPL	include/slepc/private/bvimpl.h	23;"	d
 _BVOps	include/slepc/private/bvimpl.h	/^struct _BVOps {$/;"	s
 _DSIMPL	include/slepc/private/dsimpl.h	23;"	d
@@ -4361,39 +4789,43 @@ _SVDOps	include/slepc/private/svdimpl.h	/^struct _SVDOps {$/;"	s
 _VECIMPLSLEPC	include/slepc/private/vecimplslepc.h	23;"	d
 __ARPACKP_H	src/eps/impls/external/arpack/arpackp.h	25;"	d
 __BLZPACKP_H	src/eps/impls/external/blzpack/blzpackp.h	25;"	d
-__COMPOSE2__	src/sys/vec/veccomp.c	700;"	d	file:
-__COMPOSE3__	src/sys/vec/veccomp.c	701;"	d	file:
+__COMPOSE2__	src/sys/vec/veccomp.c	704;"	d	file:
+__COMPOSE3__	src/sys/vec/veccomp.c	705;"	d	file:
 __FEASTP_H	src/eps/impls/external/feast/feastp.h	25;"	d
 __FUNCT__	docs/manual/ex1.c	28;"	d	file:
 __FUNCT__	docs/manual/ex1.c	29;"	d	file:
-__FUNCT__	include/slepc/private/bvimpl.h	102;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	103;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	133;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	134;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	152;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	153;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	171;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	172;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	195;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	196;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	212;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	213;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	231;"	d
-__FUNCT__	include/slepc/private/bvimpl.h	232;"	d
-__FUNCT__	include/slepc/private/epsimpl.h	139;"	d
-__FUNCT__	include/slepc/private/epsimpl.h	140;"	d
-__FUNCT__	include/slepc/private/fnimpl.h	56;"	d
-__FUNCT__	include/slepc/private/fnimpl.h	57;"	d
-__FUNCT__	include/slepc/private/nepimpl.h	142;"	d
-__FUNCT__	include/slepc/private/nepimpl.h	143;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	114;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	115;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	145;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	146;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	160;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	161;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	175;"	d
-__FUNCT__	include/slepc/private/svdimpl.h	176;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	106;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	107;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	137;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	138;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	156;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	157;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	175;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	176;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	199;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	200;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	216;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	217;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	235;"	d
+__FUNCT__	include/slepc/private/bvimpl.h	236;"	d
+__FUNCT__	include/slepc/private/epsimpl.h	142;"	d
+__FUNCT__	include/slepc/private/epsimpl.h	143;"	d
+__FUNCT__	include/slepc/private/fnimpl.h	100;"	d
+__FUNCT__	include/slepc/private/fnimpl.h	101;"	d
+__FUNCT__	include/slepc/private/fnimpl.h	62;"	d
+__FUNCT__	include/slepc/private/fnimpl.h	63;"	d
+__FUNCT__	include/slepc/private/mfnimpl.h	109;"	d
+__FUNCT__	include/slepc/private/mfnimpl.h	110;"	d
+__FUNCT__	include/slepc/private/mfnimpl.h	83;"	d
+__FUNCT__	include/slepc/private/mfnimpl.h	84;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	121;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	122;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	152;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	153;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	167;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	168;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	182;"	d
+__FUNCT__	include/slepc/private/svdimpl.h	183;"	d
 __FUNCT__	src/eps/examples/tests/test1.c	26;"	d	file:
 __FUNCT__	src/eps/examples/tests/test1.c	27;"	d	file:
 __FUNCT__	src/eps/examples/tests/test10.c	30;"	d	file:
@@ -4458,10 +4890,10 @@ __FUNCT__	src/eps/examples/tutorials/ex12.c	29;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex12.c	30;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex13.c	33;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex13.c	34;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex18.c	141;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex18.c	142;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex18.c	207;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex18.c	208;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex18.c	131;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex18.c	132;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex18.c	197;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex18.c	198;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex18.c	37;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex18.c	38;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex19.c	30;"	d	file:
@@ -4472,22 +4904,50 @@ __FUNCT__	src/eps/examples/tutorials/ex19.c	96;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex19.c	97;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex2.c	29;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex2.c	30;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex24.c	197;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex24.c	198;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex24.c	219;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex24.c	220;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex24.c	238;"	d	file:
-__FUNCT__	src/eps/examples/tutorials/ex24.c	239;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex24.c	206;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex24.c	207;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex24.c	228;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex24.c	229;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex24.c	247;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex24.c	248;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex24.c	46;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex24.c	47;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex25.c	30;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex25.c	31;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex29.c	116;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex29.c	117;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex29.c	182;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex29.c	183;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex29.c	39;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex29.c	40;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex3.c	140;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex3.c	141;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex3.c	190;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex3.c	191;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex3.c	36;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex3.c	37;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	195;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	196;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	234;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	235;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	247;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	248;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	275;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	276;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	54;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex30.c	55;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	149;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	150;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	160;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	161;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	170;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	171;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	257;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	258;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	308;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	309;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	540;"	d	file:
+__FUNCT__	src/eps/examples/tutorials/ex31.c	541;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex4.c	29;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex4.c	30;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex5.c	126;"	d	file:
@@ -4504,190 +4964,206 @@ __FUNCT__	src/eps/examples/tutorials/ex9.c	259;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex9.c	260;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex9.c	60;"	d	file:
 __FUNCT__	src/eps/examples/tutorials/ex9.c	61;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	100;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	101;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	420;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	421;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	431;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	432;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	460;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	461;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	471;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	472;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	499;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	500;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	102;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	103;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	412;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	413;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	423;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	424;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	452;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	453;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	463;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	464;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	491;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	492;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	506;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	507;"	d	file:
 __FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	50;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	510;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	511;"	d	file:
 __FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	51;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	545;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	546;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	556;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	557;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	584;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	585;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	601;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	602;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	635;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	636;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	650;"	d	file:
-__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	651;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	541;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	542;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	552;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	553;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	580;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	581;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	591;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	592;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	626;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	627;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	637;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	638;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	665;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	666;"	d	file:
 __FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	67;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	683;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	684;"	d	file:
 __FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	68;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	722;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	723;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	739;"	d	file:
+__FUNCT__	src/eps/impls/cg/lobpcg/lobpcg.c	740;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	118;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	119;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	298;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	299;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	300;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	309;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	310;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	311;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	339;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	340;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	341;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	350;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	351;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	352;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	378;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	379;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	380;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	394;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	395;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	396;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	412;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	413;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	414;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	425;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	426;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	427;"	d	file:
+__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	441;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	442;"	d	file:
-__FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	443;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	47;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	48;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	94;"	d	file:
 __FUNCT__	src/eps/impls/cg/rqcg/rqcg.c	95;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1005;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1006;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1052;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1053;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	108;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	109;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1101;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1102;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1117;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1118;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1149;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1150;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1171;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1172;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1204;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1205;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1216;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1217;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1245;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1246;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1273;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1274;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1309;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1310;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1322;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1323;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1180;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1181;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1227;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1228;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1276;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1277;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1292;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1293;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1324;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1325;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	133;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1346;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1347;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	134;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1352;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1353;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1363;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1364;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1393;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1394;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1404;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1405;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1432;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1433;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1466;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1467;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1505;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1506;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1524;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1525;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1551;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	1552;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1379;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1380;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1391;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1392;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1420;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1421;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1442;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1443;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1475;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1476;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1487;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1488;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1516;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1517;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1528;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1529;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1558;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1559;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1569;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1570;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1598;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1599;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1609;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1610;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1645;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1646;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1656;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1657;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1684;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1685;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1695;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1696;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	171;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	172;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	218;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	219;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	244;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	245;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	271;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	272;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	354;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	355;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	405;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	406;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	459;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	460;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	474;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	475;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	518;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	519;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	568;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	569;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	680;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	681;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	717;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	718;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	828;"	d	file:
-__FUNCT__	src/eps/impls/ciss/ciss.c	829;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1731;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1732;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1742;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1743;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1771;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1772;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1805;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1806;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1852;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1853;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1875;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1876;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1905;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	1906;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	261;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	262;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	287;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	288;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	314;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	315;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	378;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	379;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	429;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	430;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	484;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	485;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	499;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	500;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	543;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	544;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	593;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	594;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	705;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	706;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	742;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	743;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	812;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	813;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	85;"	d	file:
 __FUNCT__	src/eps/impls/ciss/ciss.c	86;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	260;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	261;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	301;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	960;"	d	file:
+__FUNCT__	src/eps/impls/ciss/ciss.c	961;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	221;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	222;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	263;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	264;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	280;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	281;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	291;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	292;"	d	file:
 __FUNCT__	src/eps/impls/davidson/davidson.c	302;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	318;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	319;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	356;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	357;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	367;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	368;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	303;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	315;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	316;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	326;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	327;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	342;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	343;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	354;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	355;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	365;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	366;"	d	file:
 __FUNCT__	src/eps/impls/davidson/davidson.c	378;"	d	file:
 __FUNCT__	src/eps/impls/davidson/davidson.c	379;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	391;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	392;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	389;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	390;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	39;"	d	file:
 __FUNCT__	src/eps/impls/davidson/davidson.c	402;"	d	file:
 __FUNCT__	src/eps/impls/davidson/davidson.c	403;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	418;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	419;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	430;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	431;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	441;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	442;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	454;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	455;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	465;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	466;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	478;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	479;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	47;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	489;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	48;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	490;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	500;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	501;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	511;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	512;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	522;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	523;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	538;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	539;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	550;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	551;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	561;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	562;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	572;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	573;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	78;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.c	79;"	d	file:
-__FUNCT__	src/eps/impls/davidson/davidson.h	175;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	176;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	190;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	191;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	202;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	203;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	324;"	d
-__FUNCT__	src/eps/impls/davidson/davidson.h	325;"	d
+__FUNCT__	src/eps/impls/davidson/davidson.c	40;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	413;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	414;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	424;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	425;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	435;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	436;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	446;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	447;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	462;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	463;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	474;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.c	475;"	d	file:
+__FUNCT__	src/eps/impls/davidson/davidson.h	185;"	d
+__FUNCT__	src/eps/impls/davidson/davidson.h	186;"	d
+__FUNCT__	src/eps/impls/davidson/davidson.h	200;"	d
+__FUNCT__	src/eps/impls/davidson/davidson.h	201;"	d
+__FUNCT__	src/eps/impls/davidson/davidson.h	212;"	d
+__FUNCT__	src/eps/impls/davidson/davidson.h	213;"	d
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	108;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	109;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	167;"	d	file:
@@ -4700,36 +5176,38 @@ __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	332;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	333;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	36;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	37;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	397;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	398;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	399;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	441;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	442;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	443;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	484;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	485;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	486;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	50;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	516;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	517;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	518;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	51;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	551;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	552;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	553;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	70;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdcalcpairs.c	71;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdgd2.c	215;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdgd2.c	216;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdgd2.c	217;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdgd2.c	32;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdgd2.c	33;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdgd2.c	45;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdgd2.c	46;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1074;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1075;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1164;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1165;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1084;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1085;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1174;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1175;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	117;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	118;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1196;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1197;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1213;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1214;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1206;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1207;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1223;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1224;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1242;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	1243;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	178;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	179;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	196;"	d	file:
@@ -4756,16 +5234,16 @@ __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	57;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	58;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	603;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdimprovex.c	604;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	682;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	683;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	815;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	816;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	883;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	884;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	921;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	922;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	955;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	956;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	694;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	695;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	825;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	826;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	893;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	894;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	931;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	932;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	965;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdimprovex.c	966;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdinitv.c	101;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdinitv.c	102;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdinitv.c	117;"	d	file:
@@ -4778,8 +5256,8 @@ __FUNCT__	src/eps/impls/davidson/dvdinitv.c	55;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdinitv.c	56;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdschm.c	26;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdschm.c	27;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdschm.c	70;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdschm.c	71;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdschm.c	66;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdschm.c	67;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	28;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	29;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	43;"	d	file:
@@ -4788,440 +5266,436 @@ __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	58;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	59;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	69;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdtestconv.c	70;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	102;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	103;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	104;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	167;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	168;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	169;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	223;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	224;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	225;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	265;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	266;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	267;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	317;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	318;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	319;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	354;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	355;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	356;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	40;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	41;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	42;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	61;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	62;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	63;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	82;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdupdatev.c	83;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdupdatev.c	84;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	102;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	103;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	116;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	117;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	165;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	143;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	144;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdutils.c	166;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	188;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	189;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	202;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	203;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	244;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	245;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	261;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	262;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	275;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	276;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	289;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	290;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	303;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	304;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	317;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	318;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	330;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	331;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	353;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	354;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	365;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	366;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	398;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	399;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	167;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	180;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	181;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	222;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	223;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	234;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	235;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	267;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	268;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	297;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	298;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	337;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	338;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	376;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	377;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	402;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	403;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	416;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	417;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdutils.c	432;"	d	file:
 __FUNCT__	src/eps/impls/davidson/dvdutils.c	433;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	472;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	473;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	511;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	512;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	537;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	538;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	551;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	552;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	567;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	568;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	596;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	597;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	76;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	77;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	90;"	d	file:
-__FUNCT__	src/eps/impls/davidson/dvdutils.c	91;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	54;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	55;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	68;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	69;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	80;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	81;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	94;"	d	file:
+__FUNCT__	src/eps/impls/davidson/dvdutils.c	95;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	106;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	107;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	130;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	131;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	155;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	156;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	186;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	187;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	216;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	217;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	246;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	247;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	275;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	276;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	304;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	305;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	337;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	338;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	373;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	167;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	168;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	192;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	193;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	223;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	224;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	253;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	254;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	283;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	284;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	312;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	313;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	341;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	342;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	374;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	375;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	410;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	411;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	440;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	441;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	447;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	448;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	44;"	d	file:
 __FUNCT__	src/eps/impls/davidson/gd/gd.c	45;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	469;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	470;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	499;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	500;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	533;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	534;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	544;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	545;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	558;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	559;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	587;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	588;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	617;"	d	file:
-__FUNCT__	src/eps/impls/davidson/gd/gd.c	618;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	477;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	478;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	506;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	507;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	536;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	537;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	570;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	571;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	581;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	582;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	610;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	611;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	621;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	622;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	651;"	d	file:
+__FUNCT__	src/eps/impls/davidson/gd/gd.c	652;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	114;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	115;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	139;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	140;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	166;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	167;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	197;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	198;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	227;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	228;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	257;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	258;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	286;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	287;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	315;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	316;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	172;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	173;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	199;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	200;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	230;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	231;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	260;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	261;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	290;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	291;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	319;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	320;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	348;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	349;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	384;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	385;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	421;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	422;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	381;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	382;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	417;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	418;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	454;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	455;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	456;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	45;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	46;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	490;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	491;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	521;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	522;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	551;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	552;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	581;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	582;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	488;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	489;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	523;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	524;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	554;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	555;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	584;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	585;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	614;"	d	file:
 __FUNCT__	src/eps/impls/davidson/jd/jd.c	615;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	616;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	645;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	646;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	674;"	d	file:
-__FUNCT__	src/eps/impls/davidson/jd/jd.c	675;"	d	file:
-__FUNCT__	src/eps/impls/external/arpack/arpack.c	293;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	648;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	649;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	678;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	679;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	707;"	d	file:
+__FUNCT__	src/eps/impls/davidson/jd/jd.c	708;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	294;"	d	file:
+__FUNCT__	src/eps/impls/external/arpack/arpack.c	295;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	29;"	d	file:
-__FUNCT__	src/eps/impls/external/arpack/arpack.c	308;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	309;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	30;"	d	file:
-__FUNCT__	src/eps/impls/external/arpack/arpack.c	326;"	d	file:
+__FUNCT__	src/eps/impls/external/arpack/arpack.c	310;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	327;"	d	file:
-__FUNCT__	src/eps/impls/external/arpack/arpack.c	337;"	d	file:
+__FUNCT__	src/eps/impls/external/arpack/arpack.c	328;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	338;"	d	file:
-__FUNCT__	src/eps/impls/external/arpack/arpack.c	94;"	d	file:
+__FUNCT__	src/eps/impls/external/arpack/arpack.c	339;"	d	file:
 __FUNCT__	src/eps/impls/external/arpack/arpack.c	95;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	107;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	108;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	122;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	123;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	133;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	134;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	151;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	152;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	214;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	215;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	316;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	317;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	327;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	328;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	356;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	357;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	367;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	368;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	395;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	396;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	407;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	408;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	421;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	422;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	42;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	437;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	438;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	43;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	469;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	470;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	57;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	58;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	68;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	69;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	96;"	d	file:
-__FUNCT__	src/eps/impls/external/blopex/blopex.c	97;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	151;"	d	file:
+__FUNCT__	src/eps/impls/external/arpack/arpack.c	96;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	109;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	110;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	124;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	125;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	135;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	136;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	153;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	154;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	217;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	218;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	319;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	320;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	330;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	331;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	359;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	360;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	370;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	371;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	398;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	399;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	410;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	411;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	424;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	425;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	440;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	441;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	44;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	45;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	472;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	473;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	59;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	60;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	70;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	71;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	98;"	d	file:
+__FUNCT__	src/eps/impls/external/blopex/blopex.c	99;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	152;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	283;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	153;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	284;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	297;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	285;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	298;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	313;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	299;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	314;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	326;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	315;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	327;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	346;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	328;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	347;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	374;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	348;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	375;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	390;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	376;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	391;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	417;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	392;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	418;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	432;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	419;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	433;"	d	file:
-__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	461;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	434;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	462;"	d	file:
+__FUNCT__	src/eps/impls/external/blzpack/blzpack.c	463;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	65;"	d	file:
 __FUNCT__	src/eps/impls/external/blzpack/blzpack.c	66;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	178;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	179;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	190;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	180;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	191;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	203;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	192;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	204;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	225;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	205;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	226;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	241;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	227;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	242;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	256;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	243;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	257;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	286;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	258;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	287;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	297;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	288;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	298;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	299;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	29;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	30;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	325;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	326;"	d	file:
-__FUNCT__	src/eps/impls/external/feast/feast.c	79;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	327;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	328;"	d	file:
 __FUNCT__	src/eps/impls/external/feast/feast.c	80;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	166;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	167;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	208;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	209;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	232;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	233;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	253;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	254;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	267;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	268;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	282;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	283;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	306;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	307;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	343;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	344;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	356;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	357;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	394;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	395;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	405;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	406;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	432;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	433;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	444;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	445;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	485;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	486;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	496;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	497;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	529;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	530;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	69;"	d	file:
-__FUNCT__	src/eps/impls/external/primme/primme.c	70;"	d	file:
-__FUNCT__	src/eps/impls/external/trlan/trlan.c	100;"	d	file:
+__FUNCT__	src/eps/impls/external/feast/feast.c	81;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	149;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	150;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	191;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	192;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	215;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	216;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	236;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	237;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	250;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	251;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	265;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	266;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	289;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	290;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	326;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	327;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	339;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	340;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	377;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	378;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	388;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	389;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	416;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	417;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	427;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	428;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	459;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	460;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	470;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	471;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	498;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	499;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	51;"	d	file:
+__FUNCT__	src/eps/impls/external/primme/primme.c	52;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	101;"	d	file:
-__FUNCT__	src/eps/impls/external/trlan/trlan.c	159;"	d	file:
+__FUNCT__	src/eps/impls/external/trlan/trlan.c	102;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	160;"	d	file:
-__FUNCT__	src/eps/impls/external/trlan/trlan.c	171;"	d	file:
+__FUNCT__	src/eps/impls/external/trlan/trlan.c	161;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	172;"	d	file:
-__FUNCT__	src/eps/impls/external/trlan/trlan.c	182;"	d	file:
+__FUNCT__	src/eps/impls/external/trlan/trlan.c	173;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	183;"	d	file:
+__FUNCT__	src/eps/impls/external/trlan/trlan.c	184;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	32;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	33;"	d	file:
-__FUNCT__	src/eps/impls/external/trlan/trlan.c	76;"	d	file:
 __FUNCT__	src/eps/impls/external/trlan/trlan.c	77;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	165;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	166;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	183;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	184;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	194;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	195;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	229;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	230;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	240;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	241;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	269;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	270;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	282;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	283;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	300;"	d	file:
-__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	301;"	d	file:
+__FUNCT__	src/eps/impls/external/trlan/trlan.c	78;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	163;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	164;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	181;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	182;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	192;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	193;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	227;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	228;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	238;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	239;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	267;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	268;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	280;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	281;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	298;"	d	file:
+__FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	299;"	d	file:
 __FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	44;"	d	file:
 __FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	45;"	d	file:
 __FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	77;"	d	file:
 __FUNCT__	src/eps/impls/krylov/arnoldi/arnoldi.c	78;"	d	file:
-__FUNCT__	src/eps/impls/krylov/epskrylov.c	185;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	186;"	d	file:
-__FUNCT__	src/eps/impls/krylov/epskrylov.c	234;"	d	file:
+__FUNCT__	src/eps/impls/krylov/epskrylov.c	187;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	235;"	d	file:
+__FUNCT__	src/eps/impls/krylov/epskrylov.c	236;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	28;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	29;"	d	file:
-__FUNCT__	src/eps/impls/krylov/epskrylov.c	330;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	331;"	d	file:
-__FUNCT__	src/eps/impls/krylov/epskrylov.c	384;"	d	file:
+__FUNCT__	src/eps/impls/krylov/epskrylov.c	332;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	385;"	d	file:
-__FUNCT__	src/eps/impls/krylov/epskrylov.c	71;"	d	file:
+__FUNCT__	src/eps/impls/krylov/epskrylov.c	386;"	d	file:
 __FUNCT__	src/eps/impls/krylov/epskrylov.c	72;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1025;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1026;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1042;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1043;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1081;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1082;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1121;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1122;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1145;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1146;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1171;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1172;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1183;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1184;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	171;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	172;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	295;"	d	file:
+__FUNCT__	src/eps/impls/krylov/epskrylov.c	73;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1027;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1028;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1044;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1045;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1083;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1084;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1097;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1098;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1132;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1133;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1190;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1191;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1248;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1249;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1290;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1291;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1314;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1315;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1342;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1343;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1354;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	1355;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	173;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	174;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	296;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	310;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	297;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	311;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	344;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	312;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	345;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	355;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	346;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	356;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	384;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	357;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	385;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	395;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	386;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	396;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	431;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	397;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	432;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	442;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	433;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	443;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	444;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	46;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	471;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	472;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	473;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	47;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	495;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	496;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	535;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	497;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	536;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	546;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	537;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	547;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	575;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	548;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	576;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	587;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	577;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	588;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	626;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	589;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	627;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	637;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	628;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	638;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	666;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	639;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	667;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	691;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	668;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	692;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	728;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	693;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	729;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	741;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	730;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	742;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	743;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	75;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	76;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	771;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	772;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	790;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	773;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	791;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	826;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	792;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	827;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	844;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	828;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	845;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	882;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	883;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	927;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	928;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	969;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	970;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	988;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	989;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	846;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	884;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	885;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	929;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	930;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	971;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	972;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	990;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/krylovschur.c	991;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/ks-indef.c	29;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/ks-indef.c	30;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1051;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1052;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1131;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1132;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1152;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1153;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1209;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1210;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1281;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1282;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	150;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	151;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	279;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	280;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	305;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	306;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	42;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	43;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	468;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	469;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1115;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1116;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	117;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	118;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1195;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1196;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1216;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1217;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1273;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1274;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1345;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	1346;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	169;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	170;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	328;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	329;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	359;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	360;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	532;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	533;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	552;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	553;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	608;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	609;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	704;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	705;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	71;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	72;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	743;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	744;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	789;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	790;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	828;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	829;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	98;"	d	file:
-__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	99;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	55;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	56;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	596;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	597;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	616;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	617;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	672;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	673;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	768;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	769;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	807;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	808;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	84;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	853;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	854;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	85;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	892;"	d	file:
+__FUNCT__	src/eps/impls/krylov/krylovschur/ks-slice.c	893;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/ks-symm.c	30;"	d	file:
 __FUNCT__	src/eps/impls/krylov/krylovschur/ks-symm.c	31;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	100;"	d	file:
@@ -5242,48 +5716,48 @@ __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	494;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	49;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	558;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	559;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	746;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	747;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	748;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	765;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	766;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	767;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	787;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	788;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	789;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	818;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	819;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	820;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	829;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	830;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	831;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	858;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	859;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	860;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	870;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	871;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	872;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	883;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	884;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	885;"	d	file:
+__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	899;"	d	file:
 __FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	900;"	d	file:
-__FUNCT__	src/eps/impls/krylov/lanczos/lanczos.c	901;"	d	file:
-__FUNCT__	src/eps/impls/lapack/lapack.c	133;"	d	file:
 __FUNCT__	src/eps/impls/lapack/lapack.c	134;"	d	file:
-__FUNCT__	src/eps/impls/lapack/lapack.c	165;"	d	file:
+__FUNCT__	src/eps/impls/lapack/lapack.c	135;"	d	file:
 __FUNCT__	src/eps/impls/lapack/lapack.c	166;"	d	file:
+__FUNCT__	src/eps/impls/lapack/lapack.c	167;"	d	file:
 __FUNCT__	src/eps/impls/lapack/lapack.c	27;"	d	file:
 __FUNCT__	src/eps/impls/lapack/lapack.c	28;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	214;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	215;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	216;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	228;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	229;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	230;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	250;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	251;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	252;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	269;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	270;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	271;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	310;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	311;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	312;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	321;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	322;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	323;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	350;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	351;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	352;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	363;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	364;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	365;"	d	file:
+__FUNCT__	src/eps/impls/power/power.c	379;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	380;"	d	file:
-__FUNCT__	src/eps/impls/power/power.c	381;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	48;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	49;"	d	file:
 __FUNCT__	src/eps/impls/power/power.c	82;"	d	file:
@@ -5292,20 +5766,20 @@ __FUNCT__	src/eps/impls/subspace/subspace.c	118;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	119;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	156;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	157;"	d	file:
-__FUNCT__	src/eps/impls/subspace/subspace.c	324;"	d	file:
-__FUNCT__	src/eps/impls/subspace/subspace.c	325;"	d	file:
-__FUNCT__	src/eps/impls/subspace/subspace.c	335;"	d	file:
-__FUNCT__	src/eps/impls/subspace/subspace.c	336;"	d	file:
+__FUNCT__	src/eps/impls/subspace/subspace.c	322;"	d	file:
+__FUNCT__	src/eps/impls/subspace/subspace.c	323;"	d	file:
+__FUNCT__	src/eps/impls/subspace/subspace.c	333;"	d	file:
+__FUNCT__	src/eps/impls/subspace/subspace.c	334;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	39;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	40;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	69;"	d	file:
 __FUNCT__	src/eps/impls/subspace/subspace.c	70;"	d	file:
-__FUNCT__	src/eps/interface/dlregiseps.c	105;"	d	file:
-__FUNCT__	src/eps/interface/dlregiseps.c	106;"	d	file:
-__FUNCT__	src/eps/interface/dlregiseps.c	34;"	d	file:
-__FUNCT__	src/eps/interface/dlregiseps.c	35;"	d	file:
-__FUNCT__	src/eps/interface/dlregiseps.c	55;"	d	file:
-__FUNCT__	src/eps/interface/dlregiseps.c	56;"	d	file:
+__FUNCT__	src/eps/interface/dlregiseps.c	107;"	d	file:
+__FUNCT__	src/eps/interface/dlregiseps.c	108;"	d	file:
+__FUNCT__	src/eps/interface/dlregiseps.c	36;"	d	file:
+__FUNCT__	src/eps/interface/dlregiseps.c	37;"	d	file:
+__FUNCT__	src/eps/interface/dlregiseps.c	57;"	d	file:
+__FUNCT__	src/eps/interface/dlregiseps.c	58;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	127;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	128;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	182;"	d	file:
@@ -5317,37 +5791,37 @@ __FUNCT__	src/eps/interface/epsbasic.c	246;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	283;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	284;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	31;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	322;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	323;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	324;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	32;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	361;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	362;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	363;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	390;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	391;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	392;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	433;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	434;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	435;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	465;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	466;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	467;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	499;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	500;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	501;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	532;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	533;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	534;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	566;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	567;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	568;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	598;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	599;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	600;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	632;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	633;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	634;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	664;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	665;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	666;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	698;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	699;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	700;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	730;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	731;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	732;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	757;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	758;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	759;"	d	file:
+__FUNCT__	src/eps/interface/epsbasic.c	784;"	d	file:
 __FUNCT__	src/eps/interface/epsbasic.c	785;"	d	file:
-__FUNCT__	src/eps/interface/epsbasic.c	786;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	131;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	132;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	221;"	d	file:
@@ -5364,10 +5838,12 @@ __FUNCT__	src/eps/interface/epsdefault.c	300;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	301;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	316;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	317;"	d	file:
-__FUNCT__	src/eps/interface/epsdefault.c	377;"	d	file:
-__FUNCT__	src/eps/interface/epsdefault.c	378;"	d	file:
+__FUNCT__	src/eps/interface/epsdefault.c	366;"	d	file:
+__FUNCT__	src/eps/interface/epsdefault.c	367;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	38;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	39;"	d	file:
+__FUNCT__	src/eps/interface/epsdefault.c	427;"	d	file:
+__FUNCT__	src/eps/interface/epsdefault.c	428;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	68;"	d	file:
 __FUNCT__	src/eps/interface/epsdefault.c	69;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	104;"	d	file:
@@ -5376,170 +5852,194 @@ __FUNCT__	src/eps/interface/epsmon.c	139;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	140;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	165;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	166;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	215;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	216;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	261;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	262;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	224;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	225;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	27;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	281;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	282;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	28;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	320;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	321;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	373;"	d	file:
-__FUNCT__	src/eps/interface/epsmon.c	374;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	343;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	344;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	389;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	390;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	415;"	d	file:
+__FUNCT__	src/eps/interface/epsmon.c	416;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	44;"	d	file:
 __FUNCT__	src/eps/interface/epsmon.c	45;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1011;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1012;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1044;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1045;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1082;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1083;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1109;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1110;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1143;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1144;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1170;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1171;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1032;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1033;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1058;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1059;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	106;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	107;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1102;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1103;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1128;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1129;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1202;"	d	file:
 __FUNCT__	src/eps/interface/epsopts.c	1203;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1204;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1230;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1231;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1276;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1277;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1314;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	1315;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	241;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	242;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	272;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	273;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	27;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1235;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1236;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1273;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1274;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1300;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1301;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1334;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1335;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1361;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1362;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1394;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1395;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1421;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1422;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1467;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1468;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1505;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	1506;"	d	file:
 __FUNCT__	src/eps/interface/epsopts.c	28;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	319;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	320;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	349;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	350;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	414;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	415;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	505;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	506;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	535;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	536;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	578;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	579;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	637;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	638;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	689;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	690;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	735;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	736;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	762;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	763;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	841;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	842;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	867;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	868;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	911;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	912;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	937;"	d	file:
-__FUNCT__	src/eps/interface/epsopts.c	938;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	29;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	311;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	312;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	342;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	343;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	389;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	390;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	419;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	420;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	484;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	485;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	576;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	577;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	606;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	607;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	649;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	650;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	69;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	708;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	709;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	70;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	759;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	760;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	805;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	806;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	832;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	833;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	884;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	885;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	924;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	925;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	951;"	d	file:
+__FUNCT__	src/eps/interface/epsopts.c	952;"	d	file:
 __FUNCT__	src/eps/interface/epsregis.c	54;"	d	file:
 __FUNCT__	src/eps/interface/epsregis.c	55;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	238;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	239;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	235;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	236;"	d	file:
 __FUNCT__	src/eps/interface/epssetup.c	26;"	d	file:
 __FUNCT__	src/eps/interface/epssetup.c	27;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	294;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	295;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	332;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	333;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	374;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	375;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	417;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	418;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	449;"	d	file:
-__FUNCT__	src/eps/interface/epssetup.c	450;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	292;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	293;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	330;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	331;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	372;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	373;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	415;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	416;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	447;"	d	file:
+__FUNCT__	src/eps/interface/epssetup.c	448;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	176;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	177;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	211;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	212;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	241;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	242;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	278;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	279;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	27;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	280;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	28;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	330;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	331;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	385;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	332;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	386;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	432;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	387;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	433;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	434;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	48;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	49;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	505;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	506;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	540;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	507;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	541;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	603;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	542;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	604;"	d	file:
-__FUNCT__	src/eps/interface/epssolve.c	693;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	605;"	d	file:
 __FUNCT__	src/eps/interface/epssolve.c	694;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	226;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	227;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	263;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	264;"	d	file:
+__FUNCT__	src/eps/interface/epssolve.c	695;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	236;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	237;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	273;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	274;"	d	file:
 __FUNCT__	src/eps/interface/epsview.c	27;"	d	file:
 __FUNCT__	src/eps/interface/epsview.c	28;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	298;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	299;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	348;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	349;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	393;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	394;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	413;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	414;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	474;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	475;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	523;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	524;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	555;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	556;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	586;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	587;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	617;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	618;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	669;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	670;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	704;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	705;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	757;"	d	file:
-__FUNCT__	src/eps/interface/epsview.c	758;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	113;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	114;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	120;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	121;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	128;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	129;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	135;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	136;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	143;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	144;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	151;"	d	file:
-__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	152;"	d	file:
-__FUNCT__	src/mfn/examples/tutorials/ex23.c	135;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	308;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	309;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	363;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	364;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	408;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	409;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	428;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	429;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	489;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	490;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	538;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	539;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	571;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	572;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	602;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	603;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	633;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	634;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	685;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	686;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	720;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	721;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	773;"	d	file:
+__FUNCT__	src/eps/interface/epsview.c	774;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	117;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	118;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	124;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	125;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	132;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	133;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	139;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	140;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	147;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	148;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	154;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	155;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	162;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	163;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	170;"	d	file:
+__FUNCT__	src/eps/interface/ftn-custom/zepsf.c	171;"	d	file:
+__FUNCT__	src/mfn/examples/tests/test1.c	28;"	d	file:
+__FUNCT__	src/mfn/examples/tests/test1.c	29;"	d	file:
 __FUNCT__	src/mfn/examples/tutorials/ex23.c	136;"	d	file:
-__FUNCT__	src/mfn/examples/tutorials/ex23.c	33;"	d	file:
+__FUNCT__	src/mfn/examples/tutorials/ex23.c	137;"	d	file:
 __FUNCT__	src/mfn/examples/tutorials/ex23.c	34;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	111;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	112;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	251;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	252;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	39;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	40;"	d	file:
+__FUNCT__	src/mfn/examples/tutorials/ex23.c	35;"	d	file:
+__FUNCT__	src/mfn/examples/tutorials/ex26.c	29;"	d	file:
+__FUNCT__	src/mfn/examples/tutorials/ex26.c	30;"	d	file:
+__FUNCT__	src/mfn/impls/expokit/mfnexpokit.c	198;"	d	file:
+__FUNCT__	src/mfn/impls/expokit/mfnexpokit.c	199;"	d	file:
+__FUNCT__	src/mfn/impls/expokit/mfnexpokit.c	39;"	d	file:
+__FUNCT__	src/mfn/impls/expokit/mfnexpokit.c	40;"	d	file:
+__FUNCT__	src/mfn/impls/expokit/mfnexpokit.c	58;"	d	file:
+__FUNCT__	src/mfn/impls/expokit/mfnexpokit.c	59;"	d	file:
+__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	182;"	d	file:
+__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	183;"	d	file:
+__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	41;"	d	file:
+__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	42;"	d	file:
+__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	56;"	d	file:
 __FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	57;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	58;"	d	file:
+__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	84;"	d	file:
 __FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	85;"	d	file:
-__FUNCT__	src/mfn/impls/krylov/mfnkrylov.c	86;"	d	file:
 __FUNCT__	src/mfn/interface/dlregismfn.c	100;"	d	file:
 __FUNCT__	src/mfn/interface/dlregismfn.c	101;"	d	file:
 __FUNCT__	src/mfn/interface/dlregismfn.c	29;"	d	file:
@@ -5554,430 +6054,654 @@ __FUNCT__	src/mfn/interface/mfnbasic.c	133;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	134;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	168;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	169;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	228;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	229;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	283;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	284;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	309;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	310;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	223;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	224;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	278;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	279;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	304;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	305;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	31;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	32;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	346;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	347;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	372;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	373;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	405;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	406;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	439;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	440;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	472;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	473;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	506;"	d	file:
-__FUNCT__	src/mfn/interface/mfnbasic.c	507;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	341;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	342;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	367;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	368;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	399;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	400;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	433;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	434;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	466;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	467;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	500;"	d	file:
+__FUNCT__	src/mfn/interface/mfnbasic.c	501;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	96;"	d	file:
 __FUNCT__	src/mfn/interface/mfnbasic.c	97;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	129;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	130;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	155;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	156;"	d	file:
-__FUNCT__	src/mfn/interface/mfnmon.c	188;"	d	file:
-__FUNCT__	src/mfn/interface/mfnmon.c	189;"	d	file:
+__FUNCT__	src/mfn/interface/mfnmon.c	194;"	d	file:
+__FUNCT__	src/mfn/interface/mfnmon.c	195;"	d	file:
+__FUNCT__	src/mfn/interface/mfnmon.c	239;"	d	file:
+__FUNCT__	src/mfn/interface/mfnmon.c	240;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	27;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	28;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	44;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	45;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	94;"	d	file:
 __FUNCT__	src/mfn/interface/mfnmon.c	95;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	124;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	125;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	155;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	156;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	202;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	203;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	228;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	229;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	160;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	161;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	191;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	192;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	238;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	239;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	264;"	d	file:
 __FUNCT__	src/mfn/interface/mfnopts.c	265;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	266;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	27;"	d	file:
 __FUNCT__	src/mfn/interface/mfnopts.c	28;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	297;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	298;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	324;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	325;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	366;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	367;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	400;"	d	file:
-__FUNCT__	src/mfn/interface/mfnopts.c	401;"	d	file:
-__FUNCT__	src/mfn/interface/mfnregis.c	26;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	29;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	301;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	302;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	333;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	334;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	360;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	361;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	402;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	403;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	436;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	437;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	66;"	d	file:
+__FUNCT__	src/mfn/interface/mfnopts.c	67;"	d	file:
 __FUNCT__	src/mfn/interface/mfnregis.c	27;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsetup.c	126;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsetup.c	127;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsetup.c	152;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsetup.c	153;"	d	file:
+__FUNCT__	src/mfn/interface/mfnregis.c	28;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsetup.c	123;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsetup.c	124;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsetup.c	149;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsetup.c	150;"	d	file:
 __FUNCT__	src/mfn/interface/mfnsetup.c	26;"	d	file:
 __FUNCT__	src/mfn/interface/mfnsetup.c	27;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsetup.c	88;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsetup.c	89;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsolve.c	132;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsolve.c	133;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsetup.c	85;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsetup.c	86;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsolve.c	100;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsolve.c	101;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsolve.c	135;"	d	file:
+__FUNCT__	src/mfn/interface/mfnsolve.c	136;"	d	file:
 __FUNCT__	src/mfn/interface/mfnsolve.c	26;"	d	file:
 __FUNCT__	src/mfn/interface/mfnsolve.c	27;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsolve.c	97;"	d	file:
-__FUNCT__	src/mfn/interface/mfnsolve.c	98;"	d	file:
+__FUNCT__	src/nep/examples/nlevp/gun.c	159;"	d	file:
+__FUNCT__	src/nep/examples/nlevp/gun.c	160;"	d	file:
+__FUNCT__	src/nep/examples/nlevp/gun.c	47;"	d	file:
+__FUNCT__	src/nep/examples/nlevp/gun.c	48;"	d	file:
 __FUNCT__	src/nep/examples/nlevp/loaded_string.c	43;"	d	file:
 __FUNCT__	src/nep/examples/nlevp/loaded_string.c	44;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex20.c	214;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	215;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex20.c	216;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex20.c	232;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	233;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex20.c	234;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex20.c	306;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	307;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex20.c	308;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex20.c	375;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	376;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex20.c	377;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex20.c	416;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	417;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex20.c	418;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	53;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex20.c	54;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	185;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	186;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	203;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	204;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	229;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	230;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	255;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	256;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	288;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	289;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	312;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	313;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	326;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	327;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	354;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	355;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	386;"	d	file:
-__FUNCT__	src/nep/examples/tutorials/ex21.c	387;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	181;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	182;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	199;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	200;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	225;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	226;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	251;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	252;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	284;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	285;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	308;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	309;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	322;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	323;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	350;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	351;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	382;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex21.c	383;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex21.c	65;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex21.c	66;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex22.c	46;"	d	file:
 __FUNCT__	src/nep/examples/tutorials/ex22.c	47;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1003;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1004;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1029;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1030;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	103;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	104;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1065;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1066;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1082;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1083;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1106;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	1107;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	128;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	129;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	154;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	155;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	214;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	215;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	257;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	258;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex27.c	179;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex27.c	180;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex27.c	226;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex27.c	227;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex27.c	43;"	d	file:
+__FUNCT__	src/nep/examples/tutorials/ex27.c	44;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1006;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1007;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	100;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	101;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1032;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1033;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1067;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1068;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1084;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1085;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1108;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	1109;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	126;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	127;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	152;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	153;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	212;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	213;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	255;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	256;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	305;"	d	file:
 __FUNCT__	src/nep/impls/ciss/nciss.c	306;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	307;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	320;"	d	file:
 __FUNCT__	src/nep/impls/ciss/nciss.c	321;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	322;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	364;"	d	file:
 __FUNCT__	src/nep/impls/ciss/nciss.c	365;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	366;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	408;"	d	file:
 __FUNCT__	src/nep/impls/ciss/nciss.c	409;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	410;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	445;"	d	file:
 __FUNCT__	src/nep/impls/ciss/nciss.c	446;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	447;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	510;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	511;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	658;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	659;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	703;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	704;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	752;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	753;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	768;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	769;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	800;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	801;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	80;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	81;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	822;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	823;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	855;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	856;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	867;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	868;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	896;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	897;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	924;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	925;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	960;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	961;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	973;"	d	file:
-__FUNCT__	src/nep/impls/ciss/nciss.c	974;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	112;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	113;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	136;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	137;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	196;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	197;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	212;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	213;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	223;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	224;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	249;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	250;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	260;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	261;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	288;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	289;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	304;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	305;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	332;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	333;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	354;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	355;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	383;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	384;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	399;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	400;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	411;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	412;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	428;"	d	file:
-__FUNCT__	src/nep/impls/interpol/interpol.c	429;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	517;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	518;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	668;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	669;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	713;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	714;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	766;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	767;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	77;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	782;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	783;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	78;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	814;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	815;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	836;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	837;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	869;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	870;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	881;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	882;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	910;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	911;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	932;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	933;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	965;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	966;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	977;"	d	file:
+__FUNCT__	src/nep/impls/ciss/nciss.c	978;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	103;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	104;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	127;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	128;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	187;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	188;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	205;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	206;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	221;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	222;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	232;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	233;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	258;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	259;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	269;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	270;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	297;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	298;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	313;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	314;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	341;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	342;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	364;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	365;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	393;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	394;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	413;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	414;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	425;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	426;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	442;"	d	file:
+__FUNCT__	src/nep/impls/interpol/interpol.c	443;"	d	file:
 __FUNCT__	src/nep/impls/interpol/interpol.c	45;"	d	file:
 __FUNCT__	src/nep/impls/interpol/interpol.c	46;"	d	file:
-__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	170;"	d	file:
-__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	171;"	d	file:
-__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	38;"	d	file:
-__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	39;"	d	file:
-__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	76;"	d	file:
-__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	77;"	d	file:
-__FUNCT__	src/nep/impls/rii/rii.c	166;"	d	file:
-__FUNCT__	src/nep/impls/rii/rii.c	167;"	d	file:
-__FUNCT__	src/nep/impls/rii/rii.c	38;"	d	file:
-__FUNCT__	src/nep/impls/rii/rii.c	39;"	d	file:
-__FUNCT__	src/nep/impls/rii/rii.c	71;"	d	file:
-__FUNCT__	src/nep/impls/rii/rii.c	72;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	149;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	150;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	164;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	165;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	180;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	181;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	208;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	209;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	230;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	231;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	259;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	260;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	274;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	275;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	286;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	287;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	301;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	302;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	181;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	182;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	195;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	196;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	211;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	212;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	239;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	240;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	259;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	260;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	288;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	289;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	307;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	308;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	322;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	323;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	42;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	43;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	57;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	58;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	86;"	d	file:
+__FUNCT__	src/nep/impls/narnoldi/narnoldi.c	87;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1064;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1065;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1095;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1096;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	116;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	117;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1259;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1260;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1271;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1272;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1310;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1311;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1322;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1323;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1351;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1352;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1366;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1367;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1400;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1401;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1411;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1412;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1439;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1440;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1450;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1451;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1486;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1487;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1497;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1498;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1525;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1526;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1549;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1550;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1585;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1586;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1597;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1598;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1626;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1627;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1637;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1638;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1673;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1674;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1684;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1685;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1713;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1714;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1734;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1735;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	176;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1775;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1776;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	177;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1792;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1793;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1825;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1826;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1883;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1884;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1908;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1909;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	192;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1935;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1936;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	193;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1971;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1972;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1991;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	1992;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	2021;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	2022;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	211;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	212;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	230;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	231;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	249;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	250;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	285;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	286;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	305;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	306;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	334;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	335;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	348;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	349;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	377;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	378;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	422;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	423;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	493;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	494;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	578;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	579;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	609;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	610;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	664;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	665;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	721;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	722;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	737;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	738;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	73;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	74;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	790;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	791;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	860;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	861;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	87;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	881;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	882;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	88;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	936;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	937;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	997;"	d	file:
+__FUNCT__	src/nep/impls/nleigs/nleigs.c	998;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	180;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	181;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	203;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	204;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	214;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	215;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	242;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	243;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	253;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	254;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	281;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	282;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	293;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	294;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	329;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	330;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	340;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	341;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	368;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	369;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	379;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	380;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	415;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	416;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	426;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	427;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	454;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	455;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	45;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	46;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	470;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	471;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	498;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	499;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	518;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	519;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	547;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	548;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	573;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	574;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	594;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	595;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	60;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	61;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	84;"	d	file:
+__FUNCT__	src/nep/impls/rii/rii.c	85;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	139;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	140;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	154;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	155;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	170;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	171;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	198;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	199;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	220;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	221;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	249;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	250;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	268;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	269;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	280;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	281;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	295;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	296;"	d	file:
 __FUNCT__	src/nep/impls/slp/slp.c	42;"	d	file:
 __FUNCT__	src/nep/impls/slp/slp.c	43;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	85;"	d	file:
-__FUNCT__	src/nep/impls/slp/slp.c	86;"	d	file:
-__FUNCT__	src/nep/interface/dlregisnep.c	105;"	d	file:
-__FUNCT__	src/nep/interface/dlregisnep.c	106;"	d	file:
-__FUNCT__	src/nep/interface/dlregisnep.c	31;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	76;"	d	file:
+__FUNCT__	src/nep/impls/slp/slp.c	77;"	d	file:
+__FUNCT__	src/nep/interface/dlregisnep.c	107;"	d	file:
+__FUNCT__	src/nep/interface/dlregisnep.c	108;"	d	file:
 __FUNCT__	src/nep/interface/dlregisnep.c	32;"	d	file:
-__FUNCT__	src/nep/interface/dlregisnep.c	52;"	d	file:
+__FUNCT__	src/nep/interface/dlregisnep.c	33;"	d	file:
 __FUNCT__	src/nep/interface/dlregisnep.c	53;"	d	file:
-__FUNCT__	src/nep/interface/ftn-custom/znepf.c	104;"	d	file:
-__FUNCT__	src/nep/interface/ftn-custom/znepf.c	105;"	d	file:
-__FUNCT__	src/nep/interface/ftn-custom/znepf.c	97;"	d	file:
-__FUNCT__	src/nep/interface/ftn-custom/znepf.c	98;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	127;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	128;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	181;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	182;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	207;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	208;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	244;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	245;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	290;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	291;"	d	file:
+__FUNCT__	src/nep/interface/dlregisnep.c	54;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	112;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	113;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	119;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	120;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	127;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	128;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	134;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	135;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	142;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	143;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	149;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	150;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	157;"	d	file:
+__FUNCT__	src/nep/interface/ftn-custom/znepf.c	158;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	124;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	125;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	178;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	179;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	204;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	205;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	241;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	242;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	267;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	268;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	305;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	306;"	d	file:
 __FUNCT__	src/nep/interface/nepbasic.c	31;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	329;"	d	file:
 __FUNCT__	src/nep/interface/nepbasic.c	32;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	330;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	363;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	364;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	396;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	397;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	430;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	431;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	463;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	464;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	497;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	498;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	530;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	531;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	564;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	565;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	601;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	602;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	636;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	637;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	665;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	666;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	713;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	714;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	745;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	746;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	785;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	786;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	815;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	816;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	894;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	895;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	924;"	d	file:
-__FUNCT__	src/nep/interface/nepbasic.c	925;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	342;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	343;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	376;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	377;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	409;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	410;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	443;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	444;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	476;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	477;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	510;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	511;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	543;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	544;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	586;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	587;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	621;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	622;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	650;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	651;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	703;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	704;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	736;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	737;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	781;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	782;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	812;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	813;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	884;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	885;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	915;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	916;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	944;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	945;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	989;"	d	file:
+__FUNCT__	src/nep/interface/nepbasic.c	990;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	110;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	111;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	122;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	123;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	153;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	154;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	203;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	204;"	d	file:
 __FUNCT__	src/nep/interface/nepdefault.c	26;"	d	file:
 __FUNCT__	src/nep/interface/nepdefault.c	27;"	d	file:
 __FUNCT__	src/nep/interface/nepdefault.c	60;"	d	file:
 __FUNCT__	src/nep/interface/nepdefault.c	61;"	d	file:
-__FUNCT__	src/nep/interface/nepdefault.c	93;"	d	file:
-__FUNCT__	src/nep/interface/nepdefault.c	94;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	104;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	95;"	d	file:
+__FUNCT__	src/nep/interface/nepdefault.c	96;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	105;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	139;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	106;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	140;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	165;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	141;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	166;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	210;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	211;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	251;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	252;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	167;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	222;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	223;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	276;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	277;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	27;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	28;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	305;"	d	file:
-__FUNCT__	src/nep/interface/nepmon.c	306;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	335;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	336;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	381;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	382;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	407;"	d	file:
+__FUNCT__	src/nep/interface/nepmon.c	408;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	44;"	d	file:
 __FUNCT__	src/nep/interface/nepmon.c	45;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	207;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	208;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	245;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	246;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	27;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	1028;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	1029;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	106;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	1072;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	1073;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	107;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	1108;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	1109;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	271;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	272;"	d	file:
 __FUNCT__	src/nep/interface/nepopts.c	28;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	319;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	320;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	352;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	353;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	413;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	414;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	487;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	488;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	517;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	518;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	552;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	553;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	578;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	579;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	612;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	613;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	638;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	639;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	684;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	685;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	717;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	718;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	744;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	745;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	825;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	826;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	860;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	861;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	907;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	908;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	946;"	d	file:
-__FUNCT__	src/nep/interface/nepopts.c	947;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	105;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	106;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	140;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	141;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	166;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	167;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	274;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	275;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	37;"	d	file:
-__FUNCT__	src/nep/interface/neprefine.c	38;"	d	file:
-__FUNCT__	src/nep/interface/nepregis.c	30;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	29;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	302;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	303;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	349;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	350;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	382;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	383;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	443;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	444;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	527;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	528;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	557;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	558;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	600;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	601;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	651;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	652;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	696;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	697;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	69;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	70;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	723;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	724;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	775;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	776;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	815;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	816;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	842;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	843;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	875;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	876;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	902;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	903;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	991;"	d	file:
+__FUNCT__	src/nep/interface/nepopts.c	992;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	145;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	146;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	188;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	189;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	214;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	215;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	391;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	392;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	43;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	44;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	60;"	d	file:
+__FUNCT__	src/nep/interface/neprefine.c	61;"	d	file:
 __FUNCT__	src/nep/interface/nepregis.c	31;"	d	file:
-__FUNCT__	src/nep/interface/nepsetup.c	176;"	d	file:
-__FUNCT__	src/nep/interface/nepsetup.c	177;"	d	file:
-__FUNCT__	src/nep/interface/nepsetup.c	217;"	d	file:
-__FUNCT__	src/nep/interface/nepsetup.c	218;"	d	file:
+__FUNCT__	src/nep/interface/nepregis.c	32;"	d	file:
+__FUNCT__	src/nep/interface/nepsetup.c	220;"	d	file:
+__FUNCT__	src/nep/interface/nepsetup.c	221;"	d	file:
+__FUNCT__	src/nep/interface/nepsetup.c	261;"	d	file:
+__FUNCT__	src/nep/interface/nepsetup.c	262;"	d	file:
 __FUNCT__	src/nep/interface/nepsetup.c	26;"	d	file:
 __FUNCT__	src/nep/interface/nepsetup.c	27;"	d	file:
+__FUNCT__	src/nep/interface/nepsetup.c	285;"	d	file:
+__FUNCT__	src/nep/interface/nepsetup.c	286;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	119;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	120;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	121;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	166;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	167;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	221;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	222;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	275;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	276;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	224;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	225;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	27;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	280;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	281;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	28;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	310;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	311;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	340;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	341;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	381;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	382;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	464;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	465;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	315;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	316;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	345;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	346;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	383;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	384;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	466;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	467;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	48;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	498;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	499;"	d	file:
 __FUNCT__	src/nep/interface/nepsolve.c	49;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	521;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	522;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	591;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	592;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	651;"	d	file:
-__FUNCT__	src/nep/interface/nepsolve.c	652;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	162;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	163;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	199;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	200;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	234;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	235;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	500;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	501;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	524;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	525;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	622;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	623;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	684;"	d	file:
+__FUNCT__	src/nep/interface/nepsolve.c	685;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	190;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	191;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	227;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	228;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	262;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	263;"	d	file:
 __FUNCT__	src/nep/interface/nepview.c	27;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	284;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	285;"	d	file:
 __FUNCT__	src/nep/interface/nepview.c	28;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	326;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	327;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	346;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	347;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	406;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	407;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	448;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	449;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	480;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	481;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	511;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	512;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	542;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	543;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	594;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	595;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	629;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	630;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	682;"	d	file:
-__FUNCT__	src/nep/interface/nepview.c	683;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	317;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	318;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	362;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	363;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	382;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	383;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	443;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	444;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	492;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	493;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	525;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	526;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	556;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	557;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	587;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	588;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	639;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	640;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	674;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	675;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	727;"	d	file:
+__FUNCT__	src/nep/interface/nepview.c	728;"	d	file:
 __FUNCT__	src/pep/examples/nlevp/acoustic_wave_1d.c	42;"	d	file:
 __FUNCT__	src/pep/examples/nlevp/acoustic_wave_1d.c	43;"	d	file:
 __FUNCT__	src/pep/examples/nlevp/acoustic_wave_2d.c	40;"	d	file:
@@ -6000,48 +6724,76 @@ __FUNCT__	src/pep/examples/tests/test1.c	31;"	d	file:
 __FUNCT__	src/pep/examples/tests/test1.c	32;"	d	file:
 __FUNCT__	src/pep/examples/tests/test2.c	41;"	d	file:
 __FUNCT__	src/pep/examples/tests/test2.c	42;"	d	file:
+__FUNCT__	src/pep/examples/tests/test3.c	26;"	d	file:
+__FUNCT__	src/pep/examples/tests/test3.c	27;"	d	file:
 __FUNCT__	src/pep/examples/tutorials/ex16.c	29;"	d	file:
 __FUNCT__	src/pep/examples/tutorials/ex16.c	30;"	d	file:
 __FUNCT__	src/pep/examples/tutorials/ex17.c	30;"	d	file:
 __FUNCT__	src/pep/examples/tutorials/ex17.c	31;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	110;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	111;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	162;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	163;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	212;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	213;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	223;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	224;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	237;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	238;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	248;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	249;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	262;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	263;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	38;"	d	file:
+__FUNCT__	src/pep/examples/tutorials/ex28.c	39;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	1034;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	1035;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	1059;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	1060;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	1072;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	1073;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	131;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjd.c	132;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	133;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	159;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	160;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	304;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	305;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	336;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	337;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	352;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	353;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	367;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	368;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	201;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	202;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	261;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	262;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	323;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	324;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	350;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	351;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	392;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	393;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	468;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	469;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjd.c	47;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjd.c	48;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	88;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjd.c	89;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	101;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	102;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	504;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	505;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	583;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	584;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	628;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	629;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	697;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	698;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	725;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	726;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	763;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	764;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	82;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	83;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	847;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjd.c	848;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	115;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	116;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjdopt.c	133;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjdopt.c	134;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	148;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	149;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	182;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	183;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	193;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	194;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	221;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	222;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	250;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	251;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjdopt.c	27;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjdopt.c	28;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	52;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	53;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	42;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	43;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	76;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	77;"	d	file:
+__FUNCT__	src/pep/impls/jd/pjdopt.c	87;"	d	file:
 __FUNCT__	src/pep/impls/jd/pjdopt.c	88;"	d	file:
-__FUNCT__	src/pep/impls/jd/pjdopt.c	89;"	d	file:
 __FUNCT__	src/pep/impls/krylov/pepkrylov.c	196;"	d	file:
 __FUNCT__	src/pep/impls/krylov/pepkrylov.c	197;"	d	file:
 __FUNCT__	src/pep/impls/krylov/pepkrylov.c	28;"	d	file:
@@ -6052,156 +6804,156 @@ __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	173;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	174;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	251;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	252;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	351;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	352;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	353;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	366;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	367;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	368;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	400;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	401;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	402;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	411;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	412;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	413;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	439;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	440;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	441;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	450;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	451;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	452;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	45;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	46;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	488;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	489;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	490;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	499;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	500;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	501;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	527;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	528;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	529;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	549;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	550;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	551;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	566;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	567;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	568;"	d	file:
+__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	581;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	582;"	d	file:
-__FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	583;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	98;"	d	file:
 __FUNCT__	src/pep/impls/krylov/qarnoldi/qarnoldi.c	99;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	112;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	113;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	186;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	187;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	234;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	235;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	313;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	121;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	122;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	191;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	192;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	239;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	240;"	d	file:
 __FUNCT__	src/pep/impls/krylov/stoar/stoar.c	314;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	393;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	394;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	41;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	42;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	460;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	461;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	602;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	603;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	619;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	620;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	630;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	631;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	666;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	667;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	677;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	678;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	705;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	706;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	721;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	722;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	72;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	734;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	735;"	d	file:
-__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	73;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1083;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1084;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1111;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1112;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	135;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	136;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	189;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	190;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	229;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	230;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	326;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	327;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	366;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	367;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	521;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	522;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	52;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	53;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	566;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	567;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	627;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	628;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	707;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	708;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	772;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	315;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	390;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	391;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	453;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	454;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	54;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	55;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	594;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	595;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	611;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	612;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	622;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	623;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	658;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	659;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	669;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	670;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	697;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	698;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	713;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	714;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	726;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	727;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	85;"	d	file:
+__FUNCT__	src/pep/impls/krylov/stoar/stoar.c	86;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1040;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1041;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1103;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1104;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1320;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1321;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1411;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1412;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	142;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	143;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1443;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	1444;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	250;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	251;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	288;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	289;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	379;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	380;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	447;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	448;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	580;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	581;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	62;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	63;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	727;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	728;"	d	file:
 __FUNCT__	src/pep/impls/krylov/toar/nrefine.c	773;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	831;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	832;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	85;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	86;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	994;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	995;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1031;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1032;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1042;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1043;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	774;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	885;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	886;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	92;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	93;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	976;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/nrefine.c	977;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1022;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1023;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1033;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1034;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1069;"	d	file:
 __FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1070;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1071;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1080;"	d	file:
 __FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1081;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1082;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1117;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1118;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1128;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1129;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1156;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1157;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1178;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1179;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1195;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1196;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1210;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1211;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	133;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	134;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	190;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	191;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	277;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	278;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	306;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	307;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	369;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	370;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	43;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	44;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	517;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	518;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	552;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	553;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	588;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	589;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	59;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	60;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	762;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	763;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	798;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	799;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	982;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1108;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1109;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1130;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1131;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1147;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1148;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1162;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	1163;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	147;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	148;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	200;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	201;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	286;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	287;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	315;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	316;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	372;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	373;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	519;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	520;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	550;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	551;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	57;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	584;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	585;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	58;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	73;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	74;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	760;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	761;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	934;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	935;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	949;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	950;"	d	file:
 __FUNCT__	src/pep/impls/krylov/toar/ptoar.c	983;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	997;"	d	file:
-__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	998;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1016;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	984;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	994;"	d	file:
+__FUNCT__	src/pep/impls/krylov/toar/ptoar.c	995;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	1017;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1045;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1018;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	1046;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1062;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1063;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1082;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1083;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1101;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	1102;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1047;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1067;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1068;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1087;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1088;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1106;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	1107;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	111;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	112;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	227;"	d	file:
@@ -6212,42 +6964,42 @@ __FUNCT__	src/pep/impls/linear/linear.c	255;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	256;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	27;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	28;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	449;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	450;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	549;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	451;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	550;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	602;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	551;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	603;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	667;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	604;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	668;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	691;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	669;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	692;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	736;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	693;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	737;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	757;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	738;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	758;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	782;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	759;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	783;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	798;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	784;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	799;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	828;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	800;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	829;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	839;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	830;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	840;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	868;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	841;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	869;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	879;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	870;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	880;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	909;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	881;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	910;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	920;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	911;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	921;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	949;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	922;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	950;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	965;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	951;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	966;"	d	file:
-__FUNCT__	src/pep/impls/linear/linear.c	993;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	967;"	d	file:
 __FUNCT__	src/pep/impls/linear/linear.c	994;"	d	file:
+__FUNCT__	src/pep/impls/linear/linear.c	995;"	d	file:
 __FUNCT__	src/pep/impls/linear/qeplin.c	114;"	d	file:
 __FUNCT__	src/pep/impls/linear/qeplin.c	115;"	d	file:
 __FUNCT__	src/pep/impls/linear/qeplin.c	140;"	d	file:
@@ -6272,22 +7024,26 @@ __FUNCT__	src/pep/impls/linear/qeplin.c	60;"	d	file:
 __FUNCT__	src/pep/impls/linear/qeplin.c	61;"	d	file:
 __FUNCT__	src/pep/impls/linear/qeplin.c	86;"	d	file:
 __FUNCT__	src/pep/impls/linear/qeplin.c	87;"	d	file:
-__FUNCT__	src/pep/interface/dlregispep.c	106;"	d	file:
 __FUNCT__	src/pep/interface/dlregispep.c	107;"	d	file:
-__FUNCT__	src/pep/interface/dlregispep.c	34;"	d	file:
+__FUNCT__	src/pep/interface/dlregispep.c	108;"	d	file:
 __FUNCT__	src/pep/interface/dlregispep.c	35;"	d	file:
-__FUNCT__	src/pep/interface/dlregispep.c	55;"	d	file:
+__FUNCT__	src/pep/interface/dlregispep.c	36;"	d	file:
 __FUNCT__	src/pep/interface/dlregispep.c	56;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	110;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	111;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	117;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	118;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	125;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	126;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	132;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	133;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	140;"	d	file:
-__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	141;"	d	file:
+__FUNCT__	src/pep/interface/dlregispep.c	57;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	112;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	113;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	119;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	120;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	127;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	128;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	134;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	135;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	142;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	143;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	149;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	150;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	157;"	d	file:
+__FUNCT__	src/pep/interface/ftn-custom/zpepf.c	158;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	131;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	132;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	186;"	d	file:
@@ -6300,54 +7056,52 @@ __FUNCT__	src/pep/interface/pepbasic.c	295;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	296;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	31;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	32;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	333;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	334;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	335;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	367;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	368;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	369;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	400;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	401;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	402;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	434;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	435;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	436;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	467;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	468;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	469;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	501;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	502;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	503;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	534;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	535;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	536;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	568;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	569;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	570;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	601;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	602;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	603;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	644;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	645;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	646;"	d	file:
+__FUNCT__	src/pep/interface/pepbasic.c	683;"	d	file:
 __FUNCT__	src/pep/interface/pepbasic.c	684;"	d	file:
-__FUNCT__	src/pep/interface/pepbasic.c	685;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	126;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	127;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	138;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	139;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	149;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	150;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	193;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	194;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	246;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	247;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	104;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	105;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	116;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	117;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	166;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	167;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	177;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	178;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	221;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	222;"	d	file:
 __FUNCT__	src/pep/interface/pepdefault.c	26;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	273;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	274;"	d	file:
 __FUNCT__	src/pep/interface/pepdefault.c	27;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	398;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	399;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	457;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	458;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	508;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	509;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	564;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	565;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	425;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	426;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	484;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	485;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	540;"	d	file:
+__FUNCT__	src/pep/interface/pepdefault.c	541;"	d	file:
 __FUNCT__	src/pep/interface/pepdefault.c	60;"	d	file:
 __FUNCT__	src/pep/interface/pepdefault.c	61;"	d	file:
 __FUNCT__	src/pep/interface/pepdefault.c	75;"	d	file:
 __FUNCT__	src/pep/interface/pepdefault.c	76;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	97;"	d	file:
-__FUNCT__	src/pep/interface/pepdefault.c	98;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	104;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	105;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	139;"	d	file:
@@ -6356,148 +7110,162 @@ __FUNCT__	src/pep/interface/pepmon.c	165;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	166;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	187;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	188;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	237;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	238;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	246;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	247;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	27;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	283;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	284;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	28;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	342;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	343;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	372;"	d	file:
-__FUNCT__	src/pep/interface/pepmon.c	373;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	303;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	304;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	365;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	366;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	411;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	412;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	437;"	d	file:
+__FUNCT__	src/pep/interface/pepmon.c	438;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	44;"	d	file:
 __FUNCT__	src/pep/interface/pepmon.c	45;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1002;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1003;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1028;"	d	file:
 __FUNCT__	src/pep/interface/pepopts.c	1029;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1030;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1054;"	d	file:
 __FUNCT__	src/pep/interface/pepopts.c	1055;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1056;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	106;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	107;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1146;"	d	file:
 __FUNCT__	src/pep/interface/pepopts.c	1147;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1148;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1184;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1185;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1230;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1231;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1276;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	1277;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	227;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	228;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	258;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	259;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	27;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1188;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1189;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1215;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1216;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1240;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1241;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1333;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1334;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1370;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1371;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1416;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1417;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1462;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	1463;"	d	file:
 __FUNCT__	src/pep/interface/pepopts.c	28;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	305;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	306;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	338;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	339;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	399;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	400;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	480;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	481;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	510;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	511;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	553;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	554;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	594;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	595;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	620;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	295;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	296;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	29;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	326;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	327;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	373;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	374;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	406;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	407;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	467;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	468;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	548;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	549;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	578;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	579;"	d	file:
 __FUNCT__	src/pep/interface/pepopts.c	621;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	655;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	656;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	681;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	682;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	714;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	715;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	741;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	742;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	794;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	795;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	842;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	843;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	869;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	870;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	960;"	d	file:
-__FUNCT__	src/pep/interface/pepopts.c	961;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	125;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	126;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	151;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	152;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	172;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	173;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	276;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	277;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	35;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	36;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	90;"	d	file:
-__FUNCT__	src/pep/interface/peprefine.c	91;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	622;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	665;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	666;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	691;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	692;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	69;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	70;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	726;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	727;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	752;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	753;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	785;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	786;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	812;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	813;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	863;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	864;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	909;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	910;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	936;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	937;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	988;"	d	file:
+__FUNCT__	src/pep/interface/pepopts.c	989;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	135;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	136;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	178;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	179;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	204;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	205;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	225;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	226;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	396;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	397;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	41;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	42;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	58;"	d	file:
+__FUNCT__	src/pep/interface/peprefine.c	59;"	d	file:
 __FUNCT__	src/pep/interface/pepregis.c	30;"	d	file:
 __FUNCT__	src/pep/interface/pepregis.c	31;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	206;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	207;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	260;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	261;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	233;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	234;"	d	file:
 __FUNCT__	src/pep/interface/pepsetup.c	26;"	d	file:
 __FUNCT__	src/pep/interface/pepsetup.c	27;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	287;"	d	file:
 __FUNCT__	src/pep/interface/pepsetup.c	288;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	289;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	314;"	d	file:
 __FUNCT__	src/pep/interface/pepsetup.c	315;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	355;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	356;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	389;"	d	file:
-__FUNCT__	src/pep/interface/pepsetup.c	390;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	316;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	341;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	342;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	382;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	383;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	416;"	d	file:
+__FUNCT__	src/pep/interface/pepsetup.c	417;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	176;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	177;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	211;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	212;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	241;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	242;"	d	file:
-__FUNCT__	src/pep/interface/pepsolve.c	278;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	279;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	27;"	d	file:
+__FUNCT__	src/pep/interface/pepsolve.c	280;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	28;"	d	file:
-__FUNCT__	src/pep/interface/pepsolve.c	361;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	362;"	d	file:
-__FUNCT__	src/pep/interface/pepsolve.c	396;"	d	file:
+__FUNCT__	src/pep/interface/pepsolve.c	363;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	397;"	d	file:
-__FUNCT__	src/pep/interface/pepsolve.c	482;"	d	file:
+__FUNCT__	src/pep/interface/pepsolve.c	398;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	483;"	d	file:
+__FUNCT__	src/pep/interface/pepsolve.c	484;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	48;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	49;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	68;"	d	file:
 __FUNCT__	src/pep/interface/pepsolve.c	69;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	221;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	222;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	258;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	259;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	215;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	216;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	252;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	253;"	d	file:
 __FUNCT__	src/pep/interface/pepview.c	27;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	287;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	288;"	d	file:
 __FUNCT__	src/pep/interface/pepview.c	28;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	293;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	294;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	343;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	344;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	388;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	389;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	408;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	409;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	469;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	470;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	518;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	519;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	550;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	551;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	581;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	582;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	612;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	613;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	664;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	665;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	699;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	700;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	752;"	d	file:
-__FUNCT__	src/pep/interface/pepview.c	753;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	337;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	338;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	382;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	383;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	402;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	403;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	463;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	464;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	512;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	513;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	545;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	546;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	576;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	577;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	607;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	608;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	659;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	660;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	694;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	695;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	747;"	d	file:
+__FUNCT__	src/pep/interface/pepview.c	748;"	d	file:
 __FUNCT__	src/svd/examples/tests/test1.c	45;"	d	file:
 __FUNCT__	src/svd/examples/tests/test1.c	46;"	d	file:
 __FUNCT__	src/svd/examples/tests/test2.c	27;"	d	file:
@@ -6510,66 +7278,68 @@ __FUNCT__	src/svd/examples/tutorials/ex15.c	29;"	d	file:
 __FUNCT__	src/svd/examples/tutorials/ex15.c	30;"	d	file:
 __FUNCT__	src/svd/examples/tutorials/ex8.c	45;"	d	file:
 __FUNCT__	src/svd/examples/tutorials/ex8.c	46;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	102;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	103;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	145;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	146;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	170;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	171;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	190;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	191;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	205;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	206;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	122;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	123;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	175;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	176;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	200;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	201;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	220;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	221;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	222;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	249;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	250;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	273;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	274;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	302;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	235;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	236;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	251;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	252;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	279;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	280;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	303;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	317;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	318;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	304;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	332;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	333;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	347;"	d	file:
-__FUNCT__	src/svd/impls/cross/cross.c	348;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	351;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	352;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	366;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	367;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	36;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	37;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	381;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	382;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	52;"	d	file:
 __FUNCT__	src/svd/impls/cross/cross.c	53;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	196;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	197;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	243;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	244;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	269;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	270;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	295;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	296;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	70;"	d	file:
+__FUNCT__	src/svd/impls/cross/cross.c	71;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	207;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	208;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	254;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	255;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	280;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	281;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	306;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	307;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	336;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	337;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	317;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	318;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	347;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	348;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	375;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	376;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	358;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	359;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	37;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	386;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	387;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	38;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	391;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	392;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	419;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	420;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	440;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	441;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	469;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	470;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	485;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	486;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	502;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	503;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	519;"	d	file:
-__FUNCT__	src/svd/impls/cyclic/cyclic.c	520;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	402;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	403;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	430;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	431;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	451;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	452;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	480;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	481;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	500;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	501;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	517;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	518;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	534;"	d	file:
+__FUNCT__	src/svd/impls/cyclic/cyclic.c	535;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	69;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	70;"	d	file:
 __FUNCT__	src/svd/impls/cyclic/cyclic.c	80;"	d	file:
@@ -6578,146 +7348,178 @@ __FUNCT__	src/svd/impls/lanczos/gklanczos.c	113;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	114;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	178;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	179;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	283;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	284;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	285;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	301;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	302;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	303;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	315;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	316;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	317;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	351;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	352;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	353;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	381;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	382;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	362;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	363;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	391;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	392;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	393;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	404;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	405;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	406;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	417;"	d	file:
-__FUNCT__	src/svd/impls/lanczos/gklanczos.c	418;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	420;"	d	file:
+__FUNCT__	src/svd/impls/lanczos/gklanczos.c	421;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	48;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	49;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	69;"	d	file:
 __FUNCT__	src/svd/impls/lanczos/gklanczos.c	70;"	d	file:
-__FUNCT__	src/svd/impls/lapack/svdlapack.c	108;"	d	file:
 __FUNCT__	src/svd/impls/lapack/svdlapack.c	109;"	d	file:
+__FUNCT__	src/svd/impls/lapack/svdlapack.c	110;"	d	file:
 __FUNCT__	src/svd/impls/lapack/svdlapack.c	26;"	d	file:
 __FUNCT__	src/svd/impls/lapack/svdlapack.c	27;"	d	file:
-__FUNCT__	src/svd/impls/lapack/svdlapack.c	45;"	d	file:
 __FUNCT__	src/svd/impls/lapack/svdlapack.c	46;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	124;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	125;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	170;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	171;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	268;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	269;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	386;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	387;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	404;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	405;"	d	file:
+__FUNCT__	src/svd/impls/lapack/svdlapack.c	47;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	135;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	136;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	181;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	182;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	279;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	280;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	397;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	398;"	d	file:
 __FUNCT__	src/svd/impls/trlanczos/trlanczos.c	415;"	d	file:
 __FUNCT__	src/svd/impls/trlanczos/trlanczos.c	416;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	450;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	451;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	479;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	480;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	48;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	490;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	491;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	49;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	503;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	504;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	426;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	427;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	461;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	462;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	472;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	473;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	501;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	502;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	514;"	d	file:
 __FUNCT__	src/svd/impls/trlanczos/trlanczos.c	515;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	516;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	68;"	d	file:
-__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	69;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	530;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	531;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	59;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	60;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	79;"	d	file:
+__FUNCT__	src/svd/impls/trlanczos/trlanczos.c	80;"	d	file:
 __FUNCT__	src/svd/interface/dlregissvd.c	101;"	d	file:
 __FUNCT__	src/svd/interface/dlregissvd.c	102;"	d	file:
 __FUNCT__	src/svd/interface/dlregissvd.c	30;"	d	file:
 __FUNCT__	src/svd/interface/dlregissvd.c	31;"	d	file:
 __FUNCT__	src/svd/interface/dlregissvd.c	51;"	d	file:
 __FUNCT__	src/svd/interface/dlregissvd.c	52;"	d	file:
-__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	104;"	d	file:
-__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	105;"	d	file:
-__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	97;"	d	file:
-__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	98;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	103;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	104;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	140;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	141;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	175;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	176;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	230;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	231;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	256;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	257;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	293;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	294;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	109;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	110;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	116;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	117;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	124;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	125;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	131;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	132;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	139;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	140;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	146;"	d	file:
+__FUNCT__	src/svd/interface/ftn-custom/zsvdf.c	147;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	107;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	108;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	144;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	145;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	178;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	179;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	233;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	234;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	259;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	260;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	296;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	297;"	d	file:
 __FUNCT__	src/svd/interface/svdbasic.c	31;"	d	file:
 __FUNCT__	src/svd/interface/svdbasic.c	32;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	338;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	339;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	380;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	381;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	414;"	d	file:
-__FUNCT__	src/svd/interface/svdbasic.c	415;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	341;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	342;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	383;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	384;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	417;"	d	file:
+__FUNCT__	src/svd/interface/svdbasic.c	418;"	d	file:
+__FUNCT__	src/svd/interface/svddefault.c	26;"	d	file:
+__FUNCT__	src/svd/interface/svddefault.c	27;"	d	file:
+__FUNCT__	src/svd/interface/svddefault.c	38;"	d	file:
+__FUNCT__	src/svd/interface/svddefault.c	39;"	d	file:
+__FUNCT__	src/svd/interface/svddefault.c	50;"	d	file:
+__FUNCT__	src/svd/interface/svddefault.c	51;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	102;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	103;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	137;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	138;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	163;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	164;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	203;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	204;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	239;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	240;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	212;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	213;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	259;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	260;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	27;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	287;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	288;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	28;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	332;"	d	file:
-__FUNCT__	src/svd/interface/svdmon.c	333;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	310;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	311;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	356;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	357;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	382;"	d	file:
+__FUNCT__	src/svd/interface/svdmon.c	383;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	44;"	d	file:
 __FUNCT__	src/svd/interface/svdmon.c	45;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	142;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	143;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	173;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	144;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	174;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	234;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	175;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	235;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	267;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	236;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	268;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	26;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	269;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	27;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	314;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	28;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	315;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	344;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	316;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	345;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	473;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	474;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	507;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	508;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	535;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	536;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	591;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	592;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	639;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	640;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	67;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	346;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	394;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	395;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	437;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	438;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	464;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	465;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	516;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	517;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	556;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	557;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	583;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	584;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	624;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	625;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	661;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	662;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	68;"	d	file:
-__FUNCT__	src/svd/interface/svdopts.c	94;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	69;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	790;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	791;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	824;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	825;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	852;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	853;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	908;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	909;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	956;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	957;"	d	file:
 __FUNCT__	src/svd/interface/svdopts.c	95;"	d	file:
+__FUNCT__	src/svd/interface/svdopts.c	96;"	d	file:
 __FUNCT__	src/svd/interface/svdregis.c	30;"	d	file:
 __FUNCT__	src/svd/interface/svdregis.c	31;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	217;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	218;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	261;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	262;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	214;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	215;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	258;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	259;"	d	file:
 __FUNCT__	src/svd/interface/svdsetup.c	26;"	d	file:
 __FUNCT__	src/svd/interface/svdsetup.c	27;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	305;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	306;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	333;"	d	file:
-__FUNCT__	src/svd/interface/svdsetup.c	334;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	302;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	303;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	330;"	d	file:
+__FUNCT__	src/svd/interface/svdsetup.c	331;"	d	file:
 __FUNCT__	src/svd/interface/svdsetup.c	56;"	d	file:
 __FUNCT__	src/svd/interface/svdsetup.c	57;"	d	file:
 __FUNCT__	src/svd/interface/svdsetup.c	82;"	d	file:
@@ -6726,54 +7528,56 @@ __FUNCT__	src/svd/interface/svdsolve.c	137;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	138;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	172;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	173;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	208;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	209;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	237;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	238;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	210;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	211;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	239;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	240;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	26;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	27;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	294;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	295;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	345;"	d	file:
-__FUNCT__	src/svd/interface/svdsolve.c	346;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	296;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	297;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	347;"	d	file:
+__FUNCT__	src/svd/interface/svdsolve.c	348;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	64;"	d	file:
 __FUNCT__	src/svd/interface/svdsolve.c	65;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	109;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	110;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	146;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	147;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	181;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	182;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	217;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	218;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	247;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	248;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	267;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	268;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	120;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	121;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	157;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	158;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	192;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	193;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	228;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	229;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	258;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	259;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	278;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	279;"	d	file:
 __FUNCT__	src/svd/interface/svdview.c	27;"	d	file:
 __FUNCT__	src/svd/interface/svdview.c	28;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	327;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	328;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	369;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	370;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	394;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	395;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	410;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	411;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	428;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	429;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	480;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	481;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	515;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	516;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	568;"	d	file:
-__FUNCT__	src/svd/interface/svdview.c	569;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	338;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	339;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	380;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	381;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	406;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	407;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	422;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	423;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	440;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	441;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	492;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	493;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	527;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	528;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	580;"	d	file:
+__FUNCT__	src/svd/interface/svdview.c	581;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test1.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test1.c	27;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test10.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test10.c	27;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test11.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test11.c	27;"	d	file:
+__FUNCT__	src/sys/classes/bv/examples/tests/test12.c	26;"	d	file:
+__FUNCT__	src/sys/classes/bv/examples/tests/test12.c	27;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test2.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test2.c	27;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test3.c	26;"	d	file:
@@ -6790,200 +7594,220 @@ __FUNCT__	src/sys/classes/bv/examples/tests/test8.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test8.c	27;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test9.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/examples/tests/test9.c	27;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	110;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	111;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	127;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	128;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	147;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	148;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	167;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	168;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	183;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	184;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	199;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	200;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	215;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	216;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	230;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	231;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	271;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	272;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	286;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	287;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	326;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	327;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	102;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	103;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	119;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	120;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	139;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	140;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	159;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	160;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	175;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	176;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	191;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	192;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	207;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	208;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	222;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	223;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	263;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	264;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	278;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	279;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	318;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	319;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	32;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	339;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	331;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	332;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	33;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	340;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	350;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	351;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	364;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	365;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	49;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	50;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	64;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	65;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	81;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	82;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	98;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	99;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	107;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	108;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	124;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	125;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	145;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	146;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	168;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	169;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	190;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	191;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	209;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	210;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	228;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	229;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	247;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	248;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	264;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	265;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	313;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	314;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	342;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	343;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	353;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	354;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	367;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	368;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	53;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	54;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	68;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	69;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	85;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/contiguous/contig.c	86;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	111;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	112;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	132;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	133;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	155;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	156;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	177;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	178;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	196;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	197;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	215;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	216;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	234;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	235;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	251;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	252;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	300;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	301;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	319;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	31;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	320;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	32;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	332;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	333;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	363;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	364;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	379;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	380;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	350;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	351;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	366;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	367;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	382;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	383;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	394;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	395;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	396;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	406;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	407;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	408;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	418;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	419;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	420;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	446;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	447;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	461;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	462;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	52;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	53;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	69;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	70;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	88;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	89;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	108;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	109;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	125;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	126;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	147;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	148;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	169;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	170;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	191;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	192;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	210;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	211;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	229;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	230;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	248;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	249;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	265;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	266;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	314;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	315;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	430;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	431;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	457;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	458;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	472;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	473;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	56;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	57;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	73;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	74;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	92;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/mat/bvmat.c	93;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	112;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	113;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	134;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	135;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	156;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	157;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	178;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	179;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	197;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	198;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	216;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	217;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	235;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	236;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	252;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	253;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	301;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	302;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/svec/svec.c	31;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	320;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	321;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/svec/svec.c	32;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	333;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	334;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	367;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	368;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	383;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	384;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	354;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	355;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	370;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	371;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	385;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	386;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	397;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/svec/svec.c	398;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	399;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	409;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/svec/svec.c	410;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	411;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	421;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/svec/svec.c	422;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	423;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	449;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	450;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	464;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	465;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	53;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	54;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	70;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	71;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	89;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	90;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	118;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	119;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	148;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	149;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	178;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	179;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	193;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	194;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	212;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	213;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	229;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	230;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	246;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	247;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	258;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	259;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	277;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	278;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	306;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	307;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	325;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	326;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	433;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	434;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	460;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	461;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	475;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	476;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	57;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	58;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	74;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	75;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	93;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/svec/svec.c	94;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	125;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	126;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	155;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	156;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	185;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	186;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	204;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	205;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	221;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	222;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	238;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	239;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	250;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	251;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	269;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	270;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	298;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	299;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	317;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	318;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	336;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	337;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	33;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	344;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	345;"	d	file:
 __FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	34;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	360;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	361;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	375;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	376;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	404;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	405;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	417;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	418;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	436;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	437;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	455;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	456;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	470;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	471;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	501;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	502;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	514;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	515;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	60;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	61;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	82;"	d	file:
-__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	83;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	352;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	353;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	367;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	368;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	396;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	397;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	409;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	410;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	428;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	429;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	447;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	448;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	466;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	467;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	477;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	478;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	492;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	493;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	523;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	524;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	536;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	537;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	553;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	554;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	565;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	566;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	67;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	68;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	89;"	d	file:
+__FUNCT__	src/sys/classes/bv/impls/vecs/vecs.c	90;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	102;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1031;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1032;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	103;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1048;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1049;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1101;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1102;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1139;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1140;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1174;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1175;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1205;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1206;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1249;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1250;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1291;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1292;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1341;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1342;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1388;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1389;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1057;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1058;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1111;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1112;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1164;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1165;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1202;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1203;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1237;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1238;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1275;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1276;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1306;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1307;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1337;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1338;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1354;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1355;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1393;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1394;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1430;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1431;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1480;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1481;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1527;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	1528;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	162;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	163;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	208;"	d	file:
@@ -7018,156 +7842,154 @@ __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	752;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	753;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	76;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvbasic.c	77;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	816;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	817;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	897;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	898;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	928;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	929;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	968;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	969;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	994;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	995;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	783;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	784;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	819;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	820;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	877;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	878;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	958;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	959;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	989;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvbasic.c	990;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	127;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	128;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	182;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	183;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	201;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	202;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	242;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	243;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	273;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	274;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	294;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	295;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	205;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	206;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	248;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	249;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	280;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	281;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	29;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	301;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	302;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	30;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	348;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvblas.c	349;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	358;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvblas.c	359;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	62;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	63;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	82;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvblas.c	83;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	108;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	109;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	144;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	145;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	215;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	216;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	257;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	258;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	30;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	31;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	332;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	333;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	399;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	400;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	430;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	431;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	461;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	462;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	493;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	494;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	51;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	526;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	527;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	52;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	621;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	622;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	649;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	650;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1038;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1039;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1089;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1090;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	132;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	133;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	185;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	186;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	242;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	243;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	118;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	119;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	155;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	156;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	228;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	229;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	270;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	271;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	345;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	346;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	35;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	36;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	412;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	413;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	443;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	444;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	474;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	475;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	507;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	508;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	540;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	541;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	56;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	57;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	638;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	639;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	666;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvfunc.c	667;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1049;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1050;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1100;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	1101;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	143;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	144;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	196;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	197;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	253;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	254;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvglobal.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvglobal.c	27;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	294;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	295;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	347;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	348;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	408;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	409;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	470;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	471;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	484;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	485;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	497;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	498;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	510;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	511;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	555;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	556;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	609;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	610;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	305;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	306;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	358;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	359;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	419;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	420;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	481;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	482;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	495;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	496;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	508;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	509;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	521;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	522;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	566;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	567;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	620;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	621;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvglobal.c	62;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvglobal.c	63;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	656;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	657;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	695;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	696;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	748;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	749;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	810;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	811;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	870;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	871;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	915;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	916;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	972;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	973;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	151;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	152;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	206;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	207;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	265;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	266;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	667;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	668;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	706;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	707;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	759;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	760;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	821;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	822;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	881;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	882;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	926;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	927;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	983;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvglobal.c	984;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	154;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	155;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	209;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	210;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	268;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	269;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvops.c	26;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvops.c	27;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	319;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	320;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	355;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	356;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	392;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	393;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	449;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	322;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	323;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	360;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	361;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	399;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	400;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvops.c	450;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	510;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	511;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	560;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	561;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	619;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	620;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	663;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	664;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	93;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvops.c	94;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	451;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	499;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	500;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	549;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	550;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	608;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	609;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	96;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvops.c	97;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvorthog.c	125;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvorthog.c	126;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	203;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	204;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	263;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	264;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	197;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	198;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	253;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	254;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvorthog.c	27;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvorthog.c	28;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	324;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	325;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	394;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	395;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	453;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	454;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	493;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	494;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	537;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	538;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	569;"	d	file:
-__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	570;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	314;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	315;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	384;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	385;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	443;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	444;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	484;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	485;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	551;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	552;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	575;"	d	file:
+__FUNCT__	src/sys/classes/bv/interface/bvorthog.c	576;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvorthog.c	60;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvorthog.c	61;"	d	file:
 __FUNCT__	src/sys/classes/bv/interface/bvregis.c	29;"	d	file:
@@ -7210,94 +8032,94 @@ __FUNCT__	src/sys/classes/ds/impls/ghep/dsghep.c	56;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghep/dsghep.c	57;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghep/dsghep.c	95;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghep/dsghep.c	96;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	161;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	162;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	163;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	197;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	198;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	228;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	229;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	306;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	307;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	194;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	195;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	225;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	226;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	303;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	304;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	35;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	36;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	447;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	448;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	748;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	749;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	444;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	445;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	741;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	742;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	84;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dqds.c	85;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	179;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	180;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	24;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	25;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	275;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	276;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	315;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	316;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	396;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	397;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	280;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	281;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	320;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	321;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	406;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	407;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	42;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	43;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	441;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	442;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	527;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	528;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	647;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	648;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	758;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	759;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	451;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	452;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	537;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	538;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	662;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	663;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	773;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	774;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	88;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	896;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	897;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	89;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	953;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	954;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	911;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	912;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	968;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/dsghiep.c	969;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	236;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	237;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	308;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	309;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	304;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	305;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	36;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	37;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	77;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/hz.c	78;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	122;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	123;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	317;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	318;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	309;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	310;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	38;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	395;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	396;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	391;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	392;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	39;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	547;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	548;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	549;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	651;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	652;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	751;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	752;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	646;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	647;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	744;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	745;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	90;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/ghiep/invit.c	91;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	143;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	144;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	193;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	194;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	216;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	217;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	274;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	275;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	327;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	328;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	426;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	427;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	441;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	442;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	165;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	166;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	237;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	238;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	259;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	260;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	317;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	318;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	370;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	371;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	44;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	45;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	543;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	544;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	596;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	597;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	469;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	470;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	484;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	485;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	586;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	587;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	61;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	62;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	639;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	640;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	83;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/gnhep/dsgnhep.c	84;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/hep/dshep.c	106;"	d	file:
@@ -7368,58 +8190,58 @@ __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	117;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	118;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	131;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	132;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	204;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	205;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	206;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	25;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	268;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	269;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	26;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	270;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	313;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	314;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	315;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	370;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	371;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	372;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	40;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	41;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	420;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	421;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	422;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	509;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	510;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	511;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	524;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	525;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	526;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	548;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	549;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	550;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	60;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	61;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	626;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	627;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	628;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	652;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	653;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	654;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	698;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	699;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	700;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	781;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	782;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/nhep/dsnhep.c	783;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	107;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	108;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	109;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	153;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	154;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	263;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	264;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	276;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	155;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	277;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	278;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	290;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	291;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	29;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	302;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	303;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	30;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	313;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	314;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	341;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	342;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	354;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	316;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	317;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	327;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	328;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	355;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	49;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	356;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	368;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	369;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	50;"	d	file:
-__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	73;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	51;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	74;"	d	file:
+__FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	75;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	91;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/pep/dspep.c	92;"	d	file:
 __FUNCT__	src/sys/classes/ds/impls/svd/dssvd.c	104;"	d	file:
@@ -7444,52 +8266,52 @@ __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	200;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	201;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	230;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	231;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	262;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	263;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	299;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	264;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	300;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	325;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	301;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	326;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	327;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	34;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	351;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	352;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	353;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	35;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	377;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	378;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	409;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	379;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	410;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	435;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	411;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	436;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	469;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	437;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	470;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	495;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	471;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	496;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	530;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	497;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	531;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	556;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	532;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	557;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	558;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	55;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	56;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	581;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	582;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	607;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	583;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	608;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	636;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	609;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	637;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	667;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	638;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	668;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	705;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	669;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	706;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	778;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	707;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	779;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	807;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	780;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	808;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	852;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	809;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	853;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	881;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	854;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	882;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	918;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	883;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsbasic.c	919;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dsbasic.c	920;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsops.c	124;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsops.c	125;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsops.c	187;"	d	file:
@@ -7532,100 +8354,132 @@ __FUNCT__	src/sys/classes/ds/interface/dsops.c	872;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsops.c	873;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsops.c	98;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dsops.c	99;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	113;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	114;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	191;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	192;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	246;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	247;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	272;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	273;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	116;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	117;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	200;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	201;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	255;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	256;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dspriv.c	27;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	281;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	282;"	d	file:
 __FUNCT__	src/sys/classes/ds/interface/dspriv.c	28;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	296;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	297;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	321;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	322;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	347;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	348;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	378;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	379;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	412;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	413;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	472;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	473;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	520;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	521;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	66;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	67;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	85;"	d	file:
-__FUNCT__	src/sys/classes/ds/interface/dspriv.c	86;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	305;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	306;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	330;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	331;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	356;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	357;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	387;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	388;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	421;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	422;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	491;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	492;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	539;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	540;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	69;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	70;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	88;"	d	file:
+__FUNCT__	src/sys/classes/ds/interface/dspriv.c	89;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test1.c	26;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test1.c	27;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test2.c	26;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test2.c	27;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test3.c	26;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test3.c	27;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test3.c	77;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test3.c	78;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test4.c	26;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test4.c	27;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test5.c	26;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test5.c	27;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test5.c	77;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test5.c	78;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test6.c	39;"	d	file:
 __FUNCT__	src/sys/classes/fn/examples/tests/test6.c	40;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	107;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	108;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	169;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	170;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	202;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	203;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	222;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	223;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	253;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	254;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	279;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	280;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	309;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	310;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	325;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	326;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	341;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	342;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test6.c	90;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test6.c	91;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test7.c	26;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test7.c	27;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test7.c	92;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test7.c	93;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test8.c	26;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test8.c	27;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test8.c	97;"	d	file:
+__FUNCT__	src/sys/classes/fn/examples/tests/test8.c	98;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	109;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	110;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	171;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	172;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	236;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	237;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	269;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	270;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	289;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	290;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	320;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	321;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	346;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	347;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	376;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	377;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	38;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	392;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	393;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	39;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	68;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	408;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	409;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	69;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/combine/fncombine.c	70;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	143;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	144;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	175;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	176;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	177;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	178;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	27;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	28;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	36;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	37;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	48;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/exp/fnexp.c	49;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/fnutil.c	27;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/fnutil.c	28;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/fnutil.c	93;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/fnutil.c	94;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	111;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	112;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	145;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	146;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	27;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	28;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	37;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	38;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	47;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	48;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	78;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/invsqrt/fninvsqrt.c	79;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	26;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	27;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	35;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	36;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	44;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	45;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	76;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	77;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	46;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	79;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/log/fnlog.c	80;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	133;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	134;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	144;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	145;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	172;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	173;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	206;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	207;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	225;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	226;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	239;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	240;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	252;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	253;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	208;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	209;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	227;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	228;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	241;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	242;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	254;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	255;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	48;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	49;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	75;"	d	file:
@@ -7634,86 +8488,102 @@ __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	86;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	87;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	97;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/phi/fnphi.c	98;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	110;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	111;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	143;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	144;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	204;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	205;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	223;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	224;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	262;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	263;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	282;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	283;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	316;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	116;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	117;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	134;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	135;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	156;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	157;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	190;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	191;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	259;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	260;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	278;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	279;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	317;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	335;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	336;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	318;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	337;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	338;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	34;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	35;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	374;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	375;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	394;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	395;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	428;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	371;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	372;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	390;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	391;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	429;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	459;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	460;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	485;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	486;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	503;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	504;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	59;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	430;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	449;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	450;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	483;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	484;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	514;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	515;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	540;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	541;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	558;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	559;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	60;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	26;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/rational/fnrational.c	61;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	121;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	122;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	27;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	35;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	28;"	d	file:
 __FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	36;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	44;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	45;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	76;"	d	file:
-__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	77;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	37;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	46;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	47;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	65;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	66;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	87;"	d	file:
+__FUNCT__	src/sys/classes/fn/impls/sqrt/fnsqrt.c	88;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	101;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	102;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	139;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	140;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	170;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	141;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	171;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	200;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	172;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	201;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	232;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	233;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	274;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	275;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	300;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	301;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	337;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	338;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	202;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	234;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	235;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	276;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	277;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	302;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	303;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	339;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	33;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	340;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	34;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	364;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	365;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	404;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	405;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	444;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	445;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	513;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	514;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	366;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	367;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	406;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	407;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	446;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	447;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	506;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	507;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	529;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	530;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	54;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnbasic.c	55;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	604;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	605;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	658;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	659;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	704;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	705;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	745;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	746;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	773;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	774;"	d	file:
-__FUNCT__	src/sys/classes/fn/interface/fnregis.c	31;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	630;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	631;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	651;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	652;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	674;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	675;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	756;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	757;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	810;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	811;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	856;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	857;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	897;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	898;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	928;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnbasic.c	929;"	d	file:
 __FUNCT__	src/sys/classes/fn/interface/fnregis.c	32;"	d	file:
+__FUNCT__	src/sys/classes/fn/interface/fnregis.c	33;"	d	file:
 __FUNCT__	src/sys/classes/rg/examples/tests/test1.c	26;"	d	file:
 __FUNCT__	src/sys/classes/rg/examples/tests/test1.c	27;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ellipse/rgellipse.c	106;"	d	file:
@@ -7746,14 +8616,14 @@ __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	150;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	151;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	162;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	163;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	174;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	175;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	192;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	193;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	214;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	215;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	216;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	228;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	229;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	232;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	233;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	255;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	256;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	268;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	269;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	32;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	33;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/interval/rginterval.c	54;"	d	file:
@@ -7766,20 +8636,20 @@ __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	123;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	124;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	155;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	156;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	186;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	187;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	197;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	198;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	209;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	210;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	249;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	250;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	284;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	285;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	304;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	305;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	188;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	189;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	199;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	200;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	267;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	268;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	307;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	308;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	33;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	342;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	343;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	34;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	362;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	363;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	64;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/polygon/rgpolygon.c	65;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	135;"	d	file:
@@ -7792,54 +8662,58 @@ __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	201;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	202;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	213;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	214;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	222;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	223;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	272;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	273;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	299;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	300;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	312;"	d	file:
-__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	313;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	244;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	245;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	294;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	295;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	321;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	322;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	334;"	d	file:
+__FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	335;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	36;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	37;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	76;"	d	file:
 __FUNCT__	src/sys/classes/rg/impls/ring/rgring.c	77;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	132;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	133;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	163;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	134;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	164;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	193;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	165;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	194;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	225;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	226;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	263;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	264;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	289;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	290;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	195;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	227;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	228;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	265;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	266;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	291;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	292;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	31;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	32;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	335;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	336;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	387;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	388;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	418;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	419;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	478;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	479;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	511;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	512;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	342;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	343;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	394;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	395;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	425;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	426;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	485;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	486;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	523;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	524;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	52;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	539;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	53;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	540;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	566;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	567;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	595;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	596;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	621;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	622;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	648;"	d	file:
-__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	649;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	551;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	552;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	578;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	579;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	610;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	611;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	636;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	637;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	670;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	671;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	694;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	695;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	721;"	d	file:
+__FUNCT__	src/sys/classes/rg/interface/rgbasic.c	722;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	97;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgbasic.c	98;"	d	file:
 __FUNCT__	src/sys/classes/rg/interface/rgregis.c	29;"	d	file:
@@ -7868,28 +8742,28 @@ __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	134;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	135;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	153;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	154;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	194;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	195;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	224;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	225;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	262;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	263;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	278;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	279;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	312;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	313;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	323;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	324;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	196;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	222;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	223;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	260;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	261;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	276;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	277;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	310;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	311;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	321;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	322;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	32;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	33;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	352;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	353;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	366;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	367;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	378;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	379;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	391;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	392;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	350;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	351;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	368;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	369;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	380;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	381;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	393;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	394;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	46;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	47;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/cayley/cayley.c	60;"	d	file:
@@ -7930,10 +8804,10 @@ __FUNCT__	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	58;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	59;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	102;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	103;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/shell/shell.c	119;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/shell/shell.c	120;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/shell/shell.c	136;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/shell/shell.c	137;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/shell/shell.c	122;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/shell/shell.c	123;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/shell/shell.c	142;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/shell/shell.c	143;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	154;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	155;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	168;"	d	file:
@@ -7956,8 +8830,8 @@ __FUNCT__	src/sys/classes/st/impls/shell/shell.c	35;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	36;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	69;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shell/shell.c	70;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/shift/shift.c	139;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/shift/shift.c	140;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/shift/shift.c	142;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/shift/shift.c	143;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shift/shift.c	168;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shift/shift.c	169;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shift/shift.c	196;"	d	file:
@@ -7974,12 +8848,12 @@ __FUNCT__	src/sys/classes/st/impls/shift/shift.c	95;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/shift/shift.c	96;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	108;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	109;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	152;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	153;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	190;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	155;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	156;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	191;"	d	file:
-__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	218;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	192;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	219;"	d	file:
+__FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	220;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	26;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	27;"	d	file:
 __FUNCT__	src/sys/classes/st/impls/sinvert/sinvert.c	44;"	d	file:
@@ -7996,44 +8870,44 @@ __FUNCT__	src/sys/classes/st/interface/stfunc.c	167;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	168;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	218;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	219;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	270;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	271;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	301;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	302;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	282;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	283;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	30;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	313;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	314;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	31;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	332;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	333;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	358;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	359;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	397;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	398;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	423;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	424;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	448;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	449;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	476;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	477;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	512;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	513;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	344;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	345;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	370;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	371;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	409;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	410;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	435;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	436;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	460;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	461;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	488;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	489;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	51;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	524;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	525;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stfunc.c	52;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	541;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	542;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	567;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	568;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	593;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	594;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	619;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	620;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	653;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	654;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	687;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	688;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	719;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	720;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	808;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stfunc.c	809;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	553;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	554;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	579;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	580;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	605;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	606;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	631;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	632;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	665;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	666;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	699;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	700;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	732;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	733;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	821;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stfunc.c	822;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stregis.c	30;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stregis.c	31;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stset.c	109;"	d	file:
@@ -8078,12 +8952,12 @@ __FUNCT__	src/sys/classes/st/interface/stsles.c	279;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsles.c	27;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsles.c	280;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsles.c	28;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsles.c	308;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsles.c	309;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsles.c	310;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsles.c	350;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsles.c	351;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsles.c	394;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsles.c	395;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsles.c	343;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsles.c	344;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsles.c	387;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsles.c	388;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsles.c	75;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsles.c	76;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	126;"	d	file:
@@ -8098,14 +8972,14 @@ __FUNCT__	src/sys/classes/st/interface/stsolve.c	26;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	27;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	311;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	312;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsolve.c	403;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	404;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsolve.c	426;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsolve.c	405;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	427;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsolve.c	454;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsolve.c	428;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	455;"	d	file:
-__FUNCT__	src/sys/classes/st/interface/stsolve.c	483;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsolve.c	456;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	484;"	d	file:
+__FUNCT__	src/sys/classes/st/interface/stsolve.c	485;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	76;"	d	file:
 __FUNCT__	src/sys/classes/st/interface/stsolve.c	77;"	d	file:
 __FUNCT__	src/sys/dlregisslepc.c	38;"	d	file:
@@ -8117,18 +8991,18 @@ __FUNCT__	src/sys/slepcinit.c	122;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	123;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	173;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	174;"	d	file:
-__FUNCT__	src/sys/slepcinit.c	199;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	200;"	d	file:
-__FUNCT__	src/sys/slepcinit.c	252;"	d	file:
+__FUNCT__	src/sys/slepcinit.c	201;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	253;"	d	file:
+__FUNCT__	src/sys/slepcinit.c	254;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	25;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	26;"	d	file:
-__FUNCT__	src/sys/slepcinit.c	277;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	278;"	d	file:
-__FUNCT__	src/sys/slepcinit.c	300;"	d	file:
+__FUNCT__	src/sys/slepcinit.c	279;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	301;"	d	file:
-__FUNCT__	src/sys/slepcinit.c	319;"	d	file:
+__FUNCT__	src/sys/slepcinit.c	302;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	320;"	d	file:
+__FUNCT__	src/sys/slepcinit.c	321;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	54;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	55;"	d	file:
 __FUNCT__	src/sys/slepcinit.c	76;"	d	file:
@@ -8171,12 +9045,14 @@ __FUNCT__	src/sys/slepcutil.c	461;"	d	file:
 __FUNCT__	src/sys/slepcutil.c	462;"	d	file:
 __FUNCT__	src/sys/slepcutil.c	548;"	d	file:
 __FUNCT__	src/sys/slepcutil.c	549;"	d	file:
-__FUNCT__	src/sys/slepcutil.c	565;"	d	file:
-__FUNCT__	src/sys/slepcutil.c	566;"	d	file:
-__FUNCT__	src/sys/slepcutil.c	589;"	d	file:
-__FUNCT__	src/sys/slepcutil.c	590;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	585;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	586;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	610;"	d	file:
 __FUNCT__	src/sys/slepcutil.c	611;"	d	file:
-__FUNCT__	src/sys/slepcutil.c	612;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	634;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	635;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	656;"	d	file:
+__FUNCT__	src/sys/slepcutil.c	657;"	d	file:
 __FUNCT__	src/sys/slepcutil.c	70;"	d	file:
 __FUNCT__	src/sys/slepcutil.c	71;"	d	file:
 __FUNCT__	src/sys/vec/pool.c	143;"	d	file:
@@ -8197,42 +9073,40 @@ __FUNCT__	src/sys/vec/veccomp.c	229;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	230;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	244;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	245;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	302;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	303;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	313;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	314;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	358;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	359;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	392;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	393;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	415;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	416;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	445;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	446;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	480;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	481;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	497;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	498;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	514;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	515;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	531;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	532;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	555;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	556;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	573;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	574;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	591;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	592;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	604;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	605;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	617;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	618;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	647;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	300;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	301;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	311;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	312;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	356;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	357;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	390;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	391;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	413;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	414;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	443;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	444;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	478;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	479;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	495;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	496;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	512;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	513;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	529;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	530;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	553;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	554;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	571;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	572;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	589;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	590;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	602;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	603;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	615;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	616;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	648;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	677;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	678;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	718;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	719;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	649;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	681;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	682;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	722;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	723;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	726;"	d	file:
@@ -8244,9 +9118,9 @@ __FUNCT__	src/sys/vec/veccomp.c	735;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	738;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	739;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	73;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	742;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	743;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	74;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	758;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	759;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	762;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	763;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	766;"	d	file:
@@ -8255,12 +9129,12 @@ __FUNCT__	src/sys/vec/veccomp.c	770;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	771;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	774;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	775;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	796;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	797;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	778;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	779;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	800;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	801;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	824;"	d	file:
-__FUNCT__	src/sys/vec/veccomp.c	825;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	804;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	805;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	828;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	829;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	832;"	d	file:
@@ -8269,6 +9143,8 @@ __FUNCT__	src/sys/vec/veccomp.c	836;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	837;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	840;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	841;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	844;"	d	file:
+__FUNCT__	src/sys/vec/veccomp.c	845;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	98;"	d	file:
 __FUNCT__	src/sys/vec/veccomp.c	99;"	d	file:
 __FUNCT__	src/sys/vec/veccomp0.h	124;"	d
@@ -8283,42 +9159,42 @@ __FUNCT__	src/sys/vec/veccomp0.h	34;"	d
 __FUNCT__	src/sys/vec/veccomp0.h	35;"	d
 __FUNCT__	src/sys/vec/veccomp0.h	65;"	d
 __FUNCT__	src/sys/vec/veccomp0.h	66;"	d
-__FUNC_TEMPLATE1__	src/sys/vec/veccomp.c	703;"	d	file:
-__FUNC_TEMPLATE2__	src/sys/vec/veccomp.c	743;"	d	file:
-__FUNC_TEMPLATE3__	src/sys/vec/veccomp.c	779;"	d	file:
-__FUNC_TEMPLATE4__	src/sys/vec/veccomp.c	805;"	d	file:
+__FUNC_TEMPLATE1__	src/sys/vec/veccomp.c	707;"	d	file:
+__FUNC_TEMPLATE2__	src/sys/vec/veccomp.c	747;"	d	file:
+__FUNC_TEMPLATE3__	src/sys/vec/veccomp.c	783;"	d	file:
+__FUNC_TEMPLATE4__	src/sys/vec/veccomp.c	809;"	d	file:
 __KRYLOVSCHUR_H	src/eps/impls/krylov/krylovschur/krylovschur.h	25;"	d
 __LINEARP_H	src/pep/impls/linear/linearp.h	25;"	d
 __PJDP_H	src/pep/impls/jd/pjdp.h	25;"	d
 __QUOTEME	src/sys/vec/veccomp0.h	30;"	d
 __QUOTEME	src/sys/vec/veccomp0.h	335;"	d
 __QUOTEME_	src/sys/vec/veccomp0.h	29;"	d
-__QUOTEME__	src/sys/vec/veccomp.c	699;"	d	file:
+__QUOTEME__	src/sys/vec/veccomp.c	703;"	d	file:
 __SLEPCBLASLAPACK_H	include/slepcblaslapack.h	25;"	d
-__SLEPCBV_H	include/slepc/finclude/slepcbvdef.h	24;"	d
+__SLEPCBVDEF_H	include/slepc/finclude/slepcbvdef.h	24;"	d
 __SLEPCBV_H	include/slepcbv.h	23;"	d
-__SLEPCDS_H	include/slepc/finclude/slepcdsdef.h	24;"	d
+__SLEPCDSDEF_H	include/slepc/finclude/slepcdsdef.h	24;"	d
 __SLEPCDS_H	include/slepcds.h	23;"	d
-__SLEPCEPS_H	include/slepc/finclude/slepcepsdef.h	24;"	d
+__SLEPCEPSDEF_H	include/slepc/finclude/slepcepsdef.h	24;"	d
 __SLEPCEPS_H	include/slepceps.h	25;"	d
-__SLEPCFN_H	include/slepc/finclude/slepcfndef.h	24;"	d
+__SLEPCFNDEF_H	include/slepc/finclude/slepcfndef.h	24;"	d
 __SLEPCFN_H	include/slepcfn.h	23;"	d
 __SLEPCMATH_H	include/slepcmath.h	26;"	d
-__SLEPCMFN_H	include/slepc/finclude/slepcmfndef.h	24;"	d
+__SLEPCMFNDEF_H	include/slepc/finclude/slepcmfndef.h	24;"	d
 __SLEPCMFN_H	include/slepcmfn.h	25;"	d
-__SLEPCNEP_H	include/slepc/finclude/slepcnepdef.h	24;"	d
+__SLEPCNEPDEF_H	include/slepc/finclude/slepcnepdef.h	24;"	d
 __SLEPCNEP_H	include/slepcnep.h	25;"	d
-__SLEPCPEP_H	include/slepc/finclude/slepcpepdef.h	24;"	d
+__SLEPCPEPDEF_H	include/slepc/finclude/slepcpepdef.h	24;"	d
 __SLEPCPEP_H	include/slepcpep.h	25;"	d
+__SLEPCRGDEF_H	include/slepc/finclude/slepcrgdef.h	24;"	d
 __SLEPCRGTYPES_H	include/slepcrgtypes.h	23;"	d
-__SLEPCRG_H	include/slepc/finclude/slepcrgdef.h	24;"	d
 __SLEPCRG_H	include/slepcrg.h	23;"	d
 __SLEPCSC_H	include/slepcsc.h	25;"	d
-__SLEPCST_H	include/slepc/finclude/slepcstdef.h	24;"	d
+__SLEPCSTDEF_H	include/slepc/finclude/slepcstdef.h	24;"	d
 __SLEPCST_H	include/slepcst.h	25;"	d
-__SLEPCSVD_H	include/slepc/finclude/slepcsvddef.h	24;"	d
+__SLEPCSVDDEF_H	include/slepc/finclude/slepcsvddef.h	24;"	d
 __SLEPCSVD_H	include/slepcsvd.h	25;"	d
-__SLEPCSYS_H	include/slepc/finclude/slepcsysdef.h	25;"	d
+__SLEPCSYSDEF_H	include/slepc/finclude/slepcsysdef.h	25;"	d
 __SLEPCSYS_H	include/slepcsys.h	26;"	d
 __SLEPCVEC_H	include/slepcvec.h	25;"	d
 __SLEPCVERSION_H	include/slepcversion.h	2;"	d
@@ -8342,6 +9218,7 @@ __init__	config/cmakegen.py	/^    def __init__(self, log, verbose=False):$/;"	m
 __init__	config/gmakegen.py	/^    def __init__(self, log):$/;"	m	class:debuglogger
 __init__	config/gmakegen.py	/^    def __init__(self, slepc_dir=None, petsc_dir=None, petsc_arch=None, installed_petsc=False, verbose=False):$/;"	m	class:Slepc
 __init__	config/install.py	/^  def __init__(self, args = None):$/;"	m	class:Installer
+__init__	config/package.py	/^  def __init__(self,argdb,log):$/;"	m	class:Package
 __init__	config/packages/arpack.py	/^  def __init__(self,argdb,log):$/;"	m	class:Arpack
 __init__	config/packages/blopex.py	/^  def __init__(self,argdb,log):$/;"	m	class:Blopex
 __init__	config/packages/blzpack.py	/^  def __init__(self,argdb,log):$/;"	m	class:Blzpack
@@ -8357,12 +9234,12 @@ __missing__	config/cmakegen.py	/^        def __missing__(self, key):$/;"	m	class
 __reduce__	config/cmakegen.py	/^        def __reduce__(self):$/;"	m	class:defaultdict	file:
 __repr__	config/cmakegen.py	/^        def __repr__(self):$/;"	m	class:defaultdict	file:
 __str__	config/cmakeboot.py	/^ def __str__(self):$/;"	m	class:PETScMaker	file:
-_cb	src/eps/interface/ftn-custom/zepsf.c	/^} _cb;$/;"	v	typeref:struct:__anon72	file:
-_cb	src/mfn/interface/ftn-custom/zmfnf.c	/^} _cb;$/;"	v	typeref:struct:__anon73	file:
-_cb	src/nep/interface/ftn-custom/znepf.c	/^} _cb;$/;"	v	typeref:struct:__anon80	file:
-_cb	src/pep/interface/ftn-custom/zpepf.c	/^} _cb;$/;"	v	typeref:struct:__anon89	file:
-_cb	src/svd/interface/ftn-custom/zsvdf.c	/^} _cb;$/;"	v	typeref:struct:__anon95	file:
-_cb	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^} _cb;$/;"	v	typeref:struct:__anon111	file:
+_cb	src/eps/interface/ftn-custom/zepsf.c	/^} _cb;$/;"	v	typeref:struct:__anon84	file:
+_cb	src/mfn/interface/ftn-custom/zmfnf.c	/^} _cb;$/;"	v	typeref:struct:__anon85	file:
+_cb	src/nep/interface/ftn-custom/znepf.c	/^} _cb;$/;"	v	typeref:struct:__anon96	file:
+_cb	src/pep/interface/ftn-custom/zpepf.c	/^} _cb;$/;"	v	typeref:struct:__anon107	file:
+_cb	src/svd/interface/ftn-custom/zsvdf.c	/^} _cb;$/;"	v	typeref:struct:__anon114	file:
+_cb	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^} _cb;$/;"	v	typeref:struct:__anon130	file:
 _dvdDashboard	src/eps/impls/davidson/davidson.h	/^typedef struct _dvdDashboard {$/;"	s
 _dvdFunctionList	src/eps/impls/davidson/davidson.h	/^typedef struct _dvdFunctionList {$/;"	s
 _n_SR	src/eps/impls/krylov/krylovschur/krylovschur.h	/^struct _n_SR {$/;"	s
@@ -8380,67 +9257,69 @@ _p_RG	include/slepc/private/rgimpl.h	/^struct _p_RG {$/;"	s
 _p_ST	include/slepc/private/stimpl.h	/^struct _p_ST {$/;"	s
 _p_SVD	include/slepc/private/svdimpl.h	/^struct _p_SVD {$/;"	s
 _relpath	config/gmakegen.py	/^    def _relpath(path, start=os.path.curdir):$/;"	f
-a	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   a,b;     \/* interval in the real axis *\/$/;"	m	struct:__anon106	file:
-abstol	include/slepc/private/nepimpl.h	/^  PetscReal      abstol,rtol,stol; \/* user tolerances *\/$/;"	m	struct:_p_NEP
+a	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   a,b;     \/* interval in the real axis *\/$/;"	m	struct:__anon125	file:
 addFileNameTags	bin/maint/generateetags.py	/^def addFileNameTags(filename):$/;"	f
 all	config/gmakegen.py	/^    def all(iterable):$/;"	f
-allResiduals	src/eps/impls/davidson/dvdupdatev.c	/^  PetscBool         allResiduals;      \/* if computing all the residuals *\/$/;"	m	struct:__anon57	file:
+allResiduals	src/eps/impls/davidson/dvdupdatev.c	/^  PetscBool         allResiduals;      \/* if computing all the residuals *\/$/;"	m	struct:__anon70	file:
 allocate	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*allocate)(DS,PetscInt);$/;"	m	struct:_DSOps
-alpha	include/slepc/private/fnimpl.h	/^  PetscScalar        alpha;   \/* inner scaling (argument) *\/$/;"	m	struct:_p_FN
-alpha	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon44	file:
+alpha	include/slepc/private/fnimpl.h	/^  PetscScalar alpha;          \/* inner scaling (argument) *\/$/;"	m	struct:_p_FN
+alpha	src/eps/examples/tutorials/ex30.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon56	file:
+alpha	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon58	file:
 alpha	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscReal   alpha;$/;"	m	struct:HRtr	file:
-alpha	src/sys/classes/st/interface/stshellmat.c	/^  PetscScalar alpha;$/;"	m	struct:__anon113	file:
+alpha	src/sys/classes/st/interface/stshellmat.c	/^  PetscScalar alpha;$/;"	m	struct:__anon132	file:
 apply	include/slepc/private/stimpl.h	/^  PetscErrorCode (*apply)(ST,Vec,Vec);$/;"	m	struct:_STOps
-apply	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^  PetscFortranCallbackId apply;$/;"	m	struct:__anon111	file:
-apply	src/sys/classes/st/impls/shell/shell.c	/^  PetscErrorCode (*apply)(ST,Vec,Vec);$/;"	m	struct:__anon112	file:
+apply	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^  PetscFortranCallbackId apply;$/;"	m	struct:__anon130	file:
+apply	src/sys/classes/st/impls/shell/shell.c	/^  PetscErrorCode (*apply)(ST,Vec,Vec);$/;"	m	struct:__anon131	file:
 applyPreconditioner_PRIMME	src/eps/impls/external/primme/primme.c	/^static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)$/;"	f	file:
 applytrans	include/slepc/private/stimpl.h	/^  PetscErrorCode (*applytrans)(ST,Vec,Vec);$/;"	m	struct:_STOps
-applytrans	src/sys/classes/st/impls/shell/shell.c	/^  PetscErrorCode (*applytrans)(ST,Vec,Vec);$/;"	m	struct:__anon112	file:
-applytranspose	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^  PetscFortranCallbackId applytranspose;$/;"	m	struct:__anon111	file:
+applytrans	src/sys/classes/st/impls/shell/shell.c	/^  PetscErrorCode (*applytrans)(ST,Vec,Vec);$/;"	m	struct:__anon131	file:
+applytranspose	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^  PetscFortranCallbackId applytranspose;$/;"	m	struct:__anon130	file:
 arbitrary	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*arbitrary)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*);$/;"	m	struct:_p_EPS
-arbitrary	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId arbitrary;$/;"	m	struct:__anon72	file:
+arbitrary	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId arbitrary;$/;"	m	struct:__anon84	file:
 arbitraryctx	include/slepc/private/epsimpl.h	/^  void           *arbitraryctx;$/;"	m	struct:_p_EPS
 arch_path	config/gmakegen.py	/^    def arch_path(self, *args):$/;"	m	class:Slepc
 archname	config/configure.py	/^  archname = petsc.arch$/;"	v
 argdb	config/configure.py	/^argdb = argdb.ArgDB(sys.argv)$/;"	v
 arpack	config/configure.py	/^arpack  = arpack.Arpack(argdb,log)$/;"	v
-array	src/sys/classes/bv/impls/contiguous/contig.c	/^  PetscScalar *array;$/;"	m	struct:__anon96	file:
+array	src/sys/classes/bv/impls/contiguous/contig.c	/^  PetscScalar *array;$/;"	m	struct:__anon115	file:
 author	setup.py	/^      author='SLEPc Team',$/;"	v
 author_email	setup.py	/^      author_email='slepc-maint at upv.es',$/;"	v
 auxBV	src/eps/impls/davidson/davidson.h	/^  BV      auxBV;              \/* auxiliary vectors *\/$/;"	m	struct:_dvdDashboard
 auxM	src/eps/impls/davidson/davidson.h	/^  Mat       auxM;              \/* auxiliary dense matrix *\/$/;"	m	struct:_dvdDashboard
 auxV	src/eps/impls/davidson/davidson.h	/^  VecPool auxV;               \/* auxiliary vectors *\/$/;"	m	struct:_dvdDashboard
-axpy	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*axpy)(BV,PetscScalar,BV);$/;"	m	struct:_BVOps
-b	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   a,b;     \/* interval in the real axis *\/$/;"	m	struct:__anon106	file:
+b	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   a,b;     \/* interval in the real axis *\/$/;"	m	struct:__anon125	file:
 back	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscScalar   *back;$/;"	m	struct:_n_SR
 backtransform	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*backtransform)(EPS);$/;"	m	struct:_EPSOps
 backtransform	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*backtransform)(PEP);$/;"	m	struct:_PEPOps
 backtransform	include/slepc/private/stimpl.h	/^  PetscErrorCode (*backtransform)(ST,PetscInt,PetscScalar*,PetscScalar*);$/;"	m	struct:_STOps
-backtransform	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^  PetscFortranCallbackId backtransform;$/;"	m	struct:__anon111	file:
-backtransform	src/sys/classes/st/impls/shell/shell.c	/^  PetscErrorCode (*backtransform)(ST,PetscInt n,PetscScalar*,PetscScalar*);$/;"	m	struct:__anon112	file:
+backtransform	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^  PetscFortranCallbackId backtransform;$/;"	m	struct:__anon130	file:
+backtransform	src/sys/classes/st/impls/shell/shell.c	/^  PetscErrorCode (*backtransform)(ST,PetscInt n,PetscScalar*,PetscScalar*);$/;"	m	struct:__anon131	file:
 badWebIndex	bin/maint/generateetags.py	/^def badWebIndex(dirname,file):$/;"	f
 balance	include/slepc/private/epsimpl.h	/^  EPSBalance     balance;          \/* the balancing method *\/$/;"	m	struct:_p_EPS
 balance_cutoff	include/slepc/private/epsimpl.h	/^  PetscReal      balance_cutoff;   \/* cutoff value for balancing *\/$/;"	m	struct:_p_EPS
 balance_its	include/slepc/private/epsimpl.h	/^  PetscInt       balance_its;      \/* number of iterations of the balancing method *\/$/;"	m	struct:_p_EPS
 basis	include/slepc/private/pepimpl.h	/^  PEPBasis       basis;            \/* polynomial basis used to represent the problem *\/$/;"	m	struct:_p_PEP
-beta	include/slepc/private/fnimpl.h	/^  PetscScalar        beta;    \/* outer scaling (result) *\/$/;"	m	struct:_p_FN
-beta	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon44	file:
+beta	include/slepc/private/fnimpl.h	/^  PetscScalar beta;           \/* outer scaling (result) *\/$/;"	m	struct:_p_FN
+beta	src/eps/examples/tutorials/ex30.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon56	file:
+beta	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon58	file:
+beta	src/nep/impls/nleigs/nleigs.c	/^  PetscScalar    *beta;     \/* scaling factors *\/$/;"	m	struct:__anon92	file:
 bfort	config/configure.py	/^      bfort = os.path.join(archdir,'bin','bfort')$/;"	v
 bfort	config/configure.py	/^      bfort = sowing.Install(archdir,petsc.make)$/;"	v
 bfort	config/configure.py	/^  bfort = sowing.Install(archdir,petsc.make)$/;"	v
 bfort	config/configure.py	/^bfort = petsc.bfort$/;"	v
-blap_fn	src/eps/impls/external/blopex/blopex.c	/^  lobpcg_BLASLAPACKFunctions blap_fn;$/;"	m	struct:__anon63	file:
-block_size	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         block_size;      \/* block size *\/$/;"	m	struct:__anon64
-blocksize	src/eps/impls/davidson/davidson.c	/^  PetscInt  blocksize;     \/* block size *\/$/;"	m	struct:__anon48	file:
+blap_fn	src/eps/impls/external/blopex/blopex.c	/^  lobpcg_BLASLAPACKFunctions blap_fn;$/;"	m	struct:__anon75	file:
+block_size	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         block_size;      \/* block size *\/$/;"	m	struct:__anon76
+blocksize	src/eps/impls/davidson/davidson.h	/^  PetscInt  blocksize;     \/* block size *\/$/;"	m	struct:__anon65
 blopex	config/configure.py	/^blopex  = blopex.Blopex(argdb,log)$/;"	v
 blzpack	config/configure.py	/^blzpack = blzpack.Blzpack(argdb,log)$/;"	v
 blzpack_error	src/eps/impls/external/blzpack/blzpack.c	/^const char* blzpack_error[33] = {$/;"	v
+bnorm	include/slepc/private/mfnimpl.h	/^  PetscReal      bnorm;          \/* computed norm of right-hand side in current solve *\/$/;"	m	struct:_p_MFN
 body	config/cmakegen.py	/^    def body(indentlevel):$/;"	f	function:writePackage
 bootstrap	setup.py	/^def bootstrap():$/;"	f
 bs	include/slepc/private/dsimpl.h	/^  PetscInt       bs;                 \/* block size *\/$/;"	m	struct:_p_DS
-bs	src/eps/impls/cg/lobpcg/lobpcg.c	/^  PetscInt  bs;     \/* block size *\/$/;"	m	struct:__anon45	file:
+bs	src/eps/impls/cg/lobpcg/lobpcg.c	/^  PetscInt  bs;        \/* block size *\/$/;"	m	struct:__anon59	file:
 bs	src/eps/impls/davidson/davidson.h	/^  PetscInt bs;                \/* max vectors that expands the subspace every iteration *\/$/;"	m	struct:_dvdDashboard
-bs	src/eps/impls/external/blopex/blopex.c	/^  PetscInt                   bs;     \/* block size *\/$/;"	m	struct:__anon63	file:
+bs	src/eps/impls/external/blopex/blopex.c	/^  PetscInt                   bs;     \/* block size *\/$/;"	m	struct:__anon75	file:
 build	setup.py	/^def build(dry_run=False):$/;"	f
 bvappendoptionsprefix_	src/sys/classes/bv/interface/ftn-custom/zbvf.c	/^PETSC_EXTERN void PETSC_STDCALL bvappendoptionsprefix_(BV *bv,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 bvappendoptionsprefix_	src/sys/classes/bv/interface/ftn-custom/zbvf.c	27;"	d	file:
@@ -8456,9 +9335,9 @@ bvview_	src/sys/classes/bv/interface/ftn-custom/zbvf.c	/^PETSC_EXTERN void PETSC
 bvview_	src/sys/classes/bv/interface/ftn-custom/zbvf.c	29;"	d	file:
 bvview_	src/sys/classes/bv/interface/ftn-custom/zbvf.c	34;"	d	file:
 c	include/slepc/private/bvimpl.h	/^  PetscScalar        *h,*c;        \/* orthogonalization coefficients *\/$/;"	m	struct:_p_BV
-c	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   c,d;     \/* interval in the imaginary axis *\/$/;"	m	struct:__anon106	file:
-cX_in_impr	src/eps/impls/davidson/davidson.c	/^  PetscInt  cX_in_impr;    \/* converged vectors in the projector *\/$/;"	m	struct:__anon48	file:
-cX_in_proj	src/eps/impls/davidson/davidson.c	/^  PetscInt  cX_in_proj;    \/* converged vectors in the projected problem *\/$/;"	m	struct:__anon48	file:
+c	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   c,d;     \/* interval in the imaginary axis *\/$/;"	m	struct:__anon125	file:
+cX_in_impr	src/eps/impls/davidson/davidson.h	/^  PetscInt  cX_in_impr;    \/* converged vectors in the projector *\/$/;"	m	struct:__anon65
+cX_in_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt  cX_in_proj;    \/* converged vectors in the projected problem *\/$/;"	m	struct:__anon65
 cached	include/slepc/private/bvimpl.h	/^  BV                 cached;       \/* cached BV to store result of matrix times BV *\/$/;"	m	struct:_p_BV
 calcPairs	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcPairs)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
 calcPairs_data	src/eps/impls/davidson/davidson.h	/^  void *calcPairs_data;$/;"	m	struct:_dvdDashboard
@@ -8466,48 +9345,65 @@ calcpairs_W	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_W)(
 calcpairs_W_data	src/eps/impls/davidson/davidson.h	/^  void *calcpairs_W_data;$/;"	m	struct:_dvdDashboard
 calcpairs_eig_backtrans	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_eig_backtrans)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*);$/;"	m	struct:_dvdDashboard
 calcpairs_eigs_trans	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_eigs_trans)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
-calcpairs_proj_res	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_proj_res)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,Vec *R);$/;"	m	struct:_dvdDashboard
+calcpairs_proj_res	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_proj_res)(struct _dvdDashboard*,PetscInt,PetscInt,Vec*);$/;"	m	struct:_dvdDashboard
 calcpairs_proj_trans	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_proj_trans)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
-calcpairs_residual	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_residual)(struct _dvdDashboard*,PetscInt s,PetscInt e);$/;"	m	struct:_dvdDashboard
+calcpairs_residual	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_residual)(struct _dvdDashboard*,PetscInt,PetscInt);$/;"	m	struct:_dvdDashboard
 calcpairs_residual_data	src/eps/impls/davidson/davidson.h	/^  void *calcpairs_residual_data;$/;"	m	struct:_dvdDashboard
-calcpairs_selectPairs	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_selectPairs)(struct _dvdDashboard*,PetscInt n);$/;"	m	struct:_dvdDashboard
-cctol	include/slepc/private/nepimpl.h	/^  PetscBool      cctol;            \/* constant correction tolerance *\/$/;"	m	struct:_p_NEP
+calcpairs_selectPairs	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*calcpairs_selectPairs)(struct _dvdDashboard*,PetscInt);$/;"	m	struct:_dvdDashboard
+cctol	src/nep/impls/rii/rii.c	/^  PetscBool cctol;            \/* constant correction tolerance *\/$/;"	m	struct:__anon94	file:
 ceigi	src/eps/impls/davidson/davidson.h	/^  PetscScalar *ceigr,*ceigi;  \/* converged eigenvalues *\/$/;"	m	struct:_dvdDashboard
 ceigr	src/eps/impls/davidson/davidson.h	/^  PetscScalar *ceigr,*ceigi;  \/* converged eigenvalues *\/$/;"	m	struct:_dvdDashboard
-center	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^  PetscScalar center;     \/* center of the ellipse *\/$/;"	m	struct:__anon105	file:
-center	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscScalar center;     \/* center of the ellipse *\/$/;"	m	struct:__anon108	file:
-cform	src/pep/impls/linear/linearp.h	/^  PetscInt   cform;            \/* companion form *\/$/;"	m	struct:__anon88
+center	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^  PetscScalar center;     \/* center of the ellipse *\/$/;"	m	struct:__anon124	file:
+center	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscScalar center;     \/* center of the ellipse *\/$/;"	m	struct:__anon127	file:
+cform	src/pep/impls/linear/linearp.h	/^  PetscInt   cform;            \/* companion form *\/$/;"	m	struct:__anon106
 checkDestdir	config/install.py	/^  def checkDestdir(self):$/;"	m	class:Installer
 checkinside	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*checkinside)(RG,PetscReal,PetscReal,PetscInt*);$/;"	m	struct:_RGOps
 checknullspace	include/slepc/private/stimpl.h	/^  PetscErrorCode (*checknullspace)(ST,BV);$/;"	m	struct:_STOps
 checkpackages	config/configure.py	/^checkpackages    = [arpack, blopex, blzpack, feast, primme, trlan, lapack]$/;"	v
 ci	include/slepc/private/bvimpl.h	/^  PetscInt           ci[2];        \/* column indices of obtained vectors *\/$/;"	m	struct:_p_BV
+citation	src/eps/impls/davidson/davidson.c	/^static const char citation[] =$/;"	v	file:
+citation	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static const char citation[] =$/;"	v	file:
+citation	src/pep/impls/krylov/stoar/stoar.c	/^static const char citation[] =$/;"	v	file:
+citation	src/pep/impls/krylov/toar/ptoar.c	/^static const char citation[] =$/;"	v	file:
+citation	src/svd/impls/trlanczos/trlanczos.c	/^static const char citation[] =$/;"	v	file:
+cited	src/eps/impls/davidson/davidson.c	/^static PetscBool  cited = PETSC_FALSE;$/;"	v	file:
+cited	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscBool  cited = PETSC_FALSE;$/;"	v	file:
+cited	src/pep/impls/krylov/stoar/stoar.c	/^static PetscBool  cited = PETSC_FALSE;$/;"	v	file:
+cited	src/pep/impls/krylov/toar/ptoar.c	/^static PetscBool  cited = PETSC_FALSE;$/;"	v	file:
+cited	src/svd/impls/trlanczos/trlanczos.c	/^static PetscBool  cited = PETSC_FALSE;$/;"	v	file:
 classifiers	setup.py	/^      classifiers= classifiers.split('\\n')[1:-1],$/;"	v
 cmakeboot	config/cmakeboot.py	/^ def cmakeboot(self, args, log):$/;"	m	class:PETScMaker
 cmakeconditional	config/cmakegen.py	/^def cmakeconditional(key,val):$/;"	f
-cmakeconf	config/configure.py	/^cmakeconf  = CreateFile(confdir,'SLEPcConfig.cmake',log)$/;"	v
+cmakeconf	config/configure.py	/^cmakeconf  = CreateFile(confdir,'SLEPcBuildInternal.cmake',log)$/;"	v
 cmakeok	config/configure.py	/^      cmakeok = cmakeboot.main(slepc.dir,petsc.dir,log=log)$/;"	v
 cmakeok	config/configure.py	/^cmakeok = False$/;"	v
 cmd_install	setup.py	/^class cmd_install(_install):$/;"	c
 cmdclass	setup.py	/^      cmdclass={'install': cmd_install},$/;"	v
-coeffs	src/sys/classes/st/interface/stshellmat.c	/^  PetscScalar *coeffs;$/;"	m	struct:__anon113	file:
-comb	src/sys/classes/fn/impls/combine/fncombine.c	/^  FNCombineType comb;     \/* how the functions are combined *\/$/;"	m	struct:__anon102	file:
-commrank	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  MPI_Comm      commrank;           \/* group processes with same rank in subcommunicators *\/$/;"	m	struct:__anon69
-commset	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     commset;            \/* flag indicating that commrank was created *\/$/;"	m	struct:__anon69
+coeff	src/nep/impls/nleigs/nleigs.c	/^  PetscScalar coeff[MAX_NSHIFTS];$/;"	m	struct:__anon93	file:
+coeffD	src/nep/impls/nleigs/nleigs.c	/^  PetscScalar    *coeffD;   \/* coefficients for divided differences in split form *\/$/;"	m	struct:__anon92	file:
+coeffs	src/sys/classes/st/interface/stshellmat.c	/^  PetscScalar *coeffs;$/;"	m	struct:__anon132	file:
+cols	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     idx,*cols;$/;"	m	struct:__anon105	file:
+comb	src/sys/classes/fn/impls/combine/fncombine.c	/^  FNCombineType comb;     \/* how the functions are combined *\/$/;"	m	struct:__anon121	file:
+commrank	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  MPI_Comm         commrank;           \/* group processes with same rank in subcommunicators *\/$/;"	m	struct:__anon81
+commset	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool        commset;            \/* flag indicating that commrank was created *\/$/;"	m	struct:__anon81
 comp	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     comp[2];      \/* Shows completion of subintervals (left and right) *\/$/;"	m	struct:_n_shift
+compM1	src/pep/impls/krylov/toar/nrefine.c	/^  PetscBool    compM1;$/;"	m	struct:__anon104	file:
+compM1	src/pep/impls/krylov/toar/nrefine.c	/^  PetscBool    compM1;$/;"	m	struct:__anon105	file:
 compact	include/slepc/private/dsimpl.h	/^  PetscBool      compact;            \/* whether the matrices are stored in compact form *\/$/;"	m	struct:_p_DS
 compareDirLists	config/cmakegen.py	/^    def compareDirLists(self,root, mdirs, dirs):$/;"	m	class:Mistakes
 compareSourceLists	config/cmakegen.py	/^    def compareSourceLists(self, root, msources, files):$/;"	m	class:Mistakes
 comparison	include/slepcsc.h	/^  PetscErrorCode (*comparison)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*);$/;"	m	struct:_n_SlepcSC
-comparison	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId comparison;$/;"	m	struct:__anon72	file:
-comparison	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId comparison;$/;"	m	struct:__anon89	file:
+comparison	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId comparison;$/;"	m	struct:__anon84	file:
+comparison	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId comparison;$/;"	m	struct:__anon96	file:
+comparison	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId comparison;$/;"	m	struct:__anon107	file:
 comparisonctx	include/slepcsc.h	/^  void           *comparisonctx;$/;"	m	struct:_n_SlepcSC
 complement	include/slepc/private/rgimpl.h	/^  PetscBool   complement;    \/* region is the complement of the specified one *\/$/;"	m	struct:_p_RG
 compute_int	src/eps/impls/krylov/lanczos/lanczos.c	/^static void compute_int(PetscBool *which,PetscReal *mu,PetscInt j,PetscReal delta,PetscReal eta)$/;"	f	file:
 computecontour	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*computecontour)(RG,PetscInt,PetscScalar*,PetscScalar*);$/;"	m	struct:_RGOps
-computedt11	src/pep/impls/krylov/toar/nrefine.c	/^  PetscBool    computedt11;$/;"	m	struct:__anon87	file:
+computederivatives	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*computederivatives)(NEP,PetscScalar,PetscInt,Mat,void*);$/;"	m	struct:_p_NEP
 computefunction	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*computefunction)(NEP,PetscScalar,Mat,Mat,void*);$/;"	m	struct:_p_NEP
 computejacobian	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*computejacobian)(NEP,PetscScalar,Mat,void*);$/;"	m	struct:_p_NEP
+computesingularities	src/nep/impls/nleigs/nleigs.c	/^  PetscErrorCode (*computesingularities)(NEP,PetscInt*,PetscScalar*,void*);$/;"	m	struct:__anon92	file:
 computevectors	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*computevectors)(EPS);$/;"	m	struct:_EPSOps
 computevectors	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*computevectors)(NEP);$/;"	m	struct:_NEPOps
 computevectors	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*computevectors)(PEP);$/;"	m	struct:_PEPOps
@@ -8517,20 +9413,29 @@ config	setup.py	/^def config(prefix, dry_run=False):$/;"	f
 configdir	config/configure.py	/^configdir = os.path.abspath('config')$/;"	v
 context	setup.py	/^class context(object):$/;"	c
 conv	include/slepc/private/epsimpl.h	/^  EPSConv        conv;             \/* convergence test *\/$/;"	m	struct:_p_EPS
+conv	include/slepc/private/nepimpl.h	/^  NEPConv        conv;             \/* convergence test *\/$/;"	m	struct:_p_NEP
 conv	include/slepc/private/pepimpl.h	/^  PEPConv        conv;             \/* convergence test *\/$/;"	m	struct:_p_PEP
-convdestroy	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId convdestroy;$/;"	m	struct:__anon72	file:
-convdestroy	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId convdestroy;$/;"	m	struct:__anon89	file:
+conv	include/slepc/private/svdimpl.h	/^  SVDConv        conv;             \/* convergence test *\/$/;"	m	struct:_p_SVD
+convdestroy	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId convdestroy;$/;"	m	struct:__anon84	file:
+convdestroy	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId convdestroy;$/;"	m	struct:__anon96	file:
+convdestroy	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId convdestroy;$/;"	m	struct:__anon107	file:
+convdestroy	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId convdestroy;$/;"	m	struct:__anon114	file:
 converged	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*converged)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);$/;"	m	struct:_p_EPS
-converged	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*converged)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*);$/;"	m	struct:_p_NEP
+converged	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*converged)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);$/;"	m	struct:_p_NEP
 converged	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*converged)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);$/;"	m	struct:_p_PEP
+converged	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*converged)(SVD,PetscReal,PetscReal,PetscReal*,void*);$/;"	m	struct:_p_SVD
 convergedctx	include/slepc/private/epsimpl.h	/^  void           *convergedctx;$/;"	m	struct:_p_EPS
 convergedctx	include/slepc/private/nepimpl.h	/^  void           *convergedctx;$/;"	m	struct:_p_NEP
 convergedctx	include/slepc/private/pepimpl.h	/^  void           *convergedctx;$/;"	m	struct:_p_PEP
+convergedctx	include/slepc/private/svdimpl.h	/^  void           *convergedctx;$/;"	m	struct:_p_SVD
 convergeddestroy	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*convergeddestroy)(void*);$/;"	m	struct:_p_EPS
 convergeddestroy	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*convergeddestroy)(void*);$/;"	m	struct:_p_NEP
 convergeddestroy	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*convergeddestroy)(void*);$/;"	m	struct:_p_PEP
-convergence	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId convergence;$/;"	m	struct:__anon72	file:
-convergence	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId convergence;$/;"	m	struct:__anon89	file:
+convergeddestroy	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*convergeddestroy)(void*);$/;"	m	struct:_p_SVD
+convergence	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId convergence;$/;"	m	struct:__anon84	file:
+convergence	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId convergence;$/;"	m	struct:__anon96	file:
+convergence	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId convergence;$/;"	m	struct:__anon107	file:
+convergence	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId convergence;$/;"	m	struct:__anon114	file:
 copy	config/cmakegen.py	/^        def copy(self):$/;"	m	class:defaultdict
 copy	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*copy)(BV,BV);$/;"	m	struct:_BVOps
 copyLib	config/install.py	/^  def copyLib(self, src, dst):$/;"	m	class:Installer
@@ -8540,35 +9445,40 @@ create	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*create)(BV);$/;"	m	st
 createTags	bin/maint/generateetags.py	/^def createTags(flist,etagfile,ctagfile):$/;"	f
 createUninstaller	config/install.py	/^  def createUninstaller(self):$/;"	m	class:Installer
 cs	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscReal   cs;$/;"	m	struct:HRtr	file:
-ctx	src/sys/classes/st/impls/shell/shell.c	/^  void           *ctx;                       \/* user provided context *\/$/;"	m	struct:__anon112	file:
-custpc	src/pep/impls/jd/pjdp.h	/^  PetscBool   custpc;        \/* use custom correction equation preconditioner *\/$/;"	m	struct:__anon82
+ctx	src/sys/classes/st/impls/shell/shell.c	/^  void           *ctx;                       \/* user provided context *\/$/;"	m	struct:__anon131	file:
 cutlr_	src/sys/classes/ds/impls/hep/bdc/dibtdc.c	/^static PetscErrorCode cutlr_(PetscBLASInt start,PetscBLASInt n,PetscBLASInt blkct, $/;"	f	file:
 cv	include/slepc/private/bvimpl.h	/^  Vec                cv[2];        \/* column vectors obtained with BVGetColumn() *\/$/;"	m	struct:_p_BV
-d	src/eps/impls/davidson/dvdimprovex.c	/^  dvdDashboard *d;                 \/* the currect dvdDashboard reference *\/$/;"	m	struct:__anon55	file:
-d	src/pep/impls/krylov/pepkrylov.h	/^  PetscInt    d;            \/* polynomial degree *\/$/;"	m	struct:__anon84
-d	src/sys/classes/ds/impls/pep/dspep.c	/^  PetscInt d;              \/* polynomial degree *\/$/;"	m	struct:__anon101	file:
-d	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   c,d;     \/* interval in the imaginary axis *\/$/;"	m	struct:__anon106	file:
+cw	include/slepc/private/fnimpl.h	/^  PetscInt    cw;             \/* current W matrix *\/$/;"	m	struct:_p_FN
+d	src/eps/impls/davidson/dvdimprovex.c	/^  dvdDashboard *d;                 \/* the currect dvdDashboard reference *\/$/;"	m	struct:__anon68	file:
+d	src/pep/impls/krylov/pepkrylov.h	/^  PetscInt    d;            \/* polynomial degree *\/$/;"	m	struct:__anon102
+d	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *M4,*w,*wt,*d,*dt;$/;"	m	struct:__anon105	file:
+d	src/sys/classes/ds/impls/pep/dspep.c	/^  PetscInt d;              \/* polynomial degree *\/$/;"	m	struct:__anon120	file:
+d	src/sys/classes/rg/impls/interval/rginterval.c	/^  PetscReal   c,d;     \/* interval in the imaginary axis *\/$/;"	m	struct:__anon125	file:
 data	include/slepc/private/bvimpl.h	/^  void               *data;$/;"	m	struct:_p_BV
 data	include/slepc/private/dsimpl.h	/^  void           *data;              \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_DS
 data	include/slepc/private/epsimpl.h	/^  void           *data;            \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_EPS
-data	include/slepc/private/fnimpl.h	/^  void               *data;$/;"	m	struct:_p_FN
+data	include/slepc/private/fnimpl.h	/^  void        *data;$/;"	m	struct:_p_FN
 data	include/slepc/private/mfnimpl.h	/^  void           *data;          \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_MFN
 data	include/slepc/private/nepimpl.h	/^  void           *data;            \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_NEP
 data	include/slepc/private/pepimpl.h	/^  void           *data;            \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_PEP
 data	include/slepc/private/rgimpl.h	/^  void        *data;$/;"	m	struct:_p_RG
 data	include/slepc/private/stimpl.h	/^  void             *data;$/;"	m	struct:_p_ST
-data	include/slepc/private/svdimpl.h	/^  void             *data;       \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_SVD
+data	include/slepc/private/svdimpl.h	/^  void           *data;            \/* placeholder for solver-specific stuff *\/$/;"	m	struct:_p_SVD
 data	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscScalar *data;$/;"	m	struct:HRtr	file:
-ddb	src/eps/impls/davidson/davidson.c	/^  dvdDashboard ddb;$/;"	m	struct:__anon48	file:
+ddb	src/eps/impls/davidson/davidson.h	/^  dvdDashboard ddb;$/;"	m	struct:__anon65
+ddmaxit	src/nep/impls/nleigs/nleigs.c	/^  PetscInt       ddmaxit;   \/* maximum number of divided difference terms *\/$/;"	m	struct:__anon92	file:
+ddtol	src/nep/impls/nleigs/nleigs.c	/^  PetscReal      ddtol;     \/* tolerance for divided difference convergence *\/$/;"	m	struct:__anon92	file:
 debuglogger	config/gmakegen.py	/^class debuglogger(object):$/;"	c
 defaultdict	config/cmakegen.py	/^    class defaultdict(dict):$/;"	c
 defersfo	include/slepc/private/bvimpl.h	/^  PetscBool          defersfo;     \/* deferred call to setfromoptions *\/$/;"	m	struct:_p_BV
 defl	include/slepc/private/epsimpl.h	/^  Vec            *defl;            \/* references to user-provided deflation space *\/$/;"	m	struct:_p_EPS
-defsigma	include/slepc/private/stimpl.h	/^  PetscScalar      defsigma;         \/* Default value of the shift *\/$/;"	m	struct:_p_ST
-deg	src/nep/impls/interpol/interpol.c	/^  PetscInt  deg;$/;"	m	struct:__anon78	file:
-delayed	src/eps/impls/krylov/arnoldi/arnoldi.c	/^  PetscBool delayed;$/;"	m	struct:__anon68	file:
-delta	src/eps/impls/ciss/ciss.c	/^  PetscReal   delta;      \/* threshold of singular value (1e-12) *\/$/;"	m	struct:__anon47	file:
-delta	src/nep/impls/ciss/nciss.c	/^  PetscReal    delta;      \/* threshold of singular value (1e-12) *\/$/;"	m	struct:__anon77	file:
+defsigma	include/slepc/private/stimpl.h	/^  PetscScalar      defsigma;         \/* default value of the shift *\/$/;"	m	struct:_p_ST
+deg	src/nep/impls/interpol/interpol.c	/^  PetscInt  deg;$/;"	m	struct:__anon90	file:
+delayed	src/eps/impls/krylov/arnoldi/arnoldi.c	/^  PetscBool delayed;$/;"	m	struct:__anon80	file:
+delta	src/eps/impls/ciss/ciss.c	/^  PetscReal         delta;      \/* threshold of singular value (1e-12) *\/$/;"	m	struct:__anon61	file:
+delta	src/nep/impls/ciss/nciss.c	/^  PetscReal    delta;      \/* threshold of singular value (1e-12) *\/$/;"	m	struct:__anon89	file:
+derivatives	include/slepc/private/nepimpl.h	/^  Mat            derivatives;      \/* derivatives matrix *\/$/;"	m	struct:_p_NEP
+derivativesctx	include/slepc/private/nepimpl.h	/^  void           *derivativesctx;$/;"	m	struct:_p_NEP
 description	setup.py	/^      description=description.pop(0),$/;"	v
 description	setup.py	/^description = __doc__.split('\\n')[1:-1]; del description[1:3]$/;"	v
 destroy	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*destroy)(BV);$/;"	m	struct:_BVOps
@@ -8582,26 +9492,31 @@ destroy	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*destroy)(RG);$/;"	m
 destroy	include/slepc/private/stimpl.h	/^  PetscErrorCode (*destroy)(ST);$/;"	m	struct:_STOps
 destroy	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*destroy)(SVD);$/;"	m	struct:_SVDOps
 destroyList	src/eps/impls/davidson/davidson.h	/^  dvdFunctionList *destroyList;\/* destructor list *\/$/;"	m	struct:_dvdDashboard
-detect	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     detect;             \/* check for zeros during factorizations *\/$/;"	m	struct:__anon69
-diag	src/svd/impls/cross/cross.c	/^  Vec       w,diag;$/;"	m	struct:__anon91	file:
-diagA	src/eps/impls/davidson/dvdutils.c	/^  Vec diagA, diagB;$/;"	m	struct:__anon60	file:
-diagB	src/eps/impls/davidson/dvdutils.c	/^  Vec diagA, diagB;$/;"	m	struct:__anon60	file:
+detect	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool        detect;             \/* check for zeros during factorizations *\/$/;"	m	struct:__anon81
+diag	src/svd/impls/cross/cross.c	/^  Vec       w,diag;$/;"	m	struct:__anon110	file:
+diagA	src/eps/impls/davidson/dvdutils.c	/^  Vec diagA, diagB;$/;"	m	struct:__anon73	file:
+diagB	src/eps/impls/davidson/dvdutils.c	/^  Vec diagA, diagB;$/;"	m	struct:__anon73	file:
 dir	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      dir;          \/* Determines the order of values in eig (+1 incr, -1 decr) *\/$/;"	m	struct:_n_SR
+dmgen	src/eps/examples/tutorials/ex31.c	/^  DM       dmgen, dmnet; \/* DMs to manage generator and network subsystem *\/$/;"	m	struct:__anon57	file:
+dmnet	src/eps/examples/tutorials/ex31.c	/^  DM       dmgen, dmnet; \/* DMs to manage generator and network subsystem *\/$/;"	m	struct:__anon57	file:
+dmpgrid	src/eps/examples/tutorials/ex31.c	/^  DM       dmpgrid;      \/* Composite DM to manage the entire power grid *\/$/;"	m	struct:__anon57	file:
 dot	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*dot)(BV,BV,Mat);$/;"	m	struct:_BVOps
 dotvec	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*dotvec)(BV,Vec,PetscScalar*);$/;"	m	struct:_BVOps
 dotvec_begin	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*dotvec_begin)(BV,Vec,PetscScalar*);$/;"	m	struct:_BVOps
 dotvec_end	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*dotvec_end)(BV,Vec,PetscScalar*);$/;"	m	struct:_BVOps
 dotvec_local	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*dotvec_local)(BV,Vec,PetscScalar*);$/;"	m	struct:_BVOps
+doubleexp	src/eps/impls/davidson/davidson.h	/^  PetscBool doubleexp;     \/* double expansion in GD (GD2) *\/$/;"	m	struct:__anon65
 download_url	setup.py	/^      download_url=tarball(),$/;"	v
+dq2ri	src/eps/examples/tutorials/ex31.c	/^PetscErrorCode dq2ri(PetscScalar Fd,PetscScalar Fq,PetscScalar delta,PetscScalar *Fr,PetscScalar *Fi)$/;"	f
 ds	include/slepc/private/epsimpl.h	/^  DS             ds;               \/* direct solver object *\/$/;"	m	struct:_p_EPS
 ds	include/slepc/private/nepimpl.h	/^  DS             ds;               \/* direct solver object *\/$/;"	m	struct:_p_NEP
 ds	include/slepc/private/pepimpl.h	/^  DS             ds;               \/* direct solver object *\/$/;"	m	struct:_p_PEP
-ds	include/slepc/private/svdimpl.h	/^  DS               ds;          \/* direct solver object *\/$/;"	m	struct:_p_SVD
+ds	include/slepc/private/svdimpl.h	/^  DS             ds;               \/* direct solver object *\/$/;"	m	struct:_p_SVD
 dsappendoptionsprefix_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	/^PETSC_EXTERN void PETSC_STDCALL dsappendoptionsprefix_(DS *ds,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 dsappendoptionsprefix_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	29;"	d	file:
 dsappendoptionsprefix_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	39;"	d	file:
 dsfactor	include/slepc/private/pepimpl.h	/^  PetscReal      sfactor,dsfactor; \/* scaling factors *\/$/;"	m	struct:_p_PEP
-dsfactor	src/pep/impls/linear/linearp.h	/^  PetscReal  sfactor,dsfactor; \/* scaling factors *\/$/;"	m	struct:__anon88
+dsfactor	src/pep/impls/linear/linearp.h	/^  PetscReal  sfactor,dsfactor; \/* scaling factors *\/$/;"	m	struct:__anon106
 dsgetoptionsprefix_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	/^PETSC_EXTERN void PETSC_STDCALL dsgetoptionsprefix_(DS *ds,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 dsgetoptionsprefix_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	30;"	d	file:
 dsgetoptionsprefix_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	40;"	d	file:
@@ -8626,23 +9541,23 @@ dsview_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	41;"	d	file:
 dsviewmat_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	/^PETSC_EXTERN void PETSC_STDCALL dsviewmat_(DS *ds,PetscViewer *viewer,DSMatType *m,PetscErrorCode *ierr)$/;"	f
 dsviewmat_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	32;"	d	file:
 dsviewmat_	src/sys/classes/ds/interface/ftn-custom/zdsf.c	42;"	d	file:
-dtol	src/pep/impls/krylov/pepkrylov.h	/^  PetscReal   dtol;         \/* tolerance for deflation *\/$/;"	m	struct:__anon84
+dt	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *M4,*w,*wt,*d,*dt;$/;"	m	struct:__anon105	file:
+dtol	src/pep/impls/krylov/pepkrylov.h	/^  PetscReal   dtol;         \/* tolerance for deflation *\/$/;"	m	struct:__anon102
+duplicate	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*duplicate)(BV,BV*);$/;"	m	struct:_BVOps
 duplicate	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*duplicate)(FN,MPI_Comm,FN*);$/;"	m	struct:_FNOps
-dvdBlackboard	src/eps/impls/davidson/davidson.h	/^} dvdBlackboard;$/;"	t	typeref:struct:__anon53
+dvdBlackboard	src/eps/impls/davidson/davidson.h	/^} dvdBlackboard;$/;"	t	typeref:struct:__anon66
 dvdCallback	src/eps/impls/davidson/davidson.h	/^typedef PetscErrorCode (*dvdCallback)(struct _dvdDashboard*);$/;"	t
 dvdDashboard	src/eps/impls/davidson/davidson.h	/^} dvdDashboard;$/;"	t	typeref:struct:_dvdDashboard
 dvdFunctionList	src/eps/impls/davidson/davidson.h	/^} dvdFunctionList;$/;"	t	typeref:struct:_dvdFunctionList
-dvdHarmonic	src/eps/impls/davidson/dvdutils.c	/^} dvdHarmonic;$/;"	t	typeref:struct:__anon59	file:
-dvdImprovex_gd2	src/eps/impls/davidson/dvdgd2.c	/^} dvdImprovex_gd2;$/;"	t	typeref:struct:__anon54	file:
-dvdImprovex_jd	src/eps/impls/davidson/dvdimprovex.c	/^} dvdImprovex_jd;$/;"	t	typeref:struct:__anon55	file:
-dvdInitV	src/eps/impls/davidson/dvdinitv.c	/^} dvdInitV;$/;"	t	typeref:struct:__anon56	file:
-dvdJacobiPrecond	src/eps/impls/davidson/dvdutils.c	/^} dvdJacobiPrecond;$/;"	t	typeref:struct:__anon60	file:
-dvdManagV_basic	src/eps/impls/davidson/dvdupdatev.c	/^} dvdManagV_basic;$/;"	t	typeref:struct:__anon57	file:
-dvdPCWrapper	src/eps/impls/davidson/dvdutils.c	/^} dvdPCWrapper;$/;"	t	typeref:struct:__anon58	file:
-dvdPrecond	src/eps/impls/davidson/davidson.h	/^typedef PetscErrorCode (*dvdPrecond)(dvdDashboard*,PetscInt i,Vec x,Vec Px);$/;"	t
+dvdHarmonic	src/eps/impls/davidson/dvdutils.c	/^} dvdHarmonic;$/;"	t	typeref:struct:__anon72	file:
+dvdImprovex_gd2	src/eps/impls/davidson/dvdgd2.c	/^} dvdImprovex_gd2;$/;"	t	typeref:struct:__anon67	file:
+dvdImprovex_jd	src/eps/impls/davidson/dvdimprovex.c	/^} dvdImprovex_jd;$/;"	t	typeref:struct:__anon68	file:
+dvdInitV	src/eps/impls/davidson/dvdinitv.c	/^} dvdInitV;$/;"	t	typeref:struct:__anon69	file:
+dvdJacobiPrecond	src/eps/impls/davidson/dvdutils.c	/^} dvdJacobiPrecond;$/;"	t	typeref:struct:__anon73	file:
+dvdManagV_basic	src/eps/impls/davidson/dvdupdatev.c	/^} dvdManagV_basic;$/;"	t	typeref:struct:__anon70	file:
+dvdPCWrapper	src/eps/impls/davidson/dvdutils.c	/^} dvdPCWrapper;$/;"	t	typeref:struct:__anon71	file:
 dvd_aux_matmult	src/eps/impls/davidson/dvdimprovex.c	/^PETSC_STATIC_INLINE PetscErrorCode dvd_aux_matmult(dvdImprovex_jd *data,const Vec *x,const Vec *y)$/;"	f
 dvd_aux_matmulttrans	src/eps/impls/davidson/dvdimprovex.c	/^PETSC_STATIC_INLINE PetscErrorCode dvd_aux_matmulttrans(dvdImprovex_jd *data,const Vec *x,const Vec *y)$/;"	f
-dvd_calcPairs_prof	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_calcPairs_prof(dvdDashboard* d)$/;"	f	file:
 dvd_calcpairs_apply_arbitrary	src/eps/impls/davidson/dvdcalcpairs.c	/^static PetscErrorCode dvd_calcpairs_apply_arbitrary(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscScalar *rr,PetscScalar *ri)$/;"	f	file:
 dvd_calcpairs_proj	src/eps/impls/davidson/dvdcalcpairs.c	/^static PetscErrorCode dvd_calcpairs_proj(dvdDashboard *d)$/;"	f	file:
 dvd_calcpairs_proj_res	src/eps/impls/davidson/dvdcalcpairs.c	/^static PetscErrorCode dvd_calcpairs_proj_res(dvdDashboard *d,PetscInt r_s,PetscInt r_e,Vec *R)$/;"	f	file:
@@ -8665,10 +9580,9 @@ dvd_harm_proj	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_harm
 dvd_harm_transf	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_harm_transf(dvdHarmonic *dvdh,PetscScalar t)$/;"	f	file:
 dvd_harm_updateW	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)$/;"	f	file:
 dvd_harm_updateproj	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode dvd_harm_updateproj(dvdDashboard *d)$/;"	f
-dvd_improveX_prof	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_improveX_prof(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)$/;"	f	file:
 dvd_improvex_apply_proj	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode dvd_improvex_apply_proj(dvdDashboard *d,Vec *V,PetscInt cV)$/;"	f	file:
 dvd_improvex_applytrans_proj	src/eps/impls/davidson/dvdimprovex.c	/^static PetscErrorCode dvd_improvex_applytrans_proj(dvdDashboard *d,Vec *V,PetscInt cV)$/;"	f	file:
-dvd_improvex_compute_X	src/eps/impls/davidson/davidson.h	/^PETSC_STATIC_INLINE PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)$/;"	f
+dvd_improvex_compute_X	src/eps/impls/davidson/dvdimprovex.c	/^PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)$/;"	f
 dvd_improvex_gd2	src/eps/impls/davidson/dvdgd2.c	/^PetscErrorCode dvd_improvex_gd2(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs)$/;"	f
 dvd_improvex_gd2_d	src/eps/impls/davidson/dvdgd2.c	/^static PetscErrorCode dvd_improvex_gd2_d(dvdDashboard *d)$/;"	f	file:
 dvd_improvex_gd2_gen	src/eps/impls/davidson/dvdgd2.c	/^static PetscErrorCode dvd_improvex_gd2_gen(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)$/;"	f	file:
@@ -8688,20 +9602,16 @@ dvd_initV	src/eps/impls/davidson/dvdinitv.c	/^PetscErrorCode dvd_initV(dvdDashbo
 dvd_initV_classic_0	src/eps/impls/davidson/dvdinitv.c	/^static PetscErrorCode dvd_initV_classic_0(dvdDashboard *d)$/;"	f	file:
 dvd_initV_d	src/eps/impls/davidson/dvdinitv.c	/^static PetscErrorCode dvd_initV_d(dvdDashboard *d)$/;"	f	file:
 dvd_initV_krylov_0	src/eps/impls/davidson/dvdinitv.c	/^static PetscErrorCode dvd_initV_krylov_0(dvdDashboard *d)$/;"	f	file:
-dvd_initV_prof	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode dvd_initV_prof(dvdDashboard* d)$/;"	f
 dvd_isrestarting_fullV	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_isrestarting_fullV(dvdDashboard *d,PetscBool *r)$/;"	f	file:
 dvd_jacobi_precond	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b)$/;"	f
 dvd_jacobi_precond_0	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_jacobi_precond_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)$/;"	f	file:
 dvd_jacobi_precond_d	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_jacobi_precond_d(dvdDashboard *d)$/;"	f	file:
 dvd_managementV_basic	src/eps/impls/davidson/dvdupdatev.c	/^PetscErrorCode dvd_managementV_basic(dvdDashboard *d,dvdBlackboard *b,PetscInt bs,PetscInt mpd,PetscInt min_size_V,PetscInt plusk,PetscBool harm,PetscBool allResiduals)$/;"	f
 dvd_managementV_basic_d	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_managementV_basic_d(dvdDashboard *d)$/;"	f	file:
-dvd_orthV	src/eps/impls/davidson/dvdinitv.c	/^PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e,PetscRandom rand)$/;"	f
+dvd_orthV	src/eps/impls/davidson/dvdinitv.c	/^PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e)$/;"	f
 dvd_precond_none	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_precond_none(dvdDashboard *d,PetscInt i,Vec x,Vec Px)$/;"	f	file:
-dvd_prof_init	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode dvd_prof_init()$/;"	f
-dvd_profiler	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode dvd_profiler(dvdDashboard *d,dvdBlackboard *b)$/;"	f
-dvd_profiler_d	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_profiler_d(dvdDashboard *d)$/;"	f	file:
-dvd_schm_basic_conf	src/eps/impls/davidson/dvdschm.c	/^PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,Method_t method)$/;"	f
-dvd_schm_basic_preconf	src/eps/impls/davidson/dvdschm.c	/^PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,Method_t method)$/;"	f
+dvd_schm_basic_conf	src/eps/impls/davidson/dvdschm.c	/^PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,PetscBool doubleexp)$/;"	f
+dvd_schm_basic_preconf	src/eps/impls/davidson/dvdschm.c	/^PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool doubleexp)$/;"	f
 dvd_static_precond_PC	src/eps/impls/davidson/dvdutils.c	/^PetscErrorCode dvd_static_precond_PC(dvdDashboard *d,dvdBlackboard *b,PC pc)$/;"	f
 dvd_static_precond_PC_0	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_static_precond_PC_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)$/;"	f	file:
 dvd_testconv_basic	src/eps/impls/davidson/dvdtestconv.c	/^PetscErrorCode dvd_testconv_basic(dvdDashboard *d, dvdBlackboard *b)$/;"	f
@@ -8710,20 +9620,17 @@ dvd_testconv_slepc	src/eps/impls/davidson/dvdtestconv.c	/^PetscErrorCode dvd_tes
 dvd_testconv_slepc_0	src/eps/impls/davidson/dvdtestconv.c	/^static PetscBool dvd_testconv_slepc_0(dvdDashboard *d,PetscScalar eigvr,PetscScalar eigvi,PetscReal r,PetscReal *err)$/;"	f	file:
 dvd_updateV_conv_gen	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_updateV_conv_gen(dvdDashboard *d)$/;"	f	file:
 dvd_updateV_extrapol	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_updateV_extrapol(dvdDashboard *d)$/;"	f	file:
-dvd_updateV_prof	src/eps/impls/davidson/dvdutils.c	/^static PetscErrorCode dvd_updateV_prof(dvdDashboard *d)$/;"	f	file:
 dvd_updateV_restart_gen	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_updateV_restart_gen(dvdDashboard *d)$/;"	f	file:
 dvd_updateV_start	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_updateV_start(dvdDashboard *d)$/;"	f	file:
 dvd_updateV_testConv	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_updateV_testConv(dvdDashboard *d,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv)$/;"	f	file:
 dvd_updateV_update_gen	src/eps/impls/davidson/dvdupdatev.c	/^static PetscErrorCode dvd_updateV_update_gen(dvdDashboard *d)$/;"	f	file:
-dynamic	src/eps/impls/davidson/davidson.c	/^  PetscBool dynamic;       \/* true if dynamic stopping criterion is used *\/$/;"	m	struct:__anon48	file:
-dynamic	src/eps/impls/davidson/dvdimprovex.c	/^  PetscBool    dynamic;            \/* if the dynamic stopping criterion is applied *\/$/;"	m	struct:__anon55	file:
-e_Vchanged	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*e_Vchanged)(struct _dvdDashboard*,PetscInt s_imm,PetscInt e_imm,PetscInt s_new,PetscInt e_new);$/;"	m	struct:_dvdDashboard
+dynamic	src/eps/impls/davidson/davidson.h	/^  PetscBool dynamic;       \/* true if dynamic stopping criterion is used *\/$/;"	m	struct:__anon65
+dynamic	src/eps/impls/davidson/dvdimprovex.c	/^  PetscBool    dynamic;            \/* if the dynamic stopping criterion is applied *\/$/;"	m	struct:__anon68	file:
+e_Vchanged	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*e_Vchanged)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt,PetscInt);$/;"	m	struct:_dvdDashboard
 e_Vchanged_data	src/eps/impls/davidson/davidson.h	/^  void *e_Vchanged_data;$/;"	m	struct:_dvdDashboard
-e_Vchanged_type	src/eps/impls/davidson/davidson.h	/^typedef PetscErrorCode (*e_Vchanged_type)(dvdDashboard*,PetscInt s_imm,PetscInt e_imm,PetscInt s_new,PetscInt e_new);$/;"	t
 e_newIteration	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*e_newIteration)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
 e_newIteration_data	src/eps/impls/davidson/davidson.h	/^  void *e_newIteration_data;$/;"	m	struct:_dvdDashboard
-e_newIteration_type	src/eps/impls/davidson/davidson.h	/^typedef PetscErrorCode (*e_newIteration_type)(dvdDashboard*);$/;"	t
-eig	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscScalar          *eig;$/;"	m	struct:__anon64
+eig	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscScalar          *eig;$/;"	m	struct:__anon76
 eigi	include/slepc/private/epsimpl.h	/^  PetscScalar    *eigr,*eigi;      \/* real and imaginary parts of eigenvalues *\/$/;"	m	struct:_p_EPS
 eigi	include/slepc/private/nepimpl.h	/^  PetscScalar    *eigr,*eigi;      \/* real and imaginary parts of eigenvalues *\/$/;"	m	struct:_p_NEP
 eigi	include/slepc/private/pepimpl.h	/^  PetscScalar    *eigr,*eigi;      \/* real and imaginary parts of eigenvalues *\/$/;"	m	struct:_p_PEP
@@ -8736,123 +9643,128 @@ eigr	src/eps/impls/davidson/davidson.h	/^  PetscScalar *eigr,*eigi;    \/* curre
 eigr	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscScalar   *eigr,*eigi;  \/* eigenvalues (for subsolve) *\/$/;"	m	struct:_n_SR
 emptyarch	config/configure.py	/^emptyarch = not ('PETSC_ARCH' in os.environ and os.environ['PETSC_ARCH'])$/;"	v
 endList	src/eps/impls/davidson/davidson.h	/^  dvdFunctionList *endList;    \/* ending list *\/$/;"	m	struct:_dvdDashboard
-end_ang	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   end_ang;    \/* end angle *\/$/;"	m	struct:__anon108	file:
+end_ang	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   end_ang;    \/* end angle *\/$/;"	m	struct:__anon127	file:
 endsWithSuffix	bin/maint/generateetags.py	/^def endsWithSuffix(file,suffixes):$/;"	f
 enter	setup.py	/^    def enter(self):$/;"	m	class:context
 eps	src/eps/examples/tutorials/ex1f90.F90	/^      type(EPS)      eps$/;"	v	program:main
-eps	src/eps/impls/davidson/davidson.h	/^  EPS eps;                    \/* connection to SLEPc *\/$/;"	m	struct:_dvdDashboard
-eps	src/eps/impls/external/primme/primme.c	/^  EPS       eps;                  \/* EPS current context *\/$/;"	m	struct:__anon66	file:
-eps	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS           eps;                \/* additional eps for slice runs *\/$/;"	m	struct:__anon69
-eps	src/nep/impls/slp/slp.c	/^  EPS       eps;             \/* linear eigensolver for T*z = mu*Tp*z *\/$/;"	m	struct:__anon79	file:
-eps	src/pep/impls/linear/linearp.h	/^  EPS        eps;              \/* linear eigensolver for Az=lBz *\/$/;"	m	struct:__anon88
-eps	src/svd/impls/cross/cross.c	/^  EPS       eps;$/;"	m	struct:__anon91	file:
-eps	src/svd/impls/cyclic/cyclic.c	/^  EPS       eps;$/;"	m	struct:__anon92	file:
+eps	src/eps/impls/davidson/davidson.h	/^  EPS      eps;               \/* connection to SLEPc *\/$/;"	m	struct:_dvdDashboard
+eps	src/eps/impls/external/primme/primme.c	/^  EPS       eps;                  \/* EPS current context *\/$/;"	m	struct:__anon78	file:
+eps	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS              eps;                \/* additional eps for slice runs *\/$/;"	m	struct:__anon81
+eps	src/nep/impls/slp/slp.c	/^  EPS       eps;             \/* linear eigensolver for T*z = mu*Tp*z *\/$/;"	m	struct:__anon95	file:
+eps	src/pep/impls/linear/linearp.h	/^  EPS        eps;              \/* linear eigensolver for Az=lBz *\/$/;"	m	struct:__anon106
+eps	src/svd/impls/cross/cross.c	/^  EPS       eps;$/;"	m	struct:__anon110	file:
+eps	src/svd/impls/cyclic/cyclic.c	/^  EPS       eps;$/;"	m	struct:__anon111	file:
 epsappendoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsappendoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 epsappendoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	33;"	d	file:
-epsappendoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	56;"	d	file:
+epsappendoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	57;"	d	file:
 epsconvergedabsolute_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsconvergedabsolute_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
 epsconvergedabsolute_	src/eps/interface/ftn-custom/zepsf.c	43;"	d	file:
-epsconvergedabsolute_	src/eps/interface/ftn-custom/zepsf.c	66;"	d	file:
-epsconvergedeigrelative_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsconvergedeigrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
-epsconvergedeigrelative_	src/eps/interface/ftn-custom/zepsf.c	44;"	d	file:
-epsconvergedeigrelative_	src/eps/interface/ftn-custom/zepsf.c	67;"	d	file:
-epsconvergednormrelative_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsconvergednormrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
-epsconvergednormrelative_	src/eps/interface/ftn-custom/zepsf.c	45;"	d	file:
-epsconvergednormrelative_	src/eps/interface/ftn-custom/zepsf.c	68;"	d	file:
+epsconvergedabsolute_	src/eps/interface/ftn-custom/zepsf.c	67;"	d	file:
+epsconvergednorm_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsconvergednorm_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+epsconvergednorm_	src/eps/interface/ftn-custom/zepsf.c	45;"	d	file:
+epsconvergednorm_	src/eps/interface/ftn-custom/zepsf.c	69;"	d	file:
+epsconvergedrelative_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsconvergedrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+epsconvergedrelative_	src/eps/interface/ftn-custom/zepsf.c	44;"	d	file:
+epsconvergedrelative_	src/eps/interface/ftn-custom/zepsf.c	68;"	d	file:
 epserrorview_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epserrorview_(EPS *eps,EPSErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 epserrorview_	src/eps/interface/ftn-custom/zepsf.c	28;"	d	file:
-epserrorview_	src/eps/interface/ftn-custom/zepsf.c	51;"	d	file:
+epserrorview_	src/eps/interface/ftn-custom/zepsf.c	52;"	d	file:
 epsgetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsgetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 epsgetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	34;"	d	file:
-epsgetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	57;"	d	file:
+epsgetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	58;"	d	file:
 epsgettype_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsgettype_(EPS *eps,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 epsgettype_	src/eps/interface/ftn-custom/zepsf.c	36;"	d	file:
-epsgettype_	src/eps/interface/ftn-custom/zepsf.c	59;"	d	file:
-epsmonitorall_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+epsgettype_	src/eps/interface/ftn-custom/zepsf.c	60;"	d	file:
+epsmonitorall_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 epsmonitorall_	src/eps/interface/ftn-custom/zepsf.c	37;"	d	file:
-epsmonitorall_	src/eps/interface/ftn-custom/zepsf.c	60;"	d	file:
-epsmonitorconverged_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorconverged_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+epsmonitorall_	src/eps/interface/ftn-custom/zepsf.c	61;"	d	file:
+epsmonitorconverged_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorconverged_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)$/;"	f
 epsmonitorconverged_	src/eps/interface/ftn-custom/zepsf.c	41;"	d	file:
-epsmonitorconverged_	src/eps/interface/ftn-custom/zepsf.c	64;"	d	file:
-epsmonitorfirst_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorfirst_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+epsmonitorconverged_	src/eps/interface/ftn-custom/zepsf.c	65;"	d	file:
+epsmonitorfirst_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorfirst_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 epsmonitorfirst_	src/eps/interface/ftn-custom/zepsf.c	42;"	d	file:
-epsmonitorfirst_	src/eps/interface/ftn-custom/zepsf.c	65;"	d	file:
+epsmonitorfirst_	src/eps/interface/ftn-custom/zepsf.c	66;"	d	file:
 epsmonitorlg_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorlg_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
 epsmonitorlg_	src/eps/interface/ftn-custom/zepsf.c	38;"	d	file:
-epsmonitorlg_	src/eps/interface/ftn-custom/zepsf.c	61;"	d	file:
+epsmonitorlg_	src/eps/interface/ftn-custom/zepsf.c	62;"	d	file:
 epsmonitorlgall_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void epsmonitorlgall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
 epsmonitorlgall_	src/eps/interface/ftn-custom/zepsf.c	39;"	d	file:
-epsmonitorlgall_	src/eps/interface/ftn-custom/zepsf.c	62;"	d	file:
+epsmonitorlgall_	src/eps/interface/ftn-custom/zepsf.c	63;"	d	file:
 epsmonitorset_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsmonitorset_(EPS *eps,void (PETSC_STDCALL *monitor)(EPS*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
 epsmonitorset_	src/eps/interface/ftn-custom/zepsf.c	40;"	d	file:
-epsmonitorset_	src/eps/interface/ftn-custom/zepsf.c	63;"	d	file:
+epsmonitorset_	src/eps/interface/ftn-custom/zepsf.c	64;"	d	file:
 epsreasonview_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsreasonview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 epsreasonview_	src/eps/interface/ftn-custom/zepsf.c	29;"	d	file:
-epsreasonview_	src/eps/interface/ftn-custom/zepsf.c	52;"	d	file:
+epsreasonview_	src/eps/interface/ftn-custom/zepsf.c	53;"	d	file:
 epssetarbitraryselection_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epssetarbitraryselection_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,Vec*,Vec*,PetscScalar*,PetscScalar*,void*,PetscErrorCode*),void *ctx,PetscErrorCode *ierr)$/;"	f
-epssetarbitraryselection_	src/eps/interface/ftn-custom/zepsf.c	48;"	d	file:
-epssetarbitraryselection_	src/eps/interface/ftn-custom/zepsf.c	71;"	d	file:
+epssetarbitraryselection_	src/eps/interface/ftn-custom/zepsf.c	49;"	d	file:
+epssetarbitraryselection_	src/eps/interface/ftn-custom/zepsf.c	73;"	d	file:
 epssetconvergencetestfunction_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epssetconvergencetestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
 epssetconvergencetestfunction_	src/eps/interface/ftn-custom/zepsf.c	46;"	d	file:
-epssetconvergencetestfunction_	src/eps/interface/ftn-custom/zepsf.c	69;"	d	file:
+epssetconvergencetestfunction_	src/eps/interface/ftn-custom/zepsf.c	70;"	d	file:
 epsseteigenvaluecomparison_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsseteigenvaluecomparison_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)$/;"	f
-epsseteigenvaluecomparison_	src/eps/interface/ftn-custom/zepsf.c	47;"	d	file:
-epsseteigenvaluecomparison_	src/eps/interface/ftn-custom/zepsf.c	70;"	d	file:
+epsseteigenvaluecomparison_	src/eps/interface/ftn-custom/zepsf.c	48;"	d	file:
+epsseteigenvaluecomparison_	src/eps/interface/ftn-custom/zepsf.c	72;"	d	file:
 epssetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epssetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 epssetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	32;"	d	file:
-epssetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	55;"	d	file:
+epssetoptionsprefix_	src/eps/interface/ftn-custom/zepsf.c	56;"	d	file:
+epssetstoppingtestfunction_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epssetstoppingtestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+epssetstoppingtestfunction_	src/eps/interface/ftn-custom/zepsf.c	47;"	d	file:
+epssetstoppingtestfunction_	src/eps/interface/ftn-custom/zepsf.c	71;"	d	file:
 epssettype_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epssettype_(EPS *eps,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 epssettype_	src/eps/interface/ftn-custom/zepsf.c	35;"	d	file:
-epssettype_	src/eps/interface/ftn-custom/zepsf.c	58;"	d	file:
+epssettype_	src/eps/interface/ftn-custom/zepsf.c	59;"	d	file:
+epsstoppingbasic_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsstoppingbasic_(EPS *eps,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,EPSConvergedReason *reason,void *ctx,PetscErrorCode *ierr)$/;"	f
 epsvaluesview_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsvaluesview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 epsvaluesview_	src/eps/interface/ftn-custom/zepsf.c	30;"	d	file:
-epsvaluesview_	src/eps/interface/ftn-custom/zepsf.c	53;"	d	file:
+epsvaluesview_	src/eps/interface/ftn-custom/zepsf.c	54;"	d	file:
 epsvectorsview_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsvectorsview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 epsvectorsview_	src/eps/interface/ftn-custom/zepsf.c	31;"	d	file:
-epsvectorsview_	src/eps/interface/ftn-custom/zepsf.c	54;"	d	file:
+epsvectorsview_	src/eps/interface/ftn-custom/zepsf.c	55;"	d	file:
 epsview_	src/eps/interface/ftn-custom/zepsf.c	/^PETSC_EXTERN void PETSC_STDCALL epsview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 epsview_	src/eps/interface/ftn-custom/zepsf.c	27;"	d	file:
-epsview_	src/eps/interface/ftn-custom/zepsf.c	50;"	d	file:
+epsview_	src/eps/interface/ftn-custom/zepsf.c	51;"	d	file:
 errest	include/slepc/private/epsimpl.h	/^  PetscReal      *errest;          \/* error estimates *\/$/;"	m	struct:_p_EPS
 errest	include/slepc/private/mfnimpl.h	/^  PetscReal      errest;         \/* error estimate *\/$/;"	m	struct:_p_MFN
 errest	include/slepc/private/nepimpl.h	/^  PetscReal      *errest;          \/* error estimates *\/$/;"	m	struct:_p_NEP
 errest	include/slepc/private/pepimpl.h	/^  PetscReal      *errest;          \/* error estimates *\/$/;"	m	struct:_p_PEP
-errest	include/slepc/private/svdimpl.h	/^  PetscReal        *errest;     \/* error estimates *\/$/;"	m	struct:_p_SVD
+errest	include/slepc/private/svdimpl.h	/^  PetscReal      *errest;          \/* error estimates *\/$/;"	m	struct:_p_SVD
 errest	src/eps/impls/davidson/davidson.h	/^  PetscReal   *errest;        \/* relative error eigenpairs *\/$/;"	m	struct:_dvdDashboard
 errest	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     *errest;      \/* error estimates (for subsolve) *\/$/;"	m	struct:_n_SR
 errorifnotconverged	include/slepc/private/mfnimpl.h	/^  PetscBool      errorifnotconverged;    \/* error out if MFNSolve() does not converge *\/$/;"	m	struct:_p_MFN
-est_eig	src/eps/impls/ciss/ciss.c	/^  PetscReal    est_eig;$/;"	m	struct:__anon47	file:
-est_eig	src/nep/impls/ciss/nciss.c	/^  PetscReal    est_eig;$/;"	m	struct:__anon77	file:
+est_eig	src/eps/impls/ciss/ciss.c	/^  PetscReal         est_eig;$/;"	m	struct:__anon61	file:
+est_eig	src/nep/impls/ciss/nciss.c	/^  PetscReal    est_eig;$/;"	m	struct:__anon89	file:
 evaluatederivative	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*evaluatederivative)(FN,PetscScalar,PetscScalar*);$/;"	m	struct:_FNOps
 evaluatefunction	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*evaluatefunction)(FN,PetscScalar,PetscScalar*);$/;"	m	struct:_FNOps
 evaluatefunctionmat	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*evaluatefunctionmat)(FN,Mat,Mat);$/;"	m	struct:_FNOps
 evaluatefunctionmatsym	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*evaluatefunctionmatsym)(FN,Mat,Mat);$/;"	m	struct:_FNOps
+evaluatefunctionmatvec	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*evaluatefunctionmatvec)(FN,Mat,Vec);$/;"	m	struct:_FNOps
+evaluatefunctionmatvecsym	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*evaluatefunctionmatvecsym)(FN,Mat,Vec);$/;"	m	struct:_FNOps
 exit	setup.py	/^    def exit(self):$/;"	m	class:context
-explicitmatrix	src/pep/impls/linear/linearp.h	/^  PetscBool  explicitmatrix;$/;"	m	struct:__anon88
-explicitmatrix	src/svd/impls/cyclic/cyclic.c	/^  PetscBool explicitmatrix;$/;"	m	struct:__anon92	file:
+explicitmatrix	src/pep/impls/linear/linearp.h	/^  PetscBool  explicitmatrix;$/;"	m	struct:__anon106
+explicitmatrix	src/svd/impls/cyclic/cyclic.c	/^  PetscBool explicitmatrix;$/;"	m	struct:__anon111	file:
 ext	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     ext[2];       \/* Limits for accepted values *\/$/;"	m	struct:_n_shift
 externalpackages	config/configure.py	/^externalpackages = [arpack, blopex, blzpack, feast, primme, trlan]$/;"	v
 extract	include/slepc/private/pepimpl.h	/^  PEPExtract     extract;          \/* type of extraction used *\/$/;"	m	struct:_p_PEP
 extraction	include/slepc/private/epsimpl.h	/^  EPSExtraction  extraction;       \/* which kind of extraction to be applied *\/$/;"	m	struct:_p_EPS
+extraction	src/eps/impls/ciss/ciss.c	/^  EPSCISSExtraction extraction;$/;"	m	struct:__anon61	file:
 extractvectors	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*extractvectors)(PEP);$/;"	m	struct:_PEPOps
 extrarow	include/slepc/private/dsimpl.h	/^  PetscBool      extrarow;           \/* assume the matrix dimension is (n+1) x n *\/$/;"	m	struct:_p_DS
 f	config/configure.py	/^      f = open(os.path.join(confdir,'slepcvariables'),'r')$/;"	v
 f	include/slepc/private/nepimpl.h	/^  FN             *f;               \/* matrix functions of split form *\/$/;"	m	struct:_p_NEP
 f	src/eps/impls/davidson/davidson.h	/^  dvdCallback f;$/;"	m	struct:_dvdFunctionList
-f	src/sys/classes/ds/impls/nep/dsnep.c	/^  FN       f[DS_NUM_EXTRA];    \/* functions defining the nonlinear operator *\/$/;"	m	struct:__anon100	file:
-f1	src/sys/classes/fn/impls/combine/fncombine.c	/^  FN            f1,f2;    \/* functions *\/$/;"	m	struct:__anon102	file:
-f2	src/sys/classes/fn/impls/combine/fncombine.c	/^  FN            f1,f2;    \/* functions *\/$/;"	m	struct:__anon102	file:
+f	src/sys/classes/ds/impls/nep/dsnep.c	/^  FN       f[DS_NUM_EXTRA];    \/* functions defining the nonlinear operator *\/$/;"	m	struct:__anon119	file:
+f1	src/sys/classes/fn/impls/combine/fncombine.c	/^  FN            f1,f2;    \/* functions *\/$/;"	m	struct:__anon121	file:
+f2	src/sys/classes/fn/impls/combine/fncombine.c	/^  FN            f1,f2;    \/* functions *\/$/;"	m	struct:__anon121	file:
 feast	config/configure.py	/^feast   = feast.Feast(argdb,log)$/;"	v
-fih	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *fih;$/;"	m	struct:__anon86	file:
+fih	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *fih,*work,*M4;$/;"	m	struct:__anon104	file:
 finalize_options	setup.py	/^    def finalize_options(self):$/;"	m	class:cmd_install
-fix	src/eps/impls/davidson/davidson.c	/^  PetscReal fix;           \/* the fix parameter *\/$/;"	m	struct:__anon48	file:
-fix	src/eps/impls/davidson/dvdimprovex.c	/^  PetscReal    fix;                \/* tolerance for using the approx. eigenvalue *\/$/;"	m	struct:__anon55	file:
+fix	src/eps/impls/davidson/davidson.h	/^  PetscReal fix;           \/* the fix parameter *\/$/;"	m	struct:__anon65
+fix	src/eps/impls/davidson/dvdimprovex.c	/^  PetscReal    fix;                \/* tolerance for using the approx. eigenvalue *\/$/;"	m	struct:__anon68	file:
 fixConf	config/install.py	/^  def fixConf(self):$/;"	m	class:Installer
 fixConfFile	config/install.py	/^  def fixConfFile(self, src):$/;"	m	class:Installer
-flglk	src/pep/impls/jd/pjdp.h	/^  PetscBool   flglk;         \/* whether in locking step *\/$/;"	m	struct:__anon82
-flgre	src/pep/impls/jd/pjdp.h	/^  PetscBool   flgre;         \/* whether in restarting step *\/$/;"	m	struct:__anon82
 fn	include/slepc/private/mfnimpl.h	/^  FN             fn;             \/* which function to compute *\/$/;"	m	struct:_p_MFN
-fn	src/nep/interface/neprefine.c	/^  FN            *fn;$/;"	m	struct:__anon81	file:
+fn	src/nep/interface/neprefine.c	/^  FN            *fn;$/;"	m	struct:__anon97	file:
 fnappendoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	/^PETSC_EXTERN void PETSC_STDCALL fnappendoptionsprefix_(FN *fn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 fnappendoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	29;"	d	file:
 fnappendoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	36;"	d	file:
@@ -8862,7 +9774,6 @@ fngetoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	37;"	d	file:
 fngettype_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	/^PETSC_EXTERN void PETSC_STDCALL fngettype_(FN *fn,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 fngettype_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	32;"	d	file:
 fngettype_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	39;"	d	file:
-fnini	src/pep/impls/jd/pjdp.h	/^  PetscInt    fnini;         \/* first initial search space *\/$/;"	m	struct:__anon82
 fnsetoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	/^PETSC_EXTERN void PETSC_STDCALL fnsetoptionsprefix_(FN *fn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 fnsetoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	28;"	d	file:
 fnsetoptionsprefix_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	35;"	d	file:
@@ -8872,12 +9783,16 @@ fnsettype_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	38;"	d	file:
 fnview_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	/^PETSC_EXTERN void PETSC_STDCALL fnview_(FN *fn,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 fnview_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	27;"	d	file:
 fnview_	src/sys/classes/fn/interface/ftn-custom/zfnf.c	34;"	d	file:
-friends	include/slepc/private/vecimplslepc.h	/^  PetscInt      friends;  \/* number of vectors sharing this structure *\/$/;"	m	struct:__anon5
-friends	src/eps/impls/davidson/dvdimprovex.c	/^  Vec          friends;            \/* reference vector for composite vectors *\/$/;"	m	struct:__anon55	file:
+format	include/slepc/private/slepcimpl.h	/^  PetscViewerFormat format;$/;"	m	struct:_n_SlepcConvMonitor
+freq	src/eps/examples/tutorials/ex31.c	77;"	d	file:
+friends	include/slepc/private/vecimplslepc.h	/^  PetscInt      friends;  \/* number of vectors sharing this structure *\/$/;"	m	struct:__anon7
+friends	src/eps/impls/davidson/dvdimprovex.c	/^  Vec          friends;            \/* reference vector for composite vectors *\/$/;"	m	struct:__anon68	file:
+fui	include/slepc/private/nepimpl.h	/^  NEPUserInterface fui;            \/* how the user has defined the nonlinear operator *\/$/;"	m	struct:_p_NEP
 function	include/slepc/private/nepimpl.h	/^  Mat            function;         \/* function matrix *\/$/;"	m	struct:_p_NEP
 function_pre	include/slepc/private/nepimpl.h	/^  Mat            function_pre;     \/* function matrix (preconditioner) *\/$/;"	m	struct:_p_NEP
 functionctx	include/slepc/private/nepimpl.h	/^  void           *functionctx;$/;"	m	struct:_p_NEP
-gamma	src/pep/impls/jd/pjdp.h	/^  PetscScalar gamma;         \/* precomputed scalar u'*B\\p *\/$/;"	m	struct:__anon83
+gamma	src/pep/impls/jd/pjdp.h	/^  PetscScalar gamma;         \/* precomputed scalar u'*B\\p *\/$/;"	m	struct:__anon100
+gbus	src/eps/examples/tutorials/ex31.c	/^const PetscInt gbus[3] = {0,1,2}; \/* Buses at which generators are incident *\/$/;"	v
 gen_gnumake	config/gmakegen.py	/^    def gen_gnumake(self, fd):$/;"	m	class:Slepc
 gen_pkg	config/gmakegen.py	/^    def gen_pkg(self, pkg):$/;"	m	class:Slepc
 get_outputs	setup.py	/^    def get_outputs(self):$/;"	m	class:cmd_install
@@ -8885,16 +9800,17 @@ get_petsc_arch	setup.py	/^def get_petsc_arch():$/;"	f
 get_petsc_dir	setup.py	/^def get_petsc_dir():$/;"	f
 get_sources	config/gmakegen.py	/^    def get_sources(self, makevars):$/;"	m	class:Slepc
 getarray	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*getarray)(BV,PetscScalar**);$/;"	m	struct:_BVOps
+getarrayread	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*getarrayread)(BV,const PetscScalar**);$/;"	m	struct:_BVOps
 getbilinearform	include/slepc/private/stimpl.h	/^  PetscErrorCode (*getbilinearform)(ST,Mat*);$/;"	m	struct:_STOps
 getcolumn	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*getcolumn)(BV,PetscInt,Vec*);$/;"	m	struct:_BVOps
-global	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     global;             \/* flag distinguishing global from local eps *\/$/;"	m	struct:__anon69
+global	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool        global;             \/* flag distinguishing global from local eps *\/$/;"	m	struct:__anon81
 globaleps	src/eps/impls/external/trlan/trlan.c	/^static EPS globaleps;$/;"	v	file:
 globconf	config/configure.py	/^  globconf = CreateFile(os.path.join(slepc.dir,'lib','slepc','conf'),'slepcvariables',log)$/;"	v
 guess	include/slepc/private/vecimplslepc.h	/^  PetscInt guess;          \/* expected maximum number of vectors *\/$/;"	m	struct:VecPool_
 h	include/slepc/private/bvimpl.h	/^  PetscScalar        *h,*c;        \/* orthogonalization coefficients *\/$/;"	m	struct:_p_BV
-h	src/nep/examples/tutorials/ex20.c	/^  PetscReal   h;       \/* mesh spacing *\/$/;"	m	struct:__anon74	file:
-h	src/nep/examples/tutorials/ex21.c	/^  PetscReal   h;       \/* mesh spacing *\/$/;"	m	struct:__anon76	file:
-h	src/nep/examples/tutorials/ex21.c	/^  PetscReal   h;$/;"	m	struct:__anon75	file:
+h	src/nep/examples/tutorials/ex20.c	/^  PetscReal   h;       \/* mesh spacing *\/$/;"	m	struct:__anon86	file:
+h	src/nep/examples/tutorials/ex21.c	/^  PetscReal   h;       \/* mesh spacing *\/$/;"	m	struct:__anon88	file:
+h	src/nep/examples/tutorials/ex21.c	/^  PetscReal   h;$/;"	m	struct:__anon87	file:
 hasEnd	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     hasEnd;       \/* Tells whether the interval has an end *\/$/;"	m	struct:_n_SR
 help	docs/manual/ex1.c	/^static char help[] = "Standard symmetric eigenproblem corresponding to the Laplacian operator in 1 dimension.\\n\\n"$/;"	v	file:
 help	src/eps/examples/tests/test1.c	/^static char help[] = "Tests B-orthonormality of eigenvectors in a GHEP problem.\\n\\n";$/;"	v	file:
@@ -8921,28 +9837,37 @@ help	src/eps/examples/tutorials/ex19.c	/^static char help[] = "Standard symmetri
 help	src/eps/examples/tutorials/ex2.c	/^static char help[] = "Standard symmetric eigenproblem corresponding to the Laplacian operator in 2 dimensions.\\n\\n"$/;"	v	file:
 help	src/eps/examples/tutorials/ex24.c	/^static char help[] = "Spectrum folding for a standard symmetric eigenproblem.\\n\\n"$/;"	v	file:
 help	src/eps/examples/tutorials/ex25.c	/^static char help[] = "Spectrum slicing on generalized symmetric eigenproblem.\\n\\n"$/;"	v	file:
+help	src/eps/examples/tutorials/ex29.c	/^static char help[] = "Solves the same problem as in ex5, with a user-defined stopping test."$/;"	v	file:
 help	src/eps/examples/tutorials/ex3.c	/^static char help[] = "Solves the same eigenproblem as in example ex2, but using a shell matrix. "$/;"	v	file:
+help	src/eps/examples/tutorials/ex30.c	/^static char help[] = "Illustrates the use of a region for filtering; the number of wanted eigenvalues in not known a priori.\\n\\n"$/;"	v	file:
+help	src/eps/examples/tutorials/ex31.c	/^static char help[] = "Power grid small signal stability analysis of WECC 9 bus system.\\n\\$/;"	v	file:
 help	src/eps/examples/tutorials/ex4.c	/^static char help[] = "Solves a standard eigensystem Ax=kx with the matrix loaded from a file.\\n"$/;"	v	file:
 help	src/eps/examples/tutorials/ex5.c	/^static char help[] = "Eigenvalue problem associated with a Markov model of a random walk on a triangular grid. "$/;"	v	file:
 help	src/eps/examples/tutorials/ex7.c	/^static char help[] = "Solves a generalized eigensystem Ax=kBx with matrices loaded from a file.\\n"$/;"	v	file:
 help	src/eps/examples/tutorials/ex9.c	/^static char help[] = "Solves a problem associated to the Brusselator wave model in chemical reactions, illustrating the use of shell matrices.\\n\\n"$/;"	v	file:
-help	src/mfn/examples/tutorials/ex23.c	/^static char help[] = "Computes exp(A)*v for a matrix associated with a Markov model.\\n\\n"$/;"	v	file:
-help	src/nep/examples/nlevp/loaded_string.c	/^static char help[] = "NLEVP problem: loaded_string.\\n\\n"$/;"	v	file:
+help	src/mfn/examples/tests/test1.c	/^static char help[] = "Computes exp(A)*v for a matrix loaded from file.\\n\\n"$/;"	v	file:
+help	src/mfn/examples/tutorials/ex23.c	/^static char help[] = "Computes exp(t*A)*v for a matrix associated with a Markov model.\\n\\n"$/;"	v	file:
+help	src/mfn/examples/tutorials/ex26.c	/^static char help[] = "Computes the action of the square root of the 2-D Laplacian.\\n\\n"$/;"	v	file:
+help	src/nep/examples/nlevp/gun.c	/^static char help[] = "Radio-frequency gun cavity.\\n\\n"$/;"	v	file:
+help	src/nep/examples/nlevp/loaded_string.c	/^static char help[] = "Finite element model of a loaded vibrating string.\\n\\n"$/;"	v	file:
 help	src/nep/examples/tutorials/ex20.c	/^static char help[] = "Simple 1-D nonlinear eigenproblem.\\n\\n"$/;"	v	file:
 help	src/nep/examples/tutorials/ex21.c	/^static char help[] = "Simple 1-D nonlinear eigenproblem (matrix-free version, sequential).\\n\\n"$/;"	v	file:
 help	src/nep/examples/tutorials/ex22.c	/^static char help[] = "Delay differential equation.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/acoustic_wave_1d.c	/^static char help[] = "NLEVP problem: acoustic_wave_1d.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/acoustic_wave_2d.c	/^static char help[] = "NLEVP problem: acoustic_wave_2d.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/butterfly.c	/^static char help[] = "NLEVP problem: butterfly.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/damped_beam.c	/^static char help[] = "NLEVP problem: damped_beam.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/pdde_stability.c	/^static char help[] = "NLEVP problem: pdde_stability.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/planar_waveguide.c	/^static char help[] = "NLEVP problem: planar_waveguide.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/sleeper.c	/^static char help[] = "NLEVP problem: sleeper.\\n\\n"$/;"	v	file:
-help	src/pep/examples/nlevp/spring.c	/^static char help[] = "NLEVP problem: spring.\\n\\n"$/;"	v	file:
+help	src/nep/examples/tutorials/ex27.c	/^static char help[] = "Simple nonlinear eigenproblem using the NLEIGS solver.\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/acoustic_wave_1d.c	/^static char help[] = "Quadratic eigenproblem from an acoustics application (1-D).\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/acoustic_wave_2d.c	/^static char help[] = "Quadratic eigenproblem from an acoustics application (2-D).\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/butterfly.c	/^static char help[] = "Quartic polynomial eigenproblem with T-even structure.\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/damped_beam.c	/^static char help[] = "Quadratic eigenproblem from the vibrarion analysis of a beam.\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/pdde_stability.c	/^static char help[] = "Stability analysis of a discretized partial delay-differential equation.\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/planar_waveguide.c	/^static char help[] = "FEM solution of the propagation constants in a six-layer planar waveguide.\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/sleeper.c	/^static char help[] = "Oscillations of a rail track resting on sleepers.\\n\\n"$/;"	v	file:
+help	src/pep/examples/nlevp/spring.c	/^static char help[] = "FEM model of a damped mass-spring system.\\n\\n"$/;"	v	file:
 help	src/pep/examples/tests/test1.c	/^static char help[] = "Test the solution of a PEP without calling PEPSetFromOptions (based on ex16.c).\\n\\n"$/;"	v	file:
 help	src/pep/examples/tests/test2.c	/^static char help[] = "Test the solution of a PEP from a finite element model of "$/;"	v	file:
-help	src/pep/examples/tutorials/ex16.c	/^static char help[] = "Quadratic eigenproblem for testing the PEP object.\\n\\n"$/;"	v	file:
+help	src/pep/examples/tests/test3.c	/^static char help[] = "Test PEP interface functions.\\n\\n";$/;"	v	file:
+help	src/pep/examples/tutorials/ex16.c	/^static char help[] = "Simple quadratic eigenvalue problem.\\n\\n"$/;"	v	file:
 help	src/pep/examples/tutorials/ex17.c	/^static char help[] = "Solves a polynomial eigenproblem P(l)x = 0 with matrices loaded from a file.\\n\\n"$/;"	v	file:
+help	src/pep/examples/tutorials/ex28.c	/^static char help[] = "A quadratic eigenproblem defined using shell matrices.\\n\\n"$/;"	v	file:
 help	src/svd/examples/tests/test1.c	/^static char help[] = "Test the solution of a SVD without calling SVDSetFromOptions (based on ex8.c).\\n\\n"$/;"	v	file:
 help	src/svd/examples/tests/test2.c	/^static char help[] = "Test SVD with different builds with a matrix loaded from a file"$/;"	v	file:
 help	src/svd/examples/tests/test3.c	/^static char help[] = "Test SVD with user-provided initial vectors.\\n\\n"$/;"	v	file:
@@ -8952,6 +9877,7 @@ help	src/svd/examples/tutorials/ex8.c	/^static char help[] = "Estimates the 2-no
 help	src/sys/classes/bv/examples/tests/test1.c	/^static char help[] = "Test BV operations.\\n\\n";$/;"	v	file:
 help	src/sys/classes/bv/examples/tests/test10.c	/^static char help[] = "Test split reductions in BV.\\n\\n";$/;"	v	file:
 help	src/sys/classes/bv/examples/tests/test11.c	/^static char help[] = "Test BV block orthogonalization.\\n\\n";$/;"	v	file:
+help	src/sys/classes/bv/examples/tests/test12.c	/^static char help[] = "Test block orthogonalization on a rank-deficient BV.\\n\\n";$/;"	v	file:
 help	src/sys/classes/bv/examples/tests/test2.c	/^static char help[] = "Test BV orthogonalization functions.\\n\\n";$/;"	v	file:
 help	src/sys/classes/bv/examples/tests/test3.c	/^static char help[] = "Test BV operations with non-standard inner product.\\n\\n";$/;"	v	file:
 help	src/sys/classes/bv/examples/tests/test4.c	/^static char help[] = "Test BV operations, changing the number of active columns.\\n\\n";$/;"	v	file:
@@ -8978,28 +9904,29 @@ help	src/sys/classes/fn/examples/tests/test3.c	/^static char help[] = "Test matr
 help	src/sys/classes/fn/examples/tests/test4.c	/^static char help[] = "Test setting FN parameters from the command line.\\n\\n";$/;"	v	file:
 help	src/sys/classes/fn/examples/tests/test5.c	/^static char help[] = "Test matrix rational function.\\n\\n";$/;"	v	file:
 help	src/sys/classes/fn/examples/tests/test6.c	/^static char help[] = "Test combined function.\\n\\n";$/;"	v	file:
+help	src/sys/classes/fn/examples/tests/test7.c	/^static char help[] = "Test matrix square root.\\n\\n";$/;"	v	file:
+help	src/sys/classes/fn/examples/tests/test8.c	/^static char help[] = "Test matrix inverse square root.\\n\\n";$/;"	v	file:
 help	src/sys/classes/rg/examples/tests/test1.c	/^static char help[] = "Test RG interface functions.\\n\\n";$/;"	v	file:
 help	src/sys/classes/st/examples/tests/test1.c	/^static char help[] = "Test ST with shell matrices.\\n\\n";$/;"	v	file:
 help	src/sys/classes/st/examples/tests/test2.c	/^static char help[] = "Test ST with one matrix.\\n\\n";$/;"	v	file:
 help	src/sys/classes/st/examples/tests/test3.c	/^static char help[] = "Test ST with two matrices.\\n\\n";$/;"	v	file:
 help	src/sys/classes/st/examples/tests/test4.c	/^static char help[] = "Test ST with four matrices.\\n\\n";$/;"	v	file:
-htol	src/pep/impls/jd/pjdp.h	/^  PetscReal   htol;          \/* tolerance for harmonic JD *\/$/;"	m	struct:__anon82
-iXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  *iXKZ;              \/* inverse of XKZ *\/$/;"	m	struct:__anon55	file:
-iXKZPivots	src/eps/impls/davidson/dvdimprovex.c	/^  PetscBLASInt *iXKZPivots;        \/* array of pivots *\/$/;"	m	struct:__anon55	file:
+iXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  *iXKZ;              \/* inverse of XKZ *\/$/;"	m	struct:__anon68	file:
+iXKZPivots	src/eps/impls/davidson/dvdimprovex.c	/^  PetscBLASInt *iXKZPivots;        \/* array of pivots *\/$/;"	m	struct:__anon68	file:
 id	include/slepc/private/bvimpl.h	/^  PetscObjectId      id[2];        \/* object id of obtained vectors *\/$/;"	m	struct:_p_BV
-idx	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     idx;$/;"	m	struct:__anon87	file:
+idx	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     idx,*cols;$/;"	m	struct:__anon105	file:
 idx	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscInt    idx[2];$/;"	m	struct:HRtr	file:
 idxDef	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      *idxDef;      \/* For deflation *\/$/;"	m	struct:_n_SR
-idxg	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon87	file:
-idxp	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon87	file:
-ii	src/eps/impls/external/blopex/blopex.c	/^  mv_InterfaceInterpreter    ii;$/;"	m	struct:__anon63	file:
-impltrans	include/slepc/private/svdimpl.h	/^  PetscBool        impltrans;   \/* implicit transpose mode *\/$/;"	m	struct:_p_SVD
-improveX	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improveX)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);$/;"	m	struct:_dvdDashboard
+idxg	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon105	file:
+idxp	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon105	file:
+idxrk	src/nep/impls/nleigs/nleigs.c	/^  PetscInt       idxrk;     \/* index of next shift to use *\/$/;"	m	struct:__anon92	file:
+ii	src/eps/impls/external/blopex/blopex.c	/^  mv_InterfaceInterpreter    ii;$/;"	m	struct:__anon75	file:
+impltrans	include/slepc/private/svdimpl.h	/^  PetscBool      impltrans;        \/* implicit transpose mode *\/$/;"	m	struct:_p_SVD
+improveX	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improveX)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt*);$/;"	m	struct:_dvdDashboard
 improveX_data	src/eps/impls/davidson/davidson.h	/^  void *improveX_data;$/;"	m	struct:_dvdDashboard
-improveX_type	src/eps/impls/davidson/davidson.h	/^typedef PetscErrorCode (*improveX_type)(dvdDashboard*,Vec *D,PetscInt max_size_D,PetscInt r_s,PetscInt r_e,PetscInt *size_D);$/;"	t
-improvex_jd_lit	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improvex_jd_lit)(struct _dvdDashboard*,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol);$/;"	m	struct:_dvdDashboard
-improvex_jd_proj_uv	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improvex_jd_proj_uv)(struct _dvdDashboard*,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld);$/;"	m	struct:_dvdDashboard
-improvex_precond	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improvex_precond)(struct _dvdDashboard*,PetscInt i,Vec x,Vec Px);$/;"	m	struct:_dvdDashboard
+improvex_jd_lit	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improvex_jd_lit)(struct _dvdDashboard*,PetscInt,PetscScalar*,PetscScalar*,PetscInt*,PetscReal*);$/;"	m	struct:_dvdDashboard
+improvex_jd_proj_uv	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improvex_jd_proj_uv)(struct _dvdDashboard*,PetscInt,PetscInt,Vec*,Vec*,Vec*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt);$/;"	m	struct:_dvdDashboard
+improvex_precond	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*improvex_precond)(struct _dvdDashboard*,PetscInt,Vec,Vec);$/;"	m	struct:_dvdDashboard
 improvex_precond_data	src/eps/impls/davidson/davidson.h	/^  void *improvex_precond_data;$/;"	m	struct:_dvdDashboard
 includedir	config/configure.py	/^includedir = CreateDir(archdir,'include',log)$/;"	v
 inconf	config/gmakegen.py	/^    def inconf(self, key, val):$/;"	m	class:Slepc
@@ -9009,11 +9936,11 @@ indexEig	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      indexE
 inertia	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      inertia;$/;"	m	struct:_n_shift
 inertia0	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      inertia0,inertia1;$/;"	m	struct:_n_SR
 inertia1	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      inertia0,inertia1;$/;"	m	struct:_n_SR
-inertias	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      *inertias;          \/* array containing global inertias *\/$/;"	m	struct:__anon69
+inertias	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt         *inertias;          \/* array containing global inertias *\/$/;"	m	struct:__anon81
 initV	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*initV)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
 initV_data	src/eps/impls/davidson/davidson.h	/^  void *initV_data;$/;"	m	struct:_dvdDashboard
 initialize_options	setup.py	/^    def initialize_options(self):$/;"	m	class:cmd_install
-initialsize	src/eps/impls/davidson/davidson.c	/^  PetscInt  initialsize;   \/* initial size of V *\/$/;"	m	struct:__anon48	file:
+initialsize	src/eps/impls/davidson/davidson.h	/^  PetscInt  initialsize;   \/* initial size of V *\/$/;"	m	struct:__anon65
 install	setup.py	/^def install(dest_dir, dry_run=False):$/;"	f
 installBin	config/install.py	/^  def installBin(self):$/;"	m	class:Installer
 installConf	config/install.py	/^  def installConf(self):$/;"	m	class:Installer
@@ -9024,84 +9951,103 @@ int0	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     int0,int1;
 int1	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     int0,int1;    \/* Extremes of the interval *\/$/;"	m	struct:_n_SR
 inta	include/slepc/private/epsimpl.h	/^  PetscReal      inta,intb;        \/* interval [a,b] for spectrum slicing *\/$/;"	m	struct:_p_EPS
 intb	include/slepc/private/epsimpl.h	/^  PetscReal      inta,intb;        \/* interval [a,b] for spectrum slicing *\/$/;"	m	struct:_p_EPS
-ipB	src/eps/impls/davidson/davidson.c	/^  PetscBool ipB;           \/* true if B-ortho is used *\/$/;"	m	struct:__anon48	file:
+ipB	src/eps/impls/davidson/davidson.h	/^  PetscBool ipB;           \/* true if B-ortho is used *\/$/;"	m	struct:__anon65
 isGhost	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode isGhost(EPS eps,PetscInt ld,PetscInt nv,PetscBool *fl)$/;"	f	file:
 isGhost	src/nep/impls/ciss/nciss.c	/^static PetscErrorCode isGhost(NEP nep,PetscInt ld,PetscInt nv,PetscBool *fl)$/;"	f	file:
 isRestarting	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*isRestarting)(struct _dvdDashboard*,PetscBool*);$/;"	m	struct:_dvdDashboard
 isRestarting_data	src/eps/impls/davidson/davidson.h	/^  void *isRestarting_data;$/;"	m	struct:_dvdDashboard
-isRestarting_type	src/eps/impls/davidson/davidson.h	/^typedef PetscErrorCode (*isRestarting_type)(dvdDashboard*,PetscBool*);$/;"	t
+is_alg	src/eps/examples/tutorials/ex31.c	/^  IS       is_alg;       \/* indices for algebraic equations *\/$/;"	m	struct:__anon57	file:
+is_diff	src/eps/examples/tutorials/ex31.c	/^  IS       is_diff;      \/* indices for differential equations *\/$/;"	m	struct:__anon57	file:
+iscol	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  IS               isrow,iscol;        \/* index sets used in update of subcomm mats *\/$/;"	m	struct:__anon81
 isgeneralized	include/slepc/private/epsimpl.h	/^  PetscBool      isgeneralized;$/;"	m	struct:_p_EPS
 ishermitian	include/slepc/private/epsimpl.h	/^  PetscBool      ishermitian;$/;"	m	struct:_p_EPS
 ispositive	include/slepc/private/epsimpl.h	/^  PetscBool      ispositive;$/;"	m	struct:_p_EPS
-isreal	src/eps/impls/ciss/ciss.c	/^  PetscBool   isreal;     \/* A and B are real *\/$/;"	m	struct:__anon47	file:
-isreal	src/nep/impls/ciss/nciss.c	/^  PetscBool    isreal;     \/* A and B are real *\/$/;"	m	struct:__anon77	file:
-istor	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         *istor;$/;"	m	struct:__anon64
+isreal	src/eps/impls/ciss/ciss.c	/^  PetscBool         isreal;     \/* A and B are real *\/$/;"	m	struct:__anon61	file:
+isreal	src/nep/impls/ciss/nciss.c	/^  PetscBool    isreal;     \/* T(z) is real for real z *\/$/;"	m	struct:__anon89	file:
+isrow	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  IS               isrow,iscol;        \/* index sets used in update of subcomm mats *\/$/;"	m	struct:__anon81
+istor	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         *istor;$/;"	m	struct:__anon76
 istrivial	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*istrivial)(RG,PetscBool*);$/;"	m	struct:_RGOps
 iterCompl	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      iterCompl;$/;"	m	struct:_n_SR
 its	include/slepc/private/epsimpl.h	/^  PetscInt       its;              \/* number of iterations so far computed *\/$/;"	m	struct:_p_EPS
 its	include/slepc/private/mfnimpl.h	/^  PetscInt       its;            \/* number of iterations so far computed *\/$/;"	m	struct:_p_MFN
 its	include/slepc/private/nepimpl.h	/^  PetscInt       its;              \/* number of iterations so far computed *\/$/;"	m	struct:_p_NEP
 its	include/slepc/private/pepimpl.h	/^  PetscInt       its;              \/* number of iterations so far computed *\/$/;"	m	struct:_p_PEP
-its	include/slepc/private/svdimpl.h	/^  PetscInt         its;         \/* iteration counter *\/$/;"	m	struct:_p_SVD
+its	include/slepc/private/svdimpl.h	/^  PetscInt       its;              \/* iteration counter *\/$/;"	m	struct:_p_SVD
 itsKs	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      itsKs;        \/* Krylovschur restarts *\/$/;"	m	struct:_n_SR
 iwork	include/slepc/private/dsimpl.h	/^  PetscBLASInt   *iwork;$/;"	m	struct:_p_DS
 jacobian	include/slepc/private/nepimpl.h	/^  Mat            jacobian;         \/* Jacobian matrix *\/$/;"	m	struct:_p_NEP
 jacobianctx	include/slepc/private/nepimpl.h	/^  void           *jacobianctx;$/;"	m	struct:_p_NEP
 k	include/slepc/private/bvimpl.h	/^  PetscInt           k;            \/* number of active columns *\/$/;"	m	struct:_p_BV
 k	include/slepc/private/dsimpl.h	/^  PetscInt       k;                  \/* intermediate dimension (e.g. position of arrow) *\/$/;"	m	struct:_p_DS
-k	src/eps/impls/davidson/dvdinitv.c	/^  PetscInt k;                 \/* desired initial subspace size *\/$/;"	m	struct:__anon56	file:
-k	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     k,nmat;$/;"	m	struct:__anon86	file:
-k	src/sys/classes/fn/impls/phi/fnphi.c	/^  PetscInt k;    \/* index of the phi-function, defaults to k=1 *\/$/;"	m	struct:__anon103	file:
-kappa	src/nep/examples/tutorials/ex20.c	/^  PetscScalar kappa;   \/* ratio between stiffness of spring and attached mass *\/$/;"	m	struct:__anon74	file:
-kappa	src/nep/examples/tutorials/ex21.c	/^  PetscScalar kappa;   \/* ratio between stiffness of spring and attached mass *\/$/;"	m	struct:__anon76	file:
-kappa	src/nep/examples/tutorials/ex21.c	/^  PetscScalar lambda,kappa;$/;"	m	struct:__anon75	file:
-keep	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     keep;               \/* restart parameter *\/$/;"	m	struct:__anon69
-keep	src/pep/impls/jd/pjdp.h	/^  PetscReal   keep;          \/* restart parameter *\/$/;"	m	struct:__anon82
-keep	src/pep/impls/krylov/pepkrylov.h	/^  PetscReal   keep;         \/* restart parameter *\/$/;"	m	struct:__anon84
-keep	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^  PetscReal keep;         \/* restart parameter *\/$/;"	m	struct:__anon85	file:
+k	src/eps/impls/davidson/dvdinitv.c	/^  PetscInt k;                 \/* desired initial subspace size *\/$/;"	m	struct:__anon69	file:
+k	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     k,nmat;$/;"	m	struct:__anon104	file:
+k	src/sys/classes/fn/impls/phi/fnphi.c	/^  PetscInt k;    \/* index of the phi-function, defaults to k=1 *\/$/;"	m	struct:__anon122	file:
+k1	src/eps/examples/tutorials/ex31.c	/^const PetscScalar k1[3] = {0.0039,0.0039,0.0039};$/;"	v
+k2	src/eps/examples/tutorials/ex31.c	/^const PetscScalar k2[3] = {1.555,1.555,1.555};  \/* k1 and k2 for calculating the saturation function SE = k1*exp(k2*Efd) *\/$/;"	v
+kappa	src/nep/examples/tutorials/ex20.c	/^  PetscScalar kappa;   \/* ratio between stiffness of spring and attached mass *\/$/;"	m	struct:__anon86	file:
+kappa	src/nep/examples/tutorials/ex21.c	/^  PetscScalar kappa;   \/* ratio between stiffness of spring and attached mass *\/$/;"	m	struct:__anon88	file:
+kappa	src/nep/examples/tutorials/ex21.c	/^  PetscScalar lambda,kappa;$/;"	m	struct:__anon87	file:
+keep	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal        keep;               \/* restart parameter *\/$/;"	m	struct:__anon81
+keep	src/nep/impls/nleigs/nleigs.c	/^  PetscReal      keep;      \/* restart parameter *\/$/;"	m	struct:__anon92	file:
+keep	src/pep/impls/jd/pjdp.h	/^  PetscReal   keep;          \/* restart parameter *\/$/;"	m	struct:__anon99
+keep	src/pep/impls/krylov/pepkrylov.h	/^  PetscReal   keep;         \/* restart parameter *\/$/;"	m	struct:__anon102
+keep	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^  PetscReal keep;         \/* restart parameter *\/$/;"	m	struct:__anon103	file:
 keywords	setup.py	/^      keywords = ['SLEPc','PETSc', 'MPI'],$/;"	v
-krylovstart	src/eps/impls/davidson/davidson.c	/^  PetscBool krylovstart;   \/* true if the starting subspace is a Krylov basis *\/$/;"	m	struct:__anon48	file:
-ksp	include/slepc/private/nepimpl.h	/^  KSP            ksp;              \/* linear solver object *\/$/;"	m	struct:_p_NEP
+krylovstart	src/eps/impls/davidson/davidson.h	/^  PetscBool krylovstart;   \/* true if the starting subspace is a Krylov basis *\/$/;"	m	struct:__anon65
 ksp	include/slepc/private/stimpl.h	/^  KSP              ksp;$/;"	m	struct:_p_ST
-ksp	src/eps/examples/tutorials/ex10.c	/^  KSP        ksp;$/;"	m	struct:__anon42	file:
-ksp	src/eps/impls/ciss/ciss.c	/^  KSP          *ksp;$/;"	m	struct:__anon47	file:
-ksp	src/eps/impls/davidson/dvdimprovex.c	/^  KSP          ksp;                \/* correction equation solver *\/$/;"	m	struct:__anon55	file:
-ksp	src/eps/impls/external/primme/primme.c	/^  KSP       ksp;                  \/* linear solver and preconditioner *\/$/;"	m	struct:__anon66	file:
-ksp	src/nep/impls/ciss/nciss.c	/^  KSP          *ksp;$/;"	m	struct:__anon77	file:
-kspMat	src/eps/impls/ciss/ciss.c	/^  Mat          *kspMat;$/;"	m	struct:__anon47	file:
-kspMat	src/nep/impls/ciss/nciss.c	/^  Mat          *kspMat;$/;"	m	struct:__anon77	file:
-ksp_max_size	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     ksp_max_size;       \/* the ksp maximum subvectors size *\/$/;"	m	struct:__anon55	file:
-ktol	include/slepc/private/nepimpl.h	/^  PetscReal      ktol;             \/* tolerance for linear solver *\/$/;"	m	struct:_p_NEP
+ksp	src/eps/examples/tutorials/ex10.c	/^  KSP        ksp;$/;"	m	struct:__anon54	file:
+ksp	src/eps/impls/ciss/ciss.c	/^  KSP               *ksp;$/;"	m	struct:__anon61	file:
+ksp	src/eps/impls/davidson/dvdimprovex.c	/^  KSP          ksp;                \/* correction equation solver *\/$/;"	m	struct:__anon68	file:
+ksp	src/eps/impls/external/primme/primme.c	/^  KSP       ksp;                  \/* linear solver and preconditioner *\/$/;"	m	struct:__anon78	file:
+ksp	src/nep/impls/ciss/nciss.c	/^  KSP          *ksp;$/;"	m	struct:__anon89	file:
+ksp	src/nep/impls/narnoldi/narnoldi.c	/^  KSP      ksp;              \/* linear solver object *\/$/;"	m	struct:__anon91	file:
+ksp	src/nep/impls/nleigs/nleigs.c	/^  KSP            *ksp;      \/* ksp array for storing shift factorizations *\/$/;"	m	struct:__anon92	file:
+ksp	src/nep/impls/rii/rii.c	/^  KSP       ksp;              \/* linear solver object *\/$/;"	m	struct:__anon94	file:
+kspMat	src/eps/impls/ciss/ciss.c	/^  Mat               *kspMat;$/;"	m	struct:__anon61	file:
+kspMat	src/nep/impls/ciss/nciss.c	/^  Mat          *kspMat;$/;"	m	struct:__anon89	file:
+ksp_max_size	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     ksp_max_size;       \/* the ksp maximum subvectors size *\/$/;"	m	struct:__anon68	file:
 l	include/slepc/private/bvimpl.h	/^  PetscInt           l;            \/* number of leading columns *\/$/;"	m	struct:_p_BV
 l	include/slepc/private/dsimpl.h	/^  PetscInt       l;                  \/* number of locked (inactive) leading columns *\/$/;"	m	struct:_p_DS
-lN	include/slepc/private/vecimplslepc.h	/^  PetscInt      lN;       \/* virtual local size *\/$/;"	m	struct:__anon5
-lag	include/slepc/private/nepimpl.h	/^  PetscInt       lag;              \/* interval to rebuild preconditioner *\/$/;"	m	struct:_p_NEP
-lambda	src/nep/examples/tutorials/ex21.c	/^  PetscScalar lambda,kappa;$/;"	m	struct:__anon75	file:
+lN	include/slepc/private/vecimplslepc.h	/^  PetscInt      lN;       \/* virtual local size *\/$/;"	m	struct:__anon7
+lag	src/nep/impls/rii/rii.c	/^  PetscInt  lag;              \/* interval to rebuild preconditioner *\/$/;"	m	struct:__anon94	file:
+lambda	src/nep/examples/tutorials/ex21.c	/^  PetscScalar lambda,kappa;$/;"	m	struct:__anon87	file:
 lapack	config/configure.py	/^lapack  = lapack.Lapack(argdb,log)$/;"	v
-lastTol	src/eps/impls/davidson/dvdimprovex.c	/^  PetscReal    lastTol;            \/* last tol for dynamic stopping criterion *\/$/;"	m	struct:__anon55	file:
+lastTol	src/eps/impls/davidson/dvdimprovex.c	/^  PetscReal    lastTol;            \/* last tol for dynamic stopping criterion *\/$/;"	m	struct:__anon68	file:
+lastnconv	src/eps/examples/tutorials/ex30.c	/^  PetscInt    lastnconv;      \/* last value of nconv; used in stopping test *\/$/;"	m	struct:__anon56	file:
+lbus	src/eps/examples/tutorials/ex31.c	/^const PetscInt lbus[3] = {4,5,7}; \/* Buses at which loads are incident *\/$/;"	v
 ld	include/slepc/private/dsimpl.h	/^  PetscInt       ld;                 \/* leading dimension *\/$/;"	m	struct:_p_DS
-ld	src/pep/impls/krylov/pepkrylov.h	/^  PetscInt    ld;           \/* leading dimension of auxiliary matrices *\/$/;"	m	struct:__anon84
-ldXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     ldXKZ;              \/* leading dimension of XKZ *\/$/;"	m	struct:__anon55	file:
-ldiXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     ldiXKZ;             \/* leading dimension of iXKZ *\/$/;"	m	struct:__anon55	file:
-leftbasis	include/slepc/private/svdimpl.h	/^  PetscBool        leftbasis;   \/* if U is filled by the solver *\/$/;"	m	struct:_p_SVD
+ld	src/pep/impls/jd/pjdp.h	/^  PetscInt    ld;$/;"	m	struct:__anon100
+ld	src/pep/impls/krylov/pepkrylov.h	/^  PetscInt    ld;           \/* leading dimension of auxiliary matrices *\/$/;"	m	struct:__anon102
+ldXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     ldXKZ;              \/* leading dimension of XKZ *\/$/;"	m	struct:__anon68	file:
+ld_alphap	src/eps/examples/tutorials/ex31.c	/^const PetscScalar ld_alphap[3] = {0.0,0.0,1.0};$/;"	v
+ld_alphaq	src/eps/examples/tutorials/ex31.c	/^const PetscScalar ld_alphaq[3] = {0.0,0.0,1.0};$/;"	v
+ld_betap	src/eps/examples/tutorials/ex31.c	/^const PetscScalar ld_betap[3]  = {2.0,1.0,0.0};$/;"	v
+ld_betaq	src/eps/examples/tutorials/ex31.c	/^const PetscScalar ld_betaq[3]  = {2.0,1.0,0.0};$/;"	v
+ld_nsegsp	src/eps/examples/tutorials/ex31.c	/^const PetscInt    ld_nsegsp[3] = {3,3,3};$/;"	v
+ld_nsegsq	src/eps/examples/tutorials/ex31.c	/^const PetscInt    ld_nsegsq[3] = {3,3,3};$/;"	v
+ldiXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     ldiXKZ;             \/* leading dimension of iXKZ *\/$/;"	m	struct:__anon68	file:
+leftbasis	include/slepc/private/svdimpl.h	/^  PetscBool      leftbasis;        \/* if U is filled by the solver *\/$/;"	m	struct:_p_SVD
 libdir	config/configure.py	/^libdir  = CreateDir(archdir,'lib',log)$/;"	v
 license	setup.py	/^      license='LGPL',$/;"	v
 lineariz	include/slepc/private/pepimpl.h	/^  PetscBool      lineariz;         \/* current solver is based on linearization *\/$/;"	m	struct:_p_PEP
 liwork	include/slepc/private/dsimpl.h	/^  PetscInt       lwork,lrwork,liwork;$/;"	m	struct:_p_DS
-lock	src/eps/impls/cg/lobpcg/lobpcg.c	/^  PetscBool lock;   \/* soft locking active\/inactive *\/$/;"	m	struct:__anon45	file:
-lock	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     lock;               \/* locking\/non-locking variant *\/$/;"	m	struct:__anon69
-lock	src/pep/impls/krylov/pepkrylov.h	/^  PetscBool   lock;         \/* locking\/non-locking variant *\/$/;"	m	struct:__anon84
-lock	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^  PetscBool lock;         \/* locking\/non-locking variant *\/$/;"	m	struct:__anon85	file:
+lock	src/eps/impls/cg/lobpcg/lobpcg.c	/^  PetscBool lock;      \/* soft locking active\/inactive *\/$/;"	m	struct:__anon59	file:
+lock	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool        lock;               \/* locking\/non-locking variant *\/$/;"	m	struct:__anon81
+lock	src/nep/impls/nleigs/nleigs.c	/^  PetscBool      lock;      \/* locking\/non-locking variant *\/$/;"	m	struct:__anon92	file:
+lock	src/pep/impls/krylov/pepkrylov.h	/^  PetscBool   lock;         \/* locking\/non-locking variant *\/$/;"	m	struct:__anon102
+lock	src/pep/impls/krylov/qarnoldi/qarnoldi.c	/^  PetscBool lock;         \/* locking\/non-locking variant *\/$/;"	m	struct:__anon103	file:
 log	config/configure.py	/^log   = log.Log()$/;"	v
 long_description	setup.py	/^      long_description='\\n'.join(description),$/;"	v
 lrwork	include/slepc/private/dsimpl.h	/^  PetscInt       lwork,lrwork,liwork;$/;"	m	struct:_p_DS
 lwork	include/slepc/private/bvimpl.h	/^  PetscInt           lwork;$/;"	m	struct:_p_BV
 lwork	include/slepc/private/dsimpl.h	/^  PetscInt       lwork,lrwork,liwork;$/;"	m	struct:_p_DS
-lwork	src/eps/impls/external/trlan/trlanp.h	/^  PetscBLASInt       lwork;$/;"	m	struct:__anon67
-lworkl	src/eps/impls/external/arpack/arpackp.h	/^  PetscBLASInt lworkl;$/;"	m	struct:__anon62
+lwork	src/eps/impls/external/trlan/trlanp.h	/^  PetscBLASInt       lwork;$/;"	m	struct:__anon79
+lworkl	src/eps/impls/external/arpack/arpackp.h	/^  PetscBLASInt lworkl;$/;"	m	struct:__anon74
 m	include/slepc/private/bvimpl.h	/^  PetscInt           m;            \/* number of vectors *\/$/;"	m	struct:_p_BV
 m	include/slepc/private/dsimpl.h	/^  PetscInt       m;                  \/* current column dimension (for SVD only) *\/$/;"	m	struct:_p_DS
 m	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscInt    m;$/;"	m	struct:HRtr	file:
+m3	src/nep/interface/neprefine.c	/^  PetscScalar  M4,m3;$/;"	m	struct:__anon98	file:
+m3	src/pep/interface/peprefine.c	/^  PetscScalar  M4,m3;$/;"	m	struct:__anon109	file:
 main	bin/maint/generateetags.py	/^def main(ctags):$/;"	f
 main	bin/maint/generatefortranstubs.py	/^def main(petscdir,bfort,dir,verbose):$/;"	f
 main	config/cmakeboot.py	/^def main(slepcdir, petscdir, petscarch=os.environ['PETSC_ARCH'], argDB=None, framework=None, log=StdoutLogger(), args=[]):$/;"	f
@@ -9138,17 +10084,24 @@ main	src/eps/examples/tutorials/ex1f90.F90	/^      program main$/;"	p
 main	src/eps/examples/tutorials/ex2.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex24.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex25.c	/^int main(int argc,char **argv)$/;"	f
+main	src/eps/examples/tutorials/ex29.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex3.c	/^int main(int argc,char **argv)$/;"	f
+main	src/eps/examples/tutorials/ex30.c	/^int main(int argc,char **argv)$/;"	f
+main	src/eps/examples/tutorials/ex31.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex4.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex5.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex6f.F	/^      program main$/;"	p
 main	src/eps/examples/tutorials/ex7.c	/^int main(int argc,char **argv)$/;"	f
 main	src/eps/examples/tutorials/ex9.c	/^int main(int argc,char **argv)$/;"	f
+main	src/mfn/examples/tests/test1.c	/^int main(int argc,char **argv)$/;"	f
 main	src/mfn/examples/tutorials/ex23.c	/^int main(int argc,char **argv)$/;"	f
+main	src/mfn/examples/tutorials/ex26.c	/^int main(int argc,char **argv)$/;"	f
+main	src/nep/examples/nlevp/gun.c	/^int main(int argc,char **argv)$/;"	f
 main	src/nep/examples/nlevp/loaded_string.c	/^int main(int argc,char **argv)$/;"	f
 main	src/nep/examples/tutorials/ex20.c	/^int main(int argc,char **argv)$/;"	f
 main	src/nep/examples/tutorials/ex21.c	/^int main(int argc,char **argv)$/;"	f
 main	src/nep/examples/tutorials/ex22.c	/^int main(int argc,char **argv)$/;"	f
+main	src/nep/examples/tutorials/ex27.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/nlevp/acoustic_wave_1d.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/nlevp/acoustic_wave_2d.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/nlevp/butterfly.c	/^int main(int argc,char **argv)$/;"	f
@@ -9159,9 +10112,12 @@ main	src/pep/examples/nlevp/sleeper.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/nlevp/spring.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/tests/test1.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/tests/test2.c	/^int main(int argc,char **argv)$/;"	f
+main	src/pep/examples/tests/test3.c	/^int main(int argc,char **argv)$/;"	f
+main	src/pep/examples/tests/test3f.F	/^      program main$/;"	p
 main	src/pep/examples/tutorials/ex16.c	/^int main(int argc,char **argv)$/;"	f
 main	src/pep/examples/tutorials/ex16f90.F90	/^      program main$/;"	p
 main	src/pep/examples/tutorials/ex17.c	/^int main(int argc,char **argv)$/;"	f
+main	src/pep/examples/tutorials/ex28.c	/^int main(int argc,char **argv)$/;"	f
 main	src/svd/examples/tests/test1.c	/^int main(int argc,char **argv)$/;"	f
 main	src/svd/examples/tests/test2.c	/^int main(int argc,char **argv)$/;"	f
 main	src/svd/examples/tests/test3.c	/^int main(int argc,char **argv)$/;"	f
@@ -9172,6 +10128,7 @@ main	src/svd/examples/tutorials/ex8.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/bv/examples/tests/test1.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/bv/examples/tests/test10.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/bv/examples/tests/test11.c	/^int main(int argc,char **argv)$/;"	f
+main	src/sys/classes/bv/examples/tests/test12.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/bv/examples/tests/test2.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/bv/examples/tests/test3.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/bv/examples/tests/test4.c	/^int main(int argc,char **argv)$/;"	f
@@ -9199,6 +10156,8 @@ main	src/sys/classes/fn/examples/tests/test3.c	/^int main(int argc,char **argv)$
 main	src/sys/classes/fn/examples/tests/test4.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/fn/examples/tests/test5.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/fn/examples/tests/test6.c	/^int main(int argc,char **argv)$/;"	f
+main	src/sys/classes/fn/examples/tests/test7.c	/^int main(int argc,char **argv)$/;"	f
+main	src/sys/classes/fn/examples/tests/test8.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/rg/examples/tests/test1.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/st/examples/tests/test1.c	/^int main(int argc,char **argv)$/;"	f
 main	src/sys/classes/st/examples/tests/test2.c	/^int main(int argc,char **argv)$/;"	f
@@ -9207,41 +10166,39 @@ main	src/sys/classes/st/examples/tests/test4.c	/^int main(int argc,char **argv)$
 maintainer	setup.py	/^      maintainer='Lisandro Dalcin',$/;"	v
 maintainer_email	setup.py	/^      maintainer_email='dalcinl at gmail.com',$/;"	v
 map	include/slepcsc.h	/^  PetscErrorCode (*map)(PetscObject,PetscInt,PetscScalar*,PetscScalar*);$/;"	m	struct:_n_SlepcSC
-map0	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon87	file:
-map1	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon87	file:
+map0	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon105	file:
+map1	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     *map0,*map1,*idxg,*idxp;$/;"	m	struct:__anon105	file:
 mapobj	include/slepcsc.h	/^  PetscObject    mapobj;$/;"	m	struct:_n_SlepcSC
 mat	include/slepc/private/dsimpl.h	/^  PetscScalar    *mat[DS_NUM_MAT];   \/* the matrices *\/$/;"	m	struct:_p_DS
-mat	src/svd/impls/cross/cross.c	/^  Mat       mat;$/;"	m	struct:__anon91	file:
-mat	src/svd/impls/cyclic/cyclic.c	/^  Mat       mat;$/;"	m	struct:__anon92	file:
-matIdx	src/sys/classes/st/interface/stshellmat.c	/^  PetscInt    *matIdx;$/;"	m	struct:__anon113	file:
+mat	src/svd/impls/cross/cross.c	/^  Mat       mat;$/;"	m	struct:__anon110	file:
+mat	src/svd/impls/cyclic/cyclic.c	/^  Mat       mat;$/;"	m	struct:__anon111	file:
+matIdx	src/sys/classes/st/interface/stshellmat.c	/^  PetscInt    *matIdx;$/;"	m	struct:__anon132	file:
 matmult	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*matmult)(BV,Mat,BV);$/;"	m	struct:_BVOps
 matrix	include/slepc/private/bvimpl.h	/^  Mat                matrix;       \/* inner product matrix *\/$/;"	m	struct:_p_BV
 maxPend	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      maxPend;      \/* Size of "pending" array *\/$/;"	m	struct:_n_SR
 max_cX_in_impr	src/eps/impls/davidson/davidson.h	/^  PetscInt max_cX_in_impr;    \/* max vectros from cX in the projector *\/$/;"	m	struct:_dvdDashboard
 max_cX_in_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt max_cX_in_proj;    \/* max vectors from cX in the projected problem *\/$/;"	m	struct:_dvdDashboard
-max_funcs	include/slepc/private/nepimpl.h	/^  PetscInt       max_funcs;        \/* maximum number of function evaluations *\/$/;"	m	struct:_p_NEP
+max_inner_it	src/nep/impls/rii/rii.c	/^  PetscInt  max_inner_it;     \/* maximum number of Newton iterations *\/$/;"	m	struct:__anon94	file:
 max_it	include/slepc/private/epsimpl.h	/^  PetscInt       max_it;           \/* maximum number of iterations *\/$/;"	m	struct:_p_EPS
 max_it	include/slepc/private/mfnimpl.h	/^  PetscInt       max_it;         \/* maximum number of iterations *\/$/;"	m	struct:_p_MFN
 max_it	include/slepc/private/nepimpl.h	/^  PetscInt       max_it;           \/* maximum number of iterations *\/$/;"	m	struct:_p_NEP
 max_it	include/slepc/private/pepimpl.h	/^  PetscInt       max_it;           \/* maximum number of iterations *\/$/;"	m	struct:_p_PEP
-max_it	include/slepc/private/svdimpl.h	/^  PetscInt         max_it;      \/* max iterations *\/$/;"	m	struct:_p_SVD
-max_nev	src/eps/impls/davidson/davidson.h	/^  PetscInt max_nev;            \/* max number of converged pairs *\/$/;"	m	struct:__anon53
-max_size_P	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_P;         \/* number of computed vectors for the projector *\/$/;"	m	struct:__anon53
+max_it	include/slepc/private/svdimpl.h	/^  PetscInt       max_it;           \/* max iterations *\/$/;"	m	struct:_p_SVD
+max_nev	src/eps/impls/davidson/davidson.h	/^  PetscInt max_nev;            \/* max number of converged pairs *\/$/;"	m	struct:__anon66
+max_size_P	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_P;         \/* number of computed vectors for the projector *\/$/;"	m	struct:__anon66
 max_size_P	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_P;        \/* max unconverged vectors in the projector *\/$/;"	m	struct:_dvdDashboard
-max_size_V	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_V;         \/* max size of the searching subspace (mpd) *\/$/;"	m	struct:__anon53
-max_size_X	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_X;         \/* max size of X (bs) *\/$/;"	m	struct:__anon53
-max_size_cP	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_cP;        \/* number of converged vectors in the projectors *\/$/;"	m	struct:__anon53
-max_size_cX_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_cX_proj;   \/* max converged vectors in the projected problem *\/$/;"	m	struct:__anon53
-max_size_oldX	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_oldX;      \/* max size of oldX *\/$/;"	m	struct:__anon53
-max_size_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_proj;      \/* max size projected problem *\/$/;"	m	struct:__anon53
+max_size_V	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_V;         \/* max size of the searching subspace (mpd) *\/$/;"	m	struct:__anon66
+max_size_X	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_X;         \/* max size of X (bs) *\/$/;"	m	struct:__anon66
+max_size_cP	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_cP;        \/* number of converged vectors in the projectors *\/$/;"	m	struct:__anon66
+max_size_cX_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_cX_proj;   \/* max converged vectors in the projected problem *\/$/;"	m	struct:__anon66
+max_size_oldX	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_oldX;      \/* max size of oldX *\/$/;"	m	struct:__anon66
+max_size_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_proj;      \/* max size projected problem *\/$/;"	m	struct:__anon66
 max_size_proj	src/eps/impls/davidson/davidson.h	/^  PetscInt max_size_proj;     \/* max size projected problem *\/$/;"	m	struct:_dvdDashboard
-maxits	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     maxits;             \/* maximum number of iterations *\/$/;"	m	struct:__anon55	file:
-maxlan	src/eps/impls/external/trlan/trlanp.h	/^  PetscBLASInt       maxlan;$/;"	m	struct:__anon67
+maxits	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     maxits;             \/* maximum number of iterations *\/$/;"	m	struct:__anon68	file:
+maxlan	src/eps/impls/external/trlan/trlanp.h	/^  PetscBLASInt       maxlan;$/;"	m	struct:__anon79
 metadata	setup.py	/^metadata = {$/;"	v
 method	include/slepc/private/dsimpl.h	/^  PetscInt       method;             \/* identifies the variant to be used *\/$/;"	m	struct:_p_DS
-method	src/eps/impls/davidson/davidson.c	/^  PetscInt  method;        \/* method for improving the approximate solution *\/$/;"	m	struct:__anon48	file:
-method	src/eps/impls/external/primme/primme.c	/^  primme_preset_method method;    \/* primme method *\/$/;"	m	struct:__anon66	file:
-methodN	src/eps/impls/external/primme/primme.c	/^EPSPRIMMEMethod methodN[] = {$/;"	v
+method	src/eps/impls/external/primme/primme.c	/^  primme_preset_method method;    \/* primme method *\/$/;"	m	struct:__anon78	file:
 mfnappendoptionsprefix_	src/mfn/interface/ftn-custom/zmfnf.c	/^PETSC_EXTERN void PETSC_STDCALL mfnappendoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 mfnappendoptionsprefix_	src/mfn/interface/ftn-custom/zmfnf.c	29;"	d	file:
 mfnappendoptionsprefix_	src/mfn/interface/ftn-custom/zmfnf.c	40;"	d	file:
@@ -9251,7 +10208,7 @@ mfngetoptionsprefix_	src/mfn/interface/ftn-custom/zmfnf.c	41;"	d	file:
 mfngettype_	src/mfn/interface/ftn-custom/zmfnf.c	/^PETSC_EXTERN void PETSC_STDCALL mfngettype_(MFN *mfn,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 mfngettype_	src/mfn/interface/ftn-custom/zmfnf.c	32;"	d	file:
 mfngettype_	src/mfn/interface/ftn-custom/zmfnf.c	43;"	d	file:
-mfnmonitordefault_	src/mfn/interface/ftn-custom/zmfnf.c	/^PETSC_EXTERN void mfnmonitordefault_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+mfnmonitordefault_	src/mfn/interface/ftn-custom/zmfnf.c	/^PETSC_EXTERN void mfnmonitordefault_(MFN *mfn,PetscInt *it,PetscReal *errest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 mfnmonitordefault_	src/mfn/interface/ftn-custom/zmfnf.c	33;"	d	file:
 mfnmonitordefault_	src/mfn/interface/ftn-custom/zmfnf.c	44;"	d	file:
 mfnmonitorlg_	src/mfn/interface/ftn-custom/zmfnf.c	/^PETSC_EXTERN void mfnmonitorlg_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
@@ -9272,49 +10229,48 @@ mfnsettype_	src/mfn/interface/ftn-custom/zmfnf.c	42;"	d	file:
 mfnview_	src/mfn/interface/ftn-custom/zmfnf.c	/^PETSC_EXTERN void PETSC_STDCALL mfnview_(MFN *mfn,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 mfnview_	src/mfn/interface/ftn-custom/zmfnf.c	26;"	d	file:
 mfnview_	src/mfn/interface/ftn-custom/zmfnf.c	37;"	d	file:
-min_size_V	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          min_size_V;        \/* restart with this number of eigenvectors *\/$/;"	m	struct:__anon57	file:
-minv	src/eps/impls/davidson/davidson.c	/^  PetscInt  minv;          \/* size of V after restarting *\/$/;"	m	struct:__anon48	file:
+min_size_V	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          min_size_V;        \/* restart with this number of eigenvectors *\/$/;"	m	struct:__anon70	file:
+minv	src/eps/impls/davidson/davidson.h	/^  PetscInt  minv;          \/* size of V after restarting *\/$/;"	m	struct:__anon65
 mkrel	config/gmakegen.py	/^            def mkrel(src):$/;"	f	function:Slepc.gen_pkg
-mode	src/eps/impls/davidson/dvdutils.c	/^  HarmType_t  mode;$/;"	m	struct:__anon59	file:
+mode	src/eps/impls/davidson/dvdutils.c	/^  HarmType_t  mode;$/;"	m	struct:__anon72	file:
 modules	config/configure.py	/^  modules  = CreateFile(modulesdir,slepc.lversion+'-'+archname,log)$/;"	v
 modules	config/configure.py	/^  modules  = CreateFile(modulesdir,slepc.lversion,log)$/;"	v
 modulesdir	config/configure.py	/^modulesdir = CreateDirTwo(confdir,'modules','slepc',log)$/;"	v
 monitor	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*monitor[MAXEPSMONITORS])(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);$/;"	m	struct:_p_EPS
 monitor	include/slepc/private/mfnimpl.h	/^  PetscErrorCode (*monitor[MAXMFNMONITORS])(MFN,PetscInt,PetscReal,void*);$/;"	m	struct:_p_MFN
-monitor	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*monitor[MAXNEPMONITORS])(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);$/;"	m	struct:_p_NEP
+monitor	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*monitor[MAXNEPMONITORS])(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);$/;"	m	struct:_p_NEP
 monitor	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*monitor[MAXPEPMONITORS])(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);$/;"	m	struct:_p_PEP
-monitor	include/slepc/private/svdimpl.h	/^  PetscErrorCode   (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);$/;"	m	struct:_p_SVD
-monitor	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon72	file:
-monitor	src/mfn/interface/ftn-custom/zmfnf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon73	file:
-monitor	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon80	file:
-monitor	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon89	file:
-monitor	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon95	file:
+monitor	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);$/;"	m	struct:_p_SVD
+monitor	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon84	file:
+monitor	src/mfn/interface/ftn-custom/zmfnf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon85	file:
+monitor	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon96	file:
+monitor	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon107	file:
+monitor	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId monitor;$/;"	m	struct:__anon114	file:
 monitorcontext	include/slepc/private/epsimpl.h	/^  void           *monitorcontext[MAXEPSMONITORS];$/;"	m	struct:_p_EPS
 monitorcontext	include/slepc/private/mfnimpl.h	/^  void           *monitorcontext[MAXMFNMONITORS];$/;"	m	struct:_p_MFN
 monitorcontext	include/slepc/private/nepimpl.h	/^  void           *monitorcontext[MAXNEPMONITORS];$/;"	m	struct:_p_NEP
 monitorcontext	include/slepc/private/pepimpl.h	/^  void           *monitorcontext[MAXPEPMONITORS];$/;"	m	struct:_p_PEP
-monitorcontext	include/slepc/private/svdimpl.h	/^  void             *monitorcontext[MAXSVDMONITORS];$/;"	m	struct:_p_SVD
+monitorcontext	include/slepc/private/svdimpl.h	/^  void           *monitorcontext[MAXSVDMONITORS];$/;"	m	struct:_p_SVD
 monitordestroy	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**);$/;"	m	struct:_p_EPS
 monitordestroy	include/slepc/private/mfnimpl.h	/^  PetscErrorCode (*monitordestroy[MAXMFNMONITORS])(void**);$/;"	m	struct:_p_MFN
 monitordestroy	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*monitordestroy[MAXNEPMONITORS])(void**);$/;"	m	struct:_p_NEP
 monitordestroy	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*monitordestroy[MAXPEPMONITORS])(void**);$/;"	m	struct:_p_PEP
-monitordestroy	include/slepc/private/svdimpl.h	/^  PetscErrorCode   (*monitordestroy[MAXSVDMONITORS])(void**);$/;"	m	struct:_p_SVD
-monitordestroy	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon72	file:
-monitordestroy	src/mfn/interface/ftn-custom/zmfnf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon73	file:
-monitordestroy	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon80	file:
-monitordestroy	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon89	file:
-monitordestroy	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon95	file:
+monitordestroy	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*monitordestroy[MAXSVDMONITORS])(void**);$/;"	m	struct:_p_SVD
+monitordestroy	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon84	file:
+monitordestroy	src/mfn/interface/ftn-custom/zmfnf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon85	file:
+monitordestroy	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon96	file:
+monitordestroy	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon107	file:
+monitordestroy	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId monitordestroy;$/;"	m	struct:__anon114	file:
 mpd	include/slepc/private/epsimpl.h	/^  PetscInt       mpd;              \/* maximum dimension of projected problem *\/$/;"	m	struct:_p_EPS
 mpd	include/slepc/private/nepimpl.h	/^  PetscInt       mpd;              \/* maximum dimension of projected problem *\/$/;"	m	struct:_p_NEP
 mpd	include/slepc/private/pepimpl.h	/^  PetscInt       mpd;              \/* maximum dimension of projected problem *\/$/;"	m	struct:_p_PEP
-mpd	include/slepc/private/svdimpl.h	/^  PetscInt         mpd;         \/* maximum dimension of projected problem *\/$/;"	m	struct:_p_SVD
-mpd	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          mpd;               \/* max size of the searching subspace *\/$/;"	m	struct:__anon57	file:
-mpd	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      mpd;                \/* maximum dimension of projected problem *\/$/;"	m	struct:__anon69
-mpi	src/sys/classes/bv/impls/contiguous/contig.c	/^  PetscBool   mpi;$/;"	m	struct:__anon96	file:
-mpi	src/sys/classes/bv/impls/mat/bvmat.c	/^  PetscBool mpi;$/;"	m	struct:__anon97	file:
-mpi	src/sys/classes/bv/impls/svec/svec.c	/^  PetscBool mpi;$/;"	m	struct:__anon98	file:
+mpd	include/slepc/private/svdimpl.h	/^  PetscInt       mpd;              \/* maximum dimension of projected problem *\/$/;"	m	struct:_p_SVD
+mpd	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          mpd;               \/* max size of the searching subspace *\/$/;"	m	struct:__anon70	file:
+mpd	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt         mpd;                \/* maximum dimension of projected problem *\/$/;"	m	struct:__anon81
+mpi	src/sys/classes/bv/impls/contiguous/contig.c	/^  PetscBool   mpi;$/;"	m	struct:__anon115	file:
+mpi	src/sys/classes/bv/impls/mat/bvmat.c	/^  PetscBool mpi;$/;"	m	struct:__anon116	file:
+mpi	src/sys/classes/bv/impls/svec/svec.c	/^  PetscBool mpi;$/;"	m	struct:__anon117	file:
 mstr	include/slepc/private/nepimpl.h	/^  MatStructure   mstr;             \/* pattern of split matrices *\/$/;"	m	struct:_p_NEP
-mtol	src/pep/impls/jd/pjdp.h	/^  PetscReal   mtol;          \/* tolerance for eigenvalue multiplicity *\/$/;"	m	struct:__anon82
 mult	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*mult)(BV,PetscScalar,PetscScalar,BV,Mat);$/;"	m	struct:_BVOps
 multMatvec_PRIMME	src/eps/impls/external/primme/primme.c	/^static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)$/;"	f	file:
 multinplace	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*multinplace)(BV,Mat,PetscInt,PetscInt);$/;"	m	struct:_BVOps
@@ -9327,197 +10283,241 @@ n	include/slepc/private/dsimpl.h	/^  PetscInt       n;                  \/* curr
 n	include/slepc/private/epsimpl.h	/^  PetscInt       n,nloc;           \/* problem dimensions (global, local) *\/$/;"	m	struct:_p_EPS
 n	include/slepc/private/nepimpl.h	/^  PetscInt       n,nloc;           \/* problem dimensions (global, local) *\/$/;"	m	struct:_p_NEP
 n	include/slepc/private/pepimpl.h	/^  PetscInt       n,nloc;           \/* problem dimensions (global, local) *\/$/;"	m	struct:_p_PEP
-n	include/slepc/private/vecimplslepc.h	/^  PetscInt      n;        \/* number of active subvectors *\/$/;"	m	struct:__anon5
+n	include/slepc/private/vecimplslepc.h	/^  PetscInt      n;        \/* number of active subvectors *\/$/;"	m	struct:__anon7
 n	include/slepc/private/vecimplslepc.h	/^  PetscInt n;              \/* size of vecs *\/$/;"	m	struct:VecPool_
-n	include/slepc/private/vecimplslepc.h	/^  Vec_Comp_N    *n;       \/* structure shared by friend vectors *\/$/;"	m	struct:__anon6
+n	include/slepc/private/vecimplslepc.h	/^  Vec_Comp_N    *n;       \/* structure shared by friend vectors *\/$/;"	m	struct:__anon8
+n	src/pep/impls/jd/pjdp.h	/^  PetscInt    n;$/;"	m	struct:__anon100
 n	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscInt    n[2];$/;"	m	struct:HRtr	file:
-n	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^  PetscInt    n;         \/* number of vertices *\/$/;"	m	struct:__anon107	file:
+n	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^  PetscInt    n;         \/* number of vertices *\/$/;"	m	struct:__anon126	file:
 nBds	src/eps/impls/davidson/davidson.h	/^  PetscReal   *nBds;          \/* B-norms of projected problem  *\/$/;"	m	struct:_dvdDashboard
 nMAXCompl	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nMAXCompl;$/;"	m	struct:_n_SR
 nPend	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nPend;        \/* Number of pending shifts *\/$/;"	m	struct:_n_SR
 nR	src/eps/impls/davidson/davidson.h	/^  PetscReal   *nR;            \/* residual norm *\/$/;"	m	struct:_dvdDashboard
 nS	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nS;$/;"	m	struct:_n_SR
 nX	src/eps/impls/davidson/davidson.h	/^  PetscReal   *nX;            \/* X norm *\/$/;"	m	struct:_dvdDashboard
+nbus	src/eps/examples/tutorials/ex31.c	/^const PetscInt nbus    = 9; \/* Number of network buses *\/$/;"	v
 nc	include/slepc/private/bvimpl.h	/^  PetscInt           nc;           \/* number of constraints *\/$/;"	m	struct:_p_BV
 nconv	include/slepc/private/epsimpl.h	/^  PetscInt       nconv;            \/* number of converged eigenvalues *\/$/;"	m	struct:_p_EPS
 nconv	include/slepc/private/nepimpl.h	/^  PetscInt       nconv;            \/* number of converged eigenvalues *\/$/;"	m	struct:_p_NEP
 nconv	include/slepc/private/pepimpl.h	/^  PetscInt       nconv;            \/* number of converged eigenvalues *\/$/;"	m	struct:_p_PEP
-nconv	include/slepc/private/svdimpl.h	/^  PetscInt         nconv;       \/* number of converged values *\/$/;"	m	struct:_p_SVD
+nconv	include/slepc/private/svdimpl.h	/^  PetscInt       nconv;            \/* number of converged values *\/$/;"	m	struct:_p_SVD
 nconv	src/eps/impls/davidson/davidson.h	/^  PetscInt nconv;             \/* number of converged eigenpairs *\/$/;"	m	struct:_dvdDashboard
 nconv	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nconv[2];     \/* Converged on each side (accepted or not) *\/$/;"	m	struct:_n_shift
-nconv_loc	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscMPIInt   *nconv_loc;         \/* converged eigenpairs for each subinterval *\/$/;"	m	struct:__anon69
+nconv	src/pep/impls/jd/pjdp.h	/^  PetscInt    nconv;         \/* number of locked vectors in the invariant pair *\/$/;"	m	struct:__anon99
+nconv_loc	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscMPIInt      *nconv_loc;         \/* converged eigenpairs for each subinterval *\/$/;"	m	struct:__anon81
 ncv	include/slepc/private/epsimpl.h	/^  PetscInt       ncv;              \/* number of basis vectors *\/$/;"	m	struct:_p_EPS
 ncv	include/slepc/private/mfnimpl.h	/^  PetscInt       ncv;            \/* number of basis vectors *\/$/;"	m	struct:_p_MFN
 ncv	include/slepc/private/nepimpl.h	/^  PetscInt       ncv;              \/* number of basis vectors *\/$/;"	m	struct:_p_NEP
 ncv	include/slepc/private/pepimpl.h	/^  PetscInt       ncv;              \/* number of basis vectors *\/$/;"	m	struct:_p_PEP
-ncv	include/slepc/private/svdimpl.h	/^  PetscInt         ncv;         \/* basis size *\/$/;"	m	struct:_p_SVD
-ncv	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      ncv;                \/* number of basis vectors *\/$/;"	m	struct:__anon69
+ncv	include/slepc/private/svdimpl.h	/^  PetscInt       ncv;              \/* basis size *\/$/;"	m	struct:_p_SVD
+ncv	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt         ncv;                \/* number of basis vectors *\/$/;"	m	struct:__anon81
 nds	include/slepc/private/epsimpl.h	/^  PetscInt       nds;              \/* number of basis vectors of deflation space *\/$/;"	m	struct:_p_EPS
 neighb	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS_shift     neighb[2];    \/* Adjacent shifts *\/$/;"	m	struct:_n_shift
 neigs	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      neigs;        \/* Number of values found *\/$/;"	m	struct:_n_shift
 nepappendoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepappendoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 nepappendoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	33;"	d	file:
-nepappendoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	50;"	d	file:
+nepappendoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	55;"	d	file:
+nepconvergedabsolute_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepconvergedabsolute_(NEP *nep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepconvergedabsolute_	src/nep/interface/ftn-custom/znepf.c	43;"	d	file:
+nepconvergedabsolute_	src/nep/interface/ftn-custom/znepf.c	65;"	d	file:
+nepconvergedrelative_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepconvergedrelative_(NEP *nep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepconvergedrelative_	src/nep/interface/ftn-custom/znepf.c	44;"	d	file:
+nepconvergedrelative_	src/nep/interface/ftn-custom/znepf.c	66;"	d	file:
 neperrorview_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL neperrorview_(NEP *nep,NEPErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 neperrorview_	src/nep/interface/ftn-custom/znepf.c	28;"	d	file:
-neperrorview_	src/nep/interface/ftn-custom/znepf.c	45;"	d	file:
+neperrorview_	src/nep/interface/ftn-custom/znepf.c	50;"	d	file:
 nepgetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepgetoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 nepgetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	34;"	d	file:
-nepgetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	51;"	d	file:
+nepgetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	56;"	d	file:
 nepgettype_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepgettype_(NEP *nep,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 nepgettype_	src/nep/interface/ftn-custom/znepf.c	36;"	d	file:
-nepgettype_	src/nep/interface/ftn-custom/znepf.c	53;"	d	file:
-nepmonitorall_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepgettype_	src/nep/interface/ftn-custom/znepf.c	58;"	d	file:
+nepmonitorall_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 nepmonitorall_	src/nep/interface/ftn-custom/znepf.c	37;"	d	file:
-nepmonitorall_	src/nep/interface/ftn-custom/znepf.c	54;"	d	file:
-nepmonitorconverged_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorconverged_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepmonitorall_	src/nep/interface/ftn-custom/znepf.c	59;"	d	file:
+nepmonitorconverged_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorconverged_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)$/;"	f
 nepmonitorconverged_	src/nep/interface/ftn-custom/znepf.c	41;"	d	file:
-nepmonitorconverged_	src/nep/interface/ftn-custom/znepf.c	58;"	d	file:
-nepmonitorfirst_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorfirst_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepmonitorconverged_	src/nep/interface/ftn-custom/znepf.c	63;"	d	file:
+nepmonitorfirst_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorfirst_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 nepmonitorfirst_	src/nep/interface/ftn-custom/znepf.c	42;"	d	file:
-nepmonitorfirst_	src/nep/interface/ftn-custom/znepf.c	59;"	d	file:
-nepmonitorlg_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorlg_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepmonitorfirst_	src/nep/interface/ftn-custom/znepf.c	64;"	d	file:
+nepmonitorlg_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorlg_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
 nepmonitorlg_	src/nep/interface/ftn-custom/znepf.c	38;"	d	file:
-nepmonitorlg_	src/nep/interface/ftn-custom/znepf.c	55;"	d	file:
-nepmonitorlgall_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorlgall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+nepmonitorlg_	src/nep/interface/ftn-custom/znepf.c	60;"	d	file:
+nepmonitorlgall_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void nepmonitorlgall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
 nepmonitorlgall_	src/nep/interface/ftn-custom/znepf.c	39;"	d	file:
-nepmonitorlgall_	src/nep/interface/ftn-custom/znepf.c	56;"	d	file:
-nepmonitorset_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *monitor)(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+nepmonitorlgall_	src/nep/interface/ftn-custom/znepf.c	61;"	d	file:
+nepmonitorset_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *monitor)(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
 nepmonitorset_	src/nep/interface/ftn-custom/znepf.c	40;"	d	file:
-nepmonitorset_	src/nep/interface/ftn-custom/znepf.c	57;"	d	file:
+nepmonitorset_	src/nep/interface/ftn-custom/znepf.c	62;"	d	file:
 nepreasonview_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepreasonview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 nepreasonview_	src/nep/interface/ftn-custom/znepf.c	29;"	d	file:
-nepreasonview_	src/nep/interface/ftn-custom/znepf.c	46;"	d	file:
+nepreasonview_	src/nep/interface/ftn-custom/znepf.c	51;"	d	file:
+nepsetconvergencetestfunction_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepsetconvergencetestfunction_(NEP *nep,void (PETSC_STDCALL *func)(NEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+nepsetconvergencetestfunction_	src/nep/interface/ftn-custom/znepf.c	45;"	d	file:
+nepsetconvergencetestfunction_	src/nep/interface/ftn-custom/znepf.c	67;"	d	file:
+nepseteigenvaluecomparison_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepseteigenvaluecomparison_(NEP *nep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)$/;"	f
+nepseteigenvaluecomparison_	src/nep/interface/ftn-custom/znepf.c	47;"	d	file:
+nepseteigenvaluecomparison_	src/nep/interface/ftn-custom/znepf.c	69;"	d	file:
 nepsetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepsetoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 nepsetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	32;"	d	file:
-nepsetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	49;"	d	file:
+nepsetoptionsprefix_	src/nep/interface/ftn-custom/znepf.c	54;"	d	file:
+nepsetstoppingtestfunction_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepsetstoppingtestfunction_(NEP *nep,void (PETSC_STDCALL *func)(NEP*,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+nepsetstoppingtestfunction_	src/nep/interface/ftn-custom/znepf.c	46;"	d	file:
+nepsetstoppingtestfunction_	src/nep/interface/ftn-custom/znepf.c	68;"	d	file:
 nepsettype_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepsettype_(NEP *nep,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 nepsettype_	src/nep/interface/ftn-custom/znepf.c	35;"	d	file:
-nepsettype_	src/nep/interface/ftn-custom/znepf.c	52;"	d	file:
+nepsettype_	src/nep/interface/ftn-custom/znepf.c	57;"	d	file:
+nepstoppingbasic_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepstoppingbasic_(NEP *nep,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,NEPConvergedReason *reason,void *ctx,PetscErrorCode *ierr)$/;"	f
 nepvaluesview_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepvaluesview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 nepvaluesview_	src/nep/interface/ftn-custom/znepf.c	30;"	d	file:
-nepvaluesview_	src/nep/interface/ftn-custom/znepf.c	47;"	d	file:
+nepvaluesview_	src/nep/interface/ftn-custom/znepf.c	52;"	d	file:
 nepvectorsview_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepvectorsview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 nepvectorsview_	src/nep/interface/ftn-custom/znepf.c	31;"	d	file:
-nepvectorsview_	src/nep/interface/ftn-custom/znepf.c	48;"	d	file:
+nepvectorsview_	src/nep/interface/ftn-custom/znepf.c	53;"	d	file:
 nepview_	src/nep/interface/ftn-custom/znepf.c	/^PETSC_EXTERN void PETSC_STDCALL nepview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 nepview_	src/nep/interface/ftn-custom/znepf.c	27;"	d	file:
-nepview_	src/nep/interface/ftn-custom/znepf.c	44;"	d	file:
+nepview_	src/nep/interface/ftn-custom/znepf.c	49;"	d	file:
+neqs_gen	src/eps/examples/tutorials/ex31.c	/^  PetscInt neqs_gen,neqs_net,neqs_pgrid;$/;"	m	struct:__anon57	file:
+neqs_net	src/eps/examples/tutorials/ex31.c	/^  PetscInt neqs_gen,neqs_net,neqs_pgrid;$/;"	m	struct:__anon57	file:
+neqs_pgrid	src/eps/examples/tutorials/ex31.c	/^  PetscInt neqs_gen,neqs_net,neqs_pgrid;$/;"	m	struct:__anon57	file:
 nev	include/slepc/private/epsimpl.h	/^  PetscInt       nev;              \/* number of eigenvalues to compute *\/$/;"	m	struct:_p_EPS
 nev	include/slepc/private/nepimpl.h	/^  PetscInt       nev;              \/* number of eigenvalues to compute *\/$/;"	m	struct:_p_NEP
 nev	include/slepc/private/pepimpl.h	/^  PetscInt       nev;              \/* number of eigenvalues to compute *\/$/;"	m	struct:_p_PEP
 nev	src/eps/impls/davidson/davidson.h	/^  PetscInt    nev;            \/* number of eigenpairs *\/$/;"	m	struct:_dvdDashboard
-nev	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nev;                \/* number of eigenvalues to compute *\/$/;"	m	struct:__anon69
+nev	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt         nev;                \/* number of eigenvalues to compute *\/$/;"	m	struct:__anon81
 next	include/slepc/private/vecimplslepc.h	/^  struct VecPool_ *next;   \/* list of pool of vectors *\/$/;"	m	struct:VecPool_	typeref:struct:VecPool_::VecPool_
 next	src/eps/impls/davidson/davidson.h	/^  struct _dvdFunctionList *next;$/;"	m	struct:_dvdFunctionList	typeref:struct:_dvdFunctionList::_dvdFunctionList
-nf	src/sys/classes/ds/impls/nep/dsnep.c	/^  PetscInt nf;                 \/* number of functions in f[] *\/$/;"	m	struct:__anon100	file:
-nfuncs	include/slepc/private/nepimpl.h	/^  PetscInt       nfuncs;           \/* number of function evaluations *\/$/;"	m	struct:_p_NEP
+nf	src/sys/classes/ds/impls/nep/dsnep.c	/^  PetscInt nf;                 \/* number of functions in f[] *\/$/;"	m	struct:__anon119	file:
+ngen	src/eps/examples/tutorials/ex31.c	/^const PetscInt ngen    = 3; \/* Number of generators *\/$/;"	v
 nini	include/slepc/private/epsimpl.h	/^  PetscInt       nini;             \/* number of initial vectors (negative means not copied yet) *\/$/;"	m	struct:_p_EPS
 nini	include/slepc/private/nepimpl.h	/^  PetscInt       nini;             \/* number of initial vectors (negative means not copied yet) *\/$/;"	m	struct:_p_NEP
 nini	include/slepc/private/pepimpl.h	/^  PetscInt       nini;             \/* number of initial vectors (negative means not copied yet) *\/$/;"	m	struct:_p_PEP
-nini	include/slepc/private/svdimpl.h	/^  PetscInt         nini,ninil;  \/* number of initial vectors (negative means not copied yet) *\/$/;"	m	struct:_p_SVD
-ninil	include/slepc/private/svdimpl.h	/^  PetscInt         nini,ninil;  \/* number of initial vectors (negative means not copied yet) *\/$/;"	m	struct:_p_SVD
+nini	include/slepc/private/svdimpl.h	/^  PetscInt       nini,ninil;       \/* number of initial vecs (negative means not copied yet) *\/$/;"	m	struct:_p_SVD
+ninil	include/slepc/private/svdimpl.h	/^  PetscInt       nini,ninil;       \/* number of initial vecs (negative means not copied yet) *\/$/;"	m	struct:_p_SVD
 nleap	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nleap;$/;"	m	struct:_n_SR
+nload	src/eps/examples/tutorials/ex31.c	/^const PetscInt nload   = 3; \/* Number of loads *\/$/;"	v
 nloc	include/slepc/private/epsimpl.h	/^  PetscInt       n,nloc;           \/* problem dimensions (global, local) *\/$/;"	m	struct:_p_EPS
 nloc	include/slepc/private/nepimpl.h	/^  PetscInt       n,nloc;           \/* problem dimensions (global, local) *\/$/;"	m	struct:_p_NEP
 nloc	include/slepc/private/pepimpl.h	/^  PetscInt       n,nloc;           \/* problem dimensions (global, local) *\/$/;"	m	struct:_p_PEP
 nmat	include/slepc/private/pepimpl.h	/^  PetscInt       nmat;             \/* number of matrices *\/$/;"	m	struct:_p_PEP
-nmat	include/slepc/private/stimpl.h	/^  PetscInt         nmat;             \/* Number of matrices *\/$/;"	m	struct:_p_ST
-nmat	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     k,nmat;$/;"	m	struct:__anon86	file:
-nmat	src/sys/classes/st/interface/stshellmat.c	/^  PetscInt    nmat;$/;"	m	struct:__anon113	file:
+nmat	include/slepc/private/stimpl.h	/^  PetscInt         nmat;             \/* number of matrices *\/$/;"	m	struct:_p_ST
+nmat	src/nep/impls/nleigs/nleigs.c	/^  PetscInt       nmat;      \/* number of interpolation points *\/$/;"	m	struct:__anon92	file:
+nmat	src/nep/impls/nleigs/nleigs.c	/^  PetscInt    nmat;$/;"	m	struct:__anon93	file:
+nmat	src/pep/impls/krylov/toar/nrefine.c	/^  PetscInt     k,nmat;$/;"	m	struct:__anon104	file:
+nmat	src/sys/classes/st/interface/stshellmat.c	/^  PetscInt    nmat;$/;"	m	struct:__anon132	file:
 noCheck	config/cmakeboot.py	/^def noCheck(command, status, output, error):$/;"	f
 norm	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*norm)(BV,PetscInt,NormType,PetscReal*);$/;"	m	struct:_BVOps
 norm_begin	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*norm_begin)(BV,PetscInt,NormType,PetscReal*);$/;"	m	struct:_BVOps
 norm_end	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*norm_end)(BV,PetscInt,NormType,PetscReal*);$/;"	m	struct:_BVOps
 norm_local	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*norm_local)(BV,PetscInt,NormType,PetscReal*);$/;"	m	struct:_BVOps
 normalize	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*normalize)(DS,DSMatType,PetscInt);$/;"	m	struct:_DSOps
-np	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscInt    np;         \/* length of array pcoeff, p(x) has degree np-1 *\/$/;"	m	struct:__anon104	file:
+np	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscInt    np;         \/* length of array pcoeff, p(x) has degree np-1 *\/$/;"	m	struct:__anon123	file:
 npart	include/slepc/private/nepimpl.h	/^  PetscInt       npart;            \/* number of partitions of the communicator *\/$/;"	m	struct:_p_NEP
 npart	include/slepc/private/pepimpl.h	/^  PetscInt       npart;            \/* number of partitions of the communicator *\/$/;"	m	struct:_p_PEP
-npart	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      npart;              \/* number of partitions of subcommunicator *\/$/;"	m	struct:__anon69
-npoints	src/eps/impls/external/feast/feastp.h	/^  PetscBLASInt npoints;                 \/* number of contour points *\/$/;"	m	struct:__anon65
+npart	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt         npart;              \/* number of partitions of subcommunicator *\/$/;"	m	struct:__anon81
+npoints	src/eps/impls/external/feast/feastp.h	/^  PetscBLASInt npoints;                 \/* number of contour points *\/$/;"	m	struct:__anon77
 npreconv	src/eps/impls/davidson/davidson.h	/^  PetscInt npreconv;          \/* number of pairs ready to converge *\/$/;"	m	struct:_dvdDashboard
-nq	src/pep/impls/krylov/pepkrylov.h	/^  PetscInt    nq;           \/* number of TOAR Vectors  *\/$/;"	m	struct:__anon84
-nq	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscInt    nq;         \/* length of array qcoeff, q(x) has degree nq-1 *\/$/;"	m	struct:__anon104	file:
-nrest	src/eps/impls/cg/rqcg/rqcg.c	/^  PetscInt nrest;$/;"	m	struct:__anon46	file:
+nq	src/pep/impls/krylov/pepkrylov.h	/^  PetscInt    nq;           \/* number of TOAR Vectors  *\/$/;"	m	struct:__anon102
+nq	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscInt    nq;         \/* length of array qcoeff, q(x) has degree nq-1 *\/$/;"	m	struct:__anon123	file:
+nreps	src/eps/examples/tutorials/ex30.c	/^  PetscInt    nreps;          \/* number of repetitions of nconv; used in stopping test *\/$/;"	m	struct:__anon56	file:
+nrest	src/eps/impls/cg/rqcg/rqcg.c	/^  PetscInt nrest;$/;"	m	struct:__anon60	file:
 nrma	include/slepc/private/epsimpl.h	/^  PetscReal      nrma,nrmb;        \/* computed matrix norms *\/$/;"	m	struct:_p_EPS
+nrma	include/slepc/private/nepimpl.h	/^  PetscReal      *nrma;            \/* computed matrix norms *\/$/;"	m	struct:_p_NEP
 nrma	include/slepc/private/pepimpl.h	/^  PetscReal      *nrma;            \/* computed matrix norms *\/$/;"	m	struct:_p_PEP
 nrmb	include/slepc/private/epsimpl.h	/^  PetscReal      nrma,nrmb;        \/* computed matrix norms *\/$/;"	m	struct:_p_EPS
 nrml	include/slepc/private/pepimpl.h	/^  PetscReal      nrml[2];          \/* computed matrix norms for the linearization *\/$/;"	m	struct:_p_PEP
 nsch	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nsch[2];      \/* Number of missing values for each subinterval *\/$/;"	m	struct:_n_shift
-nshifts	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nshifts;            \/* elements in the arrays of shifts and inertias *\/$/;"	m	struct:__anon69
-nsteps	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         nsteps;          \/* maximum number of steps per run *\/$/;"	m	struct:__anon64
-nsv	include/slepc/private/svdimpl.h	/^  PetscInt         nsv;         \/* number of requested values *\/$/;"	m	struct:_p_SVD
+nshifts	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt         nshifts;            \/* elements in the arrays of shifts and inertias *\/$/;"	m	struct:__anon81
+nshifts	src/nep/impls/nleigs/nleigs.c	/^  PetscInt       nshifts;   \/* provided number of shifts *\/$/;"	m	struct:__anon92	file:
+nshiftsw	src/nep/impls/nleigs/nleigs.c	/^  PetscInt       nshiftsw;  \/* actual number of shifts (1 if Krylov-Schur) *\/$/;"	m	struct:__anon92	file:
+nst	src/nep/interface/neprefine.c	/^  VecScatter    *scatter_id,nst;$/;"	m	struct:__anon97	file:
+nst	src/pep/interface/peprefine.c	/^  VecScatter *scatter_id,nst;$/;"	m	struct:__anon108	file:
+nsteps	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         nsteps;          \/* maximum number of steps per run *\/$/;"	m	struct:__anon76
+nsv	include/slepc/private/svdimpl.h	/^  PetscInt       nsv;              \/* number of requested values *\/$/;"	m	struct:_p_SVD
 nt	include/slepc/private/nepimpl.h	/^  PetscInt       nt;               \/* number of terms in split form *\/$/;"	m	struct:_p_NEP
-nu	src/sys/classes/st/impls/cayley/cayley.c	/^  PetscScalar nu;$/;"	m	struct:__anon109	file:
-nu_set	src/sys/classes/st/impls/cayley/cayley.c	/^  PetscBool   nu_set;$/;"	m	struct:__anon109	file:
+nu	src/sys/classes/st/impls/cayley/cayley.c	/^  PetscScalar nu;$/;"	m	struct:__anon128	file:
+nu_set	src/sys/classes/st/impls/cayley/cayley.c	/^  PetscBool   nu_set;$/;"	m	struct:__anon128	file:
 numEigs	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      numEigs;      \/* Number of eigenvalues in the interval *\/$/;"	m	struct:_n_SR
-num_solve_point	src/eps/impls/ciss/ciss.c	/^  PetscInt     num_solve_point;$/;"	m	struct:__anon47	file:
-num_solve_point	src/nep/impls/ciss/nciss.c	/^  PetscInt     num_solve_point;$/;"	m	struct:__anon77	file:
-num_subcomm	src/eps/impls/ciss/ciss.c	/^  PetscInt     num_subcomm;$/;"	m	struct:__anon47	file:
-num_subcomm	src/nep/impls/ciss/nciss.c	/^  PetscInt     num_subcomm;$/;"	m	struct:__anon77	file:
+num_solve_point	src/eps/impls/ciss/ciss.c	/^  PetscInt          num_solve_point;$/;"	m	struct:__anon61	file:
+num_solve_point	src/nep/impls/ciss/nciss.c	/^  PetscInt     num_solve_point;$/;"	m	struct:__anon89	file:
+num_subcomm	src/eps/impls/ciss/ciss.c	/^  PetscInt          num_subcomm;$/;"	m	struct:__anon61	file:
+num_subcomm	src/nep/impls/ciss/nciss.c	/^  PetscInt     num_subcomm;$/;"	m	struct:__anon89	file:
 numbermonitors	include/slepc/private/epsimpl.h	/^  PetscInt       numbermonitors;$/;"	m	struct:_p_EPS
 numbermonitors	include/slepc/private/mfnimpl.h	/^  PetscInt       numbermonitors;$/;"	m	struct:_p_MFN
 numbermonitors	include/slepc/private/nepimpl.h	/^  PetscInt       numbermonitors;$/;"	m	struct:_p_NEP
 numbermonitors	include/slepc/private/pepimpl.h	/^  PetscInt        numbermonitors;$/;"	m	struct:_p_PEP
-numbermonitors	include/slepc/private/svdimpl.h	/^  PetscInt         numbermonitors;$/;"	m	struct:_p_SVD
+numbermonitors	include/slepc/private/svdimpl.h	/^  PetscInt       numbermonitors;$/;"	m	struct:_p_SVD
 nv	include/slepc/private/mfnimpl.h	/^  PetscInt       nv;             \/* size of current Schur decomposition *\/$/;"	m	struct:_p_MFN
 nv	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      nv;           \/* position of restart vector *\/$/;"	m	struct:_n_SR
+nv	src/nep/interface/neprefine.c	/^  Vec           nv,vg,v,w;$/;"	m	struct:__anon97	file:
+nv	src/pep/interface/peprefine.c	/^  Vec        nv,vg,v,w;$/;"	m	struct:__anon108	file:
+nw	include/slepc/private/fnimpl.h	/^  PetscInt    nw;             \/* number of allocated W matrices *\/$/;"	m	struct:_p_FN
 nwork	include/slepc/private/epsimpl.h	/^  PetscInt       nwork;            \/* number of work vectors *\/$/;"	m	struct:_p_EPS
 nwork	include/slepc/private/mfnimpl.h	/^  PetscInt       nwork;          \/* number of work vectors *\/$/;"	m	struct:_p_MFN
 nwork	include/slepc/private/nepimpl.h	/^  PetscInt       nwork;            \/* number of work vectors *\/$/;"	m	struct:_p_NEP
 nwork	include/slepc/private/pepimpl.h	/^  PetscInt       nwork;            \/* number of work vectors *\/$/;"	m	struct:_p_PEP
-nx	include/slepc/private/vecimplslepc.h	/^  PetscInt      nx;       \/* number of available subvectors *\/$/;"	m	struct:__anon6
-oldU	src/eps/impls/davidson/dvdupdatev.c	/^  Mat               oldU;              \/* previous projected right igenvectors *\/$/;"	m	struct:__anon57	file:
-oldV	src/eps/impls/davidson/dvdupdatev.c	/^  Mat               oldV;              \/* previous projected left eigenvectors *\/$/;"	m	struct:__anon57	file:
-old_calcPairs	src/eps/impls/davidson/dvdutils.c	/^  PetscErrorCode (*old_calcPairs)(struct _dvdDashboard*);$/;"	m	struct:__anon61	file:
-old_improveX	src/eps/impls/davidson/dvdutils.c	/^  PetscErrorCode (*old_improveX)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);$/;"	m	struct:__anon61	file:
-old_initV	src/eps/impls/davidson/dvdutils.c	/^  PetscErrorCode (*old_initV)(struct _dvdDashboard*);$/;"	m	struct:__anon61	file:
-old_initV_data	src/eps/impls/davidson/dvdinitv.c	/^  void     *old_initV_data;   \/* old initV data *\/$/;"	m	struct:__anon56	file:
-old_isRestarting	src/eps/impls/davidson/dvdupdatev.c	/^  isRestarting_type old_isRestarting;  \/* old isRestarting *\/$/;"	m	struct:__anon57	file:
-old_orthV	src/eps/impls/davidson/dvdutils.c	/^  PetscErrorCode (*old_orthV)(struct _dvdDashboard*);$/;"	m	struct:__anon61	file:
-old_pc	src/eps/impls/davidson/dvdimprovex.c	/^  PC           old_pc;             \/* old pc in ksp *\/$/;"	m	struct:__anon55	file:
-old_size_X	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     old_size_X;         \/* last number of improved vectors *\/$/;"	m	struct:__anon55	file:
-old_updateV	src/eps/impls/davidson/dvdutils.c	/^  PetscErrorCode (*old_updateV)(struct _dvdDashboard*);$/;"	m	struct:__anon61	file:
-old_updateV_data	src/eps/impls/davidson/dvdupdatev.c	/^  void              *old_updateV_data; \/* old updateV data *\/$/;"	m	struct:__anon57	file:
-oldnconv	include/slepc/private/slepcimpl.h	/^  PetscInt    oldnconv;$/;"	m	struct:_n_SlepcConvMonitor
+nx	include/slepc/private/vecimplslepc.h	/^  PetscInt      nx;       \/* number of available subvectors *\/$/;"	m	struct:__anon8
+oldU	src/eps/impls/davidson/dvdupdatev.c	/^  Mat               oldU;              \/* previous projected right igenvectors *\/$/;"	m	struct:__anon70	file:
+oldV	src/eps/impls/davidson/dvdupdatev.c	/^  Mat               oldV;              \/* previous projected left eigenvectors *\/$/;"	m	struct:__anon70	file:
+old_initV_data	src/eps/impls/davidson/dvdinitv.c	/^  void     *old_initV_data;   \/* old initV data *\/$/;"	m	struct:__anon69	file:
+old_isRestarting	src/eps/impls/davidson/dvdupdatev.c	/^  PetscErrorCode    (*old_isRestarting)(dvdDashboard*,PetscBool*);  \/* old isRestarting *\/$/;"	m	struct:__anon70	file:
+old_pc	src/eps/impls/davidson/dvdimprovex.c	/^  PC           old_pc;             \/* old pc in ksp *\/$/;"	m	struct:__anon68	file:
+old_size_X	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     old_size_X;         \/* last number of improved vectors *\/$/;"	m	struct:__anon68	file:
+old_updateV_data	src/eps/impls/davidson/dvdupdatev.c	/^  void              *old_updateV_data; \/* old updateV data *\/$/;"	m	struct:__anon70	file:
+oldnconv	include/slepc/private/slepcimpl.h	/^  PetscInt          oldnconv;$/;"	m	struct:_n_SlepcConvMonitor
 omat	include/slepc/private/dsimpl.h	/^  Mat            omat[DS_NUM_MAT];   \/* the matrices (PETSc object) *\/$/;"	m	struct:_p_DS
 omega	include/slepc/private/bvimpl.h	/^  PetscReal          *omega;       \/* signature matrix values for indefinite case *\/$/;"	m	struct:_p_BV
-omega	src/eps/impls/ciss/ciss.c	/^  PetscScalar  *omega;$/;"	m	struct:__anon47	file:
-omega	src/nep/impls/ciss/nciss.c	/^  PetscScalar  *omega;$/;"	m	struct:__anon77	file:
-oneside	src/svd/impls/lanczos/gklanczos.c	/^  PetscBool oneside;$/;"	m	struct:__anon93	file:
-oneside	src/svd/impls/trlanczos/trlanczos.c	/^  PetscBool oneside;$/;"	m	struct:__anon94	file:
+omega	src/eps/impls/ciss/ciss.c	/^  PetscScalar       *omega;$/;"	m	struct:__anon61	file:
+omega	src/nep/impls/ciss/nciss.c	/^  PetscScalar  *omega;$/;"	m	struct:__anon89	file:
+oneside	src/svd/impls/lanczos/gklanczos.c	/^  PetscBool oneside;$/;"	m	struct:__anon112	file:
+oneside	src/svd/impls/trlanczos/trlanczos.c	/^  PetscBool oneside;$/;"	m	struct:__anon113	file:
 optionspackages	config/configure.py	/^optionspackages  = [slepc, arpack, blopex, blzpack, feast, primme, trlan, sowing]$/;"	v
 orthog_block	include/slepc/private/bvimpl.h	/^  BVOrthogBlockType  orthog_block; \/* the method of block orthogonalization *\/$/;"	m	struct:_p_BV
 orthog_eta	include/slepc/private/bvimpl.h	/^  PetscReal          orthog_eta;   \/* refinement threshold *\/$/;"	m	struct:_p_BV
 orthog_ref	include/slepc/private/bvimpl.h	/^  BVOrthogRefineType orthog_ref;   \/* refinement method *\/$/;"	m	struct:_p_BV
 orthog_type	include/slepc/private/bvimpl.h	/^  BVOrthogType       orthog_type;  \/* the method of vector orthogonalization *\/$/;"	m	struct:_p_BV
 orthogonalize	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*orthogonalize)(BV,Mat);$/;"	m	struct:_BVOps
+osfactor	include/slepc/private/rgimpl.h	/^  PetscReal   osfactor;      \/* old scaling factor, before RGPushScale *\/$/;"	m	struct:_p_RG
 ourarbitraryfunc	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourarbitraryfunc(PetscScalar er,PetscScalar ei,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx)$/;"	f	file:
 ourconvdestroy	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourconvdestroy(void *ctx)$/;"	f	file:
+ourconvdestroy	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourconvdestroy(void *ctx)$/;"	f	file:
 ourconvdestroy	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode ourconvdestroy(void *ctx)$/;"	f	file:
+ourconvdestroy	src/svd/interface/ftn-custom/zsvdf.c	/^static PetscErrorCode ourconvdestroy(void *ctx)$/;"	f	file:
 ourconvergence	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourconvergence(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f	file:
+ourconvergence	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourconvergence(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f	file:
 ourconvergence	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode ourconvergence(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)$/;"	f	file:
+ourconvergence	src/svd/interface/ftn-custom/zsvdf.c	/^static PetscErrorCode ourconvergence(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)$/;"	f	file:
 ourdestroy	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourdestroy(void** ctx)$/;"	f	file:
 ourdestroy	src/mfn/interface/ftn-custom/zmfnf.c	/^static PetscErrorCode ourdestroy(void** ctx)$/;"	f	file:
 ourdestroy	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourdestroy(void** ctx)$/;"	f	file:
 ourdestroy	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode ourdestroy(void** ctx)$/;"	f	file:
 ourdestroy	src/svd/interface/ftn-custom/zsvdf.c	/^static PetscErrorCode ourdestroy(void** ctx)$/;"	f	file:
 oureigenvaluecomparison	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)$/;"	f	file:
+oureigenvaluecomparison	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)$/;"	f	file:
 oureigenvaluecomparison	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)$/;"	f	file:
 ourmonitor	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourmonitor(EPS eps,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)$/;"	f	file:
 ourmonitor	src/mfn/interface/ftn-custom/zmfnf.c	/^static PetscErrorCode ourmonitor(MFN mfn,PetscInt i,PetscReal d,void* ctx)$/;"	f	file:
-ourmonitor	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourmonitor(NEP nep,PetscInt i,PetscInt nc,PetscScalar *eig,PetscReal *d,PetscInt l,void* ctx)$/;"	f	file:
+ourmonitor	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourmonitor(NEP nep,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)$/;"	f	file:
 ourmonitor	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode ourmonitor(PEP pep,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)$/;"	f	file:
 ourmonitor	src/svd/interface/ftn-custom/zsvdf.c	/^static PetscErrorCode ourmonitor(SVD svd,PetscInt i,PetscInt nc,PetscReal *sigma,PetscReal *d,PetscInt l,void* ctx)$/;"	f	file:
 ourshellapply	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^static PetscErrorCode ourshellapply(ST st,Vec x,Vec y)$/;"	f	file:
 ourshellapplytranspose	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^static PetscErrorCode ourshellapplytranspose(ST st,Vec x,Vec y)$/;"	f	file:
 ourshellbacktransform	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	/^static PetscErrorCode ourshellbacktransform(ST st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)$/;"	f	file:
+ourstopdestroy	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourstopdestroy(void *ctx)$/;"	f	file:
+ourstopdestroy	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourstopdestroy(void *ctx)$/;"	f	file:
+ourstopdestroy	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode ourstopdestroy(void *ctx)$/;"	f	file:
+ourstopdestroy	src/svd/interface/ftn-custom/zsvdf.c	/^static PetscErrorCode ourstopdestroy(void *ctx)$/;"	f	file:
+ourstopping	src/eps/interface/ftn-custom/zepsf.c	/^static PetscErrorCode ourstopping(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)$/;"	f	file:
+ourstopping	src/nep/interface/ftn-custom/znepf.c	/^static PetscErrorCode ourstopping(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)$/;"	f	file:
+ourstopping	src/pep/interface/ftn-custom/zpepf.c	/^static PetscErrorCode ourstopping(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)$/;"	f	file:
+ourstopping	src/svd/interface/ftn-custom/zsvdf.c	/^static PetscErrorCode ourstopping(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)$/;"	f	file:
 outputDestDirDone	config/install.py	/^  def outputDestDirDone(self):$/;"	f
 outputInstallDone	config/install.py	/^  def outputInstallDone(self):$/;"	m	class:Installer
-pA	src/eps/impls/ciss/ciss.c	/^  Mat          pA,pB;$/;"	m	struct:__anon47	file:
-pB	src/eps/impls/ciss/ciss.c	/^  Mat          pA,pB;$/;"	m	struct:__anon47	file:
-pV	src/eps/impls/ciss/ciss.c	/^  BV           pV;$/;"	m	struct:__anon47	file:
+pA	src/eps/impls/ciss/ciss.c	/^  Mat               pA,pB;$/;"	m	struct:__anon61	file:
+pB	src/eps/impls/ciss/ciss.c	/^  Mat               pA,pB;$/;"	m	struct:__anon61	file:
+pM4	src/pep/impls/krylov/toar/nrefine.c	/^  PetscBLASInt *pM4;$/;"	m	struct:__anon104	file:
+pV	src/eps/impls/ciss/ciss.c	/^  BV                pV;$/;"	m	struct:__anon61	file:
 package_dir	setup.py	/^      package_dir = {'slepc': 'pypi'},$/;"	v
 packages	setup.py	/^      packages = ['slepc'],$/;"	v
 par_GlobalSumDouble	src/eps/impls/external/primme/primme.c	/^static void par_GlobalSumDouble(void *sendBuf,void *recvBuf,int *count,primme_params *primme)$/;"	f	file:
@@ -9525,26 +10525,24 @@ parser	config/cmakegen.py	/^  parser = optparse.OptionParser()$/;"	v
 parser	config/gmakegen.py	/^    parser = optparse.OptionParser()$/;"	v
 pathsplit	config/cmakegen.py	/^def pathsplit(path):$/;"	f
 pbc	include/slepc/private/pepimpl.h	/^  PetscReal      *pbc;             \/* coefficients defining the polynomial basis *\/$/;"	m	struct:_p_PEP
-pc	src/eps/impls/davidson/dvdutils.c	/^  PC pc;$/;"	m	struct:__anon58	file:
-pc	src/pep/impls/jd/pjdp.h	/^  PC          pc;            \/* basic preconditioner *\/$/;"	m	struct:__anon83
-pcoeff	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscScalar *pcoeff;    \/* numerator coefficients *\/$/;"	m	struct:__anon104	file:
-pcshell	src/pep/impls/jd/pjdp.h	/^  PC          pcshell;       \/* preconditioner including basic precond+projector *\/$/;"	m	struct:__anon82
+pc	src/eps/impls/davidson/dvdutils.c	/^  PC pc;$/;"	m	struct:__anon71	file:
+pc	src/pep/impls/jd/pjdp.h	/^  PC          pc;            \/* basic preconditioner *\/$/;"	m	struct:__anon100
+pcoeff	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscScalar *pcoeff;    \/* numerator coefficients *\/$/;"	m	struct:__anon123	file:
+pcshell	src/pep/impls/jd/pjdp.h	/^  PC          pcshell;       \/* preconditioner including basic precond+projector *\/$/;"	m	struct:__anon99
 pending	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS_shift     *pending;     \/* Pending shifts array *\/$/;"	m	struct:_n_SR
-pep	src/nep/impls/interpol/interpol.c	/^  PEP       pep;$/;"	m	struct:__anon78	file:
+pep	src/nep/impls/interpol/interpol.c	/^  PEP       pep;$/;"	m	struct:__anon90	file:
 pep	src/pep/examples/tutorials/ex16f90.F90	/^      type(PEP)      pep$/;"	v	program:main
-pep	src/pep/impls/linear/linearp.h	/^  PEP        pep;$/;"	m	struct:__anon88
+pep	src/pep/impls/jd/pjdp.h	/^  PEP         pep;$/;"	m	struct:__anon101
+pep	src/pep/impls/linear/linearp.h	/^  PEP        pep;$/;"	m	struct:__anon106
 pepappendoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepappendoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 pepappendoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	33;"	d	file:
 pepappendoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	55;"	d	file:
 pepconvergedabsolute_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepconvergedabsolute_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
 pepconvergedabsolute_	src/pep/interface/ftn-custom/zpepf.c	43;"	d	file:
 pepconvergedabsolute_	src/pep/interface/ftn-custom/zpepf.c	65;"	d	file:
-pepconvergedeigrelative_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepconvergedeigrelative_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
-pepconvergedeigrelative_	src/pep/interface/ftn-custom/zpepf.c	44;"	d	file:
-pepconvergedeigrelative_	src/pep/interface/ftn-custom/zpepf.c	66;"	d	file:
-pepconvergedlinear_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepconvergedlinear_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
-pepconvergedlinear_	src/pep/interface/ftn-custom/zpepf.c	45;"	d	file:
-pepconvergedlinear_	src/pep/interface/ftn-custom/zpepf.c	67;"	d	file:
+pepconvergedrelative_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepconvergedrelative_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+pepconvergedrelative_	src/pep/interface/ftn-custom/zpepf.c	44;"	d	file:
+pepconvergedrelative_	src/pep/interface/ftn-custom/zpepf.c	66;"	d	file:
 peperrorview_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL peperrorview_(PEP *pep,PEPErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 peperrorview_	src/pep/interface/ftn-custom/zpepf.c	28;"	d	file:
 peperrorview_	src/pep/interface/ftn-custom/zpepf.c	50;"	d	file:
@@ -9554,13 +10552,13 @@ pepgetoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	56;"	d	file:
 pepgettype_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepgettype_(PEP *pep,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 pepgettype_	src/pep/interface/ftn-custom/zpepf.c	36;"	d	file:
 pepgettype_	src/pep/interface/ftn-custom/zpepf.c	58;"	d	file:
-pepmonitorall_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+pepmonitorall_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 pepmonitorall_	src/pep/interface/ftn-custom/zpepf.c	37;"	d	file:
 pepmonitorall_	src/pep/interface/ftn-custom/zpepf.c	59;"	d	file:
-pepmonitorconverged_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorconverged_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+pepmonitorconverged_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorconverged_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)$/;"	f
 pepmonitorconverged_	src/pep/interface/ftn-custom/zpepf.c	41;"	d	file:
 pepmonitorconverged_	src/pep/interface/ftn-custom/zpepf.c	63;"	d	file:
-pepmonitorfirst_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorfirst_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+pepmonitorfirst_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorfirst_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 pepmonitorfirst_	src/pep/interface/ftn-custom/zpepf.c	42;"	d	file:
 pepmonitorfirst_	src/pep/interface/ftn-custom/zpepf.c	64;"	d	file:
 pepmonitorlg_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void pepmonitorlg_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
@@ -9576,17 +10574,21 @@ pepreasonview_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_ST
 pepreasonview_	src/pep/interface/ftn-custom/zpepf.c	29;"	d	file:
 pepreasonview_	src/pep/interface/ftn-custom/zpepf.c	51;"	d	file:
 pepsetconvergencetestfunction_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepsetconvergencetestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
-pepsetconvergencetestfunction_	src/pep/interface/ftn-custom/zpepf.c	46;"	d	file:
-pepsetconvergencetestfunction_	src/pep/interface/ftn-custom/zpepf.c	68;"	d	file:
+pepsetconvergencetestfunction_	src/pep/interface/ftn-custom/zpepf.c	45;"	d	file:
+pepsetconvergencetestfunction_	src/pep/interface/ftn-custom/zpepf.c	67;"	d	file:
 pepseteigenvaluecomparison_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepseteigenvaluecomparison_(PEP *pep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)$/;"	f
 pepseteigenvaluecomparison_	src/pep/interface/ftn-custom/zpepf.c	47;"	d	file:
 pepseteigenvaluecomparison_	src/pep/interface/ftn-custom/zpepf.c	69;"	d	file:
 pepsetoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepsetoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 pepsetoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	32;"	d	file:
 pepsetoptionsprefix_	src/pep/interface/ftn-custom/zpepf.c	54;"	d	file:
+pepsetstoppingtestfunction_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepsetstoppingtestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+pepsetstoppingtestfunction_	src/pep/interface/ftn-custom/zpepf.c	46;"	d	file:
+pepsetstoppingtestfunction_	src/pep/interface/ftn-custom/zpepf.c	68;"	d	file:
 pepsettype_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepsettype_(PEP *pep,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 pepsettype_	src/pep/interface/ftn-custom/zpepf.c	35;"	d	file:
 pepsettype_	src/pep/interface/ftn-custom/zpepf.c	57;"	d	file:
+pepstoppingbasic_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepstoppingbasic_(PEP *pep,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,PEPConvergedReason *reason,void *ctx,PetscErrorCode *ierr)$/;"	f
 pepvaluesview_	src/pep/interface/ftn-custom/zpepf.c	/^PETSC_EXTERN void PETSC_STDCALL pepvaluesview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 pepvaluesview_	src/pep/interface/ftn-custom/zpepf.c	30;"	d	file:
 pepvaluesview_	src/pep/interface/ftn-custom/zpepf.c	52;"	d	file:
@@ -9600,7 +10602,7 @@ perm	include/slepc/private/dsimpl.h	/^  PetscInt       *perm;              \/* p
 perm	include/slepc/private/epsimpl.h	/^  PetscInt       *perm;            \/* permutation for eigenvalue ordering *\/$/;"	m	struct:_p_EPS
 perm	include/slepc/private/nepimpl.h	/^  PetscInt       *perm;            \/* permutation for eigenvalue ordering *\/$/;"	m	struct:_p_NEP
 perm	include/slepc/private/pepimpl.h	/^  PetscInt       *perm;            \/* permutation for eigenvalue ordering *\/$/;"	m	struct:_p_PEP
-perm	include/slepc/private/svdimpl.h	/^  PetscInt         *perm;       \/* permutation for singular value ordering *\/$/;"	m	struct:_p_SVD
+perm	include/slepc/private/svdimpl.h	/^  PetscInt       *perm;            \/* permutation for singular value ordering *\/$/;"	m	struct:_p_SVD
 perm	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscInt      *perm;        \/* permutation (for subsolve) *\/$/;"	m	struct:_n_SR
 petsc	config/configure.py	/^petsc   = petsc.PETSc(argdb,log)$/;"	v
 petsc_path	config/gmakegen.py	/^    def petsc_path(self, *args):$/;"	m	class:Slepc
@@ -9611,40 +10613,36 @@ pkgconfdir	config/configure.py	/^pkgconfdir = CreateDir(libdir,'pkgconfig',log)$
 pkgconfig	config/configure.py	/^pkgconfig  = CreateFile(pkgconfdir,'SLEPc.pc',log)$/;"	v
 pkgsources	config/cmakegen.py	/^def pkgsources(pkg, mistakes):$/;"	f
 platforms	setup.py	/^      platforms=['POSIX'],$/;"	v
-plusk	src/eps/impls/davidson/davidson.c	/^  PetscInt  plusk;         \/* keep plusk eigenvectors from the last iteration *\/$/;"	m	struct:__anon48	file:
-plusk	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          plusk;             \/* at restart, save plusk vectors from last iteration *\/$/;"	m	struct:__anon57	file:
+plusk	src/eps/impls/davidson/davidson.h	/^  PetscInt  plusk;         \/* keep plusk eigenvectors from the last iteration *\/$/;"	m	struct:__anon65
+plusk	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          plusk;             \/* at restart, save plusk vectors from last iteration *\/$/;"	m	struct:__anon70	file:
 postsolve	include/slepc/private/stimpl.h	/^  PetscErrorCode (*postsolve)(ST);$/;"	m	struct:_STOps
-pp	src/eps/impls/ciss/ciss.c	/^  PetscScalar  *pp;$/;"	m	struct:__anon47	file:
-pp	src/nep/impls/ciss/nciss.c	/^  PetscScalar  *pp;$/;"	m	struct:__anon77	file:
-preTestConv	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*preTestConv)(struct _dvdDashboard*,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv);$/;"	m	struct:_dvdDashboard
+pp	src/eps/impls/ciss/ciss.c	/^  PetscScalar       *pp;$/;"	m	struct:__anon61	file:
+pp	src/nep/impls/ciss/nciss.c	/^  PetscScalar  *pp;$/;"	m	struct:__anon89	file:
+preTestConv	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*preTestConv)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt,PetscInt*);$/;"	m	struct:_dvdDashboard
 primme	config/configure.py	/^primme  = primme.Primme(argdb,log)$/;"	v
-primme	src/eps/impls/external/primme/primme.c	/^  primme_params primme;           \/* param struc *\/$/;"	m	struct:__anon66	file:
+primme	src/eps/impls/external/primme/primme.c	/^  primme_params primme;           \/* param struc *\/$/;"	m	struct:__anon78	file:
 problem_type	include/slepc/private/epsimpl.h	/^  EPSProblemType problem_type;     \/* which kind of problem to be solved *\/$/;"	m	struct:_p_EPS
 problem_type	include/slepc/private/pepimpl.h	/^  PEPProblemType problem_type;     \/* which kind of problem to be solved *\/$/;"	m	struct:_p_PEP
 processDir	bin/maint/generateetags.py	/^def processDir(flist,dirname,names):$/;"	f
 processDir	bin/maint/generatefortranstubs.py	/^def processDir(arg,dirname,names):$/;"	f
 processFiles	bin/maint/generateetags.py	/^def processFiles(dirname,flist):$/;"	f
 processf90interfaces	bin/maint/generatefortranstubs.py	/^def processf90interfaces(petscdir,verbose):$/;"	f
-prof_data	src/eps/impls/davidson/davidson.h	/^  void* prof_data;             \/* profiler data *\/$/;"	m	struct:_dvdDashboard
+ps	src/pep/impls/jd/pjdp.h	/^  PetscScalar *ps;$/;"	m	struct:__anon100
 publishoptions	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*publishoptions)(EPS);$/;"	m	struct:_EPSOps
 publishoptions	include/slepc/private/mfnimpl.h	/^  PetscErrorCode (*publishoptions)(MFN);$/;"	m	struct:_MFNOps
 publishoptions	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*publishoptions)(NEP);$/;"	m	struct:_NEPOps
 publishoptions	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*publishoptions)(PEP);$/;"	m	struct:_PEPOps
 publishoptions	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*publishoptions)(SVD);$/;"	m	struct:_SVDOps
 purify	include/slepc/private/epsimpl.h	/^  PetscBool      purify;           \/* whether eigenvectors need to be purified *\/$/;"	m	struct:_p_EPS
-qB	src/pep/impls/krylov/pepkrylov.h	/^  PetscScalar *S,*qB;       \/* auxiliary matrices *\/$/;"	m	struct:__anon84
-qcoeff	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscScalar *qcoeff;    \/* denominator coefficients *\/$/;"	m	struct:__anon104	file:
+qB	src/pep/impls/krylov/pepkrylov.h	/^  PetscScalar *S,*qB;       \/* auxiliary matrices *\/$/;"	m	struct:__anon102
+qcoeff	src/sys/classes/fn/impls/rational/fnrational.c	/^  PetscScalar *qcoeff;    \/* denominator coefficients *\/$/;"	m	struct:__anon123	file:
+quad	src/eps/impls/ciss/ciss.c	/^  EPSCISSQuadRule   quad;$/;"	m	struct:__anon61	file:
 quoteIfNeeded	config/cmakeboot.py	/^def quoteIfNeeded(path):$/;"	f
-r_e	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     r_s,r_e;            \/* the selected eigenpairs to improve *\/$/;"	m	struct:__anon55	file:
-r_s	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     r_s,r_e;            \/* the selected eigenpairs to improve *\/$/;"	m	struct:__anon55	file:
-radius	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^  PetscReal   radius;     \/* radius of the ellipse *\/$/;"	m	struct:__anon105	file:
-radius	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   radius;     \/* radius of the ellipse *\/$/;"	m	struct:__anon108	file:
-rand	include/slepc/private/epsimpl.h	/^  PetscRandom    rand;             \/* random number generator *\/$/;"	m	struct:_p_EPS
-rand	include/slepc/private/mfnimpl.h	/^  PetscRandom    rand;           \/* random number generator *\/$/;"	m	struct:_p_MFN
-rand	include/slepc/private/nepimpl.h	/^  PetscRandom    rand;             \/* random number generator *\/$/;"	m	struct:_p_NEP
-rand	include/slepc/private/pepimpl.h	/^  PetscRandom    rand;             \/* random number generator *\/$/;"	m	struct:_p_PEP
-rand	include/slepc/private/svdimpl.h	/^  PetscRandom      rand;        \/* random number generator *\/$/;"	m	struct:_p_SVD
-randini	src/pep/impls/jd/pjdp.h	/^  PetscBool   randini;       \/* use random initial search space *\/$/;"	m	struct:__anon82
+r_e	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     r_s,r_e;            \/* the selected eigenpairs to improve *\/$/;"	m	struct:__anon68	file:
+r_s	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     r_s,r_e;            \/* the selected eigenpairs to improve *\/$/;"	m	struct:__anon68	file:
+radius	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^  PetscReal   radius;     \/* radius of the ellipse *\/$/;"	m	struct:__anon124	file:
+radius	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   radius;     \/* radius of the ellipse *\/$/;"	m	struct:__anon127	file:
+rand	include/slepc/private/bvimpl.h	/^  PetscRandom        rand;         \/* random number generator *\/$/;"	m	struct:_p_BV
 read_conf	config/gmakegen.py	/^    def read_conf(self):$/;"	m	class:Slepc
 real_nR	src/eps/impls/davidson/davidson.h	/^  PetscReal   *real_nR;       \/* original nR *\/$/;"	m	struct:_dvdDashboard
 real_nX	src/eps/impls/davidson/davidson.h	/^  PetscReal   *real_nX;       \/* original nX *\/$/;"	m	struct:_dvdDashboard
@@ -9655,19 +10653,19 @@ reason	include/slepc/private/pepimpl.h	/^  PEPConvergedReason reason;$/;"	m	stru
 reason	include/slepc/private/svdimpl.h	/^  SVDConvergedReason reason;$/;"	m	struct:_p_SVD
 refine	include/slepc/private/nepimpl.h	/^  NEPRefine      refine;           \/* type of refinement to be applied after solve *\/$/;"	m	struct:_p_NEP
 refine	include/slepc/private/pepimpl.h	/^  PEPRefine      refine;           \/* type of refinement to be applied after solve *\/$/;"	m	struct:_p_PEP
-refine_blocksize	src/eps/impls/ciss/ciss.c	/^  PetscInt    refine_blocksize;$/;"	m	struct:__anon47	file:
-refine_blocksize	src/nep/impls/ciss/nciss.c	/^  PetscInt     refine_blocksize;$/;"	m	struct:__anon77	file:
-refine_inner	src/eps/impls/ciss/ciss.c	/^  PetscInt    refine_inner;$/;"	m	struct:__anon47	file:
-refine_inner	src/nep/impls/ciss/nciss.c	/^  PetscInt     refine_inner;$/;"	m	struct:__anon77	file:
-refine_outer	src/eps/impls/ciss/ciss.c	/^  PetscInt    refine_outer;$/;"	m	struct:__anon47	file:
-refine_outer	src/nep/impls/ciss/nciss.c	/^  PetscInt     refine_outer;$/;"	m	struct:__anon77	file:
+refine_blocksize	src/eps/impls/ciss/ciss.c	/^  PetscInt          refine_blocksize;$/;"	m	struct:__anon61	file:
+refine_blocksize	src/nep/impls/ciss/nciss.c	/^  PetscInt     refine_blocksize;$/;"	m	struct:__anon89	file:
+refine_inner	src/eps/impls/ciss/ciss.c	/^  PetscInt          refine_inner;$/;"	m	struct:__anon61	file:
+refine_inner	src/nep/impls/ciss/nciss.c	/^  PetscInt     refine_inner;$/;"	m	struct:__anon89	file:
 refined	include/slepc/private/dsimpl.h	/^  PetscBool      refined;            \/* get refined vectors instead of regular vectors *\/$/;"	m	struct:_p_DS
+refineksp	include/slepc/private/nepimpl.h	/^  KSP            refineksp;        \/* ksp used in refinement *\/$/;"	m	struct:_p_NEP
 refineksp	include/slepc/private/pepimpl.h	/^  KSP            refineksp;        \/* ksp used in refinement *\/$/;"	m	struct:_p_PEP
+refinesubc	include/slepc/private/nepimpl.h	/^  PetscSubcomm   refinesubc;       \/* context for sub-communicators *\/$/;"	m	struct:_p_NEP
 refinesubc	include/slepc/private/pepimpl.h	/^  PetscSubcomm   refinesubc;       \/* context for sub-communicators *\/$/;"	m	struct:_p_PEP
-reftol	include/slepc/private/nepimpl.h	/^  PetscReal      reftol;           \/* tolerance for refinement *\/$/;"	m	struct:_p_NEP
 relpath	config/cmakegen.py	/^    def relpath(filename):$/;"	f	function:pkgsources
 relpath	config/gmakegen.py	/^    def relpath(self, root, src):$/;"	m	class:Slepc
-reorthog	src/eps/impls/krylov/lanczos/lanczos.c	/^  EPSLanczosReorthogType reorthog;$/;"	m	struct:__anon70	file:
+reorthog	src/eps/impls/krylov/lanczos/lanczos.c	/^  EPSLanczosReorthogType reorthog;$/;"	m	struct:__anon82	file:
+rescale_eig	src/eps/impls/ciss/ciss.c	/^static PetscErrorCode rescale_eig(EPS eps,PetscInt nv)$/;"	f	file:
 reset	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*reset)(EPS);$/;"	m	struct:_EPSOps
 reset	include/slepc/private/mfnimpl.h	/^  PetscErrorCode (*reset)(MFN);$/;"	m	struct:_MFNOps
 reset	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*reset)(NEP);$/;"	m	struct:_NEPOps
@@ -9675,10 +10673,12 @@ reset	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*reset)(PEP);$/;"	m	st
 reset	include/slepc/private/stimpl.h	/^  PetscErrorCode (*reset)(ST);$/;"	m	struct:_STOps
 reset	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*reset)(SVD);$/;"	m	struct:_SVDOps
 resize	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*resize)(BV,PetscInt,PetscBool);$/;"	m	struct:_BVOps
-restart	src/eps/impls/external/trlan/trlanp.h	/^  PetscBLASInt       restart;$/;"	m	struct:__anon67
+restart	src/eps/impls/cg/lobpcg/lobpcg.c	/^  PetscReal restart;   \/* restart parameter *\/$/;"	m	struct:__anon59	file:
+restart	src/eps/impls/external/trlan/trlanp.h	/^  PetscBLASInt       restart;$/;"	m	struct:__anon79
 restartV	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*restartV)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
 restartV_data	src/eps/impls/davidson/davidson.h	/^  void *restartV_data;$/;"	m	struct:_dvdDashboard
 restorearray	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*restorearray)(BV,PetscScalar**);$/;"	m	struct:_BVOps
+restorearrayread	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*restorearrayread)(BV,const PetscScalar**);$/;"	m	struct:_BVOps
 restorecolumn	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*restorecolumn)(BV,PetscInt,Vec*);$/;"	m	struct:_BVOps
 rfactorial	src/sys/classes/fn/impls/phi/fnphi.c	/^const static PetscReal rfactorial[] = { 1, 1, 0.5, 1.0\/6, 1.0\/24, 1.0\/120, 1.0\/720, 1.0\/5040, 1.0\/40320, 1.0\/362880 };$/;"	v	file:
 rg	include/slepc/private/epsimpl.h	/^  RG             rg;               \/* optional region for filtering *\/$/;"	m	struct:_p_EPS
@@ -9698,12 +10698,14 @@ rgview_	src/sys/classes/rg/interface/ftn-custom/zrgf.c	/^PETSC_EXTERN void PETSC
 rgview_	src/sys/classes/rg/interface/ftn-custom/zrgf.c	29;"	d	file:
 rgview_	src/sys/classes/rg/interface/ftn-custom/zrgf.c	34;"	d	file:
 ri	include/slepc/private/epsimpl.h	/^  PetscScalar    *rr,*ri;          \/* values computed by user's arbitrary selection function *\/$/;"	m	struct:_p_EPS
+ri2dq	src/eps/examples/tutorials/ex31.c	/^PetscErrorCode ri2dq(PetscScalar Fr,PetscScalar Fi,PetscScalar delta,PetscScalar *Fd,PetscScalar *Fq)$/;"	f
 rits	include/slepc/private/nepimpl.h	/^  PetscInt       rits;             \/* number of iterations of the refinement method *\/$/;"	m	struct:_p_NEP
 rits	include/slepc/private/pepimpl.h	/^  PetscInt       rits;             \/* number of iterations of the refinement method *\/$/;"	m	struct:_p_PEP
 rmat	include/slepc/private/dsimpl.h	/^  PetscReal      *rmat[DS_NUM_MAT];  \/* the matrices (real) *\/$/;"	m	struct:_p_DS
 rr	include/slepc/private/epsimpl.h	/^  PetscScalar    *rr,*ri;          \/* values computed by user's arbitrary selection function *\/$/;"	m	struct:_p_EPS
-rstor	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscReal            *rstor;$/;"	m	struct:__anon64
-rtol	include/slepc/private/nepimpl.h	/^  PetscReal      abstol,rtol,stol; \/* user tolerances *\/$/;"	m	struct:_p_NEP
+rrandom	include/slepc/private/bvimpl.h	/^  PetscBool          rrandom;      \/* reproducible random vectors *\/$/;"	m	struct:_p_BV
+rstor	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscReal            *rstor;$/;"	m	struct:__anon76
+rtol	include/slepc/private/nepimpl.h	/^  PetscReal      rtol;             \/* tolerance for refinement *\/$/;"	m	struct:_p_NEP
 rtol	include/slepc/private/pepimpl.h	/^  PetscReal      rtol;             \/* tolerance for refinement *\/$/;"	m	struct:_p_PEP
 run	config/install.py	/^  def run(self):$/;"	f
 run	setup.py	/^    def run(self):$/;"	m	class:cmd_install
@@ -9712,7 +10714,8 @@ rundone	config/install.py	/^  def rundone(self):$/;"	f
 runfix	config/install.py	/^  def runfix(self):$/;"	f
 runsetup	config/install.py	/^  def runsetup(self):$/;"	f
 rwork	include/slepc/private/dsimpl.h	/^  PetscReal      *rwork;$/;"	m	struct:_p_DS
-rwork	src/eps/impls/external/arpack/arpackp.h	/^  PetscReal    *rwork;$/;"	m	struct:__anon62
+rwork	src/eps/impls/external/arpack/arpackp.h	/^  PetscReal    *rwork;$/;"	m	struct:__anon74
+s	src/nep/impls/nleigs/nleigs.c	/^  PetscScalar    *s,*xi;    \/* Leja-Bagby points *\/$/;"	m	struct:__anon92	file:
 s0	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS_shift     s0;           \/* Initial shift *\/$/;"	m	struct:_n_SR
 sA	src/eps/impls/davidson/davidson.h	/^  MatType_t   sA,sB;          \/* matrix specifications *\/$/;"	m	struct:_dvdDashboard
 sB	src/eps/impls/davidson/davidson.h	/^  MatType_t   sA,sB;          \/* matrix specifications *\/$/;"	m	struct:_dvdDashboard
@@ -9723,31 +10726,31 @@ sc	include/slepc/private/dsimpl.h	/^  SlepcSC        sc;                 \/* sor
 sc	include/slepc/private/epsimpl.h	/^  SlepcSC        sc;               \/* sorting criterion data *\/$/;"	m	struct:_p_EPS
 sc	include/slepc/private/nepimpl.h	/^  SlepcSC        sc;               \/* sorting criterion data *\/$/;"	m	struct:_p_NEP
 sc	include/slepc/private/pepimpl.h	/^  SlepcSC        sc;               \/* sorting criterion data *\/$/;"	m	struct:_p_PEP
-sc	include/slepc/private/svdimpl.h	/^  SlepcSC          sc;          \/* sorting criterion data *\/$/;"	m	struct:_p_SVD
+sc	include/slepc/private/svdimpl.h	/^  SlepcSC        sc;               \/* sorting criterion data *\/$/;"	m	struct:_p_SVD
 scale	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*scale)(BV,PetscInt,PetscScalar);$/;"	m	struct:_BVOps
 scale	include/slepc/private/pepimpl.h	/^  PEPScale       scale;            \/* scaling strategy to be used *\/$/;"	m	struct:_p_PEP
-scatter_id	src/nep/interface/neprefine.c	/^  VecScatter    *scatter_id;$/;"	m	struct:__anon81	file:
-scatter_id	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   *scatter_id,*scatterp_id;$/;"	m	struct:__anon87	file:
-scatter_id	src/pep/interface/peprefine.c	/^  VecScatter    *scatter_id;$/;"	m	struct:__anon90	file:
-scatter_sub	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   scatter_sub;$/;"	m	struct:__anon87	file:
-scatterctx	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   scatterctx;$/;"	m	struct:__anon87	file:
-scatterin	src/eps/impls/ciss/ciss.c	/^  VecScatter   scatterin;$/;"	m	struct:__anon47	file:
-scatterp_id	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   *scatter_id,*scatterp_id;$/;"	m	struct:__anon87	file:
-scheme	src/eps/impls/davidson/davidson.c	/^  Method_t  scheme;        \/* method employed: GD, JD or GD2 *\/$/;"	m	struct:__anon48	file:
-schur	include/slepc/private/pepimpl.h	/^  PetscBool      schur;            \/* use Schur complement in refinement method *\/$/;"	m	struct:_p_PEP
+scatter_id	src/nep/interface/neprefine.c	/^  VecScatter    *scatter_id,nst;$/;"	m	struct:__anon97	file:
+scatter_id	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   *scatter_id,*scatterp_id;$/;"	m	struct:__anon105	file:
+scatter_id	src/pep/interface/peprefine.c	/^  VecScatter *scatter_id,nst;$/;"	m	struct:__anon108	file:
+scatter_sub	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   scatter_sub;$/;"	m	struct:__anon105	file:
+scatterctx	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   scatterctx;$/;"	m	struct:__anon105	file:
+scatterin	src/eps/impls/ciss/ciss.c	/^  VecScatter        scatterin;$/;"	m	struct:__anon61	file:
+scatterp_id	src/pep/impls/krylov/toar/nrefine.c	/^  VecScatter   *scatter_id,*scatterp_id;$/;"	m	struct:__anon105	file:
+scheme	include/slepc/private/nepimpl.h	/^  NEPRefineScheme scheme;          \/* scheme for solving linear systems within refinement *\/$/;"	m	struct:_p_NEP
+scheme	include/slepc/private/pepimpl.h	/^  PEPRefineScheme scheme;          \/* scheme for solving linear systems within refinement *\/$/;"	m	struct:_p_PEP
 searchlines	config/configure.py	/^      searchlines = f.readlines()$/;"	v
-select	src/eps/impls/external/arpack/arpackp.h	/^  PetscBool    *select;$/;"	m	struct:__anon62
-setfromoptions	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,BV);$/;"	m	struct:_BVOps
-setfromoptions	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,EPS);$/;"	m	struct:_EPSOps
-setfromoptions	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,FN);$/;"	m	struct:_FNOps
-setfromoptions	include/slepc/private/mfnimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,MFN);$/;"	m	struct:_MFNOps
-setfromoptions	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,NEP);$/;"	m	struct:_NEPOps
-setfromoptions	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,PEP);$/;"	m	struct:_PEPOps
-setfromoptions	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,RG);$/;"	m	struct:_RGOps
-setfromoptions	include/slepc/private/stimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,ST);$/;"	m	struct:_STOps
-setfromoptions	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptions*,SVD);$/;"	m	struct:_SVDOps
-setfromoptionscalled	src/pep/impls/linear/linearp.h	/^  PetscBool  setfromoptionscalled;$/;"	m	struct:__anon88
-setmat	src/sys/classes/st/impls/precond/precond.c	/^  PetscBool setmat;$/;"	m	struct:__anon110	file:
+select	src/eps/impls/external/arpack/arpackp.h	/^  PetscBool    *select;$/;"	m	struct:__anon74
+setfromoptions	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,BV);$/;"	m	struct:_BVOps
+setfromoptions	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,EPS);$/;"	m	struct:_EPSOps
+setfromoptions	include/slepc/private/fnimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,FN);$/;"	m	struct:_FNOps
+setfromoptions	include/slepc/private/mfnimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,MFN);$/;"	m	struct:_MFNOps
+setfromoptions	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,NEP);$/;"	m	struct:_NEPOps
+setfromoptions	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,PEP);$/;"	m	struct:_PEPOps
+setfromoptions	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,RG);$/;"	m	struct:_RGOps
+setfromoptions	include/slepc/private/stimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,ST);$/;"	m	struct:_STOps
+setfromoptions	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*setfromoptions)(PetscOptionItems*,SVD);$/;"	m	struct:_SVDOps
+setfromoptionscalled	src/pep/impls/linear/linearp.h	/^  PetscBool  setfromoptionscalled;$/;"	m	struct:__anon106
+setmat	src/sys/classes/st/impls/precond/precond.c	/^  PetscBool setmat;$/;"	m	struct:__anon129	file:
 setshift	include/slepc/private/stimpl.h	/^  PetscErrorCode (*setshift)(ST,PetscScalar);$/;"	m	struct:_STOps
 setup	config/cmakeboot.py	/^ def setup(self):$/;"	m	class:PETScMaker
 setup	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*setup)(EPS);$/;"	m	struct:_EPSOps
@@ -9759,35 +10762,44 @@ setup	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*setup)(SVD);$/;"	m	st
 setupDirectories	config/install.py	/^  def setupDirectories(self):$/;"	m	class:Installer
 setupModules	config/cmakeboot.py	/^ def setupModules(self):$/;"	m	class:PETScMaker
 setupcalled	include/slepc/private/mfnimpl.h	/^  PetscInt       setupcalled;$/;"	m	struct:_p_MFN
-setupcalled	include/slepc/private/stimpl.h	/^  PetscInt         setupcalled;$/;"	m	struct:_p_ST
-sfactor	include/slepc/private/mfnimpl.h	/^  PetscScalar    sfactor;        \/* scaling factor *\/$/;"	m	struct:_p_MFN
 sfactor	include/slepc/private/pepimpl.h	/^  PetscReal      sfactor,dsfactor; \/* scaling factors *\/$/;"	m	struct:_p_PEP
 sfactor	include/slepc/private/rgimpl.h	/^  PetscReal   sfactor;       \/* scaling factor *\/$/;"	m	struct:_p_RG
-sfactor	src/pep/impls/linear/linearp.h	/^  PetscReal  sfactor,dsfactor; \/* scaling factors *\/$/;"	m	struct:__anon88
+sfactor	src/pep/impls/linear/linearp.h	/^  PetscReal  sfactor,dsfactor; \/* scaling factors *\/$/;"	m	struct:__anon106
 sfactor_set	include/slepc/private/pepimpl.h	/^  PetscBool      sfactor_set;      \/* flag to indicate the user gave sfactor *\/$/;"	m	struct:_p_PEP
 shift_matrix	include/slepc/private/stimpl.h	/^  STMatMode        shift_matrix;$/;"	m	struct:_p_ST
-shift_type	src/eps/impls/power/power.c	/^  EPSPowerShiftType shift_type;$/;"	m	struct:__anon71	file:
-shifts	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     *shifts;            \/* array containing global shifts *\/$/;"	m	struct:__anon69
-sigma	include/slepc/private/stimpl.h	/^  PetscScalar      sigma;            \/* Value of the shift *\/$/;"	m	struct:_p_ST
-sigma	include/slepc/private/svdimpl.h	/^  PetscReal        *sigma;      \/* singular values *\/$/;"	m	struct:_p_SVD
-sigma	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon44	file:
-sigma	src/eps/impls/ciss/ciss.c	/^  PetscReal    *sigma;     \/* threshold for numerical rank *\/$/;"	m	struct:__anon47	file:
-sigma	src/nep/impls/ciss/nciss.c	/^  PetscReal    *sigma;     \/* threshold for numerical rank *\/$/;"	m	struct:__anon77	file:
+shift_type	src/eps/impls/power/power.c	/^  EPSPowerShiftType shift_type;$/;"	m	struct:__anon83	file:
+shifts	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal        *shifts;            \/* array containing global shifts *\/$/;"	m	struct:__anon81
+shifts	src/nep/impls/nleigs/nleigs.c	/^  PetscScalar    *shifts;   \/* user-provided shifts for the Rational Krylov variant *\/$/;"	m	struct:__anon92	file:
+sigma	include/slepc/private/stimpl.h	/^  PetscScalar      sigma;            \/* value of the shift *\/$/;"	m	struct:_p_ST
+sigma	include/slepc/private/svdimpl.h	/^  PetscReal      *sigma;           \/* singular values *\/$/;"	m	struct:_p_SVD
+sigma	src/eps/examples/tutorials/ex30.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon56	file:
+sigma	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon58	file:
+sigma	src/eps/impls/ciss/ciss.c	/^  PetscReal         *sigma;     \/* threshold for numerical rank *\/$/;"	m	struct:__anon61	file:
+sigma	src/nep/impls/ciss/nciss.c	/^  PetscReal    *sigma;     \/* threshold for numerical rank *\/$/;"	m	struct:__anon89	file:
 sigma_set	include/slepc/private/stimpl.h	/^  PetscBool        sigma_set;        \/* whether the user provided the shift or not *\/$/;"	m	struct:_p_ST
+singularitiesctx	src/nep/impls/nleigs/nleigs.c	/^  void           *singularitiesctx;$/;"	m	struct:__anon92	file:
 sits	include/slepc/private/pepimpl.h	/^  PetscInt       sits;             \/* number of iterations of the scaling method *\/$/;"	m	struct:_p_PEP
 size_D	src/eps/impls/davidson/davidson.h	/^  PetscInt size_D;            \/* active vectors *\/$/;"	m	struct:_dvdDashboard
 size_MT	src/eps/impls/davidson/davidson.h	/^  PetscInt  size_MT;           \/* rows in MT *\/$/;"	m	struct:_dvdDashboard
-size_V	src/eps/impls/davidson/davidson.h	/^  PetscInt size_V;             \/* real size of V (nev+size_P+mpd) *\/$/;"	m	struct:__anon53
-size_X	src/eps/impls/davidson/dvdgd2.c	/^  PetscInt size_X;$/;"	m	struct:__anon54	file:
-size_X	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     size_X;$/;"	m	struct:__anon55	file:
-size_cX	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     size_cX;            \/* last value of d->size_cX *\/$/;"	m	struct:__anon55	file:
-size_iXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     size_iXKZ;          \/* size of iXKZ *\/$/;"	m	struct:__anon55	file:
-size_oldU	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          size_oldU;         \/* size of oldU *\/$/;"	m	struct:__anon57	file:
+size_V	src/eps/impls/davidson/davidson.h	/^  PetscInt size_V;             \/* real size of V (nev+size_P+mpd) *\/$/;"	m	struct:__anon66
+size_X	src/eps/impls/davidson/dvdgd2.c	/^  PetscInt size_X;$/;"	m	struct:__anon67	file:
+size_X	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     size_X;$/;"	m	struct:__anon68	file:
+size_cX	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     size_cX;            \/* last value of d->size_cX *\/$/;"	m	struct:__anon68	file:
+size_iXKZ	src/eps/impls/davidson/dvdimprovex.c	/^  PetscInt     size_iXKZ;          \/* size of iXKZ *\/$/;"	m	struct:__anon68	file:
+size_oldU	src/eps/impls/davidson/dvdupdatev.c	/^  PetscInt          size_oldU;         \/* size of oldU *\/$/;"	m	struct:__anon70	file:
 slambda	include/slepc/private/pepimpl.h	/^  PetscReal      slambda;          \/* norm eigenvalue approximation for scaling *\/$/;"	m	struct:_p_PEP
 slepc	config/configure.py	/^slepc   = slepc.SLEPc(argdb,log)$/;"	v
+slepc_blopex_useconstr	src/eps/impls/external/blopex/blopex.c	/^PetscInt slepc_blopex_useconstr = -1;$/;"	v
+slepc_blopex_useconstr	src/eps/impls/external/blopex/slepc-interface.h	/^PETSC_INTERN PetscInt slepc_blopex_useconstr;$/;"	v
 slepcbv	src/sys/f90-mod/slepcsysmod.F	/^        module slepcbv$/;"	m
 slepcbvdef	src/sys/f90-mod/slepcsysmod.F	/^        module slepcbvdef$/;"	m
 slepcconf	config/configure.py	/^slepcconf  = CreateFile(includedir,'slepcconf.h',log)$/;"	v
+slepcconvmonitorcreate_	src/sys/ftn-custom/zslepcutil.c	/^PETSC_EXTERN void PETSC_STDCALL slepcconvmonitorcreate_(PetscViewer *vin,PetscViewerFormat *format,SlepcConvMonitor *ctx,PetscErrorCode *ierr)$/;"	f
+slepcconvmonitorcreate_	src/sys/ftn-custom/zslepcutil.c	26;"	d	file:
+slepcconvmonitorcreate_	src/sys/ftn-custom/zslepcutil.c	29;"	d	file:
+slepcconvmonitordestroy_	src/sys/ftn-custom/zslepcutil.c	/^PETSC_EXTERN void slepcconvmonitordestroy_(SlepcConvMonitor *ctx,PetscErrorCode *ierr)$/;"	f
+slepcconvmonitordestroy_	src/sys/ftn-custom/zslepcutil.c	27;"	d	file:
+slepcconvmonitordestroy_	src/sys/ftn-custom/zslepcutil.c	30;"	d	file:
 slepcdate	config/configure.py	/^      slepcdate = dateutil.parser.parse(slepc.gitdate)$/;"	v
 slepcds	src/sys/f90-mod/slepcsysmod.F	/^        module slepcds$/;"	m
 slepcdsdef	src/sys/f90-mod/slepcsysmod.F	/^        module slepcdsdef$/;"	m
@@ -9816,7 +10828,7 @@ slepcsvddef	src/svd/f90-mod/slepcsvdmod.F	/^        module slepcsvddef$/;"	m
 slepcsys	src/sys/f90-mod/slepcsysmod.F	/^        module slepcsys$/;"	m
 slepcsysdef	src/sys/f90-mod/slepcsysmod.F	/^        module slepcsysdef$/;"	m
 slepcvars	config/configure.py	/^slepcvars  = CreateFile(confdir,'slepcvariables',log)$/;"	v
-slice	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         slice;           \/* use spectrum slicing *\/$/;"	m	struct:__anon64
+slice	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscBLASInt         slice;           \/* use spectrum slicing *\/$/;"	m	struct:__anon76
 sn	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscReal   sn;$/;"	m	struct:HRtr	file:
 solve	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*solve[DS_MAX_SOLVE])(DS,PetscScalar*,PetscScalar*);$/;"	m	struct:_DSOps
 solve	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*solve)(EPS);$/;"	m	struct:_EPSOps
@@ -9828,36 +10840,57 @@ solvematcoeffs	include/slepc/private/pepimpl.h	/^  PetscScalar    *solvematcoeff
 sort	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*sort)(DS,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*);$/;"	m	struct:_DSOps
 sortRealEigenvalues	src/eps/impls/krylov/krylovschur/ks-slice.c	/^static PetscErrorCode sortRealEigenvalues(PetscScalar *r,PetscInt *perm,PetscInt nr,PetscBool prev,PetscInt dir)$/;"	f	file:
 sowing	config/configure.py	/^sowing  = sowing.Sowing(argdb,log)$/;"	v
-split	include/slepc/private/nepimpl.h	/^  PetscBool      split;            \/* the nonlinear operator has been set in$/;"	m	struct:_p_NEP
-spurious_threshold	src/eps/impls/ciss/ciss.c	/^  PetscReal   spurious_threshold; \/* discard spurious eigenpairs *\/$/;"	m	struct:__anon47	file:
-spurious_threshold	src/nep/impls/ciss/nciss.c	/^  PetscReal    spurious_threshold; \/* discard spurious eigenpairs *\/$/;"	m	struct:__anon77	file:
-sr	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS_SR        sr;                 \/* spectrum slicing context *\/$/;"	m	struct:__anon69
+spurious_threshold	src/eps/impls/ciss/ciss.c	/^  PetscReal         spurious_threshold; \/* discard spurious eigenpairs *\/$/;"	m	struct:__anon61	file:
+spurious_threshold	src/nep/impls/ciss/nciss.c	/^  PetscReal    spurious_threshold; \/* discard spurious eigenpairs *\/$/;"	m	struct:__anon89	file:
+sr	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  EPS_SR           sr;                 \/* spectrum slicing context *\/$/;"	m	struct:__anon81
 st	include/slepc/private/bvimpl.h	/^  PetscObjectState   st[2];        \/* state of obtained vectors *\/$/;"	m	struct:_p_BV
 st	include/slepc/private/epsimpl.h	/^  ST             st;               \/* spectral transformation object *\/$/;"	m	struct:_p_EPS
 st	include/slepc/private/pepimpl.h	/^  ST             st;               \/* spectral transformation object *\/$/;"	m	struct:_p_PEP
-st	src/eps/impls/external/blopex/blopex.c	/^  ST                         st;$/;"	m	struct:__anon63	file:
-st	src/sys/classes/st/interface/stshellmat.c	/^  ST          st;$/;"	m	struct:__anon113	file:
-stages	src/eps/impls/davidson/dvdutils.c	/^static PetscLogStage stages[6] = {0,0,0,0,0,0};$/;"	v	file:
+st	src/eps/impls/external/blopex/blopex.c	/^  ST                         st;$/;"	m	struct:__anon75	file:
+st	src/sys/classes/st/interface/stshellmat.c	/^  ST          st;$/;"	m	struct:__anon132	file:
 stappendoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	/^PETSC_EXTERN void PETSC_STDCALL stappendoptionsprefix_(ST *st,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 stappendoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	29;"	d	file:
 stappendoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	36;"	d	file:
 startList	src/eps/impls/davidson/davidson.h	/^  dvdFunctionList *startList;  \/* starting list *\/$/;"	m	struct:_dvdDashboard
-start_ang	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   start_ang;  \/* start angle *\/$/;"	m	struct:__anon108	file:
+start_ang	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   start_ang;  \/* start angle *\/$/;"	m	struct:__anon127	file:
 startsWithPrefix	bin/maint/generateetags.py	/^def startsWithPrefix(file,prefixes):$/;"	f
 state	include/slepc/private/dsimpl.h	/^  DSStateType    state;              \/* the current state *\/$/;"	m	struct:_p_DS
 state	include/slepc/private/epsimpl.h	/^  EPSStateType   state;            \/* initial -> setup -> solved -> eigenvectors *\/$/;"	m	struct:_p_EPS
 state	include/slepc/private/nepimpl.h	/^  NEPStateType   state;            \/* initial -> setup -> solved -> eigenvectors *\/$/;"	m	struct:_p_NEP
 state	include/slepc/private/pepimpl.h	/^  PEPStateType   state;            \/* initial -> setup -> solved -> eigenvectors *\/$/;"	m	struct:_p_PEP
-state	include/slepc/private/svdimpl.h	/^  SVDStateType     state;       \/* initial -> setup -> solved -> vectors *\/$/;"	m	struct:_p_SVD
-state	src/eps/impls/davidson/davidson.h	/^  PetscInt state;              \/* method states:$/;"	m	struct:__anon53
+state	include/slepc/private/stimpl.h	/^  STStateType      state;            \/* initial -> setup -> with updated matrices *\/$/;"	m	struct:_p_ST
+state	include/slepc/private/svdimpl.h	/^  SVDStateType   state;            \/* initial -> setup -> solved -> vectors *\/$/;"	m	struct:_p_SVD
+state	src/eps/impls/davidson/davidson.h	/^  PetscInt state;              \/* method states:$/;"	m	struct:__anon66
 stgetoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	/^PETSC_EXTERN void PETSC_STDCALL stgetoptionsprefix_(ST *st,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 stgetoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	30;"	d	file:
 stgetoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	37;"	d	file:
 stgettype_	src/sys/classes/st/interface/ftn-custom/zstf.c	/^PETSC_EXTERN void PETSC_STDCALL stgettype_(ST *st,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 stgettype_	src/sys/classes/st/interface/ftn-custom/zstf.c	27;"	d	file:
 stgettype_	src/sys/classes/st/interface/ftn-custom/zstf.c	34;"	d	file:
-stol	include/slepc/private/nepimpl.h	/^  PetscReal      abstol,rtol,stol; \/* user tolerances *\/$/;"	m	struct:_p_NEP
-stol	src/pep/impls/jd/pjdp.h	/^  PetscReal   stol;          \/* tolerance for harmonic shift *\/$/;"	m	struct:__anon82
+stop	include/slepc/private/epsimpl.h	/^  EPSStop        stop;             \/* stopping test *\/$/;"	m	struct:_p_EPS
+stop	include/slepc/private/nepimpl.h	/^  NEPStop        stop;             \/* stopping test *\/$/;"	m	struct:_p_NEP
+stop	include/slepc/private/pepimpl.h	/^  PEPStop        stop;             \/* stopping test *\/$/;"	m	struct:_p_PEP
+stop	include/slepc/private/svdimpl.h	/^  SVDStop        stop;             \/* stopping test *\/$/;"	m	struct:_p_SVD
+stopdestroy	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId stopdestroy;$/;"	m	struct:__anon84	file:
+stopdestroy	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId stopdestroy;$/;"	m	struct:__anon96	file:
+stopdestroy	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId stopdestroy;$/;"	m	struct:__anon107	file:
+stopdestroy	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId stopdestroy;$/;"	m	struct:__anon114	file:
+stopping	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*stopping)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);$/;"	m	struct:_p_EPS
+stopping	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*stopping)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*);$/;"	m	struct:_p_NEP
+stopping	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*stopping)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*);$/;"	m	struct:_p_PEP
+stopping	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*stopping)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*);$/;"	m	struct:_p_SVD
+stopping	src/eps/interface/ftn-custom/zepsf.c	/^  PetscFortranCallbackId stopping;$/;"	m	struct:__anon84	file:
+stopping	src/nep/interface/ftn-custom/znepf.c	/^  PetscFortranCallbackId stopping;$/;"	m	struct:__anon96	file:
+stopping	src/pep/interface/ftn-custom/zpepf.c	/^  PetscFortranCallbackId stopping;$/;"	m	struct:__anon107	file:
+stopping	src/svd/interface/ftn-custom/zsvdf.c	/^  PetscFortranCallbackId stopping;$/;"	m	struct:__anon114	file:
+stoppingctx	include/slepc/private/epsimpl.h	/^  void           *stoppingctx;$/;"	m	struct:_p_EPS
+stoppingctx	include/slepc/private/nepimpl.h	/^  void           *stoppingctx;$/;"	m	struct:_p_NEP
+stoppingctx	include/slepc/private/pepimpl.h	/^  void           *stoppingctx;$/;"	m	struct:_p_PEP
+stoppingctx	include/slepc/private/svdimpl.h	/^  void           *stoppingctx;$/;"	m	struct:_p_SVD
+stoppingdestroy	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*stoppingdestroy)(void*);$/;"	m	struct:_p_EPS
+stoppingdestroy	include/slepc/private/nepimpl.h	/^  PetscErrorCode (*stoppingdestroy)(void*);$/;"	m	struct:_p_NEP
+stoppingdestroy	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*stoppingdestroy)(void*);$/;"	m	struct:_p_PEP
+stoppingdestroy	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*stoppingdestroy)(void*);$/;"	m	struct:_p_SVD
 str	include/slepc/private/stimpl.h	/^  MatStructure     str;              \/* whether matrices have the same pattern or not *\/$/;"	m	struct:_p_ST
 stripsplit	config/cmakegen.py	/^def stripsplit(line):$/;"	f
 stsetoptionsprefix_	src/sys/classes/st/interface/ftn-custom/zstf.c	/^PETSC_EXTERN void PETSC_STDCALL stsetoptionsprefix_(ST *st,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
@@ -9881,140 +10914,164 @@ stshellsetbacktransform_	src/sys/classes/st/impls/shell/ftn-custom/zshell.c	34;"
 stview_	src/sys/classes/st/interface/ftn-custom/zstf.c	/^PETSC_EXTERN void PETSC_STDCALL stview_(ST *st,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 stview_	src/sys/classes/st/interface/ftn-custom/zstf.c	31;"	d	file:
 stview_	src/sys/classes/st/interface/ftn-custom/zstf.c	38;"	d	file:
-subc	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscSubcomm  subc;               \/* context for subcommunicators *\/$/;"	m	struct:__anon69
-subc	src/nep/interface/neprefine.c	/^  PetscSubcomm  subc;$/;"	m	struct:__anon81	file:
-subc	src/pep/impls/krylov/toar/nrefine.c	/^  PetscSubcomm subc;$/;"	m	struct:__anon87	file:
-subcomm	src/eps/impls/ciss/ciss.c	/^  PetscSubcomm subcomm;$/;"	m	struct:__anon47	file:
-subcomm	src/nep/impls/ciss/nciss.c	/^  PetscSubcomm subcomm;$/;"	m	struct:__anon77	file:
-subcomm_id	src/eps/impls/ciss/ciss.c	/^  PetscInt     subcomm_id;$/;"	m	struct:__anon47	file:
-subcomm_id	src/nep/impls/ciss/nciss.c	/^  PetscInt     subcomm_id;$/;"	m	struct:__anon77	file:
-subintervals	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     *subintervals;      \/* partition of global interval *\/$/;"	m	struct:__anon69
-subintset	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool     subintset;          \/* subintervals set by user *\/$/;"	m	struct:__anon69
+subc	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscSubcomm     subc;               \/* context for subcommunicators *\/$/;"	m	struct:__anon81
+subc	src/nep/interface/neprefine.c	/^  PetscSubcomm  subc;$/;"	m	struct:__anon97	file:
+subc	src/pep/impls/krylov/toar/nrefine.c	/^  PetscSubcomm subc;$/;"	m	struct:__anon105	file:
+subcomm	src/eps/impls/ciss/ciss.c	/^  PetscSubcomm      subcomm;$/;"	m	struct:__anon61	file:
+subcomm	src/nep/impls/ciss/nciss.c	/^  PetscSubcomm subcomm;$/;"	m	struct:__anon89	file:
+subcomm_id	src/eps/impls/ciss/ciss.c	/^  PetscInt          subcomm_id;$/;"	m	struct:__anon61	file:
+subcomm_id	src/nep/impls/ciss/nciss.c	/^  PetscInt     subcomm_id;$/;"	m	struct:__anon89	file:
+subintervals	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal        *subintervals;      \/* partition of global interval *\/$/;"	m	struct:__anon81
+subintset	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscBool        subintset;          \/* subintervals set by user *\/$/;"	m	struct:__anon81
+submata	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  Mat              *submata,*submatb;  \/* seq matrices used in update of subcomm mats *\/$/;"	m	struct:__anon81
+submatb	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  Mat              *submata,*submatb;  \/* seq matrices used in update of subcomm mats *\/$/;"	m	struct:__anon81
 summary	config/cmakegen.py	/^    def summary(self):$/;"	m	class:Mistakes
 summary	config/gmakegen.py	/^    def summary(self):$/;"	m	class:Slepc
 svdappendoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdappendoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 svdappendoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	41;"	d	file:
-svdappendoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	58;"	d	file:
+svdappendoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	62;"	d	file:
+svdconvergedabsolute_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdconvergedabsolute_(SVD *svd,PetscReal *sigma,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+svdconvergedabsolute_	src/svd/interface/ftn-custom/zsvdf.c	43;"	d	file:
+svdconvergedabsolute_	src/svd/interface/ftn-custom/zsvdf.c	64;"	d	file:
+svdconvergedrelative_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdconvergedrelative_(SVD *svd,PetscReal *sigma,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)$/;"	f
+svdconvergedrelative_	src/svd/interface/ftn-custom/zsvdf.c	44;"	d	file:
+svdconvergedrelative_	src/svd/interface/ftn-custom/zsvdf.c	65;"	d	file:
 svderrorview_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svderrorview_(SVD *svd,SVDErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 svderrorview_	src/svd/interface/ftn-custom/zsvdf.c	33;"	d	file:
-svderrorview_	src/svd/interface/ftn-custom/zsvdf.c	50;"	d	file:
+svderrorview_	src/svd/interface/ftn-custom/zsvdf.c	54;"	d	file:
 svdgetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdgetoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 svdgetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	42;"	d	file:
-svdgetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	59;"	d	file:
+svdgetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	63;"	d	file:
 svdgettype_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdgettype_(SVD *svd,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 svdgettype_	src/svd/interface/ftn-custom/zsvdf.c	38;"	d	file:
-svdgettype_	src/svd/interface/ftn-custom/zsvdf.c	55;"	d	file:
-svdmonitorall_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+svdgettype_	src/svd/interface/ftn-custom/zsvdf.c	59;"	d	file:
+svdmonitorall_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 svdmonitorall_	src/svd/interface/ftn-custom/zsvdf.c	27;"	d	file:
-svdmonitorall_	src/svd/interface/ftn-custom/zsvdf.c	44;"	d	file:
-svdmonitorconverged_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorconverged_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+svdmonitorall_	src/svd/interface/ftn-custom/zsvdf.c	48;"	d	file:
+svdmonitorconverged_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorconverged_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)$/;"	f
 svdmonitorconverged_	src/svd/interface/ftn-custom/zsvdf.c	30;"	d	file:
-svdmonitorconverged_	src/svd/interface/ftn-custom/zsvdf.c	47;"	d	file:
-svdmonitorfirst_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorfirst_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
+svdmonitorconverged_	src/svd/interface/ftn-custom/zsvdf.c	51;"	d	file:
+svdmonitorfirst_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorfirst_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)$/;"	f
 svdmonitorfirst_	src/svd/interface/ftn-custom/zsvdf.c	31;"	d	file:
-svdmonitorfirst_	src/svd/interface/ftn-custom/zsvdf.c	48;"	d	file:
+svdmonitorfirst_	src/svd/interface/ftn-custom/zsvdf.c	52;"	d	file:
 svdmonitorlg_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorlg_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
 svdmonitorlg_	src/svd/interface/ftn-custom/zsvdf.c	28;"	d	file:
-svdmonitorlg_	src/svd/interface/ftn-custom/zsvdf.c	45;"	d	file:
+svdmonitorlg_	src/svd/interface/ftn-custom/zsvdf.c	49;"	d	file:
 svdmonitorlgall_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void svdmonitorlgall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)$/;"	f
 svdmonitorlgall_	src/svd/interface/ftn-custom/zsvdf.c	29;"	d	file:
-svdmonitorlgall_	src/svd/interface/ftn-custom/zsvdf.c	46;"	d	file:
+svdmonitorlgall_	src/svd/interface/ftn-custom/zsvdf.c	50;"	d	file:
 svdmonitorset_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdmonitorset_(SVD *svd,void (PETSC_STDCALL *monitor)(SVD*,PetscInt*,PetscInt*,PetscReal*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
 svdmonitorset_	src/svd/interface/ftn-custom/zsvdf.c	39;"	d	file:
-svdmonitorset_	src/svd/interface/ftn-custom/zsvdf.c	56;"	d	file:
+svdmonitorset_	src/svd/interface/ftn-custom/zsvdf.c	60;"	d	file:
 svdreasonview_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdreasonview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 svdreasonview_	src/svd/interface/ftn-custom/zsvdf.c	34;"	d	file:
-svdreasonview_	src/svd/interface/ftn-custom/zsvdf.c	51;"	d	file:
+svdreasonview_	src/svd/interface/ftn-custom/zsvdf.c	55;"	d	file:
+svdsetconvergencetestfunction_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdsetconvergencetestfunction_(SVD *svd,void (PETSC_STDCALL *func)(SVD*,PetscReal*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+svdsetconvergencetestfunction_	src/svd/interface/ftn-custom/zsvdf.c	45;"	d	file:
+svdsetconvergencetestfunction_	src/svd/interface/ftn-custom/zsvdf.c	66;"	d	file:
 svdsetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdsetoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 svdsetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	40;"	d	file:
-svdsetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	57;"	d	file:
+svdsetoptionsprefix_	src/svd/interface/ftn-custom/zsvdf.c	61;"	d	file:
+svdsetstoppingtestfunction_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdsetstoppingtestfunction_(SVD *svd,void (PETSC_STDCALL *func)(SVD*,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)$/;"	f
+svdsetstoppingtestfunction_	src/svd/interface/ftn-custom/zsvdf.c	46;"	d	file:
+svdsetstoppingtestfunction_	src/svd/interface/ftn-custom/zsvdf.c	67;"	d	file:
 svdsettype_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdsettype_(SVD *svd,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))$/;"	f
 svdsettype_	src/svd/interface/ftn-custom/zsvdf.c	37;"	d	file:
-svdsettype_	src/svd/interface/ftn-custom/zsvdf.c	54;"	d	file:
+svdsettype_	src/svd/interface/ftn-custom/zsvdf.c	58;"	d	file:
+svdstoppingbasic_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdstoppingbasic_(SVD *svd,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nsv,SVDConvergedReason *reason,void *ctx,PetscErrorCode *ierr)$/;"	f
 svdvaluesview_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdvaluesview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 svdvaluesview_	src/svd/interface/ftn-custom/zsvdf.c	35;"	d	file:
-svdvaluesview_	src/svd/interface/ftn-custom/zsvdf.c	52;"	d	file:
+svdvaluesview_	src/svd/interface/ftn-custom/zsvdf.c	56;"	d	file:
 svdvectorsview_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdvectorsview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 svdvectorsview_	src/svd/interface/ftn-custom/zsvdf.c	36;"	d	file:
-svdvectorsview_	src/svd/interface/ftn-custom/zsvdf.c	53;"	d	file:
+svdvectorsview_	src/svd/interface/ftn-custom/zsvdf.c	57;"	d	file:
 svdview_	src/svd/interface/ftn-custom/zsvdf.c	/^PETSC_EXTERN void PETSC_STDCALL svdview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)$/;"	f
 svdview_	src/svd/interface/ftn-custom/zsvdf.c	32;"	d	file:
-svdview_	src/svd/interface/ftn-custom/zsvdf.c	49;"	d	file:
+svdview_	src/svd/interface/ftn-custom/zsvdf.c	53;"	d	file:
 t	include/slepc/private/bvimpl.h	/^  Vec                t;            \/* template vector *\/$/;"	m	struct:_p_BV
 t	include/slepc/private/dsimpl.h	/^  PetscInt       t;                  \/* length of decomposition when it was truncated *\/$/;"	m	struct:_p_DS
-t	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon87	file:
-t1	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon87	file:
-tN	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon87	file:
+t	src/nep/impls/nleigs/nleigs.c	/^  Vec         t;$/;"	m	struct:__anon93	file:
+t	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon105	file:
+t	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t;$/;"	m	struct:__anon104	file:
+t1	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon105	file:
+tN	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon105	file:
 tarball	setup.py	/^def tarball():$/;"	f
 target	include/slepc/private/epsimpl.h	/^  PetscScalar    target;           \/* target value *\/$/;"	m	struct:_p_EPS
 target	include/slepc/private/nepimpl.h	/^  PetscScalar    target;           \/* target value *\/$/;"	m	struct:_p_NEP
 target	include/slepc/private/pepimpl.h	/^  PetscScalar    target;           \/* target value *\/$/;"	m	struct:_p_PEP
-target	src/eps/examples/tutorials/ex24.c	/^  PetscReal target;$/;"	m	struct:__anon43	file:
+target	src/eps/examples/tutorials/ex24.c	/^  PetscReal target;$/;"	m	struct:__anon55	file:
 target	src/eps/impls/davidson/davidson.h	/^  PetscScalar target[2];      \/* target value *\/$/;"	m	struct:_dvdDashboard
-target	src/eps/impls/external/primme/primme.c	/^  PetscReal target;               \/* a copy of eps's target *\/$/;"	m	struct:__anon66	file:
+target	src/eps/impls/external/primme/primme.c	/^  PetscReal target;               \/* a copy of eps's target *\/$/;"	m	struct:__anon78	file:
 tau	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscScalar tau[2];$/;"	m	struct:HRtr	file:
-tau1	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon44	file:
-tau2	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon44	file:
-testConv	src/eps/impls/davidson/davidson.h	/^  PetscBool (*testConv)(struct _dvdDashboard*,PetscScalar eigvr,PetscScalar eigvi,PetscReal res,PetscReal *error);$/;"	m	struct:_dvdDashboard
+tau1	src/eps/examples/tutorials/ex30.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon56	file:
+tau1	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon58	file:
+tau2	src/eps/examples/tutorials/ex30.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon56	file:
+tau2	src/eps/examples/tutorials/ex9.c	/^  PetscScalar alpha,beta,tau1,tau2,sigma;$/;"	m	struct:__anon58	file:
+testConv	src/eps/impls/davidson/davidson.h	/^  PetscBool (*testConv)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscReal,PetscReal*);$/;"	m	struct:_dvdDashboard
 testConv_data	src/eps/impls/davidson/davidson.h	/^  void *testConv_data;$/;"	m	struct:_dvdDashboard
+testruns	config/configure.py	/^    testruns = testruns.union(set(['DATAFILESPATH']))$/;"	v
+testruns	config/configure.py	/^    testruns = testruns.union(set(['DATAFILESPATH_Complex']))$/;"	v
 testruns	config/configure.py	/^  testruns = testruns.union(set(['C_NoF128']))$/;"	v
-testruns	config/configure.py	/^  testruns = testruns.union(set(['DATAFILESPATH']))$/;"	v
 testruns	config/configure.py	/^testruns = set(petsc.test_runs.split())$/;"	v
 testruns	config/configure.py	/^testruns = testruns.intersection(set(['C','F90','Fortran','C_Complex','Fortran_Complex','C_NoComplex','Fortran_NoComplex']))$/;"	v
-tg	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon87	file:
-theta	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  theta[4],thetai[2]; \/* the shifts used in the correction eq. *\/$/;"	m	struct:__anon55	file:
-thetai	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  theta[4],thetai[2]; \/* the shifts used in the correction eq. *\/$/;"	m	struct:__anon55	file:
+tg	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon105	file:
+theta	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  theta[4],thetai[2]; \/* the shifts used in the correction eq. *\/$/;"	m	struct:__anon68	file:
+theta	src/pep/impls/jd/pjdp.h	/^  PetscScalar theta;$/;"	m	struct:__anon101
+thetai	src/eps/impls/davidson/dvdimprovex.c	/^  PetscScalar  theta[4],thetai[2]; \/* the shifts used in the correction eq. *\/$/;"	m	struct:__anon68	file:
 tol	include/slepc/private/epsimpl.h	/^  PetscReal      tol;              \/* tolerance *\/$/;"	m	struct:_p_EPS
 tol	include/slepc/private/mfnimpl.h	/^  PetscReal      tol;            \/* tolerance *\/$/;"	m	struct:_p_MFN
+tol	include/slepc/private/nepimpl.h	/^  PetscReal      tol;              \/* tolerance *\/$/;"	m	struct:_p_NEP
 tol	include/slepc/private/pepimpl.h	/^  PetscReal      tol;              \/* tolerance *\/$/;"	m	struct:_p_PEP
-tol	include/slepc/private/svdimpl.h	/^  PetscReal        tol;         \/* tolerance *\/$/;"	m	struct:_p_SVD
+tol	include/slepc/private/svdimpl.h	/^  PetscReal      tol;              \/* tolerance *\/$/;"	m	struct:_p_SVD
 tol	src/eps/impls/davidson/davidson.h	/^  PetscReal   tol;            \/* tolerance *\/$/;"	m	struct:_dvdDashboard
-tol	src/eps/impls/davidson/dvdimprovex.c	/^  PetscReal    tol;                \/* the maximum solution tolerance *\/$/;"	m	struct:__anon55	file:
-tol	src/eps/impls/external/blopex/blopex.c	/^  lobpcg_Tolerance           tol;$/;"	m	struct:__anon63	file:
-tp	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon87	file:
-tpg	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon87	file:
+tol	src/eps/impls/davidson/dvdimprovex.c	/^  PetscReal    tol;                \/* the maximum solution tolerance *\/$/;"	m	struct:__anon68	file:
+tol	src/eps/impls/external/blopex/blopex.c	/^  lobpcg_Tolerance           tol;$/;"	m	struct:__anon75	file:
+tp	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon105	file:
+tpg	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          t,tg,Rv,Vi,tp,tpg;$/;"	m	struct:__anon105	file:
 trackall	include/slepc/private/epsimpl.h	/^  PetscBool      trackall;         \/* whether all the residuals must be computed *\/$/;"	m	struct:_p_EPS
 trackall	include/slepc/private/nepimpl.h	/^  PetscBool      trackall;         \/* whether all the residuals must be computed *\/$/;"	m	struct:_p_NEP
 trackall	include/slepc/private/pepimpl.h	/^  PetscBool      trackall;         \/* whether all the residuals must be computed *\/$/;"	m	struct:_p_PEP
-trackall	include/slepc/private/svdimpl.h	/^  PetscBool        trackall;    \/* whether all the residuals must be computed *\/$/;"	m	struct:_p_SVD
+trackall	include/slepc/private/svdimpl.h	/^  PetscBool      trackall;         \/* whether all the residuals must be computed *\/$/;"	m	struct:_p_SVD
 transform	include/slepc/private/stimpl.h	/^  PetscBool        transform;        \/* whether transformed matrices are computed *\/$/;"	m	struct:_p_ST
 transharm	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*transharm)(DS,PetscScalar,PetscReal,PetscBool,PetscScalar*,PetscReal*);$/;"	m	struct:_DSOps
 transrks	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*transrks)(DS,PetscScalar);$/;"	m	struct:_DSOps
 trlan	config/configure.py	/^trlan   = trlan.Trlan(argdb,log)$/;"	v
 trueres	include/slepc/private/epsimpl.h	/^  PetscBool      trueres;          \/* whether the true residual norm must be computed *\/$/;"	m	struct:_p_EPS
+trueres	src/nep/impls/nleigs/nleigs.c	/^  PetscBool      trueres;   \/* whether the true residual norm must be computed *\/$/;"	m	struct:__anon92	file:
 truncate	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*truncate)(DS,PetscInt);$/;"	m	struct:_DSOps
-ttN	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon87	file:
-ttol	include/slepc/private/nepimpl.h	/^  PetscReal      ttol;             \/* tolerance used in the convergence criterion *\/$/;"	m	struct:_p_NEP
+ttN	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon105	file:
 tv	src/eps/examples/tests/test8.c	/^static void tv(int nx,const PetscScalar *x,PetscScalar *y)$/;"	f	file:
 tv	src/eps/examples/tutorials/ex3.c	/^static void tv(int nx,const PetscScalar *x,PetscScalar *y)$/;"	f	file:
+tv	src/pep/examples/tutorials/ex28.c	/^static void tv(int nx,const PetscScalar *x,PetscScalar *y)$/;"	f	file:
 type	src/sys/classes/ds/impls/ghiep/invit.c	/^  PetscInt    type;$/;"	m	struct:HRtr	file:
-u	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscScalar          *u;$/;"	m	struct:__anon64
-u	src/pep/impls/jd/pjdp.h	/^  Vec         u;             \/* Ritz vector *\/$/;"	m	struct:__anon83
+u	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscScalar          *u;$/;"	m	struct:__anon76
+u	src/pep/impls/jd/pjdp.h	/^  Vec         u;             \/* Ritz vector *\/$/;"	m	struct:__anon100
 unexpected	config/cmakegen.py	/^  def unexpected():$/;"	f	function:cmakeconditional
 update	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*update)(DS);$/;"	m	struct:_DSOps
 updateV	src/eps/impls/davidson/davidson.h	/^  PetscErrorCode (*updateV)(struct _dvdDashboard*);$/;"	m	struct:_dvdDashboard
 updateV_data	src/eps/impls/davidson/davidson.h	/^  void *updateV_data;$/;"	m	struct:_dvdDashboard
 update_omega	src/eps/impls/krylov/lanczos/lanczos.c	/^static void update_omega(PetscReal *omega,PetscReal *omega_old,PetscInt j,PetscReal *alpha,PetscReal *beta,PetscReal eps1,PetscReal anorm)$/;"	f	file:
 url	setup.py	/^      url='http:\/\/slepc.upv.es\/',$/;"	v
-useconj	src/eps/impls/ciss/ciss.c	/^  PetscBool    useconj;$/;"	m	struct:__anon47	file:
-useconj	src/nep/impls/ciss/nciss.c	/^  PetscBool    useconj;$/;"	m	struct:__anon77	file:
+useconj	src/eps/impls/ciss/ciss.c	/^  PetscBool         useconj;$/;"	m	struct:__anon61	file:
+useconj	src/nep/impls/ciss/nciss.c	/^  PetscBool    useconj;$/;"	m	struct:__anon89	file:
 used	include/slepc/private/vecimplslepc.h	/^  PetscInt used;           \/* number of already used vectors *\/$/;"	m	struct:VecPool_
-user	src/eps/impls/davidson/dvdinitv.c	/^  PetscInt user;              \/* number of user initial vectors *\/$/;"	m	struct:__anon56	file:
-usest	src/eps/impls/ciss/ciss.c	/^  PetscBool    usest;$/;"	m	struct:__anon47	file:
-usest	src/nep/impls/ciss/nciss.c	/^  PetscBool    usest;$/;"	m	struct:__anon77	file:
+user	src/eps/impls/davidson/dvdinitv.c	/^  PetscInt user;              \/* number of user initial vectors *\/$/;"	m	struct:__anon69	file:
+usest	src/eps/impls/ciss/ciss.c	/^  PetscBool         usest;$/;"	m	struct:__anon61	file:
+usest	src/nep/impls/ciss/nciss.c	/^  PetscBool    usest;$/;"	m	struct:__anon89	file:
+usest_set	src/eps/impls/ciss/ciss.c	/^  PetscBool         usest_set;  \/* whether the user set the usest flag or not *\/$/;"	m	struct:__anon61	file:
 v	include/slepc/private/vecimplslepc.h	/^  Vec      v;              \/* template vector *\/$/;"	m	struct:VecPool_
-v	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscScalar          *v;$/;"	m	struct:__anon64
-v	src/nep/interface/neprefine.c	/^  Vec           vg,v;$/;"	m	struct:__anon81	file:
-v	src/pep/interface/peprefine.c	/^  Vec           vg,v;$/;"	m	struct:__anon90	file:
-v	src/sys/classes/bv/impls/svec/svec.c	/^  Vec       v;$/;"	m	struct:__anon98	file:
+v	src/eps/impls/external/blzpack/blzpackp.h	/^  PetscScalar          *v;$/;"	m	struct:__anon76
+v	src/nep/interface/neprefine.c	/^  Vec           nv,vg,v,w;$/;"	m	struct:__anon97	file:
+v	src/pep/interface/peprefine.c	/^  Vec        nv,vg,v,w;$/;"	m	struct:__anon108	file:
+v	src/sys/classes/bv/impls/svec/svec.c	/^  Vec       v;$/;"	m	struct:__anon117	file:
 value	src/eps/impls/krylov/krylovschur/krylovschur.h	/^  PetscReal     value;$/;"	m	struct:_n_shift
 vecs	include/slepc/private/vecimplslepc.h	/^  Vec      *vecs;          \/* pool of vectors *\/$/;"	m	struct:VecPool_
 vectors	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*vectors)(DS,DSMatType,PetscInt*,PetscReal*);$/;"	m	struct:_DSOps
 version	setup.py	/^      version=version(),$/;"	v
 version	setup.py	/^def version():$/;"	f
-vg	src/nep/interface/neprefine.c	/^  Vec           vg,v;$/;"	m	struct:__anon81	file:
-vg	src/pep/interface/peprefine.c	/^  Vec           vg,v;$/;"	m	struct:__anon90	file:
-vi	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^  PetscScalar *vr,*vi;   \/* array of vertices (vi not used in complex scalars) *\/$/;"	m	struct:__anon107	file:
+vg	src/nep/interface/neprefine.c	/^  Vec           nv,vg,v,w;$/;"	m	struct:__anon97	file:
+vg	src/pep/interface/peprefine.c	/^  Vec        nv,vg,v,w;$/;"	m	struct:__anon108	file:
+vi	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^  PetscScalar *vr,*vi;   \/* array of vertices (vi not used in complex scalars) *\/$/;"	m	struct:__anon126	file:
 view	include/slepc/private/bvimpl.h	/^  PetscErrorCode (*view)(BV,PetscViewer);$/;"	m	struct:_BVOps
 view	include/slepc/private/dsimpl.h	/^  PetscErrorCode (*view)(DS,PetscViewer);$/;"	m	struct:_DSOps
 view	include/slepc/private/epsimpl.h	/^  PetscErrorCode (*view)(EPS,PetscViewer);$/;"	m	struct:_EPSOps
@@ -10025,45 +11082,50 @@ view	include/slepc/private/pepimpl.h	/^  PetscErrorCode (*view)(PEP,PetscViewer)
 view	include/slepc/private/rgimpl.h	/^  PetscErrorCode (*view)(RG,PetscViewer);$/;"	m	struct:_RGOps
 view	include/slepc/private/stimpl.h	/^  PetscErrorCode (*view)(ST,PetscViewer);$/;"	m	struct:_STOps
 view	include/slepc/private/svdimpl.h	/^  PetscErrorCode (*view)(SVD,PetscViewer);$/;"	m	struct:_SVDOps
-viewer	include/slepc/private/slepcimpl.h	/^  PetscViewer viewer;$/;"	m	struct:_n_SlepcConvMonitor
-vmip	src/sys/classes/bv/impls/vecs/vecs.c	/^  PetscInt vmip;   \/* Version of BVMultInPlace:$/;"	m	struct:__anon99	file:
+viewer	include/slepc/private/slepcimpl.h	/^  PetscViewer       viewer;$/;"	m	struct:_n_SlepcConvMonitor
+vmip	src/sys/classes/bv/impls/vecs/vecs.c	/^  PetscInt vmip;   \/* Version of BVMultInPlace:$/;"	m	struct:__anon118	file:
 vmm	include/slepc/private/bvimpl.h	/^  BVMatMultType      vmm;          \/* version of matmult operation *\/$/;"	m	struct:_p_BV
-vr	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^  PetscScalar *vr,*vi;   \/* array of vertices (vi not used in complex scalars) *\/$/;"	m	struct:__anon107	file:
-vscale	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^  PetscReal   vscale;     \/* vertical scale of the ellipse *\/$/;"	m	struct:__anon105	file:
-vscale	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   vscale;     \/* vertical scale of the ellipse *\/$/;"	m	struct:__anon108	file:
-vseq	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon87	file:
+vr	src/sys/classes/rg/impls/polygon/rgpolygon.c	/^  PetscScalar *vr,*vi;   \/* array of vertices (vi not used in complex scalars) *\/$/;"	m	struct:__anon126	file:
+vrn	src/nep/impls/nleigs/nleigs.c	/^  Vec            vrn;       \/* random vector with normally distributed value *\/$/;"	m	struct:__anon92	file:
+vscale	src/sys/classes/rg/impls/ellipse/rgellipse.c	/^  PetscReal   vscale;     \/* vertical scale of the ellipse *\/$/;"	m	struct:__anon124	file:
+vscale	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   vscale;     \/* vertical scale of the ellipse *\/$/;"	m	struct:__anon127	file:
+vseq	src/pep/impls/krylov/toar/nrefine.c	/^  Vec          tN,ttN,t1,vseq;$/;"	m	struct:__anon105	file:
 w	include/slepc/private/stimpl.h	/^  Vec              w;$/;"	m	struct:_p_ST
-w	src/eps/examples/tutorials/ex24.c	/^  Vec       w;$/;"	m	struct:__anon43	file:
-w	src/eps/impls/external/blopex/blopex.c	/^  Vec                        w;$/;"	m	struct:__anon63	file:
-w	src/pep/impls/linear/linearp.h	/^  Vec        w[6];             \/* work vectors *\/$/;"	m	struct:__anon88
-w	src/svd/impls/cross/cross.c	/^  Vec       w,diag;$/;"	m	struct:__anon91	file:
-w1	src/pep/impls/krylov/toar/nrefine.c	/^  Vec           w1,w2;$/;"	m	struct:__anon86	file:
-w2	src/pep/impls/krylov/toar/nrefine.c	/^  Vec           w1,w2;$/;"	m	struct:__anon86	file:
-w2	src/sys/classes/st/impls/cayley/cayley.c	/^  Vec         w2;$/;"	m	struct:__anon109	file:
+w	src/eps/examples/tutorials/ex24.c	/^  Vec       w;$/;"	m	struct:__anon55	file:
+w	src/eps/impls/external/blopex/blopex.c	/^  Vec                        w;$/;"	m	struct:__anon75	file:
+w	src/nep/interface/neprefine.c	/^  Vec           nv,vg,v,w;$/;"	m	struct:__anon97	file:
+w	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *M4,*w,*wt,*d,*dt;$/;"	m	struct:__anon105	file:
+w	src/pep/impls/linear/linearp.h	/^  Vec        w[6];             \/* work vectors *\/$/;"	m	struct:__anon106
+w	src/pep/interface/peprefine.c	/^  Vec        nv,vg,v,w;$/;"	m	struct:__anon108	file:
+w	src/svd/impls/cross/cross.c	/^  Vec       w,diag;$/;"	m	struct:__anon110	file:
+w2	src/sys/classes/st/impls/cayley/cayley.c	/^  Vec         w2;$/;"	m	struct:__anon128	file:
+w_s	src/eps/examples/tutorials/ex31.c	78;"	d	file:
 wb	include/slepc/private/stimpl.h	/^  Vec              wb;               \/* balancing requires an extra work vector *\/$/;"	m	struct:_p_ST
-weight	src/eps/impls/ciss/ciss.c	/^  PetscScalar  *weight;$/;"	m	struct:__anon47	file:
-weight	src/nep/impls/ciss/nciss.c	/^  PetscScalar  *weight;$/;"	m	struct:__anon77	file:
+weight	src/eps/impls/ciss/ciss.c	/^  PetscScalar       *weight;$/;"	m	struct:__anon61	file:
+weight	src/nep/impls/ciss/nciss.c	/^  PetscScalar  *weight;$/;"	m	struct:__anon89	file:
 which	include/slepc/private/epsimpl.h	/^  EPSWhich       which;            \/* which part of the spectrum to be sought *\/$/;"	m	struct:_p_EPS
 which	include/slepc/private/nepimpl.h	/^  NEPWhich       which;            \/* which part of the spectrum to be sought *\/$/;"	m	struct:_p_NEP
 which	include/slepc/private/pepimpl.h	/^  PEPWhich       which;            \/* which part of the spectrum to be sought *\/$/;"	m	struct:_p_PEP
-which	include/slepc/private/svdimpl.h	/^  SVDWhich         which;       \/* which singular values are computed *\/$/;"	m	struct:_p_SVD
+which	include/slepc/private/svdimpl.h	/^  SVDWhich       which;            \/* which singular values are computed *\/$/;"	m	struct:_p_SVD
 which	src/eps/impls/davidson/davidson.h	/^  EPSWhich    which;          \/* spectrum selection *\/$/;"	m	struct:_dvdDashboard
-width	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   width;      \/* ring width *\/$/;"	m	struct:__anon108	file:
+width	src/sys/classes/rg/impls/ring/rgring.c	/^  PetscReal   width;      \/* ring width *\/$/;"	m	struct:__anon127	file:
 withTarget	src/eps/impls/davidson/davidson.h	/^  PetscBool   withTarget;     \/* if there is a target *\/$/;"	m	struct:_dvdDashboard
-withTarget	src/eps/impls/davidson/dvdutils.c	/^  PetscBool   withTarget;$/;"	m	struct:__anon59	file:
+withTarget	src/eps/impls/davidson/dvdutils.c	/^  PetscBool   withTarget;$/;"	m	struct:__anon72	file:
 work	include/slepc/private/bvimpl.h	/^  PetscScalar        *work;$/;"	m	struct:_p_BV
 work	include/slepc/private/dsimpl.h	/^  PetscScalar    *work;$/;"	m	struct:_p_DS
 work	include/slepc/private/epsimpl.h	/^  Vec            *work;            \/* work vectors *\/$/;"	m	struct:_p_EPS
 work	include/slepc/private/mfnimpl.h	/^  Vec            *work;          \/* work vectors *\/$/;"	m	struct:_p_MFN
 work	include/slepc/private/nepimpl.h	/^  Vec            *work;            \/* work vectors *\/$/;"	m	struct:_p_NEP
 work	include/slepc/private/pepimpl.h	/^  Vec            *work;            \/* work vectors *\/$/;"	m	struct:_p_PEP
-work	src/eps/impls/external/trlan/trlanp.h	/^  PetscReal          *work;$/;"	m	struct:__anon67
-work	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *work;$/;"	m	struct:__anon86	file:
-work1	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon65
-work2	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon65
-workd	src/eps/impls/external/arpack/arpackp.h	/^  PetscScalar  *workd;$/;"	m	struct:__anon62
-workev	src/eps/impls/external/arpack/arpackp.h	/^  PetscScalar  *workev;$/;"	m	struct:__anon62
-workl	src/eps/impls/external/arpack/arpackp.h	/^  PetscScalar  *workl;$/;"	m	struct:__anon62
+work	src/eps/impls/external/trlan/trlanp.h	/^  PetscReal          *work;$/;"	m	struct:__anon79
+work	src/pep/impls/jd/pjdp.h	/^  Vec         *work;$/;"	m	struct:__anon100
+work	src/pep/impls/jd/pjdp.h	/^  Vec         *work;$/;"	m	struct:__anon101
+work	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *fih,*work,*M4;$/;"	m	struct:__anon104	file:
+work1	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon77
+work2	src/eps/impls/external/feast/feastp.h	/^  PetscScalar  *work1,*work2,*Aq,*Bq;   \/* workspace *\/$/;"	m	struct:__anon77
+workd	src/eps/impls/external/arpack/arpackp.h	/^  PetscScalar  *workd;$/;"	m	struct:__anon74
+workev	src/eps/impls/external/arpack/arpackp.h	/^  PetscScalar  *workev;$/;"	m	struct:__anon74
+workl	src/eps/impls/external/arpack/arpackp.h	/^  PetscScalar  *workl;$/;"	m	struct:__anon74
 write	config/cmakeboot.py	/^  def write(self,str):$/;"	m	class:StdoutLogger
 write	config/cmakegen.py	/^  def write(self,str):$/;"	m	class:StdoutLogger
 write	config/gmakegen.py	/^        def write(stem, srcs):$/;"	f	function:Slepc.gen_gnumake
@@ -10072,19 +11134,25 @@ write	config/log.py	/^  def write(self,string):$/;"	m	class:Log
 writePackage	config/cmakegen.py	/^def writePackage(f,pkg,pkgdeps,mistakes):$/;"	f
 writeRoot	config/cmakegen.py	/^def writeRoot(f,petscdir,petscdestdir):$/;"	f
 written	config/cmakegen.py	/^    written = True$/;"	v
-x	include/slepc/private/vecimplslepc.h	/^  Vec           *x;       \/* the vectors *\/$/;"	m	struct:__anon6
-x	src/eps/impls/external/primme/primme.c	/^  Vec       x,y;                  \/* auxiliary vectors *\/$/;"	m	struct:__anon66	file:
-x1	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon44	file:
-x1	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon92	file:
-x2	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon44	file:
-x2	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon92	file:
-xdup	src/eps/impls/ciss/ciss.c	/^  Vec          xdup;$/;"	m	struct:__anon47	file:
+wt	src/pep/impls/krylov/toar/nrefine.c	/^  PetscScalar  *M4,*w,*wt,*d,*dt;$/;"	m	struct:__anon105	file:
+x	include/slepc/private/vecimplslepc.h	/^  Vec           *x;       \/* the vectors *\/$/;"	m	struct:__anon8
+x	src/eps/impls/external/primme/primme.c	/^  Vec       x,y;                  \/* auxiliary vectors *\/$/;"	m	struct:__anon78	file:
+x1	src/eps/examples/tutorials/ex30.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon56	file:
+x1	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon58	file:
+x1	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon111	file:
+x2	src/eps/examples/tutorials/ex30.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon56	file:
+x2	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon58	file:
+x2	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon111	file:
+xdup	src/eps/impls/ciss/ciss.c	/^  Vec               xdup;$/;"	m	struct:__anon61	file:
+xi	src/nep/impls/nleigs/nleigs.c	/^  PetscScalar    *s,*xi;    \/* Leja-Bagby points *\/$/;"	m	struct:__anon92	file:
 xid	include/slepc/private/bvimpl.h	/^  PetscObjectId      xid;          \/* object id of vector x *\/$/;"	m	struct:_p_BV
 xstate	include/slepc/private/bvimpl.h	/^  PetscObjectState   xstate;       \/* state of vector x *\/$/;"	m	struct:_p_BV
-xsub	src/eps/impls/ciss/ciss.c	/^  Vec          xsub;$/;"	m	struct:__anon47	file:
-y	src/eps/impls/external/primme/primme.c	/^  Vec       x,y;                  \/* auxiliary vectors *\/$/;"	m	struct:__anon66	file:
-y1	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon44	file:
-y1	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon92	file:
-y2	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon44	file:
-y2	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon92	file:
-z	src/sys/classes/st/interface/stshellmat.c	/^  Vec         z;$/;"	m	struct:__anon113	file:
+xsub	src/eps/impls/ciss/ciss.c	/^  Vec               xsub;$/;"	m	struct:__anon61	file:
+y	src/eps/impls/external/primme/primme.c	/^  Vec       x,y;                  \/* auxiliary vectors *\/$/;"	m	struct:__anon78	file:
+y1	src/eps/examples/tutorials/ex30.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon56	file:
+y1	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon58	file:
+y1	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon111	file:
+y2	src/eps/examples/tutorials/ex30.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon56	file:
+y2	src/eps/examples/tutorials/ex9.c	/^  Vec         x1,x2,y1,y2;$/;"	m	struct:__anon58	file:
+y2	src/svd/impls/cyclic/cyclic.c	/^  Vec       x1,x2,y1,y2;$/;"	m	struct:__anon111	file:
+z	src/sys/classes/st/interface/stshellmat.c	/^  Vec         z;$/;"	m	struct:__anon132	file:
diff --git a/README b/README
index 2827e31..98ade7c 100644
--- a/README
+++ b/README
@@ -75,7 +75,7 @@ The development of SLEPc has been partially supported by the following grants:
 Conditions of Use
 -----------------
 
-Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    SLEPc is free software: you can redistribute it and/or modify it under  the
    terms of version 3 of the GNU Lesser General Public License as published by
diff --git a/TAGS b/TAGS
index a567c4f..7988528 100644
--- a/TAGS
+++ b/TAGS
@@ -17,123 +17,124 @@ def FindSource(filename):FindSource36,1622
 def FixDir(petscdir,dir,verbose):FixDir50,2071
 def PrepFtnDir(dir):PrepFtnDir130,4922
 def processDir(arg,dirname,names):processDir144,5382
-def processf90interfaces(petscdir,verbose):processf90interfaces187,7192
-def main(petscdir,bfort,dir,verbose):main207,8319
+def processf90interfaces(petscdir,verbose):processf90interfaces187,7200
+def main(petscdir,bfort,dir,verbose):main207,8327
 

 config/argdb.py,343
 argdb.py:^?argdb.py^A,1
-class ArgDB:ArgDB24,938
-  def __init__(self,argv):__init__26,952
-  def PopString(self,keyword):PopString45,1720
-  def PopPath(self,keyword):PopPath61,2091
-  def PopUrl(self,keyword):PopUrl77,2472
-  def PopBool(self,keyword):PopBool96,2938
-  def PopHelp(self):PopHelp112,3304
-  def ErrorIfNotEmpty(self):ErrorIfNotEmpty128,3679
+class ArgDB:ArgDB24,942
+  def __init__(self,argv):__init__26,956
+  def PopString(self,keyword):PopString45,1724
+  def PopPath(self,keyword):PopPath61,2095
+  def PopUrl(self,keyword):PopUrl77,2496
+  def PopBool(self,keyword):PopBool96,2962
+  def PopHelp(self):PopHelp112,3328
+  def ErrorIfNotEmpty(self):ErrorIfNotEmpty128,3703
 

 config/cmakeboot.py,647
 cmakeboot.py:^?cmakeboot.py^A,1
-def noCheck(command, status, output, error):noCheck20,732
-def quoteIfNeeded(path):quoteIfNeeded23,787
-class StdoutLogger(object):StdoutLogger31,1050
-  def write(self,str):write32,1078
-class PETScMaker(script.Script):PETScMaker35,1117
- def __init__(self, slepcdir, petscdir, petscarch, argDB = None, framework = None):__init__36,1150
- def __str__(self):__str__47,1544
- def setupModules(self):setupModules50,1578
- def setup(self):setup69,2939
- def cmakeboot(self, args, log):cmakeboot75,3079
-def main(slepcdir, petscdir, petscarch=os.environ['PETSC_ARCH'], argDB=None, framework=None, log=StdoutLogger(), args=[]):main176,8202
+def noCheck(command, status, output, error):noCheck20,746
+def quoteIfNeeded(path):quoteIfNeeded23,801
+class StdoutLogger(object):StdoutLogger31,1064
+  def write(self,str):write32,1092
+class PETScMaker(script.Script):PETScMaker35,1131
+ def __init__(self, slepcdir, petscdir, petscarch, argDB = None, framework = None):__init__36,1164
+ def __str__(self):__str__47,1558
+ def setupModules(self):setupModules50,1592
+ def setup(self):setup69,2953
+ def cmakeboot(self, args, log):cmakeboot75,3093
+def main(slepcdir, petscdir, petscarch=os.environ['PETSC_ARCH'], argDB=None, framework=None, log=StdoutLogger(), args=[]):main176,8215
 

 config/cmakegen.py,1817
 cmakegen.py:^?cmakegen.py^A,1
-    class defaultdict(dict):defaultdict24,764
-        def __init__(self, default_factory=None, *a, **kw):__init__25,793
-        def __getitem__(self, key):__getitem__31,1120
-        def __missing__(self, key):__missing__36,1298
-        def __reduce__(self):__reduce__41,1495
-        def copy(self):copy47,1726
-        def __copy__(self):__copy__49,1785
-        def __deepcopy__(self, memo):__deepcopy__51,1871
-        def __repr__(self):__repr__55,2044
-class StdoutLogger(object):StdoutLogger59,2204
-  def write(self,str):write60,2232
-def cmakeconditional(key,val):cmakeconditional63,2271
-  def unexpected():unexpected64,2302
-AUTODIRS = set('ftn-auto ftn-custom f90-custom'.split()) # Automatically recurse into these, if they existAUTODIRS88,3067
-SKIPDIRS = set('benchmarks'.split())                     # Skip these during the buildSKIPDIRS89,3174
-NOWARNDIRS = set('tests tutorials'.split())              # Do not warn about mismatch in theseNOWARNDIRS90,3261
-def pathsplit(path):pathsplit92,3357
-class Mistakes(object):Mistakes101,3640
-    def __init__(self, log, verbose=False):__init__102,3664
-    def compareDirLists(self,root, mdirs, dirs):compareDirLists107,3790
-    def compareSourceLists(self, root, msources, files):compareSourceLists123,4579
-    def summary(self):summary139,5470
-def stripsplit(line):stripsplit145,6034
-def pkgsources(pkg, mistakes):pkgsources148,6114
-    def relpath(filename):relpath169,7159
-def writeRoot(f,petscdir,petscdestdir):writeRoot180,7717
-def writePackage(f,pkg,pkgdeps,mistakes):writePackage223,9378
-    def body(indentlevel):body226,9499
-def main(slepcdir,petscdir,petscdestdir,log=StdoutLogger(), verbose=False):main249,10483
-    written = Truewritten289,12183
-  parser = optparse.OptionParser()parser300,12414
-

-config/configure.py,3513
+    class defaultdict(dict):defaultdict24,771
+        def __init__(self, default_factory=None, *a, **kw):__init__25,800
+        def __getitem__(self, key):__getitem__31,1127
+        def __missing__(self, key):__missing__36,1305
+        def __reduce__(self):__reduce__41,1502
+        def copy(self):copy47,1733
+        def __copy__(self):__copy__49,1792
+        def __deepcopy__(self, memo):__deepcopy__51,1878
+        def __repr__(self):__repr__55,2051
+class StdoutLogger(object):StdoutLogger59,2211
+  def write(self,str):write60,2239
+def cmakeconditional(key,val):cmakeconditional63,2278
+  def unexpected():unexpected64,2309
+AUTODIRS = set('ftn-auto ftn-custom f90-custom'.split()) # Automatically recurse into these, if they existAUTODIRS88,3074
+SKIPDIRS = set('benchmarks'.split())                     # Skip these during the buildSKIPDIRS89,3181
+NOWARNDIRS = set('tests tutorials'.split())              # Do not warn about mismatch in theseNOWARNDIRS90,3268
+def pathsplit(path):pathsplit92,3364
+class Mistakes(object):Mistakes101,3647
+    def __init__(self, log, verbose=False):__init__102,3671
+    def compareDirLists(self,root, mdirs, dirs):compareDirLists107,3797
+    def compareSourceLists(self, root, msources, files):compareSourceLists123,4586
+    def summary(self):summary139,5477
+def stripsplit(line):stripsplit145,6041
+def pkgsources(pkg, mistakes):pkgsources148,6121
+    def relpath(filename):relpath169,7166
+def writeRoot(f,petscdir,petscdestdir):writeRoot180,7724
+def writePackage(f,pkg,pkgdeps,mistakes):writePackage223,9399
+    def body(indentlevel):body226,9520
+def main(slepcdir,petscdir,petscdestdir,log=StdoutLogger(), verbose=False):main249,10504
+    written = Truewritten289,12204
+  parser = optparse.OptionParser()parser300,12435
+

+config/configure.py,3616
 configure.py:^?configure.py^A,1
-def AddDefine(conffile,name,value):AddDefine25,978
-def CreateFile(basedir,fname,log):CreateFile28,1106
-def CreateDir(basedir,dirname,log):CreateDir37,1371
-def CreateDirTwo(basedir,dir1,dir2,log):CreateDirTwo47,1678
-def CreateDirTest(basedir,dirname,log):CreateDirTest63,2190
-def WriteModulesFile(modules,version,sdir):WriteModulesFile76,2577
-def WritePkgconfigFile(pkgconfig,version,pversion,sdir,isinstall,prefixdir):WritePkgconfigFile88,3227
-def WriteCMakeConfigFile(cmakeconf):WriteCMakeConfigFile99,3935
-configdir = os.path.abspath('config')configdir130,5737
-argdb = argdb.ArgDB(sys.argv)argdb138,6013
-log   = log.Log()log139,6043
-slepc   = slepc.SLEPc(argdb,log)slepc143,6206
-petsc   = petsc.PETSc(argdb,log)petsc144,6239
-arpack  = arpack.Arpack(argdb,log)arpack145,6272
-blopex  = blopex.Blopex(argdb,log)blopex146,6307
-blzpack = blzpack.Blzpack(argdb,log)blzpack147,6342
-feast   = feast.Feast(argdb,log)feast148,6379
-primme  = primme.Primme(argdb,log)primme149,6412
-trlan   = trlan.Trlan(argdb,log)trlan150,6447
-sowing  = sowing.Sowing(argdb,log)sowing151,6480
-lapack  = lapack.Lapack(argdb,log)lapack152,6515
-externalpackages = [arpack, blopex, blzpack, feast, primme, trlan]externalpackages154,6551
-optionspackages  = [slepc, arpack, blopex, blzpack, feast, primme, trlan, sowing]optionspackages155,6618
-checkpackages    = [arpack, blopex, blzpack, feast, primme, trlan, lapack]checkpackages156,6700
-emptyarch = not ('PETSC_ARCH' in os.environ and os.environ['PETSC_ARCH'])emptyarch184,7693
-  archname = petsc.archarchname188,7824
-libdir  = CreateDir(archdir,'lib',log)libdir192,7958
-confdir = CreateDirTwo(libdir,'slepc','conf',log)confdir193,7997
-      f = open(os.path.join(confdir,'slepcvariables'),'r')f217,8840
-      searchlines = f.readlines()searchlines218,8899
-includedir = CreateDir(archdir,'include',log)includedir241,9818
-modulesdir = CreateDirTwo(confdir,'modules','slepc',log)modulesdir242,9864
-pkgconfdir = CreateDir(libdir,'pkgconfig',log)pkgconfdir243,9921
-slepcvars  = CreateFile(confdir,'slepcvariables',log)slepcvars244,9968
-slepcrules = CreateFile(confdir,'slepcrules',log)slepcrules245,10022
-slepcconf  = CreateFile(includedir,'slepcconf.h',log)slepcconf246,10072
-cmakeconf  = CreateFile(confdir,'SLEPcConfig.cmake',log)cmakeconf247,10126
-pkgconfig  = CreateFile(pkgconfdir,'SLEPc.pc',log)pkgconfig248,10183
-  modules  = CreateFile(modulesdir,slepc.lversion,log)modules250,10254
-  modules  = CreateFile(modulesdir,slepc.lversion+'-'+archname,log)modules252,10315
-testruns = set(petsc.test_runs.split())testruns258,10542
-testruns = testruns.intersection(set(['C','F90','Fortran','C_Complex','Fortran_Complex','C_NoComplex','Fortran_NoComplex']))testruns259,10582
-  testruns = testruns.union(set(['C_NoF128']))testruns261,10743
-  testruns = testruns.union(set(['DATAFILESPATH']))testruns264,10865
-  globconf = CreateFile(os.path.join(slepc.dir,'lib','slepc','conf'),'slepcvariables',log)globconf278,11439
-bfort = petsc.bfortbfort329,13678
-  bfort = sowing.Install(archdir,petsc.make)bfort331,13725
-      bfort = os.path.join(archdir,'bin','bfort')bfort336,13853
-      bfort = sowing.Install(archdir,petsc.make)bfort338,13937
-cmakeok = Falsecmakeok352,14477
-      cmakeok = cmakeboot.main(slepc.dir,petsc.dir,log=log)cmakeok369,15090
-      petscdate = dateutil.parser.parse(petsc.gitdate)petscdate405,16491
-      slepcdate = dateutil.parser.parse(slepc.gitdate)slepcdate406,16546
+def AddDefine(conffile,name,value,prefix='SLEPC_'):AddDefine25,978
+def CreateFile(basedir,fname,log):CreateFile28,1124
+def CreateDir(basedir,dirname,log):CreateDir37,1389
+def CreateDirTwo(basedir,dir1,dir2,log):CreateDirTwo47,1696
+def CreateDirTest(basedir,dirname,log):CreateDirTest63,2208
+def WriteModulesFile(modules,version,sdir):WriteModulesFile76,2595
+def WritePkgconfigFile(pkgconfig,version,pversion,sdir,isinstall,prefixdir):WritePkgconfigFile88,3245
+def WriteCMakeConfigFile(cmakeconf):WriteCMakeConfigFile99,3953
+configdir = os.path.abspath('config')configdir128,5593
+argdb = argdb.ArgDB(sys.argv)argdb136,5869
+log   = log.Log()log137,5899
+slepc   = slepc.SLEPc(argdb,log)slepc141,6062
+petsc   = petsc.PETSc(argdb,log)petsc142,6095
+arpack  = arpack.Arpack(argdb,log)arpack143,6128
+blopex  = blopex.Blopex(argdb,log)blopex144,6163
+blzpack = blzpack.Blzpack(argdb,log)blzpack145,6198
+feast   = feast.Feast(argdb,log)feast146,6235
+primme  = primme.Primme(argdb,log)primme147,6268
+trlan   = trlan.Trlan(argdb,log)trlan148,6303
+sowing  = sowing.Sowing(argdb,log)sowing149,6336
+lapack  = lapack.Lapack(argdb,log)lapack150,6371
+externalpackages = [arpack, blopex, blzpack, feast, primme, trlan]externalpackages152,6407
+optionspackages  = [slepc, arpack, blopex, blzpack, feast, primme, trlan, sowing]optionspackages153,6474
+checkpackages    = [arpack, blopex, blzpack, feast, primme, trlan, lapack]checkpackages154,6556
+emptyarch = not ('PETSC_ARCH' in os.environ and os.environ['PETSC_ARCH'])emptyarch182,7549
+  archname = petsc.archarchname186,7680
+libdir  = CreateDir(archdir,'lib',log)libdir190,7814
+confdir = CreateDirTwo(libdir,'slepc','conf',log)confdir191,7853
+      f = open(os.path.join(confdir,'slepcvariables'),'r')f215,8696
+      searchlines = f.readlines()searchlines216,8755
+includedir = CreateDir(archdir,'include',log)includedir239,9674
+modulesdir = CreateDirTwo(confdir,'modules','slepc',log)modulesdir240,9720
+pkgconfdir = CreateDir(libdir,'pkgconfig',log)pkgconfdir241,9777
+slepcvars  = CreateFile(confdir,'slepcvariables',log)slepcvars242,9824
+slepcrules = CreateFile(confdir,'slepcrules',log)slepcrules243,9878
+slepcconf  = CreateFile(includedir,'slepcconf.h',log)slepcconf244,9928
+cmakeconf  = CreateFile(confdir,'SLEPcBuildInternal.cmake',log)cmakeconf245,9982
+pkgconfig  = CreateFile(pkgconfdir,'SLEPc.pc',log)pkgconfig246,10046
+  modules  = CreateFile(modulesdir,slepc.lversion,log)modules248,10117
+  modules  = CreateFile(modulesdir,slepc.lversion+'-'+archname,log)modules250,10178
+testruns = set(petsc.test_runs.split())testruns256,10405
+testruns = testruns.intersection(set(['C','F90','Fortran','C_Complex','Fortran_Complex','C_NoComplex','Fortran_NoComplex']))testruns257,10445
+  testruns = testruns.union(set(['C_NoF128']))testruns259,10606
+    testruns = testruns.union(set(['DATAFILESPATH_Complex']))testruns263,10760
+    testruns = testruns.union(set(['DATAFILESPATH']))testruns265,10830
+  globconf = CreateFile(os.path.join(slepc.dir,'lib','slepc','conf'),'slepcvariables',log)globconf282,11531
+bfort = petsc.bfortbfort333,13770
+  bfort = sowing.Install(archdir,petsc.make)bfort335,13817
+      bfort = os.path.join(archdir,'bin','bfort')bfort340,13945
+      bfort = sowing.Install(archdir,petsc.make)bfort342,14029
+cmakeok = Falsecmakeok356,14569
+      cmakeok = cmakeboot.main(slepc.dir,petsc.dir,log=log)cmakeok373,15182
+      petscdate = dateutil.parser.parse(petsc.gitdate)petscdate409,16583
+      slepcdate = dateutil.parser.parse(slepc.gitdate)slepcdate410,16638
 

 config/gmakegen.py,1260
 gmakegen.py:^?gmakegen.py^A,1
@@ -177,14 +178,14 @@ class Installer:Installer9,117
   def installBin(self):installBin193,8248
   def installShare(self):installShare200,8516
   def copyLib(self, src, dst):copyLib204,8630
-  def installLib(self):installLib227,9668
-  def outputInstallDone(self):outputInstallDone232,9802
-  def outputDestDirDone(self):outputDestDirDone242,10110
-  def runsetup(self):runsetup251,10378
-  def runcopy(self):runcopy256,10464
-  def runfix(self):runfix276,11198
-  def rundone(self):rundone280,11249
-  def run(self):run288,11423
+  def installLib(self):installLib229,9784
+  def outputInstallDone(self):outputInstallDone234,9918
+  def outputDestDirDone(self):outputDestDirDone244,10226
+  def runsetup(self):runsetup253,10494
+  def runcopy(self):runcopy258,10580
+  def runfix(self):runfix278,11314
+  def rundone(self):rundone282,11365
+  def run(self):run290,11539
 

 config/log.py,273
 log.py:^?log.py^A,1
@@ -196,65 +197,71 @@ class Log:Log24,942
   def write(self,string):write46,1427
   def Exit(self,string):Exit49,1485
 

-config/package.py,589
+config/package.py,767
 package.py:^?package.py^A,1
-class Package:Package25,983
-  def ProcessArgs(self,argdb):ProcessArgs27,999
-  def Process(self,conf,vars,cmake,petsc,archdir=''):Process48,1691
-  def ShowHelp(self):ShowHelp61,2150
-  def ShowInfo(self):ShowInfo72,2851
-  def LinkWithOutput(self,functions,callbacks,flags):LinkWithOutput77,3022
-  def Link(self,functions,callbacks,flags):Link128,4856
-  def FortranLink(self,functions,callbacks,flags):FortranLink133,5016
-  def GenerateGuesses(self,name):GenerateGuesses162,5923
-  def FortranLib(self,conf,vars,cmake,dirs,libs,functions,callbacks = []):FortranLib181,6515
-

-config/packages/arpack.py,148
+class Package:Package25,1015
+  def __init__(self,argdb,log):__init__27,1031
+  def ProcessArgs(self,argdb):ProcessArgs39,1393
+  def Process(self,conf,vars,cmake,petsc,archdir=''):Process63,2246
+  def Precondition(self,petsc):Precondition80,2879
+  def Download(self,externdir,builddir,prefix=None):Download96,3689
+  def ShowHelp(self):ShowHelp157,5949
+  def ShowInfo(self):ShowInfo168,6670
+  def LinkWithOutput(self,functions,callbacks,flags):LinkWithOutput173,6841
+  def Link(self,functions,callbacks,flags):Link224,8675
+  def FortranLink(self,functions,callbacks,flags):FortranLink229,8835
+  def GenerateGuesses(self,name):GenerateGuesses258,9742
+  def FortranLib(self,conf,vars,cmake,dirs,libs,functions,callbacks = []):FortranLib277,10334
+

+config/packages/arpack.py,262
 arpack.py:^?arpack.py^A,1
-class Arpack(package.Package):Arpack24,947
-  def __init__(self,argdb,log):__init__26,979
-  def Check(self,conf,vars,cmake,petsc):Check34,1185
+class Arpack(package.Package):Arpack25,967
+  def __init__(self,argdb,log):__init__27,999
+  def Functions(self,petsc):Functions39,1481
+  def Check(self,conf,vars,cmake,petsc):Check65,2290
+  def Install(self,conf,vars,cmake,petsc,archdir):Install83,2859
 

 config/packages/blopex.py,161
 blopex.py:^?blopex.py^A,1
-class Blopex(package.Package):Blopex26,996
-  def __init__(self,argdb,log):__init__28,1028
-  def Install(self,conf,vars,cmake,petsc,archdir):Install36,1247
+class Blopex(package.Package):Blopex25,975
+  def __init__(self,argdb,log):__init__27,1007
+  def Install(self,conf,vars,cmake,petsc,archdir):Install37,1389
 

 config/packages/blzpack.py,150
 blzpack.py:^?blzpack.py^A,1
 class Blzpack(package.Package):Blzpack24,947
   def __init__(self,argdb,log):__init__26,980
-  def Check(self,conf,vars,cmake,petsc):Check34,1187
+  def Check(self,conf,vars,cmake,petsc):Check34,1219
 

 config/packages/feast.py,146
 feast.py:^?feast.py^A,1
 class Feast(package.Package):Feast24,947
   def __init__(self,argdb,log):__init__26,978
-  def Check(self,conf,vars,cmake,petsc):Check34,1183
+  def Check(self,conf,vars,cmake,petsc):Check34,1218
 

 config/packages/lapack.py,257
 lapack.py:^?lapack.py^A,1
 class Lapack(package.Package):Lapack24,947
   def __init__(self,argdb,log):__init__26,979
-  def ShowInfo(self):ShowInfo31,1103
-  def Process(self,conf,vars,cmake,petsc,archdir=''):Process41,1519
-  def Check(self,conf,vars,cmake,petsc):Check47,1724
+  def ShowInfo(self):ShowInfo30,1089
+  def Process(self,conf,vars,cmake,petsc,archdir=''):Process40,1505
+  def Check(self,conf,vars,cmake,petsc):Check46,1710
 

 config/packages/petsc.py,255
 petsc.py:^?petsc.py^A,1
 class PETSc(package.Package):PETSc24,961
   def __init__(self,argdb,log):__init__26,992
-  def Check(self):Check31,1115
-  def InitDir(self,prefixdir):InitDir34,1178
-  def LoadVersion(self):LoadVersion46,1576
-  def LoadConf(self):LoadConf78,2917
+  def Check(self):Check30,1101
+  def InitDir(self,prefixdir):InitDir33,1164
+  def LoadVersion(self):LoadVersion45,1562
+  def LoadConf(self):LoadConf77,2903
 

-config/packages/primme.py,148
+config/packages/primme.py,216
 primme.py:^?primme.py^A,1
-class Primme(package.Package):Primme25,957
-  def __init__(self,argdb,log):__init__27,989
-  def Check(self,conf,vars,cmake,petsc):Check35,1195
+class Primme(package.Package):Primme25,975
+  def __init__(self,argdb,log):__init__27,1007
+  def Check(self,conf,vars,cmake,petsc):Check38,1415
+  def Install(self,conf,vars,cmake,petsc,archdir):Install80,2873
 

 config/packages/slepc.py,195
 slepc.py:^?slepc.py^A,1
@@ -268,13 +275,14 @@ config/packages/sowing.py,144
 sowing.py:^?sowing.py^A,1
 class Sowing(package.Package):Sowing25,972
   def __init__(self,argdb,log):__init__27,1004
-  def Install(self,archdir,make):Install35,1223
+  def Install(self,archdir,make):Install34,1241
 

-config/packages/trlan.py,146
+config/packages/trlan.py,213
 trlan.py:^?trlan.py^A,1
-class Trlan(package.Package):Trlan24,947
-  def __init__(self,argdb,log):__init__26,978
-  def Check(self,conf,vars,cmake,petsc):Check34,1183
+class Trlan(package.Package):Trlan25,967
+  def __init__(self,argdb,log):__init__27,998
+  def Check(self,conf,vars,cmake,petsc):Check39,1481
+  def Install(self,conf,vars,cmake,petsc,archdir):Install57,1883
 

 configure,0
 configure:^?configure^A,1
@@ -316,14 +324,14 @@ int main(int argc,char **argv)main30,1220
 

 docs/manual/ex1f.F,508
 ex1f.F:^?ex1f.F^A,1
-      program mainmain31,1377
- 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10075,2683
- 110  format (/' Number of iterations of the method:',I4)110146,4950
- 120  format (' Solution method: ',A)120153,5185
- 130  format (' Number of requested eigenvalues:',I2)130159,5415
- 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)140164,5589
- 150  format (' Number of converged eigenpairs:',I2/)150175,5997
- 160      format (1P,'   ',E12.4,'       ',E12.4)160193,6728
+      program mainmain31,1382
+ 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10076,2741
+ 110  format (/' Number of iterations of the method:',I4)110147,5008
+ 120  format (' Solution method: ',A)120154,5243
+ 130  format (' Number of requested eigenvalues:',I2)130160,5473
+ 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)140165,5647
+ 150  format (' Number of converged eigenpairs:',I2/)150176,6055
+ 160      format (1P,'   ',E12.4,'       ',E12.4)160194,6786
 

 docs/manual/makefile,218
 makefile:^?makefile^A,1
@@ -366,353 +374,375 @@ LOCDIR    = include/slepc/finclude/LOCDIR38,1584
 

 include/slepc/finclude/slepc.h,181
 slepc.h:^?slepc.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia3,143
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia3,143
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY12,521
 

 include/slepc/finclude/slepcbv.h,181
 slepcbv.h:^?slepcbv.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
 

-include/slepc/finclude/slepcbvdef.h,605
+include/slepc/finclude/slepcbvdef.h,611
 slepcbvdef.h:^?slepcbvdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
-#define __SLEPCBV_H__SLEPCBV_H24,1011
-#define BV BV27,1074
-#define BVType BVType30,1117
-#define BVOrthogType BVOrthogType31,1150
-#define BVOrthogRefineType BVOrthogRefineType32,1187
-#define BVOrthogBlockType BVOrthogBlockType33,1224
-#define BVMatMultType BVMatMultType34,1261
-#define BVMAT BVMAT36,1299
-#define BVSVEC BVSVEC37,1326
-#define BVVECS BVVECS38,1354
-#define BVCONTIGUOUS BVCONTIGUOUS39,1382
+#define __SLEPCBVDEF_H__SLEPCBVDEF_H24,1014
+#define BV BV27,1080
+#define BVType BVType30,1116
+#define BVOrthogType BVOrthogType31,1158
+#define BVOrthogRefineType BVOrthogRefineType32,1195
+#define BVOrthogBlockType BVOrthogBlockType33,1232
+#define BVMatMultType BVMatMultType34,1269
+#define BVMAT BVMAT36,1307
+#define BVSVEC BVSVEC37,1334
+#define BVVECS BVVECS38,1362
+#define BVCONTIGUOUS BVCONTIGUOUS39,1390
 

 include/slepc/finclude/slepcdef.h,181
 slepcdef.h:^?slepcdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,195
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,195
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,573
 

 include/slepc/finclude/slepcds.h,181
 slepcds.h:^?slepcds.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,207
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,207
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,585
 

-include/slepc/finclude/slepcdsdef.h,597
+include/slepc/finclude/slepcdsdef.h,603
 slepcdsdef.h:^?slepcdsdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
-#define __SLEPCDS_H__SLEPCDS_H24,1011
-#define DS DS27,1074
-#define DSType DSType30,1110
-#define DSStateType DSStateType31,1145
-#define DSMatType DSMatType32,1175
-#define DSHEP DSHEP34,1206
-#define DSNHEP DSNHEP35,1232
-#define DSGHEP DSGHEP36,1259
-#define DSGHIEP DSGHIEP37,1286
-#define DSGNHEP DSGNHEP38,1314
-#define DSSVD DSSVD39,1342
-#define DSPEP DSPEP40,1368
-#define DSNEP DSNEP41,1394
+#define __SLEPCDSDEF_H__SLEPCDSDEF_H24,1014
+#define DS DS27,1080
+#define DSType DSType30,1116
+#define DSStateType DSStateType31,1151
+#define DSMatType DSMatType32,1181
+#define DSHEP DSHEP34,1212
+#define DSNHEP DSNHEP35,1238
+#define DSGHEP DSGHEP36,1265
+#define DSGHIEP DSGHIEP37,1292
+#define DSGNHEP DSGNHEP38,1320
+#define DSSVD DSSVD39,1348
+#define DSPEP DSPEP40,1374
+#define DSNEP DSNEP41,1400
 

 include/slepc/finclude/slepceps.h,181
 slepceps.h:^?slepceps.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,208
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,208
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,586
 

-include/slepc/finclude/slepcepsdef.h,1362
+include/slepc/finclude/slepcepsdef.h,1503
 slepcepsdef.h:^?slepcepsdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
-#define __SLEPCEPS_H__SLEPCEPS_H24,1013
-#define EPS EPS32,1234
-#define EPSType EPSType35,1290
-#define EPSConvergedReason EPSConvergedReason36,1336
-#define EPSErrorType EPSErrorType37,1377
-#define EPSProblemType EPSProblemType38,1418
-#define EPSWhich EPSWhich39,1459
-#define EPSExtraction EPSExtraction40,1500
-#define EPSBalance EPSBalance41,1541
-#define EPSConv EPSConv42,1582
-#define EPSPowerShiftType EPSPowerShiftType43,1623
-#define EPSLanczosReorthogType EPSLanczosReorthogType44,1664
-#define EPSPRIMMEMethod EPSPRIMMEMethod45,1705
-#define EPSPOWER EPSPOWER48,1748
-#define EPSSUBSPACE EPSSUBSPACE49,1779
-#define EPSARNOLDI EPSARNOLDI50,1813
-#define EPSLANCZOS EPSLANCZOS51,1846
-#define EPSKRYLOVSCHUR EPSKRYLOVSCHUR52,1879
-#define EPSGD EPSGD53,1916
-#define EPSJD EPSJD54,1944
-#define EPSRQCG EPSRQCG55,1972
-#define EPSLOBPCG EPSLOBPCG56,2002
-#define EPSCISS EPSCISS57,2034
-#define EPSLAPACK EPSLAPACK58,2064
-#define EPSARPACK EPSARPACK59,2096
-#define EPSBLZPACK EPSBLZPACK60,2128
-#define EPSTRLAN EPSTRLAN61,2161
-#define EPSBLOPEX EPSBLOPEX62,2192
-#define EPSPRIMME EPSPRIMME63,2224
-#define EPSFEAST EPSFEAST64,2256
+#define __SLEPCEPSDEF_H__SLEPCEPSDEF_H24,1016
+#define EPS EPS32,1240
+#define EPSType EPSType35,1277
+#define EPSConvergedReason EPSConvergedReason36,1323
+#define EPSErrorType EPSErrorType37,1364
+#define EPSProblemType EPSProblemType38,1405
+#define EPSWhich EPSWhich39,1446
+#define EPSExtraction EPSExtraction40,1487
+#define EPSBalance EPSBalance41,1528
+#define EPSConv EPSConv42,1569
+#define EPSStop EPSStop43,1610
+#define EPSPowerShiftType EPSPowerShiftType44,1651
+#define EPSLanczosReorthogType EPSLanczosReorthogType45,1692
+#define EPSPRIMMEMethod EPSPRIMMEMethod46,1733
+#define EPSCISSQuadRule EPSCISSQuadRule47,1774
+#define EPSCISSExtraction EPSCISSExtraction48,1815
+#define EPSPOWER EPSPOWER50,1857
+#define EPSSUBSPACE EPSSUBSPACE51,1888
+#define EPSARNOLDI EPSARNOLDI52,1922
+#define EPSLANCZOS EPSLANCZOS53,1955
+#define EPSKRYLOVSCHUR EPSKRYLOVSCHUR54,1988
+#define EPSGD EPSGD55,2025
+#define EPSJD EPSJD56,2053
+#define EPSRQCG EPSRQCG57,2081
+#define EPSLOBPCG EPSLOBPCG58,2111
+#define EPSCISS EPSCISS59,2143
+#define EPSLAPACK EPSLAPACK60,2173
+#define EPSARPACK EPSARPACK61,2205
+#define EPSBLZPACK EPSBLZPACK62,2237
+#define EPSTRLAN EPSTRLAN63,2270
+#define EPSBLOPEX EPSBLOPEX64,2301
+#define EPSPRIMME EPSPRIMME65,2333
+#define EPSFEAST EPSFEAST66,2365
 

 include/slepc/finclude/slepcfn.h,181
 slepcfn.h:^?slepcfn.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,207
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,207
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,585
 

-include/slepc/finclude/slepcfndef.h,514
+include/slepc/finclude/slepcfndef.h,557
 slepcfndef.h:^?slepcfndef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
-#define __SLEPCFN_H__SLEPCFN_H24,1011
-#define FN FN27,1074
-#define FNType FNType30,1110
-#define FNCombineType FNCombineType31,1152
-#define FNCOMBINE FNCOMBINE33,1190
-#define FNRATIONAL FNRATIONAL34,1219
-#define FNEXP FNEXP35,1249
-#define FNLOG FNLOG36,1274
-#define FNPHI FNPHI37,1299
-#define FNSQRT FNSQRT38,1324
+#define __SLEPCFNDEF_H__SLEPCFNDEF_H24,1014
+#define FN FN27,1080
+#define FNType FNType30,1116
+#define FNCombineType FNCombineType31,1153
+#define FNCOMBINE FNCOMBINE33,1186
+#define FNRATIONAL FNRATIONAL34,1215
+#define FNEXP FNEXP35,1245
+#define FNLOG FNLOG36,1270
+#define FNPHI FNPHI37,1295
+#define FNSQRT FNSQRT38,1320
+#define FNINVSQRT FNINVSQRT39,1346
 

 include/slepc/finclude/slepcmfn.h,181
 slepcmfn.h:^?slepcmfn.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,208
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,208
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,586
 

-include/slepc/finclude/slepcmfndef.h,373
+include/slepc/finclude/slepcmfndef.h,418
 slepcmfndef.h:^?slepcmfndef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
-#define __SLEPCMFN_H__SLEPCMFN_H24,1013
-#define MFN MFN31,1196
-#define MFNType MFNType34,1252
-#define MFNConvergedReason MFNConvergedReason35,1298
-#define MFNKRYLOV MFNKRYLOV38,1341
+#define __SLEPCMFNDEF_H__SLEPCMFNDEF_H24,1016
+#define MFN MFN31,1202
+#define MFNType MFNType34,1239
+#define MFNConvergedReason MFNConvergedReason35,1281
+#define MFNKRYLOV MFNKRYLOV37,1319
+#define MFNEXPOKIT MFNEXPOKIT38,1351
 

 include/slepc/finclude/slepcnep.h,181
 slepcnep.h:^?slepcnep.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,208
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,208
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,586
 

-include/slepc/finclude/slepcnepdef.h,628
+include/slepc/finclude/slepcnepdef.h,786
 slepcnepdef.h:^?slepcnepdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
-#define __SLEPCNEP_H__SLEPCNEP_H24,1013
-#define NEP NEP34,1314
-#define NEPType NEPType37,1366
-#define NEPConvergedReason NEPConvergedReason38,1408
-#define NEPErrorType NEPErrorType39,1445
-#define NEPWhich NEPWhich40,1482
-#define NEPRefine NEPRefine41,1519
-#define NEPRII NEPRII43,1557
-#define NEPSLP NEPSLP44,1584
-#define NEPNARNOLDI NEPNARNOLDI45,1611
-#define NEPCISS NEPCISS46,1643
-#define NEPINTERPOL NEPINTERPOL47,1671
+#define __SLEPCNEPDEF_H__SLEPCNEPDEF_H24,1016
+#define NEP NEP34,1320
+#define NEPType NEPType37,1357
+#define NEPConvergedReason NEPConvergedReason38,1399
+#define NEPErrorType NEPErrorType39,1436
+#define NEPWhich NEPWhich40,1473
+#define NEPConv NEPConv41,1510
+#define NEPStop NEPStop42,1547
+#define NEPRefine NEPRefine43,1584
+#define NEPRefineScheme NEPRefineScheme44,1621
+#define NEPRII NEPRII46,1659
+#define NEPSLP NEPSLP47,1686
+#define NEPNARNOLDI NEPNARNOLDI48,1713
+#define NEPCISS NEPCISS49,1745
+#define NEPINTERPOL NEPINTERPOL50,1773
+#define NEPNLEIGS NEPNLEIGS51,1805
 

 include/slepc/finclude/slepcpep.h,181
 slepcpep.h:^?slepcpep.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,208
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,208
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,586
 

-include/slepc/finclude/slepcpepdef.h,815
+include/slepc/finclude/slepcpepdef.h,903
 slepcpepdef.h:^?slepcpepdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
-#define __SLEPCPEP_H__SLEPCPEP_H24,1013
-#define PEP PEP33,1274
-#define PEPType PEPType36,1326
-#define PEPProblemType PEPProblemType37,1368
-#define PEPWhich PEPWhich38,1405
-#define PEPBasis PEPBasis39,1442
-#define PEPScale PEPScale40,1479
-#define PEPRefine PEPRefine41,1516
-#define PEPExtract PEPExtract42,1553
-#define PEPConv PEPConv43,1590
-#define PEPErrorType PEPErrorType44,1627
-#define PEPConvergedReason PEPConvergedReason45,1664
-#define PEPLINEAR PEPLINEAR47,1702
-#define PEPQARNOLDI PEPQARNOLDI48,1732
-#define PEPTOAR PEPTOAR49,1764
-#define PEPSTOAR PEPSTOAR50,1792
-#define PEPJD PEPJD51,1821
+#define __SLEPCPEPDEF_H__SLEPCPEPDEF_H24,1016
+#define PEP PEP33,1280
+#define PEPType PEPType36,1317
+#define PEPProblemType PEPProblemType37,1359
+#define PEPWhich PEPWhich38,1396
+#define PEPBasis PEPBasis39,1433
+#define PEPScale PEPScale40,1470
+#define PEPRefine PEPRefine41,1507
+#define PEPRefineScheme PEPRefineScheme42,1544
+#define PEPExtract PEPExtract43,1581
+#define PEPConv PEPConv44,1618
+#define PEPStop PEPStop45,1655
+#define PEPErrorType PEPErrorType46,1692
+#define PEPConvergedReason PEPConvergedReason47,1729
+#define PEPLINEAR PEPLINEAR49,1767
+#define PEPQARNOLDI PEPQARNOLDI50,1797
+#define PEPTOAR PEPTOAR51,1829
+#define PEPSTOAR PEPSTOAR52,1857
+#define PEPJD PEPJD53,1886
 

 include/slepc/finclude/slepcrg.h,181
 slepcrg.h:^?slepcrg.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,207
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,207
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,585
 

-include/slepc/finclude/slepcrgdef.h,450
+include/slepc/finclude/slepcrgdef.h,425
 slepcrgdef.h:^?slepcrgdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
-#define __SLEPCRG_H__SLEPCRG_H24,1011
-#define RG RG27,1074
-#define RGType RGType30,1110
-#define RGNONE RGNONE32,1153
-#define RGINTERVAL RGINTERVAL33,1180
-#define RGPOLYGON RGPOLYGON34,1211
-#define RGELLIPSE RGELLIPSE35,1241
-#define RGRING RGRING36,1271
+#define __SLEPCRGDEF_H__SLEPCRGDEF_H24,1014
+#define RG RG27,1080
+#define RGType RGType30,1116
+#define RGINTERVAL RGINTERVAL32,1152
+#define RGPOLYGON RGPOLYGON33,1183
+#define RGELLIPSE RGELLIPSE34,1213
+#define RGRING RGRING35,1243
 

 include/slepc/finclude/slepcst.h,181
 slepcst.h:^?slepcst.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
 

-include/slepc/finclude/slepcstdef.h,487
+include/slepc/finclude/slepcstdef.h,493
 slepcstdef.h:^?slepcstdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,205
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,205
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,583
-#define __SLEPCST_H__SLEPCST_H24,1011
-#define ST ST29,1115
-#define STType STType32,1158
+#define __SLEPCSTDEF_H__SLEPCSTDEF_H24,1014
+#define ST ST29,1121
+#define STType STType32,1157
 #define STMatMode STMatMode33,1191
-#define STSHELL STSHELL35,1220
+#define STSHELL STSHELL35,1221
 #define STSHIFT STSHIFT36,1248
-#define STSINVERT STSINVERT37,1276
-#define STCAYLEY STCAYLEY38,1306
-#define STPRECOND STPRECOND39,1335
+#define STSINVERT STSINVERT37,1275
+#define STCAYLEY STCAYLEY38,1304
+#define STPRECOND STPRECOND39,1332
 

 include/slepc/finclude/slepcsvd.h,181
 slepcsvd.h:^?slepcsvd.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia7,208
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia7,208
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY16,586
 

-include/slepc/finclude/slepcsvddef.h,605
+include/slepc/finclude/slepcsvddef.h,677
 slepcsvddef.h:^?slepcsvddef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
-#define __SLEPCSVD_H__SLEPCSVD_H24,1013
-#define SVD SVD31,1196
-#define SVDType SVDType34,1248
-#define SVDConvergedReason SVDConvergedReason35,1290
-#define SVDErrorType SVDErrorType36,1327
-#define SVDWhich SVDWhich37,1364
-#define SVDCROSS SVDCROSS39,1402
-#define SVDCYCLIC SVDCYCLIC40,1431
-#define SVDLAPACK SVDLAPACK41,1461
-#define SVDLANCZOS SVDLANCZOS42,1491
-#define SVDTRLANCZOS SVDTRLANCZOS43,1522
+#define __SLEPCSVDDEF_H__SLEPCSVDDEF_H24,1016
+#define SVD SVD31,1202
+#define SVDType SVDType34,1239
+#define SVDConvergedReason SVDConvergedReason35,1281
+#define SVDErrorType SVDErrorType36,1318
+#define SVDWhich SVDWhich37,1355
+#define SVDConv SVDConv38,1392
+#define SVDStop SVDStop39,1429
+#define SVDCROSS SVDCROSS41,1467
+#define SVDCYCLIC SVDCYCLIC42,1496
+#define SVDLAPACK SVDLAPACK43,1526
+#define SVDLANCZOS SVDLANCZOS44,1556
+#define SVDTRLANCZOS SVDTRLANCZOS45,1587
 

 include/slepc/finclude/slepcsys.h,181
 slepcsys.h:^?slepcsys.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
 

-include/slepc/finclude/slepcsysdef.h,223
+include/slepc/finclude/slepcsysdef.h,280
 slepcsysdef.h:^?slepcsysdef.h^A,1
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, SpainValencia6,206
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, SpainValencia6,206
 !  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESSWARRANTY15,584
-#define __SLEPCSYS_H__SLEPCSYS_H25,1014
+#define __SLEPCSYSDEF_H__SLEPCSYSDEF_H25,1017
+#define SlepcConvMonitor SlepcConvMonitor27,1042
 

-include/slepc/private/bvimpl.h,7802
+include/slepc/private/bvimpl.h,10124
 bvimpl.h:^?bvimpl.h^A,1
 #define _BVIMPL_BVIMPL23,937
 PETSC_EXTERN PetscBool BVRegisterAllCalled;BVRegisterAllCalled28,1013
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Create31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Copy31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Mult31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Dot31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Orthogonalize31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Scale31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_Norm31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_SetRandom31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_MatMult31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_MatProject31,1107
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;BV_AXPY31,1107
-typedef struct _BVOps *BVOps;BVOps33,1249
-struct _BVOps {_BVOps35,1280
-  PetscErrorCode (*mult)(BV,PetscScalar,PetscScalar,BV,Mat);mult36,1296
-  PetscErrorCode (*multvec)(BV,PetscScalar,PetscScalar,Vec,PetscScalar*);multvec37,1357
-  PetscErrorCode (*multinplace)(BV,Mat,PetscInt,PetscInt);multinplace38,1431
-  PetscErrorCode (*multinplacetrans)(BV,Mat,PetscInt,PetscInt);multinplacetrans39,1490
-  PetscErrorCode (*axpy)(BV,PetscScalar,BV);axpy40,1554
-  PetscErrorCode (*dot)(BV,BV,Mat);dot41,1599
-  PetscErrorCode (*dotvec)(BV,Vec,PetscScalar*);dotvec42,1635
-  PetscErrorCode (*dotvec_local)(BV,Vec,PetscScalar*);dotvec_local43,1684
-  PetscErrorCode (*dotvec_begin)(BV,Vec,PetscScalar*);dotvec_begin44,1739
-  PetscErrorCode (*dotvec_end)(BV,Vec,PetscScalar*);dotvec_end45,1794
-  PetscErrorCode (*scale)(BV,PetscInt,PetscScalar);scale46,1847
-  PetscErrorCode (*norm)(BV,PetscInt,NormType,PetscReal*);norm47,1899
-  PetscErrorCode (*norm_local)(BV,PetscInt,NormType,PetscReal*);norm_local48,1958
-  PetscErrorCode (*norm_begin)(BV,PetscInt,NormType,PetscReal*);norm_begin49,2023
-  PetscErrorCode (*norm_end)(BV,PetscInt,NormType,PetscReal*);norm_end50,2088
-  PetscErrorCode (*orthogonalize)(BV,Mat);orthogonalize51,2151
-  PetscErrorCode (*matmult)(BV,Mat,BV);matmult52,2194
-  PetscErrorCode (*copy)(BV,BV);copy53,2234
-  PetscErrorCode (*resize)(BV,PetscInt,PetscBool);resize54,2267
-  PetscErrorCode (*getcolumn)(BV,PetscInt,Vec*);getcolumn55,2318
-  PetscErrorCode (*restorecolumn)(BV,PetscInt,Vec*);restorecolumn56,2367
-  PetscErrorCode (*getarray)(BV,PetscScalar**);getarray57,2420
-  PetscErrorCode (*restorearray)(BV,PetscScalar**);restorearray58,2468
-  PetscErrorCode (*create)(BV);create59,2520
-  PetscErrorCode (*setfromoptions)(PetscOptions*,BV);setfromoptions60,2552
-  PetscErrorCode (*view)(BV,PetscViewer);view61,2606
-  PetscErrorCode (*destroy)(BV);destroy62,2648
-struct _p_BV {_p_BV65,2685
-  Vec                t;            /* template vector */t68,2805
-  PetscInt           n,N;          /* dimensions of vectors (local, global) */n69,2862
-  PetscInt           n,N;          /* dimensions of vectors (local, global) */N69,2862
-  PetscInt           m;            /* number of vectors */m70,2941
-  PetscInt           l;            /* number of leading columns */l71,3000
-  PetscInt           k;            /* number of active columns */k72,3067
-  PetscInt           nc;           /* number of constraints */nc73,3133
-  BVOrthogType       orthog_type;  /* the method of vector orthogonalization */orthog_type74,3196
-  BVOrthogRefineType orthog_ref;   /* refinement method */orthog_ref75,3276
-  PetscReal          orthog_eta;   /* refinement threshold */orthog_eta76,3335
-  BVOrthogBlockType  orthog_block; /* the method of block orthogonalization */orthog_block77,3397
-  Mat                matrix;       /* inner product matrix */matrix78,3476
-  PetscBool          indef;        /* matrix is indefinite */indef79,3538
-  BVMatMultType      vmm;          /* version of matmult operation */vmm80,3600
-  Vec                Bx;           /* result of matrix times a vector x */Bx83,3746
-  PetscObjectId      xid;          /* object id of vector x */xid84,3821
-  PetscObjectState   xstate;       /* state of vector x */xstate85,3884
-  Vec                cv[2];        /* column vectors obtained with BVGetColumn() */cv86,3943
-  PetscInt           ci[2];        /* column indices of obtained vectors */ci87,4027
-  PetscObjectState   st[2];        /* state of obtained vectors */st88,4103
-  PetscObjectId      id[2];        /* object id of obtained vectors */id89,4170
-  PetscScalar        *h,*c;        /* orthogonalization coefficients */h90,4241
-  PetscScalar        *h,*c;        /* orthogonalization coefficients */c90,4241
-  PetscReal          *omega;       /* signature matrix values for indefinite case */omega91,4313
-  Mat                B,C;          /* auxiliary dense matrices for matmult operation */B92,4398
-  Mat                B,C;          /* auxiliary dense matrices for matmult operation */C92,4398
-  PetscObjectId      Aid;          /* object id of matrix A of matmult operation */Aid93,4486
-  PetscBool          defersfo;     /* deferred call to setfromoptions */defersfo94,4570
-  BV                 cached;       /* cached BV to store result of matrix times BV */cached95,4643
-  PetscObjectState   bvstate;      /* state of BV when BVApplyMatrixBV() was called */bvstate96,4729
-  PetscScalar        *work;work97,4816
-  PetscInt           lwork;lwork98,4844
-  void               *data;data99,4872
-#undef __FUNCT____FUNCT__102,4904
-#define __FUNCT__ __FUNCT__103,4921
-PETSC_STATIC_INLINE PetscErrorCode BV_SafeSqrt(BV bv,PetscScalar alpha,PetscReal *res)BV_SafeSqrt110,5194
-#undef __FUNCT____FUNCT__133,6096
-#define __FUNCT__ __FUNCT__134,6113
-PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMult(BV bv,Vec x)BV_IPMatMult139,6244
-#undef __FUNCT____FUNCT__152,6601
-#define __FUNCT__ __FUNCT__153,6618
-PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCachedBV(BV V)BV_AllocateCachedBV157,6757
-#undef __FUNCT____FUNCT__171,7257
-#define __FUNCT__ __FUNCT__172,7274
-PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMultBV(BV bv)BV_IPMatMultBV177,7420
-#undef __FUNCT____FUNCT__195,7921
-#define __FUNCT__ __FUNCT__196,7938
-PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCoeffs(BV bv)BV_AllocateCoeffs200,8065
-#undef __FUNCT____FUNCT__212,8394
-#define __FUNCT__ __FUNCT__213,8411
-PETSC_STATIC_INLINE PetscErrorCode BV_AllocateSignature(BV bv)BV_AllocateSignature217,8536
-#undef __FUNCT____FUNCT__231,8937
-#define __FUNCT__ __FUNCT__232,8954
-PETSC_STATIC_INLINE PetscErrorCode BV_AllocateMatMult(BV bv,Mat A,PetscInt m)BV_AllocateMatMult236,9091
-#define BVAvailableVec BVAvailableVec267,10138
-#define BVCheckSizes(BVCheckSizes274,10298
-#define BVCheckSizes(BVCheckSizes278,10350
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Create31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Copy31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Mult31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_MultVec31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_MultInPlace31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Dot31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_DotVec31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Orthogonalize31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_OrthogonalizeVec31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Scale31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_Norm31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_NormVec31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_SetRandom31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_MatMult31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_MatMultVec31,1107
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;BV_MatProject31,1107
+typedef struct _BVOps *BVOps;BVOps33,1322
+struct _BVOps {_BVOps35,1353
+  PetscErrorCode (*mult)(BV,PetscScalar,PetscScalar,BV,Mat);mult36,1369
+  PetscErrorCode (*multvec)(BV,PetscScalar,PetscScalar,Vec,PetscScalar*);multvec37,1430
+  PetscErrorCode (*multinplace)(BV,Mat,PetscInt,PetscInt);multinplace38,1504
+  PetscErrorCode (*multinplacetrans)(BV,Mat,PetscInt,PetscInt);multinplacetrans39,1563
+  PetscErrorCode (*dot)(BV,BV,Mat);dot40,1627
+  PetscErrorCode (*dotvec)(BV,Vec,PetscScalar*);dotvec41,1663
+  PetscErrorCode (*dotvec_local)(BV,Vec,PetscScalar*);dotvec_local42,1712
+  PetscErrorCode (*dotvec_begin)(BV,Vec,PetscScalar*);dotvec_begin43,1767
+  PetscErrorCode (*dotvec_end)(BV,Vec,PetscScalar*);dotvec_end44,1822
+  PetscErrorCode (*scale)(BV,PetscInt,PetscScalar);scale45,1875
+  PetscErrorCode (*norm)(BV,PetscInt,NormType,PetscReal*);norm46,1927
+  PetscErrorCode (*norm_local)(BV,PetscInt,NormType,PetscReal*);norm_local47,1986
+  PetscErrorCode (*norm_begin)(BV,PetscInt,NormType,PetscReal*);norm_begin48,2051
+  PetscErrorCode (*norm_end)(BV,PetscInt,NormType,PetscReal*);norm_end49,2116
+  PetscErrorCode (*orthogonalize)(BV,Mat);orthogonalize50,2179
+  PetscErrorCode (*matmult)(BV,Mat,BV);matmult51,2222
+  PetscErrorCode (*copy)(BV,BV);copy52,2262
+  PetscErrorCode (*resize)(BV,PetscInt,PetscBool);resize53,2295
+  PetscErrorCode (*getcolumn)(BV,PetscInt,Vec*);getcolumn54,2346
+  PetscErrorCode (*restorecolumn)(BV,PetscInt,Vec*);restorecolumn55,2395
+  PetscErrorCode (*getarray)(BV,PetscScalar**);getarray56,2448
+  PetscErrorCode (*restorearray)(BV,PetscScalar**);restorearray57,2496
+  PetscErrorCode (*getarrayread)(BV,const PetscScalar**);getarrayread58,2548
+  PetscErrorCode (*restorearrayread)(BV,const PetscScalar**);restorearrayread59,2606
+  PetscErrorCode (*duplicate)(BV,BV*);duplicate60,2668
+  PetscErrorCode (*create)(BV);create61,2707
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,BV);setfromoptions62,2739
+  PetscErrorCode (*view)(BV,PetscViewer);view63,2797
+  PetscErrorCode (*destroy)(BV);destroy64,2839
+struct _p_BV {_p_BV67,2876
+  Vec                t;            /* template vector */t70,2996
+  PetscInt           n,N;          /* dimensions of vectors (local, global) */n71,3053
+  PetscInt           n,N;          /* dimensions of vectors (local, global) */N71,3053
+  PetscInt           m;            /* number of vectors */m72,3132
+  PetscInt           l;            /* number of leading columns */l73,3191
+  PetscInt           k;            /* number of active columns */k74,3258
+  PetscInt           nc;           /* number of constraints */nc75,3324
+  BVOrthogType       orthog_type;  /* the method of vector orthogonalization */orthog_type76,3387
+  BVOrthogRefineType orthog_ref;   /* refinement method */orthog_ref77,3467
+  PetscReal          orthog_eta;   /* refinement threshold */orthog_eta78,3526
+  BVOrthogBlockType  orthog_block; /* the method of block orthogonalization */orthog_block79,3588
+  Mat                matrix;       /* inner product matrix */matrix80,3667
+  PetscBool          indef;        /* matrix is indefinite */indef81,3729
+  BVMatMultType      vmm;          /* version of matmult operation */vmm82,3791
+  Vec                Bx;           /* result of matrix times a vector x */Bx85,3937
+  PetscObjectId      xid;          /* object id of vector x */xid86,4012
+  PetscObjectState   xstate;       /* state of vector x */xstate87,4075
+  Vec                cv[2];        /* column vectors obtained with BVGetColumn() */cv88,4134
+  PetscInt           ci[2];        /* column indices of obtained vectors */ci89,4218
+  PetscObjectState   st[2];        /* state of obtained vectors */st90,4294
+  PetscObjectId      id[2];        /* object id of obtained vectors */id91,4361
+  PetscScalar        *h,*c;        /* orthogonalization coefficients */h92,4432
+  PetscScalar        *h,*c;        /* orthogonalization coefficients */c92,4432
+  PetscReal          *omega;       /* signature matrix values for indefinite case */omega93,4504
+  Mat                B,C;          /* auxiliary dense matrices for matmult operation */B94,4589
+  Mat                B,C;          /* auxiliary dense matrices for matmult operation */C94,4589
+  PetscObjectId      Aid;          /* object id of matrix A of matmult operation */Aid95,4677
+  PetscBool          defersfo;     /* deferred call to setfromoptions */defersfo96,4761
+  BV                 cached;       /* cached BV to store result of matrix times BV */cached97,4834
+  PetscObjectState   bvstate;      /* state of BV when BVApplyMatrixBV() was called */bvstate98,4920
+  PetscRandom        rand;         /* random number generator */rand99,5007
+  PetscBool          rrandom;      /* reproducible random vectors */rrandom100,5072
+  PetscScalar        *work;work101,5141
+  PetscInt           lwork;lwork102,5169
+  void               *data;data103,5197
+#undef __FUNCT____FUNCT__106,5229
+#define __FUNCT__ __FUNCT__107,5246
+PETSC_STATIC_INLINE PetscErrorCode BV_SafeSqrt(BV bv,PetscScalar alpha,PetscReal *res)BV_SafeSqrt114,5519
+#undef __FUNCT____FUNCT__137,6421
+#define __FUNCT__ __FUNCT__138,6438
+PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMult(BV bv,Vec x)BV_IPMatMult143,6569
+#undef __FUNCT____FUNCT__156,6926
+#define __FUNCT__ __FUNCT__157,6943
+PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCachedBV(BV V)BV_AllocateCachedBV161,7082
+#undef __FUNCT____FUNCT__175,7582
+#define __FUNCT__ __FUNCT__176,7599
+PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMultBV(BV bv)BV_IPMatMultBV181,7745
+#undef __FUNCT____FUNCT__199,8246
+#define __FUNCT__ __FUNCT__200,8263
+PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCoeffs(BV bv)BV_AllocateCoeffs204,8390
+#undef __FUNCT____FUNCT__216,8719
+#define __FUNCT__ __FUNCT__217,8736
+PETSC_STATIC_INLINE PetscErrorCode BV_AllocateSignature(BV bv)BV_AllocateSignature221,8861
+#undef __FUNCT____FUNCT__235,9262
+#define __FUNCT__ __FUNCT__236,9279
+PETSC_STATIC_INLINE PetscErrorCode BV_AllocateMatMult(BV bv,Mat A,PetscInt m)BV_AllocateMatMult240,9416
+#define BVAvailableVec BVAvailableVec271,10463
+#define BVCheckSizes(BVCheckSizes278,10623
+#define BVCheckSizes(BVCheckSizes282,10675
 

 include/slepc/private/dsimpl.h,3316
 dsimpl.h:^?dsimpl.h^A,1
@@ -766,7 +796,7 @@ struct _p_DS {_p_DS50,1914
 #define DSCheckAlloc(DSCheckAlloc89,3714
 #define DSCheckSolved(DSCheckSolved94,3904
 

-include/slepc/private/epsimpl.h,6433
+include/slepc/private/epsimpl.h,6663
 epsimpl.h:^?epsimpl.h^A,1
 #define _EPSIMPL_EPSIMPL23,947
 PETSC_EXTERN PetscBool EPSRegisterAllCalled;EPSRegisterAllCalled28,1025
@@ -776,85 +806,88 @@ typedef struct _EPSOps *EPSOps;EPSOps32,1169
 struct _EPSOps {_EPSOps34,1202
   PetscErrorCode (*solve)(EPS);solve35,1219
   PetscErrorCode (*setup)(EPS);setup36,1251
-  PetscErrorCode (*setfromoptions)(PetscOptions*,EPS);setfromoptions37,1283
-  PetscErrorCode (*publishoptions)(EPS);publishoptions38,1338
-  PetscErrorCode (*destroy)(EPS);destroy39,1379
-  PetscErrorCode (*reset)(EPS);reset40,1413
-  PetscErrorCode (*view)(EPS,PetscViewer);view41,1445
-  PetscErrorCode (*backtransform)(EPS);backtransform42,1488
-  PetscErrorCode (*computevectors)(EPS);computevectors43,1528
-#define MAXEPSMONITORS MAXEPSMONITORS49,1641
-typedef enum { EPS_STATE_INITIAL,EPS_STATE_INITIAL51,1667
-               EPS_STATE_SETUP,EPS_STATE_SETUP52,1701
-               EPS_STATE_SOLVED,EPS_STATE_SOLVED53,1733
-               EPS_STATE_EIGENVECTORS } EPSStateType;EPS_STATE_EIGENVECTORS54,1766
-               EPS_STATE_EIGENVECTORS } EPSStateType;EPSStateType54,1766
-struct _p_EPS {_p_EPS59,1862
-  PetscInt       max_it;           /* maximum number of iterations */max_it62,1985
-  PetscInt       nev;              /* number of eigenvalues to compute */nev63,2055
-  PetscInt       ncv;              /* number of basis vectors */ncv64,2129
-  PetscInt       mpd;              /* maximum dimension of projected problem */mpd65,2194
-  PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */nini66,2274
-  PetscInt       nds;              /* number of basis vectors of deflation space */nds67,2373
-  PetscScalar    target;           /* target value */target68,2457
-  PetscReal      tol;              /* tolerance */tol69,2511
-  EPSConv        conv;             /* convergence test */conv70,2562
-  EPSWhich       which;            /* which part of the spectrum to be sought */which71,2620
-  PetscReal      inta,intb;        /* interval [a,b] for spectrum slicing */inta72,2701
-  PetscReal      inta,intb;        /* interval [a,b] for spectrum slicing */intb72,2701
-  EPSProblemType problem_type;     /* which kind of problem to be solved */problem_type73,2778
-  EPSExtraction  extraction;       /* which kind of extraction to be applied */extraction74,2854
-  EPSBalance     balance;          /* the balancing method */balance75,2934
-  PetscInt       balance_its;      /* number of iterations of the balancing method */balance_its76,2996
-  PetscReal      balance_cutoff;   /* cutoff value for balancing */balance_cutoff77,3082
-  PetscBool      trueres;          /* whether the true residual norm must be computed */trueres78,3150
-  PetscBool      trackall;         /* whether all the residuals must be computed */trackall79,3239
-  PetscBool      purify;           /* whether eigenvectors need to be purified */purify80,3323
-  PetscErrorCode (*converged)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);converged83,3482
-  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy84,3569
-  PetscErrorCode (*arbitrary)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*);arbitrary85,3614
-  void           *convergedctx;convergedctx86,3710
-  void           *arbitraryctx;arbitraryctx87,3742
-  PetscErrorCode (*monitor[MAXEPSMONITORS])(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);monitor88,3774
-  PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**);monitordestroy89,3894
-  void           *monitorcontext[MAXEPSMONITORS];monitorcontext90,3954
-  PetscInt       numbermonitors;numbermonitors91,4004
-  ST             st;               /* spectral transformation object */st94,4113
-  DS             ds;               /* direct solver object */ds95,4185
-  BV             V;                /* set of basis vectors and computed eigenvectors */V96,4247
-  RG             rg;               /* optional region for filtering */rg97,4335
-  PetscRandom    rand;             /* random number generator */rand98,4406
-  SlepcSC        sc;               /* sorting criterion data */sc99,4471
-  Vec            D;                /* diagonal matrix for balancing */D100,4535
-  Vec            *IS;              /* references to user-provided initial space */IS101,4606
-  Vec            *defl;            /* references to user-provided deflation space */defl102,4689
-  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigr103,4774
-  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigi103,4774
-  PetscReal      *errest;          /* error estimates */errest104,4855
-  PetscScalar    *rr,*ri;          /* values computed by user's arbitrary selection function */rr105,4912
-  PetscScalar    *rr,*ri;          /* values computed by user's arbitrary selection function */ri105,4912
-  PetscInt       *perm;            /* permutation for eigenvalue ordering */perm106,5008
-  PetscInt       nwork;            /* number of work vectors */nwork107,5085
-  Vec            *work;            /* work vectors */work108,5149
-  void           *data;            /* placeholder for solver-specific stuff */data109,5203
-  EPSStateType   state;            /* initial -> setup -> solved -> eigenvectors */state112,5358
-  PetscInt       nconv;            /* number of converged eigenvalues */nconv113,5442
-  PetscInt       its;              /* number of iterations so far computed */its114,5515
-  PetscInt       n,nloc;           /* problem dimensions (global, local) */n115,5593
-  PetscInt       n,nloc;           /* problem dimensions (global, local) */nloc115,5593
-  PetscReal      nrma,nrmb;        /* computed matrix norms */nrma116,5669
-  PetscReal      nrma,nrmb;        /* computed matrix norms */nrmb116,5669
-  PetscBool      isgeneralized;isgeneralized117,5732
-  PetscBool      ispositive;ispositive118,5764
-  PetscBool      ishermitian;ishermitian119,5793
-  EPSConvergedReason reason;reason120,5823
-#define EPSCheckSolved(EPSCheckSolved128,5932
-#define EPSCheckSolved(EPSCheckSolved132,5986
-#undef __FUNCT____FUNCT__139,6203
-#define __FUNCT__ __FUNCT__140,6220
-PETSC_STATIC_INLINE PetscErrorCode EPS_SetInnerProduct(EPS eps)EPS_SetInnerProduct144,6337
-

-include/slepc/private/fnimpl.h,1287
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,EPS);setfromoptions37,1283
+  PetscErrorCode (*publishoptions)(EPS);publishoptions38,1342
+  PetscErrorCode (*destroy)(EPS);destroy39,1383
+  PetscErrorCode (*reset)(EPS);reset40,1417
+  PetscErrorCode (*view)(EPS,PetscViewer);view41,1449
+  PetscErrorCode (*backtransform)(EPS);backtransform42,1492
+  PetscErrorCode (*computevectors)(EPS);computevectors43,1532
+#define MAXEPSMONITORS MAXEPSMONITORS49,1645
+typedef enum { EPS_STATE_INITIAL,EPS_STATE_INITIAL51,1671
+               EPS_STATE_SETUP,EPS_STATE_SETUP52,1705
+               EPS_STATE_SOLVED,EPS_STATE_SOLVED53,1737
+               EPS_STATE_EIGENVECTORS } EPSStateType;EPS_STATE_EIGENVECTORS54,1770
+               EPS_STATE_EIGENVECTORS } EPSStateType;EPSStateType54,1770
+struct _p_EPS {_p_EPS59,1866
+  PetscInt       max_it;           /* maximum number of iterations */max_it62,1989
+  PetscInt       nev;              /* number of eigenvalues to compute */nev63,2059
+  PetscInt       ncv;              /* number of basis vectors */ncv64,2133
+  PetscInt       mpd;              /* maximum dimension of projected problem */mpd65,2198
+  PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */nini66,2278
+  PetscInt       nds;              /* number of basis vectors of deflation space */nds67,2377
+  PetscScalar    target;           /* target value */target68,2461
+  PetscReal      tol;              /* tolerance */tol69,2515
+  EPSConv        conv;             /* convergence test */conv70,2566
+  EPSStop        stop;             /* stopping test */stop71,2624
+  EPSWhich       which;            /* which part of the spectrum to be sought */which72,2679
+  PetscReal      inta,intb;        /* interval [a,b] for spectrum slicing */inta73,2760
+  PetscReal      inta,intb;        /* interval [a,b] for spectrum slicing */intb73,2760
+  EPSProblemType problem_type;     /* which kind of problem to be solved */problem_type74,2837
+  EPSExtraction  extraction;       /* which kind of extraction to be applied */extraction75,2913
+  EPSBalance     balance;          /* the balancing method */balance76,2993
+  PetscInt       balance_its;      /* number of iterations of the balancing method */balance_its77,3055
+  PetscReal      balance_cutoff;   /* cutoff value for balancing */balance_cutoff78,3141
+  PetscBool      trueres;          /* whether the true residual norm must be computed */trueres79,3209
+  PetscBool      trackall;         /* whether all the residuals must be computed */trackall80,3298
+  PetscBool      purify;           /* whether eigenvectors need to be purified */purify81,3382
+  PetscErrorCode (*converged)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);converged84,3541
+  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy85,3628
+  PetscErrorCode (*stopping)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);stopping86,3673
+  PetscErrorCode (*stoppingdestroy)(void*);stoppingdestroy87,3770
+  PetscErrorCode (*arbitrary)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*);arbitrary88,3814
+  void           *convergedctx;convergedctx89,3910
+  void           *stoppingctx;stoppingctx90,3942
+  void           *arbitraryctx;arbitraryctx91,3973
+  PetscErrorCode (*monitor[MAXEPSMONITORS])(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);monitor92,4005
+  PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**);monitordestroy93,4125
+  void           *monitorcontext[MAXEPSMONITORS];monitorcontext94,4185
+  PetscInt       numbermonitors;numbermonitors95,4235
+  ST             st;               /* spectral transformation object */st98,4344
+  DS             ds;               /* direct solver object */ds99,4416
+  BV             V;                /* set of basis vectors and computed eigenvectors */V100,4478
+  RG             rg;               /* optional region for filtering */rg101,4566
+  SlepcSC        sc;               /* sorting criterion data */sc102,4637
+  Vec            D;                /* diagonal matrix for balancing */D103,4701
+  Vec            *IS;              /* references to user-provided initial space */IS104,4772
+  Vec            *defl;            /* references to user-provided deflation space */defl105,4855
+  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigr106,4940
+  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigi106,4940
+  PetscReal      *errest;          /* error estimates */errest107,5021
+  PetscScalar    *rr,*ri;          /* values computed by user's arbitrary selection function */rr108,5078
+  PetscScalar    *rr,*ri;          /* values computed by user's arbitrary selection function */ri108,5078
+  PetscInt       *perm;            /* permutation for eigenvalue ordering */perm109,5174
+  PetscInt       nwork;            /* number of work vectors */nwork110,5251
+  Vec            *work;            /* work vectors */work111,5315
+  void           *data;            /* placeholder for solver-specific stuff */data112,5369
+  EPSStateType   state;            /* initial -> setup -> solved -> eigenvectors */state115,5524
+  PetscInt       nconv;            /* number of converged eigenvalues */nconv116,5608
+  PetscInt       its;              /* number of iterations so far computed */its117,5681
+  PetscInt       n,nloc;           /* problem dimensions (global, local) */n118,5759
+  PetscInt       n,nloc;           /* problem dimensions (global, local) */nloc118,5759
+  PetscReal      nrma,nrmb;        /* computed matrix norms */nrma119,5835
+  PetscReal      nrma,nrmb;        /* computed matrix norms */nrmb119,5835
+  PetscBool      isgeneralized;isgeneralized120,5898
+  PetscBool      ispositive;ispositive121,5930
+  PetscBool      ishermitian;ishermitian122,5959
+  EPSConvergedReason reason;reason123,5989
+#define EPSCheckSolved(EPSCheckSolved131,6098
+#define EPSCheckSolved(EPSCheckSolved135,6152
+#undef __FUNCT____FUNCT__142,6369
+#define __FUNCT__ __FUNCT__143,6386
+PETSC_STATIC_INLINE PetscErrorCode EPS_SetInnerProduct(EPS eps)EPS_SetInnerProduct147,6503
+

+include/slepc/private/fnimpl.h,1812
 fnimpl.h:^?fnimpl.h^A,1
 #define _FNIMPL_FNIMPL23,946
 PETSC_EXTERN PetscBool FNRegisterAllCalled;FNRegisterAllCalled28,1022
@@ -865,18 +898,26 @@ struct _FNOps {_FNOps34,1187
   PetscErrorCode (*evaluatederivative)(FN,PetscScalar,PetscScalar*);evaluatederivative36,1270
   PetscErrorCode (*evaluatefunctionmat)(FN,Mat,Mat);evaluatefunctionmat37,1339
   PetscErrorCode (*evaluatefunctionmatsym)(FN,Mat,Mat);evaluatefunctionmatsym38,1392
-  PetscErrorCode (*setfromoptions)(PetscOptions*,FN);setfromoptions39,1448
-  PetscErrorCode (*view)(FN,PetscViewer);view40,1502
-  PetscErrorCode (*duplicate)(FN,MPI_Comm,FN*);duplicate41,1544
-  PetscErrorCode (*destroy)(FN);destroy42,1592
-struct _p_FN {_p_FN45,1629
-  PetscScalar        alpha;   /* inner scaling (argument) */alpha48,1749
-  PetscScalar        beta;    /* outer scaling (result) */beta49,1810
-  Mat                W;       /* workspace matrix */W52,1945
-  void               *data;data53,1998
-#undef __FUNCT____FUNCT__56,2030
-#define __FUNCT__ __FUNCT__57,2047
-PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(FN fn,Mat A)FN_AllocateWorkMat61,2184
+  PetscErrorCode (*evaluatefunctionmatvec)(FN,Mat,Vec);evaluatefunctionmatvec39,1448
+  PetscErrorCode (*evaluatefunctionmatvecsym)(FN,Mat,Vec);evaluatefunctionmatvecsym40,1504
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,FN);setfromoptions41,1563
+  PetscErrorCode (*view)(FN,PetscViewer);view42,1621
+  PetscErrorCode (*duplicate)(FN,MPI_Comm,FN*);duplicate43,1663
+  PetscErrorCode (*destroy)(FN);destroy44,1711
+#define FN_MAX_W FN_MAX_W47,1748
+struct _p_FN {_p_FN49,1768
+  PetscScalar alpha;          /* inner scaling (argument) */alpha52,1888
+  PetscScalar beta;           /* outer scaling (result) */beta53,1949
+  Mat         W[FN_MAX_W];    /* workspace matrices */W56,2084
+  PetscInt    nw;             /* number of allocated W matrices */nw57,2139
+  PetscInt    cw;             /* current W matrix */cw58,2206
+  void        *data;data59,2259
+#undef __FUNCT____FUNCT__62,2284
+#define __FUNCT__ __FUNCT__63,2301
+PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(FN fn,Mat A,Mat *M)FN_AllocateWorkMat69,2519
+#undef __FUNCT____FUNCT__100,3442
+#define __FUNCT__ __FUNCT__101,3459
+PETSC_STATIC_INLINE PetscErrorCode FN_FreeWorkMat(FN fn,Mat *M)FN_FreeWorkMat105,3576
 

 include/slepc/private/makefile,309
 makefile:^?makefile^A,1
@@ -890,7 +931,7 @@ DIRS     = DIRS29,1132
 LOCDIR   = include/slepc/private/LOCDIR30,1144
 MANSEC   = MANSEC31,1178
 

-include/slepc/private/mfnimpl.h,2360
+include/slepc/private/mfnimpl.h,2658
 mfnimpl.h:^?mfnimpl.h^A,1
 #define _MFNIMPL_MFNIMPL23,947
 PETSC_EXTERN PetscBool MFNRegisterAllCalled;MFNRegisterAllCalled28,1025
@@ -900,128 +941,145 @@ typedef struct _MFNOps *MFNOps;MFNOps32,1170
 struct _MFNOps {_MFNOps34,1203
   PetscErrorCode (*solve)(MFN,Vec,Vec);solve35,1220
   PetscErrorCode (*setup)(MFN);setup36,1260
-  PetscErrorCode (*setfromoptions)(PetscOptions*,MFN);setfromoptions37,1292
-  PetscErrorCode (*publishoptions)(MFN);publishoptions38,1347
-  PetscErrorCode (*destroy)(MFN);destroy39,1388
-  PetscErrorCode (*reset)(MFN);reset40,1422
-  PetscErrorCode (*view)(MFN,PetscViewer);view41,1454
-#define MAXMFNMONITORS MAXMFNMONITORS47,1569
-struct _p_MFN {_p_MFN52,1636
-  Mat            A;              /* the problem matrix */A55,1759
-  FN             fn;             /* which function to compute */fn56,1817
-  PetscInt       max_it;         /* maximum number of iterations */max_it57,1882
-  PetscInt       ncv;            /* number of basis vectors */ncv58,1950
-  PetscReal      tol;            /* tolerance */tol59,2013
-  PetscScalar    sfactor;        /* scaling factor */sfactor60,2062
-  PetscBool      errorifnotconverged;    /* error out if MFNSolve() does not converge */errorifnotconverged61,2116
-  PetscErrorCode (*monitor[MAXMFNMONITORS])(MFN,PetscInt,PetscReal,void*);monitor64,2282
-  PetscErrorCode (*monitordestroy[MAXMFNMONITORS])(void**);monitordestroy65,2357
-  void           *monitorcontext[MAXMFNMONITORS];monitorcontext66,2417
-  PetscInt       numbermonitors;numbermonitors67,2467
-  BV             V;              /* set of basis vectors */V70,2576
-  PetscRandom    rand;           /* random number generator */rand71,2636
-  PetscInt       nwork;          /* number of work vectors */nwork72,2699
-  Vec            *work;          /* work vectors */work73,2761
-  void           *data;          /* placeholder for solver-specific stuff */data74,2813
-  PetscInt       its;            /* number of iterations so far computed */its77,2967
-  PetscInt       nv;             /* size of current Schur decomposition */nv78,3043
-  PetscReal      errest;         /* error estimate */errest79,3118
-  PetscInt       setupcalled;setupcalled80,3172
-  MFNConvergedReason reason;reason81,3202
-

-include/slepc/private/nepimpl.h,6925
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,MFN);setfromoptions37,1292
+  PetscErrorCode (*publishoptions)(MFN);publishoptions38,1351
+  PetscErrorCode (*destroy)(MFN);destroy39,1392
+  PetscErrorCode (*reset)(MFN);reset40,1426
+  PetscErrorCode (*view)(MFN,PetscViewer);view41,1458
+#define MAXMFNMONITORS MAXMFNMONITORS47,1573
+struct _p_MFN {_p_MFN52,1640
+  Mat            A;              /* the problem matrix */A55,1763
+  FN             fn;             /* which function to compute */fn56,1821
+  PetscInt       max_it;         /* maximum number of iterations */max_it57,1886
+  PetscInt       ncv;            /* number of basis vectors */ncv58,1954
+  PetscReal      tol;            /* tolerance */tol59,2017
+  PetscBool      errorifnotconverged;    /* error out if MFNSolve() does not converge */errorifnotconverged60,2066
+  PetscErrorCode (*monitor[MAXMFNMONITORS])(MFN,PetscInt,PetscReal,void*);monitor63,2232
+  PetscErrorCode (*monitordestroy[MAXMFNMONITORS])(void**);monitordestroy64,2307
+  void           *monitorcontext[MAXMFNMONITORS];monitorcontext65,2367
+  PetscInt       numbermonitors;numbermonitors66,2417
+  BV             V;              /* set of basis vectors */V69,2526
+  PetscInt       nwork;          /* number of work vectors */nwork70,2586
+  Vec            *work;          /* work vectors */work71,2648
+  void           *data;          /* placeholder for solver-specific stuff */data72,2700
+  PetscInt       its;            /* number of iterations so far computed */its75,2854
+  PetscInt       nv;             /* size of current Schur decomposition */nv76,2930
+  PetscReal      errest;         /* error estimate */errest77,3005
+  PetscReal      bnorm;          /* computed norm of right-hand side in current solve */bnorm78,3059
+  PetscInt       setupcalled;setupcalled79,3148
+  MFNConvergedReason reason;reason80,3178
+#undef __FUNCT____FUNCT__83,3211
+#define __FUNCT__ __FUNCT__84,3228
+PETSC_STATIC_INLINE PetscErrorCode MFN_CreateDenseMat(PetscInt k,Mat *A)MFN_CreateDenseMat88,3359
+#undef __FUNCT____FUNCT__109,3847
+#define __FUNCT__ __FUNCT__110,3864
+PETSC_STATIC_INLINE PetscErrorCode MFN_CreateVec(PetscInt k,Vec *v)MFN_CreateVec114,3979
+

+include/slepc/private/nepimpl.h,7917
 nepimpl.h:^?nepimpl.h^A,1
 #define _NEPIMPL_NEPIMPL23,947
 PETSC_EXTERN PetscBool NEPRegisterAllCalled;NEPRegisterAllCalled28,1025
-PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;NEP_SetUp30,1120
-PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;NEP_Solve30,1120
-PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;NEP_Refine30,1120
-PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;NEP_FunctionEval30,1120
-PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;NEP_JacobianEval30,1120
-typedef struct _NEPOps *NEPOps;NEPOps32,1214
-struct _NEPOps {_NEPOps34,1247
-  PetscErrorCode (*solve)(NEP);solve35,1264
-  PetscErrorCode (*setup)(NEP);setup36,1296
-  PetscErrorCode (*setfromoptions)(PetscOptions*,NEP);setfromoptions37,1328
-  PetscErrorCode (*publishoptions)(NEP);publishoptions38,1383
-  PetscErrorCode (*destroy)(NEP);destroy39,1424
-  PetscErrorCode (*reset)(NEP);reset40,1458
-  PetscErrorCode (*view)(NEP,PetscViewer);view41,1490
-  PetscErrorCode (*computevectors)(NEP);computevectors42,1533
-#define MAXNEPMONITORS MAXNEPMONITORS48,1646
-typedef enum { NEP_STATE_INITIAL,NEP_STATE_INITIAL50,1672
-               NEP_STATE_SETUP,NEP_STATE_SETUP51,1706
-               NEP_STATE_SOLVED,NEP_STATE_SOLVED52,1738
-               NEP_STATE_EIGENVECTORS } NEPStateType;NEP_STATE_EIGENVECTORS53,1771
-               NEP_STATE_EIGENVECTORS } NEPStateType;NEPStateType53,1771
-struct _p_NEP {_p_NEP58,1867
-  PetscInt       max_it;           /* maximum number of iterations */max_it61,1990
-  PetscInt       max_funcs;        /* maximum number of function evaluations */max_funcs62,2060
-  PetscInt       nev;              /* number of eigenvalues to compute */nev63,2140
-  PetscInt       ncv;              /* number of basis vectors */ncv64,2214
-  PetscInt       mpd;              /* maximum dimension of projected problem */mpd65,2279
-  PetscInt       lag;              /* interval to rebuild preconditioner */lag66,2359
-  PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */nini67,2435
-  PetscScalar    target;           /* target value */target68,2534
-  PetscReal      abstol,rtol,stol; /* user tolerances */abstol69,2588
-  PetscReal      abstol,rtol,stol; /* user tolerances */rtol69,2588
-  PetscReal      abstol,rtol,stol; /* user tolerances */stol69,2588
-  PetscReal      ktol;             /* tolerance for linear solver */ktol70,2645
-  PetscBool      cctol;            /* constant correction tolerance */cctol71,2714
-  PetscReal      ttol;             /* tolerance used in the convergence criterion */ttol72,2785
-  NEPWhich       which;            /* which part of the spectrum to be sought */which73,2870
-  NEPRefine      refine;           /* type of refinement to be applied after solve */refine74,2951
-  PetscInt       npart;            /* number of partitions of the communicator */npart75,3037
-  PetscReal      reftol;           /* tolerance for refinement */reftol76,3119
-  PetscInt       rits;             /* number of iterations of the refinement method */rits77,3185
-  PetscBool      trackall;         /* whether all the residuals must be computed */trackall78,3272
-  PetscErrorCode (*computefunction)(NEP,PetscScalar,Mat,Mat,void*);computefunction81,3433
-  PetscErrorCode (*computejacobian)(NEP,PetscScalar,Mat,void*);computejacobian82,3501
-  void           *functionctx;functionctx83,3565
-  void           *jacobianctx;jacobianctx84,3596
-  PetscErrorCode (*converged)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*);converged85,3627
-  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy86,3728
-  void           *convergedctx;convergedctx87,3773
-  PetscErrorCode (*monitor[MAXNEPMONITORS])(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);monitor88,3805
-  PetscErrorCode (*monitordestroy[MAXNEPMONITORS])(void**);monitordestroy89,3912
-  void           *monitorcontext[MAXNEPMONITORS];monitorcontext90,3972
-  PetscInt       numbermonitors;numbermonitors91,4022
-  DS             ds;               /* direct solver object */ds94,4131
-  BV             V;                /* set of basis vectors and computed eigenvectors */V95,4193
-  RG             rg;               /* optional region for filtering */rg96,4281
-  PetscRandom    rand;             /* random number generator */rand97,4352
-  SlepcSC        sc;               /* sorting criterion data */sc98,4417
-  KSP            ksp;              /* linear solver object */ksp99,4481
-  Mat            function;         /* function matrix */function100,4543
-  Mat            function_pre;     /* function matrix (preconditioner) */function_pre101,4600
-  Mat            jacobian;         /* Jacobian matrix */jacobian102,4674
-  Mat            *A;               /* matrix coefficients of split form */A103,4731
-  FN             *f;               /* matrix functions of split form */f104,4806
-  PetscInt       nt;               /* number of terms in split form */nt105,4878
-  MatStructure   mstr;             /* pattern of split matrices */mstr106,4949
-  Vec            *IS;              /* references to user-provided initial space */IS107,5016
-  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigr108,5099
-  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigi108,5099
-  PetscReal      *errest;          /* error estimates */errest109,5180
-  PetscInt       *perm;            /* permutation for eigenvalue ordering */perm110,5237
-  PetscInt       nwork;            /* number of work vectors */nwork111,5314
-  Vec            *work;            /* work vectors */work112,5378
-  void           *data;            /* placeholder for solver-specific stuff */data113,5432
-  NEPStateType   state;            /* initial -> setup -> solved -> eigenvectors */state116,5587
-  PetscInt       nconv;            /* number of converged eigenvalues */nconv117,5671
-  PetscInt       its;              /* number of iterations so far computed */its118,5744
-  PetscInt       n,nloc;           /* problem dimensions (global, local) */n119,5822
-  PetscInt       n,nloc;           /* problem dimensions (global, local) */nloc119,5822
-  PetscInt       nfuncs;           /* number of function evaluations */nfuncs120,5898
-  PetscBool      split;            /* the nonlinear operator has been set insplit121,5970
-  NEPConvergedReason reason;reason123,6134
-#define NEPCheckSolved(NEPCheckSolved131,6243
-#define NEPCheckSolved(NEPCheckSolved135,6297
-#undef __FUNCT____FUNCT__142,6514
-#define __FUNCT__ __FUNCT__143,6531
-PETSC_STATIC_INLINE PetscErrorCode NEP_KSPSolve(NEP nep,Vec b,Vec x)NEP_KSPSolve144,6564
-

-include/slepc/private/pepimpl.h,6888
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;NEP_SetUp30,1120
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;NEP_Solve30,1120
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;NEP_Refine30,1120
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;NEP_FunctionEval30,1120
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;NEP_JacobianEval30,1120
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;NEP_DerivativesEval30,1120
+typedef struct _NEPOps *NEPOps;NEPOps32,1234
+struct _NEPOps {_NEPOps34,1267
+  PetscErrorCode (*solve)(NEP);solve35,1284
+  PetscErrorCode (*setup)(NEP);setup36,1316
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,NEP);setfromoptions37,1348
+  PetscErrorCode (*publishoptions)(NEP);publishoptions38,1407
+  PetscErrorCode (*destroy)(NEP);destroy39,1448
+  PetscErrorCode (*reset)(NEP);reset40,1482
+  PetscErrorCode (*view)(NEP,PetscViewer);view41,1514
+  PetscErrorCode (*computevectors)(NEP);computevectors42,1557
+#define MAXNEPMONITORS MAXNEPMONITORS48,1670
+typedef enum { NEP_STATE_INITIAL,NEP_STATE_INITIAL50,1696
+               NEP_STATE_SETUP,NEP_STATE_SETUP51,1730
+               NEP_STATE_SOLVED,NEP_STATE_SOLVED52,1762
+               NEP_STATE_EIGENVECTORS } NEPStateType;NEP_STATE_EIGENVECTORS53,1795
+               NEP_STATE_EIGENVECTORS } NEPStateType;NEPStateType53,1795
+typedef enum { NEP_USER_INTERFACE_CALLBACK=1,NEP_USER_INTERFACE_CALLBACK61,2158
+               NEP_USER_INTERFACE_SPLIT,NEP_USER_INTERFACE_SPLIT62,2204
+               NEP_USER_INTERFACE_DERIVATIVES } NEPUserInterface;NEP_USER_INTERFACE_DERIVATIVES63,2245
+               NEP_USER_INTERFACE_DERIVATIVES } NEPUserInterface;NEPUserInterface63,2245
+struct _p_NEP {_p_NEP68,2353
+  PetscInt       max_it;           /* maximum number of iterations */max_it71,2476
+  PetscInt       nev;              /* number of eigenvalues to compute */nev72,2546
+  PetscInt       ncv;              /* number of basis vectors */ncv73,2620
+  PetscInt       mpd;              /* maximum dimension of projected problem */mpd74,2685
+  PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */nini75,2765
+  PetscScalar    target;           /* target value */target76,2864
+  PetscReal      tol;              /* tolerance */tol77,2918
+  NEPConv        conv;             /* convergence test */conv78,2969
+  NEPStop        stop;             /* stopping test */stop79,3027
+  NEPWhich       which;            /* which part of the spectrum to be sought */which80,3082
+  NEPRefine      refine;           /* type of refinement to be applied after solve */refine81,3163
+  PetscInt       npart;            /* number of partitions of the communicator */npart82,3249
+  PetscReal      rtol;             /* tolerance for refinement */rtol83,3331
+  PetscInt       rits;             /* number of iterations of the refinement method */rits84,3397
+  NEPRefineScheme scheme;          /* scheme for solving linear systems within refinement */scheme85,3484
+  PetscBool      trackall;         /* whether all the residuals must be computed */trackall86,3577
+  PetscErrorCode (*computefunction)(NEP,PetscScalar,Mat,Mat,void*);computefunction89,3738
+  PetscErrorCode (*computejacobian)(NEP,PetscScalar,Mat,void*);computejacobian90,3806
+  void           *functionctx;functionctx91,3870
+  void           *jacobianctx;jacobianctx92,3901
+  PetscErrorCode (*computederivatives)(NEP,PetscScalar,PetscInt,Mat,void*);computederivatives93,3932
+  void           *derivativesctx;derivativesctx94,4008
+  PetscErrorCode (*converged)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);converged95,4042
+  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy96,4129
+  PetscErrorCode (*stopping)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*);stopping97,4174
+  PetscErrorCode (*stoppingdestroy)(void*);stoppingdestroy98,4271
+  void           *convergedctx;convergedctx99,4315
+  void           *stoppingctx;stoppingctx100,4347
+  PetscErrorCode (*monitor[MAXNEPMONITORS])(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);monitor101,4378
+  PetscErrorCode (*monitordestroy[MAXNEPMONITORS])(void**);monitordestroy102,4498
+  void           *monitorcontext[MAXNEPMONITORS];monitorcontext103,4558
+  PetscInt       numbermonitors;numbermonitors104,4608
+  DS             ds;               /* direct solver object */ds107,4717
+  BV             V;                /* set of basis vectors and computed eigenvectors */V108,4779
+  RG             rg;               /* optional region for filtering */rg109,4867
+  SlepcSC        sc;               /* sorting criterion data */sc110,4938
+  Mat            function;         /* function matrix */function111,5002
+  Mat            function_pre;     /* function matrix (preconditioner) */function_pre112,5059
+  Mat            jacobian;         /* Jacobian matrix */jacobian113,5133
+  Mat            derivatives;      /* derivatives matrix */derivatives114,5190
+  Mat            *A;               /* matrix coefficients of split form */A115,5250
+  FN             *f;               /* matrix functions of split form */f116,5325
+  PetscInt       nt;               /* number of terms in split form */nt117,5397
+  MatStructure   mstr;             /* pattern of split matrices */mstr118,5468
+  Vec            *IS;              /* references to user-provided initial space */IS119,5535
+  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigr120,5618
+  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigi120,5618
+  PetscReal      *errest;          /* error estimates */errest121,5699
+  PetscInt       *perm;            /* permutation for eigenvalue ordering */perm122,5756
+  PetscInt       nwork;            /* number of work vectors */nwork123,5833
+  Vec            *work;            /* work vectors */work124,5897
+  KSP            refineksp;        /* ksp used in refinement */refineksp125,5951
+  PetscSubcomm   refinesubc;       /* context for sub-communicators */refinesubc126,6015
+  void           *data;            /* placeholder for solver-specific stuff */data127,6086
+  NEPStateType   state;            /* initial -> setup -> solved -> eigenvectors */state130,6241
+  PetscInt       nconv;            /* number of converged eigenvalues */nconv131,6325
+  PetscInt       its;              /* number of iterations so far computed */its132,6398
+  PetscInt       n,nloc;           /* problem dimensions (global, local) */n133,6476
+  PetscInt       n,nloc;           /* problem dimensions (global, local) */nloc133,6476
+  PetscReal      *nrma;            /* computed matrix norms */nrma134,6552
+  NEPUserInterface fui;            /* how the user has defined the nonlinear operator */fui135,6615
+  NEPConvergedReason reason;reason136,6704
+#define NEPCheckProblem(NEPCheckProblem144,6813
+#define NEPCheckCallback(NEPCheckCallback145,6860
+#define NEPCheckSplit(NEPCheckSplit146,6908
+#define NEPCheckDerivatives(NEPCheckDerivatives147,6953
+#define NEPCheckSolved(NEPCheckSolved148,7004
+#define NEPCheckProblem(NEPCheckProblem152,7058
+#define NEPCheckCallback(NEPCheckCallback157,7279
+#define NEPCheckSplit(NEPCheckSplit162,7549
+#define NEPCheckDerivatives(NEPCheckDerivatives167,7802
+#define NEPCheckSolved(NEPCheckSolved172,8089
+

+include/slepc/private/pepimpl.h,7129
 pepimpl.h:^?pepimpl.h^A,1
 #define _PEPIMPL_PEPIMPL23,947
 PETSC_EXTERN PetscBool PEPRegisterAllCalled;PEPRegisterAllCalled28,1025
@@ -1032,87 +1090,90 @@ typedef struct _PEPOps *PEPOps;PEPOps32,1180
 struct _PEPOps {_PEPOps34,1213
   PetscErrorCode (*solve)(PEP);solve35,1230
   PetscErrorCode (*setup)(PEP);setup36,1262
-  PetscErrorCode (*setfromoptions)(PetscOptions*,PEP);setfromoptions37,1294
-  PetscErrorCode (*publishoptions)(PEP);publishoptions38,1349
-  PetscErrorCode (*destroy)(PEP);destroy39,1390
-  PetscErrorCode (*reset)(PEP);reset40,1424
-  PetscErrorCode (*view)(PEP,PetscViewer);view41,1456
-  PetscErrorCode (*backtransform)(PEP);backtransform42,1499
-  PetscErrorCode (*computevectors)(PEP);computevectors43,1539
-  PetscErrorCode (*extractvectors)(PEP);extractvectors44,1580
-#define MAXPEPMONITORS MAXPEPMONITORS50,1693
-typedef enum { PEP_STATE_INITIAL,PEP_STATE_INITIAL52,1719
-               PEP_STATE_SETUP,PEP_STATE_SETUP53,1753
-               PEP_STATE_SOLVED,PEP_STATE_SOLVED54,1785
-               PEP_STATE_EIGENVECTORS } PEPStateType;PEP_STATE_EIGENVECTORS55,1818
-               PEP_STATE_EIGENVECTORS } PEPStateType;PEPStateType55,1818
-struct _p_PEP {_p_PEP60,1914
-  PetscInt       max_it;           /* maximum number of iterations */max_it63,2037
-  PetscInt       nev;              /* number of eigenvalues to compute */nev64,2107
-  PetscInt       ncv;              /* number of basis vectors */ncv65,2181
-  PetscInt       mpd;              /* maximum dimension of projected problem */mpd66,2246
-  PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */nini67,2326
-  PetscScalar    target;           /* target value */target68,2425
-  PetscReal      tol;              /* tolerance */tol69,2479
-  PEPConv        conv;             /* convergence test */conv70,2530
-  PEPWhich       which;            /* which part of the spectrum to be sought */which71,2588
-  PEPBasis       basis;            /* polynomial basis used to represent the problem */basis72,2669
-  PEPProblemType problem_type;     /* which kind of problem to be solved */problem_type73,2757
-  PEPScale       scale;            /* scaling strategy to be used */scale74,2833
-  PetscReal      sfactor,dsfactor; /* scaling factors */sfactor75,2902
-  PetscReal      sfactor,dsfactor; /* scaling factors */dsfactor75,2902
-  PetscInt       sits;             /* number of iterations of the scaling method */sits76,2959
-  PetscReal      slambda;          /* norm eigenvalue approximation for scaling */slambda77,3043
-  PEPRefine      refine;           /* type of refinement to be applied after solve */refine78,3126
-  PetscInt       npart;            /* number of partitions of the communicator */npart79,3212
-  PetscReal      rtol;             /* tolerance for refinement */rtol80,3294
-  PetscInt       rits;             /* number of iterations of the refinement method */rits81,3360
-  PetscBool      schur;            /* use Schur complement in refinement method */schur82,3447
-  PEPExtract     extract;          /* type of extraction used */extract83,3530
-  PetscBool      trackall;         /* whether all the residuals must be computed */trackall84,3595
-  PetscErrorCode (*converged)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);converged87,3756
-  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy88,3843
-  void           *convergedctx;convergedctx89,3888
-  PetscErrorCode (*monitor[MAXPEPMONITORS])(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);monitor90,3920
-  PetscErrorCode (*monitordestroy[MAXPEPMONITORS])(void**);monitordestroy91,4040
-  void           *monitorcontext[MAXPEPMONITORS];monitorcontext92,4100
-  PetscInt        numbermonitors;numbermonitors93,4150
-  ST             st;               /* spectral transformation object */st96,4260
-  DS             ds;               /* direct solver object */ds97,4332
-  BV             V;                /* set of basis vectors and computed eigenvectors */V98,4394
-  RG             rg;               /* optional region for filtering */rg99,4482
-  PetscRandom    rand;             /* random number generator */rand100,4553
-  SlepcSC        sc;               /* sorting criterion data */sc101,4618
-  Mat            *A;               /* coefficient matrices of the polynomial */A102,4682
-  PetscInt       nmat;             /* number of matrices */nmat103,4762
-  Vec            Dl,Dr;            /* diagonal matrices for balancing */Dl104,4822
-  Vec            Dl,Dr;            /* diagonal matrices for balancing */Dr104,4822
-  Vec            *IS;              /* references to user-provided initial space */IS105,4895
-  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigr106,4978
-  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigi106,4978
-  PetscReal      *errest;          /* error estimates */errest107,5059
-  PetscInt       *perm;            /* permutation for eigenvalue ordering */perm108,5116
-  PetscReal      *pbc;             /* coefficients defining the polynomial basis */pbc109,5193
-  PetscScalar    *solvematcoeffs;  /* coefficients to compute the matrix to be inverted */solvematcoeffs110,5277
-  PetscInt       nwork;            /* number of work vectors */nwork111,5368
-  Vec            *work;            /* work vectors */work112,5432
-  KSP            refineksp;        /* ksp used in refinement */refineksp113,5486
-  PetscSubcomm   refinesubc;       /* context for sub-communicators */refinesubc114,5550
-  void           *data;            /* placeholder for solver-specific stuff */data115,5621
-  PEPStateType   state;            /* initial -> setup -> solved -> eigenvectors */state118,5776
-  PetscInt       nconv;            /* number of converged eigenvalues */nconv119,5860
-  PetscInt       its;              /* number of iterations so far computed */its120,5933
-  PetscInt       n,nloc;           /* problem dimensions (global, local) */n121,6011
-  PetscInt       n,nloc;           /* problem dimensions (global, local) */nloc121,6011
-  PetscReal      *nrma;            /* computed matrix norms */nrma122,6087
-  PetscReal      nrml[2];          /* computed matrix norms for the linearization */nrml123,6150
-  PetscBool      sfactor_set;      /* flag to indicate the user gave sfactor */sfactor_set124,6235
-  PetscBool      lineariz;         /* current solver is based on linearization */lineariz125,6315
-  PEPConvergedReason reason;reason126,6397
-#define PEPCheckSolved(PEPCheckSolved134,6506
-#define PEPCheckSolved(PEPCheckSolved138,6560
-

-include/slepc/private/rgimpl.h,876
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,PEP);setfromoptions37,1294
+  PetscErrorCode (*publishoptions)(PEP);publishoptions38,1353
+  PetscErrorCode (*destroy)(PEP);destroy39,1394
+  PetscErrorCode (*reset)(PEP);reset40,1428
+  PetscErrorCode (*view)(PEP,PetscViewer);view41,1460
+  PetscErrorCode (*backtransform)(PEP);backtransform42,1503
+  PetscErrorCode (*computevectors)(PEP);computevectors43,1543
+  PetscErrorCode (*extractvectors)(PEP);extractvectors44,1584
+#define MAXPEPMONITORS MAXPEPMONITORS50,1697
+typedef enum { PEP_STATE_INITIAL,PEP_STATE_INITIAL52,1723
+               PEP_STATE_SETUP,PEP_STATE_SETUP53,1757
+               PEP_STATE_SOLVED,PEP_STATE_SOLVED54,1789
+               PEP_STATE_EIGENVECTORS } PEPStateType;PEP_STATE_EIGENVECTORS55,1822
+               PEP_STATE_EIGENVECTORS } PEPStateType;PEPStateType55,1822
+struct _p_PEP {_p_PEP60,1918
+  PetscInt       max_it;           /* maximum number of iterations */max_it63,2041
+  PetscInt       nev;              /* number of eigenvalues to compute */nev64,2111
+  PetscInt       ncv;              /* number of basis vectors */ncv65,2185
+  PetscInt       mpd;              /* maximum dimension of projected problem */mpd66,2250
+  PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */nini67,2330
+  PetscScalar    target;           /* target value */target68,2429
+  PetscReal      tol;              /* tolerance */tol69,2483
+  PEPConv        conv;             /* convergence test */conv70,2534
+  PEPStop        stop;             /* stopping test */stop71,2592
+  PEPWhich       which;            /* which part of the spectrum to be sought */which72,2647
+  PEPBasis       basis;            /* polynomial basis used to represent the problem */basis73,2728
+  PEPProblemType problem_type;     /* which kind of problem to be solved */problem_type74,2816
+  PEPScale       scale;            /* scaling strategy to be used */scale75,2892
+  PetscReal      sfactor,dsfactor; /* scaling factors */sfactor76,2961
+  PetscReal      sfactor,dsfactor; /* scaling factors */dsfactor76,2961
+  PetscInt       sits;             /* number of iterations of the scaling method */sits77,3018
+  PetscReal      slambda;          /* norm eigenvalue approximation for scaling */slambda78,3102
+  PEPRefine      refine;           /* type of refinement to be applied after solve */refine79,3185
+  PetscInt       npart;            /* number of partitions of the communicator */npart80,3271
+  PetscReal      rtol;             /* tolerance for refinement */rtol81,3353
+  PetscInt       rits;             /* number of iterations of the refinement method */rits82,3419
+  PEPRefineScheme scheme;          /* scheme for solving linear systems within refinement */scheme83,3506
+  PEPExtract     extract;          /* type of extraction used */extract84,3599
+  PetscBool      trackall;         /* whether all the residuals must be computed */trackall85,3664
+  PetscErrorCode (*converged)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);converged88,3825
+  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy89,3912
+  PetscErrorCode (*stopping)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*);stopping90,3957
+  PetscErrorCode (*stoppingdestroy)(void*);stoppingdestroy91,4054
+  void           *convergedctx;convergedctx92,4098
+  void           *stoppingctx;stoppingctx93,4130
+  PetscErrorCode (*monitor[MAXPEPMONITORS])(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);monitor94,4161
+  PetscErrorCode (*monitordestroy[MAXPEPMONITORS])(void**);monitordestroy95,4281
+  void           *monitorcontext[MAXPEPMONITORS];monitorcontext96,4341
+  PetscInt        numbermonitors;numbermonitors97,4391
+  ST             st;               /* spectral transformation object */st100,4501
+  DS             ds;               /* direct solver object */ds101,4573
+  BV             V;                /* set of basis vectors and computed eigenvectors */V102,4635
+  RG             rg;               /* optional region for filtering */rg103,4723
+  SlepcSC        sc;               /* sorting criterion data */sc104,4794
+  Mat            *A;               /* coefficient matrices of the polynomial */A105,4858
+  PetscInt       nmat;             /* number of matrices */nmat106,4938
+  Vec            Dl,Dr;            /* diagonal matrices for balancing */Dl107,4998
+  Vec            Dl,Dr;            /* diagonal matrices for balancing */Dr107,4998
+  Vec            *IS;              /* references to user-provided initial space */IS108,5071
+  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigr109,5154
+  PetscScalar    *eigr,*eigi;      /* real and imaginary parts of eigenvalues */eigi109,5154
+  PetscReal      *errest;          /* error estimates */errest110,5235
+  PetscInt       *perm;            /* permutation for eigenvalue ordering */perm111,5292
+  PetscReal      *pbc;             /* coefficients defining the polynomial basis */pbc112,5369
+  PetscScalar    *solvematcoeffs;  /* coefficients to compute the matrix to be inverted */solvematcoeffs113,5453
+  PetscInt       nwork;            /* number of work vectors */nwork114,5544
+  Vec            *work;            /* work vectors */work115,5608
+  KSP            refineksp;        /* ksp used in refinement */refineksp116,5662
+  PetscSubcomm   refinesubc;       /* context for sub-communicators */refinesubc117,5726
+  void           *data;            /* placeholder for solver-specific stuff */data118,5797
+  PEPStateType   state;            /* initial -> setup -> solved -> eigenvectors */state121,5952
+  PetscInt       nconv;            /* number of converged eigenvalues */nconv122,6036
+  PetscInt       its;              /* number of iterations so far computed */its123,6109
+  PetscInt       n,nloc;           /* problem dimensions (global, local) */n124,6187
+  PetscInt       n,nloc;           /* problem dimensions (global, local) */nloc124,6187
+  PetscReal      *nrma;            /* computed matrix norms */nrma125,6263
+  PetscReal      nrml[2];          /* computed matrix norms for the linearization */nrml126,6326
+  PetscBool      sfactor_set;      /* flag to indicate the user gave sfactor */sfactor_set127,6411
+  PetscBool      lineariz;         /* current solver is based on linearization */lineariz128,6491
+  PEPConvergedReason reason;reason129,6573
+#define PEPCheckSolved(PEPCheckSolved137,6682
+#define PEPCheckSolved(PEPCheckSolved141,6736
+

+include/slepc/private/rgimpl.h,971
 rgimpl.h:^?rgimpl.h^A,1
 #define _RGIMPL_RGIMPL23,946
 PETSC_EXTERN PetscBool RGRegisterAllCalled;RGRegisterAllCalled28,1022
@@ -1121,26 +1182,27 @@ struct _RGOps {_RGOps33,1147
   PetscErrorCode (*istrivial)(RG,PetscBool*);istrivial34,1163
   PetscErrorCode (*computecontour)(RG,PetscInt,PetscScalar*,PetscScalar*);computecontour35,1209
   PetscErrorCode (*checkinside)(RG,PetscReal,PetscReal,PetscInt*);checkinside36,1284
-  PetscErrorCode (*setfromoptions)(PetscOptions*,RG);setfromoptions37,1351
-  PetscErrorCode (*view)(RG,PetscViewer);view38,1405
-  PetscErrorCode (*destroy)(RG);destroy39,1447
-struct _p_RG {_p_RG42,1484
-  PetscBool   complement;    /* region is the complement of the specified one */complement44,1529
-  PetscReal   sfactor;       /* scaling factor */sfactor45,1610
-  void        *data;data46,1660
-#define RGShowReal(RGShowReal50,1729
-

-include/slepc/private/slepcimpl.h,368
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,RG);setfromoptions37,1351
+  PetscErrorCode (*view)(RG,PetscViewer);view38,1409
+  PetscErrorCode (*destroy)(RG);destroy39,1451
+struct _p_RG {_p_RG42,1488
+  PetscBool   complement;    /* region is the complement of the specified one */complement44,1533
+  PetscReal   sfactor;       /* scaling factor */sfactor45,1614
+  PetscReal   osfactor;      /* old scaling factor, before RGPushScale */osfactor46,1664
+  void        *data;data47,1738
+#define RGShowReal(RGShowReal51,1807
+

+include/slepc/private/slepcimpl.h,344
 slepcimpl.h:^?slepcimpl.h^A,1
 #define _SLEPCIMPL_SLEPCIMPL23,949
 PETSC_INTERN PetscBool SlepcBeganPetsc;SlepcBeganPetsc28,1029
 #define SlepcHeaderCreate(SlepcHeaderCreate51,1714
 struct _n_SlepcConvMonitor {_n_SlepcConvMonitor58,2132
-  PetscViewer viewer;viewer59,2161
-  PetscInt    oldnconv;oldnconv60,2183
-typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;SlepcConvMonitor62,2210
+  PetscViewer       viewer;viewer59,2161
+  PetscViewerFormat format;format60,2189
+  PetscInt          oldnconv;oldnconv61,2217
 

-include/slepc/private/stimpl.h,3649
+include/slepc/private/stimpl.h,3951
 stimpl.h:^?stimpl.h^A,1
 #define _STIMPL_STIMPL23,937
 PETSC_EXTERN PetscBool STRegisterAllCalled;STRegisterAllCalled28,1013
@@ -1159,35 +1221,39 @@ struct _STOps {_STOps34,1278
   PetscErrorCode (*getbilinearform)(ST,Mat*);getbilinearform37,1364
   PetscErrorCode (*applytrans)(ST,Vec,Vec);applytrans38,1410
   PetscErrorCode (*setshift)(ST,PetscScalar);setshift39,1454
-  PetscErrorCode (*setfromoptions)(PetscOptions*,ST);setfromoptions40,1500
-  PetscErrorCode (*postsolve)(ST);postsolve41,1554
-  PetscErrorCode (*backtransform)(ST,PetscInt,PetscScalar*,PetscScalar*);backtransform42,1589
-  PetscErrorCode (*destroy)(ST);destroy43,1663
-  PetscErrorCode (*reset)(ST);reset44,1696
-  PetscErrorCode (*view)(ST,PetscViewer);view45,1727
-  PetscErrorCode (*checknullspace)(ST,BV);checknullspace46,1769
-struct _p_ST {_p_ST49,1816
-  Mat              *A;               /* Matrices that define the eigensystem */A52,1936
-  PetscObjectState *Astate;          /* State (to identify the original matrices) */Astate53,2016
-  Mat              *T;               /* Matrices resulting from transformation */T54,2101
-  Mat              P;                /* Matrix from which preconditioner is built */P55,2183
-  PetscInt         nmat;             /* Number of matrices */nmat56,2268
-  PetscScalar      sigma;            /* Value of the shift */sigma57,2330
-  PetscBool        sigma_set;        /* whether the user provided the shift or not */sigma_set58,2392
-  PetscScalar      defsigma;         /* Default value of the shift */defsigma59,2478
-  STMatMode        shift_matrix;shift_matrix60,2548
-  MatStructure     str;              /* whether matrices have the same pattern or not */str61,2581
-  PetscBool        transform;        /* whether transformed matrices are computed */transform62,2670
-  KSP              ksp;ksp65,2825
-  Vec              w;w66,2849
-  Vec              D;                /* diagonal matrix for balancing */D67,2871
-  Vec              wb;               /* balancing requires an extra work vector */wb68,2944
-  void             *data;data69,3027
-  PetscInt         setupcalled;setupcalled70,3053
-#define STCheckMatrices(STCheckMatrices78,3164
-#define STCheckMatrices(STCheckMatrices82,3219
-

-include/slepc/private/svdimpl.h,4573
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,ST);setfromoptions40,1500
+  PetscErrorCode (*postsolve)(ST);postsolve41,1558
+  PetscErrorCode (*backtransform)(ST,PetscInt,PetscScalar*,PetscScalar*);backtransform42,1593
+  PetscErrorCode (*destroy)(ST);destroy43,1667
+  PetscErrorCode (*reset)(ST);reset44,1700
+  PetscErrorCode (*view)(ST,PetscViewer);view45,1731
+  PetscErrorCode (*checknullspace)(ST,BV);checknullspace46,1773
+typedef enum { ST_STATE_INITIAL,ST_STATE_INITIAL53,1983
+               ST_STATE_SETUP,ST_STATE_SETUP54,2016
+               ST_STATE_UPDATED } STStateType;ST_STATE_UPDATED55,2047
+               ST_STATE_UPDATED } STStateType;STStateType55,2047
+struct _p_ST {_p_ST57,2095
+  Mat              *A;               /* matrices that define the eigensystem */A60,2215
+  PetscObjectState *Astate;          /* state (to identify the original matrices) */Astate61,2295
+  Mat              *T;               /* matrices resulting from transformation */T62,2380
+  Mat              P;                /* matrix from which preconditioner is built */P63,2462
+  PetscInt         nmat;             /* number of matrices */nmat64,2547
+  PetscScalar      sigma;            /* value of the shift */sigma65,2609
+  PetscBool        sigma_set;        /* whether the user provided the shift or not */sigma_set66,2671
+  PetscScalar      defsigma;         /* default value of the shift */defsigma67,2757
+  STMatMode        shift_matrix;shift_matrix68,2827
+  MatStructure     str;              /* whether matrices have the same pattern or not */str69,2860
+  PetscBool        transform;        /* whether transformed matrices are computed */transform70,2949
+  KSP              ksp;ksp73,3104
+  Vec              w;w74,3128
+  Vec              D;                /* diagonal matrix for balancing */D75,3150
+  Vec              wb;               /* balancing requires an extra work vector */wb76,3223
+  void             *data;data77,3306
+  STStateType      state;            /* initial -> setup -> with updated matrices */state78,3332
+#define STCheckMatrices(STCheckMatrices86,3496
+#define STCheckMatrices(STCheckMatrices90,3551
+

+include/slepc/private/svdimpl.h,5140
 svdimpl.h:^?svdimpl.h^A,1
 #define _SVDIMPL_SVDIMPL23,947
 PETSC_EXTERN PetscBool SVDRegisterAllCalled;SVDRegisterAllCalled28,1025
@@ -1197,65 +1263,72 @@ typedef struct _SVDOps *SVDOps;SVDOps32,1169
 struct _SVDOps {_SVDOps34,1202
   PetscErrorCode (*solve)(SVD);solve35,1219
   PetscErrorCode (*setup)(SVD);setup36,1251
-  PetscErrorCode (*setfromoptions)(PetscOptions*,SVD);setfromoptions37,1283
-  PetscErrorCode (*publishoptions)(SVD);publishoptions38,1338
-  PetscErrorCode (*destroy)(SVD);destroy39,1379
-  PetscErrorCode (*reset)(SVD);reset40,1413
-  PetscErrorCode (*view)(SVD,PetscViewer);view41,1445
-#define MAXSVDMONITORS MAXSVDMONITORS47,1560
-typedef enum { SVD_STATE_INITIAL,SVD_STATE_INITIAL49,1586
-               SVD_STATE_SETUP,SVD_STATE_SETUP50,1620
-               SVD_STATE_SOLVED,SVD_STATE_SOLVED51,1652
-               SVD_STATE_VECTORS } SVDStateType;SVD_STATE_VECTORS52,1685
-               SVD_STATE_VECTORS } SVDStateType;SVDStateType52,1685
-struct _p_SVD {_p_SVD57,1776
-  Mat              OP;          /* problem matrix */OP60,1899
-  PetscInt         max_it;      /* max iterations */max_it61,1952
-  PetscInt         nsv;         /* number of requested values */nsv62,2005
-  PetscInt         ncv;         /* basis size */ncv63,2070
-  PetscInt         mpd;         /* maximum dimension of projected problem */mpd64,2119
-  PetscInt         nini,ninil;  /* number of initial vectors (negative means not copied yet) */nini65,2196
-  PetscInt         nini,ninil;  /* number of initial vectors (negative means not copied yet) */ninil65,2196
-  PetscReal        tol;         /* tolerance */tol66,2292
-  SVDWhich         which;       /* which singular values are computed */which67,2340
-  PetscBool        impltrans;   /* implicit transpose mode */impltrans68,2413
-  PetscBool        trackall;    /* whether all the residuals must be computed */trackall69,2475
-  PetscErrorCode   (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);monitor72,2633
-  PetscErrorCode   (*monitordestroy[MAXSVDMONITORS])(void**);monitordestroy73,2740
-  void             *monitorcontext[MAXSVDMONITORS];monitorcontext74,2802
-  PetscInt         numbermonitors;numbermonitors75,2854
-  DS               ds;          /* direct solver object */ds78,2965
-  BV               U,V;         /* left and right singular vectors */U79,3024
-  BV               U,V;         /* left and right singular vectors */V79,3024
-  PetscRandom      rand;        /* random number generator */rand80,3094
-  SlepcSC          sc;          /* sorting criterion data */sc81,3156
-  Mat              A;           /* problem matrix (m>n) */A82,3217
-  Mat              AT;          /* transposed matrix */AT83,3276
-  Vec              *IS,*ISL;    /* placeholder for references to user-provided initial space */IS84,3332
-  Vec              *IS,*ISL;    /* placeholder for references to user-provided initial space */ISL84,3332
-  PetscReal        *sigma;      /* singular values */sigma85,3428
-  PetscInt         *perm;       /* permutation for singular value ordering */perm86,3482
-  PetscReal        *errest;     /* error estimates */errest87,3560
-  void             *data;       /* placeholder for solver-specific stuff */data88,3614
-  SVDStateType     state;       /* initial -> setup -> solved -> vectors */state91,3767
-  PetscInt         nconv;       /* number of converged values */nconv92,3843
-  PetscInt         its;         /* iteration counter */its93,3908
-  PetscBool        leftbasis;   /* if U is filled by the solver */leftbasis94,3964
-  SVDConvergedReason reason;reason95,4031
-#define SVDCheckSolved(SVDCheckSolved103,4140
-#define SVDCheckSolved(SVDCheckSolved107,4194
-#undef __FUNCT____FUNCT__114,4411
-#define __FUNCT__ __FUNCT__115,4428
-PETSC_STATIC_INLINE PetscErrorCode SVDMatMult(SVD svd,PetscBool trans,Vec x,Vec y)SVDMatMult116,4459
-#undef __FUNCT____FUNCT__145,5157
-#define __FUNCT__ __FUNCT__146,5174
-PETSC_STATIC_INLINE PetscErrorCode SVDMatCreateVecs(SVD svd,Vec *x,Vec *y)SVDMatCreateVecs147,5211
-#undef __FUNCT____FUNCT__160,5499
-#define __FUNCT__ __FUNCT__161,5516
-PETSC_STATIC_INLINE PetscErrorCode SVDMatGetSize(SVD svd,PetscInt *m,PetscInt *n)SVDMatGetSize162,5550
-#undef __FUNCT____FUNCT__175,5839
-#define __FUNCT__ __FUNCT__176,5856
-PETSC_STATIC_INLINE PetscErrorCode SVDMatGetLocalSize(SVD svd,PetscInt *m,PetscInt *n)SVDMatGetLocalSize177,5895
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,SVD);setfromoptions37,1283
+  PetscErrorCode (*publishoptions)(SVD);publishoptions38,1342
+  PetscErrorCode (*destroy)(SVD);destroy39,1383
+  PetscErrorCode (*reset)(SVD);reset40,1417
+  PetscErrorCode (*view)(SVD,PetscViewer);view41,1449
+#define MAXSVDMONITORS MAXSVDMONITORS47,1564
+typedef enum { SVD_STATE_INITIAL,SVD_STATE_INITIAL49,1590
+               SVD_STATE_SETUP,SVD_STATE_SETUP50,1624
+               SVD_STATE_SOLVED,SVD_STATE_SOLVED51,1656
+               SVD_STATE_VECTORS } SVDStateType;SVD_STATE_VECTORS52,1689
+               SVD_STATE_VECTORS } SVDStateType;SVDStateType52,1689
+struct _p_SVD {_p_SVD57,1780
+  Mat            OP;               /* problem matrix */OP60,1903
+  PetscInt       max_it;           /* max iterations */max_it61,1959
+  PetscInt       nsv;              /* number of requested values */nsv62,2015
+  PetscInt       ncv;              /* basis size */ncv63,2083
+  PetscInt       mpd;              /* maximum dimension of projected problem */mpd64,2135
+  PetscInt       nini,ninil;       /* number of initial vecs (negative means not copied yet) */nini65,2215
+  PetscInt       nini,ninil;       /* number of initial vecs (negative means not copied yet) */ninil65,2215
+  PetscReal      tol;              /* tolerance */tol66,2311
+  SVDConv        conv;             /* convergence test */conv67,2362
+  SVDStop        stop;             /* stopping test */stop68,2420
+  SVDWhich       which;            /* which singular values are computed */which69,2475
+  PetscBool      impltrans;        /* implicit transpose mode */impltrans70,2551
+  PetscBool      trackall;         /* whether all the residuals must be computed */trackall71,2616
+  PetscErrorCode (*converged)(SVD,PetscReal,PetscReal,PetscReal*,void*);converged74,2777
+  PetscErrorCode (*convergeddestroy)(void*);convergeddestroy75,2850
+  PetscErrorCode (*stopping)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*);stopping76,2895
+  PetscErrorCode (*stoppingdestroy)(void*);stoppingdestroy77,2992
+  void           *convergedctx;convergedctx78,3036
+  void           *stoppingctx;stoppingctx79,3068
+  PetscErrorCode (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);monitor80,3099
+  PetscErrorCode (*monitordestroy[MAXSVDMONITORS])(void**);monitordestroy81,3204
+  void           *monitorcontext[MAXSVDMONITORS];monitorcontext82,3264
+  PetscInt       numbermonitors;numbermonitors83,3314
+  DS             ds;               /* direct solver object */ds86,3423
+  BV             U,V;              /* left and right singular vectors */U87,3485
+  BV             U,V;              /* left and right singular vectors */V87,3485
+  SlepcSC        sc;               /* sorting criterion data */sc88,3558
+  Mat            A;                /* problem matrix (m>n) */A89,3622
+  Mat            AT;               /* transposed matrix */AT90,3684
+  Vec            *IS,*ISL;         /* placeholder for references to user initial space */IS91,3743
+  Vec            *IS,*ISL;         /* placeholder for references to user initial space */ISL91,3743
+  PetscReal      *sigma;           /* singular values */sigma92,3833
+  PetscInt       *perm;            /* permutation for singular value ordering */perm93,3890
+  PetscReal      *errest;          /* error estimates */errest94,3971
+  void           *data;            /* placeholder for solver-specific stuff */data95,4028
+  SVDStateType   state;            /* initial -> setup -> solved -> vectors */state98,4184
+  PetscInt       nconv;            /* number of converged values */nconv99,4263
+  PetscInt       its;              /* iteration counter */its100,4331
+  PetscBool      leftbasis;        /* if U is filled by the solver */leftbasis101,4390
+  SVDConvergedReason reason;reason102,4460
+#define SVDCheckSolved(SVDCheckSolved110,4569
+#define SVDCheckSolved(SVDCheckSolved114,4623
+#undef __FUNCT____FUNCT__121,4840
+#define __FUNCT__ __FUNCT__122,4857
+PETSC_STATIC_INLINE PetscErrorCode SVDMatMult(SVD svd,PetscBool trans,Vec x,Vec y)SVDMatMult123,4888
+#undef __FUNCT____FUNCT__152,5586
+#define __FUNCT__ __FUNCT__153,5603
+PETSC_STATIC_INLINE PetscErrorCode SVDMatCreateVecs(SVD svd,Vec *x,Vec *y)SVDMatCreateVecs154,5640
+#undef __FUNCT____FUNCT__167,5928
+#define __FUNCT__ __FUNCT__168,5945
+PETSC_STATIC_INLINE PetscErrorCode SVDMatGetSize(SVD svd,PetscInt *m,PetscInt *n)SVDMatGetSize169,5979
+#undef __FUNCT____FUNCT__182,6268
+#define __FUNCT__ __FUNCT__183,6285
+PETSC_STATIC_INLINE PetscErrorCode SVDMatGetLocalSize(SVD svd,PetscInt *m,PetscInt *n)SVDMatGetLocalSize184,6324
 

 include/slepc/private/vecimplslepc.h,2135
 vecimplslepc.h:^?vecimplslepc.h^A,1
@@ -1300,7 +1373,7 @@ typedef struct VecPool_ {VecPool_119,4834
 } VecPool_;VecPool_126,5193
 typedef VecPool_* VecPool;VecPool127,5205
 

-include/slepcblaslapack.h,5983
+include/slepcblaslapack.h,6290
 slepcblaslapack.h:^?slepcblaslapack.h^A,1
 #define __SLEPCBLASLAPACK_H__SLEPCBLASLAPACK_H25,1034
 #define SLEPC_BLASLAPACKREAL(SLEPC_BLASLAPACKREAL31,1207
@@ -1333,107 +1406,114 @@ slepcblaslapack.h:^?slepcblaslapack.h^A,1
 #define LAPACKlaev2_ LAPACKlaev2_104,3307
 #define LAPACKgehrd_ LAPACKgehrd_105,3358
 #define LAPACKgelqf_ LAPACKgelqf_106,3409
-#define LAPACKtgexc_ LAPACKtgexc_107,3460
-#define LAPACKlarfg_ LAPACKlarfg_108,3511
-#define LAPACKlag2_ LAPACKlag2_109,3562
-#define LAPACKlasv2_ LAPACKlasv2_110,3615
-#define LAPACKlartg_ LAPACKlartg_111,3670
-#define LAPACKlaln2_ LAPACKlaln2_112,3725
-#define LAPACKlaed4_ LAPACKlaed4_113,3780
-#define LAPACKlamrg_ LAPACKlamrg_114,3835
-#define LAPACKlapy2_ LAPACKlapy2_115,3890
-#define LAPACKorghr_ LAPACKorghr_117,3977
-#define LAPACKorgqr_ LAPACKorgqr_118,4028
+#define LAPACKgeqp3_ LAPACKgeqp3_107,3460
+#define LAPACKtgexc_ LAPACKtgexc_108,3511
+#define LAPACKlarfg_ LAPACKlarfg_109,3562
+#define LAPACKlag2_ LAPACKlag2_110,3613
+#define LAPACKlasv2_ LAPACKlasv2_111,3666
+#define LAPACKlartg_ LAPACKlartg_112,3721
+#define LAPACKlaln2_ LAPACKlaln2_113,3776
+#define LAPACKlaed4_ LAPACKlaed4_114,3831
+#define LAPACKlamrg_ LAPACKlamrg_115,3886
+#define LAPACKlapy2_ LAPACKlapy2_116,3941
+#define LAPACKorghr_ LAPACKorghr_118,4028
 #define LAPACKorghr_ LAPACKorghr_120,4085
-#define LAPACKorgqr_ LAPACKorgqr_121,4136
-#define BLASrot_ BLASrot_126,4325
-#define BLASrot_ BLASrot_129,4413
-#define BLASrot_ BLASrot_131,4503
-#define BLASrot_ BLASrot_133,4558
-#define LAPACKlanhs_(LAPACKlanhs_141,4745
-#define LAPACKlange_(LAPACKlange_142,4831
-#define LAPACKggevx_(LAPACKggevx_143,4923
-#define LAPACKggev_(LAPACKggev_144,5165
-#define LAPACKpbtrf_(LAPACKpbtrf_145,5322
-#define LAPACKlarf_(LAPACKlarf_146,5414
-#define BLAStrmm_(BLAStrmm_147,5521
-#define LAPACKlacpy_(LAPACKlacpy_148,5644
-#define LAPACKlascl_(LAPACKlascl_149,5742
-#define LAPACKlansy_(LAPACKlansy_150,5858
-#define LAPACKlaset_(LAPACKlaset_151,5952
-#define LAPACKstevr_(LAPACKstevr_153,6152
-#define LAPACKbdsdc_(LAPACKbdsdc_154,6334
-#define LAPACKlamch_(LAPACKlamch_155,6480
-#define LAPACKlamc3_(LAPACKlamc3_156,6546
-#define LAPACKsyevr_(LAPACKsyevr_160,6689
-#define LAPACKsyevd_(LAPACKsyevd_161,6875
-#define LAPACKsygvd_(LAPACKsygvd_162,6999
-#define LAPACKormlq_(LAPACKormlq_163,7142
-#define LAPACKorgtr_(LAPACKorgtr_164,7278
-#define LAPACKsytrd_(LAPACKsytrd_165,7382
-#define LAPACKtrevc_(LAPACKtrevc_166,7498
-#define LAPACKgeevx_(LAPACKgeevx_167,7640
-#define LAPACKtrexc_(LAPACKtrexc_168,7840
-#define LAPACKgesdd_(LAPACKgesdd_169,7956
-#define LAPACKtgevc_(LAPACKtgevc_170,8096
-#define LAPACKhsein_(LAPACKhsein_171,8250
-#define LAPACKstedc_(LAPACKstedc_172,8424
-#define LAPACKsyevr_(LAPACKsyevr_175,8595
-#define LAPACKsyevd_(LAPACKsyevd_176,8793
-#define LAPACKsygvd_(LAPACKsygvd_177,8929
-#define LAPACKormlq_(LAPACKormlq_178,9083
-#define LAPACKorgtr_(LAPACKorgtr_179,9219
-#define LAPACKsytrd_(LAPACKsytrd_180,9323
-#define LAPACKtrevc_(LAPACKtrevc_181,9439
-#define LAPACKgeevx_(LAPACKgeevx_182,9587
-#define LAPACKtrexc_(LAPACKtrexc_183,9781
-#define LAPACKgesdd_(LAPACKgesdd_184,9891
-#define LAPACKtgevc_(LAPACKtgevc_185,10037
-#define LAPACKhsein_(LAPACKhsein_186,10197
-#define LAPACKstedc_(LAPACKstedc_187,10371
-#define LAPACKlanhs_(LAPACKlanhs_193,10588
-#define LAPACKlange_(LAPACKlange_194,10674
-#define LAPACKggevx_(LAPACKggevx_195,10766
-#define LAPACKggev_(LAPACKggev_196,11008
-#define LAPACKpbtrf_(LAPACKpbtrf_197,11165
-#define LAPACKlarf_(LAPACKlarf_198,11257
-#define BLAStrmm_(BLAStrmm_199,11364
-#define LAPACKlacpy_(LAPACKlacpy_200,11487
-#define LAPACKlascl_(LAPACKlascl_201,11585
-#define LAPACKlansy_(LAPACKlansy_202,11701
-#define LAPACKlaset_(LAPACKlaset_203,11795
-#define LAPACKstevr_(LAPACKstevr_205,11995
-#define LAPACKbdsdc_(LAPACKbdsdc_206,12177
-#define LAPACKlamch_(LAPACKlamch_207,12323
-#define LAPACKlamc3_(LAPACKlamc3_208,12389
-#define LAPACKsyevr_(LAPACKsyevr_212,12532
-#define LAPACKsyevd_(LAPACKsyevd_213,12718
-#define LAPACKsygvd_(LAPACKsygvd_214,12842
-#define LAPACKormlq_(LAPACKormlq_215,12985
-#define LAPACKorgtr_(LAPACKorgtr_216,13121
-#define LAPACKsytrd_(LAPACKsytrd_217,13225
-#define LAPACKtrevc_(LAPACKtrevc_218,13341
-#define LAPACKgeevx_(LAPACKgeevx_219,13483
-#define LAPACKtrexc_(LAPACKtrexc_220,13683
-#define LAPACKgesdd_(LAPACKgesdd_221,13799
-#define LAPACKtgevc_(LAPACKtgevc_222,13939
-#define LAPACKhsein_(LAPACKhsein_223,14093
-#define LAPACKstedc_(LAPACKstedc_224,14267
-#define LAPACKsyevr_(LAPACKsyevr_227,14438
-#define LAPACKsyevd_(LAPACKsyevd_228,14636
-#define LAPACKsygvd_(LAPACKsygvd_229,14772
-#define LAPACKormlq_(LAPACKormlq_230,14926
-#define LAPACKorgtr_(LAPACKorgtr_231,15062
-#define LAPACKsytrd_(LAPACKsytrd_232,15166
-#define LAPACKtrevc_(LAPACKtrevc_233,15282
-#define LAPACKgeevx_(LAPACKgeevx_234,15430
-#define LAPACKtrexc_(LAPACKtrexc_235,15624
-#define LAPACKgesdd_(LAPACKgesdd_236,15734
-#define LAPACKtgevc_(LAPACKtgevc_237,15880
-#define LAPACKhsein_(LAPACKhsein_238,16040
-#define LAPACKstedc_(LAPACKstedc_239,16214
-

-include/slepcbv.h,1376
+#define BLASrot_ BLASrot_125,4274
+#define BLASrot_ BLASrot_128,4362
+#define BLASrot_ BLASrot_130,4452
+#define BLASrot_ BLASrot_132,4507
+#define LAPACKlanhs_(LAPACKlanhs_140,4694
+#define LAPACKlange_(LAPACKlange_141,4780
+#define LAPACKggevx_(LAPACKggevx_142,4872
+#define LAPACKggev_(LAPACKggev_143,5114
+#define LAPACKpbtrf_(LAPACKpbtrf_144,5271
+#define LAPACKlarf_(LAPACKlarf_145,5363
+#define BLAStrmm_(BLAStrmm_146,5470
+#define LAPACKlacpy_(LAPACKlacpy_147,5593
+#define LAPACKlascl_(LAPACKlascl_148,5691
+#define LAPACKlansy_(LAPACKlansy_149,5807
+#define LAPACKlaset_(LAPACKlaset_150,5901
+#define LAPACKtrsyl_(LAPACKtrsyl_151,5999
+#define LAPACKtrtri_(LAPACKtrtri_152,6135
+#define LAPACKstevr_(LAPACKstevr_154,6331
+#define LAPACKbdsdc_(LAPACKbdsdc_155,6513
+#define LAPACKlamch_(LAPACKlamch_156,6659
+#define LAPACKlamc3_(LAPACKlamc3_157,6725
+#define LAPACKsyevr_(LAPACKsyevr_161,6868
+#define LAPACKsyevd_(LAPACKsyevd_162,7054
+#define LAPACKsygvd_(LAPACKsygvd_163,7178
+#define LAPACKormlq_(LAPACKormlq_164,7321
+#define LAPACKorgtr_(LAPACKorgtr_165,7457
+#define LAPACKsytrd_(LAPACKsytrd_166,7561
+#define LAPACKtrevc_(LAPACKtrevc_167,7677
+#define LAPACKgeevx_(LAPACKgeevx_168,7819
+#define LAPACKgees_(LAPACKgees_169,8019
+#define LAPACKtrexc_(LAPACKtrexc_170,8164
+#define LAPACKgesdd_(LAPACKgesdd_171,8280
+#define LAPACKtgevc_(LAPACKtgevc_172,8420
+#define LAPACKhsein_(LAPACKhsein_173,8574
+#define LAPACKstedc_(LAPACKstedc_174,8748
+#define LAPACKsyevr_(LAPACKsyevr_177,8919
+#define LAPACKsyevd_(LAPACKsyevd_178,9117
+#define LAPACKsygvd_(LAPACKsygvd_179,9253
+#define LAPACKormlq_(LAPACKormlq_180,9407
+#define LAPACKorgtr_(LAPACKorgtr_181,9543
+#define LAPACKsytrd_(LAPACKsytrd_182,9647
+#define LAPACKtrevc_(LAPACKtrevc_183,9763
+#define LAPACKgeevx_(LAPACKgeevx_184,9911
+#define LAPACKgees_(LAPACKgees_185,10105
+#define LAPACKtrexc_(LAPACKtrexc_186,10250
+#define LAPACKgesdd_(LAPACKgesdd_187,10360
+#define LAPACKtgevc_(LAPACKtgevc_188,10506
+#define LAPACKhsein_(LAPACKhsein_189,10666
+#define LAPACKstedc_(LAPACKstedc_190,10840
+#define LAPACKlanhs_(LAPACKlanhs_196,11057
+#define LAPACKlange_(LAPACKlange_197,11143
+#define LAPACKggevx_(LAPACKggevx_198,11235
+#define LAPACKggev_(LAPACKggev_199,11477
+#define LAPACKpbtrf_(LAPACKpbtrf_200,11634
+#define LAPACKlarf_(LAPACKlarf_201,11726
+#define BLAStrmm_(BLAStrmm_202,11833
+#define LAPACKlacpy_(LAPACKlacpy_203,11956
+#define LAPACKlascl_(LAPACKlascl_204,12054
+#define LAPACKlansy_(LAPACKlansy_205,12170
+#define LAPACKlaset_(LAPACKlaset_206,12264
+#define LAPACKtrsyl_(LAPACKtrsyl_207,12362
+#define LAPACKtrtri_(LAPACKtrtri_208,12498
+#define LAPACKstevr_(LAPACKstevr_210,12694
+#define LAPACKbdsdc_(LAPACKbdsdc_211,12876
+#define LAPACKlamch_(LAPACKlamch_212,13022
+#define LAPACKlamc3_(LAPACKlamc3_213,13088
+#define LAPACKsyevr_(LAPACKsyevr_217,13231
+#define LAPACKsyevd_(LAPACKsyevd_218,13417
+#define LAPACKsygvd_(LAPACKsygvd_219,13541
+#define LAPACKormlq_(LAPACKormlq_220,13684
+#define LAPACKorgtr_(LAPACKorgtr_221,13820
+#define LAPACKsytrd_(LAPACKsytrd_222,13924
+#define LAPACKtrevc_(LAPACKtrevc_223,14040
+#define LAPACKgeevx_(LAPACKgeevx_224,14182
+#define LAPACKgees_(LAPACKgees_225,14382
+#define LAPACKtrexc_(LAPACKtrexc_226,14527
+#define LAPACKgesdd_(LAPACKgesdd_227,14643
+#define LAPACKtgevc_(LAPACKtgevc_228,14783
+#define LAPACKhsein_(LAPACKhsein_229,14937
+#define LAPACKstedc_(LAPACKstedc_230,15111
+#define LAPACKsyevr_(LAPACKsyevr_233,15282
+#define LAPACKsyevd_(LAPACKsyevd_234,15480
+#define LAPACKsygvd_(LAPACKsygvd_235,15616
+#define LAPACKormlq_(LAPACKormlq_236,15770
+#define LAPACKorgtr_(LAPACKorgtr_237,15906
+#define LAPACKsytrd_(LAPACKsytrd_238,16010
+#define LAPACKtrevc_(LAPACKtrevc_239,16126
+#define LAPACKgeevx_(LAPACKgeevx_240,16274
+#define LAPACKgees_(LAPACKgees_241,16468
+#define LAPACKtrexc_(LAPACKtrexc_242,16613
+#define LAPACKgesdd_(LAPACKgesdd_243,16723
+#define LAPACKtgevc_(LAPACKtgevc_244,16869
+#define LAPACKhsein_(LAPACKhsein_245,17029
+#define LAPACKstedc_(LAPACKstedc_246,17203
+

+include/slepcbv.h,1657
 slepcbv.h:^?slepcbv.h^A,1
 #define __SLEPCBV_H__SLEPCBV_H23,950
 typedef struct _p_BV* BV;BV36,1228
@@ -1446,18 +1526,22 @@ PETSC_EXTERN PetscClassId BV_CLASSID;BV_CLASSID53,1592
 typedef enum { BV_ORTHOG_CGS,BV_ORTHOG_CGS63,1853
                BV_ORTHOG_MGS } BVOrthogType;BV_ORTHOG_MGS64,1883
                BV_ORTHOG_MGS } BVOrthogType;BVOrthogType64,1883
-typedef enum { BV_ORTHOG_REFINE_IFNEEDED,BV_ORTHOG_REFINE_IFNEEDED74,2152
-               BV_ORTHOG_REFINE_NEVER,BV_ORTHOG_REFINE_NEVER75,2194
-               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;BV_ORTHOG_REFINE_ALWAYS76,2233
-               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;BVOrthogRefineType76,2233
-typedef enum { BV_ORTHOG_BLOCK_GS,BV_ORTHOG_BLOCK_GS86,2540
-               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;BV_ORTHOG_BLOCK_CHOL87,2575
-               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;BVOrthogBlockType87,2575
-typedef enum { BV_MATMULT_VECS,BV_MATMULT_VECS100,3041
-               BV_MATMULT_MAT,BV_MATMULT_MAT101,3073
-               BV_MATMULT_MAT_SAVE } BVMatMultType;BV_MATMULT_MAT_SAVE102,3104
-               BV_MATMULT_MAT_SAVE } BVMatMultType;BVMatMultType102,3104
-PETSC_EXTERN PetscFunctionList BVList;BVList182,7955
+PETSC_EXTERN const char *BVOrthogTypes[];BVOrthogTypes65,1928
+typedef enum { BV_ORTHOG_REFINE_IFNEEDED,BV_ORTHOG_REFINE_IFNEEDED75,2194
+               BV_ORTHOG_REFINE_NEVER,BV_ORTHOG_REFINE_NEVER76,2236
+               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;BV_ORTHOG_REFINE_ALWAYS77,2275
+               BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;BVOrthogRefineType77,2275
+PETSC_EXTERN const char *BVOrthogRefineTypes[];BVOrthogRefineTypes78,2336
+typedef enum { BV_ORTHOG_BLOCK_GS,BV_ORTHOG_BLOCK_GS88,2630
+               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;BV_ORTHOG_BLOCK_CHOL89,2665
+               BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;BVOrthogBlockType89,2665
+PETSC_EXTERN const char *BVOrthogBlockTypes[];BVOrthogBlockTypes90,2722
+typedef enum { BV_MATMULT_VECS,BV_MATMULT_VECS103,3178
+               BV_MATMULT_MAT,BV_MATMULT_MAT104,3210
+               BV_MATMULT_MAT_SAVE } BVMatMultType;BV_MATMULT_MAT_SAVE105,3241
+               BV_MATMULT_MAT_SAVE } BVMatMultType;BVMatMultType105,3241
+PETSC_EXTERN const char *BVMatMultTypes[];BVMatMultTypes106,3293
+PETSC_EXTERN PetscFunctionList BVList;BVList189,8325
 

 include/slepcds.h,2029
 slepcds.h:^?slepcds.h^A,1
@@ -1505,9 +1589,9 @@ typedef enum { DS_MAT_A,DS_MAT_A104,3363
                DS_NUM_MAT } DSMatType;DSMatType126,3924
 PETSC_EXTERN DSMatType DSMatExtra[];DSMatExtra129,4010
 #define DS_NUM_EXTRA DS_NUM_EXTRA130,4047
-PETSC_EXTERN PetscFunctionList DSList;DSList189,7336
+PETSC_EXTERN PetscFunctionList DSList;DSList191,7520
 

-include/slepceps.h,7327
+include/slepceps.h,8267
 slepceps.h:^?slepceps.h^A,1
 #define __SLEPCEPS_H__SLEPCEPS_H25,1006
 typedef struct _p_EPS* EPS;EPS41,1311
@@ -1569,54 +1653,66 @@ typedef enum { EPS_ERROR_ABSOLUTE,EPS_ERROR_ABSOLUTE141,3849
                EPS_ERROR_BACKWARD } EPSErrorType;EPSErrorType143,3919
 PETSC_EXTERN const char *EPSErrorTypes[];EPSErrorTypes144,3969
 typedef enum { EPS_CONV_ABS,EPS_CONV_ABS153,4159
-               EPS_CONV_EIG,EPS_CONV_EIG154,4188
+               EPS_CONV_REL,EPS_CONV_REL154,4188
                EPS_CONV_NORM,EPS_CONV_NORM155,4217
                EPS_CONV_USER } EPSConv;EPS_CONV_USER156,4247
                EPS_CONV_USER } EPSConv;EPSConv156,4247
-PETSC_STATIC_INLINE PetscErrorCode EPSViewFromOptions(EPS eps,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)eps,obj,name);}EPSViewFromOptions175,5273
-PETSC_DEPRECATED("Use EPSErrorView()") PETSC_STATIC_INLINE PetscErrorCode EPSPrintSolution(EPS eps,PetscViewer v) {return EPSErrorView(eps,EPS_ERROR_RELATIVE,v);}EPSPrintSolution177,5506
-PETSC_DEPRECATED("Use EPSComputeError()") PETSC_STATIC_INLINE PetscErrorCode EPSComputeRelativeError(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_RELATIVE,r);}EPSComputeRelativeError215,8037
-PETSC_DEPRECATED("Use EPSComputeError() with EPS_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode EPSComputeResidualNorm(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_ABSOLUTE,r);}EPSComputeResidualNorm216,8225
-              EPS_CONVERGED_TOL                =  2,EPS_CONVERGED_TOL263,11187
-              EPS_DIVERGED_ITS                 = -3,EPS_DIVERGED_ITS265,11269
-              EPS_DIVERGED_BREAKDOWN           = -4,EPS_DIVERGED_BREAKDOWN266,11322
-              EPS_DIVERGED_SYMMETRY_LOST       = -5,EPS_DIVERGED_SYMMETRY_LOST267,11375
-              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;EPS_CONVERGED_ITERATING268,11428
-              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;EPSConvergedReason268,11428
-PETSC_EXTERN const char *const*EPSConvergedReasons;EPSConvergedReasons269,11501
-PETSC_EXTERN PetscFunctionList EPSList;EPSList273,11631
-typedef enum { EPS_POWER_SHIFT_CONSTANT,EPS_POWER_SHIFT_CONSTANT288,12110
-               EPS_POWER_SHIFT_RAYLEIGH,EPS_POWER_SHIFT_RAYLEIGH289,12151
-               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;EPS_POWER_SHIFT_WILKINSON290,12192
-               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;EPSPowerShiftType290,12192
-PETSC_EXTERN const char *EPSPowerShiftTypes[];EPSPowerShiftTypes291,12254
-typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,EPS_LANCZOS_REORTHOG_LOCAL323,13946
-               EPS_LANCZOS_REORTHOG_FULL,EPS_LANCZOS_REORTHOG_FULL324,13989
-               EPS_LANCZOS_REORTHOG_SELECTIVE,EPS_LANCZOS_REORTHOG_SELECTIVE325,14031
-               EPS_LANCZOS_REORTHOG_PERIODIC,EPS_LANCZOS_REORTHOG_PERIODIC326,14078
-               EPS_LANCZOS_REORTHOG_PARTIAL,EPS_LANCZOS_REORTHOG_PARTIAL327,14124
-               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;EPS_LANCZOS_REORTHOG_DELAYED328,14169
-               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;EPSLanczosReorthogType328,14169
-PETSC_EXTERN const char *EPSLanczosReorthogTypes[];EPSLanczosReorthogTypes329,14239
-typedef enum { EPS_PRIMME_DYNAMIC,EPS_PRIMME_DYNAMIC344,14740
-               EPS_PRIMME_DEFAULT_MIN_TIME,EPS_PRIMME_DEFAULT_MIN_TIME345,14775
-               EPS_PRIMME_DEFAULT_MIN_MATVECS,EPS_PRIMME_DEFAULT_MIN_MATVECS346,14819
-               EPS_PRIMME_ARNOLDI,EPS_PRIMME_ARNOLDI347,14866
-               EPS_PRIMME_GD,EPS_PRIMME_GD348,14901
-               EPS_PRIMME_GD_PLUSK,EPS_PRIMME_GD_PLUSK349,14931
-               EPS_PRIMME_GD_OLSEN_PLUSK,EPS_PRIMME_GD_OLSEN_PLUSK350,14967
-               EPS_PRIMME_JD_OLSEN_PLUSK,EPS_PRIMME_JD_OLSEN_PLUSK351,15009
-               EPS_PRIMME_RQI,EPS_PRIMME_RQI352,15051
-               EPS_PRIMME_JDQR,EPS_PRIMME_JDQR353,15082
-               EPS_PRIMME_JDQMR,EPS_PRIMME_JDQMR354,15114
-               EPS_PRIMME_JDQMR_ETOL,EPS_PRIMME_JDQMR_ETOL355,15147
-               EPS_PRIMME_SUBSPACE_ITERATION,EPS_PRIMME_SUBSPACE_ITERATION356,15185
-               EPS_PRIMME_LOBPCG_ORTHOBASIS,EPS_PRIMME_LOBPCG_ORTHOBASIS357,15231
-               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;EPS_PRIMME_LOBPCG_ORTHOBASISW358,15276
-               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;EPSPRIMMEMethod358,15276
-PETSC_EXTERN const char *EPSPRIMMEMethods[];EPSPRIMMEMethods359,15340
-

-include/slepcfn.h,753
+typedef enum { EPS_STOP_BASIC,EPS_STOP_BASIC165,4422
+               EPS_STOP_USER } EPSStop;EPS_STOP_USER166,4453
+               EPS_STOP_USER } EPSStop;EPSStop166,4453
+              EPS_CONVERGED_TOL                =  1,EPS_CONVERGED_TOL177,4719
+              EPS_CONVERGED_USER               =  2,EPS_CONVERGED_USER178,4772
+              EPS_DIVERGED_ITS                 = -1,EPS_DIVERGED_ITS180,4854
+              EPS_DIVERGED_BREAKDOWN           = -2,EPS_DIVERGED_BREAKDOWN181,4907
+              EPS_DIVERGED_SYMMETRY_LOST       = -3,EPS_DIVERGED_SYMMETRY_LOST182,4960
+              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;EPS_CONVERGED_ITERATING183,5013
+              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;EPSConvergedReason183,5013
+PETSC_EXTERN const char *const*EPSConvergedReasons;EPSConvergedReasons184,5086
+PETSC_STATIC_INLINE PetscErrorCode EPSViewFromOptions(EPS eps,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)eps,obj,name);}EPSViewFromOptions203,6124
+PETSC_DEPRECATED("Use EPSErrorView()") PETSC_STATIC_INLINE PetscErrorCode EPSPrintSolution(EPS eps,PetscViewer v) {return EPSErrorView(eps,EPS_ERROR_RELATIVE,v);}EPSPrintSolution205,6357
+PETSC_DEPRECATED("Use EPSComputeError()") PETSC_STATIC_INLINE PetscErrorCode EPSComputeRelativeError(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_RELATIVE,r);}EPSComputeRelativeError249,9369
+PETSC_DEPRECATED("Use EPSComputeError() with EPS_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode EPSComputeResidualNorm(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_ABSOLUTE,r);}EPSComputeResidualNorm250,9557
+PETSC_EXTERN PetscFunctionList EPSList;EPSList291,12869
+typedef enum { EPS_POWER_SHIFT_CONSTANT,EPS_POWER_SHIFT_CONSTANT306,13348
+               EPS_POWER_SHIFT_RAYLEIGH,EPS_POWER_SHIFT_RAYLEIGH307,13389
+               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;EPS_POWER_SHIFT_WILKINSON308,13430
+               EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;EPSPowerShiftType308,13430
+PETSC_EXTERN const char *EPSPowerShiftTypes[];EPSPowerShiftTypes309,13492
+typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,EPS_LANCZOS_REORTHOG_LOCAL343,15403
+               EPS_LANCZOS_REORTHOG_FULL,EPS_LANCZOS_REORTHOG_FULL344,15446
+               EPS_LANCZOS_REORTHOG_SELECTIVE,EPS_LANCZOS_REORTHOG_SELECTIVE345,15488
+               EPS_LANCZOS_REORTHOG_PERIODIC,EPS_LANCZOS_REORTHOG_PERIODIC346,15535
+               EPS_LANCZOS_REORTHOG_PARTIAL,EPS_LANCZOS_REORTHOG_PARTIAL347,15581
+               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;EPS_LANCZOS_REORTHOG_DELAYED348,15626
+               EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;EPSLanczosReorthogType348,15626
+PETSC_EXTERN const char *EPSLanczosReorthogTypes[];EPSLanczosReorthogTypes349,15696
+typedef enum { EPS_PRIMME_DYNAMIC,EPS_PRIMME_DYNAMIC364,16197
+               EPS_PRIMME_DEFAULT_MIN_TIME,EPS_PRIMME_DEFAULT_MIN_TIME365,16232
+               EPS_PRIMME_DEFAULT_MIN_MATVECS,EPS_PRIMME_DEFAULT_MIN_MATVECS366,16276
+               EPS_PRIMME_ARNOLDI,EPS_PRIMME_ARNOLDI367,16323
+               EPS_PRIMME_GD,EPS_PRIMME_GD368,16358
+               EPS_PRIMME_GD_PLUSK,EPS_PRIMME_GD_PLUSK369,16388
+               EPS_PRIMME_GD_OLSEN_PLUSK,EPS_PRIMME_GD_OLSEN_PLUSK370,16424
+               EPS_PRIMME_JD_OLSEN_PLUSK,EPS_PRIMME_JD_OLSEN_PLUSK371,16466
+               EPS_PRIMME_RQI,EPS_PRIMME_RQI372,16508
+               EPS_PRIMME_JDQR,EPS_PRIMME_JDQR373,16539
+               EPS_PRIMME_JDQMR,EPS_PRIMME_JDQMR374,16571
+               EPS_PRIMME_JDQMR_ETOL,EPS_PRIMME_JDQMR_ETOL375,16604
+               EPS_PRIMME_SUBSPACE_ITERATION,EPS_PRIMME_SUBSPACE_ITERATION376,16642
+               EPS_PRIMME_LOBPCG_ORTHOBASIS,EPS_PRIMME_LOBPCG_ORTHOBASIS377,16688
+               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;EPS_PRIMME_LOBPCG_ORTHOBASISW378,16733
+               EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;EPSPRIMMEMethod378,16733
+PETSC_EXTERN const char *EPSPRIMMEMethods[];EPSPRIMMEMethods379,16797
+typedef enum { EPS_CISS_QUADRULE_TRAPEZOIDAL=1,EPS_CISS_QUADRULE_TRAPEZOIDAL435,19734
+               EPS_CISS_QUADRULE_CHEBYSHEV } EPSCISSQuadRule;EPS_CISS_QUADRULE_CHEBYSHEV436,19782
+               EPS_CISS_QUADRULE_CHEBYSHEV } EPSCISSQuadRule;EPSCISSQuadRule436,19782
+PETSC_EXTERN const char *EPSCISSQuadRules[];EPSCISSQuadRules437,19844
+typedef enum { EPS_CISS_EXTRACTION_RITZ,EPS_CISS_EXTRACTION_RITZ446,20056
+               EPS_CISS_EXTRACTION_HANKEL } EPSCISSExtraction;EPS_CISS_EXTRACTION_HANKEL447,20097
+               EPS_CISS_EXTRACTION_HANKEL } EPSCISSExtraction;EPSCISSExtraction447,20097
+PETSC_EXTERN const char *EPSCISSExtractions[];EPSCISSExtractions448,20160
+

+include/slepcfn.h,790
 slepcfn.h:^?slepcfn.h^A,1
 #define __SLEPCFN_H__SLEPCFN_H23,950
 typedef struct _p_FN* FN;FN34,1146
@@ -1627,13 +1723,14 @@ typedef const char* FNType;FNType43,1291
 #define FNLOG FNLOG47,1403
 #define FNPHI FNPHI48,1428
 #define FNSQRT FNSQRT49,1453
-PETSC_EXTERN PetscClassId FN_CLASSID;FN_CLASSID52,1502
-typedef enum { FN_COMBINE_ADD,FN_COMBINE_ADD61,1666
-               FN_COMBINE_MULTIPLY,FN_COMBINE_MULTIPLY62,1697
-               FN_COMBINE_DIVIDE,FN_COMBINE_DIVIDE63,1733
-               FN_COMBINE_COMPOSE } FNCombineType;FN_COMBINE_COMPOSE64,1767
-               FN_COMBINE_COMPOSE } FNCombineType;FNCombineType64,1767
-PETSC_EXTERN PetscFunctionList FNList;FNList84,2736
+#define FNINVSQRT FNINVSQRT50,1479
+PETSC_EXTERN PetscClassId FN_CLASSID;FN_CLASSID53,1531
+typedef enum { FN_COMBINE_ADD,FN_COMBINE_ADD62,1695
+               FN_COMBINE_MULTIPLY,FN_COMBINE_MULTIPLY63,1726
+               FN_COMBINE_DIVIDE,FN_COMBINE_DIVIDE64,1762
+               FN_COMBINE_COMPOSE } FNCombineType;FN_COMBINE_COMPOSE65,1796
+               FN_COMBINE_COMPOSE } FNCombineType;FNCombineType65,1796
+PETSC_EXTERN PetscFunctionList FNList;FNList86,2831
 

 include/slepcmath.h,455
 slepcmath.h:^?slepcmath.h^A,1
@@ -1646,23 +1743,25 @@ PETSC_STATIC_INLINE PetscReal SlepcAbs(PetscReal x,PetscReal y)SlepcAbs58,1794
 #define SlepcAbsEigenvalue(SlepcAbsEigenvalue91,2609
 #define SlepcAbsEigenvalue(SlepcAbsEigenvalue93,2661
 

-include/slepcmfn.h,1000
+include/slepcmfn.h,1119
 slepcmfn.h:^?slepcmfn.h^A,1
 #define __SLEPCMFN_H__SLEPCMFN_H25,1008
 typedef struct _p_MFN* MFN;MFN38,1259
 typedef const char* MFNType;MFNType47,1425
 #define MFNKRYLOV MFNKRYLOV48,1454
-PETSC_EXTERN PetscClassId MFN_CLASSID;MFN_CLASSID51,1506
-PETSC_STATIC_INLINE PetscErrorCode MFNViewFromOptions(MFN mfn,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)mfn,obj,name);}MFNViewFromOptions64,2104
-              MFN_CONVERGED_TOL                =  2,MFN_CONVERGED_TOL102,3944
-              MFN_DIVERGED_ITS                 = -3,MFN_DIVERGED_ITS104,4026
-              MFN_DIVERGED_BREAKDOWN           = -4,MFN_DIVERGED_BREAKDOWN105,4079
-              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;MFN_CONVERGED_ITERATING106,4132
-              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;MFNConvergedReason106,4132
-PETSC_EXTERN const char *const*MFNConvergedReasons;MFNConvergedReasons107,4205
-PETSC_EXTERN PetscFunctionList MFNList;MFNList111,4336
-

-include/slepcnep.h,3315
+#define MFNEXPOKIT MFNEXPOKIT49,1483
+PETSC_EXTERN PetscClassId MFN_CLASSID;MFN_CLASSID52,1536
+PETSC_STATIC_INLINE PetscErrorCode MFNViewFromOptions(MFN mfn,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)mfn,obj,name);}MFNViewFromOptions65,2134
+              MFN_CONVERGED_TOL                =  2,MFN_CONVERGED_TOL105,4263
+              MFN_CONVERGED_ITS                =  3,MFN_CONVERGED_ITS106,4316
+              MFN_DIVERGED_ITS                 = -3,MFN_DIVERGED_ITS108,4398
+              MFN_DIVERGED_BREAKDOWN           = -4,MFN_DIVERGED_BREAKDOWN109,4451
+              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;MFN_CONVERGED_ITERATING110,4504
+              MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;MFNConvergedReason110,4504
+PETSC_EXTERN const char *const*MFNConvergedReasons;MFNConvergedReasons111,4577
+PETSC_EXTERN PetscFunctionList MFNList;MFNList115,4708
+

+include/slepcnep.h,4071
 slepcnep.h:^?slepcnep.h^A,1
 #define __SLEPCNEP_H__SLEPCNEP_H25,1012
 typedef struct _p_NEP* NEP;NEP40,1306
@@ -1672,43 +1771,57 @@ typedef const char* NEPType;NEPType49,1454
 #define NEPNARNOLDI NEPNARNOLDI52,1537
 #define NEPCISS NEPCISS53,1569
 #define NEPINTERPOL NEPINTERPOL54,1597
-PETSC_EXTERN PetscClassId NEP_CLASSID;NEP_CLASSID57,1652
-typedef enum { NEP_LARGEST_MAGNITUDE=1,NEP_LARGEST_MAGNITUDE66,1851
-               NEP_SMALLEST_MAGNITUDE,NEP_SMALLEST_MAGNITUDE67,1891
-               NEP_LARGEST_REAL,NEP_LARGEST_REAL68,1930
-               NEP_SMALLEST_REAL,NEP_SMALLEST_REAL69,1963
-               NEP_LARGEST_IMAGINARY,NEP_LARGEST_IMAGINARY70,1997
-               NEP_SMALLEST_IMAGINARY,NEP_SMALLEST_IMAGINARY71,2035
-               NEP_TARGET_MAGNITUDE,NEP_TARGET_MAGNITUDE72,2074
-               NEP_TARGET_REAL,NEP_TARGET_REAL73,2111
-               NEP_TARGET_IMAGINARY} NEPWhich;NEP_TARGET_IMAGINARY74,2143
-               NEP_TARGET_IMAGINARY} NEPWhich;NEPWhich74,2143
-typedef enum { NEP_ERROR_ABSOLUTE,NEP_ERROR_ABSOLUTE83,2333
-               NEP_ERROR_RELATIVE } NEPErrorType;NEP_ERROR_RELATIVE84,2368
-               NEP_ERROR_RELATIVE } NEPErrorType;NEPErrorType84,2368
-PETSC_EXTERN const char *NEPErrorTypes[];NEPErrorTypes85,2418
-typedef enum { NEP_REFINE_NONE,NEP_REFINE_NONE94,2556
-               NEP_REFINE_SIMPLE,NEP_REFINE_SIMPLE95,2588
-               NEP_REFINE_MULTIPLE } NEPRefine;NEP_REFINE_MULTIPLE96,2622
-               NEP_REFINE_MULTIPLE } NEPRefine;NEPRefine96,2622
-PETSC_EXTERN const char *NEPRefineTypes[];NEPRefineTypes97,2670
-              NEP_CONVERGED_FNORM_ABS          =  2,NEP_CONVERGED_FNORM_ABS108,2948
-              NEP_CONVERGED_FNORM_RELATIVE     =  3,NEP_CONVERGED_FNORM_RELATIVE109,3001
-              NEP_CONVERGED_SNORM_RELATIVE     =  4,NEP_CONVERGED_SNORM_RELATIVE110,3054
-              NEP_DIVERGED_LINEAR_SOLVE        = -1,NEP_DIVERGED_LINEAR_SOLVE112,3136
-              NEP_DIVERGED_FUNCTION_COUNT      = -2,NEP_DIVERGED_FUNCTION_COUNT113,3189
-              NEP_DIVERGED_MAX_IT              = -3,NEP_DIVERGED_MAX_IT114,3242
-              NEP_DIVERGED_BREAKDOWN           = -4,NEP_DIVERGED_BREAKDOWN115,3295
-              NEP_DIVERGED_FNORM_NAN           = -5,NEP_DIVERGED_FNORM_NAN116,3348
-              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;NEP_CONVERGED_ITERATING117,3401
-              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;NEPConvergedReason117,3401
-PETSC_EXTERN const char *const*NEPConvergedReasons;NEPConvergedReasons118,3474
-PETSC_STATIC_INLINE PetscErrorCode NEPViewFromOptions(NEP nep,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)nep,obj,name);}NEPViewFromOptions133,4185
-PETSC_DEPRECATED("Use NEPComputeError()") PETSC_STATIC_INLINE PetscErrorCode NEPComputeRelativeError(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_RELATIVE,r);}NEPComputeRelativeError174,7146
-PETSC_DEPRECATED("Use NEPComputeError() with NEP_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode NEPComputeResidualNorm(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_ABSOLUTE,r);}NEPComputeResidualNorm175,7334
-PETSC_EXTERN PetscFunctionList NEPList;NEPList209,9571
-

-include/slepcpep.h,5189
+#define NEPNLEIGS NEPNLEIGS55,1629
+PETSC_EXTERN PetscClassId NEP_CLASSID;NEP_CLASSID58,1682
+typedef enum { NEP_LARGEST_MAGNITUDE=1,NEP_LARGEST_MAGNITUDE67,1881
+               NEP_SMALLEST_MAGNITUDE,NEP_SMALLEST_MAGNITUDE68,1921
+               NEP_LARGEST_REAL,NEP_LARGEST_REAL69,1960
+               NEP_SMALLEST_REAL,NEP_SMALLEST_REAL70,1993
+               NEP_LARGEST_IMAGINARY,NEP_LARGEST_IMAGINARY71,2027
+               NEP_SMALLEST_IMAGINARY,NEP_SMALLEST_IMAGINARY72,2065
+               NEP_TARGET_MAGNITUDE,NEP_TARGET_MAGNITUDE73,2104
+               NEP_TARGET_REAL,NEP_TARGET_REAL74,2141
+               NEP_TARGET_IMAGINARY,NEP_TARGET_IMAGINARY75,2173
+               NEP_ALL,NEP_ALL76,2210
+               NEP_WHICH_USER } NEPWhich;NEP_WHICH_USER77,2234
+               NEP_WHICH_USER } NEPWhich;NEPWhich77,2234
+typedef enum { NEP_ERROR_ABSOLUTE,NEP_ERROR_ABSOLUTE86,2419
+               NEP_ERROR_RELATIVE,NEP_ERROR_RELATIVE87,2454
+               NEP_ERROR_BACKWARD } NEPErrorType;NEP_ERROR_BACKWARD88,2489
+               NEP_ERROR_BACKWARD } NEPErrorType;NEPErrorType88,2489
+PETSC_EXTERN const char *NEPErrorTypes[];NEPErrorTypes89,2539
+typedef enum { NEP_REFINE_NONE,NEP_REFINE_NONE98,2677
+               NEP_REFINE_SIMPLE,NEP_REFINE_SIMPLE99,2709
+               NEP_REFINE_MULTIPLE } NEPRefine;NEP_REFINE_MULTIPLE100,2743
+               NEP_REFINE_MULTIPLE } NEPRefine;NEPRefine100,2743
+PETSC_EXTERN const char *NEPRefineTypes[];NEPRefineTypes101,2791
+typedef enum { NEP_REFINE_SCHEME_SCHUR=1,NEP_REFINE_SCHEME_SCHUR110,2987
+               NEP_REFINE_SCHEME_MBE,NEP_REFINE_SCHEME_MBE111,3029
+               NEP_REFINE_SCHEME_EXPLICIT } NEPRefineScheme;NEP_REFINE_SCHEME_EXPLICIT112,3067
+               NEP_REFINE_SCHEME_EXPLICIT } NEPRefineScheme;NEPRefineScheme112,3067
+PETSC_EXTERN const char *NEPRefineSchemes[];NEPRefineSchemes113,3128
+typedef enum { NEP_CONV_ABS,NEP_CONV_ABS122,3321
+               NEP_CONV_REL,NEP_CONV_REL123,3350
+               NEP_CONV_NORM,NEP_CONV_NORM124,3379
+               NEP_CONV_USER } NEPConv;NEP_CONV_USER125,3409
+               NEP_CONV_USER } NEPConv;NEPConv125,3409
+typedef enum { NEP_STOP_BASIC,NEP_STOP_BASIC134,3584
+               NEP_STOP_USER } NEPStop;NEP_STOP_USER135,3615
+               NEP_STOP_USER } NEPStop;NEPStop135,3615
+              NEP_CONVERGED_TOL                =  1,NEP_CONVERGED_TOL146,3890
+              NEP_CONVERGED_USER               =  2,NEP_CONVERGED_USER147,3943
+              NEP_DIVERGED_ITS                 = -1,NEP_DIVERGED_ITS149,4025
+              NEP_DIVERGED_BREAKDOWN           = -2,NEP_DIVERGED_BREAKDOWN150,4078
+              NEP_DIVERGED_LINEAR_SOLVE        = -4,NEP_DIVERGED_LINEAR_SOLVE152,4186
+              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;NEP_CONVERGED_ITERATING153,4239
+              NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;NEPConvergedReason153,4239
+PETSC_EXTERN const char *const*NEPConvergedReasons;NEPConvergedReasons154,4312
+PETSC_STATIC_INLINE PetscErrorCode NEPViewFromOptions(NEP nep,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)nep,obj,name);}NEPViewFromOptions167,4926
+PETSC_DEPRECATED("Use NEPComputeError()") PETSC_STATIC_INLINE PetscErrorCode NEPComputeRelativeError(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_RELATIVE,r);}NEPComputeRelativeError215,8610
+PETSC_DEPRECATED("Use NEPComputeError() with NEP_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode NEPComputeResidualNorm(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_ABSOLUTE,r);}NEPComputeResidualNorm216,8798
+PETSC_EXTERN PetscFunctionList NEPList;NEPList254,11856
+

+include/slepcpep.h,5780
 slepcpep.h:^?slepcpep.h^A,1
 #define __SLEPCPEP_H__SLEPCPEP_H25,1013
 typedef struct _p_PEP* PEP;PEP38,1264
@@ -1753,35 +1866,43 @@ typedef enum { PEP_REFINE_NONE,PEP_REFINE_NONE123,3335
                PEP_REFINE_MULTIPLE } PEPRefine;PEP_REFINE_MULTIPLE125,3401
                PEP_REFINE_MULTIPLE } PEPRefine;PEPRefine125,3401
 PETSC_EXTERN const char *PEPRefineTypes[];PEPRefineTypes126,3449
-typedef enum { PEP_EXTRACT_NONE=1,PEP_EXTRACT_NONE135,3590
-               PEP_EXTRACT_NORM,PEP_EXTRACT_NORM136,3625
-               PEP_EXTRACT_RESIDUAL,PEP_EXTRACT_RESIDUAL137,3658
-               PEP_EXTRACT_STRUCTURED } PEPExtract;PEP_EXTRACT_STRUCTURED138,3695
-               PEP_EXTRACT_STRUCTURED } PEPExtract;PEPExtract138,3695
-PETSC_EXTERN const char *PEPExtractTypes[];PEPExtractTypes139,3747
-typedef enum { PEP_ERROR_ABSOLUTE,PEP_ERROR_ABSOLUTE148,3934
-               PEP_ERROR_RELATIVE,PEP_ERROR_RELATIVE149,3969
-               PEP_ERROR_BACKWARD } PEPErrorType;PEP_ERROR_BACKWARD150,4004
-               PEP_ERROR_BACKWARD } PEPErrorType;PEPErrorType150,4004
-PETSC_EXTERN const char *PEPErrorTypes[];PEPErrorTypes151,4054
-typedef enum { PEP_CONV_ABS,PEP_CONV_ABS160,4244
-               PEP_CONV_EIG,PEP_CONV_EIG161,4273
-               PEP_CONV_LINEAR,PEP_CONV_LINEAR162,4302
-               PEP_CONV_NORM,PEP_CONV_NORM163,4334
-               PEP_CONV_USER } PEPConv;PEP_CONV_USER164,4364
-               PEP_CONV_USER } PEPConv;PEPConv164,4364
-PETSC_STATIC_INLINE PetscErrorCode PEPViewFromOptions(PEP pep,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)pep,obj,name);}PEPViewFromOptions182,5292
-PETSC_DEPRECATED("Use PEPErrorView()") PETSC_STATIC_INLINE PetscErrorCode PEPPrintSolution(PEP pep,PetscViewer v) {return PEPErrorView(pep,PEP_ERROR_BACKWARD,v);}PEPPrintSolution184,5525
-PETSC_DEPRECATED("Use PEPComputeError()") PETSC_STATIC_INLINE PetscErrorCode PEPComputeRelativeError(PEP pep,PetscInt i,PetscReal *r) {return PEPComputeError(pep,i,PEP_ERROR_BACKWARD,r);}PEPComputeRelativeError225,8407
-PETSC_DEPRECATED("Use PEPComputeError() with PEP_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode PEPComputeResidualNorm(PEP pep,PetscInt i,PetscReal *r) {return PEPComputeError(pep,i,PEP_ERROR_ABSOLUTE,r);}PEPComputeResidualNorm226,8595
-              PEP_CONVERGED_TOL                =  2,PEP_CONVERGED_TOL262,10849
-              PEP_DIVERGED_ITS                 = -3,PEP_DIVERGED_ITS264,10931
-              PEP_DIVERGED_BREAKDOWN           = -4,PEP_DIVERGED_BREAKDOWN265,10984
-              PEP_DIVERGED_SYMMETRY_LOST       = -5,PEP_DIVERGED_SYMMETRY_LOST266,11037
-              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;PEP_CONVERGED_ITERATING267,11090
-              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;PEPConvergedReason267,11090
-PETSC_EXTERN const char *const*PEPConvergedReasons;PEPConvergedReasons268,11163
-PETSC_EXTERN PetscFunctionList PEPList;PEPList272,11294
+typedef enum { PEP_REFINE_SCHEME_SCHUR=1,PEP_REFINE_SCHEME_SCHUR135,3645
+               PEP_REFINE_SCHEME_MBE,PEP_REFINE_SCHEME_MBE136,3687
+               PEP_REFINE_SCHEME_EXPLICIT } PEPRefineScheme;PEP_REFINE_SCHEME_EXPLICIT137,3725
+               PEP_REFINE_SCHEME_EXPLICIT } PEPRefineScheme;PEPRefineScheme137,3725
+PETSC_EXTERN const char *PEPRefineSchemes[];PEPRefineSchemes138,3786
+typedef enum { PEP_EXTRACT_NONE=1,PEP_EXTRACT_NONE147,3929
+               PEP_EXTRACT_NORM,PEP_EXTRACT_NORM148,3964
+               PEP_EXTRACT_RESIDUAL,PEP_EXTRACT_RESIDUAL149,3997
+               PEP_EXTRACT_STRUCTURED } PEPExtract;PEP_EXTRACT_STRUCTURED150,4034
+               PEP_EXTRACT_STRUCTURED } PEPExtract;PEPExtract150,4034
+PETSC_EXTERN const char *PEPExtractTypes[];PEPExtractTypes151,4086
+typedef enum { PEP_ERROR_ABSOLUTE,PEP_ERROR_ABSOLUTE160,4273
+               PEP_ERROR_RELATIVE,PEP_ERROR_RELATIVE161,4308
+               PEP_ERROR_BACKWARD } PEPErrorType;PEP_ERROR_BACKWARD162,4343
+               PEP_ERROR_BACKWARD } PEPErrorType;PEPErrorType162,4343
+PETSC_EXTERN const char *PEPErrorTypes[];PEPErrorTypes163,4393
+typedef enum { PEP_CONV_ABS,PEP_CONV_ABS172,4583
+               PEP_CONV_REL,PEP_CONV_REL173,4612
+               PEP_CONV_NORM,PEP_CONV_NORM174,4641
+               PEP_CONV_USER } PEPConv;PEP_CONV_USER175,4671
+               PEP_CONV_USER } PEPConv;PEPConv175,4671
+typedef enum { PEP_STOP_BASIC,PEP_STOP_BASIC184,4846
+               PEP_STOP_USER } PEPStop;PEP_STOP_USER185,4877
+               PEP_STOP_USER } PEPStop;PEPStop185,4877
+              PEP_CONVERGED_TOL                =  1,PEP_CONVERGED_TOL196,5143
+              PEP_CONVERGED_USER               =  2,PEP_CONVERGED_USER197,5196
+              PEP_DIVERGED_ITS                 = -1,PEP_DIVERGED_ITS199,5278
+              PEP_DIVERGED_BREAKDOWN           = -2,PEP_DIVERGED_BREAKDOWN200,5331
+              PEP_DIVERGED_SYMMETRY_LOST       = -3,PEP_DIVERGED_SYMMETRY_LOST201,5384
+              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;PEP_CONVERGED_ITERATING202,5437
+              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;PEPConvergedReason202,5437
+PETSC_EXTERN const char *const*PEPConvergedReasons;PEPConvergedReasons203,5510
+PETSC_STATIC_INLINE PetscErrorCode PEPViewFromOptions(PEP pep,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)pep,obj,name);}PEPViewFromOptions221,6450
+PETSC_DEPRECATED("Use PEPErrorView()") PETSC_STATIC_INLINE PetscErrorCode PEPPrintSolution(PEP pep,PetscViewer v) {return PEPErrorView(pep,PEP_ERROR_BACKWARD,v);}PEPPrintSolution223,6683
+PETSC_DEPRECATED("Use PEPComputeError()") PETSC_STATIC_INLINE PetscErrorCode PEPComputeRelativeError(PEP pep,PetscInt i,PetscReal *r) {return PEPComputeError(pep,i,PEP_ERROR_BACKWARD,r);}PEPComputeRelativeError269,9963
+PETSC_DEPRECATED("Use PEPComputeError() with PEP_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode PEPComputeResidualNorm(PEP pep,PetscInt i,PetscReal *r) {return PEPComputeError(pep,i,PEP_ERROR_ABSOLUTE,r);}PEPComputeResidualNorm270,10151
+PETSC_EXTERN PetscFunctionList PEPList;PEPList300,12755
 

 include/slepcrg.h,337
 slepcrg.h:^?slepcrg.h^A,1
@@ -1792,7 +1913,7 @@ typedef const char* RGType;RGType36,1178
 #define RGELLIPSE RGELLIPSE39,1267
 #define RGRING RGRING40,1297
 PETSC_EXTERN PetscClassId RG_CLASSID;RG_CLASSID43,1347
-PETSC_EXTERN PetscFunctionList RGList;RGList63,2348
+PETSC_EXTERN PetscFunctionList RGList;RGList65,2447
 

 include/slepcrgtypes.h,86
 slepcrgtypes.h:^?slepcrgtypes.h^A,1
@@ -1827,7 +1948,7 @@ typedef enum { ST_MATMODE_COPY,ST_MATMODE_COPY114,4215
                ST_MATMODE_SHELL } STMatMode;STMatMode116,4282
 PETSC_EXTERN PetscFunctionList STList;STList122,4570
 

-include/slepcsvd.h,2262
+include/slepcsvd.h,2741
 slepcsvd.h:^?slepcsvd.h^A,1
 #define __SLEPCSVD_H__SLEPCSVD_H25,1006
 typedef struct _p_SVD* SVD;SVD40,1292
@@ -1845,23 +1966,32 @@ typedef enum { SVD_ERROR_ABSOLUTE,SVD_ERROR_ABSOLUTE77,2112
                SVD_ERROR_RELATIVE } SVDErrorType;SVD_ERROR_RELATIVE78,2147
                SVD_ERROR_RELATIVE } SVDErrorType;SVDErrorType78,2147
 PETSC_EXTERN const char *SVDErrorTypes[];SVDErrorTypes79,2197
-              SVD_CONVERGED_TOL                =  2,SVD_CONVERGED_TOL90,2473
-              SVD_DIVERGED_ITS                 = -3,SVD_DIVERGED_ITS92,2555
-              SVD_DIVERGED_BREAKDOWN           = -4,SVD_DIVERGED_BREAKDOWN93,2608
-              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;SVD_CONVERGED_ITERATING94,2661
-              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;SVDConvergedReason94,2661
-PETSC_EXTERN const char *const*SVDConvergedReasons;SVDConvergedReasons95,2735
-PETSC_DEPRECATED("Use SVDComputeError()") PETSC_STATIC_INLINE PetscErrorCode SVDComputeRelativeError(SVD svd,PetscInt i,PetscReal *r) {return SVDComputeError(svd,i,SVD_ERROR_RELATIVE,r);}SVDComputeRelativeError127,4678
-PETSC_DEPRECATED("Use SVDComputeError() with SVD_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode SVDComputeResidualNorms(SVD svd,PetscInt i,PetscReal *r1,PetscReal *r2) {return SVDComputeError(svd,i,SVD_ERROR_ABSOLUTE,r1);}SVDComputeResidualNorms128,4866
-PETSC_STATIC_INLINE PetscErrorCode SVDViewFromOptions(SVD svd,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)svd,obj,name);}SVDViewFromOptions130,5148
-PETSC_DEPRECATED("Use SVDErrorView()") PETSC_STATIC_INLINE PetscErrorCode SVDPrintSolution(SVD svd,PetscViewer v) {return SVDErrorView(svd,SVD_ERROR_RELATIVE,v);}SVDPrintSolution132,5381
-PETSC_EXTERN PetscFunctionList SVDList;SVDList170,7693
-

-include/slepcsys.h,171
+typedef enum { SVD_CONV_ABS,SVD_CONV_ABS88,2387
+               SVD_CONV_REL,SVD_CONV_REL89,2416
+               SVD_CONV_USER } SVDConv;SVD_CONV_USER90,2445
+               SVD_CONV_USER } SVDConv;SVDConv90,2445
+typedef enum { SVD_STOP_BASIC,SVD_STOP_BASIC99,2620
+               SVD_STOP_USER } SVDStop;SVD_STOP_USER100,2651
+               SVD_STOP_USER } SVDStop;SVDStop100,2651
+              SVD_CONVERGED_TOL                =  1,SVD_CONVERGED_TOL111,2925
+              SVD_CONVERGED_USER               =  2,SVD_CONVERGED_USER112,2978
+              SVD_DIVERGED_ITS                 = -1,SVD_DIVERGED_ITS114,3060
+              SVD_DIVERGED_BREAKDOWN           = -2,SVD_DIVERGED_BREAKDOWN115,3113
+              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;SVD_CONVERGED_ITERATING116,3166
+              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;SVDConvergedReason116,3166
+PETSC_EXTERN const char *const*SVDConvergedReasons;SVDConvergedReasons117,3240
+PETSC_DEPRECATED("Use SVDComputeError()") PETSC_STATIC_INLINE PetscErrorCode SVDComputeRelativeError(SVD svd,PetscInt i,PetscReal *r) {return SVDComputeError(svd,i,SVD_ERROR_RELATIVE,r);}SVDComputeRelativeError158,6068
+PETSC_DEPRECATED("Use SVDComputeError() with SVD_ERROR_ABSOLUTE") PETSC_STATIC_INLINE PetscErrorCode SVDComputeResidualNorms(SVD svd,PetscInt i,PetscReal *r1,PetscReal *r2) {return SVDComputeError(svd,i,SVD_ERROR_ABSOLUTE,r1);}SVDComputeResidualNorms159,6256
+PETSC_STATIC_INLINE PetscErrorCode SVDViewFromOptions(SVD svd,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)svd,obj,name);}SVDViewFromOptions161,6538
+PETSC_DEPRECATED("Use SVDErrorView()") PETSC_STATIC_INLINE PetscErrorCode SVDPrintSolution(SVD svd,PetscViewer v) {return SVDErrorView(svd,SVD_ERROR_RELATIVE,v);}SVDPrintSolution163,6771
+PETSC_EXTERN PetscFunctionList SVDList;SVDList204,9628
+

+include/slepcsys.h,250
 slepcsys.h:^?slepcsys.h^A,1
 #define __SLEPCSYS_H__SLEPCSYS_H26,1067
 #define SLEPC_AUTHOR_INFO SLEPC_AUTHOR_INFO38,1415
-PETSC_EXTERN PetscBool SlepcInitializeCalled;SlepcInitializeCalled71,2796
+typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;SlepcConvMonitor57,1910
+PETSC_EXTERN PetscBool SlepcInitializeCalled;SlepcInitializeCalled78,3111
 

 include/slepcvec.h,75
 slepcvec.h:^?slepcvec.h^A,1
@@ -1877,14 +2007,14 @@ slepcversion.h:^?slepcversion.h^A,1
 #define SLEPC_VERSION_SUBMINOR SLEPC_VERSION_SUBMINOR7,162
 #define SLEPC_VERSION_PATCH SLEPC_VERSION_PATCH8,197
 #define SLEPC_RELEASE_DATE SLEPC_RELEASE_DATE9,232
-#define SLEPC_VERSION_DATE SLEPC_VERSION_DATE10,281
-#define SLEPC_VERSION_GIT SLEPC_VERSION_GIT13,358
-#define SLEPC_VERSION_DATE_GIT SLEPC_VERSION_DATE_GIT17,446
-#define SLEPC_VERSION_(SLEPC_VERSION_20,497
-#define SLEPC_VERSION_LT(SLEPC_VERSION_LT26,716
-#define SLEPC_VERSION_LE(SLEPC_VERSION_LE34,1115
-#define SLEPC_VERSION_GT(SLEPC_VERSION_GT38,1253
-#define SLEPC_VERSION_GE(SLEPC_VERSION_GE41,1351
+#define SLEPC_VERSION_DATE SLEPC_VERSION_DATE10,280
+#define SLEPC_VERSION_GIT SLEPC_VERSION_GIT13,357
+#define SLEPC_VERSION_DATE_GIT SLEPC_VERSION_DATE_GIT17,445
+#define SLEPC_VERSION_(SLEPC_VERSION_20,496
+#define SLEPC_VERSION_LT(SLEPC_VERSION_LT26,715
+#define SLEPC_VERSION_LE(SLEPC_VERSION_LE34,1114
+#define SLEPC_VERSION_GT(SLEPC_VERSION_GT38,1252
+#define SLEPC_VERSION_GE(SLEPC_VERSION_GE41,1350
 

 makefile,179
 makefile:^?makefile^A,1
@@ -1977,12 +2107,12 @@ static char help[] = "Solves the same problem as in ex5, but with a user-defined
 #undef __FUNCT____FUNCT__37,1557
 #define __FUNCT__ __FUNCT__38,1574
 int main(int argc,char **argv)main39,1599
-#undef __FUNCT____FUNCT__138,5321
-#define __FUNCT__ __FUNCT__139,5338
-PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel159,6494
-#undef __FUNCT____FUNCT__204,7879
-#define __FUNCT__ __FUNCT__205,7896
-PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort214,8237
+#undef __FUNCT____FUNCT__138,5334
+#define __FUNCT__ __FUNCT__139,5351
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel159,6507
+#undef __FUNCT____FUNCT__204,7892
+#define __FUNCT__ __FUNCT__205,7909
+PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort214,8250
 

 src/eps/examples/tests/test12.c,359
 test12.c:^?test12.c^A,1
@@ -2014,27 +2144,27 @@ int main(int argc,char **argv)main28,1048
 src/eps/examples/tests/test14f.F,784
 test14f.F:^?test14f.F^A,1
       program mainmain24,1075
- 100  format (/'Diagonal Eigenproblem, n =',I3,' (Fortran)')10066,2419
- 110  format (' Type set to ',A)11094,3493
- 120  format (' Problem type before changing = ',I2)120100,3639
- 130  format (' ... changed to ',I2)130106,3851
- 140  format (' Extraction before changing = ',I2)140124,4363
- 150  format (' ... changed to ',I2)150130,4574
- 160  format (' Balance: ',I2,', its=',I2,', cutoff=',F8.6)160140,4844
- 170  format (' Which = ',I2,', target = ',F3.1)170150,5200
- 180  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)180159,5517
- 190  format (' Tolerance =',F7.5,', max_its =',I4)190168,5776
- 200  format (' Convergence test =',I2)200175,5999
- 210  format (' Finished - converged reason =',I2,', its=',I4)210198,6808
+ 100  format (/'Diagonal Eigenproblem, n =',I3,' (Fortran)')10069,2518
+ 110  format (' Type set to ',A)11097,3592
+ 120  format (' Problem type before changing = ',I2)120103,3738
+ 130  format (' ... changed to ',I2)130109,3950
+ 140  format (' Extraction before changing = ',I2)140127,4462
+ 150  format (' ... changed to ',I2)150133,4673
+ 160  format (' Balance: ',I2,', its=',I2,', cutoff=',F8.6)160143,4943
+ 170  format (' Which = ',I2,', target = ',F3.1)170153,5299
+ 180  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)180162,5616
+ 190  format (' Tolerance =',F7.5,', max_its =',I4)190171,5875
+ 200  format (' Convergence test =',I2)200178,6098
+ 210  format (' Finished - converged reason =',I2,', its=',I4)210207,7303
 

 src/eps/examples/tests/test15f.F,368
 test15f.F:^?test15f.F^A,1
-      program mainmain30,1287
- 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10076,2615
- 120  format (' Solution method: ',A)120155,5211
- 130  format (' Number of requested eigenvalues:',I2)130161,5441
-      subroutine MyEPSMonitor(MyEPSMonitor189,6402
- 140  format(i3,' EPS nconv=',i2,' first unconverged value (error) ',   &140214,7137
+      program mainmain30,1292
+ 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10077,2673
+ 120  format (' Solution method: ',A)120156,5291
+ 130  format (' Number of requested eigenvalues:',I2)130162,5521
+      subroutine MyEPSMonitor(MyEPSMonitor190,6482
+ 140  format(i3,' EPS nconv=',i2,' first unconverged value (error) ',   &140215,7217
 

 src/eps/examples/tests/test16.c,415
 test16.c:^?test16.c^A,1
@@ -2083,10 +2213,10 @@ int main(int argc,char **argv)main31,1221
 

 src/eps/examples/tests/test7f.F,228
 test7f.F:^?test7f.F^A,1
-      program mainmain30,1314
- 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10071,2513
- 120  format (' Solution method: ',A)120142,4805
- 130  format (' Number of requested eigenvalues:',I2)130148,5035
+      program mainmain30,1319
+ 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10072,2571
+ 120  format (' Solution method: ',A)120143,4863
+ 130  format (' Number of requested eigenvalues:',I2)130149,5093
 

 src/eps/examples/tests/test8.c,622
 test8.c:^?test8.c^A,1
@@ -2094,13 +2224,13 @@ static char help[] = "Solves the same eigenproblem as in example ex2, but using
 #undef __FUNCT____FUNCT__36,1446
 #define __FUNCT__ __FUNCT__37,1463
 int main(int argc,char **argv)main38,1488
-static void tv(int nx,const PetscScalar *x,PetscScalar *y)tv117,4665
-#undef __FUNCT____FUNCT__132,4946
-#define __FUNCT__ __FUNCT__133,4963
-PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)MatMult_Laplacian2D150,5483
-#undef __FUNCT____FUNCT__182,6280
-#define __FUNCT__ __FUNCT__183,6297
-PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)MatGetDiagonal_Laplacian2D184,6344
+static void tv(int nx,const PetscScalar *x,PetscScalar *y)tv117,4673
+#undef __FUNCT____FUNCT__132,4954
+#define __FUNCT__ __FUNCT__133,4971
+PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)MatMult_Laplacian2D150,5491
+#undef __FUNCT____FUNCT__182,6288
+#define __FUNCT__ __FUNCT__183,6305
+PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)MatGetDiagonal_Laplacian2D184,6352
 

 src/eps/examples/tests/test9.c,592
 test9.c:^?test9.c^A,1
@@ -2108,12 +2238,12 @@ static char help[] = "Eigenvalue problem associated with a Markov model of a ran
 #undef __FUNCT____FUNCT__36,1559
 #define __FUNCT__ __FUNCT__37,1576
 int main(int argc,char **argv)main38,1601
-#undef __FUNCT____FUNCT__130,4984
-#define __FUNCT__ __FUNCT__131,5001
-PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel151,6157
-#undef __FUNCT____FUNCT__196,7542
-#define __FUNCT__ __FUNCT__197,7559
-PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort205,7874
+#undef __FUNCT____FUNCT__130,4992
+#define __FUNCT__ __FUNCT__131,5009
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel151,6165
+#undef __FUNCT____FUNCT__196,7550
+#define __FUNCT__ __FUNCT__197,7567
+PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort205,7882
 

 src/eps/examples/tutorials/ex1.c,243
 ex1.c:^?ex1.c^A,1
@@ -2130,21 +2260,21 @@ static char help[] = "Illustrates the use of shell spectral transformations. "h
 #undef __FUNCT____FUNCT__42,1699
 #define __FUNCT__ __FUNCT__43,1716
 int main (int argc,char **argv)main44,1741
-#undef __FUNCT____FUNCT__167,6850
-#define __FUNCT__ __FUNCT__168,6867
-PetscErrorCode STCreate_User(SampleShellST **shell)STCreate_User176,7076
-#undef __FUNCT____FUNCT__189,7506
-#define __FUNCT__ __FUNCT__190,7523
-PetscErrorCode STSetUp_User(SampleShellST *shell,ST st)STSetUp_User208,8150
-#undef __FUNCT____FUNCT__220,8538
-#define __FUNCT__ __FUNCT__221,8555
-PetscErrorCode STApply_User(ST st,Vec x,Vec y)STApply_User238,9011
-#undef __FUNCT____FUNCT__249,9347
-#define __FUNCT__ __FUNCT__250,9364
-PetscErrorCode STBackTransform_User(ST st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)STBackTransform_User269,10007
-#undef __FUNCT____FUNCT__280,10297
-#define __FUNCT__ __FUNCT__281,10314
-PetscErrorCode STDestroy_User(SampleShellST *shell)STDestroy_User289,10525
+#undef __FUNCT____FUNCT__167,6864
+#define __FUNCT__ __FUNCT__168,6881
+PetscErrorCode STCreate_User(SampleShellST **shell)STCreate_User176,7090
+#undef __FUNCT____FUNCT__189,7520
+#define __FUNCT__ __FUNCT__190,7537
+PetscErrorCode STSetUp_User(SampleShellST *shell,ST st)STSetUp_User208,8164
+#undef __FUNCT____FUNCT__220,8552
+#define __FUNCT__ __FUNCT__221,8569
+PetscErrorCode STApply_User(ST st,Vec x,Vec y)STApply_User238,9025
+#undef __FUNCT____FUNCT__249,9361
+#define __FUNCT__ __FUNCT__250,9378
+PetscErrorCode STBackTransform_User(ST st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)STBackTransform_User269,10021
+#undef __FUNCT____FUNCT__280,10311
+#define __FUNCT__ __FUNCT__281,10328
+PetscErrorCode STDestroy_User(SampleShellST *shell)STDestroy_User289,10539
 

 src/eps/examples/tutorials/ex11.c,226
 ex11.c:^?ex11.c^A,1
@@ -2173,12 +2303,12 @@ static char help[] = "Solves the same problem as in ex5, but with a user-defined
 #undef __FUNCT____FUNCT__37,1557
 #define __FUNCT__ __FUNCT__38,1574
 int main(int argc,char **argv)main39,1599
-#undef __FUNCT____FUNCT__141,5536
-#define __FUNCT__ __FUNCT__142,5553
-PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel162,6709
-#undef __FUNCT____FUNCT__207,8094
-#define __FUNCT__ __FUNCT__208,8111
-PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort217,8452
+#undef __FUNCT____FUNCT__131,5198
+#define __FUNCT__ __FUNCT__132,5215
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel152,6371
+#undef __FUNCT____FUNCT__197,7756
+#define __FUNCT__ __FUNCT__198,7773
+PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort207,8114
 

 src/eps/examples/tutorials/ex19.c,569
 ex19.c:^?ex19.c^A,1
@@ -2195,23 +2325,23 @@ int main(int argc,char **argv)main98,3509
 

 src/eps/examples/tutorials/ex1f.F,508
 ex1f.F:^?ex1f.F^A,1
-      program mainmain31,1377
- 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10075,2683
- 110  format (/' Number of iterations of the method:',I4)110146,4950
- 120  format (' Solution method: ',A)120153,5185
- 130  format (' Number of requested eigenvalues:',I2)130159,5415
- 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)140164,5589
- 150  format (' Number of converged eigenpairs:',I2/)150175,5997
- 160      format (1P,'   ',E12.4,'       ',E12.4)160193,6728
+      program mainmain31,1382
+ 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')10076,2741
+ 110  format (/' Number of iterations of the method:',I4)110147,5008
+ 120  format (' Solution method: ',A)120154,5243
+ 130  format (' Number of requested eigenvalues:',I2)130160,5473
+ 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)140165,5647
+ 150  format (' Number of converged eigenpairs:',I2/)150176,6055
+ 160      format (1P,'   ',E12.4,'       ',E12.4)160194,6786
 

 src/eps/examples/tutorials/ex1f90.F90,298
 ex1f90.F90:^?ex1f90.F90^A,1
-      program mainmain31,1379
-      type(Mat)      AA53,1969
-      type(EPS)      epseps54,1992
- 100  format (/'1-D Laplacian Eigenproblem, n =',I4,' (Fortran)')10083,2811
- 120  format (' Solution method: ',A)120152,5107
- 130  format (' Number of requested eigenvalues:',I4)130158,5337
+      program mainmain31,1384
+      type(Mat)      AA53,1974
+      type(EPS)      epseps54,1997
+ 100  format (/'1-D Laplacian Eigenproblem, n =',I4,' (Fortran)')10084,2869
+ 120  format (' Solution method: ',A)120153,5165
+ 130  format (' Number of requested eigenvalues:',I4)130159,5395
 

 src/eps/examples/tutorials/ex2.c,244
 ex2.c:^?ex2.c^A,1
@@ -2230,15 +2360,15 @@ static char help[] = "Spectrum folding for a standard symmetric eigenproblem.\n\
 #undef __FUNCT____FUNCT__46,1578
 #define __FUNCT__ __FUNCT__47,1595
 int main(int argc,char **argv)main48,1620
-#undef __FUNCT____FUNCT__197,7685
-#define __FUNCT__ __FUNCT__198,7702
-PetscErrorCode MatMult_Fold(Mat M,Vec x,Vec y)MatMult_Fold203,7830
-#undef __FUNCT____FUNCT__219,8274
-#define __FUNCT__ __FUNCT__220,8291
-PetscErrorCode RayleighQuotient(Mat A,Vec x,PetscScalar *r)RayleighQuotient225,8437
-#undef __FUNCT____FUNCT__238,8762
-#define __FUNCT__ __FUNCT__239,8779
-PetscErrorCode ComputeResidualNorm(Mat A,PetscScalar lambda,Vec x,PetscReal *r)ComputeResidualNorm243,8905
+#undef __FUNCT____FUNCT__206,8430
+#define __FUNCT__ __FUNCT__207,8447
+PetscErrorCode MatMult_Fold(Mat M,Vec x,Vec y)MatMult_Fold212,8575
+#undef __FUNCT____FUNCT__228,9019
+#define __FUNCT__ __FUNCT__229,9036
+PetscErrorCode RayleighQuotient(Mat A,Vec x,PetscScalar *r)RayleighQuotient234,9182
+#undef __FUNCT____FUNCT__247,9507
+#define __FUNCT__ __FUNCT__248,9524
+PetscErrorCode ComputeResidualNorm(Mat A,PetscScalar lambda,Vec x,PetscReal *r)ComputeResidualNorm252,9650
 

 src/eps/examples/tutorials/ex25.c,211
 ex25.c:^?ex25.c^A,1
@@ -2247,19 +2377,134 @@ static char help[] = "Spectrum slicing on generalized symmetric eigenproblem.\n\
 #define __FUNCT__ __FUNCT__31,1271
 int main(int argc,char **argv)main32,1296
 

+src/eps/examples/tutorials/ex29.c,598
+ex29.c:^?ex29.c^A,1
+static char help[] = "Solves the same problem as in ex5, with a user-defined stopping test."help22,924
+#undef __FUNCT____FUNCT__39,1642
+#define __FUNCT__ __FUNCT__40,1659
+int main(int argc,char **argv)main41,1684
+#undef __FUNCT____FUNCT__116,5097
+#define __FUNCT__ __FUNCT__117,5114
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel137,6270
+#undef __FUNCT____FUNCT__182,7655
+#define __FUNCT__ __FUNCT__183,7672
+PetscErrorCode MyStoppingTest(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)MyStoppingTest189,7825
+

 src/eps/examples/tutorials/ex3.c,622
 ex3.c:^?ex3.c^A,1
 static char help[] = "Solves the same eigenproblem as in example ex2, but using a shell matrix. "help22,924
 #undef __FUNCT____FUNCT__36,1446
 #define __FUNCT__ __FUNCT__37,1463
 int main(int argc,char **argv)main38,1488
-static void tv(int nx,const PetscScalar *x,PetscScalar *y)tv125,5079
-#undef __FUNCT____FUNCT__140,5360
-#define __FUNCT__ __FUNCT__141,5377
-PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)MatMult_Laplacian2D158,5897
-#undef __FUNCT____FUNCT__190,6694
-#define __FUNCT__ __FUNCT__191,6711
-PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)MatGetDiagonal_Laplacian2D192,6758
+static void tv(int nx,const PetscScalar *x,PetscScalar *y)tv125,5092
+#undef __FUNCT____FUNCT__140,5373
+#define __FUNCT__ __FUNCT__141,5390
+PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)MatMult_Laplacian2D158,5910
+#undef __FUNCT____FUNCT__190,6707
+#define __FUNCT__ __FUNCT__191,6724
+PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)MatGetDiagonal_Laplacian2D192,6771
+

+src/eps/examples/tutorials/ex30.c,1650
+ex30.c:^?ex30.c^A,1
+static char help[] = "Illustrates the use of a region for filtering; the number of wanted eigenvalues in not known a priori.\n\n"help22,924
+  Mat         T;T47,2126
+  Vec         x1,x2,y1,y2;x148,2143
+  Vec         x1,x2,y1,y2;x248,2143
+  Vec         x1,x2,y1,y2;y148,2143
+  Vec         x1,x2,y1,y2;y248,2143
+  PetscScalar alpha,beta,tau1,tau2,sigma;alpha49,2170
+  PetscScalar alpha,beta,tau1,tau2,sigma;beta49,2170
+  PetscScalar alpha,beta,tau1,tau2,sigma;tau149,2170
+  PetscScalar alpha,beta,tau1,tau2,sigma;tau249,2170
+  PetscScalar alpha,beta,tau1,tau2,sigma;sigma49,2170
+  PetscInt    lastnconv;      /* last value of nconv; used in stopping test */lastnconv50,2212
+  PetscInt    nreps;          /* number of repetitions of nconv; used in stopping test */nreps51,2291
+} CTX_BRUSSEL;CTX_BRUSSEL52,2381
+#undef __FUNCT____FUNCT__54,2397
+#define __FUNCT__ __FUNCT__55,2414
+int main(int argc,char **argv)main56,2439
+#undef __FUNCT____FUNCT__195,8211
+#define __FUNCT__ __FUNCT__196,8228
+PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)MatMult_Brussel197,8264
+#undef __FUNCT____FUNCT__234,9709
+#define __FUNCT__ __FUNCT__235,9726
+PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)MatShift_Brussel236,9763
+#undef __FUNCT____FUNCT__247,10000
+#define __FUNCT__ __FUNCT__248,10017
+PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)MatGetDiagonal_Brussel249,10060
+#undef __FUNCT____FUNCT__275,10987
+#define __FUNCT__ __FUNCT__276,11004
+PetscErrorCode MyStoppingTest(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ptr)MyStoppingTest286,11398
+

+src/eps/examples/tutorials/ex31.c,4714
+ex31.c:^?ex31.c^A,1
+static char help[] = "Power grid small signal stability analysis of WECC 9 bus system.\n\help22,924
+#define freq freq77,2895
+#define w_s w_s78,2911
+const PetscInt nbus    = 9; /* Number of network buses */nbus81,2966
+const PetscInt ngen    = 3; /* Number of generators */ngen82,3024
+const PetscInt nload   = 3; /* Number of loads */nload83,3079
+const PetscInt gbus[3] = {0,1,2}; /* Buses at which generators are incident */gbus84,3129
+const PetscInt lbus[3] = {4,5,7}; /* Buses at which loads are incident */lbus85,3208
+const PetscScalar PG[3] = {0.716786142395021,1.630000000000000,0.850000000000000};PG88,3345
+const PetscScalar QG[3] = {0.270702180178785,0.066120127797275,-0.108402221791588};QG89,3428
+const PetscScalar H[3]    = {23.64,6.4,3.01};   /* Inertia constant */H91,3538
+const PetscScalar Rs[3]   = {0.0,0.0,0.0}; /* Stator Resistance */Rs92,3609
+const PetscScalar Xd[3]   = {0.146,0.8958,1.3125};  /* d-axis reactance */Xd93,3676
+const PetscScalar Xdp[3]  = {0.0608,0.1198,0.1813}; /* d-axis transient reactance */Xdp94,3751
+const PetscScalar Xq[3]   = {0.0969,0.8645,1.2578}; /* q-axis reactance Xq(1) set to 0.4360, value given in text 0.0969 */Xq95,3836
+const PetscScalar Xqp[3]  = {0.0969,0.1969,0.25}; /* q-axis transient reactance */Xqp96,3959
+const PetscScalar Td0p[3] = {8.96,6.0,5.89}; /* d-axis open circuit time constant */Td0p97,4042
+const PetscScalar Tq0p[3] = {0.31,0.535,0.6}; /* q-axis open circuit time constant */Tq0p98,4127
+PetscScalar M[3]; /* M = 2*H/w_s */M99,4213
+PetscScalar D[3]; /* D = 0.1*M */D100,4249
+PetscScalar TM[3]; /* Mechanical Torque */TM102,4284
+const PetscScalar KA[3] = {20.0,20.0,20.0};  /* Voltage regulartor gain constant */KA104,4358
+const PetscScalar TA[3] = {0.2,0.2,0.2};     /* Voltage regulator time constant */TA105,4442
+const PetscScalar KE[3] = {1.0,1.0,1.0};     /* Exciter gain constant */KE106,4525
+const PetscScalar TE[3] = {0.314,0.314,0.314}; /* Exciter time constant */TE107,4598
+const PetscScalar KF[3] = {0.063,0.063,0.063};  /* Feedback stabilizer gain constant */KF108,4673
+const PetscScalar TF[3] = {0.35,0.35,0.35};    /* Feedback stabilizer time constant */TF109,4761
+const PetscScalar k1[3] = {0.0039,0.0039,0.0039};k1110,4848
+const PetscScalar k2[3] = {1.555,1.555,1.555};  /* k1 and k2 for calculating the saturation function SE = k1*exp(k2*Efd) */k2111,4898
+PetscScalar Vref[3];Vref113,5023
+const PetscScalar PD0[3] = {1.25,0.9,1.0};PD0129,5864
+const PetscScalar QD0[3] = {0.5,0.3,0.35};QD0130,5907
+const PetscInt    ld_nsegsp[3] = {3,3,3};ld_nsegsp131,5950
+const PetscScalar ld_alphap[3] = {0.0,0.0,1.0};ld_alphap132,5992
+const PetscScalar ld_betap[3]  = {2.0,1.0,0.0};ld_betap133,6040
+const PetscInt    ld_nsegsq[3] = {3,3,3};ld_nsegsq134,6088
+const PetscScalar ld_alphaq[3] = {0.0,0.0,1.0};ld_alphaq135,6130
+const PetscScalar ld_betaq[3]  = {2.0,1.0,0.0};ld_betaq136,6178
+  DM       dmgen, dmnet; /* DMs to manage generator and network subsystem */dmgen139,6244
+  DM       dmgen, dmnet; /* DMs to manage generator and network subsystem */dmnet139,6244
+  DM       dmpgrid;      /* Composite DM to manage the entire power grid */dmpgrid140,6321
+  Mat      Ybus;         /* Network admittance matrix */Ybus141,6397
+  Vec      V0;           /* Initial voltage vector (Power flow solution) */V0142,6454
+  PetscInt neqs_gen,neqs_net,neqs_pgrid;neqs_gen143,6530
+  PetscInt neqs_gen,neqs_net,neqs_pgrid;neqs_net143,6530
+  PetscInt neqs_gen,neqs_net,neqs_pgrid;neqs_pgrid143,6530
+  IS       is_diff;      /* indices for differential equations */is_diff144,6571
+  IS       is_alg;       /* indices for algebraic equations */is_alg145,6637
+} Userctx;Userctx146,6700
+#undef __FUNCT____FUNCT__149,6798
+#define __FUNCT__ __FUNCT__150,6815
+PetscErrorCode dq2ri(PetscScalar Fd,PetscScalar Fq,PetscScalar delta,PetscScalar *Fr,PetscScalar *Fi)dq2ri151,6841
+#undef __FUNCT____FUNCT__160,7207
+#define __FUNCT__ __FUNCT__161,7224
+PetscErrorCode ri2dq(PetscScalar Fr,PetscScalar Fi,PetscScalar delta,PetscScalar *Fd,PetscScalar *Fq)ri2dq162,7250
+#undef __FUNCT____FUNCT__170,7529
+#define __FUNCT__ __FUNCT__171,7546
+PetscErrorCode SetInitialGuess(Vec X,Userctx *user)SetInitialGuess172,7582
+#undef __FUNCT____FUNCT__257,10203
+#define __FUNCT__ __FUNCT__258,10220
+PetscErrorCode PreallocateJacobian(Mat J,Userctx *user)PreallocateJacobian259,10260
+#undef __FUNCT____FUNCT__308,11392
+#define __FUNCT__ __FUNCT__309,11409
+PetscErrorCode ResidualJacobian(Vec X,Mat J,void *ctx)ResidualJacobian310,11446
+#undef __FUNCT____FUNCT__540,21724
+#define __FUNCT__ __FUNCT__541,21741
+int main(int argc,char **argv)main542,21766
 

 src/eps/examples/tutorials/ex4.c,225
 ex4.c:^?ex4.c^A,1
@@ -2274,22 +2519,22 @@ static char help[] = "Eigenvalue problem associated with a Markov model of a ran
 #undef __FUNCT____FUNCT__35,1448
 #define __FUNCT__ __FUNCT__36,1465
 int main(int argc,char **argv)main37,1490
-#undef __FUNCT____FUNCT__126,4882
-#define __FUNCT__ __FUNCT__127,4899
-PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel147,6055
+#undef __FUNCT____FUNCT__126,4895
+#define __FUNCT__ __FUNCT__127,4912
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel147,6068
 

-src/eps/examples/tutorials/ex6f.F,355
+src/eps/examples/tutorials/ex6f.F,356
 ex6f.F:^?ex6f.F^A,1
-      program mainmain32,1462
- 999  continue999160,6119
-      subroutine MatIsing_Mult(MatIsing_Mult176,6424
-      SUBROUTINE MVMISG(MVMISG211,7418
-   10       CONTINUE10286,9397
-   20       CONTINUE  20293,9672
-   30    CONTINUE 30295,9697
-   40       CONTINUE  40306,9984
-   50       CONTINUE50312,10255
-   60    CONTINUE60316,10366
+      program mainmain32,1467
+ 999  continue999162,6229
+      subroutine MatIsing_Mult(MatIsing_Mult178,6534
+      SUBROUTINE MVMISG(MVMISG213,7528
+   10       CONTINUE10288,9507
+   20       CONTINUE  20295,9782
+   30    CONTINUE 30297,9807
+   40       CONTINUE  40308,10094
+   50       CONTINUE50314,10365
+   60    CONTINUE60318,10476
 

 src/eps/examples/tutorials/ex7.c,227
 ex7.c:^?ex7.c^A,1
@@ -2315,17 +2560,17 @@ static char help[] = "Solves a problem associated to the Brusselator wave model
 #undef __FUNCT____FUNCT__60,2012
 #define __FUNCT__ __FUNCT__61,2029
 int main(int argc,char **argv)main62,2054
-#undef __FUNCT____FUNCT__207,7735
-#define __FUNCT__ __FUNCT__208,7752
-PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)MatMult_Brussel209,7788
-#undef __FUNCT____FUNCT__246,9233
-#define __FUNCT__ __FUNCT__247,9250
-PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)MatShift_Brussel248,9287
-#undef __FUNCT____FUNCT__259,9524
-#define __FUNCT__ __FUNCT__260,9541
-PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)MatGetDiagonal_Brussel261,9584
-

-src/eps/examples/tutorials/makefile,803
+#undef __FUNCT____FUNCT__207,7773
+#define __FUNCT__ __FUNCT__208,7790
+PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)MatMult_Brussel209,7826
+#undef __FUNCT____FUNCT__246,9271
+#define __FUNCT__ __FUNCT__247,9288
+PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)MatShift_Brussel248,9325
+#undef __FUNCT____FUNCT__259,9562
+#define __FUNCT__ __FUNCT__260,9579
+PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)MatGetDiagonal_Brussel261,9622
+

+src/eps/examples/tutorials/makefile,944
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
@@ -2333,13 +2578,14 @@ CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/eps/examples/tutorials/LOCDIR26,978
 EXAMPLESC  = ex1.c ex2.c ex3.c ex4.c ex5.c ex7.c ex9.c ex10.c ex11.c ex12.c ex13.c \EXAMPLESC27,1019
-EXAMPLESF  = ex1f.F ex1f90.F90 ex6f.FEXAMPLESF29,1145
-MANSEC     = EPSMANSEC30,1183
-TESTEXAMPLES_C                 = ex2.PETSc runex2_1 ex2.rm \TESTEXAMPLES_C32,1201
-TESTEXAMPLES_C_NOCOMPLEX       = ex4.PETSc runex4_1 ex4.rm \TESTEXAMPLES_C_NOCOMPLEX42,1827
-TESTEXAMPLES_FORTRAN_NOCOMPLEX = ex6f.PETSc runex6f_1 ex6f.rmTESTEXAMPLES_FORTRAN_NOCOMPLEX45,2011
-TESTEXAMPLES_F90               = ex1f90.PETSc runex1f90_1 ex1f90.rmTESTEXAMPLES_F9046,2073
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH123,3711
+EXAMPLESF  = ex1f.F ex1f90.F90 ex6f.FEXAMPLESF29,1166
+MANSEC     = EPSMANSEC30,1204
+TESTEXAMPLES_C                 = ex2.PETSc runex2_1 runex2_ciss_1 runex2_ciss_2 ex2.rm \TESTEXAMPLES_C32,1222
+TESTEXAMPLES_C_NOCOMPLEX       = ex4.PETSc runex4_1 ex4.rm \TESTEXAMPLES_C_NOCOMPLEX44,2013
+TESTEXAMPLES_FORTRAN_NOCOMPLEX = ex6f.PETSc runex6f_1 ex6f.rmTESTEXAMPLES_FORTRAN_NOCOMPLEX48,2261
+TESTEXAMPLES_F90               = ex1f90.PETSc runex1f90_1 ex1f90.rmTESTEXAMPLES_F9049,2323
+TESTEXAMPLES_DATAFILESPATH_COMPLEX = ex4.PETSc runex4_ciss_1 ex4.rm \TESTEXAMPLES_DATAFILESPATH_COMPLEX50,2391
+DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH140,4338
 

 src/eps/f90-mod/makefile,397
 makefile:^?makefile^A,1
@@ -2360,56 +2606,69 @@ slepcepsmod.F:^?slepcepsmod.F^A,1
         module slepcepsdefslepcepsdef22,965
         module slepcepsslepceps31,1182
 

-src/eps/impls/cg/lobpcg/lobpcg.c,2684
+src/eps/impls/cg/lobpcg/lobpcg.c,3473
 lobpcg.c:^?lobpcg.c^A,1
-  PetscInt  bs;     /* block size */bs46,1698
-  PetscBool lock;   /* soft locking active/inactive */lock47,1735
-} EPS_LOBPCG;EPS_LOBPCG48,1790
-#undef __FUNCT____FUNCT__50,1805
-#define __FUNCT__ __FUNCT__51,1822
-PetscErrorCode EPSSetDimensions_LOBPCG(EPS eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)EPSSetDimensions_LOBPCG52,1866
-#undef __FUNCT____FUNCT__67,2459
-#define __FUNCT__ __FUNCT__68,2476
-PetscErrorCode EPSSetUp_LOBPCG(EPS eps)EPSSetUp_LOBPCG69,2512
-#undef __FUNCT____FUNCT__100,4309
-#define __FUNCT__ __FUNCT__101,4326
-PetscErrorCode EPSSolve_LOBPCG(EPS eps)EPSSolve_LOBPCG102,4362
-#undef __FUNCT____FUNCT__420,16473
-#define __FUNCT__ __FUNCT__421,16490
-static PetscErrorCode EPSLOBPCGSetBlockSize_LOBPCG(EPS eps,PetscInt bs)EPSLOBPCGSetBlockSize_LOBPCG422,16539
-#undef __FUNCT____FUNCT__431,16725
-#define __FUNCT__ __FUNCT__432,16742
-PetscErrorCode EPSLOBPCGSetBlockSize(EPS eps,PetscInt bs)EPSLOBPCGSetBlockSize449,17108
-#undef __FUNCT____FUNCT__460,17428
-#define __FUNCT__ __FUNCT__461,17445
-static PetscErrorCode EPSLOBPCGGetBlockSize_LOBPCG(EPS eps,PetscInt *bs)EPSLOBPCGGetBlockSize_LOBPCG462,17494
-#undef __FUNCT____FUNCT__471,17682
-#define __FUNCT__ __FUNCT__472,17699
-PetscErrorCode EPSLOBPCGGetBlockSize(EPS eps,PetscInt *bs)EPSLOBPCGGetBlockSize488,18004
-#undef __FUNCT____FUNCT__499,18309
-#define __FUNCT__ __FUNCT__500,18326
-static PetscErrorCode EPSLOBPCGSetLocking_LOBPCG(EPS eps,PetscBool lock)EPSLOBPCGSetLocking_LOBPCG501,18373
-#undef __FUNCT____FUNCT__510,18564
-#define __FUNCT__ __FUNCT__511,18581
-PetscErrorCode EPSLOBPCGSetLocking(EPS eps,PetscBool lock)EPSLOBPCGSetLocking534,19187
-#undef __FUNCT____FUNCT__545,19512
-#define __FUNCT__ __FUNCT__546,19529
-static PetscErrorCode EPSLOBPCGGetLocking_LOBPCG(EPS eps,PetscBool *lock)EPSLOBPCGGetLocking_LOBPCG547,19576
-#undef __FUNCT____FUNCT__556,19769
-#define __FUNCT__ __FUNCT__557,19786
-PetscErrorCode EPSLOBPCGGetLocking(EPS eps,PetscBool *lock)EPSLOBPCGGetLocking573,20091
-#undef __FUNCT____FUNCT__584,20400
-#define __FUNCT__ __FUNCT__585,20417
-PetscErrorCode EPSView_LOBPCG(EPS eps,PetscViewer viewer)EPSView_LOBPCG586,20452
-#undef __FUNCT____FUNCT__601,20983
-#define __FUNCT__ __FUNCT__602,21000
-PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_LOBPCG603,21045
-#undef __FUNCT____FUNCT__635,22156
-#define __FUNCT__ __FUNCT__636,22173
-PetscErrorCode EPSDestroy_LOBPCG(EPS eps)EPSDestroy_LOBPCG637,22211
-#undef __FUNCT____FUNCT__650,22771
-#define __FUNCT__ __FUNCT__651,22788
-PETSC_EXTERN PetscErrorCode EPSCreate_LOBPCG(EPS eps)EPSCreate_LOBPCG652,22825
+  PetscInt  bs;        /* block size */bs45,1628
+  PetscBool lock;      /* soft locking active/inactive */lock46,1668
+  PetscReal restart;   /* restart parameter */restart47,1726
+} EPS_LOBPCG;EPS_LOBPCG48,1773
+#undef __FUNCT____FUNCT__50,1788
+#define __FUNCT__ __FUNCT__51,1805
+PetscErrorCode EPSSetDimensions_LOBPCG(EPS eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)EPSSetDimensions_LOBPCG52,1849
+#undef __FUNCT____FUNCT__67,2442
+#define __FUNCT__ __FUNCT__68,2459
+PetscErrorCode EPSSetUp_LOBPCG(EPS eps)EPSSetUp_LOBPCG69,2495
+#undef __FUNCT____FUNCT__102,4334
+#define __FUNCT__ __FUNCT__103,4351
+PetscErrorCode EPSSolve_LOBPCG(EPS eps)EPSSolve_LOBPCG104,4387
+#undef __FUNCT____FUNCT__412,16595
+#define __FUNCT__ __FUNCT__413,16612
+static PetscErrorCode EPSLOBPCGSetBlockSize_LOBPCG(EPS eps,PetscInt bs)EPSLOBPCGSetBlockSize_LOBPCG414,16661
+#undef __FUNCT____FUNCT__423,16847
+#define __FUNCT__ __FUNCT__424,16864
+PetscErrorCode EPSLOBPCGSetBlockSize(EPS eps,PetscInt bs)EPSLOBPCGSetBlockSize441,17230
+#undef __FUNCT____FUNCT__452,17550
+#define __FUNCT__ __FUNCT__453,17567
+static PetscErrorCode EPSLOBPCGGetBlockSize_LOBPCG(EPS eps,PetscInt *bs)EPSLOBPCGGetBlockSize_LOBPCG454,17616
+#undef __FUNCT____FUNCT__463,17804
+#define __FUNCT__ __FUNCT__464,17821
+PetscErrorCode EPSLOBPCGGetBlockSize(EPS eps,PetscInt *bs)EPSLOBPCGGetBlockSize480,18126
+#undef __FUNCT____FUNCT__491,18431
+#define __FUNCT__ __FUNCT__492,18448
+static PetscErrorCode EPSLOBPCGSetRestart_LOBPCG(EPS eps,PetscReal restart)EPSLOBPCGSetRestart_LOBPCG493,18495
+#undef __FUNCT____FUNCT__506,18919
+#define __FUNCT__ __FUNCT__507,18936
+PetscErrorCode EPSLOBPCGSetRestart(EPS eps,PetscReal restart)EPSLOBPCGSetRestart530,19606
+#undef __FUNCT____FUNCT__541,19940
+#define __FUNCT__ __FUNCT__542,19957
+static PetscErrorCode EPSLOBPCGGetRestart_LOBPCG(EPS eps,PetscReal *restart)EPSLOBPCGGetRestart_LOBPCG543,20004
+#undef __FUNCT____FUNCT__552,20206
+#define __FUNCT__ __FUNCT__553,20223
+PetscErrorCode EPSLOBPCGGetRestart(EPS eps,PetscReal *restart)EPSLOBPCGGetRestart569,20541
+#undef __FUNCT____FUNCT__580,20859
+#define __FUNCT__ __FUNCT__581,20876
+static PetscErrorCode EPSLOBPCGSetLocking_LOBPCG(EPS eps,PetscBool lock)EPSLOBPCGSetLocking_LOBPCG582,20923
+#undef __FUNCT____FUNCT__591,21114
+#define __FUNCT__ __FUNCT__592,21131
+PetscErrorCode EPSLOBPCGSetLocking(EPS eps,PetscBool lock)EPSLOBPCGSetLocking615,21737
+#undef __FUNCT____FUNCT__626,22062
+#define __FUNCT__ __FUNCT__627,22079
+static PetscErrorCode EPSLOBPCGGetLocking_LOBPCG(EPS eps,PetscBool *lock)EPSLOBPCGGetLocking_LOBPCG628,22126
+#undef __FUNCT____FUNCT__637,22319
+#define __FUNCT__ __FUNCT__638,22336
+PetscErrorCode EPSLOBPCGGetLocking(EPS eps,PetscBool *lock)EPSLOBPCGGetLocking654,22641
+#undef __FUNCT____FUNCT__665,22950
+#define __FUNCT__ __FUNCT__666,22967
+PetscErrorCode EPSView_LOBPCG(EPS eps,PetscViewer viewer)EPSView_LOBPCG667,23002
+#undef __FUNCT____FUNCT__683,23705
+#define __FUNCT__ __FUNCT__684,23722
+PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_LOBPCG685,23767
+#undef __FUNCT____FUNCT__722,25144
+#define __FUNCT__ __FUNCT__723,25161
+PetscErrorCode EPSDestroy_LOBPCG(EPS eps)EPSDestroy_LOBPCG724,25199
+#undef __FUNCT____FUNCT__739,25955
+#define __FUNCT__ __FUNCT__740,25972
+PETSC_EXTERN PetscErrorCode EPSCreate_LOBPCG(EPS eps)EPSCreate_LOBPCG741,26009
 

 src/eps/impls/cg/lobpcg/makefile,281
 makefile:^?makefile^A,1
@@ -2442,7 +2701,7 @@ DIRS     =DIRS30,1021
 MANSEC   = EPSMANSEC31,1032
 LOCDIR   = src/eps/impls/cg/rqcg/LOCDIR32,1047
 

-src/eps/impls/cg/rqcg/rqcg.c,2055
+src/eps/impls/cg/rqcg/rqcg.c,2059
 rqcg.c:^?rqcg.c^A,1
   PetscInt nrest;nrest43,1500
   BV       AV,W,P,G;AV44,1518
@@ -2459,180 +2718,209 @@ static PetscErrorCode ExtractSubmatrix(Mat A,PetscInt k,Mat *B)ExtractSubmatrix
 #undef __FUNCT____FUNCT__118,4654
 #define __FUNCT__ __FUNCT__119,4671
 PetscErrorCode EPSSolve_RQCG(EPS eps)EPSSolve_RQCG120,4705
-#undef __FUNCT____FUNCT__299,12479
-#define __FUNCT__ __FUNCT__300,12496
-static PetscErrorCode EPSRQCGSetReset_RQCG(EPS eps,PetscInt nrest)EPSRQCGSetReset_RQCG301,12537
-#undef __FUNCT____FUNCT__310,12720
-#define __FUNCT__ __FUNCT__311,12737
-PetscErrorCode EPSRQCGSetReset(EPS eps,PetscInt nrest)EPSRQCGSetReset329,13197
-#undef __FUNCT____FUNCT__340,13514
-#define __FUNCT__ __FUNCT__341,13531
-static PetscErrorCode EPSRQCGGetReset_RQCG(EPS eps,PetscInt *nrest)EPSRQCGGetReset_RQCG342,13572
-#undef __FUNCT____FUNCT__351,13757
-#define __FUNCT__ __FUNCT__352,13774
-PetscErrorCode EPSRQCGGetReset(EPS eps,PetscInt *nrest)EPSRQCGGetReset368,14072
-#undef __FUNCT____FUNCT__379,14374
-#define __FUNCT__ __FUNCT__380,14391
-PetscErrorCode EPSReset_RQCG(EPS eps)EPSReset_RQCG381,14425
-#undef __FUNCT____FUNCT__395,14777
-#define __FUNCT__ __FUNCT__396,14794
-PetscErrorCode EPSSetFromOptions_RQCG(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_RQCG397,14837
-#undef __FUNCT____FUNCT__413,15348
-#define __FUNCT__ __FUNCT__414,15365
-PetscErrorCode EPSDestroy_RQCG(EPS eps)EPSDestroy_RQCG415,15401
-#undef __FUNCT____FUNCT__426,15751
-#define __FUNCT__ __FUNCT__427,15768
-PetscErrorCode EPSView_RQCG(EPS eps,PetscViewer viewer)EPSView_RQCG428,15801
-#undef __FUNCT____FUNCT__442,16227
-#define __FUNCT__ __FUNCT__443,16244
-PETSC_EXTERN PetscErrorCode EPSCreate_RQCG(EPS eps)EPSCreate_RQCG444,16279
-

-src/eps/impls/ciss/ciss.c,8196
+#undef __FUNCT____FUNCT__298,12458
+#define __FUNCT__ __FUNCT__299,12475
+static PetscErrorCode EPSRQCGSetReset_RQCG(EPS eps,PetscInt nrest)EPSRQCGSetReset_RQCG300,12516
+#undef __FUNCT____FUNCT__309,12699
+#define __FUNCT__ __FUNCT__310,12716
+PetscErrorCode EPSRQCGSetReset(EPS eps,PetscInt nrest)EPSRQCGSetReset328,13176
+#undef __FUNCT____FUNCT__339,13493
+#define __FUNCT__ __FUNCT__340,13510
+static PetscErrorCode EPSRQCGGetReset_RQCG(EPS eps,PetscInt *nrest)EPSRQCGGetReset_RQCG341,13551
+#undef __FUNCT____FUNCT__350,13736
+#define __FUNCT__ __FUNCT__351,13753
+PetscErrorCode EPSRQCGGetReset(EPS eps,PetscInt *nrest)EPSRQCGGetReset367,14051
+#undef __FUNCT____FUNCT__378,14353
+#define __FUNCT__ __FUNCT__379,14370
+PetscErrorCode EPSReset_RQCG(EPS eps)EPSReset_RQCG380,14404
+#undef __FUNCT____FUNCT__394,14756
+#define __FUNCT__ __FUNCT__395,14773
+PetscErrorCode EPSSetFromOptions_RQCG(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_RQCG396,14816
+#undef __FUNCT____FUNCT__412,15331
+#define __FUNCT__ __FUNCT__413,15348
+PetscErrorCode EPSDestroy_RQCG(EPS eps)EPSDestroy_RQCG414,15384
+#undef __FUNCT____FUNCT__425,15734
+#define __FUNCT__ __FUNCT__426,15751
+PetscErrorCode EPSView_RQCG(EPS eps,PetscViewer viewer)EPSView_RQCG427,15784
+#undef __FUNCT____FUNCT__441,16210
+#define __FUNCT__ __FUNCT__442,16227
+PETSC_EXTERN PetscErrorCode EPSCreate_RQCG(EPS eps)EPSCreate_RQCG443,16262
+

+src/eps/impls/ciss/ciss.c,10091
 ciss.c:^?ciss.c^A,1
-  PetscInt    N;          /* number of integration points (32) */N51,1767
-  PetscInt    L;          /* block size (16) */L52,1833
-  PetscInt    M;          /* moment degree (N/4 = 4) */M53,1881
-  PetscReal   delta;      /* threshold of singular value (1e-12) */delta54,1937
-  PetscInt    L_max;      /* maximum number of columns of the source matrix V */L_max55,2005
-  PetscReal   spurious_threshold; /* discard spurious eigenpairs */spurious_threshold56,2086
-  PetscBool   isreal;     /* A and B are real */isreal57,2154
-  PetscInt    refine_inner;refine_inner58,2203
-  PetscInt    refine_outer;refine_outer59,2231
-  PetscInt    refine_blocksize;refine_blocksize60,2259
-  PetscReal    *sigma;     /* threshold for numerical rank */sigma62,2312
-  PetscInt     num_subcomm;num_subcomm63,2374
-  PetscInt     subcomm_id;subcomm_id64,2402
-  PetscInt     num_solve_point;num_solve_point65,2429
-  PetscScalar  *weight;weight66,2461
-  PetscScalar  *omega;omega67,2485
-  PetscScalar  *pp;pp68,2508
-  BV           V;V69,2528
-  BV           S;S70,2546
-  BV           pV;pV71,2564
-  BV           Y;Y72,2583
-  Vec          xsub;xsub73,2601
-  Vec          xdup;xdup74,2622
-  KSP          *ksp;ksp75,2643
-  Mat          *kspMat;kspMat76,2664
-  PetscBool    useconj;useconj77,2688
-  PetscReal    est_eig;est_eig78,2712
-  VecScatter   scatterin;scatterin79,2736
-  Mat          pA,pB;pA80,2762
-  Mat          pA,pB;pB80,2762
-  PetscSubcomm subcomm;subcomm81,2784
-  PetscBool    usest;usest82,2808
-} EPS_CISS;EPS_CISS83,2830
-#undef __FUNCT____FUNCT__85,2843
-#define __FUNCT__ __FUNCT__86,2860
-static PetscErrorCode SetSolverComm(EPS eps)SetSolverComm87,2894
-#undef __FUNCT____FUNCT__108,3731
-#define __FUNCT__ __FUNCT__109,3748
-static PetscErrorCode CISSRedundantMat(EPS eps)CISSRedundantMat110,3785
-#undef __FUNCT____FUNCT__133,4562
-#define __FUNCT__ __FUNCT__134,4579
-static PetscErrorCode CISSScatterVec(EPS eps)CISSScatterVec135,4614
-#undef __FUNCT____FUNCT__171,6104
-#define __FUNCT__ __FUNCT__172,6121
-static PetscErrorCode SetPathParameter(EPS eps)SetPathParameter173,6158
-#undef __FUNCT____FUNCT__218,8006
-#define __FUNCT__ __FUNCT__219,8023
-static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom rctx)CISSVecSetRandom220,8060
-#undef __FUNCT____FUNCT__244,8794
-#define __FUNCT__ __FUNCT__245,8811
-static PetscErrorCode VecScatterVecs(EPS eps,BV Vin,PetscInt n)VecScatterVecs246,8846
-#undef __FUNCT____FUNCT__271,9839
-#define __FUNCT__ __FUNCT__272,9856
-static PetscErrorCode SolveLinearSystem(EPS eps,Mat A,Mat B,BV V,PetscInt L_start,PetscInt L_end,PetscBool initksp)SolveLinearSystem273,9894
-#undef __FUNCT____FUNCT__354,13009
-#define __FUNCT__ __FUNCT__355,13026
-static PetscErrorCode EstimateNumberEigs(EPS eps,PetscInt *L_add)EstimateNumberEigs356,13065
-#undef __FUNCT____FUNCT__405,15015
-#define __FUNCT__ __FUNCT__406,15032
-static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)CalcMu407,15059
-#undef __FUNCT____FUNCT__459,17223
-#define __FUNCT__ __FUNCT__460,17240
-static PetscErrorCode BlockHankel(EPS eps,PetscScalar *Mu,PetscInt s,PetscScalar *H)BlockHankel461,17272
-#undef __FUNCT____FUNCT__474,17603
-#define __FUNCT__ __FUNCT__475,17620
-static PetscErrorCode SVD_H0(EPS eps,PetscScalar *S,PetscInt *K)SVD_H0476,17647
-#undef __FUNCT____FUNCT__518,19103
-#define __FUNCT__ __FUNCT__519,19120
-static PetscErrorCode ConstructS(EPS eps)ConstructS520,19151
-#undef __FUNCT____FUNCT__568,21001
-#define __FUNCT__ __FUNCT__569,21018
-static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,PetscInt *K)SVD_S570,21044
-#undef __FUNCT____FUNCT__680,25510
-#define __FUNCT__ __FUNCT__681,25527
-static PetscErrorCode isGhost(EPS eps,PetscInt ld,PetscInt nv,PetscBool *fl)isGhost682,25555
-#undef __FUNCT____FUNCT__717,26550
-#define __FUNCT__ __FUNCT__718,26567
-PetscErrorCode EPSSetUp_CISS(EPS eps)EPSSetUp_CISS719,26601
-#undef __FUNCT____FUNCT__828,31949
-#define __FUNCT__ __FUNCT__829,31966
-PetscErrorCode EPSSolve_CISS(EPS eps)EPSSolve_CISS830,32000
-#undef __FUNCT____FUNCT__1005,39330
-#define __FUNCT__ __FUNCT__1006,39347
-static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)EPSCISSSetSizes_CISS1007,39388
-#undef __FUNCT____FUNCT__1052,41475
-#define __FUNCT__ __FUNCT__1053,41492
-PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)EPSCISSSetSizes1085,42571
-#undef __FUNCT____FUNCT__1101,43252
-#define __FUNCT__ __FUNCT__1102,43269
-static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)EPSCISSGetSizes_CISS1103,43310
-#undef __FUNCT____FUNCT__1117,43728
-#define __FUNCT__ __FUNCT__1118,43745
-PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)EPSCISSGetSizes1139,44230
-#undef __FUNCT____FUNCT__1149,44648
-#define __FUNCT__ __FUNCT__1150,44665
-static PetscErrorCode EPSCISSSetThreshold_CISS(EPS eps,PetscReal delta,PetscReal spur)EPSCISSSetThreshold_CISS1151,44710
-#undef __FUNCT____FUNCT__1171,45364
-#define __FUNCT__ __FUNCT__1172,45381
-PetscErrorCode EPSCISSSetThreshold(EPS eps,PetscReal delta,PetscReal spur)EPSCISSSetThreshold1192,45903
-#undef __FUNCT____FUNCT__1204,46308
-#define __FUNCT__ __FUNCT__1205,46325
-static PetscErrorCode EPSCISSGetThreshold_CISS(EPS eps,PetscReal *delta,PetscReal *spur)EPSCISSGetThreshold_CISS1206,46370
-#undef __FUNCT____FUNCT__1216,46633
-#define __FUNCT__ __FUNCT__1217,46650
-PetscErrorCode EPSCISSGetThreshold(EPS eps,PetscReal *delta,PetscReal *spur)EPSCISSGetThreshold1235,47054
-#undef __FUNCT____FUNCT__1245,47368
-#define __FUNCT__ __FUNCT__1246,47385
-static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt outer,PetscInt blsize)EPSCISSSetRefinement_CISS1247,47431
-#undef __FUNCT____FUNCT__1273,48339
-#define __FUNCT__ __FUNCT__1274,48356
-PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt outer,PetscInt blsize)EPSCISSSetRefinement1296,49075
-#undef __FUNCT____FUNCT__1309,49559
-#define __FUNCT__ __FUNCT__1310,49576
-static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt *outer,PetscInt *blsize)EPSCISSGetRefinement_CISS1311,49622
-#undef __FUNCT____FUNCT__1322,49953
-#define __FUNCT__ __FUNCT__1323,49970
-PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *outer,PetscInt *blsize)EPSCISSGetRefinement1342,50480
-#undef __FUNCT____FUNCT__1352,50830
-#define __FUNCT__ __FUNCT__1353,50847
-static PetscErrorCode EPSCISSSetUseST_CISS(EPS eps,PetscBool usest)EPSCISSSetUseST_CISS1354,50888
-#undef __FUNCT____FUNCT__1363,51072
-#define __FUNCT__ __FUNCT__1364,51089
-PetscErrorCode EPSCISSSetUseST(EPS eps,PetscBool usest)EPSCISSSetUseST1382,51544
-#undef __FUNCT____FUNCT__1393,51864
-#define __FUNCT__ __FUNCT__1394,51881
-static PetscErrorCode EPSCISSGetUseST_CISS(EPS eps,PetscBool *usest)EPSCISSGetUseST_CISS1395,51922
-#undef __FUNCT____FUNCT__1404,52108
-#define __FUNCT__ __FUNCT__1405,52125
-PetscErrorCode EPSCISSGetUseST(EPS eps, PetscBool *usest)EPSCISSGetUseST1422,52470
-#undef __FUNCT____FUNCT__1432,52745
-#define __FUNCT__ __FUNCT__1433,52762
-PetscErrorCode EPSReset_CISS(EPS eps)EPSReset_CISS1434,52796
-#undef __FUNCT____FUNCT__1466,53848
-#define __FUNCT__ __FUNCT__1467,53865
-PetscErrorCode EPSSetFromOptions_CISS(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_CISS1468,53908
-#undef __FUNCT____FUNCT__1505,56344
-#define __FUNCT__ __FUNCT__1506,56361
-PetscErrorCode EPSDestroy_CISS(EPS eps)EPSDestroy_CISS1507,56397
-#undef __FUNCT____FUNCT__1524,57329
-#define __FUNCT__ __FUNCT__1525,57346
-PetscErrorCode EPSView_CISS(EPS eps,PetscViewer viewer)EPSView_CISS1526,57379
-#undef __FUNCT____FUNCT__1551,58722
-#define __FUNCT__ __FUNCT__1552,58739
-PETSC_EXTERN PetscErrorCode EPSCreate_CISS(EPS eps)EPSCreate_CISS1553,58774
+  PetscInt          N;          /* number of integration points (32) */N49,1731
+  PetscInt          L;          /* block size (16) */L50,1803
+  PetscInt          M;          /* moment degree (N/4 = 4) */M51,1857
+  PetscReal         delta;      /* threshold of singular value (1e-12) */delta52,1919
+  PetscInt          L_max;      /* maximum number of columns of the source matrix V */L_max53,1993
+  PetscReal         spurious_threshold; /* discard spurious eigenpairs */spurious_threshold54,2080
+  PetscBool         isreal;     /* A and B are real */isreal55,2154
+  PetscInt          refine_inner;refine_inner56,2209
+  PetscInt          refine_blocksize;refine_blocksize57,2243
+  PetscReal         *sigma;     /* threshold for numerical rank */sigma59,2302
+  PetscInt          num_subcomm;num_subcomm60,2369
+  PetscInt          subcomm_id;subcomm_id61,2402
+  PetscInt          num_solve_point;num_solve_point62,2434
+  PetscScalar       *weight;weight63,2471
+  PetscScalar       *omega;omega64,2500
+  PetscScalar       *pp;pp65,2528
+  BV                V;V66,2553
+  BV                S;S67,2576
+  BV                pV;pV68,2599
+  BV                Y;Y69,2623
+  Vec               xsub;xsub70,2646
+  Vec               xdup;xdup71,2672
+  KSP               *ksp;ksp72,2698
+  Mat               *kspMat;kspMat73,2724
+  PetscBool         useconj;useconj74,2753
+  PetscReal         est_eig;est_eig75,2782
+  VecScatter        scatterin;scatterin76,2811
+  Mat               pA,pB;pA77,2842
+  Mat               pA,pB;pB77,2842
+  PetscSubcomm      subcomm;subcomm78,2869
+  PetscBool         usest;usest79,2898
+  PetscBool         usest_set;  /* whether the user set the usest flag or not */usest_set80,2925
+  EPSCISSQuadRule   quad;quad81,3006
+  EPSCISSExtraction extraction;extraction82,3032
+} EPS_CISS;EPS_CISS83,3064
+#undef __FUNCT____FUNCT__85,3077
+#define __FUNCT__ __FUNCT__86,3094
+static PetscErrorCode SetSolverComm(EPS eps)SetSolverComm87,3128
+#undef __FUNCT____FUNCT__108,3965
+#define __FUNCT__ __FUNCT__109,3982
+static PetscErrorCode CISSRedundantMat(EPS eps)CISSRedundantMat110,4019
+#undef __FUNCT____FUNCT__133,4795
+#define __FUNCT__ __FUNCT__134,4812
+static PetscErrorCode CISSScatterVec(EPS eps)CISSScatterVec135,4847
+#undef __FUNCT____FUNCT__171,6337
+#define __FUNCT__ __FUNCT__172,6354
+static PetscErrorCode SetPathParameter(EPS eps)SetPathParameter173,6391
+#undef __FUNCT____FUNCT__261,10143
+#define __FUNCT__ __FUNCT__262,10160
+static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1)CISSVecSetRandom263,10197
+#undef __FUNCT____FUNCT__287,10908
+#define __FUNCT__ __FUNCT__288,10925
+static PetscErrorCode VecScatterVecs(EPS eps,BV Vin,PetscInt n)VecScatterVecs289,10960
+#undef __FUNCT____FUNCT__314,11953
+#define __FUNCT__ __FUNCT__315,11970
+static PetscErrorCode SolveLinearSystem(EPS eps,Mat A,Mat B,BV V,PetscInt L_start,PetscInt L_end,PetscBool initksp)SolveLinearSystem316,12008
+#undef __FUNCT____FUNCT__378,14398
+#define __FUNCT__ __FUNCT__379,14415
+static PetscErrorCode EstimateNumberEigs(EPS eps,PetscInt *L_add)EstimateNumberEigs380,14454
+#undef __FUNCT____FUNCT__429,16404
+#define __FUNCT__ __FUNCT__430,16421
+static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)CalcMu431,16448
+#undef __FUNCT____FUNCT__484,18668
+#define __FUNCT__ __FUNCT__485,18685
+static PetscErrorCode BlockHankel(EPS eps,PetscScalar *Mu,PetscInt s,PetscScalar *H)BlockHankel486,18717
+#undef __FUNCT____FUNCT__499,19046
+#define __FUNCT__ __FUNCT__500,19063
+static PetscErrorCode SVD_H0(EPS eps,PetscScalar *S,PetscInt *K)SVD_H0501,19090
+#undef __FUNCT____FUNCT__543,20546
+#define __FUNCT__ __FUNCT__544,20563
+static PetscErrorCode ConstructS(EPS eps)ConstructS545,20594
+#undef __FUNCT____FUNCT__593,22460
+#define __FUNCT__ __FUNCT__594,22477
+static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,PetscInt *K)SVD_S595,22503
+#undef __FUNCT____FUNCT__705,27026
+#define __FUNCT__ __FUNCT__706,27043
+static PetscErrorCode isGhost(EPS eps,PetscInt ld,PetscInt nv,PetscBool *fl)isGhost707,27071
+#undef __FUNCT____FUNCT__742,28066
+#define __FUNCT__ __FUNCT__743,28083
+static PetscErrorCode rescale_eig(EPS eps,PetscInt nv)rescale_eig744,28115
+#undef __FUNCT____FUNCT__812,30792
+#define __FUNCT__ __FUNCT__813,30809
+PetscErrorCode EPSSetUp_CISS(EPS eps)EPSSetUp_CISS814,30843
+#undef __FUNCT____FUNCT__960,38098
+#define __FUNCT__ __FUNCT__961,38115
+PetscErrorCode EPSSolve_CISS(EPS eps)EPSSolve_CISS962,38149
+#undef __FUNCT____FUNCT__1180,47354
+#define __FUNCT__ __FUNCT__1181,47371
+static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)EPSCISSSetSizes_CISS1182,47412
+#undef __FUNCT____FUNCT__1227,49503
+#define __FUNCT__ __FUNCT__1228,49520
+PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)EPSCISSSetSizes1260,50601
+#undef __FUNCT____FUNCT__1276,51288
+#define __FUNCT__ __FUNCT__1277,51305
+static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)EPSCISSGetSizes_CISS1278,51346
+#undef __FUNCT____FUNCT__1292,51770
+#define __FUNCT__ __FUNCT__1293,51787
+PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)EPSCISSGetSizes1314,52274
+#undef __FUNCT____FUNCT__1324,52696
+#define __FUNCT__ __FUNCT__1325,52713
+static PetscErrorCode EPSCISSSetThreshold_CISS(EPS eps,PetscReal delta,PetscReal spur)EPSCISSSetThreshold_CISS1326,52758
+#undef __FUNCT____FUNCT__1346,53412
+#define __FUNCT__ __FUNCT__1347,53429
+PetscErrorCode EPSCISSSetThreshold(EPS eps,PetscReal delta,PetscReal spur)EPSCISSSetThreshold1367,53951
+#undef __FUNCT____FUNCT__1379,54356
+#define __FUNCT__ __FUNCT__1380,54373
+static PetscErrorCode EPSCISSGetThreshold_CISS(EPS eps,PetscReal *delta,PetscReal *spur)EPSCISSGetThreshold_CISS1381,54418
+#undef __FUNCT____FUNCT__1391,54681
+#define __FUNCT__ __FUNCT__1392,54698
+PetscErrorCode EPSCISSGetThreshold(EPS eps,PetscReal *delta,PetscReal *spur)EPSCISSGetThreshold1410,55102
+#undef __FUNCT____FUNCT__1420,55416
+#define __FUNCT__ __FUNCT__1421,55433
+static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt blsize)EPSCISSSetRefinement_CISS1422,55479
+#undef __FUNCT____FUNCT__1442,56140
+#define __FUNCT__ __FUNCT__1443,56157
+PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt blsize)EPSCISSSetRefinement1463,56749
+#undef __FUNCT____FUNCT__1475,57156
+#define __FUNCT__ __FUNCT__1476,57173
+static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt *blsize)EPSCISSGetRefinement_CISS1477,57219
+#undef __FUNCT____FUNCT__1487,57492
+#define __FUNCT__ __FUNCT__1488,57509
+PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *blsize)EPSCISSGetRefinement1506,57952
+#undef __FUNCT____FUNCT__1516,58270
+#define __FUNCT__ __FUNCT__1517,58287
+static PetscErrorCode EPSCISSSetUseST_CISS(EPS eps,PetscBool usest)EPSCISSSetUseST_CISS1518,58328
+#undef __FUNCT____FUNCT__1528,58547
+#define __FUNCT__ __FUNCT__1529,58564
+PetscErrorCode EPSCISSSetUseST(EPS eps,PetscBool usest)EPSCISSSetUseST1547,59019
+#undef __FUNCT____FUNCT__1558,59339
+#define __FUNCT__ __FUNCT__1559,59356
+static PetscErrorCode EPSCISSGetUseST_CISS(EPS eps,PetscBool *usest)EPSCISSGetUseST_CISS1560,59397
+#undef __FUNCT____FUNCT__1569,59583
+#define __FUNCT__ __FUNCT__1570,59600
+PetscErrorCode EPSCISSGetUseST(EPS eps,PetscBool *usest)EPSCISSGetUseST1587,59945
+#undef __FUNCT____FUNCT__1598,60249
+#define __FUNCT__ __FUNCT__1599,60266
+static PetscErrorCode EPSCISSSetQuadRule_CISS(EPS eps,EPSCISSQuadRule quad)EPSCISSSetQuadRule_CISS1600,60310
+#undef __FUNCT____FUNCT__1609,60500
+#define __FUNCT__ __FUNCT__1610,60517
+PetscErrorCode EPSCISSSetQuadRule(EPS eps,EPSCISSQuadRule quad)EPSCISSSetQuadRule1634,61192
+#undef __FUNCT____FUNCT__1645,61527
+#define __FUNCT__ __FUNCT__1646,61544
+static PetscErrorCode EPSCISSGetQuadRule_CISS(EPS eps,EPSCISSQuadRule *quad)EPSCISSGetQuadRule_CISS1647,61588
+#undef __FUNCT____FUNCT__1656,61780
+#define __FUNCT__ __FUNCT__1657,61797
+PetscErrorCode EPSCISSGetQuadRule(EPS eps, EPSCISSQuadRule *quad)EPSCISSGetQuadRule1673,62119
+#undef __FUNCT____FUNCT__1684,62439
+#define __FUNCT__ __FUNCT__1685,62456
+static PetscErrorCode EPSCISSSetExtraction_CISS(EPS eps,EPSCISSExtraction extraction)EPSCISSSetExtraction_CISS1686,62502
+#undef __FUNCT____FUNCT__1695,62714
+#define __FUNCT__ __FUNCT__1696,62731
+PetscErrorCode EPSCISSSetExtraction(EPS eps,EPSCISSExtraction extraction)EPSCISSSetExtraction1720,63443
+#undef __FUNCT____FUNCT__1731,63804
+#define __FUNCT__ __FUNCT__1732,63821
+static PetscErrorCode EPSCISSGetExtraction_CISS(EPS eps,EPSCISSExtraction *extraction)EPSCISSGetExtraction_CISS1733,63867
+#undef __FUNCT____FUNCT__1742,64081
+#define __FUNCT__ __FUNCT__1743,64098
+PetscErrorCode EPSCISSGetExtraction(EPS eps,EPSCISSExtraction *extraction)EPSCISSGetExtraction1759,64441
+#undef __FUNCT____FUNCT__1771,64787
+#define __FUNCT__ __FUNCT__1772,64804
+PetscErrorCode EPSReset_CISS(EPS eps)EPSReset_CISS1773,64838
+#undef __FUNCT____FUNCT__1805,65890
+#define __FUNCT__ __FUNCT__1806,65907
+PetscErrorCode EPSSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_CISS1807,65950
+#undef __FUNCT____FUNCT__1852,68851
+#define __FUNCT__ __FUNCT__1853,68868
+PetscErrorCode EPSDestroy_CISS(EPS eps)EPSDestroy_CISS1854,68904
+#undef __FUNCT____FUNCT__1875,70228
+#define __FUNCT__ __FUNCT__1876,70245
+PetscErrorCode EPSView_CISS(EPS eps,PetscViewer viewer)EPSView_CISS1877,70278
+#undef __FUNCT____FUNCT__1905,71866
+#define __FUNCT__ __FUNCT__1906,71883
+PETSC_EXTERN PetscErrorCode EPSCreate_CISS(EPS eps)EPSCreate_CISS1907,71918
 

 src/eps/impls/ciss/makefile,273
 makefile:^?makefile^A,1
@@ -2646,232 +2934,208 @@ DIRS     =DIRS30,1021
 MANSEC   = EPSMANSEC31,1032
 LOCDIR   = src/eps/impls/ciss/LOCDIR32,1047
 

-src/eps/impls/davidson/davidson.c,5000
+src/eps/impls/davidson/davidson.c,3451
 davidson.c:^?davidson.c^A,1
-  PetscInt  blocksize;     /* block size */blocksize30,1112
-  PetscInt  initialsize;   /* initial size of V */initialsize31,1156
-  PetscInt  minv;          /* size of V after restarting */minv32,1207
-  PetscInt  plusk;         /* keep plusk eigenvectors from the last iteration */plusk33,1267
-  PetscBool ipB;           /* true if B-ortho is used */ipB34,1348
-  PetscInt  method;        /* method for improving the approximate solution */method35,1405
-  PetscReal fix;           /* the fix parameter */fix36,1484
-  PetscBool krylovstart;   /* true if the starting subspace is a Krylov basis */krylovstart37,1535
-  PetscBool dynamic;       /* true if dynamic stopping criterion is used */dynamic38,1616
-  PetscInt  cX_in_proj;    /* converged vectors in the projected problem */cX_in_proj39,1692
-  PetscInt  cX_in_impr;    /* converged vectors in the projector */cX_in_impr40,1768
-  Method_t  scheme;        /* method employed: GD, JD or GD2 */scheme41,1836
-  dvdDashboard ddb;ddb44,1927
-} EPS_DAVIDSON;EPS_DAVIDSON45,1947
-#undef __FUNCT____FUNCT__47,1964
-#define __FUNCT__ __FUNCT__48,1981
-PetscErrorCode EPSCreate_XD(EPS eps)EPSCreate_XD49,2014
-#undef __FUNCT____FUNCT__78,3052
-#define __FUNCT__ __FUNCT__79,3069
-PetscErrorCode EPSSetUp_XD(EPS eps)EPSSetUp_XD80,3101
-#undef __FUNCT____FUNCT__260,11760
-#define __FUNCT__ __FUNCT__261,11777
-PetscErrorCode EPSSolve_XD(EPS eps)EPSSolve_XD262,11809
-#undef __FUNCT____FUNCT__301,12985
-#define __FUNCT__ __FUNCT__302,13002
-PetscErrorCode EPSReset_XD(EPS eps)EPSReset_XD303,13034
-#undef __FUNCT____FUNCT__318,13536
-#define __FUNCT__ __FUNCT__319,13553
-PetscErrorCode EPSView_XD(EPS eps,PetscViewer viewer)EPSView_XD320,13584
-#undef __FUNCT____FUNCT__356,15243
-#define __FUNCT__ __FUNCT__357,15260
-PetscErrorCode EPSXDSetKrylovStart_XD(EPS eps,PetscBool krylovstart)EPSXDSetKrylovStart_XD358,15303
-#undef __FUNCT____FUNCT__367,15510
-#define __FUNCT__ __FUNCT__368,15527
-PetscErrorCode EPSXDGetKrylovStart_XD(EPS eps,PetscBool *krylovstart)EPSXDGetKrylovStart_XD369,15570
-#undef __FUNCT____FUNCT__378,15779
-#define __FUNCT__ __FUNCT__379,15796
-PetscErrorCode EPSXDSetBlockSize_XD(EPS eps,PetscInt blocksize)EPSXDSetBlockSize_XD380,15837
-#undef __FUNCT____FUNCT__391,16230
-#define __FUNCT__ __FUNCT__392,16247
-PetscErrorCode EPSXDGetBlockSize_XD(EPS eps,PetscInt *blocksize)EPSXDGetBlockSize_XD393,16288
-#undef __FUNCT____FUNCT__402,16488
-#define __FUNCT__ __FUNCT__403,16505
-PetscErrorCode EPSXDSetRestart_XD(EPS eps,PetscInt minv,PetscInt plusk)EPSXDSetRestart_XD404,16544
-#undef __FUNCT____FUNCT__418,17107
-#define __FUNCT__ __FUNCT__419,17124
-PetscErrorCode EPSXDGetRestart_XD(EPS eps,PetscInt *minv,PetscInt *plusk)EPSXDGetRestart_XD420,17163
-#undef __FUNCT____FUNCT__430,17407
-#define __FUNCT__ __FUNCT__431,17424
-PetscErrorCode EPSXDGetInitialSize_XD(EPS eps,PetscInt *initialsize)EPSXDGetInitialSize_XD432,17467
-#undef __FUNCT____FUNCT__441,17675
-#define __FUNCT__ __FUNCT__442,17692
-PetscErrorCode EPSXDSetInitialSize_XD(EPS eps,PetscInt initialsize)EPSXDSetInitialSize_XD443,17735
-#undef __FUNCT____FUNCT__454,18147
-#define __FUNCT__ __FUNCT__455,18164
-PetscErrorCode EPSXDGetFix_XD(EPS eps,PetscReal *fix)EPSXDGetFix_XD456,18199
-#undef __FUNCT____FUNCT__465,18376
-#define __FUNCT__ __FUNCT__466,18393
-PetscErrorCode EPSJDSetFix_JD(EPS eps,PetscReal fix)EPSJDSetFix_JD467,18428
-#undef __FUNCT____FUNCT__478,18772
-#define __FUNCT__ __FUNCT__479,18789
-PetscErrorCode EPSXDSetBOrth_XD(EPS eps,PetscBool borth)EPSXDSetBOrth_XD480,18826
-#undef __FUNCT____FUNCT__489,19007
-#define __FUNCT__ __FUNCT__490,19024
-PetscErrorCode EPSXDGetBOrth_XD(EPS eps,PetscBool *borth)EPSXDGetBOrth_XD491,19061
-#undef __FUNCT____FUNCT__500,19244
-#define __FUNCT__ __FUNCT__501,19261
-PetscErrorCode EPSJDSetConstCorrectionTol_JD(EPS eps,PetscBool constant)EPSJDSetConstCorrectionTol_JD502,19311
-#undef __FUNCT____FUNCT__511,19543
-#define __FUNCT__ __FUNCT__512,19560
-PetscErrorCode EPSJDGetConstCorrectionTol_JD(EPS eps,PetscBool *constant)EPSJDGetConstCorrectionTol_JD513,19610
-#undef __FUNCT____FUNCT__522,19844
-#define __FUNCT__ __FUNCT__523,19861
-PetscErrorCode EPSXDSetWindowSizes_XD(EPS eps,PetscInt pwindow,PetscInt qwindow)EPSXDSetWindowSizes_XD524,19904
-#undef __FUNCT____FUNCT__538,20516
-#define __FUNCT__ __FUNCT__539,20533
-PetscErrorCode EPSXDGetWindowSizes_XD(EPS eps,PetscInt *pwindow,PetscInt *qwindow)EPSXDGetWindowSizes_XD540,20576
-#undef __FUNCT____FUNCT__550,20850
-#define __FUNCT__ __FUNCT__551,20867
-PetscErrorCode EPSXDSetMethod(EPS eps,Method_t method)EPSXDSetMethod552,20902
-#undef __FUNCT____FUNCT__561,21085
-#define __FUNCT__ __FUNCT__562,21102
-PetscErrorCode EPSXDGetMethod_XD(EPS eps,Method_t *method)EPSXDGetMethod_XD563,21140
-#undef __FUNCT____FUNCT__572,21328
-#define __FUNCT__ __FUNCT__573,21345
-PetscErrorCode EPSComputeVectors_XD(EPS eps)EPSComputeVectors_XD582,21758
-

-src/eps/impls/davidson/davidson.h,9831
+static PetscBool  cited = PETSC_FALSE;cited26,1010
+static const char citation[] =citation27,1049
+#undef __FUNCT____FUNCT__39,1503
+#define __FUNCT__ __FUNCT__40,1520
+PetscErrorCode EPSSetUp_XD(EPS eps)EPSSetUp_XD41,1552
+#undef __FUNCT____FUNCT__221,10217
+#define __FUNCT__ __FUNCT__222,10234
+PetscErrorCode EPSSolve_XD(EPS eps)EPSSolve_XD223,10266
+#undef __FUNCT____FUNCT__263,11551
+#define __FUNCT__ __FUNCT__264,11568
+PetscErrorCode EPSReset_XD(EPS eps)EPSReset_XD265,11600
+#undef __FUNCT____FUNCT__280,12102
+#define __FUNCT__ __FUNCT__281,12119
+PetscErrorCode EPSXDSetKrylovStart_XD(EPS eps,PetscBool krylovstart)EPSXDSetKrylovStart_XD282,12162
+#undef __FUNCT____FUNCT__291,12369
+#define __FUNCT__ __FUNCT__292,12386
+PetscErrorCode EPSXDGetKrylovStart_XD(EPS eps,PetscBool *krylovstart)EPSXDGetKrylovStart_XD293,12429
+#undef __FUNCT____FUNCT__302,12638
+#define __FUNCT__ __FUNCT__303,12655
+PetscErrorCode EPSXDSetBlockSize_XD(EPS eps,PetscInt blocksize)EPSXDSetBlockSize_XD304,12696
+#undef __FUNCT____FUNCT__315,13089
+#define __FUNCT__ __FUNCT__316,13106
+PetscErrorCode EPSXDGetBlockSize_XD(EPS eps,PetscInt *blocksize)EPSXDGetBlockSize_XD317,13147
+#undef __FUNCT____FUNCT__326,13347
+#define __FUNCT__ __FUNCT__327,13364
+PetscErrorCode EPSXDSetRestart_XD(EPS eps,PetscInt minv,PetscInt plusk)EPSXDSetRestart_XD328,13403
+#undef __FUNCT____FUNCT__342,13966
+#define __FUNCT__ __FUNCT__343,13983
+PetscErrorCode EPSXDGetRestart_XD(EPS eps,PetscInt *minv,PetscInt *plusk)EPSXDGetRestart_XD344,14022
+#undef __FUNCT____FUNCT__354,14266
+#define __FUNCT__ __FUNCT__355,14283
+PetscErrorCode EPSXDGetInitialSize_XD(EPS eps,PetscInt *initialsize)EPSXDGetInitialSize_XD356,14326
+#undef __FUNCT____FUNCT__365,14534
+#define __FUNCT__ __FUNCT__366,14551
+PetscErrorCode EPSXDSetInitialSize_XD(EPS eps,PetscInt initialsize)EPSXDSetInitialSize_XD367,14594
+#undef __FUNCT____FUNCT__378,15006
+#define __FUNCT__ __FUNCT__379,15023
+PetscErrorCode EPSXDGetFix_XD(EPS eps,PetscReal *fix)EPSXDGetFix_XD380,15058
+#undef __FUNCT____FUNCT__389,15235
+#define __FUNCT__ __FUNCT__390,15252
+PetscErrorCode EPSJDSetFix_JD(EPS eps,PetscReal fix)EPSJDSetFix_JD391,15287
+#undef __FUNCT____FUNCT__402,15631
+#define __FUNCT__ __FUNCT__403,15648
+PetscErrorCode EPSXDSetBOrth_XD(EPS eps,PetscBool borth)EPSXDSetBOrth_XD404,15685
+#undef __FUNCT____FUNCT__413,15866
+#define __FUNCT__ __FUNCT__414,15883
+PetscErrorCode EPSXDGetBOrth_XD(EPS eps,PetscBool *borth)EPSXDGetBOrth_XD415,15920
+#undef __FUNCT____FUNCT__424,16103
+#define __FUNCT__ __FUNCT__425,16120
+PetscErrorCode EPSJDSetConstCorrectionTol_JD(EPS eps,PetscBool constant)EPSJDSetConstCorrectionTol_JD426,16170
+#undef __FUNCT____FUNCT__435,16384
+#define __FUNCT__ __FUNCT__436,16401
+PetscErrorCode EPSJDGetConstCorrectionTol_JD(EPS eps,PetscBool *constant)EPSJDGetConstCorrectionTol_JD437,16451
+#undef __FUNCT____FUNCT__446,16667
+#define __FUNCT__ __FUNCT__447,16684
+PetscErrorCode EPSXDSetWindowSizes_XD(EPS eps,PetscInt pwindow,PetscInt qwindow)EPSXDSetWindowSizes_XD448,16727
+#undef __FUNCT____FUNCT__462,17339
+#define __FUNCT__ __FUNCT__463,17356
+PetscErrorCode EPSXDGetWindowSizes_XD(EPS eps,PetscInt *pwindow,PetscInt *qwindow)EPSXDGetWindowSizes_XD464,17399
+#undef __FUNCT____FUNCT__474,17673
+#define __FUNCT__ __FUNCT__475,17690
+PetscErrorCode EPSComputeVectors_XD(EPS eps)EPSComputeVectors_XD484,18103
+

+src/eps/impls/davidson/davidson.h,9609
 davidson.h:^?davidson.h^A,1
-typedef PetscErrorCode (*dvdCallback)(struct _dvdDashboard*);dvdCallback32,1202
-typedef struct _dvdFunctionList {_dvdFunctionList33,1264
-  dvdCallback f;f34,1298
-  struct _dvdFunctionList *next;next35,1315
-} dvdFunctionList;dvdFunctionList36,1348
-  DVD_HARM_NONE,DVD_HARM_NONE39,1383
-  DVD_HARM_RR,DVD_HARM_RR40,1400
-  DVD_HARM_RRR,DVD_HARM_RRR41,1415
-  DVD_HARM_REIGS,DVD_HARM_REIGS42,1431
-  DVD_HARM_LEIGSDVD_HARM_LEIGS43,1449
-} HarmType_t;HarmType_t44,1466
-  DVD_INITV_CLASSIC,DVD_INITV_CLASSIC47,1496
-  DVD_INITV_KRYLOVDVD_INITV_KRYLOV48,1517
-} InitType_t;InitType_t49,1536
-  DVD_PROJ_KXX,DVD_PROJ_KXX52,1566
-  DVD_PROJ_KZXDVD_PROJ_KZX53,1582
-} ProjType_t;ProjType_t54,1597
-  DVD_METH_GD,DVD_METH_GD57,1627
-  DVD_METH_JD,DVD_METH_JD58,1642
-  DVD_METH_GD2DVD_METH_GD259,1657
-} Method_t;Method_t60,1672
-typedef struct _dvdDashboard {_dvdDashboard67,1783
-  PetscErrorCode (*initV)(struct _dvdDashboard*);initV70,1864
-  void *initV_data;initV_data71,1914
-  PetscErrorCode (*calcPairs)(struct _dvdDashboard*);calcPairs74,1982
-  void *calcPairs_data;calcPairs_data75,2036
-  PetscBool (*testConv)(struct _dvdDashboard*,PetscScalar eigvr,PetscScalar eigvi,PetscReal res,PetscReal *error);testConv78,2100
-  void *testConv_data;testConv_data79,2215
-  PetscErrorCode (*improveX)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);improveX82,2279
-  void *improveX_data;improveX_data83,2375
-  PetscErrorCode (*isRestarting)(struct _dvdDashboard*,PetscBool*);isRestarting86,2428
-  void *isRestarting_data;isRestarting_data87,2496
-  PetscErrorCode (*restartV)(struct _dvdDashboard*);restartV90,2551
-  void *restartV_data;restartV_data91,2604
-  PetscErrorCode (*updateV)(struct _dvdDashboard*);updateV94,2645
-  void *updateV_data;updateV_data95,2697
-  Mat         A,B;            /* problem matrices */A98,2756
-  Mat         A,B;            /* problem matrices */B98,2756
-  MatType_t   sA,sB;          /* matrix specifications */sA99,2809
-  MatType_t   sA,sB;          /* matrix specifications */sB99,2809
-  EPType_t    sEP;            /* problem specifications */sEP100,2867
-  PetscInt    nev;            /* number of eigenpairs */nev101,2926
-  EPSWhich    which;          /* spectrum selection */which102,2983
-  PetscBool   withTarget;     /* if there is a target */withTarget103,3038
-  PetscScalar target[2];      /* target value */target104,3095
-  PetscReal   tol;            /* tolerance */tol105,3144
-  PetscBool   correctXnorm;   /* if true, norm of X are computed */correctXnorm106,3190
-  PetscInt nconv;             /* number of converged eigenpairs */nconv109,3297
-  PetscInt npreconv;          /* number of pairs ready to converge */npreconv110,3364
-  BV       W;                 /* left basis for harmonic case */W112,3435
-  BV       AX;                /* A*V */AX113,3500
-  BV       BX;                /* B*V */BX114,3540
-  PetscInt size_D;            /* active vectors */size_D115,3580
-  PetscInt max_size_proj;     /* max size projected problem */max_size_proj116,3631
-  PetscInt max_cX_in_proj;    /* max vectors from cX in the projected problem */max_cX_in_proj117,3694
-  PetscInt max_cX_in_impr;    /* max vectros from cX in the projector */max_cX_in_impr118,3775
-  PetscInt max_size_P;        /* max unconverged vectors in the projector */max_size_P119,3848
-  PetscInt bs;                /* max vectors that expands the subspace every iteration */bs120,3925
-  EPS eps;                    /* connection to SLEPc */eps121,4015
-  VecPool auxV;               /* auxiliary vectors */auxV124,4102
-  BV      auxBV;              /* auxiliary vectors */auxBV125,4156
-  PetscScalar *ceigr,*ceigi;  /* converged eigenvalues */ceigr128,4248
-  PetscScalar *ceigr,*ceigi;  /* converged eigenvalues */ceigi128,4248
-  PetscScalar *eigr,*eigi;    /* current eigenvalues */eigr129,4306
-  PetscScalar *eigr,*eigi;    /* current eigenvalues */eigi129,4306
-  PetscReal   *nR;            /* residual norm */nR130,4362
-  PetscReal   *real_nR;       /* original nR */real_nR131,4412
-  PetscReal   *nX;            /* X norm */nX132,4460
-  PetscReal   *real_nX;       /* original nX */real_nX133,4503
-  PetscReal   *errest;        /* relative error eigenpairs */errest134,4551
-  PetscReal   *nBds;          /* B-norms of projected problem  */nBds135,4613
-  PetscErrorCode (*e_Vchanged)(struct _dvdDashboard*,PetscInt s_imm,PetscInt e_imm,PetscInt s_new,PetscInt e_new);e_Vchanged138,4724
-  void *e_Vchanged_data;e_Vchanged_data139,4839
-  PetscErrorCode (*calcpairs_residual)(struct _dvdDashboard*,PetscInt s,PetscInt e);calcpairs_residual140,4864
-  PetscErrorCode (*calcpairs_selectPairs)(struct _dvdDashboard*,PetscInt n);calcpairs_selectPairs141,4949
-  void *calcpairs_residual_data;calcpairs_residual_data142,5026
-  PetscErrorCode (*improvex_precond)(struct _dvdDashboard*,PetscInt i,Vec x,Vec Px);improvex_precond143,5059
-  void *improvex_precond_data;improvex_precond_data144,5144
-  PetscErrorCode (*improvex_jd_proj_uv)(struct _dvdDashboard*,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld);improvex_jd_proj_uv145,5175
-  PetscErrorCode (*improvex_jd_lit)(struct _dvdDashboard*,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol);improvex_jd_lit146,5370
-  PetscErrorCode (*calcpairs_W)(struct _dvdDashboard*);calcpairs_W147,5512
-  void *calcpairs_W_data;calcpairs_W_data148,5568
-  PetscErrorCode (*calcpairs_proj_trans)(struct _dvdDashboard*);calcpairs_proj_trans149,5594
-  PetscErrorCode (*calcpairs_eigs_trans)(struct _dvdDashboard*);calcpairs_eigs_trans150,5659
-  PetscErrorCode (*calcpairs_eig_backtrans)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*);calcpairs_eig_backtrans151,5724
-  PetscErrorCode (*calcpairs_proj_res)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,Vec *R);calcpairs_proj_res152,5842
-  PetscErrorCode (*preTestConv)(struct _dvdDashboard*,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv);preTestConv153,5938
-  PetscErrorCode (*e_newIteration)(struct _dvdDashboard*);e_newIteration154,6045
-  void *e_newIteration_data;e_newIteration_data155,6104
-  dvdFunctionList *startList;  /* starting list */startList157,6134
-  dvdFunctionList *endList;    /* ending list */endList158,6185
-  dvdFunctionList *destroyList;/* destructor list */destroyList159,6234
-  Mat       H,G;               /* projected problem matrices */H161,6288
-  Mat       H,G;               /* projected problem matrices */G161,6288
-  Mat       auxM;              /* auxiliary dense matrix */auxM162,6352
-  PetscInt  size_MT;           /* rows in MT */size_MT163,6412
-  PetscInt  V_tra_s;V_tra_s165,6461
-  PetscInt  V_tra_e;       /* cX <- [cX V*MT(0:V_tra_s-1)], V <- V*MT(V_tra_s:V_tra_e) */V_tra_e166,6482
-  PetscInt  V_new_s;V_new_s167,6572
-  PetscInt  V_new_e;           /* added to V the columns V_new_s:V_new_e */V_new_e168,6593
-  PetscBool BV_shift;          /* if true BV is shifted when vectors converge */BV_shift169,6669
-  PetscBool W_shift;           /* if true W is shifted when vectors converge */W_shift170,6750
-  void* prof_data;             /* profiler data */prof_data172,6831
-} dvdDashboard;dvdDashboard173,6882
-#undef __FUNCT____FUNCT__175,6899
-#define __FUNCT__ __FUNCT__176,6916
-PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLAdd(dvdFunctionList **fl,dvdCallback f)EPSDavidsonFLAdd177,6953
-#undef __FUNCT____FUNCT__190,7219
-#define __FUNCT__ __FUNCT__191,7236
-PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLCall(dvdFunctionList *fl,dvdDashboard *d)EPSDavidsonFLCall192,7274
-#undef __FUNCT____FUNCT__202,7524
-#define __FUNCT__ __FUNCT__203,7541
-PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLDestroy(dvdFunctionList **fl)EPSDavidsonFLDestroy204,7582
-  PetscInt max_size_V;         /* max size of the searching subspace (mpd) */max_size_V237,8569
-  PetscInt max_size_X;         /* max size of X (bs) */max_size_X238,8647
-  PetscInt size_V;             /* real size of V (nev+size_P+mpd) */size_V239,8703
-  PetscInt max_size_oldX;      /* max size of oldX */max_size_oldX240,8772
-  PetscInt max_nev;            /* max number of converged pairs */max_nev241,8826
-  PetscInt max_size_P;         /* number of computed vectors for the projector */max_size_P242,8893
-  PetscInt max_size_cP;        /* number of converged vectors in the projectors */max_size_cP243,8975
-  PetscInt max_size_proj;      /* max size projected problem */max_size_proj244,9058
-  PetscInt max_size_cX_proj;   /* max converged vectors in the projected problem */max_size_cX_proj245,9122
-  PetscInt state;              /* method states:state246,9206
-} dvdBlackboard;dvdBlackboard250,9407
-#define DVD_STATE_PRECONF DVD_STATE_PRECONF252,9425
-#define DVD_STATE_CONF DVD_STATE_CONF253,9453
-#define DVD_STATE_RUN DVD_STATE_RUN254,9478
-typedef PetscErrorCode (*dvdPrecond)(dvdDashboard*,PetscInt i,Vec x,Vec Px);dvdPrecond257,9522
-typedef PetscErrorCode (*e_Vchanged_type)(dvdDashboard*,PetscInt s_imm,PetscInt e_imm,PetscInt s_new,PetscInt e_new);e_Vchanged_type258,9599
-typedef PetscErrorCode (*isRestarting_type)(dvdDashboard*,PetscBool*);isRestarting_type259,9717
-typedef PetscErrorCode (*e_newIteration_type)(dvdDashboard*);e_newIteration_type260,9788
-typedef PetscErrorCode (*improveX_type)(dvdDashboard*,Vec *D,PetscInt max_size_D,PetscInt r_s,PetscInt r_e,PetscInt *size_D);improveX_type261,9850
-#undef __FUNCT____FUNCT__324,14150
-#define __FUNCT__ __FUNCT__325,14167
-PETSC_STATIC_INLINE PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)dvd_improvex_compute_X326,14210
+typedef PetscErrorCode (*dvdCallback)(struct _dvdDashboard*);dvdCallback32,1200
+typedef struct _dvdFunctionList {_dvdFunctionList33,1262
+  dvdCallback f;f34,1296
+  struct _dvdFunctionList *next;next35,1313
+} dvdFunctionList;dvdFunctionList36,1346
+  DVD_HARM_NONE,DVD_HARM_NONE39,1381
+  DVD_HARM_RR,DVD_HARM_RR40,1398
+  DVD_HARM_RRR,DVD_HARM_RRR41,1413
+  DVD_HARM_REIGS,DVD_HARM_REIGS42,1429
+  DVD_HARM_LEIGSDVD_HARM_LEIGS43,1447
+} HarmType_t;HarmType_t44,1464
+  DVD_INITV_CLASSIC,DVD_INITV_CLASSIC47,1494
+  DVD_INITV_KRYLOVDVD_INITV_KRYLOV48,1515
+} InitType_t;InitType_t49,1534
+  DVD_PROJ_KXX,DVD_PROJ_KXX52,1564
+  DVD_PROJ_KZXDVD_PROJ_KZX53,1580
+} ProjType_t;ProjType_t54,1595
+typedef struct _dvdDashboard {_dvdDashboard61,1708
+  PetscErrorCode (*initV)(struct _dvdDashboard*);initV64,1789
+  void *initV_data;initV_data65,1839
+  PetscErrorCode (*calcPairs)(struct _dvdDashboard*);calcPairs68,1907
+  void *calcPairs_data;calcPairs_data69,1961
+  PetscBool (*testConv)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscReal,PetscReal*);testConv72,2025
+  void *testConv_data;testConv_data73,2118
+  PetscErrorCode (*improveX)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt*);improveX76,2182
+  void *improveX_data;improveX_data77,2263
+  PetscErrorCode (*isRestarting)(struct _dvdDashboard*,PetscBool*);isRestarting80,2316
+  void *isRestarting_data;isRestarting_data81,2384
+  PetscErrorCode (*restartV)(struct _dvdDashboard*);restartV84,2439
+  void *restartV_data;restartV_data85,2492
+  PetscErrorCode (*updateV)(struct _dvdDashboard*);updateV88,2533
+  void *updateV_data;updateV_data89,2585
+  Mat         A,B;            /* problem matrices */A92,2644
+  Mat         A,B;            /* problem matrices */B92,2644
+  MatType_t   sA,sB;          /* matrix specifications */sA93,2697
+  MatType_t   sA,sB;          /* matrix specifications */sB93,2697
+  EPType_t    sEP;            /* problem specifications */sEP94,2755
+  PetscInt    nev;            /* number of eigenpairs */nev95,2814
+  EPSWhich    which;          /* spectrum selection */which96,2871
+  PetscBool   withTarget;     /* if there is a target */withTarget97,2926
+  PetscScalar target[2];      /* target value */target98,2983
+  PetscReal   tol;            /* tolerance */tol99,3032
+  PetscBool   correctXnorm;   /* if true, norm of X are computed */correctXnorm100,3078
+  PetscInt nconv;             /* number of converged eigenpairs */nconv103,3185
+  PetscInt npreconv;          /* number of pairs ready to converge */npreconv104,3252
+  BV       W;                 /* left basis for harmonic case */W106,3323
+  BV       AX;                /* A*V */AX107,3388
+  BV       BX;                /* B*V */BX108,3428
+  PetscInt size_D;            /* active vectors */size_D109,3468
+  PetscInt max_size_proj;     /* max size projected problem */max_size_proj110,3519
+  PetscInt max_cX_in_proj;    /* max vectors from cX in the projected problem */max_cX_in_proj111,3582
+  PetscInt max_cX_in_impr;    /* max vectros from cX in the projector */max_cX_in_impr112,3663
+  PetscInt max_size_P;        /* max unconverged vectors in the projector */max_size_P113,3736
+  PetscInt bs;                /* max vectors that expands the subspace every iteration */bs114,3813
+  EPS      eps;               /* connection to SLEPc */eps115,3903
+  VecPool auxV;               /* auxiliary vectors */auxV118,3990
+  BV      auxBV;              /* auxiliary vectors */auxBV119,4044
+  PetscScalar *ceigr,*ceigi;  /* converged eigenvalues */ceigr122,4136
+  PetscScalar *ceigr,*ceigi;  /* converged eigenvalues */ceigi122,4136
+  PetscScalar *eigr,*eigi;    /* current eigenvalues */eigr123,4194
+  PetscScalar *eigr,*eigi;    /* current eigenvalues */eigi123,4194
+  PetscReal   *nR;            /* residual norm */nR124,4250
+  PetscReal   *real_nR;       /* original nR */real_nR125,4300
+  PetscReal   *nX;            /* X norm */nX126,4348
+  PetscReal   *real_nX;       /* original nX */real_nX127,4391
+  PetscReal   *errest;        /* relative error eigenpairs */errest128,4439
+  PetscReal   *nBds;          /* B-norms of projected problem  */nBds129,4501
+  PetscErrorCode (*e_Vchanged)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt,PetscInt);e_Vchanged132,4612
+  void *e_Vchanged_data;e_Vchanged_data133,4703
+  PetscErrorCode (*calcpairs_residual)(struct _dvdDashboard*,PetscInt,PetscInt);calcpairs_residual134,4728
+  PetscErrorCode (*calcpairs_selectPairs)(struct _dvdDashboard*,PetscInt);calcpairs_selectPairs135,4809
+  void *calcpairs_residual_data;calcpairs_residual_data136,4884
+  PetscErrorCode (*improvex_precond)(struct _dvdDashboard*,PetscInt,Vec,Vec);improvex_precond137,4917
+  void *improvex_precond_data;improvex_precond_data138,4995
+  PetscErrorCode (*improvex_jd_proj_uv)(struct _dvdDashboard*,PetscInt,PetscInt,Vec*,Vec*,Vec*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt);improvex_jd_proj_uv139,5026
+  PetscErrorCode (*improvex_jd_lit)(struct _dvdDashboard*,PetscInt,PetscScalar*,PetscScalar*,PetscInt*,PetscReal*);improvex_jd_lit140,5184
+  PetscErrorCode (*calcpairs_W)(struct _dvdDashboard*);calcpairs_W141,5300
+  void *calcpairs_W_data;calcpairs_W_data142,5356
+  PetscErrorCode (*calcpairs_proj_trans)(struct _dvdDashboard*);calcpairs_proj_trans143,5382
+  PetscErrorCode (*calcpairs_eigs_trans)(struct _dvdDashboard*);calcpairs_eigs_trans144,5447
+  PetscErrorCode (*calcpairs_eig_backtrans)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*);calcpairs_eig_backtrans145,5512
+  PetscErrorCode (*calcpairs_proj_res)(struct _dvdDashboard*,PetscInt,PetscInt,Vec*);calcpairs_proj_res146,5630
+  PetscErrorCode (*preTestConv)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt,PetscInt*);preTestConv147,5716
+  PetscErrorCode (*e_newIteration)(struct _dvdDashboard*);e_newIteration148,5809
+  void *e_newIteration_data;e_newIteration_data149,5868
+  dvdFunctionList *startList;  /* starting list */startList151,5898
+  dvdFunctionList *endList;    /* ending list */endList152,5949
+  dvdFunctionList *destroyList;/* destructor list */destroyList153,5998
+  Mat       H,G;               /* projected problem matrices */H155,6052
+  Mat       H,G;               /* projected problem matrices */G155,6052
+  Mat       auxM;              /* auxiliary dense matrix */auxM156,6116
+  PetscInt  size_MT;           /* rows in MT */size_MT157,6176
+  PetscInt  V_tra_s;V_tra_s159,6225
+  PetscInt  V_tra_e;       /* cX <- [cX V*MT(0:V_tra_s-1)], V <- V*MT(V_tra_s:V_tra_e) */V_tra_e160,6246
+  PetscInt  V_new_s;V_new_s161,6336
+  PetscInt  V_new_e;           /* added to V the columns V_new_s:V_new_e */V_new_e162,6357
+  PetscBool BV_shift;          /* if true BV is shifted when vectors converge */BV_shift163,6433
+  PetscBool W_shift;           /* if true W is shifted when vectors converge */W_shift164,6514
+} dvdDashboard;dvdDashboard165,6594
+  PetscInt  blocksize;     /* block size */blocksize169,6704
+  PetscInt  initialsize;   /* initial size of V */initialsize170,6748
+  PetscInt  minv;          /* size of V after restarting */minv171,6799
+  PetscInt  plusk;         /* keep plusk eigenvectors from the last iteration */plusk172,6859
+  PetscBool ipB;           /* true if B-ortho is used */ipB173,6940
+  PetscReal fix;           /* the fix parameter */fix174,6997
+  PetscBool krylovstart;   /* true if the starting subspace is a Krylov basis */krylovstart175,7048
+  PetscBool dynamic;       /* true if dynamic stopping criterion is used */dynamic176,7129
+  PetscInt  cX_in_proj;    /* converged vectors in the projected problem */cX_in_proj177,7205
+  PetscInt  cX_in_impr;    /* converged vectors in the projector */cX_in_impr178,7281
+  PetscBool doubleexp;     /* double expansion in GD (GD2) */doubleexp179,7349
+  dvdDashboard ddb;ddb182,7487
+} EPS_DAVIDSON;EPS_DAVIDSON183,7507
+#undef __FUNCT____FUNCT__185,7524
+#define __FUNCT__ __FUNCT__186,7541
+PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLAdd(dvdFunctionList **fl,dvdCallback f)EPSDavidsonFLAdd187,7578
+#undef __FUNCT____FUNCT__200,7844
+#define __FUNCT__ __FUNCT__201,7861
+PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLCall(dvdFunctionList *fl,dvdDashboard *d)EPSDavidsonFLCall202,7899
+#undef __FUNCT____FUNCT__212,8149
+#define __FUNCT__ __FUNCT__213,8166
+PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLDestroy(dvdFunctionList **fl)EPSDavidsonFLDestroy214,8207
+  PetscInt max_size_V;         /* max size of the searching subspace (mpd) */max_size_V247,9194
+  PetscInt max_size_X;         /* max size of X (bs) */max_size_X248,9272
+  PetscInt size_V;             /* real size of V (nev+size_P+mpd) */size_V249,9328
+  PetscInt max_size_oldX;      /* max size of oldX */max_size_oldX250,9397
+  PetscInt max_nev;            /* max number of converged pairs */max_nev251,9451
+  PetscInt max_size_P;         /* number of computed vectors for the projector */max_size_P252,9518
+  PetscInt max_size_cP;        /* number of converged vectors in the projectors */max_size_cP253,9600
+  PetscInt max_size_proj;      /* max size projected problem */max_size_proj254,9683
+  PetscInt max_size_cX_proj;   /* max converged vectors in the projected problem */max_size_cX_proj255,9747
+  PetscInt state;              /* method states:state256,9831
+} dvdBlackboard;dvdBlackboard260,10032
+#define DVD_STATE_PRECONF DVD_STATE_PRECONF262,10050
+#define DVD_STATE_CONF DVD_STATE_CONF263,10078
+#define DVD_STATE_RUN DVD_STATE_RUN264,10103
 

 src/eps/impls/davidson/dvdcalcpairs.c,2445
 dvdcalcpairs.c:^?dvdcalcpairs.c^A,1
@@ -2896,24 +3160,24 @@ PETSC_STATIC_INLINE PetscErrorCode dvd_calcpairs_updateBV0_gen(dvdDashboard *d,B
 #undef __FUNCT____FUNCT__238,9563
 #define __FUNCT__ __FUNCT__239,9580
 static PetscErrorCode dvd_calcpairs_proj(dvdDashboard *d)dvd_calcpairs_proj240,9619
-#undef __FUNCT____FUNCT__332,13686
-#define __FUNCT__ __FUNCT__333,13703
-static PetscErrorCode dvd_calcpairs_apply_arbitrary(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscScalar *rr,PetscScalar *ri)dvd_calcpairs_apply_arbitrary334,13753
-#undef __FUNCT____FUNCT__398,15771
-#define __FUNCT__ __FUNCT__399,15788
-static PetscErrorCode dvd_calcpairs_selectPairs(dvdDashboard *d,PetscInt n)dvd_calcpairs_selectPairs400,15834
-#undef __FUNCT____FUNCT__442,17130
-#define __FUNCT__ __FUNCT__443,17147
-static PetscErrorCode EPSXDComputeDSConv(dvdDashboard *d)EPSXDComputeDSConv444,17186
-#undef __FUNCT____FUNCT__485,18959
-#define __FUNCT__ __FUNCT__486,18976
-static PetscErrorCode dvd_calcpairs_res_0(dvdDashboard *d,PetscInt r_s,PetscInt r_e)dvd_calcpairs_res_0491,19157
-#undef __FUNCT____FUNCT__517,20168
-#define __FUNCT__ __FUNCT__518,20185
-static PetscErrorCode dvd_calcpairs_proj_res(dvdDashboard *d,PetscInt r_s,PetscInt r_e,Vec *R)dvd_calcpairs_proj_res519,20228
-#undef __FUNCT____FUNCT__552,21484
-#define __FUNCT__ __FUNCT__553,21501
-PetscErrorCode dvd_calcpairs_qz(dvdDashboard *d,dvdBlackboard *b,PetscBool borth,PetscInt cX_proj,PetscBool harm)dvd_calcpairs_qz554,21538
+#undef __FUNCT____FUNCT__332,13660
+#define __FUNCT__ __FUNCT__333,13677
+static PetscErrorCode dvd_calcpairs_apply_arbitrary(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscScalar *rr,PetscScalar *ri)dvd_calcpairs_apply_arbitrary334,13727
+#undef __FUNCT____FUNCT__397,15684
+#define __FUNCT__ __FUNCT__398,15701
+static PetscErrorCode dvd_calcpairs_selectPairs(dvdDashboard *d,PetscInt n)dvd_calcpairs_selectPairs399,15747
+#undef __FUNCT____FUNCT__441,17043
+#define __FUNCT__ __FUNCT__442,17060
+static PetscErrorCode EPSXDComputeDSConv(dvdDashboard *d)EPSXDComputeDSConv443,17099
+#undef __FUNCT____FUNCT__484,18872
+#define __FUNCT__ __FUNCT__485,18889
+static PetscErrorCode dvd_calcpairs_res_0(dvdDashboard *d,PetscInt r_s,PetscInt r_e)dvd_calcpairs_res_0490,19070
+#undef __FUNCT____FUNCT__516,20081
+#define __FUNCT__ __FUNCT__517,20098
+static PetscErrorCode dvd_calcpairs_proj_res(dvdDashboard *d,PetscInt r_s,PetscInt r_e,Vec *R)dvd_calcpairs_proj_res518,20141
+#undef __FUNCT____FUNCT__551,21409
+#define __FUNCT__ __FUNCT__552,21426
+PetscErrorCode dvd_calcpairs_qz(dvdDashboard *d,dvdBlackboard *b,PetscBool borth,PetscInt cX_proj,PetscBool harm)dvd_calcpairs_qz553,21463
 

 src/eps/impls/davidson/dvdgd2.c,628
 dvdgd2.c:^?dvdgd2.c^A,1
@@ -2925,11 +3189,11 @@ static PetscErrorCode dvd_improvex_gd2_d(dvdDashboard *d)dvd_improvex_gd2_d34,
 #undef __FUNCT____FUNCT__45,1411
 #define __FUNCT__ __FUNCT__46,1428
 static PetscErrorCode dvd_improvex_gd2_gen(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)dvd_improvex_gd2_gen47,1469
-#undef __FUNCT____FUNCT__216,7386
-#define __FUNCT__ __FUNCT__217,7403
-PetscErrorCode dvd_improvex_gd2(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs)dvd_improvex_gd2218,7440
+#undef __FUNCT____FUNCT__215,7321
+#define __FUNCT__ __FUNCT__216,7338
+PetscErrorCode dvd_improvex_gd2(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs)dvd_improvex_gd2217,7375
 

-src/eps/impls/davidson/dvdimprovex.c,6957
+src/eps/impls/davidson/dvdimprovex.c,7186
 dvdimprovex.c:^?dvdimprovex.c^A,1
   PetscInt     size_X;size_X32,1160
   KSP          ksp;                /* correction equation solver */ksp33,1183
@@ -2999,35 +3263,38 @@ static PetscErrorCode dvd_improvex_jd_start(dvdDashboard *d)dvd_improvex_jd_sta
 #undef __FUNCT____FUNCT__603,20907
 #define __FUNCT__ __FUNCT__604,20924
 static PetscErrorCode dvd_improvex_jd_proj_cuv(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)dvd_improvex_jd_proj_cuv612,21221
-#undef __FUNCT____FUNCT__682,24134
-#define __FUNCT__ __FUNCT__683,24151
-static PetscErrorCode dvd_improvex_jd_gen(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)dvd_improvex_jd_gen684,24191
-#undef __FUNCT____FUNCT__815,29437
-#define __FUNCT__ __FUNCT__816,29454
-PetscErrorCode dvd_improvex_jd(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs,PetscInt cX_impr,PetscBool dynamic)dvd_improvex_jd817,29490
-#undef __FUNCT____FUNCT__883,31728
-#define __FUNCT__ __FUNCT__884,31745
-PETSC_STATIC_INLINE PetscErrorCode dvd_complex_rayleigh_quotient(Vec ur,Vec ui,Vec Axr,Vec Axi,Vec Bxr,Vec Bxi,PetscScalar *eigr,PetscScalar *eigi)dvd_complex_rayleigh_quotient885,31795
-#undef __FUNCT____FUNCT__921,33468
-#define __FUNCT__ __FUNCT__922,33485
-PETSC_STATIC_INLINE PetscErrorCode dvd_compute_n_rr(PetscInt i_s,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,Vec *u,Vec *Ax,Vec *Bx)dvd_compute_n_rr923,33522
-#undef __FUNCT____FUNCT__955,34962
-#define __FUNCT__ __FUNCT__956,34979
-static PetscErrorCode dvd_improvex_jd_proj_uv_KZX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)dvd_improvex_jd_proj_uv_KZX964,35279
-#undef __FUNCT____FUNCT__1074,39165
-#define __FUNCT__ __FUNCT__1075,39182
-static PetscErrorCode dvd_improvex_jd_proj_uv_KXX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)dvd_improvex_jd_proj_uv_KXX1083,39440
-#undef __FUNCT____FUNCT__1164,42189
-#define __FUNCT__ __FUNCT__1165,42206
-static PetscErrorCode dvd_improvex_jd_lit_const_0(dvdDashboard *d,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol)dvd_improvex_jd_lit_const_01166,42254
-#undef __FUNCT____FUNCT__1196,42974
-#define __FUNCT__ __FUNCT__1197,42991
-PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard *d,dvdBlackboard *b,PetscInt maxits,PetscReal tol,PetscReal fix)dvd_improvex_jd_lit_const1198,43037
-#undef __FUNCT____FUNCT__1213,43457
-#define __FUNCT__ __FUNCT__1214,43474
-PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard *d,dvdBlackboard *b,ProjType_t p)dvd_improvex_jd_proj_uv1215,43518
-

-src/eps/impls/davidson/dvdinitv.c,1093
+#undef __FUNCT____FUNCT__694,24707
+#define __FUNCT__ __FUNCT__695,24724
+static PetscErrorCode dvd_improvex_jd_gen(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)dvd_improvex_jd_gen696,24764
+#undef __FUNCT____FUNCT__825,29880
+#define __FUNCT__ __FUNCT__826,29897
+PetscErrorCode dvd_improvex_jd(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs,PetscInt cX_impr,PetscBool dynamic)dvd_improvex_jd827,29933
+#undef __FUNCT____FUNCT__893,32171
+#define __FUNCT__ __FUNCT__894,32188
+PETSC_STATIC_INLINE PetscErrorCode dvd_complex_rayleigh_quotient(Vec ur,Vec ui,Vec Axr,Vec Axi,Vec Bxr,Vec Bxi,PetscScalar *eigr,PetscScalar *eigi)dvd_complex_rayleigh_quotient895,32238
+#undef __FUNCT____FUNCT__931,33911
+#define __FUNCT__ __FUNCT__932,33928
+PETSC_STATIC_INLINE PetscErrorCode dvd_compute_n_rr(PetscInt i_s,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,Vec *u,Vec *Ax,Vec *Bx)dvd_compute_n_rr933,33965
+#undef __FUNCT____FUNCT__965,35433
+#define __FUNCT__ __FUNCT__966,35450
+static PetscErrorCode dvd_improvex_jd_proj_uv_KZX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)dvd_improvex_jd_proj_uv_KZX974,35750
+#undef __FUNCT____FUNCT__1084,39636
+#define __FUNCT__ __FUNCT__1085,39653
+static PetscErrorCode dvd_improvex_jd_proj_uv_KXX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)dvd_improvex_jd_proj_uv_KXX1093,39911
+#undef __FUNCT____FUNCT__1174,42660
+#define __FUNCT__ __FUNCT__1175,42677
+static PetscErrorCode dvd_improvex_jd_lit_const_0(dvdDashboard *d,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol)dvd_improvex_jd_lit_const_01176,42725
+#undef __FUNCT____FUNCT__1206,43445
+#define __FUNCT__ __FUNCT__1207,43462
+PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard *d,dvdBlackboard *b,PetscInt maxits,PetscReal tol,PetscReal fix)dvd_improvex_jd_lit_const1208,43508
+#undef __FUNCT____FUNCT__1223,43928
+#define __FUNCT__ __FUNCT__1224,43945
+PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard *d,dvdBlackboard *b,ProjType_t p)dvd_improvex_jd_proj_uv1225,43989
+#undef __FUNCT____FUNCT__1242,44406
+#define __FUNCT__ __FUNCT__1243,44423
+PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)dvd_improvex_compute_X1244,44466
+

+src/eps/impls/davidson/dvdinitv.c,1076
 dvdinitv.c:^?dvdinitv.c^A,1
   PetscInt k;                 /* desired initial subspace size */k29,1022
   PetscInt user;              /* number of user initial vectors */user30,1088
@@ -3036,85 +3303,85 @@ dvdinitv.c:^?dvdinitv.c^A,1
 #undef __FUNCT____FUNCT__34,1219
 #define __FUNCT__ __FUNCT__35,1236
 static PetscErrorCode dvd_initV_classic_0(dvdDashboard *d)dvd_initV_classic_036,1276
-#undef __FUNCT____FUNCT__55,1870
-#define __FUNCT__ __FUNCT__56,1887
-static PetscErrorCode dvd_initV_krylov_0(dvdDashboard *d)dvd_initV_krylov_057,1926
-#undef __FUNCT____FUNCT__101,3569
-#define __FUNCT__ __FUNCT__102,3586
-static PetscErrorCode dvd_initV_d(dvdDashboard *d)dvd_initV_d103,3618
-#undef __FUNCT____FUNCT__117,3942
-#define __FUNCT__ __FUNCT__118,3959
-PetscErrorCode dvd_initV(dvdDashboard *d, dvdBlackboard *b, PetscInt k,PetscInt user, PetscBool krylov)dvd_initV119,3989
-#undef __FUNCT____FUNCT__142,4678
-#define __FUNCT__ __FUNCT__143,4695
-PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e,PetscRandom rand)dvd_orthV144,4725
-

-src/eps/impls/davidson/dvdschm.c,918
+#undef __FUNCT____FUNCT__55,1857
+#define __FUNCT__ __FUNCT__56,1874
+static PetscErrorCode dvd_initV_krylov_0(dvdDashboard *d)dvd_initV_krylov_057,1913
+#undef __FUNCT____FUNCT__101,3517
+#define __FUNCT__ __FUNCT__102,3534
+static PetscErrorCode dvd_initV_d(dvdDashboard *d)dvd_initV_d103,3566
+#undef __FUNCT____FUNCT__117,3890
+#define __FUNCT__ __FUNCT__118,3907
+PetscErrorCode dvd_initV(dvdDashboard *d, dvdBlackboard *b, PetscInt k,PetscInt user, PetscBool krylov)dvd_initV119,3937
+#undef __FUNCT____FUNCT__142,4626
+#define __FUNCT__ __FUNCT__143,4643
+PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e)dvd_orthV144,4673
+

+src/eps/impls/davidson/dvdschm.c,926
 dvdschm.c:^?dvdschm.c^A,1
 #define DVD_CHECKSUM(DVD_CHECKSUM24,947
 #undef __FUNCT____FUNCT__26,1011
 #define __FUNCT__ __FUNCT__27,1028
-PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,Method_t method)dvd_schm_basic_preconf28,1071
-#undef __FUNCT____FUNCT__70,2927
-#define __FUNCT__ __FUNCT__71,2944
-PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,Method_t method)dvd_schm_basic_conf72,2984
+PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool doubleexp)dvd_schm_basic_preconf28,1071
+#undef __FUNCT____FUNCT__66,2822
+#define __FUNCT__ __FUNCT__67,2839
+PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,PetscBool doubleexp)dvd_schm_basic_conf68,2879
 

 src/eps/impls/davidson/dvdtestconv.c,774
 dvdtestconv.c:^?dvdtestconv.c^A,1
 #undef __FUNCT____FUNCT__28,1010
 #define __FUNCT__ __FUNCT__29,1027
 static PetscBool dvd_testconv_basic_0(dvdDashboard *d,PetscScalar eigvr,PetscScalar eigvi,PetscReal r,PetscReal *err)dvd_testconv_basic_030,1068
-#undef __FUNCT____FUNCT__43,1440
-#define __FUNCT__ __FUNCT__44,1457
-PetscErrorCode dvd_testconv_basic(dvdDashboard *d, dvdBlackboard *b)dvd_testconv_basic45,1496
-#undef __FUNCT____FUNCT__58,1799
-#define __FUNCT__ __FUNCT__59,1816
-static PetscBool dvd_testconv_slepc_0(dvdDashboard *d,PetscScalar eigvr,PetscScalar eigvi,PetscReal r,PetscReal *err)dvd_testconv_slepc_060,1857
-#undef __FUNCT____FUNCT__69,2227
-#define __FUNCT__ __FUNCT__70,2244
-PetscErrorCode dvd_testconv_slepc(dvdDashboard *d, dvdBlackboard *b)dvd_testconv_slepc71,2283
-

-src/eps/impls/davidson/dvdupdatev.c,2548
+#undef __FUNCT____FUNCT__43,1422
+#define __FUNCT__ __FUNCT__44,1439
+PetscErrorCode dvd_testconv_basic(dvdDashboard *d, dvdBlackboard *b)dvd_testconv_basic45,1478
+#undef __FUNCT____FUNCT__58,1781
+#define __FUNCT__ __FUNCT__59,1798
+static PetscBool dvd_testconv_slepc_0(dvdDashboard *d,PetscScalar eigvr,PetscScalar eigvi,PetscReal r,PetscReal *err)dvd_testconv_slepc_060,1839
+#undef __FUNCT____FUNCT__69,2193
+#define __FUNCT__ __FUNCT__70,2210
+PetscErrorCode dvd_testconv_slepc(dvdDashboard *d, dvdBlackboard *b)dvd_testconv_slepc71,2249
+

+src/eps/impls/davidson/dvdupdatev.c,2577
 dvdupdatev.c:^?dvdupdatev.c^A,1
-  PetscInt          min_size_V;        /* restart with this number of eigenvectors */min_size_V30,1079
-  PetscInt          plusk;             /* at restart, save plusk vectors from last iteration */plusk31,1165
-  PetscInt          mpd;               /* max size of the searching subspace */mpd32,1261
-  void              *old_updateV_data; /* old updateV data */old_updateV_data33,1341
-  isRestarting_type old_isRestarting;  /* old isRestarting */old_isRestarting34,1403
-  Mat               oldU;              /* previous projected right igenvectors */oldU35,1465
-  Mat               oldV;              /* previous projected left eigenvectors */oldV36,1547
-  PetscInt          size_oldU;         /* size of oldU */size_oldU37,1629
-  PetscBool         allResiduals;      /* if computing all the residuals */allResiduals38,1687
-} dvdManagV_basic;dvdManagV_basic39,1763
-#undef __FUNCT____FUNCT__41,1783
-#define __FUNCT__ __FUNCT__42,1800
-static PetscErrorCode dvd_updateV_start(dvdDashboard *d)dvd_updateV_start43,1838
-#undef __FUNCT____FUNCT__62,2373
-#define __FUNCT__ __FUNCT__63,2390
-static PetscErrorCode dvd_isrestarting_fullV(dvdDashboard *d,PetscBool *r)dvd_isrestarting_fullV64,2433
-#undef __FUNCT____FUNCT__83,2981
-#define __FUNCT__ __FUNCT__84,2998
-static PetscErrorCode dvd_managementV_basic_d(dvdDashboard *d)dvd_managementV_basic_d85,3042
-#undef __FUNCT____FUNCT__103,3621
-#define __FUNCT__ __FUNCT__104,3638
-static PetscErrorCode dvd_updateV_conv_gen(dvdDashboard *d)dvd_updateV_conv_gen105,3679
-#undef __FUNCT____FUNCT__168,5859
-#define __FUNCT__ __FUNCT__169,5876
-static PetscErrorCode dvd_updateV_restart_gen(dvdDashboard *d)dvd_updateV_restart_gen170,5920
-#undef __FUNCT____FUNCT__224,8197
-#define __FUNCT__ __FUNCT__225,8214
-static PetscErrorCode dvd_updateV_testConv(dvdDashboard *d,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv)dvd_updateV_testConv226,8255
-#undef __FUNCT____FUNCT__266,9413
-#define __FUNCT__ __FUNCT__267,9430
-static PetscErrorCode dvd_updateV_update_gen(dvdDashboard *d)dvd_updateV_update_gen268,9473
-#undef __FUNCT____FUNCT__318,11012
-#define __FUNCT__ __FUNCT__319,11029
-static PetscErrorCode dvd_updateV_extrapol(dvdDashboard *d)dvd_updateV_extrapol320,11070
-#undef __FUNCT____FUNCT__355,12074
-#define __FUNCT__ __FUNCT__356,12091
-PetscErrorCode dvd_managementV_basic(dvdDashboard *d,dvdBlackboard *b,PetscInt bs,PetscInt mpd,PetscInt min_size_V,PetscInt plusk,PetscBool harm,PetscBool allResiduals)dvd_managementV_basic357,12133
-

-src/eps/impls/davidson/dvdutils.c,5536
+  PetscInt          min_size_V;        /* restart with this number of eigenvectors */min_size_V29,1045
+  PetscInt          plusk;             /* at restart, save plusk vectors from last iteration */plusk30,1131
+  PetscInt          mpd;               /* max size of the searching subspace */mpd31,1227
+  void              *old_updateV_data; /* old updateV data */old_updateV_data32,1307
+  PetscErrorCode    (*old_isRestarting)(dvdDashboard*,PetscBool*);  /* old isRestarting */old_isRestarting33,1369
+  Mat               oldU;              /* previous projected right igenvectors */oldU34,1460
+  Mat               oldV;              /* previous projected left eigenvectors */oldV35,1542
+  PetscInt          size_oldU;         /* size of oldU */size_oldU36,1624
+  PetscBool         allResiduals;      /* if computing all the residuals */allResiduals37,1682
+} dvdManagV_basic;dvdManagV_basic38,1758
+#undef __FUNCT____FUNCT__40,1778
+#define __FUNCT__ __FUNCT__41,1795
+static PetscErrorCode dvd_updateV_start(dvdDashboard *d)dvd_updateV_start42,1833
+#undef __FUNCT____FUNCT__61,2368
+#define __FUNCT__ __FUNCT__62,2385
+static PetscErrorCode dvd_isrestarting_fullV(dvdDashboard *d,PetscBool *r)dvd_isrestarting_fullV63,2428
+#undef __FUNCT____FUNCT__82,2976
+#define __FUNCT__ __FUNCT__83,2993
+static PetscErrorCode dvd_managementV_basic_d(dvdDashboard *d)dvd_managementV_basic_d84,3037
+#undef __FUNCT____FUNCT__102,3616
+#define __FUNCT__ __FUNCT__103,3633
+static PetscErrorCode dvd_updateV_conv_gen(dvdDashboard *d)dvd_updateV_conv_gen104,3674
+#undef __FUNCT____FUNCT__167,5854
+#define __FUNCT__ __FUNCT__168,5871
+static PetscErrorCode dvd_updateV_restart_gen(dvdDashboard *d)dvd_updateV_restart_gen169,5915
+#undef __FUNCT____FUNCT__223,8192
+#define __FUNCT__ __FUNCT__224,8209
+static PetscErrorCode dvd_updateV_testConv(dvdDashboard *d,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv)dvd_updateV_testConv225,8250
+#undef __FUNCT____FUNCT__265,9408
+#define __FUNCT__ __FUNCT__266,9425
+static PetscErrorCode dvd_updateV_update_gen(dvdDashboard *d)dvd_updateV_update_gen267,9468
+#undef __FUNCT____FUNCT__317,11007
+#define __FUNCT__ __FUNCT__318,11024
+static PetscErrorCode dvd_updateV_extrapol(dvdDashboard *d)dvd_updateV_extrapol319,11065
+#undef __FUNCT____FUNCT__354,12069
+#define __FUNCT__ __FUNCT__355,12086
+PetscErrorCode dvd_managementV_basic(dvdDashboard *d,dvdBlackboard *b,PetscInt bs,PetscInt mpd,PetscInt min_size_V,PetscInt plusk,PetscBool harm,PetscBool allResiduals)dvd_managementV_basic356,12128
+

+src/eps/impls/davidson/dvdutils.c,3427
 dvdutils.c:^?dvdutils.c^A,1
   PC pc;pc29,1011
 } dvdPCWrapper;dvdPCWrapper30,1020
@@ -3128,154 +3395,120 @@ dvdutils.c:^?dvdutils.c^A,1
   Vec diagA, diagB;diagA51,1581
   Vec diagA, diagB;diagB51,1581
 } dvdJacobiPrecond;dvdJacobiPrecond52,1601
-#define DVD_STAGE_INITV DVD_STAGE_INITV59,1683
-#define DVD_STAGE_NEWITER DVD_STAGE_NEWITER60,1709
-#define DVD_STAGE_CALCPAIRS DVD_STAGE_CALCPAIRS61,1737
-#define DVD_STAGE_IMPROVEX DVD_STAGE_IMPROVEX62,1767
-#define DVD_STAGE_UPDATEV DVD_STAGE_UPDATEV63,1796
-#define DVD_STAGE_ORTHV DVD_STAGE_ORTHV64,1824
-  PetscErrorCode (*old_initV)(struct _dvdDashboard*);old_initV67,1868
-  PetscErrorCode (*old_calcPairs)(struct _dvdDashboard*);old_calcPairs68,1922
-  PetscErrorCode (*old_improveX)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);old_improveX69,1980
-  PetscErrorCode (*old_updateV)(struct _dvdDashboard*);old_updateV70,2080
-  PetscErrorCode (*old_orthV)(struct _dvdDashboard*);old_orthV71,2136
-} DvdProfiler;DvdProfiler72,2190
-static PetscLogStage stages[6] = {0,0,0,0,0,0};stages74,2206
-#undef __FUNCT____FUNCT__76,2255
-#define __FUNCT__ __FUNCT__77,2272
-static PetscErrorCode dvd_improvex_precond_d(dvdDashboard *d)dvd_improvex_precond_d78,2315
-#undef __FUNCT____FUNCT__90,2670
-#define __FUNCT__ __FUNCT__91,2687
-static PetscErrorCode dvd_static_precond_PC_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)dvd_static_precond_PC_092,2731
-#undef __FUNCT____FUNCT__102,3010
-#define __FUNCT__ __FUNCT__103,3027
-static PetscErrorCode dvd_precond_none(dvdDashboard *d,PetscInt i,Vec x,Vec Px)dvd_precond_none107,3104
-#undef __FUNCT____FUNCT__116,3299
-#define __FUNCT__ __FUNCT__117,3316
-PetscErrorCode dvd_static_precond_PC(dvdDashboard *d,dvdBlackboard *b,PC pc)dvd_static_precond_PC121,3407
-#undef __FUNCT____FUNCT__165,5042
-#define __FUNCT__ __FUNCT__166,5059
-static PetscErrorCode dvd_jacobi_precond_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)dvd_jacobi_precond_0167,5100
-#undef __FUNCT____FUNCT__188,5724
-#define __FUNCT__ __FUNCT__189,5741
-static PetscErrorCode dvd_jacobi_precond_d(dvdDashboard *d)dvd_jacobi_precond_d190,5782
-#undef __FUNCT____FUNCT__202,6198
-#define __FUNCT__ __FUNCT__203,6215
-PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b)dvd_jacobi_precond207,6325
-#undef __FUNCT____FUNCT__244,7498
-#define __FUNCT__ __FUNCT__245,7515
-PetscErrorCode dvd_prof_init()dvd_prof_init246,7549
-#undef __FUNCT____FUNCT__261,8154
-#define __FUNCT__ __FUNCT__262,8171
-PetscErrorCode dvd_initV_prof(dvdDashboard* d)dvd_initV_prof263,8206
-#undef __FUNCT____FUNCT__275,8488
-#define __FUNCT__ __FUNCT__276,8505
-static PetscErrorCode dvd_calcPairs_prof(dvdDashboard* d)dvd_calcPairs_prof277,8544
-#undef __FUNCT____FUNCT__289,8845
-#define __FUNCT__ __FUNCT__290,8862
-static PetscErrorCode dvd_improveX_prof(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)dvd_improveX_prof291,8900
-#undef __FUNCT____FUNCT__303,9256
-#define __FUNCT__ __FUNCT__304,9273
-static PetscErrorCode dvd_updateV_prof(dvdDashboard *d)dvd_updateV_prof305,9310
-#undef __FUNCT____FUNCT__317,9605
-#define __FUNCT__ __FUNCT__318,9622
-static PetscErrorCode dvd_profiler_d(dvdDashboard *d)dvd_profiler_d319,9657
-#undef __FUNCT____FUNCT__330,9899
-#define __FUNCT__ __FUNCT__331,9916
-PetscErrorCode dvd_profiler(dvdDashboard *d,dvdBlackboard *b)dvd_profiler332,9949
-#undef __FUNCT____FUNCT__353,10629
-#define __FUNCT__ __FUNCT__354,10646
-static PetscErrorCode dvd_harm_d(dvdDashboard *d)dvd_harm_d355,10677
-#undef __FUNCT____FUNCT__365,10883
-#define __FUNCT__ __FUNCT__366,10900
-static PetscErrorCode dvd_harm_transf(dvdHarmonic *dvdh,PetscScalar t)dvd_harm_transf367,10936
-#undef __FUNCT____FUNCT__398,11923
-#define __FUNCT__ __FUNCT__399,11940
-static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)dvd_harm_updateW400,11977
-#undef __FUNCT____FUNCT__432,13209
-#define __FUNCT__ __FUNCT__433,13226
-static PetscErrorCode dvd_harm_proj(dvdDashboard *d)dvd_harm_proj434,13260
-#undef __FUNCT____FUNCT__472,14326
-#define __FUNCT__ __FUNCT__473,14343
-PetscErrorCode dvd_harm_updateproj(dvdDashboard *d)dvd_harm_updateproj474,14383
-#undef __FUNCT____FUNCT__511,15430
-#define __FUNCT__ __FUNCT__512,15447
-static PetscErrorCode dvd_harm_backtrans(dvdHarmonic *data,PetscScalar *ar,PetscScalar *ai)dvd_harm_backtrans513,15486
-#undef __FUNCT____FUNCT__537,16174
-#define __FUNCT__ __FUNCT__538,16191
-static PetscErrorCode dvd_harm_eig_backtrans(dvdDashboard *d,PetscScalar ar,PetscScalar ai,PetscScalar *br,PetscScalar *bi)dvd_harm_eig_backtrans539,16234
-#undef __FUNCT____FUNCT__551,16576
-#define __FUNCT__ __FUNCT__552,16593
-static PetscErrorCode dvd_harm_eigs_trans(dvdDashboard *d)dvd_harm_eigs_trans553,16633
-#undef __FUNCT____FUNCT__567,17016
-#define __FUNCT__ __FUNCT__568,17033
-PetscErrorCode dvd_harm_conf(dvdDashboard *d,dvdBlackboard *b,HarmType_t mode,PetscBool fixedTarget,PetscScalar t)dvd_harm_conf569,17067
-#undef __FUNCT____FUNCT__596,17935
-#define __FUNCT__ __FUNCT__597,17952
-PetscErrorCode BVMultS(BV X,BV Y,PetscScalar *H,PetscInt ldh)BVMultS603,18099
-

-src/eps/impls/davidson/gd/gd.c,3348
+#undef __FUNCT____FUNCT__54,1622
+#define __FUNCT__ __FUNCT__55,1639
+static PetscErrorCode dvd_improvex_precond_d(dvdDashboard *d)dvd_improvex_precond_d56,1682
+#undef __FUNCT____FUNCT__68,2037
+#define __FUNCT__ __FUNCT__69,2054
+static PetscErrorCode dvd_static_precond_PC_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)dvd_static_precond_PC_070,2098
+#undef __FUNCT____FUNCT__80,2377
+#define __FUNCT__ __FUNCT__81,2394
+static PetscErrorCode dvd_precond_none(dvdDashboard *d,PetscInt i,Vec x,Vec Px)dvd_precond_none85,2471
+#undef __FUNCT____FUNCT__94,2666
+#define __FUNCT__ __FUNCT__95,2683
+PetscErrorCode dvd_static_precond_PC(dvdDashboard *d,dvdBlackboard *b,PC pc)dvd_static_precond_PC99,2774
+#undef __FUNCT____FUNCT__143,4409
+#define __FUNCT__ __FUNCT__144,4426
+static PetscErrorCode dvd_jacobi_precond_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)dvd_jacobi_precond_0145,4467
+#undef __FUNCT____FUNCT__166,5091
+#define __FUNCT__ __FUNCT__167,5108
+static PetscErrorCode dvd_jacobi_precond_d(dvdDashboard *d)dvd_jacobi_precond_d168,5149
+#undef __FUNCT____FUNCT__180,5565
+#define __FUNCT__ __FUNCT__181,5582
+PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b)dvd_jacobi_precond185,5692
+#undef __FUNCT____FUNCT__222,6865
+#define __FUNCT__ __FUNCT__223,6882
+static PetscErrorCode dvd_harm_d(dvdDashboard *d)dvd_harm_d224,6913
+#undef __FUNCT____FUNCT__234,7119
+#define __FUNCT__ __FUNCT__235,7136
+static PetscErrorCode dvd_harm_transf(dvdHarmonic *dvdh,PetscScalar t)dvd_harm_transf236,7172
+#undef __FUNCT____FUNCT__267,8159
+#define __FUNCT__ __FUNCT__268,8176
+static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)dvd_harm_updateW269,8213
+#undef __FUNCT____FUNCT__297,9311
+#define __FUNCT__ __FUNCT__298,9328
+static PetscErrorCode dvd_harm_proj(dvdDashboard *d)dvd_harm_proj299,9362
+#undef __FUNCT____FUNCT__337,10428
+#define __FUNCT__ __FUNCT__338,10445
+PetscErrorCode dvd_harm_updateproj(dvdDashboard *d)dvd_harm_updateproj339,10485
+#undef __FUNCT____FUNCT__376,11532
+#define __FUNCT__ __FUNCT__377,11549
+static PetscErrorCode dvd_harm_backtrans(dvdHarmonic *data,PetscScalar *ar,PetscScalar *ai)dvd_harm_backtrans378,11588
+#undef __FUNCT____FUNCT__402,12276
+#define __FUNCT__ __FUNCT__403,12293
+static PetscErrorCode dvd_harm_eig_backtrans(dvdDashboard *d,PetscScalar ar,PetscScalar ai,PetscScalar *br,PetscScalar *bi)dvd_harm_eig_backtrans404,12336
+#undef __FUNCT____FUNCT__416,12678
+#define __FUNCT__ __FUNCT__417,12695
+static PetscErrorCode dvd_harm_eigs_trans(dvdDashboard *d)dvd_harm_eigs_trans418,12735
+#undef __FUNCT____FUNCT__432,13118
+#define __FUNCT__ __FUNCT__433,13135
+PetscErrorCode dvd_harm_conf(dvdDashboard *d,dvdBlackboard *b,HarmType_t mode,PetscBool fixedTarget,PetscScalar t)dvd_harm_conf434,13169
+

+src/eps/impls/davidson/gd/gd.c,3522
 gd.c:^?gd.c^A,1
 #undef __FUNCT____FUNCT__44,1538
 #define __FUNCT__ __FUNCT__45,1555
-PetscErrorCode EPSSetFromOptions_GD(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_GD46,1596
-#undef __FUNCT____FUNCT__106,4818
-#define __FUNCT__ __FUNCT__107,4835
-PetscErrorCode EPSSetUp_GD(EPS eps)EPSSetUp_GD108,4867
-#undef __FUNCT____FUNCT__130,5502
-#define __FUNCT__ __FUNCT__131,5519
-PetscErrorCode EPSDestroy_GD(EPS eps)EPSDestroy_GD132,5553
-#undef __FUNCT____FUNCT__155,7070
-#define __FUNCT__ __FUNCT__156,7087
-PetscErrorCode EPSGDSetKrylovStart(EPS eps,PetscBool krylovstart)EPSGDSetKrylovStart175,7537
-#undef __FUNCT____FUNCT__186,7883
-#define __FUNCT__ __FUNCT__187,7900
-PetscErrorCode EPSGDGetKrylovStart(EPS eps,PetscBool *krylovstart)EPSGDGetKrylovStart205,8312
-#undef __FUNCT____FUNCT__216,8642
-#define __FUNCT__ __FUNCT__217,8659
-PetscErrorCode EPSGDSetBlockSize(EPS eps,PetscInt blocksize)EPSGDSetBlockSize235,9151
-#undef __FUNCT____FUNCT__246,9484
-#define __FUNCT__ __FUNCT__247,9501
-PetscErrorCode EPSGDGetBlockSize(EPS eps,PetscInt *blocksize)EPSGDGetBlockSize264,9890
-#undef __FUNCT____FUNCT__275,10211
-#define __FUNCT__ __FUNCT__276,10228
-PetscErrorCode EPSGDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)EPSGDGetRestart294,10710
-#undef __FUNCT____FUNCT__304,11012
-#define __FUNCT__ __FUNCT__305,11029
-PetscErrorCode EPSGDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)EPSGDSetRestart325,11680
-#undef __FUNCT____FUNCT__337,12071
-#define __FUNCT__ __FUNCT__338,12088
-PetscErrorCode EPSGDGetInitialSize(EPS eps,PetscInt *initialsize)EPSGDGetInitialSize362,12927
-#undef __FUNCT____FUNCT__373,13258
-#define __FUNCT__ __FUNCT__374,13275
-PetscErrorCode EPSGDSetInitialSize(EPS eps,PetscInt initialsize)EPSGDSetInitialSize399,14207
-#undef __FUNCT____FUNCT__410,14550
-#define __FUNCT__ __FUNCT__411,14567
-PetscErrorCode EPSGDSetBOrth(EPS eps,PetscBool borth)EPSGDSetBOrth429,15046
-#undef __FUNCT____FUNCT__440,15362
-#define __FUNCT__ __FUNCT__441,15379
-PetscErrorCode EPSGDGetBOrth(EPS eps,PetscBool *borth)EPSGDGetBOrth458,15753
-#undef __FUNCT____FUNCT__469,16053
-#define __FUNCT__ __FUNCT__470,16070
-PetscErrorCode EPSGDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)EPSGDGetWindowSizes489,16572
-#undef __FUNCT____FUNCT__499,16892
-#define __FUNCT__ __FUNCT__500,16909
-PetscErrorCode EPSGDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)EPSGDSetWindowSizes521,17586
-#undef __FUNCT____FUNCT__533,18000
-#define __FUNCT__ __FUNCT__534,18017
-static PetscErrorCode EPSGDSetDoubleExpansion_GD(EPS eps,PetscBool use_gd2)EPSGDSetDoubleExpansion_GD535,18064
-#undef __FUNCT____FUNCT__544,18294
-#define __FUNCT__ __FUNCT__545,18311
-static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *flg)EPSGDGetDoubleExpansion_GD546,18358
-#undef __FUNCT____FUNCT__558,18656
-#define __FUNCT__ __FUNCT__559,18673
-PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *flg)EPSGDGetDoubleExpansion576,19022
-#undef __FUNCT____FUNCT__587,19336
-#define __FUNCT__ __FUNCT__588,19353
-PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool use_gd2)EPSGDSetDoubleExpansion606,19918
-#undef __FUNCT____FUNCT__617,20260
-#define __FUNCT__ __FUNCT__618,20277
-PETSC_EXTERN PetscErrorCode EPSCreate_GD(EPS eps)EPSCreate_GD619,20310
+PetscErrorCode EPSSetFromOptions_GD(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_GD46,1596
+#undef __FUNCT____FUNCT__106,4822
+#define __FUNCT__ __FUNCT__107,4839
+PetscErrorCode EPSSetUp_GD(EPS eps)EPSSetUp_GD108,4871
+#undef __FUNCT____FUNCT__130,5506
+#define __FUNCT__ __FUNCT__131,5523
+PetscErrorCode EPSView_GD(EPS eps,PetscViewer viewer)EPSView_GD132,5554
+#undef __FUNCT____FUNCT__167,7135
+#define __FUNCT__ __FUNCT__168,7152
+PetscErrorCode EPSDestroy_GD(EPS eps)EPSDestroy_GD169,7186
+#undef __FUNCT____FUNCT__192,8703
+#define __FUNCT__ __FUNCT__193,8720
+PetscErrorCode EPSGDSetKrylovStart(EPS eps,PetscBool krylovstart)EPSGDSetKrylovStart212,9170
+#undef __FUNCT____FUNCT__223,9516
+#define __FUNCT__ __FUNCT__224,9533
+PetscErrorCode EPSGDGetKrylovStart(EPS eps,PetscBool *krylovstart)EPSGDGetKrylovStart242,9945
+#undef __FUNCT____FUNCT__253,10275
+#define __FUNCT__ __FUNCT__254,10292
+PetscErrorCode EPSGDSetBlockSize(EPS eps,PetscInt blocksize)EPSGDSetBlockSize272,10784
+#undef __FUNCT____FUNCT__283,11117
+#define __FUNCT__ __FUNCT__284,11134
+PetscErrorCode EPSGDGetBlockSize(EPS eps,PetscInt *blocksize)EPSGDGetBlockSize301,11523
+#undef __FUNCT____FUNCT__312,11844
+#define __FUNCT__ __FUNCT__313,11861
+PetscErrorCode EPSGDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)EPSGDGetRestart331,12343
+#undef __FUNCT____FUNCT__341,12645
+#define __FUNCT__ __FUNCT__342,12662
+PetscErrorCode EPSGDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)EPSGDSetRestart362,13313
+#undef __FUNCT____FUNCT__374,13704
+#define __FUNCT__ __FUNCT__375,13721
+PetscErrorCode EPSGDGetInitialSize(EPS eps,PetscInt *initialsize)EPSGDGetInitialSize399,14560
+#undef __FUNCT____FUNCT__410,14891
+#define __FUNCT__ __FUNCT__411,14908
+PetscErrorCode EPSGDSetInitialSize(EPS eps,PetscInt initialsize)EPSGDSetInitialSize436,15840
+#undef __FUNCT____FUNCT__447,16183
+#define __FUNCT__ __FUNCT__448,16200
+PetscErrorCode EPSGDSetBOrth(EPS eps,PetscBool borth)EPSGDSetBOrth466,16679
+#undef __FUNCT____FUNCT__477,16995
+#define __FUNCT__ __FUNCT__478,17012
+PetscErrorCode EPSGDGetBOrth(EPS eps,PetscBool *borth)EPSGDGetBOrth495,17386
+#undef __FUNCT____FUNCT__506,17686
+#define __FUNCT__ __FUNCT__507,17703
+PetscErrorCode EPSGDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)EPSGDGetWindowSizes526,18205
+#undef __FUNCT____FUNCT__536,18525
+#define __FUNCT__ __FUNCT__537,18542
+PetscErrorCode EPSGDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)EPSGDSetWindowSizes558,19219
+#undef __FUNCT____FUNCT__570,19633
+#define __FUNCT__ __FUNCT__571,19650
+static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *doubleexp)EPSGDGetDoubleExpansion_GD572,19697
+#undef __FUNCT____FUNCT__581,19911
+#define __FUNCT__ __FUNCT__582,19928
+PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *doubleexp)EPSGDGetDoubleExpansion599,20283
+#undef __FUNCT____FUNCT__610,20615
+#define __FUNCT__ __FUNCT__611,20632
+static PetscErrorCode EPSGDSetDoubleExpansion_GD(EPS eps,PetscBool doubleexp)EPSGDSetDoubleExpansion_GD612,20679
+#undef __FUNCT____FUNCT__621,20891
+#define __FUNCT__ __FUNCT__622,20908
+PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool doubleexp)EPSGDSetDoubleExpansion640,21475
+#undef __FUNCT____FUNCT__651,21823
+#define __FUNCT__ __FUNCT__652,21840
+PETSC_EXTERN PetscErrorCode EPSCreate_GD(EPS eps)EPSCreate_GD653,21873
 

 src/eps/impls/davidson/gd/makefile,278
 makefile:^?makefile^A,1
@@ -3289,68 +3522,71 @@ DIRS     =DIRS30,1019
 MANSEC   = EPSMANSEC31,1030
 LOCDIR   = src/eps/impls/davidson/gd/LOCDIR32,1045
 

-src/eps/impls/davidson/jd/jd.c,3291
+src/eps/impls/davidson/jd/jd.c,3449
 jd.c:^?jd.c^A,1
 #undef __FUNCT____FUNCT__45,1616
 #define __FUNCT__ __FUNCT__46,1633
-PetscErrorCode EPSSetFromOptions_JD(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_JD47,1674
-#undef __FUNCT____FUNCT__114,5354
-#define __FUNCT__ __FUNCT__115,5371
-PetscErrorCode EPSSetUp_JD(EPS eps)EPSSetUp_JD116,5403
-#undef __FUNCT____FUNCT__139,6131
-#define __FUNCT__ __FUNCT__140,6148
-PetscErrorCode EPSDestroy_JD(EPS eps)EPSDestroy_JD141,6182
-#undef __FUNCT____FUNCT__166,7885
-#define __FUNCT__ __FUNCT__167,7902
-PetscErrorCode EPSJDSetKrylovStart(EPS eps,PetscBool krylovstart)EPSJDSetKrylovStart186,8352
-#undef __FUNCT____FUNCT__197,8698
-#define __FUNCT__ __FUNCT__198,8715
-PetscErrorCode EPSJDGetKrylovStart(EPS eps,PetscBool *krylovstart)EPSJDGetKrylovStart216,9133
-#undef __FUNCT____FUNCT__227,9463
-#define __FUNCT__ __FUNCT__228,9480
-PetscErrorCode EPSJDSetBlockSize(EPS eps,PetscInt blocksize)EPSJDSetBlockSize246,9972
-#undef __FUNCT____FUNCT__257,10305
-#define __FUNCT__ __FUNCT__258,10322
-PetscErrorCode EPSJDGetBlockSize(EPS eps,PetscInt *blocksize)EPSJDGetBlockSize275,10711
-#undef __FUNCT____FUNCT__286,11032
-#define __FUNCT__ __FUNCT__287,11049
-PetscErrorCode EPSJDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)EPSJDGetRestart305,11531
-#undef __FUNCT____FUNCT__315,11833
-#define __FUNCT__ __FUNCT__316,11850
-PetscErrorCode EPSJDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)EPSJDSetRestart336,12501
-#undef __FUNCT____FUNCT__348,12892
-#define __FUNCT__ __FUNCT__349,12909
-PetscErrorCode EPSJDGetInitialSize(EPS eps,PetscInt *initialsize)EPSJDGetInitialSize373,13748
-#undef __FUNCT____FUNCT__384,14079
-#define __FUNCT__ __FUNCT__385,14096
-PetscErrorCode EPSJDSetInitialSize(EPS eps,PetscInt initialsize)EPSJDSetInitialSize410,15028
-#undef __FUNCT____FUNCT__421,15371
-#define __FUNCT__ __FUNCT__422,15388
-PetscErrorCode EPSJDGetFix(EPS eps,PetscReal *fix)EPSJDGetFix444,15921
-#undef __FUNCT____FUNCT__455,16211
-#define __FUNCT__ __FUNCT__456,16228
-PetscErrorCode EPSJDSetFix(EPS eps,PetscReal fix)EPSJDSetFix479,16807
-#undef __FUNCT____FUNCT__490,17113
-#define __FUNCT__ __FUNCT__491,17130
-PetscErrorCode EPSJDSetConstCorrectionTol(EPS eps,PetscBool constant)EPSJDSetConstCorrectionTol510,17743
-#undef __FUNCT____FUNCT__521,18094
-#define __FUNCT__ __FUNCT__522,18111
-PetscErrorCode EPSJDGetConstCorrectionTol(EPS eps,PetscBool *constant)EPSJDGetConstCorrectionTol540,18697
-#undef __FUNCT____FUNCT__551,19030
-#define __FUNCT__ __FUNCT__552,19047
-PetscErrorCode EPSJDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)EPSJDGetWindowSizes571,19549
-#undef __FUNCT____FUNCT__581,19869
-#define __FUNCT__ __FUNCT__582,19886
-PetscErrorCode EPSJDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)EPSJDSetWindowSizes603,20563
-#undef __FUNCT____FUNCT__615,20977
-#define __FUNCT__ __FUNCT__616,20994
-PetscErrorCode EPSJDSetBOrth(EPS eps,PetscBool borth)EPSJDSetBOrth634,21473
-#undef __FUNCT____FUNCT__645,21789
-#define __FUNCT__ __FUNCT__646,21806
-PetscErrorCode EPSJDGetBOrth(EPS eps,PetscBool *borth)EPSJDGetBOrth663,22180
-#undef __FUNCT____FUNCT__674,22480
-#define __FUNCT__ __FUNCT__675,22497
-PETSC_EXTERN PetscErrorCode EPSCreate_JD(EPS eps)EPSCreate_JD676,22530
+PetscErrorCode EPSSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_JD47,1674
+#undef __FUNCT____FUNCT__114,5358
+#define __FUNCT__ __FUNCT__115,5375
+PetscErrorCode EPSSetUp_JD(EPS eps)EPSSetUp_JD116,5407
+#undef __FUNCT____FUNCT__139,6135
+#define __FUNCT__ __FUNCT__140,6152
+PetscErrorCode EPSView_JD(EPS eps,PetscViewer viewer)EPSView_JD141,6183
+#undef __FUNCT____FUNCT__172,7574
+#define __FUNCT__ __FUNCT__173,7591
+PetscErrorCode EPSDestroy_JD(EPS eps)EPSDestroy_JD174,7625
+#undef __FUNCT____FUNCT__199,9328
+#define __FUNCT__ __FUNCT__200,9345
+PetscErrorCode EPSJDSetKrylovStart(EPS eps,PetscBool krylovstart)EPSJDSetKrylovStart219,9795
+#undef __FUNCT____FUNCT__230,10141
+#define __FUNCT__ __FUNCT__231,10158
+PetscErrorCode EPSJDGetKrylovStart(EPS eps,PetscBool *krylovstart)EPSJDGetKrylovStart249,10576
+#undef __FUNCT____FUNCT__260,10906
+#define __FUNCT__ __FUNCT__261,10923
+PetscErrorCode EPSJDSetBlockSize(EPS eps,PetscInt blocksize)EPSJDSetBlockSize279,11415
+#undef __FUNCT____FUNCT__290,11748
+#define __FUNCT__ __FUNCT__291,11765
+PetscErrorCode EPSJDGetBlockSize(EPS eps,PetscInt *blocksize)EPSJDGetBlockSize308,12154
+#undef __FUNCT____FUNCT__319,12475
+#define __FUNCT__ __FUNCT__320,12492
+PetscErrorCode EPSJDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)EPSJDGetRestart338,12974
+#undef __FUNCT____FUNCT__348,13276
+#define __FUNCT__ __FUNCT__349,13293
+PetscErrorCode EPSJDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)EPSJDSetRestart369,13944
+#undef __FUNCT____FUNCT__381,14335
+#define __FUNCT__ __FUNCT__382,14352
+PetscErrorCode EPSJDGetInitialSize(EPS eps,PetscInt *initialsize)EPSJDGetInitialSize406,15191
+#undef __FUNCT____FUNCT__417,15522
+#define __FUNCT__ __FUNCT__418,15539
+PetscErrorCode EPSJDSetInitialSize(EPS eps,PetscInt initialsize)EPSJDSetInitialSize443,16471
+#undef __FUNCT____FUNCT__454,16814
+#define __FUNCT__ __FUNCT__455,16831
+PetscErrorCode EPSJDGetFix(EPS eps,PetscReal *fix)EPSJDGetFix477,17364
+#undef __FUNCT____FUNCT__488,17654
+#define __FUNCT__ __FUNCT__489,17671
+PetscErrorCode EPSJDSetFix(EPS eps,PetscReal fix)EPSJDSetFix512,18250
+#undef __FUNCT____FUNCT__523,18556
+#define __FUNCT__ __FUNCT__524,18573
+PetscErrorCode EPSJDSetConstCorrectionTol(EPS eps,PetscBool constant)EPSJDSetConstCorrectionTol543,19186
+#undef __FUNCT____FUNCT__554,19537
+#define __FUNCT__ __FUNCT__555,19554
+PetscErrorCode EPSJDGetConstCorrectionTol(EPS eps,PetscBool *constant)EPSJDGetConstCorrectionTol573,20140
+#undef __FUNCT____FUNCT__584,20475
+#define __FUNCT__ __FUNCT__585,20492
+PetscErrorCode EPSJDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)EPSJDGetWindowSizes604,20994
+#undef __FUNCT____FUNCT__614,21314
+#define __FUNCT__ __FUNCT__615,21331
+PetscErrorCode EPSJDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)EPSJDSetWindowSizes636,22008
+#undef __FUNCT____FUNCT__648,22422
+#define __FUNCT__ __FUNCT__649,22439
+PetscErrorCode EPSJDSetBOrth(EPS eps,PetscBool borth)EPSJDSetBOrth667,22918
+#undef __FUNCT____FUNCT__678,23234
+#define __FUNCT__ __FUNCT__679,23251
+PetscErrorCode EPSJDGetBOrth(EPS eps,PetscBool *borth)EPSJDGetBOrth696,23625
+#undef __FUNCT____FUNCT__707,23925
+#define __FUNCT__ __FUNCT__708,23942
+PETSC_EXTERN PetscErrorCode EPSCreate_JD(EPS eps)EPSCreate_JD709,23975
 

 src/eps/impls/davidson/jd/makefile,278
 makefile:^?makefile^A,1
@@ -3381,21 +3617,21 @@ arpack.c:^?arpack.c^A,1
 #undef __FUNCT____FUNCT__29,1109
 #define __FUNCT__ __FUNCT__30,1126
 PetscErrorCode EPSSetUp_ARPACK(EPS eps)EPSSetUp_ARPACK31,1162
-#undef __FUNCT____FUNCT__94,4320
-#define __FUNCT__ __FUNCT__95,4337
-PetscErrorCode EPSSolve_ARPACK(EPS eps)EPSSolve_ARPACK96,4373
-#undef __FUNCT____FUNCT__293,13172
-#define __FUNCT__ __FUNCT__294,13189
-PetscErrorCode EPSBackTransform_ARPACK(EPS eps)EPSBackTransform_ARPACK295,13233
-#undef __FUNCT____FUNCT__308,13547
-#define __FUNCT__ __FUNCT__309,13564
-PetscErrorCode EPSReset_ARPACK(EPS eps)EPSReset_ARPACK310,13600
-#undef __FUNCT____FUNCT__326,14029
-#define __FUNCT__ __FUNCT__327,14046
-PetscErrorCode EPSDestroy_ARPACK(EPS eps)EPSDestroy_ARPACK328,14084
-#undef __FUNCT____FUNCT__337,14248
-#define __FUNCT__ __FUNCT__338,14265
-PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(EPS eps)EPSCreate_ARPACK339,14302
+#undef __FUNCT____FUNCT__95,4479
+#define __FUNCT__ __FUNCT__96,4496
+PetscErrorCode EPSSolve_ARPACK(EPS eps)EPSSolve_ARPACK97,4532
+#undef __FUNCT____FUNCT__294,13331
+#define __FUNCT__ __FUNCT__295,13348
+PetscErrorCode EPSBackTransform_ARPACK(EPS eps)EPSBackTransform_ARPACK296,13392
+#undef __FUNCT____FUNCT__309,13706
+#define __FUNCT__ __FUNCT__310,13723
+PetscErrorCode EPSReset_ARPACK(EPS eps)EPSReset_ARPACK311,13759
+#undef __FUNCT____FUNCT__327,14188
+#define __FUNCT__ __FUNCT__328,14205
+PetscErrorCode EPSDestroy_ARPACK(EPS eps)EPSDestroy_ARPACK329,14243
+#undef __FUNCT____FUNCT__338,14407
+#define __FUNCT__ __FUNCT__339,14424
+PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(EPS eps)EPSCreate_ARPACK340,14461
 

 src/eps/impls/external/arpack/arpackp.h,1942
 arpackp.h:^?arpackp.h^A,1
@@ -3458,81 +3694,82 @@ DIRS     =DIRS32,1071
 MANSEC   = EPSMANSEC33,1082
 LOCDIR   = src/eps/impls/external/arpack/LOCDIR34,1097
 

-src/eps/impls/external/blopex/blopex.c,3295
+src/eps/impls/external/blopex/blopex.c,3369
 blopex.c:^?blopex.c^A,1
-  lobpcg_Tolerance           tol;tol34,1265
-  lobpcg_BLASLAPACKFunctions blap_fn;blap_fn35,1299
-  mv_InterfaceInterpreter    ii;ii36,1337
-  ST                         st;st37,1370
-  Vec                        w;w38,1403
-  PetscInt                   bs;     /* block size */bs39,1435
-} EPS_BLOPEX;EPS_BLOPEX40,1489
-#undef __FUNCT____FUNCT__42,1504
-#define __FUNCT__ __FUNCT__43,1521
-static void Precond_FnSingleVector(void *data,void *x,void *y)Precond_FnSingleVector44,1564
-#undef __FUNCT____FUNCT__57,1961
-#define __FUNCT__ __FUNCT__58,1978
-static void Precond_FnMultiVector(void *data,void *x,void *y)Precond_FnMultiVector59,2020
-#undef __FUNCT____FUNCT__68,2233
-#define __FUNCT__ __FUNCT__69,2250
-static void OperatorASingleVector(void *data,void *x,void *y)OperatorASingleVector70,2292
-#undef __FUNCT____FUNCT__96,3209
-#define __FUNCT__ __FUNCT__97,3226
-static void OperatorAMultiVector(void *data,void *x,void *y)OperatorAMultiVector98,3267
-#undef __FUNCT____FUNCT__107,3478
-#define __FUNCT__ __FUNCT__108,3495
-static void OperatorBSingleVector(void *data,void *x,void *y)OperatorBSingleVector109,3537
-#undef __FUNCT____FUNCT__122,3934
-#define __FUNCT__ __FUNCT__123,3951
-static void OperatorBMultiVector(void *data,void *x,void *y)OperatorBMultiVector124,3992
-#undef __FUNCT____FUNCT__133,4203
-#define __FUNCT__ __FUNCT__134,4220
-PetscErrorCode EPSSetDimensions_BLOPEX(EPS eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)EPSSetDimensions_BLOPEX135,4264
-#undef __FUNCT____FUNCT__151,4806
-#define __FUNCT__ __FUNCT__152,4823
-PetscErrorCode EPSSetUp_BLOPEX(EPS eps)EPSSetUp_BLOPEX153,4859
-#undef __FUNCT____FUNCT__214,7801
-#define __FUNCT__ __FUNCT__215,7818
-PetscErrorCode EPSSolve_BLOPEX(EPS eps)EPSSolve_BLOPEX216,7854
-#undef __FUNCT____FUNCT__316,11762
-#define __FUNCT__ __FUNCT__317,11779
-static PetscErrorCode EPSBLOPEXSetBlockSize_BLOPEX(EPS eps,PetscInt bs)EPSBLOPEXSetBlockSize_BLOPEX318,11828
-#undef __FUNCT____FUNCT__327,12014
-#define __FUNCT__ __FUNCT__328,12031
-PetscErrorCode EPSBLOPEXSetBlockSize(EPS eps,PetscInt bs)EPSBLOPEXSetBlockSize345,12397
-#undef __FUNCT____FUNCT__356,12717
-#define __FUNCT__ __FUNCT__357,12734
-static PetscErrorCode EPSBLOPEXGetBlockSize_BLOPEX(EPS eps,PetscInt *bs)EPSBLOPEXGetBlockSize_BLOPEX358,12783
-#undef __FUNCT____FUNCT__367,12971
-#define __FUNCT__ __FUNCT__368,12988
-PetscErrorCode EPSBLOPEXGetBlockSize(EPS eps,PetscInt *bs)EPSBLOPEXGetBlockSize384,13293
-#undef __FUNCT____FUNCT__395,13598
-#define __FUNCT__ __FUNCT__396,13615
-PetscErrorCode EPSReset_BLOPEX(EPS eps)EPSReset_BLOPEX397,13651
-#undef __FUNCT____FUNCT__407,13866
-#define __FUNCT__ __FUNCT__408,13883
-PetscErrorCode EPSDestroy_BLOPEX(EPS eps)EPSDestroy_BLOPEX409,13921
-#undef __FUNCT____FUNCT__421,14318
-#define __FUNCT__ __FUNCT__422,14335
-PetscErrorCode EPSView_BLOPEX(EPS eps,PetscViewer viewer)EPSView_BLOPEX423,14370
-#undef __FUNCT____FUNCT__437,14787
-#define __FUNCT__ __FUNCT__438,14804
-PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_BLOPEX439,14849
-#undef __FUNCT____FUNCT__469,15830
-#define __FUNCT__ __FUNCT__470,15847
-PETSC_EXTERN PetscErrorCode EPSCreate_BLOPEX(EPS eps)EPSCreate_BLOPEX471,15884
-

-src/eps/impls/external/blopex/makefile,403
-makefile:^?makefile^A,1
-CFLAGS   = ${BLOPEX_INCLUDE} -DBlopexInt=PetscIntCFLAGS27,1000
-FFLAGS   =FFLAGS28,1050
-SOURCEC  = blopex.c slepc-interface.c petsc-interface.cSOURCEC29,1061
-SOURCEF  =SOURCEF30,1117
-SOURCEH  = slepc-interface.h petsc-interface.hSOURCEH31,1128
-LIBBASE  = libslepcepsLIBBASE32,1175
-DIRS     =DIRS33,1198
-MANSEC   = EPSMANSEC34,1209
-LOCDIR   = src/eps/impls/external/blopex/LOCDIR35,1224
+PetscInt slepc_blopex_useconstr = -1;slepc_blopex_useconstr31,1210
+  lobpcg_Tolerance           tol;tol36,1304
+  lobpcg_BLASLAPACKFunctions blap_fn;blap_fn37,1338
+  mv_InterfaceInterpreter    ii;ii38,1376
+  ST                         st;st39,1409
+  Vec                        w;w40,1442
+  PetscInt                   bs;     /* block size */bs41,1474
+} EPS_BLOPEX;EPS_BLOPEX42,1528
+#undef __FUNCT____FUNCT__44,1543
+#define __FUNCT__ __FUNCT__45,1560
+static void Precond_FnSingleVector(void *data,void *x,void *y)Precond_FnSingleVector46,1603
+#undef __FUNCT____FUNCT__59,2000
+#define __FUNCT__ __FUNCT__60,2017
+static void Precond_FnMultiVector(void *data,void *x,void *y)Precond_FnMultiVector61,2059
+#undef __FUNCT____FUNCT__70,2272
+#define __FUNCT__ __FUNCT__71,2289
+static void OperatorASingleVector(void *data,void *x,void *y)OperatorASingleVector72,2331
+#undef __FUNCT____FUNCT__98,3248
+#define __FUNCT__ __FUNCT__99,3265
+static void OperatorAMultiVector(void *data,void *x,void *y)OperatorAMultiVector100,3306
+#undef __FUNCT____FUNCT__109,3517
+#define __FUNCT__ __FUNCT__110,3534
+static void OperatorBSingleVector(void *data,void *x,void *y)OperatorBSingleVector111,3576
+#undef __FUNCT____FUNCT__124,3973
+#define __FUNCT__ __FUNCT__125,3990
+static void OperatorBMultiVector(void *data,void *x,void *y)OperatorBMultiVector126,4031
+#undef __FUNCT____FUNCT__135,4242
+#define __FUNCT__ __FUNCT__136,4259
+PetscErrorCode EPSSetDimensions_BLOPEX(EPS eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)EPSSetDimensions_BLOPEX137,4303
+#undef __FUNCT____FUNCT__153,4845
+#define __FUNCT__ __FUNCT__154,4862
+PetscErrorCode EPSSetUp_BLOPEX(EPS eps)EPSSetUp_BLOPEX155,4898
+#undef __FUNCT____FUNCT__217,7996
+#define __FUNCT__ __FUNCT__218,8013
+PetscErrorCode EPSSolve_BLOPEX(EPS eps)EPSSolve_BLOPEX219,8049
+#undef __FUNCT____FUNCT__319,11947
+#define __FUNCT__ __FUNCT__320,11964
+static PetscErrorCode EPSBLOPEXSetBlockSize_BLOPEX(EPS eps,PetscInt bs)EPSBLOPEXSetBlockSize_BLOPEX321,12013
+#undef __FUNCT____FUNCT__330,12199
+#define __FUNCT__ __FUNCT__331,12216
+PetscErrorCode EPSBLOPEXSetBlockSize(EPS eps,PetscInt bs)EPSBLOPEXSetBlockSize348,12582
+#undef __FUNCT____FUNCT__359,12902
+#define __FUNCT__ __FUNCT__360,12919
+static PetscErrorCode EPSBLOPEXGetBlockSize_BLOPEX(EPS eps,PetscInt *bs)EPSBLOPEXGetBlockSize_BLOPEX361,12968
+#undef __FUNCT____FUNCT__370,13156
+#define __FUNCT__ __FUNCT__371,13173
+PetscErrorCode EPSBLOPEXGetBlockSize(EPS eps,PetscInt *bs)EPSBLOPEXGetBlockSize387,13478
+#undef __FUNCT____FUNCT__398,13783
+#define __FUNCT__ __FUNCT__399,13800
+PetscErrorCode EPSReset_BLOPEX(EPS eps)EPSReset_BLOPEX400,13836
+#undef __FUNCT____FUNCT__410,14051
+#define __FUNCT__ __FUNCT__411,14068
+PetscErrorCode EPSDestroy_BLOPEX(EPS eps)EPSDestroy_BLOPEX412,14106
+#undef __FUNCT____FUNCT__424,14503
+#define __FUNCT__ __FUNCT__425,14520
+PetscErrorCode EPSView_BLOPEX(EPS eps,PetscViewer viewer)EPSView_BLOPEX426,14555
+#undef __FUNCT____FUNCT__440,14972
+#define __FUNCT__ __FUNCT__441,14989
+PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_BLOPEX442,15034
+#undef __FUNCT____FUNCT__472,16019
+#define __FUNCT__ __FUNCT__473,16036
+PETSC_EXTERN PetscErrorCode EPSCreate_BLOPEX(EPS eps)EPSCreate_BLOPEX474,16073
+

+src/eps/impls/external/blopex/makefile,402
+makefile:^?makefile^A,1
+CFLAGS   = ${BLOPEX_INCLUDE} -DBlopexInt=PetscIntCFLAGS26,974
+FFLAGS   =FFLAGS27,1024
+SOURCEC  = blopex.c slepc-interface.c petsc-interface.cSOURCEC28,1035
+SOURCEF  =SOURCEF29,1091
+SOURCEH  = slepc-interface.h petsc-interface.hSOURCEH30,1102
+LIBBASE  = libslepcepsLIBBASE31,1149
+DIRS     =DIRS32,1172
+MANSEC   = EPSMANSEC33,1183
+LOCDIR   = src/eps/impls/external/blopex/LOCDIR34,1198
 

 src/eps/impls/external/blopex/petsc-interface.c,1792
 petsc-interface.c:^?petsc-interface.c^A,1
@@ -3566,50 +3803,50 @@ static void mv_TempMultiPETSCVectorDestroy(void* x_)mv_TempMultiPETSCVectorDest
 int SLEPCSetupInterpreter(mv_InterfaceInterpreter *i)SLEPCSetupInterpreter85,3067
 void SLEPCSetupInterpreterForDignifiedDeath(mv_InterfaceInterpreter *i)SLEPCSetupInterpreterForDignifiedDeath97,3353
 

-src/eps/impls/external/blopex/slepc-interface.h,125
+src/eps/impls/external/blopex/slepc-interface.h,139
 slepc-interface.h:^?slepc-interface.h^A,1
-#define SLEPC_INTERFACE_HEADERSLEPC_INTERFACE_HEADER27,1093
-#define SLEPC_BLOPEX_USECONSTR SLEPC_BLOPEX_USECONSTR32,1182
+#define SLEPC_INTERFACE_HEADERSLEPC_INTERFACE_HEADER26,1092
+PETSC_INTERN PetscInt slepc_blopex_useconstr;slepc_blopex_useconstr31,1181
 

-src/eps/impls/external/blzpack/blzpack.c,2016
+src/eps/impls/external/blzpack/blzpack.c,2020
 blzpack.c:^?blzpack.c^A,1
 const char* blzpack_error[33] = {blzpack_error29,1137
 #undef __FUNCT____FUNCT__65,2524
 #define __FUNCT__ __FUNCT__66,2541
 PetscErrorCode EPSSetUp_BLZPACK(EPS eps)EPSSetUp_BLZPACK67,2578
-#undef __FUNCT____FUNCT__151,6852
-#define __FUNCT__ __FUNCT__152,6869
-PetscErrorCode EPSSolve_BLZPACK(EPS eps)EPSSolve_BLZPACK153,6906
-#undef __FUNCT____FUNCT__283,12339
-#define __FUNCT__ __FUNCT__284,12356
-PetscErrorCode EPSBackTransform_BLZPACK(EPS eps)EPSBackTransform_BLZPACK285,12401
-#undef __FUNCT____FUNCT__297,12680
-#define __FUNCT__ __FUNCT__298,12697
-PetscErrorCode EPSReset_BLZPACK(EPS eps)EPSReset_BLZPACK299,12734
-#undef __FUNCT____FUNCT__313,13121
-#define __FUNCT__ __FUNCT__314,13138
-PetscErrorCode EPSDestroy_BLZPACK(EPS eps)EPSDestroy_BLZPACK315,13177
-#undef __FUNCT____FUNCT__326,13541
-#define __FUNCT__ __FUNCT__327,13558
-PetscErrorCode EPSView_BLZPACK(EPS eps,PetscViewer viewer)EPSView_BLZPACK328,13594
-#undef __FUNCT____FUNCT__346,14294
-#define __FUNCT__ __FUNCT__347,14311
-PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_BLZPACK348,14357
-#undef __FUNCT____FUNCT__374,15157
-#define __FUNCT__ __FUNCT__375,15174
-static PetscErrorCode EPSBlzpackSetBlockSize_BLZPACK(EPS eps,PetscInt bs)EPSBlzpackSetBlockSize_BLZPACK376,15225
-#undef __FUNCT____FUNCT__390,15669
-#define __FUNCT__ __FUNCT__391,15686
-PetscErrorCode EPSBlzpackSetBlockSize(EPS eps,PetscInt bs)EPSBlzpackSetBlockSize406,16022
-#undef __FUNCT____FUNCT__417,16344
-#define __FUNCT__ __FUNCT__418,16361
-static PetscErrorCode EPSBlzpackSetNSteps_BLZPACK(EPS eps,PetscInt nsteps)EPSBlzpackSetNSteps_BLZPACK419,16409
-#undef __FUNCT____FUNCT__432,16735
-#define __FUNCT__ __FUNCT__433,16752
-PetscErrorCode EPSBlzpackSetNSteps(EPS eps,PetscInt nsteps)EPSBlzpackSetNSteps450,17133
-#undef __FUNCT____FUNCT__461,17461
-#define __FUNCT__ __FUNCT__462,17478
-PETSC_EXTERN PetscErrorCode EPSCreate_BLZPACK(EPS eps)EPSCreate_BLZPACK463,17516
+#undef __FUNCT____FUNCT__152,7011
+#define __FUNCT__ __FUNCT__153,7028
+PetscErrorCode EPSSolve_BLZPACK(EPS eps)EPSSolve_BLZPACK154,7065
+#undef __FUNCT____FUNCT__284,12498
+#define __FUNCT__ __FUNCT__285,12515
+PetscErrorCode EPSBackTransform_BLZPACK(EPS eps)EPSBackTransform_BLZPACK286,12560
+#undef __FUNCT____FUNCT__298,12839
+#define __FUNCT__ __FUNCT__299,12856
+PetscErrorCode EPSReset_BLZPACK(EPS eps)EPSReset_BLZPACK300,12893
+#undef __FUNCT____FUNCT__314,13280
+#define __FUNCT__ __FUNCT__315,13297
+PetscErrorCode EPSDestroy_BLZPACK(EPS eps)EPSDestroy_BLZPACK316,13336
+#undef __FUNCT____FUNCT__327,13700
+#define __FUNCT__ __FUNCT__328,13717
+PetscErrorCode EPSView_BLZPACK(EPS eps,PetscViewer viewer)EPSView_BLZPACK329,13753
+#undef __FUNCT____FUNCT__347,14453
+#define __FUNCT__ __FUNCT__348,14470
+PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_BLZPACK349,14516
+#undef __FUNCT____FUNCT__375,15320
+#define __FUNCT__ __FUNCT__376,15337
+static PetscErrorCode EPSBlzpackSetBlockSize_BLZPACK(EPS eps,PetscInt bs)EPSBlzpackSetBlockSize_BLZPACK377,15388
+#undef __FUNCT____FUNCT__391,15832
+#define __FUNCT__ __FUNCT__392,15849
+PetscErrorCode EPSBlzpackSetBlockSize(EPS eps,PetscInt bs)EPSBlzpackSetBlockSize407,16185
+#undef __FUNCT____FUNCT__418,16507
+#define __FUNCT__ __FUNCT__419,16524
+static PetscErrorCode EPSBlzpackSetNSteps_BLZPACK(EPS eps,PetscInt nsteps)EPSBlzpackSetNSteps_BLZPACK420,16572
+#undef __FUNCT____FUNCT__433,16898
+#define __FUNCT__ __FUNCT__434,16915
+PetscErrorCode EPSBlzpackSetNSteps(EPS eps,PetscInt nsteps)EPSBlzpackSetNSteps451,17296
+#undef __FUNCT____FUNCT__462,17624
+#define __FUNCT__ __FUNCT__463,17641
+PETSC_EXTERN PetscErrorCode EPSCreate_BLZPACK(EPS eps)EPSCreate_BLZPACK464,17679
 

 src/eps/impls/external/blzpack/blzpackp.h,815
 blzpackp.h:^?blzpackp.h^A,1
@@ -3631,53 +3868,53 @@ blzpackp.h:^?blzpackp.h^A,1
 #define BLZistorr_ BLZistorr_64,1995
 #define BLZrstorr_ BLZrstorr_65,2043
 

-src/eps/impls/external/blzpack/makefile,304
+src/eps/impls/external/blzpack/makefile,302
 makefile:^?makefile^A,1
-CFLAGS   =CFLAGS27,998
-FFLAGS   =FFLAGS28,1009
-SOURCEC  = blzpack.cSOURCEC29,1020
-SOURCEF  =SOURCEF30,1041
-SOURCEH  = blzpackp.hSOURCEH31,1052
-LIBBASE  = libslepcepsLIBBASE32,1074
-DIRS     =DIRS33,1097
-MANSEC   = EPSMANSEC34,1108
-LOCDIR   = src/eps/impls/external/blzpack/LOCDIR35,1123
+CFLAGS   =CFLAGS26,975
+FFLAGS   =FFLAGS27,986
+SOURCEC  = blzpack.cSOURCEC28,997
+SOURCEF  =SOURCEF29,1018
+SOURCEH  = blzpackp.hSOURCEH30,1029
+LIBBASE  = libslepcepsLIBBASE31,1051
+DIRS     =DIRS32,1074
+MANSEC   = EPSMANSEC33,1085
+LOCDIR   = src/eps/impls/external/blzpack/LOCDIR34,1100
 

-src/eps/impls/external/feast/feast.c,1756
+src/eps/impls/external/feast/feast.c,1763
 feast.c:^?feast.c^A,1
 #undef __FUNCT____FUNCT__29,1133
 #define __FUNCT__ __FUNCT__30,1150
 PetscErrorCode EPSSetUp_FEAST(EPS eps)EPSSetUp_FEAST31,1185
-#undef __FUNCT____FUNCT__79,3917
-#define __FUNCT__ __FUNCT__80,3934
-PetscErrorCode EPSSolve_FEAST(EPS eps)EPSSolve_FEAST81,3969
-#undef __FUNCT____FUNCT__178,7985
-#define __FUNCT__ __FUNCT__179,8002
-PetscErrorCode EPSReset_FEAST(EPS eps)EPSReset_FEAST180,8037
-#undef __FUNCT____FUNCT__190,8274
-#define __FUNCT__ __FUNCT__191,8291
-PetscErrorCode EPSDestroy_FEAST(EPS eps)EPSDestroy_FEAST192,8328
-#undef __FUNCT____FUNCT__203,8689
-#define __FUNCT__ __FUNCT__204,8706
-PetscErrorCode EPSSetFromOptions_FEAST(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_FEAST205,8750
-#undef __FUNCT____FUNCT__225,9351
-#define __FUNCT__ __FUNCT__226,9368
-PetscErrorCode EPSView_FEAST(EPS eps,PetscViewer viewer)EPSView_FEAST227,9402
-#undef __FUNCT____FUNCT__241,9847
-#define __FUNCT__ __FUNCT__242,9864
-static PetscErrorCode EPSFEASTSetNumPoints_FEAST(EPS eps,PetscInt npoints)EPSFEASTSetNumPoints_FEAST243,9911
-#undef __FUNCT____FUNCT__256,10239
-#define __FUNCT__ __FUNCT__257,10256
-PetscErrorCode EPSFEASTSetNumPoints(EPS eps,PetscInt npoints)EPSFEASTSetNumPoints275,10675
-#undef __FUNCT____FUNCT__286,11008
-#define __FUNCT__ __FUNCT__287,11025
-static PetscErrorCode EPSFEASTGetNumPoints_FEAST(EPS eps,PetscInt *npoints)EPSFEASTGetNumPoints_FEAST288,11072
-#undef __FUNCT____FUNCT__297,11284
-#define __FUNCT__ __FUNCT__298,11301
-PetscErrorCode EPSFEASTGetNumPoints(EPS eps,PetscInt *npoints)EPSFEASTGetNumPoints315,11662
-#undef __FUNCT____FUNCT__325,11948
-#define __FUNCT__ __FUNCT__326,11965
-PETSC_EXTERN PetscErrorCode EPSCreate_FEAST(EPS eps)EPSCreate_FEAST327,12001
+#undef __FUNCT____FUNCT__80,4076
+#define __FUNCT__ __FUNCT__81,4093
+PetscErrorCode EPSSolve_FEAST(EPS eps)EPSSolve_FEAST82,4128
+#undef __FUNCT____FUNCT__179,8144
+#define __FUNCT__ __FUNCT__180,8161
+PetscErrorCode EPSReset_FEAST(EPS eps)EPSReset_FEAST181,8196
+#undef __FUNCT____FUNCT__191,8433
+#define __FUNCT__ __FUNCT__192,8450
+PetscErrorCode EPSDestroy_FEAST(EPS eps)EPSDestroy_FEAST193,8487
+#undef __FUNCT____FUNCT__204,8848
+#define __FUNCT__ __FUNCT__205,8865
+PetscErrorCode EPSSetFromOptions_FEAST(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_FEAST206,8909
+#undef __FUNCT____FUNCT__226,9514
+#define __FUNCT__ __FUNCT__227,9531
+PetscErrorCode EPSView_FEAST(EPS eps,PetscViewer viewer)EPSView_FEAST228,9565
+#undef __FUNCT____FUNCT__242,10010
+#define __FUNCT__ __FUNCT__243,10027
+static PetscErrorCode EPSFEASTSetNumPoints_FEAST(EPS eps,PetscInt npoints)EPSFEASTSetNumPoints_FEAST244,10074
+#undef __FUNCT____FUNCT__257,10402
+#define __FUNCT__ __FUNCT__258,10419
+PetscErrorCode EPSFEASTSetNumPoints(EPS eps,PetscInt npoints)EPSFEASTSetNumPoints276,10838
+#undef __FUNCT____FUNCT__287,11171
+#define __FUNCT__ __FUNCT__288,11188
+static PetscErrorCode EPSFEASTGetNumPoints_FEAST(EPS eps,PetscInt *npoints)EPSFEASTGetNumPoints_FEAST289,11235
+#undef __FUNCT____FUNCT__298,11434
+#define __FUNCT__ __FUNCT__299,11451
+PetscErrorCode EPSFEASTGetNumPoints(EPS eps,PetscInt *npoints)EPSFEASTGetNumPoints316,11812
+#undef __FUNCT____FUNCT__327,12130
+#define __FUNCT__ __FUNCT__328,12147
+PETSC_EXTERN PetscErrorCode EPSCreate_FEAST(EPS eps)EPSCreate_FEAST329,12183
 

 src/eps/impls/external/feast/feastp.h,1145
 feastp.h:^?feastp.h^A,1
@@ -3706,17 +3943,17 @@ feastp.h:^?feastp.h^A,1
 #define FEASTinit_(FEASTinit_94,2579
 #define FEASTrci_(FEASTrci_95,2640
 

-src/eps/impls/external/feast/makefile,298
+src/eps/impls/external/feast/makefile,296
 makefile:^?makefile^A,1
-CFLAGS   =CFLAGS27,998
-FFLAGS   =FFLAGS28,1009
-SOURCEC  = feast.cSOURCEC29,1020
-SOURCEF  =SOURCEF30,1039
-SOURCEH  = feastp.hSOURCEH31,1050
-LIBBASE  = libslepcepsLIBBASE32,1070
-DIRS     =DIRS33,1093
-MANSEC   = EPSMANSEC34,1104
-LOCDIR   = src/eps/impls/external/feast/LOCDIR35,1119
+CFLAGS   =CFLAGS26,973
+FFLAGS   =FFLAGS27,984
+SOURCEC  = feast.cSOURCEC28,995
+SOURCEF  =SOURCEF29,1014
+SOURCEH  = feastp.hSOURCEH30,1025
+LIBBASE  = libslepcepsLIBBASE31,1045
+DIRS     =DIRS32,1068
+MANSEC   = EPSMANSEC33,1079
+LOCDIR   = src/eps/impls/external/feast/LOCDIR34,1094
 

 src/eps/impls/external/makefile,182
 makefile:^?makefile^A,1
@@ -3727,17 +3964,17 @@ MANSEC   = EPSMANSEC27,1046
 

 src/eps/impls/external/primme/makefile,307
 makefile:^?makefile^A,1
-CFLAGS   = ${PRIMME_FLAGS}CFLAGS26,975
-FFLAGS   =FFLAGS27,1002
-SOURCEC  = primme.cSOURCEC28,1013
-SOURCEF  =SOURCEF29,1033
-SOURCEH  =SOURCEH30,1044
-LIBBASE  = libslepcepsLIBBASE31,1055
-DIRS     =DIRS32,1078
-MANSEC   = EPSMANSEC33,1089
-LOCDIR   = src/eps/impls/external/primme/LOCDIR34,1104
-

-src/eps/impls/external/primme/primme.c,3682
+CFLAGS   = ${PRIMME_FLAGS}CFLAGS26,974
+FFLAGS   =FFLAGS27,1001
+SOURCEC  = primme.cSOURCEC28,1012
+SOURCEF  =SOURCEF29,1032
+SOURCEH  =SOURCEH30,1043
+LIBBASE  = libslepcepsLIBBASE31,1054
+DIRS     =DIRS32,1077
+MANSEC   = EPSMANSEC33,1088
+LOCDIR   = src/eps/impls/external/primme/LOCDIR34,1103
+

+src/eps/impls/external/primme/primme.c,3640
 primme.c:^?primme.c^A,1
   primme_params primme;           /* param struc */primme33,1145
   primme_preset_method method;    /* primme method */method34,1197
@@ -3748,71 +3985,70 @@ primme.c:^?primme.c^A,1
   Vec       x,y;                  /* auxiliary vectors */y38,1439
   PetscReal target;               /* a copy of eps's target */target39,1497
 } EPS_PRIMME;EPS_PRIMME40,1560
-EPSPRIMMEMethod methodN[] = {methodN42,1575
-static void par_GlobalSumDouble(void *sendBuf,void *recvBuf,int *count,primme_params *primme)par_GlobalSumDouble63,2188
-#undef __FUNCT____FUNCT__69,2507
-#define __FUNCT__ __FUNCT__70,2524
-PetscErrorCode EPSSetUp_PRIMME(EPS eps)EPSSetUp_PRIMME71,2560
-#undef __FUNCT____FUNCT__166,7077
-#define __FUNCT__ __FUNCT__167,7094
-PetscErrorCode EPSSolve_PRIMME(EPS eps)EPSSolve_PRIMME168,7130
-#undef __FUNCT____FUNCT__208,8617
-#define __FUNCT__ __FUNCT__209,8634
-static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)multMatvec_PRIMME210,8672
-#undef __FUNCT____FUNCT__232,9522
-#define __FUNCT__ __FUNCT__233,9539
-static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)applyPreconditioner_PRIMME234,9586
-#undef __FUNCT____FUNCT__253,10464
-#define __FUNCT__ __FUNCT__254,10481
-PetscErrorCode EPSReset_PRIMME(EPS eps)EPSReset_PRIMME255,10517
-#undef __FUNCT____FUNCT__267,10799
-#define __FUNCT__ __FUNCT__268,10816
-PetscErrorCode EPSDestroy_PRIMME(EPS eps)EPSDestroy_PRIMME269,10854
-#undef __FUNCT____FUNCT__282,11412
-#define __FUNCT__ __FUNCT__283,11429
-PetscErrorCode EPSView_PRIMME(EPS eps,PetscViewer viewer)EPSView_PRIMME284,11464
-#undef __FUNCT____FUNCT__306,12297
-#define __FUNCT__ __FUNCT__307,12314
-PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_PRIMME308,12359
-#undef __FUNCT____FUNCT__343,13658
-#define __FUNCT__ __FUNCT__344,13675
-static PetscErrorCode EPSPRIMMESetBlockSize_PRIMME(EPS eps,PetscInt bs)EPSPRIMMESetBlockSize_PRIMME345,13724
-#undef __FUNCT____FUNCT__356,14116
-#define __FUNCT__ __FUNCT__357,14133
-PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,PetscInt bs)EPSPRIMMESetBlockSize383,14920
-#undef __FUNCT____FUNCT__394,15240
-#define __FUNCT__ __FUNCT__395,15257
-static PetscErrorCode EPSPRIMMEGetBlockSize_PRIMME(EPS eps,PetscInt *bs)EPSPRIMMEGetBlockSize_PRIMME396,15306
-#undef __FUNCT____FUNCT__405,15519
-#define __FUNCT__ __FUNCT__406,15536
-PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,PetscInt *bs)EPSPRIMMEGetBlockSize422,15852
-#undef __FUNCT____FUNCT__432,16130
-#define __FUNCT__ __FUNCT__433,16147
-static PetscErrorCode EPSPRIMMESetMethod_PRIMME(EPS eps,EPSPRIMMEMethod method)EPSPRIMMESetMethod_PRIMME434,16193
-#undef __FUNCT____FUNCT__444,16485
-#define __FUNCT__ __FUNCT__445,16502
-PetscErrorCode EPSPRIMMESetMethod(EPS eps,EPSPRIMMEMethod method)EPSPRIMMESetMethod474,17684
-#undef __FUNCT____FUNCT__485,18025
-#define __FUNCT__ __FUNCT__486,18042
-static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(EPS eps,EPSPRIMMEMethod *method)EPSPRIMMEGetMethod_PRIMME487,18088
-#undef __FUNCT____FUNCT__496,18321
-#define __FUNCT__ __FUNCT__497,18338
-PetscErrorCode EPSPRIMMEGetMethod(EPS eps,EPSPRIMMEMethod *method)EPSPRIMMEGetMethod519,19106
-#undef __FUNCT____FUNCT__529,19400
-#define __FUNCT__ __FUNCT__530,19417
-PETSC_EXTERN PetscErrorCode EPSCreate_PRIMME(EPS eps)EPSCreate_PRIMME531,19454
-

-src/eps/impls/external/trlan/makefile,298
-makefile:^?makefile^A,1
-CFLAGS   =CFLAGS27,998
-FFLAGS   =FFLAGS28,1009
-SOURCEC  = trlan.cSOURCEC29,1020
-SOURCEF  =SOURCEF30,1039
-SOURCEH  = trlanp.hSOURCEH31,1050
-LIBBASE  = libslepcepsLIBBASE32,1070
-DIRS     =DIRS33,1093
-MANSEC   = EPSMANSEC34,1104
-LOCDIR   = src/eps/impls/external/trlan/LOCDIR35,1119
+static void par_GlobalSumDouble(void *sendBuf,void *recvBuf,int *count,primme_params *primme)par_GlobalSumDouble45,1768
+#undef __FUNCT____FUNCT__51,2087
+#define __FUNCT__ __FUNCT__52,2104
+PetscErrorCode EPSSetUp_PRIMME(EPS eps)EPSSetUp_PRIMME53,2140
+#undef __FUNCT____FUNCT__149,6816
+#define __FUNCT__ __FUNCT__150,6833
+PetscErrorCode EPSSolve_PRIMME(EPS eps)EPSSolve_PRIMME151,6869
+#undef __FUNCT____FUNCT__191,8356
+#define __FUNCT__ __FUNCT__192,8373
+static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)multMatvec_PRIMME193,8411
+#undef __FUNCT____FUNCT__215,9261
+#define __FUNCT__ __FUNCT__216,9278
+static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)applyPreconditioner_PRIMME217,9325
+#undef __FUNCT____FUNCT__236,10203
+#define __FUNCT__ __FUNCT__237,10220
+PetscErrorCode EPSReset_PRIMME(EPS eps)EPSReset_PRIMME238,10256
+#undef __FUNCT____FUNCT__250,10538
+#define __FUNCT__ __FUNCT__251,10555
+PetscErrorCode EPSDestroy_PRIMME(EPS eps)EPSDestroy_PRIMME252,10593
+#undef __FUNCT____FUNCT__265,11151
+#define __FUNCT__ __FUNCT__266,11168
+PetscErrorCode EPSView_PRIMME(EPS eps,PetscViewer viewer)EPSView_PRIMME267,11203
+#undef __FUNCT____FUNCT__289,12036
+#define __FUNCT__ __FUNCT__290,12053
+PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_PRIMME291,12098
+#undef __FUNCT____FUNCT__326,13401
+#define __FUNCT__ __FUNCT__327,13418
+static PetscErrorCode EPSPRIMMESetBlockSize_PRIMME(EPS eps,PetscInt bs)EPSPRIMMESetBlockSize_PRIMME328,13467
+#undef __FUNCT____FUNCT__339,13859
+#define __FUNCT__ __FUNCT__340,13876
+PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,PetscInt bs)EPSPRIMMESetBlockSize366,14659
+#undef __FUNCT____FUNCT__377,14979
+#define __FUNCT__ __FUNCT__378,14996
+static PetscErrorCode EPSPRIMMEGetBlockSize_PRIMME(EPS eps,PetscInt *bs)EPSPRIMMEGetBlockSize_PRIMME379,15045
+#undef __FUNCT____FUNCT__388,15250
+#define __FUNCT__ __FUNCT__389,15267
+PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,PetscInt *bs)EPSPRIMMEGetBlockSize405,15583
+#undef __FUNCT____FUNCT__416,15888
+#define __FUNCT__ __FUNCT__417,15905
+static PetscErrorCode EPSPRIMMESetMethod_PRIMME(EPS eps,EPSPRIMMEMethod method)EPSPRIMMESetMethod_PRIMME418,15951
+#undef __FUNCT____FUNCT__427,16175
+#define __FUNCT__ __FUNCT__428,16192
+PetscErrorCode EPSPRIMMESetMethod(EPS eps,EPSPRIMMEMethod method)EPSPRIMMESetMethod448,16680
+#undef __FUNCT____FUNCT__459,17021
+#define __FUNCT__ __FUNCT__460,17038
+static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(EPS eps,EPSPRIMMEMethod *method)EPSPRIMMEGetMethod_PRIMME461,17084
+#undef __FUNCT____FUNCT__470,17305
+#define __FUNCT__ __FUNCT__471,17322
+PetscErrorCode EPSPRIMMEGetMethod(EPS eps,EPSPRIMMEMethod *method)EPSPRIMMEGetMethod487,17652
+#undef __FUNCT____FUNCT__498,17977
+#define __FUNCT__ __FUNCT__499,17994
+PETSC_EXTERN PetscErrorCode EPSCreate_PRIMME(EPS eps)EPSCreate_PRIMME500,18031
+

+src/eps/impls/external/trlan/makefile,296
+makefile:^?makefile^A,1
+CFLAGS   =CFLAGS26,973
+FFLAGS   =FFLAGS27,984
+SOURCEC  = trlan.cSOURCEC28,995
+SOURCEF  =SOURCEF29,1014
+SOURCEH  = trlanp.hSOURCEH30,1025
+LIBBASE  = libslepcepsLIBBASE31,1045
+DIRS     =DIRS32,1068
+MANSEC   = EPSMANSEC33,1079
+LOCDIR   = src/eps/impls/external/trlan/LOCDIR34,1094
 

 src/eps/impls/external/trlan/trlan.c,969
 trlan.c:^?trlan.c^A,1
@@ -3820,21 +4056,21 @@ static EPS globaleps;globaleps30,1164
 #undef __FUNCT____FUNCT__32,1187
 #define __FUNCT__ __FUNCT__33,1204
 PetscErrorCode EPSSetUp_TRLAN(EPS eps)EPSSetUp_TRLAN34,1239
-#undef __FUNCT____FUNCT__76,3316
-#define __FUNCT__ __FUNCT__77,3333
-static PetscBLASInt MatMult_TRLAN(PetscBLASInt *n,PetscBLASInt *m,PetscReal *xin,PetscBLASInt *ldx,PetscReal *yout,PetscBLASInt *ldy)MatMult_TRLAN78,3367
-#undef __FUNCT____FUNCT__100,4307
-#define __FUNCT__ __FUNCT__101,4324
-PetscErrorCode EPSSolve_TRLAN(EPS eps)EPSSolve_TRLAN102,4359
-#undef __FUNCT____FUNCT__159,6794
-#define __FUNCT__ __FUNCT__160,6811
-PetscErrorCode EPSReset_TRLAN(EPS eps)EPSReset_TRLAN161,6846
-#undef __FUNCT____FUNCT__171,7052
-#define __FUNCT__ __FUNCT__172,7069
-PetscErrorCode EPSDestroy_TRLAN(EPS eps)EPSDestroy_TRLAN173,7106
-#undef __FUNCT____FUNCT__182,7269
-#define __FUNCT__ __FUNCT__183,7286
-PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(EPS eps)EPSCreate_TRLAN184,7322
+#undef __FUNCT____FUNCT__77,3475
+#define __FUNCT__ __FUNCT__78,3492
+static PetscBLASInt MatMult_TRLAN(PetscBLASInt *n,PetscBLASInt *m,PetscReal *xin,PetscBLASInt *ldx,PetscReal *yout,PetscBLASInt *ldy)MatMult_TRLAN79,3526
+#undef __FUNCT____FUNCT__101,4466
+#define __FUNCT__ __FUNCT__102,4483
+PetscErrorCode EPSSolve_TRLAN(EPS eps)EPSSolve_TRLAN103,4518
+#undef __FUNCT____FUNCT__160,6953
+#define __FUNCT__ __FUNCT__161,6970
+PetscErrorCode EPSReset_TRLAN(EPS eps)EPSReset_TRLAN162,7005
+#undef __FUNCT____FUNCT__172,7211
+#define __FUNCT__ __FUNCT__173,7228
+PetscErrorCode EPSDestroy_TRLAN(EPS eps)EPSDestroy_TRLAN174,7265
+#undef __FUNCT____FUNCT__183,7428
+#define __FUNCT__ __FUNCT__184,7445
+PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(EPS eps)EPSCreate_TRLAN185,7481
 

 src/eps/impls/external/trlan/trlanp.h,335
 trlanp.h:^?trlanp.h^A,1
@@ -3848,7 +4084,7 @@ trlanp.h:^?trlanp.h^A,1
 #define TRLan_ TRLan_42,1402
 #define TRLan_ TRLan_44,1431
 

-src/eps/impls/krylov/arnoldi/arnoldi.c,1721
+src/eps/impls/krylov/arnoldi/arnoldi.c,1725
 arnoldi.c:^?arnoldi.c^A,1
   PetscBool delayed;delayed41,1333
 } EPS_ARNOLDI;EPS_ARNOLDI42,1354
@@ -3858,30 +4094,30 @@ PetscErrorCode EPSSetUp_Arnoldi(EPS eps)EPSSetUp_Arnoldi46,1424
 #undef __FUNCT____FUNCT__77,2986
 #define __FUNCT__ __FUNCT__78,3003
 PetscErrorCode EPSSolve_Arnoldi(EPS eps)EPSSolve_Arnoldi79,3040
-#undef __FUNCT____FUNCT__165,6800
-#define __FUNCT__ __FUNCT__166,6817
-PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_Arnoldi167,6863
-#undef __FUNCT____FUNCT__183,7459
-#define __FUNCT__ __FUNCT__184,7476
-static PetscErrorCode EPSArnoldiSetDelayed_Arnoldi(EPS eps,PetscBool delayed)EPSArnoldiSetDelayed_Arnoldi185,7525
-#undef __FUNCT____FUNCT__194,7737
-#define __FUNCT__ __FUNCT__195,7754
-PetscErrorCode EPSArnoldiSetDelayed(EPS eps,PetscBool delayed)EPSArnoldiSetDelayed218,8402
-#undef __FUNCT____FUNCT__229,8738
-#define __FUNCT__ __FUNCT__230,8755
-static PetscErrorCode EPSArnoldiGetDelayed_Arnoldi(EPS eps,PetscBool *delayed)EPSArnoldiGetDelayed_Arnoldi231,8804
-#undef __FUNCT____FUNCT__240,9018
-#define __FUNCT__ __FUNCT__241,9035
-PetscErrorCode EPSArnoldiGetDelayed(EPS eps,PetscBool *delayed)EPSArnoldiGetDelayed258,9426
-#undef __FUNCT____FUNCT__269,9746
-#define __FUNCT__ __FUNCT__270,9763
-PetscErrorCode EPSDestroy_Arnoldi(EPS eps)EPSDestroy_Arnoldi271,9802
-#undef __FUNCT____FUNCT__282,10165
-#define __FUNCT__ __FUNCT__283,10182
-PetscErrorCode EPSView_Arnoldi(EPS eps,PetscViewer viewer)EPSView_Arnoldi284,10218
-#undef __FUNCT____FUNCT__300,10690
-#define __FUNCT__ __FUNCT__301,10707
-PETSC_EXTERN PetscErrorCode EPSCreate_Arnoldi(EPS eps)EPSCreate_Arnoldi302,10745
+#undef __FUNCT____FUNCT__163,6807
+#define __FUNCT__ __FUNCT__164,6824
+PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_Arnoldi165,6870
+#undef __FUNCT____FUNCT__181,7470
+#define __FUNCT__ __FUNCT__182,7487
+static PetscErrorCode EPSArnoldiSetDelayed_Arnoldi(EPS eps,PetscBool delayed)EPSArnoldiSetDelayed_Arnoldi183,7536
+#undef __FUNCT____FUNCT__192,7748
+#define __FUNCT__ __FUNCT__193,7765
+PetscErrorCode EPSArnoldiSetDelayed(EPS eps,PetscBool delayed)EPSArnoldiSetDelayed216,8413
+#undef __FUNCT____FUNCT__227,8749
+#define __FUNCT__ __FUNCT__228,8766
+static PetscErrorCode EPSArnoldiGetDelayed_Arnoldi(EPS eps,PetscBool *delayed)EPSArnoldiGetDelayed_Arnoldi229,8815
+#undef __FUNCT____FUNCT__238,9029
+#define __FUNCT__ __FUNCT__239,9046
+PetscErrorCode EPSArnoldiGetDelayed(EPS eps,PetscBool *delayed)EPSArnoldiGetDelayed256,9437
+#undef __FUNCT____FUNCT__267,9757
+#define __FUNCT__ __FUNCT__268,9774
+PetscErrorCode EPSDestroy_Arnoldi(EPS eps)EPSDestroy_Arnoldi269,9813
+#undef __FUNCT____FUNCT__280,10176
+#define __FUNCT__ __FUNCT__281,10193
+PetscErrorCode EPSView_Arnoldi(EPS eps,PetscViewer viewer)EPSView_Arnoldi282,10229
+#undef __FUNCT____FUNCT__298,10701
+#define __FUNCT__ __FUNCT__299,10718
+PETSC_EXTERN PetscErrorCode EPSCreate_Arnoldi(EPS eps)EPSCreate_Arnoldi300,10756
 

 src/eps/impls/krylov/arnoldi/makefile,287
 makefile:^?makefile^A,1
@@ -3900,23 +4136,23 @@ epskrylov.c:^?epskrylov.c^A,1
 #undef __FUNCT____FUNCT__28,1078
 #define __FUNCT__ __FUNCT__29,1095
 PetscErrorCode EPSBasicArnoldi(EPS eps,PetscBool trans,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)EPSBasicArnoldi41,1617
-#undef __FUNCT____FUNCT__71,2587
-#define __FUNCT__ __FUNCT__72,2604
-PetscErrorCode EPSDelayedArnoldi(EPS eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)EPSDelayedArnoldi79,2929
-#undef __FUNCT____FUNCT__185,6465
-#define __FUNCT__ __FUNCT__186,6482
-PetscErrorCode EPSDelayedArnoldi1(EPS eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)EPSDelayedArnoldi1191,6663
-#undef __FUNCT____FUNCT__234,8031
-#define __FUNCT__ __FUNCT__235,8048
-PetscErrorCode EPSKrylovConvergence(EPS eps,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscReal corrf,PetscInt *kout)EPSKrylovConvergence253,8834
-#undef __FUNCT____FUNCT__330,11599
-#define __FUNCT__ __FUNCT__331,11616
-PetscErrorCode EPSFullLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown)EPSFullLanczos350,12546
-#undef __FUNCT____FUNCT__384,13596
-#define __FUNCT__ __FUNCT__385,13613
-PetscErrorCode EPSPseudoLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscReal *cos,Vec w)EPSPseudoLanczos386,13650
-

-src/eps/impls/krylov/krylovschur/krylovschur.c,7509
+#undef __FUNCT____FUNCT__72,2615
+#define __FUNCT__ __FUNCT__73,2632
+PetscErrorCode EPSDelayedArnoldi(EPS eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)EPSDelayedArnoldi80,2957
+#undef __FUNCT____FUNCT__186,6497
+#define __FUNCT__ __FUNCT__187,6514
+PetscErrorCode EPSDelayedArnoldi1(EPS eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)EPSDelayedArnoldi1192,6695
+#undef __FUNCT____FUNCT__235,8063
+#define __FUNCT__ __FUNCT__236,8080
+PetscErrorCode EPSKrylovConvergence(EPS eps,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscReal corrf,PetscInt *kout)EPSKrylovConvergence254,8866
+#undef __FUNCT____FUNCT__331,11631
+#define __FUNCT__ __FUNCT__332,11648
+PetscErrorCode EPSFullLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown)EPSFullLanczos351,12578
+#undef __FUNCT____FUNCT__385,13628
+#define __FUNCT__ __FUNCT__386,13645
+PetscErrorCode EPSPseudoLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscReal *cos,Vec w)EPSPseudoLanczos387,13682
+

+src/eps/impls/krylov/krylovschur/krylovschur.c,8515
 krylovschur.c:^?krylovschur.c^A,1
 #undef __FUNCT____FUNCT__46,1620
 #define __FUNCT__ __FUNCT__47,1637
@@ -3924,116 +4160,128 @@ PetscErrorCode EPSGetArbitraryValues(EPS eps,PetscScalar *rr,PetscScalar *ri)EP
 #undef __FUNCT____FUNCT__75,2640
 #define __FUNCT__ __FUNCT__76,2657
 PetscErrorCode EPSSetUp_KrylovSchur(EPS eps)EPSSetUp_KrylovSchur77,2698
-#undef __FUNCT____FUNCT__171,7096
-#define __FUNCT__ __FUNCT__172,7113
-PetscErrorCode EPSSolve_KrylovSchur_Default(EPS eps)EPSSolve_KrylovSchur_Default173,7162
-#undef __FUNCT____FUNCT__295,12048
-#define __FUNCT__ __FUNCT__296,12065
-static PetscErrorCode EPSKrylovSchurSetRestart_KrylovSchur(EPS eps,PetscReal keep)EPSKrylovSchurSetRestart_KrylovSchur297,12122
-#undef __FUNCT____FUNCT__310,12542
-#define __FUNCT__ __FUNCT__311,12559
-PetscErrorCode EPSKrylovSchurSetRestart(EPS eps,PetscReal keep)EPSKrylovSchurSetRestart333,13150
-#undef __FUNCT____FUNCT__344,13485
-#define __FUNCT__ __FUNCT__345,13502
-static PetscErrorCode EPSKrylovSchurGetRestart_KrylovSchur(EPS eps,PetscReal *keep)EPSKrylovSchurGetRestart_KrylovSchur346,13559
-#undef __FUNCT____FUNCT__355,13772
-#define __FUNCT__ __FUNCT__356,13789
-PetscErrorCode EPSKrylovSchurGetRestart(EPS eps,PetscReal *keep)EPSKrylovSchurGetRestart373,14128
-#undef __FUNCT____FUNCT__384,14447
-#define __FUNCT__ __FUNCT__385,14464
-static PetscErrorCode EPSKrylovSchurSetLocking_KrylovSchur(EPS eps,PetscBool lock)EPSKrylovSchurSetLocking_KrylovSchur386,14521
-#undef __FUNCT____FUNCT__395,14732
-#define __FUNCT__ __FUNCT__396,14749
-PetscErrorCode EPSKrylovSchurSetLocking(EPS eps,PetscBool lock)EPSKrylovSchurSetLocking420,15450
-#undef __FUNCT____FUNCT__431,15785
-#define __FUNCT__ __FUNCT__432,15802
-static PetscErrorCode EPSKrylovSchurGetLocking_KrylovSchur(EPS eps,PetscBool *lock)EPSKrylovSchurGetLocking_KrylovSchur433,15859
-#undef __FUNCT____FUNCT__442,16072
-#define __FUNCT__ __FUNCT__443,16089
-PetscErrorCode EPSKrylovSchurGetLocking(EPS eps,PetscBool *lock)EPSKrylovSchurGetLocking460,16418
-#undef __FUNCT____FUNCT__471,16737
-#define __FUNCT__ __FUNCT__472,16754
-static PetscErrorCode EPSKrylovSchurSetPartitions_KrylovSchur(EPS eps,PetscInt npart)EPSKrylovSchurSetPartitions_KrylovSchur473,16814
-#undef __FUNCT____FUNCT__495,17590
-#define __FUNCT__ __FUNCT__496,17607
-PetscErrorCode EPSKrylovSchurSetPartitions(EPS eps,PetscInt npart)EPSKrylovSchurSetPartitions524,18543
-#undef __FUNCT____FUNCT__535,18884
-#define __FUNCT__ __FUNCT__536,18901
-static PetscErrorCode EPSKrylovSchurGetPartitions_KrylovSchur(EPS eps,PetscInt *npart)EPSKrylovSchurGetPartitions_KrylovSchur537,18961
-#undef __FUNCT____FUNCT__546,19180
-#define __FUNCT__ __FUNCT__547,19197
-PetscErrorCode EPSKrylovSchurGetPartitions(EPS eps,PetscInt *npart)EPSKrylovSchurGetPartitions564,19564
-#undef __FUNCT____FUNCT__575,19890
-#define __FUNCT__ __FUNCT__576,19907
-static PetscErrorCode EPSKrylovSchurSetDetectZeros_KrylovSchur(EPS eps,PetscBool detect)EPSKrylovSchurSetDetectZeros_KrylovSchur577,19968
-#undef __FUNCT____FUNCT__587,20224
-#define __FUNCT__ __FUNCT__588,20241
-PetscErrorCode EPSKrylovSchurSetDetectZeros(EPS eps,PetscBool detect)EPSKrylovSchurSetDetectZeros615,21139
-#undef __FUNCT____FUNCT__626,21488
-#define __FUNCT__ __FUNCT__627,21505
-static PetscErrorCode EPSKrylovSchurGetDetectZeros_KrylovSchur(EPS eps,PetscBool *detect)EPSKrylovSchurGetDetectZeros_KrylovSchur628,21566
-#undef __FUNCT____FUNCT__637,21789
-#define __FUNCT__ __FUNCT__638,21806
-PetscErrorCode EPSKrylovSchurGetDetectZeros(EPS eps,PetscBool *detect)EPSKrylovSchurGetDetectZeros655,22199
-#undef __FUNCT____FUNCT__666,22532
-#define __FUNCT__ __FUNCT__667,22549
-static PetscErrorCode EPSKrylovSchurSetDimensions_KrylovSchur(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)EPSKrylovSchurSetDimensions_KrylovSchur668,22609
-#undef __FUNCT____FUNCT__691,23449
-#define __FUNCT__ __FUNCT__692,23466
-PetscErrorCode EPSKrylovSchurSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)EPSKrylovSchurSetDimensions715,24341
-#undef __FUNCT____FUNCT__728,24818
-#define __FUNCT__ __FUNCT__729,24835
-static PetscErrorCode EPSKrylovSchurGetDimensions_KrylovSchur(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)EPSKrylovSchurGetDimensions_KrylovSchur730,24895
-#undef __FUNCT____FUNCT__741,25200
-#define __FUNCT__ __FUNCT__742,25217
-PetscErrorCode EPSKrylovSchurGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)EPSKrylovSchurGetDimensions761,25767
-#undef __FUNCT____FUNCT__771,26115
-#define __FUNCT__ __FUNCT__772,26132
-static PetscErrorCode EPSKrylovSchurSetSubintervals_KrylovSchur(EPS eps,PetscReal* subint)EPSKrylovSchurSetSubintervals_KrylovSchur773,26194
-#undef __FUNCT____FUNCT__790,27080
-#define __FUNCT__ __FUNCT__791,27097
-PetscErrorCode EPSKrylovSchurSetSubintervals(EPS eps,PetscReal *subint)EPSKrylovSchurSetSubintervals816,28018
-#undef __FUNCT____FUNCT__826,28322
-#define __FUNCT__ __FUNCT__827,28339
-static PetscErrorCode EPSKrylovSchurGetSubintervals_KrylovSchur(EPS eps,PetscReal **subint)EPSKrylovSchurGetSubintervals_KrylovSchur828,28401
-#undef __FUNCT____FUNCT__844,29070
-#define __FUNCT__ __FUNCT__845,29087
-PetscErrorCode EPSKrylovSchurGetSubintervals(EPS eps,PetscReal** subint)EPSKrylovSchurGetSubintervals872,29923
-#undef __FUNCT____FUNCT__882,30229
-#define __FUNCT__ __FUNCT__883,30246
-static PetscErrorCode EPSKrylovSchurGetInertias_KrylovSchur(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)EPSKrylovSchurGetInertias_KrylovSchur884,30304
-#undef __FUNCT____FUNCT__927,31774
-#define __FUNCT__ __FUNCT__928,31791
-PetscErrorCode EPSKrylovSchurGetInertias(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)EPSKrylovSchurGetInertias958,32787
-#undef __FUNCT____FUNCT__969,33178
-#define __FUNCT__ __FUNCT__970,33195
-static PetscErrorCode EPSKrylovSchurGetSubcommInfo_KrylovSchur(EPS eps,PetscInt *k,PetscInt *n,Vec *v)EPSKrylovSchurGetSubcommInfo_KrylovSchur971,33256
-#undef __FUNCT____FUNCT__988,33961
-#define __FUNCT__ __FUNCT__989,33978
-PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS eps,PetscInt *k,PetscInt *n,Vec *v)EPSKrylovSchurGetSubcommInfo1015,34827
-#undef __FUNCT____FUNCT__1025,35155
-#define __FUNCT__ __FUNCT__1026,35172
-static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(EPS eps,PetscInt i,PetscScalar *eig,Vec v)EPSKrylovSchurGetSubcommPairs_KrylovSchur1027,35234
-#undef __FUNCT____FUNCT__1042,35930
-#define __FUNCT__ __FUNCT__1043,35947
-PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS eps,PetscInt i,PetscScalar *eig,Vec v)EPSKrylovSchurGetSubcommPairs1070,36861
-#undef __FUNCT____FUNCT__1081,37245
-#define __FUNCT__ __FUNCT__1082,37262
-PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_KrylovSchur1083,37312
-#undef __FUNCT____FUNCT__1121,39432
-#define __FUNCT__ __FUNCT__1122,39449
-PetscErrorCode EPSView_KrylovSchur(EPS eps,PetscViewer viewer)EPSView_KrylovSchur1123,39489
-#undef __FUNCT____FUNCT__1145,40626
-#define __FUNCT__ __FUNCT__1146,40643
-PetscErrorCode EPSDestroy_KrylovSchur(EPS eps)EPSDestroy_KrylovSchur1147,40686
-#undef __FUNCT____FUNCT__1171,42440
-#define __FUNCT__ __FUNCT__1172,42457
-PetscErrorCode EPSReset_KrylovSchur(EPS eps)EPSReset_KrylovSchur1173,42498
-#undef __FUNCT____FUNCT__1183,42710
-#define __FUNCT__ __FUNCT__1184,42727
-PETSC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(EPS eps)EPSCreate_KrylovSchur1185,42769
-

-src/eps/impls/krylov/krylovschur/krylovschur.h,4576
+#undef __FUNCT____FUNCT__173,7449
+#define __FUNCT__ __FUNCT__174,7466
+PetscErrorCode EPSSolve_KrylovSchur_Default(EPS eps)EPSSolve_KrylovSchur_Default175,7515
+#undef __FUNCT____FUNCT__296,12404
+#define __FUNCT__ __FUNCT__297,12421
+static PetscErrorCode EPSKrylovSchurSetRestart_KrylovSchur(EPS eps,PetscReal keep)EPSKrylovSchurSetRestart_KrylovSchur298,12478
+#undef __FUNCT____FUNCT__311,12898
+#define __FUNCT__ __FUNCT__312,12915
+PetscErrorCode EPSKrylovSchurSetRestart(EPS eps,PetscReal keep)EPSKrylovSchurSetRestart334,13506
+#undef __FUNCT____FUNCT__345,13841
+#define __FUNCT__ __FUNCT__346,13858
+static PetscErrorCode EPSKrylovSchurGetRestart_KrylovSchur(EPS eps,PetscReal *keep)EPSKrylovSchurGetRestart_KrylovSchur347,13915
+#undef __FUNCT____FUNCT__356,14128
+#define __FUNCT__ __FUNCT__357,14145
+PetscErrorCode EPSKrylovSchurGetRestart(EPS eps,PetscReal *keep)EPSKrylovSchurGetRestart374,14484
+#undef __FUNCT____FUNCT__385,14803
+#define __FUNCT__ __FUNCT__386,14820
+static PetscErrorCode EPSKrylovSchurSetLocking_KrylovSchur(EPS eps,PetscBool lock)EPSKrylovSchurSetLocking_KrylovSchur387,14877
+#undef __FUNCT____FUNCT__396,15088
+#define __FUNCT__ __FUNCT__397,15105
+PetscErrorCode EPSKrylovSchurSetLocking(EPS eps,PetscBool lock)EPSKrylovSchurSetLocking421,15806
+#undef __FUNCT____FUNCT__432,16141
+#define __FUNCT__ __FUNCT__433,16158
+static PetscErrorCode EPSKrylovSchurGetLocking_KrylovSchur(EPS eps,PetscBool *lock)EPSKrylovSchurGetLocking_KrylovSchur434,16215
+#undef __FUNCT____FUNCT__443,16428
+#define __FUNCT__ __FUNCT__444,16445
+PetscErrorCode EPSKrylovSchurGetLocking(EPS eps,PetscBool *lock)EPSKrylovSchurGetLocking461,16774
+#undef __FUNCT____FUNCT__472,17093
+#define __FUNCT__ __FUNCT__473,17110
+static PetscErrorCode EPSKrylovSchurSetPartitions_KrylovSchur(EPS eps,PetscInt npart)EPSKrylovSchurSetPartitions_KrylovSchur474,17170
+#undef __FUNCT____FUNCT__496,17946
+#define __FUNCT__ __FUNCT__497,17963
+PetscErrorCode EPSKrylovSchurSetPartitions(EPS eps,PetscInt npart)EPSKrylovSchurSetPartitions525,18899
+#undef __FUNCT____FUNCT__536,19240
+#define __FUNCT__ __FUNCT__537,19257
+static PetscErrorCode EPSKrylovSchurGetPartitions_KrylovSchur(EPS eps,PetscInt *npart)EPSKrylovSchurGetPartitions_KrylovSchur538,19317
+#undef __FUNCT____FUNCT__547,19536
+#define __FUNCT__ __FUNCT__548,19553
+PetscErrorCode EPSKrylovSchurGetPartitions(EPS eps,PetscInt *npart)EPSKrylovSchurGetPartitions565,19920
+#undef __FUNCT____FUNCT__576,20246
+#define __FUNCT__ __FUNCT__577,20263
+static PetscErrorCode EPSKrylovSchurSetDetectZeros_KrylovSchur(EPS eps,PetscBool detect)EPSKrylovSchurSetDetectZeros_KrylovSchur578,20324
+#undef __FUNCT____FUNCT__588,20580
+#define __FUNCT__ __FUNCT__589,20597
+PetscErrorCode EPSKrylovSchurSetDetectZeros(EPS eps,PetscBool detect)EPSKrylovSchurSetDetectZeros616,21495
+#undef __FUNCT____FUNCT__627,21844
+#define __FUNCT__ __FUNCT__628,21861
+static PetscErrorCode EPSKrylovSchurGetDetectZeros_KrylovSchur(EPS eps,PetscBool *detect)EPSKrylovSchurGetDetectZeros_KrylovSchur629,21922
+#undef __FUNCT____FUNCT__638,22145
+#define __FUNCT__ __FUNCT__639,22162
+PetscErrorCode EPSKrylovSchurGetDetectZeros(EPS eps,PetscBool *detect)EPSKrylovSchurGetDetectZeros656,22555
+#undef __FUNCT____FUNCT__667,22888
+#define __FUNCT__ __FUNCT__668,22905
+static PetscErrorCode EPSKrylovSchurSetDimensions_KrylovSchur(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)EPSKrylovSchurSetDimensions_KrylovSchur669,22965
+#undef __FUNCT____FUNCT__692,23805
+#define __FUNCT__ __FUNCT__693,23822
+PetscErrorCode EPSKrylovSchurSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)EPSKrylovSchurSetDimensions716,24697
+#undef __FUNCT____FUNCT__729,25174
+#define __FUNCT__ __FUNCT__730,25191
+static PetscErrorCode EPSKrylovSchurGetDimensions_KrylovSchur(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)EPSKrylovSchurGetDimensions_KrylovSchur731,25251
+#undef __FUNCT____FUNCT__742,25556
+#define __FUNCT__ __FUNCT__743,25573
+PetscErrorCode EPSKrylovSchurGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)EPSKrylovSchurGetDimensions762,26123
+#undef __FUNCT____FUNCT__772,26471
+#define __FUNCT__ __FUNCT__773,26488
+static PetscErrorCode EPSKrylovSchurSetSubintervals_KrylovSchur(EPS eps,PetscReal* subint)EPSKrylovSchurSetSubintervals_KrylovSchur774,26550
+#undef __FUNCT____FUNCT__791,27436
+#define __FUNCT__ __FUNCT__792,27453
+PetscErrorCode EPSKrylovSchurSetSubintervals(EPS eps,PetscReal *subint)EPSKrylovSchurSetSubintervals817,28374
+#undef __FUNCT____FUNCT__827,28678
+#define __FUNCT__ __FUNCT__828,28695
+static PetscErrorCode EPSKrylovSchurGetSubintervals_KrylovSchur(EPS eps,PetscReal **subint)EPSKrylovSchurGetSubintervals_KrylovSchur829,28757
+#undef __FUNCT____FUNCT__845,29426
+#define __FUNCT__ __FUNCT__846,29443
+PetscErrorCode EPSKrylovSchurGetSubintervals(EPS eps,PetscReal** subint)EPSKrylovSchurGetSubintervals873,30279
+#undef __FUNCT____FUNCT__884,30616
+#define __FUNCT__ __FUNCT__885,30633
+static PetscErrorCode EPSKrylovSchurGetInertias_KrylovSchur(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)EPSKrylovSchurGetInertias_KrylovSchur886,30691
+#undef __FUNCT____FUNCT__929,32161
+#define __FUNCT__ __FUNCT__930,32178
+PetscErrorCode EPSKrylovSchurGetInertias(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)EPSKrylovSchurGetInertias960,33174
+#undef __FUNCT____FUNCT__971,33565
+#define __FUNCT__ __FUNCT__972,33582
+static PetscErrorCode EPSKrylovSchurGetSubcommInfo_KrylovSchur(EPS eps,PetscInt *k,PetscInt *n,Vec *v)EPSKrylovSchurGetSubcommInfo_KrylovSchur973,33643
+#undef __FUNCT____FUNCT__990,34348
+#define __FUNCT__ __FUNCT__991,34365
+PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS eps,PetscInt *k,PetscInt *n,Vec *v)EPSKrylovSchurGetSubcommInfo1017,35213
+#undef __FUNCT____FUNCT__1027,35541
+#define __FUNCT__ __FUNCT__1028,35558
+static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(EPS eps,PetscInt i,PetscScalar *eig,Vec v)EPSKrylovSchurGetSubcommPairs_KrylovSchur1029,35620
+#undef __FUNCT____FUNCT__1044,36316
+#define __FUNCT__ __FUNCT__1045,36333
+PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS eps,PetscInt i,PetscScalar *eig,Vec v)EPSKrylovSchurGetSubcommPairs1072,37276
+#undef __FUNCT____FUNCT__1083,37660
+#define __FUNCT__ __FUNCT__1084,37677
+static PetscErrorCode EPSKrylovSchurGetSubcommMats_KrylovSchur(EPS eps,Mat *A,Mat *B)EPSKrylovSchurGetSubcommMats_KrylovSchur1085,37738
+#undef __FUNCT____FUNCT__1097,38276
+#define __FUNCT__ __FUNCT__1098,38293
+PetscErrorCode EPSKrylovSchurGetSubcommMats(EPS eps,Mat *A,Mat *B)EPSKrylovSchurGetSubcommMats1122,39077
+#undef __FUNCT____FUNCT__1132,39371
+#define __FUNCT__ __FUNCT__1133,39388
+static PetscErrorCode EPSKrylovSchurUpdateSubcommMats_KrylovSchur(EPS eps,PetscScalar a,PetscScalar ap,Mat Au,PetscScalar b,PetscScalar bp, Mat Bu,MatStructure str,PetscBool globalup)EPSKrylovSchurUpdateSubcommMats_KrylovSchur1134,39452
+#undef __FUNCT____FUNCT__1190,42071
+#define __FUNCT__ __FUNCT__1191,42088
+PetscErrorCode EPSKrylovSchurUpdateSubcommMats(EPS eps,PetscScalar s,PetscScalar a,Mat Au,PetscScalar t,PetscScalar b, Mat Bu,MatStructure str,PetscBool globalup)EPSKrylovSchurUpdateSubcommMats1230,43703
+#undef __FUNCT____FUNCT__1248,44577
+#define __FUNCT__ __FUNCT__1249,44594
+PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_KrylovSchur1250,44644
+#undef __FUNCT____FUNCT__1290,46804
+#define __FUNCT__ __FUNCT__1291,46821
+PetscErrorCode EPSView_KrylovSchur(EPS eps,PetscViewer viewer)EPSView_KrylovSchur1292,46861
+#undef __FUNCT____FUNCT__1314,47998
+#define __FUNCT__ __FUNCT__1315,48015
+PetscErrorCode EPSDestroy_KrylovSchur(EPS eps)EPSDestroy_KrylovSchur1316,48058
+#undef __FUNCT____FUNCT__1342,50029
+#define __FUNCT__ __FUNCT__1343,50046
+PetscErrorCode EPSReset_KrylovSchur(EPS eps)EPSReset_KrylovSchur1344,50087
+#undef __FUNCT____FUNCT__1354,50299
+#define __FUNCT__ __FUNCT__1355,50316
+PETSC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(EPS eps)EPSCreate_KrylovSchur1356,50358
+

+src/eps/impls/krylov/krylovschur/krylovschur.h,5416
 krylovschur.h:^?krylovschur.h^A,1
 #define __KRYLOVSCHUR_H__KRYLOVSCHUR_H25,991
 typedef struct _n_shift *EPS_shift;EPS_shift36,1530
@@ -4077,27 +4325,35 @@ struct _n_SR {_n_SR50,2192
   PetscScalar   *eigr,*eigi;  /* eigenvalues (for subsolve) */eigi74,3374
   PetscReal     *errest;      /* error estimates (for subsolve) */errest75,3437
   PetscInt      *perm;        /* permutation (for subsolve) */perm76,3504
-typedef struct _n_SR  *EPS_SR;EPS_SR78,3570
-  PetscReal     keep;               /* restart parameter */keep81,3619
-  PetscBool     lock;               /* locking/non-locking variant */lock82,3679
-  EPS_SR        sr;                 /* spectrum slicing context */sr84,3805
-  PetscInt      nev;                /* number of eigenvalues to compute */nev85,3872
-  PetscInt      ncv;                /* number of basis vectors */ncv86,3947
-  PetscInt      mpd;                /* maximum dimension of projected problem */mpd87,4013
-  PetscInt      npart;              /* number of partitions of subcommunicator */npart88,4094
-  PetscBool     detect;             /* check for zeros during factorizations */detect89,4176
-  PetscReal     *subintervals;      /* partition of global interval */subintervals90,4256
-  PetscBool     subintset;          /* subintervals set by user */subintset91,4327
-  PetscMPIInt   *nconv_loc;         /* converged eigenpairs for each subinterval */nconv_loc92,4394
-  EPS           eps;                /* additional eps for slice runs */eps93,4478
-  PetscBool     global;             /* flag distinguishing global from local eps */global94,4550
-  PetscReal     *shifts;            /* array containing global shifts */shifts95,4634
-  PetscInt      *inertias;          /* array containing global inertias */inertias96,4707
-  PetscInt      nshifts;            /* elements in the arrays of shifts and inertias */nshifts97,4782
-  PetscSubcomm  subc;               /* context for subcommunicators */subc98,4870
-  MPI_Comm      commrank;           /* group processes with same rank in subcommunicators */commrank99,4941
-  PetscBool     commset;            /* flag indicating that commrank was created */commset100,5034
-} EPS_KRYLOVSCHUR;EPS_KRYLOVSCHUR101,5118
+typedef struct _n_SR *EPS_SR;EPS_SR78,3570
+  PetscReal        keep;               /* restart parameter */keep81,3618
+  PetscBool        lock;               /* locking/non-locking variant */lock82,3681
+  EPS_SR           sr;                 /* spectrum slicing context */sr84,3810
+  PetscInt         nev;                /* number of eigenvalues to compute */nev85,3880
+  PetscInt         ncv;                /* number of basis vectors */ncv86,3958
+  PetscInt         mpd;                /* maximum dimension of projected problem */mpd87,4027
+  PetscInt         npart;              /* number of partitions of subcommunicator */npart88,4111
+  PetscBool        detect;             /* check for zeros during factorizations */detect89,4196
+  PetscReal        *subintervals;      /* partition of global interval */subintervals90,4279
+  PetscBool        subintset;          /* subintervals set by user */subintset91,4353
+  PetscMPIInt      *nconv_loc;         /* converged eigenpairs for each subinterval */nconv_loc92,4423
+  EPS              eps;                /* additional eps for slice runs */eps93,4510
+  PetscBool        global;             /* flag distinguishing global from local eps */global94,4585
+  PetscReal        *shifts;            /* array containing global shifts */shifts95,4672
+  PetscInt         *inertias;          /* array containing global inertias */inertias96,4748
+  PetscInt         nshifts;            /* elements in the arrays of shifts and inertias */nshifts97,4826
+  PetscSubcomm     subc;               /* context for subcommunicators */subc98,4917
+  MPI_Comm         commrank;           /* group processes with same rank in subcommunicators */commrank99,4991
+  PetscBool        commset;            /* flag indicating that commrank was created */commset100,5087
+  PetscObjectState Astate,Bstate;      /* state of subcommunicator matrices */Astate101,5174
+  PetscObjectState Astate,Bstate;      /* state of subcommunicator matrices */Bstate101,5174
+  PetscObjectId    Aid,Bid;            /* Id of subcommunicator matrices */Aid102,5253
+  PetscObjectId    Aid,Bid;            /* Id of subcommunicator matrices */Bid102,5253
+  IS               isrow,iscol;        /* index sets used in update of subcomm mats */isrow103,5329
+  IS               isrow,iscol;        /* index sets used in update of subcomm mats */iscol103,5329
+  Mat              *submata,*submatb;  /* seq matrices used in update of subcomm mats */submata104,5416
+  Mat              *submata,*submatb;  /* seq matrices used in update of subcomm mats */submatb104,5416
+} EPS_KRYLOVSCHUR;EPS_KRYLOVSCHUR105,5505
 

 src/eps/impls/krylov/krylovschur/ks-indef.c,168
 ks-indef.c:^?ks-indef.c^A,1
@@ -4105,67 +4361,69 @@ ks-indef.c:^?ks-indef.c^A,1
 #define __FUNCT__ __FUNCT__30,1103
 PetscErrorCode EPSSolve_KrylovSchur_Indefinite(EPS eps)EPSSolve_KrylovSchur_Indefinite31,1155
 

-src/eps/impls/krylov/krylovschur/ks-slice.c,3318
+src/eps/impls/krylov/krylovschur/ks-slice.c,3421
 ks-slice.c:^?ks-slice.c^A,1
-#define SLICE_PTOL SLICE_PTOL40,1469
-#undef __FUNCT____FUNCT__42,1516
-#define __FUNCT__ __FUNCT__43,1533
-static PetscErrorCode EPSSliceResetSR(EPS eps) {EPSSliceResetSR44,1569
-#undef __FUNCT____FUNCT__71,2274
-#define __FUNCT__ __FUNCT__72,2291
-PetscErrorCode EPSReset_KrylovSchur_Slice(EPS eps)EPSReset_KrylovSchur_Slice73,2338
-#undef __FUNCT____FUNCT__98,3139
-#define __FUNCT__ __FUNCT__99,3156
-static PetscErrorCode EPSSliceAllocateSolution(EPS eps,PetscInt extra)EPSSliceAllocateSolution105,3417
-#undef __FUNCT____FUNCT__150,5328
-#define __FUNCT__ __FUNCT__151,5345
-static PetscErrorCode EPSSliceGetEPS(EPS eps)EPSSliceGetEPS152,5380
-#undef __FUNCT____FUNCT__279,10822
-#define __FUNCT__ __FUNCT__280,10839
-static PetscErrorCode EPSSliceGetInertia(EPS eps,PetscReal shift,PetscInt *inertia,PetscInt *zeros)EPSSliceGetInertia281,10878
-#undef __FUNCT____FUNCT__305,11627
-#define __FUNCT__ __FUNCT__306,11644
-PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)EPSSetUp_KrylovSchur_Slice307,11691
-#undef __FUNCT____FUNCT__468,20169
-#define __FUNCT__ __FUNCT__469,20186
-static PetscErrorCode EPSSliceGatherEigenVectors(EPS eps)EPSSliceGatherEigenVectors470,20233
-#undef __FUNCT____FUNCT__532,22741
-#define __FUNCT__ __FUNCT__533,22758
-PetscErrorCode EPSComputeVectors_Slice(EPS eps)EPSComputeVectors_Slice537,22879
-#define SWAP(SWAP550,23210
-#undef __FUNCT____FUNCT__552,23246
-#define __FUNCT__ __FUNCT__553,23263
-static PetscErrorCode EPSSliceGetInertias(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)EPSSliceGetInertias554,23303
-#undef __FUNCT____FUNCT__608,24949
-#define __FUNCT__ __FUNCT__609,24966
-static PetscErrorCode EPSSliceGatherSolution(EPS eps)EPSSliceGatherSolution610,25009
-#undef __FUNCT____FUNCT__704,29969
-#define __FUNCT__ __FUNCT__705,29986
-static PetscErrorCode EPSCreateShift(EPS eps,PetscReal val,EPS_shift neighb0,EPS_shift neighb1)EPSCreateShift706,30021
-#undef __FUNCT____FUNCT__743,31180
-#define __FUNCT__ __FUNCT__744,31197
-static PetscErrorCode EPSPrepareRational(EPS eps)EPSPrepareRational745,31236
-#undef __FUNCT____FUNCT__789,32694
-#define __FUNCT__ __FUNCT__790,32711
-static PetscErrorCode EPSExtractShift(EPS eps)EPSExtractShift791,32747
-#undef __FUNCT____FUNCT__828,34157
-#define __FUNCT__ __FUNCT__829,34174
-static PetscErrorCode EPSKrylovSchur_Slice(EPS eps)EPSKrylovSchur_Slice830,34215
-#undef __FUNCT____FUNCT__1051,42938
-#define __FUNCT__ __FUNCT__1052,42955
-static PetscErrorCode EPSGetNewShiftValue(EPS eps,PetscInt side,PetscReal *newS)EPSGetNewShiftValue1053,42995
-#undef __FUNCT____FUNCT__1131,47047
-#define __FUNCT__ __FUNCT__1132,47064
-static PetscErrorCode sortRealEigenvalues(PetscScalar *r,PetscInt *perm,PetscInt nr,PetscBool prev,PetscInt dir)sortRealEigenvalues1133,47104
-#undef __FUNCT____FUNCT__1152,47670
-#define __FUNCT__ __FUNCT__1153,47687
-static PetscErrorCode EPSStoreEigenpairs(EPS eps)EPSStoreEigenpairs1154,47726
-#undef __FUNCT____FUNCT__1209,49978
-#define __FUNCT__ __FUNCT__1210,49995
-static PetscErrorCode EPSLookForDeflation(EPS eps)EPSLookForDeflation1211,50035
-#undef __FUNCT____FUNCT__1281,52779
-#define __FUNCT__ __FUNCT__1282,52796
-PetscErrorCode EPSSolve_KrylovSchur_Slice(EPS eps)EPSSolve_KrylovSchur_Slice1283,52843
+static PetscBool  cited = PETSC_FALSE;cited40,1469
+static const char citation[] =citation41,1508
+#define SLICE_PTOL SLICE_PTOL53,1930
+#undef __FUNCT____FUNCT__55,1977
+#define __FUNCT__ __FUNCT__56,1994
+static PetscErrorCode EPSSliceResetSR(EPS eps) {EPSSliceResetSR57,2030
+#undef __FUNCT____FUNCT__84,2729
+#define __FUNCT__ __FUNCT__85,2746
+PetscErrorCode EPSReset_KrylovSchur_Slice(EPS eps)EPSReset_KrylovSchur_Slice86,2793
+#undef __FUNCT____FUNCT__117,3842
+#define __FUNCT__ __FUNCT__118,3859
+static PetscErrorCode EPSSliceAllocateSolution(EPS eps,PetscInt extra)EPSSliceAllocateSolution124,4120
+#undef __FUNCT____FUNCT__169,6031
+#define __FUNCT__ __FUNCT__170,6048
+static PetscErrorCode EPSSliceGetEPS(EPS eps)EPSSliceGetEPS171,6083
+#undef __FUNCT____FUNCT__328,12711
+#define __FUNCT__ __FUNCT__329,12728
+static PetscErrorCode EPSSliceGetInertia(EPS eps,PetscReal shift,PetscInt *inertia,PetscInt *zeros)EPSSliceGetInertia330,12767
+#undef __FUNCT____FUNCT__359,13789
+#define __FUNCT__ __FUNCT__360,13806
+PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)EPSSetUp_KrylovSchur_Slice361,13853
+#undef __FUNCT____FUNCT__532,22832
+#define __FUNCT__ __FUNCT__533,22849
+static PetscErrorCode EPSSliceGatherEigenVectors(EPS eps)EPSSliceGatherEigenVectors534,22896
+#undef __FUNCT____FUNCT__596,25404
+#define __FUNCT__ __FUNCT__597,25421
+PetscErrorCode EPSComputeVectors_Slice(EPS eps)EPSComputeVectors_Slice601,25542
+#define SWAP(SWAP614,25873
+#undef __FUNCT____FUNCT__616,25909
+#define __FUNCT__ __FUNCT__617,25926
+static PetscErrorCode EPSSliceGetInertias(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)EPSSliceGetInertias618,25966
+#undef __FUNCT____FUNCT__672,27612
+#define __FUNCT__ __FUNCT__673,27629
+static PetscErrorCode EPSSliceGatherSolution(EPS eps)EPSSliceGatherSolution674,27672
+#undef __FUNCT____FUNCT__768,32632
+#define __FUNCT__ __FUNCT__769,32649
+static PetscErrorCode EPSCreateShift(EPS eps,PetscReal val,EPS_shift neighb0,EPS_shift neighb1)EPSCreateShift770,32684
+#undef __FUNCT____FUNCT__807,33843
+#define __FUNCT__ __FUNCT__808,33860
+static PetscErrorCode EPSPrepareRational(EPS eps)EPSPrepareRational809,33899
+#undef __FUNCT____FUNCT__853,35357
+#define __FUNCT__ __FUNCT__854,35374
+static PetscErrorCode EPSExtractShift(EPS eps)EPSExtractShift855,35410
+#undef __FUNCT____FUNCT__892,36834
+#define __FUNCT__ __FUNCT__893,36851
+static PetscErrorCode EPSKrylovSchur_Slice(EPS eps)EPSKrylovSchur_Slice894,36892
+#undef __FUNCT____FUNCT__1115,45583
+#define __FUNCT__ __FUNCT__1116,45600
+static PetscErrorCode EPSGetNewShiftValue(EPS eps,PetscInt side,PetscReal *newS)EPSGetNewShiftValue1117,45640
+#undef __FUNCT____FUNCT__1195,49692
+#define __FUNCT__ __FUNCT__1196,49709
+static PetscErrorCode sortRealEigenvalues(PetscScalar *r,PetscInt *perm,PetscInt nr,PetscBool prev,PetscInt dir)sortRealEigenvalues1197,49749
+#undef __FUNCT____FUNCT__1216,50315
+#define __FUNCT__ __FUNCT__1217,50332
+static PetscErrorCode EPSStoreEigenpairs(EPS eps)EPSStoreEigenpairs1218,50371
+#undef __FUNCT____FUNCT__1273,52623
+#define __FUNCT__ __FUNCT__1274,52640
+static PetscErrorCode EPSLookForDeflation(EPS eps)EPSLookForDeflation1275,52680
+#undef __FUNCT____FUNCT__1345,55424
+#define __FUNCT__ __FUNCT__1346,55441
+PetscErrorCode EPSSolve_KrylovSchur_Slice(EPS eps)EPSSolve_KrylovSchur_Slice1347,55488
 

 src/eps/impls/krylov/krylovschur/ks-symm.c,156
 ks-symm.c:^?ks-symm.c^A,1
@@ -4185,7 +4443,7 @@ DIRS     =DIRS30,1074
 MANSEC   = EPSMANSEC31,1085
 LOCDIR   = src/eps/impls/krylov/krylovschur/LOCDIR32,1100
 

-src/eps/impls/krylov/lanczos/lanczos.c,3605
+src/eps/impls/krylov/lanczos/lanczos.c,3609
 lanczos.c:^?lanczos.c^A,1
   EPSLanczosReorthogType reorthog;reorthog44,1488
   BV                     AV;AV45,1523
@@ -4217,33 +4475,33 @@ static PetscErrorCode EPSBasicLanczos(EPS eps,PetscReal *alpha,PetscReal *beta,P
 #undef __FUNCT____FUNCT__558,19751
 #define __FUNCT__ __FUNCT__559,19768
 PetscErrorCode EPSSolve_Lanczos(EPS eps)EPSSolve_Lanczos560,19805
-#undef __FUNCT____FUNCT__747,26845
-#define __FUNCT__ __FUNCT__748,26862
-PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_Lanczos749,26908
-#undef __FUNCT____FUNCT__766,27607
-#define __FUNCT__ __FUNCT__767,27624
-static PetscErrorCode EPSLanczosSetReorthog_Lanczos(EPS eps,EPSLanczosReorthogType reorthog)EPSLanczosSetReorthog_Lanczos768,27674
-#undef __FUNCT____FUNCT__788,28301
-#define __FUNCT__ __FUNCT__789,28318
-PetscErrorCode EPSLanczosSetReorthog(EPS eps,EPSLanczosReorthogType reorthog)EPSLanczosSetReorthog808,28876
-#undef __FUNCT____FUNCT__819,29243
-#define __FUNCT__ __FUNCT__820,29260
-static PetscErrorCode EPSLanczosGetReorthog_Lanczos(EPS eps,EPSLanczosReorthogType *reorthog)EPSLanczosGetReorthog_Lanczos821,29310
-#undef __FUNCT____FUNCT__830,29541
-#define __FUNCT__ __FUNCT__831,29558
-PetscErrorCode EPSLanczosGetReorthog(EPS eps,EPSLanczosReorthogType *reorthog)EPSLanczosGetReorthog848,29938
-#undef __FUNCT____FUNCT__859,30289
-#define __FUNCT__ __FUNCT__860,30306
-PetscErrorCode EPSReset_Lanczos(EPS eps)EPSReset_Lanczos861,30343
-#undef __FUNCT____FUNCT__871,30562
-#define __FUNCT__ __FUNCT__872,30579
-PetscErrorCode EPSDestroy_Lanczos(EPS eps)EPSDestroy_Lanczos873,30618
-#undef __FUNCT____FUNCT__884,30983
-#define __FUNCT__ __FUNCT__885,31000
-PetscErrorCode EPSView_Lanczos(EPS eps,PetscViewer viewer)EPSView_Lanczos886,31036
-#undef __FUNCT____FUNCT__900,31504
-#define __FUNCT__ __FUNCT__901,31521
-PETSC_EXTERN PetscErrorCode EPSCreate_Lanczos(EPS eps)EPSCreate_Lanczos902,31559
+#undef __FUNCT____FUNCT__746,26834
+#define __FUNCT__ __FUNCT__747,26851
+PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_Lanczos748,26897
+#undef __FUNCT____FUNCT__765,27600
+#define __FUNCT__ __FUNCT__766,27617
+static PetscErrorCode EPSLanczosSetReorthog_Lanczos(EPS eps,EPSLanczosReorthogType reorthog)EPSLanczosSetReorthog_Lanczos767,27667
+#undef __FUNCT____FUNCT__787,28294
+#define __FUNCT__ __FUNCT__788,28311
+PetscErrorCode EPSLanczosSetReorthog(EPS eps,EPSLanczosReorthogType reorthog)EPSLanczosSetReorthog807,28869
+#undef __FUNCT____FUNCT__818,29236
+#define __FUNCT__ __FUNCT__819,29253
+static PetscErrorCode EPSLanczosGetReorthog_Lanczos(EPS eps,EPSLanczosReorthogType *reorthog)EPSLanczosGetReorthog_Lanczos820,29303
+#undef __FUNCT____FUNCT__829,29534
+#define __FUNCT__ __FUNCT__830,29551
+PetscErrorCode EPSLanczosGetReorthog(EPS eps,EPSLanczosReorthogType *reorthog)EPSLanczosGetReorthog847,29931
+#undef __FUNCT____FUNCT__858,30282
+#define __FUNCT__ __FUNCT__859,30299
+PetscErrorCode EPSReset_Lanczos(EPS eps)EPSReset_Lanczos860,30336
+#undef __FUNCT____FUNCT__870,30555
+#define __FUNCT__ __FUNCT__871,30572
+PetscErrorCode EPSDestroy_Lanczos(EPS eps)EPSDestroy_Lanczos872,30611
+#undef __FUNCT____FUNCT__883,30976
+#define __FUNCT__ __FUNCT__884,30993
+PetscErrorCode EPSView_Lanczos(EPS eps,PetscViewer viewer)EPSView_Lanczos885,31029
+#undef __FUNCT____FUNCT__899,31497
+#define __FUNCT__ __FUNCT__900,31514
+PETSC_EXTERN PetscErrorCode EPSCreate_Lanczos(EPS eps)EPSCreate_Lanczos901,31552
 

 src/eps/impls/krylov/lanczos/makefile,287
 makefile:^?makefile^A,1
@@ -4274,12 +4532,12 @@ lapack.c:^?lapack.c^A,1
 #undef __FUNCT____FUNCT__27,1109
 #define __FUNCT__ __FUNCT__28,1126
 PetscErrorCode EPSSetUp_LAPACK(EPS eps)EPSSetUp_LAPACK29,1162
-#undef __FUNCT____FUNCT__133,5136
-#define __FUNCT__ __FUNCT__134,5153
-PetscErrorCode EPSSolve_LAPACK(EPS eps)EPSSolve_LAPACK135,5189
-#undef __FUNCT____FUNCT__165,6205
-#define __FUNCT__ __FUNCT__166,6222
-PETSC_EXTERN PetscErrorCode EPSCreate_LAPACK(EPS eps)EPSCreate_LAPACK167,6259
+#undef __FUNCT____FUNCT__134,5237
+#define __FUNCT__ __FUNCT__135,5254
+PetscErrorCode EPSSolve_LAPACK(EPS eps)EPSSolve_LAPACK136,5290
+#undef __FUNCT____FUNCT__166,6306
+#define __FUNCT__ __FUNCT__167,6323
+PETSC_EXTERN PetscErrorCode EPSCreate_LAPACK(EPS eps)EPSCreate_LAPACK168,6360
 

 src/eps/impls/lapack/makefile,278
 makefile:^?makefile^A,1
@@ -4312,7 +4570,7 @@ DIRS     =DIRS30,1022
 MANSEC   = EPSMANSEC31,1033
 LOCDIR   = src/eps/impls/power/LOCDIR32,1048
 

-src/eps/impls/power/power.c,1888
+src/eps/impls/power/power.c,1892
 power.c:^?power.c^A,1
   EPSPowerShiftType shift_type;shift_type45,1618
 } EPS_POWER;EPS_POWER46,1650
@@ -4322,33 +4580,33 @@ PetscErrorCode EPSSetUp_Power(EPS eps)EPSSetUp_Power50,1716
 #undef __FUNCT____FUNCT__82,3695
 #define __FUNCT__ __FUNCT__83,3712
 PetscErrorCode EPSSolve_Power(EPS eps)EPSSolve_Power84,3747
-#undef __FUNCT____FUNCT__215,8575
-#define __FUNCT__ __FUNCT__216,8592
-PetscErrorCode EPSBackTransform_Power(EPS eps)EPSBackTransform_Power217,8635
-#undef __FUNCT____FUNCT__229,8923
-#define __FUNCT__ __FUNCT__230,8940
-PetscErrorCode EPSSetFromOptions_Power(PetscOptions *PetscOptionsObject,EPS eps)EPSSetFromOptions_Power231,8984
-#undef __FUNCT____FUNCT__251,9736
-#define __FUNCT__ __FUNCT__252,9753
-static PetscErrorCode EPSPowerSetShiftType_Power(EPS eps,EPSPowerShiftType shift)EPSPowerSetShiftType_Power253,9800
-#undef __FUNCT____FUNCT__270,10264
-#define __FUNCT__ __FUNCT__271,10281
-PetscErrorCode EPSPowerSetShiftType(EPS eps,EPSPowerShiftType shift)EPSPowerSetShiftType300,11269
-#undef __FUNCT____FUNCT__311,11615
-#define __FUNCT__ __FUNCT__312,11632
-static PetscErrorCode EPSPowerGetShiftType_Power(EPS eps,EPSPowerShiftType *shift)EPSPowerGetShiftType_Power313,11679
-#undef __FUNCT____FUNCT__322,11891
-#define __FUNCT__ __FUNCT__323,11908
-PetscErrorCode EPSPowerGetShiftType(EPS eps,EPSPowerShiftType *shift)EPSPowerGetShiftType340,12247
-#undef __FUNCT____FUNCT__351,12577
-#define __FUNCT__ __FUNCT__352,12594
-PetscErrorCode EPSDestroy_Power(EPS eps)EPSDestroy_Power353,12631
-#undef __FUNCT____FUNCT__364,12992
-#define __FUNCT__ __FUNCT__365,13009
-PetscErrorCode EPSView_Power(EPS eps,PetscViewer viewer)EPSView_Power366,13043
-#undef __FUNCT____FUNCT__380,13485
-#define __FUNCT__ __FUNCT__381,13502
-PETSC_EXTERN PetscErrorCode EPSCreate_Power(EPS eps)EPSCreate_Power382,13538
+#undef __FUNCT____FUNCT__214,8600
+#define __FUNCT__ __FUNCT__215,8617
+PetscErrorCode EPSBackTransform_Power(EPS eps)EPSBackTransform_Power216,8660
+#undef __FUNCT____FUNCT__228,8948
+#define __FUNCT__ __FUNCT__229,8965
+PetscErrorCode EPSSetFromOptions_Power(PetscOptionItems *PetscOptionsObject,EPS eps)EPSSetFromOptions_Power230,9009
+#undef __FUNCT____FUNCT__250,9765
+#define __FUNCT__ __FUNCT__251,9782
+static PetscErrorCode EPSPowerSetShiftType_Power(EPS eps,EPSPowerShiftType shift)EPSPowerSetShiftType_Power252,9829
+#undef __FUNCT____FUNCT__269,10293
+#define __FUNCT__ __FUNCT__270,10310
+PetscErrorCode EPSPowerSetShiftType(EPS eps,EPSPowerShiftType shift)EPSPowerSetShiftType299,11298
+#undef __FUNCT____FUNCT__310,11644
+#define __FUNCT__ __FUNCT__311,11661
+static PetscErrorCode EPSPowerGetShiftType_Power(EPS eps,EPSPowerShiftType *shift)EPSPowerGetShiftType_Power312,11708
+#undef __FUNCT____FUNCT__321,11920
+#define __FUNCT__ __FUNCT__322,11937
+PetscErrorCode EPSPowerGetShiftType(EPS eps,EPSPowerShiftType *shift)EPSPowerGetShiftType339,12276
+#undef __FUNCT____FUNCT__350,12606
+#define __FUNCT__ __FUNCT__351,12623
+PetscErrorCode EPSDestroy_Power(EPS eps)EPSDestroy_Power352,12660
+#undef __FUNCT____FUNCT__363,13021
+#define __FUNCT__ __FUNCT__364,13038
+PetscErrorCode EPSView_Power(EPS eps,PetscViewer viewer)EPSView_Power365,13072
+#undef __FUNCT____FUNCT__379,13514
+#define __FUNCT__ __FUNCT__380,13531
+PETSC_EXTERN PetscErrorCode EPSCreate_Power(EPS eps)EPSCreate_Power381,13567
 

 src/eps/impls/subspace/makefile,282
 makefile:^?makefile^A,1
@@ -4376,14 +4634,14 @@ static PetscErrorCode EPSSubspaceResidualNorms(BV V,BV AV,PetscScalar *T,PetscIn
 #undef __FUNCT____FUNCT__156,5223
 #define __FUNCT__ __FUNCT__157,5240
 PetscErrorCode EPSSolve_Subspace(EPS eps)EPSSolve_Subspace158,5278
-#undef __FUNCT____FUNCT__324,11903
-#define __FUNCT__ __FUNCT__325,11920
-PetscErrorCode EPSDestroy_Subspace(EPS eps)EPSDestroy_Subspace326,11960
-#undef __FUNCT____FUNCT__335,12126
-#define __FUNCT__ __FUNCT__336,12143
-PETSC_EXTERN PetscErrorCode EPSCreate_Subspace(EPS eps)EPSCreate_Subspace337,12182
-

-src/eps/interface/dlregiseps.c,1733
+#undef __FUNCT____FUNCT__322,11935
+#define __FUNCT__ __FUNCT__323,11952
+PetscErrorCode EPSDestroy_Subspace(EPS eps)EPSDestroy_Subspace324,11992
+#undef __FUNCT____FUNCT__333,12158
+#define __FUNCT__ __FUNCT__334,12175
+PETSC_EXTERN PetscErrorCode EPSCreate_Subspace(EPS eps)EPSCreate_Subspace335,12214
+

+src/eps/interface/dlregiseps.c,2014
 dlregiseps.c:^?dlregiseps.c^A,1
 static PetscBool EPSPackageInitialized = PETSC_FALSE;EPSPackageInitialized24,960
 const char *EPSBalanceTypes[] = {"NONE","ONESIDE","TWOSIDE","USER","EPSBalance","EPS_BALANCE_",0};EPSBalanceTypes26,1015
@@ -4391,17 +4649,19 @@ const char *EPSErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","EPSErrorType","
 const char *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",0};EPSPowerShiftTypes28,1210
 const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",0};EPSLanczosReorthogTypes29,1323
 const char *EPSPRIMMEMethods[] = {"DYNAMIC","DEFAULT_MIN_TIME","DEFAULT_MIN_MATVECS","ARNOLDI","GD","GD_PLUSK","GD_OLSEN_PLUSK","JD_OLSEN_PLUSK","RQI","JDQR","JDQMR","JDQMR_ETOL","SUBSPACE_ITERATION","LOBPCG_ORTHOBASIS","LOBPCG_ORTHOBASISW","EPSPRIMMEMethod","EPS_PRIMME_",0};EPSPRIMMEMethods30,1475
-const char *const EPSConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","EPSConvergedReason","EPS_",0};EPSConvergedReasons_Shifted31,1752
-const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 5;EPSConvergedReasons32,1943
-#undef __FUNCT____FUNCT__34,2017
-#define __FUNCT__ __FUNCT__35,2034
-PetscErrorCode EPSFinalizePackage(void)EPSFinalizePackage44,2266
-#undef __FUNCT____FUNCT__55,2520
-#define __FUNCT__ __FUNCT__56,2537
-PetscErrorCode EPSInitializePackage()EPSInitializePackage66,2861
-#undef __FUNCT____FUNCT__105,4208
-#define __FUNCT__ __FUNCT__106,4225
-PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()PetscDLLibraryRegister_slepceps114,4475
+const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",0};EPSCISSQuadRules31,1752
+const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",0};EPSCISSExtractions32,1871
+const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",0};EPSConvergedReasons_Shifted33,1970
+const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;EPSConvergedReasons34,2172
+#undef __FUNCT____FUNCT__36,2246
+#define __FUNCT__ __FUNCT__37,2263
+PetscErrorCode EPSFinalizePackage(void)EPSFinalizePackage46,2495
+#undef __FUNCT____FUNCT__57,2749
+#define __FUNCT__ __FUNCT__58,2766
+PetscErrorCode EPSInitializePackage()EPSInitializePackage68,3090
+#undef __FUNCT____FUNCT__107,4439
+#define __FUNCT__ __FUNCT__108,4456
+PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()PetscDLLibraryRegister_slepceps116,4706
 

 src/eps/interface/epsbasic.c,3358
 epsbasic.c:^?epsbasic.c^A,1
@@ -4413,68 +4673,68 @@ PetscLogEvent     EPS_SetUp = 0,EPS_Solve = 0;EPS_Solve29,1166
 #undef __FUNCT____FUNCT__31,1214
 #define __FUNCT__ __FUNCT__32,1231
 PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)EPSCreate51,1580
-#undef __FUNCT____FUNCT__127,3976
-#define __FUNCT__ __FUNCT__128,3993
-PetscErrorCode EPSSetType(EPS eps,EPSType type)EPSSetType158,4943
-#undef __FUNCT____FUNCT__182,5767
-#define __FUNCT__ __FUNCT__183,5784
-PetscErrorCode EPSGetType(EPS eps,EPSType *type)EPSGetType199,6063
-#undef __FUNCT____FUNCT__208,6282
-#define __FUNCT__ __FUNCT__209,6299
-PetscErrorCode EPSRegister(const char *name,PetscErrorCode (*function)(EPS))EPSRegister236,6917
-#undef __FUNCT____FUNCT__245,7140
-#define __FUNCT__ __FUNCT__246,7157
-PetscErrorCode EPSReset(EPS eps)EPSReset260,7432
-#undef __FUNCT____FUNCT__283,8215
-#define __FUNCT__ __FUNCT__284,8232
-PetscErrorCode EPSDestroy(EPS *eps)EPSDestroy297,8478
-#undef __FUNCT____FUNCT__323,9548
-#define __FUNCT__ __FUNCT__324,9565
-PetscErrorCode EPSSetTarget(EPS eps,PetscScalar target)EPSSetTarget349,10263
-#undef __FUNCT____FUNCT__362,10641
-#define __FUNCT__ __FUNCT__363,10658
-PetscErrorCode EPSGetTarget(EPS eps,PetscScalar* target)EPSGetTarget382,10999
-#undef __FUNCT____FUNCT__391,11218
-#define __FUNCT__ __FUNCT__392,11235
-PetscErrorCode EPSSetInterval(EPS eps,PetscReal inta,PetscReal intb)EPSSetInterval421,12224
-#undef __FUNCT____FUNCT__434,12687
-#define __FUNCT__ __FUNCT__435,12704
-PetscErrorCode EPSGetInterval(EPS eps,PetscReal* inta,PetscReal* intb)EPSGetInterval455,13115
-#undef __FUNCT____FUNCT__466,13406
-#define __FUNCT__ __FUNCT__467,13423
-PetscErrorCode EPSSetST(EPS eps,ST st)EPSSetST485,13861
-#undef __FUNCT____FUNCT__500,14309
-#define __FUNCT__ __FUNCT__501,14326
-PetscErrorCode EPSGetST(EPS eps,ST *st)EPSGetST518,14669
-#undef __FUNCT____FUNCT__533,15064
-#define __FUNCT__ __FUNCT__534,15081
-PetscErrorCode EPSSetBV(EPS eps,BV V)EPSSetBV552,15490
-#undef __FUNCT____FUNCT__567,15930
-#define __FUNCT__ __FUNCT__568,15947
-PetscErrorCode EPSGetBV(EPS eps,BV *V)EPSGetBV584,16257
-#undef __FUNCT____FUNCT__599,16645
-#define __FUNCT__ __FUNCT__600,16662
-PetscErrorCode EPSSetRG(EPS eps,RG rg)EPSSetRG618,17048
-#undef __FUNCT____FUNCT__633,17496
-#define __FUNCT__ __FUNCT__634,17513
-PetscErrorCode EPSGetRG(EPS eps,RG *rg)EPSGetRG650,17803
-#undef __FUNCT____FUNCT__665,18198
-#define __FUNCT__ __FUNCT__666,18215
-PetscErrorCode EPSSetDS(EPS eps,DS ds)EPSSetDS684,18622
-#undef __FUNCT____FUNCT__699,19070
-#define __FUNCT__ __FUNCT__700,19087
-PetscErrorCode EPSGetDS(EPS eps,DS *ds)EPSGetDS716,19398
-#undef __FUNCT____FUNCT__731,19793
-#define __FUNCT__ __FUNCT__732,19810
-PetscErrorCode EPSIsGeneralized(EPS eps,PetscBool* is)EPSIsGeneralized749,20142
-#undef __FUNCT____FUNCT__758,20352
-#define __FUNCT__ __FUNCT__759,20369
-PetscErrorCode EPSIsHermitian(EPS eps,PetscBool* is)EPSIsHermitian776,20697
-#undef __FUNCT____FUNCT__785,20903
-#define __FUNCT__ __FUNCT__786,20920
-PetscErrorCode EPSIsPositive(EPS eps,PetscBool* is)EPSIsPositive803,21294
-

-src/eps/interface/epsdefault.c,1991
+#undef __FUNCT____FUNCT__127,3878
+#define __FUNCT__ __FUNCT__128,3895
+PetscErrorCode EPSSetType(EPS eps,EPSType type)EPSSetType158,4845
+#undef __FUNCT____FUNCT__182,5669
+#define __FUNCT__ __FUNCT__183,5686
+PetscErrorCode EPSGetType(EPS eps,EPSType *type)EPSGetType199,5965
+#undef __FUNCT____FUNCT__208,6184
+#define __FUNCT__ __FUNCT__209,6201
+PetscErrorCode EPSRegister(const char *name,PetscErrorCode (*function)(EPS))EPSRegister236,6819
+#undef __FUNCT____FUNCT__245,7042
+#define __FUNCT__ __FUNCT__246,7059
+PetscErrorCode EPSReset(EPS eps)EPSReset260,7334
+#undef __FUNCT____FUNCT__283,8117
+#define __FUNCT__ __FUNCT__284,8134
+PetscErrorCode EPSDestroy(EPS *eps)EPSDestroy297,8380
+#undef __FUNCT____FUNCT__322,9392
+#define __FUNCT__ __FUNCT__323,9409
+PetscErrorCode EPSSetTarget(EPS eps,PetscScalar target)EPSSetTarget348,10107
+#undef __FUNCT____FUNCT__361,10485
+#define __FUNCT__ __FUNCT__362,10502
+PetscErrorCode EPSGetTarget(EPS eps,PetscScalar* target)EPSGetTarget381,10843
+#undef __FUNCT____FUNCT__390,11062
+#define __FUNCT__ __FUNCT__391,11079
+PetscErrorCode EPSSetInterval(EPS eps,PetscReal inta,PetscReal intb)EPSSetInterval420,12068
+#undef __FUNCT____FUNCT__433,12531
+#define __FUNCT__ __FUNCT__434,12548
+PetscErrorCode EPSGetInterval(EPS eps,PetscReal* inta,PetscReal* intb)EPSGetInterval454,12959
+#undef __FUNCT____FUNCT__465,13250
+#define __FUNCT__ __FUNCT__466,13267
+PetscErrorCode EPSSetST(EPS eps,ST st)EPSSetST484,13705
+#undef __FUNCT____FUNCT__499,14153
+#define __FUNCT__ __FUNCT__500,14170
+PetscErrorCode EPSGetST(EPS eps,ST *st)EPSGetST517,14513
+#undef __FUNCT____FUNCT__532,14908
+#define __FUNCT__ __FUNCT__533,14925
+PetscErrorCode EPSSetBV(EPS eps,BV V)EPSSetBV551,15334
+#undef __FUNCT____FUNCT__566,15774
+#define __FUNCT__ __FUNCT__567,15791
+PetscErrorCode EPSGetBV(EPS eps,BV *V)EPSGetBV583,16101
+#undef __FUNCT____FUNCT__598,16489
+#define __FUNCT__ __FUNCT__599,16506
+PetscErrorCode EPSSetRG(EPS eps,RG rg)EPSSetRG617,16892
+#undef __FUNCT____FUNCT__632,17340
+#define __FUNCT__ __FUNCT__633,17357
+PetscErrorCode EPSGetRG(EPS eps,RG *rg)EPSGetRG649,17647
+#undef __FUNCT____FUNCT__664,18042
+#define __FUNCT__ __FUNCT__665,18059
+PetscErrorCode EPSSetDS(EPS eps,DS ds)EPSSetDS683,18466
+#undef __FUNCT____FUNCT__698,18914
+#define __FUNCT__ __FUNCT__699,18931
+PetscErrorCode EPSGetDS(EPS eps,DS *ds)EPSGetDS715,19242
+#undef __FUNCT____FUNCT__730,19637
+#define __FUNCT__ __FUNCT__731,19654
+PetscErrorCode EPSIsGeneralized(EPS eps,PetscBool* is)EPSIsGeneralized748,19986
+#undef __FUNCT____FUNCT__757,20196
+#define __FUNCT__ __FUNCT__758,20213
+PetscErrorCode EPSIsHermitian(EPS eps,PetscBool* is)EPSIsHermitian775,20541
+#undef __FUNCT____FUNCT__784,20747
+#define __FUNCT__ __FUNCT__785,20764
+PetscErrorCode EPSIsPositive(EPS eps,PetscBool* is)EPSIsPositive802,21138
+

+src/eps/interface/epsdefault.c,2207
 epsdefault.c:^?epsdefault.c^A,1
 #undef __FUNCT____FUNCT__27,1082
 #define __FUNCT__ __FUNCT__28,1099
@@ -4496,21 +4756,24 @@ PetscErrorCode EPSSetWorkVecs(EPS eps,PetscInt nw)EPSSetWorkVecs238,7636
 PetscErrorCode EPSSetWhichEigenpairs_Default(EPS eps)EPSSetWhichEigenpairs_Default261,8295
 #undef __FUNCT____FUNCT__273,8645
 #define __FUNCT__ __FUNCT__274,8662
-PetscErrorCode EPSConvergedEigRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)EPSConvergedEigRelative278,8787
-#undef __FUNCT____FUNCT__288,9036
-#define __FUNCT__ __FUNCT__289,9053
-PetscErrorCode EPSConvergedAbsolute(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)EPSConvergedAbsolute293,9156
-#undef __FUNCT____FUNCT__300,9347
-#define __FUNCT__ __FUNCT__301,9364
-PetscErrorCode EPSConvergedNormRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)EPSConvergedNormRelative306,9514
-#undef __FUNCT____FUNCT__316,9790
-#define __FUNCT__ __FUNCT__317,9807
-PetscErrorCode EPSComputeRitzVector(EPS eps,PetscScalar *Zr,PetscScalar *Zi,BV V,Vec x,Vec y)EPSComputeRitzVector327,10103
-#undef __FUNCT____FUNCT__377,11737
-#define __FUNCT__ __FUNCT__378,11754
-PetscErrorCode EPSBuildBalance_Krylov(EPS eps)EPSBuildBalance_Krylov383,11948
-

-src/eps/interface/epsmon.c,2052
+PetscErrorCode EPSConvergedRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)EPSConvergedRelative278,8781
+#undef __FUNCT____FUNCT__288,9027
+#define __FUNCT__ __FUNCT__289,9044
+PetscErrorCode EPSConvergedAbsolute(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)EPSConvergedAbsolute293,9147
+#undef __FUNCT____FUNCT__300,9338
+#define __FUNCT__ __FUNCT__301,9355
+PetscErrorCode EPSConvergedNorm(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)EPSConvergedNorm306,9489
+#undef __FUNCT____FUNCT__316,9757
+#define __FUNCT__ __FUNCT__317,9774
+PetscErrorCode EPSStoppingBasic(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)EPSStoppingBasic350,10898
+#undef __FUNCT____FUNCT__366,11527
+#define __FUNCT__ __FUNCT__367,11544
+PetscErrorCode EPSComputeRitzVector(EPS eps,PetscScalar *Zr,PetscScalar *Zi,BV V,Vec x,Vec y)EPSComputeRitzVector377,11840
+#undef __FUNCT____FUNCT__427,13474
+#define __FUNCT__ __FUNCT__428,13491
+PetscErrorCode EPSBuildBalance_Krylov(EPS eps)EPSBuildBalance_Krylov433,13685
+

+src/eps/interface/epsmon.c,2314
 epsmon.c:^?epsmon.c^A,1
 #undef __FUNCT____FUNCT__27,1047
 #define __FUNCT__ __FUNCT__28,1064
@@ -4526,133 +4789,151 @@ PetscErrorCode EPSMonitorCancel(EPS eps)EPSMonitorCancel123,4681
 PetscErrorCode EPSGetMonitorContext(EPS eps,void **ctx)EPSGetMonitorContext157,5427
 #undef __FUNCT____FUNCT__165,5616
 #define __FUNCT__ __FUNCT__166,5633
-PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)EPSMonitorAll187,6264
-#undef __FUNCT____FUNCT__215,7561
-#define __FUNCT__ __FUNCT__216,7578
-PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)EPSMonitorFirst237,8207
-#undef __FUNCT____FUNCT__261,9423
-#define __FUNCT__ __FUNCT__262,9440
-PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)EPSMonitorConverged287,10149
-#undef __FUNCT____FUNCT__320,11668
-#define __FUNCT__ __FUNCT__321,11685
-PetscErrorCode EPSMonitorLG(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)EPSMonitorLG322,11718
-#undef __FUNCT____FUNCT__373,13846
-#define __FUNCT__ __FUNCT__374,13863
-PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)EPSMonitorLGAll375,13899
-

-src/eps/interface/epsopts.c,4878
+PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)EPSMonitorAll187,6250
+#undef __FUNCT____FUNCT__224,8039
+#define __FUNCT__ __FUNCT__225,8056
+PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)EPSMonitorFirst246,8671
+#undef __FUNCT____FUNCT__281,10421
+#define __FUNCT__ __FUNCT__282,10438
+PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)EPSMonitorConverged303,11016
+#undef __FUNCT____FUNCT__343,12869
+#define __FUNCT__ __FUNCT__344,12886
+PetscErrorCode EPSMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)EPSMonitorLGCreate373,13686
+#undef __FUNCT____FUNCT__389,14232
+#define __FUNCT__ __FUNCT__390,14249
+PetscErrorCode EPSMonitorLG(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)EPSMonitorLG391,14282
+#undef __FUNCT____FUNCT__415,15128
+#define __FUNCT__ __FUNCT__416,15145
+PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)EPSMonitorLGAll417,15181
+

+src/eps/interface/epsopts.c,6189
 epsopts.c:^?epsopts.c^A,1
-#undef __FUNCT____FUNCT__27,1082
-#define __FUNCT__ __FUNCT__28,1099
-PetscErrorCode EPSSetFromOptions(EPS eps)EPSSetFromOptions44,1488
-#undef __FUNCT____FUNCT__241,15256
-#define __FUNCT__ __FUNCT__242,15273
-PetscErrorCode EPSGetTolerances(EPS eps,PetscReal *tol,PetscInt *maxits)EPSGetTolerances263,15729
-#undef __FUNCT____FUNCT__272,15973
-#define __FUNCT__ __FUNCT__273,15990
-PetscErrorCode EPSSetTolerances(EPS eps,PetscReal tol,PetscInt maxits)EPSSetTolerances296,16603
-#undef __FUNCT____FUNCT__319,17413
-#define __FUNCT__ __FUNCT__320,17430
-PetscErrorCode EPSGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)EPSGetDimensions339,17906
-#undef __FUNCT____FUNCT__349,18173
-#define __FUNCT__ __FUNCT__350,18190
-PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)EPSSetDimensions389,19671
-#undef __FUNCT____FUNCT__414,20608
-#define __FUNCT__ __FUNCT__415,20625
-PetscErrorCode EPSSetWhichEigenpairs(EPS eps,EPSWhich which)EPSSetWhichEigenpairs475,23287
-#undef __FUNCT____FUNCT__505,24107
-#define __FUNCT__ __FUNCT__506,24124
-PetscErrorCode EPSGetWhichEigenpairs(EPS eps,EPSWhich *which)EPSGetWhichEigenpairs526,24571
-#undef __FUNCT____FUNCT__535,24786
-#define __FUNCT__ __FUNCT__536,24803
-PetscErrorCode EPSSetEigenvalueComparison(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)EPSSetEigenvalueComparison568,25946
-#undef __FUNCT____FUNCT__578,26303
-#define __FUNCT__ __FUNCT__579,26320
-PetscErrorCode EPSSetArbitrarySelection(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)EPSSetArbitrarySelection627,28505
-#undef __FUNCT____FUNCT__637,28848
-#define __FUNCT__ __FUNCT__638,28865
-PetscErrorCode EPSSetConvergenceTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))EPSSetConvergenceTestFunction670,30060
-#undef __FUNCT____FUNCT__689,30801
-#define __FUNCT__ __FUNCT__690,30818
-PetscErrorCode EPSSetConvergenceTest(EPS eps,EPSConv conv)EPSSetConvergenceTest718,31840
-#undef __FUNCT____FUNCT__735,32447
-#define __FUNCT__ __FUNCT__736,32464
-PetscErrorCode EPSGetConvergenceTest(EPS eps,EPSConv *conv)EPSGetConvergenceTest753,32854
-#undef __FUNCT____FUNCT__762,33064
-#define __FUNCT__ __FUNCT__763,33081
-PetscErrorCode EPSSetProblemType(EPS eps,EPSProblemType type)EPSSetProblemType798,34552
-#undef __FUNCT____FUNCT__841,35804
-#define __FUNCT__ __FUNCT__842,35821
-PetscErrorCode EPSGetProblemType(EPS eps,EPSProblemType *type)EPSGetProblemType858,36134
-#undef __FUNCT____FUNCT__867,36355
-#define __FUNCT__ __FUNCT__868,36372
-PetscErrorCode EPSSetExtraction(EPS eps,EPSExtraction extr)EPSSetExtraction902,37504
-#undef __FUNCT____FUNCT__911,37737
-#define __FUNCT__ __FUNCT__912,37754
-PetscErrorCode EPSGetExtraction(EPS eps,EPSExtraction *extr)EPSGetExtraction928,38064
-#undef __FUNCT____FUNCT__937,38281
-#define __FUNCT__ __FUNCT__938,38298
-PetscErrorCode EPSSetBalance(EPS eps,EPSBalance bal,PetscInt its,PetscReal cutoff)EPSSetBalance981,40014
-#undef __FUNCT____FUNCT__1011,41125
-#define __FUNCT__ __FUNCT__1012,41142
-PetscErrorCode EPSGetBalance(EPS eps,EPSBalance *bal,PetscInt *its,PetscReal *cutoff)EPSGetBalance1034,41639
-#undef __FUNCT____FUNCT__1044,41944
-#define __FUNCT__ __FUNCT__1045,41961
-PetscErrorCode EPSSetTrueResidual(EPS eps,PetscBool trueres)EPSSetTrueResidual1073,43021
-#undef __FUNCT____FUNCT__1082,43258
-#define __FUNCT__ __FUNCT__1083,43275
-PetscErrorCode EPSGetTrueResidual(EPS eps,PetscBool *trueres)EPSGetTrueResidual1100,43614
-#undef __FUNCT____FUNCT__1109,43835
-#define __FUNCT__ __FUNCT__1110,43852
-PetscErrorCode EPSSetTrackAll(EPS eps,PetscBool trackall)EPSSetTrackAll1134,44609
-#undef __FUNCT____FUNCT__1143,44846
-#define __FUNCT__ __FUNCT__1144,44863
-PetscErrorCode EPSGetTrackAll(EPS eps,PetscBool *trackall)EPSGetTrackAll1161,45185
-#undef __FUNCT____FUNCT__1170,45406
-#define __FUNCT__ __FUNCT__1171,45423
-PetscErrorCode EPSSetPurify(EPS eps,PetscBool purify)EPSSetPurify1194,46196
-#undef __FUNCT____FUNCT__1203,46423
-#define __FUNCT__ __FUNCT__1204,46440
-PetscErrorCode EPSGetPurify(EPS eps,PetscBool *purify)EPSGetPurify1221,46747
-#undef __FUNCT____FUNCT__1230,46958
-#define __FUNCT__ __FUNCT__1231,46975
-PetscErrorCode EPSSetOptionsPrefix(EPS eps,const char *prefix)EPSSetOptionsPrefix1258,47716
-#undef __FUNCT____FUNCT__1276,48473
-#define __FUNCT__ __FUNCT__1277,48490
-PetscErrorCode EPSAppendOptionsPrefix(EPS eps,const char *prefix)EPSAppendOptionsPrefix1296,49039
-#undef __FUNCT____FUNCT__1314,49805
-#define __FUNCT__ __FUNCT__1315,49822
-PetscErrorCode EPSGetOptionsPrefix(EPS eps,const char *prefix[])EPSGetOptionsPrefix1335,50323
+#undef __FUNCT____FUNCT__28,1105
+#define __FUNCT__ __FUNCT__29,1122
+PetscErrorCode EPSMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)EPSMonitorSetFromOptions48,1750
+#undef __FUNCT____FUNCT__69,2777
+#define __FUNCT__ __FUNCT__70,2794
+PetscErrorCode EPSConvMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))EPSConvMonitorSetFromOptions88,3402
+#undef __FUNCT____FUNCT__106,4303
+#define __FUNCT__ __FUNCT__107,4320
+PetscErrorCode EPSSetFromOptions(EPS eps)EPSSetFromOptions123,4709
+#undef __FUNCT____FUNCT__311,18295
+#define __FUNCT__ __FUNCT__312,18312
+PetscErrorCode EPSGetTolerances(EPS eps,PetscReal *tol,PetscInt *maxits)EPSGetTolerances333,18768
+#undef __FUNCT____FUNCT__342,19012
+#define __FUNCT__ __FUNCT__343,19029
+PetscErrorCode EPSSetTolerances(EPS eps,PetscReal tol,PetscInt maxits)EPSSetTolerances366,19642
+#undef __FUNCT____FUNCT__389,20452
+#define __FUNCT__ __FUNCT__390,20469
+PetscErrorCode EPSGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)EPSGetDimensions409,20945
+#undef __FUNCT____FUNCT__419,21212
+#define __FUNCT__ __FUNCT__420,21229
+PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)EPSSetDimensions459,22710
+#undef __FUNCT____FUNCT__484,23647
+#define __FUNCT__ __FUNCT__485,23664
+PetscErrorCode EPSSetWhichEigenpairs(EPS eps,EPSWhich which)EPSSetWhichEigenpairs546,26431
+#undef __FUNCT____FUNCT__576,27251
+#define __FUNCT__ __FUNCT__577,27268
+PetscErrorCode EPSGetWhichEigenpairs(EPS eps,EPSWhich *which)EPSGetWhichEigenpairs597,27715
+#undef __FUNCT____FUNCT__606,27930
+#define __FUNCT__ __FUNCT__607,27947
+PetscErrorCode EPSSetEigenvalueComparison(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)EPSSetEigenvalueComparison639,29090
+#undef __FUNCT____FUNCT__649,29447
+#define __FUNCT__ __FUNCT__650,29464
+PetscErrorCode EPSSetArbitrarySelection(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)EPSSetArbitrarySelection698,31649
+#undef __FUNCT____FUNCT__708,31992
+#define __FUNCT__ __FUNCT__709,32009
+PetscErrorCode EPSSetConvergenceTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))EPSSetConvergenceTestFunction740,33169
+#undef __FUNCT____FUNCT__759,33899
+#define __FUNCT__ __FUNCT__760,33916
+PetscErrorCode EPSSetConvergenceTest(EPS eps,EPSConv conv)EPSSetConvergenceTest788,34960
+#undef __FUNCT____FUNCT__805,35556
+#define __FUNCT__ __FUNCT__806,35573
+PetscErrorCode EPSGetConvergenceTest(EPS eps,EPSConv *conv)EPSGetConvergenceTest823,35963
+#undef __FUNCT____FUNCT__832,36173
+#define __FUNCT__ __FUNCT__833,36190
+PetscErrorCode EPSSetStoppingTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))EPSSetStoppingTestFunction867,37516
+#undef __FUNCT____FUNCT__884,38115
+#define __FUNCT__ __FUNCT__885,38132
+PetscErrorCode EPSSetStoppingTest(EPS eps,EPSStop stop)EPSSetStoppingTest909,38861
+#undef __FUNCT____FUNCT__924,39315
+#define __FUNCT__ __FUNCT__925,39332
+PetscErrorCode EPSGetStoppingTest(EPS eps,EPSStop *stop)EPSGetStoppingTest942,39710
+#undef __FUNCT____FUNCT__951,39917
+#define __FUNCT__ __FUNCT__952,39934
+PetscErrorCode EPSSetProblemType(EPS eps,EPSProblemType type)EPSSetProblemType987,41405
+#undef __FUNCT____FUNCT__1032,42748
+#define __FUNCT__ __FUNCT__1033,42765
+PetscErrorCode EPSGetProblemType(EPS eps,EPSProblemType *type)EPSGetProblemType1049,43078
+#undef __FUNCT____FUNCT__1058,43299
+#define __FUNCT__ __FUNCT__1059,43316
+PetscErrorCode EPSSetExtraction(EPS eps,EPSExtraction extr)EPSSetExtraction1093,44448
+#undef __FUNCT____FUNCT__1102,44681
+#define __FUNCT__ __FUNCT__1103,44698
+PetscErrorCode EPSGetExtraction(EPS eps,EPSExtraction *extr)EPSGetExtraction1119,45008
+#undef __FUNCT____FUNCT__1128,45225
+#define __FUNCT__ __FUNCT__1129,45242
+PetscErrorCode EPSSetBalance(EPS eps,EPSBalance bal,PetscInt its,PetscReal cutoff)EPSSetBalance1172,46958
+#undef __FUNCT____FUNCT__1202,48069
+#define __FUNCT__ __FUNCT__1203,48086
+PetscErrorCode EPSGetBalance(EPS eps,EPSBalance *bal,PetscInt *its,PetscReal *cutoff)EPSGetBalance1225,48583
+#undef __FUNCT____FUNCT__1235,48888
+#define __FUNCT__ __FUNCT__1236,48905
+PetscErrorCode EPSSetTrueResidual(EPS eps,PetscBool trueres)EPSSetTrueResidual1264,49965
+#undef __FUNCT____FUNCT__1273,50202
+#define __FUNCT__ __FUNCT__1274,50219
+PetscErrorCode EPSGetTrueResidual(EPS eps,PetscBool *trueres)EPSGetTrueResidual1291,50558
+#undef __FUNCT____FUNCT__1300,50779
+#define __FUNCT__ __FUNCT__1301,50796
+PetscErrorCode EPSSetTrackAll(EPS eps,PetscBool trackall)EPSSetTrackAll1325,51553
+#undef __FUNCT____FUNCT__1334,51790
+#define __FUNCT__ __FUNCT__1335,51807
+PetscErrorCode EPSGetTrackAll(EPS eps,PetscBool *trackall)EPSGetTrackAll1352,52129
+#undef __FUNCT____FUNCT__1361,52350
+#define __FUNCT__ __FUNCT__1362,52367
+PetscErrorCode EPSSetPurify(EPS eps,PetscBool purify)EPSSetPurify1385,53140
+#undef __FUNCT____FUNCT__1394,53367
+#define __FUNCT__ __FUNCT__1395,53384
+PetscErrorCode EPSGetPurify(EPS eps,PetscBool *purify)EPSGetPurify1412,53691
+#undef __FUNCT____FUNCT__1421,53902
+#define __FUNCT__ __FUNCT__1422,53919
+PetscErrorCode EPSSetOptionsPrefix(EPS eps,const char *prefix)EPSSetOptionsPrefix1449,54660
+#undef __FUNCT____FUNCT__1467,55417
+#define __FUNCT__ __FUNCT__1468,55434
+PetscErrorCode EPSAppendOptionsPrefix(EPS eps,const char *prefix)EPSAppendOptionsPrefix1487,55983
+#undef __FUNCT____FUNCT__1505,56749
+#define __FUNCT__ __FUNCT__1506,56766
+PetscErrorCode EPSGetOptionsPrefix(EPS eps,const char *prefix[])EPSGetOptionsPrefix1527,57269
 

 src/eps/interface/epsregis.c,131
 epsregis.c:^?epsregis.c^A,1
-#undef __FUNCT____FUNCT__54,2158
-#define __FUNCT__ __FUNCT__55,2175
-PetscErrorCode EPSRegisterAll(void)EPSRegisterAll65,2358
+#undef __FUNCT____FUNCT__54,2096
+#define __FUNCT__ __FUNCT__55,2113
+PetscErrorCode EPSRegisterAll(void)EPSRegisterAll65,2296
 

 src/eps/interface/epssetup.c,1132
 epssetup.c:^?epssetup.c^A,1
 #undef __FUNCT____FUNCT__26,1033
 #define __FUNCT__ __FUNCT__27,1050
 PetscErrorCode EPSSetUp(EPS eps)EPSSetUp47,1654
-#undef __FUNCT____FUNCT__238,8999
-#define __FUNCT__ __FUNCT__239,9016
-PetscErrorCode EPSSetOperators(EPS eps,Mat A,Mat B)EPSSetOperators260,9635
-#undef __FUNCT____FUNCT__294,10795
-#define __FUNCT__ __FUNCT__295,10812
-PetscErrorCode EPSGetOperators(EPS eps,Mat *A,Mat *B)EPSGetOperators312,11239
-#undef __FUNCT____FUNCT__332,11715
-#define __FUNCT__ __FUNCT__333,11732
-PetscErrorCode EPSSetDeflationSpace(EPS eps,PetscInt n,Vec *v)EPSSetDeflationSpace361,12641
-#undef __FUNCT____FUNCT__374,13098
-#define __FUNCT__ __FUNCT__375,13115
-PetscErrorCode EPSSetInitialSpace(EPS eps,PetscInt n,Vec *is)EPSSetInitialSpace404,14053
-#undef __FUNCT____FUNCT__417,14515
-#define __FUNCT__ __FUNCT__418,14532
-PetscErrorCode EPSSetDimensions_Default(EPS eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)EPSSetDimensions_Default423,14699
-#undef __FUNCT____FUNCT__449,15643
-#define __FUNCT__ __FUNCT__450,15660
-PetscErrorCode EPSAllocateSolution(EPS eps,PetscInt extra)EPSAllocateSolution468,16151
+#undef __FUNCT____FUNCT__235,8886
+#define __FUNCT__ __FUNCT__236,8903
+PetscErrorCode EPSSetOperators(EPS eps,Mat A,Mat B)EPSSetOperators257,9522
+#undef __FUNCT____FUNCT__292,10729
+#define __FUNCT__ __FUNCT__293,10746
+PetscErrorCode EPSGetOperators(EPS eps,Mat *A,Mat *B)EPSGetOperators310,11173
+#undef __FUNCT____FUNCT__330,11649
+#define __FUNCT__ __FUNCT__331,11666
+PetscErrorCode EPSSetDeflationSpace(EPS eps,PetscInt n,Vec *v)EPSSetDeflationSpace359,12575
+#undef __FUNCT____FUNCT__372,13032
+#define __FUNCT__ __FUNCT__373,13049
+PetscErrorCode EPSSetInitialSpace(EPS eps,PetscInt n,Vec *is)EPSSetInitialSpace402,13987
+#undef __FUNCT____FUNCT__415,14449
+#define __FUNCT__ __FUNCT__416,14466
+PetscErrorCode EPSSetDimensions_Default(EPS eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)EPSSetDimensions_Default421,14633
+#undef __FUNCT____FUNCT__447,15577
+#define __FUNCT__ __FUNCT__448,15594
+PetscErrorCode EPSAllocateSolution(EPS eps,PetscInt extra)EPSAllocateSolution466,16085
 

 src/eps/interface/epssolve.c,2271
 epssolve.c:^?epssolve.c^A,1
@@ -4662,39 +4943,39 @@ PetscErrorCode EPSComputeVectors(EPS eps)EPSComputeVectors29,1114
 #undef __FUNCT____FUNCT__48,1486
 #define __FUNCT__ __FUNCT__49,1503
 PetscErrorCode EPSSolve(EPS eps)EPSSolve73,2428
-#undef __FUNCT____FUNCT__176,6104
-#define __FUNCT__ __FUNCT__177,6121
-PetscErrorCode EPSGetIterationNumber(EPS eps,PetscInt *its)EPSGetIterationNumber202,6875
-#undef __FUNCT____FUNCT__211,7085
-#define __FUNCT__ __FUNCT__212,7102
-PetscErrorCode EPSGetConverged(EPS eps,PetscInt *nconv)EPSGetConverged231,7482
-#undef __FUNCT____FUNCT__241,7719
-#define __FUNCT__ __FUNCT__242,7736
-PetscErrorCode EPSGetConvergedReason(EPS eps,EPSConvergedReason *reason)EPSGetConvergedReason268,8481
-#undef __FUNCT____FUNCT__278,8738
-#define __FUNCT__ __FUNCT__279,8755
-PetscErrorCode EPSGetInvariantSubspace(EPS eps,Vec *v)EPSGetInvariantSubspace309,9752
-#undef __FUNCT____FUNCT__330,10542
-#define __FUNCT__ __FUNCT__331,10559
-PetscErrorCode EPSGetEigenpair(EPS eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)EPSGetEigenpair371,12097
-#undef __FUNCT____FUNCT__385,12644
-#define __FUNCT__ __FUNCT__386,12661
-PetscErrorCode EPSGetEigenvalue(EPS eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi)EPSGetEigenvalue413,13452
-#undef __FUNCT____FUNCT__432,13974
-#define __FUNCT__ __FUNCT__433,13991
-PetscErrorCode EPSGetEigenvector(EPS eps,PetscInt i,Vec Vr,Vec Vi)EPSGetEigenvector467,15172
-#undef __FUNCT____FUNCT__505,16514
-#define __FUNCT__ __FUNCT__506,16531
-PetscErrorCode EPSGetErrorEstimate(EPS eps,PetscInt i,PetscReal *errest)EPSGetErrorEstimate529,17061
-#undef __FUNCT____FUNCT__540,17446
-#define __FUNCT__ __FUNCT__541,17463
-PetscErrorCode EPSComputeResidualNorm_Private(EPS eps,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)EPSComputeResidualNorm_Private551,17784
-#undef __FUNCT____FUNCT__603,20080
-#define __FUNCT__ __FUNCT__604,20097
-PetscErrorCode EPSComputeError(EPS eps,PetscInt i,EPSErrorType type,PetscReal *error)EPSComputeError627,20689
-#undef __FUNCT____FUNCT__693,22910
-#define __FUNCT__ __FUNCT__694,22927
-PetscErrorCode EPSGetStartVector(EPS eps,PetscInt i,PetscBool *breakdown)EPSGetStartVector719,23879
+#undef __FUNCT____FUNCT__176,6051
+#define __FUNCT__ __FUNCT__177,6068
+PetscErrorCode EPSGetIterationNumber(EPS eps,PetscInt *its)EPSGetIterationNumber202,6822
+#undef __FUNCT____FUNCT__211,7032
+#define __FUNCT__ __FUNCT__212,7049
+PetscErrorCode EPSGetConverged(EPS eps,PetscInt *nconv)EPSGetConverged231,7429
+#undef __FUNCT____FUNCT__241,7666
+#define __FUNCT__ __FUNCT__242,7683
+PetscErrorCode EPSGetConvergedReason(EPS eps,EPSConvergedReason *reason)EPSGetConvergedReason269,8508
+#undef __FUNCT____FUNCT__279,8765
+#define __FUNCT__ __FUNCT__280,8782
+PetscErrorCode EPSGetInvariantSubspace(EPS eps,Vec *v)EPSGetInvariantSubspace310,9779
+#undef __FUNCT____FUNCT__331,10569
+#define __FUNCT__ __FUNCT__332,10586
+PetscErrorCode EPSGetEigenpair(EPS eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)EPSGetEigenpair372,12124
+#undef __FUNCT____FUNCT__386,12671
+#define __FUNCT__ __FUNCT__387,12688
+PetscErrorCode EPSGetEigenvalue(EPS eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi)EPSGetEigenvalue414,13479
+#undef __FUNCT____FUNCT__433,14001
+#define __FUNCT__ __FUNCT__434,14018
+PetscErrorCode EPSGetEigenvector(EPS eps,PetscInt i,Vec Vr,Vec Vi)EPSGetEigenvector468,15199
+#undef __FUNCT____FUNCT__506,16541
+#define __FUNCT__ __FUNCT__507,16558
+PetscErrorCode EPSGetErrorEstimate(EPS eps,PetscInt i,PetscReal *errest)EPSGetErrorEstimate530,17088
+#undef __FUNCT____FUNCT__541,17473
+#define __FUNCT__ __FUNCT__542,17490
+PetscErrorCode EPSComputeResidualNorm_Private(EPS eps,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)EPSComputeResidualNorm_Private552,17811
+#undef __FUNCT____FUNCT__604,20071
+#define __FUNCT__ __FUNCT__605,20088
+PetscErrorCode EPSComputeError(EPS eps,PetscInt i,EPSErrorType type,PetscReal *error)EPSComputeError628,20680
+#undef __FUNCT____FUNCT__694,22901
+#define __FUNCT__ __FUNCT__695,22918
+PetscErrorCode EPSGetStartVector(EPS eps,PetscInt i,PetscBool *breakdown)EPSGetStartVector720,23870
 

 src/eps/interface/epsview.c,2626
 epsview.c:^?epsview.c^A,1
@@ -4702,50 +4983,50 @@ epsview.c:^?epsview.c^A,1
 #define __FUNCT__ __FUNCT__28,1075
 PetscErrorCode EPSView(EPS eps,PetscViewer viewer)EPSView56,1872
 #define HERM HERM70,2344
-#undef __FUNCT____FUNCT__226,10550
-#define __FUNCT__ __FUNCT__227,10567
-PetscErrorCode EPSReasonView(EPS eps,PetscViewer viewer)EPSReasonView244,11013
-#undef __FUNCT____FUNCT__263,12004
-#define __FUNCT__ __FUNCT__264,12021
-PetscErrorCode EPSReasonViewFromOptions(EPS eps)EPSReasonViewFromOptions276,12299
-#undef __FUNCT____FUNCT__298,13030
-#define __FUNCT__ __FUNCT__299,13047
-static PetscErrorCode EPSErrorView_ASCII(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView_ASCII300,13086
-#undef __FUNCT____FUNCT__348,14895
-#define __FUNCT__ __FUNCT__349,14912
-static PetscErrorCode EPSErrorView_DETAIL(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView_DETAIL350,14952
-#define EXLEN EXLEN356,15140
-#undef __FUNCT____FUNCT__393,16474
-#define __FUNCT__ __FUNCT__394,16491
-static PetscErrorCode EPSErrorView_MATLAB(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView_MATLAB395,16531
-#undef __FUNCT____FUNCT__413,17143
-#define __FUNCT__ __FUNCT__414,17160
-PetscErrorCode EPSErrorView(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView441,18043
-#undef __FUNCT____FUNCT__474,19220
-#define __FUNCT__ __FUNCT__475,19237
-PetscErrorCode EPSErrorViewFromOptions(EPS eps)EPSErrorViewFromOptions487,19525
-#undef __FUNCT____FUNCT__523,21091
-#define __FUNCT__ __FUNCT__524,21108
-static PetscErrorCode EPSValuesView_DRAW(EPS eps,PetscViewer viewer)EPSValuesView_DRAW525,21147
-#undef __FUNCT____FUNCT__555,22132
-#define __FUNCT__ __FUNCT__556,22149
-static PetscErrorCode EPSValuesView_ASCII(EPS eps,PetscViewer viewer)EPSValuesView_ASCII557,22189
-#undef __FUNCT____FUNCT__586,23077
-#define __FUNCT__ __FUNCT__587,23094
-static PetscErrorCode EPSValuesView_MATLAB(EPS eps,PetscViewer viewer)EPSValuesView_MATLAB588,23135
-#undef __FUNCT____FUNCT__617,24010
-#define __FUNCT__ __FUNCT__618,24027
-PetscErrorCode EPSValuesView(EPS eps,PetscViewer viewer)EPSValuesView635,24394
-#undef __FUNCT____FUNCT__669,25649
-#define __FUNCT__ __FUNCT__670,25666
-PetscErrorCode EPSValuesViewFromOptions(EPS eps)EPSValuesViewFromOptions682,25945
-#undef __FUNCT____FUNCT__704,26671
-#define __FUNCT__ __FUNCT__705,26688
-PetscErrorCode EPSVectorsView(EPS eps,PetscViewer viewer)EPSVectorsView727,27255
-#define NMLEN NMLEN732,27380
-#undef __FUNCT____FUNCT__757,28258
-#define __FUNCT__ __FUNCT__758,28275
-PetscErrorCode EPSVectorsViewFromOptions(EPS eps)EPSVectorsViewFromOptions770,28557
+#undef __FUNCT____FUNCT__236,11135
+#define __FUNCT__ __FUNCT__237,11152
+PetscErrorCode EPSReasonView(EPS eps,PetscViewer viewer)EPSReasonView254,11598
+#undef __FUNCT____FUNCT__273,12589
+#define __FUNCT__ __FUNCT__274,12606
+PetscErrorCode EPSReasonViewFromOptions(EPS eps)EPSReasonViewFromOptions286,12884
+#undef __FUNCT____FUNCT__308,13615
+#define __FUNCT__ __FUNCT__309,13632
+static PetscErrorCode EPSErrorView_ASCII(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView_ASCII310,13671
+#undef __FUNCT____FUNCT__363,15734
+#define __FUNCT__ __FUNCT__364,15751
+static PetscErrorCode EPSErrorView_DETAIL(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView_DETAIL365,15791
+#define EXLEN EXLEN371,15979
+#undef __FUNCT____FUNCT__408,17313
+#define __FUNCT__ __FUNCT__409,17330
+static PetscErrorCode EPSErrorView_MATLAB(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView_MATLAB410,17370
+#undef __FUNCT____FUNCT__428,17982
+#define __FUNCT__ __FUNCT__429,17999
+PetscErrorCode EPSErrorView(EPS eps,EPSErrorType etype,PetscViewer viewer)EPSErrorView456,18882
+#undef __FUNCT____FUNCT__489,20059
+#define __FUNCT__ __FUNCT__490,20076
+PetscErrorCode EPSErrorViewFromOptions(EPS eps)EPSErrorViewFromOptions502,20364
+#undef __FUNCT____FUNCT__538,21930
+#define __FUNCT__ __FUNCT__539,21947
+static PetscErrorCode EPSValuesView_DRAW(EPS eps,PetscViewer viewer)EPSValuesView_DRAW540,21986
+#undef __FUNCT____FUNCT__571,23019
+#define __FUNCT__ __FUNCT__572,23036
+static PetscErrorCode EPSValuesView_ASCII(EPS eps,PetscViewer viewer)EPSValuesView_ASCII573,23076
+#undef __FUNCT____FUNCT__602,23964
+#define __FUNCT__ __FUNCT__603,23981
+static PetscErrorCode EPSValuesView_MATLAB(EPS eps,PetscViewer viewer)EPSValuesView_MATLAB604,24022
+#undef __FUNCT____FUNCT__633,24897
+#define __FUNCT__ __FUNCT__634,24914
+PetscErrorCode EPSValuesView(EPS eps,PetscViewer viewer)EPSValuesView651,25281
+#undef __FUNCT____FUNCT__685,26536
+#define __FUNCT__ __FUNCT__686,26553
+PetscErrorCode EPSValuesViewFromOptions(EPS eps)EPSValuesViewFromOptions698,26832
+#undef __FUNCT____FUNCT__720,27558
+#define __FUNCT__ __FUNCT__721,27575
+PetscErrorCode EPSVectorsView(EPS eps,PetscViewer viewer)EPSVectorsView743,28142
+#define NMLEN NMLEN748,28267
+#undef __FUNCT____FUNCT__773,29150
+#define __FUNCT__ __FUNCT__774,29167
+PetscErrorCode EPSVectorsViewFromOptions(EPS eps)EPSVectorsViewFromOptions786,29449
 

 src/eps/interface/ftn-custom/makefile,257
 makefile:^?makefile^A,1
@@ -4758,49 +5039,57 @@ DIRS     =DIRS29,1037
 LIBBASE  = libslepcepsLIBBASE30,1048
 LOCDIR   = src/eps/interface/ftn-custom/LOCDIR31,1071
 

-src/eps/interface/ftn-custom/zepsf.c,8061
+src/eps/interface/ftn-custom/zepsf.c,9189
 zepsf.c:^?zepsf.c^A,1
-PETSC_EXTERN void epsmonitorall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorall_78,3650
-PETSC_EXTERN void epsmonitorlg_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorlg_83,3896
-PETSC_EXTERN void epsmonitorlgall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorlgall_88,4140
-PETSC_EXTERN void epsmonitorconverged_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorconverged_93,4390
-PETSC_EXTERN void epsmonitorfirst_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorfirst_98,4648
-  PetscFortranCallbackId monitor;monitor104,4914
-  PetscFortranCallbackId monitordestroy;monitordestroy105,4948
-  PetscFortranCallbackId convergence;convergence106,4989
-  PetscFortranCallbackId convdestroy;convdestroy107,5027
-  PetscFortranCallbackId comparison;comparison108,5065
-  PetscFortranCallbackId arbitrary;arbitrary109,5102
-} _cb;_cb110,5138
-#undef __FUNCT____FUNCT__113,5238
-static PetscErrorCode ourmonitor(EPS eps,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)ourmonitor115,5286
-#undef __FUNCT____FUNCT__120,5604
-static PetscErrorCode ourdestroy(void** ctx)ourdestroy122,5652
-#undef __FUNCT____FUNCT__128,5819
-static PetscErrorCode ourconvergence(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)ourconvergence130,5871
-#undef __FUNCT____FUNCT__135,6171
-static PetscErrorCode ourconvdestroy(void *ctx)ourconvdestroy137,6223
-#undef __FUNCT____FUNCT__143,6389
-static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)oureigenvaluecomparison145,6450
-#undef __FUNCT____FUNCT__151,6776
-static PetscErrorCode ourarbitraryfunc(PetscScalar er,PetscScalar ei,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx)ourarbitraryfunc153,6830
-PETSC_EXTERN void PETSC_STDCALL epsview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsview_159,7156
-PETSC_EXTERN void PETSC_STDCALL epsreasonview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsreasonview_166,7343
-PETSC_EXTERN void PETSC_STDCALL epserrorview_(EPS *eps,EPSErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)epserrorview_173,7542
-PETSC_EXTERN void PETSC_STDCALL epsvaluesview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsvaluesview_180,7766
-PETSC_EXTERN void PETSC_STDCALL epsvectorsview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsvectorsview_187,7965
-PETSC_EXTERN void PETSC_STDCALL epssettype_(EPS *eps,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epssettype_194,8166
-PETSC_EXTERN void PETSC_STDCALL epsgettype_(EPS *eps,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epsgettype_203,8381
-PETSC_EXTERN void PETSC_STDCALL epssetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epssetoptionsprefix_212,8660
-PETSC_EXTERN void PETSC_STDCALL epsappendoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epsappendoptionsprefix_221,8899
-PETSC_EXTERN void PETSC_STDCALL epsgetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epsgetoptionsprefix_230,9144
-PETSC_EXTERN void PETSC_STDCALL epsmonitorset_(EPS *eps,void (PETSC_STDCALL *monitor)(EPS*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)epsmonitorset_238,9412
-PETSC_EXTERN void PETSC_STDCALL epsconvergedabsolute_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)epsconvergedabsolute_273,11354
-PETSC_EXTERN void PETSC_STDCALL epsconvergedeigrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)epsconvergedeigrelative_278,11589
-PETSC_EXTERN void PETSC_STDCALL epsconvergednormrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)epsconvergednormrelative_283,11830
-PETSC_EXTERN void PETSC_STDCALL epssetconvergencetestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)epssetconvergencetestfunction_288,12073
-PETSC_EXTERN void PETSC_STDCALL epsseteigenvaluecomparison_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)epsseteigenvaluecomparison_309,13348
-PETSC_EXTERN void PETSC_STDCALL epssetarbitraryselection_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,Vec*,Vec*,PetscScalar*,PetscScalar*,void*,PetscErrorCode*),void *ctx,PetscErrorCode *ierr)epssetarbitraryselection_316,13804
+PETSC_EXTERN void epsmonitorall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)epsmonitorall_80,3754
+PETSC_EXTERN void epsmonitorconverged_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)epsmonitorconverged_85,4018
+PETSC_EXTERN void epsmonitorfirst_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)epsmonitorfirst_90,4289
+PETSC_EXTERN void epsmonitorlg_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorlg_95,4557
+PETSC_EXTERN void epsmonitorlgall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)epsmonitorlgall_100,4801
+  PetscFortranCallbackId monitor;monitor106,5067
+  PetscFortranCallbackId monitordestroy;monitordestroy107,5101
+  PetscFortranCallbackId convergence;convergence108,5142
+  PetscFortranCallbackId convdestroy;convdestroy109,5180
+  PetscFortranCallbackId stopping;stopping110,5218
+  PetscFortranCallbackId stopdestroy;stopdestroy111,5253
+  PetscFortranCallbackId comparison;comparison112,5291
+  PetscFortranCallbackId arbitrary;arbitrary113,5328
+} _cb;_cb114,5364
+#undef __FUNCT____FUNCT__117,5464
+static PetscErrorCode ourmonitor(EPS eps,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)ourmonitor119,5512
+#undef __FUNCT____FUNCT__124,5830
+static PetscErrorCode ourdestroy(void** ctx)ourdestroy126,5878
+#undef __FUNCT____FUNCT__132,6045
+static PetscErrorCode ourconvergence(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)ourconvergence134,6097
+#undef __FUNCT____FUNCT__139,6397
+static PetscErrorCode ourconvdestroy(void *ctx)ourconvdestroy141,6449
+#undef __FUNCT____FUNCT__147,6615
+static PetscErrorCode ourstopping(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)ourstopping149,6664
+#undef __FUNCT____FUNCT__154,6996
+static PetscErrorCode ourstopdestroy(void *ctx)ourstopdestroy156,7048
+#undef __FUNCT____FUNCT__162,7214
+static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)oureigenvaluecomparison164,7275
+#undef __FUNCT____FUNCT__170,7601
+static PetscErrorCode ourarbitraryfunc(PetscScalar er,PetscScalar ei,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx)ourarbitraryfunc172,7655
+PETSC_EXTERN void PETSC_STDCALL epsview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsview_178,7981
+PETSC_EXTERN void PETSC_STDCALL epsreasonview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsreasonview_185,8168
+PETSC_EXTERN void PETSC_STDCALL epserrorview_(EPS *eps,EPSErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)epserrorview_192,8367
+PETSC_EXTERN void PETSC_STDCALL epsvaluesview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsvaluesview_199,8591
+PETSC_EXTERN void PETSC_STDCALL epsvectorsview_(EPS *eps,PetscViewer *viewer,PetscErrorCode *ierr)epsvectorsview_206,8790
+PETSC_EXTERN void PETSC_STDCALL epssettype_(EPS *eps,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epssettype_213,8991
+PETSC_EXTERN void PETSC_STDCALL epsgettype_(EPS *eps,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epsgettype_222,9206
+PETSC_EXTERN void PETSC_STDCALL epssetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epssetoptionsprefix_231,9485
+PETSC_EXTERN void PETSC_STDCALL epsappendoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epsappendoptionsprefix_240,9724
+PETSC_EXTERN void PETSC_STDCALL epsgetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))epsgetoptionsprefix_249,9969
+PETSC_EXTERN void PETSC_STDCALL epsmonitorset_(EPS *eps,void (PETSC_STDCALL *monitor)(EPS*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)epsmonitorset_257,10237
+PETSC_EXTERN void PETSC_STDCALL epsconvergedabsolute_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)epsconvergedabsolute_282,12279
+PETSC_EXTERN void PETSC_STDCALL epsconvergedrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)epsconvergedrelative_287,12514
+PETSC_EXTERN void PETSC_STDCALL epsconvergednorm_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)epsconvergednorm_292,12749
+PETSC_EXTERN void PETSC_STDCALL epssetconvergencetestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)epssetconvergencetestfunction_297,12976
+PETSC_EXTERN void PETSC_STDCALL epsstoppingbasic_(EPS *eps,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,EPSConvergedReason *reason,void *ctx,PetscErrorCode *ierr)epsstoppingbasic_318,14240
+PETSC_EXTERN void PETSC_STDCALL epssetstoppingtestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)epssetstoppingtestfunction_323,14494
+PETSC_EXTERN void PETSC_STDCALL epsseteigenvaluecomparison_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)epsseteigenvaluecomparison_340,15470
+PETSC_EXTERN void PETSC_STDCALL epssetarbitraryselection_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,Vec*,Vec*,PetscScalar*,PetscScalar*,void*,PetscErrorCode*),void *ctx,PetscErrorCode *ierr)epssetarbitraryselection_347,15926
 

 src/eps/interface/makefile,367
 makefile:^?makefile^A,1
@@ -4831,40 +5120,55 @@ makefile:^?makefile^A,1
 LOCDIR   = src/mfn/examples/LOCDIR24,932
 DIRS     = tests tutorialsDIRS25,961
 

-src/mfn/examples/tests/makefile,334
+src/mfn/examples/tests/makefile,467
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/mfn/examples/tests/LOCDIR26,978
-EXAMPLESC  =EXAMPLESC27,1015
-EXAMPLESF  =EXAMPLESF28,1028
-MANSEC     = MFNMANSEC29,1041
-TESTS      =TESTS30,1058
-TESTEXAMPLES_C           =TESTEXAMPLES_C32,1072
+EXAMPLESC  = test1.cEXAMPLESC27,1015
+EXAMPLESF  =EXAMPLESF28,1036
+MANSEC     = MFNMANSEC29,1049
+TESTS      =TESTS30,1066
+TESTEXAMPLES_C_NOCOMPLEX = test1.PETSc runtest1_1 runtest1_2 test1.rmTESTEXAMPLES_C_NOCOMPLEX32,1080
+DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH41,1373
+

+src/mfn/examples/tests/test1.c,204
+test1.c:^?test1.c^A,1
+static char help[] = "Computes exp(A)*v for a matrix loaded from file.\n\n"help22,924
+#undef __FUNCT____FUNCT__28,1142
+#define __FUNCT__ __FUNCT__29,1159
+int main(int argc,char **argv)main30,1184
 

-src/mfn/examples/tutorials/ex23.c,364
+src/mfn/examples/tutorials/ex23.c,366
 ex23.c:^?ex23.c^A,1
-static char help[] = "Computes exp(A)*v for a matrix associated with a Markov model.\n\n"help22,924
-#undef __FUNCT____FUNCT__33,1233
-#define __FUNCT__ __FUNCT__34,1250
-int main(int argc,char **argv)main35,1275
-#undef __FUNCT____FUNCT__135,5213
-#define __FUNCT__ __FUNCT__136,5230
-PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel141,5388
-

-src/mfn/examples/tutorials/makefile,337
+static char help[] = "Computes exp(t*A)*v for a matrix associated with a Markov model.\n\n"help22,924
+#undef __FUNCT____FUNCT__34,1305
+#define __FUNCT__ __FUNCT__35,1322
+int main(int argc,char **argv)main36,1347
+#undef __FUNCT____FUNCT__136,5256
+#define __FUNCT__ __FUNCT__137,5273
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)MatMarkovModel142,5431
+

+src/mfn/examples/tutorials/ex26.c,216
+ex26.c:^?ex26.c^A,1
+static char help[] = "Computes the action of the square root of the 2-D Laplacian.\n\n"help22,924
+#undef __FUNCT____FUNCT__29,1219
+#define __FUNCT__ __FUNCT__30,1236
+int main(int argc,char **argv)main31,1261
+

+src/mfn/examples/tutorials/makefile,373
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/mfn/examples/tutorials/LOCDIR26,978
-EXAMPLESC  = ex23.cEXAMPLESC27,1019
-EXAMPLESF  =EXAMPLESF28,1039
-MANSEC     = MFNMANSEC29,1052
-TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rmTESTEXAMPLES_C31,1070
+EXAMPLESC  = ex23.c ex26.cEXAMPLESC27,1019
+EXAMPLESF  =EXAMPLESF28,1046
+MANSEC     = MFNMANSEC29,1059
+TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm ex26.PETSc runex26_1 ex26.rmTESTEXAMPLES_C31,1077
 

 src/mfn/f90-mod/makefile,397
 makefile:^?makefile^A,1
@@ -4885,6 +5189,30 @@ slepcmfnmod.F:^?slepcmfnmod.F^A,1
         module slepcmfndefslepcmfndef22,965
         module slepcmfnslepcmfn30,1163
 

+src/mfn/impls/expokit/makefile,283
+makefile:^?makefile^A,1
+CFLAGS   =CFLAGS24,936
+FFLAGS   =FFLAGS25,947
+SOURCEC  = mfnexpokit.cSOURCEC26,958
+SOURCEF  =SOURCEF27,982
+SOURCEH  =SOURCEH28,993
+LIBBASE  = libslepcmfnLIBBASE29,1004
+DIRS     =DIRS30,1027
+MANSEC   = MFNMANSEC31,1038
+LOCDIR   = src/mfn/impls/expokit/LOCDIR32,1053
+

+src/mfn/impls/expokit/mfnexpokit.c,444
+mfnexpokit.c:^?mfnexpokit.c^A,1
+#undef __FUNCT____FUNCT__39,1336
+#define __FUNCT__ __FUNCT__40,1353
+PetscErrorCode MFNSetUp_Expokit(MFN mfn)MFNSetUp_Expokit41,1390
+#undef __FUNCT____FUNCT__58,1927
+#define __FUNCT__ __FUNCT__59,1944
+PetscErrorCode MFNSolve_Expokit(MFN mfn,Vec b,Vec x)MFNSolve_Expokit60,1981
+#undef __FUNCT____FUNCT__198,6670
+#define __FUNCT__ __FUNCT__199,6687
+PETSC_EXTERN PetscErrorCode MFNCreate_Expokit(MFN mfn)MFNCreate_Expokit200,6725
+

 src/mfn/impls/krylov/makefile,281
 makefile:^?makefile^A,1
 CFLAGS   =CFLAGS24,936
@@ -4897,45 +5225,42 @@ DIRS     =DIRS30,1026
 MANSEC   = MFNMANSEC31,1037
 LOCDIR   = src/mfn/impls/krylov/LOCDIR32,1052
 

-src/mfn/impls/krylov/mfnkrylov.c,811
+src/mfn/impls/krylov/mfnkrylov.c,662
 mfnkrylov.c:^?mfnkrylov.c^A,1
-#undef __FUNCT____FUNCT__39,1316
-#define __FUNCT__ __FUNCT__40,1333
-PetscErrorCode MFNSetUp_Krylov(MFN mfn)MFNSetUp_Krylov41,1369
-#undef __FUNCT____FUNCT__57,2004
-#define __FUNCT__ __FUNCT__58,2021
-static PetscErrorCode MFNBasicArnoldi(BV V, Mat A,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown)MFNBasicArnoldi59,2057
-#undef __FUNCT____FUNCT__85,2851
-#define __FUNCT__ __FUNCT__86,2868
-static PetscErrorCode CreateDenseMat(PetscInt k,Mat *A)CreateDenseMat90,2991
-#undef __FUNCT____FUNCT__111,3462
-#define __FUNCT__ __FUNCT__112,3479
-PetscErrorCode MFNSolve_Krylov(MFN mfn,Vec b,Vec x)MFNSolve_Krylov113,3515
-#undef __FUNCT____FUNCT__251,8078
-#define __FUNCT__ __FUNCT__252,8095
-PETSC_EXTERN PetscErrorCode MFNCreate_Krylov(MFN mfn)MFNCreate_Krylov253,8132
-

-src/mfn/impls/makefile,138
+#undef __FUNCT____FUNCT__41,1431
+#define __FUNCT__ __FUNCT__42,1448
+PetscErrorCode MFNSetUp_Krylov(MFN mfn)MFNSetUp_Krylov43,1484
+#undef __FUNCT____FUNCT__56,1806
+#define __FUNCT__ __FUNCT__57,1823
+PetscErrorCode MFNBasicArnoldi(MFN mfn,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)MFNBasicArnoldi58,1859
+#undef __FUNCT____FUNCT__84,2713
+#define __FUNCT__ __FUNCT__85,2730
+PetscErrorCode MFNSolve_Krylov(MFN mfn,Vec b,Vec x)MFNSolve_Krylov86,2766
+#undef __FUNCT____FUNCT__182,6054
+#define __FUNCT__ __FUNCT__183,6071
+PETSC_EXTERN PetscErrorCode MFNCreate_Krylov(MFN mfn)MFNCreate_Krylov184,6108
+

+src/mfn/impls/makefile,146
 makefile:^?makefile^A,1
 LIBBASE  = libslepcmfnLIBBASE24,936
-DIRS     = krylovDIRS25,959
-LOCDIR   = src/mfn/impls/LOCDIR26,977
-MANSEC   = MFNMANSEC27,1003
+DIRS     = krylov expokitDIRS25,959
+LOCDIR   = src/mfn/impls/LOCDIR26,985
+MANSEC   = MFNMANSEC27,1011
 

-src/mfn/interface/dlregismfn.c,845
+src/mfn/interface/dlregismfn.c,861
 dlregismfn.c:^?dlregismfn.c^A,1
 static PetscBool MFNPackageInitialized = PETSC_FALSE;MFNPackageInitialized24,960
-const char *const MFNConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","MFNConvergedReason","MFN_",0};MFNConvergedReasons_Shifted26,1015
-const char *const*MFNConvergedReasons = MFNConvergedReasons_Shifted + 4;MFNConvergedReasons27,1181
-#undef __FUNCT____FUNCT__29,1255
-#define __FUNCT__ __FUNCT__30,1272
-PetscErrorCode MFNFinalizePackage(void)MFNFinalizePackage39,1504
-#undef __FUNCT____FUNCT__50,1758
-#define __FUNCT__ __FUNCT__51,1775
-PetscErrorCode MFNInitializePackage(void)MFNInitializePackage61,2099
-#undef __FUNCT____FUNCT__100,3455
-#define __FUNCT__ __FUNCT__101,3472
-PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcmfn()PetscDLLibraryRegister_slepcmfn109,3722
+const char *const MFNConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","CONVERGED_ITS","MFNConvergedReason","MFN_",0};MFNConvergedReasons_Shifted26,1015
+const char *const*MFNConvergedReasons = MFNConvergedReasons_Shifted + 4;MFNConvergedReasons27,1197
+#undef __FUNCT____FUNCT__29,1271
+#define __FUNCT__ __FUNCT__30,1288
+PetscErrorCode MFNFinalizePackage(void)MFNFinalizePackage39,1520
+#undef __FUNCT____FUNCT__50,1774
+#define __FUNCT__ __FUNCT__51,1791
+PetscErrorCode MFNInitializePackage(void)MFNInitializePackage61,2115
+#undef __FUNCT____FUNCT__100,3473
+#define __FUNCT__ __FUNCT__101,3490
+PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcmfn()PetscDLLibraryRegister_slepcmfn109,3740
 

 src/mfn/interface/ftn-custom/makefile,257
 makefile:^?makefile^A,1
@@ -4948,25 +5273,25 @@ DIRS     =DIRS29,1037
 LIBBASE  = libslepcmfnLIBBASE30,1048
 LOCDIR   = src/mfn/interface/ftn-custom/LOCDIR31,1071
 

-src/mfn/interface/ftn-custom/zmfnf.c,2963
+src/mfn/interface/ftn-custom/zmfnf.c,2980
 zmfnf.c:^?zmfnf.c^A,1
-PETSC_EXTERN void mfnmonitordefault_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)mfnmonitordefault_53,2259
-PETSC_EXTERN void mfnmonitorlg_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)mfnmonitorlg_58,2424
-  PetscFortranCallbackId monitor;monitor64,2595
-  PetscFortranCallbackId monitordestroy;monitordestroy65,2629
-} _cb;_cb66,2670
-#undef __FUNCT____FUNCT__69,2770
-static PetscErrorCode ourmonitor(MFN mfn,PetscInt i,PetscReal d,void* ctx)ourmonitor71,2818
-#undef __FUNCT____FUNCT__76,3022
-static PetscErrorCode ourdestroy(void** ctx)ourdestroy78,3070
-PETSC_EXTERN void PETSC_STDCALL mfnview_(MFN *mfn,PetscViewer *viewer,PetscErrorCode *ierr)mfnview_84,3237
-PETSC_EXTERN void PETSC_STDCALL mfnreasonview_(MFN *mfn,PetscViewer *viewer,PetscErrorCode *ierr)mfnreasonview_91,3424
-PETSC_EXTERN void PETSC_STDCALL mfnsettype_(MFN *mfn,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfnsettype_98,3623
-PETSC_EXTERN void PETSC_STDCALL mfngettype_(MFN *mfn,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfngettype_107,3838
-PETSC_EXTERN void PETSC_STDCALL mfnsetoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfnsetoptionsprefix_116,4117
-PETSC_EXTERN void PETSC_STDCALL mfnappendoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfnappendoptionsprefix_125,4356
-PETSC_EXTERN void PETSC_STDCALL mfngetoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfngetoptionsprefix_134,4601
-PETSC_EXTERN void PETSC_STDCALL mfnmonitorset_(MFN *mfn,void (PETSC_STDCALL *monitor)(MFN*,PetscInt*,PetscReal*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)mfnmonitorset_142,4869
+PETSC_EXTERN void mfnmonitordefault_(MFN *mfn,PetscInt *it,PetscReal *errest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)mfnmonitordefault_53,2259
+PETSC_EXTERN void mfnmonitorlg_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)mfnmonitorlg_58,2442
+  PetscFortranCallbackId monitor;monitor64,2613
+  PetscFortranCallbackId monitordestroy;monitordestroy65,2647
+} _cb;_cb66,2688
+#undef __FUNCT____FUNCT__69,2788
+static PetscErrorCode ourmonitor(MFN mfn,PetscInt i,PetscReal d,void* ctx)ourmonitor71,2836
+#undef __FUNCT____FUNCT__76,3040
+static PetscErrorCode ourdestroy(void** ctx)ourdestroy78,3088
+PETSC_EXTERN void PETSC_STDCALL mfnview_(MFN *mfn,PetscViewer *viewer,PetscErrorCode *ierr)mfnview_84,3255
+PETSC_EXTERN void PETSC_STDCALL mfnreasonview_(MFN *mfn,PetscViewer *viewer,PetscErrorCode *ierr)mfnreasonview_91,3442
+PETSC_EXTERN void PETSC_STDCALL mfnsettype_(MFN *mfn,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfnsettype_98,3641
+PETSC_EXTERN void PETSC_STDCALL mfngettype_(MFN *mfn,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfngettype_107,3856
+PETSC_EXTERN void PETSC_STDCALL mfnsetoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfnsetoptionsprefix_116,4135
+PETSC_EXTERN void PETSC_STDCALL mfnappendoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfnappendoptionsprefix_125,4374
+PETSC_EXTERN void PETSC_STDCALL mfngetoptionsprefix_(MFN *mfn,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))mfngetoptionsprefix_134,4619
+PETSC_EXTERN void PETSC_STDCALL mfnmonitorset_(MFN *mfn,void (PETSC_STDCALL *monitor)(MFN*,PetscInt*,PetscReal*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)mfnmonitorset_142,4887
 

 src/mfn/interface/makefile,344
 makefile:^?makefile^A,1
@@ -4999,35 +5324,35 @@ PetscErrorCode MFNReasonViewFromOptions(MFN mfn)MFNReasonViewFromOptions146,52
 #undef __FUNCT____FUNCT__168,5993
 #define __FUNCT__ __FUNCT__169,6010
 PetscErrorCode MFNCreate(MPI_Comm comm,MFN *outmfn)MFNCreate188,6354
-#undef __FUNCT____FUNCT__228,7515
-#define __FUNCT__ __FUNCT__229,7532
-PetscErrorCode MFNSetType(MFN mfn,MFNType type)MFNSetType259,8467
-#undef __FUNCT____FUNCT__283,9281
-#define __FUNCT__ __FUNCT__284,9298
-PetscErrorCode MFNGetType(MFN mfn,MFNType *type)MFNGetType300,9581
-#undef __FUNCT____FUNCT__309,9800
-#define __FUNCT__ __FUNCT__310,9817
-PetscErrorCode MFNRegister(const char *name,PetscErrorCode (*function)(MFN))MFNRegister337,10438
-#undef __FUNCT____FUNCT__346,10661
-#define __FUNCT__ __FUNCT__347,10678
-PetscErrorCode MFNReset(MFN mfn)MFNReset361,10963
-#undef __FUNCT____FUNCT__372,11216
-#define __FUNCT__ __FUNCT__373,11233
-PetscErrorCode MFNDestroy(MFN *mfn)MFNDestroy386,11483
-#undef __FUNCT____FUNCT__405,12177
-#define __FUNCT__ __FUNCT__406,12194
-PetscErrorCode MFNSetBV(MFN mfn,BV bv)MFNSetBV424,12616
-#undef __FUNCT____FUNCT__439,13061
-#define __FUNCT__ __FUNCT__440,13078
-PetscErrorCode MFNGetBV(MFN mfn,BV *bv)MFNGetBV457,13400
-#undef __FUNCT____FUNCT__472,13791
-#define __FUNCT__ __FUNCT__473,13808
-PetscErrorCode MFNSetFN(MFN mfn,FN fn)MFNSetFN491,14204
-#undef __FUNCT____FUNCT__506,14652
-#define __FUNCT__ __FUNCT__507,14669
-PetscErrorCode MFNGetFN(MFN mfn,FN *fn)MFNGetFN523,14980
-

-src/mfn/interface/mfnmon.c,1056
+#undef __FUNCT____FUNCT__223,7244
+#define __FUNCT__ __FUNCT__224,7261
+PetscErrorCode MFNSetType(MFN mfn,MFNType type)MFNSetType254,8196
+#undef __FUNCT____FUNCT__278,9010
+#define __FUNCT__ __FUNCT__279,9027
+PetscErrorCode MFNGetType(MFN mfn,MFNType *type)MFNGetType295,9310
+#undef __FUNCT____FUNCT__304,9529
+#define __FUNCT__ __FUNCT__305,9546
+PetscErrorCode MFNRegister(const char *name,PetscErrorCode (*function)(MFN))MFNRegister332,10167
+#undef __FUNCT____FUNCT__341,10390
+#define __FUNCT__ __FUNCT__342,10407
+PetscErrorCode MFNReset(MFN mfn)MFNReset356,10692
+#undef __FUNCT____FUNCT__367,10945
+#define __FUNCT__ __FUNCT__368,10962
+PetscErrorCode MFNDestroy(MFN *mfn)MFNDestroy381,11212
+#undef __FUNCT____FUNCT__399,11848
+#define __FUNCT__ __FUNCT__400,11865
+PetscErrorCode MFNSetBV(MFN mfn,BV bv)MFNSetBV418,12287
+#undef __FUNCT____FUNCT__433,12732
+#define __FUNCT__ __FUNCT__434,12749
+PetscErrorCode MFNGetBV(MFN mfn,BV *bv)MFNGetBV451,13071
+#undef __FUNCT____FUNCT__466,13462
+#define __FUNCT__ __FUNCT__467,13479
+PetscErrorCode MFNSetFN(MFN mfn,FN fn)MFNSetFN485,13875
+#undef __FUNCT____FUNCT__500,14323
+#define __FUNCT__ __FUNCT__501,14340
+PetscErrorCode MFNGetFN(MFN mfn,FN *fn)MFNGetFN517,14647
+

+src/mfn/interface/mfnmon.c,1296
 mfnmon.c:^?mfnmon.c^A,1
 #undef __FUNCT____FUNCT__27,1047
 #define __FUNCT__ __FUNCT__28,1064
@@ -5043,76 +5368,82 @@ PetscErrorCode MFNMonitorCancel(MFN mfn)MFNMonitorCancel113,3948
 PetscErrorCode MFNGetMonitorContext(MFN mfn,void **ctx)MFNGetMonitorContext147,4698
 #undef __FUNCT____FUNCT__155,4887
 #define __FUNCT__ __FUNCT__156,4904
-PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,void *monctx)MFNMonitorDefault173,5326
-#undef __FUNCT____FUNCT__188,6037
-#define __FUNCT__ __FUNCT__189,6054
-PetscErrorCode MFNMonitorLG(MFN mfn,PetscInt its,PetscReal errest,void *monctx)MFNMonitorLG190,6087
-

-src/mfn/interface/mfnopts.c,1657
+PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,PetscViewerAndFormat *vf)MFNMonitorDefault173,5312
+#undef __FUNCT____FUNCT__194,6239
+#define __FUNCT__ __FUNCT__195,6256
+PetscErrorCode MFNMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)MFNMonitorLGCreate223,6966
+#undef __FUNCT____FUNCT__239,7512
+#define __FUNCT__ __FUNCT__240,7529
+PetscErrorCode MFNMonitorLG(MFN mfn,PetscInt its,PetscReal errest,void *ctx)MFNMonitorLG241,7562
+

+src/mfn/interface/mfnopts.c,1944
 mfnopts.c:^?mfnopts.c^A,1
-#undef __FUNCT____FUNCT__27,1082
-#define __FUNCT__ __FUNCT__28,1099
-PetscErrorCode MFNSetFromOptions(MFN mfn)MFNSetFromOptions44,1492
-#undef __FUNCT____FUNCT__124,5020
-#define __FUNCT__ __FUNCT__125,5037
-PetscErrorCode MFNGetTolerances(MFN mfn,PetscReal *tol,PetscInt *maxits)MFNGetTolerances146,5497
-#undef __FUNCT____FUNCT__155,5741
-#define __FUNCT__ __FUNCT__156,5758
-PetscErrorCode MFNSetTolerances(MFN mfn,PetscReal tol,PetscInt maxits)MFNSetTolerances179,6375
-#undef __FUNCT____FUNCT__202,7162
-#define __FUNCT__ __FUNCT__203,7179
-PetscErrorCode MFNGetDimensions(MFN mfn,PetscInt *ncv)MFNGetDimensions219,7526
-#undef __FUNCT____FUNCT__228,7728
-#define __FUNCT__ __FUNCT__229,7745
-PetscErrorCode MFNSetDimensions(MFN mfn,PetscInt ncv)MFNSetDimensions250,8293
-#undef __FUNCT____FUNCT__265,8742
-#define __FUNCT__ __FUNCT__266,8759
-PetscErrorCode MFNSetErrorIfNotConverged(MFN mfn,PetscBool flg)MFNSetErrorIfNotConverged288,9415
-#undef __FUNCT____FUNCT__297,9659
-#define __FUNCT__ __FUNCT__298,9676
-PetscErrorCode MFNGetErrorIfNotConverged(MFN mfn,PetscBool *flag)MFNGetErrorIfNotConverged315,10095
-#undef __FUNCT____FUNCT__324,10326
-#define __FUNCT__ __FUNCT__325,10343
-PetscErrorCode MFNSetOptionsPrefix(MFN mfn,const char *prefix)MFNSetOptionsPrefix352,11088
-#undef __FUNCT____FUNCT__366,11597
-#define __FUNCT__ __FUNCT__367,11614
-PetscErrorCode MFNAppendOptionsPrefix(MFN mfn,const char *prefix)MFNAppendOptionsPrefix386,12167
-#undef __FUNCT____FUNCT__400,12682
-#define __FUNCT__ __FUNCT__401,12699
-PetscErrorCode MFNGetOptionsPrefix(MFN mfn,const char *prefix[])MFNGetOptionsPrefix421,13204
+#undef __FUNCT____FUNCT__28,1105
+#define __FUNCT__ __FUNCT__29,1122
+PetscErrorCode MFNMonitorSetFromOptions(MFN mfn,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,PetscViewerAndFormat*))MFNMonitorSetFromOptions48,1750
+#undef __FUNCT____FUNCT__66,2583
+#define __FUNCT__ __FUNCT__67,2600
+PetscErrorCode MFNSetFromOptions(MFN mfn)MFNSetFromOptions83,2993
+#undef __FUNCT____FUNCT__160,6352
+#define __FUNCT__ __FUNCT__161,6369
+PetscErrorCode MFNGetTolerances(MFN mfn,PetscReal *tol,PetscInt *maxits)MFNGetTolerances182,6829
+#undef __FUNCT____FUNCT__191,7073
+#define __FUNCT__ __FUNCT__192,7090
+PetscErrorCode MFNSetTolerances(MFN mfn,PetscReal tol,PetscInt maxits)MFNSetTolerances215,7707
+#undef __FUNCT____FUNCT__238,8494
+#define __FUNCT__ __FUNCT__239,8511
+PetscErrorCode MFNGetDimensions(MFN mfn,PetscInt *ncv)MFNGetDimensions255,8858
+#undef __FUNCT____FUNCT__264,9060
+#define __FUNCT__ __FUNCT__265,9077
+PetscErrorCode MFNSetDimensions(MFN mfn,PetscInt ncv)MFNSetDimensions286,9625
+#undef __FUNCT____FUNCT__301,10074
+#define __FUNCT__ __FUNCT__302,10091
+PetscErrorCode MFNSetErrorIfNotConverged(MFN mfn,PetscBool flg)MFNSetErrorIfNotConverged324,10747
+#undef __FUNCT____FUNCT__333,10991
+#define __FUNCT__ __FUNCT__334,11008
+PetscErrorCode MFNGetErrorIfNotConverged(MFN mfn,PetscBool *flag)MFNGetErrorIfNotConverged351,11427
+#undef __FUNCT____FUNCT__360,11658
+#define __FUNCT__ __FUNCT__361,11675
+PetscErrorCode MFNSetOptionsPrefix(MFN mfn,const char *prefix)MFNSetOptionsPrefix388,12420
+#undef __FUNCT____FUNCT__402,12929
+#define __FUNCT__ __FUNCT__403,12946
+PetscErrorCode MFNAppendOptionsPrefix(MFN mfn,const char *prefix)MFNAppendOptionsPrefix422,13499
+#undef __FUNCT____FUNCT__436,14014
+#define __FUNCT__ __FUNCT__437,14031
+PetscErrorCode MFNGetOptionsPrefix(MFN mfn,const char *prefix[])MFNGetOptionsPrefix458,14538
 

 src/mfn/interface/mfnregis.c,131
 mfnregis.c:^?mfnregis.c^A,1
-#undef __FUNCT____FUNCT__26,1034
-#define __FUNCT__ __FUNCT__27,1051
-PetscErrorCode MFNRegisterAll(void)MFNRegisterAll37,1232
+#undef __FUNCT____FUNCT__27,1086
+#define __FUNCT__ __FUNCT__28,1103
+PetscErrorCode MFNRegisterAll(void)MFNRegisterAll38,1284
 

 src/mfn/interface/mfnsetup.c,569
 mfnsetup.c:^?mfnsetup.c^A,1
 #undef __FUNCT____FUNCT__26,1033
 #define __FUNCT__ __FUNCT__27,1050
 PetscErrorCode MFNSetUp(MFN mfn)MFNSetUp46,1549
-#undef __FUNCT____FUNCT__88,2894
-#define __FUNCT__ __FUNCT__89,2911
-PetscErrorCode MFNSetOperator(MFN mfn,Mat A)MFNSetOperator107,3345
-#undef __FUNCT____FUNCT__126,3945
-#define __FUNCT__ __FUNCT__127,3962
-PetscErrorCode MFNGetOperator(MFN mfn,Mat *A)MFNGetOperator143,4303
-#undef __FUNCT____FUNCT__152,4490
-#define __FUNCT__ __FUNCT__153,4507
-PetscErrorCode MFNAllocateSolution(MFN mfn,PetscInt extra)MFNAllocateSolution171,4987
-

-src/mfn/interface/mfnsolve.c,475
+#undef __FUNCT____FUNCT__85,2781
+#define __FUNCT__ __FUNCT__86,2798
+PetscErrorCode MFNSetOperator(MFN mfn,Mat A)MFNSetOperator104,3232
+#undef __FUNCT____FUNCT__123,3832
+#define __FUNCT__ __FUNCT__124,3849
+PetscErrorCode MFNGetOperator(MFN mfn,Mat *A)MFNGetOperator140,4190
+#undef __FUNCT____FUNCT__149,4377
+#define __FUNCT__ __FUNCT__150,4394
+PetscErrorCode MFNAllocateSolution(MFN mfn,PetscInt extra)MFNAllocateSolution168,4874
+

+src/mfn/interface/mfnsolve.c,477
 mfnsolve.c:^?mfnsolve.c^A,1
 #undef __FUNCT____FUNCT__26,1036
 #define __FUNCT__ __FUNCT__27,1053
 PetscErrorCode MFNSolve(MFN mfn,Vec b,Vec x)MFNSolve58,2115
-#undef __FUNCT____FUNCT__97,3636
-#define __FUNCT__ __FUNCT__98,3653
-PetscErrorCode MFNGetIterationNumber(MFN mfn,PetscInt *its)MFNGetIterationNumber123,4411
-#undef __FUNCT____FUNCT__132,4621
-#define __FUNCT__ __FUNCT__133,4638
-PetscErrorCode MFNGetConvergedReason(MFN mfn,MFNConvergedReason *reason)MFNGetConvergedReason158,5339
+#undef __FUNCT____FUNCT__100,3787
+#define __FUNCT__ __FUNCT__101,3804
+PetscErrorCode MFNGetIterationNumber(MFN mfn,PetscInt *its)MFNGetIterationNumber126,4562
+#undef __FUNCT____FUNCT__135,4772
+#define __FUNCT__ __FUNCT__136,4789
+PetscErrorCode MFNGetConvergedReason(MFN mfn,MFNConvergedReason *reason)MFNGetConvergedReason168,5911
 

 src/mfn/makefile,211
 makefile:^?makefile^A,1
@@ -5126,27 +5457,39 @@ makefile:^?makefile^A,1
 LOCDIR   = src/nep/examples/LOCDIR24,932
 DIRS     = tests tutorials nlevpDIRS25,961
 

-src/nep/examples/nlevp/loaded_string.c,213
+src/nep/examples/nlevp/gun.c,430
+gun.c:^?gun.c^A,1
+static char help[] = "Radio-frequency gun cavity.\n\n"help36,1533
+#define NMAT NMAT42,1830
+#define SIGMA SIGMA43,1845
+#undef __FUNCT____FUNCT__47,1941
+#define __FUNCT__ __FUNCT__48,1958
+int main(int argc,char **argv)main49,1983
+#undef __FUNCT____FUNCT__159,6623
+#define __FUNCT__ __FUNCT__160,6640
+PetscErrorCode ComputeSingularities(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *pt)ComputeSingularities167,6913
+

+src/nep/examples/nlevp/loaded_string.c,234
 loaded_string.c:^?loaded_string.c^A,1
-static char help[] = "NLEVP problem: loaded_string.\n\n"help33,1405
-#define NMAT NMAT41,1667
-#undef __FUNCT____FUNCT__43,1683
-#define __FUNCT__ __FUNCT__44,1700
-int main(int argc,char **argv)main45,1725
+static char help[] = "Finite element model of a loaded vibrating string.\n\n"help33,1405
+#define NMAT NMAT41,1688
+#undef __FUNCT____FUNCT__43,1704
+#define __FUNCT__ __FUNCT__44,1721
+int main(int argc,char **argv)main45,1746
 

-src/nep/examples/nlevp/makefile,481
+src/nep/examples/nlevp/makefile,523
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/nep/examples/nlevp/LOCDIR26,978
-EXAMPLESC  = loaded_string.cEXAMPLESC27,1015
-EXAMPLESF  = EXAMPLESF28,1044
-MANSEC     = NEPMANSEC29,1058
-TESTS      = loaded_stringTESTS30,1075
-TESTEXAMPLES_C = loaded_string.PETSc runloaded_string loaded_string.rmTESTEXAMPLES_C32,1103
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH41,1437
+EXAMPLESC  = loaded_string.c gun.cEXAMPLESC27,1015
+EXAMPLESF  = EXAMPLESF28,1050
+MANSEC     = NEPMANSEC29,1064
+TESTS      = loaded_string gunTESTS30,1081
+TESTEXAMPLES_C = loaded_string.PETSc runloaded_string loaded_string.rmTESTEXAMPLES_C32,1113
+TESTEXAMPLES_DATAFILESPATH_COMPLEX = gun.PETSc rungun gun.rmTESTEXAMPLES_DATAFILESPATH_COMPLEX33,1184
 

 src/nep/examples/tests/makefile,330
 makefile:^?makefile^A,1
@@ -5170,23 +5513,23 @@ static char help[] = "Simple 1-D nonlinear eigenproblem.\n\n"help22,924
 #undef __FUNCT____FUNCT__53,1770
 #define __FUNCT__ __FUNCT__54,1787
 int main(int argc,char **argv)main55,1812
-#undef __FUNCT____FUNCT__215,8370
-#define __FUNCT__ __FUNCT__216,8387
-PetscErrorCode FormInitialGuess(Vec x)FormInitialGuess223,8531
-#undef __FUNCT____FUNCT__233,8763
-#define __FUNCT__ __FUNCT__234,8780
-PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)FormFunction247,9126
-#undef __FUNCT____FUNCT__307,10881
-#define __FUNCT__ __FUNCT__308,10898
-PetscErrorCode FormJacobian(NEP nep,PetscScalar lambda,Mat jac,void *ctx)FormJacobian321,11245
-#undef __FUNCT____FUNCT__376,12773
-#define __FUNCT__ __FUNCT__377,12790
-PetscErrorCode CheckSolution(PetscScalar lambda,Vec y,PetscReal *error,void *ctx)CheckSolution389,13124
-#undef __FUNCT____FUNCT__417,14045
-#define __FUNCT__ __FUNCT__418,14062
-PetscErrorCode FixSign(Vec x)FixSign427,14317
-

-src/nep/examples/tutorials/ex21.c,1919
+#undef __FUNCT____FUNCT__214,8184
+#define __FUNCT__ __FUNCT__215,8201
+PetscErrorCode FormInitialGuess(Vec x)FormInitialGuess222,8345
+#undef __FUNCT____FUNCT__232,8577
+#define __FUNCT__ __FUNCT__233,8594
+PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)FormFunction246,8940
+#undef __FUNCT____FUNCT__306,10695
+#define __FUNCT__ __FUNCT__307,10712
+PetscErrorCode FormJacobian(NEP nep,PetscScalar lambda,Mat jac,void *ctx)FormJacobian320,11059
+#undef __FUNCT____FUNCT__375,12587
+#define __FUNCT__ __FUNCT__376,12604
+PetscErrorCode CheckSolution(PetscScalar lambda,Vec y,PetscReal *error,void *ctx)CheckSolution388,12938
+#undef __FUNCT____FUNCT__416,13859
+#define __FUNCT__ __FUNCT__417,13876
+PetscErrorCode FixSign(Vec x)FixSign426,14131
+

+src/nep/examples/tutorials/ex21.c,1918
 ex21.c:^?ex21.c^A,1
 static char help[] = "Simple 1-D nonlinear eigenproblem (matrix-free version, sequential).\n\n"help22,924
   PetscScalar lambda,kappa;lambda53,1776
@@ -5199,33 +5542,33 @@ static char help[] = "Simple 1-D nonlinear eigenproblem (matrix-free version, se
 #undef __FUNCT____FUNCT__65,2033
 #define __FUNCT__ __FUNCT__66,2050
 int main(int argc,char **argv)main67,2075
-#undef __FUNCT____FUNCT__185,7069
-#define __FUNCT__ __FUNCT__186,7086
-PetscErrorCode FormInitialGuess(Vec x)FormInitialGuess193,7230
-#undef __FUNCT____FUNCT__203,7462
-#define __FUNCT__ __FUNCT__204,7479
-PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)FormFunction217,7838
-#undef __FUNCT____FUNCT__229,8184
-#define __FUNCT__ __FUNCT__230,8201
-PetscErrorCode FormJacobian(NEP nep,PetscScalar lambda,Mat jac,void *ctx)FormJacobian243,8561
-#undef __FUNCT____FUNCT__255,8901
-#define __FUNCT__ __FUNCT__256,8918
-PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)MatMult_Fun257,8950
-#undef __FUNCT____FUNCT__288,9971
-#define __FUNCT__ __FUNCT__289,9988
-PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)MatGetDiagonal_Fun290,10027
-#undef __FUNCT____FUNCT__312,10711
-#define __FUNCT__ __FUNCT__313,10728
-PetscErrorCode MatDestroy_Fun(Mat A)MatDestroy_Fun314,10763
-#undef __FUNCT____FUNCT__326,11072
-#define __FUNCT__ __FUNCT__327,11089
-PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)MatDuplicate_Fun328,11126
-#undef __FUNCT____FUNCT__354,12148
-#define __FUNCT__ __FUNCT__355,12165
-PetscErrorCode MatMult_Jac(Mat A,Vec x,Vec y)MatMult_Jac356,12197
-#undef __FUNCT____FUNCT__386,13157
-#define __FUNCT__ __FUNCT__387,13174
-PetscErrorCode MatDestroy_Jac(Mat A)MatDestroy_Jac388,13209
+#undef __FUNCT____FUNCT__181,6957
+#define __FUNCT__ __FUNCT__182,6974
+PetscErrorCode FormInitialGuess(Vec x)FormInitialGuess189,7118
+#undef __FUNCT____FUNCT__199,7350
+#define __FUNCT__ __FUNCT__200,7367
+PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)FormFunction213,7726
+#undef __FUNCT____FUNCT__225,8072
+#define __FUNCT__ __FUNCT__226,8089
+PetscErrorCode FormJacobian(NEP nep,PetscScalar lambda,Mat jac,void *ctx)FormJacobian239,8449
+#undef __FUNCT____FUNCT__251,8789
+#define __FUNCT__ __FUNCT__252,8806
+PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)MatMult_Fun253,8838
+#undef __FUNCT____FUNCT__284,9859
+#define __FUNCT__ __FUNCT__285,9876
+PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)MatGetDiagonal_Fun286,9915
+#undef __FUNCT____FUNCT__308,10599
+#define __FUNCT__ __FUNCT__309,10616
+PetscErrorCode MatDestroy_Fun(Mat A)MatDestroy_Fun310,10651
+#undef __FUNCT____FUNCT__322,10960
+#define __FUNCT__ __FUNCT__323,10977
+PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)MatDuplicate_Fun324,11014
+#undef __FUNCT____FUNCT__350,12036
+#define __FUNCT__ __FUNCT__351,12053
+PetscErrorCode MatMult_Jac(Mat A,Vec x,Vec y)MatMult_Jac352,12085
+#undef __FUNCT____FUNCT__382,13045
+#define __FUNCT__ __FUNCT__383,13062
+PetscErrorCode MatDestroy_Jac(Mat A)MatDestroy_Jac384,13097
 

 src/nep/examples/tutorials/ex22.c,184
 ex22.c:^?ex22.c^A,1
@@ -5234,19 +5577,32 @@ static char help[] = "Delay differential equation.\n\n"help22,924
 #define __FUNCT__ __FUNCT__47,1569
 int main(int argc,char **argv)main48,1594
 

-src/nep/examples/tutorials/makefile,475
+src/nep/examples/tutorials/ex27.c,576
+ex27.c:^?ex27.c^A,1
+static char help[] = "Simple nonlinear eigenproblem using the NLEIGS solver.\n\n"help22,924
+#undef __FUNCT____FUNCT__43,1570
+#define __FUNCT__ __FUNCT__44,1587
+int main(int argc,char **argv)main45,1612
+#undef __FUNCT____FUNCT__179,7325
+#define __FUNCT__ __FUNCT__180,7342
+PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)FormFunction184,7435
+#undef __FUNCT____FUNCT__226,8853
+#define __FUNCT__ __FUNCT__227,8870
+PetscErrorCode ComputeSingularities(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *pt)ComputeSingularities234,9121
+

+src/nep/examples/tutorials/makefile,514
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/nep/examples/tutorials/LOCDIR26,978
-EXAMPLESC  = ex20.c ex21.c ex22.cEXAMPLESC27,1019
-EXAMPLESF  =EXAMPLESF28,1053
-MANSEC     = NEPMANSEC29,1066
-TESTEXAMPLES_C           = ex21.PETSc runex21_1 ex21.rm \TESTEXAMPLES_C31,1084
-TESTEXAMPLES_C_NOCOMPLEX =TESTEXAMPLES_C_NOCOMPLEX33,1198
-TESTEXAMPLES_F90         =TESTEXAMPLES_F9034,1225
+EXAMPLESC  = ex20.c ex21.c ex22.c ex27.cEXAMPLESC27,1019
+EXAMPLESF  =EXAMPLESF28,1060
+MANSEC     = NEPMANSEC29,1073
+TESTEXAMPLES_C           = ex21.PETSc runex21_1 ex21.rm \TESTEXAMPLES_C31,1091
+TESTEXAMPLES_C_COMPLEX   = ex22.PETSc runex22_ciss_1 ex22.rmTESTEXAMPLES_C_COMPLEX34,1273
+TESTEXAMPLES_F90         =TESTEXAMPLES_F9035,1334
 

 src/nep/f90-mod/makefile,397
 makefile:^?makefile^A,1
@@ -5279,176 +5635,178 @@ DIRS     =DIRS32,1050
 MANSEC   = NEPMANSEC33,1061
 LOCDIR   = src/nep/impls/ciss/LOCDIR34,1076
 

-src/nep/impls/ciss/nciss.c,6640
+src/nep/impls/ciss/nciss.c,6530
 nciss.c:^?nciss.c^A,1
-  PetscInt     N;          /* number of integration points (32) */N51,1760
-  PetscInt     L;          /* block size (16) */L52,1827
-  PetscInt     M;          /* moment degree (N/4 = 4) */M53,1876
-  PetscReal    delta;      /* threshold of singular value (1e-12) */delta54,1933
-  PetscInt     L_max;      /* maximum number of columns of the source matrix V */L_max55,2002
-  PetscReal    spurious_threshold; /* discard spurious eigenpairs */spurious_threshold56,2084
-  PetscBool    isreal;     /* A and B are real */isreal57,2153
-  PetscInt     refine_inner;refine_inner58,2203
-  PetscInt     refine_outer;refine_outer59,2232
-  PetscInt     refine_blocksize;refine_blocksize60,2261
-  PetscReal    *sigma;     /* threshold for numerical rank */sigma62,2315
-  PetscInt     num_subcomm;num_subcomm63,2377
-  PetscInt     subcomm_id;subcomm_id64,2405
-  PetscInt     num_solve_point;num_solve_point65,2432
-  PetscScalar  *weight;weight66,2464
-  PetscScalar  *omega;omega67,2488
-  PetscScalar  *pp;pp68,2511
-  BV           V;V69,2531
-  BV           S;S70,2549
-  BV           Y;Y71,2567
-  KSP          *ksp;ksp72,2585
-  Mat          *kspMat;kspMat73,2606
-  PetscBool    useconj;useconj74,2630
-  PetscReal    est_eig;est_eig75,2654
-  PetscSubcomm subcomm;subcomm76,2678
-  PetscBool    usest;usest77,2702
-} NEP_CISS;NEP_CISS78,2724
-#undef __FUNCT____FUNCT__80,2737
-#define __FUNCT__ __FUNCT__81,2754
-static PetscErrorCode SetSolverComm(NEP nep)SetSolverComm82,2788
-#undef __FUNCT____FUNCT__103,3625
-#define __FUNCT__ __FUNCT__104,3642
-static PetscErrorCode SetPathParameter(NEP nep)SetPathParameter105,3679
-#undef __FUNCT____FUNCT__128,4559
-#define __FUNCT__ __FUNCT__129,4576
-static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom rctx)CISSVecSetRandom130,4613
-#undef __FUNCT____FUNCT__154,5346
-#define __FUNCT__ __FUNCT__155,5363
-static PetscErrorCode SolveLinearSystem(NEP nep,Mat T,Mat dT,BV V,PetscInt L_start,PetscInt L_end,PetscBool initksp)SolveLinearSystem156,5401
-#undef __FUNCT____FUNCT__214,7777
-#define __FUNCT__ __FUNCT__215,7794
-static PetscErrorCode EstimateNumberEigs(NEP nep,PetscInt *L_add)EstimateNumberEigs216,7833
-#undef __FUNCT____FUNCT__257,9453
-#define __FUNCT__ __FUNCT__258,9470
-static PetscErrorCode CalcMu(NEP nep, PetscScalar *Mu)CalcMu259,9497
-#undef __FUNCT____FUNCT__306,11511
-#define __FUNCT__ __FUNCT__307,11528
-static PetscErrorCode BlockHankel(NEP nep,PetscScalar *Mu,PetscInt s,PetscScalar *H)BlockHankel308,11560
-#undef __FUNCT____FUNCT__321,11885
-#define __FUNCT__ __FUNCT__322,11902
-static PetscErrorCode SVD_H0(NEP nep,PetscScalar *S,PetscInt *K)SVD_H0323,11929
-#undef __FUNCT____FUNCT__365,13385
-#define __FUNCT__ __FUNCT__366,13402
-static PetscErrorCode ConstructS(NEP nep)ConstructS367,13433
-#undef __FUNCT____FUNCT__409,15008
-#define __FUNCT__ __FUNCT__410,15025
-static PetscErrorCode isGhost(NEP nep,PetscInt ld,PetscInt nv,PetscBool *fl)isGhost411,15053
-#undef __FUNCT____FUNCT__446,16042
-#define __FUNCT__ __FUNCT__447,16059
-PetscErrorCode NEPSetUp_CISS(NEP nep)NEPSetUp_CISS448,16093
-#undef __FUNCT____FUNCT__510,19058
-#define __FUNCT__ __FUNCT__511,19075
-PetscErrorCode NEPSolve_CISS(NEP nep)NEPSolve_CISS512,19109
-#undef __FUNCT____FUNCT__658,25533
-#define __FUNCT__ __FUNCT__659,25550
-static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)NEPCISSSetSizes_CISS660,25591
-#undef __FUNCT____FUNCT__703,27560
-#define __FUNCT__ __FUNCT__704,27577
-PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)NEPCISSSetSizes736,28656
-#undef __FUNCT____FUNCT__752,29337
-#define __FUNCT__ __FUNCT__753,29354
-static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)NEPCISSGetSizes_CISS754,29395
-#undef __FUNCT____FUNCT__768,29813
-#define __FUNCT__ __FUNCT__769,29830
-PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)NEPCISSGetSizes790,30315
-#undef __FUNCT____FUNCT__800,30733
-#define __FUNCT__ __FUNCT__801,30750
-static PetscErrorCode NEPCISSSetThreshold_CISS(NEP nep,PetscReal delta,PetscReal spur)NEPCISSSetThreshold_CISS802,30795
-#undef __FUNCT____FUNCT__822,31449
-#define __FUNCT__ __FUNCT__823,31466
-PetscErrorCode NEPCISSSetThreshold(NEP nep,PetscReal delta,PetscReal spur)NEPCISSSetThreshold843,31988
-#undef __FUNCT____FUNCT__855,32393
-#define __FUNCT__ __FUNCT__856,32410
-static PetscErrorCode NEPCISSGetThreshold_CISS(NEP nep,PetscReal *delta,PetscReal *spur)NEPCISSGetThreshold_CISS857,32455
-#undef __FUNCT____FUNCT__867,32718
-#define __FUNCT__ __FUNCT__868,32735
-PetscErrorCode NEPCISSGetThreshold(NEP nep,PetscReal *delta,PetscReal *spur)NEPCISSGetThreshold886,33139
-#undef __FUNCT____FUNCT__896,33453
-#define __FUNCT__ __FUNCT__897,33470
-static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt outer,PetscInt blsize)NEPCISSSetRefinement_CISS898,33516
-#undef __FUNCT____FUNCT__924,34424
-#define __FUNCT__ __FUNCT__925,34441
-PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt outer,PetscInt blsize)NEPCISSSetRefinement947,35160
-#undef __FUNCT____FUNCT__960,35644
-#define __FUNCT__ __FUNCT__961,35661
-static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt *outer,PetscInt *blsize)NEPCISSGetRefinement_CISS962,35707
-#undef __FUNCT____FUNCT__973,36038
-#define __FUNCT__ __FUNCT__974,36055
-PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *outer,PetscInt *blsize)NEPCISSGetRefinement993,36565
-#undef __FUNCT____FUNCT__1003,36915
-#define __FUNCT__ __FUNCT__1004,36932
-PetscErrorCode NEPReset_CISS(NEP nep)NEPReset_CISS1005,36966
-#undef __FUNCT____FUNCT__1029,37704
-#define __FUNCT__ __FUNCT__1030,37721
-PetscErrorCode NEPSetFromOptions_CISS(PetscOptions *PetscOptionsObject,NEP nep)NEPSetFromOptions_CISS1031,37764
-#undef __FUNCT____FUNCT__1065,39978
-#define __FUNCT__ __FUNCT__1066,39995
-PetscErrorCode NEPDestroy_CISS(NEP nep)NEPDestroy_CISS1067,40031
-#undef __FUNCT____FUNCT__1082,40775
-#define __FUNCT__ __FUNCT__1083,40792
-PetscErrorCode NEPView_CISS(NEP nep,PetscViewer viewer)NEPView_CISS1084,40825
-#undef __FUNCT____FUNCT__1106,42042
-#define __FUNCT__ __FUNCT__1107,42059
-PETSC_EXTERN PetscErrorCode NEPCreate_CISS(NEP nep)NEPCreate_CISS1108,42094
-

-src/nep/impls/interpol/interpol.c,2760
+  PetscInt     N;          /* number of integration points (32) */N49,1724
+  PetscInt     L;          /* block size (16) */L50,1791
+  PetscInt     M;          /* moment degree (N/4 = 4) */M51,1840
+  PetscReal    delta;      /* threshold of singular value (1e-12) */delta52,1897
+  PetscInt     L_max;      /* maximum number of columns of the source matrix V */L_max53,1966
+  PetscReal    spurious_threshold; /* discard spurious eigenpairs */spurious_threshold54,2048
+  PetscBool    isreal;     /* T(z) is real for real z */isreal55,2117
+  PetscInt     refine_inner;refine_inner56,2174
+  PetscInt     refine_blocksize;refine_blocksize57,2203
+  PetscReal    *sigma;     /* threshold for numerical rank */sigma59,2257
+  PetscInt     num_subcomm;num_subcomm60,2319
+  PetscInt     subcomm_id;subcomm_id61,2347
+  PetscInt     num_solve_point;num_solve_point62,2374
+  PetscScalar  *weight;weight63,2406
+  PetscScalar  *omega;omega64,2430
+  PetscScalar  *pp;pp65,2453
+  BV           V;V66,2473
+  BV           S;S67,2491
+  BV           Y;Y68,2509
+  KSP          *ksp;ksp69,2527
+  Mat          *kspMat;kspMat70,2548
+  PetscBool    useconj;useconj71,2572
+  PetscReal    est_eig;est_eig72,2596
+  PetscSubcomm subcomm;subcomm73,2620
+  PetscBool    usest;usest74,2644
+} NEP_CISS;NEP_CISS75,2666
+#undef __FUNCT____FUNCT__77,2679
+#define __FUNCT__ __FUNCT__78,2696
+static PetscErrorCode SetSolverComm(NEP nep)SetSolverComm79,2730
+#undef __FUNCT____FUNCT__100,3567
+#define __FUNCT__ __FUNCT__101,3584
+static PetscErrorCode SetPathParameter(NEP nep)SetPathParameter102,3621
+#undef __FUNCT____FUNCT__126,4572
+#define __FUNCT__ __FUNCT__127,4589
+static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1)CISSVecSetRandom128,4626
+#undef __FUNCT____FUNCT__152,5337
+#define __FUNCT__ __FUNCT__153,5354
+static PetscErrorCode SolveLinearSystem(NEP nep,Mat T,Mat dT,BV V,PetscInt L_start,PetscInt L_end,PetscBool initksp)SolveLinearSystem154,5392
+#undef __FUNCT____FUNCT__212,7768
+#define __FUNCT__ __FUNCT__213,7785
+static PetscErrorCode EstimateNumberEigs(NEP nep,PetscInt *L_add)EstimateNumberEigs214,7824
+#undef __FUNCT____FUNCT__255,9443
+#define __FUNCT__ __FUNCT__256,9460
+static PetscErrorCode CalcMu(NEP nep, PetscScalar *Mu)CalcMu257,9487
+#undef __FUNCT____FUNCT__305,11560
+#define __FUNCT__ __FUNCT__306,11577
+static PetscErrorCode BlockHankel(NEP nep,PetscScalar *Mu,PetscInt s,PetscScalar *H)BlockHankel307,11609
+#undef __FUNCT____FUNCT__320,11941
+#define __FUNCT__ __FUNCT__321,11958
+static PetscErrorCode SVD_H0(NEP nep,PetscScalar *S,PetscInt *K)SVD_H0322,11985
+#undef __FUNCT____FUNCT__364,13441
+#define __FUNCT__ __FUNCT__365,13458
+static PetscErrorCode ConstructS(NEP nep)ConstructS366,13489
+#undef __FUNCT____FUNCT__408,15078
+#define __FUNCT__ __FUNCT__409,15095
+static PetscErrorCode isGhost(NEP nep,PetscInt ld,PetscInt nv,PetscBool *fl)isGhost410,15123
+#undef __FUNCT____FUNCT__445,16112
+#define __FUNCT__ __FUNCT__446,16129
+PetscErrorCode NEPSetUp_CISS(NEP nep)NEPSetUp_CISS447,16163
+#undef __FUNCT____FUNCT__517,19599
+#define __FUNCT__ __FUNCT__518,19616
+PetscErrorCode NEPSolve_CISS(NEP nep)NEPSolve_CISS519,19650
+#undef __FUNCT____FUNCT__668,26309
+#define __FUNCT__ __FUNCT__669,26326
+static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)NEPCISSSetSizes_CISS670,26367
+#undef __FUNCT____FUNCT__713,28340
+#define __FUNCT__ __FUNCT__714,28357
+PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)NEPCISSSetSizes750,29683
+#undef __FUNCT____FUNCT__766,30370
+#define __FUNCT__ __FUNCT__767,30387
+static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)NEPCISSGetSizes_CISS768,30428
+#undef __FUNCT____FUNCT__782,30852
+#define __FUNCT__ __FUNCT__783,30869
+PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)NEPCISSGetSizes804,31363
+#undef __FUNCT____FUNCT__814,31785
+#define __FUNCT__ __FUNCT__815,31802
+static PetscErrorCode NEPCISSSetThreshold_CISS(NEP nep,PetscReal delta,PetscReal spur)NEPCISSSetThreshold_CISS816,31847
+#undef __FUNCT____FUNCT__836,32501
+#define __FUNCT__ __FUNCT__837,32518
+PetscErrorCode NEPCISSSetThreshold(NEP nep,PetscReal delta,PetscReal spur)NEPCISSSetThreshold857,33040
+#undef __FUNCT____FUNCT__869,33445
+#define __FUNCT__ __FUNCT__870,33462
+static PetscErrorCode NEPCISSGetThreshold_CISS(NEP nep,PetscReal *delta,PetscReal *spur)NEPCISSGetThreshold_CISS871,33507
+#undef __FUNCT____FUNCT__881,33770
+#define __FUNCT__ __FUNCT__882,33787
+PetscErrorCode NEPCISSGetThreshold(NEP nep,PetscReal *delta,PetscReal *spur)NEPCISSGetThreshold900,34191
+#undef __FUNCT____FUNCT__910,34505
+#define __FUNCT__ __FUNCT__911,34522
+static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt blsize)NEPCISSSetRefinement_CISS912,34568
+#undef __FUNCT____FUNCT__932,35229
+#define __FUNCT__ __FUNCT__933,35246
+PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt blsize)NEPCISSSetRefinement953,35838
+#undef __FUNCT____FUNCT__965,36245
+#define __FUNCT__ __FUNCT__966,36262
+static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt *blsize)NEPCISSGetRefinement_CISS967,36308
+#undef __FUNCT____FUNCT__977,36581
+#define __FUNCT__ __FUNCT__978,36598
+PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *blsize)NEPCISSGetRefinement996,37041
+#undef __FUNCT____FUNCT__1006,37359
+#define __FUNCT__ __FUNCT__1007,37376
+PetscErrorCode NEPReset_CISS(NEP nep)NEPReset_CISS1008,37410
+#undef __FUNCT____FUNCT__1032,38148
+#define __FUNCT__ __FUNCT__1033,38165
+PetscErrorCode NEPSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,NEP nep)NEPSetFromOptions_CISS1034,38208
+#undef __FUNCT____FUNCT__1067,40288
+#define __FUNCT__ __FUNCT__1068,40305
+PetscErrorCode NEPDestroy_CISS(NEP nep)NEPDestroy_CISS1069,40341
+#undef __FUNCT____FUNCT__1084,41085
+#define __FUNCT__ __FUNCT__1085,41102
+PetscErrorCode NEPView_CISS(NEP nep,PetscViewer viewer)NEPView_CISS1086,41135
+#undef __FUNCT____FUNCT__1108,42355
+#define __FUNCT__ __FUNCT__1109,42372
+PETSC_EXTERN PetscErrorCode NEPCreate_CISS(NEP nep)NEPCreate_CISS1110,42407
+

+src/nep/impls/interpol/interpol.c,3026
 interpol.c:^?interpol.c^A,1
-  PEP       pep;pep41,1419
-  PetscInt  deg;deg42,1436
-} NEP_INTERPOL;NEP_INTERPOL43,1453
-#undef __FUNCT____FUNCT__45,1470
-#define __FUNCT__ __FUNCT__46,1487
-PetscErrorCode NEPSetUp_Interpol(NEP nep)NEPSetUp_Interpol47,1525
-#undef __FUNCT____FUNCT__112,4825
-#define __FUNCT__ __FUNCT__113,4842
-static PetscErrorCode ChebyshevNodes(PetscInt d,PetscReal a,PetscReal b,PetscScalar *x,PetscReal *dct2)ChebyshevNodes122,5109
-#undef __FUNCT____FUNCT__136,5476
-#define __FUNCT__ __FUNCT__137,5493
-PetscErrorCode NEPSolve_Interpol(NEP nep)NEPSolve_Interpol138,5531
-#undef __FUNCT____FUNCT__196,7493
-#define __FUNCT__ __FUNCT__197,7510
-PetscErrorCode NEPSetFromOptions_Interpol(PetscOptions *PetscOptionsObject,NEP nep)NEPSetFromOptions_Interpol198,7557
-#undef __FUNCT____FUNCT__212,8171
-#define __FUNCT__ __FUNCT__213,8188
-static PetscErrorCode NEPInterpolSetDegree_Interpol(NEP nep,PetscInt deg)NEPInterpolSetDegree_Interpol214,8238
-#undef __FUNCT____FUNCT__223,8434
-#define __FUNCT__ __FUNCT__224,8451
-PetscErrorCode NEPInterpolSetDegree(NEP nep,PetscInt deg)NEPInterpolSetDegree238,8737
-#undef __FUNCT____FUNCT__249,9058
-#define __FUNCT__ __FUNCT__250,9075
-static PetscErrorCode NEPInterpolGetDegree_Interpol(NEP nep,PetscInt *deg)NEPInterpolGetDegree_Interpol251,9125
-#undef __FUNCT____FUNCT__260,9323
-#define __FUNCT__ __FUNCT__261,9340
-PetscErrorCode NEPInterpolGetDegree(NEP nep,PetscInt *deg)NEPInterpolGetDegree277,9648
-#undef __FUNCT____FUNCT__288,9954
-#define __FUNCT__ __FUNCT__289,9971
-static PetscErrorCode NEPInterpolSetPEP_Interpol(NEP nep,PEP pep)NEPInterpolSetPEP_Interpol290,10018
-#undef __FUNCT____FUNCT__304,10457
-#define __FUNCT__ __FUNCT__305,10474
-PetscErrorCode NEPInterpolSetPEP(NEP nep,PEP pep)NEPInterpolSetPEP320,10805
-#undef __FUNCT____FUNCT__332,11147
-#define __FUNCT__ __FUNCT__333,11164
-static PetscErrorCode NEPInterpolGetPEP_Interpol(NEP nep,PEP *pep)NEPInterpolGetPEP_Interpol334,11211
-#undef __FUNCT____FUNCT__354,12012
-#define __FUNCT__ __FUNCT__355,12029
-PetscErrorCode NEPInterpolGetPEP(NEP nep,PEP *pep)NEPInterpolGetPEP372,12392
-#undef __FUNCT____FUNCT__383,12682
-#define __FUNCT__ __FUNCT__384,12699
-PetscErrorCode NEPView_Interpol(NEP nep,PetscViewer viewer)NEPView_Interpol385,12736
-#undef __FUNCT____FUNCT__399,13260
-#define __FUNCT__ __FUNCT__400,13277
-PetscErrorCode NEPReset_Interpol(NEP nep)NEPReset_Interpol401,13315
-#undef __FUNCT____FUNCT__411,13546
-#define __FUNCT__ __FUNCT__412,13563
-PetscErrorCode NEPDestroy_Interpol(NEP nep)NEPDestroy_Interpol413,13603
-#undef __FUNCT____FUNCT__428,14255
-#define __FUNCT__ __FUNCT__429,14272
-PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(NEP nep)NEPCreate_Interpol430,14311
+  PEP       pep;pep41,1448
+  PetscInt  deg;deg42,1465
+} NEP_INTERPOL;NEP_INTERPOL43,1482
+#undef __FUNCT____FUNCT__45,1499
+#define __FUNCT__ __FUNCT__46,1516
+PetscErrorCode NEPSetUp_Interpol(NEP nep)NEPSetUp_Interpol47,1554
+#undef __FUNCT____FUNCT__103,4605
+#define __FUNCT__ __FUNCT__104,4622
+static PetscErrorCode ChebyshevNodes(PetscInt d,PetscReal a,PetscReal b,PetscScalar *x,PetscReal *dct2)ChebyshevNodes113,4889
+#undef __FUNCT____FUNCT__127,5256
+#define __FUNCT__ __FUNCT__128,5273
+PetscErrorCode NEPSolve_Interpol(NEP nep)NEPSolve_Interpol129,5311
+#undef __FUNCT____FUNCT__187,7260
+#define __FUNCT__ __FUNCT__188,7277
+static PetscErrorCode PEPMonitor_Interpol(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)PEPMonitor_Interpol189,7317
+#undef __FUNCT____FUNCT__205,7831
+#define __FUNCT__ __FUNCT__206,7848
+PetscErrorCode NEPSetFromOptions_Interpol(PetscOptionItems *PetscOptionsObject,NEP nep)NEPSetFromOptions_Interpol207,7895
+#undef __FUNCT____FUNCT__221,8513
+#define __FUNCT__ __FUNCT__222,8530
+static PetscErrorCode NEPInterpolSetDegree_Interpol(NEP nep,PetscInt deg)NEPInterpolSetDegree_Interpol223,8580
+#undef __FUNCT____FUNCT__232,8774
+#define __FUNCT__ __FUNCT__233,8791
+PetscErrorCode NEPInterpolSetDegree(NEP nep,PetscInt deg)NEPInterpolSetDegree247,9077
+#undef __FUNCT____FUNCT__258,9398
+#define __FUNCT__ __FUNCT__259,9415
+static PetscErrorCode NEPInterpolGetDegree_Interpol(NEP nep,PetscInt *deg)NEPInterpolGetDegree_Interpol260,9465
+#undef __FUNCT____FUNCT__269,9661
+#define __FUNCT__ __FUNCT__270,9678
+PetscErrorCode NEPInterpolGetDegree(NEP nep,PetscInt *deg)NEPInterpolGetDegree286,9986
+#undef __FUNCT____FUNCT__297,10292
+#define __FUNCT__ __FUNCT__298,10309
+static PetscErrorCode NEPInterpolSetPEP_Interpol(NEP nep,PEP pep)NEPInterpolSetPEP_Interpol299,10356
+#undef __FUNCT____FUNCT__313,10795
+#define __FUNCT__ __FUNCT__314,10812
+PetscErrorCode NEPInterpolSetPEP(NEP nep,PEP pep)NEPInterpolSetPEP329,11143
+#undef __FUNCT____FUNCT__341,11485
+#define __FUNCT__ __FUNCT__342,11502
+static PetscErrorCode NEPInterpolGetPEP_Interpol(NEP nep,PEP *pep)NEPInterpolGetPEP_Interpol343,11549
+#undef __FUNCT____FUNCT__364,12438
+#define __FUNCT__ __FUNCT__365,12455
+PetscErrorCode NEPInterpolGetPEP(NEP nep,PEP *pep)NEPInterpolGetPEP382,12818
+#undef __FUNCT____FUNCT__393,13108
+#define __FUNCT__ __FUNCT__394,13125
+PetscErrorCode NEPView_Interpol(NEP nep,PetscViewer viewer)NEPView_Interpol395,13162
+#undef __FUNCT____FUNCT__413,13837
+#define __FUNCT__ __FUNCT__414,13854
+PetscErrorCode NEPReset_Interpol(NEP nep)NEPReset_Interpol415,13892
+#undef __FUNCT____FUNCT__425,14123
+#define __FUNCT__ __FUNCT__426,14140
+PetscErrorCode NEPDestroy_Interpol(NEP nep)NEPDestroy_Interpol427,14180
+#undef __FUNCT____FUNCT__442,14832
+#define __FUNCT__ __FUNCT__443,14849
+PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(NEP nep)NEPCreate_Interpol444,14888
 

 src/nep/impls/interpol/makefile,282
 makefile:^?makefile^A,1
@@ -5462,12 +5820,12 @@ DIRS     =DIRS30,1025
 MANSEC   = NEPMANSEC31,1036
 LOCDIR   = src/nep/impls/interpol/LOCDIR32,1051
 

-src/nep/impls/makefile,163
+src/nep/impls/makefile,170
 makefile:^?makefile^A,1
 LIBBASE  = libslepcnepLIBBASE24,936
-DIRS     = rii slp narnoldi interpol cissDIRS25,959
-LOCDIR   = src/nep/impls/LOCDIR26,1001
-MANSEC   = NEPMANSEC27,1027
+DIRS     = rii slp narnoldi interpol ciss nleigsDIRS25,959
+LOCDIR   = src/nep/impls/LOCDIR26,1008
+MANSEC   = NEPMANSEC27,1034
 

 src/nep/impls/narnoldi/makefile,284
 makefile:^?makefile^A,1
@@ -5481,17 +5839,262 @@ DIRS     =DIRS30,1034
 MANSEC   = NEPMANSEC31,1045
 LOCDIR   = src/nep/impls/narnoldi/LOCDIR32,1060
 

-src/nep/impls/narnoldi/narnoldi.c,438
+src/nep/impls/narnoldi/narnoldi.c,1891
 narnoldi.c:^?narnoldi.c^A,1
-#undef __FUNCT____FUNCT__38,1220
-#define __FUNCT__ __FUNCT__39,1237
-PetscErrorCode NEPSetUp_NArnoldi(NEP nep)NEPSetUp_NArnoldi40,1275
-#undef __FUNCT____FUNCT__76,2820
-#define __FUNCT__ __FUNCT__77,2837
-PetscErrorCode NEPSolve_NArnoldi(NEP nep)NEPSolve_NArnoldi78,2875
-#undef __FUNCT____FUNCT__170,6302
-#define __FUNCT__ __FUNCT__171,6319
-PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(NEP nep)NEPCreate_NArnoldi172,6358
+  KSP      ksp;              /* linear solver object */ksp39,1266
+} NEP_NARNOLDI;NEP_NARNOLDI40,1322
+#undef __FUNCT____FUNCT__42,1339
+#define __FUNCT__ __FUNCT__43,1356
+PETSC_STATIC_INLINE PetscErrorCode NEPNArnoldi_KSPSolve(NEP nep,Vec b,Vec x)NEPNArnoldi_KSPSolve44,1397
+#undef __FUNCT____FUNCT__57,1827
+#define __FUNCT__ __FUNCT__58,1844
+PetscErrorCode NEPSetUp_NArnoldi(NEP nep)NEPSetUp_NArnoldi59,1882
+#undef __FUNCT____FUNCT__86,3336
+#define __FUNCT__ __FUNCT__87,3353
+PetscErrorCode NEPSolve_NArnoldi(NEP nep)NEPSolve_NArnoldi88,3391
+#undef __FUNCT____FUNCT__181,7042
+#define __FUNCT__ __FUNCT__182,7059
+PetscErrorCode NEPSetFromOptions_NArnoldi(PetscOptionItems *PetscOptionsObject,NEP nep)NEPSetFromOptions_NArnoldi183,7106
+#undef __FUNCT____FUNCT__195,7531
+#define __FUNCT__ __FUNCT__196,7548
+static PetscErrorCode NEPNArnoldiSetKSP_NArnoldi(NEP nep,KSP ksp)NEPNArnoldiSetKSP_NArnoldi197,7595
+#undef __FUNCT____FUNCT__211,8034
+#define __FUNCT__ __FUNCT__212,8051
+PetscErrorCode NEPNArnoldiSetKSP(NEP nep,KSP ksp)NEPNArnoldiSetKSP227,8354
+#undef __FUNCT____FUNCT__239,8696
+#define __FUNCT__ __FUNCT__240,8713
+static PetscErrorCode NEPNArnoldiGetKSP_NArnoldi(NEP nep,KSP *ksp)NEPNArnoldiGetKSP_NArnoldi241,8760
+#undef __FUNCT____FUNCT__259,9492
+#define __FUNCT__ __FUNCT__260,9509
+PetscErrorCode NEPNArnoldiGetKSP(NEP nep,KSP *ksp)NEPNArnoldiGetKSP277,9854
+#undef __FUNCT____FUNCT__288,10144
+#define __FUNCT__ __FUNCT__289,10161
+PetscErrorCode NEPView_NArnoldi(NEP nep,PetscViewer viewer)NEPView_NArnoldi290,10198
+#undef __FUNCT____FUNCT__307,10770
+#define __FUNCT__ __FUNCT__308,10787
+PetscErrorCode NEPDestroy_NArnoldi(NEP nep)NEPDestroy_NArnoldi309,10827
+#undef __FUNCT____FUNCT__322,11281
+#define __FUNCT__ __FUNCT__323,11298
+PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(NEP nep)NEPCreate_NArnoldi324,11337
+

+src/nep/impls/nleigs/makefile,276
+makefile:^?makefile^A,1
+CFLAGS   =CFLAGS24,944
+FFLAGS   =FFLAGS25,955
+SOURCEC  = nleigs.cSOURCEC26,966
+SOURCEF  = SOURCEF27,986
+SOURCEH  =SOURCEH28,998
+LIBBASE  = libslepcLIBBASE29,1009
+DIRS     =DIRS30,1029
+MANSEC   = NEPMANSEC31,1040
+LOCDIR   = src/nep/impls/nleigs/LOCDIR32,1055
+

+src/nep/impls/nleigs/nleigs.c,13562
+nleigs.c:^?nleigs.c^A,1
+#define  MAX_LBPOINTS MAX_LBPOINTS40,1373
+#define  NDPOINTS NDPOINTS41,1400
+#define  MAX_NSHIFTS MAX_NSHIFTS42,1427
+  PetscInt       nmat;      /* number of interpolation points */nmat45,1472
+  PetscScalar    *s,*xi;    /* Leja-Bagby points */s46,1537
+  PetscScalar    *s,*xi;    /* Leja-Bagby points */xi46,1537
+  PetscScalar    *beta;     /* scaling factors */beta47,1589
+  Mat            *D;        /* divided difference matrices */D48,1639
+  PetscScalar    *coeffD;   /* coefficients for divided differences in split form */coeffD49,1701
+  PetscInt       nshifts;   /* provided number of shifts */nshifts50,1786
+  PetscScalar    *shifts;   /* user-provided shifts for the Rational Krylov variant */shifts51,1846
+  PetscInt       nshiftsw;  /* actual number of shifts (1 if Krylov-Schur) */nshiftsw52,1933
+  PetscReal      ddtol;     /* tolerance for divided difference convergence */ddtol53,2011
+  PetscInt       ddmaxit;   /* maximum number of divided difference terms */ddmaxit54,2090
+  BV             W;         /* auxiliary BV object */W55,2167
+  PetscReal      keep;      /* restart parameter */keep56,2221
+  PetscBool      lock;      /* locking/non-locking variant */lock57,2273
+  PetscBool      trueres;   /* whether the true residual norm must be computed */trueres58,2335
+  PetscInt       idxrk;     /* index of next shift to use */idxrk59,2417
+  KSP            *ksp;      /* ksp array for storing shift factorizations */ksp60,2478
+  Vec            vrn;       /* random vector with normally distributed value */vrn61,2555
+  void           *singularitiesctx;singularitiesctx62,2635
+  PetscErrorCode (*computesingularities)(NEP,PetscInt*,PetscScalar*,void*);computesingularities63,2671
+} NEP_NLEIGS;NEP_NLEIGS64,2747
+  PetscInt    nmat;nmat67,2779
+  PetscScalar coeff[MAX_NSHIFTS];coeff68,2799
+  Mat         A[MAX_NSHIFTS];A69,2833
+  Vec         t;t70,2863
+} ShellMatCtx;ShellMatCtx71,2880
+#undef __FUNCT____FUNCT__73,2896
+#define __FUNCT__ __FUNCT__74,2913
+PETSC_STATIC_INLINE PetscErrorCode NEPNLEIGSSetShifts(NEP nep)NEPNLEIGSSetShifts75,2952
+#undef __FUNCT____FUNCT__87,3231
+#define __FUNCT__ __FUNCT__88,3248
+static PetscErrorCode NEPNLEIGSBackTransform(PetscObject ob,PetscInt n,PetscScalar *valr,PetscScalar *vali)NEPNLEIGSBackTransform89,3291
+#undef __FUNCT____FUNCT__116,3903
+#define __FUNCT__ __FUNCT__117,3920
+static PetscErrorCode NEPNLEIGSLejaBagbyPoints(NEP nep)NEPNLEIGSLejaBagbyPoints118,3965
+#undef __FUNCT____FUNCT__176,6187
+#define __FUNCT__ __FUNCT__177,6204
+static PetscErrorCode NEPNLEIGSEvalNRTFunct(NEP nep,PetscInt k,PetscScalar sigma,PetscScalar *b)NEPNLEIGSEvalNRTFunct178,6246
+#undef __FUNCT____FUNCT__192,6622
+#define __FUNCT__ __FUNCT__193,6639
+static PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)MatMult_Fun194,6671
+#undef __FUNCT____FUNCT__211,7178
+#define __FUNCT__ __FUNCT__212,7195
+static PetscErrorCode MatMultTranspose_Fun(Mat A,Vec x,Vec y)MatMultTranspose_Fun213,7236
+#undef __FUNCT____FUNCT__230,7770
+#define __FUNCT__ __FUNCT__231,7787
+static PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)MatGetDiagonal_Fun232,7826
+#undef __FUNCT____FUNCT__249,8356
+#define __FUNCT__ __FUNCT__250,8373
+static PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)MatDuplicate_Fun251,8410
+#undef __FUNCT____FUNCT__285,9959
+#define __FUNCT__ __FUNCT__286,9976
+static PetscErrorCode MatDestroy_Fun(Mat A)MatDestroy_Fun287,10011
+#undef __FUNCT____FUNCT__305,10431
+#define __FUNCT__ __FUNCT__306,10448
+static PetscErrorCode MatAXPY_Fun(Mat Y,PetscScalar a,Mat X,MatStructure str)MatAXPY_Fun307,10480
+#undef __FUNCT____FUNCT__334,11248
+#define __FUNCT__ __FUNCT__335,11265
+static PetscErrorCode MatScale_Fun(Mat M,PetscScalar a)MatScale_Fun336,11298
+#undef __FUNCT____FUNCT__348,11585
+#define __FUNCT__ __FUNCT__349,11602
+static PetscErrorCode NLEIGSMatToMatShellArray(Mat M,Mat *Ms)NLEIGSMatToMatShellArray350,11647
+#undef __FUNCT____FUNCT__377,12987
+#define __FUNCT__ __FUNCT__378,13004
+static PetscErrorCode NEPNLEIGSNormEstimation(NEP nep,Mat M,PetscReal *norm,Vec *w)NEPNLEIGSNormEstimation379,13048
+#undef __FUNCT____FUNCT__422,14833
+#define __FUNCT__ __FUNCT__423,14850
+static PetscErrorCode NEPNLEIGSDividedDifferences_split(NEP nep)NEPNLEIGSDividedDifferences_split424,14904
+#undef __FUNCT____FUNCT__493,17365
+#define __FUNCT__ __FUNCT__494,17382
+static PetscErrorCode NEPNLEIGSDividedDifferences_callback(NEP nep)NEPNLEIGSDividedDifferences_callback495,17439
+#undef __FUNCT____FUNCT__578,20468
+#define __FUNCT__ __FUNCT__579,20485
+static PetscErrorCode NEPNLEIGSRitzVector(NEP nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscInt k,Vec t)NEPNLEIGSRitzVector580,20525
+#undef __FUNCT____FUNCT__609,21826
+#define __FUNCT__ __FUNCT__610,21843
+static PetscErrorCode NEPNLEIGSKrylovConvergence(NEP nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscBool getall,PetscInt kini,PetscInt nits,PetscScalar betak,PetscReal betah,PetscInt *kout,Vec *w)NEPNLEIGSKrylovConvergence614,21968
+#undef __FUNCT____FUNCT__664,23856
+#define __FUNCT__ __FUNCT__665,23873
+PetscErrorCode NEPSetUp_NLEIGS(NEP nep)NEPSetUp_NLEIGS666,23909
+#undef __FUNCT____FUNCT__721,26236
+#define __FUNCT__ __FUNCT__722,26253
+static PetscErrorCode NEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)NEPTOARSNorm2726,26312
+#undef __FUNCT____FUNCT__737,26576
+#define __FUNCT__ __FUNCT__738,26593
+static PetscErrorCode NEPTOAROrth2(NEP nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)NEPTOAROrth2746,26810
+#undef __FUNCT____FUNCT__790,28536
+#define __FUNCT__ __FUNCT__791,28553
+static PetscErrorCode NEPTOARExtendBasis(NEP nep,PetscInt idxrktg,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)NEPTOARExtendBasis803,28968
+#undef __FUNCT____FUNCT__860,31672
+#define __FUNCT__ __FUNCT__861,31689
+static PetscErrorCode NEPTOARCoefficients(NEP nep,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x,PetscScalar *work)NEPTOARCoefficients865,31812
+#undef __FUNCT____FUNCT__881,32355
+#define __FUNCT__ __FUNCT__882,32372
+static PetscErrorCode NEPNLEIGS_RKcontinuation(NEP nep,PetscInt ini,PetscInt end,PetscScalar *K,PetscScalar *H,PetscInt ld,PetscScalar sigma,PetscScalar *S,PetscInt lds,PetscScalar *cont,PetscScalar *t,PetscScalar *work)NEPNLEIGS_RKcontinuation887,32572
+#undef __FUNCT____FUNCT__936,34462
+#define __FUNCT__ __FUNCT__937,34479
+static PetscErrorCode NEPNLEIGSTOARrun(NEP nep,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *K,PetscScalar *H,PetscInt ldh,BV V,PetscInt k,PetscInt *M,PetscBool *breakdown,Vec *t_)NEPNLEIGSTOARrun941,34560
+#undef __FUNCT____FUNCT__997,36485
+#define __FUNCT__ __FUNCT__998,36502
+static PetscErrorCode NEPTOARTrunc(NEP nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *nq,PetscInt cs1,PetscScalar *work,PetscReal *rwork)NEPTOARTrunc1000,36575
+#undef __FUNCT____FUNCT__1064,38872
+#define __FUNCT__ __FUNCT__1065,38889
+static PetscErrorCode NEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)NEPTOARSupdate1073,39020
+#undef __FUNCT____FUNCT__1095,39884
+#define __FUNCT__ __FUNCT__1096,39901
+PetscErrorCode NEPSolve_NLEIGS(NEP nep)NEPSolve_NLEIGS1097,39937
+#undef __FUNCT____FUNCT__1259,46655
+#define __FUNCT__ __FUNCT__1260,46672
+static PetscErrorCode NEPNLEIGSSetSingularitiesFunction_NLEIGS(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)NEPNLEIGSSetSingularitiesFunction_NLEIGS1261,46733
+#undef __FUNCT____FUNCT__1271,47064
+#define __FUNCT__ __FUNCT__1272,47081
+PetscErrorCode NEPNLEIGSSetSingularitiesFunction(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)NEPNLEIGSSetSingularitiesFunction1300,48075
+#undef __FUNCT____FUNCT__1310,48483
+#define __FUNCT__ __FUNCT__1311,48500
+static PetscErrorCode NEPNLEIGSGetSingularitiesFunction_NLEIGS(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)NEPNLEIGSGetSingularitiesFunction_NLEIGS1312,48561
+#undef __FUNCT____FUNCT__1322,48892
+#define __FUNCT__ __FUNCT__1323,48909
+PetscErrorCode NEPNLEIGSGetSingularitiesFunction(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)NEPNLEIGSGetSingularitiesFunction1341,49410
+#undef __FUNCT____FUNCT__1351,49822
+#define __FUNCT__ __FUNCT__1352,49839
+static PetscErrorCode NEPNLEIGSSetRestart_NLEIGS(NEP nep,PetscReal keep)NEPNLEIGSSetRestart_NLEIGS1353,49886
+#undef __FUNCT____FUNCT__1366,50284
+#define __FUNCT__ __FUNCT__1367,50301
+PetscErrorCode NEPNLEIGSSetRestart(NEP nep,PetscReal keep)NEPNLEIGSSetRestart1389,50869
+#undef __FUNCT____FUNCT__1400,51194
+#define __FUNCT__ __FUNCT__1401,51211
+static PetscErrorCode NEPNLEIGSGetRestart_NLEIGS(NEP nep,PetscReal *keep)NEPNLEIGSGetRestart_NLEIGS1402,51258
+#undef __FUNCT____FUNCT__1411,51449
+#define __FUNCT__ __FUNCT__1412,51466
+PetscErrorCode NEPNLEIGSGetRestart(NEP nep,PetscReal *keep)NEPNLEIGSGetRestart1428,51783
+#undef __FUNCT____FUNCT__1439,52092
+#define __FUNCT__ __FUNCT__1440,52109
+static PetscErrorCode NEPNLEIGSSetLocking_NLEIGS(NEP nep,PetscBool lock)NEPNLEIGSSetLocking_NLEIGS1441,52156
+#undef __FUNCT____FUNCT__1450,52345
+#define __FUNCT__ __FUNCT__1451,52362
+PetscErrorCode NEPNLEIGSSetLocking(NEP nep,PetscBool lock)NEPNLEIGSSetLocking1475,53039
+#undef __FUNCT____FUNCT__1486,53364
+#define __FUNCT__ __FUNCT__1487,53381
+static PetscErrorCode NEPNLEIGSGetLocking_NLEIGS(NEP nep,PetscBool *lock)NEPNLEIGSGetLocking_NLEIGS1488,53428
+#undef __FUNCT____FUNCT__1497,53619
+#define __FUNCT__ __FUNCT__1498,53636
+PetscErrorCode NEPNLEIGSGetLocking(NEP nep,PetscBool *lock)NEPNLEIGSGetLocking1514,53943
+#undef __FUNCT____FUNCT__1525,54252
+#define __FUNCT__ __FUNCT__1526,54269
+static PetscErrorCode NEPNLEIGSSetInterpolation_NLEIGS(NEP nep,PetscReal tol,PetscInt maxits)NEPNLEIGSSetInterpolation_NLEIGS1527,54322
+#undef __FUNCT____FUNCT__1549,55062
+#define __FUNCT__ __FUNCT__1550,55079
+PetscErrorCode NEPNLEIGSSetInterpolation(NEP nep,PetscReal tol,PetscInt maxits)NEPNLEIGSSetInterpolation1573,55812
+#undef __FUNCT____FUNCT__1585,56226
+#define __FUNCT__ __FUNCT__1586,56243
+static PetscErrorCode NEPNLEIGSGetInterpolation_NLEIGS(NEP nep,PetscReal *tol,PetscInt *maxits)NEPNLEIGSGetInterpolation_NLEIGS1587,56296
+#undef __FUNCT____FUNCT__1597,56562
+#define __FUNCT__ __FUNCT__1598,56579
+PetscErrorCode NEPNLEIGSGetInterpolation(NEP nep,PetscReal *tol,PetscInt *maxits)NEPNLEIGSGetInterpolation1616,57040
+#undef __FUNCT____FUNCT__1626,57364
+#define __FUNCT__ __FUNCT__1627,57381
+static PetscErrorCode NEPNLEIGSSetTrueResidual_NLEIGS(NEP nep,PetscBool trueres)NEPNLEIGSSetTrueResidual_NLEIGS1628,57433
+#undef __FUNCT____FUNCT__1637,57636
+#define __FUNCT__ __FUNCT__1638,57653
+PetscErrorCode NEPNLEIGSSetTrueResidual(NEP nep,PetscBool trueres)NEPNLEIGSSetTrueResidual1662,58416
+#undef __FUNCT____FUNCT__1673,58760
+#define __FUNCT__ __FUNCT__1674,58777
+static PetscErrorCode NEPNLEIGSGetTrueResidual_NLEIGS(NEP nep,PetscBool *trueres)NEPNLEIGSGetTrueResidual_NLEIGS1675,58829
+#undef __FUNCT____FUNCT__1684,59034
+#define __FUNCT__ __FUNCT__1685,59051
+PetscErrorCode NEPNLEIGSGetTrueResidual(NEP nep,PetscBool *trueres)NEPNLEIGSGetTrueResidual1702,59418
+#undef __FUNCT____FUNCT__1713,59746
+#define __FUNCT__ __FUNCT__1714,59763
+static PetscErrorCode NEPNLEIGSSetRKShifts_NLEIGS(NEP nep,PetscInt ns,PetscScalar *shifts)NEPNLEIGSSetRKShifts_NLEIGS1715,59811
+#undef __FUNCT____FUNCT__1734,60532
+#define __FUNCT__ __FUNCT__1735,60549
+PetscErrorCode NEPNLEIGSSetRKShifts(NEP nep,PetscInt ns,PetscScalar *shifts)NEPNLEIGSSetRKShifts1763,61399
+#undef __FUNCT____FUNCT__1775,61790
+#define __FUNCT__ __FUNCT__1776,61807
+static PetscErrorCode NEPNLEIGSGetRKShifts_NLEIGS(NEP nep,PetscInt *ns,PetscScalar **shifts)NEPNLEIGSGetRKShifts_NLEIGS1777,61855
+#undef __FUNCT____FUNCT__1792,62263
+#define __FUNCT__ __FUNCT__1793,62280
+PetscErrorCode NEPNLEIGSGetRKShifts(NEP nep,PetscInt *ns,PetscScalar **shifts)NEPNLEIGSGetRKShifts1811,62635
+#define SHIFTMAX SHIFTMAX1823,63015
+#undef __FUNCT____FUNCT__1825,63036
+#define __FUNCT__ __FUNCT__1826,63053
+PetscErrorCode NEPSetFromOptions_NLEIGS(PetscOptionItems *PetscOptionsObject,NEP nep)NEPSetFromOptions_NLEIGS1827,63098
+#undef __FUNCT____FUNCT__1883,65642
+#define __FUNCT__ __FUNCT__1884,65659
+static PetscErrorCode NEPNLEIGSGetKSPs_NLEIGS(NEP nep,KSP **ksp)NEPNLEIGSGetKSPs_NLEIGS1885,65703
+#undef __FUNCT____FUNCT__1908,66635
+#define __FUNCT__ __FUNCT__1909,66652
+PetscErrorCode NEPNLEIGSGetKSPs(NEP nep,KSP **ksp)NEPNLEIGSGetKSPs1924,66974
+#undef __FUNCT____FUNCT__1935,67264
+#define __FUNCT__ __FUNCT__1936,67281
+PetscErrorCode NEPView_NLEIGS(NEP nep,PetscViewer viewer)NEPView_NLEIGS1937,67316
+#undef __FUNCT____FUNCT__1971,69140
+#define __FUNCT__ __FUNCT__1972,69157
+PetscErrorCode NEPReset_NLEIGS(NEP nep)NEPReset_NLEIGS1973,69193
+#undef __FUNCT____FUNCT__1991,69633
+#define __FUNCT__ __FUNCT__1992,69650
+PetscErrorCode NEPDestroy_NLEIGS(NEP nep)NEPDestroy_NLEIGS1993,69688
+#undef __FUNCT____FUNCT__2021,71507
+#define __FUNCT__ __FUNCT__2022,71524
+PETSC_EXTERN PetscErrorCode NEPCreate_NLEIGS(NEP nep)NEPCreate_NLEIGS2023,71561
 

 src/nep/impls/rii/makefile,271
 makefile:^?makefile^A,1
@@ -5505,17 +6108,82 @@ DIRS     =DIRS30,1020
 MANSEC   = NEPMANSEC31,1031
 LOCDIR   = src/nep/impls/rii/LOCDIR32,1046
 

-src/nep/impls/rii/rii.c,408
+src/nep/impls/rii/rii.c,4240
 rii.c:^?rii.c^A,1
-#undef __FUNCT____FUNCT__38,1277
-#define __FUNCT__ __FUNCT__39,1294
-PetscErrorCode NEPSetUp_RII(NEP nep)NEPSetUp_RII40,1327
-#undef __FUNCT____FUNCT__71,2662
-#define __FUNCT__ __FUNCT__72,2679
-PetscErrorCode NEPSolve_RII(NEP nep)NEPSolve_RII73,2712
-#undef __FUNCT____FUNCT__166,6222
-#define __FUNCT__ __FUNCT__167,6239
-PETSC_EXTERN PetscErrorCode NEPCreate_RII(NEP nep)NEPCreate_RII168,6273
+  PetscInt  max_inner_it;     /* maximum number of Newton iterations */max_inner_it39,1323
+  PetscInt  lag;              /* interval to rebuild preconditioner */lag40,1395
+  PetscBool cctol;            /* constant correction tolerance */cctol41,1466
+  KSP       ksp;              /* linear solver object */ksp42,1532
+} NEP_RII;NEP_RII43,1589
+#undef __FUNCT____FUNCT__45,1601
+#define __FUNCT__ __FUNCT__46,1618
+PETSC_STATIC_INLINE PetscErrorCode NEPRII_KSPSolve(NEP nep,Vec b,Vec x)NEPRII_KSPSolve47,1654
+#undef __FUNCT____FUNCT__60,2074
+#define __FUNCT__ __FUNCT__61,2091
+PetscErrorCode NEPSetUp_RII(NEP nep)NEPSetUp_RII62,2124
+#undef __FUNCT____FUNCT__84,3126
+#define __FUNCT__ __FUNCT__85,3143
+PetscErrorCode NEPSolve_RII(NEP nep)NEPSolve_RII86,3176
+#undef __FUNCT____FUNCT__180,6886
+#define __FUNCT__ __FUNCT__181,6903
+PetscErrorCode NEPSetFromOptions_RII(PetscOptionItems *PetscOptionsObject,NEP nep)NEPSetFromOptions_RII182,6945
+#undef __FUNCT____FUNCT__203,8150
+#define __FUNCT__ __FUNCT__204,8167
+static PetscErrorCode NEPRIISetMaximumIterations_RII(NEP nep,PetscInt its)NEPRIISetMaximumIterations_RII205,8218
+#undef __FUNCT____FUNCT__214,8412
+#define __FUNCT__ __FUNCT__215,8429
+PetscErrorCode NEPRIISetMaximumIterations(NEP nep,PetscInt its)NEPRIISetMaximumIterations231,8878
+#undef __FUNCT____FUNCT__242,9211
+#define __FUNCT__ __FUNCT__243,9228
+static PetscErrorCode NEPRIIGetMaximumIterations_RII(NEP nep,PetscInt *its)NEPRIIGetMaximumIterations_RII244,9279
+#undef __FUNCT____FUNCT__253,9475
+#define __FUNCT__ __FUNCT__254,9492
+PetscErrorCode NEPRIIGetMaximumIterations(NEP nep,PetscInt *its)NEPRIIGetMaximumIterations270,9824
+#undef __FUNCT____FUNCT__281,10142
+#define __FUNCT__ __FUNCT__282,10159
+static PetscErrorCode NEPRIISetLagPreconditioner_RII(NEP nep,PetscInt lag)NEPRIISetLagPreconditioner_RII283,10210
+#undef __FUNCT____FUNCT__293,10486
+#define __FUNCT__ __FUNCT__294,10503
+PetscErrorCode NEPRIISetLagPreconditioner(NEP nep,PetscInt lag)NEPRIISetLagPreconditioner318,11192
+#undef __FUNCT____FUNCT__329,11525
+#define __FUNCT__ __FUNCT__330,11542
+static PetscErrorCode NEPRIIGetLagPreconditioner_RII(NEP nep,PetscInt *lag)NEPRIIGetLagPreconditioner_RII331,11593
+#undef __FUNCT____FUNCT__340,11780
+#define __FUNCT__ __FUNCT__341,11797
+PetscErrorCode NEPRIIGetLagPreconditioner(NEP nep,PetscInt *lag)NEPRIIGetLagPreconditioner357,12125
+#undef __FUNCT____FUNCT__368,12443
+#define __FUNCT__ __FUNCT__369,12460
+static PetscErrorCode NEPRIISetConstCorrectionTol_RII(NEP nep,PetscBool cct)NEPRIISetConstCorrectionTol_RII370,12512
+#undef __FUNCT____FUNCT__379,12701
+#define __FUNCT__ __FUNCT__380,12718
+PetscErrorCode NEPRIISetConstCorrectionTol(NEP nep,PetscBool cct)NEPRIISetConstCorrectionTol404,13418
+#undef __FUNCT____FUNCT__415,13755
+#define __FUNCT__ __FUNCT__416,13772
+static PetscErrorCode NEPRIIGetConstCorrectionTol_RII(NEP nep,PetscBool *cct)NEPRIIGetConstCorrectionTol_RII417,13824
+#undef __FUNCT____FUNCT__426,14015
+#define __FUNCT__ __FUNCT__427,14032
+PetscErrorCode NEPRIIGetConstCorrectionTol(NEP nep,PetscBool *cct)NEPRIIGetConstCorrectionTol443,14372
+#undef __FUNCT____FUNCT__454,14694
+#define __FUNCT__ __FUNCT__455,14711
+static PetscErrorCode NEPRIISetKSP_RII(NEP nep,KSP ksp)NEPRIISetKSP_RII456,14748
+#undef __FUNCT____FUNCT__470,15172
+#define __FUNCT__ __FUNCT__471,15189
+PetscErrorCode NEPRIISetKSP(NEP nep,KSP ksp)NEPRIISetKSP486,15477
+#undef __FUNCT____FUNCT__498,15809
+#define __FUNCT__ __FUNCT__499,15826
+static PetscErrorCode NEPRIIGetKSP_RII(NEP nep,KSP *ksp)NEPRIIGetKSP_RII500,15863
+#undef __FUNCT____FUNCT__518,16575
+#define __FUNCT__ __FUNCT__519,16592
+PetscErrorCode NEPRIIGetKSP(NEP nep,KSP *ksp)NEPRIIGetKSP536,16922
+#undef __FUNCT____FUNCT__547,17202
+#define __FUNCT__ __FUNCT__548,17219
+PetscErrorCode NEPView_RII(NEP nep,PetscViewer viewer)NEPView_RII549,17251
+#undef __FUNCT____FUNCT__573,18233
+#define __FUNCT__ __FUNCT__574,18250
+PetscErrorCode NEPDestroy_RII(NEP nep)NEPDestroy_RII575,18285
+#undef __FUNCT____FUNCT__594,19351
+#define __FUNCT__ __FUNCT__595,19368
+PETSC_EXTERN PetscErrorCode NEPCreate_RII(NEP nep)NEPCreate_RII596,19402
 

 src/nep/impls/slp/makefile,271
 makefile:^?makefile^A,1
@@ -5529,60 +6197,61 @@ DIRS     =DIRS30,1020
 MANSEC   = NEPMANSEC31,1031
 LOCDIR   = src/nep/impls/slp/LOCDIR32,1046
 

-src/nep/impls/slp/slp.c,1722
+src/nep/impls/slp/slp.c,1726
 slp.c:^?slp.c^A,1
   EPS       eps;             /* linear eigensolver for T*z = mu*Tp*z */eps39,1313
 } NEP_SLP;NEP_SLP40,1385
 #undef __FUNCT____FUNCT__42,1397
 #define __FUNCT__ __FUNCT__43,1414
 PetscErrorCode NEPSetUp_SLP(NEP nep)NEPSetUp_SLP44,1447
-#undef __FUNCT____FUNCT__85,3412
-#define __FUNCT__ __FUNCT__86,3429
-PetscErrorCode NEPSolve_SLP(NEP nep)NEPSolve_SLP87,3462
-#undef __FUNCT____FUNCT__149,5733
-#define __FUNCT__ __FUNCT__150,5750
-PetscErrorCode NEPSetFromOptions_SLP(PetscOptions *PetscOptionsObject,NEP nep)NEPSetFromOptions_SLP151,5792
-#undef __FUNCT____FUNCT__164,6238
-#define __FUNCT__ __FUNCT__165,6255
-static PetscErrorCode NEPSLPSetEPS_SLP(NEP nep,EPS eps)NEPSLPSetEPS_SLP166,6292
-#undef __FUNCT____FUNCT__180,6716
-#define __FUNCT__ __FUNCT__181,6733
-PetscErrorCode NEPSLPSetEPS(NEP nep,EPS eps)NEPSLPSetEPS196,7034
-#undef __FUNCT____FUNCT__208,7366
-#define __FUNCT__ __FUNCT__209,7383
-static PetscErrorCode NEPSLPGetEPS_SLP(NEP nep,EPS *eps)NEPSLPGetEPS_SLP210,7420
-#undef __FUNCT____FUNCT__230,8206
-#define __FUNCT__ __FUNCT__231,8223
-PetscErrorCode NEPSLPGetEPS(NEP nep,EPS *eps)NEPSLPGetEPS248,8554
-#undef __FUNCT____FUNCT__259,8834
-#define __FUNCT__ __FUNCT__260,8851
-PetscErrorCode NEPView_SLP(NEP nep,PetscViewer viewer)NEPView_SLP261,8883
-#undef __FUNCT____FUNCT__274,9291
-#define __FUNCT__ __FUNCT__275,9308
-PetscErrorCode NEPReset_SLP(NEP nep)NEPReset_SLP276,9341
-#undef __FUNCT____FUNCT__286,9562
-#define __FUNCT__ __FUNCT__287,9579
-PetscErrorCode NEPDestroy_SLP(NEP nep)NEPDestroy_SLP288,9614
-#undef __FUNCT____FUNCT__301,10048
-#define __FUNCT__ __FUNCT__302,10065
-PETSC_EXTERN PetscErrorCode NEPCreate_SLP(NEP nep)NEPCreate_SLP303,10099
-

-src/nep/interface/dlregisnep.c,1192
+#undef __FUNCT____FUNCT__76,3091
+#define __FUNCT__ __FUNCT__77,3108
+PetscErrorCode NEPSolve_SLP(NEP nep)NEPSolve_SLP78,3141
+#undef __FUNCT____FUNCT__139,5529
+#define __FUNCT__ __FUNCT__140,5546
+PetscErrorCode NEPSetFromOptions_SLP(PetscOptionItems *PetscOptionsObject,NEP nep)NEPSetFromOptions_SLP141,5588
+#undef __FUNCT____FUNCT__154,6038
+#define __FUNCT__ __FUNCT__155,6055
+static PetscErrorCode NEPSLPSetEPS_SLP(NEP nep,EPS eps)NEPSLPSetEPS_SLP156,6092
+#undef __FUNCT____FUNCT__170,6516
+#define __FUNCT__ __FUNCT__171,6533
+PetscErrorCode NEPSLPSetEPS(NEP nep,EPS eps)NEPSLPSetEPS186,6834
+#undef __FUNCT____FUNCT__198,7166
+#define __FUNCT__ __FUNCT__199,7183
+static PetscErrorCode NEPSLPGetEPS_SLP(NEP nep,EPS *eps)NEPSLPGetEPS_SLP200,7220
+#undef __FUNCT____FUNCT__220,8010
+#define __FUNCT__ __FUNCT__221,8027
+PetscErrorCode NEPSLPGetEPS(NEP nep,EPS *eps)NEPSLPGetEPS238,8358
+#undef __FUNCT____FUNCT__249,8638
+#define __FUNCT__ __FUNCT__250,8655
+PetscErrorCode NEPView_SLP(NEP nep,PetscViewer viewer)NEPView_SLP251,8687
+#undef __FUNCT____FUNCT__268,9244
+#define __FUNCT__ __FUNCT__269,9261
+PetscErrorCode NEPReset_SLP(NEP nep)NEPReset_SLP270,9294
+#undef __FUNCT____FUNCT__280,9515
+#define __FUNCT__ __FUNCT__281,9532
+PetscErrorCode NEPDestroy_SLP(NEP nep)NEPDestroy_SLP282,9567
+#undef __FUNCT____FUNCT__295,10001
+#define __FUNCT__ __FUNCT__296,10018
+PETSC_EXTERN PetscErrorCode NEPCreate_SLP(NEP nep)NEPCreate_SLP297,10052
+

+src/nep/interface/dlregisnep.c,1229
 dlregisnep.c:^?dlregisnep.c^A,1
 static PetscBool NEPPackageInitialized = PETSC_FALSE;NEPPackageInitialized24,960
 const char *NEPErrorTypes[] = {"ABSOLUTE","RELATIVE","NEPErrorType","NEP_ERROR_",0};NEPErrorTypes26,1015
 const char *NEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","NEPRefine","NEP_REFINE_",0};NEPRefineTypes27,1100
-const char *const NEPConvergedReasons_Shifted[] = {"DIVERGED_FNORM_NAN","DIVERGED_BREAKDOWN","DIVERGED_MAX_IT","DIVERGED_FUNCTION_COUNT","DIVERGED_LINEAR_SOLVE","CONVERGED_ITERATING","","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE","CONVERGED_SNORM_RELATIVE","NEPConvergedReason","NEP_",0};NEPConvergedReasons_Shifted28,1189
-const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 5;NEPConvergedReasons29,1483
-#undef __FUNCT____FUNCT__31,1557
-#define __FUNCT__ __FUNCT__32,1574
-PetscErrorCode NEPFinalizePackage(void)NEPFinalizePackage41,1809
-#undef __FUNCT____FUNCT__52,2063
-#define __FUNCT__ __FUNCT__53,2080
-PetscErrorCode NEPInitializePackage(void)NEPInitializePackage63,2408
-#undef __FUNCT____FUNCT__105,4032
-#define __FUNCT__ __FUNCT__106,4049
-PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcnep()PetscDLLibraryRegister_slepcnep114,4299
+const char *NEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","NEPRefineScheme","NEP_REFINE_SCHEME_",0};NEPRefineSchemes28,1189
+const char *const NEPConvergedReasons_Shifted[] = {"DIVERGED_LINEAR_SOLVE","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","NEPConvergedReason","NEP_",0};NEPConvergedReasons_Shifted29,1294
+const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 4;NEPConvergedReasons30,1495
+#undef __FUNCT____FUNCT__32,1569
+#define __FUNCT__ __FUNCT__33,1586
+PetscErrorCode NEPFinalizePackage(void)NEPFinalizePackage42,1821
+#undef __FUNCT____FUNCT__53,2075
+#define __FUNCT__ __FUNCT__54,2092
+PetscErrorCode NEPInitializePackage(void)NEPInitializePackage64,2420
+#undef __FUNCT____FUNCT__107,4147
+#define __FUNCT__ __FUNCT__108,4164
+PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcnep()PetscDLLibraryRegister_slepcnep116,4414
 

 src/nep/interface/ftn-custom/makefile,257
 makefile:^?makefile^A,1
@@ -5595,31 +6264,52 @@ DIRS     =DIRS29,1037
 LIBBASE  = libslepcnepLIBBASE30,1048
 LOCDIR   = src/nep/interface/ftn-custom/LOCDIR31,1071
 

-src/nep/interface/ftn-custom/znepf.c,4653
+src/nep/interface/ftn-custom/znepf.c,8227
 znepf.c:^?znepf.c^A,1
-PETSC_EXTERN void nepmonitorall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorall_66,2908
-PETSC_EXTERN void nepmonitorlg_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorlg_71,3129
-PETSC_EXTERN void nepmonitorlgall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorlgall_76,3348
-PETSC_EXTERN void nepmonitorconverged_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorconverged_81,3573
-PETSC_EXTERN void nepmonitorfirst_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorfirst_86,3806
-  PetscFortranCallbackId monitor;monitor92,4047
-  PetscFortranCallbackId monitordestroy;monitordestroy93,4081
-} _cb;_cb94,4122
-#undef __FUNCT____FUNCT__97,4222
-static PetscErrorCode ourmonitor(NEP nep,PetscInt i,PetscInt nc,PetscScalar *eig,PetscReal *d,PetscInt l,void* ctx)ourmonitor99,4270
-#undef __FUNCT____FUNCT__104,4558
-static PetscErrorCode ourdestroy(void** ctx)ourdestroy106,4606
-PETSC_EXTERN void PETSC_STDCALL nepview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepview_112,4773
-PETSC_EXTERN void PETSC_STDCALL nepreasonview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepreasonview_119,4960
-PETSC_EXTERN void PETSC_STDCALL neperrorview_(NEP *nep,NEPErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)neperrorview_126,5159
-PETSC_EXTERN void PETSC_STDCALL nepvaluesview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepvaluesview_133,5383
-PETSC_EXTERN void PETSC_STDCALL nepvectorsview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepvectorsview_140,5582
-PETSC_EXTERN void PETSC_STDCALL nepsettype_(NEP *nep,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepsettype_147,5783
-PETSC_EXTERN void PETSC_STDCALL nepgettype_(NEP *nep,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepgettype_156,5998
-PETSC_EXTERN void PETSC_STDCALL nepsetoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepsetoptionsprefix_165,6277
-PETSC_EXTERN void PETSC_STDCALL nepappendoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepappendoptionsprefix_174,6516
-PETSC_EXTERN void PETSC_STDCALL nepgetoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepgetoptionsprefix_183,6761
-PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *monitor)(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)nepmonitorset_191,7029
+PETSC_EXTERN void nepmonitorall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)nepmonitorall_76,3526
+PETSC_EXTERN void nepmonitorconverged_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)nepmonitorconverged_81,3790
+PETSC_EXTERN void nepmonitorfirst_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)nepmonitorfirst_86,4061
+PETSC_EXTERN void nepmonitorlg_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorlg_91,4329
+PETSC_EXTERN void nepmonitorlgall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)nepmonitorlgall_96,4573
+  PetscFortranCallbackId monitor;monitor102,4839
+  PetscFortranCallbackId monitordestroy;monitordestroy103,4873
+  PetscFortranCallbackId convergence;convergence104,4914
+  PetscFortranCallbackId convdestroy;convdestroy105,4952
+  PetscFortranCallbackId stopping;stopping106,4990
+  PetscFortranCallbackId stopdestroy;stopdestroy107,5025
+  PetscFortranCallbackId comparison;comparison108,5063
+} _cb;_cb109,5100
+#undef __FUNCT____FUNCT__112,5200
+static PetscErrorCode ourmonitor(NEP nep,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)ourmonitor114,5248
+#undef __FUNCT____FUNCT__119,5566
+static PetscErrorCode ourdestroy(void** ctx)ourdestroy121,5614
+#undef __FUNCT____FUNCT__127,5781
+static PetscErrorCode ourconvergence(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)ourconvergence129,5833
+#undef __FUNCT____FUNCT__134,6133
+static PetscErrorCode ourconvdestroy(void *ctx)ourconvdestroy136,6185
+#undef __FUNCT____FUNCT__142,6351
+static PetscErrorCode ourstopping(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)ourstopping144,6400
+#undef __FUNCT____FUNCT__149,6732
+static PetscErrorCode ourstopdestroy(void *ctx)ourstopdestroy151,6784
+#undef __FUNCT____FUNCT__157,6950
+static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)oureigenvaluecomparison159,7011
+PETSC_EXTERN void PETSC_STDCALL nepview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepview_165,7337
+PETSC_EXTERN void PETSC_STDCALL nepreasonview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepreasonview_172,7524
+PETSC_EXTERN void PETSC_STDCALL neperrorview_(NEP *nep,NEPErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)neperrorview_179,7723
+PETSC_EXTERN void PETSC_STDCALL nepvaluesview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepvaluesview_186,7947
+PETSC_EXTERN void PETSC_STDCALL nepvectorsview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)nepvectorsview_193,8146
+PETSC_EXTERN void PETSC_STDCALL nepsettype_(NEP *nep,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepsettype_200,8347
+PETSC_EXTERN void PETSC_STDCALL nepgettype_(NEP *nep,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepgettype_209,8562
+PETSC_EXTERN void PETSC_STDCALL nepsetoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepsetoptionsprefix_218,8841
+PETSC_EXTERN void PETSC_STDCALL nepappendoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepappendoptionsprefix_227,9080
+PETSC_EXTERN void PETSC_STDCALL nepgetoptionsprefix_(NEP *nep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))nepgetoptionsprefix_236,9325
+PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *monitor)(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)nepmonitorset_244,9593
+PETSC_EXTERN void PETSC_STDCALL nepconvergedabsolute_(NEP *nep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)nepconvergedabsolute_269,11635
+PETSC_EXTERN void PETSC_STDCALL nepconvergedrelative_(NEP *nep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)nepconvergedrelative_274,11870
+PETSC_EXTERN void PETSC_STDCALL nepsetconvergencetestfunction_(NEP *nep,void (PETSC_STDCALL *func)(NEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)nepsetconvergencetestfunction_279,12105
+PETSC_EXTERN void PETSC_STDCALL nepstoppingbasic_(NEP *nep,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,NEPConvergedReason *reason,void *ctx,PetscErrorCode *ierr)nepstoppingbasic_298,13234
+PETSC_EXTERN void PETSC_STDCALL nepsetstoppingtestfunction_(NEP *nep,void (PETSC_STDCALL *func)(NEP*,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)nepsetstoppingtestfunction_303,13488
+PETSC_EXTERN void PETSC_STDCALL nepseteigenvaluecomparison_(NEP *nep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)nepseteigenvaluecomparison_320,14464
 

 src/nep/interface/makefile,379
 makefile:^?makefile^A,1
@@ -5633,87 +6323,94 @@ DIRS     =DIRS30,1125
 MANSEC   = NEPMANSEC31,1136
 LOCDIR   = src/nep/interface/LOCDIR32,1151
 

-src/nep/interface/nepbasic.c,4467
+src/nep/interface/nepbasic.c,5204
 nepbasic.c:^?nepbasic.c^A,1
 PetscFunctionList NEPList = 0;NEPList26,1029
 PetscBool         NEPRegisterAllCalled = PETSC_FALSE;NEPRegisterAllCalled27,1060
 PetscClassId      NEP_CLASSID = 0;NEP_CLASSID28,1114
-PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;NEP_SetUp29,1149
-PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;NEP_Solve29,1149
-PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;NEP_Refine29,1149
-PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;NEP_FunctionEval29,1149
-PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;NEP_JacobianEval29,1149
-#undef __FUNCT____FUNCT__31,1254
-#define __FUNCT__ __FUNCT__32,1271
-PetscErrorCode NEPCreate(MPI_Comm comm,NEP *outnep)NEPCreate48,1568
-#undef __FUNCT____FUNCT__127,4057
-#define __FUNCT__ __FUNCT__128,4074
-PetscErrorCode NEPSetType(NEP nep,NEPType type)NEPSetType157,4995
-#undef __FUNCT____FUNCT__181,5819
-#define __FUNCT__ __FUNCT__182,5836
-PetscErrorCode NEPGetType(NEP nep,NEPType *type)NEPGetType198,6115
-#undef __FUNCT____FUNCT__207,6334
-#define __FUNCT__ __FUNCT__208,6351
-PetscErrorCode NEPRegister(const char *name,PetscErrorCode (*function)(NEP))NEPRegister235,6979
-#undef __FUNCT____FUNCT__244,7202
-#define __FUNCT__ __FUNCT__245,7219
-PetscErrorCode NEPReset(NEP nep)NEPReset259,7494
-#undef __FUNCT____FUNCT__290,8517
-#define __FUNCT__ __FUNCT__291,8534
-PetscErrorCode NEPDestroy(NEP *nep)NEPDestroy304,8780
-#undef __FUNCT____FUNCT__329,9774
-#define __FUNCT__ __FUNCT__330,9791
-PetscErrorCode NEPSetBV(NEP nep,BV bv)NEPSetBV348,10208
-#undef __FUNCT____FUNCT__363,10653
-#define __FUNCT__ __FUNCT__364,10670
-PetscErrorCode NEPGetBV(NEP nep,BV *bv)NEPGetBV381,10994
-#undef __FUNCT____FUNCT__396,11385
-#define __FUNCT__ __FUNCT__397,11402
-PetscErrorCode NEPSetRG(NEP nep,RG rg)NEPSetRG415,11798
-#undef __FUNCT____FUNCT__430,12246
-#define __FUNCT__ __FUNCT__431,12263
-PetscErrorCode NEPGetRG(NEP nep,RG *rg)NEPGetRG448,12573
-#undef __FUNCT____FUNCT__463,12968
-#define __FUNCT__ __FUNCT__464,12985
-PetscErrorCode NEPSetDS(NEP nep,DS ds)NEPSetDS482,13402
-#undef __FUNCT____FUNCT__497,13850
-#define __FUNCT__ __FUNCT__498,13867
-PetscErrorCode NEPGetDS(NEP nep,DS *ds)NEPGetDS515,14191
-#undef __FUNCT____FUNCT__530,14586
-#define __FUNCT__ __FUNCT__531,14603
-PetscErrorCode NEPSetKSP(NEP nep,KSP ksp)NEPSetKSP549,15024
-#undef __FUNCT____FUNCT__564,15484
-#define __FUNCT__ __FUNCT__565,15501
-PetscErrorCode NEPGetKSP(NEP nep,KSP *ksp)NEPGetKSP582,15825
-#undef __FUNCT____FUNCT__601,16549
-#define __FUNCT__ __FUNCT__602,16566
-PetscErrorCode NEPSetTarget(NEP nep,PetscScalar target)NEPSetTarget627,17264
-#undef __FUNCT____FUNCT__636,17495
-#define __FUNCT__ __FUNCT__637,17512
-PetscErrorCode NEPGetTarget(NEP nep,PetscScalar* target)NEPGetTarget656,17853
-#undef __FUNCT____FUNCT__665,18072
-#define __FUNCT__ __FUNCT__666,18089
-PetscErrorCode NEPSetFunction(NEP nep,Mat A,Mat B,PetscErrorCode (*fun)(NEP,PetscScalar,Mat,Mat,void*),void *ctx)NEPSetFunction687,18779
-#undef __FUNCT____FUNCT__713,19623
-#define __FUNCT__ __FUNCT__714,19640
-PetscErrorCode NEPGetFunction(NEP nep,Mat *A,Mat *B,PetscErrorCode (**fun)(NEP,PetscScalar,Mat,Mat,void*),void **ctx)NEPGetFunction734,20228
-#undef __FUNCT____FUNCT__745,20592
-#define __FUNCT__ __FUNCT__746,20609
-PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScalar,Mat,void*),void *ctx)NEPSetJacobian766,21224
-#undef __FUNCT____FUNCT__785,21804
-#define __FUNCT__ __FUNCT__786,21821
-PetscErrorCode NEPGetJacobian(NEP nep,Mat *A,PetscErrorCode (**jac)(NEP,PetscScalar,Mat,void*),void **ctx)NEPGetJacobian805,22350
-#undef __FUNCT____FUNCT__815,22666
-#define __FUNCT__ __FUNCT__816,22683
-PetscErrorCode NEPSetSplitOperator(NEP nep,PetscInt n,Mat A[],FN f[],MatStructure str)NEPSetSplitOperator848,23780
-#undef __FUNCT____FUNCT__894,25456
-#define __FUNCT__ __FUNCT__895,25473
-PetscErrorCode NEPGetSplitOperatorTerm(NEP nep,PetscInt k,Mat *A,FN *f)NEPGetSplitOperatorTerm914,26038
-#undef __FUNCT____FUNCT__924,26376
-#define __FUNCT__ __FUNCT__925,26393
-PetscErrorCode NEPGetSplitOperatorInfo(NEP nep,PetscInt *n,MatStructure *str)NEPGetSplitOperatorInfo943,26912
-

-src/nep/interface/nepdefault.c,548
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;NEP_SetUp29,1149
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;NEP_Solve29,1149
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;NEP_Refine29,1149
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;NEP_FunctionEval29,1149
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;NEP_JacobianEval29,1149
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;NEP_DerivativesEval29,1149
+#undef __FUNCT____FUNCT__31,1278
+#define __FUNCT__ __FUNCT__32,1295
+PetscErrorCode NEPCreate(MPI_Comm comm,NEP *outnep)NEPCreate48,1592
+#undef __FUNCT____FUNCT__124,3913
+#define __FUNCT__ __FUNCT__125,3930
+PetscErrorCode NEPSetType(NEP nep,NEPType type)NEPSetType154,4851
+#undef __FUNCT____FUNCT__178,5675
+#define __FUNCT__ __FUNCT__179,5692
+PetscErrorCode NEPGetType(NEP nep,NEPType *type)NEPGetType195,5971
+#undef __FUNCT____FUNCT__204,6190
+#define __FUNCT__ __FUNCT__205,6207
+PetscErrorCode NEPRegister(const char *name,PetscErrorCode (*function)(NEP))NEPRegister232,6835
+#undef __FUNCT____FUNCT__241,7058
+#define __FUNCT__ __FUNCT__242,7075
+PetscErrorCode NEPReset_Problem(NEP nep)NEPReset_Problem246,7172
+#undef __FUNCT____FUNCT__267,7854
+#define __FUNCT__ __FUNCT__268,7871
+PetscErrorCode NEPReset(NEP nep)NEPReset282,8146
+#undef __FUNCT____FUNCT__305,8933
+#define __FUNCT__ __FUNCT__306,8950
+PetscErrorCode NEPDestroy(NEP *nep)NEPDestroy319,9196
+#undef __FUNCT____FUNCT__342,10083
+#define __FUNCT__ __FUNCT__343,10100
+PetscErrorCode NEPSetBV(NEP nep,BV bv)NEPSetBV361,10517
+#undef __FUNCT____FUNCT__376,10962
+#define __FUNCT__ __FUNCT__377,10979
+PetscErrorCode NEPGetBV(NEP nep,BV *bv)NEPGetBV394,11303
+#undef __FUNCT____FUNCT__409,11694
+#define __FUNCT__ __FUNCT__410,11711
+PetscErrorCode NEPSetRG(NEP nep,RG rg)NEPSetRG428,12107
+#undef __FUNCT____FUNCT__443,12555
+#define __FUNCT__ __FUNCT__444,12572
+PetscErrorCode NEPGetRG(NEP nep,RG *rg)NEPGetRG461,12882
+#undef __FUNCT____FUNCT__476,13277
+#define __FUNCT__ __FUNCT__477,13294
+PetscErrorCode NEPSetDS(NEP nep,DS ds)NEPSetDS495,13711
+#undef __FUNCT____FUNCT__510,14159
+#define __FUNCT__ __FUNCT__511,14176
+PetscErrorCode NEPGetDS(NEP nep,DS *ds)NEPGetDS528,14500
+#undef __FUNCT____FUNCT__543,14895
+#define __FUNCT__ __FUNCT__544,14912
+PetscErrorCode NEPRefineGetKSP(NEP nep,KSP *ksp)NEPRefineGetKSP561,15243
+#undef __FUNCT____FUNCT__586,16382
+#define __FUNCT__ __FUNCT__587,16399
+PetscErrorCode NEPSetTarget(NEP nep,PetscScalar target)NEPSetTarget612,17097
+#undef __FUNCT____FUNCT__621,17328
+#define __FUNCT__ __FUNCT__622,17345
+PetscErrorCode NEPGetTarget(NEP nep,PetscScalar* target)NEPGetTarget641,17686
+#undef __FUNCT____FUNCT__650,17905
+#define __FUNCT__ __FUNCT__651,17922
+PetscErrorCode NEPSetFunction(NEP nep,Mat A,Mat B,PetscErrorCode (*fun)(NEP,PetscScalar,Mat,Mat,void*),void *ctx)NEPSetFunction672,18612
+#undef __FUNCT____FUNCT__703,19615
+#define __FUNCT__ __FUNCT__704,19632
+PetscErrorCode NEPGetFunction(NEP nep,Mat *A,Mat *B,PetscErrorCode (**fun)(NEP,PetscScalar,Mat,Mat,void*),void **ctx)NEPGetFunction724,20220
+#undef __FUNCT____FUNCT__736,20611
+#define __FUNCT__ __FUNCT__737,20628
+PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScalar,Mat,void*),void *ctx)NEPSetJacobian757,21243
+#undef __FUNCT____FUNCT__781,21982
+#define __FUNCT__ __FUNCT__782,21999
+PetscErrorCode NEPGetJacobian(NEP nep,Mat *A,PetscErrorCode (**jac)(NEP,PetscScalar,Mat,void*),void **ctx)NEPGetJacobian801,22540
+#undef __FUNCT____FUNCT__812,22883
+#define __FUNCT__ __FUNCT__813,22900
+PetscErrorCode NEPSetSplitOperator(NEP nep,PetscInt n,Mat A[],FN f[],MatStructure str)NEPSetSplitOperator845,23997
+#undef __FUNCT____FUNCT__884,25491
+#define __FUNCT__ __FUNCT__885,25508
+PetscErrorCode NEPGetSplitOperatorTerm(NEP nep,PetscInt k,Mat *A,FN *f)NEPGetSplitOperatorTerm904,26073
+#undef __FUNCT____FUNCT__915,26435
+#define __FUNCT__ __FUNCT__916,26452
+PetscErrorCode NEPGetSplitOperatorInfo(NEP nep,PetscInt *n,MatStructure *str)NEPGetSplitOperatorInfo934,26971
+#undef __FUNCT____FUNCT__944,27227
+#define __FUNCT__ __FUNCT__945,27244
+PetscErrorCode NEPSetDerivatives(NEP nep,Mat A,PetscErrorCode (*der)(NEP,PetscScalar,PetscInt,Mat,void*),void *ctx)NEPSetDerivatives965,27959
+#undef __FUNCT____FUNCT__989,28728
+#define __FUNCT__ __FUNCT__990,28745
+PetscErrorCode NEPGetDerivatives(NEP nep,Mat *A,PetscErrorCode (**der)(NEP,PetscScalar,PetscInt,Mat,void*),void **ctx)NEPGetDerivatives1009,29314
+

+src/nep/interface/nepdefault.c,1362
 nepdefault.c:^?nepdefault.c^A,1
 #undef __FUNCT____FUNCT__26,1066
 #define __FUNCT__ __FUNCT__27,1083
@@ -5721,143 +6418,185 @@ PetscErrorCode NEPSetWorkVecs(NEP nep,PetscInt nw)NEPSetWorkVecs43,1453
 #undef __FUNCT____FUNCT__60,1947
 #define __FUNCT__ __FUNCT__61,1964
 PetscErrorCode NEPGetDefaultShift(NEP nep,PetscScalar *sigma)NEPGetDefaultShift65,2093
-#undef __FUNCT____FUNCT__93,2758
-#define __FUNCT__ __FUNCT__94,2775
-PetscErrorCode NEPConvergedDefault(NEP nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,NEPConvergedReason *reason,void *ctx)NEPConvergedDefault98,2894
-

-src/nep/interface/nepmon.c,1924
+#undef __FUNCT____FUNCT__95,2801
+#define __FUNCT__ __FUNCT__96,2818
+PetscErrorCode NEPConvergedRelative(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)NEPConvergedRelative100,2937
+#undef __FUNCT____FUNCT__110,3183
+#define __FUNCT__ __FUNCT__111,3200
+PetscErrorCode NEPConvergedAbsolute(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)NEPConvergedAbsolute115,3303
+#undef __FUNCT____FUNCT__122,3494
+#define __FUNCT__ __FUNCT__123,3511
+PetscErrorCode NEPConvergedNorm(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)NEPConvergedNorm127,3624
+#undef __FUNCT____FUNCT__153,4621
+#define __FUNCT__ __FUNCT__154,4638
+PetscErrorCode NEPStoppingBasic(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)NEPStoppingBasic187,5772
+#undef __FUNCT____FUNCT__203,6407
+#define __FUNCT__ __FUNCT__204,6424
+PetscErrorCode NEPComputeVectors_Schur(NEP nep)NEPComputeVectors_Schur205,6468
+

+src/nep/interface/nepmon.c,2314
 nepmon.c:^?nepmon.c^A,1
 #undef __FUNCT____FUNCT__27,1050
 #define __FUNCT__ __FUNCT__28,1067
-PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest)NEPMonitor32,1156
-#undef __FUNCT____FUNCT__44,1512
-#define __FUNCT__ __FUNCT__45,1529
-PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))NEPMonitorSet93,3484
-#undef __FUNCT____FUNCT__104,4086
-#define __FUNCT__ __FUNCT__105,4103
-PetscErrorCode NEPMonitorCancel(NEP nep)NEPMonitorCancel123,4576
-#undef __FUNCT____FUNCT__139,4953
-#define __FUNCT__ __FUNCT__140,4970
-PetscErrorCode NEPGetMonitorContext(NEP nep,void **ctx)NEPGetMonitorContext157,5343
-#undef __FUNCT____FUNCT__165,5532
-#define __FUNCT__ __FUNCT__166,5549
-PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)NEPMonitorAll186,6137
-#undef __FUNCT____FUNCT__210,7212
-#define __FUNCT__ __FUNCT__211,7229
-PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)NEPMonitorFirst231,7827
-#undef __FUNCT____FUNCT__251,8831
-#define __FUNCT__ __FUNCT__252,8848
-PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)NEPMonitorConverged276,9504
-#undef __FUNCT____FUNCT__305,10799
-#define __FUNCT__ __FUNCT__306,10816
-PetscErrorCode NEPMonitorLG(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)NEPMonitorLG307,10849
-#undef __FUNCT____FUNCT__335,11904
-#define __FUNCT__ __FUNCT__336,11921
-PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)NEPMonitorLGAll337,11957
-

-src/nep/interface/nepopts.c,3503
+PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest)NEPMonitor32,1156
+#undef __FUNCT____FUNCT__44,1537
+#define __FUNCT__ __FUNCT__45,1554
+PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))NEPMonitorSet94,3592
+#undef __FUNCT____FUNCT__105,4207
+#define __FUNCT__ __FUNCT__106,4224
+PetscErrorCode NEPMonitorCancel(NEP nep)NEPMonitorCancel124,4697
+#undef __FUNCT____FUNCT__140,5074
+#define __FUNCT__ __FUNCT__141,5091
+PetscErrorCode NEPGetMonitorContext(NEP nep,void **ctx)NEPGetMonitorContext158,5464
+#undef __FUNCT____FUNCT__166,5653
+#define __FUNCT__ __FUNCT__167,5670
+PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)NEPMonitorAll188,6307
+#undef __FUNCT____FUNCT__222,8004
+#define __FUNCT__ __FUNCT__223,8021
+PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)NEPMonitorFirst244,8668
+#undef __FUNCT____FUNCT__276,10338
+#define __FUNCT__ __FUNCT__277,10355
+PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)NEPMonitorConverged298,10943
+#undef __FUNCT____FUNCT__335,12700
+#define __FUNCT__ __FUNCT__336,12717
+PetscErrorCode NEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)NEPMonitorLGCreate365,13517
+#undef __FUNCT____FUNCT__381,14063
+#define __FUNCT__ __FUNCT__382,14080
+PetscErrorCode NEPMonitorLG(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)NEPMonitorLG383,14113
+#undef __FUNCT____FUNCT__407,14959
+#define __FUNCT__ __FUNCT__408,14976
+PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)NEPMonitorLGAll409,15012
+

+src/nep/interface/nepopts.c,4671
 nepopts.c:^?nepopts.c^A,1
-#undef __FUNCT____FUNCT__27,1086
-#define __FUNCT__ __FUNCT__28,1103
-PetscErrorCode NEPSetFromOptions(NEP nep)NEPSetFromOptions44,1502
-#undef __FUNCT____FUNCT__207,12036
-#define __FUNCT__ __FUNCT__208,12053
-PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf)NEPGetTolerances233,12761
-#undef __FUNCT____FUNCT__245,13167
-#define __FUNCT__ __FUNCT__246,13184
-PetscErrorCode NEPSetTolerances(NEP nep,PetscReal abstol,PetscReal rtol,PetscReal stol,PetscInt maxit,PetscInt maxf)NEPSetTolerances275,14072
-#undef __FUNCT____FUNCT__319,15923
-#define __FUNCT__ __FUNCT__320,15940
-PetscErrorCode NEPGetDimensions(NEP nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)NEPGetDimensions342,16504
-#undef __FUNCT____FUNCT__352,16771
-#define __FUNCT__ __FUNCT__353,16788
-PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)NEPSetDimensions388,18058
-#undef __FUNCT____FUNCT__413,18995
-#define __FUNCT__ __FUNCT__414,19012
-PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)NEPSetWhichEigenpairs459,20873
-#undef __FUNCT____FUNCT__487,21650
-#define __FUNCT__ __FUNCT__488,21667
-PetscErrorCode NEPGetWhichEigenpairs(NEP nep,NEPWhich *which)NEPGetWhichEigenpairs508,22124
-#undef __FUNCT____FUNCT__517,22339
-#define __FUNCT__ __FUNCT__518,22356
-PetscErrorCode NEPSetLagPreconditioner(NEP nep,PetscInt lag)NEPSetLagPreconditioner542,23031
-#undef __FUNCT____FUNCT__552,23346
-#define __FUNCT__ __FUNCT__553,23363
-PetscErrorCode NEPGetLagPreconditioner(NEP nep,PetscInt *lag)NEPGetLagPreconditioner569,23677
-#undef __FUNCT____FUNCT__578,23886
-#define __FUNCT__ __FUNCT__579,23903
-PetscErrorCode NEPSetConstCorrectionTol(NEP nep,PetscBool cct)NEPSetConstCorrectionTol603,24568
-#undef __FUNCT____FUNCT__612,24797
-#define __FUNCT__ __FUNCT__613,24814
-PetscErrorCode NEPGetConstCorrectionTol(NEP nep,PetscBool *cct)NEPGetConstCorrectionTol629,25140
-#undef __FUNCT____FUNCT__638,25353
-#define __FUNCT__ __FUNCT__639,25370
-PetscErrorCode NEPSetConvergenceTest(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))NEPSetConvergenceTest669,26440
-#undef __FUNCT____FUNCT__684,26949
-#define __FUNCT__ __FUNCT__685,26966
-PetscErrorCode NEPSetTrackAll(NEP nep,PetscBool trackall)NEPSetTrackAll708,27700
-#undef __FUNCT____FUNCT__717,27937
-#define __FUNCT__ __FUNCT__718,27954
-PetscErrorCode NEPGetTrackAll(NEP nep,PetscBool *trackall)NEPGetTrackAll735,28276
-#undef __FUNCT____FUNCT__744,28497
-#define __FUNCT__ __FUNCT__745,28514
-PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its)NEPSetRefine788,30276
-#undef __FUNCT____FUNCT__825,31674
-#define __FUNCT__ __FUNCT__826,31691
-PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its)NEPGetRefine849,32241
-#undef __FUNCT____FUNCT__860,32586
-#define __FUNCT__ __FUNCT__861,32603
-PetscErrorCode NEPSetOptionsPrefix(NEP nep,const char *prefix)NEPSetOptionsPrefix888,33356
-#undef __FUNCT____FUNCT__907,34182
-#define __FUNCT__ __FUNCT__908,34199
-PetscErrorCode NEPAppendOptionsPrefix(NEP nep,const char *prefix)NEPAppendOptionsPrefix927,34758
-#undef __FUNCT____FUNCT__946,35590
-#define __FUNCT__ __FUNCT__947,35607
-PetscErrorCode NEPGetOptionsPrefix(NEP nep,const char *prefix[])NEPGetOptionsPrefix967,36118
-

-src/nep/interface/neprefine.c,1337
+#undef __FUNCT____FUNCT__28,1109
+#define __FUNCT__ __FUNCT__29,1126
+PetscErrorCode NEPMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)NEPMonitorSetFromOptions48,1764
+#undef __FUNCT____FUNCT__69,2791
+#define __FUNCT__ __FUNCT__70,2808
+PetscErrorCode NEPConvMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))NEPConvMonitorSetFromOptions88,3426
+#undef __FUNCT____FUNCT__106,4327
+#define __FUNCT__ __FUNCT__107,4344
+PetscErrorCode NEPSetFromOptions(NEP nep)NEPSetFromOptions123,4743
+#undef __FUNCT____FUNCT__271,14964
+#define __FUNCT__ __FUNCT__272,14981
+PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *tol,PetscInt *maxits)NEPGetTolerances293,15447
+#undef __FUNCT____FUNCT__302,15691
+#define __FUNCT__ __FUNCT__303,15708
+PetscErrorCode NEPSetTolerances(NEP nep,PetscReal tol,PetscInt maxits)NEPSetTolerances326,16337
+#undef __FUNCT____FUNCT__349,17147
+#define __FUNCT__ __FUNCT__350,17164
+PetscErrorCode NEPGetDimensions(NEP nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)NEPGetDimensions372,17728
+#undef __FUNCT____FUNCT__382,17995
+#define __FUNCT__ __FUNCT__383,18012
+PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)NEPSetDimensions418,19282
+#undef __FUNCT____FUNCT__443,20219
+#define __FUNCT__ __FUNCT__444,20236
+PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)NEPSetWhichEigenpairs497,22512
+#undef __FUNCT____FUNCT__527,23332
+#define __FUNCT__ __FUNCT__528,23349
+PetscErrorCode NEPGetWhichEigenpairs(NEP nep,NEPWhich *which)NEPGetWhichEigenpairs548,23806
+#undef __FUNCT____FUNCT__557,24021
+#define __FUNCT__ __FUNCT__558,24038
+PetscErrorCode NEPSetEigenvalueComparison(NEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)NEPSetEigenvalueComparison590,25181
+#undef __FUNCT____FUNCT__600,25538
+#define __FUNCT__ __FUNCT__601,25555
+PetscErrorCode NEPSetConvergenceTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))NEPSetConvergenceTestFunction632,26735
+#undef __FUNCT____FUNCT__651,27465
+#define __FUNCT__ __FUNCT__652,27482
+PetscErrorCode NEPSetConvergenceTest(NEP nep,NEPConv conv)NEPSetConvergenceTest679,28460
+#undef __FUNCT____FUNCT__696,29056
+#define __FUNCT__ __FUNCT__697,29073
+PetscErrorCode NEPGetConvergenceTest(NEP nep,NEPConv *conv)NEPGetConvergenceTest714,29473
+#undef __FUNCT____FUNCT__723,29683
+#define __FUNCT__ __FUNCT__724,29700
+PetscErrorCode NEPSetStoppingTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))NEPSetStoppingTestFunction758,31046
+#undef __FUNCT____FUNCT__775,31645
+#define __FUNCT__ __FUNCT__776,31662
+PetscErrorCode NEPSetStoppingTest(NEP nep,NEPStop stop)NEPSetStoppingTest800,32401
+#undef __FUNCT____FUNCT__815,32855
+#define __FUNCT__ __FUNCT__816,32872
+PetscErrorCode NEPGetStoppingTest(NEP nep,NEPStop *stop)NEPGetStoppingTest833,33260
+#undef __FUNCT____FUNCT__842,33467
+#define __FUNCT__ __FUNCT__843,33484
+PetscErrorCode NEPSetTrackAll(NEP nep,PetscBool trackall)NEPSetTrackAll866,34218
+#undef __FUNCT____FUNCT__875,34455
+#define __FUNCT__ __FUNCT__876,34472
+PetscErrorCode NEPGetTrackAll(NEP nep,PetscBool *trackall)NEPGetTrackAll893,34794
+#undef __FUNCT____FUNCT__902,35015
+#define __FUNCT__ __FUNCT__903,35032
+PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,NEPRefineScheme scheme)NEPSetRefine952,37112
+#undef __FUNCT____FUNCT__991,38640
+#define __FUNCT__ __FUNCT__992,38657
+PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,NEPRefineScheme *scheme)NEPGetRefine1016,39262
+#undef __FUNCT____FUNCT__1028,39666
+#define __FUNCT__ __FUNCT__1029,39683
+PetscErrorCode NEPSetOptionsPrefix(NEP nep,const char *prefix)NEPSetOptionsPrefix1056,40436
+#undef __FUNCT____FUNCT__1072,41069
+#define __FUNCT__ __FUNCT__1073,41086
+PetscErrorCode NEPAppendOptionsPrefix(NEP nep,const char *prefix)NEPAppendOptionsPrefix1092,41645
+#undef __FUNCT____FUNCT__1108,42284
+#define __FUNCT__ __FUNCT__1109,42301
+PetscErrorCode NEPGetOptionsPrefix(NEP nep,const char *prefix[])NEPGetOptionsPrefix1130,42814
+

+src/nep/interface/neprefine.c,1837
 neprefine.c:^?neprefine.c^A,1
 #define NREF_MAXIT NREF_MAXIT27,1036
   PetscSubcomm  subc;subc30,1076
-  VecScatter    *scatter_id;scatter_id31,1098
-  Mat           *A;A32,1127
-  Vec           vg,v;vg33,1147
-  Vec           vg,v;v33,1147
-  FN            *fn;fn34,1169
-} NEPSimpNRefctx;NEPSimpNRefctx35,1190
-#undef __FUNCT____FUNCT__37,1209
-#define __FUNCT__ __FUNCT__38,1226
-static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)NEPSimpleNRefSetUp39,1265
-#undef __FUNCT____FUNCT__105,3878
-#define __FUNCT__ __FUNCT__106,3895
-PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)NEPSimpleNRefGatherEigenpair107,3944
-#undef __FUNCT____FUNCT__140,5251
-#define __FUNCT__ __FUNCT__141,5268
-PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)NEPSimpleNRefScatterEigenvector142,5320
-#undef __FUNCT____FUNCT__166,6183
-#define __FUNCT__ __FUNCT__167,6200
-static PetscErrorCode NEPSimpleNRefSetUpSystem(NEP nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)NEPSimpleNRefSetUpSystem168,6245
-#undef __FUNCT____FUNCT__274,10500
-#define __FUNCT__ __FUNCT__275,10517
-PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol,PetscInt k)NEPNewtonRefinementSimple276,10563
+  VecScatter    *scatter_id,nst;scatter_id31,1098
+  VecScatter    *scatter_id,nst;nst31,1098
+  Mat           *A;A32,1131
+  Vec           nv,vg,v,w;nv33,1151
+  Vec           nv,vg,v,w;vg33,1151
+  Vec           nv,vg,v,w;v33,1151
+  Vec           nv,vg,v,w;w33,1151
+  FN            *fn;fn34,1178
+} NEPSimpNRefctx;NEPSimpNRefctx35,1199
+  Mat          M1;M138,1235
+  Vec          M2,M3;M239,1254
+  Vec          M2,M3;M339,1254
+  PetscScalar  M4,m3;M440,1276
+  PetscScalar  M4,m3;m340,1276
+} FSubctx;FSubctx41,1298
+#undef __FUNCT____FUNCT__43,1310
+#define __FUNCT__ __FUNCT__44,1327
+static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)MatFSMult45,1357
+#undef __FUNCT____FUNCT__60,1742
+#define __FUNCT__ __FUNCT__61,1759
+static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)NEPSimpleNRefSetUp62,1798
+#undef __FUNCT____FUNCT__145,5112
+#define __FUNCT__ __FUNCT__146,5129
+static PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)NEPSimpleNRefGatherEigenpair147,5178
+#undef __FUNCT____FUNCT__188,6880
+#define __FUNCT__ __FUNCT__189,6897
+static PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)NEPSimpleNRefScatterEigenvector190,6949
+#undef __FUNCT____FUNCT__214,7819
+#define __FUNCT__ __FUNCT__215,7836
+static PetscErrorCode NEPSimpleNRefSetUpSystem(NEP nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)NEPSimpleNRefSetUpSystem216,7881
+#undef __FUNCT____FUNCT__391,14649
+#define __FUNCT__ __FUNCT__392,14666
+PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal tol,PetscInt k)NEPNewtonRefinementSimple393,14712
 

 src/nep/interface/nepregis.c,131
 nepregis.c:^?nepregis.c^A,1
-#undef __FUNCT____FUNCT__30,1238
-#define __FUNCT__ __FUNCT__31,1255
-PetscErrorCode NEPRegisterAll(void)NEPRegisterAll41,1430
+#undef __FUNCT____FUNCT__31,1289
+#define __FUNCT__ __FUNCT__32,1306
+PetscErrorCode NEPRegisterAll(void)NEPRegisterAll42,1481
 

-src/nep/interface/nepsetup.c,448
+src/nep/interface/nepsetup.c,652
 nepsetup.c:^?nepsetup.c^A,1
 #undef __FUNCT____FUNCT__26,1033
 #define __FUNCT__ __FUNCT__27,1050
 PetscErrorCode NEPSetUp(NEP nep)NEPSetUp46,1528
-#undef __FUNCT____FUNCT__176,6364
-#define __FUNCT__ __FUNCT__177,6381
-PetscErrorCode NEPSetInitialSpace(NEP nep,PetscInt n,Vec *is)NEPSetInitialSpace204,7293
-#undef __FUNCT____FUNCT__217,7755
-#define __FUNCT__ __FUNCT__218,7772
-PetscErrorCode NEPAllocateSolution(NEP nep,PetscInt extra)NEPAllocateSolution236,8263
+#undef __FUNCT____FUNCT__220,8799
+#define __FUNCT__ __FUNCT__221,8816
+PetscErrorCode NEPSetInitialSpace(NEP nep,PetscInt n,Vec *is)NEPSetInitialSpace248,9728
+#undef __FUNCT____FUNCT__261,10190
+#define __FUNCT__ __FUNCT__262,10207
+PetscErrorCode NEPSetDimensions_Default(NEP nep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)NEPSetDimensions_Default267,10374
+#undef __FUNCT____FUNCT__285,10970
+#define __FUNCT__ __FUNCT__286,10987
+PetscErrorCode NEPAllocateSolution(NEP nep,PetscInt extra)NEPAllocateSolution304,11478
 

 src/nep/interface/nepsolve.c,2449
 nepsolve.c:^?nepsolve.c^A,1
@@ -5867,92 +6606,92 @@ PetscErrorCode NEPComputeVectors(NEP nep)NEPComputeVectors29,1118
 #undef __FUNCT____FUNCT__48,1490
 #define __FUNCT__ __FUNCT__49,1507
 PetscErrorCode NEPSolve(NEP nep)NEPSolve70,2212
-#undef __FUNCT____FUNCT__120,3907
-#define __FUNCT__ __FUNCT__121,3924
-PetscErrorCode NEPProjectOperator(NEP nep,PetscInt j0,PetscInt j1)NEPProjectOperator146,4707
-#undef __FUNCT____FUNCT__166,5435
-#define __FUNCT__ __FUNCT__167,5452
-PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A,Mat B)NEPApplyFunction195,6292
-#undef __FUNCT____FUNCT__221,7119
-#define __FUNCT__ __FUNCT__222,7136
-PetscErrorCode NEPApplyJacobian(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)NEPApplyJacobian249,7931
-#undef __FUNCT____FUNCT__275,8752
-#define __FUNCT__ __FUNCT__276,8769
-PetscErrorCode NEPGetIterationNumber(NEP nep,PetscInt *its)NEPGetIterationNumber301,9533
-#undef __FUNCT____FUNCT__310,9743
-#define __FUNCT__ __FUNCT__311,9760
-PetscErrorCode NEPGetConverged(NEP nep,PetscInt *nconv)NEPGetConverged330,10150
-#undef __FUNCT____FUNCT__340,10387
-#define __FUNCT__ __FUNCT__341,10404
-PetscErrorCode NEPGetConvergedReason(NEP nep,NEPConvergedReason *reason)NEPGetConvergedReason371,11464
-#undef __FUNCT____FUNCT__381,11718
-#define __FUNCT__ __FUNCT__382,11735
-PetscErrorCode NEPGetEigenpair(NEP nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)NEPGetEigenpair417,13020
-#undef __FUNCT____FUNCT__464,14651
-#define __FUNCT__ __FUNCT__465,14668
-PetscErrorCode NEPGetErrorEstimate(NEP nep,PetscInt i,PetscReal *errest)NEPGetErrorEstimate487,15182
-#undef __FUNCT____FUNCT__498,15567
-#define __FUNCT__ __FUNCT__499,15584
-PetscErrorCode NEPComputeResidualNorm_Private(NEP nep,PetscScalar lambda,Vec x,Vec *w,PetscReal *norm)NEPComputeResidualNorm_Private509,15878
-#undef __FUNCT____FUNCT__521,16239
-#define __FUNCT__ __FUNCT__522,16256
-PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *error)NEPComputeError546,16882
-#undef __FUNCT____FUNCT__591,18172
-#define __FUNCT__ __FUNCT__592,18189
-PetscErrorCode NEPComputeFunction(NEP nep,PetscScalar lambda,Mat A,Mat B)NEPComputeFunction616,18781
-#undef __FUNCT____FUNCT__651,19803
-#define __FUNCT__ __FUNCT__652,19820
-PetscErrorCode NEPComputeJacobian(NEP nep,PetscScalar lambda,Mat A)NEPComputeJacobian674,20339
-

-src/nep/interface/nepview.c,2590
+#undef __FUNCT____FUNCT__119,3870
+#define __FUNCT__ __FUNCT__120,3887
+PetscErrorCode NEPProjectOperator(NEP nep,PetscInt j0,PetscInt j1)NEPProjectOperator145,4670
+#undef __FUNCT____FUNCT__166,5320
+#define __FUNCT__ __FUNCT__167,5337
+PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A,Mat B)NEPApplyFunction195,6215
+#undef __FUNCT____FUNCT__224,7178
+#define __FUNCT__ __FUNCT__225,7195
+PetscErrorCode NEPApplyJacobian(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)NEPApplyJacobian252,8028
+#undef __FUNCT____FUNCT__280,8933
+#define __FUNCT__ __FUNCT__281,8950
+PetscErrorCode NEPGetIterationNumber(NEP nep,PetscInt *its)NEPGetIterationNumber306,9714
+#undef __FUNCT____FUNCT__315,9924
+#define __FUNCT__ __FUNCT__316,9941
+PetscErrorCode NEPGetConverged(NEP nep,PetscInt *nconv)NEPGetConverged335,10331
+#undef __FUNCT____FUNCT__345,10568
+#define __FUNCT__ __FUNCT__346,10585
+PetscErrorCode NEPGetConvergedReason(NEP nep,NEPConvergedReason *reason)NEPGetConvergedReason373,11400
+#undef __FUNCT____FUNCT__383,11654
+#define __FUNCT__ __FUNCT__384,11671
+PetscErrorCode NEPGetEigenpair(NEP nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)NEPGetEigenpair419,12956
+#undef __FUNCT____FUNCT__466,14587
+#define __FUNCT__ __FUNCT__467,14604
+PetscErrorCode NEPGetErrorEstimate(NEP nep,PetscInt i,PetscReal *errest)NEPGetErrorEstimate489,15118
+#undef __FUNCT____FUNCT__500,15503
+#define __FUNCT__ __FUNCT__501,15520
+PetscErrorCode NEPComputeResidualNorm_Private(NEP nep,PetscScalar lambda,Vec x,Vec *w,PetscReal *norm)NEPComputeResidualNorm_Private511,15846
+#undef __FUNCT____FUNCT__524,16255
+#define __FUNCT__ __FUNCT__525,16272
+PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *error)NEPComputeError549,16898
+#undef __FUNCT____FUNCT__622,19254
+#define __FUNCT__ __FUNCT__623,19271
+PetscErrorCode NEPComputeFunction(NEP nep,PetscScalar lambda,Mat A,Mat B)NEPComputeFunction647,19863
+#undef __FUNCT____FUNCT__684,21327
+#define __FUNCT__ __FUNCT__685,21344
+PetscErrorCode NEPComputeJacobian(NEP nep,PetscScalar lambda,Mat A)NEPComputeJacobian707,21863
+

+src/nep/interface/nepview.c,2594
 nepview.c:^?nepview.c^A,1
 #undef __FUNCT____FUNCT__27,1058
 #define __FUNCT__ __FUNCT__28,1075
 PetscErrorCode NEPView(NEP nep,PetscViewer viewer)NEPView56,1872
-#undef __FUNCT____FUNCT__162,7278
-#define __FUNCT__ __FUNCT__163,7295
-PetscErrorCode NEPReasonView(NEP nep,PetscViewer viewer)NEPReasonView180,7750
-#undef __FUNCT____FUNCT__199,8747
-#define __FUNCT__ __FUNCT__200,8764
-PetscErrorCode NEPReasonViewFromOptions(NEP nep)NEPReasonViewFromOptions212,9052
-#undef __FUNCT____FUNCT__234,9783
-#define __FUNCT__ __FUNCT__235,9800
-static PetscErrorCode NEPErrorView_ASCII(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView_ASCII236,9839
-#undef __FUNCT____FUNCT__284,11649
-#define __FUNCT__ __FUNCT__285,11666
-static PetscErrorCode NEPErrorView_DETAIL(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView_DETAIL286,11706
-#define EXLEN EXLEN292,11894
-#undef __FUNCT____FUNCT__326,13065
-#define __FUNCT__ __FUNCT__327,13082
-static PetscErrorCode NEPErrorView_MATLAB(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView_MATLAB328,13122
-#undef __FUNCT____FUNCT__346,13734
-#define __FUNCT__ __FUNCT__347,13751
-PetscErrorCode NEPErrorView(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView373,14579
-#undef __FUNCT____FUNCT__406,15756
-#define __FUNCT__ __FUNCT__407,15773
-PetscErrorCode NEPErrorViewFromOptions(NEP nep)NEPErrorViewFromOptions419,16071
-#undef __FUNCT____FUNCT__448,17227
-#define __FUNCT__ __FUNCT__449,17244
-static PetscErrorCode NEPValuesView_DRAW(NEP nep,PetscViewer viewer)NEPValuesView_DRAW450,17283
-#undef __FUNCT____FUNCT__480,18268
-#define __FUNCT__ __FUNCT__481,18285
-static PetscErrorCode NEPValuesView_ASCII(NEP nep,PetscViewer viewer)NEPValuesView_ASCII482,18325
-#undef __FUNCT____FUNCT__511,19213
-#define __FUNCT__ __FUNCT__512,19230
-static PetscErrorCode NEPValuesView_MATLAB(NEP nep,PetscViewer viewer)NEPValuesView_MATLAB513,19271
-#undef __FUNCT____FUNCT__542,20146
-#define __FUNCT__ __FUNCT__543,20163
-PetscErrorCode NEPValuesView(NEP nep,PetscViewer viewer)NEPValuesView560,20540
-#undef __FUNCT____FUNCT__594,21795
-#define __FUNCT__ __FUNCT__595,21812
-PetscErrorCode NEPValuesViewFromOptions(NEP nep)NEPValuesViewFromOptions607,22101
-#undef __FUNCT____FUNCT__629,22827
-#define __FUNCT__ __FUNCT__630,22844
-PetscErrorCode NEPVectorsView(NEP nep,PetscViewer viewer)NEPVectorsView652,23421
-#define NMLEN NMLEN657,23546
-#undef __FUNCT____FUNCT__682,24424
-#define __FUNCT__ __FUNCT__683,24441
-PetscErrorCode NEPVectorsViewFromOptions(NEP nep)NEPVectorsViewFromOptions695,24733
+#undef __FUNCT____FUNCT__190,8510
+#define __FUNCT__ __FUNCT__191,8527
+PetscErrorCode NEPReasonView(NEP nep,PetscViewer viewer)NEPReasonView208,8982
+#undef __FUNCT____FUNCT__227,9979
+#define __FUNCT__ __FUNCT__228,9996
+PetscErrorCode NEPReasonViewFromOptions(NEP nep)NEPReasonViewFromOptions240,10284
+#undef __FUNCT____FUNCT__262,11015
+#define __FUNCT__ __FUNCT__263,11032
+static PetscErrorCode NEPErrorView_ASCII(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView_ASCII264,11071
+#undef __FUNCT____FUNCT__317,13134
+#define __FUNCT__ __FUNCT__318,13151
+static PetscErrorCode NEPErrorView_DETAIL(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView_DETAIL319,13191
+#define EXLEN EXLEN325,13379
+#undef __FUNCT____FUNCT__362,14659
+#define __FUNCT__ __FUNCT__363,14676
+static PetscErrorCode NEPErrorView_MATLAB(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView_MATLAB364,14716
+#undef __FUNCT____FUNCT__382,15328
+#define __FUNCT__ __FUNCT__383,15345
+PetscErrorCode NEPErrorView(NEP nep,NEPErrorType etype,PetscViewer viewer)NEPErrorView410,16238
+#undef __FUNCT____FUNCT__443,17415
+#define __FUNCT__ __FUNCT__444,17432
+PetscErrorCode NEPErrorViewFromOptions(NEP nep)NEPErrorViewFromOptions456,17730
+#undef __FUNCT____FUNCT__492,19296
+#define __FUNCT__ __FUNCT__493,19313
+static PetscErrorCode NEPValuesView_DRAW(NEP nep,PetscViewer viewer)NEPValuesView_DRAW494,19352
+#undef __FUNCT____FUNCT__525,20385
+#define __FUNCT__ __FUNCT__526,20402
+static PetscErrorCode NEPValuesView_ASCII(NEP nep,PetscViewer viewer)NEPValuesView_ASCII527,20442
+#undef __FUNCT____FUNCT__556,21330
+#define __FUNCT__ __FUNCT__557,21347
+static PetscErrorCode NEPValuesView_MATLAB(NEP nep,PetscViewer viewer)NEPValuesView_MATLAB558,21388
+#undef __FUNCT____FUNCT__587,22263
+#define __FUNCT__ __FUNCT__588,22280
+PetscErrorCode NEPValuesView(NEP nep,PetscViewer viewer)NEPValuesView605,22657
+#undef __FUNCT____FUNCT__639,23912
+#define __FUNCT__ __FUNCT__640,23929
+PetscErrorCode NEPValuesViewFromOptions(NEP nep)NEPValuesViewFromOptions652,24218
+#undef __FUNCT____FUNCT__674,24944
+#define __FUNCT__ __FUNCT__675,24961
+PetscErrorCode NEPVectorsView(NEP nep,PetscViewer viewer)NEPVectorsView697,25538
+#define NMLEN NMLEN702,25663
+#undef __FUNCT____FUNCT__727,26546
+#define __FUNCT__ __FUNCT__728,26563
+PetscErrorCode NEPVectorsViewFromOptions(NEP nep)NEPVectorsViewFromOptions740,26855
 

 src/nep/makefile,211
 makefile:^?makefile^A,1
@@ -5966,36 +6705,36 @@ makefile:^?makefile^A,1
 LOCDIR   = src/pep/examples/LOCDIR24,932
 DIRS     = tests tutorials nlevpDIRS25,961
 

-src/pep/examples/nlevp/acoustic_wave_1d.c,189
+src/pep/examples/nlevp/acoustic_wave_1d.c,216
 acoustic_wave_1d.c:^?acoustic_wave_1d.c^A,1
-static char help[] = "NLEVP problem: acoustic_wave_1d.\n\n"help35,1515
-#undef __FUNCT____FUNCT__42,1746
-#define __FUNCT__ __FUNCT__43,1763
-int main(int argc,char **argv)main44,1788
+static char help[] = "Quadratic eigenproblem from an acoustics application (1-D).\n\n"help35,1515
+#undef __FUNCT____FUNCT__42,1773
+#define __FUNCT__ __FUNCT__43,1790
+int main(int argc,char **argv)main44,1815
 

-src/pep/examples/nlevp/acoustic_wave_2d.c,189
+src/pep/examples/nlevp/acoustic_wave_2d.c,216
 acoustic_wave_2d.c:^?acoustic_wave_2d.c^A,1
-static char help[] = "NLEVP problem: acoustic_wave_2d.\n\n"help33,1387
-#undef __FUNCT____FUNCT__40,1639
-#define __FUNCT__ __FUNCT__41,1656
-int main(int argc,char **argv)main42,1681
+static char help[] = "Quadratic eigenproblem from an acoustics application (2-D).\n\n"help33,1387
+#undef __FUNCT____FUNCT__40,1666
+#define __FUNCT__ __FUNCT__41,1683
+int main(int argc,char **argv)main42,1708
 

-src/pep/examples/nlevp/butterfly.c,209
+src/pep/examples/nlevp/butterfly.c,238
 butterfly.c:^?butterfly.c^A,1
-static char help[] = "NLEVP problem: butterfly.\n\n"help32,1346
-#define NMAT NMAT39,1609
-#undef __FUNCT____FUNCT__41,1625
-#define __FUNCT__ __FUNCT__42,1642
-int main(int argc,char **argv)main43,1667
+static char help[] = "Quartic polynomial eigenproblem with T-even structure.\n\n"help32,1346
+#define NMAT NMAT39,1638
+#undef __FUNCT____FUNCT__41,1654
+#define __FUNCT__ __FUNCT__42,1671
+int main(int argc,char **argv)main43,1696
 

-src/pep/examples/nlevp/damped_beam.c,184
+src/pep/examples/nlevp/damped_beam.c,218
 damped_beam.c:^?damped_beam.c^A,1
-static char help[] = "NLEVP problem: damped_beam.\n\n"help33,1414
-#undef __FUNCT____FUNCT__39,1578
-#define __FUNCT__ __FUNCT__40,1595
-int main(int argc,char **argv)main41,1620
+static char help[] = "Quadratic eigenproblem from the vibrarion analysis of a beam.\n\n"help33,1414
+#undef __FUNCT____FUNCT__39,1612
+#define __FUNCT__ __FUNCT__40,1629
+int main(int argc,char **argv)main41,1654
 

-src/pep/examples/nlevp/makefile,701
+src/pep/examples/nlevp/makefile,629
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
@@ -6008,57 +6747,57 @@ MANSEC     = PEPMANSEC30,1176
 TESTS      = acoustic_wave_1d acoustic_wave_2d butterfly damped_beam \TESTS31,1193
 TESTEXAMPLES_C = acoustic_wave_1d.PETSc runacoustic_wave_1d_1 acoustic_wave_1d.rm \TESTEXAMPLES_C34,1325
 TESTEXAMPLES_C_COMPLEX = pdde_stability.PETSc runpdde_stability pdde_stability.rmTESTEXAMPLES_C_COMPLEX41,1808
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH78,2990
 

-src/pep/examples/nlevp/pdde_stability.c,416
+src/pep/examples/nlevp/pdde_stability.c,458
 pdde_stability.c:^?pdde_stability.c^A,1
-static char help[] = "NLEVP problem: pdde_stability.\n\n"help34,1455
-#define NMAT NMAT41,1718
-#undef __FUNCT____FUNCT__43,1734
-#define __FUNCT__ __FUNCT__44,1751
-PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort52,2076
-#undef __FUNCT____FUNCT__63,2408
-#define __FUNCT__ __FUNCT__64,2425
-int main(int argc,char **argv)main65,2450
-

-src/pep/examples/nlevp/planar_waveguide.c,239
+static char help[] = "Stability analysis of a discretized partial delay-differential equation.\n\n"help34,1455
+#define NMAT NMAT41,1760
+#undef __FUNCT____FUNCT__43,1776
+#define __FUNCT__ __FUNCT__44,1793
+PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)MyEigenSort52,2118
+#undef __FUNCT____FUNCT__63,2450
+#define __FUNCT__ __FUNCT__64,2467
+int main(int argc,char **argv)main65,2492
+

+src/pep/examples/nlevp/planar_waveguide.c,281
 planar_waveguide.c:^?planar_waveguide.c^A,1
-static char help[] = "NLEVP problem: planar_waveguide.\n\n"help34,1462
-#define NMAT NMAT40,1632
-#define NL NL41,1647
-#undef __FUNCT____FUNCT__43,1663
-#define __FUNCT__ __FUNCT__44,1680
-int main(int argc,char **argv)main45,1705
-

-src/pep/examples/nlevp/sleeper.c,180
+static char help[] = "FEM solution of the propagation constants in a six-layer planar waveguide.\n\n"help34,1462
+#define NMAT NMAT40,1674
+#define NL NL41,1689
+#undef __FUNCT____FUNCT__43,1705
+#define __FUNCT__ __FUNCT__44,1722
+int main(int argc,char **argv)main45,1747
+

+src/pep/examples/nlevp/sleeper.c,206
 sleeper.c:^?sleeper.c^A,1
-static char help[] = "NLEVP problem: sleeper.\n\n"help33,1403
-#undef __FUNCT____FUNCT__39,1572
-#define __FUNCT__ __FUNCT__40,1589
-int main(int argc,char **argv)main41,1614
+static char help[] = "Oscillations of a rail track resting on sleepers.\n\n"help33,1403
+#undef __FUNCT____FUNCT__39,1598
+#define __FUNCT__ __FUNCT__40,1615
+int main(int argc,char **argv)main41,1640
 

-src/pep/examples/nlevp/spring.c,179
+src/pep/examples/nlevp/spring.c,198
 spring.c:^?spring.c^A,1
-static char help[] = "NLEVP problem: spring.\n\n"help36,1651
-#undef __FUNCT____FUNCT__45,1995
-#define __FUNCT__ __FUNCT__46,2012
-int main(int argc,char **argv)main47,2037
+static char help[] = "FEM model of a damped mass-spring system.\n\n"help36,1651
+#undef __FUNCT____FUNCT__45,2014
+#define __FUNCT__ __FUNCT__46,2031
+int main(int argc,char **argv)main47,2056
 

-src/pep/examples/tests/makefile,487
+src/pep/examples/tests/makefile,606
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/pep/examples/tests/LOCDIR26,978
-EXAMPLESC  = test1.c test2.cEXAMPLESC27,1015
-EXAMPLESF  =EXAMPLESF28,1044
-MANSEC     = PEPMANSEC29,1057
-TESTS      = test1 test2TESTS30,1074
-TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \TESTEXAMPLES_C32,1100
-PEP = toar qarnoldiPEP46,1532
-EPS = krylovschur gdEPS47,1552
-TESTCODE = \TESTCODE49,1574
+EXAMPLESC  = test1.c test2.c test3.cEXAMPLESC27,1015
+EXAMPLESF  = test3f.FEXAMPLESF28,1052
+MANSEC     = PEPMANSEC29,1074
+TESTS      = test1 test2 test3 test3fTESTS30,1091
+TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \TESTEXAMPLES_C32,1130
+TESTEXAMPLES_FORTRAN = test3f.PETSc runtest3f_1 test3f.rm \TESTEXAMPLES_FORTRAN35,1332
+PEP = toar qarnoldiPEP56,1878
+EPS = krylovschur gdEPS57,1898
+TESTCODE = \TESTCODE59,1920
 

 src/pep/examples/tests/test1.c,235
 test1.c:^?test1.c^A,1
@@ -6070,28 +6809,54 @@ int main(int argc,char **argv)main33,1386
 src/pep/examples/tests/test2.c,211
 test2.c:^?test2.c^A,1
 static char help[] = "Test the solution of a PEP from a finite element model of "help32,1387
-#undef __FUNCT____FUNCT__41,1761
-#define __FUNCT__ __FUNCT__42,1778
-int main(int argc,char **argv)main43,1803
+#undef __FUNCT____FUNCT__41,1762
+#define __FUNCT__ __FUNCT__42,1779
+int main(int argc,char **argv)main43,1804
 

-src/pep/examples/tutorials/ex16.c,206
+src/pep/examples/tests/test3.c,186
+test3.c:^?test3.c^A,1
+static char help[] = "Test PEP interface functions.\n\n";help22,924
+#undef __FUNCT____FUNCT__26,1006
+#define __FUNCT__ __FUNCT__27,1023
+int main(int argc,char **argv)main28,1048
+

+src/pep/examples/tests/test3f.F,1012
+test3f.F:^?test3f.F^A,1
+      program mainmain24,1075
+ 100  format (/'Diagonal Quadratic Eigenproblem, n =',I3,' (Fortran)')10072,2633
+ 110  format (' Polynomial of degree ',I2)110121,4534
+ 120  format (' Type set to ',A)120131,4821
+ 130  format (' Problem type before changing = ',I2)130137,4967
+ 140  format (' ... changed to ',I2)140143,5185
+ 150  format (' Extraction before changing = ',I2)150149,5329
+ 160  format (' ... changed to ',I2)160155,5544
+ 170  format (' Scaling: ',I2,', alpha=',F6.4,', its=',I2)170168,6001
+ 180  format (' Polynomial basis: ',I2)180176,6241
+ 190  format (' Refinement: ',I2,', tol=',F6.4,', its=',I2', schem=',I2)190188,6604
+ 200  format (' Which = ',I2,', target = ',F3.1)200198,6973
+ 210  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)210207,7290
+ 220  format (' Tolerance =',F7.5,', max_its =',I4)220216,7549
+ 230  format (' Convergence test =',I2,', stopping test =',I2)230225,7875
+ 240  format (' Finished - converged reason =',I2,', its=',I4)240254,9103
+

+src/pep/examples/tutorials/ex16.c,192
 ex16.c:^?ex16.c^A,1
-static char help[] = "Quadratic eigenproblem for testing the PEP object.\n\n"help22,924
-#undef __FUNCT____FUNCT__29,1209
-#define __FUNCT__ __FUNCT__30,1226
-int main(int argc,char **argv)main31,1251
+static char help[] = "Simple quadratic eigenvalue problem.\n\n"help22,924
+#undef __FUNCT____FUNCT__29,1195
+#define __FUNCT__ __FUNCT__30,1212
+int main(int argc,char **argv)main31,1237
 

 src/pep/examples/tutorials/ex16f90.F90,415
 ex16f90.F90:^?ex16f90.F90^A,1
-      program mainmain31,1395
-      type(MaM53,1997
-      type(Mat)      M, C,C53,1997
-      type(Mat)      M, C, K,K53,1997
-      type(Mat)      M, C, K, A(A53,1997
-      type(PEP)      peppep54,2032
- 100  format (/'Quadratic Eigenproblem, N=',I6,' (',I4,'x',I4,' grid)')10083,2944
- 120  format (' Solution method: ',A)120167,5947
- 130  format (' Number of requested eigenvalues:',I4)130173,6177
+      program mainmain31,1400
+      type(MaM53,2002
+      type(Mat)      M, C,C53,2002
+      type(Mat)      M, C, K,K53,2002
+      type(Mat)      M, C, K, A(A53,2002
+      type(PEP)      peppep54,2037
+ 100  format (/'Quadratic Eigenproblem, N=',I6,' (',I4,'x',I4,' grid)')10085,3060
+ 120  format (' Solution method: ',A)120182,6499
+ 130  format (' Number of requested eigenvalues:',I4)130188,6729
 

 src/pep/examples/tutorials/ex17.c,275
 ex17.c:^?ex17.c^A,1
@@ -6101,20 +6866,46 @@ static char help[] = "Solves a polynomial eigenproblem P(l)x = 0 with matrices l
 #define __FUNCT__ __FUNCT__31,1239
 int main(int argc,char **argv)main32,1264
 

-src/pep/examples/tutorials/makefile,617
+src/pep/examples/tutorials/ex28.c,1216
+ex28.c:^?ex28.c^A,1
+static char help[] = "A quadratic eigenproblem defined using shell matrices.\n\n"help22,924
+#undef __FUNCT____FUNCT__38,1502
+#define __FUNCT__ __FUNCT__39,1519
+int main(int argc,char **argv)main40,1544
+static void tv(int nx,const PetscScalar *x,PetscScalar *y)tv147,6186
+#undef __FUNCT____FUNCT__162,6467
+#define __FUNCT__ __FUNCT__163,6484
+PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)MatMult_Laplacian2D180,7004
+#undef __FUNCT____FUNCT__212,7801
+#define __FUNCT__ __FUNCT__213,7818
+PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)MatGetDiagonal_Laplacian2D214,7865
+#undef __FUNCT____FUNCT__223,8045
+#define __FUNCT__ __FUNCT__224,8062
+PetscErrorCode MatMult_Zero(Mat A,Vec x,Vec y)MatMult_Zero228,8160
+#undef __FUNCT____FUNCT__237,8326
+#define __FUNCT__ __FUNCT__238,8343
+PetscErrorCode MatGetDiagonal_Zero(Mat A,Vec diag)MatGetDiagonal_Zero239,8383
+#undef __FUNCT____FUNCT__248,8556
+#define __FUNCT__ __FUNCT__249,8573
+PetscErrorCode MatMult_Identity(Mat A,Vec x,Vec y)MatMult_Identity253,8679
+#undef __FUNCT____FUNCT__262,8851
+#define __FUNCT__ __FUNCT__263,8868
+PetscErrorCode MatGetDiagonal_Identity(Mat A,Vec diag)MatGetDiagonal_Identity264,8912
+

+src/pep/examples/tutorials/makefile,626
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/pep/examples/tutorials/LOCDIR26,978
-EXAMPLESC  = ex16.c ex17.cEXAMPLESC27,1019
-EXAMPLESF  = ex16f90.F90EXAMPLESF28,1046
-MANSEC     = PEPMANSEC29,1071
-TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rmTESTEXAMPLES_C31,1089
-TESTEXAMPLES_C_NOCOMPLEX = ex17.PETSc runex17_1 ex17.rmTESTEXAMPLES_C_NOCOMPLEX32,1145
-TESTEXAMPLES_F90         = ex16f90.PETSc runex16f90_1 ex16f90.rmTESTEXAMPLES_F9033,1201
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH50,1661
+EXAMPLESC  = ex16.c ex17.c ex28.cEXAMPLESC27,1019
+EXAMPLESF  = ex16f90.F90EXAMPLESF28,1053
+MANSEC     = PEPMANSEC29,1078
+TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm \TESTEXAMPLES_C31,1096
+TESTEXAMPLES_C_NOCOMPLEX = ex17.PETSc runex17_1 ex17.rmTESTEXAMPLES_C_NOCOMPLEX33,1210
+TESTEXAMPLES_F90         = ex16f90.PETSc runex16f90_1 ex16f90.rmTESTEXAMPLES_F9034,1266
+DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matricesDATAPATH55,1807
 

 src/pep/f90-mod/makefile,397
 makefile:^?makefile^A,1
@@ -6147,89 +6938,119 @@ DIRS     =DIRS30,1036
 MANSEC   = PEPMANSEC31,1047
 LOCDIR   = src/pep/impls/jd/LOCDIR32,1062
 

-src/pep/impls/jd/pjd.c,1331
+src/pep/impls/jd/pjd.c,3213
 pjd.c:^?pjd.c^A,1
-#undef __FUNCT____FUNCT__47,1712
-#define __FUNCT__ __FUNCT__48,1729
-PetscErrorCode PEPSetUp_JD(PEP pep)PEPSetUp_JD49,1761
-#undef __FUNCT____FUNCT__88,3455
-#define __FUNCT__ __FUNCT__89,3472
-static PetscErrorCode PEPJDPurgeDuplicates(PEP pep)PEPJDPurgeDuplicates93,3554
-#undef __FUNCT____FUNCT__110,3996
-#define __FUNCT__ __FUNCT__111,4013
-static PetscErrorCode PEPJDDiffMatMult(PEP pep,PetscScalar theta,Vec x,Vec y,Vec w)PEPJDDiffMatMult116,4160
-#undef __FUNCT____FUNCT__132,4565
-#define __FUNCT__ __FUNCT__133,4582
-static PetscErrorCode PCShellApply_PEPJD(PC pc,Vec x,Vec y)PCShellApply_PEPJD138,4722
-#undef __FUNCT____FUNCT__159,5215
-#define __FUNCT__ __FUNCT__160,5232
-PetscErrorCode PEPSolve_JD(PEP pep)PEPSolve_JD161,5264
-#undef __FUNCT____FUNCT__304,11257
-#define __FUNCT__ __FUNCT__305,11274
-PetscErrorCode PEPComputeVectors_JD(PEP pep)PEPComputeVectors_JD306,11315
-#undef __FUNCT____FUNCT__336,12439
-#define __FUNCT__ __FUNCT__337,12456
-PetscErrorCode PEPReset_JD(PEP pep)PEPReset_JD338,12488
-#undef __FUNCT____FUNCT__352,12787
-#define __FUNCT__ __FUNCT__353,12804
-PetscErrorCode PEPDestroy_JD(PEP pep)PEPDestroy_JD354,12838
-#undef __FUNCT____FUNCT__367,13380
-#define __FUNCT__ __FUNCT__368,13397
-PETSC_EXTERN PetscErrorCode PEPCreate_JD(PEP pep)PEPCreate_JD369,13430
-

-src/pep/impls/jd/pjdopt.c,1729
+#undef __FUNCT____FUNCT__47,1707
+#define __FUNCT__ __FUNCT__48,1724
+static PetscErrorCode PEPJDDuplicateBasis(PEP pep,BV *basis)PEPJDDuplicateBasis52,1810
+#undef __FUNCT____FUNCT__82,2980
+#define __FUNCT__ __FUNCT__83,2997
+PetscErrorCode PEPSetUp_JD(PEP pep)PEPSetUp_JD84,3029
+#undef __FUNCT____FUNCT__131,5109
+#define __FUNCT__ __FUNCT__132,5126
+static PetscErrorCode PEPJDUpdateTV(PEP pep,PetscInt low,PetscInt high,Vec *w)PEPJDUpdateTV136,5212
+#undef __FUNCT____FUNCT__201,8160
+#define __FUNCT__ __FUNCT__202,8177
+static PetscErrorCode PEPJDOrthogonalize(PetscInt row,PetscInt col,PetscScalar *X,PetscInt ldx,PetscInt *rk,PetscInt *P,PetscScalar *R,PetscInt ldr)PEPJDOrthogonalize206,8265
+#undef __FUNCT____FUNCT__261,10213
+#define __FUNCT__ __FUNCT__262,10230
+static PetscErrorCode PEPJDExtendedPCApply(PC pc,Vec x,Vec y)PEPJDExtendedPCApply266,10319
+#undef __FUNCT____FUNCT__323,12379
+#define __FUNCT__ __FUNCT__324,12396
+static PetscErrorCode PCShellApply_PEPJD(PC pc,Vec x,Vec y)PCShellApply_PEPJD329,12536
+#undef __FUNCT____FUNCT__350,13043
+#define __FUNCT__ __FUNCT__351,13060
+static PetscErrorCode PEPJDCopyToExtendedVec(PEP pep,Vec v,PetscScalar *a,PetscInt na,PetscInt off,Vec vex,PetscBool back)PEPJDCopyToExtendedVec352,13103
+#undef __FUNCT____FUNCT__392,14556
+#define __FUNCT__ __FUNCT__393,14573
+static PetscErrorCode PEPJDComputePResidual(PEP pep,Vec u,PetscScalar theta,Vec p,Vec *work)PEPJDComputePResidual394,14615
+#undef __FUNCT____FUNCT__468,17702
+#define __FUNCT__ __FUNCT__469,17719
+static PetscErrorCode PEPJDProcessInitialSpace(PEP pep,Vec *w)PEPJDProcessInitialSpace470,17764
+#undef __FUNCT____FUNCT__504,19084
+#define __FUNCT__ __FUNCT__505,19101
+static PetscErrorCode PEPJDShellMatMult(Mat P,Vec x,Vec y)PEPJDShellMatMult506,19139
+#undef __FUNCT____FUNCT__583,22255
+#define __FUNCT__ __FUNCT__584,22272
+static PetscErrorCode PEPJDCreateShellPC(PEP pep)PEPJDCreateShellPC585,22311
+#undef __FUNCT____FUNCT__628,24258
+#define __FUNCT__ __FUNCT__629,24275
+static PetscErrorCode PEPJDUpdateExtendedPC(PEP pep,PetscScalar theta)PEPJDUpdateExtendedPC630,24317
+#undef __FUNCT____FUNCT__697,27180
+#define __FUNCT__ __FUNCT__698,27197
+static PetscErrorCode PEPJDPCMatSetUp(PEP pep,PetscScalar theta)PEPJDPCMatSetUp699,27233
+#undef __FUNCT____FUNCT__725,28075
+#define __FUNCT__ __FUNCT__726,28092
+static PetscErrorCode PEPJDEigenvectors(PEP pep)PEPJDEigenvectors727,28130
+#undef __FUNCT____FUNCT__763,29525
+#define __FUNCT__ __FUNCT__764,29542
+PetscErrorCode PEPJDLockConverged(PEP pep,PetscInt *nv,Vec u,Vec *ww)PEPJDLockConverged765,29581
+#undef __FUNCT____FUNCT__847,33381
+#define __FUNCT__ __FUNCT__848,33398
+PetscErrorCode PEPSolve_JD(PEP pep)PEPSolve_JD849,33430
+#undef __FUNCT____FUNCT__1034,41561
+#define __FUNCT__ __FUNCT__1035,41578
+PetscErrorCode PEPReset_JD(PEP pep)PEPReset_JD1036,41610
+#undef __FUNCT____FUNCT__1059,42226
+#define __FUNCT__ __FUNCT__1060,42243
+PetscErrorCode PEPDestroy_JD(PEP pep)PEPDestroy_JD1061,42277
+#undef __FUNCT____FUNCT__1072,42625
+#define __FUNCT__ __FUNCT__1073,42642
+PETSC_EXTERN PetscErrorCode PEPCreate_JD(PEP pep)PEPCreate_JD1074,42675
+

+src/pep/impls/jd/pjdopt.c,953
 pjdopt.c:^?pjdopt.c^A,1
 #undef __FUNCT____FUNCT__27,1039
 #define __FUNCT__ __FUNCT__28,1056
-PetscErrorCode PEPJDSetTolerances_JD(PEP pep,PetscReal mtol,PetscReal htol,PetscReal stol)PEPJDSetTolerances_JD29,1098
-#undef __FUNCT____FUNCT__52,1891
-#define __FUNCT__ __FUNCT__53,1908
-PetscErrorCode PEPJDSetTolerances(PEP pep,PetscReal mtol,PetscReal htol,PetscReal stol)PEPJDSetTolerances75,2489
-#undef __FUNCT____FUNCT__88,2966
-#define __FUNCT__ __FUNCT__89,2983
-PetscErrorCode PEPJDGetTolerances_JD(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)PEPJDGetTolerances_JD90,3025
-#undef __FUNCT____FUNCT__101,3272
-#define __FUNCT__ __FUNCT__102,3289
-PetscErrorCode PEPJDGetTolerances(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)PEPJDGetTolerances120,3670
-#undef __FUNCT____FUNCT__133,4099
-#define __FUNCT__ __FUNCT__134,4116
-PetscErrorCode PEPJDSetRestart_JD(PEP pep,PetscReal keep)PEPJDSetRestart_JD135,4155
-#undef __FUNCT____FUNCT__148,4532
-#define __FUNCT__ __FUNCT__149,4549
-PetscErrorCode PEPJDSetRestart(PEP pep,PetscReal keep)PEPJDSetRestart171,5108
-#undef __FUNCT____FUNCT__182,5425
-#define __FUNCT__ __FUNCT__183,5442
-PetscErrorCode PEPJDGetRestart_JD(PEP pep,PetscReal *keep)PEPJDGetRestart_JD184,5481
-#undef __FUNCT____FUNCT__193,5651
-#define __FUNCT__ __FUNCT__194,5668
-PetscErrorCode PEPJDGetRestart(PEP pep,PetscReal *keep)PEPJDGetRestart210,5980
-#undef __FUNCT____FUNCT__221,6281
-#define __FUNCT__ __FUNCT__222,6298
-PetscErrorCode PEPSetFromOptions_JD(PetscOptions *PetscOptionsObject,PEP pep)PEPSetFromOptions_JD223,6339
-#undef __FUNCT____FUNCT__250,7430
-#define __FUNCT__ __FUNCT__251,7447
-PetscErrorCode PEPView_JD(PEP pep,PetscViewer viewer)PEPView_JD252,7478
-

-src/pep/impls/jd/pjdp.h,1284
+PetscErrorCode PEPJDSetRestart_JD(PEP pep,PetscReal keep)PEPJDSetRestart_JD29,1095
+#undef __FUNCT____FUNCT__42,1472
+#define __FUNCT__ __FUNCT__43,1489
+PetscErrorCode PEPJDSetRestart(PEP pep,PetscReal keep)PEPJDSetRestart65,2048
+#undef __FUNCT____FUNCT__76,2365
+#define __FUNCT__ __FUNCT__77,2382
+PetscErrorCode PEPJDGetRestart_JD(PEP pep,PetscReal *keep)PEPJDGetRestart_JD78,2421
+#undef __FUNCT____FUNCT__87,2591
+#define __FUNCT__ __FUNCT__88,2608
+PetscErrorCode PEPJDGetRestart(PEP pep,PetscReal *keep)PEPJDGetRestart104,2920
+#undef __FUNCT____FUNCT__115,3221
+#define __FUNCT__ __FUNCT__116,3238
+PetscErrorCode PEPSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,PEP pep)PEPSetFromOptions_JD117,3279
+#undef __FUNCT____FUNCT__133,3803
+#define __FUNCT__ __FUNCT__134,3820
+PetscErrorCode PEPView_JD(PEP pep,PetscViewer viewer)PEPView_JD135,3851
+

+src/pep/impls/jd/pjdp.h,1825
 pjdp.h:^?pjdp.h^A,1
 #define __PJDP_H__PJDP_H25,977
   PetscReal   keep;          /* restart parameter */keep28,1012
-  PetscReal   mtol;          /* tolerance for eigenvalue multiplicity */mtol29,1065
-  PetscReal   htol;          /* tolerance for harmonic JD */htol30,1138
-  PetscReal   stol;          /* tolerance for harmonic shift */stol31,1199
-  PetscInt    fnini;         /* first initial search space */fnini32,1263
-  PetscBool   randini;       /* use random initial search space */randini33,1325
-  PetscBool   custpc;        /* use custom correction equation preconditioner */custpc34,1392
-  PetscBool   flglk;         /* whether in locking step */flglk35,1473
-  PetscBool   flgre;         /* whether in restarting step */flgre36,1532
-  BV          *W;            /* work basis vectors to store A_i*V */W37,1594
-  PC          pcshell;       /* preconditioner including basic precond+projector */pcshell38,1663
-} PEP_JD;PEP_JD39,1747
-  PC          pc;            /* basic preconditioner */pc42,1775
-  Vec         Bp;            /* preconditioned residual of derivative polynomial, B\p */Bp43,1831
-  Vec         u;             /* Ritz vector */u44,1920
-  PetscScalar gamma;         /* precomputed scalar u'*B\p */gamma45,1967
-} PEP_JD_PCSHELL;PEP_JD_PCSHELL46,2028
+  BV          V;             /* work basis vectors to store the search space */V29,1065
+  BV          W;             /* work basis vectors to store the test space */W30,1145
+  BV          *TV;           /* work basis vectors to store T*V (each TV[i] is the coefficient for \lambda^i of T*V for the extended T) */TV31,1223
+  BV          *AX;           /* work basis vectors to store A_i*X for locked eigenvectors */AX32,1362
+  BV          X;             /* locked eigenvectors */X33,1455
+  PetscScalar *T;            /* matrix of the invariant pair */T34,1510
+  PetscScalar *Tj;           /* matrix containing the powers of the invariant pair matrix */Tj35,1574
+  PetscScalar *XpX;          /* X^H*X */XpX36,1667
+  PC          pcshell;       /* preconditioner including basic precond+projector */pcshell37,1708
+  Mat         Pshell;        /* auxiliary shell matrix */Pshell38,1792
+  PetscInt    nconv;         /* number of locked vectors in the invariant pair */nconv39,1850
+} PEP_JD;PEP_JD40,1932
+  PC          pc;            /* basic preconditioner */pc43,1960
+  Vec         Bp;            /* preconditioned residual of derivative polynomial, B\p */Bp44,2016
+  Vec         u;             /* Ritz vector */u45,2105
+  PetscScalar gamma;         /* precomputed scalar u'*B\p */gamma46,2152
+  PetscScalar *M;M47,2213
+  PetscScalar *ps;ps48,2231
+  PetscInt    ld;ld49,2250
+  Vec         *work;work50,2268
+  BV          X;X51,2289
+  PetscInt    n;n52,2306
+} PEP_JD_PCSHELL;PEP_JD_PCSHELL53,2323
+  Mat         P;             /*  */P56,2359
+  PEP         pep;pep57,2395
+  Vec         *work;work58,2414
+  PetscScalar theta;theta59,2435
+} PEP_JD_MATSHELL;PEP_JD_MATSHELL60,2456
 

 src/pep/impls/krylov/makefile,313
 makefile:^?makefile^A,1
@@ -6277,7 +7098,7 @@ DIRS     =DIRS30,1025
 MANSEC   = PEPMANSEC31,1036
 LOCDIR   = src/pep/impls/krylov/qarnoldi/LOCDIR32,1051
 

-src/pep/impls/krylov/qarnoldi/qarnoldi.c,3278
+src/pep/impls/krylov/qarnoldi/qarnoldi.c,3282
 qarnoldi.c:^?qarnoldi.c^A,1
   PetscReal keep;         /* restart parameter */keep41,1370
   PetscBool lock;         /* locking/non-locking variant */lock42,1420
@@ -6285,54 +7106,54 @@ qarnoldi.c:^?qarnoldi.c^A,1
 #undef __FUNCT____FUNCT__45,1497
 #define __FUNCT__ __FUNCT__46,1514
 PetscErrorCode PEPSetUp_QArnoldi(PEP pep)PEPSetUp_QArnoldi47,1552
-#undef __FUNCT____FUNCT__98,3701
-#define __FUNCT__ __FUNCT__99,3718
-PetscErrorCode PEPExtractVectors_QArnoldi(PEP pep)PEPExtractVectors_QArnoldi100,3765
-#undef __FUNCT____FUNCT__128,4778
-#define __FUNCT__ __FUNCT__129,4795
-static PetscErrorCode PEPQArnoldiCGS(PEP pep,PetscScalar *H,PetscBLASInt ldh,PetscScalar *h,PetscBLASInt j,BV V,Vec t,Vec v,Vec w,PetscReal *onorm,PetscReal *norm,PetscScalar *work)PEPQArnoldiCGS133,4897
-#undef __FUNCT____FUNCT__173,6214
-#define __FUNCT__ __FUNCT__174,6231
-static PetscErrorCode PEPQArnoldi(PEP pep,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,Vec v,Vec w,PetscReal *beta,PetscBool *breakdown,PetscScalar *work)PEPQArnoldi178,6309
-#undef __FUNCT____FUNCT__251,9076
-#define __FUNCT__ __FUNCT__252,9093
-PetscErrorCode PEPSolve_QArnoldi(PEP pep)PEPSolve_QArnoldi253,9131
-#undef __FUNCT____FUNCT__352,13099
-#define __FUNCT__ __FUNCT__353,13116
-static PetscErrorCode PEPQArnoldiSetRestart_QArnoldi(PEP pep,PetscReal keep)PEPQArnoldiSetRestart_QArnoldi354,13167
-#undef __FUNCT____FUNCT__367,13575
-#define __FUNCT__ __FUNCT__368,13592
-PetscErrorCode PEPQArnoldiSetRestart(PEP pep,PetscReal keep)PEPQArnoldiSetRestart390,14169
-#undef __FUNCT____FUNCT__401,14498
-#define __FUNCT__ __FUNCT__402,14515
-static PetscErrorCode PEPQArnoldiGetRestart_QArnoldi(PEP pep,PetscReal *keep)PEPQArnoldiGetRestart_QArnoldi403,14566
-#undef __FUNCT____FUNCT__412,14767
-#define __FUNCT__ __FUNCT__413,14784
-PetscErrorCode PEPQArnoldiGetRestart(PEP pep,PetscReal *keep)PEPQArnoldiGetRestart429,15108
-#undef __FUNCT____FUNCT__440,15421
-#define __FUNCT__ __FUNCT__441,15438
-static PetscErrorCode PEPQArnoldiSetLocking_QArnoldi(PEP pep,PetscBool lock)PEPQArnoldiSetLocking_QArnoldi442,15489
-#undef __FUNCT____FUNCT__451,15688
-#define __FUNCT__ __FUNCT__452,15705
-PetscErrorCode PEPQArnoldiSetLocking(PEP pep,PetscBool lock)PEPQArnoldiSetLocking478,16471
-#undef __FUNCT____FUNCT__489,16800
-#define __FUNCT__ __FUNCT__490,16817
-static PetscErrorCode PEPQArnoldiGetLocking_QArnoldi(PEP pep,PetscBool *lock)PEPQArnoldiGetLocking_QArnoldi491,16868
-#undef __FUNCT____FUNCT__500,17069
-#define __FUNCT__ __FUNCT__501,17086
-PetscErrorCode PEPQArnoldiGetLocking(PEP pep,PetscBool *lock)PEPQArnoldiGetLocking517,17400
-#undef __FUNCT____FUNCT__528,17713
-#define __FUNCT__ __FUNCT__529,17730
-PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptions *PetscOptionsObject,PEP pep)PEPSetFromOptions_QArnoldi530,17777
-#undef __FUNCT____FUNCT__550,18577
-#define __FUNCT__ __FUNCT__551,18594
-PetscErrorCode PEPView_QArnoldi(PEP pep,PetscViewer viewer)PEPView_QArnoldi552,18631
-#undef __FUNCT____FUNCT__567,19217
-#define __FUNCT__ __FUNCT__568,19234
-PetscErrorCode PEPDestroy_QArnoldi(PEP pep)PEPDestroy_QArnoldi569,19274
-#undef __FUNCT____FUNCT__582,19840
-#define __FUNCT__ __FUNCT__583,19857
-PETSC_EXTERN PetscErrorCode PEPCreate_QArnoldi(PEP pep)PEPCreate_QArnoldi584,19896
+#undef __FUNCT____FUNCT__98,3681
+#define __FUNCT__ __FUNCT__99,3698
+PetscErrorCode PEPExtractVectors_QArnoldi(PEP pep)PEPExtractVectors_QArnoldi100,3745
+#undef __FUNCT____FUNCT__128,4758
+#define __FUNCT__ __FUNCT__129,4775
+static PetscErrorCode PEPQArnoldiCGS(PEP pep,PetscScalar *H,PetscBLASInt ldh,PetscScalar *h,PetscBLASInt j,BV V,Vec t,Vec v,Vec w,PetscReal *onorm,PetscReal *norm,PetscScalar *work)PEPQArnoldiCGS133,4877
+#undef __FUNCT____FUNCT__173,6194
+#define __FUNCT__ __FUNCT__174,6211
+static PetscErrorCode PEPQArnoldi(PEP pep,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,Vec v,Vec w,PetscReal *beta,PetscBool *breakdown,PetscScalar *work)PEPQArnoldi178,6289
+#undef __FUNCT____FUNCT__251,9060
+#define __FUNCT__ __FUNCT__252,9077
+PetscErrorCode PEPSolve_QArnoldi(PEP pep)PEPSolve_QArnoldi253,9115
+#undef __FUNCT____FUNCT__351,13069
+#define __FUNCT__ __FUNCT__352,13086
+static PetscErrorCode PEPQArnoldiSetRestart_QArnoldi(PEP pep,PetscReal keep)PEPQArnoldiSetRestart_QArnoldi353,13137
+#undef __FUNCT____FUNCT__366,13545
+#define __FUNCT__ __FUNCT__367,13562
+PetscErrorCode PEPQArnoldiSetRestart(PEP pep,PetscReal keep)PEPQArnoldiSetRestart389,14139
+#undef __FUNCT____FUNCT__400,14468
+#define __FUNCT__ __FUNCT__401,14485
+static PetscErrorCode PEPQArnoldiGetRestart_QArnoldi(PEP pep,PetscReal *keep)PEPQArnoldiGetRestart_QArnoldi402,14536
+#undef __FUNCT____FUNCT__411,14737
+#define __FUNCT__ __FUNCT__412,14754
+PetscErrorCode PEPQArnoldiGetRestart(PEP pep,PetscReal *keep)PEPQArnoldiGetRestart428,15078
+#undef __FUNCT____FUNCT__439,15391
+#define __FUNCT__ __FUNCT__440,15408
+static PetscErrorCode PEPQArnoldiSetLocking_QArnoldi(PEP pep,PetscBool lock)PEPQArnoldiSetLocking_QArnoldi441,15459
+#undef __FUNCT____FUNCT__450,15658
+#define __FUNCT__ __FUNCT__451,15675
+PetscErrorCode PEPQArnoldiSetLocking(PEP pep,PetscBool lock)PEPQArnoldiSetLocking477,16441
+#undef __FUNCT____FUNCT__488,16770
+#define __FUNCT__ __FUNCT__489,16787
+static PetscErrorCode PEPQArnoldiGetLocking_QArnoldi(PEP pep,PetscBool *lock)PEPQArnoldiGetLocking_QArnoldi490,16838
+#undef __FUNCT____FUNCT__499,17039
+#define __FUNCT__ __FUNCT__500,17056
+PetscErrorCode PEPQArnoldiGetLocking(PEP pep,PetscBool *lock)PEPQArnoldiGetLocking516,17370
+#undef __FUNCT____FUNCT__527,17683
+#define __FUNCT__ __FUNCT__528,17700
+PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptionItems *PetscOptionsObject,PEP pep)PEPSetFromOptions_QArnoldi529,17747
+#undef __FUNCT____FUNCT__549,18551
+#define __FUNCT__ __FUNCT__550,18568
+PetscErrorCode PEPView_QArnoldi(PEP pep,PetscViewer viewer)PEPView_QArnoldi551,18605
+#undef __FUNCT____FUNCT__566,19191
+#define __FUNCT__ __FUNCT__567,19208
+PetscErrorCode PEPDestroy_QArnoldi(PEP pep)PEPDestroy_QArnoldi568,19248
+#undef __FUNCT____FUNCT__581,19814
+#define __FUNCT__ __FUNCT__582,19831
+PETSC_EXTERN PetscErrorCode PEPCreate_QArnoldi(PEP pep)PEPCreate_QArnoldi583,19870
 

 src/pep/impls/krylov/stoar/makefile,282
 makefile:^?makefile^A,1
@@ -6346,56 +7167,58 @@ DIRS     =DIRS30,1022
 MANSEC   = PEPMANSEC31,1033
 LOCDIR   = src/pep/impls/krylov/stoar/LOCDIR32,1048
 

-src/pep/impls/krylov/stoar/stoar.c,2949
+src/pep/impls/krylov/stoar/stoar.c,2979
 stoar.c:^?stoar.c^A,1
-#undef __FUNCT____FUNCT__41,1373
-#define __FUNCT__ __FUNCT__42,1390
-static PetscErrorCode PEPSTOARNorm(PEP pep,PetscInt j,PetscReal *norm)PEPSTOARNorm46,1496
-#undef __FUNCT____FUNCT__72,2477
-#define __FUNCT__ __FUNCT__73,2494
-static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv,PetscInt nwv)PEPSTOARqKqMupdates74,2534
-#undef __FUNCT____FUNCT__112,3796
-#define __FUNCT__ __FUNCT__113,3813
-PetscErrorCode PEPSetUp_STOAR(PEP pep)PEPSetUp_STOAR114,3848
-#undef __FUNCT____FUNCT__186,7064
-#define __FUNCT__ __FUNCT__187,7081
-static PetscErrorCode PEPSTOAROrth2(PEP pep,PetscInt k,PetscReal *Omega,PetscScalar *y)PEPSTOAROrth2193,7324
-#undef __FUNCT____FUNCT__234,9509
-#define __FUNCT__ __FUNCT__235,9526
-static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)PEPSTOARrun239,9602
-#undef __FUNCT____FUNCT__313,12600
-#define __FUNCT__ __FUNCT__314,12617
-static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)PEPSTOARTrunc315,12651
-#undef __FUNCT____FUNCT__393,16026
-#define __FUNCT__ __FUNCT__394,16043
-static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)PEPSTOARSupdate401,16156
-#undef __FUNCT____FUNCT__460,18460
-#define __FUNCT__ __FUNCT__461,18477
-PetscErrorCode PEPSolve_STOAR(PEP pep)PEPSolve_STOAR462,18512
-#undef __FUNCT____FUNCT__602,24275
-#define __FUNCT__ __FUNCT__603,24292
-PetscErrorCode PEPSetFromOptions_STOAR(PetscOptions *PetscOptionsObject,PEP pep)PEPSetFromOptions_STOAR604,24336
-#undef __FUNCT____FUNCT__619,24874
-#define __FUNCT__ __FUNCT__620,24891
-static PetscErrorCode PEPSTOARSetLocking_STOAR(PEP pep,PetscBool lock)PEPSTOARSetLocking_STOAR621,24936
-#undef __FUNCT____FUNCT__630,25121
-#define __FUNCT__ __FUNCT__631,25138
-PetscErrorCode PEPSTOARSetLocking(PEP pep,PetscBool lock)PEPSTOARSetLocking655,25808
-#undef __FUNCT____FUNCT__666,26131
-#define __FUNCT__ __FUNCT__667,26148
-static PetscErrorCode PEPSTOARGetLocking_STOAR(PEP pep,PetscBool *lock)PEPSTOARGetLocking_STOAR668,26193
-#undef __FUNCT____FUNCT__677,26380
-#define __FUNCT__ __FUNCT__678,26397
-PetscErrorCode PEPSTOARGetLocking(PEP pep,PetscBool *lock)PEPSTOARGetLocking694,26698
-#undef __FUNCT____FUNCT__705,27005
-#define __FUNCT__ __FUNCT__706,27022
-PetscErrorCode PEPView_STOAR(PEP pep,PetscViewer viewer)PEPView_STOAR707,27056
-#undef __FUNCT____FUNCT__721,27494
-#define __FUNCT__ __FUNCT__722,27511
-PetscErrorCode PEPDestroy_STOAR(PEP pep)PEPDestroy_STOAR723,27548
-#undef __FUNCT____FUNCT__734,27905
-#define __FUNCT__ __FUNCT__735,27922
-PETSC_EXTERN PetscErrorCode PEPCreate_STOAR(PEP pep)PEPCreate_STOAR736,27958
+static PetscBool  cited = PETSC_FALSE;cited41,1390
+static const char citation[] =citation42,1429
+#undef __FUNCT____FUNCT__54,1869
+#define __FUNCT__ __FUNCT__55,1886
+static PetscErrorCode PEPSTOARNorm(PEP pep,PetscInt j,PetscReal *norm)PEPSTOARNorm59,1991
+#undef __FUNCT____FUNCT__85,2973
+#define __FUNCT__ __FUNCT__86,2990
+static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv)PEPSTOARqKqMupdates87,3030
+#undef __FUNCT____FUNCT__121,4092
+#define __FUNCT__ __FUNCT__122,4109
+PetscErrorCode PEPSetUp_STOAR(PEP pep)PEPSetUp_STOAR123,4144
+#undef __FUNCT____FUNCT__191,7315
+#define __FUNCT__ __FUNCT__192,7332
+static PetscErrorCode PEPSTOAROrth2(PEP pep,PetscInt k,PetscReal *Omega,PetscScalar *y)PEPSTOAROrth2198,7575
+#undef __FUNCT____FUNCT__239,9759
+#define __FUNCT__ __FUNCT__240,9776
+static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,Vec *t_)PEPSTOARrun244,9875
+#undef __FUNCT____FUNCT__314,12612
+#define __FUNCT__ __FUNCT__315,12629
+static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscReal *rwork)PEPSTOARTrunc316,12663
+#undef __FUNCT____FUNCT__390,15731
+#define __FUNCT__ __FUNCT__391,15748
+static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)PEPSTOARSupdate399,15880
+#undef __FUNCT____FUNCT__453,17950
+#define __FUNCT__ __FUNCT__454,17967
+PetscErrorCode PEPSolve_STOAR(PEP pep)PEPSolve_STOAR455,18002
+#undef __FUNCT____FUNCT__594,23733
+#define __FUNCT__ __FUNCT__595,23750
+PetscErrorCode PEPSetFromOptions_STOAR(PetscOptionItems *PetscOptionsObject,PEP pep)PEPSetFromOptions_STOAR596,23794
+#undef __FUNCT____FUNCT__611,24336
+#define __FUNCT__ __FUNCT__612,24353
+static PetscErrorCode PEPSTOARSetLocking_STOAR(PEP pep,PetscBool lock)PEPSTOARSetLocking_STOAR613,24398
+#undef __FUNCT____FUNCT__622,24583
+#define __FUNCT__ __FUNCT__623,24600
+PetscErrorCode PEPSTOARSetLocking(PEP pep,PetscBool lock)PEPSTOARSetLocking647,25270
+#undef __FUNCT____FUNCT__658,25593
+#define __FUNCT__ __FUNCT__659,25610
+static PetscErrorCode PEPSTOARGetLocking_STOAR(PEP pep,PetscBool *lock)PEPSTOARGetLocking_STOAR660,25655
+#undef __FUNCT____FUNCT__669,25842
+#define __FUNCT__ __FUNCT__670,25859
+PetscErrorCode PEPSTOARGetLocking(PEP pep,PetscBool *lock)PEPSTOARGetLocking686,26160
+#undef __FUNCT____FUNCT__697,26467
+#define __FUNCT__ __FUNCT__698,26484
+PetscErrorCode PEPView_STOAR(PEP pep,PetscViewer viewer)PEPView_STOAR699,26518
+#undef __FUNCT____FUNCT__713,26956
+#define __FUNCT__ __FUNCT__714,26973
+PetscErrorCode PEPDestroy_STOAR(PEP pep)PEPDestroy_STOAR715,27010
+#undef __FUNCT____FUNCT__726,27367
+#define __FUNCT__ __FUNCT__727,27384
+PETSC_EXTERN PetscErrorCode PEPCreate_STOAR(PEP pep)PEPCreate_STOAR728,27420
 

 src/pep/impls/krylov/toar/makefile,292
 makefile:^?makefile^A,1
@@ -6409,169 +7232,186 @@ DIRS     =DIRS30,1032
 MANSEC   = PEPMANSEC31,1043
 LOCDIR   = src/pep/impls/krylov/toar/LOCDIR32,1058
 

-src/pep/impls/krylov/toar/nrefine.c,6119
+src/pep/impls/krylov/toar/nrefine.c,6590
 nrefine.c:^?nrefine.c^A,1
-  Mat          *A;A28,1056
-  BV           V;V29,1075
-  PetscInt     k,nmat;k30,1093
-  PetscInt     k,nmat;nmat30,1093
-  PetscScalar  *Mm;Mm31,1116
-  PetscScalar  *fih;fih32,1136
-  PetscScalar  *work;work33,1157
-  Vec           w1,w2;w134,1179
-  Vec           w1,w2;w234,1179
-} FSubctx;FSubctx35,1202
-  Mat          E[2];E38,1231
-  Vec          tN,ttN,t1,vseq;tN39,1252
-  Vec          tN,ttN,t1,vseq;ttN39,1252
-  Vec          tN,ttN,t1,vseq;t139,1252
-  Vec          tN,ttN,t1,vseq;vseq39,1252
-  VecScatter   scatterctx;scatterctx40,1283
-  PetscBool    computedt11;computedt1141,1310
-  PetscInt     *map0,*map1,*idxg,*idxp;map042,1338
-  PetscInt     *map0,*map1,*idxg,*idxp;map142,1338
-  PetscInt     *map0,*map1,*idxg,*idxp;idxg42,1338
-  PetscInt     *map0,*map1,*idxg,*idxp;idxp42,1338
-  PetscSubcomm subc;subc43,1378
-  VecScatter   scatter_sub;scatter_sub44,1399
-  VecScatter   *scatter_id,*scatterp_id;scatter_id45,1427
-  VecScatter   *scatter_id,*scatterp_id;scatterp_id45,1427
-  Mat          *A;A46,1468
-  BV           V,W;V47,1487
-  BV           V,W;W47,1487
-  Vec          t,tg,Rv,Vi,tp,tpg;t48,1507
-  Vec          t,tg,Rv,Vi,tp,tpg;tg48,1507
-  Vec          t,tg,Rv,Vi,tp,tpg;Rv48,1507
-  Vec          t,tg,Rv,Vi,tp,tpg;Vi48,1507
-  Vec          t,tg,Rv,Vi,tp,tpg;tp48,1507
-  Vec          t,tg,Rv,Vi,tp,tpg;tpg48,1507
-  PetscInt     idx;idx49,1541
-} MatExplicitCtx;MatExplicitCtx50,1561
-#undef __FUNCT____FUNCT__52,1580
-#define __FUNCT__ __FUNCT__53,1597
-static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)MatFSMult54,1627
-#undef __FUNCT____FUNCT__85,2621
-#define __FUNCT__ __FUNCT__86,2638
-static PetscErrorCode PEPEvaluateBasisforMatrix(PEP pep,PetscInt nm,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH)PEPEvaluateBasisforMatrix91,2806
-#undef __FUNCT____FUNCT__135,4202
-#define __FUNCT__ __FUNCT__136,4219
-static PetscErrorCode NRefSysSetup_shell(PetscInt nmat,PetscReal *pcf,PetscInt k,PetscInt deg,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,PetscScalar *Mm,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12)NRefSysSetup_shell137,4258
-#undef __FUNCT____FUNCT__189,6446
-#define __FUNCT__ __FUNCT__190,6463
-static PetscErrorCode NRefSysSolve_shell(Mat *A,KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12,BV V,Vec dVi,PetscScalar *dHi,BV W,Vec t,PetscScalar *work,PetscInt lw)NRefSysSolve_shell191,6502
-#undef __FUNCT____FUNCT__229,8262
-#define __FUNCT__ __FUNCT__230,8279
-static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,BV V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,BV dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,BV W,Vec t,PetscScalar *work,PetscInt lw)NRefRightSide234,8376
-#undef __FUNCT____FUNCT__326,12273
-#define __FUNCT__ __FUNCT__327,12290
-static PetscErrorCode NRefSysIter_shell(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,BV W,Vec t,PetscScalar *work,PetscInt lwork)NRefSysIter_shell328,12328
-#undef __FUNCT____FUNCT__366,13681
-#define __FUNCT__ __FUNCT__367,13698
-static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx,BV W,PetscScalar *work,PetscInt lwork)NRefSysSetup_explicit368,13740
-#undef __FUNCT____FUNCT__521,19693
-#define __FUNCT__ __FUNCT__522,19710
-static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScalar *Rh,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx)NRefSysSolve_explicit523,19752
-#undef __FUNCT____FUNCT__566,21854
-#define __FUNCT__ __FUNCT__567,21871
-static PetscErrorCode NRefSysIter_explicit(PetscInt i,PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,BV W,PetscScalar *work,PetscInt lwork)NRefSysIter_explicit568,21912
-#undef __FUNCT____FUNCT__627,25051
-#define __FUNCT__ __FUNCT__628,25068
-static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,BV dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,PetscScalar *work,PetscInt lw,MatExplicitCtx *matctx)PEPNRefForwardSubstitution629,25115
-#undef __FUNCT____FUNCT__707,27977
-#define __FUNCT__ __FUNCT__708,27994
-static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs,PetscScalar *work,PetscInt lwork)NRefOrthogStep709,28029
-#undef __FUNCT____FUNCT__772,31023
-#define __FUNCT__ __FUNCT__773,31040
-static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,BV dV,PetscScalar *dVS,PetscInt rds,PetscScalar *work,PetscInt lwork)PEPNRefUpdateInvPair774,31081
-#undef __FUNCT____FUNCT__831,33505
-#define __FUNCT__ __FUNCT__832,33522
-static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,Mat *M,Mat *P,MatExplicitCtx *matctx,PetscBool ini)PEPNRefSetUpMatrices833,33563
-#undef __FUNCT____FUNCT__994,41007
-#define __FUNCT__ __FUNCT__995,41024
-static PetscErrorCode NRefSubcommSetup(PEP pep,PetscInt k,MatExplicitCtx *matctx,PetscInt nsubc)NRefSubcommSetup996,41061
-#undef __FUNCT____FUNCT__1083,44862
-#define __FUNCT__ __FUNCT__1084,44879
-static PetscErrorCode NRefSubcommDestroy(PEP pep,MatExplicitCtx *matctx)NRefSubcommDestroy1085,44918
-#undef __FUNCT____FUNCT__1111,45880
-#define __FUNCT__ __FUNCT__1112,45897
-PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxits,PetscReal *tol,PetscInt k,PetscScalar *S,PetscInt lds,PetscInt *prs)PEPNewtonRefinement_TOAR1113,45942
-

-src/pep/impls/krylov/toar/ptoar.c,4935
+  Mat          *A,M1;A37,1396
+  Mat          *A,M1;M137,1396
+  BV           V,M2,M3,W;V38,1418
+  BV           V,M2,M3,W;M238,1418
+  BV           V,M2,M3,W;M338,1418
+  BV           V,M2,M3,W;W38,1418
+  PetscInt     k,nmat;k39,1444
+  PetscInt     k,nmat;nmat39,1444
+  PetscScalar  *fih,*work,*M4;fih40,1467
+  PetscScalar  *fih,*work,*M4;work40,1467
+  PetscScalar  *fih,*work,*M4;M440,1467
+  PetscBLASInt *pM4;pM441,1498
+  PetscBool    compM1;compM142,1519
+  Vec          t;t43,1542
+} FSubctx;FSubctx44,1560
+  Mat          E[2],M1;E47,1589
+  Mat          E[2],M1;M147,1589
+  Vec          tN,ttN,t1,vseq;tN48,1613
+  Vec          tN,ttN,t1,vseq;ttN48,1613
+  Vec          tN,ttN,t1,vseq;t148,1613
+  Vec          tN,ttN,t1,vseq;vseq48,1613
+  VecScatter   scatterctx;scatterctx49,1644
+  PetscBool    compM1;compM150,1671
+  PetscInt     *map0,*map1,*idxg,*idxp;map051,1694
+  PetscInt     *map0,*map1,*idxg,*idxp;map151,1694
+  PetscInt     *map0,*map1,*idxg,*idxp;idxg51,1694
+  PetscInt     *map0,*map1,*idxg,*idxp;idxp51,1694
+  PetscSubcomm subc;subc52,1734
+  VecScatter   scatter_sub;scatter_sub53,1755
+  VecScatter   *scatter_id,*scatterp_id;scatter_id54,1783
+  VecScatter   *scatter_id,*scatterp_id;scatterp_id54,1783
+  Mat          *A;A55,1824
+  BV           V,W,M2,M3,Wt;V56,1843
+  BV           V,W,M2,M3,Wt;W56,1843
+  BV           V,W,M2,M3,Wt;M256,1843
+  BV           V,W,M2,M3,Wt;M356,1843
+  BV           V,W,M2,M3,Wt;Wt56,1843
+  PetscScalar  *M4,*w,*wt,*d,*dt;M457,1872
+  PetscScalar  *M4,*w,*wt,*d,*dt;w57,1872
+  PetscScalar  *M4,*w,*wt,*d,*dt;wt57,1872
+  PetscScalar  *M4,*w,*wt,*d,*dt;d57,1872
+  PetscScalar  *M4,*w,*wt,*d,*dt;dt57,1872
+  Vec          t,tg,Rv,Vi,tp,tpg;t58,1906
+  Vec          t,tg,Rv,Vi,tp,tpg;tg58,1906
+  Vec          t,tg,Rv,Vi,tp,tpg;Rv58,1906
+  Vec          t,tg,Rv,Vi,tp,tpg;Vi58,1906
+  Vec          t,tg,Rv,Vi,tp,tpg;tp58,1906
+  Vec          t,tg,Rv,Vi,tp,tpg;tpg58,1906
+  PetscInt     idx,*cols;idx59,1940
+  PetscInt     idx,*cols;cols59,1940
+} MatExplicitCtx;MatExplicitCtx60,1966
+#undef __FUNCT____FUNCT__62,1985
+#define __FUNCT__ __FUNCT__63,2002
+static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)MatFSMult64,2032
+#undef __FUNCT____FUNCT__92,2932
+#define __FUNCT__ __FUNCT__93,2949
+static PetscErrorCode PEPEvaluateBasisforMatrix(PEP pep,PetscInt nm,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH)PEPEvaluateBasisforMatrix98,3117
+#undef __FUNCT____FUNCT__142,4511
+#define __FUNCT__ __FUNCT__143,4528
+static PetscErrorCode NRefSysSetup_shell(PEP pep,PetscInt k,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,FSubctx *ctx)NRefSysSetup_shell144,4567
+#undef __FUNCT____FUNCT__250,9082
+#define __FUNCT__ __FUNCT__251,9099
+static PetscErrorCode NRefSysSolve_shell(KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,Vec dVi,PetscScalar *dHi)NRefSysSolve_shell252,9138
+#undef __FUNCT____FUNCT__288,10697
+#define __FUNCT__ __FUNCT__289,10714
+static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,BV V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,BV dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,BV W,Vec t)NRefRightSide293,10811
+#undef __FUNCT____FUNCT__379,14700
+#define __FUNCT__ __FUNCT__380,14717
+static PetscErrorCode NRefSysSolve_mbe(PetscInt k,PetscInt sz,BV W,PetscScalar *w,BV Wt,PetscScalar *wt,PetscScalar *d,PetscScalar *dt,KSP ksp,BV T2,BV T3 ,PetscScalar *T4,PetscBool trans,Vec x1,PetscScalar *x2,Vec sol1,PetscScalar *sol2,Vec vw)NRefSysSolve_mbe381,14754
+#undef __FUNCT____FUNCT__447,17519
+#define __FUNCT__ __FUNCT__448,17536
+static PetscErrorCode NRefSysSetup_mbe(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx)NRefSysSetup_mbe449,17573
+#undef __FUNCT____FUNCT__580,22739
+#define __FUNCT__ __FUNCT__581,22756
+static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx,BV W)NRefSysSetup_explicit582,22798
+#undef __FUNCT____FUNCT__727,28680
+#define __FUNCT__ __FUNCT__728,28697
+static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScalar *Rh,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx)NRefSysSolve_explicit729,28739
+#undef __FUNCT____FUNCT__773,30844
+#define __FUNCT__ __FUNCT__774,30861
+static PetscErrorCode NRefSysIter(PetscInt i,PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,BV W)NRefSysIter775,30893
+#undef __FUNCT____FUNCT__885,35848
+#define __FUNCT__ __FUNCT__886,35865
+static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,BV dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,MatExplicitCtx *matctx)PEPNRefForwardSubstitution887,35912
+#undef __FUNCT____FUNCT__976,39403
+#define __FUNCT__ __FUNCT__977,39420
+static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs)NRefOrthogStep978,39455
+#undef __FUNCT____FUNCT__1040,42513
+#define __FUNCT__ __FUNCT__1041,42530
+static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,BV dV,PetscScalar *dVS,PetscInt rds)PEPNRefUpdateInvPair1042,42571
+#undef __FUNCT____FUNCT__1103,45159
+#define __FUNCT__ __FUNCT__1104,45176
+static PetscErrorCode PEPNRefSetUp(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,MatExplicitCtx *matctx,PetscBool ini)PEPNRefSetUp1105,45209
+#undef __FUNCT____FUNCT__1320,55203
+#define __FUNCT__ __FUNCT__1321,55220
+static PetscErrorCode NRefSubcommSetup(PEP pep,PetscInt k,MatExplicitCtx *matctx,PetscInt nsubc)NRefSubcommSetup1322,55257
+#undef __FUNCT____FUNCT__1411,59107
+#define __FUNCT__ __FUNCT__1412,59124
+static PetscErrorCode NRefSubcommDestroy(PEP pep,MatExplicitCtx *matctx)NRefSubcommDestroy1413,59163
+#undef __FUNCT____FUNCT__1443,60230
+#define __FUNCT__ __FUNCT__1444,60247
+PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxits,PetscReal *tol,PetscInt k,PetscScalar *S,PetscInt lds,PetscInt *prs)PEPNewtonRefinement_TOAR1445,60292
+

+src/pep/impls/krylov/toar/ptoar.c,4766
 ptoar.c:^?ptoar.c^A,1
-#undef __FUNCT____FUNCT__43,1476
-#define __FUNCT__ __FUNCT__44,1493
-static PetscErrorCode PEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)PEPTOARSNorm248,1552
-#undef __FUNCT____FUNCT__59,1816
-#define __FUNCT__ __FUNCT__60,1833
-PetscErrorCode PEPSetUp_TOAR(PEP pep)PEPSetUp_TOAR61,1867
-#undef __FUNCT____FUNCT__133,4670
-#define __FUNCT__ __FUNCT__134,4687
-static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work,PetscInt nw)PEPTOAROrth2141,4888
-#undef __FUNCT____FUNCT__190,6787
-#define __FUNCT__ __FUNCT__191,6804
-static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_,PetscInt nwv)PEPTOARExtendBasis204,7280
-#undef __FUNCT____FUNCT__277,9993
-#define __FUNCT__ __FUNCT__278,10010
-static PetscErrorCode PEPTOARCoefficients(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x)PEPTOARCoefficients282,10133
-#undef __FUNCT____FUNCT__306,10989
-#define __FUNCT__ __FUNCT__307,11006
-static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)PEPTOARrun311,11081
-#undef __FUNCT____FUNCT__369,13320
-#define __FUNCT__ __FUNCT__370,13337
-static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)PEPTOARTrunc371,13370
-#undef __FUNCT____FUNCT__517,20009
-#define __FUNCT__ __FUNCT__518,20026
-static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)PEPTOARSupdate525,20138
-#undef __FUNCT____FUNCT__552,21239
-#define __FUNCT__ __FUNCT__553,21256
-static PetscErrorCode PEPEvaluateBasisM(PEP pep,PetscInt k,PetscScalar *T,PetscInt ldt,PetscInt idx,PetscScalar **Tp,PetscScalar **Tj)PEPEvaluateBasisM559,21458
-#undef __FUNCT____FUNCT__588,22464
-#define __FUNCT__ __FUNCT__589,22481
-static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work,PetscInt nw)PEPExtractInvariantPair590,22525
-#undef __FUNCT____FUNCT__762,28811
-#define __FUNCT__ __FUNCT__763,28828
-static PetscErrorCode PEPLookfordeflation(PEP pep,PetscInt *nl)PEPLookfordeflation764,28868
-#undef __FUNCT____FUNCT__798,29856
-#define __FUNCT__ __FUNCT__799,29873
-PetscErrorCode PEPSolve_TOAR(PEP pep)PEPSolve_TOAR800,29907
-#undef __FUNCT____FUNCT__982,37390
-#define __FUNCT__ __FUNCT__983,37407
-static PetscErrorCode PEPTOARSetRestart_TOAR(PEP pep,PetscReal keep)PEPTOARSetRestart_TOAR984,37450
-#undef __FUNCT____FUNCT__997,37842
-#define __FUNCT__ __FUNCT__998,37859
-PetscErrorCode PEPTOARSetRestart(PEP pep,PetscReal keep)PEPTOARSetRestart1020,38415
-#undef __FUNCT____FUNCT__1031,38736
-#define __FUNCT__ __FUNCT__1032,38753
-static PetscErrorCode PEPTOARGetRestart_TOAR(PEP pep,PetscReal *keep)PEPTOARGetRestart_TOAR1033,38796
-#undef __FUNCT____FUNCT__1042,38981
-#define __FUNCT__ __FUNCT__1043,38998
-PetscErrorCode PEPTOARGetRestart(PEP pep,PetscReal *keep)PEPTOARGetRestart1059,39305
-#undef __FUNCT____FUNCT__1070,39610
-#define __FUNCT__ __FUNCT__1071,39627
-static PetscErrorCode PEPTOARSetLocking_TOAR(PEP pep,PetscBool lock)PEPTOARSetLocking_TOAR1072,39670
-#undef __FUNCT____FUNCT__1081,39853
-#define __FUNCT__ __FUNCT__1082,39870
-PetscErrorCode PEPTOARSetLocking(PEP pep,PetscBool lock)PEPTOARSetLocking1106,40535
-#undef __FUNCT____FUNCT__1117,40856
-#define __FUNCT__ __FUNCT__1118,40873
-static PetscErrorCode PEPTOARGetLocking_TOAR(PEP pep,PetscBool *lock)PEPTOARGetLocking_TOAR1119,40916
-#undef __FUNCT____FUNCT__1128,41101
-#define __FUNCT__ __FUNCT__1129,41118
-PetscErrorCode PEPTOARGetLocking(PEP pep,PetscBool *lock)PEPTOARGetLocking1145,41415
-#undef __FUNCT____FUNCT__1156,41720
-#define __FUNCT__ __FUNCT__1157,41737
-PetscErrorCode PEPSetFromOptions_TOAR(PetscOptions *PetscOptionsObject,PEP pep)PEPSetFromOptions_TOAR1158,41780
-#undef __FUNCT____FUNCT__1178,42547
-#define __FUNCT__ __FUNCT__1179,42564
-PetscErrorCode PEPView_TOAR(PEP pep,PetscViewer viewer)PEPView_TOAR1180,42597
-#undef __FUNCT____FUNCT__1195,43165
-#define __FUNCT__ __FUNCT__1196,43182
-PetscErrorCode PEPDestroy_TOAR(PEP pep)PEPDestroy_TOAR1197,43218
-#undef __FUNCT____FUNCT__1210,43764
-#define __FUNCT__ __FUNCT__1211,43781
-PETSC_EXTERN PetscErrorCode PEPCreate_TOAR(PEP pep)PEPCreate_TOAR1212,43816
-

-src/pep/impls/linear/linear.c,4907
+static PetscBool  cited = PETSC_FALSE;cited44,1508
+static const char citation[] =citation45,1547
+#undef __FUNCT____FUNCT__57,1963
+#define __FUNCT__ __FUNCT__58,1980
+static PetscErrorCode PEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)PEPTOARSNorm262,2038
+#undef __FUNCT____FUNCT__73,2302
+#define __FUNCT__ __FUNCT__74,2319
+PetscErrorCode PEPSetUp_TOAR(PEP pep)PEPSetUp_TOAR75,2353
+#undef __FUNCT____FUNCT__147,5143
+#define __FUNCT__ __FUNCT__148,5160
+static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)PEPTOAROrth2156,5377
+#undef __FUNCT____FUNCT__200,7125
+#define __FUNCT__ __FUNCT__201,7142
+static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)PEPTOARExtendBasis214,7618
+#undef __FUNCT____FUNCT__286,10220
+#define __FUNCT__ __FUNCT__287,10237
+static PetscErrorCode PEPTOARCoefficients(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x)PEPTOARCoefficients291,10360
+#undef __FUNCT____FUNCT__315,11216
+#define __FUNCT__ __FUNCT__316,11233
+static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,Vec *t_)PEPTOARrun320,11321
+#undef __FUNCT____FUNCT__372,13239
+#define __FUNCT__ __FUNCT__373,13256
+static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscReal *rwork)PEPTOARTrunc377,13338
+#undef __FUNCT____FUNCT__519,19764
+#define __FUNCT__ __FUNCT__520,19781
+static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)PEPTOARSupdate528,19911
+#undef __FUNCT____FUNCT__550,20779
+#define __FUNCT__ __FUNCT__551,20796
+static PetscErrorCode PEPEvaluateBasisM(PEP pep,PetscInt k,PetscScalar *T,PetscInt ldt,PetscInt idx,PetscScalar **Tp,PetscScalar **Tj)PEPEvaluateBasisM557,20998
+#undef __FUNCT____FUNCT__584,21986
+#define __FUNCT__ __FUNCT__585,22003
+static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work)PEPExtractInvariantPair587,22070
+#undef __FUNCT____FUNCT__760,28374
+#define __FUNCT__ __FUNCT__761,28391
+PetscErrorCode PEPSolve_TOAR(PEP pep)PEPSolve_TOAR762,28425
+#undef __FUNCT____FUNCT__934,35503
+#define __FUNCT__ __FUNCT__935,35520
+static PetscErrorCode PEPTOARSetRestart_TOAR(PEP pep,PetscReal keep)PEPTOARSetRestart_TOAR936,35563
+#undef __FUNCT____FUNCT__949,35955
+#define __FUNCT__ __FUNCT__950,35972
+PetscErrorCode PEPTOARSetRestart(PEP pep,PetscReal keep)PEPTOARSetRestart972,36528
+#undef __FUNCT____FUNCT__983,36849
+#define __FUNCT__ __FUNCT__984,36866
+static PetscErrorCode PEPTOARGetRestart_TOAR(PEP pep,PetscReal *keep)PEPTOARGetRestart_TOAR985,36909
+#undef __FUNCT____FUNCT__994,37094
+#define __FUNCT__ __FUNCT__995,37111
+PetscErrorCode PEPTOARGetRestart(PEP pep,PetscReal *keep)PEPTOARGetRestart1011,37418
+#undef __FUNCT____FUNCT__1022,37723
+#define __FUNCT__ __FUNCT__1023,37740
+static PetscErrorCode PEPTOARSetLocking_TOAR(PEP pep,PetscBool lock)PEPTOARSetLocking_TOAR1024,37783
+#undef __FUNCT____FUNCT__1033,37966
+#define __FUNCT__ __FUNCT__1034,37983
+PetscErrorCode PEPTOARSetLocking(PEP pep,PetscBool lock)PEPTOARSetLocking1058,38648
+#undef __FUNCT____FUNCT__1069,38969
+#define __FUNCT__ __FUNCT__1070,38986
+static PetscErrorCode PEPTOARGetLocking_TOAR(PEP pep,PetscBool *lock)PEPTOARGetLocking_TOAR1071,39029
+#undef __FUNCT____FUNCT__1080,39214
+#define __FUNCT__ __FUNCT__1081,39231
+PetscErrorCode PEPTOARGetLocking(PEP pep,PetscBool *lock)PEPTOARGetLocking1097,39528
+#undef __FUNCT____FUNCT__1108,39833
+#define __FUNCT__ __FUNCT__1109,39850
+PetscErrorCode PEPSetFromOptions_TOAR(PetscOptionItems *PetscOptionsObject,PEP pep)PEPSetFromOptions_TOAR1110,39893
+#undef __FUNCT____FUNCT__1130,40664
+#define __FUNCT__ __FUNCT__1131,40681
+PetscErrorCode PEPView_TOAR(PEP pep,PetscViewer viewer)PEPView_TOAR1132,40714
+#undef __FUNCT____FUNCT__1147,41282
+#define __FUNCT__ __FUNCT__1148,41299
+PetscErrorCode PEPDestroy_TOAR(PEP pep)PEPDestroy_TOAR1149,41335
+#undef __FUNCT____FUNCT__1162,41881
+#define __FUNCT__ __FUNCT__1163,41898
+PETSC_EXTERN PetscErrorCode PEPCreate_TOAR(PEP pep)PEPCreate_TOAR1164,41933
+

+src/pep/impls/linear/linear.c,4911
 linear.c:^?linear.c^A,1
 #undef __FUNCT____FUNCT__27,1067
 #define __FUNCT__ __FUNCT__28,1084
@@ -6588,75 +7428,75 @@ static PetscErrorCode Apply_Linear(ST st,Vec x,Vec y)Apply_Linear244,8429
 #undef __FUNCT____FUNCT__255,8686
 #define __FUNCT__ __FUNCT__256,8703
 PetscErrorCode PEPSetUp_Linear(PEP pep)PEPSetUp_Linear257,8739
-#undef __FUNCT____FUNCT__449,18715
-#define __FUNCT__ __FUNCT__450,18732
-static PetscErrorCode PEPLinearExtract_Residual(PEP pep,EPS eps)PEPLinearExtract_Residual461,19215
-#undef __FUNCT____FUNCT__549,22778
-#define __FUNCT__ __FUNCT__550,22795
-static PetscErrorCode PEPLinearExtract_None(PEP pep,EPS eps)PEPLinearExtract_None555,22937
-#undef __FUNCT____FUNCT__602,24638
-#define __FUNCT__ __FUNCT__603,24655
-static PetscErrorCode PEPLinearExtract_Norm(PEP pep,EPS eps)PEPLinearExtract_Norm613,25101
-#undef __FUNCT____FUNCT__667,27046
-#define __FUNCT__ __FUNCT__668,27063
-PetscErrorCode PEPExtractVectors_Linear(PEP pep)PEPExtractVectors_Linear669,27108
-#undef __FUNCT____FUNCT__691,27733
-#define __FUNCT__ __FUNCT__692,27750
-PetscErrorCode PEPSolve_Linear(PEP pep)PEPSolve_Linear693,27786
-#undef __FUNCT____FUNCT__736,29169
-#define __FUNCT__ __FUNCT__737,29186
-static PetscErrorCode EPSMonitor_Linear(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)EPSMonitor_Linear738,29224
-#undef __FUNCT____FUNCT__757,29864
-#define __FUNCT__ __FUNCT__758,29881
-PetscErrorCode PEPSetFromOptions_Linear(PetscOptions *PetscOptionsObject,PEP pep)PEPSetFromOptions_Linear759,29926
-#undef __FUNCT____FUNCT__782,30893
-#define __FUNCT__ __FUNCT__783,30910
-static PetscErrorCode PEPLinearSetCompanionForm_Linear(PEP pep,PetscInt cform)PEPLinearSetCompanionForm_Linear784,30963
-#undef __FUNCT____FUNCT__798,31417
-#define __FUNCT__ __FUNCT__799,31434
-PetscErrorCode PEPLinearSetCompanionForm(PEP pep,PetscInt cform)PEPLinearSetCompanionForm817,31907
-#undef __FUNCT____FUNCT__828,32244
-#define __FUNCT__ __FUNCT__829,32261
-static PetscErrorCode PEPLinearGetCompanionForm_Linear(PEP pep,PetscInt *cform)PEPLinearGetCompanionForm_Linear830,32314
-#undef __FUNCT____FUNCT__839,32515
-#define __FUNCT__ __FUNCT__840,32532
-PetscErrorCode PEPLinearGetCompanionForm(PEP pep,PetscInt *cform)PEPLinearGetCompanionForm857,32936
-#undef __FUNCT____FUNCT__868,33261
-#define __FUNCT__ __FUNCT__869,33278
-static PetscErrorCode PEPLinearSetExplicitMatrix_Linear(PEP pep,PetscBool explicitmatrix)PEPLinearSetExplicitMatrix_Linear870,33332
-#undef __FUNCT____FUNCT__879,33560
-#define __FUNCT__ __FUNCT__880,33577
-PetscErrorCode PEPLinearSetExplicitMatrix(PEP pep,PetscBool explicitmatrix)PEPLinearSetExplicitMatrix898,34090
-#undef __FUNCT____FUNCT__909,34459
-#define __FUNCT__ __FUNCT__910,34476
-static PetscErrorCode PEPLinearGetExplicitMatrix_Linear(PEP pep,PetscBool *explicitmatrix)PEPLinearGetExplicitMatrix_Linear911,34530
-#undef __FUNCT____FUNCT__920,34760
-#define __FUNCT__ __FUNCT__921,34777
-PetscErrorCode PEPLinearGetExplicitMatrix(PEP pep,PetscBool *explicitmatrix)PEPLinearGetExplicitMatrix938,35158
-#undef __FUNCT____FUNCT__949,35511
-#define __FUNCT__ __FUNCT__950,35528
-static PetscErrorCode PEPLinearSetEPS_Linear(PEP pep,EPS eps)PEPLinearSetEPS_Linear951,35571
-#undef __FUNCT____FUNCT__965,36004
-#define __FUNCT__ __FUNCT__966,36021
-PetscErrorCode PEPLinearSetEPS(PEP pep,EPS eps)PEPLinearSetEPS981,36327
-#undef __FUNCT____FUNCT__993,36665
-#define __FUNCT__ __FUNCT__994,36682
-static PetscErrorCode PEPLinearGetEPS_Linear(PEP pep,EPS *eps)PEPLinearGetEPS_Linear995,36725
-#undef __FUNCT____FUNCT__1016,37597
-#define __FUNCT__ __FUNCT__1017,37614
-PetscErrorCode PEPLinearGetEPS(PEP pep,EPS *eps)PEPLinearGetEPS1034,37949
-#undef __FUNCT____FUNCT__1045,38235
-#define __FUNCT__ __FUNCT__1046,38252
-PetscErrorCode PEPView_Linear(PEP pep,PetscViewer viewer)PEPView_Linear1047,38287
-#undef __FUNCT____FUNCT__1062,38944
-#define __FUNCT__ __FUNCT__1063,38961
-PetscErrorCode PEPReset_Linear(PEP pep)PEPReset_Linear1064,38997
-#undef __FUNCT____FUNCT__1082,39594
-#define __FUNCT__ __FUNCT__1083,39611
-PetscErrorCode PEPDestroy_Linear(PEP pep)PEPDestroy_Linear1084,39649
-#undef __FUNCT____FUNCT__1101,40513
-#define __FUNCT__ __FUNCT__1102,40530
-PETSC_EXTERN PetscErrorCode PEPCreate_Linear(PEP pep)PEPCreate_Linear1103,40567
+#undef __FUNCT____FUNCT__450,18897
+#define __FUNCT__ __FUNCT__451,18914
+static PetscErrorCode PEPLinearExtract_Residual(PEP pep,EPS eps)PEPLinearExtract_Residual462,19397
+#undef __FUNCT____FUNCT__550,22960
+#define __FUNCT__ __FUNCT__551,22977
+static PetscErrorCode PEPLinearExtract_None(PEP pep,EPS eps)PEPLinearExtract_None556,23119
+#undef __FUNCT____FUNCT__603,24820
+#define __FUNCT__ __FUNCT__604,24837
+static PetscErrorCode PEPLinearExtract_Norm(PEP pep,EPS eps)PEPLinearExtract_Norm614,25283
+#undef __FUNCT____FUNCT__668,27228
+#define __FUNCT__ __FUNCT__669,27245
+PetscErrorCode PEPExtractVectors_Linear(PEP pep)PEPExtractVectors_Linear670,27290
+#undef __FUNCT____FUNCT__692,27915
+#define __FUNCT__ __FUNCT__693,27932
+PetscErrorCode PEPSolve_Linear(PEP pep)PEPSolve_Linear694,27968
+#undef __FUNCT____FUNCT__737,29345
+#define __FUNCT__ __FUNCT__738,29362
+static PetscErrorCode EPSMonitor_Linear(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)EPSMonitor_Linear739,29400
+#undef __FUNCT____FUNCT__758,30040
+#define __FUNCT__ __FUNCT__759,30057
+PetscErrorCode PEPSetFromOptions_Linear(PetscOptionItems *PetscOptionsObject,PEP pep)PEPSetFromOptions_Linear760,30102
+#undef __FUNCT____FUNCT__783,31073
+#define __FUNCT__ __FUNCT__784,31090
+static PetscErrorCode PEPLinearSetCompanionForm_Linear(PEP pep,PetscInt cform)PEPLinearSetCompanionForm_Linear785,31143
+#undef __FUNCT____FUNCT__799,31597
+#define __FUNCT__ __FUNCT__800,31614
+PetscErrorCode PEPLinearSetCompanionForm(PEP pep,PetscInt cform)PEPLinearSetCompanionForm818,32087
+#undef __FUNCT____FUNCT__829,32424
+#define __FUNCT__ __FUNCT__830,32441
+static PetscErrorCode PEPLinearGetCompanionForm_Linear(PEP pep,PetscInt *cform)PEPLinearGetCompanionForm_Linear831,32494
+#undef __FUNCT____FUNCT__840,32695
+#define __FUNCT__ __FUNCT__841,32712
+PetscErrorCode PEPLinearGetCompanionForm(PEP pep,PetscInt *cform)PEPLinearGetCompanionForm858,33116
+#undef __FUNCT____FUNCT__869,33441
+#define __FUNCT__ __FUNCT__870,33458
+static PetscErrorCode PEPLinearSetExplicitMatrix_Linear(PEP pep,PetscBool explicitmatrix)PEPLinearSetExplicitMatrix_Linear871,33512
+#undef __FUNCT____FUNCT__880,33740
+#define __FUNCT__ __FUNCT__881,33757
+PetscErrorCode PEPLinearSetExplicitMatrix(PEP pep,PetscBool explicitmatrix)PEPLinearSetExplicitMatrix899,34270
+#undef __FUNCT____FUNCT__910,34639
+#define __FUNCT__ __FUNCT__911,34656
+static PetscErrorCode PEPLinearGetExplicitMatrix_Linear(PEP pep,PetscBool *explicitmatrix)PEPLinearGetExplicitMatrix_Linear912,34710
+#undef __FUNCT____FUNCT__921,34940
+#define __FUNCT__ __FUNCT__922,34957
+PetscErrorCode PEPLinearGetExplicitMatrix(PEP pep,PetscBool *explicitmatrix)PEPLinearGetExplicitMatrix939,35338
+#undef __FUNCT____FUNCT__950,35691
+#define __FUNCT__ __FUNCT__951,35708
+static PetscErrorCode PEPLinearSetEPS_Linear(PEP pep,EPS eps)PEPLinearSetEPS_Linear952,35751
+#undef __FUNCT____FUNCT__966,36184
+#define __FUNCT__ __FUNCT__967,36201
+PetscErrorCode PEPLinearSetEPS(PEP pep,EPS eps)PEPLinearSetEPS982,36507
+#undef __FUNCT____FUNCT__994,36845
+#define __FUNCT__ __FUNCT__995,36862
+static PetscErrorCode PEPLinearGetEPS_Linear(PEP pep,EPS *eps)PEPLinearGetEPS_Linear996,36905
+#undef __FUNCT____FUNCT__1017,37784
+#define __FUNCT__ __FUNCT__1018,37801
+PetscErrorCode PEPLinearGetEPS(PEP pep,EPS *eps)PEPLinearGetEPS1035,38136
+#undef __FUNCT____FUNCT__1046,38422
+#define __FUNCT__ __FUNCT__1047,38439
+PetscErrorCode PEPView_Linear(PEP pep,PetscViewer viewer)PEPView_Linear1048,38474
+#undef __FUNCT____FUNCT__1067,39284
+#define __FUNCT__ __FUNCT__1068,39301
+PetscErrorCode PEPReset_Linear(PEP pep)PEPReset_Linear1069,39337
+#undef __FUNCT____FUNCT__1087,39934
+#define __FUNCT__ __FUNCT__1088,39951
+PetscErrorCode PEPDestroy_Linear(PEP pep)PEPDestroy_Linear1089,39989
+#undef __FUNCT____FUNCT__1106,40853
+#define __FUNCT__ __FUNCT__1107,40870
+PETSC_EXTERN PetscErrorCode PEPCreate_Linear(PEP pep)PEPCreate_Linear1108,40907
 

 src/pep/impls/linear/linearp.h,970
 linearp.h:^?linearp.h^A,1
@@ -6734,25 +7574,26 @@ DIRS     = linear krylov jdDIRS25,959
 LOCDIR   = src/pep/impls/LOCDIR26,987
 MANSEC   = PEPMANSEC27,1013
 

-src/pep/interface/dlregispep.c,1495
+src/pep/interface/dlregispep.c,1636
 dlregispep.c:^?dlregispep.c^A,1
 static PetscBool PEPPackageInitialized = PETSC_FALSE;PEPPackageInitialized24,960
 const char *PEPBasisTypes[] = {"MONOMIAL","CHEBYSHEV1","CHEBYSHEV2","LEGENDRE","LAGUERRE","HERMITE","PEPBasis","PEP_BASIS_",0};PEPBasisTypes26,1015
 const char *PEPScaleTypes[] = {"NONE","SCALAR","DIAGONAL","BOTH","PEPScale","PEP_SCALE_",0};PEPScaleTypes27,1143
 const char *PEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","PEPRefine","PEP_REFINE_",0};PEPRefineTypes28,1236
-const char *PEPExtractTypes[] = {"","NONE","NORM","RESIDUAL","STRUCTURED","PEPExtract","PEP_EXTRACT_",0};PEPExtractTypes29,1325
-const char *PEPErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","PEPErrorType","PEP_ERROR_",0};PEPErrorTypes30,1431
-const char *const PEPConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","PEPConvergedReason","PEP_",0};PEPConvergedReasons_Shifted31,1527
-const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 5;PEPConvergedReasons32,1718
-#undef __FUNCT____FUNCT__34,1792
-#define __FUNCT__ __FUNCT__35,1809
-PetscErrorCode PEPFinalizePackage(void)PEPFinalizePackage44,2044
-#undef __FUNCT____FUNCT__55,2298
-#define __FUNCT__ __FUNCT__56,2315
-PetscErrorCode PEPInitializePackage(void)PEPInitializePackage66,2643
-#undef __FUNCT____FUNCT__106,4077
-#define __FUNCT__ __FUNCT__107,4094
-PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcpep()PetscDLLibraryRegister_slepcpep115,4344
+const char *PEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","PEPRefineScheme","PEP_REFINE_SCHEME_",0};PEPRefineSchemes29,1325
+const char *PEPExtractTypes[] = {"","NONE","NORM","RESIDUAL","STRUCTURED","PEPExtract","PEP_EXTRACT_",0};PEPExtractTypes30,1430
+const char *PEPErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","PEPErrorType","PEP_ERROR_",0};PEPErrorTypes31,1536
+const char *const PEPConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","PEPConvergedReason","PEP_",0};PEPConvergedReasons_Shifted32,1632
+const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 4;PEPConvergedReasons33,1834
+#undef __FUNCT____FUNCT__35,1908
+#define __FUNCT__ __FUNCT__36,1925
+PetscErrorCode PEPFinalizePackage(void)PEPFinalizePackage45,2160
+#undef __FUNCT____FUNCT__56,2414
+#define __FUNCT__ __FUNCT__57,2431
+PetscErrorCode PEPInitializePackage(void)PEPInitializePackage67,2759
+#undef __FUNCT____FUNCT__107,4195
+#define __FUNCT__ __FUNCT__108,4212
+PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcpep()PetscDLLibraryRegister_slepcpep116,4462
 

 src/pep/interface/ftn-custom/makefile,257
 makefile:^?makefile^A,1
@@ -6765,45 +7606,52 @@ DIRS     =DIRS29,1037
 LIBBASE  = libslepcpepLIBBASE30,1048
 LOCDIR   = src/pep/interface/ftn-custom/LOCDIR31,1071
 

-src/pep/interface/ftn-custom/zpepf.c,7359
+src/pep/interface/ftn-custom/zpepf.c,8227
 zpepf.c:^?zpepf.c^A,1
-PETSC_EXTERN void pepmonitorall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorall_76,3512
-PETSC_EXTERN void pepmonitorlg_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorlg_81,3758
-PETSC_EXTERN void pepmonitorlgall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorlgall_86,4002
-PETSC_EXTERN void pepmonitorconverged_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorconverged_91,4252
-PETSC_EXTERN void pepmonitorfirst_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorfirst_96,4510
-  PetscFortranCallbackId monitor;monitor102,4776
-  PetscFortranCallbackId monitordestroy;monitordestroy103,4810
-  PetscFortranCallbackId convergence;convergence104,4851
-  PetscFortranCallbackId convdestroy;convdestroy105,4889
-  PetscFortranCallbackId comparison;comparison106,4927
-} _cb;_cb107,4964
-#undef __FUNCT____FUNCT__110,5064
-static PetscErrorCode ourmonitor(PEP pep,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)ourmonitor112,5112
-#undef __FUNCT____FUNCT__117,5430
-static PetscErrorCode ourdestroy(void** ctx)ourdestroy119,5478
-#undef __FUNCT____FUNCT__125,5645
-static PetscErrorCode ourconvergence(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)ourconvergence127,5697
-#undef __FUNCT____FUNCT__132,5997
-static PetscErrorCode ourconvdestroy(void *ctx)ourconvdestroy134,6049
-#undef __FUNCT____FUNCT__140,6215
-static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)oureigenvaluecomparison142,6276
-PETSC_EXTERN void PETSC_STDCALL pepview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepview_148,6602
-PETSC_EXTERN void PETSC_STDCALL pepreasonview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepreasonview_155,6789
-PETSC_EXTERN void PETSC_STDCALL peperrorview_(PEP *pep,PEPErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)peperrorview_162,6988
-PETSC_EXTERN void PETSC_STDCALL pepvaluesview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepvaluesview_169,7212
-PETSC_EXTERN void PETSC_STDCALL pepvectorsview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepvectorsview_176,7411
-PETSC_EXTERN void PETSC_STDCALL pepsettype_(PEP *pep,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepsettype_183,7612
-PETSC_EXTERN void PETSC_STDCALL pepgettype_(PEP *pep,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepgettype_192,7827
-PETSC_EXTERN void PETSC_STDCALL pepsetoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepsetoptionsprefix_201,8106
-PETSC_EXTERN void PETSC_STDCALL pepappendoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepappendoptionsprefix_210,8345
-PETSC_EXTERN void PETSC_STDCALL pepgetoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepgetoptionsprefix_219,8590
-PETSC_EXTERN void PETSC_STDCALL pepmonitorset_(PEP *pep,void (PETSC_STDCALL *monitor)(PEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)pepmonitorset_227,8858
-PETSC_EXTERN void PETSC_STDCALL pepconvergedabsolute_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)pepconvergedabsolute_262,10800
-PETSC_EXTERN void PETSC_STDCALL pepconvergedeigrelative_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)pepconvergedeigrelative_267,11035
-PETSC_EXTERN void PETSC_STDCALL pepconvergedlinear_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)pepconvergedlinear_272,11276
-PETSC_EXTERN void PETSC_STDCALL pepsetconvergencetestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)pepsetconvergencetestfunction_277,11507
-PETSC_EXTERN void PETSC_STDCALL pepseteigenvaluecomparison_(PEP *pep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)pepseteigenvaluecomparison_298,12778
+PETSC_EXTERN void pepmonitorall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)pepmonitorall_76,3526
+PETSC_EXTERN void pepmonitorconverged_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)pepmonitorconverged_81,3790
+PETSC_EXTERN void pepmonitorfirst_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)pepmonitorfirst_86,4061
+PETSC_EXTERN void pepmonitorlg_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorlg_91,4329
+PETSC_EXTERN void pepmonitorlgall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)pepmonitorlgall_96,4573
+  PetscFortranCallbackId monitor;monitor102,4839
+  PetscFortranCallbackId monitordestroy;monitordestroy103,4873
+  PetscFortranCallbackId convergence;convergence104,4914
+  PetscFortranCallbackId convdestroy;convdestroy105,4952
+  PetscFortranCallbackId stopping;stopping106,4990
+  PetscFortranCallbackId stopdestroy;stopdestroy107,5025
+  PetscFortranCallbackId comparison;comparison108,5063
+} _cb;_cb109,5100
+#undef __FUNCT____FUNCT__112,5200
+static PetscErrorCode ourmonitor(PEP pep,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)ourmonitor114,5248
+#undef __FUNCT____FUNCT__119,5566
+static PetscErrorCode ourdestroy(void** ctx)ourdestroy121,5614
+#undef __FUNCT____FUNCT__127,5781
+static PetscErrorCode ourconvergence(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)ourconvergence129,5833
+#undef __FUNCT____FUNCT__134,6133
+static PetscErrorCode ourconvdestroy(void *ctx)ourconvdestroy136,6185
+#undef __FUNCT____FUNCT__142,6351
+static PetscErrorCode ourstopping(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)ourstopping144,6400
+#undef __FUNCT____FUNCT__149,6732
+static PetscErrorCode ourstopdestroy(void *ctx)ourstopdestroy151,6784
+#undef __FUNCT____FUNCT__157,6950
+static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)oureigenvaluecomparison159,7011
+PETSC_EXTERN void PETSC_STDCALL pepview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepview_165,7337
+PETSC_EXTERN void PETSC_STDCALL pepreasonview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepreasonview_172,7524
+PETSC_EXTERN void PETSC_STDCALL peperrorview_(PEP *pep,PEPErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)peperrorview_179,7723
+PETSC_EXTERN void PETSC_STDCALL pepvaluesview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepvaluesview_186,7947
+PETSC_EXTERN void PETSC_STDCALL pepvectorsview_(PEP *pep,PetscViewer *viewer,PetscErrorCode *ierr)pepvectorsview_193,8146
+PETSC_EXTERN void PETSC_STDCALL pepsettype_(PEP *pep,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepsettype_200,8347
+PETSC_EXTERN void PETSC_STDCALL pepgettype_(PEP *pep,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepgettype_209,8562
+PETSC_EXTERN void PETSC_STDCALL pepsetoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepsetoptionsprefix_218,8841
+PETSC_EXTERN void PETSC_STDCALL pepappendoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepappendoptionsprefix_227,9080
+PETSC_EXTERN void PETSC_STDCALL pepgetoptionsprefix_(PEP *pep,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))pepgetoptionsprefix_236,9325
+PETSC_EXTERN void PETSC_STDCALL pepmonitorset_(PEP *pep,void (PETSC_STDCALL *monitor)(PEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)pepmonitorset_244,9593
+PETSC_EXTERN void PETSC_STDCALL pepconvergedabsolute_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)pepconvergedabsolute_269,11635
+PETSC_EXTERN void PETSC_STDCALL pepconvergedrelative_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)pepconvergedrelative_274,11870
+PETSC_EXTERN void PETSC_STDCALL pepsetconvergencetestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)pepsetconvergencetestfunction_279,12105
+PETSC_EXTERN void PETSC_STDCALL pepstoppingbasic_(PEP *pep,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,PEPConvergedReason *reason,void *ctx,PetscErrorCode *ierr)pepstoppingbasic_298,13234
+PETSC_EXTERN void PETSC_STDCALL pepsetstoppingtestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)pepsetstoppingtestfunction_303,13488
+PETSC_EXTERN void PETSC_STDCALL pepseteigenvaluecomparison_(PEP *pep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)pepseteigenvaluecomparison_320,14464
 

 src/pep/interface/makefile,379
 makefile:^?makefile^A,1
@@ -6828,98 +7676,95 @@ PetscLogEvent     PEP_SetUp = 0,PEP_Solve = 0,PEP_Refine = 0;PEP_Refine29,1166
 #undef __FUNCT____FUNCT__31,1229
 #define __FUNCT__ __FUNCT__32,1246
 PetscErrorCode PEPCreate(MPI_Comm comm,PEP *outpep)PEPCreate51,1588
-#undef __FUNCT____FUNCT__131,4140
-#define __FUNCT__ __FUNCT__132,4157
-PetscErrorCode PEPSetType(PEP pep,PEPType type)PEPSetType162,5106
-#undef __FUNCT____FUNCT__186,5930
-#define __FUNCT__ __FUNCT__187,5947
-PetscErrorCode PEPGetType(PEP pep,PEPType *type)PEPGetType203,6226
-#undef __FUNCT____FUNCT__212,6445
-#define __FUNCT__ __FUNCT__213,6462
-PetscErrorCode PEPRegister(const char *name,PetscErrorCode (*function)(PEP))PEPRegister240,7091
-#undef __FUNCT____FUNCT__249,7314
-#define __FUNCT__ __FUNCT__250,7331
-PetscErrorCode PEPReset(PEP pep)PEPReset264,7606
-#undef __FUNCT____FUNCT__295,8715
-#define __FUNCT__ __FUNCT__296,8732
-PetscErrorCode PEPDestroy(PEP *pep)PEPDestroy309,8978
-#undef __FUNCT____FUNCT__334,9970
-#define __FUNCT__ __FUNCT__335,9987
-PetscErrorCode PEPSetBV(PEP pep,BV bv)PEPSetBV353,10405
-#undef __FUNCT____FUNCT__368,10850
-#define __FUNCT__ __FUNCT__369,10867
-PetscErrorCode PEPGetBV(PEP pep,BV *bv)PEPGetBV386,11192
-#undef __FUNCT____FUNCT__401,11583
-#define __FUNCT__ __FUNCT__402,11600
-PetscErrorCode PEPSetRG(PEP pep,RG rg)PEPSetRG420,11997
-#undef __FUNCT____FUNCT__435,12445
-#define __FUNCT__ __FUNCT__436,12462
-PetscErrorCode PEPGetRG(PEP pep,RG *rg)PEPGetRG453,12773
-#undef __FUNCT____FUNCT__468,13168
-#define __FUNCT__ __FUNCT__469,13185
-PetscErrorCode PEPSetDS(PEP pep,DS ds)PEPSetDS487,13603
-#undef __FUNCT____FUNCT__502,14051
-#define __FUNCT__ __FUNCT__503,14068
-PetscErrorCode PEPGetDS(PEP pep,DS *ds)PEPGetDS520,14393
-#undef __FUNCT____FUNCT__535,14788
-#define __FUNCT__ __FUNCT__536,14805
-PetscErrorCode PEPSetST(PEP pep,ST st)PEPSetST554,15243
-#undef __FUNCT____FUNCT__569,15691
-#define __FUNCT__ __FUNCT__570,15708
-PetscErrorCode PEPGetST(PEP pep,ST *st)PEPGetST587,16051
-#undef __FUNCT____FUNCT__602,16446
-#define __FUNCT__ __FUNCT__603,16463
-PetscErrorCode PEPRefineGetKSP(PEP pep,KSP *ksp)PEPRefineGetKSP620,16794
-#undef __FUNCT____FUNCT__645,17933
-#define __FUNCT__ __FUNCT__646,17950
-PetscErrorCode PEPSetTarget(PEP pep,PetscScalar target)PEPSetTarget671,18648
-#undef __FUNCT____FUNCT__684,19026
-#define __FUNCT__ __FUNCT__685,19043
-PetscErrorCode PEPGetTarget(PEP pep,PetscScalar* target)PEPGetTarget704,19384
-

-src/pep/interface/pepdefault.c,2420
+#undef __FUNCT____FUNCT__131,4049
+#define __FUNCT__ __FUNCT__132,4066
+PetscErrorCode PEPSetType(PEP pep,PEPType type)PEPSetType162,5015
+#undef __FUNCT____FUNCT__186,5839
+#define __FUNCT__ __FUNCT__187,5856
+PetscErrorCode PEPGetType(PEP pep,PEPType *type)PEPGetType203,6135
+#undef __FUNCT____FUNCT__212,6354
+#define __FUNCT__ __FUNCT__213,6371
+PetscErrorCode PEPRegister(const char *name,PetscErrorCode (*function)(PEP))PEPRegister240,7000
+#undef __FUNCT____FUNCT__249,7223
+#define __FUNCT__ __FUNCT__250,7240
+PetscErrorCode PEPReset(PEP pep)PEPReset264,7515
+#undef __FUNCT____FUNCT__295,8624
+#define __FUNCT__ __FUNCT__296,8641
+PetscErrorCode PEPDestroy(PEP *pep)PEPDestroy309,8887
+#undef __FUNCT____FUNCT__333,9821
+#define __FUNCT__ __FUNCT__334,9838
+PetscErrorCode PEPSetBV(PEP pep,BV bv)PEPSetBV352,10256
+#undef __FUNCT____FUNCT__367,10701
+#define __FUNCT__ __FUNCT__368,10718
+PetscErrorCode PEPGetBV(PEP pep,BV *bv)PEPGetBV385,11043
+#undef __FUNCT____FUNCT__400,11434
+#define __FUNCT__ __FUNCT__401,11451
+PetscErrorCode PEPSetRG(PEP pep,RG rg)PEPSetRG419,11848
+#undef __FUNCT____FUNCT__434,12296
+#define __FUNCT__ __FUNCT__435,12313
+PetscErrorCode PEPGetRG(PEP pep,RG *rg)PEPGetRG452,12624
+#undef __FUNCT____FUNCT__467,13019
+#define __FUNCT__ __FUNCT__468,13036
+PetscErrorCode PEPSetDS(PEP pep,DS ds)PEPSetDS486,13454
+#undef __FUNCT____FUNCT__501,13902
+#define __FUNCT__ __FUNCT__502,13919
+PetscErrorCode PEPGetDS(PEP pep,DS *ds)PEPGetDS519,14244
+#undef __FUNCT____FUNCT__534,14639
+#define __FUNCT__ __FUNCT__535,14656
+PetscErrorCode PEPSetST(PEP pep,ST st)PEPSetST553,15094
+#undef __FUNCT____FUNCT__568,15542
+#define __FUNCT__ __FUNCT__569,15559
+PetscErrorCode PEPGetST(PEP pep,ST *st)PEPGetST586,15902
+#undef __FUNCT____FUNCT__601,16297
+#define __FUNCT__ __FUNCT__602,16314
+PetscErrorCode PEPRefineGetKSP(PEP pep,KSP *ksp)PEPRefineGetKSP619,16645
+#undef __FUNCT____FUNCT__644,17784
+#define __FUNCT__ __FUNCT__645,17801
+PetscErrorCode PEPSetTarget(PEP pep,PetscScalar target)PEPSetTarget670,18499
+#undef __FUNCT____FUNCT__683,18877
+#define __FUNCT__ __FUNCT__684,18894
+PetscErrorCode PEPGetTarget(PEP pep,PetscScalar* target)PEPGetTarget703,19235
+

+src/pep/interface/pepdefault.c,2276
 pepdefault.c:^?pepdefault.c^A,1
 #undef __FUNCT____FUNCT__26,1066
 #define __FUNCT__ __FUNCT__27,1083
 PetscErrorCode PEPSetWorkVecs(PEP pep,PetscInt nw)PEPSetWorkVecs43,1455
 #undef __FUNCT____FUNCT__60,1949
 #define __FUNCT__ __FUNCT__61,1966
-PetscErrorCode PEPConvergedEigRelative(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedEigRelative65,2091
-#undef __FUNCT____FUNCT__75,2340
-#define __FUNCT__ __FUNCT__76,2357
-PetscErrorCode PEPConvergedLinear(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedLinear80,2484
-#undef __FUNCT____FUNCT__97,3246
-#define __FUNCT__ __FUNCT__98,3263
-PetscErrorCode PEPConvergedNorm(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedNorm102,3376
-#undef __FUNCT____FUNCT__126,4181
-#define __FUNCT__ __FUNCT__127,4198
-PetscErrorCode PEPConvergedAbsolute(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedAbsolute131,4301
-#undef __FUNCT____FUNCT__138,4492
-#define __FUNCT__ __FUNCT__139,4509
-PetscErrorCode PEPBackTransform_Default(PEP pep)PEPBackTransform_Default140,4554
-#undef __FUNCT____FUNCT__149,4760
-#define __FUNCT__ __FUNCT__150,4777
-PetscErrorCode PEPComputeVectors_Default(PEP pep)PEPComputeVectors_Default151,4823
-#undef __FUNCT____FUNCT__193,6189
-#define __FUNCT__ __FUNCT__194,6206
-PetscErrorCode PEPKrylovConvergence(PEP pep,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscInt *kout)PEPKrylovConvergence205,6498
-#undef __FUNCT____FUNCT__246,7796
-#define __FUNCT__ __FUNCT__247,7813
-PetscErrorCode PEPBuildDiagonalScaling(PEP pep)PEPBuildDiagonalScaling252,7981
-#undef __FUNCT____FUNCT__398,13720
-#define __FUNCT__ __FUNCT__399,13737
-PetscErrorCode PEPComputeScaleFactor(PEP pep)PEPComputeScaleFactor403,13859
-#undef __FUNCT____FUNCT__457,15729
-#define __FUNCT__ __FUNCT__458,15746
-PetscErrorCode PEPComputeLinearNorms(PEP pep)PEPComputeLinearNorms462,15862
-#undef __FUNCT____FUNCT__508,17546
-#define __FUNCT__ __FUNCT__509,17563
-PetscErrorCode PEPBasisCoefficients(PEP pep,PetscReal *pbc)PEPBasisCoefficients513,17674
-#undef __FUNCT____FUNCT__564,18943
-#define __FUNCT__ __FUNCT__565,18960
-PetscErrorCode PEPEvaluateBasis(PEP pep,PetscScalar sigma,PetscScalar isigma,PetscScalar *vals,PetscScalar *ivals)PEPEvaluateBasis569,19082
-

-src/pep/interface/pepmon.c,2242
+PetscErrorCode PEPConvergedRelative(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedRelative65,2085
+#undef __FUNCT____FUNCT__75,2331
+#define __FUNCT__ __FUNCT__76,2348
+PetscErrorCode PEPConvergedNorm(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedNorm80,2461
+#undef __FUNCT____FUNCT__104,3266
+#define __FUNCT__ __FUNCT__105,3283
+PetscErrorCode PEPConvergedAbsolute(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)PEPConvergedAbsolute109,3386
+#undef __FUNCT____FUNCT__116,3577
+#define __FUNCT__ __FUNCT__117,3594
+PetscErrorCode PEPStoppingBasic(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)PEPStoppingBasic150,4718
+#undef __FUNCT____FUNCT__166,5355
+#define __FUNCT__ __FUNCT__167,5372
+PetscErrorCode PEPBackTransform_Default(PEP pep)PEPBackTransform_Default168,5417
+#undef __FUNCT____FUNCT__177,5623
+#define __FUNCT__ __FUNCT__178,5640
+PetscErrorCode PEPComputeVectors_Default(PEP pep)PEPComputeVectors_Default179,5686
+#undef __FUNCT____FUNCT__221,7052
+#define __FUNCT__ __FUNCT__222,7069
+PetscErrorCode PEPKrylovConvergence(PEP pep,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscInt *kout)PEPKrylovConvergence233,7361
+#undef __FUNCT____FUNCT__273,8596
+#define __FUNCT__ __FUNCT__274,8613
+PetscErrorCode PEPBuildDiagonalScaling(PEP pep)PEPBuildDiagonalScaling279,8781
+#undef __FUNCT____FUNCT__425,14576
+#define __FUNCT__ __FUNCT__426,14593
+PetscErrorCode PEPComputeScaleFactor(PEP pep)PEPComputeScaleFactor430,14715
+#undef __FUNCT____FUNCT__484,16585
+#define __FUNCT__ __FUNCT__485,16602
+PetscErrorCode PEPBasisCoefficients(PEP pep,PetscReal *pbc)PEPBasisCoefficients489,16713
+#undef __FUNCT____FUNCT__540,17982
+#define __FUNCT__ __FUNCT__541,17999
+PetscErrorCode PEPEvaluateBasis(PEP pep,PetscScalar sigma,PetscScalar isigma,PetscScalar *vals,PetscScalar *ivals)PEPEvaluateBasis545,18121
+

+src/pep/interface/pepmon.c,2502
 pepmon.c:^?pepmon.c^A,1
 #undef __FUNCT____FUNCT__27,1050
 #define __FUNCT__ __FUNCT__28,1067
@@ -6938,127 +7783,157 @@ PetscErrorCode PEPGetMonitorContext(PEP pep,void **ctx)PEPGetMonitorContext157
 static PetscErrorCode PEPMonitorGetTrueEig(PEP pep,PetscScalar *er,PetscScalar *ei)PEPMonitorGetTrueEig170,5787
 #undef __FUNCT____FUNCT__187,6207
 #define __FUNCT__ __FUNCT__188,6224
-PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)PEPMonitorAll209,6877
-#undef __FUNCT____FUNCT__237,8178
-#define __FUNCT__ __FUNCT__238,8195
-PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)PEPMonitorFirst259,8858
-#undef __FUNCT____FUNCT__283,10082
-#define __FUNCT__ __FUNCT__284,10099
-PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)PEPMonitorConverged309,10819
-#undef __FUNCT____FUNCT__342,12342
-#define __FUNCT__ __FUNCT__343,12359
-PetscErrorCode PEPMonitorLG(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)PEPMonitorLG344,12392
-#undef __FUNCT____FUNCT__372,13447
-#define __FUNCT__ __FUNCT__373,13464
-PetscErrorCode PEPMonitorLGAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)PEPMonitorLGAll374,13500
-

-src/pep/interface/pepopts.c,4740
+PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)PEPMonitorAll209,6863
+#undef __FUNCT____FUNCT__246,8656
+#define __FUNCT__ __FUNCT__247,8673
+PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)PEPMonitorFirst268,9322
+#undef __FUNCT____FUNCT__303,11080
+#define __FUNCT__ __FUNCT__304,11097
+PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)PEPMonitorConverged325,11686
+#undef __FUNCT____FUNCT__365,13543
+#define __FUNCT__ __FUNCT__366,13560
+PetscErrorCode PEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)PEPMonitorLGCreate395,14360
+#undef __FUNCT____FUNCT__411,14906
+#define __FUNCT__ __FUNCT__412,14923
+PetscErrorCode PEPMonitorLG(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)PEPMonitorLG413,14956
+#undef __FUNCT____FUNCT__437,15802
+#define __FUNCT__ __FUNCT__438,15819
+PetscErrorCode PEPMonitorLGAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)PEPMonitorLGAll439,15855
+

+src/pep/interface/pepopts.c,6063
 pepopts.c:^?pepopts.c^A,1
-#undef __FUNCT____FUNCT__27,1086
-#define __FUNCT__ __FUNCT__28,1103
-PetscErrorCode PEPSetFromOptions(PEP pep)PEPSetFromOptions44,1503
-#undef __FUNCT____FUNCT__227,13816
-#define __FUNCT__ __FUNCT__228,13833
-PetscErrorCode PEPGetTolerances(PEP pep,PetscReal *tol,PetscInt *maxits)PEPGetTolerances249,14300
-#undef __FUNCT____FUNCT__258,14544
-#define __FUNCT__ __FUNCT__259,14561
-PetscErrorCode PEPSetTolerances(PEP pep,PetscReal tol,PetscInt maxits)PEPSetTolerances282,15185
-#undef __FUNCT____FUNCT__305,15995
-#define __FUNCT__ __FUNCT__306,16012
-PetscErrorCode PEPGetDimensions(PEP pep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)PEPGetDimensions328,16577
-#undef __FUNCT____FUNCT__338,16844
-#define __FUNCT__ __FUNCT__339,16861
-PetscErrorCode PEPSetDimensions(PEP pep,PetscInt nev,PetscInt ncv,PetscInt mpd)PEPSetDimensions374,18132
-#undef __FUNCT____FUNCT__399,19069
-#define __FUNCT__ __FUNCT__400,19086
-PetscErrorCode PEPSetWhichEigenpairs(PEP pep,PEPWhich which)PEPSetWhichEigenpairs451,21246
-#undef __FUNCT____FUNCT__480,22048
-#define __FUNCT__ __FUNCT__481,22065
-PetscErrorCode PEPGetWhichEigenpairs(PEP pep,PEPWhich *which)PEPGetWhichEigenpairs501,22522
-#undef __FUNCT____FUNCT__510,22737
-#define __FUNCT__ __FUNCT__511,22754
-PetscErrorCode PEPSetEigenvalueComparison(PEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)PEPSetEigenvalueComparison543,23897
-#undef __FUNCT____FUNCT__553,24254
-#define __FUNCT__ __FUNCT__554,24271
-PetscErrorCode PEPSetProblemType(PEP pep,PEPProblemType type)PEPSetProblemType584,25367
-#undef __FUNCT____FUNCT__594,25774
-#define __FUNCT__ __FUNCT__595,25791
-PetscErrorCode PEPGetProblemType(PEP pep,PEPProblemType *type)PEPGetProblemType611,26115
-#undef __FUNCT____FUNCT__620,26336
-#define __FUNCT__ __FUNCT__621,26353
-PetscErrorCode PEPSetBasis(PEP pep,PEPBasis basis)PEPSetBasis646,27121
-#undef __FUNCT____FUNCT__655,27342
-#define __FUNCT__ __FUNCT__656,27359
-PetscErrorCode PEPGetBasis(PEP pep,PEPBasis *basis)PEPGetBasis672,27668
-#undef __FUNCT____FUNCT__681,27873
-#define __FUNCT__ __FUNCT__682,27890
-PetscErrorCode PEPSetTrackAll(PEP pep,PetscBool trackall)PEPSetTrackAll705,28624
-#undef __FUNCT____FUNCT__714,28861
-#define __FUNCT__ __FUNCT__715,28878
-PetscErrorCode PEPGetTrackAll(PEP pep,PetscBool *trackall)PEPGetTrackAll732,29200
-#undef __FUNCT____FUNCT__741,29421
-#define __FUNCT__ __FUNCT__742,29438
-PetscErrorCode PEPSetConvergenceTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))PEPSetConvergenceTestFunction774,30633
-#undef __FUNCT____FUNCT__794,31434
-#define __FUNCT__ __FUNCT__795,31451
-PetscErrorCode PEPSetConvergenceTest(PEP pep,PEPConv conv)PEPSetConvergenceTest824,32562
-#undef __FUNCT____FUNCT__842,33237
-#define __FUNCT__ __FUNCT__843,33254
-PetscErrorCode PEPGetConvergenceTest(PEP pep,PEPConv *conv)PEPGetConvergenceTest860,33644
-#undef __FUNCT____FUNCT__869,33854
-#define __FUNCT__ __FUNCT__870,33871
-PetscErrorCode PEPSetScale(PEP pep,PEPScale scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)PEPSetScale914,35804
-#undef __FUNCT____FUNCT__960,37570
-#define __FUNCT__ __FUNCT__961,37587
-PetscErrorCode PEPGetScale(PEP pep,PEPScale *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)PEPGetScale989,38517
-#undef __FUNCT____FUNCT__1002,38947
-#define __FUNCT__ __FUNCT__1003,38964
-PetscErrorCode PEPSetExtract(PEP pep,PEPExtract extract)PEPSetExtract1020,39354
-#undef __FUNCT____FUNCT__1029,39587
-#define __FUNCT__ __FUNCT__1030,39604
-PetscErrorCode PEPGetExtract(PEP pep,PEPExtract *extract)PEPGetExtract1046,39897
-#undef __FUNCT____FUNCT__1054,40095
-#define __FUNCT__ __FUNCT__1055,40112
-PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PetscBool schur)PEPSetRefine1104,42188
-#undef __FUNCT____FUNCT__1147,43826
-#define __FUNCT__ __FUNCT__1148,43843
-PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur)PEPGetRefine1172,44458
-#undef __FUNCT____FUNCT__1184,44854
-#define __FUNCT__ __FUNCT__1185,44871
-PetscErrorCode PEPSetOptionsPrefix(PEP pep,const char *prefix)PEPSetOptionsPrefix1212,45625
-#undef __FUNCT____FUNCT__1230,46382
-#define __FUNCT__ __FUNCT__1231,46399
-PetscErrorCode PEPAppendOptionsPrefix(PEP pep,const char *prefix)PEPAppendOptionsPrefix1250,46959
-#undef __FUNCT____FUNCT__1276,48057
-#define __FUNCT__ __FUNCT__1277,48074
-PetscErrorCode PEPGetOptionsPrefix(PEP pep,const char *prefix[])PEPGetOptionsPrefix1297,48586
-

-src/pep/interface/peprefine.c,1473
+#undef __FUNCT____FUNCT__28,1109
+#define __FUNCT__ __FUNCT__29,1126
+PetscErrorCode PEPMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)PEPMonitorSetFromOptions48,1765
+#undef __FUNCT____FUNCT__69,2792
+#define __FUNCT__ __FUNCT__70,2809
+PetscErrorCode PEPConvMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))PEPConvMonitorSetFromOptions88,3428
+#undef __FUNCT____FUNCT__106,4329
+#define __FUNCT__ __FUNCT__107,4346
+PetscErrorCode PEPSetFromOptions(PEP pep)PEPSetFromOptions123,4746
+#undef __FUNCT____FUNCT__295,16712
+#define __FUNCT__ __FUNCT__296,16729
+PetscErrorCode PEPGetTolerances(PEP pep,PetscReal *tol,PetscInt *maxits)PEPGetTolerances317,17196
+#undef __FUNCT____FUNCT__326,17440
+#define __FUNCT__ __FUNCT__327,17457
+PetscErrorCode PEPSetTolerances(PEP pep,PetscReal tol,PetscInt maxits)PEPSetTolerances350,18081
+#undef __FUNCT____FUNCT__373,18891
+#define __FUNCT__ __FUNCT__374,18908
+PetscErrorCode PEPGetDimensions(PEP pep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)PEPGetDimensions396,19473
+#undef __FUNCT____FUNCT__406,19740
+#define __FUNCT__ __FUNCT__407,19757
+PetscErrorCode PEPSetDimensions(PEP pep,PetscInt nev,PetscInt ncv,PetscInt mpd)PEPSetDimensions442,21028
+#undef __FUNCT____FUNCT__467,21965
+#define __FUNCT__ __FUNCT__468,21982
+PetscErrorCode PEPSetWhichEigenpairs(PEP pep,PEPWhich which)PEPSetWhichEigenpairs519,24142
+#undef __FUNCT____FUNCT__548,24944
+#define __FUNCT__ __FUNCT__549,24961
+PetscErrorCode PEPGetWhichEigenpairs(PEP pep,PEPWhich *which)PEPGetWhichEigenpairs569,25418
+#undef __FUNCT____FUNCT__578,25633
+#define __FUNCT__ __FUNCT__579,25650
+PetscErrorCode PEPSetEigenvalueComparison(PEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)PEPSetEigenvalueComparison611,26793
+#undef __FUNCT____FUNCT__621,27150
+#define __FUNCT__ __FUNCT__622,27167
+PetscErrorCode PEPSetProblemType(PEP pep,PEPProblemType type)PEPSetProblemType652,28263
+#undef __FUNCT____FUNCT__665,28747
+#define __FUNCT__ __FUNCT__666,28764
+PetscErrorCode PEPGetProblemType(PEP pep,PEPProblemType *type)PEPGetProblemType682,29088
+#undef __FUNCT____FUNCT__691,29309
+#define __FUNCT__ __FUNCT__692,29326
+PetscErrorCode PEPSetBasis(PEP pep,PEPBasis basis)PEPSetBasis717,30094
+#undef __FUNCT____FUNCT__726,30315
+#define __FUNCT__ __FUNCT__727,30332
+PetscErrorCode PEPGetBasis(PEP pep,PEPBasis *basis)PEPGetBasis743,30641
+#undef __FUNCT____FUNCT__752,30846
+#define __FUNCT__ __FUNCT__753,30863
+PetscErrorCode PEPSetTrackAll(PEP pep,PetscBool trackall)PEPSetTrackAll776,31597
+#undef __FUNCT____FUNCT__785,31834
+#define __FUNCT__ __FUNCT__786,31851
+PetscErrorCode PEPGetTrackAll(PEP pep,PetscBool *trackall)PEPGetTrackAll803,32173
+#undef __FUNCT____FUNCT__812,32394
+#define __FUNCT__ __FUNCT__813,32411
+PetscErrorCode PEPSetConvergenceTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))PEPSetConvergenceTestFunction844,33571
+#undef __FUNCT____FUNCT__863,34301
+#define __FUNCT__ __FUNCT__864,34318
+PetscErrorCode PEPSetConvergenceTest(PEP pep,PEPConv conv)PEPSetConvergenceTest892,35372
+#undef __FUNCT____FUNCT__909,35974
+#define __FUNCT__ __FUNCT__910,35991
+PetscErrorCode PEPGetConvergenceTest(PEP pep,PEPConv *conv)PEPGetConvergenceTest927,36381
+#undef __FUNCT____FUNCT__936,36591
+#define __FUNCT__ __FUNCT__937,36608
+PetscErrorCode PEPSetStoppingTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))PEPSetStoppingTestFunction971,37934
+#undef __FUNCT____FUNCT__988,38533
+#define __FUNCT__ __FUNCT__989,38550
+PetscErrorCode PEPSetStoppingTest(PEP pep,PEPStop stop)PEPSetStoppingTest1013,39279
+#undef __FUNCT____FUNCT__1028,39733
+#define __FUNCT__ __FUNCT__1029,39750
+PetscErrorCode PEPGetStoppingTest(PEP pep,PEPStop *stop)PEPGetStoppingTest1046,40128
+#undef __FUNCT____FUNCT__1055,40335
+#define __FUNCT__ __FUNCT__1056,40352
+PetscErrorCode PEPSetScale(PEP pep,PEPScale scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)PEPSetScale1100,42285
+#undef __FUNCT____FUNCT__1146,44051
+#define __FUNCT__ __FUNCT__1147,44068
+PetscErrorCode PEPGetScale(PEP pep,PEPScale *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)PEPGetScale1175,44998
+#undef __FUNCT____FUNCT__1188,45428
+#define __FUNCT__ __FUNCT__1189,45445
+PetscErrorCode PEPSetExtract(PEP pep,PEPExtract extract)PEPSetExtract1206,45835
+#undef __FUNCT____FUNCT__1215,46068
+#define __FUNCT__ __FUNCT__1216,46085
+PetscErrorCode PEPGetExtract(PEP pep,PEPExtract *extract)PEPGetExtract1232,46378
+#undef __FUNCT____FUNCT__1240,46576
+#define __FUNCT__ __FUNCT__1241,46593
+PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PEPRefineScheme scheme)PEPSetRefine1290,48674
+#undef __FUNCT____FUNCT__1333,50359
+#define __FUNCT__ __FUNCT__1334,50376
+PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PEPRefineScheme *scheme)PEPGetRefine1358,50982
+#undef __FUNCT____FUNCT__1370,51386
+#define __FUNCT__ __FUNCT__1371,51403
+PetscErrorCode PEPSetOptionsPrefix(PEP pep,const char *prefix)PEPSetOptionsPrefix1398,52157
+#undef __FUNCT____FUNCT__1416,52914
+#define __FUNCT__ __FUNCT__1417,52931
+PetscErrorCode PEPAppendOptionsPrefix(PEP pep,const char *prefix)PEPAppendOptionsPrefix1436,53491
+#undef __FUNCT____FUNCT__1462,54589
+#define __FUNCT__ __FUNCT__1463,54606
+PetscErrorCode PEPGetOptionsPrefix(PEP pep,const char *prefix[])PEPGetOptionsPrefix1484,55120
+

+src/pep/interface/peprefine.c,1961
 peprefine.c:^?peprefine.c^A,1
 #define NREF_MAXIT NREF_MAXIT27,1036
-  VecScatter    *scatter_id;scatter_id30,1076
-  Mat           *A;A31,1105
-  Vec           vg,v;vg32,1125
-  Vec           vg,v;v32,1125
+  VecScatter *scatter_id,nst;scatter_id30,1076
+  VecScatter *scatter_id,nst;nst30,1076
+  Mat        *A;A31,1106
+  Vec        nv,vg,v,w;nv32,1123
+  Vec        nv,vg,v,w;vg32,1123
+  Vec        nv,vg,v,w;v32,1123
+  Vec        nv,vg,v,w;w32,1123
 } PEPSimpNRefctx;PEPSimpNRefctx33,1147
-#undef __FUNCT____FUNCT__35,1166
-#define __FUNCT__ __FUNCT__36,1183
-static PetscErrorCode PEPSimpleNRefSetUp(PEP pep,PEPSimpNRefctx **ctx_)PEPSimpleNRefSetUp37,1222
-#undef __FUNCT____FUNCT__90,3240
-#define __FUNCT__ __FUNCT__91,3257
-static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)PEPSimpleNRefGatherEigenpair92,3306
-#undef __FUNCT____FUNCT__125,4655
-#define __FUNCT__ __FUNCT__126,4672
-static PetscErrorCode PEPSimpleNRefScatterEigenvector(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)PEPSimpleNRefScatterEigenvector127,4724
-#undef __FUNCT____FUNCT__151,5623
-#define __FUNCT__ __FUNCT__152,5640
-static PetscErrorCode PEPEvaluateFunctionDerivatives(PEP pep,PetscScalar alpha,PetscScalar *vals)PEPEvaluateFunctionDerivatives153,5691
-#undef __FUNCT____FUNCT__172,6186
-#define __FUNCT__ __FUNCT__173,6203
-static PetscErrorCode PEPSimpleNRefSetUpSystem(PEP pep,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)PEPSimpleNRefSetUpSystem174,6248
-#undef __FUNCT____FUNCT__276,10445
-#define __FUNCT__ __FUNCT__277,10462
-PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol,PetscInt k)PEPNewtonRefinementSimple278,10508
+  Mat          M1;M136,1183
+  Vec          M2,M3;M237,1202
+  Vec          M2,M3;M337,1202
+  PetscScalar  M4,m3;M438,1224
+  PetscScalar  M4,m3;m338,1224
+} FSubctx;FSubctx39,1246
+#undef __FUNCT____FUNCT__41,1258
+#define __FUNCT__ __FUNCT__42,1275
+static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)MatFSMult43,1305
+#undef __FUNCT____FUNCT__58,1690
+#define __FUNCT__ __FUNCT__59,1707
+static PetscErrorCode PEPSimpleNRefSetUp(PEP pep,PEPSimpNRefctx **ctx_)PEPSimpleNRefSetUp60,1746
+#undef __FUNCT____FUNCT__135,4825
+#define __FUNCT__ __FUNCT__136,4842
+static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)PEPSimpleNRefGatherEigenpair137,4891
+#undef __FUNCT____FUNCT__178,6628
+#define __FUNCT__ __FUNCT__179,6645
+static PetscErrorCode PEPSimpleNRefScatterEigenvector(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)PEPSimpleNRefScatterEigenvector180,6697
+#undef __FUNCT____FUNCT__204,7596
+#define __FUNCT__ __FUNCT__205,7613
+static PetscErrorCode PEPEvaluateFunctionDerivatives(PEP pep,PetscScalar alpha,PetscScalar *vals)PEPEvaluateFunctionDerivatives206,7664
+#undef __FUNCT____FUNCT__225,8159
+#define __FUNCT__ __FUNCT__226,8176
+static PetscErrorCode PEPSimpleNRefSetUpSystem(PEP pep,Mat *A,PEPSimpNRefctx *ctx,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)PEPSimpleNRefSetUpSystem227,8221
+#undef __FUNCT____FUNCT__396,14970
+#define __FUNCT__ __FUNCT__397,14987
+PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal tol,PetscInt k)PEPNewtonRefinementSimple398,15033
 

 src/pep/interface/pepregis.c,131
 pepregis.c:^?pepregis.c^A,1
@@ -7066,29 +7941,29 @@ pepregis.c:^?pepregis.c^A,1
 #define __FUNCT__ __FUNCT__31,1254
 PetscErrorCode PEPRegisterAll(void)PEPRegisterAll41,1429
 

-src/pep/interface/pepsetup.c,1135
+src/pep/interface/pepsetup.c,1137
 pepsetup.c:^?pepsetup.c^A,1
 #undef __FUNCT____FUNCT__26,1033
 #define __FUNCT__ __FUNCT__27,1050
 PetscErrorCode PEPSetUp(PEP pep)PEPSetUp46,1528
-#undef __FUNCT____FUNCT__206,7425
-#define __FUNCT__ __FUNCT__207,7442
-PetscErrorCode PEPSetOperators(PEP pep,PetscInt nmat,Mat A[])PEPSetOperators229,8157
-#undef __FUNCT____FUNCT__260,9607
-#define __FUNCT__ __FUNCT__261,9624
-PetscErrorCode PEPGetOperators(PEP pep,PetscInt k,Mat *A)PEPGetOperators278,10070
-#undef __FUNCT____FUNCT__288,10392
-#define __FUNCT__ __FUNCT__289,10409
-PetscErrorCode PEPGetNumMatrices(PEP pep,PetscInt *nmat)PEPGetNumMatrices305,10730
-#undef __FUNCT____FUNCT__314,10937
-#define __FUNCT__ __FUNCT__315,10954
-PetscErrorCode PEPSetInitialSpace(PEP pep,PetscInt n,Vec *is)PEPSetInitialSpace342,11867
-#undef __FUNCT____FUNCT__355,12329
-#define __FUNCT__ __FUNCT__356,12346
-PetscErrorCode PEPSetDimensions_Default(PEP pep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)PEPSetDimensions_Default361,12513
-#undef __FUNCT____FUNCT__389,13492
-#define __FUNCT__ __FUNCT__390,13509
-PetscErrorCode PEPAllocateSolution(PEP pep,PetscInt extra)PEPAllocateSolution408,14000
+#undef __FUNCT____FUNCT__233,9077
+#define __FUNCT__ __FUNCT__234,9094
+PetscErrorCode PEPSetOperators(PEP pep,PetscInt nmat,Mat A[])PEPSetOperators256,9809
+#undef __FUNCT____FUNCT__287,11259
+#define __FUNCT__ __FUNCT__288,11276
+PetscErrorCode PEPGetOperators(PEP pep,PetscInt k,Mat *A)PEPGetOperators305,11722
+#undef __FUNCT____FUNCT__315,12044
+#define __FUNCT__ __FUNCT__316,12061
+PetscErrorCode PEPGetNumMatrices(PEP pep,PetscInt *nmat)PEPGetNumMatrices332,12382
+#undef __FUNCT____FUNCT__341,12589
+#define __FUNCT__ __FUNCT__342,12606
+PetscErrorCode PEPSetInitialSpace(PEP pep,PetscInt n,Vec *is)PEPSetInitialSpace369,13519
+#undef __FUNCT____FUNCT__382,13981
+#define __FUNCT__ __FUNCT__383,13998
+PetscErrorCode PEPSetDimensions_Default(PEP pep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)PEPSetDimensions_Default388,14165
+#undef __FUNCT____FUNCT__416,15144
+#define __FUNCT__ __FUNCT__417,15161
+PetscErrorCode PEPAllocateSolution(PEP pep,PetscInt extra)PEPAllocateSolution435,15652
 

 src/pep/interface/pepsolve.c,1737
 pepsolve.c:^?pepsolve.c^A,1
@@ -7102,78 +7977,78 @@ PetscErrorCode PEPExtractVectors(PEP pep)PEPExtractVectors50,1545
 #define __FUNCT__ __FUNCT__69,1895
 PetscErrorCode PEPSolve(PEP pep)PEPSolve93,2823
 #define OPTLEN OPTLEN98,2934
-#undef __FUNCT____FUNCT__176,5638
-#define __FUNCT__ __FUNCT__177,5655
-PetscErrorCode PEPGetIterationNumber(PEP pep,PetscInt *its)PEPGetIterationNumber202,6420
-#undef __FUNCT____FUNCT__211,6630
-#define __FUNCT__ __FUNCT__212,6647
-PetscErrorCode PEPGetConverged(PEP pep,PetscInt *nconv)PEPGetConverged231,7038
-#undef __FUNCT____FUNCT__241,7275
-#define __FUNCT__ __FUNCT__242,7292
-PetscErrorCode PEPGetConvergedReason(PEP pep,PEPConvergedReason *reason)PEPGetConvergedReason268,8048
-#undef __FUNCT____FUNCT__278,8302
-#define __FUNCT__ __FUNCT__279,8319
-PetscErrorCode PEPGetEigenpair(PEP pep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)PEPGetEigenpair314,9605
-#undef __FUNCT____FUNCT__361,11236
-#define __FUNCT__ __FUNCT__362,11253
-PetscErrorCode PEPGetErrorEstimate(PEP pep,PetscInt i,PetscReal *errest)PEPGetErrorEstimate385,11794
-#undef __FUNCT____FUNCT__396,12179
-#define __FUNCT__ __FUNCT__397,12196
-PetscErrorCode PEPComputeResidualNorm_Private(PEP pep,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)PEPComputeResidualNorm_Private407,12517
-#undef __FUNCT____FUNCT__482,14563
-#define __FUNCT__ __FUNCT__483,14580
-PetscErrorCode PEPComputeError(PEP pep,PetscInt i,PEPErrorType type,PetscReal *error)PEPComputeError507,15229
-

-src/pep/interface/pepview.c,2625
+#undef __FUNCT____FUNCT__176,5619
+#define __FUNCT__ __FUNCT__177,5636
+PetscErrorCode PEPGetIterationNumber(PEP pep,PetscInt *its)PEPGetIterationNumber202,6401
+#undef __FUNCT____FUNCT__211,6611
+#define __FUNCT__ __FUNCT__212,6628
+PetscErrorCode PEPGetConverged(PEP pep,PetscInt *nconv)PEPGetConverged231,7019
+#undef __FUNCT____FUNCT__241,7256
+#define __FUNCT__ __FUNCT__242,7273
+PetscErrorCode PEPGetConvergedReason(PEP pep,PEPConvergedReason *reason)PEPGetConvergedReason269,8109
+#undef __FUNCT____FUNCT__279,8363
+#define __FUNCT__ __FUNCT__280,8380
+PetscErrorCode PEPGetEigenpair(PEP pep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)PEPGetEigenpair315,9666
+#undef __FUNCT____FUNCT__362,11297
+#define __FUNCT__ __FUNCT__363,11314
+PetscErrorCode PEPGetErrorEstimate(PEP pep,PetscInt i,PetscReal *errest)PEPGetErrorEstimate386,11855
+#undef __FUNCT____FUNCT__397,12240
+#define __FUNCT__ __FUNCT__398,12257
+PetscErrorCode PEPComputeResidualNorm_Private(PEP pep,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)PEPComputeResidualNorm_Private408,12578
+#undef __FUNCT____FUNCT__483,14624
+#define __FUNCT__ __FUNCT__484,14641
+PetscErrorCode PEPComputeError(PEP pep,PetscInt i,PEPErrorType type,PetscReal *error)PEPComputeError508,15290
+

+src/pep/interface/pepview.c,2624
 pepview.c:^?pepview.c^A,1
 #undef __FUNCT____FUNCT__27,1058
 #define __FUNCT__ __FUNCT__28,1075
 PetscErrorCode PEPView(PEP pep,PetscViewer viewer)PEPView56,1873
 #define HERM HERM72,2370
-#undef __FUNCT____FUNCT__221,9988
-#define __FUNCT__ __FUNCT__222,10005
-PetscErrorCode PEPReasonView(PEP pep,PetscViewer viewer)PEPReasonView239,10450
-#undef __FUNCT____FUNCT__258,11449
-#define __FUNCT__ __FUNCT__259,11466
-PetscErrorCode PEPReasonViewFromOptions(PEP pep)PEPReasonViewFromOptions271,11744
-#undef __FUNCT____FUNCT__293,12475
-#define __FUNCT__ __FUNCT__294,12492
-static PetscErrorCode PEPErrorView_ASCII(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView_ASCII295,12531
-#undef __FUNCT____FUNCT__343,14340
-#define __FUNCT__ __FUNCT__344,14357
-static PetscErrorCode PEPErrorView_DETAIL(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView_DETAIL345,14397
-#define EXLEN EXLEN351,14585
-#undef __FUNCT____FUNCT__388,15863
-#define __FUNCT__ __FUNCT__389,15880
-static PetscErrorCode PEPErrorView_MATLAB(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView_MATLAB390,15920
-#undef __FUNCT____FUNCT__408,16532
-#define __FUNCT__ __FUNCT__409,16549
-PetscErrorCode PEPErrorView(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView436,17432
-#undef __FUNCT____FUNCT__469,18609
-#define __FUNCT__ __FUNCT__470,18626
-PetscErrorCode PEPErrorViewFromOptions(PEP pep)PEPErrorViewFromOptions482,18914
-#undef __FUNCT____FUNCT__518,20480
-#define __FUNCT__ __FUNCT__519,20497
-static PetscErrorCode PEPValuesView_DRAW(PEP pep,PetscViewer viewer)PEPValuesView_DRAW520,20536
-#undef __FUNCT____FUNCT__550,21521
-#define __FUNCT__ __FUNCT__551,21538
-static PetscErrorCode PEPValuesView_ASCII(PEP pep,PetscViewer viewer)PEPValuesView_ASCII552,21578
-#undef __FUNCT____FUNCT__581,22466
-#define __FUNCT__ __FUNCT__582,22483
-static PetscErrorCode PEPValuesView_MATLAB(PEP pep,PetscViewer viewer)PEPValuesView_MATLAB583,22524
-#undef __FUNCT____FUNCT__612,23399
-#define __FUNCT__ __FUNCT__613,23416
-PetscErrorCode PEPValuesView(PEP pep,PetscViewer viewer)PEPValuesView630,23783
-#undef __FUNCT____FUNCT__664,25038
-#define __FUNCT__ __FUNCT__665,25055
-PetscErrorCode PEPValuesViewFromOptions(PEP pep)PEPValuesViewFromOptions677,25334
-#undef __FUNCT____FUNCT__699,26060
-#define __FUNCT__ __FUNCT__700,26077
-PetscErrorCode PEPVectorsView(PEP pep,PetscViewer viewer)PEPVectorsView722,26644
-#define NMLEN NMLEN727,26769
-#undef __FUNCT____FUNCT__752,27647
-#define __FUNCT__ __FUNCT__753,27664
-PetscErrorCode PEPVectorsViewFromOptions(PEP pep)PEPVectorsViewFromOptions765,27946
+#undef __FUNCT____FUNCT__215,9787
+#define __FUNCT__ __FUNCT__216,9804
+PetscErrorCode PEPReasonView(PEP pep,PetscViewer viewer)PEPReasonView233,10249
+#undef __FUNCT____FUNCT__252,11248
+#define __FUNCT__ __FUNCT__253,11265
+PetscErrorCode PEPReasonViewFromOptions(PEP pep)PEPReasonViewFromOptions265,11543
+#undef __FUNCT____FUNCT__287,12274
+#define __FUNCT__ __FUNCT__288,12291
+static PetscErrorCode PEPErrorView_ASCII(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView_ASCII289,12330
+#undef __FUNCT____FUNCT__337,14139
+#define __FUNCT__ __FUNCT__338,14156
+static PetscErrorCode PEPErrorView_DETAIL(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView_DETAIL339,14196
+#define EXLEN EXLEN345,14384
+#undef __FUNCT____FUNCT__382,15662
+#define __FUNCT__ __FUNCT__383,15679
+static PetscErrorCode PEPErrorView_MATLAB(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView_MATLAB384,15719
+#undef __FUNCT____FUNCT__402,16331
+#define __FUNCT__ __FUNCT__403,16348
+PetscErrorCode PEPErrorView(PEP pep,PEPErrorType etype,PetscViewer viewer)PEPErrorView430,17231
+#undef __FUNCT____FUNCT__463,18408
+#define __FUNCT__ __FUNCT__464,18425
+PetscErrorCode PEPErrorViewFromOptions(PEP pep)PEPErrorViewFromOptions476,18713
+#undef __FUNCT____FUNCT__512,20279
+#define __FUNCT__ __FUNCT__513,20296
+static PetscErrorCode PEPValuesView_DRAW(PEP pep,PetscViewer viewer)PEPValuesView_DRAW514,20335
+#undef __FUNCT____FUNCT__545,21368
+#define __FUNCT__ __FUNCT__546,21385
+static PetscErrorCode PEPValuesView_ASCII(PEP pep,PetscViewer viewer)PEPValuesView_ASCII547,21425
+#undef __FUNCT____FUNCT__576,22313
+#define __FUNCT__ __FUNCT__577,22330
+static PetscErrorCode PEPValuesView_MATLAB(PEP pep,PetscViewer viewer)PEPValuesView_MATLAB578,22371
+#undef __FUNCT____FUNCT__607,23246
+#define __FUNCT__ __FUNCT__608,23263
+PetscErrorCode PEPValuesView(PEP pep,PetscViewer viewer)PEPValuesView625,23630
+#undef __FUNCT____FUNCT__659,24885
+#define __FUNCT__ __FUNCT__660,24902
+PetscErrorCode PEPValuesViewFromOptions(PEP pep)PEPValuesViewFromOptions672,25181
+#undef __FUNCT____FUNCT__694,25907
+#define __FUNCT__ __FUNCT__695,25924
+PetscErrorCode PEPVectorsView(PEP pep,PetscViewer viewer)PEPVectorsView717,26491
+#define NMLEN NMLEN722,26616
+#undef __FUNCT____FUNCT__747,27499
+#define __FUNCT__ __FUNCT__748,27516
+PetscErrorCode PEPVectorsViewFromOptions(PEP pep)PEPVectorsViewFromOptions760,27798
 

 src/pep/makefile,211
 makefile:^?makefile^A,1
@@ -7241,14 +8116,14 @@ int main(int argc,char **argv)main31,1202
 

 src/svd/examples/tutorials/ex15f.F,530
 ex15f.F:^?ex15f.F^A,1
-      program mainmain30,1291
- 100  format (/'Lauchli SVD, n =',I3,', mu=',E12.4,' (Fortran)')10072,2608
- 110  format (/' Number of iterations of the method:',I4)110123,4332
- 120  format (' Solution method: ',A)120130,4567
- 130  format (' Number of requested singular values:',I2)130136,4797
- 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)140141,4975
- 150  format (' Number of converged approximate singular triplets:',I2/)150152,5390
- 160      format (1P,'   ',E12.4,'       ',E12.4)160170,6153
+      program mainmain30,1296
+ 100  format (/'Lauchli SVD, n =',I3,', mu=',E12.4,' (Fortran)')10074,2719
+ 110  format (/' Number of iterations of the method:',I4)110125,4443
+ 120  format (' Solution method: ',A)120132,4678
+ 130  format (' Number of requested singular values:',I2)130138,4908
+ 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)140143,5086
+ 150  format (' Number of converged approximate singular triplets:',I2/)150154,5501
+ 160      format (1P,'   ',E12.4,'       ',E12.4)160172,6264
 

 src/svd/examples/tutorials/ex8.c,277
 ex8.c:^?ex8.c^A,1
@@ -7291,7 +8166,7 @@ slepcsvdmod.F:^?slepcsvdmod.F^A,1
         module slepcsvddefslepcsvddef22,965
         module slepcsvdslepcsvd29,1143
 

-src/svd/impls/cross/cross.c,2393
+src/svd/impls/cross/cross.c,2571
 cross.c:^?cross.c^A,1
   EPS       eps;eps31,1177
   Mat       mat;mat32,1194
@@ -7303,43 +8178,46 @@ cross.c:^?cross.c^A,1
 static PetscErrorCode MatMult_Cross(Mat B,Vec x,Vec y)MatMult_Cross38,1296
 #undef __FUNCT____FUNCT__52,1692
 #define __FUNCT__ __FUNCT__53,1709
-static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)MatGetDiagonal_Cross54,1750
-#undef __FUNCT____FUNCT__102,3668
-#define __FUNCT__ __FUNCT__103,3685
-PetscErrorCode SVDSetUp_Cross(SVD svd)SVDSetUp_Cross104,3720
-#undef __FUNCT____FUNCT__145,5931
-#define __FUNCT__ __FUNCT__146,5948
-PetscErrorCode SVDSolve_Cross(SVD svd)SVDSolve_Cross147,5983
-#undef __FUNCT____FUNCT__170,6872
-#define __FUNCT__ __FUNCT__171,6889
-static PetscErrorCode SVDMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)SVDMonitor_Cross172,6926
-#undef __FUNCT____FUNCT__190,7539
-#define __FUNCT__ __FUNCT__191,7556
-PetscErrorCode SVDSetFromOptions_Cross(PetscOptions *PetscOptionsObject,SVD svd)SVDSetFromOptions_Cross192,7600
-#undef __FUNCT____FUNCT__205,8062
-#define __FUNCT__ __FUNCT__206,8079
-static PetscErrorCode SVDCrossSetEPS_Cross(SVD svd,EPS eps)SVDCrossSetEPS_Cross207,8120
-#undef __FUNCT____FUNCT__221,8558
-#define __FUNCT__ __FUNCT__222,8575
-PetscErrorCode SVDCrossSetEPS(SVD svd,EPS eps)SVDCrossSetEPS237,8864
-#undef __FUNCT____FUNCT__249,9200
-#define __FUNCT__ __FUNCT__250,9217
-static PetscErrorCode SVDCrossGetEPS_Cross(SVD svd,EPS *eps)SVDCrossGetEPS_Cross251,9258
-#undef __FUNCT____FUNCT__273,10202
-#define __FUNCT__ __FUNCT__274,10219
-PetscErrorCode SVDCrossGetEPS(SVD svd,EPS *eps)SVDCrossGetEPS291,10537
-#undef __FUNCT____FUNCT__302,10821
-#define __FUNCT__ __FUNCT__303,10838
-PetscErrorCode SVDView_Cross(SVD svd,PetscViewer viewer)SVDView_Cross304,10872
-#undef __FUNCT____FUNCT__317,11294
-#define __FUNCT__ __FUNCT__318,11311
-PetscErrorCode SVDReset_Cross(SVD svd)SVDReset_Cross319,11346
-#undef __FUNCT____FUNCT__332,11719
-#define __FUNCT__ __FUNCT__333,11736
-PetscErrorCode SVDDestroy_Cross(SVD svd)SVDDestroy_Cross334,11773
-#undef __FUNCT____FUNCT__347,12219
-#define __FUNCT__ __FUNCT__348,12236
-PETSC_EXTERN PetscErrorCode SVDCreate_Cross(SVD svd)SVDCreate_Cross349,12272
+static PetscErrorCode MatCreateVecs_Cross(Mat B,Vec *right,Vec *left)MatCreateVecs_Cross54,1749
+#undef __FUNCT____FUNCT__70,2190
+#define __FUNCT__ __FUNCT__71,2207
+static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)MatGetDiagonal_Cross72,2248
+#undef __FUNCT____FUNCT__122,4243
+#define __FUNCT__ __FUNCT__123,4260
+PetscErrorCode SVDSetUp_Cross(SVD svd)SVDSetUp_Cross124,4295
+#undef __FUNCT____FUNCT__175,7136
+#define __FUNCT__ __FUNCT__176,7153
+PetscErrorCode SVDSolve_Cross(SVD svd)SVDSolve_Cross177,7188
+#undef __FUNCT____FUNCT__200,8077
+#define __FUNCT__ __FUNCT__201,8094
+static PetscErrorCode EPSMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)EPSMonitor_Cross202,8131
+#undef __FUNCT____FUNCT__220,8744
+#define __FUNCT__ __FUNCT__221,8761
+PetscErrorCode SVDSetFromOptions_Cross(PetscOptionItems *PetscOptionsObject,SVD svd)SVDSetFromOptions_Cross222,8805
+#undef __FUNCT____FUNCT__235,9271
+#define __FUNCT__ __FUNCT__236,9288
+static PetscErrorCode SVDCrossSetEPS_Cross(SVD svd,EPS eps)SVDCrossSetEPS_Cross237,9329
+#undef __FUNCT____FUNCT__251,9767
+#define __FUNCT__ __FUNCT__252,9784
+PetscErrorCode SVDCrossSetEPS(SVD svd,EPS eps)SVDCrossSetEPS267,10073
+#undef __FUNCT____FUNCT__279,10409
+#define __FUNCT__ __FUNCT__280,10426
+static PetscErrorCode SVDCrossGetEPS_Cross(SVD svd,EPS *eps)SVDCrossGetEPS_Cross281,10467
+#undef __FUNCT____FUNCT__303,11417
+#define __FUNCT__ __FUNCT__304,11434
+PetscErrorCode SVDCrossGetEPS(SVD svd,EPS *eps)SVDCrossGetEPS321,11752
+#undef __FUNCT____FUNCT__332,12036
+#define __FUNCT__ __FUNCT__333,12053
+PetscErrorCode SVDView_Cross(SVD svd,PetscViewer viewer)SVDView_Cross334,12087
+#undef __FUNCT____FUNCT__351,12658
+#define __FUNCT__ __FUNCT__352,12675
+PetscErrorCode SVDReset_Cross(SVD svd)SVDReset_Cross353,12710
+#undef __FUNCT____FUNCT__366,13083
+#define __FUNCT__ __FUNCT__367,13100
+PetscErrorCode SVDDestroy_Cross(SVD svd)SVDDestroy_Cross368,13137
+#undef __FUNCT____FUNCT__381,13583
+#define __FUNCT__ __FUNCT__382,13600
+PETSC_EXTERN PetscErrorCode SVDCreate_Cross(SVD svd)SVDCreate_Cross383,13636
 

 src/svd/impls/cross/makefile,275
 makefile:^?makefile^A,1
@@ -7353,7 +8231,7 @@ DIRS     =DIRS30,1022
 MANSEC   = SVDMANSEC31,1033
 LOCDIR   = src/svd/impls/cross/LOCDIR32,1048
 

-src/svd/impls/cyclic/cyclic.c,3374
+src/svd/impls/cyclic/cyclic.c,3378
 cyclic.c:^?cyclic.c^A,1
   PetscBool explicitmatrix;explicitmatrix31,1196
   EPS       eps;eps32,1224
@@ -7372,51 +8250,51 @@ static PetscErrorCode MatGetDiagonal_Cyclic(Mat B,Vec diag)MatGetDiagonal_Cycli
 #undef __FUNCT____FUNCT__80,2751
 #define __FUNCT__ __FUNCT__81,2768
 PetscErrorCode SVDSetUp_Cyclic(SVD svd)SVDSetUp_Cyclic82,2804
-#undef __FUNCT____FUNCT__196,9020
-#define __FUNCT__ __FUNCT__197,9037
-PetscErrorCode SVDSolve_Cyclic(SVD svd)SVDSolve_Cyclic198,9073
-#undef __FUNCT____FUNCT__243,10895
-#define __FUNCT__ __FUNCT__244,10912
-static PetscErrorCode SVDMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)SVDMonitor_Cyclic245,10950
-#undef __FUNCT____FUNCT__269,11677
-#define __FUNCT__ __FUNCT__270,11694
-PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptions *PetscOptionsObject,SVD svd)SVDSetFromOptions_Cyclic271,11739
-#undef __FUNCT____FUNCT__295,12706
-#define __FUNCT__ __FUNCT__296,12723
-static PetscErrorCode SVDCyclicSetExplicitMatrix_Cyclic(SVD svd,PetscBool explicitmatrix)SVDCyclicSetExplicitMatrix_Cyclic297,12777
-#undef __FUNCT____FUNCT__306,13011
-#define __FUNCT__ __FUNCT__307,13028
-PetscErrorCode SVDCyclicSetExplicitMatrix(SVD svd,PetscBool explicitmatrix)SVDCyclicSetExplicitMatrix325,13519
-#undef __FUNCT____FUNCT__336,13888
-#define __FUNCT__ __FUNCT__337,13905
-static PetscErrorCode SVDCyclicGetExplicitMatrix_Cyclic(SVD svd,PetscBool *explicitmatrix)SVDCyclicGetExplicitMatrix_Cyclic338,13959
-#undef __FUNCT____FUNCT__347,14195
-#define __FUNCT__ __FUNCT__348,14212
-PetscErrorCode SVDCyclicGetExplicitMatrix(SVD svd,PetscBool *explicitmatrix)SVDCyclicGetExplicitMatrix364,14537
-#undef __FUNCT____FUNCT__375,14890
-#define __FUNCT__ __FUNCT__376,14907
-static PetscErrorCode SVDCyclicSetEPS_Cyclic(SVD svd,EPS eps)SVDCyclicSetEPS_Cyclic377,14950
-#undef __FUNCT____FUNCT__391,15397
-#define __FUNCT__ __FUNCT__392,15414
-PetscErrorCode SVDCyclicSetEPS(SVD svd,EPS eps)SVDCyclicSetEPS407,15706
-#undef __FUNCT____FUNCT__419,16044
-#define __FUNCT__ __FUNCT__420,16061
-static PetscErrorCode SVDCyclicGetEPS_Cyclic(SVD svd,EPS *eps)SVDCyclicGetEPS_Cyclic421,16104
-#undef __FUNCT____FUNCT__440,16930
-#define __FUNCT__ __FUNCT__441,16947
-PetscErrorCode SVDCyclicGetEPS(SVD svd,EPS *eps)SVDCyclicGetEPS458,17268
-#undef __FUNCT____FUNCT__469,17554
-#define __FUNCT__ __FUNCT__470,17571
-PetscErrorCode SVDView_Cyclic(SVD svd,PetscViewer viewer)SVDView_Cyclic471,17606
-#undef __FUNCT____FUNCT__485,18159
-#define __FUNCT__ __FUNCT__486,18176
-PetscErrorCode SVDReset_Cyclic(SVD svd)SVDReset_Cyclic487,18212
-#undef __FUNCT____FUNCT__502,18689
-#define __FUNCT__ __FUNCT__503,18706
-PetscErrorCode SVDDestroy_Cyclic(SVD svd)SVDDestroy_Cyclic504,18744
-#undef __FUNCT____FUNCT__519,19406
-#define __FUNCT__ __FUNCT__520,19423
-PETSC_EXTERN PetscErrorCode SVDCreate_Cyclic(SVD svd)SVDCreate_Cyclic521,19460
+#undef __FUNCT____FUNCT__207,9801
+#define __FUNCT__ __FUNCT__208,9818
+PetscErrorCode SVDSolve_Cyclic(SVD svd)SVDSolve_Cyclic209,9854
+#undef __FUNCT____FUNCT__254,11676
+#define __FUNCT__ __FUNCT__255,11693
+static PetscErrorCode EPSMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)EPSMonitor_Cyclic256,11731
+#undef __FUNCT____FUNCT__280,12471
+#define __FUNCT__ __FUNCT__281,12488
+PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptionItems *PetscOptionsObject,SVD svd)SVDSetFromOptions_Cyclic282,12533
+#undef __FUNCT____FUNCT__306,13504
+#define __FUNCT__ __FUNCT__307,13521
+static PetscErrorCode SVDCyclicSetExplicitMatrix_Cyclic(SVD svd,PetscBool explicitmatrix)SVDCyclicSetExplicitMatrix_Cyclic308,13575
+#undef __FUNCT____FUNCT__317,13809
+#define __FUNCT__ __FUNCT__318,13826
+PetscErrorCode SVDCyclicSetExplicitMatrix(SVD svd,PetscBool explicitmatrix)SVDCyclicSetExplicitMatrix336,14317
+#undef __FUNCT____FUNCT__347,14686
+#define __FUNCT__ __FUNCT__348,14703
+static PetscErrorCode SVDCyclicGetExplicitMatrix_Cyclic(SVD svd,PetscBool *explicitmatrix)SVDCyclicGetExplicitMatrix_Cyclic349,14757
+#undef __FUNCT____FUNCT__358,14993
+#define __FUNCT__ __FUNCT__359,15010
+PetscErrorCode SVDCyclicGetExplicitMatrix(SVD svd,PetscBool *explicitmatrix)SVDCyclicGetExplicitMatrix375,15335
+#undef __FUNCT____FUNCT__386,15688
+#define __FUNCT__ __FUNCT__387,15705
+static PetscErrorCode SVDCyclicSetEPS_Cyclic(SVD svd,EPS eps)SVDCyclicSetEPS_Cyclic388,15748
+#undef __FUNCT____FUNCT__402,16195
+#define __FUNCT__ __FUNCT__403,16212
+PetscErrorCode SVDCyclicSetEPS(SVD svd,EPS eps)SVDCyclicSetEPS418,16504
+#undef __FUNCT____FUNCT__430,16842
+#define __FUNCT__ __FUNCT__431,16859
+static PetscErrorCode SVDCyclicGetEPS_Cyclic(SVD svd,EPS *eps)SVDCyclicGetEPS_Cyclic432,16902
+#undef __FUNCT____FUNCT__451,17735
+#define __FUNCT__ __FUNCT__452,17752
+PetscErrorCode SVDCyclicGetEPS(SVD svd,EPS *eps)SVDCyclicGetEPS469,18073
+#undef __FUNCT____FUNCT__480,18359
+#define __FUNCT__ __FUNCT__481,18376
+PetscErrorCode SVDView_Cyclic(SVD svd,PetscViewer viewer)SVDView_Cyclic482,18411
+#undef __FUNCT____FUNCT__500,19115
+#define __FUNCT__ __FUNCT__501,19132
+PetscErrorCode SVDReset_Cyclic(SVD svd)SVDReset_Cyclic502,19168
+#undef __FUNCT____FUNCT__517,19645
+#define __FUNCT__ __FUNCT__518,19662
+PetscErrorCode SVDDestroy_Cyclic(SVD svd)SVDDestroy_Cyclic519,19700
+#undef __FUNCT____FUNCT__534,20362
+#define __FUNCT__ __FUNCT__535,20379
+PETSC_EXTERN PetscErrorCode SVDCreate_Cyclic(SVD svd)SVDCreate_Cyclic536,20416
 

 src/svd/impls/cyclic/makefile,278
 makefile:^?makefile^A,1
@@ -7430,46 +8308,46 @@ DIRS     =DIRS30,1023
 MANSEC   = SVDMANSEC31,1034
 LOCDIR   = src/svd/impls/cyclic/LOCDIR32,1049
 

-src/svd/impls/lanczos/gklanczos.c,2189
+src/svd/impls/lanczos/gklanczos.c,2193
 gklanczos.c:^?gklanczos.c^A,1
   PetscBool oneside;oneside45,1586
 } SVD_LANCZOS;SVD_LANCZOS46,1607
 #undef __FUNCT____FUNCT__48,1623
 #define __FUNCT__ __FUNCT__49,1640
 PetscErrorCode SVDSetUp_Lanczos(SVD svd)SVDSetUp_Lanczos50,1677
-#undef __FUNCT____FUNCT__69,2438
-#define __FUNCT__ __FUNCT__70,2455
-PetscErrorCode SVDTwoSideLanczos(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt k,PetscInt n)SVDTwoSideLanczos71,2493
-#undef __FUNCT____FUNCT__113,4291
-#define __FUNCT__ __FUNCT__114,4308
-static PetscErrorCode SVDOneSideLanczos(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,Vec u,Vec u_1,PetscInt k,PetscInt n,PetscScalar* work)SVDOneSideLanczos115,4346
-#undef __FUNCT____FUNCT__178,6643
-#define __FUNCT__ __FUNCT__179,6660
-PetscErrorCode SVDSolve_Lanczos(SVD svd)SVDSolve_Lanczos180,6697
-#undef __FUNCT____FUNCT__284,10484
-#define __FUNCT__ __FUNCT__285,10501
-PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,SVD svd)SVDSetFromOptions_Lanczos286,10547
-#undef __FUNCT____FUNCT__302,11139
-#define __FUNCT__ __FUNCT__303,11156
-static PetscErrorCode SVDLanczosSetOneSide_Lanczos(SVD svd,PetscBool oneside)SVDLanczosSetOneSide_Lanczos304,11205
-#undef __FUNCT____FUNCT__316,11496
-#define __FUNCT__ __FUNCT__317,11513
-PetscErrorCode SVDLanczosSetOneSide(SVD svd,PetscBool oneside)SVDLanczosSetOneSide341,12266
-#undef __FUNCT____FUNCT__352,12602
-#define __FUNCT__ __FUNCT__353,12619
-PetscErrorCode SVDLanczosGetOneSide(SVD svd,PetscBool *oneside)SVDLanczosGetOneSide370,13001
-#undef __FUNCT____FUNCT__381,13321
-#define __FUNCT__ __FUNCT__382,13338
-static PetscErrorCode SVDLanczosGetOneSide_Lanczos(SVD svd,PetscBool *oneside)SVDLanczosGetOneSide_Lanczos383,13387
-#undef __FUNCT____FUNCT__392,13601
-#define __FUNCT__ __FUNCT__393,13618
-PetscErrorCode SVDDestroy_Lanczos(SVD svd)SVDDestroy_Lanczos394,13657
-#undef __FUNCT____FUNCT__405,14020
-#define __FUNCT__ __FUNCT__406,14037
-PetscErrorCode SVDView_Lanczos(SVD svd,PetscViewer viewer)SVDView_Lanczos407,14073
-#undef __FUNCT____FUNCT__417,14392
-#define __FUNCT__ __FUNCT__418,14409
-PETSC_EXTERN PetscErrorCode SVDCreate_Lanczos(SVD svd)SVDCreate_Lanczos419,14447
+#undef __FUNCT____FUNCT__69,2421
+#define __FUNCT__ __FUNCT__70,2438
+PetscErrorCode SVDTwoSideLanczos(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt k,PetscInt n)SVDTwoSideLanczos71,2476
+#undef __FUNCT____FUNCT__113,4274
+#define __FUNCT__ __FUNCT__114,4291
+static PetscErrorCode SVDOneSideLanczos(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,Vec u,Vec u_1,PetscInt k,PetscInt n,PetscScalar* work)SVDOneSideLanczos115,4329
+#undef __FUNCT____FUNCT__178,6626
+#define __FUNCT__ __FUNCT__179,6643
+PetscErrorCode SVDSolve_Lanczos(SVD svd)SVDSolve_Lanczos180,6680
+#undef __FUNCT____FUNCT__283,10485
+#define __FUNCT__ __FUNCT__284,10502
+PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,SVD svd)SVDSetFromOptions_Lanczos285,10548
+#undef __FUNCT____FUNCT__301,11144
+#define __FUNCT__ __FUNCT__302,11161
+static PetscErrorCode SVDLanczosSetOneSide_Lanczos(SVD svd,PetscBool oneside)SVDLanczosSetOneSide_Lanczos303,11210
+#undef __FUNCT____FUNCT__315,11501
+#define __FUNCT__ __FUNCT__316,11518
+PetscErrorCode SVDLanczosSetOneSide(SVD svd,PetscBool oneside)SVDLanczosSetOneSide340,12271
+#undef __FUNCT____FUNCT__351,12607
+#define __FUNCT__ __FUNCT__352,12624
+static PetscErrorCode SVDLanczosGetOneSide_Lanczos(SVD svd,PetscBool *oneside)SVDLanczosGetOneSide_Lanczos353,12673
+#undef __FUNCT____FUNCT__362,12887
+#define __FUNCT__ __FUNCT__363,12904
+PetscErrorCode SVDLanczosGetOneSide(SVD svd,PetscBool *oneside)SVDLanczosGetOneSide380,13286
+#undef __FUNCT____FUNCT__391,13606
+#define __FUNCT__ __FUNCT__392,13623
+PetscErrorCode SVDDestroy_Lanczos(SVD svd)SVDDestroy_Lanczos393,13662
+#undef __FUNCT____FUNCT__404,14025
+#define __FUNCT__ __FUNCT__405,14042
+PetscErrorCode SVDView_Lanczos(SVD svd,PetscViewer viewer)SVDView_Lanczos406,14078
+#undef __FUNCT____FUNCT__420,14540
+#define __FUNCT__ __FUNCT__421,14557
+PETSC_EXTERN PetscErrorCode SVDCreate_Lanczos(SVD svd)SVDCreate_Lanczos422,14595
 

 src/svd/impls/lanczos/makefile,282
 makefile:^?makefile^A,1
@@ -7500,12 +8378,12 @@ svdlapack.c:^?svdlapack.c^A,1
 #undef __FUNCT____FUNCT__26,1026
 #define __FUNCT__ __FUNCT__27,1043
 PetscErrorCode SVDSetUp_LAPACK(SVD svd)SVDSetUp_LAPACK28,1079
-#undef __FUNCT____FUNCT__45,1583
-#define __FUNCT__ __FUNCT__46,1600
-PetscErrorCode SVDSolve_LAPACK(SVD svd)SVDSolve_LAPACK47,1636
-#undef __FUNCT____FUNCT__108,3821
-#define __FUNCT__ __FUNCT__109,3838
-PETSC_EXTERN PetscErrorCode SVDCreate_LAPACK(SVD svd)SVDCreate_LAPACK110,3875
+#undef __FUNCT____FUNCT__46,1732
+#define __FUNCT__ __FUNCT__47,1749
+PetscErrorCode SVDSolve_LAPACK(SVD svd)SVDSolve_LAPACK48,1785
+#undef __FUNCT____FUNCT__109,3970
+#define __FUNCT__ __FUNCT__110,3987
+PETSC_EXTERN PetscErrorCode SVDCreate_LAPACK(SVD svd)SVDCreate_LAPACK111,4024
 

 src/svd/impls/makefile,170
 makefile:^?makefile^A,1
@@ -7526,65 +8404,67 @@ DIRS     =DIRS30,1026
 MANSEC   = SVDMANSEC31,1037
 LOCDIR   = src/svd/impls/trlanczos/LOCDIR32,1052
 

-src/svd/impls/trlanczos/trlanczos.c,2552
+src/svd/impls/trlanczos/trlanczos.c,2660
 trlanczos.c:^?trlanczos.c^A,1
-  PetscBool oneside;oneside45,1572
-} SVD_TRLANCZOS;SVD_TRLANCZOS46,1593
-#undef __FUNCT____FUNCT__48,1611
-#define __FUNCT__ __FUNCT__49,1628
-PetscErrorCode SVDSetUp_TRLanczos(SVD svd)SVDSetUp_TRLanczos50,1667
-#undef __FUNCT____FUNCT__68,2344
-#define __FUNCT__ __FUNCT__69,2361
-static PetscErrorCode SVDOneSideTRLanczosMGS(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)SVDOneSideTRLanczosMGS70,2404
-#undef __FUNCT____FUNCT__124,4486
-#define __FUNCT__ __FUNCT__125,4503
-static PetscErrorCode SVDOrthogonalizeCGS(BV V,PetscInt i,PetscScalar* h,PetscReal a,BVOrthogRefineType refine,PetscReal eta,PetscReal *norm)SVDOrthogonalizeCGS129,4622
-#undef __FUNCT____FUNCT__170,5912
-#define __FUNCT__ __FUNCT__171,5929
-static PetscErrorCode SVDOneSideTRLanczosCGS(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)SVDOneSideTRLanczosCGS172,5972
-#undef __FUNCT____FUNCT__268,9740
-#define __FUNCT__ __FUNCT__269,9757
-PetscErrorCode SVDSolve_TRLanczos(SVD svd)SVDSolve_TRLanczos270,9796
-#undef __FUNCT____FUNCT__386,14119
-#define __FUNCT__ __FUNCT__387,14136
-PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptions *PetscOptionsObject,SVD svd)SVDSetFromOptions_TRLanczos388,14184
-#undef __FUNCT____FUNCT__404,14788
-#define __FUNCT__ __FUNCT__405,14805
-static PetscErrorCode SVDTRLanczosSetOneSide_TRLanczos(SVD svd,PetscBool oneside)SVDTRLanczosSetOneSide_TRLanczos406,14858
-#undef __FUNCT____FUNCT__415,15078
-#define __FUNCT__ __FUNCT__416,15095
-PetscErrorCode SVDTRLanczosSetOneSide(SVD svd,PetscBool oneside)SVDTRLanczosSetOneSide439,15789
-#undef __FUNCT____FUNCT__450,16129
-#define __FUNCT__ __FUNCT__451,16146
-PetscErrorCode SVDTRLanczosGetOneSide(SVD svd,PetscBool *oneside)SVDTRLanczosGetOneSide468,16534
-#undef __FUNCT____FUNCT__479,16858
-#define __FUNCT__ __FUNCT__480,16875
-static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(SVD svd,PetscBool *oneside)SVDTRLanczosGetOneSide_TRLanczos481,16928
-#undef __FUNCT____FUNCT__490,17153
-#define __FUNCT__ __FUNCT__491,17170
-PetscErrorCode SVDDestroy_TRLanczos(SVD svd)SVDDestroy_TRLanczos492,17211
-#undef __FUNCT____FUNCT__503,17580
-#define __FUNCT__ __FUNCT__504,17597
-PetscErrorCode SVDView_TRLanczos(SVD svd,PetscViewer viewer)SVDView_TRLanczos505,17635
-#undef __FUNCT____FUNCT__515,17960
-#define __FUNCT__ __FUNCT__516,17977
-PETSC_EXTERN PetscErrorCode SVDCreate_TRLanczos(SVD svd)SVDCreate_TRLanczos517,18017
-

-src/svd/interface/dlregissvd.c,952
+static PetscBool  cited = PETSC_FALSE;cited44,1555
+static const char citation[] =citation45,1594
+  PetscBool oneside;oneside56,2006
+} SVD_TRLANCZOS;SVD_TRLANCZOS57,2027
+#undef __FUNCT____FUNCT__59,2045
+#define __FUNCT__ __FUNCT__60,2062
+PetscErrorCode SVDSetUp_TRLanczos(SVD svd)SVDSetUp_TRLanczos61,2101
+#undef __FUNCT____FUNCT__79,2778
+#define __FUNCT__ __FUNCT__80,2795
+static PetscErrorCode SVDOneSideTRLanczosMGS(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)SVDOneSideTRLanczosMGS81,2838
+#undef __FUNCT____FUNCT__135,4920
+#define __FUNCT__ __FUNCT__136,4937
+static PetscErrorCode SVDOrthogonalizeCGS(BV V,PetscInt i,PetscScalar* h,PetscReal a,BVOrthogRefineType refine,PetscReal eta,PetscReal *norm)SVDOrthogonalizeCGS140,5056
+#undef __FUNCT____FUNCT__181,6346
+#define __FUNCT__ __FUNCT__182,6363
+static PetscErrorCode SVDOneSideTRLanczosCGS(SVD svd,PetscReal *alpha,PetscReal *beta,BV V,BV U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)SVDOneSideTRLanczosCGS183,6406
+#undef __FUNCT____FUNCT__279,10174
+#define __FUNCT__ __FUNCT__280,10191
+PetscErrorCode SVDSolve_TRLanczos(SVD svd)SVDSolve_TRLanczos281,10230
+#undef __FUNCT____FUNCT__397,14635
+#define __FUNCT__ __FUNCT__398,14652
+PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptionItems *PetscOptionsObject,SVD svd)SVDSetFromOptions_TRLanczos399,14700
+#undef __FUNCT____FUNCT__415,15308
+#define __FUNCT__ __FUNCT__416,15325
+static PetscErrorCode SVDTRLanczosSetOneSide_TRLanczos(SVD svd,PetscBool oneside)SVDTRLanczosSetOneSide_TRLanczos417,15378
+#undef __FUNCT____FUNCT__426,15598
+#define __FUNCT__ __FUNCT__427,15615
+PetscErrorCode SVDTRLanczosSetOneSide(SVD svd,PetscBool oneside)SVDTRLanczosSetOneSide450,16309
+#undef __FUNCT____FUNCT__461,16649
+#define __FUNCT__ __FUNCT__462,16666
+static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(SVD svd,PetscBool *oneside)SVDTRLanczosGetOneSide_TRLanczos463,16719
+#undef __FUNCT____FUNCT__472,16941
+#define __FUNCT__ __FUNCT__473,16958
+PetscErrorCode SVDTRLanczosGetOneSide(SVD svd,PetscBool *oneside)SVDTRLanczosGetOneSide490,17346
+#undef __FUNCT____FUNCT__501,17670
+#define __FUNCT__ __FUNCT__502,17687
+PetscErrorCode SVDDestroy_TRLanczos(SVD svd)SVDDestroy_TRLanczos503,17728
+#undef __FUNCT____FUNCT__514,18097
+#define __FUNCT__ __FUNCT__515,18114
+PetscErrorCode SVDView_TRLanczos(SVD svd,PetscViewer viewer)SVDView_TRLanczos516,18152
+#undef __FUNCT____FUNCT__530,18620
+#define __FUNCT__ __FUNCT__531,18637
+PETSC_EXTERN PetscErrorCode SVDCreate_TRLanczos(SVD svd)SVDCreate_TRLanczos532,18677
+

+src/svd/interface/dlregissvd.c,966
 dlregissvd.c:^?dlregissvd.c^A,1
 static PetscBool SVDPackageInitialized = PETSC_FALSE;SVDPackageInitialized24,960
 const char *SVDErrorTypes[] = {"ABSOLUTE","RELATIVE","SVDErrorType","SVD_ERROR_",0};SVDErrorTypes26,1015
-const char *const SVDConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","SVDConvergedReason","SVD_",0};SVDConvergedReasons_Shifted27,1100
-const char *const*SVDConvergedReasons = SVDConvergedReasons_Shifted + 4;SVDConvergedReasons28,1266
-#undef __FUNCT____FUNCT__30,1340
-#define __FUNCT__ __FUNCT__31,1357
-PetscErrorCode SVDFinalizePackage(void)SVDFinalizePackage40,1592
-#undef __FUNCT____FUNCT__51,1846
-#define __FUNCT__ __FUNCT__52,1863
-PetscErrorCode SVDInitializePackage(void)SVDInitializePackage62,2191
-#undef __FUNCT____FUNCT__101,3542
-#define __FUNCT__ __FUNCT__102,3559
-PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcsvd()PetscDLLibraryRegister_slepcsvd110,3809
+const char *const SVDConvergedReasons_Shifted[] = {"","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","SVDConvergedReason","SVD_",0};SVDConvergedReasons_Shifted27,1100
+const char *const*SVDConvergedReasons = SVDConvergedReasons_Shifted + 4;SVDConvergedReasons28,1280
+#undef __FUNCT____FUNCT__30,1354
+#define __FUNCT__ __FUNCT__31,1371
+PetscErrorCode SVDFinalizePackage(void)SVDFinalizePackage40,1606
+#undef __FUNCT____FUNCT__51,1860
+#define __FUNCT__ __FUNCT__52,1877
+PetscErrorCode SVDInitializePackage(void)SVDInitializePackage62,2205
+#undef __FUNCT____FUNCT__101,3558
+#define __FUNCT__ __FUNCT__102,3575
+PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcsvd()PetscDLLibraryRegister_slepcsvd110,3825
 

 src/svd/interface/ftn-custom/makefile,257
 makefile:^?makefile^A,1
@@ -7597,43 +8477,60 @@ DIRS     =DIRS29,1037
 LIBBASE  = libslepcsvdLIBBASE30,1048
 LOCDIR   = src/svd/interface/ftn-custom/LOCDIR31,1071
 

-src/svd/interface/ftn-custom/zsvdf.c,4651
+src/svd/interface/ftn-custom/zsvdf.c,7360
 zsvdf.c:^?zsvdf.c^A,1
-PETSC_EXTERN void svdmonitorall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorall_66,2927
-PETSC_EXTERN void svdmonitorlg_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorlg_71,3150
-PETSC_EXTERN void svdmonitorlgall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorlgall_76,3371
-PETSC_EXTERN void svdmonitorconverged_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorconverged_81,3598
-PETSC_EXTERN void svdmonitorfirst_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorfirst_86,3833
-  PetscFortranCallbackId monitor;monitor92,4076
-  PetscFortranCallbackId monitordestroy;monitordestroy93,4110
-} _cb;_cb94,4151
-#undef __FUNCT____FUNCT__97,4251
-static PetscErrorCode ourmonitor(SVD svd,PetscInt i,PetscInt nc,PetscReal *sigma,PetscReal *d,PetscInt l,void* ctx)ourmonitor99,4299
-#undef __FUNCT____FUNCT__104,4587
-static PetscErrorCode ourdestroy(void** ctx)ourdestroy106,4635
-PETSC_EXTERN void PETSC_STDCALL svdview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdview_112,4802
-PETSC_EXTERN void PETSC_STDCALL svdreasonview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdreasonview_119,4989
-PETSC_EXTERN void PETSC_STDCALL svderrorview_(SVD *svd,SVDErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)svderrorview_126,5188
-PETSC_EXTERN void PETSC_STDCALL svdvaluesview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdvaluesview_133,5412
-PETSC_EXTERN void PETSC_STDCALL svdvectorsview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdvectorsview_140,5611
-PETSC_EXTERN void PETSC_STDCALL svdsettype_(SVD *svd,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdsettype_147,5812
-PETSC_EXTERN void PETSC_STDCALL svdgettype_(SVD *svd,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdgettype_156,6027
-PETSC_EXTERN void PETSC_STDCALL svdmonitorset_(SVD *svd,void (PETSC_STDCALL *monitor)(SVD*,PetscInt*,PetscInt*,PetscReal*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)svdmonitorset_165,6306
-PETSC_EXTERN void PETSC_STDCALL svdsetoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdsetoptionsprefix_200,8233
-PETSC_EXTERN void PETSC_STDCALL svdappendoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdappendoptionsprefix_209,8472
-PETSC_EXTERN void PETSC_STDCALL svdgetoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdgetoptionsprefix_218,8717
-

-src/svd/interface/makefile,354
+PETSC_EXTERN void svdmonitorall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)svdmonitorall_74,3425
+PETSC_EXTERN void svdmonitorconverged_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)svdmonitorconverged_79,3666
+PETSC_EXTERN void svdmonitorfirst_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)svdmonitorfirst_84,3914
+PETSC_EXTERN void svdmonitorlg_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorlg_89,4159
+PETSC_EXTERN void svdmonitorlgall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)svdmonitorlgall_94,4380
+  PetscFortranCallbackId monitor;monitor100,4623
+  PetscFortranCallbackId monitordestroy;monitordestroy101,4657
+  PetscFortranCallbackId convergence;convergence102,4698
+  PetscFortranCallbackId convdestroy;convdestroy103,4736
+  PetscFortranCallbackId stopping;stopping104,4774
+  PetscFortranCallbackId stopdestroy;stopdestroy105,4809
+} _cb;_cb106,4847
+#undef __FUNCT____FUNCT__109,4947
+static PetscErrorCode ourmonitor(SVD svd,PetscInt i,PetscInt nc,PetscReal *sigma,PetscReal *d,PetscInt l,void* ctx)ourmonitor111,4995
+#undef __FUNCT____FUNCT__116,5283
+static PetscErrorCode ourdestroy(void** ctx)ourdestroy118,5331
+#undef __FUNCT____FUNCT__124,5498
+static PetscErrorCode ourconvergence(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)ourconvergence126,5550
+#undef __FUNCT____FUNCT__131,5812
+static PetscErrorCode ourconvdestroy(void *ctx)ourconvdestroy133,5864
+#undef __FUNCT____FUNCT__139,6030
+static PetscErrorCode ourstopping(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)ourstopping141,6079
+#undef __FUNCT____FUNCT__146,6411
+static PetscErrorCode ourstopdestroy(void *ctx)ourstopdestroy148,6463
+PETSC_EXTERN void PETSC_STDCALL svdview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdview_154,6629
+PETSC_EXTERN void PETSC_STDCALL svdreasonview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdreasonview_161,6816
+PETSC_EXTERN void PETSC_STDCALL svderrorview_(SVD *svd,SVDErrorType *etype,PetscViewer *viewer,PetscErrorCode *ierr)svderrorview_168,7015
+PETSC_EXTERN void PETSC_STDCALL svdvaluesview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdvaluesview_175,7239
+PETSC_EXTERN void PETSC_STDCALL svdvectorsview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)svdvectorsview_182,7438
+PETSC_EXTERN void PETSC_STDCALL svdsettype_(SVD *svd,CHAR type PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdsettype_189,7639
+PETSC_EXTERN void PETSC_STDCALL svdgettype_(SVD *svd,CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdgettype_198,7854
+PETSC_EXTERN void PETSC_STDCALL svdmonitorset_(SVD *svd,void (PETSC_STDCALL *monitor)(SVD*,PetscInt*,PetscInt*,PetscReal*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)svdmonitorset_207,8133
+PETSC_EXTERN void PETSC_STDCALL svdsetoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdsetoptionsprefix_232,10115
+PETSC_EXTERN void PETSC_STDCALL svdappendoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdappendoptionsprefix_241,10354
+PETSC_EXTERN void PETSC_STDCALL svdgetoptionsprefix_(SVD *svd,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))svdgetoptionsprefix_250,10599
+PETSC_EXTERN void PETSC_STDCALL svdconvergedabsolute_(SVD *svd,PetscReal *sigma,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)svdconvergedabsolute_258,10867
+PETSC_EXTERN void PETSC_STDCALL svdconvergedrelative_(SVD *svd,PetscReal *sigma,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)svdconvergedrelative_263,11078
+PETSC_EXTERN void PETSC_STDCALL svdsetconvergencetestfunction_(SVD *svd,void (PETSC_STDCALL *func)(SVD*,PetscReal*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)svdsetconvergencetestfunction_268,11289
+PETSC_EXTERN void PETSC_STDCALL svdstoppingbasic_(SVD *svd,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nsv,SVDConvergedReason *reason,void *ctx,PetscErrorCode *ierr)svdstoppingbasic_287,12403
+PETSC_EXTERN void PETSC_STDCALL svdsetstoppingtestfunction_(SVD *svd,void (PETSC_STDCALL *func)(SVD*,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)svdsetstoppingtestfunction_292,12657
+

+src/svd/interface/makefile,367
 makefile:^?makefile^A,1
 CFLAGS   =CFLAGS24,936
 FFLAGS   =FFLAGS25,947
-SOURCEC  = svdregis.c svdbasic.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.cSOURCEC26,958
-SOURCEF  =SOURCEF27,1055
-SOURCEH  =SOURCEH28,1066
-LIBBASE  = libslepcsvdLIBBASE29,1077
-DIRS     =DIRS30,1100
-MANSEC   = SVDMANSEC31,1111
-LOCDIR   = src/svd/interface/LOCDIR32,1126
+SOURCEC  = svdregis.c svdbasic.c svddefault.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.cSOURCEC26,958
+SOURCEF  =SOURCEF27,1068
+SOURCEH  =SOURCEH28,1079
+LIBBASE  = libslepcsvdLIBBASE29,1090
+DIRS     =DIRS30,1113
+MANSEC   = SVDMANSEC31,1124
+LOCDIR   = src/svd/interface/LOCDIR32,1139
 

 src/svd/interface/svdbasic.c,1711
 svdbasic.c:^?svdbasic.c^A,1
@@ -7645,35 +8542,47 @@ PetscLogEvent     SVD_SetUp = 0,SVD_Solve = 0;SVD_Solve29,1166
 #undef __FUNCT____FUNCT__31,1214
 #define __FUNCT__ __FUNCT__32,1231
 PetscErrorCode SVDCreate(MPI_Comm comm,SVD *outsvd)SVDCreate51,1574
-#undef __FUNCT____FUNCT__103,3138
-#define __FUNCT__ __FUNCT__104,3155
-PetscErrorCode SVDReset(SVD svd)SVDReset118,3440
-#undef __FUNCT____FUNCT__140,4155
-#define __FUNCT__ __FUNCT__141,4172
-PetscErrorCode SVDDestroy(SVD *svd)SVDDestroy154,4428
-#undef __FUNCT____FUNCT__175,5291
-#define __FUNCT__ __FUNCT__176,5308
-PetscErrorCode SVDSetType(SVD svd,SVDType type)SVDSetType206,6257
-#undef __FUNCT____FUNCT__230,7081
-#define __FUNCT__ __FUNCT__231,7098
-PetscErrorCode SVDGetType(SVD svd,SVDType *type)SVDGetType247,7387
-#undef __FUNCT____FUNCT__256,7606
-#define __FUNCT__ __FUNCT__257,7623
-PetscErrorCode SVDRegister(const char *name,PetscErrorCode (*function)(SVD))SVDRegister284,8243
-#undef __FUNCT____FUNCT__293,8466
-#define __FUNCT__ __FUNCT__294,8483
-PetscErrorCode SVDSetBV(SVD svd,BV V,BV U)SVDSetBV313,8999
-#undef __FUNCT____FUNCT__338,9776
-#define __FUNCT__ __FUNCT__339,9793
-PetscErrorCode SVDGetBV(SVD svd,BV *V,BV *U)SVDGetBV357,10209
-#undef __FUNCT____FUNCT__380,10826
-#define __FUNCT__ __FUNCT__381,10843
-PetscErrorCode SVDSetDS(SVD svd,DS ds)SVDSetDS399,11270
-#undef __FUNCT____FUNCT__414,11718
-#define __FUNCT__ __FUNCT__415,11735
-PetscErrorCode SVDGetDS(SVD svd,DS *ds)SVDGetDS432,12069
-

-src/svd/interface/svdmon.c,1922
+#undef __FUNCT____FUNCT__107,3256
+#define __FUNCT__ __FUNCT__108,3273
+PetscErrorCode SVDReset(SVD svd)SVDReset122,3558
+#undef __FUNCT____FUNCT__144,4273
+#define __FUNCT__ __FUNCT__145,4290
+PetscErrorCode SVDDestroy(SVD *svd)SVDDestroy158,4546
+#undef __FUNCT____FUNCT__178,5351
+#define __FUNCT__ __FUNCT__179,5368
+PetscErrorCode SVDSetType(SVD svd,SVDType type)SVDSetType209,6317
+#undef __FUNCT____FUNCT__233,7141
+#define __FUNCT__ __FUNCT__234,7158
+PetscErrorCode SVDGetType(SVD svd,SVDType *type)SVDGetType250,7447
+#undef __FUNCT____FUNCT__259,7666
+#define __FUNCT__ __FUNCT__260,7683
+PetscErrorCode SVDRegister(const char *name,PetscErrorCode (*function)(SVD))SVDRegister287,8303
+#undef __FUNCT____FUNCT__296,8526
+#define __FUNCT__ __FUNCT__297,8543
+PetscErrorCode SVDSetBV(SVD svd,BV V,BV U)SVDSetBV316,9059
+#undef __FUNCT____FUNCT__341,9836
+#define __FUNCT__ __FUNCT__342,9853
+PetscErrorCode SVDGetBV(SVD svd,BV *V,BV *U)SVDGetBV360,10269
+#undef __FUNCT____FUNCT__383,10886
+#define __FUNCT__ __FUNCT__384,10903
+PetscErrorCode SVDSetDS(SVD svd,DS ds)SVDSetDS402,11330
+#undef __FUNCT____FUNCT__417,11778
+#define __FUNCT__ __FUNCT__418,11795
+PetscErrorCode SVDGetDS(SVD svd,DS *ds)SVDGetDS435,12129
+

+src/svd/interface/svddefault.c,640
+svddefault.c:^?svddefault.c^A,1
+#undef __FUNCT____FUNCT__26,1063
+#define __FUNCT__ __FUNCT__27,1080
+PetscErrorCode SVDConvergedRelative(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)SVDConvergedRelative31,1199
+#undef __FUNCT____FUNCT__38,1378
+#define __FUNCT__ __FUNCT__39,1395
+PetscErrorCode SVDConvergedAbsolute(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)SVDConvergedAbsolute43,1498
+#undef __FUNCT____FUNCT__50,1671
+#define __FUNCT__ __FUNCT__51,1688
+PetscErrorCode SVDStoppingBasic(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)SVDStoppingBasic84,2850
+

+src/svd/interface/svdmon.c,2182
 svdmon.c:^?svdmon.c^A,1
 #undef __FUNCT____FUNCT__27,1047
 #define __FUNCT__ __FUNCT__28,1064
@@ -7689,64 +8598,91 @@ PetscErrorCode SVDMonitorCancel(SVD svd)SVDMonitorCancel121,4542
 PetscErrorCode SVDGetMonitorContext(SVD svd,void **ctx)SVDGetMonitorContext155,5298
 #undef __FUNCT____FUNCT__163,5487
 #define __FUNCT__ __FUNCT__164,5504
-PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)SVDMonitorAll184,6103
-#undef __FUNCT____FUNCT__203,6940
-#define __FUNCT__ __FUNCT__204,6957
-PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)SVDMonitorFirst224,7568
-#undef __FUNCT____FUNCT__239,8330
-#define __FUNCT__ __FUNCT__240,8347
-PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)SVDMonitorConverged263,9011
-#undef __FUNCT____FUNCT__287,10068
-#define __FUNCT__ __FUNCT__288,10085
-PetscErrorCode SVDMonitorLG(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)SVDMonitorLG289,10118
-#undef __FUNCT____FUNCT__332,11892
-#define __FUNCT__ __FUNCT__333,11909
-PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)SVDMonitorLGAll334,11945
-

-src/svd/interface/svdopts.c,2378
+PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)SVDMonitorAll184,6089
+#undef __FUNCT____FUNCT__212,7432
+#define __FUNCT__ __FUNCT__213,7449
+PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)SVDMonitorFirst233,8046
+#undef __FUNCT____FUNCT__259,9346
+#define __FUNCT__ __FUNCT__260,9363
+PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)SVDMonitorConverged279,9896
+#undef __FUNCT____FUNCT__310,11289
+#define __FUNCT__ __FUNCT__311,11306
+PetscErrorCode SVDMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)SVDMonitorLGCreate340,12106
+#undef __FUNCT____FUNCT__356,12652
+#define __FUNCT__ __FUNCT__357,12669
+PetscErrorCode SVDMonitorLG(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)SVDMonitorLG358,12702
+#undef __FUNCT____FUNCT__382,13529
+#define __FUNCT__ __FUNCT__383,13546
+PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)SVDMonitorLGAll384,13582
+

+src/svd/interface/svdopts.c,4269
 svdopts.c:^?svdopts.c^A,1
-#undef __FUNCT____FUNCT__26,1033
-#define __FUNCT__ __FUNCT__27,1050
-PetscErrorCode SVDSetImplicitTranspose(SVD svd,PetscBool impl)SVDSetImplicitTranspose55,2027
-#undef __FUNCT____FUNCT__67,2338
-#define __FUNCT__ __FUNCT__68,2355
-PetscErrorCode SVDGetImplicitTranspose(SVD svd,PetscBool *impl)SVDGetImplicitTranspose85,2790
-#undef __FUNCT____FUNCT__94,3009
-#define __FUNCT__ __FUNCT__95,3026
-PetscErrorCode SVDSetTolerances(SVD svd,PetscReal tol,PetscInt maxits)SVDSetTolerances119,3741
-#undef __FUNCT____FUNCT__142,4551
-#define __FUNCT__ __FUNCT__143,4568
-PetscErrorCode SVDGetTolerances(SVD svd,PetscReal *tol,PetscInt *maxits)SVDGetTolerances164,5042
-#undef __FUNCT____FUNCT__173,5286
-#define __FUNCT__ __FUNCT__174,5303
-PetscErrorCode SVDSetDimensions(SVD svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)SVDSetDimensions209,6628
-#undef __FUNCT____FUNCT__234,7565
-#define __FUNCT__ __FUNCT__235,7582
-PetscErrorCode SVDGetDimensions(SVD svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)SVDGetDimensions257,8147
-#undef __FUNCT____FUNCT__267,8414
-#define __FUNCT__ __FUNCT__268,8431
-PetscErrorCode SVDSetWhichSingularTriplets(SVD svd,SVDWhich which)SVDSetWhichSingularTriplets295,9147
-#undef __FUNCT____FUNCT__314,9664
-#define __FUNCT__ __FUNCT__315,9681
-PetscErrorCode SVDGetWhichSingularTriplets(SVD svd,SVDWhich *which)SVDGetWhichSingularTriplets335,10164
-#undef __FUNCT____FUNCT__344,10385
-#define __FUNCT__ __FUNCT__345,10402
-PetscErrorCode SVDSetFromOptions(SVD svd)SVDSetFromOptions363,10812
-#undef __FUNCT____FUNCT__473,17149
-#define __FUNCT__ __FUNCT__474,17166
-PetscErrorCode SVDSetTrackAll(SVD svd,PetscBool trackall)SVDSetTrackAll498,17947
-#undef __FUNCT____FUNCT__507,18184
-#define __FUNCT__ __FUNCT__508,18201
-PetscErrorCode SVDGetTrackAll(SVD svd,PetscBool *trackall)SVDGetTrackAll525,18533
-#undef __FUNCT____FUNCT__535,18755
-#define __FUNCT__ __FUNCT__536,18772
-PetscErrorCode SVDSetOptionsPrefix(SVD svd,const char *prefix)SVDSetOptionsPrefix563,19523
-#undef __FUNCT____FUNCT__591,20598
-#define __FUNCT__ __FUNCT__592,20615
-PetscErrorCode SVDAppendOptionsPrefix(SVD svd,const char *prefix)SVDAppendOptionsPrefix611,21174
-#undef __FUNCT____FUNCT__639,22273
-#define __FUNCT__ __FUNCT__640,22290
-PetscErrorCode SVDGetOptionsPrefix(SVD svd,const char *prefix[])SVDGetOptionsPrefix660,22801
+#undef __FUNCT____FUNCT__27,1056
+#define __FUNCT__ __FUNCT__28,1073
+PetscErrorCode SVDSetImplicitTranspose(SVD svd,PetscBool impl)SVDSetImplicitTranspose56,2050
+#undef __FUNCT____FUNCT__68,2361
+#define __FUNCT__ __FUNCT__69,2378
+PetscErrorCode SVDGetImplicitTranspose(SVD svd,PetscBool *impl)SVDGetImplicitTranspose86,2814
+#undef __FUNCT____FUNCT__95,3033
+#define __FUNCT__ __FUNCT__96,3050
+PetscErrorCode SVDSetTolerances(SVD svd,PetscReal tol,PetscInt maxits)SVDSetTolerances120,3765
+#undef __FUNCT____FUNCT__143,4575
+#define __FUNCT__ __FUNCT__144,4592
+PetscErrorCode SVDGetTolerances(SVD svd,PetscReal *tol,PetscInt *maxits)SVDGetTolerances165,5066
+#undef __FUNCT____FUNCT__174,5310
+#define __FUNCT__ __FUNCT__175,5327
+PetscErrorCode SVDSetDimensions(SVD svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)SVDSetDimensions210,6652
+#undef __FUNCT____FUNCT__235,7589
+#define __FUNCT__ __FUNCT__236,7606
+PetscErrorCode SVDGetDimensions(SVD svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)SVDGetDimensions258,8171
+#undef __FUNCT____FUNCT__268,8438
+#define __FUNCT__ __FUNCT__269,8455
+PetscErrorCode SVDSetWhichSingularTriplets(SVD svd,SVDWhich which)SVDSetWhichSingularTriplets296,9171
+#undef __FUNCT____FUNCT__315,9688
+#define __FUNCT__ __FUNCT__316,9705
+PetscErrorCode SVDGetWhichSingularTriplets(SVD svd,SVDWhich *which)SVDGetWhichSingularTriplets336,10188
+#undef __FUNCT____FUNCT__345,10409
+#define __FUNCT__ __FUNCT__346,10426
+PetscErrorCode SVDSetConvergenceTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscReal,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))SVDSetConvergenceTestFunction376,11549
+#undef __FUNCT____FUNCT__394,12201
+#define __FUNCT__ __FUNCT__395,12218
+PetscErrorCode SVDSetConvergenceTest(SVD svd,SVDConv conv)SVDSetConvergenceTest421,13125
+#undef __FUNCT____FUNCT__437,13655
+#define __FUNCT__ __FUNCT__438,13672
+PetscErrorCode SVDGetConvergenceTest(SVD svd,SVDConv *conv)SVDGetConvergenceTest455,14072
+#undef __FUNCT____FUNCT__464,14282
+#define __FUNCT__ __FUNCT__465,14299
+PetscErrorCode SVDSetStoppingTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))SVDSetStoppingTestFunction499,15679
+#undef __FUNCT____FUNCT__516,16278
+#define __FUNCT__ __FUNCT__517,16295
+PetscErrorCode SVDSetStoppingTest(SVD svd,SVDStop stop)SVDSetStoppingTest541,17044
+#undef __FUNCT____FUNCT__556,17498
+#define __FUNCT__ __FUNCT__557,17515
+PetscErrorCode SVDGetStoppingTest(SVD svd,SVDStop *stop)SVDGetStoppingTest574,17913
+#undef __FUNCT____FUNCT__583,18120
+#define __FUNCT__ __FUNCT__584,18137
+PetscErrorCode SVDMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)SVDMonitorSetFromOptions603,18779
+#undef __FUNCT____FUNCT__624,19776
+#define __FUNCT__ __FUNCT__625,19793
+PetscErrorCode SVDConvMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor))SVDConvMonitorSetFromOptions643,20411
+#undef __FUNCT____FUNCT__661,21282
+#define __FUNCT__ __FUNCT__662,21299
+PetscErrorCode SVDSetFromOptions(SVD svd)SVDSetFromOptions680,21709
+#undef __FUNCT____FUNCT__790,28564
+#define __FUNCT__ __FUNCT__791,28581
+PetscErrorCode SVDSetTrackAll(SVD svd,PetscBool trackall)SVDSetTrackAll815,29362
+#undef __FUNCT____FUNCT__824,29599
+#define __FUNCT__ __FUNCT__825,29616
+PetscErrorCode SVDGetTrackAll(SVD svd,PetscBool *trackall)SVDGetTrackAll842,29948
+#undef __FUNCT____FUNCT__852,30170
+#define __FUNCT__ __FUNCT__853,30187
+PetscErrorCode SVDSetOptionsPrefix(SVD svd,const char *prefix)SVDSetOptionsPrefix880,30938
+#undef __FUNCT____FUNCT__908,32013
+#define __FUNCT__ __FUNCT__909,32030
+PetscErrorCode SVDAppendOptionsPrefix(SVD svd,const char *prefix)SVDAppendOptionsPrefix928,32589
+#undef __FUNCT____FUNCT__956,33688
+#define __FUNCT__ __FUNCT__957,33705
+PetscErrorCode SVDGetOptionsPrefix(SVD svd,const char *prefix[])SVDGetOptionsPrefix978,34218
 

 src/svd/interface/svdregis.c,131
 svdregis.c:^?svdregis.c^A,1
@@ -7754,7 +8690,7 @@ svdregis.c:^?svdregis.c^A,1
 #define __FUNCT__ __FUNCT__31,1263
 PetscErrorCode SVDRegisterAll(void)SVDRegisterAll41,1453
 

-src/svd/interface/svdsetup.c,1065
+src/svd/interface/svdsetup.c,1064
 svdsetup.c:^?svdsetup.c^A,1
 #undef __FUNCT____FUNCT__26,1032
 #define __FUNCT__ __FUNCT__27,1049
@@ -7765,18 +8701,18 @@ PetscErrorCode SVDGetOperator(SVD svd,Mat *A)SVDGetOperator73,2251
 #undef __FUNCT____FUNCT__82,2439
 #define __FUNCT__ __FUNCT__83,2456
 PetscErrorCode SVDSetUp(SVD svd)SVDSetUp102,2960
-#undef __FUNCT____FUNCT__217,6862
-#define __FUNCT__ __FUNCT__218,6879
-PetscErrorCode SVDSetInitialSpace(SVD svd,PetscInt n,Vec *is)SVDSetInitialSpace248,7882
-#undef __FUNCT____FUNCT__261,8344
-#define __FUNCT__ __FUNCT__262,8361
-PetscErrorCode SVDSetInitialSpaceLeft(SVD svd,PetscInt n,Vec *is)SVDSetInitialSpaceLeft292,9364
-#undef __FUNCT____FUNCT__305,9832
-#define __FUNCT__ __FUNCT__306,9849
-PetscErrorCode SVDSetDimensions_Default(SVD svd)SVDSetDimensions_Default311,10016
-#undef __FUNCT____FUNCT__333,10716
-#define __FUNCT__ __FUNCT__334,10733
-PetscErrorCode SVDAllocateSolution(SVD svd,PetscInt extra)SVDAllocateSolution354,11321
+#undef __FUNCT____FUNCT__214,6749
+#define __FUNCT__ __FUNCT__215,6766
+PetscErrorCode SVDSetInitialSpace(SVD svd,PetscInt n,Vec *is)SVDSetInitialSpace245,7769
+#undef __FUNCT____FUNCT__258,8231
+#define __FUNCT__ __FUNCT__259,8248
+PetscErrorCode SVDSetInitialSpaceLeft(SVD svd,PetscInt n,Vec *is)SVDSetInitialSpaceLeft289,9251
+#undef __FUNCT____FUNCT__302,9719
+#define __FUNCT__ __FUNCT__303,9736
+PetscErrorCode SVDSetDimensions_Default(SVD svd)SVDSetDimensions_Default308,9903
+#undef __FUNCT____FUNCT__330,10603
+#define __FUNCT__ __FUNCT__331,10620
+PetscErrorCode SVDAllocateSolution(SVD svd,PetscInt extra)SVDAllocateSolution351,11208
 

 src/svd/interface/svdsolve.c,1362
 svdsolve.c:^?svdsolve.c^A,1
@@ -7786,74 +8722,74 @@ PetscErrorCode SVDComputeVectors(SVD svd)SVDComputeVectors28,1091
 #undef __FUNCT____FUNCT__64,2270
 #define __FUNCT__ __FUNCT__65,2287
 PetscErrorCode SVDSolve(SVD svd)SVDSolve87,3076
-#undef __FUNCT____FUNCT__137,4835
-#define __FUNCT__ __FUNCT__138,4852
-PetscErrorCode SVDGetIterationNumber(SVD svd,PetscInt *its)SVDGetIterationNumber163,5616
-#undef __FUNCT____FUNCT__172,5826
-#define __FUNCT__ __FUNCT__173,5843
-PetscErrorCode SVDGetConvergedReason(SVD svd,SVDConvergedReason *reason)SVDGetConvergedReason198,6547
-#undef __FUNCT____FUNCT__208,6804
-#define __FUNCT__ __FUNCT__209,6821
-PetscErrorCode SVDGetConverged(SVD svd,PetscInt *nconv)SVDGetConverged227,7180
-#undef __FUNCT____FUNCT__237,7417
-#define __FUNCT__ __FUNCT__238,7434
-PetscErrorCode SVDGetSingularTriplet(SVD svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)SVDGetSingularTriplet268,8478
-#undef __FUNCT____FUNCT__294,9415
-#define __FUNCT__ __FUNCT__295,9432
-static PetscErrorCode SVDComputeResidualNorms_Private(SVD svd,PetscInt i,PetscReal *norm1,PetscReal *norm2)SVDComputeResidualNorms_Private300,9634
-#undef __FUNCT____FUNCT__345,11028
-#define __FUNCT__ __FUNCT__346,11045
-PetscErrorCode SVDComputeError(SVD svd,PetscInt i,SVDErrorType type,PetscReal *error)SVDComputeError371,11750
-

-src/svd/interface/svdview.c,2583
+#undef __FUNCT____FUNCT__137,4803
+#define __FUNCT__ __FUNCT__138,4820
+PetscErrorCode SVDGetIterationNumber(SVD svd,PetscInt *its)SVDGetIterationNumber163,5584
+#undef __FUNCT____FUNCT__172,5794
+#define __FUNCT__ __FUNCT__173,5811
+PetscErrorCode SVDGetConvergedReason(SVD svd,SVDConvergedReason *reason)SVDGetConvergedReason200,6597
+#undef __FUNCT____FUNCT__210,6854
+#define __FUNCT__ __FUNCT__211,6871
+PetscErrorCode SVDGetConverged(SVD svd,PetscInt *nconv)SVDGetConverged229,7230
+#undef __FUNCT____FUNCT__239,7467
+#define __FUNCT__ __FUNCT__240,7484
+PetscErrorCode SVDGetSingularTriplet(SVD svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)SVDGetSingularTriplet270,8528
+#undef __FUNCT____FUNCT__296,9465
+#define __FUNCT__ __FUNCT__297,9482
+static PetscErrorCode SVDComputeResidualNorms_Private(SVD svd,PetscInt i,PetscReal *norm1,PetscReal *norm2)SVDComputeResidualNorms_Private302,9684
+#undef __FUNCT____FUNCT__347,11078
+#define __FUNCT__ __FUNCT__348,11095
+PetscErrorCode SVDComputeError(SVD svd,PetscInt i,SVDErrorType type,PetscReal *error)SVDComputeError373,11800
+

+src/svd/interface/svdview.c,2586
 svdview.c:^?svdview.c^A,1
 #undef __FUNCT____FUNCT__27,1058
 #define __FUNCT__ __FUNCT__28,1075
 PetscErrorCode SVDView(SVD svd,PetscViewer viewer)SVDView56,1874
-#undef __FUNCT____FUNCT__109,4513
-#define __FUNCT__ __FUNCT__110,4530
-PetscErrorCode SVDReasonView(SVD svd,PetscViewer viewer)SVDReasonView127,4961
-#undef __FUNCT____FUNCT__146,5943
-#define __FUNCT__ __FUNCT__147,5960
-PetscErrorCode SVDReasonViewFromOptions(SVD svd)SVDReasonViewFromOptions159,6248
-#undef __FUNCT____FUNCT__181,6979
-#define __FUNCT__ __FUNCT__182,6996
-static PetscErrorCode SVDErrorView_ASCII(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView_ASCII183,7035
-#undef __FUNCT____FUNCT__217,8437
-#define __FUNCT__ __FUNCT__218,8454
-static PetscErrorCode SVDErrorView_DETAIL(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView_DETAIL219,8494
-#define EXLEN EXLEN224,8658
-#undef __FUNCT____FUNCT__247,9546
-#define __FUNCT__ __FUNCT__248,9563
-static PetscErrorCode SVDErrorView_MATLAB(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView_MATLAB249,9603
-#undef __FUNCT____FUNCT__267,10215
-#define __FUNCT__ __FUNCT__268,10232
-PetscErrorCode SVDErrorView(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView294,11093
-#undef __FUNCT____FUNCT__327,12270
-#define __FUNCT__ __FUNCT__328,12287
-PetscErrorCode SVDErrorViewFromOptions(SVD svd)SVDErrorViewFromOptions340,12585
-#undef __FUNCT____FUNCT__369,13741
-#define __FUNCT__ __FUNCT__370,13758
-static PetscErrorCode SVDValuesView_DRAW(SVD svd,PetscViewer viewer)SVDValuesView_DRAW371,13797
-#undef __FUNCT____FUNCT__394,14630
-#define __FUNCT__ __FUNCT__395,14647
-static PetscErrorCode SVDValuesView_ASCII(SVD svd,PetscViewer viewer)SVDValuesView_ASCII396,14687
-#undef __FUNCT____FUNCT__410,15129
-#define __FUNCT__ __FUNCT__411,15146
-static PetscErrorCode SVDValuesView_MATLAB(SVD svd,PetscViewer viewer)SVDValuesView_MATLAB412,15187
-#undef __FUNCT____FUNCT__428,15722
-#define __FUNCT__ __FUNCT__429,15739
-PetscErrorCode SVDValuesView(SVD svd,PetscViewer viewer)SVDValuesView446,16124
-#undef __FUNCT____FUNCT__480,17379
-#define __FUNCT__ __FUNCT__481,17396
-PetscErrorCode SVDValuesViewFromOptions(SVD svd)SVDValuesViewFromOptions493,17689
-#undef __FUNCT____FUNCT__515,18415
-#define __FUNCT__ __FUNCT__516,18432
-PetscErrorCode SVDVectorsView(SVD svd,PetscViewer viewer)SVDVectorsView533,18802
-#define NMLEN NMLEN538,18927
-#undef __FUNCT____FUNCT__568,20102
-#define __FUNCT__ __FUNCT__569,20119
-PetscErrorCode SVDVectorsViewFromOptions(SVD svd)SVDVectorsViewFromOptions581,20415
+#undef __FUNCT____FUNCT__120,5093
+#define __FUNCT__ __FUNCT__121,5110
+PetscErrorCode SVDReasonView(SVD svd,PetscViewer viewer)SVDReasonView138,5541
+#undef __FUNCT____FUNCT__157,6523
+#define __FUNCT__ __FUNCT__158,6540
+PetscErrorCode SVDReasonViewFromOptions(SVD svd)SVDReasonViewFromOptions170,6828
+#undef __FUNCT____FUNCT__192,7559
+#define __FUNCT__ __FUNCT__193,7576
+static PetscErrorCode SVDErrorView_ASCII(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView_ASCII194,7615
+#undef __FUNCT____FUNCT__228,9017
+#define __FUNCT__ __FUNCT__229,9034
+static PetscErrorCode SVDErrorView_DETAIL(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView_DETAIL230,9074
+#define EXLEN EXLEN235,9238
+#undef __FUNCT____FUNCT__258,10126
+#define __FUNCT__ __FUNCT__259,10143
+static PetscErrorCode SVDErrorView_MATLAB(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView_MATLAB260,10183
+#undef __FUNCT____FUNCT__278,10795
+#define __FUNCT__ __FUNCT__279,10812
+PetscErrorCode SVDErrorView(SVD svd,SVDErrorType etype,PetscViewer viewer)SVDErrorView305,11673
+#undef __FUNCT____FUNCT__338,12850
+#define __FUNCT__ __FUNCT__339,12867
+PetscErrorCode SVDErrorViewFromOptions(SVD svd)SVDErrorViewFromOptions351,13165
+#undef __FUNCT____FUNCT__380,14321
+#define __FUNCT__ __FUNCT__381,14338
+static PetscErrorCode SVDValuesView_DRAW(SVD svd,PetscViewer viewer)SVDValuesView_DRAW382,14377
+#undef __FUNCT____FUNCT__406,15258
+#define __FUNCT__ __FUNCT__407,15275
+static PetscErrorCode SVDValuesView_ASCII(SVD svd,PetscViewer viewer)SVDValuesView_ASCII408,15315
+#undef __FUNCT____FUNCT__422,15757
+#define __FUNCT__ __FUNCT__423,15774
+static PetscErrorCode SVDValuesView_MATLAB(SVD svd,PetscViewer viewer)SVDValuesView_MATLAB424,15815
+#undef __FUNCT____FUNCT__440,16350
+#define __FUNCT__ __FUNCT__441,16367
+PetscErrorCode SVDValuesView(SVD svd,PetscViewer viewer)SVDValuesView458,16752
+#undef __FUNCT____FUNCT__492,18007
+#define __FUNCT__ __FUNCT__493,18024
+PetscErrorCode SVDValuesViewFromOptions(SVD svd)SVDValuesViewFromOptions505,18317
+#undef __FUNCT____FUNCT__527,19043
+#define __FUNCT__ __FUNCT__528,19060
+PetscErrorCode SVDVectorsView(SVD svd,PetscViewer viewer)SVDVectorsView545,19430
+#define NMLEN NMLEN550,19555
+#undef __FUNCT____FUNCT__580,20740
+#define __FUNCT__ __FUNCT__581,20757
+PetscErrorCode SVDVectorsViewFromOptions(SVD svd)SVDVectorsViewFromOptions593,21053
 

 src/svd/makefile,211
 makefile:^?makefile^A,1
@@ -7867,19 +8803,19 @@ makefile:^?makefile^A,1
 LOCDIR   = src/sys/classes/bv/examples/LOCDIR24,932
 DIRS     = testsDIRS25,972
 

-src/sys/classes/bv/examples/tests/makefile,595
+src/sys/classes/bv/examples/tests/makefile,611
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/sys/classes/bv/examples/tests/LOCDIR26,978
-EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.cEXAMPLESC27,1026
-EXAMPLESF  =EXAMPLESF28,1129
-MANSEC     = BVMANSEC29,1142
-TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11TESTS30,1158
-TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 test1.rm \TESTEXAMPLES_C32,1240
-TESTCODE = \TESTCODE94,3488
+EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c test12.cEXAMPLESC27,1026
+EXAMPLESF  =EXAMPLESF28,1138
+MANSEC     = BVMANSEC29,1151
+TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12TESTS30,1167
+TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 test1.rm \TESTEXAMPLES_C32,1256
+TESTCODE = \TESTCODE99,3668
 

 src/sys/classes/bv/examples/tests/test1.c,175
 test1.c:^?test1.c^A,1
@@ -7902,6 +8838,13 @@ static char help[] = "Test BV block orthogonalization.\n\n";help22,924
 #define __FUNCT__ __FUNCT__27,1025
 int main(int argc,char **argv)main28,1050
 

+src/sys/classes/bv/examples/tests/test12.c,209
+test12.c:^?test12.c^A,1
+static char help[] = "Test block orthogonalization on a rank-deficient BV.\n\n";help22,924
+#undef __FUNCT____FUNCT__26,1028
+#define __FUNCT__ __FUNCT__27,1045
+int main(int argc,char **argv)main28,1070
+

 src/sys/classes/bv/examples/tests/test2.c,193
 test2.c:^?test2.c^A,1
 static char help[] = "Test BV orthogonalization functions.\n\n";help22,924
@@ -7958,7 +8901,7 @@ static char help[] = "Test BV matrix projection.\n\n";help22,924
 #define __FUNCT__ __FUNCT__27,1019
 int main(int argc,char **argv)main28,1044
 

-src/sys/classes/bv/impls/contiguous/contig.c,3378
+src/sys/classes/bv/impls/contiguous/contig.c,3399
 contig.c:^?contig.c^A,1
   Vec         *V;V27,1055
   PetscScalar *array;array28,1073
@@ -7967,60 +8910,60 @@ contig.c:^?contig.c^A,1
 #undef __FUNCT____FUNCT__32,1132
 #define __FUNCT__ __FUNCT__33,1149
 PetscErrorCode BVMult_Contiguous(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)BVMult_Contiguous34,1187
-#undef __FUNCT____FUNCT__49,1771
-#define __FUNCT__ __FUNCT__50,1788
-PetscErrorCode BVMultVec_Contiguous(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Contiguous51,1829
-#undef __FUNCT____FUNCT__64,2271
-#define __FUNCT__ __FUNCT__65,2288
-PetscErrorCode BVMultInPlace_Contiguous(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Contiguous66,2333
-#undef __FUNCT____FUNCT__81,2866
-#define __FUNCT__ __FUNCT__82,2883
-PetscErrorCode BVMultInPlaceTranspose_Contiguous(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Contiguous83,2937
-#undef __FUNCT____FUNCT__98,3478
-#define __FUNCT__ __FUNCT__99,3495
-PetscErrorCode BVAXPY_Contiguous(BV Y,PetscScalar alpha,BV X)BVAXPY_Contiguous100,3533
-#undef __FUNCT____FUNCT__110,3870
-#define __FUNCT__ __FUNCT__111,3887
-PetscErrorCode BVDot_Contiguous(BV X,BV Y,Mat M)BVDot_Contiguous112,3924
-#undef __FUNCT____FUNCT__127,4467
-#define __FUNCT__ __FUNCT__128,4484
-PetscErrorCode BVDotVec_Contiguous(BV X,Vec y,PetscScalar *m)BVDotVec_Contiguous129,4524
-#undef __FUNCT____FUNCT__147,5051
-#define __FUNCT__ __FUNCT__148,5068
-PetscErrorCode BVDotVec_Local_Contiguous(BV X,Vec y,PetscScalar *m)BVDotVec_Local_Contiguous149,5114
-#undef __FUNCT____FUNCT__167,5632
-#define __FUNCT__ __FUNCT__168,5649
-PetscErrorCode BVScale_Contiguous(BV bv,PetscInt j,PetscScalar alpha)BVScale_Contiguous169,5688
-#undef __FUNCT____FUNCT__183,6113
-#define __FUNCT__ __FUNCT__184,6130
-PetscErrorCode BVNorm_Contiguous(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Contiguous185,6168
-#undef __FUNCT____FUNCT__199,6629
-#define __FUNCT__ __FUNCT__200,6646
-PetscErrorCode BVNorm_Local_Contiguous(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Local_Contiguous201,6690
-#undef __FUNCT____FUNCT__215,7163
-#define __FUNCT__ __FUNCT__216,7180
-PetscErrorCode BVOrthogonalize_Contiguous(BV V,Mat R)BVOrthogonalize_Contiguous217,7227
-#undef __FUNCT____FUNCT__230,7654
-#define __FUNCT__ __FUNCT__231,7671
-PetscErrorCode BVMatMult_Contiguous(BV V,Mat A,BV W)BVMatMult_Contiguous232,7712
-#undef __FUNCT____FUNCT__271,9196
-#define __FUNCT__ __FUNCT__272,9213
-PetscErrorCode BVCopy_Contiguous(BV V,BV W)BVCopy_Contiguous273,9251
-#undef __FUNCT____FUNCT__286,9630
-#define __FUNCT__ __FUNCT__287,9647
-PetscErrorCode BVResize_Contiguous(BV bv,PetscInt m,PetscBool copy)BVResize_Contiguous288,9687
-#undef __FUNCT____FUNCT__326,11073
-#define __FUNCT__ __FUNCT__327,11090
-PetscErrorCode BVGetColumn_Contiguous(BV bv,PetscInt j,Vec *v)BVGetColumn_Contiguous328,11133
-#undef __FUNCT____FUNCT__339,11372
-#define __FUNCT__ __FUNCT__340,11389
-PetscErrorCode BVGetArray_Contiguous(BV bv,PetscScalar **a)BVGetArray_Contiguous341,11431
-#undef __FUNCT____FUNCT__350,11613
-#define __FUNCT__ __FUNCT__351,11630
-PetscErrorCode BVDestroy_Contiguous(BV bv)BVDestroy_Contiguous352,11671
-#undef __FUNCT____FUNCT__364,11992
-#define __FUNCT__ __FUNCT__365,12009
-PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(BV bv)BVCreate_Contiguous366,12049
+#undef __FUNCT____FUNCT__53,1934
+#define __FUNCT__ __FUNCT__54,1951
+PetscErrorCode BVMultVec_Contiguous(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Contiguous55,1992
+#undef __FUNCT____FUNCT__68,2434
+#define __FUNCT__ __FUNCT__69,2451
+PetscErrorCode BVMultInPlace_Contiguous(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Contiguous70,2496
+#undef __FUNCT____FUNCT__85,3029
+#define __FUNCT__ __FUNCT__86,3046
+PetscErrorCode BVMultInPlaceTranspose_Contiguous(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Contiguous87,3100
+#undef __FUNCT____FUNCT__102,3641
+#define __FUNCT__ __FUNCT__103,3658
+PetscErrorCode BVDot_Contiguous(BV X,BV Y,Mat M)BVDot_Contiguous104,3695
+#undef __FUNCT____FUNCT__119,4238
+#define __FUNCT__ __FUNCT__120,4255
+PetscErrorCode BVDotVec_Contiguous(BV X,Vec y,PetscScalar *m)BVDotVec_Contiguous121,4295
+#undef __FUNCT____FUNCT__139,4822
+#define __FUNCT__ __FUNCT__140,4839
+PetscErrorCode BVDotVec_Local_Contiguous(BV X,Vec y,PetscScalar *m)BVDotVec_Local_Contiguous141,4885
+#undef __FUNCT____FUNCT__159,5403
+#define __FUNCT__ __FUNCT__160,5420
+PetscErrorCode BVScale_Contiguous(BV bv,PetscInt j,PetscScalar alpha)BVScale_Contiguous161,5459
+#undef __FUNCT____FUNCT__175,5884
+#define __FUNCT__ __FUNCT__176,5901
+PetscErrorCode BVNorm_Contiguous(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Contiguous177,5939
+#undef __FUNCT____FUNCT__191,6400
+#define __FUNCT__ __FUNCT__192,6417
+PetscErrorCode BVNorm_Local_Contiguous(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Local_Contiguous193,6461
+#undef __FUNCT____FUNCT__207,6934
+#define __FUNCT__ __FUNCT__208,6951
+PetscErrorCode BVOrthogonalize_Contiguous(BV V,Mat R)BVOrthogonalize_Contiguous209,6998
+#undef __FUNCT____FUNCT__222,7425
+#define __FUNCT__ __FUNCT__223,7442
+PetscErrorCode BVMatMult_Contiguous(BV V,Mat A,BV W)BVMatMult_Contiguous224,7483
+#undef __FUNCT____FUNCT__263,8967
+#define __FUNCT__ __FUNCT__264,8984
+PetscErrorCode BVCopy_Contiguous(BV V,BV W)BVCopy_Contiguous265,9022
+#undef __FUNCT____FUNCT__278,9401
+#define __FUNCT__ __FUNCT__279,9418
+PetscErrorCode BVResize_Contiguous(BV bv,PetscInt m,PetscBool copy)BVResize_Contiguous280,9458
+#undef __FUNCT____FUNCT__318,10849
+#define __FUNCT__ __FUNCT__319,10866
+PetscErrorCode BVGetColumn_Contiguous(BV bv,PetscInt j,Vec *v)BVGetColumn_Contiguous320,10909
+#undef __FUNCT____FUNCT__331,11148
+#define __FUNCT__ __FUNCT__332,11165
+PetscErrorCode BVGetArray_Contiguous(BV bv,PetscScalar **a)BVGetArray_Contiguous333,11207
+#undef __FUNCT____FUNCT__342,11389
+#define __FUNCT__ __FUNCT__343,11406
+PetscErrorCode BVGetArrayRead_Contiguous(BV bv,const PetscScalar **a)BVGetArrayRead_Contiguous344,11452
+#undef __FUNCT____FUNCT__353,11644
+#define __FUNCT__ __FUNCT__354,11661
+PetscErrorCode BVDestroy_Contiguous(BV bv)BVDestroy_Contiguous355,11702
+#undef __FUNCT____FUNCT__367,12023
+#define __FUNCT__ __FUNCT__368,12040
+PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(BV bv)BVCreate_Contiguous369,12080
 

 src/sys/classes/bv/impls/contiguous/makefile,292
 makefile:^?makefile^A,1
@@ -8041,7 +8984,7 @@ DIRS     = vecs contiguous svec matDIRS25,959
 LOCDIR   = src/sys/classes/bv/impls/LOCDIR26,995
 MANSEC   = BVMANSEC27,1032
 

-src/sys/classes/bv/impls/mat/bvmat.c,3542
+src/sys/classes/bv/impls/mat/bvmat.c,3737
 bvmat.c:^?bvmat.c^A,1
   Mat       A;A27,1012
   PetscBool mpi;mpi28,1027
@@ -8049,69 +8992,72 @@ bvmat.c:^?bvmat.c^A,1
 #undef __FUNCT____FUNCT__31,1055
 #define __FUNCT__ __FUNCT__32,1072
 PetscErrorCode BVMult_Mat(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)BVMult_Mat33,1103
-#undef __FUNCT____FUNCT__52,1874
-#define __FUNCT__ __FUNCT__53,1891
-PetscErrorCode BVMultVec_Mat(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Mat54,1925
-#undef __FUNCT____FUNCT__69,2457
-#define __FUNCT__ __FUNCT__70,2474
-PetscErrorCode BVMultInPlace_Mat(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Mat71,2512
-#undef __FUNCT____FUNCT__88,3137
-#define __FUNCT__ __FUNCT__89,3154
-PetscErrorCode BVMultInPlaceTranspose_Mat(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Mat90,3201
-#undef __FUNCT____FUNCT__107,3834
-#define __FUNCT__ __FUNCT__108,3851
-PetscErrorCode BVAXPY_Mat(BV Y,PetscScalar alpha,BV X)BVAXPY_Mat109,3882
-#undef __FUNCT____FUNCT__124,4424
-#define __FUNCT__ __FUNCT__125,4441
-PetscErrorCode BVDot_Mat(BV X,BV Y,Mat M)BVDot_Mat126,4471
-#undef __FUNCT____FUNCT__145,5201
-#define __FUNCT__ __FUNCT__146,5218
-PetscErrorCode BVDotVec_Mat(BV X,Vec y,PetscScalar *m)BVDotVec_Mat147,5251
-#undef __FUNCT____FUNCT__168,5889
-#define __FUNCT__ __FUNCT__169,5906
-PetscErrorCode BVDotVec_Local_Mat(BV X,Vec y,PetscScalar *m)BVDotVec_Local_Mat170,5945
-#undef __FUNCT____FUNCT__190,6553
-#define __FUNCT__ __FUNCT__191,6570
-PetscErrorCode BVScale_Mat(BV bv,PetscInt j,PetscScalar alpha)BVScale_Mat192,6602
-#undef __FUNCT____FUNCT__209,7144
-#define __FUNCT__ __FUNCT__210,7161
-PetscErrorCode BVNorm_Mat(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Mat211,7192
-#undef __FUNCT____FUNCT__228,7770
-#define __FUNCT__ __FUNCT__229,7787
-PetscErrorCode BVNorm_Local_Mat(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Local_Mat230,7824
-#undef __FUNCT____FUNCT__247,8414
-#define __FUNCT__ __FUNCT__248,8431
-PetscErrorCode BVOrthogonalize_Mat(BV V,Mat R)BVOrthogonalize_Mat249,8471
-#undef __FUNCT____FUNCT__264,8990
-#define __FUNCT__ __FUNCT__265,9007
-PetscErrorCode BVMatMult_Mat(BV V,Mat A,BV W)BVMatMult_Mat266,9041
-#undef __FUNCT____FUNCT__313,10940
-#define __FUNCT__ __FUNCT__314,10957
-PetscErrorCode BVCopy_Mat(BV V,BV W)BVCopy_Mat315,10988
-#undef __FUNCT____FUNCT__332,11554
-#define __FUNCT__ __FUNCT__333,11571
-PetscErrorCode BVResize_Mat(BV bv,PetscInt m,PetscBool copy)BVResize_Mat334,11604
-#undef __FUNCT____FUNCT__363,12748
-#define __FUNCT__ __FUNCT__364,12765
-PetscErrorCode BVGetColumn_Mat(BV bv,PetscInt j,Vec *v)BVGetColumn_Mat365,12801
-#undef __FUNCT____FUNCT__379,13163
-#define __FUNCT__ __FUNCT__380,13180
-PetscErrorCode BVRestoreColumn_Mat(BV bv,PetscInt j,Vec *v)BVRestoreColumn_Mat381,13220
-#undef __FUNCT____FUNCT__395,13576
-#define __FUNCT__ __FUNCT__396,13593
-PetscErrorCode BVGetArray_Mat(BV bv,PetscScalar **a)BVGetArray_Mat397,13628
-#undef __FUNCT____FUNCT__407,13852
-#define __FUNCT__ __FUNCT__408,13869
-PetscErrorCode BVRestoreArray_Mat(BV bv,PetscScalar **a)BVRestoreArray_Mat409,13908
-#undef __FUNCT____FUNCT__419,14151
-#define __FUNCT__ __FUNCT__420,14168
-PetscErrorCode BVView_Mat(BV bv,PetscViewer viewer)BVView_Mat421,14199
-#undef __FUNCT____FUNCT__446,15121
-#define __FUNCT__ __FUNCT__447,15138
-PetscErrorCode BVDestroy_Mat(BV bv)BVDestroy_Mat448,15172
-#undef __FUNCT____FUNCT__461,15510
-#define __FUNCT__ __FUNCT__462,15527
-PETSC_EXTERN PetscErrorCode BVCreate_Mat(BV bv)BVCreate_Mat463,15560
+#undef __FUNCT____FUNCT__56,2025
+#define __FUNCT__ __FUNCT__57,2042
+PetscErrorCode BVMultVec_Mat(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Mat58,2076
+#undef __FUNCT____FUNCT__73,2608
+#define __FUNCT__ __FUNCT__74,2625
+PetscErrorCode BVMultInPlace_Mat(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Mat75,2663
+#undef __FUNCT____FUNCT__92,3288
+#define __FUNCT__ __FUNCT__93,3305
+PetscErrorCode BVMultInPlaceTranspose_Mat(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Mat94,3352
+#undef __FUNCT____FUNCT__111,3985
+#define __FUNCT__ __FUNCT__112,4002
+PetscErrorCode BVDot_Mat(BV X,BV Y,Mat M)BVDot_Mat113,4032
+#undef __FUNCT____FUNCT__132,4762
+#define __FUNCT__ __FUNCT__133,4779
+PetscErrorCode BVDotVec_Mat(BV X,Vec y,PetscScalar *m)BVDotVec_Mat134,4812
+#undef __FUNCT____FUNCT__155,5450
+#define __FUNCT__ __FUNCT__156,5467
+PetscErrorCode BVDotVec_Local_Mat(BV X,Vec y,PetscScalar *m)BVDotVec_Local_Mat157,5506
+#undef __FUNCT____FUNCT__177,6114
+#define __FUNCT__ __FUNCT__178,6131
+PetscErrorCode BVScale_Mat(BV bv,PetscInt j,PetscScalar alpha)BVScale_Mat179,6163
+#undef __FUNCT____FUNCT__196,6705
+#define __FUNCT__ __FUNCT__197,6722
+PetscErrorCode BVNorm_Mat(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Mat198,6753
+#undef __FUNCT____FUNCT__215,7331
+#define __FUNCT__ __FUNCT__216,7348
+PetscErrorCode BVNorm_Local_Mat(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Local_Mat217,7385
+#undef __FUNCT____FUNCT__234,7975
+#define __FUNCT__ __FUNCT__235,7992
+PetscErrorCode BVOrthogonalize_Mat(BV V,Mat R)BVOrthogonalize_Mat236,8032
+#undef __FUNCT____FUNCT__251,8551
+#define __FUNCT__ __FUNCT__252,8568
+PetscErrorCode BVMatMult_Mat(BV V,Mat A,BV W)BVMatMult_Mat253,8602
+#undef __FUNCT____FUNCT__300,10501
+#define __FUNCT__ __FUNCT__301,10518
+PetscErrorCode BVCopy_Mat(BV V,BV W)BVCopy_Mat302,10549
+#undef __FUNCT____FUNCT__319,11115
+#define __FUNCT__ __FUNCT__320,11132
+PetscErrorCode BVResize_Mat(BV bv,PetscInt m,PetscBool copy)BVResize_Mat321,11165
+#undef __FUNCT____FUNCT__350,12309
+#define __FUNCT__ __FUNCT__351,12326
+PetscErrorCode BVGetColumn_Mat(BV bv,PetscInt j,Vec *v)BVGetColumn_Mat352,12362
+#undef __FUNCT____FUNCT__366,12724
+#define __FUNCT__ __FUNCT__367,12741
+PetscErrorCode BVRestoreColumn_Mat(BV bv,PetscInt j,Vec *v)BVRestoreColumn_Mat368,12781
+#undef __FUNCT____FUNCT__382,13137
+#define __FUNCT__ __FUNCT__383,13154
+PetscErrorCode BVGetArray_Mat(BV bv,PetscScalar **a)BVGetArray_Mat384,13189
+#undef __FUNCT____FUNCT__394,13413
+#define __FUNCT__ __FUNCT__395,13430
+PetscErrorCode BVRestoreArray_Mat(BV bv,PetscScalar **a)BVRestoreArray_Mat396,13469
+#undef __FUNCT____FUNCT__406,13712
+#define __FUNCT__ __FUNCT__407,13729
+PetscErrorCode BVGetArrayRead_Mat(BV bv,const PetscScalar **a)BVGetArrayRead_Mat408,13768
+#undef __FUNCT____FUNCT__418,14017
+#define __FUNCT__ __FUNCT__419,14034
+PetscErrorCode BVRestoreArrayRead_Mat(BV bv,const PetscScalar **a)BVRestoreArrayRead_Mat420,14077
+#undef __FUNCT____FUNCT__430,14345
+#define __FUNCT__ __FUNCT__431,14362
+PetscErrorCode BVView_Mat(BV bv,PetscViewer viewer)BVView_Mat432,14393
+#undef __FUNCT____FUNCT__457,15315
+#define __FUNCT__ __FUNCT__458,15332
+PetscErrorCode BVDestroy_Mat(BV bv)BVDestroy_Mat459,15366
+#undef __FUNCT____FUNCT__472,15704
+#define __FUNCT__ __FUNCT__473,15721
+PETSC_EXTERN PetscErrorCode BVCreate_Mat(BV bv)BVCreate_Mat474,15754
 

 src/sys/classes/bv/impls/mat/makefile,284
 makefile:^?makefile^A,1
@@ -8137,7 +9083,7 @@ DIRS     =DIRS30,1021
 MANSEC   = BVMANSEC31,1032
 LOCDIR   = src/sys/classes/bv/impls/svec/LOCDIR32,1046
 

-src/sys/classes/bv/impls/svec/svec.c,3588
+src/sys/classes/bv/impls/svec/svec.c,3785
 svec.c:^?svec.c^A,1
   Vec       v;v27,1011
   PetscBool mpi;mpi28,1026
@@ -8145,69 +9091,72 @@ svec.c:^?svec.c^A,1
 #undef __FUNCT____FUNCT__31,1055
 #define __FUNCT__ __FUNCT__32,1072
 PetscErrorCode BVMult_Svec(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)BVMult_Svec33,1104
-#undef __FUNCT____FUNCT__53,1899
-#define __FUNCT__ __FUNCT__54,1916
-PetscErrorCode BVMultVec_Svec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Svec55,1951
-#undef __FUNCT____FUNCT__70,2475
-#define __FUNCT__ __FUNCT__71,2492
-PetscErrorCode BVMultInPlace_Svec(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Svec72,2531
-#undef __FUNCT____FUNCT__89,3148
-#define __FUNCT__ __FUNCT__90,3165
-PetscErrorCode BVMultInPlaceTranspose_Svec(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Svec91,3213
-#undef __FUNCT____FUNCT__108,3838
-#define __FUNCT__ __FUNCT__109,3855
-PetscErrorCode BVAXPY_Svec(BV Y,PetscScalar alpha,BV X)BVAXPY_Svec110,3887
-#undef __FUNCT____FUNCT__125,4412
-#define __FUNCT__ __FUNCT__126,4429
-PetscErrorCode BVDot_Svec(BV X,BV Y,Mat M)BVDot_Svec127,4460
-#undef __FUNCT____FUNCT__147,5222
-#define __FUNCT__ __FUNCT__148,5239
-PetscErrorCode BVDotVec_Svec(BV X,Vec y,PetscScalar *m)BVDotVec_Svec149,5273
-#undef __FUNCT____FUNCT__169,5890
-#define __FUNCT__ __FUNCT__170,5907
-PetscErrorCode BVDotVec_Local_Svec(BV X,Vec y,PetscScalar *m)BVDotVec_Local_Svec171,5947
-#undef __FUNCT____FUNCT__191,6547
-#define __FUNCT__ __FUNCT__192,6564
-PetscErrorCode BVScale_Svec(BV bv,PetscInt j,PetscScalar alpha)BVScale_Svec193,6597
-#undef __FUNCT____FUNCT__210,7131
-#define __FUNCT__ __FUNCT__211,7148
-PetscErrorCode BVNorm_Svec(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Svec212,7180
-#undef __FUNCT____FUNCT__229,7750
-#define __FUNCT__ __FUNCT__230,7767
-PetscErrorCode BVNorm_Local_Svec(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Local_Svec231,7805
-#undef __FUNCT____FUNCT__248,8387
-#define __FUNCT__ __FUNCT__249,8404
-PetscErrorCode BVOrthogonalize_Svec(BV V,Mat R)BVOrthogonalize_Svec250,8445
-#undef __FUNCT____FUNCT__265,8956
-#define __FUNCT__ __FUNCT__266,8973
-PetscErrorCode BVMatMult_Svec(BV V,Mat A,BV W)BVMatMult_Svec267,9008
-#undef __FUNCT____FUNCT__314,10890
-#define __FUNCT__ __FUNCT__315,10907
-PetscErrorCode BVCopy_Svec(BV V,BV W)BVCopy_Svec316,10939
-#undef __FUNCT____FUNCT__333,11488
-#define __FUNCT__ __FUNCT__334,11505
-PetscErrorCode BVResize_Svec(BV bv,PetscInt m,PetscBool copy)BVResize_Svec335,11539
-#undef __FUNCT____FUNCT__367,12775
-#define __FUNCT__ __FUNCT__368,12792
-PetscErrorCode BVGetColumn_Svec(BV bv,PetscInt j,Vec *v)BVGetColumn_Svec369,12829
-#undef __FUNCT____FUNCT__383,13188
-#define __FUNCT__ __FUNCT__384,13205
-PetscErrorCode BVRestoreColumn_Svec(BV bv,PetscInt j,Vec *v)BVRestoreColumn_Svec385,13246
-#undef __FUNCT____FUNCT__398,13578
-#define __FUNCT__ __FUNCT__399,13595
-PetscErrorCode BVGetArray_Svec(BV bv,PetscScalar **a)BVGetArray_Svec400,13631
-#undef __FUNCT____FUNCT__410,13852
-#define __FUNCT__ __FUNCT__411,13869
-PetscErrorCode BVRestoreArray_Svec(BV bv,PetscScalar **a)BVRestoreArray_Svec412,13909
-#undef __FUNCT____FUNCT__422,14138
-#define __FUNCT__ __FUNCT__423,14155
-PetscErrorCode BVView_Svec(BV bv,PetscViewer viewer)BVView_Svec424,14187
-#undef __FUNCT____FUNCT__449,15145
-#define __FUNCT__ __FUNCT__450,15162
-PetscErrorCode BVDestroy_Svec(BV bv)BVDestroy_Svec451,15197
-#undef __FUNCT____FUNCT__464,15537
-#define __FUNCT__ __FUNCT__465,15554
-PETSC_EXTERN PetscErrorCode BVCreate_Svec(BV bv)BVCreate_Svec466,15588
+#undef __FUNCT____FUNCT__57,2050
+#define __FUNCT__ __FUNCT__58,2067
+PetscErrorCode BVMultVec_Svec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Svec59,2102
+#undef __FUNCT____FUNCT__74,2626
+#define __FUNCT__ __FUNCT__75,2643
+PetscErrorCode BVMultInPlace_Svec(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Svec76,2682
+#undef __FUNCT____FUNCT__93,3299
+#define __FUNCT__ __FUNCT__94,3316
+PetscErrorCode BVMultInPlaceTranspose_Svec(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Svec95,3364
+#undef __FUNCT____FUNCT__112,3989
+#define __FUNCT__ __FUNCT__113,4006
+PetscErrorCode BVDot_Svec(BV X,BV Y,Mat M)BVDot_Svec114,4037
+#undef __FUNCT____FUNCT__134,4799
+#define __FUNCT__ __FUNCT__135,4816
+PetscErrorCode BVDotVec_Svec(BV X,Vec y,PetscScalar *m)BVDotVec_Svec136,4850
+#undef __FUNCT____FUNCT__156,5467
+#define __FUNCT__ __FUNCT__157,5484
+PetscErrorCode BVDotVec_Local_Svec(BV X,Vec y,PetscScalar *m)BVDotVec_Local_Svec158,5524
+#undef __FUNCT____FUNCT__178,6124
+#define __FUNCT__ __FUNCT__179,6141
+PetscErrorCode BVScale_Svec(BV bv,PetscInt j,PetscScalar alpha)BVScale_Svec180,6174
+#undef __FUNCT____FUNCT__197,6708
+#define __FUNCT__ __FUNCT__198,6725
+PetscErrorCode BVNorm_Svec(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Svec199,6757
+#undef __FUNCT____FUNCT__216,7327
+#define __FUNCT__ __FUNCT__217,7344
+PetscErrorCode BVNorm_Local_Svec(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Local_Svec218,7382
+#undef __FUNCT____FUNCT__235,7964
+#define __FUNCT__ __FUNCT__236,7981
+PetscErrorCode BVOrthogonalize_Svec(BV V,Mat R)BVOrthogonalize_Svec237,8022
+#undef __FUNCT____FUNCT__252,8533
+#define __FUNCT__ __FUNCT__253,8550
+PetscErrorCode BVMatMult_Svec(BV V,Mat A,BV W)BVMatMult_Svec254,8585
+#undef __FUNCT____FUNCT__301,10467
+#define __FUNCT__ __FUNCT__302,10484
+PetscErrorCode BVCopy_Svec(BV V,BV W)BVCopy_Svec303,10516
+#undef __FUNCT____FUNCT__320,11065
+#define __FUNCT__ __FUNCT__321,11082
+PetscErrorCode BVResize_Svec(BV bv,PetscInt m,PetscBool copy)BVResize_Svec322,11116
+#undef __FUNCT____FUNCT__354,12352
+#define __FUNCT__ __FUNCT__355,12369
+PetscErrorCode BVGetColumn_Svec(BV bv,PetscInt j,Vec *v)BVGetColumn_Svec356,12406
+#undef __FUNCT____FUNCT__370,12765
+#define __FUNCT__ __FUNCT__371,12782
+PetscErrorCode BVRestoreColumn_Svec(BV bv,PetscInt j,Vec *v)BVRestoreColumn_Svec372,12823
+#undef __FUNCT____FUNCT__385,13155
+#define __FUNCT__ __FUNCT__386,13172
+PetscErrorCode BVGetArray_Svec(BV bv,PetscScalar **a)BVGetArray_Svec387,13208
+#undef __FUNCT____FUNCT__397,13429
+#define __FUNCT__ __FUNCT__398,13446
+PetscErrorCode BVRestoreArray_Svec(BV bv,PetscScalar **a)BVRestoreArray_Svec399,13486
+#undef __FUNCT____FUNCT__409,13715
+#define __FUNCT__ __FUNCT__410,13732
+PetscErrorCode BVGetArrayRead_Svec(BV bv,const PetscScalar **a)BVGetArrayRead_Svec411,13772
+#undef __FUNCT____FUNCT__421,14007
+#define __FUNCT__ __FUNCT__422,14024
+PetscErrorCode BVRestoreArrayRead_Svec(BV bv,const PetscScalar **a)BVRestoreArrayRead_Svec423,14068
+#undef __FUNCT____FUNCT__433,14311
+#define __FUNCT__ __FUNCT__434,14328
+PetscErrorCode BVView_Svec(BV bv,PetscViewer viewer)BVView_Svec435,14360
+#undef __FUNCT____FUNCT__460,15318
+#define __FUNCT__ __FUNCT__461,15335
+PetscErrorCode BVDestroy_Svec(BV bv)BVDestroy_Svec462,15370
+#undef __FUNCT____FUNCT__475,15710
+#define __FUNCT__ __FUNCT__476,15727
+PETSC_EXTERN PetscErrorCode BVCreate_Svec(BV bv)BVCreate_Svec477,15761
 

 src/sys/classes/bv/impls/vecs/makefile,283
 makefile:^?makefile^A,1
@@ -8221,7 +9170,7 @@ DIRS     =DIRS30,1021
 MANSEC   = BVMANSEC31,1032
 LOCDIR   = src/sys/classes/bv/impls/vecs/LOCDIR32,1046
 

-src/sys/classes/bv/impls/vecs/vecs.c,4014
+src/sys/classes/bv/impls/vecs/vecs.c,4533
 vecs.c:^?vecs.c^A,1
   Vec      *V;V27,1027
   PetscInt vmip;   /* Version of BVMultInPlace:vmip28,1042
@@ -8229,77 +9178,86 @@ vecs.c:^?vecs.c^A,1
 #undef __FUNCT____FUNCT__33,1258
 #define __FUNCT__ __FUNCT__34,1275
 PetscErrorCode BVMult_Vecs(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)BVMult_Vecs35,1307
-#undef __FUNCT____FUNCT__60,2107
-#define __FUNCT__ __FUNCT__61,2124
-PetscErrorCode BVMultVec_Vecs(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Vecs62,2159
-#undef __FUNCT____FUNCT__82,2708
-#define __FUNCT__ __FUNCT__83,2725
-PetscErrorCode BVMultInPlace_Vecs_ME(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Vecs_ME93,3091
-#undef __FUNCT____FUNCT__118,3878
-#define __FUNCT__ __FUNCT__119,3895
-PetscErrorCode BVMultInPlace_Vecs_Alloc(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Vecs_Alloc125,4100
-#undef __FUNCT____FUNCT__148,4801
-#define __FUNCT__ __FUNCT__149,4818
-PetscErrorCode BVMultInPlaceTranspose_Vecs(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Vecs153,4953
-#undef __FUNCT____FUNCT__178,5746
-#define __FUNCT__ __FUNCT__179,5763
-PetscErrorCode BVAXPY_Vecs(BV Y,PetscScalar alpha,BV X)BVAXPY_Vecs180,5795
-#undef __FUNCT____FUNCT__193,6125
-#define __FUNCT__ __FUNCT__194,6142
-PetscErrorCode BVDot_Vecs(BV X,BV Y,Mat M)BVDot_Vecs195,6173
-#undef __FUNCT____FUNCT__212,6668
-#define __FUNCT__ __FUNCT__213,6685
-PetscErrorCode BVDotVec_Vecs(BV X,Vec y,PetscScalar *m)BVDotVec_Vecs214,6719
-#undef __FUNCT____FUNCT__229,7062
-#define __FUNCT__ __FUNCT__230,7079
-PetscErrorCode BVDotVec_Begin_Vecs(BV X,Vec y,PetscScalar *m)BVDotVec_Begin_Vecs231,7119
-#undef __FUNCT____FUNCT__246,7473
-#define __FUNCT__ __FUNCT__247,7490
-PetscErrorCode BVDotVec_End_Vecs(BV X,Vec y,PetscScalar *m)BVDotVec_End_Vecs248,7528
-#undef __FUNCT____FUNCT__258,7772
-#define __FUNCT__ __FUNCT__259,7789
-PetscErrorCode BVScale_Vecs(BV bv,PetscInt j,PetscScalar alpha)BVScale_Vecs260,7822
-#undef __FUNCT____FUNCT__277,8213
-#define __FUNCT__ __FUNCT__278,8230
-PetscErrorCode BVNorm_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Vecs279,8262
-#undef __FUNCT____FUNCT__306,8941
-#define __FUNCT__ __FUNCT__307,8958
-PetscErrorCode BVNorm_Begin_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Begin_Vecs308,8996
-#undef __FUNCT____FUNCT__325,9419
-#define __FUNCT__ __FUNCT__326,9436
-PetscErrorCode BVNorm_End_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_End_Vecs327,9472
-#undef __FUNCT____FUNCT__344,9891
-#define __FUNCT__ __FUNCT__345,9908
-PetscErrorCode BVMatMult_Vecs(BV V,Mat A,BV W)BVMatMult_Vecs346,9943
-#undef __FUNCT____FUNCT__360,10349
-#define __FUNCT__ __FUNCT__361,10366
-PetscErrorCode BVCopy_Vecs(BV V,BV W)BVCopy_Vecs362,10398
-#undef __FUNCT____FUNCT__375,10704
-#define __FUNCT__ __FUNCT__376,10721
-PetscErrorCode BVResize_Vecs(BV bv,PetscInt m,PetscBool copy)BVResize_Vecs377,10755
-#undef __FUNCT____FUNCT__404,11535
-#define __FUNCT__ __FUNCT__405,11552
-PetscErrorCode BVGetColumn_Vecs(BV bv,PetscInt j,Vec *v)BVGetColumn_Vecs406,11589
-#undef __FUNCT____FUNCT__417,11806
-#define __FUNCT__ __FUNCT__418,11823
-PetscErrorCode BVGetArray_Vecs(BV bv,PetscScalar **a)BVGetArray_Vecs419,11859
-#undef __FUNCT____FUNCT__436,12398
-#define __FUNCT__ __FUNCT__437,12415
-PetscErrorCode BVRestoreArray_Vecs(BV bv,PetscScalar **a)BVRestoreArray_Vecs438,12455
-#undef __FUNCT____FUNCT__455,12936
-#define __FUNCT__ __FUNCT__456,12953
-PetscErrorCode BVSetFromOptions_Vecs(PetscOptions *PetscOptionsObject,BV bv)BVSetFromOptions_Vecs457,12995
-#undef __FUNCT____FUNCT__470,13577
-#define __FUNCT__ __FUNCT__471,13594
-PetscErrorCode BVView_Vecs(BV bv,PetscViewer viewer)BVView_Vecs472,13626
-#undef __FUNCT____FUNCT__501,14659
-#define __FUNCT__ __FUNCT__502,14676
-PetscErrorCode BVDestroy_Vecs(BV bv)BVDestroy_Vecs503,14711
-#undef __FUNCT____FUNCT__514,14974
-#define __FUNCT__ __FUNCT__515,14991
-PETSC_EXTERN PetscErrorCode BVCreate_Vecs(BV bv)BVCreate_Vecs516,15025
-

-src/sys/classes/bv/interface/bvbasic.c,5178
+#undef __FUNCT____FUNCT__67,2342
+#define __FUNCT__ __FUNCT__68,2359
+PetscErrorCode BVMultVec_Vecs(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec_Vecs69,2394
+#undef __FUNCT____FUNCT__89,2943
+#define __FUNCT__ __FUNCT__90,2960
+PetscErrorCode BVMultInPlace_Vecs_ME(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Vecs_ME100,3326
+#undef __FUNCT____FUNCT__125,4112
+#define __FUNCT__ __FUNCT__126,4129
+PetscErrorCode BVMultInPlace_Vecs_Alloc(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace_Vecs_Alloc132,4334
+#undef __FUNCT____FUNCT__155,5035
+#define __FUNCT__ __FUNCT__156,5052
+PetscErrorCode BVMultInPlaceTranspose_Vecs(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose_Vecs160,5187
+#undef __FUNCT____FUNCT__185,5980
+#define __FUNCT__ __FUNCT__186,5997
+PetscErrorCode BVDot_Vecs(BV X,BV Y,Mat M)BVDot_Vecs187,6028
+#undef __FUNCT____FUNCT__204,6523
+#define __FUNCT__ __FUNCT__205,6540
+PetscErrorCode BVDotVec_Vecs(BV X,Vec y,PetscScalar *m)BVDotVec_Vecs206,6574
+#undef __FUNCT____FUNCT__221,6917
+#define __FUNCT__ __FUNCT__222,6934
+PetscErrorCode BVDotVec_Begin_Vecs(BV X,Vec y,PetscScalar *m)BVDotVec_Begin_Vecs223,6974
+#undef __FUNCT____FUNCT__238,7328
+#define __FUNCT__ __FUNCT__239,7345
+PetscErrorCode BVDotVec_End_Vecs(BV X,Vec y,PetscScalar *m)BVDotVec_End_Vecs240,7383
+#undef __FUNCT____FUNCT__250,7627
+#define __FUNCT__ __FUNCT__251,7644
+PetscErrorCode BVScale_Vecs(BV bv,PetscInt j,PetscScalar alpha)BVScale_Vecs252,7677
+#undef __FUNCT____FUNCT__269,8068
+#define __FUNCT__ __FUNCT__270,8085
+PetscErrorCode BVNorm_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Vecs271,8117
+#undef __FUNCT____FUNCT__298,8796
+#define __FUNCT__ __FUNCT__299,8813
+PetscErrorCode BVNorm_Begin_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_Begin_Vecs300,8851
+#undef __FUNCT____FUNCT__317,9274
+#define __FUNCT__ __FUNCT__318,9291
+PetscErrorCode BVNorm_End_Vecs(BV bv,PetscInt j,NormType type,PetscReal *val)BVNorm_End_Vecs319,9327
+#undef __FUNCT____FUNCT__336,9746
+#define __FUNCT__ __FUNCT__337,9763
+PetscErrorCode BVMatMult_Vecs(BV V,Mat A,BV W)BVMatMult_Vecs338,9798
+#undef __FUNCT____FUNCT__352,10204
+#define __FUNCT__ __FUNCT__353,10221
+PetscErrorCode BVCopy_Vecs(BV V,BV W)BVCopy_Vecs354,10253
+#undef __FUNCT____FUNCT__367,10559
+#define __FUNCT__ __FUNCT__368,10576
+PetscErrorCode BVResize_Vecs(BV bv,PetscInt m,PetscBool copy)BVResize_Vecs369,10610
+#undef __FUNCT____FUNCT__396,11390
+#define __FUNCT__ __FUNCT__397,11407
+PetscErrorCode BVGetColumn_Vecs(BV bv,PetscInt j,Vec *v)BVGetColumn_Vecs398,11444
+#undef __FUNCT____FUNCT__409,11661
+#define __FUNCT__ __FUNCT__410,11678
+PetscErrorCode BVGetArray_Vecs(BV bv,PetscScalar **a)BVGetArray_Vecs411,11714
+#undef __FUNCT____FUNCT__428,12253
+#define __FUNCT__ __FUNCT__429,12270
+PetscErrorCode BVRestoreArray_Vecs(BV bv,PetscScalar **a)BVRestoreArray_Vecs430,12310
+#undef __FUNCT____FUNCT__447,12791
+#define __FUNCT__ __FUNCT__448,12808
+PetscErrorCode BVGetArrayRead_Vecs(BV bv,const PetscScalar **a)BVGetArrayRead_Vecs449,12848
+#undef __FUNCT____FUNCT__466,13412
+#define __FUNCT__ __FUNCT__467,13429
+PetscErrorCode BVRestoreArrayRead_Vecs(BV bv,const PetscScalar **a)BVRestoreArrayRead_Vecs468,13473
+#undef __FUNCT____FUNCT__477,13656
+#define __FUNCT__ __FUNCT__478,13673
+PetscErrorCode BVSetFromOptions_Vecs(PetscOptionItems *PetscOptionsObject,BV bv)BVSetFromOptions_Vecs479,13715
+#undef __FUNCT____FUNCT__492,14301
+#define __FUNCT__ __FUNCT__493,14318
+PetscErrorCode BVView_Vecs(BV bv,PetscViewer viewer)BVView_Vecs494,14350
+#undef __FUNCT____FUNCT__523,15383
+#define __FUNCT__ __FUNCT__524,15400
+PetscErrorCode BVDestroy_Vecs(BV bv)BVDestroy_Vecs525,15435
+#undef __FUNCT____FUNCT__536,15698
+#define __FUNCT__ __FUNCT__537,15715
+PETSC_STATIC_INLINE PetscErrorCode BVVecsSetVmip(BV bv,PetscInt vmip)BVVecsSetVmip541,15827
+#undef __FUNCT____FUNCT__553,16219
+#define __FUNCT__ __FUNCT__554,16236
+PetscErrorCode BVDuplicate_Vecs(BV V,BV *W)BVDuplicate_Vecs555,16273
+#undef __FUNCT____FUNCT__565,16489
+#define __FUNCT__ __FUNCT__566,16506
+PETSC_EXTERN PetscErrorCode BVCreate_Vecs(BV bv)BVCreate_Vecs567,16540
+

+src/sys/classes/bv/interface/bvbasic.c,6032
 bvbasic.c:^?bvbasic.c^A,1
 PetscBool         BVRegisterAllCalled = PETSC_FALSE;BVRegisterAllCalled26,1007
 PetscFunctionList BVList = 0;BVList27,1060
@@ -8356,51 +9314,66 @@ PetscErrorCode BVSetSignature(BV bv,Vec omega)BVSetSignature683,20231
 PetscErrorCode BVGetSignature(BV bv,Vec omega)BVGetSignature728,21555
 #undef __FUNCT____FUNCT__752,22303
 #define __FUNCT__ __FUNCT__753,22320
-PetscErrorCode BVSetFromOptions(BV bv)BVSetFromOptions764,22526
-#undef __FUNCT____FUNCT__816,25323
-#define __FUNCT__ __FUNCT__817,25340
-PetscErrorCode BVSetOrthogonalization(BV bv,BVOrthogType type,BVOrthogRefineType refine,PetscReal eta,BVOrthogBlockType block)BVSetOrthogonalization855,26919
-#undef __FUNCT____FUNCT__897,28307
-#define __FUNCT__ __FUNCT__898,28324
-PetscErrorCode BVGetOrthogonalization(BV bv,BVOrthogType *type,BVOrthogRefineType *refine,PetscReal *eta,BVOrthogBlockType *block)BVGetOrthogonalization917,28864
-#undef __FUNCT____FUNCT__928,29256
-#define __FUNCT__ __FUNCT__929,29273
-PetscErrorCode BVSetMatMultMethod(BV bv,BVMatMultType method)BVSetMatMultMethod951,29900
-#undef __FUNCT____FUNCT__968,30357
-#define __FUNCT__ __FUNCT__969,30374
-PetscErrorCode BVGetMatMultMethod(BV bv,BVMatMultType *method)BVGetMatMultMethod985,30709
-#undef __FUNCT____FUNCT__994,30923
-#define __FUNCT__ __FUNCT__995,30940
-PetscErrorCode BVGetColumn(BV bv,PetscInt j,Vec *v)BVGetColumn1025,31878
-#undef __FUNCT____FUNCT__1048,33060
-#define __FUNCT__ __FUNCT__1049,33077
-PetscErrorCode BVRestoreColumn(BV bv,PetscInt j,Vec *v)BVRestoreColumn1067,33474
-#undef __FUNCT____FUNCT__1101,34942
-#define __FUNCT__ __FUNCT__1102,34959
-PetscErrorCode BVGetArray(BV bv,PetscScalar **a)BVGetArray1127,35685
-#undef __FUNCT____FUNCT__1139,35953
-#define __FUNCT__ __FUNCT__1140,35970
-PetscErrorCode BVRestoreArray(BV bv,PetscScalar **a)BVRestoreArray1158,36402
-#undef __FUNCT____FUNCT__1174,36801
-#define __FUNCT__ __FUNCT__1175,36818
-PetscErrorCode BVCreateVec(BV bv,Vec *v)BVCreateVec1193,37194
-#undef __FUNCT____FUNCT__1205,37451
-#define __FUNCT__ __FUNCT__1206,37468
-PetscErrorCode BVDuplicate(BV V,BV *W)BVDuplicate1231,38161
-#undef __FUNCT____FUNCT__1249,38816
-#define __FUNCT__ __FUNCT__1250,38833
-PetscErrorCode BVDuplicateResize(BV V,PetscInt m,BV *W)BVDuplicateResize1272,39384
-#undef __FUNCT____FUNCT__1291,40094
-#define __FUNCT__ __FUNCT__1292,40111
-PetscErrorCode BVCopy(BV V,BV W)BVCopy1314,40693
-#undef __FUNCT____FUNCT__1341,41755
-#define __FUNCT__ __FUNCT__1342,41772
-PetscErrorCode BVCopyVec(BV V,PetscInt j,Vec w)BVCopyVec1362,42215
-#undef __FUNCT____FUNCT__1388,43105
-#define __FUNCT__ __FUNCT__1389,43122
-PetscErrorCode BVCopyColumn(BV V,PetscInt j,PetscInt i)BVCopyColumn1404,43456
-

-src/sys/classes/bv/interface/bvblas.c,2495
+PetscErrorCode BVSetRandomContext(BV bv,PetscRandom rand)BVSetRandomContext768,22710
+#undef __FUNCT____FUNCT__783,23203
+#define __FUNCT__ __FUNCT__784,23220
+PetscErrorCode BVGetRandomContext(BV bv,PetscRandom* rand)BVGetRandomContext800,23573
+#undef __FUNCT____FUNCT__819,24151
+#define __FUNCT__ __FUNCT__820,24168
+PetscErrorCode BVSetFromOptions(BV bv)BVSetFromOptions831,24374
+#undef __FUNCT____FUNCT__877,26873
+#define __FUNCT__ __FUNCT__878,26890
+PetscErrorCode BVSetOrthogonalization(BV bv,BVOrthogType type,BVOrthogRefineType refine,PetscReal eta,BVOrthogBlockType block)BVSetOrthogonalization916,28469
+#undef __FUNCT____FUNCT__958,29857
+#define __FUNCT__ __FUNCT__959,29874
+PetscErrorCode BVGetOrthogonalization(BV bv,BVOrthogType *type,BVOrthogRefineType *refine,PetscReal *eta,BVOrthogBlockType *block)BVGetOrthogonalization978,30414
+#undef __FUNCT____FUNCT__989,30806
+#define __FUNCT__ __FUNCT__990,30823
+PetscErrorCode BVSetMatMultMethod(BV bv,BVMatMultType method)BVSetMatMultMethod1014,31554
+#undef __FUNCT____FUNCT__1031,32011
+#define __FUNCT__ __FUNCT__1032,32028
+PetscErrorCode BVGetMatMultMethod(BV bv,BVMatMultType *method)BVGetMatMultMethod1048,32376
+#undef __FUNCT____FUNCT__1057,32590
+#define __FUNCT__ __FUNCT__1058,32607
+PetscErrorCode BVGetColumn(BV bv,PetscInt j,Vec *v)BVGetColumn1088,33545
+#undef __FUNCT____FUNCT__1111,34727
+#define __FUNCT__ __FUNCT__1112,34744
+PetscErrorCode BVRestoreColumn(BV bv,PetscInt j,Vec *v)BVRestoreColumn1130,35141
+#undef __FUNCT____FUNCT__1164,36609
+#define __FUNCT__ __FUNCT__1165,36626
+PetscErrorCode BVGetArray(BV bv,PetscScalar **a)BVGetArray1190,37352
+#undef __FUNCT____FUNCT__1202,37620
+#define __FUNCT__ __FUNCT__1203,37637
+PetscErrorCode BVRestoreArray(BV bv,PetscScalar **a)BVRestoreArray1221,38069
+#undef __FUNCT____FUNCT__1237,38468
+#define __FUNCT__ __FUNCT__1238,38485
+PetscErrorCode BVGetArrayRead(BV bv,const PetscScalar **a)BVGetArrayRead1263,39221
+#undef __FUNCT____FUNCT__1275,39503
+#define __FUNCT__ __FUNCT__1276,39520
+PetscErrorCode BVRestoreArrayRead(BV bv,const PetscScalar **a)BVRestoreArrayRead1291,39857
+#undef __FUNCT____FUNCT__1306,40208
+#define __FUNCT__ __FUNCT__1307,40225
+PetscErrorCode BVCreateVec(BV bv,Vec *v)BVCreateVec1325,40601
+#undef __FUNCT____FUNCT__1337,40858
+#define __FUNCT__ __FUNCT__1338,40875
+PETSC_STATIC_INLINE PetscErrorCode BVDuplicate_Private(BV V,PetscInt m,BV *W)BVDuplicate_Private1339,40915
+#undef __FUNCT____FUNCT__1354,41569
+#define __FUNCT__ __FUNCT__1355,41586
+PetscErrorCode BVDuplicate(BV V,BV *W)BVDuplicate1380,42279
+#undef __FUNCT____FUNCT__1393,42563
+#define __FUNCT__ __FUNCT__1394,42580
+PetscErrorCode BVDuplicateResize(BV V,PetscInt m,BV *W)BVDuplicateResize1416,43131
+#undef __FUNCT____FUNCT__1430,43470
+#define __FUNCT__ __FUNCT__1431,43487
+PetscErrorCode BVCopy(BV V,BV W)BVCopy1453,44069
+#undef __FUNCT____FUNCT__1480,45131
+#define __FUNCT__ __FUNCT__1481,45148
+PetscErrorCode BVCopyVec(BV V,PetscInt j,Vec w)BVCopyVec1501,45591
+#undef __FUNCT____FUNCT__1527,46481
+#define __FUNCT__ __FUNCT__1528,46498
+PetscErrorCode BVCopyColumn(BV V,PetscInt j,PetscInt i)BVCopyColumn1543,46832
+

+src/sys/classes/bv/interface/bvblas.c,2515
 bvblas.c:^?bvblas.c^A,1
 #define BLOCKSIZE BLOCKSIZE27,1030
 #undef __FUNCT____FUNCT__29,1052
@@ -8417,82 +9390,91 @@ PetscErrorCode BVMultInPlace_BLAS_Private(BV bv,PetscInt m_,PetscInt k_,PetscInt
 PetscErrorCode BVMultInPlace_Vecs_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt k_,Vec *V,const PetscScalar *B,PetscBool btrans)BVMultInPlace_Vecs_Private134,4530
 #undef __FUNCT____FUNCT__182,6401
 #define __FUNCT__ __FUNCT__183,6418
-PetscErrorCode BVAXPY_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar *B)BVAXPY_BLAS_Private189,6509
-#undef __FUNCT____FUNCT__201,6901
-#define __FUNCT__ __FUNCT__202,6918
-PetscErrorCode BVDot_BLAS_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt k_,PetscInt ldc_,const PetscScalar *A,const PetscScalar *B,PetscScalar *C,PetscBool mpi)BVDot_BLAS_Private208,7035
-#undef __FUNCT____FUNCT__242,8702
-#define __FUNCT__ __FUNCT__243,8719
-PetscErrorCode BVDotVec_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,const PetscScalar *A,const PetscScalar *x,PetscScalar *y,PetscBool mpi)BVDotVec_BLAS_Private249,8802
-#undef __FUNCT____FUNCT__273,9713
-#define __FUNCT__ __FUNCT__274,9730
-PetscErrorCode BVScale_BLAS_Private(BV bv,PetscInt n_,PetscScalar *A,PetscScalar alpha)BVScale_BLAS_Private278,9797
-#undef __FUNCT____FUNCT__294,10260
-#define __FUNCT__ __FUNCT__295,10277
-PetscErrorCode BVNorm_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,const PetscScalar *A,NormType type,PetscReal *nrm,PetscBool mpi)BVNorm_LAPACK_Private299,10361
-#undef __FUNCT____FUNCT__348,12320
-#define __FUNCT__ __FUNCT__349,12337
-PetscErrorCode BVOrthogonalize_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,PetscScalar *Q,PetscScalar *R,PetscBool mpi)BVOrthogonalize_LAPACK_Private353,12432
-

-src/sys/classes/bv/interface/bvfunc.c,4437
+PetscErrorCode BVAXPY_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar beta,PetscScalar *B)BVAXPY_BLAS_Private189,6514
+#undef __FUNCT____FUNCT__205,7061
+#define __FUNCT__ __FUNCT__206,7078
+PetscErrorCode BVDot_BLAS_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt k_,PetscInt ldc_,const PetscScalar *A,const PetscScalar *B,PetscScalar *C,PetscBool mpi)BVDot_BLAS_Private212,7195
+#undef __FUNCT____FUNCT__248,8974
+#define __FUNCT__ __FUNCT__249,8991
+PetscErrorCode BVDotVec_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,const PetscScalar *A,const PetscScalar *x,PetscScalar *y,PetscBool mpi)BVDotVec_BLAS_Private255,9074
+#undef __FUNCT____FUNCT__280,10041
+#define __FUNCT__ __FUNCT__281,10058
+PetscErrorCode BVScale_BLAS_Private(BV bv,PetscInt n_,PetscScalar *A,PetscScalar alpha)BVScale_BLAS_Private285,10125
+#undef __FUNCT____FUNCT__301,10617
+#define __FUNCT__ __FUNCT__302,10634
+PetscErrorCode BVNorm_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,const PetscScalar *A,NormType type,PetscReal *nrm,PetscBool mpi)BVNorm_LAPACK_Private306,10718
+#undef __FUNCT____FUNCT__358,12771
+#define __FUNCT__ __FUNCT__359,12788
+PetscErrorCode BVOrthogonalize_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,PetscScalar *Q,PetscScalar *R,PetscBool mpi)BVOrthogonalize_LAPACK_Private363,12883
+

+src/sys/classes/bv/interface/bvfunc.c,7380
 bvfunc.c:^?bvfunc.c^A,1
 PetscClassId     BV_CLASSID = 0;BV_CLASSID26,1052
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Create27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Copy27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Mult27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Dot27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Orthogonalize27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Scale27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_Norm27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_SetRandom27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_MatMult27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_MatProject27,1085
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;BV_AXPY27,1085
-static PetscBool BVPackageInitialized = PETSC_FALSE;BVPackageInitialized28,1260
-#undef __FUNCT____FUNCT__30,1314
-#define __FUNCT__ __FUNCT__31,1331
-PetscErrorCode BVFinalizePackage(void)BVFinalizePackage40,1563
-#undef __FUNCT____FUNCT__51,1813
-#define __FUNCT__ __FUNCT__52,1830
-PetscErrorCode BVInitializePackage(void)BVInitializePackage62,2154
-#undef __FUNCT____FUNCT__108,4179
-#define __FUNCT__ __FUNCT__109,4196
-PetscErrorCode BVDestroy(BV *bv)BVDestroy122,4421
-#undef __FUNCT____FUNCT__144,5254
-#define __FUNCT__ __FUNCT__145,5271
-PetscErrorCode BVCreate(MPI_Comm comm,BV *newbv)BVCreate161,5560
-#undef __FUNCT____FUNCT__215,6944
-#define __FUNCT__ __FUNCT__216,6961
-PetscErrorCode BVInsertVec(BV V,PetscInt j,Vec w)BVInsertVec231,7247
-#undef __FUNCT____FUNCT__257,8258
-#define __FUNCT__ __FUNCT__258,8275
-PetscErrorCode BVInsertVecs(BV V,PetscInt s,PetscInt *m,Vec *W,PetscBool orth)BVInsertVecs284,9076
-#undef __FUNCT____FUNCT__332,11004
-#define __FUNCT__ __FUNCT__333,11021
-PetscErrorCode BVInsertConstraints(BV V,PetscInt *nc,Vec *C)BVInsertConstraints369,12394
-#undef __FUNCT____FUNCT__399,13524
-#define __FUNCT__ __FUNCT__400,13541
-PetscErrorCode BVSetOptionsPrefix(BV bv,const char *prefix)BVSetOptionsPrefix420,14082
-#undef __FUNCT____FUNCT__430,14340
-#define __FUNCT__ __FUNCT__431,14357
-PetscErrorCode BVAppendOptionsPrefix(BV bv,const char *prefix)BVAppendOptionsPrefix451,14907
-#undef __FUNCT____FUNCT__461,15171
-#define __FUNCT__ __FUNCT__462,15188
-PetscErrorCode BVGetOptionsPrefix(BV bv,const char *prefix[])BVGetOptionsPrefix482,15686
-#undef __FUNCT____FUNCT__493,15977
-#define __FUNCT__ __FUNCT__494,15994
-static PetscErrorCode BVView_Default(BV bv,PetscViewer viewer)BVView_Default495,16029
-#undef __FUNCT____FUNCT__526,17130
-#define __FUNCT__ __FUNCT__527,17147
-PetscErrorCode BVView(BV bv,PetscViewer viewer)BVView552,17838
-#undef __FUNCT____FUNCT__621,21102
-#define __FUNCT__ __FUNCT__622,21119
-PetscErrorCode BVRegister(const char *name,PetscErrorCode (*function)(BV))BVRegister640,21493
-#undef __FUNCT____FUNCT__649,21713
-#define __FUNCT__ __FUNCT__650,21730
-PetscErrorCode BVAllocateWork_Private(BV bv,PetscInt s)BVAllocateWork_Private651,21773
-

-src/sys/classes/bv/interface/bvglobal.c,4028
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Create27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Copy27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Mult27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_MultVec27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_MultInPlace27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Dot27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_DotVec27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Orthogonalize27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_OrthogonalizeVec27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Scale27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_Norm27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_NormVec27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_SetRandom27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_MatMult27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_MatMultVec27,1085
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;BV_MatProject27,1085
+static PetscBool BVPackageInitialized = PETSC_FALSE;BVPackageInitialized28,1353
+const char *BVOrthogTypes[] = {"CGS","MGS","BVOrthogType","BV_ORTHOG_",0};BVOrthogTypes30,1407
+const char *BVOrthogRefineTypes[] = {"IFNEEDED","NEVER","ALWAYS","BVOrthogRefineType","BV_ORTHOG_REFINE_",0};BVOrthogRefineTypes31,1482
+const char *BVOrthogBlockTypes[] = {"GS","CHOL","BVOrthogBlockType","BV_ORTHOG_BLOCK_",0};BVOrthogBlockTypes32,1592
+const char *BVMatMultTypes[] = {"VECS","MAT","MAT_SAVE","BVMatMultType","BV_MATMULT_",0};BVMatMultTypes33,1683
+#undef __FUNCT____FUNCT__35,1774
+#define __FUNCT__ __FUNCT__36,1791
+PetscErrorCode BVFinalizePackage(void)BVFinalizePackage45,2023
+#undef __FUNCT____FUNCT__56,2273
+#define __FUNCT__ __FUNCT__57,2290
+PetscErrorCode BVInitializePackage(void)BVInitializePackage67,2614
+#undef __FUNCT____FUNCT__118,5085
+#define __FUNCT__ __FUNCT__119,5102
+PetscErrorCode BVDestroy(BV *bv)BVDestroy132,5327
+#undef __FUNCT____FUNCT__155,6217
+#define __FUNCT__ __FUNCT__156,6234
+PetscErrorCode BVCreate(MPI_Comm comm,BV *newbv)BVCreate172,6523
+#undef __FUNCT____FUNCT__228,7968
+#define __FUNCT__ __FUNCT__229,7985
+PetscErrorCode BVInsertVec(BV V,PetscInt j,Vec w)BVInsertVec244,8271
+#undef __FUNCT____FUNCT__270,9282
+#define __FUNCT__ __FUNCT__271,9299
+PetscErrorCode BVInsertVecs(BV V,PetscInt s,PetscInt *m,Vec *W,PetscBool orth)BVInsertVecs297,10100
+#undef __FUNCT____FUNCT__345,12028
+#define __FUNCT__ __FUNCT__346,12045
+PetscErrorCode BVInsertConstraints(BV V,PetscInt *nc,Vec *C)BVInsertConstraints382,13418
+#undef __FUNCT____FUNCT__412,14548
+#define __FUNCT__ __FUNCT__413,14565
+PetscErrorCode BVSetOptionsPrefix(BV bv,const char *prefix)BVSetOptionsPrefix433,15106
+#undef __FUNCT____FUNCT__443,15364
+#define __FUNCT__ __FUNCT__444,15381
+PetscErrorCode BVAppendOptionsPrefix(BV bv,const char *prefix)BVAppendOptionsPrefix464,15931
+#undef __FUNCT____FUNCT__474,16195
+#define __FUNCT__ __FUNCT__475,16212
+PetscErrorCode BVGetOptionsPrefix(BV bv,const char *prefix[])BVGetOptionsPrefix496,16712
+#undef __FUNCT____FUNCT__507,17003
+#define __FUNCT__ __FUNCT__508,17020
+static PetscErrorCode BVView_Default(BV bv,PetscViewer viewer)BVView_Default509,17055
+#undef __FUNCT____FUNCT__540,18150
+#define __FUNCT__ __FUNCT__541,18167
+PetscErrorCode BVView(BV bv,PetscViewer viewer)BVView566,18858
+#undef __FUNCT____FUNCT__638,22286
+#define __FUNCT__ __FUNCT__639,22303
+PetscErrorCode BVRegister(const char *name,PetscErrorCode (*function)(BV))BVRegister657,22677
+#undef __FUNCT____FUNCT__666,22897
+#define __FUNCT__ __FUNCT__667,22914
+PetscErrorCode BVAllocateWork_Private(BV bv,PetscInt s)BVAllocateWork_Private668,22957
+

+src/sys/classes/bv/interface/bvglobal.c,4029
 bvglobal.c:^?bvglobal.c^A,1
 #undef __FUNCT____FUNCT__26,1034
 #define __FUNCT__ __FUNCT__27,1051
@@ -8500,113 +9482,110 @@ PETSC_STATIC_INLINE PetscErrorCode BVDot_Private(BV X,BV Y,Mat M)BVDot_Private
 #undef __FUNCT____FUNCT__62,2176
 #define __FUNCT__ __FUNCT__63,2193
 PetscErrorCode BVDot(BV X,BV Y,Mat M)BVDot96,3327
-#undef __FUNCT____FUNCT__132,4881
-#define __FUNCT__ __FUNCT__133,4898
-PetscErrorCode BVDotVec(BV X,Vec y,PetscScalar *m)BVDotVec163,5808
-#undef __FUNCT____FUNCT__185,6474
-#define __FUNCT__ __FUNCT__186,6491
-PetscErrorCode BVDotVecBegin(BV X,Vec y,PetscScalar *m)BVDotVecBegin202,6858
-#undef __FUNCT____FUNCT__242,8277
-#define __FUNCT__ __FUNCT__243,8294
-PetscErrorCode BVDotVecEnd(BV X,Vec y,PetscScalar *m)BVDotVecEnd259,8643
-#undef __FUNCT____FUNCT__294,9984
-#define __FUNCT__ __FUNCT__295,10001
-PetscErrorCode BVDotColumn(BV X,PetscInt j,PetscScalar *m)BVDotColumn321,10809
-#undef __FUNCT____FUNCT__347,11660
-#define __FUNCT__ __FUNCT__348,11677
-PetscErrorCode BVDotColumnBegin(BV X,PetscInt j,PetscScalar *m)BVDotColumnBegin364,12070
-#undef __FUNCT____FUNCT__408,13679
-#define __FUNCT__ __FUNCT__409,13696
-PetscErrorCode BVDotColumnEnd(BV X,PetscInt j,PetscScalar *m)BVDotColumnEnd425,14071
-#undef __FUNCT____FUNCT__470,15872
-#define __FUNCT__ __FUNCT__471,15889
-PETSC_STATIC_INLINE PetscErrorCode BVNorm_Private(BV bv,Vec z,NormType type,PetscReal *val)BVNorm_Private472,15924
-#undef __FUNCT____FUNCT__484,16246
-#define __FUNCT__ __FUNCT__485,16263
-PETSC_STATIC_INLINE PetscErrorCode BVNorm_Begin_Private(BV bv,Vec z,NormType type,PetscReal *val)BVNorm_Begin_Private486,16304
-#undef __FUNCT____FUNCT__497,16591
-#define __FUNCT__ __FUNCT__498,16608
-PETSC_STATIC_INLINE PetscErrorCode BVNorm_End_Private(BV bv,Vec z,NormType type,PetscReal *val)BVNorm_End_Private499,16647
-#undef __FUNCT____FUNCT__510,16933
-#define __FUNCT__ __FUNCT__511,16950
-PetscErrorCode BVNorm(BV bv,NormType type,PetscReal *val)BVNorm535,17519
-#undef __FUNCT____FUNCT__555,18262
-#define __FUNCT__ __FUNCT__556,18279
-PetscErrorCode BVNormVec(BV bv,Vec v,NormType type,PetscReal *val)BVNormVec580,18906
-#undef __FUNCT____FUNCT__609,19905
-#define __FUNCT__ __FUNCT__610,19922
-PetscErrorCode BVNormVecBegin(BV bv,Vec v,NormType type,PetscReal *val)BVNormVecBegin627,20284
-#undef __FUNCT____FUNCT__656,21306
-#define __FUNCT__ __FUNCT__657,21323
-PetscErrorCode BVNormVecEnd(BV bv,Vec v,NormType type,PetscReal *val)BVNormVecEnd674,21681
-#undef __FUNCT____FUNCT__695,22286
-#define __FUNCT__ __FUNCT__696,22303
-PetscErrorCode BVNormColumn(BV bv,PetscInt j,NormType type,PetscReal *val)BVNormColumn720,22943
-#undef __FUNCT____FUNCT__748,23999
-#define __FUNCT__ __FUNCT__749,24016
-PetscErrorCode BVNormColumnBegin(BV bv,PetscInt j,NormType type,PetscReal *val)BVNormColumnBegin766,24410
-#undef __FUNCT____FUNCT__810,26300
-#define __FUNCT__ __FUNCT__811,26317
-PetscErrorCode BVNormColumnEnd(BV bv,PetscInt j,NormType type,PetscReal *val)BVNormColumnEnd828,26707
-#undef __FUNCT____FUNCT__870,28565
-#define __FUNCT__ __FUNCT__871,28582
-PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Vec(BV X,Mat A,BV Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)BVMatProject_Vec876,28781
-#undef __FUNCT____FUNCT__915,30042
-#define __FUNCT__ __FUNCT__916,30059
-PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult(BV X,Mat A,BV Y,PetscScalar *marray,PetscInt ldm)BVMatProject_MatMult924,30344
-#undef __FUNCT____FUNCT__972,31871
-#define __FUNCT__ __FUNCT__973,31888
-PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult_2(BV X,Mat A,BV Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)BVMatProject_MatMult_2981,32224
-#undef __FUNCT____FUNCT__1038,34090
-#define __FUNCT__ __FUNCT__1039,34107
-PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Dot(BV X,BV Y,PetscScalar *marray,PetscInt ldm)BVMatProject_Dot1046,34350
-#undef __FUNCT____FUNCT__1089,35701
-#define __FUNCT__ __FUNCT__1090,35718
-PetscErrorCode BVMatProject(BV X,Mat A,BV Y,Mat M)BVMatProject1134,37429
-

-src/sys/classes/bv/interface/bvops.c,2109
+#undef __FUNCT____FUNCT__143,5183
+#define __FUNCT__ __FUNCT__144,5200
+PetscErrorCode BVDotVec(BV X,Vec y,PetscScalar *m)BVDotVec174,6110
+#undef __FUNCT____FUNCT__196,6782
+#define __FUNCT__ __FUNCT__197,6799
+PetscErrorCode BVDotVecBegin(BV X,Vec y,PetscScalar *m)BVDotVecBegin213,7166
+#undef __FUNCT____FUNCT__253,8591
+#define __FUNCT__ __FUNCT__254,8608
+PetscErrorCode BVDotVecEnd(BV X,Vec y,PetscScalar *m)BVDotVecEnd270,8957
+#undef __FUNCT____FUNCT__305,10298
+#define __FUNCT__ __FUNCT__306,10315
+PetscErrorCode BVDotColumn(BV X,PetscInt j,PetscScalar *m)BVDotColumn332,11123
+#undef __FUNCT____FUNCT__358,11980
+#define __FUNCT__ __FUNCT__359,11997
+PetscErrorCode BVDotColumnBegin(BV X,PetscInt j,PetscScalar *m)BVDotColumnBegin375,12390
+#undef __FUNCT____FUNCT__419,14005
+#define __FUNCT__ __FUNCT__420,14022
+PetscErrorCode BVDotColumnEnd(BV X,PetscInt j,PetscScalar *m)BVDotColumnEnd436,14398
+#undef __FUNCT____FUNCT__481,16199
+#define __FUNCT__ __FUNCT__482,16216
+PETSC_STATIC_INLINE PetscErrorCode BVNorm_Private(BV bv,Vec z,NormType type,PetscReal *val)BVNorm_Private483,16251
+#undef __FUNCT____FUNCT__495,16573
+#define __FUNCT__ __FUNCT__496,16590
+PETSC_STATIC_INLINE PetscErrorCode BVNorm_Begin_Private(BV bv,Vec z,NormType type,PetscReal *val)BVNorm_Begin_Private497,16631
+#undef __FUNCT____FUNCT__508,16918
+#define __FUNCT__ __FUNCT__509,16935
+PETSC_STATIC_INLINE PetscErrorCode BVNorm_End_Private(BV bv,Vec z,NormType type,PetscReal *val)BVNorm_End_Private510,16974
+#undef __FUNCT____FUNCT__521,17260
+#define __FUNCT__ __FUNCT__522,17277
+PetscErrorCode BVNorm(BV bv,NormType type,PetscReal *val)BVNorm546,17846
+#undef __FUNCT____FUNCT__566,18589
+#define __FUNCT__ __FUNCT__567,18606
+PetscErrorCode BVNormVec(BV bv,Vec v,NormType type,PetscReal *val)BVNormVec591,19233
+#undef __FUNCT____FUNCT__620,20238
+#define __FUNCT__ __FUNCT__621,20255
+PetscErrorCode BVNormVecBegin(BV bv,Vec v,NormType type,PetscReal *val)BVNormVecBegin638,20617
+#undef __FUNCT____FUNCT__667,21645
+#define __FUNCT__ __FUNCT__668,21662
+PetscErrorCode BVNormVecEnd(BV bv,Vec v,NormType type,PetscReal *val)BVNormVecEnd685,22020
+#undef __FUNCT____FUNCT__706,22625
+#define __FUNCT__ __FUNCT__707,22642
+PetscErrorCode BVNormColumn(BV bv,PetscInt j,NormType type,PetscReal *val)BVNormColumn731,23282
+#undef __FUNCT____FUNCT__759,24344
+#define __FUNCT__ __FUNCT__760,24361
+PetscErrorCode BVNormColumnBegin(BV bv,PetscInt j,NormType type,PetscReal *val)BVNormColumnBegin777,24755
+#undef __FUNCT____FUNCT__821,26651
+#define __FUNCT__ __FUNCT__822,26668
+PetscErrorCode BVNormColumnEnd(BV bv,PetscInt j,NormType type,PetscReal *val)BVNormColumnEnd839,27058
+#undef __FUNCT____FUNCT__881,28916
+#define __FUNCT__ __FUNCT__882,28933
+PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Vec(BV X,Mat A,BV Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)BVMatProject_Vec887,29132
+#undef __FUNCT____FUNCT__926,30393
+#define __FUNCT__ __FUNCT__927,30410
+PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult(BV X,Mat A,BV Y,PetscScalar *marray,PetscInt ldm)BVMatProject_MatMult935,30695
+#undef __FUNCT____FUNCT__983,32222
+#define __FUNCT__ __FUNCT__984,32239
+PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult_2(BV X,Mat A,BV Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)BVMatProject_MatMult_2992,32575
+#undef __FUNCT____FUNCT__1049,34441
+#define __FUNCT__ __FUNCT__1050,34458
+PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Dot(BV X,BV Y,PetscScalar *marray,PetscInt ldm)BVMatProject_Dot1057,34701
+#undef __FUNCT____FUNCT__1100,36052
+#define __FUNCT__ __FUNCT__1101,36069
+PetscErrorCode BVMatProject(BV X,Mat A,BV Y,Mat M)BVMatProject1145,37780
+

+src/sys/classes/bv/interface/bvops.c,1933
 bvops.c:^?bvops.c^A,1
 #undef __FUNCT____FUNCT__26,1048
 #define __FUNCT__ __FUNCT__27,1065
-PetscErrorCode BVMult(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)BVMult59,2152
-#undef __FUNCT____FUNCT__93,3705
-#define __FUNCT__ __FUNCT__94,3722
-PetscErrorCode BVMultVec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec125,4621
-#undef __FUNCT____FUNCT__151,5565
-#define __FUNCT__ __FUNCT__152,5582
-PetscErrorCode BVMultColumn(BV X,PetscScalar alpha,PetscScalar beta,PetscInt j,PetscScalar *q)BVMultColumn177,6405
-#undef __FUNCT____FUNCT__206,7427
-#define __FUNCT__ __FUNCT__207,7444
-PetscErrorCode BVMultInPlace(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace234,8289
-#undef __FUNCT____FUNCT__265,9841
-#define __FUNCT__ __FUNCT__266,9858
-PetscErrorCode BVMultInPlaceTranspose(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose288,10366
-#undef __FUNCT____FUNCT__319,11941
-#define __FUNCT__ __FUNCT__320,11958
-PetscErrorCode BVScale(BV bv,PetscScalar alpha)BVScale337,12297
-#undef __FUNCT____FUNCT__355,12873
-#define __FUNCT__ __FUNCT__356,12890
-PetscErrorCode BVScaleColumn(BV bv,PetscInt j,PetscScalar alpha)BVScaleColumn371,13186
-#undef __FUNCT____FUNCT__392,13982
-#define __FUNCT__ __FUNCT__393,13999
-PetscErrorCode BVSetRandom(BV bv,PetscRandom rctx)BVSetRandom411,14442
-#undef __FUNCT____FUNCT__449,15739
-#define __FUNCT__ __FUNCT__450,15756
-PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j,PetscRandom rctx)BVSetRandomColumn472,16419
-#undef __FUNCT____FUNCT__510,17882
-#define __FUNCT__ __FUNCT__511,17899
-PetscErrorCode BVMatMult(BV V,Mat A,BV Y)BVMatMult536,18638
-#undef __FUNCT____FUNCT__560,19517
-#define __FUNCT__ __FUNCT__561,19534
-PetscErrorCode BVMatMultHermitianTranspose(BV V,Mat A,BV Y)BVMatMultHermitianTranspose587,20322
-#undef __FUNCT____FUNCT__619,21516
-#define __FUNCT__ __FUNCT__620,21533
-PetscErrorCode BVMatMultColumn(BV V,Mat A,PetscInt j)BVMatMultColumn639,21927
-#undef __FUNCT____FUNCT__663,22873
-#define __FUNCT__ __FUNCT__664,22890
-PetscErrorCode BVAXPY(BV Y,PetscScalar alpha,BV X)BVAXPY686,23372
-

-src/sys/classes/bv/interface/bvorthog.c,2149
+PetscErrorCode BVMult(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)BVMult61,2288
+#undef __FUNCT____FUNCT__96,3879
+#define __FUNCT__ __FUNCT__97,3896
+PetscErrorCode BVMultVec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)BVMultVec128,4795
+#undef __FUNCT____FUNCT__154,5745
+#define __FUNCT__ __FUNCT__155,5762
+PetscErrorCode BVMultColumn(BV X,PetscScalar alpha,PetscScalar beta,PetscInt j,PetscScalar *q)BVMultColumn180,6585
+#undef __FUNCT____FUNCT__209,7613
+#define __FUNCT__ __FUNCT__210,7630
+PetscErrorCode BVMultInPlace(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlace237,8475
+#undef __FUNCT____FUNCT__268,10041
+#define __FUNCT__ __FUNCT__269,10058
+PetscErrorCode BVMultInPlaceTranspose(BV V,Mat Q,PetscInt s,PetscInt e)BVMultInPlaceTranspose291,10566
+#undef __FUNCT____FUNCT__322,12155
+#define __FUNCT__ __FUNCT__323,12172
+PetscErrorCode BVScale(BV bv,PetscScalar alpha)BVScale340,12511
+#undef __FUNCT____FUNCT__360,13098
+#define __FUNCT__ __FUNCT__361,13115
+PetscErrorCode BVScaleColumn(BV bv,PetscInt j,PetscScalar alpha)BVScaleColumn376,13411
+#undef __FUNCT____FUNCT__399,14218
+#define __FUNCT__ __FUNCT__400,14235
+PetscErrorCode BVSetRandom(BV bv)BVSetRandom416,14577
+#undef __FUNCT____FUNCT__450,15710
+#define __FUNCT__ __FUNCT__451,15727
+PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j)BVSetRandomColumn465,16034
+#undef __FUNCT____FUNCT__499,17325
+#define __FUNCT__ __FUNCT__500,17342
+PetscErrorCode BVMatMult(BV V,Mat A,BV Y)BVMatMult525,18081
+#undef __FUNCT____FUNCT__549,18960
+#define __FUNCT__ __FUNCT__550,18977
+PetscErrorCode BVMatMultHermitianTranspose(BV V,Mat A,BV Y)BVMatMultHermitianTranspose576,19765
+#undef __FUNCT____FUNCT__608,20959
+#define __FUNCT__ __FUNCT__609,20976
+PetscErrorCode BVMatMultColumn(BV V,Mat A,PetscInt j)BVMatMultColumn628,21370
+

+src/sys/classes/bv/interface/bvorthog.c,2147
 bvorthog.c:^?bvorthog.c^A,1
 #undef __FUNCT____FUNCT__27,1056
 #define __FUNCT__ __FUNCT__28,1073
@@ -8617,30 +9596,30 @@ PetscErrorCode BVOrthogonalizeCGS1(BV bv,PetscInt j,Vec v,PetscScalar *H,PetscRe
 #undef __FUNCT____FUNCT__125,3955
 #define __FUNCT__ __FUNCT__126,3972
 static PetscErrorCode BVOrthogonalizeMGS(BV bv,PetscInt j,Vec v,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeMGS130,4081
-#undef __FUNCT____FUNCT__203,6256
-#define __FUNCT__ __FUNCT__204,6273
-static PetscErrorCode BVOrthogonalizeCGS(BV bv,PetscInt j,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeCGS208,6383
-#undef __FUNCT____FUNCT__263,8121
-#define __FUNCT__ __FUNCT__264,8138
-PetscErrorCode BVOrthogonalizeVec(BV bv,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeVec290,8979
-#undef __FUNCT____FUNCT__324,10070
-#define __FUNCT__ __FUNCT__325,10087
-PetscErrorCode BVOrthogonalizeColumn(BV bv,PetscInt j,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeColumn360,11402
-#undef __FUNCT____FUNCT__394,12688
-#define __FUNCT__ __FUNCT__395,12705
-PetscErrorCode BVOrthogonalizeSomeColumn(BV bv,PetscInt j,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeSomeColumn424,13694
-#undef __FUNCT____FUNCT__453,15009
-#define __FUNCT__ __FUNCT__454,15026
-static PetscErrorCode BVOrthogonalize_GS(BV V,Mat R)BVOrthogonalize_GS458,15143
-#undef __FUNCT____FUNCT__493,16182
-#define __FUNCT__ __FUNCT__494,16199
-static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)MatCholeskyFactorInvert498,16314
-#undef __FUNCT____FUNCT__537,17842
-#define __FUNCT__ __FUNCT__538,17859
-static PetscErrorCode BVOrthogonalize_Chol(BV V,Mat Rin)BVOrthogonalize_Chol542,17981
-#undef __FUNCT____FUNCT__569,18674
-#define __FUNCT__ __FUNCT__570,18691
-PetscErrorCode BVOrthogonalize(BV V,Mat R)BVOrthogonalize602,19781
+#undef __FUNCT____FUNCT__197,6130
+#define __FUNCT__ __FUNCT__198,6147
+static PetscErrorCode BVOrthogonalizeCGS(BV bv,PetscInt j,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeCGS202,6257
+#undef __FUNCT____FUNCT__253,7883
+#define __FUNCT__ __FUNCT__254,7900
+PetscErrorCode BVOrthogonalizeVec(BV bv,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeVec280,8741
+#undef __FUNCT____FUNCT__314,9838
+#define __FUNCT__ __FUNCT__315,9855
+PetscErrorCode BVOrthogonalizeColumn(BV bv,PetscInt j,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeColumn350,11170
+#undef __FUNCT____FUNCT__384,12462
+#define __FUNCT__ __FUNCT__385,12479
+PetscErrorCode BVOrthogonalizeSomeColumn(BV bv,PetscInt j,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)BVOrthogonalizeSomeColumn414,13468
+#undef __FUNCT____FUNCT__443,14789
+#define __FUNCT__ __FUNCT__444,14806
+static PetscErrorCode BVOrthogonalize_GS(BV V,Mat R)BVOrthogonalize_GS448,14923
+#undef __FUNCT____FUNCT__484,16071
+#define __FUNCT__ __FUNCT__485,16088
+static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)MatCholeskyFactorInvert489,16203
+#undef __FUNCT____FUNCT__551,18595
+#define __FUNCT__ __FUNCT__552,18612
+static PetscErrorCode BVOrthogonalize_Chol(BV V,Mat Rin)BVOrthogonalize_Chol556,18734
+#undef __FUNCT____FUNCT__575,19238
+#define __FUNCT__ __FUNCT__576,19255
+PetscErrorCode BVOrthogonalize(BV V,Mat R)BVOrthogonalize614,20708
 

 src/sys/classes/bv/interface/bvregis.c,129
 bvregis.c:^?bvregis.c^A,1
@@ -8728,12 +9707,12 @@ int main(int argc,char **argv)main28,1061
 

 src/sys/classes/ds/examples/tests/test14f.F,338
 test14f.F:^?test14f.F^A,1
-      program mainmain29,1228
- 100  format (/'Program currently limited to n=100, you set n=',I3)10069,2402
- 110  format (/'Solve a Dense System of type NHEP, n =',I3,' (Fortran)')11074,2534
- 120  format ('  ',F8.5)120123,4203
- 130  format ('  ',F8.5,SP,F8.5,'i')130124,4228
-      subroutine FillUpMatrix(FillUpMatrix133,4426
+      program mainmain29,1233
+ 100  format (/'Program currently limited to n=100, you set n=',I3)10070,2457
+ 110  format (/'Solve a Dense System of type NHEP, n =',I3,' (Fortran)')11075,2589
+ 120  format ('  ',F8.5)120124,4258
+ 130  format ('  ',F8.5,SP,F8.5,'i')130125,4283
+      subroutine FillUpMatrix(FillUpMatrix134,4481
 

 src/sys/classes/ds/examples/tests/test15.c,167
 test15.c:^?test15.c^A,1
@@ -8834,34 +9813,34 @@ DIRS     =DIRS30,1023
 MANSEC   = DSMANSEC31,1034
 LOCDIR   = src/sys/classes/ds/impls/ghep/LOCDIR32,1048
 

-src/sys/classes/ds/impls/ghiep/dqds.c,1950
+src/sys/classes/ds/impls/ghiep/dqds.c,1913
 dqds.c:^?dqds.c^A,1
 #undef __FUNCT____FUNCT__35,1379
 #define __FUNCT__ __FUNCT__36,1396
 static PetscErrorCode ScanJ(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *gl,PetscReal *gr,PetscReal *sigma)ScanJ48,1644
 #undef __FUNCT____FUNCT__84,2667
 #define __FUNCT__ __FUNCT__85,2684
-static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work,PetscReal nw)Prologue98,3113
-#undef __FUNCT____FUNCT__162,5097
-#define __FUNCT__ __FUNCT__163,5114
-static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work,PetscInt nw)LUfac164,5140
-#undef __FUNCT____FUNCT__197,6162
-#define __FUNCT__ __FUNCT__198,6179
-static PetscErrorCode RealDQDS(PetscInt n,PetscReal *L,PetscReal *U,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L1,PetscReal *U1,PetscInt *fail)RealDQDS199,6208
-#undef __FUNCT____FUNCT__228,7025
-#define __FUNCT__ __FUNCT__229,7042
-static PetscErrorCode TridqdsZhuang3(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscInt *fail)TridqdsZhuang3230,7077
-#undef __FUNCT____FUNCT__306,9174
-#define __FUNCT__ __FUNCT__307,9191
-static PetscErrorCode TridqdsZhuang(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscReal *e1,PetscReal *q1,PetscInt *fail)TridqdsZhuang308,9225
-#undef __FUNCT____FUNCT__447,13077
-#define __FUNCT__ __FUNCT__448,13094
-static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work,PetscInt nw)DSGHIEP_Eigen3DQDS449,13133
-#undef __FUNCT____FUNCT__748,25442
-#define __FUNCT__ __FUNCT__749,25459
-PetscErrorCode DSSolve_GHIEP_DQDS_II(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_DQDS_II750,25501
-

-src/sys/classes/ds/impls/ghiep/dsghiep.c,2251
+static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work)Prologue99,3133
+#undef __FUNCT____FUNCT__161,4983
+#define __FUNCT__ __FUNCT__162,5000
+static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work)LUfac163,5026
+#undef __FUNCT____FUNCT__194,5920
+#define __FUNCT__ __FUNCT__195,5937
+static PetscErrorCode RealDQDS(PetscInt n,PetscReal *L,PetscReal *U,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L1,PetscReal *U1,PetscInt *fail)RealDQDS196,5966
+#undef __FUNCT____FUNCT__225,6783
+#define __FUNCT__ __FUNCT__226,6800
+static PetscErrorCode TridqdsZhuang3(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscInt *fail)TridqdsZhuang3227,6835
+#undef __FUNCT____FUNCT__303,8932
+#define __FUNCT__ __FUNCT__304,8949
+static PetscErrorCode TridqdsZhuang(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscReal *e1,PetscReal *q1,PetscInt *fail)TridqdsZhuang305,8983
+#undef __FUNCT____FUNCT__444,12835
+#define __FUNCT__ __FUNCT__445,12852
+static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work)DSGHIEP_Eigen3DQDS446,12891
+#undef __FUNCT____FUNCT__741,24996
+#define __FUNCT__ __FUNCT__742,25013
+PetscErrorCode DSSolve_GHIEP_DQDS_II(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_DQDS_II743,25055
+

+src/sys/classes/ds/impls/ghiep/dsghiep.c,2258
 dsghiep.c:^?dsghiep.c^A,1
 #undef __FUNCT____FUNCT__24,987
 #define __FUNCT__ __FUNCT__25,1004
@@ -8874,34 +9853,34 @@ PetscErrorCode DSSwitchFormat_GHIEP(DS ds,PetscBool tocompact)DSSwitchFormat_GH
 PetscErrorCode DSView_GHIEP(DS ds,PetscViewer viewer)DSView_GHIEP90,3121
 #undef __FUNCT____FUNCT__179,7255
 #define __FUNCT__ __FUNCT__180,7272
-PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)DSVectors_GHIEP_Eigen_Some181,7319
-#undef __FUNCT____FUNCT__275,10932
-#define __FUNCT__ __FUNCT__276,10949
-PetscErrorCode DSVectors_GHIEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)DSVectors_GHIEP277,10985
-#undef __FUNCT____FUNCT__315,12247
-#define __FUNCT__ __FUNCT__316,12264
-PetscErrorCode DSGHIEPComplexEigs(DS ds,PetscInt n0,PetscInt n1,PetscScalar *wr,PetscScalar *wi)DSGHIEPComplexEigs321,12438
-#undef __FUNCT____FUNCT__396,14506
-#define __FUNCT__ __FUNCT__397,14523
-PetscErrorCode DSSort_GHIEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_GHIEP398,14556
-#undef __FUNCT____FUNCT__441,16158
-#define __FUNCT__ __FUNCT__442,16175
-PetscErrorCode DSGHIEPInverseIteration(DS ds,PetscScalar *wr,PetscScalar *wi)DSGHIEPInverseIteration447,16311
-#undef __FUNCT____FUNCT__527,19224
-#define __FUNCT__ __FUNCT__528,19241
-PetscErrorCode DSGHIEPRealBlocks(DS ds)DSGHIEPRealBlocks532,19332
-#undef __FUNCT____FUNCT__647,23466
-#define __FUNCT__ __FUNCT__648,23483
-PetscErrorCode DSSolve_GHIEP_QR_II(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_QR_II649,23523
-#undef __FUNCT____FUNCT__758,27143
-#define __FUNCT__ __FUNCT__759,27160
-PetscErrorCode DSSolve_GHIEP_QR(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_QR760,27197
-#undef __FUNCT____FUNCT__896,31832
-#define __FUNCT__ __FUNCT__897,31849
-PetscErrorCode DSNormalize_GHIEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_GHIEP898,31887
-#undef __FUNCT____FUNCT__953,33437
-#define __FUNCT__ __FUNCT__954,33454
-PETSC_EXTERN PetscErrorCode DSCreate_GHIEP(DS ds)DSCreate_GHIEP955,33489
+static PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)DSVectors_GHIEP_Eigen_Some181,7319
+#undef __FUNCT____FUNCT__280,11094
+#define __FUNCT__ __FUNCT__281,11111
+PetscErrorCode DSVectors_GHIEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)DSVectors_GHIEP282,11147
+#undef __FUNCT____FUNCT__320,12409
+#define __FUNCT__ __FUNCT__321,12426
+PetscErrorCode DSGHIEPComplexEigs(DS ds,PetscInt n0,PetscInt n1,PetscScalar *wr,PetscScalar *wi)DSGHIEPComplexEigs326,12600
+#undef __FUNCT____FUNCT__406,14823
+#define __FUNCT__ __FUNCT__407,14840
+PetscErrorCode DSSort_GHIEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_GHIEP408,14873
+#undef __FUNCT____FUNCT__451,16475
+#define __FUNCT__ __FUNCT__452,16492
+PetscErrorCode DSGHIEPInverseIteration(DS ds,PetscScalar *wr,PetscScalar *wi)DSGHIEPInverseIteration457,16628
+#undef __FUNCT____FUNCT__537,19541
+#define __FUNCT__ __FUNCT__538,19558
+PetscErrorCode DSGHIEPRealBlocks(DS ds)DSGHIEPRealBlocks542,19649
+#undef __FUNCT____FUNCT__662,23938
+#define __FUNCT__ __FUNCT__663,23955
+PetscErrorCode DSSolve_GHIEP_QR_II(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_QR_II664,23995
+#undef __FUNCT____FUNCT__773,27615
+#define __FUNCT__ __FUNCT__774,27632
+PetscErrorCode DSSolve_GHIEP_QR(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_QR775,27669
+#undef __FUNCT____FUNCT__911,32304
+#define __FUNCT__ __FUNCT__912,32321
+PetscErrorCode DSNormalize_GHIEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_GHIEP913,32359
+#undef __FUNCT____FUNCT__968,33909
+#define __FUNCT__ __FUNCT__969,33926
+PETSC_EXTERN PetscErrorCode DSCreate_GHIEP(DS ds)DSCreate_GHIEP970,33961
 

 src/sys/classes/ds/impls/ghiep/hz.c,907
 hz.c:^?hz.c^A,1
@@ -8914,11 +9893,11 @@ static PetscErrorCode HZStep(PetscBLASInt ntop,PetscBLASInt nn,PetscReal tr,Pets
 #undef __FUNCT____FUNCT__236,9164
 #define __FUNCT__ __FUNCT__237,9181
 static PetscErrorCode HZIteration(PetscBLASInt nn,PetscBLASInt cgd,PetscReal *aa,PetscReal *bb,PetscReal *dd,PetscScalar *uu,PetscBLASInt ld)HZIteration238,9213
-#undef __FUNCT____FUNCT__308,11701
-#define __FUNCT__ __FUNCT__309,11718
-PetscErrorCode DSSolve_GHIEP_HZ(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_HZ310,11755
+#undef __FUNCT____FUNCT__304,11601
+#define __FUNCT__ __FUNCT__305,11618
+PetscErrorCode DSSolve_GHIEP_HZ(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GHIEP_HZ306,11655
 

-src/sys/classes/ds/impls/ghiep/invit.c,2417
+src/sys/classes/ds/impls/ghiep/invit.c,2343
 invit.c:^?invit.c^A,1
 struct HRtrHRtr25,988
   PetscScalar *data;data27,1002
@@ -8938,22 +9917,22 @@ static PetscErrorCode HRGen(PetscReal x1,PetscReal x2,PetscInt *type,PetscReal *
 static PetscErrorCode HRApply(PetscInt n,PetscScalar *x1,PetscInt inc1,PetscScalar *x2,PetscInt inc2,PetscReal c,PetscReal s)HRApply98,2654
 #undef __FUNCT____FUNCT__122,3265
 #define __FUNCT__ __FUNCT__123,3282
-static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nwr,PetscBLASInt *iwork,PetscInt nwi)TridiagDiag_HHR135,3609
-#undef __FUNCT____FUNCT__317,9950
-#define __FUNCT__ __FUNCT__318,9967
-static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work,PetscInt lw)MadeHRtr319,9996
-#undef __FUNCT____FUNCT__395,13031
-#define __FUNCT__ __FUNCT__396,13048
-static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work,PetscInt nw)TryHRIt403,13335
-#undef __FUNCT____FUNCT__548,19588
-#define __FUNCT__ __FUNCT__549,19605
-static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work,PetscInt nw)PseudoOrthog_HR553,19707
-#undef __FUNCT____FUNCT__651,22802
-#define __FUNCT__ __FUNCT__652,22819
-PetscErrorCode DSGHIEPOrthogEigenv(DS ds,DSMatType mat,PetscScalar *wr,PetscScalar *wi,PetscBool accum)DSGHIEPOrthogEigenv653,22859
-#undef __FUNCT____FUNCT__751,26001
-#define __FUNCT__ __FUNCT__752,26018
-PetscErrorCode DSIntermediate_GHIEP(DS ds)DSIntermediate_GHIEP756,26133
+static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscReal *rwork,PetscBLASInt *iwork)TridiagDiag_HHR135,3609
+#undef __FUNCT____FUNCT__309,9510
+#define __FUNCT__ __FUNCT__310,9527
+static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work)MadeHRtr311,9556
+#undef __FUNCT____FUNCT__391,12697
+#define __FUNCT__ __FUNCT__392,12714
+static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work)TryHRIt399,13001
+#undef __FUNCT____FUNCT__547,19249
+#define __FUNCT__ __FUNCT__548,19266
+static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work)PseudoOrthog_HR552,19368
+#undef __FUNCT____FUNCT__646,22296
+#define __FUNCT__ __FUNCT__647,22313
+PetscErrorCode DSGHIEPOrthogEigenv(DS ds,DSMatType mat,PetscScalar *wr,PetscScalar *wi,PetscBool accum)DSGHIEPOrthogEigenv648,22353
+#undef __FUNCT____FUNCT__744,25460
+#define __FUNCT__ __FUNCT__745,25477
+PetscErrorCode DSIntermediate_GHIEP(DS ds)DSIntermediate_GHIEP749,25592
 

 src/sys/classes/ds/impls/ghiep/makefile,309
 makefile:^?makefile^A,1
@@ -8967,7 +9946,7 @@ DIRS     =DIRS30,1044
 MANSEC   = DSMANSEC31,1055
 LOCDIR   = src/sys/classes/ds/impls/ghiep/LOCDIR32,1069
 

-src/sys/classes/ds/impls/gnhep/dsgnhep.c,2224
+src/sys/classes/ds/impls/gnhep/dsgnhep.c,2272
 dsgnhep.c:^?dsgnhep.c^A,1
 #undef __FUNCT____FUNCT__44,1750
 #define __FUNCT__ __FUNCT__45,1767
@@ -8977,34 +9956,34 @@ PetscErrorCode DSAllocate_GNHEP(DS ds,PetscInt ld)DSAllocate_GNHEP46,1804
 PetscErrorCode DSView_GNHEP(DS ds,PetscViewer viewer)DSView_GNHEP63,2395
 #undef __FUNCT____FUNCT__83,2965
 #define __FUNCT__ __FUNCT__84,2982
-PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscBool left)DSVectors_GNHEP_Eigen_Some85,3029
-#undef __FUNCT____FUNCT__143,5495
-#define __FUNCT__ __FUNCT__144,5512
-PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)DSVectors_GNHEP_Eigen_All145,5558
-#undef __FUNCT____FUNCT__193,7328
-#define __FUNCT__ __FUNCT__194,7345
-PetscErrorCode DSVectors_GNHEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)DSVectors_GNHEP195,7381
-#undef __FUNCT____FUNCT__216,8036
-#define __FUNCT__ __FUNCT__217,8053
-PetscErrorCode DSNormalize_GNHEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_GNHEP218,8091
-#undef __FUNCT____FUNCT__274,9757
-#define __FUNCT__ __FUNCT__275,9774
-PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_GNHEP_Arbitrary276,9817
-#undef __FUNCT____FUNCT__327,11908
-#define __FUNCT__ __FUNCT__328,11925
-PetscErrorCode DSSort_GNHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)DSSort_GNHEP_Total329,11964
-#undef __FUNCT____FUNCT__426,15257
-#define __FUNCT__ __FUNCT__427,15274
-PetscErrorCode DSSort_GNHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_GNHEP428,15307
-#undef __FUNCT____FUNCT__441,15657
-#define __FUNCT__ __FUNCT__442,15674
-static PetscErrorCode CleanDenseSchur(PetscInt n,PetscInt k,PetscScalar *S,PetscInt ldS,PetscScalar *T,PetscInt ldT,PetscScalar *X,PetscInt ldX,PetscScalar *Y,PetscInt ldY,PetscBool doProd)CleanDenseSchur448,15904
-#undef __FUNCT____FUNCT__543,19767
-#define __FUNCT__ __FUNCT__544,19784
-PetscErrorCode DSSolve_GNHEP(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GNHEP545,19818
-#undef __FUNCT____FUNCT__596,21982
-#define __FUNCT__ __FUNCT__597,21999
-PETSC_EXTERN PetscErrorCode DSCreate_GNHEP(DS ds)DSCreate_GNHEP598,22034
+static PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)DSVectors_GNHEP_Eigen_Some85,3029
+#undef __FUNCT____FUNCT__165,6040
+#define __FUNCT__ __FUNCT__166,6057
+static PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)DSVectors_GNHEP_Eigen_All167,6103
+#undef __FUNCT____FUNCT__237,8565
+#define __FUNCT__ __FUNCT__238,8582
+PetscErrorCode DSVectors_GNHEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)DSVectors_GNHEP239,8618
+#undef __FUNCT____FUNCT__259,9204
+#define __FUNCT__ __FUNCT__260,9221
+PetscErrorCode DSNormalize_GNHEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_GNHEP261,9259
+#undef __FUNCT____FUNCT__317,10925
+#define __FUNCT__ __FUNCT__318,10942
+static PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_GNHEP_Arbitrary319,10985
+#undef __FUNCT____FUNCT__370,13083
+#define __FUNCT__ __FUNCT__371,13100
+static PetscErrorCode DSSort_GNHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)DSSort_GNHEP_Total372,13139
+#undef __FUNCT____FUNCT__469,16439
+#define __FUNCT__ __FUNCT__470,16456
+PetscErrorCode DSSort_GNHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_GNHEP471,16489
+#undef __FUNCT____FUNCT__484,16839
+#define __FUNCT__ __FUNCT__485,16856
+static PetscErrorCode CleanDenseSchur(PetscInt n,PetscInt k,PetscScalar *S,PetscInt ldS,PetscScalar *T,PetscInt ldT,PetscScalar *X,PetscInt ldX,PetscScalar *Y,PetscInt ldY,PetscBool doProd)CleanDenseSchur491,17086
+#undef __FUNCT____FUNCT__586,20949
+#define __FUNCT__ __FUNCT__587,20966
+PetscErrorCode DSSolve_GNHEP(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_GNHEP588,21000
+#undef __FUNCT____FUNCT__639,23164
+#define __FUNCT__ __FUNCT__640,23181
+PETSC_EXTERN PetscErrorCode DSCreate_GNHEP(DS ds)DSCreate_GNHEP641,23216
 

 src/sys/classes/ds/impls/gnhep/makefile,288
 makefile:^?makefile^A,1
@@ -9057,54 +10036,54 @@ dshep.c:^?dshep.c^A,1
 #undef __FUNCT____FUNCT__25,988
 #define __FUNCT__ __FUNCT__26,1005
 PetscErrorCode DSAllocate_HEP(DS ds,PetscInt ld)DSAllocate_HEP27,1040
-#undef __FUNCT____FUNCT__66,2603
-#define __FUNCT__ __FUNCT__67,2620
-static PetscErrorCode DSSwitchFormat_HEP(DS ds,PetscBool tocompact)DSSwitchFormat_HEP68,2659
-#undef __FUNCT____FUNCT__106,3836
-#define __FUNCT__ __FUNCT__107,3853
-PetscErrorCode DSView_HEP(DS ds,PetscViewer viewer)DSView_HEP108,3884
-#undef __FUNCT____FUNCT__178,7017
-#define __FUNCT__ __FUNCT__179,7034
-PetscErrorCode DSVectors_HEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_HEP180,7068
-#undef __FUNCT____FUNCT__217,8312
-#define __FUNCT__ __FUNCT__218,8329
-PetscErrorCode DSNormalize_HEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_HEP219,8365
-#undef __FUNCT____FUNCT__238,8894
-#define __FUNCT__ __FUNCT__239,8911
-static PetscErrorCode ArrowTridiag(PetscBLASInt n,PetscReal *d,PetscReal *e,PetscScalar *Q,PetscBLASInt ld)ArrowTridiag287,10333
-#undef __FUNCT____FUNCT__336,11743
-#define __FUNCT__ __FUNCT__337,11760
-static PetscErrorCode DSIntermediate_HEP(DS ds)DSIntermediate_HEP341,11861
-#undef __FUNCT____FUNCT__396,13889
-#define __FUNCT__ __FUNCT__397,13906
-PetscErrorCode DSSort_HEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_HEP398,13937
-#undef __FUNCT____FUNCT__426,14741
-#define __FUNCT__ __FUNCT__427,14758
-PetscErrorCode DSUpdateExtraRow_HEP(DS ds)DSUpdateExtraRow_HEP428,14799
-#undef __FUNCT____FUNCT__459,15740
-#define __FUNCT__ __FUNCT__460,15757
-PetscErrorCode DSSolve_HEP_QR(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_QR461,15792
-#undef __FUNCT____FUNCT__514,17568
-#define __FUNCT__ __FUNCT__515,17585
-PetscErrorCode DSSolve_HEP_MRRR(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_MRRR516,17622
-#undef __FUNCT____FUNCT__599,20713
-#define __FUNCT__ __FUNCT__600,20730
-PetscErrorCode DSSolve_HEP_DC(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_DC601,20765
-#undef __FUNCT____FUNCT__667,22991
-#define __FUNCT__ __FUNCT__668,23008
-PetscErrorCode DSSolve_HEP_BDC(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_BDC669,23044
-#undef __FUNCT____FUNCT__736,25221
-#define __FUNCT__ __FUNCT__737,25238
-PetscErrorCode DSTruncate_HEP(DS ds,PetscInt n)DSTruncate_HEP738,25273
-#undef __FUNCT____FUNCT__755,25680
-#define __FUNCT__ __FUNCT__756,25697
-PetscErrorCode DSCond_HEP(DS ds,PetscReal *cond)DSCond_HEP757,25728
-#undef __FUNCT____FUNCT__801,27315
-#define __FUNCT__ __FUNCT__802,27332
-PetscErrorCode DSTranslateRKS_HEP(DS ds,PetscScalar alpha)DSTranslateRKS_HEP803,27371
-#undef __FUNCT____FUNCT__855,29301
-#define __FUNCT__ __FUNCT__856,29318
-PETSC_EXTERN PetscErrorCode DSCreate_HEP(DS ds)DSCreate_HEP857,29351
+#undef __FUNCT____FUNCT__66,2587
+#define __FUNCT__ __FUNCT__67,2604
+static PetscErrorCode DSSwitchFormat_HEP(DS ds,PetscBool tocompact)DSSwitchFormat_HEP68,2643
+#undef __FUNCT____FUNCT__106,3820
+#define __FUNCT__ __FUNCT__107,3837
+PetscErrorCode DSView_HEP(DS ds,PetscViewer viewer)DSView_HEP108,3868
+#undef __FUNCT____FUNCT__178,7001
+#define __FUNCT__ __FUNCT__179,7018
+PetscErrorCode DSVectors_HEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_HEP180,7052
+#undef __FUNCT____FUNCT__217,8301
+#define __FUNCT__ __FUNCT__218,8318
+PetscErrorCode DSNormalize_HEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_HEP219,8354
+#undef __FUNCT____FUNCT__238,8883
+#define __FUNCT__ __FUNCT__239,8900
+static PetscErrorCode ArrowTridiag(PetscBLASInt n,PetscReal *d,PetscReal *e,PetscScalar *Q,PetscBLASInt ld)ArrowTridiag287,10322
+#undef __FUNCT____FUNCT__336,11732
+#define __FUNCT__ __FUNCT__337,11749
+static PetscErrorCode DSIntermediate_HEP(DS ds)DSIntermediate_HEP341,11850
+#undef __FUNCT____FUNCT__396,13878
+#define __FUNCT__ __FUNCT__397,13895
+PetscErrorCode DSSort_HEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_HEP398,13926
+#undef __FUNCT____FUNCT__426,14730
+#define __FUNCT__ __FUNCT__427,14747
+PetscErrorCode DSUpdateExtraRow_HEP(DS ds)DSUpdateExtraRow_HEP428,14788
+#undef __FUNCT____FUNCT__459,15729
+#define __FUNCT__ __FUNCT__460,15746
+PetscErrorCode DSSolve_HEP_QR(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_QR461,15781
+#undef __FUNCT____FUNCT__514,17557
+#define __FUNCT__ __FUNCT__515,17574
+PetscErrorCode DSSolve_HEP_MRRR(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_MRRR516,17611
+#undef __FUNCT____FUNCT__599,20702
+#define __FUNCT__ __FUNCT__600,20719
+PetscErrorCode DSSolve_HEP_DC(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_DC601,20754
+#undef __FUNCT____FUNCT__667,22935
+#define __FUNCT__ __FUNCT__668,22952
+PetscErrorCode DSSolve_HEP_BDC(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_HEP_BDC669,22988
+#undef __FUNCT____FUNCT__736,25165
+#define __FUNCT__ __FUNCT__737,25182
+PetscErrorCode DSTruncate_HEP(DS ds,PetscInt n)DSTruncate_HEP738,25217
+#undef __FUNCT____FUNCT__755,25624
+#define __FUNCT__ __FUNCT__756,25641
+PetscErrorCode DSCond_HEP(DS ds,PetscReal *cond)DSCond_HEP757,25672
+#undef __FUNCT____FUNCT__801,27214
+#define __FUNCT__ __FUNCT__802,27231
+PetscErrorCode DSTranslateRKS_HEP(DS ds,PetscScalar alpha)DSTranslateRKS_HEP803,27270
+#undef __FUNCT____FUNCT__855,29200
+#define __FUNCT__ __FUNCT__856,29217
+PETSC_EXTERN PetscErrorCode DSCreate_HEP(DS ds)DSCreate_HEP857,29250
 

 src/sys/classes/ds/impls/hep/makefile,287
 makefile:^?makefile^A,1
@@ -9151,30 +10130,30 @@ PetscErrorCode DSSort_NEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,
 #undef __FUNCT____FUNCT__188,6258
 #define __FUNCT__ __FUNCT__189,6275
 PetscErrorCode DSSolve_NEP_SLP(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_NEP_SLP190,6311
-#undef __FUNCT____FUNCT__312,10334
-#define __FUNCT__ __FUNCT__313,10351
-static PetscErrorCode DSNEPSetFN_NEP(DS ds,PetscInt n,FN fn[])DSNEPSetFN_NEP314,10386
-#undef __FUNCT____FUNCT__335,11192
-#define __FUNCT__ __FUNCT__336,11209
-PetscErrorCode DSNEPSetFN(DS ds,PetscInt n,FN fn[])DSNEPSetFN360,11831
-#undef __FUNCT____FUNCT__377,12295
-#define __FUNCT__ __FUNCT__378,12312
-static PetscErrorCode DSNEPGetFN_NEP(DS ds,PetscInt k,FN *fn)DSNEPGetFN_NEP379,12347
-#undef __FUNCT____FUNCT__389,12650
-#define __FUNCT__ __FUNCT__390,12667
-PetscErrorCode DSNEPGetFN(DS ds,PetscInt k,FN *fn)DSNEPGetFN407,13052
-#undef __FUNCT____FUNCT__418,13338
-#define __FUNCT__ __FUNCT__419,13355
-static PetscErrorCode DSNEPGetNumFN_NEP(DS ds,PetscInt *n)DSNEPGetNumFN_NEP420,13393
-#undef __FUNCT____FUNCT__429,13557
-#define __FUNCT__ __FUNCT__430,13574
-PetscErrorCode DSNEPGetNumFN(DS ds,PetscInt *n)DSNEPGetNumFN447,13894
-#undef __FUNCT____FUNCT__458,14173
-#define __FUNCT__ __FUNCT__459,14190
-PetscErrorCode DSDestroy_NEP(DS ds)DSDestroy_NEP460,14224
-#undef __FUNCT____FUNCT__477,14791
-#define __FUNCT__ __FUNCT__478,14808
-PETSC_EXTERN PetscErrorCode DSCreate_NEP(DS ds)DSCreate_NEP479,14841
+#undef __FUNCT____FUNCT__312,10332
+#define __FUNCT__ __FUNCT__313,10349
+static PetscErrorCode DSNEPSetFN_NEP(DS ds,PetscInt n,FN fn[])DSNEPSetFN_NEP314,10384
+#undef __FUNCT____FUNCT__335,11190
+#define __FUNCT__ __FUNCT__336,11207
+PetscErrorCode DSNEPSetFN(DS ds,PetscInt n,FN fn[])DSNEPSetFN360,11829
+#undef __FUNCT____FUNCT__377,12293
+#define __FUNCT__ __FUNCT__378,12310
+static PetscErrorCode DSNEPGetFN_NEP(DS ds,PetscInt k,FN *fn)DSNEPGetFN_NEP379,12345
+#undef __FUNCT____FUNCT__389,12648
+#define __FUNCT__ __FUNCT__390,12665
+PetscErrorCode DSNEPGetFN(DS ds,PetscInt k,FN *fn)DSNEPGetFN407,13050
+#undef __FUNCT____FUNCT__418,13336
+#define __FUNCT__ __FUNCT__419,13353
+static PetscErrorCode DSNEPGetNumFN_NEP(DS ds,PetscInt *n)DSNEPGetNumFN_NEP420,13391
+#undef __FUNCT____FUNCT__429,13555
+#define __FUNCT__ __FUNCT__430,13572
+PetscErrorCode DSNEPGetNumFN(DS ds,PetscInt *n)DSNEPGetNumFN447,13892
+#undef __FUNCT____FUNCT__458,14171
+#define __FUNCT__ __FUNCT__459,14188
+PetscErrorCode DSDestroy_NEP(DS ds)DSDestroy_NEP460,14222
+#undef __FUNCT____FUNCT__477,14789
+#define __FUNCT__ __FUNCT__478,14806
+PETSC_EXTERN PetscErrorCode DSCreate_NEP(DS ds)DSCreate_NEP479,14839
 

 src/sys/classes/ds/impls/nep/makefile,283
 makefile:^?makefile^A,1
@@ -9188,7 +10167,7 @@ DIRS     =DIRS30,1022
 MANSEC   = DSMANSEC31,1033
 LOCDIR   = src/sys/classes/ds/impls/nep/LOCDIR32,1047
 

-src/sys/classes/ds/impls/nhep/dsnhep.c,3003
+src/sys/classes/ds/impls/nhep/dsnhep.c,3045
 dsnhep.c:^?dsnhep.c^A,1
 #undef __FUNCT____FUNCT__25,988
 #define __FUNCT__ __FUNCT__26,1005
@@ -9198,49 +10177,49 @@ PetscErrorCode DSAllocate_NHEP(DS ds,PetscInt ld)DSAllocate_NHEP27,1041
 PetscErrorCode DSView_NHEP(DS ds,PetscViewer viewer)DSView_NHEP42,1512
 #undef __FUNCT____FUNCT__60,1971
 #define __FUNCT__ __FUNCT__61,1988
-PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)DSVectors_NHEP_Refined_Some62,2036
-#undef __FUNCT____FUNCT__117,4155
-#define __FUNCT__ __FUNCT__118,4172
-PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)DSVectors_NHEP_Refined_All119,4219
-#undef __FUNCT____FUNCT__131,4481
-#define __FUNCT__ __FUNCT__132,4498
-PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)DSVectors_NHEP_Eigen_Some133,4544
-#undef __FUNCT____FUNCT__205,7294
-#define __FUNCT__ __FUNCT__206,7311
-PetscErrorCode DSVectors_NHEP_Eigen_All(DS ds,PetscBool left)DSVectors_NHEP_Eigen_All207,7356
-#undef __FUNCT____FUNCT__269,9399
-#define __FUNCT__ __FUNCT__270,9416
-PetscErrorCode DSVectors_NHEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_NHEP271,9451
-#undef __FUNCT____FUNCT__314,10868
-#define __FUNCT__ __FUNCT__315,10885
-PetscErrorCode DSNormalize_NHEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_NHEP316,10922
-#undef __FUNCT____FUNCT__371,12469
-#define __FUNCT__ __FUNCT__372,12486
-PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_NHEP_Arbitrary373,12528
-#undef __FUNCT____FUNCT__421,14327
-#define __FUNCT__ __FUNCT__422,14344
-PetscErrorCode DSSort_NHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)DSSort_NHEP_Total423,14382
-#undef __FUNCT____FUNCT__510,16892
-#define __FUNCT__ __FUNCT__511,16909
-PetscErrorCode DSSort_NHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_NHEP512,16941
-#undef __FUNCT____FUNCT__525,17288
-#define __FUNCT__ __FUNCT__526,17305
-PetscErrorCode DSUpdateExtraRow_NHEP(DS ds)DSUpdateExtraRow_NHEP527,17347
-#undef __FUNCT____FUNCT__549,18015
-#define __FUNCT__ __FUNCT__550,18032
-PetscErrorCode DSSolve_NHEP(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_NHEP551,18065
-#undef __FUNCT____FUNCT__627,20609
-#define __FUNCT__ __FUNCT__628,20626
-PetscErrorCode DSTruncate_NHEP(DS ds,PetscInt n)DSTruncate_NHEP629,20662
-#undef __FUNCT____FUNCT__653,21310
-#define __FUNCT__ __FUNCT__654,21327
-PetscErrorCode DSCond_NHEP(DS ds,PetscReal *cond)DSCond_NHEP655,21359
-#undef __FUNCT____FUNCT__699,22971
-#define __FUNCT__ __FUNCT__700,22988
-PetscErrorCode DSTranslateHarmonic_NHEP(DS ds,PetscScalar tau,PetscReal beta,PetscBool recover,PetscScalar *gin,PetscReal *gamma)DSTranslateHarmonic_NHEP701,23033
-#undef __FUNCT____FUNCT__782,25824
-#define __FUNCT__ __FUNCT__783,25841
-PETSC_EXTERN PetscErrorCode DSCreate_NHEP(DS ds)DSCreate_NHEP784,25875
+static PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)DSVectors_NHEP_Refined_Some62,2036
+#undef __FUNCT____FUNCT__117,4162
+#define __FUNCT__ __FUNCT__118,4179
+static PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)DSVectors_NHEP_Refined_All119,4226
+#undef __FUNCT____FUNCT__131,4495
+#define __FUNCT__ __FUNCT__132,4512
+static PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)DSVectors_NHEP_Eigen_Some133,4558
+#undef __FUNCT____FUNCT__204,7297
+#define __FUNCT__ __FUNCT__205,7314
+static PetscErrorCode DSVectors_NHEP_Eigen_All(DS ds,PetscBool left)DSVectors_NHEP_Eigen_All206,7359
+#undef __FUNCT____FUNCT__268,9409
+#define __FUNCT__ __FUNCT__269,9426
+PetscErrorCode DSVectors_NHEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_NHEP270,9461
+#undef __FUNCT____FUNCT__313,10878
+#define __FUNCT__ __FUNCT__314,10895
+PetscErrorCode DSNormalize_NHEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_NHEP315,10932
+#undef __FUNCT____FUNCT__370,12479
+#define __FUNCT__ __FUNCT__371,12496
+static PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_NHEP_Arbitrary372,12538
+#undef __FUNCT____FUNCT__420,14344
+#define __FUNCT__ __FUNCT__421,14361
+static PetscErrorCode DSSort_NHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)DSSort_NHEP_Total422,14399
+#undef __FUNCT____FUNCT__509,16916
+#define __FUNCT__ __FUNCT__510,16933
+PetscErrorCode DSSort_NHEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_NHEP511,16965
+#undef __FUNCT____FUNCT__524,17312
+#define __FUNCT__ __FUNCT__525,17329
+PetscErrorCode DSUpdateExtraRow_NHEP(DS ds)DSUpdateExtraRow_NHEP526,17371
+#undef __FUNCT____FUNCT__548,18039
+#define __FUNCT__ __FUNCT__549,18056
+PetscErrorCode DSSolve_NHEP(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_NHEP550,18089
+#undef __FUNCT____FUNCT__626,20633
+#define __FUNCT__ __FUNCT__627,20650
+PetscErrorCode DSTruncate_NHEP(DS ds,PetscInt n)DSTruncate_NHEP628,20686
+#undef __FUNCT____FUNCT__652,21334
+#define __FUNCT__ __FUNCT__653,21351
+PetscErrorCode DSCond_NHEP(DS ds,PetscReal *cond)DSCond_NHEP654,21383
+#undef __FUNCT____FUNCT__698,22995
+#define __FUNCT__ __FUNCT__699,23012
+PetscErrorCode DSTranslateHarmonic_NHEP(DS ds,PetscScalar tau,PetscReal beta,PetscBool recover,PetscScalar *gin,PetscReal *gamma)DSTranslateHarmonic_NHEP700,23057
+#undef __FUNCT____FUNCT__781,25848
+#define __FUNCT__ __FUNCT__782,25865
+PETSC_EXTERN PetscErrorCode DSCreate_NHEP(DS ds)DSCreate_NHEP783,25899
 

 src/sys/classes/ds/impls/nhep/makefile,286
 makefile:^?makefile^A,1
@@ -9254,46 +10233,46 @@ DIRS     =DIRS30,1023
 MANSEC   = DSMANSEC31,1034
 LOCDIR   = src/sys/classes/ds/impls/nhep/LOCDIR32,1048
 

-src/sys/classes/ds/impls/pep/dspep.c,1980
+src/sys/classes/ds/impls/pep/dspep.c,1986
 dspep.c:^?dspep.c^A,1
   PetscInt d;              /* polynomial degree */d26,1031
 } DS_PEP;DS_PEP27,1082
 #undef __FUNCT____FUNCT__29,1093
 #define __FUNCT__ __FUNCT__30,1110
 PetscErrorCode DSAllocate_PEP(DS ds,PetscInt ld)DSAllocate_PEP31,1145
-#undef __FUNCT____FUNCT__49,1819
-#define __FUNCT__ __FUNCT__50,1836
-PetscErrorCode DSView_PEP(DS ds,PetscViewer viewer)DSView_PEP51,1867
-#undef __FUNCT____FUNCT__73,2632
-#define __FUNCT__ __FUNCT__74,2649
-PetscErrorCode DSVectors_PEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_PEP75,2683
-#undef __FUNCT____FUNCT__91,3154
-#define __FUNCT__ __FUNCT__92,3171
-PetscErrorCode DSNormalize_PEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_PEP93,3207
-#undef __FUNCT____FUNCT__108,3589
-#define __FUNCT__ __FUNCT__109,3606
-PetscErrorCode DSSort_PEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *kout)DSSort_PEP110,3637
-#undef __FUNCT____FUNCT__153,4945
-#define __FUNCT__ __FUNCT__154,4962
-PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_PEP_QZ155,4997
-#undef __FUNCT____FUNCT__263,8667
-#define __FUNCT__ __FUNCT__264,8684
-static PetscErrorCode DSPEPSetDegree_PEP(DS ds,PetscInt d)DSPEPSetDegree_PEP265,8723
-#undef __FUNCT____FUNCT__276,9171
-#define __FUNCT__ __FUNCT__277,9188
-PetscErrorCode DSPEPSetDegree(DS ds,PetscInt d)DSPEPSetDegree291,9449
-#undef __FUNCT____FUNCT__302,9744
-#define __FUNCT__ __FUNCT__303,9761
-static PetscErrorCode DSPEPGetDegree_PEP(DS ds,PetscInt *d)DSPEPGetDegree_PEP304,9800
-#undef __FUNCT____FUNCT__313,9964
-#define __FUNCT__ __FUNCT__314,9981
-PetscErrorCode DSPEPGetDegree(DS ds,PetscInt *d)DSPEPGetDegree330,10254
-#undef __FUNCT____FUNCT__341,10535
-#define __FUNCT__ __FUNCT__342,10552
-PetscErrorCode DSDestroy_PEP(DS ds)DSDestroy_PEP343,10586
-#undef __FUNCT____FUNCT__354,10927
-#define __FUNCT__ __FUNCT__355,10944
-PETSC_EXTERN PetscErrorCode DSCreate_PEP(DS ds)DSCreate_PEP356,10977
+#undef __FUNCT____FUNCT__50,1878
+#define __FUNCT__ __FUNCT__51,1895
+PetscErrorCode DSView_PEP(DS ds,PetscViewer viewer)DSView_PEP52,1926
+#undef __FUNCT____FUNCT__74,2691
+#define __FUNCT__ __FUNCT__75,2708
+PetscErrorCode DSVectors_PEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_PEP76,2742
+#undef __FUNCT____FUNCT__91,3145
+#define __FUNCT__ __FUNCT__92,3162
+PetscErrorCode DSNormalize_PEP(DS ds,DSMatType mat,PetscInt col)DSNormalize_PEP93,3198
+#undef __FUNCT____FUNCT__107,3512
+#define __FUNCT__ __FUNCT__108,3529
+PetscErrorCode DSSort_PEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *kout)DSSort_PEP109,3560
+#undef __FUNCT____FUNCT__154,4973
+#define __FUNCT__ __FUNCT__155,4990
+PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_PEP_QZ156,5025
+#undef __FUNCT____FUNCT__277,9355
+#define __FUNCT__ __FUNCT__278,9372
+static PetscErrorCode DSPEPSetDegree_PEP(DS ds,PetscInt d)DSPEPSetDegree_PEP279,9411
+#undef __FUNCT____FUNCT__290,9859
+#define __FUNCT__ __FUNCT__291,9876
+PetscErrorCode DSPEPSetDegree(DS ds,PetscInt d)DSPEPSetDegree305,10137
+#undef __FUNCT____FUNCT__316,10432
+#define __FUNCT__ __FUNCT__317,10449
+static PetscErrorCode DSPEPGetDegree_PEP(DS ds,PetscInt *d)DSPEPGetDegree_PEP318,10488
+#undef __FUNCT____FUNCT__327,10652
+#define __FUNCT__ __FUNCT__328,10669
+PetscErrorCode DSPEPGetDegree(DS ds,PetscInt *d)DSPEPGetDegree344,10942
+#undef __FUNCT____FUNCT__355,11223
+#define __FUNCT__ __FUNCT__356,11240
+PetscErrorCode DSDestroy_PEP(DS ds)DSDestroy_PEP357,11274
+#undef __FUNCT____FUNCT__368,11615
+#define __FUNCT__ __FUNCT__369,11632
+PETSC_EXTERN PetscErrorCode DSCreate_PEP(DS ds)DSCreate_PEP370,11665
 

 src/sys/classes/ds/impls/pep/makefile,283
 makefile:^?makefile^A,1
@@ -9312,24 +10291,24 @@ dssvd.c:^?dssvd.c^A,1
 #undef __FUNCT____FUNCT__25,988
 #define __FUNCT__ __FUNCT__26,1005
 PetscErrorCode DSAllocate_SVD(DS ds,PetscInt ld)DSAllocate_SVD27,1040
-#undef __FUNCT____FUNCT__67,2655
-#define __FUNCT__ __FUNCT__68,2672
-static PetscErrorCode DSSwitchFormat_SVD(DS ds,PetscBool tocompact)DSSwitchFormat_SVD69,2711
-#undef __FUNCT____FUNCT__104,3806
-#define __FUNCT__ __FUNCT__105,3823
-PetscErrorCode DSView_SVD(DS ds,PetscViewer viewer)DSView_SVD106,3854
-#undef __FUNCT____FUNCT__158,6080
-#define __FUNCT__ __FUNCT__159,6097
-PetscErrorCode DSVectors_SVD(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_SVD160,6131
-#undef __FUNCT____FUNCT__173,6447
-#define __FUNCT__ __FUNCT__174,6464
-PetscErrorCode DSSort_SVD(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_SVD175,6495
-#undef __FUNCT____FUNCT__203,7322
-#define __FUNCT__ __FUNCT__204,7339
-PetscErrorCode DSSolve_SVD_DC(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_SVD_DC205,7374
-#undef __FUNCT____FUNCT__302,11247
-#define __FUNCT__ __FUNCT__303,11264
-PETSC_EXTERN PetscErrorCode DSCreate_SVD(DS ds)DSCreate_SVD304,11297
+#undef __FUNCT____FUNCT__67,2647
+#define __FUNCT__ __FUNCT__68,2664
+static PetscErrorCode DSSwitchFormat_SVD(DS ds,PetscBool tocompact)DSSwitchFormat_SVD69,2703
+#undef __FUNCT____FUNCT__104,3798
+#define __FUNCT__ __FUNCT__105,3815
+PetscErrorCode DSView_SVD(DS ds,PetscViewer viewer)DSView_SVD106,3846
+#undef __FUNCT____FUNCT__158,6072
+#define __FUNCT__ __FUNCT__159,6089
+PetscErrorCode DSVectors_SVD(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)DSVectors_SVD160,6123
+#undef __FUNCT____FUNCT__173,6439
+#define __FUNCT__ __FUNCT__174,6456
+PetscErrorCode DSSort_SVD(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)DSSort_SVD175,6487
+#undef __FUNCT____FUNCT__203,7314
+#define __FUNCT__ __FUNCT__204,7331
+PetscErrorCode DSSolve_SVD_DC(DS ds,PetscScalar *wr,PetscScalar *wi)DSSolve_SVD_DC205,7366
+#undef __FUNCT____FUNCT__302,11239
+#define __FUNCT__ __FUNCT__303,11256
+PETSC_EXTERN PetscErrorCode DSCreate_SVD(DS ds)DSCreate_SVD304,11289
 

 src/sys/classes/ds/impls/svd/makefile,283
 makefile:^?makefile^A,1
@@ -9360,81 +10339,81 @@ PetscErrorCode DSFinalizePackage(void)DSFinalizePackage44,1780
 #undef __FUNCT____FUNCT__55,2030
 #define __FUNCT__ __FUNCT__56,2047
 PetscErrorCode DSInitializePackage()DSInitializePackage66,2367
-#undef __FUNCT____FUNCT__104,3748
-#define __FUNCT__ __FUNCT__105,3765
-PetscErrorCode DSCreate(MPI_Comm comm,DS *newds)DSCreate125,4159
-#undef __FUNCT____FUNCT__169,5260
-#define __FUNCT__ __FUNCT__170,5277
-PetscErrorCode DSSetOptionsPrefix(DS ds,const char *prefix)DSSetOptionsPrefix190,5792
-#undef __FUNCT____FUNCT__200,6050
-#define __FUNCT__ __FUNCT__201,6067
-PetscErrorCode DSAppendOptionsPrefix(DS ds,const char *prefix)DSAppendOptionsPrefix220,6588
-#undef __FUNCT____FUNCT__230,6852
-#define __FUNCT__ __FUNCT__231,6869
-PetscErrorCode DSGetOptionsPrefix(DS ds,const char *prefix[])DSGetOptionsPrefix251,7366
-#undef __FUNCT____FUNCT__262,7657
-#define __FUNCT__ __FUNCT__263,7674
-PetscErrorCode DSSetType(DS ds,DSType type)DSSetType277,7922
-#undef __FUNCT____FUNCT__299,8631
-#define __FUNCT__ __FUNCT__300,8648
-PetscErrorCode DSGetType(DS ds,DSType *type)DSGetType316,8938
-#undef __FUNCT____FUNCT__325,9150
-#define __FUNCT__ __FUNCT__326,9167
-PetscErrorCode DSSetMethod(DS ds,PetscInt meth)DSSetMethod340,9456
-#undef __FUNCT____FUNCT__351,9920
-#define __FUNCT__ __FUNCT__352,9937
-PetscErrorCode DSGetMethod(DS ds,PetscInt *meth)DSGetMethod368,10216
-#undef __FUNCT____FUNCT__377,10414
-#define __FUNCT__ __FUNCT__378,10431
-PetscErrorCode DSSetCompact(DS ds,PetscBool comp)DSSetCompact400,10992
-#undef __FUNCT____FUNCT__409,11208
-#define __FUNCT__ __FUNCT__410,11225
-PetscErrorCode DSGetCompact(DS ds,PetscBool *comp)DSGetCompact426,11476
-#undef __FUNCT____FUNCT__435,11677
-#define __FUNCT__ __FUNCT__436,11694
-PetscErrorCode DSSetExtraRow(DS ds,PetscBool ext)DSSetExtraRow459,12368
-#undef __FUNCT____FUNCT__469,12716
-#define __FUNCT__ __FUNCT__470,12733
-PetscErrorCode DSGetExtraRow(DS ds,PetscBool *ext)DSGetExtraRow486,12980
-#undef __FUNCT____FUNCT__495,13180
-#define __FUNCT__ __FUNCT__496,13197
-PetscErrorCode DSSetRefined(DS ds,PetscBool ref)DSSetRefined521,13897
-#undef __FUNCT____FUNCT__530,14110
-#define __FUNCT__ __FUNCT__531,14127
-PetscErrorCode DSGetRefined(DS ds,PetscBool *ref)DSGetRefined547,14377
-#undef __FUNCT____FUNCT__556,14575
-#define __FUNCT__ __FUNCT__557,14592
-PetscErrorCode DSSetBlockSize(DS ds,PetscInt bs)DSSetBlockSize571,14837
-#undef __FUNCT____FUNCT__581,15160
-#define __FUNCT__ __FUNCT__582,15177
-PetscErrorCode DSGetBlockSize(DS ds,PetscInt *bs)DSGetBlockSize598,15428
-#undef __FUNCT____FUNCT__607,15619
-#define __FUNCT__ __FUNCT__608,15636
-PetscErrorCode DSSetSlepcSC(DS ds,SlepcSC sc)DSSetSlepcSC622,15915
-#undef __FUNCT____FUNCT__636,16189
-#define __FUNCT__ __FUNCT__637,16206
-PetscErrorCode DSGetSlepcSC(DS ds,SlepcSC *sc)DSGetSlepcSC653,16507
-#undef __FUNCT____FUNCT__667,16790
-#define __FUNCT__ __FUNCT__668,16807
-PetscErrorCode DSSetFromOptions(DS ds)DSSetFromOptions682,17088
-#undef __FUNCT____FUNCT__705,18073
-#define __FUNCT__ __FUNCT__706,18090
-PetscErrorCode DSView(DS ds,PetscViewer viewer)DSView731,18776
-#undef __FUNCT____FUNCT__778,20965
-#define __FUNCT__ __FUNCT__779,20982
-PetscErrorCode DSAllocate(DS ds,PetscInt ld)DSAllocate794,21391
-#undef __FUNCT____FUNCT__807,21791
-#define __FUNCT__ __FUNCT__808,21808
-PetscErrorCode DSReset(DS ds)DSReset821,22020
-#undef __FUNCT____FUNCT__852,22849
-#define __FUNCT__ __FUNCT__853,22866
-PetscErrorCode DSDestroy(DS *ds)DSDestroy866,23091
-#undef __FUNCT____FUNCT__881,23571
-#define __FUNCT__ __FUNCT__882,23588
-PetscErrorCode DSRegister(const char *name,PetscErrorCode (*function)(DS))DSRegister900,23961
-#undef __FUNCT____FUNCT__918,24556
-#define __FUNCT__ __FUNCT__919,24573
-PetscErrorCode DSRegisterAll(void)DSRegisterAll927,24729
+#undef __FUNCT____FUNCT__104,3750
+#define __FUNCT__ __FUNCT__105,3767
+PetscErrorCode DSCreate(MPI_Comm comm,DS *newds)DSCreate125,4161
+#undef __FUNCT____FUNCT__169,5262
+#define __FUNCT__ __FUNCT__170,5279
+PetscErrorCode DSSetOptionsPrefix(DS ds,const char *prefix)DSSetOptionsPrefix190,5794
+#undef __FUNCT____FUNCT__200,6052
+#define __FUNCT__ __FUNCT__201,6069
+PetscErrorCode DSAppendOptionsPrefix(DS ds,const char *prefix)DSAppendOptionsPrefix220,6590
+#undef __FUNCT____FUNCT__230,6854
+#define __FUNCT__ __FUNCT__231,6871
+PetscErrorCode DSGetOptionsPrefix(DS ds,const char *prefix[])DSGetOptionsPrefix252,7370
+#undef __FUNCT____FUNCT__263,7661
+#define __FUNCT__ __FUNCT__264,7678
+PetscErrorCode DSSetType(DS ds,DSType type)DSSetType278,7926
+#undef __FUNCT____FUNCT__300,8635
+#define __FUNCT__ __FUNCT__301,8652
+PetscErrorCode DSGetType(DS ds,DSType *type)DSGetType317,8942
+#undef __FUNCT____FUNCT__326,9154
+#define __FUNCT__ __FUNCT__327,9171
+PetscErrorCode DSSetMethod(DS ds,PetscInt meth)DSSetMethod341,9460
+#undef __FUNCT____FUNCT__352,9924
+#define __FUNCT__ __FUNCT__353,9941
+PetscErrorCode DSGetMethod(DS ds,PetscInt *meth)DSGetMethod369,10220
+#undef __FUNCT____FUNCT__378,10418
+#define __FUNCT__ __FUNCT__379,10435
+PetscErrorCode DSSetCompact(DS ds,PetscBool comp)DSSetCompact401,10996
+#undef __FUNCT____FUNCT__410,11212
+#define __FUNCT__ __FUNCT__411,11229
+PetscErrorCode DSGetCompact(DS ds,PetscBool *comp)DSGetCompact427,11480
+#undef __FUNCT____FUNCT__436,11681
+#define __FUNCT__ __FUNCT__437,11698
+PetscErrorCode DSSetExtraRow(DS ds,PetscBool ext)DSSetExtraRow460,12372
+#undef __FUNCT____FUNCT__470,12720
+#define __FUNCT__ __FUNCT__471,12737
+PetscErrorCode DSGetExtraRow(DS ds,PetscBool *ext)DSGetExtraRow487,12984
+#undef __FUNCT____FUNCT__496,13184
+#define __FUNCT__ __FUNCT__497,13201
+PetscErrorCode DSSetRefined(DS ds,PetscBool ref)DSSetRefined522,13901
+#undef __FUNCT____FUNCT__531,14114
+#define __FUNCT__ __FUNCT__532,14131
+PetscErrorCode DSGetRefined(DS ds,PetscBool *ref)DSGetRefined548,14381
+#undef __FUNCT____FUNCT__557,14579
+#define __FUNCT__ __FUNCT__558,14596
+PetscErrorCode DSSetBlockSize(DS ds,PetscInt bs)DSSetBlockSize572,14841
+#undef __FUNCT____FUNCT__582,15164
+#define __FUNCT__ __FUNCT__583,15181
+PetscErrorCode DSGetBlockSize(DS ds,PetscInt *bs)DSGetBlockSize599,15432
+#undef __FUNCT____FUNCT__608,15623
+#define __FUNCT__ __FUNCT__609,15640
+PetscErrorCode DSSetSlepcSC(DS ds,SlepcSC sc)DSSetSlepcSC623,15919
+#undef __FUNCT____FUNCT__637,16193
+#define __FUNCT__ __FUNCT__638,16210
+PetscErrorCode DSGetSlepcSC(DS ds,SlepcSC *sc)DSGetSlepcSC654,16511
+#undef __FUNCT____FUNCT__668,16794
+#define __FUNCT__ __FUNCT__669,16811
+PetscErrorCode DSSetFromOptions(DS ds)DSSetFromOptions683,17092
+#undef __FUNCT____FUNCT__706,18096
+#define __FUNCT__ __FUNCT__707,18113
+PetscErrorCode DSView(DS ds,PetscViewer viewer)DSView732,18799
+#undef __FUNCT____FUNCT__779,20988
+#define __FUNCT__ __FUNCT__780,21005
+PetscErrorCode DSAllocate(DS ds,PetscInt ld)DSAllocate795,21414
+#undef __FUNCT____FUNCT__808,21814
+#define __FUNCT__ __FUNCT__809,21831
+PetscErrorCode DSReset(DS ds)DSReset822,22043
+#undef __FUNCT____FUNCT__853,22872
+#define __FUNCT__ __FUNCT__854,22889
+PetscErrorCode DSDestroy(DS *ds)DSDestroy867,23114
+#undef __FUNCT____FUNCT__882,23594
+#define __FUNCT__ __FUNCT__883,23611
+PetscErrorCode DSRegister(const char *name,PetscErrorCode (*function)(DS))DSRegister901,23984
+#undef __FUNCT____FUNCT__919,24579
+#define __FUNCT__ __FUNCT__920,24596
+PetscErrorCode DSRegisterAll(void)DSRegisterAll928,24752
 

 src/sys/classes/ds/interface/dsops.c,3511
 dsops.c:^?dsops.c^A,1
@@ -9502,50 +10481,50 @@ PetscErrorCode DSTranslateRKS(DS ds,PetscScalar alpha)DSTranslateRKS853,27417
 #define __FUNCT__ __FUNCT__873,28161
 PetscErrorCode DSCopyMat(DS ds,DSMatType m,PetscInt mr,PetscInt mc,Mat A,PetscInt Ar,PetscInt Ac,PetscInt rows,PetscInt cols,PetscBool out)DSCopyMat900,28905
 

-src/sys/classes/ds/interface/dspriv.c,2787
+src/sys/classes/ds/interface/dspriv.c,2790
 dspriv.c:^?dspriv.c^A,1
 #undef __FUNCT____FUNCT__27,1037
 #define __FUNCT__ __FUNCT__28,1054
 PetscErrorCode DSAllocateMat_Private(DS ds,DSMatType m)DSAllocateMat_Private29,1096
-#undef __FUNCT____FUNCT__66,2087
-#define __FUNCT__ __FUNCT__67,2104
-PetscErrorCode DSAllocateMatReal_Private(DS ds,DSMatType m)DSAllocateMatReal_Private68,2150
-#undef __FUNCT____FUNCT__85,2661
-#define __FUNCT__ __FUNCT__86,2678
-PetscErrorCode DSAllocateWork_Private(DS ds,PetscInt s,PetscInt r,PetscInt i)DSAllocateWork_Private87,2721
-#undef __FUNCT____FUNCT__113,3605
-#define __FUNCT__ __FUNCT__114,3622
-PetscErrorCode DSViewMat(DS ds,PetscViewer viewer,DSMatType m)DSViewMat133,4010
-#undef __FUNCT____FUNCT__191,6268
-#define __FUNCT__ __FUNCT__192,6285
-PetscErrorCode DSSortEigenvalues_Private(DS ds,PetscScalar *wr,PetscScalar *wi,PetscInt *perm,PetscBool isghiep)DSSortEigenvalues_Private193,6331
-#undef __FUNCT____FUNCT__246,7805
-#define __FUNCT__ __FUNCT__247,7822
-PetscErrorCode DSSortEigenvaluesReal_Private(DS ds,PetscReal *eig,PetscInt *perm)DSSortEigenvaluesReal_Private248,7872
-#undef __FUNCT____FUNCT__272,8540
-#define __FUNCT__ __FUNCT__273,8557
-PetscErrorCode DSCopyMatrix_Private(DS ds,DSMatType dst,DSMatType src)DSCopyMatrix_Private278,8697
-#undef __FUNCT____FUNCT__296,9106
-#define __FUNCT__ __FUNCT__297,9123
-PetscErrorCode DSPermuteColumns_Private(DS ds,PetscInt l,PetscInt n,DSMatType mat,PetscInt *perm)DSPermuteColumns_Private298,9168
-#undef __FUNCT____FUNCT__321,9687
-#define __FUNCT__ __FUNCT__322,9704
-PetscErrorCode DSPermuteRows_Private(DS ds,PetscInt l,PetscInt n,DSMatType mat,PetscInt *perm)DSPermuteRows_Private323,9746
-#undef __FUNCT____FUNCT__347,10356
-#define __FUNCT__ __FUNCT__348,10373
-PetscErrorCode DSPermuteBoth_Private(DS ds,PetscInt l,PetscInt n,DSMatType mat1,DSMatType mat2,PetscInt *perm)DSPermuteBoth_Private349,10415
-#undef __FUNCT____FUNCT__378,11217
-#define __FUNCT__ __FUNCT__379,11234
-PetscErrorCode DSSetIdentity(DS ds,DSMatType mat)DSSetIdentity392,11526
-#undef __FUNCT____FUNCT__412,12161
-#define __FUNCT__ __FUNCT__413,12178
-PetscErrorCode DSOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscInt *lindcols)DSOrthogonalize425,12537
-#undef __FUNCT____FUNCT__472,14749
-#define __FUNCT__ __FUNCT__473,14766
-static PetscErrorCode SlepcMatDenseMult(PetscScalar *C,PetscInt _ldC,PetscScalar b,PetscScalar a,const PetscScalar *A,PetscInt _ldA,PetscInt rA,PetscInt cA,PetscBool At,const PetscScalar *B,PetscInt _ldB,PetscInt rB,PetscInt cB,PetscBool Bt)SlepcMatDenseMult484,15120
-#undef __FUNCT____FUNCT__520,16416
-#define __FUNCT__ __FUNCT__521,16433
-PetscErrorCode DSPseudoOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscReal *s,PetscInt *lindcols,PetscReal *ns)DSPseudoOrthogonalize536,16989
+#undef __FUNCT____FUNCT__69,2190
+#define __FUNCT__ __FUNCT__70,2207
+PetscErrorCode DSAllocateMatReal_Private(DS ds,DSMatType m)DSAllocateMatReal_Private71,2253
+#undef __FUNCT____FUNCT__88,2764
+#define __FUNCT__ __FUNCT__89,2781
+PetscErrorCode DSAllocateWork_Private(DS ds,PetscInt s,PetscInt r,PetscInt i)DSAllocateWork_Private90,2824
+#undef __FUNCT____FUNCT__116,3708
+#define __FUNCT__ __FUNCT__117,3725
+PetscErrorCode DSViewMat(DS ds,PetscViewer viewer,DSMatType m)DSViewMat136,4113
+#undef __FUNCT____FUNCT__200,6605
+#define __FUNCT__ __FUNCT__201,6622
+PetscErrorCode DSSortEigenvalues_Private(DS ds,PetscScalar *wr,PetscScalar *wi,PetscInt *perm,PetscBool isghiep)DSSortEigenvalues_Private202,6668
+#undef __FUNCT____FUNCT__255,8142
+#define __FUNCT__ __FUNCT__256,8159
+PetscErrorCode DSSortEigenvaluesReal_Private(DS ds,PetscReal *eig,PetscInt *perm)DSSortEigenvaluesReal_Private257,8209
+#undef __FUNCT____FUNCT__281,8877
+#define __FUNCT__ __FUNCT__282,8894
+PetscErrorCode DSCopyMatrix_Private(DS ds,DSMatType dst,DSMatType src)DSCopyMatrix_Private287,9034
+#undef __FUNCT____FUNCT__305,9443
+#define __FUNCT__ __FUNCT__306,9460
+PetscErrorCode DSPermuteColumns_Private(DS ds,PetscInt l,PetscInt n,DSMatType mat,PetscInt *perm)DSPermuteColumns_Private307,9505
+#undef __FUNCT____FUNCT__330,10024
+#define __FUNCT__ __FUNCT__331,10041
+PetscErrorCode DSPermuteRows_Private(DS ds,PetscInt l,PetscInt n,DSMatType mat,PetscInt *perm)DSPermuteRows_Private332,10083
+#undef __FUNCT____FUNCT__356,10693
+#define __FUNCT__ __FUNCT__357,10710
+PetscErrorCode DSPermuteBoth_Private(DS ds,PetscInt l,PetscInt n,DSMatType mat1,DSMatType mat2,PetscInt *perm)DSPermuteBoth_Private358,10752
+#undef __FUNCT____FUNCT__387,11554
+#define __FUNCT__ __FUNCT__388,11571
+PetscErrorCode DSSetIdentity(DS ds,DSMatType mat)DSSetIdentity401,11863
+#undef __FUNCT____FUNCT__421,12498
+#define __FUNCT__ __FUNCT__422,12515
+PetscErrorCode DSOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscInt *lindcols)DSOrthogonalize440,12957
+#undef __FUNCT____FUNCT__491,15190
+#define __FUNCT__ __FUNCT__492,15207
+static PetscErrorCode SlepcMatDenseMult(PetscScalar *C,PetscInt _ldC,PetscScalar b,PetscScalar a,const PetscScalar *A,PetscInt _ldA,PetscInt rA,PetscInt cA,PetscBool At,const PetscScalar *B,PetscInt _ldB,PetscInt rB,PetscInt cB,PetscBool Bt)SlepcMatDenseMult503,15561
+#undef __FUNCT____FUNCT__539,16857
+#define __FUNCT__ __FUNCT__540,16874
+PetscErrorCode DSPseudoOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscReal *s,PetscInt *lindcols,PetscReal *ns)DSPseudoOrthogonalize561,17509
 

 src/sys/classes/ds/interface/ftn-custom/makefile,267
 makefile:^?makefile^A,1
@@ -9594,18 +10573,18 @@ makefile:^?makefile^A,1
 LOCDIR   = src/sys/classes/fn/examples/LOCDIR24,932
 DIRS     = testsDIRS25,972
 

-src/sys/classes/fn/examples/tests/makefile,458
+src/sys/classes/fn/examples/tests/makefile,486
 makefile:^?makefile^A,1
 CFLAGS     =CFLAGS22,926
 FFLAGS     =FFLAGS23,939
 CPPFLAGS   =CPPFLAGS24,952
 FPPFLAGS   =FPPFLAGS25,965
 LOCDIR     = src/sys/classes/fn/examples/tests/LOCDIR26,978
-EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.cEXAMPLESC27,1026
-EXAMPLESF  =EXAMPLESF28,1087
-MANSEC     = FNMANSEC29,1100
-TESTS      = test1 test2 test3 test4 test5 test6TESTS30,1116
-TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \TESTEXAMPLES_C32,1166
+EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.cEXAMPLESC27,1026
+EXAMPLESF  =EXAMPLESF28,1103
+MANSEC     = FNMANSEC29,1116
+TESTS      = test1 test2 test3 test4 test5 test6 test7 test8TESTS30,1132
+TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \TESTEXAMPLES_C32,1194
 

 src/sys/classes/fn/examples/tests/test1.c,179
 test1.c:^?test1.c^A,1
@@ -9621,12 +10600,15 @@ static char help[] = "Test exponential function.\n\n";help22,924
 #define __FUNCT__ __FUNCT__27,1019
 int main(int argc,char **argv)main28,1044
 

-src/sys/classes/fn/examples/tests/test3.c,181
+src/sys/classes/fn/examples/tests/test3.c,366
 test3.c:^?test3.c^A,1
 static char help[] = "Test matrix exponential.\n\n";help22,924
 #undef __FUNCT____FUNCT__26,1000
 #define __FUNCT__ __FUNCT__27,1017
-int main(int argc,char **argv)main28,1042
+PetscErrorCode TestMatExp(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)TestMatExp31,1097
+#undef __FUNCT____FUNCT__77,2968
+#define __FUNCT__ __FUNCT__78,2985
+int main(int argc,char **argv)main79,3010
 

 src/sys/classes/fn/examples/tests/test4.c,206
 test4.c:^?test4.c^A,1
@@ -9635,21 +10617,47 @@ static char help[] = "Test setting FN parameters from the command line.\n\n";he
 #define __FUNCT__ __FUNCT__27,1042
 int main(int argc,char **argv)main28,1067
 

-src/sys/classes/fn/examples/tests/test5.c,187
+src/sys/classes/fn/examples/tests/test5.c,382
 test5.c:^?test5.c^A,1
 static char help[] = "Test matrix rational function.\n\n";help22,924
 #undef __FUNCT____FUNCT__26,1006
 #define __FUNCT__ __FUNCT__27,1023
-int main(int argc,char **argv)main28,1048
+PetscErrorCode TestMatRational(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)TestMatRational31,1116
+#undef __FUNCT____FUNCT__77,2989
+#define __FUNCT__ __FUNCT__78,3006
+int main(int argc,char **argv)main79,3031
 

-src/sys/classes/fn/examples/tests/test6.c,181
+src/sys/classes/fn/examples/tests/test6.c,374
 test6.c:^?test6.c^A,1
 static char help[] = "Test combined function.\n\n";help35,1371
 #undef __FUNCT____FUNCT__39,1446
 #define __FUNCT__ __FUNCT__40,1463
-int main(int argc,char **argv)main41,1488
+PetscErrorCode TestMatCombine(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)TestMatCombine44,1562
+#undef __FUNCT____FUNCT__90,3437
+#define __FUNCT__ __FUNCT__91,3454
+int main(int argc,char **argv)main92,3479
+

+src/sys/classes/fn/examples/tests/test7.c,368
+test7.c:^?test7.c^A,1
+static char help[] = "Test matrix square root.\n\n";help22,924
+#undef __FUNCT____FUNCT__26,1000
+#define __FUNCT__ __FUNCT__27,1017
+PetscErrorCode TestMatSqrt(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)TestMatSqrt32,1130
+#undef __FUNCT____FUNCT__92,3595
+#define __FUNCT__ __FUNCT__93,3612
+int main(int argc,char **argv)main94,3637
 

-src/sys/classes/fn/impls/combine/fncombine.c,2157
+src/sys/classes/fn/examples/tests/test8.c,382
+test8.c:^?test8.c^A,1
+static char help[] = "Test matrix inverse square root.\n\n";help22,924
+#undef __FUNCT____FUNCT__26,1008
+#define __FUNCT__ __FUNCT__27,1025
+PetscErrorCode TestMatInvSqrt(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)TestMatInvSqrt32,1156
+#undef __FUNCT____FUNCT__97,3817
+#define __FUNCT__ __FUNCT__98,3834
+int main(int argc,char **argv)main99,3859
+

+src/sys/classes/fn/impls/combine/fncombine.c,2351
 fncombine.c:^?fncombine.c^A,1
   FN            f1,f2;    /* functions */f134,1359
   FN            f1,f2;    /* functions */f234,1359
@@ -9658,36 +10666,39 @@ fncombine.c:^?fncombine.c^A,1
 #undef __FUNCT____FUNCT__38,1479
 #define __FUNCT__ __FUNCT__39,1496
 PetscErrorCode FNEvaluateFunction_Combine(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction_Combine40,1543
-#undef __FUNCT____FUNCT__68,2306
-#define __FUNCT__ __FUNCT__69,2323
-PetscErrorCode FNEvaluateDerivative_Combine(FN fn,PetscScalar x,PetscScalar *yp)FNEvaluateDerivative_Combine70,2372
-#undef __FUNCT____FUNCT__107,3702
-#define __FUNCT__ __FUNCT__108,3719
-PetscErrorCode FNEvaluateFunctionMat_Combine(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Combine109,3769
-#undef __FUNCT____FUNCT__169,6134
-#define __FUNCT__ __FUNCT__170,6151
-PetscErrorCode FNView_Combine(FN fn,PetscViewer viewer)FNView_Combine171,6186
-#undef __FUNCT____FUNCT__202,7323
-#define __FUNCT__ __FUNCT__203,7340
-static PetscErrorCode FNCombineSetChildren_Combine(FN fn,FNCombineType comb,FN f1,FN f2)FNCombineSetChildren_Combine204,7389
-#undef __FUNCT____FUNCT__222,8032
-#define __FUNCT__ __FUNCT__223,8049
-PetscErrorCode FNCombineSetChildren(FN fn,FNCombineType comb,FN f1,FN f2)FNCombineSetChildren240,8520
-#undef __FUNCT____FUNCT__253,8961
-#define __FUNCT__ __FUNCT__254,8978
-static PetscErrorCode FNCombineGetChildren_Combine(FN fn,FNCombineType *comb,FN *f1,FN *f2)FNCombineGetChildren_Combine255,9027
-#undef __FUNCT____FUNCT__279,9730
-#define __FUNCT__ __FUNCT__280,9747
-PetscErrorCode FNCombineGetChildren(FN fn,FNCombineType *comb,FN *f1,FN *f2)FNCombineGetChildren299,10224
-#undef __FUNCT____FUNCT__309,10535
-#define __FUNCT__ __FUNCT__310,10552
-PetscErrorCode FNDuplicate_Combine(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate_Combine311,10592
-#undef __FUNCT____FUNCT__325,11016
-#define __FUNCT__ __FUNCT__326,11033
-PetscErrorCode FNDestroy_Combine(FN fn)FNDestroy_Combine327,11071
-#undef __FUNCT____FUNCT__341,11563
-#define __FUNCT__ __FUNCT__342,11580
-PETSC_EXTERN PetscErrorCode FNCreate_Combine(FN fn)FNCreate_Combine343,11617
+#undef __FUNCT____FUNCT__69,2398
+#define __FUNCT__ __FUNCT__70,2415
+PetscErrorCode FNEvaluateDerivative_Combine(FN fn,PetscScalar x,PetscScalar *yp)FNEvaluateDerivative_Combine71,2464
+#undef __FUNCT____FUNCT__109,3888
+#define __FUNCT__ __FUNCT__110,3905
+PetscErrorCode FNEvaluateFunctionMat_Combine(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Combine111,3955
+#undef __FUNCT____FUNCT__171,6306
+#define __FUNCT__ __FUNCT__172,6323
+PetscErrorCode FNEvaluateFunctionMatVec_Combine(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec_Combine173,6376
+#undef __FUNCT____FUNCT__236,8816
+#define __FUNCT__ __FUNCT__237,8833
+PetscErrorCode FNView_Combine(FN fn,PetscViewer viewer)FNView_Combine238,8868
+#undef __FUNCT____FUNCT__269,10005
+#define __FUNCT__ __FUNCT__270,10022
+static PetscErrorCode FNCombineSetChildren_Combine(FN fn,FNCombineType comb,FN f1,FN f2)FNCombineSetChildren_Combine271,10071
+#undef __FUNCT____FUNCT__289,10714
+#define __FUNCT__ __FUNCT__290,10731
+PetscErrorCode FNCombineSetChildren(FN fn,FNCombineType comb,FN f1,FN f2)FNCombineSetChildren307,11202
+#undef __FUNCT____FUNCT__320,11643
+#define __FUNCT__ __FUNCT__321,11660
+static PetscErrorCode FNCombineGetChildren_Combine(FN fn,FNCombineType *comb,FN *f1,FN *f2)FNCombineGetChildren_Combine322,11709
+#undef __FUNCT____FUNCT__346,12412
+#define __FUNCT__ __FUNCT__347,12429
+PetscErrorCode FNCombineGetChildren(FN fn,FNCombineType *comb,FN *f1,FN *f2)FNCombineGetChildren366,12906
+#undef __FUNCT____FUNCT__376,13217
+#define __FUNCT__ __FUNCT__377,13234
+PetscErrorCode FNDuplicate_Combine(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate_Combine378,13274
+#undef __FUNCT____FUNCT__392,13698
+#define __FUNCT__ __FUNCT__393,13715
+PetscErrorCode FNDestroy_Combine(FN fn)FNDestroy_Combine394,13753
+#undef __FUNCT____FUNCT__408,14245
+#define __FUNCT__ __FUNCT__409,14262
+PETSC_EXTERN PetscErrorCode FNCreate_Combine(FN fn)FNCreate_Combine410,14299
 

 src/sys/classes/fn/impls/combine/makefile,292
 makefile:^?makefile^A,1
@@ -9717,9 +10728,9 @@ PetscErrorCode FNEvaluateFunctionMat_Exp(FN fn,Mat A,Mat B)FNEvaluateFunctionMa
 #undef __FUNCT____FUNCT__143,5171
 #define __FUNCT__ __FUNCT__144,5188
 PetscErrorCode FNView_Exp(FN fn,PetscViewer viewer)FNView_Exp145,5219
-#undef __FUNCT____FUNCT__175,6374
-#define __FUNCT__ __FUNCT__176,6391
-PETSC_EXTERN PetscErrorCode FNCreate_Exp(FN fn)FNCreate_Exp177,6424
+#undef __FUNCT____FUNCT__177,6521
+#define __FUNCT__ __FUNCT__178,6538
+PETSC_EXTERN PetscErrorCode FNCreate_Exp(FN fn)FNCreate_Exp179,6571
 

 src/sys/classes/fn/impls/exp/makefile,283
 makefile:^?makefile^A,1
@@ -9733,6 +10744,49 @@ DIRS     =DIRS30,1022
 MANSEC   = FNMANSEC31,1033
 LOCDIR   = src/sys/classes/fn/impls/exp/LOCDIR32,1047
 

+src/sys/classes/fn/impls/fnutil.c,422
+fnutil.c:^?fnutil.c^A,1
+#undef __FUNCT____FUNCT__27,1061
+#define __FUNCT__ __FUNCT__28,1078
+PetscErrorCode SlepcMatDenseSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld)SlepcMatDenseSqrt33,1265
+#define BLOCKSIZE BLOCKSIZE91,3340
+#undef __FUNCT____FUNCT__93,3362
+#define __FUNCT__ __FUNCT__94,3379
+PetscErrorCode SlepcSchurParlettSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld,PetscBool firstonly)SlepcSchurParlettSqrt100,3663
+

+src/sys/classes/fn/impls/invsqrt/fninvsqrt.c,1034
+fninvsqrt.c:^?fninvsqrt.c^A,1
+#undef __FUNCT____FUNCT__27,1056
+#define __FUNCT__ __FUNCT__28,1073
+PetscErrorCode FNEvaluateFunction_Invsqrt(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction_Invsqrt29,1120
+#undef __FUNCT____FUNCT__37,1370
+#define __FUNCT__ __FUNCT__38,1387
+PetscErrorCode FNEvaluateDerivative_Invsqrt(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateDerivative_Invsqrt39,1436
+#undef __FUNCT____FUNCT__47,1704
+#define __FUNCT__ __FUNCT__48,1721
+PetscErrorCode FNEvaluateFunctionMat_Invsqrt(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Invsqrt49,1771
+#undef __FUNCT____FUNCT__78,2856
+#define __FUNCT__ __FUNCT__79,2873
+PetscErrorCode FNEvaluateFunctionMatVec_Invsqrt(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec_Invsqrt80,2926
+#undef __FUNCT____FUNCT__111,4109
+#define __FUNCT__ __FUNCT__112,4126
+PetscErrorCode FNView_Invsqrt(FN fn,PetscViewer viewer)FNView_Invsqrt113,4161
+#undef __FUNCT____FUNCT__145,5511
+#define __FUNCT__ __FUNCT__146,5528
+PETSC_EXTERN PetscErrorCode FNCreate_Invsqrt(FN fn)FNCreate_Invsqrt147,5565
+

+src/sys/classes/fn/impls/invsqrt/makefile,292
+makefile:^?makefile^A,1
+CFLAGS   =CFLAGS24,936
+FFLAGS   =FFLAGS25,947
+SOURCEC  = fninvsqrt.cSOURCEC26,958
+SOURCEF  =SOURCEF27,981
+SOURCEH  =SOURCEH28,992
+LIBBASE  = libslepcsysLIBBASE29,1003
+DIRS     =DIRS30,1026
+MANSEC   = FNMANSEC31,1037
+LOCDIR   = src/sys/classes/fn/impls/invsqrt/LOCDIR32,1051
+

 src/sys/classes/fn/impls/log/fnlog.c,642
 fnlog.c:^?fnlog.c^A,1
 #undef __FUNCT____FUNCT__26,1015
@@ -9741,12 +10795,12 @@ PetscErrorCode FNEvaluateFunction_Log(FN fn,PetscScalar x,PetscScalar *y)FNEval
 #undef __FUNCT____FUNCT__35,1228
 #define __FUNCT__ __FUNCT__36,1245
 PetscErrorCode FNEvaluateDerivative_Log(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateDerivative_Log37,1290
-#undef __FUNCT____FUNCT__44,1433
-#define __FUNCT__ __FUNCT__45,1450
-PetscErrorCode FNView_Log(FN fn,PetscViewer viewer)FNView_Log46,1481
-#undef __FUNCT____FUNCT__76,2628
-#define __FUNCT__ __FUNCT__77,2645
-PETSC_EXTERN PetscErrorCode FNCreate_Log(FN fn)FNCreate_Log78,2678
+#undef __FUNCT____FUNCT__45,1523
+#define __FUNCT__ __FUNCT__46,1540
+PetscErrorCode FNView_Log(FN fn,PetscViewer viewer)FNView_Log47,1571
+#undef __FUNCT____FUNCT__79,2865
+#define __FUNCT__ __FUNCT__80,2882
+PETSC_EXTERN PetscErrorCode FNCreate_Log(FN fn)FNCreate_Log81,2915
 

 src/sys/classes/fn/impls/log/makefile,283
 makefile:^?makefile^A,1
@@ -9760,14 +10814,19 @@ DIRS     =DIRS30,1022
 MANSEC   = FNMANSEC31,1033
 LOCDIR   = src/sys/classes/fn/impls/log/LOCDIR32,1047
 

-src/sys/classes/fn/impls/makefile,176
+src/sys/classes/fn/impls/makefile,323
 makefile:^?makefile^A,1
-LIBBASE  = libslepcsysLIBBASE24,936
-DIRS     = combine exp log phi rational sqrtDIRS25,959
-LOCDIR   = src/sys/classes/fn/impls/LOCDIR26,1004
-MANSEC   = FNMANSEC27,1041
+CFLAGS   =CFLAGS24,936
+FFLAGS   =FFLAGS25,947
+SOURCEC  = fnutil.cSOURCEC26,958
+SOURCEF  =SOURCEF27,978
+SOURCEH  =SOURCEH28,989
+LIBBASE  = libslepcsysLIBBASE29,1000
+DIRS     = combine exp log phi rational sqrt invsqrtDIRS30,1023
+LOCDIR   = src/sys/classes/fn/impls/LOCDIR31,1076
+MANSEC   = FNMANSEC32,1113
 

-src/sys/classes/fn/impls/phi/fnphi.c,2138
+src/sys/classes/fn/impls/phi/fnphi.c,2142
 fnphi.c:^?fnphi.c^A,1
   PetscInt k;    /* index of the phi-function, defaults to k=1 */k30,1116
 } FN_PHI;FN_PHI31,1182
@@ -9795,18 +10854,18 @@ PetscErrorCode FNPhiGetIndex(FN fn,PetscInt *k)FNPhiGetIndex161,4105
 #undef __FUNCT____FUNCT__172,4384
 #define __FUNCT__ __FUNCT__173,4401
 PetscErrorCode FNView_Phi(FN fn,PetscViewer viewer)FNView_Phi174,4432
-#undef __FUNCT____FUNCT__206,5643
-#define __FUNCT__ __FUNCT__207,5660
-PetscErrorCode FNSetFromOptions_Phi(PetscOptions *PetscOptionsObject,FN fn)FNSetFromOptions_Phi208,5701
-#undef __FUNCT____FUNCT__225,6250
-#define __FUNCT__ __FUNCT__226,6267
-PetscErrorCode FNDuplicate_Phi(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate_Phi227,6303
-#undef __FUNCT____FUNCT__239,6593
-#define __FUNCT__ __FUNCT__240,6610
-PetscErrorCode FNDestroy_Phi(FN fn)FNDestroy_Phi241,6644
-#undef __FUNCT____FUNCT__252,6983
-#define __FUNCT__ __FUNCT__253,7000
-PETSC_EXTERN PetscErrorCode FNCreate_Phi(FN fn)FNCreate_Phi254,7033
+#undef __FUNCT____FUNCT__208,5782
+#define __FUNCT__ __FUNCT__209,5799
+PetscErrorCode FNSetFromOptions_Phi(PetscOptionItems *PetscOptionsObject,FN fn)FNSetFromOptions_Phi210,5840
+#undef __FUNCT____FUNCT__227,6393
+#define __FUNCT__ __FUNCT__228,6410
+PetscErrorCode FNDuplicate_Phi(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate_Phi229,6446
+#undef __FUNCT____FUNCT__241,6736
+#define __FUNCT__ __FUNCT__242,6753
+PetscErrorCode FNDestroy_Phi(FN fn)FNDestroy_Phi243,6787
+#undef __FUNCT____FUNCT__254,7126
+#define __FUNCT__ __FUNCT__255,7143
+PETSC_EXTERN PetscErrorCode FNCreate_Phi(FN fn)FNCreate_Phi256,7176
 

 src/sys/classes/fn/impls/phi/makefile,283
 makefile:^?makefile^A,1
@@ -9820,7 +10879,7 @@ DIRS     =DIRS30,1022
 MANSEC   = FNMANSEC31,1033
 LOCDIR   = src/sys/classes/fn/impls/phi/LOCDIR32,1047
 

-src/sys/classes/fn/impls/rational/fnrational.c,3375
+src/sys/classes/fn/impls/rational/fnrational.c,3807
 fnrational.c:^?fnrational.c^A,1
   PetscScalar *pcoeff;    /* numerator coefficients */pcoeff28,1107
   PetscInt    np;         /* length of array pcoeff, p(x) has degree np-1 */np29,1162
@@ -9830,52 +10889,58 @@ fnrational.c:^?fnrational.c^A,1
 #undef __FUNCT____FUNCT__34,1389
 #define __FUNCT__ __FUNCT__35,1406
 PetscErrorCode FNEvaluateFunction_Rational(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction_Rational36,1454
-#undef __FUNCT____FUNCT__59,1921
-#define __FUNCT__ __FUNCT__60,1938
-PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Rational61,1989
-#undef __FUNCT____FUNCT__110,3866
-#define __FUNCT__ __FUNCT__111,3883
-PetscErrorCode FNEvaluateDerivative_Rational(FN fn,PetscScalar x,PetscScalar *yp)FNEvaluateDerivative_Rational112,3933
-#undef __FUNCT____FUNCT__143,4530
-#define __FUNCT__ __FUNCT__144,4547
-PetscErrorCode FNView_Rational(FN fn,PetscViewer viewer)FNView_Rational145,4583
-#undef __FUNCT____FUNCT__204,7508
-#define __FUNCT__ __FUNCT__205,7525
-static PetscErrorCode FNRationalSetNumerator_Rational(FN fn,PetscInt np,PetscScalar *pcoeff)FNRationalSetNumerator_Rational206,7577
-#undef __FUNCT____FUNCT__223,8088
-#define __FUNCT__ __FUNCT__224,8105
-PetscErrorCode FNRationalSetNumerator(FN fn,PetscInt np,PetscScalar *pcoeff)FNRationalSetNumerator249,8910
-#undef __FUNCT____FUNCT__262,9416
-#define __FUNCT__ __FUNCT__263,9433
-static PetscErrorCode FNRationalGetNumerator_Rational(FN fn,PetscInt *np,PetscScalar *pcoeff[])FNRationalGetNumerator_Rational264,9485
-#undef __FUNCT____FUNCT__282,9940
-#define __FUNCT__ __FUNCT__283,9957
-PetscErrorCode FNRationalGetNumerator(FN fn,PetscInt *np,PetscScalar *pcoeff[])FNRationalGetNumerator306,10555
-#undef __FUNCT____FUNCT__316,10871
-#define __FUNCT__ __FUNCT__317,10888
-static PetscErrorCode FNRationalSetDenominator_Rational(FN fn,PetscInt nq,PetscScalar *qcoeff)FNRationalSetDenominator_Rational318,10942
-#undef __FUNCT____FUNCT__335,11455
-#define __FUNCT__ __FUNCT__336,11472
-PetscErrorCode FNRationalSetDenominator(FN fn,PetscInt nq,PetscScalar *qcoeff)FNRationalSetDenominator361,12301
-#undef __FUNCT____FUNCT__374,12811
-#define __FUNCT__ __FUNCT__375,12828
-static PetscErrorCode FNRationalGetDenominator_Rational(FN fn,PetscInt *nq,PetscScalar *qcoeff[])FNRationalGetDenominator_Rational376,12882
-#undef __FUNCT____FUNCT__394,13339
-#define __FUNCT__ __FUNCT__395,13356
-PetscErrorCode FNRationalGetDenominator(FN fn,PetscInt *nq,PetscScalar *qcoeff[])FNRationalGetDenominator418,13964
-#undef __FUNCT____FUNCT__428,14284
-#define __FUNCT__ __FUNCT__429,14301
-PetscErrorCode FNSetFromOptions_Rational(PetscOptions *PetscOptionsObject,FN fn)FNSetFromOptions_Rational430,14347
-#define PARMAX PARMAX433,14453
-#undef __FUNCT____FUNCT__459,15396
-#define __FUNCT__ __FUNCT__460,15413
-PetscErrorCode FNDuplicate_Rational(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate_Rational461,15454
-#undef __FUNCT____FUNCT__485,16284
-#define __FUNCT__ __FUNCT__486,16301
-PetscErrorCode FNDestroy_Rational(FN fn)FNDestroy_Rational487,16340
-#undef __FUNCT____FUNCT__503,17048
-#define __FUNCT__ __FUNCT__504,17065
-PETSC_EXTERN PetscErrorCode FNCreate_Rational(FN fn)FNCreate_Rational505,17103
+#undef __FUNCT____FUNCT__60,2011
+#define __FUNCT__ __FUNCT__61,2028
+static PetscErrorCode FNEvaluateFunctionMat_Private(FN fn,PetscScalar *Aa,PetscScalar *Ba,PetscInt m,PetscBool firstonly)FNEvaluateFunctionMat_Private62,2078
+#undef __FUNCT____FUNCT__116,4034
+#define __FUNCT__ __FUNCT__117,4051
+PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Rational118,4102
+#undef __FUNCT____FUNCT__134,4614
+#define __FUNCT__ __FUNCT__135,4631
+PetscErrorCode FNEvaluateFunctionMatVec_Rational(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec_Rational136,4685
+#undef __FUNCT____FUNCT__156,5367
+#define __FUNCT__ __FUNCT__157,5384
+PetscErrorCode FNEvaluateDerivative_Rational(FN fn,PetscScalar x,PetscScalar *yp)FNEvaluateDerivative_Rational158,5434
+#undef __FUNCT____FUNCT__190,6123
+#define __FUNCT__ __FUNCT__191,6140
+PetscErrorCode FNView_Rational(FN fn,PetscViewer viewer)FNView_Rational192,6176
+#undef __FUNCT____FUNCT__259,9675
+#define __FUNCT__ __FUNCT__260,9692
+static PetscErrorCode FNRationalSetNumerator_Rational(FN fn,PetscInt np,PetscScalar *pcoeff)FNRationalSetNumerator_Rational261,9744
+#undef __FUNCT____FUNCT__278,10255
+#define __FUNCT__ __FUNCT__279,10272
+PetscErrorCode FNRationalSetNumerator(FN fn,PetscInt np,PetscScalar *pcoeff)FNRationalSetNumerator304,11077
+#undef __FUNCT____FUNCT__317,11583
+#define __FUNCT__ __FUNCT__318,11600
+static PetscErrorCode FNRationalGetNumerator_Rational(FN fn,PetscInt *np,PetscScalar *pcoeff[])FNRationalGetNumerator_Rational319,11652
+#undef __FUNCT____FUNCT__337,12107
+#define __FUNCT__ __FUNCT__338,12124
+PetscErrorCode FNRationalGetNumerator(FN fn,PetscInt *np,PetscScalar *pcoeff[])FNRationalGetNumerator361,12722
+#undef __FUNCT____FUNCT__371,13038
+#define __FUNCT__ __FUNCT__372,13055
+static PetscErrorCode FNRationalSetDenominator_Rational(FN fn,PetscInt nq,PetscScalar *qcoeff)FNRationalSetDenominator_Rational373,13109
+#undef __FUNCT____FUNCT__390,13622
+#define __FUNCT__ __FUNCT__391,13639
+PetscErrorCode FNRationalSetDenominator(FN fn,PetscInt nq,PetscScalar *qcoeff)FNRationalSetDenominator416,14468
+#undef __FUNCT____FUNCT__429,14978
+#define __FUNCT__ __FUNCT__430,14995
+static PetscErrorCode FNRationalGetDenominator_Rational(FN fn,PetscInt *nq,PetscScalar *qcoeff[])FNRationalGetDenominator_Rational431,15049
+#undef __FUNCT____FUNCT__449,15506
+#define __FUNCT__ __FUNCT__450,15523
+PetscErrorCode FNRationalGetDenominator(FN fn,PetscInt *nq,PetscScalar *qcoeff[])FNRationalGetDenominator473,16131
+#undef __FUNCT____FUNCT__483,16451
+#define __FUNCT__ __FUNCT__484,16468
+PetscErrorCode FNSetFromOptions_Rational(PetscOptionItems *PetscOptionsObject,FN fn)FNSetFromOptions_Rational485,16514
+#define PARMAX PARMAX488,16624
+#undef __FUNCT____FUNCT__514,17567
+#define __FUNCT__ __FUNCT__515,17584
+PetscErrorCode FNDuplicate_Rational(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate_Rational516,17625
+#undef __FUNCT____FUNCT__540,18455
+#define __FUNCT__ __FUNCT__541,18472
+PetscErrorCode FNDestroy_Rational(FN fn)FNDestroy_Rational542,18511
+#undef __FUNCT____FUNCT__558,19219
+#define __FUNCT__ __FUNCT__559,19236
+PETSC_EXTERN PetscErrorCode FNCreate_Rational(FN fn)FNCreate_Rational560,19274
 

 src/sys/classes/fn/impls/rational/makefile,294
 makefile:^?makefile^A,1
@@ -9889,20 +10954,26 @@ DIRS     =DIRS30,1027
 MANSEC   = FNMANSEC31,1038
 LOCDIR   = src/sys/classes/fn/impls/rational/LOCDIR32,1052
 

-src/sys/classes/fn/impls/sqrt/fnsqrt.c,650
+src/sys/classes/fn/impls/sqrt/fnsqrt.c,995
 fnsqrt.c:^?fnsqrt.c^A,1
-#undef __FUNCT____FUNCT__26,1018
-#define __FUNCT__ __FUNCT__27,1035
-PetscErrorCode FNEvaluateFunction_Sqrt(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction_Sqrt28,1079
-#undef __FUNCT____FUNCT__35,1234
-#define __FUNCT__ __FUNCT__36,1251
-PetscErrorCode FNEvaluateDerivative_Sqrt(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateDerivative_Sqrt37,1297
-#undef __FUNCT____FUNCT__44,1464
-#define __FUNCT__ __FUNCT__45,1481
-PetscErrorCode FNView_Sqrt(FN fn,PetscViewer viewer)FNView_Sqrt46,1513
-#undef __FUNCT____FUNCT__76,2673
-#define __FUNCT__ __FUNCT__77,2690
-PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(FN fn)FNCreate_Sqrt78,2724
+#undef __FUNCT____FUNCT__27,1047
+#define __FUNCT__ __FUNCT__28,1064
+PetscErrorCode FNEvaluateFunction_Sqrt(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction_Sqrt29,1108
+#undef __FUNCT____FUNCT__36,1263
+#define __FUNCT__ __FUNCT__37,1280
+PetscErrorCode FNEvaluateDerivative_Sqrt(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateDerivative_Sqrt38,1326
+#undef __FUNCT____FUNCT__46,1583
+#define __FUNCT__ __FUNCT__47,1600
+PetscErrorCode FNEvaluateFunctionMat_Sqrt(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Sqrt48,1647
+#undef __FUNCT____FUNCT__65,2174
+#define __FUNCT__ __FUNCT__66,2191
+PetscErrorCode FNEvaluateFunctionMatVec_Sqrt(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec_Sqrt67,2241
+#undef __FUNCT____FUNCT__87,2866
+#define __FUNCT__ __FUNCT__88,2883
+PetscErrorCode FNView_Sqrt(FN fn,PetscViewer viewer)FNView_Sqrt89,2915
+#undef __FUNCT____FUNCT__121,4222
+#define __FUNCT__ __FUNCT__122,4239
+PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(FN fn)FNCreate_Sqrt123,4273
 

 src/sys/classes/fn/impls/sqrt/makefile,286
 makefile:^?makefile^A,1
@@ -9916,7 +10987,7 @@ DIRS     =DIRS30,1023
 MANSEC   = FNMANSEC31,1034
 LOCDIR   = src/sys/classes/fn/impls/sqrt/LOCDIR32,1048
 

-src/sys/classes/fn/interface/fnbasic.c,3282
+src/sys/classes/fn/interface/fnbasic.c,4092
 fnbasic.c:^?fnbasic.c^A,1
 PetscFunctionList FNList = 0;FNList27,1034
 PetscBool         FNRegisterAllCalled = PETSC_FALSE;FNRegisterAllCalled28,1064
@@ -9929,63 +11000,75 @@ PetscErrorCode FNFinalizePackage(void)FNFinalizePackage43,1490
 #undef __FUNCT____FUNCT__54,1740
 #define __FUNCT__ __FUNCT__55,1757
 PetscErrorCode FNInitializePackage(void)FNInitializePackage65,2077
-#undef __FUNCT____FUNCT__101,3308
-#define __FUNCT__ __FUNCT__102,3325
-PetscErrorCode FNCreate(MPI_Comm comm,FN *newfn)FNCreate118,3585
-#undef __FUNCT____FUNCT__139,4035
-#define __FUNCT__ __FUNCT__140,4052
-PetscErrorCode FNSetOptionsPrefix(FN fn,const char *prefix)FNSetOptionsPrefix160,4567
-#undef __FUNCT____FUNCT__170,4825
-#define __FUNCT__ __FUNCT__171,4842
-PetscErrorCode FNAppendOptionsPrefix(FN fn,const char *prefix)FNAppendOptionsPrefix190,5363
-#undef __FUNCT____FUNCT__200,5627
-#define __FUNCT__ __FUNCT__201,5644
-PetscErrorCode FNGetOptionsPrefix(FN fn,const char *prefix[])FNGetOptionsPrefix221,6141
-#undef __FUNCT____FUNCT__232,6432
-#define __FUNCT__ __FUNCT__233,6449
-PetscErrorCode FNSetType(FN fn,FNType type)FNSetType251,6851
-#undef __FUNCT____FUNCT__274,7634
-#define __FUNCT__ __FUNCT__275,7651
-PetscErrorCode FNGetType(FN fn,FNType *type)FNGetType291,7941
-#undef __FUNCT____FUNCT__300,8153
-#define __FUNCT__ __FUNCT__301,8170
-PetscErrorCode FNSetScale(FN fn,PetscScalar alpha,PetscScalar beta)FNSetScale326,9025
-#undef __FUNCT____FUNCT__337,9329
-#define __FUNCT__ __FUNCT__338,9346
-PetscErrorCode FNGetScale(FN fn,PetscScalar *alpha,PetscScalar *beta)FNGetScale355,9685
-#undef __FUNCT____FUNCT__364,9918
-#define __FUNCT__ __FUNCT__365,9935
-PetscErrorCode FNEvaluateFunction(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction386,10468
-#undef __FUNCT____FUNCT__404,11011
-#define __FUNCT__ __FUNCT__405,11028
-PetscErrorCode FNEvaluateDerivative(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateDerivative426,11539
-#undef __FUNCT____FUNCT__444,12096
-#define __FUNCT__ __FUNCT__445,12113
-static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Sym_Default451,12343
-#undef __FUNCT____FUNCT__513,14655
-#define __FUNCT__ __FUNCT__514,14672
-PetscErrorCode FNEvaluateFunctionMat(FN fn,Mat A,Mat B)FNEvaluateFunctionMat545,15687
-#undef __FUNCT____FUNCT__604,18195
-#define __FUNCT__ __FUNCT__605,18212
-PetscErrorCode FNSetFromOptions(FN fn)FNSetFromOptions619,18493
-#undef __FUNCT____FUNCT__658,19837
-#define __FUNCT__ __FUNCT__659,19854
-PetscErrorCode FNView(FN fn,PetscViewer viewer)FNView682,20517
-#undef __FUNCT____FUNCT__704,21296
-#define __FUNCT__ __FUNCT__705,21313
-PetscErrorCode FNDuplicate(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate723,21696
-#undef __FUNCT____FUNCT__745,22373
-#define __FUNCT__ __FUNCT__746,22390
-PetscErrorCode FNDestroy(FN *fn)FNDestroy759,22615
-#undef __FUNCT____FUNCT__773,23059
-#define __FUNCT__ __FUNCT__774,23076
-PetscErrorCode FNRegister(const char *name,PetscErrorCode (*function)(FN))FNRegister791,23452
+#undef __FUNCT____FUNCT__101,3310
+#define __FUNCT__ __FUNCT__102,3327
+PetscErrorCode FNCreate(MPI_Comm comm,FN *newfn)FNCreate118,3587
+#undef __FUNCT____FUNCT__140,4054
+#define __FUNCT__ __FUNCT__141,4071
+PetscErrorCode FNSetOptionsPrefix(FN fn,const char *prefix)FNSetOptionsPrefix161,4586
+#undef __FUNCT____FUNCT__171,4844
+#define __FUNCT__ __FUNCT__172,4861
+PetscErrorCode FNAppendOptionsPrefix(FN fn,const char *prefix)FNAppendOptionsPrefix191,5382
+#undef __FUNCT____FUNCT__201,5646
+#define __FUNCT__ __FUNCT__202,5663
+PetscErrorCode FNGetOptionsPrefix(FN fn,const char *prefix[])FNGetOptionsPrefix223,6162
+#undef __FUNCT____FUNCT__234,6453
+#define __FUNCT__ __FUNCT__235,6470
+PetscErrorCode FNSetType(FN fn,FNType type)FNSetType253,6872
+#undef __FUNCT____FUNCT__276,7655
+#define __FUNCT__ __FUNCT__277,7672
+PetscErrorCode FNGetType(FN fn,FNType *type)FNGetType293,7962
+#undef __FUNCT____FUNCT__302,8174
+#define __FUNCT__ __FUNCT__303,8191
+PetscErrorCode FNSetScale(FN fn,PetscScalar alpha,PetscScalar beta)FNSetScale328,9046
+#undef __FUNCT____FUNCT__339,9350
+#define __FUNCT__ __FUNCT__340,9367
+PetscErrorCode FNGetScale(FN fn,PetscScalar *alpha,PetscScalar *beta)FNGetScale357,9706
+#undef __FUNCT____FUNCT__366,9939
+#define __FUNCT__ __FUNCT__367,9956
+PetscErrorCode FNEvaluateFunction(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateFunction388,10489
+#undef __FUNCT____FUNCT__406,11032
+#define __FUNCT__ __FUNCT__407,11049
+PetscErrorCode FNEvaluateDerivative(FN fn,PetscScalar x,PetscScalar *y)FNEvaluateDerivative428,11560
+#undef __FUNCT____FUNCT__446,12117
+#define __FUNCT__ __FUNCT__447,12134
+static PetscErrorCode FNEvaluateFunctionMat_Sym_Private(FN fn,PetscScalar *As,PetscScalar *Bs,PetscInt m,PetscBool firstonly)FNEvaluateFunctionMat_Sym_Private448,12188
+#undef __FUNCT____FUNCT__506,14365
+#define __FUNCT__ __FUNCT__507,14382
+static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)FNEvaluateFunctionMat_Sym_Default513,14611
+#undef __FUNCT____FUNCT__529,15137
+#define __FUNCT__ __FUNCT__530,15154
+PetscErrorCode FNEvaluateFunctionMat(FN fn,Mat A,Mat B)FNEvaluateFunctionMat562,16337
+#undef __FUNCT____FUNCT__630,18960
+#define __FUNCT__ __FUNCT__631,18977
+static PetscErrorCode FNEvaluateFunctionMatVec_Default(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec_Default636,19141
+#undef __FUNCT____FUNCT__651,19708
+#define __FUNCT__ __FUNCT__652,19725
+static PetscErrorCode FNEvaluateFunctionMatVec_Sym_Default(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec_Sym_Default658,19996
+#undef __FUNCT____FUNCT__674,20514
+#define __FUNCT__ __FUNCT__675,20531
+PetscErrorCode FNEvaluateFunctionMatVec(FN fn,Mat A,Vec v)FNEvaluateFunctionMatVec697,21127
+#undef __FUNCT____FUNCT__756,23233
+#define __FUNCT__ __FUNCT__757,23250
+PetscErrorCode FNSetFromOptions(FN fn)FNSetFromOptions771,23531
+#undef __FUNCT____FUNCT__810,24894
+#define __FUNCT__ __FUNCT__811,24911
+PetscErrorCode FNView(FN fn,PetscViewer viewer)FNView834,25574
+#undef __FUNCT____FUNCT__856,26353
+#define __FUNCT__ __FUNCT__857,26370
+PetscErrorCode FNDuplicate(FN fn,MPI_Comm comm,FN *newfn)FNDuplicate875,26753
+#undef __FUNCT____FUNCT__897,27430
+#define __FUNCT__ __FUNCT__898,27447
+PetscErrorCode FNDestroy(FN *fn)FNDestroy911,27672
+#undef __FUNCT____FUNCT__928,28175
+#define __FUNCT__ __FUNCT__929,28192
+PetscErrorCode FNRegister(const char *name,PetscErrorCode (*function)(FN))FNRegister946,28568
 

 src/sys/classes/fn/interface/fnregis.c,129
 fnregis.c:^?fnregis.c^A,1
-#undef __FUNCT____FUNCT__31,1271
-#define __FUNCT__ __FUNCT__32,1288
-PetscErrorCode FNRegisterAll(void)FNRegisterAll40,1444
+#undef __FUNCT____FUNCT__32,1321
+#define __FUNCT__ __FUNCT__33,1338
+PetscErrorCode FNRegisterAll(void)FNRegisterAll41,1494
 

 src/sys/classes/fn/interface/ftn-custom/makefile,257
 makefile:^?makefile^A,1
@@ -10075,7 +11158,7 @@ DIRS     =DIRS30,1026
 MANSEC   = RGMANSEC31,1037
 LOCDIR   = src/sys/classes/rg/impls/ellipse/LOCDIR32,1051
 

-src/sys/classes/rg/impls/ellipse/rgellipse.c,2296
+src/sys/classes/rg/impls/ellipse/rgellipse.c,2300
 rgellipse.c:^?rgellipse.c^A,1
   PetscScalar center;     /* center of the ellipse */center27,1071
   PetscReal   radius;     /* radius of the ellipse */radius28,1125
@@ -10099,21 +11182,21 @@ PetscErrorCode RGView_Ellipse(RG rg,PetscViewer viewer)RGView_Ellipse137,4462
 #undef __FUNCT____FUNCT__153,5035
 #define __FUNCT__ __FUNCT__154,5052
 PetscErrorCode RGIsTrivial_Ellipse(RG rg,PetscBool *trivial)RGIsTrivial_Ellipse155,5092
-#undef __FUNCT____FUNCT__165,5402
-#define __FUNCT__ __FUNCT__166,5419
-PetscErrorCode RGComputeContour_Ellipse(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Ellipse167,5464
-#undef __FUNCT____FUNCT__186,6013
-#define __FUNCT__ __FUNCT__187,6030
-PetscErrorCode RGCheckInside_Ellipse(RG rg,PetscReal px,PetscReal py,PetscInt *inside)RGCheckInside_Ellipse188,6072
-#undef __FUNCT____FUNCT__206,6570
-#define __FUNCT__ __FUNCT__207,6587
-PetscErrorCode RGSetFromOptions_Ellipse(PetscOptions *PetscOptionsObject,RG rg)RGSetFromOptions_Ellipse208,6632
-#undef __FUNCT____FUNCT__230,7521
-#define __FUNCT__ __FUNCT__231,7538
-PetscErrorCode RGDestroy_Ellipse(RG rg)RGDestroy_Ellipse232,7576
-#undef __FUNCT____FUNCT__243,7937
-#define __FUNCT__ __FUNCT__244,7954
-PETSC_EXTERN PetscErrorCode RGCreate_Ellipse(RG rg)RGCreate_Ellipse245,7991
+#undef __FUNCT____FUNCT__165,5362
+#define __FUNCT__ __FUNCT__166,5379
+PetscErrorCode RGComputeContour_Ellipse(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Ellipse167,5424
+#undef __FUNCT____FUNCT__186,5970
+#define __FUNCT__ __FUNCT__187,5987
+PetscErrorCode RGCheckInside_Ellipse(RG rg,PetscReal px,PetscReal py,PetscInt *inside)RGCheckInside_Ellipse188,6029
+#undef __FUNCT____FUNCT__206,6525
+#define __FUNCT__ __FUNCT__207,6542
+PetscErrorCode RGSetFromOptions_Ellipse(PetscOptionItems *PetscOptionsObject,RG rg)RGSetFromOptions_Ellipse208,6587
+#undef __FUNCT____FUNCT__230,7480
+#define __FUNCT__ __FUNCT__231,7497
+PetscErrorCode RGDestroy_Ellipse(RG rg)RGDestroy_Ellipse232,7535
+#undef __FUNCT____FUNCT__243,7896
+#define __FUNCT__ __FUNCT__244,7913
+PETSC_EXTERN PetscErrorCode RGCreate_Ellipse(RG rg)RGCreate_Ellipse245,7950
 

 src/sys/classes/rg/impls/interval/makefile,294
 makefile:^?makefile^A,1
@@ -10127,7 +11210,7 @@ DIRS     =DIRS30,1027
 MANSEC   = RGMANSEC31,1038
 LOCDIR   = src/sys/classes/rg/impls/interval/LOCDIR32,1052
 

-src/sys/classes/rg/impls/interval/rginterval.c,2353
+src/sys/classes/rg/impls/interval/rginterval.c,2357
 rginterval.c:^?rginterval.c^A,1
   PetscReal   a,b;     /* interval in the real axis */a28,1102
   PetscReal   a,b;     /* interval in the real axis */b28,1102
@@ -10155,18 +11238,18 @@ PetscErrorCode RGIsTrivial_Interval(RG rg,PetscBool *trivial)RGIsTrivial_Interv
 #undef __FUNCT____FUNCT__162,5717
 #define __FUNCT__ __FUNCT__163,5734
 PetscErrorCode RGComputeContour_Interval(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Interval164,5780
-#undef __FUNCT____FUNCT__174,6248
-#define __FUNCT__ __FUNCT__175,6265
-PetscErrorCode RGCheckInside_Interval(RG rg,PetscReal dx,PetscReal dy,PetscInt *inside)RGCheckInside_Interval176,6308
-#undef __FUNCT____FUNCT__192,6742
-#define __FUNCT__ __FUNCT__193,6759
-PetscErrorCode RGSetFromOptions_Interval(PetscOptions *PetscOptionsObject,RG rg)RGSetFromOptions_Interval194,6805
-#undef __FUNCT____FUNCT__215,7638
-#define __FUNCT__ __FUNCT__216,7655
-PetscErrorCode RGDestroy_Interval(RG rg)RGDestroy_Interval217,7694
-#undef __FUNCT____FUNCT__228,8056
-#define __FUNCT__ __FUNCT__229,8073
-PETSC_EXTERN PetscErrorCode RGCreate_Interval(RG rg)RGCreate_Interval230,8111
+#undef __FUNCT____FUNCT__214,7528
+#define __FUNCT__ __FUNCT__215,7545
+PetscErrorCode RGCheckInside_Interval(RG rg,PetscReal dx,PetscReal dy,PetscInt *inside)RGCheckInside_Interval216,7588
+#undef __FUNCT____FUNCT__232,8022
+#define __FUNCT__ __FUNCT__233,8039
+PetscErrorCode RGSetFromOptions_Interval(PetscOptionItems *PetscOptionsObject,RG rg)RGSetFromOptions_Interval234,8085
+#undef __FUNCT____FUNCT__255,8922
+#define __FUNCT__ __FUNCT__256,8939
+PetscErrorCode RGDestroy_Interval(RG rg)RGDestroy_Interval257,8978
+#undef __FUNCT____FUNCT__268,9340
+#define __FUNCT__ __FUNCT__269,9357
+PETSC_EXTERN PetscErrorCode RGCreate_Interval(RG rg)RGCreate_Interval270,9395
 

 src/sys/classes/rg/impls/makefile,172
 makefile:^?makefile^A,1
@@ -10187,7 +11270,7 @@ DIRS     =DIRS30,1026
 MANSEC   = RGMANSEC31,1037
 LOCDIR   = src/sys/classes/rg/impls/polygon/LOCDIR32,1051
 

-src/sys/classes/rg/impls/polygon/rgpolygon.c,2306
+src/sys/classes/rg/impls/polygon/rgpolygon.c,2316
 rgpolygon.c:^?rgpolygon.c^A,1
 #define VERTMAX VERTMAX26,1025
   PetscInt    n;         /* number of vertices */n29,1062
@@ -10209,24 +11292,24 @@ PetscErrorCode RGPolygonGetVertices(RG rg,PetscInt *n,PetscScalar **vr,PetscScal
 #undef __FUNCT____FUNCT__155,4746
 #define __FUNCT__ __FUNCT__156,4763
 PetscErrorCode RGView_Polygon(RG rg,PetscViewer viewer)RGView_Polygon157,4798
-#undef __FUNCT____FUNCT__186,5772
-#define __FUNCT__ __FUNCT__187,5789
-PetscErrorCode RGIsTrivial_Polygon(RG rg,PetscBool *trivial)RGIsTrivial_Polygon188,5829
-#undef __FUNCT____FUNCT__197,6035
-#define __FUNCT__ __FUNCT__198,6052
-PetscErrorCode RGComputeContour_Polygon(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Polygon199,6097
-#undef __FUNCT____FUNCT__209,6468
-#define __FUNCT__ __FUNCT__210,6485
-PetscErrorCode RGCheckInside_Polygon(RG rg,PetscReal px,PetscReal py,PetscInt *inout)RGCheckInside_Polygon211,6527
-#undef __FUNCT____FUNCT__249,7601
-#define __FUNCT__ __FUNCT__250,7618
-PetscErrorCode RGSetFromOptions_Polygon(PetscOptions *PetscOptionsObject,RG rg)RGSetFromOptions_Polygon251,7663
-#undef __FUNCT____FUNCT__284,8826
-#define __FUNCT__ __FUNCT__285,8843
-PetscErrorCode RGDestroy_Polygon(RG rg)RGDestroy_Polygon286,8881
-#undef __FUNCT____FUNCT__304,9434
-#define __FUNCT__ __FUNCT__305,9451
-PETSC_EXTERN PetscErrorCode RGCreate_Polygon(RG rg)RGCreate_Polygon306,9488
+#undef __FUNCT____FUNCT__188,5911
+#define __FUNCT__ __FUNCT__189,5928
+PetscErrorCode RGIsTrivial_Polygon(RG rg,PetscBool *trivial)RGIsTrivial_Polygon190,5968
+#undef __FUNCT____FUNCT__199,6157
+#define __FUNCT__ __FUNCT__200,6174
+PetscErrorCode RGComputeContour_Polygon(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Polygon201,6219
+#undef __FUNCT____FUNCT__267,8072
+#define __FUNCT__ __FUNCT__268,8089
+PetscErrorCode RGCheckInside_Polygon(RG rg,PetscReal px,PetscReal py,PetscInt *inout)RGCheckInside_Polygon269,8131
+#undef __FUNCT____FUNCT__307,9133
+#define __FUNCT__ __FUNCT__308,9150
+PetscErrorCode RGSetFromOptions_Polygon(PetscOptionItems *PetscOptionsObject,RG rg)RGSetFromOptions_Polygon309,9195
+#undef __FUNCT____FUNCT__342,10362
+#define __FUNCT__ __FUNCT__343,10379
+PetscErrorCode RGDestroy_Polygon(RG rg)RGDestroy_Polygon344,10417
+#undef __FUNCT____FUNCT__362,10970
+#define __FUNCT__ __FUNCT__363,10987
+PETSC_EXTERN PetscErrorCode RGCreate_Polygon(RG rg)RGCreate_Polygon364,11024
 

 src/sys/classes/rg/impls/ring/makefile,286
 makefile:^?makefile^A,1
@@ -10240,7 +11323,7 @@ DIRS     =DIRS30,1023
 MANSEC   = RGMANSEC31,1034
 LOCDIR   = src/sys/classes/rg/impls/ring/LOCDIR32,1048
 

-src/sys/classes/rg/impls/ring/rgring.c,2624
+src/sys/classes/rg/impls/ring/rgring.c,2628
 rgring.c:^?rgring.c^A,1
   PetscScalar center;     /* center of the ellipse */center28,1101
   PetscReal   radius;     /* radius of the ellipse */radius29,1155
@@ -10267,21 +11350,21 @@ PetscErrorCode RGView_Ring(RG rg,PetscViewer viewer)RGView_Ring185,7231
 #undef __FUNCT____FUNCT__201,7885
 #define __FUNCT__ __FUNCT__202,7902
 PetscErrorCode RGIsTrivial_Ring(RG rg,PetscBool *trivial)RGIsTrivial_Ring203,7939
-#undef __FUNCT____FUNCT__213,8240
-#define __FUNCT__ __FUNCT__214,8257
-PetscErrorCode RGComputeContour_Ring(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Ring215,8299
-#undef __FUNCT____FUNCT__222,8508
-#define __FUNCT__ __FUNCT__223,8525
-PetscErrorCode RGCheckInside_Ring(RG rg,PetscReal px,PetscReal py,PetscInt *inside)RGCheckInside_Ring224,8564
-#undef __FUNCT____FUNCT__272,10091
-#define __FUNCT__ __FUNCT__273,10108
-PetscErrorCode RGSetFromOptions_Ring(PetscOptions *PetscOptionsObject,RG rg)RGSetFromOptions_Ring274,10150
-#undef __FUNCT____FUNCT__299,11431
-#define __FUNCT__ __FUNCT__300,11448
-PetscErrorCode RGDestroy_Ring(RG rg)RGDestroy_Ring301,11483
-#undef __FUNCT____FUNCT__312,11835
-#define __FUNCT__ __FUNCT__313,11852
-PETSC_EXTERN PetscErrorCode RGCreate_Ring(RG rg)RGCreate_Ring314,11886
+#undef __FUNCT____FUNCT__213,8200
+#define __FUNCT__ __FUNCT__214,8217
+PetscErrorCode RGComputeContour_Ring(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour_Ring215,8259
+#undef __FUNCT____FUNCT__244,9347
+#define __FUNCT__ __FUNCT__245,9364
+PetscErrorCode RGCheckInside_Ring(RG rg,PetscReal px,PetscReal py,PetscInt *inside)RGCheckInside_Ring246,9403
+#undef __FUNCT____FUNCT__294,10931
+#define __FUNCT__ __FUNCT__295,10948
+PetscErrorCode RGSetFromOptions_Ring(PetscOptionItems *PetscOptionsObject,RG rg)RGSetFromOptions_Ring296,10990
+#undef __FUNCT____FUNCT__321,12275
+#define __FUNCT__ __FUNCT__322,12292
+PetscErrorCode RGDestroy_Ring(RG rg)RGDestroy_Ring323,12327
+#undef __FUNCT____FUNCT__334,12679
+#define __FUNCT__ __FUNCT__335,12696
+PETSC_EXTERN PetscErrorCode RGCreate_Ring(RG rg)RGCreate_Ring336,12730
 

 src/sys/classes/rg/interface/ftn-custom/makefile,267
 makefile:^?makefile^A,1
@@ -10313,7 +11396,7 @@ DIRS     =DIRS30,1034
 MANSEC   = RGMANSEC31,1045
 LOCDIR   = src/sys/classes/rg/LOCDIR32,1059
 

-src/sys/classes/rg/interface/rgbasic.c,3164
+src/sys/classes/rg/interface/rgbasic.c,3445
 rgbasic.c:^?rgbasic.c^A,1
 PetscFunctionList RGList = 0;RGList26,1003
 PetscBool         RGRegisterAllCalled = PETSC_FALSE;RGRegisterAllCalled27,1033
@@ -10325,57 +11408,63 @@ PetscErrorCode RGFinalizePackage(void)RGFinalizePackage41,1424
 #undef __FUNCT____FUNCT__52,1674
 #define __FUNCT__ __FUNCT__53,1691
 PetscErrorCode RGInitializePackage(void)RGInitializePackage63,2011
-#undef __FUNCT____FUNCT__97,3127
-#define __FUNCT__ __FUNCT__98,3144
-PetscErrorCode RGCreate(MPI_Comm comm,RG *newrg)RGCreate114,3404
-#undef __FUNCT____FUNCT__132,3836
-#define __FUNCT__ __FUNCT__133,3853
-PetscErrorCode RGSetOptionsPrefix(RG rg,const char *prefix)RGSetOptionsPrefix153,4365
-#undef __FUNCT____FUNCT__163,4623
-#define __FUNCT__ __FUNCT__164,4640
-PetscErrorCode RGAppendOptionsPrefix(RG rg,const char *prefix)RGAppendOptionsPrefix183,5158
-#undef __FUNCT____FUNCT__193,5422
-#define __FUNCT__ __FUNCT__194,5439
-PetscErrorCode RGGetOptionsPrefix(RG rg,const char *prefix[])RGGetOptionsPrefix214,5929
-#undef __FUNCT____FUNCT__225,6220
-#define __FUNCT__ __FUNCT__226,6237
-PetscErrorCode RGSetType(RG rg,RGType type)RGSetType240,6478
-#undef __FUNCT____FUNCT__263,7261
-#define __FUNCT__ __FUNCT__264,7278
-PetscErrorCode RGGetType(RG rg,RGType *type)RGGetType280,7554
-#undef __FUNCT____FUNCT__289,7766
-#define __FUNCT__ __FUNCT__290,7783
-PetscErrorCode RGSetFromOptions(RG rg)RGSetFromOptions304,8057
-#undef __FUNCT____FUNCT__335,9171
-#define __FUNCT__ __FUNCT__336,9188
-PetscErrorCode RGView(RG rg,PetscViewer viewer)RGView359,9844
-#undef __FUNCT____FUNCT__387,10914
-#define __FUNCT__ __FUNCT__388,10931
-PetscErrorCode RGIsTrivial(RG rg,PetscBool *trivial)RGIsTrivial404,11340
-#undef __FUNCT____FUNCT__418,11692
-#define __FUNCT__ __FUNCT__419,11709
-PetscErrorCode RGCheckInside(RG rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,PetscInt *inside)RGCheckInside445,12459
-#undef __FUNCT____FUNCT__478,13241
-#define __FUNCT__ __FUNCT__479,13258
-PetscErrorCode RGComputeContour(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour496,13636
-#undef __FUNCT____FUNCT__511,14020
-#define __FUNCT__ __FUNCT__512,14037
-PetscErrorCode RGSetComplement(RG rg,PetscBool flg)RGSetComplement530,14453
-#undef __FUNCT____FUNCT__539,14672
-#define __FUNCT__ __FUNCT__540,14689
-PetscErrorCode RGGetComplement(RG rg,PetscBool *flg)RGGetComplement557,14992
-#undef __FUNCT____FUNCT__566,15196
-#define __FUNCT__ __FUNCT__567,15213
-PetscErrorCode RGSetScale(RG rg,PetscReal sfactor)RGSetScale582,15534
-#undef __FUNCT____FUNCT__595,15987
-#define __FUNCT__ __FUNCT__596,16004
-PetscErrorCode RGGetScale(RG rg,PetscReal *sfactor)RGGetScale612,16236
-#undef __FUNCT____FUNCT__621,16444
-#define __FUNCT__ __FUNCT__622,16461
-PetscErrorCode RGDestroy(RG *rg)RGDestroy635,16679
-#undef __FUNCT____FUNCT__648,17077
-#define __FUNCT__ __FUNCT__649,17094
-PetscErrorCode RGRegister(const char *name,PetscErrorCode (*function)(RG))RGRegister666,17470
+#undef __FUNCT____FUNCT__97,3129
+#define __FUNCT__ __FUNCT__98,3146
+PetscErrorCode RGCreate(MPI_Comm comm,RG *newrg)RGCreate114,3406
+#undef __FUNCT____FUNCT__133,3862
+#define __FUNCT__ __FUNCT__134,3879
+PetscErrorCode RGSetOptionsPrefix(RG rg,const char *prefix)RGSetOptionsPrefix154,4391
+#undef __FUNCT____FUNCT__164,4649
+#define __FUNCT__ __FUNCT__165,4666
+PetscErrorCode RGAppendOptionsPrefix(RG rg,const char *prefix)RGAppendOptionsPrefix184,5184
+#undef __FUNCT____FUNCT__194,5448
+#define __FUNCT__ __FUNCT__195,5465
+PetscErrorCode RGGetOptionsPrefix(RG rg,const char *prefix[])RGGetOptionsPrefix216,5957
+#undef __FUNCT____FUNCT__227,6248
+#define __FUNCT__ __FUNCT__228,6265
+PetscErrorCode RGSetType(RG rg,RGType type)RGSetType242,6506
+#undef __FUNCT____FUNCT__265,7289
+#define __FUNCT__ __FUNCT__266,7306
+PetscErrorCode RGGetType(RG rg,RGType *type)RGGetType282,7582
+#undef __FUNCT____FUNCT__291,7794
+#define __FUNCT__ __FUNCT__292,7811
+PetscErrorCode RGSetFromOptions(RG rg)RGSetFromOptions306,8085
+#undef __FUNCT____FUNCT__342,9420
+#define __FUNCT__ __FUNCT__343,9437
+PetscErrorCode RGView(RG rg,PetscViewer viewer)RGView366,10093
+#undef __FUNCT____FUNCT__394,11163
+#define __FUNCT__ __FUNCT__395,11180
+PetscErrorCode RGIsTrivial(RG rg,PetscBool *trivial)RGIsTrivial411,11592
+#undef __FUNCT____FUNCT__425,11944
+#define __FUNCT__ __FUNCT__426,11961
+PetscErrorCode RGCheckInside(RG rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,PetscInt *inside)RGCheckInside452,12711
+#undef __FUNCT____FUNCT__485,13494
+#define __FUNCT__ __FUNCT__486,13511
+PetscErrorCode RGComputeContour(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)RGComputeContour503,13889
+#undef __FUNCT____FUNCT__523,14371
+#define __FUNCT__ __FUNCT__524,14388
+PetscErrorCode RGSetComplement(RG rg,PetscBool flg)RGSetComplement542,14803
+#undef __FUNCT____FUNCT__551,15022
+#define __FUNCT__ __FUNCT__552,15039
+PetscErrorCode RGGetComplement(RG rg,PetscBool *flg)RGGetComplement569,15342
+#undef __FUNCT____FUNCT__578,15546
+#define __FUNCT__ __FUNCT__579,15563
+PetscErrorCode RGSetScale(RG rg,PetscReal sfactor)RGSetScale597,15986
+#undef __FUNCT____FUNCT__610,16439
+#define __FUNCT__ __FUNCT__611,16456
+PetscErrorCode RGGetScale(RG rg,PetscReal *sfactor)RGGetScale627,16687
+#undef __FUNCT____FUNCT__636,16895
+#define __FUNCT__ __FUNCT__637,16912
+PetscErrorCode RGPushScale(RG rg,PetscReal sfactor)RGPushScale658,17434
+#undef __FUNCT____FUNCT__670,17973
+#define __FUNCT__ __FUNCT__671,17990
+PetscErrorCode RGPopScale(RG rg)RGPopScale684,18206
+#undef __FUNCT____FUNCT__694,18500
+#define __FUNCT__ __FUNCT__695,18517
+PetscErrorCode RGDestroy(RG *rg)RGDestroy708,18735
+#undef __FUNCT____FUNCT__721,19133
+#define __FUNCT__ __FUNCT__722,19150
+PetscErrorCode RGRegister(const char *name,PetscErrorCode (*function)(RG))RGRegister739,19526
 

 src/sys/classes/rg/interface/rgregis.c,129
 rgregis.c:^?rgregis.c^A,1
@@ -10418,18 +11507,18 @@ static PetscErrorCode MyShellMatCreate(Mat *A,Mat *M)MyShellMatCreate33,1318
 #undef __FUNCT____FUNCT__51,2118
 #define __FUNCT__ __FUNCT__52,2135
 int main(int argc,char **argv)main53,2160
-#undef __FUNCT____FUNCT__155,6116
-#define __FUNCT__ __FUNCT__156,6133
-static PetscErrorCode MatMult_Shell(Mat S,Vec x,Vec y)MatMult_Shell157,6167
-#undef __FUNCT____FUNCT__168,6419
-#define __FUNCT__ __FUNCT__169,6436
-static PetscErrorCode MatMultTranspose_Shell(Mat S,Vec x,Vec y)MatMultTranspose_Shell170,6479
-#undef __FUNCT____FUNCT__181,6749
-#define __FUNCT__ __FUNCT__182,6766
-static PetscErrorCode MatGetDiagonal_Shell(Mat S,Vec diag)MatGetDiagonal_Shell183,6807
-#undef __FUNCT____FUNCT__194,7071
-#define __FUNCT__ __FUNCT__195,7088
-static PetscErrorCode MatDuplicate_Shell(Mat S,MatDuplicateOption op,Mat *M)MatDuplicate_Shell196,7127
+#undef __FUNCT____FUNCT__155,6124
+#define __FUNCT__ __FUNCT__156,6141
+static PetscErrorCode MatMult_Shell(Mat S,Vec x,Vec y)MatMult_Shell157,6175
+#undef __FUNCT____FUNCT__168,6427
+#define __FUNCT__ __FUNCT__169,6444
+static PetscErrorCode MatMultTranspose_Shell(Mat S,Vec x,Vec y)MatMultTranspose_Shell170,6487
+#undef __FUNCT____FUNCT__181,6757
+#define __FUNCT__ __FUNCT__182,6774
+static PetscErrorCode MatGetDiagonal_Shell(Mat S,Vec diag)MatGetDiagonal_Shell183,6815
+#undef __FUNCT____FUNCT__194,7079
+#define __FUNCT__ __FUNCT__195,7096
+static PetscErrorCode MatDuplicate_Shell(Mat S,MatDuplicateOption op,Mat *M)MatDuplicate_Shell196,7135
 

 src/sys/classes/st/examples/tests/test2.c,181
 test2.c:^?test2.c^A,1
@@ -10452,7 +11541,7 @@ static char help[] = "Test ST with four matrices.\n\n";help22,924
 #define __FUNCT__ __FUNCT__27,1020
 int main(int argc,char **argv)main28,1045
 

-src/sys/classes/st/impls/cayley/cayley.c,2855
+src/sys/classes/st/impls/cayley/cayley.c,2859
 cayley.c:^?cayley.c^A,1
   PetscScalar nu;nu27,1054
   PetscBool   nu_set;nu_set28,1072
@@ -10476,39 +11565,39 @@ PetscErrorCode STBackTransform_Cayley(ST st,PetscInt n,PetscScalar *eigr,PetscSc
 #undef __FUNCT____FUNCT__134,3878
 #define __FUNCT__ __FUNCT__135,3895
 PetscErrorCode STPostSolve_Cayley(ST st)STPostSolve_Cayley136,3934
-#undef __FUNCT____FUNCT__153,4352
-#define __FUNCT__ __FUNCT__154,4369
-PetscErrorCode STSetUp_Cayley(ST st)STSetUp_Cayley155,4404
-#undef __FUNCT____FUNCT__194,6065
-#define __FUNCT__ __FUNCT__195,6082
-PetscErrorCode STSetShift_Cayley(ST st,PetscScalar newshift)STSetShift_Cayley196,6120
-#undef __FUNCT____FUNCT__224,7159
-#define __FUNCT__ __FUNCT__225,7176
-PetscErrorCode STSetFromOptions_Cayley(PetscOptions *PetscOptionsObject,ST st)STSetFromOptions_Cayley226,7220
-#undef __FUNCT____FUNCT__262,8492
-#define __FUNCT__ __FUNCT__263,8509
-static PetscErrorCode STCayleySetAntishift_Cayley(ST st,PetscScalar newshift)STCayleySetAntishift_Cayley264,8557
-#undef __FUNCT____FUNCT__278,8971
-#define __FUNCT__ __FUNCT__279,8988
-PetscErrorCode STCayleySetAntishift(ST st,PetscScalar nu)STCayleySetAntishift302,9613
-#undef __FUNCT____FUNCT__312,9931
-#define __FUNCT__ __FUNCT__313,9948
-static PetscErrorCode STCayleyGetAntishift_Cayley(ST st,PetscScalar *nu)STCayleyGetAntishift_Cayley314,9996
-#undef __FUNCT____FUNCT__323,10181
-#define __FUNCT__ __FUNCT__324,10198
-PetscErrorCode STCayleyGetAntishift(ST st,PetscScalar *nu)STCayleyGetAntishift341,10556
-#undef __FUNCT____FUNCT__352,10864
-#define __FUNCT__ __FUNCT__353,10881
-PetscErrorCode STView_Cayley(ST st,PetscViewer viewer)STView_Cayley354,10915
-#undef __FUNCT____FUNCT__366,11278
-#define __FUNCT__ __FUNCT__367,11295
-PetscErrorCode STReset_Cayley(ST st)STReset_Cayley368,11330
-#undef __FUNCT____FUNCT__378,11535
-#define __FUNCT__ __FUNCT__379,11552
-PetscErrorCode STDestroy_Cayley(ST st)STDestroy_Cayley380,11589
-#undef __FUNCT____FUNCT__391,11945
-#define __FUNCT__ __FUNCT__392,11962
-PETSC_EXTERN PetscErrorCode STCreate_Cayley(ST st)STCreate_Cayley393,11998
+#undef __FUNCT____FUNCT__153,4361
+#define __FUNCT__ __FUNCT__154,4378
+PetscErrorCode STSetUp_Cayley(ST st)STSetUp_Cayley155,4413
+#undef __FUNCT____FUNCT__195,6174
+#define __FUNCT__ __FUNCT__196,6191
+PetscErrorCode STSetShift_Cayley(ST st,PetscScalar newshift)STSetShift_Cayley197,6229
+#undef __FUNCT____FUNCT__222,7157
+#define __FUNCT__ __FUNCT__223,7174
+PetscErrorCode STSetFromOptions_Cayley(PetscOptionItems *PetscOptionsObject,ST st)STSetFromOptions_Cayley224,7218
+#undef __FUNCT____FUNCT__260,8494
+#define __FUNCT__ __FUNCT__261,8511
+static PetscErrorCode STCayleySetAntishift_Cayley(ST st,PetscScalar newshift)STCayleySetAntishift_Cayley262,8559
+#undef __FUNCT____FUNCT__276,8967
+#define __FUNCT__ __FUNCT__277,8984
+PetscErrorCode STCayleySetAntishift(ST st,PetscScalar nu)STCayleySetAntishift300,9609
+#undef __FUNCT____FUNCT__310,9927
+#define __FUNCT__ __FUNCT__311,9944
+static PetscErrorCode STCayleyGetAntishift_Cayley(ST st,PetscScalar *nu)STCayleyGetAntishift_Cayley312,9992
+#undef __FUNCT____FUNCT__321,10177
+#define __FUNCT__ __FUNCT__322,10194
+PetscErrorCode STCayleyGetAntishift(ST st,PetscScalar *nu)STCayleyGetAntishift339,10552
+#undef __FUNCT____FUNCT__350,10860
+#define __FUNCT__ __FUNCT__351,10877
+PetscErrorCode STView_Cayley(ST st,PetscViewer viewer)STView_Cayley352,10911
+#undef __FUNCT____FUNCT__368,11419
+#define __FUNCT__ __FUNCT__369,11436
+PetscErrorCode STReset_Cayley(ST st)STReset_Cayley370,11471
+#undef __FUNCT____FUNCT__380,11676
+#define __FUNCT__ __FUNCT__381,11693
+PetscErrorCode STDestroy_Cayley(ST st)STDestroy_Cayley382,11730
+#undef __FUNCT____FUNCT__393,12086
+#define __FUNCT__ __FUNCT__394,12103
+PETSC_EXTERN PetscErrorCode STCreate_Cayley(ST st)STCreate_Cayley395,12139
 

 src/sys/classes/st/impls/cayley/makefile,288
 makefile:^?makefile^A,1
@@ -10541,49 +11630,49 @@ DIRS     =DIRS30,1024
 MANSEC   = STMANSEC31,1035
 LOCDIR   = src/sys/classes/st/impls/precond/LOCDIR32,1049
 

-src/sys/classes/st/impls/precond/precond.c,2233
+src/sys/classes/st/impls/precond/precond.c,2237
 precond.c:^?precond.c^A,1
   PetscBool setmat;setmat27,1075
 } ST_PRECOND;ST_PRECOND28,1095
 #undef __FUNCT____FUNCT__30,1110
 #define __FUNCT__ __FUNCT__31,1127
-PetscErrorCode STSetFromOptions_Precond(PetscOptions *PetscOptionsObject,ST st)STSetFromOptions_Precond32,1172
-#undef __FUNCT____FUNCT__60,2078
-#define __FUNCT__ __FUNCT__61,2095
-PetscErrorCode STSetUp_Precond(ST st)STSetUp_Precond62,2131
-#undef __FUNCT____FUNCT__145,4965
-#define __FUNCT__ __FUNCT__146,4982
-PetscErrorCode STSetShift_Precond(ST st,PetscScalar newshift)STSetShift_Precond147,5021
-#undef __FUNCT____FUNCT__161,5390
-#define __FUNCT__ __FUNCT__162,5407
-static PetscErrorCode STPrecondGetMatForPC_Precond(ST st,Mat *mat)STPrecondGetMatForPC_Precond163,5456
-#undef __FUNCT____FUNCT__179,5901
-#define __FUNCT__ __FUNCT__180,5918
-PetscErrorCode STPrecondGetMatForPC(ST st,Mat *mat)STPrecondGetMatForPC197,6405
-#undef __FUNCT____FUNCT__208,6694
-#define __FUNCT__ __FUNCT__209,6711
-static PetscErrorCode STPrecondSetMatForPC_Precond(ST st,Mat mat)STPrecondSetMatForPC_Precond210,6760
-#undef __FUNCT____FUNCT__235,7634
-#define __FUNCT__ __FUNCT__236,7651
-PetscErrorCode STPrecondSetMatForPC(ST st,Mat mat)STPrecondSetMatForPC256,8327
-#undef __FUNCT____FUNCT__268,8667
-#define __FUNCT__ __FUNCT__269,8684
-static PetscErrorCode STPrecondSetKSPHasMat_Precond(ST st,PetscBool setmat)STPrecondSetKSPHasMat_Precond270,8734
-#undef __FUNCT____FUNCT__279,8933
-#define __FUNCT__ __FUNCT__280,8950
-PetscErrorCode STPrecondSetKSPHasMat(ST st,PetscBool setmat)STPrecondSetKSPHasMat301,9551
-#undef __FUNCT____FUNCT__312,9878
-#define __FUNCT__ __FUNCT__313,9895
-static PetscErrorCode STPrecondGetKSPHasMat_Precond(ST st,PetscBool *setmat)STPrecondGetKSPHasMat_Precond314,9945
-#undef __FUNCT____FUNCT__323,10146
-#define __FUNCT__ __FUNCT__324,10163
-PetscErrorCode STPrecondGetKSPHasMat(ST st,PetscBool *setmat)STPrecondGetKSPHasMat342,10582
-#undef __FUNCT____FUNCT__353,10894
-#define __FUNCT__ __FUNCT__354,10911
-PetscErrorCode STDestroy_Precond(ST st)STDestroy_Precond355,10949
-#undef __FUNCT____FUNCT__368,11504
-#define __FUNCT__ __FUNCT__369,11521
-PETSC_EXTERN PetscErrorCode STCreate_Precond(ST st)STCreate_Precond370,11558
+PetscErrorCode STSetFromOptions_Precond(PetscOptionItems *PetscOptionsObject,ST st)STSetFromOptions_Precond32,1172
+#undef __FUNCT____FUNCT__60,2082
+#define __FUNCT__ __FUNCT__61,2099
+PetscErrorCode STSetUp_Precond(ST st)STSetUp_Precond62,2135
+#undef __FUNCT____FUNCT__145,4969
+#define __FUNCT__ __FUNCT__146,4986
+PetscErrorCode STSetShift_Precond(ST st,PetscScalar newshift)STSetShift_Precond147,5025
+#undef __FUNCT____FUNCT__161,5388
+#define __FUNCT__ __FUNCT__162,5405
+static PetscErrorCode STPrecondGetMatForPC_Precond(ST st,Mat *mat)STPrecondGetMatForPC_Precond163,5454
+#undef __FUNCT____FUNCT__179,5899
+#define __FUNCT__ __FUNCT__180,5916
+PetscErrorCode STPrecondGetMatForPC(ST st,Mat *mat)STPrecondGetMatForPC197,6403
+#undef __FUNCT____FUNCT__208,6692
+#define __FUNCT__ __FUNCT__209,6709
+static PetscErrorCode STPrecondSetMatForPC_Precond(ST st,Mat mat)STPrecondSetMatForPC_Precond210,6758
+#undef __FUNCT____FUNCT__235,7632
+#define __FUNCT__ __FUNCT__236,7649
+PetscErrorCode STPrecondSetMatForPC(ST st,Mat mat)STPrecondSetMatForPC256,8325
+#undef __FUNCT____FUNCT__268,8665
+#define __FUNCT__ __FUNCT__269,8682
+static PetscErrorCode STPrecondSetKSPHasMat_Precond(ST st,PetscBool setmat)STPrecondSetKSPHasMat_Precond270,8732
+#undef __FUNCT____FUNCT__279,8931
+#define __FUNCT__ __FUNCT__280,8948
+PetscErrorCode STPrecondSetKSPHasMat(ST st,PetscBool setmat)STPrecondSetKSPHasMat301,9549
+#undef __FUNCT____FUNCT__312,9876
+#define __FUNCT__ __FUNCT__313,9893
+static PetscErrorCode STPrecondGetKSPHasMat_Precond(ST st,PetscBool *setmat)STPrecondGetKSPHasMat_Precond314,9943
+#undef __FUNCT____FUNCT__323,10144
+#define __FUNCT__ __FUNCT__324,10161
+PetscErrorCode STPrecondGetKSPHasMat(ST st,PetscBool *setmat)STPrecondGetKSPHasMat342,10580
+#undef __FUNCT____FUNCT__353,10892
+#define __FUNCT__ __FUNCT__354,10909
+PetscErrorCode STDestroy_Precond(ST st)STDestroy_Precond355,10947
+#undef __FUNCT____FUNCT__368,11502
+#define __FUNCT__ __FUNCT__369,11519
+PETSC_EXTERN PetscErrorCode STCreate_Precond(ST st)STCreate_Precond370,11556
 

 src/sys/classes/st/impls/shell/ftn-custom/makefile,271
 makefile:^?makefile^A,1
@@ -10625,7 +11714,7 @@ DIRS     =DIRS30,1022
 MANSEC   = STMANSEC31,1033
 LOCDIR   = src/sys/classes/st/impls/shell/LOCDIR32,1047
 

-src/sys/classes/st/impls/shell/shell.c,2830
+src/sys/classes/st/impls/shell/shell.c,2834
 shell.c:^?shell.c^A,1
   void           *ctx;                       /* user provided context */ctx29,1150
   PetscErrorCode (*apply)(ST,Vec,Vec);apply30,1223
@@ -10637,43 +11726,43 @@ shell.c:^?shell.c^A,1
 PetscErrorCode STShellGetContext(ST st,void **ctx)STShellGetContext55,1808
 #undef __FUNCT____FUNCT__69,2179
 #define __FUNCT__ __FUNCT__70,2196
-PetscErrorCode STShellSetContext(ST st,void *ctx)STShellSetContext87,2581
-#undef __FUNCT____FUNCT__102,2938
-#define __FUNCT__ __FUNCT__103,2955
-PetscErrorCode STApply_Shell(ST st,Vec x,Vec y)STApply_Shell104,2989
-#undef __FUNCT____FUNCT__119,3420
-#define __FUNCT__ __FUNCT__120,3437
-PetscErrorCode STApplyTranspose_Shell(ST st,Vec x,Vec y)STApplyTranspose_Shell121,3480
-#undef __FUNCT____FUNCT__136,3948
-#define __FUNCT__ __FUNCT__137,3965
-PetscErrorCode STBackTransform_Shell(ST st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)STBackTransform_Shell138,4007
-#undef __FUNCT____FUNCT__154,4428
-#define __FUNCT__ __FUNCT__155,4445
-PetscErrorCode STDestroy_Shell(ST st)STDestroy_Shell156,4481
-#undef __FUNCT____FUNCT__168,4936
-#define __FUNCT__ __FUNCT__169,4953
-static PetscErrorCode STShellSetApply_Shell(ST st,PetscErrorCode (*apply)(ST,Vec,Vec))STShellSetApply_Shell170,4995
-#undef __FUNCT____FUNCT__179,5201
-#define __FUNCT__ __FUNCT__180,5218
-static PetscErrorCode STShellSetApplyTranspose_Shell(ST st,PetscErrorCode (*applytrans)(ST,Vec,Vec))STShellSetApplyTranspose_Shell181,5269
-#undef __FUNCT____FUNCT__190,5499
-#define __FUNCT__ __FUNCT__191,5516
-static PetscErrorCode STShellSetBackTransform_Shell(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))STShellSetBackTransform_Shell192,5566
-#undef __FUNCT____FUNCT__201,5817
-#define __FUNCT__ __FUNCT__202,5834
-PetscErrorCode STShellSetApply(ST st,PetscErrorCode (*apply)(ST,Vec,Vec))STShellSetApply226,6441
-#undef __FUNCT____FUNCT__236,6747
-#define __FUNCT__ __FUNCT__237,6764
-PetscErrorCode STShellSetApplyTranspose(ST st,PetscErrorCode (*applytrans)(ST,Vec,Vec))STShellSetApplyTranspose261,7401
-#undef __FUNCT____FUNCT__271,7735
-#define __FUNCT__ __FUNCT__272,7752
-PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))STShellSetBackTransform297,8471
-#undef __FUNCT____FUNCT__307,8849
-#define __FUNCT__ __FUNCT__308,8866
-PetscErrorCode STSetFromOptions_Shell(PetscOptions *PetscOptionsObject,ST st)STSetFromOptions_Shell309,8909
-#undef __FUNCT____FUNCT__354,10420
-#define __FUNCT__ __FUNCT__355,10437
-PETSC_EXTERN PetscErrorCode STCreate_Shell(ST st)STCreate_Shell356,10472
+PetscErrorCode STShellSetContext(ST st,void *ctx)STShellSetContext89,2654
+#undef __FUNCT____FUNCT__102,3001
+#define __FUNCT__ __FUNCT__103,3018
+PetscErrorCode STApply_Shell(ST st,Vec x,Vec y)STApply_Shell104,3052
+#undef __FUNCT____FUNCT__122,3786
+#define __FUNCT__ __FUNCT__123,3803
+PetscErrorCode STApplyTranspose_Shell(ST st,Vec x,Vec y)STApplyTranspose_Shell124,3846
+#undef __FUNCT____FUNCT__142,4609
+#define __FUNCT__ __FUNCT__143,4626
+PetscErrorCode STBackTransform_Shell(ST st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)STBackTransform_Shell144,4668
+#undef __FUNCT____FUNCT__154,5029
+#define __FUNCT__ __FUNCT__155,5046
+PetscErrorCode STDestroy_Shell(ST st)STDestroy_Shell156,5082
+#undef __FUNCT____FUNCT__168,5537
+#define __FUNCT__ __FUNCT__169,5554
+static PetscErrorCode STShellSetApply_Shell(ST st,PetscErrorCode (*apply)(ST,Vec,Vec))STShellSetApply_Shell170,5596
+#undef __FUNCT____FUNCT__179,5802
+#define __FUNCT__ __FUNCT__180,5819
+static PetscErrorCode STShellSetApplyTranspose_Shell(ST st,PetscErrorCode (*applytrans)(ST,Vec,Vec))STShellSetApplyTranspose_Shell181,5870
+#undef __FUNCT____FUNCT__190,6100
+#define __FUNCT__ __FUNCT__191,6117
+static PetscErrorCode STShellSetBackTransform_Shell(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))STShellSetBackTransform_Shell192,6167
+#undef __FUNCT____FUNCT__201,6418
+#define __FUNCT__ __FUNCT__202,6435
+PetscErrorCode STShellSetApply(ST st,PetscErrorCode (*apply)(ST,Vec,Vec))STShellSetApply226,7042
+#undef __FUNCT____FUNCT__236,7348
+#define __FUNCT__ __FUNCT__237,7365
+PetscErrorCode STShellSetApplyTranspose(ST st,PetscErrorCode (*applytrans)(ST,Vec,Vec))STShellSetApplyTranspose261,8002
+#undef __FUNCT____FUNCT__271,8336
+#define __FUNCT__ __FUNCT__272,8353
+PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))STShellSetBackTransform297,9072
+#undef __FUNCT____FUNCT__307,9450
+#define __FUNCT__ __FUNCT__308,9467
+PetscErrorCode STSetFromOptions_Shell(PetscOptionItems *PetscOptionsObject,ST st)STSetFromOptions_Shell309,9510
+#undef __FUNCT____FUNCT__354,11025
+#define __FUNCT__ __FUNCT__355,11042
+PETSC_EXTERN PetscErrorCode STCreate_Shell(ST st)STCreate_Shell356,11077
 

 src/sys/classes/st/impls/shift/makefile,285
 makefile:^?makefile^A,1
@@ -10687,7 +11776,7 @@ DIRS     =DIRS30,1022
 MANSEC   = STMANSEC31,1033
 LOCDIR   = src/sys/classes/st/impls/shift/LOCDIR32,1047
 

-src/sys/classes/st/impls/shift/shift.c,1255
+src/sys/classes/st/impls/shift/shift.c,1259
 shift.c:^?shift.c^A,1
 #undef __FUNCT____FUNCT__27,1082
 #define __FUNCT__ __FUNCT__28,1099
@@ -10701,18 +11790,18 @@ PetscErrorCode STBackTransform_Shift(ST st,PetscInt n,PetscScalar *eigr,PetscSca
 #undef __FUNCT____FUNCT__76,2330
 #define __FUNCT__ __FUNCT__77,2347
 PetscErrorCode STPostSolve_Shift(ST st)STPostSolve_Shift78,2385
-#undef __FUNCT____FUNCT__95,2802
-#define __FUNCT__ __FUNCT__96,2819
-PetscErrorCode STSetUp_Shift(ST st)STSetUp_Shift97,2853
-#undef __FUNCT____FUNCT__139,4260
-#define __FUNCT__ __FUNCT__140,4277
-PetscErrorCode STSetShift_Shift(ST st,PetscScalar newshift)STSetShift_Shift141,4314
-#undef __FUNCT____FUNCT__168,5236
-#define __FUNCT__ __FUNCT__169,5253
-PetscErrorCode STSetFromOptions_Shift(PetscOptions *PetscOptionsObject,ST st)STSetFromOptions_Shift170,5296
-#undef __FUNCT____FUNCT__196,6150
-#define __FUNCT__ __FUNCT__197,6167
-PETSC_EXTERN PetscErrorCode STCreate_Shift(ST st)STCreate_Shift198,6202
+#undef __FUNCT____FUNCT__95,2811
+#define __FUNCT__ __FUNCT__96,2828
+PetscErrorCode STSetUp_Shift(ST st)STSetUp_Shift97,2862
+#undef __FUNCT____FUNCT__142,4447
+#define __FUNCT__ __FUNCT__143,4464
+PetscErrorCode STSetShift_Shift(ST st,PetscScalar newshift)STSetShift_Shift144,4501
+#undef __FUNCT____FUNCT__168,5312
+#define __FUNCT__ __FUNCT__169,5329
+PetscErrorCode STSetFromOptions_Shift(PetscOptionItems *PetscOptionsObject,ST st)STSetFromOptions_Shift170,5372
+#undef __FUNCT____FUNCT__196,6230
+#define __FUNCT__ __FUNCT__197,6247
+PETSC_EXTERN PetscErrorCode STCreate_Shift(ST st)STCreate_Shift198,6282
 

 src/sys/classes/st/impls/sinvert/makefile,290
 makefile:^?makefile^A,1
@@ -10726,7 +11815,7 @@ DIRS     =DIRS30,1024
 MANSEC   = STMANSEC31,1035
 LOCDIR   = src/sys/classes/st/impls/sinvert/LOCDIR32,1049
 

-src/sys/classes/st/impls/sinvert/sinvert.c,1290
+src/sys/classes/st/impls/sinvert/sinvert.c,1294
 sinvert.c:^?sinvert.c^A,1
 #undef __FUNCT____FUNCT__26,1033
 #define __FUNCT__ __FUNCT__27,1050
@@ -10740,18 +11829,18 @@ PetscErrorCode STBackTransform_Sinvert(ST st,PetscInt n,PetscScalar *eigr,PetscS
 #undef __FUNCT____FUNCT__89,2632
 #define __FUNCT__ __FUNCT__90,2649
 PetscErrorCode STPostSolve_Sinvert(ST st)STPostSolve_Sinvert91,2689
-#undef __FUNCT____FUNCT__108,3108
-#define __FUNCT__ __FUNCT__109,3125
-PetscErrorCode STSetUp_Sinvert(ST st)STSetUp_Sinvert110,3161
-#undef __FUNCT____FUNCT__152,4627
-#define __FUNCT__ __FUNCT__153,4644
-PetscErrorCode STSetShift_Sinvert(ST st,PetscScalar newshift)STSetShift_Sinvert154,4683
-#undef __FUNCT____FUNCT__190,5972
-#define __FUNCT__ __FUNCT__191,5989
-PetscErrorCode STSetFromOptions_Sinvert(PetscOptions *PetscOptionsObject,ST st)STSetFromOptions_Sinvert192,6034
-#undef __FUNCT____FUNCT__218,6890
-#define __FUNCT__ __FUNCT__219,6907
-PETSC_EXTERN PetscErrorCode STCreate_Sinvert(ST st)STCreate_Sinvert220,6944
+#undef __FUNCT____FUNCT__108,3117
+#define __FUNCT__ __FUNCT__109,3134
+PetscErrorCode STSetUp_Sinvert(ST st)STSetUp_Sinvert110,3170
+#undef __FUNCT____FUNCT__155,4814
+#define __FUNCT__ __FUNCT__156,4831
+PetscErrorCode STSetShift_Sinvert(ST st,PetscScalar newshift)STSetShift_Sinvert157,4870
+#undef __FUNCT____FUNCT__191,6049
+#define __FUNCT__ __FUNCT__192,6066
+PetscErrorCode STSetFromOptions_Sinvert(PetscOptionItems *PetscOptionsObject,ST st)STSetFromOptions_Sinvert193,6111
+#undef __FUNCT____FUNCT__219,6971
+#define __FUNCT__ __FUNCT__220,6988
+PETSC_EXTERN PetscErrorCode STCreate_Sinvert(ST st)STCreate_Sinvert221,7025
 

 src/sys/classes/st/interface/ftn-custom/makefile,267
 makefile:^?makefile^A,1
@@ -10785,7 +11874,7 @@ DIRS     =DIRS30,1073
 MANSEC   = STMANSEC31,1084
 LOCDIR   = src/sys/classes/st/interface/LOCDIR32,1098
 

-src/sys/classes/st/interface/stfunc.c,5116
+src/sys/classes/st/interface/stfunc.c,5118
 stfunc.c:^?stfunc.c^A,1
 PetscClassId     ST_CLASSID = 0;ST_CLASSID26,1067
 PetscLogEvent    ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0,ST_MatSetUp = 0,ST_MatMult = 0,ST_MatMultTranspose = 0,ST_MatSolve = 0,ST_MatSolveTranspose = 0;ST_SetUp27,1100
@@ -10803,69 +11892,69 @@ PetscErrorCode STFinalizePackage(void)STFinalizePackage40,1565
 #undef __FUNCT____FUNCT__51,1815
 #define __FUNCT__ __FUNCT__52,1832
 PetscErrorCode STInitializePackage(void)STInitializePackage62,2156
-#undef __FUNCT____FUNCT__105,4004
-#define __FUNCT__ __FUNCT__106,4021
-PetscErrorCode STReset(ST st)STReset119,4256
-#undef __FUNCT____FUNCT__134,4719
-#define __FUNCT__ __FUNCT__135,4736
-PetscErrorCode STDestroy(ST *st)STDestroy148,4982
-#undef __FUNCT____FUNCT__167,5684
-#define __FUNCT__ __FUNCT__168,5701
-PetscErrorCode STCreate(MPI_Comm comm,ST *newst)STCreate184,6021
-#undef __FUNCT____FUNCT__218,6888
-#define __FUNCT__ __FUNCT__219,6905
-PetscErrorCode STSetOperators(ST st,PetscInt n,Mat A[])STSetOperators238,7436
-#undef __FUNCT____FUNCT__270,8656
-#define __FUNCT__ __FUNCT__271,8673
-PetscErrorCode STGetOperators(ST st,PetscInt k,Mat *A)STGetOperators288,9118
-#undef __FUNCT____FUNCT__301,9649
-#define __FUNCT__ __FUNCT__302,9666
-PetscErrorCode STGetTOperators(ST st,PetscInt k,Mat *T)STGetTOperators319,10113
-#undef __FUNCT____FUNCT__332,10589
-#define __FUNCT__ __FUNCT__333,10606
-PetscErrorCode STGetNumMatrices(ST st,PetscInt *n)STGetNumMatrices349,10938
-#undef __FUNCT____FUNCT__358,11130
-#define __FUNCT__ __FUNCT__359,11147
-PetscErrorCode STSetShift(ST st,PetscScalar shift)STSetShift380,11740
-#undef __FUNCT____FUNCT__397,12139
-#define __FUNCT__ __FUNCT__398,12156
-PetscErrorCode STGetShift(ST st,PetscScalar* shift)STGetShift414,12459
-#undef __FUNCT____FUNCT__423,12667
-#define __FUNCT__ __FUNCT__424,12684
-PetscErrorCode STSetDefaultShift(ST st,PetscScalar defaultshift)STSetDefaultShift439,13032
-#undef __FUNCT____FUNCT__448,13282
-#define __FUNCT__ __FUNCT__449,13299
-PetscErrorCode STScaleShift(ST st,PetscScalar factor)STScaleShift467,13678
-#undef __FUNCT____FUNCT__476,13903
-#define __FUNCT__ __FUNCT__477,13920
-PetscErrorCode STSetBalanceMatrix(ST st,Vec D)STSetBalanceMatrix497,14487
-#undef __FUNCT____FUNCT__512,14873
-#define __FUNCT__ __FUNCT__513,14890
-PetscErrorCode STGetBalanceMatrix(ST st,Vec *D)STGetBalanceMatrix532,15366
-#undef __FUNCT____FUNCT__541,15552
-#define __FUNCT__ __FUNCT__542,15569
-PetscErrorCode STMatCreateVecs(ST st,Vec *right,Vec *left)STMatCreateVecs557,15960
-#undef __FUNCT____FUNCT__567,16180
-#define __FUNCT__ __FUNCT__568,16197
-PetscErrorCode STMatGetSize(ST st,PetscInt *m,PetscInt *n)STMatGetSize583,16512
-#undef __FUNCT____FUNCT__593,16722
-#define __FUNCT__ __FUNCT__594,16739
-PetscErrorCode STMatGetLocalSize(ST st,PetscInt *m,PetscInt *n)STMatGetLocalSize609,17068
-#undef __FUNCT____FUNCT__619,17289
-#define __FUNCT__ __FUNCT__620,17306
-PetscErrorCode STSetOptionsPrefix(ST st,const char *prefix)STSetOptionsPrefix640,17857
-#undef __FUNCT____FUNCT__653,18301
-#define __FUNCT__ __FUNCT__654,18318
-PetscErrorCode STAppendOptionsPrefix(ST st,const char *prefix)STAppendOptionsPrefix674,18878
-#undef __FUNCT____FUNCT__687,19347
-#define __FUNCT__ __FUNCT__688,19364
-PetscErrorCode STGetOptionsPrefix(ST st,const char *prefix[])STGetOptionsPrefix708,19872
-#undef __FUNCT____FUNCT__719,20163
-#define __FUNCT__ __FUNCT__720,20180
-PetscErrorCode STView(ST st,PetscViewer viewer)STView745,20878
-#undef __FUNCT____FUNCT__808,23653
-#define __FUNCT__ __FUNCT__809,23670
-PetscErrorCode STRegister(const char *name,PetscErrorCode (*function)(ST))STRegister837,24308
+#undef __FUNCT____FUNCT__105,4006
+#define __FUNCT__ __FUNCT__106,4023
+PetscErrorCode STReset(ST st)STReset119,4258
+#undef __FUNCT____FUNCT__134,4730
+#define __FUNCT__ __FUNCT__135,4747
+PetscErrorCode STDestroy(ST *st)STDestroy148,4993
+#undef __FUNCT____FUNCT__167,5695
+#define __FUNCT__ __FUNCT__168,5712
+PetscErrorCode STCreate(MPI_Comm comm,ST *newst)STCreate184,6032
+#undef __FUNCT____FUNCT__218,6914
+#define __FUNCT__ __FUNCT__219,6931
+PetscErrorCode STSetOperators(ST st,PetscInt n,Mat A[])STSetOperators238,7462
+#undef __FUNCT____FUNCT__282,9026
+#define __FUNCT__ __FUNCT__283,9043
+PetscErrorCode STGetOperators(ST st,PetscInt k,Mat *A)STGetOperators300,9488
+#undef __FUNCT____FUNCT__313,10019
+#define __FUNCT__ __FUNCT__314,10036
+PetscErrorCode STGetTOperators(ST st,PetscInt k,Mat *T)STGetTOperators331,10483
+#undef __FUNCT____FUNCT__344,10959
+#define __FUNCT__ __FUNCT__345,10976
+PetscErrorCode STGetNumMatrices(ST st,PetscInt *n)STGetNumMatrices361,11308
+#undef __FUNCT____FUNCT__370,11500
+#define __FUNCT__ __FUNCT__371,11517
+PetscErrorCode STSetShift(ST st,PetscScalar shift)STSetShift392,12110
+#undef __FUNCT____FUNCT__409,12538
+#define __FUNCT__ __FUNCT__410,12555
+PetscErrorCode STGetShift(ST st,PetscScalar* shift)STGetShift426,12858
+#undef __FUNCT____FUNCT__435,13066
+#define __FUNCT__ __FUNCT__436,13083
+PetscErrorCode STSetDefaultShift(ST st,PetscScalar defaultshift)STSetDefaultShift451,13431
+#undef __FUNCT____FUNCT__460,13681
+#define __FUNCT__ __FUNCT__461,13698
+PetscErrorCode STScaleShift(ST st,PetscScalar factor)STScaleShift479,14077
+#undef __FUNCT____FUNCT__488,14302
+#define __FUNCT__ __FUNCT__489,14319
+PetscErrorCode STSetBalanceMatrix(ST st,Vec D)STSetBalanceMatrix509,14886
+#undef __FUNCT____FUNCT__524,15281
+#define __FUNCT__ __FUNCT__525,15298
+PetscErrorCode STGetBalanceMatrix(ST st,Vec *D)STGetBalanceMatrix544,15774
+#undef __FUNCT____FUNCT__553,15960
+#define __FUNCT__ __FUNCT__554,15977
+PetscErrorCode STMatCreateVecs(ST st,Vec *right,Vec *left)STMatCreateVecs569,16368
+#undef __FUNCT____FUNCT__579,16588
+#define __FUNCT__ __FUNCT__580,16605
+PetscErrorCode STMatGetSize(ST st,PetscInt *m,PetscInt *n)STMatGetSize595,16920
+#undef __FUNCT____FUNCT__605,17130
+#define __FUNCT__ __FUNCT__606,17147
+PetscErrorCode STMatGetLocalSize(ST st,PetscInt *m,PetscInt *n)STMatGetLocalSize621,17476
+#undef __FUNCT____FUNCT__631,17697
+#define __FUNCT__ __FUNCT__632,17714
+PetscErrorCode STSetOptionsPrefix(ST st,const char *prefix)STSetOptionsPrefix652,18265
+#undef __FUNCT____FUNCT__665,18709
+#define __FUNCT__ __FUNCT__666,18726
+PetscErrorCode STAppendOptionsPrefix(ST st,const char *prefix)STAppendOptionsPrefix686,19286
+#undef __FUNCT____FUNCT__699,19755
+#define __FUNCT__ __FUNCT__700,19772
+PetscErrorCode STGetOptionsPrefix(ST st,const char *prefix[])STGetOptionsPrefix721,20282
+#undef __FUNCT____FUNCT__732,20573
+#define __FUNCT__ __FUNCT__733,20590
+PetscErrorCode STView(ST st,PetscViewer viewer)STView758,21288
+#undef __FUNCT____FUNCT__821,24063
+#define __FUNCT__ __FUNCT__822,24080
+PetscErrorCode STRegister(const char *name,PetscErrorCode (*function)(ST))STRegister850,24718
 

 src/sys/classes/st/interface/stregis.c,129
 stregis.c:^?stregis.c^A,1
@@ -10880,30 +11969,30 @@ PetscFunctionList STList = 0;STList27,1082
 #undef __FUNCT____FUNCT__29,1113
 #define __FUNCT__ __FUNCT__30,1130
 PetscErrorCode STSetType(ST st,STType type)STSetType58,1871
-#undef __FUNCT____FUNCT__82,2677
-#define __FUNCT__ __FUNCT__83,2694
-PetscErrorCode STGetType(ST st,STType *type)STGetType100,3005
-#undef __FUNCT____FUNCT__109,3217
-#define __FUNCT__ __FUNCT__110,3234
-PetscErrorCode STSetFromOptions(ST st)STSetFromOptions123,3565
-#undef __FUNCT____FUNCT__177,5844
-#define __FUNCT__ __FUNCT__178,5861
-PetscErrorCode STSetMatStructure(ST st,MatStructure str)STSetMatStructure207,6893
-#undef __FUNCT____FUNCT__224,7367
-#define __FUNCT__ __FUNCT__225,7384
-PetscErrorCode STGetMatStructure(ST st,MatStructure *str)STGetMatStructure243,7860
-#undef __FUNCT____FUNCT__252,8062
-#define __FUNCT__ __FUNCT__253,8079
-PetscErrorCode STSetMatMode(ST st,STMatMode mode)STSetMatMode292,9646
-#undef __FUNCT____FUNCT__302,9890
-#define __FUNCT__ __FUNCT__303,9907
-PetscErrorCode STGetMatMode(ST st,STMatMode *mode)STGetMatMode320,10256
-#undef __FUNCT____FUNCT__329,10462
-#define __FUNCT__ __FUNCT__330,10479
-PetscErrorCode STSetTransform(ST st,PetscBool flg)STSetTransform354,11226
-#undef __FUNCT____FUNCT__366,11504
-#define __FUNCT__ __FUNCT__367,11521
-PetscErrorCode STGetTransform(ST st,PetscBool *flg)STGetTransform384,11846
+#undef __FUNCT____FUNCT__82,2686
+#define __FUNCT__ __FUNCT__83,2703
+PetscErrorCode STGetType(ST st,STType *type)STGetType100,3014
+#undef __FUNCT____FUNCT__109,3226
+#define __FUNCT__ __FUNCT__110,3243
+PetscErrorCode STSetFromOptions(ST st)STSetFromOptions123,3574
+#undef __FUNCT____FUNCT__177,5872
+#define __FUNCT__ __FUNCT__178,5889
+PetscErrorCode STSetMatStructure(ST st,MatStructure str)STSetMatStructure207,6921
+#undef __FUNCT____FUNCT__224,7395
+#define __FUNCT__ __FUNCT__225,7412
+PetscErrorCode STGetMatStructure(ST st,MatStructure *str)STGetMatStructure243,7888
+#undef __FUNCT____FUNCT__252,8090
+#define __FUNCT__ __FUNCT__253,8107
+PetscErrorCode STSetMatMode(ST st,STMatMode mode)STSetMatMode292,9674
+#undef __FUNCT____FUNCT__302,9927
+#define __FUNCT__ __FUNCT__303,9944
+PetscErrorCode STGetMatMode(ST st,STMatMode *mode)STGetMatMode320,10293
+#undef __FUNCT____FUNCT__329,10499
+#define __FUNCT__ __FUNCT__330,10516
+PetscErrorCode STSetTransform(ST st,PetscBool flg)STSetTransform354,11263
+#undef __FUNCT____FUNCT__366,11550
+#define __FUNCT__ __FUNCT__367,11567
+PetscErrorCode STGetTransform(ST st,PetscBool *flg)STGetTransform384,11892
 

 src/sys/classes/st/interface/stshellmat.c,1229
 stshellmat.c:^?stshellmat.c^A,1
@@ -10938,69 +12027,69 @@ stsles.c:^?stsles.c^A,1
 #undef __FUNCT____FUNCT__27,1095
 #define __FUNCT__ __FUNCT__28,1112
 PetscErrorCode STMatMult(ST st,PetscInt k,Vec x,Vec y)STMatMult47,1524
-#undef __FUNCT____FUNCT__75,2544
-#define __FUNCT__ __FUNCT__76,2561
-PetscErrorCode STMatMultTranspose(ST st,PetscInt k,Vec x,Vec y)STMatMultTranspose95,2983
-#undef __FUNCT____FUNCT__123,4039
-#define __FUNCT__ __FUNCT__124,4056
-PetscErrorCode STMatSolve(ST st,Vec b,Vec x)STMatSolve142,4456
-#undef __FUNCT____FUNCT__174,5650
-#define __FUNCT__ __FUNCT__175,5667
-PetscErrorCode STMatSolveTranspose(ST st,Vec b,Vec x)STMatSolveTranspose193,6077
-#undef __FUNCT____FUNCT__225,7307
-#define __FUNCT__ __FUNCT__226,7324
-PetscErrorCode STMatSetHermitian(ST st,Mat M)STMatSetHermitian234,7514
-#undef __FUNCT____FUNCT__257,8169
-#define __FUNCT__ __FUNCT__258,8186
-PetscErrorCode STCheckFactorPackage(ST st)STCheckFactorPackage259,8227
-#undef __FUNCT____FUNCT__279,9057
-#define __FUNCT__ __FUNCT__280,9074
-PetscErrorCode STSetKSP(ST st,KSP ksp)STSetKSP294,9339
-#undef __FUNCT____FUNCT__309,9789
-#define __FUNCT__ __FUNCT__310,9806
-PetscErrorCode STGetKSP(ST st,KSP* ksp)STGetKSP331,10276
-#undef __FUNCT____FUNCT__350,11022
-#define __FUNCT__ __FUNCT__351,11039
-PetscErrorCode STCheckNullSpace_Default(ST st,BV V)STCheckNullSpace_Default352,11084
-#undef __FUNCT____FUNCT__394,12467
-#define __FUNCT__ __FUNCT__395,12484
-PetscErrorCode STCheckNullSpace(ST st,BV V)STCheckNullSpace416,13120
-

-src/sys/classes/st/interface/stsolve.c,1764
+#undef __FUNCT____FUNCT__75,2553
+#define __FUNCT__ __FUNCT__76,2570
+PetscErrorCode STMatMultTranspose(ST st,PetscInt k,Vec x,Vec y)STMatMultTranspose95,2992
+#undef __FUNCT____FUNCT__123,4057
+#define __FUNCT__ __FUNCT__124,4074
+PetscErrorCode STMatSolve(ST st,Vec b,Vec x)STMatSolve142,4474
+#undef __FUNCT____FUNCT__174,5677
+#define __FUNCT__ __FUNCT__175,5694
+PetscErrorCode STMatSolveTranspose(ST st,Vec b,Vec x)STMatSolveTranspose193,6104
+#undef __FUNCT____FUNCT__225,7343
+#define __FUNCT__ __FUNCT__226,7360
+PetscErrorCode STMatSetHermitian(ST st,Mat M)STMatSetHermitian234,7550
+#undef __FUNCT____FUNCT__257,8205
+#define __FUNCT__ __FUNCT__258,8222
+PetscErrorCode STCheckFactorPackage(ST st)STCheckFactorPackage259,8263
+#undef __FUNCT____FUNCT__279,9093
+#define __FUNCT__ __FUNCT__280,9110
+PetscErrorCode STSetKSP(ST st,KSP ksp)STSetKSP293,9374
+#undef __FUNCT____FUNCT__308,9824
+#define __FUNCT__ __FUNCT__309,9841
+PetscErrorCode STGetKSP(ST st,KSP* ksp)STGetKSP324,10126
+#undef __FUNCT____FUNCT__343,10872
+#define __FUNCT__ __FUNCT__344,10889
+PetscErrorCode STCheckNullSpace_Default(ST st,BV V)STCheckNullSpace_Default345,10934
+#undef __FUNCT____FUNCT__387,12317
+#define __FUNCT__ __FUNCT__388,12334
+PetscErrorCode STCheckNullSpace(ST st,BV V)STCheckNullSpace409,12970
+

+src/sys/classes/st/interface/stsolve.c,1766
 stsolve.c:^?stsolve.c^A,1
 #undef __FUNCT____FUNCT__26,1067
 #define __FUNCT__ __FUNCT__27,1084
-PetscErrorCode STApply(ST st,Vec x,Vec y)STApply46,1514
-#undef __FUNCT____FUNCT__76,2589
-#define __FUNCT__ __FUNCT__77,2606
-PetscErrorCode STApplyTranspose(ST st,Vec x,Vec y)STApplyTranspose96,3039
-#undef __FUNCT____FUNCT__126,4161
-#define __FUNCT__ __FUNCT__127,4178
-PetscErrorCode STGetBilinearForm(ST st,Mat *B)STGetBilinearForm146,4649
-#undef __FUNCT____FUNCT__159,4951
-#define __FUNCT__ __FUNCT__160,4968
-PetscErrorCode STGetBilinearForm_Default(ST st,Mat *B)STGetBilinearForm_Default161,5014
-#undef __FUNCT____FUNCT__174,5272
-#define __FUNCT__ __FUNCT__175,5289
-PetscErrorCode STComputeExplicitOperator(ST st,Mat *mat)STComputeExplicitOperator200,6016
-#undef __FUNCT____FUNCT__254,8107
-#define __FUNCT__ __FUNCT__255,8124
-PetscErrorCode STSetUp(ST st)STSetUp268,8376
-#undef __FUNCT____FUNCT__311,9980
-#define __FUNCT__ __FUNCT__312,9997
-PetscErrorCode STMatMAXPY_Private(ST st,PetscScalar alpha,PetscScalar beta,PetscInt k,PetscScalar *coeffs,PetscBool initial,Mat *S)STMatMAXPY_Private323,10443
-#undef __FUNCT____FUNCT__403,13210
-#define __FUNCT__ __FUNCT__404,13227
-PetscErrorCode STCoeffs_Monomial(ST st, PetscScalar *coeffs)STCoeffs_Monomial409,13380
-#undef __FUNCT____FUNCT__426,13814
-#define __FUNCT__ __FUNCT__427,13831
-PetscErrorCode STPostSolve(ST st)STPostSolve441,14150
-#undef __FUNCT____FUNCT__454,14414
-#define __FUNCT__ __FUNCT__455,14431
-PetscErrorCode STBackTransform(ST st,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)STBackTransform470,14863
-#undef __FUNCT____FUNCT__483,15198
-#define __FUNCT__ __FUNCT__484,15215
-PetscErrorCode STMatSetUp(ST st,PetscScalar sigma,PetscScalar *coeffs)STMatSetUp507,15819
+PetscErrorCode STApply(ST st,Vec x,Vec y)STApply46,1515
+#undef __FUNCT____FUNCT__76,2599
+#define __FUNCT__ __FUNCT__77,2616
+PetscErrorCode STApplyTranspose(ST st,Vec x,Vec y)STApplyTranspose96,3050
+#undef __FUNCT____FUNCT__126,4181
+#define __FUNCT__ __FUNCT__127,4198
+PetscErrorCode STGetBilinearForm(ST st,Mat *B)STGetBilinearForm146,4669
+#undef __FUNCT____FUNCT__159,4971
+#define __FUNCT__ __FUNCT__160,4988
+PetscErrorCode STGetBilinearForm_Default(ST st,Mat *B)STGetBilinearForm_Default161,5034
+#undef __FUNCT____FUNCT__174,5292
+#define __FUNCT__ __FUNCT__175,5309
+PetscErrorCode STComputeExplicitOperator(ST st,Mat *mat)STComputeExplicitOperator200,6036
+#undef __FUNCT____FUNCT__254,8127
+#define __FUNCT__ __FUNCT__255,8144
+PetscErrorCode STSetUp(ST st)STSetUp268,8396
+#undef __FUNCT____FUNCT__311,10087
+#define __FUNCT__ __FUNCT__312,10104
+PetscErrorCode STMatMAXPY_Private(ST st,PetscScalar alpha,PetscScalar beta,PetscInt k,PetscScalar *coeffs,PetscBool initial,Mat *S)STMatMAXPY_Private323,10550
+#undef __FUNCT____FUNCT__404,13407
+#define __FUNCT__ __FUNCT__405,13424
+PetscErrorCode STCoeffs_Monomial(ST st, PetscScalar *coeffs)STCoeffs_Monomial410,13577
+#undef __FUNCT____FUNCT__427,14011
+#define __FUNCT__ __FUNCT__428,14028
+PetscErrorCode STPostSolve(ST st)STPostSolve442,14347
+#undef __FUNCT____FUNCT__455,14611
+#define __FUNCT__ __FUNCT__456,14628
+PetscErrorCode STBackTransform(ST st,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)STBackTransform471,15060
+#undef __FUNCT____FUNCT__484,15395
+#define __FUNCT__ __FUNCT__485,15412
+PetscErrorCode STMatSetUp(ST st,PetscScalar sigma,PetscScalar *coeffs)STMatSetUp508,16016
 

 src/sys/classes/st/makefile,223
 makefile:^?makefile^A,1
@@ -11045,17 +12134,17 @@ slepcsysmod.F:^?slepcsysmod.F^A,1
         module slepcstdefslepcstdef72,2110
         module slepcstslepcst78,2265
 

-src/sys/ftn-custom/makefile,343
+src/sys/ftn-custom/makefile,356
 makefile:^?makefile^A,1
 CFLAGS   = -DSLEPC_LIB_DIR='"${SLEPC_DESTDIR}/lib"'CFLAGS24,974
 FFLAGS   =FFLAGS25,1026
-SOURCEC  = zslepc_start.c zslepc_startf.cSOURCEC26,1037
-SOURCEF  =SOURCEF27,1079
-SOURCEH  =SOURCEH28,1090
-DIRS     =DIRS29,1101
-LIBBASE  = libslepcsysLIBBASE30,1112
-MANSEC   = sysMANSEC31,1135
-LOCDIR   = src/sys/ftn-custom/LOCDIR32,1150
+SOURCEC  = zslepcutil.c zslepc_start.c zslepc_startf.cSOURCEC26,1037
+SOURCEF  =SOURCEF27,1092
+SOURCEH  =SOURCEH28,1103
+DIRS     =DIRS29,1114
+LIBBASE  = libslepcsysLIBBASE30,1125
+MANSEC   = sysMANSEC31,1148
+LOCDIR   = src/sys/ftn-custom/LOCDIR32,1163
 

 src/sys/ftn-custom/zslepc_start.c,351
 zslepc_start.c:^?zslepc_start.c^A,1
@@ -11066,6 +12155,11 @@ zslepc_startf.c:^?zslepc_startf.c^A,1
 PetscErrorCode SlepcInitializeFortran(void)SlepcInitializeFortran50,1808
 PETSC_EXTERN void PETSC_STDCALL slepcinitializefortran_(PetscErrorCode *info)slepcinitializefortran_56,1897
 

+src/sys/ftn-custom/zslepcutil.c,559
+zslepcutil.c:^?zslepcutil.c^A,1
+PETSC_EXTERN void PETSC_STDCALL slepcconvmonitorcreate_(PetscViewer *vin,PetscViewerFormat *format,SlepcConvMonitor *ctx,PetscErrorCode *ierr)slepcconvmonitorcreate_33,1338
+PETSC_EXTERN void slepcconvmonitordestroy_(SlepcConvMonitor *ctx,PetscErrorCode *ierr)slepcconvmonitordestroy_40,1595
+

 src/sys/makefile,327
 makefile:^?makefile^A,1
 CFLAGS   =CFLAGS24,936
@@ -11097,69 +12191,69 @@ static PetscErrorCode SlepcLoadDynamicLibrary(const char *name,PetscBool *found)
 #undef __FUNCT____FUNCT__122,4279
 #define __FUNCT__ __FUNCT__123,4296
 PetscErrorCode SlepcInitialize_DynamicLibraries(void)SlepcInitialize_DynamicLibraries128,4458
-#undef __FUNCT____FUNCT__173,6790
-#define __FUNCT__ __FUNCT__174,6807
-PetscErrorCode SlepcCitationsInitialize()SlepcCitationsInitialize175,6852
-#undef __FUNCT____FUNCT__199,7825
-#define __FUNCT__ __FUNCT__200,7842
-PetscErrorCode SlepcInitialize(int *argc,char ***args,const char file[],const char help[])SlepcInitialize222,8600
-#undef __FUNCT____FUNCT__252,9479
-#define __FUNCT__ __FUNCT__253,9496
-PetscErrorCode SlepcFinalize(void)SlepcFinalize264,9759
-#undef __FUNCT____FUNCT__277,10045
-#define __FUNCT__ __FUNCT__278,10062
-PetscErrorCode SlepcInitializeNoArguments(void)SlepcInitializeNoArguments289,10314
-#undef __FUNCT____FUNCT__300,10547
-#define __FUNCT__ __FUNCT__301,10564
-PetscErrorCode SlepcInitialized(PetscBool *isInitialized)SlepcInitialized309,10746
-PETSC_EXTERN PetscBool PetscBeganMPI;PetscBeganMPI317,10937
-#undef __FUNCT____FUNCT__319,10976
-#define __FUNCT__ __FUNCT__320,10993
-PetscErrorCode SlepcInitializeNoPointers(int argc,char **args,const char *filename,const char *help)SlepcInitializeNoPointers331,11257
+#undef __FUNCT____FUNCT__173,6795
+#define __FUNCT__ __FUNCT__174,6812
+PetscErrorCode SlepcCitationsInitialize()SlepcCitationsInitialize175,6857
+#undef __FUNCT____FUNCT__200,7894
+#define __FUNCT__ __FUNCT__201,7911
+PetscErrorCode SlepcInitialize(int *argc,char ***args,const char file[],const char help[])SlepcInitialize223,8669
+#undef __FUNCT____FUNCT__253,9548
+#define __FUNCT__ __FUNCT__254,9565
+PetscErrorCode SlepcFinalize(void)SlepcFinalize265,9828
+#undef __FUNCT____FUNCT__278,10107
+#define __FUNCT__ __FUNCT__279,10124
+PetscErrorCode SlepcInitializeNoArguments(void)SlepcInitializeNoArguments290,10376
+#undef __FUNCT____FUNCT__301,10609
+#define __FUNCT__ __FUNCT__302,10626
+PetscErrorCode SlepcInitialized(PetscBool *isInitialized)SlepcInitialized310,10808
+PETSC_EXTERN PetscBool PetscBeganMPI;PetscBeganMPI318,10999
+#undef __FUNCT____FUNCT__320,11038
+#define __FUNCT__ __FUNCT__321,11055
+PetscErrorCode SlepcInitializeNoPointers(int argc,char **args,const char *filename,const char *help)SlepcInitializeNoPointers332,11319
 

 src/sys/slepcsc.c,3017
 slepcsc.c:^?slepcsc.c^A,1
 #undef __FUNCT____FUNCT__26,1029
 #define __FUNCT__ __FUNCT__27,1046
 PetscErrorCode SlepcSCCompare(SlepcSC sc,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res)SlepcSCCompare53,1721
-#undef __FUNCT____FUNCT__85,2767
-#define __FUNCT__ __FUNCT__86,2784
-PetscErrorCode SlepcSortEigenvalues(SlepcSC sc,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,PetscInt *perm)SlepcSortEigenvalues111,3530
-#undef __FUNCT____FUNCT__165,5018
-#define __FUNCT__ __FUNCT__166,5035
-PetscErrorCode SlepcMap_ST(PetscObject obj,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)SlepcMap_ST170,5148
-#undef __FUNCT____FUNCT__179,5377
-#define __FUNCT__ __FUNCT__180,5394
-PetscErrorCode SlepcCompareLargestMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareLargestMagnitude181,5443
-#undef __FUNCT____FUNCT__194,5786
-#define __FUNCT__ __FUNCT__195,5803
-PetscErrorCode SlepcCompareSmallestMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestMagnitude196,5853
-#undef __FUNCT____FUNCT__209,6197
-#define __FUNCT__ __FUNCT__210,6214
-PetscErrorCode SlepcCompareLargestReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareLargestReal211,6258
-#undef __FUNCT____FUNCT__224,6580
-#define __FUNCT__ __FUNCT__225,6597
-PetscErrorCode SlepcCompareSmallestReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestReal226,6642
-#undef __FUNCT____FUNCT__239,6965
-#define __FUNCT__ __FUNCT__240,6982
-PetscErrorCode SlepcCompareLargestImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareLargestImaginary241,7031
-#undef __FUNCT____FUNCT__259,7460
-#define __FUNCT__ __FUNCT__260,7477
-PetscErrorCode SlepcCompareSmallestImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestImaginary261,7527
-#undef __FUNCT____FUNCT__279,7957
-#define __FUNCT__ __FUNCT__280,7974
-PetscErrorCode SlepcCompareTargetMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareTargetMagnitude281,8022
-#undef __FUNCT____FUNCT__296,8487
-#define __FUNCT__ __FUNCT__297,8504
-PetscErrorCode SlepcCompareTargetReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareTargetReal298,8547
-#undef __FUNCT____FUNCT__312,8961
-#define __FUNCT__ __FUNCT__313,8978
-PetscErrorCode SlepcCompareTargetImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareTargetImaginary314,9026
-#undef __FUNCT____FUNCT__336,9644
-#define __FUNCT__ __FUNCT__337,9661
-PetscErrorCode SlepcCompareSmallestPosReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestPosReal342,9800
-

-src/sys/slepcutil.c,1987
+#undef __FUNCT____FUNCT__85,2733
+#define __FUNCT__ __FUNCT__86,2750
+PetscErrorCode SlepcSortEigenvalues(SlepcSC sc,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,PetscInt *perm)SlepcSortEigenvalues111,3496
+#undef __FUNCT____FUNCT__165,4984
+#define __FUNCT__ __FUNCT__166,5001
+PetscErrorCode SlepcMap_ST(PetscObject obj,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)SlepcMap_ST170,5114
+#undef __FUNCT____FUNCT__179,5343
+#define __FUNCT__ __FUNCT__180,5360
+PetscErrorCode SlepcCompareLargestMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareLargestMagnitude181,5409
+#undef __FUNCT____FUNCT__194,5752
+#define __FUNCT__ __FUNCT__195,5769
+PetscErrorCode SlepcCompareSmallestMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestMagnitude196,5819
+#undef __FUNCT____FUNCT__209,6163
+#define __FUNCT__ __FUNCT__210,6180
+PetscErrorCode SlepcCompareLargestReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareLargestReal211,6224
+#undef __FUNCT____FUNCT__224,6546
+#define __FUNCT__ __FUNCT__225,6563
+PetscErrorCode SlepcCompareSmallestReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestReal226,6608
+#undef __FUNCT____FUNCT__239,6931
+#define __FUNCT__ __FUNCT__240,6948
+PetscErrorCode SlepcCompareLargestImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareLargestImaginary241,6997
+#undef __FUNCT____FUNCT__259,7426
+#define __FUNCT__ __FUNCT__260,7443
+PetscErrorCode SlepcCompareSmallestImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestImaginary261,7493
+#undef __FUNCT____FUNCT__279,7923
+#define __FUNCT__ __FUNCT__280,7940
+PetscErrorCode SlepcCompareTargetMagnitude(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareTargetMagnitude281,7988
+#undef __FUNCT____FUNCT__296,8453
+#define __FUNCT__ __FUNCT__297,8470
+PetscErrorCode SlepcCompareTargetReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareTargetReal298,8513
+#undef __FUNCT____FUNCT__312,8927
+#define __FUNCT__ __FUNCT__313,8944
+PetscErrorCode SlepcCompareTargetImaginary(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareTargetImaginary314,8992
+#undef __FUNCT____FUNCT__336,9610
+#define __FUNCT__ __FUNCT__337,9627
+PetscErrorCode SlepcCompareSmallestPosReal(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result,void *ctx)SlepcCompareSmallestPosReal342,9766
+

+src/sys/slepcutil.c,2201
 slepcutil.c:^?slepcutil.c^A,1
 #undef __FUNCT____FUNCT__24,994
 #define __FUNCT__ __FUNCT__25,1011
@@ -11181,16 +12275,19 @@ PetscErrorCode SlepcMatTile(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar
 PetscErrorCode SlepcCheckOrthogonality(Vec *V,PetscInt nv,Vec *W,PetscInt nw,Mat B,PetscViewer viewer,PetscReal *lev)SlepcCheckOrthogonality492,17686
 #undef __FUNCT____FUNCT__548,19449
 #define __FUNCT__ __FUNCT__549,19466
-PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx)SlepcConvMonitorDestroy554,19624
-#undef __FUNCT____FUNCT__565,19900
-#define __FUNCT__ __FUNCT__566,19917
-PetscErrorCode SlepcBasisReference_Private(PetscInt n,Vec *V,PetscInt *m,Vec **W)SlepcBasisReference_Private571,20125
-#undef __FUNCT____FUNCT__589,20553
-#define __FUNCT__ __FUNCT__590,20570
-PetscErrorCode SlepcBasisDestroy_Private(PetscInt *m,Vec **W)SlepcBasisDestroy_Private595,20729
-#undef __FUNCT____FUNCT__611,21039
-#define __FUNCT__ __FUNCT__612,21056
-PetscErrorCode SlepcSNPrintfScalar(char *str,size_t len,PetscScalar val,PetscBool exp)SlepcSNPrintfScalar628,21469
+PetscErrorCode SlepcConvMonitorCreate(PetscViewer viewer,PetscViewerFormat format,SlepcConvMonitor *ctx)SlepcConvMonitorCreate573,20126
+#undef __FUNCT____FUNCT__585,20466
+#define __FUNCT__ __FUNCT__586,20483
+PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx)SlepcConvMonitorDestroy599,20766
+#undef __FUNCT____FUNCT__610,21042
+#define __FUNCT__ __FUNCT__611,21059
+PetscErrorCode SlepcBasisReference_Private(PetscInt n,Vec *V,PetscInt *m,Vec **W)SlepcBasisReference_Private616,21267
+#undef __FUNCT____FUNCT__634,21695
+#define __FUNCT__ __FUNCT__635,21712
+PetscErrorCode SlepcBasisDestroy_Private(PetscInt *m,Vec **W)SlepcBasisDestroy_Private640,21871
+#undef __FUNCT____FUNCT__656,22181
+#define __FUNCT__ __FUNCT__657,22198
+PetscErrorCode SlepcSNPrintfScalar(char *str,size_t len,PetscScalar val,PetscBool exp)SlepcSNPrintfScalar673,22611
 

 src/sys/vec/makefile,288
 makefile:^?makefile^A,1
@@ -11214,10 +12311,10 @@ PetscErrorCode SlepcVecPoolCreate(Vec v,PetscInt init_size,VecPool *p)SlepcVecP
 PetscErrorCode SlepcVecPoolDestroy(VecPool *p)SlepcVecPoolDestroy80,2338
 #undef __FUNCT____FUNCT__98,2850
 #define __FUNCT__ __FUNCT__99,2867
-PetscErrorCode SlepcVecPoolGetVecs(VecPool p,PetscInt n,Vec **vecs)SlepcVecPoolGetVecs116,3170
-#undef __FUNCT____FUNCT__143,4045
-#define __FUNCT__ __FUNCT__144,4062
-PetscErrorCode SlepcVecPoolRestoreVecs(VecPool p,PetscInt n,Vec **vecs)SlepcVecPoolRestoreVecs160,4387
+PetscErrorCode SlepcVecPoolGetVecs(VecPool p,PetscInt n,Vec **vecs)SlepcVecPoolGetVecs116,3171
+#undef __FUNCT____FUNCT__143,4046
+#define __FUNCT__ __FUNCT__144,4063
+PetscErrorCode SlepcVecPoolRestoreVecs(VecPool p,PetscInt n,Vec **vecs)SlepcVecPoolRestoreVecs160,4388
 

 src/sys/vec/veccomp.c,6453
 veccomp.c:^?veccomp.c^A,1
@@ -11251,100 +12348,100 @@ PetscErrorCode VecDestroyVecs_Comp(PetscInt m,Vec v[])VecDestroyVecs_Comp231,6
 #undef __FUNCT____FUNCT__244,7152
 #define __FUNCT__ __FUNCT__245,7169
 static PetscErrorCode VecCreate_Comp_Private(Vec v,Vec *x,PetscInt nx,PetscBool x_to_me,Vec_Comp_N *n)VecCreate_Comp_Private246,7212
-#undef __FUNCT____FUNCT__302,8815
-#define __FUNCT__ __FUNCT__303,8832
-PETSC_EXTERN PetscErrorCode VecCreate_Comp(Vec V)VecCreate_Comp304,8867
-#undef __FUNCT____FUNCT__313,9068
-#define __FUNCT__ __FUNCT__314,9085
-PetscErrorCode VecCreateComp(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)VecCreateComp339,9779
-#undef __FUNCT____FUNCT__358,10446
-#define __FUNCT__ __FUNCT__359,10463
-PetscErrorCode VecCreateCompWithVecs(Vec *x,PetscInt n,Vec Vparent,Vec *V)VecCreateCompWithVecs378,10867
-#undef __FUNCT____FUNCT__392,11313
-#define __FUNCT__ __FUNCT__393,11330
-PetscErrorCode VecDuplicate_Comp(Vec win,Vec *V)VecDuplicate_Comp394,11368
-#undef __FUNCT____FUNCT__415,12007
-#define __FUNCT__ __FUNCT__416,12024
-PetscErrorCode VecCompGetSubVecs(Vec win,PetscInt *n,const Vec **x)VecCompGetSubVecs434,12361
-#undef __FUNCT____FUNCT__445,12588
-#define __FUNCT__ __FUNCT__446,12605
-PetscErrorCode VecCompSetSubVecs(Vec win,PetscInt n,Vec *x)VecCompSetSubVecs462,12944
-#undef __FUNCT____FUNCT__480,13362
-#define __FUNCT__ __FUNCT__481,13379
-PetscErrorCode VecAXPY_Comp(Vec v,PetscScalar alpha,Vec w)VecAXPY_Comp482,13412
-#undef __FUNCT____FUNCT__497,13776
-#define __FUNCT__ __FUNCT__498,13793
-PetscErrorCode VecAYPX_Comp(Vec v,PetscScalar alpha,Vec w)VecAYPX_Comp499,13826
-#undef __FUNCT____FUNCT__514,14190
-#define __FUNCT__ __FUNCT__515,14207
-PetscErrorCode VecAXPBY_Comp(Vec v,PetscScalar alpha,PetscScalar beta,Vec w)VecAXPBY_Comp516,14241
-#undef __FUNCT____FUNCT__531,14629
-#define __FUNCT__ __FUNCT__532,14646
-PetscErrorCode VecMAXPY_Comp(Vec v,PetscInt n,const PetscScalar *alpha,Vec *w)VecMAXPY_Comp533,14680
-#undef __FUNCT____FUNCT__555,15238
-#define __FUNCT__ __FUNCT__556,15255
-PetscErrorCode VecWAXPY_Comp(Vec v,PetscScalar alpha,Vec w,Vec z)VecWAXPY_Comp557,15289
-#undef __FUNCT____FUNCT__573,15719
-#define __FUNCT__ __FUNCT__574,15736
-PetscErrorCode VecAXPBYPCZ_Comp(Vec v,PetscScalar alpha,PetscScalar beta,PetscScalar gamma,Vec w,Vec z)VecAXPBYPCZ_Comp575,15773
-#undef __FUNCT____FUNCT__591,16258
-#define __FUNCT__ __FUNCT__592,16275
-PetscErrorCode VecGetSize_Comp(Vec v,PetscInt *size)VecGetSize_Comp593,16311
-#undef __FUNCT____FUNCT__604,16531
-#define __FUNCT__ __FUNCT__605,16548
-PetscErrorCode VecGetLocalSize_Comp(Vec v,PetscInt *size)VecGetLocalSize_Comp606,16589
-#undef __FUNCT____FUNCT__617,16815
-#define __FUNCT__ __FUNCT__618,16832
-PetscErrorCode VecMax_Comp(Vec v,PetscInt *idx,PetscReal *z)VecMax_Comp619,16864
-#undef __FUNCT____FUNCT__647,17522
-#define __FUNCT__ __FUNCT__648,17539
-PetscErrorCode VecMin_Comp(Vec v,PetscInt *idx,PetscReal *z)VecMin_Comp649,17571
-#undef __FUNCT____FUNCT__677,18229
-#define __FUNCT__ __FUNCT__678,18246
-PetscErrorCode VecMaxPointwiseDivide_Comp(Vec v,Vec w,PetscReal *m)VecMaxPointwiseDivide_Comp679,18293
-#define __QUOTEME__(__QUOTEME__699,18850
-#define __COMPOSE2__(__COMPOSE2__700,18876
-#define __COMPOSE3__(__COMPOSE3__701,18907
-#define __FUNC_TEMPLATE1__(__FUNC_TEMPLATE1__703,18944
-#undef __FUNCT____FUNCT__718,19311
-#define __FUNCT__ __FUNCT__719,19328
-#undef __FUNCT____FUNCT__722,19397
-#define __FUNCT__ __FUNCT__723,19414
-#undef __FUNCT____FUNCT__726,19485
-#define __FUNCT__ __FUNCT__727,19502
-#undef __FUNCT____FUNCT__730,19567
-#define __FUNCT__ __FUNCT__731,19584
-#undef __FUNCT____FUNCT__734,19641
-#define __FUNCT__ __FUNCT__735,19658
-#undef __FUNCT____FUNCT__738,19715
-#define __FUNCT__ __FUNCT__739,19732
-#define __FUNC_TEMPLATE2__(__FUNC_TEMPLATE2__743,19790
-#undef __FUNCT____FUNCT__758,20171
-#define __FUNCT__ __FUNCT__759,20188
-#undef __FUNCT____FUNCT__762,20257
-#define __FUNCT__ __FUNCT__763,20274
-#undef __FUNCT____FUNCT__766,20345
-#define __FUNCT__ __FUNCT__767,20362
-#undef __FUNCT____FUNCT__770,20435
-#define __FUNCT__ __FUNCT__771,20452
-#undef __FUNCT____FUNCT__774,20533
-#define __FUNCT__ __FUNCT__775,20550
-#define __FUNC_TEMPLATE3__(__FUNC_TEMPLATE3__779,20624
-#undef __FUNCT____FUNCT__796,21077
-#define __FUNCT__ __FUNCT__797,21094
-#undef __FUNCT____FUNCT__800,21153
-#define __FUNCT__ __FUNCT__801,21170
-#define __FUNC_TEMPLATE4__(__FUNC_TEMPLATE4__805,21230
-#undef __FUNCT____FUNCT__824,21771
-#define __FUNCT__ __FUNCT__825,21788
+#undef __FUNCT____FUNCT__300,8785
+#define __FUNCT__ __FUNCT__301,8802
+PETSC_EXTERN PetscErrorCode VecCreate_Comp(Vec V)VecCreate_Comp302,8837
+#undef __FUNCT____FUNCT__311,9038
+#define __FUNCT__ __FUNCT__312,9055
+PetscErrorCode VecCreateComp(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)VecCreateComp337,9749
+#undef __FUNCT____FUNCT__356,10416
+#define __FUNCT__ __FUNCT__357,10433
+PetscErrorCode VecCreateCompWithVecs(Vec *x,PetscInt n,Vec Vparent,Vec *V)VecCreateCompWithVecs376,10837
+#undef __FUNCT____FUNCT__390,11283
+#define __FUNCT__ __FUNCT__391,11300
+PetscErrorCode VecDuplicate_Comp(Vec win,Vec *V)VecDuplicate_Comp392,11338
+#undef __FUNCT____FUNCT__413,11977
+#define __FUNCT__ __FUNCT__414,11994
+PetscErrorCode VecCompGetSubVecs(Vec win,PetscInt *n,const Vec **x)VecCompGetSubVecs432,12331
+#undef __FUNCT____FUNCT__443,12558
+#define __FUNCT__ __FUNCT__444,12575
+PetscErrorCode VecCompSetSubVecs(Vec win,PetscInt n,Vec *x)VecCompSetSubVecs460,12914
+#undef __FUNCT____FUNCT__478,13332
+#define __FUNCT__ __FUNCT__479,13349
+PetscErrorCode VecAXPY_Comp(Vec v,PetscScalar alpha,Vec w)VecAXPY_Comp480,13382
+#undef __FUNCT____FUNCT__495,13746
+#define __FUNCT__ __FUNCT__496,13763
+PetscErrorCode VecAYPX_Comp(Vec v,PetscScalar alpha,Vec w)VecAYPX_Comp497,13796
+#undef __FUNCT____FUNCT__512,14160
+#define __FUNCT__ __FUNCT__513,14177
+PetscErrorCode VecAXPBY_Comp(Vec v,PetscScalar alpha,PetscScalar beta,Vec w)VecAXPBY_Comp514,14211
+#undef __FUNCT____FUNCT__529,14599
+#define __FUNCT__ __FUNCT__530,14616
+PetscErrorCode VecMAXPY_Comp(Vec v,PetscInt n,const PetscScalar *alpha,Vec *w)VecMAXPY_Comp531,14650
+#undef __FUNCT____FUNCT__553,15208
+#define __FUNCT__ __FUNCT__554,15225
+PetscErrorCode VecWAXPY_Comp(Vec v,PetscScalar alpha,Vec w,Vec z)VecWAXPY_Comp555,15259
+#undef __FUNCT____FUNCT__571,15689
+#define __FUNCT__ __FUNCT__572,15706
+PetscErrorCode VecAXPBYPCZ_Comp(Vec v,PetscScalar alpha,PetscScalar beta,PetscScalar gamma,Vec w,Vec z)VecAXPBYPCZ_Comp573,15743
+#undef __FUNCT____FUNCT__589,16228
+#define __FUNCT__ __FUNCT__590,16245
+PetscErrorCode VecGetSize_Comp(Vec v,PetscInt *size)VecGetSize_Comp591,16281
+#undef __FUNCT____FUNCT__602,16501
+#define __FUNCT__ __FUNCT__603,16518
+PetscErrorCode VecGetLocalSize_Comp(Vec v,PetscInt *size)VecGetLocalSize_Comp604,16559
+#undef __FUNCT____FUNCT__615,16785
+#define __FUNCT__ __FUNCT__616,16802
+PetscErrorCode VecMax_Comp(Vec v,PetscInt *idx,PetscReal *z)VecMax_Comp617,16834
+#undef __FUNCT____FUNCT__648,17553
+#define __FUNCT__ __FUNCT__649,17570
+PetscErrorCode VecMin_Comp(Vec v,PetscInt *idx,PetscReal *z)VecMin_Comp650,17602
+#undef __FUNCT____FUNCT__681,18321
+#define __FUNCT__ __FUNCT__682,18338
+PetscErrorCode VecMaxPointwiseDivide_Comp(Vec v,Vec w,PetscReal *m)VecMaxPointwiseDivide_Comp683,18385
+#define __QUOTEME__(__QUOTEME__703,18942
+#define __COMPOSE2__(__COMPOSE2__704,18968
+#define __COMPOSE3__(__COMPOSE3__705,18999
+#define __FUNC_TEMPLATE1__(__FUNC_TEMPLATE1__707,19036
+#undef __FUNCT____FUNCT__722,19403
+#define __FUNCT__ __FUNCT__723,19420
+#undef __FUNCT____FUNCT__726,19489
+#define __FUNCT__ __FUNCT__727,19506
+#undef __FUNCT____FUNCT__730,19577
+#define __FUNCT__ __FUNCT__731,19594
+#undef __FUNCT____FUNCT__734,19659
+#define __FUNCT__ __FUNCT__735,19676
+#undef __FUNCT____FUNCT__738,19733
+#define __FUNCT__ __FUNCT__739,19750
+#undef __FUNCT____FUNCT__742,19807
+#define __FUNCT__ __FUNCT__743,19824
+#define __FUNC_TEMPLATE2__(__FUNC_TEMPLATE2__747,19882
+#undef __FUNCT____FUNCT__762,20263
+#define __FUNCT__ __FUNCT__763,20280
+#undef __FUNCT____FUNCT__766,20349
+#define __FUNCT__ __FUNCT__767,20366
+#undef __FUNCT____FUNCT__770,20437
+#define __FUNCT__ __FUNCT__771,20454
+#undef __FUNCT____FUNCT__774,20527
+#define __FUNCT__ __FUNCT__775,20544
+#undef __FUNCT____FUNCT__778,20625
+#define __FUNCT__ __FUNCT__779,20642
+#define __FUNC_TEMPLATE3__(__FUNC_TEMPLATE3__783,20716
+#undef __FUNCT____FUNCT__800,21169
+#define __FUNCT__ __FUNCT__801,21186
+#undef __FUNCT____FUNCT__804,21245
+#define __FUNCT__ __FUNCT__805,21262
+#define __FUNC_TEMPLATE4__(__FUNC_TEMPLATE4__809,21322
 #undef __FUNCT____FUNCT__828,21863
 #define __FUNCT__ __FUNCT__829,21880
-#undef __FUNCT____FUNCT__832,21961
-#define __FUNCT__ __FUNCT__833,21978
+#undef __FUNCT____FUNCT__832,21955
+#define __FUNCT__ __FUNCT__833,21972
 #undef __FUNCT____FUNCT__836,22053
 #define __FUNCT__ __FUNCT__837,22070
-#undef __FUNCT____FUNCT__840,22147
-#define __FUNCT__ __FUNCT__841,22164
+#undef __FUNCT____FUNCT__840,22145
+#define __FUNCT__ __FUNCT__841,22162
+#undef __FUNCT____FUNCT__844,22239
+#define __FUNCT__ __FUNCT__845,22256
 

 src/sys/vec/veccomp0.h,1314
 veccomp0.h:^?veccomp0.h^A,1
diff --git a/TAGS_PYTHON b/TAGS_PYTHON
index 704a59e..427eb4f 100644
--- a/TAGS_PYTHON
+++ b/TAGS_PYTHON
@@ -24,115 +24,120 @@ def WriteGnuMake(slepc):WriteGnuMake171,6896
 def main(slepc_dir=None, petsc_dir=None, petsc_arch=None, installed_petsc=False, output=None, verbose=False):main185,7507
     parser = optparse.OptionParser()parser195,7934
 

-config/configure.py,3513
-def AddDefine(conffile,name,value):AddDefine25,978
-def CreateFile(basedir,fname,log):CreateFile28,1106
-def CreateDir(basedir,dirname,log):CreateDir37,1371
-def CreateDirTwo(basedir,dir1,dir2,log):CreateDirTwo47,1678
-def CreateDirTest(basedir,dirname,log):CreateDirTest63,2190
-def WriteModulesFile(modules,version,sdir):WriteModulesFile76,2577
-def WritePkgconfigFile(pkgconfig,version,pversion,sdir,isinstall,prefixdir):WritePkgconfigFile88,3227
-def WriteCMakeConfigFile(cmakeconf):WriteCMakeConfigFile99,3935
-configdir = os.path.abspath('config')configdir130,5737
-argdb = argdb.ArgDB(sys.argv)argdb138,6013
-log   = log.Log()log139,6043
-slepc   = slepc.SLEPc(argdb,log)slepc143,6206
-petsc   = petsc.PETSc(argdb,log)petsc144,6239
-arpack  = arpack.Arpack(argdb,log)arpack145,6272
-blopex  = blopex.Blopex(argdb,log)blopex146,6307
-blzpack = blzpack.Blzpack(argdb,log)blzpack147,6342
-feast   = feast.Feast(argdb,log)feast148,6379
-primme  = primme.Primme(argdb,log)primme149,6412
-trlan   = trlan.Trlan(argdb,log)trlan150,6447
-sowing  = sowing.Sowing(argdb,log)sowing151,6480
-lapack  = lapack.Lapack(argdb,log)lapack152,6515
-externalpackages = [arpack, blopex, blzpack, feast, primme, trlan]externalpackages154,6551
-optionspackages  = [slepc, arpack, blopex, blzpack, feast, primme, trlan, sowing]optionspackages155,6618
-checkpackages    = [arpack, blopex, blzpack, feast, primme, trlan, lapack]checkpackages156,6700
-emptyarch = not ('PETSC_ARCH' in os.environ and os.environ['PETSC_ARCH'])emptyarch184,7693
-  archname = petsc.archarchname188,7824
-libdir  = CreateDir(archdir,'lib',log)libdir192,7958
-confdir = CreateDirTwo(libdir,'slepc','conf',log)confdir193,7997
-      f = open(os.path.join(confdir,'slepcvariables'),'r')f217,8840
-      searchlines = f.readlines()searchlines218,8899
-includedir = CreateDir(archdir,'include',log)includedir241,9818
-modulesdir = CreateDirTwo(confdir,'modules','slepc',log)modulesdir242,9864
-pkgconfdir = CreateDir(libdir,'pkgconfig',log)pkgconfdir243,9921
-slepcvars  = CreateFile(confdir,'slepcvariables',log)slepcvars244,9968
-slepcrules = CreateFile(confdir,'slepcrules',log)slepcrules245,10022
-slepcconf  = CreateFile(includedir,'slepcconf.h',log)slepcconf246,10072
-cmakeconf  = CreateFile(confdir,'SLEPcConfig.cmake',log)cmakeconf247,10126
-pkgconfig  = CreateFile(pkgconfdir,'SLEPc.pc',log)pkgconfig248,10183
-  modules  = CreateFile(modulesdir,slepc.lversion,log)modules250,10254
-  modules  = CreateFile(modulesdir,slepc.lversion+'-'+archname,log)modules252,10315
-testruns = set(petsc.test_runs.split())testruns258,10542
-testruns = testruns.intersection(set(['C','F90','Fortran','C_Complex','Fortran_Complex','C_NoComplex','Fortran_NoComplex']))testruns259,10582
-  testruns = testruns.union(set(['C_NoF128']))testruns261,10743
-  testruns = testruns.union(set(['DATAFILESPATH']))testruns264,10865
-  globconf = CreateFile(os.path.join(slepc.dir,'lib','slepc','conf'),'slepcvariables',log)globconf278,11439
-bfort = petsc.bfortbfort329,13678
-  bfort = sowing.Install(archdir,petsc.make)bfort331,13725
-      bfort = os.path.join(archdir,'bin','bfort')bfort336,13853
-      bfort = sowing.Install(archdir,petsc.make)bfort338,13937
-cmakeok = Falsecmakeok352,14477
-      cmakeok = cmakeboot.main(slepc.dir,petsc.dir,log=log)cmakeok369,15090
-      petscdate = dateutil.parser.parse(petsc.gitdate)petscdate405,16491
-      slepcdate = dateutil.parser.parse(slepc.gitdate)slepcdate406,16546
-

-config/package.py,589
-class Package:Package25,983
-  def ProcessArgs(self,argdb):ProcessArgs27,999
-  def Process(self,conf,vars,cmake,petsc,archdir=''):Process48,1691
-  def ShowHelp(self):ShowHelp61,2150
-  def ShowInfo(self):ShowInfo72,2851
-  def LinkWithOutput(self,functions,callbacks,flags):LinkWithOutput77,3022
-  def Link(self,functions,callbacks,flags):Link128,4856
-  def FortranLink(self,functions,callbacks,flags):FortranLink133,5016
-  def GenerateGuesses(self,name):GenerateGuesses162,5923
-  def FortranLib(self,conf,vars,cmake,dirs,libs,functions,callbacks = []):FortranLib181,6515
+config/configure.py,3616
+def AddDefine(conffile,name,value,prefix='SLEPC_'):AddDefine25,978
+def CreateFile(basedir,fname,log):CreateFile28,1124
+def CreateDir(basedir,dirname,log):CreateDir37,1389
+def CreateDirTwo(basedir,dir1,dir2,log):CreateDirTwo47,1696
+def CreateDirTest(basedir,dirname,log):CreateDirTest63,2208
+def WriteModulesFile(modules,version,sdir):WriteModulesFile76,2595
+def WritePkgconfigFile(pkgconfig,version,pversion,sdir,isinstall,prefixdir):WritePkgconfigFile88,3245
+def WriteCMakeConfigFile(cmakeconf):WriteCMakeConfigFile99,3953
+configdir = os.path.abspath('config')configdir128,5593
+argdb = argdb.ArgDB(sys.argv)argdb136,5869
+log   = log.Log()log137,5899
+slepc   = slepc.SLEPc(argdb,log)slepc141,6062
+petsc   = petsc.PETSc(argdb,log)petsc142,6095
+arpack  = arpack.Arpack(argdb,log)arpack143,6128
+blopex  = blopex.Blopex(argdb,log)blopex144,6163
+blzpack = blzpack.Blzpack(argdb,log)blzpack145,6198
+feast   = feast.Feast(argdb,log)feast146,6235
+primme  = primme.Primme(argdb,log)primme147,6268
+trlan   = trlan.Trlan(argdb,log)trlan148,6303
+sowing  = sowing.Sowing(argdb,log)sowing149,6336
+lapack  = lapack.Lapack(argdb,log)lapack150,6371
+externalpackages = [arpack, blopex, blzpack, feast, primme, trlan]externalpackages152,6407
+optionspackages  = [slepc, arpack, blopex, blzpack, feast, primme, trlan, sowing]optionspackages153,6474
+checkpackages    = [arpack, blopex, blzpack, feast, primme, trlan, lapack]checkpackages154,6556
+emptyarch = not ('PETSC_ARCH' in os.environ and os.environ['PETSC_ARCH'])emptyarch182,7549
+  archname = petsc.archarchname186,7680
+libdir  = CreateDir(archdir,'lib',log)libdir190,7814
+confdir = CreateDirTwo(libdir,'slepc','conf',log)confdir191,7853
+      f = open(os.path.join(confdir,'slepcvariables'),'r')f215,8696
+      searchlines = f.readlines()searchlines216,8755
+includedir = CreateDir(archdir,'include',log)includedir239,9674
+modulesdir = CreateDirTwo(confdir,'modules','slepc',log)modulesdir240,9720
+pkgconfdir = CreateDir(libdir,'pkgconfig',log)pkgconfdir241,9777
+slepcvars  = CreateFile(confdir,'slepcvariables',log)slepcvars242,9824
+slepcrules = CreateFile(confdir,'slepcrules',log)slepcrules243,9878
+slepcconf  = CreateFile(includedir,'slepcconf.h',log)slepcconf244,9928
+cmakeconf  = CreateFile(confdir,'SLEPcBuildInternal.cmake',log)cmakeconf245,9982
+pkgconfig  = CreateFile(pkgconfdir,'SLEPc.pc',log)pkgconfig246,10046
+  modules  = CreateFile(modulesdir,slepc.lversion,log)modules248,10117
+  modules  = CreateFile(modulesdir,slepc.lversion+'-'+archname,log)modules250,10178
+testruns = set(petsc.test_runs.split())testruns256,10405
+testruns = testruns.intersection(set(['C','F90','Fortran','C_Complex','Fortran_Complex','C_NoComplex','Fortran_NoComplex']))testruns257,10445
+  testruns = testruns.union(set(['C_NoF128']))testruns259,10606
+    testruns = testruns.union(set(['DATAFILESPATH_Complex']))testruns263,10760
+    testruns = testruns.union(set(['DATAFILESPATH']))testruns265,10830
+  globconf = CreateFile(os.path.join(slepc.dir,'lib','slepc','conf'),'slepcvariables',log)globconf282,11531
+bfort = petsc.bfortbfort333,13770
+  bfort = sowing.Install(archdir,petsc.make)bfort335,13817
+      bfort = os.path.join(archdir,'bin','bfort')bfort340,13945
+      bfort = sowing.Install(archdir,petsc.make)bfort342,14029
+cmakeok = Falsecmakeok356,14569
+      cmakeok = cmakeboot.main(slepc.dir,petsc.dir,log=log)cmakeok373,15182
+      petscdate = dateutil.parser.parse(petsc.gitdate)petscdate409,16583
+      slepcdate = dateutil.parser.parse(slepc.gitdate)slepcdate410,16638
+

+config/package.py,767
+class Package:Package25,1015
+  def __init__(self,argdb,log):__init__27,1031
+  def ProcessArgs(self,argdb):ProcessArgs39,1393
+  def Process(self,conf,vars,cmake,petsc,archdir=''):Process63,2246
+  def Precondition(self,petsc):Precondition80,2879
+  def Download(self,externdir,builddir,prefix=None):Download96,3689
+  def ShowHelp(self):ShowHelp157,5949
+  def ShowInfo(self):ShowInfo168,6670
+  def LinkWithOutput(self,functions,callbacks,flags):LinkWithOutput173,6841
+  def Link(self,functions,callbacks,flags):Link224,8675
+  def FortranLink(self,functions,callbacks,flags):FortranLink229,8835
+  def GenerateGuesses(self,name):GenerateGuesses258,9742
+  def FortranLib(self,conf,vars,cmake,dirs,libs,functions,callbacks = []):FortranLib277,10334
 

 config/cmakegen.py,1817
-    class defaultdict(dict):defaultdict24,764
-        def __init__(self, default_factory=None, *a, **kw):__init__25,793
-        def __getitem__(self, key):__getitem__31,1120
-        def __missing__(self, key):__missing__36,1298
-        def __reduce__(self):__reduce__41,1495
-        def copy(self):copy47,1726
-        def __copy__(self):__copy__49,1785
-        def __deepcopy__(self, memo):__deepcopy__51,1871
-        def __repr__(self):__repr__55,2044
-class StdoutLogger(object):StdoutLogger59,2204
-  def write(self,str):write60,2232
-def cmakeconditional(key,val):cmakeconditional63,2271
-  def unexpected():unexpected64,2302
-AUTODIRS = set('ftn-auto ftn-custom f90-custom'.split()) # Automatically recurse into these, if they existAUTODIRS88,3067
-SKIPDIRS = set('benchmarks'.split())                     # Skip these during the buildSKIPDIRS89,3174
-NOWARNDIRS = set('tests tutorials'.split())              # Do not warn about mismatch in theseNOWARNDIRS90,3261
-def pathsplit(path):pathsplit92,3357
-class Mistakes(object):Mistakes101,3640
-    def __init__(self, log, verbose=False):__init__102,3664
-    def compareDirLists(self,root, mdirs, dirs):compareDirLists107,3790
-    def compareSourceLists(self, root, msources, files):compareSourceLists123,4579
-    def summary(self):summary139,5470
-def stripsplit(line):stripsplit145,6034
-def pkgsources(pkg, mistakes):pkgsources148,6114
-    def relpath(filename):relpath169,7159
-def writeRoot(f,petscdir,petscdestdir):writeRoot180,7717
-def writePackage(f,pkg,pkgdeps,mistakes):writePackage223,9378
-    def body(indentlevel):body226,9499
-def main(slepcdir,petscdir,petscdestdir,log=StdoutLogger(), verbose=False):main249,10483
-    written = Truewritten289,12183
-  parser = optparse.OptionParser()parser300,12414
+    class defaultdict(dict):defaultdict24,771
+        def __init__(self, default_factory=None, *a, **kw):__init__25,800
+        def __getitem__(self, key):__getitem__31,1127
+        def __missing__(self, key):__missing__36,1305
+        def __reduce__(self):__reduce__41,1502
+        def copy(self):copy47,1733
+        def __copy__(self):__copy__49,1792
+        def __deepcopy__(self, memo):__deepcopy__51,1878
+        def __repr__(self):__repr__55,2051
+class StdoutLogger(object):StdoutLogger59,2211
+  def write(self,str):write60,2239
+def cmakeconditional(key,val):cmakeconditional63,2278
+  def unexpected():unexpected64,2309
+AUTODIRS = set('ftn-auto ftn-custom f90-custom'.split()) # Automatically recurse into these, if they existAUTODIRS88,3074
+SKIPDIRS = set('benchmarks'.split())                     # Skip these during the buildSKIPDIRS89,3181
+NOWARNDIRS = set('tests tutorials'.split())              # Do not warn about mismatch in theseNOWARNDIRS90,3268
+def pathsplit(path):pathsplit92,3364
+class Mistakes(object):Mistakes101,3647
+    def __init__(self, log, verbose=False):__init__102,3671
+    def compareDirLists(self,root, mdirs, dirs):compareDirLists107,3797
+    def compareSourceLists(self, root, msources, files):compareSourceLists123,4586
+    def summary(self):summary139,5477
+def stripsplit(line):stripsplit145,6041
+def pkgsources(pkg, mistakes):pkgsources148,6121
+    def relpath(filename):relpath169,7166
+def writeRoot(f,petscdir,petscdestdir):writeRoot180,7724
+def writePackage(f,pkg,pkgdeps,mistakes):writePackage223,9399
+    def body(indentlevel):body226,9520
+def main(slepcdir,petscdir,petscdestdir,log=StdoutLogger(), verbose=False):main249,10504
+    written = Truewritten289,12204
+  parser = optparse.OptionParser()parser300,12435
 

 config/packages/sowing.py,144
 class Sowing(package.Package):Sowing25,972
   def __init__(self,argdb,log):__init__27,1004
-  def Install(self,archdir,make):Install35,1223
+  def Install(self,archdir,make):Install34,1241
 

-config/packages/primme.py,148
-class Primme(package.Package):Primme25,957
-  def __init__(self,argdb,log):__init__27,989
-  def Check(self,conf,vars,cmake,petsc):Check35,1195
+config/packages/primme.py,216
+class Primme(package.Package):Primme25,975
+  def __init__(self,argdb,log):__init__27,1007
+  def Check(self,conf,vars,cmake,petsc):Check38,1415
+  def Install(self,conf,vars,cmake,petsc,archdir):Install80,2873
 

 config/packages/slepc.py,195
 class SLEPc:SLEPc24,959
@@ -142,44 +147,47 @@ class SLEPc:SLEPc24,959
   def LoadVersion(self):LoadVersion53,2215
 

 config/packages/blopex.py,161
-class Blopex(package.Package):Blopex26,996
-  def __init__(self,argdb,log):__init__28,1028
-  def Install(self,conf,vars,cmake,petsc,archdir):Install36,1247
+class Blopex(package.Package):Blopex25,975
+  def __init__(self,argdb,log):__init__27,1007
+  def Install(self,conf,vars,cmake,petsc,archdir):Install37,1389
 

 config/packages/petsc.py,255
 class PETSc(package.Package):PETSc24,961
   def __init__(self,argdb,log):__init__26,992
-  def Check(self):Check31,1115
-  def InitDir(self,prefixdir):InitDir34,1178
-  def LoadVersion(self):LoadVersion46,1576
-  def LoadConf(self):LoadConf78,2917
+  def Check(self):Check30,1101
+  def InitDir(self,prefixdir):InitDir33,1164
+  def LoadVersion(self):LoadVersion45,1562
+  def LoadConf(self):LoadConf77,2903
 

 config/packages/lapack.py,257
 class Lapack(package.Package):Lapack24,947
   def __init__(self,argdb,log):__init__26,979
-  def ShowInfo(self):ShowInfo31,1103
-  def Process(self,conf,vars,cmake,petsc,archdir=''):Process41,1519
-  def Check(self,conf,vars,cmake,petsc):Check47,1724
+  def ShowInfo(self):ShowInfo30,1089
+  def Process(self,conf,vars,cmake,petsc,archdir=''):Process40,1505
+  def Check(self,conf,vars,cmake,petsc):Check46,1710
 

 config/packages/blzpack.py,150
 class Blzpack(package.Package):Blzpack24,947
   def __init__(self,argdb,log):__init__26,980
-  def Check(self,conf,vars,cmake,petsc):Check34,1187
+  def Check(self,conf,vars,cmake,petsc):Check34,1219
 

-config/packages/trlan.py,146
-class Trlan(package.Package):Trlan24,947
-  def __init__(self,argdb,log):__init__26,978
-  def Check(self,conf,vars,cmake,petsc):Check34,1183
+config/packages/trlan.py,213
+class Trlan(package.Package):Trlan25,967
+  def __init__(self,argdb,log):__init__27,998
+  def Check(self,conf,vars,cmake,petsc):Check39,1481
+  def Install(self,conf,vars,cmake,petsc,archdir):Install57,1883
 

-config/packages/arpack.py,148
-class Arpack(package.Package):Arpack24,947
-  def __init__(self,argdb,log):__init__26,979
-  def Check(self,conf,vars,cmake,petsc):Check34,1185
+config/packages/arpack.py,262
+class Arpack(package.Package):Arpack25,967
+  def __init__(self,argdb,log):__init__27,999
+  def Functions(self,petsc):Functions39,1481
+  def Check(self,conf,vars,cmake,petsc):Check65,2290
+  def Install(self,conf,vars,cmake,petsc,archdir):Install83,2859
 

 config/packages/feast.py,146
 class Feast(package.Package):Feast24,947
   def __init__(self,argdb,log):__init__26,978
-  def Check(self,conf,vars,cmake,petsc):Check34,1183
+  def Check(self,conf,vars,cmake,petsc):Check34,1218
 

 config/log.py,273
 class Log:Log24,942
@@ -191,14 +199,14 @@ class Log:Log24,942
   def Exit(self,string):Exit49,1485
 

 config/argdb.py,343
-class ArgDB:ArgDB24,938
-  def __init__(self,argv):__init__26,952
-  def PopString(self,keyword):PopString45,1720
-  def PopPath(self,keyword):PopPath61,2091
-  def PopUrl(self,keyword):PopUrl77,2472
-  def PopBool(self,keyword):PopBool96,2938
-  def PopHelp(self):PopHelp112,3304
-  def ErrorIfNotEmpty(self):ErrorIfNotEmpty128,3679
+class ArgDB:ArgDB24,942
+  def __init__(self,argv):__init__26,956
+  def PopString(self,keyword):PopString45,1724
+  def PopPath(self,keyword):PopPath61,2095
+  def PopUrl(self,keyword):PopUrl77,2496
+  def PopBool(self,keyword):PopBool96,2962
+  def PopHelp(self):PopHelp112,3328
+  def ErrorIfNotEmpty(self):ErrorIfNotEmpty128,3703
 

 config/install.py,1066
   WindowsError = NoneWindowsError7,94
@@ -215,24 +223,24 @@ class Installer:Installer9,117
   def installBin(self):installBin193,8248
   def installShare(self):installShare200,8516
   def copyLib(self, src, dst):copyLib204,8630
-  def installLib(self):installLib227,9668
-  def outputInstallDone(self):outputInstallDone232,9802
-  def outputDestDirDone(self):outputDestDirDone242,10110
-  def runsetup(self):runsetup251,10378
-  def runcopy(self):runcopy256,10464
-  def runfix(self):runfix276,11198
-  def rundone(self):rundone280,11249
-  def run(self):run288,11423
+  def installLib(self):installLib229,9784
+  def outputInstallDone(self):outputInstallDone234,9918
+  def outputDestDirDone(self):outputDestDirDone244,10226
+  def runsetup(self):runsetup253,10494
+  def runcopy(self):runcopy258,10580
+  def runfix(self):runfix278,11314
+  def rundone(self):rundone282,11365
+  def run(self):run290,11539
 

 config/cmakeboot.py,647
-def noCheck(command, status, output, error):noCheck20,732
-def quoteIfNeeded(path):quoteIfNeeded23,787
-class StdoutLogger(object):StdoutLogger31,1050
-  def write(self,str):write32,1078
-class PETScMaker(script.Script):PETScMaker35,1117
- def __init__(self, slepcdir, petscdir, petscarch, argDB = None, framework = None):__init__36,1150
- def __str__(self):__str__47,1544
- def setupModules(self):setupModules50,1578
- def setup(self):setup69,2939
- def cmakeboot(self, args, log):cmakeboot75,3079
-def main(slepcdir, petscdir, petscarch=os.environ['PETSC_ARCH'], argDB=None, framework=None, log=StdoutLogger(), args=[]):main176,8202
+def noCheck(command, status, output, error):noCheck20,746
+def quoteIfNeeded(path):quoteIfNeeded23,801
+class StdoutLogger(object):StdoutLogger31,1064
+  def write(self,str):write32,1092
+class PETScMaker(script.Script):PETScMaker35,1131
+ def __init__(self, slepcdir, petscdir, petscarch, argDB = None, framework = None):__init__36,1164
+ def __str__(self):__str__47,1558
+ def setupModules(self):setupModules50,1592
+ def setup(self):setup69,2953
+ def cmakeboot(self, args, log):cmakeboot75,3093
+def main(slepcdir, petscdir, petscarch=os.environ['PETSC_ARCH'], argDB=None, framework=None, log=StdoutLogger(), args=[]):main176,8215
diff --git a/bin/maint/generatefortranstubs.py b/bin/maint/generatefortranstubs.py
index 01b3449..a84534a 100755
--- a/bin/maint/generatefortranstubs.py
+++ b/bin/maint/generatefortranstubs.py
@@ -156,7 +156,7 @@ def processDir(arg,dirname,names):
   if newls:
     PrepFtnDir(outdir)
     options = ['-dir '+outdir, '-mnative', '-ansi', '-nomsgs', '-noprofile', '-anyname', '-mapptr',
-               '-mpi', '-mpi2', '-ferr', '-ptrprefix Petsc', '-ptr64 PETSC_USE_POINTER_CONVERSION',
+               '-mpi', '-shortargname', '-ferr', '-ptrprefix Petsc', '-ptr64 PETSC_USE_POINTER_CONVERSION',
                '-fcaps PETSC_HAVE_FORTRAN_CAPS', '-fuscore PETSC_HAVE_FORTRAN_UNDERSCORE',
                '-f90mod_skip_header','-f90modfile','f90module.f90']
     cmd = 'cd '+dirname+'; BFORT_CONFIG_PATH='+os.path.join(petscdir,'lib','slepc','conf')+' '+bfort+' '+' '.join(options+newls)
diff --git a/config/argdb.py b/config/argdb.py
index c746440..5aed486 100644
--- a/config/argdb.py
+++ b/config/argdb.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -19,7 +19,7 @@
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 
-import sys
+import os, sys
 
 class ArgDB:
 
@@ -65,7 +65,7 @@ class ArgDB:
       found = 0
       for i, s in enumerate(self.argdb):
         if s.startswith('--'+keyword+'='):
-          string = s.split('=')[1].rstrip('/')
+          string = os.path.expanduser(s.split('=')[1].rstrip('/'))
           found = 1
           numhits = numhits + 1
           del self.argdb[i]
diff --git a/config/cmakeboot.py b/config/cmakeboot.py
index 996d643..9b66408 100755
--- a/config/cmakeboot.py
+++ b/config/cmakeboot.py
@@ -6,8 +6,8 @@
 # but it can also be run as a stand-alone program. The library paths and
 # flags should have been written to
 #
-#     $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/PETScConfig.cmake
-#     $SLEPC_DIR/$PETSC_ARCH/lib/slepc/conf/SLEPcConfig.cmake
+#     $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/PETScBuildInternal.cmake
+#     $SLEPC_DIR/$PETSC_ARCH/lib/slepc/conf/SLEPcBuildInternal.cmake
 #
 # by configure before running this script.
 
@@ -79,7 +79,7 @@ class PETScMaker(script.Script):
 
    output,error,retcode = self.executeShellCommand([self.cmake.cmake, '--version'], checkCommand=noCheck, log=log)
    import re
-   m = re.match(r'cmake version (.+)$', output)
+   m = re.match(r'cmake version (.+)', output)
    if not m:
        self.logPrint('Could not parse CMake version: %s, disabling cmake build option' % output)
        return False
diff --git a/config/cmakegen.py b/config/cmakegen.py
index 289b887..d463a64 100755
--- a/config/cmakegen.py
+++ b/config/cmakegen.py
@@ -5,7 +5,7 @@
 # sources, and encoding the rules through CMake conditionals. When CMake
 # runs, it will use the conditionals written to
 #
-#     $SLEPC_DIR/$PETSC_ARCH/lib/slepc/conf/SLEPcConfig.cmake
+#     $SLEPC_DIR/$PETSC_ARCH/lib/slepc/conf/SLEPcBuildInternal.cmake
 #
 # after a successful configure.
 #
@@ -184,8 +184,8 @@ project (SLEPc C)
 set (PETSc_SOURCE_DIR %s)
 set (PETSc_BINARY_DIR %s)
 
-include (${PETSc_BINARY_DIR}/lib/petsc/conf/PETScConfig.cmake)
-include (${PETSC_CMAKE_ARCH}/lib/slepc/conf/SLEPcConfig.cmake)
+include (${PETSc_BINARY_DIR}/lib/petsc/conf/PETScBuildInternal.cmake)
+include (${PETSC_CMAKE_ARCH}/lib/slepc/conf/SLEPcBuildInternal.cmake)
 
 if (PETSC_HAVE_FORTRAN)
   enable_language (Fortran)
diff --git a/config/configure.py b/config/configure.py
index 76cc143..6c3f04f 100755
--- a/config/configure.py
+++ b/config/configure.py
@@ -2,7 +2,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -22,8 +22,8 @@
 
 import os, sys, time, shutil
 
-def AddDefine(conffile,name,value):
-  conffile.write('#ifndef SLEPC_'+name+'\n#define SLEPC_'+name+' "'+value+'"\n#endif\n\n')
+def AddDefine(conffile,name,value,prefix='SLEPC_'):
+  conffile.write('#ifndef '+prefix+name+'\n#define '+prefix+name+' "'+value+'"\n#endif\n\n')
 
 def CreateFile(basedir,fname,log):
   ''' Create file basedir/fname and return path string '''
@@ -117,13 +117,11 @@ if 'LC_LOCAL' in os.environ and os.environ['LC_LOCAL'] != '' and os.environ['LC_
 if 'LANG' in os.environ and os.environ['LANG'] != '' and os.environ['LANG'] != 'en_US' and os.environ['LANG'] != 'en_US.UTF-8': os.environ['LANG'] = 'en_US.UTF-8'
 
 # Check python version
-if not hasattr(sys, 'version_info') or not sys.version_info[0] == 2 or not sys.version_info[1] >= 4:
-  print '*****  You must have Python2 version 2.4 or higher to run ./configure  *****'
-  print '*           Python is easy to install for end users or sys-admin.          *'
-  print '*                   http://www.python.org/download/                        *'
-  print '*                                                                          *'
-  print '*            You CANNOT configure SLEPc without Python                     *'
-  print '****************************************************************************'
+if not hasattr(sys, 'version_info') or not sys.version_info[0] == 2 or not sys.version_info[1] >= 6:
+  print '*******************************************************************************'
+  print '*       Python2 version 2.6 or higher is required to run ./configure          *'
+  print '*          Try: "python2.7 ./configure" or "python2.6 ./configure"            *'
+  print '*******************************************************************************'
   sys.exit(4)
 
 # Set python path
@@ -244,7 +242,7 @@ pkgconfdir = CreateDir(libdir,'pkgconfig',log)
 slepcvars  = CreateFile(confdir,'slepcvariables',log)
 slepcrules = CreateFile(confdir,'slepcrules',log)
 slepcconf  = CreateFile(includedir,'slepcconf.h',log)
-cmakeconf  = CreateFile(confdir,'SLEPcConfig.cmake',log)
+cmakeconf  = CreateFile(confdir,'SLEPcBuildInternal.cmake',log)
 pkgconfig  = CreateFile(pkgconfdir,'SLEPc.pc',log)
 if slepc.isinstall:
   modules  = CreateFile(modulesdir,slepc.lversion,log)
@@ -261,12 +259,18 @@ if petsc.precision != '__float128':
   testruns = testruns.union(set(['C_NoF128']))
 if slepc.datadir:
   slepcvars.write('DATAFILESPATH = '+slepc.datadir+'\n')
-  testruns = testruns.union(set(['DATAFILESPATH']))
+  if petsc.scalar == 'complex':
+    testruns = testruns.union(set(['DATAFILESPATH_Complex']))
+  else:
+    testruns = testruns.union(set(['DATAFILESPATH']))
 slepcvars.write('TEST_RUNS = '+' '.join(testruns)+'\n')
 
 # Write initial part of file slepcconf.h
 slepcconf.write('#if !defined(__SLEPCCONF_H)\n')
 slepcconf.write('#define __SLEPCCONF_H\n\n')
+AddDefine(slepcconf,'PETSC_DIR',petsc.dir)
+AddDefine(slepcconf,'PETSC_ARCH',petsc.arch)
+AddDefine(slepcconf,'DIR',slepc.dir)
 AddDefine(slepcconf,'LIB_DIR',os.path.join(slepc.prefixdir,'lib'))
 if slepc.isrepo:
   AddDefine(slepcconf,'VERSION_GIT',slepc.gitrev)
diff --git a/config/install.py b/config/install.py
index aee859d..09acd03 100755
--- a/config/install.py
+++ b/config/install.py
@@ -218,7 +218,9 @@ for dir in dirs:
     if os.path.splitext(dst)[1] == '.'+self.arLibSuffix:
       (result, output) = commands.getstatusoutput(self.ranlib+' '+dst)
     if os.path.splitext(dst)[1] == '.dylib' and os.path.isfile('/usr/bin/install_name_tool'):
-      installName = dst.replace(self.destDir, self.installDir)
+      (result, output) = commands.getstatusoutput('otool -D '+src)
+      oldname = output[output.find("\n")+1:]
+      installName = oldname.replace(self.destDir, self.installDir)
       (result, output) = commands.getstatusoutput('/usr/bin/install_name_tool -id ' + installName + ' ' + dst)
     # preserve the original timestamps - so that the .a vs .so time order is preserved
     shutil.copystat(src,dst)
diff --git a/config/log.py b/config/log.py
index 20bd6d5..3a06107 100644
--- a/config/log.py
+++ b/config/log.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/config/package.py b/config/package.py
index 82ce58a..52923c6 100644
--- a/config/package.py
+++ b/config/package.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -19,21 +19,27 @@
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 
-import os, commands, tempfile, shutil
+import os, sys, commands, tempfile, shutil, urllib, urlparse, tarfile
 import log, argdb
 
 class Package:
 
+  def __init__(self,argdb,log):
+    self.installable     = False
+    self.downloadable    = False
+    self.downloadpackage = 0
+    self.packagedir      = ''
+    self.packagelibs     = []
+    self.packageurl      = ''
+    self.log             = log
+    self.supportsscalar  = ['real', 'complex']
+    self.supportssingle  = False
+    self.supports64bint  = False
+
   def ProcessArgs(self,argdb):
     self.requested = False
     self.havepackage = False
-    if self.downloadable:
-      url,flag,found = argdb.PopUrl('download-'+self.packagename)
-      if found:
-        self.requested = True
-        self.packageurl = url
-        self.downloadpackage = flag
-    else:
+    if self.installable:
       string,found = argdb.PopPath('with-'+self.packagename+'-dir')
       if found:
         self.requested = True
@@ -44,27 +50,117 @@ class Package:
         self.packagelibs = string.split(',')
       if argdb.PopBool('with-'+self.packagename):
         self.requested = True
+    if self.downloadable:
+      url,flag,found = argdb.PopUrl('download-'+self.packagename)
+      if found:
+        if self.requested:
+          self.log.Exit('ERROR: Cannot request both download and install simultaneously')
+        self.requested = True
+        self.download = True
+        self.packageurl = url
+        self.downloadpackage = flag
 
   def Process(self,conf,vars,cmake,petsc,archdir=''):
     self.make = petsc.make
     self.slflag = petsc.slflag
     if self.requested:
       name = self.packagename.upper()
-      if self.downloadable:
-        if self.downloadpackage:
+      if self.downloadpackage:
+        if hasattr(self,'version'):
+          self.log.NewSection('Installing '+name+' version '+self.version+'...')
+        else:
           self.log.NewSection('Installing '+name+'...')
-          self.Install(conf,vars,cmake,petsc,archdir)
-      else:
-        self.log.NewSection('Checking '+name+' library...')
+        self.Precondition(petsc)
+        self.Install(conf,vars,cmake,petsc,archdir)
+      elif self.installable:
+        self.log.NewSection('Checking '+name+'...')
+        self.Precondition(petsc)
         self.Check(conf,vars,cmake,petsc)
 
+  def Precondition(self,petsc):
+    package = self.packagename.upper()
+    if petsc.scalar == 'complex':
+      if 'complex' not in self.supportsscalar:
+        self.log.Exit('ERROR: '+package+' does not support complex scalars.')
+    elif petsc.scalar == 'real':
+      if 'real' not in self.supportsscalar:
+        self.log.Exit('ERROR: '+package+' is supported only with complex scalars.')
+    if petsc.precision == 'single':
+      if not self.supportssingle:
+        self.log.Exit('ERROR: '+package+' is supported only in double precision.')
+    elif petsc.precision != 'double':
+      self.log.Exit('ERROR: precision '+petsc.precision+' is not supported for external packages.')
+    if petsc.ind64 and not self.supports64bint:
+      self.log.Exit('ERROR: '+package+' cannot be used with 64-bit integers.')
+
+  def Download(self,externdir,builddir,prefix=None):
+    # Create externalpackages directory
+    if not os.path.exists(externdir):
+      try:
+        os.mkdir(externdir)
+      except:
+        self.log.Exit('ERROR: Cannot create directory ' + externdir)
+
+    # Check if source is already available
+    if os.path.exists(builddir):
+      self.log.write('Using '+builddir)
+    else:
+
+      # Download tarball
+      url = self.packageurl
+      if url=='':
+        url = self.url
+      localFile = os.path.join(externdir,self.archive)
+      self.log.write('Downloading '+url+' to '+localFile)
+
+      if os.path.exists(localFile):
+        os.remove(localFile)
+      try:
+        urllib.urlretrieve(url, localFile)
+      except Exception, e:
+        filename = os.path.basename(urlparse.urlparse(url)[2])
+        failureMessage = '''\
+Unable to download package %s from: %s
+* If your network is disconnected - please reconnect and rerun ./configure
+* Alternatively, you can download the above URL manually, to /yourselectedlocation/%s
+  and use the configure option:
+  --download-%s=/yourselectedlocation/%s
+''' % (self.packagename, url, filename, self.packagename, filename)
+        self.log.Exit(failureMessage)
+
+      # Uncompress tarball
+      self.log.write('Uncompressing '+localFile+' to directory '+builddir)
+      if os.path.exists(builddir):
+        for root, dirs, files in os.walk(builddir, topdown=False):
+          for name in files:
+            os.remove(os.path.join(root,name))
+          for name in dirs:
+            os.rmdir(os.path.join(root,name))
+      try:
+        if sys.version_info >= (2,5):
+          tar = tarfile.open(localFile, 'r:gz')
+          tar.extractall(path=externdir)
+          tar.close()
+          os.remove(localFile)
+        else:
+          result,output = commands.getstatusoutput('cd '+externdir+'; gunzip '+self.archive+'; tar -xf '+self.archive.split('.gz')[0])
+          os.remove(localFile.split('.gz')[0])
+      except RuntimeError, e:
+        self.log.Exit('Error uncompressing '+self.archive+': '+str(e))
+
+      # Rename directory
+      if prefix is not None:
+        for filename in os.listdir(externdir):
+          if filename.startswith(prefix):
+            os.rename(os.path.join(externdir,filename),builddir)
+
   def ShowHelp(self):
     wd = 31
-    if self.downloadable:
+    if self.downloadable or self.installable:
       print self.packagename.upper()+':'
+    if self.downloadable:
       print ('  --download-'+self.packagename+'[=<fname>]').ljust(wd)+': Download and install '+self.packagename.upper()+' in SLEPc directory'
-    else:
-      print self.packagename.upper()+':'
+    if self.installable:
       print ('  --with-'+self.packagename+'=<bool>').ljust(wd)+': Indicate if you wish to test for '+self.packagename.upper()
       print ('  --with-'+self.packagename+'-dir=<dir>').ljust(wd)+': Indicate the directory for '+self.packagename.upper()+' libraries'
       print ('  --with-'+self.packagename+'-flags=<flags>').ljust(wd)+': Indicate comma-separated flags for linking '+self.packagename.upper()
diff --git a/config/packages/arpack.py b/config/packages/arpack.py
index 4d4e699..c9b5438 100644
--- a/config/packages/arpack.py
+++ b/config/packages/arpack.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -19,26 +19,24 @@
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 
+import os, commands
 import log, package
 
 class Arpack(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename  = 'arpack'
-    self.downloadable = False
-    self.packagedir   = ''
-    self.packagelibs  = []
-    self.log          = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename    = 'arpack'
+    self.installable    = True
+    self.downloadable   = True
+    self.version        = '3.3.0'
+    self.url            = 'https://github.com/opencollab/arpack-ng/archive/'+self.version+'.tar.gz'
+    self.archive        = 'arpack-ng-'+self.version+'.tar.gz'
+    self.dirname        = 'arpack-ng-'+self.version
+    self.supportssingle = True
     self.ProcessArgs(argdb)
 
-  def Check(self,conf,vars,cmake,petsc):
-
-    if (petsc.precision != 'single') & (petsc.precision != 'double'):
-      self.log.Exit('ERROR: ARPACK is supported only in single or double precision.')
-
-    if petsc.ind64:
-      self.log.Exit('ERROR: Cannot use external packages with 64-bit indices.')
-
+  def Functions(self,petsc):
     if petsc.mpiuni:
       if petsc.scalar == 'real':
         if petsc.precision == 'single':
@@ -61,7 +59,11 @@ class Arpack(package.Package):
           functions = ['pcnaupd','pcneupd']
         else:
           functions = ['pznaupd','pzneupd']
+    return functions
 
+
+  def Check(self,conf,vars,cmake,petsc):
+    functions = self.Functions(petsc)
     if self.packagelibs:
       libs = [self.packagelibs]
     else:
@@ -77,3 +79,34 @@ class Arpack(package.Package):
 
     self.FortranLib(conf,vars,cmake,dirs,libs,functions)
 
+
+  def Install(self,conf,vars,cmake,petsc,archdir):
+    externdir = os.path.join(archdir,'externalpackages')
+    builddir  = os.path.join(externdir,self.dirname)
+    self.Download(externdir,builddir)
+
+    # Check for autoreconf
+    result,output = commands.getstatusoutput('autoreconf --help')
+    if result:
+      self.log.Exit('ERROR: --download-arpack requires that the command autoreconf is available on your PATH.')
+
+    # Build package
+    confopt = '--prefix='+archdir+' F77="'+petsc.fc+'" FFLAGS="'+petsc.fc_flags.replace('-Wall','').replace('-Wshadow','')+'"'
+    if not petsc.mpiuni:
+      confopt = confopt+' --enable-mpi'
+    result,output = commands.getstatusoutput('cd '+builddir+'&& sh bootstrap && ./configure '+confopt+' && '+petsc.make+' && '+petsc.make+' install')
+    self.log.write(output)
+    if result:
+      self.log.Exit('ERROR: installation of ARPACK failed.')
+
+    # Check build
+    functions = self.Functions(petsc)
+    if petsc.mpiuni:
+      libs = [['-larpack']]
+    else:
+      libs = [['-lparpack','-larpack']]
+    libDir = os.path.join(archdir,'lib')
+    dirs = [libDir]
+    self.FortranLib(conf,vars,cmake,dirs,libs,functions)
+    self.havepackage = True
+
diff --git a/config/packages/blopex.py b/config/packages/blopex.py
index 374a1e8..c84e785 100644
--- a/config/packages/blopex.py
+++ b/config/packages/blopex.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -19,90 +19,25 @@
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 
-import os, sys, commands
-import urllib, urlparse
+import os, commands, shutil
 import log, package
 
 class Blopex(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename     = 'blopex'
-    self.downloadable    = True
-    self.downloadpackage = 0
-    self.packageurl      = ''
-    self.log             = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename  = 'blopex'
+    self.downloadable = True
+    self.version      = '1.1.2'
+    self.url          = 'http://slepc.upv.es/download/external/blopex-'+self.version+'.tar.gz'
+    self.archive      = 'blopex.tar.gz'
+    self.dirname      = 'blopex-'+self.version
     self.ProcessArgs(argdb)
 
   def Install(self,conf,vars,cmake,petsc,archdir):
-    '''
-    Download and uncompress the BLOPEX tarball
-    '''
-    if petsc.precision != 'double':
-      self.log.Exit('ERROR: BLOPEX is supported only in double precision.')
-
-    if petsc.ind64:
-      self.log.Exit('ERROR: Cannot use external packages with 64-bit indices.')
-
-    packagename = 'blopex-1.1.2'
-    externdir   = os.path.join(archdir,'externalpackages')
-    builddir    = os.path.join(externdir,packagename)
-
-    # Create externalpackages directory
-    if not os.path.exists(externdir):
-      try:
-        os.mkdir(externdir)
-      except:
-        self.log.Exit('ERROR: Cannot create directory ' + externdir)
-
-    # Check if source is already available
-    if os.path.exists(builddir):
-      self.log.write('Using '+builddir)
-    else:
-
-      # Download tarball
-      url = self.packageurl
-      if url=='':
-        url = 'http://slepc.upv.es/download/external/'+packagename+'.tar.gz'
-      archiveZip = 'blopex.tar.gz'
-      localFile = os.path.join(externdir,archiveZip)
-      self.log.write('Downloading '+url+' to '+localFile)
-
-      if os.path.exists(localFile):
-        os.remove(localFile)
-      try:
-        urllib.urlretrieve(url, localFile)
-      except Exception, e:
-        name = 'blopex'
-        filename = os.path.basename(urlparse.urlparse(url)[2])
-        failureMessage = '''\
-Unable to download package %s from: %s
-* If your network is disconnected - please reconnect and rerun ./configure
-* Alternatively, you can download the above URL manually, to /yourselectedlocation/%s
-  and use the configure option:
-  --download-%s=/yourselectedlocation/%s
-''' % (name, url, filename, name, filename)
-        self.log.Exit(failureMessage)
-
-      # Uncompress tarball
-      self.log.write('Uncompressing '+localFile+' to directory '+builddir)
-      if os.path.exists(builddir):
-        for root, dirs, files in os.walk(builddir, topdown=False):
-          for name in files:
-            os.remove(os.path.join(root,name))
-          for name in dirs:
-            os.rmdir(os.path.join(root,name))
-      try:
-        if sys.version_info >= (2,5):
-          import tarfile
-          tar = tarfile.open(localFile, 'r:gz')
-          tar.extractall(path=externdir)
-          tar.close()
-          os.remove(localFile)
-        else:
-          result,output = commands.getstatusoutput('cd '+externdir+'; gunzip '+archiveZip+'; tar -xf '+archiveZip.split('.gz')[0])
-          os.remove(localFile.split('.gz')[0])
-      except RuntimeError, e:
-        self.log.Exit('Error uncompressing '+archiveZip+': '+str(e))
+    externdir = os.path.join(archdir,'externalpackages')
+    builddir  = os.path.join(externdir,self.dirname)
+    self.Download(externdir,builddir)
 
     # Configure
     g = open(os.path.join(builddir,'Makefile.inc'),'w')
@@ -119,6 +54,8 @@ Unable to download package %s from: %s
     # Build package
     result,output = commands.getstatusoutput('cd '+builddir+'&&'+petsc.make+' clean &&'+petsc.make)
     self.log.write(output)
+    if result:
+      self.log.Exit('ERROR: installation of BLOPEX failed.')
 
     # Move files
     incDir = os.path.join(archdir,'include')
@@ -126,12 +63,21 @@ Unable to download package %s from: %s
     os.rename(os.path.join(builddir,'lib','libBLOPEX.'+petsc.ar_lib_suffix),os.path.join(libDir,'libBLOPEX.'+petsc.ar_lib_suffix))
     for root, dirs, files in os.walk(os.path.join(builddir,'include')):
       for name in files:
-        os.rename(os.path.join(builddir,'include',name),os.path.join(incDir,name))
+        shutil.copyfile(os.path.join(builddir,'include',name),os.path.join(incDir,name))
 
     if 'rpath' in petsc.slflag:
       l = petsc.slflag + libDir + ' -L' + libDir + ' -lBLOPEX'
     else:
       l = '-L' + libDir + ' -lBLOPEX'
+    f = '-I' + incDir
+
+    # Check build
+    if petsc.scalar == 'real':
+      functions = ['lobpcg_solve_double']
+    else:
+      functions = ['lobpcg_solve_complex']
+    if not self.Link(functions,[],[l]+[f]):
+      self.log.Exit('\nERROR: Unable to link with downloaded BLOPEX')
 
     # Write configuration files
     conf.write('#ifndef SLEPC_HAVE_BLOPEX\n#define SLEPC_HAVE_BLOPEX 1\n#endif\n\n')
@@ -140,5 +86,5 @@ Unable to download package %s from: %s
     cmake.write('find_library (BLOPEX_LIB BLOPEX HINTS '+ libDir +')\n')
 
     self.havepackage = True
-    self.packageflags = [l] + ['-I' + incDir]
+    self.packageflags = [l] + [f]
 
diff --git a/config/packages/blzpack.py b/config/packages/blzpack.py
index e13ccf7..9ccba31 100644
--- a/config/packages/blzpack.py
+++ b/config/packages/blzpack.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,24 +24,14 @@ import log, package
 class Blzpack(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename  = 'blzpack'
-    self.downloadable = False
-    self.packagedir   = ''
-    self.packagelibs  = []
-    self.log          = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename    = 'blzpack'
+    self.installable    = True
+    self.supportsscalar = ['real']
+    self.supportssingle = True
     self.ProcessArgs(argdb)
 
   def Check(self,conf,vars,cmake,petsc):
-
-    if petsc.scalar == 'complex':
-      self.log.Exit('ERROR: BLZPACK does not support complex numbers.')
-
-    if (petsc.precision != 'single') & (petsc.precision != 'double'):
-      self.log.Exit('ERROR: BLZPACK is supported only in single or double precision.')
-
-    if petsc.ind64:
-      self.log.Exit('ERROR: Cannot use external packages with 64-bit indices.')
-
     if petsc.precision == 'single':
       functions = ['blzdrs']
     else:
diff --git a/config/packages/feast.py b/config/packages/feast.py
index f4091f3..4dd0ef5 100644
--- a/config/packages/feast.py
+++ b/config/packages/feast.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,24 +24,14 @@ import log, package
 class Feast(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename  = 'feast'
-    self.downloadable = False
-    self.packagedir   = ''
-    self.packagelibs  = []
-    self.log          = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename    = 'feast'
+    self.installable    = True
+    self.supportsscalar = ['complex']
+    self.supportssingle = True
     self.ProcessArgs(argdb)
 
   def Check(self,conf,vars,cmake,petsc):
-
-    if petsc.scalar != 'complex':
-      self.log.Exit('ERROR: FEAST is supported only with complex numbers.')
-
-    if (petsc.precision != 'single') & (petsc.precision != 'double'):
-      self.log.Exit('ERROR: FEAST is supported only in single or double precision.')
-
-    if petsc.ind64:
-      self.log.Exit('ERROR: Cannot use external packages with 64-bit indices.')
-
     functions = ['feastinit']
     if petsc.scalar == 'real':
       if petsc.precision == 'single':
diff --git a/config/packages/lapack.py b/config/packages/lapack.py
index 8a46bf4..54b08b8 100644
--- a/config/packages/lapack.py
+++ b/config/packages/lapack.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,9 +24,8 @@ import log, package
 class Lapack(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename  = 'lapack'
-    self.downloadable = False
-    self.log          = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename = 'lapack'
 
   def ShowInfo(self):
     if hasattr(self,'missing'):
@@ -47,11 +46,11 @@ class Lapack(package.Package):
   def Check(self,conf,vars,cmake,petsc):
 
     # LAPACK standard functions
-    l = ['laev2','gehrd','lanhs','lange','getri','trexc','trevc','geevx','ggevx','gelqf','gesdd','tgexc','tgevc','pbtrf','stedc','hsein','larfg','larf','trsen','tgsen','lacpy','lascl','lansy','laset']
+    l = ['laev2','gehrd','lanhs','lange','trexc','trevc','geevx','gees','ggev','ggevx','gelqf','geqp3','gesdd','tgexc','tgevc','pbtrf','stedc','hsein','larfg','larf','lacpy','lascl','lansy','laset','trsyl','trtri']
 
     # LAPACK functions with different real and complex versions
     if petsc.scalar == 'real':
-      l += ['orghr','syevr','syevd','sytrd','sygvd','ormlq','orgqr','orgtr']
+      l += ['orghr','syevr','syevd','sytrd','sygvd','ormlq','orgtr']
       if petsc.precision == 'single':
         prefix = 's'
       elif petsc.precision == '__float128':
@@ -59,7 +58,7 @@ class Lapack(package.Package):
       else:
         prefix = 'd'
     else:
-      l += ['unghr','heevr','heevd','hetrd','hegvd','unmlq','ungqr','ungtr']
+      l += ['unghr','heevr','heevd','hetrd','hegvd','unmlq','ungtr']
       if petsc.precision == 'single':
         prefix = 'c'
       elif petsc.precision == '__float128':
@@ -73,7 +72,7 @@ class Lapack(package.Package):
       functions.append(prefix + i)
 
     # in this case, the real name represents both versions
-    namesubst = {'unghr':'orghr', 'heevr':'syevr', 'heevd':'syevd', 'hetrd':'sytrd', 'hegvd':'sygvd', 'unmlq':'ormlq', 'ungqr':'orgqr', 'ungtr':'orgtr'}
+    namesubst = {'unghr':'orghr', 'heevr':'syevr', 'heevd':'syevd', 'hetrd':'sytrd', 'hegvd':'sygvd', 'unmlq':'ormlq', 'ungtr':'orgtr'}
 
     # LAPACK functions which are always used in real version
     if petsc.precision == 'single':
diff --git a/config/packages/petsc.py b/config/packages/petsc.py
index a9281e2..f301bd7 100644
--- a/config/packages/petsc.py
+++ b/config/packages/petsc.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,9 +24,8 @@ import package, os, sys, commands
 class PETSc(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename  = 'petsc'
-    self.downloadable = False
-    self.log          = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename = 'petsc'
 
   def Check(self):
     self.havepackage = self.Link([],[],[])
@@ -115,6 +114,8 @@ class PETSc(package.Package):
           self.cc_flags = v
         elif k == 'FC' and not v=='':
           self.fc = v
+        elif k == 'FC_FLAGS':
+          self.fc_flags = v
         elif k == 'AR':
           self.ar = v
         elif k == 'AR_FLAGS':
@@ -139,6 +140,8 @@ class PETSc(package.Package):
     self.mpiuni = False
     self.debug = False
     self.singlelib = False
+    self.blaslapackunderscore = False
+    self.blaslapackint64 = False
     try:
       f = open(petscconf_h)
       for l in f.readlines():
@@ -151,6 +154,10 @@ class PETSc(package.Package):
           self.debug = True
         elif len(l)==3 and l[0]=='#define' and l[1]=='PETSC_USE_SINGLE_LIBRARY' and l[2]=='1':
           self.singlelib = True
+        elif len(l)==3 and l[0]=='#define' and l[1]=='PETSC_BLASLAPACK_UNDERSCORE' and l[2]=='1':
+          self.blaslapackunderscore = True
+        elif len(l)==3 and l[0]=='#define' and l[1]=='HAVE_64BIT_BLAS_INDICES' and l[2]=='1':
+          self.blaslapackint64 = True
         elif self.isinstall and len(l)==3 and l[0]=='#define' and l[1]=='PETSC_ARCH':
           self.arch = l[2].strip('"')
       f.close()
diff --git a/config/packages/primme.py b/config/packages/primme.py
index bf3a691..732b75c 100644
--- a/config/packages/primme.py
+++ b/config/packages/primme.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -19,27 +19,23 @@
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 
-import os
+import os, commands, shutil
 import log, package
 
 class Primme(package.Package):
 
   def __init__(self,argdb,log):
+    package.Package.__init__(self,argdb,log)
     self.packagename  = 'primme'
-    self.downloadable = False
-    self.packagedir   = ''
-    self.packagelibs  = []
-    self.log          = log
+    self.installable  = True
+    self.downloadable = True
+    self.version      = '1.2.2'
+    self.url          = 'https://github.com/primme/primme/tarball/release-'+self.version
+    self.archive      = 'primme-'+self.version+'.tar.gz'
+    self.dirname      = 'PRIMME'
     self.ProcessArgs(argdb)
 
   def Check(self,conf,vars,cmake,petsc):
-
-    if petsc.precision != 'double':
-      self.log.Exit('ERROR: PRIMME is supported only in double precision.')
-
-    if petsc.ind64:
-      self.log.Exit('ERROR: Cannot use external packages with 64-bit indices.')
-
     functions_base = ['primme_set_method','primme_Free','primme_initialize']
     if self.packagedir:
       dirs = [self.packagedir]
@@ -79,3 +75,65 @@ class Primme(package.Package):
     self.log.Println('ERROR: In directories '+' '.join(dirs))
     self.log.Println('ERROR: With flags '+' '.join(libs))
     self.log.Exit('')
+
+
+  def Install(self,conf,vars,cmake,petsc,archdir):
+    externdir = os.path.join(archdir,'externalpackages')
+    builddir  = os.path.join(externdir,self.dirname)
+    self.Download(externdir,builddir,'primme-')
+
+    # Configure
+    g = open(os.path.join(builddir,'Make_flags'),'w')
+    g.write('LIBRARY     = libprimme.a\n')
+    g.write('DLIBRARY    = libdprimme.a\n')
+    g.write('ZLIBRARY    = libzprimme.a\n')
+    g.write('CC          = '+petsc.cc+'\n')
+    g.write('DEFINES     = ')
+    if petsc.blaslapackunderscore:
+      g.write('-DF77UNDERSCORE ')
+    if petsc.blaslapackint64:
+      g.write('-DPRIMME_BLASINT_SIZE=64')
+    g.write('\n')
+    g.write('INCLUDE     = \n')
+    g.write('CFLAGS      = '+petsc.cc_flags.replace('-Wall','').replace('-Wshadow','')+'\n')
+    g.write('RANLIB      = '+petsc.ranlib+'\n')
+    g.close()
+
+    # Build package
+    result,output = commands.getstatusoutput('cd '+builddir+'&&'+petsc.make+' clean &&'+petsc.make)
+    self.log.write(output)
+    if result:
+      self.log.Exit('ERROR: installation of PRIMME failed.')
+
+    # Move files
+    incDir = os.path.join(archdir,'include')
+    libDir = os.path.join(archdir,'lib')
+    os.rename(os.path.join(builddir,'libprimme.'+petsc.ar_lib_suffix),os.path.join(libDir,'libprimme.'+petsc.ar_lib_suffix))
+    for name in ['primme.h','primme_f77.h','Complexz.h']:
+      shutil.copyfile(os.path.join(builddir,'PRIMMESRC','COMMONSRC',name),os.path.join(incDir,name))
+
+    if 'rpath' in petsc.slflag:
+      l = petsc.slflag + libDir + ' -L' + libDir + ' -lprimme'
+    else:
+      l = '-L' + libDir + ' -lprimme'
+    f = '-I' + incDir
+
+    # Check build
+    functions_base = ['primme_set_method','primme_Free','primme_initialize']
+    if petsc.scalar == 'real':
+      functions = functions_base + ['dprimme']
+    else:
+      functions = functions_base + ['zprimme']
+    if not self.Link(functions,[],[l]+[f]):
+      self.log.Exit('\nERROR: Unable to link with downloaded PRIMME')
+
+    # Write configuration files
+    conf.write('#ifndef SLEPC_HAVE_PRIMME\n#define SLEPC_HAVE_PRIMME 1\n#endif\n\n')
+    vars.write('PRIMME_LIB = ' + l + '\n')
+    cmake.write('set (SLEPC_HAVE_PRIMME YES)\n')
+    cmake.write('find_library (PRIMME_LIB primme HINTS '+ libDir +')\n')
+    cmake.write('find_path (PRIMME_INCLUDE primme.h ' + incDir + ')\n')
+
+    self.havepackage = True
+    self.packageflags = [l] + [f]
+
diff --git a/config/packages/slepc.py b/config/packages/slepc.py
index 6f671b7..264d314 100644
--- a/config/packages/slepc.py
+++ b/config/packages/slepc.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/config/packages/sowing.py b/config/packages/sowing.py
index 91eb81d..1998a17 100644
--- a/config/packages/sowing.py
+++ b/config/packages/sowing.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -25,17 +25,13 @@ import log, package
 class Sowing(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename     = 'sowing'
-    self.downloadable    = True
-    self.downloadpackage = 0
-    self.packageurl      = ''
-    self.log             = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename  = 'sowing'
+    self.downloadable = True
+    self.url          = 'https://bitbucket.org/petsc/pkg-sowing.git'
     self.ProcessArgs(argdb)
 
   def Install(self,archdir,make):
-    '''
-    Download and install Sowing
-    '''
     name = self.packagename.upper()
     self.log.NewSection('Installing '+name+'...')
 
@@ -54,7 +50,7 @@ class Sowing(package.Package):
     else: # clone Sowing repo
       url = self.packageurl
       if url=='':
-        url = 'https://bitbucket.org/petsc/pkg-sowing.git'
+        url = self.url
       try:
         result,output = commands.getstatusoutput('cd '+externdir+'&& git clone '+url)
         self.log.write(output)
diff --git a/config/packages/trlan.py b/config/packages/trlan.py
index 079b8a9..7afa8ec 100644
--- a/config/packages/trlan.py
+++ b/config/packages/trlan.py
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -19,29 +19,24 @@
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
 
+import os, commands
 import log, package
 
 class Trlan(package.Package):
 
   def __init__(self,argdb,log):
-    self.packagename  = 'trlan'
-    self.downloadable = False
-    self.packagedir   = ''
-    self.packagelibs  = []
-    self.log          = log
+    package.Package.__init__(self,argdb,log)
+    self.packagename    = 'trlan'
+    self.installable    = True
+    self.downloadable   = True
+    self.version        = '201009'
+    self.url            = 'https://codeforge.lbl.gov/frs/download.php/210/trlan-'+self.version+'.tar.gz'
+    self.archive        = 'trlan-'+self.version+'.tar.gz'
+    self.dirname        = 'trlan-'+self.version
+    self.supportsscalar = ['real']
     self.ProcessArgs(argdb)
 
   def Check(self,conf,vars,cmake,petsc):
-
-    if petsc.scalar == 'complex':
-      self.log.Exit('ERROR: TRLAN is not available for complex scalars.')
-
-    if petsc.precision != 'double':
-      self.log.Exit('ERROR: TRLAN is supported only in double precision.')
-
-    if petsc.ind64:
-      self.log.Exit('ERROR: Cannot use external packages with 64-bit indices.')
-
     functions = ['trlan77']
     if self.packagelibs:
       libs = [self.packagelibs]
@@ -57,3 +52,47 @@ class Trlan(package.Package):
       dirs = self.GenerateGuesses('TRLan')
 
     self.FortranLib(conf,vars,cmake,dirs,libs,functions)
+
+
+  def Install(self,conf,vars,cmake,petsc,archdir):
+    externdir = os.path.join(archdir,'externalpackages')
+    builddir  = os.path.join(externdir,self.dirname)
+    self.Download(externdir,builddir)
+
+    # Configure
+    g = open(os.path.join(builddir,'Make.inc'),'w')
+    g.write('FC     = '+petsc.fc+'\n')
+    g.write('F90    = '+petsc.fc+'\n')
+    g.write('FFLAGS = '+petsc.fc_flags.replace('-Wall','').replace('-Wshadow','')+'\n')
+    g.write('SHELL  = /bin/sh\n')
+    g.close()
+
+    # Build package
+    if petsc.mpiuni:
+      target = 'lib'
+    else:
+      target = 'plib'
+    result,output = commands.getstatusoutput('cd '+builddir+'&&'+petsc.make+' clean &&'+petsc.make+' '+target)
+    self.log.write(output)
+    if result:
+      self.log.Exit('ERROR: installation of TRLAN failed.')
+
+    # Move files
+    libDir = os.path.join(archdir,'lib')
+    if petsc.mpiuni:
+      libName = 'libtrlan.a'
+    else:
+      libName = 'libtrlan_mpi.a'
+    os.rename(os.path.join(builddir,libName),os.path.join(libDir,libName))
+
+    # Check build
+    functions = ['trlan77']
+    if petsc.mpiuni:
+      libs = [['-ltrlan']]
+    else:
+      libs = [['-ltrlan_mpi']]
+    libDir = os.path.join(archdir,'lib')
+    dirs = [libDir]
+    self.FortranLib(conf,vars,cmake,dirs,libs,functions)
+    self.havepackage = True
+
diff --git a/docs/changes.htm b/docs/changes.htm
index 397059f..58359bd 100644
--- a/docs/changes.htm
+++ b/docs/changes.htm
@@ -159,12 +159,44 @@ ul.changes li {
     <td> * </td>
     <td> Jun 2015 </td>
   </tr>
+  <tr>
+    <td> 3.7 </td>
+    <td> 3.7 </td>
+    <td> * </td>
+    <td> May 2016 </td>
+  </tr>
 </table>
 
 <tr><td>
 
 <p>
 <font size="3" face="Arial, Helvetica, sans-serif"><b>
+Changes in Version 3.7</font></b>
+</p>
+
+<ul class=changes>
+  <li> NEP: new solver 'nleigs' that implements a (rational) Krylov method operating
+       on a companion-type linearization of a rational interpolant of the nonlinear function.
+  <li> PEP: the 'jd' solver can now compute more than one eigenpair.
+  <li> MFN: added a new solver 'krylov' that works for different functions,
+       not only the exponential. The solver available in previous versions
+       has been renamed to 'expokit'.
+  <li> EPS: in spectrum slicing in multi-communicator mode now it is possible to
+       update the problem matrices directly on the sub-communicators.
+  <li> EPS: the contour integral solver now provides Chebyshev quadrature rule and
+       Hankel extraction; all options are documented in STR-11.
+  <li> Now most solvers allow a user-defined criterion to stop iterating based on a
+       callback function.
+  <li> Optimizes solution of linear systems in Newton refinement for PEP and NEP.
+  <li> Added download option for most external packages.
+  <li> GPU support updated to use VECCUDA instead of VECCUSP, now including complex scalars.
+  <li> Interface changes: EPS_CONV_EIG has been renamed to EPS_CONV_REL;
+       BVAXPY has been removed, use BVMult instead;
+       BVSetRandom no longer takes a PetscRandom argument, use BVSetRandomContext instead.
+</ul>
+
+<p>
+<font size="3" face="Arial, Helvetica, sans-serif"><b>
 Changes in Version 3.6</font></b>
 </p>
 
@@ -229,8 +261,8 @@ Changes in Version 3.5</font></b>
     this functionality.
   <li>
     Interface changes: SVDSetTransposeMode has been renamed to SVDSetImplicitTranspose;
-    in STSHIFT the sign of sigma is the opposite to previous versions.
-    EPSJDSetBOrth now takes a boolean argument instead of an enum.</font>
+    in STSHIFT the sign of sigma is the opposite to previous versions;
+    EPSJDSetBOrth now takes a boolean argument instead of an enum.
 </ul>
 
 <p>
@@ -544,6 +576,5 @@ Changes in Version 2.1.5</font></b>
     Added call to MatGetInertia in BLZPACK interface.
 </ul>
 <p> </p>
-<p><b><font size="3" face="Arial, Helvetica, sans-serif"></font></b></p>
       </body>
 </html>
diff --git a/docs/index.html b/docs/index.html
index 3a0cd8f..682f80c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body bgcolor="#FFFFFF" text="#000000">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/index.html "><small>Report Typos and Errors</small></a></div>
 <div align ="center">
 [ Manual 
 | <a href="instal.htm">Installation</a> 
diff --git a/docs/instal.htm b/docs/instal.htm
index 78f3f40..f02b4b3 100644
--- a/docs/instal.htm
+++ b/docs/instal.htm
@@ -32,14 +32,14 @@
 	The main steps for the installation are:</p> 
       <ol>
         <li style="padding-top: 0.5em">
-          Unbundle the distribution file <strong>slepc-3.6.0.tgz</strong> with a usual 
-    command such as <code>tar xzf slepc-3.6.0.tgz</code>. 
+          Unbundle the distribution file <strong>slepc-3.7.0.tgz</strong> with a usual 
+    command such as <code>tar xzf slepc-3.7.0.tgz</code>. 
     This will create a directory and unpack the software there.<br>
           </li>
         <li style="padding-top: 0.5em">Set the environment variable <code>SLEPC_DIR</code> 
     to the full path of the SLEPc home directory, for example,<br>
     <div style="padding-top: 0.4em; padding-bottom: 0.4em;">
-      <code style="margin-left: 1cm">export SLEPC_DIR=/home/username/slepc-3.6.0</code><br>
+      <code style="margin-left: 1cm">export SLEPC_DIR=/home/username/slepc-3.7.0</code><br>
     </div>
     In addition to this variable, <code>PETSC_DIR</code> 
     and <code>PETSC_ARCH</code> must also be set appropriately.<br>
diff --git a/docs/makefile b/docs/makefile
index 4698d92..95b745f 100644
--- a/docs/makefile
+++ b/docs/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #     
diff --git a/docs/makefile.html b/docs/makefile.html
index 5234554..c1911cc 100644
--- a/docs/makefile.html
+++ b/docs/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:43+00:00">
+<meta name="date" content="2016-05-16T10:34:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#     </font>
diff --git a/docs/manualpages/BV/BV.html b/docs/manualpages/BV/BV.html
index 900a6ea..073405e 100644
--- a/docs/manualpages/BV/BV.html
+++ b/docs/manualpages/BV/BV.html
@@ -6,8 +6,8 @@
 <TITLE>BV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BV</H1>
 Basis vectors, SLEPc object representing a collection of vectors that typically constitute a basis of a subspace. 
diff --git a/docs/manualpages/BV/BVAXPY.html b/docs/manualpages/BV/BVAXPY.html
deleted file mode 100644
index 3d0f07a..0000000
--- a/docs/manualpages/BV/BVAXPY.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/BV/BVAXPY.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>BVAXPY</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVAXPY.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>BVAXPY</H1>
-Computes Y = Y + alpha*X. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVAXPY.html#BVAXPY">BVAXPY</A>(<A HREF="../BV/BV.html#BV">BV</A> Y,PetscScalar alpha,<A HREF="../BV/BV.html#BV">BV</A> X)
-</PRE>
-Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
-<P>
-<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y,X   </B></TD><TD> - basis vectors
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - scalar
-</TD></TR></TABLE>
-<P>
-<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>Y     </B> - the modified basis vectors
-<br>
-<P>
-<H3><FONT COLOR="#883300">Notes</FONT></H3>
-X and Y must be different objects, with compatible dimensions.
-The effect is the same as doing a VecAXPY for each of the active
-columns (excluding the leading ones).
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../BV/BVMult.html#BVMult">BVMult</A>(), <A HREF="../BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvops.c.html#BVAXPY">src/sys/classes/bv/interface/bvops.c</A>
-<BR><A HREF="./index.html">Index of all BV routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/BV/BVAppendOptionsPrefix.html b/docs/manualpages/BV/BVAppendOptionsPrefix.html
index 960a758..989e311 100644
--- a/docs/manualpages/BV/BVAppendOptionsPrefix.html
+++ b/docs/manualpages/BV/BVAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>BVAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../BV/BV.html#BV">BV</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,const char *prefix)
+PetscErrorCode BVAppendOptionsPrefix(BV bv,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../BV/BV.html#BV">BV</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../BV/BV.html#BV">BV</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVApplyMatrix.html b/docs/manualpages/BV/BVApplyMatrix.html
index 25e7d41..d654be6 100644
--- a/docs/manualpages/BV/BVApplyMatrix.html
+++ b/docs/manualpages/BV/BVApplyMatrix.html
@@ -6,28 +6,28 @@
 <TITLE>BVApplyMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVApplyMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVApplyMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVApplyMatrix</H1>
 Multiplies a vector by the matrix representation of the inner product. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec x,Vec y)
+PetscErrorCode BVApplyMatrix(BV bv,Vec x,Vec y)
 </PRE>
 Neighbor-wise Collective on <A HREF="../BV/BV.html#BV">BV</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y  </B> - the result
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y  </B></TD><TD> - the result
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If no matrix was specified this function copies the vector.
diff --git a/docs/manualpages/BV/BVApplyMatrixBV.html b/docs/manualpages/BV/BVApplyMatrixBV.html
index 4cb2a98..c870d19 100644
--- a/docs/manualpages/BV/BVApplyMatrixBV.html
+++ b/docs/manualpages/BV/BVApplyMatrixBV.html
@@ -6,26 +6,25 @@
 <TITLE>BVApplyMatrixBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVApplyMatrixBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVApplyMatrixBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVApplyMatrixBV</H1>
 Multiplies the <A HREF="../BV/BV.html#BV">BV</A> vectors by the matrix representation of the inner product. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</A>(<A HREF="../BV/BV.html#BV">BV</A> X,<A HREF="../BV/BV.html#BV">BV</A> Y)
+PetscErrorCode BVApplyMatrixBV(BV X,BV Y)
 </PRE>
 Neighbor-wise Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - the basis vectors context
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - the basis vectors to store the result (optional)
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - the basis vectors to store the result (optional)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 This function computes Y = B*X, where B is the matrix given with
diff --git a/docs/manualpages/BV/BVCopy.html b/docs/manualpages/BV/BVCopy.html
index 7f552f2..bd19a4c 100644
--- a/docs/manualpages/BV/BVCopy.html
+++ b/docs/manualpages/BV/BVCopy.html
@@ -6,25 +6,25 @@
 <TITLE>BVCopy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVCopy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVCopy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVCopy</H1>
 Copies a basis vector object into another one, W <- V. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVCopy.html#BVCopy">BVCopy</A>(<A HREF="../BV/BV.html#BV">BV</A> V,<A HREF="../BV/BV.html#BV">BV</A> W)
+PetscErrorCode BVCopy(BV V,BV W)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>V </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>W </B> - the copy
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W </B></TD><TD> - the copy
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Both V and W must be distributed in the same manner; local copies are
diff --git a/docs/manualpages/BV/BVCopyColumn.html b/docs/manualpages/BV/BVCopyColumn.html
index 70cb3d5..537cb14 100644
--- a/docs/manualpages/BV/BVCopyColumn.html
+++ b/docs/manualpages/BV/BVCopyColumn.html
@@ -6,25 +6,25 @@
 <TITLE>BVCopyColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVCopyColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVCopyColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVCopyColumn</H1>
 Copies the values from one of the columns to another one. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt j,PetscInt i)
+PetscErrorCode BVCopyColumn(BV V,PetscInt j,PetscInt i)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the number of the source column
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the number of the source column
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i </B></TD><TD> - the number of the destination column
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i </B></TD><TD> - the number of the destination column
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVCopyVec.html b/docs/manualpages/BV/BVCopyVec.html
index c9f1593..e4e1b49 100644
--- a/docs/manualpages/BV/BVCopyVec.html
+++ b/docs/manualpages/BV/BVCopyVec.html
@@ -6,28 +6,28 @@
 <TITLE>BVCopyVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVCopyVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVCopyVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVCopyVec</H1>
 Copies one of the columns of a basis vectors object into a Vec. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVCopyVec.html#BVCopyVec">BVCopyVec</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt j,Vec w)
+PetscErrorCode BVCopyVec(BV V,PetscInt j,Vec w)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column number to be copied
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column number to be copied
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>w </B> - the copied column
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>w </B></TD><TD> - the copied column
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Both V and w must be distributed in the same manner; local copies are done.
diff --git a/docs/manualpages/BV/BVCreate.html b/docs/manualpages/BV/BVCreate.html
index 44b9f51..9774780 100644
--- a/docs/manualpages/BV/BVCreate.html
+++ b/docs/manualpages/BV/BVCreate.html
@@ -6,25 +6,25 @@
 <TITLE>BVCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVCreate</H1>
 Creates a basis vectors context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVCreate.html#BVCreate">BVCreate</A>(MPI_Comm comm,<A HREF="../BV/BV.html#BV">BV</A> *newbv)
+PetscErrorCode BVCreate(MPI_Comm comm,BV *newbv)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bv </B> - location to put the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - location to put the basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/BV/BVCreateVec.html b/docs/manualpages/BV/BVCreateVec.html
index e886c7d..bcc14e1 100644
--- a/docs/manualpages/BV/BVCreateVec.html
+++ b/docs/manualpages/BV/BVCreateVec.html
@@ -6,25 +6,25 @@
 <TITLE>BVCreateVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVCreateVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVCreateVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVCreateVec</H1>
 Creates a new Vec object with the same type and dimensions as the columns of the basis vectors object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVCreateVec.html#BVCreateVec">BVCreateVec</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec *v)
+PetscErrorCode BVCreateVec(BV bv,Vec *v)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>v  </B> - the new vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v  </B></TD><TD> - the new vector
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The user is responsible of destroying the returned vector.
diff --git a/docs/manualpages/BV/BVDestroy.html b/docs/manualpages/BV/BVDestroy.html
index 5d20d9c..cda5ac9 100644
--- a/docs/manualpages/BV/BVDestroy.html
+++ b/docs/manualpages/BV/BVDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>BVDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDestroy</H1>
 Destroys <A HREF="../BV/BV.html#BV">BV</A> context that was created with <A HREF="../BV/BVCreate.html#BVCreate">BVCreate</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDestroy.html#BVDestroy">BVDestroy</A>(<A HREF="../BV/BV.html#BV">BV</A> *bv)
+PetscErrorCode BVDestroy(BV *bv)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/BV/BVDot.html b/docs/manualpages/BV/BVDot.html
index d0a4c5a..b3c8152 100644
--- a/docs/manualpages/BV/BVDot.html
+++ b/docs/manualpages/BV/BVDot.html
@@ -6,28 +6,28 @@
 <TITLE>BVDot</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDot.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDot.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDot</H1>
 Computes the 'block-dot' product of two basis vectors objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDot.html#BVDot">BVDot</A>(<A HREF="../BV/BV.html#BV">BV</A> X,<A HREF="../BV/BV.html#BV">BV</A> Y,Mat M)
+PetscErrorCode BVDot(BV X,BV Y,Mat M)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X, Y </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X, Y </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M    </B></TD><TD> - Mat object where the result must be placed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M    </B></TD><TD> - Mat object where the result must be placed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>M    </B> - the resulting matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M    </B></TD><TD> - the resulting matrix
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is the generalization of VecDot() for a collection of vectors, M = Y^H*X.
diff --git a/docs/manualpages/BV/BVDotColumn.html b/docs/manualpages/BV/BVDotColumn.html
index 97bfc75..e933b5b 100644
--- a/docs/manualpages/BV/BVDotColumn.html
+++ b/docs/manualpages/BV/BVDotColumn.html
@@ -6,28 +6,28 @@
 <TITLE>BVDotColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDotColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDotColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDotColumn</H1>
 Computes multiple dot products of a column against all the previous columns of a <A HREF="../BV/BV.html#BV">BV</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDotColumn.html#BVDotColumn">BVDotColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> X,PetscInt j,PetscScalar *m)
+PetscErrorCode BVDotColumn(BV X,PetscInt j,PetscScalar *m)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column index
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>m </B> - an array where the result must be placed
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result must be placed
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This operation is equivalent to <A HREF="../BV/BVDotVec.html#BVDotVec">BVDotVec</A>() but it uses column j of X
diff --git a/docs/manualpages/BV/BVDotColumnBegin.html b/docs/manualpages/BV/BVDotColumnBegin.html
index 8e336fc..03c9c82 100644
--- a/docs/manualpages/BV/BVDotColumnBegin.html
+++ b/docs/manualpages/BV/BVDotColumnBegin.html
@@ -6,24 +6,24 @@
 <TITLE>BVDotColumnBegin</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDotColumnBegin.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDotColumnBegin.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDotColumnBegin</H1>
 Starts a split phase dot product computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</A>(<A HREF="../BV/BV.html#BV">BV</A> X,PetscInt j,PetscScalar *m)
+PetscErrorCode BVDotColumnBegin(BV X,PetscInt j,PetscScalar *m)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column index
+</TD></TR></TABLE>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result will go (can be NULL)
 </TD></TR></TABLE>
-<DT><B>m </B> - an array where the result will go (can be NULL)
-<br>
 </TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVDotColumnEnd.html b/docs/manualpages/BV/BVDotColumnEnd.html
index d257f1a..c928644 100644
--- a/docs/manualpages/BV/BVDotColumnEnd.html
+++ b/docs/manualpages/BV/BVDotColumnEnd.html
@@ -6,27 +6,26 @@
 <TITLE>BVDotColumnEnd</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDotColumnEnd.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDotColumnEnd.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDotColumnEnd</H1>
 Ends a split phase dot product computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</A>(<A HREF="../BV/BV.html#BV">BV</A> X,PetscInt j,PetscScalar *m)
+PetscErrorCode BVDotColumnEnd(BV X,PetscInt j,PetscScalar *m)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column index
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result will go
 </TD></TR></TABLE>
-<DT><B>m </B> - an array where the result will go
-<br>
-</TABLE>
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
 Each call to <A HREF="../BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</A>() should be paired with a call to <A HREF="../BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</A>().
 <P>
 
diff --git a/docs/manualpages/BV/BVDotVec.html b/docs/manualpages/BV/BVDotVec.html
index e8ba577..2b0ccaa 100644
--- a/docs/manualpages/BV/BVDotVec.html
+++ b/docs/manualpages/BV/BVDotVec.html
@@ -6,28 +6,28 @@
 <TITLE>BVDotVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDotVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDotVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDotVec</H1>
 Computes multiple dot products of a vector against all the column vectors of a <A HREF="../BV/BV.html#BV">BV</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDotVec.html#BVDotVec">BVDotVec</A>(<A HREF="../BV/BV.html#BV">BV</A> X,Vec y,PetscScalar *m)
+PetscErrorCode BVDotVec(BV X,Vec y,PetscScalar *m)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - a vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - a vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>m </B> - an array where the result must be placed
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result must be placed
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is analogue to VecMDot(), but using <A HREF="../BV/BV.html#BV">BV</A> to represent a collection
diff --git a/docs/manualpages/BV/BVDotVecBegin.html b/docs/manualpages/BV/BVDotVecBegin.html
index 914a02e..17d7489 100644
--- a/docs/manualpages/BV/BVDotVecBegin.html
+++ b/docs/manualpages/BV/BVDotVecBegin.html
@@ -6,23 +6,23 @@
 <TITLE>BVDotVecBegin</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDotVecBegin.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDotVecBegin.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDotVecBegin</H1>
 Starts a split phase dot product computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</A>(<A HREF="../BV/BV.html#BV">BV</A> X,Vec y,PetscScalar *m)
+PetscErrorCode BVDotVecBegin(BV X,Vec y,PetscScalar *m)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - a vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - a vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result will go (can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result will go (can be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVDotVecEnd.html b/docs/manualpages/BV/BVDotVecEnd.html
index 0c398d9..ebd6889 100644
--- a/docs/manualpages/BV/BVDotVecEnd.html
+++ b/docs/manualpages/BV/BVDotVecEnd.html
@@ -6,23 +6,23 @@
 <TITLE>BVDotVecEnd</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDotVecEnd.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDotVecEnd.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDotVecEnd</H1>
 Ends a split phase dot product computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</A>(<A HREF="../BV/BV.html#BV">BV</A> X,Vec y,PetscScalar *m)
+PetscErrorCode BVDotVecEnd(BV X,Vec y,PetscScalar *m)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - a vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - a vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result will go
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - an array where the result will go
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVDuplicate.html b/docs/manualpages/BV/BVDuplicate.html
index bb35abc..beb763e 100644
--- a/docs/manualpages/BV/BVDuplicate.html
+++ b/docs/manualpages/BV/BVDuplicate.html
@@ -6,25 +6,25 @@
 <TITLE>BVDuplicate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDuplicate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDuplicate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDuplicate</H1>
 Creates a new basis vector object of the same type and dimensions as an existing one. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDuplicate.html#BVDuplicate">BVDuplicate</A>(<A HREF="../BV/BV.html#BV">BV</A> V,<A HREF="../BV/BV.html#BV">BV</A> *W)
+PetscErrorCode BVDuplicate(BV V,BV *W)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>V </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>W </B> - location to put the new <A HREF="../BV/BV.html#BV">BV</A>
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W </B></TD><TD> - location to put the new <A HREF="../BV/BV.html#BV">BV</A>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The new <A HREF="../BV/BV.html#BV">BV</A> has the same type and dimensions as V, and it shares the same
diff --git a/docs/manualpages/BV/BVDuplicateResize.html b/docs/manualpages/BV/BVDuplicateResize.html
index 555bbd2..dd489ed 100644
--- a/docs/manualpages/BV/BVDuplicateResize.html
+++ b/docs/manualpages/BV/BVDuplicateResize.html
@@ -6,28 +6,28 @@
 <TITLE>BVDuplicateResize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVDuplicateResize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVDuplicateResize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVDuplicateResize</H1>
 Creates a new basis vector object of the same type and dimensions as an existing one, but with possibly different number of columns. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt m,<A HREF="../BV/BV.html#BV">BV</A> *W)
+PetscErrorCode BVDuplicateResize(BV V,PetscInt m,BV *W)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - the new number of columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - the new number of columns
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>W </B> - location to put the new <A HREF="../BV/BV.html#BV">BV</A>
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W </B></TD><TD> - location to put the new <A HREF="../BV/BV.html#BV">BV</A>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 This is equivalent of a call to <A HREF="../BV/BVDuplicate.html#BVDuplicate">BVDuplicate</A>() followed by <A HREF="../BV/BVResize.html#BVResize">BVResize</A>(). The
diff --git a/docs/manualpages/BV/BVFinalizePackage.html b/docs/manualpages/BV/BVFinalizePackage.html
index 01cf63c..88b00ff 100644
--- a/docs/manualpages/BV/BVFinalizePackage.html
+++ b/docs/manualpages/BV/BVFinalizePackage.html
@@ -6,15 +6,15 @@
 <TITLE>BVFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../BV/BV.html#BV">BV</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</A>(void)
+PetscErrorCode BVFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/BV/BVGetActiveColumns.html b/docs/manualpages/BV/BVGetActiveColumns.html
index 8ac4ef8..e4e8552 100644
--- a/docs/manualpages/BV/BVGetActiveColumns.html
+++ b/docs/manualpages/BV/BVGetActiveColumns.html
@@ -6,27 +6,27 @@
 <TITLE>BVGetActiveColumns</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetActiveColumns.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetActiveColumns.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetActiveColumns</H1>
 Returns the current active dimensions. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt *l,PetscInt *k)
+PetscErrorCode BVGetActiveColumns(BV bv,PetscInt *l,PetscInt *k)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of leading columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of leading columns
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - number of active columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - number of active columns
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVGetArray.html b/docs/manualpages/BV/BVGetArray.html
index 6d8da28..3bc4c26 100644
--- a/docs/manualpages/BV/BVGetArray.html
+++ b/docs/manualpages/BV/BVGetArray.html
@@ -6,25 +6,25 @@
 <TITLE>BVGetArray</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetArray.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetArray.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetArray</H1>
 Returns a pointer to a contiguous array that contains this processor's portion of the <A HREF="../BV/BV.html#BV">BV</A> data. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetArray.html#BVGetArray">BVGetArray</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscScalar **a)
+PetscErrorCode BVGetArray(BV bv,PetscScalar **a)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>a  </B> - location to put pointer to the array
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - location to put pointer to the array
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 <A HREF="../BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</A>() must be called when access to the array is no longer needed.
diff --git a/docs/manualpages/BV/BVGetArrayRead.html b/docs/manualpages/BV/BVGetArrayRead.html
new file mode 100644
index 0000000..6514376
--- /dev/null
+++ b/docs/manualpages/BV/BVGetArrayRead.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/BV/BVGetArrayRead.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>BVGetArrayRead</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetArrayRead.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>BVGetArrayRead</H1>
+Returns a read-only pointer to a contiguous array that contains this processor's portion of the <A HREF="../BV/BV.html#BV">BV</A> data. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcbv.h" 
+PetscErrorCode BVGetArrayRead(BV bv,const PetscScalar **a)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - location to put pointer to the array
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+<A HREF="../BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</A>() must be called when access to the array is no
+longer needed. This operation may imply a data copy, for <A HREF="../BV/BV.html#BV">BV</A> types that
+do not store data contiguously in memory.
+<P>
+The pointer will normally point to the first entry of the first column,
+but if the <A HREF="../BV/BV.html#BV">BV</A> has constraints then these go before the regular columns.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</A>(), <A HREF="../BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVGetArrayRead">src/sys/classes/bv/interface/bvbasic.c</A>
+<BR><A HREF="./index.html">Index of all BV routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/BV/BVGetCachedBV.html b/docs/manualpages/BV/BVGetCachedBV.html
index fc43594..420df25 100644
--- a/docs/manualpages/BV/BVGetCachedBV.html
+++ b/docs/manualpages/BV/BVGetCachedBV.html
@@ -6,25 +6,25 @@
 <TITLE>BVGetCachedBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetCachedBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetCachedBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetCachedBV</H1>
 Returns a <A HREF="../BV/BV.html#BV">BV</A> object stored internally that holds the result of B*X after a call to <A HREF="../BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetCachedBV.html#BVGetCachedBV">BVGetCachedBV</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BV.html#BV">BV</A> *cached)
+PetscErrorCode BVGetCachedBV(BV bv,BV *cached)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cached </B></TD><TD> - the cached <A HREF="../BV/BV.html#BV">BV</A>
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cached </B></TD><TD> - the cached <A HREF="../BV/BV.html#BV">BV</A>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The function will return a NULL if <A HREF="../BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</A>() was not called yet.
diff --git a/docs/manualpages/BV/BVGetColumn.html b/docs/manualpages/BV/BVGetColumn.html
index 70295d2..d34adc9 100644
--- a/docs/manualpages/BV/BVGetColumn.html
+++ b/docs/manualpages/BV/BVGetColumn.html
@@ -6,28 +6,28 @@
 <TITLE>BVGetColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetColumn</H1>
 Returns a Vec object that contains the entries of the requested column of the basis vectors object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetColumn.html#BVGetColumn">BVGetColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,Vec *v)
+PetscErrorCode BVGetColumn(BV bv,PetscInt j,Vec *v)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j  </B></TD><TD> - the index of the requested column
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j  </B></TD><TD> - the index of the requested column
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>v  </B> - vector containing the jth column
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v  </B></TD><TD> - vector containing the jth column
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The returned Vec must be seen as a reference (not a copy) of the <A HREF="../BV/BV.html#BV">BV</A>
diff --git a/docs/manualpages/BV/BVGetMatMultMethod.html b/docs/manualpages/BV/BVGetMatMultMethod.html
index ffe8da1..cec72f7 100644
--- a/docs/manualpages/BV/BVGetMatMultMethod.html
+++ b/docs/manualpages/BV/BVGetMatMultMethod.html
@@ -6,30 +6,30 @@
 <TITLE>BVGetMatMultMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetMatMultMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetMatMultMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetMatMultMethod</H1>
 Gets the method used for the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BVMatMultType.html#BVMatMultType">BVMatMultType</A> *method)
+PetscErrorCode BVGetMatMultMethod(BV bv,BVMatMultType *method)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>method </B> - the method for the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>method </B></TD><TD> - the method for the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation
+</TD></TR></TABLE>
 <P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</A>(), <A HREF="../BV/BVMatMultType.html#BVMatMultType">BVMatMultType</A>
+ <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>(), <A HREF="../BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</A>(), <A HREF="../BV/BVMatMultType.html#BVMatMultType">BVMatMultType</A>
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVGetMatMultMethod">src/sys/classes/bv/interface/bvbasic.c</A>
 <BR><A HREF="./index.html">Index of all BV routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/BV/BVGetMatrix.html b/docs/manualpages/BV/BVGetMatrix.html
index f6b259f..a10442d 100644
--- a/docs/manualpages/BV/BVGetMatrix.html
+++ b/docs/manualpages/BV/BVGetMatrix.html
@@ -6,27 +6,27 @@
 <TITLE>BVGetMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetMatrix</H1>
 Retrieves the matrix representation of the inner product. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetMatrix.html#BVGetMatrix">BVGetMatrix</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Mat *B,PetscBool *indef)
+PetscErrorCode BVGetMatrix(BV bv,Mat *B,PetscBool *indef)
 </PRE>
 Not collective, though a parallel Mat may be returned
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv    </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B     </B></TD><TD> - the matrix of the inner product (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B     </B></TD><TD> - the matrix of the inner product (may be NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>indef </B></TD><TD> - the flag indicating if the matrix is indefinite
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>indef </B></TD><TD> - the flag indicating if the matrix is indefinite
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVGetNumConstraints.html b/docs/manualpages/BV/BVGetNumConstraints.html
index 0bc5cfe..fb6946e 100644
--- a/docs/manualpages/BV/BVGetNumConstraints.html
+++ b/docs/manualpages/BV/BVGetNumConstraints.html
@@ -6,25 +6,25 @@
 <TITLE>BVGetNumConstraints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetNumConstraints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetNumConstraints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetNumConstraints</H1>
 Returns the number of constraints. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt *nc)
+PetscErrorCode BVGetNumConstraints(BV bv,PetscInt *nc)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>nc </B> - the number of constraints
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nc </B></TD><TD> - the number of constraints
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/BV/BVGetOptionsPrefix.html b/docs/manualpages/BV/BVGetOptionsPrefix.html
index b23d34b..92f2f09 100644
--- a/docs/manualpages/BV/BVGetOptionsPrefix.html
+++ b/docs/manualpages/BV/BVGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>BVGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../BV/BV.html#BV">BV</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,const char *prefix[])
+PetscErrorCode BVGetOptionsPrefix(BV bv,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used, is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used, is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the Fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/BV/BVGetOrthogonalization.html b/docs/manualpages/BV/BVGetOrthogonalization.html
index 2cbbdde..1e11cb8 100644
--- a/docs/manualpages/BV/BVGetOrthogonalization.html
+++ b/docs/manualpages/BV/BVGetOrthogonalization.html
@@ -6,31 +6,31 @@
 <TITLE>BVGetOrthogonalization</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetOrthogonalization.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetOrthogonalization.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetOrthogonalization</H1>
 Gets the orthogonalization settings from the <A HREF="../BV/BV.html#BV">BV</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BVOrthogType.html#BVOrthogType">BVOrthogType</A> *type,<A HREF="../BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</A> *refine,PetscReal *eta,<A HREF="../BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</A> *block)
+PetscErrorCode BVGetOrthogonalization(BV bv,BVOrthogType *type,BVOrthogRefineType *refine,PetscReal *eta,BVOrthogBlockType *block)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type   </B></TD><TD> - the method of vector orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type   </B></TD><TD> - the method of vector orthogonalization
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - type of refinement
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - type of refinement
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eta    </B></TD><TD> - parameter for selective refinement
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eta    </B></TD><TD> - parameter for selective refinement
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>block  </B></TD><TD> - the method of block orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>block  </B></TD><TD> - the method of block orthogonalization
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVGetRandomContext.html b/docs/manualpages/BV/BVGetRandomContext.html
new file mode 100644
index 0000000..5e8ed19
--- /dev/null
+++ b/docs/manualpages/BV/BVGetRandomContext.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/BV/BVGetRandomContext.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>BVGetRandomContext</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetRandomContext.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>BVGetRandomContext</H1>
+Gets the PetscRandom object associated with the <A HREF="../BV/BV.html#BV">BV</A>. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcbv.h" 
+PetscErrorCode BVGetRandomContext(BV bv,PetscRandom* rand)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rand </B></TD><TD> - the random number generator context
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</A>(), <A HREF="../BV/BVSetRandom.html#BVSetRandom">BVSetRandom</A>(), <A HREF="../BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVGetRandomContext">src/sys/classes/bv/interface/bvbasic.c</A>
+<BR><A HREF="./index.html">Index of all BV routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/BV/BVGetSignature.html b/docs/manualpages/BV/BVGetSignature.html
index fdb3c55..73d1472 100644
--- a/docs/manualpages/BV/BVGetSignature.html
+++ b/docs/manualpages/BV/BVGetSignature.html
@@ -6,25 +6,25 @@
 <TITLE>BVGetSignature</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetSignature.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetSignature.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetSignature</H1>
 Retrieves the signature matrix from last orthogonalization. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetSignature.html#BVGetSignature">BVGetSignature</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec omega)
+PetscErrorCode BVGetSignature(BV bv,Vec omega)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv    </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>omega </B> - a vector representing the diagonal of the signature matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>omega </B></TD><TD> - a vector representing the diagonal of the signature matrix
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The signature matrix Omega = V'*B*V is relevant only for an indefinite B.
diff --git a/docs/manualpages/BV/BVGetSizes.html b/docs/manualpages/BV/BVGetSizes.html
index 5926ff4..a4631bd 100644
--- a/docs/manualpages/BV/BVGetSizes.html
+++ b/docs/manualpages/BV/BVGetSizes.html
@@ -6,29 +6,29 @@
 <TITLE>BVGetSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetSizes</H1>
 Returns the local and global sizes, and the number of columns. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetSizes.html#BVGetSizes">BVGetSizes</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt *n,PetscInt *N,PetscInt *m)
+PetscErrorCode BVGetSizes(BV bv,PetscInt *n,PetscInt *N,PetscInt *m)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the local size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the local size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>N  </B></TD><TD> - the global size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>N  </B></TD><TD> - the global size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the number of columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the number of columns
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVGetType.html b/docs/manualpages/BV/BVGetType.html
index ebb577a..de88830 100644
--- a/docs/manualpages/BV/BVGetType.html
+++ b/docs/manualpages/BV/BVGetType.html
@@ -6,25 +6,25 @@
 <TITLE>BVGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVGetType</H1>
 Gets the <A HREF="../BV/BV.html#BV">BV</A> type name (as a string) from the <A HREF="../BV/BV.html#BV">BV</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVGetType.html#BVGetType">BVGetType</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BVType.html#BVType">BVType</A> *type)
+PetscErrorCode BVGetType(BV bv,BVType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of the type of basis vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of the type of basis vectors
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/BV/BVInitializePackage.html b/docs/manualpages/BV/BVInitializePackage.html
index bca8d7e..10b47dd 100644
--- a/docs/manualpages/BV/BVInitializePackage.html
+++ b/docs/manualpages/BV/BVInitializePackage.html
@@ -6,15 +6,15 @@
 <TITLE>BVInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVInitializePackage</H1>
 This function initializes everything in the <A HREF="../BV/BV.html#BV">BV</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../BV/BVCreate.html#BVCreate">BVCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</A>(void)
+PetscErrorCode BVInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/BV/BVInsertConstraints.html b/docs/manualpages/BV/BVInsertConstraints.html
index 973f4b4..f5e1721 100644
--- a/docs/manualpages/BV/BVInsertConstraints.html
+++ b/docs/manualpages/BV/BVInsertConstraints.html
@@ -6,29 +6,29 @@
 <TITLE>BVInsertConstraints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVInsertConstraints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVInsertConstraints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVInsertConstraints</H1>
 Insert a set of vectors as constraints. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt *nc,Vec *C)
+PetscErrorCode BVInsertConstraints(BV V,PetscInt *nc,Vec *C)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>C </B></TD><TD> - set of vectors to be inserted as constraints
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>C </B></TD><TD> - set of vectors to be inserted as constraints
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
-<DT><B>nc </B> - number of input vectors, on output the number of linearly independent
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nc </B></TD><TD> - number of input vectors, on output the number of linearly independent
 vectors
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The constraints are relevant only during orthogonalization. Constraint
diff --git a/docs/manualpages/BV/BVInsertVec.html b/docs/manualpages/BV/BVInsertVec.html
index 0b6aa8a..7cef4bf 100644
--- a/docs/manualpages/BV/BVInsertVec.html
+++ b/docs/manualpages/BV/BVInsertVec.html
@@ -6,25 +6,25 @@
 <TITLE>BVInsertVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVInsertVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVInsertVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVInsertVec</H1>
 Insert a vector into the specified column. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVInsertVec.html#BVInsertVec">BVInsertVec</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt j,Vec w)
+PetscErrorCode BVInsertVec(BV V,PetscInt j,Vec w)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column of V to be overwritten
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column of V to be overwritten
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>w </B></TD><TD> - the vector to be copied
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>w </B></TD><TD> - the vector to be copied
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVInsertVecs.html b/docs/manualpages/BV/BVInsertVecs.html
index 84a6e22..8fa894a 100644
--- a/docs/manualpages/BV/BVInsertVecs.html
+++ b/docs/manualpages/BV/BVInsertVecs.html
@@ -6,33 +6,33 @@
 <TITLE>BVInsertVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVInsertVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVInsertVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVInsertVecs</H1>
 Insert a set of vectors into the specified columns. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt s,PetscInt *m,Vec *W,PetscBool orth)
+PetscErrorCode BVInsertVecs(BV V,PetscInt s,PetscInt *m,Vec *W,PetscBool orth)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD> - first column of V to be overwritten
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD> - first column of V to be overwritten
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W </B></TD><TD> - set of vectors to be copied
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W </B></TD><TD> - set of vectors to be copied
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>orth </B></TD><TD> - flag indicating if the vectors must be orthogonalized
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>orth </B></TD><TD> - flag indicating if the vectors must be orthogonalized
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
-<DT><B>m </B> - number of input vectors, on output the number of linearly independent
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - number of input vectors, on output the number of linearly independent
 vectors
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Copies the contents of vectors W to V(:,s:s+n). If the orthogonalization
diff --git a/docs/manualpages/BV/BVMatMult.html b/docs/manualpages/BV/BVMatMult.html
index 93cb937..a9aad37 100644
--- a/docs/manualpages/BV/BVMatMult.html
+++ b/docs/manualpages/BV/BVMatMult.html
@@ -6,28 +6,28 @@
 <TITLE>BVMatMult</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMatMult.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMatMult.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMatMult</H1>
 Computes the matrix-vector product for each column, Y=A*V. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>(<A HREF="../BV/BV.html#BV">BV</A> V,Mat A,<A HREF="../BV/BV.html#BV">BV</A> Y)
+PetscErrorCode BVMatMult(BV V,Mat A,BV Y)
 </PRE>
 Neighbor-wise Collective on Mat and <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>Y </B> - the result
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - the result
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Both V and Y must be distributed in the same manner. Only active columns
diff --git a/docs/manualpages/BV/BVMatMultColumn.html b/docs/manualpages/BV/BVMatMultColumn.html
index e2d2e43..b4d3e7e 100644
--- a/docs/manualpages/BV/BVMatMultColumn.html
+++ b/docs/manualpages/BV/BVMatMultColumn.html
@@ -6,30 +6,30 @@
 <TITLE>BVMatMultColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMatMultColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMatMultColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMatMultColumn</H1>
 Computes the matrix-vector product for a specified column, storing the result in the next column: v_{j+1}=A*v_j. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> V,Mat A,PetscInt j)
+PetscErrorCode BVMatMultColumn(BV V,Mat A,PetscInt j)
 </PRE>
 Neighbor-wise Collective on Mat and <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j </B></TD><TD> - the column
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>Y </B> - the result
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - the result
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/BV/BVMatMultHermitianTranspose.html b/docs/manualpages/BV/BVMatMultHermitianTranspose.html
index 7790cbb..99e5f54 100644
--- a/docs/manualpages/BV/BVMatMultHermitianTranspose.html
+++ b/docs/manualpages/BV/BVMatMultHermitianTranspose.html
@@ -6,28 +6,28 @@
 <TITLE>BVMatMultHermitianTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMatMultHermitianTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMatMultHermitianTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMatMultHermitianTranspose</H1>
 Computes the matrix-vector product with the conjugate transpose of a matrix for each column, Y=A^H*V. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</A>(<A HREF="../BV/BV.html#BV">BV</A> V,Mat A,<A HREF="../BV/BV.html#BV">BV</A> Y)
+PetscErrorCode BVMatMultHermitianTranspose(BV V,Mat A,BV Y)
 </PRE>
 Neighbor-wise Collective on Mat and <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>Y </B> - the result
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - the result
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Both V and Y must be distributed in the same manner. Only active columns
diff --git a/docs/manualpages/BV/BVMatMultType.html b/docs/manualpages/BV/BVMatMultType.html
index 935c902..362c59e 100644
--- a/docs/manualpages/BV/BVMatMultType.html
+++ b/docs/manualpages/BV/BVMatMultType.html
@@ -6,8 +6,8 @@
 <TITLE>BVMatMultType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMatMultType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMatMultType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMatMultType</H1>
 Determines how to perform the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation: BV_MATMULT_VECS: perform a matrix-vector multiply per each column; BV_MATMULT_MAT: carry out a MatMatMult() product with a dense matrix (default); BV_MATMULT_MAT_SAVE: call MatMatMult() and keep auxiliary matrices (more efficient but needs more memory) 
diff --git a/docs/manualpages/BV/BVMatProject.html b/docs/manualpages/BV/BVMatProject.html
index 56f1d4d..8852bc9 100644
--- a/docs/manualpages/BV/BVMatProject.html
+++ b/docs/manualpages/BV/BVMatProject.html
@@ -6,32 +6,32 @@
 <TITLE>BVMatProject</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMatProject.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMatProject.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMatProject</H1>
 Computes the projection of a matrix onto a subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMatProject.html#BVMatProject">BVMatProject</A>(<A HREF="../BV/BV.html#BV">BV</A> X,Mat A,<A HREF="../BV/BV.html#BV">BV</A> Y,Mat M)
+PetscErrorCode BVMatProject(BV X,Mat A,BV Y,Mat M)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - (optional) matrix to be projected
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - (optional) matrix to be projected
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - left basis vectors, can be equal to X
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y </B></TD><TD> - left basis vectors, can be equal to X
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M </B></TD><TD> - Mat object where the result must be placed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M </B></TD><TD> - Mat object where the result must be placed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>M </B> - the resulting matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M </B></TD><TD> - the resulting matrix
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If A=NULL, then it is assumed that X already contains A*X.
diff --git a/docs/manualpages/BV/BVMult.html b/docs/manualpages/BV/BVMult.html
index 6ca1926..3b9e56c 100644
--- a/docs/manualpages/BV/BVMult.html
+++ b/docs/manualpages/BV/BVMult.html
@@ -6,36 +6,38 @@
 <TITLE>BVMult</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMult.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMult.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMult</H1>
 Computes Y = beta*Y + alpha*X*Q. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMult.html#BVMult">BVMult</A>(<A HREF="../BV/BV.html#BV">BV</A> Y,PetscScalar alpha,PetscScalar beta,<A HREF="../BV/BV.html#BV">BV</A> X,Mat Q)
+PetscErrorCode BVMult(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y,X        </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y,X        </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha,beta </B></TD><TD> - scalars
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha,beta </B></TD><TD> - scalars
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Q          </B></TD><TD> - a sequential dense matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Q          </B></TD><TD> - (optional) sequential dense matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>Y          </B> - the modified basis vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Y          </B></TD><TD> - the modified basis vectors
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 X and Y must be different objects. The case X=Y can be addressed with
 <A HREF="../BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</A>().
 <P>
-The matrix Q must be a sequential dense Mat, with all entries equal on
+If matrix Q is NULL, then an AXPY operation Y = beta*Y + alpha*X is done
+(i.e. results as if Q = identity). If provided,
+the matrix Q must be a sequential dense Mat, with all entries equal on
 all processes (otherwise each process will compute a different update).
 The dimensions of Q must be at least m,n where m is the number of active
 columns of X and n is the number of active columns of Y.
diff --git a/docs/manualpages/BV/BVMultColumn.html b/docs/manualpages/BV/BVMultColumn.html
index 6d3b72b..5da0a6e 100644
--- a/docs/manualpages/BV/BVMultColumn.html
+++ b/docs/manualpages/BV/BVMultColumn.html
@@ -6,27 +6,27 @@
 <TITLE>BVMultColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMultColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMultColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMultColumn</H1>
 Computes y = beta*y + alpha*X*q, where y is the j-th column of X. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMultColumn.html#BVMultColumn">BVMultColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> X,PetscScalar alpha,PetscScalar beta,PetscInt j,PetscScalar *q)
+PetscErrorCode BVMultColumn(BV X,PetscScalar alpha,PetscScalar beta,PetscInt j,PetscScalar *q)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X          </B></TD><TD> - a basis vectors object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X          </B></TD><TD> - a basis vectors object
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha,beta </B></TD><TD> - scalars
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha,beta </B></TD><TD> - scalars
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j          </B></TD><TD> - the column index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j          </B></TD><TD> - the column index
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>q          </B></TD><TD> - an array of scalars
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>q          </B></TD><TD> - an array of scalars
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVMultInPlace.html b/docs/manualpages/BV/BVMultInPlace.html
index c276c16..60fcf6a 100644
--- a/docs/manualpages/BV/BVMultInPlace.html
+++ b/docs/manualpages/BV/BVMultInPlace.html
@@ -6,30 +6,30 @@
 <TITLE>BVMultInPlace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMultInPlace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMultInPlace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMultInPlace</H1>
 Update a set of vectors as V(:,s:e-1) = V*Q(:,s:e-1). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</A>(<A HREF="../BV/BV.html#BV">BV</A> V,Mat Q,PetscInt s,PetscInt e)
+PetscErrorCode BVMultInPlace(BV V,Mat Q,PetscInt s,PetscInt e)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Q </B></TD><TD> - a sequential dense matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Q </B></TD><TD> - a sequential dense matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD> - first column of V to be overwritten
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD> - first column of V to be overwritten
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>e </B></TD><TD> - first column of V not to be overwritten
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>e </B></TD><TD> - first column of V not to be overwritten
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
 </TD></TR>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVMultInPlaceTranspose.html b/docs/manualpages/BV/BVMultInPlaceTranspose.html
index a1dfa7b..2c739fc 100644
--- a/docs/manualpages/BV/BVMultInPlaceTranspose.html
+++ b/docs/manualpages/BV/BVMultInPlaceTranspose.html
@@ -6,30 +6,30 @@
 <TITLE>BVMultInPlaceTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMultInPlaceTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMultInPlaceTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMultInPlaceTranspose</H1>
 Update a set of vectors as V(:,s:e-1) = V*Q'(:,s:e-1). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</A>(<A HREF="../BV/BV.html#BV">BV</A> V,Mat Q,PetscInt s,PetscInt e)
+PetscErrorCode BVMultInPlaceTranspose(BV V,Mat Q,PetscInt s,PetscInt e)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Q </B></TD><TD> - a sequential dense matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Q </B></TD><TD> - a sequential dense matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD> - first column of V to be overwritten
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD> - first column of V to be overwritten
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>e </B></TD><TD> - first column of V not to be overwritten
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>e </B></TD><TD> - first column of V not to be overwritten
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
 </TD></TR>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVMultVec.html b/docs/manualpages/BV/BVMultVec.html
index 5870380..11c1546 100644
--- a/docs/manualpages/BV/BVMultVec.html
+++ b/docs/manualpages/BV/BVMultVec.html
@@ -6,32 +6,32 @@
 <TITLE>BVMultVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVMultVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVMultVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVMultVec</H1>
 Computes y = beta*y + alpha*X*q. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVMultVec.html#BVMultVec">BVMultVec</A>(<A HREF="../BV/BV.html#BV">BV</A> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)
+PetscErrorCode BVMultVec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X          </B></TD><TD> - a basis vectors object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>X          </B></TD><TD> - a basis vectors object
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha,beta </B></TD><TD> - scalars
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha,beta </B></TD><TD> - scalars
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y          </B></TD><TD> - a vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y          </B></TD><TD> - a vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>q          </B></TD><TD> - an array of scalars
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>q          </B></TD><TD> - an array of scalars
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y          </B> - the modified vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y          </B></TD><TD> - the modified vector
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This operation is the analogue of <A HREF="../BV/BVMult.html#BVMult">BVMult</A>() but with a <A HREF="../BV/BV.html#BV">BV</A> and a Vec,
diff --git a/docs/manualpages/BV/BVNorm.html b/docs/manualpages/BV/BVNorm.html
index ec3458a..3b2bf16 100644
--- a/docs/manualpages/BV/BVNorm.html
+++ b/docs/manualpages/BV/BVNorm.html
@@ -6,28 +6,28 @@
 <TITLE>BVNorm</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNorm.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNorm.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNorm</H1>
 Computes the matrix norm of the <A HREF="../BV/BV.html#BV">BV</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNorm.html#BVNorm">BVNorm</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,NormType type,PetscReal *val)
+PetscErrorCode BVNorm(BV bv,NormType type,PetscReal *val)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>val  </B> - the norm
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 All active columns (except the leading ones) are considered as a matrix.
diff --git a/docs/manualpages/BV/BVNormColumn.html b/docs/manualpages/BV/BVNormColumn.html
index 7a9b475..9989910 100644
--- a/docs/manualpages/BV/BVNormColumn.html
+++ b/docs/manualpages/BV/BVNormColumn.html
@@ -6,30 +6,30 @@
 <TITLE>BVNormColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNormColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNormColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNormColumn</H1>
 Computes the vector norm of a selected column. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNormColumn.html#BVNormColumn">BVNormColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,NormType type,PetscReal *val)
+PetscErrorCode BVNormColumn(BV bv,PetscInt j,NormType type,PetscReal *val)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>val  </B> - the norm
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY).
diff --git a/docs/manualpages/BV/BVNormColumnBegin.html b/docs/manualpages/BV/BVNormColumnBegin.html
index 1afffe2..60ab351 100644
--- a/docs/manualpages/BV/BVNormColumnBegin.html
+++ b/docs/manualpages/BV/BVNormColumnBegin.html
@@ -6,25 +6,25 @@
 <TITLE>BVNormColumnBegin</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNormColumnBegin.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNormColumnBegin.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNormColumnBegin</H1>
 Starts a split phase norm computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,NormType type,PetscReal *val)
+PetscErrorCode BVNormColumnBegin(BV bv,PetscInt j,NormType type,PetscReal *val)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVNormColumnEnd.html b/docs/manualpages/BV/BVNormColumnEnd.html
index 9fb6dbb..cc6a861 100644
--- a/docs/manualpages/BV/BVNormColumnEnd.html
+++ b/docs/manualpages/BV/BVNormColumnEnd.html
@@ -6,25 +6,25 @@
 <TITLE>BVNormColumnEnd</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNormColumnEnd.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNormColumnEnd.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNormColumnEnd</H1>
 Ends a split phase norm computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,NormType type,PetscReal *val)
+PetscErrorCode BVNormColumnEnd(BV bv,PetscInt j,NormType type,PetscReal *val)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVNormVec.html b/docs/manualpages/BV/BVNormVec.html
index 4fc012b..02326aa 100644
--- a/docs/manualpages/BV/BVNormVec.html
+++ b/docs/manualpages/BV/BVNormVec.html
@@ -6,30 +6,30 @@
 <TITLE>BVNormVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNormVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNormVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNormVec</H1>
 Computes the norm of a given vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNormVec.html#BVNormVec">BVNormVec</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec v,NormType type,PetscReal *val)
+PetscErrorCode BVNormVec(BV bv,Vec v,NormType type,PetscReal *val)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v    </B></TD><TD> - the vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v    </B></TD><TD> - the vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>val  </B> - the norm
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is the analogue of <A HREF="../BV/BVNormColumn.html#BVNormColumn">BVNormColumn</A>() but for a vector that is not in the <A HREF="../BV/BV.html#BV">BV</A>.
diff --git a/docs/manualpages/BV/BVNormVecBegin.html b/docs/manualpages/BV/BVNormVecBegin.html
index 02cddd1..63655ac 100644
--- a/docs/manualpages/BV/BVNormVecBegin.html
+++ b/docs/manualpages/BV/BVNormVecBegin.html
@@ -6,25 +6,25 @@
 <TITLE>BVNormVecBegin</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNormVecBegin.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNormVecBegin.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNormVecBegin</H1>
 Starts a split phase norm computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec v,NormType type,PetscReal *val)
+PetscErrorCode BVNormVecBegin(BV bv,Vec v,NormType type,PetscReal *val)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v    </B></TD><TD> - the vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v    </B></TD><TD> - the vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVNormVecEnd.html b/docs/manualpages/BV/BVNormVecEnd.html
index cb70e8c..6a74966 100644
--- a/docs/manualpages/BV/BVNormVecEnd.html
+++ b/docs/manualpages/BV/BVNormVecEnd.html
@@ -6,25 +6,25 @@
 <TITLE>BVNormVecEnd</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVNormVecEnd.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVNormVecEnd.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVNormVecEnd</H1>
 Ends a split phase norm computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec v,NormType type,PetscReal *val)
+PetscErrorCode BVNormVecEnd(BV bv,Vec v,NormType type,PetscReal *val)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v    </B></TD><TD> - the vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v    </B></TD><TD> - the vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the norm type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val  </B></TD><TD> - the norm
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVOrthogBlockType.html b/docs/manualpages/BV/BVOrthogBlockType.html
index 8f23754..2f1b89e 100644
--- a/docs/manualpages/BV/BVOrthogBlockType.html
+++ b/docs/manualpages/BV/BVOrthogBlockType.html
@@ -6,8 +6,8 @@
 <TITLE>BVOrthogBlockType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogBlockType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogBlockType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogBlockType</H1>
 Determines the method used in block orthogonalization (simultaneous orthogonalization of a set of vectors) 
diff --git a/docs/manualpages/BV/BVOrthogRefineType.html b/docs/manualpages/BV/BVOrthogRefineType.html
index 2214945..5ada59f 100644
--- a/docs/manualpages/BV/BVOrthogRefineType.html
+++ b/docs/manualpages/BV/BVOrthogRefineType.html
@@ -6,8 +6,8 @@
 <TITLE>BVOrthogRefineType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogRefineType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogRefineType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogRefineType</H1>
 Determines what type of refinement to use during orthogonalization of vectors 
diff --git a/docs/manualpages/BV/BVOrthogType.html b/docs/manualpages/BV/BVOrthogType.html
index 020f1d4..fea0fdc 100644
--- a/docs/manualpages/BV/BVOrthogType.html
+++ b/docs/manualpages/BV/BVOrthogType.html
@@ -6,8 +6,8 @@
 <TITLE>BVOrthogType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogType</H1>
 Determines the method used in the orthogonalization of vectors 
diff --git a/docs/manualpages/BV/BVOrthogonalize.html b/docs/manualpages/BV/BVOrthogonalize.html
index 935836b..5b2e185 100644
--- a/docs/manualpages/BV/BVOrthogonalize.html
+++ b/docs/manualpages/BV/BVOrthogonalize.html
@@ -6,27 +6,27 @@
 <TITLE>BVOrthogonalize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogonalize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogonalize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogonalize</H1>
 Orthogonalize all columns (except leading ones), that is, compute the QR decomposition. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h"   
-PetscErrorCode <A HREF="../BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</A>(<A HREF="../BV/BV.html#BV">BV</A> V,Mat R)
+PetscErrorCode BVOrthogonalize(BV V,Mat R)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>V </B> - basis vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - the modified basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - the modified basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>R </B></TD><TD> - a sequential dense matrix (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>R </B></TD><TD> - a sequential dense matrix (or NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -43,6 +43,12 @@ The method to be used for block orthogonalization can be set with
 <A HREF="../BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</A>(). If set to GS, the computation is done column by
 column with successive calls to <A HREF="../BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</A>().
 <P>
+If V is rank-deficient or very ill-conditioned, that is, one or more columns are
+(almost) linearly dependent with respect to the rest, then the algorithm may
+break down or result in larger numerical error. Linearly dependent columns are
+essentially replaced by random directions, and the corresponding diagonal entry
+in R is set to (nearly) zero.
+<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
diff --git a/docs/manualpages/BV/BVOrthogonalizeColumn.html b/docs/manualpages/BV/BVOrthogonalizeColumn.html
index ced21cf..25605d8 100644
--- a/docs/manualpages/BV/BVOrthogonalizeColumn.html
+++ b/docs/manualpages/BV/BVOrthogonalizeColumn.html
@@ -6,32 +6,32 @@
 <TITLE>BVOrthogonalizeColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogonalizeColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogonalizeColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogonalizeColumn</H1>
 Orthogonalize one of the column vectors with respect to the previous ones. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h"   
-PetscErrorCode <A HREF="../BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,PetscScalar *H,PetscReal *norm,PetscBool *lindep)
+PetscErrorCode BVOrthogonalizeColumn(BV bv,PetscInt j,PetscScalar *H,PetscReal *norm,PetscBool *lindep)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j      </B></TD><TD> - index of column to be orthogonalized
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j      </B></TD><TD> - index of column to be orthogonalized
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>H      </B></TD><TD> - (optional) coefficients computed during orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>H      </B></TD><TD> - (optional) coefficients computed during orthogonalization
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm   </B></TD><TD> - (optional) norm of the vector after being orthogonalized
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm   </B></TD><TD> - (optional) norm of the vector after being orthogonalized
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindep </B></TD><TD> - (optional) flag indicating that refinement did not improve the quality
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindep </B></TD><TD> - (optional) flag indicating that refinement did not improve the quality
 of orthogonalization
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/BV/BVOrthogonalizeSomeColumn.html b/docs/manualpages/BV/BVOrthogonalizeSomeColumn.html
index eef65fd..1f973eb 100644
--- a/docs/manualpages/BV/BVOrthogonalizeSomeColumn.html
+++ b/docs/manualpages/BV/BVOrthogonalizeSomeColumn.html
@@ -6,34 +6,34 @@
 <TITLE>BVOrthogonalizeSomeColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogonalizeSomeColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogonalizeSomeColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogonalizeSomeColumn</H1>
 Orthogonalize one of the column vectors with respect to some of the previous ones. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h"   
-PetscErrorCode <A HREF="../BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)
+PetscErrorCode BVOrthogonalizeSomeColumn(BV bv,PetscInt j,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j      </B></TD><TD> - index of column to be orthogonalized
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j      </B></TD><TD> - index of column to be orthogonalized
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which  </B></TD><TD> - logical array indicating selected columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which  </B></TD><TD> - logical array indicating selected columns
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>H      </B></TD><TD> - (optional) coefficients computed during orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>H      </B></TD><TD> - (optional) coefficients computed during orthogonalization
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm   </B></TD><TD> - (optional) norm of the vector after being orthogonalized
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm   </B></TD><TD> - (optional) norm of the vector after being orthogonalized
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindep </B></TD><TD> - (optional) flag indicating that refinement did not improve the quality
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindep </B></TD><TD> - (optional) flag indicating that refinement did not improve the quality
 of orthogonalization
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/BV/BVOrthogonalizeVec.html b/docs/manualpages/BV/BVOrthogonalizeVec.html
index f85441c..a17237b 100644
--- a/docs/manualpages/BV/BVOrthogonalizeVec.html
+++ b/docs/manualpages/BV/BVOrthogonalizeVec.html
@@ -6,32 +6,32 @@
 <TITLE>BVOrthogonalizeVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVOrthogonalizeVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVOrthogonalizeVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVOrthogonalizeVec</H1>
 Orthogonalize a given vector with respect to all active columns. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h"   
-PetscErrorCode <A HREF="../BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)
+PetscErrorCode BVOrthogonalizeVec(BV bv,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v      </B></TD><TD> - the vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v      </B></TD><TD> - the vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>H      </B></TD><TD> - (optional) coefficients computed during orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>H      </B></TD><TD> - (optional) coefficients computed during orthogonalization
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm   </B></TD><TD> - (optional) norm of the vector after being orthogonalized
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm   </B></TD><TD> - (optional) norm of the vector after being orthogonalized
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindep </B></TD><TD> - (optional) flag indicating that refinement did not improve the quality
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindep </B></TD><TD> - (optional) flag indicating that refinement did not improve the quality
 of orthogonalization
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/BV/BVRegister.html b/docs/manualpages/BV/BVRegister.html
index 18e3a7b..8ed7e66 100644
--- a/docs/manualpages/BV/BVRegister.html
+++ b/docs/manualpages/BV/BVRegister.html
@@ -6,23 +6,23 @@
 <TITLE>BVRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVRegister</H1>
 Adds a new storage format to de <A HREF="../BV/BV.html#BV">BV</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVRegister.html#BVRegister">BVRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../BV/BV.html#BV">BV</A>))
+PetscErrorCode BVRegister(const char *name,PetscErrorCode (*function)(BV))
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - name of a new user-defined <A HREF="../BV/BV.html#BV">BV</A>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - name of a new user-defined <A HREF="../BV/BV.html#BV">BV</A>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVRegisterAll.html b/docs/manualpages/BV/BVRegisterAll.html
index 587e16e..c7d1119 100644
--- a/docs/manualpages/BV/BVRegisterAll.html
+++ b/docs/manualpages/BV/BVRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>BVRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVRegisterAll</H1>
 Registers all of the storage variants in the <A HREF="../BV/BV.html#BV">BV</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h"   
-PetscErrorCode <A HREF="../BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</A>(void)
+PetscErrorCode BVRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/BV/BVResize.html b/docs/manualpages/BV/BVResize.html
index 1db87c4..323df72 100644
--- a/docs/manualpages/BV/BVResize.html
+++ b/docs/manualpages/BV/BVResize.html
@@ -6,25 +6,25 @@
 <TITLE>BVResize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVResize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVResize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVResize</H1>
 Change the number of columns. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVResize.html#BVResize">BVResize</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt m,PetscBool copy)
+PetscErrorCode BVResize(BV bv,PetscInt m,PetscBool copy)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - the basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - the basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m    </B></TD><TD> - the new number of columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m    </B></TD><TD> - the new number of columns
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>copy </B></TD><TD> - a flag indicating whether current values should be kept
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>copy </B></TD><TD> - a flag indicating whether current values should be kept
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVRestoreArray.html b/docs/manualpages/BV/BVRestoreArray.html
index cc5a577..d5d53de 100644
--- a/docs/manualpages/BV/BVRestoreArray.html
+++ b/docs/manualpages/BV/BVRestoreArray.html
@@ -6,23 +6,23 @@
 <TITLE>BVRestoreArray</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVRestoreArray.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVRestoreArray.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVRestoreArray</H1>
 Restore the <A HREF="../BV/BV.html#BV">BV</A> object after <A HREF="../BV/BVGetArray.html#BVGetArray">BVGetArray</A>() has been called. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscScalar **a)
+PetscErrorCode BVRestoreArray(BV bv,PetscScalar **a)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - location of pointer to array obtained from <A HREF="../BV/BVGetArray.html#BVGetArray">BVGetArray</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - location of pointer to array obtained from <A HREF="../BV/BVGetArray.html#BVGetArray">BVGetArray</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVRestoreArrayRead.html b/docs/manualpages/BV/BVRestoreArrayRead.html
new file mode 100644
index 0000000..e44f0f2
--- /dev/null
+++ b/docs/manualpages/BV/BVRestoreArrayRead.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/BV/BVRestoreArrayRead.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>BVRestoreArrayRead</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVRestoreArrayRead.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>BVRestoreArrayRead</H1>
+Restore the <A HREF="../BV/BV.html#BV">BV</A> object after <A HREF="../BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</A>() has been called. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcbv.h" 
+PetscErrorCode BVRestoreArrayRead(BV bv,const PetscScalar **a)
+</PRE>
+Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - location of pointer to array obtained from <A HREF="../BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</A>()
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../BV/BVGetColumn.html#BVGetColumn">BVGetColumn</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVRestoreArrayRead">src/sys/classes/bv/interface/bvbasic.c</A>
+<BR><A HREF="./index.html">Index of all BV routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/BV/BVRestoreColumn.html b/docs/manualpages/BV/BVRestoreColumn.html
index 58f4463..727483a 100644
--- a/docs/manualpages/BV/BVRestoreColumn.html
+++ b/docs/manualpages/BV/BVRestoreColumn.html
@@ -6,25 +6,25 @@
 <TITLE>BVRestoreColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVRestoreColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVRestoreColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVRestoreColumn</H1>
 Restore a column obtained with <A HREF="../BV/BVGetColumn.html#BVGetColumn">BVGetColumn</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,Vec *v)
+PetscErrorCode BVRestoreColumn(BV bv,PetscInt j,Vec *v)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j  </B></TD><TD> - the index of the column
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j  </B></TD><TD> - the index of the column
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v  </B></TD><TD> - vector obtained with <A HREF="../BV/BVGetColumn.html#BVGetColumn">BVGetColumn</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v  </B></TD><TD> - vector obtained with <A HREF="../BV/BVGetColumn.html#BVGetColumn">BVGetColumn</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVScale.html b/docs/manualpages/BV/BVScale.html
index 6794a75..9d80bf1 100644
--- a/docs/manualpages/BV/BVScale.html
+++ b/docs/manualpages/BV/BVScale.html
@@ -6,23 +6,23 @@
 <TITLE>BVScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVScale</H1>
 Multiply the <A HREF="../BV/BV.html#BV">BV</A> entries by a scalar value. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVScale.html#BVScale">BVScale</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscScalar alpha)
+PetscErrorCode BVScale(BV bv,PetscScalar alpha)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - scaling factor
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - scaling factor
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVScaleColumn.html b/docs/manualpages/BV/BVScaleColumn.html
index 20859f7..75cf03c 100644
--- a/docs/manualpages/BV/BVScaleColumn.html
+++ b/docs/manualpages/BV/BVScaleColumn.html
@@ -6,25 +6,25 @@
 <TITLE>BVScaleColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVScaleColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVScaleColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVScaleColumn</H1>
 Scale one column of a <A HREF="../BV/BV.html#BV">BV</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,PetscScalar alpha)
+PetscErrorCode BVScaleColumn(BV bv,PetscInt j,PetscScalar alpha)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j     </B></TD><TD> - column number to be scaled
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j     </B></TD><TD> - column number to be scaled
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - scaling factor
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - scaling factor
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVSetActiveColumns.html b/docs/manualpages/BV/BVSetActiveColumns.html
index ba1ed9a..721a190 100644
--- a/docs/manualpages/BV/BVSetActiveColumns.html
+++ b/docs/manualpages/BV/BVSetActiveColumns.html
@@ -6,25 +6,25 @@
 <TITLE>BVSetActiveColumns</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetActiveColumns.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetActiveColumns.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetActiveColumns</H1>
 Specify the columns that will be involved in operations. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt l,PetscInt k)
+PetscErrorCode BVSetActiveColumns(BV bv,PetscInt l,PetscInt k)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of leading columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of leading columns
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - number of active columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - number of active columns
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetFromOptions.html b/docs/manualpages/BV/BVSetFromOptions.html
index 629dc81..587fbb8 100644
--- a/docs/manualpages/BV/BVSetFromOptions.html
+++ b/docs/manualpages/BV/BVSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>BVSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetFromOptions</H1>
 Sets <A HREF="../BV/BV.html#BV">BV</A> options from the options database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</A>(<A HREF="../BV/BV.html#BV">BV</A> bv)
+PetscErrorCode BVSetFromOptions(BV bv)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>bv </B> - the basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVSetFromOptions">src/sys/classes/bv/interface/bvbasic.c</A>
diff --git a/docs/manualpages/BV/BVSetMatMultMethod.html b/docs/manualpages/BV/BVSetMatMultMethod.html
index 50d9bb0..3932aaa 100644
--- a/docs/manualpages/BV/BVSetMatMultMethod.html
+++ b/docs/manualpages/BV/BVSetMatMultMethod.html
@@ -6,41 +6,44 @@
 <TITLE>BVSetMatMultMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetMatMultMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetMatMultMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetMatMultMethod</H1>
 Specifies the method used for the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BVMatMultType.html#BVMatMultType">BVMatMultType</A> method)
+PetscErrorCode BVSetMatMultMethod(BV bv,BVMatMultType method)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>method </B></TD><TD> - the method for the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>method </B></TD><TD> - the method for the <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>() operation
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_matmult_vecs </B></TD><TD> - perform a matrix-vector multiply per each column
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_matmult_mat </B></TD><TD> - carry out a MatMatMult() product with a dense matrix
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_matmult_mat_save </B></TD><TD> - call MatMatMult() and keep auxiliary matrices
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_matmult <meth> </B></TD><TD> - choose one of the methods: vecs, mat, mat_save
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
+<H3><FONT COLOR="#883300">Allowed values are</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>BV_MATMULT_VECS </B></TD><TD> - perform a matrix-vector multiply per each column
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>BV_MATMULT_MAT </B></TD><TD> - carry out a MatMatMult() product with a dense matrix
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>BV_MATMULT_MAT_SAVE </B></TD><TD> - call MatMatMult() and keep auxiliary matrices
 The default is BV_MATMULT_MAT.
+</TD></TR></TABLE>
 <P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</A>(), <A HREF="../BV/BVMatMultType.html#BVMatMultType">BVMatMultType</A>
+ <A HREF="../BV/BVMatMult.html#BVMatMult">BVMatMult</A>(), <A HREF="../BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</A>(), <A HREF="../BV/BVMatMultType.html#BVMatMultType">BVMatMultType</A>
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVSetMatMultMethod">src/sys/classes/bv/interface/bvbasic.c</A>
 <BR><A HREF="./index.html">Index of all BV routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/BV/BVSetMatrix.html b/docs/manualpages/BV/BVSetMatrix.html
index 04169b5..2df2653 100644
--- a/docs/manualpages/BV/BVSetMatrix.html
+++ b/docs/manualpages/BV/BVSetMatrix.html
@@ -6,25 +6,25 @@
 <TITLE>BVSetMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetMatrix</H1>
 Specifies the inner product to be used in orthogonalization. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Mat B,PetscBool indef)
+PetscErrorCode BVSetMatrix(BV bv,Mat B,PetscBool indef)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B     </B></TD><TD> - a symmetric matrix (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B     </B></TD><TD> - a symmetric matrix (may be NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>indef </B></TD><TD> - a flag indicating if the matrix is indefinite
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>indef </B></TD><TD> - a flag indicating if the matrix is indefinite
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetNumConstraints.html b/docs/manualpages/BV/BVSetNumConstraints.html
index bea18df..d5fd046 100644
--- a/docs/manualpages/BV/BVSetNumConstraints.html
+++ b/docs/manualpages/BV/BVSetNumConstraints.html
@@ -6,23 +6,23 @@
 <TITLE>BVSetNumConstraints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetNumConstraints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetNumConstraints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetNumConstraints</H1>
 Set the number of constraints. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</A>(<A HREF="../BV/BV.html#BV">BV</A> V,PetscInt nc)
+PetscErrorCode BVSetNumConstraints(BV V,PetscInt nc)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V  </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V  </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nc </B></TD><TD> - number of constraints
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nc </B></TD><TD> - number of constraints
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetOptionsPrefix.html b/docs/manualpages/BV/BVSetOptionsPrefix.html
index 584be37..d04bf07 100644
--- a/docs/manualpages/BV/BVSetOptionsPrefix.html
+++ b/docs/manualpages/BV/BVSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>BVSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../BV/BV.html#BV">BV</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,const char *prefix)
+PetscErrorCode BVSetOptionsPrefix(BV bv,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../BV/BV.html#BV">BV</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../BV/BV.html#BV">BV</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetOrthogonalization.html b/docs/manualpages/BV/BVSetOrthogonalization.html
index 9ab800a..0149494 100644
--- a/docs/manualpages/BV/BVSetOrthogonalization.html
+++ b/docs/manualpages/BV/BVSetOrthogonalization.html
@@ -6,41 +6,41 @@
 <TITLE>BVSetOrthogonalization</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetOrthogonalization.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetOrthogonalization.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetOrthogonalization</H1>
 Specifies the method used for the orthogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BVOrthogType.html#BVOrthogType">BVOrthogType</A> type,<A HREF="../BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</A> refine,PetscReal eta,<A HREF="../BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</A> block)
+PetscErrorCode BVSetOrthogonalization(BV bv,BVOrthogType type,BVOrthogRefineType refine,PetscReal eta,BVOrthogBlockType block)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type   </B></TD><TD> - the method of vector orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type   </B></TD><TD> - the method of vector orthogonalization
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - type of refinement
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - type of refinement
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eta    </B></TD><TD> - parameter for selective refinement
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eta    </B></TD><TD> - parameter for selective refinement
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>block  </B></TD><TD> - the method of block orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>block  </B></TD><TD> - the method of block orthogonalization
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_type <type> </B></TD><TD> - Where <type> is cgs for Classical Gram-Schmidt orthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_type <type> </B></TD><TD> - Where <type> is cgs for Classical Gram-Schmidt orthogonalization
 (default) or mgs for Modified Gram-Schmidt orthogonalization
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_refine <ref> </B></TD><TD> - Where <ref> is one of never, ifneeded (default) or always
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_refine <ref> </B></TD><TD> - Where <ref> is one of never, ifneeded (default) or always
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_eta <eta> </B></TD><TD> - For setting the value of eta
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_eta <eta> </B></TD><TD> - For setting the value of eta
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_block <block> </B></TD><TD> - Where <block> is the block-orthogonalization method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_orthog_block <block> </B></TD><TD> - Where <block> is the block-orthogonalization method
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetRandom.html b/docs/manualpages/BV/BVSetRandom.html
index dcc51fa..ff1786a 100644
--- a/docs/manualpages/BV/BVSetRandom.html
+++ b/docs/manualpages/BV/BVSetRandom.html
@@ -6,24 +6,20 @@
 <TITLE>BVSetRandom</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetRandom.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetRandom.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetRandom</H1>
 Set the columns of a <A HREF="../BV/BV.html#BV">BV</A> to random numbers. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetRandom.html#BVSetRandom">BVSetRandom</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscRandom rctx)
+PetscErrorCode BVSetRandom(BV bv)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rctx </B></TD><TD> - the random number context, formed by PetscRandomCreate(), or NULL and
-it will create one internally.
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
@@ -32,7 +28,7 @@ All active columns (except the leading ones) are modified.
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</A>(), <A HREF="../BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</A>()
+ <A HREF="../BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</A>(), <A HREF="../BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</A>(), <A HREF="../BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</A>()
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvops.c.html#BVSetRandom">src/sys/classes/bv/interface/bvops.c</A>
 <BR><A HREF="./index.html">Index of all BV routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/BV/BVSetRandomColumn.html b/docs/manualpages/BV/BVSetRandomColumn.html
index 8ea8d9b..6b076dc 100644
--- a/docs/manualpages/BV/BVSetRandomColumn.html
+++ b/docs/manualpages/BV/BVSetRandomColumn.html
@@ -6,38 +6,29 @@
 <TITLE>BVSetRandomColumn</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetRandomColumn.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetRandomColumn.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetRandomColumn</H1>
 Set one column of a <A HREF="../BV/BV.html#BV">BV</A> to random numbers. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt j,PetscRandom rctx)
+PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j    </B></TD><TD> - column number to be set
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rctx </B></TD><TD> - the random number context, formed by PetscRandomCreate(), or NULL and
-it will create one internally.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j  </B></TD><TD> - column number to be set
 </TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
-This operation is analogue to VecSetRandom - the difference is that the
-generated random vector is the same irrespective of the size of the
-communicator (if all processes pass a PetscRandom context initialized
-with the same seed).
-<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../BV/BVSetRandom.html#BVSetRandom">BVSetRandom</A>(), <A HREF="../BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</A>()
+ <A HREF="../BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</A>(), <A HREF="../BV/BVSetRandom.html#BVSetRandom">BVSetRandom</A>(), <A HREF="../BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</A>()
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvops.c.html#BVSetRandomColumn">src/sys/classes/bv/interface/bvops.c</A>
 <BR><A HREF="./index.html">Index of all BV routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/BV/BVSetRandomContext.html b/docs/manualpages/BV/BVSetRandomContext.html
new file mode 100644
index 0000000..8c529a2
--- /dev/null
+++ b/docs/manualpages/BV/BVSetRandomContext.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/BV/BVSetRandomContext.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>BVSetRandomContext</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetRandomContext.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>BVSetRandomContext</H1>
+Sets the PetscRandom object associated with the <A HREF="../BV/BV.html#BV">BV</A>, to be used in operations that need random numbers. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcbv.h" 
+PetscErrorCode BVSetRandomContext(BV bv,PetscRandom rand)
+</PRE>
+Collective on <A HREF="../BV/BV.html#BV">BV</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - the basis vectors context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rand </B></TD><TD> - the random number generator context
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</A>(), <A HREF="../BV/BVSetRandom.html#BVSetRandom">BVSetRandom</A>(), <A HREF="../BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/bv/interface/bvbasic.c.html#BVSetRandomContext">src/sys/classes/bv/interface/bvbasic.c</A>
+<BR><A HREF="./index.html">Index of all BV routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/BV/BVSetSignature.html b/docs/manualpages/BV/BVSetSignature.html
index 4924e08..778c814 100644
--- a/docs/manualpages/BV/BVSetSignature.html
+++ b/docs/manualpages/BV/BVSetSignature.html
@@ -6,23 +6,23 @@
 <TITLE>BVSetSignature</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetSignature.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetSignature.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetSignature</H1>
 Sets the signature matrix to be used in orthogonalization. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetSignature.html#BVSetSignature">BVSetSignature</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec omega)
+PetscErrorCode BVSetSignature(BV bv,Vec omega)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv    </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>omega </B></TD><TD> - a vector representing the diagonal of the signature matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>omega </B></TD><TD> - a vector representing the diagonal of the signature matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetSizes.html b/docs/manualpages/BV/BVSetSizes.html
index 8c9d5bc..83b7377 100644
--- a/docs/manualpages/BV/BVSetSizes.html
+++ b/docs/manualpages/BV/BVSetSizes.html
@@ -6,27 +6,27 @@
 <TITLE>BVSetSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetSizes</H1>
 Sets the local and global sizes, and the number of columns. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetSizes.html#BVSetSizes">BVSetSizes</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscInt n,PetscInt N,PetscInt m)
+PetscErrorCode BVSetSizes(BV bv,PetscInt n,PetscInt N,PetscInt m)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the local size (or PETSC_DECIDE to have it set)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the local size (or PETSC_DECIDE to have it set)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>N  </B></TD><TD> - the global size (or PETSC_DECIDE)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>N  </B></TD><TD> - the global size (or PETSC_DECIDE)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the number of columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the number of columns
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/BV/BVSetSizesFromVec.html b/docs/manualpages/BV/BVSetSizesFromVec.html
index c31c416..5dbfbce 100644
--- a/docs/manualpages/BV/BVSetSizesFromVec.html
+++ b/docs/manualpages/BV/BVSetSizesFromVec.html
@@ -6,25 +6,25 @@
 <TITLE>BVSetSizesFromVec</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetSizesFromVec.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetSizesFromVec.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetSizesFromVec</H1>
 Sets the local and global sizes, and the number of columns. Local and global sizes are specified indirectly by passing a template vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,Vec t,PetscInt m)
+PetscErrorCode BVSetSizesFromVec(BV bv,Vec t,PetscInt m)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - the basis vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t  </B></TD><TD> - the template vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t  </B></TD><TD> - the template vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the number of columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the number of columns
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/BV/BVSetType.html b/docs/manualpages/BV/BVSetType.html
index 0296c6d..8890f3a 100644
--- a/docs/manualpages/BV/BVSetType.html
+++ b/docs/manualpages/BV/BVSetType.html
@@ -6,28 +6,28 @@
 <TITLE>BVSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVSetType</H1>
 Selects the type for the <A HREF="../BV/BV.html#BV">BV</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVSetType.html#BVSetType">BVSetType</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,<A HREF="../BV/BVType.html#BVType">BVType</A> type)
+PetscErrorCode BVSetType(BV bv,BVType type)
 </PRE>
 Logically Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - the basis vectors context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv   </B></TD><TD> - the basis vectors context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-bv_type <type> </B> - Sets <A HREF="../BV/BV.html#BV">BV</A> type
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-bv_type <type> </B></TD><TD> - Sets <A HREF="../BV/BV.html#BV">BV</A> type
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/BV/BVType.html b/docs/manualpages/BV/BVType.html
index 6c212b2..e78a2b1 100644
--- a/docs/manualpages/BV/BVType.html
+++ b/docs/manualpages/BV/BVType.html
@@ -6,8 +6,8 @@
 <TITLE>BVType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVType</H1>
 String with the name of the type of <A HREF="../BV/BV.html#BV">BV</A>. Each type differs in the way data is stored internally. 
diff --git a/docs/manualpages/BV/BVView.html b/docs/manualpages/BV/BVView.html
index e6e7c3e..9601483 100644
--- a/docs/manualpages/BV/BVView.html
+++ b/docs/manualpages/BV/BVView.html
@@ -6,31 +6,31 @@
 <TITLE>BVView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/BVView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/BVView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>BVView</H1>
 Prints the <A HREF="../BV/BV.html#BV">BV</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcbv.h" 
-PetscErrorCode <A HREF="../BV/BVView.html#BVView">BVView</A>(<A HREF="../BV/BV.html#BV">BV</A> bv,PetscViewer viewer)
+PetscErrorCode BVView(BV bv,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../BV/BV.html#BV">BV</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the <A HREF="../BV/BV.html#BV">BV</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv     </B></TD><TD> - the <A HREF="../BV/BV.html#BV">BV</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/BV/index.html b/docs/manualpages/BV/index.html
index 8560290..fd62cbc 100644
--- a/docs/manualpages/BV/index.html
+++ b/docs/manualpages/BV/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/BV/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/BV/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
@@ -21,38 +21,34 @@ These routines are usually not needed by application programmers.
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./BVCopyColumn.html">BVCopyColumn</A></TD>
- <TD WIDTH=250><A HREF="./BVGetColumn.html">BVGetColumn</A></TD>
+ <TD WIDTH=250><A HREF="./BV.html">BV</A></TD>
+ <TD WIDTH=250><A HREF="./BVDestroy.html">BVDestroy</A></TD>
  <TD WIDTH=250><A HREF="./BVRestoreColumn.html">BVRestoreColumn</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVCopy.html">BVCopy</A></TD>
- <TD WIDTH=250><A HREF="./BVGetSizes.html">BVGetSizes</A></TD>
+ <TD WIDTH=250><A HREF="./BVGetColumn.html">BVGetColumn</A></TD>
  <TD WIDTH=250><A HREF="./BVSetFromOptions.html">BVSetFromOptions</A></TD>
 <TR>
+ <TD WIDTH=250><A HREF="./BVCopyColumn.html">BVCopyColumn</A></TD>
+ <TD WIDTH=250><A HREF="./BVGetSizes.html">BVGetSizes</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetSizes.html">BVSetSizes</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./BVCopyVec.html">BVCopyVec</A></TD>
- <TD WIDTH=250><A HREF="./BV.html">BV</A></TD>
+ <TD WIDTH=250><A HREF="./BVMatMult.html">BVMatMult</A></TD>
  <TD WIDTH=250><A HREF="./BVSetSizesFromVec.html">BVSetSizesFromVec</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVCreate.html">BVCreate</A></TD>
  <TD WIDTH=250><A HREF="./BVMatMultColumn.html">BVMatMultColumn</A></TD>
- <TD WIDTH=250><A HREF="./BVSetSizes.html">BVSetSizes</A></TD>
+ <TD WIDTH=250><A HREF="./BVType.html">BVType</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVCreateVec.html">BVCreateVec</A></TD>
  <TD WIDTH=250><A HREF="./BVMatMultHermitianTranspose.html">BVMatMultHermitianTranspose</A></TD>
- <TD WIDTH=250><A HREF="./BVType.html">BVType</A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./BVDestroy.html">BVDestroy</A></TD>
- <TD WIDTH=250><A HREF="./BVMatMult.html">BVMatMult</A></TD>
  <TD WIDTH=250><A HREF="./BVView.html">BVView</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
- <TD WIDTH=250><A HREF="./BVAXPY.html">BVAXPY</A></TD>
- <TD WIDTH=250><A HREF="./BVInsertVec.html">BVInsertVec</A></TD>
- <TD WIDTH=250><A HREF="./BVNormColumn.html">BVNormColumn</A></TD>
-<TR>
  <TD WIDTH=250><A HREF="./BVDot.html">BVDot</A></TD>
  <TD WIDTH=250><A HREF="./BVInsertVecs.html">BVInsertVecs</A></TD>
- <TD WIDTH=250><A HREF="./BVNorm.html">BVNorm</A></TD>
+ <TD WIDTH=250><A HREF="./BVNormColumn.html">BVNormColumn</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVDotVec.html">BVDotVec</A></TD>
  <TD WIDTH=250><A HREF="./BVMatProject.html">BVMatProject</A></TD>
@@ -60,11 +56,11 @@ These routines are usually not needed by application programmers.
 <TR>
  <TD WIDTH=250><A HREF="./BVDuplicate.html">BVDuplicate</A></TD>
  <TD WIDTH=250><A HREF="./BVMult.html">BVMult</A></TD>
- <TD WIDTH=250><A HREF="./BVScaleColumn.html">BVScaleColumn</A></TD>
+ <TD WIDTH=250><A HREF="./BVScale.html">BVScale</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVDuplicateResize.html">BVDuplicateResize</A></TD>
  <TD WIDTH=250><A HREF="./BVMultInPlace.html">BVMultInPlace</A></TD>
- <TD WIDTH=250><A HREF="./BVScale.html">BVScale</A></TD>
+ <TD WIDTH=250><A HREF="./BVScaleColumn.html">BVScaleColumn</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVGetActiveColumns.html">BVGetActiveColumns</A></TD>
  <TD WIDTH=250><A HREF="./BVMultInPlaceTranspose.html">BVMultInPlaceTranspose</A></TD>
@@ -74,54 +70,66 @@ These routines are usually not needed by application programmers.
  <TD WIDTH=250><A HREF="./BVMultVec.html">BVMultVec</A></TD>
  <TD WIDTH=250><A HREF="./BVSetType.html">BVSetType</A></TD>
 <TR>
+ <TD WIDTH=250><A HREF="./BVInsertVec.html">BVInsertVec</A></TD>
+ <TD WIDTH=250><A HREF="./BVNorm.html">BVNorm</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./BVAppendOptionsPrefix.html">BVAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./BVGetOrthogonalization.html">BVGetOrthogonalization</A></TD>
- <TD WIDTH=250><A HREF="./BVOrthogRefineType.html">BVOrthogRefineType</A></TD>
+ <TD WIDTH=250><A HREF="./BVGetRandomContext.html">BVGetRandomContext</A></TD>
+ <TD WIDTH=250><A HREF="./BVRegister.html">BVRegister</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVApplyMatrix.html">BVApplyMatrix</A></TD>
  <TD WIDTH=250><A HREF="./BVInsertConstraints.html">BVInsertConstraints</A></TD>
- <TD WIDTH=250><A HREF="./BVOrthogType.html">BVOrthogType</A></TD>
+ <TD WIDTH=250><A HREF="./BVRegisterAll.html">BVRegisterAll</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./BVDotColumnBegin.html">BVDotColumnBegin</A></TD>
+ <TD WIDTH=250><A HREF="./BVDotColumn.html">BVDotColumn</A></TD>
  <TD WIDTH=250><A HREF="./BVMatMultType.html">BVMatMultType</A></TD>
- <TD WIDTH=250><A HREF="./BVRegisterAll.html">BVRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./BVResize.html">BVResize</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./BVDotColumnEnd.html">BVDotColumnEnd</A></TD>
+ <TD WIDTH=250><A HREF="./BVDotColumnBegin.html">BVDotColumnBegin</A></TD>
  <TD WIDTH=250><A HREF="./BVMultColumn.html">BVMultColumn</A></TD>
- <TD WIDTH=250><A HREF="./BVRegister.html">BVRegister</A></TD>
+ <TD WIDTH=250><A HREF="./BVRestoreArray.html">BVRestoreArray</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./BVDotColumn.html">BVDotColumn</A></TD>
+ <TD WIDTH=250><A HREF="./BVDotColumnEnd.html">BVDotColumnEnd</A></TD>
  <TD WIDTH=250><A HREF="./BVNormColumnBegin.html">BVNormColumnBegin</A></TD>
- <TD WIDTH=250><A HREF="./BVResize.html">BVResize</A></TD>
+ <TD WIDTH=250><A HREF="./BVRestoreArrayRead.html">BVRestoreArrayRead</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVDotVecBegin.html">BVDotVecBegin</A></TD>
  <TD WIDTH=250><A HREF="./BVNormColumnEnd.html">BVNormColumnEnd</A></TD>
- <TD WIDTH=250><A HREF="./BVRestoreArray.html">BVRestoreArray</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetMatMultMethod.html">BVSetMatMultMethod</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVDotVecEnd.html">BVDotVecEnd</A></TD>
  <TD WIDTH=250><A HREF="./BVNormVecBegin.html">BVNormVecBegin</A></TD>
- <TD WIDTH=250><A HREF="./BVSetMatMultMethod.html">BVSetMatMultMethod</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetMatrix.html">BVSetMatrix</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVGetArray.html">BVGetArray</A></TD>
  <TD WIDTH=250><A HREF="./BVNormVecEnd.html">BVNormVecEnd</A></TD>
- <TD WIDTH=250><A HREF="./BVSetMatrix.html">BVSetMatrix</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetOptionsPrefix.html">BVSetOptionsPrefix</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./BVGetMatMultMethod.html">BVGetMatMultMethod</A></TD>
+ <TD WIDTH=250><A HREF="./BVGetArrayRead.html">BVGetArrayRead</A></TD>
  <TD WIDTH=250><A HREF="./BVOrthogBlockType.html">BVOrthogBlockType</A></TD>
- <TD WIDTH=250><A HREF="./BVSetOptionsPrefix.html">BVSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetOrthogonalization.html">BVSetOrthogonalization</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./BVGetMatMultMethod.html">BVGetMatMultMethod</A></TD>
+ <TD WIDTH=250><A HREF="./BVOrthogRefineType.html">BVOrthogRefineType</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetRandom.html">BVSetRandom</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVGetMatrix.html">BVGetMatrix</A></TD>
- <TD WIDTH=250><A HREF="./BVOrthogonalizeColumn.html">BVOrthogonalizeColumn</A></TD>
- <TD WIDTH=250><A HREF="./BVSetOrthogonalization.html">BVSetOrthogonalization</A></TD>
+ <TD WIDTH=250><A HREF="./BVOrthogType.html">BVOrthogType</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetRandomColumn.html">BVSetRandomColumn</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVGetNumConstraints.html">BVGetNumConstraints</A></TD>
- <TD WIDTH=250><A HREF="./BVOrthogonalizeSomeColumn.html">BVOrthogonalizeSomeColumn</A></TD>
- <TD WIDTH=250><A HREF="./BVSetRandomColumn.html">BVSetRandomColumn</A></TD>
+ <TD WIDTH=250><A HREF="./BVOrthogonalizeColumn.html">BVOrthogonalizeColumn</A></TD>
+ <TD WIDTH=250><A HREF="./BVSetRandomContext.html">BVSetRandomContext</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./BVGetOptionsPrefix.html">BVGetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./BVOrthogonalizeSomeColumn.html">BVOrthogonalizeSomeColumn</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./BVGetOrthogonalization.html">BVGetOrthogonalization</A></TD>
  <TD WIDTH=250><A HREF="./BVOrthogonalizeVec.html">BVOrthogonalizeVec</A></TD>
- <TD WIDTH=250><A HREF="./BVSetRandom.html">BVSetRandom</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./BVApplyMatrixBV.html">BVApplyMatrixBV</A></TD>
diff --git a/docs/manualpages/DS/DS.html b/docs/manualpages/DS/DS.html
index be65c84..0a5c652 100644
--- a/docs/manualpages/DS/DS.html
+++ b/docs/manualpages/DS/DS.html
@@ -6,8 +6,8 @@
 <TITLE>DS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DS</H1>
 Direct solver (or dense system), to represent low-dimensional eigenproblems that must be solved within iterative solvers. This is an auxiliary object and is not normally needed by application programmers. 
diff --git a/docs/manualpages/DS/DSAllocate.html b/docs/manualpages/DS/DSAllocate.html
index 93fbb4a..b725dac 100644
--- a/docs/manualpages/DS/DSAllocate.html
+++ b/docs/manualpages/DS/DSAllocate.html
@@ -6,23 +6,23 @@
 <TITLE>DSAllocate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSAllocate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSAllocate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSAllocate</H1>
 Allocates memory for internal storage or matrices in <A HREF="../DS/DS.html#DS">DS</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSAllocate.html#DSAllocate">DSAllocate</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt ld)
+PetscErrorCode DSAllocate(DS ds,PetscInt ld)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ld </B></TD><TD> - leading dimension (maximum allowed dimension for the matrices, including
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ld </B></TD><TD> - leading dimension (maximum allowed dimension for the matrices, including
 the extra row if present)
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/DS/DSAppendOptionsPrefix.html b/docs/manualpages/DS/DSAppendOptionsPrefix.html
index a5382dc..47c7321 100644
--- a/docs/manualpages/DS/DSAppendOptionsPrefix.html
+++ b/docs/manualpages/DS/DSAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>DSAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../DS/DS.html#DS">DS</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSAppendOptionsPrefix.html#DSAppendOptionsPrefix">DSAppendOptionsPrefix</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,const char *prefix)
+PetscErrorCode DSAppendOptionsPrefix(DS ds,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../DS/DS.html#DS">DS</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../DS/DS.html#DS">DS</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSCond.html b/docs/manualpages/DS/DSCond.html
index 9e92206..e2c4938 100644
--- a/docs/manualpages/DS/DSCond.html
+++ b/docs/manualpages/DS/DSCond.html
@@ -6,23 +6,23 @@
 <TITLE>DSCond</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSCond.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSCond.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSCond</H1>
 Compute the inf-norm condition number of the first matrix as cond(A) = norm(A)*norm(inv(A)). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSCond.html#DSCond">DSCond</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscReal *cond)
+PetscErrorCode DSCond(DS ds,PetscReal *cond)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cond </B></TD><TD> - the computed condition number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cond </B></TD><TD> - the computed condition number
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSCopyMat.html b/docs/manualpages/DS/DSCopyMat.html
index 736e361..349ab51 100644
--- a/docs/manualpages/DS/DSCopyMat.html
+++ b/docs/manualpages/DS/DSCopyMat.html
@@ -6,39 +6,39 @@
 <TITLE>DSCopyMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSCopyMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSCopyMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSCopyMat</H1>
 Copies the contents of a sequential dense Mat object to the indicated <A HREF="../DS/DS.html#DS">DS</A> matrix, or vice versa.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSCopyMat.html#DSCopyMat">DSCopyMat</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,PetscInt mr,PetscInt mc,Mat A,PetscInt Ar,PetscInt Ac,PetscInt rows,PetscInt cols,PetscBool out)
+PetscErrorCode DSCopyMat(DS ds,DSMatType m,PetscInt mr,PetscInt mc,Mat A,PetscInt Ar,PetscInt Ac,PetscInt rows,PetscInt cols,PetscBool out)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m    </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m    </B></TD><TD> - the requested matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mr   </B></TD><TD> - first row of m to be considered
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mr   </B></TD><TD> - first row of m to be considered
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mc   </B></TD><TD> - first column of m to be considered
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mc   </B></TD><TD> - first column of m to be considered
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A    </B></TD><TD> - Mat object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A    </B></TD><TD> - Mat object
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Ar   </B></TD><TD> - first row of A to be considered
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Ar   </B></TD><TD> - first row of A to be considered
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Ac   </B></TD><TD> - first column of A to be considered
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Ac   </B></TD><TD> - first column of A to be considered
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rows </B></TD><TD> - number of rows to copy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rows </B></TD><TD> - number of rows to copy
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cols </B></TD><TD> - number of columns to copy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cols </B></TD><TD> - number of columns to copy
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>out  </B></TD><TD> - whether the data is copied out of the <A HREF="../DS/DS.html#DS">DS</A>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>out  </B></TD><TD> - whether the data is copied out of the <A HREF="../DS/DS.html#DS">DS</A>
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/DS/DSCreate.html b/docs/manualpages/DS/DSCreate.html
index c5aba45..623365d 100644
--- a/docs/manualpages/DS/DSCreate.html
+++ b/docs/manualpages/DS/DSCreate.html
@@ -6,25 +6,25 @@
 <TITLE>DSCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSCreate</H1>
 Creates a <A HREF="../DS/DS.html#DS">DS</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSCreate.html#DSCreate">DSCreate</A>(MPI_Comm comm,<A HREF="../DS/DS.html#DS">DS</A> *newds)
+PetscErrorCode DSCreate(MPI_Comm comm,DS *newds)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>newds </B> - location to put the <A HREF="../DS/DS.html#DS">DS</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>newds </B></TD><TD> - location to put the <A HREF="../DS/DS.html#DS">DS</A> context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSDestroy.html b/docs/manualpages/DS/DSDestroy.html
index 6e5a86f..2c44213 100644
--- a/docs/manualpages/DS/DSDestroy.html
+++ b/docs/manualpages/DS/DSDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>DSDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSDestroy</H1>
 Destroys <A HREF="../DS/DS.html#DS">DS</A> context that was created with <A HREF="../DS/DSCreate.html#DSCreate">DSCreate</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSDestroy.html#DSDestroy">DSDestroy</A>(<A HREF="../DS/DS.html#DS">DS</A> *ds)
+PetscErrorCode DSDestroy(DS *ds)
 </PRE>
 Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSFinalizePackage.html b/docs/manualpages/DS/DSFinalizePackage.html
index b9a82b2..e8a2927 100644
--- a/docs/manualpages/DS/DSFinalizePackage.html
+++ b/docs/manualpages/DS/DSFinalizePackage.html
@@ -6,15 +6,15 @@
 <TITLE>DSFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSFinalizePackage</H1>
 This function destroys everything in the SLEPc interface to the <A HREF="../DS/DS.html#DS">DS</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSFinalizePackage.html#DSFinalizePackage">DSFinalizePackage</A>(void)
+PetscErrorCode DSFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetArray.html b/docs/manualpages/DS/DSGetArray.html
index 474f718..ce4f0a2 100644
--- a/docs/manualpages/DS/DSGetArray.html
+++ b/docs/manualpages/DS/DSGetArray.html
@@ -6,28 +6,28 @@
 <TITLE>DSGetArray</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetArray.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetArray.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetArray</H1>
 Returns a pointer to one of the internal arrays used to represent matrices. You MUST call <A HREF="../DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</A>() when you no longer need to access the array. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetArray.html#DSGetArray">DSGetArray</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,PetscScalar *a[])
+PetscErrorCode DSGetArray(DS ds,DSMatType m,PetscScalar *a[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>a  </B> - pointer to the values
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - pointer to the values
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetArrayReal.html b/docs/manualpages/DS/DSGetArrayReal.html
index 2f3ea23..f640e68 100644
--- a/docs/manualpages/DS/DSGetArrayReal.html
+++ b/docs/manualpages/DS/DSGetArrayReal.html
@@ -6,28 +6,28 @@
 <TITLE>DSGetArrayReal</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetArrayReal.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetArrayReal.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetArrayReal</H1>
 Returns a pointer to one of the internal arrays used to represent real matrices. You MUST call <A HREF="../DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</A>() when you no longer need to access the array. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,PetscReal *a[])
+PetscErrorCode DSGetArrayReal(DS ds,DSMatType m,PetscReal *a[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>a  </B> - pointer to the values
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - pointer to the values
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetBlockSize.html b/docs/manualpages/DS/DSGetBlockSize.html
index f8c6fa5..af40bb1 100644
--- a/docs/manualpages/DS/DSGetBlockSize.html
+++ b/docs/manualpages/DS/DSGetBlockSize.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetBlockSize</H1>
 Gets the block size. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt *bs)
+PetscErrorCode DSGetBlockSize(DS ds,PetscInt *bs)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bs </B> - block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - block size
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetCompact.html b/docs/manualpages/DS/DSGetCompact.html
index adf0998..cc72032 100644
--- a/docs/manualpages/DS/DSGetCompact.html
+++ b/docs/manualpages/DS/DSGetCompact.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetCompact</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetCompact.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetCompact.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetCompact</H1>
 Gets the compact storage flag. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetCompact.html#DSGetCompact">DSGetCompact</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscBool *comp)
+PetscErrorCode DSGetCompact(DS ds,PetscBool *comp)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>comp </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comp </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetDimensions.html b/docs/manualpages/DS/DSGetDimensions.html
index 0b380a4..f496ce3 100644
--- a/docs/manualpages/DS/DSGetDimensions.html
+++ b/docs/manualpages/DS/DSGetDimensions.html
@@ -6,33 +6,33 @@
 <TITLE>DSGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetDimensions</H1>
 Returns the current dimensions. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt *n,PetscInt *m,PetscInt *l,PetscInt *k,PetscInt *t)
+PetscErrorCode DSGetDimensions(DS ds,PetscInt *n,PetscInt *m,PetscInt *l,PetscInt *k,PetscInt *t)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the current size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the current size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the current column size (only for DSSVD)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the current column size (only for DSSVD)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of locked (inactive) leading columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of locked (inactive) leading columns
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - intermediate dimension (e.g., position of arrow)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - intermediate dimension (e.g., position of arrow)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t  </B></TD><TD> - truncated length
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t  </B></TD><TD> - truncated length
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSGetExtraRow.html b/docs/manualpages/DS/DSGetExtraRow.html
index 9274b92..7818d20 100644
--- a/docs/manualpages/DS/DSGetExtraRow.html
+++ b/docs/manualpages/DS/DSGetExtraRow.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetExtraRow</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetExtraRow.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetExtraRow.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetExtraRow</H1>
 Gets the extra row flag. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscBool *ext)
+PetscErrorCode DSGetExtraRow(DS ds,PetscBool *ext)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ext </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ext </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetLeadingDimension.html b/docs/manualpages/DS/DSGetLeadingDimension.html
index 3993d3d..f905350 100644
--- a/docs/manualpages/DS/DSGetLeadingDimension.html
+++ b/docs/manualpages/DS/DSGetLeadingDimension.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetLeadingDimension</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetLeadingDimension.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetLeadingDimension.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetLeadingDimension</H1>
 Returns the leading dimension of the allocated matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt *ld)
+PetscErrorCode DSGetLeadingDimension(DS ds,PetscInt *ld)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ld </B> - leading dimension (maximum allowed dimension for the matrices)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ld </B></TD><TD> - leading dimension (maximum allowed dimension for the matrices)
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetMat.html b/docs/manualpages/DS/DSGetMat.html
index 17c963b..aee6d71 100644
--- a/docs/manualpages/DS/DSGetMat.html
+++ b/docs/manualpages/DS/DSGetMat.html
@@ -6,28 +6,28 @@
 <TITLE>DSGetMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetMat</H1>
 Returns a sequential dense Mat object containing the requested matrix.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetMat.html#DSGetMat">DSGetMat</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,Mat *A)
+PetscErrorCode DSGetMat(DS ds,DSMatType m,Mat *A)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>A  </B> - Mat object
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - Mat object
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The Mat is created with sizes equal to the current <A HREF="../DS/DS.html#DS">DS</A> dimensions (nxm),
diff --git a/docs/manualpages/DS/DSGetMethod.html b/docs/manualpages/DS/DSGetMethod.html
index e6099c8..5b0d724 100644
--- a/docs/manualpages/DS/DSGetMethod.html
+++ b/docs/manualpages/DS/DSGetMethod.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetMethod</H1>
 Gets the method currently used in the <A HREF="../DS/DS.html#DS">DS</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetMethod.html#DSGetMethod">DSGetMethod</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt *meth)
+PetscErrorCode DSGetMethod(DS ds,PetscInt *meth)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>meth </B> - identifier of the method
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>meth </B></TD><TD> - identifier of the method
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetOptionsPrefix.html b/docs/manualpages/DS/DSGetOptionsPrefix.html
index 88b23ad..c6712b0 100644
--- a/docs/manualpages/DS/DSGetOptionsPrefix.html
+++ b/docs/manualpages/DS/DSGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>DSGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../DS/DS.html#DS">DS</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetOptionsPrefix.html#DSGetOptionsPrefix">DSGetOptionsPrefix</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,const char *prefix[])
+PetscErrorCode DSGetOptionsPrefix(DS ds,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/DS/DSGetRefined.html b/docs/manualpages/DS/DSGetRefined.html
index c99bb5e..5f2155b 100644
--- a/docs/manualpages/DS/DSGetRefined.html
+++ b/docs/manualpages/DS/DSGetRefined.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetRefined</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetRefined.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetRefined.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetRefined</H1>
 Gets the refined vectors flag. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetRefined.html#DSGetRefined">DSGetRefined</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscBool *ref)
+PetscErrorCode DSGetRefined(DS ds,PetscBool *ref)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ref </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ref </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetSlepcSC.html b/docs/manualpages/DS/DSGetSlepcSC.html
index 552a550..70c8e82 100644
--- a/docs/manualpages/DS/DSGetSlepcSC.html
+++ b/docs/manualpages/DS/DSGetSlepcSC.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetSlepcSC</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetSlepcSC.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetSlepcSC.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetSlepcSC</H1>
 Gets the sorting criterion context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,SlepcSC *sc)
+PetscErrorCode DSGetSlepcSC(DS ds,SlepcSC *sc)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>sc </B> - a pointer to the sorting criterion context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc </B></TD><TD> - a pointer to the sorting criterion context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetState.html b/docs/manualpages/DS/DSGetState.html
index b6799cf..0475e2c 100644
--- a/docs/manualpages/DS/DSGetState.html
+++ b/docs/manualpages/DS/DSGetState.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetState</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetState.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetState.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetState</H1>
 Returns the current state. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetState.html#DSGetState">DSGetState</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSStateType.html#DSStateType">DSStateType</A> *state)
+PetscErrorCode DSGetState(DS ds,DSStateType *state)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>state </B> - current state
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>state </B></TD><TD> - current state
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSGetType.html b/docs/manualpages/DS/DSGetType.html
index 89e265f..c8ed285 100644
--- a/docs/manualpages/DS/DSGetType.html
+++ b/docs/manualpages/DS/DSGetType.html
@@ -6,25 +6,25 @@
 <TITLE>DSGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSGetType</H1>
 Gets the <A HREF="../DS/DS.html#DS">DS</A> type name (as a string) from the <A HREF="../DS/DS.html#DS">DS</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSGetType.html#DSGetType">DSGetType</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSType.html#DSType">DSType</A> *type)
+PetscErrorCode DSGetType(DS ds,DSType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of the direct solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of the direct solver
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSInitializePackage.html b/docs/manualpages/DS/DSInitializePackage.html
index 1c4868f..da04b0a 100644
--- a/docs/manualpages/DS/DSInitializePackage.html
+++ b/docs/manualpages/DS/DSInitializePackage.html
@@ -6,15 +6,15 @@
 <TITLE>DSInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSInitializePackage</H1>
 This function initializes everything in the <A HREF="../DS/DS.html#DS">DS</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../DS/DSCreate.html#DSCreate">DSCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSInitializePackage.html#DSInitializePackage">DSInitializePackage</A>()
+PetscErrorCode DSInitializePackage()
 </PRE>
 
 <P>
diff --git a/docs/manualpages/DS/DSMatType.html b/docs/manualpages/DS/DSMatType.html
index 8406bc8..c52cdd5 100644
--- a/docs/manualpages/DS/DSMatType.html
+++ b/docs/manualpages/DS/DSMatType.html
@@ -6,8 +6,8 @@
 <TITLE>DSMatType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSMatType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSMatType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSMatType</H1>
 Used to refer to one of the matrices stored internally in <A HREF="../DS/DS.html#DS">DS</A> 
@@ -40,31 +40,31 @@ typedef enum { DS_MAT_A,
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The matrices preferently refer to
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_A  </B></TD><TD> - first matrix of eigenproblem/singular value problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_A  </B></TD><TD> - first matrix of eigenproblem/singular value problem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_B  </B></TD><TD> - second matrix of a generalized eigenproblem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_B  </B></TD><TD> - second matrix of a generalized eigenproblem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_C  </B></TD><TD> - third matrix of a quadratic eigenproblem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_C  </B></TD><TD> - third matrix of a quadratic eigenproblem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_T  </B></TD><TD> - tridiagonal matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_T  </B></TD><TD> - tridiagonal matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_D  </B></TD><TD> - diagonal matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_D  </B></TD><TD> - diagonal matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Q  </B></TD><TD> - orthogonal matrix of (right) Schur vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Q  </B></TD><TD> - orthogonal matrix of (right) Schur vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Z  </B></TD><TD> - orthogonal matrix of left Schur vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Z  </B></TD><TD> - orthogonal matrix of left Schur vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_X  </B></TD><TD> - right eigenvectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_X  </B></TD><TD> - right eigenvectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Y  </B></TD><TD> - left eigenvectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Y  </B></TD><TD> - left eigenvectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_U  </B></TD><TD> - left singular vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_U  </B></TD><TD> - left singular vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_VT </B></TD><TD> - right singular vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_VT </B></TD><TD> - right singular vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_W  </B></TD><TD> - workspace matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_W  </B></TD><TD> - workspace matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Ex </B></TD><TD> - extra matrices (x=0,..,9)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>DS_MAT_Ex </B></TD><TD> - extra matrices (x=0,..,9)
 </TD></TR></TABLE>
 <P>
 All matrices can have space to hold ld x ld elements, except for
diff --git a/docs/manualpages/DS/DSNEPGetFN.html b/docs/manualpages/DS/DSNEPGetFN.html
index 81ebcf6..f1663f6 100644
--- a/docs/manualpages/DS/DSNEPGetFN.html
+++ b/docs/manualpages/DS/DSNEPGetFN.html
@@ -6,28 +6,28 @@
 <TITLE>DSNEPGetFN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSNEPGetFN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSNEPGetFN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSNEPGetFN</H1>
 Gets the functions associated with the nonlinear <A HREF="../DS/DS.html#DS">DS</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSNEPGetFN.html#DSNEPGetFN">DSNEPGetFN</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt k,<A HREF="../FN/FN.html#FN">FN</A> *fn)
+PetscErrorCode DSNEPGetFN(DS ds,PetscInt k,FN *fn)
 </PRE>
 Not collective, though parallel FNs are returned if the <A HREF="../DS/DS.html#DS">DS</A> is parallel
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index of the requested function (starting in 0)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index of the requested function (starting in 0)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>fn </B> - the function
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the function
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSNEPGetNumFN.html b/docs/manualpages/DS/DSNEPGetNumFN.html
index 3b79f5b..c8caa02 100644
--- a/docs/manualpages/DS/DSNEPGetNumFN.html
+++ b/docs/manualpages/DS/DSNEPGetNumFN.html
@@ -6,25 +6,25 @@
 <TITLE>DSNEPGetNumFN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSNEPGetNumFN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSNEPGetNumFN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSNEPGetNumFN</H1>
 Returns the number of functions stored internally by the <A HREF="../DS/DS.html#DS">DS</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSNEPGetNumFN.html#DSNEPGetNumFN">DSNEPGetNumFN</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt *n)
+PetscErrorCode DSNEPGetNumFN(DS ds,PetscInt *n)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>n </B> - the number of functions passed in <A HREF="../DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - the number of functions passed in <A HREF="../DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSNEPSetFN.html b/docs/manualpages/DS/DSNEPSetFN.html
index 336a95c..f752410 100644
--- a/docs/manualpages/DS/DSNEPSetFN.html
+++ b/docs/manualpages/DS/DSNEPSetFN.html
@@ -6,25 +6,25 @@
 <TITLE>DSNEPSetFN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSNEPSetFN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSNEPSetFN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSNEPSetFN</H1>
 Sets a number of functions that define the nonlinear eigenproblem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt n,<A HREF="../FN/FN.html#FN">FN</A> fn[])
+PetscErrorCode DSNEPSetFN(DS ds,PetscInt n,FN fn[])
 </PRE>
 Collective on <A HREF="../DS/DS.html#DS">DS</A> and <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of functions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of functions
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - array of functions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - array of functions
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSNormalize.html b/docs/manualpages/DS/DSNormalize.html
index c7a7a91..2e2f521 100644
--- a/docs/manualpages/DS/DSNormalize.html
+++ b/docs/manualpages/DS/DSNormalize.html
@@ -6,25 +6,25 @@
 <TITLE>DSNormalize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSNormalize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSNormalize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSNormalize</H1>
 Normalize a column or all the columns of a matrix. Considers the case when the columns represent the real and the imaginary part of a vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSNormalize.html#DSNormalize">DSNormalize</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> mat,PetscInt col)
+PetscErrorCode DSNormalize(DS ds,DSMatType mat,PetscInt col)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix to be modified
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix to be modified
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>col </B></TD><TD> - the column to normalize or -1 to normalize all of them
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>col </B></TD><TD> - the column to normalize or -1 to normalize all of them
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSOrthogonalize.html b/docs/manualpages/DS/DSOrthogonalize.html
new file mode 100644
index 0000000..93b2404
--- /dev/null
+++ b/docs/manualpages/DS/DSOrthogonalize.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/DS/DSOrthogonalize.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>DSOrthogonalize</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSOrthogonalize.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>DSOrthogonalize</H1>
+Orthogonalize the columns of a matrix. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcds.h" 
+PetscErrorCode DSOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscInt *lindcols)
+</PRE>
+Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat  </B></TD><TD> - a matrix
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cols </B></TD><TD> - number of columns to orthogonalize (starting from column zero)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindcols </B></TD><TD> - (optional) number of linearly independent columns of the matrix
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/ds/interface/dspriv.c.html#DSOrthogonalize">src/sys/classes/ds/interface/dspriv.c</A>
+<BR><A HREF="./index.html">Index of all DS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/DS/DSPEPGetDegree.html b/docs/manualpages/DS/DSPEPGetDegree.html
index 27532fd..3ab5b98 100644
--- a/docs/manualpages/DS/DSPEPGetDegree.html
+++ b/docs/manualpages/DS/DSPEPGetDegree.html
@@ -6,25 +6,25 @@
 <TITLE>DSPEPGetDegree</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSPEPGetDegree.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSPEPGetDegree.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSPEPGetDegree</H1>
 Returns the polynomial degree for a DSPEP. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt *d)
+PetscErrorCode DSPEPGetDegree(DS ds,PetscInt *d)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>d </B> - the degree
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>d </B></TD><TD> - the degree
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSPEPSetDegree.html b/docs/manualpages/DS/DSPEPSetDegree.html
index 80bb417..e10ae49 100644
--- a/docs/manualpages/DS/DSPEPSetDegree.html
+++ b/docs/manualpages/DS/DSPEPSetDegree.html
@@ -6,23 +6,23 @@
 <TITLE>DSPEPSetDegree</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSPEPSetDegree.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSPEPSetDegree.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSPEPSetDegree</H1>
 Sets the polynomial degree for a DSPEP. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt d)
+PetscErrorCode DSPEPSetDegree(DS ds,PetscInt d)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>d  </B></TD><TD> - the degree
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>d  </B></TD><TD> - the degree
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSPseudoOrthogonalize.html b/docs/manualpages/DS/DSPseudoOrthogonalize.html
new file mode 100644
index 0000000..a2f5525
--- /dev/null
+++ b/docs/manualpages/DS/DSPseudoOrthogonalize.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/DS/DSPseudoOrthogonalize.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>DSPseudoOrthogonalize</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSPseudoOrthogonalize.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>DSPseudoOrthogonalize</H1>
+Orthogonalize the columns of a matrix with Modified Gram-Schmidt in an indefinite inner product space defined by a signature. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcds.h" 
+PetscErrorCode DSPseudoOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscReal *s,PetscInt *lindcols,PetscReal *ns)
+</PRE>
+Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat  </B></TD><TD> - the matrix
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cols </B></TD><TD> - number of columns to orthogonalize (starting from column zero)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s    </B></TD><TD> - the signature that defines the inner product
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lindcols </B></TD><TD> - (optional) linearly independent columns of the matrix
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ns   </B></TD><TD> - (optional) the new norm of the vectors
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/ds/interface/dspriv.c.html#DSPseudoOrthogonalize">src/sys/classes/ds/interface/dspriv.c</A>
+<BR><A HREF="./index.html">Index of all DS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/DS/DSRegister.html b/docs/manualpages/DS/DSRegister.html
index 03de33a..f8fb476 100644
--- a/docs/manualpages/DS/DSRegister.html
+++ b/docs/manualpages/DS/DSRegister.html
@@ -6,23 +6,23 @@
 <TITLE>DSRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSRegister</H1>
 Adds a direct solver to the <A HREF="../DS/DS.html#DS">DS</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSRegister.html#DSRegister">DSRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../DS/DS.html#DS">DS</A>))
+PetscErrorCode DSRegister(const char *name,PetscErrorCode (*function)(DS))
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined <A HREF="../DS/DS.html#DS">DS</A>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined <A HREF="../DS/DS.html#DS">DS</A>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>routine_create </B></TD><TD> - routine to create context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>routine_create </B></TD><TD> - routine to create context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSRegisterAll.html b/docs/manualpages/DS/DSRegisterAll.html
index 7f6930a..e99fffc 100644
--- a/docs/manualpages/DS/DSRegisterAll.html
+++ b/docs/manualpages/DS/DSRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>DSRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSRegisterAll</H1>
 Registers all of the direct solvers in the <A HREF="../DS/DS.html#DS">DS</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</A>(void)
+PetscErrorCode DSRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/DS/DSReset.html b/docs/manualpages/DS/DSReset.html
index 2211eda..62cea7b 100644
--- a/docs/manualpages/DS/DSReset.html
+++ b/docs/manualpages/DS/DSReset.html
@@ -6,21 +6,21 @@
 <TITLE>DSReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSReset</H1>
 Resets the <A HREF="../DS/DS.html#DS">DS</A> context to the initial state. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSReset.html#DSReset">DSReset</A>(<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode DSReset(DS ds)
 </PRE>
 Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSRestoreArray.html b/docs/manualpages/DS/DSRestoreArray.html
index d87738c..16d386c 100644
--- a/docs/manualpages/DS/DSRestoreArray.html
+++ b/docs/manualpages/DS/DSRestoreArray.html
@@ -6,25 +6,25 @@
 <TITLE>DSRestoreArray</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSRestoreArray.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSRestoreArray.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSRestoreArray</H1>
 Restores the matrix after <A HREF="../DS/DSGetArray.html#DSGetArray">DSGetArray</A>() was called. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,PetscScalar *a[])
+PetscErrorCode DSRestoreArray(DS ds,DSMatType m,PetscScalar *a[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - pointer to the values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - pointer to the values
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSRestoreArrayReal.html b/docs/manualpages/DS/DSRestoreArrayReal.html
index 4854ad0..813e8a1 100644
--- a/docs/manualpages/DS/DSRestoreArrayReal.html
+++ b/docs/manualpages/DS/DSRestoreArrayReal.html
@@ -6,25 +6,25 @@
 <TITLE>DSRestoreArrayReal</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSRestoreArrayReal.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSRestoreArrayReal.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSRestoreArrayReal</H1>
 Restores the matrix after <A HREF="../DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</A>() was called. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,PetscReal *a[])
+PetscErrorCode DSRestoreArrayReal(DS ds,DSMatType m,PetscReal *a[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - pointer to the values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a  </B></TD><TD> - pointer to the values
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSRestoreMat.html b/docs/manualpages/DS/DSRestoreMat.html
index 98b2b44..f7dcd60 100644
--- a/docs/manualpages/DS/DSRestoreMat.html
+++ b/docs/manualpages/DS/DSRestoreMat.html
@@ -6,25 +6,25 @@
 <TITLE>DSRestoreMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSRestoreMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSRestoreMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSRestoreMat</H1>
 Restores the matrix after <A HREF="../DS/DSGetMat.html#DSGetMat">DSGetMat</A>() was called. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m,Mat *A)
+PetscErrorCode DSRestoreMat(DS ds,DSMatType m,Mat *A)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the requested matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the fetched Mat object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the fetched Mat object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetBlockSize.html b/docs/manualpages/DS/DSSetBlockSize.html
index c7e17db..efc16ef 100644
--- a/docs/manualpages/DS/DSSetBlockSize.html
+++ b/docs/manualpages/DS/DSSetBlockSize.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetBlockSize</H1>
 Sets the block size. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt bs)
+PetscErrorCode DSSetBlockSize(DS ds,PetscInt bs)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - the block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - the block size
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSSetCompact.html b/docs/manualpages/DS/DSSetCompact.html
index 20e4b24..3fac2df 100644
--- a/docs/manualpages/DS/DSSetCompact.html
+++ b/docs/manualpages/DS/DSSetCompact.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetCompact</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetCompact.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetCompact.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetCompact</H1>
 Switch to compact storage of matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetCompact.html#DSSetCompact">DSSetCompact</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscBool comp)
+PetscErrorCode DSSetCompact(DS ds,PetscBool comp)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comp </B></TD><TD> - a boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comp </B></TD><TD> - a boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetDimensions.html b/docs/manualpages/DS/DSSetDimensions.html
index c7b5e5a..bebff2c 100644
--- a/docs/manualpages/DS/DSSetDimensions.html
+++ b/docs/manualpages/DS/DSSetDimensions.html
@@ -6,29 +6,29 @@
 <TITLE>DSSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetDimensions</H1>
 Resize the matrices in the <A HREF="../DS/DS.html#DS">DS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt n,PetscInt m,PetscInt l,PetscInt k)
+PetscErrorCode DSSetDimensions(DS ds,PetscInt n,PetscInt m,PetscInt l,PetscInt k)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the new size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the new size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the new column size (only for DSSVD)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m  </B></TD><TD> - the new column size (only for DSSVD)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of locked (inactive) leading columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>l  </B></TD><TD> - number of locked (inactive) leading columns
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - intermediate dimension (e.g., position of arrow)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - intermediate dimension (e.g., position of arrow)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetExtraRow.html b/docs/manualpages/DS/DSSetExtraRow.html
index 4dcf67b..c6a2da6 100644
--- a/docs/manualpages/DS/DSSetExtraRow.html
+++ b/docs/manualpages/DS/DSSetExtraRow.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetExtraRow</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetExtraRow.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetExtraRow.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetExtraRow</H1>
 Sets a flag to indicate that the matrix has one extra row. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscBool ext)
+PetscErrorCode DSSetExtraRow(DS ds,PetscBool ext)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ext </B></TD><TD> - a boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ext </B></TD><TD> - a boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetFromOptions.html b/docs/manualpages/DS/DSSetFromOptions.html
index 86ca53d..7cd46f9 100644
--- a/docs/manualpages/DS/DSSetFromOptions.html
+++ b/docs/manualpages/DS/DSSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>DSSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetFromOptions</H1>
 Sets <A HREF="../DS/DS.html#DS">DS</A> options from the options database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</A>(<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode DSSetFromOptions(DS ds)
 </PRE>
 Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
diff --git a/docs/manualpages/DS/DSSetIdentity.html b/docs/manualpages/DS/DSSetIdentity.html
index 03f9116..965c08b 100644
--- a/docs/manualpages/DS/DSSetIdentity.html
+++ b/docs/manualpages/DS/DSSetIdentity.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetIdentity</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetIdentity.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetIdentity.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetIdentity</H1>
 Copy the identity (a diagonal matrix with ones) on the active part of a matrix. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> mat)
+PetscErrorCode DSSetIdentity(DS ds,DSMatType mat)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds     </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds     </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat    </B></TD><TD> - the matrix to modify
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat    </B></TD><TD> - the matrix to modify
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSSetMethod.html b/docs/manualpages/DS/DSSetMethod.html
index 8e39ac2..4b868e5 100644
--- a/docs/manualpages/DS/DSSetMethod.html
+++ b/docs/manualpages/DS/DSSetMethod.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetMethod</H1>
 Selects the method to be used to solve the problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetMethod.html#DSSetMethod">DSSetMethod</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt meth)
+PetscErrorCode DSSetMethod(DS ds,PetscInt meth)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>meth </B></TD><TD> - an index indentifying the method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>meth </B></TD><TD> - an index indentifying the method
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSSetOptionsPrefix.html b/docs/manualpages/DS/DSSetOptionsPrefix.html
index 653a3fa..ca0174e 100644
--- a/docs/manualpages/DS/DSSetOptionsPrefix.html
+++ b/docs/manualpages/DS/DSSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../DS/DS.html#DS">DS</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,const char *prefix)
+PetscErrorCode DSSetOptionsPrefix(DS ds,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../DS/DS.html#DS">DS</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../DS/DS.html#DS">DS</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetRefined.html b/docs/manualpages/DS/DSSetRefined.html
index 198d597..23ca02b 100644
--- a/docs/manualpages/DS/DSSetRefined.html
+++ b/docs/manualpages/DS/DSSetRefined.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetRefined</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetRefined.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetRefined.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetRefined</H1>
 Sets a flag to indicate that refined vectors must be computed. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetRefined.html#DSSetRefined">DSSetRefined</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscBool ref)
+PetscErrorCode DSSetRefined(DS ds,PetscBool ref)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ref </B></TD><TD> - a boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ref </B></TD><TD> - a boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetSlepcSC.html b/docs/manualpages/DS/DSSetSlepcSC.html
index 6df1647..d905174 100644
--- a/docs/manualpages/DS/DSSetSlepcSC.html
+++ b/docs/manualpages/DS/DSSetSlepcSC.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetSlepcSC</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetSlepcSC.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetSlepcSC.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetSlepcSC</H1>
 Sets the sorting criterion context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,SlepcSC sc)
+PetscErrorCode DSSetSlepcSC(DS ds,SlepcSC sc)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc </B></TD><TD> - a pointer to the sorting criterion context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc </B></TD><TD> - a pointer to the sorting criterion context
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSSetState.html b/docs/manualpages/DS/DSSetState.html
index a98d152..fe34e88 100644
--- a/docs/manualpages/DS/DSSetState.html
+++ b/docs/manualpages/DS/DSSetState.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetState</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetState.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetState.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetState</H1>
 Change the state of the <A HREF="../DS/DS.html#DS">DS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetState.html#DSSetState">DSSetState</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSStateType.html#DSStateType">DSStateType</A> state)
+PetscErrorCode DSSetState(DS ds,DSStateType state)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds    </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds    </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>state </B></TD><TD> - the new state
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>state </B></TD><TD> - the new state
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSSetType.html b/docs/manualpages/DS/DSSetType.html
index e60cf74..2ecedc3 100644
--- a/docs/manualpages/DS/DSSetType.html
+++ b/docs/manualpages/DS/DSSetType.html
@@ -6,23 +6,23 @@
 <TITLE>DSSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSetType</H1>
 Selects the type for the <A HREF="../DS/DS.html#DS">DS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSetType.html#DSSetType">DSSetType</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSType.html#DSType">DSType</A> type)
+PetscErrorCode DSSetType(DS ds,DSType type)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/DS/DSSolve.html b/docs/manualpages/DS/DSSolve.html
index 034c072..ddd0d26 100644
--- a/docs/manualpages/DS/DSSolve.html
+++ b/docs/manualpages/DS/DSSolve.html
@@ -6,25 +6,25 @@
 <TITLE>DSSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSolve</H1>
 Solves the problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSolve.html#DSSolve">DSSolve</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscScalar *eigr,PetscScalar *eigi)
+PetscErrorCode DSSolve(DS ds,PetscScalar *eigr,PetscScalar *eigi)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - array to store the computed eigenvalues (real part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - array to store the computed eigenvalues (real part)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - array to store the computed eigenvalues (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - array to store the computed eigenvalues (imaginary part)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/DS/DSSort.html b/docs/manualpages/DS/DSSort.html
index 49330d3..06b07b2 100644
--- a/docs/manualpages/DS/DSSort.html
+++ b/docs/manualpages/DS/DSSort.html
@@ -6,34 +6,34 @@
 <TITLE>DSSort</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSSort.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSSort.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSSort</H1>
 Sorts the result of <A HREF="../DS/DSSolve.html#DSSolve">DSSolve</A>() according to a given sorting criterion. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSSort.html#DSSort">DSSort</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscScalar *eigr,PetscScalar *eigi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)
+PetscErrorCode DSSort(DS ds,PetscScalar *eigr,PetscScalar *eigi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds   </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - array containing the computed eigenvalues (real part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - array containing the computed eigenvalues (real part)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - array containing the computed eigenvalues (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - array containing the computed eigenvalues (imaginary part)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rr   </B></TD><TD> - (optional) array containing auxiliary values (real part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rr   </B></TD><TD> - (optional) array containing auxiliary values (real part)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ri   </B></TD><TD> - (optional) array containing auxiliary values (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ri   </B></TD><TD> - (optional) array containing auxiliary values (imaginary part)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
-<DT><B>k    </B> - (optional) number of elements in the leading group
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k    </B></TD><TD> - (optional) number of elements in the leading group
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This routine sorts the arrays provided in eigr and eigi, and also
diff --git a/docs/manualpages/DS/DSStateType.html b/docs/manualpages/DS/DSStateType.html
index c70e0be..77af69c 100644
--- a/docs/manualpages/DS/DSStateType.html
+++ b/docs/manualpages/DS/DSStateType.html
@@ -6,8 +6,8 @@
 <TITLE>DSStateType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSStateType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSStateType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSStateType</H1>
 Indicates in which state the direct solver is 
diff --git a/docs/manualpages/DS/DSTranslateHarmonic.html b/docs/manualpages/DS/DSTranslateHarmonic.html
index ab20735..0f83886 100644
--- a/docs/manualpages/DS/DSTranslateHarmonic.html
+++ b/docs/manualpages/DS/DSTranslateHarmonic.html
@@ -6,34 +6,34 @@
 <TITLE>DSTranslateHarmonic</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSTranslateHarmonic.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSTranslateHarmonic.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSTranslateHarmonic</H1>
 Computes a translation of the dense system. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSTranslateHarmonic.html#DSTranslateHarmonic">DSTranslateHarmonic</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscScalar tau,PetscReal beta,PetscBool recover,PetscScalar *g,PetscReal *gamma)
+PetscErrorCode DSTranslateHarmonic(DS ds,PetscScalar tau,PetscReal beta,PetscBool recover,PetscScalar *g,PetscReal *gamma)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds      </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds      </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tau     </B></TD><TD> - the translation amount
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tau     </B></TD><TD> - the translation amount
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>beta    </B></TD><TD> - last component of vector b
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>beta    </B></TD><TD> - last component of vector b
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>recover </B></TD><TD> - boolean flag to indicate whether to recover or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>recover </B></TD><TD> - boolean flag to indicate whether to recover or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>g       </B></TD><TD> - the computed vector (optional)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>g       </B></TD><TD> - the computed vector (optional)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>gamma   </B></TD><TD> - scale factor (optional)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>gamma   </B></TD><TD> - scale factor (optional)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSTranslateRKS.html b/docs/manualpages/DS/DSTranslateRKS.html
index 207e190..a94a8e7 100644
--- a/docs/manualpages/DS/DSTranslateRKS.html
+++ b/docs/manualpages/DS/DSTranslateRKS.html
@@ -6,23 +6,23 @@
 <TITLE>DSTranslateRKS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSTranslateRKS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSTranslateRKS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSTranslateRKS</H1>
 Computes a modification of the dense system corresponding to an update of the shift in a rational Krylov method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSTranslateRKS.html#DSTranslateRKS">DSTranslateRKS</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscScalar alpha)
+PetscErrorCode DSTranslateRKS(DS ds,PetscScalar alpha)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds    </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds    </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - the translation amount
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - the translation amount
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/DS/DSTruncate.html b/docs/manualpages/DS/DSTruncate.html
index c50f202..b101f94 100644
--- a/docs/manualpages/DS/DSTruncate.html
+++ b/docs/manualpages/DS/DSTruncate.html
@@ -6,23 +6,23 @@
 <TITLE>DSTruncate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSTruncate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSTruncate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSTruncate</H1>
 Truncates the system represented in the <A HREF="../DS/DS.html#DS">DS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSTruncate.html#DSTruncate">DSTruncate</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscInt n)
+PetscErrorCode DSTruncate(DS ds,PetscInt n)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the new size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - the new size
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/DS/DSType.html b/docs/manualpages/DS/DSType.html
index e95bc3e..5fcde71 100644
--- a/docs/manualpages/DS/DSType.html
+++ b/docs/manualpages/DS/DSType.html
@@ -6,8 +6,8 @@
 <TITLE>DSType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSType</H1>
 String with the name of the type of direct solver. Roughly, there are as many types as problem types are available within SLEPc. 
diff --git a/docs/manualpages/DS/DSUpdateExtraRow.html b/docs/manualpages/DS/DSUpdateExtraRow.html
index 2e51ed9..d3d25c9 100644
--- a/docs/manualpages/DS/DSUpdateExtraRow.html
+++ b/docs/manualpages/DS/DSUpdateExtraRow.html
@@ -6,21 +6,21 @@
 <TITLE>DSUpdateExtraRow</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSUpdateExtraRow.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSUpdateExtraRow.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSUpdateExtraRow</H1>
 Performs all necessary operations so that the extra row gets up-to-date after a call to <A HREF="../DS/DSSolve.html#DSSolve">DSSolve</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSUpdateExtraRow.html#DSUpdateExtraRow">DSUpdateExtraRow</A>(<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode DSUpdateExtraRow(DS ds)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>ds </B> - the direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/DS/DSVectors.html b/docs/manualpages/DS/DSVectors.html
index 5801c9c..60792b4 100644
--- a/docs/manualpages/DS/DSVectors.html
+++ b/docs/manualpages/DS/DSVectors.html
@@ -6,33 +6,33 @@
 <TITLE>DSVectors</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSVectors.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSVectors.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSVectors</H1>
 Compute vectors associated to the dense system such as eigenvectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSVectors.html#DSVectors">DSVectors</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> mat,PetscInt *j,PetscReal *rnorm)
+PetscErrorCode DSVectors(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)
 </PRE>
 Logically Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix, used to indicate which vectors are required
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix, used to indicate which vectors are required
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
-<DT><B>j   </B> - (optional) index of vector to be computed
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j   </B></TD><TD> - (optional) index of vector to be computed
+</TD></TR></TABLE>
 </TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>rnorm </B> - (optional) computed residual norm
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rnorm </B></TD><TD> - (optional) computed residual norm
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Allowed values for mat are DS_MAT_X, DS_MAT_Y, DS_MAT_U and DS_MAT_VT, to
diff --git a/docs/manualpages/DS/DSView.html b/docs/manualpages/DS/DSView.html
index 54cfade..30f486f 100644
--- a/docs/manualpages/DS/DSView.html
+++ b/docs/manualpages/DS/DSView.html
@@ -6,31 +6,31 @@
 <TITLE>DSView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSView</H1>
 Prints the <A HREF="../DS/DS.html#DS">DS</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSView.html#DSView">DSView</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscViewer viewer)
+PetscErrorCode DSView(DS ds,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/DS/DSViewMat.html b/docs/manualpages/DS/DSViewMat.html
index 22bba47..08472ad 100644
--- a/docs/manualpages/DS/DSViewMat.html
+++ b/docs/manualpages/DS/DSViewMat.html
@@ -6,25 +6,25 @@
 <TITLE>DSViewMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/DSViewMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/DSViewMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>DSViewMat</H1>
 Prints one of the internal <A HREF="../DS/DS.html#DS">DS</A> matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcds.h" 
-PetscErrorCode <A HREF="../DS/DSViewMat.html#DSViewMat">DSViewMat</A>(<A HREF="../DS/DS.html#DS">DS</A> ds,PetscViewer viewer,<A HREF="../DS/DSMatType.html#DSMatType">DSMatType</A> m)
+PetscErrorCode DSViewMat(DS ds,PetscViewer viewer,DSMatType m)
 </PRE>
 Collective on <A HREF="../DS/DS.html#DS">DS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds     </B></TD><TD> - the direct solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds     </B></TD><TD> - the direct solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - visualization context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m      </B></TD><TD> - matrix to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m      </B></TD><TD> - matrix to display
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/DS/index.html b/docs/manualpages/DS/index.html
index 4c834e7..7da180d 100644
--- a/docs/manualpages/DS/index.html
+++ b/docs/manualpages/DS/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/DS/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/DS/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
@@ -21,11 +21,11 @@ These routines are usually not needed by application programmers.
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./DSCreate.html">DSCreate</A></TD>
  <TD WIDTH=250><A HREF="./DS.html">DS</A></TD>
+ <TD WIDTH=250><A HREF="./DSDestroy.html">DSDestroy</A></TD>
  <TD WIDTH=250><A HREF="./DSView.html">DSView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./DSDestroy.html">DSDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./DSCreate.html">DSCreate</A></TD>
  <TD WIDTH=250><A HREF="./DSSetFromOptions.html">DSSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
@@ -72,11 +72,11 @@ These routines are usually not needed by application programmers.
  <TD WIDTH=250><A HREF="./DSSetState.html">DSSetState</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./DSGetExtraRow.html">DSGetExtraRow</A></TD>
- <TD WIDTH=250><A HREF="./DSRegisterAll.html">DSRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./DSRegister.html">DSRegister</A></TD>
  <TD WIDTH=250><A HREF="./DSStateType.html">DSStateType</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./DSGetLeadingDimension.html">DSGetLeadingDimension</A></TD>
- <TD WIDTH=250><A HREF="./DSRegister.html">DSRegister</A></TD>
+ <TD WIDTH=250><A HREF="./DSRegisterAll.html">DSRegisterAll</A></TD>
  <TD WIDTH=250><A HREF="./DSTruncate.html">DSTruncate</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./DSGetMat.html">DSGetMat</A></TD>
@@ -97,14 +97,18 @@ These routines are usually not needed by application programmers.
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./DSCopyMat.html">DSCopyMat</A></TD>
- <TD WIDTH=250><A HREF="./DSInitializePackage.html">DSInitializePackage</A></TD>
+ <TD WIDTH=250><A HREF="./DSOrthogonalize.html">DSOrthogonalize</A></TD>
  <TD WIDTH=250><A HREF="./DSTranslateRKS.html">DSTranslateRKS</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./DSFinalizePackage.html">DSFinalizePackage</A></TD>
- <TD WIDTH=250><A HREF="./DSSetSlepcSC.html">DSSetSlepcSC</A></TD>
+ <TD WIDTH=250><A HREF="./DSPseudoOrthogonalize.html">DSPseudoOrthogonalize</A></TD>
  <TD WIDTH=250><A HREF="./DSViewMat.html">DSViewMat</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./DSGetSlepcSC.html">DSGetSlepcSC</A></TD>
+ <TD WIDTH=250><A HREF="./DSSetSlepcSC.html">DSSetSlepcSC</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./DSInitializePackage.html">DSInitializePackage</A></TD>
  <TD WIDTH=250><A HREF="./DSTranslateHarmonic.html">DSTranslateHarmonic</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
diff --git a/docs/manualpages/EPS/EPS.html b/docs/manualpages/EPS/EPS.html
index c942896..a4162d1 100644
--- a/docs/manualpages/EPS/EPS.html
+++ b/docs/manualpages/EPS/EPS.html
@@ -6,8 +6,8 @@
 <TITLE>EPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPS</H1>
 Abstract SLEPc object that manages all the eigenvalue problem solvers. 
@@ -24,5 +24,7 @@ typedef struct _p_EPS* <A HREF="../EPS/EPS.html#EPS">EPS</A>;
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex29.c.html">src/eps/examples/tutorials/ex29.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex1f90.F90.html">src/eps/examples/tutorials/ex1f90.F90.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSAllocateSolution.html b/docs/manualpages/EPS/EPSAllocateSolution.html
index dccc73e..3779b3e 100644
--- a/docs/manualpages/EPS/EPSAllocateSolution.html
+++ b/docs/manualpages/EPS/EPSAllocateSolution.html
@@ -6,23 +6,23 @@
 <TITLE>EPSAllocateSolution</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSAllocateSolution</H1>
 Allocate memory storage for common variables such as eigenvalues and eigenvectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt extra)
+PetscErrorCode EPSAllocateSolution(EPS eps,PetscInt extra)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
 working basis slightly larger than ncv
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/EPS/EPSAppendOptionsPrefix.html b/docs/manualpages/EPS/EPSAppendOptionsPrefix.html
index 3822792..4f765e7 100644
--- a/docs/manualpages/EPS/EPSAppendOptionsPrefix.html
+++ b/docs/manualpages/EPS/EPSAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>EPSAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../EPS/EPS.html#EPS">EPS</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,const char *prefix)
+PetscErrorCode EPSAppendOptionsPrefix(EPS eps,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../EPS/EPS.html#EPS">EPS</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../EPS/EPS.html#EPS">EPS</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSArnoldiGetDelayed.html b/docs/manualpages/EPS/EPSArnoldiGetDelayed.html
index ee11cd8..baf26af 100644
--- a/docs/manualpages/EPS/EPSArnoldiGetDelayed.html
+++ b/docs/manualpages/EPS/EPSArnoldiGetDelayed.html
@@ -6,25 +6,25 @@
 <TITLE>EPSArnoldiGetDelayed</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSArnoldiGetDelayed.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSArnoldiGetDelayed.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSArnoldiGetDelayed</H1>
 Gets the type of reorthogonalization used during the Arnoldi iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *delayed)
+PetscErrorCode EPSArnoldiGetDelayed(EPS eps,PetscBool *delayed)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>delayed </B> - boolean flag indicating if delayed reorthogonalization has been enabled
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delayed </B></TD><TD> - boolean flag indicating if delayed reorthogonalization has been enabled
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSArnoldiSetDelayed.html b/docs/manualpages/EPS/EPSArnoldiSetDelayed.html
index b4d74b8..cb404c9 100644
--- a/docs/manualpages/EPS/EPSArnoldiSetDelayed.html
+++ b/docs/manualpages/EPS/EPSArnoldiSetDelayed.html
@@ -6,28 +6,28 @@
 <TITLE>EPSArnoldiSetDelayed</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSArnoldiSetDelayed.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSArnoldiSetDelayed.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSArnoldiSetDelayed</H1>
 Activates or deactivates delayed reorthogonalization in the Arnoldi iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool delayed)
+PetscErrorCode EPSArnoldiSetDelayed(EPS eps,PetscBool delayed)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delayed </B></TD><TD> - boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delayed </B></TD><TD> - boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_arnoldi_delayed </B> - Activates delayed reorthogonalization in Arnoldi
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_arnoldi_delayed </B></TD><TD> - Activates delayed reorthogonalization in Arnoldi
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Delayed reorthogonalization is an aggressive optimization for the Arnoldi
diff --git a/docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html b/docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html
index 7efd7d1..6163c95 100644
--- a/docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html
+++ b/docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html
@@ -6,25 +6,25 @@
 <TITLE>EPSBLOPEXGetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSBLOPEXGetBlockSize</H1>
 Gets the block size used in the BLOPEX solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *bs)
+PetscErrorCode EPSBLOPEXGetBlockSize(EPS eps,PetscInt *bs)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bs </B> - the block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - the block size
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html b/docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html
index aba55ba..5b96cc9 100644
--- a/docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html
+++ b/docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html
@@ -6,28 +6,28 @@
 <TITLE>EPSBLOPEXSetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSBLOPEXSetBlockSize</H1>
 Sets the block size of the BLOPEX solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt bs)
+PetscErrorCode EPSBLOPEXSetBlockSize(EPS eps,PetscInt bs)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs  </B></TD><TD> - the block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs  </B></TD><TD> - the block size
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_blopex_blocksize </B> - Sets the block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_blopex_blocksize </B></TD><TD> - Sets the block size
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSBalance.html b/docs/manualpages/EPS/EPSBalance.html
index cd7df07..982b537 100644
--- a/docs/manualpages/EPS/EPSBalance.html
+++ b/docs/manualpages/EPS/EPSBalance.html
@@ -6,8 +6,8 @@
 <TITLE>EPSBalance</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSBalance.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSBalance.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSBalance</H1>
 The type of balancing used for non-Hermitian problems 
diff --git a/docs/manualpages/EPS/EPSBlzpackSetBlockSize.html b/docs/manualpages/EPS/EPSBlzpackSetBlockSize.html
index 24478b7..3263c96 100644
--- a/docs/manualpages/EPS/EPSBlzpackSetBlockSize.html
+++ b/docs/manualpages/EPS/EPSBlzpackSetBlockSize.html
@@ -6,28 +6,28 @@
 <TITLE>EPSBlzpackSetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSBlzpackSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSBlzpackSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSBlzpackSetBlockSize</H1>
 Sets the block size for the BLZPACK package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt bs)
+PetscErrorCode EPSBlzpackSetBlockSize(EPS eps,PetscInt bs)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - block size
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_blzpack_block_size </B> - Sets the value of the block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_blzpack_block_size </B></TD><TD> - Sets the value of the block size
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/external/blzpack/blzpack.c.html#EPSBlzpackSetBlockSize">src/eps/impls/external/blzpack/blzpack.c</A>
diff --git a/docs/manualpages/EPS/EPSBlzpackSetNSteps.html b/docs/manualpages/EPS/EPSBlzpackSetNSteps.html
index 929287a..e1c828e 100644
--- a/docs/manualpages/EPS/EPSBlzpackSetNSteps.html
+++ b/docs/manualpages/EPS/EPSBlzpackSetNSteps.html
@@ -6,28 +6,28 @@
 <TITLE>EPSBlzpackSetNSteps</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSBlzpackSetNSteps.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSBlzpackSetNSteps.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSBlzpackSetNSteps</H1>
 Sets the maximum number of steps per run for the BLZPACK package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt nsteps)
+PetscErrorCode EPSBlzpackSetNSteps(EPS eps,PetscInt nsteps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsteps  </B></TD><TD> - maximum number of steps
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsteps  </B></TD><TD> - maximum number of steps
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_blzpack_nsteps </B> - Sets the maximum number of steps per run
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_blzpack_nsteps </B></TD><TD> - Sets the maximum number of steps per run
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSCISSExtraction.html b/docs/manualpages/EPS/EPSCISSExtraction.html
new file mode 100644
index 0000000..880b6e5
--- /dev/null
+++ b/docs/manualpages/EPS/EPSCISSExtraction.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSCISSExtraction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSCISSExtraction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSExtraction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSCISSExtraction</H1>
+determines the extraction technique in the CISS solver 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { EPS_CISS_EXTRACTION_RITZ,
+               EPS_CISS_EXTRACTION_HANKEL } <A HREF="../EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</A>(), <A HREF="../EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/../../include/slepceps.h.html#EPSCISSExtraction">src/eps/../../include/slepceps.h</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCISSGetExtraction.html b/docs/manualpages/EPS/EPSCISSGetExtraction.html
new file mode 100644
index 0000000..298c89d
--- /dev/null
+++ b/docs/manualpages/EPS/EPSCISSGetExtraction.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSCISSGetExtraction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSCISSGetExtraction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSGetExtraction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSCISSGetExtraction</H1>
+Gets the extraction technique used in the CISS solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSCISSGetExtraction(EPS eps,EPSCISSExtraction *extraction)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extraction </B></TD><TD> - extraction technique
+</TD></TR>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</A>() <A HREF="../EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/ciss/ciss.c.html#EPSCISSGetExtraction">src/eps/impls/ciss/ciss.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCISSGetQuadRule.html b/docs/manualpages/EPS/EPSCISSGetQuadRule.html
new file mode 100644
index 0000000..e4da7a0
--- /dev/null
+++ b/docs/manualpages/EPS/EPSCISSGetQuadRule.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSCISSGetQuadRule.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSCISSGetQuadRule</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSGetQuadRule.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSCISSGetQuadRule</H1>
+Gets the quadrature rule used in the CISS solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSCISSGetQuadRule(EPS eps, EPSCISSQuadRule *quad)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>quad </B></TD><TD> - quadrature rule
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</A>() <A HREF="../EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/ciss/ciss.c.html#EPSCISSGetQuadRule">src/eps/impls/ciss/ciss.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCISSGetRefinement.html b/docs/manualpages/EPS/EPSCISSGetRefinement.html
index f5a7d74..35cb996 100644
--- a/docs/manualpages/EPS/EPSCISSGetRefinement.html
+++ b/docs/manualpages/EPS/EPSCISSGetRefinement.html
@@ -6,29 +6,27 @@
 <TITLE>EPSCISSGetRefinement</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSGetRefinement.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSGetRefinement.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSGetRefinement</H1>
 Gets the values of various refinement parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps, PetscInt *inner, PetscInt *outer,PetscInt *blsize)
+PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *blsize)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>outer  </B></TD><TD> - number of iterative refinement iterations (outer loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSCISSGetSizes.html b/docs/manualpages/EPS/EPSCISSGetSizes.html
index 44cdc14..808a057 100644
--- a/docs/manualpages/EPS/EPSCISSGetSizes.html
+++ b/docs/manualpages/EPS/EPSCISSGetSizes.html
@@ -6,35 +6,35 @@
 <TITLE>EPSCISSGetSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSGetSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSGetSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSGetSizes</H1>
 Gets the values of various size parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)
+PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>isreal </B></TD><TD> - A and B are real
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>realmats </B></TD><TD> - A and B are real
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSCISSGetThreshold.html b/docs/manualpages/EPS/EPSCISSGetThreshold.html
index 9f8b221..50e3bd1 100644
--- a/docs/manualpages/EPS/EPSCISSGetThreshold.html
+++ b/docs/manualpages/EPS/EPSCISSGetThreshold.html
@@ -6,27 +6,27 @@
 <TITLE>EPSCISSGetThreshold</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSGetThreshold.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSGetThreshold.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSGetThreshold</H1>
 Gets the values of various threshold parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal *delta,PetscReal *spur)
+PetscErrorCode EPSCISSGetThreshold(EPS eps,PetscReal *delta,PetscReal *spur)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSCISSGetUseST.html b/docs/manualpages/EPS/EPSCISSGetUseST.html
index d43c72d..89d138f 100644
--- a/docs/manualpages/EPS/EPSCISSGetUseST.html
+++ b/docs/manualpages/EPS/EPSCISSGetUseST.html
@@ -6,26 +6,25 @@
 <TITLE>EPSCISSGetUseST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSGetUseST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSGetUseST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSGetUseST</H1>
 Gets the flag for using the <A HREF="../ST/ST.html#ST">ST</A> object in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps, PetscBool *usest)
+PetscErrorCode EPSCISSGetUseST(EPS eps,PetscBool *usest)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>usest </B></TD><TD> - boolean flag indicating if the <A HREF="../ST/ST.html#ST">ST</A> object is being used
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>usest </B></TD><TD> - boolean flag indicating if the <A HREF="../ST/ST.html#ST">ST</A> object is being used
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSCISSQuadRule.html b/docs/manualpages/EPS/EPSCISSQuadRule.html
new file mode 100644
index 0000000..9370a15
--- /dev/null
+++ b/docs/manualpages/EPS/EPSCISSQuadRule.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSCISSQuadRule.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSCISSQuadRule</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSQuadRule.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSCISSQuadRule</H1>
+determines the quadrature rule in the CISS solver 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { EPS_CISS_QUADRULE_TRAPEZOIDAL=1,
+               EPS_CISS_QUADRULE_CHEBYSHEV } <A HREF="../EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</A>(), <A HREF="../EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/../../include/slepceps.h.html#EPSCISSQuadRule">src/eps/../../include/slepceps.h</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCISSSetExtraction.html b/docs/manualpages/EPS/EPSCISSSetExtraction.html
new file mode 100644
index 0000000..f480137
--- /dev/null
+++ b/docs/manualpages/EPS/EPSCISSSetExtraction.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSCISSSetExtraction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSCISSSetExtraction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSSetExtraction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSCISSSetExtraction</H1>
+Sets the extraction technique used in the CISS solver.  
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSCISSSetExtraction(EPS eps,EPSCISSExtraction extraction)
+</PRE>
+Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps        </B></TD><TD> - the eigenproblem solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extraction </B></TD><TD> - the extraction technique
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_extraction </B></TD><TD> - Sets the extraction technique (either 'ritz' or
+'hankel')
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+By default, the Rayleigh-Ritz extraction is used (EPS_CISS_EXTRACTION_RITZ).
+<P>
+If the 'hankel' option is specified (EPS_CISS_EXTRACTION_HANKEL), then
+the Block Hankel method is used for extracting eigenpairs.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</A>(), <A HREF="../EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/ciss/ciss.c.html#EPSCISSSetExtraction">src/eps/impls/ciss/ciss.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCISSSetQuadRule.html b/docs/manualpages/EPS/EPSCISSSetQuadRule.html
new file mode 100644
index 0000000..ed64781
--- /dev/null
+++ b/docs/manualpages/EPS/EPSCISSSetQuadRule.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSCISSSetQuadRule.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSCISSSetQuadRule</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSSetQuadRule.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSCISSSetQuadRule</H1>
+Sets the quadrature rule used in the CISS solver.  
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSCISSSetQuadRule(EPS eps,EPSCISSQuadRule quad)
+</PRE>
+Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigenproblem solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>quad </B></TD><TD> - the quadrature rule
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_quadrule </B></TD><TD> - Sets the quadrature rule (either 'trapezoidal' or
+'chebyshev')
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+By default, the trapezoidal rule is used (EPS_CISS_QUADRULE_TRAPEZOIDAL).
+<P>
+If the 'chebyshev' option is specified (EPS_CISS_QUADRULE_CHEBYSHEV), then
+Chebyshev points are used as quadrature points.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</A>(), <A HREF="../EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/ciss/ciss.c.html#EPSCISSSetQuadRule">src/eps/impls/ciss/ciss.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCISSSetRefinement.html b/docs/manualpages/EPS/EPSCISSSetRefinement.html
index 7d0484d..5d88b73 100644
--- a/docs/manualpages/EPS/EPSCISSSetRefinement.html
+++ b/docs/manualpages/EPS/EPSCISSSetRefinement.html
@@ -6,36 +6,32 @@
 <TITLE>EPSCISSSetRefinement</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSSetRefinement.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSSetRefinement.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSSetRefinement</H1>
 Sets the values of various refinement parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt inner,PetscInt outer,PetscInt blsize)
+PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt blsize)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>outer  </B></TD><TD> - number of iterative refinement iterations (outer loop)
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_refine_inner </B></TD><TD> - Sets number of inner iterations
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_refine_outer </B></TD><TD> - Sets number of outer iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_refine_inner </B></TD><TD> - Sets number of inner iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_refine_blocksize </B></TD><TD> - Sets number of blocksize iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_refine_blocksize </B></TD><TD> - Sets number of blocksize iterations
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSCISSSetSizes.html b/docs/manualpages/EPS/EPSCISSSetSizes.html
index 09c8995..f64dd1c 100644
--- a/docs/manualpages/EPS/EPSCISSSetSizes.html
+++ b/docs/manualpages/EPS/EPSCISSSetSizes.html
@@ -6,48 +6,48 @@
 <TITLE>EPSCISSSetSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSSetSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSSetSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSSetSizes</H1>
 Sets the values of various size parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)
+PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>isreal </B></TD><TD> - A and B are real
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>realmats </B></TD><TD> - A and B are real
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_integration_points </B></TD><TD> - Sets the number of integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_integration_points </B></TD><TD> - Sets the number of integration points
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_blocksize </B></TD><TD> - Sets the block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_blocksize </B></TD><TD> - Sets the block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_moments </B></TD><TD> - Sets the moment size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_moments </B></TD><TD> - Sets the moment size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_partitions </B></TD><TD> - Sets the number of partitions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_partitions </B></TD><TD> - Sets the number of partitions
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_maxblocksize </B></TD><TD> - Sets the maximum block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_maxblocksize </B></TD><TD> - Sets the maximum block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_realmats </B></TD><TD> - A and B are real
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_realmats </B></TD><TD> - A and B are real
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSCISSSetThreshold.html b/docs/manualpages/EPS/EPSCISSSetThreshold.html
index 91fd233..0c1f883 100644
--- a/docs/manualpages/EPS/EPSCISSSetThreshold.html
+++ b/docs/manualpages/EPS/EPSCISSSetThreshold.html
@@ -6,32 +6,32 @@
 <TITLE>EPSCISSSetThreshold</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSSetThreshold.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSSetThreshold.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSSetThreshold</H1>
 Sets the values of various threshold parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal delta,PetscReal spur)
+PetscErrorCode EPSCISSSetThreshold(EPS eps,PetscReal delta,PetscReal spur)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_delta </B></TD><TD> - Sets the delta
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_delta </B></TD><TD> - Sets the delta
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_spurious_threshold </B></TD><TD> - Sets the spurious threshold
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_spurious_threshold </B></TD><TD> - Sets the spurious threshold
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSCISSSetUseST.html b/docs/manualpages/EPS/EPSCISSSetUseST.html
index 38c0f1a..b9f8577 100644
--- a/docs/manualpages/EPS/EPSCISSSetUseST.html
+++ b/docs/manualpages/EPS/EPSCISSSetUseST.html
@@ -6,29 +6,28 @@
 <TITLE>EPSCISSSetUseST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCISSSetUseST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCISSSetUseST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCISSSetUseST</H1>
 Sets a flag indicating that the CISS solver will use the <A HREF="../ST/ST.html#ST">ST</A> object for the linear solves. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool usest)
+PetscErrorCode EPSCISSSetUseST(EPS eps,PetscBool usest)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>usest  </B></TD><TD> - boolean flag to use the <A HREF="../ST/ST.html#ST">ST</A> object or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>usest  </B></TD><TD> - boolean flag to use the <A HREF="../ST/ST.html#ST">ST</A> object or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_usest <bool> </B></TD><TD> - whether the <A HREF="../ST/ST.html#ST">ST</A> object will be used or not
-</TD></TR>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ciss_usest <bool> </B></TD><TD> - whether the <A HREF="../ST/ST.html#ST">ST</A> object will be used or not
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSComputeError.html b/docs/manualpages/EPS/EPSComputeError.html
index dd9178b..995ca5b 100644
--- a/docs/manualpages/EPS/EPSComputeError.html
+++ b/docs/manualpages/EPS/EPSComputeError.html
@@ -6,30 +6,30 @@
 <TITLE>EPSComputeError</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSComputeError.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSComputeError.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSComputeError</H1>
 Computes the error (based on the residual norm) associated with the i-th computed eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt i,<A HREF="../EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</A> type,PetscReal *error)
+PetscErrorCode EPSComputeError(EPS eps,PetscInt i,EPSErrorType type,PetscReal *error)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>error </B> - the error
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>error </B></TD><TD> - the error
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The error can be computed in various ways, all of them based on the residual
@@ -46,5 +46,6 @@ norm ||Ax-kBx||_2 where k is the eigenvalue and x is the eigenvector.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/eps/examples/tutorials/ex1.c.html">src/eps/examples/tutorials/ex1.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex31.c.html">src/eps/examples/tutorials/ex31.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex1f.F.html">src/eps/examples/tutorials/ex1f.F.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSConv.html b/docs/manualpages/EPS/EPSConv.html
index 1f9ef44..8c2acdf 100644
--- a/docs/manualpages/EPS/EPSConv.html
+++ b/docs/manualpages/EPS/EPSConv.html
@@ -6,15 +6,15 @@
 <TITLE>EPSConv</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSConv.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSConv.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSConv</H1>
 Determines the convergence test 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum { EPS_CONV_ABS,
-               EPS_CONV_EIG,
+               EPS_CONV_REL,
                EPS_CONV_NORM,
                EPS_CONV_USER } <A HREF="../EPS/EPSConv.html#EPSConv">EPSConv</A>;
 </PRE>
diff --git a/docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html b/docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html
new file mode 100644
index 0000000..e5e4f63
--- /dev/null
+++ b/docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSConvMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSConvMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user (for monitors that only show iteration numbers of convergence). 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSConvMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))
+</PRE>
+Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps      </B></TD><TD> - the eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a SlepcConvMonitor
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>(), <A HREF="../EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSConvMonitorSetFromOptions">src/eps/interface/epsopts.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSConvergedReason.html b/docs/manualpages/EPS/EPSConvergedReason.html
index 9698e51..f7576d8 100644
--- a/docs/manualpages/EPS/EPSConvergedReason.html
+++ b/docs/manualpages/EPS/EPSConvergedReason.html
@@ -6,19 +6,20 @@
 <TITLE>EPSConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSConvergedReason</H1>
 Reason an eigensolver was said to have converged or diverged 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum {/* converged */
-              EPS_CONVERGED_TOL                =  2,
+              EPS_CONVERGED_TOL                =  1,
+              EPS_CONVERGED_USER               =  2,
               /* diverged */
-              EPS_DIVERGED_ITS                 = -3,
-              EPS_DIVERGED_BREAKDOWN           = -4,
-              EPS_DIVERGED_SYMMETRY_LOST       = -5,
+              EPS_DIVERGED_ITS                 = -1,
+              EPS_DIVERGED_BREAKDOWN           = -2,
+              EPS_DIVERGED_SYMMETRY_LOST       = -3,
               EPS_CONVERGED_ITERATING          =  0} <A HREF="../EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</A>;
 </PRE>
 
@@ -29,4 +30,7 @@ typedef enum {/* converged */
 <BR><A HREF="./index.html">Index of all EPS routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex29.c.html">src/eps/examples/tutorials/ex29.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSCreate.html b/docs/manualpages/EPS/EPSCreate.html
index d37dba4..a6f8784 100644
--- a/docs/manualpages/EPS/EPSCreate.html
+++ b/docs/manualpages/EPS/EPSCreate.html
@@ -6,25 +6,25 @@
 <TITLE>EPSCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSCreate</H1>
 Creates the default <A HREF="../EPS/EPS.html#EPS">EPS</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>(MPI_Comm comm,<A HREF="../EPS/EPS.html#EPS">EPS</A> *outeps)
+PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>eps </B> - location to put the <A HREF="../EPS/EPS.html#EPS">EPS</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - location to put the <A HREF="../EPS/EPS.html#EPS">EPS</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The default <A HREF="../EPS/EPS.html#EPS">EPS</A> type is EPSKRYLOVSCHUR
diff --git a/docs/manualpages/EPS/EPSDestroy.html b/docs/manualpages/EPS/EPSDestroy.html
index 6b41357..584c8d1 100644
--- a/docs/manualpages/EPS/EPSDestroy.html
+++ b/docs/manualpages/EPS/EPSDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>EPSDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSDestroy</H1>
 Destroys the <A HREF="../EPS/EPS.html#EPS">EPS</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> *eps)
+PetscErrorCode EPSDestroy(EPS *eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSErrorType.html b/docs/manualpages/EPS/EPSErrorType.html
index bc99c05..2997ab5 100644
--- a/docs/manualpages/EPS/EPSErrorType.html
+++ b/docs/manualpages/EPS/EPSErrorType.html
@@ -6,8 +6,8 @@
 <TITLE>EPSErrorType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSErrorType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSErrorType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSErrorType</H1>
 The error type used to assess accuracy of computed solutions 
diff --git a/docs/manualpages/EPS/EPSErrorView.html b/docs/manualpages/EPS/EPSErrorView.html
index cbdfb9e..8e04ebd 100644
--- a/docs/manualpages/EPS/EPSErrorView.html
+++ b/docs/manualpages/EPS/EPSErrorView.html
@@ -6,34 +6,34 @@
 <TITLE>EPSErrorView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSErrorView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSErrorView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSErrorView</H1>
 Displays the errors associated with the computed solution (as well as the eigenvalues). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</A> etype,PetscViewer viewer)
+PetscErrorCode EPSErrorView(EPS eps,EPSErrorType etype,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_relative </B></TD><TD> - print relative errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_relative </B></TD><TD> - print relative errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_backward </B></TD><TD> - print backward errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_backward </B></TD><TD> - print backward errors of each eigenpair
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSErrorViewFromOptions.html b/docs/manualpages/EPS/EPSErrorViewFromOptions.html
index f8b6ac8..28a4be4 100644
--- a/docs/manualpages/EPS/EPSErrorViewFromOptions.html
+++ b/docs/manualpages/EPS/EPSErrorViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>EPSErrorViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSErrorViewFromOptions</H1>
 Processes command line options to determine if/how the errors of the computed solution are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSErrorViewFromOptions(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsview.c.html#EPSErrorViewFromOptions">src/eps/interface/epsview.c</A>
diff --git a/docs/manualpages/EPS/EPSExtraction.html b/docs/manualpages/EPS/EPSExtraction.html
index 66aaef3..5e60939 100644
--- a/docs/manualpages/EPS/EPSExtraction.html
+++ b/docs/manualpages/EPS/EPSExtraction.html
@@ -6,8 +6,8 @@
 <TITLE>EPSExtraction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSExtraction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSExtraction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSExtraction</H1>
 Determines the type of extraction technique employed by the eigensolver 
diff --git a/docs/manualpages/EPS/EPSFEASTGetNumPoints.html b/docs/manualpages/EPS/EPSFEASTGetNumPoints.html
index dd18b86..81be4c3 100644
--- a/docs/manualpages/EPS/EPSFEASTGetNumPoints.html
+++ b/docs/manualpages/EPS/EPSFEASTGetNumPoints.html
@@ -6,25 +6,25 @@
 <TITLE>EPSFEASTGetNumPoints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSFEASTGetNumPoints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSFEASTGetNumPoints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSFEASTGetNumPoints</H1>
 Gets the number of contour integration points for the FEAST package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *npoints)
+PetscErrorCode EPSFEASTGetNumPoints(EPS eps,PetscInt *npoints)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps     </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>npoints </B> - number of contour integration points
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npoints </B></TD><TD> - number of contour integration points
+</TD></TR></TABLE>
 </TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSFEASTSetNumPoints.html b/docs/manualpages/EPS/EPSFEASTSetNumPoints.html
index 9aa80d2..093cd73 100644
--- a/docs/manualpages/EPS/EPSFEASTSetNumPoints.html
+++ b/docs/manualpages/EPS/EPSFEASTSetNumPoints.html
@@ -6,28 +6,28 @@
 <TITLE>EPSFEASTSetNumPoints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSFEASTSetNumPoints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSFEASTSetNumPoints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSFEASTSetNumPoints</H1>
 Sets the number of contour integration points for the FEAST package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt npoints)
+PetscErrorCode EPSFEASTSetNumPoints(EPS eps,PetscInt npoints)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npoints </B></TD><TD> - number of contour integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npoints </B></TD><TD> - number of contour integration points
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_feast_num_points </B> - Sets the number of points
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_feast_num_points </B></TD><TD> - Sets the number of points
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSFinalizePackage.html b/docs/manualpages/EPS/EPSFinalizePackage.html
index 4dfd437..d1982a6 100644
--- a/docs/manualpages/EPS/EPSFinalizePackage.html
+++ b/docs/manualpages/EPS/EPSFinalizePackage.html
@@ -6,14 +6,14 @@
 <TITLE>EPSFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSFinalizePackage</H1>
 This function destroys everything in the SLEPc interface to the <A HREF="../EPS/EPS.html#EPS">EPS</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</A>(void)
+PetscErrorCode EPSFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDGetBOrth.html b/docs/manualpages/EPS/EPSGDGetBOrth.html
index a81a3f7..85e9286 100644
--- a/docs/manualpages/EPS/EPSGDGetBOrth.html
+++ b/docs/manualpages/EPS/EPSGDGetBOrth.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGDGetBOrth</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetBOrth.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetBOrth.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetBOrth</H1>
 Returns the orthogonalization used in the search subspace in case of generalized Hermitian problems. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *borth)
+PetscErrorCode EPSGDGetBOrth(EPS eps,PetscBool *borth)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>borth </B> - whether to B-orthogonalize the search subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>borth </B></TD><TD> - whether to B-orthogonalize the search subspace
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDGetBlockSize.html b/docs/manualpages/EPS/EPSGDGetBlockSize.html
index c81b9fb..deff001 100644
--- a/docs/manualpages/EPS/EPSGDGetBlockSize.html
+++ b/docs/manualpages/EPS/EPSGDGetBlockSize.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGDGetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetBlockSize</H1>
 Returns the number of vectors to be added to the searching space in every iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *blocksize)
+PetscErrorCode EPSGDGetBlockSize(EPS eps,PetscInt *blocksize)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>blocksize </B> - number of vectors added to the search space in every iteration
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDGetDoubleExpansion.html b/docs/manualpages/EPS/EPSGDGetDoubleExpansion.html
index 7167a3f..09bd3a0 100644
--- a/docs/manualpages/EPS/EPSGDGetDoubleExpansion.html
+++ b/docs/manualpages/EPS/EPSGDGetDoubleExpansion.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGDGetDoubleExpansion</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetDoubleExpansion.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetDoubleExpansion.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetDoubleExpansion</H1>
 Gets a flag indicating whether the double expansion variant has been activated or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *flg)
+PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *doubleexp)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>flg </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>doubleexp </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDGetInitialSize.html b/docs/manualpages/EPS/EPSGDGetInitialSize.html
index 387d630..ea20983 100644
--- a/docs/manualpages/EPS/EPSGDGetInitialSize.html
+++ b/docs/manualpages/EPS/EPSGDGetInitialSize.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGDGetInitialSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetInitialSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetInitialSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetInitialSize</H1>
 Returns the initial size of the searching space. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *initialsize)
+PetscErrorCode EPSGDGetInitialSize(EPS eps,PetscInt *initialsize)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>initialsize </B> - number of vectors of the initial searching subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>initialsize </B></TD><TD> - number of vectors of the initial searching subspace
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If <A HREF="../EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</A>() is PETSC_FALSE and the user provides vectors with
diff --git a/docs/manualpages/EPS/EPSGDGetKrylovStart.html b/docs/manualpages/EPS/EPSGDGetKrylovStart.html
index 8eeedb5..44ba825 100644
--- a/docs/manualpages/EPS/EPSGDGetKrylovStart.html
+++ b/docs/manualpages/EPS/EPSGDGetKrylovStart.html
@@ -6,26 +6,26 @@
 <TITLE>EPSGDGetKrylovStart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetKrylovStart</H1>
 Returns a flag indicating if the search subspace is started with a Krylov basis. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *krylovstart)
+PetscErrorCode EPSGDGetKrylovStart(EPS eps,PetscBool *krylovstart)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>krylovstart </B> - boolean flag indicating if the search subspace is started
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>krylovstart </B></TD><TD> - boolean flag indicating if the search subspace is started
 with a Krylov basis
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDGetRestart.html b/docs/manualpages/EPS/EPSGDGetRestart.html
index 7fa5473..8b9585a 100644
--- a/docs/manualpages/EPS/EPSGDGetRestart.html
+++ b/docs/manualpages/EPS/EPSGDGetRestart.html
@@ -6,27 +6,27 @@
 <TITLE>EPSGDGetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetRestart</H1>
 Gets the number of vectors of the searching space after restarting and the number of vectors saved from the previous iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *minv,PetscInt *plusk)
+PetscErrorCode EPSGDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGDGetWindowSizes.html b/docs/manualpages/EPS/EPSGDGetWindowSizes.html
index 285991e..d06a2d2 100644
--- a/docs/manualpages/EPS/EPSGDGetWindowSizes.html
+++ b/docs/manualpages/EPS/EPSGDGetWindowSizes.html
@@ -6,27 +6,27 @@
 <TITLE>EPSGDGetWindowSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDGetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDGetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDGetWindowSizes</H1>
 Gets the number of converged vectors in the projected problem (or Rayleigh quotient) and in the projector employed in the correction equation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *pwindow,PetscInt *qwindow)
+PetscErrorCode EPSGDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGDSetBOrth.html b/docs/manualpages/EPS/EPSGDSetBOrth.html
index a5ab894..4d1f6fd 100644
--- a/docs/manualpages/EPS/EPSGDSetBOrth.html
+++ b/docs/manualpages/EPS/EPSGDSetBOrth.html
@@ -6,28 +6,28 @@
 <TITLE>EPSGDSetBOrth</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetBOrth.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetBOrth.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetBOrth</H1>
 Selects the orthogonalization that will be used in the search subspace in case of generalized Hermitian problems. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool borth)
+PetscErrorCode EPSGDSetBOrth(EPS eps,PetscBool borth)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>borth </B></TD><TD> - whether to B-orthogonalize the search subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>borth </B></TD><TD> - whether to B-orthogonalize the search subspace
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_gd_borth </B> - Set the orthogonalization used in the search subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_borth </B></TD><TD> - Set the orthogonalization used in the search subspace
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDSetBlockSize.html b/docs/manualpages/EPS/EPSGDSetBlockSize.html
index 02c46e0..5b6bb42 100644
--- a/docs/manualpages/EPS/EPSGDSetBlockSize.html
+++ b/docs/manualpages/EPS/EPSGDSetBlockSize.html
@@ -6,28 +6,28 @@
 <TITLE>EPSGDSetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetBlockSize</H1>
 Sets the number of vectors to be added to the searching space in every iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt blocksize)
+PetscErrorCode EPSGDSetBlockSize(EPS eps,PetscInt blocksize)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_gd_blocksize </B> - number of vectors added to the search space in every iteration
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDSetDoubleExpansion.html b/docs/manualpages/EPS/EPSGDSetDoubleExpansion.html
index 11040a2..ad07e20 100644
--- a/docs/manualpages/EPS/EPSGDSetDoubleExpansion.html
+++ b/docs/manualpages/EPS/EPSGDSetDoubleExpansion.html
@@ -6,28 +6,28 @@
 <TITLE>EPSGDSetDoubleExpansion</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetDoubleExpansion.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetDoubleExpansion.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetDoubleExpansion</H1>
 Activate a variant where the search subspace is expanded with K*[A*x B*x] (double expansion) instead of the classic K*r, where K is the preconditioner, x the selected approximate eigenvector and r its associated residual vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool use_gd2)
+PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool doubleexp)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>use_gd2 </B></TD><TD> - the boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>doubleexp </B></TD><TD> - the boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-eps_gd_double_expansion </B> - activate the double-expansion variant of GD
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_double_expansion </B></TD><TD> - activate the double-expansion variant of GD
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/davidson/gd/gd.c.html#EPSGDSetDoubleExpansion">src/eps/impls/davidson/gd/gd.c</A>
diff --git a/docs/manualpages/EPS/EPSGDSetInitialSize.html b/docs/manualpages/EPS/EPSGDSetInitialSize.html
index 4095723..032c515 100644
--- a/docs/manualpages/EPS/EPSGDSetInitialSize.html
+++ b/docs/manualpages/EPS/EPSGDSetInitialSize.html
@@ -6,28 +6,28 @@
 <TITLE>EPSGDSetInitialSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetInitialSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetInitialSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetInitialSize</H1>
 Sets the initial size of the searching space. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt initialsize)
+PetscErrorCode EPSGDSetInitialSize(EPS eps,PetscInt initialsize)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>initialsize </B></TD><TD> - number of vectors of the initial searching subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>initialsize </B></TD><TD> - number of vectors of the initial searching subspace
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_gd_initial_size </B> - number of vectors of the initial searching subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_initial_size </B></TD><TD> - number of vectors of the initial searching subspace
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If <A HREF="../EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</A>() is PETSC_FALSE and the user provides vectors with
diff --git a/docs/manualpages/EPS/EPSGDSetKrylovStart.html b/docs/manualpages/EPS/EPSGDSetKrylovStart.html
index 7ef764c..bd42107 100644
--- a/docs/manualpages/EPS/EPSGDSetKrylovStart.html
+++ b/docs/manualpages/EPS/EPSGDSetKrylovStart.html
@@ -6,29 +6,29 @@
 <TITLE>EPSGDSetKrylovStart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetKrylovStart</H1>
 Activates or deactivates starting the searching subspace with a Krylov basis. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool krylovstart)
+PetscErrorCode EPSGDSetKrylovStart(EPS eps,PetscBool krylovstart)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>krylovstart </B></TD><TD> - boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>krylovstart </B></TD><TD> - boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_gd_krylov_start </B> - Activates starting the searching subspace with a
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_krylov_start </B></TD><TD> - Activates starting the searching subspace with a
 Krylov basis
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGDSetRestart.html b/docs/manualpages/EPS/EPSGDSetRestart.html
index 1b9acfa..4c4a34b 100644
--- a/docs/manualpages/EPS/EPSGDSetRestart.html
+++ b/docs/manualpages/EPS/EPSGDSetRestart.html
@@ -6,32 +6,32 @@
 <TITLE>EPSGDSetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetRestart</H1>
 Sets the number of vectors of the searching space after restarting and the number of vectors saved from the previous iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt minv,PetscInt plusk)
+PetscErrorCode EPSGDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_minv </B></TD><TD> - number of vectors of the searching subspace after restarting
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_minv </B></TD><TD> - number of vectors of the searching subspace after restarting
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_plusk </B></TD><TD> - number of vectors saved from the previous iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_plusk </B></TD><TD> - number of vectors saved from the previous iteration
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGDSetWindowSizes.html b/docs/manualpages/EPS/EPSGDSetWindowSizes.html
index 07ca8e9..ac5e991 100644
--- a/docs/manualpages/EPS/EPSGDSetWindowSizes.html
+++ b/docs/manualpages/EPS/EPSGDSetWindowSizes.html
@@ -6,32 +6,32 @@
 <TITLE>EPSGDSetWindowSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGDSetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGDSetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGDSetWindowSizes</H1>
 Sets the number of converged vectors in the projected problem (or Rayleigh quotient) and in the projector employed in the correction equation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt pwindow,PetscInt qwindow)
+PetscErrorCode EPSGDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_pwindow </B></TD><TD> - set the number of converged vectors in the projector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_pwindow </B></TD><TD> - set the number of converged vectors in the projector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_qwindow </B></TD><TD> - set the number of converged vectors in the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gd_qwindow </B></TD><TD> - set the number of converged vectors in the projected problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGetBV.html b/docs/manualpages/EPS/EPSGetBV.html
index 5880ede..13f742f 100644
--- a/docs/manualpages/EPS/EPSGetBV.html
+++ b/docs/manualpages/EPS/EPSGetBV.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetBV</H1>
 Obtain the basis vectors object associated to the eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../BV/BV.html#BV">BV</A> *V)
+PetscErrorCode EPSGetBV(EPS eps,BV *V)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>V </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetBalance.html b/docs/manualpages/EPS/EPSGetBalance.html
index 059ad13..f966348 100644
--- a/docs/manualpages/EPS/EPSGetBalance.html
+++ b/docs/manualpages/EPS/EPSGetBalance.html
@@ -6,29 +6,29 @@
 <TITLE>EPSGetBalance</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetBalance.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetBalance.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetBalance</H1>
 Gets the balancing type used by the <A HREF="../EPS/EPS.html#EPS">EPS</A> object, and the associated parameters. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSBalance.html#EPSBalance">EPSBalance</A> *bal,PetscInt *its,PetscReal *cutoff)
+PetscErrorCode EPSGetBalance(EPS eps,EPSBalance *bal,PetscInt *its,PetscReal *cutoff)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bal    </B></TD><TD> - the balancing method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bal    </B></TD><TD> - the balancing method
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the balancing algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the balancing algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cutoff </B></TD><TD> - cutoff value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cutoff </B></TD><TD> - cutoff value
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGetConverged.html b/docs/manualpages/EPS/EPSGetConverged.html
index 0ded970..498455c 100644
--- a/docs/manualpages/EPS/EPSGetConverged.html
+++ b/docs/manualpages/EPS/EPSGetConverged.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetConverged</H1>
 Gets the number of converged eigenpairs. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *nconv)
+PetscErrorCode EPSGetConverged(EPS eps,PetscInt *nconv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nconv </B> - number of converged eigenpairs
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv </B></TD><TD> - number of converged eigenpairs
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 This function should be called after <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>() has finished.
@@ -42,5 +42,7 @@ This function should be called after <A HREF="../EPS/EPSSolve.html#EPSSolve">EPS
 <A HREF="../../../src/eps/examples/tutorials/ex7.c.html">src/eps/examples/tutorials/ex7.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex24.c.html">src/eps/examples/tutorials/ex24.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex29.c.html">src/eps/examples/tutorials/ex29.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex31.c.html">src/eps/examples/tutorials/ex31.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex1f.F.html">src/eps/examples/tutorials/ex1f.F.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetConvergedReason.html b/docs/manualpages/EPS/EPSGetConvergedReason.html
index a57904a..96d84ba 100644
--- a/docs/manualpages/EPS/EPSGetConvergedReason.html
+++ b/docs/manualpages/EPS/EPSGetConvergedReason.html
@@ -6,35 +6,37 @@
 <TITLE>EPSGetConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetConvergedReason</H1>
 Gets the reason why the <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>() iteration was stopped. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</A> *reason)
+PetscErrorCode EPSGetConvergedReason(EPS eps,EPSConvergedReason *reason)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>reason </B> - negative value indicates diverged, positive value converged
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - negative value indicates diverged, positive value converged
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values for reason</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONVERGED_USER </B></TD><TD> - converged due to a user-defined condition
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_DIVERGED_ITS </B></TD><TD> - required more than its to reach convergence
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_DIVERGED_ITS </B></TD><TD> - required more than max_it iterations to reach convergence
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_DIVERGED_SYMMETRY_LOST </B></TD><TD> - pseudo-Lanczos was not able to keep symmetry
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_DIVERGED_SYMMETRY_LOST </B></TD><TD> - pseudo-Lanczos was not able to keep symmetry
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
@@ -48,4 +50,6 @@ Can only be called after the call to <A HREF="../EPS/EPSSolve.html#EPSSolve">EPS
 <BR><A HREF="./index.html">Index of all EPS routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex29.c.html">src/eps/examples/tutorials/ex29.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetConvergenceTest.html b/docs/manualpages/EPS/EPSGetConvergenceTest.html
index c26f541..9e448aa 100644
--- a/docs/manualpages/EPS/EPSGetConvergenceTest.html
+++ b/docs/manualpages/EPS/EPSGetConvergenceTest.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetConvergenceTest</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetConvergenceTest</H1>
 Gets the method used to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSConv.html#EPSConv">EPSConv</A> *conv)
+PetscErrorCode EPSGetConvergenceTest(EPS eps,EPSConv *conv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps   </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>conv  </B> - the type of convergence test
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv  </B></TD><TD> - the type of convergence test
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetDS.html b/docs/manualpages/EPS/EPSGetDS.html
index 39e94ea..30e2dd1 100644
--- a/docs/manualpages/EPS/EPSGetDS.html
+++ b/docs/manualpages/EPS/EPSGetDS.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetDS</H1>
 Obtain the direct solver object associated to the eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../DS/DS.html#DS">DS</A> *ds)
+PetscErrorCode EPSGetDS(EPS eps,DS *ds)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ds </B> - direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetDimensions.html b/docs/manualpages/EPS/EPSGetDimensions.html
index e9373c2..2f9edf8 100644
--- a/docs/manualpages/EPS/EPSGetDimensions.html
+++ b/docs/manualpages/EPS/EPSGetDimensions.html
@@ -6,29 +6,29 @@
 <TITLE>EPSGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetDimensions</H1>
 Gets the number of eigenvalues to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
+PetscErrorCode EPSGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGetEigenpair.html b/docs/manualpages/EPS/EPSGetEigenpair.html
index 70c76f1..e1cfadc 100644
--- a/docs/manualpages/EPS/EPSGetEigenpair.html
+++ b/docs/manualpages/EPS/EPSGetEigenpair.html
@@ -6,34 +6,34 @@
 <TITLE>EPSGetEigenpair</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetEigenpair.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetEigenpair.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetEigenpair</H1>
 Gets the i-th solution of the eigenproblem as computed by <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>(). The solution consists in both the eigenvalue and the eigenvector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)
+PetscErrorCode EPSGetEigenpair(EPS eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -67,5 +67,6 @@ norm defined by the B matrix.
 <A HREF="../../../src/eps/examples/tutorials/ex1.c.html">src/eps/examples/tutorials/ex1.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex24.c.html">src/eps/examples/tutorials/ex24.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex31.c.html">src/eps/examples/tutorials/ex31.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex1f.F.html">src/eps/examples/tutorials/ex1f.F.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetEigenvalue.html b/docs/manualpages/EPS/EPSGetEigenvalue.html
index 1f297bf..f79e0fa 100644
--- a/docs/manualpages/EPS/EPSGetEigenvalue.html
+++ b/docs/manualpages/EPS/EPSGetEigenvalue.html
@@ -6,30 +6,30 @@
 <TITLE>EPSGetEigenvalue</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetEigenvalue.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetEigenvalue.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetEigenvalue</H1>
 Gets the i-th eigenvalue as computed by <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi)
+PetscErrorCode EPSGetEigenvalue(EPS eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSGetEigenvector.html b/docs/manualpages/EPS/EPSGetEigenvector.html
index 0cf7607..eba8f4a 100644
--- a/docs/manualpages/EPS/EPSGetEigenvector.html
+++ b/docs/manualpages/EPS/EPSGetEigenvector.html
@@ -6,30 +6,30 @@
 <TITLE>EPSGetEigenvector</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetEigenvector.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetEigenvector.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetEigenvector</H1>
 Gets the i-th right eigenvector as computed by <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt i,Vec Vr,Vec Vi)
+PetscErrorCode EPSGetEigenvector(EPS eps,PetscInt i,Vec Vr,Vec Vi)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSGetErrorEstimate.html b/docs/manualpages/EPS/EPSGetErrorEstimate.html
index 243d52c..7af5693 100644
--- a/docs/manualpages/EPS/EPSGetErrorEstimate.html
+++ b/docs/manualpages/EPS/EPSGetErrorEstimate.html
@@ -6,28 +6,28 @@
 <TITLE>EPSGetErrorEstimate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetErrorEstimate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetErrorEstimate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetErrorEstimate</H1>
 Returns the error estimate associated to the i-th computed eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt i,PetscReal *errest)
+PetscErrorCode EPSGetErrorEstimate(EPS eps,PetscInt i,PetscReal *errest)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of eigenpair
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>errest </B> - the error estimate
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - the error estimate
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is the error estimate used internally by the eigensolver. The actual
diff --git a/docs/manualpages/EPS/EPSGetExtraction.html b/docs/manualpages/EPS/EPSGetExtraction.html
index 2b6a3df..07564db 100644
--- a/docs/manualpages/EPS/EPSGetExtraction.html
+++ b/docs/manualpages/EPS/EPSGetExtraction.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetExtraction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetExtraction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetExtraction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetExtraction</H1>
 Gets the extraction type used by the <A HREF="../EPS/EPS.html#EPS">EPS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</A> *extr)
+PetscErrorCode EPSGetExtraction(EPS eps,EPSExtraction *extr)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>extr </B> - name of extraction type
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extr </B></TD><TD> - name of extraction type
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetInterval.html b/docs/manualpages/EPS/EPSGetInterval.html
index 81115cb..f412bd3 100644
--- a/docs/manualpages/EPS/EPSGetInterval.html
+++ b/docs/manualpages/EPS/EPSGetInterval.html
@@ -6,27 +6,27 @@
 <TITLE>EPSGetInterval</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetInterval.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetInterval.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetInterval</H1>
 Gets the computational interval for spectrum slicing. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal* inta,PetscReal* intb)
+PetscErrorCode EPSGetInterval(EPS eps,PetscReal* inta,PetscReal* intb)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inta </B></TD><TD> - left end of the interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inta </B></TD><TD> - left end of the interval
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>intb </B></TD><TD> - right end of the interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>intb </B></TD><TD> - right end of the interval
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGetInvariantSubspace.html b/docs/manualpages/EPS/EPSGetInvariantSubspace.html
index 5420d3d..469442b 100644
--- a/docs/manualpages/EPS/EPSGetInvariantSubspace.html
+++ b/docs/manualpages/EPS/EPSGetInvariantSubspace.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetInvariantSubspace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetInvariantSubspace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetInvariantSubspace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetInvariantSubspace</H1>
 Gets an orthonormal basis of the computed invariant subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,Vec *v)
+PetscErrorCode EPSGetInvariantSubspace(EPS eps,Vec *v)
 </PRE>
 Not Collective, but vectors are shared by all processors that share the <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>v </B> - an array of vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v </B></TD><TD> - an array of vectors
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function should be called after <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>() has finished.
diff --git a/docs/manualpages/EPS/EPSGetIterationNumber.html b/docs/manualpages/EPS/EPSGetIterationNumber.html
index a31b2f1..acf8594 100644
--- a/docs/manualpages/EPS/EPSGetIterationNumber.html
+++ b/docs/manualpages/EPS/EPSGetIterationNumber.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetIterationNumber</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetIterationNumber</H1>
 Gets the current iteration number. If the call to <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>() is complete, then it returns the number of iterations carried out by the solution method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *its)
+PetscErrorCode EPSGetIterationNumber(EPS eps,PetscInt *its)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>its </B> - number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -46,7 +46,7 @@ failed and why.
 <A HREF="../../../src/eps/examples/tutorials/ex4.c.html">src/eps/examples/tutorials/ex4.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex7.c.html">src/eps/examples/tutorials/ex7.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
-<A HREF="../../../src/eps/examples/tutorials/ex24.c.html">src/eps/examples/tutorials/ex24.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex31.c.html">src/eps/examples/tutorials/ex31.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex1f.F.html">src/eps/examples/tutorials/ex1f.F.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex6f.F.html">src/eps/examples/tutorials/ex6f.F.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetMonitorContext.html b/docs/manualpages/EPS/EPSGetMonitorContext.html
index 0d0d637..c2f71df 100644
--- a/docs/manualpages/EPS/EPSGetMonitorContext.html
+++ b/docs/manualpages/EPS/EPSGetMonitorContext.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetMonitorContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetMonitorContext</H1>
 Gets the monitor context, as set by <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>() for the FIRST monitor only. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetMonitorContext.html#EPSGetMonitorContext">EPSGetMonitorContext</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,void **ctx)
+PetscErrorCode EPSGetMonitorContext(EPS eps,void **ctx)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ctx </B> - monitor context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - monitor context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetOperators.html b/docs/manualpages/EPS/EPSGetOperators.html
index 31b90fe..7f6f6c3 100644
--- a/docs/manualpages/EPS/EPSGetOperators.html
+++ b/docs/manualpages/EPS/EPSGetOperators.html
@@ -6,27 +6,27 @@
 <TITLE>EPSGetOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetOperators</H1>
 Gets the matrices associated with the eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,Mat *A,Mat *B)
+PetscErrorCode EPSGetOperators(EPS eps,Mat *A,Mat *B)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the <A HREF="../EPS/EPS.html#EPS">EPS</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the <A HREF="../EPS/EPS.html#EPS">EPS</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the eigensystem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the eigensystem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the second matrix in the case of generalized eigenproblems
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the second matrix in the case of generalized eigenproblems
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGetOptionsPrefix.html b/docs/manualpages/EPS/EPSGetOptionsPrefix.html
index 7792308..4c0a9ce 100644
--- a/docs/manualpages/EPS/EPSGetOptionsPrefix.html
+++ b/docs/manualpages/EPS/EPSGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>EPSGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../EPS/EPS.html#EPS">EPS</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,const char *prefix[])
+PetscErrorCode EPSGetOptionsPrefix(EPS eps,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/EPS/EPSGetProblemType.html b/docs/manualpages/EPS/EPSGetProblemType.html
index 7b96e31..b2b41be 100644
--- a/docs/manualpages/EPS/EPSGetProblemType.html
+++ b/docs/manualpages/EPS/EPSGetProblemType.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetProblemType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetProblemType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetProblemType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetProblemType</H1>
 Gets the problem type from the <A HREF="../EPS/EPS.html#EPS">EPS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</A> *type)
+PetscErrorCode EPSGetProblemType(EPS eps,EPSProblemType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>type </B> - name of <A HREF="../EPS/EPS.html#EPS">EPS</A> problem type
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - name of <A HREF="../EPS/EPS.html#EPS">EPS</A> problem type
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetPurify.html b/docs/manualpages/EPS/EPSGetPurify.html
index bd40594..fd7b19a 100644
--- a/docs/manualpages/EPS/EPSGetPurify.html
+++ b/docs/manualpages/EPS/EPSGetPurify.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetPurify</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetPurify.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetPurify.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetPurify</H1>
 Returns the flag indicating whether purification is activated or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *purify)
+PetscErrorCode EPSGetPurify(EPS eps,PetscBool *purify)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>purify </B> - the returned flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>purify </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetRG.html b/docs/manualpages/EPS/EPSGetRG.html
index 365337d..5610c95 100644
--- a/docs/manualpages/EPS/EPSGetRG.html
+++ b/docs/manualpages/EPS/EPSGetRG.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetRG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetRG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetRG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetRG</H1>
 Obtain the region object associated to the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../RG/RG.html#RG">RG</A> *rg)
+PetscErrorCode EPSGetRG(EPS eps,RG *rg)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>rg </B> - region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - region context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -34,4 +34,6 @@ Not Collective
 <BR><A HREF="./index.html">Index of all EPS routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetST.html b/docs/manualpages/EPS/EPSGetST.html
index a1f023f..9c60b2a 100644
--- a/docs/manualpages/EPS/EPSGetST.html
+++ b/docs/manualpages/EPS/EPSGetST.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetST</H1>
 Obtain the spectral transformation (<A HREF="../ST/ST.html#ST">ST</A>) object associated to the eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetST.html#EPSGetST">EPSGetST</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../ST/ST.html#ST">ST</A> *st)
+PetscErrorCode EPSGetST(EPS eps,ST *st)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>st </B> - spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetStoppingTest.html b/docs/manualpages/EPS/EPSGetStoppingTest.html
new file mode 100644
index 0000000..15e2c64
--- /dev/null
+++ b/docs/manualpages/EPS/EPSGetStoppingTest.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSGetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSGetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSGetStoppingTest</H1>
+Gets the method used to decide the termination of the outer loop of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSGetStoppingTest(EPS eps,EPSStop *stop)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop  </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</A>(), <A HREF="../EPS/EPSStop.html#EPSStop">EPSStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSGetStoppingTest">src/eps/interface/epsopts.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetTarget.html b/docs/manualpages/EPS/EPSGetTarget.html
index ac6dcbe..0418f80 100644
--- a/docs/manualpages/EPS/EPSGetTarget.html
+++ b/docs/manualpages/EPS/EPSGetTarget.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetTarget</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetTarget.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetTarget.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetTarget</H1>
 Gets the value of the target. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscScalar* target)
+PetscErrorCode EPSGetTarget(EPS eps,PetscScalar* target)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>target </B> - the value of the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If the target was not set by the user, then zero is returned.
diff --git a/docs/manualpages/EPS/EPSGetTolerances.html b/docs/manualpages/EPS/EPSGetTolerances.html
index 0b2dbff..35cac54 100644
--- a/docs/manualpages/EPS/EPSGetTolerances.html
+++ b/docs/manualpages/EPS/EPSGetTolerances.html
@@ -6,27 +6,27 @@
 <TITLE>EPSGetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetTolerances</H1>
 Gets the tolerance and maximum iteration count used by the <A HREF="../EPS/EPS.html#EPS">EPS</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal *tol,PetscInt *maxits)
+PetscErrorCode EPSGetTolerances(EPS eps,PetscReal *tol,PetscInt *maxits)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -45,6 +45,7 @@ The user can specify NULL for any parameter that is not needed.
 <A HREF="../../../src/eps/examples/tutorials/ex4.c.html">src/eps/examples/tutorials/ex4.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex7.c.html">src/eps/examples/tutorials/ex7.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex24.c.html">src/eps/examples/tutorials/ex24.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex1f.F.html">src/eps/examples/tutorials/ex1f.F.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex6f.F.html">src/eps/examples/tutorials/ex6f.F.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSGetTrackAll.html b/docs/manualpages/EPS/EPSGetTrackAll.html
index 7a107fa..83ebee9 100644
--- a/docs/manualpages/EPS/EPSGetTrackAll.html
+++ b/docs/manualpages/EPS/EPSGetTrackAll.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetTrackAll</H1>
 Returns the flag indicating whether all residual norms must be computed or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *trackall)
+PetscErrorCode EPSGetTrackAll(EPS eps,PetscBool *trackall)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>trackall </B> - the returned flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetTrueResidual.html b/docs/manualpages/EPS/EPSGetTrueResidual.html
index aebee5e..86f649a 100644
--- a/docs/manualpages/EPS/EPSGetTrueResidual.html
+++ b/docs/manualpages/EPS/EPSGetTrueResidual.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetTrueResidual</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetTrueResidual.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetTrueResidual.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetTrueResidual</H1>
 Returns the flag indicating whether true residuals must be computed explicitly or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *trueres)
+PetscErrorCode EPSGetTrueResidual(EPS eps,PetscBool *trueres)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>trueres </B> - the returned flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trueres </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetType.html b/docs/manualpages/EPS/EPSGetType.html
index 7cddcaf..1ac1278 100644
--- a/docs/manualpages/EPS/EPSGetType.html
+++ b/docs/manualpages/EPS/EPSGetType.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetType</H1>
 Gets the <A HREF="../EPS/EPS.html#EPS">EPS</A> type as a string from the <A HREF="../EPS/EPS.html#EPS">EPS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetType.html#EPSGetType">EPSGetType</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSType.html#EPSType">EPSType</A> *type)
+PetscErrorCode EPSGetType(EPS eps,EPSType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of <A HREF="../EPS/EPS.html#EPS">EPS</A> method
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of <A HREF="../EPS/EPS.html#EPS">EPS</A> method
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSGetWhichEigenpairs.html b/docs/manualpages/EPS/EPSGetWhichEigenpairs.html
index 8f4a2b4..b094486 100644
--- a/docs/manualpages/EPS/EPSGetWhichEigenpairs.html
+++ b/docs/manualpages/EPS/EPSGetWhichEigenpairs.html
@@ -6,25 +6,25 @@
 <TITLE>EPSGetWhichEigenpairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSGetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSGetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSGetWhichEigenpairs</H1>
 Returns which portion of the spectrum is to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSWhich.html#EPSWhich">EPSWhich</A> *which)
+PetscErrorCode EPSGetWhichEigenpairs(EPS eps,EPSWhich *which)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>which </B> - the portion of the spectrum to be sought
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See <A HREF="../EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</A>() for possible values of 'which'.
diff --git a/docs/manualpages/EPS/EPSInitializePackage.html b/docs/manualpages/EPS/EPSInitializePackage.html
index 6cdf170..0365b9f 100644
--- a/docs/manualpages/EPS/EPSInitializePackage.html
+++ b/docs/manualpages/EPS/EPSInitializePackage.html
@@ -6,14 +6,14 @@
 <TITLE>EPSInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSInitializePackage</H1>
 This function initializes everything in the <A HREF="../EPS/EPS.html#EPS">EPS</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</A>()
+PetscErrorCode EPSInitializePackage()
 </PRE>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSIsGeneralized.html b/docs/manualpages/EPS/EPSIsGeneralized.html
index c87143c..ede0c77 100644
--- a/docs/manualpages/EPS/EPSIsGeneralized.html
+++ b/docs/manualpages/EPS/EPSIsGeneralized.html
@@ -6,25 +6,25 @@
 <TITLE>EPSIsGeneralized</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSIsGeneralized.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSIsGeneralized.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSIsGeneralized</H1>
 Ask if the <A HREF="../EPS/EPS.html#EPS">EPS</A> object corresponds to a generalized eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool* is)
+PetscErrorCode EPSIsGeneralized(EPS eps,PetscBool* is)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>is </B> - the answer
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is </B></TD><TD> - the answer
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSIsHermitian.html b/docs/manualpages/EPS/EPSIsHermitian.html
index ee19d93..e122be6 100644
--- a/docs/manualpages/EPS/EPSIsHermitian.html
+++ b/docs/manualpages/EPS/EPSIsHermitian.html
@@ -6,25 +6,25 @@
 <TITLE>EPSIsHermitian</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSIsHermitian.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSIsHermitian.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSIsHermitian</H1>
 Ask if the <A HREF="../EPS/EPS.html#EPS">EPS</A> object corresponds to a Hermitian eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool* is)
+PetscErrorCode EPSIsHermitian(EPS eps,PetscBool* is)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>is </B> - the answer
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is </B></TD><TD> - the answer
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSIsPositive.html b/docs/manualpages/EPS/EPSIsPositive.html
index cb13230..5c3dba3 100644
--- a/docs/manualpages/EPS/EPSIsPositive.html
+++ b/docs/manualpages/EPS/EPSIsPositive.html
@@ -6,25 +6,25 @@
 <TITLE>EPSIsPositive</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSIsPositive.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSIsPositive.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSIsPositive</H1>
 Ask if the <A HREF="../EPS/EPS.html#EPS">EPS</A> object corresponds to an eigenvalue problem type that requires a positive (semi-) definite matrix B. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool* is)
+PetscErrorCode EPSIsPositive(EPS eps,PetscBool* is)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>is </B> - the answer
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is </B></TD><TD> - the answer
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDGetBOrth.html b/docs/manualpages/EPS/EPSJDGetBOrth.html
index 7e93b00..8bf6670 100644
--- a/docs/manualpages/EPS/EPSJDGetBOrth.html
+++ b/docs/manualpages/EPS/EPSJDGetBOrth.html
@@ -6,25 +6,25 @@
 <TITLE>EPSJDGetBOrth</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetBOrth.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetBOrth.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetBOrth</H1>
 Returns the orthogonalization used in the search subspace in case of generalized Hermitian problems. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *borth)
+PetscErrorCode EPSJDGetBOrth(EPS eps,PetscBool *borth)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>borth </B> - whether to B-orthogonalize the search subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>borth </B></TD><TD> - whether to B-orthogonalize the search subspace
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDGetBlockSize.html b/docs/manualpages/EPS/EPSJDGetBlockSize.html
index 722a14b..7153792 100644
--- a/docs/manualpages/EPS/EPSJDGetBlockSize.html
+++ b/docs/manualpages/EPS/EPSJDGetBlockSize.html
@@ -6,25 +6,25 @@
 <TITLE>EPSJDGetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetBlockSize</H1>
 Returns the number of vectors to be added to the searching space in every iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *blocksize)
+PetscErrorCode EPSJDGetBlockSize(EPS eps,PetscInt *blocksize)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>blocksize </B> - number of vectors added to the search space in every iteration
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html b/docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html
index f5a9f84..f97b3e8 100644
--- a/docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html
+++ b/docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html
@@ -6,25 +6,25 @@
 <TITLE>EPSJDGetConstCorrectionTol</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetConstCorrectionTol</H1>
 Returns a flag indicating if the dynamic stopping is being used for solving the correction equation. If the flag is false the KSP relative tolerance is set to 0.5**i, where i is the number of <A HREF="../EPS/EPS.html#EPS">EPS</A> iterations from the last converged value. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *constant)
+PetscErrorCode EPSJDGetConstCorrectionTol(EPS eps,PetscBool *constant)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>constant </B> - boolean flag indicating if the dynamic stopping criterion is not being used.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>constant </B></TD><TD> - boolean flag indicating if the dynamic stopping criterion is not being used.
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDGetFix.html b/docs/manualpages/EPS/EPSJDGetFix.html
index 4ca7f92..e26c63b 100644
--- a/docs/manualpages/EPS/EPSJDGetFix.html
+++ b/docs/manualpages/EPS/EPSJDGetFix.html
@@ -6,25 +6,25 @@
 <TITLE>EPSJDGetFix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetFix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetFix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetFix</H1>
 Returns the threshold for changing the target in the correction equation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal *fix)
+PetscErrorCode EPSJDGetFix(EPS eps,PetscReal *fix)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>fix </B> - threshold for changing the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fix </B></TD><TD> - threshold for changing the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The target in the correction equation is fixed at the first iterations.
diff --git a/docs/manualpages/EPS/EPSJDGetInitialSize.html b/docs/manualpages/EPS/EPSJDGetInitialSize.html
index 70f2c93..0fcb79e 100644
--- a/docs/manualpages/EPS/EPSJDGetInitialSize.html
+++ b/docs/manualpages/EPS/EPSJDGetInitialSize.html
@@ -6,25 +6,25 @@
 <TITLE>EPSJDGetInitialSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetInitialSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetInitialSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetInitialSize</H1>
 Returns the initial size of the searching space. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *initialsize)
+PetscErrorCode EPSJDGetInitialSize(EPS eps,PetscInt *initialsize)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>initialsize </B> - number of vectors of the initial searching subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>initialsize </B></TD><TD> - number of vectors of the initial searching subspace
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If <A HREF="../EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</A>() is PETSC_FALSE and the user provides vectors with
diff --git a/docs/manualpages/EPS/EPSJDGetKrylovStart.html b/docs/manualpages/EPS/EPSJDGetKrylovStart.html
index 990bff1..8820c8d 100644
--- a/docs/manualpages/EPS/EPSJDGetKrylovStart.html
+++ b/docs/manualpages/EPS/EPSJDGetKrylovStart.html
@@ -6,26 +6,26 @@
 <TITLE>EPSJDGetKrylovStart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetKrylovStart</H1>
 Returns a flag indicating if the searching subspace is started with a Krylov basis. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *krylovstart)
+PetscErrorCode EPSJDGetKrylovStart(EPS eps,PetscBool *krylovstart)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>krylovstart </B> - boolean flag indicating if the searching subspace is started
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>krylovstart </B></TD><TD> - boolean flag indicating if the searching subspace is started
 with a Krylov basis
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDGetRestart.html b/docs/manualpages/EPS/EPSJDGetRestart.html
index cc9a164..a1a59bf 100644
--- a/docs/manualpages/EPS/EPSJDGetRestart.html
+++ b/docs/manualpages/EPS/EPSJDGetRestart.html
@@ -6,27 +6,27 @@
 <TITLE>EPSJDGetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetRestart</H1>
 Gets the number of vectors of the searching space after restarting and the number of vectors saved from the previous iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *minv,PetscInt *plusk)
+PetscErrorCode EPSJDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSJDGetWindowSizes.html b/docs/manualpages/EPS/EPSJDGetWindowSizes.html
index 4daaf7e..ee4d30e 100644
--- a/docs/manualpages/EPS/EPSJDGetWindowSizes.html
+++ b/docs/manualpages/EPS/EPSJDGetWindowSizes.html
@@ -6,27 +6,27 @@
 <TITLE>EPSJDGetWindowSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDGetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDGetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDGetWindowSizes</H1>
 Gets the number of converged vectors in the projected problem (or Rayleigh quotient) and in the projector employed in the correction equation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *pwindow,PetscInt *qwindow)
+PetscErrorCode EPSJDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSJDSetBOrth.html b/docs/manualpages/EPS/EPSJDSetBOrth.html
index 0b1310a..e2c6750 100644
--- a/docs/manualpages/EPS/EPSJDSetBOrth.html
+++ b/docs/manualpages/EPS/EPSJDSetBOrth.html
@@ -6,28 +6,28 @@
 <TITLE>EPSJDSetBOrth</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetBOrth.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetBOrth.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetBOrth</H1>
 Selects the orthogonalization that will be used in the search subspace in case of generalized Hermitian problems. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool borth)
+PetscErrorCode EPSJDSetBOrth(EPS eps,PetscBool borth)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>borth </B></TD><TD> - whether to B-orthogonalize the search subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>borth </B></TD><TD> - whether to B-orthogonalize the search subspace
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_jd_borth </B> - Set the orthogonalization used in the search subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_borth </B></TD><TD> - Set the orthogonalization used in the search subspace
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDSetBlockSize.html b/docs/manualpages/EPS/EPSJDSetBlockSize.html
index 7edc4b3..61347b3 100644
--- a/docs/manualpages/EPS/EPSJDSetBlockSize.html
+++ b/docs/manualpages/EPS/EPSJDSetBlockSize.html
@@ -6,28 +6,28 @@
 <TITLE>EPSJDSetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetBlockSize</H1>
 Sets the number of vectors to be added to the searching space in every iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt blocksize)
+PetscErrorCode EPSJDSetBlockSize(EPS eps,PetscInt blocksize)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blocksize </B></TD><TD> - number of vectors added to the search space in every iteration
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_jd_blocksize </B> - number of vectors added to the searching space every iteration
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_blocksize </B></TD><TD> - number of vectors added to the searching space every iteration
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html b/docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html
index 9f6ac73..68f5b4b 100644
--- a/docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html
+++ b/docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html
@@ -6,28 +6,28 @@
 <TITLE>EPSJDSetConstCorrectionTol</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetConstCorrectionTol</H1>
 If true, deactivates the dynamic stopping criterion (also called Newton) that sets the KSP relative tolerance to 0.5**i, where i is the number of <A HREF="../EPS/EPS.html#EPS">EPS</A> iterations from the last converged value. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool constant)
+PetscErrorCode EPSJDSetConstCorrectionTol(EPS eps,PetscBool constant)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>constant </B></TD><TD> - if false, the KSP relative tolerance is set to 0.5**i.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>constant </B></TD><TD> - if false, the KSP relative tolerance is set to 0.5**i.
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_jd_const_correction_tol </B> - Deactivates the dynamic stopping criterion.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_const_correction_tol </B></TD><TD> - Deactivates the dynamic stopping criterion.
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDSetFix.html b/docs/manualpages/EPS/EPSJDSetFix.html
index 80cc525..42eb7bd 100644
--- a/docs/manualpages/EPS/EPSJDSetFix.html
+++ b/docs/manualpages/EPS/EPSJDSetFix.html
@@ -6,28 +6,28 @@
 <TITLE>EPSJDSetFix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetFix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetFix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetFix</H1>
 Sets the threshold for changing the target in the correction equation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal fix)
+PetscErrorCode EPSJDSetFix(EPS eps,PetscReal fix)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fix </B></TD><TD> - threshold for changing the target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fix </B></TD><TD> - threshold for changing the target
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_jd_fix </B> - the fix value
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_fix </B></TD><TD> - the fix value
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The target in the correction equation is fixed at the first iterations.
diff --git a/docs/manualpages/EPS/EPSJDSetInitialSize.html b/docs/manualpages/EPS/EPSJDSetInitialSize.html
index c05c592..bea4fed 100644
--- a/docs/manualpages/EPS/EPSJDSetInitialSize.html
+++ b/docs/manualpages/EPS/EPSJDSetInitialSize.html
@@ -6,28 +6,28 @@
 <TITLE>EPSJDSetInitialSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetInitialSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetInitialSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetInitialSize</H1>
 Sets the initial size of the searching space. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt initialsize)
+PetscErrorCode EPSJDSetInitialSize(EPS eps,PetscInt initialsize)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>initialsize </B></TD><TD> - number of vectors of the initial searching subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>initialsize </B></TD><TD> - number of vectors of the initial searching subspace
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_jd_initial_size </B> - number of vectors of the initial searching subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_initial_size </B></TD><TD> - number of vectors of the initial searching subspace
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If <A HREF="../EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</A>() is PETSC_FALSE and the user provides vectors with
diff --git a/docs/manualpages/EPS/EPSJDSetKrylovStart.html b/docs/manualpages/EPS/EPSJDSetKrylovStart.html
index 5c14000..b3d92cc 100644
--- a/docs/manualpages/EPS/EPSJDSetKrylovStart.html
+++ b/docs/manualpages/EPS/EPSJDSetKrylovStart.html
@@ -6,29 +6,29 @@
 <TITLE>EPSJDSetKrylovStart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetKrylovStart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetKrylovStart</H1>
 Activates or deactivates starting the searching subspace with a Krylov basis. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool krylovstart)
+PetscErrorCode EPSJDSetKrylovStart(EPS eps,PetscBool krylovstart)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>krylovstart </B></TD><TD> - boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>krylovstart </B></TD><TD> - boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_jd_krylov_start </B> - Activates starting the searching subspace with a
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_krylov_start </B></TD><TD> - Activates starting the searching subspace with a
 Krylov basis
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSJDSetRestart.html b/docs/manualpages/EPS/EPSJDSetRestart.html
index 2ec77b6..8068fd3 100644
--- a/docs/manualpages/EPS/EPSJDSetRestart.html
+++ b/docs/manualpages/EPS/EPSJDSetRestart.html
@@ -6,32 +6,32 @@
 <TITLE>EPSJDSetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetRestart</H1>
 Sets the number of vectors of the searching space after restarting and the number of vectors saved from the previous iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt minv,PetscInt plusk)
+PetscErrorCode EPSJDSetRestart(EPS eps,PetscInt minv,PetscInt plusk)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>minv </B></TD><TD> - number of vectors of the searching subspace after restarting
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>plusk </B></TD><TD> - number of vectors saved from the previous iteration
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_minv </B></TD><TD> - number of vectors of the searching subspace after restarting
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_minv </B></TD><TD> - number of vectors of the searching subspace after restarting
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_plusk </B></TD><TD> - number of vectors saved from the previous iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_plusk </B></TD><TD> - number of vectors saved from the previous iteration
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSJDSetWindowSizes.html b/docs/manualpages/EPS/EPSJDSetWindowSizes.html
index eb8d394..2853006 100644
--- a/docs/manualpages/EPS/EPSJDSetWindowSizes.html
+++ b/docs/manualpages/EPS/EPSJDSetWindowSizes.html
@@ -6,32 +6,32 @@
 <TITLE>EPSJDSetWindowSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSJDSetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSJDSetWindowSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSJDSetWindowSizes</H1>
 Sets the number of converged vectors in the projected problem (or Rayleigh quotient) and in the projector employed in the correction equation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt pwindow,PetscInt qwindow)
+PetscErrorCode EPSJDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pwindow </B></TD><TD> - number of converged vectors in the projector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qwindow </B></TD><TD> - number of converged vectors in the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_pwindow </B></TD><TD> - set the number of converged vectors in the projector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_pwindow </B></TD><TD> - set the number of converged vectors in the projector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_qwindow </B></TD><TD> - set the number of converged vectors in the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_jd_qwindow </B></TD><TD> - set the number of converged vectors in the projected problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html b/docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html
index 672dcb4..27bbdfd 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html
@@ -6,25 +6,25 @@
 <TITLE>EPSKrylovSchurGetDetectZeros</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetDetectZeros</H1>
 Gets the flag that enforces zero detection in spectrum slicing. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *detect)
+PetscErrorCode EPSKrylovSchurGetDetectZeros(EPS eps,PetscBool *detect)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>detect </B> - whether zeros detection is enforced during factorizations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>detect </B></TD><TD> - whether zeros detection is enforced during factorizations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html b/docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html
index 332b2f6..3fec2ee 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html
@@ -6,29 +6,29 @@
 <TITLE>EPSKrylovSchurGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetDimensions</H1>
 Gets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
+PetscErrorCode EPSKrylovSchurGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the subsolve
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the subsolve
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetInertias.html b/docs/manualpages/EPS/EPSKrylovSchurGetInertias.html
index 7b07afb..0599fd3 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetInertias.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetInertias.html
@@ -6,29 +6,29 @@
 <TITLE>EPSKrylovSchurGetInertias</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetInertias.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetInertias.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetInertias</H1>
 Gets the values of the shifts and their corresponding inertias in case of doing spectrum slicing for a computational interval. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)
+PetscErrorCode EPSKrylovSchurGetInertias(EPS eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n        </B></TD><TD> - number of shifts, including the endpoints of the interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n        </B></TD><TD> - number of shifts, including the endpoints of the interval
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shifts   </B></TD><TD> - the values of the shifts used internally in the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shifts   </B></TD><TD> - the values of the shifts used internally in the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inertias </B></TD><TD> - the values of the inertia in each shift
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inertias </B></TD><TD> - the values of the inertia in each shift
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetLocking.html b/docs/manualpages/EPS/EPSKrylovSchurGetLocking.html
index b57bd32..f78a995 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetLocking.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetLocking.html
@@ -6,25 +6,25 @@
 <TITLE>EPSKrylovSchurGetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetLocking</H1>
 Gets the locking flag used in the Krylov-Schur method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *lock)
+PetscErrorCode EPSKrylovSchurGetLocking(EPS eps,PetscBool *lock)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>lock </B> - the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - the locking flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html b/docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html
index 24aabe0..fde2da9 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html
@@ -6,25 +6,25 @@
 <TITLE>EPSKrylovSchurGetPartitions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetPartitions</H1>
 Gets the number of partitions of the communicator in case of spectrum slicing. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *npart)
+PetscErrorCode EPSKrylovSchurGetPartitions(EPS eps,PetscInt *npart)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>npart </B> - number of partitions
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetRestart.html b/docs/manualpages/EPS/EPSKrylovSchurGetRestart.html
index 512cc4f..40bb92c 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetRestart.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetRestart.html
@@ -6,25 +6,25 @@
 <TITLE>EPSKrylovSchurGetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetRestart</H1>
 Gets the restart parameter used in the Krylov-Schur method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal *keep)
+PetscErrorCode EPSKrylovSchurGetRestart(EPS eps,PetscReal *keep)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>keep </B> - the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the restart parameter
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html b/docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html
index cc8592e..3032766 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html
@@ -6,29 +6,29 @@
 <TITLE>EPSKrylovSchurGetSubcommInfo</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetSubcommInfo</H1>
 Gets information related to the case of doing spectrum slicing for a computational interval with multiple communicators. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *k,PetscInt *n,Vec *v)
+PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS eps,PetscInt *k,PetscInt *n,Vec *v)
 </PRE>
 Collective on the subcommunicator (if v is given)
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k </B></TD><TD> - number of the subinterval for the calling process
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k </B></TD><TD> - index of the subinterval for the calling process
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of eigenvalues found in the k-th subinterval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of eigenvalues found in the k-th subinterval
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v </B></TD><TD> - a vector owned by processes in the subcommunicator with dimensions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v </B></TD><TD> - a vector owned by processes in the subcommunicator with dimensions
 compatible for locally computed eigenvectors (or NULL)
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html b/docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html
new file mode 100644
index 0000000..0b43e62
--- /dev/null
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSKrylovSchurGetSubcommMats</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSKrylovSchurGetSubcommMats</H1>
+Gets the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSKrylovSchurGetSubcommMats(EPS eps,Mat *A,Mat *B)
+</PRE>
+Collective on the subcommunicator
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the eigensystem
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the second matrix in the case of generalized eigenproblems
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+This is the analog of <A HREF="../EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</A>(), but returns the matrices distributed
+differently (in the subcommunicator rather than in the parent communicator).
+<P>
+These matrices should not be modified by the user.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>(), <A HREF="../EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</A>(), <A HREF="../EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/krylov/krylovschur/krylovschur.c.html#EPSKrylovSchurGetSubcommMats">src/eps/impls/krylov/krylovschur/krylovschur.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html b/docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html
index 0f2e3a4..048c13f 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html
@@ -6,30 +6,30 @@
 <TITLE>EPSKrylovSchurGetSubcommPairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetSubcommPairs</H1>
-Gets the i-th eigenpair stored internally in the multi-communicator to which the calling process belongs. 
+Gets the i-th eigenpair stored internally in the subcommunicator to which the calling process belongs. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt i,PetscScalar *eig,Vec v)
+PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS eps,PetscInt i,PetscScalar *eig,Vec v)
 </PRE>
 Collective on the subcommunicator (if v is given)
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eig </B></TD><TD> - the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eig </B></TD><TD> - the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v   </B></TD><TD> - the eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v   </B></TD><TD> - the eigenvector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -43,7 +43,7 @@ vectors in the local subinterval, see <A HREF="../EPS/EPSKrylovSchurGetSubcommIn
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>(), <A HREF="../EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</A>(), <A HREF="../EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</A>()
+ <A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>(), <A HREF="../EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</A>(), <A HREF="../EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</A>(), <A HREF="../EPS/EPSKrylovSchurGetSubcommMats.html#EPSKrylovSchurGetSubcommMats">EPSKrylovSchurGetSubcommMats</A>()
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/krylov/krylovschur/krylovschur.c.html#EPSKrylovSchurGetSubcommPairs">src/eps/impls/krylov/krylovschur/krylovschur.c</A>
 <BR><A HREF="./index.html">Index of all EPS routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html b/docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html
index 1365769..a4a9fa0 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html
@@ -6,25 +6,25 @@
 <TITLE>EPSKrylovSchurGetSubintervals</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurGetSubintervals</H1>
 Returns the points that delimit the subintervals used in spectrum slicing with several partitions. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal** subint)
+PetscErrorCode EPSKrylovSchurGetSubintervals(EPS eps,PetscReal** subint)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps    </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>subint </B> - array of real values specifying subintervals
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>subint </B></TD><TD> - array of real values specifying subintervals
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If the user passed values with <A HREF="../EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</A>(), then the
diff --git a/docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html b/docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html
index 120cab2..51423b1 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html
@@ -6,29 +6,29 @@
 <TITLE>EPSKrylovSchurSetDetectZeros</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurSetDetectZeros</H1>
 Sets a flag to enforce detection of zeros during the factorizations throughout the spectrum slicing computation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool detect)
+PetscErrorCode EPSKrylovSchurSetDetectZeros(EPS eps,PetscBool detect)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>detect </B></TD><TD> - check for zeros
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>detect </B></TD><TD> - check for zeros
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_krylovschur_detect_zeros </B> - Check for zeros; this takes an optional
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_detect_zeros </B></TD><TD> - Check for zeros; this takes an optional
 bool value (0/1/no/yes/true/false)
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 A zero in the factorization indicates that a shift coincides with an eigenvalue.
diff --git a/docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html b/docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html
index d478294..5a6d698 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html
@@ -6,36 +6,36 @@
 <TITLE>EPSKrylovSchurSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurSetDimensions</H1>
 Sets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. The meaning of the parameters is the same as in <A HREF="../EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
+PetscErrorCode EPSKrylovSchurSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the subsolve
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the subsolve
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSKrylovSchurSetLocking.html b/docs/manualpages/EPS/EPSKrylovSchurSetLocking.html
index 4500f7b..e01497d 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurSetLocking.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurSetLocking.html
@@ -6,28 +6,28 @@
 <TITLE>EPSKrylovSchurSetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurSetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurSetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurSetLocking</H1>
 Choose between locking and non-locking variants of the Krylov-Schur method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool lock)
+PetscErrorCode EPSKrylovSchurSetLocking(EPS eps,PetscBool lock)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_krylovschur_locking </B> - Sets the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_locking </B></TD><TD> - Sets the locking flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The default is to lock converged eigenpairs when the method restarts.
diff --git a/docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html b/docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html
index 37fe738..2cb949a 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html
@@ -6,28 +6,28 @@
 <TITLE>EPSKrylovSchurSetPartitions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurSetPartitions</H1>
 Sets the number of partitions for the case of doing spectrum slicing for a computational interval with the communicator split in several sub-communicators. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt npart)
+PetscErrorCode EPSKrylovSchurSetPartitions(EPS eps,PetscInt npart)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_krylovschur_partitions <npart> </B> - Sets the number of partitions
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_partitions <npart> </B></TD><TD> - Sets the number of partitions
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default, npart=1 so all processes in the communicator participate in
diff --git a/docs/manualpages/EPS/EPSKrylovSchurSetRestart.html b/docs/manualpages/EPS/EPSKrylovSchurSetRestart.html
index 0605541..4a19ae6 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurSetRestart.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurSetRestart.html
@@ -6,28 +6,28 @@
 <TITLE>EPSKrylovSchurSetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurSetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurSetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurSetRestart</H1>
 Sets the restart parameter for the Krylov-Schur method, in particular the proportion of basis vectors that must be kept after restart. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal keep)
+PetscErrorCode EPSKrylovSchurSetRestart(EPS eps,PetscReal keep)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_krylovschur_restart </B> - Sets the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_krylovschur_restart </B></TD><TD> - Sets the restart parameter
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Allowed values are in the range [0.1,0.9]. The default is 0.5.
diff --git a/docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html b/docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html
index b3d7e8b..7d56e86 100644
--- a/docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html
+++ b/docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html
@@ -6,23 +6,23 @@
 <TITLE>EPSKrylovSchurSetSubintervals</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSKrylovSchurSetSubintervals</H1>
 Sets the points that delimit the subintervals to be used in spectrum slicing with several partitions. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal *subint)
+PetscErrorCode EPSKrylovSchurSetSubintervals(EPS eps,PetscReal *subint)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>subint </B></TD><TD> - array of real values specifying subintervals
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>subint </B></TD><TD> - array of real values specifying subintervals
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html b/docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html
new file mode 100644
index 0000000..b06e56f
--- /dev/null
+++ b/docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSKrylovSchurUpdateSubcommMats</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSKrylovSchurUpdateSubcommMats</H1>
+Update the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSKrylovSchurUpdateSubcommMats(EPS eps,PetscScalar s,PetscScalar a,Mat Au,PetscScalar t,PetscScalar b, Mat Bu,MatStructure str,PetscBool globalup)
+</PRE>
+Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s   </B></TD><TD> - scalar that multiplies the existing A matrix
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a   </B></TD><TD> - scalar used in the axpy operation on A
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Au  </B></TD><TD> - matrix used in the axpy operation on A
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t   </B></TD><TD> - scalar that multiplies the existing B matrix
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b   </B></TD><TD> - scalar used in the axpy operation on B
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Bu  </B></TD><TD> - matrix used in the axpy operation on B
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - structure flag
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>globalup </B></TD><TD> - flag indicating if global matrices must be updated
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+This function modifies the eigenproblem matrices at the subcommunicator level,
+and optionally updates the global matrices in the parent communicator. The updates
+are expressed as A <-- s*A + a*Au,  B <-- t*B + b*Bu.
+<P>
+It is possible to update one of the matrices, or both.
+<P>
+The matrices Au and Bu must be equal in all subcommunicators.
+<P>
+The str flag is passed to the MatAXPY() operations to perform the updates.
+<P>
+If globalup is true, communication is carried out to reconstruct the updated
+matrices in the parent communicator. The user must be warned that if global
+matrices are not in sync with subcommunicator matrices, the errors computed
+by <A HREF="../EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</A>() will be wrong even if the computed solution is correct
+(the synchronization may be done only once at the end).
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>(), <A HREF="../EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</A>(), <A HREF="../EPS/EPSKrylovSchurGetSubcommMats.html#EPSKrylovSchurGetSubcommMats">EPSKrylovSchurGetSubcommMats</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/krylov/krylovschur/krylovschur.c.html#EPSKrylovSchurUpdateSubcommMats">src/eps/impls/krylov/krylovschur/krylovschur.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html b/docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html
index 1c7b5d8..8cc9c2e 100644
--- a/docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html
+++ b/docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html
@@ -6,26 +6,25 @@
 <TITLE>EPSLOBPCGGetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLOBPCGGetBlockSize</H1>
 Gets the block size used in the LOBPCG method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-#include "slepcds.h" 
-PetscErrorCode <A HREF="../EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *bs)
+PetscErrorCode EPSLOBPCGGetBlockSize(EPS eps,PetscInt *bs)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bs </B> - the block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - the block size
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSLOBPCGGetLocking.html b/docs/manualpages/EPS/EPSLOBPCGGetLocking.html
index 78a7a28..8e48095 100644
--- a/docs/manualpages/EPS/EPSLOBPCGGetLocking.html
+++ b/docs/manualpages/EPS/EPSLOBPCGGetLocking.html
@@ -6,26 +6,25 @@
 <TITLE>EPSLOBPCGGetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLOBPCGGetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLOBPCGGetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLOBPCGGetLocking</H1>
 Gets the locking flag used in the LOBPCG method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-#include "slepcds.h" 
-PetscErrorCode <A HREF="../EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool *lock)
+PetscErrorCode EPSLOBPCGGetLocking(EPS eps,PetscBool *lock)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>lock </B> - the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - the locking flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSLOBPCGGetRestart.html b/docs/manualpages/EPS/EPSLOBPCGGetRestart.html
new file mode 100644
index 0000000..308a08a
--- /dev/null
+++ b/docs/manualpages/EPS/EPSLOBPCGGetRestart.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSLOBPCGGetRestart.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSLOBPCGGetRestart</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLOBPCGGetRestart.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSLOBPCGGetRestart</H1>
+Gets the restart parameter used in the LOBPCG method. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSLOBPCGGetRestart(EPS eps,PetscReal *restart)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>restart </B></TD><TD> - the restart parameter
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/cg/lobpcg/lobpcg.c.html#EPSLOBPCGGetRestart">src/eps/impls/cg/lobpcg/lobpcg.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html b/docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html
index cb2b6b1..563971b 100644
--- a/docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html
+++ b/docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html
@@ -6,29 +6,28 @@
 <TITLE>EPSLOBPCGSetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLOBPCGSetBlockSize</H1>
 Sets the block size of the LOBPCG method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-#include "slepcds.h" 
-PetscErrorCode <A HREF="../EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt bs)
+PetscErrorCode EPSLOBPCGSetBlockSize(EPS eps,PetscInt bs)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs  </B></TD><TD> - the block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs  </B></TD><TD> - the block size
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_lobpcg_blocksize </B> - Sets the block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_lobpcg_blocksize </B></TD><TD> - Sets the block size
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSLOBPCGSetLocking.html b/docs/manualpages/EPS/EPSLOBPCGSetLocking.html
index 6252bd3..e8d3c5b 100644
--- a/docs/manualpages/EPS/EPSLOBPCGSetLocking.html
+++ b/docs/manualpages/EPS/EPSLOBPCGSetLocking.html
@@ -6,29 +6,28 @@
 <TITLE>EPSLOBPCGSetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLOBPCGSetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLOBPCGSetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLOBPCGSetLocking</H1>
 Choose between locking and non-locking variants of the LOBPCG method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-#include "slepcds.h" 
-PetscErrorCode <A HREF="../EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool lock)
+PetscErrorCode EPSLOBPCGSetLocking(EPS eps,PetscBool lock)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_lobpcg_locking </B> - Sets the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_lobpcg_locking </B></TD><TD> - Sets the locking flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This flag refers to soft locking (converged vectors within the current
diff --git a/docs/manualpages/EPS/EPSLOBPCGSetRestart.html b/docs/manualpages/EPS/EPSLOBPCGSetRestart.html
new file mode 100644
index 0000000..c6bed54
--- /dev/null
+++ b/docs/manualpages/EPS/EPSLOBPCGSetRestart.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSLOBPCGSetRestart.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSLOBPCGSetRestart</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLOBPCGSetRestart.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSLOBPCGSetRestart</H1>
+Sets the restart parameter for the LOBPCG method. The meaning of this parameter is the proportion of vectors within the current block iterate that must have converged in order to force a restart with hard locking. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSLOBPCGSetRestart(EPS eps,PetscReal restart)
+</PRE>
+Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>restart </B></TD><TD> - the percentage of the block of vectors to force a restart
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_lobpcg_restart </B></TD><TD> - Sets the restart parameter
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Allowed values are in the range [0.1,1.0]. The default is 0.6.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSLOBPCGGetRestart.html#EPSLOBPCGGetRestart">EPSLOBPCGGetRestart</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/impls/cg/lobpcg/lobpcg.c.html#EPSLOBPCGSetRestart">src/eps/impls/cg/lobpcg/lobpcg.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSLanczosGetReorthog.html b/docs/manualpages/EPS/EPSLanczosGetReorthog.html
index 4a9cb2c..9c28736 100644
--- a/docs/manualpages/EPS/EPSLanczosGetReorthog.html
+++ b/docs/manualpages/EPS/EPSLanczosGetReorthog.html
@@ -6,25 +6,25 @@
 <TITLE>EPSLanczosGetReorthog</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLanczosGetReorthog.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLanczosGetReorthog.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLanczosGetReorthog</H1>
 Gets the type of reorthogonalization used during the Lanczos iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</A> *reorthog)
+PetscErrorCode EPSLanczosGetReorthog(EPS eps,EPSLanczosReorthogType *reorthog)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>reorthog </B> - the type of reorthogonalization
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reorthog </B></TD><TD> - the type of reorthogonalization
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSLanczosReorthogType.html b/docs/manualpages/EPS/EPSLanczosReorthogType.html
index 65095ca..87e904c 100644
--- a/docs/manualpages/EPS/EPSLanczosReorthogType.html
+++ b/docs/manualpages/EPS/EPSLanczosReorthogType.html
@@ -6,8 +6,8 @@
 <TITLE>EPSLanczosReorthogType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLanczosReorthogType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLanczosReorthogType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLanczosReorthogType</H1>
 determines the type of reorthogonalization used in the Lanczos method 
diff --git a/docs/manualpages/EPS/EPSLanczosSetReorthog.html b/docs/manualpages/EPS/EPSLanczosSetReorthog.html
index bfefd3c..caab335 100644
--- a/docs/manualpages/EPS/EPSLanczosSetReorthog.html
+++ b/docs/manualpages/EPS/EPSLanczosSetReorthog.html
@@ -6,29 +6,29 @@
 <TITLE>EPSLanczosSetReorthog</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSLanczosSetReorthog.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSLanczosSetReorthog.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSLanczosSetReorthog</H1>
 Sets the type of reorthogonalization used during the Lanczos iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</A> reorthog)
+PetscErrorCode EPSLanczosSetReorthog(EPS eps,EPSLanczosReorthogType reorthog)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reorthog </B></TD><TD> - the type of reorthogonalization
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reorthog </B></TD><TD> - the type of reorthogonalization
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_lanczos_reorthog </B> - Sets the reorthogonalization type (either 'local', 'selective',
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_lanczos_reorthog </B></TD><TD> - Sets the reorthogonalization type (either 'local', 'selective',
 'periodic', 'partial', 'full' or 'delayed')
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSMonitorAll.html b/docs/manualpages/EPS/EPSMonitorAll.html
index 9f907e7..d6c93f0 100644
--- a/docs/manualpages/EPS/EPSMonitorAll.html
+++ b/docs/manualpages/EPS/EPSMonitorAll.html
@@ -6,35 +6,35 @@
 <TITLE>EPSMonitorAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSMonitorAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSMonitorAll</H1>
 Print the current approximate values and error estimates at each iteration of the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSMonitorCancel.html b/docs/manualpages/EPS/EPSMonitorCancel.html
index a22a191..5978263 100644
--- a/docs/manualpages/EPS/EPSMonitorCancel.html
+++ b/docs/manualpages/EPS/EPSMonitorCancel.html
@@ -6,27 +6,27 @@
 <TITLE>EPSMonitorCancel</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSMonitorCancel</H1>
 Clears all monitors for an <A HREF="../EPS/EPS.html#EPS">EPS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSMonitorCancel(EPS eps)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_monitor_cancel </B> - Cancels all monitors that have been hardwired
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_cancel </B></TD><TD> - Cancels all monitors that have been hardwired
 into a code by calls to <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>(),
 but does not cancel those set via the options database.
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSMonitorConverged.html b/docs/manualpages/EPS/EPSMonitorConverged.html
index 749be59..ecb15a8 100644
--- a/docs/manualpages/EPS/EPSMonitorConverged.html
+++ b/docs/manualpages/EPS/EPSMonitorConverged.html
@@ -6,41 +6,37 @@
 <TITLE>EPSMonitorConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSMonitorConverged</H1>
 Print the approximate values and error estimates as they converge. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - monitor context
 </TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
-The monitor context must contain a struct with a PetscViewer and a
-PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
-<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSMonitorFirst.html b/docs/manualpages/EPS/EPSMonitorFirst.html
index ae9c6be..37b0c7a 100644
--- a/docs/manualpages/EPS/EPSMonitorFirst.html
+++ b/docs/manualpages/EPS/EPSMonitorFirst.html
@@ -6,35 +6,35 @@
 <TITLE>EPSMonitorFirst</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSMonitorFirst</H1>
 Print the first approximate value and error estimate at each iteration of the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSMonitorLGCreate.html b/docs/manualpages/EPS/EPSMonitorLGCreate.html
new file mode 100644
index 0000000..d4e8d67
--- /dev/null
+++ b/docs/manualpages/EPS/EPSMonitorLGCreate.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSMonitorLGCreate.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSMonitorLGCreate</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorLGCreate.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSMonitorLGCreate</H1>
+Creates a line graph context for use with <A HREF="../EPS/EPS.html#EPS">EPS</A> to monitor convergence. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+</PRE>
+Collective on MPI_Comm
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>host </B></TD><TD> - the X display to open, or null for the local machine
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>label </B></TD><TD> - the title to put in the title bar
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x, y </B></TD><TD> - the screen coordinates of the upper left coordinate of
+the window
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m, n </B></TD><TD> - the screen width and height in pixels
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lgctx </B></TD><TD> - the drawing context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_lg </B></TD><TD> - Sets line graph monitor for the first residual
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_lg_all </B></TD><TD> - Sets line graph monitor for all residuals
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Use PetscDrawLGDestroy() to destroy this line graph.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsmon.c.html#EPSMonitorLGCreate">src/eps/interface/epsmon.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSMonitorSet.html b/docs/manualpages/EPS/EPSMonitorSet.html
index fa8f4e9..3cff5a2 100644
--- a/docs/manualpages/EPS/EPSMonitorSet.html
+++ b/docs/manualpages/EPS/EPSMonitorSet.html
@@ -6,28 +6,28 @@
 <TITLE>EPSMonitorSet</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSMonitorSet.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorSet.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSMonitorSet</H1>
 Sets an ADDITIONAL function to be called at every iteration to monitor the error estimates for each requested eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscErrorCode (*monitor)(<A HREF="../EPS/EPS.html#EPS">EPS</A>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
+PetscErrorCode EPSMonitorSet(EPS eps,PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
 monitor routine (use NULL if no context is desired)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context (may be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of monitor</FONT></H3>
@@ -36,39 +36,39 @@ monitor routine (use NULL if no context is desired)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - relative error estimates for each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - relative error estimates for each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor        </B></TD><TD> - print only the first error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor        </B></TD><TD> - print only the first error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_all    </B></TD><TD> - print error estimates at each iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_all    </B></TD><TD> - print error estimates at each iteration
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_conv   </B></TD><TD> - print the eigenvalue approximations only when
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_conv   </B></TD><TD> - print the eigenvalue approximations only when
 convergence has been reached
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
 approximate eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
 approximate eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
 a code by calls to <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>(), but does not cancel those set via
 the options database.
 </TD></TR></TABLE>
diff --git a/docs/manualpages/EPS/EPSMonitorSetFromOptions.html b/docs/manualpages/EPS/EPSMonitorSetFromOptions.html
new file mode 100644
index 0000000..fdfee5d
--- /dev/null
+++ b/docs/manualpages/EPS/EPSMonitorSetFromOptions.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+</PRE>
+Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps      </B></TD><TD> - the eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a PetscViewerAndFormat
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether this monitor tracks all eigenvalues or not
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</A>(), <A HREF="../EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</A>(), <A HREF="../EPS/EPSConvMonitorSetFromOptions.html#EPSConvMonitorSetFromOptions">EPSConvMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSMonitorSetFromOptions">src/eps/interface/epsopts.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html b/docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html
index 8308692..21e119d 100644
--- a/docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html
+++ b/docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html
@@ -6,25 +6,25 @@
 <TITLE>EPSPRIMMEGetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPRIMMEGetBlockSize</H1>
 Get the maximum block size the code will try to use. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *bs)
+PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,PetscInt *bs)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bs </B> - returned block size
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - returned block size
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSPRIMMEGetMethod.html b/docs/manualpages/EPS/EPSPRIMMEGetMethod.html
index 725f96c..2d41dd7 100644
--- a/docs/manualpages/EPS/EPSPRIMMEGetMethod.html
+++ b/docs/manualpages/EPS/EPSPRIMMEGetMethod.html
@@ -6,31 +6,25 @@
 <TITLE>EPSPRIMMEGetMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPRIMMEGetMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPRIMMEGetMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPRIMMEGetMethod</H1>
 Gets the method for the PRIMME library. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</A> *method)
+PetscErrorCode EPSPRIMMEGetMethod(EPS eps,EPSPRIMMEMethod *method)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>method </B> - method that will be used by PRIMME, one of
-EPS_PRIMME_DYNAMIC, EPS_PRIMME_DEFAULT_MIN_TIME(EPS_PRIMME_JDQMR_ETOL),
-EPS_PRIMME_DEFAULT_MIN_MATVECS(EPS_PRIMME_GD_OLSEN_PLUSK), EPS_PRIMME_ARNOLDI,
-EPS_PRIMME_GD, EPS_PRIMME_GD_PLUSK, EPS_PRIMME_GD_OLSEN_PLUSK,
-EPS_PRIMME_JD_OLSEN_PLUSK, EPS_PRIMME_RQI, EPS_PRIMME_JDQR, EPS_PRIMME_JDQMR,
-EPS_PRIMME_JDQMR_ETOL, EPS_PRIMME_SUBSPACE_ITERATION,
-EPS_PRIMME_LOBPCG_ORTHOBASIS, EPS_PRIMME_LOBPCG_ORTHOBASISW
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>method </B></TD><TD> - method that will be used by PRIMME
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSPRIMMEMethod.html b/docs/manualpages/EPS/EPSPRIMMEMethod.html
index 93f9602..c13bbdd 100644
--- a/docs/manualpages/EPS/EPSPRIMMEMethod.html
+++ b/docs/manualpages/EPS/EPSPRIMMEMethod.html
@@ -6,8 +6,8 @@
 <TITLE>EPSPRIMMEMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPRIMMEMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPRIMMEMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPRIMMEMethod</H1>
 determines the method selected in the PRIMME library 
diff --git a/docs/manualpages/EPS/EPSPRIMMESetBlockSize.html b/docs/manualpages/EPS/EPSPRIMMESetBlockSize.html
index b1503be..6e6dcc5 100644
--- a/docs/manualpages/EPS/EPSPRIMMESetBlockSize.html
+++ b/docs/manualpages/EPS/EPSPRIMMESetBlockSize.html
@@ -6,33 +6,38 @@
 <TITLE>EPSPRIMMESetBlockSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPRIMMESetBlockSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPRIMMESetBlockSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPRIMMESetBlockSize</H1>
-The maximum block size the code will try to use. The user should set this based on the architecture specifics of the target computer, as well as any a priori knowledge of multiplicities. The code does NOT require BlockSize > 1 to find multiple eigenvalues.  For some methods, keeping BlockSize = 1 yields the best overall performance. 
+The maximum block size that PRIMME will try to use. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt bs)
+PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,PetscInt bs)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD> - block size
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_primme_block_size </B> - Sets the max allowed block size value
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_primme_block_size </B></TD><TD> - Sets the max allowed block size value
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If the block size is not set, the value established by primme_initialize
 is used.
 <P>
+The user should set the block size based on the architecture specifics
+of the target computer, as well as any a priori knowledge of multiplicities.
+The code does NOT require bs > 1 to find multiple eigenvalues. For some
+methods, keeping bs = 1 yields the best overall performance.
+<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSPRIMMESetMethod.html b/docs/manualpages/EPS/EPSPRIMMESetMethod.html
index b210647..0b6bcda 100644
--- a/docs/manualpages/EPS/EPSPRIMMESetMethod.html
+++ b/docs/manualpages/EPS/EPSPRIMMESetMethod.html
@@ -6,37 +6,28 @@
 <TITLE>EPSPRIMMESetMethod</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPRIMMESetMethod.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPRIMMESetMethod.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPRIMMESetMethod</H1>
 Sets the method for the PRIMME library. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</A> method)
+PetscErrorCode EPSPRIMMESetMethod(EPS eps,EPSPRIMMEMethod method)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>method </B></TD><TD> - method that will be used by PRIMME. It must be one of:
-EPS_PRIMME_DYNAMIC, EPS_PRIMME_DEFAULT_MIN_TIME(EPS_PRIMME_JDQMR_ETOL),
-EPS_PRIMME_DEFAULT_MIN_MATVECS(EPS_PRIMME_GD_OLSEN_PLUSK), EPS_PRIMME_ARNOLDI,
-EPS_PRIMME_GD, EPS_PRIMME_GD_PLUSK, EPS_PRIMME_GD_OLSEN_PLUSK,
-EPS_PRIMME_JD_OLSEN_PLUSK, EPS_PRIMME_RQI, EPS_PRIMME_JDQR, EPS_PRIMME_JDQMR,
-EPS_PRIMME_JDQMR_ETOL, EPS_PRIMME_SUBSPACE_ITERATION,
-EPS_PRIMME_LOBPCG_ORTHOBASIS, EPS_PRIMME_LOBPCG_ORTHOBASISW
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>method </B></TD><TD> - method that will be used by PRIMME
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_primme_method </B> - Sets the method for the PRIMME library (one of 
-'dynamic', 'default_min_time', 'default_min_matvecs', 'arnoldi',
-'gd', 'gd_plusk', 'gd_olsen_plusk', 'jd_olsen_plusk', 'rqi', 'jdqr', 'jdqmr',
-'jdqmr_etol', 'subspace_iteration', 'lobpcg_orthobasis', 'lobpcg_orthobasisw').
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_primme_method </B></TD><TD> - Sets the method for the PRIMME library
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If not set, the method defaults to EPS_PRIMME_DEFAULT_MIN_TIME.
diff --git a/docs/manualpages/EPS/EPSPowerGetShiftType.html b/docs/manualpages/EPS/EPSPowerGetShiftType.html
index 44fca49..b9d692f 100644
--- a/docs/manualpages/EPS/EPSPowerGetShiftType.html
+++ b/docs/manualpages/EPS/EPSPowerGetShiftType.html
@@ -6,25 +6,25 @@
 <TITLE>EPSPowerGetShiftType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPowerGetShiftType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPowerGetShiftType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPowerGetShiftType</H1>
 Gets the type of shifts used during the power iteration. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</A> *shift)
+PetscErrorCode EPSPowerGetShiftType(EPS eps,EPSPowerShiftType *shift)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>shift </B> - the type of shift
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shift </B></TD><TD> - the type of shift
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSPowerSetShiftType.html b/docs/manualpages/EPS/EPSPowerSetShiftType.html
index a36d8e6..479e8ab 100644
--- a/docs/manualpages/EPS/EPSPowerSetShiftType.html
+++ b/docs/manualpages/EPS/EPSPowerSetShiftType.html
@@ -6,29 +6,29 @@
 <TITLE>EPSPowerSetShiftType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPowerSetShiftType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPowerSetShiftType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPowerSetShiftType</H1>
 Sets the type of shifts used during the power iteration. This can be used to emulate the Rayleigh Quotient Iteration (RQI) method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</A> shift)
+PetscErrorCode EPSPowerSetShiftType(EPS eps,EPSPowerShiftType shift)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shift </B></TD><TD> - the type of shift
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shift </B></TD><TD> - the type of shift
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_power_shift_type </B> - Sets the shift type (either 'constant' or
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_power_shift_type </B></TD><TD> - Sets the shift type (either 'constant' or
 'rayleigh' or 'wilkinson')
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default, shifts are constant (EPS_POWER_SHIFT_CONSTANT) and the iteration
diff --git a/docs/manualpages/EPS/EPSPowerShiftType.html b/docs/manualpages/EPS/EPSPowerShiftType.html
index 2368a7d..f1c57b7 100644
--- a/docs/manualpages/EPS/EPSPowerShiftType.html
+++ b/docs/manualpages/EPS/EPSPowerShiftType.html
@@ -6,8 +6,8 @@
 <TITLE>EPSPowerShiftType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSPowerShiftType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSPowerShiftType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSPowerShiftType</H1>
 determines the type of shift used in the Power iteration 
diff --git a/docs/manualpages/EPS/EPSProblemType.html b/docs/manualpages/EPS/EPSProblemType.html
index d47eed0..fbd1530 100644
--- a/docs/manualpages/EPS/EPSProblemType.html
+++ b/docs/manualpages/EPS/EPSProblemType.html
@@ -6,8 +6,8 @@
 <TITLE>EPSProblemType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSProblemType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSProblemType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSProblemType</H1>
 Determines the type of eigenvalue problem 
diff --git a/docs/manualpages/EPS/EPSRQCGGetReset.html b/docs/manualpages/EPS/EPSRQCGGetReset.html
index 069204a..b153848 100644
--- a/docs/manualpages/EPS/EPSRQCGGetReset.html
+++ b/docs/manualpages/EPS/EPSRQCGGetReset.html
@@ -6,25 +6,25 @@
 <TITLE>EPSRQCGGetReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSRQCGGetReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSRQCGGetReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSRQCGGetReset</H1>
 Gets the reset parameter used in the RQCG method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt *nrest)
+PetscErrorCode EPSRQCGGetReset(EPS eps,PetscInt *nrest)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nrest </B> - the reset parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nrest </B></TD><TD> - the reset parameter
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSRQCGSetReset.html b/docs/manualpages/EPS/EPSRQCGSetReset.html
index 0086251..959fa3d 100644
--- a/docs/manualpages/EPS/EPSRQCGSetReset.html
+++ b/docs/manualpages/EPS/EPSRQCGSetReset.html
@@ -6,28 +6,28 @@
 <TITLE>EPSRQCGSetReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSRQCGSetReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSRQCGSetReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSRQCGSetReset</H1>
 Sets the reset parameter of the RQCG iteration. Every nrest iterations, the solver performs a Rayleigh-Ritz projection step. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt nrest)
+PetscErrorCode EPSRQCGSetReset(EPS eps,PetscInt nrest)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nrest </B></TD><TD> - the number of iterations between resets
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nrest </B></TD><TD> - the number of iterations between resets
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_rqcg_reset </B> - Sets the reset parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_rqcg_reset </B></TD><TD> - Sets the reset parameter
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSReasonView.html b/docs/manualpages/EPS/EPSReasonView.html
index ee345eb..cc3ee5e 100644
--- a/docs/manualpages/EPS/EPSReasonView.html
+++ b/docs/manualpages/EPS/EPSReasonView.html
@@ -6,28 +6,28 @@
 <TITLE>EPSReasonView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSReasonView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSReasonView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSReasonView</H1>
 Displays the reason an <A HREF="../EPS/EPS.html#EPS">EPS</A> solve converged or diverged. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscViewer viewer)
+PetscErrorCode EPSReasonView(EPS eps,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-eps_converged_reason </B> - print reason for convergence, and number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSReasonViewFromOptions.html b/docs/manualpages/EPS/EPSReasonViewFromOptions.html
index 8bf606e..363bb74 100644
--- a/docs/manualpages/EPS/EPSReasonViewFromOptions.html
+++ b/docs/manualpages/EPS/EPSReasonViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>EPSReasonViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSReasonViewFromOptions</H1>
 Processes command line options to determine if/how the <A HREF="../EPS/EPS.html#EPS">EPS</A> converged reason is to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSReasonViewFromOptions(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsview.c.html#EPSReasonViewFromOptions">src/eps/interface/epsview.c</A>
diff --git a/docs/manualpages/EPS/EPSRegister.html b/docs/manualpages/EPS/EPSRegister.html
index a75f726..4888e82 100644
--- a/docs/manualpages/EPS/EPSRegister.html
+++ b/docs/manualpages/EPS/EPSRegister.html
@@ -6,23 +6,23 @@
 <TITLE>EPSRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSRegister</H1>
 Adds a method to the eigenproblem solver package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSRegister.html#EPSRegister">EPSRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../EPS/EPS.html#EPS">EPS</A>))
+PetscErrorCode EPSRegister(const char *name,PetscErrorCode (*function)(EPS))
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSRegisterAll.html b/docs/manualpages/EPS/EPSRegisterAll.html
index 981cc72..e6d3e1b 100644
--- a/docs/manualpages/EPS/EPSRegisterAll.html
+++ b/docs/manualpages/EPS/EPSRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>EPSRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSRegisterAll</H1>
 Registers all the eigenvalue solvers in the <A HREF="../EPS/EPS.html#EPS">EPS</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSRegisterAll.html#EPSRegisterAll">EPSRegisterAll</A>(void)
+PetscErrorCode EPSRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/EPS/EPSReset.html b/docs/manualpages/EPS/EPSReset.html
index cf1cfee..1e996b4 100644
--- a/docs/manualpages/EPS/EPSReset.html
+++ b/docs/manualpages/EPS/EPSReset.html
@@ -6,21 +6,21 @@
 <TITLE>EPSReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSReset</H1>
 Resets the <A HREF="../EPS/EPS.html#EPS">EPS</A> context to the initial state and removes any allocated objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSReset.html#EPSReset">EPSReset</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSReset(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSSetArbitrarySelection.html b/docs/manualpages/EPS/EPSSetArbitrarySelection.html
index 5abcde8..f88d8c8 100644
--- a/docs/manualpages/EPS/EPSSetArbitrarySelection.html
+++ b/docs/manualpages/EPS/EPSSetArbitrarySelection.html
@@ -6,25 +6,25 @@
 <TITLE>EPSSetArbitrarySelection</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetArbitrarySelection.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetArbitrarySelection.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetArbitrarySelection</H1>
 Specifies a function intended to look for eigenvalues according to an arbitrary selection criterion. This criterion can be based on a computation involving the current eigenvector approximation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)
+PetscErrorCode EPSSetArbitrarySelection(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the evaluation function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the evaluation function
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the evaluation function)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the evaluation function)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
@@ -33,19 +33,19 @@ Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>er     </B></TD><TD> - real part of the current eigenvalue approximation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>er     </B></TD><TD> - real part of the current eigenvalue approximation
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ei     </B></TD><TD> - imaginary part of the current eigenvalue approximation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ei     </B></TD><TD> - imaginary part of the current eigenvalue approximation
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xr     </B></TD><TD> - real part of the current eigenvector approximation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xr     </B></TD><TD> - real part of the current eigenvector approximation
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xi     </B></TD><TD> - imaginary part of the current eigenvector approximation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xi     </B></TD><TD> - imaginary part of the current eigenvector approximation
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rr     </B></TD><TD> - result of evaluation (real part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rr     </B></TD><TD> - result of evaluation (real part)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ri     </B></TD><TD> - result of evaluation (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ri     </B></TD><TD> - result of evaluation (imaginary part)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetBV.html b/docs/manualpages/EPS/EPSSetBV.html
index eac83d2..864b874 100644
--- a/docs/manualpages/EPS/EPSSetBV.html
+++ b/docs/manualpages/EPS/EPSSetBV.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetBV</H1>
 Associates a basis vectors object to the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../BV/BV.html#BV">BV</A> V)
+PetscErrorCode EPSSetBV(EPS eps,BV V)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V   </B></TD><TD> - the basis vectors object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V   </B></TD><TD> - the basis vectors object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetBalance.html b/docs/manualpages/EPS/EPSSetBalance.html
index c2ffb6c..4c6113f 100644
--- a/docs/manualpages/EPS/EPSSetBalance.html
+++ b/docs/manualpages/EPS/EPSSetBalance.html
@@ -6,38 +6,38 @@
 <TITLE>EPSSetBalance</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetBalance.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetBalance.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetBalance</H1>
 Specifies the balancing technique to be employed by the eigensolver, and some parameters associated to it. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSBalance.html#EPSBalance">EPSBalance</A> bal,PetscInt its,PetscReal cutoff)
+PetscErrorCode EPSSetBalance(EPS eps,EPSBalance bal,PetscInt its,PetscReal cutoff)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bal    </B></TD><TD> - the balancing method, one of EPS_BALANCE_NONE, EPS_BALANCE_ONESIDE,
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bal    </B></TD><TD> - the balancing method, one of EPS_BALANCE_NONE, EPS_BALANCE_ONESIDE,
 EPS_BALANCE_TWOSIDE, or EPS_BALANCE_USER
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the balancing algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the balancing algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cutoff </B></TD><TD> - cutoff value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cutoff </B></TD><TD> - cutoff value
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance <method> </B></TD><TD> - the balancing method, where <method> is one of
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance <method> </B></TD><TD> - the balancing method, where <method> is one of
 'none', 'oneside', 'twoside', or 'user'
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance_its <its> </B></TD><TD> - number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance_its <its> </B></TD><TD> - number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance_cutoff <cutoff> </B></TD><TD> - cutoff value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance_cutoff <cutoff> </B></TD><TD> - cutoff value
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetConvergenceTest.html b/docs/manualpages/EPS/EPSSetConvergenceTest.html
index d4f9ab4..c125a53 100644
--- a/docs/manualpages/EPS/EPSSetConvergenceTest.html
+++ b/docs/manualpages/EPS/EPSSetConvergenceTest.html
@@ -6,52 +6,52 @@
 <TITLE>EPSSetConvergenceTest</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetConvergenceTest</H1>
 Specifies how to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSConv.html#EPSConv">EPSConv</A> conv)
+PetscErrorCode EPSSetConvergenceTest(EPS eps,EPSConv conv)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv </B></TD><TD> - the type of convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv </B></TD><TD> - the type of convergence test
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_abs  </B></TD><TD> - Sets the absolute convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_abs  </B></TD><TD> - Sets the absolute convergence test
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_eig  </B></TD><TD> - Sets the convergence test relative to the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_rel  </B></TD><TD> - Sets the convergence test relative to the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_norm </B></TD><TD> - Sets the convergence test relative to the matrix norms
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_norm </B></TD><TD> - Sets the convergence test relative to the matrix norms
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_user </B></TD><TD> - Selects the user-defined convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_conv_user </B></TD><TD> - Selects the user-defined convergence test
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The parameter 'conv' can have one of these values
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_ABS  </B></TD><TD> - absolute error ||r||
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_ABS  </B></TD><TD> - absolute error ||r||
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_EIG  </B></TD><TD> - error relative to the eigenvalue l, ||r||/|l|
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_REL  </B></TD><TD> - error relative to the eigenvalue l, ||r||/|l|
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_NORM </B></TD><TD> - error relative to the matrix norms, ||r||/(||A||+|l|*||B||)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_NORM </B></TD><TD> - error relative to the matrix norms, ||r||/(||A||+|l|*||B||)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_USER </B></TD><TD> - function set by <A HREF="../EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_CONV_USER </B></TD><TD> - function set by <A HREF="../EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</A>()
 </TD></TR></TABLE>
 <P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</A>(), <A HREF="../EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</A>(), <A HREF="../EPS/EPSConv.html#EPSConv">EPSConv</A>
+ <A HREF="../EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</A>(), <A HREF="../EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</A>(), <A HREF="../EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</A>(), <A HREF="../EPS/EPSConv.html#EPSConv">EPSConv</A>
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSSetConvergenceTest">src/eps/interface/epsopts.c</A>
 <BR><A HREF="./index.html">Index of all EPS routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/EPS/EPSSetConvergenceTestFunction.html b/docs/manualpages/EPS/EPSSetConvergenceTestFunction.html
index fb40a38..4668fc5 100644
--- a/docs/manualpages/EPS/EPSSetConvergenceTestFunction.html
+++ b/docs/manualpages/EPS/EPSSetConvergenceTestFunction.html
@@ -6,28 +6,27 @@
 <TITLE>EPSSetConvergenceTestFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetConvergenceTestFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetConvergenceTestFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetConvergenceTestFunction</H1>
 Sets a function to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscErrorCode (*func)(<A HREF="../EPS/EPS.html#EPS">EPS</A>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+PetscErrorCode EPSSetConvergenceTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - [optional] context for private data for the convergence routine
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the convergence routine (may be null)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - [optional] destructor for the context (may be NULL;
-PETSC_NULL_FUNCTION in Fortran)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
@@ -36,17 +35,17 @@ PETSC_NULL_FUNCTION in Fortran)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - residual norm associated to the eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - residual norm associated to the eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - (output) computed error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - (output) computed error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetDS.html b/docs/manualpages/EPS/EPSSetDS.html
index 3680a9f..f13248d 100644
--- a/docs/manualpages/EPS/EPSSetDS.html
+++ b/docs/manualpages/EPS/EPSSetDS.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetDS</H1>
 Associates a direct solver object to the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode EPSSetDS(EPS eps,DS ds)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetDeflationSpace.html b/docs/manualpages/EPS/EPSSetDeflationSpace.html
index 225d346..0fea0d5 100644
--- a/docs/manualpages/EPS/EPSSetDeflationSpace.html
+++ b/docs/manualpages/EPS/EPSSetDeflationSpace.html
@@ -6,25 +6,25 @@
 <TITLE>EPSSetDeflationSpace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetDeflationSpace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetDeflationSpace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetDeflationSpace</H1>
 Specify a basis of vectors that constitute the deflation space. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt n,Vec *v)
+PetscErrorCode EPSSetDeflationSpace(EPS eps,PetscInt n,Vec *v)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - number of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - number of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v   </B></TD><TD> - set of basis vectors of the deflation space
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v   </B></TD><TD> - set of basis vectors of the deflation space
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetDimensions.html b/docs/manualpages/EPS/EPSSetDimensions.html
index d71a258..61d69a4 100644
--- a/docs/manualpages/EPS/EPSSetDimensions.html
+++ b/docs/manualpages/EPS/EPSSetDimensions.html
@@ -6,36 +6,36 @@
 <TITLE>EPSSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetDimensions</H1>
 Sets the number of eigenvalues to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
+PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -63,4 +63,6 @@ parameters lose relevance, and tuning must be done with
 <BR><A HREF="./index.html">Index of all EPS routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetEigenvalueComparison.html b/docs/manualpages/EPS/EPSSetEigenvalueComparison.html
index a80af9b..d76143a 100644
--- a/docs/manualpages/EPS/EPSSetEigenvalueComparison.html
+++ b/docs/manualpages/EPS/EPSSetEigenvalueComparison.html
@@ -6,25 +6,25 @@
 <TITLE>EPSSetEigenvalueComparison</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetEigenvalueComparison.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetEigenvalueComparison.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetEigenvalueComparison</H1>
 Specifies the eigenvalue comparison function when <A HREF="../EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</A>() is set to EPS_WHICH_USER. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
+PetscErrorCode EPSSetEigenvalueComparison(EPS eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the comparison function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the comparison function
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the comparison function)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the comparison function)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
@@ -33,27 +33,27 @@ Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar     </B></TD><TD> - real part of the 1st eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar     </B></TD><TD> - real part of the 1st eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai     </B></TD><TD> - imaginary part of the 1st eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai     </B></TD><TD> - imaginary part of the 1st eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br     </B></TD><TD> - real part of the 2nd eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br     </B></TD><TD> - real part of the 2nd eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi     </B></TD><TD> - imaginary part of the 2nd eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi     </B></TD><TD> - imaginary part of the 2nd eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - result of comparison
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - result of comparison
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 <H3><FONT COLOR="#883300">The returning parameter 'res' can be</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>negative </B></TD><TD> - if the 1st eigenvalue is preferred to the 2st one
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>negative </B></TD><TD> - if the 1st eigenvalue is preferred to the 2st one
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>zero     </B></TD><TD> - if both eigenvalues are equally preferred
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>zero     </B></TD><TD> - if both eigenvalues are equally preferred
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>positive </B></TD><TD> - if the 2st eigenvalue is preferred to the 1st one
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>positive </B></TD><TD> - if the 2st eigenvalue is preferred to the 1st one
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSSetExtraction.html b/docs/manualpages/EPS/EPSSetExtraction.html
index 1465bc6..d4ca22b 100644
--- a/docs/manualpages/EPS/EPSSetExtraction.html
+++ b/docs/manualpages/EPS/EPSSetExtraction.html
@@ -6,41 +6,41 @@
 <TITLE>EPSSetExtraction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetExtraction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetExtraction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetExtraction</H1>
 Specifies the type of extraction technique to be employed by the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</A> extr)
+PetscErrorCode EPSSetExtraction(EPS eps,EPSExtraction extr)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extr </B></TD><TD> - a known type of extraction
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extr </B></TD><TD> - a known type of extraction
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ritz </B></TD><TD> - Rayleigh-Ritz extraction
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_ritz </B></TD><TD> - Rayleigh-Ritz extraction
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic </B></TD><TD> - harmonic Ritz extraction
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic </B></TD><TD> - harmonic Ritz extraction
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic_relative </B></TD><TD> - harmonic Ritz extraction relative to the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic_relative </B></TD><TD> - harmonic Ritz extraction relative to the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic_right </B></TD><TD> - harmonic Ritz extraction for rightmost eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic_right </B></TD><TD> - harmonic Ritz extraction for rightmost eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic_largest </B></TD><TD> - harmonic Ritz extraction for largest magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_harmonic_largest </B></TD><TD> - harmonic Ritz extraction for largest magnitude
 (without target)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_refined </B></TD><TD> - refined Ritz extraction
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_refined </B></TD><TD> - refined Ritz extraction
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_refined_harmonic </B></TD><TD> - refined harmonic Ritz extraction
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_refined_harmonic </B></TD><TD> - refined harmonic Ritz extraction
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetFromOptions.html b/docs/manualpages/EPS/EPSSetFromOptions.html
index 0f34aef..7c19b37 100644
--- a/docs/manualpages/EPS/EPSSetFromOptions.html
+++ b/docs/manualpages/EPS/EPSSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>EPSSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetFromOptions</H1>
 Sets <A HREF="../EPS/EPS.html#EPS">EPS</A> options from the options database. This routine must be called before <A HREF="../EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</A>() if the user is to be allowed to set the solver type. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSSetFromOptions(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
diff --git a/docs/manualpages/EPS/EPSSetInitialSpace.html b/docs/manualpages/EPS/EPSSetInitialSpace.html
index 4f670ce..18b3faf 100644
--- a/docs/manualpages/EPS/EPSSetInitialSpace.html
+++ b/docs/manualpages/EPS/EPSSetInitialSpace.html
@@ -6,25 +6,25 @@
 <TITLE>EPSSetInitialSpace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetInitialSpace</H1>
 Specify a basis of vectors that constitute the initial space, that is, the subspace from which the solver starts to iterate. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt n,Vec *is)
+PetscErrorCode EPSSetInitialSpace(EPS eps,PetscInt n,Vec *is)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - number of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - number of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is  </B></TD><TD> - set of basis vectors of the initial space
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is  </B></TD><TD> - set of basis vectors of the initial space
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -51,6 +51,5 @@ of the wanted eigenspace. Then, convergence may be faster.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/eps/examples/tutorials/ex5.c.html">src/eps/examples/tutorials/ex5.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex7.c.html">src/eps/examples/tutorials/ex7.c.html</A><BR>
-<A HREF="../../../src/eps/examples/tutorials/ex18.c.html">src/eps/examples/tutorials/ex18.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetInterval.html b/docs/manualpages/EPS/EPSSetInterval.html
index 72c91b4..7e56d0e 100644
--- a/docs/manualpages/EPS/EPSSetInterval.html
+++ b/docs/manualpages/EPS/EPSSetInterval.html
@@ -6,30 +6,30 @@
 <TITLE>EPSSetInterval</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetInterval.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetInterval.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetInterval</H1>
 Defines the computational interval for spectrum slicing. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal inta,PetscReal intb)
+PetscErrorCode EPSSetInterval(EPS eps,PetscReal inta,PetscReal intb)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inta </B></TD><TD> - left end of the interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inta </B></TD><TD> - left end of the interval
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>intb </B></TD><TD> - right end of the interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>intb </B></TD><TD> - right end of the interval
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_interval <a,b> </B> - set [a,b] as the interval of interest
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_interval <a,b> </B></TD><TD> - set [a,b] as the interval of interest
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Spectrum slicing is a technique employed for computing all eigenvalues of
diff --git a/docs/manualpages/EPS/EPSSetOperators.html b/docs/manualpages/EPS/EPSSetOperators.html
index b913afc..75aca0f 100644
--- a/docs/manualpages/EPS/EPSSetOperators.html
+++ b/docs/manualpages/EPS/EPSSetOperators.html
@@ -6,25 +6,25 @@
 <TITLE>EPSSetOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetOperators</H1>
 Sets the matrices associated with the eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,Mat A,Mat B)
+PetscErrorCode EPSSetOperators(EPS eps,Mat A,Mat B)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the eigensystem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the eigensystem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the second matrix in the case of generalized eigenproblems
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the second matrix in the case of generalized eigenproblems
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetOptionsPrefix.html b/docs/manualpages/EPS/EPSSetOptionsPrefix.html
index 1faf677..1b3266c 100644
--- a/docs/manualpages/EPS/EPSSetOptionsPrefix.html
+++ b/docs/manualpages/EPS/EPSSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../EPS/EPS.html#EPS">EPS</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,const char *prefix)
+PetscErrorCode EPSSetOptionsPrefix(EPS eps,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../EPS/EPS.html#EPS">EPS</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../EPS/EPS.html#EPS">EPS</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetProblemType.html b/docs/manualpages/EPS/EPSSetProblemType.html
index 85148ac..e6d04fa 100644
--- a/docs/manualpages/EPS/EPSSetProblemType.html
+++ b/docs/manualpages/EPS/EPSSetProblemType.html
@@ -6,36 +6,36 @@
 <TITLE>EPSSetProblemType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetProblemType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetProblemType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetProblemType</H1>
 Specifies the type of the eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</A> type)
+PetscErrorCode EPSSetProblemType(EPS eps,EPSProblemType type)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps      </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps      </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known type of eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known type of eigenvalue problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_hermitian </B></TD><TD> - Hermitian eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_hermitian </B></TD><TD> - Hermitian eigenvalue problem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gen_hermitian </B></TD><TD> - generalized Hermitian eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gen_hermitian </B></TD><TD> - generalized Hermitian eigenvalue problem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_non_hermitian </B></TD><TD> - non-Hermitian eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_non_hermitian </B></TD><TD> - non-Hermitian eigenvalue problem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gen_non_hermitian </B></TD><TD> - generalized non-Hermitian eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_gen_non_hermitian </B></TD><TD> - generalized non-Hermitian eigenvalue problem
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_pos_gen_non_hermitian </B></TD><TD> - generalized non-Hermitian eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_pos_gen_non_hermitian </B></TD><TD> - generalized non-Hermitian eigenvalue problem
 with positive semi-definite B
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/EPS/EPSSetPurify.html b/docs/manualpages/EPS/EPSSetPurify.html
index 01f44c2..905e0e6 100644
--- a/docs/manualpages/EPS/EPSSetPurify.html
+++ b/docs/manualpages/EPS/EPSSetPurify.html
@@ -6,28 +6,28 @@
 <TITLE>EPSSetPurify</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetPurify.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetPurify.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetPurify</H1>
 Deactivate eigenvector purification (which is activated by default). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool purify)
+PetscErrorCode EPSSetPurify(EPS eps,PetscBool purify)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>purify </B></TD><TD> - whether purification is required or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>purify </B></TD><TD> - whether purification is required or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-eps_purify <boolean> </B> - Sets/resets the boolean flag 'purify'
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_purify <boolean> </B></TD><TD> - Sets/resets the boolean flag 'purify'
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default, eigenvectors of generalized symmetric eigenproblems are purified
diff --git a/docs/manualpages/EPS/EPSSetRG.html b/docs/manualpages/EPS/EPSSetRG.html
index 9b58581..01a8c77 100644
--- a/docs/manualpages/EPS/EPSSetRG.html
+++ b/docs/manualpages/EPS/EPSSetRG.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetRG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetRG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetRG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetRG</H1>
 Associates a region object to the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../RG/RG.html#RG">RG</A> rg)
+PetscErrorCode EPSSetRG(EPS eps,RG rg)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetST.html b/docs/manualpages/EPS/EPSSetST.html
index b801878..f15c520 100644
--- a/docs/manualpages/EPS/EPSSetST.html
+++ b/docs/manualpages/EPS/EPSSetST.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetST</H1>
 Associates a spectral transformation object to the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetST.html#EPSSetST">EPSSetST</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../ST/ST.html#ST">ST</A> st)
+PetscErrorCode EPSSetST(EPS eps,ST st)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetStoppingTest.html b/docs/manualpages/EPS/EPSSetStoppingTest.html
new file mode 100644
index 0000000..8e3c663
--- /dev/null
+++ b/docs/manualpages/EPS/EPSSetStoppingTest.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSSetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSSetStoppingTest</H1>
+Specifies how to decide the termination of the outer loop of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSSetStoppingTest(EPS eps,EPSStop stop)
+</PRE>
+Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_stop_basic </B></TD><TD> - Sets the default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_stop_user  </B></TD><TD> - Selects the user-defined stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The parameter 'stop' can have one of these values
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_STOP_BASIC </B></TD><TD> - default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_STOP_USER  </B></TD><TD> - function set by <A HREF="../EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSGetStoppingTest.html#EPSGetStoppingTest">EPSGetStoppingTest</A>(), <A HREF="../EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</A>(), <A HREF="../EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</A>(), <A HREF="../EPS/EPSStop.html#EPSStop">EPSStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSSetStoppingTest">src/eps/interface/epsopts.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetStoppingTestFunction.html b/docs/manualpages/EPS/EPSSetStoppingTestFunction.html
new file mode 100644
index 0000000..9bd1030
--- /dev/null
+++ b/docs/manualpages/EPS/EPSSetStoppingTestFunction.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetStoppingTestFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSSetStoppingTestFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetStoppingTestFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSSetStoppingTestFunction</H1>
+Sets a function to decide when to stop the outer iteration of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSSetStoppingTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+</PRE>
+Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - pointer to the stopping test function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the stopping routine (may be null)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<A HREF="../EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</A> *reason,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev    </B></TD><TD> - number of requested eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - (output) result of the stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+Normal usage is to first call the default routine <A HREF="../EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</A>() and then
+set reason to EPS_CONVERGED_USER if some user-defined conditions have been
+met. To let the eigensolver continue iterating, the result must be left as
+EPS_CONVERGED_ITERATING.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</A>(), <A HREF="../EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSSetStoppingTestFunction">src/eps/interface/epsopts.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex29.c.html">src/eps/examples/tutorials/ex29.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetTarget.html b/docs/manualpages/EPS/EPSSetTarget.html
index e0c5383..eb34e6f 100644
--- a/docs/manualpages/EPS/EPSSetTarget.html
+++ b/docs/manualpages/EPS/EPSSetTarget.html
@@ -6,28 +6,28 @@
 <TITLE>EPSSetTarget</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetTarget.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetTarget.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetTarget</H1>
 Sets the value of the target. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscScalar target)
+PetscErrorCode EPSSetTarget(EPS eps,PetscScalar target)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_target <scalar> </B> - the value of the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target <scalar> </B></TD><TD> - the value of the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The target is a scalar value used to determine the portion of the spectrum
@@ -47,4 +47,5 @@ command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/eps/examples/tutorials/ex13.c.html">src/eps/examples/tutorials/ex13.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetTolerances.html b/docs/manualpages/EPS/EPSSetTolerances.html
index 0f94331..ea79545 100644
--- a/docs/manualpages/EPS/EPSSetTolerances.html
+++ b/docs/manualpages/EPS/EPSSetTolerances.html
@@ -6,32 +6,32 @@
 <TITLE>EPSSetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetTolerances</H1>
 Sets the tolerance and maximum iteration count used by the <A HREF="../EPS/EPS.html#EPS">EPS</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscReal tol,PetscInt maxits)
+PetscErrorCode EPSSetTolerances(EPS eps,PetscReal tol,PetscInt maxits)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_tol <tol> </B></TD><TD> - Sets the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_tol <tol> </B></TD><TD> - Sets the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -47,4 +47,5 @@ Use PETSC_DEFAULT for either argument to assign a reasonably good value.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetTrackAll.html b/docs/manualpages/EPS/EPSSetTrackAll.html
index 2bc0616..4566bdd 100644
--- a/docs/manualpages/EPS/EPSSetTrackAll.html
+++ b/docs/manualpages/EPS/EPSSetTrackAll.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetTrackAll</H1>
 Specifies if the solver must compute the residual norm of all approximate eigenpairs or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool trackall)
+PetscErrorCode EPSSetTrackAll(EPS eps,PetscBool trackall)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps      </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps      </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether to compute all residuals or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether to compute all residuals or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSetTrueResidual.html b/docs/manualpages/EPS/EPSSetTrueResidual.html
index 7caac95..8f4963e 100644
--- a/docs/manualpages/EPS/EPSSetTrueResidual.html
+++ b/docs/manualpages/EPS/EPSSetTrueResidual.html
@@ -6,28 +6,28 @@
 <TITLE>EPSSetTrueResidual</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetTrueResidual.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetTrueResidual.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetTrueResidual</H1>
 Specifies if the solver must compute the true residual explicitly or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscBool trueres)
+PetscErrorCode EPSSetTrueResidual(EPS eps,PetscBool trueres)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps     </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trueres </B></TD><TD> - whether true residuals are required or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trueres </B></TD><TD> - whether true residuals are required or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-eps_true_residual <boolean> </B> - Sets/resets the boolean flag 'trueres'
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_true_residual <boolean> </B></TD><TD> - Sets/resets the boolean flag 'trueres'
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 If the user sets trueres=PETSC_TRUE then the solver explicitly computes
diff --git a/docs/manualpages/EPS/EPSSetType.html b/docs/manualpages/EPS/EPSSetType.html
index de4c6b5..e4d2615 100644
--- a/docs/manualpages/EPS/EPSSetType.html
+++ b/docs/manualpages/EPS/EPSSetType.html
@@ -6,29 +6,29 @@
 <TITLE>EPSSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetType</H1>
 Selects the particular solver to be used in the <A HREF="../EPS/EPS.html#EPS">EPS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetType.html#EPSSetType">EPSSetType</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSType.html#EPSType">EPSType</A> type)
+PetscErrorCode EPSSetType(EPS eps,EPSType type)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps  </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known method
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_type <method> </B> - Sets the method; use -help for a list
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_type <method> </B></TD><TD> - Sets the method; use -help for a list
 of available methods
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See "slepc/include/slepceps.h" for available methods. The default
diff --git a/docs/manualpages/EPS/EPSSetUp.html b/docs/manualpages/EPS/EPSSetUp.html
index 702ba75..f8b4a10 100644
--- a/docs/manualpages/EPS/EPSSetUp.html
+++ b/docs/manualpages/EPS/EPSSetUp.html
@@ -6,21 +6,21 @@
 <TITLE>EPSSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetUp</H1>
 Sets up all the internal data structures necessary for the execution of the eigensolver. Then calls <A HREF="../ST/STSetUp.html#STSetUp">STSetUp</A>() for any set-up operations associated to the <A HREF="../ST/ST.html#ST">ST</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSSetUp(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps   </B> - eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function need not be called explicitly in most cases, since <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>()
diff --git a/docs/manualpages/EPS/EPSSetWhichEigenpairs.html b/docs/manualpages/EPS/EPSSetWhichEigenpairs.html
index bda7ef8..98874dd 100644
--- a/docs/manualpages/EPS/EPSSetWhichEigenpairs.html
+++ b/docs/manualpages/EPS/EPSSetWhichEigenpairs.html
@@ -6,73 +6,73 @@
 <TITLE>EPSSetWhichEigenpairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetWhichEigenpairs</H1>
 Specifies which portion of the spectrum is to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSWhich.html#EPSWhich">EPSWhich</A> which)
+PetscErrorCode EPSSetWhichEigenpairs(EPS eps,EPSWhich which)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps   </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values</FONT></H3>
 The parameter 'which' can have one of these values
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_LARGEST_MAGNITUDE </B></TD><TD> - largest eigenvalues in magnitude (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_LARGEST_MAGNITUDE </B></TD><TD> - largest eigenvalues in magnitude (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_SMALLEST_MAGNITUDE </B></TD><TD> - smallest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_SMALLEST_MAGNITUDE </B></TD><TD> - smallest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_LARGEST_REAL </B></TD><TD> - largest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_LARGEST_REAL </B></TD><TD> - largest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_SMALLEST_REAL </B></TD><TD> - smallest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_SMALLEST_REAL </B></TD><TD> - smallest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_LARGEST_IMAGINARY </B></TD><TD> - largest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_LARGEST_IMAGINARY </B></TD><TD> - largest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_SMALLEST_IMAGINARY </B></TD><TD> - smallest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_SMALLEST_IMAGINARY </B></TD><TD> - smallest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_TARGET_MAGNITUDE </B></TD><TD> - eigenvalues closest to the target (in magnitude)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_TARGET_MAGNITUDE </B></TD><TD> - eigenvalues closest to the target (in magnitude)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_TARGET_REAL </B></TD><TD> - eigenvalues with real part closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_TARGET_REAL </B></TD><TD> - eigenvalues with real part closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_TARGET_IMAGINARY </B></TD><TD> - eigenvalues with imaginary part closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_TARGET_IMAGINARY </B></TD><TD> - eigenvalues with imaginary part closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_ALL </B></TD><TD> - all eigenvalues contained in a given interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_ALL </B></TD><TD> - all eigenvalues contained in a given interval or region
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_WHICH_USER </B></TD><TD> - user defined ordering set with <A HREF="../EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>EPS_WHICH_USER </B></TD><TD> - user defined ordering set with <A HREF="../EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_largest_magnitude </B></TD><TD> - Sets largest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_largest_magnitude </B></TD><TD> - Sets largest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_smallest_magnitude </B></TD><TD> - Sets smallest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_smallest_magnitude </B></TD><TD> - Sets smallest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_largest_real </B></TD><TD> - Sets largest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_largest_real </B></TD><TD> - Sets largest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_smallest_real </B></TD><TD> - Sets smallest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_smallest_real </B></TD><TD> - Sets smallest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_largest_imaginary </B></TD><TD> - Sets largest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_largest_imaginary </B></TD><TD> - Sets largest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_smallest_imaginary </B></TD><TD> - Sets smallest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_smallest_imaginary </B></TD><TD> - Sets smallest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target_magnitude </B></TD><TD> - Sets eigenvalues closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target_magnitude </B></TD><TD> - Sets eigenvalues closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target_real </B></TD><TD> - Sets real parts closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target_real </B></TD><TD> - Sets real parts closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target_imaginary </B></TD><TD> - Sets imaginary parts closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_target_imaginary </B></TD><TD> - Sets imaginary parts closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_all </B></TD><TD> - Sets all eigenvalues in an interval
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_all </B></TD><TD> - Sets all eigenvalues in an interval or region
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -88,8 +88,9 @@ The criterion EPS_TARGET_IMAGINARY is available only in case PETSc and
 SLEPc have been built with complex scalars.
 <P>
 EPS_ALL is intended for use in combination with an interval (see
-<A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>()), when all eigenvalues within the interval are requested.
-In that case, the number of eigenvalues is unknown, so the nev parameter
+<A HREF="../EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</A>()), when all eigenvalues within the interval are requested,
+or in the context of the CISS solver for computing all eigenvalues in a region.
+In those cases, the number of eigenvalues is unknown, so the nev parameter
 has a different sense, see <A HREF="../EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</A>().
 <P>
 
@@ -110,4 +111,5 @@ has a different sense, see <A HREF="../EPS/EPSSetDimensions.html#EPSSetDimension
 <A HREF="../../../src/eps/examples/tutorials/ex19.c.html">src/eps/examples/tutorials/ex19.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex24.c.html">src/eps/examples/tutorials/ex24.c.html</A><BR>
 <A HREF="../../../src/eps/examples/tutorials/ex25.c.html">src/eps/examples/tutorials/ex25.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSSetWorkVecs.html b/docs/manualpages/EPS/EPSSetWorkVecs.html
index 30412a1..ea8cea0 100644
--- a/docs/manualpages/EPS/EPSSetWorkVecs.html
+++ b/docs/manualpages/EPS/EPSSetWorkVecs.html
@@ -6,23 +6,23 @@
 <TITLE>EPSSetWorkVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSetWorkVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSetWorkVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSetWorkVecs</H1>
 Sets a number of work vectors into an <A HREF="../EPS/EPS.html#EPS">EPS</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscInt nw)
+PetscErrorCode EPSSetWorkVecs(EPS eps,PetscInt nw)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw  </B></TD><TD> - number of work vectors to allocate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw  </B></TD><TD> - number of work vectors to allocate
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Developers Note</FONT></H3>
diff --git a/docs/manualpages/EPS/EPSSolve.html b/docs/manualpages/EPS/EPSSolve.html
index 8ac6024..534725e 100644
--- a/docs/manualpages/EPS/EPSSolve.html
+++ b/docs/manualpages/EPS/EPSSolve.html
@@ -6,41 +6,41 @@
 <TITLE>EPSSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSSolve</H1>
 Solves the eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSSolve(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>eps </B> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view </B></TD><TD> - print information about the solver used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view </B></TD><TD> - print information about the solver used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_mat0 binary </B></TD><TD> - save the first matrix (A) to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_mat0 binary </B></TD><TD> - save the first matrix (A) to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_mat1 binary </B></TD><TD> - save the second matrix (B) to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_mat1 binary </B></TD><TD> - save the second matrix (B) to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_vectors binary </B></TD><TD> - save the computed eigenvectors to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_vectors binary </B></TD><TD> - save the computed eigenvectors to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_values </B></TD><TD> - print computed eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_values </B></TD><TD> - print computed eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_relative </B></TD><TD> - print relative errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_relative </B></TD><TD> - print relative errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_backward </B></TD><TD> - print backward errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_error_backward </B></TD><TD> - print backward errors of each eigenpair
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/EPS/EPSStop.html b/docs/manualpages/EPS/EPSStop.html
new file mode 100644
index 0000000..77f01bf
--- /dev/null
+++ b/docs/manualpages/EPS/EPSStop.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSStop.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSStop</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSStop.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSStop</H1>
+Determines the stopping test 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { EPS_STOP_BASIC,
+               EPS_STOP_USER } <A HREF="../EPS/EPSStop.html#EPSStop">EPSStop</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</A>(), <A HREF="../EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/../../include/slepceps.h.html#EPSStop">src/eps/../../include/slepceps.h</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSStoppingBasic.html b/docs/manualpages/EPS/EPSStoppingBasic.html
new file mode 100644
index 0000000..74b62bb
--- /dev/null
+++ b/docs/manualpages/EPS/EPSStoppingBasic.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSStoppingBasic.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>EPSStoppingBasic</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSStoppingBasic.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>EPSStoppingBasic</H1>
+Default routine to determine whether the outer eigensolver iteration must be stopped. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepceps.h" 
+PetscErrorCode EPSStoppingBasic(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)
+</PRE>
+Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - eigensolver context obtained from <A HREF="../EPS/EPSCreate.html#EPSCreate">EPSCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev    </B></TD><TD> - number of requested eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - context (not used here)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - result of the stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+A positive value of reason indicates that the iteration has finished successfully
+(converged), and a negative value indicates an error condition (diverged). If
+the iteration needs to be continued, reason must be set to EPS_CONVERGED_ITERATING
+(zero).
+<P>
+<A HREF="../EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</A>() will stop if all requested eigenvalues are converged, or if
+the maximum number of iterations has been reached.
+<P>
+Use <A HREF="../EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</A>() to provide your own test instead of using this one.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</A>(), <A HREF="../EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</A>, <A HREF="../EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsdefault.c.html#EPSStoppingBasic">src/eps/interface/epsdefault.c</A>
+<BR><A HREF="./index.html">Index of all EPS routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex29.c.html">src/eps/examples/tutorials/ex29.c.html</A><BR>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
+</BODY></HTML>
diff --git a/docs/manualpages/EPS/EPSType.html b/docs/manualpages/EPS/EPSType.html
index 9261a90..f0a0a66 100644
--- a/docs/manualpages/EPS/EPSType.html
+++ b/docs/manualpages/EPS/EPSType.html
@@ -6,8 +6,8 @@
 <TITLE>EPSType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSType</H1>
 String with the name of a SLEPc eigensolver 
diff --git a/docs/manualpages/EPS/EPSValuesView.html b/docs/manualpages/EPS/EPSValuesView.html
index ef74f3c..0253a8e 100644
--- a/docs/manualpages/EPS/EPSValuesView.html
+++ b/docs/manualpages/EPS/EPSValuesView.html
@@ -6,28 +6,28 @@
 <TITLE>EPSValuesView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSValuesView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSValuesView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSValuesView</H1>
 Displays the computed eigenvalues in a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscViewer viewer)
+PetscErrorCode EPSValuesView(EPS eps,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_view_values </B> - print computed eigenvalues
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_values </B></TD><TD> - print computed eigenvalues
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/EPS/EPSValuesViewFromOptions.html b/docs/manualpages/EPS/EPSValuesViewFromOptions.html
index 3b53135..3747eca 100644
--- a/docs/manualpages/EPS/EPSValuesViewFromOptions.html
+++ b/docs/manualpages/EPS/EPSValuesViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>EPSValuesViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSValuesViewFromOptions</H1>
 Processes command line options to determine if/how the computed eigenvalues are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSValuesViewFromOptions(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsview.c.html#EPSValuesViewFromOptions">src/eps/interface/epsview.c</A>
diff --git a/docs/manualpages/EPS/EPSVectorsView.html b/docs/manualpages/EPS/EPSVectorsView.html
index 806a6fb..628532e 100644
--- a/docs/manualpages/EPS/EPSVectorsView.html
+++ b/docs/manualpages/EPS/EPSVectorsView.html
@@ -6,28 +6,28 @@
 <TITLE>EPSVectorsView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSVectorsView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSVectorsView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSVectorsView</H1>
 Outputs computed eigenvectors to a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscViewer viewer)
+PetscErrorCode EPSVectorsView(EPS eps,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-eps_view_vectors </B> - output eigenvectors.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view_vectors </B></TD><TD> - output eigenvectors.
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If PETSc was configured with real scalars, complex conjugate eigenvectors
diff --git a/docs/manualpages/EPS/EPSVectorsViewFromOptions.html b/docs/manualpages/EPS/EPSVectorsViewFromOptions.html
index 40e6226..8c6ca9d 100644
--- a/docs/manualpages/EPS/EPSVectorsViewFromOptions.html
+++ b/docs/manualpages/EPS/EPSVectorsViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>EPSVectorsViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSVectorsViewFromOptions</H1>
 Processes command line options to determine if/how the computed eigenvectors are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode EPSVectorsViewFromOptions(EPS eps)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>eps </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/eps/interface/epsview.c.html#EPSVectorsViewFromOptions">src/eps/interface/epsview.c</A>
diff --git a/docs/manualpages/EPS/EPSView.html b/docs/manualpages/EPS/EPSView.html
index 5fa758d..6900664 100644
--- a/docs/manualpages/EPS/EPSView.html
+++ b/docs/manualpages/EPS/EPSView.html
@@ -6,35 +6,35 @@
 <TITLE>EPSView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSView</H1>
 Prints the <A HREF="../EPS/EPS.html#EPS">EPS</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../EPS/EPSView.html#EPSView">EPSView</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,PetscViewer viewer)
+PetscErrorCode EPSView(EPS eps,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-eps_view </B> - Calls <A HREF="../EPS/EPSView.html#EPSView">EPSView</A>() at end of <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_view </B></TD><TD> - Calls <A HREF="../EPS/EPSView.html#EPSView">EPSView</A>() at end of <A HREF="../EPS/EPSSolve.html#EPSSolve">EPSSolve</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/EPS/EPSWhich.html b/docs/manualpages/EPS/EPSWhich.html
index 6bc44ff..537c36e 100644
--- a/docs/manualpages/EPS/EPSWhich.html
+++ b/docs/manualpages/EPS/EPSWhich.html
@@ -6,8 +6,8 @@
 <TITLE>EPSWhich</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/EPSWhich.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/EPSWhich.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>EPSWhich</H1>
 Determines which part of the spectrum is requested 
diff --git a/docs/manualpages/EPS/index.html b/docs/manualpages/EPS/index.html
index 42d33f8..a290cad 100644
--- a/docs/manualpages/EPS/index.html
+++ b/docs/manualpages/EPS/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/EPS/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/EPS/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
@@ -22,32 +22,28 @@ Options can also be set directly in application codes by calling the correspondi
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
+ <TD WIDTH=250><A HREF="./EPS.html">EPS</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetEigenpair.html">EPSGetEigenpair</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetOperators.html">EPSSetOperators</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./EPSComputeError.html">EPSComputeError</A></TD>
  <TD WIDTH=250><A HREF="./EPSGetEigenvalue.html">EPSGetEigenvalue</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetOperators.html">EPSSetOperators</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSolve.html">EPSSolve</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSCreate.html">EPSCreate</A></TD>
  <TD WIDTH=250><A HREF="./EPSGetEigenvector.html">EPSGetEigenvector</A></TD>
- <TD WIDTH=250><A HREF="./EPSSolve.html">EPSSolve</A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./EPSDestroy.html">EPSDestroy</A></TD>
- <TD WIDTH=250><A HREF="./EPS.html">EPS</A></TD>
  <TD WIDTH=250><A HREF="./EPSType.html">EPSType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetConverged.html">EPSGetConverged</A></TD>
+ <TD WIDTH=250><A HREF="./EPSDestroy.html">EPSDestroy</A></TD>
  <TD WIDTH=250><A HREF="./EPSProblemType.html">EPSProblemType</A></TD>
  <TD WIDTH=250><A HREF="./EPSView.html">EPSView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetEigenpair.html">EPSGetEigenpair</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetConverged.html">EPSGetConverged</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetFromOptions.html">EPSSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
  <TD WIDTH=250><A HREF="./EPSBalance.html">EPSBalance</A></TD>
- <TD WIDTH=250><A HREF="./EPSGetPurify.html">EPSGetPurify</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetBalance.html">EPSSetBalance</A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./EPSConvergedReason.html">EPSConvergedReason</A></TD>
  <TD WIDTH=250><A HREF="./EPSGetST.html">EPSGetST</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetConvergenceTest.html">EPSSetConvergenceTest</A></TD>
 <TR>
@@ -55,189 +51,217 @@ Options can also be set directly in application codes by calling the correspondi
  <TD WIDTH=250><A HREF="./EPSGetTarget.html">EPSGetTarget</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetDeflationSpace.html">EPSSetDeflationSpace</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSErrorType.html">EPSErrorType</A></TD>
+ <TD WIDTH=250><A HREF="./EPSConvergedReason.html">EPSConvergedReason</A></TD>
  <TD WIDTH=250><A HREF="./EPSGetTolerances.html">EPSGetTolerances</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetDimensions.html">EPSSetDimensions</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSErrorView.html">EPSErrorView</A></TD>
+ <TD WIDTH=250><A HREF="./EPSErrorType.html">EPSErrorType</A></TD>
  <TD WIDTH=250><A HREF="./EPSGetType.html">EPSGetType</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetInitialSpace.html">EPSSetInitialSpace</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetBalance.html">EPSGetBalance</A></TD>
+ <TD WIDTH=250><A HREF="./EPSErrorView.html">EPSErrorView</A></TD>
  <TD WIDTH=250><A HREF="./EPSGetWhichEigenpairs.html">EPSGetWhichEigenpairs</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetInterval.html">EPSSetInterval</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetConvergedReason.html">EPSGetConvergedReason</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetBalance.html">EPSGetBalance</A></TD>
  <TD WIDTH=250><A HREF="./EPSIsGeneralized.html">EPSIsGeneralized</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetProblemType.html">EPSSetProblemType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetConvergenceTest.html">EPSGetConvergenceTest</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetConvergedReason.html">EPSGetConvergedReason</A></TD>
  <TD WIDTH=250><A HREF="./EPSIsHermitian.html">EPSIsHermitian</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetPurify.html">EPSSetPurify</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetDimensions.html">EPSGetDimensions</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetConvergenceTest.html">EPSGetConvergenceTest</A></TD>
  <TD WIDTH=250><A HREF="./EPSIsPositive.html">EPSIsPositive</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetTarget.html">EPSSetTarget</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetInterval.html">EPSGetInterval</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetDimensions.html">EPSGetDimensions</A></TD>
  <TD WIDTH=250><A HREF="./EPSMonitorAll.html">EPSMonitorAll</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetTolerances.html">EPSSetTolerances</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetInvariantSubspace.html">EPSGetInvariantSubspace</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetInterval.html">EPSGetInterval</A></TD>
  <TD WIDTH=250><A HREF="./EPSMonitorCancel.html">EPSMonitorCancel</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetType.html">EPSSetType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetIterationNumber.html">EPSGetIterationNumber</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetInvariantSubspace.html">EPSGetInvariantSubspace</A></TD>
  <TD WIDTH=250><A HREF="./EPSMonitorConverged.html">EPSMonitorConverged</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetWhichEigenpairs.html">EPSSetWhichEigenpairs</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetMonitorContext.html">EPSGetMonitorContext</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetIterationNumber.html">EPSGetIterationNumber</A></TD>
  <TD WIDTH=250><A HREF="./EPSMonitorFirst.html">EPSMonitorFirst</A></TD>
  <TD WIDTH=250><A HREF="./EPSValuesView.html">EPSValuesView</A></TD>
 <TR>
+ <TD WIDTH=250><A HREF="./EPSGetMonitorContext.html">EPSGetMonitorContext</A></TD>
+ <TD WIDTH=250><A HREF="./EPSMonitorLGCreate.html">EPSMonitorLGCreate</A></TD>
+ <TD WIDTH=250><A HREF="./EPSVectorsView.html">EPSVectorsView</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./EPSGetOperators.html">EPSGetOperators</A></TD>
  <TD WIDTH=250><A HREF="./EPSMonitorSet.html">EPSMonitorSet</A></TD>
- <TD WIDTH=250><A HREF="./EPSVectorsView.html">EPSVectorsView</A></TD>
+ <TD WIDTH=250><A HREF="./EPSWhich.html">EPSWhich</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSGetProblemType.html">EPSGetProblemType</A></TD>
  <TD WIDTH=250><A HREF="./EPSReasonView.html">EPSReasonView</A></TD>
- <TD WIDTH=250><A HREF="./EPSWhich.html">EPSWhich</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSGetPurify.html">EPSGetPurify</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetBalance.html">EPSSetBalance</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./EPSAppendOptionsPrefix.html">EPSAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./EPSGetErrorEstimate.html">EPSGetErrorEstimate</A></TD>
- <TD WIDTH=250><A HREF="./EPSKrylovSchurSetRestart.html">EPSKrylovSchurSetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetDS.html">EPSGetDS</A></TD>
+ <TD WIDTH=250><A HREF="./EPSKrylovSchurUpdateSubcommMats.html">EPSKrylovSchurUpdateSubcommMats</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSArnoldiGetDelayed.html">EPSArnoldiGetDelayed</A></TD>
- <TD WIDTH=250><A HREF="./EPSGetExtraction.html">EPSGetExtraction</A></TD>
- <TD WIDTH=250><A HREF="./EPSKrylovSchurSetSubintervals.html">EPSKrylovSchurSetSubintervals</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetErrorEstimate.html">EPSGetErrorEstimate</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLOBPCGGetBlockSize.html">EPSLOBPCGGetBlockSize</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSArnoldiSetDelayed.html">EPSArnoldiSetDelayed</A></TD>
- <TD WIDTH=250><A HREF="./EPSGetOptionsPrefix.html">EPSGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./EPSLanczosGetReorthog.html">EPSLanczosGetReorthog</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetExtraction.html">EPSGetExtraction</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLOBPCGGetLocking.html">EPSLOBPCGGetLocking</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSBLOPEXGetBlockSize.html">EPSBLOPEXGetBlockSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSGetRG.html">EPSGetRG</A></TD>
- <TD WIDTH=250><A HREF="./EPSLanczosReorthogType.html">EPSLanczosReorthogType</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetOptionsPrefix.html">EPSGetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLOBPCGGetRestart.html">EPSLOBPCGGetRestart</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSBLOPEXSetBlockSize.html">EPSBLOPEXSetBlockSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSGetTrueResidual.html">EPSGetTrueResidual</A></TD>
- <TD WIDTH=250><A HREF="./EPSLanczosSetReorthog.html">EPSLanczosSetReorthog</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetRG.html">EPSGetRG</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLOBPCGSetBlockSize.html">EPSLOBPCGSetBlockSize</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSBlzpackSetBlockSize.html">EPSBlzpackSetBlockSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSJDGetBlockSize.html">EPSJDGetBlockSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSLOBPCGGetBlockSize.html">EPSLOBPCGGetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetStoppingTest.html">EPSGetStoppingTest</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLOBPCGSetLocking.html">EPSLOBPCGSetLocking</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSBlzpackSetNSteps.html">EPSBlzpackSetNSteps</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGetTrueResidual.html">EPSGetTrueResidual</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLOBPCGSetRestart.html">EPSLOBPCGSetRestart</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSCISSExtraction.html">EPSCISSExtraction</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetBOrth.html">EPSJDGetBOrth</A></TD>
- <TD WIDTH=250><A HREF="./EPSLOBPCGGetLocking.html">EPSLOBPCGGetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLanczosGetReorthog.html">EPSLanczosGetReorthog</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSGetRefinement.html">EPSCISSGetRefinement</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSGetExtraction.html">EPSCISSGetExtraction</A></TD>
+ <TD WIDTH=250><A HREF="./EPSJDGetBlockSize.html">EPSJDGetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLanczosReorthogType.html">EPSLanczosReorthogType</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSCISSGetQuadRule.html">EPSCISSGetQuadRule</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetConstCorrectionTol.html">EPSJDGetConstCorrectionTol</A></TD>
- <TD WIDTH=250><A HREF="./EPSLOBPCGSetBlockSize.html">EPSLOBPCGSetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSLanczosSetReorthog.html">EPSLanczosSetReorthog</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSGetSizes.html">EPSCISSGetSizes</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSGetRefinement.html">EPSCISSGetRefinement</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetFix.html">EPSJDGetFix</A></TD>
- <TD WIDTH=250><A HREF="./EPSLOBPCGSetLocking.html">EPSLOBPCGSetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPRIMMEGetBlockSize.html">EPSPRIMMEGetBlockSize</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSGetThreshold.html">EPSCISSGetThreshold</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSGetSizes.html">EPSCISSGetSizes</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetInitialSize.html">EPSJDGetInitialSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSPowerGetShiftType.html">EPSPowerGetShiftType</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPRIMMEGetMethod.html">EPSPRIMMEGetMethod</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSGetUseST.html">EPSCISSGetUseST</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSGetThreshold.html">EPSCISSGetThreshold</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetKrylovStart.html">EPSJDGetKrylovStart</A></TD>
- <TD WIDTH=250><A HREF="./EPSPowerSetShiftType.html">EPSPowerSetShiftType</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPRIMMEMethod.html">EPSPRIMMEMethod</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSSetRefinement.html">EPSCISSSetRefinement</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSGetUseST.html">EPSCISSGetUseST</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetRestart.html">EPSJDGetRestart</A></TD>
- <TD WIDTH=250><A HREF="./EPSPowerShiftType.html">EPSPowerShiftType</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPRIMMESetBlockSize.html">EPSPRIMMESetBlockSize</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSSetSizes.html">EPSCISSSetSizes</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSQuadRule.html">EPSCISSQuadRule</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDGetWindowSizes.html">EPSJDGetWindowSizes</A></TD>
- <TD WIDTH=250><A HREF="./EPSPRIMMEGetBlockSize.html">EPSPRIMMEGetBlockSize</A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./EPSCISSSetThreshold.html">EPSCISSSetThreshold</A></TD>
- <TD WIDTH=250><A HREF="./EPSJDSetBlockSize.html">EPSJDSetBlockSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSPRIMMEGetMethod.html">EPSPRIMMEGetMethod</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPRIMMESetMethod.html">EPSPRIMMESetMethod</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSCISSSetUseST.html">EPSCISSSetUseST</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSSetExtraction.html">EPSCISSSetExtraction</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetBOrth.html">EPSJDSetBOrth</A></TD>
- <TD WIDTH=250><A HREF="./EPSPRIMMEMethod.html">EPSPRIMMEMethod</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPowerGetShiftType.html">EPSPowerGetShiftType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSExtraction.html">EPSExtraction</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSSetQuadRule.html">EPSCISSSetQuadRule</A></TD>
+ <TD WIDTH=250><A HREF="./EPSJDSetBlockSize.html">EPSJDSetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPowerSetShiftType.html">EPSPowerSetShiftType</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSCISSSetRefinement.html">EPSCISSSetRefinement</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetConstCorrectionTol.html">EPSJDSetConstCorrectionTol</A></TD>
- <TD WIDTH=250><A HREF="./EPSPRIMMESetBlockSize.html">EPSPRIMMESetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSPowerShiftType.html">EPSPowerShiftType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSFEASTGetNumPoints.html">EPSFEASTGetNumPoints</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSSetSizes.html">EPSCISSSetSizes</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetFix.html">EPSJDSetFix</A></TD>
- <TD WIDTH=250><A HREF="./EPSPRIMMESetMethod.html">EPSPRIMMESetMethod</A></TD>
+ <TD WIDTH=250><A HREF="./EPSRQCGGetReset.html">EPSRQCGGetReset</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSFEASTSetNumPoints.html">EPSFEASTSetNumPoints</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSSetThreshold.html">EPSCISSSetThreshold</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetInitialSize.html">EPSJDSetInitialSize</A></TD>
- <TD WIDTH=250><A HREF="./EPSRegisterAll.html">EPSRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./EPSRQCGSetReset.html">EPSRQCGSetReset</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetBlockSize.html">EPSGDGetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSCISSSetUseST.html">EPSCISSSetUseST</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetKrylovStart.html">EPSJDSetKrylovStart</A></TD>
  <TD WIDTH=250><A HREF="./EPSRegister.html">EPSRegister</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetBOrth.html">EPSGDGetBOrth</A></TD>
+ <TD WIDTH=250><A HREF="./EPSExtraction.html">EPSExtraction</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetRestart.html">EPSJDSetRestart</A></TD>
- <TD WIDTH=250><A HREF="./EPSReset.html">EPSReset</A></TD>
+ <TD WIDTH=250><A HREF="./EPSRegisterAll.html">EPSRegisterAll</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetDoubleExpansion.html">EPSGDGetDoubleExpansion</A></TD>
+ <TD WIDTH=250><A HREF="./EPSFEASTGetNumPoints.html">EPSFEASTGetNumPoints</A></TD>
  <TD WIDTH=250><A HREF="./EPSJDSetWindowSizes.html">EPSJDSetWindowSizes</A></TD>
- <TD WIDTH=250><A HREF="./EPSRQCGGetReset.html">EPSRQCGGetReset</A></TD>
+ <TD WIDTH=250><A HREF="./EPSReset.html">EPSReset</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetInitialSize.html">EPSGDGetInitialSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSFEASTSetNumPoints.html">EPSFEASTSetNumPoints</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetDetectZeros.html">EPSKrylovSchurGetDetectZeros</A></TD>
- <TD WIDTH=250><A HREF="./EPSRQCGSetReset.html">EPSRQCGSetReset</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetArbitrarySelection.html">EPSSetArbitrarySelection</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetKrylovStart.html">EPSGDGetKrylovStart</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetBOrth.html">EPSGDGetBOrth</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetDimensions.html">EPSKrylovSchurGetDimensions</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetArbitrarySelection.html">EPSSetArbitrarySelection</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetBV.html">EPSSetBV</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetRestart.html">EPSGDGetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetBlockSize.html">EPSGDGetBlockSize</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetInertias.html">EPSKrylovSchurGetInertias</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetBV.html">EPSSetBV</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetConvergenceTestFunction.html">EPSSetConvergenceTestFunction</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDGetWindowSizes.html">EPSGDGetWindowSizes</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetDoubleExpansion.html">EPSGDGetDoubleExpansion</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetLocking.html">EPSKrylovSchurGetLocking</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetConvergenceTestFunction.html">EPSSetConvergenceTestFunction</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetDS.html">EPSSetDS</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetBlockSize.html">EPSGDSetBlockSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetInitialSize.html">EPSGDGetInitialSize</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetPartitions.html">EPSKrylovSchurGetPartitions</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetDS.html">EPSSetDS</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetEigenvalueComparison.html">EPSSetEigenvalueComparison</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetBOrth.html">EPSGDSetBOrth</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetKrylovStart.html">EPSGDGetKrylovStart</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetRestart.html">EPSKrylovSchurGetRestart</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetEigenvalueComparison.html">EPSSetEigenvalueComparison</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetExtraction.html">EPSSetExtraction</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetDoubleExpansion.html">EPSGDSetDoubleExpansion</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetRestart.html">EPSGDGetRestart</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetSubcommInfo.html">EPSKrylovSchurGetSubcommInfo</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetExtraction.html">EPSSetExtraction</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetOptionsPrefix.html">EPSSetOptionsPrefix</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetInitialSize.html">EPSGDSetInitialSize</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDGetWindowSizes.html">EPSGDGetWindowSizes</A></TD>
+ <TD WIDTH=250><A HREF="./EPSKrylovSchurGetSubcommMats.html">EPSKrylovSchurGetSubcommMats</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetRG.html">EPSSetRG</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSGDSetBOrth.html">EPSGDSetBOrth</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetSubcommPairs.html">EPSKrylovSchurGetSubcommPairs</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetOptionsPrefix.html">EPSSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetST.html">EPSSetST</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetKrylovStart.html">EPSGDSetKrylovStart</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDSetBlockSize.html">EPSGDSetBlockSize</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurGetSubintervals.html">EPSKrylovSchurGetSubintervals</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetRG.html">EPSSetRG</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetStoppingTest.html">EPSSetStoppingTest</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetRestart.html">EPSGDSetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDSetDoubleExpansion.html">EPSGDSetDoubleExpansion</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurSetDetectZeros.html">EPSKrylovSchurSetDetectZeros</A></TD>
- <TD WIDTH=250><A HREF="./EPSSetST.html">EPSSetST</A></TD>
+ <TD WIDTH=250><A HREF="./EPSSetStoppingTestFunction.html">EPSSetStoppingTestFunction</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGDSetWindowSizes.html">EPSGDSetWindowSizes</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDSetInitialSize.html">EPSGDSetInitialSize</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurSetDimensions.html">EPSKrylovSchurSetDimensions</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetTrueResidual.html">EPSSetTrueResidual</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetBV.html">EPSGetBV</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDSetKrylovStart.html">EPSGDSetKrylovStart</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurSetLocking.html">EPSKrylovSchurSetLocking</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./EPSStop.html">EPSStop</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./EPSGetDS.html">EPSGetDS</A></TD>
+ <TD WIDTH=250><A HREF="./EPSGDSetRestart.html">EPSGDSetRestart</A></TD>
  <TD WIDTH=250><A HREF="./EPSKrylovSchurSetPartitions.html">EPSKrylovSchurSetPartitions</A></TD>
+ <TD WIDTH=250><A HREF="./EPSStoppingBasic.html">EPSStoppingBasic</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSGDSetWindowSizes.html">EPSGDSetWindowSizes</A></TD>
+ <TD WIDTH=250><A HREF="./EPSKrylovSchurSetRestart.html">EPSKrylovSchurSetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./EPSGetBV.html">EPSGetBV</A></TD>
+ <TD WIDTH=250><A HREF="./EPSKrylovSchurSetSubintervals.html">EPSKrylovSchurSetSubintervals</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
@@ -245,13 +269,17 @@ Options can also be set directly in application codes by calling the correspondi
  <TD WIDTH=250><A HREF="./EPSInitializePackage.html">EPSInitializePackage</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetWorkVecs.html">EPSSetWorkVecs</A></TD>
 <TR>
+ <TD WIDTH=250><A HREF="./EPSConvMonitorSetFromOptions.html">EPSConvMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./EPSMonitorSetFromOptions.html">EPSMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./EPSValuesViewFromOptions.html">EPSValuesViewFromOptions</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./EPSErrorViewFromOptions.html">EPSErrorViewFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./EPSReasonViewFromOptions.html">EPSReasonViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./EPSValuesViewFromOptions.html">EPSValuesViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./EPSVectorsViewFromOptions.html">EPSVectorsViewFromOptions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSFinalizePackage.html">EPSFinalizePackage</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetTrackAll.html">EPSSetTrackAll</A></TD>
- <TD WIDTH=250><A HREF="./EPSVectorsViewFromOptions.html">EPSVectorsViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./EPSGetTrackAll.html">EPSGetTrackAll</A></TD>
  <TD WIDTH=250><A HREF="./EPSSetUp.html">EPSSetUp</A></TD>
diff --git a/docs/manualpages/FN/FN.html b/docs/manualpages/FN/FN.html
index e6bedf5..aa5042a 100644
--- a/docs/manualpages/FN/FN.html
+++ b/docs/manualpages/FN/FN.html
@@ -6,8 +6,8 @@
 <TITLE>FN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FN</H1>
 Abstraction of a mathematical function. 
diff --git a/docs/manualpages/FN/FNAppendOptionsPrefix.html b/docs/manualpages/FN/FNAppendOptionsPrefix.html
index 133a8fb..13c6f43 100644
--- a/docs/manualpages/FN/FNAppendOptionsPrefix.html
+++ b/docs/manualpages/FN/FNAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>FNAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../FN/FN.html#FN">FN</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,const char *prefix)
+PetscErrorCode FNAppendOptionsPrefix(FN fn,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../FN/FN.html#FN">FN</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../FN/FN.html#FN">FN</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/FN/FNCombineGetChildren.html b/docs/manualpages/FN/FNCombineGetChildren.html
index c01a77f..a192518 100644
--- a/docs/manualpages/FN/FNCombineGetChildren.html
+++ b/docs/manualpages/FN/FNCombineGetChildren.html
@@ -6,31 +6,30 @@
 <TITLE>FNCombineGetChildren</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNCombineGetChildren.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNCombineGetChildren.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNCombineGetChildren</H1>
 Gets the two child functions that constitute this combined function, and the way they are combined. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,<A HREF="../FN/FNCombineType.html#FNCombineType">FNCombineType</A> *comb,<A HREF="../FN/FN.html#FN">FN</A> *f1,<A HREF="../FN/FN.html#FN">FN</A> *f2)
+PetscErrorCode FNCombineGetChildren(FN fn,FNCombineType *comb,FN *f1,FN *f2)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn   </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>comb </B> - how to combine the functions (addition, multiplication, division or composition)
-<br>
-</TABLE>
-<DT><B>f1   </B> - first function
-<br>
-<DT><B>f2   </B> - second function
-<br>
-</TABLE>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comb </B></TD><TD> - how to combine the functions (addition, multiplication, division or composition)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f1   </B></TD><TD> - first function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f2   </B></TD><TD> - second function
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/FN/FNCombineSetChildren.html b/docs/manualpages/FN/FNCombineSetChildren.html
index 586d40d..78769f4 100644
--- a/docs/manualpages/FN/FNCombineSetChildren.html
+++ b/docs/manualpages/FN/FNCombineSetChildren.html
@@ -6,27 +6,27 @@
 <TITLE>FNCombineSetChildren</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNCombineSetChildren.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNCombineSetChildren.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNCombineSetChildren</H1>
 Sets the two child functions that constitute this combined function, and the way they must be combined. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,<A HREF="../FN/FNCombineType.html#FNCombineType">FNCombineType</A> comb,<A HREF="../FN/FN.html#FN">FN</A> f1,<A HREF="../FN/FN.html#FN">FN</A> f2)
+PetscErrorCode FNCombineSetChildren(FN fn,FNCombineType comb,FN f1,FN f2)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comb </B></TD><TD> - how to combine the functions (addition, multiplication, division or composition)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comb </B></TD><TD> - how to combine the functions (addition, multiplication, division or composition)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f1   </B></TD><TD> - first function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f1   </B></TD><TD> - first function
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f2   </B></TD><TD> - second function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f2   </B></TD><TD> - second function
 </TD></TR></TABLE>
 <P>
 
@@ -37,4 +37,6 @@ Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <BR><A HREF="./index.html">Index of all FN routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNCombineType.html b/docs/manualpages/FN/FNCombineType.html
index d54bf59..2b299b6 100644
--- a/docs/manualpages/FN/FNCombineType.html
+++ b/docs/manualpages/FN/FNCombineType.html
@@ -6,8 +6,8 @@
 <TITLE>FNCombineType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNCombineType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNCombineType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNCombineType</H1>
 Determines how two functions are combined 
diff --git a/docs/manualpages/FN/FNCreate.html b/docs/manualpages/FN/FNCreate.html
index 064bb0d..c436945 100644
--- a/docs/manualpages/FN/FNCreate.html
+++ b/docs/manualpages/FN/FNCreate.html
@@ -6,25 +6,25 @@
 <TITLE>FNCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNCreate</H1>
 Creates an <A HREF="../FN/FN.html#FN">FN</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNCreate.html#FNCreate">FNCreate</A>(MPI_Comm comm,<A HREF="../FN/FN.html#FN">FN</A> *newfn)
+PetscErrorCode FNCreate(MPI_Comm comm,FN *newfn)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>newfn </B> - location to put the <A HREF="../FN/FN.html#FN">FN</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>newfn </B></TD><TD> - location to put the <A HREF="../FN/FN.html#FN">FN</A> context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -36,4 +36,7 @@ Collective on MPI_Comm
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNDestroy.html b/docs/manualpages/FN/FNDestroy.html
index bae6097..375f387 100644
--- a/docs/manualpages/FN/FNDestroy.html
+++ b/docs/manualpages/FN/FNDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>FNDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNDestroy</H1>
 Destroys <A HREF="../FN/FN.html#FN">FN</A> context that was created with <A HREF="../FN/FNCreate.html#FNCreate">FNCreate</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNDestroy.html#FNDestroy">FNDestroy</A>(<A HREF="../FN/FN.html#FN">FN</A> *fn)
+PetscErrorCode FNDestroy(FN *fn)
 </PRE>
 Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -32,4 +32,7 @@ Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNDuplicate.html b/docs/manualpages/FN/FNDuplicate.html
index bd87e93..cc5d5ae 100644
--- a/docs/manualpages/FN/FNDuplicate.html
+++ b/docs/manualpages/FN/FNDuplicate.html
@@ -6,28 +6,28 @@
 <TITLE>FNDuplicate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNDuplicate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNDuplicate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNDuplicate</H1>
 Duplicates a math function, copying all parameters, possibly with a different communicator. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNDuplicate.html#FNDuplicate">FNDuplicate</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,MPI_Comm comm,<A HREF="../FN/FN.html#FN">FN</A> *newfn)
+PetscErrorCode FNDuplicate(FN fn,MPI_Comm comm,FN *newfn)
 </PRE>
 Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator (may be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>newfn </B> - location to put the new <A HREF="../FN/FN.html#FN">FN</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>newfn </B></TD><TD> - location to put the new <A HREF="../FN/FN.html#FN">FN</A> context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/FN/FNEvaluateDerivative.html b/docs/manualpages/FN/FNEvaluateDerivative.html
index ea2ef45..fe7a621 100644
--- a/docs/manualpages/FN/FNEvaluateDerivative.html
+++ b/docs/manualpages/FN/FNEvaluateDerivative.html
@@ -6,28 +6,28 @@
 <TITLE>FNEvaluateDerivative</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNEvaluateDerivative.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNEvaluateDerivative.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNEvaluateDerivative</H1>
 Computes the value of the derivative f'(x) for a given x. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscScalar x,PetscScalar *y)
+PetscErrorCode FNEvaluateDerivative(FN fn,PetscScalar x,PetscScalar *y)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the value where the derivative must be evaluated
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the value where the derivative must be evaluated
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y  </B> - the result of f'(x)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y  </B></TD><TD> - the result of f'(x)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Scaling factors are taken into account, so the actual derivative evaluation will
diff --git a/docs/manualpages/FN/FNEvaluateFunction.html b/docs/manualpages/FN/FNEvaluateFunction.html
index bbe2665..64c4b43 100644
--- a/docs/manualpages/FN/FNEvaluateFunction.html
+++ b/docs/manualpages/FN/FNEvaluateFunction.html
@@ -6,28 +6,28 @@
 <TITLE>FNEvaluateFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNEvaluateFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNEvaluateFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNEvaluateFunction</H1>
 Computes the value of the function f(x) for a given x. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscScalar x,PetscScalar *y)
+PetscErrorCode FNEvaluateFunction(FN fn,PetscScalar x,PetscScalar *y)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the value where the function must be evaluated
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the value where the function must be evaluated
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y  </B> - the result of f(x)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y  </B></TD><TD> - the result of f(x)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 Scaling factors are taken into account, so the actual function evaluation
diff --git a/docs/manualpages/FN/FNEvaluateFunctionMat.html b/docs/manualpages/FN/FNEvaluateFunctionMat.html
index 4d00ab2..4b39568 100644
--- a/docs/manualpages/FN/FNEvaluateFunctionMat.html
+++ b/docs/manualpages/FN/FNEvaluateFunctionMat.html
@@ -6,34 +6,35 @@
 <TITLE>FNEvaluateFunctionMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNEvaluateFunctionMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNEvaluateFunctionMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNEvaluateFunctionMat</H1>
 Computes the value of the function f(A) for a given matrix A, where the result is also a matrix. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,Mat A,Mat B)
+PetscErrorCode FNEvaluateFunctionMat(FN fn,Mat A,Mat B)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - matrix on which the function must be evaluated
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - matrix on which the function must be evaluated
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>B  </B> - matrix resulting from evaluating f(A)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - (optional) matrix resulting from evaluating f(A)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
-The matrix A must be a sequential dense Mat, with all entries equal on
+Matrix A must be a square sequential dense Mat, with all entries equal on
 all processes (otherwise each process will compute different results).
-Matrix B must also be a sequential dense Mat. Both matrices must be
-square with the same dimensions.
+If matrix B is provided, it must also be a square sequential dense Mat, and
+both matrices must have the same dimensions. If B is NULL (or B=A) then the
+function will perform an in-place computation, overwriting A with f(A).
 <P>
 If A is known to be real symmetric or complex Hermitian then it is
 recommended to set the appropriate flag with MatSetOption(), so that
@@ -45,7 +46,7 @@ will return beta*f(alpha*A).
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</A>()
+ <A HREF="../FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</A>(), <A HREF="../FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</A>()
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/fn/interface/fnbasic.c.html#FNEvaluateFunctionMat">src/sys/classes/fn/interface/fnbasic.c</A>
 <BR><A HREF="./index.html">Index of all FN routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/FN/FNEvaluateFunctionMatVec.html b/docs/manualpages/FN/FNEvaluateFunctionMatVec.html
new file mode 100644
index 0000000..6e20e4d
--- /dev/null
+++ b/docs/manualpages/FN/FNEvaluateFunctionMatVec.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/FN/FNEvaluateFunctionMatVec.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>FNEvaluateFunctionMatVec</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNEvaluateFunctionMatVec.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>FNEvaluateFunctionMatVec</H1>
+Computes the first column of the matrix f(A) for a given matrix A. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcfn.h" 
+PetscErrorCode FNEvaluateFunctionMatVec(FN fn,Mat A,Vec v)
+</PRE>
+Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - matrix on which the function must be evaluated
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v  </B></TD><TD> - vector to hold the first column of f(A)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+This operation is similar to <A HREF="../FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</A>() but returns only
+the first column of f(A), hence saving computations in most cases.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</A>(), <A HREF="../FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/fn/interface/fnbasic.c.html#FNEvaluateFunctionMatVec">src/sys/classes/fn/interface/fnbasic.c</A>
+<BR><A HREF="./index.html">Index of all FN routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/FN/FNFinalizePackage.html b/docs/manualpages/FN/FNFinalizePackage.html
index f69201f..1667aec 100644
--- a/docs/manualpages/FN/FNFinalizePackage.html
+++ b/docs/manualpages/FN/FNFinalizePackage.html
@@ -6,15 +6,15 @@
 <TITLE>FNFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../FN/FN.html#FN">FN</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNFinalizePackage.html#FNFinalizePackage">FNFinalizePackage</A>(void)
+PetscErrorCode FNFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/FN/FNGetOptionsPrefix.html b/docs/manualpages/FN/FNGetOptionsPrefix.html
index 0fbe498..254cc87 100644
--- a/docs/manualpages/FN/FNGetOptionsPrefix.html
+++ b/docs/manualpages/FN/FNGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>FNGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../FN/FN.html#FN">FN</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,const char *prefix[])
+PetscErrorCode FNGetOptionsPrefix(FN fn,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>fn </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/FN/FNGetScale.html b/docs/manualpages/FN/FNGetScale.html
index 3b6d339..fbd079d 100644
--- a/docs/manualpages/FN/FNGetScale.html
+++ b/docs/manualpages/FN/FNGetScale.html
@@ -6,27 +6,27 @@
 <TITLE>FNGetScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNGetScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNGetScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNGetScale</H1>
 Gets the scaling parameters that define the matematical function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNGetScale.html#FNGetScale">FNGetScale</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscScalar *alpha,PetscScalar *beta)
+PetscErrorCode FNGetScale(FN fn,PetscScalar *alpha,PetscScalar *beta)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn    </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn    </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - inner scaling (argument)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - inner scaling (argument)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>beta  </B></TD><TD> - outer scaling (result)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>beta  </B></TD><TD> - outer scaling (result)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/FN/FNGetType.html b/docs/manualpages/FN/FNGetType.html
index 1bcd087..90ca55b 100644
--- a/docs/manualpages/FN/FNGetType.html
+++ b/docs/manualpages/FN/FNGetType.html
@@ -6,25 +6,25 @@
 <TITLE>FNGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNGetType</H1>
 Gets the <A HREF="../FN/FN.html#FN">FN</A> type name (as a string) from the <A HREF="../FN/FN.html#FN">FN</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNGetType.html#FNGetType">FNGetType</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,<A HREF="../FN/FNType.html#FNType">FNType</A> *type)
+PetscErrorCode FNGetType(FN fn,FNType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of the math function
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of the math function
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/FN/FNInitializePackage.html b/docs/manualpages/FN/FNInitializePackage.html
index 5e3ea66..7737458 100644
--- a/docs/manualpages/FN/FNInitializePackage.html
+++ b/docs/manualpages/FN/FNInitializePackage.html
@@ -6,15 +6,15 @@
 <TITLE>FNInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNInitializePackage</H1>
 This function initializes everything in the <A HREF="../FN/FN.html#FN">FN</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../FN/FNCreate.html#FNCreate">FNCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNInitializePackage.html#FNInitializePackage">FNInitializePackage</A>(void)
+PetscErrorCode FNInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/FN/FNPhiGetIndex.html b/docs/manualpages/FN/FNPhiGetIndex.html
index 1456fb8..c709621 100644
--- a/docs/manualpages/FN/FNPhiGetIndex.html
+++ b/docs/manualpages/FN/FNPhiGetIndex.html
@@ -6,25 +6,25 @@
 <TITLE>FNPhiGetIndex</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNPhiGetIndex.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNPhiGetIndex.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNPhiGetIndex</H1>
 Gets the index of the phi-function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNPhiGetIndex.html#FNPhiGetIndex">FNPhiGetIndex</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscInt *k)
+PetscErrorCode FNPhiGetIndex(FN fn,PetscInt *k)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>k  </B> - the index
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/FN/FNPhiSetIndex.html b/docs/manualpages/FN/FNPhiSetIndex.html
index 39a36e9..111a2dc 100644
--- a/docs/manualpages/FN/FNPhiSetIndex.html
+++ b/docs/manualpages/FN/FNPhiSetIndex.html
@@ -6,23 +6,23 @@
 <TITLE>FNPhiSetIndex</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNPhiSetIndex.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNPhiSetIndex.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNPhiSetIndex</H1>
 Sets the index of the phi-function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscInt k)
+PetscErrorCode FNPhiSetIndex(FN fn,PetscInt k)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/FN/FNRationalGetDenominator.html b/docs/manualpages/FN/FNRationalGetDenominator.html
index 9adb0d6..bf579e9 100644
--- a/docs/manualpages/FN/FNRationalGetDenominator.html
+++ b/docs/manualpages/FN/FNRationalGetDenominator.html
@@ -6,27 +6,27 @@
 <TITLE>FNRationalGetDenominator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNRationalGetDenominator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNRationalGetDenominator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNRationalGetDenominator</H1>
 Gets the parameters that define the denominator of the rational function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscInt *nq,PetscScalar *qcoeff[])
+PetscErrorCode FNRationalGetDenominator(FN fn,PetscInt *nq,PetscScalar *qcoeff[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn     </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn     </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nq     </B></TD><TD> - number of coefficients
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nq     </B></TD><TD> - number of coefficients
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qcoeff </B></TD><TD> - coefficients (array of scalar values, length nq)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qcoeff </B></TD><TD> - coefficients (array of scalar values, length nq)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/FN/FNRationalGetNumerator.html b/docs/manualpages/FN/FNRationalGetNumerator.html
index 971bbc1..09cbb44 100644
--- a/docs/manualpages/FN/FNRationalGetNumerator.html
+++ b/docs/manualpages/FN/FNRationalGetNumerator.html
@@ -6,27 +6,27 @@
 <TITLE>FNRationalGetNumerator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNRationalGetNumerator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNRationalGetNumerator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNRationalGetNumerator</H1>
 Gets the parameters that define the numerator of the rational function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscInt *np,PetscScalar *pcoeff[])
+PetscErrorCode FNRationalGetNumerator(FN fn,PetscInt *np,PetscScalar *pcoeff[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>fn     </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn     </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>np     </B></TD><TD> - number of coefficients
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>np     </B></TD><TD> - number of coefficients
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pcoeff </B></TD><TD> - coefficients (array of scalar values, length nq)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pcoeff </B></TD><TD> - coefficients (array of scalar values, length nq)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/FN/FNRationalSetDenominator.html b/docs/manualpages/FN/FNRationalSetDenominator.html
index 4003341..b4f4ef7 100644
--- a/docs/manualpages/FN/FNRationalSetDenominator.html
+++ b/docs/manualpages/FN/FNRationalSetDenominator.html
@@ -6,25 +6,25 @@
 <TITLE>FNRationalSetDenominator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNRationalSetDenominator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNRationalSetDenominator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNRationalSetDenominator</H1>
 Sets the parameters defining the denominator of the rational function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscInt nq,PetscScalar *qcoeff)
+PetscErrorCode FNRationalSetDenominator(FN fn,PetscInt nq,PetscScalar *qcoeff)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn     </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn     </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nq     </B></TD><TD> - number of coefficients
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nq     </B></TD><TD> - number of coefficients
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qcoeff </B></TD><TD> - coefficients (array of scalar values)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>qcoeff </B></TD><TD> - coefficients (array of scalar values)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -44,4 +44,6 @@ of the array, e.g. to represent x^2-3 use {1,0,-3}.
 <BR><A HREF="./index.html">Index of all FN routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNRationalSetNumerator.html b/docs/manualpages/FN/FNRationalSetNumerator.html
index 541d24a..f69d957 100644
--- a/docs/manualpages/FN/FNRationalSetNumerator.html
+++ b/docs/manualpages/FN/FNRationalSetNumerator.html
@@ -6,25 +6,25 @@
 <TITLE>FNRationalSetNumerator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNRationalSetNumerator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNRationalSetNumerator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNRationalSetNumerator</H1>
 Sets the parameters defining the numerator of the rational function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscInt np,PetscScalar *pcoeff)
+PetscErrorCode FNRationalSetNumerator(FN fn,PetscInt np,PetscScalar *pcoeff)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn     </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn     </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>np     </B></TD><TD> - number of coefficients
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>np     </B></TD><TD> - number of coefficients
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pcoeff </B></TD><TD> - coefficients (array of scalar values)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pcoeff </B></TD><TD> - coefficients (array of scalar values)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -46,4 +46,7 @@ of the array, e.g. to represent x^2-3 use {1,0,-3}.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNRegister.html b/docs/manualpages/FN/FNRegister.html
index 8df7623..59ac485 100644
--- a/docs/manualpages/FN/FNRegister.html
+++ b/docs/manualpages/FN/FNRegister.html
@@ -6,23 +6,23 @@
 <TITLE>FNRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNRegister</H1>
 See Adds a mathematical function to the <A HREF="../FN/FN.html#FN">FN</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNRegister.html#FNRegister">FNRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../FN/FN.html#FN">FN</A>))
+PetscErrorCode FNRegister(const char *name,PetscErrorCode (*function)(FN))
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined <A HREF="../FN/FN.html#FN">FN</A>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined <A HREF="../FN/FN.html#FN">FN</A>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/FN/FNRegisterAll.html b/docs/manualpages/FN/FNRegisterAll.html
index 026afc3..ab5e230 100644
--- a/docs/manualpages/FN/FNRegisterAll.html
+++ b/docs/manualpages/FN/FNRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>FNRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNRegisterAll</H1>
 Registers all of the math functions in the <A HREF="../FN/FN.html#FN">FN</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</A>(void)
+PetscErrorCode FNRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/FN/FNSetFromOptions.html b/docs/manualpages/FN/FNSetFromOptions.html
index c700080..99bc720 100644
--- a/docs/manualpages/FN/FNSetFromOptions.html
+++ b/docs/manualpages/FN/FNSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>FNSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNSetFromOptions</H1>
 Sets <A HREF="../FN/FN.html#FN">FN</A> options from the options database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</A>(<A HREF="../FN/FN.html#FN">FN</A> fn)
+PetscErrorCode FNSetFromOptions(FN fn)
 </PRE>
 Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>fn </B> - the math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
diff --git a/docs/manualpages/FN/FNSetOptionsPrefix.html b/docs/manualpages/FN/FNSetOptionsPrefix.html
index d5b62b8..1caca20 100644
--- a/docs/manualpages/FN/FNSetOptionsPrefix.html
+++ b/docs/manualpages/FN/FNSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>FNSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../FN/FN.html#FN">FN</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,const char *prefix)
+PetscErrorCode FNSetOptionsPrefix(FN fn,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../FN/FN.html#FN">FN</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../FN/FN.html#FN">FN</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/FN/FNSetScale.html b/docs/manualpages/FN/FNSetScale.html
index 88b30b6..87dec05 100644
--- a/docs/manualpages/FN/FNSetScale.html
+++ b/docs/manualpages/FN/FNSetScale.html
@@ -6,25 +6,25 @@
 <TITLE>FNSetScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNSetScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNSetScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNSetScale</H1>
 Sets the scaling parameters that define the matematical function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNSetScale.html#FNSetScale">FNSetScale</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscScalar alpha,PetscScalar beta)
+PetscErrorCode FNSetScale(FN fn,PetscScalar alpha,PetscScalar beta)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn    </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn    </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - inner scaling (argument)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha </B></TD><TD> - inner scaling (argument)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>beta  </B></TD><TD> - outer scaling (result)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>beta  </B></TD><TD> - outer scaling (result)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -47,5 +47,6 @@ one to 1.0.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNSetType.html b/docs/manualpages/FN/FNSetType.html
index 2faaf6c..2beade3 100644
--- a/docs/manualpages/FN/FNSetType.html
+++ b/docs/manualpages/FN/FNSetType.html
@@ -6,23 +6,23 @@
 <TITLE>FNSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNSetType</H1>
 Selects the type for the <A HREF="../FN/FN.html#FN">FN</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNSetType.html#FNSetType">FNSetType</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,<A HREF="../FN/FNType.html#FNType">FNType</A> type)
+PetscErrorCode FNSetType(FN fn,FNType type)
 </PRE>
 Logically Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn   </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -39,5 +39,9 @@ case as well as simple functions such as f(x)=x and f(x)=constant.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/FN/FNType.html b/docs/manualpages/FN/FNType.html
index ba613c6..22b8e76 100644
--- a/docs/manualpages/FN/FNType.html
+++ b/docs/manualpages/FN/FNType.html
@@ -6,8 +6,8 @@
 <TITLE>FNType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNType</H1>
 String with the name of the mathematical function. 
@@ -20,6 +20,7 @@ typedef const char* <A HREF="../FN/FNType.html#FNType">FNType</A>;
 #define FNLOG      "log"
 #define FNPHI      "phi"
 #define FNSQRT     "sqrt"
+#define FNINVSQRT  "invsqrt"
 
 </PRE>
 
diff --git a/docs/manualpages/FN/FNView.html b/docs/manualpages/FN/FNView.html
index 318f6aa..a3802ea 100644
--- a/docs/manualpages/FN/FNView.html
+++ b/docs/manualpages/FN/FNView.html
@@ -6,31 +6,31 @@
 <TITLE>FNView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/FNView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/FNView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>FNView</H1>
 Prints the <A HREF="../FN/FN.html#FN">FN</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcfn.h" 
-PetscErrorCode <A HREF="../FN/FNView.html#FNView">FNView</A>(<A HREF="../FN/FN.html#FN">FN</A> fn,PetscViewer viewer)
+PetscErrorCode FNView(FN fn,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - the math function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/FN/index.html b/docs/manualpages/FN/index.html
index 2b9059a..421ed67 100644
--- a/docs/manualpages/FN/index.html
+++ b/docs/manualpages/FN/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/FN/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/FN/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
@@ -18,11 +18,11 @@ The FN package provides the functionality to represent a simple mathematical fun
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./FNCreate.html">FNCreate</A></TD>
  <TD WIDTH=250><A HREF="./FN.html">FN</A></TD>
+ <TD WIDTH=250><A HREF="./FNDestroy.html">FNDestroy</A></TD>
  <TD WIDTH=250><A HREF="./FNType.html">FNType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./FNDestroy.html">FNDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./FNCreate.html">FNCreate</A></TD>
  <TD WIDTH=250><A HREF="./FNSetFromOptions.html">FNSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./FNView.html">FNView</A></TD>
 <TR>
@@ -49,12 +49,12 @@ The FN package provides the functionality to represent a simple mathematical fun
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./FNAppendOptionsPrefix.html">FNAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./FNGetOptionsPrefix.html">FNGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./FNSetOptionsPrefix.html">FNSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./FNEvaluateFunctionMatVec.html">FNEvaluateFunctionMatVec</A></TD>
+ <TD WIDTH=250><A HREF="./FNRegisterAll.html">FNRegisterAll</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./FNCombineType.html">FNCombineType</A></TD>
- <TD WIDTH=250><A HREF="./FNRegisterAll.html">FNRegisterAll</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./FNGetOptionsPrefix.html">FNGetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./FNSetOptionsPrefix.html">FNSetOptionsPrefix</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./FNEvaluateFunctionMat.html">FNEvaluateFunctionMat</A></TD>
  <TD WIDTH=250><A HREF="./FNRegister.html">FNRegister</A></TD>
diff --git a/docs/manualpages/MFN/MFN.html b/docs/manualpages/MFN/MFN.html
index 7a0364e..f5eddf5 100644
--- a/docs/manualpages/MFN/MFN.html
+++ b/docs/manualpages/MFN/MFN.html
@@ -6,8 +6,8 @@
 <TITLE>MFN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFN</H1>
 SLEPc object that encapsulates functionality for matrix functions. 
diff --git a/docs/manualpages/MFN/MFNAllocateSolution.html b/docs/manualpages/MFN/MFNAllocateSolution.html
index 5e35610..943210f 100644
--- a/docs/manualpages/MFN/MFNAllocateSolution.html
+++ b/docs/manualpages/MFN/MFNAllocateSolution.html
@@ -6,23 +6,23 @@
 <TITLE>MFNAllocateSolution</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNAllocateSolution</H1>
 Allocate memory storage for common variables such as the basis vectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscInt extra)
+PetscErrorCode MFNAllocateSolution(MFN mfn,PetscInt extra)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn   </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn   </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
 working basis slightly larger than ncv
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/MFN/MFNAppendOptionsPrefix.html b/docs/manualpages/MFN/MFNAppendOptionsPrefix.html
index 0335522..3d88848 100644
--- a/docs/manualpages/MFN/MFNAppendOptionsPrefix.html
+++ b/docs/manualpages/MFN/MFNAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>MFNAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../MFN/MFN.html#MFN">MFN</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,const char *prefix)
+PetscErrorCode MFNAppendOptionsPrefix(MFN mfn,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../MFN/MFN.html#MFN">MFN</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../MFN/MFN.html#MFN">MFN</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNConvergedReason.html b/docs/manualpages/MFN/MFNConvergedReason.html
index 5ffc93b..6e719da 100644
--- a/docs/manualpages/MFN/MFNConvergedReason.html
+++ b/docs/manualpages/MFN/MFNConvergedReason.html
@@ -6,8 +6,8 @@
 <TITLE>MFNConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNConvergedReason</H1>
 reason a matrix function iteration was said to have converged or diverged 
@@ -15,6 +15,7 @@ reason a matrix function iteration was said to have converged or diverged
 <PRE>
 typedef enum {/* converged */
               MFN_CONVERGED_TOL                =  2,
+              MFN_CONVERGED_ITS                =  3,
               /* diverged */
               MFN_DIVERGED_ITS                 = -3,
               MFN_DIVERGED_BREAKDOWN           = -4,
diff --git a/docs/manualpages/MFN/MFNCreate.html b/docs/manualpages/MFN/MFNCreate.html
index cd40619..b16de27 100644
--- a/docs/manualpages/MFN/MFNCreate.html
+++ b/docs/manualpages/MFN/MFNCreate.html
@@ -6,25 +6,25 @@
 <TITLE>MFNCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNCreate</H1>
 Creates the default <A HREF="../MFN/MFN.html#MFN">MFN</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>(MPI_Comm comm,<A HREF="../MFN/MFN.html#MFN">MFN</A> *outmfn)
+PetscErrorCode MFNCreate(MPI_Comm comm,MFN *outmfn)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>mfn </B> - location to put the <A HREF="../MFN/MFN.html#MFN">MFN</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - location to put the <A HREF="../MFN/MFN.html#MFN">MFN</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The default <A HREF="../MFN/MFN.html#MFN">MFN</A> type is MFNKRYLOV
@@ -39,4 +39,5 @@ The default <A HREF="../MFN/MFN.html#MFN">MFN</A> type is MFNKRYLOV
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNDestroy.html b/docs/manualpages/MFN/MFNDestroy.html
index 7feaf8d..a708ed8 100644
--- a/docs/manualpages/MFN/MFNDestroy.html
+++ b/docs/manualpages/MFN/MFNDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>MFNDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNDestroy</H1>
 Destroys the <A HREF="../MFN/MFN.html#MFN">MFN</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> *mfn)
+PetscErrorCode MFNDestroy(MFN *mfn)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -32,4 +32,5 @@ Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNFinalizePackage.html b/docs/manualpages/MFN/MFNFinalizePackage.html
index f6e13f5..4bbd67f 100644
--- a/docs/manualpages/MFN/MFNFinalizePackage.html
+++ b/docs/manualpages/MFN/MFNFinalizePackage.html
@@ -6,14 +6,14 @@
 <TITLE>MFNFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNFinalizePackage</H1>
 This function destroys everything in the SLEPc interface to the <A HREF="../MFN/MFN.html#MFN">MFN</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../MFN/MFNFinalizePackage.html#MFNFinalizePackage">MFNFinalizePackage</A>(void)
+PetscErrorCode MFNFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetBV.html b/docs/manualpages/MFN/MFNGetBV.html
index 6376806..302a9cc 100644
--- a/docs/manualpages/MFN/MFNGetBV.html
+++ b/docs/manualpages/MFN/MFNGetBV.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetBV</H1>
 Obtain the basis vectors object associated to the matrix function solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../BV/BV.html#BV">BV</A> *bv)
+PetscErrorCode MFNGetBV(MFN mfn,BV *bv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>mfn </B> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bv </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetConvergedReason.html b/docs/manualpages/MFN/MFNGetConvergedReason.html
index 469f330..6ca20a7 100644
--- a/docs/manualpages/MFN/MFNGetConvergedReason.html
+++ b/docs/manualpages/MFN/MFNGetConvergedReason.html
@@ -6,38 +6,46 @@
 <TITLE>MFNGetConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetConvergedReason</H1>
 Gets the reason why the <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>() iteration was stopped. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</A> *reason)
+PetscErrorCode MFNGetConvergedReason(MFN mfn,MFNConvergedReason *reason)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>reason </B> - negative value indicates diverged, positive value converged
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - negative value indicates diverged, positive value converged
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values for reason</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_DIVERGED_ITS </B></TD><TD> - required more than its to reach convergence
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_CONVERGED_ITS </B></TD><TD> - solver completed the requested number of steps
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_DIVERGED_ITS </B></TD><TD> - required more than max_it iterations to reach convergence
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>MFN_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
 </TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
 Can only be called after the call to <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>() is complete.
 <P>
+Basic solvers (e.g. unrestarted Krylov iterations) cannot determine if the
+computation is accurate up to the requested tolerance. In that case, the
+converged reason is set to MFN_CONVERGED_ITS if the requested number of steps
+(for instance, the ncv value in unrestarted Krylov methods) have been
+completed successfully.
+<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
@@ -48,4 +56,5 @@ Can only be called after the call to <A HREF="../MFN/MFNSolve.html#MFNSolve">MFN
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNGetDimensions.html b/docs/manualpages/MFN/MFNGetDimensions.html
index c4bedf0..1fd4e61 100644
--- a/docs/manualpages/MFN/MFNGetDimensions.html
+++ b/docs/manualpages/MFN/MFNGetDimensions.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetDimensions</H1>
 Gets the dimension of the subspace used by the solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscInt *ncv)
+PetscErrorCode MFNGetDimensions(MFN mfn,PetscInt *ncv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ncv </B> - the maximum dimension of the subspace to be used by the solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetErrorIfNotConverged.html b/docs/manualpages/MFN/MFNGetErrorIfNotConverged.html
index 2423f67..9903e0d 100644
--- a/docs/manualpages/MFN/MFNGetErrorIfNotConverged.html
+++ b/docs/manualpages/MFN/MFNGetErrorIfNotConverged.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetErrorIfNotConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetErrorIfNotConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetErrorIfNotConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetErrorIfNotConverged</H1>
 Return a flag indicating whether <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>() will generate an error if the solver does not converge. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscBool *flag)
+PetscErrorCode MFNGetErrorIfNotConverged(MFN mfn,PetscBool *flag)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>flag </B> - PETSC_TRUE if it will generate an error, else PETSC_FALSE
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flag </B></TD><TD> - PETSC_TRUE if it will generate an error, else PETSC_FALSE
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetFN.html b/docs/manualpages/MFN/MFNGetFN.html
index 6545532..a19380b 100644
--- a/docs/manualpages/MFN/MFNGetFN.html
+++ b/docs/manualpages/MFN/MFNGetFN.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetFN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetFN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetFN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetFN</H1>
 Obtain the math function object associated to the <A HREF="../MFN/MFN.html#MFN">MFN</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../FN/FN.html#FN">FN</A> *fn)
+PetscErrorCode MFNGetFN(MFN mfn,FN *fn)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>mfn </B> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>fn </B> - math function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn </B></TD><TD> - math function context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -36,4 +36,5 @@ Not Collective
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNGetIterationNumber.html b/docs/manualpages/MFN/MFNGetIterationNumber.html
index 58feff5..8f24e6e 100644
--- a/docs/manualpages/MFN/MFNGetIterationNumber.html
+++ b/docs/manualpages/MFN/MFNGetIterationNumber.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetIterationNumber</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetIterationNumber</H1>
 Gets the current iteration number. If the call to <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>() is complete, then it returns the number of iterations carried out by the solution method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscInt *its)
+PetscErrorCode MFNGetIterationNumber(MFN mfn,PetscInt *its)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>its </B> - number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetMonitorContext.html b/docs/manualpages/MFN/MFNGetMonitorContext.html
index ec12cb2..f39c37b 100644
--- a/docs/manualpages/MFN/MFNGetMonitorContext.html
+++ b/docs/manualpages/MFN/MFNGetMonitorContext.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetMonitorContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetMonitorContext</H1>
 Gets the monitor context, as set by <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>() for the FIRST monitor only. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetMonitorContext.html#MFNGetMonitorContext">MFNGetMonitorContext</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,void **ctx)
+PetscErrorCode MFNGetMonitorContext(MFN mfn,void **ctx)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ctx </B> - monitor context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - monitor context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetOperator.html b/docs/manualpages/MFN/MFNGetOperator.html
index b62b696..64bf2ab 100644
--- a/docs/manualpages/MFN/MFNGetOperator.html
+++ b/docs/manualpages/MFN/MFNGetOperator.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetOperator</H1>
 Gets the matrix associated with the <A HREF="../MFN/MFN.html#MFN">MFN</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,Mat *A)
+PetscErrorCode MFNGetOperator(MFN mfn,Mat *A)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the <A HREF="../MFN/MFN.html#MFN">MFN</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the <A HREF="../MFN/MFN.html#MFN">MFN</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>A  </B> - the matrix for which the matrix function is to be computed
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix for which the matrix function is to be computed
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNGetOptionsPrefix.html b/docs/manualpages/MFN/MFNGetOptionsPrefix.html
index 54923c1..6c260da 100644
--- a/docs/manualpages/MFN/MFNGetOptionsPrefix.html
+++ b/docs/manualpages/MFN/MFNGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>MFNGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../MFN/MFN.html#MFN">MFN</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,const char *prefix[])
+PetscErrorCode MFNGetOptionsPrefix(MFN mfn,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/MFN/MFNGetTolerances.html b/docs/manualpages/MFN/MFNGetTolerances.html
index dc510ac..47a41c3 100644
--- a/docs/manualpages/MFN/MFNGetTolerances.html
+++ b/docs/manualpages/MFN/MFNGetTolerances.html
@@ -6,27 +6,27 @@
 <TITLE>MFNGetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetTolerances</H1>
 Gets the tolerance and maximum iteration count used by the <A HREF="../MFN/MFN.html#MFN">MFN</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscReal *tol,PetscInt *maxits)
+PetscErrorCode MFNGetTolerances(MFN mfn,PetscReal *tol,PetscInt *maxits)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNGetType.html b/docs/manualpages/MFN/MFNGetType.html
index d13a838..60431b8 100644
--- a/docs/manualpages/MFN/MFNGetType.html
+++ b/docs/manualpages/MFN/MFNGetType.html
@@ -6,25 +6,25 @@
 <TITLE>MFNGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNGetType</H1>
 Gets the <A HREF="../MFN/MFN.html#MFN">MFN</A> type as a string from the <A HREF="../MFN/MFN.html#MFN">MFN</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNGetType.html#MFNGetType">MFNGetType</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../MFN/MFNType.html#MFNType">MFNType</A> *type)
+PetscErrorCode MFNGetType(MFN mfn,MFNType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of <A HREF="../MFN/MFN.html#MFN">MFN</A> method
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of <A HREF="../MFN/MFN.html#MFN">MFN</A> method
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNInitializePackage.html b/docs/manualpages/MFN/MFNInitializePackage.html
index 14639c5..8610a72 100644
--- a/docs/manualpages/MFN/MFNInitializePackage.html
+++ b/docs/manualpages/MFN/MFNInitializePackage.html
@@ -6,14 +6,14 @@
 <TITLE>MFNInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNInitializePackage</H1>
 This function initializes everything in the <A HREF="../MFN/MFN.html#MFN">MFN</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../MFN/MFNInitializePackage.html#MFNInitializePackage">MFNInitializePackage</A>(void)
+PetscErrorCode MFNInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNMonitorCancel.html b/docs/manualpages/MFN/MFNMonitorCancel.html
index 8c83f25..2f45759 100644
--- a/docs/manualpages/MFN/MFNMonitorCancel.html
+++ b/docs/manualpages/MFN/MFNMonitorCancel.html
@@ -6,27 +6,27 @@
 <TITLE>MFNMonitorCancel</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNMonitorCancel</H1>
 Clears all monitors for an <A HREF="../MFN/MFN.html#MFN">MFN</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn)
+PetscErrorCode MFNMonitorCancel(MFN mfn)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>mfn </B> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-mfn_monitor_cancel </B> - Cancels all monitors that have been hardwired
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor_cancel </B></TD><TD> - Cancels all monitors that have been hardwired
 into a code by calls to <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>(),
 but does not cancel those set via the options database.
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNMonitorDefault.html b/docs/manualpages/MFN/MFNMonitorDefault.html
index be4fe27..b6cf903 100644
--- a/docs/manualpages/MFN/MFNMonitorDefault.html
+++ b/docs/manualpages/MFN/MFNMonitorDefault.html
@@ -6,27 +6,27 @@
 <TITLE>MFNMonitorDefault</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNMonitorDefault.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNMonitorDefault.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNMonitorDefault</H1>
 Print the error estimate of the current approximation at each iteration of the matrix function solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscInt its,PetscReal errest,void *monctx)
+PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn    </B></TD><TD> - matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn    </B></TD><TD> - matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/MFN/MFNMonitorLGCreate.html b/docs/manualpages/MFN/MFNMonitorLGCreate.html
new file mode 100644
index 0000000..270c57e
--- /dev/null
+++ b/docs/manualpages/MFN/MFNMonitorLGCreate.html
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/MFN/MFNMonitorLGCreate.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>MFNMonitorLGCreate</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNMonitorLGCreate.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>MFNMonitorLGCreate</H1>
+Creates a line graph context for use with <A HREF="../MFN/MFN.html#MFN">MFN</A> to monitor convergence. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcmfn.h" 
+PetscErrorCode MFNMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+</PRE>
+Collective on MPI_Comm
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>host </B></TD><TD> - the X display to open, or null for the local machine
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>label </B></TD><TD> - the title to put in the title bar
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x, y </B></TD><TD> - the screen coordinates of the upper left coordinate of
+the window
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m, n </B></TD><TD> - the screen width and height in pixels
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lgctx </B></TD><TD> - the drawing context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor_lg </B></TD><TD> - Sets line graph monitor
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Use PetscDrawLGDestroy() to destroy this line graph.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/mfn/interface/mfnmon.c.html#MFNMonitorLGCreate">src/mfn/interface/mfnmon.c</A>
+<BR><A HREF="./index.html">Index of all MFN routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNMonitorSet.html b/docs/manualpages/MFN/MFNMonitorSet.html
index d6645ad..8c711c7 100644
--- a/docs/manualpages/MFN/MFNMonitorSet.html
+++ b/docs/manualpages/MFN/MFNMonitorSet.html
@@ -6,28 +6,28 @@
 <TITLE>MFNMonitorSet</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNMonitorSet.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNMonitorSet.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNMonitorSet</H1>
 Sets an ADDITIONAL function to be called at every iteration to monitor convergence. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscErrorCode (*monitor)(<A HREF="../MFN/MFN.html#MFN">MFN</A>,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
+PetscErrorCode MFNMonitorSet(MFN mfn,PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn     </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn     </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
 monitor routine (use NULL if no context is desired)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context (may be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of monitor</FONT></H3>
@@ -36,22 +36,22 @@ monitor routine (use NULL if no context is desired)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn    </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn    </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor        </B></TD><TD> - print the error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor        </B></TD><TD> - print the error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor_lg     </B></TD><TD> - sets line graph monitor for the error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor_lg     </B></TD><TD> - sets line graph monitor for the error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
 a code by calls to <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>(), but does not cancel those set via
 the options database.
 </TD></TR></TABLE>
diff --git a/docs/manualpages/MFN/MFNMonitorSetFromOptions.html b/docs/manualpages/MFN/MFNMonitorSetFromOptions.html
new file mode 100644
index 0000000..f691ef5
--- /dev/null
+++ b/docs/manualpages/MFN/MFNMonitorSetFromOptions.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/MFN/MFNMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>MFNMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>MFNMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcmfn.h" 
+PetscErrorCode MFNMonitorSetFromOptions(MFN mfn,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,PetscViewerAndFormat*))
+</PRE>
+Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn      </B></TD><TD> - the eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a PetscViewerAndFormat
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether this monitor tracks all eigenvalues or not
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</A>(), MFNSetTrackAll(), MFNConvMonitorSetFromOptions()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/mfn/interface/mfnopts.c.html#MFNMonitorSetFromOptions">src/mfn/interface/mfnopts.c</A>
+<BR><A HREF="./index.html">Index of all MFN routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNReasonView.html b/docs/manualpages/MFN/MFNReasonView.html
index 216d76a..41d3bd8 100644
--- a/docs/manualpages/MFN/MFNReasonView.html
+++ b/docs/manualpages/MFN/MFNReasonView.html
@@ -6,28 +6,28 @@
 <TITLE>MFNReasonView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNReasonView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNReasonView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNReasonView</H1>
 Displays the reason an <A HREF="../MFN/MFN.html#MFN">MFN</A> solve converged or diverged. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNReasonView.html#MFNReasonView">MFNReasonView</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscViewer viewer)
+PetscErrorCode MFNReasonView(MFN mfn,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-mfn_converged_reason </B> - print reason for convergence, and number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNReasonViewFromOptions.html b/docs/manualpages/MFN/MFNReasonViewFromOptions.html
index f75fe09..4392d5d 100644
--- a/docs/manualpages/MFN/MFNReasonViewFromOptions.html
+++ b/docs/manualpages/MFN/MFNReasonViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>MFNReasonViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNReasonViewFromOptions</H1>
 Processes command line options to determine if/how the <A HREF="../MFN/MFN.html#MFN">MFN</A> converged reason is to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNReasonViewFromOptions.html#MFNReasonViewFromOptions">MFNReasonViewFromOptions</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn)
+PetscErrorCode MFNReasonViewFromOptions(MFN mfn)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/mfn/interface/mfnbasic.c.html#MFNReasonViewFromOptions">src/mfn/interface/mfnbasic.c</A>
diff --git a/docs/manualpages/MFN/MFNRegister.html b/docs/manualpages/MFN/MFNRegister.html
index e5e86b3..c7de691 100644
--- a/docs/manualpages/MFN/MFNRegister.html
+++ b/docs/manualpages/MFN/MFNRegister.html
@@ -6,23 +6,23 @@
 <TITLE>MFNRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNRegister</H1>
 Adds a method to the matrix function solver package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNRegister.html#MFNRegister">MFNRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../MFN/MFN.html#MFN">MFN</A>))
+PetscErrorCode MFNRegister(const char *name,PetscErrorCode (*function)(MFN))
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNRegisterAll.html b/docs/manualpages/MFN/MFNRegisterAll.html
index cc89ad9..e04f5de 100644
--- a/docs/manualpages/MFN/MFNRegisterAll.html
+++ b/docs/manualpages/MFN/MFNRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>MFNRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNRegisterAll</H1>
 Registers all the matrix functions in the <A HREF="../MFN/MFN.html#MFN">MFN</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</A>(void)
+PetscErrorCode MFNRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/MFN/MFNReset.html b/docs/manualpages/MFN/MFNReset.html
index 095cd91..f478edf 100644
--- a/docs/manualpages/MFN/MFNReset.html
+++ b/docs/manualpages/MFN/MFNReset.html
@@ -6,21 +6,21 @@
 <TITLE>MFNReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNReset</H1>
 Resets the <A HREF="../MFN/MFN.html#MFN">MFN</A> context to the setupcalled=0 state and removes any allocated objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNReset.html#MFNReset">MFNReset</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn)
+PetscErrorCode MFNReset(MFN mfn)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn </B> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNSetBV.html b/docs/manualpages/MFN/MFNSetBV.html
index b5055ab..46ff3ba 100644
--- a/docs/manualpages/MFN/MFNSetBV.html
+++ b/docs/manualpages/MFN/MFNSetBV.html
@@ -6,23 +6,23 @@
 <TITLE>MFNSetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetBV</H1>
 Associates a basis vectors object to the matrix function solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../BV/BV.html#BV">BV</A> bv)
+PetscErrorCode MFNSetBV(MFN mfn,BV bv)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv  </B></TD><TD> - the basis vectors object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv  </B></TD><TD> - the basis vectors object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNSetDimensions.html b/docs/manualpages/MFN/MFNSetDimensions.html
index 36651d8..4472c54 100644
--- a/docs/manualpages/MFN/MFNSetDimensions.html
+++ b/docs/manualpages/MFN/MFNSetDimensions.html
@@ -6,28 +6,28 @@
 <TITLE>MFNSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetDimensions</H1>
 Sets the dimension of the subspace to be used by the solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscInt ncv)
+PetscErrorCode MFNSetDimensions(MFN mfn,PetscInt ncv)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-mfn_ncv <ncv> </B> - Sets the dimension of the subspace
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Use PETSC_DEFAULT for ncv to assign a reasonably good value, which is
diff --git a/docs/manualpages/MFN/MFNSetErrorIfNotConverged.html b/docs/manualpages/MFN/MFNSetErrorIfNotConverged.html
index 9308336..41feb47 100644
--- a/docs/manualpages/MFN/MFNSetErrorIfNotConverged.html
+++ b/docs/manualpages/MFN/MFNSetErrorIfNotConverged.html
@@ -6,28 +6,28 @@
 <TITLE>MFNSetErrorIfNotConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetErrorIfNotConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetErrorIfNotConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetErrorIfNotConverged</H1>
 Causes <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>() to generate an error if the solver has not converged. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscBool flg)
+PetscErrorCode MFNSetErrorIfNotConverged(MFN mfn,PetscBool flg)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - PETSC_TRUE indicates you want the error generated
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - PETSC_TRUE indicates you want the error generated
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-mfn_error_if_not_converged </B> - this takes an optional truth value (0/1/no/yes/true/false)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_error_if_not_converged </B></TD><TD> - this takes an optional truth value (0/1/no/yes/true/false)
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/MFN/MFNSetFN.html b/docs/manualpages/MFN/MFNSetFN.html
index 454e2cf..eb5b09f 100644
--- a/docs/manualpages/MFN/MFNSetFN.html
+++ b/docs/manualpages/MFN/MFNSetFN.html
@@ -6,23 +6,23 @@
 <TITLE>MFNSetFN</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetFN.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetFN.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetFN</H1>
 Specifies the function to be computed. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../FN/FN.html#FN">FN</A> fn)
+PetscErrorCode MFNSetFN(MFN mfn,FN fn)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn  </B></TD><TD> - the math function object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fn  </B></TD><TD> - the math function object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNSetFromOptions.html b/docs/manualpages/MFN/MFNSetFromOptions.html
index a944fd6..6076ce0 100644
--- a/docs/manualpages/MFN/MFNSetFromOptions.html
+++ b/docs/manualpages/MFN/MFNSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>MFNSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetFromOptions</H1>
 Sets <A HREF="../MFN/MFN.html#MFN">MFN</A> options from the options database. This routine must be called before <A HREF="../MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</A>() if the user is to be allowed to set the solver type. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn)
+PetscErrorCode MFNSetFromOptions(MFN mfn)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>mfn </B> - the matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
@@ -32,4 +32,5 @@ To see all options, run your program with the -help option.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNSetOperator.html b/docs/manualpages/MFN/MFNSetOperator.html
index 0e0ef3b..cbe8ef2 100644
--- a/docs/manualpages/MFN/MFNSetOperator.html
+++ b/docs/manualpages/MFN/MFNSetOperator.html
@@ -6,23 +6,23 @@
 <TITLE>MFNSetOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetOperator</H1>
 Sets the matrix for which the matrix function is to be computed. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,Mat A)
+PetscErrorCode MFNSetOperator(MFN mfn,Mat A)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - the problem matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - the problem matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -39,4 +39,5 @@ the <A HREF="../MFN/MFN.html#MFN">MFN</A> object is reset.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNSetOptionsPrefix.html b/docs/manualpages/MFN/MFNSetOptionsPrefix.html
index 847d5da..e03828d 100644
--- a/docs/manualpages/MFN/MFNSetOptionsPrefix.html
+++ b/docs/manualpages/MFN/MFNSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>MFNSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../MFN/MFN.html#MFN">MFN</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,const char *prefix)
+PetscErrorCode MFNSetOptionsPrefix(MFN mfn,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../MFN/MFN.html#MFN">MFN</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../MFN/MFN.html#MFN">MFN</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNSetTolerances.html b/docs/manualpages/MFN/MFNSetTolerances.html
index 54c1db5..b92ffaf 100644
--- a/docs/manualpages/MFN/MFNSetTolerances.html
+++ b/docs/manualpages/MFN/MFNSetTolerances.html
@@ -6,32 +6,32 @@
 <TITLE>MFNSetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetTolerances</H1>
 Sets the tolerance and maximum iteration count used by the <A HREF="../MFN/MFN.html#MFN">MFN</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscReal tol,PetscInt maxits)
+PetscErrorCode MFNSetTolerances(MFN mfn,PetscReal tol,PetscInt maxits)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_tol <tol> </B></TD><TD> - Sets the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_tol <tol> </B></TD><TD> - Sets the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/MFN/MFNSetType.html b/docs/manualpages/MFN/MFNSetType.html
index 6580067..837d2c4 100644
--- a/docs/manualpages/MFN/MFNSetType.html
+++ b/docs/manualpages/MFN/MFNSetType.html
@@ -6,29 +6,29 @@
 <TITLE>MFNSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetType</H1>
 Selects the particular solver to be used in the <A HREF="../MFN/MFN.html#MFN">MFN</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetType.html#MFNSetType">MFNSetType</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,<A HREF="../MFN/MFNType.html#MFNType">MFNType</A> type)
+PetscErrorCode MFNSetType(MFN mfn,MFNType type)
 </PRE>
 Logically Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn  </B></TD><TD> - the matrix function context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn  </B></TD><TD> - the matrix function context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known method
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-mfn_type <method> </B> - Sets the method; use -help for a list
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_type <method> </B></TD><TD> - Sets the method; use -help for a list
 of available methods
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See "slepc/include/slepcmfn.h" for available methods. The default
diff --git a/docs/manualpages/MFN/MFNSetUp.html b/docs/manualpages/MFN/MFNSetUp.html
index a8858fc..72fbb4c 100644
--- a/docs/manualpages/MFN/MFNSetUp.html
+++ b/docs/manualpages/MFN/MFNSetUp.html
@@ -6,21 +6,21 @@
 <TITLE>MFNSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSetUp</H1>
 Sets up all the internal data structures necessary for the execution of the matrix function solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn)
+PetscErrorCode MFNSetUp(MFN mfn)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>mfn   </B> - matrix function context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn   </B></TD><TD> - matrix function context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function need not be called explicitly in most cases, since <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>()
diff --git a/docs/manualpages/MFN/MFNSolve.html b/docs/manualpages/MFN/MFNSolve.html
index 03e1047..e718416 100644
--- a/docs/manualpages/MFN/MFNSolve.html
+++ b/docs/manualpages/MFN/MFNSolve.html
@@ -6,41 +6,41 @@
 <TITLE>MFNSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNSolve</H1>
 Solves the matrix function problem. Given a vector b, the vector x = f(A)*b is returned. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,Vec b,Vec x)
+PetscErrorCode MFNSolve(MFN mfn,Vec b,Vec x)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - matrix function context obtained from <A HREF="../MFN/MFNCreate.html#MFNCreate">MFNCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b   </B></TD><TD> - the right hand side vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b   </B></TD><TD> - the right hand side vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>x   </B> - the solution (this may be the same vector as b, then b will be
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x   </B></TD><TD> - the solution (this may be the same vector as b, then b will be
 overwritten with the answer)
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view </B></TD><TD> - print information about the solver used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view </B></TD><TD> - print information about the solver used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view_mat binary </B></TD><TD> - save the matrix to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view_mat binary </B></TD><TD> - save the matrix to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view_rhs binary </B></TD><TD> - save right hand side vector to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view_rhs binary </B></TD><TD> - save right hand side vector to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view_solution binary </B></TD><TD> - save computed solution vector to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view_solution binary </B></TD><TD> - save computed solution vector to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -58,4 +58,5 @@ The function f is specified with <A HREF="../MFN/MFNSetFN.html#MFNSetFN">MFNSetF
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/mfn/examples/tutorials/ex23.c.html">src/mfn/examples/tutorials/ex23.c.html</A><BR>
+<A HREF="../../../src/mfn/examples/tutorials/ex26.c.html">src/mfn/examples/tutorials/ex26.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/MFN/MFNType.html b/docs/manualpages/MFN/MFNType.html
index b15b1e7..2483d9c 100644
--- a/docs/manualpages/MFN/MFNType.html
+++ b/docs/manualpages/MFN/MFNType.html
@@ -6,8 +6,8 @@
 <TITLE>MFNType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNType</H1>
 String with the name of a method for computing matrix functions. 
@@ -15,6 +15,7 @@ String with the name of a method for computing matrix functions.
 <PRE>
 typedef const char* <A HREF="../MFN/MFNType.html#MFNType">MFNType</A>;
 #define MFNKRYLOV   "krylov"
+#define MFNEXPOKIT  "expokit"
 
 </PRE>
 
diff --git a/docs/manualpages/MFN/MFNView.html b/docs/manualpages/MFN/MFNView.html
index a92b3b0..e9a62bd 100644
--- a/docs/manualpages/MFN/MFNView.html
+++ b/docs/manualpages/MFN/MFNView.html
@@ -6,35 +6,35 @@
 <TITLE>MFNView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/MFNView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/MFNView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>MFNView</H1>
 Prints the <A HREF="../MFN/MFN.html#MFN">MFN</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcmfn.h" 
-PetscErrorCode <A HREF="../MFN/MFNView.html#MFNView">MFNView</A>(<A HREF="../MFN/MFN.html#MFN">MFN</A> mfn,PetscViewer viewer)
+PetscErrorCode MFNView(MFN mfn,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../MFN/MFN.html#MFN">MFN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mfn </B></TD><TD> - the matrix function solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-mfn_view </B> - Calls <A HREF="../MFN/MFNView.html#MFNView">MFNView</A>() at end of <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-mfn_view </B></TD><TD> - Calls <A HREF="../MFN/MFNView.html#MFNView">MFNView</A>() at end of <A HREF="../MFN/MFNSolve.html#MFNSolve">MFNSolve</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/MFN/index.html b/docs/manualpages/MFN/index.html
index f7d0905..2663f79 100644
--- a/docs/manualpages/MFN/index.html
+++ b/docs/manualpages/MFN/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/MFN/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/MFN/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
@@ -18,50 +18,54 @@ Matrix Function (MFN) is the object provided by SLEPc for computing the action o
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./MFNCreate.html">MFNCreate</A></TD>
+ <TD WIDTH=250><A HREF="./MFN.html">MFN</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetFN.html">MFNSetFN</A></TD>
- <TD WIDTH=250><A HREF="./MFNSolve.html">MFNSolve</A></TD>
+ <TD WIDTH=250><A HREF="./MFNType.html">MFNType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./MFNDestroy.html">MFNDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./MFNCreate.html">MFNCreate</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetFromOptions.html">MFNSetFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./MFNType.html">MFNType</A></TD>
+ <TD WIDTH=250><A HREF="./MFNView.html">MFNView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./MFN.html">MFN</A></TD>
+ <TD WIDTH=250><A HREF="./MFNDestroy.html">MFNDestroy</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetOperator.html">MFNSetOperator</A></TD>
- <TD WIDTH=250><A HREF="./MFNView.html">MFNView</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./MFNGetFN.html">MFNGetFN</A></TD>
+ <TD WIDTH=250><A HREF="./MFNSolve.html">MFNSolve</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
  <TD WIDTH=250><A HREF="./MFNConvergedReason.html">MFNConvergedReason</A></TD>
- <TD WIDTH=250><A HREF="./MFNGetMonitorContext.html">MFNGetMonitorContext</A></TD>
+ <TD WIDTH=250><A HREF="./MFNGetOperator.html">MFNGetOperator</A></TD>
  <TD WIDTH=250><A HREF="./MFNMonitorSet.html">MFNMonitorSet</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNGetConvergedReason.html">MFNGetConvergedReason</A></TD>
- <TD WIDTH=250><A HREF="./MFNGetOperator.html">MFNGetOperator</A></TD>
+ <TD WIDTH=250><A HREF="./MFNGetTolerances.html">MFNGetTolerances</A></TD>
  <TD WIDTH=250><A HREF="./MFNReasonView.html">MFNReasonView</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNGetDimensions.html">MFNGetDimensions</A></TD>
- <TD WIDTH=250><A HREF="./MFNGetTolerances.html">MFNGetTolerances</A></TD>
+ <TD WIDTH=250><A HREF="./MFNGetType.html">MFNGetType</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetDimensions.html">MFNSetDimensions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNGetErrorIfNotConverged.html">MFNGetErrorIfNotConverged</A></TD>
- <TD WIDTH=250><A HREF="./MFNGetType.html">MFNGetType</A></TD>
- <TD WIDTH=250><A HREF="./MFNSetErrorIfNotConverged.html">MFNSetErrorIfNotConverged</A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./MFNGetFN.html">MFNGetFN</A></TD>
  <TD WIDTH=250><A HREF="./MFNMonitorCancel.html">MFNMonitorCancel</A></TD>
- <TD WIDTH=250><A HREF="./MFNSetTolerances.html">MFNSetTolerances</A></TD>
+ <TD WIDTH=250><A HREF="./MFNSetErrorIfNotConverged.html">MFNSetErrorIfNotConverged</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNGetIterationNumber.html">MFNGetIterationNumber</A></TD>
  <TD WIDTH=250><A HREF="./MFNMonitorDefault.html">MFNMonitorDefault</A></TD>
+ <TD WIDTH=250><A HREF="./MFNSetTolerances.html">MFNSetTolerances</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./MFNGetMonitorContext.html">MFNGetMonitorContext</A></TD>
+ <TD WIDTH=250><A HREF="./MFNMonitorLGCreate.html">MFNMonitorLGCreate</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetType.html">MFNSetType</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./MFNAppendOptionsPrefix.html">MFNAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./MFNRegisterAll.html">MFNRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./MFNRegister.html">MFNRegister</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetBV.html">MFNSetBV</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNGetBV.html">MFNGetBV</A></TD>
- <TD WIDTH=250><A HREF="./MFNRegister.html">MFNRegister</A></TD>
+ <TD WIDTH=250><A HREF="./MFNRegisterAll.html">MFNRegisterAll</A></TD>
  <TD WIDTH=250><A HREF="./MFNSetOptionsPrefix.html">MFNSetOptionsPrefix</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNGetOptionsPrefix.html">MFNGetOptionsPrefix</A></TD>
@@ -71,11 +75,11 @@ Matrix Function (MFN) is the object provided by SLEPc for computing the action o
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./MFNAllocateSolution.html">MFNAllocateSolution</A></TD>
  <TD WIDTH=250><A HREF="./MFNInitializePackage.html">MFNInitializePackage</A></TD>
- <TD WIDTH=250><A HREF="./MFNSetUp.html">MFNSetUp</A></TD>
+ <TD WIDTH=250><A HREF="./MFNReasonViewFromOptions.html">MFNReasonViewFromOptions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./MFNFinalizePackage.html">MFNFinalizePackage</A></TD>
- <TD WIDTH=250><A HREF="./MFNReasonViewFromOptions.html">MFNReasonViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./MFNMonitorSetFromOptions.html">MFNMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./MFNSetUp.html">MFNSetUp</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>No deprecated routines</B></TD></TR>
 </TABLE>
diff --git a/docs/manualpages/NEP/NEP.html b/docs/manualpages/NEP/NEP.html
index 52c302f..be9b56a 100644
--- a/docs/manualpages/NEP/NEP.html
+++ b/docs/manualpages/NEP/NEP.html
@@ -6,8 +6,8 @@
 <TITLE>NEP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEP</H1>
 Abstract SLEPc object that manages all solvers for nonlinear eigenvalue problems. 
@@ -28,4 +28,6 @@ typedef struct _p_NEP* <A HREF="../NEP/NEP.html#NEP">NEP</A>;
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPAllocateSolution.html b/docs/manualpages/NEP/NEPAllocateSolution.html
index 3fa9308..448b045 100644
--- a/docs/manualpages/NEP/NEPAllocateSolution.html
+++ b/docs/manualpages/NEP/NEPAllocateSolution.html
@@ -6,23 +6,23 @@
 <TITLE>NEPAllocateSolution</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPAllocateSolution</H1>
 Allocate memory storage for common variables such as eigenvalues and eigenvectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt extra)
+PetscErrorCode NEPAllocateSolution(NEP nep,PetscInt extra)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
 working basis slightly larger than ncv
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/NEP/NEPAppendOptionsPrefix.html b/docs/manualpages/NEP/NEPAppendOptionsPrefix.html
index 91c28d2..3d5263b 100644
--- a/docs/manualpages/NEP/NEPAppendOptionsPrefix.html
+++ b/docs/manualpages/NEP/NEPAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>NEPAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../NEP/NEP.html#NEP">NEP</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,const char *prefix)
+PetscErrorCode NEPAppendOptionsPrefix(NEP nep,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../NEP/NEP.html#NEP">NEP</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../NEP/NEP.html#NEP">NEP</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPApplyFunction.html b/docs/manualpages/NEP/NEPApplyFunction.html
index cf36c36..5886aca 100644
--- a/docs/manualpages/NEP/NEPApplyFunction.html
+++ b/docs/manualpages/NEP/NEPApplyFunction.html
@@ -6,36 +6,36 @@
 <TITLE>NEPApplyFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPApplyFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPApplyFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPApplyFunction</H1>
 Applies the nonlinear function T(lambda) to a given vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A,Mat B)
+PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A,Mat B)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - scalar argument
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - scalar argument
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x      </B></TD><TD> - vector to be multiplied against
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x      </B></TD><TD> - vector to be multiplied against
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v      </B></TD><TD> - workspace vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v      </B></TD><TD> - workspace vector (used only in the case of split form)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y   </B></TD><TD> - result vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y   </B></TD><TD> - result vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Function matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Function matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - optional preconditioning matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - optional preconditioning matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPApplyJacobian.html b/docs/manualpages/NEP/NEPApplyJacobian.html
index 3a28046..64a1bd1 100644
--- a/docs/manualpages/NEP/NEPApplyJacobian.html
+++ b/docs/manualpages/NEP/NEPApplyJacobian.html
@@ -6,34 +6,34 @@
 <TITLE>NEPApplyJacobian</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPApplyJacobian.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPApplyJacobian.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPApplyJacobian</H1>
 Applies the nonlinear Jacobian T'(lambda) to a given vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)
+PetscErrorCode NEPApplyJacobian(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - scalar argument
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - scalar argument
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x      </B></TD><TD> - vector to be multiplied against
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x      </B></TD><TD> - vector to be multiplied against
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v      </B></TD><TD> - workspace vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v      </B></TD><TD> - workspace vector (used only in the case of split form)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y   </B></TD><TD> - result vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y   </B></TD><TD> - result vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Jacobian matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Jacobian matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPCISSGetRefinement.html b/docs/manualpages/NEP/NEPCISSGetRefinement.html
index f25cc75..80f173b 100644
--- a/docs/manualpages/NEP/NEPCISSGetRefinement.html
+++ b/docs/manualpages/NEP/NEPCISSGetRefinement.html
@@ -6,29 +6,27 @@
 <TITLE>NEPCISSGetRefinement</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCISSGetRefinement.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCISSGetRefinement.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCISSGetRefinement</H1>
 Gets the values of various refinement parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep, PetscInt *inner, PetscInt *outer,PetscInt *blsize)
+PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *blsize)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>outer  </B></TD><TD> - number of iterative refinement iterations (outer loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPCISSGetSizes.html b/docs/manualpages/NEP/NEPCISSGetSizes.html
index 2f94ccd..ddefe5b 100644
--- a/docs/manualpages/NEP/NEPCISSGetSizes.html
+++ b/docs/manualpages/NEP/NEPCISSGetSizes.html
@@ -6,35 +6,35 @@
 <TITLE>NEPCISSGetSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCISSGetSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCISSGetSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCISSGetSizes</H1>
 Gets the values of various size parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)
+PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>isreal </B></TD><TD> - A and B are real
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>realmats </B></TD><TD> - T(z) is real for real z
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPCISSGetThreshold.html b/docs/manualpages/NEP/NEPCISSGetThreshold.html
index c1e9a9d..3b994c2 100644
--- a/docs/manualpages/NEP/NEPCISSGetThreshold.html
+++ b/docs/manualpages/NEP/NEPCISSGetThreshold.html
@@ -6,27 +6,27 @@
 <TITLE>NEPCISSGetThreshold</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCISSGetThreshold.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCISSGetThreshold.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCISSGetThreshold</H1>
 Gets the values of various threshold parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscReal *delta,PetscReal *spur)
+PetscErrorCode NEPCISSGetThreshold(NEP nep,PetscReal *delta,PetscReal *spur)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPCISSSetRefinement.html b/docs/manualpages/NEP/NEPCISSSetRefinement.html
index 9cf01e8..b45c0a2 100644
--- a/docs/manualpages/NEP/NEPCISSSetRefinement.html
+++ b/docs/manualpages/NEP/NEPCISSSetRefinement.html
@@ -6,36 +6,32 @@
 <TITLE>NEPCISSSetRefinement</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCISSSetRefinement.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCISSSetRefinement.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCISSSetRefinement</H1>
 Sets the values of various refinement parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt inner,PetscInt outer,PetscInt blsize)
+PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt blsize)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inner  </B></TD><TD> - number of iterative refinement iterations (inner loop)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>outer  </B></TD><TD> - number of iterative refinement iterations (outer loop)
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>blsize </B></TD><TD> - number of iterative refinement iterations (blocksize loop)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_refine_inner </B></TD><TD> - Sets number of inner iterations
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_refine_outer </B></TD><TD> - Sets number of outer iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_refine_inner </B></TD><TD> - Sets number of inner iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_refine_blocksize </B></TD><TD> - Sets number of blocksize iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_refine_blocksize </B></TD><TD> - Sets number of blocksize iterations
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPCISSSetSizes.html b/docs/manualpages/NEP/NEPCISSSetSizes.html
index e42302a..eae3d74 100644
--- a/docs/manualpages/NEP/NEPCISSSetSizes.html
+++ b/docs/manualpages/NEP/NEPCISSSetSizes.html
@@ -6,48 +6,48 @@
 <TITLE>NEPCISSSetSizes</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCISSSetSizes.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCISSSetSizes.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCISSSetSizes</H1>
 Sets the values of various size parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)
+PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ip    </B></TD><TD> - number of integration points
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs    </B></TD><TD> - block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ms    </B></TD><TD> - moment size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart </B></TD><TD> - number of partitions when splitting the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bsmax </B></TD><TD> - max block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>isreal </B></TD><TD> - A and B are real
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>realmats </B></TD><TD> - T(z) is real for real z
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_integration_points </B></TD><TD> - Sets the number of integration points
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_integration_points </B></TD><TD> - Sets the number of integration points
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_blocksize </B></TD><TD> - Sets the block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_blocksize </B></TD><TD> - Sets the block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_moments </B></TD><TD> - Sets the moment size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_moments </B></TD><TD> - Sets the moment size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_partitions </B></TD><TD> - Sets the number of partitions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_partitions </B></TD><TD> - Sets the number of partitions
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_maxblocksize </B></TD><TD> - Sets the maximum block size
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_maxblocksize </B></TD><TD> - Sets the maximum block size
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_realmats </B></TD><TD> - A and B are real
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_realmats </B></TD><TD> - T(z) is real for real z
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
@@ -55,6 +55,10 @@ The default number of partitions is 1. This means the internal KSP object is sha
 among all processes of the <A HREF="../NEP/NEP.html#NEP">NEP</A> communicator. Otherwise, the communicator is split
 into npart communicators, so that npart KSP solves proceed simultaneously.
 <P>
+The realmats flag can be set to true when T(.) is guaranteed to be real
+when the argument is a real value, for example, when all matrices in
+the split form are real. When set to true, the solver avoids some computations.
+<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPCISSSetThreshold.html b/docs/manualpages/NEP/NEPCISSSetThreshold.html
index 8592ee6..a214f53 100644
--- a/docs/manualpages/NEP/NEPCISSSetThreshold.html
+++ b/docs/manualpages/NEP/NEPCISSSetThreshold.html
@@ -6,32 +6,32 @@
 <TITLE>NEPCISSSetThreshold</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCISSSetThreshold.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCISSSetThreshold.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCISSSetThreshold</H1>
 Sets the values of various threshold parameters in the CISS solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscReal delta,PetscReal spur)
+PetscErrorCode NEPCISSSetThreshold(NEP nep,PetscReal delta,PetscReal spur)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>delta </B></TD><TD> - threshold for numerical rank
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>spur  </B></TD><TD> - spurious threshold (to discard spurious eigenpairs)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_delta </B></TD><TD> - Sets the delta
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_delta </B></TD><TD> - Sets the delta
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_spurious_threshold </B></TD><TD> - Sets the spurious threshold
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ciss_spurious_threshold </B></TD><TD> - Sets the spurious threshold
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPComputeError.html b/docs/manualpages/NEP/NEPComputeError.html
index ceb92a8..c650093 100644
--- a/docs/manualpages/NEP/NEPComputeError.html
+++ b/docs/manualpages/NEP/NEPComputeError.html
@@ -6,30 +6,30 @@
 <TITLE>NEPComputeError</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPComputeError.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPComputeError.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPComputeError</H1>
 Computes the error (based on the residual norm) associated with the i-th computed eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt i,<A HREF="../NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</A> type,PetscReal *error)
+PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *error)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep  </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep  </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>error </B> - the error
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>error </B></TD><TD> - the error
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The error can be computed in various ways, all of them based on the residual
diff --git a/docs/manualpages/NEP/NEPComputeFunction.html b/docs/manualpages/NEP/NEPComputeFunction.html
index f83ea84..5b2e4e7 100644
--- a/docs/manualpages/NEP/NEPComputeFunction.html
+++ b/docs/manualpages/NEP/NEPComputeFunction.html
@@ -6,30 +6,30 @@
 <TITLE>NEPComputeFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPComputeFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPComputeFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPComputeFunction</H1>
 Computes the function matrix T(lambda) that has been set with <A HREF="../NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar lambda,Mat A,Mat B)
+PetscErrorCode NEPComputeFunction(NEP nep,PetscScalar lambda,Mat A,Mat B)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - the scalar argument
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - the scalar argument
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Function matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Function matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - optional preconditioning matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - optional preconditioning matrix
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPComputeJacobian.html b/docs/manualpages/NEP/NEPComputeJacobian.html
index 8f8e9c8..933f48d 100644
--- a/docs/manualpages/NEP/NEPComputeJacobian.html
+++ b/docs/manualpages/NEP/NEPComputeJacobian.html
@@ -6,28 +6,28 @@
 <TITLE>NEPComputeJacobian</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPComputeJacobian.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPComputeJacobian.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPComputeJacobian</H1>
 Computes the Jacobian matrix T'(lambda) that has been set with <A HREF="../NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar lambda,Mat A)
+PetscErrorCode NEPComputeJacobian(NEP nep,PetscScalar lambda,Mat A)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - the scalar argument
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - the scalar argument
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>A   </B> - Jacobian matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Jacobian matrix
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Most users should not need to explicitly call this routine, as it
diff --git a/docs/manualpages/NEP/NEPConv.html b/docs/manualpages/NEP/NEPConv.html
new file mode 100644
index 0000000..95c99e1
--- /dev/null
+++ b/docs/manualpages/NEP/NEPConv.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPConv.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPConv</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPConv.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPConv</H1>
+Determines the convergence test 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { NEP_CONV_ABS,
+               NEP_CONV_REL,
+               NEP_CONV_NORM,
+               NEP_CONV_USER } <A HREF="../NEP/NEPConv.html#NEPConv">NEPConv</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</A>(), <A HREF="../NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/../../include/slepcnep.h.html#NEPConv">src/nep/../../include/slepcnep.h</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html b/docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html
new file mode 100644
index 0000000..b6811df
--- /dev/null
+++ b/docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPConvMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPConvMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user (for monitors that only show iteration numbers of convergence). 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPConvMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))
+</PRE>
+Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep      </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a SlepcConvMonitor
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>(), <A HREF="../NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPConvMonitorSetFromOptions">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPConvergedReason.html b/docs/manualpages/NEP/NEPConvergedReason.html
index 78eee59..5cd47f2 100644
--- a/docs/manualpages/NEP/NEPConvergedReason.html
+++ b/docs/manualpages/NEP/NEPConvergedReason.html
@@ -6,23 +6,21 @@
 <TITLE>NEPConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPConvergedReason</H1>
 Reason a nonlinear eigensolver was said to have converged or diverged 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum {/* converged */
-              NEP_CONVERGED_FNORM_ABS          =  2,
-              NEP_CONVERGED_FNORM_RELATIVE     =  3,
-              NEP_CONVERGED_SNORM_RELATIVE     =  4,
+              NEP_CONVERGED_TOL                =  1,
+              NEP_CONVERGED_USER               =  2,
               /* diverged */
-              NEP_DIVERGED_LINEAR_SOLVE        = -1,
-              NEP_DIVERGED_FUNCTION_COUNT      = -2,
-              NEP_DIVERGED_MAX_IT              = -3,
-              NEP_DIVERGED_BREAKDOWN           = -4,
-              NEP_DIVERGED_FNORM_NAN           = -5,
+              NEP_DIVERGED_ITS                 = -1,
+              NEP_DIVERGED_BREAKDOWN           = -2,
+                    /* unused                  = -3 */
+              NEP_DIVERGED_LINEAR_SOLVE        = -4,
               NEP_CONVERGED_ITERATING          =  0} <A HREF="../NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</A>;
 </PRE>
 
diff --git a/docs/manualpages/NEP/NEPCreate.html b/docs/manualpages/NEP/NEPCreate.html
index 8617dcd..ab25c7c 100644
--- a/docs/manualpages/NEP/NEPCreate.html
+++ b/docs/manualpages/NEP/NEPCreate.html
@@ -6,25 +6,25 @@
 <TITLE>NEPCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPCreate</H1>
 Creates the default <A HREF="../NEP/NEP.html#NEP">NEP</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>(MPI_Comm comm,<A HREF="../NEP/NEP.html#NEP">NEP</A> *outnep)
+PetscErrorCode NEPCreate(MPI_Comm comm,NEP *outnep)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nep </B> - location to put the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - location to put the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -38,4 +38,7 @@ Collective on MPI_Comm
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPDestroy.html b/docs/manualpages/NEP/NEPDestroy.html
index e148261..3bab321 100644
--- a/docs/manualpages/NEP/NEPDestroy.html
+++ b/docs/manualpages/NEP/NEPDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>NEPDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPDestroy</H1>
 Destroys the <A HREF="../NEP/NEP.html#NEP">NEP</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> *nep)
+PetscErrorCode NEPDestroy(NEP *nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -34,4 +34,7 @@ Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPErrorType.html b/docs/manualpages/NEP/NEPErrorType.html
index b44427e..7606b32 100644
--- a/docs/manualpages/NEP/NEPErrorType.html
+++ b/docs/manualpages/NEP/NEPErrorType.html
@@ -6,15 +6,16 @@
 <TITLE>NEPErrorType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPErrorType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPErrorType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPErrorType</H1>
 The error type used to assess accuracy of computed solutions 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum { NEP_ERROR_ABSOLUTE,
-               NEP_ERROR_RELATIVE } <A HREF="../NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</A>;
+               NEP_ERROR_RELATIVE,
+               NEP_ERROR_BACKWARD } <A HREF="../NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</A>;
 </PRE>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPErrorView.html b/docs/manualpages/NEP/NEPErrorView.html
index 589a2b7..87033fa 100644
--- a/docs/manualpages/NEP/NEPErrorView.html
+++ b/docs/manualpages/NEP/NEPErrorView.html
@@ -6,32 +6,34 @@
 <TITLE>NEPErrorView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPErrorView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPErrorView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPErrorView</H1>
 Displays the errors associated with the computed solution (as well as the eigenvalues). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</A> etype,PetscViewer viewer)
+PetscErrorCode NEPErrorView(NEP nep,NEPErrorType etype,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_relative </B></TD><TD> - print relative errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_relative </B></TD><TD> - print relative errors of each eigenpair
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_backward </B></TD><TD> - print backward errors of each eigenpair
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -51,4 +53,7 @@ eigenvalues and corresponding errors is printed.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPErrorViewFromOptions.html b/docs/manualpages/NEP/NEPErrorViewFromOptions.html
index 8634b07..3592c3b 100644
--- a/docs/manualpages/NEP/NEPErrorViewFromOptions.html
+++ b/docs/manualpages/NEP/NEPErrorViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>NEPErrorViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPErrorViewFromOptions</H1>
 Processes command line options to determine if/how the errors of the computed solution are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPErrorViewFromOptions(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepview.c.html#NEPErrorViewFromOptions">src/nep/interface/nepview.c</A>
diff --git a/docs/manualpages/NEP/NEPFinalizePackage.html b/docs/manualpages/NEP/NEPFinalizePackage.html
index 771673d..1a7d89d 100644
--- a/docs/manualpages/NEP/NEPFinalizePackage.html
+++ b/docs/manualpages/NEP/NEPFinalizePackage.html
@@ -6,14 +6,14 @@
 <TITLE>NEPFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../NEP/NEP.html#NEP">NEP</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</A>(void)
+PetscErrorCode NEPFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPGetBV.html b/docs/manualpages/NEP/NEPGetBV.html
index a273f75..72b8e5b 100644
--- a/docs/manualpages/NEP/NEPGetBV.html
+++ b/docs/manualpages/NEP/NEPGetBV.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetBV</H1>
 Obtain the basis vectors object associated to the nonlinear eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../BV/BV.html#BV">BV</A> *bv)
+PetscErrorCode NEPGetBV(NEP nep,BV *bv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bv </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPGetConstCorrectionTol.html b/docs/manualpages/NEP/NEPGetConstCorrectionTol.html
deleted file mode 100644
index fb28e1d..0000000
--- a/docs/manualpages/NEP/NEPGetConstCorrectionTol.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPGetConstCorrectionTol.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>NEPGetConstCorrectionTol</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>NEPGetConstCorrectionTol</H1>
-Returns the constant tolerance flag. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetConstCorrectionTol.html#NEPGetConstCorrectionTol">NEPGetConstCorrectionTol</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscBool *cct)
-</PRE>
-Not Collective
-<P>
-<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
-<br>
-<P>
-<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>cct </B> - the value of the constant tolerance flag
-<br>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPGetConstCorrectionTol">src/nep/interface/nepopts.c</A>
-<BR><A HREF="./index.html">Index of all NEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetConverged.html b/docs/manualpages/NEP/NEPGetConverged.html
index a798638..c1390cd 100644
--- a/docs/manualpages/NEP/NEPGetConverged.html
+++ b/docs/manualpages/NEP/NEPGetConverged.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetConverged</H1>
 Gets the number of converged eigenpairs. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *nconv)
+PetscErrorCode NEPGetConverged(NEP nep,PetscInt *nconv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nconv </B> - number of converged eigenpairs
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv </B></TD><TD> - number of converged eigenpairs
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 This function should be called after <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>() has finished.
diff --git a/docs/manualpages/NEP/NEPGetConvergedReason.html b/docs/manualpages/NEP/NEPGetConvergedReason.html
index bb9b2ae..937b33c 100644
--- a/docs/manualpages/NEP/NEPGetConvergedReason.html
+++ b/docs/manualpages/NEP/NEPGetConvergedReason.html
@@ -6,43 +6,37 @@
 <TITLE>NEPGetConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetConvergedReason</H1>
 Gets the reason why the <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>() iteration was stopped. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</A> *reason)
+PetscErrorCode NEPGetConvergedReason(NEP nep,NEPConvergedReason *reason)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>reason </B> - negative value indicates diverged, positive value converged
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - negative value indicates diverged, positive value converged
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values for reason</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONVERGED_FNORM_ABS </B></TD><TD> - function norm satisfied absolute tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONVERGED_FNORM_RELATIVE </B></TD><TD> - function norm satisfied relative tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONVERGED_SNORM_RELATIVE </B></TD><TD> - step norm satisfied relative tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_LINEAR_SOLVE </B></TD><TD> - inner linear solve failed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_FUNCTION_COUNT </B></TD><TD> - reached maximum allowed function evaluations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONVERGED_USER </B></TD><TD> - converged due to a user-defined condition
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_MAX_IT </B></TD><TD> - required more than its to reach convergence
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_ITS </B></TD><TD> - required more than max_it iterations to reach convergence
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_FNORM_NAN </B></TD><TD> - Inf or NaN detected in function evaluation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_DIVERGED_LINEAR_SOLVE </B></TD><TD> - inner linear solve failed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPGetConvergenceTest.html b/docs/manualpages/NEP/NEPGetConvergenceTest.html
new file mode 100644
index 0000000..607db87
--- /dev/null
+++ b/docs/manualpages/NEP/NEPGetConvergenceTest.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPGetConvergenceTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPGetConvergenceTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPGetConvergenceTest</H1>
+Gets the method used to compute the error estimate used in the convergence test. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPGetConvergenceTest(NEP nep,NEPConv *conv)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv  </B></TD><TD> - the type of convergence test
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</A>(), <A HREF="../NEP/NEPConv.html#NEPConv">NEPConv</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPGetConvergenceTest">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetDS.html b/docs/manualpages/NEP/NEPGetDS.html
index 9e544a6..54b087d 100644
--- a/docs/manualpages/NEP/NEPGetDS.html
+++ b/docs/manualpages/NEP/NEPGetDS.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetDS</H1>
 Obtain the direct solver object associated to the nonlinear eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../DS/DS.html#DS">DS</A> *ds)
+PetscErrorCode NEPGetDS(NEP nep,DS *ds)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ds </B> - direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPGetDerivatives.html b/docs/manualpages/NEP/NEPGetDerivatives.html
new file mode 100644
index 0000000..92a1a3a
--- /dev/null
+++ b/docs/manualpages/NEP/NEPGetDerivatives.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPGetDerivatives.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPGetDerivatives</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetDerivatives.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPGetDerivatives</H1>
+Returns the derivatives matrix and optionally the user provided routine and context for evaluating the derivatives. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPGetDerivatives(NEP nep,Mat *A,PetscErrorCode (**der)(NEP,PetscScalar,PetscInt,Mat,void*),void **ctx)
+</PRE>
+Not Collective, but Mat object will be parallel if <A HREF="../NEP/NEP.html#NEP">NEP</A> object is
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - location to stash the derivatives matrix (or NULL)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>der </B></TD><TD> - location to put derivatives function (or NULL)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - location to stash derivatives context (or NULL)
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetDerivatives.html#NEPSetDerivatives">NEPSetDerivatives</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepbasic.c.html#NEPGetDerivatives">src/nep/interface/nepbasic.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetDimensions.html b/docs/manualpages/NEP/NEPGetDimensions.html
index 1f871c1..9cd43f5 100644
--- a/docs/manualpages/NEP/NEPGetDimensions.html
+++ b/docs/manualpages/NEP/NEPGetDimensions.html
@@ -6,29 +6,29 @@
 <TITLE>NEPGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetDimensions</H1>
 Gets the number of eigenvalues to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
+PetscErrorCode NEPGetDimensions(NEP nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -46,4 +46,5 @@ The user can specify NULL for any parameter that is not needed.
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetEigenpair.html b/docs/manualpages/NEP/NEPGetEigenpair.html
index 89ec847..f355455 100644
--- a/docs/manualpages/NEP/NEPGetEigenpair.html
+++ b/docs/manualpages/NEP/NEPGetEigenpair.html
@@ -6,34 +6,34 @@
 <TITLE>NEPGetEigenpair</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetEigenpair.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetEigenpair.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetEigenpair</H1>
 Gets the i-th solution of the eigenproblem as computed by <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>(). The solution consists in both the eigenvalue and the eigenvector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)
+PetscErrorCode NEPGetEigenpair(NEP nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPGetErrorEstimate.html b/docs/manualpages/NEP/NEPGetErrorEstimate.html
index 61a9dc9..b12d73d 100644
--- a/docs/manualpages/NEP/NEPGetErrorEstimate.html
+++ b/docs/manualpages/NEP/NEPGetErrorEstimate.html
@@ -6,28 +6,28 @@
 <TITLE>NEPGetErrorEstimate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetErrorEstimate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetErrorEstimate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetErrorEstimate</H1>
 Returns the error estimate associated to the i-th computed eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt i,PetscReal *errest)
+PetscErrorCode NEPGetErrorEstimate(NEP nep,PetscInt i,PetscReal *errest)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of eigenpair
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>errest </B> - the error estimate
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - the error estimate
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is the error estimate used internally by the eigensolver. The actual
diff --git a/docs/manualpages/NEP/NEPGetFunction.html b/docs/manualpages/NEP/NEPGetFunction.html
index 9beba8b..0aabadc 100644
--- a/docs/manualpages/NEP/NEPGetFunction.html
+++ b/docs/manualpages/NEP/NEPGetFunction.html
@@ -6,31 +6,31 @@
 <TITLE>NEPGetFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetFunction</H1>
 Returns the Function matrix and optionally the user provided context for evaluating the Function. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,Mat *A,Mat *B,PetscErrorCode (**fun)(<A HREF="../NEP/NEP.html#NEP">NEP</A>,PetscScalar,Mat,Mat,void*),void **ctx)
+PetscErrorCode NEPGetFunction(NEP nep,Mat *A,Mat *B,PetscErrorCode (**fun)(NEP,PetscScalar,Mat,Mat,void*),void **ctx)
 </PRE>
 Not Collective, but Mat object will be parallel if <A HREF="../NEP/NEP.html#NEP">NEP</A> object is
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - location to stash Function matrix (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - location to stash Function matrix (or NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - location to stash preconditioner matrix (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - location to stash preconditioner matrix (or NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fun </B></TD><TD> - location to put Function function (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fun </B></TD><TD> - location to put Function function (or NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - location to stash Function context (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - location to stash Function context (or NULL)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPGetIterationNumber.html b/docs/manualpages/NEP/NEPGetIterationNumber.html
index e31208d..bfe11ad 100644
--- a/docs/manualpages/NEP/NEPGetIterationNumber.html
+++ b/docs/manualpages/NEP/NEPGetIterationNumber.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetIterationNumber</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetIterationNumber</H1>
 Gets the current iteration number. If the call to <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>() is complete, then it returns the number of iterations carried out by the solution method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *its)
+PetscErrorCode NEPGetIterationNumber(NEP nep,PetscInt *its)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>its </B> - number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -43,6 +43,4 @@ failed and why.
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
-<A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
-<A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetJacobian.html b/docs/manualpages/NEP/NEPGetJacobian.html
index cd7d8e6..50ac082 100644
--- a/docs/manualpages/NEP/NEPGetJacobian.html
+++ b/docs/manualpages/NEP/NEPGetJacobian.html
@@ -6,29 +6,29 @@
 <TITLE>NEPGetJacobian</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetJacobian.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetJacobian.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetJacobian</H1>
-Returns the Jacobian matrix and optionally the user provided context for evaluating the Jacobian. 
+Returns the Jacobian matrix and optionally the user provided routine and context for evaluating the Jacobian. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,Mat *A,PetscErrorCode (**jac)(<A HREF="../NEP/NEP.html#NEP">NEP</A>,PetscScalar,Mat,void*),void **ctx)
+PetscErrorCode NEPGetJacobian(NEP nep,Mat *A,PetscErrorCode (**jac)(NEP,PetscScalar,Mat,void*),void **ctx)
 </PRE>
 Not Collective, but Mat object will be parallel if <A HREF="../NEP/NEP.html#NEP">NEP</A> object is
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - location to stash Jacobian matrix (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - location to stash Jacobian matrix (or NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>jac </B></TD><TD> - location to put Jacobian function (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>jac </B></TD><TD> - location to put Jacobian function (or NULL)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - location to stash Jacobian context (or NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - location to stash Jacobian context (or NULL)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPGetKSP.html b/docs/manualpages/NEP/NEPGetKSP.html
deleted file mode 100644
index 6d5cd02..0000000
--- a/docs/manualpages/NEP/NEPGetKSP.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPGetKSP.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>NEPGetKSP</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetKSP.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>NEPGetKSP</H1>
-Obtain the linear solver (KSP) object associated to the eigensolver object. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,KSP *ksp)
-</PRE>
-Not Collective
-<P>
-<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
-<P>
-<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ksp </B> - linear solver context
-<br>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPSetKSP.html#NEPSetKSP">NEPSetKSP</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepbasic.c.html#NEPGetKSP">src/nep/interface/nepbasic.c</A>
-<BR><A HREF="./index.html">Index of all NEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
-<A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
-</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetLagPreconditioner.html b/docs/manualpages/NEP/NEPGetLagPreconditioner.html
deleted file mode 100644
index f3c5b9d..0000000
--- a/docs/manualpages/NEP/NEPGetLagPreconditioner.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPGetLagPreconditioner.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>NEPGetLagPreconditioner</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetLagPreconditioner.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>NEPGetLagPreconditioner</H1>
-Indicates how often the preconditioner is rebuilt. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetLagPreconditioner.html#NEPGetLagPreconditioner">NEPGetLagPreconditioner</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *lag)
-</PRE>
-Not Collective
-<P>
-<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
-<br>
-<P>
-<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>lag </B> - the lag parameter
-<br>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPGetLagPreconditioner">src/nep/interface/nepopts.c</A>
-<BR><A HREF="./index.html">Index of all NEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetMonitorContext.html b/docs/manualpages/NEP/NEPGetMonitorContext.html
index 74146fa..793e8e4 100644
--- a/docs/manualpages/NEP/NEPGetMonitorContext.html
+++ b/docs/manualpages/NEP/NEPGetMonitorContext.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetMonitorContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetMonitorContext</H1>
 Gets the monitor context, as set by <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>() for the FIRST monitor only. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,void **ctx)
+PetscErrorCode NEPGetMonitorContext(NEP nep,void **ctx)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ctx </B> - monitor context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - monitor context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPGetOptionsPrefix.html b/docs/manualpages/NEP/NEPGetOptionsPrefix.html
index a780c06..cf3f7c7 100644
--- a/docs/manualpages/NEP/NEPGetOptionsPrefix.html
+++ b/docs/manualpages/NEP/NEPGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>NEPGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../NEP/NEP.html#NEP">NEP</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,const char *prefix[])
+PetscErrorCode NEPGetOptionsPrefix(NEP nep,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/NEP/NEPGetRG.html b/docs/manualpages/NEP/NEPGetRG.html
index 68c0f96..173cf3c 100644
--- a/docs/manualpages/NEP/NEPGetRG.html
+++ b/docs/manualpages/NEP/NEPGetRG.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetRG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetRG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetRG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetRG</H1>
 Obtain the region object associated to the nonlinear eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../RG/RG.html#RG">RG</A> *rg)
+PetscErrorCode NEPGetRG(NEP nep,RG *rg)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>rg </B> - region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - region context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -34,4 +34,6 @@ Not Collective
 <BR><A HREF="./index.html">Index of all NEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetRefine.html b/docs/manualpages/NEP/NEPGetRefine.html
index 4500314..02e22ba 100644
--- a/docs/manualpages/NEP/NEPGetRefine.html
+++ b/docs/manualpages/NEP/NEPGetRefine.html
@@ -6,32 +6,35 @@
 <TITLE>NEPGetRefine</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetRefine.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetRefine.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetRefine</H1>
 Gets the refinement strategy used by the <A HREF="../NEP/NEP.html#NEP">NEP</A> object, and the associated parameters. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPRefine.html#NEPRefine">NEPRefine</A> *refine,PetscInt *npart,PetscReal *tol,PetscInt *its)
+PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,NEPRefineScheme *scheme)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
+</TD></TR></TABLE>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scheme </B></TD><TD> - the scheme used for solving linear systems
 </TD></TR></TABLE>
+</TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPGetSplitOperatorInfo.html b/docs/manualpages/NEP/NEPGetSplitOperatorInfo.html
index a1c2bb9..6e9dfdf 100644
--- a/docs/manualpages/NEP/NEPGetSplitOperatorInfo.html
+++ b/docs/manualpages/NEP/NEPGetSplitOperatorInfo.html
@@ -6,27 +6,27 @@
 <TITLE>NEPGetSplitOperatorInfo</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetSplitOperatorInfo.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetSplitOperatorInfo.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetSplitOperatorInfo</H1>
 Returns the number of terms of the split form of the nonlinear operator, as well as the structure flag for matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *n,MatStructure *str)
+PetscErrorCode NEPGetSplitOperatorInfo(NEP nep,PetscInt *n,MatStructure *str)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - the number of terms passed in <A HREF="../NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - the number of terms passed in <A HREF="../NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - the matrix structure flag passed in <A HREF="../NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - the matrix structure flag passed in <A HREF="../NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</A>()
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPGetSplitOperatorTerm.html b/docs/manualpages/NEP/NEPGetSplitOperatorTerm.html
index 17ef37c..a1c2ef0 100644
--- a/docs/manualpages/NEP/NEPGetSplitOperatorTerm.html
+++ b/docs/manualpages/NEP/NEPGetSplitOperatorTerm.html
@@ -6,30 +6,30 @@
 <TITLE>NEPGetSplitOperatorTerm</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetSplitOperatorTerm.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetSplitOperatorTerm.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetSplitOperatorTerm</H1>
 Gets the matrices and functions associated with the nonlinear operator in split form. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt k,Mat *A,<A HREF="../FN/FN.html#FN">FN</A> *f)
+PetscErrorCode NEPGetSplitOperatorTerm(NEP nep,PetscInt k,Mat *A,FN *f)
 </PRE>
 Not collective, though parallel Mats and FNs are returned if the <A HREF="../NEP/NEP.html#NEP">NEP</A> is parallel
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k   </B></TD><TD> - the index of the requested term (starting in 0)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k   </B></TD><TD> - the index of the requested term (starting in 0)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix of the requested term
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the matrix of the requested term
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f </B></TD><TD> - the function of the requested term
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f </B></TD><TD> - the function of the requested term
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPGetStoppingTest.html b/docs/manualpages/NEP/NEPGetStoppingTest.html
new file mode 100644
index 0000000..f58deb6
--- /dev/null
+++ b/docs/manualpages/NEP/NEPGetStoppingTest.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPGetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPGetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPGetStoppingTest</H1>
+Gets the method used to decide the termination of the outer loop of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPGetStoppingTest(NEP nep,NEPStop *stop)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop  </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</A>(), <A HREF="../NEP/NEPStop.html#NEPStop">NEPStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPGetStoppingTest">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetTarget.html b/docs/manualpages/NEP/NEPGetTarget.html
index 303e8b6..e76c9db 100644
--- a/docs/manualpages/NEP/NEPGetTarget.html
+++ b/docs/manualpages/NEP/NEPGetTarget.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetTarget</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetTarget.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetTarget.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetTarget</H1>
 Gets the value of the target. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar* target)
+PetscErrorCode NEPGetTarget(NEP nep,PetscScalar* target)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>target </B> - the value of the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If the target was not set by the user, then zero is returned.
diff --git a/docs/manualpages/NEP/NEPGetTolerances.html b/docs/manualpages/NEP/NEPGetTolerances.html
index 66140bb..10ea5ee 100644
--- a/docs/manualpages/NEP/NEPGetTolerances.html
+++ b/docs/manualpages/NEP/NEPGetTolerances.html
@@ -6,34 +6,27 @@
 <TITLE>NEPGetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetTolerances</H1>
 Gets the tolerance and maximum iteration count used by the <A HREF="../NEP/NEP.html#NEP">NEP</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf)
+PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *tol,PetscInt *maxits)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>abstol </B></TD><TD> - absolute convergence tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rtol   </B></TD><TD> - relative convergence tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stol   </B></TD><TD> - convergence tolerance in terms of the norm of the change in the
-solution between steps, || delta x || < stol*|| x ||
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxit  </B></TD><TD> - maximum number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxf   </B></TD><TD> - maximum number of function evaluations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPGetTrackAll.html b/docs/manualpages/NEP/NEPGetTrackAll.html
index 032e736..a87e6c6 100644
--- a/docs/manualpages/NEP/NEPGetTrackAll.html
+++ b/docs/manualpages/NEP/NEPGetTrackAll.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetTrackAll</H1>
 Returns the flag indicating whether all residual norms must be computed or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscBool *trackall)
+PetscErrorCode NEPGetTrackAll(NEP nep,PetscBool *trackall)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>trackall </B> - the returned flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPGetType.html b/docs/manualpages/NEP/NEPGetType.html
index 3c37fb9..0a2c703 100644
--- a/docs/manualpages/NEP/NEPGetType.html
+++ b/docs/manualpages/NEP/NEPGetType.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetType</H1>
 Gets the <A HREF="../NEP/NEP.html#NEP">NEP</A> type as a string from the <A HREF="../NEP/NEP.html#NEP">NEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetType.html#NEPGetType">NEPGetType</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPType.html#NEPType">NEPType</A> *type)
+PetscErrorCode NEPGetType(NEP nep,NEPType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of <A HREF="../NEP/NEP.html#NEP">NEP</A> method
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of <A HREF="../NEP/NEP.html#NEP">NEP</A> method
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -38,4 +38,5 @@ Not Collective
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPGetWhichEigenpairs.html b/docs/manualpages/NEP/NEPGetWhichEigenpairs.html
index e3685ba..283a28b 100644
--- a/docs/manualpages/NEP/NEPGetWhichEigenpairs.html
+++ b/docs/manualpages/NEP/NEPGetWhichEigenpairs.html
@@ -6,25 +6,25 @@
 <TITLE>NEPGetWhichEigenpairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPGetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPGetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPGetWhichEigenpairs</H1>
 Returns which portion of the spectrum is to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A> *which)
+PetscErrorCode NEPGetWhichEigenpairs(NEP nep,NEPWhich *which)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>which </B> - the portion of the spectrum to be sought
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See <A HREF="../NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</A>() for possible values of 'which'.
diff --git a/docs/manualpages/NEP/NEPInitializePackage.html b/docs/manualpages/NEP/NEPInitializePackage.html
index 29edcb2..2e81200 100644
--- a/docs/manualpages/NEP/NEPInitializePackage.html
+++ b/docs/manualpages/NEP/NEPInitializePackage.html
@@ -6,14 +6,14 @@
 <TITLE>NEPInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPInitializePackage</H1>
 This function initializes everything in the <A HREF="../NEP/NEP.html#NEP">NEP</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</A>(void)
+PetscErrorCode NEPInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPInterpolGetDegree.html b/docs/manualpages/NEP/NEPInterpolGetDegree.html
index 50d385d..b89bcf5 100644
--- a/docs/manualpages/NEP/NEPInterpolGetDegree.html
+++ b/docs/manualpages/NEP/NEPInterpolGetDegree.html
@@ -6,25 +6,26 @@
 <TITLE>NEPInterpolGetDegree</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPInterpolGetDegree.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPInterpolGetDegree.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPInterpolGetDegree</H1>
 Gets the degree of the interpolation polynomial. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *deg)
+#include "slepcpep.h" 
+PetscErrorCode NEPInterpolGetDegree(NEP nep,PetscInt *deg)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - nonlinear eigenvalue solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial degree
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>deg </B></TD><TD> - the polynomial degree
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPInterpolGetPEP.html b/docs/manualpages/NEP/NEPInterpolGetPEP.html
index e55b215..96c8cca 100644
--- a/docs/manualpages/NEP/NEPInterpolGetPEP.html
+++ b/docs/manualpages/NEP/NEPInterpolGetPEP.html
@@ -6,25 +6,26 @@
 <TITLE>NEPInterpolGetPEP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPInterpolGetPEP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPInterpolGetPEP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPInterpolGetPEP</H1>
 Retrieve the polynomial eigensolver object (<A HREF="../PEP/PEP.html#PEP">PEP</A>) associated with the nonlinear eigenvalue solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../PEP/PEP.html#PEP">PEP</A> *pep)
+#include "slepcpep.h" 
+PetscErrorCode NEPInterpolGetPEP(NEP nep,PEP *pep)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - nonlinear eigenvalue solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver object
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver object
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPInterpolSetDegree.html b/docs/manualpages/NEP/NEPInterpolSetDegree.html
index 25307ff..6984156 100644
--- a/docs/manualpages/NEP/NEPInterpolSetDegree.html
+++ b/docs/manualpages/NEP/NEPInterpolSetDegree.html
@@ -6,23 +6,24 @@
 <TITLE>NEPInterpolSetDegree</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPInterpolSetDegree.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPInterpolSetDegree.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPInterpolSetDegree</H1>
 Sets the degree of the interpolation polynomial. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt deg)
+#include "slepcpep.h" 
+PetscErrorCode NEPInterpolSetDegree(NEP nep,PetscInt deg)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>deg </B></TD><TD> - polynomial degree
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>deg </B></TD><TD> - polynomial degree
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPInterpolSetPEP.html b/docs/manualpages/NEP/NEPInterpolSetPEP.html
index a482215..d8f23ee 100644
--- a/docs/manualpages/NEP/NEPInterpolSetPEP.html
+++ b/docs/manualpages/NEP/NEPInterpolSetPEP.html
@@ -6,23 +6,24 @@
 <TITLE>NEPInterpolSetPEP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPInterpolSetPEP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPInterpolSetPEP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPInterpolSetPEP</H1>
 Associate a polynomial eigensolver object (<A HREF="../PEP/PEP.html#PEP">PEP</A>) to the nonlinear eigenvalue solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+#include "slepcpep.h" 
+PetscErrorCode NEPInterpolSetPEP(NEP nep,PEP pep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver object
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPMonitorAll.html b/docs/manualpages/NEP/NEPMonitorAll.html
index 16178ef..33a92ca 100644
--- a/docs/manualpages/NEP/NEPMonitorAll.html
+++ b/docs/manualpages/NEP/NEPMonitorAll.html
@@ -6,33 +6,35 @@
 <TITLE>NEPMonitorAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPMonitorAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPMonitorAll</H1>
 Print the current approximate values and error estimates at each iteration of the nonlinear eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eig    </B></TD><TD> - eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPMonitorCancel.html b/docs/manualpages/NEP/NEPMonitorCancel.html
index 670dce4..d1d1935 100644
--- a/docs/manualpages/NEP/NEPMonitorCancel.html
+++ b/docs/manualpages/NEP/NEPMonitorCancel.html
@@ -6,27 +6,27 @@
 <TITLE>NEPMonitorCancel</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPMonitorCancel</H1>
 Clears all monitors for a <A HREF="../NEP/NEP.html#NEP">NEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPMonitorCancel(NEP nep)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-nep_monitor_cancel </B> - Cancels all monitors that have been hardwired
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_cancel </B></TD><TD> - Cancels all monitors that have been hardwired
 into a code by calls to <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>(),
 but does not cancel those set via the options database.
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPMonitorConverged.html b/docs/manualpages/NEP/NEPMonitorConverged.html
index 23c9fea..0c25734 100644
--- a/docs/manualpages/NEP/NEPMonitorConverged.html
+++ b/docs/manualpages/NEP/NEPMonitorConverged.html
@@ -6,41 +6,39 @@
 <TITLE>NEPMonitorConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPMonitorConverged</H1>
 Print the approximate values and error estimates as they converge. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eig    </B></TD><TD> - eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - monitor context
 </TD></TR></TABLE>
 <P>
 
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
-The monitor context must contain a struct with a PetscViewer and a
-PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
-<P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
  <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>(), <A HREF="../NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</A>(), <A HREF="../NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</A>()
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepmon.c.html#NEPMonitorConverged">src/nep/interface/nepmon.c</A>
diff --git a/docs/manualpages/NEP/NEPMonitorFirst.html b/docs/manualpages/NEP/NEPMonitorFirst.html
index 79f969f..ce90ad5 100644
--- a/docs/manualpages/NEP/NEPMonitorFirst.html
+++ b/docs/manualpages/NEP/NEPMonitorFirst.html
@@ -6,33 +6,35 @@
 <TITLE>NEPMonitorFirst</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPMonitorFirst</H1>
 Print the first unconverged approximate value and error estimate at each iteration of the nonlinear eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eig    </B></TD><TD> - eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPMonitorLGCreate.html b/docs/manualpages/NEP/NEPMonitorLGCreate.html
new file mode 100644
index 0000000..944379a
--- /dev/null
+++ b/docs/manualpages/NEP/NEPMonitorLGCreate.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPMonitorLGCreate.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPMonitorLGCreate</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorLGCreate.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPMonitorLGCreate</H1>
+Creates a line graph context for use with <A HREF="../NEP/NEP.html#NEP">NEP</A> to monitor convergence. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+</PRE>
+Collective on MPI_Comm
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>host </B></TD><TD> - the X display to open, or null for the local machine
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>label </B></TD><TD> - the title to put in the title bar
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x, y </B></TD><TD> - the screen coordinates of the upper left coordinate of
+the window
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m, n </B></TD><TD> - the screen width and height in pixels
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lgctx </B></TD><TD> - the drawing context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_lg </B></TD><TD> - Sets line graph monitor for the first residual
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_lg_all </B></TD><TD> - Sets line graph monitor for all residuals
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Use PetscDrawLGDestroy() to destroy this line graph.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepmon.c.html#NEPMonitorLGCreate">src/nep/interface/nepmon.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPMonitorSet.html b/docs/manualpages/NEP/NEPMonitorSet.html
index 1121864..3a5e1dc 100644
--- a/docs/manualpages/NEP/NEPMonitorSet.html
+++ b/docs/manualpages/NEP/NEPMonitorSet.html
@@ -6,68 +6,70 @@
 <TITLE>NEPMonitorSet</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPMonitorSet.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorSet.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPMonitorSet</H1>
 Sets an ADDITIONAL function to be called at every iteration to monitor the error estimates for each requested eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscErrorCode (*monitor)(<A HREF="../NEP/NEP.html#NEP">NEP</A>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
+PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep     </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep     </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
 monitor routine (use NULL if no context is desired)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context
 (may be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of monitor</FONT></H3>
 <pre>
-    monitor (<A HREF="../NEP/NEP.html#NEP">NEP</A> nep, int its, int nconv, PetscScalar *eig, PetscReal* errest, int nest, void *mctx)
+    monitor (<A HREF="../NEP/NEP.html#NEP">NEP</A> nep, int its, int nconv, PetscScalar *eigr, PetscScalar *eigi, PetscReal* errest, int nest, void *mctx)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eig    </B></TD><TD> - eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates for each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates for each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor        </B></TD><TD> - print only the first error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor        </B></TD><TD> - print only the first error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_all    </B></TD><TD> - print error estimates at each iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_all    </B></TD><TD> - print error estimates at each iteration
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_conv   </B></TD><TD> - print the eigenvalue approximations only when
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_conv   </B></TD><TD> - print the eigenvalue approximations only when
 convergence has been reached
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
 approximate eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
 approximate eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
 a code by calls to <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>(), but does not cancel those set via
 the options database.
 </TD></TR></TABLE>
diff --git a/docs/manualpages/NEP/NEPMonitorSetFromOptions.html b/docs/manualpages/NEP/NEPMonitorSetFromOptions.html
new file mode 100644
index 0000000..2579e94
--- /dev/null
+++ b/docs/manualpages/NEP/NEPMonitorSetFromOptions.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+</PRE>
+Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep      </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a PetscViewerAndFormat
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether this monitor tracks all eigenvalues or not
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</A>(), <A HREF="../NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</A>(), <A HREF="../NEP/NEPConvMonitorSetFromOptions.html#NEPConvMonitorSetFromOptions">NEPConvMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPMonitorSetFromOptions">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNArnoldiGetKSP.html b/docs/manualpages/NEP/NEPNArnoldiGetKSP.html
new file mode 100644
index 0000000..99ddc6e
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNArnoldiGetKSP.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNArnoldiGetKSP.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNArnoldiGetKSP</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNArnoldiGetKSP.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNArnoldiGetKSP</H1>
+Retrieve the linear solver object (KSP) associated with the nonlinear eigenvalue solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNArnoldiGetKSP(NEP nep,KSP *ksp)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - the linear solver object
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNArnoldiSetKSP.html#NEPNArnoldiSetKSP">NEPNArnoldiSetKSP</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/narnoldi/narnoldi.c.html#NEPNArnoldiGetKSP">src/nep/impls/narnoldi/narnoldi.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNArnoldiSetKSP.html b/docs/manualpages/NEP/NEPNArnoldiSetKSP.html
new file mode 100644
index 0000000..b807641
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNArnoldiSetKSP.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNArnoldiSetKSP.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNArnoldiSetKSP</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNArnoldiSetKSP.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNArnoldiSetKSP</H1>
+Associate a linear solver object (KSP) to the nonlinear eigenvalue solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNArnoldiSetKSP(NEP nep,KSP ksp)
+</PRE>
+Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigenvalue solver
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - the linear solver object
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/narnoldi/narnoldi.c.html#NEPNArnoldiSetKSP">src/nep/impls/narnoldi/narnoldi.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html b/docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html
new file mode 100644
index 0000000..711cfc4
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetInterpolation</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetInterpolation</H1>
+Gets the tolerance and maximum iteration count used by the NLEIGS method when building the interpolation via divided differences. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetInterpolation(NEP nep,PetscReal *tol,PetscInt *maxits)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetInterpolation">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetKSPs.html b/docs/manualpages/NEP/NEPNLEIGSGetKSPs.html
new file mode 100644
index 0000000..cf01757
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetKSPs.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetKSPs.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetKSPs</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetKSPs.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetKSPs</H1>
+Retrieve the array of linear solver objects associated with the nonlinear eigenvalue solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetKSPs(NEP nep,KSP **ksp)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - array of linear solver object
+</TD></TR></TABLE>
+<P>
+
+<P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetKSPs">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetLocking.html b/docs/manualpages/NEP/NEPNLEIGSGetLocking.html
new file mode 100644
index 0000000..bd5bc96
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetLocking.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetLocking.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetLocking</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetLocking.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetLocking</H1>
+Gets the locking flag used in the NLEIGS method. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetLocking(NEP nep,PetscBool *lock)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - the locking flag
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetLocking">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html b/docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html
new file mode 100644
index 0000000..927bf4f
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetRKShifts</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetRKShifts</H1>
+Gets the list of shifts used in the Rational Krylov method. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetRKShifts(NEP nep,PetscInt *ns,PetscScalar **shifts)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ns     </B></TD><TD> - number of shifts
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shifts </B></TD><TD> - array of shifts
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetRKShifts">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetRestart.html b/docs/manualpages/NEP/NEPNLEIGSGetRestart.html
new file mode 100644
index 0000000..5005d41
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetRestart.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetRestart.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetRestart</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetRestart.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetRestart</H1>
+Gets the restart parameter used in the NLEIGS method. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetRestart(NEP nep,PetscReal *keep)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the restart parameter
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetRestart">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html b/docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html
new file mode 100644
index 0000000..0065b99
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetSingularitiesFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetSingularitiesFunction</H1>
+Returns the Function and optionally the user provided context for computing a discretization of the singularity set. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetSingularitiesFunction(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fun </B></TD><TD> - location to put the function (or NULL)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - location to stash the function context (or NULL)
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetSingularitiesFunction">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html b/docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html
new file mode 100644
index 0000000..9c030d9
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSGetTrueResidual</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSGetTrueResidual</H1>
+Returns the flag indicating whether true residuals must be computed explicitly or not. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSGetTrueResidual(NEP nep,PetscBool *trueres)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trueres </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSGetTrueResidual">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html b/docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html
new file mode 100644
index 0000000..6e407fb
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSSetInterpolation</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSSetInterpolation</H1>
+Sets the tolerance and maximum iteration count used by the NLEIGS method when building the interpolation via divided differences. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSSetInterpolation(NEP nep,PetscReal tol,PetscInt maxits)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nleigs_interpolation_tol <tol> </B></TD><TD> - Sets the convergence tolerance
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nleigs_interpolation_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Use PETSC_DEFAULT for either argument to assign a reasonably good value.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSGetInterpolation.html#NEPNLEIGSGetInterpolation">NEPNLEIGSGetInterpolation</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSSetInterpolation">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSSetLocking.html b/docs/manualpages/NEP/NEPNLEIGSSetLocking.html
new file mode 100644
index 0000000..1207a8a
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSSetLocking.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSSetLocking.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSSetLocking</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSSetLocking.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSSetLocking</H1>
+Choose between locking and non-locking variants of the NLEIGS method. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSSetLocking(NEP nep,PetscBool lock)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep  </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nleigs_locking </B></TD><TD> - Sets the locking flag
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+The default is to lock converged eigenpairs when the method restarts.
+This behaviour can be changed so that all directions are kept in the
+working subspace even if already converged to working accuracy (the
+non-locking variant).
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSGetLocking.html#NEPNLEIGSGetLocking">NEPNLEIGSGetLocking</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSSetLocking">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html b/docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html
new file mode 100644
index 0000000..7a54c83
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSSetRKShifts</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSSetRKShifts</H1>
+Sets a list of shifts to be used in the Rational Krylov method. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSSetRKShifts(NEP nep,PetscInt ns,PetscScalar *shifts)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ns     </B></TD><TD> - number of shifts
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shifts </B></TD><TD> - array of scalar values specifying the shifts
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nleigs_rk_shifts </B></TD><TD> - Sets the list of shifts
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+If only one shift is provided, the subspace is built with the simpler
+shift-and-invert Krylov-Schur.
+<P>
+In the case of real scalars, complex shifts are not allowed. In the
+command line, a comma-separated list of complex values can be provided with
+the format [+/-][realnumber][+/-]realnumberi with no spaces, e.g.
+-nep_nleigs_rk_shifts 1.0+2.0i,1.5+2.0i,1.0+1.5i
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSGetRKShifts.html#NEPNLEIGSGetRKShifts">NEPNLEIGSGetRKShifts</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSSetRKShifts">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSSetRestart.html b/docs/manualpages/NEP/NEPNLEIGSSetRestart.html
new file mode 100644
index 0000000..f4d9948
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSSetRestart.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSSetRestart.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSSetRestart</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSSetRestart.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSSetRestart</H1>
+Sets the restart parameter for the NLEIGS method, in particular the proportion of basis vectors that must be kept after restart. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSSetRestart(NEP nep,PetscReal keep)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep  </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nleigs_restart </B></TD><TD> - Sets the restart parameter
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Allowed values are in the range [0.1,0.9]. The default is 0.5.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSGetRestart.html#NEPNLEIGSGetRestart">NEPNLEIGSGetRestart</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSSetRestart">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html b/docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html
new file mode 100644
index 0000000..352fdb4
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSSetSingularitiesFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSSetSingularitiesFunction</H1>
+Sets a user function to compute a discretization of the singularity set (where T(.) is not analytic). 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSSetSingularitiesFunction(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fun </B></TD><TD> - user function (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any previously set value)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - [optional] user-defined context for private data for the function
+(may be NULL, in which case <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any previously set value)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of fun</FONT></H3>
+<pre>
+  fun(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt *maxnp,PetscScalar *xi,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxnp </B></TD><TD> - on input number of requested points in the discretization (can be set)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xi    </B></TD><TD> - computed values of the discretization
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx   </B></TD><TD> - optional context, as set by <A HREF="../NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The user-defined function can set a smaller value of maxnp if necessary.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSGetSingularitiesFunction.html#NEPNLEIGSGetSingularitiesFunction">NEPNLEIGSGetSingularitiesFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSSetSingularitiesFunction">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html b/docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html
new file mode 100644
index 0000000..715e008
--- /dev/null
+++ b/docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPNLEIGSSetTrueResidual</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPNLEIGSSetTrueResidual</H1>
+Specifies if the solver must compute the true residual explicitly or not. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPNLEIGSSetTrueResidual(NEP nep,PetscBool trueres)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trueres </B></TD><TD> - whether true residuals are required or not
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nleigs_true_residual <boolean> </B></TD><TD> - Sets/resets the boolean flag 'trueres'
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+If the user sets trueres=PETSC_TRUE then the solver explicitly computes
+the true residual norm for each eigenpair approximation, and uses it for
+convergence testing. The default is to use the cheaper approximation
+available from the (rational) Krylov iteration.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPNLEIGSGetTrueResidual.html#NEPNLEIGSGetTrueResidual">NEPNLEIGSGetTrueResidual</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/nleigs/nleigs.c.html#NEPNLEIGSSetTrueResidual">src/nep/impls/nleigs/nleigs.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPProjectOperator.html b/docs/manualpages/NEP/NEPProjectOperator.html
index a639165..9314f9b 100644
--- a/docs/manualpages/NEP/NEPProjectOperator.html
+++ b/docs/manualpages/NEP/NEPProjectOperator.html
@@ -6,25 +6,25 @@
 <TITLE>NEPProjectOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPProjectOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPProjectOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPProjectOperator</H1>
 Computes the projection of the nonlinear operator. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt j0,PetscInt j1)
+PetscErrorCode NEPProjectOperator(NEP nep,PetscInt j0,PetscInt j1)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j0  </B></TD><TD> - initial index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j0  </B></TD><TD> - initial index
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j1  </B></TD><TD> - final index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>j1  </B></TD><TD> - final index
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html b/docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html
new file mode 100644
index 0000000..7e5e2fe
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIIGetConstCorrectionTol</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIIGetConstCorrectionTol</H1>
+Returns the constant tolerance flag. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIIGetConstCorrectionTol(NEP nep,PetscBool *cct)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cct </B></TD><TD> - the value of the constant tolerance flag
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIISetConstCorrectionTol.html#NEPRIISetConstCorrectionTol">NEPRIISetConstCorrectionTol</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIIGetConstCorrectionTol">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIIGetKSP.html b/docs/manualpages/NEP/NEPRIIGetKSP.html
new file mode 100644
index 0000000..f3e9286
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIIGetKSP.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIIGetKSP.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIIGetKSP</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIIGetKSP.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIIGetKSP</H1>
+Retrieve the linear solver object (KSP) associated with the nonlinear eigenvalue solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIIGetKSP(NEP nep,KSP *ksp)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - the linear solver object
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIISetKSP.html#NEPRIISetKSP">NEPRIISetKSP</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIIGetKSP">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html b/docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html
new file mode 100644
index 0000000..687d6a5
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIIGetLagPreconditioner</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIIGetLagPreconditioner</H1>
+Indicates how often the preconditioner is rebuilt. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIIGetLagPreconditioner(NEP nep,PetscInt *lag)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lag </B></TD><TD> - the lag parameter
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIIGetLagPreconditioner">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIIGetMaximumIterations.html b/docs/manualpages/NEP/NEPRIIGetMaximumIterations.html
new file mode 100644
index 0000000..8be0e03
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIIGetMaximumIterations.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIIGetMaximumIterations.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIIGetMaximumIterations</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIIGetMaximumIterations.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIIGetMaximumIterations</H1>
+Gets the maximum number of inner iterations of RII. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIIGetMaximumIterations(NEP nep,PetscInt *its)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - maximum inner iterations
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIISetMaximumIterations.html#NEPRIISetMaximumIterations">NEPRIISetMaximumIterations</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIIGetMaximumIterations">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html b/docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html
new file mode 100644
index 0000000..cc29450
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIISetConstCorrectionTol</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIISetConstCorrectionTol</H1>
+Sets a flag to keep the tolerance used in the linear solver constant. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIISetConstCorrectionTol(NEP nep,PetscBool cct)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cct </B></TD><TD> - a boolean value
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_rii_const_correction_tol <bool> </B></TD><TD> - set the boolean flag
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+By default, an exponentially decreasing tolerance is set in the KSP used
+within the nonlinear iteration, so that each Newton iteration requests
+better accuracy than the previous one. The constant correction tolerance
+flag stops this behaviour.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIIGetConstCorrectionTol.html#NEPRIIGetConstCorrectionTol">NEPRIIGetConstCorrectionTol</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIISetConstCorrectionTol">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIISetKSP.html b/docs/manualpages/NEP/NEPRIISetKSP.html
new file mode 100644
index 0000000..a63296f
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIISetKSP.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIISetKSP.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIISetKSP</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIISetKSP.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIISetKSP</H1>
+Associate a linear solver object (KSP) to the nonlinear eigenvalue solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIISetKSP(NEP nep,KSP ksp)
+</PRE>
+Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigenvalue solver
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - the linear solver object
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIISetKSP">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIISetLagPreconditioner.html b/docs/manualpages/NEP/NEPRIISetLagPreconditioner.html
new file mode 100644
index 0000000..48b3400
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIISetLagPreconditioner.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIISetLagPreconditioner.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIISetLagPreconditioner</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIISetLagPreconditioner.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIISetLagPreconditioner</H1>
+Determines when the preconditioner is rebuilt in the nonlinear solve. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIISetLagPreconditioner(NEP nep,PetscInt lag)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lag </B></TD><TD> - 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is
+computed within the nonlinear iteration, 2 means every second time
+the Jacobian is built, etc.
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_rii_lag_preconditioner <lag></B></TD><TD> - 
+Notes:
+The default is 1.
+The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIIGetLagPreconditioner.html#NEPRIIGetLagPreconditioner">NEPRIIGetLagPreconditioner</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIISetLagPreconditioner">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRIISetMaximumIterations.html b/docs/manualpages/NEP/NEPRIISetMaximumIterations.html
new file mode 100644
index 0000000..1a90c4d
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRIISetMaximumIterations.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRIISetMaximumIterations.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRIISetMaximumIterations</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRIISetMaximumIterations.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRIISetMaximumIterations</H1>
+Sets the maximum number of inner iterations to be used in the RII solver. These are the Newton iterations related to the computation of the nonlinear Rayleigh functional. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRIISetMaximumIterations(NEP nep,PetscInt its)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - maximum inner iterations
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPRIIGetMaximumIterations.html#NEPRIIGetMaximumIterations">NEPRIIGetMaximumIterations</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/impls/rii/rii.c.html#NEPRIISetMaximumIterations">src/nep/impls/rii/rii.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPReasonView.html b/docs/manualpages/NEP/NEPReasonView.html
index 11a7a53..83acf03 100644
--- a/docs/manualpages/NEP/NEPReasonView.html
+++ b/docs/manualpages/NEP/NEPReasonView.html
@@ -6,28 +6,28 @@
 <TITLE>NEPReasonView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPReasonView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPReasonView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPReasonView</H1>
 Displays the reason a <A HREF="../NEP/NEP.html#NEP">NEP</A> solve converged or diverged. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscViewer viewer)
+PetscErrorCode NEPReasonView(NEP nep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-nep_converged_reason </B> - print reason for convergence, and number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -40,4 +40,7 @@ Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPReasonViewFromOptions.html b/docs/manualpages/NEP/NEPReasonViewFromOptions.html
index 2b8b224..5506912 100644
--- a/docs/manualpages/NEP/NEPReasonViewFromOptions.html
+++ b/docs/manualpages/NEP/NEPReasonViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>NEPReasonViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPReasonViewFromOptions</H1>
 Processes command line options to determine if/how the <A HREF="../NEP/NEP.html#NEP">NEP</A> converged reason is to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPReasonViewFromOptions(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepview.c.html#NEPReasonViewFromOptions">src/nep/interface/nepview.c</A>
diff --git a/docs/manualpages/NEP/NEPRefine.html b/docs/manualpages/NEP/NEPRefine.html
index bfe1cc2..f13af62 100644
--- a/docs/manualpages/NEP/NEPRefine.html
+++ b/docs/manualpages/NEP/NEPRefine.html
@@ -6,8 +6,8 @@
 <TITLE>NEPRefine</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPRefine.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRefine.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPRefine</H1>
 The refinement type 
diff --git a/docs/manualpages/NEP/NEPRefineGetKSP.html b/docs/manualpages/NEP/NEPRefineGetKSP.html
new file mode 100644
index 0000000..4805f8a
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRefineGetKSP.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRefineGetKSP.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRefineGetKSP</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRefineGetKSP.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRefineGetKSP</H1>
+Obtain the ksp object used by the eigensolver object in the refinement phase. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPRefineGetKSP(NEP nep,KSP *ksp)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - ksp context
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepbasic.c.html#NEPRefineGetKSP">src/nep/interface/nepbasic.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRefineScheme.html b/docs/manualpages/NEP/NEPRefineScheme.html
new file mode 100644
index 0000000..9c246cb
--- /dev/null
+++ b/docs/manualpages/NEP/NEPRefineScheme.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPRefineScheme.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPRefineScheme</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRefineScheme.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPRefineScheme</H1>
+The scheme used for solving linear systems during iterative refinement 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { NEP_REFINE_SCHEME_SCHUR=1,
+               NEP_REFINE_SCHEME_MBE,
+               NEP_REFINE_SCHEME_EXPLICIT } <A HREF="../NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/../../include/slepcnep.h.html#NEPRefineScheme">src/nep/../../include/slepcnep.h</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPRegister.html b/docs/manualpages/NEP/NEPRegister.html
index 4e5ead9..894e801 100644
--- a/docs/manualpages/NEP/NEPRegister.html
+++ b/docs/manualpages/NEP/NEPRegister.html
@@ -6,23 +6,23 @@
 <TITLE>NEPRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPRegister</H1>
 Adds a method to the nonlinear eigenproblem solver package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPRegister.html#NEPRegister">NEPRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../NEP/NEP.html#NEP">NEP</A>))
+PetscErrorCode NEPRegister(const char *name,PetscErrorCode (*function)(NEP))
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPRegisterAll.html b/docs/manualpages/NEP/NEPRegisterAll.html
index f7c886b..5369e81 100644
--- a/docs/manualpages/NEP/NEPRegisterAll.html
+++ b/docs/manualpages/NEP/NEPRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>NEPRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPRegisterAll</H1>
 Registers all the solvers in the <A HREF="../NEP/NEP.html#NEP">NEP</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</A>(void)
+PetscErrorCode NEPRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/NEP/NEPReset.html b/docs/manualpages/NEP/NEPReset.html
index d02b6cd..e05793c 100644
--- a/docs/manualpages/NEP/NEPReset.html
+++ b/docs/manualpages/NEP/NEPReset.html
@@ -6,21 +6,21 @@
 <TITLE>NEPReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPReset</H1>
 Resets the <A HREF="../NEP/NEP.html#NEP">NEP</A> context to the initial state and removes any allocated objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPReset.html#NEPReset">NEPReset</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPReset(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPSLPGetEPS.html b/docs/manualpages/NEP/NEPSLPGetEPS.html
index 76ef610..0faae4c 100644
--- a/docs/manualpages/NEP/NEPSLPGetEPS.html
+++ b/docs/manualpages/NEP/NEPSLPGetEPS.html
@@ -6,25 +6,25 @@
 <TITLE>NEPSLPGetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSLPGetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSLPGetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSLPGetEPS</H1>
 Retrieve the linear eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) associated to the nonlinear eigenvalue solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../EPS/EPS.html#EPS">EPS</A> *eps)
+PetscErrorCode NEPSLPGetEPS(NEP nep,EPS *eps)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - nonlinear eigenvalue solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver object
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPSLPSetEPS.html b/docs/manualpages/NEP/NEPSLPSetEPS.html
index 63f0c06..fc4b5c4 100644
--- a/docs/manualpages/NEP/NEPSLPSetEPS.html
+++ b/docs/manualpages/NEP/NEPSLPSetEPS.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSLPSetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSLPSetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSLPSetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSLPSetEPS</H1>
 Associate a linear eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) to the nonlinear eigenvalue solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode NEPSLPSetEPS(NEP nep,EPS eps)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigenvalue solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/NEP/NEPSetBV.html b/docs/manualpages/NEP/NEPSetBV.html
index fb702e5..30900b6 100644
--- a/docs/manualpages/NEP/NEPSetBV.html
+++ b/docs/manualpages/NEP/NEPSetBV.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetBV</H1>
 Associates a basis vectors object to the nonlinear eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../BV/BV.html#BV">BV</A> bv)
+PetscErrorCode NEPSetBV(NEP nep,BV bv)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv  </B></TD><TD> - the basis vectors object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv  </B></TD><TD> - the basis vectors object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetConstCorrectionTol.html b/docs/manualpages/NEP/NEPSetConstCorrectionTol.html
deleted file mode 100644
index 8918478..0000000
--- a/docs/manualpages/NEP/NEPSetConstCorrectionTol.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetConstCorrectionTol.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>NEPSetConstCorrectionTol</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetConstCorrectionTol.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>NEPSetConstCorrectionTol</H1>
-Sets a flag to keep the tolerance used in the linear solver constant. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscBool cct)
-</PRE>
-Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
-<P>
-<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cct </B></TD><TD> - a boolean value
-</TD></TR></TABLE>
-<P>
-<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-nep_const_correction_tol <cct></B> - 
-Notes:
-By default, an exponentially decreasing tolerance is set in the KSP used
-within the nonlinear iteration, so that each Newton iteration requests
-better accuracy than the previous one. The constant correction tolerance
-flag stops this behaviour.
-<br>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPGetConstCorrectionTol.html#NEPGetConstCorrectionTol">NEPGetConstCorrectionTol</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetConstCorrectionTol">src/nep/interface/nepopts.c</A>
-<BR><A HREF="./index.html">Index of all NEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetConvergenceTest.html b/docs/manualpages/NEP/NEPSetConvergenceTest.html
index 99c90cd..e6d8258 100644
--- a/docs/manualpages/NEP/NEPSetConvergenceTest.html
+++ b/docs/manualpages/NEP/NEPSetConvergenceTest.html
@@ -6,56 +6,50 @@
 <TITLE>NEPSetConvergenceTest</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetConvergenceTest</H1>
-Sets the function to be used to test convergence of the nonlinear iterative solution. 
+Specifies how to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscErrorCode (*func)(<A HREF="../NEP/NEP.html#NEP">NEP</A>,PetscInt,PetscReal,PetscReal,PetscReal,<A HREF="../NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</A>*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+PetscErrorCode NEPSetConvergenceTest(NEP nep,NEPConv conv)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep     </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep  </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - [optional] context for private data for the convergence routine
-(may be NULL)
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - [optional] destructor for the context (may be NULL;
-PETSC_NULL_FUNCTION in Fortran)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv </B></TD><TD> - the type of convergence test
 </TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
-<pre>
-  func(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,<A HREF="../NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</A> reason*,void *fctx)
-</pre>
-<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>it     </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_conv_abs  </B></TD><TD> - Sets the absolute convergence test
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xnorm  </B></TD><TD> - norm of the current solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_conv_rel  </B></TD><TD> - Sets the convergence test relative to the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>snorm  </B></TD><TD> - norm of the step (difference between two consecutive solutions)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_conv_user </B></TD><TD> - Selects the user-defined convergence test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The parameter 'conv' can have one of these values
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONV_ABS  </B></TD><TD> - absolute error ||r||
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fnorm  </B></TD><TD> - norm of the function (residual)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONV_REL  </B></TD><TD> - error relative to the eigenvalue l, ||r||/|l|
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - (output) result of the convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONV_NORM </B></TD><TD> - error relative matrix norms, ||r||/sum_i(|f_i(l)|*||A_i||)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fctx   </B></TD><TD> - optional context, as set by <A HREF="../NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_CONV_USER </B></TD><TD> - function set by <A HREF="../NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</A>()
 </TD></TR></TABLE>
 <P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</A>()
+ <A HREF="../NEP/NEPGetConvergenceTest.html#NEPGetConvergenceTest">NEPGetConvergenceTest</A>(), <A HREF="../NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</A>(), <A HREF="../NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</A>(), <A HREF="../NEP/NEPConv.html#NEPConv">NEPConv</A>
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetConvergenceTest">src/nep/interface/nepopts.c</A>
 <BR><A HREF="./index.html">Index of all NEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/NEP/NEPSetConvergenceTestFunction.html b/docs/manualpages/NEP/NEPSetConvergenceTestFunction.html
new file mode 100644
index 0000000..75aea56
--- /dev/null
+++ b/docs/manualpages/NEP/NEPSetConvergenceTestFunction.html
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetConvergenceTestFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPSetConvergenceTestFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetConvergenceTestFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPSetConvergenceTestFunction</H1>
+Sets a function to compute the error estimate used in the convergence test. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPSetConvergenceTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep     </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the convergence routine (may be null)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalue
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalue
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - residual norm associated to the eigenpair
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - (output) computed error estimate
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+If the error estimate returned by the convergence test function is less than
+the tolerance, then the eigenvalue is accepted as converged.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</A>(), <A HREF="../NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetConvergenceTestFunction">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetDS.html b/docs/manualpages/NEP/NEPSetDS.html
index 68d602f..4fc0367 100644
--- a/docs/manualpages/NEP/NEPSetDS.html
+++ b/docs/manualpages/NEP/NEPSetDS.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetDS</H1>
 Associates a direct solver object to the nonlinear eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode NEPSetDS(NEP nep,DS ds)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetDerivatives.html b/docs/manualpages/NEP/NEPSetDerivatives.html
new file mode 100644
index 0000000..88d55c8
--- /dev/null
+++ b/docs/manualpages/NEP/NEPSetDerivatives.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetDerivatives.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPSetDerivatives</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetDerivatives.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPSetDerivatives</H1>
+Sets the function to compute the k-th derivative T^(k)(lambda) for any value of k (including 0), as well as the location to store the matrix. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPSetDerivatives(NEP nep,Mat A,PetscErrorCode (*der)(NEP,PetscScalar,PetscInt,Mat,void*),void *ctx)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A> and Mat
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - the matrix to store the computed derivative
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>der </B></TD><TD> - routing to evaluate the k-th derivative (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
+previously set value)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - [optional] user-defined context for private data for the derivatives
+evaluation routine (may be NULL) (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
+previously set value)
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</A>(), <A HREF="../NEP/NEPGetDerivatives.html#NEPGetDerivatives">NEPGetDerivatives</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepbasic.c.html#NEPSetDerivatives">src/nep/interface/nepbasic.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetDimensions.html b/docs/manualpages/NEP/NEPSetDimensions.html
index 9956e6d..0474d01 100644
--- a/docs/manualpages/NEP/NEPSetDimensions.html
+++ b/docs/manualpages/NEP/NEPSetDimensions.html
@@ -6,36 +6,36 @@
 <TITLE>NEPSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetDimensions</H1>
 Sets the number of eigenvalues to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt nev,PetscInt ncv,PetscInt mpd)
+PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetEigenvalueComparison.html b/docs/manualpages/NEP/NEPSetEigenvalueComparison.html
new file mode 100644
index 0000000..dc86cb7
--- /dev/null
+++ b/docs/manualpages/NEP/NEPSetEigenvalueComparison.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetEigenvalueComparison.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPSetEigenvalueComparison</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetEigenvalueComparison.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPSetEigenvalueComparison</H1>
+Specifies the eigenvalue comparison function when <A HREF="../NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</A>() is set to NEP_WHICH_USER. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPSetEigenvalueComparison(NEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the comparison function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the comparison function)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar     </B></TD><TD> - real part of the 1st eigenvalue
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai     </B></TD><TD> - imaginary part of the 1st eigenvalue
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br     </B></TD><TD> - real part of the 2nd eigenvalue
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi     </B></TD><TD> - imaginary part of the 2nd eigenvalue
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - result of comparison
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+<H3><FONT COLOR="#883300">The returning parameter 'res' can be</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>negative </B></TD><TD> - if the 1st eigenvalue is preferred to the 2st one
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>zero     </B></TD><TD> - if both eigenvalues are equally preferred
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>positive </B></TD><TD> - if the 2st eigenvalue is preferred to the 1st one
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</A>(), <A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetEigenvalueComparison">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetFromOptions.html b/docs/manualpages/NEP/NEPSetFromOptions.html
index 76dd1ed..728bdcc 100644
--- a/docs/manualpages/NEP/NEPSetFromOptions.html
+++ b/docs/manualpages/NEP/NEPSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>NEPSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetFromOptions</H1>
 Sets <A HREF="../NEP/NEP.html#NEP">NEP</A> options from the options database. This routine must be called before <A HREF="../NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</A>() if the user is to be allowed to set the solver type. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPSetFromOptions(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
@@ -34,4 +34,7 @@ To see all options, run your program with the -help option.
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetFunction.html b/docs/manualpages/NEP/NEPSetFunction.html
index 1f89883..1a845bb 100644
--- a/docs/manualpages/NEP/NEPSetFunction.html
+++ b/docs/manualpages/NEP/NEPSetFunction.html
@@ -6,30 +6,30 @@
 <TITLE>NEPSetFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetFunction</H1>
 Sets the function to compute the nonlinear Function T(lambda) as well as the location to store the matrix. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,Mat A,Mat B,PetscErrorCode (*fun)(<A HREF="../NEP/NEP.html#NEP">NEP</A>,PetscScalar,Mat,Mat,void*),void *ctx)
+PetscErrorCode NEPSetFunction(NEP nep,Mat A,Mat B,PetscErrorCode (*fun)(NEP,PetscScalar,Mat,Mat,void*),void *ctx)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Function matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Function matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - preconditioner matrix (usually same as the Function)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B   </B></TD><TD> - preconditioner matrix (usually same as the Function)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fun </B></TD><TD> - Function evaluation routine (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fun </B></TD><TD> - Function evaluation routine (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
 previously set value)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - [optional] user-defined context for private data for the Function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - [optional] user-defined context for private data for the Function
 evaluation routine (may be NULL) (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
 previously set value)
 </TD></TR></TABLE>
@@ -45,4 +45,5 @@ previously set value)
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetInitialSpace.html b/docs/manualpages/NEP/NEPSetInitialSpace.html
index 9518a16..24c7f02 100644
--- a/docs/manualpages/NEP/NEPSetInitialSpace.html
+++ b/docs/manualpages/NEP/NEPSetInitialSpace.html
@@ -6,25 +6,25 @@
 <TITLE>NEPSetInitialSpace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetInitialSpace</H1>
 Specify a basis of vectors that constitute the initial space, that is, the subspace from which the solver starts to iterate. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt n,Vec *is)
+PetscErrorCode NEPSetInitialSpace(NEP nep,PetscInt n,Vec *is)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetJacobian.html b/docs/manualpages/NEP/NEPSetJacobian.html
index da7b4a2..c7c4fa9 100644
--- a/docs/manualpages/NEP/NEPSetJacobian.html
+++ b/docs/manualpages/NEP/NEPSetJacobian.html
@@ -6,28 +6,28 @@
 <TITLE>NEPSetJacobian</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetJacobian.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetJacobian.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetJacobian</H1>
 Sets the function to compute Jacobian T'(lambda) as well as the location to store the matrix. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,Mat A,PetscErrorCode (*jac)(<A HREF="../NEP/NEP.html#NEP">NEP</A>,PetscScalar,Mat,void*),void *ctx)
+PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScalar,Mat,void*),void *ctx)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Jacobian matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - Jacobian matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>jac </B></TD><TD> - Jacobian evaluation routine (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>jac </B></TD><TD> - Jacobian evaluation routine (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
 previously set value)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - [optional] user-defined context for private data for the Jacobian
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - [optional] user-defined context for private data for the Jacobian
 evaluation routine (may be NULL) (if NULL then <A HREF="../NEP/NEP.html#NEP">NEP</A> retains any
 previously set value)
 </TD></TR></TABLE>
diff --git a/docs/manualpages/NEP/NEPSetKSP.html b/docs/manualpages/NEP/NEPSetKSP.html
deleted file mode 100644
index 2916f2c..0000000
--- a/docs/manualpages/NEP/NEPSetKSP.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetKSP.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>NEPSetKSP</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetKSP.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>NEPSetKSP</H1>
-Associates a linear solver object to the nonlinear eigensolver. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetKSP.html#NEPSetKSP">NEPSetKSP</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,KSP ksp)
-</PRE>
-Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
-<P>
-<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - the linear solver object
-</TD></TR></TABLE>
-<P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
-Use <A HREF="../NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</A>() to retrieve the linear solver context (for example,
-to free it at the end of the computations).
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepbasic.c.html#NEPSetKSP">src/nep/interface/nepbasic.c</A>
-<BR><A HREF="./index.html">Index of all NEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetLagPreconditioner.html b/docs/manualpages/NEP/NEPSetLagPreconditioner.html
deleted file mode 100644
index fcffc1b..0000000
--- a/docs/manualpages/NEP/NEPSetLagPreconditioner.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetLagPreconditioner.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>NEPSetLagPreconditioner</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetLagPreconditioner.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>NEPSetLagPreconditioner</H1>
-Determines when the preconditioner is rebuilt in the nonlinear solve. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt lag)
-</PRE>
-Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
-<P>
-<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the <A HREF="../NEP/NEP.html#NEP">NEP</A> context
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lag </B></TD><TD> - 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is
-computed within the nonlinear iteration, 2 means every second time
-the Jacobian is built, etc.
-</TD></TR></TABLE>
-<P>
-<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-nep_lag_preconditioner <lag></B> - 
-Notes:
-The default is 1.
-The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.
-<br>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPGetLagPreconditioner.html#NEPGetLagPreconditioner">NEPGetLagPreconditioner</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetLagPreconditioner">src/nep/interface/nepopts.c</A>
-<BR><A HREF="./index.html">Index of all NEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
-<A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
-<A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
-</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetOptionsPrefix.html b/docs/manualpages/NEP/NEPSetOptionsPrefix.html
index aa5c480..b57f1b0 100644
--- a/docs/manualpages/NEP/NEPSetOptionsPrefix.html
+++ b/docs/manualpages/NEP/NEPSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../NEP/NEP.html#NEP">NEP</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,const char *prefix)
+PetscErrorCode NEPSetOptionsPrefix(NEP nep,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../NEP/NEP.html#NEP">NEP</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../NEP/NEP.html#NEP">NEP</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetRG.html b/docs/manualpages/NEP/NEPSetRG.html
index 2fe7a4b..75fa4df 100644
--- a/docs/manualpages/NEP/NEPSetRG.html
+++ b/docs/manualpages/NEP/NEPSetRG.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSetRG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetRG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetRG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetRG</H1>
 Associates a region object to the nonlinear eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../RG/RG.html#RG">RG</A> rg)
+PetscErrorCode NEPSetRG(NEP nep,RG rg)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetRefine.html b/docs/manualpages/NEP/NEPSetRefine.html
index 7790a4e..06152da 100644
--- a/docs/manualpages/NEP/NEPSetRefine.html
+++ b/docs/manualpages/NEP/NEPSetRefine.html
@@ -6,40 +6,44 @@
 <TITLE>NEPSetRefine</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetRefine.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetRefine.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetRefine</H1>
 Specifies the refinement type (and options) to be used after the solve. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPRefine.html#NEPRefine">NEPRefine</A> refine,PetscInt npart,PetscReal tol,PetscInt its)
+PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,NEPRefineScheme scheme)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scheme </B></TD><TD> - which scheme to be used for solving the involved linear systems
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine <type> </B></TD><TD> - refinement type, one of <none,simple,multiple>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine <type> </B></TD><TD> - refinement type, one of <none,simple,multiple>
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_partitions <n> </B></TD><TD> - the number of partitions
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_partitions <n> </B></TD><TD> - the number of partitions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_tol <tol> </B></TD><TD> - the tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_tol <tol> </B></TD><TD> - the tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_its <its> </B></TD><TD> - number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_its <its> </B></TD><TD> - number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_refine_scheme </B></TD><TD> - to set the scheme for the linear solves
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -61,6 +65,10 @@ below the tolerance (tol defaults to the <A HREF="../NEP/NEP.html#NEP">NEP</A> t
 different value). In contrast, the multiple method simply performs its
 refinement iterations (just one by default).
 <P>
+The scheme argument is used to change the way in which linear systems are
+solved. Possible choices are: explicit, mixed block elimination (MBE),
+and Schur complement.
+<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetSplitOperator.html b/docs/manualpages/NEP/NEPSetSplitOperator.html
index 275d34a..0cc2731 100644
--- a/docs/manualpages/NEP/NEPSetSplitOperator.html
+++ b/docs/manualpages/NEP/NEPSetSplitOperator.html
@@ -6,29 +6,29 @@
 <TITLE>NEPSetSplitOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetSplitOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetSplitOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetSplitOperator</H1>
 Sets the operator of the nonlinear eigenvalue problem in split form. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt n,Mat A[],<A HREF="../FN/FN.html#FN">FN</A> f[],MatStructure str)
+PetscErrorCode NEPSetSplitOperator(NEP nep,PetscInt n,Mat A[],FN f[],MatStructure str)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>, Mat and <A HREF="../FN/FN.html#FN">FN</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - number of terms in the split form
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD> - number of terms in the split form
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - array of matrices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A   </B></TD><TD> - array of matrices
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f   </B></TD><TD> - array of functions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f   </B></TD><TD> - array of functions
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - structure flag for matrices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - structure flag for matrices
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -55,4 +55,7 @@ after <A HREF="../NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</A>() then the <A HREF=".
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetStoppingTest.html b/docs/manualpages/NEP/NEPSetStoppingTest.html
new file mode 100644
index 0000000..a3b55c5
--- /dev/null
+++ b/docs/manualpages/NEP/NEPSetStoppingTest.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPSetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPSetStoppingTest</H1>
+Specifies how to decide the termination of the outer loop of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPSetStoppingTest(NEP nep,NEPStop stop)
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep  </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_stop_basic </B></TD><TD> - Sets the default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_stop_user  </B></TD><TD> - Selects the user-defined stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The parameter 'stop' can have one of these values
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_STOP_BASIC </B></TD><TD> - default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_STOP_USER  </B></TD><TD> - function set by <A HREF="../NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPGetStoppingTest.html#NEPGetStoppingTest">NEPGetStoppingTest</A>(), <A HREF="../NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</A>(), <A HREF="../NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</A>(), <A HREF="../NEP/NEPStop.html#NEPStop">NEPStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetStoppingTest">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetStoppingTestFunction.html b/docs/manualpages/NEP/NEPSetStoppingTestFunction.html
new file mode 100644
index 0000000..0376c80
--- /dev/null
+++ b/docs/manualpages/NEP/NEPSetStoppingTestFunction.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPSetStoppingTestFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPSetStoppingTestFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetStoppingTestFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPSetStoppingTestFunction</H1>
+Sets a function to decide when to stop the outer iteration of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPSetStoppingTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+</PRE>
+Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep     </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - pointer to the stopping test function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the stopping routine (may be null)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<A HREF="../NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</A> *reason,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev    </B></TD><TD> - number of requested eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - (output) result of the stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+Normal usage is to first call the default routine <A HREF="../NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</A>() and then
+set reason to NEP_CONVERGED_USER if some user-defined conditions have been
+met. To let the eigensolver continue iterating, the result must be left as
+NEP_CONVERGED_ITERATING.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</A>(), <A HREF="../NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetStoppingTestFunction">src/nep/interface/nepopts.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetTarget.html b/docs/manualpages/NEP/NEPSetTarget.html
index e40da32..29e002a 100644
--- a/docs/manualpages/NEP/NEPSetTarget.html
+++ b/docs/manualpages/NEP/NEPSetTarget.html
@@ -6,28 +6,28 @@
 <TITLE>NEPSetTarget</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetTarget.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetTarget.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetTarget</H1>
 Sets the value of the target. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscScalar target)
+PetscErrorCode NEPSetTarget(NEP nep,PetscScalar target)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-nep_target <scalar> </B> - the value of the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target <scalar> </B></TD><TD> - the value of the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The target is a scalar value used to determine the portion of the spectrum
@@ -45,4 +45,6 @@ command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.
 <BR><A HREF="./index.html">Index of all NEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetTolerances.html b/docs/manualpages/NEP/NEPSetTolerances.html
index 975edc6..699ee7f 100644
--- a/docs/manualpages/NEP/NEPSetTolerances.html
+++ b/docs/manualpages/NEP/NEPSetTolerances.html
@@ -6,45 +6,32 @@
 <TITLE>NEPSetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetTolerances</H1>
-Sets various parameters used in convergence tests. 
+Sets the tolerance and maximum iteration count used by the <A HREF="../NEP/NEP.html#NEP">NEP</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscReal abstol,PetscReal rtol,PetscReal stol,PetscInt maxit,PetscInt maxf)
+PetscErrorCode NEPSetTolerances(NEP nep,PetscReal tol,PetscInt maxits)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>abstol </B></TD><TD> - absolute convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rtol   </B></TD><TD> - relative convergence tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stol   </B></TD><TD> - convergence tolerance in terms of the norm of the change in the
-solution between steps, || delta x || < stol*|| x ||
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxit  </B></TD><TD> - maximum number of iterations
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxf   </B></TD><TD> - maximum number of function evaluations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_atol <abstol> </B></TD><TD> - Sets abstol
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_rtol <rtol> </B></TD><TD> - Sets rtol
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_stol <stol> </B></TD><TD> - Sets stol
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_max_it <maxit> </B></TD><TD> - Sets maxit
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_tol <tol> </B></TD><TD> - Sets the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_max_funcs <maxf> </B></TD><TD> - Sets maxf
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetTrackAll.html b/docs/manualpages/NEP/NEPSetTrackAll.html
index c4fff9b..2da549c 100644
--- a/docs/manualpages/NEP/NEPSetTrackAll.html
+++ b/docs/manualpages/NEP/NEPSetTrackAll.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetTrackAll</H1>
 Specifies if the solver must compute the residual of all approximate eigenpairs or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscBool trackall)
+PetscErrorCode NEPSetTrackAll(NEP nep,PetscBool trackall)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep      </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep      </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether compute all residuals or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether compute all residuals or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSetType.html b/docs/manualpages/NEP/NEPSetType.html
index 7206f47..e41e25c 100644
--- a/docs/manualpages/NEP/NEPSetType.html
+++ b/docs/manualpages/NEP/NEPSetType.html
@@ -6,29 +6,29 @@
 <TITLE>NEPSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetType</H1>
 Selects the particular solver to be used in the <A HREF="../NEP/NEP.html#NEP">NEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetType.html#NEPSetType">NEPSetType</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPType.html#NEPType">NEPType</A> type)
+PetscErrorCode NEPSetType(NEP nep,NEPType type)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep      </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep      </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known method
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-nep_type <method> </B> - Sets the method; use -help for a list
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_type <method> </B></TD><TD> - Sets the method; use -help for a list
 of available methods
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See "slepc/include/slepcnep.h" for available methods.
@@ -49,4 +49,7 @@ line or options database.
 <BR><A HREF="./index.html">Index of all NEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPSetUp.html b/docs/manualpages/NEP/NEPSetUp.html
index d86e6f6..d9c35f0 100644
--- a/docs/manualpages/NEP/NEPSetUp.html
+++ b/docs/manualpages/NEP/NEPSetUp.html
@@ -6,21 +6,21 @@
 <TITLE>NEPSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetUp</H1>
 Sets up all the internal data structures necessary for the execution of the <A HREF="../NEP/NEP.html#NEP">NEP</A> solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPSetUp(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep   </B> - solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function need not be called explicitly in most cases, since <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>()
diff --git a/docs/manualpages/NEP/NEPSetWhichEigenpairs.html b/docs/manualpages/NEP/NEPSetWhichEigenpairs.html
index d041073..6f29e10 100644
--- a/docs/manualpages/NEP/NEPSetWhichEigenpairs.html
+++ b/docs/manualpages/NEP/NEPSetWhichEigenpairs.html
@@ -6,67 +6,73 @@
 <TITLE>NEPSetWhichEigenpairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetWhichEigenpairs</H1>
 Specifies which portion of the spectrum is to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,<A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A> which)
+PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)
 </PRE>
 Logically Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep   </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values</FONT></H3>
 The parameter 'which' can have one of these values
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_LARGEST_MAGNITUDE </B></TD><TD> - largest eigenvalues in magnitude (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_LARGEST_MAGNITUDE </B></TD><TD> - largest eigenvalues in magnitude (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_SMALLEST_MAGNITUDE </B></TD><TD> - smallest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_SMALLEST_MAGNITUDE </B></TD><TD> - smallest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_LARGEST_REAL </B></TD><TD> - largest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_LARGEST_REAL </B></TD><TD> - largest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_SMALLEST_REAL </B></TD><TD> - smallest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_SMALLEST_REAL </B></TD><TD> - smallest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_LARGEST_IMAGINARY </B></TD><TD> - largest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_LARGEST_IMAGINARY </B></TD><TD> - largest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_SMALLEST_IMAGINARY </B></TD><TD> - smallest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_SMALLEST_IMAGINARY </B></TD><TD> - smallest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_TARGET_MAGNITUDE </B></TD><TD> - eigenvalues closest to the target (in magnitude)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_TARGET_MAGNITUDE </B></TD><TD> - eigenvalues closest to the target (in magnitude)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_TARGET_REAL </B></TD><TD> - eigenvalues with real part closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_TARGET_REAL </B></TD><TD> - eigenvalues with real part closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_TARGET_IMAGINARY </B></TD><TD> - eigenvalues with imaginary part closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_TARGET_IMAGINARY </B></TD><TD> - eigenvalues with imaginary part closest to target
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_ALL </B></TD><TD> - all eigenvalues contained in a given region
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NEP_WHICH_USER </B></TD><TD> - user defined ordering set with <A HREF="../NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_largest_magnitude </B></TD><TD> - Sets largest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_largest_magnitude </B></TD><TD> - Sets largest eigenvalues in magnitude
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_smallest_magnitude </B></TD><TD> - Sets smallest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_smallest_magnitude </B></TD><TD> - Sets smallest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_largest_real </B></TD><TD> - Sets largest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_largest_real </B></TD><TD> - Sets largest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_smallest_real </B></TD><TD> - Sets smallest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_smallest_real </B></TD><TD> - Sets smallest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_largest_imaginary </B></TD><TD> - Sets largest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_largest_imaginary </B></TD><TD> - Sets largest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_smallest_imaginary </B></TD><TD> - Sets smallest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_smallest_imaginary </B></TD><TD> - Sets smallest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target_magnitude </B></TD><TD> - Sets eigenvalues closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target_magnitude </B></TD><TD> - Sets eigenvalues closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target_real </B></TD><TD> - Sets real parts closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target_real </B></TD><TD> - Sets real parts closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target_imaginary </B></TD><TD> - Sets imaginary parts closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_target_imaginary </B></TD><TD> - Sets imaginary parts closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_all </B></TD><TD> - Sets all eigenvalues in a region
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -75,10 +81,15 @@ stated above. If SLEPc is compiled for real numbers NEP_LARGEST_IMAGINARY
 and NEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part
 for eigenvalue selection.
 <P>
+The target is a scalar value provided with <A HREF="../NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</A>().
+<P>
+NEP_ALL is intended for use in the context of the CISS solver for
+computing all eigenvalues in a region.
+<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</A>(), <A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A>
+ <A HREF="../NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</A>(), <A HREF="../NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</A>(), <A HREF="../NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</A>(), <A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A>
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepopts.c.html#NEPSetWhichEigenpairs">src/nep/interface/nepopts.c</A>
 <BR><A HREF="./index.html">Index of all NEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/NEP/NEPSetWorkVecs.html b/docs/manualpages/NEP/NEPSetWorkVecs.html
index 4cc66e2..6f9b0e0 100644
--- a/docs/manualpages/NEP/NEPSetWorkVecs.html
+++ b/docs/manualpages/NEP/NEPSetWorkVecs.html
@@ -6,23 +6,23 @@
 <TITLE>NEPSetWorkVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSetWorkVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSetWorkVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSetWorkVecs</H1>
 Sets a number of work vectors into a <A HREF="../NEP/NEP.html#NEP">NEP</A> object 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscInt nw)
+PetscErrorCode NEPSetWorkVecs(NEP nep,PetscInt nw)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw  </B></TD><TD> - number of work vectors to allocate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw  </B></TD><TD> - number of work vectors to allocate
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Developers Note</FONT></H3>
diff --git a/docs/manualpages/NEP/NEPSolve.html b/docs/manualpages/NEP/NEPSolve.html
index c223649..004eed9 100644
--- a/docs/manualpages/NEP/NEPSolve.html
+++ b/docs/manualpages/NEP/NEPSolve.html
@@ -6,35 +6,35 @@
 <TITLE>NEPSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPSolve</H1>
 Solves the nonlinear eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPSolve(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>nep </B> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view </B></TD><TD> - print information about the solver used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view </B></TD><TD> - print information about the solver used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view_vectors binary </B></TD><TD> - save the computed eigenvectors to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view_vectors binary </B></TD><TD> - save the computed eigenvectors to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view_values </B></TD><TD> - print computed eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view_values </B></TD><TD> - print computed eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_relative </B></TD><TD> - print relative errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_error_relative </B></TD><TD> - print relative errors of each eigenpair
 </TD></TR></TABLE>
 <P>
 
@@ -49,4 +49,7 @@ Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <A HREF="../../../src/nep/examples/tutorials/ex20.c.html">src/nep/examples/tutorials/ex20.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex21.c.html">src/nep/examples/tutorials/ex21.c.html</A><BR>
 <A HREF="../../../src/nep/examples/tutorials/ex22.c.html">src/nep/examples/tutorials/ex22.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/loaded_string.c.html">src/nep/examples/nlevp/loaded_string.c.html</A><BR>
+<A HREF="../../../src/nep/examples/nlevp/gun.c.html">src/nep/examples/nlevp/gun.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPStop.html b/docs/manualpages/NEP/NEPStop.html
new file mode 100644
index 0000000..5e14998
--- /dev/null
+++ b/docs/manualpages/NEP/NEPStop.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPStop.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPStop</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPStop.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPStop</H1>
+Determines the stopping test 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { NEP_STOP_BASIC,
+               NEP_STOP_USER } <A HREF="../NEP/NEPStop.html#NEPStop">NEPStop</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</A>(), <A HREF="../NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/../../include/slepcnep.h.html#NEPStop">src/nep/../../include/slepcnep.h</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPStoppingBasic.html b/docs/manualpages/NEP/NEPStoppingBasic.html
new file mode 100644
index 0000000..8235155
--- /dev/null
+++ b/docs/manualpages/NEP/NEPStoppingBasic.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/NEP/NEPStoppingBasic.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>NEPStoppingBasic</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPStoppingBasic.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>NEPStoppingBasic</H1>
+Default routine to determine whether the outer eigensolver iteration must be stopped. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcnep.h" 
+PetscErrorCode NEPStoppingBasic(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)
+</PRE>
+Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - nonlinear eigensolver context obtained from <A HREF="../NEP/NEPCreate.html#NEPCreate">NEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev    </B></TD><TD> - number of requested eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - context (not used here)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - result of the stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+A positive value of reason indicates that the iteration has finished successfully
+(converged), and a negative value indicates an error condition (diverged). If
+the iteration needs to be continued, reason must be set to NEP_CONVERGED_ITERATING
+(zero).
+<P>
+<A HREF="../NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</A>() will stop if all requested eigenvalues are converged, or if
+the maximum number of iterations has been reached.
+<P>
+Use <A HREF="../NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</A>() to provide your own test instead of using this one.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</A>(), <A HREF="../NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</A>, <A HREF="../NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepdefault.c.html#NEPStoppingBasic">src/nep/interface/nepdefault.c</A>
+<BR><A HREF="./index.html">Index of all NEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/NEP/NEPType.html b/docs/manualpages/NEP/NEPType.html
index 238e451..3d001ca 100644
--- a/docs/manualpages/NEP/NEPType.html
+++ b/docs/manualpages/NEP/NEPType.html
@@ -6,8 +6,8 @@
 <TITLE>NEPType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPType</H1>
 String with the name of a nonlinear eigensolver 
@@ -19,6 +19,7 @@ typedef const char* <A HREF="../NEP/NEPType.html#NEPType">NEPType</A>;
 #define NEPNARNOLDI  "narnoldi"
 #define NEPCISS      "ciss"
 #define NEPINTERPOL  "interpol"
+#define NEPNLEIGS    "nleigs"
 
 </PRE>
 
diff --git a/docs/manualpages/NEP/NEPValuesView.html b/docs/manualpages/NEP/NEPValuesView.html
index 598ee2d..5ee1a0b 100644
--- a/docs/manualpages/NEP/NEPValuesView.html
+++ b/docs/manualpages/NEP/NEPValuesView.html
@@ -6,28 +6,28 @@
 <TITLE>NEPValuesView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPValuesView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPValuesView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPValuesView</H1>
 Displays the computed eigenvalues in a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscViewer viewer)
+PetscErrorCode NEPValuesView(NEP nep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-nep_view_values </B> - print computed eigenvalues
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view_values </B></TD><TD> - print computed eigenvalues
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/NEP/NEPValuesViewFromOptions.html b/docs/manualpages/NEP/NEPValuesViewFromOptions.html
index eac95da..01cb2cc 100644
--- a/docs/manualpages/NEP/NEPValuesViewFromOptions.html
+++ b/docs/manualpages/NEP/NEPValuesViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>NEPValuesViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPValuesViewFromOptions</H1>
 Processes command line options to determine if/how the computed eigenvalues are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPValuesViewFromOptions(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepview.c.html#NEPValuesViewFromOptions">src/nep/interface/nepview.c</A>
diff --git a/docs/manualpages/NEP/NEPVectorsView.html b/docs/manualpages/NEP/NEPVectorsView.html
index 6a33533..3801da8 100644
--- a/docs/manualpages/NEP/NEPVectorsView.html
+++ b/docs/manualpages/NEP/NEPVectorsView.html
@@ -6,28 +6,28 @@
 <TITLE>NEPVectorsView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPVectorsView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPVectorsView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPVectorsView</H1>
 Outputs computed eigenvectors to a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscViewer viewer)
+PetscErrorCode NEPVectorsView(NEP nep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep    </B></TD><TD> - the nonlinear eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-nep_view_vectors </B> - output eigenvectors.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view_vectors </B></TD><TD> - output eigenvectors.
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If PETSc was configured with real scalars, complex conjugate eigenvectors
diff --git a/docs/manualpages/NEP/NEPVectorsViewFromOptions.html b/docs/manualpages/NEP/NEPVectorsViewFromOptions.html
index c760e5d..1d98448 100644
--- a/docs/manualpages/NEP/NEPVectorsViewFromOptions.html
+++ b/docs/manualpages/NEP/NEPVectorsViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>NEPVectorsViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPVectorsViewFromOptions</H1>
 Processes command line options to determine if/how the computed eigenvectors are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep)
+PetscErrorCode NEPVectorsViewFromOptions(NEP nep)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>nep </B> - the nonlinear eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/nep/interface/nepview.c.html#NEPVectorsViewFromOptions">src/nep/interface/nepview.c</A>
diff --git a/docs/manualpages/NEP/NEPView.html b/docs/manualpages/NEP/NEPView.html
index 938afbc..aaddc7c 100644
--- a/docs/manualpages/NEP/NEPView.html
+++ b/docs/manualpages/NEP/NEPView.html
@@ -6,35 +6,35 @@
 <TITLE>NEPView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPView</H1>
 Prints the <A HREF="../NEP/NEP.html#NEP">NEP</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcnep.h" 
-PetscErrorCode <A HREF="../NEP/NEPView.html#NEPView">NEPView</A>(<A HREF="../NEP/NEP.html#NEP">NEP</A> nep,PetscViewer viewer)
+PetscErrorCode NEPView(NEP nep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../NEP/NEP.html#NEP">NEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nep </B></TD><TD> - the nonlinear eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-nep_view </B> - Calls <A HREF="../NEP/NEPView.html#NEPView">NEPView</A>() at end of <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-nep_view </B></TD><TD> - Calls <A HREF="../NEP/NEPView.html#NEPView">NEPView</A>() at end of <A HREF="../NEP/NEPSolve.html#NEPSolve">NEPSolve</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/NEP/NEPWhich.html b/docs/manualpages/NEP/NEPWhich.html
index 55df9ad..c8b0816 100644
--- a/docs/manualpages/NEP/NEPWhich.html
+++ b/docs/manualpages/NEP/NEPWhich.html
@@ -6,8 +6,8 @@
 <TITLE>NEPWhich</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/NEPWhich.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/NEPWhich.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>NEPWhich</H1>
 Determines which part of the spectrum is requested 
@@ -21,7 +21,9 @@ typedef enum { NEP_LARGEST_MAGNITUDE=1,
                NEP_SMALLEST_IMAGINARY,
                NEP_TARGET_MAGNITUDE,
                NEP_TARGET_REAL,
-               NEP_TARGET_IMAGINARY} <A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A>;
+               NEP_TARGET_IMAGINARY,
+               NEP_ALL,
+               NEP_WHICH_USER } <A HREF="../NEP/NEPWhich.html#NEPWhich">NEPWhich</A>;
 </PRE>
 
 <P>
diff --git a/docs/manualpages/NEP/index.html b/docs/manualpages/NEP/index.html
index e2a1d0d..30539f3 100644
--- a/docs/manualpages/NEP/index.html
+++ b/docs/manualpages/NEP/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/NEP/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/NEP/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
@@ -22,8 +22,12 @@ Options can also be set directly in application codes by calling the correspondi
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./NEPComputeError.html">NEPComputeError</A></TD>
  <TD WIDTH=250><A HREF="./NEP.html">NEP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetEigenpair.html">NEPGetEigenpair</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetSplitOperator.html">NEPSetSplitOperator</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPComputeError.html">NEPComputeError</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetDerivatives.html">NEPSetDerivatives</A></TD>
  <TD WIDTH=250><A HREF="./NEPSolve.html">NEPSolve</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCreate.html">NEPCreate</A></TD>
@@ -38,124 +42,160 @@ Options can also be set directly in application codes by calling the correspondi
  <TD WIDTH=250><A HREF="./NEPSetJacobian.html">NEPSetJacobian</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetEigenpair.html">NEPGetEigenpair</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetSplitOperator.html">NEPSetSplitOperator</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
-<TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
+ <TD WIDTH=250><A HREF="./NEPConv.html">NEPConv</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetType.html">NEPGetType</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRefine.html">NEPRefine</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./NEPConvergedReason.html">NEPConvergedReason</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetTarget.html">NEPGetTarget</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetDimensions.html">NEPSetDimensions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetWhichEigenpairs.html">NEPGetWhichEigenpairs</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRefineScheme.html">NEPRefineScheme</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPErrorType.html">NEPErrorType</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetTolerances.html">NEPGetTolerances</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetInitialSpace.html">NEPSetInitialSpace</A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorAll.html">NEPMonitorAll</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetConvergenceTest.html">NEPSetConvergenceTest</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPErrorView.html">NEPErrorView</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetType.html">NEPGetType</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetLagPreconditioner.html">NEPSetLagPreconditioner</A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorCancel.html">NEPMonitorCancel</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetDimensions.html">NEPSetDimensions</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetConstCorrectionTol.html">NEPGetConstCorrectionTol</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetWhichEigenpairs.html">NEPGetWhichEigenpairs</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetConvergedReason.html">NEPGetConvergedReason</A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorConverged.html">NEPMonitorConverged</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetInitialSpace.html">NEPSetInitialSpace</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetConvergenceTest.html">NEPGetConvergenceTest</A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorFirst.html">NEPMonitorFirst</A></TD>
  <TD WIDTH=250><A HREF="./NEPSetRefine.html">NEPSetRefine</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetConvergedReason.html">NEPGetConvergedReason</A></TD>
- <TD WIDTH=250><A HREF="./NEPMonitorAll.html">NEPMonitorAll</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetDimensions.html">NEPGetDimensions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorLGCreate.html">NEPMonitorLGCreate</A></TD>
  <TD WIDTH=250><A HREF="./NEPSetTarget.html">NEPSetTarget</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetDimensions.html">NEPGetDimensions</A></TD>
- <TD WIDTH=250><A HREF="./NEPMonitorCancel.html">NEPMonitorCancel</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetIterationNumber.html">NEPGetIterationNumber</A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorSet.html">NEPMonitorSet</A></TD>
  <TD WIDTH=250><A HREF="./NEPSetTolerances.html">NEPSetTolerances</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetIterationNumber.html">NEPGetIterationNumber</A></TD>
- <TD WIDTH=250><A HREF="./NEPMonitorConverged.html">NEPMonitorConverged</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetMonitorContext.html">NEPGetMonitorContext</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSSetSingularitiesFunction.html">NEPNLEIGSSetSingularitiesFunction</A></TD>
  <TD WIDTH=250><A HREF="./NEPSetType.html">NEPSetType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetLagPreconditioner.html">NEPGetLagPreconditioner</A></TD>
- <TD WIDTH=250><A HREF="./NEPMonitorFirst.html">NEPMonitorFirst</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetRefine.html">NEPGetRefine</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIIGetConstCorrectionTol.html">NEPRIIGetConstCorrectionTol</A></TD>
  <TD WIDTH=250><A HREF="./NEPSetWhichEigenpairs.html">NEPSetWhichEigenpairs</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetMonitorContext.html">NEPGetMonitorContext</A></TD>
- <TD WIDTH=250><A HREF="./NEPMonitorSet.html">NEPMonitorSet</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetSplitOperatorInfo.html">NEPGetSplitOperatorInfo</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIIGetLagPreconditioner.html">NEPRIIGetLagPreconditioner</A></TD>
  <TD WIDTH=250><A HREF="./NEPValuesView.html">NEPValuesView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetRefine.html">NEPGetRefine</A></TD>
- <TD WIDTH=250><A HREF="./NEPReasonView.html">NEPReasonView</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetSplitOperatorTerm.html">NEPGetSplitOperatorTerm</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIISetConstCorrectionTol.html">NEPRIISetConstCorrectionTol</A></TD>
  <TD WIDTH=250><A HREF="./NEPVectorsView.html">NEPVectorsView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetSplitOperatorInfo.html">NEPGetSplitOperatorInfo</A></TD>
- <TD WIDTH=250><A HREF="./NEPRefine.html">NEPRefine</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetTarget.html">NEPGetTarget</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIISetLagPreconditioner.html">NEPRIISetLagPreconditioner</A></TD>
  <TD WIDTH=250><A HREF="./NEPWhich.html">NEPWhich</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPGetSplitOperatorTerm.html">NEPGetSplitOperatorTerm</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetConstCorrectionTol.html">NEPSetConstCorrectionTol</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetTolerances.html">NEPGetTolerances</A></TD>
+ <TD WIDTH=250><A HREF="./NEPReasonView.html">NEPReasonView</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./NEPAppendOptionsPrefix.html">NEPAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetFunction.html">NEPGetFunction</A></TD>
- <TD WIDTH=250><A HREF="./NEPRegister.html">NEPRegister</A></TD>
+ <TD WIDTH=250><A HREF="./NEPInterpolSetDegree.html">NEPInterpolSetDegree</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIISetKSP.html">NEPRIISetKSP</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCISSGetRefinement.html">NEPCISSGetRefinement</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetJacobian.html">NEPGetJacobian</A></TD>
- <TD WIDTH=250><A HREF="./NEPReset.html">NEPReset</A></TD>
+ <TD WIDTH=250><A HREF="./NEPInterpolSetPEP.html">NEPInterpolSetPEP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIISetMaximumIterations.html">NEPRIISetMaximumIterations</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCISSGetSizes.html">NEPCISSGetSizes</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetKSP.html">NEPGetKSP</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetBV.html">NEPSetBV</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNArnoldiGetKSP.html">NEPNArnoldiGetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRefineGetKSP.html">NEPRefineGetKSP</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCISSGetThreshold.html">NEPCISSGetThreshold</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetOptionsPrefix.html">NEPGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetConvergenceTest.html">NEPSetConvergenceTest</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNArnoldiSetKSP.html">NEPNArnoldiSetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRegister.html">NEPRegister</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCISSSetRefinement.html">NEPCISSSetRefinement</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetRG.html">NEPGetRG</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetDS.html">NEPSetDS</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetInterpolation.html">NEPNLEIGSGetInterpolation</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRegisterAll.html">NEPRegisterAll</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCISSSetSizes.html">NEPCISSSetSizes</A></TD>
- <TD WIDTH=250><A HREF="./NEPInterpolGetDegree.html">NEPInterpolGetDegree</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetKSP.html">NEPSetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetKSPs.html">NEPNLEIGSGetKSPs</A></TD>
+ <TD WIDTH=250><A HREF="./NEPReset.html">NEPReset</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPCISSSetThreshold.html">NEPCISSSetThreshold</A></TD>
- <TD WIDTH=250><A HREF="./NEPInterpolGetPEP.html">NEPInterpolGetPEP</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetOptionsPrefix.html">NEPSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetLocking.html">NEPNLEIGSGetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSLPGetEPS.html">NEPSLPGetEPS</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPGetBV.html">NEPGetBV</A></TD>
- <TD WIDTH=250><A HREF="./NEPInterpolSetDegree.html">NEPInterpolSetDegree</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetRG.html">NEPSetRG</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetRKShifts.html">NEPNLEIGSGetRKShifts</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSLPSetEPS.html">NEPSLPSetEPS</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPGetDS.html">NEPGetDS</A></TD>
- <TD WIDTH=250><A HREF="./NEPInterpolSetPEP.html">NEPInterpolSetPEP</A></TD>
- <TD WIDTH=250><A HREF="./NEPSLPGetEPS.html">NEPSLPGetEPS</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetRestart.html">NEPNLEIGSGetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetBV.html">NEPSetBV</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetDerivatives.html">NEPGetDerivatives</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetSingularitiesFunction.html">NEPNLEIGSGetSingularitiesFunction</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetConvergenceTestFunction.html">NEPSetConvergenceTestFunction</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPGetErrorEstimate.html">NEPGetErrorEstimate</A></TD>
- <TD WIDTH=250><A HREF="./NEPRegisterAll.html">NEPRegisterAll</A></TD>
- <TD WIDTH=250><A HREF="./NEPSLPSetEPS.html">NEPSLPSetEPS</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSGetTrueResidual.html">NEPNLEIGSGetTrueResidual</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetDS.html">NEPSetDS</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetFunction.html">NEPGetFunction</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSSetInterpolation.html">NEPNLEIGSSetInterpolation</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetEigenvalueComparison.html">NEPSetEigenvalueComparison</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetJacobian.html">NEPGetJacobian</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSSetLocking.html">NEPNLEIGSSetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetOptionsPrefix.html">NEPSetOptionsPrefix</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetOptionsPrefix.html">NEPGetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSSetRKShifts.html">NEPNLEIGSSetRKShifts</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetRG.html">NEPSetRG</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetRG.html">NEPGetRG</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSSetRestart.html">NEPNLEIGSSetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetStoppingTest.html">NEPSetStoppingTest</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPGetStoppingTest.html">NEPGetStoppingTest</A></TD>
+ <TD WIDTH=250><A HREF="./NEPNLEIGSSetTrueResidual.html">NEPNLEIGSSetTrueResidual</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetStoppingTestFunction.html">NEPSetStoppingTestFunction</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPInterpolGetDegree.html">NEPInterpolGetDegree</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIIGetKSP.html">NEPRIIGetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPStop.html">NEPStop</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./NEPInterpolGetPEP.html">NEPInterpolGetPEP</A></TD>
+ <TD WIDTH=250><A HREF="./NEPRIIGetMaximumIterations.html">NEPRIIGetMaximumIterations</A></TD>
+ <TD WIDTH=250><A HREF="./NEPStoppingBasic.html">NEPStoppingBasic</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./NEPAllocateSolution.html">NEPAllocateSolution</A></TD>
- <TD WIDTH=250><A HREF="./NEPFinalizePackage.html">NEPFinalizePackage</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetUp.html">NEPSetUp</A></TD>
+ <TD WIDTH=250><A HREF="./NEPErrorViewFromOptions.html">NEPErrorViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPReasonViewFromOptions.html">NEPReasonViewFromOptions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPApplyFunction.html">NEPApplyFunction</A></TD>
- <TD WIDTH=250><A HREF="./NEPGetTrackAll.html">NEPGetTrackAll</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetWorkVecs.html">NEPSetWorkVecs</A></TD>
+ <TD WIDTH=250><A HREF="./NEPFinalizePackage.html">NEPFinalizePackage</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetTrackAll.html">NEPSetTrackAll</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPApplyJacobian.html">NEPApplyJacobian</A></TD>
- <TD WIDTH=250><A HREF="./NEPInitializePackage.html">NEPInitializePackage</A></TD>
- <TD WIDTH=250><A HREF="./NEPValuesViewFromOptions.html">NEPValuesViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPGetTrackAll.html">NEPGetTrackAll</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetUp.html">NEPSetUp</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPComputeFunction.html">NEPComputeFunction</A></TD>
- <TD WIDTH=250><A HREF="./NEPProjectOperator.html">NEPProjectOperator</A></TD>
- <TD WIDTH=250><A HREF="./NEPVectorsViewFromOptions.html">NEPVectorsViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPInitializePackage.html">NEPInitializePackage</A></TD>
+ <TD WIDTH=250><A HREF="./NEPSetWorkVecs.html">NEPSetWorkVecs</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./NEPComputeJacobian.html">NEPComputeJacobian</A></TD>
- <TD WIDTH=250><A HREF="./NEPReasonViewFromOptions.html">NEPReasonViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./NEPMonitorSetFromOptions.html">NEPMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPValuesViewFromOptions.html">NEPValuesViewFromOptions</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./NEPErrorViewFromOptions.html">NEPErrorViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./NEPSetTrackAll.html">NEPSetTrackAll</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./NEPConvMonitorSetFromOptions.html">NEPConvMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./NEPProjectOperator.html">NEPProjectOperator</A></TD>
+ <TD WIDTH=250><A HREF="./NEPVectorsViewFromOptions.html">NEPVectorsViewFromOptions</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>No deprecated routines</B></TD></TR>
 </TABLE>
diff --git a/docs/manualpages/PEP/PEP.html b/docs/manualpages/PEP/PEP.html
index cfe04ae..f2e4620 100644
--- a/docs/manualpages/PEP/PEP.html
+++ b/docs/manualpages/PEP/PEP.html
@@ -6,8 +6,8 @@
 <TITLE>PEP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEP</H1>
 Abstract SLEPc object that manages all the polynomial eigenvalue problem solvers. 
diff --git a/docs/manualpages/PEP/PEPAllocateSolution.html b/docs/manualpages/PEP/PEPAllocateSolution.html
index 3ec17b9..fd533ca 100644
--- a/docs/manualpages/PEP/PEPAllocateSolution.html
+++ b/docs/manualpages/PEP/PEPAllocateSolution.html
@@ -6,23 +6,23 @@
 <TITLE>PEPAllocateSolution</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPAllocateSolution</H1>
 Allocate memory storage for common variables such as eigenvalues and eigenvectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt extra)
+PetscErrorCode PEPAllocateSolution(PEP pep,PetscInt extra)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
 working basis slightly larger than ncv
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/PEP/PEPAppendOptionsPrefix.html b/docs/manualpages/PEP/PEPAppendOptionsPrefix.html
index 9ce7ae4..c25fb26 100644
--- a/docs/manualpages/PEP/PEPAppendOptionsPrefix.html
+++ b/docs/manualpages/PEP/PEPAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>PEPAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../PEP/PEP.html#PEP">PEP</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,const char *prefix)
+PetscErrorCode PEPAppendOptionsPrefix(PEP pep,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../PEP/PEP.html#PEP">PEP</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../PEP/PEP.html#PEP">PEP</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPBasis.html b/docs/manualpages/PEP/PEPBasis.html
index b241347..75e1e65 100644
--- a/docs/manualpages/PEP/PEPBasis.html
+++ b/docs/manualpages/PEP/PEPBasis.html
@@ -6,8 +6,8 @@
 <TITLE>PEPBasis</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPBasis.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPBasis.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPBasis</H1>
 The type of polynomial basis used to represent the polynomial eigenproblem 
diff --git a/docs/manualpages/PEP/PEPComputeError.html b/docs/manualpages/PEP/PEPComputeError.html
index 4da41e9..1e2fc32 100644
--- a/docs/manualpages/PEP/PEPComputeError.html
+++ b/docs/manualpages/PEP/PEPComputeError.html
@@ -6,30 +6,30 @@
 <TITLE>PEPComputeError</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPComputeError.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPComputeError.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPComputeError</H1>
 Computes the error (based on the residual norm) associated with the i-th computed eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt i,<A HREF="../PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</A> type,PetscReal *error)
+PetscErrorCode PEPComputeError(PEP pep,PetscInt i,PEPErrorType type,PetscReal *error)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>error </B> - the error
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>error </B></TD><TD> - the error
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The error can be computed in various ways, all of them based on the residual
@@ -44,4 +44,6 @@ See the users guide for additional details.
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPConv.html b/docs/manualpages/PEP/PEPConv.html
index c7d5e48..aace410 100644
--- a/docs/manualpages/PEP/PEPConv.html
+++ b/docs/manualpages/PEP/PEPConv.html
@@ -6,16 +6,15 @@
 <TITLE>PEPConv</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPConv.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPConv.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPConv</H1>
 Determines the convergence test 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum { PEP_CONV_ABS,
-               PEP_CONV_EIG,
-               PEP_CONV_LINEAR,
+               PEP_CONV_REL,
                PEP_CONV_NORM,
                PEP_CONV_USER } <A HREF="../PEP/PEPConv.html#PEPConv">PEPConv</A>;
 </PRE>
diff --git a/docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html b/docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html
new file mode 100644
index 0000000..33b0253
--- /dev/null
+++ b/docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPConvMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPConvMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user (for monitors that only show iteration numbers of convergence). 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPConvMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))
+</PRE>
+Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - the polynomial eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a SlepcConvMonitor
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>(), <A HREF="../PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepopts.c.html#PEPConvMonitorSetFromOptions">src/pep/interface/pepopts.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPConvergedReason.html b/docs/manualpages/PEP/PEPConvergedReason.html
index 87b09c8..cdfc9d5 100644
--- a/docs/manualpages/PEP/PEPConvergedReason.html
+++ b/docs/manualpages/PEP/PEPConvergedReason.html
@@ -6,19 +6,20 @@
 <TITLE>PEPConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPConvergedReason</H1>
 Reason an eigensolver was said to have converged or diverged 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum {/* converged */
-              PEP_CONVERGED_TOL                =  2,
+              PEP_CONVERGED_TOL                =  1,
+              PEP_CONVERGED_USER               =  2,
               /* diverged */
-              PEP_DIVERGED_ITS                 = -3,
-              PEP_DIVERGED_BREAKDOWN           = -4,
-              PEP_DIVERGED_SYMMETRY_LOST       = -5,
+              PEP_DIVERGED_ITS                 = -1,
+              PEP_DIVERGED_BREAKDOWN           = -2,
+              PEP_DIVERGED_SYMMETRY_LOST       = -3,
               PEP_CONVERGED_ITERATING          =  0} <A HREF="../PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</A>;
 </PRE>
 
diff --git a/docs/manualpages/PEP/PEPCreate.html b/docs/manualpages/PEP/PEPCreate.html
index 0de8afd..8746706 100644
--- a/docs/manualpages/PEP/PEPCreate.html
+++ b/docs/manualpages/PEP/PEPCreate.html
@@ -6,25 +6,25 @@
 <TITLE>PEPCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPCreate</H1>
 Creates the default <A HREF="../PEP/PEP.html#PEP">PEP</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>(MPI_Comm comm,<A HREF="../PEP/PEP.html#PEP">PEP</A> *outpep)
+PetscErrorCode PEPCreate(MPI_Comm comm,PEP *outpep)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>pep </B> - location to put the <A HREF="../PEP/PEP.html#PEP">PEP</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - location to put the <A HREF="../PEP/PEP.html#PEP">PEP</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The default <A HREF="../PEP/PEP.html#PEP">PEP</A> type is PEPTOAR
@@ -40,5 +40,13 @@ The default <A HREF="../PEP/PEP.html#PEP">PEP</A> type is PEPTOAR
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPDestroy.html b/docs/manualpages/PEP/PEPDestroy.html
index 469840b..2665b2b 100644
--- a/docs/manualpages/PEP/PEPDestroy.html
+++ b/docs/manualpages/PEP/PEPDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>PEPDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPDestroy</H1>
 Destroys the <A HREF="../PEP/PEP.html#PEP">PEP</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> *pep)
+PetscErrorCode PEPDestroy(PEP *pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -33,5 +33,13 @@ Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPErrorType.html b/docs/manualpages/PEP/PEPErrorType.html
index 8e92172..231ef12 100644
--- a/docs/manualpages/PEP/PEPErrorType.html
+++ b/docs/manualpages/PEP/PEPErrorType.html
@@ -6,8 +6,8 @@
 <TITLE>PEPErrorType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPErrorType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPErrorType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPErrorType</H1>
 The error type used to assess accuracy of computed solutions 
diff --git a/docs/manualpages/PEP/PEPErrorView.html b/docs/manualpages/PEP/PEPErrorView.html
index 7e907b7..439e28a 100644
--- a/docs/manualpages/PEP/PEPErrorView.html
+++ b/docs/manualpages/PEP/PEPErrorView.html
@@ -6,34 +6,34 @@
 <TITLE>PEPErrorView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPErrorView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPErrorView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPErrorView</H1>
 Displays the errors associated with the computed solution (as well as the eigenvalues). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</A> etype,PetscViewer viewer)
+PetscErrorCode PEPErrorView(PEP pep,PEPErrorType etype,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_relative </B></TD><TD> - print relative errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_relative </B></TD><TD> - print relative errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_backward </B></TD><TD> - print backward errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_backward </B></TD><TD> - print backward errors of each eigenpair
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -53,5 +53,13 @@ eigenvalues and corresponding errors is printed.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPErrorViewFromOptions.html b/docs/manualpages/PEP/PEPErrorViewFromOptions.html
index 54835b6..c70c816 100644
--- a/docs/manualpages/PEP/PEPErrorViewFromOptions.html
+++ b/docs/manualpages/PEP/PEPErrorViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>PEPErrorViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPErrorViewFromOptions</H1>
 Processes command line options to determine if/how the errors of the computed solution are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPErrorViewFromOptions(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepview.c.html#PEPErrorViewFromOptions">src/pep/interface/pepview.c</A>
diff --git a/docs/manualpages/PEP/PEPExtract.html b/docs/manualpages/PEP/PEPExtract.html
index 4b5516e..24e3360 100644
--- a/docs/manualpages/PEP/PEPExtract.html
+++ b/docs/manualpages/PEP/PEPExtract.html
@@ -6,8 +6,8 @@
 <TITLE>PEPExtract</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPExtract.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPExtract.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPExtract</H1>
 The extraction type 
diff --git a/docs/manualpages/PEP/PEPFinalizePackage.html b/docs/manualpages/PEP/PEPFinalizePackage.html
index 433c162..8956f40 100644
--- a/docs/manualpages/PEP/PEPFinalizePackage.html
+++ b/docs/manualpages/PEP/PEPFinalizePackage.html
@@ -6,14 +6,14 @@
 <TITLE>PEPFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../PEP/PEP.html#PEP">PEP</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</A>(void)
+PetscErrorCode PEPFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetBV.html b/docs/manualpages/PEP/PEPGetBV.html
index a644269..05aa1c6 100644
--- a/docs/manualpages/PEP/PEPGetBV.html
+++ b/docs/manualpages/PEP/PEPGetBV.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetBV</H1>
 Obtain the basis vectors object associated to the polynomial eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../BV/BV.html#BV">BV</A> *bv)
+PetscErrorCode PEPGetBV(PEP pep,BV *bv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>bv </B> - basis vectors context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv </B></TD><TD> - basis vectors context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetBasis.html b/docs/manualpages/PEP/PEPGetBasis.html
index c2920e8..b4e1e87 100644
--- a/docs/manualpages/PEP/PEPGetBasis.html
+++ b/docs/manualpages/PEP/PEPGetBasis.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetBasis</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetBasis.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetBasis.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetBasis</H1>
 Gets the type of polynomial basis from the <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPBasis.html#PEPBasis">PEPBasis</A> *basis)
+PetscErrorCode PEPGetBasis(PEP pep,PEPBasis *basis)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>basis </B> - the polynomial basis
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>basis </B></TD><TD> - the polynomial basis
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetConverged.html b/docs/manualpages/PEP/PEPGetConverged.html
index 110958f..a16ebda 100644
--- a/docs/manualpages/PEP/PEPGetConverged.html
+++ b/docs/manualpages/PEP/PEPGetConverged.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetConverged</H1>
 Gets the number of converged eigenpairs. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt *nconv)
+PetscErrorCode PEPGetConverged(PEP pep,PetscInt *nconv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nconv </B> - number of converged eigenpairs
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv </B></TD><TD> - number of converged eigenpairs
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 This function should be called after <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>() has finished.
@@ -37,4 +37,6 @@ This function should be called after <A HREF="../PEP/PEPSolve.html#PEPSolve">PEP
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPGetConvergedReason.html b/docs/manualpages/PEP/PEPGetConvergedReason.html
index 293c9ef..0bfbb24 100644
--- a/docs/manualpages/PEP/PEPGetConvergedReason.html
+++ b/docs/manualpages/PEP/PEPGetConvergedReason.html
@@ -6,35 +6,37 @@
 <TITLE>PEPGetConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetConvergedReason</H1>
 Gets the reason why the <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>() iteration was stopped. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</A> *reason)
+PetscErrorCode PEPGetConvergedReason(PEP pep,PEPConvergedReason *reason)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>reason </B> - negative value indicates diverged, positive value converged
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - negative value indicates diverged, positive value converged
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values for reason</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONVERGED_USER </B></TD><TD> - converged due to a user-defined condition
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_DIVERGED_ITS </B></TD><TD> - required more than its to reach convergence
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_DIVERGED_ITS </B></TD><TD> - required more than max_it iterations to reach convergence
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_DIVERGED_SYMMETRY_LOST </B></TD><TD> - pseudo-Lanczos was not able to keep symmetry
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_DIVERGED_SYMMETRY_LOST </B></TD><TD> - pseudo-Lanczos was not able to keep symmetry
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPGetConvergenceTest.html b/docs/manualpages/PEP/PEPGetConvergenceTest.html
index e6fab9a..70975db 100644
--- a/docs/manualpages/PEP/PEPGetConvergenceTest.html
+++ b/docs/manualpages/PEP/PEPGetConvergenceTest.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetConvergenceTest</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetConvergenceTest</H1>
 Gets the method used to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPConv.html#PEPConv">PEPConv</A> *conv)
+PetscErrorCode PEPGetConvergenceTest(PEP pep,PEPConv *conv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep   </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>conv  </B> - the type of convergence test
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv  </B></TD><TD> - the type of convergence test
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetDS.html b/docs/manualpages/PEP/PEPGetDS.html
index 1408f9f..ccb234e 100644
--- a/docs/manualpages/PEP/PEPGetDS.html
+++ b/docs/manualpages/PEP/PEPGetDS.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetDS</H1>
 Obtain the direct solver object associated to the polynomial eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../DS/DS.html#DS">DS</A> *ds)
+PetscErrorCode PEPGetDS(PEP pep,DS *ds)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ds </B> - direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetDimensions.html b/docs/manualpages/PEP/PEPGetDimensions.html
index c6eb939..0248c9b 100644
--- a/docs/manualpages/PEP/PEPGetDimensions.html
+++ b/docs/manualpages/PEP/PEPGetDimensions.html
@@ -6,29 +6,29 @@
 <TITLE>PEPGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetDimensions</H1>
 Gets the number of eigenvalues to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
+PetscErrorCode PEPGetDimensions(PEP pep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -45,5 +45,6 @@ The user can specify NULL for any parameter that is not needed.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPGetEigenpair.html b/docs/manualpages/PEP/PEPGetEigenpair.html
index 861b853..6c6ce3f 100644
--- a/docs/manualpages/PEP/PEPGetEigenpair.html
+++ b/docs/manualpages/PEP/PEPGetEigenpair.html
@@ -6,34 +6,34 @@
 <TITLE>PEPGetEigenpair</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetEigenpair.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetEigenpair.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetEigenpair</H1>
 Gets the i-th solution of the eigenproblem as computed by <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>(). The solution consists in both the eigenvalue and the eigenvector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)
+PetscErrorCode PEPGetEigenpair(PEP pep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)
 </PRE>
 Logically Collective on <A HREF="../EPS/EPS.html#EPS">EPS</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - real part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vr   </B></TD><TD> - real part of eigenvector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vi   </B></TD><TD> - imaginary part of eigenvector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -58,4 +58,6 @@ with <A HREF="../PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhi
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPGetErrorEstimate.html b/docs/manualpages/PEP/PEPGetErrorEstimate.html
index 74f4bfb..8924d38 100644
--- a/docs/manualpages/PEP/PEPGetErrorEstimate.html
+++ b/docs/manualpages/PEP/PEPGetErrorEstimate.html
@@ -6,28 +6,28 @@
 <TITLE>PEPGetErrorEstimate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetErrorEstimate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetErrorEstimate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetErrorEstimate</H1>
 Returns the error estimate associated to the i-th computed eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt i,PetscReal *errest)
+PetscErrorCode PEPGetErrorEstimate(PEP pep,PetscInt i,PetscReal *errest)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of eigenpair
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>errest </B> - the error estimate
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - the error estimate
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is the error estimate used internally by the eigensolver. The actual
diff --git a/docs/manualpages/PEP/PEPGetExtract.html b/docs/manualpages/PEP/PEPGetExtract.html
index eed7b13..74f719e 100644
--- a/docs/manualpages/PEP/PEPGetExtract.html
+++ b/docs/manualpages/PEP/PEPGetExtract.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetExtract</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetExtract.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetExtract.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetExtract</H1>
 Gets the extraction strategy used by the <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPExtract.html#PEPExtract">PEPExtract</A> *extract)
+PetscErrorCode PEPGetExtract(PEP pep,PEPExtract *extract)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>extract </B> - extraction strategy
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extract </B></TD><TD> - extraction strategy
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetIterationNumber.html b/docs/manualpages/PEP/PEPGetIterationNumber.html
index 9d6393d..ff67a83 100644
--- a/docs/manualpages/PEP/PEPGetIterationNumber.html
+++ b/docs/manualpages/PEP/PEPGetIterationNumber.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetIterationNumber</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetIterationNumber</H1>
 Gets the current iteration number. If the call to <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>() is complete, then it returns the number of iterations carried out by the solution method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt *its)
+PetscErrorCode PEPGetIterationNumber(PEP pep,PetscInt *its)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>its </B> - number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetMonitorContext.html b/docs/manualpages/PEP/PEPGetMonitorContext.html
index 9881435..07b1a4a 100644
--- a/docs/manualpages/PEP/PEPGetMonitorContext.html
+++ b/docs/manualpages/PEP/PEPGetMonitorContext.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetMonitorContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetMonitorContext</H1>
 Gets the monitor context, as set by <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>() for the FIRST monitor only. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetMonitorContext.html#PEPGetMonitorContext">PEPGetMonitorContext</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,void **ctx)
+PetscErrorCode PEPGetMonitorContext(PEP pep,void **ctx)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ctx </B> - monitor context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - monitor context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetNumMatrices.html b/docs/manualpages/PEP/PEPGetNumMatrices.html
index d2e99de..7d16de5 100644
--- a/docs/manualpages/PEP/PEPGetNumMatrices.html
+++ b/docs/manualpages/PEP/PEPGetNumMatrices.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetNumMatrices</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetNumMatrices.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetNumMatrices.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetNumMatrices</H1>
 Returns the number of matrices stored in the <A HREF="../PEP/PEP.html#PEP">PEP</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt *nmat)
+PetscErrorCode PEPGetNumMatrices(PEP pep,PetscInt *nmat)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the <A HREF="../PEP/PEP.html#PEP">PEP</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the <A HREF="../PEP/PEP.html#PEP">PEP</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>nmat </B> - the number of matrices passed in <A HREF="../PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nmat </B></TD><TD> - the number of matrices passed in <A HREF="../PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetOperators.html b/docs/manualpages/PEP/PEPGetOperators.html
index 151cbd9..8281d7f 100644
--- a/docs/manualpages/PEP/PEPGetOperators.html
+++ b/docs/manualpages/PEP/PEPGetOperators.html
@@ -6,28 +6,28 @@
 <TITLE>PEPGetOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetOperators</H1>
 Gets the matrices associated with the polynomial eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt k,Mat *A)
+PetscErrorCode PEPGetOperators(PEP pep,PetscInt k,Mat *A)
 </PRE>
 Not collective, though parallel Mats are returned if the <A HREF="../PEP/PEP.html#PEP">PEP</A> is parallel
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the <A HREF="../PEP/PEP.html#PEP">PEP</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the <A HREF="../PEP/PEP.html#PEP">PEP</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k   </B></TD><TD> - the index of the requested matrix (starting in 0)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k   </B></TD><TD> - the index of the requested matrix (starting in 0)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>A </B> - the requested matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the requested matrix
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetOptionsPrefix.html b/docs/manualpages/PEP/PEPGetOptionsPrefix.html
index ab0c827..c8a5a4e 100644
--- a/docs/manualpages/PEP/PEPGetOptionsPrefix.html
+++ b/docs/manualpages/PEP/PEPGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>PEPGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../PEP/PEP.html#PEP">PEP</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,const char *prefix[])
+PetscErrorCode PEPGetOptionsPrefix(PEP pep,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/PEP/PEPGetProblemType.html b/docs/manualpages/PEP/PEPGetProblemType.html
index a1aa4d0..e236a96 100644
--- a/docs/manualpages/PEP/PEPGetProblemType.html
+++ b/docs/manualpages/PEP/PEPGetProblemType.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetProblemType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetProblemType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetProblemType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetProblemType</H1>
 Gets the problem type from the <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</A> *type)
+PetscErrorCode PEPGetProblemType(PEP pep,PEPProblemType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>type </B> - name of <A HREF="../PEP/PEP.html#PEP">PEP</A> problem type
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - name of <A HREF="../PEP/PEP.html#PEP">PEP</A> problem type
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetRG.html b/docs/manualpages/PEP/PEPGetRG.html
index af5652b..367a1a3 100644
--- a/docs/manualpages/PEP/PEPGetRG.html
+++ b/docs/manualpages/PEP/PEPGetRG.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetRG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetRG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetRG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetRG</H1>
 Obtain the region object associated to the polynomial eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../RG/RG.html#RG">RG</A> *rg)
+PetscErrorCode PEPGetRG(PEP pep,RG *rg)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>rg </B> - region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - region context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetRefine.html b/docs/manualpages/PEP/PEPGetRefine.html
index 3313922..ddf9960 100644
--- a/docs/manualpages/PEP/PEPGetRefine.html
+++ b/docs/manualpages/PEP/PEPGetRefine.html
@@ -6,33 +6,33 @@
 <TITLE>PEPGetRefine</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetRefine.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetRefine.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetRefine</H1>
 Gets the refinement strategy used by the <A HREF="../PEP/PEP.html#PEP">PEP</A> object, and the associated parameters. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPRefine.html#PEPRefine">PEPRefine</A> *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur)
+PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PEPRefineScheme *scheme)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>schur  </B></TD><TD> - whether the Schur complement approach is being used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scheme </B></TD><TD> - the scheme used for solving linear systems
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/PEP/PEPGetST.html b/docs/manualpages/PEP/PEPGetST.html
index e5f35c1..7ca8ef5 100644
--- a/docs/manualpages/PEP/PEPGetST.html
+++ b/docs/manualpages/PEP/PEPGetST.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetST</H1>
 Obtain the spectral transformation (<A HREF="../ST/ST.html#ST">ST</A>) object associated to the eigensolver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetST.html#PEPGetST">PEPGetST</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../ST/ST.html#ST">ST</A> *st)
+PetscErrorCode PEPGetST(PEP pep,ST *st)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>st </B> - spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -34,4 +34,6 @@ Not Collective
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPGetScale.html b/docs/manualpages/PEP/PEPGetScale.html
index 181fbbc..a430d8e 100644
--- a/docs/manualpages/PEP/PEPGetScale.html
+++ b/docs/manualpages/PEP/PEPGetScale.html
@@ -6,35 +6,35 @@
 <TITLE>PEPGetScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetScale</H1>
 Gets the scaling strategy used by the <A HREF="../PEP/PEP.html#PEP">PEP</A> object, and the associated parameters. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPScale.html#PEPScale">PEPScale</A> *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)
+PetscErrorCode PEPGetScale(PEP pep,PEPScale *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)
 </PRE>
 Not Collectiv, but vectors are shared by all processors that share the <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scale  </B></TD><TD> - scaling strategy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scale  </B></TD><TD> - scaling strategy
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha  </B></TD><TD> - the scaling factor used in the scalar strategy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha  </B></TD><TD> - the scaling factor used in the scalar strategy
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dl     </B></TD><TD> - the left diagonal matrix of the diagonal scaling algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dl     </B></TD><TD> - the left diagonal matrix of the diagonal scaling algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dr     </B></TD><TD> - the right diagonal matrix of the diagonal scaling algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dr     </B></TD><TD> - the right diagonal matrix of the diagonal scaling algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the diagonal scaling algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the diagonal scaling algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - approximation to wanted eigenvalues (modulus)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - approximation to wanted eigenvalues (modulus)
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/PEP/PEPGetStoppingTest.html b/docs/manualpages/PEP/PEPGetStoppingTest.html
new file mode 100644
index 0000000..7c299d9
--- /dev/null
+++ b/docs/manualpages/PEP/PEPGetStoppingTest.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPGetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPGetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPGetStoppingTest</H1>
+Gets the method used to decide the termination of the outer loop of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPGetStoppingTest(PEP pep,PEPStop *stop)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop  </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</A>(), <A HREF="../PEP/PEPStop.html#PEPStop">PEPStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepopts.c.html#PEPGetStoppingTest">src/pep/interface/pepopts.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPGetTarget.html b/docs/manualpages/PEP/PEPGetTarget.html
index ba410da..f5f101e 100644
--- a/docs/manualpages/PEP/PEPGetTarget.html
+++ b/docs/manualpages/PEP/PEPGetTarget.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetTarget</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetTarget.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetTarget.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetTarget</H1>
 Gets the value of the target. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscScalar* target)
+PetscErrorCode PEPGetTarget(PEP pep,PetscScalar* target)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>target </B> - the value of the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If the target was not set by the user, then zero is returned.
diff --git a/docs/manualpages/PEP/PEPGetTolerances.html b/docs/manualpages/PEP/PEPGetTolerances.html
index c0c2401..23b2a0d 100644
--- a/docs/manualpages/PEP/PEPGetTolerances.html
+++ b/docs/manualpages/PEP/PEPGetTolerances.html
@@ -6,27 +6,27 @@
 <TITLE>PEPGetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetTolerances</H1>
 Gets the tolerance and maximum iteration count used by the <A HREF="../PEP/PEP.html#PEP">PEP</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal *tol,PetscInt *maxits)
+PetscErrorCode PEPGetTolerances(PEP pep,PetscReal *tol,PetscInt *maxits)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPGetTrackAll.html b/docs/manualpages/PEP/PEPGetTrackAll.html
index 69f91f7..66b83f3 100644
--- a/docs/manualpages/PEP/PEPGetTrackAll.html
+++ b/docs/manualpages/PEP/PEPGetTrackAll.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetTrackAll</H1>
 Returns the flag indicating whether all residual norms must be computed or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool *trackall)
+PetscErrorCode PEPGetTrackAll(PEP pep,PetscBool *trackall)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>trackall </B> - the returned flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPGetType.html b/docs/manualpages/PEP/PEPGetType.html
index ad03599..be6d783 100644
--- a/docs/manualpages/PEP/PEPGetType.html
+++ b/docs/manualpages/PEP/PEPGetType.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetType</H1>
 Gets the <A HREF="../PEP/PEP.html#PEP">PEP</A> type as a string from the <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetType.html#PEPGetType">PEPGetType</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPType.html#PEPType">PEPType</A> *type)
+PetscErrorCode PEPGetType(PEP pep,PEPType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of <A HREF="../PEP/PEP.html#PEP">PEP</A> method
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of <A HREF="../PEP/PEP.html#PEP">PEP</A> method
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -37,5 +37,6 @@ Not Collective
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPGetWhichEigenpairs.html b/docs/manualpages/PEP/PEPGetWhichEigenpairs.html
index e8e7916..fd0f307 100644
--- a/docs/manualpages/PEP/PEPGetWhichEigenpairs.html
+++ b/docs/manualpages/PEP/PEPGetWhichEigenpairs.html
@@ -6,25 +6,25 @@
 <TITLE>PEPGetWhichEigenpairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPGetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPGetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPGetWhichEigenpairs</H1>
 Returns which portion of the spectrum is to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPWhich.html#PEPWhich">PEPWhich</A> *which)
+PetscErrorCode PEPGetWhichEigenpairs(PEP pep,PEPWhich *which)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>which </B> - the portion of the spectrum to be sought
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See <A HREF="../PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</A>() for possible values of 'which'.
diff --git a/docs/manualpages/PEP/PEPInitializePackage.html b/docs/manualpages/PEP/PEPInitializePackage.html
index bf29d91..0a71578 100644
--- a/docs/manualpages/PEP/PEPInitializePackage.html
+++ b/docs/manualpages/PEP/PEPInitializePackage.html
@@ -6,14 +6,14 @@
 <TITLE>PEPInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPInitializePackage</H1>
 This function initializes everything in the <A HREF="../PEP/PEP.html#PEP">PEP</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</A>(void)
+PetscErrorCode PEPInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPJDGetRestart.html b/docs/manualpages/PEP/PEPJDGetRestart.html
index eeb2cd2..f355a37 100644
--- a/docs/manualpages/PEP/PEPJDGetRestart.html
+++ b/docs/manualpages/PEP/PEPJDGetRestart.html
@@ -6,25 +6,25 @@
 <TITLE>PEPJDGetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPJDGetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPJDGetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPJDGetRestart</H1>
 Gets the restart parameter used in the Jacobi-Davidson method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal *keep)
+PetscErrorCode PEPJDGetRestart(PEP pep,PetscReal *keep)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>keep </B> - the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the restart parameter
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPJDGetTolerances.html b/docs/manualpages/PEP/PEPJDGetTolerances.html
deleted file mode 100644
index 85ebdc5..0000000
--- a/docs/manualpages/PEP/PEPJDGetTolerances.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPJDGetTolerances.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>PEPJDGetTolerances</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPJDGetTolerances.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>PEPJDGetTolerances</H1>
-Gets various tolerances in the Jacobi-Davidson method. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPJDGetTolerances.html#PEPJDGetTolerances">PEPJDGetTolerances</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)
-</PRE>
-Not Collective
-<P>
-<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
-<P>
-<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mtol </B></TD><TD> - the multiplicity tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>htol </B></TD><TD> - the harmonic tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stol </B></TD><TD> - the shift tolerance
-</TD></TR></TABLE>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/impls/jd/pjdopt.c.html#PEPJDGetTolerances">src/pep/impls/jd/pjdopt.c</A>
-<BR><A HREF="./index.html">Index of all PEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPJDSetRestart.html b/docs/manualpages/PEP/PEPJDSetRestart.html
index 9be55a2..ceafdd1 100644
--- a/docs/manualpages/PEP/PEPJDSetRestart.html
+++ b/docs/manualpages/PEP/PEPJDSetRestart.html
@@ -6,28 +6,28 @@
 <TITLE>PEPJDSetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPJDSetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPJDSetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPJDSetRestart</H1>
 Sets the restart parameter for the Jacobi-Davidson method, in particular the proportion of basis vectors that must be kept after restart. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal keep)
+PetscErrorCode PEPJDSetRestart(PEP pep,PetscReal keep)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_jd_restart </B> - Sets the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_jd_restart </B></TD><TD> - Sets the restart parameter
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Allowed values are in the range [0.1,0.9]. The default is 0.5.
diff --git a/docs/manualpages/PEP/PEPJDSetTolerances.html b/docs/manualpages/PEP/PEPJDSetTolerances.html
deleted file mode 100644
index a1cfa31..0000000
--- a/docs/manualpages/PEP/PEPJDSetTolerances.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
-<HTML>
-<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPJDSetTolerances.html" />
-<META NAME="GENERATOR" CONTENT="DOCTEXT">
-<link rel="stylesheet" href="/slepc.css" type="text/css">
-<TITLE>PEPJDSetTolerances</TITLE>
-</HEAD>
-<BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPJDSetTolerances.html "><small>Report Typos and Errors</small></a></div>
-
-<H1>PEPJDSetTolerances</H1>
-Sets various tolerance parameters for the Jacobi-Davidson method. 
-<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
-<PRE>
-#include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal mtol,PetscReal htol,PetscReal stol)
-</PRE>
-Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
-<P>
-<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mtol </B></TD><TD> - the multiplicity tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>htol </B></TD><TD> - the tolerance for harmonic extraction
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stol </B></TD><TD> - the tolerance for harmonic shift
-</TD></TR></TABLE>
-<P>
-<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_jd_mtol </B></TD><TD> - Sets the multiplicity tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_jd_htol </B></TD><TD> - Sets the harmonic tolerance
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_jd_stol </B></TD><TD> - Sets the shift tolerance
-</TD></TR></TABLE>
-<P>
-
-<P>
-<H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../PEP/PEPJDGetTolerances.html#PEPJDGetTolerances">PEPJDGetTolerances</A>()
-<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/impls/jd/pjdopt.c.html#PEPJDSetTolerances">src/pep/impls/jd/pjdopt.c</A>
-<BR><A HREF="./index.html">Index of all PEP routines</A>
-<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
-<BR><A HREF="../singleindex.html">Index of all manual pages</A>
-</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPLinearGetCompanionForm.html b/docs/manualpages/PEP/PEPLinearGetCompanionForm.html
index 7b0b58e..d3861c4 100644
--- a/docs/manualpages/PEP/PEPLinearGetCompanionForm.html
+++ b/docs/manualpages/PEP/PEPLinearGetCompanionForm.html
@@ -6,25 +6,25 @@
 <TITLE>PEPLinearGetCompanionForm</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPLinearGetCompanionForm.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPLinearGetCompanionForm.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPLinearGetCompanionForm</H1>
 Returns the number of the companion form that will be used for the linearization of a quadratic eigenproblem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt *cform)
+PetscErrorCode PEPLinearGetCompanionForm(PEP pep,PetscInt *cform)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep  </B> - polynomial eigenvalue solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - polynomial eigenvalue solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>cform </B> - the companion form number (1 or 2)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cform </B></TD><TD> - the companion form number (1 or 2)
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPLinearGetEPS.html b/docs/manualpages/PEP/PEPLinearGetEPS.html
index 22b7430..5eb85e3 100644
--- a/docs/manualpages/PEP/PEPLinearGetEPS.html
+++ b/docs/manualpages/PEP/PEPLinearGetEPS.html
@@ -6,25 +6,25 @@
 <TITLE>PEPLinearGetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPLinearGetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPLinearGetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPLinearGetEPS</H1>
 Retrieve the eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) associated to the polynomial eigenvalue solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../EPS/EPS.html#EPS">EPS</A> *eps)
+PetscErrorCode PEPLinearGetEPS(PEP pep,EPS *eps)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - polynomial eigenvalue solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigenvalue solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver object
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html b/docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html
index 5b35730..19c2d32 100644
--- a/docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html
+++ b/docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html
@@ -6,25 +6,25 @@
 <TITLE>PEPLinearGetExplicitMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPLinearGetExplicitMatrix</H1>
 Returns the flag indicating if the matrices A and B for the linearization are built explicitly. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool *explicitmatrix)
+PetscErrorCode PEPLinearGetExplicitMatrix(PEP pep,PetscBool *explicitmatrix)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep  </B> - polynomial eigenvalue solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - polynomial eigenvalue solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>explicitmatrix </B> - the mode flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>explicitmatrix </B></TD><TD> - the mode flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPLinearSetCompanionForm.html b/docs/manualpages/PEP/PEPLinearSetCompanionForm.html
index 482f1e6..d9318f1 100644
--- a/docs/manualpages/PEP/PEPLinearSetCompanionForm.html
+++ b/docs/manualpages/PEP/PEPLinearSetCompanionForm.html
@@ -6,28 +6,28 @@
 <TITLE>PEPLinearSetCompanionForm</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPLinearSetCompanionForm.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPLinearSetCompanionForm.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPLinearSetCompanionForm</H1>
 Choose between the two companion forms available for the linearization of a quadratic eigenproblem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt cform)
+PetscErrorCode PEPLinearSetCompanionForm(PEP pep,PetscInt cform)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - polynomial eigenvalue solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - polynomial eigenvalue solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cform </B></TD><TD> - 1 or 2 (first or second companion form)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cform </B></TD><TD> - 1 or 2 (first or second companion form)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_linear_cform <int> </B> - Choose the companion form
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_linear_cform <int> </B></TD><TD> - Choose the companion form
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPLinearSetEPS.html b/docs/manualpages/PEP/PEPLinearSetEPS.html
index 1002d51..c47ca75 100644
--- a/docs/manualpages/PEP/PEPLinearSetEPS.html
+++ b/docs/manualpages/PEP/PEPLinearSetEPS.html
@@ -6,23 +6,23 @@
 <TITLE>PEPLinearSetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPLinearSetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPLinearSetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPLinearSetEPS</H1>
 Associate an eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) to the polynomial eigenvalue solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode PEPLinearSetEPS(PEP pep,EPS eps)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigenvalue solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigenvalue solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html b/docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html
index 5fb5b05..f8f9995 100644
--- a/docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html
+++ b/docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html
@@ -6,28 +6,28 @@
 <TITLE>PEPLinearSetExplicitMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPLinearSetExplicitMatrix</H1>
 Indicate if the matrices A and B for the linearization of the problem must be built explicitly. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool explicitmatrix)
+PetscErrorCode PEPLinearSetExplicitMatrix(PEP pep,PetscBool explicitmatrix)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - polynomial eigenvalue solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - polynomial eigenvalue solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>explicit </B></TD><TD> - boolean flag indicating if the matrices are built explicitly
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>explicit </B></TD><TD> - boolean flag indicating if the matrices are built explicitly
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_linear_explicitmatrix <boolean> </B> - Indicates the boolean flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_linear_explicitmatrix <boolean> </B></TD><TD> - Indicates the boolean flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPMonitorAll.html b/docs/manualpages/PEP/PEPMonitorAll.html
index 3384524..f7fd588 100644
--- a/docs/manualpages/PEP/PEPMonitorAll.html
+++ b/docs/manualpages/PEP/PEPMonitorAll.html
@@ -6,35 +6,35 @@
 <TITLE>PEPMonitorAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPMonitorAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPMonitorAll</H1>
 Print the current approximate values and error estimates at each iteration of the polynomial eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/PEP/PEPMonitorCancel.html b/docs/manualpages/PEP/PEPMonitorCancel.html
index 4c9b644..862ba31 100644
--- a/docs/manualpages/PEP/PEPMonitorCancel.html
+++ b/docs/manualpages/PEP/PEPMonitorCancel.html
@@ -6,27 +6,27 @@
 <TITLE>PEPMonitorCancel</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPMonitorCancel</H1>
 Clears all monitors for a <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPMonitorCancel(PEP pep)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_monitor_cancel </B> - Cancels all monitors that have been hardwired
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_cancel </B></TD><TD> - Cancels all monitors that have been hardwired
 into a code by calls to <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>(),
 but does not cancel those set via the options database.
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPMonitorConverged.html b/docs/manualpages/PEP/PEPMonitorConverged.html
index 6bbf853..fb37d1c 100644
--- a/docs/manualpages/PEP/PEPMonitorConverged.html
+++ b/docs/manualpages/PEP/PEPMonitorConverged.html
@@ -6,43 +6,39 @@
 <TITLE>PEPMonitorConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPMonitorConverged</H1>
 Print the approximate values and error estimates as they converge. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - monitor context
 </TD></TR></TABLE>
 <P>
 
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
-The monitor context must contain a struct with a PetscViewer and a
-PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
-<P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
  <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>(), <A HREF="../PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</A>(), <A HREF="../PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</A>()
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepmon.c.html#PEPMonitorConverged">src/pep/interface/pepmon.c</A>
diff --git a/docs/manualpages/PEP/PEPMonitorFirst.html b/docs/manualpages/PEP/PEPMonitorFirst.html
index 3122d6d..95c73f5 100644
--- a/docs/manualpages/PEP/PEPMonitorFirst.html
+++ b/docs/manualpages/PEP/PEPMonitorFirst.html
@@ -6,35 +6,35 @@
 <TITLE>PEPMonitorFirst</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPMonitorFirst</H1>
 Print the first unconverged approximate value and error estimate at each iteration of the polynomial eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/PEP/PEPMonitorLGCreate.html b/docs/manualpages/PEP/PEPMonitorLGCreate.html
new file mode 100644
index 0000000..32ae5d1
--- /dev/null
+++ b/docs/manualpages/PEP/PEPMonitorLGCreate.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPMonitorLGCreate.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPMonitorLGCreate</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorLGCreate.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPMonitorLGCreate</H1>
+Creates a line graph context for use with <A HREF="../PEP/PEP.html#PEP">PEP</A> to monitor convergence. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+</PRE>
+Collective on MPI_Comm
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>host </B></TD><TD> - the X display to open, or null for the local machine
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>label </B></TD><TD> - the title to put in the title bar
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x, y </B></TD><TD> - the screen coordinates of the upper left coordinate of
+the window
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m, n </B></TD><TD> - the screen width and height in pixels
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lgctx </B></TD><TD> - the drawing context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_lg </B></TD><TD> - Sets line graph monitor for the first residual
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_lg_all </B></TD><TD> - Sets line graph monitor for all residuals
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Use PetscDrawLGDestroy() to destroy this line graph.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepmon.c.html#PEPMonitorLGCreate">src/pep/interface/pepmon.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPMonitorSet.html b/docs/manualpages/PEP/PEPMonitorSet.html
index 4a27c02..c00d748 100644
--- a/docs/manualpages/PEP/PEPMonitorSet.html
+++ b/docs/manualpages/PEP/PEPMonitorSet.html
@@ -6,28 +6,28 @@
 <TITLE>PEPMonitorSet</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPMonitorSet.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorSet.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPMonitorSet</H1>
 Sets an ADDITIONAL function to be called at every iteration to monitor the error estimates for each requested eigenpair. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscErrorCode (*monitor)(<A HREF="../PEP/PEP.html#PEP">PEP</A>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
+PetscErrorCode PEPMonitorSet(PEP pep,PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
 monitor routine (use NULL if no context is desired)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitordestroy </B></TD><TD> - [optional] routine that frees monitor context (may be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of monitor</FONT></H3>
@@ -36,39 +36,39 @@ monitor routine (use NULL if no context is desired)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - polynomial eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged eigenpairs
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - relative error estimates for each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - relative error estimates for each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor        </B></TD><TD> - print only the first error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor        </B></TD><TD> - print only the first error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_all    </B></TD><TD> - print error estimates at each iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_all    </B></TD><TD> - print error estimates at each iteration
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_conv   </B></TD><TD> - print the eigenvalue approximations only when
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_conv   </B></TD><TD> - print the eigenvalue approximations only when
 convergence has been reached
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
 approximate eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
 approximate eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
 a code by calls to <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>(), but does not cancel those set via
 the options database.
 </TD></TR></TABLE>
diff --git a/docs/manualpages/PEP/PEPMonitorSetFromOptions.html b/docs/manualpages/PEP/PEPMonitorSetFromOptions.html
new file mode 100644
index 0000000..a67d4aa
--- /dev/null
+++ b/docs/manualpages/PEP/PEPMonitorSetFromOptions.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+</PRE>
+Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - the polynomial eigensolver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a PetscViewerAndFormat
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether this monitor tracks all eigenvalues or not
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</A>(), <A HREF="../PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</A>(), <A HREF="../PEP/PEPConvMonitorSetFromOptions.html#PEPConvMonitorSetFromOptions">PEPConvMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepopts.c.html#PEPMonitorSetFromOptions">src/pep/interface/pepopts.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPProblemType.html b/docs/manualpages/PEP/PEPProblemType.html
index f5fe673..ec47b19 100644
--- a/docs/manualpages/PEP/PEPProblemType.html
+++ b/docs/manualpages/PEP/PEPProblemType.html
@@ -6,8 +6,8 @@
 <TITLE>PEPProblemType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPProblemType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPProblemType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPProblemType</H1>
 Determines the type of the polynomial eigenproblem 
diff --git a/docs/manualpages/PEP/PEPQArnoldiGetLocking.html b/docs/manualpages/PEP/PEPQArnoldiGetLocking.html
index 02bc136..633b220 100644
--- a/docs/manualpages/PEP/PEPQArnoldiGetLocking.html
+++ b/docs/manualpages/PEP/PEPQArnoldiGetLocking.html
@@ -6,25 +6,25 @@
 <TITLE>PEPQArnoldiGetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPQArnoldiGetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPQArnoldiGetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPQArnoldiGetLocking</H1>
 Gets the locking flag used in the Q-Arnoldi method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool *lock)
+PetscErrorCode PEPQArnoldiGetLocking(PEP pep,PetscBool *lock)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>lock </B> - the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - the locking flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPQArnoldiGetRestart.html b/docs/manualpages/PEP/PEPQArnoldiGetRestart.html
index f2fa431..fa70328 100644
--- a/docs/manualpages/PEP/PEPQArnoldiGetRestart.html
+++ b/docs/manualpages/PEP/PEPQArnoldiGetRestart.html
@@ -6,25 +6,25 @@
 <TITLE>PEPQArnoldiGetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPQArnoldiGetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPQArnoldiGetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPQArnoldiGetRestart</H1>
 Gets the restart parameter used in the Q-Arnoldi method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal *keep)
+PetscErrorCode PEPQArnoldiGetRestart(PEP pep,PetscReal *keep)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>keep </B> - the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the restart parameter
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPQArnoldiSetLocking.html b/docs/manualpages/PEP/PEPQArnoldiSetLocking.html
index 4ebbf6d..316e432 100644
--- a/docs/manualpages/PEP/PEPQArnoldiSetLocking.html
+++ b/docs/manualpages/PEP/PEPQArnoldiSetLocking.html
@@ -6,28 +6,28 @@
 <TITLE>PEPQArnoldiSetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPQArnoldiSetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPQArnoldiSetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPQArnoldiSetLocking</H1>
 Choose between locking and non-locking variants of the Q-Arnoldi method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool lock)
+PetscErrorCode PEPQArnoldiSetLocking(PEP pep,PetscBool lock)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_qarnoldi_locking </B> - Sets the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_qarnoldi_locking </B></TD><TD> - Sets the locking flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The default is to keep all directions in the working subspace even if
diff --git a/docs/manualpages/PEP/PEPQArnoldiSetRestart.html b/docs/manualpages/PEP/PEPQArnoldiSetRestart.html
index 2d4514f..866d28c 100644
--- a/docs/manualpages/PEP/PEPQArnoldiSetRestart.html
+++ b/docs/manualpages/PEP/PEPQArnoldiSetRestart.html
@@ -6,28 +6,28 @@
 <TITLE>PEPQArnoldiSetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPQArnoldiSetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPQArnoldiSetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPQArnoldiSetRestart</H1>
 Sets the restart parameter for the Q-Arnoldi method, in particular the proportion of basis vectors that must be kept after restart. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal keep)
+PetscErrorCode PEPQArnoldiSetRestart(PEP pep,PetscReal keep)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_qarnoldi_restart </B> - Sets the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_qarnoldi_restart </B></TD><TD> - Sets the restart parameter
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Allowed values are in the range [0.1,0.9]. The default is 0.5.
diff --git a/docs/manualpages/PEP/PEPReasonView.html b/docs/manualpages/PEP/PEPReasonView.html
index dc10029..37d4d80 100644
--- a/docs/manualpages/PEP/PEPReasonView.html
+++ b/docs/manualpages/PEP/PEPReasonView.html
@@ -6,28 +6,28 @@
 <TITLE>PEPReasonView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPReasonView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPReasonView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPReasonView</H1>
 Displays the reason a <A HREF="../PEP/PEP.html#PEP">PEP</A> solve converged or diverged. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscViewer viewer)
+PetscErrorCode PEPReasonView(PEP pep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-pep_converged_reason </B> - print reason for convergence, and number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -38,7 +38,15 @@ Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
-<A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/spring.c.html">src/pep/examples/nlevp/spring.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPReasonViewFromOptions.html b/docs/manualpages/PEP/PEPReasonViewFromOptions.html
index ddb1830..710d0a3 100644
--- a/docs/manualpages/PEP/PEPReasonViewFromOptions.html
+++ b/docs/manualpages/PEP/PEPReasonViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>PEPReasonViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPReasonViewFromOptions</H1>
 Processes command line options to determine if/how the <A HREF="../PEP/PEP.html#PEP">PEP</A> converged reason is to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPReasonViewFromOptions(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepview.c.html#PEPReasonViewFromOptions">src/pep/interface/pepview.c</A>
diff --git a/docs/manualpages/PEP/PEPRefine.html b/docs/manualpages/PEP/PEPRefine.html
index 76319ec..cb4ae96 100644
--- a/docs/manualpages/PEP/PEPRefine.html
+++ b/docs/manualpages/PEP/PEPRefine.html
@@ -6,8 +6,8 @@
 <TITLE>PEPRefine</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPRefine.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPRefine.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPRefine</H1>
 The refinement type 
diff --git a/docs/manualpages/PEP/PEPRefineGetKSP.html b/docs/manualpages/PEP/PEPRefineGetKSP.html
index e2aaea6..41f0639 100644
--- a/docs/manualpages/PEP/PEPRefineGetKSP.html
+++ b/docs/manualpages/PEP/PEPRefineGetKSP.html
@@ -6,25 +6,25 @@
 <TITLE>PEPRefineGetKSP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPRefineGetKSP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPRefineGetKSP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPRefineGetKSP</H1>
 Obtain the ksp object used by the eigensolver object in the refinement phase. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,KSP *ksp)
+PetscErrorCode PEPRefineGetKSP(PEP pep,KSP *ksp)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ksp </B> - ksp context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD> - ksp context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPRefineScheme.html b/docs/manualpages/PEP/PEPRefineScheme.html
new file mode 100644
index 0000000..8c841a5
--- /dev/null
+++ b/docs/manualpages/PEP/PEPRefineScheme.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPRefineScheme.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPRefineScheme</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPRefineScheme.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPRefineScheme</H1>
+The scheme used for solving linear systems during iterative refinement 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { PEP_REFINE_SCHEME_SCHUR=1,
+               PEP_REFINE_SCHEME_MBE,
+               PEP_REFINE_SCHEME_EXPLICIT } <A HREF="../PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/../../include/slepcpep.h.html#PEPRefineScheme">src/pep/../../include/slepcpep.h</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPRegister.html b/docs/manualpages/PEP/PEPRegister.html
index 8579952..5176d57 100644
--- a/docs/manualpages/PEP/PEPRegister.html
+++ b/docs/manualpages/PEP/PEPRegister.html
@@ -6,23 +6,23 @@
 <TITLE>PEPRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPRegister</H1>
 Adds a method to the polynomial eigenproblem solver package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPRegister.html#PEPRegister">PEPRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../PEP/PEP.html#PEP">PEP</A>))
+PetscErrorCode PEPRegister(const char *name,PetscErrorCode (*function)(PEP))
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPRegisterAll.html b/docs/manualpages/PEP/PEPRegisterAll.html
index ba31235..0c8317d 100644
--- a/docs/manualpages/PEP/PEPRegisterAll.html
+++ b/docs/manualpages/PEP/PEPRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>PEPRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPRegisterAll</H1>
 Registers all the solvers in the <A HREF="../PEP/PEP.html#PEP">PEP</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPRegisterAll.html#PEPRegisterAll">PEPRegisterAll</A>(void)
+PetscErrorCode PEPRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/PEP/PEPReset.html b/docs/manualpages/PEP/PEPReset.html
index bcdfb3a..b422498 100644
--- a/docs/manualpages/PEP/PEPReset.html
+++ b/docs/manualpages/PEP/PEPReset.html
@@ -6,21 +6,21 @@
 <TITLE>PEPReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPReset</H1>
 Resets the <A HREF="../PEP/PEP.html#PEP">PEP</A> context to the initial state and removes any allocated objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPReset.html#PEPReset">PEPReset</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPReset(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPSTOARGetLocking.html b/docs/manualpages/PEP/PEPSTOARGetLocking.html
index 29b68fd..5b47aca 100644
--- a/docs/manualpages/PEP/PEPSTOARGetLocking.html
+++ b/docs/manualpages/PEP/PEPSTOARGetLocking.html
@@ -6,25 +6,25 @@
 <TITLE>PEPSTOARGetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSTOARGetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSTOARGetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSTOARGetLocking</H1>
 Gets the locking flag used in the STOAR method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool *lock)
+PetscErrorCode PEPSTOARGetLocking(PEP pep,PetscBool *lock)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>lock </B> - the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - the locking flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPSTOARSetLocking.html b/docs/manualpages/PEP/PEPSTOARSetLocking.html
index 51aec0f..5a98cad 100644
--- a/docs/manualpages/PEP/PEPSTOARSetLocking.html
+++ b/docs/manualpages/PEP/PEPSTOARSetLocking.html
@@ -6,28 +6,28 @@
 <TITLE>PEPSTOARSetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSTOARSetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSTOARSetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSTOARSetLocking</H1>
 Choose between locking and non-locking variants of the STOAR method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool lock)
+PetscErrorCode PEPSTOARSetLocking(PEP pep,PetscBool lock)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_stoar_locking </B> - Sets the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_stoar_locking </B></TD><TD> - Sets the locking flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The default is to lock converged eigenpairs when the method restarts.
diff --git a/docs/manualpages/PEP/PEPScale.html b/docs/manualpages/PEP/PEPScale.html
index 64a4ed7..d18bcf8 100644
--- a/docs/manualpages/PEP/PEPScale.html
+++ b/docs/manualpages/PEP/PEPScale.html
@@ -6,8 +6,8 @@
 <TITLE>PEPScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPScale</H1>
 The scaling strategy 
diff --git a/docs/manualpages/PEP/PEPSetBV.html b/docs/manualpages/PEP/PEPSetBV.html
index 7fe11ee..2015ae8 100644
--- a/docs/manualpages/PEP/PEPSetBV.html
+++ b/docs/manualpages/PEP/PEPSetBV.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetBV</H1>
 Associates a basis vectors object to the polynomial eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../BV/BV.html#BV">BV</A> bv)
+PetscErrorCode PEPSetBV(PEP pep,BV bv)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv  </B></TD><TD> - the basis vectors object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bv  </B></TD><TD> - the basis vectors object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetBasis.html b/docs/manualpages/PEP/PEPSetBasis.html
index 0060596..1c298e2 100644
--- a/docs/manualpages/PEP/PEPSetBasis.html
+++ b/docs/manualpages/PEP/PEPSetBasis.html
@@ -6,28 +6,28 @@
 <TITLE>PEPSetBasis</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetBasis.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetBasis.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetBasis</H1>
 Specifies the type of polynomial basis used to describe the polynomial eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPBasis.html#PEPBasis">PEPBasis</A> basis)
+PetscErrorCode PEPSetBasis(PEP pep,PEPBasis basis)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>basis </B></TD><TD> - the type of polynomial basis
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>basis </B></TD><TD> - the type of polynomial basis
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_basis <basis> </B> - Select the basis type
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_basis <basis> </B></TD><TD> - Select the basis type
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default, the coefficient matrices passed via <A HREF="../PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</A>() are
diff --git a/docs/manualpages/PEP/PEPSetConvergenceTest.html b/docs/manualpages/PEP/PEPSetConvergenceTest.html
index 0724ed6..6980809 100644
--- a/docs/manualpages/PEP/PEPSetConvergenceTest.html
+++ b/docs/manualpages/PEP/PEPSetConvergenceTest.html
@@ -6,54 +6,52 @@
 <TITLE>PEPSetConvergenceTest</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetConvergenceTest</H1>
 Specifies how to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPConv.html#PEPConv">PEPConv</A> conv)
+PetscErrorCode PEPSetConvergenceTest(PEP pep,PEPConv conv)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv </B></TD><TD> - the type of convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv </B></TD><TD> - the type of convergence test
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_abs    </B></TD><TD> - Sets the absolute convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_abs    </B></TD><TD> - Sets the absolute convergence test
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_eig    </B></TD><TD> - Sets the convergence test relative to the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_rel    </B></TD><TD> - Sets the convergence test relative to the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_linear </B></TD><TD> - Sets the convergence test related to the linearized eigenproblem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_norm   </B></TD><TD> - Sets the convergence test relative to the matrix norms
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_user   </B></TD><TD> - Selects the user-defined convergence test
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_conv_user   </B></TD><TD> - Selects the user-defined convergence test
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The parameter 'conv' can have one of these values
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_ABS    </B></TD><TD> - absolute error ||r||
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_ABS    </B></TD><TD> - absolute error ||r||
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_EIG    </B></TD><TD> - error relative to the eigenvalue l, ||r||/|l|
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_REL    </B></TD><TD> - error relative to the eigenvalue l, ||r||/|l|
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_LINEAR </B></TD><TD> - error related to the linearized eigenproblem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_NORM   </B></TD><TD> - error relative matrix norms, ||r||/sum_i(l^i*||A_i||)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_NORM   </B></TD><TD> - error relative matrix norms, ||r||/sum_i(l^i*||A_i||)
-</TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_USER   </B></TD><TD> - function set by <A HREF="../PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_CONV_USER   </B></TD><TD> - function set by <A HREF="../PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</A>()
 </TD></TR></TABLE>
 <P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
- <A HREF="../PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</A>(), <A HREF="../PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</A>(), <A HREF="../PEP/PEPConv.html#PEPConv">PEPConv</A>
+ <A HREF="../PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</A>(), <A HREF="../PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</A>(), <A HREF="../PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</A>(), <A HREF="../PEP/PEPConv.html#PEPConv">PEPConv</A>
 <BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepopts.c.html#PEPSetConvergenceTest">src/pep/interface/pepopts.c</A>
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/PEP/PEPSetConvergenceTestFunction.html b/docs/manualpages/PEP/PEPSetConvergenceTestFunction.html
index 55710b2..dac8dba 100644
--- a/docs/manualpages/PEP/PEPSetConvergenceTestFunction.html
+++ b/docs/manualpages/PEP/PEPSetConvergenceTestFunction.html
@@ -6,28 +6,27 @@
 <TITLE>PEPSetConvergenceTestFunction</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetConvergenceTestFunction.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetConvergenceTestFunction.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetConvergenceTestFunction</H1>
 Sets a function to compute the error estimate used in the convergence test. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscErrorCode (*func)(<A HREF="../PEP/PEP.html#PEP">PEP</A>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+PetscErrorCode PEPSetConvergenceTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - [optional] context for private data for the convergence routine
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the convergence routine (may be null)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - [optional] destructor for the context (may be NULL;
-PETSC_NULL_FUNCTION in Fortran)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
@@ -36,17 +35,17 @@ PETSC_NULL_FUNCTION in Fortran)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr   </B></TD><TD> - real part of the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi   </B></TD><TD> - imaginary part of the eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - residual norm associated to the eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - residual norm associated to the eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - (output) computed error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - (output) computed error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetDS.html b/docs/manualpages/PEP/PEPSetDS.html
index 3703ab4..b3fc332 100644
--- a/docs/manualpages/PEP/PEPSetDS.html
+++ b/docs/manualpages/PEP/PEPSetDS.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetDS</H1>
 Associates a direct solver object to the polynomial eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode PEPSetDS(PEP pep,DS ds)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetDimensions.html b/docs/manualpages/PEP/PEPSetDimensions.html
index 9f554be..2415b9a 100644
--- a/docs/manualpages/PEP/PEPSetDimensions.html
+++ b/docs/manualpages/PEP/PEPSetDimensions.html
@@ -6,36 +6,36 @@
 <TITLE>PEPSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetDimensions</H1>
 Sets the number of eigenvalues to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt nev,PetscInt ncv,PetscInt mpd)
+PetscErrorCode PEPSetDimensions(PEP pep,PetscInt nev,PetscInt ncv,PetscInt mpd)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev </B></TD><TD> - number of eigenvalues to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_nev <nev> </B></TD><TD> - Sets the number of eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -59,4 +59,6 @@ a smaller value should be used.
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPSetEigenvalueComparison.html b/docs/manualpages/PEP/PEPSetEigenvalueComparison.html
index c207a55..d088376 100644
--- a/docs/manualpages/PEP/PEPSetEigenvalueComparison.html
+++ b/docs/manualpages/PEP/PEPSetEigenvalueComparison.html
@@ -6,25 +6,25 @@
 <TITLE>PEPSetEigenvalueComparison</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetEigenvalueComparison.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetEigenvalueComparison.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetEigenvalueComparison</H1>
 Specifies the eigenvalue comparison function when <A HREF="../PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</A>() is set to PEP_WHICH_USER. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
+PetscErrorCode PEPSetEigenvalueComparison(PEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the comparison function
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD> - a pointer to the comparison function
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the comparison function)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx  </B></TD><TD> - a context pointer (the last parameter to the comparison function)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
@@ -33,27 +33,27 @@ Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar     </B></TD><TD> - real part of the 1st eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar     </B></TD><TD> - real part of the 1st eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai     </B></TD><TD> - imaginary part of the 1st eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai     </B></TD><TD> - imaginary part of the 1st eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br     </B></TD><TD> - real part of the 2nd eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br     </B></TD><TD> - real part of the 2nd eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi     </B></TD><TD> - imaginary part of the 2nd eigenvalue
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi     </B></TD><TD> - imaginary part of the 2nd eigenvalue
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - result of comparison
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - result of comparison
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 <H3><FONT COLOR="#883300">The returning parameter 'res' can be</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>negative </B></TD><TD> - if the 1st eigenvalue is preferred to the 2st one
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>negative </B></TD><TD> - if the 1st eigenvalue is preferred to the 2st one
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>zero     </B></TD><TD> - if both eigenvalues are equally preferred
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>zero     </B></TD><TD> - if both eigenvalues are equally preferred
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>positive </B></TD><TD> - if the 2st eigenvalue is preferred to the 1st one
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>positive </B></TD><TD> - if the 2st eigenvalue is preferred to the 1st one
 </TD></TR></TABLE>
 <P>
 
@@ -64,4 +64,6 @@ Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <BR><A HREF="./index.html">Index of all PEP routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPSetExtract.html b/docs/manualpages/PEP/PEPSetExtract.html
index 66daf90..1c2039a 100644
--- a/docs/manualpages/PEP/PEPSetExtract.html
+++ b/docs/manualpages/PEP/PEPSetExtract.html
@@ -6,28 +6,28 @@
 <TITLE>PEPSetExtract</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetExtract.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetExtract.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetExtract</H1>
 Specifies the extraction strategy to be used. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPExtract.html#PEPExtract">PEPExtract</A> extract)
+PetscErrorCode PEPSetExtract(PEP pep,PEPExtract extract)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extract </B></TD><TD> - extraction strategy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extract </B></TD><TD> - extraction strategy
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-pep_extract <type> </B> - extraction type, one of <none,norm,residual,structured>
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_extract <type> </B></TD><TD> - extraction type, one of <none,norm,residual,structured>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPSetFromOptions.html b/docs/manualpages/PEP/PEPSetFromOptions.html
index 0b2bec2..15a91b6 100644
--- a/docs/manualpages/PEP/PEPSetFromOptions.html
+++ b/docs/manualpages/PEP/PEPSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>PEPSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetFromOptions</H1>
 Sets <A HREF="../PEP/PEP.html#PEP">PEP</A> options from the options database. This routine must be called before <A HREF="../PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</A>() if the user is to be allowed to set the solver type. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPSetFromOptions(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - the polynomial eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
@@ -33,5 +33,13 @@ To see all options, run your program with the -help option.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPSetInitialSpace.html b/docs/manualpages/PEP/PEPSetInitialSpace.html
index 298d6e1..a012714 100644
--- a/docs/manualpages/PEP/PEPSetInitialSpace.html
+++ b/docs/manualpages/PEP/PEPSetInitialSpace.html
@@ -6,25 +6,25 @@
 <TITLE>PEPSetInitialSpace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetInitialSpace</H1>
 Specify a basis of vectors that constitute the initial space, that is, the subspace from which the solver starts to iterate. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt n,Vec *is)
+PetscErrorCode PEPSetInitialSpace(PEP pep,PetscInt n,Vec *is)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetOperators.html b/docs/manualpages/PEP/PEPSetOperators.html
index 241a5b9..777e2ed 100644
--- a/docs/manualpages/PEP/PEPSetOperators.html
+++ b/docs/manualpages/PEP/PEPSetOperators.html
@@ -6,25 +6,25 @@
 <TITLE>PEPSetOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetOperators</H1>
 Sets the coefficient matrices associated with the polynomial eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt nmat,Mat A[])
+PetscErrorCode PEPSetOperators(PEP pep,PetscInt nmat,Mat A[])
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nmat </B></TD><TD> - number of matrices in array A
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nmat </B></TD><TD> - number of matrices in array A
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A    </B></TD><TD> - the array of matrices associated with the eigenproblem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A    </B></TD><TD> - the array of matrices associated with the eigenproblem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -44,5 +44,13 @@ For non-monomial bases, this expression is different.
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPSetOptionsPrefix.html b/docs/manualpages/PEP/PEPSetOptionsPrefix.html
index 645f2a2..a98f0e8 100644
--- a/docs/manualpages/PEP/PEPSetOptionsPrefix.html
+++ b/docs/manualpages/PEP/PEPSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../PEP/PEP.html#PEP">PEP</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,const char *prefix)
+PetscErrorCode PEPSetOptionsPrefix(PEP pep,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../PEP/PEP.html#PEP">PEP</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../PEP/PEP.html#PEP">PEP</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetProblemType.html b/docs/manualpages/PEP/PEPSetProblemType.html
index 7bf49ea..fda3b1a 100644
--- a/docs/manualpages/PEP/PEPSetProblemType.html
+++ b/docs/manualpages/PEP/PEPSetProblemType.html
@@ -6,32 +6,32 @@
 <TITLE>PEPSetProblemType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetProblemType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetProblemType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetProblemType</H1>
 Specifies the type of the polynomial eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</A> type)
+PetscErrorCode PEPSetProblemType(PEP pep,PEPProblemType type)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type of polynomial eigenvalue problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type of polynomial eigenvalue problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_general </B></TD><TD> - general problem with no particular structure
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_general </B></TD><TD> - general problem with no particular structure
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_hermitian </B></TD><TD> - problem whose coefficient matrices are Hermitian
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_hermitian </B></TD><TD> - problem whose coefficient matrices are Hermitian
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_gyroscopic </B></TD><TD> - problem with Hamiltonian structure
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_gyroscopic </B></TD><TD> - problem with Hamiltonian structure
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetRG.html b/docs/manualpages/PEP/PEPSetRG.html
index 980ad57..b018339 100644
--- a/docs/manualpages/PEP/PEPSetRG.html
+++ b/docs/manualpages/PEP/PEPSetRG.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetRG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetRG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetRG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetRG</H1>
 Associates a region object to the polynomial eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../RG/RG.html#RG">RG</A> rg)
+PetscErrorCode PEPSetRG(PEP pep,RG rg)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetRefine.html b/docs/manualpages/PEP/PEPSetRefine.html
index 7620ee4..84a3aed 100644
--- a/docs/manualpages/PEP/PEPSetRefine.html
+++ b/docs/manualpages/PEP/PEPSetRefine.html
@@ -6,44 +6,44 @@
 <TITLE>PEPSetRefine</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetRefine.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetRefine.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetRefine</H1>
 Specifies the refinement type (and options) to be used after the solve. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPRefine.html#PEPRefine">PEPRefine</A> refine,PetscInt npart,PetscReal tol,PetscInt its,PetscBool schur)
+PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PEPRefineScheme scheme)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>refine </B></TD><TD> - refinement type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>npart  </B></TD><TD> - number of partitions of the communicator
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol    </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - maximum number of refinement iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>schur  </B></TD><TD> - boolean flag to activate the Schur complement approach
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scheme </B></TD><TD> - which scheme to be used for solving the involved linear systems
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine <type> </B></TD><TD> - refinement type, one of <none,simple,multiple>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine <type> </B></TD><TD> - refinement type, one of <none,simple,multiple>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_partitions <n> </B></TD><TD> - the number of partitions
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_partitions <n> </B></TD><TD> - the number of partitions
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_tol <tol> </B></TD><TD> - the tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_tol <tol> </B></TD><TD> - the tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_its <its> </B></TD><TD> - number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_its <its> </B></TD><TD> - number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_schur </B></TD><TD> - to set the Schur complement approach
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_refine_scheme </B></TD><TD> - to set the scheme for the linear solves
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -65,9 +65,9 @@ below the tolerance (tol defaults to the <A HREF="../PEP/PEP.html#PEP">PEP</A> t
 different value). In contrast, the multiple method simply performs its
 refinement iterations (just one by default).
 <P>
-The schur flag is used to change the way in which linear systems are
-solved, so that a Schur complement approach is used instead of explicitly
-building the coefficient matrix.
+The scheme argument is used to change the way in which linear systems are
+solved. Possible choices are: explicit, mixed block elimination (MBE),
+and Schur complement.
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPSetST.html b/docs/manualpages/PEP/PEPSetST.html
index 35b6f6c..a9d061c 100644
--- a/docs/manualpages/PEP/PEPSetST.html
+++ b/docs/manualpages/PEP/PEPSetST.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetST</H1>
 Associates a spectral transformation object to the eigensolver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetST.html#PEPSetST">PEPSetST</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../ST/ST.html#ST">ST</A> st)
+PetscErrorCode PEPSetST(PEP pep,ST st)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetScale.html b/docs/manualpages/PEP/PEPSetScale.html
index d3f9e3f..2e05fdc 100644
--- a/docs/manualpages/PEP/PEPSetScale.html
+++ b/docs/manualpages/PEP/PEPSetScale.html
@@ -6,44 +6,44 @@
 <TITLE>PEPSetScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetScale</H1>
 Specifies the scaling strategy to be used. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPScale.html#PEPScale">PEPScale</A> scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)
+PetscErrorCode PEPSetScale(PEP pep,PEPScale scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scale  </B></TD><TD> - scaling strategy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scale  </B></TD><TD> - scaling strategy
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha  </B></TD><TD> - the scaling factor used in the scalar strategy
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>alpha  </B></TD><TD> - the scaling factor used in the scalar strategy
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dl     </B></TD><TD> - the left diagonal matrix of the diagonal scaling algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dl     </B></TD><TD> - the left diagonal matrix of the diagonal scaling algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dr     </B></TD><TD> - the right diagonal matrix of the diagonal scaling algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Dr     </B></TD><TD> - the right diagonal matrix of the diagonal scaling algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the diagonal scaling algorithm
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - number of iterations of the diagonal scaling algorithm
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - approximation to wanted eigenvalues (modulus)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lambda </B></TD><TD> - approximation to wanted eigenvalues (modulus)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale <type> </B></TD><TD> - scaling type, one of <none,scalar,diagonal,both>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale <type> </B></TD><TD> - scaling type, one of <none,scalar,diagonal,both>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale_factor <alpha> </B></TD><TD> - the scaling factor
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale_factor <alpha> </B></TD><TD> - the scaling factor
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale_its <its> </B></TD><TD> - number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale_its <its> </B></TD><TD> - number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale_lambda <lambda> </B></TD><TD> - approximation to eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_scale_lambda <lambda> </B></TD><TD> - approximation to eigenvalues
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetStoppingTest.html b/docs/manualpages/PEP/PEPSetStoppingTest.html
new file mode 100644
index 0000000..833096e
--- /dev/null
+++ b/docs/manualpages/PEP/PEPSetStoppingTest.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPSetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPSetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPSetStoppingTest</H1>
+Specifies how to decide the termination of the outer loop of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPSetStoppingTest(PEP pep,PEPStop stop)
+</PRE>
+Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_stop_basic </B></TD><TD> - Sets the default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_stop_user  </B></TD><TD> - Selects the user-defined stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The parameter 'stop' can have one of these values
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_STOP_BASIC </B></TD><TD> - default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_STOP_USER  </B></TD><TD> - function set by <A HREF="../PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</A>(), <A HREF="../PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</A>(), <A HREF="../PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</A>(), <A HREF="../PEP/PEPStop.html#PEPStop">PEPStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepopts.c.html#PEPSetStoppingTest">src/pep/interface/pepopts.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPSetStoppingTestFunction.html b/docs/manualpages/PEP/PEPSetStoppingTestFunction.html
new file mode 100644
index 0000000..04b0c39
--- /dev/null
+++ b/docs/manualpages/PEP/PEPSetStoppingTestFunction.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPSetStoppingTestFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPSetStoppingTestFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetStoppingTestFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPSetStoppingTestFunction</H1>
+Sets a function to decide when to stop the outer iteration of the eigensolver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPSetStoppingTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+</PRE>
+Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep     </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - pointer to the stopping test function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the stopping routine (may be null)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<A HREF="../PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</A> *reason,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev    </B></TD><TD> - number of requested eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - (output) result of the stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+Normal usage is to first call the default routine <A HREF="../PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</A>() and then
+set reason to PEP_CONVERGED_USER if some user-defined conditions have been
+met. To let the eigensolver continue iterating, the result must be left as
+PEP_CONVERGED_ITERATING.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</A>(), <A HREF="../PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepopts.c.html#PEPSetStoppingTestFunction">src/pep/interface/pepopts.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPSetTarget.html b/docs/manualpages/PEP/PEPSetTarget.html
index 53e1b04..3145321 100644
--- a/docs/manualpages/PEP/PEPSetTarget.html
+++ b/docs/manualpages/PEP/PEPSetTarget.html
@@ -6,28 +6,28 @@
 <TITLE>PEPSetTarget</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetTarget.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetTarget.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetTarget</H1>
 Sets the value of the target. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscScalar target)
+PetscErrorCode PEPSetTarget(PEP pep,PetscScalar target)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>target </B></TD><TD> - the value of the target
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_target <scalar> </B> - the value of the target
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target <scalar> </B></TD><TD> - the value of the target
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The target is a scalar value used to determine the portion of the spectrum
diff --git a/docs/manualpages/PEP/PEPSetTolerances.html b/docs/manualpages/PEP/PEPSetTolerances.html
index e42dc40..d95dd30 100644
--- a/docs/manualpages/PEP/PEPSetTolerances.html
+++ b/docs/manualpages/PEP/PEPSetTolerances.html
@@ -6,32 +6,32 @@
 <TITLE>PEPSetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetTolerances</H1>
 Sets the tolerance and maximum iteration count used by the <A HREF="../PEP/PEP.html#PEP">PEP</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal tol,PetscInt maxits)
+PetscErrorCode PEPSetTolerances(PEP pep,PetscReal tol,PetscInt maxits)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_tol <tol> </B></TD><TD> - Sets the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_tol <tol> </B></TD><TD> - Sets the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetTrackAll.html b/docs/manualpages/PEP/PEPSetTrackAll.html
index 997d8b1..773b691 100644
--- a/docs/manualpages/PEP/PEPSetTrackAll.html
+++ b/docs/manualpages/PEP/PEPSetTrackAll.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetTrackAll</H1>
 Specifies if the solver must compute the residual of all approximate eigenpairs or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool trackall)
+PetscErrorCode PEPSetTrackAll(PEP pep,PetscBool trackall)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether compute all residuals or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether compute all residuals or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetType.html b/docs/manualpages/PEP/PEPSetType.html
index adb8032..bdea291 100644
--- a/docs/manualpages/PEP/PEPSetType.html
+++ b/docs/manualpages/PEP/PEPSetType.html
@@ -6,29 +6,29 @@
 <TITLE>PEPSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetType</H1>
 Selects the particular solver to be used in the <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetType.html#PEPSetType">PEPSetType</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPType.html#PEPType">PEPType</A> type)
+PetscErrorCode PEPSetType(PEP pep,PEPType type)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - the polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep      </B></TD><TD> - the polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known method
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_type <method> </B> - Sets the method; use -help for a list
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_type <method> </B></TD><TD> - Sets the method; use -help for a list
 of available methods
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See "slepc/include/slepcpep.h" for available methods. The default
diff --git a/docs/manualpages/PEP/PEPSetUp.html b/docs/manualpages/PEP/PEPSetUp.html
index 3d56a0a..2a91705 100644
--- a/docs/manualpages/PEP/PEPSetUp.html
+++ b/docs/manualpages/PEP/PEPSetUp.html
@@ -6,21 +6,21 @@
 <TITLE>PEPSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetUp</H1>
 Sets up all the internal data structures necessary for the execution of the <A HREF="../PEP/PEP.html#PEP">PEP</A> solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPSetUp(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep   </B> - solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function need not be called explicitly in most cases, since <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>()
diff --git a/docs/manualpages/PEP/PEPSetWhichEigenpairs.html b/docs/manualpages/PEP/PEPSetWhichEigenpairs.html
index 9536978..1d940f1 100644
--- a/docs/manualpages/PEP/PEPSetWhichEigenpairs.html
+++ b/docs/manualpages/PEP/PEPSetWhichEigenpairs.html
@@ -6,69 +6,69 @@
 <TITLE>PEPSetWhichEigenpairs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetWhichEigenpairs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetWhichEigenpairs</H1>
 Specifies which portion of the spectrum is to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,<A HREF="../PEP/PEPWhich.html#PEPWhich">PEPWhich</A> which)
+PetscErrorCode PEPSetWhichEigenpairs(PEP pep,PEPWhich which)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep   </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - the portion of the spectrum to be sought
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values</FONT></H3>
 The parameter 'which' can have one of these values
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_LARGEST_MAGNITUDE </B></TD><TD> - largest eigenvalues in magnitude (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_LARGEST_MAGNITUDE </B></TD><TD> - largest eigenvalues in magnitude (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_SMALLEST_MAGNITUDE </B></TD><TD> - smallest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_SMALLEST_MAGNITUDE </B></TD><TD> - smallest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_LARGEST_REAL </B></TD><TD> - largest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_LARGEST_REAL </B></TD><TD> - largest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_SMALLEST_REAL </B></TD><TD> - smallest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_SMALLEST_REAL </B></TD><TD> - smallest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_LARGEST_IMAGINARY </B></TD><TD> - largest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_LARGEST_IMAGINARY </B></TD><TD> - largest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_SMALLEST_IMAGINARY </B></TD><TD> - smallest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_SMALLEST_IMAGINARY </B></TD><TD> - smallest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_TARGET_MAGNITUDE </B></TD><TD> - eigenvalues closest to the target (in magnitude)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_TARGET_MAGNITUDE </B></TD><TD> - eigenvalues closest to the target (in magnitude)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_TARGET_REAL </B></TD><TD> - eigenvalues with real part closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_TARGET_REAL </B></TD><TD> - eigenvalues with real part closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_TARGET_IMAGINARY </B></TD><TD> - eigenvalues with imaginary part closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_TARGET_IMAGINARY </B></TD><TD> - eigenvalues with imaginary part closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_WHICH_USER </B></TD><TD> - user defined ordering set with <A HREF="../PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PEP_WHICH_USER </B></TD><TD> - user defined ordering set with <A HREF="../PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_largest_magnitude </B></TD><TD> - Sets largest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_largest_magnitude </B></TD><TD> - Sets largest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_smallest_magnitude </B></TD><TD> - Sets smallest eigenvalues in magnitude
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_smallest_magnitude </B></TD><TD> - Sets smallest eigenvalues in magnitude
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_largest_real </B></TD><TD> - Sets largest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_largest_real </B></TD><TD> - Sets largest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_smallest_real </B></TD><TD> - Sets smallest real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_smallest_real </B></TD><TD> - Sets smallest real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_largest_imaginary </B></TD><TD> - Sets largest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_largest_imaginary </B></TD><TD> - Sets largest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_smallest_imaginary </B></TD><TD> - Sets smallest imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_smallest_imaginary </B></TD><TD> - Sets smallest imaginary parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target_magnitude </B></TD><TD> - Sets eigenvalues closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target_magnitude </B></TD><TD> - Sets eigenvalues closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target_real </B></TD><TD> - Sets real parts closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target_real </B></TD><TD> - Sets real parts closest to target
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target_imaginary </B></TD><TD> - Sets imaginary parts closest to target
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_target_imaginary </B></TD><TD> - Sets imaginary parts closest to target
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSetWorkVecs.html b/docs/manualpages/PEP/PEPSetWorkVecs.html
index b30c223..f4b25ed 100644
--- a/docs/manualpages/PEP/PEPSetWorkVecs.html
+++ b/docs/manualpages/PEP/PEPSetWorkVecs.html
@@ -6,23 +6,23 @@
 <TITLE>PEPSetWorkVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSetWorkVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSetWorkVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSetWorkVecs</H1>
 Sets a number of work vectors into a <A HREF="../PEP/PEP.html#PEP">PEP</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscInt nw)
+PetscErrorCode PEPSetWorkVecs(PEP pep,PetscInt nw)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - polynomial eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw  </B></TD><TD> - number of work vectors to allocate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw  </B></TD><TD> - number of work vectors to allocate
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Developers Note</FONT></H3>
diff --git a/docs/manualpages/PEP/PEPSolve.html b/docs/manualpages/PEP/PEPSolve.html
index 1ca08e8..ff1bba5 100644
--- a/docs/manualpages/PEP/PEPSolve.html
+++ b/docs/manualpages/PEP/PEPSolve.html
@@ -6,40 +6,40 @@
 <TITLE>PEPSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPSolve</H1>
 Solves the polynomial eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPSolve(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view </B></TD><TD> - print information about the solver used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view </B></TD><TD> - print information about the solver used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_matk binary </B></TD><TD> - save any of the coefficient matrices (Ak) to the
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_matk binary </B></TD><TD> - save any of the coefficient matrices (Ak) to the
 default binary viewer (replace k by an integer from 0 to nmat-1)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_vectors binary </B></TD><TD> - save the computed eigenvectors to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_vectors binary </B></TD><TD> - save the computed eigenvectors to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_values </B></TD><TD> - print computed eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_values </B></TD><TD> - print computed eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_absolute </B></TD><TD> - print absolute errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_relative </B></TD><TD> - print relative errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_relative </B></TD><TD> - print relative errors of each eigenpair
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_backward </B></TD><TD> - print backward errors of each eigenpair
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_error_backward </B></TD><TD> - print backward errors of each eigenpair
 </TD></TR></TABLE>
 <P>
 
@@ -53,5 +53,13 @@ default binary viewer (replace k by an integer from 0 to nmat-1)
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/pep/examples/tutorials/ex16.c.html">src/pep/examples/tutorials/ex16.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex17.c.html">src/pep/examples/tutorials/ex17.c.html</A><BR>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 <A HREF="../../../src/pep/examples/tutorials/ex16f90.F90.html">src/pep/examples/tutorials/ex16f90.F90.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/butterfly.c.html">src/pep/examples/nlevp/butterfly.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/damped_beam.c.html">src/pep/examples/nlevp/damped_beam.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/pdde_stability.c.html">src/pep/examples/nlevp/pdde_stability.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/planar_waveguide.c.html">src/pep/examples/nlevp/planar_waveguide.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/sleeper.c.html">src/pep/examples/nlevp/sleeper.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPStop.html b/docs/manualpages/PEP/PEPStop.html
new file mode 100644
index 0000000..e85211e
--- /dev/null
+++ b/docs/manualpages/PEP/PEPStop.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPStop.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPStop</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPStop.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPStop</H1>
+Determines the stopping test 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { PEP_STOP_BASIC,
+               PEP_STOP_USER } <A HREF="../PEP/PEPStop.html#PEPStop">PEPStop</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</A>(), <A HREF="../PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/../../include/slepcpep.h.html#PEPStop">src/pep/../../include/slepcpep.h</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPStoppingBasic.html b/docs/manualpages/PEP/PEPStoppingBasic.html
new file mode 100644
index 0000000..52a0a23
--- /dev/null
+++ b/docs/manualpages/PEP/PEPStoppingBasic.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/PEP/PEPStoppingBasic.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>PEPStoppingBasic</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPStoppingBasic.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>PEPStoppingBasic</H1>
+Default routine to determine whether the outer eigensolver iteration must be stopped. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcpep.h" 
+PetscErrorCode PEPStoppingBasic(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)
+</PRE>
+Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - eigensolver context obtained from <A HREF="../PEP/PEPCreate.html#PEPCreate">PEPCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nev    </B></TD><TD> - number of requested eigenpairs
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - context (not used here)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - result of the stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+A positive value of reason indicates that the iteration has finished successfully
+(converged), and a negative value indicates an error condition (diverged). If
+the iteration needs to be continued, reason must be set to PEP_CONVERGED_ITERATING
+(zero).
+<P>
+<A HREF="../PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</A>() will stop if all requested eigenvalues are converged, or if
+the maximum number of iterations has been reached.
+<P>
+Use <A HREF="../PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</A>() to provide your own test instead of using this one.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</A>(), <A HREF="../PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</A>, <A HREF="../PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepdefault.c.html#PEPStoppingBasic">src/pep/interface/pepdefault.c</A>
+<BR><A HREF="./index.html">Index of all PEP routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/PEP/PEPTOARGetLocking.html b/docs/manualpages/PEP/PEPTOARGetLocking.html
index 4babd5d..0154333 100644
--- a/docs/manualpages/PEP/PEPTOARGetLocking.html
+++ b/docs/manualpages/PEP/PEPTOARGetLocking.html
@@ -6,25 +6,25 @@
 <TITLE>PEPTOARGetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPTOARGetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPTOARGetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPTOARGetLocking</H1>
 Gets the locking flag used in the TOAR method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool *lock)
+PetscErrorCode PEPTOARGetLocking(PEP pep,PetscBool *lock)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>lock </B> - the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - the locking flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPTOARGetRestart.html b/docs/manualpages/PEP/PEPTOARGetRestart.html
index 169eea8..e12c932 100644
--- a/docs/manualpages/PEP/PEPTOARGetRestart.html
+++ b/docs/manualpages/PEP/PEPTOARGetRestart.html
@@ -6,25 +6,25 @@
 <TITLE>PEPTOARGetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPTOARGetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPTOARGetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPTOARGetRestart</H1>
 Gets the restart parameter used in the TOAR method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal *keep)
+PetscErrorCode PEPTOARGetRestart(PEP pep,PetscReal *keep)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>pep </B> - the eigenproblem solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigenproblem solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>keep </B> - the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the restart parameter
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPTOARSetLocking.html b/docs/manualpages/PEP/PEPTOARSetLocking.html
index dfd31a8..2b0de62 100644
--- a/docs/manualpages/PEP/PEPTOARSetLocking.html
+++ b/docs/manualpages/PEP/PEPTOARSetLocking.html
@@ -6,28 +6,28 @@
 <TITLE>PEPTOARSetLocking</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPTOARSetLocking.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPTOARSetLocking.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPTOARSetLocking</H1>
 Choose between locking and non-locking variants of the TOAR method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscBool lock)
+PetscErrorCode PEPTOARSetLocking(PEP pep,PetscBool lock)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lock </B></TD><TD> - true if the locking variant must be selected
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_toar_locking </B> - Sets the locking flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_toar_locking </B></TD><TD> - Sets the locking flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The default is to lock converged eigenpairs when the method restarts.
diff --git a/docs/manualpages/PEP/PEPTOARSetRestart.html b/docs/manualpages/PEP/PEPTOARSetRestart.html
index 58c1d69..239d947 100644
--- a/docs/manualpages/PEP/PEPTOARSetRestart.html
+++ b/docs/manualpages/PEP/PEPTOARSetRestart.html
@@ -6,28 +6,28 @@
 <TITLE>PEPTOARSetRestart</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPTOARSetRestart.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPTOARSetRestart.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPTOARSetRestart</H1>
 Sets the restart parameter for the TOAR method, in particular the proportion of basis vectors that must be kept after restart. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscReal keep)
+PetscErrorCode PEPTOARSetRestart(PEP pep,PetscReal keep)
 </PRE>
 Logically Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep  </B></TD><TD> - the eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keep </B></TD><TD> - the number of vectors to be kept at restart
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_toar_restart </B> - Sets the restart parameter
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_toar_restart </B></TD><TD> - Sets the restart parameter
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Allowed values are in the range [0.1,0.9]. The default is 0.5.
diff --git a/docs/manualpages/PEP/PEPType.html b/docs/manualpages/PEP/PEPType.html
index 2fb7263..0fc9ae1 100644
--- a/docs/manualpages/PEP/PEPType.html
+++ b/docs/manualpages/PEP/PEPType.html
@@ -6,8 +6,8 @@
 <TITLE>PEPType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPType</H1>
 String with the name of a polynomial eigensolver 
diff --git a/docs/manualpages/PEP/PEPValuesView.html b/docs/manualpages/PEP/PEPValuesView.html
index d2b011a..7d5babc 100644
--- a/docs/manualpages/PEP/PEPValuesView.html
+++ b/docs/manualpages/PEP/PEPValuesView.html
@@ -6,28 +6,28 @@
 <TITLE>PEPValuesView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPValuesView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPValuesView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPValuesView</H1>
 Displays the computed eigenvalues in a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscViewer viewer)
+PetscErrorCode PEPValuesView(PEP pep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_view_values </B> - print computed eigenvalues
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_values </B></TD><TD> - print computed eigenvalues
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/PEP/PEPValuesViewFromOptions.html b/docs/manualpages/PEP/PEPValuesViewFromOptions.html
index 604c403..a203ede 100644
--- a/docs/manualpages/PEP/PEPValuesViewFromOptions.html
+++ b/docs/manualpages/PEP/PEPValuesViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>PEPValuesViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPValuesViewFromOptions</H1>
 Processes command line options to determine if/how the computed eigenvalues are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPValuesViewFromOptions(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepview.c.html#PEPValuesViewFromOptions">src/pep/interface/pepview.c</A>
diff --git a/docs/manualpages/PEP/PEPVectorsView.html b/docs/manualpages/PEP/PEPVectorsView.html
index 919104e..c156085 100644
--- a/docs/manualpages/PEP/PEPVectorsView.html
+++ b/docs/manualpages/PEP/PEPVectorsView.html
@@ -6,28 +6,28 @@
 <TITLE>PEPVectorsView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPVectorsView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPVectorsView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPVectorsView</H1>
 Outputs computed eigenvectors to a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscViewer viewer)
+PetscErrorCode PEPVectorsView(PEP pep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep    </B></TD><TD> - the eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-pep_view_vectors </B> - output eigenvectors.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view_vectors </B></TD><TD> - output eigenvectors.
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If PETSc was configured with real scalars, complex conjugate eigenvectors
diff --git a/docs/manualpages/PEP/PEPVectorsViewFromOptions.html b/docs/manualpages/PEP/PEPVectorsViewFromOptions.html
index edf04c8..ee4edf9 100644
--- a/docs/manualpages/PEP/PEPVectorsViewFromOptions.html
+++ b/docs/manualpages/PEP/PEPVectorsViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>PEPVectorsViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPVectorsViewFromOptions</H1>
 Processes command line options to determine if/how the computed eigenvectors are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep)
+PetscErrorCode PEPVectorsViewFromOptions(PEP pep)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pep </B> - the eigensolver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the eigensolver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/pep/interface/pepview.c.html#PEPVectorsViewFromOptions">src/pep/interface/pepview.c</A>
diff --git a/docs/manualpages/PEP/PEPView.html b/docs/manualpages/PEP/PEPView.html
index 6e20cab..03e6eb8 100644
--- a/docs/manualpages/PEP/PEPView.html
+++ b/docs/manualpages/PEP/PEPView.html
@@ -6,35 +6,35 @@
 <TITLE>PEPView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPView</H1>
 Prints the <A HREF="../PEP/PEP.html#PEP">PEP</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcpep.h" 
-PetscErrorCode <A HREF="../PEP/PEPView.html#PEPView">PEPView</A>(<A HREF="../PEP/PEP.html#PEP">PEP</A> pep,PetscViewer viewer)
+PetscErrorCode PEPView(PEP pep,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../PEP/PEP.html#PEP">PEP</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigenproblem solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pep </B></TD><TD> - the polynomial eigenproblem solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-pep_view </B> - Calls <A HREF="../PEP/PEPView.html#PEPView">PEPView</A>() at end of <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pep_view </B></TD><TD> - Calls <A HREF="../PEP/PEPView.html#PEPView">PEPView</A>() at end of <A HREF="../PEP/PEPSolve.html#PEPSolve">PEPSolve</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/PEP/PEPWhich.html b/docs/manualpages/PEP/PEPWhich.html
index e69d68c..bc7928f 100644
--- a/docs/manualpages/PEP/PEPWhich.html
+++ b/docs/manualpages/PEP/PEPWhich.html
@@ -6,8 +6,8 @@
 <TITLE>PEPWhich</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/PEPWhich.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/PEPWhich.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>PEPWhich</H1>
 Determines which part of the spectrum is requested 
diff --git a/docs/manualpages/PEP/index.html b/docs/manualpages/PEP/index.html
index 396151d..a73e276 100644
--- a/docs/manualpages/PEP/index.html
+++ b/docs/manualpages/PEP/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/PEP/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/PEP/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
@@ -22,65 +22,65 @@ Options can also be set directly in application codes by calling the correspondi
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./PEPComputeError.html">PEPComputeError</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetEigenpair.html">PEPGetEigenpair</A></TD>
+ <TD WIDTH=250><A HREF="./PEP.html">PEP</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetConverged.html">PEPGetConverged</A></TD>
  <TD WIDTH=250><A HREF="./PEPSolve.html">PEPSolve</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPCreate.html">PEPCreate</A></TD>
- <TD WIDTH=250><A HREF="./PEP.html">PEP</A></TD>
+ <TD WIDTH=250><A HREF="./PEPComputeError.html">PEPComputeError</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetEigenpair.html">PEPGetEigenpair</A></TD>
  <TD WIDTH=250><A HREF="./PEPType.html">PEPType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPDestroy.html">PEPDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./PEPCreate.html">PEPCreate</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetFromOptions.html">PEPSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./PEPView.html">PEPView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPGetConverged.html">PEPGetConverged</A></TD>
+ <TD WIDTH=250><A HREF="./PEPDestroy.html">PEPDestroy</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetOperators.html">PEPSetOperators</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
  <TD WIDTH=250><A HREF="./PEPBasis.html">PEPBasis</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetRefine.html">PEPGetRefine</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetST.html">PEPGetST</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetBasis.html">PEPSetBasis</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPConvergedReason.html">PEPConvergedReason</A></TD>
+ <TD WIDTH=250><A HREF="./PEPConv.html">PEPConv</A></TD>
  <TD WIDTH=250><A HREF="./PEPGetScale.html">PEPGetScale</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetConvergenceTest.html">PEPSetConvergenceTest</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPConv.html">PEPConv</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetST.html">PEPGetST</A></TD>
+ <TD WIDTH=250><A HREF="./PEPConvergedReason.html">PEPConvergedReason</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetTarget.html">PEPGetTarget</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetDimensions.html">PEPSetDimensions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPErrorType.html">PEPErrorType</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetTarget.html">PEPGetTarget</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetTolerances.html">PEPGetTolerances</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetExtract.html">PEPSetExtract</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPErrorView.html">PEPErrorView</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetTolerances.html">PEPGetTolerances</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetType.html">PEPGetType</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetInitialSpace.html">PEPSetInitialSpace</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPExtract.html">PEPExtract</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetType.html">PEPGetType</A></TD>
+ <TD WIDTH=250><A HREF="./PEPGetWhichEigenpairs.html">PEPGetWhichEigenpairs</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetProblemType.html">PEPSetProblemType</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetBasis.html">PEPGetBasis</A></TD>
- <TD WIDTH=250><A HREF="./PEPGetWhichEigenpairs.html">PEPGetWhichEigenpairs</A></TD>
+ <TD WIDTH=250><A HREF="./PEPMonitorAll.html">PEPMonitorAll</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetRefine.html">PEPSetRefine</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetConvergedReason.html">PEPGetConvergedReason</A></TD>
- <TD WIDTH=250><A HREF="./PEPMonitorAll.html">PEPMonitorAll</A></TD>
+ <TD WIDTH=250><A HREF="./PEPMonitorCancel.html">PEPMonitorCancel</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetScale.html">PEPSetScale</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetConvergenceTest.html">PEPGetConvergenceTest</A></TD>
- <TD WIDTH=250><A HREF="./PEPMonitorCancel.html">PEPMonitorCancel</A></TD>
+ <TD WIDTH=250><A HREF="./PEPMonitorConverged.html">PEPMonitorConverged</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetTarget.html">PEPSetTarget</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetDimensions.html">PEPGetDimensions</A></TD>
- <TD WIDTH=250><A HREF="./PEPMonitorConverged.html">PEPMonitorConverged</A></TD>
+ <TD WIDTH=250><A HREF="./PEPMonitorFirst.html">PEPMonitorFirst</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetTolerances.html">PEPSetTolerances</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetExtract.html">PEPGetExtract</A></TD>
- <TD WIDTH=250><A HREF="./PEPMonitorFirst.html">PEPMonitorFirst</A></TD>
+ <TD WIDTH=250><A HREF="./PEPMonitorLGCreate.html">PEPMonitorLGCreate</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetType.html">PEPSetType</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetIterationNumber.html">PEPGetIterationNumber</A></TD>
@@ -100,60 +100,68 @@ Options can also be set directly in application codes by calling the correspondi
  <TD WIDTH=250><A HREF="./PEPWhich.html">PEPWhich</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetProblemType.html">PEPGetProblemType</A></TD>
+ <TD WIDTH=250><A HREF="./PEPRefineScheme.html">PEPRefineScheme</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./PEPGetRefine.html">PEPGetRefine</A></TD>
  <TD WIDTH=250><A HREF="./PEPScale.html">PEPScale</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./PEPAppendOptionsPrefix.html">PEPAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./PEPLinearSetCompanionForm.html">PEPLinearSetCompanionForm</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetDS.html">PEPSetDS</A></TD>
+ <TD WIDTH=250><A HREF="./PEPLinearSetExplicitMatrix.html">PEPLinearSetExplicitMatrix</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetEigenvalueComparison.html">PEPSetEigenvalueComparison</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetBV.html">PEPGetBV</A></TD>
- <TD WIDTH=250><A HREF="./PEPLinearSetEPS.html">PEPLinearSetEPS</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetEigenvalueComparison.html">PEPSetEigenvalueComparison</A></TD>
+ <TD WIDTH=250><A HREF="./PEPQArnoldiGetLocking.html">PEPQArnoldiGetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetOptionsPrefix.html">PEPSetOptionsPrefix</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetDS.html">PEPGetDS</A></TD>
- <TD WIDTH=250><A HREF="./PEPLinearSetExplicitMatrix.html">PEPLinearSetExplicitMatrix</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetOptionsPrefix.html">PEPSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./PEPQArnoldiGetRestart.html">PEPQArnoldiGetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetRG.html">PEPSetRG</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetErrorEstimate.html">PEPGetErrorEstimate</A></TD>
- <TD WIDTH=250><A HREF="./PEPQArnoldiGetLocking.html">PEPQArnoldiGetLocking</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetRG.html">PEPSetRG</A></TD>
+ <TD WIDTH=250><A HREF="./PEPQArnoldiSetLocking.html">PEPQArnoldiSetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetST.html">PEPSetST</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetOptionsPrefix.html">PEPGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./PEPQArnoldiGetRestart.html">PEPQArnoldiGetRestart</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetST.html">PEPSetST</A></TD>
+ <TD WIDTH=250><A HREF="./PEPQArnoldiSetRestart.html">PEPQArnoldiSetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetStoppingTest.html">PEPSetStoppingTest</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetRG.html">PEPGetRG</A></TD>
- <TD WIDTH=250><A HREF="./PEPQArnoldiSetLocking.html">PEPQArnoldiSetLocking</A></TD>
- <TD WIDTH=250><A HREF="./PEPSTOARGetLocking.html">PEPSTOARGetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./PEPRefineGetKSP.html">PEPRefineGetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetStoppingTestFunction.html">PEPSetStoppingTestFunction</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./PEPGetStoppingTest.html">PEPGetStoppingTest</A></TD>
+ <TD WIDTH=250><A HREF="./PEPRegister.html">PEPRegister</A></TD>
+ <TD WIDTH=250><A HREF="./PEPStop.html">PEPStop</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPJDGetRestart.html">PEPJDGetRestart</A></TD>
- <TD WIDTH=250><A HREF="./PEPQArnoldiSetRestart.html">PEPQArnoldiSetRestart</A></TD>
- <TD WIDTH=250><A HREF="./PEPSTOARSetLocking.html">PEPSTOARSetLocking</A></TD>
+ <TD WIDTH=250><A HREF="./PEPRegisterAll.html">PEPRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./PEPStoppingBasic.html">PEPStoppingBasic</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPJDGetTolerances.html">PEPJDGetTolerances</A></TD>
- <TD WIDTH=250><A HREF="./PEPRefineGetKSP.html">PEPRefineGetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./PEPJDSetRestart.html">PEPJDSetRestart</A></TD>
+ <TD WIDTH=250><A HREF="./PEPReset.html">PEPReset</A></TD>
  <TD WIDTH=250><A HREF="./PEPTOARGetLocking.html">PEPTOARGetLocking</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPJDSetRestart.html">PEPJDSetRestart</A></TD>
- <TD WIDTH=250><A HREF="./PEPRegisterAll.html">PEPRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./PEPLinearGetCompanionForm.html">PEPLinearGetCompanionForm</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSTOARGetLocking.html">PEPSTOARGetLocking</A></TD>
  <TD WIDTH=250><A HREF="./PEPTOARGetRestart.html">PEPTOARGetRestart</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPJDSetTolerances.html">PEPJDSetTolerances</A></TD>
- <TD WIDTH=250><A HREF="./PEPRegister.html">PEPRegister</A></TD>
+ <TD WIDTH=250><A HREF="./PEPLinearGetEPS.html">PEPLinearGetEPS</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSTOARSetLocking.html">PEPSTOARSetLocking</A></TD>
  <TD WIDTH=250><A HREF="./PEPTOARSetLocking.html">PEPTOARSetLocking</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPLinearGetCompanionForm.html">PEPLinearGetCompanionForm</A></TD>
- <TD WIDTH=250><A HREF="./PEPReset.html">PEPReset</A></TD>
+ <TD WIDTH=250><A HREF="./PEPLinearGetExplicitMatrix.html">PEPLinearGetExplicitMatrix</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetBV.html">PEPSetBV</A></TD>
  <TD WIDTH=250><A HREF="./PEPTOARSetRestart.html">PEPTOARSetRestart</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPLinearGetEPS.html">PEPLinearGetEPS</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetBV.html">PEPSetBV</A></TD>
+ <TD WIDTH=250><A HREF="./PEPLinearSetCompanionForm.html">PEPLinearSetCompanionForm</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetConvergenceTestFunction.html">PEPSetConvergenceTestFunction</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./PEPLinearGetExplicitMatrix.html">PEPLinearGetExplicitMatrix</A></TD>
- <TD WIDTH=250><A HREF="./PEPSetConvergenceTestFunction.html">PEPSetConvergenceTestFunction</A></TD>
+ <TD WIDTH=250><A HREF="./PEPLinearSetEPS.html">PEPLinearSetEPS</A></TD>
+ <TD WIDTH=250><A HREF="./PEPSetDS.html">PEPSetDS</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
@@ -161,13 +169,17 @@ Options can also be set directly in application codes by calling the correspondi
  <TD WIDTH=250><A HREF="./PEPInitializePackage.html">PEPInitializePackage</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetWorkVecs.html">PEPSetWorkVecs</A></TD>
 <TR>
+ <TD WIDTH=250><A HREF="./PEPConvMonitorSetFromOptions.html">PEPConvMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./PEPMonitorSetFromOptions.html">PEPMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./PEPValuesViewFromOptions.html">PEPValuesViewFromOptions</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./PEPErrorViewFromOptions.html">PEPErrorViewFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./PEPReasonViewFromOptions.html">PEPReasonViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./PEPValuesViewFromOptions.html">PEPValuesViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./PEPVectorsViewFromOptions.html">PEPVectorsViewFromOptions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPFinalizePackage.html">PEPFinalizePackage</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetTrackAll.html">PEPSetTrackAll</A></TD>
- <TD WIDTH=250><A HREF="./PEPVectorsViewFromOptions.html">PEPVectorsViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./PEPGetTrackAll.html">PEPGetTrackAll</A></TD>
  <TD WIDTH=250><A HREF="./PEPSetUp.html">PEPSetUp</A></TD>
diff --git a/docs/manualpages/RG/RG.html b/docs/manualpages/RG/RG.html
index e2d7e1f..50e815e 100644
--- a/docs/manualpages/RG/RG.html
+++ b/docs/manualpages/RG/RG.html
@@ -6,8 +6,8 @@
 <TITLE>RG</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RG.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RG.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RG</H1>
 Region of the complex plane. 
diff --git a/docs/manualpages/RG/RGAppendOptionsPrefix.html b/docs/manualpages/RG/RGAppendOptionsPrefix.html
index 0a2f819..520f1b6 100644
--- a/docs/manualpages/RG/RGAppendOptionsPrefix.html
+++ b/docs/manualpages/RG/RGAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>RGAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../RG/RG.html#RG">RG</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,const char *prefix)
+PetscErrorCode RGAppendOptionsPrefix(RG rg,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../RG/RG.html#RG">RG</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../RG/RG.html#RG">RG</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGCheckInside.html b/docs/manualpages/RG/RGCheckInside.html
index ccda6da..5c1cb6d 100644
--- a/docs/manualpages/RG/RGCheckInside.html
+++ b/docs/manualpages/RG/RGCheckInside.html
@@ -6,32 +6,32 @@
 <TITLE>RGCheckInside</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGCheckInside.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGCheckInside.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGCheckInside</H1>
 Determines if a set of given points are inside the region or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGCheckInside.html#RGCheckInside">RGCheckInside</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,PetscInt *inside)
+PetscErrorCode RGCheckInside(RG rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,PetscInt *inside)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of points to check
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of points to check
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar </B></TD><TD> - array of real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar </B></TD><TD> - array of real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai </B></TD><TD> - array of imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai </B></TD><TD> - array of imaginary parts
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>inside </B> - array of results (1=inside, 0=on the contour, -1=outside)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>inside </B></TD><TD> - array of results (1=inside, 0=on the contour, -1=outside)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The point a is expressed as a couple of PetscScalar variables ar,ai.
diff --git a/docs/manualpages/RG/RGComputeContour.html b/docs/manualpages/RG/RGComputeContour.html
index 3f32cd1..46501b8 100644
--- a/docs/manualpages/RG/RGComputeContour.html
+++ b/docs/manualpages/RG/RGComputeContour.html
@@ -6,30 +6,30 @@
 <TITLE>RGComputeContour</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGComputeContour.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGComputeContour.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGComputeContour</H1>
 Computes the coordinates of several points lying in the contour of the region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGComputeContour.html#RGComputeContour">RGComputeContour</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
+PetscErrorCode RGComputeContour(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of points to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of points to compute
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cr </B></TD><TD> - location to store real parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cr </B></TD><TD> - location to store real parts
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ci </B></TD><TD> - location to store imaginary parts
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ci </B></TD><TD> - location to store imaginary parts
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/RG/RGCreate.html b/docs/manualpages/RG/RGCreate.html
index d008e2f..26d3090 100644
--- a/docs/manualpages/RG/RGCreate.html
+++ b/docs/manualpages/RG/RGCreate.html
@@ -6,25 +6,25 @@
 <TITLE>RGCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGCreate</H1>
 Creates an <A HREF="../RG/RG.html#RG">RG</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGCreate.html#RGCreate">RGCreate</A>(MPI_Comm comm,<A HREF="../RG/RG.html#RG">RG</A> *newrg)
+PetscErrorCode RGCreate(MPI_Comm comm,RG *newrg)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>newrg </B> - location to put the <A HREF="../RG/RG.html#RG">RG</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>newrg </B></TD><TD> - location to put the <A HREF="../RG/RG.html#RG">RG</A> context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/RG/RGDestroy.html b/docs/manualpages/RG/RGDestroy.html
index 005ac29..a94e4da 100644
--- a/docs/manualpages/RG/RGDestroy.html
+++ b/docs/manualpages/RG/RGDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>RGDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGDestroy</H1>
 Destroys <A HREF="../RG/RG.html#RG">RG</A> context that was created with <A HREF="../RG/RGCreate.html#RGCreate">RGCreate</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGDestroy.html#RGDestroy">RGDestroy</A>(<A HREF="../RG/RG.html#RG">RG</A> *rg)
+PetscErrorCode RGDestroy(RG *rg)
 </PRE>
 Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/RG/RGEllipseGetParameters.html b/docs/manualpages/RG/RGEllipseGetParameters.html
index 1dd53a5..6c03566 100644
--- a/docs/manualpages/RG/RGEllipseGetParameters.html
+++ b/docs/manualpages/RG/RGEllipseGetParameters.html
@@ -6,29 +6,29 @@
 <TITLE>RGEllipseGetParameters</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGEllipseGetParameters.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGEllipseGetParameters.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGEllipseGetParameters</H1>
 Gets the parameters that define the ellipse region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale)
+PetscErrorCode RGEllipseGetParameters(RG rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg     </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center </B></TD><TD> - center of the region
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center </B></TD><TD> - center of the region
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius </B></TD><TD> - radius of the region
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius </B></TD><TD> - radius of the region
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale </B></TD><TD> - vertical scale of the region
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale </B></TD><TD> - vertical scale of the region
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/RG/RGEllipseSetParameters.html b/docs/manualpages/RG/RGEllipseSetParameters.html
index b4a5524..8c75535 100644
--- a/docs/manualpages/RG/RGEllipseSetParameters.html
+++ b/docs/manualpages/RG/RGEllipseSetParameters.html
@@ -6,36 +6,36 @@
 <TITLE>RGEllipseSetParameters</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGEllipseSetParameters.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGEllipseSetParameters.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGEllipseSetParameters</H1>
 Sets the parameters defining the ellipse region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGEllipseSetParameters.html#RGEllipseSetParameters">RGEllipseSetParameters</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscScalar center,PetscReal radius,PetscReal vscale)
+PetscErrorCode RGEllipseSetParameters(RG rg,PetscScalar center,PetscReal radius,PetscReal vscale)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center </B></TD><TD> - center of the ellipse
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center </B></TD><TD> - center of the ellipse
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius </B></TD><TD> - radius of the ellipse
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius </B></TD><TD> - radius of the ellipse
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale </B></TD><TD> - vertical scale of the ellipse
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale </B></TD><TD> - vertical scale of the ellipse
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ellipse_center </B></TD><TD> - Sets the center
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ellipse_center </B></TD><TD> - Sets the center
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ellipse_radius </B></TD><TD> - Sets the radius
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ellipse_radius </B></TD><TD> - Sets the radius
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ellipse_vscale </B></TD><TD> - Sets the vertical scale
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ellipse_vscale </B></TD><TD> - Sets the vertical scale
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGFinalizePackage.html b/docs/manualpages/RG/RGFinalizePackage.html
index 6b975c1..47f7923 100644
--- a/docs/manualpages/RG/RGFinalizePackage.html
+++ b/docs/manualpages/RG/RGFinalizePackage.html
@@ -6,15 +6,15 @@
 <TITLE>RGFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../RG/RG.html#RG">RG</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGFinalizePackage.html#RGFinalizePackage">RGFinalizePackage</A>(void)
+PetscErrorCode RGFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/RG/RGGetComplement.html b/docs/manualpages/RG/RGGetComplement.html
index f7aca78..4681c62 100644
--- a/docs/manualpages/RG/RGGetComplement.html
+++ b/docs/manualpages/RG/RGGetComplement.html
@@ -6,25 +6,25 @@
 <TITLE>RGGetComplement</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGGetComplement.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGGetComplement.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGGetComplement</H1>
 Gets a flag that that indicates whether the region is complemented or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGGetComplement.html#RGGetComplement">RGGetComplement</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscBool *flg)
+PetscErrorCode RGGetComplement(RG rg,PetscBool *flg)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>flg </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/RG/RGGetOptionsPrefix.html b/docs/manualpages/RG/RGGetOptionsPrefix.html
index d224cce..88c8628 100644
--- a/docs/manualpages/RG/RGGetOptionsPrefix.html
+++ b/docs/manualpages/RG/RGGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>RGGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../RG/RG.html#RG">RG</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGGetOptionsPrefix.html#RGGetOptionsPrefix">RGGetOptionsPrefix</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,const char *prefix[])
+PetscErrorCode RGGetOptionsPrefix(RG rg,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/RG/RGGetScale.html b/docs/manualpages/RG/RGGetScale.html
index dbdfc5a..b4a54a4 100644
--- a/docs/manualpages/RG/RGGetScale.html
+++ b/docs/manualpages/RG/RGGetScale.html
@@ -6,25 +6,25 @@
 <TITLE>RGGetScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGGetScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGGetScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGGetScale</H1>
 Gets the scaling factor. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGGetScale.html#RGGetScale">RGGetScale</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscReal *sfactor)
+PetscErrorCode RGGetScale(RG rg,PetscReal *sfactor)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>flg </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/RG/RGGetType.html b/docs/manualpages/RG/RGGetType.html
index 052c71a..be1f6df 100644
--- a/docs/manualpages/RG/RGGetType.html
+++ b/docs/manualpages/RG/RGGetType.html
@@ -6,25 +6,25 @@
 <TITLE>RGGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGGetType</H1>
 Gets the <A HREF="../RG/RG.html#RG">RG</A> type name (as a string) from the <A HREF="../RG/RG.html#RG">RG</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGGetType.html#RGGetType">RGGetType</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,<A HREF="../RG/RGType.html#RGType">RGType</A> *type)
+PetscErrorCode RGGetType(RG rg,RGType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of the region
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of the region
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/RG/RGInitializePackage.html b/docs/manualpages/RG/RGInitializePackage.html
index d929285..b97fcd8 100644
--- a/docs/manualpages/RG/RGInitializePackage.html
+++ b/docs/manualpages/RG/RGInitializePackage.html
@@ -6,15 +6,15 @@
 <TITLE>RGInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGInitializePackage</H1>
 This function initializes everything in the <A HREF="../RG/RG.html#RG">RG</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../RG/RGCreate.html#RGCreate">RGCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGInitializePackage.html#RGInitializePackage">RGInitializePackage</A>(void)
+PetscErrorCode RGInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/RG/RGIntervalGetEndpoints.html b/docs/manualpages/RG/RGIntervalGetEndpoints.html
index 7b43db4..08d00f9 100644
--- a/docs/manualpages/RG/RGIntervalGetEndpoints.html
+++ b/docs/manualpages/RG/RGIntervalGetEndpoints.html
@@ -6,27 +6,27 @@
 <TITLE>RGIntervalGetEndpoints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGIntervalGetEndpoints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGIntervalGetEndpoints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGIntervalGetEndpoints</H1>
 Gets the parameters that define the interval region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscReal *a,PetscReal *b,PetscReal *c,PetscReal *d)
+PetscErrorCode RGIntervalGetEndpoints(RG rg,PetscReal *a,PetscReal *b,PetscReal *c,PetscReal *d)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a,b </B></TD><TD> - endpoints of the interval in the real axis
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a,b </B></TD><TD> - endpoints of the interval in the real axis
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>c,d </B></TD><TD> - endpoints of the interval in the imaginary axis
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>c,d </B></TD><TD> - endpoints of the interval in the imaginary axis
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/RG/RGIntervalSetEndpoints.html b/docs/manualpages/RG/RGIntervalSetEndpoints.html
index f53528d..fc78c2e 100644
--- a/docs/manualpages/RG/RGIntervalSetEndpoints.html
+++ b/docs/manualpages/RG/RGIntervalSetEndpoints.html
@@ -6,30 +6,30 @@
 <TITLE>RGIntervalSetEndpoints</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGIntervalSetEndpoints.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGIntervalSetEndpoints.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGIntervalSetEndpoints</H1>
 Sets the parameters defining the interval region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscReal a,PetscReal b,PetscReal c,PetscReal d)
+PetscErrorCode RGIntervalSetEndpoints(RG rg,PetscReal a,PetscReal b,PetscReal c,PetscReal d)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a,b </B></TD><TD> - endpoints of the interval in the real axis
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a,b </B></TD><TD> - endpoints of the interval in the real axis
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>c,d </B></TD><TD> - endpoints of the interval in the imaginary axis
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>c,d </B></TD><TD> - endpoints of the interval in the imaginary axis
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-rg_interval_endpoints </B> - the four endpoints
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_interval_endpoints </B></TD><TD> - the four endpoints
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The region is defined as [a,b]x[c,d]. Particular cases are an interval on
@@ -44,4 +44,7 @@ complex plane (a=-inf,b=inf,c=-inf,d=inf), and so on.
 <BR><A HREF="./index.html">Index of all RG routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/RG/RGIsTrivial.html b/docs/manualpages/RG/RGIsTrivial.html
index bc7b00d..388978b 100644
--- a/docs/manualpages/RG/RGIsTrivial.html
+++ b/docs/manualpages/RG/RGIsTrivial.html
@@ -6,27 +6,27 @@
 <TITLE>RGIsTrivial</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGIsTrivial.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGIsTrivial.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGIsTrivial</H1>
 Whether it is the trivial region (whole complex plane). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscBool *trivial)
+PetscErrorCode RGIsTrivial(RG rg,PetscBool *trivial)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>trivial </B> - true if the region is equal to the whole complex plane, e.g.,
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trivial </B></TD><TD> - true if the region is equal to the whole complex plane, e.g.,
 an interval region with all four endpoints unbounded or an
 ellipse with infinite radius.
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/rg/rgbasic.c.html#RGIsTrivial">src/sys/classes/rg/rgbasic.c</A>
diff --git a/docs/manualpages/RG/RGPolygonGetVertices.html b/docs/manualpages/RG/RGPolygonGetVertices.html
index ca9a77d..bd421f2 100644
--- a/docs/manualpages/RG/RGPolygonGetVertices.html
+++ b/docs/manualpages/RG/RGPolygonGetVertices.html
@@ -6,29 +6,29 @@
 <TITLE>RGPolygonGetVertices</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGPolygonGetVertices.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGPolygonGetVertices.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGPolygonGetVertices</H1>
 Gets the vertices that define the polygon region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGPolygonGetVertices.html#RGPolygonGetVertices">RGPolygonGetVertices</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscInt *n,PetscScalar **vr,PetscScalar **vi)
+PetscErrorCode RGPolygonGetVertices(RG rg,PetscInt *n,PetscScalar **vr,PetscScalar **vi)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg     </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of vertices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of vertices
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vr </B></TD><TD> - array of vertices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vr </B></TD><TD> - array of vertices
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vi </B></TD><TD> - array of vertices (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vi </B></TD><TD> - array of vertices (imaginary part)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGPolygonSetVertices.html b/docs/manualpages/RG/RGPolygonSetVertices.html
index a5da413..beeb598 100644
--- a/docs/manualpages/RG/RGPolygonSetVertices.html
+++ b/docs/manualpages/RG/RGPolygonSetVertices.html
@@ -6,34 +6,34 @@
 <TITLE>RGPolygonSetVertices</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGPolygonSetVertices.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGPolygonSetVertices.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGPolygonSetVertices</H1>
 Sets the vertices that define the polygon region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscInt n,PetscScalar *vr,PetscScalar *vi)
+PetscErrorCode RGPolygonSetVertices(RG rg,PetscInt n,PetscScalar *vr,PetscScalar *vi)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of vertices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of vertices
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vr </B></TD><TD> - array of vertices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vr </B></TD><TD> - array of vertices
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vi </B></TD><TD> - array of vertices (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vi </B></TD><TD> - array of vertices (imaginary part)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_polygon_vertices </B></TD><TD> - Sets the vertices
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_polygon_vertices </B></TD><TD> - Sets the vertices
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_polygon_verticesi </B></TD><TD> - Sets the vertices (imaginary part)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_polygon_verticesi </B></TD><TD> - Sets the vertices (imaginary part)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGPopScale.html b/docs/manualpages/RG/RGPopScale.html
new file mode 100644
index 0000000..efa76a3
--- /dev/null
+++ b/docs/manualpages/RG/RGPopScale.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/RG/RGPopScale.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>RGPopScale</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGPopScale.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>RGPopScale</H1>
+Pops the scaling factor set with <A HREF="../RG/RGPushScale.html#RGPushScale">RGPushScale</A>(). 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcrg.h" 
+PetscErrorCode RGPopScale(RG rg)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../RG/RGPushScale.html#RGPushScale">RGPushScale</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/rg/rgbasic.c.html#RGPopScale">src/sys/classes/rg/rgbasic.c</A>
+<BR><A HREF="./index.html">Index of all RG routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/RG/RGPushScale.html b/docs/manualpages/RG/RGPushScale.html
new file mode 100644
index 0000000..5c6412f
--- /dev/null
+++ b/docs/manualpages/RG/RGPushScale.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/RG/RGPushScale.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>RGPushScale</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGPushScale.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>RGPushScale</H1>
+Sets an additional scaling factor, that will multiply the user-defined scaling factor. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcrg.h" 
+PetscErrorCode RGPushScale(RG rg,PetscReal sfactor)
+</PRE>
+Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg      </B></TD><TD> - the region context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sfactor </B></TD><TD> - the scaling factor
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+The current implementation does not allow pushing several scaling factors.
+<P>
+This is intended for internal use, for instance in polynomial eigensolvers
+that use parameter scaling.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../RG/RGPopScale.html#RGPopScale">RGPopScale</A>(), <A HREF="../RG/RGSetScale.html#RGSetScale">RGSetScale</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/rg/rgbasic.c.html#RGPushScale">src/sys/classes/rg/rgbasic.c</A>
+<BR><A HREF="./index.html">Index of all RG routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/RG/RGRegister.html b/docs/manualpages/RG/RGRegister.html
index e58029f..858a490 100644
--- a/docs/manualpages/RG/RGRegister.html
+++ b/docs/manualpages/RG/RGRegister.html
@@ -6,23 +6,23 @@
 <TITLE>RGRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGRegister</H1>
 See Adds a mathematical function to the <A HREF="../RG/RG.html#RG">RG</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGRegister.html#RGRegister">RGRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../RG/RG.html#RG">RG</A>))
+PetscErrorCode RGRegister(const char *name,PetscErrorCode (*function)(RG))
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined <A HREF="../RG/RG.html#RG">RG</A>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined <A HREF="../RG/RG.html#RG">RG</A>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGRegisterAll.html b/docs/manualpages/RG/RGRegisterAll.html
index 3d32f1a..453a187 100644
--- a/docs/manualpages/RG/RGRegisterAll.html
+++ b/docs/manualpages/RG/RGRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>RGRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGRegisterAll</H1>
 Registers all of the regions in the <A HREF="../RG/RG.html#RG">RG</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGRegisterAll.html#RGRegisterAll">RGRegisterAll</A>(void)
+PetscErrorCode RGRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/RG/RGRingGetParameters.html b/docs/manualpages/RG/RGRingGetParameters.html
index abc874d..13ccc8d 100644
--- a/docs/manualpages/RG/RGRingGetParameters.html
+++ b/docs/manualpages/RG/RGRingGetParameters.html
@@ -6,35 +6,35 @@
 <TITLE>RGRingGetParameters</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGRingGetParameters.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGRingGetParameters.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGRingGetParameters</H1>
 Gets the parameters that define the ring region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale,PetscReal *start_ang,PetscReal *end_ang,PetscReal *width)
+PetscErrorCode RGRingGetParameters(RG rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale,PetscReal *start_ang,PetscReal *end_ang,PetscReal *width)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>rg     </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center    </B></TD><TD> - center of the region
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center    </B></TD><TD> - center of the region
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius    </B></TD><TD> - radius of the region
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius    </B></TD><TD> - radius of the region
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale    </B></TD><TD> - vertical scale of the region
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale    </B></TD><TD> - vertical scale of the region
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>start_ang </B></TD><TD> - the right-hand side angle
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>start_ang </B></TD><TD> - the right-hand side angle
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>end_ang   </B></TD><TD> - the left-hand side angle
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>end_ang   </B></TD><TD> - the left-hand side angle
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>width     </B></TD><TD> - width of the ring
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>width     </B></TD><TD> - width of the ring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/RG/RGRingSetParameters.html b/docs/manualpages/RG/RGRingSetParameters.html
index 0b4986c..dfb22a9 100644
--- a/docs/manualpages/RG/RGRingSetParameters.html
+++ b/docs/manualpages/RG/RGRingSetParameters.html
@@ -6,48 +6,48 @@
 <TITLE>RGRingSetParameters</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGRingSetParameters.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGRingSetParameters.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGRingSetParameters</H1>
 Sets the parameters defining the ring region. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscScalar center,PetscReal radius,PetscReal vscale,PetscReal start_ang,PetscReal end_ang,PetscReal width)
+PetscErrorCode RGRingSetParameters(RG rg,PetscScalar center,PetscReal radius,PetscReal vscale,PetscReal start_ang,PetscReal end_ang,PetscReal width)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg        </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg        </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center    </B></TD><TD> - center of the ellipse
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>center    </B></TD><TD> - center of the ellipse
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius    </B></TD><TD> - radius of the ellipse
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>radius    </B></TD><TD> - radius of the ellipse
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale    </B></TD><TD> - vertical scale of the ellipse
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vscale    </B></TD><TD> - vertical scale of the ellipse
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>start_ang </B></TD><TD> - the right-hand side angle
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>start_ang </B></TD><TD> - the right-hand side angle
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>end_ang   </B></TD><TD> - the left-hand side angle
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>end_ang   </B></TD><TD> - the left-hand side angle
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>width     </B></TD><TD> - width of the ring
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>width     </B></TD><TD> - width of the ring
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_center     </B></TD><TD> - Sets the center
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_center     </B></TD><TD> - Sets the center
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_radius     </B></TD><TD> - Sets the radius
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_radius     </B></TD><TD> - Sets the radius
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_vscale     </B></TD><TD> - Sets the vertical scale
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_vscale     </B></TD><TD> - Sets the vertical scale
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_startangle </B></TD><TD> - Sets the right-hand side angle
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_startangle </B></TD><TD> - Sets the right-hand side angle
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_endangle   </B></TD><TD> - Sets the left-hand side angle
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_endangle   </B></TD><TD> - Sets the left-hand side angle
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_width      </B></TD><TD> - Sets the width of the ring
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_ring_width      </B></TD><TD> - Sets the width of the ring
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGSetComplement.html b/docs/manualpages/RG/RGSetComplement.html
index c4d8e63..02a9b27 100644
--- a/docs/manualpages/RG/RGSetComplement.html
+++ b/docs/manualpages/RG/RGSetComplement.html
@@ -6,28 +6,28 @@
 <TITLE>RGSetComplement</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGSetComplement.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGSetComplement.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGSetComplement</H1>
 Sets a flag to indicate that the region is the complement of the specified one. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGSetComplement.html#RGSetComplement">RGSetComplement</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscBool flg)
+PetscErrorCode RGSetComplement(RG rg,PetscBool flg)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg  </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-rg_complement <bool> </B> - Activate/deactivate the complementation of the region.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_complement <bool> </B></TD><TD> - Activate/deactivate the complementation of the region
+</TD></TR></TABLE>
 <P>
 
 <P>
@@ -37,4 +37,6 @@ Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <BR><A HREF="./index.html">Index of all RG routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/RG/RGSetFromOptions.html b/docs/manualpages/RG/RGSetFromOptions.html
index 4408eba..6895426 100644
--- a/docs/manualpages/RG/RGSetFromOptions.html
+++ b/docs/manualpages/RG/RGSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>RGSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGSetFromOptions</H1>
 Sets <A HREF="../RG/RG.html#RG">RG</A> options from the options database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</A>(<A HREF="../RG/RG.html#RG">RG</A> rg)
+PetscErrorCode RGSetFromOptions(RG rg)
 </PRE>
 Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>rg </B> - the region context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
diff --git a/docs/manualpages/RG/RGSetOptionsPrefix.html b/docs/manualpages/RG/RGSetOptionsPrefix.html
index 660f146..e5e003b 100644
--- a/docs/manualpages/RG/RGSetOptionsPrefix.html
+++ b/docs/manualpages/RG/RGSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>RGSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../RG/RG.html#RG">RG</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,const char *prefix)
+PetscErrorCode RGSetOptionsPrefix(RG rg,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg     </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../RG/RG.html#RG">RG</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../RG/RG.html#RG">RG</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/RG/RGSetScale.html b/docs/manualpages/RG/RGSetScale.html
index 818adb2..1dd5704 100644
--- a/docs/manualpages/RG/RGSetScale.html
+++ b/docs/manualpages/RG/RGSetScale.html
@@ -6,23 +6,27 @@
 <TITLE>RGSetScale</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGSetScale.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGSetScale.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGSetScale</H1>
-Sets the scaling factor to be used when checking that a point is inside the region. 
+Sets the scaling factor to be used when checking that a point is inside the region and when computing the contour. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGSetScale.html#RGSetScale">RGSetScale</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscReal sfactor)
+PetscErrorCode RGSetScale(RG rg,PetscReal sfactor)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg      </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg      </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sfactor </B></TD><TD> - the scaling factor
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sfactor </B></TD><TD> - the scaling factor
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-rg_scale <real> </B></TD><TD> - Sets the scaling factor
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/RG/RGSetType.html b/docs/manualpages/RG/RGSetType.html
index de38f57..04bd90c 100644
--- a/docs/manualpages/RG/RGSetType.html
+++ b/docs/manualpages/RG/RGSetType.html
@@ -6,23 +6,23 @@
 <TITLE>RGSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGSetType</H1>
 Selects the type for the <A HREF="../RG/RG.html#RG">RG</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGSetType.html#RGSetType">RGSetType</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,<A HREF="../RG/RGType.html#RGType">RGType</A> type)
+PetscErrorCode RGSetType(RG rg,RGType type)
 </PRE>
 Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg   </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg   </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
 </TD></TR></TABLE>
 <P>
 
@@ -33,4 +33,7 @@ Logically Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <BR><A HREF="./index.html">Index of all RG routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/eps/examples/tutorials/ex30.c.html">src/eps/examples/tutorials/ex30.c.html</A><BR>
+<A HREF="../../../src/nep/examples/tutorials/ex27.c.html">src/nep/examples/tutorials/ex27.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/RG/RGType.html b/docs/manualpages/RG/RGType.html
index 164fd38..bec1d46 100644
--- a/docs/manualpages/RG/RGType.html
+++ b/docs/manualpages/RG/RGType.html
@@ -6,8 +6,8 @@
 <TITLE>RGType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGType</H1>
 String with the name of the region. 
diff --git a/docs/manualpages/RG/RGView.html b/docs/manualpages/RG/RGView.html
index d65163c..6b75c12 100644
--- a/docs/manualpages/RG/RGView.html
+++ b/docs/manualpages/RG/RGView.html
@@ -6,31 +6,31 @@
 <TITLE>RGView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/RGView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/RGView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>RGView</H1>
 Prints the <A HREF="../RG/RG.html#RG">RG</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcrg.h" 
-PetscErrorCode <A HREF="../RG/RGView.html#RGView">RGView</A>(<A HREF="../RG/RG.html#RG">RG</A> rg,PetscViewer viewer)
+PetscErrorCode RGView(RG rg,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../RG/RG.html#RG">RG</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rg </B></TD><TD> - the region context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/RG/index.html b/docs/manualpages/RG/index.html
index 0c07ec9..5de79b0 100644
--- a/docs/manualpages/RG/index.html
+++ b/docs/manualpages/RG/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/RG/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/RG/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
@@ -18,13 +18,17 @@ The RG package provides a way to define a region of the complex plane. This is u
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./RGCreate.html">RGCreate</A></TD>
  <TD WIDTH=250><A HREF="./RG.html">RG</A></TD>
- <TD WIDTH=250><A HREF="./RGType.html">RGType</A></TD>
+ <TD WIDTH=250><A HREF="./RGIsTrivial.html">RGIsTrivial</A></TD>
+ <TD WIDTH=250><A HREF="./RGView.html">RGView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./RGDestroy.html">RGDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./RGCreate.html">RGCreate</A></TD>
  <TD WIDTH=250><A HREF="./RGSetFromOptions.html">RGSetFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./RGView.html">RGView</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./RGDestroy.html">RGDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./RGType.html">RGType</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
  <TD WIDTH=250><A HREF="./RGCheckInside.html">RGCheckInside</A></TD>
@@ -37,32 +41,32 @@ The RG package provides a way to define a region of the complex plane. This is u
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./RGAppendOptionsPrefix.html">RGAppendOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./RGIntervalGetEndpoints.html">RGIntervalGetEndpoints</A></TD>
+ <TD WIDTH=250><A HREF="./RGRegisterAll.html">RGRegisterAll</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./RGEllipseGetParameters.html">RGEllipseGetParameters</A></TD>
  <TD WIDTH=250><A HREF="./RGIntervalSetEndpoints.html">RGIntervalSetEndpoints</A></TD>
  <TD WIDTH=250><A HREF="./RGRingGetParameters.html">RGRingGetParameters</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./RGEllipseGetParameters.html">RGEllipseGetParameters</A></TD>
+ <TD WIDTH=250><A HREF="./RGEllipseSetParameters.html">RGEllipseSetParameters</A></TD>
  <TD WIDTH=250><A HREF="./RGPolygonGetVertices.html">RGPolygonGetVertices</A></TD>
  <TD WIDTH=250><A HREF="./RGRingSetParameters.html">RGRingSetParameters</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./RGEllipseSetParameters.html">RGEllipseSetParameters</A></TD>
+ <TD WIDTH=250><A HREF="./RGGetOptionsPrefix.html">RGGetOptionsPrefix</A></TD>
  <TD WIDTH=250><A HREF="./RGPolygonSetVertices.html">RGPolygonSetVertices</A></TD>
  <TD WIDTH=250><A HREF="./RGSetOptionsPrefix.html">RGSetOptionsPrefix</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./RGGetOptionsPrefix.html">RGGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./RGRegisterAll.html">RGRegisterAll</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./RGIntervalGetEndpoints.html">RGIntervalGetEndpoints</A></TD>
+ <TD WIDTH=250><A HREF="./RGGetScale.html">RGGetScale</A></TD>
  <TD WIDTH=250><A HREF="./RGRegister.html">RGRegister</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./RGSetScale.html">RGSetScale</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./RGFinalizePackage.html">RGFinalizePackage</A></TD>
- <TD WIDTH=250><A HREF="./RGInitializePackage.html">RGInitializePackage</A></TD>
+ <TD WIDTH=250><A HREF="./RGPopScale.html">RGPopScale</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./RGGetScale.html">RGGetScale</A></TD>
- <TD WIDTH=250><A HREF="./RGSetScale.html">RGSetScale</A></TD>
+ <TD WIDTH=250><A HREF="./RGInitializePackage.html">RGInitializePackage</A></TD>
+ <TD WIDTH=250><A HREF="./RGPushScale.html">RGPushScale</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>No deprecated routines</B></TD></TR>
diff --git a/docs/manualpages/ST/ST.html b/docs/manualpages/ST/ST.html
index 7e36dbf..3c20971 100644
--- a/docs/manualpages/ST/ST.html
+++ b/docs/manualpages/ST/ST.html
@@ -6,8 +6,8 @@
 <TITLE>ST</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/ST.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/ST.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>ST</H1>
 Abstract SLEPc object that manages spectral transformations. This object is accessed only in advanced applications. 
diff --git a/docs/manualpages/ST/STAppendOptionsPrefix.html b/docs/manualpages/ST/STAppendOptionsPrefix.html
index be658cf..0749582 100644
--- a/docs/manualpages/ST/STAppendOptionsPrefix.html
+++ b/docs/manualpages/ST/STAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>STAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../ST/ST.html#ST">ST</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</A>(<A HREF="../ST/ST.html#ST">ST</A> st,const char *prefix)
+PetscErrorCode STAppendOptionsPrefix(ST st,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../ST/ST.html#ST">ST</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../ST/ST.html#ST">ST</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STApply.html b/docs/manualpages/ST/STApply.html
index b7d2fa4..ff0a82c 100644
--- a/docs/manualpages/ST/STApply.html
+++ b/docs/manualpages/ST/STApply.html
@@ -6,28 +6,28 @@
 <TITLE>STApply</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STApply.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STApply.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STApply</H1>
-Applies the spectral transformation operator to a vector, for instance (A - sB)^-1 B in the case of the shift-and-invert tranformation and generalized eigenproblem. 
+Applies the spectral transformation operator to a vector, for instance (A - sB)^-1 B in the case of the shift-and-invert transformation and generalized eigenproblem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STApply.html#STApply">STApply</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec x,Vec y)
+PetscErrorCode STApply(ST st,Vec x,Vec y)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - input vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - input vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y </B> - output vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - output vector
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STApplyTranspose.html b/docs/manualpages/ST/STApplyTranspose.html
index a16d02a..953af4c 100644
--- a/docs/manualpages/ST/STApplyTranspose.html
+++ b/docs/manualpages/ST/STApplyTranspose.html
@@ -6,28 +6,28 @@
 <TITLE>STApplyTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STApplyTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STApplyTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STApplyTranspose</H1>
-Applies the transpose of the operator to a vector, for instance B^T(A - sB)^-T in the case of the shift-and-invert tranformation and generalized eigenproblem. 
+Applies the transpose of the operator to a vector, for instance B^T(A - sB)^-T in the case of the shift-and-invert transformation and generalized eigenproblem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STApplyTranspose.html#STApplyTranspose">STApplyTranspose</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec x,Vec y)
+PetscErrorCode STApplyTranspose(ST st,Vec x,Vec y)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - input vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - input vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y </B> - output vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - output vector
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STBackTransform.html b/docs/manualpages/ST/STBackTransform.html
index 55f8063..9ab5cb2 100644
--- a/docs/manualpages/ST/STBackTransform.html
+++ b/docs/manualpages/ST/STBackTransform.html
@@ -6,15 +6,15 @@
 <TITLE>STBackTransform</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STBackTransform.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STBackTransform.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STBackTransform</H1>
 Back-transformation phase, intended for spectral transformations which require to transform the computed eigenvalues back to the original eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STBackTransform.html#STBackTransform">STBackTransform</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)
+PetscErrorCode STBackTransform(ST st,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/ST/STCayleyGetAntishift.html b/docs/manualpages/ST/STCayleyGetAntishift.html
index 0f4e327..e8f01d8 100644
--- a/docs/manualpages/ST/STCayleyGetAntishift.html
+++ b/docs/manualpages/ST/STCayleyGetAntishift.html
@@ -6,25 +6,25 @@
 <TITLE>STCayleyGetAntishift</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STCayleyGetAntishift.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STCayleyGetAntishift.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STCayleyGetAntishift</H1>
 Gets the value of the anti-shift used in the Cayley spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar *nu)
+PetscErrorCode STCayleyGetAntishift(ST st,PetscScalar *nu)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st  </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nu  </B> - the anti-shift
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nu  </B></TD><TD> - the anti-shift
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STCayleySetAntishift.html b/docs/manualpages/ST/STCayleySetAntishift.html
index f88ed5d..5a85737 100644
--- a/docs/manualpages/ST/STCayleySetAntishift.html
+++ b/docs/manualpages/ST/STCayleySetAntishift.html
@@ -6,28 +6,28 @@
 <TITLE>STCayleySetAntishift</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STCayleySetAntishift.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STCayleySetAntishift.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STCayleySetAntishift</H1>
 Sets the value of the anti-shift for the Cayley spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar nu)
+PetscErrorCode STCayleySetAntishift(ST st,PetscScalar nu)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nu  </B></TD><TD> - the anti-shift
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nu  </B></TD><TD> - the anti-shift
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-st_cayley_antishift </B> - Sets the value of the anti-shift
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-st_cayley_antishift </B></TD><TD> - Sets the value of the anti-shift
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STCheckNullSpace.html b/docs/manualpages/ST/STCheckNullSpace.html
index 4166a2f..4189f37 100644
--- a/docs/manualpages/ST/STCheckNullSpace.html
+++ b/docs/manualpages/ST/STCheckNullSpace.html
@@ -6,23 +6,23 @@
 <TITLE>STCheckNullSpace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STCheckNullSpace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STCheckNullSpace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STCheckNullSpace</H1>
 Given a basis vectors object, this function tests each of its constraint vectors to be a nullspace vector of the coefficient matrix of the associated KSP object. All these nullspace vectors are passed to the KSP object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</A>(<A HREF="../ST/ST.html#ST">ST</A> st,<A HREF="../BV/BV.html#BV">BV</A> V)
+PetscErrorCode STCheckNullSpace(ST st,BV V)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V  </B></TD><TD> - basis vectors to be checked
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V  </B></TD><TD> - basis vectors to be checked
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/ST/STComputeExplicitOperator.html b/docs/manualpages/ST/STComputeExplicitOperator.html
index 6dd8b0b..7fe5f2b 100644
--- a/docs/manualpages/ST/STComputeExplicitOperator.html
+++ b/docs/manualpages/ST/STComputeExplicitOperator.html
@@ -6,25 +6,25 @@
 <TITLE>STComputeExplicitOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STComputeExplicitOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STComputeExplicitOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STComputeExplicitOperator</H1>
 Computes the explicit operator associated to the eigenvalue problem with the specified spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STComputeExplicitOperator.html#STComputeExplicitOperator">STComputeExplicitOperator</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Mat *mat)
+PetscErrorCode STComputeExplicitOperator(ST st,Mat *mat)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transform context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transform context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>mat </B> - the explicit operator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the explicit operator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This routine builds a matrix containing the explicit operator. For
diff --git a/docs/manualpages/ST/STCreate.html b/docs/manualpages/ST/STCreate.html
index c65425e..20c0f8f 100644
--- a/docs/manualpages/ST/STCreate.html
+++ b/docs/manualpages/ST/STCreate.html
@@ -6,25 +6,25 @@
 <TITLE>STCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STCreate</H1>
 Creates a spectral transformation context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STCreate.html#STCreate">STCreate</A>(MPI_Comm comm,<A HREF="../ST/ST.html#ST">ST</A> *newst)
+PetscErrorCode STCreate(MPI_Comm comm,ST *newst)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>st </B> - location to put the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - location to put the spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STDestroy.html b/docs/manualpages/ST/STDestroy.html
index fd2f8a4..0538828 100644
--- a/docs/manualpages/ST/STDestroy.html
+++ b/docs/manualpages/ST/STDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>STDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STDestroy</H1>
 Destroys <A HREF="../ST/ST.html#ST">ST</A> context that was created with <A HREF="../ST/STCreate.html#STCreate">STCreate</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STDestroy.html#STDestroy">STDestroy</A>(<A HREF="../ST/ST.html#ST">ST</A> *st)
+PetscErrorCode STDestroy(ST *st)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STFinalizePackage.html b/docs/manualpages/ST/STFinalizePackage.html
index 8d232ed..09d9da4 100644
--- a/docs/manualpages/ST/STFinalizePackage.html
+++ b/docs/manualpages/ST/STFinalizePackage.html
@@ -6,15 +6,15 @@
 <TITLE>STFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../ST/ST.html#ST">ST</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STFinalizePackage.html#STFinalizePackage">STFinalizePackage</A>(void)
+PetscErrorCode STFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/ST/STGetBalanceMatrix.html b/docs/manualpages/ST/STGetBalanceMatrix.html
index c14e745..e7b62ac 100644
--- a/docs/manualpages/ST/STGetBalanceMatrix.html
+++ b/docs/manualpages/ST/STGetBalanceMatrix.html
@@ -6,25 +6,25 @@
 <TITLE>STGetBalanceMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetBalanceMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetBalanceMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetBalanceMatrix</H1>
 Gets the balance matrix used by the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec *D)
+PetscErrorCode STGetBalanceMatrix(ST st,Vec *D)
 </PRE>
 Not collective, but vector is shared by all processors that share the <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>D  </B> - the diagonal matrix (represented as a vector)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>D  </B></TD><TD> - the diagonal matrix (represented as a vector)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 If the matrix was not set, a null pointer will be returned.
diff --git a/docs/manualpages/ST/STGetBilinearForm.html b/docs/manualpages/ST/STGetBilinearForm.html
index 50562e9..1601ff8 100644
--- a/docs/manualpages/ST/STGetBilinearForm.html
+++ b/docs/manualpages/ST/STGetBilinearForm.html
@@ -6,25 +6,25 @@
 <TITLE>STGetBilinearForm</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetBilinearForm.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetBilinearForm.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetBilinearForm</H1>
 Returns the matrix used in the bilinear form with a generalized problem with semi-definite B. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetBilinearForm.html#STGetBilinearForm">STGetBilinearForm</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Mat *B)
+PetscErrorCode STGetBilinearForm(ST st,Mat *B)
 </PRE>
 Not collective, though a parallel Mat may be returned
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>B </B> - output matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B </B></TD><TD> - output matrix
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The output matrix B must be destroyed after use. It will be NULL in
diff --git a/docs/manualpages/ST/STGetKSP.html b/docs/manualpages/ST/STGetKSP.html
index c4eb137..9bf8096 100644
--- a/docs/manualpages/ST/STGetKSP.html
+++ b/docs/manualpages/ST/STGetKSP.html
@@ -6,33 +6,27 @@
 <TITLE>STGetKSP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetKSP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetKSP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetKSP</H1>
 Gets the KSP object associated with the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetKSP.html#STGetKSP">STGetKSP</A>(<A HREF="../ST/ST.html#ST">ST</A> st,KSP* ksp)
+PetscErrorCode STGetKSP(ST st,KSP* ksp)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ksp  </B> - the linear system context
-<br>
-<P>
-<H3><FONT COLOR="#883300">Notes</FONT></H3>
-On output, the value of ksp can be NULL if the combination of
-eigenproblem type and selected transformation does not require to
-solve a linear system of equations.
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp  </B></TD><TD> - the linear system context
+</TD></TR></TABLE>
 <P>
 
-<P>
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/st/interface/stsles.c.html#STGetKSP">src/sys/classes/st/interface/stsles.c</A>
 <BR><A HREF="./index.html">Index of all ST routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/ST/STGetMatMode.html b/docs/manualpages/ST/STGetMatMode.html
index 049d343..f14ed74 100644
--- a/docs/manualpages/ST/STGetMatMode.html
+++ b/docs/manualpages/ST/STGetMatMode.html
@@ -6,25 +6,25 @@
 <TITLE>STGetMatMode</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetMatMode.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetMatMode.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetMatMode</H1>
 Gets a flag that indicates how the transformed matrices are stored in spectral transformations. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetMatMode.html#STGetMatMode">STGetMatMode</A>(<A HREF="../ST/ST.html#ST">ST</A> st,<A HREF="../ST/STMatMode.html#STMatMode">STMatMode</A> *mode)
+PetscErrorCode STGetMatMode(ST st,STMatMode *mode)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>mode </B> - the mode flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mode </B></TD><TD> - the mode flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetMatStructure.html b/docs/manualpages/ST/STGetMatStructure.html
index 965956f..b6be0de 100644
--- a/docs/manualpages/ST/STGetMatStructure.html
+++ b/docs/manualpages/ST/STGetMatStructure.html
@@ -6,26 +6,26 @@
 <TITLE>STGetMatStructure</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetMatStructure.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetMatStructure.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetMatStructure</H1>
 Gets the internal MatStructure attribute to indicate which is the relation of the sparsity pattern of the matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</A>(<A HREF="../ST/ST.html#ST">ST</A> st,MatStructure *str)
+PetscErrorCode STGetMatStructure(ST st,MatStructure *str)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>st  </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>str </B> - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN or
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN or
 SUBSET_NONZERO_PATTERN
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetNumMatrices.html b/docs/manualpages/ST/STGetNumMatrices.html
index 1f9883e..f173545 100644
--- a/docs/manualpages/ST/STGetNumMatrices.html
+++ b/docs/manualpages/ST/STGetNumMatrices.html
@@ -6,25 +6,25 @@
 <TITLE>STGetNumMatrices</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetNumMatrices.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetNumMatrices.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetNumMatrices</H1>
 Returns the number of matrices stored in the <A HREF="../ST/ST.html#ST">ST</A>. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt *n)
+PetscErrorCode STGetNumMatrices(ST st,PetscInt *n)
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>n </B> - the number of matrices passed in <A HREF="../ST/STSetOperators.html#STSetOperators">STSetOperators</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - the number of matrices passed in <A HREF="../ST/STSetOperators.html#STSetOperators">STSetOperators</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetOperators.html b/docs/manualpages/ST/STGetOperators.html
index de499b0..33edc54 100644
--- a/docs/manualpages/ST/STGetOperators.html
+++ b/docs/manualpages/ST/STGetOperators.html
@@ -6,28 +6,28 @@
 <TITLE>STGetOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetOperators</H1>
 Gets the matrices associated with the original eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetOperators.html#STGetOperators">STGetOperators</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt k,Mat *A)
+PetscErrorCode STGetOperators(ST st,PetscInt k,Mat *A)
 </PRE>
 Not collective, though parallel Mats are returned if the <A HREF="../ST/ST.html#ST">ST</A> is parallel
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index of the requested matrix (starting in 0)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index of the requested matrix (starting in 0)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>A </B> - the requested matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - the requested matrix
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetOptionsPrefix.html b/docs/manualpages/ST/STGetOptionsPrefix.html
index a9884cf..2cc4069 100644
--- a/docs/manualpages/ST/STGetOptionsPrefix.html
+++ b/docs/manualpages/ST/STGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>STGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../ST/ST.html#ST">ST</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</A>(<A HREF="../ST/ST.html#ST">ST</A> st,const char *prefix[])
+PetscErrorCode STGetOptionsPrefix(ST st,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used, is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used, is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the Fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/ST/STGetShift.html b/docs/manualpages/ST/STGetShift.html
index 2fb2309..40eb1d7 100644
--- a/docs/manualpages/ST/STGetShift.html
+++ b/docs/manualpages/ST/STGetShift.html
@@ -6,25 +6,25 @@
 <TITLE>STGetShift</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetShift.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetShift.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetShift</H1>
 Gets the shift associated with the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetShift.html#STGetShift">STGetShift</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar* shift)
+PetscErrorCode STGetShift(ST st,PetscScalar* shift)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>shift </B> - the value of the shift
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shift </B></TD><TD> - the value of the shift
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetTOperators.html b/docs/manualpages/ST/STGetTOperators.html
index 26fe539..6944747 100644
--- a/docs/manualpages/ST/STGetTOperators.html
+++ b/docs/manualpages/ST/STGetTOperators.html
@@ -6,28 +6,28 @@
 <TITLE>STGetTOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetTOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetTOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetTOperators</H1>
 Gets the matrices associated with the transformed eigensystem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetTOperators.html#STGetTOperators">STGetTOperators</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt k,Mat *T)
+PetscErrorCode STGetTOperators(ST st,PetscInt k,Mat *T)
 </PRE>
 Not collective, though parallel Mats are returned if the <A HREF="../ST/ST.html#ST">ST</A> is parallel
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index of the requested matrix (starting in 0)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - the index of the requested matrix (starting in 0)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>T </B> - the requested matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>T </B></TD><TD> - the requested matrix
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetTransform.html b/docs/manualpages/ST/STGetTransform.html
index 351f138..f2ca643 100644
--- a/docs/manualpages/ST/STGetTransform.html
+++ b/docs/manualpages/ST/STGetTransform.html
@@ -6,25 +6,25 @@
 <TITLE>STGetTransform</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetTransform.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetTransform.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetTransform</H1>
 Gets a flag that that indicates whether the transformed matrices are computed or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetTransform.html#STGetTransform">STGetTransform</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscBool *flg)
+PetscErrorCode STGetTransform(ST st,PetscBool *flg)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>flg </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STGetType.html b/docs/manualpages/ST/STGetType.html
index 765be06..93a14c1 100644
--- a/docs/manualpages/ST/STGetType.html
+++ b/docs/manualpages/ST/STGetType.html
@@ -6,25 +6,25 @@
 <TITLE>STGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STGetType</H1>
 Gets the <A HREF="../ST/ST.html#ST">ST</A> type name (as a string) from the <A HREF="../ST/ST.html#ST">ST</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STGetType.html#STGetType">STGetType</A>(<A HREF="../ST/ST.html#ST">ST</A> st,<A HREF="../ST/STType.html#STType">STType</A> *type)
+PetscErrorCode STGetType(ST st,STType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of the spectral transformation
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of the spectral transformation
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STInitializePackage.html b/docs/manualpages/ST/STInitializePackage.html
index 0e199ae..10d1e6e 100644
--- a/docs/manualpages/ST/STInitializePackage.html
+++ b/docs/manualpages/ST/STInitializePackage.html
@@ -6,15 +6,15 @@
 <TITLE>STInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STInitializePackage</H1>
 This function initializes everything in the <A HREF="../ST/ST.html#ST">ST</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../ST/STCreate.html#STCreate">STCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STInitializePackage.html#STInitializePackage">STInitializePackage</A>(void)
+PetscErrorCode STInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/ST/STMatCreateVecs.html b/docs/manualpages/ST/STMatCreateVecs.html
index 201a074..87baf21 100644
--- a/docs/manualpages/ST/STMatCreateVecs.html
+++ b/docs/manualpages/ST/STMatCreateVecs.html
@@ -6,27 +6,27 @@
 <TITLE>STMatCreateVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatCreateVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatCreateVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatCreateVecs</H1>
 Get vector(s) compatible with the <A HREF="../ST/ST.html#ST">ST</A> matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec *right,Vec *left)
+PetscErrorCode STMatCreateVecs(ST st,Vec *right,Vec *left)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>right </B></TD><TD> - (optional) vector that the matrix can be multiplied against
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>right </B></TD><TD> - (optional) vector that the matrix can be multiplied against
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>left  </B></TD><TD> - (optional) vector that the matrix vector product can be stored in
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>left  </B></TD><TD> - (optional) vector that the matrix vector product can be stored in
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STMatGetLocalSize.html b/docs/manualpages/ST/STMatGetLocalSize.html
index f2265cd..70ebbec 100644
--- a/docs/manualpages/ST/STMatGetLocalSize.html
+++ b/docs/manualpages/ST/STMatGetLocalSize.html
@@ -6,27 +6,27 @@
 <TITLE>STMatGetLocalSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatGetLocalSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatGetLocalSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatGetLocalSize</H1>
 Returns the number of local rows and columns of the <A HREF="../ST/ST.html#ST">ST</A> matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt *m,PetscInt *n)
+PetscErrorCode STMatGetLocalSize(ST st,PetscInt *m,PetscInt *n)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - the number of local rows
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - the number of local rows
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - the number of local columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - the number of local columns
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STMatGetSize.html b/docs/manualpages/ST/STMatGetSize.html
index 22b2f39..567f1de 100644
--- a/docs/manualpages/ST/STMatGetSize.html
+++ b/docs/manualpages/ST/STMatGetSize.html
@@ -6,27 +6,27 @@
 <TITLE>STMatGetSize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatGetSize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatGetSize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatGetSize</H1>
 Returns the number of rows and columns of the <A HREF="../ST/ST.html#ST">ST</A> matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatGetSize.html#STMatGetSize">STMatGetSize</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt *m,PetscInt *n)
+PetscErrorCode STMatGetSize(ST st,PetscInt *m,PetscInt *n)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - the number of global rows
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD> - the number of global rows
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - the number of global columns
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - the number of global columns
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STMatMode.html b/docs/manualpages/ST/STMatMode.html
index af5b885..646971c 100644
--- a/docs/manualpages/ST/STMatMode.html
+++ b/docs/manualpages/ST/STMatMode.html
@@ -6,8 +6,8 @@
 <TITLE>STMatMode</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatMode.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatMode.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatMode</H1>
 Determines how to handle the coefficient matrix associated to the spectral transformation 
diff --git a/docs/manualpages/ST/STMatMult.html b/docs/manualpages/ST/STMatMult.html
index cf44708..3422024 100644
--- a/docs/manualpages/ST/STMatMult.html
+++ b/docs/manualpages/ST/STMatMult.html
@@ -6,30 +6,30 @@
 <TITLE>STMatMult</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatMult.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatMult.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatMult</H1>
 Computes the matrix-vector product y = T[k] x, where T[k] is the k-th matrix of the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatMult.html#STMatMult">STMatMult</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt k,Vec x,Vec y)
+PetscErrorCode STMatMult(ST st,PetscInt k,Vec x,Vec y)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - index of matrix to use
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - index of matrix to use
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the vector to be multiplied
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the vector to be multiplied
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y </B> - the result
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - the result
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STMatMultTranspose.html b/docs/manualpages/ST/STMatMultTranspose.html
index f068d01..df54729 100644
--- a/docs/manualpages/ST/STMatMultTranspose.html
+++ b/docs/manualpages/ST/STMatMultTranspose.html
@@ -6,30 +6,30 @@
 <TITLE>STMatMultTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatMultTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatMultTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatMultTranspose</H1>
 Computes the matrix-vector product y = T[k]' x, where T[k] is the k-th matrix of the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatMultTranspose.html#STMatMultTranspose">STMatMultTranspose</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt k,Vec x,Vec y)
+PetscErrorCode STMatMultTranspose(ST st,PetscInt k,Vec x,Vec y)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - index of matrix to use
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>k  </B></TD><TD> - index of matrix to use
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the vector to be multiplied
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x  </B></TD><TD> - the vector to be multiplied
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>y </B> - the result
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD> - the result
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STMatSetUp.html b/docs/manualpages/ST/STMatSetUp.html
index 6643b08..524ce07 100644
--- a/docs/manualpages/ST/STMatSetUp.html
+++ b/docs/manualpages/ST/STMatSetUp.html
@@ -6,25 +6,25 @@
 <TITLE>STMatSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatSetUp</H1>
 Build the preconditioner matrix used in <A HREF="../ST/STMatSolve.html#STMatSolve">STMatSolve</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatSetUp.html#STMatSetUp">STMatSetUp</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar sigma,PetscScalar *coeffs)
+PetscErrorCode STMatSetUp(ST st,PetscScalar sigma,PetscScalar *coeffs)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - the shift
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - the shift
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>coeffs </B></TD><TD> - the coefficients (may be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>coeffs </B></TD><TD> - the coefficients (may be NULL)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/ST/STMatSolve.html b/docs/manualpages/ST/STMatSolve.html
index ffadc79..4f58889 100644
--- a/docs/manualpages/ST/STMatSolve.html
+++ b/docs/manualpages/ST/STMatSolve.html
@@ -6,28 +6,28 @@
 <TITLE>STMatSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatSolve</H1>
 Solves P x = b, where P is the preconditioner matrix of the spectral transformation, using a KSP object stored internally. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatSolve.html#STMatSolve">STMatSolve</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec b,Vec x)
+PetscErrorCode STMatSolve(ST st,Vec b,Vec x)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b  </B></TD><TD> - right hand side vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b  </B></TD><TD> - right hand side vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>x </B> - computed solution
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - computed solution
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STMatSolveTranspose.html b/docs/manualpages/ST/STMatSolveTranspose.html
index 5e75ff0..c1b143b 100644
--- a/docs/manualpages/ST/STMatSolveTranspose.html
+++ b/docs/manualpages/ST/STMatSolveTranspose.html
@@ -6,27 +6,27 @@
 <TITLE>STMatSolveTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STMatSolveTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STMatSolveTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STMatSolveTranspose</H1>
 Solves P' x = b, where P is the preconditioner matrix of the spectral transformation, using a KSP object stored internally. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STMatSolveTranspose.html#STMatSolveTranspose">STMatSolveTranspose</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec b,Vec x)
+PetscErrorCode STMatSolveTranspose(ST st,Vec b,Vec x)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
-<DT><B>b  </B> - right hand side vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b  </B></TD><TD> - right hand side vector
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>x </B> - computed solution
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - computed solution
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STPostSolve.html b/docs/manualpages/ST/STPostSolve.html
index 87be428..61732ea 100644
--- a/docs/manualpages/ST/STPostSolve.html
+++ b/docs/manualpages/ST/STPostSolve.html
@@ -6,21 +6,21 @@
 <TITLE>STPostSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STPostSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STPostSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STPostSolve</H1>
 Optional post-solve phase, intended for any actions that must be performed on the <A HREF="../ST/ST.html#ST">ST</A> object after the eigensolver has finished. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STPostSolve.html#STPostSolve">STPostSolve</A>(<A HREF="../ST/ST.html#ST">ST</A> st)
+PetscErrorCode STPostSolve(ST st)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>st  </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STPrecondGetKSPHasMat.html b/docs/manualpages/ST/STPrecondGetKSPHasMat.html
index 7b25a7d..6fad178 100644
--- a/docs/manualpages/ST/STPrecondGetKSPHasMat.html
+++ b/docs/manualpages/ST/STPrecondGetKSPHasMat.html
@@ -6,25 +6,25 @@
 <TITLE>STPrecondGetKSPHasMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STPrecondGetKSPHasMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STPrecondGetKSPHasMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STPrecondGetKSPHasMat</H1>
 Returns the flag indicating if the coefficient matrix of the KSP linear system (A) is set to be the same matrix as the preconditioner (P). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STPrecondGetKSPHasMat.html#STPrecondGetKSPHasMat">STPrecondGetKSPHasMat</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscBool *setmat)
+PetscErrorCode STPrecondGetKSPHasMat(ST st,PetscBool *setmat)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>setmat </B> - the flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>setmat </B></TD><TD> - the flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STPrecondGetMatForPC.html b/docs/manualpages/ST/STPrecondGetMatForPC.html
index c03c2b6..ec42acb 100644
--- a/docs/manualpages/ST/STPrecondGetMatForPC.html
+++ b/docs/manualpages/ST/STPrecondGetMatForPC.html
@@ -6,26 +6,26 @@
 <TITLE>STPrecondGetMatForPC</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STPrecondGetMatForPC.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STPrecondGetMatForPC.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STPrecondGetMatForPC</H1>
 Returns the matrix previously set by <A HREF="../ST/STPrecondSetMatForPC.html#STPrecondSetMatForPC">STPrecondSetMatForPC</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STPrecondGetMatForPC.html#STPrecondGetMatForPC">STPrecondGetMatForPC</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Mat *mat)
+PetscErrorCode STPrecondGetMatForPC(ST st,Mat *mat)
 </PRE>
 Not Collective, but the Mat is shared by all processors that share the <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>mat </B> - the matrix that will be used in constructing the preconditioner or
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix that will be used in constructing the preconditioner or
 NULL if no matrix was set by <A HREF="../ST/STPrecondSetMatForPC.html#STPrecondSetMatForPC">STPrecondSetMatForPC</A>().
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STPrecondSetKSPHasMat.html b/docs/manualpages/ST/STPrecondSetKSPHasMat.html
index a84d5e5..512e393 100644
--- a/docs/manualpages/ST/STPrecondSetKSPHasMat.html
+++ b/docs/manualpages/ST/STPrecondSetKSPHasMat.html
@@ -6,23 +6,23 @@
 <TITLE>STPrecondSetKSPHasMat</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STPrecondSetKSPHasMat.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STPrecondSetKSPHasMat.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STPrecondSetKSPHasMat</H1>
 Sets a flag indicating that during <A HREF="../ST/STSetUp.html#STSetUp">STSetUp</A> the coefficient matrix of the KSP linear system (A) must be set to be the same matrix as the preconditioner (P). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscBool setmat)
+PetscErrorCode STPrecondSetKSPHasMat(ST st,PetscBool setmat)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>setmat </B></TD><TD> - the flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>setmat </B></TD><TD> - the flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STPrecondSetMatForPC.html b/docs/manualpages/ST/STPrecondSetMatForPC.html
index 7b7c685..0df4a60 100644
--- a/docs/manualpages/ST/STPrecondSetMatForPC.html
+++ b/docs/manualpages/ST/STPrecondSetMatForPC.html
@@ -6,23 +6,23 @@
 <TITLE>STPrecondSetMatForPC</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STPrecondSetMatForPC.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STPrecondSetMatForPC.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STPrecondSetMatForPC</H1>
 Sets the matrix that must be used to build the preconditioner. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STPrecondSetMatForPC.html#STPrecondSetMatForPC">STPrecondSetMatForPC</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Mat mat)
+PetscErrorCode STPrecondSetMatForPC(ST st,Mat mat)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix that will be used in constructing the preconditioner
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD> - the matrix that will be used in constructing the preconditioner
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STRegister.html b/docs/manualpages/ST/STRegister.html
index cae1364..303036d 100644
--- a/docs/manualpages/ST/STRegister.html
+++ b/docs/manualpages/ST/STRegister.html
@@ -6,23 +6,23 @@
 <TITLE>STRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STRegister</H1>
 Adds a method to the spectral transformation package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STRegister.html#STRegister">STRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../ST/ST.html#ST">ST</A>))
+PetscErrorCode STRegister(const char *name,PetscErrorCode (*function)(ST))
 </PRE>
 Not collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined transformation
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined transformation
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create method context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create method context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STRegisterAll.html b/docs/manualpages/ST/STRegisterAll.html
index add0f55..e6f82ec 100644
--- a/docs/manualpages/ST/STRegisterAll.html
+++ b/docs/manualpages/ST/STRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>STRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STRegisterAll</H1>
 Registers all of the spectral transformations in the <A HREF="../ST/ST.html#ST">ST</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h"   
-PetscErrorCode <A HREF="../ST/STRegisterAll.html#STRegisterAll">STRegisterAll</A>(void)
+PetscErrorCode STRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/ST/STReset.html b/docs/manualpages/ST/STReset.html
index 8bcbba9..a6ff32b 100644
--- a/docs/manualpages/ST/STReset.html
+++ b/docs/manualpages/ST/STReset.html
@@ -6,21 +6,21 @@
 <TITLE>STReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STReset</H1>
 Resets the <A HREF="../ST/ST.html#ST">ST</A> context and removes any allocated objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STReset.html#STReset">STReset</A>(<A HREF="../ST/ST.html#ST">ST</A> st)
+PetscErrorCode STReset(ST st)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STSHELL.html b/docs/manualpages/ST/STSHELL.html
index 65d742e..d230c59 100644
--- a/docs/manualpages/ST/STSHELL.html
+++ b/docs/manualpages/ST/STSHELL.html
@@ -6,8 +6,8 @@
 <TITLE>STSHELL</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSHELL.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSHELL.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSHELL</H1>
 Creates a new spectral transformation class. This is intended to provide a simple class to use with <A HREF="../EPS/EPS.html#EPS">EPS</A>. You should not use this if you plan to make a complete class. 
diff --git a/docs/manualpages/ST/STScaleShift.html b/docs/manualpages/ST/STScaleShift.html
index e97f89f..85ac28d 100644
--- a/docs/manualpages/ST/STScaleShift.html
+++ b/docs/manualpages/ST/STScaleShift.html
@@ -6,23 +6,23 @@
 <TITLE>STScaleShift</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STScaleShift.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STScaleShift.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STScaleShift</H1>
 Multiply the shift with a given factor. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STScaleShift.html#STScaleShift">STScaleShift</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar factor)
+PetscErrorCode STScaleShift(ST st,PetscScalar factor)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>factor </B></TD><TD> - the scaling factor
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>factor </B></TD><TD> - the scaling factor
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/ST/STSetBalanceMatrix.html b/docs/manualpages/ST/STSetBalanceMatrix.html
index be3e7ce..007c400 100644
--- a/docs/manualpages/ST/STSetBalanceMatrix.html
+++ b/docs/manualpages/ST/STSetBalanceMatrix.html
@@ -6,23 +6,23 @@
 <TITLE>STSetBalanceMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetBalanceMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetBalanceMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetBalanceMatrix</H1>
 Sets the diagonal matrix to be used for balancing. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</A>(<A HREF="../ST/ST.html#ST">ST</A> st,Vec D)
+PetscErrorCode STSetBalanceMatrix(ST st,Vec D)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>D  </B></TD><TD> - the diagonal matrix (represented as a vector)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>D  </B></TD><TD> - the diagonal matrix (represented as a vector)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STSetDefaultShift.html b/docs/manualpages/ST/STSetDefaultShift.html
index 9f5626e..260ccda 100644
--- a/docs/manualpages/ST/STSetDefaultShift.html
+++ b/docs/manualpages/ST/STSetDefaultShift.html
@@ -6,23 +6,23 @@
 <TITLE>STSetDefaultShift</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetDefaultShift.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetDefaultShift.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetDefaultShift</H1>
 Sets the value of the shift that should be employed if the user did not specify one. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar defaultshift)
+PetscErrorCode STSetDefaultShift(ST st,PetscScalar defaultshift)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>defaultshift </B></TD><TD> - the default value of the shift
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>defaultshift </B></TD><TD> - the default value of the shift
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STSetFromOptions.html b/docs/manualpages/ST/STSetFromOptions.html
index ed5fdf7..1d09b16 100644
--- a/docs/manualpages/ST/STSetFromOptions.html
+++ b/docs/manualpages/ST/STSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>STSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetFromOptions</H1>
 Sets <A HREF="../ST/ST.html#ST">ST</A> options from the options database. This routine must be called before <A HREF="../ST/STSetUp.html#STSetUp">STSetUp</A>() if the user is to be allowed to set the type of transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetFromOptions.html#STSetFromOptions">STSetFromOptions</A>(<A HREF="../ST/ST.html#ST">ST</A> st)
+PetscErrorCode STSetFromOptions(ST st)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/st/interface/stset.c.html#STSetFromOptions">src/sys/classes/st/interface/stset.c</A>
diff --git a/docs/manualpages/ST/STSetKSP.html b/docs/manualpages/ST/STSetKSP.html
index bdfcca6..ab651a9 100644
--- a/docs/manualpages/ST/STSetKSP.html
+++ b/docs/manualpages/ST/STSetKSP.html
@@ -6,27 +6,26 @@
 <TITLE>STSetKSP</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetKSP.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetKSP.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetKSP</H1>
 Sets the KSP object associated with the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetKSP.html#STSetKSP">STSetKSP</A>(<A HREF="../ST/ST.html#ST">ST</A> st,KSP ksp)
+PetscErrorCode STSetKSP(ST st,KSP ksp)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp  </B></TD><TD> - the linear system context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp  </B></TD><TD> - the linear system context
 </TD></TR></TABLE>
 <P>
 
-<P>
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/classes/st/interface/stsles.c.html#STSetKSP">src/sys/classes/st/interface/stsles.c</A>
 <BR><A HREF="./index.html">Index of all ST routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
diff --git a/docs/manualpages/ST/STSetMatMode.html b/docs/manualpages/ST/STSetMatMode.html
index 68f4f57..38a9e3c 100644
--- a/docs/manualpages/ST/STSetMatMode.html
+++ b/docs/manualpages/ST/STSetMatMode.html
@@ -6,30 +6,30 @@
 <TITLE>STSetMatMode</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetMatMode.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetMatMode.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetMatMode</H1>
 Sets a flag to indicate how the transformed matrices are being stored in the spectral transformations. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetMatMode.html#STSetMatMode">STSetMatMode</A>(<A HREF="../ST/ST.html#ST">ST</A> st,<A HREF="../ST/STMatMode.html#STMatMode">STMatMode</A> mode)
+PetscErrorCode STSetMatMode(ST st,STMatMode mode)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mode </B></TD><TD> - the mode flag, one of ST_MATMODE_COPY,
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mode </B></TD><TD> - the mode flag, one of ST_MATMODE_COPY,
 ST_MATMODE_INPLACE, or ST_MATMODE_SHELL
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-st_matmode <mode> </B> - Indicates the mode flag, where <mode> is one of
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-st_matmode <mode> </B></TD><TD> - Indicates the mode flag, where <mode> is one of
 'copy', 'inplace', 'shell' (see explanation below).
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default (ST_MATMODE_COPY), a copy of matrix A is made and then
@@ -58,4 +58,6 @@ can be controlled with <A HREF="../ST/STSetMatStructure.html#STSetMatStructure">
 <BR><A HREF="./index.html">Index of all ST routines</A>
 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
+<P><H3><FONT COLOR="#883300">Examples</FONT></H3>
+<A HREF="../../../src/pep/examples/tutorials/ex28.c.html">src/pep/examples/tutorials/ex28.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/ST/STSetMatStructure.html b/docs/manualpages/ST/STSetMatStructure.html
index ae45a2a..d5d0b32 100644
--- a/docs/manualpages/ST/STSetMatStructure.html
+++ b/docs/manualpages/ST/STSetMatStructure.html
@@ -6,32 +6,32 @@
 <TITLE>STSetMatStructure</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetMatStructure.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetMatStructure.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetMatStructure</H1>
 Sets an internal MatStructure attribute to indicate which is the relation of the sparsity pattern of all <A HREF="../ST/ST.html#ST">ST</A> matrices. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetMatStructure.html#STSetMatStructure">STSetMatStructure</A>(<A HREF="../ST/ST.html#ST">ST</A> st,MatStructure str)
+PetscErrorCode STSetMatStructure(ST st,MatStructure str)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN or
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN or
 SUBSET_NONZERO_PATTERN
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-st_matstructure <str> </B> - Indicates the structure flag, where <str> is one
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-st_matstructure <str> </B></TD><TD> - Indicates the structure flag, where <str> is one
 of 'same' (matrices have the same nonzero pattern), 'different'
 (different nonzero pattern) or 'subset' (pattern is a subset of the
 first one).
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default, the sparsity patterns are assumed to be different. If the
diff --git a/docs/manualpages/ST/STSetOperators.html b/docs/manualpages/ST/STSetOperators.html
index 0b1b4ef..0545b5e 100644
--- a/docs/manualpages/ST/STSetOperators.html
+++ b/docs/manualpages/ST/STSetOperators.html
@@ -6,25 +6,25 @@
 <TITLE>STSetOperators</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetOperators.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetOperators.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetOperators</H1>
 Sets the matrices associated with the eigenvalue problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetOperators.html#STSetOperators">STSetOperators</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscInt n,Mat A[])
+PetscErrorCode STSetOperators(ST st,PetscInt n,Mat A[])
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of matrices in array A
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n  </B></TD><TD> - number of matrices in array A
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the array of matrices associated with the eigensystem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the array of matrices associated with the eigensystem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STSetOptionsPrefix.html b/docs/manualpages/ST/STSetOptionsPrefix.html
index 59c4950..6ccca2d 100644
--- a/docs/manualpages/ST/STSetOptionsPrefix.html
+++ b/docs/manualpages/ST/STSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>STSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../ST/ST.html#ST">ST</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</A>(<A HREF="../ST/ST.html#ST">ST</A> st,const char *prefix)
+PetscErrorCode STSetOptionsPrefix(ST st,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../ST/ST.html#ST">ST</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../ST/ST.html#ST">ST</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STSetShift.html b/docs/manualpages/ST/STSetShift.html
index 88728b3..bc3cff6 100644
--- a/docs/manualpages/ST/STSetShift.html
+++ b/docs/manualpages/ST/STSetShift.html
@@ -6,23 +6,23 @@
 <TITLE>STSetShift</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetShift.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetShift.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetShift</H1>
 Sets the shift associated with the spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetShift.html#STSetShift">STSetShift</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscScalar shift)
+PetscErrorCode STSetShift(ST st,PetscScalar shift)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shift </B></TD><TD> - the value of the shift
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>shift </B></TD><TD> - the value of the shift
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/ST/STSetTransform.html b/docs/manualpages/ST/STSetTransform.html
index cfa5454..4a8d467 100644
--- a/docs/manualpages/ST/STSetTransform.html
+++ b/docs/manualpages/ST/STSetTransform.html
@@ -6,28 +6,28 @@
 <TITLE>STSetTransform</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetTransform.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetTransform.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetTransform</H1>
 Sets a flag to indicate whether the transformed matrices are computed or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetTransform.html#STSetTransform">STSetTransform</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscBool flg)
+PetscErrorCode STSetTransform(ST st,PetscBool flg)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st  </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the boolean flag
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flg </B></TD><TD> - the boolean flag
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-st_transform <bool> </B> - Activate/deactivate the computation of matrices.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-st_transform <bool> </B></TD><TD> - Activate/deactivate the computation of matrices.
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This flag is intended for the case of polynomial eigenproblems solved
diff --git a/docs/manualpages/ST/STSetType.html b/docs/manualpages/ST/STSetType.html
index f85f041..7113eda 100644
--- a/docs/manualpages/ST/STSetType.html
+++ b/docs/manualpages/ST/STSetType.html
@@ -6,28 +6,28 @@
 <TITLE>STSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetType</H1>
 Builds <A HREF="../ST/ST.html#ST">ST</A> for a particular spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetType.html#STSetType">STSetType</A>(<A HREF="../ST/ST.html#ST">ST</A> st,<A HREF="../ST/STType.html#STType">STType</A> type)
+PetscErrorCode STSetType(ST st,STType type)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context.
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - a known type
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-st_type <type> </B> - Sets <A HREF="../ST/ST.html#ST">ST</A> type
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-st_type <type> </B></TD><TD> - Sets <A HREF="../ST/ST.html#ST">ST</A> type
+</TD></TR></TABLE>
 <P>
 Use -help for a list of available transformations
 <P>
diff --git a/docs/manualpages/ST/STSetUp.html b/docs/manualpages/ST/STSetUp.html
index dcbe9e1..a1b4e0d 100644
--- a/docs/manualpages/ST/STSetUp.html
+++ b/docs/manualpages/ST/STSetUp.html
@@ -6,21 +6,21 @@
 <TITLE>STSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STSetUp</H1>
 Prepares for the use of a spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STSetUp.html#STSetUp">STSetUp</A>(<A HREF="../ST/ST.html#ST">ST</A> st)
+PetscErrorCode STSetUp(ST st)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - the spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the spectral transformation context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STShellGetContext.html b/docs/manualpages/ST/STShellGetContext.html
index 692702c..5e1dc4a 100644
--- a/docs/manualpages/ST/STShellGetContext.html
+++ b/docs/manualpages/ST/STShellGetContext.html
@@ -6,25 +6,25 @@
 <TITLE>STShellGetContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STShellGetContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STShellGetContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STShellGetContext</H1>
 Returns the user-provided context associated with a shell <A HREF="../ST/ST.html#ST">ST</A> 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STShellGetContext.html#STShellGetContext">STShellGetContext</A>(<A HREF="../ST/ST.html#ST">ST</A> st,void **ctx)
+PetscErrorCode STShellGetContext(ST st,void **ctx)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>st </B> - spectral transformation context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - spectral transformation context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ctx </B> - the user provided context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - the user provided context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/ST/STShellSetApply.html b/docs/manualpages/ST/STShellSetApply.html
index 9bed768..4e3b0da 100644
--- a/docs/manualpages/ST/STShellSetApply.html
+++ b/docs/manualpages/ST/STShellSetApply.html
@@ -6,23 +6,23 @@
 <TITLE>STShellSetApply</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STShellSetApply.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STShellSetApply.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STShellSetApply</H1>
 Sets routine to use as the application of the operator to a vector in the user-defined spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STShellSetApply.html#STShellSetApply">STShellSetApply</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscErrorCode (*apply)(<A HREF="../ST/ST.html#ST">ST</A>,Vec,Vec))
+PetscErrorCode STShellSetApply(ST st,PetscErrorCode (*apply)(ST,Vec,Vec))
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st    </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st    </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>apply </B></TD><TD> - the application-provided transformation routine
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>apply </B></TD><TD> - the application-provided transformation routine
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling sequence of apply</FONT></H3>
@@ -32,11 +32,11 @@ Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xin  </B></TD><TD> - input vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xin  </B></TD><TD> - input vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xout </B></TD><TD> - output vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xout </B></TD><TD> - output vector
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STShellSetApplyTranspose.html b/docs/manualpages/ST/STShellSetApplyTranspose.html
index cebd994..de44970 100644
--- a/docs/manualpages/ST/STShellSetApplyTranspose.html
+++ b/docs/manualpages/ST/STShellSetApplyTranspose.html
@@ -6,23 +6,23 @@
 <TITLE>STShellSetApplyTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STShellSetApplyTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STShellSetApplyTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STShellSetApplyTranspose</H1>
 Sets routine to use as the application of the transposed operator to a vector in the user-defined spectral transformation. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STShellSetApplyTranspose.html#STShellSetApplyTranspose">STShellSetApplyTranspose</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscErrorCode (*applytrans)(<A HREF="../ST/ST.html#ST">ST</A>,Vec,Vec))
+PetscErrorCode STShellSetApplyTranspose(ST st,PetscErrorCode (*applytrans)(ST,Vec,Vec))
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st    </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st    </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>applytrans </B></TD><TD> - the application-provided transformation routine
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>applytrans </B></TD><TD> - the application-provided transformation routine
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling sequence of apply</FONT></H3>
@@ -32,11 +32,11 @@ Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xin  </B></TD><TD> - input vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xin  </B></TD><TD> - input vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xout </B></TD><TD> - output vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xout </B></TD><TD> - output vector
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STShellSetBackTransform.html b/docs/manualpages/ST/STShellSetBackTransform.html
index 850a107..16da2e7 100644
--- a/docs/manualpages/ST/STShellSetBackTransform.html
+++ b/docs/manualpages/ST/STShellSetBackTransform.html
@@ -6,23 +6,23 @@
 <TITLE>STShellSetBackTransform</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STShellSetBackTransform.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STShellSetBackTransform.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STShellSetBackTransform</H1>
 Sets the routine to be called after the eigensolution process has finished in order to transform back the computed eigenvalues. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STShellSetBackTransform.html#STShellSetBackTransform">STShellSetBackTransform</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscErrorCode (*backtr)(<A HREF="../ST/ST.html#ST">ST</A>,PetscInt,PetscScalar*,PetscScalar*))
+PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*))
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st     </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>backtr </B></TD><TD> - the application-provided backtransform routine
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>backtr </B></TD><TD> - the application-provided backtransform routine
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Calling sequence of backtr</FONT></H3>
@@ -32,11 +32,11 @@ Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st   </B></TD><TD> - the spectral transformation context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - pointer ot the real part of the eigenvalue to transform back
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - pointer ot the real part of the eigenvalue to transform back
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - pointer ot the imaginary part
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - pointer ot the imaginary part
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/ST/STShellSetContext.html b/docs/manualpages/ST/STShellSetContext.html
index 2160e20..74db6da 100644
--- a/docs/manualpages/ST/STShellSetContext.html
+++ b/docs/manualpages/ST/STShellSetContext.html
@@ -6,29 +6,31 @@
 <TITLE>STShellSetContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STShellSetContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STShellSetContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STShellSetContext</H1>
 Sets the context for a shell <A HREF="../ST/ST.html#ST">ST</A> 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STShellSetContext.html#STShellSetContext">STShellSetContext</A>(<A HREF="../ST/ST.html#ST">ST</A> st,void *ctx)
+PetscErrorCode STShellSetContext(ST st,void *ctx)
 </PRE>
 Logically Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the shell <A HREF="../ST/ST.html#ST">ST</A>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the shell <A HREF="../ST/ST.html#ST">ST</A>
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - the context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - the context
 </TD></TR></TABLE>
 <P>
 
 <P>
-Fortran Notes: The context can only be an integer or a PetscObject;
-unfortunately it cannot be a Fortran array or derived type.
+<H3><FONT COLOR="#883300">Fortran Notes</FONT></H3>
+To use this from Fortran you must write a Fortran interface definition
+for this function that tells Fortran the Fortran derived data type that
+you are passing in as the ctx argument.
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
  <A HREF="../ST/STShellGetContext.html#STShellGetContext">STShellGetContext</A>()
diff --git a/docs/manualpages/ST/STType.html b/docs/manualpages/ST/STType.html
index 58bc503..be670dc 100644
--- a/docs/manualpages/ST/STType.html
+++ b/docs/manualpages/ST/STType.html
@@ -6,8 +6,8 @@
 <TITLE>STType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STType</H1>
 String with the name of a SLEPc spectral transformation 
diff --git a/docs/manualpages/ST/STView.html b/docs/manualpages/ST/STView.html
index 648a871..71788bf 100644
--- a/docs/manualpages/ST/STView.html
+++ b/docs/manualpages/ST/STView.html
@@ -6,31 +6,31 @@
 <TITLE>STView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/STView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/STView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>STView</H1>
 Prints the <A HREF="../ST/ST.html#ST">ST</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcst.h" 
-PetscErrorCode <A HREF="../ST/STView.html#STView">STView</A>(<A HREF="../ST/ST.html#ST">ST</A> st,PetscViewer viewer)
+PetscErrorCode STView(ST st,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../ST/ST.html#ST">ST</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the <A HREF="../ST/ST.html#ST">ST</A> context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>st </B></TD><TD> - the <A HREF="../ST/ST.html#ST">ST</A> context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/ST/index.html b/docs/manualpages/ST/index.html
index f5e496d..3ff687f 100644
--- a/docs/manualpages/ST/index.html
+++ b/docs/manualpages/ST/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/ST/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/ST/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
@@ -28,15 +28,15 @@ ST options can also be set directly in application codes by first extracting the
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./STCreate.html">STCreate</A></TD>
+ <TD WIDTH=250><A HREF="./ST.html">ST</A></TD>
  <TD WIDTH=250><A HREF="./STSetFromOptions.html">STSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./STView.html">STView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./STDestroy.html">STDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./STCreate.html">STCreate</A></TD>
  <TD WIDTH=250><A HREF="./STSetType.html">STSetType</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./ST.html">ST</A></TD>
+ <TD WIDTH=250><A HREF="./STDestroy.html">STDestroy</A></TD>
  <TD WIDTH=250><A HREF="./STType.html">STType</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
@@ -59,31 +59,31 @@ ST options can also be set directly in application codes by first extracting the
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./STAppendOptionsPrefix.html">STAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./STRegister.html">STRegister</A></TD>
- <TD WIDTH=250><A HREF="./STSHELL.html">STSHELL</A></TD>
+ <TD WIDTH=250><A HREF="./STRegisterAll.html">STRegisterAll</A></TD>
+ <TD WIDTH=250><A HREF="./STShellGetContext.html">STShellGetContext</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./STComputeExplicitOperator.html">STComputeExplicitOperator</A></TD>
  <TD WIDTH=250><A HREF="./STReset.html">STReset</A></TD>
  <TD WIDTH=250><A HREF="./STShellSetApply.html">STShellSetApply</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./STGetMatStructure.html">STGetMatStructure</A></TD>
- <TD WIDTH=250><A HREF="./STSetKSP.html">STSetKSP</A></TD>
+ <TD WIDTH=250><A HREF="./STSHELL.html">STSHELL</A></TD>
  <TD WIDTH=250><A HREF="./STShellSetApplyTranspose.html">STShellSetApplyTranspose</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./STGetOptionsPrefix.html">STGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./STSetMatStructure.html">STSetMatStructure</A></TD>
+ <TD WIDTH=250><A HREF="./STSetKSP.html">STSetKSP</A></TD>
  <TD WIDTH=250><A HREF="./STShellSetBackTransform.html">STShellSetBackTransform</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./STPrecondGetMatForPC.html">STPrecondGetMatForPC</A></TD>
- <TD WIDTH=250><A HREF="./STSetOptionsPrefix.html">STSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./STSetMatStructure.html">STSetMatStructure</A></TD>
  <TD WIDTH=250><A HREF="./STShellSetContext.html">STShellSetContext</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./STPrecondSetMatForPC.html">STPrecondSetMatForPC</A></TD>
- <TD WIDTH=250><A HREF="./STSetUp.html">STSetUp</A></TD>
+ <TD WIDTH=250><A HREF="./STSetOptionsPrefix.html">STSetOptionsPrefix</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./STRegisterAll.html">STRegisterAll</A></TD>
- <TD WIDTH=250><A HREF="./STShellGetContext.html">STShellGetContext</A></TD>
+ <TD WIDTH=250><A HREF="./STRegister.html">STRegister</A></TD>
+ <TD WIDTH=250><A HREF="./STSetUp.html">STSetUp</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
diff --git a/docs/manualpages/SVD/SVD.html b/docs/manualpages/SVD/SVD.html
index f266428..b1689a8 100644
--- a/docs/manualpages/SVD/SVD.html
+++ b/docs/manualpages/SVD/SVD.html
@@ -6,8 +6,8 @@
 <TITLE>SVD</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVD.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVD.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVD</H1>
 Abstract SLEPc object that manages all the singular value problem solvers. 
diff --git a/docs/manualpages/SVD/SVDAllocateSolution.html b/docs/manualpages/SVD/SVDAllocateSolution.html
index ac7fb89..d75ddd3 100644
--- a/docs/manualpages/SVD/SVDAllocateSolution.html
+++ b/docs/manualpages/SVD/SVDAllocateSolution.html
@@ -6,23 +6,23 @@
 <TITLE>SVDAllocateSolution</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDAllocateSolution.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDAllocateSolution</H1>
 Allocate memory storage for common variables such as the singular values and the basis vectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt extra)
+PetscErrorCode SVDAllocateSolution(SVD svd,PetscInt extra)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - eigensolver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - eigensolver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>extra </B></TD><TD> - number of additional positions, used for methods that require a
 working basis slightly larger than ncv
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/SVD/SVDAppendOptionsPrefix.html b/docs/manualpages/SVD/SVDAppendOptionsPrefix.html
index 5aee48a..8e6db5b 100644
--- a/docs/manualpages/SVD/SVDAppendOptionsPrefix.html
+++ b/docs/manualpages/SVD/SVDAppendOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>SVDAppendOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDAppendOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDAppendOptionsPrefix</H1>
 Appends to the prefix used for searching for all <A HREF="../SVD/SVD.html#SVD">SVD</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,const char *prefix)
+PetscErrorCode SVDAppendOptionsPrefix(SVD svd,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../SVD/SVD.html#SVD">SVD</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../SVD/SVD.html#SVD">SVD</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDComputeError.html b/docs/manualpages/SVD/SVDComputeError.html
index e8a1675..4a705f6 100644
--- a/docs/manualpages/SVD/SVDComputeError.html
+++ b/docs/manualpages/SVD/SVDComputeError.html
@@ -6,30 +6,30 @@
 <TITLE>SVDComputeError</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDComputeError.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDComputeError.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDComputeError</H1>
 Computes the error (based on the residual norm) associated with the i-th singular triplet. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt i,<A HREF="../SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</A> type,PetscReal *error)
+PetscErrorCode SVDComputeError(SVD svd,PetscInt i,SVDErrorType type,PetscReal *error)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i    </B></TD><TD> - the solution index
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type </B></TD><TD> - the type of error to compute
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>error </B> - the error
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>error </B></TD><TD> - the error
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 The error can be computed in various ways, all of them based on the residual
diff --git a/docs/manualpages/SVD/SVDConv.html b/docs/manualpages/SVD/SVDConv.html
new file mode 100644
index 0000000..300aca6
--- /dev/null
+++ b/docs/manualpages/SVD/SVDConv.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDConv.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDConv</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDConv.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDConv</H1>
+Determines the convergence test 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { SVD_CONV_ABS,
+               SVD_CONV_REL,
+               SVD_CONV_USER } <A HREF="../SVD/SVDConv.html#SVDConv">SVDConv</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</A>(), <A HREF="../SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/../../include/slepcsvd.h.html#SVDConv">src/svd/../../include/slepcsvd.h</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html b/docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html
new file mode 100644
index 0000000..1c7daff
--- /dev/null
+++ b/docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDConvMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDConvMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user (for monitors that only show iteration numbers of convergence). 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDConvMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor))
+</PRE>
+Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - the singular value solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a SlepcConvMonitor
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>(), <A HREF="../SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDConvMonitorSetFromOptions">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDConvergedReason.html b/docs/manualpages/SVD/SVDConvergedReason.html
index 4855683..f812269 100644
--- a/docs/manualpages/SVD/SVDConvergedReason.html
+++ b/docs/manualpages/SVD/SVDConvergedReason.html
@@ -6,18 +6,19 @@
 <TITLE>SVDConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDConvergedReason</H1>
 Reason a singular value solver was said to have converged or diverged 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 typedef enum {/* converged */
-              SVD_CONVERGED_TOL                =  2,
+              SVD_CONVERGED_TOL                =  1,
+              SVD_CONVERGED_USER               =  2,
               /* diverged */
-              SVD_DIVERGED_ITS                 = -3,
-              SVD_DIVERGED_BREAKDOWN           = -4,
+              SVD_DIVERGED_ITS                 = -1,
+              SVD_DIVERGED_BREAKDOWN           = -2,
               SVD_CONVERGED_ITERATING          =  0 } <A HREF="../SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</A>;
 </PRE>
 
diff --git a/docs/manualpages/SVD/SVDCreate.html b/docs/manualpages/SVD/SVDCreate.html
index 3e3685f..060059b 100644
--- a/docs/manualpages/SVD/SVDCreate.html
+++ b/docs/manualpages/SVD/SVDCreate.html
@@ -6,25 +6,25 @@
 <TITLE>SVDCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCreate</H1>
 Creates the default <A HREF="../SVD/SVD.html#SVD">SVD</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>(MPI_Comm comm,<A HREF="../SVD/SVD.html#SVD">SVD</A> *outsvd)
+PetscErrorCode SVDCreate(MPI_Comm comm,SVD *outsvd)
 </PRE>
 Collective on MPI_Comm
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>comm </B> - MPI communicator
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - MPI communicator
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>svd </B> - location to put the <A HREF="../SVD/SVD.html#SVD">SVD</A> context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - location to put the <A HREF="../SVD/SVD.html#SVD">SVD</A> context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The default <A HREF="../SVD/SVD.html#SVD">SVD</A> type is SVDCROSS
diff --git a/docs/manualpages/SVD/SVDCrossGetEPS.html b/docs/manualpages/SVD/SVDCrossGetEPS.html
index 096265b..5d706df 100644
--- a/docs/manualpages/SVD/SVDCrossGetEPS.html
+++ b/docs/manualpages/SVD/SVDCrossGetEPS.html
@@ -6,8 +6,8 @@
 <TITLE>SVDCrossGetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCrossGetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCrossGetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCrossGetEPS</H1>
 Retrieve the eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) associated to the singular value solver. 
@@ -15,17 +15,17 @@ Retrieve the eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) associat
 <PRE>
 #include "slepcsvd.h" 
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../EPS/EPS.html#EPS">EPS</A> *eps)
+PetscErrorCode SVDCrossGetEPS(SVD svd,EPS *eps)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver object
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDCrossSetEPS.html b/docs/manualpages/SVD/SVDCrossSetEPS.html
index 97d48ea..fe0cf6b 100644
--- a/docs/manualpages/SVD/SVDCrossSetEPS.html
+++ b/docs/manualpages/SVD/SVDCrossSetEPS.html
@@ -6,8 +6,8 @@
 <TITLE>SVDCrossSetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCrossSetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCrossSetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCrossSetEPS</H1>
 Associate an eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) to the singular value solver. 
@@ -15,15 +15,15 @@ Associate an eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) to the s
 <PRE>
 #include "slepcsvd.h" 
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode SVDCrossSetEPS(SVD svd,EPS eps)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDCyclicGetEPS.html b/docs/manualpages/SVD/SVDCyclicGetEPS.html
index be0e2b9..3856c36 100644
--- a/docs/manualpages/SVD/SVDCyclicGetEPS.html
+++ b/docs/manualpages/SVD/SVDCyclicGetEPS.html
@@ -6,8 +6,8 @@
 <TITLE>SVDCyclicGetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCyclicGetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCyclicGetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCyclicGetEPS</H1>
 Retrieve the eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) associated to the singular value solver. 
@@ -15,17 +15,17 @@ Retrieve the eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) associat
 <PRE>
 #include "slepcsvd.h" 
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../EPS/EPS.html#EPS">EPS</A> *eps)
+PetscErrorCode SVDCyclicGetEPS(SVD svd,EPS *eps)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>eps </B> - the eigensolver object
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html b/docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html
index 6e9c251..3542e10 100644
--- a/docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html
+++ b/docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html
@@ -6,8 +6,8 @@
 <TITLE>SVDCyclicGetExplicitMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCyclicGetExplicitMatrix</H1>
 Returns the flag indicating if H(A) is built explicitly 
@@ -15,17 +15,17 @@ Returns the flag indicating if H(A) is built explicitly
 <PRE>
 #include "slepcsvd.h" 
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool *explicitmatrix)
+PetscErrorCode SVDCyclicGetExplicitMatrix(SVD svd,PetscBool *explicitmatrix)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd  </B> - singular value solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - singular value solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>explicit </B> - the mode flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>explicit </B></TD><TD> - the mode flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDCyclicSetEPS.html b/docs/manualpages/SVD/SVDCyclicSetEPS.html
index b909001..72d43f4 100644
--- a/docs/manualpages/SVD/SVDCyclicSetEPS.html
+++ b/docs/manualpages/SVD/SVDCyclicSetEPS.html
@@ -6,8 +6,8 @@
 <TITLE>SVDCyclicSetEPS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCyclicSetEPS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCyclicSetEPS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCyclicSetEPS</H1>
 Associate an eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) to the singular value solver. 
@@ -15,15 +15,15 @@ Associate an eigensolver object (<A HREF="../EPS/EPS.html#EPS">EPS</A>) to the s
 <PRE>
 #include "slepcsvd.h" 
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../EPS/EPS.html#EPS">EPS</A> eps)
+PetscErrorCode SVDCyclicSetEPS(SVD svd,EPS eps)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver object
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html b/docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html
index b969006..0e33a6f 100644
--- a/docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html
+++ b/docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html
@@ -6,8 +6,8 @@
 <TITLE>SVDCyclicSetExplicitMatrix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDCyclicSetExplicitMatrix</H1>
 Indicate if the eigensolver operator H(A) = [ 0  A ; A^T 0 ] must be computed explicitly. 
@@ -15,20 +15,20 @@ Indicate if the eigensolver operator H(A) = [ 0  A ; A^T 0 ] must be computed ex
 <PRE>
 #include "slepcsvd.h" 
 #include "slepceps.h" 
-PetscErrorCode <A HREF="../SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool explicitmatrix)
+PetscErrorCode SVDCyclicSetExplicitMatrix(SVD svd,PetscBool explicitmatrix)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - singular value solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - singular value solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>explicit </B></TD><TD> - boolean flag indicating if H(A) is built explicitly
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>explicit </B></TD><TD> - boolean flag indicating if H(A) is built explicitly
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_cyclic_explicitmatrix <boolean> </B> - Indicates the boolean flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_cyclic_explicitmatrix <boolean> </B></TD><TD> - Indicates the boolean flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDDestroy.html b/docs/manualpages/SVD/SVDDestroy.html
index e3743db..ba31627 100644
--- a/docs/manualpages/SVD/SVDDestroy.html
+++ b/docs/manualpages/SVD/SVDDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>SVDDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDDestroy</H1>
 Destroys the <A HREF="../SVD/SVD.html#SVD">SVD</A> context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> *svd)
+PetscErrorCode SVDDestroy(SVD *svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDErrorType.html b/docs/manualpages/SVD/SVDErrorType.html
index 10bca6e..2f2f6ef 100644
--- a/docs/manualpages/SVD/SVDErrorType.html
+++ b/docs/manualpages/SVD/SVDErrorType.html
@@ -6,8 +6,8 @@
 <TITLE>SVDErrorType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDErrorType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDErrorType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDErrorType</H1>
 The error type used to assess accuracy of computed solutions 
diff --git a/docs/manualpages/SVD/SVDErrorView.html b/docs/manualpages/SVD/SVDErrorView.html
index 358d28b..cffe21d 100644
--- a/docs/manualpages/SVD/SVDErrorView.html
+++ b/docs/manualpages/SVD/SVDErrorView.html
@@ -6,32 +6,32 @@
 <TITLE>SVDErrorView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDErrorView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDErrorView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDErrorView</H1>
 Displays the errors associated with the computed solution (as well as the singular values). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</A> etype,PetscViewer viewer)
+PetscErrorCode SVDErrorView(SVD svd,SVDErrorType etype,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>etype  </B></TD><TD> - error type
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_absolute </B></TD><TD> - print absolute errors of each singular triplet
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_absolute </B></TD><TD> - print absolute errors of each singular triplet
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_relative </B></TD><TD> - print relative errors of each singular triplet
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_relative </B></TD><TD> - print relative errors of each singular triplet
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDErrorViewFromOptions.html b/docs/manualpages/SVD/SVDErrorViewFromOptions.html
index 462950c..a5138b0 100644
--- a/docs/manualpages/SVD/SVDErrorViewFromOptions.html
+++ b/docs/manualpages/SVD/SVDErrorViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>SVDErrorViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDErrorViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDErrorViewFromOptions</H1>
 Processes command line options to determine if/how the errors of the computed solution are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDErrorViewFromOptions(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdview.c.html#SVDErrorViewFromOptions">src/svd/interface/svdview.c</A>
diff --git a/docs/manualpages/SVD/SVDFinalizePackage.html b/docs/manualpages/SVD/SVDFinalizePackage.html
index a3852d4..ce1cb07 100644
--- a/docs/manualpages/SVD/SVDFinalizePackage.html
+++ b/docs/manualpages/SVD/SVDFinalizePackage.html
@@ -6,14 +6,14 @@
 <TITLE>SVDFinalizePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDFinalizePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDFinalizePackage</H1>
 This function destroys everything in the Slepc interface to the <A HREF="../SVD/SVD.html#SVD">SVD</A> package. It is called from <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../SVD/SVDFinalizePackage.html#SVDFinalizePackage">SVDFinalizePackage</A>(void)
+PetscErrorCode SVDFinalizePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetBV.html b/docs/manualpages/SVD/SVDGetBV.html
index 1b6f462..cd32187 100644
--- a/docs/manualpages/SVD/SVDGetBV.html
+++ b/docs/manualpages/SVD/SVDGetBV.html
@@ -6,27 +6,27 @@
 <TITLE>SVDGetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetBV</H1>
 Obtain the basis vectors objects associated to the singular value solver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../BV/BV.html#BV">BV</A> *V,<A HREF="../BV/BV.html#BV">BV</A> *U)
+PetscErrorCode SVDGetBV(SVD svd,BV *V,BV *U)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context for right singular vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - basis vectors context for right singular vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>U </B></TD><TD> - basis vectors context for left singular vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>U </B></TD><TD> - basis vectors context for left singular vectors
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDGetConverged.html b/docs/manualpages/SVD/SVDGetConverged.html
index d8f0fae..c686e93 100644
--- a/docs/manualpages/SVD/SVDGetConverged.html
+++ b/docs/manualpages/SVD/SVDGetConverged.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetConverged</H1>
 Gets the number of converged singular values. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt *nconv)
+PetscErrorCode SVDGetConverged(SVD svd,PetscInt *nconv)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>nconv </B> - number of converged singular values
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv </B></TD><TD> - number of converged singular values
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 This function should be called after <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>() has finished.
diff --git a/docs/manualpages/SVD/SVDGetConvergedReason.html b/docs/manualpages/SVD/SVDGetConvergedReason.html
index 7987016..2c66fac 100644
--- a/docs/manualpages/SVD/SVDGetConvergedReason.html
+++ b/docs/manualpages/SVD/SVDGetConvergedReason.html
@@ -6,39 +6,42 @@
 <TITLE>SVDGetConvergedReason</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetConvergedReason</H1>
 Gets the reason why the <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>() iteration was stopped. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</A> *reason)
+PetscErrorCode SVDGetConvergedReason(SVD svd,SVDConvergedReason *reason)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>reason </B> - negative value indicates diverged, positive value converged
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - negative value indicates diverged, positive value converged
 (see <A HREF="../SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</A>)
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values for reason</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_CONVERGED_TOL </B></TD><TD> - converged up to tolerance
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_CONVERGED_USER </B></TD><TD> - converged due to a user-defined condition
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_DIVERGED_ITS </B></TD><TD> - required more than its to reach convergence
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_DIVERGED_ITS </B></TD><TD> - required more than max_it iterations to reach convergence
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_DIVERGED_BREAKDOWN </B></TD><TD> - generic breakdown in method
 </TD></TR></TABLE>
 <P>
-
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+Can only be called after the call to <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>() is complete.
 <P>
-Notes: Can only be called after the call to <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>() is complete.
+
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
  <A HREF="../SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</A>(), <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>(), <A HREF="../SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</A>
diff --git a/docs/manualpages/SVD/SVDGetConvergenceTest.html b/docs/manualpages/SVD/SVDGetConvergenceTest.html
new file mode 100644
index 0000000..4eb8711
--- /dev/null
+++ b/docs/manualpages/SVD/SVDGetConvergenceTest.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDGetConvergenceTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDGetConvergenceTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDGetConvergenceTest</H1>
+Gets the method used to compute the error estimate used in the convergence test. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDGetConvergenceTest(SVD svd,SVDConv *conv)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv  </B></TD><TD> - the type of convergence test
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</A>(), <A HREF="../SVD/SVDConv.html#SVDConv">SVDConv</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDGetConvergenceTest">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDGetDS.html b/docs/manualpages/SVD/SVDGetDS.html
index 55df2cc..73e0e41 100644
--- a/docs/manualpages/SVD/SVDGetDS.html
+++ b/docs/manualpages/SVD/SVDGetDS.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetDS</H1>
 Obtain the direct solver object associated to the singular value solver object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../DS/DS.html#DS">DS</A> *ds)
+PetscErrorCode SVDGetDS(SVD svd,DS *ds)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ds </B> - direct solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds </B></TD><TD> - direct solver context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetDimensions.html b/docs/manualpages/SVD/SVDGetDimensions.html
index e64df4c..5467e03 100644
--- a/docs/manualpages/SVD/SVDGetDimensions.html
+++ b/docs/manualpages/SVD/SVDGetDimensions.html
@@ -6,29 +6,29 @@
 <TITLE>SVDGetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetDimensions</H1>
 Gets the number of singular values to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)
+PetscErrorCode SVDGetDimensions(SVD svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsv </B></TD><TD> - number of singular values to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsv </B></TD><TD> - number of singular values to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDGetImplicitTranspose.html b/docs/manualpages/SVD/SVDGetImplicitTranspose.html
index 2de6f96..bdff505 100644
--- a/docs/manualpages/SVD/SVDGetImplicitTranspose.html
+++ b/docs/manualpages/SVD/SVDGetImplicitTranspose.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetImplicitTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetImplicitTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetImplicitTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetImplicitTranspose</H1>
 Gets the mode used to handle the transpose of the matrix associated with the singular value problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool *impl)
+PetscErrorCode SVDGetImplicitTranspose(SVD svd,PetscBool *impl)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd  </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Output paramter</FONT></H3>
-<DT><B>impl </B> - how to handle the transpose (implicitly or not)
-<br>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>impl </B></TD><TD> - how to handle the transpose (implicitly or not)
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetIterationNumber.html b/docs/manualpages/SVD/SVDGetIterationNumber.html
index 7de801c..de5b113 100644
--- a/docs/manualpages/SVD/SVDGetIterationNumber.html
+++ b/docs/manualpages/SVD/SVDGetIterationNumber.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetIterationNumber</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetIterationNumber.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetIterationNumber</H1>
 Gets the current iteration number. If the call to <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>() is complete, then it returns the number of iterations carried out by the solution method. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt *its)
+PetscErrorCode SVDGetIterationNumber(SVD svd,PetscInt *its)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>its </B> - number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetMonitorContext.html b/docs/manualpages/SVD/SVDGetMonitorContext.html
index 5fa423f..df8940b 100644
--- a/docs/manualpages/SVD/SVDGetMonitorContext.html
+++ b/docs/manualpages/SVD/SVDGetMonitorContext.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetMonitorContext</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetMonitorContext.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetMonitorContext</H1>
 Gets the monitor context, as set by <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>() for the FIRST monitor only. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetMonitorContext.html#SVDGetMonitorContext">SVDGetMonitorContext</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,void **ctx)
+PetscErrorCode SVDGetMonitorContext(SVD svd,void **ctx)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>ctx </B> - monitor context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - monitor context
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetOperator.html b/docs/manualpages/SVD/SVDGetOperator.html
index c456371..7dc93fa 100644
--- a/docs/manualpages/SVD/SVDGetOperator.html
+++ b/docs/manualpages/SVD/SVDGetOperator.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetOperator</H1>
 Get the matrix associated with the singular value problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetOperator.html#SVDGetOperator">SVDGetOperator</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,Mat *A)
+PetscErrorCode SVDGetOperator(SVD svd,Mat *A)
 </PRE>
 Not collective, though parallel Mats are returned if the <A HREF="../SVD/SVD.html#SVD">SVD</A> is parallel
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>A    </B> - the matrix associated with the singular value problem
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A    </B></TD><TD> - the matrix associated with the singular value problem
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetOptionsPrefix.html b/docs/manualpages/SVD/SVDGetOptionsPrefix.html
index 9b7d43b..737c376 100644
--- a/docs/manualpages/SVD/SVDGetOptionsPrefix.html
+++ b/docs/manualpages/SVD/SVDGetOptionsPrefix.html
@@ -6,27 +6,28 @@
 <TITLE>SVDGetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetOptionsPrefix</H1>
 Gets the prefix used for searching for all <A HREF="../SVD/SVD.html#SVD">SVD</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,const char *prefix[])
+PetscErrorCode SVDGetOptionsPrefix(SVD svd,const char *prefix[])
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>prefix </B> - pointer to the prefix string used is returned
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - pointer to the prefix string used is returned
+</TD></TR></TABLE>
 <P>
-Notes: On the fortran side, the user should pass in a string 'prefix' of
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+On the Fortran side, the user should pass in a string 'prefix' of
 sufficient length to hold the prefix.
 <P>
 
diff --git a/docs/manualpages/SVD/SVDGetSingularTriplet.html b/docs/manualpages/SVD/SVDGetSingularTriplet.html
index 0a7a1d6..d318a38 100644
--- a/docs/manualpages/SVD/SVDGetSingularTriplet.html
+++ b/docs/manualpages/SVD/SVDGetSingularTriplet.html
@@ -6,32 +6,32 @@
 <TITLE>SVDGetSingularTriplet</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetSingularTriplet.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetSingularTriplet.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetSingularTriplet</H1>
 Gets the i-th triplet of the singular value decomposition as computed by <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>(). The solution consists in the singular value and its left and right singular vectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)
+PetscErrorCode SVDGetSingularTriplet(SVD svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)
 </PRE>
 Not Collective, but vectors are shared by all processors that share the <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>i   </B></TD><TD> - index of the solution
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma </B></TD><TD> - singular value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma </B></TD><TD> - singular value
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>u     </B></TD><TD> - left singular vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>u     </B></TD><TD> - left singular vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v     </B></TD><TD> - right singular vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v     </B></TD><TD> - right singular vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDGetStoppingTest.html b/docs/manualpages/SVD/SVDGetStoppingTest.html
new file mode 100644
index 0000000..219d146
--- /dev/null
+++ b/docs/manualpages/SVD/SVDGetStoppingTest.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDGetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDGetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDGetStoppingTest</H1>
+Gets the method used to decide the termination of the outer loop of the singular value solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDGetStoppingTest(SVD svd,SVDStop *stop)
+</PRE>
+Not Collective
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop  </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</A>(), <A HREF="../SVD/SVDStop.html#SVDStop">SVDStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDGetStoppingTest">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDGetTolerances.html b/docs/manualpages/SVD/SVDGetTolerances.html
index c51b86f..8e96bcd 100644
--- a/docs/manualpages/SVD/SVDGetTolerances.html
+++ b/docs/manualpages/SVD/SVDGetTolerances.html
@@ -6,27 +6,27 @@
 <TITLE>SVDGetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetTolerances</H1>
 Gets the tolerance and maximum iteration count used by the default <A HREF="../SVD/SVD.html#SVD">SVD</A> convergence tests. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscReal *tol,PetscInt *maxits)
+PetscErrorCode SVDGetTolerances(SVD svd,PetscReal *tol,PetscInt *maxits)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDGetTrackAll.html b/docs/manualpages/SVD/SVDGetTrackAll.html
index 46b85de..dcc70a5 100644
--- a/docs/manualpages/SVD/SVDGetTrackAll.html
+++ b/docs/manualpages/SVD/SVDGetTrackAll.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetTrackAll</H1>
 Returns the flag indicating whether all residual norms must be computed or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool *trackall)
+PetscErrorCode SVDGetTrackAll(SVD svd,PetscBool *trackall)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>trackall </B> - the returned flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - the returned flag
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetType.html b/docs/manualpages/SVD/SVDGetType.html
index 9bbee3d..122e9fa 100644
--- a/docs/manualpages/SVD/SVDGetType.html
+++ b/docs/manualpages/SVD/SVDGetType.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetType</H1>
 Gets the <A HREF="../SVD/SVD.html#SVD">SVD</A> type as a string from the <A HREF="../SVD/SVD.html#SVD">SVD</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetType.html#SVDGetType">SVDGetType</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../SVD/SVDType.html#SVDType">SVDType</A> *type)
+PetscErrorCode SVDGetType(SVD svd,SVDType *type)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>name </B> - name of <A HREF="../SVD/SVD.html#SVD">SVD</A> method
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of <A HREF="../SVD/SVD.html#SVD">SVD</A> method
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDGetWhichSingularTriplets.html b/docs/manualpages/SVD/SVDGetWhichSingularTriplets.html
index d52be35..96df7f1 100644
--- a/docs/manualpages/SVD/SVDGetWhichSingularTriplets.html
+++ b/docs/manualpages/SVD/SVDGetWhichSingularTriplets.html
@@ -6,25 +6,25 @@
 <TITLE>SVDGetWhichSingularTriplets</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDGetWhichSingularTriplets.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDGetWhichSingularTriplets.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDGetWhichSingularTriplets</H1>
 Returns which singular triplets are to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../SVD/SVDWhich.html#SVDWhich">SVDWhich</A> *which)
+PetscErrorCode SVDGetWhichSingularTriplets(SVD svd,SVDWhich *which)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>which </B> - which singular triplets are to be sought
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - which singular triplets are to be sought
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See <A HREF="../SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</A>() for possible values of which
diff --git a/docs/manualpages/SVD/SVDInitializePackage.html b/docs/manualpages/SVD/SVDInitializePackage.html
index a29f0f8..e9e4097 100644
--- a/docs/manualpages/SVD/SVDInitializePackage.html
+++ b/docs/manualpages/SVD/SVDInitializePackage.html
@@ -6,14 +6,14 @@
 <TITLE>SVDInitializePackage</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDInitializePackage.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDInitializePackage.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDInitializePackage</H1>
 This function initializes everything in the <A HREF="../SVD/SVD.html#SVD">SVD</A> package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>() when using static libraries. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../SVD/SVDInitializePackage.html#SVDInitializePackage">SVDInitializePackage</A>(void)
+PetscErrorCode SVDInitializePackage(void)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDLanczosGetOneSide.html b/docs/manualpages/SVD/SVDLanczosGetOneSide.html
index 15f51d0..c536cbc 100644
--- a/docs/manualpages/SVD/SVDLanczosGetOneSide.html
+++ b/docs/manualpages/SVD/SVDLanczosGetOneSide.html
@@ -6,25 +6,25 @@
 <TITLE>SVDLanczosGetOneSide</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDLanczosGetOneSide.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDLanczosGetOneSide.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDLanczosGetOneSide</H1>
 Gets if the variant of the Lanczos method to be used is one-sided or two-sided. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool *oneside)
+PetscErrorCode SVDLanczosGetOneSide(SVD svd,PetscBool *oneside)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd     </B> - singular value solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>oneside </B> - boolean flag indicating if the method is one-sided or not
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>oneside </B></TD><TD> - boolean flag indicating if the method is one-sided or not
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDLanczosSetOneSide.html b/docs/manualpages/SVD/SVDLanczosSetOneSide.html
index 8e94f8e..fc1f407 100644
--- a/docs/manualpages/SVD/SVDLanczosSetOneSide.html
+++ b/docs/manualpages/SVD/SVDLanczosSetOneSide.html
@@ -6,28 +6,28 @@
 <TITLE>SVDLanczosSetOneSide</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDLanczosSetOneSide.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDLanczosSetOneSide.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDLanczosSetOneSide</H1>
 Indicate if the variant of the Lanczos method to be used is one-sided or two-sided. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool oneside)
+PetscErrorCode SVDLanczosSetOneSide(SVD svd,PetscBool oneside)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>oneside </B></TD><TD> - boolean flag indicating if the method is one-sided or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>oneside </B></TD><TD> - boolean flag indicating if the method is one-sided or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_lanczos_oneside <boolean> </B> - Indicates the boolean flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_lanczos_oneside <boolean> </B></TD><TD> - Indicates the boolean flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 By default, a two-sided variant is selected, which is sometimes slightly
diff --git a/docs/manualpages/SVD/SVDMonitorAll.html b/docs/manualpages/SVD/SVDMonitorAll.html
index 67d4035..0c06704 100644
--- a/docs/manualpages/SVD/SVDMonitorAll.html
+++ b/docs/manualpages/SVD/SVDMonitorAll.html
@@ -6,33 +6,33 @@
 <TITLE>SVDMonitorAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDMonitorAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDMonitorAll</H1>
 Print the current approximate values and error estimates at each iteration of the singular value solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDMonitorCancel.html b/docs/manualpages/SVD/SVDMonitorCancel.html
index 96fa85f..52a0e19 100644
--- a/docs/manualpages/SVD/SVDMonitorCancel.html
+++ b/docs/manualpages/SVD/SVDMonitorCancel.html
@@ -6,27 +6,27 @@
 <TITLE>SVDMonitorCancel</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorCancel.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDMonitorCancel</H1>
 Clears all monitors for an <A HREF="../SVD/SVD.html#SVD">SVD</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDMonitorCancel(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_monitor_cancel </B> - Cancels all monitors that have been hardwired
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_cancel </B></TD><TD> - Cancels all monitors that have been hardwired
 into a code by calls to <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>(),
 but does not cancel those set via the options database.
-<br>
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDMonitorConverged.html b/docs/manualpages/SVD/SVDMonitorConverged.html
index 784c0aa..1ddfeba 100644
--- a/docs/manualpages/SVD/SVDMonitorConverged.html
+++ b/docs/manualpages/SVD/SVDMonitorConverged.html
@@ -6,39 +6,35 @@
 <TITLE>SVDMonitorConverged</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorConverged.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDMonitorConverged</H1>
 Print the approximate values and error estimates as they converge. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - monitor context
 </TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Note</FONT></H3>
-The monitor context must contain a struct with a PetscViewer and a
-PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
-<P>
 
 <P>
 <H3><FONT COLOR="#883300">See Also</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDMonitorFirst.html b/docs/manualpages/SVD/SVDMonitorFirst.html
index b3456dc..b34d130 100644
--- a/docs/manualpages/SVD/SVDMonitorFirst.html
+++ b/docs/manualpages/SVD/SVDMonitorFirst.html
@@ -6,33 +6,33 @@
 <TITLE>SVDMonitorFirst</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorFirst.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDMonitorFirst</H1>
 Print the first unconverged approximate values and error estimates at each iteration of the singular value solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets so far
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets so far
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates to display
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monctx </B></TD><TD> - monitor context (contains viewer, can be NULL)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vf     </B></TD><TD> - viewer and format for monitoring
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDMonitorLGCreate.html b/docs/manualpages/SVD/SVDMonitorLGCreate.html
new file mode 100644
index 0000000..c262e68
--- /dev/null
+++ b/docs/manualpages/SVD/SVDMonitorLGCreate.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDMonitorLGCreate.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDMonitorLGCreate</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorLGCreate.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDMonitorLGCreate</H1>
+Creates a line graph context for use with <A HREF="../SVD/SVD.html#SVD">SVD</A> to monitor convergence. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+</PRE>
+Collective on MPI_Comm
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>host </B></TD><TD> - the X display to open, or null for the local machine
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>label </B></TD><TD> - the title to put in the title bar
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x, y </B></TD><TD> - the screen coordinates of the upper left coordinate of
+the window
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m, n </B></TD><TD> - the screen width and height in pixels
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lgctx </B></TD><TD> - the drawing context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_lg </B></TD><TD> - Sets line graph monitor for the first residual
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_lg_all </B></TD><TD> - Sets line graph monitor for all residuals
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+Use PetscDrawLGDestroy() to destroy this line graph.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdmon.c.html#SVDMonitorLGCreate">src/svd/interface/svdmon.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDMonitorSet.html b/docs/manualpages/SVD/SVDMonitorSet.html
index 392e212..9bb9e3d 100644
--- a/docs/manualpages/SVD/SVDMonitorSet.html
+++ b/docs/manualpages/SVD/SVDMonitorSet.html
@@ -6,25 +6,25 @@
 <TITLE>SVDMonitorSet</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDMonitorSet.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorSet.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDMonitorSet</H1>
 Sets an ADDITIONAL function to be called at every iteration to monitor the error estimates for each requested singular triplet. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscErrorCode (*monitor)(<A HREF="../SVD/SVD.html#SVD">SVD</A>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
+PetscErrorCode SVDMonitorSet(SVD svd,PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor </B></TD><TD> - pointer to function (if this is NULL, it turns off monitoring)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx    </B></TD><TD> - [optional] context for private data for the
 monitor routine (use NULL if no context is desired)
 </TD></TR></TABLE>
 <P>
@@ -34,37 +34,37 @@ monitor routine (use NULL if no context is desired)
 </pre>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - iteration number
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of converged singular triplets
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - relative error estimates for each singular triplet
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - relative error estimates for each singular triplet
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nest   </B></TD><TD> - number of error estimates
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mctx   </B></TD><TD> - optional monitoring context, as set by <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>()
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor        </B></TD><TD> - print only the first error estimate
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor        </B></TD><TD> - print only the first error estimate
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_all    </B></TD><TD> - print error estimates at each iteration
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_all    </B></TD><TD> - print error estimates at each iteration
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_conv   </B></TD><TD> - print the singular value approximations only when
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_conv   </B></TD><TD> - print the singular value approximations only when
 convergence has been reached
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_lg     </B></TD><TD> - sets line graph monitor for the first unconverged
 approximate singular value
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_lg_all </B></TD><TD> - sets line graph monitor for all unconverged
 approximate singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_monitor_cancel </B></TD><TD> - cancels all monitors that have been hardwired into
 a code by calls to <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>(), but does not cancel those set via
 the options database.
 </TD></TR></TABLE>
diff --git a/docs/manualpages/SVD/SVDMonitorSetFromOptions.html b/docs/manualpages/SVD/SVDMonitorSetFromOptions.html
new file mode 100644
index 0000000..69802a5
--- /dev/null
+++ b/docs/manualpages/SVD/SVDMonitorSetFromOptions.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDMonitorSetFromOptions.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDMonitorSetFromOptions</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDMonitorSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDMonitorSetFromOptions</H1>
+Sets a monitor function and viewer appropriate for the type indicated by the user. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+</PRE>
+Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - the singular value solver context
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name     </B></TD><TD> - the monitor option name
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help     </B></TD><TD> - message indicating what monitoring is done
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>manual   </B></TD><TD> - manual page for the monitor
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>monitor  </B></TD><TD> - the monitor function, whose context is a PetscViewerAndFormat
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether this monitor tracks all singular values or not
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</A>(), <A HREF="../SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</A>(), <A HREF="../SVD/SVDConvMonitorSetFromOptions.html#SVDConvMonitorSetFromOptions">SVDConvMonitorSetFromOptions</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDMonitorSetFromOptions">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDReasonView.html b/docs/manualpages/SVD/SVDReasonView.html
index 40a3679..9016017 100644
--- a/docs/manualpages/SVD/SVDReasonView.html
+++ b/docs/manualpages/SVD/SVDReasonView.html
@@ -6,28 +6,28 @@
 <TITLE>SVDReasonView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDReasonView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDReasonView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDReasonView</H1>
 Displays the reason an <A HREF="../SVD/SVD.html#SVD">SVD</A> solve converged or diverged. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscViewer viewer)
+PetscErrorCode SVDReasonView(SVD svd,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer to display the reason
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-svd_converged_reason </B> - print reason for convergence, and number of iterations
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDReasonViewFromOptions.html b/docs/manualpages/SVD/SVDReasonViewFromOptions.html
index e99de27..8523a75 100644
--- a/docs/manualpages/SVD/SVDReasonViewFromOptions.html
+++ b/docs/manualpages/SVD/SVDReasonViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>SVDReasonViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDReasonViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDReasonViewFromOptions</H1>
 Processes command line options to determine if/how the <A HREF="../SVD/SVD.html#SVD">SVD</A> converged reason is to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDReasonViewFromOptions(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdview.c.html#SVDReasonViewFromOptions">src/svd/interface/svdview.c</A>
diff --git a/docs/manualpages/SVD/SVDRegister.html b/docs/manualpages/SVD/SVDRegister.html
index 8b72d4c..6a45fb9 100644
--- a/docs/manualpages/SVD/SVDRegister.html
+++ b/docs/manualpages/SVD/SVDRegister.html
@@ -6,23 +6,23 @@
 <TITLE>SVDRegister</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDRegister.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDRegister.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDRegister</H1>
 Adds a method to the singular value solver package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDRegister.html#SVDRegister">SVDRegister</A>(const char *name,PetscErrorCode (*function)(<A HREF="../SVD/SVD.html#SVD">SVD</A>))
+PetscErrorCode SVDRegister(const char *name,PetscErrorCode (*function)(SVD))
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD> - name of a new user-defined solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD> - routine to create the solver context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDRegisterAll.html b/docs/manualpages/SVD/SVDRegisterAll.html
index 3179e36..84a95ab 100644
--- a/docs/manualpages/SVD/SVDRegisterAll.html
+++ b/docs/manualpages/SVD/SVDRegisterAll.html
@@ -6,15 +6,15 @@
 <TITLE>SVDRegisterAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDRegisterAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDRegisterAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDRegisterAll</H1>
 Registers all the singular value solvers in the <A HREF="../SVD/SVD.html#SVD">SVD</A> package. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDRegisterAll.html#SVDRegisterAll">SVDRegisterAll</A>(void)
+PetscErrorCode SVDRegisterAll(void)
 </PRE>
 Not Collective
 <P>
diff --git a/docs/manualpages/SVD/SVDReset.html b/docs/manualpages/SVD/SVDReset.html
index 422e375..092888e 100644
--- a/docs/manualpages/SVD/SVDReset.html
+++ b/docs/manualpages/SVD/SVDReset.html
@@ -6,21 +6,21 @@
 <TITLE>SVDReset</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDReset.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDReset.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDReset</H1>
 Resets the <A HREF="../SVD/SVD.html#SVD">SVD</A> context to the initial state and removes any allocated objects. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDReset.html#SVDReset">SVDReset</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDReset(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDSetBV.html b/docs/manualpages/SVD/SVDSetBV.html
index 312c1c8..7734438 100644
--- a/docs/manualpages/SVD/SVDSetBV.html
+++ b/docs/manualpages/SVD/SVDSetBV.html
@@ -6,25 +6,25 @@
 <TITLE>SVDSetBV</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetBV.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetBV.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetBV</H1>
 Associates basis vectors objects to the singular value solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../BV/BV.html#BV">BV</A> V,<A HREF="../BV/BV.html#BV">BV</A> U)
+PetscErrorCode SVDSetBV(SVD svd,BV V,BV U)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V   </B></TD><TD> - the basis vectors object for right singular vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V   </B></TD><TD> - the basis vectors object for right singular vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>U   </B></TD><TD> - the basis vectors object for left singular vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>U   </B></TD><TD> - the basis vectors object for left singular vectors
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDSetConvergenceTest.html b/docs/manualpages/SVD/SVDSetConvergenceTest.html
new file mode 100644
index 0000000..3404752
--- /dev/null
+++ b/docs/manualpages/SVD/SVDSetConvergenceTest.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDSetConvergenceTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDSetConvergenceTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetConvergenceTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDSetConvergenceTest</H1>
+Specifies how to compute the error estimate used in the convergence test. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDSetConvergenceTest(SVD svd,SVDConv conv)
+</PRE>
+Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>conv </B></TD><TD> - the type of convergence test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_conv_abs  </B></TD><TD> - Sets the absolute convergence test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_conv_rel  </B></TD><TD> - Sets the convergence test relative to the singular value
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_conv_user </B></TD><TD> - Selects the user-defined convergence test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The parameter 'conv' can have one of these values
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_CONV_ABS  </B></TD><TD> - absolute error ||r||
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_CONV_REL  </B></TD><TD> - error relative to the singular value l, ||r||/sigma
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_CONV_USER </B></TD><TD> - function set by <A HREF="../SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDGetConvergenceTest.html#SVDGetConvergenceTest">SVDGetConvergenceTest</A>(), <A HREF="../SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</A>(), <A HREF="../SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</A>(), <A HREF="../SVD/SVDConv.html#SVDConv">SVDConv</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDSetConvergenceTest">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDSetConvergenceTestFunction.html b/docs/manualpages/SVD/SVDSetConvergenceTestFunction.html
new file mode 100644
index 0000000..f27ebb9
--- /dev/null
+++ b/docs/manualpages/SVD/SVDSetConvergenceTestFunction.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDSetConvergenceTestFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDSetConvergenceTestFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetConvergenceTestFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDSetConvergenceTestFunction</H1>
+Sets a function to compute the error estimate used in the convergence test. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDSetConvergenceTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscReal,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+</PRE>
+Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - a pointer to the convergence test function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the convergence routine (may be null)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sigma  </B></TD><TD> - computed singular value
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res    </B></TD><TD> - residual norm associated to the singular triplet
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>errest </B></TD><TD> - (output) computed error estimate
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+If the error estimate returned by the convergence test function is less than
+the tolerance, then the singular value is accepted as converged.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</A>(), <A HREF="../SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDSetConvergenceTestFunction">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDSetDS.html b/docs/manualpages/SVD/SVDSetDS.html
index 20af56d..963a2e2 100644
--- a/docs/manualpages/SVD/SVDSetDS.html
+++ b/docs/manualpages/SVD/SVDSetDS.html
@@ -6,23 +6,23 @@
 <TITLE>SVDSetDS</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetDS.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetDS.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetDS</H1>
 Associates a direct solver object to the singular value solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../DS/DS.html#DS">DS</A> ds)
+PetscErrorCode SVDSetDS(SVD svd,DS ds)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ds  </B></TD><TD> - the direct solver object
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDSetDimensions.html b/docs/manualpages/SVD/SVDSetDimensions.html
index f1512a2..4d59709 100644
--- a/docs/manualpages/SVD/SVDSetDimensions.html
+++ b/docs/manualpages/SVD/SVDSetDimensions.html
@@ -6,36 +6,36 @@
 <TITLE>SVDSetDimensions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetDimensions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetDimensions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetDimensions</H1>
 Sets the number of singular values to compute and the dimension of the subspace. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)
+PetscErrorCode SVDSetDimensions(SVD svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsv </B></TD><TD> - number of singular values to compute
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsv </B></TD><TD> - number of singular values to compute
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ncv </B></TD><TD> - the maximum dimension of the subspace to be used by the solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mpd </B></TD><TD> - the maximum dimension allowed for the projected problem
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_nsv <nsv> </B></TD><TD> - Sets the number of singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_nsv <nsv> </B></TD><TD> - Sets the number of singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_ncv <ncv> </B></TD><TD> - Sets the dimension of the subspace
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_mpd <mpd> </B></TD><TD> - Sets the maximum projected dimension
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
@@ -48,7 +48,7 @@ to set one of them at most. Normal usage is that
 (b) in cases where nsv is large, the user sets mpd.
 <P>
 The value of ncv should always be between nsv and (nsv+mpd), typically
-ncv=nsv+mpd. If nev is not too large, mpd=nsv is a reasonable choice, otherwise
+ncv=nsv+mpd. If nsv is not too large, mpd=nsv is a reasonable choice, otherwise
 a smaller value should be used.
 <P>
 
diff --git a/docs/manualpages/SVD/SVDSetFromOptions.html b/docs/manualpages/SVD/SVDSetFromOptions.html
index fddc07d..b8a42ec 100644
--- a/docs/manualpages/SVD/SVDSetFromOptions.html
+++ b/docs/manualpages/SVD/SVDSetFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>SVDSetFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetFromOptions</H1>
 Sets <A HREF="../SVD/SVD.html#SVD">SVD</A> options from the options database. This routine must be called before <A HREF="../SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</A>() if the user is to be allowed to set the solver type. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDSetFromOptions(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 To see all options, run your program with the -help option.
diff --git a/docs/manualpages/SVD/SVDSetImplicitTranspose.html b/docs/manualpages/SVD/SVDSetImplicitTranspose.html
index 21b6508..48441fc 100644
--- a/docs/manualpages/SVD/SVDSetImplicitTranspose.html
+++ b/docs/manualpages/SVD/SVDSetImplicitTranspose.html
@@ -6,28 +6,28 @@
 <TITLE>SVDSetImplicitTranspose</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetImplicitTranspose.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetImplicitTranspose.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetImplicitTranspose</H1>
 Indicates how to handle the transpose of the matrix associated with the singular value problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool impl)
+PetscErrorCode SVDSetImplicitTranspose(SVD svd,PetscBool impl)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>impl </B></TD><TD> - how to handle the transpose (implicitly or not)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>impl </B></TD><TD> - how to handle the transpose (implicitly or not)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_implicittranspose </B> - Activate the implicit transpose mode.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_implicittranspose </B></TD><TD> - Activate the implicit transpose mode.
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 By default, the transpose of the matrix is explicitly built (if the matrix
diff --git a/docs/manualpages/SVD/SVDSetInitialSpace.html b/docs/manualpages/SVD/SVDSetInitialSpace.html
index 0cbe387..50dd1af 100644
--- a/docs/manualpages/SVD/SVDSetInitialSpace.html
+++ b/docs/manualpages/SVD/SVDSetInitialSpace.html
@@ -6,25 +6,25 @@
 <TITLE>SVDSetInitialSpace</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetInitialSpace.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetInitialSpace</H1>
 Specify a basis of vectors that constitute the initial (right) space, that is, a rough approximation to the right singular subspace from which the solver starts to iterate. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt n,Vec *is)
+PetscErrorCode SVDSetInitialSpace(SVD svd,PetscInt n,Vec *is)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDSetInitialSpaceLeft.html b/docs/manualpages/SVD/SVDSetInitialSpaceLeft.html
index e518e47..4158d55 100644
--- a/docs/manualpages/SVD/SVDSetInitialSpaceLeft.html
+++ b/docs/manualpages/SVD/SVDSetInitialSpaceLeft.html
@@ -6,25 +6,25 @@
 <TITLE>SVDSetInitialSpaceLeft</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetInitialSpaceLeft.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetInitialSpaceLeft.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetInitialSpaceLeft</H1>
 Specify a basis of vectors that constitute the initial left space, that is, a rough approximation to the left singular subspace from which the solver starts to iterate. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt n,Vec *is)
+PetscErrorCode SVDSetInitialSpaceLeft(SVD svd,PetscInt n,Vec *is)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A> and Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n     </B></TD><TD> - number of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>is    </B></TD><TD> - set of basis vectors of the initial space
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDSetOperator.html b/docs/manualpages/SVD/SVDSetOperator.html
index 1cd05f9..4cb9ee5 100644
--- a/docs/manualpages/SVD/SVDSetOperator.html
+++ b/docs/manualpages/SVD/SVDSetOperator.html
@@ -6,23 +6,23 @@
 <TITLE>SVDSetOperator</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetOperator.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetOperator.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetOperator</H1>
 Set the matrix associated with the singular value problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,Mat mat)
+PetscErrorCode SVDSetOperator(SVD svd,Mat mat)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A> and Mat
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the singular value problem
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the matrix associated with the singular value problem
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDSetOptionsPrefix.html b/docs/manualpages/SVD/SVDSetOptionsPrefix.html
index e643a61..6365e4f 100644
--- a/docs/manualpages/SVD/SVDSetOptionsPrefix.html
+++ b/docs/manualpages/SVD/SVDSetOptionsPrefix.html
@@ -6,23 +6,23 @@
 <TITLE>SVDSetOptionsPrefix</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetOptionsPrefix.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetOptionsPrefix</H1>
 Sets the prefix used for searching for all <A HREF="../SVD/SVD.html#SVD">SVD</A> options in the database. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,const char *prefix)
+PetscErrorCode SVDSetOptionsPrefix(SVD svd,const char *prefix)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../SVD/SVD.html#SVD">SVD</A> option requests
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>prefix </B></TD><TD> - the prefix string to prepend to all <A HREF="../SVD/SVD.html#SVD">SVD</A> option requests
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDSetStoppingTest.html b/docs/manualpages/SVD/SVDSetStoppingTest.html
new file mode 100644
index 0000000..1d64a4b
--- /dev/null
+++ b/docs/manualpages/SVD/SVDSetStoppingTest.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDSetStoppingTest.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDSetStoppingTest</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetStoppingTest.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDSetStoppingTest</H1>
+Specifies how to decide the termination of the outer loop of the singular value solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDSetStoppingTest(SVD svd,SVDStop stop)
+</PRE>
+Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd  </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stop </B></TD><TD> - the type of stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_stop_basic </B></TD><TD> - Sets the default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_stop_user  </B></TD><TD> - Selects the user-defined stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+The parameter 'stop' can have one of these values
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_STOP_BASIC </B></TD><TD> - default stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_STOP_USER  </B></TD><TD> - function set by <A HREF="../SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDGetStoppingTest.html#SVDGetStoppingTest">SVDGetStoppingTest</A>(), <A HREF="../SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</A>(), <A HREF="../SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</A>(), <A HREF="../SVD/SVDStop.html#SVDStop">SVDStop</A>
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDSetStoppingTest">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDSetStoppingTestFunction.html b/docs/manualpages/SVD/SVDSetStoppingTestFunction.html
new file mode 100644
index 0000000..7051f88
--- /dev/null
+++ b/docs/manualpages/SVD/SVDSetStoppingTestFunction.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDSetStoppingTestFunction.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDSetStoppingTestFunction</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetStoppingTestFunction.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDSetStoppingTestFunction</H1>
+Sets a function to decide when to stop the outer iteration of the singular value solver. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDSetStoppingTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+</PRE>
+Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func    </B></TD><TD> - pointer to the stopping test function
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx     </B></TD><TD> - context for private data for the stopping routine (may be null)
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>destroy </B></TD><TD> - a routine for destroying the context (may be null)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Calling Sequence of func</FONT></H3>
+<pre>
+  func(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,<A HREF="../SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</A> *reason,void *ctx)
+</pre>
+<P>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged singular triplets
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsv    </B></TD><TD> - number of requested singular triplets
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - (output) result of the stopping test
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - optional context, as set by <A HREF="../SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</A>()
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Note</FONT></H3>
+Normal usage is to first call the default routine <A HREF="../SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</A>() and then
+set reason to SVD_CONVERGED_USER if some user-defined conditions have been
+met. To let the singular value solver continue iterating, the result must be
+left as SVD_CONVERGED_ITERATING.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</A>(), <A HREF="../SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdopts.c.html#SVDSetStoppingTestFunction">src/svd/interface/svdopts.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDSetTolerances.html b/docs/manualpages/SVD/SVDSetTolerances.html
index 106221c..8cce79f 100644
--- a/docs/manualpages/SVD/SVDSetTolerances.html
+++ b/docs/manualpages/SVD/SVDSetTolerances.html
@@ -6,32 +6,32 @@
 <TITLE>SVDSetTolerances</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetTolerances.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetTolerances.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetTolerances</H1>
 Sets the tolerance and maximum iteration count used by the default <A HREF="../SVD/SVD.html#SVD">SVD</A> convergence testers. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscReal tol,PetscInt maxits)
+PetscErrorCode SVDSetTolerances(SVD svd,PetscReal tol,PetscInt maxits)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tol </B></TD><TD> - the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD> - maximum number of iterations to use
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_tol <tol> </B></TD><TD> - Sets the convergence tolerance
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_tol <tol> </B></TD><TD> - Sets the convergence tolerance
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_max_it <maxits> </B></TD><TD> - Sets the maximum number of iterations allowed
 (use PETSC_DECIDE to compute an educated guess based on basis and matrix sizes)
 </TD></TR></TABLE>
 <P>
diff --git a/docs/manualpages/SVD/SVDSetTrackAll.html b/docs/manualpages/SVD/SVDSetTrackAll.html
index 1586742..010a236 100644
--- a/docs/manualpages/SVD/SVDSetTrackAll.html
+++ b/docs/manualpages/SVD/SVDSetTrackAll.html
@@ -6,23 +6,23 @@
 <TITLE>SVDSetTrackAll</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetTrackAll.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetTrackAll</H1>
 Specifies if the solver must compute the residual norm of all approximate singular value or not. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool trackall)
+PetscErrorCode SVDSetTrackAll(SVD svd,PetscBool trackall)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether to compute all residuals or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>trackall </B></TD><TD> - whether to compute all residuals or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
diff --git a/docs/manualpages/SVD/SVDSetType.html b/docs/manualpages/SVD/SVDSetType.html
index a8ea5e3..38ecde0 100644
--- a/docs/manualpages/SVD/SVDSetType.html
+++ b/docs/manualpages/SVD/SVDSetType.html
@@ -6,29 +6,29 @@
 <TITLE>SVDSetType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetType</H1>
 Selects the particular solver to be used in the <A HREF="../SVD/SVD.html#SVD">SVD</A> object. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetType.html#SVDSetType">SVDSetType</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../SVD/SVDType.html#SVDType">SVDType</A> type)
+PetscErrorCode SVDSetType(SVD svd,SVDType type)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd      </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known method
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>type     </B></TD><TD> - a known method
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_type <method> </B> - Sets the method; use -help for a list
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_type <method> </B></TD><TD> - Sets the method; use -help for a list
 of available methods
-<br>
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 See "slepc/include/slepcsvd.h" for available methods. The default
diff --git a/docs/manualpages/SVD/SVDSetUp.html b/docs/manualpages/SVD/SVDSetUp.html
index 4fa93d6..e8f3e06 100644
--- a/docs/manualpages/SVD/SVDSetUp.html
+++ b/docs/manualpages/SVD/SVDSetUp.html
@@ -6,21 +6,21 @@
 <TITLE>SVDSetUp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetUp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetUp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetUp</H1>
 Sets up all the internal data structures necessary for the execution of the singular value solver. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDSetUp(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd   </B> - singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd   </B></TD><TD> - singular value solver context
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function need not be called explicitly in most cases, since <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>()
diff --git a/docs/manualpages/SVD/SVDSetWhichSingularTriplets.html b/docs/manualpages/SVD/SVDSetWhichSingularTriplets.html
index 3bed3f6..304a05c 100644
--- a/docs/manualpages/SVD/SVDSetWhichSingularTriplets.html
+++ b/docs/manualpages/SVD/SVDSetWhichSingularTriplets.html
@@ -6,40 +6,40 @@
 <TITLE>SVDSetWhichSingularTriplets</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSetWhichSingularTriplets.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSetWhichSingularTriplets.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSetWhichSingularTriplets</H1>
 Specifies which singular triplets are to be sought. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,<A HREF="../SVD/SVDWhich.html#SVDWhich">SVDWhich</A> which)
+PetscErrorCode SVDSetWhichSingularTriplets(SVD svd,SVDWhich which)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>which </B> - which singular triplets are to be sought
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>which </B></TD><TD> - which singular triplets are to be sought
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Possible values</FONT></H3>
 <H3><FONT COLOR="#883300">The parameter 'which' can have one of these values</FONT></H3>
 <P>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_LARGEST  </B></TD><TD> - largest singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_LARGEST  </B></TD><TD> - largest singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_SMALLEST </B></TD><TD> - smallest singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>SVD_SMALLEST </B></TD><TD> - smallest singular values
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_largest  </B></TD><TD> - Sets largest singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_largest  </B></TD><TD> - Sets largest singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_smallest </B></TD><TD> - Sets smallest singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_smallest </B></TD><TD> - Sets smallest singular values
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDSolve.html b/docs/manualpages/SVD/SVDSolve.html
index 137a7cf..bf62d43 100644
--- a/docs/manualpages/SVD/SVDSolve.html
+++ b/docs/manualpages/SVD/SVDSolve.html
@@ -6,37 +6,37 @@
 <TITLE>SVDSolve</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDSolve.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDSolve.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDSolve</H1>
 Solves the singular value problem. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDSolve(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>svd </B> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view </B></TD><TD> - print information about the solver used
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view </B></TD><TD> - print information about the solver used
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_mat binary </B></TD><TD> - save the matrix to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_mat binary </B></TD><TD> - save the matrix to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_vectors binary </B></TD><TD> - save the computed singular vectors to the default binary viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_vectors binary </B></TD><TD> - save the computed singular vectors to the default binary viewer
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_values </B></TD><TD> - print computed singular values
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_values </B></TD><TD> - print computed singular values
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_converged_reason </B></TD><TD> - print reason for convergence, and number of iterations
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_absolute </B></TD><TD> - print absolute errors of each singular triplet
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_absolute </B></TD><TD> - print absolute errors of each singular triplet
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_relative </B></TD><TD> - print relative errors of each singular triplet
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_error_relative </B></TD><TD> - print relative errors of each singular triplet
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/SVD/SVDStop.html b/docs/manualpages/SVD/SVDStop.html
new file mode 100644
index 0000000..acc75ce
--- /dev/null
+++ b/docs/manualpages/SVD/SVDStop.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDStop.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDStop</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDStop.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDStop</H1>
+Determines the stopping test 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+typedef enum { SVD_STOP_BASIC,
+               SVD_STOP_USER } <A HREF="../SVD/SVDStop.html#SVDStop">SVDStop</A>;
+</PRE>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</A>(), <A HREF="../SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/../../include/slepcsvd.h.html#SVDStop">src/svd/../../include/slepcsvd.h</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDStoppingBasic.html b/docs/manualpages/SVD/SVDStoppingBasic.html
new file mode 100644
index 0000000..7244b5e
--- /dev/null
+++ b/docs/manualpages/SVD/SVDStoppingBasic.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/SVD/SVDStoppingBasic.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SVDStoppingBasic</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDStoppingBasic.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SVDStoppingBasic</H1>
+Default routine to determine whether the outer singular value solver iteration must be stopped. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsvd.h" 
+PetscErrorCode SVDStoppingBasic(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)
+</PRE>
+Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - singular value solver context obtained from <A HREF="../SVD/SVDCreate.html#SVDCreate">SVDCreate</A>()
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its    </B></TD><TD> - current number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>max_it </B></TD><TD> - maximum number of iterations
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nconv  </B></TD><TD> - number of currently converged singular triplets
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nsv    </B></TD><TD> - number of requested singular triplets
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx    </B></TD><TD> - context (not used here)
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>reason </B></TD><TD> - result of the stopping test
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+A positive value of reason indicates that the iteration has finished successfully
+(converged), and a negative value indicates an error condition (diverged). If
+the iteration needs to be continued, reason must be set to SVD_CONVERGED_ITERATING
+(zero).
+<P>
+<A HREF="../SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</A>() will stop if all requested singular values are converged, or if
+the maximum number of iterations has been reached.
+<P>
+Use <A HREF="../SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</A>() to provide your own test instead of using this one.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</A>(), <A HREF="../SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</A>, <A HREF="../SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svddefault.c.html#SVDStoppingBasic">src/svd/interface/svddefault.c</A>
+<BR><A HREF="./index.html">Index of all SVD routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/SVD/SVDTRLanczosGetOneSide.html b/docs/manualpages/SVD/SVDTRLanczosGetOneSide.html
index d284c40..d4d1c3c 100644
--- a/docs/manualpages/SVD/SVDTRLanczosGetOneSide.html
+++ b/docs/manualpages/SVD/SVDTRLanczosGetOneSide.html
@@ -6,25 +6,25 @@
 <TITLE>SVDTRLanczosGetOneSide</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDTRLanczosGetOneSide.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDTRLanczosGetOneSide.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDTRLanczosGetOneSide</H1>
 Gets if the variant of the Lanczos method to be used is one-sided or two-sided. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool *oneside)
+PetscErrorCode SVDTRLanczosGetOneSide(SVD svd,PetscBool *oneside)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd     </B> - singular value solver
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
-<DT><B>oneside </B> - boolean flag indicating if the method is one-sided or not
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>oneside </B></TD><TD> - boolean flag indicating if the method is one-sided or not
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDTRLanczosSetOneSide.html b/docs/manualpages/SVD/SVDTRLanczosSetOneSide.html
index 8cef0cf..b917dd1 100644
--- a/docs/manualpages/SVD/SVDTRLanczosSetOneSide.html
+++ b/docs/manualpages/SVD/SVDTRLanczosSetOneSide.html
@@ -6,28 +6,28 @@
 <TITLE>SVDTRLanczosSetOneSide</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDTRLanczosSetOneSide.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDTRLanczosSetOneSide.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDTRLanczosSetOneSide</H1>
 Indicate if the variant of the Lanczos method to be used is one-sided or two-sided. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscBool oneside)
+PetscErrorCode SVDTRLanczosSetOneSide(SVD svd,PetscBool oneside)
 </PRE>
 Logically Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd     </B></TD><TD> - singular value solver
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>oneside </B></TD><TD> - boolean flag indicating if the method is one-sided or not
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>oneside </B></TD><TD> - boolean flag indicating if the method is one-sided or not
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_trlanczos_oneside <boolean> </B> - Indicates the boolean flag
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_trlanczos_oneside <boolean> </B></TD><TD> - Indicates the boolean flag
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 By default, a two-sided variant is selected, which is sometimes slightly
diff --git a/docs/manualpages/SVD/SVDType.html b/docs/manualpages/SVD/SVDType.html
index 859c347..038b890 100644
--- a/docs/manualpages/SVD/SVDType.html
+++ b/docs/manualpages/SVD/SVDType.html
@@ -6,8 +6,8 @@
 <TITLE>SVDType</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDType.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDType.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDType</H1>
 String with the name of a SLEPc singular value solver 
diff --git a/docs/manualpages/SVD/SVDValuesView.html b/docs/manualpages/SVD/SVDValuesView.html
index 28d2f23..b265886 100644
--- a/docs/manualpages/SVD/SVDValuesView.html
+++ b/docs/manualpages/SVD/SVDValuesView.html
@@ -6,28 +6,28 @@
 <TITLE>SVDValuesView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDValuesView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDValuesView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDValuesView</H1>
 Displays the computed singular values in a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscViewer viewer)
+PetscErrorCode SVDValuesView(SVD svd,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_view_values </B> - print computed singular values
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_values </B></TD><TD> - print computed singular values
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDValuesViewFromOptions.html b/docs/manualpages/SVD/SVDValuesViewFromOptions.html
index c208e8d..8543e9d 100644
--- a/docs/manualpages/SVD/SVDValuesViewFromOptions.html
+++ b/docs/manualpages/SVD/SVDValuesViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>SVDValuesViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDValuesViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDValuesViewFromOptions</H1>
 Processes command line options to determine if/how the computed singular values are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDValuesViewFromOptions(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdview.c.html#SVDValuesViewFromOptions">src/svd/interface/svdview.c</A>
diff --git a/docs/manualpages/SVD/SVDVectorsView.html b/docs/manualpages/SVD/SVDVectorsView.html
index 40e661a..653fa2b 100644
--- a/docs/manualpages/SVD/SVDVectorsView.html
+++ b/docs/manualpages/SVD/SVDVectorsView.html
@@ -6,28 +6,28 @@
 <TITLE>SVDVectorsView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDVectorsView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDVectorsView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDVectorsView</H1>
 Outputs computed singular vectors to a viewer. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscViewer viewer)
+PetscErrorCode SVDVectorsView(SVD svd,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Parameter</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd    </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
-<DT><B>-svd_view_vectors </B> - output singular vectors
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view_vectors </B></TD><TD> - output singular vectors
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/SVD/SVDVectorsViewFromOptions.html b/docs/manualpages/SVD/SVDVectorsViewFromOptions.html
index 5c6dfd7..32c76fc 100644
--- a/docs/manualpages/SVD/SVDVectorsViewFromOptions.html
+++ b/docs/manualpages/SVD/SVDVectorsViewFromOptions.html
@@ -6,21 +6,21 @@
 <TITLE>SVDVectorsViewFromOptions</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDVectorsViewFromOptions.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDVectorsViewFromOptions</H1>
 Processes command line options to determine if/how the computed singular vectors are to be viewed.  
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd)
+PetscErrorCode SVDVectorsViewFromOptions(SVD svd)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>svd </B> - the singular value solver context
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/svd/interface/svdview.c.html#SVDVectorsViewFromOptions">src/svd/interface/svdview.c</A>
diff --git a/docs/manualpages/SVD/SVDView.html b/docs/manualpages/SVD/SVDView.html
index 175950a..2317b55 100644
--- a/docs/manualpages/SVD/SVDView.html
+++ b/docs/manualpages/SVD/SVDView.html
@@ -6,35 +6,35 @@
 <TITLE>SVDView</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDView.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDView.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDView</H1>
 Prints the <A HREF="../SVD/SVD.html#SVD">SVD</A> data structure. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsvd.h" 
-PetscErrorCode <A HREF="../SVD/SVDView.html#SVDView">SVDView</A>(<A HREF="../SVD/SVD.html#SVD">SVD</A> svd,PetscViewer viewer)
+PetscErrorCode SVDView(SVD svd,PetscViewer viewer)
 </PRE>
 Collective on <A HREF="../SVD/SVD.html#SVD">SVD</A>
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>svd </B></TD><TD> - the singular value solver context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Options Database Key</FONT></H3>
-<DT><B>-svd_view </B> - Calls <A HREF="../SVD/SVDView.html#SVDView">SVDView</A>() at end of <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>()
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-svd_view </B></TD><TD> - Calls <A HREF="../SVD/SVDView.html#SVDView">SVDView</A>() at end of <A HREF="../SVD/SVDSolve.html#SVDSolve">SVDSolve</A>()
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The available visualization contexts include
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_SELF </B></TD><TD> - standard output (default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_STDOUT_WORLD </B></TD><TD> - synchronized standard
 output where only the first processor opens
 the file.  All other processors send their
 data to the first processor to print.
diff --git a/docs/manualpages/SVD/SVDWhich.html b/docs/manualpages/SVD/SVDWhich.html
index fcde91e..f522a6c 100644
--- a/docs/manualpages/SVD/SVDWhich.html
+++ b/docs/manualpages/SVD/SVDWhich.html
@@ -6,8 +6,8 @@
 <TITLE>SVDWhich</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/SVDWhich.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/SVDWhich.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SVDWhich</H1>
 Determines whether largest or smallest singular triplets are to be computed 
diff --git a/docs/manualpages/SVD/index.html b/docs/manualpages/SVD/index.html
index 145ea44..c612386 100644
--- a/docs/manualpages/SVD/index.html
+++ b/docs/manualpages/SVD/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/SVD/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/SVD/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
@@ -21,41 +21,49 @@ The user interface is very similar to that of EPS, both for the options database
 <P>
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Beginner - Basic usage</B></TD></TR>
- <TD WIDTH=250><A HREF="./SVDComputeError.html">SVDComputeError</A></TD>
- <TD WIDTH=250><A HREF="./SVDGetSingularTriplet.html">SVDGetSingularTriplet</A></TD>
+ <TD WIDTH=250><A HREF="./SVD.html">SVD</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetConverged.html">SVDGetConverged</A></TD>
  <TD WIDTH=250><A HREF="./SVDSolve.html">SVDSolve</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SVDCreate.html">SVDCreate</A></TD>
- <TD WIDTH=250><A HREF="./SVD.html">SVD</A></TD>
+ <TD WIDTH=250><A HREF="./SVDComputeError.html">SVDComputeError</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetSingularTriplet.html">SVDGetSingularTriplet</A></TD>
  <TD WIDTH=250><A HREF="./SVDType.html">SVDType</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SVDDestroy.html">SVDDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./SVDCreate.html">SVDCreate</A></TD>
  <TD WIDTH=250><A HREF="./SVDSetFromOptions.html">SVDSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./SVDView.html">SVDView</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SVDGetConverged.html">SVDGetConverged</A></TD>
+ <TD WIDTH=250><A HREF="./SVDDestroy.html">SVDDestroy</A></TD>
  <TD WIDTH=250><A HREF="./SVDSetOperator.html">SVDSetOperator</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
+ <TD WIDTH=250><A HREF="./SVDConv.html">SVDConv</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetType.html">SVDGetType</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetDimensions.html">SVDSetDimensions</A></TD>
+<TR>
  <TD WIDTH=250><A HREF="./SVDConvergedReason.html">SVDConvergedReason</A></TD>
  <TD WIDTH=250><A HREF="./SVDGetWhichSingularTriplets.html">SVDGetWhichSingularTriplets</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetInitialSpaceLeft.html">SVDSetInitialSpaceLeft</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetInitialSpace.html">SVDSetInitialSpace</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDErrorType.html">SVDErrorType</A></TD>
  <TD WIDTH=250><A HREF="./SVDMonitorAll.html">SVDMonitorAll</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetTolerances.html">SVDSetTolerances</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetInitialSpaceLeft.html">SVDSetInitialSpaceLeft</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDErrorView.html">SVDErrorView</A></TD>
  <TD WIDTH=250><A HREF="./SVDMonitorCancel.html">SVDMonitorCancel</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetType.html">SVDSetType</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetTolerances.html">SVDSetTolerances</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDGetConvergedReason.html">SVDGetConvergedReason</A></TD>
  <TD WIDTH=250><A HREF="./SVDMonitorConverged.html">SVDMonitorConverged</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetType.html">SVDSetType</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./SVDGetConvergenceTest.html">SVDGetConvergenceTest</A></TD>
+ <TD WIDTH=250><A HREF="./SVDMonitorFirst.html">SVDMonitorFirst</A></TD>
  <TD WIDTH=250><A HREF="./SVDSetWhichSingularTriplets.html">SVDSetWhichSingularTriplets</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDGetDimensions.html">SVDGetDimensions</A></TD>
- <TD WIDTH=250><A HREF="./SVDMonitorFirst.html">SVDMonitorFirst</A></TD>
+ <TD WIDTH=250><A HREF="./SVDMonitorLGCreate.html">SVDMonitorLGCreate</A></TD>
  <TD WIDTH=250><A HREF="./SVDValuesView.html">SVDValuesView</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDGetIterationNumber.html">SVDGetIterationNumber</A></TD>
@@ -67,62 +75,66 @@ The user interface is very similar to that of EPS, both for the options database
  <TD WIDTH=250><A HREF="./SVDWhich.html">SVDWhich</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDGetTolerances.html">SVDGetTolerances</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetDimensions.html">SVDSetDimensions</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./SVDGetType.html">SVDGetType</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetInitialSpace.html">SVDSetInitialSpace</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetConvergenceTest.html">SVDSetConvergenceTest</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Advanced - Setting more advanced options and customization</B></TD></TR>
  <TD WIDTH=250><A HREF="./SVDAppendOptionsPrefix.html">SVDAppendOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./SVDGetDS.html">SVDGetDS</A></TD>
- <TD WIDTH=250><A HREF="./SVDReset.html">SVDReset</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetOperator.html">SVDGetOperator</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetDS.html">SVDSetDS</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDCrossGetEPS.html">SVDCrossGetEPS</A></TD>
- <TD WIDTH=250><A HREF="./SVDGetImplicitTranspose.html">SVDGetImplicitTranspose</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetBV.html">SVDSetBV</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetOptionsPrefix.html">SVDGetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetImplicitTranspose.html">SVDSetImplicitTranspose</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDCrossSetEPS.html">SVDCrossSetEPS</A></TD>
- <TD WIDTH=250><A HREF="./SVDGetOperator.html">SVDGetOperator</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetDS.html">SVDSetDS</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetStoppingTest.html">SVDGetStoppingTest</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetOptionsPrefix.html">SVDSetOptionsPrefix</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDCyclicGetEPS.html">SVDCyclicGetEPS</A></TD>
- <TD WIDTH=250><A HREF="./SVDGetOptionsPrefix.html">SVDGetOptionsPrefix</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetImplicitTranspose.html">SVDSetImplicitTranspose</A></TD>
+ <TD WIDTH=250><A HREF="./SVDLanczosGetOneSide.html">SVDLanczosGetOneSide</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetStoppingTest.html">SVDSetStoppingTest</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDCyclicGetExplicitMatrix.html">SVDCyclicGetExplicitMatrix</A></TD>
- <TD WIDTH=250><A HREF="./SVDLanczosGetOneSide.html">SVDLanczosGetOneSide</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetOptionsPrefix.html">SVDSetOptionsPrefix</A></TD>
+ <TD WIDTH=250><A HREF="./SVDLanczosSetOneSide.html">SVDLanczosSetOneSide</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetStoppingTestFunction.html">SVDSetStoppingTestFunction</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDCyclicSetEPS.html">SVDCyclicSetEPS</A></TD>
- <TD WIDTH=250><A HREF="./SVDLanczosSetOneSide.html">SVDLanczosSetOneSide</A></TD>
- <TD WIDTH=250><A HREF="./SVDTRLanczosGetOneSide.html">SVDTRLanczosGetOneSide</A></TD>
+ <TD WIDTH=250><A HREF="./SVDRegister.html">SVDRegister</A></TD>
+ <TD WIDTH=250><A HREF="./SVDStop.html">SVDStop</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDCyclicSetExplicitMatrix.html">SVDCyclicSetExplicitMatrix</A></TD>
  <TD WIDTH=250><A HREF="./SVDRegisterAll.html">SVDRegisterAll</A></TD>
- <TD WIDTH=250><A HREF="./SVDTRLanczosSetOneSide.html">SVDTRLanczosSetOneSide</A></TD>
+ <TD WIDTH=250><A HREF="./SVDStoppingBasic.html">SVDStoppingBasic</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDGetBV.html">SVDGetBV</A></TD>
- <TD WIDTH=250><A HREF="./SVDRegister.html">SVDRegister</A></TD>
+ <TD WIDTH=250><A HREF="./SVDReset.html">SVDReset</A></TD>
+ <TD WIDTH=250><A HREF="./SVDTRLanczosGetOneSide.html">SVDTRLanczosGetOneSide</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./SVDGetDS.html">SVDGetDS</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetBV.html">SVDSetBV</A></TD>
+ <TD WIDTH=250><A HREF="./SVDTRLanczosSetOneSide.html">SVDTRLanczosSetOneSide</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./SVDGetImplicitTranspose.html">SVDGetImplicitTranspose</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetConvergenceTestFunction.html">SVDSetConvergenceTestFunction</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./SVDAllocateSolution.html">SVDAllocateSolution</A></TD>
+ <TD WIDTH=250><A HREF="./SVDGetTrackAll.html">SVDGetTrackAll</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetTrackAll.html">SVDSetTrackAll</A></TD>
+<TR>
+ <TD WIDTH=250><A HREF="./SVDConvMonitorSetFromOptions.html">SVDConvMonitorSetFromOptions</A></TD>
  <TD WIDTH=250><A HREF="./SVDInitializePackage.html">SVDInitializePackage</A></TD>
- <TD WIDTH=250><A HREF="./SVDValuesViewFromOptions.html">SVDValuesViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./SVDSetUp.html">SVDSetUp</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDErrorViewFromOptions.html">SVDErrorViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./SVDReasonViewFromOptions.html">SVDReasonViewFromOptions</A></TD>
- <TD WIDTH=250><A HREF="./SVDVectorsViewFromOptions.html">SVDVectorsViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./SVDMonitorSetFromOptions.html">SVDMonitorSetFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./SVDValuesViewFromOptions.html">SVDValuesViewFromOptions</A></TD>
 <TR>
  <TD WIDTH=250><A HREF="./SVDFinalizePackage.html">SVDFinalizePackage</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetTrackAll.html">SVDSetTrackAll</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
-<TR>
- <TD WIDTH=250><A HREF="./SVDGetTrackAll.html">SVDGetTrackAll</A></TD>
- <TD WIDTH=250><A HREF="./SVDSetUp.html">SVDSetUp</A></TD>
- <TD WIDTH=250><A HREF="./"></A></TD>
+ <TD WIDTH=250><A HREF="./SVDReasonViewFromOptions.html">SVDReasonViewFromOptions</A></TD>
+ <TD WIDTH=250><A HREF="./SVDVectorsViewFromOptions.html">SVDVectorsViewFromOptions</A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>No deprecated routines</B></TD></TR>
 </TABLE>
diff --git a/docs/manualpages/singleindex.html b/docs/manualpages/singleindex.html
index 8adda4f..c98094c 100644
--- a/docs/manualpages/singleindex.html
+++ b/docs/manualpages/singleindex.html
@@ -20,115 +20,119 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./BV/BV.html">BV</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVGetOptionsPrefix.html">BVGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVOrthogType.html">BVOrthogType</A></TD>
-<TR>
-<TD WIDTH=250><A HREF="./BV/BVAXPY.html">BVAXPY</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVGetOrthogonalization.html">BVGetOrthogonalization</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVOrthogonalize.html">BVOrthogonalize</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVAppendOptionsPrefix.html">BVAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVGetSignature.html">BVGetSignature</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetRandomContext.html">BVGetRandomContext</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVOrthogonalizeColumn.html">BVOrthogonalizeColumn</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVApplyMatrix.html">BVApplyMatrix</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVGetSizes.html">BVGetSizes</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetSignature.html">BVGetSignature</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVOrthogonalizeSomeColumn.html">BVOrthogonalizeSomeColumn</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVApplyMatrixBV.html">BVApplyMatrixBV</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVGetType.html">BVGetType</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetSizes.html">BVGetSizes</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVOrthogonalizeVec.html">BVOrthogonalizeVec</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVCopy.html">BVCopy</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVInitializePackage.html">BVInitializePackage</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetType.html">BVGetType</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVRegister.html">BVRegister</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVCopyColumn.html">BVCopyColumn</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVInsertConstraints.html">BVInsertConstraints</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVInitializePackage.html">BVInitializePackage</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVRegisterAll.html">BVRegisterAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVCopyVec.html">BVCopyVec</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVInsertVec.html">BVInsertVec</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVInsertConstraints.html">BVInsertConstraints</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVResize.html">BVResize</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVCreate.html">BVCreate</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVInsertVecs.html">BVInsertVecs</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVInsertVec.html">BVInsertVec</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVRestoreArray.html">BVRestoreArray</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVCreateVec.html">BVCreateVec</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVInsertVecs.html">BVInsertVecs</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVRestoreArrayRead.html">BVRestoreArrayRead</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./BV/BVDestroy.html">BVDestroy</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMatMult.html">BVMatMult</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVRestoreColumn.html">BVRestoreColumn</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDestroy.html">BVDestroy</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDot.html">BVDot</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMatMultColumn.html">BVMatMultColumn</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVScale.html">BVScale</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDot.html">BVDot</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDotColumn.html">BVDotColumn</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMatMultHermitianTranspose.html">BVMatMultHermitianTranspose</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVScaleColumn.html">BVScaleColumn</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDotColumn.html">BVDotColumn</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDotColumnBegin.html">BVDotColumnBegin</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMatMultType.html">BVMatMultType</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetActiveColumns.html">BVSetActiveColumns</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDotColumnBegin.html">BVDotColumnBegin</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDotColumnEnd.html">BVDotColumnEnd</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMatProject.html">BVMatProject</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetFromOptions.html">BVSetFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDotColumnEnd.html">BVDotColumnEnd</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDotVec.html">BVDotVec</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMult.html">BVMult</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetMatMultMethod.html">BVSetMatMultMethod</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDotVec.html">BVDotVec</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDotVecBegin.html">BVDotVecBegin</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMultColumn.html">BVMultColumn</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetMatrix.html">BVSetMatrix</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDotVecBegin.html">BVDotVecBegin</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDotVecEnd.html">BVDotVecEnd</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMultInPlace.html">BVMultInPlace</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetNumConstraints.html">BVSetNumConstraints</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDotVecEnd.html">BVDotVecEnd</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDuplicate.html">BVDuplicate</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMultInPlaceTranspose.html">BVMultInPlaceTranspose</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetOptionsPrefix.html">BVSetOptionsPrefix</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDuplicate.html">BVDuplicate</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVDuplicateResize.html">BVDuplicateResize</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVMultVec.html">BVMultVec</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetOrthogonalization.html">BVSetOrthogonalization</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVDuplicateResize.html">BVDuplicateResize</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVFinalizePackage.html">BVFinalizePackage</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNorm.html">BVNorm</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetRandom.html">BVSetRandom</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVFinalizePackage.html">BVFinalizePackage</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetActiveColumns.html">BVGetActiveColumns</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNormColumn.html">BVNormColumn</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVSetRandomColumn.html">BVSetRandomColumn</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVGetActiveColumns.html">BVGetActiveColumns</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetArray.html">BVGetArray</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNormColumnBegin.html">BVNormColumnBegin</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVSetSignature.html">BVSetSignature</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVSetRandomContext.html">BVSetRandomContext</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./BV/BVGetArray.html">BVGetArray</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVGetArrayRead.html">BVGetArrayRead</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNormColumnEnd.html">BVNormColumnEnd</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVSetSizes.html">BVSetSizes</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVSetSignature.html">BVSetSignature</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVGetCachedBV.html">BVGetCachedBV</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNormVec.html">BVNormVec</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVSetSizesFromVec.html">BVSetSizesFromVec</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVSetSizes.html">BVSetSizes</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVGetColumn.html">BVGetColumn</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNormVecBegin.html">BVNormVecBegin</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVSetType.html">BVSetType</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVSetSizesFromVec.html">BVSetSizesFromVec</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVGetMatMultMethod.html">BVGetMatMultMethod</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVNormVecEnd.html">BVNormVecEnd</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVType.html">BVType</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVSetType.html">BVSetType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVGetMatrix.html">BVGetMatrix</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVOrthogBlockType.html">BVOrthogBlockType</A></TD>
-<TD WIDTH=250><A HREF="./BV/BVView.html">BVView</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVType.html">BVType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./BV/BVGetNumConstraints.html">BVGetNumConstraints</A></TD>
 <TD WIDTH=250><A HREF="./BV/BVOrthogRefineType.html">BVOrthogRefineType</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVView.html">BVView</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./BV/BVGetOptionsPrefix.html">BVGetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./BV/BVOrthogType.html">BVOrthogType</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 </TABLE><A NAME="d"></A>
@@ -146,35 +150,35 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./DS/DS.html">DS</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSGetState.html">DSGetState</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSGetType.html">DSGetType</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetFromOptions.html">DSSetFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSAllocate.html">DSAllocate</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSGetType.html">DSGetType</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSInitializePackage.html">DSInitializePackage</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetIdentity.html">DSSetIdentity</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSAppendOptionsPrefix.html">DSAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSInitializePackage.html">DSInitializePackage</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSMatType.html">DSMatType</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetMethod.html">DSSetMethod</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSCond.html">DSCond</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSMatType.html">DSMatType</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSNEPGetFN.html">DSNEPGetFN</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetOptionsPrefix.html">DSSetOptionsPrefix</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSCopyMat.html">DSCopyMat</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSNEPGetFN.html">DSNEPGetFN</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSNEPGetNumFN.html">DSNEPGetNumFN</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetRefined.html">DSSetRefined</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSCreate.html">DSCreate</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSNEPGetNumFN.html">DSNEPGetNumFN</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSNEPSetFN.html">DSNEPSetFN</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetSlepcSC.html">DSSetSlepcSC</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSDestroy.html">DSDestroy</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSNEPSetFN.html">DSNEPSetFN</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSNormalize.html">DSNormalize</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetState.html">DSSetState</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSFinalizePackage.html">DSFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSNormalize.html">DSNormalize</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSOrthogonalize.html">DSOrthogonalize</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetType.html">DSSetType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetArray.html">DSGetArray</A></TD>
@@ -186,42 +190,46 @@
 <TD WIDTH=250><A HREF="./DS/DSSort.html">DSSort</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetBlockSize.html">DSGetBlockSize</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSRegister.html">DSRegister</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSPseudoOrthogonalize.html">DSPseudoOrthogonalize</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSStateType.html">DSStateType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetCompact.html">DSGetCompact</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSRegisterAll.html">DSRegisterAll</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSRegister.html">DSRegister</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSTranslateHarmonic.html">DSTranslateHarmonic</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetDimensions.html">DSGetDimensions</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSReset.html">DSReset</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSRegisterAll.html">DSRegisterAll</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSTranslateRKS.html">DSTranslateRKS</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetExtraRow.html">DSGetExtraRow</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSRestoreArray.html">DSRestoreArray</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSReset.html">DSReset</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSTruncate.html">DSTruncate</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetLeadingDimension.html">DSGetLeadingDimension</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSRestoreArrayReal.html">DSRestoreArrayReal</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSRestoreArray.html">DSRestoreArray</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSType.html">DSType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetMat.html">DSGetMat</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSRestoreMat.html">DSRestoreMat</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSRestoreArrayReal.html">DSRestoreArrayReal</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSUpdateExtraRow.html">DSUpdateExtraRow</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetMethod.html">DSGetMethod</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSSetBlockSize.html">DSSetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSRestoreMat.html">DSRestoreMat</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSVectors.html">DSVectors</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetOptionsPrefix.html">DSGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSSetCompact.html">DSSetCompact</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSSetBlockSize.html">DSSetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSView.html">DSView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetRefined.html">DSGetRefined</A></TD>
-<TD WIDTH=250><A HREF="./DS/DSSetDimensions.html">DSSetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSSetCompact.html">DSSetCompact</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSViewMat.html">DSViewMat</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./DS/DSGetSlepcSC.html">DSGetSlepcSC</A></TD>
+<TD WIDTH=250><A HREF="./DS/DSSetDimensions.html">DSSetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./DS/DSGetState.html">DSGetState</A></TD>
 <TD WIDTH=250><A HREF="./DS/DSSetExtraRow.html">DSSetExtraRow</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
@@ -240,230 +248,254 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./EPS/EPS.html">EPS</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSGetInvariantSubspace.html">EPSGetInvariantSubspace</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetInterval.html">EPSGetInterval</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSMonitorAll.html">EPSMonitorAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./EPS/EPSAllocateSolution.html">EPSAllocateSolution</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSGetIterationNumber.html">EPSGetIterationNumber</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetInvariantSubspace.html">EPSGetInvariantSubspace</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSMonitorCancel.html">EPSMonitorCancel</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./EPS/EPSAppendOptionsPrefix.html">EPSAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSGetMonitorContext.html">EPSGetMonitorContext</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetIterationNumber.html">EPSGetIterationNumber</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSMonitorConverged.html">EPSMonitorConverged</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./EPS/EPSArnoldiGetDelayed.html">EPSArnoldiGetDelayed</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSGetOperators.html">EPSGetOperators</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetMonitorContext.html">EPSGetMonitorContext</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSMonitorFirst.html">EPSMonitorFirst</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./EPS/EPSArnoldiSetDelayed.html">EPSArnoldiSetDelayed</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetOperators.html">EPSGetOperators</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSMonitorLGCreate.html">EPSMonitorLGCreate</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./EPS/EPSBLOPEXGetBlockSize.html">EPSBLOPEXGetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetOptionsPrefix.html">EPSGetOptionsPrefix</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSMonitorSet.html">EPSMonitorSet</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSBLOPEXGetBlockSize.html">EPSBLOPEXGetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSBLOPEXSetBlockSize.html">EPSBLOPEXSetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetProblemType.html">EPSGetProblemType</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSPRIMMEGetBlockSize.html">EPSPRIMMEGetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSMonitorSetFromOptions.html">EPSMonitorSetFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSBLOPEXSetBlockSize.html">EPSBLOPEXSetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSBalance.html">EPSBalance</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetPurify.html">EPSGetPurify</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSPRIMMEGetMethod.html">EPSPRIMMEGetMethod</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSPRIMMEGetBlockSize.html">EPSPRIMMEGetBlockSize</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSBalance.html">EPSBalance</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSBlzpackSetBlockSize.html">EPSBlzpackSetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetRG.html">EPSGetRG</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSPRIMMEMethod.html">EPSPRIMMEMethod</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSPRIMMEGetMethod.html">EPSPRIMMEGetMethod</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSBlzpackSetBlockSize.html">EPSBlzpackSetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSBlzpackSetNSteps.html">EPSBlzpackSetNSteps</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetST.html">EPSGetST</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSPRIMMEMethod.html">EPSPRIMMEMethod</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSExtraction.html">EPSCISSExtraction</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetStoppingTest.html">EPSGetStoppingTest</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSPRIMMESetBlockSize.html">EPSPRIMMESetBlockSize</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSBlzpackSetNSteps.html">EPSBlzpackSetNSteps</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSGetExtraction.html">EPSCISSGetExtraction</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetTarget.html">EPSGetTarget</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSPRIMMESetMethod.html">EPSPRIMMESetMethod</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSGetRefinement.html">EPSCISSGetRefinement</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSGetQuadRule.html">EPSCISSGetQuadRule</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetTolerances.html">EPSGetTolerances</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSPowerGetShiftType.html">EPSPowerGetShiftType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSGetSizes.html">EPSCISSGetSizes</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSGetRefinement.html">EPSCISSGetRefinement</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetTrackAll.html">EPSGetTrackAll</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSPowerSetShiftType.html">EPSPowerSetShiftType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSGetThreshold.html">EPSCISSGetThreshold</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSGetSizes.html">EPSCISSGetSizes</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetTrueResidual.html">EPSGetTrueResidual</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSPowerShiftType.html">EPSPowerShiftType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSGetUseST.html">EPSCISSGetUseST</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSGetThreshold.html">EPSCISSGetThreshold</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetType.html">EPSGetType</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSProblemType.html">EPSProblemType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSSetRefinement.html">EPSCISSSetRefinement</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSGetUseST.html">EPSCISSGetUseST</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSGetWhichEigenpairs.html">EPSGetWhichEigenpairs</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSRQCGGetReset.html">EPSRQCGGetReset</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSSetSizes.html">EPSCISSSetSizes</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSQuadRule.html">EPSCISSQuadRule</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSInitializePackage.html">EPSInitializePackage</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSRQCGSetReset.html">EPSRQCGSetReset</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSSetThreshold.html">EPSCISSSetThreshold</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSSetExtraction.html">EPSCISSSetExtraction</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSIsGeneralized.html">EPSIsGeneralized</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSReasonView.html">EPSReasonView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCISSSetUseST.html">EPSCISSSetUseST</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSSetQuadRule.html">EPSCISSSetQuadRule</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSIsHermitian.html">EPSIsHermitian</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSReasonViewFromOptions.html">EPSReasonViewFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSComputeError.html">EPSComputeError</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSSetRefinement.html">EPSCISSSetRefinement</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSIsPositive.html">EPSIsPositive</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSRegister.html">EPSRegister</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSConv.html">EPSConv</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSSetSizes.html">EPSCISSSetSizes</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetBOrth.html">EPSJDGetBOrth</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSRegisterAll.html">EPSRegisterAll</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSConvergedReason.html">EPSConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSSetThreshold.html">EPSCISSSetThreshold</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetBlockSize.html">EPSJDGetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSReset.html">EPSReset</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSCreate.html">EPSCreate</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCISSSetUseST.html">EPSCISSSetUseST</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetConstCorrectionTol.html">EPSJDGetConstCorrectionTol</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetArbitrarySelection.html">EPSSetArbitrarySelection</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSDestroy.html">EPSDestroy</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSComputeError.html">EPSComputeError</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetFix.html">EPSJDGetFix</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetBV.html">EPSSetBV</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSErrorType.html">EPSErrorType</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSConv.html">EPSConv</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetInitialSize.html">EPSJDGetInitialSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetBalance.html">EPSSetBalance</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSErrorView.html">EPSErrorView</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSConvMonitorSetFromOptions.html">EPSConvMonitorSetFromOptions</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetKrylovStart.html">EPSJDGetKrylovStart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetConvergenceTest.html">EPSSetConvergenceTest</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSErrorViewFromOptions.html">EPSErrorViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSConvergedReason.html">EPSConvergedReason</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetRestart.html">EPSJDGetRestart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetConvergenceTestFunction.html">EPSSetConvergenceTestFunction</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSExtraction.html">EPSExtraction</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSCreate.html">EPSCreate</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDGetWindowSizes.html">EPSJDGetWindowSizes</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetDS.html">EPSSetDS</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSFEASTGetNumPoints.html">EPSFEASTGetNumPoints</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSDestroy.html">EPSDestroy</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetBOrth.html">EPSJDSetBOrth</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetDeflationSpace.html">EPSSetDeflationSpace</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSFEASTSetNumPoints.html">EPSFEASTSetNumPoints</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSErrorType.html">EPSErrorType</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetBlockSize.html">EPSJDSetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetDimensions.html">EPSSetDimensions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSFinalizePackage.html">EPSFinalizePackage</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSErrorView.html">EPSErrorView</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetConstCorrectionTol.html">EPSJDSetConstCorrectionTol</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetEigenvalueComparison.html">EPSSetEigenvalueComparison</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetBOrth.html">EPSGDGetBOrth</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSErrorViewFromOptions.html">EPSErrorViewFromOptions</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetFix.html">EPSJDSetFix</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetExtraction.html">EPSSetExtraction</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetBlockSize.html">EPSGDGetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSExtraction.html">EPSExtraction</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetInitialSize.html">EPSJDSetInitialSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetFromOptions.html">EPSSetFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetDoubleExpansion.html">EPSGDGetDoubleExpansion</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSFEASTGetNumPoints.html">EPSFEASTGetNumPoints</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetKrylovStart.html">EPSJDSetKrylovStart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetInitialSpace.html">EPSSetInitialSpace</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetInitialSize.html">EPSGDGetInitialSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSFEASTSetNumPoints.html">EPSFEASTSetNumPoints</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetRestart.html">EPSJDSetRestart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetInterval.html">EPSSetInterval</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetKrylovStart.html">EPSGDGetKrylovStart</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSFinalizePackage.html">EPSFinalizePackage</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSJDSetWindowSizes.html">EPSJDSetWindowSizes</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetOperators.html">EPSSetOperators</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetRestart.html">EPSGDGetRestart</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetBOrth.html">EPSGDGetBOrth</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetDetectZeros.html">EPSKrylovSchurGetDetectZeros</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetOptionsPrefix.html">EPSSetOptionsPrefix</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDGetWindowSizes.html">EPSGDGetWindowSizes</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetBlockSize.html">EPSGDGetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetDimensions.html">EPSKrylovSchurGetDimensions</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetProblemType.html">EPSSetProblemType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetBOrth.html">EPSGDSetBOrth</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetDoubleExpansion.html">EPSGDGetDoubleExpansion</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetInertias.html">EPSKrylovSchurGetInertias</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetPurify.html">EPSSetPurify</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetBlockSize.html">EPSGDSetBlockSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetInitialSize.html">EPSGDGetInitialSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetLocking.html">EPSKrylovSchurGetLocking</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetRG.html">EPSSetRG</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetDoubleExpansion.html">EPSGDSetDoubleExpansion</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetKrylovStart.html">EPSGDGetKrylovStart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetPartitions.html">EPSKrylovSchurGetPartitions</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSSetST.html">EPSSetST</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetInitialSize.html">EPSGDSetInitialSize</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetRestart.html">EPSGDGetRestart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetRestart.html">EPSKrylovSchurGetRestart</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetTarget.html">EPSSetTarget</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetStoppingTest.html">EPSSetStoppingTest</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetKrylovStart.html">EPSGDSetKrylovStart</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDGetWindowSizes.html">EPSGDGetWindowSizes</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetSubcommInfo.html">EPSKrylovSchurGetSubcommInfo</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetTolerances.html">EPSSetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetStoppingTestFunction.html">EPSSetStoppingTestFunction</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetRestart.html">EPSGDSetRestart</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetBOrth.html">EPSGDSetBOrth</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetSubcommMats.html">EPSKrylovSchurGetSubcommMats</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetTarget.html">EPSSetTarget</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetBlockSize.html">EPSGDSetBlockSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetSubcommPairs.html">EPSKrylovSchurGetSubcommPairs</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetTrackAll.html">EPSSetTrackAll</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetTolerances.html">EPSSetTolerances</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGDSetWindowSizes.html">EPSGDSetWindowSizes</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetDoubleExpansion.html">EPSGDSetDoubleExpansion</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurGetSubintervals.html">EPSKrylovSchurGetSubintervals</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetTrueResidual.html">EPSSetTrueResidual</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetTrackAll.html">EPSSetTrackAll</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetBV.html">EPSGetBV</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetInitialSize.html">EPSGDSetInitialSize</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurSetDetectZeros.html">EPSKrylovSchurSetDetectZeros</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetType.html">EPSSetType</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetTrueResidual.html">EPSSetTrueResidual</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetBalance.html">EPSGetBalance</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetKrylovStart.html">EPSGDSetKrylovStart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurSetDimensions.html">EPSKrylovSchurSetDimensions</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetUp.html">EPSSetUp</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetType.html">EPSSetType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetConverged.html">EPSGetConverged</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetRestart.html">EPSGDSetRestart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurSetLocking.html">EPSKrylovSchurSetLocking</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetWhichEigenpairs.html">EPSSetWhichEigenpairs</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetUp.html">EPSSetUp</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetConvergedReason.html">EPSGetConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGDSetWindowSizes.html">EPSGDSetWindowSizes</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurSetPartitions.html">EPSKrylovSchurSetPartitions</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSetWorkVecs.html">EPSSetWorkVecs</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetWhichEigenpairs.html">EPSSetWhichEigenpairs</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetConvergenceTest.html">EPSGetConvergenceTest</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetBV.html">EPSGetBV</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurSetRestart.html">EPSKrylovSchurSetRestart</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSSolve.html">EPSSolve</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSetWorkVecs.html">EPSSetWorkVecs</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetDS.html">EPSGetDS</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetBalance.html">EPSGetBalance</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurSetSubintervals.html">EPSKrylovSchurSetSubintervals</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSType.html">EPSType</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSSolve.html">EPSSolve</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetDimensions.html">EPSGetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetConverged.html">EPSGetConverged</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSKrylovSchurUpdateSubcommMats.html">EPSKrylovSchurUpdateSubcommMats</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSStop.html">EPSStop</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./EPS/EPSGetConvergedReason.html">EPSGetConvergedReason</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLOBPCGGetBlockSize.html">EPSLOBPCGGetBlockSize</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSValuesView.html">EPSValuesView</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSStoppingBasic.html">EPSStoppingBasic</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetEigenpair.html">EPSGetEigenpair</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetConvergenceTest.html">EPSGetConvergenceTest</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLOBPCGGetLocking.html">EPSLOBPCGGetLocking</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSValuesViewFromOptions.html">EPSValuesViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSType.html">EPSType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetEigenvalue.html">EPSGetEigenvalue</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetDS.html">EPSGetDS</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSLOBPCGGetRestart.html">EPSLOBPCGGetRestart</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSValuesView.html">EPSValuesView</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./EPS/EPSGetDimensions.html">EPSGetDimensions</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLOBPCGSetBlockSize.html">EPSLOBPCGSetBlockSize</A></TD>
-<TD WIDTH=250><A HREF="./EPS/EPSVectorsView.html">EPSVectorsView</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSValuesViewFromOptions.html">EPSValuesViewFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetEigenvector.html">EPSGetEigenvector</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetEigenpair.html">EPSGetEigenpair</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLOBPCGSetLocking.html">EPSLOBPCGSetLocking</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSVectorsView.html">EPSVectorsView</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./EPS/EPSGetEigenvalue.html">EPSGetEigenvalue</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSLOBPCGSetRestart.html">EPSLOBPCGSetRestart</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSVectorsViewFromOptions.html">EPSVectorsViewFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetErrorEstimate.html">EPSGetErrorEstimate</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetEigenvector.html">EPSGetEigenvector</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLanczosGetReorthog.html">EPSLanczosGetReorthog</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSView.html">EPSView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetExtraction.html">EPSGetExtraction</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetErrorEstimate.html">EPSGetErrorEstimate</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLanczosReorthogType.html">EPSLanczosReorthogType</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSWhich.html">EPSWhich</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./EPS/EPSGetInterval.html">EPSGetInterval</A></TD>
+<TD WIDTH=250><A HREF="./EPS/EPSGetExtraction.html">EPSGetExtraction</A></TD>
 <TD WIDTH=250><A HREF="./EPS/EPSLanczosSetReorthog.html">EPSLanczosSetReorthog</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
@@ -482,44 +514,48 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./FN/FN.html">FN</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNEvaluateFunctionMat.html">FNEvaluateFunctionMat</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNRationalSetDenominator.html">FNRationalSetDenominator</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNEvaluateFunctionMatVec.html">FNEvaluateFunctionMatVec</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNRationalSetNumerator.html">FNRationalSetNumerator</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNAppendOptionsPrefix.html">FNAppendOptionsPrefix</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNFinalizePackage.html">FNFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNRationalSetNumerator.html">FNRationalSetNumerator</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNRegister.html">FNRegister</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNCombineGetChildren.html">FNCombineGetChildren</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNGetOptionsPrefix.html">FNGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNRegister.html">FNRegister</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNRegisterAll.html">FNRegisterAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNCombineSetChildren.html">FNCombineSetChildren</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNGetScale.html">FNGetScale</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNRegisterAll.html">FNRegisterAll</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNSetFromOptions.html">FNSetFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNCombineType.html">FNCombineType</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNGetType.html">FNGetType</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNSetFromOptions.html">FNSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNSetOptionsPrefix.html">FNSetOptionsPrefix</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNCreate.html">FNCreate</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNInitializePackage.html">FNInitializePackage</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNSetOptionsPrefix.html">FNSetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNSetScale.html">FNSetScale</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNDestroy.html">FNDestroy</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNPhiGetIndex.html">FNPhiGetIndex</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNSetScale.html">FNSetScale</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNSetType.html">FNSetType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNDuplicate.html">FNDuplicate</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNPhiSetIndex.html">FNPhiSetIndex</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNSetType.html">FNSetType</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNType.html">FNType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNEvaluateDerivative.html">FNEvaluateDerivative</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNRationalGetDenominator.html">FNRationalGetDenominator</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNType.html">FNType</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNView.html">FNView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./FN/FNEvaluateFunction.html">FNEvaluateFunction</A></TD>
 <TD WIDTH=250><A HREF="./FN/FNRationalGetNumerator.html">FNRationalGetNumerator</A></TD>
-<TD WIDTH=250><A HREF="./FN/FNView.html">FNView</A></TD>
+<TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./FN/FNEvaluateFunctionMat.html">FNEvaluateFunctionMat</A></TD>
+<TD WIDTH=250><A HREF="./FN/FNRationalSetDenominator.html">FNRationalSetDenominator</A></TD>
+<TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 </TABLE><A NAME="m"></A>
 <H3> <CENTER> | <A HREF="singleindex.html#b"> B </A> | 
@@ -537,60 +573,60 @@
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./MFN/MFN.html">MFN</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNGetOperator.html">MFNGetOperator</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetDimensions.html">MFNSetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNReset.html">MFNReset</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNAllocateSolution.html">MFNAllocateSolution</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNGetOptionsPrefix.html">MFNGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetErrorIfNotConverged.html">MFNSetErrorIfNotConverged</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetBV.html">MFNSetBV</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNAppendOptionsPrefix.html">MFNAppendOptionsPrefix</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNGetTolerances.html">MFNGetTolerances</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetFN.html">MFNSetFN</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetDimensions.html">MFNSetDimensions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNConvergedReason.html">MFNConvergedReason</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNGetType.html">MFNGetType</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetFromOptions.html">MFNSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetErrorIfNotConverged.html">MFNSetErrorIfNotConverged</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNCreate.html">MFNCreate</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNInitializePackage.html">MFNInitializePackage</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetOperator.html">MFNSetOperator</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetFN.html">MFNSetFN</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNDestroy.html">MFNDestroy</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNMonitorCancel.html">MFNMonitorCancel</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetOptionsPrefix.html">MFNSetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetFromOptions.html">MFNSetFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNFinalizePackage.html">MFNFinalizePackage</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNMonitorDefault.html">MFNMonitorDefault</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetTolerances.html">MFNSetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetOperator.html">MFNSetOperator</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./MFN/MFNGetBV.html">MFNGetBV</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNMonitorLGCreate.html">MFNMonitorLGCreate</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetOptionsPrefix.html">MFNSetOptionsPrefix</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./MFN/MFNGetConvergedReason.html">MFNGetConvergedReason</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNMonitorSet.html">MFNMonitorSet</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNSetTolerances.html">MFNSetTolerances</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./MFN/MFNGetDimensions.html">MFNGetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNMonitorSetFromOptions.html">MFNMonitorSetFromOptions</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNSetType.html">MFNSetType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./MFN/MFNGetConvergedReason.html">MFNGetConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNGetErrorIfNotConverged.html">MFNGetErrorIfNotConverged</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNReasonView.html">MFNReasonView</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNSetUp.html">MFNSetUp</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./MFN/MFNGetDimensions.html">MFNGetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNGetFN.html">MFNGetFN</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNReasonViewFromOptions.html">MFNReasonViewFromOptions</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNSolve.html">MFNSolve</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./MFN/MFNGetErrorIfNotConverged.html">MFNGetErrorIfNotConverged</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNGetIterationNumber.html">MFNGetIterationNumber</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNRegister.html">MFNRegister</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNType.html">MFNType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./MFN/MFNGetFN.html">MFNGetFN</A></TD>
+<TD WIDTH=250><A HREF="./MFN/MFNGetMonitorContext.html">MFNGetMonitorContext</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNRegisterAll.html">MFNRegisterAll</A></TD>
 <TD WIDTH=250><A HREF="./MFN/MFNView.html">MFNView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./MFN/MFNGetIterationNumber.html">MFNGetIterationNumber</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNReset.html">MFNReset</A></TD>
-<TD WIDTH=250><A HREF="./"></A></TD>
-<TR>
-<TD WIDTH=250><A HREF="./MFN/MFNGetMonitorContext.html">MFNGetMonitorContext</A></TD>
-<TD WIDTH=250><A HREF="./MFN/MFNSetBV.html">MFNSetBV</A></TD>
-<TD WIDTH=250><A HREF="./"></A></TD>
-<TR>
 </TABLE><A NAME="n"></A>
 <H3> <CENTER> | <A HREF="singleindex.html#b"> B </A> | 
 <A HREF="singleindex.html#d"> D </A> | 
@@ -606,131 +642,175 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./NEP/NEP.html">NEP</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetKSP.html">NEPGetKSP</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetBV.html">NEPSetBV</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetTolerances.html">NEPGetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRefineGetKSP.html">NEPRefineGetKSP</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPAllocateSolution.html">NEPAllocateSolution</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetLagPreconditioner.html">NEPGetLagPreconditioner</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetConstCorrectionTol.html">NEPSetConstCorrectionTol</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetTrackAll.html">NEPGetTrackAll</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRefineScheme.html">NEPRefineScheme</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPAppendOptionsPrefix.html">NEPAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetMonitorContext.html">NEPGetMonitorContext</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetConvergenceTest.html">NEPSetConvergenceTest</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetType.html">NEPGetType</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRegister.html">NEPRegister</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPApplyFunction.html">NEPApplyFunction</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetOptionsPrefix.html">NEPGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetDS.html">NEPSetDS</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetWhichEigenpairs.html">NEPGetWhichEigenpairs</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRegisterAll.html">NEPRegisterAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPApplyJacobian.html">NEPApplyJacobian</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetRG.html">NEPGetRG</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetDimensions.html">NEPSetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPInitializePackage.html">NEPInitializePackage</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPReset.html">NEPReset</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCISSGetRefinement.html">NEPCISSGetRefinement</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetRefine.html">NEPGetRefine</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetFromOptions.html">NEPSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPInterpolGetDegree.html">NEPInterpolGetDegree</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSLPGetEPS.html">NEPSLPGetEPS</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCISSGetSizes.html">NEPCISSGetSizes</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetSplitOperatorInfo.html">NEPGetSplitOperatorInfo</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetFunction.html">NEPSetFunction</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPInterpolGetPEP.html">NEPInterpolGetPEP</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSLPSetEPS.html">NEPSLPSetEPS</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCISSGetThreshold.html">NEPCISSGetThreshold</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetSplitOperatorTerm.html">NEPGetSplitOperatorTerm</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetInitialSpace.html">NEPSetInitialSpace</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPInterpolSetDegree.html">NEPInterpolSetDegree</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetBV.html">NEPSetBV</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCISSSetRefinement.html">NEPCISSSetRefinement</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetTarget.html">NEPGetTarget</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetJacobian.html">NEPSetJacobian</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPInterpolSetPEP.html">NEPInterpolSetPEP</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetConvergenceTest.html">NEPSetConvergenceTest</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCISSSetSizes.html">NEPCISSSetSizes</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetTolerances.html">NEPGetTolerances</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetKSP.html">NEPSetKSP</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorAll.html">NEPMonitorAll</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetConvergenceTestFunction.html">NEPSetConvergenceTestFunction</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCISSSetThreshold.html">NEPCISSSetThreshold</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetTrackAll.html">NEPGetTrackAll</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetLagPreconditioner.html">NEPSetLagPreconditioner</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorCancel.html">NEPMonitorCancel</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetDS.html">NEPSetDS</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPComputeError.html">NEPComputeError</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetType.html">NEPGetType</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetOptionsPrefix.html">NEPSetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorConverged.html">NEPMonitorConverged</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetDerivatives.html">NEPSetDerivatives</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPComputeFunction.html">NEPComputeFunction</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPGetWhichEigenpairs.html">NEPGetWhichEigenpairs</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetRG.html">NEPSetRG</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorFirst.html">NEPMonitorFirst</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetDimensions.html">NEPSetDimensions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPComputeJacobian.html">NEPComputeJacobian</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPInitializePackage.html">NEPInitializePackage</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetRefine.html">NEPSetRefine</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorLGCreate.html">NEPMonitorLGCreate</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetEigenvalueComparison.html">NEPSetEigenvalueComparison</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPConv.html">NEPConv</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorSet.html">NEPMonitorSet</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetFromOptions.html">NEPSetFromOptions</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPConvMonitorSetFromOptions.html">NEPConvMonitorSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPMonitorSetFromOptions.html">NEPMonitorSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetFunction.html">NEPSetFunction</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPConvergedReason.html">NEPConvergedReason</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPInterpolGetDegree.html">NEPInterpolGetDegree</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetSplitOperator.html">NEPSetSplitOperator</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNArnoldiGetKSP.html">NEPNArnoldiGetKSP</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetInitialSpace.html">NEPSetInitialSpace</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPCreate.html">NEPCreate</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPInterpolGetPEP.html">NEPInterpolGetPEP</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetTarget.html">NEPSetTarget</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNArnoldiSetKSP.html">NEPNArnoldiSetKSP</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetJacobian.html">NEPSetJacobian</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPDestroy.html">NEPDestroy</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPInterpolSetDegree.html">NEPInterpolSetDegree</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetTolerances.html">NEPSetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetInterpolation.html">NEPNLEIGSGetInterpolation</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetOptionsPrefix.html">NEPSetOptionsPrefix</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPErrorType.html">NEPErrorType</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPInterpolSetPEP.html">NEPInterpolSetPEP</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetTrackAll.html">NEPSetTrackAll</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetKSPs.html">NEPNLEIGSGetKSPs</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetRG.html">NEPSetRG</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPErrorView.html">NEPErrorView</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPMonitorAll.html">NEPMonitorAll</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetType.html">NEPSetType</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetLocking.html">NEPNLEIGSGetLocking</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetRefine.html">NEPSetRefine</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPErrorViewFromOptions.html">NEPErrorViewFromOptions</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPMonitorCancel.html">NEPMonitorCancel</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetUp.html">NEPSetUp</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetRKShifts.html">NEPNLEIGSGetRKShifts</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetSplitOperator.html">NEPSetSplitOperator</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPFinalizePackage.html">NEPFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPMonitorConverged.html">NEPMonitorConverged</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSetWhichEigenpairs.html">NEPSetWhichEigenpairs</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetRestart.html">NEPNLEIGSGetRestart</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetStoppingTest.html">NEPSetStoppingTest</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./NEP/NEPGetBV.html">NEPGetBV</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPMonitorFirst.html">NEPMonitorFirst</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetSingularitiesFunction.html">NEPNLEIGSGetSingularitiesFunction</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetStoppingTestFunction.html">NEPSetStoppingTestFunction</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetConverged.html">NEPGetConverged</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSGetTrueResidual.html">NEPNLEIGSGetTrueResidual</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetTarget.html">NEPSetTarget</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetConvergedReason.html">NEPGetConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSSetInterpolation.html">NEPNLEIGSSetInterpolation</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetTolerances.html">NEPSetTolerances</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetConvergenceTest.html">NEPGetConvergenceTest</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSSetLocking.html">NEPNLEIGSSetLocking</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetTrackAll.html">NEPSetTrackAll</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetDS.html">NEPGetDS</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSSetRKShifts.html">NEPNLEIGSSetRKShifts</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetType.html">NEPSetType</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetDerivatives.html">NEPGetDerivatives</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSSetRestart.html">NEPNLEIGSSetRestart</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetUp.html">NEPSetUp</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetDimensions.html">NEPGetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSSetSingularitiesFunction.html">NEPNLEIGSSetSingularitiesFunction</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPSetWhichEigenpairs.html">NEPSetWhichEigenpairs</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetEigenpair.html">NEPGetEigenpair</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPNLEIGSSetTrueResidual.html">NEPNLEIGSSetTrueResidual</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPSetWorkVecs.html">NEPSetWorkVecs</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetConstCorrectionTol.html">NEPGetConstCorrectionTol</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPMonitorSet.html">NEPMonitorSet</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetErrorEstimate.html">NEPGetErrorEstimate</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPProjectOperator.html">NEPProjectOperator</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPSolve.html">NEPSolve</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetConverged.html">NEPGetConverged</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPProjectOperator.html">NEPProjectOperator</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetFunction.html">NEPGetFunction</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIIGetConstCorrectionTol.html">NEPRIIGetConstCorrectionTol</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPStop.html">NEPStop</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetIterationNumber.html">NEPGetIterationNumber</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIIGetKSP.html">NEPRIIGetKSP</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPStoppingBasic.html">NEPStoppingBasic</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./NEP/NEPGetJacobian.html">NEPGetJacobian</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIIGetLagPreconditioner.html">NEPRIIGetLagPreconditioner</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPType.html">NEPType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetConvergedReason.html">NEPGetConvergedReason</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPReasonView.html">NEPReasonView</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetMonitorContext.html">NEPGetMonitorContext</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIIGetMaximumIterations.html">NEPRIIGetMaximumIterations</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPValuesView.html">NEPValuesView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetDS.html">NEPGetDS</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPReasonViewFromOptions.html">NEPReasonViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetOptionsPrefix.html">NEPGetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIISetConstCorrectionTol.html">NEPRIISetConstCorrectionTol</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPValuesViewFromOptions.html">NEPValuesViewFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetDimensions.html">NEPGetDimensions</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPRefine.html">NEPRefine</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetRG.html">NEPGetRG</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIISetKSP.html">NEPRIISetKSP</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPVectorsView.html">NEPVectorsView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetEigenpair.html">NEPGetEigenpair</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPRegister.html">NEPRegister</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetRefine.html">NEPGetRefine</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIISetLagPreconditioner.html">NEPRIISetLagPreconditioner</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPVectorsViewFromOptions.html">NEPVectorsViewFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetErrorEstimate.html">NEPGetErrorEstimate</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPRegisterAll.html">NEPRegisterAll</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetSplitOperatorInfo.html">NEPGetSplitOperatorInfo</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRIISetMaximumIterations.html">NEPRIISetMaximumIterations</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPView.html">NEPView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetFunction.html">NEPGetFunction</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPReset.html">NEPReset</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetSplitOperatorTerm.html">NEPGetSplitOperatorTerm</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPReasonView.html">NEPReasonView</A></TD>
 <TD WIDTH=250><A HREF="./NEP/NEPWhich.html">NEPWhich</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetIterationNumber.html">NEPGetIterationNumber</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSLPGetEPS.html">NEPSLPGetEPS</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetStoppingTest.html">NEPGetStoppingTest</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPReasonViewFromOptions.html">NEPReasonViewFromOptions</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./NEP/NEPGetJacobian.html">NEPGetJacobian</A></TD>
-<TD WIDTH=250><A HREF="./NEP/NEPSLPSetEPS.html">NEPSLPSetEPS</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPGetTarget.html">NEPGetTarget</A></TD>
+<TD WIDTH=250><A HREF="./NEP/NEPRefine.html">NEPRefine</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 </TABLE><A NAME="p"></A>
@@ -749,146 +829,154 @@
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./PEP/PEP.html">PEP</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPGetTrackAll.html">PEPGetTrackAll</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPSetConvergenceTest.html">PEPSetConvergenceTest</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetConvergenceTestFunction.html">PEPSetConvergenceTestFunction</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPAllocateSolution.html">PEPAllocateSolution</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPGetType.html">PEPGetType</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPSetConvergenceTestFunction.html">PEPSetConvergenceTestFunction</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetDS.html">PEPSetDS</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPAppendOptionsPrefix.html">PEPAppendOptionsPrefix</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPGetWhichEigenpairs.html">PEPGetWhichEigenpairs</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPSetDS.html">PEPSetDS</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetDimensions.html">PEPSetDimensions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPBasis.html">PEPBasis</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPInitializePackage.html">PEPInitializePackage</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPSetDimensions.html">PEPSetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetEigenvalueComparison.html">PEPSetEigenvalueComparison</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPComputeError.html">PEPComputeError</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPJDGetRestart.html">PEPJDGetRestart</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPSetEigenvalueComparison.html">PEPSetEigenvalueComparison</A></TD>
-<TR>
-<TD WIDTH=250><A HREF="./PEP/PEPConv.html">PEPConv</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPJDGetTolerances.html">PEPJDGetTolerances</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetExtract.html">PEPSetExtract</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPConvergedReason.html">PEPConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPConv.html">PEPConv</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPJDSetRestart.html">PEPJDSetRestart</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetFromOptions.html">PEPSetFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPCreate.html">PEPCreate</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPJDSetTolerances.html">PEPJDSetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPConvMonitorSetFromOptions.html">PEPConvMonitorSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPLinearGetCompanionForm.html">PEPLinearGetCompanionForm</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetInitialSpace.html">PEPSetInitialSpace</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPDestroy.html">PEPDestroy</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPLinearGetCompanionForm.html">PEPLinearGetCompanionForm</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPConvergedReason.html">PEPConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPLinearGetEPS.html">PEPLinearGetEPS</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetOperators.html">PEPSetOperators</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPErrorType.html">PEPErrorType</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPLinearGetEPS.html">PEPLinearGetEPS</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPCreate.html">PEPCreate</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPLinearGetExplicitMatrix.html">PEPLinearGetExplicitMatrix</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetOptionsPrefix.html">PEPSetOptionsPrefix</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPErrorView.html">PEPErrorView</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPLinearGetExplicitMatrix.html">PEPLinearGetExplicitMatrix</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPDestroy.html">PEPDestroy</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPLinearSetCompanionForm.html">PEPLinearSetCompanionForm</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetProblemType.html">PEPSetProblemType</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPErrorViewFromOptions.html">PEPErrorViewFromOptions</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPLinearSetCompanionForm.html">PEPLinearSetCompanionForm</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPErrorType.html">PEPErrorType</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPLinearSetEPS.html">PEPLinearSetEPS</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetRG.html">PEPSetRG</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPExtract.html">PEPExtract</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPLinearSetEPS.html">PEPLinearSetEPS</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPErrorView.html">PEPErrorView</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPLinearSetExplicitMatrix.html">PEPLinearSetExplicitMatrix</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetRefine.html">PEPSetRefine</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPFinalizePackage.html">PEPFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPLinearSetExplicitMatrix.html">PEPLinearSetExplicitMatrix</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPErrorViewFromOptions.html">PEPErrorViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorAll.html">PEPMonitorAll</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetST.html">PEPSetST</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPGetBV.html">PEPGetBV</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPMonitorAll.html">PEPMonitorAll</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPExtract.html">PEPExtract</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorCancel.html">PEPMonitorCancel</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetScale.html">PEPSetScale</A></TD>
 <TR>
+<TD WIDTH=250><A HREF="./PEP/PEPFinalizePackage.html">PEPFinalizePackage</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorConverged.html">PEPMonitorConverged</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetStoppingTest.html">PEPSetStoppingTest</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./PEP/PEPGetBV.html">PEPGetBV</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorFirst.html">PEPMonitorFirst</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetStoppingTestFunction.html">PEPSetStoppingTestFunction</A></TD>
+<TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetBasis.html">PEPGetBasis</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPMonitorCancel.html">PEPMonitorCancel</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorLGCreate.html">PEPMonitorLGCreate</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetTarget.html">PEPSetTarget</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetConverged.html">PEPGetConverged</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPMonitorConverged.html">PEPMonitorConverged</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorSet.html">PEPMonitorSet</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetTolerances.html">PEPSetTolerances</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetConvergedReason.html">PEPGetConvergedReason</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPMonitorFirst.html">PEPMonitorFirst</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPMonitorSetFromOptions.html">PEPMonitorSetFromOptions</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetTrackAll.html">PEPSetTrackAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetConvergenceTest.html">PEPGetConvergenceTest</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPMonitorSet.html">PEPMonitorSet</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPProblemType.html">PEPProblemType</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetType.html">PEPSetType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetDS.html">PEPGetDS</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPProblemType.html">PEPProblemType</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiGetLocking.html">PEPQArnoldiGetLocking</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetUp.html">PEPSetUp</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetDimensions.html">PEPGetDimensions</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiGetLocking.html">PEPQArnoldiGetLocking</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiGetRestart.html">PEPQArnoldiGetRestart</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetWhichEigenpairs.html">PEPSetWhichEigenpairs</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetEigenpair.html">PEPGetEigenpair</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiGetRestart.html">PEPQArnoldiGetRestart</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiSetLocking.html">PEPQArnoldiSetLocking</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetWorkVecs.html">PEPSetWorkVecs</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetErrorEstimate.html">PEPGetErrorEstimate</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiSetLocking.html">PEPQArnoldiSetLocking</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiSetRestart.html">PEPQArnoldiSetRestart</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSolve.html">PEPSolve</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetExtract.html">PEPGetExtract</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPQArnoldiSetRestart.html">PEPQArnoldiSetRestart</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPTOARGetLocking.html">PEPTOARGetLocking</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPReasonView.html">PEPReasonView</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPStop.html">PEPStop</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetIterationNumber.html">PEPGetIterationNumber</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPReasonView.html">PEPReasonView</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPTOARGetRestart.html">PEPTOARGetRestart</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPReasonViewFromOptions.html">PEPReasonViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPStoppingBasic.html">PEPStoppingBasic</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetMonitorContext.html">PEPGetMonitorContext</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPReasonViewFromOptions.html">PEPReasonViewFromOptions</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPTOARSetLocking.html">PEPTOARSetLocking</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPRefine.html">PEPRefine</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPTOARGetLocking.html">PEPTOARGetLocking</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetNumMatrices.html">PEPGetNumMatrices</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPRefine.html">PEPRefine</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPTOARSetRestart.html">PEPTOARSetRestart</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPRefineGetKSP.html">PEPRefineGetKSP</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPTOARGetRestart.html">PEPTOARGetRestart</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetOperators.html">PEPGetOperators</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPRefineGetKSP.html">PEPRefineGetKSP</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPType.html">PEPType</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPRefineScheme.html">PEPRefineScheme</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPTOARSetLocking.html">PEPTOARSetLocking</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetOptionsPrefix.html">PEPGetOptionsPrefix</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPRegister.html">PEPRegister</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPValuesView.html">PEPValuesView</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPTOARSetRestart.html">PEPTOARSetRestart</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetProblemType.html">PEPGetProblemType</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPRegisterAll.html">PEPRegisterAll</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPValuesViewFromOptions.html">PEPValuesViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPType.html">PEPType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetRG.html">PEPGetRG</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPReset.html">PEPReset</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPVectorsView.html">PEPVectorsView</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPValuesView.html">PEPValuesView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetRefine.html">PEPGetRefine</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSTOARGetLocking.html">PEPSTOARGetLocking</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPVectorsViewFromOptions.html">PEPVectorsViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPValuesViewFromOptions.html">PEPValuesViewFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetST.html">PEPGetST</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSTOARSetLocking.html">PEPSTOARSetLocking</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPView.html">PEPView</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPVectorsView.html">PEPVectorsView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./PEP/PEPGetScale.html">PEPGetScale</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPScale.html">PEPScale</A></TD>
-<TD WIDTH=250><A HREF="./PEP/PEPWhich.html">PEPWhich</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPVectorsViewFromOptions.html">PEPVectorsViewFromOptions</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPGetTarget.html">PEPGetTarget</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPGetStoppingTest.html">PEPGetStoppingTest</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetBV.html">PEPSetBV</A></TD>
-<TD WIDTH=250><A HREF="./"></A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPView.html">PEPView</A></TD>
 <TR>
-<TD WIDTH=250><A HREF="./PEP/PEPGetTolerances.html">PEPGetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPGetTarget.html">PEPGetTarget</A></TD>
 <TD WIDTH=250><A HREF="./PEP/PEPSetBasis.html">PEPSetBasis</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPWhich.html">PEPWhich</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./PEP/PEPGetTolerances.html">PEPGetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./PEP/PEPSetConvergenceTest.html">PEPSetConvergenceTest</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 </TABLE><A NAME="r"></A>
@@ -906,45 +994,49 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./RG/RG.html">RG</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGGetOptionsPrefix.html">RGGetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGGetScale.html">RGGetScale</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGRegisterAll.html">RGRegisterAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGAppendOptionsPrefix.html">RGAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGGetScale.html">RGGetScale</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGGetType.html">RGGetType</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGRingGetParameters.html">RGRingGetParameters</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGCheckInside.html">RGCheckInside</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGGetType.html">RGGetType</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGInitializePackage.html">RGInitializePackage</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGRingSetParameters.html">RGRingSetParameters</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGComputeContour.html">RGComputeContour</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGInitializePackage.html">RGInitializePackage</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGIntervalGetEndpoints.html">RGIntervalGetEndpoints</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGSetComplement.html">RGSetComplement</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGCreate.html">RGCreate</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGIntervalGetEndpoints.html">RGIntervalGetEndpoints</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGIntervalSetEndpoints.html">RGIntervalSetEndpoints</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGSetFromOptions.html">RGSetFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGDestroy.html">RGDestroy</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGIntervalSetEndpoints.html">RGIntervalSetEndpoints</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGIsTrivial.html">RGIsTrivial</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGSetOptionsPrefix.html">RGSetOptionsPrefix</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGEllipseGetParameters.html">RGEllipseGetParameters</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGIsTrivial.html">RGIsTrivial</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGPolygonGetVertices.html">RGPolygonGetVertices</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGSetScale.html">RGSetScale</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGEllipseSetParameters.html">RGEllipseSetParameters</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGPolygonGetVertices.html">RGPolygonGetVertices</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGPolygonSetVertices.html">RGPolygonSetVertices</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGSetType.html">RGSetType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGFinalizePackage.html">RGFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGPolygonSetVertices.html">RGPolygonSetVertices</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGPopScale.html">RGPopScale</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGType.html">RGType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./RG/RGGetComplement.html">RGGetComplement</A></TD>
-<TD WIDTH=250><A HREF="./RG/RGRegister.html">RGRegister</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGPushScale.html">RGPushScale</A></TD>
 <TD WIDTH=250><A HREF="./RG/RGView.html">RGView</A></TD>
 <TR>
+<TD WIDTH=250><A HREF="./RG/RGGetOptionsPrefix.html">RGGetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./RG/RGRegister.html">RGRegister</A></TD>
+<TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
 </TABLE><A NAME="s"></A>
 <H3> <CENTER> | <A HREF="singleindex.html#b"> B </A> | 
 <A HREF="singleindex.html#d"> D </A> | 
@@ -960,203 +1052,223 @@
 <TABLE>
 <TR><TD WIDTH=250 COLSPAN="3"></TD></TR>
 <TD WIDTH=250><A HREF="./ST/ST.html">ST</A></TD>
-<TD WIDTH=250><A HREF="./ST/STSetOperators.html">STSetOperators</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDMonitorConverged.html">SVDMonitorConverged</A></TD>
+<TD WIDTH=250><A HREF="./ST/STSetUp.html">STSetUp</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDReasonViewFromOptions.html">SVDReasonViewFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STAppendOptionsPrefix.html">STAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./ST/STSetOptionsPrefix.html">STSetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDMonitorFirst.html">SVDMonitorFirst</A></TD>
+<TD WIDTH=250><A HREF="./ST/STShellGetContext.html">STShellGetContext</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDRegister.html">SVDRegister</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STApply.html">STApply</A></TD>
-<TD WIDTH=250><A HREF="./ST/STSetShift.html">STSetShift</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDMonitorSet.html">SVDMonitorSet</A></TD>
+<TD WIDTH=250><A HREF="./ST/STShellSetApply.html">STShellSetApply</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDRegisterAll.html">SVDRegisterAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STApplyTranspose.html">STApplyTranspose</A></TD>
-<TD WIDTH=250><A HREF="./ST/STSetTransform.html">STSetTransform</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDReasonView.html">SVDReasonView</A></TD>
+<TD WIDTH=250><A HREF="./ST/STShellSetApplyTranspose.html">STShellSetApplyTranspose</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDReset.html">SVDReset</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STBackTransform.html">STBackTransform</A></TD>
-<TD WIDTH=250><A HREF="./ST/STSetType.html">STSetType</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDReasonViewFromOptions.html">SVDReasonViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./ST/STShellSetBackTransform.html">STShellSetBackTransform</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetBV.html">SVDSetBV</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STCayleyGetAntishift.html">STCayleyGetAntishift</A></TD>
-<TD WIDTH=250><A HREF="./ST/STSetUp.html">STSetUp</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDRegister.html">SVDRegister</A></TD>
+<TD WIDTH=250><A HREF="./ST/STShellSetContext.html">STShellSetContext</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetConvergenceTest.html">SVDSetConvergenceTest</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STCayleySetAntishift.html">STCayleySetAntishift</A></TD>
-<TD WIDTH=250><A HREF="./ST/STShellGetContext.html">STShellGetContext</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDRegisterAll.html">SVDRegisterAll</A></TD>
+<TD WIDTH=250><A HREF="./ST/STType.html">STType</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetConvergenceTestFunction.html">SVDSetConvergenceTestFunction</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STCheckNullSpace.html">STCheckNullSpace</A></TD>
-<TD WIDTH=250><A HREF="./ST/STShellSetApply.html">STShellSetApply</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDReset.html">SVDReset</A></TD>
+<TD WIDTH=250><A HREF="./ST/STView.html">STView</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetDS.html">SVDSetDS</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STComputeExplicitOperator.html">STComputeExplicitOperator</A></TD>
-<TD WIDTH=250><A HREF="./ST/STShellSetApplyTranspose.html">STShellSetApplyTranspose</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetBV.html">SVDSetBV</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVD.html">SVD</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetDimensions.html">SVDSetDimensions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STCreate.html">STCreate</A></TD>
-<TD WIDTH=250><A HREF="./ST/STShellSetBackTransform.html">STShellSetBackTransform</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetDS.html">SVDSetDS</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDAllocateSolution.html">SVDAllocateSolution</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetFromOptions.html">SVDSetFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STDestroy.html">STDestroy</A></TD>
-<TD WIDTH=250><A HREF="./ST/STShellSetContext.html">STShellSetContext</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetDimensions.html">SVDSetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDAppendOptionsPrefix.html">SVDAppendOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetImplicitTranspose.html">SVDSetImplicitTranspose</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STFinalizePackage.html">STFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./ST/STType.html">STType</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetFromOptions.html">SVDSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDComputeError.html">SVDComputeError</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetInitialSpace.html">SVDSetInitialSpace</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetBalanceMatrix.html">STGetBalanceMatrix</A></TD>
-<TD WIDTH=250><A HREF="./ST/STView.html">STView</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetImplicitTranspose.html">SVDSetImplicitTranspose</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDConv.html">SVDConv</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetInitialSpaceLeft.html">SVDSetInitialSpaceLeft</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetBilinearForm.html">STGetBilinearForm</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVD.html">SVD</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetInitialSpace.html">SVDSetInitialSpace</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDConvMonitorSetFromOptions.html">SVDConvMonitorSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetOperator.html">SVDSetOperator</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetKSP.html">STGetKSP</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDAllocateSolution.html">SVDAllocateSolution</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetInitialSpaceLeft.html">SVDSetInitialSpaceLeft</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDConvergedReason.html">SVDConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetOptionsPrefix.html">SVDSetOptionsPrefix</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetMatMode.html">STGetMatMode</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDAppendOptionsPrefix.html">SVDAppendOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetOperator.html">SVDSetOperator</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCreate.html">SVDCreate</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetStoppingTest.html">SVDSetStoppingTest</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetMatStructure.html">STGetMatStructure</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDComputeError.html">SVDComputeError</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDSetOptionsPrefix.html">SVDSetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCrossGetEPS.html">SVDCrossGetEPS</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDSetStoppingTestFunction.html">SVDSetStoppingTestFunction</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetNumMatrices.html">STGetNumMatrices</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDConvergedReason.html">SVDConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCrossSetEPS.html">SVDCrossSetEPS</A></TD>
 <TD WIDTH=250><A HREF="./SVD/SVDSetTolerances.html">SVDSetTolerances</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetOperators.html">STGetOperators</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCreate.html">SVDCreate</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCyclicGetEPS.html">SVDCyclicGetEPS</A></TD>
 <TD WIDTH=250><A HREF="./SVD/SVDSetTrackAll.html">SVDSetTrackAll</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetOptionsPrefix.html">STGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCrossGetEPS.html">SVDCrossGetEPS</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCyclicGetExplicitMatrix.html">SVDCyclicGetExplicitMatrix</A></TD>
 <TD WIDTH=250><A HREF="./SVD/SVDSetType.html">SVDSetType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetShift.html">STGetShift</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCrossSetEPS.html">SVDCrossSetEPS</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCyclicSetEPS.html">SVDCyclicSetEPS</A></TD>
 <TD WIDTH=250><A HREF="./SVD/SVDSetUp.html">SVDSetUp</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetTOperators.html">STGetTOperators</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCyclicGetEPS.html">SVDCyclicGetEPS</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDCyclicSetExplicitMatrix.html">SVDCyclicSetExplicitMatrix</A></TD>
 <TD WIDTH=250><A HREF="./SVD/SVDSetWhichSingularTriplets.html">SVDSetWhichSingularTriplets</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetTransform.html">STGetTransform</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCyclicGetExplicitMatrix.html">SVDCyclicGetExplicitMatrix</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDDestroy.html">SVDDestroy</A></TD>
 <TD WIDTH=250><A HREF="./SVD/SVDSolve.html">SVDSolve</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STGetType.html">STGetType</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCyclicSetEPS.html">SVDCyclicSetEPS</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDTRLanczosGetOneSide.html">SVDTRLanczosGetOneSide</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDErrorType.html">SVDErrorType</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDStop.html">SVDStop</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STInitializePackage.html">STInitializePackage</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDCyclicSetExplicitMatrix.html">SVDCyclicSetExplicitMatrix</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDTRLanczosSetOneSide.html">SVDTRLanczosSetOneSide</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDErrorView.html">SVDErrorView</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDStoppingBasic.html">SVDStoppingBasic</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatCreateVecs.html">STMatCreateVecs</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDDestroy.html">SVDDestroy</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDType.html">SVDType</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDErrorViewFromOptions.html">SVDErrorViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDTRLanczosGetOneSide.html">SVDTRLanczosGetOneSide</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatGetLocalSize.html">STMatGetLocalSize</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDErrorType.html">SVDErrorType</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDValuesView.html">SVDValuesView</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDFinalizePackage.html">SVDFinalizePackage</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDTRLanczosSetOneSide.html">SVDTRLanczosSetOneSide</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatGetSize.html">STMatGetSize</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDErrorView.html">SVDErrorView</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDValuesViewFromOptions.html">SVDValuesViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetBV.html">SVDGetBV</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDType.html">SVDType</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatMode.html">STMatMode</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDErrorViewFromOptions.html">SVDErrorViewFromOptions</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDVectorsView.html">SVDVectorsView</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetConverged.html">SVDGetConverged</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDValuesView.html">SVDValuesView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatMult.html">STMatMult</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDFinalizePackage.html">SVDFinalizePackage</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDVectorsViewFromOptions.html">SVDVectorsViewFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetConvergedReason.html">SVDGetConvergedReason</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDValuesViewFromOptions.html">SVDValuesViewFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatMultTranspose.html">STMatMultTranspose</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetBV.html">SVDGetBV</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDView.html">SVDView</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetConvergenceTest.html">SVDGetConvergenceTest</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDVectorsView.html">SVDVectorsView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatSetUp.html">STMatSetUp</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetConverged.html">SVDGetConverged</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDWhich.html">SVDWhich</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetDS.html">SVDGetDS</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDVectorsViewFromOptions.html">SVDVectorsViewFromOptions</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatSolve.html">STMatSolve</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetConvergedReason.html">SVDGetConvergedReason</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcCheckOrthogonality.html">SlepcCheckOrthogonality</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetDimensions.html">SVDGetDimensions</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDView.html">SVDView</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STMatSolveTranspose.html">STMatSolveTranspose</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetDS.html">SVDGetDS</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcFinalize.html">SlepcFinalize</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetImplicitTranspose.html">SVDGetImplicitTranspose</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDWhich.html">SVDWhich</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STPostSolve.html">STPostSolve</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetDimensions.html">SVDGetDimensions</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcGetVersion.html">SlepcGetVersion</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetIterationNumber.html">SVDGetIterationNumber</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcCheckOrthogonality.html">SlepcCheckOrthogonality</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STPrecondGetKSPHasMat.html">STPrecondGetKSPHasMat</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetImplicitTranspose.html">SVDGetImplicitTranspose</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcInitialize.html">SlepcInitialize</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetMonitorContext.html">SVDGetMonitorContext</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcConvMonitorCreate.html">SlepcConvMonitorCreate</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STPrecondGetMatForPC.html">STPrecondGetMatForPC</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetIterationNumber.html">SVDGetIterationNumber</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcInitializeFortran.html">SlepcInitializeFortran</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetOperator.html">SVDGetOperator</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcConvMonitorDestroy.html">SlepcConvMonitorDestroy</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STPrecondSetKSPHasMat.html">STPrecondSetKSPHasMat</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetMonitorContext.html">SVDGetMonitorContext</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcInitializeNoArguments.html">SlepcInitializeNoArguments</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetOptionsPrefix.html">SVDGetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcFinalize.html">SlepcFinalize</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STPrecondSetMatForPC.html">STPrecondSetMatForPC</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetOperator.html">SVDGetOperator</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcInitialized.html">SlepcInitialized</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetSingularTriplet.html">SVDGetSingularTriplet</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcGetVersion.html">SlepcGetVersion</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STRegister.html">STRegister</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetOptionsPrefix.html">SVDGetOptionsPrefix</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcMatConvertSeqDense.html">SlepcMatConvertSeqDense</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetStoppingTest.html">SVDGetStoppingTest</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcInitialize.html">SlepcInitialize</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STRegisterAll.html">STRegisterAll</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetSingularTriplet.html">SVDGetSingularTriplet</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcMatTile.html">SlepcMatTile</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetTolerances.html">SVDGetTolerances</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcInitializeFortran.html">SlepcInitializeFortran</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STReset.html">STReset</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetTolerances.html">SVDGetTolerances</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcSCCompare.html">SlepcSCCompare</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetTrackAll.html">SVDGetTrackAll</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcInitializeNoArguments.html">SlepcInitializeNoArguments</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSHELL.html">STSHELL</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetTrackAll.html">SVDGetTrackAll</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcSNPrintfScalar.html">SlepcSNPrintfScalar</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetType.html">SVDGetType</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcInitialized.html">SlepcInitialized</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STScaleShift.html">STScaleShift</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetType.html">SVDGetType</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcSortEigenvalues.html">SlepcSortEigenvalues</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDGetWhichSingularTriplets.html">SVDGetWhichSingularTriplets</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcMatConvertSeqDense.html">SlepcMatConvertSeqDense</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSetBalanceMatrix.html">STSetBalanceMatrix</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDGetWhichSingularTriplets.html">SVDGetWhichSingularTriplets</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcVecNormalize.html">SlepcVecNormalize</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDInitializePackage.html">SVDInitializePackage</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcMatTile.html">SlepcMatTile</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSetDefaultShift.html">STSetDefaultShift</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDInitializePackage.html">SVDInitializePackage</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcVecPoolCreate.html">SlepcVecPoolCreate</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDLanczosGetOneSide.html">SVDLanczosGetOneSide</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcSCCompare.html">SlepcSCCompare</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSetFromOptions.html">STSetFromOptions</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDLanczosGetOneSide.html">SVDLanczosGetOneSide</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcVecPoolDestroy.html">SlepcVecPoolDestroy</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDLanczosSetOneSide.html">SVDLanczosSetOneSide</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcSNPrintfScalar.html">SlepcSNPrintfScalar</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSetKSP.html">STSetKSP</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDLanczosSetOneSide.html">SVDLanczosSetOneSide</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcVecPoolGetVecs.html">SlepcVecPoolGetVecs</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorAll.html">SVDMonitorAll</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcSortEigenvalues.html">SlepcSortEigenvalues</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSetMatMode.html">STSetMatMode</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDMonitorAll.html">SVDMonitorAll</A></TD>
-<TD WIDTH=250><A HREF="./sys/SlepcVecPoolRestoreVecs.html">SlepcVecPoolRestoreVecs</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorCancel.html">SVDMonitorCancel</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcVecNormalize.html">SlepcVecNormalize</A></TD>
 <TR>
 <TD WIDTH=250><A HREF="./ST/STSetMatStructure.html">STSetMatStructure</A></TD>
-<TD WIDTH=250><A HREF="./SVD/SVDMonitorCancel.html">SVDMonitorCancel</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorConverged.html">SVDMonitorConverged</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcVecPoolCreate.html">SlepcVecPoolCreate</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./ST/STSetOperators.html">STSetOperators</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorFirst.html">SVDMonitorFirst</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcVecPoolDestroy.html">SlepcVecPoolDestroy</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./ST/STSetOptionsPrefix.html">STSetOptionsPrefix</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorLGCreate.html">SVDMonitorLGCreate</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcVecPoolGetVecs.html">SlepcVecPoolGetVecs</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./ST/STSetShift.html">STSetShift</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorSet.html">SVDMonitorSet</A></TD>
+<TD WIDTH=250><A HREF="./sys/SlepcVecPoolRestoreVecs.html">SlepcVecPoolRestoreVecs</A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./ST/STSetTransform.html">STSetTransform</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDMonitorSetFromOptions.html">SVDMonitorSetFromOptions</A></TD>
+<TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
+<TD WIDTH=250><A HREF="./ST/STSetType.html">STSetType</A></TD>
+<TD WIDTH=250><A HREF="./SVD/SVDReasonView.html">SVDReasonView</A></TD>
 <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 </TABLE><A NAME="v"></A>
diff --git a/docs/manualpages/sys/SlepcCheckOrthogonality.html b/docs/manualpages/sys/SlepcCheckOrthogonality.html
index e8409c5..c0ea80e 100644
--- a/docs/manualpages/sys/SlepcCheckOrthogonality.html
+++ b/docs/manualpages/sys/SlepcCheckOrthogonality.html
@@ -6,36 +6,36 @@
 <TITLE>SlepcCheckOrthogonality</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcCheckOrthogonality.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcCheckOrthogonality.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcCheckOrthogonality</H1>
 Checks (or prints) the level of orthogonality of a set of vectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcCheckOrthogonality.html#SlepcCheckOrthogonality">SlepcCheckOrthogonality</A>(Vec *V,PetscInt nv,Vec *W,PetscInt nw,Mat B,PetscViewer viewer,PetscReal *lev)
+PetscErrorCode SlepcCheckOrthogonality(Vec *V,PetscInt nv,Vec *W,PetscInt nw,Mat B,PetscViewer viewer,PetscReal *lev)
 </PRE>
 Collective on Vec
 <P>
 <H3><FONT COLOR="#883300">Input parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V  </B></TD><TD> - a set of vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V  </B></TD><TD> - a set of vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nv </B></TD><TD> - number of V vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nv </B></TD><TD> - number of V vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W  </B></TD><TD> - an alternative set of vectors (optional)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>W  </B></TD><TD> - an alternative set of vectors (optional)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw </B></TD><TD> - number of W vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nw </B></TD><TD> - number of W vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - matrix defining the inner product (optional)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - matrix defining the inner product (optional)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - optional visualization context
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output parameter</FONT></H3>
-<DT><B>lev </B> - level of orthogonality (optional)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lev </B></TD><TD> - level of orthogonality (optional)
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This function computes W'*V and prints the result. It is intended to check
diff --git a/docs/manualpages/sys/SlepcConvMonitorCreate.html b/docs/manualpages/sys/SlepcConvMonitorCreate.html
new file mode 100644
index 0000000..ad96820
--- /dev/null
+++ b/docs/manualpages/sys/SlepcConvMonitorCreate.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/sys/SlepcConvMonitorCreate.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SlepcConvMonitorCreate</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcConvMonitorCreate.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SlepcConvMonitorCreate</H1>
+Creates a SlepcConvMonitor context. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsys.h" 
+PetscErrorCode SlepcConvMonitorCreate(PetscViewer viewer,PetscViewerFormat format,SlepcConvMonitor *ctx)
+</PRE>
+Collective on PetscViewer
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0">
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD> - the viewer where the monitor must send data
+</TD></TR>
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>format </B></TD><TD> - the format 
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - the created context
+</TD></TR></TABLE>
+<P>
+<H3><FONT COLOR="#883300">Notes</FONT></H3>
+The created context is used for <A HREF="../EPS/EPS.html#EPS">EPS</A>, <A HREF="../SVD/SVD.html#SVD">SVD</A>, <A HREF="../PEP/PEP.html#PEP">PEP</A>, and <A HREF="../NEP/NEP.html#NEP">NEP</A> monitor functions that just
+print the iteration numbers at which convergence takes place (XXXMonitorConverged).
+<P>
+This function increases the reference count of the viewer so you can destroy the
+viewer object after this call.
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/slepcutil.c.html#SlepcConvMonitorCreate">src/sys/slepcutil.c</A>
+<BR><A HREF="./index.html">Index of all sys routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/sys/SlepcConvMonitorDestroy.html b/docs/manualpages/sys/SlepcConvMonitorDestroy.html
new file mode 100644
index 0000000..de8779c
--- /dev/null
+++ b/docs/manualpages/sys/SlepcConvMonitorDestroy.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
+<HTML>
+<HEAD> <link rel="canonical" href="http://slepc.upv.es/documentation/current/docs/manualpages/sys/SlepcConvMonitorDestroy.html" />
+<META NAME="GENERATOR" CONTENT="DOCTEXT">
+<link rel="stylesheet" href="/slepc.css" type="text/css">
+<TITLE>SlepcConvMonitorDestroy</TITLE>
+</HEAD>
+<BODY BGCOLOR="FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcConvMonitorDestroy.html "><small>Report Typos and Errors</small></a></div>
+
+<H1>SlepcConvMonitorDestroy</H1>
+Destroys a SlepcConvMonitor context. 
+<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
+<PRE>
+#include "slepcsys.h" 
+PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx)
+</PRE>
+Collective on PetscViewer
+<P>
+<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ctx </B></TD><TD> - the SlepcConvMonitor context to be destroyed.
+</TD></TR></TABLE>
+<P>
+
+<P>
+<H3><FONT COLOR="#883300">See Also</FONT></H3>
+ <A HREF="../sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</A>()
+<BR><P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/slepcutil.c.html#SlepcConvMonitorDestroy">src/sys/slepcutil.c</A>
+<BR><A HREF="./index.html">Index of all sys routines</A>
+<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
+<BR><A HREF="../singleindex.html">Index of all manual pages</A>
+</BODY></HTML>
diff --git a/docs/manualpages/sys/SlepcFinalize.html b/docs/manualpages/sys/SlepcFinalize.html
index 864878b..bd94fc7 100644
--- a/docs/manualpages/sys/SlepcFinalize.html
+++ b/docs/manualpages/sys/SlepcFinalize.html
@@ -6,15 +6,15 @@
 <TITLE>SlepcFinalize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcFinalize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcFinalize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcFinalize</H1>
 Checks for options to be called at the conclusion of the SLEPc program and calls PetscFinalize(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</A>(void)
+PetscErrorCode SlepcFinalize(void)
 </PRE>
 Collective on PETSC_COMM_WORLD
 <P>
diff --git a/docs/manualpages/sys/SlepcGetVersion.html b/docs/manualpages/sys/SlepcGetVersion.html
index 61a838f..be4cdd4 100644
--- a/docs/manualpages/sys/SlepcGetVersion.html
+++ b/docs/manualpages/sys/SlepcGetVersion.html
@@ -6,23 +6,23 @@
 <TITLE>SlepcGetVersion</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcGetVersion.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcGetVersion.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcGetVersion</H1>
 Gets the SLEPc version information in a string. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcGetVersion.html#SlepcGetVersion">SlepcGetVersion</A>(char version[],size_t len)
+PetscErrorCode SlepcGetVersion(char version[],size_t len)
 </PRE>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>len </B> - length of the string
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>len </B></TD><TD> - length of the string
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>version </B> - version string
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>version </B></TD><TD> - version string
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Fortran Note</FONT></H3>
 This routine is not supported in Fortran.
diff --git a/docs/manualpages/sys/SlepcInitialize.html b/docs/manualpages/sys/SlepcInitialize.html
index 5bb1014..6d38231 100644
--- a/docs/manualpages/sys/SlepcInitialize.html
+++ b/docs/manualpages/sys/SlepcInitialize.html
@@ -6,28 +6,28 @@
 <TITLE>SlepcInitialize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcInitialize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcInitialize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcInitialize</H1>
 Initializes the SLEPc library. <A HREF="../sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</A>() calls PetscInitialize() if that has not been called yet, so this routine should always be called near the beginning of your program. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</A>(int *argc,char ***args,const char file[],const char help[])
+PetscErrorCode SlepcInitialize(int *argc,char ***args,const char file[],const char help[])
 </PRE>
 Collective on MPI_COMM_WORLD or PETSC_COMM_WORLD if it has been set
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>argc </B></TD><TD> - count of number of command line arguments
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>argc </B></TD><TD> - count of number of command line arguments
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>args </B></TD><TD> - the command line arguments
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>args </B></TD><TD> - the command line arguments
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>file </B></TD><TD> - [optional] PETSc database file, defaults to ~username/.petscrc
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>file </B></TD><TD> - [optional] PETSc database file, defaults to ~username/.petscrc
 (use NULL for default)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help </B></TD><TD> - [optional] Help message to print, use NULL for no message
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>help </B></TD><TD> - [optional] Help message to print, use NULL for no message
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Fortran Note</FONT></H3>
diff --git a/docs/manualpages/sys/SlepcInitializeFortran.html b/docs/manualpages/sys/SlepcInitializeFortran.html
index 9859bca..0d5b253 100644
--- a/docs/manualpages/sys/SlepcInitializeFortran.html
+++ b/docs/manualpages/sys/SlepcInitializeFortran.html
@@ -6,14 +6,14 @@
 <TITLE>SlepcInitializeFortran</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcInitializeFortran.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcInitializeFortran.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcInitializeFortran</H1>
 Routine that should be called from C after the call to <A HREF="../sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</A>() if one is using a C main program that calls Fortran routines that in turn call SLEPc routines. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
-PetscErrorCode <A HREF="../sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</A>(void)
+PetscErrorCode SlepcInitializeFortran(void)
 </PRE>
 Collective on PETSC_COMM_WORLD
 <P>
diff --git a/docs/manualpages/sys/SlepcInitializeNoArguments.html b/docs/manualpages/sys/SlepcInitializeNoArguments.html
index a4ec6cf..07b0a31 100644
--- a/docs/manualpages/sys/SlepcInitializeNoArguments.html
+++ b/docs/manualpages/sys/SlepcInitializeNoArguments.html
@@ -6,15 +6,15 @@
 <TITLE>SlepcInitializeNoArguments</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcInitializeNoArguments.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcInitializeNoArguments.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcInitializeNoArguments</H1>
 Calls <A HREF="../sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</A>() from C/C++ without the command line arguments. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</A>(void)
+PetscErrorCode SlepcInitializeNoArguments(void)
 </PRE>
 Collective
 <P>
diff --git a/docs/manualpages/sys/SlepcInitialized.html b/docs/manualpages/sys/SlepcInitialized.html
index 1675a5c..dc53573 100644
--- a/docs/manualpages/sys/SlepcInitialized.html
+++ b/docs/manualpages/sys/SlepcInitialized.html
@@ -6,15 +6,15 @@
 <TITLE>SlepcInitialized</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcInitialized.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcInitialized.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcInitialized</H1>
 Determine whether SLEPc is initialized. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</A>(PetscBool *isInitialized)
+PetscErrorCode SlepcInitialized(PetscBool *isInitialized)
 </PRE>
 
 <P>
diff --git a/docs/manualpages/sys/SlepcMatConvertSeqDense.html b/docs/manualpages/sys/SlepcMatConvertSeqDense.html
index adc18fc..7b5463f 100644
--- a/docs/manualpages/sys/SlepcMatConvertSeqDense.html
+++ b/docs/manualpages/sys/SlepcMatConvertSeqDense.html
@@ -6,23 +6,23 @@
 <TITLE>SlepcMatConvertSeqDense</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcMatConvertSeqDense.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcMatConvertSeqDense.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcMatConvertSeqDense</H1>
 Converts a parallel matrix to another one in sequential dense format replicating the values in every processor. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</A>(Mat mat,Mat *newmat)
+PetscErrorCode SlepcMatConvertSeqDense(Mat mat,Mat *newmat)
 </PRE>
 Collective on Mat
 <P>
 <H3><FONT COLOR="#883300">Input parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the source matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A  </B></TD><TD> - the source matrix
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the target matrix
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B  </B></TD><TD> - the target matrix
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/sys/SlepcMatTile.html b/docs/manualpages/sys/SlepcMatTile.html
index 7d55b3b..b44e87b 100644
--- a/docs/manualpages/sys/SlepcMatTile.html
+++ b/docs/manualpages/sys/SlepcMatTile.html
@@ -6,40 +6,40 @@
 <TITLE>SlepcMatTile</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcMatTile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcMatTile.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcMatTile</H1>
 Explicitly build a matrix from four blocks, G = [ a*A b*B; c*C d*D ]. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</A>(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar c,Mat C,PetscScalar d,Mat D,Mat *G)
+PetscErrorCode SlepcMatTile(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar c,Mat C,PetscScalar d,Mat D,Mat *G)
 </PRE>
 Collective on Mat
 <P>
 <H3><FONT COLOR="#883300">Input parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - matrix for top-left block
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>A </B></TD><TD> - matrix for top-left block
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a </B></TD><TD> - scaling factor for block A
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a </B></TD><TD> - scaling factor for block A
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B </B></TD><TD> - matrix for top-right block
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>B </B></TD><TD> - matrix for top-right block
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b </B></TD><TD> - scaling factor for block B
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>b </B></TD><TD> - scaling factor for block B
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>C </B></TD><TD> - matrix for bottom-left block
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>C </B></TD><TD> - matrix for bottom-left block
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>c </B></TD><TD> - scaling factor for block C
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>c </B></TD><TD> - scaling factor for block C
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>D </B></TD><TD> - matrix for bottom-right block
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>D </B></TD><TD> - matrix for bottom-right block
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>d </B></TD><TD> - scaling factor for block D
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>d </B></TD><TD> - scaling factor for block D
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output parameter</FONT></H3>
-<DT><B>G  </B> - the resulting matrix
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>G  </B></TD><TD> - the resulting matrix
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 In the case of a parallel matrix, a permuted version of G is returned. The permutation
diff --git a/docs/manualpages/sys/SlepcSCCompare.html b/docs/manualpages/sys/SlepcSCCompare.html
index 31062f8..b94aee4 100644
--- a/docs/manualpages/sys/SlepcSCCompare.html
+++ b/docs/manualpages/sys/SlepcSCCompare.html
@@ -6,34 +6,34 @@
 <TITLE>SlepcSCCompare</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcSCCompare.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcSCCompare.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcSCCompare</H1>
 Compares two (possibly complex) values according to a certain criterion. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</A>(SlepcSC sc,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res)
+PetscErrorCode SlepcSCCompare(SlepcSC sc,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc  </B></TD><TD> - the sorting criterion context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc  </B></TD><TD> - the sorting criterion context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar  </B></TD><TD> - real part of the 1st value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ar  </B></TD><TD> - real part of the 1st value
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai  </B></TD><TD> - imaginary part of the 1st value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai  </B></TD><TD> - imaginary part of the 1st value
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br  </B></TD><TD> - real part of the 2nd value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>br  </B></TD><TD> - real part of the 2nd value
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi  </B></TD><TD> - imaginary part of the 2nd value
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bi  </B></TD><TD> - imaginary part of the 2nd value
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>res </B> - result of comparison
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>res </B></TD><TD> - result of comparison
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 Returns an integer less than, equal to, or greater than zero if the first
diff --git a/docs/manualpages/sys/SlepcSNPrintfScalar.html b/docs/manualpages/sys/SlepcSNPrintfScalar.html
index 617b929..9edce51 100644
--- a/docs/manualpages/sys/SlepcSNPrintfScalar.html
+++ b/docs/manualpages/sys/SlepcSNPrintfScalar.html
@@ -6,27 +6,27 @@
 <TITLE>SlepcSNPrintfScalar</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcSNPrintfScalar.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcSNPrintfScalar.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcSNPrintfScalar</H1>
 Prints a PetscScalar variable to a string of given length. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</A>(char *str,size_t len,PetscScalar val,PetscBool exp)
+PetscErrorCode SlepcSNPrintfScalar(char *str,size_t len,PetscScalar val,PetscBool exp)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - the string to print to
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>str </B></TD><TD> - the string to print to
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>len </B></TD><TD> - the length of str
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>len </B></TD><TD> - the length of str
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val </B></TD><TD> - scalar value to be printed
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>val </B></TD><TD> - scalar value to be printed
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>exp </B></TD><TD> - to be used within an expression, print leading sign and parentheses
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>exp </B></TD><TD> - to be used within an expression, print leading sign and parentheses
 in case of nonzero imaginary part
 </TD></TR></TABLE>
 <P>
@@ -37,4 +37,6 @@ in case of nonzero imaginary part
 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
 <P><H3><FONT COLOR="#883300">Examples</FONT></H3>
 <A HREF="../../../src/eps/examples/tutorials/ex18.c.html">src/eps/examples/tutorials/ex18.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_1d.c.html">src/pep/examples/nlevp/acoustic_wave_1d.c.html</A><BR>
+<A HREF="../../../src/pep/examples/nlevp/acoustic_wave_2d.c.html">src/pep/examples/nlevp/acoustic_wave_2d.c.html</A><BR>
 </BODY></HTML>
diff --git a/docs/manualpages/sys/SlepcSortEigenvalues.html b/docs/manualpages/sys/SlepcSortEigenvalues.html
index f76c2d6..912267c 100644
--- a/docs/manualpages/sys/SlepcSortEigenvalues.html
+++ b/docs/manualpages/sys/SlepcSortEigenvalues.html
@@ -6,32 +6,32 @@
 <TITLE>SlepcSortEigenvalues</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcSortEigenvalues.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcSortEigenvalues.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcSortEigenvalues</H1>
 Sorts a list of eigenvalues according to the  sorting criterion specified in a SlepcSC context. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcSortEigenvalues.html#SlepcSortEigenvalues">SlepcSortEigenvalues</A>(SlepcSC sc,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,PetscInt *perm)
+PetscErrorCode SlepcSortEigenvalues(SlepcSC sc,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,PetscInt *perm)
 </PRE>
 Not Collective
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc   </B></TD><TD> - the sorting criterion context
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>sc   </B></TD><TD> - the sorting criterion context
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n    </B></TD><TD> - number of eigenvalues in the list
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n    </B></TD><TD> - number of eigenvalues in the list
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - pointer to the array containing the eigenvalues
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigr </B></TD><TD> - pointer to the array containing the eigenvalues
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of the eigenvalues (only when using real numbers)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eigi </B></TD><TD> - imaginary part of the eigenvalues (only when using real numbers)
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
-<DT><B>perm </B> - permutation array. Must be initialized to 0:n-1 on input.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>perm </B></TD><TD> - permutation array. Must be initialized to 0:n-1 on input.
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Note</FONT></H3>
 The result is a list of indices in the original eigenvalue array
diff --git a/docs/manualpages/sys/SlepcVecNormalize.html b/docs/manualpages/sys/SlepcVecNormalize.html
index 4ae2bb7..b8b53e1 100644
--- a/docs/manualpages/sys/SlepcVecNormalize.html
+++ b/docs/manualpages/sys/SlepcVecNormalize.html
@@ -6,30 +6,30 @@
 <TITLE>SlepcVecNormalize</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcVecNormalize.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcVecNormalize.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcVecNormalize</H1>
 Normalizes a possibly complex vector by the 2-norm. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcsys.h" 
-PetscErrorCode <A HREF="../sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</A>(Vec xr,Vec xi,PetscBool iscomplex,PetscReal *norm)
+PetscErrorCode SlepcVecNormalize(Vec xr,Vec xi,PetscBool iscomplex,PetscReal *norm)
 </PRE>
 Collective on Vec
 <P>
 <H3><FONT COLOR="#883300">Input parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xr </B></TD><TD> - the real part of the vector (overwritten on output)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xr </B></TD><TD> - the real part of the vector (overwritten on output)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xi </B></TD><TD> - the imaginary part of the vector (not referenced if iscomplex is false)
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>xi </B></TD><TD> - the imaginary part of the vector (not referenced if iscomplex is false)
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>iscomplex </B></TD><TD> - a flag indicating if the vector is complex
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>iscomplex </B></TD><TD> - a flag indicating if the vector is complex
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output parameter</FONT></H3>
-<DT><B>norm </B> - the vector norm before normalization (can be set to NULL)
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>norm </B></TD><TD> - the vector norm before normalization (can be set to NULL)
+</TD></TR></TABLE>
 <P>
 
 <P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/sys/slepcutil.c.html#SlepcVecNormalize">src/sys/slepcutil.c</A>
diff --git a/docs/manualpages/sys/SlepcVecPoolCreate.html b/docs/manualpages/sys/SlepcVecPoolCreate.html
index 037784e..5384d38 100644
--- a/docs/manualpages/sys/SlepcVecPoolCreate.html
+++ b/docs/manualpages/sys/SlepcVecPoolCreate.html
@@ -6,28 +6,28 @@
 <TITLE>SlepcVecPoolCreate</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcVecPoolCreate.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcVecPoolCreate.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcVecPoolCreate</H1>
 Create a pool of Vec. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/SlepcVecPoolCreate.html#SlepcVecPoolCreate">SlepcVecPoolCreate</A>(Vec v,PetscInt init_size,VecPool *p)
+PetscErrorCode SlepcVecPoolCreate(Vec v,PetscInt init_size,VecPool *p)
 </PRE>
 Collective on VecPool
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v </B></TD><TD> - template vector.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>v </B></TD><TD> - template vector.
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>init_size </B></TD><TD> - first guess of maximum vectors.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>init_size </B></TD><TD> - first guess of maximum vectors.
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>pool </B> - the pool context.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pool </B></TD><TD> - the pool context.
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/sys/SlepcVecPoolDestroy.html b/docs/manualpages/sys/SlepcVecPoolDestroy.html
index f219790..8f3e1db 100644
--- a/docs/manualpages/sys/SlepcVecPoolDestroy.html
+++ b/docs/manualpages/sys/SlepcVecPoolDestroy.html
@@ -6,21 +6,21 @@
 <TITLE>SlepcVecPoolDestroy</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcVecPoolDestroy.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcVecPoolDestroy.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcVecPoolDestroy</H1>
 Destroy the pool of Vec. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/SlepcVecPoolDestroy.html#SlepcVecPoolDestroy">SlepcVecPoolDestroy</A>(VecPool *p)
+PetscErrorCode SlepcVecPoolDestroy(VecPool *p)
 </PRE>
 Collective on VecPool
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
-<DT><B>pool </B> - pool of Vec.
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pool </B></TD><TD> - pool of Vec.
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/sys/SlepcVecPoolGetVecs.html b/docs/manualpages/sys/SlepcVecPoolGetVecs.html
index f77f0c7..abcb782 100644
--- a/docs/manualpages/sys/SlepcVecPoolGetVecs.html
+++ b/docs/manualpages/sys/SlepcVecPoolGetVecs.html
@@ -6,28 +6,28 @@
 <TITLE>SlepcVecPoolGetVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcVecPoolGetVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcVecPoolGetVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcVecPoolGetVecs</H1>
 Get an array of Vec from the pool. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</A>(VecPool p,PetscInt n,Vec **vecs)
+PetscErrorCode SlepcVecPoolGetVecs(VecPool p,PetscInt n,Vec **vecs)
 </PRE>
 Collective on VecPool
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pool </B></TD><TD> - pool of Vec.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pool </B></TD><TD> - pool of Vec.
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of vectors.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of vectors.
 </TD></TR></TABLE>
 <P>
-<H3><FONT COLOR="#883300">Output Paramter</FONT></H3>
-<DT><B>vecs </B> - vectors
-<br>
+<H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vecs </B></TD><TD> - vectors
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/sys/SlepcVecPoolRestoreVecs.html b/docs/manualpages/sys/SlepcVecPoolRestoreVecs.html
index 62595ac..e021719 100644
--- a/docs/manualpages/sys/SlepcVecPoolRestoreVecs.html
+++ b/docs/manualpages/sys/SlepcVecPoolRestoreVecs.html
@@ -6,25 +6,25 @@
 <TITLE>SlepcVecPoolRestoreVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/SlepcVecPoolRestoreVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/SlepcVecPoolRestoreVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>SlepcVecPoolRestoreVecs</H1>
 Get back an array of Vec previously returned by <A HREF="../sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</A>(). 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</A>(VecPool p,PetscInt n,Vec **vecs)
+PetscErrorCode SlepcVecPoolRestoreVecs(VecPool p,PetscInt n,Vec **vecs)
 </PRE>
 Collective on VecPool
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pool </B></TD><TD> - pool of Vec.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pool </B></TD><TD> - pool of Vec.
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of vectors.
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of vectors.
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vecs </B></TD><TD> - vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vecs </B></TD><TD> - vectors
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/sys/VecCompGetSubVecs.html b/docs/manualpages/sys/VecCompGetSubVecs.html
index a57ae66..457ed0b 100644
--- a/docs/manualpages/sys/VecCompGetSubVecs.html
+++ b/docs/manualpages/sys/VecCompGetSubVecs.html
@@ -6,27 +6,27 @@
 <TITLE>VecCompGetSubVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/VecCompGetSubVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/VecCompGetSubVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>VecCompGetSubVecs</H1>
 Returns the entire array of vectors defining a compound vector. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/VecCompGetSubVecs.html#VecCompGetSubVecs">VecCompGetSubVecs</A>(Vec win,PetscInt *n,const Vec **x)
+PetscErrorCode VecCompGetSubVecs(Vec win,PetscInt *n,const Vec **x)
 </PRE>
 Collective on Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
-<DT><B>win </B> - compound vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>win </B></TD><TD> - compound vector
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of child vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - array of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - array of child vectors
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/sys/VecCompSetSubVecs.html b/docs/manualpages/sys/VecCompSetSubVecs.html
index 606c755..d416dfc 100644
--- a/docs/manualpages/sys/VecCompSetSubVecs.html
+++ b/docs/manualpages/sys/VecCompSetSubVecs.html
@@ -6,25 +6,25 @@
 <TITLE>VecCompSetSubVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/VecCompSetSubVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/VecCompSetSubVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>VecCompSetSubVecs</H1>
 Resets the number of subvectors defining a compound vector, of replaces the subvectors. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</A>(Vec win,PetscInt n,Vec *x)
+PetscErrorCode VecCompSetSubVecs(Vec win,PetscInt n,Vec *x)
 </PRE>
 Collective on Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>win </B></TD><TD> - compound vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>win </B></TD><TD> - compound vector
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of child vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - array of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - array of child vectors
 </TD></TR></TABLE>
 <P>
 
diff --git a/docs/manualpages/sys/VecCreateComp.html b/docs/manualpages/sys/VecCreateComp.html
index c841de7..f42e6fa 100644
--- a/docs/manualpages/sys/VecCreateComp.html
+++ b/docs/manualpages/sys/VecCreateComp.html
@@ -6,34 +6,34 @@
 <TITLE>VecCreateComp</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/VecCreateComp.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/VecCreateComp.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>VecCreateComp</H1>
 Creates a new vector containing several subvectors, each stored separately. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/VecCreateComp.html#VecCreateComp">VecCreateComp</A>(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)
+PetscErrorCode VecCreateComp(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)
 </PRE>
 Collective on Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator for the new Vec
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comm </B></TD><TD> - communicator for the new Vec
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Nx   </B></TD><TD> - array of (initial) global sizes of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Nx   </B></TD><TD> - array of (initial) global sizes of child vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n    </B></TD><TD> - number of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n    </B></TD><TD> - number of child vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t    </B></TD><TD> - type of the child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t    </B></TD><TD> - type of the child vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vparent </B></TD><TD> - (optional) template vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vparent </B></TD><TD> - (optional) template vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>V </B> - new vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - new vector
+</TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Notes</FONT></H3>
 This is similar to PETSc's VecNest but customized for SLEPc's needs. In particular,
diff --git a/docs/manualpages/sys/VecCreateCompWithVecs.html b/docs/manualpages/sys/VecCreateCompWithVecs.html
index d126d2c..841ed0b 100644
--- a/docs/manualpages/sys/VecCreateCompWithVecs.html
+++ b/docs/manualpages/sys/VecCreateCompWithVecs.html
@@ -6,30 +6,30 @@
 <TITLE>VecCreateCompWithVecs</TITLE>
 </HEAD>
 <BODY BGCOLOR="FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/VecCreateCompWithVecs.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/VecCreateCompWithVecs.html "><small>Report Typos and Errors</small></a></div>
 
 <H1>VecCreateCompWithVecs</H1>
 Creates a new vector containing several subvectors, each stored separately, from an array of Vecs. 
 <H3><FONT COLOR="#883300">Synopsis</FONT></H3>
 <PRE>
 #include "slepcvec.h" 
-PetscErrorCode <A HREF="../sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</A>(Vec *x,PetscInt n,Vec Vparent,Vec *V)
+PetscErrorCode VecCreateCompWithVecs(Vec *x,PetscInt n,Vec Vparent,Vec *V)
 </PRE>
 Collective on Vec
 <P>
 <H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
 <TABLE border="0" cellpadding="0" cellspacing="0">
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - array of Vecs
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD> - array of Vecs
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of child vectors
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD> - number of child vectors
 </TD></TR>
-<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vparent </B></TD><TD> - (optional) template vector
+<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Vparent </B></TD><TD> - (optional) template vector
 </TD></TR></TABLE>
 <P>
 <H3><FONT COLOR="#883300">Output Parameter</FONT></H3>
-<DT><B>V </B> - new vector
-<br>
+<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>V </B></TD><TD> - new vector
+</TD></TR></TABLE>
 <P>
 
 <P>
diff --git a/docs/manualpages/sys/index.html b/docs/manualpages/sys/index.html
index f08e16c..81235b3 100644
--- a/docs/manualpages/sys/index.html
+++ b/docs/manualpages/sys/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 docs/manualpages/sys/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 docs/manualpages/sys/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>SLEPc System routines</h2>
 
@@ -24,8 +24,8 @@ Useful tools for application programmers can be found in PETSc's system routines
  <TD WIDTH=250><A HREF="./SlepcInitializeFortran.html">SlepcInitializeFortran</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SlepcInitialized.html">SlepcInitialized</A></TD>
  <TD WIDTH=250><A HREF="./SlepcInitialize.html">SlepcInitialize</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcInitialized.html">SlepcInitialized</A></TD>
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Intermediate - Setting options for algorithms and data structures</B></TD></TR>
@@ -38,25 +38,29 @@ Useful tools for application programmers can be found in PETSc's system routines
  <TD WIDTH=250><A HREF="./"></A></TD>
 <TR><TD WIDTH=250 COLSPAN="3"><B>Developer - Interfaces intended primarily for library developers, not for typical applications programmers</B></TD></TR>
  <TD WIDTH=250><A HREF="./SlepcCheckOrthogonality.html">SlepcCheckOrthogonality</A></TD>
- <TD WIDTH=250><A HREF="./SlepcSortEigenvalues.html">SlepcSortEigenvalues</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcSNPrintfScalar.html">SlepcSNPrintfScalar</A></TD>
  <TD WIDTH=250><A HREF="./SlepcVecPoolRestoreVecs.html">SlepcVecPoolRestoreVecs</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SlepcMatConvertSeqDense.html">SlepcMatConvertSeqDense</A></TD>
- <TD WIDTH=250><A HREF="./SlepcVecNormalize.html">SlepcVecNormalize</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcConvMonitorCreate.html">SlepcConvMonitorCreate</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcSortEigenvalues.html">SlepcSortEigenvalues</A></TD>
  <TD WIDTH=250><A HREF="./VecCompGetSubVecs.html">VecCompGetSubVecs</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SlepcMatTile.html">SlepcMatTile</A></TD>
- <TD WIDTH=250><A HREF="./SlepcVecPoolCreate.html">SlepcVecPoolCreate</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcConvMonitorDestroy.html">SlepcConvMonitorDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcVecNormalize.html">SlepcVecNormalize</A></TD>
  <TD WIDTH=250><A HREF="./VecCompSetSubVecs.html">VecCompSetSubVecs</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SlepcSCCompare.html">SlepcSCCompare</A></TD>
- <TD WIDTH=250><A HREF="./SlepcVecPoolDestroy.html">SlepcVecPoolDestroy</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcMatConvertSeqDense.html">SlepcMatConvertSeqDense</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcVecPoolCreate.html">SlepcVecPoolCreate</A></TD>
  <TD WIDTH=250><A HREF="./VecCreateComp.html">VecCreateComp</A></TD>
 <TR>
- <TD WIDTH=250><A HREF="./SlepcSNPrintfScalar.html">SlepcSNPrintfScalar</A></TD>
- <TD WIDTH=250><A HREF="./SlepcVecPoolGetVecs.html">SlepcVecPoolGetVecs</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcMatTile.html">SlepcMatTile</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcVecPoolDestroy.html">SlepcVecPoolDestroy</A></TD>
  <TD WIDTH=250><A HREF="./VecCreateCompWithVecs.html">VecCreateCompWithVecs</A></TD>
 <TR>
+ <TD WIDTH=250><A HREF="./SlepcSCCompare.html">SlepcSCCompare</A></TD>
+ <TD WIDTH=250><A HREF="./SlepcVecPoolGetVecs.html">SlepcVecPoolGetVecs</A></TD>
+ <TD WIDTH=250><A HREF="./"></A></TD>
+<TR>
 <TR><TD WIDTH=250 COLSPAN="3"><B>No deprecated routines</B></TD></TR>
 </TABLE>
 <BR><A HREF="../../index.html">Table of Contents</A>
diff --git a/gmakefile b/gmakefile
index 9476e9f..3f305ac 100644
--- a/gmakefile
+++ b/gmakefile
@@ -50,7 +50,9 @@ else
 endif
 libslepcall := $(if $(filter-out no,$(BUILDSHAREDLIB)),$(libslepcall_shared) $(libslepcall_soname),$(libslepcall_static))
 
-generated := $(PETSC_ARCH)/lib/slepc/conf/files
+generated      := $(PETSC_ARCH)/lib/slepc/conf/files
+slepcconf      := $(PETSC_ARCH)/include/slepcconf.h
+slepcvariables := $(PETSC_ARCH)/lib/slepc/conf/slepcvariables
 
 all : $(generated) $(libslepcall)
 
@@ -71,7 +73,7 @@ else				# Show the full command line
   quiet = $($1)
 endif
 
-$(PETSC_ARCH)/lib/slepc/conf/files : $(PETSC_ARCH)/include/slepcconf.h
+$(generated) : $(slepcconf) $(slepcvariables)
 	$(PYTHON) ./config/gmakegen.py --petsc-arch=$(PETSC_ARCH) --installed-petsc=$(INSTALLED_PETSC)
 
 -include $(generated)
@@ -85,7 +87,7 @@ endif
 SLEPC_COMPILE.c = $(call quiet,$(cc_name)) -c $(PCC_FLAGS) $(CFLAGS) $(CCPPFLAGS) $(SLEPC_CC_INCLUDES) $(C_DEPFLAGS)
 SLEPC_COMPILE.cxx = $(call quiet,CXX) -c $(CXX_FLAGS) $(CFLAGS) $(CCPPFLAGS) $(SLEPC_CC_INCLUDES) $(CXX_DEPFLAGS)
 SLEPC_COMPILE.cu = $(call quiet,CUDAC) -c $(CUDAC_FLAGS) --compiler-options="$(PCC_FLAGS) $(CXXFLAGS) $(CCPPFLAGS)"
-SLEPC_GENDEPS.cu = $(call quiet,CUDAC,.dep) --generate-dependencies $(CUDAC_FLAGS) --compiler-options="$(PCC_FLAGS) $(CXXFLAGS) $(CCPPFLAGS)"
+SLEPC_GENDEPS.cu = $(call quiet,CUDAC,.dep) --generate-dependencies --output-directory=$(@D) $(CUDAC_FLAGS) --compiler-options="$(PCC_FLAGS) $(CXXFLAGS) $(CCPPFLAGS)"
 SLEPC_COMPILE.F = $(call quiet,FC) -c $(FC_FLAGS) $(FFLAGS) $(FCPPFLAGS) $(FC_DEPFLAGS)
 
 langs := c cu cxx F
@@ -177,6 +179,9 @@ $(OBJDIR)/src/pep/f90-mod/slepcpepmod.o   : $(OBJDIR)/src/eps/f90-mod/slepcepsmo
 $(OBJDIR)/src/nep/f90-mod/slepcnepmod.o   : $(OBJDIR)/src/pep/f90-mod/slepcpepmod.o
 $(OBJDIR)/src/svd/f90-mod/slepcsvdmod.o   : $(OBJDIR)/src/eps/f90-mod/slepcepsmod.o
 
+# all sources should get recompiled when slepcvariables changes (i.e when configure is rerun or when slepcvariables is manually edited.)
+$(srcs.o) : $(slepcvariables)
+
 %/.DIR :
 	@mkdir -p $(@D)
 	@touch $@
diff --git a/include/index.html b/include/index.html
index 70ca11c..3799183 100644
--- a/include/index.html
+++ b/include/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="slepc/finclude/">slepc/finclude/</a><br>
 <a href="slepc/private/">slepc/private/</a><br>
diff --git a/include/makefile b/include/makefile
index 66632b7..c56f992 100644
--- a/include/makefile
+++ b/include/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #     
diff --git a/include/makefile.html b/include/makefile.html
index 8facf08..418d7b6 100644
--- a/include/makefile.html
+++ b/include/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:36+00:00">
+<meta name="date" content="2016-05-16T10:34:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#     </font>
diff --git a/include/slepc.h b/include/slepc.h
index 5f2e902..20c3139 100644
--- a/include/slepc.h
+++ b/include/slepc.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepc.h.html b/include/slepc.h.html
index 368a824..32a5b74 100644
--- a/include/slepc.h.html
+++ b/include/slepc.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:32+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Include all top-level SLEPc functionality.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/include/slepc/finclude/ftn-auto/slepcbv.h90 b/include/slepc/finclude/ftn-auto/slepcbv.h90
index e4b8ba9..e7d7915 100644
--- a/include/slepc/finclude/ftn-auto/slepcbv.h90
+++ b/include/slepc/finclude/ftn-auto/slepcbv.h90
@@ -84,6 +84,16 @@
        Vec b ! Vec
        integer z
        end subroutine
+      subroutine BVSetRandomContext(a,b,z)
+       BV a ! BV
+       PetscRandom b ! PetscRandom
+       integer z
+       end subroutine
+      subroutine BVGetRandomContext(a,b,z)
+       BV a ! BV
+       PetscRandom b ! PetscRandom
+       integer z
+       end subroutine
       subroutine BVSetFromOptions(a,z)
        BV a ! BV
        integer z
@@ -237,15 +247,13 @@
        PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine BVSetRandom(a,b,z)
+      subroutine BVSetRandom(a,z)
        BV a ! BV
-       PetscRandom b ! PetscRandom
        integer z
        end subroutine
-      subroutine BVSetRandomColumn(a,b,c,z)
+      subroutine BVSetRandomColumn(a,b,z)
        BV a ! BV
        PetscInt b ! PetscInt
-       PetscRandom c ! PetscRandom
        integer z
        end subroutine
       subroutine BVMatMult(a,b,c,z)
diff --git a/include/slepc/finclude/ftn-auto/slepcds.h90 b/include/slepc/finclude/ftn-auto/slepcds.h90
index 1727145..317368c 100644
--- a/include/slepc/finclude/ftn-auto/slepcds.h90
+++ b/include/slepc/finclude/ftn-auto/slepcds.h90
@@ -1,26 +1,26 @@
-      subroutine DSPEPSetDegree(a,b,z)
+      subroutine DSNEPSetFN(a,b,c,z)
        DS a ! DS
        PetscInt b ! PetscInt
+       FN c (*) ! FN
        integer z
        end subroutine
-      subroutine DSPEPGetDegree(a,b,z)
+      subroutine DSNEPGetFN(a,b,c,z)
        DS a ! DS
        PetscInt b ! PetscInt
+       FN c ! FN
        integer z
        end subroutine
-      subroutine DSNEPSetFN(a,b,c,z)
+      subroutine DSNEPGetNumFN(a,b,z)
        DS a ! DS
        PetscInt b ! PetscInt
-       FN c (*) ! FN
        integer z
        end subroutine
-      subroutine DSNEPGetFN(a,b,c,z)
+      subroutine DSPEPSetDegree(a,b,z)
        DS a ! DS
        PetscInt b ! PetscInt
-       FN c ! FN
        integer z
        end subroutine
-      subroutine DSNEPGetNumFN(a,b,z)
+      subroutine DSPEPGetDegree(a,b,z)
        DS a ! DS
        PetscInt b ! PetscInt
        integer z
diff --git a/include/slepc/finclude/ftn-auto/slepceps.h90 b/include/slepc/finclude/ftn-auto/slepceps.h90
index c74ee38..d773e9d 100644
--- a/include/slepc/finclude/ftn-auto/slepceps.h90
+++ b/include/slepc/finclude/ftn-auto/slepceps.h90
@@ -1,223 +1,73 @@
-      subroutine EPSBlzpackSetBlockSize(a,b,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSBlzpackSetNSteps(a,b,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurSetRestart(a,b,z)
-       EPS a ! EPS
-       PetscReal b ! PetscReal
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurGetRestart(a,b,z)
-       EPS a ! EPS
-       PetscReal b ! PetscReal
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurSetLocking(a,b,z)
-       EPS a ! EPS
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurGetLocking(a,b,z)
-       EPS a ! EPS
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurSetPartitions(a,b,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurGetPartitions(a,b,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurSetDetectZeros(a,b,z)
-       EPS a ! EPS
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurGetDetectZeros(a,b,z)
-       EPS a ! EPS
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurSetDimensions(a,b,c,d,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSKrylovSchurGetDimensions(a,b,c,d,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSPowerSetShiftType(a,b,z)
-       EPS a ! EPS
-       EPSPowerShiftType b ! EPSPowerShiftType
-       integer z
-       end subroutine
-      subroutine EPSPowerGetShiftType(a,b,z)
-       EPS a ! EPS
-       EPSPowerShiftType b ! EPSPowerShiftType
-       integer z
-       end subroutine
-      subroutine EPSCISSSetSizes(a,b,c,d,e,f,g,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       PetscInt e ! PetscInt
-       PetscInt f ! PetscInt
-       PetscBool g ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSCISSGetSizes(a,b,c,d,e,f,g,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       PetscInt e ! PetscInt
-       PetscInt f ! PetscInt
-       PetscBool g ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSCISSSetThreshold(a,b,c,z)
-       EPS a ! EPS
-       PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       integer z
-       end subroutine
-      subroutine EPSCISSGetThreshold(a,b,c,z)
-       EPS a ! EPS
-       PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       integer z
-       end subroutine
-      subroutine EPSCISSSetRefinement(a,b,c,d,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSCISSGetRefinement(a,b,c,d,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSCISSSetUseST(a,b,z)
-       EPS a ! EPS
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSCISSGetUseST(a,b,z)
-       EPS a ! EPS
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine EPSFEASTSetNumPoints(a,b,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSFEASTGetNumPoints(a,b,z)
-       EPS a ! EPS
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine EPSJDSetKrylovStart(a,b,z)
+      subroutine EPSGDSetKrylovStart(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSJDGetKrylovStart(a,b,z)
+      subroutine EPSGDGetKrylovStart(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSJDSetBlockSize(a,b,z)
+      subroutine EPSGDSetBlockSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDGetBlockSize(a,b,z)
+      subroutine EPSGDGetBlockSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDGetRestart(a,b,c,z)
+      subroutine EPSGDGetRestart(a,b,c,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDSetRestart(a,b,c,z)
+      subroutine EPSGDSetRestart(a,b,c,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDGetInitialSize(a,b,z)
+      subroutine EPSGDGetInitialSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDSetInitialSize(a,b,z)
+      subroutine EPSGDSetInitialSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDGetFix(a,b,z)
-       EPS a ! EPS
-       PetscReal b ! PetscReal
-       integer z
-       end subroutine
-      subroutine EPSJDSetFix(a,b,z)
-       EPS a ! EPS
-       PetscReal b ! PetscReal
-       integer z
-       end subroutine
-      subroutine EPSJDSetConstCorrectionTol(a,b,z)
+      subroutine EPSGDSetBOrth(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSJDGetConstCorrectionTol(a,b,z)
+      subroutine EPSGDGetBOrth(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSJDGetWindowSizes(a,b,c,z)
+      subroutine EPSGDGetWindowSizes(a,b,c,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDSetWindowSizes(a,b,c,z)
+      subroutine EPSGDSetWindowSizes(a,b,c,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSJDSetBOrth(a,b,z)
+      subroutine EPSGDGetDoubleExpansion(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSJDGetBOrth(a,b,z)
+      subroutine EPSGDSetDoubleExpansion(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
@@ -480,6 +330,16 @@
        EPSConv b ! EPSConv
        integer z
        end subroutine
+      subroutine EPSSetStoppingTest(a,b,z)
+       EPS a ! EPS
+       EPSStop b ! EPSStop
+       integer z
+       end subroutine
+      subroutine EPSGetStoppingTest(a,b,z)
+       EPS a ! EPS
+       EPSStop b ! EPSStop
+       integer z
+       end subroutine
       subroutine EPSSetProblemType(a,b,z)
        EPS a ! EPS
        EPSProblemType b ! EPSProblemType
@@ -544,6 +404,90 @@
        PetscBool b ! PetscBool
        integer z
        end subroutine
+      subroutine EPSCISSSetSizes(a,b,c,d,e,f,g,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       PetscInt d ! PetscInt
+       PetscInt e ! PetscInt
+       PetscInt f ! PetscInt
+       PetscBool g ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSCISSGetSizes(a,b,c,d,e,f,g,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       PetscInt d ! PetscInt
+       PetscInt e ! PetscInt
+       PetscInt f ! PetscInt
+       PetscBool g ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSCISSSetThreshold(a,b,c,z)
+       EPS a ! EPS
+       PetscReal b ! PetscReal
+       PetscReal c ! PetscReal
+       integer z
+       end subroutine
+      subroutine EPSCISSGetThreshold(a,b,c,z)
+       EPS a ! EPS
+       PetscReal b ! PetscReal
+       PetscReal c ! PetscReal
+       integer z
+       end subroutine
+      subroutine EPSCISSSetRefinement(a,b,c,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine EPSCISSGetRefinement(a,b,c,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine EPSCISSSetUseST(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSCISSGetUseST(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSCISSSetQuadRule(a,b,z)
+       EPS a ! EPS
+       EPSCISSQuadRule b ! EPSCISSQuadRule
+       integer z
+       end subroutine
+      subroutine EPSCISSGetQuadRule(a,b,z)
+       EPS a ! EPS
+       EPSCISSQuadRule b ! EPSCISSQuadRule
+       integer z
+       end subroutine
+      subroutine EPSCISSSetExtraction(a,b,z)
+       EPS a ! EPS
+       EPSCISSExtraction b ! EPSCISSExtraction
+       integer z
+       end subroutine
+      subroutine EPSCISSGetExtraction(a,b,z)
+       EPS a ! EPS
+       EPSCISSExtraction b ! EPSCISSExtraction
+       integer z
+       end subroutine
+      subroutine EPSBLOPEXSetBlockSize(a,b,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine EPSBLOPEXGetBlockSize(a,b,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
       subroutine EPSPRIMMESetBlockSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
@@ -564,118 +508,192 @@
        EPSPRIMMEMethod b ! EPSPRIMMEMethod
        integer z
        end subroutine
-      subroutine EPSGDSetKrylovStart(a,b,z)
+      subroutine EPSPowerSetShiftType(a,b,z)
        EPS a ! EPS
-       PetscBool b ! PetscBool
+       EPSPowerShiftType b ! EPSPowerShiftType
        integer z
        end subroutine
-      subroutine EPSGDGetKrylovStart(a,b,z)
+      subroutine EPSPowerGetShiftType(a,b,z)
        EPS a ! EPS
-       PetscBool b ! PetscBool
+       EPSPowerShiftType b ! EPSPowerShiftType
        integer z
        end subroutine
-      subroutine EPSGDSetBlockSize(a,b,z)
+      subroutine EPSBlzpackSetBlockSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDGetBlockSize(a,b,z)
+      subroutine EPSBlzpackSetNSteps(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDGetRestart(a,b,c,z)
+      subroutine EPSLanczosSetReorthog(a,b,z)
+       EPS a ! EPS
+       EPSLanczosReorthogType b ! EPSLanczosReorthogType
+       integer z
+       end subroutine
+      subroutine EPSLanczosGetReorthog(a,b,z)
+       EPS a ! EPS
+       EPSLanczosReorthogType b ! EPSLanczosReorthogType
+       integer z
+       end subroutine
+      subroutine EPSRQCGSetReset(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDSetRestart(a,b,c,z)
+      subroutine EPSRQCGGetReset(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDGetInitialSize(a,b,z)
+      subroutine EPSKrylovSchurSetRestart(a,b,z)
+       EPS a ! EPS
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine EPSKrylovSchurGetRestart(a,b,z)
+       EPS a ! EPS
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine EPSKrylovSchurSetLocking(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSKrylovSchurGetLocking(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSKrylovSchurSetPartitions(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDSetInitialSize(a,b,z)
+      subroutine EPSKrylovSchurGetPartitions(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDSetBOrth(a,b,z)
+      subroutine EPSKrylovSchurSetDetectZeros(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSGDGetBOrth(a,b,z)
+      subroutine EPSKrylovSchurGetDetectZeros(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSGDGetWindowSizes(a,b,c,z)
+      subroutine EPSKrylovSchurSetDimensions(a,b,c,d,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        PetscInt c ! PetscInt
+       PetscInt d ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDSetWindowSizes(a,b,c,z)
+      subroutine EPSKrylovSchurGetDimensions(a,b,c,d,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        PetscInt c ! PetscInt
+       PetscInt d ! PetscInt
        integer z
        end subroutine
-      subroutine EPSGDGetDoubleExpansion(a,b,z)
+      subroutine EPSJDSetKrylovStart(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSGDSetDoubleExpansion(a,b,z)
+      subroutine EPSJDGetKrylovStart(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine EPSArnoldiSetDelayed(a,b,z)
+      subroutine EPSJDSetBlockSize(a,b,z)
        EPS a ! EPS
-       PetscBool b ! PetscBool
+       PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSArnoldiGetDelayed(a,b,z)
+      subroutine EPSJDGetBlockSize(a,b,z)
        EPS a ! EPS
-       PetscBool b ! PetscBool
+       PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSBLOPEXSetBlockSize(a,b,z)
+      subroutine EPSJDGetRestart(a,b,c,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSBLOPEXGetBlockSize(a,b,z)
+      subroutine EPSJDSetRestart(a,b,c,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine EPSRQCGSetReset(a,b,z)
+      subroutine EPSJDGetInitialSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSRQCGGetReset(a,b,z)
+      subroutine EPSJDSetInitialSize(a,b,z)
        EPS a ! EPS
        PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine EPSLanczosSetReorthog(a,b,z)
+      subroutine EPSJDGetFix(a,b,z)
        EPS a ! EPS
-       EPSLanczosReorthogType b ! EPSLanczosReorthogType
+       PetscReal b ! PetscReal
        integer z
        end subroutine
-      subroutine EPSLanczosGetReorthog(a,b,z)
+      subroutine EPSJDSetFix(a,b,z)
        EPS a ! EPS
-       EPSLanczosReorthogType b ! EPSLanczosReorthogType
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine EPSJDSetConstCorrectionTol(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSJDGetConstCorrectionTol(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSJDGetWindowSizes(a,b,c,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine EPSJDSetWindowSizes(a,b,c,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine EPSJDSetBOrth(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSJDGetBOrth(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSFEASTSetNumPoints(a,b,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine EPSFEASTGetNumPoints(a,b,z)
+       EPS a ! EPS
+       PetscInt b ! PetscInt
        integer z
        end subroutine
       subroutine EPSLOBPCGSetBlockSize(a,b,z)
@@ -688,6 +706,16 @@
        PetscInt b ! PetscInt
        integer z
        end subroutine
+      subroutine EPSLOBPCGSetRestart(a,b,z)
+       EPS a ! EPS
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine EPSLOBPCGGetRestart(a,b,z)
+       EPS a ! EPS
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
       subroutine EPSLOBPCGSetLocking(a,b,z)
        EPS a ! EPS
        PetscBool b ! PetscBool
@@ -698,3 +726,13 @@
        PetscBool b ! PetscBool
        integer z
        end subroutine
+      subroutine EPSArnoldiSetDelayed(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine EPSArnoldiGetDelayed(a,b,z)
+       EPS a ! EPS
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
diff --git a/include/slepc/finclude/ftn-auto/slepcfn.h90 b/include/slepc/finclude/ftn-auto/slepcfn.h90
index 9cc2b7f..d1a20cc 100644
--- a/include/slepc/finclude/ftn-auto/slepcfn.h90
+++ b/include/slepc/finclude/ftn-auto/slepcfn.h90
@@ -1,97 +1,103 @@
-      subroutine FNCreate(a,b,z)
-       integer a ! MPI_Comm
-       FN b ! FN
+      subroutine FNRationalSetNumerator(a,b,c,z)
+       FN a ! FN
+       PetscInt b ! PetscInt
+       PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine FNSetScale(a,b,c,z)
+      subroutine FNRationalGetNumerator(a,b,c,z)
        FN a ! FN
-       PetscScalar b ! PetscScalar
-       PetscScalar c ! PetscScalar
+       PetscInt b ! PetscInt
+       PetscScalar c (*) ! PetscScalar
        integer z
        end subroutine
-      subroutine FNGetScale(a,b,c,z)
+      subroutine FNRationalSetDenominator(a,b,c,z)
        FN a ! FN
-       PetscScalar b ! PetscScalar
+       PetscInt b ! PetscInt
        PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine FNEvaluateFunction(a,b,c,z)
+      subroutine FNRationalGetDenominator(a,b,c,z)
        FN a ! FN
-       PetscScalar b ! PetscScalar
-       PetscScalar c ! PetscScalar
+       PetscInt b ! PetscInt
+       PetscScalar c (*) ! PetscScalar
        integer z
        end subroutine
-      subroutine FNEvaluateDerivative(a,b,c,z)
+      subroutine FNPhiSetIndex(a,b,z)
        FN a ! FN
-       PetscScalar b ! PetscScalar
-       PetscScalar c ! PetscScalar
+       PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine FNEvaluateFunctionMat(a,b,c,z)
+      subroutine FNPhiGetIndex(a,b,z)
        FN a ! FN
-       Mat b ! Mat
-       Mat c ! Mat
+       PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine FNSetFromOptions(a,z)
+      subroutine FNCombineSetChildren(a,b,c,d,z)
        FN a ! FN
+       FNCombineType b ! FNCombineType
+       FN c ! FN
+       FN d ! FN
        integer z
        end subroutine
-      subroutine FNDuplicate(a,b,c,z)
+      subroutine FNCombineGetChildren(a,b,c,d,z)
        FN a ! FN
-       integer b ! MPI_Comm
+       FNCombineType b ! FNCombineType
        FN c ! FN
+       FN d ! FN
        integer z
        end subroutine
-      subroutine FNDestroy(a,z)
+      subroutine FNCreate(a,b,z)
+       integer a ! MPI_Comm
+       FN b ! FN
+       integer z
+       end subroutine
+      subroutine FNSetScale(a,b,c,z)
        FN a ! FN
+       PetscScalar b ! PetscScalar
+       PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine FNRationalSetNumerator(a,b,c,z)
+      subroutine FNGetScale(a,b,c,z)
        FN a ! FN
-       PetscInt b ! PetscInt
+       PetscScalar b ! PetscScalar
        PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine FNRationalGetNumerator(a,b,c,z)
+      subroutine FNEvaluateFunction(a,b,c,z)
        FN a ! FN
-       PetscInt b ! PetscInt
-       PetscScalar c (*) ! PetscScalar
+       PetscScalar b ! PetscScalar
+       PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine FNRationalSetDenominator(a,b,c,z)
+      subroutine FNEvaluateDerivative(a,b,c,z)
        FN a ! FN
-       PetscInt b ! PetscInt
+       PetscScalar b ! PetscScalar
        PetscScalar c ! PetscScalar
        integer z
        end subroutine
-      subroutine FNRationalGetDenominator(a,b,c,z)
+      subroutine FNEvaluateFunctionMat(a,b,c,z)
        FN a ! FN
-       PetscInt b ! PetscInt
-       PetscScalar c (*) ! PetscScalar
+       Mat b ! Mat
+       Mat c ! Mat
        integer z
        end subroutine
-      subroutine FNPhiSetIndex(a,b,z)
+      subroutine FNEvaluateFunctionMatVec(a,b,c,z)
        FN a ! FN
-       PetscInt b ! PetscInt
+       Mat b ! Mat
+       Vec c ! Vec
        integer z
        end subroutine
-      subroutine FNPhiGetIndex(a,b,z)
+      subroutine FNSetFromOptions(a,z)
        FN a ! FN
-       PetscInt b ! PetscInt
        integer z
        end subroutine
-      subroutine FNCombineSetChildren(a,b,c,d,z)
+      subroutine FNDuplicate(a,b,c,z)
        FN a ! FN
-       FNCombineType b ! FNCombineType
+       integer b ! MPI_Comm
        FN c ! FN
-       FN d ! FN
        integer z
        end subroutine
-      subroutine FNCombineGetChildren(a,b,c,d,z)
+      subroutine FNDestroy(a,z)
        FN a ! FN
-       FNCombineType b ! FNCombineType
-       FN c ! FN
-       FN d ! FN
        integer z
        end subroutine
diff --git a/include/slepc/finclude/ftn-auto/slepcnep.h90 b/include/slepc/finclude/ftn-auto/slepcnep.h90
index 4d46ce9..9e9035b 100644
--- a/include/slepc/finclude/ftn-auto/slepcnep.h90
+++ b/include/slepc/finclude/ftn-auto/slepcnep.h90
@@ -1,3 +1,169 @@
+      subroutine NEPInterpolSetDegree(a,b,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPInterpolGetDegree(a,b,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPInterpolSetPEP(a,b,z)
+       NEP a ! NEP
+       PEP b ! PEP
+       integer z
+       end subroutine
+      subroutine NEPInterpolGetPEP(a,b,z)
+       NEP a ! NEP
+       PEP b ! PEP
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSSetRestart(a,b,z)
+       NEP a ! NEP
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSGetRestart(a,b,z)
+       NEP a ! NEP
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSSetLocking(a,b,z)
+       NEP a ! NEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSGetLocking(a,b,z)
+       NEP a ! NEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSSetInterpolation(a,b,c,z)
+       NEP a ! NEP
+       PetscReal b ! PetscReal
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSGetInterpolation(a,b,c,z)
+       NEP a ! NEP
+       PetscReal b ! PetscReal
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSSetTrueResidual(a,b,z)
+       NEP a ! NEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPNLEIGSGetTrueResidual(a,b,z)
+       NEP a ! NEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPRIISetMaximumIterations(a,b,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPRIIGetMaximumIterations(a,b,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPRIISetLagPreconditioner(a,b,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPRIIGetLagPreconditioner(a,b,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPRIISetConstCorrectionTol(a,b,z)
+       NEP a ! NEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPRIIGetConstCorrectionTol(a,b,z)
+       NEP a ! NEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPRIISetKSP(a,b,z)
+       NEP a ! NEP
+       KSP b ! KSP
+       integer z
+       end subroutine
+      subroutine NEPRIIGetKSP(a,b,z)
+       NEP a ! NEP
+       KSP b ! KSP
+       integer z
+       end subroutine
+      subroutine NEPCISSSetSizes(a,b,c,d,e,f,g,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       PetscInt d ! PetscInt
+       PetscInt e ! PetscInt
+       PetscInt f ! PetscInt
+       PetscBool g ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPCISSGetSizes(a,b,c,d,e,f,g,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       PetscInt d ! PetscInt
+       PetscInt e ! PetscInt
+       PetscInt f ! PetscInt
+       PetscBool g ! PetscBool
+       integer z
+       end subroutine
+      subroutine NEPCISSSetThreshold(a,b,c,z)
+       NEP a ! NEP
+       PetscReal b ! PetscReal
+       PetscReal c ! PetscReal
+       integer z
+       end subroutine
+      subroutine NEPCISSGetThreshold(a,b,c,z)
+       NEP a ! NEP
+       PetscReal b ! PetscReal
+       PetscReal c ! PetscReal
+       integer z
+       end subroutine
+      subroutine NEPCISSSetRefinement(a,b,c,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPCISSGetRefinement(a,b,c,z)
+       NEP a ! NEP
+       PetscInt b ! PetscInt
+       PetscInt c ! PetscInt
+       integer z
+       end subroutine
+      subroutine NEPSLPSetEPS(a,b,z)
+       NEP a ! NEP
+       EPS b ! EPS
+       integer z
+       end subroutine
+      subroutine NEPSLPGetEPS(a,b,z)
+       NEP a ! NEP
+       EPS b ! EPS
+       integer z
+       end subroutine
+      subroutine NEPNArnoldiSetKSP(a,b,z)
+       NEP a ! NEP
+       KSP b ! KSP
+       integer z
+       end subroutine
+      subroutine NEPNArnoldiGetKSP(a,b,z)
+       NEP a ! NEP
+       KSP b ! KSP
+       integer z
+       end subroutine
       subroutine NEPCreate(a,b,z)
        integer a ! MPI_Comm
        NEP b ! NEP
@@ -41,12 +207,7 @@
        DS b ! DS
        integer z
        end subroutine
-      subroutine NEPSetKSP(a,b,z)
-       NEP a ! NEP
-       KSP b ! KSP
-       integer z
-       end subroutine
-      subroutine NEPGetKSP(a,b,z)
+      subroutine NEPRefineGetKSP(a,b,z)
        NEP a ! NEP
        KSP b ! KSP
        integer z
@@ -170,22 +331,16 @@
        NEP a ! NEP
        integer z
        end subroutine
-      subroutine NEPGetTolerances(a,b,c,d,e,f,z)
+      subroutine NEPGetTolerances(a,b,c,z)
        NEP a ! NEP
        PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       PetscReal d ! PetscReal
-       PetscInt e ! PetscInt
-       PetscInt f ! PetscInt
+       PetscInt c ! PetscInt
        integer z
        end subroutine
-      subroutine NEPSetTolerances(a,b,c,d,e,f,z)
+      subroutine NEPSetTolerances(a,b,c,z)
        NEP a ! NEP
        PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       PetscReal d ! PetscReal
-       PetscInt e ! PetscInt
-       PetscInt f ! PetscInt
+       PetscInt c ! PetscInt
        integer z
        end subroutine
       subroutine NEPGetDimensions(a,b,c,d,z)
@@ -212,24 +367,24 @@
        NEPWhich b ! NEPWhich
        integer z
        end subroutine
-      subroutine NEPSetLagPreconditioner(a,b,z)
+      subroutine NEPSetConvergenceTest(a,b,z)
        NEP a ! NEP
-       PetscInt b ! PetscInt
+       NEPConv b ! NEPConv
        integer z
        end subroutine
-      subroutine NEPGetLagPreconditioner(a,b,z)
+      subroutine NEPGetConvergenceTest(a,b,z)
        NEP a ! NEP
-       PetscInt b ! PetscInt
+       NEPConv b ! NEPConv
        integer z
        end subroutine
-      subroutine NEPSetConstCorrectionTol(a,b,z)
+      subroutine NEPSetStoppingTest(a,b,z)
        NEP a ! NEP
-       PetscBool b ! PetscBool
+       NEPStop b ! NEPStop
        integer z
        end subroutine
-      subroutine NEPGetConstCorrectionTol(a,b,z)
+      subroutine NEPGetStoppingTest(a,b,z)
        NEP a ! NEP
-       PetscBool b ! PetscBool
+       NEPStop b ! NEPStop
        integer z
        end subroutine
       subroutine NEPSetTrackAll(a,b,z)
@@ -242,20 +397,22 @@
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine NEPSetRefine(a,b,c,d,e,z)
+      subroutine NEPSetRefine(a,b,c,d,e,f,z)
        NEP a ! NEP
        NEPRefine b ! NEPRefine
        PetscInt c ! PetscInt
        PetscReal d ! PetscReal
        PetscInt e ! PetscInt
+       NEPRefineScheme f ! NEPRefineScheme
        integer z
        end subroutine
-      subroutine NEPGetRefine(a,b,c,d,e,z)
+      subroutine NEPGetRefine(a,b,c,d,e,f,z)
        NEP a ! NEP
        NEPRefine b ! NEPRefine
        PetscInt c ! PetscInt
        PetscReal d ! PetscReal
        PetscInt e ! PetscInt
+       NEPRefineScheme f ! NEPRefineScheme
        integer z
        end subroutine
       subroutine NEPSetUp(a,z)
@@ -293,79 +450,3 @@
        NEP a ! NEP
        integer z
        end subroutine
-      subroutine NEPCISSSetSizes(a,b,c,d,e,f,g,z)
-       NEP a ! NEP
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       PetscInt e ! PetscInt
-       PetscInt f ! PetscInt
-       PetscBool g ! PetscBool
-       integer z
-       end subroutine
-      subroutine NEPCISSGetSizes(a,b,c,d,e,f,g,z)
-       NEP a ! NEP
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       PetscInt e ! PetscInt
-       PetscInt f ! PetscInt
-       PetscBool g ! PetscBool
-       integer z
-       end subroutine
-      subroutine NEPCISSSetThreshold(a,b,c,z)
-       NEP a ! NEP
-       PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       integer z
-       end subroutine
-      subroutine NEPCISSGetThreshold(a,b,c,z)
-       NEP a ! NEP
-       PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       integer z
-       end subroutine
-      subroutine NEPCISSSetRefinement(a,b,c,d,z)
-       NEP a ! NEP
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       integer z
-       end subroutine
-      subroutine NEPCISSGetRefinement(a,b,c,d,z)
-       NEP a ! NEP
-       PetscInt b ! PetscInt
-       PetscInt c ! PetscInt
-       PetscInt d ! PetscInt
-       integer z
-       end subroutine
-      subroutine NEPInterpolSetDegree(a,b,z)
-       NEP a ! NEP
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine NEPInterpolGetDegree(a,b,z)
-       NEP a ! NEP
-       PetscInt b ! PetscInt
-       integer z
-       end subroutine
-      subroutine NEPInterpolSetPEP(a,b,z)
-       NEP a ! NEP
-       PEP b ! PEP
-       integer z
-       end subroutine
-      subroutine NEPInterpolGetPEP(a,b,z)
-       NEP a ! NEP
-       PEP b ! PEP
-       integer z
-       end subroutine
-      subroutine NEPSLPSetEPS(a,b,z)
-       NEP a ! NEP
-       EPS b ! EPS
-       integer z
-       end subroutine
-      subroutine NEPSLPGetEPS(a,b,z)
-       NEP a ! NEP
-       EPS b ! EPS
-       integer z
-       end subroutine
diff --git a/include/slepc/finclude/ftn-auto/slepcpep.h90 b/include/slepc/finclude/ftn-auto/slepcpep.h90
index f925307..bcfc67a 100644
--- a/include/slepc/finclude/ftn-auto/slepcpep.h90
+++ b/include/slepc/finclude/ftn-auto/slepcpep.h90
@@ -1,3 +1,13 @@
+      subroutine PEPJDSetRestart(a,b,z)
+       PEP a ! PEP
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine PEPJDGetRestart(a,b,z)
+       PEP a ! PEP
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
       subroutine PEPCreate(a,b,z)
        integer a ! MPI_Comm
        PEP b ! PEP
@@ -228,6 +238,16 @@
        PEPConv b ! PEPConv
        integer z
        end subroutine
+      subroutine PEPSetStoppingTest(a,b,z)
+       PEP a ! PEP
+       PEPStop b ! PEPStop
+       integer z
+       end subroutine
+      subroutine PEPGetStoppingTest(a,b,z)
+       PEP a ! PEP
+       PEPStop b ! PEPStop
+       integer z
+       end subroutine
       subroutine PEPSetScale(a,b,c,d,e,f,g,z)
        PEP a ! PEP
        PEPScale b ! PEPScale
@@ -264,7 +284,7 @@
        PetscInt c ! PetscInt
        PetscReal d ! PetscReal
        PetscInt e ! PetscInt
-       PetscBool f ! PetscBool
+       PEPRefineScheme f ! PEPRefineScheme
        integer z
        end subroutine
       subroutine PEPGetRefine(a,b,c,d,e,f,z)
@@ -273,7 +293,7 @@
        PetscInt c ! PetscInt
        PetscReal d ! PetscReal
        PetscInt e ! PetscInt
-       PetscBool f ! PetscBool
+       PEPRefineScheme f ! PEPRefineScheme
        integer z
        end subroutine
       subroutine PEPReasonViewFromOptions(a,z)
@@ -292,36 +312,6 @@
        PEP a ! PEP
        integer z
        end subroutine
-      subroutine PEPSTOARSetLocking(a,b,z)
-       PEP a ! PEP
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine PEPSTOARGetLocking(a,b,z)
-       PEP a ! PEP
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine PEPTOARSetRestart(a,b,z)
-       PEP a ! PEP
-       PetscReal b ! PetscReal
-       integer z
-       end subroutine
-      subroutine PEPTOARGetRestart(a,b,z)
-       PEP a ! PEP
-       PetscReal b ! PetscReal
-       integer z
-       end subroutine
-      subroutine PEPTOARSetLocking(a,b,z)
-       PEP a ! PEP
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine PEPTOARGetLocking(a,b,z)
-       PEP a ! PEP
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
       subroutine PEPQArnoldiSetRestart(a,b,z)
        PEP a ! PEP
        PetscReal b ! PetscReal
@@ -372,27 +362,33 @@
        EPS b ! EPS
        integer z
        end subroutine
-      subroutine PEPJDSetTolerances(a,b,c,d,z)
+      subroutine PEPSTOARSetLocking(a,b,z)
        PEP a ! PEP
-       PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       PetscReal d ! PetscReal
+       PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine PEPJDGetTolerances(a,b,c,d,z)
+      subroutine PEPSTOARGetLocking(a,b,z)
        PEP a ! PEP
-       PetscReal b ! PetscReal
-       PetscReal c ! PetscReal
-       PetscReal d ! PetscReal
+       PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine PEPJDSetRestart(a,b,z)
+      subroutine PEPTOARSetRestart(a,b,z)
        PEP a ! PEP
        PetscReal b ! PetscReal
        integer z
        end subroutine
-      subroutine PEPJDGetRestart(a,b,z)
+      subroutine PEPTOARGetRestart(a,b,z)
        PEP a ! PEP
        PetscReal b ! PetscReal
        integer z
        end subroutine
+      subroutine PEPTOARSetLocking(a,b,z)
+       PEP a ! PEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine PEPTOARGetLocking(a,b,z)
+       PEP a ! PEP
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
diff --git a/include/slepc/finclude/ftn-auto/slepcrg.h90 b/include/slepc/finclude/ftn-auto/slepcrg.h90
index b212c87..c1369c6 100644
--- a/include/slepc/finclude/ftn-auto/slepcrg.h90
+++ b/include/slepc/finclude/ftn-auto/slepcrg.h90
@@ -47,6 +47,15 @@
        PetscReal b ! PetscReal
        integer z
        end subroutine
+      subroutine RGPushScale(a,b,z)
+       RG a ! RG
+       PetscReal b ! PetscReal
+       integer z
+       end subroutine
+      subroutine RGPopScale(a,z)
+       RG a ! RG
+       integer z
+       end subroutine
       subroutine RGDestroy(a,z)
        RG a ! RG
        integer z
@@ -65,53 +74,53 @@
        PetscScalar d ! PetscScalar
        integer z
        end subroutine
-      subroutine RGIntervalSetEndpoints(a,b,c,d,e,z)
+      subroutine RGRingSetParameters(a,b,c,d,e,f,g,z)
        RG a ! RG
-       PetscReal b ! PetscReal
+       PetscScalar b ! PetscScalar
        PetscReal c ! PetscReal
        PetscReal d ! PetscReal
        PetscReal e ! PetscReal
+       PetscReal f ! PetscReal
+       PetscReal g ! PetscReal
        integer z
        end subroutine
-      subroutine RGIntervalGetEndpoints(a,b,c,d,e,z)
+      subroutine RGRingGetParameters(a,b,c,d,e,f,g,z)
        RG a ! RG
-       PetscReal b ! PetscReal
+       PetscScalar b ! PetscScalar
        PetscReal c ! PetscReal
        PetscReal d ! PetscReal
        PetscReal e ! PetscReal
+       PetscReal f ! PetscReal
+       PetscReal g ! PetscReal
        integer z
        end subroutine
-      subroutine RGEllipseSetParameters(a,b,c,d,z)
+      subroutine RGIntervalSetEndpoints(a,b,c,d,e,z)
        RG a ! RG
-       PetscScalar b ! PetscScalar
+       PetscReal b ! PetscReal
        PetscReal c ! PetscReal
        PetscReal d ! PetscReal
+       PetscReal e ! PetscReal
        integer z
        end subroutine
-      subroutine RGEllipseGetParameters(a,b,c,d,z)
+      subroutine RGIntervalGetEndpoints(a,b,c,d,e,z)
        RG a ! RG
-       PetscScalar b ! PetscScalar
+       PetscReal b ! PetscReal
        PetscReal c ! PetscReal
        PetscReal d ! PetscReal
+       PetscReal e ! PetscReal
        integer z
        end subroutine
-      subroutine RGRingSetParameters(a,b,c,d,e,f,g,z)
+      subroutine RGEllipseSetParameters(a,b,c,d,z)
        RG a ! RG
        PetscScalar b ! PetscScalar
        PetscReal c ! PetscReal
        PetscReal d ! PetscReal
-       PetscReal e ! PetscReal
-       PetscReal f ! PetscReal
-       PetscReal g ! PetscReal
        integer z
        end subroutine
-      subroutine RGRingGetParameters(a,b,c,d,e,f,g,z)
+      subroutine RGEllipseGetParameters(a,b,c,d,z)
        RG a ! RG
        PetscScalar b ! PetscScalar
        PetscReal c ! PetscReal
        PetscReal d ! PetscReal
-       PetscReal e ! PetscReal
-       PetscReal f ! PetscReal
-       PetscReal g ! PetscReal
        integer z
        end subroutine
diff --git a/include/slepc/finclude/ftn-auto/slepcst.h90 b/include/slepc/finclude/ftn-auto/slepcst.h90
index a350f2e..2abc61b 100644
--- a/include/slepc/finclude/ftn-auto/slepcst.h90
+++ b/include/slepc/finclude/ftn-auto/slepcst.h90
@@ -1,38 +1,3 @@
-      subroutine STPrecondGetMatForPC(a,b,z)
-       ST a ! ST
-       Mat b ! Mat
-       integer z
-       end subroutine
-      subroutine STPrecondSetMatForPC(a,b,z)
-       ST a ! ST
-       Mat b ! Mat
-       integer z
-       end subroutine
-      subroutine STPrecondSetKSPHasMat(a,b,z)
-       ST a ! ST
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine STPrecondGetKSPHasMat(a,b,z)
-       ST a ! ST
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine STShellSetContext(a,b,z)
-       ST a ! ST
-       PetscVoid b ! void
-       integer z
-       end subroutine
-      subroutine STCayleySetAntishift(a,b,z)
-       ST a ! ST
-       PetscScalar b ! PetscScalar
-       integer z
-       end subroutine
-      subroutine STCayleyGetAntishift(a,b,z)
-       ST a ! ST
-       PetscScalar b ! PetscScalar
-       integer z
-       end subroutine
       subroutine STApply(a,b,c,z)
        ST a ! ST
        Vec b ! Vec
@@ -229,3 +194,33 @@
        PetscInt c ! PetscInt
        integer z
        end subroutine
+      subroutine STPrecondGetMatForPC(a,b,z)
+       ST a ! ST
+       Mat b ! Mat
+       integer z
+       end subroutine
+      subroutine STPrecondSetMatForPC(a,b,z)
+       ST a ! ST
+       Mat b ! Mat
+       integer z
+       end subroutine
+      subroutine STPrecondSetKSPHasMat(a,b,z)
+       ST a ! ST
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine STPrecondGetKSPHasMat(a,b,z)
+       ST a ! ST
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine STCayleySetAntishift(a,b,z)
+       ST a ! ST
+       PetscScalar b ! PetscScalar
+       integer z
+       end subroutine
+      subroutine STCayleyGetAntishift(a,b,z)
+       ST a ! ST
+       PetscScalar b ! PetscScalar
+       integer z
+       end subroutine
diff --git a/include/slepc/finclude/ftn-auto/slepcsvd.h90 b/include/slepc/finclude/ftn-auto/slepcsvd.h90
index 38f5f7f..bb263de 100644
--- a/include/slepc/finclude/ftn-auto/slepcsvd.h90
+++ b/include/slepc/finclude/ftn-auto/slepcsvd.h90
@@ -1,3 +1,23 @@
+      subroutine SVDCyclicSetExplicitMatrix(a,b,z)
+       SVD a ! SVD
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine SVDCyclicGetExplicitMatrix(a,b,z)
+       SVD a ! SVD
+       PetscBool b ! PetscBool
+       integer z
+       end subroutine
+      subroutine SVDCyclicSetEPS(a,b,z)
+       SVD a ! SVD
+       EPS b ! EPS
+       integer z
+       end subroutine
+      subroutine SVDCyclicGetEPS(a,b,z)
+       SVD a ! SVD
+       EPS b ! EPS
+       integer z
+       end subroutine
       subroutine SVDLanczosSetOneSide(a,b,z)
        SVD a ! SVD
        PetscBool b ! PetscBool
@@ -124,6 +144,26 @@
        SVDWhich b ! SVDWhich
        integer z
        end subroutine
+      subroutine SVDSetConvergenceTest(a,b,z)
+       SVD a ! SVD
+       SVDConv b ! SVDConv
+       integer z
+       end subroutine
+      subroutine SVDGetConvergenceTest(a,b,z)
+       SVD a ! SVD
+       SVDConv b ! SVDConv
+       integer z
+       end subroutine
+      subroutine SVDSetStoppingTest(a,b,z)
+       SVD a ! SVD
+       SVDStop b ! SVDStop
+       integer z
+       end subroutine
+      subroutine SVDGetStoppingTest(a,b,z)
+       SVD a ! SVD
+       SVDStop b ! SVDStop
+       integer z
+       end subroutine
       subroutine SVDSetFromOptions(a,z)
        SVD a ! SVD
        integer z
@@ -188,43 +228,23 @@
        PetscReal d ! PetscReal
        integer z
        end subroutine
-      subroutine SVDCrossSetEPS(a,b,z)
-       SVD a ! SVD
-       EPS b ! EPS
-       integer z
-       end subroutine
-      subroutine SVDCrossGetEPS(a,b,z)
-       SVD a ! SVD
-       EPS b ! EPS
-       integer z
-       end subroutine
-      subroutine SVDCyclicSetExplicitMatrix(a,b,z)
+      subroutine SVDTRLanczosSetOneSide(a,b,z)
        SVD a ! SVD
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine SVDCyclicGetExplicitMatrix(a,b,z)
+      subroutine SVDTRLanczosGetOneSide(a,b,z)
        SVD a ! SVD
        PetscBool b ! PetscBool
        integer z
        end subroutine
-      subroutine SVDCyclicSetEPS(a,b,z)
+      subroutine SVDCrossSetEPS(a,b,z)
        SVD a ! SVD
        EPS b ! EPS
        integer z
        end subroutine
-      subroutine SVDCyclicGetEPS(a,b,z)
+      subroutine SVDCrossGetEPS(a,b,z)
        SVD a ! SVD
        EPS b ! EPS
        integer z
        end subroutine
-      subroutine SVDTRLanczosSetOneSide(a,b,z)
-       SVD a ! SVD
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
-      subroutine SVDTRLanczosGetOneSide(a,b,z)
-       SVD a ! SVD
-       PetscBool b ! PetscBool
-       integer z
-       end subroutine
diff --git a/include/slepc/finclude/ftn-custom/makefile b/include/slepc/finclude/ftn-custom/makefile
index 78a55b9..7710a09 100644
--- a/include/slepc/finclude/ftn-custom/makefile
+++ b/include/slepc/finclude/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #     
diff --git a/include/slepc/finclude/ftn-custom/slepcbv.h90 b/include/slepc/finclude/ftn-custom/slepcbv.h90
index 210260d..ee8cdeb 100644
--- a/include/slepc/finclude/ftn-custom/slepcbv.h90
+++ b/include/slepc/finclude/ftn-custom/slepcbv.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcbvdef.h90 b/include/slepc/finclude/ftn-custom/slepcbvdef.h90
index e39667c..41d87ba 100644
--- a/include/slepc/finclude/ftn-custom/slepcbvdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcbvdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcds.h90 b/include/slepc/finclude/ftn-custom/slepcds.h90
index 2dd810a..86692c0 100644
--- a/include/slepc/finclude/ftn-custom/slepcds.h90
+++ b/include/slepc/finclude/ftn-custom/slepcds.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcdsdef.h90 b/include/slepc/finclude/ftn-custom/slepcdsdef.h90
index abbd94d..d129706 100644
--- a/include/slepc/finclude/ftn-custom/slepcdsdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcdsdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepceps.h90 b/include/slepc/finclude/ftn-custom/slepceps.h90
index a81e9d5..feafada 100644
--- a/include/slepc/finclude/ftn-custom/slepceps.h90
+++ b/include/slepc/finclude/ftn-custom/slepceps.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcepsdef.h90 b/include/slepc/finclude/ftn-custom/slepcepsdef.h90
index b4d409c..ec7b6df 100644
--- a/include/slepc/finclude/ftn-custom/slepcepsdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcepsdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcfn.h90 b/include/slepc/finclude/ftn-custom/slepcfn.h90
index cefb546..9ab0266 100644
--- a/include/slepc/finclude/ftn-custom/slepcfn.h90
+++ b/include/slepc/finclude/ftn-custom/slepcfn.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcfndef.h90 b/include/slepc/finclude/ftn-custom/slepcfndef.h90
index e1ca23a..3f997f5 100644
--- a/include/slepc/finclude/ftn-custom/slepcfndef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcfndef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcmfn.h90 b/include/slepc/finclude/ftn-custom/slepcmfn.h90
index be194b3..c9d3c3a 100644
--- a/include/slepc/finclude/ftn-custom/slepcmfn.h90
+++ b/include/slepc/finclude/ftn-custom/slepcmfn.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcmfndef.h90 b/include/slepc/finclude/ftn-custom/slepcmfndef.h90
index af3d5bb..2b24f25 100644
--- a/include/slepc/finclude/ftn-custom/slepcmfndef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcmfndef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcnep.h90 b/include/slepc/finclude/ftn-custom/slepcnep.h90
index 5500e04..e0f9f80 100644
--- a/include/slepc/finclude/ftn-custom/slepcnep.h90
+++ b/include/slepc/finclude/ftn-custom/slepcnep.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcnepdef.h90 b/include/slepc/finclude/ftn-custom/slepcnepdef.h90
index 7d3ae54..9eaeef2 100644
--- a/include/slepc/finclude/ftn-custom/slepcnepdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcnepdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcpep.h90 b/include/slepc/finclude/ftn-custom/slepcpep.h90
index 81af790..d0cee9a 100644
--- a/include/slepc/finclude/ftn-custom/slepcpep.h90
+++ b/include/slepc/finclude/ftn-custom/slepcpep.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcpepdef.h90 b/include/slepc/finclude/ftn-custom/slepcpepdef.h90
index f9808a6..65a9077 100644
--- a/include/slepc/finclude/ftn-custom/slepcpepdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcpepdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcrg.h90 b/include/slepc/finclude/ftn-custom/slepcrg.h90
index 86d1b6a..1af7390 100644
--- a/include/slepc/finclude/ftn-custom/slepcrg.h90
+++ b/include/slepc/finclude/ftn-custom/slepcrg.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcrgdef.h90 b/include/slepc/finclude/ftn-custom/slepcrgdef.h90
index 947f036..2c3804b 100644
--- a/include/slepc/finclude/ftn-custom/slepcrgdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcrgdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcst.h90 b/include/slepc/finclude/ftn-custom/slepcst.h90
index 2235bad..1aa482d 100644
--- a/include/slepc/finclude/ftn-custom/slepcst.h90
+++ b/include/slepc/finclude/ftn-custom/slepcst.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcstdef.h90 b/include/slepc/finclude/ftn-custom/slepcstdef.h90
index b9c2f5d..6cb5341 100644
--- a/include/slepc/finclude/ftn-custom/slepcstdef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcstdef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcsvd.h90 b/include/slepc/finclude/ftn-custom/slepcsvd.h90
index 994088b..6641a63 100644
--- a/include/slepc/finclude/ftn-custom/slepcsvd.h90
+++ b/include/slepc/finclude/ftn-custom/slepcsvd.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/ftn-custom/slepcsvddef.h90 b/include/slepc/finclude/ftn-custom/slepcsvddef.h90
index e4defdb..753f104 100644
--- a/include/slepc/finclude/ftn-custom/slepcsvddef.h90
+++ b/include/slepc/finclude/ftn-custom/slepcsvddef.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/index.html b/include/slepc/finclude/index.html
index daacd81..f1b00e4 100644
--- a/include/slepc/finclude/index.html
+++ b/include/slepc/finclude/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
  
 <a href="slepc.h.html">slepc.h</a><br>
diff --git a/include/slepc/finclude/makefile b/include/slepc/finclude/makefile
index 6aacb11..aeeff16 100644
--- a/include/slepc/finclude/makefile
+++ b/include/slepc/finclude/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #     
diff --git a/include/slepc/finclude/makefile.html b/include/slepc/finclude/makefile.html
index 86f2717..3c47451 100644
--- a/include/slepc/finclude/makefile.html
+++ b/include/slepc/finclude/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:41+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#     </font>
diff --git a/include/slepc/finclude/slepc.h b/include/slepc/finclude/slepc.h
index eed2acc..1f25511 100644
--- a/include/slepc/finclude/slepc.h
+++ b/include/slepc/finclude/slepc.h
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepc.h.html b/include/slepc/finclude/slepc.h.html
index c0244b2..11bc717 100644
--- a/include/slepc/finclude/slepc.h.html
+++ b/include/slepc/finclude/slepc.h.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepc.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:36+00:00">
+<meta name="date" content="2016-05-16T10:34:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepc.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepc.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!
diff --git a/include/slepc/finclude/slepc.h90 b/include/slepc/finclude/slepc.h90
index f472c54..d1f81e2 100644
--- a/include/slepc/finclude/slepc.h90
+++ b/include/slepc/finclude/slepc.h90
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepc.h90.html b/include/slepc/finclude/slepc.h90.html
index c056094..b1ee144 100644
--- a/include/slepc/finclude/slepc.h90.html
+++ b/include/slepc/finclude/slepc.h90.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepc.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepc.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepc.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!
diff --git a/include/slepc/finclude/slepcbv.h b/include/slepc/finclude/slepcbv.h
index 7554f54..2a96101 100644
--- a/include/slepc/finclude/slepcbv.h
+++ b/include/slepc/finclude/slepcbv.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcbv.h.html b/include/slepc/finclude/slepcbv.h.html
index fa89225..067cf03 100644
--- a/include/slepc/finclude/slepcbv.h.html
+++ b/include/slepc/finclude/slepcbv.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcbv.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcbv.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcbv.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
diff --git a/include/slepc/finclude/slepcbv.h90 b/include/slepc/finclude/slepcbv.h90
index 4322482..e2a4556 100644
--- a/include/slepc/finclude/slepcbv.h90
+++ b/include/slepc/finclude/slepcbv.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcbv.h90.html b/include/slepc/finclude/slepcbv.h90.html
index a5cfe3d..3395351 100644
--- a/include/slepc/finclude/slepcbv.h90.html
+++ b/include/slepc/finclude/slepcbv.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcbv.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcbv.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcbv.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcbvdef.h b/include/slepc/finclude/slepcbvdef.h
index b7f1b9b..f0850b9 100644
--- a/include/slepc/finclude/slepcbvdef.h
+++ b/include/slepc/finclude/slepcbvdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,14 +20,14 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCBV_H)
-#define __SLEPCBV_H
+#if !defined(__SLEPCBVDEF_H)
+#define __SLEPCBVDEF_H
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define BV        PetscFortranAddr
+#define BV PetscFortranAddr
 #endif
 
-#define BVType    character*(80)
+#define BVType             character*(80)
 #define BVOrthogType       PetscEnum
 #define BVOrthogRefineType PetscEnum
 #define BVOrthogBlockType  PetscEnum
diff --git a/include/slepc/finclude/slepcbvdef.h.html b/include/slepc/finclude/slepcbvdef.h.html
index d01bfb3..51ea5b7 100644
--- a/include/slepc/finclude/slepcbvdef.h.html
+++ b/include/slepc/finclude/slepcbvdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcbvdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcbvdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcbvdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -34,10 +34,10 @@
 <a name="line22"> 22: </a>!
 
 <a name="line26"> 26: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line27"> 27: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>        PetscFortranAddr</font></strong>
+<a name="line27"> 27: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> PetscFortranAddr</font></strong>
 <a name="line28"> 28: </a><font color="#A020F0">#endif</font>
 
-<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>    character*(80)</font></strong>
+<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>             character*(80)</font></strong>
 <a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       PetscEnum</font></strong>
 <a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> PetscEnum</font></strong>
 <a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  PetscEnum</font></strong>
diff --git a/include/slepc/finclude/slepcdef.h b/include/slepc/finclude/slepcdef.h
index cc570d8..c8c6799 100644
--- a/include/slepc/finclude/slepcdef.h
+++ b/include/slepc/finclude/slepcdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcdef.h.html b/include/slepc/finclude/slepcdef.h.html
index 47593c0..8ff0695 100644
--- a/include/slepc/finclude/slepcdef.h.html
+++ b/include/slepc/finclude/slepcdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Single Fortran include file <font color="#4169E1">for</font> all of SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
diff --git a/include/slepc/finclude/slepcds.h b/include/slepc/finclude/slepcds.h
index ff4b056..cab5053 100644
--- a/include/slepc/finclude/slepcds.h
+++ b/include/slepc/finclude/slepcds.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcds.h.html b/include/slepc/finclude/slepcds.h.html
index 2e5da16..0a9e2ad 100644
--- a/include/slepc/finclude/slepcds.h.html
+++ b/include/slepc/finclude/slepcds.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcds.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcds.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcds.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
diff --git a/include/slepc/finclude/slepcds.h90 b/include/slepc/finclude/slepcds.h90
index 2efd750..178b678 100644
--- a/include/slepc/finclude/slepcds.h90
+++ b/include/slepc/finclude/slepcds.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcds.h90.html b/include/slepc/finclude/slepcds.h90.html
index faae05d..2131932 100644
--- a/include/slepc/finclude/slepcds.h90.html
+++ b/include/slepc/finclude/slepcds.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcds.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcds.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcds.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcdsdef.h b/include/slepc/finclude/slepcdsdef.h
index f2a95cd..8cab081 100644
--- a/include/slepc/finclude/slepcdsdef.h
+++ b/include/slepc/finclude/slepcdsdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,8 +20,8 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCDS_H)
-#define __SLEPCDS_H
+#if !defined(__SLEPCDSDEF_H)
+#define __SLEPCDSDEF_H
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
 #define DS PetscFortranAddr
diff --git a/include/slepc/finclude/slepcdsdef.h.html b/include/slepc/finclude/slepcdsdef.h.html
index 3073d98..1faeeff 100644
--- a/include/slepc/finclude/slepcdsdef.h.html
+++ b/include/slepc/finclude/slepcdsdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcdsdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcdsdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcdsdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
diff --git a/include/slepc/finclude/slepceps.h b/include/slepc/finclude/slepceps.h
index 0b03c05..c9af4ed 100644
--- a/include/slepc/finclude/slepceps.h
+++ b/include/slepc/finclude/slepceps.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -23,19 +23,18 @@
 !
 #include "slepc/finclude/slepcepsdef.h"
 
-!  Convergence flags.
-!  They sould match the flags in $SLEPC_DIR/include/slepceps.h
-
       PetscEnum EPS_CONVERGED_TOL
+      PetscEnum EPS_CONVERGED_USER
       PetscEnum EPS_DIVERGED_ITS
       PetscEnum EPS_DIVERGED_BREAKDOWN
       PetscEnum EPS_DIVERGED_SYMMETRY_LOST
       PetscEnum EPS_CONVERGED_ITERATING
 
-      parameter (EPS_CONVERGED_TOL          =  2)
-      parameter (EPS_DIVERGED_ITS           = -3)
-      parameter (EPS_DIVERGED_BREAKDOWN     = -4)
-      parameter (EPS_DIVERGED_SYMMETRY_LOST = -5)
+      parameter (EPS_CONVERGED_TOL          =  1)
+      parameter (EPS_CONVERGED_USER         =  2)
+      parameter (EPS_DIVERGED_ITS           = -1)
+      parameter (EPS_DIVERGED_BREAKDOWN     = -2)
+      parameter (EPS_DIVERGED_SYMMETRY_LOST = -3)
       parameter (EPS_CONVERGED_ITERATING    =  0)
 
       PetscEnum EPS_HEP
@@ -111,15 +110,21 @@
       parameter (EPS_ERROR_BACKWARD         =  2)
 
       PetscEnum EPS_CONV_ABS
-      PetscEnum EPS_CONV_EIG
+      PetscEnum EPS_CONV_REL
       PetscEnum EPS_CONV_NORM
       PetscEnum EPS_CONV_USER
 
       parameter (EPS_CONV_ABS               =  0)
-      parameter (EPS_CONV_EIG               =  1)
+      parameter (EPS_CONV_REL               =  1)
       parameter (EPS_CONV_NORM              =  2)
       parameter (EPS_CONV_USER              =  3)
 
+      PetscEnum EPS_STOP_BASIC
+      PetscEnum EPS_STOP_USER
+
+      parameter (EPS_STOP_BASIC             =  0)
+      parameter (EPS_STOP_USER              =  1)
+
       PetscEnum EPS_POWER_SHIFT_CONSTANT
       PetscEnum EPS_POWER_SHIFT_RAYLEIGH
       PetscEnum EPS_POWER_SHIFT_WILKINSON
@@ -174,6 +179,18 @@
       parameter (EPS_PRIMME_LOBPCG_ORTHOBASIS   = 14)
       parameter (EPS_PRIMME_LOBPCG_ORTHOBASISW  = 15)
 
+      PetscEnum EPS_CISS_QUADRULE_TRAPEZOIDAL
+      PetscEnum EPS_CISS_QUADRULE_CHEBYSHEV
+
+      parameter (EPS_CISS_QUADRULE_TRAPEZOIDAL  =  1)
+      parameter (EPS_CISS_QUADRULE_CHEBYSHEV    =  2)
+
+      PetscEnum EPS_CISS_EXTRACTION_RITZ
+      PetscEnum EPS_CISS_EXTRACTION_HANKEL
+
+      parameter (EPS_CISS_EXTRACTION_RITZ       =  0)
+      parameter (EPS_CISS_EXTRACTION_HANKEL     =  1)
+
 !
 !   Possible arguments to EPSMonitorSet()
 !
diff --git a/include/slepc/finclude/slepceps.h.html b/include/slepc/finclude/slepceps.h.html
index 961d83a..d4c697b 100644
--- a/include/slepc/finclude/slepceps.h.html
+++ b/include/slepc/finclude/slepceps.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepceps.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:37+00:00">
+<meta name="date" content="2016-05-16T10:34:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepceps.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepceps.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
@@ -35,169 +35,186 @@
 <a name="line23"> 23: </a>!
 <a name="line24"> 24: </a> #include <A href="../../../include/slepc/finclude/slepcepsdef.h.html">slepc/finclude/slepcepsdef.h</A>
 
-<a name="line26"> 26: </a>!  Convergence flags.
-<a name="line27"> 27: </a>!  They sould match the flags in $SLEPC_DIR/include/slepceps.h
-
-<a name="line29"> 29: </a>      PetscEnum EPS_CONVERGED_TOL
-<a name="line30"> 30: </a>      PetscEnum EPS_DIVERGED_ITS
-<a name="line31"> 31: </a>      PetscEnum EPS_DIVERGED_BREAKDOWN
-<a name="line32"> 32: </a>      PetscEnum EPS_DIVERGED_SYMMETRY_LOST
-<a name="line33"> 33: </a>      PetscEnum EPS_CONVERGED_ITERATING
-
-<a name="line35"> 35: </a>      parameter (EPS_CONVERGED_TOL          =  2)
-<a name="line36"> 36: </a>      parameter (EPS_DIVERGED_ITS           = -3)
-<a name="line37"> 37: </a>      parameter (EPS_DIVERGED_BREAKDOWN     = -4)
-<a name="line38"> 38: </a>      parameter (EPS_DIVERGED_SYMMETRY_LOST = -5)
-<a name="line39"> 39: </a>      parameter (EPS_CONVERGED_ITERATING    =  0)
-
-<a name="line41"> 41: </a>      PetscEnum EPS_HEP
-<a name="line42"> 42: </a>      PetscEnum EPS_GHEP
-<a name="line43"> 43: </a>      PetscEnum EPS_NHEP
-<a name="line44"> 44: </a>      PetscEnum EPS_GNHEP
-<a name="line45"> 45: </a>      PetscEnum EPS_PGNHEP
-<a name="line46"> 46: </a>      PetscEnum EPS_GHIEP
-
-<a name="line48"> 48: </a>      parameter (EPS_HEP                    =  1)
-<a name="line49"> 49: </a>      parameter (EPS_GHEP                   =  2)
-<a name="line50"> 50: </a>      parameter (EPS_NHEP                   =  3)
-<a name="line51"> 51: </a>      parameter (EPS_GNHEP                  =  4)
-<a name="line52"> 52: </a>      parameter (EPS_PGNHEP                 =  5)
-<a name="line53"> 53: </a>      parameter (EPS_GHIEP                  =  6)
-
-<a name="line55"> 55: </a>      PetscEnum EPS_LARGEST_MAGNITUDE
-<a name="line56"> 56: </a>      PetscEnum EPS_SMALLEST_MAGNITUDE
-<a name="line57"> 57: </a>      PetscEnum EPS_LARGEST_REAL
-<a name="line58"> 58: </a>      PetscEnum EPS_SMALLEST_REAL
-<a name="line59"> 59: </a>      PetscEnum EPS_LARGEST_IMAGINARY
-<a name="line60"> 60: </a>      PetscEnum EPS_SMALLEST_IMAGINARY
-<a name="line61"> 61: </a>      PetscEnum EPS_TARGET_MAGNITUDE
-<a name="line62"> 62: </a>      PetscEnum EPS_TARGET_REAL
-<a name="line63"> 63: </a>      PetscEnum EPS_TARGET_IMAGINARY
-<a name="line64"> 64: </a>      PetscEnum EPS_ALL
-<a name="line65"> 65: </a>      PetscEnum EPS_WHICH_USER
-
-<a name="line67"> 67: </a>      parameter (EPS_LARGEST_MAGNITUDE      =  1)
-<a name="line68"> 68: </a>      parameter (EPS_SMALLEST_MAGNITUDE     =  2)
-<a name="line69"> 69: </a>      parameter (EPS_LARGEST_REAL           =  3)
-<a name="line70"> 70: </a>      parameter (EPS_SMALLEST_REAL          =  4)
-<a name="line71"> 71: </a>      parameter (EPS_LARGEST_IMAGINARY      =  5)
-<a name="line72"> 72: </a>      parameter (EPS_SMALLEST_IMAGINARY     =  6)
-<a name="line73"> 73: </a>      parameter (EPS_TARGET_MAGNITUDE       =  7)
-<a name="line74"> 74: </a>      parameter (EPS_TARGET_REAL            =  8)
-<a name="line75"> 75: </a>      parameter (EPS_TARGET_IMAGINARY       =  9)
-<a name="line76"> 76: </a>      parameter (EPS_ALL                    = 10)
-<a name="line77"> 77: </a>      parameter (EPS_WHICH_USER             = 11)
-
-<a name="line79"> 79: </a>      PetscEnum EPS_BALANCE_NONE
-<a name="line80"> 80: </a>      PetscEnum EPS_BALANCE_ONESIDE
-<a name="line81"> 81: </a>      PetscEnum EPS_BALANCE_TWOSIDE
-<a name="line82"> 82: </a>      PetscEnum EPS_BALANCE_USER
-
-<a name="line84"> 84: </a>      parameter (EPS_BALANCE_NONE           =  0)
-<a name="line85"> 85: </a>      parameter (EPS_BALANCE_ONESIDE        =  1)
-<a name="line86"> 86: </a>      parameter (EPS_BALANCE_TWOSIDE        =  2)
-<a name="line87"> 87: </a>      parameter (EPS_BALANCE_USER           =  3)
-
-<a name="line89"> 89: </a>      PetscEnum EPS_RITZ
-<a name="line90"> 90: </a>      PetscEnum EPS_HARMONIC
-<a name="line91"> 91: </a>      PetscEnum EPS_HARMONIC_RELATIVE
-<a name="line92"> 92: </a>      PetscEnum EPS_HARMONIC_RIGHT
-<a name="line93"> 93: </a>      PetscEnum EPS_HARMONIC_LARGEST
-<a name="line94"> 94: </a>      PetscEnum EPS_REFINED
-<a name="line95"> 95: </a>      PetscEnum EPS_REFINED_HARMONIC
-
-<a name="line97"> 97: </a>      parameter (EPS_RITZ                   =  0)
-<a name="line98"> 98: </a>      parameter (EPS_HARMONIC               =  1)
-<a name="line99"> 99: </a>      parameter (EPS_HARMONIC_RELATIVE      =  2)
-<a name="line100">100: </a>      parameter (EPS_HARMONIC_RIGHT         =  3)
-<a name="line101">101: </a>      parameter (EPS_HARMONIC_LARGEST       =  4)
-<a name="line102">102: </a>      parameter (EPS_REFINED                =  5)
-<a name="line103">103: </a>      parameter (EPS_REFINED_HARMONIC       =  6)
-
-<a name="line105">105: </a>      PetscEnum EPS_ERROR_ABSOLUTE
-<a name="line106">106: </a>      PetscEnum EPS_ERROR_RELATIVE
-<a name="line107">107: </a>      PetscEnum EPS_ERROR_BACKWARD
-
-<a name="line109">109: </a>      parameter (EPS_ERROR_ABSOLUTE         =  0)
-<a name="line110">110: </a>      parameter (EPS_ERROR_RELATIVE         =  1)
-<a name="line111">111: </a>      parameter (EPS_ERROR_BACKWARD         =  2)
-
-<a name="line113">113: </a>      PetscEnum EPS_CONV_ABS
-<a name="line114">114: </a>      PetscEnum EPS_CONV_EIG
-<a name="line115">115: </a>      PetscEnum EPS_CONV_NORM
-<a name="line116">116: </a>      PetscEnum EPS_CONV_USER
-
-<a name="line118">118: </a>      parameter (EPS_CONV_ABS               =  0)
-<a name="line119">119: </a>      parameter (EPS_CONV_EIG               =  1)
-<a name="line120">120: </a>      parameter (EPS_CONV_NORM              =  2)
-<a name="line121">121: </a>      parameter (EPS_CONV_USER              =  3)
-
-<a name="line123">123: </a>      PetscEnum EPS_POWER_SHIFT_CONSTANT
-<a name="line124">124: </a>      PetscEnum EPS_POWER_SHIFT_RAYLEIGH
-<a name="line125">125: </a>      PetscEnum EPS_POWER_SHIFT_WILKINSON
-
-<a name="line127">127: </a>      parameter (EPS_POWER_SHIFT_CONSTANT   =  0)
-<a name="line128">128: </a>      parameter (EPS_POWER_SHIFT_RAYLEIGH   =  1)
-<a name="line129">129: </a>      parameter (EPS_POWER_SHIFT_WILKINSON  =  2)
-
-<a name="line131">131: </a>      PetscEnum EPS_LANCZOS_REORTHOG_LOCAL
-<a name="line132">132: </a>      PetscEnum EPS_LANCZOS_REORTHOG_FULL
-<a name="line133">133: </a>      PetscEnum EPS_LANCZOS_REORTHOG_SELECTIVE
-<a name="line134">134: </a>      PetscEnum EPS_LANCZOS_REORTHOG_PERIODIC
-<a name="line135">135: </a>      PetscEnum EPS_LANCZOS_REORTHOG_PARTIAL
-<a name="line136">136: </a>      PetscEnum EPS_LANCZOS_REORTHOG_DELAYED
-
-<a name="line138">138: </a>      parameter (EPS_LANCZOS_REORTHOG_LOCAL     =  0)
-<a name="line139">139: </a>      parameter (EPS_LANCZOS_REORTHOG_FULL      =  1)
-<a name="line140">140: </a>      parameter (EPS_LANCZOS_REORTHOG_SELECTIVE =  2)
-<a name="line141">141: </a>      parameter (EPS_LANCZOS_REORTHOG_PERIODIC  =  3)
-<a name="line142">142: </a>      parameter (EPS_LANCZOS_REORTHOG_PARTIAL   =  4)
-<a name="line143">143: </a>      parameter (EPS_LANCZOS_REORTHOG_DELAYED   =  5)
-
-<a name="line145">145: </a>      PetscEnum EPS_PRIMME_DYNAMIC
-<a name="line146">146: </a>      PetscEnum EPS_PRIMME_DEFAULT_MIN_TIME
-<a name="line147">147: </a>      PetscEnum EPS_PRIMME_DEFAULT_MIN_MATVECS
-<a name="line148">148: </a>      PetscEnum EPS_PRIMME_ARNOLDI
-<a name="line149">149: </a>      PetscEnum EPS_PRIMME_GD
-<a name="line150">150: </a>      PetscEnum EPS_PRIMME_GD_PLUSK
-<a name="line151">151: </a>      PetscEnum EPS_PRIMME_GD_OLSEN_PLUSK
-<a name="line152">152: </a>      PetscEnum EPS_PRIMME_JD_OLSEN_PLUSK
-<a name="line153">153: </a>      PetscEnum EPS_PRIMME_RQI
-<a name="line154">154: </a>      PetscEnum EPS_PRIMME_JDQR
-<a name="line155">155: </a>      PetscEnum EPS_PRIMME_JDQMR
-<a name="line156">156: </a>      PetscEnum EPS_PRIMME_JDQMR_ETOL
-<a name="line157">157: </a>      PetscEnum EPS_PRIMME_SUBSPACE_ITERATION
-<a name="line158">158: </a>      PetscEnum EPS_PRIMME_LOBPCG_ORTHOBASIS
-<a name="line159">159: </a>      PetscEnum EPS_PRIMME_LOBPCG_ORTHOBASISW
-
-<a name="line161">161: </a>      parameter (EPS_PRIMME_DYNAMIC             =  0)
-<a name="line162">162: </a>      parameter (EPS_PRIMME_DEFAULT_MIN_TIME    =  1)
-<a name="line163">163: </a>      parameter (EPS_PRIMME_DEFAULT_MIN_MATVECS =  2)
-<a name="line164">164: </a>      parameter (EPS_PRIMME_ARNOLDI             =  3)
-<a name="line165">165: </a>      parameter (EPS_PRIMME_GD                  =  4)
-<a name="line166">166: </a>      parameter (EPS_PRIMME_GD_PLUSK            =  5)
-<a name="line167">167: </a>      parameter (EPS_PRIMME_GD_OLSEN_PLUSK      =  7)
-<a name="line168">168: </a>      parameter (EPS_PRIMME_JD_OLSEN_PLUSK      =  8)
-<a name="line169">169: </a>      parameter (EPS_PRIMME_RQI                 =  9)
-<a name="line170">170: </a>      parameter (EPS_PRIMME_JDQR                = 10)
-<a name="line171">171: </a>      parameter (EPS_PRIMME_JDQMR               = 11)
-<a name="line172">172: </a>      parameter (EPS_PRIMME_JDQMR_ETOL          = 12)
-<a name="line173">173: </a>      parameter (EPS_PRIMME_SUBSPACE_ITERATION  = 13)
-<a name="line174">174: </a>      parameter (EPS_PRIMME_LOBPCG_ORTHOBASIS   = 14)
-<a name="line175">175: </a>      parameter (EPS_PRIMME_LOBPCG_ORTHOBASISW  = 15)
-
-<a name="line177">177: </a>!
-<a name="line178">178: </a>!   Possible arguments to <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>()
-<a name="line179">179: </a>!
-<a name="line180">180: </a>      external EPSMONITORALL
-<a name="line181">181: </a>      external EPSMONITORLG
-<a name="line182">182: </a>      external EPSMONITORLGALL
-<a name="line183">183: </a>      external EPSMONITORCONVERGED
-<a name="line184">184: </a>      external EPSMONITORFIRST
-
-<a name="line186">186: </a>!
-<a name="line187">187: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> package in SLEPc
-<a name="line188">188: </a>!
+<a name="line26"> 26: </a>      PetscEnum EPS_CONVERGED_TOL
+<a name="line27"> 27: </a>      PetscEnum EPS_CONVERGED_USER
+<a name="line28"> 28: </a>      PetscEnum EPS_DIVERGED_ITS
+<a name="line29"> 29: </a>      PetscEnum EPS_DIVERGED_BREAKDOWN
+<a name="line30"> 30: </a>      PetscEnum EPS_DIVERGED_SYMMETRY_LOST
+<a name="line31"> 31: </a>      PetscEnum EPS_CONVERGED_ITERATING
+
+<a name="line33"> 33: </a>      parameter (EPS_CONVERGED_TOL          =  1)
+<a name="line34"> 34: </a>      parameter (EPS_CONVERGED_USER         =  2)
+<a name="line35"> 35: </a>      parameter (EPS_DIVERGED_ITS           = -1)
+<a name="line36"> 36: </a>      parameter (EPS_DIVERGED_BREAKDOWN     = -2)
+<a name="line37"> 37: </a>      parameter (EPS_DIVERGED_SYMMETRY_LOST = -3)
+<a name="line38"> 38: </a>      parameter (EPS_CONVERGED_ITERATING    =  0)
+
+<a name="line40"> 40: </a>      PetscEnum EPS_HEP
+<a name="line41"> 41: </a>      PetscEnum EPS_GHEP
+<a name="line42"> 42: </a>      PetscEnum EPS_NHEP
+<a name="line43"> 43: </a>      PetscEnum EPS_GNHEP
+<a name="line44"> 44: </a>      PetscEnum EPS_PGNHEP
+<a name="line45"> 45: </a>      PetscEnum EPS_GHIEP
+
+<a name="line47"> 47: </a>      parameter (EPS_HEP                    =  1)
+<a name="line48"> 48: </a>      parameter (EPS_GHEP                   =  2)
+<a name="line49"> 49: </a>      parameter (EPS_NHEP                   =  3)
+<a name="line50"> 50: </a>      parameter (EPS_GNHEP                  =  4)
+<a name="line51"> 51: </a>      parameter (EPS_PGNHEP                 =  5)
+<a name="line52"> 52: </a>      parameter (EPS_GHIEP                  =  6)
+
+<a name="line54"> 54: </a>      PetscEnum EPS_LARGEST_MAGNITUDE
+<a name="line55"> 55: </a>      PetscEnum EPS_SMALLEST_MAGNITUDE
+<a name="line56"> 56: </a>      PetscEnum EPS_LARGEST_REAL
+<a name="line57"> 57: </a>      PetscEnum EPS_SMALLEST_REAL
+<a name="line58"> 58: </a>      PetscEnum EPS_LARGEST_IMAGINARY
+<a name="line59"> 59: </a>      PetscEnum EPS_SMALLEST_IMAGINARY
+<a name="line60"> 60: </a>      PetscEnum EPS_TARGET_MAGNITUDE
+<a name="line61"> 61: </a>      PetscEnum EPS_TARGET_REAL
+<a name="line62"> 62: </a>      PetscEnum EPS_TARGET_IMAGINARY
+<a name="line63"> 63: </a>      PetscEnum EPS_ALL
+<a name="line64"> 64: </a>      PetscEnum EPS_WHICH_USER
+
+<a name="line66"> 66: </a>      parameter (EPS_LARGEST_MAGNITUDE      =  1)
+<a name="line67"> 67: </a>      parameter (EPS_SMALLEST_MAGNITUDE     =  2)
+<a name="line68"> 68: </a>      parameter (EPS_LARGEST_REAL           =  3)
+<a name="line69"> 69: </a>      parameter (EPS_SMALLEST_REAL          =  4)
+<a name="line70"> 70: </a>      parameter (EPS_LARGEST_IMAGINARY      =  5)
+<a name="line71"> 71: </a>      parameter (EPS_SMALLEST_IMAGINARY     =  6)
+<a name="line72"> 72: </a>      parameter (EPS_TARGET_MAGNITUDE       =  7)
+<a name="line73"> 73: </a>      parameter (EPS_TARGET_REAL            =  8)
+<a name="line74"> 74: </a>      parameter (EPS_TARGET_IMAGINARY       =  9)
+<a name="line75"> 75: </a>      parameter (EPS_ALL                    = 10)
+<a name="line76"> 76: </a>      parameter (EPS_WHICH_USER             = 11)
+
+<a name="line78"> 78: </a>      PetscEnum EPS_BALANCE_NONE
+<a name="line79"> 79: </a>      PetscEnum EPS_BALANCE_ONESIDE
+<a name="line80"> 80: </a>      PetscEnum EPS_BALANCE_TWOSIDE
+<a name="line81"> 81: </a>      PetscEnum EPS_BALANCE_USER
+
+<a name="line83"> 83: </a>      parameter (EPS_BALANCE_NONE           =  0)
+<a name="line84"> 84: </a>      parameter (EPS_BALANCE_ONESIDE        =  1)
+<a name="line85"> 85: </a>      parameter (EPS_BALANCE_TWOSIDE        =  2)
+<a name="line86"> 86: </a>      parameter (EPS_BALANCE_USER           =  3)
+
+<a name="line88"> 88: </a>      PetscEnum EPS_RITZ
+<a name="line89"> 89: </a>      PetscEnum EPS_HARMONIC
+<a name="line90"> 90: </a>      PetscEnum EPS_HARMONIC_RELATIVE
+<a name="line91"> 91: </a>      PetscEnum EPS_HARMONIC_RIGHT
+<a name="line92"> 92: </a>      PetscEnum EPS_HARMONIC_LARGEST
+<a name="line93"> 93: </a>      PetscEnum EPS_REFINED
+<a name="line94"> 94: </a>      PetscEnum EPS_REFINED_HARMONIC
+
+<a name="line96"> 96: </a>      parameter (EPS_RITZ                   =  0)
+<a name="line97"> 97: </a>      parameter (EPS_HARMONIC               =  1)
+<a name="line98"> 98: </a>      parameter (EPS_HARMONIC_RELATIVE      =  2)
+<a name="line99"> 99: </a>      parameter (EPS_HARMONIC_RIGHT         =  3)
+<a name="line100">100: </a>      parameter (EPS_HARMONIC_LARGEST       =  4)
+<a name="line101">101: </a>      parameter (EPS_REFINED                =  5)
+<a name="line102">102: </a>      parameter (EPS_REFINED_HARMONIC       =  6)
+
+<a name="line104">104: </a>      PetscEnum EPS_ERROR_ABSOLUTE
+<a name="line105">105: </a>      PetscEnum EPS_ERROR_RELATIVE
+<a name="line106">106: </a>      PetscEnum EPS_ERROR_BACKWARD
+
+<a name="line108">108: </a>      parameter (EPS_ERROR_ABSOLUTE         =  0)
+<a name="line109">109: </a>      parameter (EPS_ERROR_RELATIVE         =  1)
+<a name="line110">110: </a>      parameter (EPS_ERROR_BACKWARD         =  2)
+
+<a name="line112">112: </a>      PetscEnum EPS_CONV_ABS
+<a name="line113">113: </a>      PetscEnum EPS_CONV_REL
+<a name="line114">114: </a>      PetscEnum EPS_CONV_NORM
+<a name="line115">115: </a>      PetscEnum EPS_CONV_USER
+
+<a name="line117">117: </a>      parameter (EPS_CONV_ABS               =  0)
+<a name="line118">118: </a>      parameter (EPS_CONV_REL               =  1)
+<a name="line119">119: </a>      parameter (EPS_CONV_NORM              =  2)
+<a name="line120">120: </a>      parameter (EPS_CONV_USER              =  3)
+
+<a name="line122">122: </a>      PetscEnum EPS_STOP_BASIC
+<a name="line123">123: </a>      PetscEnum EPS_STOP_USER
+
+<a name="line125">125: </a>      parameter (EPS_STOP_BASIC             =  0)
+<a name="line126">126: </a>      parameter (EPS_STOP_USER              =  1)
+
+<a name="line128">128: </a>      PetscEnum EPS_POWER_SHIFT_CONSTANT
+<a name="line129">129: </a>      PetscEnum EPS_POWER_SHIFT_RAYLEIGH
+<a name="line130">130: </a>      PetscEnum EPS_POWER_SHIFT_WILKINSON
+
+<a name="line132">132: </a>      parameter (EPS_POWER_SHIFT_CONSTANT   =  0)
+<a name="line133">133: </a>      parameter (EPS_POWER_SHIFT_RAYLEIGH   =  1)
+<a name="line134">134: </a>      parameter (EPS_POWER_SHIFT_WILKINSON  =  2)
+
+<a name="line136">136: </a>      PetscEnum EPS_LANCZOS_REORTHOG_LOCAL
+<a name="line137">137: </a>      PetscEnum EPS_LANCZOS_REORTHOG_FULL
+<a name="line138">138: </a>      PetscEnum EPS_LANCZOS_REORTHOG_SELECTIVE
+<a name="line139">139: </a>      PetscEnum EPS_LANCZOS_REORTHOG_PERIODIC
+<a name="line140">140: </a>      PetscEnum EPS_LANCZOS_REORTHOG_PARTIAL
+<a name="line141">141: </a>      PetscEnum EPS_LANCZOS_REORTHOG_DELAYED
+
+<a name="line143">143: </a>      parameter (EPS_LANCZOS_REORTHOG_LOCAL     =  0)
+<a name="line144">144: </a>      parameter (EPS_LANCZOS_REORTHOG_FULL      =  1)
+<a name="line145">145: </a>      parameter (EPS_LANCZOS_REORTHOG_SELECTIVE =  2)
+<a name="line146">146: </a>      parameter (EPS_LANCZOS_REORTHOG_PERIODIC  =  3)
+<a name="line147">147: </a>      parameter (EPS_LANCZOS_REORTHOG_PARTIAL   =  4)
+<a name="line148">148: </a>      parameter (EPS_LANCZOS_REORTHOG_DELAYED   =  5)
+
+<a name="line150">150: </a>      PetscEnum EPS_PRIMME_DYNAMIC
+<a name="line151">151: </a>      PetscEnum EPS_PRIMME_DEFAULT_MIN_TIME
+<a name="line152">152: </a>      PetscEnum EPS_PRIMME_DEFAULT_MIN_MATVECS
+<a name="line153">153: </a>      PetscEnum EPS_PRIMME_ARNOLDI
+<a name="line154">154: </a>      PetscEnum EPS_PRIMME_GD
+<a name="line155">155: </a>      PetscEnum EPS_PRIMME_GD_PLUSK
+<a name="line156">156: </a>      PetscEnum EPS_PRIMME_GD_OLSEN_PLUSK
+<a name="line157">157: </a>      PetscEnum EPS_PRIMME_JD_OLSEN_PLUSK
+<a name="line158">158: </a>      PetscEnum EPS_PRIMME_RQI
+<a name="line159">159: </a>      PetscEnum EPS_PRIMME_JDQR
+<a name="line160">160: </a>      PetscEnum EPS_PRIMME_JDQMR
+<a name="line161">161: </a>      PetscEnum EPS_PRIMME_JDQMR_ETOL
+<a name="line162">162: </a>      PetscEnum EPS_PRIMME_SUBSPACE_ITERATION
+<a name="line163">163: </a>      PetscEnum EPS_PRIMME_LOBPCG_ORTHOBASIS
+<a name="line164">164: </a>      PetscEnum EPS_PRIMME_LOBPCG_ORTHOBASISW
+
+<a name="line166">166: </a>      parameter (EPS_PRIMME_DYNAMIC             =  0)
+<a name="line167">167: </a>      parameter (EPS_PRIMME_DEFAULT_MIN_TIME    =  1)
+<a name="line168">168: </a>      parameter (EPS_PRIMME_DEFAULT_MIN_MATVECS =  2)
+<a name="line169">169: </a>      parameter (EPS_PRIMME_ARNOLDI             =  3)
+<a name="line170">170: </a>      parameter (EPS_PRIMME_GD                  =  4)
+<a name="line171">171: </a>      parameter (EPS_PRIMME_GD_PLUSK            =  5)
+<a name="line172">172: </a>      parameter (EPS_PRIMME_GD_OLSEN_PLUSK      =  7)
+<a name="line173">173: </a>      parameter (EPS_PRIMME_JD_OLSEN_PLUSK      =  8)
+<a name="line174">174: </a>      parameter (EPS_PRIMME_RQI                 =  9)
+<a name="line175">175: </a>      parameter (EPS_PRIMME_JDQR                = 10)
+<a name="line176">176: </a>      parameter (EPS_PRIMME_JDQMR               = 11)
+<a name="line177">177: </a>      parameter (EPS_PRIMME_JDQMR_ETOL          = 12)
+<a name="line178">178: </a>      parameter (EPS_PRIMME_SUBSPACE_ITERATION  = 13)
+<a name="line179">179: </a>      parameter (EPS_PRIMME_LOBPCG_ORTHOBASIS   = 14)
+<a name="line180">180: </a>      parameter (EPS_PRIMME_LOBPCG_ORTHOBASISW  = 15)
+
+<a name="line182">182: </a>      PetscEnum EPS_CISS_QUADRULE_TRAPEZOIDAL
+<a name="line183">183: </a>      PetscEnum EPS_CISS_QUADRULE_CHEBYSHEV
+
+<a name="line185">185: </a>      parameter (EPS_CISS_QUADRULE_TRAPEZOIDAL  =  1)
+<a name="line186">186: </a>      parameter (EPS_CISS_QUADRULE_CHEBYSHEV    =  2)
+
+<a name="line188">188: </a>      PetscEnum EPS_CISS_EXTRACTION_RITZ
+<a name="line189">189: </a>      PetscEnum EPS_CISS_EXTRACTION_HANKEL
+
+<a name="line191">191: </a>      parameter (EPS_CISS_EXTRACTION_RITZ       =  0)
+<a name="line192">192: </a>      parameter (EPS_CISS_EXTRACTION_HANKEL     =  1)
+
+<a name="line194">194: </a>!
+<a name="line195">195: </a>!   Possible arguments to <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>()
+<a name="line196">196: </a>!
+<a name="line197">197: </a>      external EPSMONITORALL
+<a name="line198">198: </a>      external EPSMONITORLG
+<a name="line199">199: </a>      external EPSMONITORLGALL
+<a name="line200">200: </a>      external EPSMONITORCONVERGED
+<a name="line201">201: </a>      external EPSMONITORFIRST
+
+<a name="line203">203: </a>!
+<a name="line204">204: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> package in SLEPc
+<a name="line205">205: </a>!
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepceps.h90 b/include/slepc/finclude/slepceps.h90
index 2e20250..a2d2e24 100644
--- a/include/slepc/finclude/slepceps.h90
+++ b/include/slepc/finclude/slepceps.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepceps.h90.html b/include/slepc/finclude/slepceps.h90.html
index e6af0f7..29f583a 100644
--- a/include/slepc/finclude/slepceps.h90.html
+++ b/include/slepc/finclude/slepceps.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepceps.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepceps.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepceps.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcepsdef.h b/include/slepc/finclude/slepcepsdef.h
index 6e84b9f..15c6fc4 100644
--- a/include/slepc/finclude/slepcepsdef.h
+++ b/include/slepc/finclude/slepcepsdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,8 +20,8 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCEPS_H)
-#define __SLEPCEPS_H
+#if !defined(__SLEPCEPSDEF_H)
+#define __SLEPCEPSDEF_H
 
 #include "slepc/finclude/slepcstdef.h"
 #include "slepc/finclude/slepcbvdef.h"
@@ -29,7 +29,7 @@
 #include "slepc/finclude/slepcrgdef.h"
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define EPS                    PetscFortranAddr
+#define EPS PetscFortranAddr
 #endif
 
 #define EPSType                character*(80)
@@ -40,10 +40,12 @@
 #define EPSExtraction          PetscEnum
 #define EPSBalance             PetscEnum
 #define EPSConv                PetscEnum
+#define EPSStop                PetscEnum
 #define EPSPowerShiftType      PetscEnum
 #define EPSLanczosReorthogType PetscEnum
 #define EPSPRIMMEMethod        PetscEnum
-
+#define EPSCISSQuadRule        PetscEnum
+#define EPSCISSExtraction      PetscEnum
 
 #define EPSPOWER       'power'
 #define EPSSUBSPACE    'subspace'
diff --git a/include/slepc/finclude/slepcepsdef.h.html b/include/slepc/finclude/slepcepsdef.h.html
index 88fc21b..26d4806 100644
--- a/include/slepc/finclude/slepcepsdef.h.html
+++ b/include/slepc/finclude/slepcepsdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcepsdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcepsdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcepsdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -39,7 +39,7 @@
 <a name="line29"> 29: </a> #include <A href="../../../include/slepc/finclude/slepcrgdef.h.html">slepc/finclude/slepcrgdef.h</A>
 
 <a name="line31"> 31: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>                    PetscFortranAddr</font></strong>
+<a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> PetscFortranAddr</font></strong>
 <a name="line33"> 33: </a><font color="#A020F0">#endif</font>
 
 <a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>                character*(80)</font></strong>
@@ -50,30 +50,32 @@
 <a name="line40"> 40: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>          PetscEnum</font></strong>
 <a name="line41"> 41: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>             PetscEnum</font></strong>
 <a name="line42"> 42: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>                PetscEnum</font></strong>
-<a name="line43"> 43: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>      PetscEnum</font></strong>
-<a name="line44"> 44: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> PetscEnum</font></strong>
-<a name="line45"> 45: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>        PetscEnum</font></strong>
+<a name="line43"> 43: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a>                PetscEnum</font></strong>
+<a name="line44"> 44: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>      PetscEnum</font></strong>
+<a name="line45"> 45: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> PetscEnum</font></strong>
+<a name="line46"> 46: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>        PetscEnum</font></strong>
+<a name="line47"> 47: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>        PetscEnum</font></strong>
+<a name="line48"> 48: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>      PetscEnum</font></strong>
 
+<a name="line50"> 50: </a><strong><font color="#228B22">#define EPSPOWER       'power'</font></strong>
+<a name="line51"> 51: </a><strong><font color="#228B22">#define EPSSUBSPACE    'subspace'</font></strong>
+<a name="line52"> 52: </a><strong><font color="#228B22">#define EPSARNOLDI     'arnoldi'</font></strong>
+<a name="line53"> 53: </a><strong><font color="#228B22">#define EPSLANCZOS     'lanczos'</font></strong>
+<a name="line54"> 54: </a><strong><font color="#228B22">#define EPSKRYLOVSCHUR 'krylovschur'</font></strong>
+<a name="line55"> 55: </a><strong><font color="#228B22">#define EPSGD          'gd'</font></strong>
+<a name="line56"> 56: </a><strong><font color="#228B22">#define EPSJD          'jd'</font></strong>
+<a name="line57"> 57: </a><strong><font color="#228B22">#define EPSRQCG        'rqcg'</font></strong>
+<a name="line58"> 58: </a><strong><font color="#228B22">#define EPSLOBPCG      'lobpcg'</font></strong>
+<a name="line59"> 59: </a><strong><font color="#228B22">#define EPSCISS        'ciss'</font></strong>
+<a name="line60"> 60: </a><strong><font color="#228B22">#define EPSLAPACK      'lapack'</font></strong>
+<a name="line61"> 61: </a><strong><font color="#228B22">#define EPSARPACK      'arpack'</font></strong>
+<a name="line62"> 62: </a><strong><font color="#228B22">#define EPSBLZPACK     'blzpack'</font></strong>
+<a name="line63"> 63: </a><strong><font color="#228B22">#define EPSTRLAN       'trlan'</font></strong>
+<a name="line64"> 64: </a><strong><font color="#228B22">#define EPSBLOPEX      'blopex'</font></strong>
+<a name="line65"> 65: </a><strong><font color="#228B22">#define EPSPRIMME      'primme'</font></strong>
+<a name="line66"> 66: </a><strong><font color="#228B22">#define EPSFEAST       'feast'</font></strong>
 
-<a name="line48"> 48: </a><strong><font color="#228B22">#define EPSPOWER       'power'</font></strong>
-<a name="line49"> 49: </a><strong><font color="#228B22">#define EPSSUBSPACE    'subspace'</font></strong>
-<a name="line50"> 50: </a><strong><font color="#228B22">#define EPSARNOLDI     'arnoldi'</font></strong>
-<a name="line51"> 51: </a><strong><font color="#228B22">#define EPSLANCZOS     'lanczos'</font></strong>
-<a name="line52"> 52: </a><strong><font color="#228B22">#define EPSKRYLOVSCHUR 'krylovschur'</font></strong>
-<a name="line53"> 53: </a><strong><font color="#228B22">#define EPSGD          'gd'</font></strong>
-<a name="line54"> 54: </a><strong><font color="#228B22">#define EPSJD          'jd'</font></strong>
-<a name="line55"> 55: </a><strong><font color="#228B22">#define EPSRQCG        'rqcg'</font></strong>
-<a name="line56"> 56: </a><strong><font color="#228B22">#define EPSLOBPCG      'lobpcg'</font></strong>
-<a name="line57"> 57: </a><strong><font color="#228B22">#define EPSCISS        'ciss'</font></strong>
-<a name="line58"> 58: </a><strong><font color="#228B22">#define EPSLAPACK      'lapack'</font></strong>
-<a name="line59"> 59: </a><strong><font color="#228B22">#define EPSARPACK      'arpack'</font></strong>
-<a name="line60"> 60: </a><strong><font color="#228B22">#define EPSBLZPACK     'blzpack'</font></strong>
-<a name="line61"> 61: </a><strong><font color="#228B22">#define EPSTRLAN       'trlan'</font></strong>
-<a name="line62"> 62: </a><strong><font color="#228B22">#define EPSBLOPEX      'blopex'</font></strong>
-<a name="line63"> 63: </a><strong><font color="#228B22">#define EPSPRIMME      'primme'</font></strong>
-<a name="line64"> 64: </a><strong><font color="#228B22">#define EPSFEAST       'feast'</font></strong>
-
-<a name="line66"> 66: </a><font color="#A020F0">#endif</font>
+<a name="line68"> 68: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcfn.h b/include/slepc/finclude/slepcfn.h
index b619ca8..e73fdcd 100644
--- a/include/slepc/finclude/slepcfn.h
+++ b/include/slepc/finclude/slepcfn.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcfn.h.html b/include/slepc/finclude/slepcfn.h.html
index 6aad98a..52372f7 100644
--- a/include/slepc/finclude/slepcfn.h.html
+++ b/include/slepc/finclude/slepcfn.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcfn.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcfn.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcfn.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
diff --git a/include/slepc/finclude/slepcfn.h90 b/include/slepc/finclude/slepcfn.h90
index 861bfb7..18c8a04 100644
--- a/include/slepc/finclude/slepcfn.h90
+++ b/include/slepc/finclude/slepcfn.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcfn.h90.html b/include/slepc/finclude/slepcfn.h90.html
index 5aca212..8e6ce7f 100644
--- a/include/slepc/finclude/slepcfn.h90.html
+++ b/include/slepc/finclude/slepcfn.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcfn.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcfn.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcfn.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcfndef.h b/include/slepc/finclude/slepcfndef.h
index 27e389f..171d739 100644
--- a/include/slepc/finclude/slepcfndef.h
+++ b/include/slepc/finclude/slepcfndef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,15 +20,15 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCFN_H)
-#define __SLEPCFN_H
+#if !defined(__SLEPCFNDEF_H)
+#define __SLEPCFNDEF_H
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
 #define FN PetscFortranAddr
 #endif
 
-#define FNType             character*(80)
-#define FNCombineType      PetscEnum
+#define FNType        character*(80)
+#define FNCombineType PetscEnum
 
 #define FNCOMBINE  'combine'
 #define FNRATIONAL 'rational'
@@ -36,5 +36,6 @@
 #define FNLOG      'log'
 #define FNPHI      'phi'
 #define FNSQRT     'sqrt'
+#define FNINVSQRT  'invsqrt'
 
 #endif
diff --git a/include/slepc/finclude/slepcfndef.h.html b/include/slepc/finclude/slepcfndef.h.html
index e76d1e8..e286de8 100644
--- a/include/slepc/finclude/slepcfndef.h.html
+++ b/include/slepc/finclude/slepcfndef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcfndef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcfndef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcfndef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -37,8 +37,8 @@
 <a name="line27"> 27: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> PetscFortranAddr</font></strong>
 <a name="line28"> 28: </a><font color="#A020F0">#endif</font>
 
-<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/FN/FNType.html#FNType">FNType</a>             character*(80)</font></strong>
-<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>      PetscEnum</font></strong>
+<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/FN/FNType.html#FNType">FNType</a>        character*(80)</font></strong>
+<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> PetscEnum</font></strong>
 
 <a name="line33"> 33: </a><strong><font color="#228B22">#define FNCOMBINE  'combine'</font></strong>
 <a name="line34"> 34: </a><strong><font color="#228B22">#define FNRATIONAL 'rational'</font></strong>
@@ -46,8 +46,9 @@
 <a name="line36"> 36: </a><strong><font color="#228B22">#define FNLOG      'log'</font></strong>
 <a name="line37"> 37: </a><strong><font color="#228B22">#define FNPHI      'phi'</font></strong>
 <a name="line38"> 38: </a><strong><font color="#228B22">#define FNSQRT     'sqrt'</font></strong>
+<a name="line39"> 39: </a><strong><font color="#228B22">#define FNINVSQRT  'invsqrt'</font></strong>
 
-<a name="line40"> 40: </a><font color="#A020F0">#endif</font>
+<a name="line41"> 41: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcmfn.h b/include/slepc/finclude/slepcmfn.h
index a6c4f37..55ee288 100644
--- a/include/slepc/finclude/slepcmfn.h
+++ b/include/slepc/finclude/slepcmfn.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -24,15 +24,14 @@
 #include "slepc/finclude/slepcsysdef.h"
 #include "slepc/finclude/slepcmfndef.h"
 
-!  Convergence flags.
-!  They sould match the flags in $SLEPC_DIR/include/slepcmfn.h
-
       PetscEnum MFN_CONVERGED_TOL
+      PetscEnum MFN_CONVERGED_ITS
       PetscEnum MFN_DIVERGED_ITS
       PetscEnum MFN_DIVERGED_BREAKDOWN
       PetscEnum MFN_CONVERGED_ITERATING
 
       parameter (MFN_CONVERGED_TOL          =  2)
+      parameter (MFN_CONVERGED_ITS          =  3)
       parameter (MFN_DIVERGED_ITS           = -3)
       parameter (MFN_DIVERGED_BREAKDOWN     = -4)
       parameter (MFN_CONVERGED_ITERATING    =  0)
diff --git a/include/slepc/finclude/slepcmfn.h.html b/include/slepc/finclude/slepcmfn.h.html
index e6c7260..d37fec3 100644
--- a/include/slepc/finclude/slepcmfn.h.html
+++ b/include/slepc/finclude/slepcmfn.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcmfn.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:37+00:00">
+<meta name="date" content="2016-05-16T10:34:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcmfn.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcmfn.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
@@ -36,28 +36,27 @@
 <a name="line24"> 24: </a> #include <A href="../../../include/slepc/finclude/slepcsysdef.h.html">slepc/finclude/slepcsysdef.h</A>
 <a name="line25"> 25: </a> #include <A href="../../../include/slepc/finclude/slepcmfndef.h.html">slepc/finclude/slepcmfndef.h</A>
 
-<a name="line27"> 27: </a>!  Convergence flags.
-<a name="line28"> 28: </a>!  They sould match the flags in $SLEPC_DIR/include/slepcmfn.h
-
-<a name="line30"> 30: </a>      PetscEnum MFN_CONVERGED_TOL
-<a name="line31"> 31: </a>      PetscEnum MFN_DIVERGED_ITS
-<a name="line32"> 32: </a>      PetscEnum MFN_DIVERGED_BREAKDOWN
-<a name="line33"> 33: </a>      PetscEnum MFN_CONVERGED_ITERATING
-
-<a name="line35"> 35: </a>      parameter (MFN_CONVERGED_TOL          =  2)
-<a name="line36"> 36: </a>      parameter (MFN_DIVERGED_ITS           = -3)
-<a name="line37"> 37: </a>      parameter (MFN_DIVERGED_BREAKDOWN     = -4)
-<a name="line38"> 38: </a>      parameter (MFN_CONVERGED_ITERATING    =  0)
-
-<a name="line40"> 40: </a>!
-<a name="line41"> 41: </a>!   Possible arguments to <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>()
-<a name="line42"> 42: </a>!
-<a name="line43"> 43: </a>      external MFNMONITORDEFAULT
-<a name="line44"> 44: </a>      external MFNMONITORLG
-
-<a name="line46"> 46: </a>!
-<a name="line47"> 47: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> package in SLEPc
-<a name="line48"> 48: </a>!
+<a name="line27"> 27: </a>      PetscEnum MFN_CONVERGED_TOL
+<a name="line28"> 28: </a>      PetscEnum MFN_CONVERGED_ITS
+<a name="line29"> 29: </a>      PetscEnum MFN_DIVERGED_ITS
+<a name="line30"> 30: </a>      PetscEnum MFN_DIVERGED_BREAKDOWN
+<a name="line31"> 31: </a>      PetscEnum MFN_CONVERGED_ITERATING
+
+<a name="line33"> 33: </a>      parameter (MFN_CONVERGED_TOL          =  2)
+<a name="line34"> 34: </a>      parameter (MFN_CONVERGED_ITS          =  3)
+<a name="line35"> 35: </a>      parameter (MFN_DIVERGED_ITS           = -3)
+<a name="line36"> 36: </a>      parameter (MFN_DIVERGED_BREAKDOWN     = -4)
+<a name="line37"> 37: </a>      parameter (MFN_CONVERGED_ITERATING    =  0)
+
+<a name="line39"> 39: </a>!
+<a name="line40"> 40: </a>!   Possible arguments to <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>()
+<a name="line41"> 41: </a>!
+<a name="line42"> 42: </a>      external MFNMONITORDEFAULT
+<a name="line43"> 43: </a>      external MFNMONITORLG
+
+<a name="line45"> 45: </a>!
+<a name="line46"> 46: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> package in SLEPc
+<a name="line47"> 47: </a>!
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcmfn.h90 b/include/slepc/finclude/slepcmfn.h90
index dde4349..198ec68 100644
--- a/include/slepc/finclude/slepcmfn.h90
+++ b/include/slepc/finclude/slepcmfn.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcmfn.h90.html b/include/slepc/finclude/slepcmfn.h90.html
index 10e8fd1..38540d5 100644
--- a/include/slepc/finclude/slepcmfn.h90.html
+++ b/include/slepc/finclude/slepcmfn.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcmfn.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcmfn.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcmfn.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcmfndef.h b/include/slepc/finclude/slepcmfndef.h
index cb75364..9bb15aa 100644
--- a/include/slepc/finclude/slepcmfndef.h
+++ b/include/slepc/finclude/slepcmfndef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,21 +20,21 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCMFN_H)
-#define __SLEPCMFN_H
+#if !defined(__SLEPCMFNDEF_H)
+#define __SLEPCMFNDEF_H
 
 #include "petsc/finclude/petscmatdef.h"
 #include "slepc/finclude/slepcfndef.h"
 #include "slepc/finclude/slepcbvdef.h"
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define MFN                    PetscFortranAddr
+#define MFN PetscFortranAddr
 #endif
 
-#define MFNType                character*(80)
-#define MFNConvergedReason     PetscEnum
-
+#define MFNType            character*(80)
+#define MFNConvergedReason PetscEnum
 
 #define MFNKRYLOV      'krylov'
+#define MFNEXPOKIT     'expokit'
 
 #endif
diff --git a/include/slepc/finclude/slepcmfndef.h.html b/include/slepc/finclude/slepcmfndef.h.html
index 42af124..f2d94e1 100644
--- a/include/slepc/finclude/slepcmfndef.h.html
+++ b/include/slepc/finclude/slepcmfndef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcmfndef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcmfndef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcmfndef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -38,14 +38,14 @@
 <a name="line28"> 28: </a> #include <A href="../../../include/slepc/finclude/slepcbvdef.h.html">slepc/finclude/slepcbvdef.h</A>
 
 <a name="line30"> 30: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>                    PetscFortranAddr</font></strong>
+<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> PetscFortranAddr</font></strong>
 <a name="line32"> 32: </a><font color="#A020F0">#endif</font>
 
-<a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>                character*(80)</font></strong>
-<a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a>     PetscEnum</font></strong>
+<a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>            character*(80)</font></strong>
+<a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> PetscEnum</font></strong>
 
-
-<a name="line38"> 38: </a><strong><font color="#228B22">#define MFNKRYLOV      'krylov'</font></strong>
+<a name="line37"> 37: </a><strong><font color="#228B22">#define MFNKRYLOV      'krylov'</font></strong>
+<a name="line38"> 38: </a><strong><font color="#228B22">#define MFNEXPOKIT     'expokit'</font></strong>
 
 <a name="line40"> 40: </a><font color="#A020F0">#endif</font>
 </pre>
diff --git a/include/slepc/finclude/slepcnep.h b/include/slepc/finclude/slepcnep.h
index 2e733a6..d817506 100644
--- a/include/slepc/finclude/slepcnep.h
+++ b/include/slepc/finclude/slepcnep.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -34,24 +34,42 @@
       parameter (NEP_REFINE_SIMPLE          =  1)
       parameter (NEP_REFINE_MULTIPLE        =  2)
 
-      PetscEnum NEP_CONVERGED_FNORM_ABS
-      PetscEnum NEP_CONVERGED_FNORM_RELATIVE
-      PetscEnum NEP_CONVERGED_SNORM_RELATIVE
-      PetscEnum NEP_DIVERGED_LINEAR_SOLVE
-      PetscEnum NEP_DIVERGED_FUNCTION_COUNT
-      PetscEnum NEP_DIVERGED_MAX_IT
+      PetscEnum NEP_REFINE_SCHEME_SCHUR
+      PetscEnum NEP_REFINE_SCHEME_MBE
+      PetscEnum NEP_REFINE_SCHEME_EXPLICIT
+
+      parameter (NEP_REFINE_SCHEME_SCHUR    =  1)
+      parameter (NEP_REFINE_SCHEME_MBE      =  2)
+      parameter (NEP_REFINE_SCHEME_EXPLICIT =  3)
+
+      PetscEnum NEP_CONV_ABS
+      PetscEnum NEP_CONV_REL
+      PetscEnum NEP_CONV_NORM
+      PetscEnum NEP_CONV_USER
+
+      parameter (NEP_CONV_ABS               =  0)
+      parameter (NEP_CONV_REL               =  1)
+      parameter (NEP_CONV_NORM              =  2)
+      parameter (NEP_CONV_USER              =  3)
+
+      PetscEnum NEP_STOP_BASIC
+      PetscEnum NEP_STOP_USER
+
+      parameter (NEP_STOP_BASIC             =  0)
+      parameter (NEP_STOP_USER              =  1)
+
+      PetscEnum NEP_CONVERGED_TOL
+      PetscEnum NEP_CONVERGED_USER
+      PetscEnum NEP_DIVERGED_ITS
       PetscEnum NEP_DIVERGED_BREAKDOWN
-      PetscEnum NEP_DIVERGED_FNORM_NAN
+      PetscEnum NEP_DIVERGED_LINEAR_SOLVE
       PetscEnum NEP_CONVERGED_ITERATING
 
-      parameter (NEP_CONVERGED_FNORM_ABS      =  2)
-      parameter (NEP_CONVERGED_FNORM_RELATIVE =  3)
-      parameter (NEP_CONVERGED_SNORM_RELATIVE =  4)
-      parameter (NEP_DIVERGED_LINEAR_SOLVE    = -1)
-      parameter (NEP_DIVERGED_FUNCTION_COUNT  = -2)
-      parameter (NEP_DIVERGED_MAX_IT          = -3)
-      parameter (NEP_DIVERGED_BREAKDOWN       = -4)
-      parameter (NEP_DIVERGED_FNORM_NAN       = -5)
+      parameter (NEP_CONVERGED_TOL            =  1)
+      parameter (NEP_CONVERGED_USER           =  2)
+      parameter (NEP_DIVERGED_ITS             = -1)
+      parameter (NEP_DIVERGED_BREAKDOWN       = -2)
+      parameter (NEP_DIVERGED_LINEAR_SOLVE    = -4)
       parameter (NEP_CONVERGED_ITERATING      =  0)
 
       PetscEnum NEP_LARGEST_MAGNITUDE
@@ -63,6 +81,8 @@
       PetscEnum NEP_TARGET_MAGNITUDE
       PetscEnum NEP_TARGET_REAL
       PetscEnum NEP_TARGET_IMAGINARY
+      PetscEnum NEP_ALL
+      PetscEnum NEP_WHICH_USER
 
       parameter (NEP_LARGEST_MAGNITUDE      =  1)
       parameter (NEP_SMALLEST_MAGNITUDE     =  2)
@@ -73,12 +93,16 @@
       parameter (NEP_TARGET_MAGNITUDE       =  7)
       parameter (NEP_TARGET_REAL            =  8)
       parameter (NEP_TARGET_IMAGINARY       =  9)
+      parameter (NEP_ALL                    = 10)
+      parameter (NEP_WHICH_USER             = 11)
 
       PetscEnum NEP_ERROR_ABSOLUTE
       PetscEnum NEP_ERROR_RELATIVE
+      PetscEnum NEP_ERROR_BACKWARD
 
       parameter (NEP_ERROR_ABSOLUTE         =  0)
       parameter (NEP_ERROR_RELATIVE         =  1)
+      parameter (NEP_ERROR_BACKWARD         =  2)
 
 !
 !   Possible arguments to NEPMonitorSet()
diff --git a/include/slepc/finclude/slepcnep.h.html b/include/slepc/finclude/slepcnep.h.html
index e825cc0..d631eca 100644
--- a/include/slepc/finclude/slepcnep.h.html
+++ b/include/slepc/finclude/slepcnep.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcnep.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:37+00:00">
+<meta name="date" content="2016-05-16T10:34:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcnep.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcnep.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
@@ -46,64 +46,88 @@
 <a name="line34"> 34: </a>      parameter (NEP_REFINE_SIMPLE          =  1)
 <a name="line35"> 35: </a>      parameter (NEP_REFINE_MULTIPLE        =  2)
 
-<a name="line37"> 37: </a>      PetscEnum NEP_CONVERGED_FNORM_ABS
-<a name="line38"> 38: </a>      PetscEnum NEP_CONVERGED_FNORM_RELATIVE
-<a name="line39"> 39: </a>      PetscEnum NEP_CONVERGED_SNORM_RELATIVE
-<a name="line40"> 40: </a>      PetscEnum NEP_DIVERGED_LINEAR_SOLVE
-<a name="line41"> 41: </a>      PetscEnum NEP_DIVERGED_FUNCTION_COUNT
-<a name="line42"> 42: </a>      PetscEnum NEP_DIVERGED_MAX_IT
-<a name="line43"> 43: </a>      PetscEnum NEP_DIVERGED_BREAKDOWN
-<a name="line44"> 44: </a>      PetscEnum NEP_DIVERGED_FNORM_NAN
-<a name="line45"> 45: </a>      PetscEnum NEP_CONVERGED_ITERATING
-
-<a name="line47"> 47: </a>      parameter (NEP_CONVERGED_FNORM_ABS      =  2)
-<a name="line48"> 48: </a>      parameter (NEP_CONVERGED_FNORM_RELATIVE =  3)
-<a name="line49"> 49: </a>      parameter (NEP_CONVERGED_SNORM_RELATIVE =  4)
-<a name="line50"> 50: </a>      parameter (NEP_DIVERGED_LINEAR_SOLVE    = -1)
-<a name="line51"> 51: </a>      parameter (NEP_DIVERGED_FUNCTION_COUNT  = -2)
-<a name="line52"> 52: </a>      parameter (NEP_DIVERGED_MAX_IT          = -3)
-<a name="line53"> 53: </a>      parameter (NEP_DIVERGED_BREAKDOWN       = -4)
-<a name="line54"> 54: </a>      parameter (NEP_DIVERGED_FNORM_NAN       = -5)
-<a name="line55"> 55: </a>      parameter (NEP_CONVERGED_ITERATING      =  0)
-
-<a name="line57"> 57: </a>      PetscEnum NEP_LARGEST_MAGNITUDE
-<a name="line58"> 58: </a>      PetscEnum NEP_SMALLEST_MAGNITUDE
-<a name="line59"> 59: </a>      PetscEnum NEP_LARGEST_REAL
-<a name="line60"> 60: </a>      PetscEnum NEP_SMALLEST_REAL
-<a name="line61"> 61: </a>      PetscEnum NEP_LARGEST_IMAGINARY
-<a name="line62"> 62: </a>      PetscEnum NEP_SMALLEST_IMAGINARY
-<a name="line63"> 63: </a>      PetscEnum NEP_TARGET_MAGNITUDE
-<a name="line64"> 64: </a>      PetscEnum NEP_TARGET_REAL
-<a name="line65"> 65: </a>      PetscEnum NEP_TARGET_IMAGINARY
-
-<a name="line67"> 67: </a>      parameter (NEP_LARGEST_MAGNITUDE      =  1)
-<a name="line68"> 68: </a>      parameter (NEP_SMALLEST_MAGNITUDE     =  2)
-<a name="line69"> 69: </a>      parameter (NEP_LARGEST_REAL           =  3)
-<a name="line70"> 70: </a>      parameter (NEP_SMALLEST_REAL          =  4)
-<a name="line71"> 71: </a>      parameter (NEP_LARGEST_IMAGINARY      =  5)
-<a name="line72"> 72: </a>      parameter (NEP_SMALLEST_IMAGINARY     =  6)
-<a name="line73"> 73: </a>      parameter (NEP_TARGET_MAGNITUDE       =  7)
-<a name="line74"> 74: </a>      parameter (NEP_TARGET_REAL            =  8)
-<a name="line75"> 75: </a>      parameter (NEP_TARGET_IMAGINARY       =  9)
-
-<a name="line77"> 77: </a>      PetscEnum NEP_ERROR_ABSOLUTE
-<a name="line78"> 78: </a>      PetscEnum NEP_ERROR_RELATIVE
-
-<a name="line80"> 80: </a>      parameter (NEP_ERROR_ABSOLUTE         =  0)
-<a name="line81"> 81: </a>      parameter (NEP_ERROR_RELATIVE         =  1)
-
-<a name="line83"> 83: </a>!
-<a name="line84"> 84: </a>!   Possible arguments to <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()
-<a name="line85"> 85: </a>!
-<a name="line86"> 86: </a>      external NEPMONITORALL
-<a name="line87"> 87: </a>      external NEPMONITORLG
-<a name="line88"> 88: </a>      external NEPMONITORLGALL
-<a name="line89"> 89: </a>      external NEPMONITORCONVERGED
-<a name="line90"> 90: </a>      external NEPMONITORFIRST
-
-<a name="line92"> 92: </a>!
-<a name="line93"> 93: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package in SLEPc
-<a name="line94"> 94: </a>!
+<a name="line37"> 37: </a>      PetscEnum NEP_REFINE_SCHEME_SCHUR
+<a name="line38"> 38: </a>      PetscEnum NEP_REFINE_SCHEME_MBE
+<a name="line39"> 39: </a>      PetscEnum NEP_REFINE_SCHEME_EXPLICIT
+
+<a name="line41"> 41: </a>      parameter (NEP_REFINE_SCHEME_SCHUR    =  1)
+<a name="line42"> 42: </a>      parameter (NEP_REFINE_SCHEME_MBE      =  2)
+<a name="line43"> 43: </a>      parameter (NEP_REFINE_SCHEME_EXPLICIT =  3)
+
+<a name="line45"> 45: </a>      PetscEnum NEP_CONV_ABS
+<a name="line46"> 46: </a>      PetscEnum NEP_CONV_REL
+<a name="line47"> 47: </a>      PetscEnum NEP_CONV_NORM
+<a name="line48"> 48: </a>      PetscEnum NEP_CONV_USER
+
+<a name="line50"> 50: </a>      parameter (NEP_CONV_ABS               =  0)
+<a name="line51"> 51: </a>      parameter (NEP_CONV_REL               =  1)
+<a name="line52"> 52: </a>      parameter (NEP_CONV_NORM              =  2)
+<a name="line53"> 53: </a>      parameter (NEP_CONV_USER              =  3)
+
+<a name="line55"> 55: </a>      PetscEnum NEP_STOP_BASIC
+<a name="line56"> 56: </a>      PetscEnum NEP_STOP_USER
+
+<a name="line58"> 58: </a>      parameter (NEP_STOP_BASIC             =  0)
+<a name="line59"> 59: </a>      parameter (NEP_STOP_USER              =  1)
+
+<a name="line61"> 61: </a>      PetscEnum NEP_CONVERGED_TOL
+<a name="line62"> 62: </a>      PetscEnum NEP_CONVERGED_USER
+<a name="line63"> 63: </a>      PetscEnum NEP_DIVERGED_ITS
+<a name="line64"> 64: </a>      PetscEnum NEP_DIVERGED_BREAKDOWN
+<a name="line65"> 65: </a>      PetscEnum NEP_DIVERGED_LINEAR_SOLVE
+<a name="line66"> 66: </a>      PetscEnum NEP_CONVERGED_ITERATING
+
+<a name="line68"> 68: </a>      parameter (NEP_CONVERGED_TOL            =  1)
+<a name="line69"> 69: </a>      parameter (NEP_CONVERGED_USER           =  2)
+<a name="line70"> 70: </a>      parameter (NEP_DIVERGED_ITS             = -1)
+<a name="line71"> 71: </a>      parameter (NEP_DIVERGED_BREAKDOWN       = -2)
+<a name="line72"> 72: </a>      parameter (NEP_DIVERGED_LINEAR_SOLVE    = -4)
+<a name="line73"> 73: </a>      parameter (NEP_CONVERGED_ITERATING      =  0)
+
+<a name="line75"> 75: </a>      PetscEnum NEP_LARGEST_MAGNITUDE
+<a name="line76"> 76: </a>      PetscEnum NEP_SMALLEST_MAGNITUDE
+<a name="line77"> 77: </a>      PetscEnum NEP_LARGEST_REAL
+<a name="line78"> 78: </a>      PetscEnum NEP_SMALLEST_REAL
+<a name="line79"> 79: </a>      PetscEnum NEP_LARGEST_IMAGINARY
+<a name="line80"> 80: </a>      PetscEnum NEP_SMALLEST_IMAGINARY
+<a name="line81"> 81: </a>      PetscEnum NEP_TARGET_MAGNITUDE
+<a name="line82"> 82: </a>      PetscEnum NEP_TARGET_REAL
+<a name="line83"> 83: </a>      PetscEnum NEP_TARGET_IMAGINARY
+<a name="line84"> 84: </a>      PetscEnum NEP_ALL
+<a name="line85"> 85: </a>      PetscEnum NEP_WHICH_USER
+
+<a name="line87"> 87: </a>      parameter (NEP_LARGEST_MAGNITUDE      =  1)
+<a name="line88"> 88: </a>      parameter (NEP_SMALLEST_MAGNITUDE     =  2)
+<a name="line89"> 89: </a>      parameter (NEP_LARGEST_REAL           =  3)
+<a name="line90"> 90: </a>      parameter (NEP_SMALLEST_REAL          =  4)
+<a name="line91"> 91: </a>      parameter (NEP_LARGEST_IMAGINARY      =  5)
+<a name="line92"> 92: </a>      parameter (NEP_SMALLEST_IMAGINARY     =  6)
+<a name="line93"> 93: </a>      parameter (NEP_TARGET_MAGNITUDE       =  7)
+<a name="line94"> 94: </a>      parameter (NEP_TARGET_REAL            =  8)
+<a name="line95"> 95: </a>      parameter (NEP_TARGET_IMAGINARY       =  9)
+<a name="line96"> 96: </a>      parameter (NEP_ALL                    = 10)
+<a name="line97"> 97: </a>      parameter (NEP_WHICH_USER             = 11)
+
+<a name="line99"> 99: </a>      PetscEnum NEP_ERROR_ABSOLUTE
+<a name="line100">100: </a>      PetscEnum NEP_ERROR_RELATIVE
+<a name="line101">101: </a>      PetscEnum NEP_ERROR_BACKWARD
+
+<a name="line103">103: </a>      parameter (NEP_ERROR_ABSOLUTE         =  0)
+<a name="line104">104: </a>      parameter (NEP_ERROR_RELATIVE         =  1)
+<a name="line105">105: </a>      parameter (NEP_ERROR_BACKWARD         =  2)
+
+<a name="line107">107: </a>!
+<a name="line108">108: </a>!   Possible arguments to <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()
+<a name="line109">109: </a>!
+<a name="line110">110: </a>      external NEPMONITORALL
+<a name="line111">111: </a>      external NEPMONITORLG
+<a name="line112">112: </a>      external NEPMONITORLGALL
+<a name="line113">113: </a>      external NEPMONITORCONVERGED
+<a name="line114">114: </a>      external NEPMONITORFIRST
+
+<a name="line116">116: </a>!
+<a name="line117">117: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package in SLEPc
+<a name="line118">118: </a>!
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcnep.h90 b/include/slepc/finclude/slepcnep.h90
index 41e7e5f..d6da97b 100644
--- a/include/slepc/finclude/slepcnep.h90
+++ b/include/slepc/finclude/slepcnep.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcnep.h90.html b/include/slepc/finclude/slepcnep.h90.html
index 388d04e..c3757be 100644
--- a/include/slepc/finclude/slepcnep.h90.html
+++ b/include/slepc/finclude/slepcnep.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcnep.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcnep.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcnep.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcnepdef.h b/include/slepc/finclude/slepcnepdef.h
index babc3c4..98783d3 100644
--- a/include/slepc/finclude/slepcnepdef.h
+++ b/include/slepc/finclude/slepcnepdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,8 +20,8 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCNEP_H)
-#define __SLEPCNEP_H
+#if !defined(__SLEPCNEPDEF_H)
+#define __SLEPCNEPDEF_H
 
 #include "slepc/finclude/slepcbvdef.h"
 #include "slepc/finclude/slepcdsdef.h"
@@ -31,18 +31,23 @@
 #include "slepc/finclude/slepcpepdef.h"
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define NEP                PetscFortranAddr
+#define NEP PetscFortranAddr
 #endif
 
 #define NEPType            character*(80)
 #define NEPConvergedReason PetscEnum
 #define NEPErrorType       PetscEnum
 #define NEPWhich           PetscEnum
+#define NEPConv            PetscEnum
+#define NEPStop            PetscEnum
 #define NEPRefine          PetscEnum
+#define NEPRefineScheme    PetscEnum
 
 #define NEPRII       'rii'
 #define NEPSLP       'slp'
 #define NEPNARNOLDI  'narnoldi'
 #define NEPCISS      'ciss'
 #define NEPINTERPOL  'interpol'
+#define NEPNLEIGS    'nleigs'
+
 #endif
diff --git a/include/slepc/finclude/slepcnepdef.h.html b/include/slepc/finclude/slepcnepdef.h.html
index 1520b75..e89a0dd 100644
--- a/include/slepc/finclude/slepcnepdef.h.html
+++ b/include/slepc/finclude/slepcnepdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcnepdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcnepdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcnepdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -41,21 +41,26 @@
 <a name="line31"> 31: </a> #include <A href="../../../include/slepc/finclude/slepcpepdef.h.html">slepc/finclude/slepcpepdef.h</A>
 
 <a name="line33"> 33: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>                PetscFortranAddr</font></strong>
+<a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> PetscFortranAddr</font></strong>
 <a name="line35"> 35: </a><font color="#A020F0">#endif</font>
 
 <a name="line37"> 37: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>            character*(80)</font></strong>
 <a name="line38"> 38: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> PetscEnum</font></strong>
 <a name="line39"> 39: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>       PetscEnum</font></strong>
 <a name="line40"> 40: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>           PetscEnum</font></strong>
-<a name="line41"> 41: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>          PetscEnum</font></strong>
-
-<a name="line43"> 43: </a><strong><font color="#228B22">#define NEPRII       'rii'</font></strong>
-<a name="line44"> 44: </a><strong><font color="#228B22">#define NEPSLP       'slp'</font></strong>
-<a name="line45"> 45: </a><strong><font color="#228B22">#define NEPNARNOLDI  'narnoldi'</font></strong>
-<a name="line46"> 46: </a><strong><font color="#228B22">#define NEPCISS      'ciss'</font></strong>
-<a name="line47"> 47: </a><strong><font color="#228B22">#define NEPINTERPOL  'interpol'</font></strong>
-<a name="line48"> 48: </a><font color="#A020F0">#endif</font>
+<a name="line41"> 41: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a>            PetscEnum</font></strong>
+<a name="line42"> 42: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a>            PetscEnum</font></strong>
+<a name="line43"> 43: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>          PetscEnum</font></strong>
+<a name="line44"> 44: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a>    PetscEnum</font></strong>
+
+<a name="line46"> 46: </a><strong><font color="#228B22">#define NEPRII       'rii'</font></strong>
+<a name="line47"> 47: </a><strong><font color="#228B22">#define NEPSLP       'slp'</font></strong>
+<a name="line48"> 48: </a><strong><font color="#228B22">#define NEPNARNOLDI  'narnoldi'</font></strong>
+<a name="line49"> 49: </a><strong><font color="#228B22">#define NEPCISS      'ciss'</font></strong>
+<a name="line50"> 50: </a><strong><font color="#228B22">#define NEPINTERPOL  'interpol'</font></strong>
+<a name="line51"> 51: </a><strong><font color="#228B22">#define NEPNLEIGS    'nleigs'</font></strong>
+
+<a name="line53"> 53: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcpep.h b/include/slepc/finclude/slepcpep.h
index 6507c8c..fe91d8d 100644
--- a/include/slepc/finclude/slepcpep.h
+++ b/include/slepc/finclude/slepcpep.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -27,15 +27,17 @@
 !  They should match the flags in $SLEPC_DIR/include/slepcpep.h
 
       PetscEnum PEP_CONVERGED_TOL
+      PetscEnum PEP_CONVERGED_USER
       PetscEnum PEP_DIVERGED_ITS
       PetscEnum PEP_DIVERGED_BREAKDOWN
       PetscEnum PEP_DIVERGED_SYMMETRY_LOST
       PetscEnum PEP_CONVERGED_ITERATING
 
-      parameter (PEP_CONVERGED_TOL          =  2)
-      parameter (PEP_DIVERGED_ITS           = -3)
-      parameter (PEP_DIVERGED_BREAKDOWN     = -4)
-      parameter (PEP_DIVERGED_SYMMETRY_LOST = -5)
+      parameter (PEP_CONVERGED_TOL          =  1)
+      parameter (PEP_CONVERGED_USER         =  2)
+      parameter (PEP_DIVERGED_ITS           = -1)
+      parameter (PEP_DIVERGED_BREAKDOWN     = -2)
+      parameter (PEP_DIVERGED_SYMMETRY_LOST = -3)
       parameter (PEP_CONVERGED_ITERATING    =  0)
 
       PetscEnum PEP_GENERAL
@@ -100,6 +102,14 @@
       parameter (PEP_REFINE_SIMPLE          =  1)
       parameter (PEP_REFINE_MULTIPLE        =  2)
 
+      PetscEnum PEP_REFINE_SCHEME_SCHUR
+      PetscEnum PEP_REFINE_SCHEME_MBE
+      PetscEnum PEP_REFINE_SCHEME_EXPLICIT
+
+      parameter (PEP_REFINE_SCHEME_SCHUR    =  1)
+      parameter (PEP_REFINE_SCHEME_MBE      =  2)
+      parameter (PEP_REFINE_SCHEME_EXPLICIT =  3)
+
       PetscEnum PEP_EXTRACT_NONE
       PetscEnum PEP_EXTRACT_NORM
       PetscEnum PEP_EXTRACT_RESIDUAL
@@ -119,16 +129,20 @@
       parameter (PEP_ERROR_BACKWARD         =  2)
 
       PetscEnum PEP_CONV_ABS
-      PetscEnum PEP_CONV_EIG
-      PetscEnum PEP_CONV_LINEAR
+      PetscEnum PEP_CONV_REL
       PetscEnum PEP_CONV_NORM
       PetscEnum PEP_CONV_USER
 
       parameter (PEP_CONV_ABS               =  0)
-      parameter (PEP_CONV_EIG               =  1)
-      parameter (PEP_CONV_LINEAR            =  2)
-      parameter (PEP_CONV_NORM              =  3)
-      parameter (PEP_CONV_USER              =  4)
+      parameter (PEP_CONV_REL               =  1)
+      parameter (PEP_CONV_NORM              =  2)
+      parameter (PEP_CONV_USER              =  3)
+
+      PetscEnum PEP_STOP_BASIC
+      PetscEnum PEP_STOP_USER
+
+      parameter (PEP_STOP_BASIC             =  0)
+      parameter (PEP_STOP_USER              =  1)
 
 !
 !   Possible arguments to PEPMonitorSet()
diff --git a/include/slepc/finclude/slepcpep.h.html b/include/slepc/finclude/slepcpep.h.html
index 0279920..7e88b27 100644
--- a/include/slepc/finclude/slepcpep.h.html
+++ b/include/slepc/finclude/slepcpep.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcpep.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:37+00:00">
+<meta name="date" content="2016-05-16T10:34:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcpep.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcpep.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
@@ -39,121 +39,135 @@
 <a name="line27"> 27: </a>!  They should match the flags in $SLEPC_DIR/include/slepcpep.h
 
 <a name="line29"> 29: </a>      PetscEnum PEP_CONVERGED_TOL
-<a name="line30"> 30: </a>      PetscEnum PEP_DIVERGED_ITS
-<a name="line31"> 31: </a>      PetscEnum PEP_DIVERGED_BREAKDOWN
-<a name="line32"> 32: </a>      PetscEnum PEP_DIVERGED_SYMMETRY_LOST
-<a name="line33"> 33: </a>      PetscEnum PEP_CONVERGED_ITERATING
-
-<a name="line35"> 35: </a>      parameter (PEP_CONVERGED_TOL          =  2)
-<a name="line36"> 36: </a>      parameter (PEP_DIVERGED_ITS           = -3)
-<a name="line37"> 37: </a>      parameter (PEP_DIVERGED_BREAKDOWN     = -4)
-<a name="line38"> 38: </a>      parameter (PEP_DIVERGED_SYMMETRY_LOST = -5)
-<a name="line39"> 39: </a>      parameter (PEP_CONVERGED_ITERATING    =  0)
-
-<a name="line41"> 41: </a>      PetscEnum PEP_GENERAL
-<a name="line42"> 42: </a>      PetscEnum PEP_HERMITIAN
-<a name="line43"> 43: </a>      PetscEnum PEP_GYROSCOPIC
-
-<a name="line45"> 45: </a>      parameter (PEP_GENERAL                =  1)
-<a name="line46"> 46: </a>      parameter (PEP_HERMITIAN              =  2)
-<a name="line47"> 47: </a>      parameter (PEP_GYROSCOPIC             =  3)
-
-<a name="line49"> 49: </a>      PetscEnum PEP_LARGEST_MAGNITUDE
-<a name="line50"> 50: </a>      PetscEnum PEP_SMALLEST_MAGNITUDE
-<a name="line51"> 51: </a>      PetscEnum PEP_LARGEST_REAL
-<a name="line52"> 52: </a>      PetscEnum PEP_SMALLEST_REAL
-<a name="line53"> 53: </a>      PetscEnum PEP_LARGEST_IMAGINARY
-<a name="line54"> 54: </a>      PetscEnum PEP_SMALLEST_IMAGINARY
-<a name="line55"> 55: </a>      PetscEnum PEP_TARGET_MAGNITUDE
-<a name="line56"> 56: </a>      PetscEnum PEP_TARGET_REAL
-<a name="line57"> 57: </a>      PetscEnum PEP_TARGET_IMAGINARY
-<a name="line58"> 58: </a>      PetscEnum PEP_WHICH_USER
-
-<a name="line60"> 60: </a>      parameter (PEP_LARGEST_MAGNITUDE      =  1)
-<a name="line61"> 61: </a>      parameter (PEP_SMALLEST_MAGNITUDE     =  2)
-<a name="line62"> 62: </a>      parameter (PEP_LARGEST_REAL           =  3)
-<a name="line63"> 63: </a>      parameter (PEP_SMALLEST_REAL          =  4)
-<a name="line64"> 64: </a>      parameter (PEP_LARGEST_IMAGINARY      =  5)
-<a name="line65"> 65: </a>      parameter (PEP_SMALLEST_IMAGINARY     =  6)
-<a name="line66"> 66: </a>      parameter (PEP_TARGET_MAGNITUDE       =  7)
-<a name="line67"> 67: </a>      parameter (PEP_TARGET_REAL            =  8)
-<a name="line68"> 68: </a>      parameter (PEP_TARGET_IMAGINARY       =  9)
-<a name="line69"> 69: </a>      parameter (PEP_WHICH_USER             = 10)
-
-<a name="line71"> 71: </a>      PetscEnum PEP_BASIS_MONOMIAL
-<a name="line72"> 72: </a>      PetscEnum PEP_BASIS_CHEBYSHEV1
-<a name="line73"> 73: </a>      PetscEnum PEP_BASIS_CHEBYSHEV2
-<a name="line74"> 74: </a>      PetscEnum PEP_BASIS_LEGENDRE
-<a name="line75"> 75: </a>      PetscEnum PEP_BASIS_LAGUERRE
-<a name="line76"> 76: </a>      PetscEnum PEP_BASIS_HERMITE
-
-<a name="line78"> 78: </a>      parameter (PEP_BASIS_MONOMIAL         =  0)
-<a name="line79"> 79: </a>      parameter (PEP_BASIS_CHEBYSHEV1       =  1)
-<a name="line80"> 80: </a>      parameter (PEP_BASIS_CHEBYSHEV2       =  2)
-<a name="line81"> 81: </a>      parameter (PEP_BASIS_LEGENDRE         =  3)
-<a name="line82"> 82: </a>      parameter (PEP_BASIS_LAGUERRE         =  4)
-<a name="line83"> 83: </a>      parameter (PEP_BASIS_HERMITE          =  5)
-
-<a name="line85"> 85: </a>      PetscEnum PEP_SCALE_NONE
-<a name="line86"> 86: </a>      PetscEnum PEP_SCALE_SCALAR
-<a name="line87"> 87: </a>      PetscEnum PEP_SCALE_DIAGONAL
-<a name="line88"> 88: </a>      PetscEnum PEP_SCALE_BOTH
-
-<a name="line90"> 90: </a>      parameter (PEP_SCALE_NONE             =  0)
-<a name="line91"> 91: </a>      parameter (PEP_SCALE_SCALAR           =  1)
-<a name="line92"> 92: </a>      parameter (PEP_SCALE_DIAGONAL         =  2)
-<a name="line93"> 93: </a>      parameter (PEP_SCALE_BOTH             =  3)
-
-<a name="line95"> 95: </a>      PetscEnum PEP_REFINE_NONE
-<a name="line96"> 96: </a>      PetscEnum PEP_REFINE_SIMPLE
-<a name="line97"> 97: </a>      PetscEnum PEP_REFINE_MULTIPLE
-
-<a name="line99"> 99: </a>      parameter (PEP_REFINE_NONE            =  0)
-<a name="line100">100: </a>      parameter (PEP_REFINE_SIMPLE          =  1)
-<a name="line101">101: </a>      parameter (PEP_REFINE_MULTIPLE        =  2)
-
-<a name="line103">103: </a>      PetscEnum PEP_EXTRACT_NONE
-<a name="line104">104: </a>      PetscEnum PEP_EXTRACT_NORM
-<a name="line105">105: </a>      PetscEnum PEP_EXTRACT_RESIDUAL
-<a name="line106">106: </a>      PetscEnum PEP_EXTRACT_STRUCTURED
-
-<a name="line108">108: </a>      parameter (PEP_EXTRACT_NONE           =  1)
-<a name="line109">109: </a>      parameter (PEP_EXTRACT_NORM           =  2)
-<a name="line110">110: </a>      parameter (PEP_EXTRACT_RESIDUAL       =  3)
-<a name="line111">111: </a>      parameter (PEP_EXTRACT_STRUCTURED     =  4)
-
-<a name="line113">113: </a>      PetscEnum PEP_ERROR_ABSOLUTE
-<a name="line114">114: </a>      PetscEnum PEP_ERROR_RELATIVE
-<a name="line115">115: </a>      PetscEnum PEP_ERROR_BACKWARD
-
-<a name="line117">117: </a>      parameter (PEP_ERROR_ABSOLUTE         =  0)
-<a name="line118">118: </a>      parameter (PEP_ERROR_RELATIVE         =  1)
-<a name="line119">119: </a>      parameter (PEP_ERROR_BACKWARD         =  2)
-
-<a name="line121">121: </a>      PetscEnum PEP_CONV_ABS
-<a name="line122">122: </a>      PetscEnum PEP_CONV_EIG
-<a name="line123">123: </a>      PetscEnum PEP_CONV_LINEAR
-<a name="line124">124: </a>      PetscEnum PEP_CONV_NORM
-<a name="line125">125: </a>      PetscEnum PEP_CONV_USER
-
-<a name="line127">127: </a>      parameter (PEP_CONV_ABS               =  0)
-<a name="line128">128: </a>      parameter (PEP_CONV_EIG               =  1)
-<a name="line129">129: </a>      parameter (PEP_CONV_LINEAR            =  2)
-<a name="line130">130: </a>      parameter (PEP_CONV_NORM              =  3)
-<a name="line131">131: </a>      parameter (PEP_CONV_USER              =  4)
-
-<a name="line133">133: </a>!
-<a name="line134">134: </a>!   Possible arguments to <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>()
-<a name="line135">135: </a>!
-<a name="line136">136: </a>      external PEPMONITORALL
-<a name="line137">137: </a>      external PEPMONITORLG
-<a name="line138">138: </a>      external PEPMONITORLGALL
-<a name="line139">139: </a>      external PEPMONITORCONVERGED
-<a name="line140">140: </a>      external PEPMONITORFIRST
-
-<a name="line142">142: </a>!
-<a name="line143">143: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> package in SLEPc
-<a name="line144">144: </a>!
+<a name="line30"> 30: </a>      PetscEnum PEP_CONVERGED_USER
+<a name="line31"> 31: </a>      PetscEnum PEP_DIVERGED_ITS
+<a name="line32"> 32: </a>      PetscEnum PEP_DIVERGED_BREAKDOWN
+<a name="line33"> 33: </a>      PetscEnum PEP_DIVERGED_SYMMETRY_LOST
+<a name="line34"> 34: </a>      PetscEnum PEP_CONVERGED_ITERATING
+
+<a name="line36"> 36: </a>      parameter (PEP_CONVERGED_TOL          =  1)
+<a name="line37"> 37: </a>      parameter (PEP_CONVERGED_USER         =  2)
+<a name="line38"> 38: </a>      parameter (PEP_DIVERGED_ITS           = -1)
+<a name="line39"> 39: </a>      parameter (PEP_DIVERGED_BREAKDOWN     = -2)
+<a name="line40"> 40: </a>      parameter (PEP_DIVERGED_SYMMETRY_LOST = -3)
+<a name="line41"> 41: </a>      parameter (PEP_CONVERGED_ITERATING    =  0)
+
+<a name="line43"> 43: </a>      PetscEnum PEP_GENERAL
+<a name="line44"> 44: </a>      PetscEnum PEP_HERMITIAN
+<a name="line45"> 45: </a>      PetscEnum PEP_GYROSCOPIC
+
+<a name="line47"> 47: </a>      parameter (PEP_GENERAL                =  1)
+<a name="line48"> 48: </a>      parameter (PEP_HERMITIAN              =  2)
+<a name="line49"> 49: </a>      parameter (PEP_GYROSCOPIC             =  3)
+
+<a name="line51"> 51: </a>      PetscEnum PEP_LARGEST_MAGNITUDE
+<a name="line52"> 52: </a>      PetscEnum PEP_SMALLEST_MAGNITUDE
+<a name="line53"> 53: </a>      PetscEnum PEP_LARGEST_REAL
+<a name="line54"> 54: </a>      PetscEnum PEP_SMALLEST_REAL
+<a name="line55"> 55: </a>      PetscEnum PEP_LARGEST_IMAGINARY
+<a name="line56"> 56: </a>      PetscEnum PEP_SMALLEST_IMAGINARY
+<a name="line57"> 57: </a>      PetscEnum PEP_TARGET_MAGNITUDE
+<a name="line58"> 58: </a>      PetscEnum PEP_TARGET_REAL
+<a name="line59"> 59: </a>      PetscEnum PEP_TARGET_IMAGINARY
+<a name="line60"> 60: </a>      PetscEnum PEP_WHICH_USER
+
+<a name="line62"> 62: </a>      parameter (PEP_LARGEST_MAGNITUDE      =  1)
+<a name="line63"> 63: </a>      parameter (PEP_SMALLEST_MAGNITUDE     =  2)
+<a name="line64"> 64: </a>      parameter (PEP_LARGEST_REAL           =  3)
+<a name="line65"> 65: </a>      parameter (PEP_SMALLEST_REAL          =  4)
+<a name="line66"> 66: </a>      parameter (PEP_LARGEST_IMAGINARY      =  5)
+<a name="line67"> 67: </a>      parameter (PEP_SMALLEST_IMAGINARY     =  6)
+<a name="line68"> 68: </a>      parameter (PEP_TARGET_MAGNITUDE       =  7)
+<a name="line69"> 69: </a>      parameter (PEP_TARGET_REAL            =  8)
+<a name="line70"> 70: </a>      parameter (PEP_TARGET_IMAGINARY       =  9)
+<a name="line71"> 71: </a>      parameter (PEP_WHICH_USER             = 10)
+
+<a name="line73"> 73: </a>      PetscEnum PEP_BASIS_MONOMIAL
+<a name="line74"> 74: </a>      PetscEnum PEP_BASIS_CHEBYSHEV1
+<a name="line75"> 75: </a>      PetscEnum PEP_BASIS_CHEBYSHEV2
+<a name="line76"> 76: </a>      PetscEnum PEP_BASIS_LEGENDRE
+<a name="line77"> 77: </a>      PetscEnum PEP_BASIS_LAGUERRE
+<a name="line78"> 78: </a>      PetscEnum PEP_BASIS_HERMITE
+
+<a name="line80"> 80: </a>      parameter (PEP_BASIS_MONOMIAL         =  0)
+<a name="line81"> 81: </a>      parameter (PEP_BASIS_CHEBYSHEV1       =  1)
+<a name="line82"> 82: </a>      parameter (PEP_BASIS_CHEBYSHEV2       =  2)
+<a name="line83"> 83: </a>      parameter (PEP_BASIS_LEGENDRE         =  3)
+<a name="line84"> 84: </a>      parameter (PEP_BASIS_LAGUERRE         =  4)
+<a name="line85"> 85: </a>      parameter (PEP_BASIS_HERMITE          =  5)
+
+<a name="line87"> 87: </a>      PetscEnum PEP_SCALE_NONE
+<a name="line88"> 88: </a>      PetscEnum PEP_SCALE_SCALAR
+<a name="line89"> 89: </a>      PetscEnum PEP_SCALE_DIAGONAL
+<a name="line90"> 90: </a>      PetscEnum PEP_SCALE_BOTH
+
+<a name="line92"> 92: </a>      parameter (PEP_SCALE_NONE             =  0)
+<a name="line93"> 93: </a>      parameter (PEP_SCALE_SCALAR           =  1)
+<a name="line94"> 94: </a>      parameter (PEP_SCALE_DIAGONAL         =  2)
+<a name="line95"> 95: </a>      parameter (PEP_SCALE_BOTH             =  3)
+
+<a name="line97"> 97: </a>      PetscEnum PEP_REFINE_NONE
+<a name="line98"> 98: </a>      PetscEnum PEP_REFINE_SIMPLE
+<a name="line99"> 99: </a>      PetscEnum PEP_REFINE_MULTIPLE
+
+<a name="line101">101: </a>      parameter (PEP_REFINE_NONE            =  0)
+<a name="line102">102: </a>      parameter (PEP_REFINE_SIMPLE          =  1)
+<a name="line103">103: </a>      parameter (PEP_REFINE_MULTIPLE        =  2)
+
+<a name="line105">105: </a>      PetscEnum PEP_REFINE_SCHEME_SCHUR
+<a name="line106">106: </a>      PetscEnum PEP_REFINE_SCHEME_MBE
+<a name="line107">107: </a>      PetscEnum PEP_REFINE_SCHEME_EXPLICIT
+
+<a name="line109">109: </a>      parameter (PEP_REFINE_SCHEME_SCHUR    =  1)
+<a name="line110">110: </a>      parameter (PEP_REFINE_SCHEME_MBE      =  2)
+<a name="line111">111: </a>      parameter (PEP_REFINE_SCHEME_EXPLICIT =  3)
+
+<a name="line113">113: </a>      PetscEnum PEP_EXTRACT_NONE
+<a name="line114">114: </a>      PetscEnum PEP_EXTRACT_NORM
+<a name="line115">115: </a>      PetscEnum PEP_EXTRACT_RESIDUAL
+<a name="line116">116: </a>      PetscEnum PEP_EXTRACT_STRUCTURED
+
+<a name="line118">118: </a>      parameter (PEP_EXTRACT_NONE           =  1)
+<a name="line119">119: </a>      parameter (PEP_EXTRACT_NORM           =  2)
+<a name="line120">120: </a>      parameter (PEP_EXTRACT_RESIDUAL       =  3)
+<a name="line121">121: </a>      parameter (PEP_EXTRACT_STRUCTURED     =  4)
+
+<a name="line123">123: </a>      PetscEnum PEP_ERROR_ABSOLUTE
+<a name="line124">124: </a>      PetscEnum PEP_ERROR_RELATIVE
+<a name="line125">125: </a>      PetscEnum PEP_ERROR_BACKWARD
+
+<a name="line127">127: </a>      parameter (PEP_ERROR_ABSOLUTE         =  0)
+<a name="line128">128: </a>      parameter (PEP_ERROR_RELATIVE         =  1)
+<a name="line129">129: </a>      parameter (PEP_ERROR_BACKWARD         =  2)
+
+<a name="line131">131: </a>      PetscEnum PEP_CONV_ABS
+<a name="line132">132: </a>      PetscEnum PEP_CONV_REL
+<a name="line133">133: </a>      PetscEnum PEP_CONV_NORM
+<a name="line134">134: </a>      PetscEnum PEP_CONV_USER
+
+<a name="line136">136: </a>      parameter (PEP_CONV_ABS               =  0)
+<a name="line137">137: </a>      parameter (PEP_CONV_REL               =  1)
+<a name="line138">138: </a>      parameter (PEP_CONV_NORM              =  2)
+<a name="line139">139: </a>      parameter (PEP_CONV_USER              =  3)
+
+<a name="line141">141: </a>      PetscEnum PEP_STOP_BASIC
+<a name="line142">142: </a>      PetscEnum PEP_STOP_USER
+
+<a name="line144">144: </a>      parameter (PEP_STOP_BASIC             =  0)
+<a name="line145">145: </a>      parameter (PEP_STOP_USER              =  1)
+
+<a name="line147">147: </a>!
+<a name="line148">148: </a>!   Possible arguments to <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>()
+<a name="line149">149: </a>!
+<a name="line150">150: </a>      external PEPMONITORALL
+<a name="line151">151: </a>      external PEPMONITORLG
+<a name="line152">152: </a>      external PEPMONITORLGALL
+<a name="line153">153: </a>      external PEPMONITORCONVERGED
+<a name="line154">154: </a>      external PEPMONITORFIRST
+
+<a name="line156">156: </a>!
+<a name="line157">157: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> package in SLEPc
+<a name="line158">158: </a>!
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcpep.h90 b/include/slepc/finclude/slepcpep.h90
index 2635414..b0de88f 100644
--- a/include/slepc/finclude/slepcpep.h90
+++ b/include/slepc/finclude/slepcpep.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcpep.h90.html b/include/slepc/finclude/slepcpep.h90.html
index a43e0b3..b9d54ad 100644
--- a/include/slepc/finclude/slepcpep.h90.html
+++ b/include/slepc/finclude/slepcpep.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcpep.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcpep.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcpep.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcpepdef.h b/include/slepc/finclude/slepcpepdef.h
index ad65144..db96540 100644
--- a/include/slepc/finclude/slepcpepdef.h
+++ b/include/slepc/finclude/slepcpepdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,8 +20,8 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCPEP_H)
-#define __SLEPCPEP_H
+#if !defined(__SLEPCPEPDEF_H)
+#define __SLEPCPEPDEF_H
 
 #include "slepc/finclude/slepcbvdef.h"
 #include "slepc/finclude/slepcstdef.h"
@@ -30,7 +30,7 @@
 #include "slepc/finclude/slepcepsdef.h"
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define PEP                PetscFortranAddr
+#define PEP PetscFortranAddr
 #endif
 
 #define PEPType            character*(80)
@@ -39,8 +39,10 @@
 #define PEPBasis           PetscEnum
 #define PEPScale           PetscEnum
 #define PEPRefine          PetscEnum
+#define PEPRefineScheme    PetscEnum
 #define PEPExtract         PetscEnum
 #define PEPConv            PetscEnum
+#define PEPStop            PetscEnum
 #define PEPErrorType       PetscEnum
 #define PEPConvergedReason PetscEnum
 
diff --git a/include/slepc/finclude/slepcpepdef.h.html b/include/slepc/finclude/slepcpepdef.h.html
index d4ef21e..35d02f7 100644
--- a/include/slepc/finclude/slepcpepdef.h.html
+++ b/include/slepc/finclude/slepcpepdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcpepdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcpepdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcpepdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -40,7 +40,7 @@
 <a name="line30"> 30: </a> #include <A href="../../../include/slepc/finclude/slepcepsdef.h.html">slepc/finclude/slepcepsdef.h</A>
 
 <a name="line32"> 32: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>                PetscFortranAddr</font></strong>
+<a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> PetscFortranAddr</font></strong>
 <a name="line34"> 34: </a><font color="#A020F0">#endif</font>
 
 <a name="line36"> 36: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>            character*(80)</font></strong>
@@ -49,18 +49,20 @@
 <a name="line39"> 39: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>           PetscEnum</font></strong>
 <a name="line40"> 40: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>           PetscEnum</font></strong>
 <a name="line41"> 41: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>          PetscEnum</font></strong>
-<a name="line42"> 42: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>         PetscEnum</font></strong>
-<a name="line43"> 43: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>            PetscEnum</font></strong>
-<a name="line44"> 44: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>       PetscEnum</font></strong>
-<a name="line45"> 45: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> PetscEnum</font></strong>
+<a name="line42"> 42: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>    PetscEnum</font></strong>
+<a name="line43"> 43: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>         PetscEnum</font></strong>
+<a name="line44"> 44: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>            PetscEnum</font></strong>
+<a name="line45"> 45: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>            PetscEnum</font></strong>
+<a name="line46"> 46: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>       PetscEnum</font></strong>
+<a name="line47"> 47: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> PetscEnum</font></strong>
 
-<a name="line47"> 47: </a><strong><font color="#228B22">#define PEPLINEAR    'linear'</font></strong>
-<a name="line48"> 48: </a><strong><font color="#228B22">#define PEPQARNOLDI  'qarnoldi'</font></strong>
-<a name="line49"> 49: </a><strong><font color="#228B22">#define PEPTOAR      'toar'</font></strong>
-<a name="line50"> 50: </a><strong><font color="#228B22">#define PEPSTOAR     'stoar'</font></strong>
-<a name="line51"> 51: </a><strong><font color="#228B22">#define PEPJD        'jd'</font></strong>
+<a name="line49"> 49: </a><strong><font color="#228B22">#define PEPLINEAR    'linear'</font></strong>
+<a name="line50"> 50: </a><strong><font color="#228B22">#define PEPQARNOLDI  'qarnoldi'</font></strong>
+<a name="line51"> 51: </a><strong><font color="#228B22">#define PEPTOAR      'toar'</font></strong>
+<a name="line52"> 52: </a><strong><font color="#228B22">#define PEPSTOAR     'stoar'</font></strong>
+<a name="line53"> 53: </a><strong><font color="#228B22">#define PEPJD        'jd'</font></strong>
 
-<a name="line53"> 53: </a><font color="#A020F0">#endif</font>
+<a name="line55"> 55: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcrg.h b/include/slepc/finclude/slepcrg.h
index 21a5731..232c8d1 100644
--- a/include/slepc/finclude/slepcrg.h
+++ b/include/slepc/finclude/slepcrg.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcrg.h.html b/include/slepc/finclude/slepcrg.h.html
index bc328d3..ecf2938 100644
--- a/include/slepc/finclude/slepcrg.h.html
+++ b/include/slepc/finclude/slepcrg.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcrg.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcrg.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcrg.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
diff --git a/include/slepc/finclude/slepcrg.h90 b/include/slepc/finclude/slepcrg.h90
index 7c777c6..0e55448 100644
--- a/include/slepc/finclude/slepcrg.h90
+++ b/include/slepc/finclude/slepcrg.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcrg.h90.html b/include/slepc/finclude/slepcrg.h90.html
index 252cea3..48c915a 100644
--- a/include/slepc/finclude/slepcrg.h90.html
+++ b/include/slepc/finclude/slepcrg.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcrg.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcrg.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcrg.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcrgdef.h b/include/slepc/finclude/slepcrgdef.h
index 86a8417..09d551c 100644
--- a/include/slepc/finclude/slepcrgdef.h
+++ b/include/slepc/finclude/slepcrgdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,16 +20,15 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCRG_H)
-#define __SLEPCRG_H
+#if !defined(__SLEPCRGDEF_H)
+#define __SLEPCRGDEF_H
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
 #define RG PetscFortranAddr
 #endif
 
-#define RGType             character*(80)
+#define RGType      character*(80)
 
-#define RGNONE      'none'
 #define RGINTERVAL  'interval'
 #define RGPOLYGON   'polygon'
 #define RGELLIPSE   'ellipse'
diff --git a/include/slepc/finclude/slepcrgdef.h.html b/include/slepc/finclude/slepcrgdef.h.html
index a56062f..aacc526 100644
--- a/include/slepc/finclude/slepcrgdef.h.html
+++ b/include/slepc/finclude/slepcrgdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcrgdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcrgdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcrgdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -37,15 +37,14 @@
 <a name="line27"> 27: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> PetscFortranAddr</font></strong>
 <a name="line28"> 28: </a><font color="#A020F0">#endif</font>
 
-<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/RG/RGType.html#RGType">RGType</a>             character*(80)</font></strong>
+<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/RG/RGType.html#RGType">RGType</a>      character*(80)</font></strong>
 
-<a name="line32"> 32: </a><strong><font color="#228B22">#define RGNONE      'none'</font></strong>
-<a name="line33"> 33: </a><strong><font color="#228B22">#define RGINTERVAL  'interval'</font></strong>
-<a name="line34"> 34: </a><strong><font color="#228B22">#define RGPOLYGON   'polygon'</font></strong>
-<a name="line35"> 35: </a><strong><font color="#228B22">#define RGELLIPSE   'ellipse'</font></strong>
-<a name="line36"> 36: </a><strong><font color="#228B22">#define RGRING      'ring'</font></strong>
+<a name="line32"> 32: </a><strong><font color="#228B22">#define RGINTERVAL  'interval'</font></strong>
+<a name="line33"> 33: </a><strong><font color="#228B22">#define RGPOLYGON   'polygon'</font></strong>
+<a name="line34"> 34: </a><strong><font color="#228B22">#define RGELLIPSE   'ellipse'</font></strong>
+<a name="line35"> 35: </a><strong><font color="#228B22">#define RGRING      'ring'</font></strong>
 
-<a name="line38"> 38: </a><font color="#A020F0">#endif</font>
+<a name="line37"> 37: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcst.h b/include/slepc/finclude/slepcst.h
index ea00677..ffcb0bb 100644
--- a/include/slepc/finclude/slepcst.h
+++ b/include/slepc/finclude/slepcst.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcst.h.html b/include/slepc/finclude/slepcst.h.html
index af6477f..142d0ef 100644
--- a/include/slepc/finclude/slepcst.h.html
+++ b/include/slepc/finclude/slepcst.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcst.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:37+00:00">
+<meta name="date" content="2016-05-16T10:34:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcst.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcst.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
diff --git a/include/slepc/finclude/slepcst.h90 b/include/slepc/finclude/slepcst.h90
index 2c92406..7f48a13 100644
--- a/include/slepc/finclude/slepcst.h90
+++ b/include/slepc/finclude/slepcst.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcst.h90.html b/include/slepc/finclude/slepcst.h90.html
index f5ba7c4..a151470 100644
--- a/include/slepc/finclude/slepcst.h90.html
+++ b/include/slepc/finclude/slepcst.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcst.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcst.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcst.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcstdef.h b/include/slepc/finclude/slepcstdef.h
index 5127151..d327162 100644
--- a/include/slepc/finclude/slepcstdef.h
+++ b/include/slepc/finclude/slepcstdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,22 +20,22 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCST_H)
-#define __SLEPCST_H
+#if !defined(__SLEPCSTDEF_H)
+#define __SLEPCSTDEF_H
 
 #include "petsc/finclude/petsckspdef.h"
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define ST        PetscFortranAddr
+#define ST PetscFortranAddr
 #endif
 
-#define STType    character*(80)
-#define STMatMode PetscEnum
+#define STType     character*(80)
+#define STMatMode  PetscEnum
 
-#define STSHELL     'shell'
-#define STSHIFT     'shift'
-#define STSINVERT   'sinvert'
-#define STCAYLEY    'cayley'
-#define STPRECOND   'precond'
+#define STSHELL    'shell'
+#define STSHIFT    'shift'
+#define STSINVERT  'sinvert'
+#define STCAYLEY   'cayley'
+#define STPRECOND  'precond'
 
 #endif
diff --git a/include/slepc/finclude/slepcstdef.h.html b/include/slepc/finclude/slepcstdef.h.html
index d405b36..367b3fa 100644
--- a/include/slepc/finclude/slepcstdef.h.html
+++ b/include/slepc/finclude/slepcstdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcstdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcstdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcstdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -36,17 +36,17 @@
 <a name="line26"> 26: </a><font color="#A020F0">#include </font><font color="#666666">"petsc/finclude/petsckspdef.h"</font><font color="#A020F0"></font>
 
 <a name="line28"> 28: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line29"> 29: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>        PetscFortranAddr</font></strong>
+<a name="line29"> 29: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> PetscFortranAddr</font></strong>
 <a name="line30"> 30: </a><font color="#A020F0">#endif</font>
 
-<a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/STType.html#STType">STType</a>    character*(80)</font></strong>
-<a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/STMatMode.html#STMatMode">STMatMode</a> PetscEnum</font></strong>
+<a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/STType.html#STType">STType</a>     character*(80)</font></strong>
+<a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/STMatMode.html#STMatMode">STMatMode</a>  PetscEnum</font></strong>
 
-<a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>     'shell'</font></strong>
-<a name="line36"> 36: </a><strong><font color="#228B22">#define STSHIFT     'shift'</font></strong>
-<a name="line37"> 37: </a><strong><font color="#228B22">#define STSINVERT   'sinvert'</font></strong>
-<a name="line38"> 38: </a><strong><font color="#228B22">#define STCAYLEY    'cayley'</font></strong>
-<a name="line39"> 39: </a><strong><font color="#228B22">#define STPRECOND   'precond'</font></strong>
+<a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>    'shell'</font></strong>
+<a name="line36"> 36: </a><strong><font color="#228B22">#define STSHIFT    'shift'</font></strong>
+<a name="line37"> 37: </a><strong><font color="#228B22">#define STSINVERT  'sinvert'</font></strong>
+<a name="line38"> 38: </a><strong><font color="#228B22">#define STCAYLEY   'cayley'</font></strong>
+<a name="line39"> 39: </a><strong><font color="#228B22">#define STPRECOND  'precond'</font></strong>
 
 <a name="line41"> 41: </a><font color="#A020F0">#endif</font>
 </pre>
diff --git a/include/slepc/finclude/slepcsvd.h b/include/slepc/finclude/slepcsvd.h
index 5d4d1c8..0cb66ef 100644
--- a/include/slepc/finclude/slepcsvd.h
+++ b/include/slepc/finclude/slepcsvd.h
@@ -4,7 +4,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -23,17 +23,16 @@
 !
 #include "slepc/finclude/slepcsvddef.h"
 
-!  Convergence flags.
-!  They sould match the flags in $SLEPC_DIR/include/slepcsvd.h
-
       PetscEnum SVD_CONVERGED_TOL
+      PetscEnum SVD_CONVERGED_USER
       PetscEnum SVD_DIVERGED_ITS
       PetscEnum SVD_DIVERGED_BREAKDOWN
       PetscEnum SVD_CONVERGED_ITERATING
 
-      parameter (SVD_CONVERGED_TOL          =  2)
-      parameter (SVD_DIVERGED_ITS           = -3)
-      parameter (SVD_DIVERGED_BREAKDOWN     = -4)
+      parameter (SVD_CONVERGED_TOL          =  1)
+      parameter (SVD_CONVERGED_USER         =  2)
+      parameter (SVD_DIVERGED_ITS           = -1)
+      parameter (SVD_DIVERGED_BREAKDOWN     = -2)
       parameter (SVD_CONVERGED_ITERATING    =  0)
 
       integer SVD_LARGEST
@@ -48,6 +47,20 @@
       parameter (SVD_ERROR_ABSOLUTE         =  0)
       parameter (SVD_ERROR_RELATIVE         =  1)
 
+      PetscEnum SVD_CONV_ABS
+      PetscEnum SVD_CONV_REL
+      PetscEnum SVD_CONV_USER
+
+      parameter (SVD_CONV_ABS               =  0)
+      parameter (SVD_CONV_REL               =  1)
+      parameter (SVD_CONV_USER              =  2)
+
+      PetscEnum SVD_STOP_BASIC
+      PetscEnum SVD_STOP_USER
+
+      parameter (SVD_STOP_BASIC             =  0)
+      parameter (SVD_STOP_USER              =  1)
+
 !
 !   Possible arguments to SVDMonitorSet()
 !
diff --git a/include/slepc/finclude/slepcsvd.h.html b/include/slepc/finclude/slepcsvd.h.html
index 3831bf4..d572cc1 100644
--- a/include/slepc/finclude/slepcsvd.h.html
+++ b/include/slepc/finclude/slepcsvd.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcsvd.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:37+00:00">
+<meta name="date" content="2016-05-16T10:34:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcsvd.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcsvd.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line6">  6: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line7">  7: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line7">  7: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line8">  8: </a>!
 <a name="line9">  9: </a>!  This file is part of SLEPc.
 <a name="line10"> 10: </a>!
@@ -35,43 +35,56 @@
 <a name="line23"> 23: </a>!
 <a name="line24"> 24: </a> #include <A href="../../../include/slepc/finclude/slepcsvddef.h.html">slepc/finclude/slepcsvddef.h</A>
 
-<a name="line26"> 26: </a>!  Convergence flags.
-<a name="line27"> 27: </a>!  They sould match the flags in $SLEPC_DIR/include/slepcsvd.h
+<a name="line26"> 26: </a>      PetscEnum SVD_CONVERGED_TOL
+<a name="line27"> 27: </a>      PetscEnum SVD_CONVERGED_USER
+<a name="line28"> 28: </a>      PetscEnum SVD_DIVERGED_ITS
+<a name="line29"> 29: </a>      PetscEnum SVD_DIVERGED_BREAKDOWN
+<a name="line30"> 30: </a>      PetscEnum SVD_CONVERGED_ITERATING
 
-<a name="line29"> 29: </a>      PetscEnum SVD_CONVERGED_TOL
-<a name="line30"> 30: </a>      PetscEnum SVD_DIVERGED_ITS
-<a name="line31"> 31: </a>      PetscEnum SVD_DIVERGED_BREAKDOWN
-<a name="line32"> 32: </a>      PetscEnum SVD_CONVERGED_ITERATING
+<a name="line32"> 32: </a>      parameter (SVD_CONVERGED_TOL          =  1)
+<a name="line33"> 33: </a>      parameter (SVD_CONVERGED_USER         =  2)
+<a name="line34"> 34: </a>      parameter (SVD_DIVERGED_ITS           = -1)
+<a name="line35"> 35: </a>      parameter (SVD_DIVERGED_BREAKDOWN     = -2)
+<a name="line36"> 36: </a>      parameter (SVD_CONVERGED_ITERATING    =  0)
 
-<a name="line34"> 34: </a>      parameter (SVD_CONVERGED_TOL          =  2)
-<a name="line35"> 35: </a>      parameter (SVD_DIVERGED_ITS           = -3)
-<a name="line36"> 36: </a>      parameter (SVD_DIVERGED_BREAKDOWN     = -4)
-<a name="line37"> 37: </a>      parameter (SVD_CONVERGED_ITERATING    =  0)
+<a name="line38"> 38: </a>      integer SVD_LARGEST
+<a name="line39"> 39: </a>      integer SVD_SMALLEST
 
-<a name="line39"> 39: </a>      integer SVD_LARGEST
-<a name="line40"> 40: </a>      integer SVD_SMALLEST
+<a name="line41"> 41: </a>      parameter (SVD_LARGEST                =  0)
+<a name="line42"> 42: </a>      parameter (SVD_SMALLEST               =  1)
 
-<a name="line42"> 42: </a>      parameter (SVD_LARGEST                =  0)
-<a name="line43"> 43: </a>      parameter (SVD_SMALLEST               =  1)
+<a name="line44"> 44: </a>      PetscEnum SVD_ERROR_ABSOLUTE
+<a name="line45"> 45: </a>      PetscEnum SVD_ERROR_RELATIVE
 
-<a name="line45"> 45: </a>      PetscEnum SVD_ERROR_ABSOLUTE
-<a name="line46"> 46: </a>      PetscEnum SVD_ERROR_RELATIVE
+<a name="line47"> 47: </a>      parameter (SVD_ERROR_ABSOLUTE         =  0)
+<a name="line48"> 48: </a>      parameter (SVD_ERROR_RELATIVE         =  1)
 
-<a name="line48"> 48: </a>      parameter (SVD_ERROR_ABSOLUTE         =  0)
-<a name="line49"> 49: </a>      parameter (SVD_ERROR_RELATIVE         =  1)
+<a name="line50"> 50: </a>      PetscEnum SVD_CONV_ABS
+<a name="line51"> 51: </a>      PetscEnum SVD_CONV_REL
+<a name="line52"> 52: </a>      PetscEnum SVD_CONV_USER
 
-<a name="line51"> 51: </a>!
-<a name="line52"> 52: </a>!   Possible arguments to <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>()
-<a name="line53"> 53: </a>!
-<a name="line54"> 54: </a>      external SVDMONITORALL
-<a name="line55"> 55: </a>      external SVDMONITORLG
-<a name="line56"> 56: </a>      external SVDMONITORLGALL
-<a name="line57"> 57: </a>      external SVDMONITORCONVERGED
-<a name="line58"> 58: </a>      external SVDMONITORFIRST
+<a name="line54"> 54: </a>      parameter (SVD_CONV_ABS               =  0)
+<a name="line55"> 55: </a>      parameter (SVD_CONV_REL               =  1)
+<a name="line56"> 56: </a>      parameter (SVD_CONV_USER              =  2)
 
-<a name="line60"> 60: </a>!
-<a name="line61"> 61: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> package in SLEPc
-<a name="line62"> 62: </a>!
+<a name="line58"> 58: </a>      PetscEnum SVD_STOP_BASIC
+<a name="line59"> 59: </a>      PetscEnum SVD_STOP_USER
+
+<a name="line61"> 61: </a>      parameter (SVD_STOP_BASIC             =  0)
+<a name="line62"> 62: </a>      parameter (SVD_STOP_USER              =  1)
+
+<a name="line64"> 64: </a>!
+<a name="line65"> 65: </a>!   Possible arguments to <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>()
+<a name="line66"> 66: </a>!
+<a name="line67"> 67: </a>      external SVDMONITORALL
+<a name="line68"> 68: </a>      external SVDMONITORLG
+<a name="line69"> 69: </a>      external SVDMONITORLGALL
+<a name="line70"> 70: </a>      external SVDMONITORCONVERGED
+<a name="line71"> 71: </a>      external SVDMONITORFIRST
+
+<a name="line73"> 73: </a>!
+<a name="line74"> 74: </a>!  End of Fortran include file <font color="#4169E1">for</font> the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> package in SLEPc
+<a name="line75"> 75: </a>!
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcsvd.h90 b/include/slepc/finclude/slepcsvd.h90
index b3c7612..97879df 100644
--- a/include/slepc/finclude/slepcsvd.h90
+++ b/include/slepc/finclude/slepcsvd.h90
@@ -1,7 +1,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
diff --git a/include/slepc/finclude/slepcsvd.h90.html b/include/slepc/finclude/slepcsvd.h90.html
index 22973fd..9eea5e5 100644
--- a/include/slepc/finclude/slepcsvd.h90.html
+++ b/include/slepc/finclude/slepcsvd.h90.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcsvd.h90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:39+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcsvd.h90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcsvd.h90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line3">  3: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line4">  4: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line5">  5: </a>!
 <a name="line6">  6: </a>!  This file is part of SLEPc.
 <a name="line7">  7: </a>!
diff --git a/include/slepc/finclude/slepcsvddef.h b/include/slepc/finclude/slepcsvddef.h
index 5ed19f0..32b8dfe 100644
--- a/include/slepc/finclude/slepcsvddef.h
+++ b/include/slepc/finclude/slepcsvddef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -20,21 +20,23 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-#if !defined(__SLEPCSVD_H)
-#define __SLEPCSVD_H
+#if !defined(__SLEPCSVDDEF_H)
+#define __SLEPCSVDDEF_H
 
 #include "slepc/finclude/slepcbvdef.h"
 #include "slepc/finclude/slepcdsdef.h"
 #include "slepc/finclude/slepcepsdef.h"
 
 #if !defined(PETSC_USE_FORTRAN_DATATYPES)
-#define SVD                PetscFortranAddr
+#define SVD PetscFortranAddr
 #endif
 
 #define SVDType            character*(80)
 #define SVDConvergedReason PetscEnum
 #define SVDErrorType       PetscEnum
 #define SVDWhich           PetscEnum
+#define SVDConv            PetscEnum
+#define SVDStop            PetscEnum
 
 #define SVDCROSS     'cross'
 #define SVDCYCLIC    'cyclic'
diff --git a/include/slepc/finclude/slepcsvddef.h.html b/include/slepc/finclude/slepcsvddef.h.html
index 372c6c3..db565e7 100644
--- a/include/slepc/finclude/slepcsvddef.h.html
+++ b/include/slepc/finclude/slepcsvddef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcsvddef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcsvddef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcsvddef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Include file <font color="#4169E1">for</font> Fortran use of the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> object in SLEPc
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -38,21 +38,23 @@
 <a name="line28"> 28: </a> #include <A href="../../../include/slepc/finclude/slepcepsdef.h.html">slepc/finclude/slepcepsdef.h</A>
 
 <a name="line30"> 30: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
-<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>                PetscFortranAddr</font></strong>
+<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> PetscFortranAddr</font></strong>
 <a name="line32"> 32: </a><font color="#A020F0">#endif</font>
 
 <a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a>            character*(80)</font></strong>
 <a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> PetscEnum</font></strong>
 <a name="line36"> 36: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>       PetscEnum</font></strong>
 <a name="line37"> 37: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>           PetscEnum</font></strong>
+<a name="line38"> 38: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a>            PetscEnum</font></strong>
+<a name="line39"> 39: </a><strong><font color="#228B22">#define <a href="../../../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a>            PetscEnum</font></strong>
 
-<a name="line39"> 39: </a><strong><font color="#228B22">#define SVDCROSS     'cross'</font></strong>
-<a name="line40"> 40: </a><strong><font color="#228B22">#define SVDCYCLIC    'cyclic'</font></strong>
-<a name="line41"> 41: </a><strong><font color="#228B22">#define SVDLAPACK    'lapack'</font></strong>
-<a name="line42"> 42: </a><strong><font color="#228B22">#define SVDLANCZOS   'lanczos'</font></strong>
-<a name="line43"> 43: </a><strong><font color="#228B22">#define SVDTRLANCZOS 'trlanczos'</font></strong>
+<a name="line41"> 41: </a><strong><font color="#228B22">#define SVDCROSS     'cross'</font></strong>
+<a name="line42"> 42: </a><strong><font color="#228B22">#define SVDCYCLIC    'cyclic'</font></strong>
+<a name="line43"> 43: </a><strong><font color="#228B22">#define SVDLAPACK    'lapack'</font></strong>
+<a name="line44"> 44: </a><strong><font color="#228B22">#define SVDLANCZOS   'lanczos'</font></strong>
+<a name="line45"> 45: </a><strong><font color="#228B22">#define SVDTRLANCZOS 'trlanczos'</font></strong>
 
-<a name="line45"> 45: </a><font color="#A020F0">#endif</font>
+<a name="line47"> 47: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/finclude/slepcsys.h b/include/slepc/finclude/slepcsys.h
index de71f92..1dbad07 100644
--- a/include/slepc/finclude/slepcsys.h
+++ b/include/slepc/finclude/slepcsys.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -26,6 +26,10 @@
 #include "slepcversion.h"
 #include "slepc/finclude/slepcsysdef.h"
 
+#if !defined(PETSC_USE_FORTRAN_DATATYPES)
+      external SlepcConvMonitorDestroy
+#endif
+
 ! Default tolerance for the different solvers, depending on the precision
 
       PetscReal SLEPC_DEFAULT_TOL
diff --git a/include/slepc/finclude/slepcsys.h.html b/include/slepc/finclude/slepcsys.h.html
index 41e24dc..73cb7a7 100644
--- a/include/slepc/finclude/slepcsys.h.html
+++ b/include/slepc/finclude/slepcsys.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcsys.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:38+00:00">
+<meta name="date" content="2016-05-16T10:34:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcsys.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcsys.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Basic include file <font color="#4169E1">for</font> Fortran use of the SLEPc package
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -38,18 +38,22 @@
 <a name="line26"> 26: </a> #include <A href="../../../include/slepcversion.h.html">slepcversion.h</A>
 <a name="line27"> 27: </a> #include <A href="../../../include/slepc/finclude/slepcsysdef.h.html">slepc/finclude/slepcsysdef.h</A>
 
-<a name="line29"> 29: </a>! Default tolerance <font color="#4169E1">for</font> the different solvers, depending on the precision
-
-<a name="line31"> 31: </a>      PetscReal SLEPC_DEFAULT_TOL
-<a name="line32"> 32: </a><font color="#A020F0">#if defined(PETSC_USE_REAL_SINGLE)</font>
-<a name="line33"> 33: </a>      parameter(SLEPC_DEFAULT_TOL     =  1e-6)
-<a name="line34"> 34: </a><font color="#A020F0">#elif defined(PETSC_USE_REAL_DOUBLE)</font>
-<a name="line35"> 35: </a>      parameter(SLEPC_DEFAULT_TOL     =  1e-8)
-<a name="line36"> 36: </a><font color="#A020F0">#elif defined(PETSC_USE_REAL___FLOAT128)</font>
-<a name="line37"> 37: </a>      parameter(SLEPC_DEFAULT_TOL     = 1e-16)
-<a name="line38"> 38: </a><font color="#A020F0">#else</font>
-<a name="line39"> 39: </a>      parameter(SLEPC_DEFAULT_TOL     =  1e-7)
-<a name="line40"> 40: </a><font color="#A020F0">#endif</font>
+<a name="line29"> 29: </a><font color="#A020F0">#if !defined(PETSC_USE_FORTRAN_DATATYPES)</font>
+<a name="line30"> 30: </a>      external <a href="../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>
+<a name="line31"> 31: </a><font color="#A020F0">#endif</font>
+
+<a name="line33"> 33: </a>! Default tolerance <font color="#4169E1">for</font> the different solvers, depending on the precision
+
+<a name="line35"> 35: </a>      PetscReal SLEPC_DEFAULT_TOL
+<a name="line36"> 36: </a><font color="#A020F0">#if defined(PETSC_USE_REAL_SINGLE)</font>
+<a name="line37"> 37: </a>      parameter(SLEPC_DEFAULT_TOL     =  1e-6)
+<a name="line38"> 38: </a><font color="#A020F0">#elif defined(PETSC_USE_REAL_DOUBLE)</font>
+<a name="line39"> 39: </a>      parameter(SLEPC_DEFAULT_TOL     =  1e-8)
+<a name="line40"> 40: </a><font color="#A020F0">#elif defined(PETSC_USE_REAL___FLOAT128)</font>
+<a name="line41"> 41: </a>      parameter(SLEPC_DEFAULT_TOL     = 1e-16)
+<a name="line42"> 42: </a><font color="#A020F0">#else</font>
+<a name="line43"> 43: </a>      parameter(SLEPC_DEFAULT_TOL     =  1e-7)
+<a name="line44"> 44: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepc/finclude/slepcsysdef.h b/include/slepc/finclude/slepcsysdef.h
index fc74b57..b801ee0 100644
--- a/include/slepc/finclude/slepcsysdef.h
+++ b/include/slepc/finclude/slepcsysdef.h
@@ -3,7 +3,7 @@
 !
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !
@@ -21,8 +21,10 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
 
-#if !defined(__SLEPCSYS_H)
-#define __SLEPCSYS_H
+#if !defined(__SLEPCSYSDEF_H)
+#define __SLEPCSYSDEF_H
+
+#define SlepcConvMonitor PetscFortranAddr
 
 #endif
 
diff --git a/include/slepc/finclude/slepcsysdef.h.html b/include/slepc/finclude/slepcsysdef.h.html
index 3230dd4..234eb9a 100644
--- a/include/slepc/finclude/slepcsysdef.h.html
+++ b/include/slepc/finclude/slepcsysdef.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/finclude/slepcsysdef.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:40+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/finclude/slepcsysdef.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/finclude/slepcsysdef.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!
 <a name="line2">  2: </a>!  Basic include file <font color="#4169E1">for</font> Fortran use of the SLEPc package
 <a name="line3">  3: </a>!
 <a name="line4">  4: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line5">  5: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line6">  6: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line6">  6: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line7">  7: </a>!
 <a name="line8">  8: </a>!  This file is part of SLEPc.
 <a name="line9">  9: </a>!
@@ -34,7 +34,9 @@
 <a name="line22"> 22: </a>!
 
 
-<a name="line27"> 27: </a><font color="#A020F0">#endif</font>
+<a name="line27"> 27: </a><strong><font color="#228B22">#define SlepcConvMonitor PetscFortranAddr</font></strong>
+
+<a name="line29"> 29: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepc/private/bvimpl.h b/include/slepc/private/bvimpl.h
index c2c1d7e..544ede7 100644
--- a/include/slepc/private/bvimpl.h
+++ b/include/slepc/private/bvimpl.h
@@ -28,7 +28,7 @@
 PETSC_EXTERN PetscBool BVRegisterAllCalled;
 PETSC_EXTERN PetscErrorCode BVRegisterAll(void);
 
-PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;
+PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;
 
 typedef struct _BVOps *BVOps;
 
@@ -37,7 +37,6 @@ struct _BVOps {
   PetscErrorCode (*multvec)(BV,PetscScalar,PetscScalar,Vec,PetscScalar*);
   PetscErrorCode (*multinplace)(BV,Mat,PetscInt,PetscInt);
   PetscErrorCode (*multinplacetrans)(BV,Mat,PetscInt,PetscInt);
-  PetscErrorCode (*axpy)(BV,PetscScalar,BV);
   PetscErrorCode (*dot)(BV,BV,Mat);
   PetscErrorCode (*dotvec)(BV,Vec,PetscScalar*);
   PetscErrorCode (*dotvec_local)(BV,Vec,PetscScalar*);
@@ -56,8 +55,11 @@ struct _BVOps {
   PetscErrorCode (*restorecolumn)(BV,PetscInt,Vec*);
   PetscErrorCode (*getarray)(BV,PetscScalar**);
   PetscErrorCode (*restorearray)(BV,PetscScalar**);
+  PetscErrorCode (*getarrayread)(BV,const PetscScalar**);
+  PetscErrorCode (*restorearrayread)(BV,const PetscScalar**);
+  PetscErrorCode (*duplicate)(BV,BV*);
   PetscErrorCode (*create)(BV);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,BV);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,BV);
   PetscErrorCode (*view)(BV,PetscViewer);
   PetscErrorCode (*destroy)(BV);
 };
@@ -94,6 +96,8 @@ struct _p_BV {
   PetscBool          defersfo;     /* deferred call to setfromoptions */
   BV                 cached;       /* cached BV to store result of matrix times BV */
   PetscObjectState   bvstate;      /* state of BV when BVApplyMatrixBV() was called */
+  PetscRandom        rand;         /* random number generator */
+  PetscBool          rrandom;      /* reproducible random vectors */
   PetscScalar        *work;
   PetscInt           lwork;
   void               *data;
@@ -290,7 +294,7 @@ PETSC_INTERN PetscErrorCode BVMult_BLAS_Private(BV,PetscInt,PetscInt,PetscInt,Pe
 PETSC_INTERN PetscErrorCode BVMultVec_BLAS_Private(BV,PetscInt,PetscInt,PetscScalar,const PetscScalar*,const PetscScalar*,PetscScalar,PetscScalar*);
 PETSC_INTERN PetscErrorCode BVMultInPlace_BLAS_Private(BV,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscScalar*,const PetscScalar*,PetscBool);
 PETSC_INTERN PetscErrorCode BVMultInPlace_Vecs_Private(BV,PetscInt,PetscInt,PetscInt,Vec*,const PetscScalar*,PetscBool);
-PETSC_INTERN PetscErrorCode BVAXPY_BLAS_Private(BV,PetscInt,PetscInt,PetscScalar,const PetscScalar*,PetscScalar*);
+PETSC_INTERN PetscErrorCode BVAXPY_BLAS_Private(BV,PetscInt,PetscInt,PetscScalar,const PetscScalar*,PetscScalar,PetscScalar*);
 PETSC_INTERN PetscErrorCode BVDot_BLAS_Private(BV,PetscInt,PetscInt,PetscInt,PetscInt,const PetscScalar*,const PetscScalar*,PetscScalar*,PetscBool);
 PETSC_INTERN PetscErrorCode BVDotVec_BLAS_Private(BV,PetscInt,PetscInt,const PetscScalar*,const PetscScalar*,PetscScalar*,PetscBool);
 PETSC_INTERN PetscErrorCode BVScale_BLAS_Private(BV,PetscInt,PetscScalar*,PetscScalar);
diff --git a/include/slepc/private/bvimpl.h.html b/include/slepc/private/bvimpl.h.html
index 2db044b..6084548 100644
--- a/include/slepc/private/bvimpl.h.html
+++ b/include/slepc/private/bvimpl.h.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/bvimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:43+00:00">
+<meta name="date" content="2016-05-16T10:34:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/bvimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/bvimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
@@ -40,7 +40,7 @@
 <a name="line28"> 28: </a>PETSC_EXTERN PetscBool BVRegisterAllCalled;
 <a name="line29"> 29: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>(void)</font></strong>;
 
-<a name="line31"> 31: </a>PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_Dot,BV_Orthogonalize,BV_Scale,BV_Norm,BV_SetRandom,BV_MatMult,BV_MatProject,BV_AXPY;
+<a name="line31"> 31: </a>PETSC_EXTERN PetscLogEvent BV_Create,BV_Copy,BV_Mult,BV_MultVec,BV_MultInPlace,BV_Dot,BV_DotVec,BV_Orthogonalize,BV_OrthogonalizeVec,BV_Scale,BV_Norm,BV_NormVec,BV_SetRandom,BV_MatMult,BV_MatMultVec,BV_MatProject;
 
 <a name="line33"> 33: </a><font color="#4169E1">typedef struct _BVOps *BVOps;</font>
 
@@ -49,239 +49,243 @@
 <a name="line37"> 37: </a>  PetscErrorCode (*multvec)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,Vec,PetscScalar*);
 <a name="line38"> 38: </a>  PetscErrorCode (*multinplace)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt);
 <a name="line39"> 39: </a>  PetscErrorCode (*multinplacetrans)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt);
-<a name="line40"> 40: </a>  PetscErrorCode (*axpy)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
-<a name="line41"> 41: </a>  PetscErrorCode (*dot)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat);
-<a name="line42"> 42: </a>  PetscErrorCode (*dotvec)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
-<a name="line43"> 43: </a>  PetscErrorCode (*dotvec_local)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
-<a name="line44"> 44: </a>  PetscErrorCode (*dotvec_begin)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
-<a name="line45"> 45: </a>  PetscErrorCode (*dotvec_end)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
-<a name="line46"> 46: </a>  PetscErrorCode (*scale)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar);
-<a name="line47"> 47: </a>  PetscErrorCode (*norm)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
-<a name="line48"> 48: </a>  PetscErrorCode (*norm_local)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
-<a name="line49"> 49: </a>  PetscErrorCode (*norm_begin)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
-<a name="line50"> 50: </a>  PetscErrorCode (*norm_end)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
-<a name="line51"> 51: </a>  PetscErrorCode (*orthogonalize)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat);
-<a name="line52"> 52: </a>  PetscErrorCode (*matmult)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
-<a name="line53"> 53: </a>  PetscErrorCode (*copy)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
-<a name="line54"> 54: </a>  PetscErrorCode (*resize)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscBool);
-<a name="line55"> 55: </a>  PetscErrorCode (*getcolumn)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*);
-<a name="line56"> 56: </a>  PetscErrorCode (*restorecolumn)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*);
-<a name="line57"> 57: </a>  PetscErrorCode (*getarray)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**);
-<a name="line58"> 58: </a>  PetscErrorCode (*restorearray)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**);
-<a name="line59"> 59: </a>  PetscErrorCode (*create)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
-<a name="line60"> 60: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
-<a name="line61"> 61: </a>  PetscErrorCode (*view)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscViewer);
-<a name="line62"> 62: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
-<a name="line63"> 63: </a>};
-
-<a name="line65"> 65: </a><font color="#4169E1"><a name="_p_BV"></a>struct _p_BV </font>{
-<a name="line66"> 66: </a>  PETSCHEADER(<font color="#4169E1">struct _BVOps</font>);
-<a name="line67"> 67: </a>  <font color="#B22222">/*------------------------- User parameters --------------------------*/</font>
-<a name="line68"> 68: </a>  Vec                t;            <font color="#B22222">/* template vector */</font>
-<a name="line69"> 69: </a>  PetscInt           n,N;          <font color="#B22222">/* dimensions of vectors (local, global) */</font>
-<a name="line70"> 70: </a>  PetscInt           m;            <font color="#B22222">/* number of vectors */</font>
-<a name="line71"> 71: </a>  PetscInt           l;            <font color="#B22222">/* number of leading columns */</font>
-<a name="line72"> 72: </a>  PetscInt           k;            <font color="#B22222">/* number of active columns */</font>
-<a name="line73"> 73: </a>  PetscInt           nc;           <font color="#B22222">/* number of constraints */</font>
-<a name="line74"> 74: </a>  <a href="../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       orthog_type;  <font color="#B22222">/* the method of vector orthogonalization */</font>
-<a name="line75"> 75: </a>  <a href="../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> orthog_ref;   <font color="#B22222">/* refinement method */</font>
-<a name="line76"> 76: </a>  PetscReal          orthog_eta;   <font color="#B22222">/* refinement threshold */</font>
-<a name="line77"> 77: </a>  <a href="../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  orthog_block; <font color="#B22222">/* the method of block orthogonalization */</font>
-<a name="line78"> 78: </a>  Mat                matrix;       <font color="#B22222">/* inner product matrix */</font>
-<a name="line79"> 79: </a>  PetscBool          indef;        <font color="#B22222">/* matrix is indefinite */</font>
-<a name="line80"> 80: </a>  <a href="../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>      vmm;          <font color="#B22222">/* version of matmult operation */</font>
-
-<a name="line82"> 82: </a>  <font color="#B22222">/*---------------------- Cached data and workspace -------------------*/</font>
-<a name="line83"> 83: </a>  Vec                Bx;           <font color="#B22222">/* result of matrix times a vector x */</font>
-<a name="line84"> 84: </a>  PetscObjectId      xid;          <font color="#B22222">/* object id of vector x */</font>
-<a name="line85"> 85: </a>  PetscObjectState   xstate;       <font color="#B22222">/* state of vector x */</font>
-<a name="line86"> 86: </a>  Vec                cv[2];        <font color="#B22222">/* column vectors obtained with <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>() */</font>
-<a name="line87"> 87: </a>  PetscInt           ci[2];        <font color="#B22222">/* column indices of obtained vectors */</font>
-<a name="line88"> 88: </a>  PetscObjectState   st[2];        <font color="#B22222">/* state of obtained vectors */</font>
-<a name="line89"> 89: </a>  PetscObjectId      id[2];        <font color="#B22222">/* object id of obtained vectors */</font>
-<a name="line90"> 90: </a>  PetscScalar        *h,*c;        <font color="#B22222">/* orthogonalization coefficients */</font>
-<a name="line91"> 91: </a>  PetscReal          *omega;       <font color="#B22222">/* signature matrix values for indefinite case */</font>
-<a name="line92"> 92: </a>  Mat                B,C;          <font color="#B22222">/* auxiliary dense matrices for matmult operation */</font>
-<a name="line93"> 93: </a>  PetscObjectId      Aid;          <font color="#B22222">/* object id of matrix A of matmult operation */</font>
-<a name="line94"> 94: </a>  PetscBool          defersfo;     <font color="#B22222">/* deferred call to setfromoptions */</font>
-<a name="line95"> 95: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>                 cached;       <font color="#B22222">/* cached <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> to store result of matrix times <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> */</font>
-<a name="line96"> 96: </a>  PetscObjectState   bvstate;      <font color="#B22222">/* state of <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> when <a href="../../../docs/manualpages/BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</a>() was called */</font>
-<a name="line97"> 97: </a>  PetscScalar        *work;
-<a name="line98"> 98: </a>  PetscInt           lwork;
-<a name="line99"> 99: </a>  void               *data;
-<a name="line100">100: </a>};
-
-<a name="line104">104: </a><font color="#B22222">/*</font>
-<a name="line105">105: </a><font color="#B22222">  BV_SafeSqrt - Computes the square root of a scalar value alpha, which is</font>
-<a name="line106">106: </a><font color="#B22222">  assumed to be z'*B*z. The result is</font>
-<a name="line107">107: </a><font color="#B22222">    if definite inner product:     res = sqrt(alpha)</font>
-<a name="line108">108: </a><font color="#B22222">    if indefinite inner product:   res = sgn(alpha)*sqrt(abs(alpha))</font>
-<a name="line109">109: </a><font color="#B22222">*/</font>
-<a name="line110">110: </a><strong><font color="#4169E1"><a name="BV_SafeSqrt"></a>PETSC_STATIC_INLINE PetscErrorCode BV_SafeSqrt(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar alpha,PetscReal *res)</font></strong>
-<a name="line111">111: </a>{
-<a name="line113">113: </a>  PetscReal      absal,realp;
-
-<a name="line116">116: </a>  absal = PetscAbsScalar(alpha);
-<a name="line117">117: </a>  realp = PetscRealPart(alpha);
-<a name="line118">118: </a>  <font color="#4169E1">if</font> (absal<PETSC_MACHINE_EPSILON) {
-<a name="line119">119: </a>    PetscInfo(bv,<font color="#666666">"Zero norm, either the vector is zero or a semi-inner product is being used\n"</font>);
-<a name="line120">120: </a>  }
-<a name="line121">121: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line122">122: </a>  <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(alpha))/absal>PETSC_MACHINE_EPSILON) SETERRQ(PetscObjectComm((PetscObject)bv),1,<font color="#666666">"The inner product is not well defined: nonzero imaginary part"</font>);
-<a name="line123">123: </a><font color="#A020F0">#endif</font>
-<a name="line124">124: </a>  <font color="#4169E1">if</font> (bv->indef) {
-<a name="line125">125: </a>    *res = (realp<0.0)? -PetscSqrtReal(-realp): PetscSqrtReal(realp);
-<a name="line126">126: </a>  } <font color="#4169E1">else</font> { 
-<a name="line127">127: </a>    <font color="#4169E1">if</font> (realp<0.0) SETERRQ(PetscObjectComm((PetscObject)bv),1,<font color="#666666">"The inner product is not well defined: indefinite matrix"</font>);
-<a name="line128">128: </a>    *res = PetscSqrtReal(realp);
-<a name="line129">129: </a>  }
-<a name="line130">130: </a>  <font color="#4169E1">return</font>(0);
-<a name="line131">131: </a>}
-
-<a name="line135">135: </a><font color="#B22222">/*</font>
-<a name="line136">136: </a><font color="#B22222">  BV_IPMatMult - Multiply a vector x by the inner-product matrix, cache the</font>
-<a name="line137">137: </a><font color="#B22222">  result in Bx.</font>
-<a name="line138">138: </a><font color="#B22222">*/</font>
-<a name="line139">139: </a><strong><font color="#4169E1"><a name="BV_IPMatMult"></a>PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMult(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec x)</font></strong>
-<a name="line140">140: </a>{
-
-<a name="line144">144: </a>  <font color="#4169E1">if</font> (((PetscObject)x)->id != bv->xid || ((PetscObject)x)->state != bv->xstate) {
-<a name="line145">145: </a>    MatMult(bv->matrix,x,bv->Bx);
-<a name="line146">146: </a>    bv->xid = ((PetscObject)x)->id;
-<a name="line147">147: </a>    bv->xstate = ((PetscObject)x)->state;
-<a name="line148">148: </a>  }
-<a name="line149">149: </a>  <font color="#4169E1">return</font>(0);
-<a name="line150">150: </a>}
-
-<a name="line154">154: </a><font color="#B22222">/*</font>
-<a name="line155">155: </a><font color="#B22222">  BV_AllocateCachedBV - Allocate auxiliary <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> required for <a href="../../../docs/manualpages/BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</a> if not available.</font>
-<a name="line156">156: </a><font color="#B22222">*/</font>
-<a name="line157">157: </a><strong><font color="#4169E1"><a name="BV_AllocateCachedBV"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCachedBV(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
-<a name="line158">158: </a>{
-
-<a name="line162">162: </a>  <font color="#4169E1">if</font> (!V->cached) {
-<a name="line163">163: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)V),&V->cached);
-<a name="line164">164: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(V->cached,V->t,V->m);
-<a name="line165">165: </a>    <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(V->cached,((PetscObject)V)->type_name);
-<a name="line166">166: </a>    <a href="../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(V->cached,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);
-<a name="line167">167: </a>  }
-<a name="line168">168: </a>  <font color="#4169E1">return</font>(0);
-<a name="line169">169: </a>}
-
-<a name="line173">173: </a><font color="#B22222">/*</font>
-<a name="line174">174: </a><font color="#B22222">  BV_IPMatMultBV - Multiply <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> by the inner-product matrix, cache the</font>
-<a name="line175">175: </a><font color="#B22222">  result internally in bv->cached.</font>
-<a name="line176">176: </a><font color="#B22222">*/</font>
-<a name="line177">177: </a><strong><font color="#4169E1"><a name="BV_IPMatMultBV"></a>PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMultBV(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line178">178: </a>{
-
-<a name="line182">182: </a>  BV_AllocateCachedBV(bv);
-<a name="line183">183: </a>  <a href="../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(bv->cached,bv->l,bv->k);
-<a name="line184">184: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->state != bv->bvstate) {
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (bv->matrix) {
-<a name="line186">186: </a>      <a href="../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(bv,bv->matrix,bv->cached);
-<a name="line187">187: </a>    } <font color="#4169E1">else</font> {
-<a name="line188">188: </a>      <a href="../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(bv,bv->cached);
-<a name="line189">189: </a>    }
-<a name="line190">190: </a>    bv->bvstate = ((PetscObject)bv)->state;
-<a name="line191">191: </a>  }
-<a name="line192">192: </a>  <font color="#4169E1">return</font>(0);
-<a name="line193">193: </a>}
-
-<a name="line197">197: </a><font color="#B22222">/*</font>
-<a name="line198">198: </a><font color="#B22222">  BV_AllocateCoeffs - Allocate orthogonalization coefficients if not done already.</font>
-<a name="line199">199: </a><font color="#B22222">*/</font>
-<a name="line200">200: </a><strong><font color="#4169E1"><a name="BV_AllocateCoeffs"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCoeffs(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line201">201: </a>{
-
-<a name="line205">205: </a>  <font color="#4169E1">if</font> (!bv->h) {
-<a name="line206">206: </a>    PetscMalloc2(bv->nc+bv->m,&bv->h,bv->nc+bv->m,&bv->c);
-<a name="line207">207: </a>    PetscLogObjectMemory((PetscObject)bv,2*bv->m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line208">208: </a>  }
-<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
-<a name="line210">210: </a>}
-
-<a name="line214">214: </a><font color="#B22222">/*</font>
-<a name="line215">215: </a><font color="#B22222">  BV_AllocateSignature - Allocate signature coefficients if not done already.</font>
-<a name="line216">216: </a><font color="#B22222">*/</font>
-<a name="line217">217: </a><strong><font color="#4169E1"><a name="BV_AllocateSignature"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateSignature(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line218">218: </a>{
-<a name="line220">220: </a>  PetscInt       i;
-
-<a name="line223">223: </a>  <font color="#4169E1">if</font> (bv->indef && !bv->omega) {
-<a name="line224">224: </a>    PetscMalloc1(bv->nc+bv->m,&bv->omega);
-<a name="line225">225: </a>    PetscLogObjectMemory((PetscObject)bv,bv->m*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line226">226: </a>    <font color="#4169E1">for</font> (i=-bv->nc;i<bv->m;i++) bv->omega[i] = 1.0;
-<a name="line227">227: </a>  }
-<a name="line228">228: </a>  <font color="#4169E1">return</font>(0);
-<a name="line229">229: </a>}
-
-<a name="line233">233: </a><font color="#B22222">/*</font>
-<a name="line234">234: </a><font color="#B22222">  BV_AllocateMatMult - Allocate auxiliary matrices required for <a href="../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a> if not available.</font>
-<a name="line235">235: </a><font color="#B22222">*/</font>
-<a name="line236">236: </a><strong><font color="#4169E1"><a name="BV_AllocateMatMult"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateMatMult(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Mat A,PetscInt m)</font></strong>
-<a name="line237">237: </a>{
-<a name="line239">239: </a>  PetscObjectId  Aid;
-<a name="line240">240: </a>  PetscBool      create=PETSC_FALSE;
-<a name="line241">241: </a>  PetscInt       cols;
-
-<a name="line244">244: </a>  <font color="#4169E1">if</font> (!bv->B) create=PETSC_TRUE;
-<a name="line245">245: </a>  <font color="#4169E1">else</font> {
-<a name="line246">246: </a>    MatGetSize(bv->B,NULL,&cols);
-<a name="line247">247: </a>    PetscObjectGetId((PetscObject)A,&Aid);
-<a name="line248">248: </a>    <font color="#4169E1">if</font> (cols!=m || bv->Aid!=Aid) {
-<a name="line249">249: </a>      MatDestroy(&bv->B);
-<a name="line250">250: </a>      MatDestroy(&bv->C);
-<a name="line251">251: </a>      create=PETSC_TRUE;
-<a name="line252">252: </a>    }
-<a name="line253">253: </a>  }
-<a name="line254">254: </a>  <font color="#4169E1">if</font> (create) {
-<a name="line255">255: </a>    MatCreateDense(PetscObjectComm((PetscObject)bv),bv->n,PETSC_DECIDE,bv->N,m,NULL,&bv->B);
-<a name="line256">256: </a>    PetscLogObjectParent((PetscObject)bv,(PetscObject)bv->B);
-<a name="line257">257: </a>    MatAssemblyBegin(bv->B,MAT_FINAL_ASSEMBLY);
-<a name="line258">258: </a>    MatAssemblyEnd(bv->B,MAT_FINAL_ASSEMBLY);
-<a name="line259">259: </a>  }
-<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
-<a name="line261">261: </a>}
-
-<a name="line263">263: </a><font color="#B22222">/*</font>
-<a name="line264">264: </a><font color="#B22222">  BVAvailableVec: First (0) or second (1) vector available for</font>
-<a name="line265">265: </a><font color="#B22222">  getcolumn operation (or -1 if both vectors already fetched).</font>
-<a name="line266">266: </a><font color="#B22222">*/</font>
-<a name="line267">267: </a><strong><font color="#228B22">#define BVAvailableVec (((bv->ci[0]==-bv->nc-1)? 0: (bv->ci[1]==-bv->nc-1)? 1: -1))</font></strong>
-
-<a name="line269">269: </a><font color="#B22222">/*</font>
-<a name="line270">270: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> arguments</font>
-<a name="line271">271: </a><font color="#B22222">*/</font>
-<a name="line272">272: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
-
-<a name="line274">274: </a><strong><font color="#228B22">#define BVCheckSizes(h,arg) do {} while (0)</font></strong>
-
-<a name="line276">276: </a><font color="#A020F0">#else</font>
-
-<a name="line278">278: </a><strong><font color="#228B22">#define BVCheckSizes(h,arg) \</font></strong>
-<a name="line279">279: </a><strong><font color="#228B22">  do { \</font></strong>
-<a name="line280">280: </a><strong><font color="#228B22">    if (!h->m) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes have not been defined: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
-<a name="line281">281: </a><strong><font color="#228B22">  } while (0)</font></strong>
-
-<a name="line283">283: </a><font color="#A020F0">#endif</font>
-
-<a name="line285">285: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVView_Vecs(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscViewer)</font></strong>;
-
-<a name="line287">287: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVAllocateWork_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt)</font></strong>;
-
-<a name="line289">289: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMult_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscScalar,const PetscScalar*,const PetscScalar*,PetscScalar,PetscScalar*)</font></strong>;
-<a name="line290">290: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMultVec_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscScalar,const PetscScalar*,const PetscScalar*,PetscScalar,PetscScalar*)</font></strong>;
-<a name="line291">291: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMultInPlace_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscScalar*,const PetscScalar*,PetscBool)</font></strong>;
-<a name="line292">292: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMultInPlace_Vecs_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,Vec*,const PetscScalar*,PetscBool)</font></strong>;
-<a name="line293">293: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVAXPY_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscScalar,const PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line294">294: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVDot_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,PetscInt,const PetscScalar*,const PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
-<a name="line295">295: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVDotVec_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,const PetscScalar*,const PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
-<a name="line296">296: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVScale_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*,PetscScalar)</font></strong>;
-<a name="line297">297: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVNorm_LAPACK_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,const PetscScalar*,NormType,PetscReal*,PetscBool)</font></strong>;
-<a name="line298">298: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVOrthogonalize_LAPACK_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
-
-<a name="line300">300: </a><font color="#A020F0">#endif</font>
+<a name="line40"> 40: </a>  PetscErrorCode (*dot)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat);
+<a name="line41"> 41: </a>  PetscErrorCode (*dotvec)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
+<a name="line42"> 42: </a>  PetscErrorCode (*dotvec_local)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
+<a name="line43"> 43: </a>  PetscErrorCode (*dotvec_begin)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
+<a name="line44"> 44: </a>  PetscErrorCode (*dotvec_end)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*);
+<a name="line45"> 45: </a>  PetscErrorCode (*scale)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar);
+<a name="line46"> 46: </a>  PetscErrorCode (*norm)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
+<a name="line47"> 47: </a>  PetscErrorCode (*norm_local)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
+<a name="line48"> 48: </a>  PetscErrorCode (*norm_begin)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
+<a name="line49"> 49: </a>  PetscErrorCode (*norm_end)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*);
+<a name="line50"> 50: </a>  PetscErrorCode (*orthogonalize)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat);
+<a name="line51"> 51: </a>  PetscErrorCode (*matmult)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
+<a name="line52"> 52: </a>  PetscErrorCode (*copy)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
+<a name="line53"> 53: </a>  PetscErrorCode (*resize)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscBool);
+<a name="line54"> 54: </a>  PetscErrorCode (*getcolumn)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*);
+<a name="line55"> 55: </a>  PetscErrorCode (*restorecolumn)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*);
+<a name="line56"> 56: </a>  PetscErrorCode (*getarray)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**);
+<a name="line57"> 57: </a>  PetscErrorCode (*restorearray)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**);
+<a name="line58"> 58: </a>  PetscErrorCode (*getarrayread)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,const PetscScalar**);
+<a name="line59"> 59: </a>  PetscErrorCode (*restorearrayread)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,const PetscScalar**);
+<a name="line60"> 60: </a>  PetscErrorCode (*duplicate)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>*);
+<a name="line61"> 61: </a>  PetscErrorCode (*create)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
+<a name="line62"> 62: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
+<a name="line63"> 63: </a>  PetscErrorCode (*view)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscViewer);
+<a name="line64"> 64: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
+<a name="line65"> 65: </a>};
+
+<a name="line67"> 67: </a><font color="#4169E1"><a name="_p_BV"></a>struct _p_BV </font>{
+<a name="line68"> 68: </a>  PETSCHEADER(<font color="#4169E1">struct _BVOps</font>);
+<a name="line69"> 69: </a>  <font color="#B22222">/*------------------------- User parameters --------------------------*/</font>
+<a name="line70"> 70: </a>  Vec                t;            <font color="#B22222">/* template vector */</font>
+<a name="line71"> 71: </a>  PetscInt           n,N;          <font color="#B22222">/* dimensions of vectors (local, global) */</font>
+<a name="line72"> 72: </a>  PetscInt           m;            <font color="#B22222">/* number of vectors */</font>
+<a name="line73"> 73: </a>  PetscInt           l;            <font color="#B22222">/* number of leading columns */</font>
+<a name="line74"> 74: </a>  PetscInt           k;            <font color="#B22222">/* number of active columns */</font>
+<a name="line75"> 75: </a>  PetscInt           nc;           <font color="#B22222">/* number of constraints */</font>
+<a name="line76"> 76: </a>  <a href="../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       orthog_type;  <font color="#B22222">/* the method of vector orthogonalization */</font>
+<a name="line77"> 77: </a>  <a href="../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> orthog_ref;   <font color="#B22222">/* refinement method */</font>
+<a name="line78"> 78: </a>  PetscReal          orthog_eta;   <font color="#B22222">/* refinement threshold */</font>
+<a name="line79"> 79: </a>  <a href="../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  orthog_block; <font color="#B22222">/* the method of block orthogonalization */</font>
+<a name="line80"> 80: </a>  Mat                matrix;       <font color="#B22222">/* inner product matrix */</font>
+<a name="line81"> 81: </a>  PetscBool          indef;        <font color="#B22222">/* matrix is indefinite */</font>
+<a name="line82"> 82: </a>  <a href="../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>      vmm;          <font color="#B22222">/* version of matmult operation */</font>
+
+<a name="line84"> 84: </a>  <font color="#B22222">/*---------------------- Cached data and workspace -------------------*/</font>
+<a name="line85"> 85: </a>  Vec                Bx;           <font color="#B22222">/* result of matrix times a vector x */</font>
+<a name="line86"> 86: </a>  PetscObjectId      xid;          <font color="#B22222">/* object id of vector x */</font>
+<a name="line87"> 87: </a>  PetscObjectState   xstate;       <font color="#B22222">/* state of vector x */</font>
+<a name="line88"> 88: </a>  Vec                cv[2];        <font color="#B22222">/* column vectors obtained with <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>() */</font>
+<a name="line89"> 89: </a>  PetscInt           ci[2];        <font color="#B22222">/* column indices of obtained vectors */</font>
+<a name="line90"> 90: </a>  PetscObjectState   st[2];        <font color="#B22222">/* state of obtained vectors */</font>
+<a name="line91"> 91: </a>  PetscObjectId      id[2];        <font color="#B22222">/* object id of obtained vectors */</font>
+<a name="line92"> 92: </a>  PetscScalar        *h,*c;        <font color="#B22222">/* orthogonalization coefficients */</font>
+<a name="line93"> 93: </a>  PetscReal          *omega;       <font color="#B22222">/* signature matrix values for indefinite case */</font>
+<a name="line94"> 94: </a>  Mat                B,C;          <font color="#B22222">/* auxiliary dense matrices for matmult operation */</font>
+<a name="line95"> 95: </a>  PetscObjectId      Aid;          <font color="#B22222">/* object id of matrix A of matmult operation */</font>
+<a name="line96"> 96: </a>  PetscBool          defersfo;     <font color="#B22222">/* deferred call to setfromoptions */</font>
+<a name="line97"> 97: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>                 cached;       <font color="#B22222">/* cached <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> to store result of matrix times <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> */</font>
+<a name="line98"> 98: </a>  PetscObjectState   bvstate;      <font color="#B22222">/* state of <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> when <a href="../../../docs/manualpages/BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</a>() was called */</font>
+<a name="line99"> 99: </a>  PetscRandom        rand;         <font color="#B22222">/* random number generator */</font>
+<a name="line100">100: </a>  PetscBool          rrandom;      <font color="#B22222">/* reproducible random vectors */</font>
+<a name="line101">101: </a>  PetscScalar        *work;
+<a name="line102">102: </a>  PetscInt           lwork;
+<a name="line103">103: </a>  void               *data;
+<a name="line104">104: </a>};
+
+<a name="line108">108: </a><font color="#B22222">/*</font>
+<a name="line109">109: </a><font color="#B22222">  BV_SafeSqrt - Computes the square root of a scalar value alpha, which is</font>
+<a name="line110">110: </a><font color="#B22222">  assumed to be z'*B*z. The result is</font>
+<a name="line111">111: </a><font color="#B22222">    if definite inner product:     res = sqrt(alpha)</font>
+<a name="line112">112: </a><font color="#B22222">    if indefinite inner product:   res = sgn(alpha)*sqrt(abs(alpha))</font>
+<a name="line113">113: </a><font color="#B22222">*/</font>
+<a name="line114">114: </a><strong><font color="#4169E1"><a name="BV_SafeSqrt"></a>PETSC_STATIC_INLINE PetscErrorCode BV_SafeSqrt(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar alpha,PetscReal *res)</font></strong>
+<a name="line115">115: </a>{
+<a name="line117">117: </a>  PetscReal      absal,realp;
+
+<a name="line120">120: </a>  absal = PetscAbsScalar(alpha);
+<a name="line121">121: </a>  realp = PetscRealPart(alpha);
+<a name="line122">122: </a>  <font color="#4169E1">if</font> (absal<PETSC_MACHINE_EPSILON) {
+<a name="line123">123: </a>    PetscInfo(bv,<font color="#666666">"Zero norm, either the vector is zero or a semi-inner product is being used\n"</font>);
+<a name="line124">124: </a>  }
+<a name="line125">125: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line126">126: </a>  <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(alpha))/absal>PETSC_MACHINE_EPSILON) SETERRQ(PetscObjectComm((PetscObject)bv),1,<font color="#666666">"The inner product is not well defined: nonzero imaginary part"</font>);
+<a name="line127">127: </a><font color="#A020F0">#endif</font>
+<a name="line128">128: </a>  <font color="#4169E1">if</font> (bv->indef) {
+<a name="line129">129: </a>    *res = (realp<0.0)? -PetscSqrtReal(-realp): PetscSqrtReal(realp);
+<a name="line130">130: </a>  } <font color="#4169E1">else</font> { 
+<a name="line131">131: </a>    <font color="#4169E1">if</font> (realp<0.0) SETERRQ(PetscObjectComm((PetscObject)bv),1,<font color="#666666">"The inner product is not well defined: indefinite matrix"</font>);
+<a name="line132">132: </a>    *res = PetscSqrtReal(realp);
+<a name="line133">133: </a>  }
+<a name="line134">134: </a>  <font color="#4169E1">return</font>(0);
+<a name="line135">135: </a>}
+
+<a name="line139">139: </a><font color="#B22222">/*</font>
+<a name="line140">140: </a><font color="#B22222">  BV_IPMatMult - Multiply a vector x by the inner-product matrix, cache the</font>
+<a name="line141">141: </a><font color="#B22222">  result in Bx.</font>
+<a name="line142">142: </a><font color="#B22222">*/</font>
+<a name="line143">143: </a><strong><font color="#4169E1"><a name="BV_IPMatMult"></a>PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMult(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec x)</font></strong>
+<a name="line144">144: </a>{
+
+<a name="line148">148: </a>  <font color="#4169E1">if</font> (((PetscObject)x)->id != bv->xid || ((PetscObject)x)->state != bv->xstate) {
+<a name="line149">149: </a>    MatMult(bv->matrix,x,bv->Bx);
+<a name="line150">150: </a>    bv->xid = ((PetscObject)x)->id;
+<a name="line151">151: </a>    bv->xstate = ((PetscObject)x)->state;
+<a name="line152">152: </a>  }
+<a name="line153">153: </a>  <font color="#4169E1">return</font>(0);
+<a name="line154">154: </a>}
+
+<a name="line158">158: </a><font color="#B22222">/*</font>
+<a name="line159">159: </a><font color="#B22222">  BV_AllocateCachedBV - Allocate auxiliary <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> required for <a href="../../../docs/manualpages/BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</a> if not available.</font>
+<a name="line160">160: </a><font color="#B22222">*/</font>
+<a name="line161">161: </a><strong><font color="#4169E1"><a name="BV_AllocateCachedBV"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCachedBV(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
+<a name="line162">162: </a>{
+
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (!V->cached) {
+<a name="line167">167: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)V),&V->cached);
+<a name="line168">168: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(V->cached,V->t,V->m);
+<a name="line169">169: </a>    <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(V->cached,((PetscObject)V)->type_name);
+<a name="line170">170: </a>    <a href="../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(V->cached,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);
+<a name="line171">171: </a>  }
+<a name="line172">172: </a>  <font color="#4169E1">return</font>(0);
+<a name="line173">173: </a>}
+
+<a name="line177">177: </a><font color="#B22222">/*</font>
+<a name="line178">178: </a><font color="#B22222">  BV_IPMatMultBV - Multiply <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> by the inner-product matrix, cache the</font>
+<a name="line179">179: </a><font color="#B22222">  result internally in bv->cached.</font>
+<a name="line180">180: </a><font color="#B22222">*/</font>
+<a name="line181">181: </a><strong><font color="#4169E1"><a name="BV_IPMatMultBV"></a>PETSC_STATIC_INLINE PetscErrorCode BV_IPMatMultBV(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line182">182: </a>{
+
+<a name="line186">186: </a>  BV_AllocateCachedBV(bv);
+<a name="line187">187: </a>  <a href="../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(bv->cached,bv->l,bv->k);
+<a name="line188">188: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->state != bv->bvstate) {
+<a name="line189">189: </a>    <font color="#4169E1">if</font> (bv->matrix) {
+<a name="line190">190: </a>      <a href="../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(bv,bv->matrix,bv->cached);
+<a name="line191">191: </a>    } <font color="#4169E1">else</font> {
+<a name="line192">192: </a>      <a href="../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(bv,bv->cached);
+<a name="line193">193: </a>    }
+<a name="line194">194: </a>    bv->bvstate = ((PetscObject)bv)->state;
+<a name="line195">195: </a>  }
+<a name="line196">196: </a>  <font color="#4169E1">return</font>(0);
+<a name="line197">197: </a>}
+
+<a name="line201">201: </a><font color="#B22222">/*</font>
+<a name="line202">202: </a><font color="#B22222">  BV_AllocateCoeffs - Allocate orthogonalization coefficients if not done already.</font>
+<a name="line203">203: </a><font color="#B22222">*/</font>
+<a name="line204">204: </a><strong><font color="#4169E1"><a name="BV_AllocateCoeffs"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateCoeffs(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line205">205: </a>{
+
+<a name="line209">209: </a>  <font color="#4169E1">if</font> (!bv->h) {
+<a name="line210">210: </a>    PetscMalloc2(bv->nc+bv->m,&bv->h,bv->nc+bv->m,&bv->c);
+<a name="line211">211: </a>    PetscLogObjectMemory((PetscObject)bv,2*bv->m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line212">212: </a>  }
+<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
+<a name="line214">214: </a>}
+
+<a name="line218">218: </a><font color="#B22222">/*</font>
+<a name="line219">219: </a><font color="#B22222">  BV_AllocateSignature - Allocate signature coefficients if not done already.</font>
+<a name="line220">220: </a><font color="#B22222">*/</font>
+<a name="line221">221: </a><strong><font color="#4169E1"><a name="BV_AllocateSignature"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateSignature(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line222">222: </a>{
+<a name="line224">224: </a>  PetscInt       i;
+
+<a name="line227">227: </a>  <font color="#4169E1">if</font> (bv->indef && !bv->omega) {
+<a name="line228">228: </a>    PetscMalloc1(bv->nc+bv->m,&bv->omega);
+<a name="line229">229: </a>    PetscLogObjectMemory((PetscObject)bv,bv->m*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line230">230: </a>    <font color="#4169E1">for</font> (i=-bv->nc;i<bv->m;i++) bv->omega[i] = 1.0;
+<a name="line231">231: </a>  }
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a>}
+
+<a name="line237">237: </a><font color="#B22222">/*</font>
+<a name="line238">238: </a><font color="#B22222">  BV_AllocateMatMult - Allocate auxiliary matrices required for <a href="../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a> if not available.</font>
+<a name="line239">239: </a><font color="#B22222">*/</font>
+<a name="line240">240: </a><strong><font color="#4169E1"><a name="BV_AllocateMatMult"></a>PETSC_STATIC_INLINE PetscErrorCode BV_AllocateMatMult(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Mat A,PetscInt m)</font></strong>
+<a name="line241">241: </a>{
+<a name="line243">243: </a>  PetscObjectId  Aid;
+<a name="line244">244: </a>  PetscBool      create=PETSC_FALSE;
+<a name="line245">245: </a>  PetscInt       cols;
+
+<a name="line248">248: </a>  <font color="#4169E1">if</font> (!bv->B) create=PETSC_TRUE;
+<a name="line249">249: </a>  <font color="#4169E1">else</font> {
+<a name="line250">250: </a>    MatGetSize(bv->B,NULL,&cols);
+<a name="line251">251: </a>    PetscObjectGetId((PetscObject)A,&Aid);
+<a name="line252">252: </a>    <font color="#4169E1">if</font> (cols!=m || bv->Aid!=Aid) {
+<a name="line253">253: </a>      MatDestroy(&bv->B);
+<a name="line254">254: </a>      MatDestroy(&bv->C);
+<a name="line255">255: </a>      create=PETSC_TRUE;
+<a name="line256">256: </a>    }
+<a name="line257">257: </a>  }
+<a name="line258">258: </a>  <font color="#4169E1">if</font> (create) {
+<a name="line259">259: </a>    MatCreateDense(PetscObjectComm((PetscObject)bv),bv->n,PETSC_DECIDE,bv->N,m,NULL,&bv->B);
+<a name="line260">260: </a>    PetscLogObjectParent((PetscObject)bv,(PetscObject)bv->B);
+<a name="line261">261: </a>    MatAssemblyBegin(bv->B,MAT_FINAL_ASSEMBLY);
+<a name="line262">262: </a>    MatAssemblyEnd(bv->B,MAT_FINAL_ASSEMBLY);
+<a name="line263">263: </a>  }
+<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
+<a name="line265">265: </a>}
+
+<a name="line267">267: </a><font color="#B22222">/*</font>
+<a name="line268">268: </a><font color="#B22222">  BVAvailableVec: First (0) or second (1) vector available for</font>
+<a name="line269">269: </a><font color="#B22222">  getcolumn operation (or -1 if both vectors already fetched).</font>
+<a name="line270">270: </a><font color="#B22222">*/</font>
+<a name="line271">271: </a><strong><font color="#228B22">#define BVAvailableVec (((bv->ci[0]==-bv->nc-1)? 0: (bv->ci[1]==-bv->nc-1)? 1: -1))</font></strong>
+
+<a name="line273">273: </a><font color="#B22222">/*</font>
+<a name="line274">274: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> arguments</font>
+<a name="line275">275: </a><font color="#B22222">*/</font>
+<a name="line276">276: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
+
+<a name="line278">278: </a><strong><font color="#228B22">#define BVCheckSizes(h,arg) do {} while (0)</font></strong>
+
+<a name="line280">280: </a><font color="#A020F0">#else</font>
+
+<a name="line282">282: </a><strong><font color="#228B22">#define BVCheckSizes(h,arg) \</font></strong>
+<a name="line283">283: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line284">284: </a><strong><font color="#228B22">    if (!h->m) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes have not been defined: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line285">285: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line287">287: </a><font color="#A020F0">#endif</font>
+
+<a name="line289">289: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVView_Vecs(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscViewer)</font></strong>;
+
+<a name="line291">291: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVAllocateWork_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt)</font></strong>;
+
+<a name="line293">293: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMult_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscScalar,const PetscScalar*,const PetscScalar*,PetscScalar,PetscScalar*)</font></strong>;
+<a name="line294">294: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMultVec_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscScalar,const PetscScalar*,const PetscScalar*,PetscScalar,PetscScalar*)</font></strong>;
+<a name="line295">295: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMultInPlace_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscScalar*,const PetscScalar*,PetscBool)</font></strong>;
+<a name="line296">296: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVMultInPlace_Vecs_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,Vec*,const PetscScalar*,PetscBool)</font></strong>;
+<a name="line297">297: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVAXPY_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscScalar,const PetscScalar*,PetscScalar,PetscScalar*)</font></strong>;
+<a name="line298">298: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVDot_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt,PetscInt,const PetscScalar*,const PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
+<a name="line299">299: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVDotVec_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,const PetscScalar*,const PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
+<a name="line300">300: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVScale_BLAS_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*,PetscScalar)</font></strong>;
+<a name="line301">301: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVNorm_LAPACK_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,const PetscScalar*,NormType,PetscReal*,PetscBool)</font></strong>;
+<a name="line302">302: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BVOrthogonalize_LAPACK_Private(<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
+
+<a name="line304">304: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/dsimpl.h b/include/slepc/private/dsimpl.h
index c0c87eb..18157c6 100644
--- a/include/slepc/private/dsimpl.h
+++ b/include/slepc/private/dsimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -107,8 +107,6 @@ PETSC_INTERN PetscErrorCode DSPermuteColumns_Private(DS,PetscInt,PetscInt,DSMatT
 PETSC_INTERN PetscErrorCode DSPermuteRows_Private(DS,PetscInt,PetscInt,DSMatType,PetscInt*);
 PETSC_INTERN PetscErrorCode DSPermuteBoth_Private(DS,PetscInt,PetscInt,DSMatType,DSMatType,PetscInt*);
 PETSC_INTERN PetscErrorCode DSCopyMatrix_Private(DS,DSMatType,DSMatType);
-PETSC_EXTERN PetscErrorCode DSOrthogonalize(DS,DSMatType,PetscInt,PetscInt*);
-PETSC_EXTERN PetscErrorCode DSPseudoOrthogonalize(DS,DSMatType,PetscInt,PetscReal*,PetscInt*,PetscReal*);
 
 PETSC_INTERN PetscErrorCode DSGHIEPOrthogEigenv(DS,DSMatType,PetscScalar*,PetscScalar*,PetscBool);
 PETSC_INTERN PetscErrorCode DSGHIEPComplexEigs(DS,PetscInt,PetscInt,PetscScalar*,PetscScalar*);
diff --git a/include/slepc/private/dsimpl.h.html b/include/slepc/private/dsimpl.h.html
index e468cfb..aa3cfa6 100644
--- a/include/slepc/private/dsimpl.h.html
+++ b/include/slepc/private/dsimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/dsimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:42+00:00">
+<meta name="date" content="2016-05-16T10:34:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/dsimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/dsimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -119,26 +119,24 @@
 <a name="line107">107: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSPermuteRows_Private(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,PetscInt,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt*)</font></strong>;
 <a name="line108">108: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSPermuteBoth_Private(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,PetscInt,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt*)</font></strong>;
 <a name="line109">109: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSCopyMatrix_Private(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>)</font></strong>;
-<a name="line110">110: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSOrthogonalize(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt,PetscInt*)</font></strong>;
-<a name="line111">111: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSPseudoOrthogonalize(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt,PetscReal*,PetscInt*,PetscReal*)</font></strong>;
-
-<a name="line113">113: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPOrthogEigenv(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
-<a name="line114">114: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPComplexEigs(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line115">115: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPInverseIteration(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line116">116: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSIntermediate_GHIEP(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line117">117: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSSwitchFormat_GHIEP(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscBool)</font></strong>;
-<a name="line118">118: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPRealBlocks(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-
-<a name="line120">120: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSSolve_GHIEP_HZ(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line121">121: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSSolve_GHIEP_DQDS_II(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar*,PetscScalar*)</font></strong>;
-
-<a name="line123">123: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dibtdc_(const char*,PetscBLASInt,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscReal,PetscReal*,PetscReal*,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscBLASInt,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line124">124: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dlaed3m_(const char*,const char*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscReal*,PetscReal*,PetscBLASInt,PetscReal,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line125">125: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dmerg2_(const char*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscReal,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line126">126: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dsbtdc_(const char*,const char*,PetscBLASInt,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal,PetscReal,PetscReal,PetscReal*,PetscReal*,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscBLASInt,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line127">127: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dsrtdf_(PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-
-<a name="line129">129: </a><font color="#A020F0">#endif</font>
+
+<a name="line111">111: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPOrthogEigenv(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscScalar*,PetscScalar*,PetscBool)</font></strong>;
+<a name="line112">112: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPComplexEigs(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line113">113: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPInverseIteration(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line114">114: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSIntermediate_GHIEP(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line115">115: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSSwitchFormat_GHIEP(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscBool)</font></strong>;
+<a name="line116">116: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSGHIEPRealBlocks(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+
+<a name="line118">118: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSSolve_GHIEP_HZ(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line119">119: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode DSSolve_GHIEP_DQDS_II(<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar*,PetscScalar*)</font></strong>;
+
+<a name="line121">121: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dibtdc_(const char*,PetscBLASInt,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscReal,PetscReal*,PetscReal*,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscBLASInt,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line122">122: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dlaed3m_(const char*,const char*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscReal*,PetscReal*,PetscBLASInt,PetscReal,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line123">123: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dmerg2_(const char*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscReal,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line124">124: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dsbtdc_(const char*,const char*,PetscBLASInt,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt,PetscReal,PetscReal,PetscReal,PetscReal*,PetscReal*,PetscBLASInt,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscBLASInt,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line125">125: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode BDC_dsrtdf_(PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscReal*,PetscReal*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+
+<a name="line127">127: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/epsimpl.h b/include/slepc/private/epsimpl.h
index 34ace34..b1c3410 100644
--- a/include/slepc/private/epsimpl.h
+++ b/include/slepc/private/epsimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,7 +34,7 @@ typedef struct _EPSOps *EPSOps;
 struct _EPSOps {
   PetscErrorCode (*solve)(EPS);
   PetscErrorCode (*setup)(EPS);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,EPS);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,EPS);
   PetscErrorCode (*publishoptions)(EPS);
   PetscErrorCode (*destroy)(EPS);
   PetscErrorCode (*reset)(EPS);
@@ -68,6 +68,7 @@ struct _p_EPS {
   PetscScalar    target;           /* target value */
   PetscReal      tol;              /* tolerance */
   EPSConv        conv;             /* convergence test */
+  EPSStop        stop;             /* stopping test */
   EPSWhich       which;            /* which part of the spectrum to be sought */
   PetscReal      inta,intb;        /* interval [a,b] for spectrum slicing */
   EPSProblemType problem_type;     /* which kind of problem to be solved */
@@ -82,8 +83,11 @@ struct _p_EPS {
   /*-------------- User-provided functions and contexts -----------------*/
   PetscErrorCode (*converged)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
   PetscErrorCode (*convergeddestroy)(void*);
+  PetscErrorCode (*stopping)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);
+  PetscErrorCode (*stoppingdestroy)(void*);
   PetscErrorCode (*arbitrary)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*);
   void           *convergedctx;
+  void           *stoppingctx;
   void           *arbitraryctx;
   PetscErrorCode (*monitor[MAXEPSMONITORS])(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
   PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**);
@@ -95,7 +99,6 @@ struct _p_EPS {
   DS             ds;               /* direct solver object */
   BV             V;                /* set of basis vectors and computed eigenvectors */
   RG             rg;               /* optional region for filtering */
-  PetscRandom    rand;             /* random number generator */
   SlepcSC        sc;               /* sorting criterion data */
   Vec            D;                /* diagonal matrix for balancing */
   Vec            *IS;              /* references to user-provided initial space */
@@ -150,7 +153,7 @@ PETSC_STATIC_INLINE PetscErrorCode EPS_SetInnerProduct(EPS eps)
   if (!eps->V) { ierr = EPSGetBV(eps,&eps->V);CHKERRQ(ierr); }
   if (eps->ispositive || (eps->isgeneralized && eps->ishermitian)) {
     ierr = STGetBilinearForm(eps->st,&B);CHKERRQ(ierr);
-    ierr = BVSetMatrix(eps->V,B,eps->ispositive?PETSC_FALSE:PETSC_TRUE);CHKERRQ(ierr);
+    ierr = BVSetMatrix(eps->V,B,PetscNot(eps->ispositive));CHKERRQ(ierr);
     ierr = MatDestroy(&B);CHKERRQ(ierr);
   } else {
     ierr = BVSetMatrix(eps->V,NULL,PETSC_FALSE);CHKERRQ(ierr);
diff --git a/include/slepc/private/epsimpl.h.html b/include/slepc/private/epsimpl.h.html
index adefa2e..c26b86d 100644
--- a/include/slepc/private/epsimpl.h.html
+++ b/include/slepc/private/epsimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/epsimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:41+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/epsimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/epsimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line34"> 34: </a><font color="#4169E1"><a name="_EPSOps"></a>struct _EPSOps </font>{
 <a name="line35"> 35: </a>  PetscErrorCode (*solve)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
 <a name="line36"> 36: </a>  PetscErrorCode (*setup)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
-<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
+<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
 <a name="line38"> 38: </a>  PetscErrorCode (*publishoptions)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
 <a name="line39"> 39: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
 <a name="line40"> 40: </a>  PetscErrorCode (*reset)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>);
@@ -80,115 +80,118 @@
 <a name="line68"> 68: </a>  PetscScalar    target;           <font color="#B22222">/* target value */</font>
 <a name="line69"> 69: </a>  PetscReal      tol;              <font color="#B22222">/* tolerance */</font>
 <a name="line70"> 70: </a>  <a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>        conv;             <font color="#B22222">/* convergence test */</font>
-<a name="line71"> 71: </a>  <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>       which;            <font color="#B22222">/* which part of the spectrum to be sought */</font>
-<a name="line72"> 72: </a>  PetscReal      inta,intb;        <font color="#B22222">/* interval [a,b] for spectrum slicing */</font>
-<a name="line73"> 73: </a>  <a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a> problem_type;     <font color="#B22222">/* which kind of problem to be solved */</font>
-<a name="line74"> 74: </a>  <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>  extraction;       <font color="#B22222">/* which kind of extraction to be applied */</font>
-<a name="line75"> 75: </a>  <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>     balance;          <font color="#B22222">/* the balancing method */</font>
-<a name="line76"> 76: </a>  PetscInt       balance_its;      <font color="#B22222">/* number of iterations of the balancing method */</font>
-<a name="line77"> 77: </a>  PetscReal      balance_cutoff;   <font color="#B22222">/* cutoff value for balancing */</font>
-<a name="line78"> 78: </a>  PetscBool      trueres;          <font color="#B22222">/* whether the true residual norm must be computed */</font>
-<a name="line79"> 79: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
-<a name="line80"> 80: </a>  PetscBool      purify;           <font color="#B22222">/* whether eigenvectors need to be purified */</font>
-
-<a name="line82"> 82: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
-<a name="line83"> 83: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
-<a name="line84"> 84: </a>  PetscErrorCode (*convergeddestroy)(void*);
-<a name="line85"> 85: </a>  PetscErrorCode (*arbitrary)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*);
-<a name="line86"> 86: </a>  void           *convergedctx;
-<a name="line87"> 87: </a>  void           *arbitraryctx;
-<a name="line88"> 88: </a>  PetscErrorCode (*monitor[MAXEPSMONITORS])(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
-<a name="line89"> 89: </a>  PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**);
-<a name="line90"> 90: </a>  void           *monitorcontext[MAXEPSMONITORS];
-<a name="line91"> 91: </a>  PetscInt       numbermonitors;
-
-<a name="line93"> 93: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
-<a name="line94"> 94: </a>  <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;               <font color="#B22222">/* spectral transformation object */</font>
-<a name="line95"> 95: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
-<a name="line96"> 96: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;                <font color="#B22222">/* set of basis vectors and computed eigenvectors */</font>
-<a name="line97"> 97: </a>  <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;               <font color="#B22222">/* optional region for filtering */</font>
-<a name="line98"> 98: </a>  PetscRandom    rand;             <font color="#B22222">/* random number generator */</font>
-<a name="line99"> 99: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
-<a name="line100">100: </a>  Vec            D;                <font color="#B22222">/* diagonal matrix for balancing */</font>
-<a name="line101">101: </a>  Vec            *IS;              <font color="#B22222">/* references to user-provided initial space */</font>
-<a name="line102">102: </a>  Vec            *defl;            <font color="#B22222">/* references to user-provided deflation space */</font>
-<a name="line103">103: </a>  PetscScalar    *eigr,*eigi;      <font color="#B22222">/* real and imaginary parts of eigenvalues */</font>
-<a name="line104">104: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
-<a name="line105">105: </a>  PetscScalar    *rr,*ri;          <font color="#B22222">/* values computed by user's arbitrary selection function */</font>
-<a name="line106">106: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for eigenvalue ordering */</font>
-<a name="line107">107: </a>  PetscInt       nwork;            <font color="#B22222">/* number of work vectors */</font>
-<a name="line108">108: </a>  Vec            *work;            <font color="#B22222">/* work vectors */</font>
-<a name="line109">109: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
-
-<a name="line111">111: </a>  <font color="#B22222">/* ----------------------- Status variables --------------------------*/</font>
-<a name="line112">112: </a>  EPSStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> eigenvectors */</font>
-<a name="line113">113: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged eigenvalues */</font>
-<a name="line114">114: </a>  PetscInt       its;              <font color="#B22222">/* number of iterations so far computed */</font>
-<a name="line115">115: </a>  PetscInt       n,nloc;           <font color="#B22222">/* problem dimensions (global, local) */</font>
-<a name="line116">116: </a>  PetscReal      nrma,nrmb;        <font color="#B22222">/* computed matrix norms */</font>
-<a name="line117">117: </a>  PetscBool      isgeneralized;
-<a name="line118">118: </a>  PetscBool      ispositive;
-<a name="line119">119: </a>  PetscBool      ishermitian;
-<a name="line120">120: </a>  <a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> reason;
-<a name="line121">121: </a>};
-
-<a name="line123">123: </a><font color="#B22222">/*</font>
-<a name="line124">124: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> arguments</font>
-<a name="line125">125: </a><font color="#B22222">*/</font>
-<a name="line126">126: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
-
-<a name="line128">128: </a><strong><font color="#228B22">#define EPSCheckSolved(h,arg) do {} while (0)</font></strong>
-
-<a name="line130">130: </a><font color="#A020F0">#else</font>
-
-<a name="line132">132: </a><strong><font color="#228B22">#define EPSCheckSolved(h,arg) \</font></strong>
-<a name="line133">133: </a><strong><font color="#228B22">  do { \</font></strong>
-<a name="line134">134: </a><strong><font color="#228B22">    if (h->state<EPS_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
-<a name="line135">135: </a><strong><font color="#228B22">  } while (0)</font></strong>
-
-<a name="line137">137: </a><font color="#A020F0">#endif</font>
-
-<a name="line141">141: </a><font color="#B22222">/*</font>
-<a name="line142">142: </a><font color="#B22222">  EPS_SetInnerProduct - set B matrix for inner product if appropriate.</font>
-<a name="line143">143: </a><font color="#B22222">*/</font>
-<a name="line144">144: </a><strong><font color="#4169E1"><a name="EPS_SetInnerProduct"></a>PETSC_STATIC_INLINE PetscErrorCode EPS_SetInnerProduct(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line145">145: </a>{
-<a name="line147">147: </a>  Mat            B;
-
-<a name="line150">150: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line151">151: </a>  <font color="#4169E1">if</font> (eps->ispositive || (eps->isgeneralized && eps->ishermitian)) {
-<a name="line152">152: </a>    <a href="../../../docs/manualpages/ST/STGetBilinearForm.html#STGetBilinearForm">STGetBilinearForm</a>(eps->st,&B);
-<a name="line153">153: </a>    <a href="../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(eps->V,B,eps->ispositive?PETSC_FALSE:PETSC_TRUE);
-<a name="line154">154: </a>    MatDestroy(&B);
-<a name="line155">155: </a>  } <font color="#4169E1">else</font> {
-<a name="line156">156: </a>    <a href="../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(eps->V,NULL,PETSC_FALSE);
-<a name="line157">157: </a>  }
-<a name="line158">158: </a>  <font color="#4169E1">return</font>(0);
-<a name="line159">159: </a>}
-
-<a name="line161">161: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSSetWhichEigenpairs_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line162">162: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSSetDimensions_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt*,PetscInt*)</font></strong>;
-<a name="line163">163: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSBackTransform_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line164">164: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line165">165: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Hermitian(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line166">166: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Schur(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line167">167: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Indefinite(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line168">168: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Slice(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line169">169: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeResidualNorm_Private(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,Vec,Vec,Vec*,PetscReal*)</font></strong>;
-<a name="line170">170: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeRitzVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscScalar*,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,Vec)</font></strong>;
-<a name="line171">171: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSGetStartVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscBool*)</font></strong>;
-
-<a name="line173">173: </a><font color="#B22222">/* Private functions of the solver implementations */</font>
-
-<a name="line175">175: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSBasicArnoldi(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
-<a name="line176">176: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSDelayedArnoldi(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
-<a name="line177">177: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSDelayedArnoldi1(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
-<a name="line178">178: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSKrylovConvergence(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool,PetscInt,PetscInt,PetscReal,PetscReal,PetscInt*)</font></strong>;
-<a name="line179">179: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSFullLanczos(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*,PetscInt,PetscInt*,PetscBool*)</font></strong>;
-<a name="line180">180: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSPseudoLanczos(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*,PetscReal*,PetscInt,PetscInt*,PetscBool*,PetscBool*,PetscReal*,Vec)</font></strong>;
-<a name="line181">181: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSBuildBalance_Krylov(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-
-<a name="line183">183: </a><font color="#A020F0">#endif</font>
+<a name="line71"> 71: </a>  <a href="../../../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a>        stop;             <font color="#B22222">/* stopping test */</font>
+<a name="line72"> 72: </a>  <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>       which;            <font color="#B22222">/* which part of the spectrum to be sought */</font>
+<a name="line73"> 73: </a>  PetscReal      inta,intb;        <font color="#B22222">/* interval [a,b] for spectrum slicing */</font>
+<a name="line74"> 74: </a>  <a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a> problem_type;     <font color="#B22222">/* which kind of problem to be solved */</font>
+<a name="line75"> 75: </a>  <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>  extraction;       <font color="#B22222">/* which kind of extraction to be applied */</font>
+<a name="line76"> 76: </a>  <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>     balance;          <font color="#B22222">/* the balancing method */</font>
+<a name="line77"> 77: </a>  PetscInt       balance_its;      <font color="#B22222">/* number of iterations of the balancing method */</font>
+<a name="line78"> 78: </a>  PetscReal      balance_cutoff;   <font color="#B22222">/* cutoff value for balancing */</font>
+<a name="line79"> 79: </a>  PetscBool      trueres;          <font color="#B22222">/* whether the true residual norm must be computed */</font>
+<a name="line80"> 80: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
+<a name="line81"> 81: </a>  PetscBool      purify;           <font color="#B22222">/* whether eigenvectors need to be purified */</font>
+
+<a name="line83"> 83: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
+<a name="line84"> 84: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+<a name="line85"> 85: </a>  PetscErrorCode (*convergeddestroy)(void*);
+<a name="line86"> 86: </a>  PetscErrorCode (*stopping)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*,void*);
+<a name="line87"> 87: </a>  PetscErrorCode (*stoppingdestroy)(void*);
+<a name="line88"> 88: </a>  PetscErrorCode (*arbitrary)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*);
+<a name="line89"> 89: </a>  void           *convergedctx;
+<a name="line90"> 90: </a>  void           *stoppingctx;
+<a name="line91"> 91: </a>  void           *arbitraryctx;
+<a name="line92"> 92: </a>  PetscErrorCode (*monitor[MAXEPSMONITORS])(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
+<a name="line93"> 93: </a>  PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**);
+<a name="line94"> 94: </a>  void           *monitorcontext[MAXEPSMONITORS];
+<a name="line95"> 95: </a>  PetscInt       numbermonitors;
+
+<a name="line97"> 97: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
+<a name="line98"> 98: </a>  <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;               <font color="#B22222">/* spectral transformation object */</font>
+<a name="line99"> 99: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
+<a name="line100">100: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;                <font color="#B22222">/* set of basis vectors and computed eigenvectors */</font>
+<a name="line101">101: </a>  <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;               <font color="#B22222">/* optional region for filtering */</font>
+<a name="line102">102: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
+<a name="line103">103: </a>  Vec            D;                <font color="#B22222">/* diagonal matrix for balancing */</font>
+<a name="line104">104: </a>  Vec            *IS;              <font color="#B22222">/* references to user-provided initial space */</font>
+<a name="line105">105: </a>  Vec            *defl;            <font color="#B22222">/* references to user-provided deflation space */</font>
+<a name="line106">106: </a>  PetscScalar    *eigr,*eigi;      <font color="#B22222">/* real and imaginary parts of eigenvalues */</font>
+<a name="line107">107: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
+<a name="line108">108: </a>  PetscScalar    *rr,*ri;          <font color="#B22222">/* values computed by user's arbitrary selection function */</font>
+<a name="line109">109: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for eigenvalue ordering */</font>
+<a name="line110">110: </a>  PetscInt       nwork;            <font color="#B22222">/* number of work vectors */</font>
+<a name="line111">111: </a>  Vec            *work;            <font color="#B22222">/* work vectors */</font>
+<a name="line112">112: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
+
+<a name="line114">114: </a>  <font color="#B22222">/* ----------------------- Status variables --------------------------*/</font>
+<a name="line115">115: </a>  EPSStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> eigenvectors */</font>
+<a name="line116">116: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged eigenvalues */</font>
+<a name="line117">117: </a>  PetscInt       its;              <font color="#B22222">/* number of iterations so far computed */</font>
+<a name="line118">118: </a>  PetscInt       n,nloc;           <font color="#B22222">/* problem dimensions (global, local) */</font>
+<a name="line119">119: </a>  PetscReal      nrma,nrmb;        <font color="#B22222">/* computed matrix norms */</font>
+<a name="line120">120: </a>  PetscBool      isgeneralized;
+<a name="line121">121: </a>  PetscBool      ispositive;
+<a name="line122">122: </a>  PetscBool      ishermitian;
+<a name="line123">123: </a>  <a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> reason;
+<a name="line124">124: </a>};
+
+<a name="line126">126: </a><font color="#B22222">/*</font>
+<a name="line127">127: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> arguments</font>
+<a name="line128">128: </a><font color="#B22222">*/</font>
+<a name="line129">129: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
+
+<a name="line131">131: </a><strong><font color="#228B22">#define EPSCheckSolved(h,arg) do {} while (0)</font></strong>
+
+<a name="line133">133: </a><font color="#A020F0">#else</font>
+
+<a name="line135">135: </a><strong><font color="#228B22">#define EPSCheckSolved(h,arg) \</font></strong>
+<a name="line136">136: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line137">137: </a><strong><font color="#228B22">    if (h->state<EPS_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line138">138: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line140">140: </a><font color="#A020F0">#endif</font>
+
+<a name="line144">144: </a><font color="#B22222">/*</font>
+<a name="line145">145: </a><font color="#B22222">  EPS_SetInnerProduct - set B matrix for inner product if appropriate.</font>
+<a name="line146">146: </a><font color="#B22222">*/</font>
+<a name="line147">147: </a><strong><font color="#4169E1"><a name="EPS_SetInnerProduct"></a>PETSC_STATIC_INLINE PetscErrorCode EPS_SetInnerProduct(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line148">148: </a>{
+<a name="line150">150: </a>  Mat            B;
+
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line154">154: </a>  <font color="#4169E1">if</font> (eps->ispositive || (eps->isgeneralized && eps->ishermitian)) {
+<a name="line155">155: </a>    <a href="../../../docs/manualpages/ST/STGetBilinearForm.html#STGetBilinearForm">STGetBilinearForm</a>(eps->st,&B);
+<a name="line156">156: </a>    <a href="../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(eps->V,B,PetscNot(eps->ispositive));
+<a name="line157">157: </a>    MatDestroy(&B);
+<a name="line158">158: </a>  } <font color="#4169E1">else</font> {
+<a name="line159">159: </a>    <a href="../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(eps->V,NULL,PETSC_FALSE);
+<a name="line160">160: </a>  }
+<a name="line161">161: </a>  <font color="#4169E1">return</font>(0);
+<a name="line162">162: </a>}
+
+<a name="line164">164: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSSetWhichEigenpairs_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line165">165: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSSetDimensions_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt*,PetscInt*)</font></strong>;
+<a name="line166">166: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSBackTransform_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line167">167: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line168">168: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Hermitian(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line169">169: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Schur(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line170">170: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Indefinite(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line171">171: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_Slice(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line172">172: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeResidualNorm_Private(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,Vec,Vec,Vec*,PetscReal*)</font></strong>;
+<a name="line173">173: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeRitzVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscScalar*,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,Vec)</font></strong>;
+<a name="line174">174: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSGetStartVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscBool*)</font></strong>;
+
+<a name="line176">176: </a><font color="#B22222">/* Private functions of the solver implementations */</font>
+
+<a name="line178">178: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSBasicArnoldi(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
+<a name="line179">179: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSDelayedArnoldi(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
+<a name="line180">180: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSDelayedArnoldi1(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
+<a name="line181">181: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSKrylovConvergence(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool,PetscInt,PetscInt,PetscReal,PetscReal,PetscInt*)</font></strong>;
+<a name="line182">182: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSFullLanczos(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*,PetscInt,PetscInt*,PetscBool*)</font></strong>;
+<a name="line183">183: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSPseudoLanczos(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*,PetscReal*,PetscInt,PetscInt*,PetscBool*,PetscBool*,PetscReal*,Vec)</font></strong>;
+<a name="line184">184: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSBuildBalance_Krylov(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+
+<a name="line186">186: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/fnimpl.h b/include/slepc/private/fnimpl.h
index 5181ede..3d82c9e 100644
--- a/include/slepc/private/fnimpl.h
+++ b/include/slepc/private/fnimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -36,51 +36,83 @@ struct _FNOps {
   PetscErrorCode (*evaluatederivative)(FN,PetscScalar,PetscScalar*);
   PetscErrorCode (*evaluatefunctionmat)(FN,Mat,Mat);
   PetscErrorCode (*evaluatefunctionmatsym)(FN,Mat,Mat);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,FN);
+  PetscErrorCode (*evaluatefunctionmatvec)(FN,Mat,Vec);
+  PetscErrorCode (*evaluatefunctionmatvecsym)(FN,Mat,Vec);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,FN);
   PetscErrorCode (*view)(FN,PetscViewer);
   PetscErrorCode (*duplicate)(FN,MPI_Comm,FN*);
   PetscErrorCode (*destroy)(FN);
 };
 
+#define FN_MAX_W 6
+
 struct _p_FN {
   PETSCHEADER(struct _FNOps);
   /*------------------------- User parameters --------------------------*/
-  PetscScalar        alpha;   /* inner scaling (argument) */
-  PetscScalar        beta;    /* outer scaling (result) */
+  PetscScalar alpha;          /* inner scaling (argument) */
+  PetscScalar beta;           /* outer scaling (result) */
 
   /*---------------------- Cached data and workspace -------------------*/
-  Mat                W;       /* workspace matrix */
-  void               *data;
+  Mat         W[FN_MAX_W];    /* workspace matrices */
+  PetscInt    nw;             /* number of allocated W matrices */
+  PetscInt    cw;             /* current W matrix */
+  void        *data;
 };
 
 #undef __FUNCT__
 #define __FUNCT__ "FN_AllocateWorkMat"
 /*
-  FN_AllocateWorkMat - Allocate a working Mat of appropriate size if not available already.
+  FN_AllocateWorkMat - Allocate a work Mat of the same dimension of A and copy
+  its contents. The work matrix is returned in M and should be freed with
+  FN_FreeWorkMat().
 */
-PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(FN fn,Mat A)
+PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(FN fn,Mat A,Mat *M)
 {
   PetscErrorCode ierr;
   PetscInt       n,na;
   PetscBool      create=PETSC_FALSE;
 
   PetscFunctionBegin;
-  if (!fn->W) create=PETSC_TRUE;
-  else {
-    ierr = MatGetSize(fn->W,&n,NULL);CHKERRQ(ierr);
+  *M = NULL;
+  if (fn->cw==FN_MAX_W) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_SUP,"Too many requested work matrices %D",fn->cw);
+  if (fn->nw<=fn->cw) {
+    create=PETSC_TRUE;
+    fn->nw++;
+  } else {
+    ierr = MatGetSize(fn->W[fn->cw],&n,NULL);CHKERRQ(ierr);
     ierr = MatGetSize(A,&na,NULL);CHKERRQ(ierr);
     if (n!=na) {
-      ierr = MatDestroy(&fn->W);CHKERRQ(ierr);
+      ierr = MatDestroy(&fn->W[fn->cw]);CHKERRQ(ierr);
       create=PETSC_TRUE;
     }
   }
   if (create) {
-    ierr = MatDuplicate(A,MAT_COPY_VALUES,&fn->W);CHKERRQ(ierr);
-    ierr = PetscLogObjectParent((PetscObject)fn,(PetscObject)fn->W);CHKERRQ(ierr);
+    ierr = MatDuplicate(A,MAT_COPY_VALUES,&fn->W[fn->cw]);CHKERRQ(ierr);
+    ierr = PetscLogObjectParent((PetscObject)fn,(PetscObject)fn->W[fn->cw]);CHKERRQ(ierr);
   } else {
-    ierr = MatCopy(A,fn->W,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatCopy(A,fn->W[fn->cw],SAME_NONZERO_PATTERN);CHKERRQ(ierr);
   }
+  *M = fn->W[fn->cw];
+  fn->cw++;
   PetscFunctionReturn(0);
 }
 
+#undef __FUNCT__
+#define __FUNCT__ "FN_FreeWorkMat"
+/*
+  FN_FreeWorkMat - Release a work matrix created with FN_AllocateWorkMat().
+*/
+PETSC_STATIC_INLINE PetscErrorCode FN_FreeWorkMat(FN fn,Mat *M)
+{
+  PetscFunctionBegin;
+  if (!fn->cw) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"There are no work matrices");
+  fn->cw--;
+  if (fn->W[fn->cw]!=*M) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Work matrices must be freed in the reverse order of their creation");
+  *M = NULL;
+  PetscFunctionReturn(0);
+}
+
+PETSC_INTERN PetscErrorCode SlepcMatDenseSqrt(PetscBLASInt,PetscScalar*,PetscBLASInt);
+PETSC_INTERN PetscErrorCode SlepcSchurParlettSqrt(PetscBLASInt,PetscScalar*,PetscBLASInt,PetscBool);
+
 #endif
diff --git a/include/slepc/private/fnimpl.h.html b/include/slepc/private/fnimpl.h.html
index da6959d..b141242 100644
--- a/include/slepc/private/fnimpl.h.html
+++ b/include/slepc/private/fnimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/fnimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:42+00:00">
+<meta name="date" content="2016-05-16T10:34:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/fnimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/fnimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,50 +48,79 @@
 <a name="line36"> 36: </a>  PetscErrorCode (*evaluatederivative)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar*);
 <a name="line37"> 37: </a>  PetscErrorCode (*evaluatefunctionmat)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Mat);
 <a name="line38"> 38: </a>  PetscErrorCode (*evaluatefunctionmatsym)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Mat);
-<a name="line39"> 39: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>);
-<a name="line40"> 40: </a>  PetscErrorCode (*view)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscViewer);
-<a name="line41"> 41: </a>  PetscErrorCode (*duplicate)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,MPI_Comm,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>*);
-<a name="line42"> 42: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>);
-<a name="line43"> 43: </a>};
-
-<a name="line45"> 45: </a><font color="#4169E1"><a name="_p_FN"></a>struct _p_FN </font>{
-<a name="line46"> 46: </a>  PETSCHEADER(<font color="#4169E1">struct _FNOps</font>);
-<a name="line47"> 47: </a>  <font color="#B22222">/*------------------------- User parameters --------------------------*/</font>
-<a name="line48"> 48: </a>  PetscScalar        alpha;   <font color="#B22222">/* inner scaling (argument) */</font>
-<a name="line49"> 49: </a>  PetscScalar        beta;    <font color="#B22222">/* outer scaling (result) */</font>
-
-<a name="line51"> 51: </a>  <font color="#B22222">/*---------------------- Cached data and workspace -------------------*/</font>
-<a name="line52"> 52: </a>  Mat                W;       <font color="#B22222">/* workspace matrix */</font>
-<a name="line53"> 53: </a>  void               *data;
-<a name="line54"> 54: </a>};
-
-<a name="line58"> 58: </a><font color="#B22222">/*</font>
-<a name="line59"> 59: </a><font color="#B22222">  FN_AllocateWorkMat - Allocate a working Mat of appropriate size if not available already.</font>
-<a name="line60"> 60: </a><font color="#B22222">*/</font>
-<a name="line61"> 61: </a><strong><font color="#4169E1"><a name="FN_AllocateWorkMat"></a>PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A)</font></strong>
-<a name="line62"> 62: </a>{
-<a name="line64"> 64: </a>  PetscInt       n,na;
-<a name="line65"> 65: </a>  PetscBool      create=PETSC_FALSE;
-
-<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!fn->W) create=PETSC_TRUE;
-<a name="line69"> 69: </a>  <font color="#4169E1">else</font> {
-<a name="line70"> 70: </a>    MatGetSize(fn->W,&n,NULL);
-<a name="line71"> 71: </a>    MatGetSize(A,&na,NULL);
-<a name="line72"> 72: </a>    <font color="#4169E1">if</font> (n!=na) {
-<a name="line73"> 73: </a>      MatDestroy(&fn->W);
-<a name="line74"> 74: </a>      create=PETSC_TRUE;
-<a name="line75"> 75: </a>    }
-<a name="line76"> 76: </a>  }
-<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (create) {
-<a name="line78"> 78: </a>    MatDuplicate(A,MAT_COPY_VALUES,&fn->W);
-<a name="line79"> 79: </a>    PetscLogObjectParent((PetscObject)fn,(PetscObject)fn->W);
-<a name="line80"> 80: </a>  } <font color="#4169E1">else</font> {
-<a name="line81"> 81: </a>    MatCopy(A,fn->W,SAME_NONZERO_PATTERN);
-<a name="line82"> 82: </a>  }
-<a name="line83"> 83: </a>  <font color="#4169E1">return</font>(0);
-<a name="line84"> 84: </a>}
-
-<a name="line86"> 86: </a><font color="#A020F0">#endif</font>
+<a name="line39"> 39: </a>  PetscErrorCode (*evaluatefunctionmatvec)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Vec);
+<a name="line40"> 40: </a>  PetscErrorCode (*evaluatefunctionmatvecsym)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Vec);
+<a name="line41"> 41: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>);
+<a name="line42"> 42: </a>  PetscErrorCode (*view)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscViewer);
+<a name="line43"> 43: </a>  PetscErrorCode (*duplicate)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>,MPI_Comm,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>*);
+<a name="line44"> 44: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>);
+<a name="line45"> 45: </a>};
+
+<a name="line47"> 47: </a><strong><font color="#228B22">#define FN_MAX_W 6</font></strong>
+
+<a name="line49"> 49: </a><font color="#4169E1"><a name="_p_FN"></a>struct _p_FN </font>{
+<a name="line50"> 50: </a>  PETSCHEADER(<font color="#4169E1">struct _FNOps</font>);
+<a name="line51"> 51: </a>  <font color="#B22222">/*------------------------- User parameters --------------------------*/</font>
+<a name="line52"> 52: </a>  PetscScalar alpha;          <font color="#B22222">/* inner scaling (argument) */</font>
+<a name="line53"> 53: </a>  PetscScalar beta;           <font color="#B22222">/* outer scaling (result) */</font>
+
+<a name="line55"> 55: </a>  <font color="#B22222">/*---------------------- Cached data and workspace -------------------*/</font>
+<a name="line56"> 56: </a>  Mat         W[FN_MAX_W];    <font color="#B22222">/* workspace matrices */</font>
+<a name="line57"> 57: </a>  PetscInt    nw;             <font color="#B22222">/* number of allocated W matrices */</font>
+<a name="line58"> 58: </a>  PetscInt    cw;             <font color="#B22222">/* current W matrix */</font>
+<a name="line59"> 59: </a>  void        *data;
+<a name="line60"> 60: </a>};
+
+<a name="line64"> 64: </a><font color="#B22222">/*</font>
+<a name="line65"> 65: </a><font color="#B22222">  FN_AllocateWorkMat - Allocate a work Mat of the same dimension of A and copy</font>
+<a name="line66"> 66: </a><font color="#B22222">  its contents. The work matrix is returned in M and should be freed with</font>
+<a name="line67"> 67: </a><font color="#B22222">  FN_FreeWorkMat().</font>
+<a name="line68"> 68: </a><font color="#B22222">*/</font>
+<a name="line69"> 69: </a><strong><font color="#4169E1"><a name="FN_AllocateWorkMat"></a>PETSC_STATIC_INLINE PetscErrorCode FN_AllocateWorkMat(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat *M)</font></strong>
+<a name="line70"> 70: </a>{
+<a name="line72"> 72: </a>  PetscInt       n,na;
+<a name="line73"> 73: </a>  PetscBool      create=PETSC_FALSE;
+
+<a name="line76"> 76: </a>  *M = NULL;
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (fn->cw==FN_MAX_W) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Too many requested work matrices %D"</font>,fn->cw);
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (fn->nw<=fn->cw) {
+<a name="line79"> 79: </a>    create=PETSC_TRUE;
+<a name="line80"> 80: </a>    fn->nw++;
+<a name="line81"> 81: </a>  } <font color="#4169E1">else</font> {
+<a name="line82"> 82: </a>    MatGetSize(fn->W[fn->cw],&n,NULL);
+<a name="line83"> 83: </a>    MatGetSize(A,&na,NULL);
+<a name="line84"> 84: </a>    <font color="#4169E1">if</font> (n!=na) {
+<a name="line85"> 85: </a>      MatDestroy(&fn->W[fn->cw]);
+<a name="line86"> 86: </a>      create=PETSC_TRUE;
+<a name="line87"> 87: </a>    }
+<a name="line88"> 88: </a>  }
+<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (create) {
+<a name="line90"> 90: </a>    MatDuplicate(A,MAT_COPY_VALUES,&fn->W[fn->cw]);
+<a name="line91"> 91: </a>    PetscLogObjectParent((PetscObject)fn,(PetscObject)fn->W[fn->cw]);
+<a name="line92"> 92: </a>  } <font color="#4169E1">else</font> {
+<a name="line93"> 93: </a>    MatCopy(A,fn->W[fn->cw],SAME_NONZERO_PATTERN);
+<a name="line94"> 94: </a>  }
+<a name="line95"> 95: </a>  *M = fn->W[fn->cw];
+<a name="line96"> 96: </a>  fn->cw++;
+<a name="line97"> 97: </a>  <font color="#4169E1">return</font>(0);
+<a name="line98"> 98: </a>}
+
+<a name="line102">102: </a><font color="#B22222">/*</font>
+<a name="line103">103: </a><font color="#B22222">  FN_FreeWorkMat - Release a work matrix created with FN_AllocateWorkMat().</font>
+<a name="line104">104: </a><font color="#B22222">*/</font>
+<a name="line105">105: </a><strong><font color="#4169E1"><a name="FN_FreeWorkMat"></a>PETSC_STATIC_INLINE PetscErrorCode FN_FreeWorkMat(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat *M)</font></strong>
+<a name="line106">106: </a>{
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (!fn->cw) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"There are no work matrices"</font>);
+<a name="line109">109: </a>  fn->cw--;
+<a name="line110">110: </a>  <font color="#4169E1">if</font> (fn->W[fn->cw]!=*M) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Work matrices must be freed in the reverse order of their creation"</font>);
+<a name="line111">111: </a>  *M = NULL;
+<a name="line112">112: </a>  <font color="#4169E1">return</font>(0);
+<a name="line113">113: </a>}
+
+<a name="line115">115: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcMatDenseSqrt(PetscBLASInt,PetscScalar*,PetscBLASInt)</font></strong>;
+<a name="line116">116: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcSchurParlettSqrt(PetscBLASInt,PetscScalar*,PetscBLASInt,PetscBool)</font></strong>;
+
+<a name="line118">118: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/index.html b/include/slepc/private/index.html
index fea4197..cf55548 100644
--- a/include/slepc/private/index.html
+++ b/include/slepc/private/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
  
 <a href="epsimpl.h.html">epsimpl.h</a><br>
diff --git a/include/slepc/private/makefile b/include/slepc/private/makefile
index 458a787..1947a93 100644
--- a/include/slepc/private/makefile
+++ b/include/slepc/private/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #     
diff --git a/include/slepc/private/makefile.html b/include/slepc/private/makefile.html
index 1ca2f99..81d9726 100644
--- a/include/slepc/private/makefile.html
+++ b/include/slepc/private/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:43+00:00">
+<meta name="date" content="2016-05-16T10:34:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#     </font>
diff --git a/include/slepc/private/mfnimpl.h b/include/slepc/private/mfnimpl.h
index 138001f..3481779 100644
--- a/include/slepc/private/mfnimpl.h
+++ b/include/slepc/private/mfnimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,7 +34,7 @@ typedef struct _MFNOps *MFNOps;
 struct _MFNOps {
   PetscErrorCode (*solve)(MFN,Vec,Vec);
   PetscErrorCode (*setup)(MFN);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,MFN);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,MFN);
   PetscErrorCode (*publishoptions)(MFN);
   PetscErrorCode (*destroy)(MFN);
   PetscErrorCode (*reset)(MFN);
@@ -57,7 +57,6 @@ struct _p_MFN {
   PetscInt       max_it;         /* maximum number of iterations */
   PetscInt       ncv;            /* number of basis vectors */
   PetscReal      tol;            /* tolerance */
-  PetscScalar    sfactor;        /* scaling factor */
   PetscBool      errorifnotconverged;    /* error out if MFNSolve() does not converge */
 
   /*-------------- User-provided functions and contexts -----------------*/
@@ -68,7 +67,6 @@ struct _p_MFN {
 
   /*----------------- Child objects and working data -------------------*/
   BV             V;              /* set of basis vectors */
-  PetscRandom    rand;           /* random number generator */
   PetscInt       nwork;          /* number of work vectors */
   Vec            *work;          /* work vectors */
   void           *data;          /* placeholder for solver-specific stuff */
@@ -77,8 +75,63 @@ struct _p_MFN {
   PetscInt       its;            /* number of iterations so far computed */
   PetscInt       nv;             /* size of current Schur decomposition */
   PetscReal      errest;         /* error estimate */
+  PetscReal      bnorm;          /* computed norm of right-hand side in current solve */
   PetscInt       setupcalled;
   MFNConvergedReason reason;
 };
 
+#undef __FUNCT__
+#define __FUNCT__ "MFN_CreateDenseMat"
+/*
+   MFN_CreateDenseMat - Creates a dense Mat of size k unless it already has that size
+*/
+PETSC_STATIC_INLINE PetscErrorCode MFN_CreateDenseMat(PetscInt k,Mat *A)
+{
+  PetscErrorCode ierr;
+  PetscBool      create=PETSC_FALSE;
+  PetscInt       m,n;
+
+  PetscFunctionBegin;
+  if (!*A) create=PETSC_TRUE;
+  else {
+    ierr = MatGetSize(*A,&m,&n);CHKERRQ(ierr);
+    if (m!=k || n!=k) {
+      ierr = MatDestroy(A);CHKERRQ(ierr);
+      create=PETSC_TRUE;
+    }
+  }
+  if (create) {
+    ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,A);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MFN_CreateVec"
+/*
+   MFN_CreateVec - Creates a Vec of size k unless it already has that size
+*/
+PETSC_STATIC_INLINE PetscErrorCode MFN_CreateVec(PetscInt k,Vec *v)
+{
+  PetscErrorCode ierr;
+  PetscBool      create=PETSC_FALSE;
+  PetscInt       n;
+
+  PetscFunctionBegin;
+  if (!*v) create=PETSC_TRUE;
+  else {
+    ierr = VecGetSize(*v,&n);CHKERRQ(ierr);
+    if (n!=k) {
+      ierr = VecDestroy(v);CHKERRQ(ierr);
+      create=PETSC_TRUE;
+    }
+  }
+  if (create) {
+    ierr = VecCreateSeq(PETSC_COMM_SELF,k,v);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+PETSC_INTERN PetscErrorCode MFNBasicArnoldi(MFN,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*);
+
 #endif
diff --git a/include/slepc/private/mfnimpl.h.html b/include/slepc/private/mfnimpl.h.html
index 20da77e..4b2108c 100644
--- a/include/slepc/private/mfnimpl.h.html
+++ b/include/slepc/private/mfnimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/mfnimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:42+00:00">
+<meta name="date" content="2016-05-16T10:34:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/mfnimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/mfnimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line34"> 34: </a><font color="#4169E1"><a name="_MFNOps"></a>struct _MFNOps </font>{
 <a name="line35"> 35: </a>  PetscErrorCode (*solve)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Vec,Vec);
 <a name="line36"> 36: </a>  PetscErrorCode (*setup)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
-<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
+<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
 <a name="line38"> 38: </a>  PetscErrorCode (*publishoptions)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
 <a name="line39"> 39: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
 <a name="line40"> 40: </a>  PetscErrorCode (*reset)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
@@ -69,31 +69,76 @@
 <a name="line57"> 57: </a>  PetscInt       max_it;         <font color="#B22222">/* maximum number of iterations */</font>
 <a name="line58"> 58: </a>  PetscInt       ncv;            <font color="#B22222">/* number of basis vectors */</font>
 <a name="line59"> 59: </a>  PetscReal      tol;            <font color="#B22222">/* tolerance */</font>
-<a name="line60"> 60: </a>  PetscScalar    sfactor;        <font color="#B22222">/* scaling factor */</font>
-<a name="line61"> 61: </a>  PetscBool      errorifnotconverged;    <font color="#B22222">/* error out if <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() does not converge */</font>
-
-<a name="line63"> 63: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
-<a name="line64"> 64: </a>  PetscErrorCode (*monitor[MAXMFNMONITORS])(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*);
-<a name="line65"> 65: </a>  PetscErrorCode (*monitordestroy[MAXMFNMONITORS])(void**);
-<a name="line66"> 66: </a>  void           *monitorcontext[MAXMFNMONITORS];
-<a name="line67"> 67: </a>  PetscInt       numbermonitors;
-
-<a name="line69"> 69: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
-<a name="line70"> 70: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;              <font color="#B22222">/* set of basis vectors */</font>
-<a name="line71"> 71: </a>  PetscRandom    rand;           <font color="#B22222">/* random number generator */</font>
-<a name="line72"> 72: </a>  PetscInt       nwork;          <font color="#B22222">/* number of work vectors */</font>
-<a name="line73"> 73: </a>  Vec            *work;          <font color="#B22222">/* work vectors */</font>
-<a name="line74"> 74: </a>  void           *data;          <font color="#B22222">/* placeholder for solver-specific stuff */</font>
-
-<a name="line76"> 76: </a>  <font color="#B22222">/* ----------------------- Status variables -------------------------- */</font>
-<a name="line77"> 77: </a>  PetscInt       its;            <font color="#B22222">/* number of iterations so far computed */</font>
-<a name="line78"> 78: </a>  PetscInt       nv;             <font color="#B22222">/* size of current Schur decomposition */</font>
-<a name="line79"> 79: </a>  PetscReal      errest;         <font color="#B22222">/* error estimate */</font>
-<a name="line80"> 80: </a>  PetscInt       setupcalled;
-<a name="line81"> 81: </a>  <a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> reason;
-<a name="line82"> 82: </a>};
-
-<a name="line84"> 84: </a><font color="#A020F0">#endif</font>
+<a name="line60"> 60: </a>  PetscBool      errorifnotconverged;    <font color="#B22222">/* error out if <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() does not converge */</font>
+
+<a name="line62"> 62: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
+<a name="line63"> 63: </a>  PetscErrorCode (*monitor[MAXMFNMONITORS])(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*);
+<a name="line64"> 64: </a>  PetscErrorCode (*monitordestroy[MAXMFNMONITORS])(void**);
+<a name="line65"> 65: </a>  void           *monitorcontext[MAXMFNMONITORS];
+<a name="line66"> 66: </a>  PetscInt       numbermonitors;
+
+<a name="line68"> 68: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
+<a name="line69"> 69: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;              <font color="#B22222">/* set of basis vectors */</font>
+<a name="line70"> 70: </a>  PetscInt       nwork;          <font color="#B22222">/* number of work vectors */</font>
+<a name="line71"> 71: </a>  Vec            *work;          <font color="#B22222">/* work vectors */</font>
+<a name="line72"> 72: </a>  void           *data;          <font color="#B22222">/* placeholder for solver-specific stuff */</font>
+
+<a name="line74"> 74: </a>  <font color="#B22222">/* ----------------------- Status variables -------------------------- */</font>
+<a name="line75"> 75: </a>  PetscInt       its;            <font color="#B22222">/* number of iterations so far computed */</font>
+<a name="line76"> 76: </a>  PetscInt       nv;             <font color="#B22222">/* size of current Schur decomposition */</font>
+<a name="line77"> 77: </a>  PetscReal      errest;         <font color="#B22222">/* error estimate */</font>
+<a name="line78"> 78: </a>  PetscReal      bnorm;          <font color="#B22222">/* computed norm of right-hand side in current solve */</font>
+<a name="line79"> 79: </a>  PetscInt       setupcalled;
+<a name="line80"> 80: </a>  <a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> reason;
+<a name="line81"> 81: </a>};
+
+<a name="line85"> 85: </a><font color="#B22222">/*</font>
+<a name="line86"> 86: </a><font color="#B22222">   MFN_CreateDenseMat - Creates a dense Mat of size k unless it already has that size</font>
+<a name="line87"> 87: </a><font color="#B22222">*/</font>
+<a name="line88"> 88: </a><strong><font color="#4169E1"><a name="MFN_CreateDenseMat"></a>PETSC_STATIC_INLINE PetscErrorCode MFN_CreateDenseMat(PetscInt k,Mat *A)</font></strong>
+<a name="line89"> 89: </a>{
+<a name="line91"> 91: </a>  PetscBool      create=PETSC_FALSE;
+<a name="line92"> 92: </a>  PetscInt       m,n;
+
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (!*A) create=PETSC_TRUE;
+<a name="line96"> 96: </a>  <font color="#4169E1">else</font> {
+<a name="line97"> 97: </a>    MatGetSize(*A,&m,&n);
+<a name="line98"> 98: </a>    <font color="#4169E1">if</font> (m!=k || n!=k) {
+<a name="line99"> 99: </a>      MatDestroy(A);
+<a name="line100">100: </a>      create=PETSC_TRUE;
+<a name="line101">101: </a>    }
+<a name="line102">102: </a>  }
+<a name="line103">103: </a>  <font color="#4169E1">if</font> (create) {
+<a name="line104">104: </a>    MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,A);
+<a name="line105">105: </a>  }
+<a name="line106">106: </a>  <font color="#4169E1">return</font>(0);
+<a name="line107">107: </a>}
+
+<a name="line111">111: </a><font color="#B22222">/*</font>
+<a name="line112">112: </a><font color="#B22222">   MFN_CreateVec - Creates a Vec of size k unless it already has that size</font>
+<a name="line113">113: </a><font color="#B22222">*/</font>
+<a name="line114">114: </a><strong><font color="#4169E1"><a name="MFN_CreateVec"></a>PETSC_STATIC_INLINE PetscErrorCode MFN_CreateVec(PetscInt k,Vec *v)</font></strong>
+<a name="line115">115: </a>{
+<a name="line117">117: </a>  PetscBool      create=PETSC_FALSE;
+<a name="line118">118: </a>  PetscInt       n;
+
+<a name="line121">121: </a>  <font color="#4169E1">if</font> (!*v) create=PETSC_TRUE;
+<a name="line122">122: </a>  <font color="#4169E1">else</font> {
+<a name="line123">123: </a>    VecGetSize(*v,&n);
+<a name="line124">124: </a>    <font color="#4169E1">if</font> (n!=k) {
+<a name="line125">125: </a>      VecDestroy(v);
+<a name="line126">126: </a>      create=PETSC_TRUE;
+<a name="line127">127: </a>    }
+<a name="line128">128: </a>  }
+<a name="line129">129: </a>  <font color="#4169E1">if</font> (create) {
+<a name="line130">130: </a>    VecCreateSeq(PETSC_COMM_SELF,k,v);
+<a name="line131">131: </a>  }
+<a name="line132">132: </a>  <font color="#4169E1">return</font>(0);
+<a name="line133">133: </a>}
+
+<a name="line135">135: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode MFNBasicArnoldi(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscScalar*,PetscInt,PetscInt,PetscInt*,PetscReal*,PetscBool*)</font></strong>;
+
+<a name="line137">137: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/nepimpl.h b/include/slepc/private/nepimpl.h
index 41c8eff..988f6ba 100644
--- a/include/slepc/private/nepimpl.h
+++ b/include/slepc/private/nepimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -27,14 +27,14 @@
 
 PETSC_EXTERN PetscBool NEPRegisterAllCalled;
 PETSC_EXTERN PetscErrorCode NEPRegisterAll(void);
-PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;
+PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;
 
 typedef struct _NEPOps *NEPOps;
 
 struct _NEPOps {
   PetscErrorCode (*solve)(NEP);
   PetscErrorCode (*setup)(NEP);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,NEP);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,NEP);
   PetscErrorCode (*publishoptions)(NEP);
   PetscErrorCode (*destroy)(NEP);
   PetscErrorCode (*reset)(NEP);
@@ -53,28 +53,36 @@ typedef enum { NEP_STATE_INITIAL,
                NEP_STATE_EIGENVECTORS } NEPStateType;
 
 /*
+     How the problem function T(lambda) has been defined by the user
+     - Callback: one callback to build the function matrix, another one for the Jacobian
+     - Split: in split form sum_j(A_j*f_j(lambda))
+     - Derivatives: a single callback for all the derivatives (including the 0th derivative)
+*/
+typedef enum { NEP_USER_INTERFACE_CALLBACK=1,
+               NEP_USER_INTERFACE_SPLIT,
+               NEP_USER_INTERFACE_DERIVATIVES } NEPUserInterface;
+
+/*
    Defines the NEP data structure.
 */
 struct _p_NEP {
   PETSCHEADER(struct _NEPOps);
   /*------------------------- User parameters ---------------------------*/
   PetscInt       max_it;           /* maximum number of iterations */
-  PetscInt       max_funcs;        /* maximum number of function evaluations */
   PetscInt       nev;              /* number of eigenvalues to compute */
   PetscInt       ncv;              /* number of basis vectors */
   PetscInt       mpd;              /* maximum dimension of projected problem */
-  PetscInt       lag;              /* interval to rebuild preconditioner */
   PetscInt       nini;             /* number of initial vectors (negative means not copied yet) */
   PetscScalar    target;           /* target value */
-  PetscReal      abstol,rtol,stol; /* user tolerances */
-  PetscReal      ktol;             /* tolerance for linear solver */
-  PetscBool      cctol;            /* constant correction tolerance */
-  PetscReal      ttol;             /* tolerance used in the convergence criterion */
+  PetscReal      tol;              /* tolerance */
+  NEPConv        conv;             /* convergence test */
+  NEPStop        stop;             /* stopping test */
   NEPWhich       which;            /* which part of the spectrum to be sought */
   NEPRefine      refine;           /* type of refinement to be applied after solve */
   PetscInt       npart;            /* number of partitions of the communicator */
-  PetscReal      reftol;           /* tolerance for refinement */
+  PetscReal      rtol;             /* tolerance for refinement */
   PetscInt       rits;             /* number of iterations of the refinement method */
+  NEPRefineScheme scheme;          /* scheme for solving linear systems within refinement */
   PetscBool      trackall;         /* whether all the residuals must be computed */
 
   /*-------------- User-provided functions and contexts -----------------*/
@@ -82,10 +90,15 @@ struct _p_NEP {
   PetscErrorCode (*computejacobian)(NEP,PetscScalar,Mat,void*);
   void           *functionctx;
   void           *jacobianctx;
-  PetscErrorCode (*converged)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*);
+  PetscErrorCode (*computederivatives)(NEP,PetscScalar,PetscInt,Mat,void*);
+  void           *derivativesctx;
+  PetscErrorCode (*converged)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
   PetscErrorCode (*convergeddestroy)(void*);
+  PetscErrorCode (*stopping)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*);
+  PetscErrorCode (*stoppingdestroy)(void*);
   void           *convergedctx;
-  PetscErrorCode (*monitor[MAXNEPMONITORS])(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
+  void           *stoppingctx;
+  PetscErrorCode (*monitor[MAXNEPMONITORS])(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
   PetscErrorCode (*monitordestroy[MAXNEPMONITORS])(void**);
   void           *monitorcontext[MAXNEPMONITORS];
   PetscInt       numbermonitors;
@@ -94,12 +107,11 @@ struct _p_NEP {
   DS             ds;               /* direct solver object */
   BV             V;                /* set of basis vectors and computed eigenvectors */
   RG             rg;               /* optional region for filtering */
-  PetscRandom    rand;             /* random number generator */
   SlepcSC        sc;               /* sorting criterion data */
-  KSP            ksp;              /* linear solver object */
   Mat            function;         /* function matrix */
   Mat            function_pre;     /* function matrix (preconditioner) */
   Mat            jacobian;         /* Jacobian matrix */
+  Mat            derivatives;      /* derivatives matrix */
   Mat            *A;               /* matrix coefficients of split form */
   FN             *f;               /* matrix functions of split form */
   PetscInt       nt;               /* number of terms in split form */
@@ -110,6 +122,8 @@ struct _p_NEP {
   PetscInt       *perm;            /* permutation for eigenvalue ordering */
   PetscInt       nwork;            /* number of work vectors */
   Vec            *work;            /* work vectors */
+  KSP            refineksp;        /* ksp used in refinement */
+  PetscSubcomm   refinesubc;       /* context for sub-communicators */
   void           *data;            /* placeholder for solver-specific stuff */
 
   /* ----------------------- Status variables --------------------------*/
@@ -117,9 +131,8 @@ struct _p_NEP {
   PetscInt       nconv;            /* number of converged eigenvalues */
   PetscInt       its;              /* number of iterations so far computed */
   PetscInt       n,nloc;           /* problem dimensions (global, local) */
-  PetscInt       nfuncs;           /* number of function evaluations */
-  PetscBool      split;            /* the nonlinear operator has been set in
-                                      split form, otherwise user callbacks are used */
+  PetscReal      *nrma;            /* computed matrix norms */
+  NEPUserInterface fui;            /* how the user has defined the nonlinear operator */
   NEPConvergedReason reason;
 };
 
@@ -128,10 +141,34 @@ struct _p_NEP {
 */
 #if !defined(PETSC_USE_DEBUG)
 
+#define NEPCheckProblem(h,arg) do {} while (0)
+#define NEPCheckCallback(h,arg) do {} while (0)
+#define NEPCheckSplit(h,arg) do {} while (0)
+#define NEPCheckDerivatives(h,arg) do {} while (0)
 #define NEPCheckSolved(h,arg) do {} while (0)
 
 #else
 
+#define NEPCheckProblem(h,arg) \
+  do { \
+    if (!(h->fui)) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,"The nonlinear eigenproblem has not been specified yet. Parameter #%d",arg); \
+  } while (0)
+
+#define NEPCheckCallback(h,arg) \
+  do { \
+    if (h->fui!=NEP_USER_INTERFACE_CALLBACK) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,"This operation requires the nonlinear eigenproblem specified with callbacks. Parameter #%d",arg); \
+  } while (0)
+
+#define NEPCheckSplit(h,arg) \
+  do { \
+    if (h->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,"This operation requires the nonlinear eigenproblem in split form. Parameter #%d",arg); \
+  } while (0)
+
+#define NEPCheckDerivatives(h,arg) \
+  do { \
+    if (h->fui!=NEP_USER_INTERFACE_DERIVATIVES) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,"This operation requires the nonlinear eigenproblem specified with derivatives callback. Parameter #%d",arg); \
+  } while (0)
+
 #define NEPCheckSolved(h,arg) \
   do { \
     if (h->state<NEP_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,"Must call NEPSolve() first: Parameter #%d",arg); \
@@ -139,23 +176,12 @@ struct _p_NEP {
 
 #endif
 
-#undef __FUNCT__
-#define __FUNCT__ "NEP_KSPSolve"
-PETSC_STATIC_INLINE PetscErrorCode NEP_KSPSolve(NEP nep,Vec b,Vec x)
-{
-  PetscErrorCode ierr;
-  PetscInt       lits;
-
-  PetscFunctionBegin;
-  ierr = KSPSolve(nep->ksp,b,x);CHKERRQ(ierr);
-  ierr = KSPGetIterationNumber(nep->ksp,&lits);CHKERRQ(ierr);
-  ierr = PetscInfo2(nep,"iter=%D, linear solve iterations=%D\n",nep->its,lits);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
+PETSC_INTERN PetscErrorCode NEPSetDimensions_Default(NEP,PetscInt,PetscInt*,PetscInt*);
 PETSC_INTERN PetscErrorCode NEPComputeVectors(NEP);
+PETSC_INTERN PetscErrorCode NEPReset_Problem(NEP);
 PETSC_INTERN PetscErrorCode NEPGetDefaultShift(NEP,PetscScalar*);
+PETSC_INTERN PetscErrorCode NEPComputeVectors_Schur(NEP);
 PETSC_INTERN PetscErrorCode NEPComputeResidualNorm_Private(NEP,PetscScalar,Vec,Vec*,PetscReal*);
-PETSC_INTERN PetscErrorCode NEPNewtonRefinementSimple(NEP,PetscInt*,PetscReal*,PetscInt);
+PETSC_INTERN PetscErrorCode NEPNewtonRefinementSimple(NEP,PetscInt*,PetscReal,PetscInt);
 
 #endif
diff --git a/include/slepc/private/nepimpl.h.html b/include/slepc/private/nepimpl.h.html
index 9e3d04e..44a4a25 100644
--- a/include/slepc/private/nepimpl.h.html
+++ b/include/slepc/private/nepimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/nepimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:42+00:00">
+<meta name="date" content="2016-05-16T10:34:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/nepimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/nepimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,14 +39,14 @@
 
 <a name="line28"> 28: </a>PETSC_EXTERN PetscBool NEPRegisterAllCalled;
 <a name="line29"> 29: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>(void)</font></strong>;
-<a name="line30"> 30: </a>PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval;
+<a name="line30"> 30: </a>PETSC_EXTERN PetscLogEvent NEP_SetUp,NEP_Solve,NEP_Refine,NEP_FunctionEval,NEP_JacobianEval,NEP_DerivativesEval;
 
 <a name="line32"> 32: </a><font color="#4169E1">typedef struct _NEPOps *NEPOps;</font>
 
 <a name="line34"> 34: </a><font color="#4169E1"><a name="_NEPOps"></a>struct _NEPOps </font>{
 <a name="line35"> 35: </a>  PetscErrorCode (*solve)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
 <a name="line36"> 36: </a>  PetscErrorCode (*setup)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
-<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
+<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
 <a name="line38"> 38: </a>  PetscErrorCode (*publishoptions)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
 <a name="line39"> 39: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
 <a name="line40"> 40: </a>  PetscErrorCode (*reset)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
@@ -65,108 +65,138 @@
 <a name="line53"> 53: </a>               NEP_STATE_EIGENVECTORS } NEPStateType;
 
 <a name="line55"> 55: </a><font color="#B22222">/*</font>
-<a name="line56"> 56: </a><font color="#B22222">   Defines the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> data structure.</font>
-<a name="line57"> 57: </a><font color="#B22222">*/</font>
-<a name="line58"> 58: </a><font color="#4169E1"><a name="_p_NEP"></a>struct _p_NEP </font>{
-<a name="line59"> 59: </a>  PETSCHEADER(<font color="#4169E1">struct _NEPOps</font>);
-<a name="line60"> 60: </a>  <font color="#B22222">/*------------------------- User parameters ---------------------------*/</font>
-<a name="line61"> 61: </a>  PetscInt       max_it;           <font color="#B22222">/* maximum number of iterations */</font>
-<a name="line62"> 62: </a>  PetscInt       max_funcs;        <font color="#B22222">/* maximum number of function evaluations */</font>
-<a name="line63"> 63: </a>  PetscInt       nev;              <font color="#B22222">/* number of eigenvalues to compute */</font>
-<a name="line64"> 64: </a>  PetscInt       ncv;              <font color="#B22222">/* number of basis vectors */</font>
-<a name="line65"> 65: </a>  PetscInt       mpd;              <font color="#B22222">/* maximum dimension of projected problem */</font>
-<a name="line66"> 66: </a>  PetscInt       lag;              <font color="#B22222">/* interval to rebuild preconditioner */</font>
-<a name="line67"> 67: </a>  PetscInt       nini;             <font color="#B22222">/* number of initial vectors (negative means not copied yet) */</font>
-<a name="line68"> 68: </a>  PetscScalar    target;           <font color="#B22222">/* target value */</font>
-<a name="line69"> 69: </a>  PetscReal      abstol,rtol,stol; <font color="#B22222">/* user tolerances */</font>
-<a name="line70"> 70: </a>  PetscReal      ktol;             <font color="#B22222">/* tolerance for linear solver */</font>
-<a name="line71"> 71: </a>  PetscBool      cctol;            <font color="#B22222">/* constant correction tolerance */</font>
-<a name="line72"> 72: </a>  PetscReal      ttol;             <font color="#B22222">/* tolerance used in the convergence criterion */</font>
-<a name="line73"> 73: </a>  <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>       which;            <font color="#B22222">/* which part of the spectrum to be sought */</font>
-<a name="line74"> 74: </a>  <a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>      refine;           <font color="#B22222">/* type of refinement to be applied after solve */</font>
-<a name="line75"> 75: </a>  PetscInt       npart;            <font color="#B22222">/* number of partitions of the communicator */</font>
-<a name="line76"> 76: </a>  PetscReal      reftol;           <font color="#B22222">/* tolerance for refinement */</font>
-<a name="line77"> 77: </a>  PetscInt       rits;             <font color="#B22222">/* number of iterations of the refinement method */</font>
-<a name="line78"> 78: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
-
-<a name="line80"> 80: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
-<a name="line81"> 81: </a>  PetscErrorCode (*computefunction)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*);
-<a name="line82"> 82: </a>  PetscErrorCode (*computejacobian)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*);
-<a name="line83"> 83: </a>  void           *functionctx;
-<a name="line84"> 84: </a>  void           *jacobianctx;
-<a name="line85"> 85: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscReal,PetscReal,PetscReal,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>*,void*);
-<a name="line86"> 86: </a>  PetscErrorCode (*convergeddestroy)(void*);
-<a name="line87"> 87: </a>  void           *convergedctx;
-<a name="line88"> 88: </a>  PetscErrorCode (*monitor[MAXNEPMONITORS])(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
-<a name="line89"> 89: </a>  PetscErrorCode (*monitordestroy[MAXNEPMONITORS])(void**);
-<a name="line90"> 90: </a>  void           *monitorcontext[MAXNEPMONITORS];
-<a name="line91"> 91: </a>  PetscInt       numbermonitors;
-
-<a name="line93"> 93: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
-<a name="line94"> 94: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
-<a name="line95"> 95: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;                <font color="#B22222">/* set of basis vectors and computed eigenvectors */</font>
-<a name="line96"> 96: </a>  <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;               <font color="#B22222">/* optional region for filtering */</font>
-<a name="line97"> 97: </a>  PetscRandom    rand;             <font color="#B22222">/* random number generator */</font>
-<a name="line98"> 98: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
-<a name="line99"> 99: </a>  KSP            ksp;              <font color="#B22222">/* linear solver object */</font>
-<a name="line100">100: </a>  Mat            function;         <font color="#B22222">/* function matrix */</font>
-<a name="line101">101: </a>  Mat            function_pre;     <font color="#B22222">/* function matrix (preconditioner) */</font>
-<a name="line102">102: </a>  Mat            jacobian;         <font color="#B22222">/* Jacobian matrix */</font>
-<a name="line103">103: </a>  Mat            *A;               <font color="#B22222">/* matrix coefficients of split form */</font>
-<a name="line104">104: </a>  <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>             *f;               <font color="#B22222">/* matrix functions of split form */</font>
-<a name="line105">105: </a>  PetscInt       nt;               <font color="#B22222">/* number of terms in split form */</font>
-<a name="line106">106: </a>  MatStructure   mstr;             <font color="#B22222">/* pattern of split matrices */</font>
-<a name="line107">107: </a>  Vec            *IS;              <font color="#B22222">/* references to user-provided initial space */</font>
-<a name="line108">108: </a>  PetscScalar    *eigr,*eigi;      <font color="#B22222">/* real and imaginary parts of eigenvalues */</font>
-<a name="line109">109: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
-<a name="line110">110: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for eigenvalue ordering */</font>
-<a name="line111">111: </a>  PetscInt       nwork;            <font color="#B22222">/* number of work vectors */</font>
-<a name="line112">112: </a>  Vec            *work;            <font color="#B22222">/* work vectors */</font>
-<a name="line113">113: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
-
-<a name="line115">115: </a>  <font color="#B22222">/* ----------------------- Status variables --------------------------*/</font>
-<a name="line116">116: </a>  NEPStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> eigenvectors */</font>
-<a name="line117">117: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged eigenvalues */</font>
-<a name="line118">118: </a>  PetscInt       its;              <font color="#B22222">/* number of iterations so far computed */</font>
-<a name="line119">119: </a>  PetscInt       n,nloc;           <font color="#B22222">/* problem dimensions (global, local) */</font>
-<a name="line120">120: </a>  PetscInt       nfuncs;           <font color="#B22222">/* number of function evaluations */</font>
-<a name="line121">121: </a>  PetscBool      split;            <font color="#B22222">/* the nonlinear operator has been set in</font>
-<a name="line122">122: </a><font color="#B22222">                                      split form, otherwise user callbacks are used */</font>
-<a name="line123">123: </a>  <a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> reason;
-<a name="line124">124: </a>};
-
-<a name="line126">126: </a><font color="#B22222">/*</font>
-<a name="line127">127: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> arguments</font>
-<a name="line128">128: </a><font color="#B22222">*/</font>
-<a name="line129">129: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
-
-<a name="line131">131: </a><strong><font color="#228B22">#define NEPCheckSolved(h,arg) do {} while (0)</font></strong>
-
-<a name="line133">133: </a><font color="#A020F0">#else</font>
-
-<a name="line135">135: </a><strong><font color="#228B22">#define NEPCheckSolved(h,arg) \</font></strong>
-<a name="line136">136: </a><strong><font color="#228B22">  do { \</font></strong>
-<a name="line137">137: </a><strong><font color="#228B22">    if (h->state<NEP_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
-<a name="line138">138: </a><strong><font color="#228B22">  } while (0)</font></strong>
-
-<a name="line140">140: </a><font color="#A020F0">#endif</font>
-
-<a name="line144">144: </a><strong><font color="#4169E1"><a name="NEP_KSPSolve"></a>PETSC_STATIC_INLINE PetscErrorCode NEP_KSPSolve(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Vec b,Vec x)</font></strong>
-<a name="line145">145: </a>{
-<a name="line147">147: </a>  PetscInt       lits;
-
-<a name="line150">150: </a>  KSPSolve(nep->ksp,b,x);
-<a name="line151">151: </a>  KSPGetIterationNumber(nep->ksp,&lits);
-<a name="line152">152: </a>  PetscInfo2(nep,<font color="#666666">"iter=%D, linear solve iterations=%D\n"</font>,nep->its,lits);
-<a name="line153">153: </a>  <font color="#4169E1">return</font>(0);
-<a name="line154">154: </a>}
-
-<a name="line156">156: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPComputeVectors(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line157">157: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPGetDefaultShift(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar*)</font></strong>;
-<a name="line158">158: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Vec,Vec*,PetscReal*)</font></strong>;
-<a name="line159">159: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPNewtonRefinementSimple(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscReal*,PetscInt)</font></strong>;
-
-<a name="line161">161: </a><font color="#A020F0">#endif</font>
+<a name="line56"> 56: </a><font color="#B22222">     How the problem function T(lambda) has been defined by the user</font>
+<a name="line57"> 57: </a><font color="#B22222">     - Callback: one callback to build the function matrix, another one for the Jacobian</font>
+<a name="line58"> 58: </a><font color="#B22222">     - Split: in split form sum_j(A_j*f_j(lambda))</font>
+<a name="line59"> 59: </a><font color="#B22222">     - Derivatives: a single callback for all the derivatives (including the 0th derivative)</font>
+<a name="line60"> 60: </a><font color="#B22222">*/</font>
+<a name="line61"> 61: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_USER_INTERFACE_CALLBACK=1,
+<a name="line62"> 62: </a>               NEP_USER_INTERFACE_SPLIT,
+<a name="line63"> 63: </a>               NEP_USER_INTERFACE_DERIVATIVES } NEPUserInterface;
+
+<a name="line65"> 65: </a><font color="#B22222">/*</font>
+<a name="line66"> 66: </a><font color="#B22222">   Defines the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> data structure.</font>
+<a name="line67"> 67: </a><font color="#B22222">*/</font>
+<a name="line68"> 68: </a><font color="#4169E1"><a name="_p_NEP"></a>struct _p_NEP </font>{
+<a name="line69"> 69: </a>  PETSCHEADER(<font color="#4169E1">struct _NEPOps</font>);
+<a name="line70"> 70: </a>  <font color="#B22222">/*------------------------- User parameters ---------------------------*/</font>
+<a name="line71"> 71: </a>  PetscInt       max_it;           <font color="#B22222">/* maximum number of iterations */</font>
+<a name="line72"> 72: </a>  PetscInt       nev;              <font color="#B22222">/* number of eigenvalues to compute */</font>
+<a name="line73"> 73: </a>  PetscInt       ncv;              <font color="#B22222">/* number of basis vectors */</font>
+<a name="line74"> 74: </a>  PetscInt       mpd;              <font color="#B22222">/* maximum dimension of projected problem */</font>
+<a name="line75"> 75: </a>  PetscInt       nini;             <font color="#B22222">/* number of initial vectors (negative means not copied yet) */</font>
+<a name="line76"> 76: </a>  PetscScalar    target;           <font color="#B22222">/* target value */</font>
+<a name="line77"> 77: </a>  PetscReal      tol;              <font color="#B22222">/* tolerance */</font>
+<a name="line78"> 78: </a>  <a href="../../../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a>        conv;             <font color="#B22222">/* convergence test */</font>
+<a name="line79"> 79: </a>  <a href="../../../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a>        stop;             <font color="#B22222">/* stopping test */</font>
+<a name="line80"> 80: </a>  <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>       which;            <font color="#B22222">/* which part of the spectrum to be sought */</font>
+<a name="line81"> 81: </a>  <a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>      refine;           <font color="#B22222">/* type of refinement to be applied after solve */</font>
+<a name="line82"> 82: </a>  PetscInt       npart;            <font color="#B22222">/* number of partitions of the communicator */</font>
+<a name="line83"> 83: </a>  PetscReal      rtol;             <font color="#B22222">/* tolerance for refinement */</font>
+<a name="line84"> 84: </a>  PetscInt       rits;             <font color="#B22222">/* number of iterations of the refinement method */</font>
+<a name="line85"> 85: </a>  <a href="../../../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a> scheme;          <font color="#B22222">/* scheme for solving linear systems within refinement */</font>
+<a name="line86"> 86: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
+
+<a name="line88"> 88: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
+<a name="line89"> 89: </a>  PetscErrorCode (*computefunction)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*);
+<a name="line90"> 90: </a>  PetscErrorCode (*computejacobian)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*);
+<a name="line91"> 91: </a>  void           *functionctx;
+<a name="line92"> 92: </a>  void           *jacobianctx;
+<a name="line93"> 93: </a>  PetscErrorCode (*computederivatives)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscInt,Mat,void*);
+<a name="line94"> 94: </a>  void           *derivativesctx;
+<a name="line95"> 95: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+<a name="line96"> 96: </a>  PetscErrorCode (*convergeddestroy)(void*);
+<a name="line97"> 97: </a>  PetscErrorCode (*stopping)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>*,void*);
+<a name="line98"> 98: </a>  PetscErrorCode (*stoppingdestroy)(void*);
+<a name="line99"> 99: </a>  void           *convergedctx;
+<a name="line100">100: </a>  void           *stoppingctx;
+<a name="line101">101: </a>  PetscErrorCode (*monitor[MAXNEPMONITORS])(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
+<a name="line102">102: </a>  PetscErrorCode (*monitordestroy[MAXNEPMONITORS])(void**);
+<a name="line103">103: </a>  void           *monitorcontext[MAXNEPMONITORS];
+<a name="line104">104: </a>  PetscInt       numbermonitors;
+
+<a name="line106">106: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
+<a name="line107">107: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
+<a name="line108">108: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;                <font color="#B22222">/* set of basis vectors and computed eigenvectors */</font>
+<a name="line109">109: </a>  <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;               <font color="#B22222">/* optional region for filtering */</font>
+<a name="line110">110: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
+<a name="line111">111: </a>  Mat            function;         <font color="#B22222">/* function matrix */</font>
+<a name="line112">112: </a>  Mat            function_pre;     <font color="#B22222">/* function matrix (preconditioner) */</font>
+<a name="line113">113: </a>  Mat            jacobian;         <font color="#B22222">/* Jacobian matrix */</font>
+<a name="line114">114: </a>  Mat            derivatives;      <font color="#B22222">/* derivatives matrix */</font>
+<a name="line115">115: </a>  Mat            *A;               <font color="#B22222">/* matrix coefficients of split form */</font>
+<a name="line116">116: </a>  <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>             *f;               <font color="#B22222">/* matrix functions of split form */</font>
+<a name="line117">117: </a>  PetscInt       nt;               <font color="#B22222">/* number of terms in split form */</font>
+<a name="line118">118: </a>  MatStructure   mstr;             <font color="#B22222">/* pattern of split matrices */</font>
+<a name="line119">119: </a>  Vec            *IS;              <font color="#B22222">/* references to user-provided initial space */</font>
+<a name="line120">120: </a>  PetscScalar    *eigr,*eigi;      <font color="#B22222">/* real and imaginary parts of eigenvalues */</font>
+<a name="line121">121: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
+<a name="line122">122: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for eigenvalue ordering */</font>
+<a name="line123">123: </a>  PetscInt       nwork;            <font color="#B22222">/* number of work vectors */</font>
+<a name="line124">124: </a>  Vec            *work;            <font color="#B22222">/* work vectors */</font>
+<a name="line125">125: </a>  KSP            refineksp;        <font color="#B22222">/* ksp used in refinement */</font>
+<a name="line126">126: </a>  PetscSubcomm   refinesubc;       <font color="#B22222">/* context for sub-communicators */</font>
+<a name="line127">127: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
+
+<a name="line129">129: </a>  <font color="#B22222">/* ----------------------- Status variables --------------------------*/</font>
+<a name="line130">130: </a>  NEPStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> eigenvectors */</font>
+<a name="line131">131: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged eigenvalues */</font>
+<a name="line132">132: </a>  PetscInt       its;              <font color="#B22222">/* number of iterations so far computed */</font>
+<a name="line133">133: </a>  PetscInt       n,nloc;           <font color="#B22222">/* problem dimensions (global, local) */</font>
+<a name="line134">134: </a>  PetscReal      *nrma;            <font color="#B22222">/* computed matrix norms */</font>
+<a name="line135">135: </a>  NEPUserInterface fui;            <font color="#B22222">/* how the user has defined the nonlinear operator */</font>
+<a name="line136">136: </a>  <a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> reason;
+<a name="line137">137: </a>};
+
+<a name="line139">139: </a><font color="#B22222">/*</font>
+<a name="line140">140: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> arguments</font>
+<a name="line141">141: </a><font color="#B22222">*/</font>
+<a name="line142">142: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
+
+<a name="line144">144: </a><strong><font color="#228B22">#define NEPCheckProblem(h,arg) do {} while (0)</font></strong>
+<a name="line145">145: </a><strong><font color="#228B22">#define NEPCheckCallback(h,arg) do {} while (0)</font></strong>
+<a name="line146">146: </a><strong><font color="#228B22">#define NEPCheckSplit(h,arg) do {} while (0)</font></strong>
+<a name="line147">147: </a><strong><font color="#228B22">#define NEPCheckDerivatives(h,arg) do {} while (0)</font></strong>
+<a name="line148">148: </a><strong><font color="#228B22">#define NEPCheckSolved(h,arg) do {} while (0)</font></strong>
+
+<a name="line150">150: </a><font color="#A020F0">#else</font>
+
+<a name="line152">152: </a><strong><font color="#228B22">#define NEPCheckProblem(h,arg) \</font></strong>
+<a name="line153">153: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line154">154: </a><strong><font color="#228B22">    if (!(h->fui)) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"The nonlinear eigenproblem has not been specified yet. Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line155">155: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line157">157: </a><strong><font color="#228B22">#define NEPCheckCallback(h,arg) \</font></strong>
+<a name="line158">158: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line159">159: </a><strong><font color="#228B22">    if (h->fui!=NEP_USER_INTERFACE_CALLBACK) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"This operation requires the nonlinear eigenproblem specified with callbacks. Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line160">160: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line162">162: </a><strong><font color="#228B22">#define NEPCheckSplit(h,arg) \</font></strong>
+<a name="line163">163: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line164">164: </a><strong><font color="#228B22">    if (h->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"This operation requires the nonlinear eigenproblem in split form. Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line165">165: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line167">167: </a><strong><font color="#228B22">#define NEPCheckDerivatives(h,arg) \</font></strong>
+<a name="line168">168: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line169">169: </a><strong><font color="#228B22">    if (h->fui!=NEP_USER_INTERFACE_DERIVATIVES) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"This operation requires the nonlinear eigenproblem specified with derivatives callback. Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line170">170: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line172">172: </a><strong><font color="#228B22">#define NEPCheckSolved(h,arg) \</font></strong>
+<a name="line173">173: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line174">174: </a><strong><font color="#228B22">    if (h->state<NEP_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line175">175: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line177">177: </a><font color="#A020F0">#endif</font>
+
+<a name="line179">179: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPSetDimensions_Default(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt*,PetscInt*)</font></strong>;
+<a name="line180">180: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPComputeVectors(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line181">181: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPReset_Problem(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line182">182: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPGetDefaultShift(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar*)</font></strong>;
+<a name="line183">183: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPComputeVectors_Schur(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line184">184: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Vec,Vec*,PetscReal*)</font></strong>;
+<a name="line185">185: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode NEPNewtonRefinementSimple(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscReal,PetscInt)</font></strong>;
+
+<a name="line187">187: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/pepimpl.h b/include/slepc/private/pepimpl.h
index a569a98..c1c2d6a 100644
--- a/include/slepc/private/pepimpl.h
+++ b/include/slepc/private/pepimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,7 +34,7 @@ typedef struct _PEPOps *PEPOps;
 struct _PEPOps {
   PetscErrorCode (*solve)(PEP);
   PetscErrorCode (*setup)(PEP);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,PEP);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,PEP);
   PetscErrorCode (*publishoptions)(PEP);
   PetscErrorCode (*destroy)(PEP);
   PetscErrorCode (*reset)(PEP);
@@ -68,6 +68,7 @@ struct _p_PEP {
   PetscScalar    target;           /* target value */
   PetscReal      tol;              /* tolerance */
   PEPConv        conv;             /* convergence test */
+  PEPStop        stop;             /* stopping test */
   PEPWhich       which;            /* which part of the spectrum to be sought */
   PEPBasis       basis;            /* polynomial basis used to represent the problem */
   PEPProblemType problem_type;     /* which kind of problem to be solved */
@@ -79,14 +80,17 @@ struct _p_PEP {
   PetscInt       npart;            /* number of partitions of the communicator */
   PetscReal      rtol;             /* tolerance for refinement */
   PetscInt       rits;             /* number of iterations of the refinement method */
-  PetscBool      schur;            /* use Schur complement in refinement method */
+  PEPRefineScheme scheme;          /* scheme for solving linear systems within refinement */
   PEPExtract     extract;          /* type of extraction used */
   PetscBool      trackall;         /* whether all the residuals must be computed */
 
   /*-------------- User-provided functions and contexts -----------------*/
   PetscErrorCode (*converged)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
   PetscErrorCode (*convergeddestroy)(void*);
+  PetscErrorCode (*stopping)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*);
+  PetscErrorCode (*stoppingdestroy)(void*);
   void           *convergedctx;
+  void           *stoppingctx;
   PetscErrorCode (*monitor[MAXPEPMONITORS])(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
   PetscErrorCode (*monitordestroy[MAXPEPMONITORS])(void**);
   void           *monitorcontext[MAXPEPMONITORS];
@@ -97,7 +101,6 @@ struct _p_PEP {
   DS             ds;               /* direct solver object */
   BV             V;                /* set of basis vectors and computed eigenvectors */
   RG             rg;               /* optional region for filtering */
-  PetscRandom    rand;             /* random number generator */
   SlepcSC        sc;               /* sorting criterion data */
   Mat            *A;               /* coefficient matrices of the polynomial */
   PetscInt       nmat;             /* number of matrices */
@@ -155,7 +158,6 @@ PETSC_INTERN PetscErrorCode PEPBuildDiagonalScaling(PEP);
 PETSC_INTERN PetscErrorCode PEPBasisCoefficients(PEP,PetscReal*);
 PETSC_INTERN PetscErrorCode PEPEvaluateBasis(PEP,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*);
 PETSC_INTERN PetscErrorCode PEPNewtonRefinement_TOAR(PEP,PetscScalar,PetscInt*,PetscReal*,PetscInt,PetscScalar*,PetscInt,PetscInt*);
-PETSC_INTERN PetscErrorCode PEPNewtonRefinementSimple(PEP,PetscInt*,PetscReal*,PetscInt);
-PETSC_INTERN PetscErrorCode PEPComputeLinearNorms(PEP);
+PETSC_INTERN PetscErrorCode PEPNewtonRefinementSimple(PEP,PetscInt*,PetscReal,PetscInt);
 
 #endif
diff --git a/include/slepc/private/pepimpl.h.html b/include/slepc/private/pepimpl.h.html
index d06419b..6449575 100644
--- a/include/slepc/private/pepimpl.h.html
+++ b/include/slepc/private/pepimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/pepimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:41+00:00">
+<meta name="date" content="2016-05-16T10:34:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/pepimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/pepimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line34"> 34: </a><font color="#4169E1"><a name="_PEPOps"></a>struct _PEPOps </font>{
 <a name="line35"> 35: </a>  PetscErrorCode (*solve)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
 <a name="line36"> 36: </a>  PetscErrorCode (*setup)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
-<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
+<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
 <a name="line38"> 38: </a>  PetscErrorCode (*publishoptions)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
 <a name="line39"> 39: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
 <a name="line40"> 40: </a>  PetscErrorCode (*reset)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>);
@@ -80,97 +80,99 @@
 <a name="line68"> 68: </a>  PetscScalar    target;           <font color="#B22222">/* target value */</font>
 <a name="line69"> 69: </a>  PetscReal      tol;              <font color="#B22222">/* tolerance */</font>
 <a name="line70"> 70: </a>  <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>        conv;             <font color="#B22222">/* convergence test */</font>
-<a name="line71"> 71: </a>  <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>       which;            <font color="#B22222">/* which part of the spectrum to be sought */</font>
-<a name="line72"> 72: </a>  <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>       basis;            <font color="#B22222">/* polynomial basis used to represent the problem */</font>
-<a name="line73"> 73: </a>  <a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a> problem_type;     <font color="#B22222">/* which kind of problem to be solved */</font>
-<a name="line74"> 74: </a>  <a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>       scale;            <font color="#B22222">/* scaling strategy to be used */</font>
-<a name="line75"> 75: </a>  PetscReal      sfactor,dsfactor; <font color="#B22222">/* scaling factors */</font>
-<a name="line76"> 76: </a>  PetscInt       sits;             <font color="#B22222">/* number of iterations of the scaling method */</font>
-<a name="line77"> 77: </a>  PetscReal      slambda;          <font color="#B22222">/* norm eigenvalue approximation for scaling */</font>
-<a name="line78"> 78: </a>  <a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>      refine;           <font color="#B22222">/* type of refinement to be applied after solve */</font>
-<a name="line79"> 79: </a>  PetscInt       npart;            <font color="#B22222">/* number of partitions of the communicator */</font>
-<a name="line80"> 80: </a>  PetscReal      rtol;             <font color="#B22222">/* tolerance for refinement */</font>
-<a name="line81"> 81: </a>  PetscInt       rits;             <font color="#B22222">/* number of iterations of the refinement method */</font>
-<a name="line82"> 82: </a>  PetscBool      schur;            <font color="#B22222">/* use Schur complement in refinement method */</font>
-<a name="line83"> 83: </a>  <a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>     extract;          <font color="#B22222">/* type of extraction used */</font>
-<a name="line84"> 84: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
-
-<a name="line86"> 86: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
-<a name="line87"> 87: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
-<a name="line88"> 88: </a>  PetscErrorCode (*convergeddestroy)(void*);
-<a name="line89"> 89: </a>  void           *convergedctx;
-<a name="line90"> 90: </a>  PetscErrorCode (*monitor[MAXPEPMONITORS])(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
-<a name="line91"> 91: </a>  PetscErrorCode (*monitordestroy[MAXPEPMONITORS])(void**);
-<a name="line92"> 92: </a>  void           *monitorcontext[MAXPEPMONITORS];
-<a name="line93"> 93: </a>  PetscInt        numbermonitors;
-
-<a name="line95"> 95: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
-<a name="line96"> 96: </a>  <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;               <font color="#B22222">/* spectral transformation object */</font>
-<a name="line97"> 97: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
-<a name="line98"> 98: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;                <font color="#B22222">/* set of basis vectors and computed eigenvectors */</font>
-<a name="line99"> 99: </a>  <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;               <font color="#B22222">/* optional region for filtering */</font>
-<a name="line100">100: </a>  PetscRandom    rand;             <font color="#B22222">/* random number generator */</font>
-<a name="line101">101: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
-<a name="line102">102: </a>  Mat            *A;               <font color="#B22222">/* coefficient matrices of the polynomial */</font>
-<a name="line103">103: </a>  PetscInt       nmat;             <font color="#B22222">/* number of matrices */</font>
-<a name="line104">104: </a>  Vec            Dl,Dr;            <font color="#B22222">/* diagonal matrices for balancing */</font>
-<a name="line105">105: </a>  Vec            *IS;              <font color="#B22222">/* references to user-provided initial space */</font>
-<a name="line106">106: </a>  PetscScalar    *eigr,*eigi;      <font color="#B22222">/* real and imaginary parts of eigenvalues */</font>
-<a name="line107">107: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
-<a name="line108">108: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for eigenvalue ordering */</font>
-<a name="line109">109: </a>  PetscReal      *pbc;             <font color="#B22222">/* coefficients defining the polynomial basis */</font>
-<a name="line110">110: </a>  PetscScalar    *solvematcoeffs;  <font color="#B22222">/* coefficients to compute the matrix to be inverted */</font>
-<a name="line111">111: </a>  PetscInt       nwork;            <font color="#B22222">/* number of work vectors */</font>
-<a name="line112">112: </a>  Vec            *work;            <font color="#B22222">/* work vectors */</font>
-<a name="line113">113: </a>  KSP            refineksp;        <font color="#B22222">/* ksp used in refinement */</font>
-<a name="line114">114: </a>  PetscSubcomm   refinesubc;       <font color="#B22222">/* context for sub-communicators */</font>
-<a name="line115">115: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
-
-<a name="line117">117: </a>  <font color="#B22222">/* ----------------------- Status variables --------------------------*/</font>
-<a name="line118">118: </a>  PEPStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> eigenvectors */</font>
-<a name="line119">119: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged eigenvalues */</font>
-<a name="line120">120: </a>  PetscInt       its;              <font color="#B22222">/* number of iterations so far computed */</font>
-<a name="line121">121: </a>  PetscInt       n,nloc;           <font color="#B22222">/* problem dimensions (global, local) */</font>
-<a name="line122">122: </a>  PetscReal      *nrma;            <font color="#B22222">/* computed matrix norms */</font>
-<a name="line123">123: </a>  PetscReal      nrml[2];          <font color="#B22222">/* computed matrix norms for the linearization */</font>
-<a name="line124">124: </a>  PetscBool      sfactor_set;      <font color="#B22222">/* flag to indicate the user gave sfactor */</font>
-<a name="line125">125: </a>  PetscBool      lineariz;         <font color="#B22222">/* current solver is based on linearization */</font>
-<a name="line126">126: </a>  <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> reason;
-<a name="line127">127: </a>};
-
-<a name="line129">129: </a><font color="#B22222">/*</font>
-<a name="line130">130: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> arguments</font>
-<a name="line131">131: </a><font color="#B22222">*/</font>
-<a name="line132">132: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
-
-<a name="line134">134: </a><strong><font color="#228B22">#define PEPCheckSolved(h,arg) do {} while (0)</font></strong>
-
-<a name="line136">136: </a><font color="#A020F0">#else</font>
-
-<a name="line138">138: </a><strong><font color="#228B22">#define PEPCheckSolved(h,arg) \</font></strong>
-<a name="line139">139: </a><strong><font color="#228B22">  do { \</font></strong>
-<a name="line140">140: </a><strong><font color="#228B22">    if (h->state<PEP_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
-<a name="line141">141: </a><strong><font color="#228B22">  } while (0)</font></strong>
-
-<a name="line143">143: </a><font color="#A020F0">#endif</font>
-
-<a name="line145">145: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPSetDimensions_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt*,PetscInt*)</font></strong>;
-<a name="line146">146: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPExtractVectors(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line147">147: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPBackTransform_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line148">148: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeVectors(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line149">149: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeVectors_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line150">150: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeVectors_Indefinite(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line151">151: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,Vec,Vec,Vec*,PetscReal*)</font></strong>;
-<a name="line152">152: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPKrylovConvergence(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool,PetscInt,PetscInt,PetscReal,PetscInt*)</font></strong>;
-<a name="line153">153: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeScaleFactor(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line154">154: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPBuildDiagonalScaling(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line155">155: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPBasisCoefficients(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
-<a name="line156">156: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPEvaluateBasis(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line157">157: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPNewtonRefinement_TOAR(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscInt*,PetscReal*,PetscInt,PetscScalar*,PetscInt,PetscInt*)</font></strong>;
-<a name="line158">158: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPNewtonRefinementSimple(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*,PetscReal*,PetscInt)</font></strong>;
-<a name="line159">159: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeLinearNorms(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-
-<a name="line161">161: </a><font color="#A020F0">#endif</font>
+<a name="line71"> 71: </a>  <a href="../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>        stop;             <font color="#B22222">/* stopping test */</font>
+<a name="line72"> 72: </a>  <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>       which;            <font color="#B22222">/* which part of the spectrum to be sought */</font>
+<a name="line73"> 73: </a>  <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>       basis;            <font color="#B22222">/* polynomial basis used to represent the problem */</font>
+<a name="line74"> 74: </a>  <a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a> problem_type;     <font color="#B22222">/* which kind of problem to be solved */</font>
+<a name="line75"> 75: </a>  <a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>       scale;            <font color="#B22222">/* scaling strategy to be used */</font>
+<a name="line76"> 76: </a>  PetscReal      sfactor,dsfactor; <font color="#B22222">/* scaling factors */</font>
+<a name="line77"> 77: </a>  PetscInt       sits;             <font color="#B22222">/* number of iterations of the scaling method */</font>
+<a name="line78"> 78: </a>  PetscReal      slambda;          <font color="#B22222">/* norm eigenvalue approximation for scaling */</font>
+<a name="line79"> 79: </a>  <a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>      refine;           <font color="#B22222">/* type of refinement to be applied after solve */</font>
+<a name="line80"> 80: </a>  PetscInt       npart;            <font color="#B22222">/* number of partitions of the communicator */</font>
+<a name="line81"> 81: </a>  PetscReal      rtol;             <font color="#B22222">/* tolerance for refinement */</font>
+<a name="line82"> 82: </a>  PetscInt       rits;             <font color="#B22222">/* number of iterations of the refinement method */</font>
+<a name="line83"> 83: </a>  <a href="../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a> scheme;          <font color="#B22222">/* scheme for solving linear systems within refinement */</font>
+<a name="line84"> 84: </a>  <a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>     extract;          <font color="#B22222">/* type of extraction used */</font>
+<a name="line85"> 85: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
+
+<a name="line87"> 87: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
+<a name="line88"> 88: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+<a name="line89"> 89: </a>  PetscErrorCode (*convergeddestroy)(void*);
+<a name="line90"> 90: </a>  PetscErrorCode (*stopping)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>*,void*);
+<a name="line91"> 91: </a>  PetscErrorCode (*stoppingdestroy)(void*);
+<a name="line92"> 92: </a>  void           *convergedctx;
+<a name="line93"> 93: </a>  void           *stoppingctx;
+<a name="line94"> 94: </a>  PetscErrorCode (*monitor[MAXPEPMONITORS])(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
+<a name="line95"> 95: </a>  PetscErrorCode (*monitordestroy[MAXPEPMONITORS])(void**);
+<a name="line96"> 96: </a>  void           *monitorcontext[MAXPEPMONITORS];
+<a name="line97"> 97: </a>  PetscInt        numbermonitors;
+
+<a name="line99"> 99: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
+<a name="line100">100: </a>  <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;               <font color="#B22222">/* spectral transformation object */</font>
+<a name="line101">101: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
+<a name="line102">102: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             V;                <font color="#B22222">/* set of basis vectors and computed eigenvectors */</font>
+<a name="line103">103: </a>  <a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;               <font color="#B22222">/* optional region for filtering */</font>
+<a name="line104">104: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
+<a name="line105">105: </a>  Mat            *A;               <font color="#B22222">/* coefficient matrices of the polynomial */</font>
+<a name="line106">106: </a>  PetscInt       nmat;             <font color="#B22222">/* number of matrices */</font>
+<a name="line107">107: </a>  Vec            Dl,Dr;            <font color="#B22222">/* diagonal matrices for balancing */</font>
+<a name="line108">108: </a>  Vec            *IS;              <font color="#B22222">/* references to user-provided initial space */</font>
+<a name="line109">109: </a>  PetscScalar    *eigr,*eigi;      <font color="#B22222">/* real and imaginary parts of eigenvalues */</font>
+<a name="line110">110: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
+<a name="line111">111: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for eigenvalue ordering */</font>
+<a name="line112">112: </a>  PetscReal      *pbc;             <font color="#B22222">/* coefficients defining the polynomial basis */</font>
+<a name="line113">113: </a>  PetscScalar    *solvematcoeffs;  <font color="#B22222">/* coefficients to compute the matrix to be inverted */</font>
+<a name="line114">114: </a>  PetscInt       nwork;            <font color="#B22222">/* number of work vectors */</font>
+<a name="line115">115: </a>  Vec            *work;            <font color="#B22222">/* work vectors */</font>
+<a name="line116">116: </a>  KSP            refineksp;        <font color="#B22222">/* ksp used in refinement */</font>
+<a name="line117">117: </a>  PetscSubcomm   refinesubc;       <font color="#B22222">/* context for sub-communicators */</font>
+<a name="line118">118: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
+
+<a name="line120">120: </a>  <font color="#B22222">/* ----------------------- Status variables --------------------------*/</font>
+<a name="line121">121: </a>  PEPStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> eigenvectors */</font>
+<a name="line122">122: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged eigenvalues */</font>
+<a name="line123">123: </a>  PetscInt       its;              <font color="#B22222">/* number of iterations so far computed */</font>
+<a name="line124">124: </a>  PetscInt       n,nloc;           <font color="#B22222">/* problem dimensions (global, local) */</font>
+<a name="line125">125: </a>  PetscReal      *nrma;            <font color="#B22222">/* computed matrix norms */</font>
+<a name="line126">126: </a>  PetscReal      nrml[2];          <font color="#B22222">/* computed matrix norms for the linearization */</font>
+<a name="line127">127: </a>  PetscBool      sfactor_set;      <font color="#B22222">/* flag to indicate the user gave sfactor */</font>
+<a name="line128">128: </a>  PetscBool      lineariz;         <font color="#B22222">/* current solver is based on linearization */</font>
+<a name="line129">129: </a>  <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> reason;
+<a name="line130">130: </a>};
+
+<a name="line132">132: </a><font color="#B22222">/*</font>
+<a name="line133">133: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> arguments</font>
+<a name="line134">134: </a><font color="#B22222">*/</font>
+<a name="line135">135: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
+
+<a name="line137">137: </a><strong><font color="#228B22">#define PEPCheckSolved(h,arg) do {} while (0)</font></strong>
+
+<a name="line139">139: </a><font color="#A020F0">#else</font>
+
+<a name="line141">141: </a><strong><font color="#228B22">#define PEPCheckSolved(h,arg) \</font></strong>
+<a name="line142">142: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line143">143: </a><strong><font color="#228B22">    if (h->state<PEP_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line144">144: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line146">146: </a><font color="#A020F0">#endif</font>
+
+<a name="line148">148: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPSetDimensions_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt*,PetscInt*)</font></strong>;
+<a name="line149">149: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPExtractVectors(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line150">150: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPBackTransform_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line151">151: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeVectors(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line152">152: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeVectors_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line153">153: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeVectors_Indefinite(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line154">154: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,Vec,Vec,Vec*,PetscReal*)</font></strong>;
+<a name="line155">155: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPKrylovConvergence(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool,PetscInt,PetscInt,PetscReal,PetscInt*)</font></strong>;
+<a name="line156">156: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPComputeScaleFactor(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line157">157: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPBuildDiagonalScaling(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line158">158: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPBasisCoefficients(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
+<a name="line159">159: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPEvaluateBasis(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line160">160: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPNewtonRefinement_TOAR(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscInt*,PetscReal*,PetscInt,PetscScalar*,PetscInt,PetscInt*)</font></strong>;
+<a name="line161">161: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPNewtonRefinementSimple(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*,PetscReal,PetscInt)</font></strong>;
+
+<a name="line163">163: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/rgimpl.h b/include/slepc/private/rgimpl.h
index 31a2a7c..398bbfd 100644
--- a/include/slepc/private/rgimpl.h
+++ b/include/slepc/private/rgimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,7 +34,7 @@ struct _RGOps {
   PetscErrorCode (*istrivial)(RG,PetscBool*);
   PetscErrorCode (*computecontour)(RG,PetscInt,PetscScalar*,PetscScalar*);
   PetscErrorCode (*checkinside)(RG,PetscReal,PetscReal,PetscInt*);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,RG);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,RG);
   PetscErrorCode (*view)(RG,PetscViewer);
   PetscErrorCode (*destroy)(RG);
 };
@@ -43,6 +43,7 @@ struct _p_RG {
   PETSCHEADER(struct _RGOps);
   PetscBool   complement;    /* region is the complement of the specified one */
   PetscReal   sfactor;       /* scaling factor */
+  PetscReal   osfactor;      /* old scaling factor, before RGPushScale */
   void        *data;
 };
 
diff --git a/include/slepc/private/rgimpl.h.html b/include/slepc/private/rgimpl.h.html
index 59cf94b..7b56d60 100644
--- a/include/slepc/private/rgimpl.h.html
+++ b/include/slepc/private/rgimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/rgimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:43+00:00">
+<meta name="date" content="2016-05-16T10:34:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/rgimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/rgimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line34"> 34: </a>  PetscErrorCode (*istrivial)(<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscBool*);
 <a name="line35"> 35: </a>  PetscErrorCode (*computecontour)(<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*);
 <a name="line36"> 36: </a>  PetscErrorCode (*checkinside)(<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal,PetscReal,PetscInt*);
-<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>);
+<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>);
 <a name="line38"> 38: </a>  PetscErrorCode (*view)(<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscViewer);
 <a name="line39"> 39: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a>);
 <a name="line40"> 40: </a>};
@@ -55,13 +55,14 @@
 <a name="line43"> 43: </a>  PETSCHEADER(<font color="#4169E1">struct _RGOps</font>);
 <a name="line44"> 44: </a>  PetscBool   complement;    <font color="#B22222">/* region is the complement of the specified one */</font>
 <a name="line45"> 45: </a>  PetscReal   sfactor;       <font color="#B22222">/* scaling factor */</font>
-<a name="line46"> 46: </a>  void        *data;
-<a name="line47"> 47: </a>};
+<a name="line46"> 46: </a>  PetscReal   osfactor;      <font color="#B22222">/* old scaling factor, before <a href="../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a> */</font>
+<a name="line47"> 47: </a>  void        *data;
+<a name="line48"> 48: </a>};
 
-<a name="line49"> 49: </a><font color="#B22222">/* show an inf instead of PETSC_MAX_REAL */</font>
-<a name="line50"> 50: </a><strong><font color="#228B22">#define RGShowReal(r) (double)((PetscAbsReal(r)>=PETSC_MAX_REAL)?10*(r):(r))</font></strong>
+<a name="line50"> 50: </a><font color="#B22222">/* show an inf instead of PETSC_MAX_REAL */</font>
+<a name="line51"> 51: </a><strong><font color="#228B22">#define RGShowReal(r) (double)((PetscAbsReal(r)>=PETSC_MAX_REAL)?10*(r):(r))</font></strong>
 
-<a name="line52"> 52: </a><font color="#A020F0">#endif</font>
+<a name="line53"> 53: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/slepcimpl.h b/include/slepc/private/slepcimpl.h
index 3f46e4c..4ba4f6b 100644
--- a/include/slepc/private/slepcimpl.h
+++ b/include/slepc/private/slepcimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -56,14 +56,12 @@ PETSC_INTERN PetscBool SlepcBeganPetsc;
 
 /* context for monitors of type XXXMonitorConverged */
 struct _n_SlepcConvMonitor {
-  PetscViewer viewer;
-  PetscInt    oldnconv;
+  PetscViewer       viewer;
+  PetscViewerFormat format;
+  PetscInt          oldnconv;
 };
-typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;
 
 /* Private functions that are shared by several classes */
-PETSC_EXTERN PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor*);
-
 PETSC_EXTERN PetscErrorCode SlepcBasisReference_Private(PetscInt,Vec*,PetscInt*,Vec**);
 PETSC_EXTERN PetscErrorCode SlepcBasisDestroy_Private(PetscInt*,Vec**);
 
diff --git a/include/slepc/private/slepcimpl.h.html b/include/slepc/private/slepcimpl.h.html
index 9b40a39..a014db7 100644
--- a/include/slepc/private/slepcimpl.h.html
+++ b/include/slepc/private/slepcimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/slepcimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:43+00:00">
+<meta name="date" content="2016-05-16T10:34:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/slepcimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/slepcimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -68,22 +68,20 @@
 
 <a name="line57"> 57: </a><font color="#B22222">/* context for monitors of type XXXMonitorConverged */</font>
 <a name="line58"> 58: </a><font color="#4169E1"><a name="_n_SlepcConvMonitor"></a>struct _n_SlepcConvMonitor </font>{
-<a name="line59"> 59: </a>  PetscViewer viewer;
-<a name="line60"> 60: </a>  PetscInt    oldnconv;
-<a name="line61"> 61: </a>};
-<a name="line62"> 62: </a><font color="#4169E1">typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;</font>
+<a name="line59"> 59: </a>  PetscViewer       viewer;
+<a name="line60"> 60: </a>  PetscViewerFormat format;
+<a name="line61"> 61: </a>  PetscInt          oldnconv;
+<a name="line62"> 62: </a>};
 
 <a name="line64"> 64: </a><font color="#B22222">/* Private functions that are shared by several classes */</font>
-<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor*)</font></strong>;
+<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcBasisReference_Private(PetscInt,Vec*,PetscInt*,Vec**)</font></strong>;
+<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcBasisDestroy_Private(PetscInt*,Vec**)</font></strong>;
 
-<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcBasisReference_Private(PetscInt,Vec*,PetscInt*,Vec**)</font></strong>;
-<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcBasisDestroy_Private(PetscInt*,Vec**)</font></strong>;
+<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcCitationsInitialize(void)</font></strong>;
+<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcInitialize_DynamicLibraries(void)</font></strong>;
+<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcInitialize_Packages(void)</font></strong>;
 
-<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcCitationsInitialize(void)</font></strong>;
-<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcInitialize_DynamicLibraries(void)</font></strong>;
-<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SlepcInitialize_Packages(void)</font></strong>;
-
-<a name="line74"> 74: </a><font color="#A020F0">#endif</font>
+<a name="line72"> 72: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/stimpl.h b/include/slepc/private/stimpl.h
index a0a7b3c..3d1487f 100644
--- a/include/slepc/private/stimpl.h
+++ b/include/slepc/private/stimpl.h
@@ -37,7 +37,7 @@ struct _STOps {
   PetscErrorCode (*getbilinearform)(ST,Mat*);
   PetscErrorCode (*applytrans)(ST,Vec,Vec);
   PetscErrorCode (*setshift)(ST,PetscScalar);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,ST);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,ST);
   PetscErrorCode (*postsolve)(ST);
   PetscErrorCode (*backtransform)(ST,PetscInt,PetscScalar*,PetscScalar*);
   PetscErrorCode (*destroy)(ST);
@@ -46,17 +46,25 @@ struct _STOps {
   PetscErrorCode (*checknullspace)(ST,BV);
 };
 
+/*
+     'Updated' state means STSetUp must be called because matrices have been
+     modified, but the pattern is the same (hence reuse symbolic factorization)
+*/
+typedef enum { ST_STATE_INITIAL,
+               ST_STATE_SETUP,
+               ST_STATE_UPDATED } STStateType;
+
 struct _p_ST {
   PETSCHEADER(struct _STOps);
   /*------------------------- User parameters --------------------------*/
-  Mat              *A;               /* Matrices that define the eigensystem */
-  PetscObjectState *Astate;          /* State (to identify the original matrices) */
-  Mat              *T;               /* Matrices resulting from transformation */
-  Mat              P;                /* Matrix from which preconditioner is built */
-  PetscInt         nmat;             /* Number of matrices */
-  PetscScalar      sigma;            /* Value of the shift */
+  Mat              *A;               /* matrices that define the eigensystem */
+  PetscObjectState *Astate;          /* state (to identify the original matrices) */
+  Mat              *T;               /* matrices resulting from transformation */
+  Mat              P;                /* matrix from which preconditioner is built */
+  PetscInt         nmat;             /* number of matrices */
+  PetscScalar      sigma;            /* value of the shift */
   PetscBool        sigma_set;        /* whether the user provided the shift or not */
-  PetscScalar      defsigma;         /* Default value of the shift */
+  PetscScalar      defsigma;         /* default value of the shift */
   STMatMode        shift_matrix;
   MatStructure     str;              /* whether matrices have the same pattern or not */
   PetscBool        transform;        /* whether transformed matrices are computed */
@@ -67,7 +75,7 @@ struct _p_ST {
   Vec              D;                /* diagonal matrix for balancing */
   Vec              wb;               /* balancing requires an extra work vector */
   void             *data;
-  PetscInt         setupcalled;
+  STStateType      state;            /* initial -> setup -> with updated matrices */
 };
 
 /*
diff --git a/include/slepc/private/stimpl.h.html b/include/slepc/private/stimpl.h.html
index 0c9374c..aa150f8 100644
--- a/include/slepc/private/stimpl.h.html
+++ b/include/slepc/private/stimpl.h.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/stimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:41+00:00">
+<meta name="date" content="2016-05-16T10:34:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/stimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/stimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
@@ -49,7 +49,7 @@
 <a name="line37"> 37: </a>  PetscErrorCode (*getbilinearform)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat*);
 <a name="line38"> 38: </a>  PetscErrorCode (*applytrans)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,Vec,Vec);
 <a name="line39"> 39: </a>  PetscErrorCode (*setshift)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar);
-<a name="line40"> 40: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>);
+<a name="line40"> 40: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>);
 <a name="line41"> 41: </a>  PetscErrorCode (*postsolve)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>);
 <a name="line42"> 42: </a>  PetscErrorCode (*backtransform)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscInt,PetscScalar*,PetscScalar*);
 <a name="line43"> 43: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>);
@@ -58,56 +58,64 @@
 <a name="line46"> 46: </a>  PetscErrorCode (*checknullspace)(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>);
 <a name="line47"> 47: </a>};
 
-<a name="line49"> 49: </a><font color="#4169E1"><a name="_p_ST"></a>struct _p_ST </font>{
-<a name="line50"> 50: </a>  PETSCHEADER(<font color="#4169E1">struct _STOps</font>);
-<a name="line51"> 51: </a>  <font color="#B22222">/*------------------------- User parameters --------------------------*/</font>
-<a name="line52"> 52: </a>  Mat              *A;               <font color="#B22222">/* Matrices that define the eigensystem */</font>
-<a name="line53"> 53: </a>  PetscObjectState *Astate;          <font color="#B22222">/* State (to identify the original matrices) */</font>
-<a name="line54"> 54: </a>  Mat              *T;               <font color="#B22222">/* Matrices resulting from transformation */</font>
-<a name="line55"> 55: </a>  Mat              P;                <font color="#B22222">/* Matrix from which preconditioner is built */</font>
-<a name="line56"> 56: </a>  PetscInt         nmat;             <font color="#B22222">/* Number of matrices */</font>
-<a name="line57"> 57: </a>  PetscScalar      sigma;            <font color="#B22222">/* Value of the shift */</font>
-<a name="line58"> 58: </a>  PetscBool        sigma_set;        <font color="#B22222">/* whether the user provided the shift or not */</font>
-<a name="line59"> 59: </a>  PetscScalar      defsigma;         <font color="#B22222">/* Default value of the shift */</font>
-<a name="line60"> 60: </a>  <a href="../../../docs/manualpages/ST/STMatMode.html#STMatMode">STMatMode</a>        shift_matrix;
-<a name="line61"> 61: </a>  MatStructure     str;              <font color="#B22222">/* whether matrices have the same pattern or not */</font>
-<a name="line62"> 62: </a>  PetscBool        transform;        <font color="#B22222">/* whether transformed matrices are computed */</font>
-
-<a name="line64"> 64: </a>  <font color="#B22222">/*------------------------- Misc data --------------------------*/</font>
-<a name="line65"> 65: </a>  KSP              ksp;
-<a name="line66"> 66: </a>  Vec              w;
-<a name="line67"> 67: </a>  Vec              D;                <font color="#B22222">/* diagonal matrix for balancing */</font>
-<a name="line68"> 68: </a>  Vec              wb;               <font color="#B22222">/* balancing requires an extra work vector */</font>
-<a name="line69"> 69: </a>  void             *data;
-<a name="line70"> 70: </a>  PetscInt         setupcalled;
-<a name="line71"> 71: </a>};
-
-<a name="line73"> 73: </a><font color="#B22222">/*</font>
-<a name="line74"> 74: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> arguments</font>
-<a name="line75"> 75: </a><font color="#B22222">*/</font>
-<a name="line76"> 76: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
-
-<a name="line78"> 78: </a><strong><font color="#228B22">#define STCheckMatrices(h,arg) do {} while (0)</font></strong>
-
-<a name="line80"> 80: </a><font color="#A020F0">#else</font>
-
-<a name="line82"> 82: </a><strong><font color="#228B22">#define STCheckMatrices(h,arg) \</font></strong>
-<a name="line83"> 83: </a><strong><font color="#228B22">  do { \</font></strong>
-<a name="line84"> 84: </a><strong><font color="#228B22">    if (!h->A) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices have not been set: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
-<a name="line85"> 85: </a><strong><font color="#228B22">  } while (0)</font></strong>
-
-<a name="line87"> 87: </a><font color="#A020F0">#endif</font>
-
-<a name="line89"> 89: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STGetBilinearForm_Default(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat*)</font></strong>;
-<a name="line90"> 90: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STCheckNullSpace_Default(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line91"> 91: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatShellCreate(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar,PetscInt,PetscInt*,PetscScalar*,Mat*)</font></strong>;
-<a name="line92"> 92: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatShellShift(Mat,PetscScalar)</font></strong>;
-<a name="line93"> 93: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatSetHermitian(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat)</font></strong>;
-<a name="line94"> 94: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STCheckFactorPackage(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>)</font></strong>;
-<a name="line95"> 95: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatMAXPY_Private(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar,PetscScalar,PetscInt,PetscScalar*,PetscBool,Mat*)</font></strong>;
-<a name="line96"> 96: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STCoeffs_Monomial(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar*)</font></strong>;
-
-<a name="line98"> 98: </a><font color="#A020F0">#endif</font>
+<a name="line49"> 49: </a><font color="#B22222">/*</font>
+<a name="line50"> 50: </a><font color="#B22222">     'Updated' state means <a href="../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a> must be called because matrices have been</font>
+<a name="line51"> 51: </a><font color="#B22222">     modified, but the pattern is the same (hence reuse symbolic factorization)</font>
+<a name="line52"> 52: </a><font color="#B22222">*/</font>
+<a name="line53"> 53: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { ST_STATE_INITIAL,
+<a name="line54"> 54: </a>               ST_STATE_SETUP,
+<a name="line55"> 55: </a>               ST_STATE_UPDATED } STStateType;
+
+<a name="line57"> 57: </a><font color="#4169E1"><a name="_p_ST"></a>struct _p_ST </font>{
+<a name="line58"> 58: </a>  PETSCHEADER(<font color="#4169E1">struct _STOps</font>);
+<a name="line59"> 59: </a>  <font color="#B22222">/*------------------------- User parameters --------------------------*/</font>
+<a name="line60"> 60: </a>  Mat              *A;               <font color="#B22222">/* matrices that define the eigensystem */</font>
+<a name="line61"> 61: </a>  PetscObjectState *Astate;          <font color="#B22222">/* state (to identify the original matrices) */</font>
+<a name="line62"> 62: </a>  Mat              *T;               <font color="#B22222">/* matrices resulting from transformation */</font>
+<a name="line63"> 63: </a>  Mat              P;                <font color="#B22222">/* matrix from which preconditioner is built */</font>
+<a name="line64"> 64: </a>  PetscInt         nmat;             <font color="#B22222">/* number of matrices */</font>
+<a name="line65"> 65: </a>  PetscScalar      sigma;            <font color="#B22222">/* value of the shift */</font>
+<a name="line66"> 66: </a>  PetscBool        sigma_set;        <font color="#B22222">/* whether the user provided the shift or not */</font>
+<a name="line67"> 67: </a>  PetscScalar      defsigma;         <font color="#B22222">/* default value of the shift */</font>
+<a name="line68"> 68: </a>  <a href="../../../docs/manualpages/ST/STMatMode.html#STMatMode">STMatMode</a>        shift_matrix;
+<a name="line69"> 69: </a>  MatStructure     str;              <font color="#B22222">/* whether matrices have the same pattern or not */</font>
+<a name="line70"> 70: </a>  PetscBool        transform;        <font color="#B22222">/* whether transformed matrices are computed */</font>
+
+<a name="line72"> 72: </a>  <font color="#B22222">/*------------------------- Misc data --------------------------*/</font>
+<a name="line73"> 73: </a>  KSP              ksp;
+<a name="line74"> 74: </a>  Vec              w;
+<a name="line75"> 75: </a>  Vec              D;                <font color="#B22222">/* diagonal matrix for balancing */</font>
+<a name="line76"> 76: </a>  Vec              wb;               <font color="#B22222">/* balancing requires an extra work vector */</font>
+<a name="line77"> 77: </a>  void             *data;
+<a name="line78"> 78: </a>  STStateType      state;            <font color="#B22222">/* initial -> setup -> with updated matrices */</font>
+<a name="line79"> 79: </a>};
+
+<a name="line81"> 81: </a><font color="#B22222">/*</font>
+<a name="line82"> 82: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> arguments</font>
+<a name="line83"> 83: </a><font color="#B22222">*/</font>
+<a name="line84"> 84: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
+
+<a name="line86"> 86: </a><strong><font color="#228B22">#define STCheckMatrices(h,arg) do {} while (0)</font></strong>
+
+<a name="line88"> 88: </a><font color="#A020F0">#else</font>
+
+<a name="line90"> 90: </a><strong><font color="#228B22">#define STCheckMatrices(h,arg) \</font></strong>
+<a name="line91"> 91: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line92"> 92: </a><strong><font color="#228B22">    if (!h->A) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices have not been set: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line93"> 93: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line95"> 95: </a><font color="#A020F0">#endif</font>
+
+<a name="line97"> 97: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STGetBilinearForm_Default(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat*)</font></strong>;
+<a name="line98"> 98: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STCheckNullSpace_Default(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line99"> 99: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatShellCreate(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar,PetscInt,PetscInt*,PetscScalar*,Mat*)</font></strong>;
+<a name="line100">100: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatShellShift(Mat,PetscScalar)</font></strong>;
+<a name="line101">101: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatSetHermitian(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat)</font></strong>;
+<a name="line102">102: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STCheckFactorPackage(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>)</font></strong>;
+<a name="line103">103: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STMatMAXPY_Private(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar,PetscScalar,PetscInt,PetscScalar*,PetscBool,Mat*)</font></strong>;
+<a name="line104">104: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode STCoeffs_Monomial(<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar*)</font></strong>;
+
+<a name="line106">106: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/svdimpl.h b/include/slepc/private/svdimpl.h
index c769dd0..96b2f61 100644
--- a/include/slepc/private/svdimpl.h
+++ b/include/slepc/private/svdimpl.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,7 +34,7 @@ typedef struct _SVDOps *SVDOps;
 struct _SVDOps {
   PetscErrorCode (*solve)(SVD);
   PetscErrorCode (*setup)(SVD);
-  PetscErrorCode (*setfromoptions)(PetscOptions*,SVD);
+  PetscErrorCode (*setfromoptions)(PetscOptionItems*,SVD);
   PetscErrorCode (*publishoptions)(SVD);
   PetscErrorCode (*destroy)(SVD);
   PetscErrorCode (*reset)(SVD);
@@ -57,41 +57,48 @@ typedef enum { SVD_STATE_INITIAL,
 struct _p_SVD {
   PETSCHEADER(struct _SVDOps);
   /*------------------------- User parameters ---------------------------*/
-  Mat              OP;          /* problem matrix */
-  PetscInt         max_it;      /* max iterations */
-  PetscInt         nsv;         /* number of requested values */
-  PetscInt         ncv;         /* basis size */
-  PetscInt         mpd;         /* maximum dimension of projected problem */
-  PetscInt         nini,ninil;  /* number of initial vectors (negative means not copied yet) */
-  PetscReal        tol;         /* tolerance */
-  SVDWhich         which;       /* which singular values are computed */
-  PetscBool        impltrans;   /* implicit transpose mode */
-  PetscBool        trackall;    /* whether all the residuals must be computed */
+  Mat            OP;               /* problem matrix */
+  PetscInt       max_it;           /* max iterations */
+  PetscInt       nsv;              /* number of requested values */
+  PetscInt       ncv;              /* basis size */
+  PetscInt       mpd;              /* maximum dimension of projected problem */
+  PetscInt       nini,ninil;       /* number of initial vecs (negative means not copied yet) */
+  PetscReal      tol;              /* tolerance */
+  SVDConv        conv;             /* convergence test */
+  SVDStop        stop;             /* stopping test */
+  SVDWhich       which;            /* which singular values are computed */
+  PetscBool      impltrans;        /* implicit transpose mode */
+  PetscBool      trackall;         /* whether all the residuals must be computed */
 
   /*-------------- User-provided functions and contexts -----------------*/
-  PetscErrorCode   (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
-  PetscErrorCode   (*monitordestroy[MAXSVDMONITORS])(void**);
-  void             *monitorcontext[MAXSVDMONITORS];
-  PetscInt         numbermonitors;
+  PetscErrorCode (*converged)(SVD,PetscReal,PetscReal,PetscReal*,void*);
+  PetscErrorCode (*convergeddestroy)(void*);
+  PetscErrorCode (*stopping)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*);
+  PetscErrorCode (*stoppingdestroy)(void*);
+  void           *convergedctx;
+  void           *stoppingctx;
+  PetscErrorCode (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
+  PetscErrorCode (*monitordestroy[MAXSVDMONITORS])(void**);
+  void           *monitorcontext[MAXSVDMONITORS];
+  PetscInt       numbermonitors;
 
   /*----------------- Child objects and working data -------------------*/
-  DS               ds;          /* direct solver object */
-  BV               U,V;         /* left and right singular vectors */
-  PetscRandom      rand;        /* random number generator */
-  SlepcSC          sc;          /* sorting criterion data */
-  Mat              A;           /* problem matrix (m>n) */
-  Mat              AT;          /* transposed matrix */
-  Vec              *IS,*ISL;    /* placeholder for references to user-provided initial space */
-  PetscReal        *sigma;      /* singular values */
-  PetscInt         *perm;       /* permutation for singular value ordering */
-  PetscReal        *errest;     /* error estimates */
-  void             *data;       /* placeholder for solver-specific stuff */
+  DS             ds;               /* direct solver object */
+  BV             U,V;              /* left and right singular vectors */
+  SlepcSC        sc;               /* sorting criterion data */
+  Mat            A;                /* problem matrix (m>n) */
+  Mat            AT;               /* transposed matrix */
+  Vec            *IS,*ISL;         /* placeholder for references to user initial space */
+  PetscReal      *sigma;           /* singular values */
+  PetscInt       *perm;            /* permutation for singular value ordering */
+  PetscReal      *errest;          /* error estimates */
+  void           *data;            /* placeholder for solver-specific stuff */
 
   /* ----------------------- Status variables -------------------------- */
-  SVDStateType     state;       /* initial -> setup -> solved -> vectors */
-  PetscInt         nconv;       /* number of converged values */
-  PetscInt         its;         /* iteration counter */
-  PetscBool        leftbasis;   /* if U is filled by the solver */
+  SVDStateType   state;            /* initial -> setup -> solved -> vectors */
+  PetscInt       nconv;            /* number of converged values */
+  PetscInt       its;              /* iteration counter */
+  PetscBool      leftbasis;        /* if U is filled by the solver */
   SVDConvergedReason reason;
 };
 
diff --git a/include/slepc/private/svdimpl.h.html b/include/slepc/private/svdimpl.h.html
index 0c80484..6fdafe0 100644
--- a/include/slepc/private/svdimpl.h.html
+++ b/include/slepc/private/svdimpl.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepc/private/svdimpl.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:41+00:00">
+<meta name="date" content="2016-05-16T10:34:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepc/private/svdimpl.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepc/private/svdimpl.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line34"> 34: </a><font color="#4169E1"><a name="_SVDOps"></a>struct _SVDOps </font>{
 <a name="line35"> 35: </a>  PetscErrorCode (*solve)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
 <a name="line36"> 36: </a>  PetscErrorCode (*setup)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
-<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptions*,<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
+<a name="line37"> 37: </a>  PetscErrorCode (*setfromoptions)(PetscOptionItems*,<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
 <a name="line38"> 38: </a>  PetscErrorCode (*publishoptions)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
 <a name="line39"> 39: </a>  PetscErrorCode (*destroy)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
 <a name="line40"> 40: </a>  PetscErrorCode (*reset)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
@@ -69,125 +69,132 @@
 <a name="line57"> 57: </a><font color="#4169E1"><a name="_p_SVD"></a>struct _p_SVD </font>{
 <a name="line58"> 58: </a>  PETSCHEADER(<font color="#4169E1">struct _SVDOps</font>);
 <a name="line59"> 59: </a>  <font color="#B22222">/*------------------------- User parameters ---------------------------*/</font>
-<a name="line60"> 60: </a>  Mat              OP;          <font color="#B22222">/* problem matrix */</font>
-<a name="line61"> 61: </a>  PetscInt         max_it;      <font color="#B22222">/* max iterations */</font>
-<a name="line62"> 62: </a>  PetscInt         nsv;         <font color="#B22222">/* number of requested values */</font>
-<a name="line63"> 63: </a>  PetscInt         ncv;         <font color="#B22222">/* basis size */</font>
-<a name="line64"> 64: </a>  PetscInt         mpd;         <font color="#B22222">/* maximum dimension of projected problem */</font>
-<a name="line65"> 65: </a>  PetscInt         nini,ninil;  <font color="#B22222">/* number of initial vectors (negative means not copied yet) */</font>
-<a name="line66"> 66: </a>  PetscReal        tol;         <font color="#B22222">/* tolerance */</font>
-<a name="line67"> 67: </a>  <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>         which;       <font color="#B22222">/* which singular values are computed */</font>
-<a name="line68"> 68: </a>  PetscBool        impltrans;   <font color="#B22222">/* implicit transpose mode */</font>
-<a name="line69"> 69: </a>  PetscBool        trackall;    <font color="#B22222">/* whether all the residuals must be computed */</font>
-
-<a name="line71"> 71: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
-<a name="line72"> 72: </a>  PetscErrorCode   (*monitor[MAXSVDMONITORS])(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
-<a name="line73"> 73: </a>  PetscErrorCode   (*monitordestroy[MAXSVDMONITORS])(void**);
-<a name="line74"> 74: </a>  void             *monitorcontext[MAXSVDMONITORS];
-<a name="line75"> 75: </a>  PetscInt         numbermonitors;
-
-<a name="line77"> 77: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
-<a name="line78"> 78: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>               ds;          <font color="#B22222">/* direct solver object */</font>
-<a name="line79"> 79: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>               U,V;         <font color="#B22222">/* left and right singular vectors */</font>
-<a name="line80"> 80: </a>  PetscRandom      rand;        <font color="#B22222">/* random number generator */</font>
-<a name="line81"> 81: </a>  SlepcSC          sc;          <font color="#B22222">/* sorting criterion data */</font>
-<a name="line82"> 82: </a>  Mat              A;           <font color="#B22222">/* problem matrix (m>n) */</font>
-<a name="line83"> 83: </a>  Mat              AT;          <font color="#B22222">/* transposed matrix */</font>
-<a name="line84"> 84: </a>  Vec              *IS,*ISL;    <font color="#B22222">/* placeholder for references to user-provided initial space */</font>
-<a name="line85"> 85: </a>  PetscReal        *sigma;      <font color="#B22222">/* singular values */</font>
-<a name="line86"> 86: </a>  PetscInt         *perm;       <font color="#B22222">/* permutation for singular value ordering */</font>
-<a name="line87"> 87: </a>  PetscReal        *errest;     <font color="#B22222">/* error estimates */</font>
-<a name="line88"> 88: </a>  void             *data;       <font color="#B22222">/* placeholder for solver-specific stuff */</font>
-
-<a name="line90"> 90: </a>  <font color="#B22222">/* ----------------------- Status variables -------------------------- */</font>
-<a name="line91"> 91: </a>  SVDStateType     state;       <font color="#B22222">/* initial -> setup -> solved -> vectors */</font>
-<a name="line92"> 92: </a>  PetscInt         nconv;       <font color="#B22222">/* number of converged values */</font>
-<a name="line93"> 93: </a>  PetscInt         its;         <font color="#B22222">/* iteration counter */</font>
-<a name="line94"> 94: </a>  PetscBool        leftbasis;   <font color="#B22222">/* if U is filled by the solver */</font>
-<a name="line95"> 95: </a>  <a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> reason;
-<a name="line96"> 96: </a>};
-
-<a name="line98"> 98: </a><font color="#B22222">/*</font>
-<a name="line99"> 99: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> arguments</font>
-<a name="line100">100: </a><font color="#B22222">*/</font>
-<a name="line101">101: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
-
-<a name="line103">103: </a><strong><font color="#228B22">#define SVDCheckSolved(h,arg) do {} while (0)</font></strong>
-
-<a name="line105">105: </a><font color="#A020F0">#else</font>
-
-<a name="line107">107: </a><strong><font color="#228B22">#define SVDCheckSolved(h,arg) \</font></strong>
-<a name="line108">108: </a><strong><font color="#228B22">  do { \</font></strong>
-<a name="line109">109: </a><strong><font color="#228B22">    if (h->state<SVD_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
-<a name="line110">110: </a><strong><font color="#228B22">  } while (0)</font></strong>
-
-<a name="line112">112: </a><font color="#A020F0">#endif</font>
-
-<a name="line116">116: </a><strong><font color="#4169E1"><a name="SVDMatMult"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatMult(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool trans,Vec x,Vec y)</font></strong>
-<a name="line117">117: </a>{
-
-<a name="line121">121: </a>  <font color="#4169E1">if</font> (trans) {
-<a name="line122">122: </a>    <font color="#4169E1">if</font> (svd->AT) {
-<a name="line123">123: </a>      MatMult(svd->AT,x,y);
-<a name="line124">124: </a>    } <font color="#4169E1">else</font> {
-<a name="line125">125: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line126">126: </a>      MatMultHermitianTranspose(svd->A,x,y);
-<a name="line127">127: </a><font color="#A020F0">#else</font>
-<a name="line128">128: </a>      MatMultTranspose(svd->A,x,y);
-<a name="line129">129: </a><font color="#A020F0">#endif</font>
-<a name="line130">130: </a>    }
-<a name="line131">131: </a>  } <font color="#4169E1">else</font> {
-<a name="line132">132: </a>    <font color="#4169E1">if</font> (svd->A) {
-<a name="line133">133: </a>      MatMult(svd->A,x,y);
-<a name="line134">134: </a>    } <font color="#4169E1">else</font> {
-<a name="line135">135: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line136">136: </a>      MatMultHermitianTranspose(svd->AT,x,y);
-<a name="line137">137: </a><font color="#A020F0">#else</font>
-<a name="line138">138: </a>      MatMultTranspose(svd->AT,x,y);
-<a name="line139">139: </a><font color="#A020F0">#endif</font>
-<a name="line140">140: </a>    }
-<a name="line141">141: </a>  }
-<a name="line142">142: </a>  <font color="#4169E1">return</font>(0);
-<a name="line143">143: </a>}
-
-<a name="line147">147: </a><strong><font color="#4169E1"><a name="SVDMatCreateVecs"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatCreateVecs(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,Vec *x,Vec *y)</font></strong>
-<a name="line148">148: </a>{
-
-<a name="line152">152: </a>  <font color="#4169E1">if</font> (svd->A) {
-<a name="line153">153: </a>    MatCreateVecs(svd->A,x,y);
-<a name="line154">154: </a>  } <font color="#4169E1">else</font> {
-<a name="line155">155: </a>    MatCreateVecs(svd->AT,y,x);
-<a name="line156">156: </a>  }
-<a name="line157">157: </a>  <font color="#4169E1">return</font>(0);
-<a name="line158">158: </a>}
-
-<a name="line162">162: </a><strong><font color="#4169E1"><a name="SVDMatGetSize"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatGetSize(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *m,PetscInt *n)</font></strong>
-<a name="line163">163: </a>{
-
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (svd->A) {
-<a name="line168">168: </a>    MatGetSize(svd->A,m,n);
-<a name="line169">169: </a>  } <font color="#4169E1">else</font> {
-<a name="line170">170: </a>    MatGetSize(svd->AT,n,m);
-<a name="line171">171: </a>  }
-<a name="line172">172: </a>  <font color="#4169E1">return</font>(0);
-<a name="line173">173: </a>}
-
-<a name="line177">177: </a><strong><font color="#4169E1"><a name="SVDMatGetLocalSize"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatGetLocalSize(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *m,PetscInt *n)</font></strong>
-<a name="line178">178: </a>{
-
-<a name="line182">182: </a>  <font color="#4169E1">if</font> (svd->A) {
-<a name="line183">183: </a>    MatGetLocalSize(svd->A,m,n);
-<a name="line184">184: </a>  } <font color="#4169E1">else</font> {
-<a name="line185">185: </a>    MatGetLocalSize(svd->AT,n,m);
-<a name="line186">186: </a>  }
-<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
-<a name="line188">188: </a>} 
-
-<a name="line190">190: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SVDTwoSideLanczos(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal*,PetscReal*,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
-<a name="line191">191: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SVDSetDimensions_Default(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line192">192: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SVDComputeVectors(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-
-<a name="line194">194: </a><font color="#A020F0">#endif</font>
+<a name="line60"> 60: </a>  Mat            OP;               <font color="#B22222">/* problem matrix */</font>
+<a name="line61"> 61: </a>  PetscInt       max_it;           <font color="#B22222">/* max iterations */</font>
+<a name="line62"> 62: </a>  PetscInt       nsv;              <font color="#B22222">/* number of requested values */</font>
+<a name="line63"> 63: </a>  PetscInt       ncv;              <font color="#B22222">/* basis size */</font>
+<a name="line64"> 64: </a>  PetscInt       mpd;              <font color="#B22222">/* maximum dimension of projected problem */</font>
+<a name="line65"> 65: </a>  PetscInt       nini,ninil;       <font color="#B22222">/* number of initial vecs (negative means not copied yet) */</font>
+<a name="line66"> 66: </a>  PetscReal      tol;              <font color="#B22222">/* tolerance */</font>
+<a name="line67"> 67: </a>  <a href="../../../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a>        conv;             <font color="#B22222">/* convergence test */</font>
+<a name="line68"> 68: </a>  <a href="../../../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a>        stop;             <font color="#B22222">/* stopping test */</font>
+<a name="line69"> 69: </a>  <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>       which;            <font color="#B22222">/* which singular values are computed */</font>
+<a name="line70"> 70: </a>  PetscBool      impltrans;        <font color="#B22222">/* implicit transpose mode */</font>
+<a name="line71"> 71: </a>  PetscBool      trackall;         <font color="#B22222">/* whether all the residuals must be computed */</font>
+
+<a name="line73"> 73: </a>  <font color="#B22222">/*-------------- User-provided functions and contexts -----------------*/</font>
+<a name="line74"> 74: </a>  PetscErrorCode (*converged)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscReal,PetscReal*,void*);
+<a name="line75"> 75: </a>  PetscErrorCode (*convergeddestroy)(void*);
+<a name="line76"> 76: </a>  PetscErrorCode (*stopping)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>*,void*);
+<a name="line77"> 77: </a>  PetscErrorCode (*stoppingdestroy)(void*);
+<a name="line78"> 78: </a>  void           *convergedctx;
+<a name="line79"> 79: </a>  void           *stoppingctx;
+<a name="line80"> 80: </a>  PetscErrorCode (*monitor[MAXSVDMONITORS])(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
+<a name="line81"> 81: </a>  PetscErrorCode (*monitordestroy[MAXSVDMONITORS])(void**);
+<a name="line82"> 82: </a>  void           *monitorcontext[MAXSVDMONITORS];
+<a name="line83"> 83: </a>  PetscInt       numbermonitors;
+
+<a name="line85"> 85: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
+<a name="line86"> 86: </a>  <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;               <font color="#B22222">/* direct solver object */</font>
+<a name="line87"> 87: </a>  <a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>             U,V;              <font color="#B22222">/* left and right singular vectors */</font>
+<a name="line88"> 88: </a>  SlepcSC        sc;               <font color="#B22222">/* sorting criterion data */</font>
+<a name="line89"> 89: </a>  Mat            A;                <font color="#B22222">/* problem matrix (m>n) */</font>
+<a name="line90"> 90: </a>  Mat            AT;               <font color="#B22222">/* transposed matrix */</font>
+<a name="line91"> 91: </a>  Vec            *IS,*ISL;         <font color="#B22222">/* placeholder for references to user initial space */</font>
+<a name="line92"> 92: </a>  PetscReal      *sigma;           <font color="#B22222">/* singular values */</font>
+<a name="line93"> 93: </a>  PetscInt       *perm;            <font color="#B22222">/* permutation for singular value ordering */</font>
+<a name="line94"> 94: </a>  PetscReal      *errest;          <font color="#B22222">/* error estimates */</font>
+<a name="line95"> 95: </a>  void           *data;            <font color="#B22222">/* placeholder for solver-specific stuff */</font>
+
+<a name="line97"> 97: </a>  <font color="#B22222">/* ----------------------- Status variables -------------------------- */</font>
+<a name="line98"> 98: </a>  SVDStateType   state;            <font color="#B22222">/* initial -> setup -> solved -> vectors */</font>
+<a name="line99"> 99: </a>  PetscInt       nconv;            <font color="#B22222">/* number of converged values */</font>
+<a name="line100">100: </a>  PetscInt       its;              <font color="#B22222">/* iteration counter */</font>
+<a name="line101">101: </a>  PetscBool      leftbasis;        <font color="#B22222">/* if U is filled by the solver */</font>
+<a name="line102">102: </a>  <a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> reason;
+<a name="line103">103: </a>};
+
+<a name="line105">105: </a><font color="#B22222">/*</font>
+<a name="line106">106: </a><font color="#B22222">    Macros to test valid <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> arguments</font>
+<a name="line107">107: </a><font color="#B22222">*/</font>
+<a name="line108">108: </a><font color="#A020F0">#if !defined(PETSC_USE_DEBUG)</font>
+
+<a name="line110">110: </a><strong><font color="#228B22">#define SVDCheckSolved(h,arg) do {} while (0)</font></strong>
+
+<a name="line112">112: </a><font color="#A020F0">#else</font>
+
+<a name="line114">114: </a><strong><font color="#228B22">#define SVDCheckSolved(h,arg) \</font></strong>
+<a name="line115">115: </a><strong><font color="#228B22">  do { \</font></strong>
+<a name="line116">116: </a><strong><font color="#228B22">    if (h->state<SVD_STATE_SOLVED) SETERRQ1(PetscObjectComm((PetscObject)h),PETSC_ERR_ARG_WRONGSTATE,</font><font color="#666666">"Must call <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() first: Parameter #%d"</font><font color="#228B22">,arg); \</font></strong>
+<a name="line117">117: </a><strong><font color="#228B22">  } while (0)</font></strong>
+
+<a name="line119">119: </a><font color="#A020F0">#endif</font>
+
+<a name="line123">123: </a><strong><font color="#4169E1"><a name="SVDMatMult"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatMult(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool trans,Vec x,Vec y)</font></strong>
+<a name="line124">124: </a>{
+
+<a name="line128">128: </a>  <font color="#4169E1">if</font> (trans) {
+<a name="line129">129: </a>    <font color="#4169E1">if</font> (svd->AT) {
+<a name="line130">130: </a>      MatMult(svd->AT,x,y);
+<a name="line131">131: </a>    } <font color="#4169E1">else</font> {
+<a name="line132">132: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line133">133: </a>      MatMultHermitianTranspose(svd->A,x,y);
+<a name="line134">134: </a><font color="#A020F0">#else</font>
+<a name="line135">135: </a>      MatMultTranspose(svd->A,x,y);
+<a name="line136">136: </a><font color="#A020F0">#endif</font>
+<a name="line137">137: </a>    }
+<a name="line138">138: </a>  } <font color="#4169E1">else</font> {
+<a name="line139">139: </a>    <font color="#4169E1">if</font> (svd->A) {
+<a name="line140">140: </a>      MatMult(svd->A,x,y);
+<a name="line141">141: </a>    } <font color="#4169E1">else</font> {
+<a name="line142">142: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line143">143: </a>      MatMultHermitianTranspose(svd->AT,x,y);
+<a name="line144">144: </a><font color="#A020F0">#else</font>
+<a name="line145">145: </a>      MatMultTranspose(svd->AT,x,y);
+<a name="line146">146: </a><font color="#A020F0">#endif</font>
+<a name="line147">147: </a>    }
+<a name="line148">148: </a>  }
+<a name="line149">149: </a>  <font color="#4169E1">return</font>(0);
+<a name="line150">150: </a>}
+
+<a name="line154">154: </a><strong><font color="#4169E1"><a name="SVDMatCreateVecs"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatCreateVecs(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,Vec *x,Vec *y)</font></strong>
+<a name="line155">155: </a>{
+
+<a name="line159">159: </a>  <font color="#4169E1">if</font> (svd->A) {
+<a name="line160">160: </a>    MatCreateVecs(svd->A,x,y);
+<a name="line161">161: </a>  } <font color="#4169E1">else</font> {
+<a name="line162">162: </a>    MatCreateVecs(svd->AT,y,x);
+<a name="line163">163: </a>  }
+<a name="line164">164: </a>  <font color="#4169E1">return</font>(0);
+<a name="line165">165: </a>}
+
+<a name="line169">169: </a><strong><font color="#4169E1"><a name="SVDMatGetSize"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatGetSize(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *m,PetscInt *n)</font></strong>
+<a name="line170">170: </a>{
+
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (svd->A) {
+<a name="line175">175: </a>    MatGetSize(svd->A,m,n);
+<a name="line176">176: </a>  } <font color="#4169E1">else</font> {
+<a name="line177">177: </a>    MatGetSize(svd->AT,n,m);
+<a name="line178">178: </a>  }
+<a name="line179">179: </a>  <font color="#4169E1">return</font>(0);
+<a name="line180">180: </a>}
+
+<a name="line184">184: </a><strong><font color="#4169E1"><a name="SVDMatGetLocalSize"></a>PETSC_STATIC_INLINE PetscErrorCode SVDMatGetLocalSize(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *m,PetscInt *n)</font></strong>
+<a name="line185">185: </a>{
+
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (svd->A) {
+<a name="line190">190: </a>    MatGetLocalSize(svd->A,m,n);
+<a name="line191">191: </a>  } <font color="#4169E1">else</font> {
+<a name="line192">192: </a>    MatGetLocalSize(svd->AT,n,m);
+<a name="line193">193: </a>  }
+<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
+<a name="line195">195: </a>} 
+
+<a name="line197">197: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SVDTwoSideLanczos(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal*,PetscReal*,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line198">198: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SVDSetDimensions_Default(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line199">199: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode SVDComputeVectors(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+
+<a name="line201">201: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepc/private/vecimplslepc.h b/include/slepc/private/vecimplslepc.h
index c1e27ec..c5185a0 100644
--- a/include/slepc/private/vecimplslepc.h
+++ b/include/slepc/private/vecimplslepc.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepcblaslapack.h b/include/slepcblaslapack.h
index 218da1b..808f13b 100644
--- a/include/slepcblaslapack.h
+++ b/include/slepcblaslapack.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -104,6 +104,7 @@
 #define LAPACKlaev2_ SLEPC_BLASLAPACK(laev2,LAEV2)
 #define LAPACKgehrd_ SLEPC_BLASLAPACK(gehrd,GEHRD)
 #define LAPACKgelqf_ SLEPC_BLASLAPACK(gelqf,GELQF)
+#define LAPACKgeqp3_ SLEPC_BLASLAPACK(geqp3,GEQP3)
 #define LAPACKtgexc_ SLEPC_BLASLAPACK(tgexc,TGEXC)
 #define LAPACKlarfg_ SLEPC_BLASLAPACK(larfg,LARFG)
 #define LAPACKlag2_  SLEPC_BLASLAPACKREAL(lag2,LAG2)
@@ -115,10 +116,8 @@
 #define LAPACKlapy2_ SLEPC_BLASLAPACKREAL(lapy2,LAPY2)
 #if !defined(PETSC_USE_COMPLEX)
 #define LAPACKorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)
-#define LAPACKorgqr_ SLEPC_BLASLAPACK(orgqr,ORGQR)
 #else
 #define LAPACKorghr_ SLEPC_BLASLAPACK(unghr,UNGHR)
-#define LAPACKorgqr_ SLEPC_BLASLAPACK(ungqr,UNGQR)
 #endif
 /* the next one needs a special treatment due to the special names:
    srot, drot, csrot, zdrot */
@@ -149,6 +148,8 @@
 #define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(lascl,LASCL) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)
 #define LAPACKlansy_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lansy,LANSY) ((a),(b),(c),(d),(e),(f),1,1)
 #define LAPACKlaset_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(laset,LASET) ((a),(b),(c),(d),(e),(f),(g),1)
+#define LAPACKtrsyl_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(trsyl,TRSYL) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)
+#define LAPACKtrtri_(a,b,c,d,e,f) SLEPC_BLASLAPACK(trtri,TRTRI) ((a),(b),(c),(d),(e),(f),1,1)
 /* subroutines in which we use only the real version, do not care whether they have different name */
 #define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) SLEPC_BLASLAPACKREAL(stevr,STEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),1,1)
 #define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)
@@ -165,6 +166,7 @@
 #define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(sytrd,SYTRD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)
 #define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(trevc,TREVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)
 #define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,1,1)
+#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)
 #define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(trexc,TREXC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)
 #define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1)
 #define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,1)
@@ -180,6 +182,7 @@
 #define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(hetrd,HETRD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)
 #define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(trevc,TREVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)
 #define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),1,1,1,1)
+#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)
 #define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(trexc,TREXC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),1)
 #define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1)
 #define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,1)
@@ -201,6 +204,8 @@
 #define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(lascl,LASCL) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))
 #define LAPACKlansy_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lansy,LANSY) ((a),1,(b),1,(c),(d),(e),(f))
 #define LAPACKlaset_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(laset,LASET) ((a),1,(b),(c),(d),(e),(f),(g))
+#define LAPACKtrsyl_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(trsyl,TRSYL) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))
+#define LAPACKtrtri_(a,b,c,d,e,f) SLEPC_BLASLAPACK(trtri,TRTRI) ((a),1,(b),1,(c),(d),(e),(f))
 /* subroutines in which we use only the real version, do not care whether they have different name */
 #define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) SLEPC_BLASLAPACKREAL(stevr,STEVR) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t))
 #define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))
@@ -217,6 +222,7 @@
 #define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(sytrd,SYTRD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))
 #define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(trevc,TREVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))
 #define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w))
+#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))
 #define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(trexc,TREXC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))
 #define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))
 #define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p))
@@ -232,6 +238,7 @@
 #define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(hetrd,HETRD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))
 #define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(trevc,TREVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))
 #define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v))
+#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))
 #define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(trexc,TREXC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i))
 #define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))
 #define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q))
@@ -259,11 +266,11 @@ PETSC_EXTERN void      BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscSc
 #if !defined(PETSC_USE_COMPLEX)
 PETSC_EXTERN void      SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(orghr,ORGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
-PETSC_EXTERN void      SLEPC_BLASLAPACK(orgqr,ORGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
+PETSC_EXTERN void      SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 #else
 PETSC_EXTERN void      SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(unghr,UNGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
-PETSC_EXTERN void      SLEPC_BLASLAPACK(ungqr,UNGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
+PETSC_EXTERN void      SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
 #endif
 
 /* LAPACK functions with string parameters */
@@ -275,6 +282,8 @@ PETSC_EXTERN void      SLEPC_BLASLAPACK(trmm,TRMM) (const char*,const char*,cons
 PETSC_EXTERN void      SLEPC_BLASLAPACK(lacpy,LACPY) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lansy,LANSY) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(laset,LASET) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt);
+PETSC_EXTERN void      SLEPC_BLASLAPACK(trsyl,TRSYL) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
+PETSC_EXTERN void      SLEPC_BLASLAPACK(trtri,TRTRI) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
 
 PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(stevr,STEVR) (const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) (const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
@@ -292,6 +301,7 @@ PETSC_EXTERN void      SLEPC_BLASLAPACK(orgtr,ORGTR) (const char*,PetscBLASInt*,
 PETSC_EXTERN void      SLEPC_BLASLAPACK(sytrd,SYTRD) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(trevc,TREVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
+PETSC_EXTERN void      SLEPC_BLASLAPACK(gees,GEES) (const char*,const char*,PetscBLASInt(*)(PetscReal,PetscReal),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
@@ -309,6 +319,7 @@ PETSC_EXTERN void      SLEPC_BLASLAPACK(ungtr,UNGTR) (const char*,PetscBLASInt*,
 PETSC_EXTERN void      SLEPC_BLASLAPACK(hetrd,HETRD) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(trevc,TREVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
+PETSC_EXTERN void      SLEPC_BLASLAPACK(gees,GEES) (const char*,const char*,PetscBLASInt(*)(PetscScalar),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
 PETSC_EXTERN void      SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
@@ -335,11 +346,11 @@ PETSC_EXTERN void PETSC_STDCALL BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt
 #if !defined(PETSC_USE_COMPLEX)
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orghr,ORGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
-PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orgqr,ORGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
+PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 #else
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(unghr,UNGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
-PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ungqr,UNGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
+PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
 #endif
 
 /* LAPACK functions with string parameters */
@@ -351,6 +362,8 @@ PETSC_EXTERN void      SLEPC_BLASLAPACK(trmm,TRMM) (const char*,PetscBLASInt,con
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lacpy,LACPY) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
 PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lansy,LANSY) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(laset,LASET) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*);
+PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trsyl,TRSYL) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
+PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trtri,TRTRI) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(stevr,STEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
@@ -368,6 +381,7 @@ PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orgtr,ORGTR) (const char*,Petsc
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(sytrd,SYTRD) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trevc,TREVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
+PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gees,GEES) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt(*)(PetscReal,PetscReal),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
@@ -385,6 +399,7 @@ PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ungtr,UNGTR) (const char*,Petsc
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hetrd,HETRD) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trevc,TREVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
+PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gees,GEES) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt(*)(PetscScalar),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
 PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*);
diff --git a/include/slepcblaslapack.h.html b/include/slepcblaslapack.h.html
index 8834f99..860762a 100644
--- a/include/slepcblaslapack.h.html
+++ b/include/slepcblaslapack.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcblaslapack.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:32+00:00">
+<meta name="date" content="2016-05-16T10:34:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcblaslapack.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcblaslapack.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Necessary routines in BLAS and LAPACK not included in petscblaslapack.f</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -114,298 +114,313 @@
 <a name="line104">104: </a><strong><font color="#228B22">#define LAPACKlaev2_ SLEPC_BLASLAPACK(laev2,LAEV2)</font></strong>
 <a name="line105">105: </a><strong><font color="#228B22">#define LAPACKgehrd_ SLEPC_BLASLAPACK(gehrd,GEHRD)</font></strong>
 <a name="line106">106: </a><strong><font color="#228B22">#define LAPACKgelqf_ SLEPC_BLASLAPACK(gelqf,GELQF)</font></strong>
-<a name="line107">107: </a><strong><font color="#228B22">#define LAPACKtgexc_ SLEPC_BLASLAPACK(tgexc,TGEXC)</font></strong>
-<a name="line108">108: </a><strong><font color="#228B22">#define LAPACKlarfg_ SLEPC_BLASLAPACK(larfg,LARFG)</font></strong>
-<a name="line109">109: </a><strong><font color="#228B22">#define LAPACKlag2_  SLEPC_BLASLAPACKREAL(lag2,LAG2)</font></strong>
-<a name="line110">110: </a><strong><font color="#228B22">#define LAPACKlasv2_ SLEPC_BLASLAPACKREAL(lasv2,LASV2)</font></strong>
-<a name="line111">111: </a><strong><font color="#228B22">#define LAPACKlartg_ SLEPC_BLASLAPACKREAL(lartg,LARTG)</font></strong>
-<a name="line112">112: </a><strong><font color="#228B22">#define LAPACKlaln2_ SLEPC_BLASLAPACKREAL(laln2,LALN2)</font></strong>
-<a name="line113">113: </a><strong><font color="#228B22">#define LAPACKlaed4_ SLEPC_BLASLAPACKREAL(laed4,LAED4)</font></strong>
-<a name="line114">114: </a><strong><font color="#228B22">#define LAPACKlamrg_ SLEPC_BLASLAPACKREAL(lamrg,LAMRG)</font></strong>
-<a name="line115">115: </a><strong><font color="#228B22">#define LAPACKlapy2_ SLEPC_BLASLAPACKREAL(lapy2,LAPY2)</font></strong>
-<a name="line116">116: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line117">117: </a><strong><font color="#228B22">#define LAPACKorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)</font></strong>
-<a name="line118">118: </a><strong><font color="#228B22">#define LAPACKorgqr_ SLEPC_BLASLAPACK(orgqr,ORGQR)</font></strong>
+<a name="line107">107: </a><strong><font color="#228B22">#define LAPACKgeqp3_ SLEPC_BLASLAPACK(geqp3,GEQP3)</font></strong>
+<a name="line108">108: </a><strong><font color="#228B22">#define LAPACKtgexc_ SLEPC_BLASLAPACK(tgexc,TGEXC)</font></strong>
+<a name="line109">109: </a><strong><font color="#228B22">#define LAPACKlarfg_ SLEPC_BLASLAPACK(larfg,LARFG)</font></strong>
+<a name="line110">110: </a><strong><font color="#228B22">#define LAPACKlag2_  SLEPC_BLASLAPACKREAL(lag2,LAG2)</font></strong>
+<a name="line111">111: </a><strong><font color="#228B22">#define LAPACKlasv2_ SLEPC_BLASLAPACKREAL(lasv2,LASV2)</font></strong>
+<a name="line112">112: </a><strong><font color="#228B22">#define LAPACKlartg_ SLEPC_BLASLAPACKREAL(lartg,LARTG)</font></strong>
+<a name="line113">113: </a><strong><font color="#228B22">#define LAPACKlaln2_ SLEPC_BLASLAPACKREAL(laln2,LALN2)</font></strong>
+<a name="line114">114: </a><strong><font color="#228B22">#define LAPACKlaed4_ SLEPC_BLASLAPACKREAL(laed4,LAED4)</font></strong>
+<a name="line115">115: </a><strong><font color="#228B22">#define LAPACKlamrg_ SLEPC_BLASLAPACKREAL(lamrg,LAMRG)</font></strong>
+<a name="line116">116: </a><strong><font color="#228B22">#define LAPACKlapy2_ SLEPC_BLASLAPACKREAL(lapy2,LAPY2)</font></strong>
+<a name="line117">117: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line118">118: </a><strong><font color="#228B22">#define LAPACKorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)</font></strong>
 <a name="line119">119: </a><font color="#A020F0">#else</font>
 <a name="line120">120: </a><strong><font color="#228B22">#define LAPACKorghr_ SLEPC_BLASLAPACK(unghr,UNGHR)</font></strong>
-<a name="line121">121: </a><strong><font color="#228B22">#define LAPACKorgqr_ SLEPC_BLASLAPACK(ungqr,UNGQR)</font></strong>
-<a name="line122">122: </a><font color="#A020F0">#endif</font>
-<a name="line123">123: </a><font color="#B22222">/* the next one needs a special treatment due to the special names:</font>
-<a name="line124">124: </a><font color="#B22222">   srot, drot, csrot, zdrot */</font>
-<a name="line125">125: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line126">126: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(rot,ROT)</font></strong>
-<a name="line127">127: </a><font color="#A020F0">#else</font>
-<a name="line128">128: </a><font color="#A020F0">#if defined(PETSC_USE_REAL_SINGLE)</font>
-<a name="line129">129: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(srot,SROT)</font></strong>
-<a name="line130">130: </a><font color="#A020F0">#elif defined(PETSC_USE_REAL___FLOAT128)</font>
-<a name="line131">131: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(qrot,QROT)</font></strong>
-<a name="line132">132: </a><font color="#A020F0">#else</font>
-<a name="line133">133: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(drot,DROT)</font></strong>
+<a name="line121">121: </a><font color="#A020F0">#endif</font>
+<a name="line122">122: </a><font color="#B22222">/* the next one needs a special treatment due to the special names:</font>
+<a name="line123">123: </a><font color="#B22222">   srot, drot, csrot, zdrot */</font>
+<a name="line124">124: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line125">125: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(rot,ROT)</font></strong>
+<a name="line126">126: </a><font color="#A020F0">#else</font>
+<a name="line127">127: </a><font color="#A020F0">#if defined(PETSC_USE_REAL_SINGLE)</font>
+<a name="line128">128: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(srot,SROT)</font></strong>
+<a name="line129">129: </a><font color="#A020F0">#elif defined(PETSC_USE_REAL___FLOAT128)</font>
+<a name="line130">130: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(qrot,QROT)</font></strong>
+<a name="line131">131: </a><font color="#A020F0">#else</font>
+<a name="line132">132: </a><strong><font color="#228B22">#define BLASrot_     SLEPC_BLASLAPACK(drot,DROT)</font></strong>
+<a name="line133">133: </a><font color="#A020F0">#endif</font>
 <a name="line134">134: </a><font color="#A020F0">#endif</font>
-<a name="line135">135: </a><font color="#A020F0">#endif</font>
-
-<a name="line137">137: </a><font color="#B22222">/* LAPACK functions with string parameters */</font>
-<a name="line138">138: </a><font color="#A020F0">#if !defined(PETSC_BLASLAPACK_STDCALL)</font>
-
-<a name="line140">140: </a><font color="#B22222">/* same name for real and complex */</font>
-<a name="line141">141: </a><strong><font color="#228B22">#define LAPACKlanhs_(a,b,c,d,e) SLEPC_BLASLAPACK(lanhs,LANHS) ((a),(b),(c),(d),(e),1)</font></strong>
-<a name="line142">142: </a><strong><font color="#228B22">#define LAPACKlange_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lange,LANGE) ((a),(b),(c),(d),(e),(f),1)</font></strong>
-<a name="line143">143: </a><strong><font color="#228B22">#define LAPACKggevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac) SLEPC_BLASLAPACK(ggevx,GGEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),(y),(z),(aa),(ab),(ac),1,1,1,1)</font></strong>
-<a name="line144">144: </a><strong><font color="#228B22">#define LAPACKggev_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(ggev,GGEV) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,1)</font></strong>
-<a name="line145">145: </a><strong><font color="#228B22">#define LAPACKpbtrf_(a,b,c,d,e,f) SLEPC_BLASLAPACK(pbtrf,PBTRF) ((a),(b),(c),(d),(e),(f),1)</font></strong>
-<a name="line146">146: </a><strong><font color="#228B22">#define LAPACKlarf_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(larf,LARF) ((a),(b),(c),(d),(e),(f),(g),(h),(i),1)</font></strong>
-<a name="line147">147: </a><strong><font color="#228B22">#define BLAStrmm_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(trmm,TRMM) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),1,1,1,1)</font></strong>
-<a name="line148">148: </a><strong><font color="#228B22">#define LAPACKlacpy_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(lacpy,LACPY) ((a),(b),(c),(d),(e),(f),(g),1)</font></strong>
-<a name="line149">149: </a><strong><font color="#228B22">#define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(lascl,LASCL) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
-<a name="line150">150: </a><strong><font color="#228B22">#define LAPACKlansy_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lansy,LANSY) ((a),(b),(c),(d),(e),(f),1,1)</font></strong>
-<a name="line151">151: </a><strong><font color="#228B22">#define LAPACKlaset_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(laset,LASET) ((a),(b),(c),(d),(e),(f),(g),1)</font></strong>
-<a name="line152">152: </a><font color="#B22222">/* subroutines in which we use only the real version, do not care whether they have different name */</font>
-<a name="line153">153: </a><strong><font color="#228B22">#define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) SLEPC_BLASLAPACKREAL(stevr,STEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),1,1)</font></strong>
-<a name="line154">154: </a><strong><font color="#228B22">#define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)</font></strong>
-<a name="line155">155: </a><strong><font color="#228B22">#define LAPACKlamch_(a) SLEPC_BLASLAPACKREAL(lamch,LAMCH) ((a),1)</font></strong>
-<a name="line156">156: </a><strong><font color="#228B22">#define LAPACKlamc3_(a,b) SLEPC_BLASLAPACKREAL(lamc3,LAMC3) ((a),(b))</font></strong>
-
-<a name="line158">158: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line159">159: </a><font color="#B22222">/* different name or signature, real */</font>
-<a name="line160">160: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) SLEPC_BLASLAPACK(syevr,SYEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),1,1,1)</font></strong>
-<a name="line161">161: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(syevd,SYEVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),1,1)</font></strong>
-<a name="line162">162: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n)  SLEPC_BLASLAPACK(sygvd,SYGVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)</font></strong>
-<a name="line163">163: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(ormlq,ORMLQ) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
-<a name="line164">164: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(orgtr,ORGTR) ((a),(b),(c),(d),(e),(f),(g),(h),1)</font></strong>
-<a name="line165">165: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(sytrd,SYTRD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
-<a name="line166">166: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(trevc,TREVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)</font></strong>
-<a name="line167">167: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,1,1)</font></strong>
-<a name="line168">168: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(trexc,TREXC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
-<a name="line169">169: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1)</font></strong>
-<a name="line170">170: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,1)</font></strong>
-<a name="line171">171: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),1,1,1)</font></strong>
-<a name="line172">172: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(stedc,STEDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),1)</font></strong>
-<a name="line173">173: </a><font color="#A020F0">#else</font>
-<a name="line174">174: </a><font color="#B22222">/* different name or signature, complex */</font>
-<a name="line175">175: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(heevr,HEEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,1)</font></strong>
-<a name="line176">176: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(heevd,HEEVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
-<a name="line177">177: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(hegvd,HEGVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,1)</font></strong>
-<a name="line178">178: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(unmlq,UNMLQ) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
-<a name="line179">179: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(ungtr,UNGTR) ((a),(b),(c),(d),(e),(f),(g),(h),1)</font></strong>
-<a name="line180">180: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(hetrd,HETRD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
-<a name="line181">181: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(trevc,TREVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)</font></strong>
-<a name="line182">182: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),1,1,1,1)</font></strong>
-<a name="line183">183: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(trexc,TREXC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),1)</font></strong>
-<a name="line184">184: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1)</font></strong>
-<a name="line185">185: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,1)</font></strong>
-<a name="line186">186: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),1,1,1)</font></strong>
-<a name="line187">187: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(stedc,STEDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1)</font></strong>
-<a name="line188">188: </a><font color="#A020F0">#endif</font>
-
-<a name="line190">190: </a><font color="#A020F0">#else </font><font color="#B22222">/* PETSC_BLASLAPACK_STDCALL */</font><font color="#A020F0"></font>
-
-<a name="line192">192: </a><font color="#B22222">/* same name for real and complex */</font>
-<a name="line193">193: </a><strong><font color="#228B22">#define LAPACKlanhs_(a,b,c,d,e) SLEPC_BLASLAPACK(lanhs,LANHS) ((a),1,(b),(c),(d),(e))</font></strong>
-<a name="line194">194: </a><strong><font color="#228B22">#define LAPACKlange_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lange,LANGE) ((a),1,(b),(c),(d),(e),(f))</font></strong>
-<a name="line195">195: </a><strong><font color="#228B22">#define LAPACKggevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac) SLEPC_BLASLAPACK(ggevx,GGEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),(y),(z),(aa),(ab),(ac))</font></strong>
-<a name="line196">196: </a><strong><font color="#228B22">#define LAPACKggev_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(ggev,GGEV) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q))</font></strong>
-<a name="line197">197: </a><strong><font color="#228B22">#define LAPACKpbtrf_(a,b,c,d,e,f) SLEPC_BLASLAPACK(pbtrf,PBTRF) ((a),1,(b),(c),(d),(e),(f))</font></strong>
-<a name="line198">198: </a><strong><font color="#228B22">#define LAPACKlarf_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(larf,LARF) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i))</font></strong>
-<a name="line199">199: </a><strong><font color="#228B22">#define BLAStrmm_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(trmm,TRMM) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k))</font></strong>
-<a name="line200">200: </a><strong><font color="#228B22">#define LAPACKlacpy_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(lacpy,LACPY) ((a),1,(b),(c),(d),(e),(f),(g))</font></strong>
-<a name="line201">201: </a><strong><font color="#228B22">#define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(lascl,LASCL) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
-<a name="line202">202: </a><strong><font color="#228B22">#define LAPACKlansy_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lansy,LANSY) ((a),1,(b),1,(c),(d),(e),(f))</font></strong>
-<a name="line203">203: </a><strong><font color="#228B22">#define LAPACKlaset_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(laset,LASET) ((a),1,(b),(c),(d),(e),(f),(g))</font></strong>
-<a name="line204">204: </a><font color="#B22222">/* subroutines in which we use only the real version, do not care whether they have different name */</font>
-<a name="line205">205: </a><strong><font color="#228B22">#define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) SLEPC_BLASLAPACKREAL(stevr,STEVR) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t))</font></strong>
-<a name="line206">206: </a><strong><font color="#228B22">#define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
-<a name="line207">207: </a><strong><font color="#228B22">#define LAPACKlamch_(a) SLEPC_BLASLAPACKREAL(lamch,LAMCH) ((a),1)</font></strong>
-<a name="line208">208: </a><strong><font color="#228B22">#define LAPACKlamc3_(a,b) SLEPC_BLASLAPACKREAL(lamc3,LAMC3) ((a),(b))</font></strong>
-
-<a name="line210">210: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line211">211: </a><font color="#B22222">/* different name or signature, real */</font>
-<a name="line212">212: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) SLEPC_BLASLAPACK(syevr,SYEVR) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u))</font></strong>
-<a name="line213">213: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(syevd,SYEVD) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k))</font></strong>
-<a name="line214">214: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n)  SLEPC_BLASLAPACK(sygvd,SYGVD) ((a),(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
-<a name="line215">215: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(ormlq,ORMLQ) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
-<a name="line216">216: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(orgtr,ORGTR) ((a),1,(b),(c),(d),(e),(f),(g),(h))</font></strong>
-<a name="line217">217: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(sytrd,SYTRD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
-<a name="line218">218: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(trevc,TREVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
-<a name="line219">219: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w))</font></strong>
-<a name="line220">220: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(trexc,TREXC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
-<a name="line221">221: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
-<a name="line222">222: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p))</font></strong>
-<a name="line223">223: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s))</font></strong>
-<a name="line224">224: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(stedc,STEDC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k))</font></strong>
-<a name="line225">225: </a><font color="#A020F0">#else</font>
-<a name="line226">226: </a><font color="#B22222">/* different name or signature, complex */</font>
-<a name="line227">227: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(heevr,HEEVR) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w))</font></strong>
-<a name="line228">228: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(heevd,HEEVD) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
-<a name="line229">229: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(hegvd,HEGVD) ((a),(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p))</font></strong>
-<a name="line230">230: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(unmlq,UNMLQ) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
-<a name="line231">231: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(ungtr,UNGTR) ((a),1,(b),(c),(d),(e),(f),(g),(h))</font></strong>
-<a name="line232">232: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(hetrd,HETRD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
-<a name="line233">233: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(trevc,TREVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))</font></strong>
-<a name="line234">234: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v))</font></strong>
-<a name="line235">235: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(trexc,TREXC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i))</font></strong>
-<a name="line236">236: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))</font></strong>
-<a name="line237">237: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q))</font></strong>
-<a name="line238">238: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s))</font></strong>
-<a name="line239">239: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(stedc,STEDC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
-<a name="line240">240: </a><font color="#A020F0">#endif</font>
-
-<a name="line242">242: </a><font color="#A020F0">#endif</font>
-
-<a name="line244">244: </a><font color="#A020F0">#if !defined(PETSC_BLASLAPACK_STDCALL)</font>
-
-<a name="line246">246: </a><font color="#B22222">/* LAPACK functions without string parameters */</font>
-<a name="line247">247: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(laev2,LAEV2) (PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*)</font></strong>;
-<a name="line248">248: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gehrd,GEHRD) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line249">249: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gelqf,GELQF) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line250">250: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(larfg,LARFG) (PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*)</font></strong>;
-<a name="line251">251: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lag2,LAG2) (PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line252">252: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lasv2,LASV2) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line253">253: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lartg,LARTG) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line254">254: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(laln2,LALN2) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line255">255: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(laed4,LAED4) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line256">256: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lamrg,LAMRG) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line257">257: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lapy2,LAPY2) (PetscReal*,PetscReal*)</font></strong>;
-<a name="line258">258: </a><strong><font color="#4169E1">PETSC_EXTERN void      BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line259">259: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line260">260: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line261">261: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(orghr,ORGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line262">262: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(orgqr,ORGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line263">263: </a><font color="#A020F0">#else</font>
-<a name="line264">264: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line265">265: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(unghr,UNGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line266">266: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ungqr,UNGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line267">267: </a><font color="#A020F0">#endif</font>
-
-<a name="line269">269: </a><font color="#B22222">/* LAPACK functions with string parameters */</font>
-<a name="line270">270: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lanhs,LANHS) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt)</font></strong>;
-<a name="line271">271: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lange,LANGE) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt)</font></strong>;
-<a name="line272">272: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(pbtrf,PBTRF) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line273">273: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(larf,LARF) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt)</font></strong>;
-<a name="line274">274: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trmm,TRMM) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line275">275: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(lacpy,LACPY) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line276">276: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lansy,LANSY) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line277">277: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(laset,LASET) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-
-<a name="line279">279: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(stevr,STEVR) (const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line280">280: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) (const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line281">281: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamch,LAMCH) (const char*,PetscBLASInt)</font></strong>;
-<a name="line282">282: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamc3,LAMC3) (PetscReal*,PetscReal*)</font></strong>;
-
-<a name="line284">284: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line285">285: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASIn [...]
-<a name="line286">286: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggev,GGEV) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line287">287: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(syevr,SYEVR) (const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line288">288: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(syevd,SYEVD) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line289">289: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(sygvd,SYGVD) (PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line290">290: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ormlq,ORMLQ) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line291">291: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(orgtr,ORGTR) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line292">292: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(sytrd,SYTRD) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line293">293: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trevc,TREVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line295">295: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line296">296: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line297">297: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line298">298: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line299">299: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line300">300: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line301">301: </a><font color="#A020F0">#else</font>
-<a name="line302">302: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*, PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLAS [...]
-<a name="line303">303: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggev,GGEV) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line304">304: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(heevr,HEEVR) (const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line305">305: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(heevd,HEEVD) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line306">306: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hegvd,HEGVD) (PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line307">307: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(unmlq,UNMLQ) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line308">308: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ungtr,UNGTR) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line309">309: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hetrd,HETRD) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line310">310: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trevc,TREVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line311">311: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line312">312: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line313">313: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line314">314: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line315">315: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
-<a name="line316">316: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line317">317: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
-<a name="line318">318: </a><font color="#A020F0">#endif</font>
-
-<a name="line320">320: </a><font color="#A020F0">#else </font><font color="#B22222">/* PETSC_BLASLAPACK_STDCALL */</font><font color="#A020F0"></font>
-
-<a name="line322">322: </a><font color="#B22222">/* LAPACK functions without string parameters */</font>
-<a name="line323">323: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(laev2,LAEV2) (PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*)</font></strong>;
-<a name="line324">324: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gehrd,GEHRD) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line325">325: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gelqf,GELQF) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line326">326: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(larfg,LARFG) (PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*)</font></strong>;
-<a name="line327">327: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lag2,LAG2) (PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line328">328: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lasv2,LASV2) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line329">329: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lartg,LARTG) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line330">330: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(laln2,LALN2) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line331">331: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(laed4,LAED4) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line332">332: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lamrg,LAMRG) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line333">333: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACKREAL(lapy2,LAPY2) (PetscReal*,PetscReal*)</font></strong>;
-<a name="line334">334: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line335">335: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line336">336: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line337">337: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orghr,ORGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line338">338: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orgqr,ORGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line339">339: </a><font color="#A020F0">#else</font>
-<a name="line340">340: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line341">341: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(unghr,UNGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line342">342: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ungqr,UNGQR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line343">343: </a><font color="#A020F0">#endif</font>
-
-<a name="line345">345: </a><font color="#B22222">/* LAPACK functions with string parameters */</font>
-<a name="line346">346: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lanhs,LANHS) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*)</font></strong>;
-<a name="line347">347: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lange,LANGE) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*)</font></strong>;
-<a name="line348">348: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(pbtrf,PBTRF) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line349">349: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(larf,LARF) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*)</font></strong>;
-<a name="line350">350: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trmm,TRMM) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
-<a name="line351">351: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lacpy,LACPY) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
-<a name="line352">352: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lansy,LANSY) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*)</font></strong>;
-<a name="line353">353: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(laset,LASET) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*)</font></strong>;
-
-<a name="line355">355: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(stevr,STEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line356">356: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line357">357: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamch,LAMCH) (const char*,PetscBLASInt)</font></strong>;
-<a name="line358">358: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamc3,LAMC3) (PetscReal*,PetscReal*)</font></strong>;
-
-<a name="line360">360: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line361">361: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,Petsc [...]
-<a name="line362">362: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggev,GGEV) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line363">363: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(syevr,SYEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line364">364: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(syevd,SYEVD) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line365">365: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(sygvd,SYGVD) (PetscBLASInt*,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line366">366: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ormlq,ORMLQ) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line367">367: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orgtr,ORGTR) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line368">368: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(sytrd,SYTRD) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line369">369: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trevc,TREVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
-<a name="line370">370: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line371">371: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
-<a name="line372">372: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line373">373: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
-<a name="line374">374: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line375">375: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line376">376: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line377">377: </a><font color="#A020F0">#else</font>
-<a name="line378">378: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*, PetscBLASInt*,P [...]
-<a name="line379">379: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggev,GGEV) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line380">380: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(heevr,HEEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line381">381: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(heevd,HEEVD) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line382">382: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hegvd,HEGVD) (PetscBLASInt*,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line383">383: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(unmlq,UNMLQ) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line384">384: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ungtr,UNGTR) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line385">385: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hetrd,HETRD) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line386">386: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trevc,TREVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line387">387: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line388">388: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line389">389: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line390">390: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*)</font></strong>;
-<a name="line391">391: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line392">392: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line393">393: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
-<a name="line394">394: </a><font color="#A020F0">#endif</font>
-
-<a name="line396">396: </a><font color="#A020F0">#endif</font>
-
-<a name="line398">398: </a><font color="#A020F0">#endif</font>
+
+<a name="line136">136: </a><font color="#B22222">/* LAPACK functions with string parameters */</font>
+<a name="line137">137: </a><font color="#A020F0">#if !defined(PETSC_BLASLAPACK_STDCALL)</font>
+
+<a name="line139">139: </a><font color="#B22222">/* same name for real and complex */</font>
+<a name="line140">140: </a><strong><font color="#228B22">#define LAPACKlanhs_(a,b,c,d,e) SLEPC_BLASLAPACK(lanhs,LANHS) ((a),(b),(c),(d),(e),1)</font></strong>
+<a name="line141">141: </a><strong><font color="#228B22">#define LAPACKlange_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lange,LANGE) ((a),(b),(c),(d),(e),(f),1)</font></strong>
+<a name="line142">142: </a><strong><font color="#228B22">#define LAPACKggevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac) SLEPC_BLASLAPACK(ggevx,GGEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),(y),(z),(aa),(ab),(ac),1,1,1,1)</font></strong>
+<a name="line143">143: </a><strong><font color="#228B22">#define LAPACKggev_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(ggev,GGEV) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,1)</font></strong>
+<a name="line144">144: </a><strong><font color="#228B22">#define LAPACKpbtrf_(a,b,c,d,e,f) SLEPC_BLASLAPACK(pbtrf,PBTRF) ((a),(b),(c),(d),(e),(f),1)</font></strong>
+<a name="line145">145: </a><strong><font color="#228B22">#define LAPACKlarf_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(larf,LARF) ((a),(b),(c),(d),(e),(f),(g),(h),(i),1)</font></strong>
+<a name="line146">146: </a><strong><font color="#228B22">#define BLAStrmm_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(trmm,TRMM) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),1,1,1,1)</font></strong>
+<a name="line147">147: </a><strong><font color="#228B22">#define LAPACKlacpy_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(lacpy,LACPY) ((a),(b),(c),(d),(e),(f),(g),1)</font></strong>
+<a name="line148">148: </a><strong><font color="#228B22">#define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(lascl,LASCL) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
+<a name="line149">149: </a><strong><font color="#228B22">#define LAPACKlansy_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lansy,LANSY) ((a),(b),(c),(d),(e),(f),1,1)</font></strong>
+<a name="line150">150: </a><strong><font color="#228B22">#define LAPACKlaset_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(laset,LASET) ((a),(b),(c),(d),(e),(f),(g),1)</font></strong>
+<a name="line151">151: </a><strong><font color="#228B22">#define LAPACKtrsyl_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(trsyl,TRSYL) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
+<a name="line152">152: </a><strong><font color="#228B22">#define LAPACKtrtri_(a,b,c,d,e,f) SLEPC_BLASLAPACK(trtri,TRTRI) ((a),(b),(c),(d),(e),(f),1,1)</font></strong>
+<a name="line153">153: </a><font color="#B22222">/* subroutines in which we use only the real version, do not care whether they have different name */</font>
+<a name="line154">154: </a><strong><font color="#228B22">#define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) SLEPC_BLASLAPACKREAL(stevr,STEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),1,1)</font></strong>
+<a name="line155">155: </a><strong><font color="#228B22">#define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)</font></strong>
+<a name="line156">156: </a><strong><font color="#228B22">#define LAPACKlamch_(a) SLEPC_BLASLAPACKREAL(lamch,LAMCH) ((a),1)</font></strong>
+<a name="line157">157: </a><strong><font color="#228B22">#define LAPACKlamc3_(a,b) SLEPC_BLASLAPACKREAL(lamc3,LAMC3) ((a),(b))</font></strong>
+
+<a name="line159">159: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line160">160: </a><font color="#B22222">/* different name or signature, real */</font>
+<a name="line161">161: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) SLEPC_BLASLAPACK(syevr,SYEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),1,1,1)</font></strong>
+<a name="line162">162: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(syevd,SYEVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),1,1)</font></strong>
+<a name="line163">163: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n)  SLEPC_BLASLAPACK(sygvd,SYGVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)</font></strong>
+<a name="line164">164: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(ormlq,ORMLQ) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
+<a name="line165">165: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(orgtr,ORGTR) ((a),(b),(c),(d),(e),(f),(g),(h),1)</font></strong>
+<a name="line166">166: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(sytrd,SYTRD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
+<a name="line167">167: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(trevc,TREVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1,1)</font></strong>
+<a name="line168">168: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,1,1)</font></strong>
+<a name="line169">169: </a><strong><font color="#228B22">#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)</font></strong>
+<a name="line170">170: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(trexc,TREXC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
+<a name="line171">171: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),1)</font></strong>
+<a name="line172">172: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,1)</font></strong>
+<a name="line173">173: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),1,1,1)</font></strong>
+<a name="line174">174: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(stedc,STEDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),1)</font></strong>
+<a name="line175">175: </a><font color="#A020F0">#else</font>
+<a name="line176">176: </a><font color="#B22222">/* different name or signature, complex */</font>
+<a name="line177">177: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(heevr,HEEVR) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,1)</font></strong>
+<a name="line178">178: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(heevd,HEEVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
+<a name="line179">179: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(hegvd,HEGVD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,1)</font></strong>
+<a name="line180">180: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(unmlq,UNMLQ) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1,1)</font></strong>
+<a name="line181">181: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(ungtr,UNGTR) ((a),(b),(c),(d),(e),(f),(g),(h),1)</font></strong>
+<a name="line182">182: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(hetrd,HETRD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),1)</font></strong>
+<a name="line183">183: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(trevc,TREVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)</font></strong>
+<a name="line184">184: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),1,1,1,1)</font></strong>
+<a name="line185">185: </a><strong><font color="#228B22">#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1,1)</font></strong>
+<a name="line186">186: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(trexc,TREXC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),1)</font></strong>
+<a name="line187">187: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),1)</font></strong>
+<a name="line188">188: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,1)</font></strong>
+<a name="line189">189: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),1,1,1)</font></strong>
+<a name="line190">190: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(stedc,STEDC) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),1)</font></strong>
+<a name="line191">191: </a><font color="#A020F0">#endif</font>
+
+<a name="line193">193: </a><font color="#A020F0">#else </font><font color="#B22222">/* PETSC_BLASLAPACK_STDCALL */</font><font color="#A020F0"></font>
+
+<a name="line195">195: </a><font color="#B22222">/* same name for real and complex */</font>
+<a name="line196">196: </a><strong><font color="#228B22">#define LAPACKlanhs_(a,b,c,d,e) SLEPC_BLASLAPACK(lanhs,LANHS) ((a),1,(b),(c),(d),(e))</font></strong>
+<a name="line197">197: </a><strong><font color="#228B22">#define LAPACKlange_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lange,LANGE) ((a),1,(b),(c),(d),(e),(f))</font></strong>
+<a name="line198">198: </a><strong><font color="#228B22">#define LAPACKggevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac) SLEPC_BLASLAPACK(ggevx,GGEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),(y),(z),(aa),(ab),(ac))</font></strong>
+<a name="line199">199: </a><strong><font color="#228B22">#define LAPACKggev_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(ggev,GGEV) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q))</font></strong>
+<a name="line200">200: </a><strong><font color="#228B22">#define LAPACKpbtrf_(a,b,c,d,e,f) SLEPC_BLASLAPACK(pbtrf,PBTRF) ((a),1,(b),(c),(d),(e),(f))</font></strong>
+<a name="line201">201: </a><strong><font color="#228B22">#define LAPACKlarf_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(larf,LARF) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i))</font></strong>
+<a name="line202">202: </a><strong><font color="#228B22">#define BLAStrmm_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(trmm,TRMM) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k))</font></strong>
+<a name="line203">203: </a><strong><font color="#228B22">#define LAPACKlacpy_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(lacpy,LACPY) ((a),1,(b),(c),(d),(e),(f),(g))</font></strong>
+<a name="line204">204: </a><strong><font color="#228B22">#define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(lascl,LASCL) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
+<a name="line205">205: </a><strong><font color="#228B22">#define LAPACKlansy_(a,b,c,d,e,f) SLEPC_BLASLAPACK(lansy,LANSY) ((a),1,(b),1,(c),(d),(e),(f))</font></strong>
+<a name="line206">206: </a><strong><font color="#228B22">#define LAPACKlaset_(a,b,c,d,e,f,g) SLEPC_BLASLAPACK(laset,LASET) ((a),1,(b),(c),(d),(e),(f),(g))</font></strong>
+<a name="line207">207: </a><strong><font color="#228B22">#define LAPACKtrsyl_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(trsyl,TRSYL) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
+<a name="line208">208: </a><strong><font color="#228B22">#define LAPACKtrtri_(a,b,c,d,e,f) SLEPC_BLASLAPACK(trtri,TRTRI) ((a),1,(b),1,(c),(d),(e),(f))</font></strong>
+<a name="line209">209: </a><font color="#B22222">/* subroutines in which we use only the real version, do not care whether they have different name */</font>
+<a name="line210">210: </a><strong><font color="#228B22">#define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) SLEPC_BLASLAPACKREAL(stevr,STEVR) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t))</font></strong>
+<a name="line211">211: </a><strong><font color="#228B22">#define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
+<a name="line212">212: </a><strong><font color="#228B22">#define LAPACKlamch_(a) SLEPC_BLASLAPACKREAL(lamch,LAMCH) ((a),1)</font></strong>
+<a name="line213">213: </a><strong><font color="#228B22">#define LAPACKlamc3_(a,b) SLEPC_BLASLAPACKREAL(lamc3,LAMC3) ((a),(b))</font></strong>
+
+<a name="line215">215: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line216">216: </a><font color="#B22222">/* different name or signature, real */</font>
+<a name="line217">217: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) SLEPC_BLASLAPACK(syevr,SYEVR) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u))</font></strong>
+<a name="line218">218: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(syevd,SYEVD) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k))</font></strong>
+<a name="line219">219: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n)  SLEPC_BLASLAPACK(sygvd,SYGVD) ((a),(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
+<a name="line220">220: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(ormlq,ORMLQ) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
+<a name="line221">221: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(orgtr,ORGTR) ((a),1,(b),(c),(d),(e),(f),(g),(h))</font></strong>
+<a name="line222">222: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(sytrd,SYTRD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
+<a name="line223">223: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(trevc,TREVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
+<a name="line224">224: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w))</font></strong>
+<a name="line225">225: </a><strong><font color="#228B22">#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))</font></strong>
+<a name="line226">226: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(trexc,TREXC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
+<a name="line227">227: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))</font></strong>
+<a name="line228">228: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p))</font></strong>
+<a name="line229">229: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s))</font></strong>
+<a name="line230">230: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k) SLEPC_BLASLAPACK(stedc,STEDC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k))</font></strong>
+<a name="line231">231: </a><font color="#A020F0">#else</font>
+<a name="line232">232: </a><font color="#B22222">/* different name or signature, complex */</font>
+<a name="line233">233: </a><strong><font color="#228B22">#define LAPACKsyevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) SLEPC_BLASLAPACK(heevr,HEEVR) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w))</font></strong>
+<a name="line234">234: </a><strong><font color="#228B22">#define LAPACKsyevd_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(heevd,HEEVD) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
+<a name="line235">235: </a><strong><font color="#228B22">#define LAPACKsygvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_BLASLAPACK(hegvd,HEGVD) ((a),(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p))</font></strong>
+<a name="line236">236: </a><strong><font color="#228B22">#define LAPACKormlq_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(unmlq,UNMLQ) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
+<a name="line237">237: </a><strong><font color="#228B22">#define LAPACKorgtr_(a,b,c,d,e,f,g,h) SLEPC_BLASLAPACK(ungtr,UNGTR) ((a),1,(b),(c),(d),(e),(f),(g),(h))</font></strong>
+<a name="line238">238: </a><strong><font color="#228B22">#define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) SLEPC_BLASLAPACK(hetrd,HETRD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j))</font></strong>
+<a name="line239">239: </a><strong><font color="#228B22">#define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(trevc,TREVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))</font></strong>
+<a name="line240">240: </a><strong><font color="#228B22">#define LAPACKgeevx_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) SLEPC_BLASLAPACK(geevx,GEEVX) ((a),1,(b),1,(c),1,(d),1,(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v))</font></strong>
+<a name="line241">241: </a><strong><font color="#228B22">#define LAPACKgees_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gees,GEES) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))</font></strong>
+<a name="line242">242: </a><strong><font color="#228B22">#define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) SLEPC_BLASLAPACK(trexc,TREXC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i))</font></strong>
+<a name="line243">243: </a><strong><font color="#228B22">#define LAPACKgesdd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) SLEPC_BLASLAPACK(gesdd,GESDD) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o))</font></strong>
+<a name="line244">244: </a><strong><font color="#228B22">#define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_BLASLAPACK(tgevc,TGEVC) ((a),1,(b),1,(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q))</font></strong>
+<a name="line245">245: </a><strong><font color="#228B22">#define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) SLEPC_BLASLAPACK(hsein,HSEIN) ((a),1,(b),1,(c),1,(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s))</font></strong>
+<a name="line246">246: </a><strong><font color="#228B22">#define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k,l,m) SLEPC_BLASLAPACK(stedc,STEDC) ((a),1,(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))</font></strong>
+<a name="line247">247: </a><font color="#A020F0">#endif</font>
+
+<a name="line249">249: </a><font color="#A020F0">#endif</font>
+
+<a name="line251">251: </a><font color="#A020F0">#if !defined(PETSC_BLASLAPACK_STDCALL)</font>
+
+<a name="line253">253: </a><font color="#B22222">/* LAPACK functions without string parameters */</font>
+<a name="line254">254: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(laev2,LAEV2) (PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*)</font></strong>;
+<a name="line255">255: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gehrd,GEHRD) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line256">256: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gelqf,GELQF) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line257">257: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(larfg,LARFG) (PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*)</font></strong>;
+<a name="line258">258: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lag2,LAG2) (PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line259">259: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lasv2,LASV2) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line260">260: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lartg,LARTG) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line261">261: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(laln2,LALN2) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line262">262: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(laed4,LAED4) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line263">263: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(lamrg,LAMRG) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line264">264: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lapy2,LAPY2) (PetscReal*,PetscReal*)</font></strong>;
+<a name="line265">265: </a><strong><font color="#4169E1">PETSC_EXTERN void      BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line266">266: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line267">267: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line268">268: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(orghr,ORGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line269">269: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line270">270: </a><font color="#A020F0">#else</font>
+<a name="line271">271: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line272">272: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(unghr,UNGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line273">273: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line274">274: </a><font color="#A020F0">#endif</font>
+
+<a name="line276">276: </a><font color="#B22222">/* LAPACK functions with string parameters */</font>
+<a name="line277">277: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lanhs,LANHS) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt)</font></strong>;
+<a name="line278">278: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lange,LANGE) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt)</font></strong>;
+<a name="line279">279: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(pbtrf,PBTRF) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line280">280: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(larf,LARF) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt)</font></strong>;
+<a name="line281">281: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trmm,TRMM) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line282">282: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(lacpy,LACPY) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line283">283: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACK(lansy,LANSY) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line284">284: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(laset,LASET) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line285">285: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trsyl,TRSYL) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line286">286: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trtri,TRTRI) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+
+<a name="line288">288: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(stevr,STEVR) (const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line289">289: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) (const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line290">290: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamch,LAMCH) (const char*,PetscBLASInt)</font></strong>;
+<a name="line291">291: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamc3,LAMC3) (PetscReal*,PetscReal*)</font></strong>;
+
+<a name="line293">293: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASIn [...]
+<a name="line295">295: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggev,GGEV) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line296">296: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(syevr,SYEVR) (const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line297">297: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(syevd,SYEVD) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line298">298: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(sygvd,SYGVD) (PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line299">299: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ormlq,ORMLQ) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line300">300: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(orgtr,ORGTR) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line301">301: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(sytrd,SYTRD) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line302">302: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trevc,TREVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line303">303: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line304">304: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gees,GEES) (const char*,const char*,PetscBLASInt(*)(PetscReal,PetscReal),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line305">305: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line306">306: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line307">307: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line308">308: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line309">309: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line310">310: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line311">311: </a><font color="#A020F0">#else</font>
+<a name="line312">312: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*, PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLAS [...]
+<a name="line313">313: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ggev,GGEV) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line314">314: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(heevr,HEEVR) (const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line315">315: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(heevd,HEEVD) (const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line316">316: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hegvd,HEGVD) (PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line317">317: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(unmlq,UNMLQ) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line318">318: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(ungtr,UNGTR) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line319">319: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hetrd,HETRD) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line320">320: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trevc,TREVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line321">321: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line322">322: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gees,GEES) (const char*,const char*,PetscBLASInt(*)(PetscScalar),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line323">323: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line324">324: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line325">325: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line326">326: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt)</font></strong>;
+<a name="line327">327: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line328">328: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt)</font></strong>;
+<a name="line329">329: </a><font color="#A020F0">#endif</font>
+
+<a name="line331">331: </a><font color="#A020F0">#else </font><font color="#B22222">/* PETSC_BLASLAPACK_STDCALL */</font><font color="#A020F0"></font>
+
+<a name="line333">333: </a><font color="#B22222">/* LAPACK functions without string parameters */</font>
+<a name="line334">334: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(laev2,LAEV2) (PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*)</font></strong>;
+<a name="line335">335: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gehrd,GEHRD) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line336">336: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gelqf,GELQF) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line337">337: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(larfg,LARFG) (PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*)</font></strong>;
+<a name="line338">338: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lag2,LAG2) (PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line339">339: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lasv2,LASV2) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line340">340: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lartg,LARTG) (PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line341">341: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(laln2,LALN2) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line342">342: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(laed4,LAED4) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line343">343: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(lamrg,LAMRG) (PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line344">344: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACKREAL(lapy2,LAPY2) (PetscReal*,PetscReal*)</font></strong>;
+<a name="line345">345: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line346">346: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line347">347: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line348">348: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orghr,ORGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line349">349: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line350">350: </a><font color="#A020F0">#else</font>
+<a name="line351">351: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgexc,TGEXC) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line352">352: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(unghr,UNGHR) (PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line353">353: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geqp3,GEQP3) (PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line354">354: </a><font color="#A020F0">#endif</font>
+
+<a name="line356">356: </a><font color="#B22222">/* LAPACK functions with string parameters */</font>
+<a name="line357">357: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lanhs,LANHS) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*)</font></strong>;
+<a name="line358">358: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lange,LANGE) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*)</font></strong>;
+<a name="line359">359: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(pbtrf,PBTRF) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line360">360: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(larf,LARF) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*)</font></strong>;
+<a name="line361">361: </a><strong><font color="#4169E1">PETSC_EXTERN void      SLEPC_BLASLAPACK(trmm,TRMM) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
+<a name="line362">362: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lacpy,LACPY) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
+<a name="line363">363: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal PETSC_STDCALL SLEPC_BLASLAPACK(lansy,LANSY) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*)</font></strong>;
+<a name="line364">364: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(laset,LASET) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*)</font></strong>;
+<a name="line365">365: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trsyl,TRSYL) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line366">366: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trtri,TRTRI) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+
+<a name="line368">368: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(stevr,STEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line369">369: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACKREAL(bdsdc,BDSDC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line370">370: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamch,LAMCH) (const char*,PetscBLASInt)</font></strong>;
+<a name="line371">371: </a><strong><font color="#4169E1">PETSC_EXTERN PetscReal SLEPC_BLASLAPACKREAL(lamc3,LAMC3) (PetscReal*,PetscReal*)</font></strong>;
+
+<a name="line373">373: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line374">374: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,Petsc [...]
+<a name="line375">375: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggev,GGEV) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line376">376: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(syevr,SYEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line377">377: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(syevd,SYEVD) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line378">378: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(sygvd,SYGVD) (PetscBLASInt*,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line379">379: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ormlq,ORMLQ) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line380">380: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(orgtr,ORGTR) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line381">381: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(sytrd,SYTRD) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line382">382: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trevc,TREVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
+<a name="line383">383: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line384">384: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gees,GEES) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt(*)(PetscReal,PetscReal),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line385">385: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
+<a name="line386">386: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line387">387: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*)</font></strong>;
+<a name="line388">388: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line389">389: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line390">390: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line391">391: </a><font color="#A020F0">#else</font>
+<a name="line392">392: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggevx,GGEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*, PetscBLASInt*,P [...]
+<a name="line393">393: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ggev,GGEV) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line394">394: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(heevr,HEEVR) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line395">395: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(heevd,HEEVD) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line396">396: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hegvd,HEGVD) (PetscBLASInt*,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line397">397: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(unmlq,UNMLQ) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line398">398: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(ungtr,UNGTR) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line399">399: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hetrd,HETRD) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line400">400: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trevc,TREVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line401">401: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(geevx,GEEVX) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line402">402: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gees,GEES) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt(*)(PetscScalar),PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line403">403: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(trexc,TREXC) (const char*,PetscBLASInt,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line404">404: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(gesdd,GESDD) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line405">405: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(tgevc,TGEVC) (const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*)</font></strong>;
+<a name="line406">406: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(hsein,HSEIN) (const char*,PetscBLASInt,const char*,PetscBLASInt,const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line407">407: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(stedc,STEDC) (const char*,PetscBLASInt,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line408">408: </a><strong><font color="#4169E1">PETSC_EXTERN void PETSC_STDCALL SLEPC_BLASLAPACK(lascl,LASCL) (const char*,PetscBLASInt,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*)</font></strong>;
+<a name="line409">409: </a><font color="#A020F0">#endif</font>
+
+<a name="line411">411: </a><font color="#A020F0">#endif</font>
+
+<a name="line413">413: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepcbv.h b/include/slepcbv.h
index 2e908b1..0d781d2 100644
--- a/include/slepcbv.h
+++ b/include/slepcbv.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -62,6 +62,7 @@ PETSC_EXTERN PetscClassId BV_CLASSID;
 E*/
 typedef enum { BV_ORTHOG_CGS,
                BV_ORTHOG_MGS } BVOrthogType;
+PETSC_EXTERN const char *BVOrthogTypes[];
 
 /*E
     BVOrthogRefineType - Determines what type of refinement to use
@@ -74,6 +75,7 @@ E*/
 typedef enum { BV_ORTHOG_REFINE_IFNEEDED,
                BV_ORTHOG_REFINE_NEVER,
                BV_ORTHOG_REFINE_ALWAYS } BVOrthogRefineType;
+PETSC_EXTERN const char *BVOrthogRefineTypes[];
 
 /*E
     BVOrthogBlockType - Determines the method used in block
@@ -85,6 +87,7 @@ typedef enum { BV_ORTHOG_REFINE_IFNEEDED,
 E*/
 typedef enum { BV_ORTHOG_BLOCK_GS,
                BV_ORTHOG_BLOCK_CHOL } BVOrthogBlockType;
+PETSC_EXTERN const char *BVOrthogBlockTypes[];
 
 /*E
     BVMatMultType - Determines how to perform the BVMatMult() operation:
@@ -100,6 +103,7 @@ E*/
 typedef enum { BV_MATMULT_VECS,
                BV_MATMULT_MAT,
                BV_MATMULT_MAT_SAVE } BVMatMultType;
+PETSC_EXTERN const char *BVMatMultTypes[];
 
 PETSC_EXTERN PetscErrorCode BVCreate(MPI_Comm,BV*);
 PETSC_EXTERN PetscErrorCode BVDestroy(BV*);
@@ -116,6 +120,8 @@ PETSC_EXTERN PetscErrorCode BVGetColumn(BV,PetscInt,Vec*);
 PETSC_EXTERN PetscErrorCode BVRestoreColumn(BV,PetscInt,Vec*);
 PETSC_EXTERN PetscErrorCode BVGetArray(BV,PetscScalar**);
 PETSC_EXTERN PetscErrorCode BVRestoreArray(BV,PetscScalar**);
+PETSC_EXTERN PetscErrorCode BVGetArrayRead(BV,const PetscScalar**);
+PETSC_EXTERN PetscErrorCode BVRestoreArrayRead(BV,const PetscScalar**);
 PETSC_EXTERN PetscErrorCode BVCreateVec(BV,Vec*);
 PETSC_EXTERN PetscErrorCode BVSetActiveColumns(BV,PetscInt,PetscInt);
 PETSC_EXTERN PetscErrorCode BVGetActiveColumns(BV,PetscInt*,PetscInt*);
@@ -146,7 +152,6 @@ PETSC_EXTERN PetscErrorCode BVMatMult(BV,Mat,BV);
 PETSC_EXTERN PetscErrorCode BVMatMultHermitianTranspose(BV,Mat,BV);
 PETSC_EXTERN PetscErrorCode BVMatMultColumn(BV,Mat,PetscInt);
 PETSC_EXTERN PetscErrorCode BVMatProject(BV,Mat,BV,Mat);
-PETSC_EXTERN PetscErrorCode BVAXPY(BV,PetscScalar,BV);
 PETSC_EXTERN PetscErrorCode BVDot(BV,BV,Mat);
 PETSC_EXTERN PetscErrorCode BVDotVec(BV,Vec,PetscScalar*);
 PETSC_EXTERN PetscErrorCode BVDotVecBegin(BV,Vec,PetscScalar*);
@@ -163,8 +168,10 @@ PETSC_EXTERN PetscErrorCode BVNormVecEnd(BV,Vec,NormType,PetscReal*);
 PETSC_EXTERN PetscErrorCode BVNormColumn(BV,PetscInt,NormType,PetscReal*);
 PETSC_EXTERN PetscErrorCode BVNormColumnBegin(BV,PetscInt,NormType,PetscReal*);
 PETSC_EXTERN PetscErrorCode BVNormColumnEnd(BV,PetscInt,NormType,PetscReal*);
-PETSC_EXTERN PetscErrorCode BVSetRandom(BV,PetscRandom);
-PETSC_EXTERN PetscErrorCode BVSetRandomColumn(BV,PetscInt,PetscRandom);
+PETSC_EXTERN PetscErrorCode BVSetRandom(BV);
+PETSC_EXTERN PetscErrorCode BVSetRandomColumn(BV,PetscInt);
+PETSC_EXTERN PetscErrorCode BVSetRandomContext(BV,PetscRandom);
+PETSC_EXTERN PetscErrorCode BVGetRandomContext(BV,PetscRandom*);
 
 PETSC_EXTERN PetscErrorCode BVSetOrthogonalization(BV,BVOrthogType,BVOrthogRefineType,PetscReal,BVOrthogBlockType);
 PETSC_EXTERN PetscErrorCode BVGetOrthogonalization(BV,BVOrthogType*,BVOrthogRefineType*,PetscReal*,BVOrthogBlockType*);
diff --git a/include/slepcbv.h.html b/include/slepcbv.h.html
index 04d742b..216f547 100644
--- a/include/slepcbv.h.html
+++ b/include/slepcbv.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcbv.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:36+00:00">
+<meta name="date" content="2016-05-16T10:34:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcbv.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcbv.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -72,127 +72,134 @@
 <a name="line62"> 62: </a><font color="#B22222">E*/</font>
 <a name="line63"> 63: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_ORTHOG_CGS,
 <a name="line64"> 64: </a>               BV_ORTHOG_MGS } <a href="../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>;
-
-<a name="line66"> 66: </a><font color="#B22222">/*E</font>
-<a name="line67"> 67: </a><font color="#B22222">    <a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> - Determines what type of refinement to use</font>
-<a name="line68"> 68: </a><font color="#B22222">    during orthogonalization of vectors</font>
-
-<a name="line70"> 70: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line72"> 72: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>()</font>
-<a name="line73"> 73: </a><font color="#B22222">E*/</font>
-<a name="line74"> 74: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_ORTHOG_REFINE_IFNEEDED,
-<a name="line75"> 75: </a>               BV_ORTHOG_REFINE_NEVER,
-<a name="line76"> 76: </a>               BV_ORTHOG_REFINE_ALWAYS } <a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>;
-
-<a name="line78"> 78: </a><font color="#B22222">/*E</font>
-<a name="line79"> 79: </a><font color="#B22222">    <a href="../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a> - Determines the method used in block</font>
-<a name="line80"> 80: </a><font color="#B22222">    orthogonalization (simultaneous orthogonalization of a set of vectors)</font>
-
-<a name="line82"> 82: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line84"> 84: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>()</font>
-<a name="line85"> 85: </a><font color="#B22222">E*/</font>
-<a name="line86"> 86: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_ORTHOG_BLOCK_GS,
-<a name="line87"> 87: </a>               BV_ORTHOG_BLOCK_CHOL } <a href="../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>;
-
-<a name="line89"> 89: </a><font color="#B22222">/*E</font>
-<a name="line90"> 90: </a><font color="#B22222">    <a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a> - Determines how to perform the <a href="../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation:</font>
-<a name="line91"> 91: </a><font color="#B22222">       BV_MATMULT_VECS: perform a matrix-vector multiply per each column;</font>
-<a name="line92"> 92: </a><font color="#B22222">       BV_MATMULT_MAT: carry out a MatMatMult() product with a dense matrix (default);</font>
-<a name="line93"> 93: </a><font color="#B22222">       BV_MATMULT_MAT_SAVE: call MatMatMult() and keep auxiliary matrices</font>
-<a name="line94"> 94: </a><font color="#B22222">         (more efficient but needs more memory)</font>
-
-<a name="line96"> 96: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line98"> 98: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>()</font>
-<a name="line99"> 99: </a><font color="#B22222">E*/</font>
-<a name="line100">100: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_MATMULT_VECS,
-<a name="line101">101: </a>               BV_MATMULT_MAT,
-<a name="line102">102: </a>               BV_MATMULT_MAT_SAVE } <a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>;
-
-<a name="line104">104: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(MPI_Comm,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line105">105: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line106">106: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVType.html#BVType">BVType</a>)</font></strong>;
-<a name="line107">107: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVType.html#BVType">BVType</a>*)</font></strong>;
-<a name="line108">108: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetSizes.html#BVSetSizes">BVSetSizes</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line109">109: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscInt)</font></strong>;
-<a name="line110">110: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line111">111: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscBool)</font></strong>;
-<a name="line112">112: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line113">113: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVView.html#BVView">BVView</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscViewer)</font></strong>;
-
-<a name="line115">115: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*)</font></strong>;
-<a name="line116">116: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*)</font></strong>;
-<a name="line117">117: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**)</font></strong>;
-<a name="line118">118: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**)</font></strong>;
-<a name="line119">119: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec*)</font></strong>;
-<a name="line120">120: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
-<a name="line121">121: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*,PetscInt*)</font></strong>;
-<a name="line122">122: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec)</font></strong>;
-<a name="line123">123: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt*,Vec*,PetscBool)</font></strong>;
-<a name="line124">124: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*,Vec*)</font></strong>;
-<a name="line125">125: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt)</font></strong>;
-<a name="line126">126: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*)</font></strong>;
-<a name="line127">127: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line128">128: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line129">129: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line130">130: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec)</font></strong>;
-<a name="line131">131: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
-<a name="line132">132: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscBool)</font></strong>;
-<a name="line133">133: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetMatrix.html#BVGetMatrix">BVGetMatrix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat*,PetscBool*)</font></strong>;
-<a name="line134">134: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,Vec)</font></strong>;
-<a name="line135">135: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line136">136: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetCachedBV.html#BVGetCachedBV">BVGetCachedBV</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line137">137: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetSignature.html#BVSetSignature">BVSetSignature</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec)</font></strong>;
-<a name="line138">138: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetSignature.html#BVGetSignature">BVGetSignature</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec)</font></strong>;
-
-<a name="line140">140: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
-<a name="line141">141: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,Vec,PetscScalar*)</font></strong>;
-<a name="line142">142: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,PetscInt,PetscScalar*)</font></strong>;
-<a name="line143">143: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt)</font></strong>;
-<a name="line144">144: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt)</font></strong>;
-<a name="line145">145: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line146">146: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line147">147: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt)</font></strong>;
-<a name="line148">148: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
-<a name="line149">149: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line150">150: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
-<a name="line151">151: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*)</font></strong>;
-<a name="line152">152: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*)</font></strong>;
-<a name="line153">153: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*)</font></strong>;
-<a name="line154">154: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*)</font></strong>;
-<a name="line155">155: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*)</font></strong>;
-<a name="line156">156: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*)</font></strong>;
-<a name="line157">157: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar)</font></strong>;
-<a name="line158">158: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar)</font></strong>;
-<a name="line159">159: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,NormType,PetscReal*)</font></strong>;
-<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,NormType,PetscReal*)</font></strong>;
-<a name="line161">161: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,NormType,PetscReal*)</font></strong>;
-<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,NormType,PetscReal*)</font></strong>;
-<a name="line163">163: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*)</font></strong>;
-<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*)</font></strong>;
-<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*)</font></strong>;
-<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscRandom)</font></strong>;
-<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscRandom)</font></strong>;
-
-<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>,<a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>,PetscReal,<a href="../docs/manualpages/BV/BVOrthogBlockType.html# [...]
-<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>*,<a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>*,PetscReal*,<a href="../docs/manualpages/BV/BVOrthogBlockType.ht [...]
-<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
-<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*,PetscReal*,PetscBool*)</font></strong>;
-<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*,PetscReal*,PetscBool*)</font></strong>;
-<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscBool*,PetscScalar*,PetscReal*,PetscBool*)</font></strong>;
-<a name="line175">175: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>)</font></strong>;
-<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>*)</font></strong>;
-
-<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const char*)</font></strong>;
-<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const char*)</font></strong>;
-<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const char*[])</font></strong>;
-
-<a name="line182">182: </a>PETSC_EXTERN PetscFunctionList BVList;
-<a name="line183">183: </a><strong><font color="#4169E1"><a name="BVRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>);
-
-<a name="line185">185: </a><font color="#A020F0">#endif</font>
+<a name="line65"> 65: </a>PETSC_EXTERN const char *BVOrthogTypes[];
+
+<a name="line67"> 67: </a><font color="#B22222">/*E</font>
+<a name="line68"> 68: </a><font color="#B22222">    <a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> - Determines what type of refinement to use</font>
+<a name="line69"> 69: </a><font color="#B22222">    during orthogonalization of vectors</font>
+
+<a name="line71"> 71: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line73"> 73: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>()</font>
+<a name="line74"> 74: </a><font color="#B22222">E*/</font>
+<a name="line75"> 75: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_ORTHOG_REFINE_IFNEEDED,
+<a name="line76"> 76: </a>               BV_ORTHOG_REFINE_NEVER,
+<a name="line77"> 77: </a>               BV_ORTHOG_REFINE_ALWAYS } <a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>;
+<a name="line78"> 78: </a>PETSC_EXTERN const char *BVOrthogRefineTypes[];
+
+<a name="line80"> 80: </a><font color="#B22222">/*E</font>
+<a name="line81"> 81: </a><font color="#B22222">    <a href="../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a> - Determines the method used in block</font>
+<a name="line82"> 82: </a><font color="#B22222">    orthogonalization (simultaneous orthogonalization of a set of vectors)</font>
+
+<a name="line84"> 84: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line86"> 86: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(), <a href="../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>()</font>
+<a name="line87"> 87: </a><font color="#B22222">E*/</font>
+<a name="line88"> 88: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_ORTHOG_BLOCK_GS,
+<a name="line89"> 89: </a>               BV_ORTHOG_BLOCK_CHOL } <a href="../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>;
+<a name="line90"> 90: </a>PETSC_EXTERN const char *BVOrthogBlockTypes[];
+
+<a name="line92"> 92: </a><font color="#B22222">/*E</font>
+<a name="line93"> 93: </a><font color="#B22222">    <a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a> - Determines how to perform the <a href="../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation:</font>
+<a name="line94"> 94: </a><font color="#B22222">       BV_MATMULT_VECS: perform a matrix-vector multiply per each column;</font>
+<a name="line95"> 95: </a><font color="#B22222">       BV_MATMULT_MAT: carry out a MatMatMult() product with a dense matrix (default);</font>
+<a name="line96"> 96: </a><font color="#B22222">       BV_MATMULT_MAT_SAVE: call MatMatMult() and keep auxiliary matrices</font>
+<a name="line97"> 97: </a><font color="#B22222">         (more efficient but needs more memory)</font>
+
+<a name="line99"> 99: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line101">101: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>()</font>
+<a name="line102">102: </a><font color="#B22222">E*/</font>
+<a name="line103">103: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { BV_MATMULT_VECS,
+<a name="line104">104: </a>               BV_MATMULT_MAT,
+<a name="line105">105: </a>               BV_MATMULT_MAT_SAVE } <a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>;
+<a name="line106">106: </a>PETSC_EXTERN const char *BVMatMultTypes[];
+
+<a name="line108">108: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(MPI_Comm,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line109">109: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line110">110: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVType.html#BVType">BVType</a>)</font></strong>;
+<a name="line111">111: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVType.html#BVType">BVType</a>*)</font></strong>;
+<a name="line112">112: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetSizes.html#BVSetSizes">BVSetSizes</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
+<a name="line113">113: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscInt)</font></strong>;
+<a name="line114">114: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
+<a name="line115">115: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscBool)</font></strong>;
+<a name="line116">116: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line117">117: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVView.html#BVView">BVView</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscViewer)</font></strong>;
+
+<a name="line119">119: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*)</font></strong>;
+<a name="line120">120: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec*)</font></strong>;
+<a name="line121">121: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**)</font></strong>;
+<a name="line122">122: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar**)</font></strong>;
+<a name="line123">123: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const PetscScalar**)</font></strong>;
+<a name="line124">124: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const PetscScalar**)</font></strong>;
+<a name="line125">125: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec*)</font></strong>;
+<a name="line126">126: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line127">127: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line128">128: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec)</font></strong>;
+<a name="line129">129: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt*,Vec*,PetscBool)</font></strong>;
+<a name="line130">130: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*,Vec*)</font></strong>;
+<a name="line131">131: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt)</font></strong>;
+<a name="line132">132: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt*)</font></strong>;
+<a name="line133">133: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line134">134: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line135">135: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line136">136: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,Vec)</font></strong>;
+<a name="line137">137: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line138">138: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscBool)</font></strong>;
+<a name="line139">139: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetMatrix.html#BVGetMatrix">BVGetMatrix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat*,PetscBool*)</font></strong>;
+<a name="line140">140: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,Vec)</font></strong>;
+<a name="line141">141: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVApplyMatrixBV.html#BVApplyMatrixBV">BVApplyMatrixBV</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line142">142: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetCachedBV.html#BVGetCachedBV">BVGetCachedBV</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line143">143: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetSignature.html#BVSetSignature">BVSetSignature</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec)</font></strong>;
+<a name="line144">144: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetSignature.html#BVGetSignature">BVGetSignature</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec)</font></strong>;
+
+<a name="line146">146: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
+<a name="line147">147: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,Vec,PetscScalar*)</font></strong>;
+<a name="line148">148: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar,PetscScalar,PetscInt,PetscScalar*)</font></strong>;
+<a name="line149">149: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt)</font></strong>;
+<a name="line150">150: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt)</font></strong>;
+<a name="line151">151: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line152">152: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line153">153: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt)</font></strong>;
+<a name="line154">154: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
+<a name="line155">155: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
+<a name="line156">156: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*)</font></strong>;
+<a name="line157">157: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*)</font></strong>;
+<a name="line158">158: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*)</font></strong>;
+<a name="line159">159: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*)</font></strong>;
+<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*)</font></strong>;
+<a name="line161">161: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*)</font></strong>;
+<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscScalar)</font></strong>;
+<a name="line163">163: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar)</font></strong>;
+<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,NormType,PetscReal*)</font></strong>;
+<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,NormType,PetscReal*)</font></strong>;
+<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,NormType,PetscReal*)</font></strong>;
+<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,NormType,PetscReal*)</font></strong>;
+<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*)</font></strong>;
+<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*)</font></strong>;
+<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,NormType,PetscReal*)</font></strong>;
+<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt)</font></strong>;
+<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscRandom)</font></strong>;
+<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscRandom*)</font></strong>;
+
+<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>,<a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>,PetscReal,<a href="../docs/manualpages/BV/BVOrthogBlockType.html# [...]
+<a name="line177">177: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>*,<a href="../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>*,PetscReal*,<a href="../docs/manualpages/BV/BVOrthogBlockType.ht [...]
+<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Mat)</font></strong>;
+<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,Vec,PetscScalar*,PetscReal*,PetscBool*)</font></strong>;
+<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscScalar*,PetscReal*,PetscBool*)</font></strong>;
+<a name="line181">181: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscBool*,PetscScalar*,PetscReal*,PetscBool*)</font></strong>;
+<a name="line182">182: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>)</font></strong>;
+<a name="line183">183: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>*)</font></strong>;
+
+<a name="line185">185: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const char*)</font></strong>;
+<a name="line186">186: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const char*)</font></strong>;
+<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,const char*[])</font></strong>;
+
+<a name="line189">189: </a>PETSC_EXTERN PetscFunctionList BVList;
+<a name="line190">190: </a><strong><font color="#4169E1"><a name="BVRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>);
+
+<a name="line192">192: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepcds.h b/include/slepcds.h
index 8abb4ae..c2dbda8 100644
--- a/include/slepcds.h
+++ b/include/slepcds.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -176,6 +176,8 @@ PETSC_EXTERN PetscErrorCode DSCond(DS,PetscReal*);
 PETSC_EXTERN PetscErrorCode DSTranslateHarmonic(DS,PetscScalar,PetscReal,PetscBool,PetscScalar*,PetscReal*);
 PETSC_EXTERN PetscErrorCode DSTranslateRKS(DS,PetscScalar);
 PETSC_EXTERN PetscErrorCode DSNormalize(DS,DSMatType,PetscInt);
+PETSC_EXTERN PetscErrorCode DSOrthogonalize(DS,DSMatType,PetscInt,PetscInt*);
+PETSC_EXTERN PetscErrorCode DSPseudoOrthogonalize(DS,DSMatType,PetscInt,PetscReal*,PetscInt*,PetscReal*);
 
 /* --------- options specific to particular solvers -------- */
 
diff --git a/include/slepcds.h.html b/include/slepcds.h.html
index 82145c8..adde8a1 100644
--- a/include/slepcds.h.html
+++ b/include/slepcds.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcds.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:35+00:00">
+<meta name="date" content="2016-05-16T10:34:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcds.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcds.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -186,20 +186,22 @@
 <a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSTranslateHarmonic.html#DSTranslateHarmonic">DSTranslateHarmonic</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar,PetscReal,PetscBool,PetscScalar*,PetscReal*)</font></strong>;
 <a name="line177">177: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSTranslateRKS.html#DSTranslateRKS">DSTranslateRKS</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscScalar)</font></strong>;
 <a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNormalize.html#DSNormalize">DSNormalize</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt)</font></strong>;
+<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt,PetscInt*)</font></strong>;
+<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,<a href="../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a>,PetscInt,PetscReal*,PetscInt*,PetscReal*)</font></strong>;
 
-<a name="line180">180: </a><font color="#B22222">/* --------- options specific to particular solvers -------- */</font>
+<a name="line182">182: </a><font color="#B22222">/* --------- options specific to particular solvers -------- */</font>
 
-<a name="line182">182: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt)</font></strong>;
-<a name="line183">183: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*)</font></strong>;
+<a name="line184">184: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt)</font></strong>;
+<a name="line185">185: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*)</font></strong>;
 
-<a name="line185">185: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
-<a name="line186">186: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNEPGetFN.html#DSNEPGetFN">DSNEPGetFN</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
-<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNEPGetNumFN.html#DSNEPGetNumFN">DSNEPGetNumFN</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*)</font></strong>;
+<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNEPGetFN.html#DSNEPGetFN">DSNEPGetFN</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line189">189: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSNEPGetNumFN.html#DSNEPGetNumFN">DSNEPGetNumFN</a>(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*)</font></strong>;
 
-<a name="line189">189: </a>PETSC_EXTERN PetscFunctionList DSList;
-<a name="line190">190: </a><strong><font color="#4169E1"><a name="DSRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>);
+<a name="line191">191: </a>PETSC_EXTERN PetscFunctionList DSList;
+<a name="line192">192: </a><strong><font color="#4169E1"><a name="DSRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>);
 
-<a name="line192">192: </a><font color="#A020F0">#endif</font>
+<a name="line194">194: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepceps.h b/include/slepceps.h
index c4c4c62..b0ac6e1 100644
--- a/include/slepceps.h
+++ b/include/slepceps.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -151,10 +151,38 @@ PETSC_EXTERN const char *EPSErrorTypes[];
 .seealso: EPSSetConvergenceTest(), EPSSetConvergenceTestFunction()
 E*/
 typedef enum { EPS_CONV_ABS,
-               EPS_CONV_EIG,
+               EPS_CONV_REL,
                EPS_CONV_NORM,
                EPS_CONV_USER } EPSConv;
 
+/*E
+    EPSStop - Determines the stopping test
+
+    Level: advanced
+
+.seealso: EPSSetStoppingTest(), EPSSetStoppingTestFunction()
+E*/
+typedef enum { EPS_STOP_BASIC,
+               EPS_STOP_USER } EPSStop;
+
+/*E
+    EPSConvergedReason - Reason an eigensolver was said to
+         have converged or diverged
+
+    Level: intermediate
+
+.seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
+E*/
+typedef enum {/* converged */
+              EPS_CONVERGED_TOL                =  1,
+              EPS_CONVERGED_USER               =  2,
+              /* diverged */
+              EPS_DIVERGED_ITS                 = -1,
+              EPS_DIVERGED_BREAKDOWN           = -2,
+              EPS_DIVERGED_SYMMETRY_LOST       = -3,
+              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;
+PETSC_EXTERN const char *const*EPSConvergedReasons;
+
 PETSC_EXTERN PetscErrorCode EPSCreate(MPI_Comm,EPS*);
 PETSC_EXTERN PetscErrorCode EPSDestroy(EPS*);
 PETSC_EXTERN PetscErrorCode EPSReset(EPS);
@@ -200,9 +228,15 @@ PETSC_EXTERN PetscErrorCode EPSGetTolerances(EPS,PetscReal*,PetscInt*);
 PETSC_EXTERN PetscErrorCode EPSSetConvergenceTestFunction(EPS,PetscErrorCode (*)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*));
 PETSC_EXTERN PetscErrorCode EPSSetConvergenceTest(EPS,EPSConv);
 PETSC_EXTERN PetscErrorCode EPSGetConvergenceTest(EPS,EPSConv*);
-PETSC_EXTERN PetscErrorCode EPSConvergedEigRelative(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
 PETSC_EXTERN PetscErrorCode EPSConvergedAbsolute(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
-PETSC_EXTERN PetscErrorCode EPSConvergedNormRelative(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode EPSConvergedRelative(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode EPSConvergedNorm(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode EPSSetStoppingTestFunction(EPS,PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*),void*,PetscErrorCode (*)(void*));
+PETSC_EXTERN PetscErrorCode EPSSetStoppingTest(EPS,EPSStop);
+PETSC_EXTERN PetscErrorCode EPSGetStoppingTest(EPS,EPSStop*);
+PETSC_EXTERN PetscErrorCode EPSStoppingBasic(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);
+PETSC_EXTERN PetscErrorCode EPSGetConvergedReason(EPS,EPSConvergedReason*);
+
 PETSC_EXTERN PetscErrorCode EPSSetDimensions(EPS,PetscInt,PetscInt,PetscInt);
 PETSC_EXTERN PetscErrorCode EPSGetDimensions(EPS,PetscInt*,PetscInt*,PetscInt*);
 
@@ -219,6 +253,8 @@ PETSC_EXTERN PetscErrorCode EPSGetErrorEstimate(EPS,PetscInt,PetscReal*);
 
 PETSC_EXTERN PetscErrorCode EPSMonitor(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt);
 PETSC_EXTERN PetscErrorCode EPSMonitorSet(EPS,PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
+PETSC_EXTERN PetscErrorCode EPSMonitorSetFromOptions(EPS,const char*,const char*,const char*,PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool);
+PETSC_EXTERN PetscErrorCode EPSConvMonitorSetFromOptions(EPS,const char*,const char*,const char*,PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor));
 PETSC_EXTERN PetscErrorCode EPSMonitorCancel(EPS);
 PETSC_EXTERN PetscErrorCode EPSGetMonitorContext(EPS,void**);
 PETSC_EXTERN PetscErrorCode EPSGetIterationNumber(EPS,PetscInt*);
@@ -235,9 +271,10 @@ PETSC_EXTERN PetscErrorCode EPSIsGeneralized(EPS,PetscBool*);
 PETSC_EXTERN PetscErrorCode EPSIsHermitian(EPS,PetscBool*);
 PETSC_EXTERN PetscErrorCode EPSIsPositive(EPS,PetscBool*);
 
-PETSC_EXTERN PetscErrorCode EPSMonitorFirst(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode EPSMonitorAll(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode EPSMonitorConverged(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
+PETSC_EXTERN PetscErrorCode EPSMonitorFirst(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode EPSMonitorAll(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode EPSMonitorConverged(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor);
+PETSC_EXTERN PetscErrorCode EPSMonitorLGCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*);
 PETSC_EXTERN PetscErrorCode EPSMonitorLG(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
 PETSC_EXTERN PetscErrorCode EPSMonitorLGAll(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
 
@@ -251,25 +288,6 @@ PETSC_EXTERN PetscErrorCode EPSSetOptionsPrefix(EPS,const char*);
 PETSC_EXTERN PetscErrorCode EPSAppendOptionsPrefix(EPS,const char*);
 PETSC_EXTERN PetscErrorCode EPSGetOptionsPrefix(EPS,const char*[]);
 
-/*E
-    EPSConvergedReason - Reason an eigensolver was said to
-         have converged or diverged
-
-    Level: intermediate
-
-.seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
-E*/
-typedef enum {/* converged */
-              EPS_CONVERGED_TOL                =  2,
-              /* diverged */
-              EPS_DIVERGED_ITS                 = -3,
-              EPS_DIVERGED_BREAKDOWN           = -4,
-              EPS_DIVERGED_SYMMETRY_LOST       = -5,
-              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;
-PETSC_EXTERN const char *const*EPSConvergedReasons;
-
-PETSC_EXTERN PetscErrorCode EPSGetConvergedReason(EPS,EPSConvergedReason*);
-
 PETSC_EXTERN PetscFunctionList EPSList;
 PETSC_EXTERN PetscErrorCode EPSRegister(const char[],PetscErrorCode(*)(EPS));
 
@@ -311,6 +329,8 @@ PETSC_EXTERN PetscErrorCode EPSKrylovSchurGetSubintervals(EPS,PetscReal**);
 PETSC_EXTERN PetscErrorCode EPSKrylovSchurGetInertias(EPS,PetscInt*,PetscReal**,PetscInt**);
 PETSC_EXTERN PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS,PetscInt*,PetscInt*,Vec*);
 PETSC_EXTERN PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS,PetscInt,PetscScalar*,Vec);
+PETSC_EXTERN PetscErrorCode EPSKrylovSchurGetSubcommMats(EPS,Mat*,Mat*);
+PETSC_EXTERN PetscErrorCode EPSKrylovSchurUpdateSubcommMats(EPS,PetscScalar,PetscScalar,Mat,PetscScalar,PetscScalar, Mat,MatStructure,PetscBool);
 
 /*E
     EPSLanczosReorthogType - determines the type of reorthogonalization
@@ -400,17 +420,45 @@ PETSC_EXTERN PetscErrorCode EPSRQCGGetReset(EPS,PetscInt*);
 
 PETSC_EXTERN PetscErrorCode EPSLOBPCGSetBlockSize(EPS,PetscInt);
 PETSC_EXTERN PetscErrorCode EPSLOBPCGGetBlockSize(EPS,PetscInt*);
+PETSC_EXTERN PetscErrorCode EPSLOBPCGSetRestart(EPS,PetscReal);
+PETSC_EXTERN PetscErrorCode EPSLOBPCGGetRestart(EPS,PetscReal*);
 PETSC_EXTERN PetscErrorCode EPSLOBPCGSetLocking(EPS,PetscBool);
 PETSC_EXTERN PetscErrorCode EPSLOBPCGGetLocking(EPS,PetscBool*);
 
+/*E
+    EPSCISSQuadRule - determines the quadrature rule in the CISS solver
+
+    Level: advanced
+
+.seealso: EPSCISSSetQuadRule(), EPSCISSGetQuadRule()
+E*/
+typedef enum { EPS_CISS_QUADRULE_TRAPEZOIDAL=1,
+               EPS_CISS_QUADRULE_CHEBYSHEV } EPSCISSQuadRule;
+PETSC_EXTERN const char *EPSCISSQuadRules[];
+
+/*E
+    EPSCISSExtraction - determines the extraction technique in the CISS solver
+
+    Level: advanced
+
+.seealso: EPSCISSSetExtraction(), EPSCISSGetExtraction()
+E*/
+typedef enum { EPS_CISS_EXTRACTION_RITZ,
+               EPS_CISS_EXTRACTION_HANKEL } EPSCISSExtraction;
+PETSC_EXTERN const char *EPSCISSExtractions[];
+
+PETSC_EXTERN PetscErrorCode EPSCISSSetExtraction(EPS,EPSCISSExtraction);
+PETSC_EXTERN PetscErrorCode EPSCISSGetExtraction(EPS,EPSCISSExtraction*);
+PETSC_EXTERN PetscErrorCode EPSCISSSetQuadRule(EPS,EPSCISSQuadRule);
+PETSC_EXTERN PetscErrorCode EPSCISSGetQuadRule(EPS,EPSCISSQuadRule*);
 PETSC_EXTERN PetscErrorCode EPSCISSSetRegion(EPS,PetscScalar,PetscReal,PetscReal);
 PETSC_EXTERN PetscErrorCode EPSCISSGetRegion(EPS,PetscScalar*,PetscReal*,PetscReal*);
 PETSC_EXTERN PetscErrorCode EPSCISSSetSizes(EPS,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool);
 PETSC_EXTERN PetscErrorCode EPSCISSGetSizes(EPS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*);
 PETSC_EXTERN PetscErrorCode EPSCISSSetThreshold(EPS,PetscReal,PetscReal);
 PETSC_EXTERN PetscErrorCode EPSCISSGetThreshold(EPS,PetscReal*,PetscReal*);
-PETSC_EXTERN PetscErrorCode EPSCISSSetRefinement(EPS,PetscInt,PetscInt,PetscInt);
-PETSC_EXTERN PetscErrorCode EPSCISSGetRefinement(EPS,PetscInt*,PetscInt*,PetscInt*);
+PETSC_EXTERN PetscErrorCode EPSCISSSetRefinement(EPS,PetscInt,PetscInt);
+PETSC_EXTERN PetscErrorCode EPSCISSGetRefinement(EPS,PetscInt*,PetscInt*);
 PETSC_EXTERN PetscErrorCode EPSCISSSetUseST(EPS,PetscBool);
 PETSC_EXTERN PetscErrorCode EPSCISSGetUseST(EPS,PetscBool*);
 
diff --git a/include/slepceps.h.html b/include/slepceps.h.html
index 24c7106..c74b7eb 100644
--- a/include/slepceps.h.html
+++ b/include/slepceps.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepceps.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:33+00:00">
+<meta name="date" content="2016-05-16T10:34:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepceps.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepceps.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   User interface for the SLEPC eigenproblem solvers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -161,276 +161,324 @@
 <a name="line151">151: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>()</font>
 <a name="line152">152: </a><font color="#B22222">E*/</font>
 <a name="line153">153: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_CONV_ABS,
-<a name="line154">154: </a>               EPS_CONV_EIG,
+<a name="line154">154: </a>               EPS_CONV_REL,
 <a name="line155">155: </a>               EPS_CONV_NORM,
 <a name="line156">156: </a>               EPS_CONV_USER } <a href="../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>;
 
-<a name="line158">158: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(MPI_Comm,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
-<a name="line159">159: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
-<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line161">161: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>)</font></strong>;
-<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>*)</font></strong>;
-<a name="line163">163: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>)</font></strong>;
-<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>*)</font></strong>;
-<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>)</font></strong>;
-<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>*)</font></strong>;
-<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>,PetscInt,PetscReal)</font></strong>;
-<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>*,PetscInt*,PetscReal*)</font></strong>;
-<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Mat,Mat)</font></strong>;
-<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Mat*,Mat*)</font></strong>;
-<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
-<a name="line175">175: </a><strong><font color="#4169E1"><a name="EPSViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode EPSViewFromOptions(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)eps,obj,name);}
-<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a>,PetscViewer)</font></strong>;
-<a name="line177">177: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode EPSPrintSolution(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer v) {<font color="#4169E1">return</font> <a href="../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,v);}
-<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
-<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line181">181: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
-<a name="line182">182: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line183">183: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
-<a name="line184">184: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-
-<a name="line186">186: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar)</font></strong>;
-<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*)</font></strong>;
-<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscReal)</font></strong>;
-<a name="line189">189: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*)</font></strong>;
-<a name="line190">190: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>)</font></strong>;
-<a name="line191">191: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>*)</font></strong>;
-<a name="line192">192: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line193">193: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line194">194: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
-<a name="line195">195: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>*)</font></strong>;
-<a name="line196">196: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line197">197: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
-<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscInt)</font></strong>;
-<a name="line199">199: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscInt*)</font></strong>;
-<a name="line200">200: </a><strong><font color="#4169E1"><a name="EPSSetConvergenceTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*)</font></strong>);
-<a name="line201">201: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>)</font></strong>;
-<a name="line202">202: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>*)</font></strong>;
-<a name="line203">203: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSConvergedEigRelative(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line204">204: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSConvergedAbsolute(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line205">205: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSConvergedNormRelative(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line206">206: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-
-<a name="line209">209: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line210">210: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec)</font></strong>;
-<a name="line211">211: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,Vec,Vec)</font></strong>;
-
-<a name="line214">214: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,<a href="../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a>,PetscReal*)</font></strong>;
-<a name="line215">215: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode EPSComputeRelativeError(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_RELATIVE,r);}
-<a name="line216">216: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>() with EPS_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode EPSComputeResidualNorm(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_ABSOLUTE,r);}
-<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Vec*)</font></strong>;
-<a name="line218">218: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscReal*)</font></strong>;
-
-<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSMonitor(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt)</font></strong>;
-<a name="line221">221: </a><strong><font color="#4169E1"><a name="EPSMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
-<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line223">223: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetMonitorContext.html#EPSGetMonitorContext">EPSGetMonitorContext</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,void**)</font></strong>;
-<a name="line224">224: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-
-<a name="line226">226: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>)</font></strong>;
-<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>*)</font></strong>;
-<a name="line228">228: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line230">230: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line231">231: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line232">232: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*)</font></strong>;
-<a name="line233">233: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void*)</font></strong>;
-<a name="line234">234: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line235">235: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line236">236: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-
-<a name="line238">238: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line239">239: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line240">240: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line241">241: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSMonitorLG(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line242">242: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSMonitorLGAll(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-
-<a name="line244">244: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line245">245: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-
-<a name="line247">247: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,Vec*)</font></strong>;
-<a name="line248">248: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,Vec*)</font></strong>;
-
-<a name="line250">250: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*)</font></strong>;
-<a name="line251">251: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*)</font></strong>;
-<a name="line252">252: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*[])</font></strong>;
-
-<a name="line254">254: </a><font color="#B22222">/*E</font>
-<a name="line255">255: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> - Reason an eigensolver was said to</font>
-<a name="line256">256: </a><font color="#B22222">         have converged or diverged</font>
-
-<a name="line258">258: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line260">260: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(), <a href="../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>()</font>
-<a name="line261">261: </a><font color="#B22222">E*/</font>
-<a name="line262">262: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
-<a name="line263">263: </a>              EPS_CONVERGED_TOL                =  2,
-<a name="line264">264: </a>              <font color="#B22222">/* diverged */</font>
-<a name="line265">265: </a>              EPS_DIVERGED_ITS                 = -3,
-<a name="line266">266: </a>              EPS_DIVERGED_BREAKDOWN           = -4,
-<a name="line267">267: </a>              EPS_DIVERGED_SYMMETRY_LOST       = -5,
-<a name="line268">268: </a>              EPS_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>;
-<a name="line269">269: </a>PETSC_EXTERN const char *const*EPSConvergedReasons;
-
-<a name="line271">271: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)</font></strong>;
-
-<a name="line273">273: </a>PETSC_EXTERN PetscFunctionList EPSList;
-<a name="line274">274: </a><strong><font color="#4169E1"><a name="EPSRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>);
-
-<a name="line276">276: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line277">277: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-
-<a name="line279">279: </a><font color="#B22222">/* --------- options specific to particular eigensolvers -------- */</font>
-
-<a name="line281">281: </a><font color="#B22222">/*E</font>
-<a name="line282">282: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> - determines the type of shift used in the Power iteration</font>
-
-<a name="line284">284: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line286">286: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(), <a href="../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>()</font>
-<a name="line287">287: </a><font color="#B22222">E*/</font>
-<a name="line288">288: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_POWER_SHIFT_CONSTANT,
-<a name="line289">289: </a>               EPS_POWER_SHIFT_RAYLEIGH,
-<a name="line290">290: </a>               EPS_POWER_SHIFT_WILKINSON } <a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>;
-<a name="line291">291: </a>PETSC_EXTERN const char *EPSPowerShiftTypes[];
-
-<a name="line293">293: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>)</font></strong>;
-<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>*)</font></strong>;
-
-<a name="line296">296: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line297">297: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-
-<a name="line299">299: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal)</font></strong>;
-<a name="line300">300: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
-<a name="line301">301: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line302">302: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line303">303: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line304">304: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line305">305: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line306">306: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line307">307: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line308">308: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line309">309: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
-<a name="line310">310: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal**)</font></strong>;
-<a name="line311">311: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscReal**,PetscInt**)</font></strong>;
-<a name="line312">312: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,Vec*)</font></strong>;
-<a name="line313">313: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,Vec)</font></strong>;
-
-<a name="line315">315: </a><font color="#B22222">/*E</font>
-<a name="line316">316: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> - determines the type of reorthogonalization</font>
-<a name="line317">317: </a><font color="#B22222">    used in the Lanczos method</font>
-
-<a name="line319">319: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line321">321: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(), <a href="../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>()</font>
-<a name="line322">322: </a><font color="#B22222">E*/</font>
-<a name="line323">323: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_LANCZOS_REORTHOG_LOCAL,
-<a name="line324">324: </a>               EPS_LANCZOS_REORTHOG_FULL,
-<a name="line325">325: </a>               EPS_LANCZOS_REORTHOG_SELECTIVE,
-<a name="line326">326: </a>               EPS_LANCZOS_REORTHOG_PERIODIC,
-<a name="line327">327: </a>               EPS_LANCZOS_REORTHOG_PARTIAL,
-<a name="line328">328: </a>               EPS_LANCZOS_REORTHOG_DELAYED } <a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>;
-<a name="line329">329: </a>PETSC_EXTERN const char *EPSLanczosReorthogTypes[];
-
-<a name="line331">331: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>)</font></strong>;
-<a name="line332">332: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>*)</font></strong>;
-
-<a name="line334">334: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line335">335: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-
-<a name="line337">337: </a><font color="#B22222">/*E</font>
-<a name="line338">338: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> - determines the method selected in the PRIMME library</font>
-
-<a name="line340">340: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line342">342: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(), <a href="../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>()</font>
-<a name="line343">343: </a><font color="#B22222">E*/</font>
-<a name="line344">344: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_PRIMME_DYNAMIC,
-<a name="line345">345: </a>               EPS_PRIMME_DEFAULT_MIN_TIME,
-<a name="line346">346: </a>               EPS_PRIMME_DEFAULT_MIN_MATVECS,
-<a name="line347">347: </a>               EPS_PRIMME_ARNOLDI,
-<a name="line348">348: </a>               EPS_PRIMME_GD,
-<a name="line349">349: </a>               EPS_PRIMME_GD_PLUSK,
-<a name="line350">350: </a>               EPS_PRIMME_GD_OLSEN_PLUSK,
-<a name="line351">351: </a>               EPS_PRIMME_JD_OLSEN_PLUSK,
-<a name="line352">352: </a>               EPS_PRIMME_RQI,
-<a name="line353">353: </a>               EPS_PRIMME_JDQR,
-<a name="line354">354: </a>               EPS_PRIMME_JDQMR,
-<a name="line355">355: </a>               EPS_PRIMME_JDQMR_ETOL,
-<a name="line356">356: </a>               EPS_PRIMME_SUBSPACE_ITERATION,
-<a name="line357">357: </a>               EPS_PRIMME_LOBPCG_ORTHOBASIS,
-<a name="line358">358: </a>               EPS_PRIMME_LOBPCG_ORTHOBASISW } <a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>;
-<a name="line359">359: </a>PETSC_EXTERN const char *EPSPRIMMEMethods[];
-
-<a name="line361">361: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line362">362: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>)</font></strong>;
-<a name="line363">363: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line364">364: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>*)</font></strong>;
-
-<a name="line366">366: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line367">367: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line368">368: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line369">369: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line370">370: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
-<a name="line371">371: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
-<a name="line372">372: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line373">373: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line374">374: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line375">375: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line376">376: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
-<a name="line377">377: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
-<a name="line378">378: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line379">379: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-
-<a name="line381">381: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line382">382: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line383">383: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line384">384: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line385">385: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
-<a name="line386">386: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
-<a name="line387">387: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line388">388: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line389">389: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal)</font></strong>;
-<a name="line390">390: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
-<a name="line391">391: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line392">392: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line393">393: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line394">394: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-<a name="line395">395: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
-<a name="line396">396: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
-
-<a name="line398">398: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line399">399: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-
-<a name="line401">401: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line402">402: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-<a name="line403">403: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line404">404: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-
-<a name="line406">406: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCISSSetRegion(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscReal,PetscReal)</font></strong>;
-<a name="line407">407: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCISSGetRegion(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscReal*,PetscReal*)</font></strong>;
-<a name="line408">408: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool)</font></strong>;
-<a name="line409">409: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*)</font></strong>;
-<a name="line410">410: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscReal)</font></strong>;
-<a name="line411">411: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*)</font></strong>;
-<a name="line412">412: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line413">413: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line414">414: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
-<a name="line415">415: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
-
-<a name="line417">417: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line418">418: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-
-<a name="line420">420: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
-<a name="line421">421: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
-
-<a name="line423">423: </a><font color="#A020F0">#endif</font>
+<a name="line158">158: </a><font color="#B22222">/*E</font>
+<a name="line159">159: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a> - Determines the stopping test</font>
+
+<a name="line161">161: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line163">163: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(), <a href="../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>()</font>
+<a name="line164">164: </a><font color="#B22222">E*/</font>
+<a name="line165">165: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_STOP_BASIC,
+<a name="line166">166: </a>               EPS_STOP_USER } <a href="../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a>;
+
+<a name="line168">168: </a><font color="#B22222">/*E</font>
+<a name="line169">169: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> - Reason an eigensolver was said to</font>
+<a name="line170">170: </a><font color="#B22222">         have converged or diverged</font>
+
+<a name="line172">172: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line174">174: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(), <a href="../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>()</font>
+<a name="line175">175: </a><font color="#B22222">E*/</font>
+<a name="line176">176: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
+<a name="line177">177: </a>              EPS_CONVERGED_TOL                =  1,
+<a name="line178">178: </a>              EPS_CONVERGED_USER               =  2,
+<a name="line179">179: </a>              <font color="#B22222">/* diverged */</font>
+<a name="line180">180: </a>              EPS_DIVERGED_ITS                 = -1,
+<a name="line181">181: </a>              EPS_DIVERGED_BREAKDOWN           = -2,
+<a name="line182">182: </a>              EPS_DIVERGED_SYMMETRY_LOST       = -3,
+<a name="line183">183: </a>              EPS_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>;
+<a name="line184">184: </a>PETSC_EXTERN const char *const*EPSConvergedReasons;
+
+<a name="line186">186: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(MPI_Comm,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
+<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
+<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line189">189: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>)</font></strong>;
+<a name="line190">190: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>*)</font></strong>;
+<a name="line191">191: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>)</font></strong>;
+<a name="line192">192: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>*)</font></strong>;
+<a name="line193">193: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>)</font></strong>;
+<a name="line194">194: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>*)</font></strong>;
+<a name="line195">195: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>,PetscInt,PetscReal)</font></strong>;
+<a name="line196">196: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>*,PetscInt*,PetscReal*)</font></strong>;
+<a name="line197">197: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Mat,Mat)</font></strong>;
+<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Mat*,Mat*)</font></strong>;
+<a name="line199">199: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line200">200: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line201">201: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line202">202: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
+<a name="line203">203: </a><strong><font color="#4169E1"><a name="EPSViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode EPSViewFromOptions(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)eps,obj,name);}
+<a name="line204">204: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a>,PetscViewer)</font></strong>;
+<a name="line205">205: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode EPSPrintSolution(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer v) {<font color="#4169E1">return</font> <a href="../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,v);}
+<a name="line206">206: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
+<a name="line208">208: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line209">209: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
+<a name="line210">210: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line211">211: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscViewer)</font></strong>;
+<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+
+<a name="line214">214: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar)</font></strong>;
+<a name="line215">215: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*)</font></strong>;
+<a name="line216">216: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscReal)</font></strong>;
+<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*)</font></strong>;
+<a name="line218">218: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>)</font></strong>;
+<a name="line219">219: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>*)</font></strong>;
+<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line221">221: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
+<a name="line223">223: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>*)</font></strong>;
+<a name="line224">224: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line225">225: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
+<a name="line226">226: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscInt)</font></strong>;
+<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscInt*)</font></strong>;
+<a name="line228">228: </a><strong><font color="#4169E1"><a name="EPSSetConvergenceTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*)</font></strong>);
+<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>)</font></strong>;
+<a name="line230">230: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>*)</font></strong>;
+<a name="line231">231: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSConvergedAbsolute(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line232">232: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSConvergedRelative(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line233">233: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSConvergedNorm(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line234">234: </a><strong><font color="#4169E1"><a name="EPSSetStoppingTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason"> [...]
+<a name="line235">235: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a>)</font></strong>;
+<a name="line236">236: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetStoppingTest.html#EPSGetStoppingTest">EPSGetStoppingTest</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a>*)</font></strong>;
+<a name="line237">237: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*,void*)</font></strong>;
+<a name="line238">238: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)</font></strong>;
+
+<a name="line240">240: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
+<a name="line241">241: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
+
+<a name="line243">243: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line244">244: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec)</font></strong>;
+<a name="line245">245: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line246">246: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,Vec,Vec)</font></strong>;
+
+<a name="line248">248: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,<a href="../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a>,PetscReal*)</font></strong>;
+<a name="line249">249: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode EPSComputeRelativeError(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_RELATIVE,r);}
+<a name="line250">250: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>() with EPS_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode EPSComputeResidualNorm(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_ABSOLUTE,r);}
+<a name="line251">251: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Vec*)</font></strong>;
+<a name="line252">252: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscReal*)</font></strong>;
+
+<a name="line254">254: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSMonitor(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt)</font></strong>;
+<a name="line255">255: </a><strong><font color="#4169E1"><a name="EPSMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
+<a name="line256">256: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool)</font></strong>;
+<a name="line257">257: </a><strong><font color="#4169E1"><a name="EPSConvMonitorSetFromOptions"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html#EPSConvMonitorSetFromOptions">EPSConvMonitorSetFromOptions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,Slepc [...]
+<a name="line258">258: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line259">259: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetMonitorContext.html#EPSGetMonitorContext">EPSGetMonitorContext</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,void**)</font></strong>;
+<a name="line260">260: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+
+<a name="line262">262: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>)</font></strong>;
+<a name="line263">263: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>*)</font></strong>;
+<a name="line264">264: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line265">265: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line266">266: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line267">267: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line268">268: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*)</font></strong>;
+<a name="line269">269: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void*)</font></strong>;
+<a name="line270">270: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line271">271: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line272">272: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+
+<a name="line274">274: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line275">275: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line276">276: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor)</font></strong>;
+<a name="line277">277: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSMonitorLGCreate.html#EPSMonitorLGCreate">EPSMonitorLGCreate</a>(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*)</font></strong>;
+<a name="line278">278: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSMonitorLG(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
+<a name="line279">279: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSMonitorLGAll(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
+
+<a name="line281">281: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line282">282: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+
+<a name="line284">284: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,Vec*)</font></strong>;
+<a name="line285">285: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,Vec*)</font></strong>;
+
+<a name="line287">287: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*)</font></strong>;
+<a name="line288">288: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*)</font></strong>;
+<a name="line289">289: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,const char*[])</font></strong>;
+
+<a name="line291">291: </a>PETSC_EXTERN PetscFunctionList EPSList;
+<a name="line292">292: </a><strong><font color="#4169E1"><a name="EPSRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>);
+
+<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line295">295: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+
+<a name="line297">297: </a><font color="#B22222">/* --------- options specific to particular eigensolvers -------- */</font>
+
+<a name="line299">299: </a><font color="#B22222">/*E</font>
+<a name="line300">300: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> - determines the type of shift used in the Power iteration</font>
+
+<a name="line302">302: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line304">304: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(), <a href="../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>()</font>
+<a name="line305">305: </a><font color="#B22222">E*/</font>
+<a name="line306">306: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_POWER_SHIFT_CONSTANT,
+<a name="line307">307: </a>               EPS_POWER_SHIFT_RAYLEIGH,
+<a name="line308">308: </a>               EPS_POWER_SHIFT_WILKINSON } <a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>;
+<a name="line309">309: </a>PETSC_EXTERN const char *EPSPowerShiftTypes[];
+
+<a name="line311">311: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>)</font></strong>;
+<a name="line312">312: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>*)</font></strong>;
+
+<a name="line314">314: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line315">315: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+
+<a name="line317">317: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal)</font></strong>;
+<a name="line318">318: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
+<a name="line319">319: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line320">320: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line321">321: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line322">322: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line323">323: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line324">324: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line325">325: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
+<a name="line326">326: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
+<a name="line327">327: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
+<a name="line328">328: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal**)</font></strong>;
+<a name="line329">329: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscReal**,PetscInt**)</font></strong>;
+<a name="line330">330: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,Vec*)</font></strong>;
+<a name="line331">331: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,Vec)</font></strong>;
+<a name="line332">332: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html#EPSKrylovSchurGetSubcommMats">EPSKrylovSchurGetSubcommMats</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Mat*,Mat*)</font></strong>;
+<a name="line333">333: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html#EPSKrylovSchurUpdateSubcommMats">EPSKrylovSchurUpdateSubcommMats</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,Mat,PetscScalar,PetscScalar, Mat,MatStructure,PetscBool)</font></strong>;
+
+<a name="line335">335: </a><font color="#B22222">/*E</font>
+<a name="line336">336: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> - determines the type of reorthogonalization</font>
+<a name="line337">337: </a><font color="#B22222">    used in the Lanczos method</font>
+
+<a name="line339">339: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line341">341: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(), <a href="../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>()</font>
+<a name="line342">342: </a><font color="#B22222">E*/</font>
+<a name="line343">343: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_LANCZOS_REORTHOG_LOCAL,
+<a name="line344">344: </a>               EPS_LANCZOS_REORTHOG_FULL,
+<a name="line345">345: </a>               EPS_LANCZOS_REORTHOG_SELECTIVE,
+<a name="line346">346: </a>               EPS_LANCZOS_REORTHOG_PERIODIC,
+<a name="line347">347: </a>               EPS_LANCZOS_REORTHOG_PARTIAL,
+<a name="line348">348: </a>               EPS_LANCZOS_REORTHOG_DELAYED } <a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>;
+<a name="line349">349: </a>PETSC_EXTERN const char *EPSLanczosReorthogTypes[];
+
+<a name="line351">351: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>)</font></strong>;
+<a name="line352">352: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>*)</font></strong>;
+
+<a name="line354">354: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line355">355: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+
+<a name="line357">357: </a><font color="#B22222">/*E</font>
+<a name="line358">358: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> - determines the method selected in the PRIMME library</font>
+
+<a name="line360">360: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line362">362: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(), <a href="../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>()</font>
+<a name="line363">363: </a><font color="#B22222">E*/</font>
+<a name="line364">364: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_PRIMME_DYNAMIC,
+<a name="line365">365: </a>               EPS_PRIMME_DEFAULT_MIN_TIME,
+<a name="line366">366: </a>               EPS_PRIMME_DEFAULT_MIN_MATVECS,
+<a name="line367">367: </a>               EPS_PRIMME_ARNOLDI,
+<a name="line368">368: </a>               EPS_PRIMME_GD,
+<a name="line369">369: </a>               EPS_PRIMME_GD_PLUSK,
+<a name="line370">370: </a>               EPS_PRIMME_GD_OLSEN_PLUSK,
+<a name="line371">371: </a>               EPS_PRIMME_JD_OLSEN_PLUSK,
+<a name="line372">372: </a>               EPS_PRIMME_RQI,
+<a name="line373">373: </a>               EPS_PRIMME_JDQR,
+<a name="line374">374: </a>               EPS_PRIMME_JDQMR,
+<a name="line375">375: </a>               EPS_PRIMME_JDQMR_ETOL,
+<a name="line376">376: </a>               EPS_PRIMME_SUBSPACE_ITERATION,
+<a name="line377">377: </a>               EPS_PRIMME_LOBPCG_ORTHOBASIS,
+<a name="line378">378: </a>               EPS_PRIMME_LOBPCG_ORTHOBASISW } <a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>;
+<a name="line379">379: </a>PETSC_EXTERN const char *EPSPRIMMEMethods[];
+
+<a name="line381">381: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line382">382: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>)</font></strong>;
+<a name="line383">383: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line384">384: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>*)</font></strong>;
+
+<a name="line386">386: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line387">387: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line388">388: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line389">389: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line390">390: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line391">391: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line392">392: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line393">393: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line394">394: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line395">395: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line396">396: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line397">397: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line398">398: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line399">399: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+
+<a name="line401">401: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line402">402: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line403">403: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line404">404: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line405">405: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line406">406: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line407">407: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line408">408: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line409">409: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal)</font></strong>;
+<a name="line410">410: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
+<a name="line411">411: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line412">412: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line413">413: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line414">414: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line415">415: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line416">416: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+
+<a name="line418">418: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line419">419: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+
+<a name="line421">421: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line422">422: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line423">423: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal)</font></strong>;
+<a name="line424">424: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGGetRestart.html#EPSLOBPCGGetRestart">EPSLOBPCGGetRestart</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
+<a name="line425">425: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line426">426: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+
+<a name="line428">428: </a><font color="#B22222">/*E</font>
+<a name="line429">429: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a> - determines the quadrature rule in the CISS solver</font>
+
+<a name="line431">431: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line433">433: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a>(), <a href="../docs/manualpages/EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</a>()</font>
+<a name="line434">434: </a><font color="#B22222">E*/</font>
+<a name="line435">435: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_CISS_QUADRULE_TRAPEZOIDAL=1,
+<a name="line436">436: </a>               EPS_CISS_QUADRULE_CHEBYSHEV } <a href="../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>;
+<a name="line437">437: </a>PETSC_EXTERN const char *EPSCISSQuadRules[];
+
+<a name="line439">439: </a><font color="#B22222">/*E</font>
+<a name="line440">440: </a><font color="#B22222">    <a href="../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> - determines the extraction technique in the CISS solver</font>
+
+<a name="line442">442: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line444">444: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a>(), <a href="../docs/manualpages/EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</a>()</font>
+<a name="line445">445: </a><font color="#B22222">E*/</font>
+<a name="line446">446: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { EPS_CISS_EXTRACTION_RITZ,
+<a name="line447">447: </a>               EPS_CISS_EXTRACTION_HANKEL } <a href="../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>;
+<a name="line448">448: </a>PETSC_EXTERN const char *EPSCISSExtractions[];
+
+<a name="line450">450: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>)</font></strong>;
+<a name="line451">451: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>*)</font></strong>;
+<a name="line452">452: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>)</font></strong>;
+<a name="line453">453: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>*)</font></strong>;
+<a name="line454">454: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCISSSetRegion(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscReal,PetscReal)</font></strong>;
+<a name="line455">455: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCISSGetRegion(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line456">456: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool)</font></strong>;
+<a name="line457">457: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*)</font></strong>;
+<a name="line458">458: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscReal)</font></strong>;
+<a name="line459">459: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*)</font></strong>;
+<a name="line460">460: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line461">461: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line462">462: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line463">463: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+
+<a name="line465">465: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line466">466: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+
+<a name="line468">468: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line469">469: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a>(<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+
+<a name="line471">471: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepcfn.h b/include/slepcfn.h
index e6a2b27..210da22 100644
--- a/include/slepcfn.h
+++ b/include/slepcfn.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -47,6 +47,7 @@ typedef const char* FNType;
 #define FNLOG      "log"
 #define FNPHI      "phi"
 #define FNSQRT     "sqrt"
+#define FNINVSQRT  "invsqrt"
 
 /* Logging support */
 PETSC_EXTERN PetscClassId FN_CLASSID;
@@ -80,6 +81,7 @@ PETSC_EXTERN PetscErrorCode FNGetScale(FN,PetscScalar*,PetscScalar*);
 PETSC_EXTERN PetscErrorCode FNEvaluateFunction(FN,PetscScalar,PetscScalar*);
 PETSC_EXTERN PetscErrorCode FNEvaluateDerivative(FN,PetscScalar,PetscScalar*);
 PETSC_EXTERN PetscErrorCode FNEvaluateFunctionMat(FN,Mat,Mat);
+PETSC_EXTERN PetscErrorCode FNEvaluateFunctionMatVec(FN,Mat,Vec);
 
 PETSC_EXTERN PetscFunctionList FNList;
 PETSC_EXTERN PetscErrorCode FNRegister(const char[],PetscErrorCode(*)(FN));
diff --git a/include/slepcfn.h.html b/include/slepcfn.h.html
index 13b029d..e14df28 100644
--- a/include/slepcfn.h.html
+++ b/include/slepcfn.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcfn.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:36+00:00">
+<meta name="date" content="2016-05-16T10:34:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcfn.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcfn.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -57,57 +57,59 @@
 <a name="line47"> 47: </a><strong><font color="#228B22">#define FNLOG      </font><font color="#666666">"log"</font><font color="#228B22"></font></strong>
 <a name="line48"> 48: </a><strong><font color="#228B22">#define FNPHI      </font><font color="#666666">"phi"</font><font color="#228B22"></font></strong>
 <a name="line49"> 49: </a><strong><font color="#228B22">#define FNSQRT     </font><font color="#666666">"sqrt"</font><font color="#228B22"></font></strong>
+<a name="line50"> 50: </a><strong><font color="#228B22">#define FNINVSQRT  </font><font color="#666666">"invsqrt"</font><font color="#228B22"></font></strong>
 
-<a name="line51"> 51: </a><font color="#B22222">/* Logging support */</font>
-<a name="line52"> 52: </a>PETSC_EXTERN PetscClassId FN_CLASSID;
+<a name="line52"> 52: </a><font color="#B22222">/* Logging support */</font>
+<a name="line53"> 53: </a>PETSC_EXTERN PetscClassId FN_CLASSID;
 
-<a name="line54"> 54: </a><font color="#B22222">/*E</font>
-<a name="line55"> 55: </a><font color="#B22222">    <a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> - Determines how two functions are combined</font>
+<a name="line55"> 55: </a><font color="#B22222">/*E</font>
+<a name="line56"> 56: </a><font color="#B22222">    <a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> - Determines how two functions are combined</font>
 
-<a name="line57"> 57: </a><font color="#B22222">    Level: advanced</font>
+<a name="line58"> 58: </a><font color="#B22222">    Level: advanced</font>
 
-<a name="line59"> 59: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>()</font>
-<a name="line60"> 60: </a><font color="#B22222">E*/</font>
-<a name="line61"> 61: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { FN_COMBINE_ADD,
-<a name="line62"> 62: </a>               FN_COMBINE_MULTIPLY,
-<a name="line63"> 63: </a>               FN_COMBINE_DIVIDE,
-<a name="line64"> 64: </a>               FN_COMBINE_COMPOSE } <a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>;
+<a name="line60"> 60: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>()</font>
+<a name="line61"> 61: </a><font color="#B22222">E*/</font>
+<a name="line62"> 62: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { FN_COMBINE_ADD,
+<a name="line63"> 63: </a>               FN_COMBINE_MULTIPLY,
+<a name="line64"> 64: </a>               FN_COMBINE_DIVIDE,
+<a name="line65"> 65: </a>               FN_COMBINE_COMPOSE } <a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>;
 
-<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(MPI_Comm,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
-<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNType.html#FNType">FNType</a>)</font></strong>;
-<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNType.html#FNType">FNType</a>*)</font></strong>;
-<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,const char *)</font></strong>;
-<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,const char *)</font></strong>;
-<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,const char *[])</font></strong>;
-<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
-<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNView.html#FNView">FNView</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscViewer)</font></strong>;
-<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
-<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,MPI_Comm,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(MPI_Comm,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNType.html#FNType">FNType</a>)</font></strong>;
+<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNType.html#FNType">FNType</a>*)</font></strong>;
+<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,const char *)</font></strong>;
+<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,const char *)</font></strong>;
+<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,const char *[])</font></strong>;
+<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
+<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNView.html#FNView">FNView</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscViewer)</font></strong>;
+<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line76"> 76: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,MPI_Comm,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
 
-<a name="line77"> 77: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar)</font></strong>;
-<a name="line78"> 78: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line78"> 78: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar)</font></strong>;
+<a name="line79"> 79: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar*,PetscScalar*)</font></strong>;
 
-<a name="line80"> 80: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar*)</font></strong>;
-<a name="line81"> 81: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar*)</font></strong>;
-<a name="line82"> 82: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Mat)</font></strong>;
+<a name="line81"> 81: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar*)</font></strong>;
+<a name="line82"> 82: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscScalar,PetscScalar*)</font></strong>;
+<a name="line83"> 83: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Mat)</font></strong>;
+<a name="line84"> 84: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,Mat,Vec)</font></strong>;
 
-<a name="line84"> 84: </a>PETSC_EXTERN PetscFunctionList FNList;
-<a name="line85"> 85: </a><strong><font color="#4169E1"><a name="FNRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>);
+<a name="line86"> 86: </a>PETSC_EXTERN PetscFunctionList FNList;
+<a name="line87"> 87: </a><strong><font color="#4169E1"><a name="FNRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>);
 
-<a name="line87"> 87: </a><font color="#B22222">/* --------- options specific to particular functions -------- */</font>
+<a name="line89"> 89: </a><font color="#B22222">/* --------- options specific to particular functions -------- */</font>
 
-<a name="line89"> 89: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*)</font></strong>;
-<a name="line90"> 90: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**)</font></strong>;
-<a name="line91"> 91: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*)</font></strong>;
-<a name="line92"> 92: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**)</font></strong>;
+<a name="line91"> 91: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*)</font></strong>;
+<a name="line92"> 92: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**)</font></strong>;
+<a name="line93"> 93: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*)</font></strong>;
+<a name="line94"> 94: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**)</font></strong>;
 
-<a name="line94"> 94: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
-<a name="line95"> 95: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line96"> 96: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
+<a name="line97"> 97: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
 
-<a name="line97"> 97: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt)</font></strong>;
-<a name="line98"> 98: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNPhiGetIndex.html#FNPhiGetIndex">FNPhiGetIndex</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*)</font></strong>;
+<a name="line99"> 99: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt)</font></strong>;
+<a name="line100">100: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/FN/FNPhiGetIndex.html#FNPhiGetIndex">FNPhiGetIndex</a>(<a href="../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*)</font></strong>;
 
-<a name="line100">100: </a><font color="#A020F0">#endif</font>
+<a name="line102">102: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepcmath.h b/include/slepcmath.h
index 199255a..5fafaad 100644
--- a/include/slepcmath.h
+++ b/include/slepcmath.h
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepcmath.h.html b/include/slepcmath.h.html
index 4dcd172..5e56719 100644
--- a/include/slepcmath.h.html
+++ b/include/slepcmath.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcmath.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:32+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcmath.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcmath.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   SLEPc mathematics include file. Defines basic operations and functions.</font>
 <a name="line3">  3: </a><font color="#B22222">   This file is included by slepcsys.h and should not be used directly.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/include/slepcmfn.h b/include/slepcmfn.h
index e162047..7f80c23 100644
--- a/include/slepcmfn.h
+++ b/include/slepcmfn.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -46,6 +46,7 @@ typedef struct _p_MFN* MFN;
 J*/
 typedef const char* MFNType;
 #define MFNKRYLOV   "krylov"
+#define MFNEXPOKIT  "expokit"
 
 /* Logging support */
 PETSC_EXTERN PetscClassId MFN_CLASSID;
@@ -76,6 +77,7 @@ PETSC_EXTERN PetscErrorCode MFNGetDimensions(MFN,PetscInt*);
 
 PETSC_EXTERN PetscErrorCode MFNMonitor(MFN,PetscInt,PetscReal);
 PETSC_EXTERN PetscErrorCode MFNMonitorSet(MFN,PetscErrorCode (*)(MFN,PetscInt,PetscReal,void*),void*,PetscErrorCode (*)(void**));
+PETSC_EXTERN PetscErrorCode MFNMonitorSetFromOptions(MFN,const char*,const char*,const char*,PetscErrorCode (*)(MFN,PetscInt,PetscReal,PetscViewerAndFormat*));
 PETSC_EXTERN PetscErrorCode MFNMonitorCancel(MFN);
 PETSC_EXTERN PetscErrorCode MFNGetMonitorContext(MFN,void **);
 PETSC_EXTERN PetscErrorCode MFNGetIterationNumber(MFN,PetscInt*);
@@ -83,7 +85,8 @@ PETSC_EXTERN PetscErrorCode MFNGetIterationNumber(MFN,PetscInt*);
 PETSC_EXTERN PetscErrorCode MFNSetErrorIfNotConverged(MFN,PetscBool);
 PETSC_EXTERN PetscErrorCode MFNGetErrorIfNotConverged(MFN,PetscBool*);
 
-PETSC_EXTERN PetscErrorCode MFNMonitorDefault(MFN,PetscInt,PetscReal,void*);
+PETSC_EXTERN PetscErrorCode MFNMonitorDefault(MFN,PetscInt,PetscReal,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode MFNMonitorLGCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*);
 PETSC_EXTERN PetscErrorCode MFNMonitorLG(MFN,PetscInt,PetscReal,void*);
 
 PETSC_EXTERN PetscErrorCode MFNSetOptionsPrefix(MFN,const char*);
@@ -100,6 +103,7 @@ PETSC_EXTERN PetscErrorCode MFNGetOptionsPrefix(MFN,const char*[]);
 E*/
 typedef enum {/* converged */
               MFN_CONVERGED_TOL                =  2,
+              MFN_CONVERGED_ITS                =  3,
               /* diverged */
               MFN_DIVERGED_ITS                 = -3,
               MFN_DIVERGED_BREAKDOWN           = -4,
diff --git a/include/slepcmfn.h.html b/include/slepcmfn.h.html
index f9336e0..08a38cf 100644
--- a/include/slepcmfn.h.html
+++ b/include/slepcmfn.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcmfn.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:34+00:00">
+<meta name="date" content="2016-05-16T10:34:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcmfn.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcmfn.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   User interface for the SLEPC matrix function object.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -56,74 +56,78 @@
 <a name="line46"> 46: </a><font color="#B22222">J*/</font>
 <a name="line47"> 47: </a><font color="#4169E1">typedef const char* <a href="../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>;</font>
 <a name="line48"> 48: </a><strong><font color="#228B22">#define MFNKRYLOV   </font><font color="#666666">"krylov"</font><font color="#228B22"></font></strong>
-
-<a name="line50"> 50: </a><font color="#B22222">/* Logging support */</font>
-<a name="line51"> 51: </a>PETSC_EXTERN PetscClassId MFN_CLASSID;
-
-<a name="line53"> 53: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(MPI_Comm,<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a> *)</font></strong>;
-<a name="line54"> 54: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>*)</font></strong>;
-<a name="line55"> 55: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
-<a name="line56"> 56: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>)</font></strong>;
-<a name="line57"> 57: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetType.html#MFNGetType">MFNGetType</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>*)</font></strong>;
-<a name="line58"> 58: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Mat)</font></strong>;
-<a name="line59"> 59: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Mat*)</font></strong>;
-<a name="line60"> 60: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
-<a name="line61"> 61: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
-<a name="line62"> 62: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Vec,Vec)</font></strong>;
-<a name="line63"> 63: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNView.html#MFNView">MFNView</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscViewer)</font></strong>;
-<a name="line64"> 64: </a><strong><font color="#4169E1"><a name="MFNViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode MFNViewFromOptions(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)mfn,obj,name);}
-<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNReasonView.html#MFNReasonView">MFNReasonView</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscViewer)</font></strong>;
-<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNReasonViewFromOptions.html#MFNReasonViewFromOptions">MFNReasonViewFromOptions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
-
-<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
-<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
-<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscReal,PetscInt)</font></strong>;
-<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscReal*,PetscInt*)</font></strong>;
-<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt)</font></strong>;
-<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt*)</font></strong>;
-
-<a name="line77"> 77: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode MFNMonitor(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal)</font></strong>;
-<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="MFNMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscErrorCode (*)(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
-<a name="line79"> 79: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
-<a name="line80"> 80: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetMonitorContext.html#MFNGetMonitorContext">MFNGetMonitorContext</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,void **)</font></strong>;
-<a name="line81"> 81: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt*)</font></strong>;
-
-<a name="line83"> 83: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscBool)</font></strong>;
-<a name="line84"> 84: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscBool*)</font></strong>;
-
-<a name="line86"> 86: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*)</font></strong>;
-<a name="line87"> 87: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode MFNMonitorLG(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*)</font></strong>;
-
-<a name="line89"> 89: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*)</font></strong>;
-<a name="line90"> 90: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*)</font></strong>;
-<a name="line91"> 91: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*[])</font></strong>;
-
-<a name="line93"> 93: </a><font color="#B22222">/*E</font>
-<a name="line94"> 94: </a><font color="#B22222">    <a href="../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> - reason a matrix function iteration was said to</font>
-<a name="line95"> 95: </a><font color="#B22222">         have converged or diverged</font>
-
-<a name="line97"> 97: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line99"> 99: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(), <a href="../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>()</font>
-<a name="line100">100: </a><font color="#B22222">E*/</font>
-<a name="line101">101: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
-<a name="line102">102: </a>              MFN_CONVERGED_TOL                =  2,
-<a name="line103">103: </a>              <font color="#B22222">/* diverged */</font>
-<a name="line104">104: </a>              MFN_DIVERGED_ITS                 = -3,
-<a name="line105">105: </a>              MFN_DIVERGED_BREAKDOWN           = -4,
-<a name="line106">106: </a>              MFN_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a>;
-<a name="line107">107: </a>PETSC_EXTERN const char *const*MFNConvergedReasons;
-
-<a name="line109">109: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> *)</font></strong>;
-
-<a name="line111">111: </a>PETSC_EXTERN PetscFunctionList MFNList;
-<a name="line112">112: </a><strong><font color="#4169E1"><a name="MFNRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>);
-
-<a name="line114">114: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt)</font></strong>;
-
-<a name="line116">116: </a><font color="#A020F0">#endif</font>
+<a name="line49"> 49: </a><strong><font color="#228B22">#define MFNEXPOKIT  </font><font color="#666666">"expokit"</font><font color="#228B22"></font></strong>
+
+<a name="line51"> 51: </a><font color="#B22222">/* Logging support */</font>
+<a name="line52"> 52: </a>PETSC_EXTERN PetscClassId MFN_CLASSID;
+
+<a name="line54"> 54: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(MPI_Comm,<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a> *)</font></strong>;
+<a name="line55"> 55: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>*)</font></strong>;
+<a name="line56"> 56: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
+<a name="line57"> 57: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>)</font></strong>;
+<a name="line58"> 58: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetType.html#MFNGetType">MFNGetType</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a>*)</font></strong>;
+<a name="line59"> 59: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Mat)</font></strong>;
+<a name="line60"> 60: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Mat*)</font></strong>;
+<a name="line61"> 61: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
+<a name="line62"> 62: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
+<a name="line63"> 63: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,Vec,Vec)</font></strong>;
+<a name="line64"> 64: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNView.html#MFNView">MFNView</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscViewer)</font></strong>;
+<a name="line65"> 65: </a><strong><font color="#4169E1"><a name="MFNViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode MFNViewFromOptions(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)mfn,obj,name);}
+<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNReasonView.html#MFNReasonView">MFNReasonView</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscViewer)</font></strong>;
+<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNReasonViewFromOptions.html#MFNReasonViewFromOptions">MFNReasonViewFromOptions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
+
+<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
+<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscReal,PetscInt)</font></strong>;
+<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscReal*,PetscInt*)</font></strong>;
+<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt)</font></strong>;
+<a name="line76"> 76: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt*)</font></strong>;
+
+<a name="line78"> 78: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode MFNMonitor(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal)</font></strong>;
+<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="MFNMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscErrorCode (*)(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
+<a name="line80"> 80: </a><strong><font color="#4169E1"><a name="MFNMonitorSetFromOptions"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorSetFromOptions.html#MFNMonitorSetFromOptions">MFNMonitorSetFromOptions</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,PetscViewerAndFormat*)</font></strong>);
+<a name="line81"> 81: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
+<a name="line82"> 82: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetMonitorContext.html#MFNGetMonitorContext">MFNGetMonitorContext</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,void **)</font></strong>;
+<a name="line83"> 83: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt*)</font></strong>;
+
+<a name="line85"> 85: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscBool)</font></strong>;
+<a name="line86"> 86: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscBool*)</font></strong>;
+
+<a name="line88"> 88: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,PetscViewerAndFormat*)</font></strong>;
+<a name="line89"> 89: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNMonitorLGCreate.html#MFNMonitorLGCreate">MFNMonitorLGCreate</a>(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*)</font></strong>;
+<a name="line90"> 90: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode MFNMonitorLG(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*)</font></strong>;
+
+<a name="line92"> 92: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*)</font></strong>;
+<a name="line93"> 93: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*)</font></strong>;
+<a name="line94"> 94: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,const char*[])</font></strong>;
+
+<a name="line96"> 96: </a><font color="#B22222">/*E</font>
+<a name="line97"> 97: </a><font color="#B22222">    <a href="../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> - reason a matrix function iteration was said to</font>
+<a name="line98"> 98: </a><font color="#B22222">         have converged or diverged</font>
+
+<a name="line100">100: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line102">102: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(), <a href="../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>()</font>
+<a name="line103">103: </a><font color="#B22222">E*/</font>
+<a name="line104">104: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
+<a name="line105">105: </a>              MFN_CONVERGED_TOL                =  2,
+<a name="line106">106: </a>              MFN_CONVERGED_ITS                =  3,
+<a name="line107">107: </a>              <font color="#B22222">/* diverged */</font>
+<a name="line108">108: </a>              MFN_DIVERGED_ITS                 = -3,
+<a name="line109">109: </a>              MFN_DIVERGED_BREAKDOWN           = -4,
+<a name="line110">110: </a>              MFN_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a>;
+<a name="line111">111: </a>PETSC_EXTERN const char *const*MFNConvergedReasons;
+
+<a name="line113">113: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,<a href="../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> *)</font></strong>;
+
+<a name="line115">115: </a>PETSC_EXTERN PetscFunctionList MFNList;
+<a name="line116">116: </a><strong><font color="#4169E1"><a name="MFNRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>);
+
+<a name="line118">118: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a>(<a href="../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt)</font></strong>;
+
+<a name="line120">120: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepcnep.h b/include/slepcnep.h
index 362f170..b2caea3 100644
--- a/include/slepcnep.h
+++ b/include/slepcnep.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -52,6 +52,7 @@ typedef const char* NEPType;
 #define NEPNARNOLDI  "narnoldi"
 #define NEPCISS      "ciss"
 #define NEPINTERPOL  "interpol"
+#define NEPNLEIGS    "nleigs"
 
 /* Logging support */
 PETSC_EXTERN PetscClassId NEP_CLASSID;
@@ -71,7 +72,9 @@ typedef enum { NEP_LARGEST_MAGNITUDE=1,
                NEP_SMALLEST_IMAGINARY,
                NEP_TARGET_MAGNITUDE,
                NEP_TARGET_REAL,
-               NEP_TARGET_IMAGINARY} NEPWhich;
+               NEP_TARGET_IMAGINARY,
+               NEP_ALL,
+               NEP_WHICH_USER } NEPWhich;
 
 /*E
     NEPErrorType - The error type used to assess accuracy of computed solutions
@@ -81,7 +84,8 @@ typedef enum { NEP_LARGEST_MAGNITUDE=1,
 .seealso: NEPComputeError()
 E*/
 typedef enum { NEP_ERROR_ABSOLUTE,
-               NEP_ERROR_RELATIVE } NEPErrorType;
+               NEP_ERROR_RELATIVE,
+               NEP_ERROR_BACKWARD } NEPErrorType;
 PETSC_EXTERN const char *NEPErrorTypes[];
 
 /*E
@@ -97,6 +101,40 @@ typedef enum { NEP_REFINE_NONE,
 PETSC_EXTERN const char *NEPRefineTypes[];
 
 /*E
+    NEPRefineScheme - The scheme used for solving linear systems during iterative refinement
+
+    Level: intermediate
+
+.seealso: NEPSetRefine()
+E*/
+typedef enum { NEP_REFINE_SCHEME_SCHUR=1,
+               NEP_REFINE_SCHEME_MBE,
+               NEP_REFINE_SCHEME_EXPLICIT } NEPRefineScheme;
+PETSC_EXTERN const char *NEPRefineSchemes[];
+
+/*E
+    NEPConv - Determines the convergence test
+
+    Level: intermediate
+
+.seealso: NEPSetConvergenceTest(), NEPSetConvergenceTestFunction()
+E*/
+typedef enum { NEP_CONV_ABS,
+               NEP_CONV_REL,
+               NEP_CONV_NORM,
+               NEP_CONV_USER } NEPConv;
+
+/*E
+    NEPStop - Determines the stopping test
+
+    Level: advanced
+
+.seealso: NEPSetStoppingTest(), NEPSetStoppingTestFunction()
+E*/
+typedef enum { NEP_STOP_BASIC,
+               NEP_STOP_USER } NEPStop;
+
+/*E
     NEPConvergedReason - Reason a nonlinear eigensolver was said to
          have converged or diverged
 
@@ -105,15 +143,13 @@ PETSC_EXTERN const char *NEPRefineTypes[];
 .seealso: NEPSolve(), NEPGetConvergedReason(), NEPSetTolerances()
 E*/
 typedef enum {/* converged */
-              NEP_CONVERGED_FNORM_ABS          =  2,
-              NEP_CONVERGED_FNORM_RELATIVE     =  3,
-              NEP_CONVERGED_SNORM_RELATIVE     =  4,
+              NEP_CONVERGED_TOL                =  1,
+              NEP_CONVERGED_USER               =  2,
               /* diverged */
-              NEP_DIVERGED_LINEAR_SOLVE        = -1,
-              NEP_DIVERGED_FUNCTION_COUNT      = -2,
-              NEP_DIVERGED_MAX_IT              = -3,
-              NEP_DIVERGED_BREAKDOWN           = -4,
-              NEP_DIVERGED_FNORM_NAN           = -5,
+              NEP_DIVERGED_ITS                 = -1,
+              NEP_DIVERGED_BREAKDOWN           = -2,
+                    /* unused                  = -3 */
+              NEP_DIVERGED_LINEAR_SOLVE        = -4,
               NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;
 PETSC_EXTERN const char *const*NEPConvergedReasons;
 
@@ -124,8 +160,6 @@ PETSC_EXTERN PetscErrorCode NEPSetType(NEP,NEPType);
 PETSC_EXTERN PetscErrorCode NEPGetType(NEP,NEPType*);
 PETSC_EXTERN PetscErrorCode NEPSetTarget(NEP,PetscScalar);
 PETSC_EXTERN PetscErrorCode NEPGetTarget(NEP,PetscScalar*);
-PETSC_EXTERN PetscErrorCode NEPSetKSP(NEP,KSP);
-PETSC_EXTERN PetscErrorCode NEPGetKSP(NEP,KSP*);
 PETSC_EXTERN PetscErrorCode NEPSetFromOptions(NEP);
 PETSC_EXTERN PetscErrorCode NEPSetUp(NEP);
 PETSC_EXTERN PetscErrorCode NEPSolve(NEP);
@@ -144,6 +178,8 @@ PETSC_EXTERN PetscErrorCode NEPSetFunction(NEP,Mat,Mat,PetscErrorCode (*)(NEP,Pe
 PETSC_EXTERN PetscErrorCode NEPGetFunction(NEP,Mat*,Mat*,PetscErrorCode (**)(NEP,PetscScalar,Mat,Mat,void*),void**);
 PETSC_EXTERN PetscErrorCode NEPSetJacobian(NEP,Mat,PetscErrorCode (*)(NEP,PetscScalar,Mat,void*),void*);
 PETSC_EXTERN PetscErrorCode NEPGetJacobian(NEP,Mat*,PetscErrorCode (**)(NEP,PetscScalar,Mat,void*),void**);
+PETSC_EXTERN PetscErrorCode NEPSetDerivatives(NEP,Mat,PetscErrorCode (*)(NEP,PetscScalar,PetscInt,Mat,void*),void*);
+PETSC_EXTERN PetscErrorCode NEPGetDerivatives(NEP,Mat*,PetscErrorCode (**)(NEP,PetscScalar,PetscInt,Mat,void*),void**);
 PETSC_EXTERN PetscErrorCode NEPSetSplitOperator(NEP,PetscInt,Mat*,FN*,MatStructure);
 PETSC_EXTERN PetscErrorCode NEPGetSplitOperatorTerm(NEP,PetscInt,Mat*,FN*);
 PETSC_EXTERN PetscErrorCode NEPGetSplitOperatorInfo(NEP,PetscInt*,MatStructure*);
@@ -154,18 +190,23 @@ PETSC_EXTERN PetscErrorCode NEPSetRG(NEP,RG);
 PETSC_EXTERN PetscErrorCode NEPGetRG(NEP,RG*);
 PETSC_EXTERN PetscErrorCode NEPSetDS(NEP,DS);
 PETSC_EXTERN PetscErrorCode NEPGetDS(NEP,DS*);
-PETSC_EXTERN PetscErrorCode NEPSetTolerances(NEP,PetscReal,PetscReal,PetscReal,PetscInt,PetscInt);
-PETSC_EXTERN PetscErrorCode NEPGetTolerances(NEP,PetscReal*,PetscReal*,PetscReal*,PetscInt*,PetscInt*);
-PETSC_EXTERN PetscErrorCode NEPSetConvergenceTest(NEP,PetscErrorCode (*)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*),void*,PetscErrorCode (*)(void*));
-PETSC_EXTERN PetscErrorCode NEPConvergedDefault(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*);
+PETSC_EXTERN PetscErrorCode NEPRefineGetKSP(NEP,KSP*);
+PETSC_EXTERN PetscErrorCode NEPSetTolerances(NEP,PetscReal,PetscInt);
+PETSC_EXTERN PetscErrorCode NEPGetTolerances(NEP,PetscReal*,PetscInt*);
+PETSC_EXTERN PetscErrorCode NEPSetConvergenceTestFunction(NEP,PetscErrorCode (*)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*));
+PETSC_EXTERN PetscErrorCode NEPSetConvergenceTest(NEP,NEPConv);
+PETSC_EXTERN PetscErrorCode NEPGetConvergenceTest(NEP,NEPConv*);
+PETSC_EXTERN PetscErrorCode NEPConvergedAbsolute(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode NEPConvergedRelative(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode NEPConvergedNorm(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode NEPSetStoppingTestFunction(NEP,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*),void*,PetscErrorCode (*)(void*));
+PETSC_EXTERN PetscErrorCode NEPSetStoppingTest(NEP,NEPStop);
+PETSC_EXTERN PetscErrorCode NEPGetStoppingTest(NEP,NEPStop*);
+PETSC_EXTERN PetscErrorCode NEPStoppingBasic(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*);
 PETSC_EXTERN PetscErrorCode NEPSetDimensions(NEP,PetscInt,PetscInt,PetscInt);
 PETSC_EXTERN PetscErrorCode NEPGetDimensions(NEP,PetscInt*,PetscInt*,PetscInt*);
-PETSC_EXTERN PetscErrorCode NEPSetRefine(NEP,NEPRefine,PetscInt,PetscReal,PetscInt);
-PETSC_EXTERN PetscErrorCode NEPGetRefine(NEP,NEPRefine*,PetscInt*,PetscReal*,PetscInt*);
-PETSC_EXTERN PetscErrorCode NEPSetLagPreconditioner(NEP,PetscInt);
-PETSC_EXTERN PetscErrorCode NEPGetLagPreconditioner(NEP,PetscInt*);
-PETSC_EXTERN PetscErrorCode NEPSetConstCorrectionTol(NEP,PetscBool);
-PETSC_EXTERN PetscErrorCode NEPGetConstCorrectionTol(NEP,PetscBool*);
+PETSC_EXTERN PetscErrorCode NEPSetRefine(NEP,NEPRefine,PetscInt,PetscReal,PetscInt,NEPRefineScheme);
+PETSC_EXTERN PetscErrorCode NEPGetRefine(NEP,NEPRefine*,PetscInt*,PetscReal*,PetscInt*,NEPRefineScheme*);
 
 PETSC_EXTERN PetscErrorCode NEPGetConverged(NEP,PetscInt*);
 PETSC_EXTERN PetscErrorCode NEPGetEigenpair(NEP,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec);
@@ -181,8 +222,10 @@ PETSC_EXTERN PetscErrorCode NEPApplyFunction(NEP,PetscScalar,Vec,Vec,Vec,Mat,Mat
 PETSC_EXTERN PetscErrorCode NEPApplyJacobian(NEP,PetscScalar,Vec,Vec,Vec,Mat);
 PETSC_EXTERN PetscErrorCode NEPProjectOperator(NEP,PetscInt,PetscInt);
 
-PETSC_EXTERN PetscErrorCode NEPMonitor(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt);
-PETSC_EXTERN PetscErrorCode NEPMonitorSet(NEP,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
+PETSC_EXTERN PetscErrorCode NEPMonitor(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt);
+PETSC_EXTERN PetscErrorCode NEPMonitorSet(NEP,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
+PETSC_EXTERN PetscErrorCode NEPMonitorSetFromOptions(NEP,const char*,const char*,const char*,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool);
+PETSC_EXTERN PetscErrorCode NEPConvMonitorSetFromOptions(NEP,const char*,const char*,const char*,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor));
 PETSC_EXTERN PetscErrorCode NEPMonitorCancel(NEP);
 PETSC_EXTERN PetscErrorCode NEPGetMonitorContext(NEP,void **);
 PETSC_EXTERN PetscErrorCode NEPGetIterationNumber(NEP,PetscInt*);
@@ -190,12 +233,14 @@ PETSC_EXTERN PetscErrorCode NEPGetIterationNumber(NEP,PetscInt*);
 PETSC_EXTERN PetscErrorCode NEPSetInitialSpace(NEP,PetscInt,Vec*);
 PETSC_EXTERN PetscErrorCode NEPSetWhichEigenpairs(NEP,NEPWhich);
 PETSC_EXTERN PetscErrorCode NEPGetWhichEigenpairs(NEP,NEPWhich*);
+PETSC_EXTERN PetscErrorCode NEPSetEigenvalueComparison(NEP,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
 
-PETSC_EXTERN PetscErrorCode NEPMonitorAll(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode NEPMonitorFirst(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode NEPMonitorConverged(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode NEPMonitorLG(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode NEPMonitorLGAll(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*);
+PETSC_EXTERN PetscErrorCode NEPMonitorAll(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode NEPMonitorFirst(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode NEPMonitorConverged(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor);
+PETSC_EXTERN PetscErrorCode NEPMonitorLGCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*);
+PETSC_EXTERN PetscErrorCode NEPMonitorLG(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
+PETSC_EXTERN PetscErrorCode NEPMonitorLGAll(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
 
 PETSC_EXTERN PetscErrorCode NEPSetTrackAll(NEP,PetscBool);
 PETSC_EXTERN PetscErrorCode NEPGetTrackAll(NEP,PetscBool*);
@@ -214,20 +259,46 @@ PETSC_EXTERN PetscErrorCode NEPAllocateSolution(NEP,PetscInt);
 
 /* --------- options specific to particular eigensolvers -------- */
 
+PETSC_EXTERN PetscErrorCode NEPRIISetMaximumIterations(NEP,PetscInt);
+PETSC_EXTERN PetscErrorCode NEPRIIGetMaximumIterations(NEP,PetscInt*);
+PETSC_EXTERN PetscErrorCode NEPRIISetLagPreconditioner(NEP,PetscInt);
+PETSC_EXTERN PetscErrorCode NEPRIIGetLagPreconditioner(NEP,PetscInt*);
+PETSC_EXTERN PetscErrorCode NEPRIISetConstCorrectionTol(NEP,PetscBool);
+PETSC_EXTERN PetscErrorCode NEPRIIGetConstCorrectionTol(NEP,PetscBool*);
+PETSC_EXTERN PetscErrorCode NEPRIISetKSP(NEP,KSP);
+PETSC_EXTERN PetscErrorCode NEPRIIGetKSP(NEP,KSP*);
+
 PETSC_EXTERN PetscErrorCode NEPSLPSetEPS(NEP,EPS);
 PETSC_EXTERN PetscErrorCode NEPSLPGetEPS(NEP,EPS*);
 
+PETSC_EXTERN PetscErrorCode NEPNArnoldiSetKSP(NEP,KSP);
+PETSC_EXTERN PetscErrorCode NEPNArnoldiGetKSP(NEP,KSP*);
+
 PETSC_EXTERN PetscErrorCode NEPCISSSetSizes(NEP,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool);
 PETSC_EXTERN PetscErrorCode NEPCISSGetSizes(NEP,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*);
 PETSC_EXTERN PetscErrorCode NEPCISSSetThreshold(NEP,PetscReal,PetscReal);
 PETSC_EXTERN PetscErrorCode NEPCISSGetThreshold(NEP,PetscReal*,PetscReal*);
-PETSC_EXTERN PetscErrorCode NEPCISSSetRefinement(NEP,PetscInt,PetscInt,PetscInt);
-PETSC_EXTERN PetscErrorCode NEPCISSGetRefinement(NEP,PetscInt*,PetscInt*,PetscInt*);
+PETSC_EXTERN PetscErrorCode NEPCISSSetRefinement(NEP,PetscInt,PetscInt);
+PETSC_EXTERN PetscErrorCode NEPCISSGetRefinement(NEP,PetscInt*,PetscInt*);
 
 PETSC_EXTERN PetscErrorCode NEPInterpolSetPEP(NEP,PEP);
 PETSC_EXTERN PetscErrorCode NEPInterpolGetPEP(NEP,PEP*);
 PETSC_EXTERN PetscErrorCode NEPInterpolSetDegree(NEP,PetscInt);
 PETSC_EXTERN PetscErrorCode NEPInterpolGetDegree(NEP,PetscInt*);
 
+PETSC_EXTERN PetscErrorCode NEPNLEIGSSetSingularitiesFunction(NEP,PetscErrorCode (*)(NEP,PetscInt*,PetscScalar*,void*),void*);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetSingularitiesFunction(NEP,PetscErrorCode (**)(NEP,PetscInt*,PetscScalar*,void*),void **);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSSetRestart(NEP,PetscReal);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetRestart(NEP,PetscReal*);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSSetLocking(NEP,PetscBool);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetLocking(NEP,PetscBool*);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSSetInterpolation(NEP,PetscReal,PetscInt);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetInterpolation(NEP,PetscReal*,PetscInt*);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSSetTrueResidual(NEP,PetscBool);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetTrueResidual(NEP,PetscBool*);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSSetRKShifts(NEP,PetscInt,PetscScalar*);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetRKShifts(NEP,PetscInt*,PetscScalar**);
+PETSC_EXTERN PetscErrorCode NEPNLEIGSGetKSPs(NEP,KSP**);
+
 #endif
 
diff --git a/include/slepcnep.h.html b/include/slepcnep.h.html
index 7a779f2..775ce3e 100644
--- a/include/slepcnep.h.html
+++ b/include/slepcnep.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcnep.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:34+00:00">
+<meta name="date" content="2016-05-16T10:34:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcnep.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcnep.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   User interface for SLEPc's nonlinear eigenvalue solvers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -62,184 +62,255 @@
 <a name="line52"> 52: </a><strong><font color="#228B22">#define NEPNARNOLDI  </font><font color="#666666">"narnoldi"</font><font color="#228B22"></font></strong>
 <a name="line53"> 53: </a><strong><font color="#228B22">#define NEPCISS      </font><font color="#666666">"ciss"</font><font color="#228B22"></font></strong>
 <a name="line54"> 54: </a><strong><font color="#228B22">#define NEPINTERPOL  </font><font color="#666666">"interpol"</font><font color="#228B22"></font></strong>
-
-<a name="line56"> 56: </a><font color="#B22222">/* Logging support */</font>
-<a name="line57"> 57: </a>PETSC_EXTERN PetscClassId NEP_CLASSID;
-
-<a name="line59"> 59: </a><font color="#B22222">/*E</font>
-<a name="line60"> 60: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a> - Determines which part of the spectrum is requested</font>
-
-<a name="line62"> 62: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line64"> 64: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(), <a href="../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>()</font>
-<a name="line65"> 65: </a><font color="#B22222">E*/</font>
-<a name="line66"> 66: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_LARGEST_MAGNITUDE=1,
-<a name="line67"> 67: </a>               NEP_SMALLEST_MAGNITUDE,
-<a name="line68"> 68: </a>               NEP_LARGEST_REAL,
-<a name="line69"> 69: </a>               NEP_SMALLEST_REAL,
-<a name="line70"> 70: </a>               NEP_LARGEST_IMAGINARY,
-<a name="line71"> 71: </a>               NEP_SMALLEST_IMAGINARY,
-<a name="line72"> 72: </a>               NEP_TARGET_MAGNITUDE,
-<a name="line73"> 73: </a>               NEP_TARGET_REAL,
-<a name="line74"> 74: </a>               NEP_TARGET_IMAGINARY} <a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>;
-
-<a name="line76"> 76: </a><font color="#B22222">/*E</font>
-<a name="line77"> 77: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> - The error type used to assess accuracy of computed solutions</font>
-
-<a name="line79"> 79: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line81"> 81: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>()</font>
-<a name="line82"> 82: </a><font color="#B22222">E*/</font>
-<a name="line83"> 83: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_ERROR_ABSOLUTE,
-<a name="line84"> 84: </a>               NEP_ERROR_RELATIVE } <a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>;
-<a name="line85"> 85: </a>PETSC_EXTERN const char *NEPErrorTypes[];
-
-<a name="line87"> 87: </a><font color="#B22222">/*E</font>
-<a name="line88"> 88: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a> - The refinement type</font>
-
-<a name="line90"> 90: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line92"> 92: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>()</font>
-<a name="line93"> 93: </a><font color="#B22222">E*/</font>
-<a name="line94"> 94: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_REFINE_NONE,
-<a name="line95"> 95: </a>               NEP_REFINE_SIMPLE,
-<a name="line96"> 96: </a>               NEP_REFINE_MULTIPLE } <a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>;
-<a name="line97"> 97: </a>PETSC_EXTERN const char *NEPRefineTypes[];
-
-<a name="line99"> 99: </a><font color="#B22222">/*E</font>
-<a name="line100">100: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> - Reason a nonlinear eigensolver was said to</font>
-<a name="line101">101: </a><font color="#B22222">         have converged or diverged</font>
-
-<a name="line103">103: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line105">105: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(), <a href="../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
-<a name="line106">106: </a><font color="#B22222">E*/</font>
-<a name="line107">107: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
-<a name="line108">108: </a>              NEP_CONVERGED_FNORM_ABS          =  2,
-<a name="line109">109: </a>              NEP_CONVERGED_FNORM_RELATIVE     =  3,
-<a name="line110">110: </a>              NEP_CONVERGED_SNORM_RELATIVE     =  4,
-<a name="line111">111: </a>              <font color="#B22222">/* diverged */</font>
-<a name="line112">112: </a>              NEP_DIVERGED_LINEAR_SOLVE        = -1,
-<a name="line113">113: </a>              NEP_DIVERGED_FUNCTION_COUNT      = -2,
-<a name="line114">114: </a>              NEP_DIVERGED_MAX_IT              = -3,
-<a name="line115">115: </a>              NEP_DIVERGED_BREAKDOWN           = -4,
-<a name="line116">116: </a>              NEP_DIVERGED_FNORM_NAN           = -5,
-<a name="line117">117: </a>              NEP_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>;
-<a name="line118">118: </a>PETSC_EXTERN const char *const*NEPConvergedReasons;
-
-<a name="line120">120: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>(MPI_Comm,<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>*)</font></strong>;
-<a name="line121">121: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>*)</font></strong>;
-<a name="line122">122: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line123">123: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>)</font></strong>;
-<a name="line124">124: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>*)</font></strong>;
-<a name="line125">125: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar)</font></strong>;
-<a name="line126">126: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar*)</font></strong>;
-<a name="line127">127: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetKSP.html#NEPSetKSP">NEPSetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP)</font></strong>;
-<a name="line128">128: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP*)</font></strong>;
-<a name="line129">129: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line130">130: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line131">131: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line132">132: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPView.html#NEPView">NEPView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
-<a name="line133">133: </a><strong><font color="#4169E1"><a name="NEPViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode NEPViewFromOptions(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)nep,obj,name);}
-<a name="line134">134: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>,PetscViewer)</font></strong>;
-<a name="line135">135: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line136">136: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
-<a name="line137">137: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line138">138: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
-<a name="line139">139: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line140">140: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
-<a name="line141">141: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-
-<a name="line143">143: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat,Mat,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void*)</font></strong>;
-<a name="line144">144: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat*,Mat*,PetscErrorCode (**)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void**)</font></strong>;
-<a name="line145">145: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void*)</font></strong>;
-<a name="line146">146: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat*,PetscErrorCode (**)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void**)</font></strong>;
-<a name="line147">147: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,Mat*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*,MatStructure)</font></strong>;
-<a name="line148">148: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,Mat*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
-<a name="line149">149: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,MatStructure*)</font></strong>;
-
-<a name="line151">151: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line152">152: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line153">153: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
-<a name="line154">154: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>*)</font></strong>;
-<a name="line155">155: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line156">156: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
-<a name="line157">157: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscReal,PetscReal,PetscInt,PetscInt)</font></strong>;
-<a name="line158">158: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscReal*,PetscReal*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line159">159: </a><strong><font color="#4169E1"><a name="NEPSetConvergenceTest"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscReal,PetscReal,PetscReal,<a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReaso [...]
-<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPConvergedDefault(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscReal,PetscReal,PetscReal,<a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>*,void*)</font></strong>;
-<a name="line161">161: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line163">163: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>,PetscInt,PetscReal,PetscInt)</font></strong>;
-<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>*,PetscInt*,PetscReal*,PetscInt*)</font></strong>;
-<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
-<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetLagPreconditioner.html#NEPGetLagPreconditioner">NEPGetLagPreconditioner</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
-<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool)</font></strong>;
-<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetConstCorrectionTol.html#NEPGetConstCorrectionTol">NEPGetConstCorrectionTol</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*)</font></strong>;
-
-<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
-<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec)</font></strong>;
-
-<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,<a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>,PetscReal*)</font></strong>;
-<a name="line174">174: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode NEPComputeRelativeError(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,NEP_ERROR_RELATIVE,r);}
-<a name="line175">175: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>() with NEP_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode NEPComputeResidualNorm(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,NEP_ERROR_ABSOLUTE,r);}
-<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscReal*)</font></strong>;
-
-<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat)</font></strong>;
-<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat)</font></strong>;
-<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Vec,Vec,Vec,Mat,Mat)</font></strong>;
-<a name="line181">181: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Vec,Vec,Vec,Mat)</font></strong>;
-<a name="line182">182: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt)</font></strong>;
-
-<a name="line184">184: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPMonitor(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt)</font></strong>;
-<a name="line185">185: </a><strong><font color="#4169E1"><a name="NEPMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
-<a name="line186">186: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,void **)</font></strong>;
-<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
-
-<a name="line190">190: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,Vec*)</font></strong>;
-<a name="line191">191: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>)</font></strong>;
-<a name="line192">192: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>*)</font></strong>;
-
-<a name="line194">194: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line195">195: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line196">196: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line197">197: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPMonitorLG(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPMonitorLGAll(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-
-<a name="line200">200: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool)</font></strong>;
-<a name="line201">201: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*)</font></strong>;
-
-<a name="line203">203: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*)</font></strong>;
-<a name="line204">204: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*)</font></strong>;
-<a name="line205">205: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*[])</font></strong>;
-
-<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *)</font></strong>;
-
-<a name="line209">209: </a>PETSC_EXTERN PetscFunctionList NEPList;
-<a name="line210">210: </a><strong><font color="#4169E1"><a name="NEPRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>);
-
-<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
-<a name="line213">213: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
-
-<a name="line215">215: </a><font color="#B22222">/* --------- options specific to particular eigensolvers -------- */</font>
-
-<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line218">218: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
-
-<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool)</font></strong>;
-<a name="line221">221: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*)</font></strong>;
-<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscReal)</font></strong>;
-<a name="line223">223: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscReal*)</font></strong>;
-<a name="line224">224: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line225">225: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-
-<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line228">228: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*)</font></strong>;
-<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
-<a name="line230">230: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
-
-<a name="line232">232: </a><font color="#A020F0">#endif</font>
+<a name="line55"> 55: </a><strong><font color="#228B22">#define NEPNLEIGS    </font><font color="#666666">"nleigs"</font><font color="#228B22"></font></strong>
+
+<a name="line57"> 57: </a><font color="#B22222">/* Logging support */</font>
+<a name="line58"> 58: </a>PETSC_EXTERN PetscClassId NEP_CLASSID;
+
+<a name="line60"> 60: </a><font color="#B22222">/*E</font>
+<a name="line61"> 61: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a> - Determines which part of the spectrum is requested</font>
+
+<a name="line63"> 63: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line65"> 65: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(), <a href="../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>()</font>
+<a name="line66"> 66: </a><font color="#B22222">E*/</font>
+<a name="line67"> 67: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_LARGEST_MAGNITUDE=1,
+<a name="line68"> 68: </a>               NEP_SMALLEST_MAGNITUDE,
+<a name="line69"> 69: </a>               NEP_LARGEST_REAL,
+<a name="line70"> 70: </a>               NEP_SMALLEST_REAL,
+<a name="line71"> 71: </a>               NEP_LARGEST_IMAGINARY,
+<a name="line72"> 72: </a>               NEP_SMALLEST_IMAGINARY,
+<a name="line73"> 73: </a>               NEP_TARGET_MAGNITUDE,
+<a name="line74"> 74: </a>               NEP_TARGET_REAL,
+<a name="line75"> 75: </a>               NEP_TARGET_IMAGINARY,
+<a name="line76"> 76: </a>               NEP_ALL,
+<a name="line77"> 77: </a>               NEP_WHICH_USER } <a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>;
+
+<a name="line79"> 79: </a><font color="#B22222">/*E</font>
+<a name="line80"> 80: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> - The error type used to assess accuracy of computed solutions</font>
+
+<a name="line82"> 82: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line84"> 84: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>()</font>
+<a name="line85"> 85: </a><font color="#B22222">E*/</font>
+<a name="line86"> 86: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_ERROR_ABSOLUTE,
+<a name="line87"> 87: </a>               NEP_ERROR_RELATIVE,
+<a name="line88"> 88: </a>               NEP_ERROR_BACKWARD } <a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>;
+<a name="line89"> 89: </a>PETSC_EXTERN const char *NEPErrorTypes[];
+
+<a name="line91"> 91: </a><font color="#B22222">/*E</font>
+<a name="line92"> 92: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a> - The refinement type</font>
+
+<a name="line94"> 94: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line96"> 96: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>()</font>
+<a name="line97"> 97: </a><font color="#B22222">E*/</font>
+<a name="line98"> 98: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_REFINE_NONE,
+<a name="line99"> 99: </a>               NEP_REFINE_SIMPLE,
+<a name="line100">100: </a>               NEP_REFINE_MULTIPLE } <a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>;
+<a name="line101">101: </a>PETSC_EXTERN const char *NEPRefineTypes[];
+
+<a name="line103">103: </a><font color="#B22222">/*E</font>
+<a name="line104">104: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a> - The scheme used for solving linear systems during iterative refinement</font>
+
+<a name="line106">106: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line108">108: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>()</font>
+<a name="line109">109: </a><font color="#B22222">E*/</font>
+<a name="line110">110: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_REFINE_SCHEME_SCHUR=1,
+<a name="line111">111: </a>               NEP_REFINE_SCHEME_MBE,
+<a name="line112">112: </a>               NEP_REFINE_SCHEME_EXPLICIT } <a href="../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a>;
+<a name="line113">113: </a>PETSC_EXTERN const char *NEPRefineSchemes[];
+
+<a name="line115">115: </a><font color="#B22222">/*E</font>
+<a name="line116">116: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a> - Determines the convergence test</font>
+
+<a name="line118">118: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line120">120: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(), <a href="../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a>()</font>
+<a name="line121">121: </a><font color="#B22222">E*/</font>
+<a name="line122">122: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_CONV_ABS,
+<a name="line123">123: </a>               NEP_CONV_REL,
+<a name="line124">124: </a>               NEP_CONV_NORM,
+<a name="line125">125: </a>               NEP_CONV_USER } <a href="../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a>;
+
+<a name="line127">127: </a><font color="#B22222">/*E</font>
+<a name="line128">128: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a> - Determines the stopping test</font>
+
+<a name="line130">130: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line132">132: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(), <a href="../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a>()</font>
+<a name="line133">133: </a><font color="#B22222">E*/</font>
+<a name="line134">134: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { NEP_STOP_BASIC,
+<a name="line135">135: </a>               NEP_STOP_USER } <a href="../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a>;
+
+<a name="line137">137: </a><font color="#B22222">/*E</font>
+<a name="line138">138: </a><font color="#B22222">    <a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> - Reason a nonlinear eigensolver was said to</font>
+<a name="line139">139: </a><font color="#B22222">         have converged or diverged</font>
+
+<a name="line141">141: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line143">143: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(), <a href="../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
+<a name="line144">144: </a><font color="#B22222">E*/</font>
+<a name="line145">145: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
+<a name="line146">146: </a>              NEP_CONVERGED_TOL                =  1,
+<a name="line147">147: </a>              NEP_CONVERGED_USER               =  2,
+<a name="line148">148: </a>              <font color="#B22222">/* diverged */</font>
+<a name="line149">149: </a>              NEP_DIVERGED_ITS                 = -1,
+<a name="line150">150: </a>              NEP_DIVERGED_BREAKDOWN           = -2,
+<a name="line151">151: </a>                    <font color="#B22222">/* unused                  = -3 */</font>
+<a name="line152">152: </a>              NEP_DIVERGED_LINEAR_SOLVE        = -4,
+<a name="line153">153: </a>              NEP_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>;
+<a name="line154">154: </a>PETSC_EXTERN const char *const*NEPConvergedReasons;
+
+<a name="line156">156: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>(MPI_Comm,<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>*)</font></strong>;
+<a name="line157">157: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>*)</font></strong>;
+<a name="line158">158: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line159">159: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>)</font></strong>;
+<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>*)</font></strong>;
+<a name="line161">161: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar)</font></strong>;
+<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar*)</font></strong>;
+<a name="line163">163: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPView.html#NEPView">NEPView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
+<a name="line167">167: </a><strong><font color="#4169E1"><a name="NEPViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode NEPViewFromOptions(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)nep,obj,name);}
+<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>,PetscViewer)</font></strong>;
+<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
+<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
+<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscViewer)</font></strong>;
+<a name="line175">175: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+
+<a name="line177">177: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat,Mat,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void*)</font></strong>;
+<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat*,Mat*,PetscErrorCode (**)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void**)</font></strong>;
+<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void*)</font></strong>;
+<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat*,PetscErrorCode (**)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void**)</font></strong>;
+<a name="line181">181: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetDerivatives.html#NEPSetDerivatives">NEPSetDerivatives</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscInt,Mat,void*),void*)</font></strong>;
+<a name="line182">182: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetDerivatives.html#NEPGetDerivatives">NEPGetDerivatives</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,Mat*,PetscErrorCode (**)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscInt,Mat,void*),void**)</font></strong>;
+<a name="line183">183: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,Mat*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*,MatStructure)</font></strong>;
+<a name="line184">184: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,Mat*,<a href="../docs/manualpages/FN/FN.html#FN">FN</a>*)</font></strong>;
+<a name="line185">185: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,MatStructure*)</font></strong>;
+
+<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line189">189: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
+<a name="line190">190: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>*)</font></strong>;
+<a name="line191">191: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line192">192: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
+<a name="line193">193: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP*)</font></strong>;
+<a name="line194">194: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscInt)</font></strong>;
+<a name="line195">195: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscInt*)</font></strong>;
+<a name="line196">196: </a><strong><font color="#4169E1"><a name="NEPSetConvergenceTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*)</font></strong>);
+<a name="line197">197: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a>)</font></strong>;
+<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetConvergenceTest.html#NEPGetConvergenceTest">NEPGetConvergenceTest</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a>*)</font></strong>;
+<a name="line199">199: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPConvergedAbsolute(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line200">200: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPConvergedRelative(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line201">201: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPConvergedNorm(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line202">202: </a><strong><font color="#4169E1"><a name="NEPSetStoppingTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason"> [...]
+<a name="line203">203: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a>)</font></strong>;
+<a name="line204">204: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetStoppingTest.html#NEPGetStoppingTest">NEPGetStoppingTest</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a>*)</font></strong>;
+<a name="line205">205: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>*,void*)</font></strong>;
+<a name="line206">206: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
+<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
+<a name="line208">208: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>,PetscInt,PetscReal,PetscInt,<a href="../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a>)</font></strong>;
+<a name="line209">209: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>*,PetscInt*,PetscReal*,PetscInt*,<a href="../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a>*)</font></strong>;
+
+<a name="line211">211: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
+<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec)</font></strong>;
+
+<a name="line214">214: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,<a href="../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>,PetscReal*)</font></strong>;
+<a name="line215">215: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode NEPComputeRelativeError(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,NEP_ERROR_RELATIVE,r);}
+<a name="line216">216: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>() with NEP_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode NEPComputeResidualNorm(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,NEP_ERROR_ABSOLUTE,r);}
+<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscReal*)</font></strong>;
+
+<a name="line219">219: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat)</font></strong>;
+<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat)</font></strong>;
+<a name="line221">221: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Vec,Vec,Vec,Mat,Mat)</font></strong>;
+<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Vec,Vec,Vec,Mat)</font></strong>;
+<a name="line223">223: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt)</font></strong>;
+
+<a name="line225">225: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPMonitor(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt)</font></strong>;
+<a name="line226">226: </a><strong><font color="#4169E1"><a name="NEPMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
+<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool)</font></strong>;
+<a name="line228">228: </a><strong><font color="#4169E1"><a name="NEPConvMonitorSetFromOptions"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html#NEPConvMonitorSetFromOptions">NEPConvMonitorSetFromOptions</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,Slepc [...]
+<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line230">230: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,void **)</font></strong>;
+<a name="line231">231: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
+
+<a name="line233">233: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,Vec*)</font></strong>;
+<a name="line234">234: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>)</font></strong>;
+<a name="line235">235: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>*)</font></strong>;
+<a name="line236">236: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*)</font></strong>;
+
+<a name="line238">238: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line239">239: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line240">240: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor)</font></strong>;
+<a name="line241">241: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPMonitorLGCreate.html#NEPMonitorLGCreate">NEPMonitorLGCreate</a>(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*)</font></strong>;
+<a name="line242">242: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPMonitorLG(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
+<a name="line243">243: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPMonitorLGAll(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
+
+<a name="line245">245: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool)</font></strong>;
+<a name="line246">246: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*)</font></strong>;
+
+<a name="line248">248: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*)</font></strong>;
+<a name="line249">249: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*)</font></strong>;
+<a name="line250">250: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,const char*[])</font></strong>;
+
+<a name="line252">252: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *)</font></strong>;
+
+<a name="line254">254: </a>PETSC_EXTERN PetscFunctionList NEPList;
+<a name="line255">255: </a><strong><font color="#4169E1"><a name="NEPRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>);
+
+<a name="line257">257: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
+<a name="line258">258: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
+
+<a name="line260">260: </a><font color="#B22222">/* --------- options specific to particular eigensolvers -------- */</font>
+
+<a name="line262">262: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIISetMaximumIterations.html#NEPRIISetMaximumIterations">NEPRIISetMaximumIterations</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
+<a name="line263">263: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIIGetMaximumIterations.html#NEPRIIGetMaximumIterations">NEPRIIGetMaximumIterations</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
+<a name="line264">264: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
+<a name="line265">265: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html#NEPRIIGetLagPreconditioner">NEPRIIGetLagPreconditioner</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
+<a name="line266">266: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html#NEPRIISetConstCorrectionTol">NEPRIISetConstCorrectionTol</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool)</font></strong>;
+<a name="line267">267: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html#NEPRIIGetConstCorrectionTol">NEPRIIGetConstCorrectionTol</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*)</font></strong>;
+<a name="line268">268: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIISetKSP.html#NEPRIISetKSP">NEPRIISetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP)</font></strong>;
+<a name="line269">269: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP*)</font></strong>;
+
+<a name="line271">271: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line272">272: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
+
+<a name="line274">274: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNArnoldiSetKSP.html#NEPNArnoldiSetKSP">NEPNArnoldiSetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP)</font></strong>;
+<a name="line275">275: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP*)</font></strong>;
+
+<a name="line277">277: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool)</font></strong>;
+<a name="line278">278: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*)</font></strong>;
+<a name="line279">279: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscReal)</font></strong>;
+<a name="line280">280: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscReal*)</font></strong>;
+<a name="line281">281: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line282">282: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*)</font></strong>;
+
+<a name="line284">284: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line285">285: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*)</font></strong>;
+<a name="line286">286: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt)</font></strong>;
+<a name="line287">287: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*)</font></strong>;
+
+<a name="line289">289: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void*)</font></strong>;
+<a name="line290">290: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html#NEPNLEIGSGetSingularitiesFunction">NEPNLEIGSGetSingularitiesFunction</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode (**)(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void **)</font></strong>;
+<a name="line291">291: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal)</font></strong>;
+<a name="line292">292: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetRestart.html#NEPNLEIGSGetRestart">NEPNLEIGSGetRestart</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*)</font></strong>;
+<a name="line293">293: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool)</font></strong>;
+<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetLocking.html#NEPNLEIGSGetLocking">NEPNLEIGSGetLocking</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*)</font></strong>;
+<a name="line295">295: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscInt)</font></strong>;
+<a name="line296">296: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html#NEPNLEIGSGetInterpolation">NEPNLEIGSGetInterpolation</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscInt*)</font></strong>;
+<a name="line297">297: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool)</font></strong>;
+<a name="line298">298: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html#NEPNLEIGSGetTrueResidual">NEPNLEIGSGetTrueResidual</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*)</font></strong>;
+<a name="line299">299: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscScalar*)</font></strong>;
+<a name="line300">300: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html#NEPNLEIGSGetRKShifts">NEPNLEIGSGetRKShifts</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar**)</font></strong>;
+<a name="line301">301: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(<a href="../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP**)</font></strong>;
+
+<a name="line303">303: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepcpep.h b/include/slepcpep.h
index 4a9026d..acebdbe 100644
--- a/include/slepcpep.h
+++ b/include/slepcpep.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -126,6 +126,18 @@ typedef enum { PEP_REFINE_NONE,
 PETSC_EXTERN const char *PEPRefineTypes[];
 
 /*E
+    PEPRefineScheme - The scheme used for solving linear systems during iterative refinement
+
+    Level: intermediate
+
+.seealso: PEPSetRefine()
+E*/
+typedef enum { PEP_REFINE_SCHEME_SCHUR=1,
+               PEP_REFINE_SCHEME_MBE,
+               PEP_REFINE_SCHEME_EXPLICIT } PEPRefineScheme;
+PETSC_EXTERN const char *PEPRefineSchemes[];
+
+/*E
     PEPExtract - The extraction type
 
     Level: intermediate
@@ -158,11 +170,38 @@ PETSC_EXTERN const char *PEPErrorTypes[];
 .seealso: PEPSetConvergenceTest(), PEPSetConvergenceTestFunction()
 E*/
 typedef enum { PEP_CONV_ABS,
-               PEP_CONV_EIG,
-               PEP_CONV_LINEAR,
+               PEP_CONV_REL,
                PEP_CONV_NORM,
                PEP_CONV_USER } PEPConv;
 
+/*E
+    PEPStop - Determines the stopping test
+
+    Level: advanced
+
+.seealso: PEPSetStoppingTest(), PEPSetStoppingTestFunction()
+E*/
+typedef enum { PEP_STOP_BASIC,
+               PEP_STOP_USER } PEPStop;
+
+/*E
+    PEPConvergedReason - Reason an eigensolver was said to
+         have converged or diverged
+
+    Level: intermediate
+
+.seealso: PEPSolve(), PEPGetConvergedReason(), PEPSetTolerances()
+E*/
+typedef enum {/* converged */
+              PEP_CONVERGED_TOL                =  1,
+              PEP_CONVERGED_USER               =  2,
+              /* diverged */
+              PEP_DIVERGED_ITS                 = -1,
+              PEP_DIVERGED_BREAKDOWN           = -2,
+              PEP_DIVERGED_SYMMETRY_LOST       = -3,
+              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;
+PETSC_EXTERN const char *const*PEPConvergedReasons;
+
 PETSC_EXTERN PetscErrorCode PEPCreate(MPI_Comm,PEP*);
 PETSC_EXTERN PetscErrorCode PEPDestroy(PEP*);
 PETSC_EXTERN PetscErrorCode PEPReset(PEP);
@@ -204,16 +243,21 @@ PETSC_EXTERN PetscErrorCode PEPGetTolerances(PEP,PetscReal*,PetscInt*);
 PETSC_EXTERN PetscErrorCode PEPSetConvergenceTestFunction(PEP,PetscErrorCode (*)(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*));
 PETSC_EXTERN PetscErrorCode PEPSetConvergenceTest(PEP,PEPConv);
 PETSC_EXTERN PetscErrorCode PEPGetConvergenceTest(PEP,PEPConv*);
-PETSC_EXTERN PetscErrorCode PEPConvergedEigRelative(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
-PETSC_EXTERN PetscErrorCode PEPConvergedLinear(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
-PETSC_EXTERN PetscErrorCode PEPConvergedNorm(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
 PETSC_EXTERN PetscErrorCode PEPConvergedAbsolute(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode PEPConvergedRelative(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode PEPConvergedNorm(PEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode PEPSetStoppingTestFunction(PEP,PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*),void*,PetscErrorCode (*)(void*));
+PETSC_EXTERN PetscErrorCode PEPSetStoppingTest(PEP,PEPStop);
+PETSC_EXTERN PetscErrorCode PEPGetStoppingTest(PEP,PEPStop*);
+PETSC_EXTERN PetscErrorCode PEPStoppingBasic(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*);
+PETSC_EXTERN PetscErrorCode PEPGetConvergedReason(PEP,PEPConvergedReason *);
+
 PETSC_EXTERN PetscErrorCode PEPSetDimensions(PEP,PetscInt,PetscInt,PetscInt);
 PETSC_EXTERN PetscErrorCode PEPGetDimensions(PEP,PetscInt*,PetscInt*,PetscInt*);
 PETSC_EXTERN PetscErrorCode PEPSetScale(PEP,PEPScale,PetscReal,Vec,Vec,PetscInt,PetscReal);
 PETSC_EXTERN PetscErrorCode PEPGetScale(PEP,PEPScale*,PetscReal*,Vec*,Vec*,PetscInt*,PetscReal*);
-PETSC_EXTERN PetscErrorCode PEPSetRefine(PEP,PEPRefine,PetscInt,PetscReal,PetscInt,PetscBool);
-PETSC_EXTERN PetscErrorCode PEPGetRefine(PEP,PEPRefine*,PetscInt*,PetscReal*,PetscInt*,PetscBool*);
+PETSC_EXTERN PetscErrorCode PEPSetRefine(PEP,PEPRefine,PetscInt,PetscReal,PetscInt,PEPRefineScheme);
+PETSC_EXTERN PetscErrorCode PEPGetRefine(PEP,PEPRefine*,PetscInt*,PetscReal*,PetscInt*,PEPRefineScheme*);
 PETSC_EXTERN PetscErrorCode PEPSetExtract(PEP,PEPExtract);
 PETSC_EXTERN PetscErrorCode PEPGetExtract(PEP,PEPExtract*);
 PETSC_EXTERN PetscErrorCode PEPSetBasis(PEP,PEPBasis);
@@ -228,6 +272,8 @@ PETSC_EXTERN PetscErrorCode PEPGetErrorEstimate(PEP,PetscInt,PetscReal*);
 
 PETSC_EXTERN PetscErrorCode PEPMonitor(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt);
 PETSC_EXTERN PetscErrorCode PEPMonitorSet(PEP,PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
+PETSC_EXTERN PetscErrorCode PEPMonitorSetFromOptions(PEP,const char*,const char*,const char*,PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool);
+PETSC_EXTERN PetscErrorCode PEPConvMonitorSetFromOptions(PEP,const char*,const char*,const char*,PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor));
 PETSC_EXTERN PetscErrorCode PEPMonitorCancel(PEP);
 PETSC_EXTERN PetscErrorCode PEPGetMonitorContext(PEP,void **);
 PETSC_EXTERN PetscErrorCode PEPGetIterationNumber(PEP,PetscInt*);
@@ -237,9 +283,10 @@ PETSC_EXTERN PetscErrorCode PEPSetWhichEigenpairs(PEP,PEPWhich);
 PETSC_EXTERN PetscErrorCode PEPGetWhichEigenpairs(PEP,PEPWhich*);
 PETSC_EXTERN PetscErrorCode PEPSetEigenvalueComparison(PEP,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
 
-PETSC_EXTERN PetscErrorCode PEPMonitorAll(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode PEPMonitorFirst(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode PEPMonitorConverged(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
+PETSC_EXTERN PetscErrorCode PEPMonitorAll(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode PEPMonitorFirst(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode PEPMonitorConverged(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor);
+PETSC_EXTERN PetscErrorCode PEPMonitorLGCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*);
 PETSC_EXTERN PetscErrorCode PEPMonitorLG(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
 PETSC_EXTERN PetscErrorCode PEPMonitorLGAll(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
 
@@ -250,25 +297,6 @@ PETSC_EXTERN PetscErrorCode PEPSetOptionsPrefix(PEP,const char*);
 PETSC_EXTERN PetscErrorCode PEPAppendOptionsPrefix(PEP,const char*);
 PETSC_EXTERN PetscErrorCode PEPGetOptionsPrefix(PEP,const char*[]);
 
-/*E
-    PEPConvergedReason - Reason an eigensolver was said to
-         have converged or diverged
-
-    Level: intermediate
-
-.seealso: PEPSolve(), PEPGetConvergedReason(), PEPSetTolerances()
-E*/
-typedef enum {/* converged */
-              PEP_CONVERGED_TOL                =  2,
-              /* diverged */
-              PEP_DIVERGED_ITS                 = -3,
-              PEP_DIVERGED_BREAKDOWN           = -4,
-              PEP_DIVERGED_SYMMETRY_LOST       = -5,
-              PEP_CONVERGED_ITERATING          =  0} PEPConvergedReason;
-PETSC_EXTERN const char *const*PEPConvergedReasons;
-
-PETSC_EXTERN PetscErrorCode PEPGetConvergedReason(PEP,PEPConvergedReason *);
-
 PETSC_EXTERN PetscFunctionList PEPList;
 PETSC_EXTERN PetscErrorCode PEPRegister(const char[],PetscErrorCode(*)(PEP));
 
@@ -299,8 +327,6 @@ PETSC_EXTERN PetscErrorCode PEPSTOARGetLocking(PEP,PetscBool*);
 
 PETSC_EXTERN PetscErrorCode PEPJDSetRestart(PEP,PetscReal);
 PETSC_EXTERN PetscErrorCode PEPJDGetRestart(PEP,PetscReal*);
-PETSC_EXTERN PetscErrorCode PEPJDSetTolerances(PEP,PetscReal,PetscReal,PetscReal);
-PETSC_EXTERN PetscErrorCode PEPJDGetTolerances(PEP,PetscReal*,PetscReal*,PetscReal*);
 
 #endif
 
diff --git a/include/slepcpep.h.html b/include/slepcpep.h.html
index ead623f..c06b4b5 100644
--- a/include/slepcpep.h.html
+++ b/include/slepcpep.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcpep.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:33+00:00">
+<meta name="date" content="2016-05-16T10:34:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcpep.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcpep.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   User interface for SLEPc's polynomial eigenvalue solvers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -136,183 +136,209 @@
 <a name="line126">126: </a>PETSC_EXTERN const char *PEPRefineTypes[];
 
 <a name="line128">128: </a><font color="#B22222">/*E</font>
-<a name="line129">129: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a> - The extraction type</font>
+<a name="line129">129: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a> - The scheme used for solving linear systems during iterative refinement</font>
 
 <a name="line131">131: </a><font color="#B22222">    Level: intermediate</font>
 
-<a name="line133">133: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>()</font>
+<a name="line133">133: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>()</font>
 <a name="line134">134: </a><font color="#B22222">E*/</font>
-<a name="line135">135: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_EXTRACT_NONE=1,
-<a name="line136">136: </a>               PEP_EXTRACT_NORM,
-<a name="line137">137: </a>               PEP_EXTRACT_RESIDUAL,
-<a name="line138">138: </a>               PEP_EXTRACT_STRUCTURED } <a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>;
-<a name="line139">139: </a>PETSC_EXTERN const char *PEPExtractTypes[];
+<a name="line135">135: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_REFINE_SCHEME_SCHUR=1,
+<a name="line136">136: </a>               PEP_REFINE_SCHEME_MBE,
+<a name="line137">137: </a>               PEP_REFINE_SCHEME_EXPLICIT } <a href="../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>;
+<a name="line138">138: </a>PETSC_EXTERN const char *PEPRefineSchemes[];
 
-<a name="line141">141: </a><font color="#B22222">/*E</font>
-<a name="line142">142: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> - The error type used to assess accuracy of computed solutions</font>
+<a name="line140">140: </a><font color="#B22222">/*E</font>
+<a name="line141">141: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a> - The extraction type</font>
 
-<a name="line144">144: </a><font color="#B22222">    Level: intermediate</font>
+<a name="line143">143: </a><font color="#B22222">    Level: intermediate</font>
 
-<a name="line146">146: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>()</font>
-<a name="line147">147: </a><font color="#B22222">E*/</font>
-<a name="line148">148: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_ERROR_ABSOLUTE,
-<a name="line149">149: </a>               PEP_ERROR_RELATIVE,
-<a name="line150">150: </a>               PEP_ERROR_BACKWARD } <a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>;
-<a name="line151">151: </a>PETSC_EXTERN const char *PEPErrorTypes[];
+<a name="line145">145: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>()</font>
+<a name="line146">146: </a><font color="#B22222">E*/</font>
+<a name="line147">147: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_EXTRACT_NONE=1,
+<a name="line148">148: </a>               PEP_EXTRACT_NORM,
+<a name="line149">149: </a>               PEP_EXTRACT_RESIDUAL,
+<a name="line150">150: </a>               PEP_EXTRACT_STRUCTURED } <a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>;
+<a name="line151">151: </a>PETSC_EXTERN const char *PEPExtractTypes[];
 
 <a name="line153">153: </a><font color="#B22222">/*E</font>
-<a name="line154">154: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a> - Determines the convergence test</font>
+<a name="line154">154: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> - The error type used to assess accuracy of computed solutions</font>
 
 <a name="line156">156: </a><font color="#B22222">    Level: intermediate</font>
 
-<a name="line158">158: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>()</font>
+<a name="line158">158: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>()</font>
 <a name="line159">159: </a><font color="#B22222">E*/</font>
-<a name="line160">160: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_CONV_ABS,
-<a name="line161">161: </a>               PEP_CONV_EIG,
-<a name="line162">162: </a>               PEP_CONV_LINEAR,
-<a name="line163">163: </a>               PEP_CONV_NORM,
-<a name="line164">164: </a>               PEP_CONV_USER } <a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>;
-
-<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(MPI_Comm,<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*)</font></strong>;
-<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*)</font></strong>;
-<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPReset.html#PEPReset">PEPReset</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>)</font></strong>;
-<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>*)</font></strong>;
-<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>)</font></strong>;
-<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>*)</font></strong>;
-<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,Mat[])</font></strong>;
-<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,Mat*)</font></strong>;
-<a name="line175">175: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
-<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar)</font></strong>;
-<a name="line177">177: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar*)</font></strong>;
-<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line181">181: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPView.html#PEPView">PEPView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
-<a name="line182">182: </a><strong><font color="#4169E1"><a name="PEPViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode PEPViewFromOptions(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)pep,obj,name);}
-<a name="line183">183: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>,PetscViewer)</font></strong>;
-<a name="line184">184: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode PEPPrintSolution(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer v) {<font color="#4169E1">return</font> <a href="../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,v);}
-<a name="line185">185: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line186">186: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
-<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
-<a name="line189">189: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line190">190: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
-<a name="line191">191: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line192">192: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line193">193: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line194">194: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
-<a name="line195">195: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>*)</font></strong>;
-<a name="line196">196: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line197">197: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
-<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>)</font></strong>;
-<a name="line199">199: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>*)</font></strong>;
-<a name="line200">200: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,KSP*)</font></strong>;
-
-<a name="line202">202: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal,PetscInt)</font></strong>;
-<a name="line203">203: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*,PetscInt*)</font></strong>;
-<a name="line204">204: </a><strong><font color="#4169E1"><a name="PEPSetConvergenceTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*)</font></strong>);
-<a name="line205">205: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>)</font></strong>;
-<a name="line206">206: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>*)</font></strong>;
-<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedEigRelative(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line208">208: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedLinear(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line209">209: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedNorm(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line210">210: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedAbsolute(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
-<a name="line211">211: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line213">213: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>,PetscReal,Vec,Vec,PetscInt,PetscReal)</font></strong>;
-<a name="line214">214: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>*,PetscReal*,Vec*,Vec*,PetscInt*,PetscReal*)</font></strong>;
-<a name="line215">215: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>,PetscInt,PetscReal,PetscInt,PetscBool)</font></strong>;
-<a name="line216">216: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>*,PetscInt*,PetscReal*,PetscInt*,PetscBool*)</font></strong>;
-<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>)</font></strong>;
-<a name="line218">218: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>*)</font></strong>;
-<a name="line219">219: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>)</font></strong>;
-<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>*)</font></strong>;
-
-<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
-<a name="line223">223: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec)</font></strong>;
-<a name="line224">224: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,<a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>,PetscReal*)</font></strong>;
-<a name="line225">225: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode PEPComputeRelativeError(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,PEP_ERROR_BACKWARD,r);}
-<a name="line226">226: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>() with PEP_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode PEPComputeResidualNorm(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,PEP_ERROR_ABSOLUTE,r);}
-<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscReal*)</font></strong>;
-
-<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPMonitor(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt)</font></strong>;
-<a name="line230">230: </a><strong><font color="#4169E1"><a name="PEPMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
-<a name="line231">231: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line232">232: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetMonitorContext.html#PEPGetMonitorContext">PEPGetMonitorContext</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,void **)</font></strong>;
-<a name="line233">233: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
-
-<a name="line235">235: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,Vec*)</font></strong>;
-<a name="line236">236: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>)</font></strong>;
-<a name="line237">237: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>*)</font></strong>;
-<a name="line238">238: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*)</font></strong>;
-
-<a name="line240">240: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line241">241: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line242">242: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line243">243: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPMonitorLG(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line244">244: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPMonitorLGAll(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
-
-<a name="line246">246: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
-<a name="line247">247: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
-
-<a name="line249">249: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*)</font></strong>;
-<a name="line250">250: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*)</font></strong>;
-<a name="line251">251: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*[])</font></strong>;
-
-<a name="line253">253: </a><font color="#B22222">/*E</font>
-<a name="line254">254: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> - Reason an eigensolver was said to</font>
-<a name="line255">255: </a><font color="#B22222">         have converged or diverged</font>
-
-<a name="line257">257: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line259">259: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(), <a href="../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>()</font>
-<a name="line260">260: </a><font color="#B22222">E*/</font>
-<a name="line261">261: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
-<a name="line262">262: </a>              PEP_CONVERGED_TOL                =  2,
-<a name="line263">263: </a>              <font color="#B22222">/* diverged */</font>
-<a name="line264">264: </a>              PEP_DIVERGED_ITS                 = -3,
-<a name="line265">265: </a>              PEP_DIVERGED_BREAKDOWN           = -4,
-<a name="line266">266: </a>              PEP_DIVERGED_SYMMETRY_LOST       = -5,
-<a name="line267">267: </a>              PEP_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>;
-<a name="line268">268: </a>PETSC_EXTERN const char *const*PEPConvergedReasons;
-
-<a name="line270">270: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> *)</font></strong>;
-
-<a name="line272">272: </a>PETSC_EXTERN PetscFunctionList PEPList;
-<a name="line273">273: </a><strong><font color="#4169E1"><a name="PEPRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPRegister.html#PEPRegister">PEPRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>);
-
-<a name="line275">275: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt)</font></strong>;
-<a name="line276">276: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt)</font></strong>;
-
-<a name="line278">278: </a><font color="#B22222">/* --------- options specific to particular eigensolvers -------- */</font>
-
-<a name="line280">280: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt)</font></strong>;
-<a name="line281">281: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
-<a name="line282">282: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
-<a name="line283">283: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
-<a name="line284">284: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line285">285: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
-
-<a name="line287">287: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
-<a name="line288">288: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
-<a name="line289">289: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
-<a name="line290">290: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
-
-<a name="line292">292: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
-<a name="line293">293: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
-<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
-<a name="line295">295: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
-
-<a name="line297">297: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
-<a name="line298">298: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
-
-<a name="line300">300: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
-<a name="line301">301: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
-<a name="line302">302: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal,PetscReal,PetscReal)</font></strong>;
-<a name="line303">303: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPJDGetTolerances.html#PEPJDGetTolerances">PEPJDGetTolerances</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
-
-<a name="line305">305: </a><font color="#A020F0">#endif</font>
+<a name="line160">160: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_ERROR_ABSOLUTE,
+<a name="line161">161: </a>               PEP_ERROR_RELATIVE,
+<a name="line162">162: </a>               PEP_ERROR_BACKWARD } <a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>;
+<a name="line163">163: </a>PETSC_EXTERN const char *PEPErrorTypes[];
+
+<a name="line165">165: </a><font color="#B22222">/*E</font>
+<a name="line166">166: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a> - Determines the convergence test</font>
+
+<a name="line168">168: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line170">170: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>()</font>
+<a name="line171">171: </a><font color="#B22222">E*/</font>
+<a name="line172">172: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_CONV_ABS,
+<a name="line173">173: </a>               PEP_CONV_REL,
+<a name="line174">174: </a>               PEP_CONV_NORM,
+<a name="line175">175: </a>               PEP_CONV_USER } <a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>;
+
+<a name="line177">177: </a><font color="#B22222">/*E</font>
+<a name="line178">178: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a> - Determines the stopping test</font>
+
+<a name="line180">180: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line182">182: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(), <a href="../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a>()</font>
+<a name="line183">183: </a><font color="#B22222">E*/</font>
+<a name="line184">184: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { PEP_STOP_BASIC,
+<a name="line185">185: </a>               PEP_STOP_USER } <a href="../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>;
+
+<a name="line187">187: </a><font color="#B22222">/*E</font>
+<a name="line188">188: </a><font color="#B22222">    <a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> - Reason an eigensolver was said to</font>
+<a name="line189">189: </a><font color="#B22222">         have converged or diverged</font>
+
+<a name="line191">191: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line193">193: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(), <a href="../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>()</font>
+<a name="line194">194: </a><font color="#B22222">E*/</font>
+<a name="line195">195: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
+<a name="line196">196: </a>              PEP_CONVERGED_TOL                =  1,
+<a name="line197">197: </a>              PEP_CONVERGED_USER               =  2,
+<a name="line198">198: </a>              <font color="#B22222">/* diverged */</font>
+<a name="line199">199: </a>              PEP_DIVERGED_ITS                 = -1,
+<a name="line200">200: </a>              PEP_DIVERGED_BREAKDOWN           = -2,
+<a name="line201">201: </a>              PEP_DIVERGED_SYMMETRY_LOST       = -3,
+<a name="line202">202: </a>              PEP_CONVERGED_ITERATING          =  0} <a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>;
+<a name="line203">203: </a>PETSC_EXTERN const char *const*PEPConvergedReasons;
+
+<a name="line205">205: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(MPI_Comm,<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*)</font></strong>;
+<a name="line206">206: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*)</font></strong>;
+<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPReset.html#PEPReset">PEPReset</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line208">208: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>)</font></strong>;
+<a name="line209">209: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>*)</font></strong>;
+<a name="line210">210: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>)</font></strong>;
+<a name="line211">211: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>*)</font></strong>;
+<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,Mat[])</font></strong>;
+<a name="line213">213: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,Mat*)</font></strong>;
+<a name="line214">214: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
+<a name="line215">215: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar)</font></strong>;
+<a name="line216">216: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar*)</font></strong>;
+<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line218">218: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line219">219: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPView.html#PEPView">PEPView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
+<a name="line221">221: </a><strong><font color="#4169E1"><a name="PEPViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode PEPViewFromOptions(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)pep,obj,name);}
+<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>,PetscViewer)</font></strong>;
+<a name="line223">223: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode PEPPrintSolution(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer v) {<font color="#4169E1">return</font> <a href="../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,v);}
+<a name="line224">224: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line225">225: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
+<a name="line226">226: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
+<a name="line228">228: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
+<a name="line230">230: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line231">231: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line232">232: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line233">233: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
+<a name="line234">234: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/RG/RG.html#RG">RG</a>*)</font></strong>;
+<a name="line235">235: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line236">236: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
+<a name="line237">237: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>)</font></strong>;
+<a name="line238">238: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/ST/ST.html#ST">ST</a>*)</font></strong>;
+<a name="line239">239: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,KSP*)</font></strong>;
+
+<a name="line241">241: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal,PetscInt)</font></strong>;
+<a name="line242">242: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*,PetscInt*)</font></strong>;
+<a name="line243">243: </a><strong><font color="#4169E1"><a name="PEPSetConvergenceTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*)</font></strong>);
+<a name="line244">244: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>)</font></strong>;
+<a name="line245">245: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>*)</font></strong>;
+<a name="line246">246: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedAbsolute(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line247">247: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedRelative(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line248">248: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPConvergedNorm(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line249">249: </a><strong><font color="#4169E1"><a name="PEPSetStoppingTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason"> [...]
+<a name="line250">250: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>)</font></strong>;
+<a name="line251">251: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>*)</font></strong>;
+<a name="line252">252: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>*,void*)</font></strong>;
+<a name="line253">253: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> *)</font></strong>;
+
+<a name="line255">255: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
+<a name="line256">256: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
+<a name="line257">257: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>,PetscReal,Vec,Vec,PetscInt,PetscReal)</font></strong>;
+<a name="line258">258: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>*,PetscReal*,Vec*,Vec*,PetscInt*,PetscReal*)</font></strong>;
+<a name="line259">259: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>,PetscInt,PetscReal,PetscInt,<a href="../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>)</font></strong>;
+<a name="line260">260: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>*,PetscInt*,PetscReal*,PetscInt*,<a href="../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>*)</font></strong>;
+<a name="line261">261: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>)</font></strong>;
+<a name="line262">262: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>*)</font></strong>;
+<a name="line263">263: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>)</font></strong>;
+<a name="line264">264: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>*)</font></strong>;
+
+<a name="line266">266: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
+<a name="line267">267: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec)</font></strong>;
+<a name="line268">268: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,<a href="../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>,PetscReal*)</font></strong>;
+<a name="line269">269: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode PEPComputeRelativeError(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,PEP_ERROR_BACKWARD,r);}
+<a name="line270">270: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>() with PEP_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode PEPComputeResidualNorm(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,PEP_ERROR_ABSOLUTE,r);}
+<a name="line271">271: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscReal*)</font></strong>;
+
+<a name="line273">273: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPMonitor(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt)</font></strong>;
+<a name="line274">274: </a><strong><font color="#4169E1"><a name="PEPMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
+<a name="line275">275: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool)</font></strong>;
+<a name="line276">276: </a><strong><font color="#4169E1"><a name="PEPConvMonitorSetFromOptions"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html#PEPConvMonitorSetFromOptions">PEPConvMonitorSetFromOptions</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,Slepc [...]
+<a name="line277">277: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line278">278: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetMonitorContext.html#PEPGetMonitorContext">PEPGetMonitorContext</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,void **)</font></strong>;
+<a name="line279">279: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
+
+<a name="line281">281: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,Vec*)</font></strong>;
+<a name="line282">282: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>)</font></strong>;
+<a name="line283">283: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>*)</font></strong>;
+<a name="line284">284: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*)</font></strong>;
+
+<a name="line286">286: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line287">287: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line288">288: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor)</font></strong>;
+<a name="line289">289: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPMonitorLGCreate.html#PEPMonitorLGCreate">PEPMonitorLGCreate</a>(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*)</font></strong>;
+<a name="line290">290: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPMonitorLG(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
+<a name="line291">291: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode PEPMonitorLGAll(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*)</font></strong>;
+
+<a name="line293">293: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
+<a name="line294">294: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
+
+<a name="line296">296: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*)</font></strong>;
+<a name="line297">297: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*)</font></strong>;
+<a name="line298">298: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,const char*[])</font></strong>;
+
+<a name="line300">300: </a>PETSC_EXTERN PetscFunctionList PEPList;
+<a name="line301">301: </a><strong><font color="#4169E1"><a name="PEPRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPRegister.html#PEPRegister">PEPRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>);
+
+<a name="line303">303: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt)</font></strong>;
+<a name="line304">304: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt)</font></strong>;
+
+<a name="line306">306: </a><font color="#B22222">/* --------- options specific to particular eigensolvers -------- */</font>
+
+<a name="line308">308: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt)</font></strong>;
+<a name="line309">309: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*)</font></strong>;
+<a name="line310">310: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
+<a name="line311">311: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
+<a name="line312">312: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line313">313: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
+
+<a name="line315">315: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
+<a name="line316">316: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
+<a name="line317">317: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
+<a name="line318">318: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
+
+<a name="line320">320: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
+<a name="line321">321: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
+<a name="line322">322: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
+<a name="line323">323: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
+
+<a name="line325">325: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool)</font></strong>;
+<a name="line326">326: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*)</font></strong>;
+
+<a name="line328">328: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
+<a name="line329">329: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a>(<a href="../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
+
+<a name="line331">331: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepcrg.h b/include/slepcrg.h
index 68e72d3..91999ec 100644
--- a/include/slepcrg.h
+++ b/include/slepcrg.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -57,6 +57,8 @@ PETSC_EXTERN PetscErrorCode RGSetComplement(RG,PetscBool);
 PETSC_EXTERN PetscErrorCode RGGetComplement(RG,PetscBool*);
 PETSC_EXTERN PetscErrorCode RGSetScale(RG,PetscReal);
 PETSC_EXTERN PetscErrorCode RGGetScale(RG,PetscReal*);
+PETSC_EXTERN PetscErrorCode RGPushScale(RG,PetscReal);
+PETSC_EXTERN PetscErrorCode RGPopScale(RG);
 PETSC_EXTERN PetscErrorCode RGCheckInside(RG,PetscInt,PetscScalar*,PetscScalar*,PetscInt*);
 PETSC_EXTERN PetscErrorCode RGComputeContour(RG,PetscInt,PetscScalar*,PetscScalar*);
 
diff --git a/include/slepcrg.h.html b/include/slepcrg.h.html
index 0918b88..0e77adf 100644
--- a/include/slepcrg.h.html
+++ b/include/slepcrg.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcrg.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:36+00:00">
+<meta name="date" content="2016-05-16T10:34:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcrg.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcrg.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -67,27 +67,29 @@
 <a name="line57"> 57: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscBool*)</font></strong>;
 <a name="line58"> 58: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal)</font></strong>;
 <a name="line59"> 59: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal*)</font></strong>;
-<a name="line60"> 60: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*,PetscInt*)</font></strong>;
-<a name="line61"> 61: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line60"> 60: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal)</font></strong>;
+<a name="line61"> 61: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>;
+<a name="line62"> 62: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*,PetscInt*)</font></strong>;
+<a name="line63"> 63: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
 
-<a name="line63"> 63: </a>PETSC_EXTERN PetscFunctionList RGList;
-<a name="line64"> 64: </a><strong><font color="#4169E1"><a name="RGRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>);
+<a name="line65"> 65: </a>PETSC_EXTERN PetscFunctionList RGList;
+<a name="line66"> 66: </a><strong><font color="#4169E1"><a name="RGRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>)</font></strong>);
 
-<a name="line66"> 66: </a><font color="#B22222">/* --------- options specific to particular regions -------- */</font>
+<a name="line68"> 68: </a><font color="#B22222">/* --------- options specific to particular regions -------- */</font>
 
-<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGEllipseSetParameters.html#RGEllipseSetParameters">RGEllipseSetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar,PetscReal,PetscReal)</font></strong>;
-<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGEllipseSetParameters.html#RGEllipseSetParameters">RGEllipseSetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar,PetscReal,PetscReal)</font></strong>;
+<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*)</font></strong>;
 
-<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal,PetscReal,PetscReal,PetscReal)</font></strong>;
-<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal,PetscReal,PetscReal,PetscReal)</font></strong>;
+<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
 
-<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
-<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGPolygonGetVertices.html#RGPolygonGetVertices">RGPolygonGetVertices</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt*,PetscScalar**,PetscScalar**)</font></strong>;
+<a name="line76"> 76: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt,PetscScalar*,PetscScalar*)</font></strong>;
+<a name="line77"> 77: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGPolygonGetVertices.html#RGPolygonGetVertices">RGPolygonGetVertices</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt*,PetscScalar**,PetscScalar**)</font></strong>;
 
-<a name="line77"> 77: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal)</font></strong>;
-<a name="line78"> 78: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line79"> 79: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal)</font></strong>;
+<a name="line80"> 80: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(<a href="../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
 
-<a name="line80"> 80: </a><font color="#A020F0">#endif</font>
+<a name="line82"> 82: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepcrgtypes.h b/include/slepcrgtypes.h
index 72054a4..b0f2e29 100644
--- a/include/slepcrgtypes.h
+++ b/include/slepcrgtypes.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepcrgtypes.h.html b/include/slepcrgtypes.h.html
index 64724ee..623c1a0 100644
--- a/include/slepcrgtypes.h.html
+++ b/include/slepcrgtypes.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcrgtypes.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:33+00:00">
+<meta name="date" content="2016-05-16T10:32:28+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcrgtypes.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcrgtypes.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/include/slepcsc.h b/include/slepcsc.h
index dbec6fd..418bfc7 100644
--- a/include/slepcsc.h
+++ b/include/slepcsc.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepcst.h b/include/slepcst.h
index f943961..18fc512 100644
--- a/include/slepcst.h
+++ b/include/slepcst.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepcst.h.html b/include/slepcst.h.html
index 4964333..2b0fdc4 100644
--- a/include/slepcst.h.html
+++ b/include/slepcst.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcst.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:35+00:00">
+<meta name="date" content="2016-05-16T10:34:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcst.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcst.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Spectral transformation module for eigenvalue problems.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/include/slepcsvd.h b/include/slepcsvd.h
index ebbdfe7..9e420f8 100644
--- a/include/slepcsvd.h
+++ b/include/slepcsvd.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -79,6 +79,27 @@ typedef enum { SVD_ERROR_ABSOLUTE,
 PETSC_EXTERN const char *SVDErrorTypes[];
 
 /*E
+    SVDConv - Determines the convergence test
+
+    Level: intermediate
+
+.seealso: SVDSetConvergenceTest(), SVDSetConvergenceTestFunction()
+E*/
+typedef enum { SVD_CONV_ABS,
+               SVD_CONV_REL,
+               SVD_CONV_USER } SVDConv;
+
+/*E
+    SVDStop - Determines the stopping test
+
+    Level: advanced
+
+.seealso: SVDSetStoppingTest(), SVDSetStoppingTestFunction()
+E*/
+typedef enum { SVD_STOP_BASIC,
+               SVD_STOP_USER } SVDStop;
+
+/*E
     SVDConvergedReason - Reason a singular value solver was said to
          have converged or diverged
 
@@ -87,10 +108,11 @@ PETSC_EXTERN const char *SVDErrorTypes[];
 .seealso: SVDSolve(), SVDGetConvergedReason(), SVDSetTolerances()
 E*/
 typedef enum {/* converged */
-              SVD_CONVERGED_TOL                =  2,
+              SVD_CONVERGED_TOL                =  1,
+              SVD_CONVERGED_USER               =  2,
               /* diverged */
-              SVD_DIVERGED_ITS                 = -3,
-              SVD_DIVERGED_BREAKDOWN           = -4,
+              SVD_DIVERGED_ITS                 = -1,
+              SVD_DIVERGED_BREAKDOWN           = -2,
               SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;
 PETSC_EXTERN const char *const*SVDConvergedReasons;
 
@@ -120,6 +142,15 @@ PETSC_EXTERN PetscErrorCode SVDGetOptionsPrefix(SVD,const char*[]);
 PETSC_EXTERN PetscErrorCode SVDSetUp(SVD);
 PETSC_EXTERN PetscErrorCode SVDSolve(SVD);
 PETSC_EXTERN PetscErrorCode SVDGetIterationNumber(SVD,PetscInt*);
+PETSC_EXTERN PetscErrorCode SVDSetConvergenceTestFunction(SVD,PetscErrorCode (*)(SVD,PetscReal,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*));
+PETSC_EXTERN PetscErrorCode SVDSetConvergenceTest(SVD,SVDConv);
+PETSC_EXTERN PetscErrorCode SVDGetConvergenceTest(SVD,SVDConv*);
+PETSC_EXTERN PetscErrorCode SVDConvergedAbsolute(SVD,PetscReal,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode SVDConvergedRelative(SVD,PetscReal,PetscReal,PetscReal*,void*);
+PETSC_EXTERN PetscErrorCode SVDSetStoppingTestFunction(SVD,PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*),void*,PetscErrorCode (*)(void*));
+PETSC_EXTERN PetscErrorCode SVDSetStoppingTest(SVD,SVDStop);
+PETSC_EXTERN PetscErrorCode SVDGetStoppingTest(SVD,SVDStop*);
+PETSC_EXTERN PetscErrorCode SVDStoppingBasic(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*);
 PETSC_EXTERN PetscErrorCode SVDGetConvergedReason(SVD,SVDConvergedReason*);
 PETSC_EXTERN PetscErrorCode SVDGetConverged(SVD,PetscInt*);
 PETSC_EXTERN PetscErrorCode SVDGetSingularTriplet(SVD,PetscInt,PetscReal*,Vec,Vec);
@@ -142,11 +173,14 @@ PETSC_EXTERN PetscErrorCode SVDReset(SVD);
 
 PETSC_EXTERN PetscErrorCode SVDMonitor(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt);
 PETSC_EXTERN PetscErrorCode SVDMonitorSet(SVD,PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
+PETSC_EXTERN PetscErrorCode SVDMonitorSetFromOptions(SVD,const char*,const char*,const char*,PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool);
+PETSC_EXTERN PetscErrorCode SVDConvMonitorSetFromOptions(SVD,const char*,const char*,const char*,PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor));
 PETSC_EXTERN PetscErrorCode SVDMonitorCancel(SVD);
 PETSC_EXTERN PetscErrorCode SVDGetMonitorContext(SVD,void **);
-PETSC_EXTERN PetscErrorCode SVDMonitorAll(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode SVDMonitorFirst(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
-PETSC_EXTERN PetscErrorCode SVDMonitorConverged(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
+PETSC_EXTERN PetscErrorCode SVDMonitorAll(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode SVDMonitorFirst(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*);
+PETSC_EXTERN PetscErrorCode SVDMonitorConverged(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor);
+PETSC_EXTERN PetscErrorCode SVDMonitorLGCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*);
 PETSC_EXTERN PetscErrorCode SVDMonitorLG(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
 PETSC_EXTERN PetscErrorCode SVDMonitorLGAll(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*);
 
diff --git a/include/slepcsvd.h.html b/include/slepcsvd.h.html
index 932f809..d45aade 100644
--- a/include/slepcsvd.h.html
+++ b/include/slepcsvd.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcsvd.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:35+00:00">
+<meta name="date" content="2016-05-16T10:34:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcsvd.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcsvd.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   User interface for SLEPc's singular value solvers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -89,100 +89,134 @@
 <a name="line79"> 79: </a>PETSC_EXTERN const char *SVDErrorTypes[];
 
 <a name="line81"> 81: </a><font color="#B22222">/*E</font>
-<a name="line82"> 82: </a><font color="#B22222">    <a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> - Reason a singular value solver was said to</font>
-<a name="line83"> 83: </a><font color="#B22222">         have converged or diverged</font>
-
-<a name="line85"> 85: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line87"> 87: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>(), <a href="../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>()</font>
-<a name="line88"> 88: </a><font color="#B22222">E*/</font>
-<a name="line89"> 89: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
-<a name="line90"> 90: </a>              SVD_CONVERGED_TOL                =  2,
-<a name="line91"> 91: </a>              <font color="#B22222">/* diverged */</font>
-<a name="line92"> 92: </a>              SVD_DIVERGED_ITS                 = -3,
-<a name="line93"> 93: </a>              SVD_DIVERGED_BREAKDOWN           = -4,
-<a name="line94"> 94: </a>              SVD_CONVERGED_ITERATING          =  0 } <a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>;
-<a name="line95"> 95: </a>PETSC_EXTERN const char *const*SVDConvergedReasons;
-
-<a name="line97"> 97: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>(MPI_Comm,<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>*)</font></strong>;
-<a name="line98"> 98: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
-<a name="line99"> 99: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
-<a name="line100">100: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line101">101: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
-<a name="line102">102: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a>)</font></strong>;
-<a name="line103">103: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a>*)</font></strong>;
-<a name="line104">104: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,Mat)</font></strong>;
-<a name="line105">105: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetOperator.html#SVDGetOperator">SVDGetOperator</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,Mat*)</font></strong>;
-<a name="line106">106: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,Vec*)</font></strong>;
-<a name="line107">107: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,Vec*)</font></strong>;
-<a name="line108">108: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
-<a name="line109">109: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
-<a name="line110">110: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
-<a name="line111">111: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
-<a name="line112">112: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscInt)</font></strong>;
-<a name="line113">113: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal*,PetscInt*)</font></strong>;
-<a name="line114">114: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>)</font></strong>;
-<a name="line115">115: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>*)</font></strong>;
-<a name="line116">116: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line117">117: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*)</font></strong>;
-<a name="line118">118: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*)</font></strong>;
-<a name="line119">119: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*[])</font></strong>;
-<a name="line120">120: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line121">121: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line122">122: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt*)</font></strong>;
-<a name="line123">123: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>*)</font></strong>;
-<a name="line124">124: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt*)</font></strong>;
-<a name="line125">125: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscReal*,Vec,Vec)</font></strong>;
-<a name="line126">126: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,<a href="../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>,PetscReal*)</font></strong>;
-<a name="line127">127: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode SVDComputeRelativeError(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,SVD_ERROR_RELATIVE,r);}
-<a name="line128">128: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>() with SVD_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode SVDComputeResidualNorms(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *r1,PetscReal *r2) {<font color="#4169E1">return</font> <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,SVD [...]
-<a name="line129">129: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDView.html#SVDView">SVDView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
-<a name="line130">130: </a><strong><font color="#4169E1"><a name="SVDViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode SVDViewFromOptions(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)svd,obj,name);}
-<a name="line131">131: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>,PetscViewer)</font></strong>;
-<a name="line132">132: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode SVDPrintSolution(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer v) {<font color="#4169E1">return</font> <a href="../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_RELATIVE,v);}
-<a name="line133">133: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line134">134: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
-<a name="line135">135: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line136">136: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
-<a name="line137">137: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line138">138: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
-<a name="line139">139: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line140">140: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>*)</font></strong>;
-<a name="line141">141: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-
-<a name="line143">143: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDMonitor(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt)</font></strong>;
-<a name="line144">144: </a><strong><font color="#4169E1"><a name="SVDMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscErrorCode (*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
-<a name="line145">145: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
-<a name="line146">146: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetMonitorContext.html#SVDGetMonitorContext">SVDGetMonitorContext</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,void **)</font></strong>;
-<a name="line147">147: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line148">148: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line149">149: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line150">150: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDMonitorLG(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
-<a name="line151">151: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDMonitorLGAll(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
-
-<a name="line153">153: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
-<a name="line154">154: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
-
-<a name="line156">156: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line157">157: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
-
-<a name="line159">159: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
-<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
-<a name="line161">161: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
-
-<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
-<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
-
-<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
-<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
-
-<a name="line170">170: </a>PETSC_EXTERN PetscFunctionList SVDList;
-<a name="line171">171: </a><strong><font color="#4169E1"><a name="SVDRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>);
-
-<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt)</font></strong>;
-
-<a name="line175">175: </a><font color="#A020F0">#endif</font>
+<a name="line82"> 82: </a><font color="#B22222">    <a href="../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a> - Determines the convergence test</font>
+
+<a name="line84"> 84: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line86"> 86: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(), <a href="../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a>()</font>
+<a name="line87"> 87: </a><font color="#B22222">E*/</font>
+<a name="line88"> 88: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { SVD_CONV_ABS,
+<a name="line89"> 89: </a>               SVD_CONV_REL,
+<a name="line90"> 90: </a>               SVD_CONV_USER } <a href="../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a>;
+
+<a name="line92"> 92: </a><font color="#B22222">/*E</font>
+<a name="line93"> 93: </a><font color="#B22222">    <a href="../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a> - Determines the stopping test</font>
+
+<a name="line95"> 95: </a><font color="#B22222">    Level: advanced</font>
+
+<a name="line97"> 97: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(), <a href="../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a>()</font>
+<a name="line98"> 98: </a><font color="#B22222">E*/</font>
+<a name="line99"> 99: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> { SVD_STOP_BASIC,
+<a name="line100">100: </a>               SVD_STOP_USER } <a href="../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a>;
+
+<a name="line102">102: </a><font color="#B22222">/*E</font>
+<a name="line103">103: </a><font color="#B22222">    <a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> - Reason a singular value solver was said to</font>
+<a name="line104">104: </a><font color="#B22222">         have converged or diverged</font>
+
+<a name="line106">106: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line108">108: </a><font color="#B22222">.seealso: <a href="../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>(), <a href="../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>()</font>
+<a name="line109">109: </a><font color="#B22222">E*/</font>
+<a name="line110">110: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {<font color="#B22222">/* converged */</font>
+<a name="line111">111: </a>              SVD_CONVERGED_TOL                =  1,
+<a name="line112">112: </a>              SVD_CONVERGED_USER               =  2,
+<a name="line113">113: </a>              <font color="#B22222">/* diverged */</font>
+<a name="line114">114: </a>              SVD_DIVERGED_ITS                 = -1,
+<a name="line115">115: </a>              SVD_DIVERGED_BREAKDOWN           = -2,
+<a name="line116">116: </a>              SVD_CONVERGED_ITERATING          =  0 } <a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>;
+<a name="line117">117: </a>PETSC_EXTERN const char *const*SVDConvergedReasons;
+
+<a name="line119">119: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>(MPI_Comm,<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>*)</font></strong>;
+<a name="line120">120: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>)</font></strong>;
+<a name="line121">121: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*,<a href="../docs/manualpages/BV/BV.html#BV">BV</a>*)</font></strong>;
+<a name="line122">122: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line123">123: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/DS/DS.html#DS">DS</a>*)</font></strong>;
+<a name="line124">124: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a>)</font></strong>;
+<a name="line125">125: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a>*)</font></strong>;
+<a name="line126">126: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,Mat)</font></strong>;
+<a name="line127">127: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetOperator.html#SVDGetOperator">SVDGetOperator</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,Mat*)</font></strong>;
+<a name="line128">128: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,Vec*)</font></strong>;
+<a name="line129">129: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,Vec*)</font></strong>;
+<a name="line130">130: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
+<a name="line131">131: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
+<a name="line132">132: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscInt)</font></strong>;
+<a name="line133">133: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt*,PetscInt*,PetscInt*)</font></strong>;
+<a name="line134">134: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscInt)</font></strong>;
+<a name="line135">135: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal*,PetscInt*)</font></strong>;
+<a name="line136">136: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>)</font></strong>;
+<a name="line137">137: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a>*)</font></strong>;
+<a name="line138">138: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line139">139: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*)</font></strong>;
+<a name="line140">140: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*)</font></strong>;
+<a name="line141">141: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*[])</font></strong>;
+<a name="line142">142: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line143">143: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line144">144: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt*)</font></strong>;
+<a name="line145">145: </a><strong><font color="#4169E1"><a name="SVDSetConvergenceTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscErrorCode (*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*)</font></strong>);
+<a name="line146">146: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a>)</font></strong>;
+<a name="line147">147: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetConvergenceTest.html#SVDGetConvergenceTest">SVDGetConvergenceTest</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a>*)</font></strong>;
+<a name="line148">148: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDConvergedAbsolute(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line149">149: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDConvergedRelative(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscReal,PetscReal*,void*)</font></strong>;
+<a name="line150">150: </a><strong><font color="#4169E1"><a name="SVDSetStoppingTestFunction"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscErrorCode (*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason"> [...]
+<a name="line151">151: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a>)</font></strong>;
+<a name="line152">152: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetStoppingTest.html#SVDGetStoppingTest">SVDGetStoppingTest</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a>*)</font></strong>;
+<a name="line153">153: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>*,void*)</font></strong>;
+<a name="line154">154: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>*)</font></strong>;
+<a name="line155">155: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt*)</font></strong>;
+<a name="line156">156: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscReal*,Vec,Vec)</font></strong>;
+<a name="line157">157: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,<a href="../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>,PetscReal*)</font></strong>;
+<a name="line158">158: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode SVDComputeRelativeError(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *r) {<font color="#4169E1">return</font> <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,SVD_ERROR_RELATIVE,r);}
+<a name="line159">159: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>() with SVD_ERROR_ABSOLUTE"</font>) PETSC_STATIC_INLINE PetscErrorCode SVDComputeResidualNorms(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *r1,PetscReal *r2) {<font color="#4169E1">return</font> <a href="../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,SVD [...]
+<a name="line160">160: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDView.html#SVDView">SVDView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
+<a name="line161">161: </a><strong><font color="#4169E1"><a name="SVDViewFromOptions"></a>PETSC_STATIC_INLINE PetscErrorCode SVDViewFromOptions(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscObject obj,const char name[])</font></strong> {<font color="#4169E1">return</font> PetscObjectViewFromOptions((PetscObject)svd,obj,name);}
+<a name="line162">162: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>,PetscViewer)</font></strong>;
+<a name="line163">163: </a>PETSC_DEPRECATED(<font color="#666666">"Use <a href="../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>()"</font>) PETSC_STATIC_INLINE PetscErrorCode SVDPrintSolution(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer v) {<font color="#4169E1">return</font> <a href="../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_RELATIVE,v);}
+<a name="line164">164: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line165">165: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
+<a name="line166">166: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line167">167: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
+<a name="line168">168: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscViewer)</font></strong>;
+<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>*)</font></strong>;
+<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+
+<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDMonitor(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt)</font></strong>;
+<a name="line175">175: </a><strong><font color="#4169E1"><a name="SVDMonitorSet"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscErrorCode (*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**)</font></strong>);
+<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool)</font></strong>;
+<a name="line177">177: </a><strong><font color="#4169E1"><a name="SVDConvMonitorSetFromOptions"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html#SVDConvMonitorSetFromOptions">SVDConvMonitorSetFromOptions</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,const char*,const char*,const char*,PetscErrorCode (*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor)</f [...]
+<a name="line178">178: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>;
+<a name="line179">179: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetMonitorContext.html#SVDGetMonitorContext">SVDGetMonitorContext</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,void **)</font></strong>;
+<a name="line180">180: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line181">181: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*)</font></strong>;
+<a name="line182">182: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor)</font></strong>;
+<a name="line183">183: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDMonitorLGCreate.html#SVDMonitorLGCreate">SVDMonitorLGCreate</a>(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*)</font></strong>;
+<a name="line184">184: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDMonitorLG(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
+<a name="line185">185: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SVDMonitorLGAll(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*)</font></strong>;
+
+<a name="line187">187: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
+<a name="line188">188: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
+
+<a name="line190">190: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line191">191: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
+
+<a name="line193">193: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
+<a name="line194">194: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
+<a name="line195">195: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line196">196: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*)</font></strong>;
+
+<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
+<a name="line199">199: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
+
+<a name="line201">201: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool)</font></strong>;
+<a name="line202">202: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*)</font></strong>;
+
+<a name="line204">204: </a>PETSC_EXTERN PetscFunctionList SVDList;
+<a name="line205">205: </a><strong><font color="#4169E1"><a name="SVDRegister"></a>PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>(const char[],PetscErrorCode(*)(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)</font></strong>);
+
+<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(<a href="../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt)</font></strong>;
+
+<a name="line209">209: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/include/slepcsys.h b/include/slepcsys.h
index e6459c1..94e484e 100644
--- a/include/slepcsys.h
+++ b/include/slepcsys.h
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -52,6 +52,13 @@
 #include <slepcsc.h>
 
 /*
+    Creation and destruction of context for monitors of type XXXMonitorConverged
+*/
+typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;
+PETSC_EXTERN PetscErrorCode SlepcConvMonitorCreate(PetscViewer,PetscViewerFormat,SlepcConvMonitor*);
+PETSC_EXTERN PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor*);
+
+/*
     Initialization of SLEPc and other system routines
 */
 PETSC_EXTERN PetscErrorCode SlepcInitialize(int*,char***,const char[],const char[]);
diff --git a/include/slepcsys.h.html b/include/slepcsys.h.html
index 9301b75..6c82d3c 100644
--- a/include/slepcsys.h.html
+++ b/include/slepcsys.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcsys.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:32+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcsys.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcsys.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This include file contains definitions of system functions. It is included</font>
 <a name="line3">  3: </a><font color="#B22222">   by all other SLEPc include files.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -62,25 +62,32 @@
 <a name="line52"> 52: </a><font color="#A020F0">#include <slepcsc.h></font>
 
 <a name="line54"> 54: </a><font color="#B22222">/*</font>
-<a name="line55"> 55: </a><font color="#B22222">    Initialization of SLEPc and other system routines</font>
+<a name="line55"> 55: </a><font color="#B22222">    Creation and destruction of context for monitors of type XXXMonitorConverged</font>
 <a name="line56"> 56: </a><font color="#B22222">*/</font>
-<a name="line57"> 57: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(int*,char***,const char[],const char[])</font></strong>;
-<a name="line58"> 58: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcInitializeNoPointers(int,char**,const char[],const char[])</font></strong>;
-<a name="line59"> 59: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</a>(void)</font></strong>;
-<a name="line60"> 60: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(void)</font></strong>;
-<a name="line61"> 61: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</a>(void)</font></strong>;
-<a name="line62"> 62: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</a>(PetscBool*)</font></strong>;
-<a name="line63"> 63: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcGetVersion.html#SlepcGetVersion">SlepcGetVersion</a>(char[],size_t)</font></strong>;
-
-<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(Mat,Mat*)</font></strong>;
-<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</a>(PetscScalar,Mat,PetscScalar,Mat,PetscScalar,Mat,PetscScalar,Mat,Mat*)</font></strong>;
-<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcCheckOrthogonality.html#SlepcCheckOrthogonality">SlepcCheckOrthogonality</a>(Vec*,PetscInt,Vec*,PetscInt,Mat,PetscViewer,PetscReal*)</font></strong>;
-<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(char*,size_t,PetscScalar,PetscBool)</font></strong>;
-<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(Vec,Vec,PetscBool,PetscReal*)</font></strong>;
-
-<a name="line71"> 71: </a>PETSC_EXTERN PetscBool SlepcInitializeCalled;
-
-<a name="line73"> 73: </a><font color="#A020F0">#endif</font>
+<a name="line57"> 57: </a><font color="#4169E1">typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;</font>
+<a name="line58"> 58: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(PetscViewer,PetscViewerFormat,SlepcConvMonitor*)</font></strong>;
+<a name="line59"> 59: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>(SlepcConvMonitor*)</font></strong>;
+
+<a name="line61"> 61: </a><font color="#B22222">/*</font>
+<a name="line62"> 62: </a><font color="#B22222">    Initialization of SLEPc and other system routines</font>
+<a name="line63"> 63: </a><font color="#B22222">*/</font>
+<a name="line64"> 64: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(int*,char***,const char[],const char[])</font></strong>;
+<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode SlepcInitializeNoPointers(int,char**,const char[],const char[])</font></strong>;
+<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</a>(void)</font></strong>;
+<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(void)</font></strong>;
+<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</a>(void)</font></strong>;
+<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</a>(PetscBool*)</font></strong>;
+<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcGetVersion.html#SlepcGetVersion">SlepcGetVersion</a>(char[],size_t)</font></strong>;
+
+<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(Mat,Mat*)</font></strong>;
+<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</a>(PetscScalar,Mat,PetscScalar,Mat,PetscScalar,Mat,PetscScalar,Mat,Mat*)</font></strong>;
+<a name="line74"> 74: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcCheckOrthogonality.html#SlepcCheckOrthogonality">SlepcCheckOrthogonality</a>(Vec*,PetscInt,Vec*,PetscInt,Mat,PetscViewer,PetscReal*)</font></strong>;
+<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(char*,size_t,PetscScalar,PetscBool)</font></strong>;
+<a name="line76"> 76: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode <a href="../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(Vec,Vec,PetscBool,PetscReal*)</font></strong>;
+
+<a name="line78"> 78: </a>PETSC_EXTERN PetscBool SlepcInitializeCalled;
+
+<a name="line80"> 80: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/include/slepcvec.h b/include/slepcvec.h
index 6fd4c05..9e3444f 100644
--- a/include/slepcvec.h
+++ b/include/slepcvec.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/include/slepcvec.h.html b/include/slepcvec.h.html
index 5d155d4..60e4b4a 100644
--- a/include/slepcvec.h.html
+++ b/include/slepcvec.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcvec.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:36+00:00">
+<meta name="date" content="2016-05-16T10:34:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcvec.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcvec.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   User interface for various vector operations added in SLEPc.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/include/slepcversion.h b/include/slepcversion.h
index 4b23313..6cd689d 100644
--- a/include/slepcversion.h
+++ b/include/slepcversion.h
@@ -3,18 +3,18 @@
 
 #define SLEPC_VERSION_RELEASE    1
 #define SLEPC_VERSION_MAJOR      3
-#define SLEPC_VERSION_MINOR      6
-#define SLEPC_VERSION_SUBMINOR   3
+#define SLEPC_VERSION_MINOR      7
+#define SLEPC_VERSION_SUBMINOR   0
 #define SLEPC_VERSION_PATCH      0
-#define SLEPC_RELEASE_DATE       "June 12, 2015"
-#define SLEPC_VERSION_DATE       "Mar 29, 2016"
+#define SLEPC_RELEASE_DATE       "May 16, 2016"
+#define SLEPC_VERSION_DATE       "May 16, 2016"
 
 #if !defined (SLEPC_VERSION_GIT)
-#define SLEPC_VERSION_GIT        "v3.6.3"
+#define SLEPC_VERSION_GIT        "v3.7"
 #endif
 
 #if !defined(SLEPC_VERSION_DATE_GIT)
-#define SLEPC_VERSION_DATE_GIT   "2016-03-29 16:49:09 +0200"
+#define SLEPC_VERSION_DATE_GIT   "2016-05-16 12:05:53 +0200"
 #endif
 
 #define SLEPC_VERSION_(MAJOR,MINOR,SUBMINOR) \
diff --git a/include/slepcversion.h.html b/include/slepcversion.h.html
index 3e555d1..48baeaa 100644
--- a/include/slepcversion.h.html
+++ b/include/slepcversion.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/include/slepcversion.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:32+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 include/slepcversion.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 include/slepcversion.h.html "><small>Report Typos and Errors</small></a></div>
 
 <a name="line4">  4: </a><strong><font color="#228B22">#define SLEPC_VERSION_RELEASE    1</font></strong>
 <a name="line5">  5: </a><strong><font color="#228B22">#define SLEPC_VERSION_MAJOR      3</font></strong>
-<a name="line6">  6: </a><strong><font color="#228B22">#define SLEPC_VERSION_MINOR      6</font></strong>
-<a name="line7">  7: </a><strong><font color="#228B22">#define SLEPC_VERSION_SUBMINOR   3</font></strong>
+<a name="line6">  6: </a><strong><font color="#228B22">#define SLEPC_VERSION_MINOR      7</font></strong>
+<a name="line7">  7: </a><strong><font color="#228B22">#define SLEPC_VERSION_SUBMINOR   0</font></strong>
 <a name="line8">  8: </a><strong><font color="#228B22">#define SLEPC_VERSION_PATCH      0</font></strong>
-<a name="line9">  9: </a><strong><font color="#228B22">#define SLEPC_RELEASE_DATE       </font><font color="#666666">"June 12, 2015"</font><font color="#228B22"></font></strong>
+<a name="line9">  9: </a><strong><font color="#228B22">#define SLEPC_RELEASE_DATE       </font><font color="#666666">"May 16, 2016"</font><font color="#228B22"></font></strong>
 <a name="line10"> 10: </a><strong><font color="#228B22">#define SLEPC_VERSION_DATE       </font><font color="#666666">"unknown"</font><font color="#228B22"></font></strong>
 
 <a name="line12"> 12: </a><font color="#A020F0">#if !defined (SLEPC_VERSION_GIT)</font>
diff --git a/lib/slepc/conf/bfort-slepc.txt b/lib/slepc/conf/bfort-slepc.txt
index f2e0df7..fb129fa 100644
--- a/lib/slepc/conf/bfort-slepc.txt
+++ b/lib/slepc/conf/bfort-slepc.txt
@@ -11,27 +11,37 @@ native EPSWhich
 native EPSBalance
 native EPSErrorType
 native EPSConv
+native EPSStop
 native EPSConvergedReason
 native EPSPowerShiftType
 native EPSLanczosReorthogType
 native EPSPRIMMEMethod
+native EPSCISSQuadRule
+native EPSCISSExtraction
 native FNCombineType
 native MFNConvergedReason
 native NEPWhich
+native NEPConv
+native NEPStop
 native NEPErrorType
 native NEPRefine
+native NEPRefineScheme
 native NEPConvergedReason
 native PEPProblemType
 native PEPWhich
 native PEPBasis
 native PEPScale
 native PEPRefine
+native PEPRefineScheme
 native PEPExtract
 native PEPErrorType
 native PEPConv
+native PEPStop
 native PEPConvergedReason
 native STMatMode
 native SVDWhich
+native SVDConv
+native SVDStop
 native SVDErrorType
 native SVDConvergedReason
 #
diff --git a/lib/slepc/conf/slepc_common b/lib/slepc/conf/slepc_common
index defa721..db048a5 100644
--- a/lib/slepc/conf/slepc_common
+++ b/lib/slepc/conf/slepc_common
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/lib/slepc/conf/slepc_rules b/lib/slepc/conf/slepc_rules
index 4c4cd51..e67eff1 100644
--- a/lib/slepc/conf/slepc_rules
+++ b/lib/slepc/conf/slepc_rules
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -42,7 +42,7 @@ slepc_manualpages:
 
 slepc_manexamples:
 	- at base=`basename ${LOCDIR}`; \
-        if [ "$${base}" = "tutorials" ] ; then \
+        if [ "$${base}" = "tutorials" -o "$${base}" = "nlevp" ] ; then \
           echo "Generating manual example links" ; \
           for i in ${EXAMPLESC} ${EXAMPLESF} foo ; do \
             if [ "$$i" != "foo" ] ; then \
@@ -50,7 +50,7 @@ slepc_manexamples:
                    -printmatch -o /dev/null | sort | uniq` ;  \
               for j in $$a ; do \
                 b=`ls ${LOC}/docs/manualpages/*/$${j}.html | cut -f9` ; \
-                l=`grep tutorials $${b} | wc -l`; \
+                l=`grep -e tutorials -e nlevp $${b} | wc -l`; \
                 if [ $$l -le 10 ] ; then \
                   if [ $$l -eq 0 ] ; then \
                     echo "<P><H3><FONT COLOR=\"#883300\">Examples</FONT></H3>" >> $$b; \
@@ -215,5 +215,11 @@ slepc_gnumake: chk_makej
 	@cd ${SLEPC_DIR} && ${OMAKE_PRINTDIR} -f gmakefile -j ${MAKE_NP} V=${V}
 	@echo "========================================="
 
+getlinklibs_slepc:
+	- at echo ${SLEPC_LIB}
+
+getincludedirs_slepc:
+	- at echo ${SLEPC_CC_INCLUDES}
+
 include ${PETSC_DIR}/lib/petsc/conf/rules
 include ${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepcrules
diff --git a/lib/slepc/conf/slepc_test b/lib/slepc/conf/slepc_test
index 39149eb..71d36ad 100644
--- a/lib/slepc/conf/slepc_test
+++ b/lib/slepc/conf/slepc_test
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -23,6 +23,7 @@ include ${PETSC_DIR}/lib/petsc/conf/test
 
 testexamples_BLOPEX: ${TESTEXAMPLES_BLOPEX}
 testexamples_C_NoF128: ${TESTEXAMPLES_C_NOF128}
+testexamples_DATAFILESPATH_Complex: ${TESTEXAMPLES_DATAFILESPATH_COMPLEX}
 
 buildexamples_BLOPEX:
 	-@${OMAKE} testexamples_BLOPEX TESTEXAMPLES_BLOPEX=`echo ${TESTEXAMPLES_BLOPEX} | sed s/runex[0-9]*[a-z0-9_]*//g`
diff --git a/lib/slepc/conf/slepc_variables b/lib/slepc/conf/slepc_variables
index 5fbaf27..2996e2c 100644
--- a/lib/slepc/conf/slepc_variables
+++ b/lib/slepc/conf/slepc_variables
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -25,11 +25,12 @@ include ${PETSC_DIR}/lib/petsc/conf/variables
 SLEPC_LIB_DIR	    = ${SLEPC_DIR}/${PETSC_ARCH}/lib
 
 SLEPC_INCLUDE       = -I${SLEPC_DIR}/include -I${SLEPC_DIR}/${PETSC_ARCH}/include
-SLEPC_CC_INCLUDES   = ${PETSC_INCLUDE} ${SLEPC_INCLUDE} ${PRIMME_FLAGS}
-SLEPC_FC_INCLUDES   = ${PETSC_INCLUDE} ${SLEPC_INCLUDE}
+SLEPC_CEXT_INCLUDES = ${PRIMME_FLAGS}
+SLEPC_CC_INCLUDES   = ${SLEPC_INCLUDE} ${SLEPC_CEXT_INCLUDES} ${PETSC_CC_INCLUDES}
+SLEPC_FC_INCLUDES   = ${SLEPC_INCLUDE} ${PETSC_FC_INCLUDES}
 
-SLEPC_CCPPFLAGS	    = ${SLEPC_CC_INCLUDES} ${PETSC_CCPPFLAGS}
-SLEPC_FCPPFLAGS	    = ${SLEPC_FC_INCLUDES} ${PETSC_FCPPFLAGS}
+SLEPC_CCPPFLAGS	    = ${SLEPC_INCLUDE} ${SLEPC_CEXT_INCLUDES} ${PETSC_CCPPFLAGS}
+SLEPC_FCPPFLAGS	    = ${SLEPC_INCLUDE} ${PETSC_FCPPFLAGS}
 SLEPC_C_SH_LIB_PATH = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR}
 SLEPC_F_SH_LIB_PATH = ${FC_LINKER_SLFLAG}${SLEPC_LIB_DIR}
 
diff --git a/makefile b/makefile
index fe1baaf..0096aac 100644
--- a/makefile
+++ b/makefile
@@ -4,7 +4,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -112,10 +112,10 @@ info: chk_makej
 	   grep "\#define " ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h; \
          fi
 	- at echo "-----------------------------------------"
-	- at echo "Using C/C++ include paths: ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES}"
+	- at echo "Using C/C++ include paths: ${SLEPC_CC_INCLUDES}"
 	- at echo "Using C/C++ compiler: ${PCC} ${PCC_FLAGS} ${COPTFLAGS} ${CFLAGS}"
 	- at if [ "${FC}" != "" ]; then \
-	   echo "Using Fortran include/module paths: ${PETSC_FC_INCLUDES}";\
+	   echo "Using Fortran include/module paths: ${SLEPC_FC_INCLUDES}";\
 	   echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\
          fi
 	- at echo "-----------------------------------------"
diff --git a/src/eps/examples/index.html b/src/eps/examples/index.html
index 566c1b4..5b1ca06 100644
--- a/src/eps/examples/index.html
+++ b/src/eps/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
 <a href="tutorials/">tutorials/</a><br>
diff --git a/src/eps/examples/makefile b/src/eps/examples/makefile
index 8971ea7..d1d5ca9 100644
--- a/src/eps/examples/makefile
+++ b/src/eps/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/examples/makefile.html b/src/eps/examples/makefile.html
index 9466458..297f19b 100644
--- a/src/eps/examples/makefile.html
+++ b/src/eps/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:22+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/examples/tests/index.html b/src/eps/examples/tests/index.html
index 34179b5..7a7cc5d 100644
--- a/src/eps/examples/tests/index.html
+++ b/src/eps/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/examples/tests/makefile b/src/eps/examples/tests/makefile
index ff780ec..1148eb1 100644
--- a/src/eps/examples/tests/makefile
+++ b/src/eps/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -138,13 +138,13 @@ runtest1_1:
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = lanczos ]; then EXTRA="-eps_lanczos_reorthog full"; else EXTRA=""; fi; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test1 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test1 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
 runtest1_2:
 	- at test=test1_2; \
-	${MPIEXEC} -np 1 ./test1  -eps_interval .1,1.1 -eps_tol 1e-10 -st_type sinvert -st_ksp_type preonly -st_pc_type cholesky 2>&1 >  $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1  -eps_interval .1,1.1 -eps_tol 1e-10 -st_type sinvert -st_ksp_type preonly -st_pc_type cholesky 2>&1 >  $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_1:
@@ -152,7 +152,7 @@ runtest2_1:
 	for eps in ${EPSALL}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test2 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test2 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -161,7 +161,7 @@ runtest3_1:
 	for eps in ${EPSALL}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test3 -eps_type $$eps -eps_nev 4 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test3 -eps_type $$eps -eps_nev 4 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -169,7 +169,7 @@ runtest4_1:
 	- at test=test4_1; \
 	for eps in ${EPSALL}; do \
 	   echo "eps type $$eps"; \
-	   ${MPIEXEC} -np 1 ./test4 -type $$eps 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test4 -type $$eps 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -180,7 +180,7 @@ runtest5_1:
 	   if [ "$$eps" = gd ]; then EXTRA="-eps_gd_minv 2"; \
 	   elif [ "$$eps" = jd ]; then EXTRA="-eps_jd_minv 2"; \
 	   elif [ "$$eps" = "gd2" ]; then eps=gd; EXTRA="-eps_gd_double_expansion"; else EXTRA=""; fi; \
-	   ${MPIEXEC} -np 1 ./test5 -eps_type $$eps -eps_nev 4 $$EXTRA >> test5_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./test5 -eps_type $$eps -eps_nev 4 $$EXTRA >> test5_1.tmp 2>&1; \
 	done; \
 	if (${GREP} USE_COMPLEX ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
 	  [ x${SAVE_OUTPUT} = xyes ] && cp test5_1.tmp output/test5_1_complex.out; \
@@ -194,7 +194,7 @@ runtest5_1:
 	${RM} -f test5_1.tmp;
 
 runtest5_blopex:
-	-@${MPIEXEC} -np 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
 	if (${DIFF} output/test5_blopex.out test5_blopex.tmp) then true; \
 	else echo "Possible problem with test5_blopex, diffs above"; fi; \
 	${RM} -f test5_blopex.tmp;
@@ -203,7 +203,7 @@ testtest5_blopex: test5.PETSc
 	@ok=0; if [ "${PETSC_WITH_BATCH}" != "" -o "${MPIEXEC}" = "/bin/false" ]; then \
            echo "Skipping BLOPEX test"; \
 	elif [ -f test5 ]; then \
-           ${MPIEXEC} -np 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
+           ${MPIEXEC} -n 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
 	   if [ "${PETSC_SCALAR}" = "complex" ]; then REFFILE=_complex; fi; \
 	   if (${DIFF} output/test5_blopex$$REFFILE.out test5_blopex.tmp > /dev/null 2>&1) then \
            echo "BLOPEX example src/eps/examples/tests/test5 run successfully with 1 MPI process"; \
@@ -219,13 +219,13 @@ runtest6_1:
 	for eps in ${EPSNS}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test6 -eps_type $$eps -eps_nev 4 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test6 -eps_type $$eps -eps_nev 4 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
 runtest7f_1:
 	- at test=test7f_1; \
-	${MPIEXEC} -np 1 ./test7f -eps_nev 4 > $${test}.tmp 2>&1; \
+	${MPIEXEC} -n 1 ./test7f -eps_nev 4 > $${test}.tmp 2>&1; \
 	${TESTCODE}
 
 testtest7f: test7f.PETSc
@@ -235,7 +235,7 @@ testtest7f: test7f.PETSc
         elif [ "${MPIEXEC}" = "/bin/false" ]; then \
            echo "*mpiexec not found*. Please run src/eps/examples/tests/test7f manually"; \
 	elif [ -f test7f ]; then \
-           GFORTRAN_UNBUFFERED_ALL=1 ${MPIEXEC} -np 1 ./test7f -eps_nev 4 > test7f_1.tmp 2>&1; \
+           GFORTRAN_UNBUFFERED_ALL=1 ${MPIEXEC} -n 1 ./test7f -eps_nev 4 > test7f_1.tmp 2>&1; \
 	   if (${DIFF} output/test7f_1.out test7f_1.tmp > /dev/null 2>&1) then \
            echo "Fortran example src/eps/examples/tests/test7f run successfully with 1 MPI process"; \
 	   else echo "Possible error running Fortran src/eps/examples/tests/test7f with 1 MPI process"; \
@@ -250,7 +250,7 @@ runtest8_1:
 	for eps in ${EPSALL}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test8 -eps_type $$eps -eps_nev 4 -eps_ncv 24 2>&1; \
+	   ${MPIEXEC} -n 1 ./test8 -eps_type $$eps -eps_nev 4 -eps_ncv 24 2>&1; \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -262,7 +262,7 @@ runtest9_1:
 	   elif [ "$$eps" = jd ]; then EXTRA="-st_ksp_type cg"; \
            else EXTRA=""; fi; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test9 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test9 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp;\
 	${TESTCODE}
 
@@ -271,7 +271,7 @@ runtest10_1:
 	for eps in ${EPSALL}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test10 -eps_type $$eps -eps_nev 4 -m 11 2>&1; \
+	   ${MPIEXEC} -n 1 ./test10 -eps_type $$eps -eps_nev 4 -m 11 2>&1; \
 	done > $${test}.tmp;\
 	${TESTCODE}
 
@@ -282,13 +282,13 @@ testtest10: test10.PETSc
         elif [ "${MPIEXEC}" = "/bin/false" ]; then \
            echo "*mpiexec not found*. Please run src/eps/examples/tests/test10 manually"; \
 	elif [ -f test10 ]; then \
-           ${MPIEXEC} -np 1 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
+           ${MPIEXEC} -n 1 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
 	   if (${DIFF} output/test10_1_ks.out test10_1.tmp > /dev/null 2>&1) then \
            echo "C/C++ example src/eps/examples/tests/test10 run successfully with 1 MPI process"; \
 	   else echo "Possible error running C/C++ src/eps/examples/tests/test10 with 1 MPI process"; \
            cat test10_1.tmp; ok=1; fi; \
 	   if [ "${MPIEXEC}" != "${PETSC_DIR}/bin/petsc-mpiexec.uni" ]; then \
-           ${MPIEXEC} -np 2 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
+           ${MPIEXEC} -n 2 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
 	   if (${DIFF} output/test10_1_ks.out test10_1.tmp > /dev/null 2>&1) then \
            echo "C/C++ example src/eps/examples/tests/test10 run successfully with 2 MPI process"; \
 	   else echo "Possible error running C/C++ src/eps/examples/tests/test10 with 2 MPI process"; \
@@ -305,7 +305,7 @@ runtest11_1:
 	   if [ "$$eps" = krylovschur -o "$$eps" = arnoldi ]; then EXTRA="-st_type sinvert"; \
 	   elif [ "$$eps" = gd ]; then EXTRA="-eps_max_it 5000"; \
 	   fi; \
-	   ${MPIEXEC} -np 1 ./test11 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test11 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp;\
 	${TESTCODE}
 
@@ -314,7 +314,7 @@ runtest12_1:
 	for eps in ${EPSNS}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test12 -eps_type $$eps -eps_nev 4 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test12 -eps_type $$eps -eps_nev 4 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -323,7 +323,7 @@ runtest13_1:
 	for eps in ${EPSAR}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test13 -eps_type $$eps -eps_max_it 5000 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test13 -eps_type $$eps -eps_max_it 5000 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -332,27 +332,27 @@ runtest13_2:
 	for eps in ${EPSAR}; do \
 	   echo "eps type $$eps"; \
 	   if [ "$$eps" = gd2 ]; then eps="gd -eps_gd_double_expansion"; fi; \
-	   ${MPIEXEC} -np 1 ./test13 -eps_type $$eps -eps_non_hermitian -eps_max_it 5000 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test13 -eps_type $$eps -eps_non_hermitian -eps_max_it 5000 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
 runtest14_1:
 	- at test=test14_1; \
-	${MPIEXEC} -np 1 ./test14 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test14 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest14f_1:
 	- at test=test14f_1; \
-	${MPIEXEC} -np 1 ./test14f 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test14f 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest15f_1:
 	- at test=test15f_1; \
-	${MPIEXEC} -np 1 ./test15f -my_eps_monitor > $${test}.tmp 2>&1; \
+	${MPIEXEC} -n 1 ./test15f -my_eps_monitor > $${test}.tmp 2>&1; \
 	${TESTCODE}
 
 runtest16_1:
 	- at test=test16_1; \
-	${MPIEXEC} -np 1 ./test16 -n 200 -eps_nev 6 -eps_ncv 24 -eps_smallest_magnitude 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test16 -n 200 -eps_nev 6 -eps_ncv 24 -eps_smallest_magnitude 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
diff --git a/src/eps/examples/tests/makefile.html b/src/eps/examples/tests/makefile.html
index eb83947..f6fe5ac 100644
--- a/src/eps/examples/tests/makefile.html
+++ b/src/eps/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:27+00:00">
+<meta name="date" content="2016-05-16T10:33:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -149,13 +149,13 @@ TESTCODE = \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = lanczos ]; then EXTRA=<font color="#666666">"-eps_lanczos_reorthog full"</font>; <font color="#4169E1">else</font> EXTRA=<font color="#666666">""</font>; fi; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test1 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test1 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest1_2:</font></strong>
 	- at test=test1_2; \
-	${MPIEXEC} -np 1 ./test1  -eps_interval .1,1.1 -eps_tol 1e-10 -st_type sinvert -st_ksp_type preonly -st_pc_type cholesky 2>&1 >  $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1  -eps_interval .1,1.1 -eps_tol 1e-10 -st_type sinvert -st_ksp_type preonly -st_pc_type cholesky 2>&1 >  $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_1:</font></strong>
@@ -163,7 +163,7 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSALL}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test2 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test2 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -172,7 +172,7 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSALL}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test3 -eps_type $$eps -eps_nev 4 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test3 -eps_type $$eps -eps_nev 4 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -180,7 +180,7 @@ TESTCODE = \
 	- at test=test4_1; \
 	<font color="#4169E1">for</font> eps in ${EPSALL}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
-	   ${MPIEXEC} -np 1 ./test4 -type $$eps 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test4 -type $$eps 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -191,7 +191,7 @@ TESTCODE = \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd ]; then EXTRA=<font color="#666666">"-eps_gd_minv 2"</font>; \
 	   elif [ <font color="#666666">"$$eps"</font> = jd ]; then EXTRA=<font color="#666666">"-eps_jd_minv 2"</font>; \
 	   elif [ <font color="#666666">"$$eps"</font> = <font color="#666666">"gd2"</font> ]; then eps=gd; EXTRA=<font color="#666666">"-eps_gd_double_expansion"</font>; <font color="#4169E1">else</font> EXTRA=<font color="#666666">""</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test5 -eps_type $$eps -eps_nev 4 $$EXTRA >> test5_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./test5 -eps_type $$eps -eps_nev 4 $$EXTRA >> test5_1.tmp 2>&1; \
 	done; \
 	<font color="#4169E1">if</font> (${GREP} USE_COMPLEX ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
 	  [ x${SAVE_OUTPUT} = xyes ] && cp test5_1.tmp output/test5_1_complex.out; \
@@ -205,7 +205,7 @@ TESTCODE = \
 	${RM} -f test5_1.tmp;
 
 <strong><font color="#FF0000">runtest5_blopex:</font></strong>
-	-@${MPIEXEC} -np 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
 	<font color="#4169E1">if</font> (${DIFF} output/test5_blopex.out test5_blopex.tmp) then true; \
 	<font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test5_blopex, diffs above"</font>; fi; \
 	${RM} -f test5_blopex.tmp;
@@ -214,7 +214,7 @@ TESTCODE = \
 	@ok=0; <font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> != <font color="#666666">""</font> -o <font color="#666666">"${MPIEXEC}"</font> = <font color="#666666">"/bin/false"</font> ]; then \
            echo <font color="#666666">"Skipping BLOPEX test"</font>; \
 	elif [ -f test5 ]; then \
-           ${MPIEXEC} -np 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
+           ${MPIEXEC} -n 1 ./test5 -symm -eps_type blopex -eps_nev 4 > test5_blopex.tmp 2>&1; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_SCALAR}"</font> = <font color="#666666">"complex"</font> ]; then REFFILE=_complex; fi; \
 	   <font color="#4169E1">if</font> (${DIFF} output/test5_blopex$$REFFILE.out test5_blopex.tmp > /dev/null 2>&1) then \
            echo <font color="#666666">"BLOPEX example src/eps/examples/tests/test5 run successfully with 1 MPI process"</font>; \
@@ -230,13 +230,13 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSNS}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test6 -eps_type $$eps -eps_nev 4 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test6 -eps_type $$eps -eps_nev 4 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest7f_1:</font></strong>
 	- at test=test7f_1; \
-	${MPIEXEC} -np 1 ./test7f -eps_nev 4 > $${test}.tmp 2>&1; \
+	${MPIEXEC} -n 1 ./test7f -eps_nev 4 > $${test}.tmp 2>&1; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">testtest7f:</font></strong> test7f.PETSc
@@ -246,7 +246,7 @@ TESTCODE = \
         elif [ <font color="#666666">"${MPIEXEC}"</font> = <font color="#666666">"/bin/false"</font> ]; then \
            echo <font color="#666666">"*mpiexec not found*. Please run src/eps/examples/tests/test7f manually"</font>; \
 	elif [ -f test7f ]; then \
-           GFORTRAN_UNBUFFERED_ALL=1 ${MPIEXEC} -np 1 ./test7f -eps_nev 4 > test7f_1.tmp 2>&1; \
+           GFORTRAN_UNBUFFERED_ALL=1 ${MPIEXEC} -n 1 ./test7f -eps_nev 4 > test7f_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/test7f_1.out test7f_1.tmp > /dev/null 2>&1) then \
            echo <font color="#666666">"Fortran example src/eps/examples/tests/test7f run successfully with 1 MPI process"</font>; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible error running Fortran src/eps/examples/tests/test7f with 1 MPI process"</font>; \
@@ -261,7 +261,7 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSALL}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test8 -eps_type $$eps -eps_nev 4 -eps_ncv 24 2>&1; \
+	   ${MPIEXEC} -n 1 ./test8 -eps_type $$eps -eps_nev 4 -eps_ncv 24 2>&1; \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -273,7 +273,7 @@ TESTCODE = \
 	   elif [ <font color="#666666">"$$eps"</font> = jd ]; then EXTRA=<font color="#666666">"-st_ksp_type cg"</font>; \
            <font color="#4169E1">else</font> EXTRA=<font color="#666666">""</font>; fi; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test9 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test9 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp;\
 	${TESTCODE}
 
@@ -282,7 +282,7 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSALL}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test10 -eps_type $$eps -eps_nev 4 -m 11 2>&1; \
+	   ${MPIEXEC} -n 1 ./test10 -eps_type $$eps -eps_nev 4 -m 11 2>&1; \
 	done > $${test}.tmp;\
 	${TESTCODE}
 
@@ -293,13 +293,13 @@ TESTCODE = \
         elif [ <font color="#666666">"${MPIEXEC}"</font> = <font color="#666666">"/bin/false"</font> ]; then \
            echo <font color="#666666">"*mpiexec not found*. Please run src/eps/examples/tests/test10 manually"</font>; \
 	elif [ -f test10 ]; then \
-           ${MPIEXEC} -np 1 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
+           ${MPIEXEC} -n 1 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/test10_1_ks.out test10_1.tmp > /dev/null 2>&1) then \
            echo <font color="#666666">"C/C++ example src/eps/examples/tests/test10 run successfully with 1 MPI process"</font>; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible error running C/C++ src/eps/examples/tests/test10 with 1 MPI process"</font>; \
            cat test10_1.tmp; ok=1; fi; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"${MPIEXEC}"</font> != <font color="#666666">"${PETSC_DIR}/bin/petsc-mpiexec.uni"</font> ]; then \
-           ${MPIEXEC} -np 2 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
+           ${MPIEXEC} -n 2 ./test10 -eps_nev 4 -eps_ncv 14 -m 11 -eps_largest_magnitude > test10_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/test10_1_ks.out test10_1.tmp > /dev/null 2>&1) then \
            echo <font color="#666666">"C/C++ example src/eps/examples/tests/test10 run successfully with 2 MPI process"</font>; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible error running C/C++ src/eps/examples/tests/test10 with 2 MPI process"</font>; \
@@ -316,7 +316,7 @@ TESTCODE = \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = krylovschur -o <font color="#666666">"$$eps"</font> = arnoldi ]; then EXTRA=<font color="#666666">"-st_type sinvert"</font>; \
 	   elif [ <font color="#666666">"$$eps"</font> = gd ]; then EXTRA=<font color="#666666">"-eps_max_it 5000"</font>; \
 	   fi; \
-	   ${MPIEXEC} -np 1 ./test11 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test11 -eps_type $$eps -eps_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp;\
 	${TESTCODE}
 
@@ -325,7 +325,7 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSNS}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test12 -eps_type $$eps -eps_nev 4 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test12 -eps_type $$eps -eps_nev 4 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -334,7 +334,7 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSAR}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test13 -eps_type $$eps -eps_max_it 5000 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test13 -eps_type $$eps -eps_max_it 5000 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
@@ -343,28 +343,28 @@ TESTCODE = \
 	<font color="#4169E1">for</font> eps in ${EPSAR}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"eps type $$eps"</font>; \
 	   <font color="#4169E1">if</font> [ <font color="#666666">"$$eps"</font> = gd2 ]; then eps=<font color="#666666">"gd -eps_gd_double_expansion"</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test13 -eps_type $$eps -eps_non_hermitian -eps_max_it 5000 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test13 -eps_type $$eps -eps_non_hermitian -eps_max_it 5000 2>&1;    \
 	done > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest14_1:</font></strong>
 	- at test=test14_1; \
-	${MPIEXEC} -np 1 ./test14 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test14 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest14f_1:</font></strong>
 	- at test=test14f_1; \
-	${MPIEXEC} -np 1 ./test14f 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test14f 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest15f_1:</font></strong>
 	- at test=test15f_1; \
-	${MPIEXEC} -np 1 ./test15f -my_eps_monitor > $${test}.tmp 2>&1; \
+	${MPIEXEC} -n 1 ./test15f -my_eps_monitor > $${test}.tmp 2>&1; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest16_1:</font></strong>
 	- at test=test16_1; \
-	${MPIEXEC} -np 1 ./test16 -n 200 -eps_nev 6 -eps_ncv 24 -eps_smallest_magnitude 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test16 -n 200 -eps_nev 6 -eps_ncv 24 -eps_smallest_magnitude 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 </pre>
diff --git a/src/eps/examples/tests/output/test14_1.out b/src/eps/examples/tests/output/test14_1.out
index 02e9920..eadd1bd 100644
--- a/src/eps/examples/tests/output/test14_1.out
+++ b/src/eps/examples/tests/output/test14_1.out
@@ -3,26 +3,26 @@ Diagonal Eigenproblem, n=20
 
 Mat Object: 1 MPI processes
   type: seqaij
-row 0: (0, 1) 
-row 1: (1, 2) 
-row 2: (2, 3) 
-row 3: (3, 4) 
-row 4: (4, 5) 
-row 5: (5, 6) 
-row 6: (6, 7) 
-row 7: (7, 8) 
-row 8: (8, 9) 
-row 9: (9, 10) 
-row 10: (10, 11) 
-row 11: (11, 12) 
-row 12: (12, 13) 
-row 13: (13, 14) 
-row 14: (14, 15) 
-row 15: (15, 16) 
-row 16: (16, 17) 
-row 17: (17, 18) 
-row 18: (18, 19) 
-row 19: (19, 20) 
+row 0: (0, 1.) 
+row 1: (1, 2.) 
+row 2: (2, 3.) 
+row 3: (3, 4.) 
+row 4: (4, 5.) 
+row 5: (5, 6.) 
+row 6: (6, 7.) 
+row 7: (7, 8.) 
+row 8: (8, 9.) 
+row 9: (9, 10.) 
+row 10: (10, 11.) 
+row 11: (11, 12.) 
+row 12: (12, 13.) 
+row 13: (13, 14.) 
+row 14: (14, 15.) 
+row 15: (15, 16.) 
+row 16: (16, 17.) 
+row 17: (17, 18.) 
+row 18: (18, 19.) 
+row 19: (19, 20.) 
  Type set to krylovschur
  Problem type before changing = 0 ... changed to 1. hermitian
  Extraction before changing = 0 ... changed to 1
@@ -33,12 +33,12 @@ row 19: (19, 20)
  Convergence test = 0
 ST Object: 1 MPI processes
   type not yet set
-  shift: 0
+  shift: 0.
   number of matrices: 1
   KSP Object:  (st_)   1 MPI processes
     type not yet set
     maximum iterations=10000, initial guess is zero
-    tolerances:  relative=1e-08, absolute=1e-50, divergence=10000
+    tolerances:  relative=1e-08, absolute=1e-50, divergence=10000.
     left preconditioning
     using DEFAULT norm type for convergence test
   PC Object:  (st_)   1 MPI processes
@@ -46,7 +46,7 @@ ST Object: 1 MPI processes
     PC has not been set up so information may be incomplete
 DS Object: 1 MPI processes
   type not yet set
- Finished - converged reason = 2, its=2
+ Finished - converged reason = 1, its=2
  All requested eigenvalues computed up to the required tolerance:
      5.00000, 4.00000, 6.00000, 3.00000
 
diff --git a/src/eps/examples/tests/output/test14f_1.out b/src/eps/examples/tests/output/test14f_1.out
index 47f1bfd..d73eb99 100644
--- a/src/eps/examples/tests/output/test14f_1.out
+++ b/src/eps/examples/tests/output/test14f_1.out
@@ -2,26 +2,26 @@
 Diagonal Eigenproblem, n = 20 (Fortran)
 Mat Object: 1 MPI processes
   type: seqaij
-row 0: (0, 1) 
-row 1: (1, 2) 
-row 2: (2, 3) 
-row 3: (3, 4) 
-row 4: (4, 5) 
-row 5: (5, 6) 
-row 6: (6, 7) 
-row 7: (7, 8) 
-row 8: (8, 9) 
-row 9: (9, 10) 
-row 10: (10, 11) 
-row 11: (11, 12) 
-row 12: (12, 13) 
-row 13: (13, 14) 
-row 14: (14, 15) 
-row 15: (15, 16) 
-row 16: (16, 17) 
-row 17: (17, 18) 
-row 18: (18, 19) 
-row 19: (19, 20) 
+row 0: (0, 1.) 
+row 1: (1, 2.) 
+row 2: (2, 3.) 
+row 3: (3, 4.) 
+row 4: (4, 5.) 
+row 5: (5, 6.) 
+row 6: (6, 7.) 
+row 7: (7, 8.) 
+row 8: (8, 9.) 
+row 9: (9, 10.) 
+row 10: (10, 11.) 
+row 11: (11, 12.) 
+row 12: (12, 13.) 
+row 13: (13, 14.) 
+row 14: (14, 15.) 
+row 15: (15, 16.) 
+row 16: (16, 17.) 
+row 17: (17, 18.) 
+row 18: (18, 19.) 
+row 19: (19, 20.) 
  Type set to krylovschur                                                                     
  Problem type before changing =  0
  ... changed to  1
@@ -35,12 +35,12 @@ row 19: (19, 20)
  Convergence test = 0
 ST Object: 1 MPI processes
   type not yet set
-  shift: 0
+  shift: 0.
   number of matrices: 1
   KSP Object:  (st_)   1 MPI processes
     type not yet set
     maximum iterations=10000, initial guess is zero
-    tolerances:  relative=1e-08, absolute=1e-35, divergence=10000
+    tolerances:  relative=1e-08, absolute=1e-35, divergence=10000.
     left preconditioning
     using DEFAULT norm type for convergence test
   PC Object:  (st_)   1 MPI processes
@@ -48,7 +48,7 @@ ST Object: 1 MPI processes
     PC has not been set up so information may be incomplete
 DS Object: 1 MPI processes
   type not yet set
- Finished - converged reason = 2, its=   2
+ Finished - converged reason = 1, its=   2
  All requested eigenvalues computed up to the required tolerance:
      5.00000, 4.00000, 6.00000, 3.00000
 
diff --git a/src/eps/examples/tests/output/test1_2.out b/src/eps/examples/tests/output/test1_2.out
index 83e7dd7..28f4b99 100644
--- a/src/eps/examples/tests/output/test1_2.out
+++ b/src/eps/examples/tests/output/test1_2.out
@@ -1,7 +1,7 @@
 
 Generalized Symmetric Eigenproblem, N=2025 (45x45 grid)
 
- All requested eigenvalues computed up to the required tolerance:
+ Found 48 eigenvalues, all of them computed up to the required tolerance:
      0.12369, 0.15282, 0.15532, 0.19855, 0.20105, 0.25744, 0.25947, 0.27505, 
      0.30293, 0.30894, 0.37736, 0.38239, 0.38822, 0.39051, 0.43542, 0.44727, 
      0.48344, 0.51036, 0.51809, 0.53715, 0.55101, 0.59457, 0.60776, 0.61641, 
diff --git a/src/eps/examples/tests/test1.c b/src/eps/examples/tests/test1.c
index 5ad9b82..99a709b 100644
--- a/src/eps/examples/tests/test1.c
+++ b/src/eps/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -36,8 +36,8 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nGeneralized Symmetric Eigenproblem, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -115,6 +115,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tests/test1.c.html b/src/eps/examples/tests/test1.c.html
index 2280f7d..8655a09 100644
--- a/src/eps/examples/tests/test1.c.html
+++ b/src/eps/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:22+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,8 +45,8 @@
 <a name="line35"> 35: </a>  PetscBool      flag;
 
 <a name="line38"> 38: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line41"> 41: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line42"> 42: </a>  N = n*m;
 <a name="line43"> 43: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nGeneralized Symmetric Eigenproblem, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
@@ -124,7 +124,7 @@
 <a name="line115">115: </a>  MatDestroy(&B);
 <a name="line116">116: </a>  VecDestroy(&v);
 <a name="line117">117: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line118">118: </a>  <font color="#4169E1">return</font> 0;
+<a name="line118">118: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line119">119: </a>}
 
 </pre>
diff --git a/src/eps/examples/tests/test10.c b/src/eps/examples/tests/test10.c
index 65b7b56..ab56c82 100644
--- a/src/eps/examples/tests/test10.c
+++ b/src/eps/examples/tests/test10.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -42,8 +42,8 @@ int main (int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nFiedler vector of a 2-D regular mesh, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -129,6 +129,6 @@ int main (int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tests/test10.c.html b/src/eps/examples/tests/test10.c.html
index d67efbd..e390dfb 100644
--- a/src/eps/examples/tests/test10.c.html
+++ b/src/eps/examples/tests/test10.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test10.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:24+00:00">
+<meta name="date" content="2016-05-16T10:33:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test10.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test10.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -51,8 +51,8 @@
 
 <a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line47"> 47: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line48"> 48: </a>  N = n*m;
 <a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nFiedler vector of a 2-D regular mesh, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
@@ -138,7 +138,7 @@
 <a name="line129">129: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line130">130: </a>  MatDestroy(&A);
 <a name="line131">131: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line132">132: </a>  <font color="#4169E1">return</font> 0;
+<a name="line132">132: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line133">133: </a>}
 
 </pre>
diff --git a/src/eps/examples/tests/test11.c b/src/eps/examples/tests/test11.c
index 9aa5cb5..47e43d0 100644
--- a/src/eps/examples/tests/test11.c
+++ b/src/eps/examples/tests/test11.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -51,10 +51,10 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   N = m*(m+1)/2;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMarkov Model, N=%D (m=%D)\n",N,m);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-target",&target,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-target",&target,NULL);CHKERRQ(ierr);
   ierr = SlepcSNPrintfScalar(str,50,target,PETSC_FALSE);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Searching closest eigenvalues to the right of %s.\n\n",str);CHKERRQ(ierr);
 
@@ -132,7 +132,7 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = VecDestroy(&v0);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/eps/examples/tests/test11.c.html b/src/eps/examples/tests/test11.c.html
index dade2d4..59bc06a 100644
--- a/src/eps/examples/tests/test11.c.html
+++ b/src/eps/examples/tests/test11.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test11.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:24+00:00">
+<meta name="date" content="2016-05-16T10:33:20+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test11.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test11.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -60,10 +60,10 @@
 
 <a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line55"> 55: </a>  N = m*(m+1)/2;
 <a name="line56"> 56: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov Model, N=%D (m=%D)\n"</font>,N,m);
-<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-target"</font>,&target,NULL);
+<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-target"</font>,&target,NULL);
 <a name="line58"> 58: </a>  <a href="../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,target,PETSC_FALSE);
 <a name="line59"> 59: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Searching closest eigenvalues to the right of %s.\n\n"</font>,str);
 
@@ -141,7 +141,7 @@
 <a name="line132">132: </a>  MatDestroy(&A);
 <a name="line133">133: </a>  VecDestroy(&v0);
 <a name="line134">134: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line135">135: </a>  <font color="#4169E1">return</font> 0;
+<a name="line135">135: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line136">136: </a>}
 
 <a name="line140">140: </a><font color="#B22222">/*</font>
diff --git a/src/eps/examples/tests/test12.c b/src/eps/examples/tests/test12.c
index c49cddb..4aa1c91 100644
--- a/src/eps/examples/tests/test12.c
+++ b/src/eps/examples/tests/test12.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -54,7 +54,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nDiagonal Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
 
   ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr);
@@ -87,7 +87,7 @@ int main(int argc,char **argv)
   ierr = MatCreateVecs(A,&v0,NULL);CHKERRQ(ierr);
   ierr = PetscRandomCreate(PETSC_COMM_WORLD,&rand);CHKERRQ(ierr);
   ierr = PetscRandomSetFromOptions(rand);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-seed",&seed,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-seed",&seed,NULL);CHKERRQ(ierr);
   ierr = PetscRandomSetSeed(rand,seed);CHKERRQ(ierr);
   ierr = PetscRandomSeed(rand);CHKERRQ(ierr);
   ierr = VecSetRandom(v0,rand);CHKERRQ(ierr);
@@ -104,5 +104,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&v0);CHKERRQ(ierr);
   ierr = PetscRandomDestroy(&rand);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test12.c.html b/src/eps/examples/tests/test12.c.html
index cddea1d..b638632 100644
--- a/src/eps/examples/tests/test12.c.html
+++ b/src/eps/examples/tests/test12.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test12.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:25+00:00">
+<meta name="date" content="2016-05-16T10:33:20+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test12.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test12.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -59,7 +59,7 @@
 
 <a name="line55"> 55: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line57"> 57: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line57"> 57: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line58"> 58: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nDiagonal Eigenproblem, n=%D\n\n"</font>,n);
 
 <a name="line60"> 60: </a>  MatCreate(PETSC_COMM_WORLD,&A);
@@ -92,7 +92,7 @@
 <a name="line87"> 87: </a>  MatCreateVecs(A,&v0,NULL);
 <a name="line88"> 88: </a>  PetscRandomCreate(PETSC_COMM_WORLD,&rand);
 <a name="line89"> 89: </a>  PetscRandomSetFromOptions(rand);
-<a name="line90"> 90: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-seed"</font>,&seed,NULL);
+<a name="line90"> 90: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-seed"</font>,&seed,NULL);
 <a name="line91"> 91: </a>  PetscRandomSetSeed(rand,seed);
 <a name="line92"> 92: </a>  PetscRandomSeed(rand);
 <a name="line93"> 93: </a>  VecSetRandom(v0,rand);
@@ -109,7 +109,7 @@
 <a name="line104">104: </a>  VecDestroy(&v0);
 <a name="line105">105: </a>  PetscRandomDestroy(&rand);
 <a name="line106">106: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line107">107: </a>  <font color="#4169E1">return</font> 0;
+<a name="line107">107: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line108">108: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test13.c b/src/eps/examples/tests/test13.c
index ba72da1..ed58553 100644
--- a/src/eps/examples/tests/test13.c
+++ b/src/eps/examples/tests/test13.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -51,7 +51,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nTridiagonal with zero diagonal, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -107,5 +107,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&sxi);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test13.c.html b/src/eps/examples/tests/test13.c.html
index 05cc153..48fe479 100644
--- a/src/eps/examples/tests/test13.c.html
+++ b/src/eps/examples/tests/test13.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test13.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:25+00:00">
+<meta name="date" content="2016-05-16T10:33:20+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test13.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test13.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -57,7 +57,7 @@
 
 <a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line55"> 55: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nTridiagonal with zero diagonal, n=%D\n\n"</font>,n);
 
 <a name="line57"> 57: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -113,7 +113,7 @@
 <a name="line107">107: </a>  VecDestroy(&sxi);
 <a name="line108">108: </a>  MatDestroy(&A);
 <a name="line109">109: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line110">110: </a>  <font color="#4169E1">return</font> 0;
+<a name="line110">110: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line111">111: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test14.c b/src/eps/examples/tests/test14.c
index 86bc3f4..fe38461 100644
--- a/src/eps/examples/tests/test14.c
+++ b/src/eps/examples/tests/test14.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,6 +44,7 @@ int main(int argc,char **argv)
   EPSConv            conv;
   EPSProblemType     ptype;
   PetscErrorCode     ierr;
+  PetscViewerAndFormat *vf;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nDiagonal Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
@@ -111,7 +112,8 @@ int main(int argc,char **argv)
   ierr = EPSGetConvergenceTest(eps,&conv);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD," Convergence test = %d\n",(int)conv);CHKERRQ(ierr);
 
-  ierr = EPSMonitorSet(eps,EPSMonitorFirst,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
+  ierr = EPSMonitorSet(eps,(PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))EPSMonitorFirst,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
   ierr = EPSMonitorCancel(eps);CHKERRQ(ierr);
 
   ierr = EPSGetST(eps,&st);CHKERRQ(ierr);
@@ -134,5 +136,5 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test14.c.html b/src/eps/examples/tests/test14.c.html
index d88fd54..22f9505 100644
--- a/src/eps/examples/tests/test14.c.html
+++ b/src/eps/examples/tests/test14.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test14.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:25+00:00">
+<meta name="date" content="2016-05-16T10:33:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test14.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test14.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -54,98 +54,100 @@
 <a name="line44"> 44: </a>  <a href="../../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>            conv;
 <a name="line45"> 45: </a>  <a href="../../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>     ptype;
 <a name="line46"> 46: </a>  PetscErrorCode     ierr;
-
-<a name="line48"> 48: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nDiagonal Eigenproblem, n=%D\n\n"</font>,n);
-
-<a name="line51"> 51: </a>  MatCreate(PETSC_COMM_WORLD,&A);
-<a name="line52"> 52: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n);
-<a name="line53"> 53: </a>  MatSetFromOptions(A);
-<a name="line54"> 54: </a>  MatSetUp(A);
-<a name="line55"> 55: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
-<a name="line56"> 56: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
-<a name="line57"> 57: </a>    MatSetValue(A,i,i,i+1,INSERT_VALUES);
-<a name="line58"> 58: </a>  }
-<a name="line59"> 59: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
-<a name="line60"> 60: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
-
-<a name="line62"> 62: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line63"> 63: </a><font color="#B22222">             Create eigensolver and test interface functions</font>
-<a name="line64"> 64: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-<a name="line65"> 65: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
-<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,NULL);
-<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&B,NULL);
-<a name="line68"> 68: </a>  MatView(B,NULL);
-
-<a name="line70"> 70: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSKRYLOVSCHUR);
-<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
-<a name="line72"> 72: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Type set to %s\n"</font>,type);
-
-<a name="line74"> 74: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,&ptype);
-<a name="line75"> 75: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Problem type before changing = %d"</font>,(int)ptype);
-<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP);
-<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,&ptype);
-<a name="line78"> 78: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" ... changed to %d."</font>,(int)ptype);
-<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(eps,&flg);
-<a name="line80"> 80: </a>  <font color="#4169E1">if</font> (flg) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" generalized"</font>); }
-<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(eps,&flg);
-<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (flg) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" hermitian"</font>); }
-<a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(eps,&flg);
-<a name="line84"> 84: </a>  <font color="#4169E1">if</font> (flg) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" positive"</font>); }
-
-<a name="line86"> 86: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,&extr);
-<a name="line87"> 87: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n Extraction before changing = %d"</font>,(int)extr);
-<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC);
-<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,&extr);
-<a name="line90"> 90: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" ... changed to %d\n"</font>,(int)extr);
-
-<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(eps,EPS_BALANCE_ONESIDE,8,1e-6);
-<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(eps,&bal,&its,&cut);
-<a name="line94"> 94: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Balance: %s, its=%D, cutoff=%g\n"</font>,EPSBalanceTypes[bal],its,(double)cut);
-
-<a name="line96"> 96: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,4.8);
-<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(eps,&target);
-<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE);
-<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(eps,&which);
-<a name="line100">100: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Which = %d, target = %g\n"</font>,(int)which,(double)PetscRealPart(target));
-
-<a name="line102">102: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,4,PETSC_DEFAULT,PETSC_DEFAULT);
-<a name="line103">103: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,&nev,&ncv,&mpd);
-<a name="line104">104: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Dimensions: nev=%D, ncv=%D, mpd=%D\n"</font>,nev,ncv,mpd);
-
-<a name="line106">106: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,2.2e-4,200);
-<a name="line107">107: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,&tol,&its);
-<a name="line108">108: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Tolerance = %.5f, max_its = %D\n"</font>,(double)tol,its);
-
-<a name="line110">110: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_ABS);
-<a name="line111">111: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(eps,&conv);
-<a name="line112">112: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Convergence test = %d\n"</font>,(int)conv);
-
-<a name="line114">114: </a>  <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,<a href="../../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>,NULL,NULL);
-<a name="line115">115: </a>  <a href="../../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(eps);
-
-<a name="line117">117: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
-<a name="line118">118: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&ksp);
-<a name="line119">119: </a>  KSPSetTolerances(ksp,1e-8,1e-50,PETSC_DEFAULT,PETSC_DEFAULT);
-<a name="line120">120: </a>  <a href="../../../../docs/manualpages/ST/STView.html#STView">STView</a>(st,NULL);
-<a name="line121">121: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&ds);
-<a name="line122">122: </a>  <a href="../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,NULL);
-
-<a name="line124">124: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
-<a name="line125">125: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
-<a name="line126">126: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(eps,&reason);
-<a name="line127">127: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,&its);
-<a name="line128">128: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Finished - converged reason = %d, its=%D\n"</font>,(int)reason,its);
-
-<a name="line130">130: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line131">131: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line132">132: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-<a name="line133">133: </a>  <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
-<a name="line134">134: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
-<a name="line135">135: </a>  MatDestroy(&A);
-<a name="line136">136: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line137">137: </a>  <font color="#4169E1">return</font> 0;
-<a name="line138">138: </a>}
+<a name="line47"> 47: </a>  PetscViewerAndFormat *vf;
+
+<a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line50"> 50: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nDiagonal Eigenproblem, n=%D\n\n"</font>,n);
+
+<a name="line52"> 52: </a>  MatCreate(PETSC_COMM_WORLD,&A);
+<a name="line53"> 53: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line54"> 54: </a>  MatSetFromOptions(A);
+<a name="line55"> 55: </a>  MatSetUp(A);
+<a name="line56"> 56: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
+<a name="line57"> 57: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line58"> 58: </a>    MatSetValue(A,i,i,i+1,INSERT_VALUES);
+<a name="line59"> 59: </a>  }
+<a name="line60"> 60: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
+<a name="line61"> 61: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
+
+<a name="line63"> 63: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line64"> 64: </a><font color="#B22222">             Create eigensolver and test interface functions</font>
+<a name="line65"> 65: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
+<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,NULL);
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&B,NULL);
+<a name="line69"> 69: </a>  MatView(B,NULL);
+
+<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSKRYLOVSCHUR);
+<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
+<a name="line73"> 73: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Type set to %s\n"</font>,type);
+
+<a name="line75"> 75: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,&ptype);
+<a name="line76"> 76: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Problem type before changing = %d"</font>,(int)ptype);
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP);
+<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,&ptype);
+<a name="line79"> 79: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" ... changed to %d."</font>,(int)ptype);
+<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(eps,&flg);
+<a name="line81"> 81: </a>  <font color="#4169E1">if</font> (flg) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" generalized"</font>); }
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(eps,&flg);
+<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (flg) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" hermitian"</font>); }
+<a name="line84"> 84: </a>  <a href="../../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(eps,&flg);
+<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (flg) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" positive"</font>); }
+
+<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,&extr);
+<a name="line88"> 88: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n Extraction before changing = %d"</font>,(int)extr);
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC);
+<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,&extr);
+<a name="line91"> 91: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" ... changed to %d\n"</font>,(int)extr);
+
+<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(eps,EPS_BALANCE_ONESIDE,8,1e-6);
+<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(eps,&bal,&its,&cut);
+<a name="line95"> 95: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Balance: %s, its=%D, cutoff=%g\n"</font>,EPSBalanceTypes[bal],its,(double)cut);
+
+<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,4.8);
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(eps,&target);
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE);
+<a name="line100">100: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(eps,&which);
+<a name="line101">101: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Which = %d, target = %g\n"</font>,(int)which,(double)PetscRealPart(target));
+
+<a name="line103">103: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,4,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line104">104: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,&nev,&ncv,&mpd);
+<a name="line105">105: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Dimensions: nev=%D, ncv=%D, mpd=%D\n"</font>,nev,ncv,mpd);
+
+<a name="line107">107: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,2.2e-4,200);
+<a name="line108">108: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,&tol,&its);
+<a name="line109">109: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Tolerance = %.5f, max_its = %D\n"</font>,(double)tol,its);
+
+<a name="line111">111: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_ABS);
+<a name="line112">112: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(eps,&conv);
+<a name="line113">113: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Convergence test = %d\n"</font>,(int)conv);
+
+<a name="line115">115: </a>  PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);
+<a name="line116">116: </a>  <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,(PetscErrorCode (*)(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))<a href="../../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line117">117: </a>  <a href="../../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(eps);
+
+<a name="line119">119: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
+<a name="line120">120: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&ksp);
+<a name="line121">121: </a>  KSPSetTolerances(ksp,1e-8,1e-50,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line122">122: </a>  <a href="../../../../docs/manualpages/ST/STView.html#STView">STView</a>(st,NULL);
+<a name="line123">123: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&ds);
+<a name="line124">124: </a>  <a href="../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,NULL);
+
+<a name="line126">126: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
+<a name="line127">127: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
+<a name="line128">128: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(eps,&reason);
+<a name="line129">129: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,&its);
+<a name="line130">130: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Finished - converged reason = %d, its=%D\n"</font>,(int)reason,its);
+
+<a name="line132">132: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line133">133: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line134">134: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line135">135: </a>  <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
+<a name="line136">136: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
+<a name="line137">137: </a>  MatDestroy(&A);
+<a name="line138">138: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line139">139: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line140">140: </a>}
 </pre>
 </body>
 
diff --git a/src/eps/examples/tests/test14f.F b/src/eps/examples/tests/test14f.F
index 1c1c6e7..2739385 100644
--- a/src/eps/examples/tests/test14f.F
+++ b/src/eps/examples/tests/test14f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -27,6 +27,7 @@
 #include <petsc/finclude/petscsys.h>
 #include <petsc/finclude/petscvec.h>
 #include <petsc/finclude/petscmat.h>
+#include <petsc/finclude/petscviewer.h>
 #include <slepc/finclude/slepcsys.h>
 #include <slepc/finclude/slepceps.h>
 
@@ -52,6 +53,8 @@
       EPSProblemType     ptype
       PetscMPIInt        rank
       PetscErrorCode     ierr
+      SlepcConvMonitor   ctx
+      PetscViewerAndFormat vf
 
 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !     Beginning of program
@@ -174,8 +177,14 @@
       endif
  200  format (' Convergence test =',I2)
 
-      call EPSMonitorSet(eps,EPSMONITORFIRST,PETSC_NULL_OBJECT,         &
-     &                   PETSC_NULL_FUNCTION,ierr)
+      call PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,        &
+     &                   PETSC_VIEWER_DEFAULT,vf,ierr)
+      call EPSMonitorSet(eps,EPSMONITORFIRST,vf,                        &
+     &                   PetscViewerAndFormatDestroy,ierr)
+      call SlepcConvMonitorCreate(PETSC_VIEWER_STDOUT_WORLD,            &
+     &                   PETSC_VIEWER_DEFAULT,ctx,ierr)
+      call EPSMonitorSet(eps,EPSMONITORCONVERGED,ctx,                   &
+     &                   SlepcConvMonitorDestroy,ierr)
       call EPSMonitorCancel(eps,ierr)
 
       call EPSGetST(eps,st,ierr) 
diff --git a/src/eps/examples/tests/test14f.F.html b/src/eps/examples/tests/test14f.F.html
index 5510f7a..2501a40 100644
--- a/src/eps/examples/tests/test14f.F.html
+++ b/src/eps/examples/tests/test14f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test14f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:26+00:00">
+<meta name="date" content="2016-05-16T10:33:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test14f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test14f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -39,185 +39,194 @@
 <a name="line27"> 27: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
 <a name="line28"> 28: </a><font color="#A020F0">#include <petsc/finclude/petscvec.h></font>
 <a name="line29"> 29: </a><font color="#A020F0">#include <petsc/finclude/petscmat.h></font>
-<a name="line30"> 30: </a><font color="#A020F0">#include <slepc/finclude/slepcsys.h></font>
-<a name="line31"> 31: </a><font color="#A020F0">#include <slepc/finclude/slepceps.h></font>
-
-<a name="line33"> 33: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line34"> 34: </a>!     Declarations
-<a name="line35"> 35: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line36"> 36: </a>      Mat                A,B
-<a name="line37"> 37: </a>      <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>                eps
-<a name="line38"> 38: </a>      <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>                 st
-<a name="line39"> 39: </a>      KSP                ksp
-<a name="line40"> 40: </a>      <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a>                 ds
-<a name="line41"> 41: </a>      PetscReal          cut,tol,tolabs
-<a name="line42"> 42: </a>      PetscScalar        tget,value
-<a name="line43"> 43: </a>      PetscInt           n,i,its,Istart,Iend
-<a name="line44"> 44: </a>      PetscInt           nev,ncv,mpd
-<a name="line45"> 45: </a>      PetscBool          flg
-<a name="line46"> 46: </a>      <a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> reason
-<a name="line47"> 47: </a>      <a href="../../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>            tname
-<a name="line48"> 48: </a>      <a href="../../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>      extr
-<a name="line49"> 49: </a>      <a href="../../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>         bal
-<a name="line50"> 50: </a>      <a href="../../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>           which
-<a name="line51"> 51: </a>      <a href="../../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>            conv
-<a name="line52"> 52: </a>      <a href="../../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>     ptype
-<a name="line53"> 53: </a>      PetscMPIInt        rank
-<a name="line54"> 54: </a>      PetscErrorCode     ierr
-
-<a name="line56"> 56: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-<a name="line57"> 57: </a>!     Beginning of program
-<a name="line58"> 58: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line60"> 60: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
-<a name="line61"> 61: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
-<a name="line62"> 62: </a>      n = 20
-<a name="line63"> 63: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line64"> 64: </a>        write(*,100) n
-<a name="line65"> 65: </a>      endif
-<a name="line66"> 66: </a> 100  format (/'Diagonal Eigenproblem, n =',I3,' (Fortran)')
-
-<a name="line68"> 68: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
-<a name="line69"> 69: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
-<a name="line70"> 70: </a>      call MatSetFromOptions(A,ierr)
-<a name="line71"> 71: </a>      call MatSetUp(A,ierr)
-<a name="line72"> 72: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
-<a name="line73"> 73: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
-<a name="line74"> 74: </a>        value = i+1
-<a name="line75"> 75: </a>        call MatSetValue(A,i,i,value,INSERT_VALUES,ierr)
-<a name="line76"> 76: </a>      enddo
-<a name="line77"> 77: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line78"> 78: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line80"> 80: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line81"> 81: </a>!     Create eigensolver and test interface functions
-<a name="line82"> 82: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line84"> 84: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
-<a name="line85"> 85: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
-<a name="line86"> 86: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,B,PETSC_NULL_OBJECT,ierr)
-<a name="line87"> 87: </a>      call MatView(B,PETSC_NULL_OBJECT,ierr)
-
-<a name="line89"> 89: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSKRYLOVSCHUR,ierr)
-<a name="line90"> 90: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
-<a name="line91"> 91: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line92"> 92: </a>        write(*,110) tname
-<a name="line93"> 93: </a>      endif
-<a name="line94"> 94: </a> 110  format (' Type set to ',A)
-
-<a name="line96"> 96: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,ptype,ierr)
-<a name="line97"> 97: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line98"> 98: </a>        write(*,120) ptype
-<a name="line99"> 99: </a>      endif
-<a name="line100">100: </a> 120  format (' Problem type before changing = ',I2)
-<a name="line101">101: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
-<a name="line102">102: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,ptype,ierr)
-<a name="line103">103: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line104">104: </a>        write(*,130) ptype
-<a name="line105">105: </a>      endif
-<a name="line106">106: </a> 130  format (' ... changed to ',I2)
-<a name="line107">107: </a>      call <a href="../../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(eps,flg,ierr)
-<a name="line108">108: </a>      <font color="#4169E1">if</font> (flg .and. rank .eq. 0) then
-<a name="line109">109: </a>        write(*,*) 'generalized'
-<a name="line110">110: </a>      endif
-<a name="line111">111: </a>      call <a href="../../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(eps,flg,ierr)
-<a name="line112">112: </a>      <font color="#4169E1">if</font> (flg .and. rank .eq. 0) then
-<a name="line113">113: </a>        write(*,*) 'hermitian'
-<a name="line114">114: </a>      endif
-<a name="line115">115: </a>      call <a href="../../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(eps,flg,ierr)
-<a name="line116">116: </a>      <font color="#4169E1">if</font> (flg .and. rank .eq. 0) then
-<a name="line117">117: </a>        write(*,*) 'positive'
-<a name="line118">118: </a>      endif
-
-<a name="line120">120: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,extr,ierr)
-<a name="line121">121: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line122">122: </a>        write(*,140) extr
-<a name="line123">123: </a>      endif
-<a name="line124">124: </a> 140  format (' Extraction before changing = ',I2)
-<a name="line125">125: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC,ierr)
-<a name="line126">126: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,extr,ierr)
-<a name="line127">127: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line128">128: </a>        write(*,150) extr
-<a name="line129">129: </a>      endif
-<a name="line130">130: </a> 150  format (' ... changed to ',I2)
-
-<a name="line132">132: </a>      its = 8
-<a name="line133">133: </a>      cut = 1.0e-6
-<a name="line134">134: </a>      bal = EPS_BALANCE_ONESIDE
-<a name="line135">135: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(eps,bal,its,cut,ierr)
-<a name="line136">136: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(eps,bal,its,cut,ierr)
-<a name="line137">137: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line138">138: </a>        write(*,160) bal,its,cut
-<a name="line139">139: </a>      endif
-<a name="line140">140: </a> 160  format (' Balance: ',I2,', its=',I2,', cutoff=',F8.6)
-
-<a name="line142">142: </a>      tget = 4.8
-<a name="line143">143: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,tget,ierr)
-<a name="line144">144: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(eps,tget,ierr)
-<a name="line145">145: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE,ierr)
-<a name="line146">146: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(eps,which,ierr)
-<a name="line147">147: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line148">148: </a>        write(*,170) which,PetscRealPart(tget)
-<a name="line149">149: </a>      endif
-<a name="line150">150: </a> 170  format (' Which = ',I2,', target = ',F3.1)
-
-<a name="line152">152: </a>      nev = 4
-<a name="line153">153: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,nev,PETSC_DEFAULT_INTEGER,              &
-<a name="line154">154: </a>     &                      PETSC_DEFAULT_INTEGER,ierr)
-<a name="line155">155: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,ncv,mpd,ierr)
-<a name="line156">156: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line157">157: </a>        write(*,180) nev,ncv,mpd
-<a name="line158">158: </a>      endif
-<a name="line159">159: </a> 180  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)
-
-<a name="line161">161: </a>      tol = 2.2e-4
-<a name="line162">162: </a>      its = 200
-<a name="line163">163: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,tol,its,ierr)
-<a name="line164">164: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,tol,its,ierr)
-<a name="line165">165: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line166">166: </a>        write(*,190) tol,its
-<a name="line167">167: </a>      endif
-<a name="line168">168: </a> 190  format (' Tolerance =',F7.5,', max_its =',I4)
-
-<a name="line170">170: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_ABS,ierr)
-<a name="line171">171: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(eps,conv,ierr)
-<a name="line172">172: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line173">173: </a>        write(*,200) conv
-<a name="line174">174: </a>      endif
-<a name="line175">175: </a> 200  format (' Convergence test =',I2)
-
-<a name="line177">177: </a>      call <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMONITORFIRST,PETSC_NULL_OBJECT,         &
-<a name="line178">178: </a>     &                   PETSC_NULL_FUNCTION,ierr)
-<a name="line179">179: </a>      call <a href="../../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(eps,ierr)
-
-<a name="line181">181: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,st,ierr) 
-<a name="line182">182: </a>      call <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,ksp,ierr) 
-<a name="line183">183: </a>      tol = 1.e-8
-<a name="line184">184: </a>      tolabs = 1.e-35
-<a name="line185">185: </a>      call KSPSetTolerances(ksp,tol,tolabs,PETSC_DEFAULT_REAL,          &
-<a name="line186">186: </a>     &                      PETSC_DEFAULT_INTEGER,ierr)
-<a name="line187">187: </a>      call <a href="../../../../docs/manualpages/ST/STView.html#STView">STView</a>(st,PETSC_NULL_OBJECT,ierr) 
-<a name="line188">188: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,ds,ierr) 
-<a name="line189">189: </a>      call <a href="../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,PETSC_NULL_OBJECT,ierr) 
-
-<a name="line191">191: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
-<a name="line192">192: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
-<a name="line193">193: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(eps,reason,ierr)
-<a name="line194">194: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,its,ierr)
-<a name="line195">195: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line196">196: </a>        write(*,210) reason,its
-<a name="line197">197: </a>      endif
-<a name="line198">198: </a> 210  format (' Finished - converged reason =',I2,', its=',I4)
-
-<a name="line200">200: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line201">201: </a>!     Display solution and clean up
-<a name="line202">202: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line203">203: </a>      call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
-<a name="line204">204: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
-<a name="line205">205: </a>      call MatDestroy(A,ierr)
-
-<a name="line207">207: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line208">208: </a>      end
+<a name="line30"> 30: </a><font color="#A020F0">#include <petsc/finclude/petscviewer.h></font>
+<a name="line31"> 31: </a><font color="#A020F0">#include <slepc/finclude/slepcsys.h></font>
+<a name="line32"> 32: </a><font color="#A020F0">#include <slepc/finclude/slepceps.h></font>
+
+<a name="line34"> 34: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line35"> 35: </a>!     Declarations
+<a name="line36"> 36: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line37"> 37: </a>      Mat                A,B
+<a name="line38"> 38: </a>      <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>                eps
+<a name="line39"> 39: </a>      <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>                 st
+<a name="line40"> 40: </a>      KSP                ksp
+<a name="line41"> 41: </a>      <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a>                 ds
+<a name="line42"> 42: </a>      PetscReal          cut,tol,tolabs
+<a name="line43"> 43: </a>      PetscScalar        tget,value
+<a name="line44"> 44: </a>      PetscInt           n,i,its,Istart,Iend
+<a name="line45"> 45: </a>      PetscInt           nev,ncv,mpd
+<a name="line46"> 46: </a>      PetscBool          flg
+<a name="line47"> 47: </a>      <a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> reason
+<a name="line48"> 48: </a>      <a href="../../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>            tname
+<a name="line49"> 49: </a>      <a href="../../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a>      extr
+<a name="line50"> 50: </a>      <a href="../../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>         bal
+<a name="line51"> 51: </a>      <a href="../../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>           which
+<a name="line52"> 52: </a>      <a href="../../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a>            conv
+<a name="line53"> 53: </a>      <a href="../../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>     ptype
+<a name="line54"> 54: </a>      PetscMPIInt        rank
+<a name="line55"> 55: </a>      PetscErrorCode     ierr
+<a name="line56"> 56: </a>      SlepcConvMonitor   ctx
+<a name="line57"> 57: </a>      PetscViewerAndFormat vf
+
+<a name="line59"> 59: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+<a name="line60"> 60: </a>!     Beginning of program
+<a name="line61"> 61: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line63"> 63: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
+<a name="line64"> 64: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
+<a name="line65"> 65: </a>      n = 20
+<a name="line66"> 66: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line67"> 67: </a>        write(*,100) n
+<a name="line68"> 68: </a>      endif
+<a name="line69"> 69: </a> 100  format (/'Diagonal Eigenproblem, n =',I3,' (Fortran)')
+
+<a name="line71"> 71: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
+<a name="line72"> 72: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line73"> 73: </a>      call MatSetFromOptions(A,ierr)
+<a name="line74"> 74: </a>      call MatSetUp(A,ierr)
+<a name="line75"> 75: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
+<a name="line76"> 76: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line77"> 77: </a>        value = i+1
+<a name="line78"> 78: </a>        call MatSetValue(A,i,i,value,INSERT_VALUES,ierr)
+<a name="line79"> 79: </a>      enddo
+<a name="line80"> 80: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line81"> 81: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line83"> 83: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line84"> 84: </a>!     Create eigensolver and test interface functions
+<a name="line85"> 85: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line87"> 87: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
+<a name="line88"> 88: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
+<a name="line89"> 89: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,B,PETSC_NULL_OBJECT,ierr)
+<a name="line90"> 90: </a>      call MatView(B,PETSC_NULL_OBJECT,ierr)
+
+<a name="line92"> 92: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSKRYLOVSCHUR,ierr)
+<a name="line93"> 93: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
+<a name="line94"> 94: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line95"> 95: </a>        write(*,110) tname
+<a name="line96"> 96: </a>      endif
+<a name="line97"> 97: </a> 110  format (' Type set to ',A)
+
+<a name="line99"> 99: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,ptype,ierr)
+<a name="line100">100: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line101">101: </a>        write(*,120) ptype
+<a name="line102">102: </a>      endif
+<a name="line103">103: </a> 120  format (' Problem type before changing = ',I2)
+<a name="line104">104: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
+<a name="line105">105: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(eps,ptype,ierr)
+<a name="line106">106: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line107">107: </a>        write(*,130) ptype
+<a name="line108">108: </a>      endif
+<a name="line109">109: </a> 130  format (' ... changed to ',I2)
+<a name="line110">110: </a>      call <a href="../../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(eps,flg,ierr)
+<a name="line111">111: </a>      <font color="#4169E1">if</font> (flg .and. rank .eq. 0) then
+<a name="line112">112: </a>        write(*,*) 'generalized'
+<a name="line113">113: </a>      endif
+<a name="line114">114: </a>      call <a href="../../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(eps,flg,ierr)
+<a name="line115">115: </a>      <font color="#4169E1">if</font> (flg .and. rank .eq. 0) then
+<a name="line116">116: </a>        write(*,*) 'hermitian'
+<a name="line117">117: </a>      endif
+<a name="line118">118: </a>      call <a href="../../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(eps,flg,ierr)
+<a name="line119">119: </a>      <font color="#4169E1">if</font> (flg .and. rank .eq. 0) then
+<a name="line120">120: </a>        write(*,*) 'positive'
+<a name="line121">121: </a>      endif
+
+<a name="line123">123: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,extr,ierr)
+<a name="line124">124: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line125">125: </a>        write(*,140) extr
+<a name="line126">126: </a>      endif
+<a name="line127">127: </a> 140  format (' Extraction before changing = ',I2)
+<a name="line128">128: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC,ierr)
+<a name="line129">129: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(eps,extr,ierr)
+<a name="line130">130: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line131">131: </a>        write(*,150) extr
+<a name="line132">132: </a>      endif
+<a name="line133">133: </a> 150  format (' ... changed to ',I2)
+
+<a name="line135">135: </a>      its = 8
+<a name="line136">136: </a>      cut = 1.0e-6
+<a name="line137">137: </a>      bal = EPS_BALANCE_ONESIDE
+<a name="line138">138: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(eps,bal,its,cut,ierr)
+<a name="line139">139: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(eps,bal,its,cut,ierr)
+<a name="line140">140: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line141">141: </a>        write(*,160) bal,its,cut
+<a name="line142">142: </a>      endif
+<a name="line143">143: </a> 160  format (' Balance: ',I2,', its=',I2,', cutoff=',F8.6)
+
+<a name="line145">145: </a>      tget = 4.8
+<a name="line146">146: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,tget,ierr)
+<a name="line147">147: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(eps,tget,ierr)
+<a name="line148">148: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE,ierr)
+<a name="line149">149: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(eps,which,ierr)
+<a name="line150">150: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line151">151: </a>        write(*,170) which,PetscRealPart(tget)
+<a name="line152">152: </a>      endif
+<a name="line153">153: </a> 170  format (' Which = ',I2,', target = ',F3.1)
+
+<a name="line155">155: </a>      nev = 4
+<a name="line156">156: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,nev,PETSC_DEFAULT_INTEGER,              &
+<a name="line157">157: </a>     &                      PETSC_DEFAULT_INTEGER,ierr)
+<a name="line158">158: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,ncv,mpd,ierr)
+<a name="line159">159: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line160">160: </a>        write(*,180) nev,ncv,mpd
+<a name="line161">161: </a>      endif
+<a name="line162">162: </a> 180  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)
+
+<a name="line164">164: </a>      tol = 2.2e-4
+<a name="line165">165: </a>      its = 200
+<a name="line166">166: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,tol,its,ierr)
+<a name="line167">167: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,tol,its,ierr)
+<a name="line168">168: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line169">169: </a>        write(*,190) tol,its
+<a name="line170">170: </a>      endif
+<a name="line171">171: </a> 190  format (' Tolerance =',F7.5,', max_its =',I4)
+
+<a name="line173">173: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_ABS,ierr)
+<a name="line174">174: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(eps,conv,ierr)
+<a name="line175">175: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line176">176: </a>        write(*,200) conv
+<a name="line177">177: </a>      endif
+<a name="line178">178: </a> 200  format (' Convergence test =',I2)
+
+<a name="line180">180: </a>      call PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,        &
+<a name="line181">181: </a>     &                   PETSC_VIEWER_DEFAULT,vf,ierr)
+<a name="line182">182: </a>      call <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMONITORFIRST,vf,                        &
+<a name="line183">183: </a>     &                   PetscViewerAndFormatDestroy,ierr)
+<a name="line184">184: </a>      call <a href="../../../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(PETSC_VIEWER_STDOUT_WORLD,            &
+<a name="line185">185: </a>     &                   PETSC_VIEWER_DEFAULT,ctx,ierr)
+<a name="line186">186: </a>      call <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMONITORCONVERGED,ctx,                   &
+<a name="line187">187: </a>     &                   <a href="../../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>,ierr)
+<a name="line188">188: </a>      call <a href="../../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(eps,ierr)
+
+<a name="line190">190: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,st,ierr) 
+<a name="line191">191: </a>      call <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,ksp,ierr) 
+<a name="line192">192: </a>      tol = 1.e-8
+<a name="line193">193: </a>      tolabs = 1.e-35
+<a name="line194">194: </a>      call KSPSetTolerances(ksp,tol,tolabs,PETSC_DEFAULT_REAL,          &
+<a name="line195">195: </a>     &                      PETSC_DEFAULT_INTEGER,ierr)
+<a name="line196">196: </a>      call <a href="../../../../docs/manualpages/ST/STView.html#STView">STView</a>(st,PETSC_NULL_OBJECT,ierr) 
+<a name="line197">197: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,ds,ierr) 
+<a name="line198">198: </a>      call <a href="../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,PETSC_NULL_OBJECT,ierr) 
+
+<a name="line200">200: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
+<a name="line201">201: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
+<a name="line202">202: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(eps,reason,ierr)
+<a name="line203">203: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,its,ierr)
+<a name="line204">204: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line205">205: </a>        write(*,210) reason,its
+<a name="line206">206: </a>      endif
+<a name="line207">207: </a> 210  format (' Finished - converged reason =',I2,', its=',I4)
+
+<a name="line209">209: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line210">210: </a>!     Display solution and clean up
+<a name="line211">211: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line212">212: </a>      call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+<a name="line213">213: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
+<a name="line214">214: </a>      call MatDestroy(A,ierr)
+
+<a name="line216">216: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line217">217: </a>      end
 </pre>
 </body>
 
diff --git a/src/eps/examples/tests/test15f.F b/src/eps/examples/tests/test15f.F
index f80eeb6..2be078b 100644
--- a/src/eps/examples/tests/test15f.F
+++ b/src/eps/examples/tests/test15f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n test15f [-help] [-n <n>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./test15f [-help] [-n <n>] [all SLEPc options] 
 !
 !  Description: Tests custom monitors from Fortran.
 !
@@ -68,7 +68,8 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       n = 30
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',n,flg,ierr)
 
       if (rank .eq. 0) then
         write(*,100) n
@@ -131,8 +132,8 @@
       call EPSSetProblemType(eps,EPS_HEP,ierr)
 
 !     ** Set user-defined monitor
-      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-my_eps_monitor',  &
-     &                    flg,ierr)
+      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+     &                        '-my_eps_monitor',flg,ierr)
       if (flg) then
         call EPSMonitorSet(eps,MyEPSMonitor,PETSC_NULL_OBJECT,          &
      &                     PETSC_NULL_FUNCTION,ierr)
diff --git a/src/eps/examples/tests/test15f.F.html b/src/eps/examples/tests/test15f.F.html
index ee678cb..3852fe9 100644
--- a/src/eps/examples/tests/test15f.F.html
+++ b/src/eps/examples/tests/test15f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test15f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:26+00:00">
+<meta name="date" content="2016-05-16T10:33:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test15f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test15f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n test15f [-help] [-n <n>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./test15f [-help] [-n <n>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Tests custom monitors from Fortran.
 <a name="line23"> 23: </a>!
@@ -80,153 +80,154 @@
 <a name="line68"> 68: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line69"> 69: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line70"> 70: </a>      n = 30
-<a name="line71"> 71: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
-
-<a name="line73"> 73: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line74"> 74: </a>        write(*,100) n
-<a name="line75"> 75: </a>      endif
-<a name="line76"> 76: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')
-
-<a name="line78"> 78: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line79"> 79: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
-<a name="line80"> 80: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line82"> 82: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
-<a name="line83"> 83: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
-<a name="line84"> 84: </a>      call MatSetFromOptions(A,ierr)
-<a name="line85"> 85: </a>      call MatSetUp(A,ierr)
-
-<a name="line87"> 87: </a>      i1 = 1
-<a name="line88"> 88: </a>      i2 = 2
-<a name="line89"> 89: </a>      i3 = 3
-<a name="line90"> 90: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
-<a name="line91"> 91: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
-<a name="line92"> 92: </a>        i = 0
-<a name="line93"> 93: </a>        col(1) = 0
-<a name="line94"> 94: </a>        col(2) = 1
-<a name="line95"> 95: </a>        value(1) =  2.0
-<a name="line96"> 96: </a>        value(2) = -1.0
-<a name="line97"> 97: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
-<a name="line98"> 98: </a>        Istart = Istart+1
-<a name="line99"> 99: </a>      endif
-<a name="line100">100: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
-<a name="line101">101: </a>        i = n-1
-<a name="line102">102: </a>        col(1) = n-2
-<a name="line103">103: </a>        col(2) = n-1
-<a name="line104">104: </a>        value(1) = -1.0
-<a name="line105">105: </a>        value(2) =  2.0
-<a name="line106">106: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
-<a name="line107">107: </a>        Iend = Iend-1
-<a name="line108">108: </a>      endif
-<a name="line109">109: </a>      value(1) = -1.0
-<a name="line110">110: </a>      value(2) =  2.0
-<a name="line111">111: </a>      value(3) = -1.0
-<a name="line112">112: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
-<a name="line113">113: </a>        col(1) = i-1
-<a name="line114">114: </a>        col(2) = i
-<a name="line115">115: </a>        col(3) = i+1
-<a name="line116">116: </a>        call MatSetValues(A,i1,i,i3,col,value,INSERT_VALUES,ierr)
-<a name="line117">117: </a>      enddo
-
-<a name="line119">119: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line120">120: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line122">122: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line123">123: </a>!     Create the eigensolver and display info
-<a name="line124">124: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line126">126: </a>!     ** Create eigensolver context
-<a name="line127">127: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
-
-<a name="line129">129: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
-<a name="line130">130: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
-<a name="line131">131: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
-
-<a name="line133">133: </a>!     ** Set user-defined monitor
-<a name="line134">134: </a>      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-my_eps_monitor',  &
-<a name="line135">135: </a>     &                    flg,ierr)
-<a name="line136">136: </a>      <font color="#4169E1">if</font> (flg) then
-<a name="line137">137: </a>        call <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,MyEPSMonitor,PETSC_NULL_OBJECT,          &
-<a name="line138">138: </a>     &                     PETSC_NULL_FUNCTION,ierr)
-<a name="line139">139: </a>      endif
-
-<a name="line141">141: </a>!     ** Set solver parameters at runtime
-<a name="line142">142: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
-
-<a name="line144">144: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line145">145: </a>!     Solve the eigensystem
-<a name="line146">146: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line148">148: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
-
-<a name="line150">150: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line151">151: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
-<a name="line152">152: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line153">153: </a>        write(*,120) tname
-<a name="line154">154: </a>      endif
-<a name="line155">155: </a> 120  format (' Solution method: ',A)
-<a name="line156">156: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
-<a name="line157">157: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line158">158: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line159">159: </a>        write(*,130) nev
-<a name="line160">160: </a>      endif
-<a name="line161">161: </a> 130  format (' Number of requested eigenvalues:',I2)
-
-<a name="line163">163: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line164">164: </a>!     Display solution and clean up
-<a name="line165">165: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line167">167: </a>      call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
-<a name="line168">168: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
-<a name="line169">169: </a>      call MatDestroy(A,ierr)
-
-<a name="line171">171: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line172">172: </a>      end
-
-<a name="line174">174: </a>! --------------------------------------------------------------
-<a name="line175">175: </a>!
-<a name="line176">176: </a>!  MyEPSMonitor - This is a user-defined routine <font color="#4169E1">for</font> monitoring
-<a name="line177">177: </a>!  the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> iterative solvers.
-<a name="line178">178: </a>!
-<a name="line179">179: </a>!  Input Parameters:
-<a name="line180">180: </a>!    eps   - eigensolver context
-<a name="line181">181: </a>!    its   - iteration number
-<a name="line182">182: </a>!    nconv - number of converged eigenpairs
-<a name="line183">183: </a>!    eigr  - real part of the eigenvalues
-<a name="line184">184: </a>!    eigi  - imaginary part of the eigenvalues
-<a name="line185">185: </a>!    errest- relative error estimates <font color="#4169E1">for</font> each eigenpair
-<a name="line186">186: </a>!    nest  - number of error estimates
-<a name="line187">187: </a>!    dummy - optional user-defined monitor context (unused here)
-<a name="line188">188: </a>!
-<a name="line189">189: </a>      subroutine MyEPSMonitor(eps,its,nconv,eigr,eigi,errest,nest,dummy,&
-<a name="line190">190: </a>     &                        ierr)
-
-<a name="line192">192: </a>      implicit none
-
-<a name="line194">194: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
-<a name="line195">195: </a><font color="#A020F0">#include <petsc/finclude/petscvec.h></font>
-<a name="line196">196: </a><font color="#A020F0">#include <petsc/finclude/petscmat.h></font>
-<a name="line197">197: </a><font color="#A020F0">#include <slepc/finclude/slepcsys.h></font>
-<a name="line198">198: </a><font color="#A020F0">#include <slepc/finclude/slepceps.h></font>
-
-<a name="line200">200: </a>      <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps
-<a name="line201">201: </a>      Vec            x
-<a name="line202">202: </a>      PetscErrorCode ierr
-<a name="line203">203: </a>      PetscInt       its,nconv,nest,dummy
-<a name="line204">204: </a>      PetscScalar    eigr(*),eigi(*)
-<a name="line205">205: </a>      PetscReal      re,errest(*)
-<a name="line206">206: </a>      PetscMPIInt    rank
-
-<a name="line208">208: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
-<a name="line209">209: </a>      <font color="#4169E1">if</font> (its .gt. 0 .and. rank .eq. 0) then
-<a name="line210">210: </a>        re = PetscRealPart(eigr(nconv+1))
-<a name="line211">211: </a>        write(6,140) its,nconv,re,errest(nconv+1)
-<a name="line212">212: </a>      endif
-
-<a name="line214">214: </a> 140  format(i3,' <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> nconv=',i2,' first unconverged value (error) ',   &
-<a name="line215">215: </a>     &       f6.4,' (',g9.3,')')
-<a name="line216">216: </a>      0
-<a name="line217">217: </a>      end
+<a name="line71"> 71: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line72"> 72: </a>     &                        '-n',n,flg,ierr)
+
+<a name="line74"> 74: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line75"> 75: </a>        write(*,100) n
+<a name="line76"> 76: </a>      endif
+<a name="line77"> 77: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')
+
+<a name="line79"> 79: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line80"> 80: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
+<a name="line81"> 81: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line83"> 83: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
+<a name="line84"> 84: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line85"> 85: </a>      call MatSetFromOptions(A,ierr)
+<a name="line86"> 86: </a>      call MatSetUp(A,ierr)
+
+<a name="line88"> 88: </a>      i1 = 1
+<a name="line89"> 89: </a>      i2 = 2
+<a name="line90"> 90: </a>      i3 = 3
+<a name="line91"> 91: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
+<a name="line92"> 92: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
+<a name="line93"> 93: </a>        i = 0
+<a name="line94"> 94: </a>        col(1) = 0
+<a name="line95"> 95: </a>        col(2) = 1
+<a name="line96"> 96: </a>        value(1) =  2.0
+<a name="line97"> 97: </a>        value(2) = -1.0
+<a name="line98"> 98: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
+<a name="line99"> 99: </a>        Istart = Istart+1
+<a name="line100">100: </a>      endif
+<a name="line101">101: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
+<a name="line102">102: </a>        i = n-1
+<a name="line103">103: </a>        col(1) = n-2
+<a name="line104">104: </a>        col(2) = n-1
+<a name="line105">105: </a>        value(1) = -1.0
+<a name="line106">106: </a>        value(2) =  2.0
+<a name="line107">107: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
+<a name="line108">108: </a>        Iend = Iend-1
+<a name="line109">109: </a>      endif
+<a name="line110">110: </a>      value(1) = -1.0
+<a name="line111">111: </a>      value(2) =  2.0
+<a name="line112">112: </a>      value(3) = -1.0
+<a name="line113">113: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line114">114: </a>        col(1) = i-1
+<a name="line115">115: </a>        col(2) = i
+<a name="line116">116: </a>        col(3) = i+1
+<a name="line117">117: </a>        call MatSetValues(A,i1,i,i3,col,value,INSERT_VALUES,ierr)
+<a name="line118">118: </a>      enddo
+
+<a name="line120">120: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line121">121: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line123">123: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line124">124: </a>!     Create the eigensolver and display info
+<a name="line125">125: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line127">127: </a>!     ** Create eigensolver context
+<a name="line128">128: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
+
+<a name="line130">130: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
+<a name="line131">131: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
+<a name="line132">132: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
+
+<a name="line134">134: </a>!     ** Set user-defined monitor
+<a name="line135">135: </a>      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+<a name="line136">136: </a>     &                        '-my_eps_monitor',flg,ierr)
+<a name="line137">137: </a>      <font color="#4169E1">if</font> (flg) then
+<a name="line138">138: </a>        call <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,MyEPSMonitor,PETSC_NULL_OBJECT,          &
+<a name="line139">139: </a>     &                     PETSC_NULL_FUNCTION,ierr)
+<a name="line140">140: </a>      endif
+
+<a name="line142">142: </a>!     ** Set solver parameters at runtime
+<a name="line143">143: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
+
+<a name="line145">145: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line146">146: </a>!     Solve the eigensystem
+<a name="line147">147: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line149">149: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
+
+<a name="line151">151: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line152">152: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
+<a name="line153">153: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line154">154: </a>        write(*,120) tname
+<a name="line155">155: </a>      endif
+<a name="line156">156: </a> 120  format (' Solution method: ',A)
+<a name="line157">157: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
+<a name="line158">158: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line159">159: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line160">160: </a>        write(*,130) nev
+<a name="line161">161: </a>      endif
+<a name="line162">162: </a> 130  format (' Number of requested eigenvalues:',I2)
+
+<a name="line164">164: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line165">165: </a>!     Display solution and clean up
+<a name="line166">166: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line168">168: </a>      call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+<a name="line169">169: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
+<a name="line170">170: </a>      call MatDestroy(A,ierr)
+
+<a name="line172">172: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line173">173: </a>      end
+
+<a name="line175">175: </a>! --------------------------------------------------------------
+<a name="line176">176: </a>!
+<a name="line177">177: </a>!  MyEPSMonitor - This is a user-defined routine <font color="#4169E1">for</font> monitoring
+<a name="line178">178: </a>!  the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> iterative solvers.
+<a name="line179">179: </a>!
+<a name="line180">180: </a>!  Input Parameters:
+<a name="line181">181: </a>!    eps   - eigensolver context
+<a name="line182">182: </a>!    its   - iteration number
+<a name="line183">183: </a>!    nconv - number of converged eigenpairs
+<a name="line184">184: </a>!    eigr  - real part of the eigenvalues
+<a name="line185">185: </a>!    eigi  - imaginary part of the eigenvalues
+<a name="line186">186: </a>!    errest- relative error estimates <font color="#4169E1">for</font> each eigenpair
+<a name="line187">187: </a>!    nest  - number of error estimates
+<a name="line188">188: </a>!    dummy - optional user-defined monitor context (unused here)
+<a name="line189">189: </a>!
+<a name="line190">190: </a>      subroutine MyEPSMonitor(eps,its,nconv,eigr,eigi,errest,nest,dummy,&
+<a name="line191">191: </a>     &                        ierr)
+
+<a name="line193">193: </a>      implicit none
+
+<a name="line195">195: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
+<a name="line196">196: </a><font color="#A020F0">#include <petsc/finclude/petscvec.h></font>
+<a name="line197">197: </a><font color="#A020F0">#include <petsc/finclude/petscmat.h></font>
+<a name="line198">198: </a><font color="#A020F0">#include <slepc/finclude/slepcsys.h></font>
+<a name="line199">199: </a><font color="#A020F0">#include <slepc/finclude/slepceps.h></font>
+
+<a name="line201">201: </a>      <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps
+<a name="line202">202: </a>      Vec            x
+<a name="line203">203: </a>      PetscErrorCode ierr
+<a name="line204">204: </a>      PetscInt       its,nconv,nest,dummy
+<a name="line205">205: </a>      PetscScalar    eigr(*),eigi(*)
+<a name="line206">206: </a>      PetscReal      re,errest(*)
+<a name="line207">207: </a>      PetscMPIInt    rank
+
+<a name="line209">209: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
+<a name="line210">210: </a>      <font color="#4169E1">if</font> (its .gt. 0 .and. rank .eq. 0) then
+<a name="line211">211: </a>        re = PetscRealPart(eigr(nconv+1))
+<a name="line212">212: </a>        write(6,140) its,nconv,re,errest(nconv+1)
+<a name="line213">213: </a>      endif
+
+<a name="line215">215: </a> 140  format(i3,' <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> nconv=',i2,' first unconverged value (error) ',   &
+<a name="line216">216: </a>     &       f6.4,' (',g9.3,')')
+<a name="line217">217: </a>      0
+<a name="line218">218: </a>      end
 
 
 </pre>
diff --git a/src/eps/examples/tests/test16.c b/src/eps/examples/tests/test16.c
index b28994c..4049643 100644
--- a/src/eps/examples/tests/test16.c
+++ b/src/eps/examples/tests/test16.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -47,7 +47,7 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nTridiagonal Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -87,6 +87,6 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tests/test16.c.html b/src/eps/examples/tests/test16.c.html
index d566c81..09cc744 100644
--- a/src/eps/examples/tests/test16.c.html
+++ b/src/eps/examples/tests/test16.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test16.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:26+00:00">
+<meta name="date" content="2016-05-16T10:33:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test16.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test16.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,7 +53,7 @@
 <a name="line46"> 46: </a>  PetscInt       n=30,i,Istart,Iend;
 
 <a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line50"> 50: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line50"> 50: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line51"> 51: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nTridiagonal Eigenproblem, n=%D\n\n"</font>,n);
 
 <a name="line53"> 53: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -93,7 +93,7 @@
 <a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line88"> 88: </a>  MatDestroy(&A);
 <a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line90"> 90: </a>  <font color="#4169E1">return</font> 0;
+<a name="line90"> 90: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line91"> 91: </a>}
 
 </pre>
diff --git a/src/eps/examples/tests/test2.c b/src/eps/examples/tests/test2.c
index d7e282a..1cf92e6 100644
--- a/src/eps/examples/tests/test2.c
+++ b/src/eps/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,7 +37,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -108,5 +108,5 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test2.c.html b/src/eps/examples/tests/test2.c.html
index ea13358..099a59d 100644
--- a/src/eps/examples/tests/test2.c.html
+++ b/src/eps/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:22+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 
 <a name="line38"> 38: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian Eigenproblem, n=%D\n\n"</font>,n);
 
 <a name="line43"> 43: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -117,7 +117,7 @@
 <a name="line108">108: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line109">109: </a>  MatDestroy(&A);
 <a name="line110">110: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line111">111: </a>  <font color="#4169E1">return</font> 0;
+<a name="line111">111: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line112">112: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test3.c b/src/eps/examples/tests/test3.c
index c37b063..e6cb5d4 100644
--- a/src/eps/examples/tests/test3.c
+++ b/src/eps/examples/tests/test3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,7 +37,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nTridiagonal with random diagonal, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -109,5 +109,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A1);CHKERRQ(ierr);
   ierr = MatDestroy(&A2);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test3.c.html b/src/eps/examples/tests/test3.c.html
index 11a3d6d..4f64956 100644
--- a/src/eps/examples/tests/test3.c.html
+++ b/src/eps/examples/tests/test3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:23+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 
 <a name="line38"> 38: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nTridiagonal with random diagonal, n=%D\n\n"</font>,n);
 
 <a name="line43"> 43: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -118,7 +118,7 @@
 <a name="line109">109: </a>  MatDestroy(&A1);
 <a name="line110">110: </a>  MatDestroy(&A2);
 <a name="line111">111: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line112">112: </a>  <font color="#4169E1">return</font> 0;
+<a name="line112">112: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line113">113: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test4.c b/src/eps/examples/tests/test4.c
index eb22021..cdab2d7 100644
--- a/src/eps/examples/tests/test4.c
+++ b/src/eps/examples/tests/test4.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -41,8 +41,8 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-type",epstype,30,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-type",epstype,30,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian Eigenproblem, n=%D",n);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nEPS type: %s\n\n",epstype);CHKERRQ(ierr);
 
@@ -112,5 +112,5 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test4.c.html b/src/eps/examples/tests/test4.c.html
index 909f33c..3be764c 100644
--- a/src/eps/examples/tests/test4.c.html
+++ b/src/eps/examples/tests/test4.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test4.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:23+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -50,8 +50,8 @@
 
 <a name="line42"> 42: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line45"> 45: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-type"</font>,epstype,30,NULL);
+<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line45"> 45: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-type"</font>,epstype,30,NULL);
 <a name="line46"> 46: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian Eigenproblem, n=%D"</font>,n);
 <a name="line47"> 47: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nEPS type: %s\n\n"</font>,epstype);
 
@@ -121,7 +121,7 @@
 <a name="line112">112: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line113">113: </a>  MatDestroy(&A);
 <a name="line114">114: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line115">115: </a>  <font color="#4169E1">return</font> 0;
+<a name="line115">115: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line116">116: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test5.c b/src/eps/examples/tests/test5.c
index 972bf57..1d817a9 100644
--- a/src/eps/examples/tests/test5.c
+++ b/src/eps/examples/tests/test5.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,8 +44,8 @@ int main(int argc,char **argv)
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         Load the operator matrix that defines the eigensystem, Ax=kx
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-  ierr = PetscOptionsHasName(NULL,"-symm",&symm);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-herm",&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-symm",&symm);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-herm",&flg);CHKERRQ(ierr);
   if (flg) symm=PETSC_TRUE;
 #if defined(PETSC_USE_COMPLEX)
   prefix = symm? "hpd": "nh";
@@ -94,6 +94,6 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tests/test5.c.html b/src/eps/examples/tests/test5.c.html
index 14eeeef..5ee65f7 100644
--- a/src/eps/examples/tests/test5.c.html
+++ b/src/eps/examples/tests/test5.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test5.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:23+00:00">
+<meta name="date" content="2016-05-16T10:33:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,8 +53,8 @@
 <a name="line44"> 44: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line45"> 45: </a><font color="#B22222">        Load the operator matrix that defines the eigensystem, Ax=kx</font>
 <a name="line46"> 46: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-<a name="line47"> 47: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-symm"</font>,&symm);
-<a name="line48"> 48: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-herm"</font>,&flg);
+<a name="line47"> 47: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-symm"</font>,&symm);
+<a name="line48"> 48: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-herm"</font>,&flg);
 <a name="line49"> 49: </a>  <font color="#4169E1">if</font> (flg) symm=PETSC_TRUE;
 <a name="line50"> 50: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
 <a name="line51"> 51: </a>  prefix = symm? <font color="#666666">"hpd"</font>: <font color="#666666">"nh"</font>;
@@ -103,7 +103,7 @@
 <a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line95"> 95: </a>  MatDestroy(&A);
 <a name="line96"> 96: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line97"> 97: </a>  <font color="#4169E1">return</font> 0;
+<a name="line97"> 97: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line98"> 98: </a>}
 
 </pre>
diff --git a/src/eps/examples/tests/test6.c b/src/eps/examples/tests/test6.c
index 858b6cd..df8f433 100644
--- a/src/eps/examples/tests/test6.c
+++ b/src/eps/examples/tests/test6.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,7 +40,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nDiagonal Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
 
   ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr);
@@ -66,7 +66,7 @@ int main(int argc,char **argv)
   ierr = MatCreateVecs(A,&v0,NULL);CHKERRQ(ierr);
   ierr = PetscRandomCreate(PETSC_COMM_WORLD,&rand);CHKERRQ(ierr);
   ierr = PetscRandomSetFromOptions(rand);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-seed",&seed,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-seed",&seed,NULL);CHKERRQ(ierr);
   ierr = PetscRandomSetSeed(rand,seed);CHKERRQ(ierr);
   ierr = PetscRandomSeed(rand);CHKERRQ(ierr);
   ierr = VecSetRandom(v0,rand);CHKERRQ(ierr);
@@ -83,5 +83,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&v0);CHKERRQ(ierr);
   ierr = PetscRandomDestroy(&rand);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tests/test6.c.html b/src/eps/examples/tests/test6.c.html
index 7be730f..be65b90 100644
--- a/src/eps/examples/tests/test6.c.html
+++ b/src/eps/examples/tests/test6.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test6.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:23+00:00">
+<meta name="date" content="2016-05-16T10:33:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -49,7 +49,7 @@
 
 <a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nDiagonal Eigenproblem, n=%D\n\n"</font>,n);
 
 <a name="line46"> 46: </a>  MatCreate(PETSC_COMM_WORLD,&A);
@@ -75,7 +75,7 @@
 <a name="line66"> 66: </a>  MatCreateVecs(A,&v0,NULL);
 <a name="line67"> 67: </a>  PetscRandomCreate(PETSC_COMM_WORLD,&rand);
 <a name="line68"> 68: </a>  PetscRandomSetFromOptions(rand);
-<a name="line69"> 69: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-seed"</font>,&seed,NULL);
+<a name="line69"> 69: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-seed"</font>,&seed,NULL);
 <a name="line70"> 70: </a>  PetscRandomSetSeed(rand,seed);
 <a name="line71"> 71: </a>  PetscRandomSeed(rand);
 <a name="line72"> 72: </a>  VecSetRandom(v0,rand);
@@ -92,7 +92,7 @@
 <a name="line83"> 83: </a>  VecDestroy(&v0);
 <a name="line84"> 84: </a>  PetscRandomDestroy(&rand);
 <a name="line85"> 85: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line86"> 86: </a>  <font color="#4169E1">return</font> 0;
+<a name="line86"> 86: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line87"> 87: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test7f.F b/src/eps/examples/tests/test7f.F
index ee33461..33937bf 100644
--- a/src/eps/examples/tests/test7f.F
+++ b/src/eps/examples/tests/test7f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n test7f [-help] [-n <n>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./test7f [-help] [-n <n>] [all SLEPc options] 
 !
 !  Description: Simple example that solves an eigensystem with the EPS object.
 !  Same problem as ex1f but with simplified output.
@@ -63,7 +63,8 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       n = 30
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',n,flg,ierr)
 
       if (rank .eq. 0) then
         write(*,100) n
diff --git a/src/eps/examples/tests/test7f.F.html b/src/eps/examples/tests/test7f.F.html
index 7f5b2f4..6f83011 100644
--- a/src/eps/examples/tests/test7f.F.html
+++ b/src/eps/examples/tests/test7f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test7f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:26+00:00">
+<meta name="date" content="2016-05-16T10:33:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test7f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test7f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n test7f [-help] [-n <n>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./test7f [-help] [-n <n>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Simple example that solves an eigensystem with the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.
 <a name="line23"> 23: </a>!  Same problem as ex1f but with simplified output.
@@ -75,100 +75,101 @@
 <a name="line63"> 63: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line64"> 64: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line65"> 65: </a>      n = 30
-<a name="line66"> 66: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
-
-<a name="line68"> 68: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line69"> 69: </a>        write(*,100) n
-<a name="line70"> 70: </a>      endif
-<a name="line71"> 71: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')
-
-<a name="line73"> 73: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line74"> 74: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
-<a name="line75"> 75: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line77"> 77: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
-<a name="line78"> 78: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
-<a name="line79"> 79: </a>      call MatSetFromOptions(A,ierr)
-<a name="line80"> 80: </a>      call MatSetUp(A,ierr)
-
-<a name="line82"> 82: </a>      i1 = 1
-<a name="line83"> 83: </a>      i2 = 2
-<a name="line84"> 84: </a>      i3 = 3
-<a name="line85"> 85: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
-<a name="line86"> 86: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
-<a name="line87"> 87: </a>        i = 0
-<a name="line88"> 88: </a>        col(1) = 0
-<a name="line89"> 89: </a>        col(2) = 1
-<a name="line90"> 90: </a>        value(1) =  2.0
-<a name="line91"> 91: </a>        value(2) = -1.0
-<a name="line92"> 92: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
-<a name="line93"> 93: </a>        Istart = Istart+1
-<a name="line94"> 94: </a>      endif
-<a name="line95"> 95: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
-<a name="line96"> 96: </a>        i = n-1
-<a name="line97"> 97: </a>        col(1) = n-2
-<a name="line98"> 98: </a>        col(2) = n-1
-<a name="line99"> 99: </a>        value(1) = -1.0
-<a name="line100">100: </a>        value(2) =  2.0
-<a name="line101">101: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
-<a name="line102">102: </a>        Iend = Iend-1
-<a name="line103">103: </a>      endif
-<a name="line104">104: </a>      value(1) = -1.0
-<a name="line105">105: </a>      value(2) =  2.0
-<a name="line106">106: </a>      value(3) = -1.0
-<a name="line107">107: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
-<a name="line108">108: </a>        col(1) = i-1
-<a name="line109">109: </a>        col(2) = i
-<a name="line110">110: </a>        col(3) = i+1
-<a name="line111">111: </a>        call MatSetValues(A,i1,i,i3,col,value,INSERT_VALUES,ierr)
-<a name="line112">112: </a>      enddo
-
-<a name="line114">114: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line115">115: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line117">117: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line118">118: </a>!     Create the eigensolver and display info
-<a name="line119">119: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line121">121: </a>!     ** Create eigensolver context
-<a name="line122">122: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
-
-<a name="line124">124: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
-<a name="line125">125: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
-<a name="line126">126: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
-
-<a name="line128">128: </a>!     ** Set solver parameters at runtime
-<a name="line129">129: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
-
-<a name="line131">131: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line132">132: </a>!     Solve the eigensystem
-<a name="line133">133: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line135">135: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
-
-<a name="line137">137: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line138">138: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
-<a name="line139">139: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line140">140: </a>        write(*,120) tname
-<a name="line141">141: </a>      endif
-<a name="line142">142: </a> 120  format (' Solution method: ',A)
-<a name="line143">143: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
-<a name="line144">144: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line145">145: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line146">146: </a>        write(*,130) nev
-<a name="line147">147: </a>      endif
-<a name="line148">148: </a> 130  format (' Number of requested eigenvalues:',I2)
-
-<a name="line150">150: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line151">151: </a>!     Display solution and clean up
-<a name="line152">152: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line154">154: </a>      call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
-<a name="line155">155: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
-<a name="line156">156: </a>      call MatDestroy(A,ierr)
-
-<a name="line158">158: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line159">159: </a>      end
+<a name="line66"> 66: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line67"> 67: </a>     &                        '-n',n,flg,ierr)
+
+<a name="line69"> 69: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line70"> 70: </a>        write(*,100) n
+<a name="line71"> 71: </a>      endif
+<a name="line72"> 72: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')
+
+<a name="line74"> 74: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line75"> 75: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
+<a name="line76"> 76: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line78"> 78: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
+<a name="line79"> 79: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line80"> 80: </a>      call MatSetFromOptions(A,ierr)
+<a name="line81"> 81: </a>      call MatSetUp(A,ierr)
+
+<a name="line83"> 83: </a>      i1 = 1
+<a name="line84"> 84: </a>      i2 = 2
+<a name="line85"> 85: </a>      i3 = 3
+<a name="line86"> 86: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
+<a name="line87"> 87: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
+<a name="line88"> 88: </a>        i = 0
+<a name="line89"> 89: </a>        col(1) = 0
+<a name="line90"> 90: </a>        col(2) = 1
+<a name="line91"> 91: </a>        value(1) =  2.0
+<a name="line92"> 92: </a>        value(2) = -1.0
+<a name="line93"> 93: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
+<a name="line94"> 94: </a>        Istart = Istart+1
+<a name="line95"> 95: </a>      endif
+<a name="line96"> 96: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
+<a name="line97"> 97: </a>        i = n-1
+<a name="line98"> 98: </a>        col(1) = n-2
+<a name="line99"> 99: </a>        col(2) = n-1
+<a name="line100">100: </a>        value(1) = -1.0
+<a name="line101">101: </a>        value(2) =  2.0
+<a name="line102">102: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
+<a name="line103">103: </a>        Iend = Iend-1
+<a name="line104">104: </a>      endif
+<a name="line105">105: </a>      value(1) = -1.0
+<a name="line106">106: </a>      value(2) =  2.0
+<a name="line107">107: </a>      value(3) = -1.0
+<a name="line108">108: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line109">109: </a>        col(1) = i-1
+<a name="line110">110: </a>        col(2) = i
+<a name="line111">111: </a>        col(3) = i+1
+<a name="line112">112: </a>        call MatSetValues(A,i1,i,i3,col,value,INSERT_VALUES,ierr)
+<a name="line113">113: </a>      enddo
+
+<a name="line115">115: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line116">116: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line118">118: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line119">119: </a>!     Create the eigensolver and display info
+<a name="line120">120: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line122">122: </a>!     ** Create eigensolver context
+<a name="line123">123: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
+
+<a name="line125">125: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
+<a name="line126">126: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
+<a name="line127">127: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
+
+<a name="line129">129: </a>!     ** Set solver parameters at runtime
+<a name="line130">130: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
+
+<a name="line132">132: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line133">133: </a>!     Solve the eigensystem
+<a name="line134">134: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line136">136: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
+
+<a name="line138">138: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line139">139: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
+<a name="line140">140: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line141">141: </a>        write(*,120) tname
+<a name="line142">142: </a>      endif
+<a name="line143">143: </a> 120  format (' Solution method: ',A)
+<a name="line144">144: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
+<a name="line145">145: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line146">146: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line147">147: </a>        write(*,130) nev
+<a name="line148">148: </a>      endif
+<a name="line149">149: </a> 130  format (' Number of requested eigenvalues:',I2)
+
+<a name="line151">151: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line152">152: </a>!     Display solution and clean up
+<a name="line153">153: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line155">155: </a>      call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+<a name="line156">156: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
+<a name="line157">157: </a>      call MatDestroy(A,ierr)
+
+<a name="line159">159: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line160">160: </a>      end
 
 </pre>
 </body>
diff --git a/src/eps/examples/tests/test8.c b/src/eps/examples/tests/test8.c
index 303afc8..7004145 100644
--- a/src/eps/examples/tests/test8.c
+++ b/src/eps/examples/tests/test8.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -49,7 +49,7 @@ int main(int argc,char **argv)
   ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr);
   if (size != 1) SETERRQ(PETSC_COMM_WORLD,1,"This is a uniprocessor example only");
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   N = n*n;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n2-D Laplacian Eigenproblem (matrix-free version), N=%D (%Dx%D grid)\n\n",N,n,n);CHKERRQ(ierr);
 
@@ -106,7 +106,7 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 /*
diff --git a/src/eps/examples/tests/test8.c.html b/src/eps/examples/tests/test8.c.html
index 7125945..757ffb5 100644
--- a/src/eps/examples/tests/test8.c.html
+++ b/src/eps/examples/tests/test8.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test8.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:24+00:00">
+<meta name="date" content="2016-05-16T10:33:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -58,7 +58,7 @@
 <a name="line49"> 49: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PETSC_COMM_WORLD,&size);
 <a name="line50"> 50: </a>  <font color="#4169E1">if</font> (size != 1) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"This is a uniprocessor example only"</font>);
 
-<a name="line52"> 52: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line52"> 52: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line53"> 53: </a>  N = n*n;
 <a name="line54"> 54: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n2-D Laplacian Eigenproblem (matrix-free version), N=%D (%Dx%D grid)\n\n"</font>,N,n,n);
 
@@ -115,7 +115,7 @@
 <a name="line106">106: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line107">107: </a>  MatDestroy(&A);
 <a name="line108">108: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line109">109: </a>  <font color="#4169E1">return</font> 0;
+<a name="line109">109: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line110">110: </a>}
 
 <a name="line112">112: </a><font color="#B22222">/*</font>
diff --git a/src/eps/examples/tests/test9.c b/src/eps/examples/tests/test9.c
index 9790d47..ffb5f1f 100644
--- a/src/eps/examples/tests/test9.c
+++ b/src/eps/examples/tests/test9.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -48,7 +48,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   N = m*(m+1)/2;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMarkov Model, N=%D (m=%D)\n\n",N,m);CHKERRQ(ierr);
 
@@ -124,7 +124,7 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = VecDestroy(&v0);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/eps/examples/tests/test9.c.html b/src/eps/examples/tests/test9.c.html
index 8d104a2..348d5f4 100644
--- a/src/eps/examples/tests/test9.c.html
+++ b/src/eps/examples/tests/test9.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tests/test9.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:24+00:00">
+<meta name="date" content="2016-05-16T10:33:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tests/test9.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tests/test9.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -57,7 +57,7 @@
 
 <a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line52"> 52: </a>  N = m*(m+1)/2;
 <a name="line53"> 53: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov Model, N=%D (m=%D)\n\n"</font>,N,m);
 
@@ -133,7 +133,7 @@
 <a name="line124">124: </a>  MatDestroy(&A);
 <a name="line125">125: </a>  VecDestroy(&v0);
 <a name="line126">126: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line127">127: </a>  <font color="#4169E1">return</font> 0;
+<a name="line127">127: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line128">128: </a>}
 
 <a name="line132">132: </a><font color="#B22222">/*</font>
diff --git a/src/eps/examples/tutorials/X.bin b/src/eps/examples/tutorials/X.bin
new file mode 100644
index 0000000..9187855
Binary files /dev/null and b/src/eps/examples/tutorials/X.bin differ
diff --git a/src/eps/examples/tutorials/Ybus.bin b/src/eps/examples/tutorials/Ybus.bin
new file mode 100644
index 0000000..6b3d23d
Binary files /dev/null and b/src/eps/examples/tutorials/Ybus.bin differ
diff --git a/src/eps/examples/tutorials/ex1.c b/src/eps/examples/tutorials/ex1.c
index 373e075..f325806 100644
--- a/src/eps/examples/tutorials/ex1.c
+++ b/src/eps/examples/tutorials/ex1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,7 +40,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -136,7 +136,7 @@ int main(int argc,char **argv)
       im = ki;
 #endif
       if (im!=0.0) {
-        ierr = PetscPrintf(PETSC_COMM_WORLD," %9f%+9f j %12g\n",(double)re,(double)im,(double)error);CHKERRQ(ierr);
+        ierr = PetscPrintf(PETSC_COMM_WORLD," %9f%+9fi %12g\n",(double)re,(double)im,(double)error);CHKERRQ(ierr);
       } else {
         ierr = PetscPrintf(PETSC_COMM_WORLD,"   %12f       %12g\n",(double)re,(double)error);CHKERRQ(ierr);
       }
@@ -152,5 +152,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&xr);CHKERRQ(ierr);
   ierr = VecDestroy(&xi);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/eps/examples/tutorials/ex1.c.html b/src/eps/examples/tutorials/ex1.c.html
index 99cbfd0..ef366a3 100644
--- a/src/eps/examples/tutorials/ex1.c.html
+++ b/src/eps/examples/tutorials/ex1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:27+00:00">
+<meta name="date" content="2016-05-16T10:33:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -49,7 +49,7 @@
 
 <a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian Eigenproblem, n=%D\n\n"</font>,n);
 
 <a name="line46"> 46: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -145,7 +145,7 @@
 <a name="line136">136: </a>      im = ki;
 <a name="line137">137: </a><font color="#A020F0">#endif</font>
 <a name="line138">138: </a>      <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line139">139: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %9f%+9f j %12g\n"</font>,(double)re,(double)im,(double)error);
+<a name="line139">139: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %9f%+9fi %12g\n"</font>,(double)re,(double)im,(double)error);
 <a name="line140">140: </a>      } <font color="#4169E1">else</font> {
 <a name="line141">141: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f       %12g\n"</font>,(double)re,(double)error);
 <a name="line142">142: </a>      }
@@ -161,7 +161,7 @@
 <a name="line152">152: </a>  VecDestroy(&xr);
 <a name="line153">153: </a>  VecDestroy(&xi);
 <a name="line154">154: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line155">155: </a>  <font color="#4169E1">return</font> 0;
+<a name="line155">155: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line156">156: </a>}
 </pre>
 </body>
diff --git a/src/eps/examples/tutorials/ex10.c b/src/eps/examples/tutorials/ex10.c
index a342053..21479a6 100644
--- a/src/eps/examples/tutorials/ex10.c
+++ b/src/eps/examples/tutorials/ex10.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -54,7 +54,7 @@ int main (int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian Eigenproblem (shell-enabled), n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -105,7 +105,7 @@ int main (int argc,char **argv)
        closest to 0 */
     ierr = EPSSetWhichEigenpairs(eps,EPS_SMALLEST_REAL);CHKERRQ(ierr);
 
-    /* (Optional) Create a context for the user-defined spectral tranform;
+    /* (Optional) Create a context for the user-defined spectral transform;
        this context can be defined to contain any application-specific data. */
     ierr = STCreate_User(&shell);CHKERRQ(ierr);
 
@@ -142,7 +142,7 @@ int main (int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -157,7 +157,7 @@ int main (int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 /***********************************************************************/
diff --git a/src/eps/examples/tutorials/ex10.c.html b/src/eps/examples/tutorials/ex10.c.html
index 3de4563..eaa37bd 100644
--- a/src/eps/examples/tutorials/ex10.c.html
+++ b/src/eps/examples/tutorials/ex10.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex10.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:29+00:00">
+<meta name="date" content="2016-05-16T10:33:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex10.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex10.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -63,7 +63,7 @@
 
 <a name="line55"> 55: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line57"> 57: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line57"> 57: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line58"> 58: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian Eigenproblem (shell-enabled), n=%D\n\n"</font>,n);
 
 <a name="line60"> 60: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -114,7 +114,7 @@
 <a name="line105">105: </a><font color="#B22222">       closest to 0 */</font>
 <a name="line106">106: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_REAL);
 
-<a name="line108">108: </a>    <font color="#B22222">/* (Optional) Create a context for the user-defined spectral tranform;</font>
+<a name="line108">108: </a>    <font color="#B22222">/* (Optional) Create a context for the user-defined spectral transform;</font>
 <a name="line109">109: </a><font color="#B22222">       this context can be defined to contain any application-specific data. */</font>
 <a name="line110">110: </a>    STCreate_User(&shell);
 
@@ -151,7 +151,7 @@
 <a name="line142">142: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line144">144: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line145">145: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line145">145: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line146">146: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line147">147: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line148">148: </a>  } <font color="#4169E1">else</font> {
@@ -166,7 +166,7 @@
 <a name="line157">157: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line158">158: </a>  MatDestroy(&A);
 <a name="line159">159: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line160">160: </a>  <font color="#4169E1">return</font> 0;
+<a name="line160">160: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line161">161: </a>}
 
 <a name="line163">163: </a><font color="#B22222">/***********************************************************************/</font>
diff --git a/src/eps/examples/tutorials/ex11.c b/src/eps/examples/tutorials/ex11.c
index 625f3c8..10e36ba 100644
--- a/src/eps/examples/tutorials/ex11.c
+++ b/src/eps/examples/tutorials/ex11.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -42,8 +42,8 @@ int main (int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nFiedler vector of a 2-D regular mesh, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -126,7 +126,7 @@ int main (int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -138,6 +138,6 @@ int main (int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex11.c.html b/src/eps/examples/tutorials/ex11.c.html
index 70aa407..65a1249 100644
--- a/src/eps/examples/tutorials/ex11.c.html
+++ b/src/eps/examples/tutorials/ex11.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex11.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:30+00:00">
+<meta name="date" content="2016-05-16T10:33:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex11.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex11.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -51,8 +51,8 @@
 
 <a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line47"> 47: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line48"> 48: </a>  N = n*m;
 <a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nFiedler vector of a 2-D regular mesh, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
@@ -135,7 +135,7 @@
 <a name="line126">126: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line128">128: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line129">129: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line129">129: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line130">130: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line131">131: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line132">132: </a>  } <font color="#4169E1">else</font> {
@@ -147,7 +147,7 @@
 <a name="line138">138: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line139">139: </a>  MatDestroy(&A);
 <a name="line140">140: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line141">141: </a>  <font color="#4169E1">return</font> 0;
+<a name="line141">141: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line142">142: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex12.c b/src/eps/examples/tutorials/ex12.c
index 6440d02..7437d3d 100644
--- a/src/eps/examples/tutorials/ex12.c
+++ b/src/eps/examples/tutorials/ex12.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -42,8 +42,8 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSymmetric-definite problem with two intervals, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -96,7 +96,7 @@ int main(int argc,char **argv)
      Set first interval and other settings for spectrum slicing
   */
   ierr = EPSSetWhichEigenpairs(eps,EPS_ALL);CHKERRQ(ierr);
-  ierr = EPSSetInterval(eps,1.0,1.3);CHKERRQ(ierr);
+  ierr = EPSSetInterval(eps,1.1,1.3);CHKERRQ(ierr);
   ierr = EPSGetST(eps,&st);CHKERRQ(ierr);
   ierr = STSetType(st,STSINVERT);CHKERRQ(ierr);
   ierr = STGetKSP(st,&ksp);CHKERRQ(ierr);
@@ -141,6 +141,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex12.c.html b/src/eps/examples/tutorials/ex12.c.html
index 094dc3c..0e40440 100644
--- a/src/eps/examples/tutorials/ex12.c.html
+++ b/src/eps/examples/tutorials/ex12.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex12.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:30+00:00">
+<meta name="date" content="2016-05-16T10:33:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex12.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex12.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -51,8 +51,8 @@
 
 <a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line47"> 47: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line48"> 48: </a>  N = n*m;
 <a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSymmetric-definite problem with two intervals, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
@@ -105,7 +105,7 @@
 <a name="line96"> 96: </a><font color="#B22222">     Set first interval and other settings for spectrum slicing</font>
 <a name="line97"> 97: </a><font color="#B22222">  */</font>
 <a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_ALL);
-<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(eps,1.0,1.3);
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(eps,1.1,1.3);
 <a name="line100">100: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
 <a name="line101">101: </a>  <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT);
 <a name="line102">102: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&ksp);
@@ -150,7 +150,7 @@
 <a name="line141">141: </a>  MatDestroy(&A);
 <a name="line142">142: </a>  MatDestroy(&B);
 <a name="line143">143: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line144">144: </a>  <font color="#4169E1">return</font> 0;
+<a name="line144">144: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line145">145: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex13.c b/src/eps/examples/tutorials/ex13.c
index f70f33f..52e9d68 100644
--- a/src/eps/examples/tutorials/ex13.c
+++ b/src/eps/examples/tutorials/ex13.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,11 +44,11 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
-  ierr = PetscOptionsGetInt(NULL,"-nulldim",&nulldim,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-nulldim",&nulldim,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nGeneralized Symmetric Eigenproblem, N=%D (%Dx%D grid), null(B)=%D\n\n",N,n,m,nulldim);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -140,7 +140,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -153,6 +153,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex13.c.html b/src/eps/examples/tutorials/ex13.c.html
index 202be45..a7b0f5d 100644
--- a/src/eps/examples/tutorials/ex13.c.html
+++ b/src/eps/examples/tutorials/ex13.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex13.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:30+00:00">
+<meta name="date" content="2016-05-16T10:33:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex13.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex13.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,11 +53,11 @@
 
 <a name="line45"> 45: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line47"> 47: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line48"> 48: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line47"> 47: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line48"> 48: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line49"> 49: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line50"> 50: </a>  N = n*m;
-<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-nulldim"</font>,&nulldim,NULL);
+<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-nulldim"</font>,&nulldim,NULL);
 <a name="line52"> 52: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nGeneralized Symmetric Eigenproblem, N=%D (%Dx%D grid), null(B)=%D\n\n"</font>,N,n,m,nulldim);
 
 <a name="line54"> 54: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -149,7 +149,7 @@
 <a name="line140">140: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line142">142: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line143">143: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line143">143: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line144">144: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line145">145: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line146">146: </a>  } <font color="#4169E1">else</font> {
@@ -162,7 +162,7 @@
 <a name="line153">153: </a>  MatDestroy(&A);
 <a name="line154">154: </a>  MatDestroy(&B);
 <a name="line155">155: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line156">156: </a>  <font color="#4169E1">return</font> 0;
+<a name="line156">156: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line157">157: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex18.c b/src/eps/examples/tutorials/ex18.c
index ccac1c3..cc9b1c9 100644
--- a/src/eps/examples/tutorials/ex18.c
+++ b/src/eps/examples/tutorials/ex18.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,7 +38,6 @@ PetscErrorCode MatMarkovModel(PetscInt m,Mat A);
 #define __FUNCT__ "main"
 int main(int argc,char **argv)
 {
-  Vec            v0;              /* initial vector */
   Mat            A;               /* operator matrix */
   EPS            eps;             /* eigenproblem solver context */
   EPSType        type;
@@ -51,10 +50,10 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   N = m*(m+1)/2;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMarkov Model, N=%D (m=%D)\n",N,m);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-target",&target,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-target",&target,NULL);CHKERRQ(ierr);
   ierr = SlepcSNPrintfScalar(str,50,target,PETSC_FALSE);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Searching closest eigenvalues to the right of %s.\n\n",str);CHKERRQ(ierr);
 
@@ -94,14 +93,6 @@ int main(int argc,char **argv)
   */
   ierr = EPSSetFromOptions(eps);CHKERRQ(ierr);
 
-  /*
-     Set the initial vector. This is optional, if not done the initial
-     vector is set to random values
-  */
-  ierr = MatCreateVecs(A,&v0,NULL);CHKERRQ(ierr);
-  ierr = VecSet(v0,1.0);CHKERRQ(ierr);
-  ierr = EPSSetInitialSpace(eps,1,&v0);CHKERRQ(ierr);
-
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                       Solve the eigensystem
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@@ -121,7 +112,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -133,9 +124,8 @@ int main(int argc,char **argv)
   }
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
-  ierr = VecDestroy(&v0);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/eps/examples/tutorials/ex18.c.html b/src/eps/examples/tutorials/ex18.c.html
index 0270a1a..ab8bb3b 100644
--- a/src/eps/examples/tutorials/ex18.c.html
+++ b/src/eps/examples/tutorials/ex18.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex18.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:31+00:00">
+<meta name="date" content="2016-05-16T10:33:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex18.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex18.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,197 +48,187 @@
 
 <a name="line39"> 39: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
 <a name="line40"> 40: </a>{
-<a name="line41"> 41: </a>  Vec            v0;              <font color="#B22222">/* initial vector */</font>
-<a name="line42"> 42: </a>  Mat            A;               <font color="#B22222">/* operator matrix */</font>
-<a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;             <font color="#B22222">/* eigenproblem solver context */</font>
-<a name="line44"> 44: </a>  <a href="../../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>        type;
-<a name="line45"> 45: </a>  PetscScalar    target=0.5;
-<a name="line46"> 46: </a>  PetscInt       N,m=15,nev;
-<a name="line47"> 47: </a>  PetscBool      terse;
-<a name="line48"> 48: </a>  PetscViewer    viewer;
-<a name="line50"> 50: </a>  char           str[50];
-
-<a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
-<a name="line55"> 55: </a>  N = m*(m+1)/2;
-<a name="line56"> 56: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov Model, N=%D (m=%D)\n"</font>,N,m);
-<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-target"</font>,&target,NULL);
-<a name="line58"> 58: </a>  <a href="../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,target,PETSC_FALSE);
-<a name="line59"> 59: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Searching closest eigenvalues to the right of %s.\n\n"</font>,str);
-
-<a name="line61"> 61: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line62"> 62: </a><font color="#B22222">     Compute the operator matrix that defines the eigensystem, Ax=kx</font>
-<a name="line63"> 63: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line65"> 65: </a>  MatCreate(PETSC_COMM_WORLD,&A);
-<a name="line66"> 66: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line67"> 67: </a>  MatSetFromOptions(A);
-<a name="line68"> 68: </a>  MatSetUp(A);
-<a name="line69"> 69: </a>  MatMarkovModel(m,A);
-
-<a name="line71"> 71: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line72"> 72: </a><font color="#B22222">                Create the eigensolver and set various options</font>
-<a name="line73"> 73: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line75"> 75: </a>  <font color="#B22222">/*</font>
-<a name="line76"> 76: </a><font color="#B22222">     Create eigensolver context</font>
-<a name="line77"> 77: </a><font color="#B22222">  */</font>
-<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
-
-<a name="line80"> 80: </a>  <font color="#B22222">/*</font>
-<a name="line81"> 81: </a><font color="#B22222">     Set operators. In this case, it is a standard eigenvalue problem</font>
-<a name="line82"> 82: </a><font color="#B22222">  */</font>
-<a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,NULL);
-<a name="line84"> 84: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
-
-<a name="line86"> 86: </a>  <font color="#B22222">/*</font>
-<a name="line87"> 87: </a><font color="#B22222">     Set the custom comparing routine in order to obtain the eigenvalues</font>
-<a name="line88"> 88: </a><font color="#B22222">     closest to the target on the right only</font>
-<a name="line89"> 89: </a><font color="#B22222">  */</font>
-<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(eps,MyEigenSort,&target);
-
-<a name="line92"> 92: </a>  <font color="#B22222">/*</font>
-<a name="line93"> 93: </a><font color="#B22222">     Set solver parameters at runtime</font>
-<a name="line94"> 94: </a><font color="#B22222">  */</font>
-<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
-
-<a name="line97"> 97: </a>  <font color="#B22222">/*</font>
-<a name="line98"> 98: </a><font color="#B22222">     Set the initial vector. This is optional, if not done the initial</font>
-<a name="line99"> 99: </a><font color="#B22222">     vector is set to random values</font>
-<a name="line100">100: </a><font color="#B22222">  */</font>
-<a name="line101">101: </a>  MatCreateVecs(A,&v0,NULL);
-<a name="line102">102: </a>  VecSet(v0,1.0);
-<a name="line103">103: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(eps,1,&v0);
-
-<a name="line105">105: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line106">106: </a><font color="#B22222">                      Solve the eigensystem</font>
-<a name="line107">107: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line109">109: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
-
-<a name="line111">111: </a>  <font color="#B22222">/*</font>
-<a name="line112">112: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line113">113: </a><font color="#B22222">  */</font>
-<a name="line114">114: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
-<a name="line115">115: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
-<a name="line116">116: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,&nev,NULL,NULL);
-<a name="line117">117: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-
-<a name="line119">119: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line120">120: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line121">121: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line123">123: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line124">124: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (terse) {
-<a name="line126">126: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
-<a name="line127">127: </a>  } <font color="#4169E1">else</font> {
-<a name="line128">128: </a>    PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
-<a name="line129">129: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);
-<a name="line130">130: </a>    <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,viewer);
-<a name="line131">131: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,viewer);
-<a name="line132">132: </a>    PetscViewerPopFormat(viewer);
-<a name="line133">133: </a>  }
-<a name="line134">134: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
-<a name="line135">135: </a>  MatDestroy(&A);
-<a name="line136">136: </a>  VecDestroy(&v0);
-<a name="line137">137: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line138">138: </a>  <font color="#4169E1">return</font> 0;
-<a name="line139">139: </a>}
-
-<a name="line143">143: </a><font color="#B22222">/*</font>
-<a name="line144">144: </a><font color="#B22222">    Matrix generator for a Markov model of a random walk on a triangular grid.</font>
-
-<a name="line146">146: </a><font color="#B22222">    This subroutine generates a test matrix that models a random walk on a</font>
-<a name="line147">147: </a><font color="#B22222">    triangular grid. This test example was used by G. W. Stewart ["{SRRIT} - a</font>
-<a name="line148">148: </a><font color="#B22222">    FORTRAN subroutine to calculate the dominant invariant subspaces of a real</font>
-<a name="line149">149: </a><font color="#B22222">    matrix", Tech. report. TR-514, University of Maryland (1978).] and in a few</font>
-<a name="line150">150: </a><font color="#B22222">    papers on eigenvalue problems by Y. Saad [see e.g. LAA, vol. 34, pp. 269-295</font>
-<a name="line151">151: </a><font color="#B22222">    (1980) ]. These matrices provide reasonably easy test problems for eigenvalue</font>
-<a name="line152">152: </a><font color="#B22222">    algorithms. The transpose of the matrix  is stochastic and so it is known</font>
-<a name="line153">153: </a><font color="#B22222">    that one is an exact eigenvalue. One seeks the eigenvector of the transpose</font>
-<a name="line154">154: </a><font color="#B22222">    associated with the eigenvalue unity. The problem is to calculate the steady</font>
-<a name="line155">155: </a><font color="#B22222">    state probability distribution of the system, which is the eigevector</font>
-<a name="line156">156: </a><font color="#B22222">    associated with the eigenvalue one and scaled in such a way that the sum all</font>
-<a name="line157">157: </a><font color="#B22222">    the components is equal to one.</font>
-
-<a name="line159">159: </a><font color="#B22222">    Note: the code will actually compute the transpose of the stochastic matrix</font>
-<a name="line160">160: </a><font color="#B22222">    that contains the transition probabilities.</font>
-<a name="line161">161: </a><font color="#B22222">*/</font>
-<a name="line162">162: </a><strong><font color="#4169E1"><a name="MatMarkovModel"></a>PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>
-<a name="line163">163: </a>{
-<a name="line164">164: </a>  const PetscReal cst = 0.5/(PetscReal)(m-1);
-<a name="line165">165: </a>  PetscReal       pd,pu;
-<a name="line166">166: </a>  PetscInt        Istart,Iend,i,j,jmax,ix=0;
-<a name="line167">167: </a>  PetscErrorCode  ierr;
-
-<a name="line170">170: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
-<a name="line171">171: </a>  <font color="#4169E1">for</font> (i=1;i<=m;i++) {
-<a name="line172">172: </a>    jmax = m-i+1;
-<a name="line173">173: </a>    <font color="#4169E1">for</font> (j=1;j<=jmax;j++) {
-<a name="line174">174: </a>      ix = ix + 1;
-<a name="line175">175: </a>      <font color="#4169E1">if</font> (ix-1<Istart || ix>Iend) <font color="#4169E1">continue</font>;  <font color="#B22222">/* compute only owned rows */</font>
-<a name="line176">176: </a>      <font color="#4169E1">if</font> (j!=jmax) {
-<a name="line177">177: </a>        pd = cst*(PetscReal)(i+j-1);
-<a name="line178">178: </a>        <font color="#B22222">/* north */</font>
-<a name="line179">179: </a>        <font color="#4169E1">if</font> (i==1) {
-<a name="line180">180: </a>          MatSetValue(A,ix-1,ix,2*pd,INSERT_VALUES);
-<a name="line181">181: </a>        } <font color="#4169E1">else</font> {
-<a name="line182">182: </a>          MatSetValue(A,ix-1,ix,pd,INSERT_VALUES);
-<a name="line183">183: </a>        }
-<a name="line184">184: </a>        <font color="#B22222">/* east */</font>
-<a name="line185">185: </a>        <font color="#4169E1">if</font> (j==1) {
-<a name="line186">186: </a>          MatSetValue(A,ix-1,ix+jmax-1,2*pd,INSERT_VALUES);
-<a name="line187">187: </a>        } <font color="#4169E1">else</font> {
-<a name="line188">188: </a>          MatSetValue(A,ix-1,ix+jmax-1,pd,INSERT_VALUES);
-<a name="line189">189: </a>        }
-<a name="line190">190: </a>      }
-<a name="line191">191: </a>      <font color="#B22222">/* south */</font>
-<a name="line192">192: </a>      pu = 0.5 - cst*(PetscReal)(i+j-3);
-<a name="line193">193: </a>      <font color="#4169E1">if</font> (j>1) {
-<a name="line194">194: </a>        MatSetValue(A,ix-1,ix-2,pu,INSERT_VALUES);
-<a name="line195">195: </a>      }
-<a name="line196">196: </a>      <font color="#B22222">/* west */</font>
-<a name="line197">197: </a>      <font color="#4169E1">if</font> (i>1) {
-<a name="line198">198: </a>        MatSetValue(A,ix-1,ix-jmax-2,pu,INSERT_VALUES);
-<a name="line199">199: </a>      }
-<a name="line200">200: </a>    }
-<a name="line201">201: </a>  }
-<a name="line202">202: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
-<a name="line203">203: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
-<a name="line204">204: </a>  <font color="#4169E1">return</font>(0);
-<a name="line205">205: </a>}
-
-<a name="line209">209: </a><font color="#B22222">/*</font>
-<a name="line210">210: </a><font color="#B22222">    Function for user-defined eigenvalue ordering criterion.</font>
-
-<a name="line212">212: </a><font color="#B22222">    Given two eigenvalues ar+i*ai and br+i*bi, the subroutine must choose</font>
-<a name="line213">213: </a><font color="#B22222">    one of them as the preferred one according to the criterion.</font>
-<a name="line214">214: </a><font color="#B22222">    In this example, the preferred value is the one closest to the target,</font>
-<a name="line215">215: </a><font color="#B22222">    but on the right side.</font>
-<a name="line216">216: </a><font color="#B22222">*/</font>
-<a name="line217">217: </a><strong><font color="#4169E1"><a name="MyEigenSort"></a>PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)</font></strong>
-<a name="line218">218: </a>{
-<a name="line219">219: </a>  PetscScalar target = *(PetscScalar*)ctx;
-<a name="line220">220: </a>  PetscReal   da,db;
-<a name="line221">221: </a>  PetscBool   aisright,bisright;
-
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (PetscRealPart(target) < PetscRealPart(ar)) aisright = PETSC_TRUE;
-<a name="line225">225: </a>  <font color="#4169E1">else</font> aisright = PETSC_FALSE;
-<a name="line226">226: </a>  <font color="#4169E1">if</font> (PetscRealPart(target) < PetscRealPart(br)) bisright = PETSC_TRUE;
-<a name="line227">227: </a>  <font color="#4169E1">else</font> bisright = PETSC_FALSE;
-<a name="line228">228: </a>  <font color="#4169E1">if</font> (aisright == bisright) {
-<a name="line229">229: </a>    <font color="#B22222">/* both are on the same side of the target */</font>
-<a name="line230">230: </a>    da = SlepcAbsEigenvalue(ar-target,ai);
-<a name="line231">231: </a>    db = SlepcAbsEigenvalue(br-target,bi);
-<a name="line232">232: </a>    <font color="#4169E1">if</font> (da < db) *r = -1;
-<a name="line233">233: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (da > db) *r = 1;
-<a name="line234">234: </a>    <font color="#4169E1">else</font> *r = 0;
-<a name="line235">235: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (aisright && !bisright) *r = -1; <font color="#B22222">/* 'a' is on the right */</font>
-<a name="line236">236: </a>  <font color="#4169E1">else</font> *r = 1;  <font color="#B22222">/* 'b' is on the right */</font>
-<a name="line237">237: </a>  <font color="#4169E1">return</font>(0);
-<a name="line238">238: </a>}
+<a name="line41"> 41: </a>  Mat            A;               <font color="#B22222">/* operator matrix */</font>
+<a name="line42"> 42: </a>  <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;             <font color="#B22222">/* eigenproblem solver context */</font>
+<a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>        type;
+<a name="line44"> 44: </a>  PetscScalar    target=0.5;
+<a name="line45"> 45: </a>  PetscInt       N,m=15,nev;
+<a name="line46"> 46: </a>  PetscBool      terse;
+<a name="line47"> 47: </a>  PetscViewer    viewer;
+<a name="line49"> 49: </a>  char           str[50];
+
+<a name="line51"> 51: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line53"> 53: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line54"> 54: </a>  N = m*(m+1)/2;
+<a name="line55"> 55: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov Model, N=%D (m=%D)\n"</font>,N,m);
+<a name="line56"> 56: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-target"</font>,&target,NULL);
+<a name="line57"> 57: </a>  <a href="../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,target,PETSC_FALSE);
+<a name="line58"> 58: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Searching closest eigenvalues to the right of %s.\n\n"</font>,str);
+
+<a name="line60"> 60: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line61"> 61: </a><font color="#B22222">     Compute the operator matrix that defines the eigensystem, Ax=kx</font>
+<a name="line62"> 62: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line64"> 64: </a>  MatCreate(PETSC_COMM_WORLD,&A);
+<a name="line65"> 65: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line66"> 66: </a>  MatSetFromOptions(A);
+<a name="line67"> 67: </a>  MatSetUp(A);
+<a name="line68"> 68: </a>  MatMarkovModel(m,A);
+
+<a name="line70"> 70: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line71"> 71: </a><font color="#B22222">                Create the eigensolver and set various options</font>
+<a name="line72"> 72: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line74"> 74: </a>  <font color="#B22222">/*</font>
+<a name="line75"> 75: </a><font color="#B22222">     Create eigensolver context</font>
+<a name="line76"> 76: </a><font color="#B22222">  */</font>
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
+
+<a name="line79"> 79: </a>  <font color="#B22222">/*</font>
+<a name="line80"> 80: </a><font color="#B22222">     Set operators. In this case, it is a standard eigenvalue problem</font>
+<a name="line81"> 81: </a><font color="#B22222">  */</font>
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,NULL);
+<a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
+
+<a name="line85"> 85: </a>  <font color="#B22222">/*</font>
+<a name="line86"> 86: </a><font color="#B22222">     Set the custom comparing routine in order to obtain the eigenvalues</font>
+<a name="line87"> 87: </a><font color="#B22222">     closest to the target on the right only</font>
+<a name="line88"> 88: </a><font color="#B22222">  */</font>
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(eps,MyEigenSort,&target);
+
+<a name="line91"> 91: </a>  <font color="#B22222">/*</font>
+<a name="line92"> 92: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line93"> 93: </a><font color="#B22222">  */</font>
+<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
+
+<a name="line96"> 96: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line97"> 97: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line98"> 98: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line100">100: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
+
+<a name="line102">102: </a>  <font color="#B22222">/*</font>
+<a name="line103">103: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line104">104: </a><font color="#B22222">  */</font>
+<a name="line105">105: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
+<a name="line106">106: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
+<a name="line107">107: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,&nev,NULL,NULL);
+<a name="line108">108: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line110">110: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line111">111: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line112">112: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line114">114: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line115">115: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line116">116: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line117">117: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
+<a name="line118">118: </a>  } <font color="#4169E1">else</font> {
+<a name="line119">119: </a>    PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line120">120: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line121">121: </a>    <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,viewer);
+<a name="line122">122: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,viewer);
+<a name="line123">123: </a>    PetscViewerPopFormat(viewer);
+<a name="line124">124: </a>  }
+<a name="line125">125: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
+<a name="line126">126: </a>  MatDestroy(&A);
+<a name="line127">127: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line128">128: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line129">129: </a>}
+
+<a name="line133">133: </a><font color="#B22222">/*</font>
+<a name="line134">134: </a><font color="#B22222">    Matrix generator for a Markov model of a random walk on a triangular grid.</font>
+
+<a name="line136">136: </a><font color="#B22222">    This subroutine generates a test matrix that models a random walk on a</font>
+<a name="line137">137: </a><font color="#B22222">    triangular grid. This test example was used by G. W. Stewart ["{SRRIT} - a</font>
+<a name="line138">138: </a><font color="#B22222">    FORTRAN subroutine to calculate the dominant invariant subspaces of a real</font>
+<a name="line139">139: </a><font color="#B22222">    matrix", Tech. report. TR-514, University of Maryland (1978).] and in a few</font>
+<a name="line140">140: </a><font color="#B22222">    papers on eigenvalue problems by Y. Saad [see e.g. LAA, vol. 34, pp. 269-295</font>
+<a name="line141">141: </a><font color="#B22222">    (1980) ]. These matrices provide reasonably easy test problems for eigenvalue</font>
+<a name="line142">142: </a><font color="#B22222">    algorithms. The transpose of the matrix  is stochastic and so it is known</font>
+<a name="line143">143: </a><font color="#B22222">    that one is an exact eigenvalue. One seeks the eigenvector of the transpose</font>
+<a name="line144">144: </a><font color="#B22222">    associated with the eigenvalue unity. The problem is to calculate the steady</font>
+<a name="line145">145: </a><font color="#B22222">    state probability distribution of the system, which is the eigevector</font>
+<a name="line146">146: </a><font color="#B22222">    associated with the eigenvalue one and scaled in such a way that the sum all</font>
+<a name="line147">147: </a><font color="#B22222">    the components is equal to one.</font>
+
+<a name="line149">149: </a><font color="#B22222">    Note: the code will actually compute the transpose of the stochastic matrix</font>
+<a name="line150">150: </a><font color="#B22222">    that contains the transition probabilities.</font>
+<a name="line151">151: </a><font color="#B22222">*/</font>
+<a name="line152">152: </a><strong><font color="#4169E1"><a name="MatMarkovModel"></a>PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>
+<a name="line153">153: </a>{
+<a name="line154">154: </a>  const PetscReal cst = 0.5/(PetscReal)(m-1);
+<a name="line155">155: </a>  PetscReal       pd,pu;
+<a name="line156">156: </a>  PetscInt        Istart,Iend,i,j,jmax,ix=0;
+<a name="line157">157: </a>  PetscErrorCode  ierr;
+
+<a name="line160">160: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
+<a name="line161">161: </a>  <font color="#4169E1">for</font> (i=1;i<=m;i++) {
+<a name="line162">162: </a>    jmax = m-i+1;
+<a name="line163">163: </a>    <font color="#4169E1">for</font> (j=1;j<=jmax;j++) {
+<a name="line164">164: </a>      ix = ix + 1;
+<a name="line165">165: </a>      <font color="#4169E1">if</font> (ix-1<Istart || ix>Iend) <font color="#4169E1">continue</font>;  <font color="#B22222">/* compute only owned rows */</font>
+<a name="line166">166: </a>      <font color="#4169E1">if</font> (j!=jmax) {
+<a name="line167">167: </a>        pd = cst*(PetscReal)(i+j-1);
+<a name="line168">168: </a>        <font color="#B22222">/* north */</font>
+<a name="line169">169: </a>        <font color="#4169E1">if</font> (i==1) {
+<a name="line170">170: </a>          MatSetValue(A,ix-1,ix,2*pd,INSERT_VALUES);
+<a name="line171">171: </a>        } <font color="#4169E1">else</font> {
+<a name="line172">172: </a>          MatSetValue(A,ix-1,ix,pd,INSERT_VALUES);
+<a name="line173">173: </a>        }
+<a name="line174">174: </a>        <font color="#B22222">/* east */</font>
+<a name="line175">175: </a>        <font color="#4169E1">if</font> (j==1) {
+<a name="line176">176: </a>          MatSetValue(A,ix-1,ix+jmax-1,2*pd,INSERT_VALUES);
+<a name="line177">177: </a>        } <font color="#4169E1">else</font> {
+<a name="line178">178: </a>          MatSetValue(A,ix-1,ix+jmax-1,pd,INSERT_VALUES);
+<a name="line179">179: </a>        }
+<a name="line180">180: </a>      }
+<a name="line181">181: </a>      <font color="#B22222">/* south */</font>
+<a name="line182">182: </a>      pu = 0.5 - cst*(PetscReal)(i+j-3);
+<a name="line183">183: </a>      <font color="#4169E1">if</font> (j>1) {
+<a name="line184">184: </a>        MatSetValue(A,ix-1,ix-2,pu,INSERT_VALUES);
+<a name="line185">185: </a>      }
+<a name="line186">186: </a>      <font color="#B22222">/* west */</font>
+<a name="line187">187: </a>      <font color="#4169E1">if</font> (i>1) {
+<a name="line188">188: </a>        MatSetValue(A,ix-1,ix-jmax-2,pu,INSERT_VALUES);
+<a name="line189">189: </a>      }
+<a name="line190">190: </a>    }
+<a name="line191">191: </a>  }
+<a name="line192">192: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
+<a name="line193">193: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
+<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
+<a name="line195">195: </a>}
+
+<a name="line199">199: </a><font color="#B22222">/*</font>
+<a name="line200">200: </a><font color="#B22222">    Function for user-defined eigenvalue ordering criterion.</font>
+
+<a name="line202">202: </a><font color="#B22222">    Given two eigenvalues ar+i*ai and br+i*bi, the subroutine must choose</font>
+<a name="line203">203: </a><font color="#B22222">    one of them as the preferred one according to the criterion.</font>
+<a name="line204">204: </a><font color="#B22222">    In this example, the preferred value is the one closest to the target,</font>
+<a name="line205">205: </a><font color="#B22222">    but on the right side.</font>
+<a name="line206">206: </a><font color="#B22222">*/</font>
+<a name="line207">207: </a><strong><font color="#4169E1"><a name="MyEigenSort"></a>PetscErrorCode MyEigenSort(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)</font></strong>
+<a name="line208">208: </a>{
+<a name="line209">209: </a>  PetscScalar target = *(PetscScalar*)ctx;
+<a name="line210">210: </a>  PetscReal   da,db;
+<a name="line211">211: </a>  PetscBool   aisright,bisright;
+
+<a name="line214">214: </a>  <font color="#4169E1">if</font> (PetscRealPart(target) < PetscRealPart(ar)) aisright = PETSC_TRUE;
+<a name="line215">215: </a>  <font color="#4169E1">else</font> aisright = PETSC_FALSE;
+<a name="line216">216: </a>  <font color="#4169E1">if</font> (PetscRealPart(target) < PetscRealPart(br)) bisright = PETSC_TRUE;
+<a name="line217">217: </a>  <font color="#4169E1">else</font> bisright = PETSC_FALSE;
+<a name="line218">218: </a>  <font color="#4169E1">if</font> (aisright == bisright) {
+<a name="line219">219: </a>    <font color="#B22222">/* both are on the same side of the target */</font>
+<a name="line220">220: </a>    da = SlepcAbsEigenvalue(ar-target,ai);
+<a name="line221">221: </a>    db = SlepcAbsEigenvalue(br-target,bi);
+<a name="line222">222: </a>    <font color="#4169E1">if</font> (da < db) *r = -1;
+<a name="line223">223: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (da > db) *r = 1;
+<a name="line224">224: </a>    <font color="#4169E1">else</font> *r = 0;
+<a name="line225">225: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (aisright && !bisright) *r = -1; <font color="#B22222">/* 'a' is on the right */</font>
+<a name="line226">226: </a>  <font color="#4169E1">else</font> *r = 1;  <font color="#B22222">/* 'b' is on the right */</font>
+<a name="line227">227: </a>  <font color="#4169E1">return</font>(0);
+<a name="line228">228: </a>}
 </pre>
 </body>
 
diff --git a/src/eps/examples/tutorials/ex19.c b/src/eps/examples/tutorials/ex19.c
index 4aed271..2164be1 100644
--- a/src/eps/examples/tutorials/ex19.c
+++ b/src/eps/examples/tutorials/ex19.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -133,7 +133,7 @@ int main(int argc,char **argv)
 
   /* create random initial vector */
   seed = 1;
-  ierr = PetscOptionsGetInt(NULL,"-seed",&seed,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-seed",&seed,NULL);CHKERRQ(ierr);
   if (seed<0) SETERRQ(PETSC_COMM_WORLD,1,"Seed must be >=0");
   ierr = MatCreateVecs(A,&v0,NULL);CHKERRQ(ierr);
   ierr = PetscRandomCreate(PETSC_COMM_WORLD,&rctx);CHKERRQ(ierr);
@@ -241,7 +241,7 @@ int main(int argc,char **argv)
   /*
      Show computing times
   */
-  ierr = PetscOptionsHasName(NULL,"-showtimes",&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-showtimes",&flg);CHKERRQ(ierr);
   if (flg) {
     ierr = PetscPrintf(PETSC_COMM_WORLD," Elapsed time: %g (setup), %g (solve)\n",(double)(t2-t1),(double)(t3-t2));CHKERRQ(ierr);
   }
@@ -255,6 +255,6 @@ int main(int argc,char **argv)
   ierr = PetscRandomDestroy(&rctx);CHKERRQ(ierr);
   ierr = DMDestroy(&da);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex19.c.html b/src/eps/examples/tutorials/ex19.c.html
index fd72080..734345a 100644
--- a/src/eps/examples/tutorials/ex19.c.html
+++ b/src/eps/examples/tutorials/ex19.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex19.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:31+00:00">
+<meta name="date" content="2016-05-16T10:33:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex19.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex19.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -134,7 +134,7 @@
 
 <a name="line134">134: </a>  <font color="#B22222">/* create random initial vector */</font>
 <a name="line135">135: </a>  seed = 1;
-<a name="line136">136: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-seed"</font>,&seed,NULL);
+<a name="line136">136: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-seed"</font>,&seed,NULL);
 <a name="line137">137: </a>  <font color="#4169E1">if</font> (seed<0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Seed must be >=0"</font>);
 <a name="line138">138: </a>  MatCreateVecs(A,&v0,NULL);
 <a name="line139">139: </a>  PetscRandomCreate(PETSC_COMM_WORLD,&rctx);
@@ -242,7 +242,7 @@
 <a name="line241">241: </a>  <font color="#B22222">/*</font>
 <a name="line242">242: </a><font color="#B22222">     Show computing times</font>
 <a name="line243">243: </a><font color="#B22222">  */</font>
-<a name="line244">244: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-showtimes"</font>,&flg);
+<a name="line244">244: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-showtimes"</font>,&flg);
 <a name="line245">245: </a>  <font color="#4169E1">if</font> (flg) {
 <a name="line246">246: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Elapsed time: %g (setup), %g (solve)\n"</font>,(double)(t2-t1),(double)(t3-t2));
 <a name="line247">247: </a>  }
@@ -256,7 +256,7 @@
 <a name="line255">255: </a>  PetscRandomDestroy(&rctx);
 <a name="line256">256: </a>  DMDestroy(&da);
 <a name="line257">257: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line258">258: </a>  <font color="#4169E1">return</font> 0;
+<a name="line258">258: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line259">259: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex1f.F b/src/eps/examples/tutorials/ex1f.F
index 5ed1b51..ebe2145 100644
--- a/src/eps/examples/tutorials/ex1f.F
+++ b/src/eps/examples/tutorials/ex1f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n ex1f [-help] [-n <n>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./ex1f [-help] [-n <n>] [all SLEPc options] 
 !
 !  Description: Simple example that solves an eigensystem with the EPS object.
 !  The standard symmetric eigenvalue problem to be solved corresponds to the 
@@ -67,7 +67,8 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       n = 30
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',n,flg,ierr)
 
       if (rank .eq. 0) then
         write(*,100) n
diff --git a/src/eps/examples/tutorials/ex1f.F.html b/src/eps/examples/tutorials/ex1f.F.html
index 2a5398d..7b928a9 100644
--- a/src/eps/examples/tutorials/ex1f.F.html
+++ b/src/eps/examples/tutorials/ex1f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex1f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:32+00:00">
+<meta name="date" content="2016-05-16T10:33:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex1f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex1f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n ex1f [-help] [-n <n>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./ex1f [-help] [-n <n>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Simple example that solves an eigensystem with the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.
 <a name="line23"> 23: </a>!  The standard symmetric eigenvalue problem to be solved corresponds to the 
@@ -79,145 +79,146 @@
 <a name="line67"> 67: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line68"> 68: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line69"> 69: </a>      n = 30
-<a name="line70"> 70: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
-
-<a name="line72"> 72: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line73"> 73: </a>        write(*,100) n
-<a name="line74"> 74: </a>      endif
-<a name="line75"> 75: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')
-
-<a name="line77"> 77: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line78"> 78: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
-<a name="line79"> 79: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line81"> 81: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
-<a name="line82"> 82: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
-<a name="line83"> 83: </a>      call MatSetFromOptions(A,ierr)
-<a name="line84"> 84: </a>      call MatSetUp(A,ierr)
-
-<a name="line86"> 86: </a>      i1 = 1
-<a name="line87"> 87: </a>      i2 = 2
-<a name="line88"> 88: </a>      i3 = 3
-<a name="line89"> 89: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
-<a name="line90"> 90: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
-<a name="line91"> 91: </a>        i = 0
-<a name="line92"> 92: </a>        col(1) = 0
-<a name="line93"> 93: </a>        col(2) = 1
-<a name="line94"> 94: </a>        value(1) =  2.0
-<a name="line95"> 95: </a>        value(2) = -1.0
-<a name="line96"> 96: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
-<a name="line97"> 97: </a>        Istart = Istart+1
-<a name="line98"> 98: </a>      endif
-<a name="line99"> 99: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
-<a name="line100">100: </a>        i = n-1
-<a name="line101">101: </a>        col(1) = n-2
-<a name="line102">102: </a>        col(2) = n-1
-<a name="line103">103: </a>        value(1) = -1.0
-<a name="line104">104: </a>        value(2) =  2.0
-<a name="line105">105: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
-<a name="line106">106: </a>        Iend = Iend-1
-<a name="line107">107: </a>      endif
-<a name="line108">108: </a>      value(1) = -1.0
-<a name="line109">109: </a>      value(2) =  2.0
-<a name="line110">110: </a>      value(3) = -1.0
-<a name="line111">111: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
-<a name="line112">112: </a>        col(1) = i-1
-<a name="line113">113: </a>        col(2) = i
-<a name="line114">114: </a>        col(3) = i+1
-<a name="line115">115: </a>        call MatSetValues(A,i1,i,i3,col,value,INSERT_VALUES,ierr)
-<a name="line116">116: </a>      enddo
-
-<a name="line118">118: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line119">119: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line121">121: </a>      call MatCreateVecs(A,xr,xi,ierr)
-
-<a name="line123">123: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line124">124: </a>!     Create the eigensolver and display info
-<a name="line125">125: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line127">127: </a>!     ** Create eigensolver context
-<a name="line128">128: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
-
-<a name="line130">130: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
-<a name="line131">131: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
-<a name="line132">132: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
-
-<a name="line134">134: </a>!     ** Set solver parameters at runtime
-<a name="line135">135: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
-
-<a name="line137">137: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line138">138: </a>!     Solve the eigensystem
-<a name="line139">139: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line141">141: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
-<a name="line142">142: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,its,ierr)
-<a name="line143">143: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line144">144: </a>        write(*,110) its
-<a name="line145">145: </a>      endif
-<a name="line146">146: </a> 110  format (/' Number of iterations of the method:',I4)
-
-<a name="line148">148: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line149">149: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
-<a name="line150">150: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line151">151: </a>        write(*,120) tname
-<a name="line152">152: </a>      endif
-<a name="line153">153: </a> 120  format (' Solution method: ',A)
-<a name="line154">154: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
-<a name="line155">155: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line156">156: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line157">157: </a>        write(*,130) nev
-<a name="line158">158: </a>      endif
-<a name="line159">159: </a> 130  format (' Number of requested eigenvalues:',I2)
-<a name="line160">160: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,tol,maxit,ierr)
-<a name="line161">161: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line162">162: </a>        write(*,140) tol, maxit
-<a name="line163">163: </a>      endif
-<a name="line164">164: </a> 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)
-
-<a name="line166">166: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line167">167: </a>!     Display solution and clean up
-<a name="line168">168: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line170">170: </a>!     ** Get number of converged eigenpairs
-<a name="line171">171: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,nconv,ierr)
-<a name="line172">172: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line173">173: </a>        write(*,150) nconv
-<a name="line174">174: </a>      endif
-<a name="line175">175: </a> 150  format (' Number of converged eigenpairs:',I2/)
-
-<a name="line177">177: </a>!     ** Display eigenvalues and relative errors
-<a name="line178">178: </a>      <font color="#4169E1">if</font> (nconv.gt.0) then
-<a name="line179">179: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line180">180: </a>          write(*,*) '         k          ||Ax-kx||/||kx||'
-<a name="line181">181: </a>          write(*,*) ' ----------------- ------------------'
-<a name="line182">182: </a>        endif
-<a name="line183">183: </a>        <font color="#4169E1">do</font> i=0,nconv-1
-<a name="line184">184: </a>!         ** Get converged eigenpairs: i-th eigenvalue is stored in kr 
-<a name="line185">185: </a>!         ** (real part) and ki (imaginary part)
-<a name="line186">186: </a>          call <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,kr,ki,xr,xi,ierr)
-
-<a name="line188">188: </a>!         ** Compute the relative error associated to each eigenpair
-<a name="line189">189: </a>          call <a href="../../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_RELATIVE,error,ierr)
-<a name="line190">190: </a>          <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line191">191: </a>            write(*,160) PetscRealPart(kr), error
-<a name="line192">192: </a>          endif
-<a name="line193">193: </a> 160      format (1P,'   ',E12.4,'       ',E12.4)
-
-<a name="line195">195: </a>        enddo
-<a name="line196">196: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line197">197: </a>          write(*,*)
-<a name="line198">198: </a>        endif
-<a name="line199">199: </a>      endif
-
-<a name="line201">201: </a>!     ** Free work space
-<a name="line202">202: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
-<a name="line203">203: </a>      call MatDestroy(A,ierr)
-<a name="line204">204: </a>      call VecDestroy(xr,ierr)
-<a name="line205">205: </a>      call VecDestroy(xi,ierr)
-
-<a name="line207">207: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line208">208: </a>      end
+<a name="line70"> 70: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line71"> 71: </a>     &                        '-n',n,flg,ierr)
+
+<a name="line73"> 73: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line74"> 74: </a>        write(*,100) n
+<a name="line75"> 75: </a>      endif
+<a name="line76"> 76: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I3,' (Fortran)')
+
+<a name="line78"> 78: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line79"> 79: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
+<a name="line80"> 80: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line82"> 82: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
+<a name="line83"> 83: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line84"> 84: </a>      call MatSetFromOptions(A,ierr)
+<a name="line85"> 85: </a>      call MatSetUp(A,ierr)
+
+<a name="line87"> 87: </a>      i1 = 1
+<a name="line88"> 88: </a>      i2 = 2
+<a name="line89"> 89: </a>      i3 = 3
+<a name="line90"> 90: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
+<a name="line91"> 91: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
+<a name="line92"> 92: </a>        i = 0
+<a name="line93"> 93: </a>        col(1) = 0
+<a name="line94"> 94: </a>        col(2) = 1
+<a name="line95"> 95: </a>        value(1) =  2.0
+<a name="line96"> 96: </a>        value(2) = -1.0
+<a name="line97"> 97: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
+<a name="line98"> 98: </a>        Istart = Istart+1
+<a name="line99"> 99: </a>      endif
+<a name="line100">100: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
+<a name="line101">101: </a>        i = n-1
+<a name="line102">102: </a>        col(1) = n-2
+<a name="line103">103: </a>        col(2) = n-1
+<a name="line104">104: </a>        value(1) = -1.0
+<a name="line105">105: </a>        value(2) =  2.0
+<a name="line106">106: </a>        call MatSetValues(A,i1,i,i2,col,value,INSERT_VALUES,ierr)
+<a name="line107">107: </a>        Iend = Iend-1
+<a name="line108">108: </a>      endif
+<a name="line109">109: </a>      value(1) = -1.0
+<a name="line110">110: </a>      value(2) =  2.0
+<a name="line111">111: </a>      value(3) = -1.0
+<a name="line112">112: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line113">113: </a>        col(1) = i-1
+<a name="line114">114: </a>        col(2) = i
+<a name="line115">115: </a>        col(3) = i+1
+<a name="line116">116: </a>        call MatSetValues(A,i1,i,i3,col,value,INSERT_VALUES,ierr)
+<a name="line117">117: </a>      enddo
+
+<a name="line119">119: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line120">120: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line122">122: </a>      call MatCreateVecs(A,xr,xi,ierr)
+
+<a name="line124">124: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line125">125: </a>!     Create the eigensolver and display info
+<a name="line126">126: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line128">128: </a>!     ** Create eigensolver context
+<a name="line129">129: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
+
+<a name="line131">131: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
+<a name="line132">132: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
+<a name="line133">133: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
+
+<a name="line135">135: </a>!     ** Set solver parameters at runtime
+<a name="line136">136: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
+
+<a name="line138">138: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line139">139: </a>!     Solve the eigensystem
+<a name="line140">140: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line142">142: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
+<a name="line143">143: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,its,ierr)
+<a name="line144">144: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line145">145: </a>        write(*,110) its
+<a name="line146">146: </a>      endif
+<a name="line147">147: </a> 110  format (/' Number of iterations of the method:',I4)
+
+<a name="line149">149: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line150">150: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
+<a name="line151">151: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line152">152: </a>        write(*,120) tname
+<a name="line153">153: </a>      endif
+<a name="line154">154: </a> 120  format (' Solution method: ',A)
+<a name="line155">155: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
+<a name="line156">156: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line157">157: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line158">158: </a>        write(*,130) nev
+<a name="line159">159: </a>      endif
+<a name="line160">160: </a> 130  format (' Number of requested eigenvalues:',I2)
+<a name="line161">161: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,tol,maxit,ierr)
+<a name="line162">162: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line163">163: </a>        write(*,140) tol, maxit
+<a name="line164">164: </a>      endif
+<a name="line165">165: </a> 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)
+
+<a name="line167">167: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line168">168: </a>!     Display solution and clean up
+<a name="line169">169: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line171">171: </a>!     ** Get number of converged eigenpairs
+<a name="line172">172: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,nconv,ierr)
+<a name="line173">173: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line174">174: </a>        write(*,150) nconv
+<a name="line175">175: </a>      endif
+<a name="line176">176: </a> 150  format (' Number of converged eigenpairs:',I2/)
+
+<a name="line178">178: </a>!     ** Display eigenvalues and relative errors
+<a name="line179">179: </a>      <font color="#4169E1">if</font> (nconv.gt.0) then
+<a name="line180">180: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line181">181: </a>          write(*,*) '         k          ||Ax-kx||/||kx||'
+<a name="line182">182: </a>          write(*,*) ' ----------------- ------------------'
+<a name="line183">183: </a>        endif
+<a name="line184">184: </a>        <font color="#4169E1">do</font> i=0,nconv-1
+<a name="line185">185: </a>!         ** Get converged eigenpairs: i-th eigenvalue is stored in kr 
+<a name="line186">186: </a>!         ** (real part) and ki (imaginary part)
+<a name="line187">187: </a>          call <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,kr,ki,xr,xi,ierr)
+
+<a name="line189">189: </a>!         ** Compute the relative error associated to each eigenpair
+<a name="line190">190: </a>          call <a href="../../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_RELATIVE,error,ierr)
+<a name="line191">191: </a>          <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line192">192: </a>            write(*,160) PetscRealPart(kr), error
+<a name="line193">193: </a>          endif
+<a name="line194">194: </a> 160      format (1P,'   ',E12.4,'       ',E12.4)
+
+<a name="line196">196: </a>        enddo
+<a name="line197">197: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line198">198: </a>          write(*,*)
+<a name="line199">199: </a>        endif
+<a name="line200">200: </a>      endif
+
+<a name="line202">202: </a>!     ** Free work space
+<a name="line203">203: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
+<a name="line204">204: </a>      call MatDestroy(A,ierr)
+<a name="line205">205: </a>      call VecDestroy(xr,ierr)
+<a name="line206">206: </a>      call VecDestroy(xi,ierr)
+
+<a name="line208">208: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line209">209: </a>      end
 
 </pre>
 </body>
diff --git a/src/eps/examples/tutorials/ex1f90.F90 b/src/eps/examples/tutorials/ex1f90.F90
index aecbe39..93068e6 100644
--- a/src/eps/examples/tutorials/ex1f90.F90
+++ b/src/eps/examples/tutorials/ex1f90.F90
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n ex1f90 [-help] [-n <n>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./ex1f90 [-help] [-n <n>] [all SLEPc options] 
 !
 !  Description: Simple example that solves an eigensystem with the EPS object.
 !  The standard symmetric eigenvalue problem to be solved corresponds to the 
@@ -75,7 +75,8 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       n = 30
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',n,flg,ierr)
 
       if (rank .eq. 0) then
         write(*,100) n
@@ -162,7 +163,8 @@
 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 !     ** show detailed info unless -terse option is given by user
-      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-terse',terse,ierr)
+      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+     &                        '-terse',terse,ierr)
       if (terse) then
         call EPSErrorView(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
       else
diff --git a/src/eps/examples/tutorials/ex1f90.F90.html b/src/eps/examples/tutorials/ex1f90.F90.html
index 5369f1b..02cf886 100644
--- a/src/eps/examples/tutorials/ex1f90.F90.html
+++ b/src/eps/examples/tutorials/ex1f90.F90.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex1f90.F90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:33+00:00">
+<meta name="date" content="2016-05-16T10:33:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex1f90.F90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex1f90.F90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n ex1f90 [-help] [-n <n>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./ex1f90 [-help] [-n <n>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Simple example that solves an eigensystem with the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.
 <a name="line23"> 23: </a>!  The standard symmetric eigenvalue problem to be solved corresponds to the 
@@ -87,109 +87,111 @@
 <a name="line75"> 75: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line76"> 76: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line77"> 77: </a>      n = 30
-<a name="line78"> 78: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
-
-<a name="line80"> 80: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line81"> 81: </a>        write(*,100) n
-<a name="line82"> 82: </a>      endif
-<a name="line83"> 83: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I4,' (Fortran)')
-
-<a name="line85"> 85: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line86"> 86: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
-<a name="line87"> 87: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line89"> 89: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
-<a name="line90"> 90: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
-<a name="line91"> 91: </a>      call MatSetFromOptions(A,ierr)
-<a name="line92"> 92: </a>      call MatSetUp(A,ierr)
-
-<a name="line94"> 94: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
-<a name="line95"> 95: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
-<a name="line96"> 96: </a>        row(1) = 0
-<a name="line97"> 97: </a>        col(1) = 0
-<a name="line98"> 98: </a>        col(2) = 1
-<a name="line99"> 99: </a>        value(1) =  2.0
-<a name="line100">100: </a>        value(2) = -1.0
-<a name="line101">101: </a>        call MatSetValues(A,one,row,two,col,value,INSERT_VALUES,ierr)
-<a name="line102">102: </a>        Istart = Istart+1
-<a name="line103">103: </a>      endif
-<a name="line104">104: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
-<a name="line105">105: </a>        row(1) = n-1
-<a name="line106">106: </a>        col(1) = n-2
-<a name="line107">107: </a>        col(2) = n-1
-<a name="line108">108: </a>        value(1) = -1.0
-<a name="line109">109: </a>        value(2) =  2.0
-<a name="line110">110: </a>        call MatSetValues(A,one,row,two,col,value,INSERT_VALUES,ierr)
-<a name="line111">111: </a>        Iend = Iend-1
-<a name="line112">112: </a>      endif
-<a name="line113">113: </a>      value(1) = -1.0
-<a name="line114">114: </a>      value(2) =  2.0
-<a name="line115">115: </a>      value(3) = -1.0
-<a name="line116">116: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
-<a name="line117">117: </a>        row(1) = i
-<a name="line118">118: </a>        col(1) = i-1
-<a name="line119">119: </a>        col(2) = i
-<a name="line120">120: </a>        col(3) = i+1
-<a name="line121">121: </a>        call MatSetValues(A,one,row,three,col,value,INSERT_VALUES,ierr)
-<a name="line122">122: </a>      enddo
-
-<a name="line124">124: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line125">125: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line127">127: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line128">128: </a>!     Create the eigensolver and display info
-<a name="line129">129: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line131">131: </a>!     ** Create eigensolver context
-<a name="line132">132: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
-
-<a name="line134">134: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
-<a name="line135">135: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
-<a name="line136">136: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
-
-<a name="line138">138: </a>!     ** Set solver parameters at runtime
-<a name="line139">139: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
-
-<a name="line141">141: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line142">142: </a>!     Solve the eigensystem
-<a name="line143">143: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line145">145: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
-
-<a name="line147">147: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line148">148: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
-<a name="line149">149: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line150">150: </a>        write(*,120) tname
-<a name="line151">151: </a>      endif
-<a name="line152">152: </a> 120  format (' Solution method: ',A)
-<a name="line153">153: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
-<a name="line154">154: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line155">155: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line156">156: </a>        write(*,130) nev
-<a name="line157">157: </a>      endif
-<a name="line158">158: </a> 130  format (' Number of requested eigenvalues:',I4)
-
-<a name="line160">160: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line161">161: </a>!     Display solution and clean up
-<a name="line162">162: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line164">164: </a>!     ** show detailed info unless -terse option is given by user
-<a name="line165">165: </a>      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-terse',terse,ierr)
-<a name="line166">166: </a>      <font color="#4169E1">if</font> (terse) then
-<a name="line167">167: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
-<a name="line168">168: </a>      <font color="#4169E1">else</font>
-<a name="line169">169: </a>        call PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,           &
-<a name="line170">170: </a>     &                   PETSC_VIEWER_ASCII_INFO_DETAIL,ierr)
-<a name="line171">171: </a>        call <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line172">172: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,                       &
-<a name="line173">173: </a>     &                   PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line174">174: </a>        call PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line175">175: </a>      endif
-<a name="line176">176: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
-<a name="line177">177: </a>      call MatDestroy(A,ierr)
-
-<a name="line179">179: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line180">180: </a>      end
+<a name="line78"> 78: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line79"> 79: </a>     &                        '-n',n,flg,ierr)
+
+<a name="line81"> 81: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line82"> 82: </a>        write(*,100) n
+<a name="line83"> 83: </a>      endif
+<a name="line84"> 84: </a> 100  format (/'1-D Laplacian Eigenproblem, n =',I4,' (Fortran)')
+
+<a name="line86"> 86: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line87"> 87: </a>!     Compute the operator matrix that defines the eigensystem, Ax=kx
+<a name="line88"> 88: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line90"> 90: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
+<a name="line91"> 91: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line92"> 92: </a>      call MatSetFromOptions(A,ierr)
+<a name="line93"> 93: </a>      call MatSetUp(A,ierr)
+
+<a name="line95"> 95: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
+<a name="line96"> 96: </a>      <font color="#4169E1">if</font> (Istart .eq. 0) then 
+<a name="line97"> 97: </a>        row(1) = 0
+<a name="line98"> 98: </a>        col(1) = 0
+<a name="line99"> 99: </a>        col(2) = 1
+<a name="line100">100: </a>        value(1) =  2.0
+<a name="line101">101: </a>        value(2) = -1.0
+<a name="line102">102: </a>        call MatSetValues(A,one,row,two,col,value,INSERT_VALUES,ierr)
+<a name="line103">103: </a>        Istart = Istart+1
+<a name="line104">104: </a>      endif
+<a name="line105">105: </a>      <font color="#4169E1">if</font> (Iend .eq. n) then 
+<a name="line106">106: </a>        row(1) = n-1
+<a name="line107">107: </a>        col(1) = n-2
+<a name="line108">108: </a>        col(2) = n-1
+<a name="line109">109: </a>        value(1) = -1.0
+<a name="line110">110: </a>        value(2) =  2.0
+<a name="line111">111: </a>        call MatSetValues(A,one,row,two,col,value,INSERT_VALUES,ierr)
+<a name="line112">112: </a>        Iend = Iend-1
+<a name="line113">113: </a>      endif
+<a name="line114">114: </a>      value(1) = -1.0
+<a name="line115">115: </a>      value(2) =  2.0
+<a name="line116">116: </a>      value(3) = -1.0
+<a name="line117">117: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line118">118: </a>        row(1) = i
+<a name="line119">119: </a>        col(1) = i-1
+<a name="line120">120: </a>        col(2) = i
+<a name="line121">121: </a>        col(3) = i+1
+<a name="line122">122: </a>        call MatSetValues(A,one,row,three,col,value,INSERT_VALUES,ierr)
+<a name="line123">123: </a>      enddo
+
+<a name="line125">125: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line126">126: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line128">128: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line129">129: </a>!     Create the eigensolver and display info
+<a name="line130">130: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line132">132: </a>!     ** Create eigensolver context
+<a name="line133">133: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
+
+<a name="line135">135: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
+<a name="line136">136: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
+<a name="line137">137: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP,ierr)
+
+<a name="line139">139: </a>!     ** Set solver parameters at runtime
+<a name="line140">140: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
+
+<a name="line142">142: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line143">143: </a>!     Solve the eigensystem
+<a name="line144">144: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line146">146: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
+
+<a name="line148">148: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line149">149: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
+<a name="line150">150: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line151">151: </a>        write(*,120) tname
+<a name="line152">152: </a>      endif
+<a name="line153">153: </a> 120  format (' Solution method: ',A)
+<a name="line154">154: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
+<a name="line155">155: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line156">156: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line157">157: </a>        write(*,130) nev
+<a name="line158">158: </a>      endif
+<a name="line159">159: </a> 130  format (' Number of requested eigenvalues:',I4)
+
+<a name="line161">161: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line162">162: </a>!     Display solution and clean up
+<a name="line163">163: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line165">165: </a>!     ** show detailed info unless -terse option is given by user
+<a name="line166">166: </a>      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+<a name="line167">167: </a>     &                        '-terse',terse,ierr)
+<a name="line168">168: </a>      <font color="#4169E1">if</font> (terse) then
+<a name="line169">169: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+<a name="line170">170: </a>      <font color="#4169E1">else</font>
+<a name="line171">171: </a>        call PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,           &
+<a name="line172">172: </a>     &                   PETSC_VIEWER_ASCII_INFO_DETAIL,ierr)
+<a name="line173">173: </a>        call <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line174">174: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,                       &
+<a name="line175">175: </a>     &                   PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line176">176: </a>        call PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line177">177: </a>      endif
+<a name="line178">178: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
+<a name="line179">179: </a>      call MatDestroy(A,ierr)
+
+<a name="line181">181: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line182">182: </a>      end
 
 </pre>
 </body>
diff --git a/src/eps/examples/tutorials/ex2.c b/src/eps/examples/tutorials/ex2.c
index ebef62f..a082133 100644
--- a/src/eps/examples/tutorials/ex2.c
+++ b/src/eps/examples/tutorials/ex2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -39,8 +39,8 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n2-D Laplacian Eigenproblem, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -106,7 +106,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -118,6 +118,6 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex2.c.html b/src/eps/examples/tutorials/ex2.c.html
index c0319a6..247999d 100644
--- a/src/eps/examples/tutorials/ex2.c.html
+++ b/src/eps/examples/tutorials/ex2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:27+00:00">
+<meta name="date" content="2016-05-16T10:33:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,8 +48,8 @@
 
 <a name="line40"> 40: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line44"> 44: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line45"> 45: </a>  N = n*m;
 <a name="line46"> 46: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n2-D Laplacian Eigenproblem, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
@@ -115,7 +115,7 @@
 <a name="line106">106: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line108">108: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line109">109: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line109">109: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line110">110: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line111">111: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line112">112: </a>  } <font color="#4169E1">else</font> {
@@ -127,7 +127,7 @@
 <a name="line118">118: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line119">119: </a>  MatDestroy(&A);
 <a name="line120">120: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line121">121: </a>  <font color="#4169E1">return</font> 0;
+<a name="line121">121: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line122">122: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex24.c b/src/eps/examples/tutorials/ex24.c
index d1edbf4..6c65bbf 100644
--- a/src/eps/examples/tutorials/ex24.c
+++ b/src/eps/examples/tutorials/ex24.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -55,18 +55,18 @@ int main(int argc,char **argv)
   PC             pc;
   EPSType        type;
   CTX_FOLD       *ctx;
-  PetscInt       nconv,N,n=10,m,Istart,Iend,II,its,i,j;
-  PetscReal      error,re,target=2.1;
+  PetscInt       nconv,N,n=10,m,Istart,Iend,II,i,j;
+  PetscReal      *error,*evals,target=2.1,tol;
   PetscScalar    lambda;
-  PetscBool      flag;
+  PetscBool      flag,terse,errok;
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
-  ierr = PetscOptionsGetReal(NULL,"-target",&target,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-target",&target,NULL);CHKERRQ(ierr);
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSpectrum Folding, N=%D (%Dx%D grid) target=%f\n\n",N,n,m,(double)target);CHKERRQ(ierr);
 
@@ -145,11 +145,9 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = EPSSolve(eps);CHKERRQ(ierr);
-
-  ierr = EPSGetIterationNumber(eps,&its);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of iterations of the method: %D\n",its);CHKERRQ(ierr);
   ierr = EPSGetType(eps,&type);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n\n",type);CHKERRQ(ierr);
+  ierr = EPSGetTolerances(eps,&tol,NULL);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                     Display solution and clean up
@@ -158,30 +156,41 @@ int main(int argc,char **argv)
   ierr = EPSGetConverged(eps,&nconv);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD," Number of converged eigenpairs: %D\n\n",nconv);CHKERRQ(ierr);
   if (nconv>0) {
-    /*
-       Display result
-    */
-    ierr = PetscPrintf(PETSC_COMM_WORLD,
-         "           k              ||Ax-kx||\n"
-         "   ----------------- ------------------\n");CHKERRQ(ierr);
-
+    ierr = PetscMalloc2(nconv,&evals,nconv,&error);CHKERRQ(ierr);
     for (i=0;i<nconv;i++) {
-      /*
-        Get i-th eigenvector, compute eigenvalue approximation from
-        Rayleigh quotient and compute residual norm
-      */
+      /*  Get i-th eigenvector, compute eigenvalue approximation from
+          Rayleigh quotient and compute residual norm */
       ierr = EPSGetEigenpair(eps,i,NULL,NULL,x,NULL);CHKERRQ(ierr);
       ierr = RayleighQuotient(A,x,&lambda);CHKERRQ(ierr);
-      ierr = ComputeResidualNorm(A,lambda,x,&error);CHKERRQ(ierr);
-
+      ierr = ComputeResidualNorm(A,lambda,x,&error[i]);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
-      re = PetscRealPart(lambda);
+      evals[i] = PetscRealPart(lambda);
 #else
-      re = lambda;
+      evals[i] = lambda;
 #endif
-      ierr = PetscPrintf(PETSC_COMM_WORLD,"   %12f       %12.2g\n",(double)re,(double)error);CHKERRQ(ierr);
+    }
+    ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+    if (!terse) {
+      ierr = PetscPrintf(PETSC_COMM_WORLD,
+           "           k              ||Ax-kx||\n"
+           "   ----------------- ------------------\n");CHKERRQ(ierr);
+      for (i=0;i<nconv;i++) {
+        ierr = PetscPrintf(PETSC_COMM_WORLD,"   %12f       %12.2g\n",(double)evals[i],(double)error[i]);CHKERRQ(ierr);
+      }
+    } else {
+      errok = PETSC_TRUE;
+      for (i=0;i<nconv;i++) errok = (errok && error[i]<5.0*tol)? PETSC_TRUE: PETSC_FALSE;
+      if (!errok) {
+        ierr = PetscPrintf(PETSC_COMM_WORLD," Problem: some of the first %D relative errors are higher than the tolerance\n\n",nconv);CHKERRQ(ierr);
+      } else {
+        ierr = PetscPrintf(PETSC_COMM_WORLD," nconv=%D eigenvalues computed up to the required tolerance:",nconv);CHKERRQ(ierr);
+        for (i=0;i<nconv;i++) {
+          ierr = PetscPrintf(PETSC_COMM_WORLD," %.5f",(double)evals[i]);CHKERRQ(ierr);
+        }
+      }
     }
     ierr = PetscPrintf(PETSC_COMM_WORLD,"\n");CHKERRQ(ierr);
+    ierr = PetscFree2(evals,error);CHKERRQ(ierr);
   }
 
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
@@ -191,7 +200,7 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&x);CHKERRQ(ierr);
   ierr = PetscFree(ctx);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/eps/examples/tutorials/ex24.c.html b/src/eps/examples/tutorials/ex24.c.html
index 1fc6ad6..d3675b9 100644
--- a/src/eps/examples/tutorials/ex24.c.html
+++ b/src/eps/examples/tutorials/ex24.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex24.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:31+00:00">
+<meta name="date" content="2016-05-16T10:33:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex24.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex24.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -65,17 +65,17 @@
 <a name="line55"> 55: </a>  PC             pc;
 <a name="line56"> 56: </a>  <a href="../../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>        type;
 <a name="line57"> 57: </a>  CTX_FOLD       *ctx;
-<a name="line58"> 58: </a>  PetscInt       nconv,N,n=10,m,Istart,Iend,II,its,i,j;
-<a name="line59"> 59: </a>  PetscReal      error,re,target=2.1;
+<a name="line58"> 58: </a>  PetscInt       nconv,N,n=10,m,Istart,Iend,II,i,j;
+<a name="line59"> 59: </a>  PetscReal      *error,*evals,target=2.1,tol;
 <a name="line60"> 60: </a>  PetscScalar    lambda;
-<a name="line61"> 61: </a>  PetscBool      flag;
+<a name="line61"> 61: </a>  PetscBool      flag,terse,errok;
 
 <a name="line64"> 64: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line66"> 66: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line67"> 67: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line66"> 66: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line67"> 67: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!flag) m=n;
-<a name="line69"> 69: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-target"</font>,&target,NULL);
+<a name="line69"> 69: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-target"</font>,&target,NULL);
 <a name="line70"> 70: </a>  N = n*m;
 <a name="line71"> 71: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSpectrum Folding, N=%D (%Dx%D grid) target=%f\n\n"</font>,N,n,m,(double)target);
 
@@ -154,102 +154,111 @@
 <a name="line145">145: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line147">147: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
-
-<a name="line149">149: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,&its);
-<a name="line150">150: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of iterations of the method: %D\n"</font>,its);
-<a name="line151">151: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
-<a name="line152">152: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
-
-<a name="line154">154: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line155">155: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line156">156: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line158">158: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,&nconv);
-<a name="line159">159: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of converged eigenpairs: %D\n\n"</font>,nconv);
-<a name="line160">160: </a>  <font color="#4169E1">if</font> (nconv>0) {
-<a name="line161">161: </a>    <font color="#B22222">/*</font>
-<a name="line162">162: </a><font color="#B22222">       Display result</font>
-<a name="line163">163: </a><font color="#B22222">    */</font>
-<a name="line164">164: </a>    PetscPrintf(PETSC_COMM_WORLD,
-<a name="line165">165: </a>         <font color="#666666">"           k              ||Ax-kx||\n"</font>
-<a name="line166">166: </a>         <font color="#666666">"   ----------------- ------------------\n"</font>);
-
-<a name="line168">168: </a>    <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
-<a name="line169">169: </a>      <font color="#B22222">/*</font>
-<a name="line170">170: </a><font color="#B22222">        Get i-th eigenvector, compute eigenvalue approximation from</font>
-<a name="line171">171: </a><font color="#B22222">        Rayleigh quotient and compute residual norm</font>
-<a name="line172">172: </a><font color="#B22222">      */</font>
-<a name="line173">173: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,x,NULL);
-<a name="line174">174: </a>      RayleighQuotient(A,x,&lambda);
-<a name="line175">175: </a>      ComputeResidualNorm(A,lambda,x,&error);
-
-<a name="line177">177: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line178">178: </a>      re = PetscRealPart(lambda);
-<a name="line179">179: </a><font color="#A020F0">#else</font>
-<a name="line180">180: </a>      re = lambda;
-<a name="line181">181: </a><font color="#A020F0">#endif</font>
-<a name="line182">182: </a>      PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f       %12.2g\n"</font>,(double)re,(double)error);
-<a name="line183">183: </a>    }
-<a name="line184">184: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
-<a name="line185">185: </a>  }
-
-<a name="line187">187: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
-<a name="line188">188: </a>  MatDestroy(&A);
-<a name="line189">189: </a>  MatDestroy(&M);
-<a name="line190">190: </a>  VecDestroy(&ctx->w);
-<a name="line191">191: </a>  VecDestroy(&x);
-<a name="line192">192: </a>  PetscFree(ctx);
-<a name="line193">193: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line194">194: </a>  <font color="#4169E1">return</font> 0;
-<a name="line195">195: </a>}
-
-<a name="line199">199: </a><font color="#B22222">/*</font>
-<a name="line200">200: </a><font color="#B22222">    Matrix-vector product subroutine for the spectrum folding.</font>
-<a name="line201">201: </a><font color="#B22222">       y <-- (A-t*I)^2*x</font>
-<a name="line202">202: </a><font color="#B22222"> */</font>
-<a name="line203">203: </a><strong><font color="#4169E1"><a name="MatMult_Fold"></a>PetscErrorCode MatMult_Fold(Mat M,Vec x,Vec y)</font></strong>
-<a name="line204">204: </a>{
-<a name="line205">205: </a>  CTX_FOLD       *ctx;
-<a name="line206">206: </a>  PetscScalar    sigma;
-
-<a name="line210">210: </a>  MatShellGetContext(M,&ctx);
-<a name="line211">211: </a>  sigma = -ctx->target;
-<a name="line212">212: </a>  MatMult(ctx->A,x,ctx->w);
-<a name="line213">213: </a>  VecAXPY(ctx->w,sigma,x);
-<a name="line214">214: </a>  MatMult(ctx->A,ctx->w,y);
-<a name="line215">215: </a>  VecAXPY(y,sigma,ctx->w);
-<a name="line216">216: </a>  <font color="#4169E1">return</font>(0);
-<a name="line217">217: </a>}
-
-<a name="line221">221: </a><font color="#B22222">/*</font>
-<a name="line222">222: </a><font color="#B22222">    Computes the Rayleigh quotient of a vector x</font>
-<a name="line223">223: </a><font color="#B22222">       r <-- x^T*A*x       (assumes x has unit norm)</font>
-<a name="line224">224: </a><font color="#B22222"> */</font>
-<a name="line225">225: </a><strong><font color="#4169E1"><a name="RayleighQuotient"></a>PetscErrorCode RayleighQuotient(Mat A,Vec x,PetscScalar *r)</font></strong>
-<a name="line226">226: </a>{
-<a name="line227">227: </a>  Vec            Ax;
-
-<a name="line231">231: </a>  VecDuplicate(x,&Ax);
-<a name="line232">232: </a>  MatMult(A,x,Ax);
-<a name="line233">233: </a>  VecDot(Ax,x,r);
-<a name="line234">234: </a>  VecDestroy(&Ax);
-<a name="line235">235: </a>  <font color="#4169E1">return</font>(0);
-<a name="line236">236: </a>}
-
-<a name="line240">240: </a><font color="#B22222">/*</font>
-<a name="line241">241: </a><font color="#B22222">    Computes the residual norm of an approximate eigenvector x, |A*x-lambda*x|</font>
-<a name="line242">242: </a><font color="#B22222"> */</font>
-<a name="line243">243: </a><strong><font color="#4169E1"><a name="ComputeResidualNorm"></a>PetscErrorCode ComputeResidualNorm(Mat A,PetscScalar lambda,Vec x,PetscReal *r)</font></strong>
-<a name="line244">244: </a>{
-<a name="line245">245: </a>  Vec            Ax;
-
-<a name="line249">249: </a>  VecDuplicate(x,&Ax);
-<a name="line250">250: </a>  MatMult(A,x,Ax);
-<a name="line251">251: </a>  VecAXPY(Ax,-lambda,x);
-<a name="line252">252: </a>  VecNorm(Ax,NORM_2,r);
-<a name="line253">253: </a>  VecDestroy(&Ax);
-<a name="line254">254: </a>  <font color="#4169E1">return</font>(0);
-<a name="line255">255: </a>}
+<a name="line148">148: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
+<a name="line149">149: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
+<a name="line150">150: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,&tol,NULL);
+
+<a name="line152">152: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line153">153: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line154">154: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line156">156: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,&nconv);
+<a name="line157">157: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of converged eigenpairs: %D\n\n"</font>,nconv);
+<a name="line158">158: </a>  <font color="#4169E1">if</font> (nconv>0) {
+<a name="line159">159: </a>    PetscMalloc2(nconv,&evals,nconv,&error);
+<a name="line160">160: </a>    <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
+<a name="line161">161: </a>      <font color="#B22222">/*  Get i-th eigenvector, compute eigenvalue approximation from</font>
+<a name="line162">162: </a><font color="#B22222">          Rayleigh quotient and compute residual norm */</font>
+<a name="line163">163: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,x,NULL);
+<a name="line164">164: </a>      RayleighQuotient(A,x,&lambda);
+<a name="line165">165: </a>      ComputeResidualNorm(A,lambda,x,&error[i]);
+<a name="line166">166: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line167">167: </a>      evals[i] = PetscRealPart(lambda);
+<a name="line168">168: </a><font color="#A020F0">#else</font>
+<a name="line169">169: </a>      evals[i] = lambda;
+<a name="line170">170: </a><font color="#A020F0">#endif</font>
+<a name="line171">171: </a>    }
+<a name="line172">172: </a>    PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line173">173: </a>    <font color="#4169E1">if</font> (!terse) {
+<a name="line174">174: </a>      PetscPrintf(PETSC_COMM_WORLD,
+<a name="line175">175: </a>           <font color="#666666">"           k              ||Ax-kx||\n"</font>
+<a name="line176">176: </a>           <font color="#666666">"   ----------------- ------------------\n"</font>);
+<a name="line177">177: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
+<a name="line178">178: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f       %12.2g\n"</font>,(double)evals[i],(double)error[i]);
+<a name="line179">179: </a>      }
+<a name="line180">180: </a>    } <font color="#4169E1">else</font> {
+<a name="line181">181: </a>      errok = PETSC_TRUE;
+<a name="line182">182: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) errok = (errok && error[i]<5.0*tol)? PETSC_TRUE: PETSC_FALSE;
+<a name="line183">183: </a>      <font color="#4169E1">if</font> (!errok) {
+<a name="line184">184: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,nconv);
+<a name="line185">185: </a>      } <font color="#4169E1">else</font> {
+<a name="line186">186: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" nconv=%D eigenvalues computed up to the required tolerance:"</font>,nconv);
+<a name="line187">187: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
+<a name="line188">188: </a>          PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %.5f"</font>,(double)evals[i]);
+<a name="line189">189: </a>        }
+<a name="line190">190: </a>      }
+<a name="line191">191: </a>    }
+<a name="line192">192: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
+<a name="line193">193: </a>    PetscFree2(evals,error);
+<a name="line194">194: </a>  }
+
+<a name="line196">196: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
+<a name="line197">197: </a>  MatDestroy(&A);
+<a name="line198">198: </a>  MatDestroy(&M);
+<a name="line199">199: </a>  VecDestroy(&ctx->w);
+<a name="line200">200: </a>  VecDestroy(&x);
+<a name="line201">201: </a>  PetscFree(ctx);
+<a name="line202">202: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line203">203: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line204">204: </a>}
+
+<a name="line208">208: </a><font color="#B22222">/*</font>
+<a name="line209">209: </a><font color="#B22222">    Matrix-vector product subroutine for the spectrum folding.</font>
+<a name="line210">210: </a><font color="#B22222">       y <-- (A-t*I)^2*x</font>
+<a name="line211">211: </a><font color="#B22222"> */</font>
+<a name="line212">212: </a><strong><font color="#4169E1"><a name="MatMult_Fold"></a>PetscErrorCode MatMult_Fold(Mat M,Vec x,Vec y)</font></strong>
+<a name="line213">213: </a>{
+<a name="line214">214: </a>  CTX_FOLD       *ctx;
+<a name="line215">215: </a>  PetscScalar    sigma;
+
+<a name="line219">219: </a>  MatShellGetContext(M,&ctx);
+<a name="line220">220: </a>  sigma = -ctx->target;
+<a name="line221">221: </a>  MatMult(ctx->A,x,ctx->w);
+<a name="line222">222: </a>  VecAXPY(ctx->w,sigma,x);
+<a name="line223">223: </a>  MatMult(ctx->A,ctx->w,y);
+<a name="line224">224: </a>  VecAXPY(y,sigma,ctx->w);
+<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
+<a name="line226">226: </a>}
+
+<a name="line230">230: </a><font color="#B22222">/*</font>
+<a name="line231">231: </a><font color="#B22222">    Computes the Rayleigh quotient of a vector x</font>
+<a name="line232">232: </a><font color="#B22222">       r <-- x^T*A*x       (assumes x has unit norm)</font>
+<a name="line233">233: </a><font color="#B22222"> */</font>
+<a name="line234">234: </a><strong><font color="#4169E1"><a name="RayleighQuotient"></a>PetscErrorCode RayleighQuotient(Mat A,Vec x,PetscScalar *r)</font></strong>
+<a name="line235">235: </a>{
+<a name="line236">236: </a>  Vec            Ax;
+
+<a name="line240">240: </a>  VecDuplicate(x,&Ax);
+<a name="line241">241: </a>  MatMult(A,x,Ax);
+<a name="line242">242: </a>  VecDot(Ax,x,r);
+<a name="line243">243: </a>  VecDestroy(&Ax);
+<a name="line244">244: </a>  <font color="#4169E1">return</font>(0);
+<a name="line245">245: </a>}
+
+<a name="line249">249: </a><font color="#B22222">/*</font>
+<a name="line250">250: </a><font color="#B22222">    Computes the residual norm of an approximate eigenvector x, |A*x-lambda*x|</font>
+<a name="line251">251: </a><font color="#B22222"> */</font>
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="ComputeResidualNorm"></a>PetscErrorCode ComputeResidualNorm(Mat A,PetscScalar lambda,Vec x,PetscReal *r)</font></strong>
+<a name="line253">253: </a>{
+<a name="line254">254: </a>  Vec            Ax;
+
+<a name="line258">258: </a>  VecDuplicate(x,&Ax);
+<a name="line259">259: </a>  MatMult(A,x,Ax);
+<a name="line260">260: </a>  VecAXPY(Ax,-lambda,x);
+<a name="line261">261: </a>  VecNorm(Ax,NORM_2,r);
+<a name="line262">262: </a>  VecDestroy(&Ax);
+<a name="line263">263: </a>  <font color="#4169E1">return</font>(0);
+<a name="line264">264: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/examples/tutorials/ex25.c b/src/eps/examples/tutorials/ex25.c
index 9ffd21a..6b6e73c 100644
--- a/src/eps/examples/tutorials/ex25.c
+++ b/src/eps/examples/tutorials/ex25.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,9 +44,9 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
-  ierr = PetscOptionsGetBool(NULL,"-show_inertias",&show,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetBool(NULL,NULL,"-show_inertias",&show,NULL);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSpectrum slicing on GHEP, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -136,7 +136,7 @@ int main(int argc,char **argv)
      Note: depending on the interval, it may be necessary also to increase the workspace:
      '-mat_mumps_icntl_14 <percentage>': increase workspace with a percentage (50, 100 or more)
   */
-  ierr = PetscOptionsInsertString("-mat_mumps_icntl_13 1 -mat_mumps_icntl_24 1 -mat_mumps_cntl_3 1e-12");CHKERRQ(ierr); 
+  ierr = PetscOptionsInsertString(NULL,"-mat_mumps_icntl_13 1 -mat_mumps_icntl_24 1 -mat_mumps_cntl_3 1e-12");CHKERRQ(ierr); 
 #endif
 
   /*
@@ -151,7 +151,7 @@ int main(int argc,char **argv)
   if (show) {
     ierr = EPSKrylovSchurGetInertias(eps,&ns,&shifts,&inertias);  
     ierr = PetscPrintf(PETSC_COMM_WORLD,"Subintervals (after setup):\n");CHKERRQ(ierr);
-    for (i=0;i<ns;i++) { ierr = PetscPrintf(PETSC_COMM_WORLD,"Shift %g  Inertia %d \n",shifts[i],inertias[i]);CHKERRQ(ierr); }
+    for (i=0;i<ns;i++) { ierr = PetscPrintf(PETSC_COMM_WORLD,"Shift %g  Inertia %D \n",shifts[i],inertias[i]);CHKERRQ(ierr); }
     ierr = PetscPrintf(PETSC_COMM_WORLD,"\n");CHKERRQ(ierr);
     ierr = PetscFree(shifts);CHKERRQ(ierr);
     ierr = PetscFree(inertias);CHKERRQ(ierr);
@@ -160,7 +160,7 @@ int main(int argc,char **argv)
   if (show) {
     ierr = EPSKrylovSchurGetInertias(eps,&ns,&shifts,&inertias);  
     ierr = PetscPrintf(PETSC_COMM_WORLD,"All shifts (after solve):\n");CHKERRQ(ierr);
-    for (i=0;i<ns;i++) { ierr = PetscPrintf(PETSC_COMM_WORLD,"Shift %g  Inertia %d \n",shifts[i],inertias[i]);CHKERRQ(ierr); }
+    for (i=0;i<ns;i++) { ierr = PetscPrintf(PETSC_COMM_WORLD,"Shift %g  Inertia %D \n",shifts[i],inertias[i]);CHKERRQ(ierr); }
     ierr = PetscPrintf(PETSC_COMM_WORLD,"\n");CHKERRQ(ierr);
     ierr = PetscFree(shifts);CHKERRQ(ierr);
     ierr = PetscFree(inertias);CHKERRQ(ierr);
@@ -178,7 +178,7 @@ int main(int argc,char **argv)
   /*
      Show detailed info unless -terse option is given by user
    */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -195,6 +195,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex25.c.html b/src/eps/examples/tutorials/ex25.c.html
index bdc9cd1..ba964fc 100644
--- a/src/eps/examples/tutorials/ex25.c.html
+++ b/src/eps/examples/tutorials/ex25.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex25.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:32+00:00">
+<meta name="date" content="2016-05-16T10:33:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex25.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex25.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,9 +53,9 @@
 
 <a name="line45"> 45: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line47"> 47: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line48"> 48: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
-<a name="line49"> 49: </a>  PetscOptionsGetBool(NULL,<font color="#666666">"-show_inertias"</font>,&show,NULL);
+<a name="line47"> 47: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line48"> 48: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line49"> 49: </a>  PetscOptionsGetBool(NULL,NULL,<font color="#666666">"-show_inertias"</font>,&show,NULL);
 <a name="line50"> 50: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line51"> 51: </a>  N = n*m;
 <a name="line52"> 52: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSpectrum slicing on GHEP, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
@@ -145,7 +145,7 @@
 <a name="line136">136: </a><font color="#B22222">     Note: depending on the interval, it may be necessary also to increase the workspace:</font>
 <a name="line137">137: </a><font color="#B22222">     '-mat_mumps_icntl_14 <percentage>': increase workspace with a percentage (50, 100 or more)</font>
 <a name="line138">138: </a><font color="#B22222">  */</font>
-<a name="line139">139: </a>  PetscOptionsInsertString(<font color="#666666">"-mat_mumps_icntl_13 1 -mat_mumps_icntl_24 1 -mat_mumps_cntl_3 1e-12"</font>); 
+<a name="line139">139: </a>  PetscOptionsInsertString(NULL,<font color="#666666">"-mat_mumps_icntl_13 1 -mat_mumps_icntl_24 1 -mat_mumps_cntl_3 1e-12"</font>); 
 <a name="line140">140: </a><font color="#A020F0">#endif</font>
 
 <a name="line142">142: </a>  <font color="#B22222">/*</font>
@@ -160,7 +160,7 @@
 <a name="line151">151: </a>  <font color="#4169E1">if</font> (show) {
 <a name="line152">152: </a>    <a href="../../../../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a>(eps,&ns,&shifts,&inertias);  
 <a name="line153">153: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Subintervals (after setup):\n"</font>);
-<a name="line154">154: </a>    <font color="#4169E1">for</font> (i=0;i<ns;i++) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Shift %g  Inertia %d \n"</font>,shifts[i],inertias[i]); }
+<a name="line154">154: </a>    <font color="#4169E1">for</font> (i=0;i<ns;i++) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Shift %g  Inertia %D \n"</font>,shifts[i],inertias[i]); }
 <a name="line155">155: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
 <a name="line156">156: </a>    PetscFree(shifts);
 <a name="line157">157: </a>    PetscFree(inertias);
@@ -169,7 +169,7 @@
 <a name="line160">160: </a>  <font color="#4169E1">if</font> (show) {
 <a name="line161">161: </a>    <a href="../../../../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a>(eps,&ns,&shifts,&inertias);  
 <a name="line162">162: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"All shifts (after solve):\n"</font>);
-<a name="line163">163: </a>    <font color="#4169E1">for</font> (i=0;i<ns;i++) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Shift %g  Inertia %d \n"</font>,shifts[i],inertias[i]); }
+<a name="line163">163: </a>    <font color="#4169E1">for</font> (i=0;i<ns;i++) { PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Shift %g  Inertia %D \n"</font>,shifts[i],inertias[i]); }
 <a name="line164">164: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
 <a name="line165">165: </a>    PetscFree(shifts);
 <a name="line166">166: </a>    PetscFree(inertias);
@@ -187,7 +187,7 @@
 <a name="line178">178: </a>  <font color="#B22222">/*</font>
 <a name="line179">179: </a><font color="#B22222">     Show detailed info unless -terse option is given by user</font>
 <a name="line180">180: </a><font color="#B22222">   */</font>
-<a name="line181">181: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line181">181: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line182">182: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line183">183: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line184">184: </a>  } <font color="#4169E1">else</font> {
@@ -204,7 +204,7 @@
 <a name="line195">195: </a>  MatDestroy(&A);
 <a name="line196">196: </a>  MatDestroy(&B);
 <a name="line197">197: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line198">198: </a>  <font color="#4169E1">return</font> 0;
+<a name="line198">198: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line199">199: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex29.c b/src/eps/examples/tutorials/ex29.c
new file mode 100644
index 0000000..a11d2da
--- /dev/null
+++ b/src/eps/examples/tutorials/ex29.c
@@ -0,0 +1,204 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Solves the same problem as in ex5, with a user-defined stopping test."
+  "It is a standard nonsymmetric eigenproblem with real eigenvalues and the rightmost eigenvalue is known to be 1.\n"
+  "This example illustrates how the user can set a custom stopping test function.\n\n"
+  "The command line options are:\n"
+  "  -m <m>, where <m> = number of grid subdivisions in each dimension.\n"
+  "  -seconds <s>, where <s> = maximum time in seconds allowed for computation.\n\n";
+
+#include <slepceps.h>
+#include <petsctime.h>
+
+/*
+   User-defined routines
+*/
+
+PetscErrorCode MyStoppingTest(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);
+PetscErrorCode MatMarkovModel(PetscInt,Mat);
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  Mat                A;               /* operator matrix */
+  EPS                eps;             /* eigenproblem solver context */
+  PetscReal          seconds=2.5;     /* maximum time allowed for computation */
+  PetscLogDouble     deadline;        /* time to abort computation */
+  PetscInt           N,m=15,nconv;
+  PetscBool          terse;
+  PetscViewer        viewer;
+  EPSConvergedReason reason;
+  PetscErrorCode     ierr;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  N = m*(m+1)/2;
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMarkov Model, N=%D (m=%D)\n",N,m);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-seconds",&seconds,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Maximum time for computation is set to %g seconds.\n\n",(double)seconds);CHKERRQ(ierr);
+  deadline = seconds;
+  ierr = PetscTimeAdd(&deadline);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+     Compute the operator matrix that defines the eigensystem, Ax=kx
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr);
+  ierr = MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(A);CHKERRQ(ierr);
+  ierr = MatSetUp(A);CHKERRQ(ierr);
+  ierr = MatMarkovModel(m,A);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                Create the eigensolver and set various options
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = EPSCreate(PETSC_COMM_WORLD,&eps);CHKERRQ(ierr);
+  ierr = EPSSetOperators(eps,A,NULL);CHKERRQ(ierr);
+  ierr = EPSSetProblemType(eps,EPS_NHEP);CHKERRQ(ierr);
+  ierr = EPSSetStoppingTestFunction(eps,MyStoppingTest,&deadline,NULL);CHKERRQ(ierr);
+  ierr = EPSSetFromOptions(eps);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                      Solve the eigensystem
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = EPSSolve(eps);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                    Display solution and clean up
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /* show detailed info unless -terse option is given by user */
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+  if (terse) {
+    ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);CHKERRQ(ierr);
+    ierr = PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);CHKERRQ(ierr);
+    ierr = EPSGetConvergedReason(eps,&reason);CHKERRQ(ierr);
+    if (reason!=EPS_CONVERGED_USER) {
+      ierr = EPSReasonView(eps,viewer);CHKERRQ(ierr);
+      ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,viewer);CHKERRQ(ierr);
+    } else {
+      ierr = EPSGetConverged(eps,&nconv);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"Eigensolve finished with %D converged eigenpairs; reason=%s\n",nconv,EPSConvergedReasons[reason]);CHKERRQ(ierr);
+    }
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
+  }
+  ierr = EPSDestroy(&eps);CHKERRQ(ierr);
+  ierr = MatDestroy(&A);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMarkovModel"
+/*
+    Matrix generator for a Markov model of a random walk on a triangular grid.
+
+    This subroutine generates a test matrix that models a random walk on a
+    triangular grid. This test example was used by G. W. Stewart ["{SRRIT} - a
+    FORTRAN subroutine to calculate the dominant invariant subspaces of a real
+    matrix", Tech. report. TR-514, University of Maryland (1978).] and in a few
+    papers on eigenvalue problems by Y. Saad [see e.g. LAA, vol. 34, pp. 269-295
+    (1980) ]. These matrices provide reasonably easy test problems for eigenvalue
+    algorithms. The transpose of the matrix  is stochastic and so it is known
+    that one is an exact eigenvalue. One seeks the eigenvector of the transpose
+    associated with the eigenvalue unity. The problem is to calculate the steady
+    state probability distribution of the system, which is the eigevector
+    associated with the eigenvalue one and scaled in such a way that the sum all
+    the components is equal to one.
+
+    Note: the code will actually compute the transpose of the stochastic matrix
+    that contains the transition probabilities.
+*/
+PetscErrorCode MatMarkovModel(PetscInt m,Mat A)
+{
+  const PetscReal cst = 0.5/(PetscReal)(m-1);
+  PetscReal       pd,pu;
+  PetscInt        Istart,Iend,i,j,jmax,ix=0;
+  PetscErrorCode  ierr;
+
+  PetscFunctionBeginUser;
+  ierr = MatGetOwnershipRange(A,&Istart,&Iend);CHKERRQ(ierr);
+  for (i=1;i<=m;i++) {
+    jmax = m-i+1;
+    for (j=1;j<=jmax;j++) {
+      ix = ix + 1;
+      if (ix-1<Istart || ix>Iend) continue;  /* compute only owned rows */
+      if (j!=jmax) {
+        pd = cst*(PetscReal)(i+j-1);
+        /* north */
+        if (i==1) {
+          ierr = MatSetValue(A,ix-1,ix,2*pd,INSERT_VALUES);CHKERRQ(ierr);
+        } else {
+          ierr = MatSetValue(A,ix-1,ix,pd,INSERT_VALUES);CHKERRQ(ierr);
+        }
+        /* east */
+        if (j==1) {
+          ierr = MatSetValue(A,ix-1,ix+jmax-1,2*pd,INSERT_VALUES);CHKERRQ(ierr);
+        } else {
+          ierr = MatSetValue(A,ix-1,ix+jmax-1,pd,INSERT_VALUES);CHKERRQ(ierr);
+        }
+      }
+      /* south */
+      pu = 0.5 - cst*(PetscReal)(i+j-3);
+      if (j>1) {
+        ierr = MatSetValue(A,ix-1,ix-2,pu,INSERT_VALUES);CHKERRQ(ierr);
+      }
+      /* west */
+      if (i>1) {
+        ierr = MatSetValue(A,ix-1,ix-jmax-2,pu,INSERT_VALUES);CHKERRQ(ierr);
+      }
+    }
+  }
+  ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MyStoppingTest"
+/*
+    Function for user-defined stopping test.
+
+    Checks that the computing time has not exceeded the deadline.
+*/
+PetscErrorCode MyStoppingTest(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)
+{
+  PetscErrorCode ierr;
+  PetscLogDouble now,deadline = *(PetscLogDouble*)ctx;
+
+  PetscFunctionBeginUser;
+  /* check if usual termination conditions are met */
+  ierr = EPSStoppingBasic(eps,its,max_it,nconv,nev,reason,NULL);CHKERRQ(ierr);
+  if (*reason==EPS_CONVERGED_ITERATING) {
+    /* check if deadline has expired */
+    ierr = PetscTime(&now);CHKERRQ(ierr);
+    if (now>deadline) *reason = EPS_CONVERGED_USER;
+  }
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/eps/examples/tutorials/ex29.c.html b/src/eps/examples/tutorials/ex29.c.html
new file mode 100644
index 0000000..49b4b3d
--- /dev/null
+++ b/src/eps/examples/tutorials/ex29.c.html
@@ -0,0 +1,211 @@
+<center><a href="ex29.c">Actual source code: ex29.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex29.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:33:28+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex29.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Solves the same problem as in ex5, with a user-defined stopping test."</font>
+<a name="line23"> 23: </a>  <font color="#666666">"It is a standard nonsymmetric eigenproblem with real eigenvalues and the rightmost eigenvalue is known to be 1.\n"</font>
+<a name="line24"> 24: </a>  <font color="#666666">"This example illustrates how the user can set a custom stopping test function.\n\n"</font>
+<a name="line25"> 25: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line26"> 26: </a>  <font color="#666666">"  -m <m>, where <m> = number of grid subdivisions in each dimension.\n"</font>
+<a name="line27"> 27: </a>  <font color="#666666">"  -seconds <s>, where <s> = maximum time in seconds allowed for computation.\n\n"</font>;
+
+<a name="line29"> 29: </a><font color="#A020F0">#include <slepceps.h></font>
+<a name="line30"> 30: </a><font color="#A020F0">#include <petsctime.h></font>
+
+<a name="line32"> 32: </a><font color="#B22222">/*</font>
+<a name="line33"> 33: </a><font color="#B22222">   User-defined routines</font>
+<a name="line34"> 34: </a><font color="#B22222">*/</font>
+
+<a name="line36"> 36: </a><strong><font color="#4169E1">PetscErrorCode MyStoppingTest(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*,void*)</font></strong>;
+<a name="line37"> 37: </a><strong><font color="#4169E1">PetscErrorCode MatMarkovModel(PetscInt,Mat)</font></strong>;
+
+<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line42"> 42: </a>{
+<a name="line43"> 43: </a>  Mat                A;               <font color="#B22222">/* operator matrix */</font>
+<a name="line44"> 44: </a>  <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>                eps;             <font color="#B22222">/* eigenproblem solver context */</font>
+<a name="line45"> 45: </a>  PetscReal          seconds=2.5;     <font color="#B22222">/* maximum time allowed for computation */</font>
+<a name="line46"> 46: </a>  PetscLogDouble     deadline;        <font color="#B22222">/* time to abort computation */</font>
+<a name="line47"> 47: </a>  PetscInt           N,m=15,nconv;
+<a name="line48"> 48: </a>  PetscBool          terse;
+<a name="line49"> 49: </a>  PetscViewer        viewer;
+<a name="line50"> 50: </a>  <a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> reason;
+<a name="line51"> 51: </a>  PetscErrorCode     ierr;
+
+<a name="line53"> 53: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line56"> 56: </a>  N = m*(m+1)/2;
+<a name="line57"> 57: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov Model, N=%D (m=%D)\n"</font>,N,m);
+<a name="line58"> 58: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-seconds"</font>,&seconds,NULL);
+<a name="line59"> 59: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Maximum time for computation is set to %g seconds.\n\n"</font>,(double)seconds);
+<a name="line60"> 60: </a>  deadline = seconds;
+<a name="line61"> 61: </a>  PetscTimeAdd(&deadline);
+
+<a name="line63"> 63: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line64"> 64: </a><font color="#B22222">     Compute the operator matrix that defines the eigensystem, Ax=kx</font>
+<a name="line65"> 65: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line67"> 67: </a>  MatCreate(PETSC_COMM_WORLD,&A);
+<a name="line68"> 68: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line69"> 69: </a>  MatSetFromOptions(A);
+<a name="line70"> 70: </a>  MatSetUp(A);
+<a name="line71"> 71: </a>  MatMarkovModel(m,A);
+
+<a name="line73"> 73: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line74"> 74: </a><font color="#B22222">                Create the eigensolver and set various options</font>
+<a name="line75"> 75: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
+<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,NULL);
+<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
+<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>(eps,MyStoppingTest,&deadline,NULL);
+<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
+
+<a name="line83"> 83: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line84"> 84: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line85"> 85: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
+
+<a name="line89"> 89: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line90"> 90: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line91"> 91: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line93"> 93: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line94"> 94: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line96"> 96: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
+<a name="line97"> 97: </a>  } <font color="#4169E1">else</font> {
+<a name="line98"> 98: </a>    PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line99"> 99: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line100">100: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(eps,&reason);
+<a name="line101">101: </a>    <font color="#4169E1">if</font> (reason!=EPS_CONVERGED_USER) {
+<a name="line102">102: </a>      <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,viewer);
+<a name="line103">103: </a>      <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,viewer);
+<a name="line104">104: </a>    } <font color="#4169E1">else</font> {
+<a name="line105">105: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,&nconv);
+<a name="line106">106: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigensolve finished with %D converged eigenpairs; reason=%s\n"</font>,nconv,EPSConvergedReasons[reason]);
+<a name="line107">107: </a>    }
+<a name="line108">108: </a>    PetscViewerPopFormat(viewer);
+<a name="line109">109: </a>  }
+<a name="line110">110: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
+<a name="line111">111: </a>  MatDestroy(&A);
+<a name="line112">112: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line113">113: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line114">114: </a>}
+
+<a name="line118">118: </a><font color="#B22222">/*</font>
+<a name="line119">119: </a><font color="#B22222">    Matrix generator for a Markov model of a random walk on a triangular grid.</font>
+
+<a name="line121">121: </a><font color="#B22222">    This subroutine generates a test matrix that models a random walk on a</font>
+<a name="line122">122: </a><font color="#B22222">    triangular grid. This test example was used by G. W. Stewart ["{SRRIT} - a</font>
+<a name="line123">123: </a><font color="#B22222">    FORTRAN subroutine to calculate the dominant invariant subspaces of a real</font>
+<a name="line124">124: </a><font color="#B22222">    matrix", Tech. report. TR-514, University of Maryland (1978).] and in a few</font>
+<a name="line125">125: </a><font color="#B22222">    papers on eigenvalue problems by Y. Saad [see e.g. LAA, vol. 34, pp. 269-295</font>
+<a name="line126">126: </a><font color="#B22222">    (1980) ]. These matrices provide reasonably easy test problems for eigenvalue</font>
+<a name="line127">127: </a><font color="#B22222">    algorithms. The transpose of the matrix  is stochastic and so it is known</font>
+<a name="line128">128: </a><font color="#B22222">    that one is an exact eigenvalue. One seeks the eigenvector of the transpose</font>
+<a name="line129">129: </a><font color="#B22222">    associated with the eigenvalue unity. The problem is to calculate the steady</font>
+<a name="line130">130: </a><font color="#B22222">    state probability distribution of the system, which is the eigevector</font>
+<a name="line131">131: </a><font color="#B22222">    associated with the eigenvalue one and scaled in such a way that the sum all</font>
+<a name="line132">132: </a><font color="#B22222">    the components is equal to one.</font>
+
+<a name="line134">134: </a><font color="#B22222">    Note: the code will actually compute the transpose of the stochastic matrix</font>
+<a name="line135">135: </a><font color="#B22222">    that contains the transition probabilities.</font>
+<a name="line136">136: </a><font color="#B22222">*/</font>
+<a name="line137">137: </a><strong><font color="#4169E1"><a name="MatMarkovModel"></a>PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>
+<a name="line138">138: </a>{
+<a name="line139">139: </a>  const PetscReal cst = 0.5/(PetscReal)(m-1);
+<a name="line140">140: </a>  PetscReal       pd,pu;
+<a name="line141">141: </a>  PetscInt        Istart,Iend,i,j,jmax,ix=0;
+<a name="line142">142: </a>  PetscErrorCode  ierr;
+
+<a name="line145">145: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
+<a name="line146">146: </a>  <font color="#4169E1">for</font> (i=1;i<=m;i++) {
+<a name="line147">147: </a>    jmax = m-i+1;
+<a name="line148">148: </a>    <font color="#4169E1">for</font> (j=1;j<=jmax;j++) {
+<a name="line149">149: </a>      ix = ix + 1;
+<a name="line150">150: </a>      <font color="#4169E1">if</font> (ix-1<Istart || ix>Iend) <font color="#4169E1">continue</font>;  <font color="#B22222">/* compute only owned rows */</font>
+<a name="line151">151: </a>      <font color="#4169E1">if</font> (j!=jmax) {
+<a name="line152">152: </a>        pd = cst*(PetscReal)(i+j-1);
+<a name="line153">153: </a>        <font color="#B22222">/* north */</font>
+<a name="line154">154: </a>        <font color="#4169E1">if</font> (i==1) {
+<a name="line155">155: </a>          MatSetValue(A,ix-1,ix,2*pd,INSERT_VALUES);
+<a name="line156">156: </a>        } <font color="#4169E1">else</font> {
+<a name="line157">157: </a>          MatSetValue(A,ix-1,ix,pd,INSERT_VALUES);
+<a name="line158">158: </a>        }
+<a name="line159">159: </a>        <font color="#B22222">/* east */</font>
+<a name="line160">160: </a>        <font color="#4169E1">if</font> (j==1) {
+<a name="line161">161: </a>          MatSetValue(A,ix-1,ix+jmax-1,2*pd,INSERT_VALUES);
+<a name="line162">162: </a>        } <font color="#4169E1">else</font> {
+<a name="line163">163: </a>          MatSetValue(A,ix-1,ix+jmax-1,pd,INSERT_VALUES);
+<a name="line164">164: </a>        }
+<a name="line165">165: </a>      }
+<a name="line166">166: </a>      <font color="#B22222">/* south */</font>
+<a name="line167">167: </a>      pu = 0.5 - cst*(PetscReal)(i+j-3);
+<a name="line168">168: </a>      <font color="#4169E1">if</font> (j>1) {
+<a name="line169">169: </a>        MatSetValue(A,ix-1,ix-2,pu,INSERT_VALUES);
+<a name="line170">170: </a>      }
+<a name="line171">171: </a>      <font color="#B22222">/* west */</font>
+<a name="line172">172: </a>      <font color="#4169E1">if</font> (i>1) {
+<a name="line173">173: </a>        MatSetValue(A,ix-1,ix-jmax-2,pu,INSERT_VALUES);
+<a name="line174">174: </a>      }
+<a name="line175">175: </a>    }
+<a name="line176">176: </a>  }
+<a name="line177">177: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
+<a name="line178">178: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
+<a name="line179">179: </a>  <font color="#4169E1">return</font>(0);
+<a name="line180">180: </a>}
+
+<a name="line184">184: </a><font color="#B22222">/*</font>
+<a name="line185">185: </a><font color="#B22222">    Function for user-defined stopping test.</font>
+
+<a name="line187">187: </a><font color="#B22222">    Checks that the computing time has not exceeded the deadline.</font>
+<a name="line188">188: </a><font color="#B22222">*/</font>
+<a name="line189">189: </a><strong><font color="#4169E1"><a name="MyStoppingTest"></a>PetscErrorCode MyStoppingTest(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> *reason,void *ctx)</font></strong>
+<a name="line190">190: </a>{
+<a name="line192">192: </a>  PetscLogDouble now,deadline = *(PetscLogDouble*)ctx;
+
+<a name="line195">195: </a>  <font color="#B22222">/* check if usual termination conditions are met */</font>
+<a name="line196">196: </a>  <a href="../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>(eps,its,max_it,nconv,nev,reason,NULL);
+<a name="line197">197: </a>  <font color="#4169E1">if</font> (*reason==EPS_CONVERGED_ITERATING) {
+<a name="line198">198: </a>    <font color="#B22222">/* check if deadline has expired */</font>
+<a name="line199">199: </a>    PetscTime(&now);
+<a name="line200">200: </a>    <font color="#4169E1">if</font> (now>deadline) *reason = EPS_CONVERGED_USER;
+<a name="line201">201: </a>  }
+<a name="line202">202: </a>  <font color="#4169E1">return</font>(0);
+<a name="line203">203: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/eps/examples/tutorials/ex3.c b/src/eps/examples/tutorials/ex3.c
index b10ecc7..7d13e69 100644
--- a/src/eps/examples/tutorials/ex3.c
+++ b/src/eps/examples/tutorials/ex3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -49,7 +49,7 @@ int main(int argc,char **argv)
   ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr);
   if (size != 1) SETERRQ(PETSC_COMM_WORLD,1,"This is a uniprocessor example only");
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   N = n*n;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n2-D Laplacian Eigenproblem (matrix-free version), N=%D (%Dx%D grid)\n\n",N,n,n);CHKERRQ(ierr);
 
@@ -102,7 +102,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -114,7 +114,7 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 /*
diff --git a/src/eps/examples/tutorials/ex3.c.html b/src/eps/examples/tutorials/ex3.c.html
index e880689..48c293e 100644
--- a/src/eps/examples/tutorials/ex3.c.html
+++ b/src/eps/examples/tutorials/ex3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:27+00:00">
+<meta name="date" content="2016-05-16T10:33:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -58,7 +58,7 @@
 <a name="line49"> 49: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PETSC_COMM_WORLD,&size);
 <a name="line50"> 50: </a>  <font color="#4169E1">if</font> (size != 1) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"This is a uniprocessor example only"</font>);
 
-<a name="line52"> 52: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line52"> 52: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line53"> 53: </a>  N = n*n;
 <a name="line54"> 54: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n2-D Laplacian Eigenproblem (matrix-free version), N=%D (%Dx%D grid)\n\n"</font>,N,n,n);
 
@@ -111,7 +111,7 @@
 <a name="line102">102: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line104">104: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line105">105: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line105">105: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line106">106: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line107">107: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line108">108: </a>  } <font color="#4169E1">else</font> {
@@ -123,7 +123,7 @@
 <a name="line114">114: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line115">115: </a>  MatDestroy(&A);
 <a name="line116">116: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line117">117: </a>  <font color="#4169E1">return</font> 0;
+<a name="line117">117: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line118">118: </a>}
 
 <a name="line120">120: </a><font color="#B22222">/*</font>
diff --git a/src/eps/examples/tutorials/ex30.c b/src/eps/examples/tutorials/ex30.c
new file mode 100644
index 0000000..9eb5f66
--- /dev/null
+++ b/src/eps/examples/tutorials/ex30.c
@@ -0,0 +1,306 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Illustrates the use of a region for filtering; the number of wanted eigenvalues in not known a priori.\n\n"
+  "The problem is the Brusselator wave model as in ex9.c.\n"
+  "The command line options are:\n"
+  "  -n <n>, where <n> = block dimension of the 2x2 block matrix.\n"
+  "  -L <L>, where <L> = bifurcation parameter.\n"
+  "  -alpha <alpha>, -beta <beta>, -delta1 <delta1>,  -delta2 <delta2>,\n"
+  "       where <alpha> <beta> <delta1> <delta2> = model parameters.\n\n";
+
+#include <slepceps.h>
+
+/*
+   This example tries to compute all eigenvalues lying outside the real axis.
+   This could be achieved by computing LARGEST_IMAGINARY eigenvalues, but
+   here we take a different route: define a region of the complex plane where
+   eigenvalues must be emphasized (eigenvalues outside the region are filtered
+   out). In this case, we select the region as the complement of a thin stripe
+   around the real axis.
+ */
+
+PetscErrorCode MatMult_Brussel(Mat,Vec,Vec);
+PetscErrorCode MatShift_Brussel(PetscScalar*,Mat);
+PetscErrorCode MatGetDiagonal_Brussel(Mat,Vec);
+PetscErrorCode MyStoppingTest(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);
+
+typedef struct {
+  Mat         T;
+  Vec         x1,x2,y1,y2;
+  PetscScalar alpha,beta,tau1,tau2,sigma;
+  PetscInt    lastnconv;      /* last value of nconv; used in stopping test */
+  PetscInt    nreps;          /* number of repetitions of nconv; used in stopping test */
+} CTX_BRUSSEL;
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  Mat            A;               /* eigenvalue problem matrix */
+  EPS            eps;             /* eigenproblem solver context */
+  RG             rg;              /* region object */
+  PetscScalar    delta1,delta2,L,h;
+  PetscInt       N=30,n,i,Istart,Iend,mpd;
+  CTX_BRUSSEL    *ctx;
+  PetscBool      terse;
+  PetscViewer    viewer;
+  PetscErrorCode ierr;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&N,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nBrusselator wave model, n=%D\n\n",N);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+        Generate the matrix
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /*
+     Create shell matrix context and set default parameters
+  */
+  ierr = PetscNew(&ctx);CHKERRQ(ierr);
+  ctx->alpha = 2.0;
+  ctx->beta  = 5.45;
+  delta1     = 0.008;
+  delta2     = 0.004;
+  L          = 0.51302;
+
+  /*
+     Look the command line for user-provided parameters
+  */
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-L",&L,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-alpha",&ctx->alpha,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-beta",&ctx->beta,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-delta1",&delta1,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-delta2",&delta2,NULL);CHKERRQ(ierr);
+
+  /*
+     Create matrix T
+  */
+  ierr = MatCreate(PETSC_COMM_WORLD,&ctx->T);CHKERRQ(ierr);
+  ierr = MatSetSizes(ctx->T,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(ctx->T);CHKERRQ(ierr);
+  ierr = MatSetUp(ctx->T);CHKERRQ(ierr);
+
+  ierr = MatGetOwnershipRange(ctx->T,&Istart,&Iend);CHKERRQ(ierr);
+  for (i=Istart;i<Iend;i++) {
+    if (i>0) { ierr = MatSetValue(ctx->T,i,i-1,1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    if (i<N-1) { ierr = MatSetValue(ctx->T,i,i+1,1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    ierr = MatSetValue(ctx->T,i,i,-2.0,INSERT_VALUES);CHKERRQ(ierr);
+  }
+  ierr = MatAssemblyBegin(ctx->T,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(ctx->T,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatGetLocalSize(ctx->T,&n,NULL);CHKERRQ(ierr);
+
+  /*
+     Fill the remaining information in the shell matrix context
+     and create auxiliary vectors
+  */
+  h = 1.0 / (PetscReal)(N+1);
+  ctx->tau1 = delta1 / ((h*L)*(h*L));
+  ctx->tau2 = delta2 / ((h*L)*(h*L));
+  ctx->sigma = 0.0;
+  ierr = VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->x1);CHKERRQ(ierr);
+  ierr = VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->x2);CHKERRQ(ierr);
+  ierr = VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->y1);CHKERRQ(ierr);
+  ierr = VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->y2);CHKERRQ(ierr);
+
+  /*
+     Create the shell matrix
+  */
+  ierr = MatCreateShell(PETSC_COMM_WORLD,2*n,2*n,2*N,2*N,(void*)ctx,&A);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(A,MATOP_MULT,(void(*)())MatMult_Brussel);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(A,MATOP_SHIFT,(void(*)())MatShift_Brussel);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(A,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Brussel);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                Create the eigensolver and configure the region
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = EPSCreate(PETSC_COMM_WORLD,&eps);CHKERRQ(ierr);
+  ierr = EPSSetOperators(eps,A,NULL);CHKERRQ(ierr);
+  ierr = EPSSetProblemType(eps,EPS_NHEP);CHKERRQ(ierr);
+
+  /*
+     Define the region containing the eigenvalues of interest
+  */
+  ierr = EPSGetRG(eps,&rg);CHKERRQ(ierr);
+  ierr = RGSetType(rg,RGINTERVAL);CHKERRQ(ierr);
+  ierr = RGIntervalSetEndpoints(rg,-PETSC_INFINITY,PETSC_INFINITY,-0.01,0.01);CHKERRQ(ierr);
+  ierr = RGSetComplement(rg,PETSC_TRUE);CHKERRQ(ierr);
+  /* sort eigenvalue approximations wrt a target, otherwise convergence will be erratic */
+  ierr = EPSSetTarget(eps,0.0);CHKERRQ(ierr);
+  ierr = EPSSetWhichEigenpairs(eps,EPS_TARGET_MAGNITUDE);CHKERRQ(ierr);
+
+  /*
+     Set solver options. In particular, we must allocate sufficient
+     storage for all eigenpairs that may converge (ncv). This is
+     application-dependent.
+  */
+  mpd = 40;
+  ierr = EPSSetDimensions(eps,2*mpd,3*mpd,mpd);CHKERRQ(ierr);
+  ierr = EPSSetTolerances(eps,1e-7,2000);CHKERRQ(ierr);
+  ctx->lastnconv = 0;
+  ctx->nreps     = 0;
+  ierr = EPSSetStoppingTestFunction(eps,MyStoppingTest,(void*)ctx,NULL);CHKERRQ(ierr);
+  ierr = EPSSetFromOptions(eps);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                Solve the eigensystem and display solution
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = EPSSolve(eps);CHKERRQ(ierr);
+
+  /* show detailed info unless -terse option is given by user */
+  ierr = PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);CHKERRQ(ierr);
+  ierr = PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);CHKERRQ(ierr);
+  ierr = EPSReasonView(eps,viewer);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+  if (!terse) {
+    ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,viewer);CHKERRQ(ierr);
+  }
+  ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
+
+  ierr = EPSDestroy(&eps);CHKERRQ(ierr);
+  ierr = MatDestroy(&A);CHKERRQ(ierr);
+  ierr = MatDestroy(&ctx->T);CHKERRQ(ierr);
+  ierr = VecDestroy(&ctx->x1);CHKERRQ(ierr);
+  ierr = VecDestroy(&ctx->x2);CHKERRQ(ierr);
+  ierr = VecDestroy(&ctx->y1);CHKERRQ(ierr);
+  ierr = VecDestroy(&ctx->y2);CHKERRQ(ierr);
+  ierr = PetscFree(ctx);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMult_Brussel"
+PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)
+{
+  PetscInt          n;
+  const PetscScalar *px;
+  PetscScalar       *py;
+  CTX_BRUSSEL       *ctx;
+  PetscErrorCode    ierr;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+  ierr = MatGetLocalSize(ctx->T,&n,NULL);CHKERRQ(ierr);
+  ierr = VecGetArrayRead(x,&px);CHKERRQ(ierr);
+  ierr = VecGetArray(y,&py);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ctx->x1,px);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ctx->x2,px+n);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ctx->y1,py);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ctx->y2,py+n);CHKERRQ(ierr);
+
+  ierr = MatMult(ctx->T,ctx->x1,ctx->y1);CHKERRQ(ierr);
+  ierr = VecScale(ctx->y1,ctx->tau1);CHKERRQ(ierr);
+  ierr = VecAXPY(ctx->y1,ctx->beta - 1.0 + ctx->sigma,ctx->x1);CHKERRQ(ierr);
+  ierr = VecAXPY(ctx->y1,ctx->alpha * ctx->alpha,ctx->x2);CHKERRQ(ierr);
+
+  ierr = MatMult(ctx->T,ctx->x2,ctx->y2);CHKERRQ(ierr);
+  ierr = VecScale(ctx->y2,ctx->tau2);CHKERRQ(ierr);
+  ierr = VecAXPY(ctx->y2,-ctx->beta,ctx->x1);CHKERRQ(ierr);
+  ierr = VecAXPY(ctx->y2,-ctx->alpha * ctx->alpha + ctx->sigma,ctx->x2);CHKERRQ(ierr);
+
+  ierr = VecRestoreArrayRead(x,&px);CHKERRQ(ierr);
+  ierr = VecRestoreArray(y,&py);CHKERRQ(ierr);
+  ierr = VecResetArray(ctx->x1);CHKERRQ(ierr);
+  ierr = VecResetArray(ctx->x2);CHKERRQ(ierr);
+  ierr = VecResetArray(ctx->y1);CHKERRQ(ierr);
+  ierr = VecResetArray(ctx->y2);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatShift_Brussel"
+PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)
+{
+  CTX_BRUSSEL    *ctx;
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(Y,(void**)&ctx);CHKERRQ(ierr);
+  ctx->sigma += *a;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatGetDiagonal_Brussel"
+PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)
+{
+  Vec            d1,d2;
+  PetscInt       n;
+  PetscScalar    *pd;
+  MPI_Comm       comm;
+  CTX_BRUSSEL    *ctx;
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+  ierr = PetscObjectGetComm((PetscObject)A,&comm);CHKERRQ(ierr);
+  ierr = MatGetLocalSize(ctx->T,&n,NULL);CHKERRQ(ierr);
+  ierr = VecGetArray(diag,&pd);CHKERRQ(ierr);
+  ierr = VecCreateMPIWithArray(comm,1,n,PETSC_DECIDE,pd,&d1);CHKERRQ(ierr);
+  ierr = VecCreateMPIWithArray(comm,1,n,PETSC_DECIDE,pd+n,&d2);CHKERRQ(ierr);
+
+  ierr = VecSet(d1,-2.0*ctx->tau1 + ctx->beta - 1.0 + ctx->sigma);CHKERRQ(ierr);
+  ierr = VecSet(d2,-2.0*ctx->tau2 - ctx->alpha*ctx->alpha + ctx->sigma);CHKERRQ(ierr);
+
+  ierr = VecDestroy(&d1);CHKERRQ(ierr);
+  ierr = VecDestroy(&d2);CHKERRQ(ierr);
+  ierr = VecRestoreArray(diag,&pd);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MyStoppingTest"
+/*
+    Function for user-defined stopping test.
+
+    Ignores the value of nev. It only takes into account the number of
+    eigenpairs that have converged in recent outer iterations (restarts);
+    if no new eigenvalus have converged in the last few restarts,
+    we stop the iteration, assuming that no more eigenvalues are present
+    inside the region.
+*/
+PetscErrorCode MyStoppingTest(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ptr)
+{
+  PetscErrorCode ierr;
+  CTX_BRUSSEL    *ctx = (CTX_BRUSSEL*)ptr;
+
+  PetscFunctionBeginUser;
+  /* check usual termination conditions, but ignoring the case nconv>=nev */
+  ierr = EPSStoppingBasic(eps,its,max_it,nconv,PETSC_MAX_INT,reason,NULL);CHKERRQ(ierr);
+  if (*reason==EPS_CONVERGED_ITERATING) {
+    /* check if nconv is the same as before */
+    if (nconv==ctx->lastnconv) ctx->nreps++;
+    else {
+      ctx->lastnconv = nconv;
+      ctx->nreps     = 0;
+    }
+    /* check if no eigenvalues converged in last 10 restarts */
+    if (nconv && ctx->nreps>10) *reason = EPS_CONVERGED_USER;
+  }
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/eps/examples/tutorials/ex30.c.html b/src/eps/examples/tutorials/ex30.c.html
new file mode 100644
index 0000000..91f204f
--- /dev/null
+++ b/src/eps/examples/tutorials/ex30.c.html
@@ -0,0 +1,304 @@
+<center><a href="ex30.c">Actual source code: ex30.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex30.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:33:28+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex30.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Illustrates the use of a region for filtering; the number of wanted eigenvalues in not known a priori.\n\n"</font>
+<a name="line23"> 23: </a>  <font color="#666666">"The problem is the Brusselator wave model as in ex9.c.\n"</font>
+<a name="line24"> 24: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line25"> 25: </a>  <font color="#666666">"  -n <n>, where <n> = block dimension of the 2x2 block matrix.\n"</font>
+<a name="line26"> 26: </a>  <font color="#666666">"  -L <L>, where <L> = bifurcation parameter.\n"</font>
+<a name="line27"> 27: </a>  <font color="#666666">"  -alpha <alpha>, -beta <beta>, -delta1 <delta1>,  -delta2 <delta2>,\n"</font>
+<a name="line28"> 28: </a>  <font color="#666666">"       where <alpha> <beta> <delta1> <delta2> = model parameters.\n\n"</font>;
+
+<a name="line30"> 30: </a><font color="#A020F0">#include <slepceps.h></font>
+
+<a name="line32"> 32: </a><font color="#B22222">/*</font>
+<a name="line33"> 33: </a><font color="#B22222">   This example tries to compute all eigenvalues lying outside the real axis.</font>
+<a name="line34"> 34: </a><font color="#B22222">   This could be achieved by computing LARGEST_IMAGINARY eigenvalues, but</font>
+<a name="line35"> 35: </a><font color="#B22222">   here we take a different route: define a region of the complex plane where</font>
+<a name="line36"> 36: </a><font color="#B22222">   eigenvalues must be emphasized (eigenvalues outside the region are filtered</font>
+<a name="line37"> 37: </a><font color="#B22222">   out). In this case, we select the region as the complement of a thin stripe</font>
+<a name="line38"> 38: </a><font color="#B22222">   around the real axis.</font>
+<a name="line39"> 39: </a><font color="#B22222"> */</font>
+
+<a name="line41"> 41: </a><strong><font color="#4169E1">PetscErrorCode MatMult_Brussel(Mat,Vec,Vec)</font></strong>;
+<a name="line42"> 42: </a><strong><font color="#4169E1">PetscErrorCode MatShift_Brussel(PetscScalar*,Mat)</font></strong>;
+<a name="line43"> 43: </a><strong><font color="#4169E1">PetscErrorCode MatGetDiagonal_Brussel(Mat,Vec)</font></strong>;
+<a name="line44"> 44: </a><strong><font color="#4169E1">PetscErrorCode MyStoppingTest(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*,void*)</font></strong>;
+
+<a name="line46"> 46: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line47"> 47: </a>  Mat         T;
+<a name="line48"> 48: </a>  Vec         x1,x2,y1,y2;
+<a name="line49"> 49: </a>  PetscScalar alpha,beta,tau1,tau2,sigma;
+<a name="line50"> 50: </a>  PetscInt    lastnconv;      <font color="#B22222">/* last value of nconv; used in stopping test */</font>
+<a name="line51"> 51: </a>  PetscInt    nreps;          <font color="#B22222">/* number of repetitions of nconv; used in stopping test */</font>
+<a name="line52"> 52: </a>} CTX_BRUSSEL;
+
+<a name="line56"> 56: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line57"> 57: </a>{
+<a name="line58"> 58: </a>  Mat            A;               <font color="#B22222">/* eigenvalue problem matrix */</font>
+<a name="line59"> 59: </a>  <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;             <font color="#B22222">/* eigenproblem solver context */</font>
+<a name="line60"> 60: </a>  <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;              <font color="#B22222">/* region object */</font>
+<a name="line61"> 61: </a>  PetscScalar    delta1,delta2,L,h;
+<a name="line62"> 62: </a>  PetscInt       N=30,n,i,Istart,Iend,mpd;
+<a name="line63"> 63: </a>  CTX_BRUSSEL    *ctx;
+<a name="line64"> 64: </a>  PetscBool      terse;
+<a name="line65"> 65: </a>  PetscViewer    viewer;
+
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line70"> 70: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&N,NULL);
+<a name="line71"> 71: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nBrusselator wave model, n=%D\n\n"</font>,N);
+
+<a name="line73"> 73: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line74"> 74: </a><font color="#B22222">        Generate the matrix</font>
+<a name="line75"> 75: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line77"> 77: </a>  <font color="#B22222">/*</font>
+<a name="line78"> 78: </a><font color="#B22222">     Create shell matrix context and set default parameters</font>
+<a name="line79"> 79: </a><font color="#B22222">  */</font>
+<a name="line80"> 80: </a>  PetscNew(&ctx);
+<a name="line81"> 81: </a>  ctx->alpha = 2.0;
+<a name="line82"> 82: </a>  ctx->beta  = 5.45;
+<a name="line83"> 83: </a>  delta1     = 0.008;
+<a name="line84"> 84: </a>  delta2     = 0.004;
+<a name="line85"> 85: </a>  L          = 0.51302;
+
+<a name="line87"> 87: </a>  <font color="#B22222">/*</font>
+<a name="line88"> 88: </a><font color="#B22222">     Look the command line for user-provided parameters</font>
+<a name="line89"> 89: </a><font color="#B22222">  */</font>
+<a name="line90"> 90: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-L"</font>,&L,NULL);
+<a name="line91"> 91: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-alpha"</font>,&ctx->alpha,NULL);
+<a name="line92"> 92: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-beta"</font>,&ctx->beta,NULL);
+<a name="line93"> 93: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-delta1"</font>,&delta1,NULL);
+<a name="line94"> 94: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-delta2"</font>,&delta2,NULL);
+
+<a name="line96"> 96: </a>  <font color="#B22222">/*</font>
+<a name="line97"> 97: </a><font color="#B22222">     Create matrix T</font>
+<a name="line98"> 98: </a><font color="#B22222">  */</font>
+<a name="line99"> 99: </a>  MatCreate(PETSC_COMM_WORLD,&ctx->T);
+<a name="line100">100: </a>  MatSetSizes(ctx->T,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line101">101: </a>  MatSetFromOptions(ctx->T);
+<a name="line102">102: </a>  MatSetUp(ctx->T);
+
+<a name="line104">104: </a>  MatGetOwnershipRange(ctx->T,&Istart,&Iend);
+<a name="line105">105: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line106">106: </a>    <font color="#4169E1">if</font> (i>0) { MatSetValue(ctx->T,i,i-1,1.0,INSERT_VALUES); }
+<a name="line107">107: </a>    <font color="#4169E1">if</font> (i<N-1) { MatSetValue(ctx->T,i,i+1,1.0,INSERT_VALUES); }
+<a name="line108">108: </a>    MatSetValue(ctx->T,i,i,-2.0,INSERT_VALUES);
+<a name="line109">109: </a>  }
+<a name="line110">110: </a>  MatAssemblyBegin(ctx->T,MAT_FINAL_ASSEMBLY);
+<a name="line111">111: </a>  MatAssemblyEnd(ctx->T,MAT_FINAL_ASSEMBLY);
+<a name="line112">112: </a>  MatGetLocalSize(ctx->T,&n,NULL);
+
+<a name="line114">114: </a>  <font color="#B22222">/*</font>
+<a name="line115">115: </a><font color="#B22222">     Fill the remaining information in the shell matrix context</font>
+<a name="line116">116: </a><font color="#B22222">     and create auxiliary vectors</font>
+<a name="line117">117: </a><font color="#B22222">  */</font>
+<a name="line118">118: </a>  h = 1.0 / (PetscReal)(N+1);
+<a name="line119">119: </a>  ctx->tau1 = delta1 / ((h*L)*(h*L));
+<a name="line120">120: </a>  ctx->tau2 = delta2 / ((h*L)*(h*L));
+<a name="line121">121: </a>  ctx->sigma = 0.0;
+<a name="line122">122: </a>  VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->x1);
+<a name="line123">123: </a>  VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->x2);
+<a name="line124">124: </a>  VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->y1);
+<a name="line125">125: </a>  VecCreateMPIWithArray(PETSC_COMM_WORLD,1,n,PETSC_DECIDE,NULL,&ctx->y2);
+
+<a name="line127">127: </a>  <font color="#B22222">/*</font>
+<a name="line128">128: </a><font color="#B22222">     Create the shell matrix</font>
+<a name="line129">129: </a><font color="#B22222">  */</font>
+<a name="line130">130: </a>  MatCreateShell(PETSC_COMM_WORLD,2*n,2*n,2*N,2*N,(void*)ctx,&A);
+<a name="line131">131: </a>  MatShellSetOperation(A,MATOP_MULT,(void(*)())MatMult_Brussel);
+<a name="line132">132: </a>  MatShellSetOperation(A,MATOP_SHIFT,(void(*)())MatShift_Brussel);
+<a name="line133">133: </a>  MatShellSetOperation(A,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Brussel);
+
+<a name="line135">135: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line136">136: </a><font color="#B22222">                Create the eigensolver and configure the region</font>
+<a name="line137">137: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line139">139: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
+<a name="line140">140: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,NULL);
+<a name="line141">141: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
+
+<a name="line143">143: </a>  <font color="#B22222">/*</font>
+<a name="line144">144: </a><font color="#B22222">     Define the region containing the eigenvalues of interest</font>
+<a name="line145">145: </a><font color="#B22222">  */</font>
+<a name="line146">146: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&rg);
+<a name="line147">147: </a>  <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,RGINTERVAL);
+<a name="line148">148: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,-PETSC_INFINITY,PETSC_INFINITY,-0.01,0.01);
+<a name="line149">149: </a>  <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>(rg,PETSC_TRUE);
+<a name="line150">150: </a>  <font color="#B22222">/* sort eigenvalue approximations wrt a target, otherwise convergence will be erratic */</font>
+<a name="line151">151: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,0.0);
+<a name="line152">152: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE);
+
+<a name="line154">154: </a>  <font color="#B22222">/*</font>
+<a name="line155">155: </a><font color="#B22222">     Set solver options. In particular, we must allocate sufficient</font>
+<a name="line156">156: </a><font color="#B22222">     storage for all eigenpairs that may converge (ncv). This is</font>
+<a name="line157">157: </a><font color="#B22222">     application-dependent.</font>
+<a name="line158">158: </a><font color="#B22222">  */</font>
+<a name="line159">159: </a>  mpd = 40;
+<a name="line160">160: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,2*mpd,3*mpd,mpd);
+<a name="line161">161: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,1e-7,2000);
+<a name="line162">162: </a>  ctx->lastnconv = 0;
+<a name="line163">163: </a>  ctx->nreps     = 0;
+<a name="line164">164: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>(eps,MyStoppingTest,(void*)ctx,NULL);
+<a name="line165">165: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
+
+<a name="line167">167: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line168">168: </a><font color="#B22222">                Solve the eigensystem and display solution</font>
+<a name="line169">169: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line171">171: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
+
+<a name="line173">173: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line174">174: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line175">175: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line176">176: </a>  <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,viewer);
+<a name="line177">177: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line178">178: </a>  <font color="#4169E1">if</font> (!terse) {
+<a name="line179">179: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,viewer);
+<a name="line180">180: </a>  }
+<a name="line181">181: </a>  PetscViewerPopFormat(viewer);
+
+<a name="line183">183: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
+<a name="line184">184: </a>  MatDestroy(&A);
+<a name="line185">185: </a>  MatDestroy(&ctx->T);
+<a name="line186">186: </a>  VecDestroy(&ctx->x1);
+<a name="line187">187: </a>  VecDestroy(&ctx->x2);
+<a name="line188">188: </a>  VecDestroy(&ctx->y1);
+<a name="line189">189: </a>  VecDestroy(&ctx->y2);
+<a name="line190">190: </a>  PetscFree(ctx);
+<a name="line191">191: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line192">192: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line193">193: </a>}
+
+<a name="line197">197: </a><strong><font color="#4169E1"><a name="MatMult_Brussel"></a>PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)</font></strong>
+<a name="line198">198: </a>{
+<a name="line199">199: </a>  PetscInt          n;
+<a name="line200">200: </a>  const PetscScalar *px;
+<a name="line201">201: </a>  PetscScalar       *py;
+<a name="line202">202: </a>  CTX_BRUSSEL       *ctx;
+<a name="line203">203: </a>  PetscErrorCode    ierr;
+
+<a name="line206">206: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line207">207: </a>  MatGetLocalSize(ctx->T,&n,NULL);
+<a name="line208">208: </a>  VecGetArrayRead(x,&px);
+<a name="line209">209: </a>  VecGetArray(y,&py);
+<a name="line210">210: </a>  VecPlaceArray(ctx->x1,px);
+<a name="line211">211: </a>  VecPlaceArray(ctx->x2,px+n);
+<a name="line212">212: </a>  VecPlaceArray(ctx->y1,py);
+<a name="line213">213: </a>  VecPlaceArray(ctx->y2,py+n);
+
+<a name="line215">215: </a>  MatMult(ctx->T,ctx->x1,ctx->y1);
+<a name="line216">216: </a>  VecScale(ctx->y1,ctx->tau1);
+<a name="line217">217: </a>  VecAXPY(ctx->y1,ctx->beta - 1.0 + ctx->sigma,ctx->x1);
+<a name="line218">218: </a>  VecAXPY(ctx->y1,ctx->alpha * ctx->alpha,ctx->x2);
+
+<a name="line220">220: </a>  MatMult(ctx->T,ctx->x2,ctx->y2);
+<a name="line221">221: </a>  VecScale(ctx->y2,ctx->tau2);
+<a name="line222">222: </a>  VecAXPY(ctx->y2,-ctx->beta,ctx->x1);
+<a name="line223">223: </a>  VecAXPY(ctx->y2,-ctx->alpha * ctx->alpha + ctx->sigma,ctx->x2);
+
+<a name="line225">225: </a>  VecRestoreArrayRead(x,&px);
+<a name="line226">226: </a>  VecRestoreArray(y,&py);
+<a name="line227">227: </a>  VecResetArray(ctx->x1);
+<a name="line228">228: </a>  VecResetArray(ctx->x2);
+<a name="line229">229: </a>  VecResetArray(ctx->y1);
+<a name="line230">230: </a>  VecResetArray(ctx->y2);
+<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
+<a name="line232">232: </a>}
+
+<a name="line236">236: </a><strong><font color="#4169E1"><a name="MatShift_Brussel"></a>PetscErrorCode MatShift_Brussel(PetscScalar* a,Mat Y)</font></strong>
+<a name="line237">237: </a>{
+<a name="line238">238: </a>  CTX_BRUSSEL    *ctx;
+
+<a name="line242">242: </a>  MatShellGetContext(Y,(void**)&ctx);
+<a name="line243">243: </a>  ctx->sigma += *a;
+<a name="line244">244: </a>  <font color="#4169E1">return</font>(0);
+<a name="line245">245: </a>}
+
+<a name="line249">249: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Brussel"></a>PetscErrorCode MatGetDiagonal_Brussel(Mat A,Vec diag)</font></strong>
+<a name="line250">250: </a>{
+<a name="line251">251: </a>  Vec            d1,d2;
+<a name="line252">252: </a>  PetscInt       n;
+<a name="line253">253: </a>  PetscScalar    *pd;
+<a name="line254">254: </a>  MPI_Comm       comm;
+<a name="line255">255: </a>  CTX_BRUSSEL    *ctx;
+
+<a name="line259">259: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line260">260: </a>  PetscObjectGetComm((PetscObject)A,&comm);
+<a name="line261">261: </a>  MatGetLocalSize(ctx->T,&n,NULL);
+<a name="line262">262: </a>  VecGetArray(diag,&pd);
+<a name="line263">263: </a>  VecCreateMPIWithArray(comm,1,n,PETSC_DECIDE,pd,&d1);
+<a name="line264">264: </a>  VecCreateMPIWithArray(comm,1,n,PETSC_DECIDE,pd+n,&d2);
+
+<a name="line266">266: </a>  VecSet(d1,-2.0*ctx->tau1 + ctx->beta - 1.0 + ctx->sigma);
+<a name="line267">267: </a>  VecSet(d2,-2.0*ctx->tau2 - ctx->alpha*ctx->alpha + ctx->sigma);
+
+<a name="line269">269: </a>  VecDestroy(&d1);
+<a name="line270">270: </a>  VecDestroy(&d2);
+<a name="line271">271: </a>  VecRestoreArray(diag,&pd);
+<a name="line272">272: </a>  <font color="#4169E1">return</font>(0);
+<a name="line273">273: </a>}
+
+<a name="line277">277: </a><font color="#B22222">/*</font>
+<a name="line278">278: </a><font color="#B22222">    Function for user-defined stopping test.</font>
+
+<a name="line280">280: </a><font color="#B22222">    Ignores the value of nev. It only takes into account the number of</font>
+<a name="line281">281: </a><font color="#B22222">    eigenpairs that have converged in recent outer iterations (restarts);</font>
+<a name="line282">282: </a><font color="#B22222">    if no new eigenvalus have converged in the last few restarts,</font>
+<a name="line283">283: </a><font color="#B22222">    we stop the iteration, assuming that no more eigenvalues are present</font>
+<a name="line284">284: </a><font color="#B22222">    inside the region.</font>
+<a name="line285">285: </a><font color="#B22222">*/</font>
+<a name="line286">286: </a><strong><font color="#4169E1"><a name="MyStoppingTest"></a>PetscErrorCode MyStoppingTest(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> *reason,void *ptr)</font></strong>
+<a name="line287">287: </a>{
+<a name="line289">289: </a>  CTX_BRUSSEL    *ctx = (CTX_BRUSSEL*)ptr;
+
+<a name="line292">292: </a>  <font color="#B22222">/* check usual termination conditions, but ignoring the case nconv>=nev */</font>
+<a name="line293">293: </a>  <a href="../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>(eps,its,max_it,nconv,PETSC_MAX_INT,reason,NULL);
+<a name="line294">294: </a>  <font color="#4169E1">if</font> (*reason==EPS_CONVERGED_ITERATING) {
+<a name="line295">295: </a>    <font color="#B22222">/* check if nconv is the same as before */</font>
+<a name="line296">296: </a>    <font color="#4169E1">if</font> (nconv==ctx->lastnconv) ctx->nreps++;
+<a name="line297">297: </a>    <font color="#4169E1">else</font> {
+<a name="line298">298: </a>      ctx->lastnconv = nconv;
+<a name="line299">299: </a>      ctx->nreps     = 0;
+<a name="line300">300: </a>    }
+<a name="line301">301: </a>    <font color="#B22222">/* check if no eigenvalues converged in last 10 restarts */</font>
+<a name="line302">302: </a>    <font color="#4169E1">if</font> (nconv && ctx->nreps>10) *reason = EPS_CONVERGED_USER;
+<a name="line303">303: </a>  }
+<a name="line304">304: </a>  <font color="#4169E1">return</font>(0);
+<a name="line305">305: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/eps/examples/tutorials/ex31.c b/src/eps/examples/tutorials/ex31.c
new file mode 100644
index 0000000..ef176a0
--- /dev/null
+++ b/src/eps/examples/tutorials/ex31.c
@@ -0,0 +1,706 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Power grid small signal stability analysis of WECC 9 bus system.\n\
+This example is based on the 9-bus (node) example given in the book Power\n\
+Systems Dynamics and Stability (Chapter 8) by P. Sauer and M. A. Pai.\n\
+The power grid in this example consists of 9 buses (nodes), 3 generators,\n\
+3 loads, and 9 transmission lines. The network equations are written\n\
+in current balance form using rectangular coordinates. It uses the SLEPc\n\
+package to calculate the eigenvalues for small signal stability analysis\n\n";
+
+/*
+   This example is based on PETSc's ex9bus example (under TS).
+
+   The equations for the stability analysis are described by the DAE
+
+   \dot{x} = f(x,y,t)
+     0     = g(x,y,t)
+
+   where the generators are described by differential equations, while the algebraic
+   constraints define the network equations.
+
+   The generators are modeled with a 4th order differential equation describing the electrical
+   and mechanical dynamics. Each generator also has an exciter system modeled by 3rd order
+   diff. eqns. describing the exciter, voltage regulator, and the feedback stabilizer
+   mechanism.
+
+   The network equations are described by nodal current balance equations.
+    I(x,y) - Y*V = 0
+
+   where:
+    I(x,y) is the current injected from generators and loads.
+      Y    is the admittance matrix, and
+      V    is the voltage vector
+
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 
+   The linearized equations for the eigenvalue analysis are
+
+     \dot{\delta{x}} = f_x*\delta{x} + f_y*\delta{y}
+             0       = g_x*\delta{x} + g_y*\delta{y}
+
+   This gives the linearized sensitivity matrix
+     A = | f_x  f_y |
+         | g_x  g_y |
+
+   We are interested in the eigenvalues of the Schur complement of A
+     \hat{A} = f_x - g_x*inv(g_y)*f_y
+
+
+   Example contributed by: Shrirang Abhyankar
+*/
+
+#include <petscdm.h>
+#include <petscdmda.h>
+#include <petscdmcomposite.h>
+#include <slepceps.h>
+
+#define freq 60
+#define w_s (2*PETSC_PI*freq)
+
+/* Sizes and indices */
+const PetscInt nbus    = 9; /* Number of network buses */
+const PetscInt ngen    = 3; /* Number of generators */
+const PetscInt nload   = 3; /* Number of loads */
+const PetscInt gbus[3] = {0,1,2}; /* Buses at which generators are incident */
+const PetscInt lbus[3] = {4,5,7}; /* Buses at which loads are incident */
+
+/* Generator real and reactive powers (found via loadflow) */
+const PetscScalar PG[3] = {0.716786142395021,1.630000000000000,0.850000000000000};
+const PetscScalar QG[3] = {0.270702180178785,0.066120127797275,-0.108402221791588};
+/* Generator constants */
+const PetscScalar H[3]    = {23.64,6.4,3.01};   /* Inertia constant */
+const PetscScalar Rs[3]   = {0.0,0.0,0.0}; /* Stator Resistance */
+const PetscScalar Xd[3]   = {0.146,0.8958,1.3125};  /* d-axis reactance */
+const PetscScalar Xdp[3]  = {0.0608,0.1198,0.1813}; /* d-axis transient reactance */
+const PetscScalar Xq[3]   = {0.0969,0.8645,1.2578}; /* q-axis reactance Xq(1) set to 0.4360, value given in text 0.0969 */
+const PetscScalar Xqp[3]  = {0.0969,0.1969,0.25}; /* q-axis transient reactance */
+const PetscScalar Td0p[3] = {8.96,6.0,5.89}; /* d-axis open circuit time constant */
+const PetscScalar Tq0p[3] = {0.31,0.535,0.6}; /* q-axis open circuit time constant */
+PetscScalar M[3]; /* M = 2*H/w_s */
+PetscScalar D[3]; /* D = 0.1*M */
+
+PetscScalar TM[3]; /* Mechanical Torque */
+/* Exciter system constants */
+const PetscScalar KA[3] = {20.0,20.0,20.0};  /* Voltage regulartor gain constant */
+const PetscScalar TA[3] = {0.2,0.2,0.2};     /* Voltage regulator time constant */
+const PetscScalar KE[3] = {1.0,1.0,1.0};     /* Exciter gain constant */
+const PetscScalar TE[3] = {0.314,0.314,0.314}; /* Exciter time constant */
+const PetscScalar KF[3] = {0.063,0.063,0.063};  /* Feedback stabilizer gain constant */
+const PetscScalar TF[3] = {0.35,0.35,0.35};    /* Feedback stabilizer time constant */
+const PetscScalar k1[3] = {0.0039,0.0039,0.0039};
+const PetscScalar k2[3] = {1.555,1.555,1.555};  /* k1 and k2 for calculating the saturation function SE = k1*exp(k2*Efd) */
+
+PetscScalar Vref[3];
+/* Load constants
+  We use a composite load model that describes the load and reactive powers at each time instant as follows
+  P(t) = \sum\limits_{i=0}^ld_nsegsp \ld_alphap_i*P_D0(\frac{V_m(t)}{V_m0})^\ld_betap_i
+  Q(t) = \sum\limits_{i=0}^ld_nsegsq \ld_alphaq_i*Q_D0(\frac{V_m(t)}{V_m0})^\ld_betaq_i
+  where
+    ld_nsegsp,ld_nsegsq - Number of individual load models for real and reactive power loads
+    ld_alphap,ld_alphap - Percentage contribution (weights) or loads
+    P_D0                - Real power load
+    Q_D0                - Reactive power load
+    V_m(t)              - Voltage magnitude at time t
+    V_m0                - Voltage magnitude at t = 0
+    ld_betap, ld_betaq  - exponents describing the load model for real and reactive part
+
+    Note: All loads have the same characteristic currently.
+*/
+const PetscScalar PD0[3] = {1.25,0.9,1.0};
+const PetscScalar QD0[3] = {0.5,0.3,0.35};
+const PetscInt    ld_nsegsp[3] = {3,3,3};
+const PetscScalar ld_alphap[3] = {0.0,0.0,1.0};
+const PetscScalar ld_betap[3]  = {2.0,1.0,0.0};
+const PetscInt    ld_nsegsq[3] = {3,3,3};
+const PetscScalar ld_alphaq[3] = {0.0,0.0,1.0};
+const PetscScalar ld_betaq[3]  = {2.0,1.0,0.0};
+
+typedef struct {
+  DM       dmgen, dmnet; /* DMs to manage generator and network subsystem */
+  DM       dmpgrid;      /* Composite DM to manage the entire power grid */
+  Mat      Ybus;         /* Network admittance matrix */
+  Vec      V0;           /* Initial voltage vector (Power flow solution) */
+  PetscInt neqs_gen,neqs_net,neqs_pgrid;
+  IS       is_diff;      /* indices for differential equations */
+  IS       is_alg;       /* indices for algebraic equations */
+} Userctx;
+
+/* Converts from machine frame (dq) to network (phase a real,imag) reference frame */
+#undef __FUNCT__
+#define __FUNCT__ "dq2ri"
+PetscErrorCode dq2ri(PetscScalar Fd,PetscScalar Fq,PetscScalar delta,PetscScalar *Fr,PetscScalar *Fi)
+{
+  PetscFunctionBegin;
+  *Fr =  Fd*PetscSinScalar(delta) + Fq*PetscCosScalar(delta);
+  *Fi = -Fd*PetscCosScalar(delta) + Fq*PetscSinScalar(delta);
+  PetscFunctionReturn(0);
+}
+
+/* Converts from network frame ([phase a real,imag) to machine (dq) reference frame */
+#undef __FUNCT__
+#define __FUNCT__ "ri2dq"
+PetscErrorCode ri2dq(PetscScalar Fr,PetscScalar Fi,PetscScalar delta,PetscScalar *Fd,PetscScalar *Fq)
+{
+  PetscFunctionBegin;
+  *Fd =  Fr*PetscSinScalar(delta) - Fi*PetscCosScalar(delta);
+  *Fq =  Fr*PetscCosScalar(delta) + Fi*PetscSinScalar(delta);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SetInitialGuess"
+PetscErrorCode SetInitialGuess(Vec X,Userctx *user)
+{
+  PetscErrorCode ierr;
+  Vec            Xgen,Xnet;
+  PetscScalar    *xgen,*xnet;
+  PetscInt       i,idx=0;
+  PetscScalar    Vr,Vi,IGr,IGi,Vm,Vm2;
+  PetscScalar    Eqp,Edp,delta;
+  PetscScalar    Efd,RF,VR; /* Exciter variables */
+  PetscScalar    Id,Iq;  /* Generator dq axis currents */
+  PetscScalar    theta,Vd,Vq,SE;
+
+  PetscFunctionBegin;
+  M[0] = 2*H[0]/w_s; M[1] = 2*H[1]/w_s; M[2] = 2*H[2]/w_s;
+      /*      D[0] = 0.1*M[0]; D[1] = 0.1*M[1]; D[2] = 0.1*M[2];
+       */
+  D[0] = D[1] = D[2] = 0.0;
+  ierr = DMCompositeGetLocalVectors(user->dmpgrid,&Xgen,&Xnet);CHKERRQ(ierr);
+
+  /* Network subsystem initialization */
+  ierr = VecCopy(user->V0,Xnet);CHKERRQ(ierr);
+
+  /* Generator subsystem initialization */
+  ierr = VecGetArray(Xgen,&xgen);CHKERRQ(ierr);
+  ierr = VecGetArray(Xnet,&xnet);CHKERRQ(ierr);
+
+  for (i=0; i < ngen; i++) {
+    Vr  = xnet[2*gbus[i]]; /* Real part of generator terminal voltage */
+    Vi  = xnet[2*gbus[i]+1]; /* Imaginary part of the generator terminal voltage */
+    Vm  = PetscSqrtScalar(Vr*Vr + Vi*Vi); Vm2 = Vm*Vm;
+    IGr = (Vr*PG[i] + Vi*QG[i])/Vm2;
+    IGi = (Vi*PG[i] - Vr*QG[i])/Vm2;
+
+    delta = atan2(Vi+Xq[i]*IGr,Vr-Xq[i]*IGi); /* Machine angle */
+
+    theta = PETSC_PI/2.0 - delta;
+
+    Id = IGr*PetscCosScalar(theta) - IGi*PetscSinScalar(theta); /* d-axis stator current */
+    Iq = IGr*PetscSinScalar(theta) + IGi*PetscCosScalar(theta); /* q-axis stator current */
+
+    Vd = Vr*PetscCosScalar(theta) - Vi*PetscSinScalar(theta);
+    Vq = Vr*PetscSinScalar(theta) + Vi*PetscCosScalar(theta);
+
+    Edp = Vd + Rs[i]*Id - Xqp[i]*Iq; /* d-axis transient EMF */
+    Eqp = Vq + Rs[i]*Iq + Xdp[i]*Id; /* q-axis transient EMF */
+
+    TM[i] = PG[i];
+
+    /* The generator variables are ordered as [Eqp,Edp,delta,w,Id,Iq] */
+    xgen[idx]   = Eqp;
+    xgen[idx+1] = Edp;
+    xgen[idx+2] = delta;
+    xgen[idx+3] = w_s;
+
+    idx = idx + 4;
+
+    xgen[idx]   = Id;
+    xgen[idx+1] = Iq;
+
+    idx = idx + 2;
+
+    /* Exciter */
+    Efd = Eqp + (Xd[i] - Xdp[i])*Id;
+    SE  = k1[i]*PetscExpScalar(k2[i]*Efd);
+    VR  =  KE[i]*Efd + SE;
+    RF  =  KF[i]*Efd/TF[i];
+
+    xgen[idx]   = Efd;
+    xgen[idx+1] = RF;
+    xgen[idx+2] = VR;
+
+    Vref[i] = Vm + (VR/KA[i]);
+
+    idx = idx + 3;
+  }
+
+  ierr = VecRestoreArray(Xgen,&xgen);CHKERRQ(ierr);
+  ierr = VecRestoreArray(Xnet,&xnet);CHKERRQ(ierr);
+
+  /* ierr = VecView(Xgen,0);CHKERRQ(ierr); */
+  ierr = DMCompositeGather(user->dmpgrid,X,INSERT_VALUES,Xgen,Xnet);CHKERRQ(ierr);
+  ierr = DMCompositeRestoreLocalVectors(user->dmpgrid,&Xgen,&Xnet);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PreallocateJacobian"
+PetscErrorCode PreallocateJacobian(Mat J,Userctx *user)
+{
+  PetscErrorCode ierr;
+  PetscInt       *d_nnz;
+  PetscInt       i,idx=0,start=0;
+  PetscInt       ncols;
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc1(user->neqs_pgrid,&d_nnz);CHKERRQ(ierr);
+  for (i=0; i<user->neqs_pgrid; i++) d_nnz[i] = 0;
+  /* Generator subsystem */
+  for (i=0; i < ngen; i++) {
+
+    d_nnz[idx]   += 3;
+    d_nnz[idx+1] += 2;
+    d_nnz[idx+2] += 2;
+    d_nnz[idx+3] += 5;
+    d_nnz[idx+4] += 6;
+    d_nnz[idx+5] += 6;
+
+    d_nnz[user->neqs_gen+2*gbus[i]]   += 3;
+    d_nnz[user->neqs_gen+2*gbus[i]+1] += 3;
+
+    d_nnz[idx+6] += 2;
+    d_nnz[idx+7] += 2;
+    d_nnz[idx+8] += 5;
+
+    idx = idx + 9;
+  }
+
+  start = user->neqs_gen;
+
+  for (i=0; i < nbus; i++) {
+    ierr = MatGetRow(user->Ybus,2*i,&ncols,NULL,NULL);CHKERRQ(ierr);
+    d_nnz[start+2*i]   += ncols;
+    d_nnz[start+2*i+1] += ncols;
+    ierr = MatRestoreRow(user->Ybus,2*i,&ncols,NULL,NULL);CHKERRQ(ierr);
+  }
+
+  ierr = MatSeqAIJSetPreallocation(J,0,d_nnz);CHKERRQ(ierr);
+
+  ierr = PetscFree(d_nnz);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+/*
+   J = [-df_dx, -df_dy
+        dg_dx, dg_dy]
+*/
+#undef __FUNCT__
+#define __FUNCT__ "ResidualJacobian"
+PetscErrorCode ResidualJacobian(Vec X,Mat J,void *ctx)
+{
+  PetscErrorCode ierr;
+  Userctx        *user=(Userctx*)ctx;
+  Vec            Xgen,Xnet;
+  PetscScalar    *xgen,*xnet;
+  PetscInt       i,idx=0;
+  PetscScalar    Vr,Vi,Vm,Vm2;
+  PetscScalar    Eqp,Edp,delta; /* Generator variables */
+  PetscScalar    Efd;
+  PetscScalar    Id,Iq;  /* Generator dq axis currents */
+  PetscScalar    Vd,Vq;
+  PetscScalar    val[10];
+  PetscInt       row[2],col[10];
+  PetscInt       net_start=user->neqs_gen;
+  PetscScalar    Zdq_inv[4],det;
+  PetscScalar    dVd_dVr,dVd_dVi,dVq_dVr,dVq_dVi,dVd_ddelta,dVq_ddelta;
+  PetscScalar    dIGr_ddelta,dIGi_ddelta,dIGr_dId,dIGr_dIq,dIGi_dId,dIGi_dIq;
+  PetscScalar    dSE_dEfd;
+  PetscScalar    dVm_dVd,dVm_dVq,dVm_dVr,dVm_dVi;
+  PetscInt          ncols;
+  const PetscInt    *cols;
+  const PetscScalar *yvals;
+  PetscInt          k;
+  PetscScalar PD,QD,Vm0,*v0,Vm4;
+  PetscScalar dPD_dVr,dPD_dVi,dQD_dVr,dQD_dVi;
+  PetscScalar dIDr_dVr,dIDr_dVi,dIDi_dVr,dIDi_dVi;
+
+
+  PetscFunctionBegin;
+  ierr = MatZeroEntries(J);CHKERRQ(ierr);
+  ierr = DMCompositeGetLocalVectors(user->dmpgrid,&Xgen,&Xnet);CHKERRQ(ierr);
+  ierr = DMCompositeScatter(user->dmpgrid,X,Xgen,Xnet);CHKERRQ(ierr);
+
+  ierr = VecGetArray(Xgen,&xgen);CHKERRQ(ierr);
+  ierr = VecGetArray(Xnet,&xnet);CHKERRQ(ierr);
+
+  /* Generator subsystem */
+  for (i=0; i < ngen; i++) {
+    Eqp   = xgen[idx];
+    Edp   = xgen[idx+1];
+    delta = xgen[idx+2];
+    Id    = xgen[idx+4];
+    Iq    = xgen[idx+5];
+    Efd   = xgen[idx+6];
+
+    /*    fgen[idx]   = (Eqp + (Xd[i] - Xdp[i])*Id - Efd)/Td0p[i]; */
+    row[0] = idx;
+    col[0] = idx;           col[1] = idx+4;          col[2] = idx+6;
+    val[0] = 1/ Td0p[i]; val[1] = (Xd[i] - Xdp[i])/ Td0p[i]; val[2] = -1/Td0p[i];
+
+    ierr = MatSetValues(J,1,row,3,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /*    fgen[idx+1] = (Edp - (Xq[i] - Xqp[i])*Iq)/Tq0p[i]; */
+    row[0] = idx + 1;
+    col[0] = idx + 1;       col[1] = idx+5;
+    val[0] = 1/Tq0p[i]; val[1] = -(Xq[i] - Xqp[i])/Tq0p[i];
+    ierr   = MatSetValues(J,1,row,2,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /*    fgen[idx+2] = - w + w_s; */
+    row[0] = idx + 2;
+    col[0] = idx + 2; col[1] = idx + 3;
+    val[0] = 0;       val[1] = -1;
+    ierr   = MatSetValues(J,1,row,2,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /*    fgen[idx+3] = (-TM[i] + Edp*Id + Eqp*Iq + (Xqp[i] - Xdp[i])*Id*Iq + D[i]*(w - w_s))/M[i]; */
+    row[0] = idx + 3;
+    col[0] = idx; col[1] = idx + 1; col[2] = idx + 3;       col[3] = idx + 4;                  col[4] = idx + 5;
+    val[0] = Iq/M[i];  val[1] = Id/M[i];      val[2] = D[i]/M[i]; val[3] = (Edp + (Xqp[i]-Xdp[i])*Iq)/M[i]; val[4] = (Eqp + (Xqp[i] - Xdp[i])*Id)/M[i];
+    ierr   = MatSetValues(J,1,row,5,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    Vr   = xnet[2*gbus[i]]; /* Real part of generator terminal voltage */
+    Vi   = xnet[2*gbus[i]+1]; /* Imaginary part of the generator terminal voltage */
+    ierr = ri2dq(Vr,Vi,delta,&Vd,&Vq);CHKERRQ(ierr);
+
+    det = Rs[i]*Rs[i] + Xdp[i]*Xqp[i];
+
+    Zdq_inv[0] = Rs[i]/det;
+    Zdq_inv[1] = Xqp[i]/det;
+    Zdq_inv[2] = -Xdp[i]/det;
+    Zdq_inv[3] = Rs[i]/det;
+
+    dVd_dVr    = PetscSinScalar(delta); dVd_dVi = -PetscCosScalar(delta);
+    dVq_dVr    = PetscCosScalar(delta); dVq_dVi = PetscSinScalar(delta);
+    dVd_ddelta = Vr*PetscCosScalar(delta) + Vi*PetscSinScalar(delta);
+    dVq_ddelta = -Vr*PetscSinScalar(delta) + Vi*PetscCosScalar(delta);
+
+    /*    fgen[idx+4] = Zdq_inv[0]*(-Edp + Vd) + Zdq_inv[1]*(-Eqp + Vq) + Id; */
+    row[0] = idx+4;
+    col[0] = idx;         col[1] = idx+1;        col[2] = idx + 2;
+    val[0] = -Zdq_inv[1]; val[1] = -Zdq_inv[0];  val[2] = Zdq_inv[0]*dVd_ddelta + Zdq_inv[1]*dVq_ddelta;
+    col[3] = idx + 4; col[4] = net_start+2*gbus[i];                     col[5] = net_start + 2*gbus[i]+1;
+    val[3] = 1;       val[4] = Zdq_inv[0]*dVd_dVr + Zdq_inv[1]*dVq_dVr; val[5] = Zdq_inv[0]*dVd_dVi + Zdq_inv[1]*dVq_dVi;
+    ierr   = MatSetValues(J,1,row,6,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /*  fgen[idx+5] = Zdq_inv[2]*(-Edp + Vd) + Zdq_inv[3]*(-Eqp + Vq) + Iq; */
+    row[0] = idx+5;
+    col[0] = idx;         col[1] = idx+1;        col[2] = idx + 2;
+    val[0] = -Zdq_inv[3]; val[1] = -Zdq_inv[2];  val[2] = Zdq_inv[2]*dVd_ddelta + Zdq_inv[3]*dVq_ddelta;
+    col[3] = idx + 5; col[4] = net_start+2*gbus[i];                     col[5] = net_start + 2*gbus[i]+1;
+    val[3] = 1;       val[4] = Zdq_inv[2]*dVd_dVr + Zdq_inv[3]*dVq_dVr; val[5] = Zdq_inv[2]*dVd_dVi + Zdq_inv[3]*dVq_dVi;
+    ierr   = MatSetValues(J,1,row,6,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    dIGr_ddelta = Id*PetscCosScalar(delta) - Iq*PetscSinScalar(delta);
+    dIGi_ddelta = Id*PetscSinScalar(delta) + Iq*PetscCosScalar(delta);
+    dIGr_dId    = PetscSinScalar(delta);  dIGr_dIq = PetscCosScalar(delta);
+    dIGi_dId    = -PetscCosScalar(delta); dIGi_dIq = PetscSinScalar(delta);
+
+    /* fnet[2*gbus[i]]   -= IGi; */
+    row[0] = net_start + 2*gbus[i];
+    col[0] = idx+2;        col[1] = idx + 4;   col[2] = idx + 5;
+    val[0] = -dIGi_ddelta; val[1] = -dIGi_dId; val[2] = -dIGi_dIq;
+    ierr = MatSetValues(J,1,row,3,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /* fnet[2*gbus[i]+1]   -= IGr; */
+    row[0] = net_start + 2*gbus[i]+1;
+    col[0] = idx+2;        col[1] = idx + 4;   col[2] = idx + 5;
+    val[0] = -dIGr_ddelta; val[1] = -dIGr_dId; val[2] = -dIGr_dIq;
+    ierr   = MatSetValues(J,1,row,3,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    Vm = PetscSqrtScalar(Vd*Vd + Vq*Vq); Vm2 = Vm*Vm;
+
+    /*    fgen[idx+6] = (KE[i]*Efd + SE - VR)/TE[i]; */
+    /*    SE  = k1[i]*PetscExpScalar(k2[i]*Efd); */
+
+    dSE_dEfd = k1[i]*k2[i]*PetscExpScalar(k2[i]*Efd);
+
+    row[0] = idx + 6;
+    col[0] = idx + 6;                     col[1] = idx + 8;
+    val[0] = (KE[i] + dSE_dEfd)/TE[i];  val[1] = -1/TE[i];
+    ierr   = MatSetValues(J,1,row,2,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /* Exciter differential equations */
+
+    /*    fgen[idx+7] = (RF - KF[i]*Efd/TF[i])/TF[i]; */
+    row[0] = idx + 7;
+    col[0] = idx + 6;       col[1] = idx + 7;
+    val[0] = (-KF[i]/TF[i])/TF[i];  val[1] = 1/TF[i];
+    ierr   = MatSetValues(J,1,row,2,col,val,INSERT_VALUES);CHKERRQ(ierr);
+
+    /*    fgen[idx+8] = (VR - KA[i]*RF + KA[i]*KF[i]*Efd/TF[i] - KA[i]*(Vref[i] - Vm))/TA[i]; */
+    /* Vm = (Vd^2 + Vq^2)^0.5; */
+
+    dVm_dVd = Vd/Vm; dVm_dVq = Vq/Vm;
+    dVm_dVr = dVm_dVd*dVd_dVr + dVm_dVq*dVq_dVr;
+    dVm_dVi = dVm_dVd*dVd_dVi + dVm_dVq*dVq_dVi;
+    row[0]  = idx + 8;
+    col[0]  = idx + 6;           col[1] = idx + 7; col[2] = idx + 8;
+    val[0]  = (KA[i]*KF[i]/TF[i])/TA[i]; val[1] = -KA[i]/TA[i];  val[2] = 1/TA[i];
+    col[3]  = net_start + 2*gbus[i]; col[4] = net_start + 2*gbus[i]+1;
+    val[3]  = KA[i]*dVm_dVr/TA[i];         val[4] = KA[i]*dVm_dVi/TA[i];
+    ierr    = MatSetValues(J,1,row,5,col,val,INSERT_VALUES);CHKERRQ(ierr);
+    idx     = idx + 9;
+  }
+
+  for (i=0; i<nbus; i++) {
+    ierr   = MatGetRow(user->Ybus,2*i,&ncols,&cols,&yvals);CHKERRQ(ierr);
+    row[0] = net_start + 2*i;
+    for (k=0; k<ncols; k++) {
+      col[k] = net_start + cols[k];
+      val[k] = yvals[k];
+    }
+    ierr = MatSetValues(J,1,row,ncols,col,val,INSERT_VALUES);CHKERRQ(ierr);
+    ierr = MatRestoreRow(user->Ybus,2*i,&ncols,&cols,&yvals);CHKERRQ(ierr);
+
+    ierr   = MatGetRow(user->Ybus,2*i+1,&ncols,&cols,&yvals);CHKERRQ(ierr);
+    row[0] = net_start + 2*i+1;
+    for (k=0; k<ncols; k++) {
+      col[k] = net_start + cols[k];
+      val[k] = yvals[k];
+    }
+    ierr = MatSetValues(J,1,row,ncols,col,val,INSERT_VALUES);CHKERRQ(ierr);
+    ierr = MatRestoreRow(user->Ybus,2*i+1,&ncols,&cols,&yvals);CHKERRQ(ierr);
+  }
+
+  ierr = MatAssemblyBegin(J,MAT_FLUSH_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(J,MAT_FLUSH_ASSEMBLY);CHKERRQ(ierr);
+
+  ierr = VecGetArray(user->V0,&v0);CHKERRQ(ierr);
+  for (i=0; i < nload; i++) {
+    Vr      = xnet[2*lbus[i]]; /* Real part of load bus voltage */
+    Vi      = xnet[2*lbus[i]+1]; /* Imaginary part of the load bus voltage */
+    Vm      = PetscSqrtScalar(Vr*Vr + Vi*Vi); Vm2 = Vm*Vm; Vm4 = Vm2*Vm2;
+    Vm0     = PetscSqrtScalar(v0[2*lbus[i]]*v0[2*lbus[i]] + v0[2*lbus[i]+1]*v0[2*lbus[i]+1]);
+    PD      = QD = 0.0;
+    dPD_dVr = dPD_dVi = dQD_dVr = dQD_dVi = 0.0;
+    for (k=0; k < ld_nsegsp[i]; k++) {
+      PD      += ld_alphap[k]*PD0[i]*PetscPowScalar((Vm/Vm0),ld_betap[k]);
+      dPD_dVr += ld_alphap[k]*ld_betap[k]*PD0[i]*PetscPowScalar((1/Vm0),ld_betap[k])*Vr*PetscPowScalar(Vm,(ld_betap[k]-2));
+      dPD_dVi += ld_alphap[k]*ld_betap[k]*PD0[i]*PetscPowScalar((1/Vm0),ld_betap[k])*Vi*PetscPowScalar(Vm,(ld_betap[k]-2));
+    }
+    for (k=0; k < ld_nsegsq[i]; k++) {
+      QD      += ld_alphaq[k]*QD0[i]*PetscPowScalar((Vm/Vm0),ld_betaq[k]);
+      dQD_dVr += ld_alphaq[k]*ld_betaq[k]*QD0[i]*PetscPowScalar((1/Vm0),ld_betaq[k])*Vr*PetscPowScalar(Vm,(ld_betaq[k]-2));
+      dQD_dVi += ld_alphaq[k]*ld_betaq[k]*QD0[i]*PetscPowScalar((1/Vm0),ld_betaq[k])*Vi*PetscPowScalar(Vm,(ld_betaq[k]-2));
+    }
+
+    /*    IDr = (PD*Vr + QD*Vi)/Vm2; */
+    /*    IDi = (-QD*Vr + PD*Vi)/Vm2; */
+
+    dIDr_dVr = (dPD_dVr*Vr + dQD_dVr*Vi + PD)/Vm2 - ((PD*Vr + QD*Vi)*2*Vr)/Vm4;
+    dIDr_dVi = (dPD_dVi*Vr + dQD_dVi*Vi + QD)/Vm2 - ((PD*Vr + QD*Vi)*2*Vi)/Vm4;
+
+    dIDi_dVr = (-dQD_dVr*Vr + dPD_dVr*Vi - QD)/Vm2 - ((-QD*Vr + PD*Vi)*2*Vr)/Vm4;
+    dIDi_dVi = (-dQD_dVi*Vr + dPD_dVi*Vi + PD)/Vm2 - ((-QD*Vr + PD*Vi)*2*Vi)/Vm4;
+
+
+    /*    fnet[2*lbus[i]]   += IDi; */
+    row[0] = net_start + 2*lbus[i];
+    col[0] = net_start + 2*lbus[i];  col[1] = net_start + 2*lbus[i]+1;
+    val[0] = dIDi_dVr;               val[1] = dIDi_dVi;
+    ierr   = MatSetValues(J,1,row,2,col,val,ADD_VALUES);CHKERRQ(ierr);
+    /*    fnet[2*lbus[i]+1] += IDr; */
+    row[0] = net_start + 2*lbus[i]+1;
+    col[0] = net_start + 2*lbus[i];  col[1] = net_start + 2*lbus[i]+1;
+    val[0] = dIDr_dVr;               val[1] = dIDr_dVi;
+    ierr   = MatSetValues(J,1,row,2,col,val,ADD_VALUES);CHKERRQ(ierr);
+  }
+  ierr = VecRestoreArray(user->V0,&v0);CHKERRQ(ierr);
+
+  ierr = VecRestoreArray(Xgen,&xgen);CHKERRQ(ierr);
+  ierr = VecRestoreArray(Xnet,&xnet);CHKERRQ(ierr);
+
+  ierr = DMCompositeRestoreLocalVectors(user->dmpgrid,&Xgen,&Xnet);CHKERRQ(ierr);
+
+  ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  EPS            eps;
+  EPSType        type;
+  PetscErrorCode ierr;
+  PetscMPIInt    size;
+  Userctx        user;
+  PetscViewer    Xview,Ybusview;
+  Vec            X,Xr,Xi;
+  Mat            J,Jred=NULL;
+  IS             is0,is1;
+  PetscInt       i,*idx2,its,nev,nconv;
+  PetscReal      error,re,im;
+  PetscScalar    kr,ki;
+  PetscBool      terse;
+
+  ierr = SlepcInitialize(&argc,&argv,NULL,help);CHKERRQ(ierr);
+  ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr);
+  if (size > 1) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_SUP,"Only for sequential runs");
+  /* show detailed info unless -terse option is given by user */
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+
+  user.neqs_gen   = 9*ngen; /* # eqs. for generator subsystem */
+  user.neqs_net   = 2*nbus; /* # eqs. for network subsystem   */
+  user.neqs_pgrid = user.neqs_gen + user.neqs_net;
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nStability analysis in a network with %D buses and %D generators\n\n",nbus,ngen);CHKERRQ(ierr);
+
+  /* Create indices for differential and algebraic equations */
+  ierr = PetscMalloc1(7*ngen,&idx2);CHKERRQ(ierr);
+  for (i=0; i<ngen; i++) {
+    idx2[7*i]   = 9*i;   idx2[7*i+1] = 9*i+1; idx2[7*i+2] = 9*i+2; idx2[7*i+3] = 9*i+3;
+    idx2[7*i+4] = 9*i+6; idx2[7*i+5] = 9*i+7; idx2[7*i+6] = 9*i+8;
+  }
+  ierr = ISCreateGeneral(PETSC_COMM_WORLD,7*ngen,idx2,PETSC_COPY_VALUES,&user.is_diff);CHKERRQ(ierr);
+  ierr = ISComplement(user.is_diff,0,user.neqs_pgrid,&user.is_alg);CHKERRQ(ierr);
+  ierr = PetscFree(idx2);CHKERRQ(ierr);
+
+  /* Read initial voltage vector and Ybus */
+  ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,"X.bin",FILE_MODE_READ,&Xview);CHKERRQ(ierr);
+  ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,"Ybus.bin",FILE_MODE_READ,&Ybusview);CHKERRQ(ierr);
+
+  ierr = VecCreate(PETSC_COMM_WORLD,&user.V0);CHKERRQ(ierr);
+  ierr = VecSetSizes(user.V0,PETSC_DECIDE,user.neqs_net);CHKERRQ(ierr);
+  ierr = VecLoad(user.V0,Xview);CHKERRQ(ierr);
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&user.Ybus);CHKERRQ(ierr);
+  ierr = MatSetSizes(user.Ybus,PETSC_DECIDE,PETSC_DECIDE,user.neqs_net,user.neqs_net);CHKERRQ(ierr);
+  ierr = MatSetType(user.Ybus,MATBAIJ);CHKERRQ(ierr);
+  /*  ierr = MatSetBlockSize(user.Ybus,2);CHKERRQ(ierr); */
+  ierr = MatLoad(user.Ybus,Ybusview);CHKERRQ(ierr);
+
+  ierr = PetscViewerDestroy(&Xview);CHKERRQ(ierr);
+  ierr = PetscViewerDestroy(&Ybusview);CHKERRQ(ierr);
+
+  /* Create DMs for generator and network subsystems */
+  ierr = DMDACreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,user.neqs_gen,1,1,NULL,&user.dmgen);CHKERRQ(ierr);
+  ierr = DMSetOptionsPrefix(user.dmgen,"dmgen_");CHKERRQ(ierr);
+  ierr = DMDACreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,user.neqs_net,1,1,NULL,&user.dmnet);CHKERRQ(ierr);
+  ierr = DMSetOptionsPrefix(user.dmnet,"dmnet_");CHKERRQ(ierr);
+  /* Create a composite DM packer and add the two DMs */
+  ierr = DMCompositeCreate(PETSC_COMM_WORLD,&user.dmpgrid);CHKERRQ(ierr);
+  ierr = DMSetOptionsPrefix(user.dmpgrid,"pgrid_");CHKERRQ(ierr);
+  ierr = DMCompositeAddDM(user.dmpgrid,user.dmgen);CHKERRQ(ierr);
+  ierr = DMCompositeAddDM(user.dmpgrid,user.dmnet);CHKERRQ(ierr);
+
+  ierr = DMCreateGlobalVector(user.dmpgrid,&X);CHKERRQ(ierr);
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&J);CHKERRQ(ierr);
+  ierr = MatSetSizes(J,PETSC_DECIDE,PETSC_DECIDE,user.neqs_pgrid,user.neqs_pgrid);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(J);CHKERRQ(ierr);
+  ierr = PreallocateJacobian(J,&user);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+     Set initial conditions
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  ierr = SetInitialGuess(X,&user);CHKERRQ(ierr);
+
+  /* Form Jacobian */
+  ierr = ResidualJacobian(X,J,(void*)&user);CHKERRQ(ierr);
+  ierr = MatScale(J,-1);CHKERRQ(ierr);
+  is0 = user.is_diff;
+  is1 = user.is_alg;
+
+  ierr = MatGetSchurComplement(J,is1,is1,is0,is0,MAT_IGNORE_MATRIX,NULL,MAT_SCHUR_COMPLEMENT_AINV_DIAG,MAT_INITIAL_MATRIX,&Jred);CHKERRQ(ierr);
+
+  if (!terse) {
+    ierr = MatView(Jred,NULL);CHKERRQ(ierr);
+  }
+
+  ierr = MatCreateVecs(Jred,NULL,&Xr);CHKERRQ(ierr);
+  ierr = MatCreateVecs(Jred,NULL,&Xi);CHKERRQ(ierr);
+
+  /* Create the eigensolver and set the various options */
+  ierr = EPSCreate(PETSC_COMM_WORLD,&eps);CHKERRQ(ierr);
+  ierr = EPSSetOperators(eps,Jred,NULL);CHKERRQ(ierr);
+  ierr = EPSSetProblemType(eps,EPS_NHEP);CHKERRQ(ierr);
+  ierr = EPSSetFromOptions(eps);CHKERRQ(ierr);
+  
+  /* Solve the eigenvalue problem */
+  ierr = EPSSolve(eps);CHKERRQ(ierr);
+
+  ierr = EPSGetIterationNumber(eps,&its);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of iterations of the eigensolver: %D\n",its);CHKERRQ(ierr);
+  ierr = EPSGetType(eps,&type);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n\n", type);CHKERRQ(ierr);
+  ierr = EPSGetDimensions(eps,&nev,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of requested eigenvalues: %D\n",nev);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                    Display solution and clean up
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  if (terse) {
+    ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
+  } else {
+    /* Get number of converged approximate eigenpairs */
+    ierr = EPSGetConverged(eps,&nconv);CHKERRQ(ierr);
+    ierr = PetscPrintf(PETSC_COMM_WORLD," Number of converged eigenpairs: %D\n\n",nconv);CHKERRQ(ierr);
+  
+    if (nconv>0) {
+      /* Display eigenvalues and relative errors */
+      ierr = PetscPrintf(PETSC_COMM_WORLD,
+           "           k          ||Ax-kx||/||kx||\n"
+           "   ----------------- ------------------\n");CHKERRQ(ierr);
+  
+      for (i=0;i<nconv;i++) {
+        /* Get converged eigenpairs: i-th eigenvalue is stored in kr (real part) and
+          ki (imaginary part) */
+        ierr = EPSGetEigenpair(eps,i,&kr,&ki,Xr,Xi);CHKERRQ(ierr);
+        /* Compute the relative error associated to each eigenpair */
+        ierr = EPSComputeError(eps,i,EPS_ERROR_RELATIVE,&error);CHKERRQ(ierr);
+
+#if defined(PETSC_USE_COMPLEX)
+        re = PetscRealPart(kr);
+        im = PetscImaginaryPart(kr);
+#else
+        re = kr;
+        im = ki;
+#endif
+        if (im!=0.0) {
+          ierr = PetscPrintf(PETSC_COMM_WORLD," %9f%+9fi %12g\n",(double)re,(double)im,(double)error);CHKERRQ(ierr);
+        } else {
+          ierr = PetscPrintf(PETSC_COMM_WORLD,"   %12f       %12g\n",(double)re,(double)error);CHKERRQ(ierr);
+        }
+      }
+      ierr = PetscPrintf(PETSC_COMM_WORLD,"\n");CHKERRQ(ierr);
+    }
+  }
+
+  /* Free work space */
+  ierr = EPSDestroy(&eps);CHKERRQ(ierr);
+  ierr = MatDestroy(&J);CHKERRQ(ierr);
+  ierr = MatDestroy(&Jred);CHKERRQ(ierr);
+  ierr = MatDestroy(&user.Ybus);CHKERRQ(ierr);
+  ierr = VecDestroy(&X);CHKERRQ(ierr);
+  ierr = VecDestroy(&Xr);CHKERRQ(ierr);
+  ierr = VecDestroy(&Xi);CHKERRQ(ierr);
+  ierr = VecDestroy(&user.V0);CHKERRQ(ierr);
+  ierr = DMDestroy(&user.dmgen);CHKERRQ(ierr);
+  ierr = DMDestroy(&user.dmnet);CHKERRQ(ierr);
+  ierr = DMDestroy(&user.dmpgrid);CHKERRQ(ierr);
+  ierr = ISDestroy(&user.is_diff);CHKERRQ(ierr);
+  ierr = ISDestroy(&user.is_alg);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
diff --git a/src/eps/examples/tutorials/ex31.c.html b/src/eps/examples/tutorials/ex31.c.html
new file mode 100644
index 0000000..221df22
--- /dev/null
+++ b/src/eps/examples/tutorials/ex31.c.html
@@ -0,0 +1,701 @@
+<center><a href="ex31.c">Actual source code: ex31.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex31.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:33:29+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex31.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Power grid small signal stability analysis of WECC 9 bus system.\n\</font>
+<a name="line23"> 23: </a><font color="#666666">This example is based on the 9-bus (node) example given in the book Power\n\</font>
+<a name="line24"> 24: </a><font color="#666666">Systems Dynamics and Stability (Chapter 8) by P. Sauer and M. A. Pai.\n\</font>
+<a name="line25"> 25: </a><font color="#666666">The power grid in this example consists of 9 buses (nodes), 3 generators,\n\</font>
+<a name="line26"> 26: </a><font color="#666666">3 loads, and 9 transmission lines. The network equations are written\n\</font>
+<a name="line27"> 27: </a><font color="#666666">in current balance form using rectangular coordinates. It uses the SLEPc\n\</font>
+<a name="line28"> 28: </a><font color="#666666">package to calculate the eigenvalues for small signal stability analysis\n\n"</font>;
+
+<a name="line30"> 30: </a><font color="#B22222">/*</font>
+<a name="line31"> 31: </a><font color="#B22222">   This example is based on PETSc's ex9bus example (under TS).</font>
+
+<a name="line33"> 33: </a><font color="#B22222">   The equations for the stability analysis are described by the DAE</font>
+
+<a name="line35"> 35: </a><font color="#B22222">   \dot{x} = f(x,y,t)</font>
+<a name="line36"> 36: </a><font color="#B22222">     0     = g(x,y,t)</font>
+
+<a name="line38"> 38: </a><font color="#B22222">   where the generators are described by differential equations, while the algebraic</font>
+<a name="line39"> 39: </a><font color="#B22222">   constraints define the network equations.</font>
+
+<a name="line41"> 41: </a><font color="#B22222">   The generators are modeled with a 4th order differential equation describing the electrical</font>
+<a name="line42"> 42: </a><font color="#B22222">   and mechanical dynamics. Each generator also has an exciter system modeled by 3rd order</font>
+<a name="line43"> 43: </a><font color="#B22222">   diff. eqns. describing the exciter, voltage regulator, and the feedback stabilizer</font>
+<a name="line44"> 44: </a><font color="#B22222">   mechanism.</font>
+
+<a name="line46"> 46: </a><font color="#B22222">   The network equations are described by nodal current balance equations.</font>
+<a name="line47"> 47: </a><font color="#B22222">    I(x,y) - Y*V = 0</font>
+
+<a name="line49"> 49: </a><font color="#B22222">   where:</font>
+<a name="line50"> 50: </a><font color="#B22222">    I(x,y) is the current injected from generators and loads.</font>
+<a name="line51"> 51: </a><font color="#B22222">      Y    is the admittance matrix, and</font>
+<a name="line52"> 52: </a><font color="#B22222">      V    is the voltage vector</font>
+
+<a name="line54"> 54: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line55"> 55: </a><font color="#B22222"> </font>
+<a name="line56"> 56: </a><font color="#B22222">   The linearized equations for the eigenvalue analysis are</font>
+
+<a name="line58"> 58: </a><font color="#B22222">     \dot{\delta{x}} = f_x*\delta{x} + f_y*\delta{y}</font>
+<a name="line59"> 59: </a><font color="#B22222">             0       = g_x*\delta{x} + g_y*\delta{y}</font>
+
+<a name="line61"> 61: </a><font color="#B22222">   This gives the linearized sensitivity matrix</font>
+<a name="line62"> 62: </a><font color="#B22222">     A = | f_x  f_y |</font>
+<a name="line63"> 63: </a><font color="#B22222">         | g_x  g_y |</font>
+
+<a name="line65"> 65: </a><font color="#B22222">   We are interested in the eigenvalues of the Schur complement of A</font>
+<a name="line66"> 66: </a><font color="#B22222">     \hat{A} = f_x - g_x*inv(g_y)*f_y</font>
+
+
+<a name="line69"> 69: </a><font color="#B22222">   Example contributed by: Shrirang Abhyankar</font>
+<a name="line70"> 70: </a><font color="#B22222">*/</font>
+
+<a name="line72"> 72: </a><font color="#A020F0">#include <petscdm.h></font>
+<a name="line73"> 73: </a><font color="#A020F0">#include <petscdmda.h></font>
+<a name="line74"> 74: </a><font color="#A020F0">#include <petscdmcomposite.h></font>
+<a name="line75"> 75: </a><font color="#A020F0">#include <slepceps.h></font>
+
+<a name="line77"> 77: </a><strong><font color="#228B22">#define freq 60</font></strong>
+<a name="line78"> 78: </a><strong><font color="#228B22">#define w_s (2*PETSC_PI*freq)</font></strong>
+
+<a name="line80"> 80: </a><font color="#B22222">/* Sizes and indices */</font>
+<a name="line81"> 81: </a>const PetscInt nbus    = 9; <font color="#B22222">/* Number of network buses */</font>
+<a name="line82"> 82: </a>const PetscInt ngen    = 3; <font color="#B22222">/* Number of generators */</font>
+<a name="line83"> 83: </a>const PetscInt nload   = 3; <font color="#B22222">/* Number of loads */</font>
+<a name="line84"> 84: </a>const PetscInt gbus[3] = {0,1,2}; <font color="#B22222">/* Buses at which generators are incident */</font>
+<a name="line85"> 85: </a>const PetscInt lbus[3] = {4,5,7}; <font color="#B22222">/* Buses at which loads are incident */</font>
+
+<a name="line87"> 87: </a><font color="#B22222">/* Generator real and reactive powers (found via loadflow) */</font>
+<a name="line88"> 88: </a>const PetscScalar PG[3] = {0.716786142395021,1.630000000000000,0.850000000000000};
+<a name="line89"> 89: </a>const PetscScalar QG[3] = {0.270702180178785,0.066120127797275,-0.108402221791588};
+<a name="line90"> 90: </a><font color="#B22222">/* Generator constants */</font>
+<a name="line91"> 91: </a>const PetscScalar H[3]    = {23.64,6.4,3.01};   <font color="#B22222">/* Inertia constant */</font>
+<a name="line92"> 92: </a>const PetscScalar Rs[3]   = {0.0,0.0,0.0}; <font color="#B22222">/* Stator Resistance */</font>
+<a name="line93"> 93: </a>const PetscScalar Xd[3]   = {0.146,0.8958,1.3125};  <font color="#B22222">/* d-axis reactance */</font>
+<a name="line94"> 94: </a>const PetscScalar Xdp[3]  = {0.0608,0.1198,0.1813}; <font color="#B22222">/* d-axis transient reactance */</font>
+<a name="line95"> 95: </a>const PetscScalar Xq[3]   = {0.0969,0.8645,1.2578}; <font color="#B22222">/* q-axis reactance Xq(1) set to 0.4360, value given in text 0.0969 */</font>
+<a name="line96"> 96: </a>const PetscScalar Xqp[3]  = {0.0969,0.1969,0.25}; <font color="#B22222">/* q-axis transient reactance */</font>
+<a name="line97"> 97: </a>const PetscScalar Td0p[3] = {8.96,6.0,5.89}; <font color="#B22222">/* d-axis open circuit time constant */</font>
+<a name="line98"> 98: </a>const PetscScalar Tq0p[3] = {0.31,0.535,0.6}; <font color="#B22222">/* q-axis open circuit time constant */</font>
+<a name="line99"> 99: </a>PetscScalar M[3]; <font color="#B22222">/* M = 2*H/w_s */</font>
+<a name="line100">100: </a>PetscScalar D[3]; <font color="#B22222">/* D = 0.1*M */</font>
+
+<a name="line102">102: </a>PetscScalar TM[3]; <font color="#B22222">/* Mechanical Torque */</font>
+<a name="line103">103: </a><font color="#B22222">/* Exciter system constants */</font>
+<a name="line104">104: </a>const PetscScalar KA[3] = {20.0,20.0,20.0};  <font color="#B22222">/* Voltage regulartor gain constant */</font>
+<a name="line105">105: </a>const PetscScalar TA[3] = {0.2,0.2,0.2};     <font color="#B22222">/* Voltage regulator time constant */</font>
+<a name="line106">106: </a>const PetscScalar KE[3] = {1.0,1.0,1.0};     <font color="#B22222">/* Exciter gain constant */</font>
+<a name="line107">107: </a>const PetscScalar TE[3] = {0.314,0.314,0.314}; <font color="#B22222">/* Exciter time constant */</font>
+<a name="line108">108: </a>const PetscScalar KF[3] = {0.063,0.063,0.063};  <font color="#B22222">/* Feedback stabilizer gain constant */</font>
+<a name="line109">109: </a>const PetscScalar TF[3] = {0.35,0.35,0.35};    <font color="#B22222">/* Feedback stabilizer time constant */</font>
+<a name="line110">110: </a>const PetscScalar k1[3] = {0.0039,0.0039,0.0039};
+<a name="line111">111: </a>const PetscScalar k2[3] = {1.555,1.555,1.555};  <font color="#B22222">/* k1 and k2 for calculating the saturation function SE = k1*exp(k2*Efd) */</font>
+
+<a name="line113">113: </a>PetscScalar Vref[3];
+<a name="line114">114: </a><font color="#B22222">/* Load constants</font>
+<a name="line115">115: </a><font color="#B22222">  We use a composite load model that describes the load and reactive powers at each time instant as follows</font>
+<a name="line116">116: </a><font color="#B22222">  P(t) = \sum\limits_{i=0}^ld_nsegsp \ld_alphap_i*P_D0(\frac{V_m(t)}{V_m0})^\ld_betap_i</font>
+<a name="line117">117: </a><font color="#B22222">  Q(t) = \sum\limits_{i=0}^ld_nsegsq \ld_alphaq_i*Q_D0(\frac{V_m(t)}{V_m0})^\ld_betaq_i</font>
+<a name="line118">118: </a><font color="#B22222">  where</font>
+<a name="line119">119: </a><font color="#B22222">    ld_nsegsp,ld_nsegsq - Number of individual load models for real and reactive power loads</font>
+<a name="line120">120: </a><font color="#B22222">    ld_alphap,ld_alphap - Percentage contribution (weights) or loads</font>
+<a name="line121">121: </a><font color="#B22222">    P_D0                - Real power load</font>
+<a name="line122">122: </a><font color="#B22222">    Q_D0                - Reactive power load</font>
+<a name="line123">123: </a><font color="#B22222">    V_m(t)              - Voltage magnitude at time t</font>
+<a name="line124">124: </a><font color="#B22222">    V_m0                - Voltage magnitude at t = 0</font>
+<a name="line125">125: </a><font color="#B22222">    ld_betap, ld_betaq  - exponents describing the load model for real and reactive part</font>
+
+<a name="line127">127: </a><font color="#B22222">    Note: All loads have the same characteristic currently.</font>
+<a name="line128">128: </a><font color="#B22222">*/</font>
+<a name="line129">129: </a>const PetscScalar PD0[3] = {1.25,0.9,1.0};
+<a name="line130">130: </a>const PetscScalar QD0[3] = {0.5,0.3,0.35};
+<a name="line131">131: </a>const PetscInt    ld_nsegsp[3] = {3,3,3};
+<a name="line132">132: </a>const PetscScalar ld_alphap[3] = {0.0,0.0,1.0};
+<a name="line133">133: </a>const PetscScalar ld_betap[3]  = {2.0,1.0,0.0};
+<a name="line134">134: </a>const PetscInt    ld_nsegsq[3] = {3,3,3};
+<a name="line135">135: </a>const PetscScalar ld_alphaq[3] = {0.0,0.0,1.0};
+<a name="line136">136: </a>const PetscScalar ld_betaq[3]  = {2.0,1.0,0.0};
+
+<a name="line138">138: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line139">139: </a>  DM       dmgen, dmnet; <font color="#B22222">/* DMs to manage generator and network subsystem */</font>
+<a name="line140">140: </a>  DM       dmpgrid;      <font color="#B22222">/* Composite DM to manage the entire power grid */</font>
+<a name="line141">141: </a>  Mat      Ybus;         <font color="#B22222">/* Network admittance matrix */</font>
+<a name="line142">142: </a>  Vec      V0;           <font color="#B22222">/* Initial voltage vector (Power flow solution) */</font>
+<a name="line143">143: </a>  PetscInt neqs_gen,neqs_net,neqs_pgrid;
+<a name="line144">144: </a>  IS       is_diff;      <font color="#B22222">/* indices for differential equations */</font>
+<a name="line145">145: </a>  IS       is_alg;       <font color="#B22222">/* indices for algebraic equations */</font>
+<a name="line146">146: </a>} Userctx;
+
+<a name="line148">148: </a><font color="#B22222">/* Converts from machine frame (dq) to network (phase a real,imag) reference frame */</font>
+<a name="line151">151: </a><strong><font color="#4169E1"><a name="dq2ri"></a>PetscErrorCode dq2ri(PetscScalar Fd,PetscScalar Fq,PetscScalar delta,PetscScalar *Fr,PetscScalar *Fi)</font></strong>
+<a name="line152">152: </a>{
+<a name="line154">154: </a>  *Fr =  Fd*PetscSinScalar(delta) + Fq*PetscCosScalar(delta);
+<a name="line155">155: </a>  *Fi = -Fd*PetscCosScalar(delta) + Fq*PetscSinScalar(delta);
+<a name="line156">156: </a>  <font color="#4169E1">return</font>(0);
+<a name="line157">157: </a>}
+
+<a name="line159">159: </a><font color="#B22222">/* Converts from network frame ([phase a real,imag) to machine (dq) reference frame */</font>
+<a name="line162">162: </a><strong><font color="#4169E1"><a name="ri2dq"></a>PetscErrorCode ri2dq(PetscScalar Fr,PetscScalar Fi,PetscScalar delta,PetscScalar *Fd,PetscScalar *Fq)</font></strong>
+<a name="line163">163: </a>{
+<a name="line165">165: </a>  *Fd =  Fr*PetscSinScalar(delta) - Fi*PetscCosScalar(delta);
+<a name="line166">166: </a>  *Fq =  Fr*PetscCosScalar(delta) + Fi*PetscSinScalar(delta);
+<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
+<a name="line168">168: </a>}
+
+<a name="line172">172: </a><strong><font color="#4169E1"><a name="SetInitialGuess"></a>PetscErrorCode SetInitialGuess(Vec X,Userctx *user)</font></strong>
+<a name="line173">173: </a>{
+<a name="line175">175: </a>  Vec            Xgen,Xnet;
+<a name="line176">176: </a>  PetscScalar    *xgen,*xnet;
+<a name="line177">177: </a>  PetscInt       i,idx=0;
+<a name="line178">178: </a>  PetscScalar    Vr,Vi,IGr,IGi,Vm,Vm2;
+<a name="line179">179: </a>  PetscScalar    Eqp,Edp,delta;
+<a name="line180">180: </a>  PetscScalar    Efd,RF,VR; <font color="#B22222">/* Exciter variables */</font>
+<a name="line181">181: </a>  PetscScalar    Id,Iq;  <font color="#B22222">/* Generator dq axis currents */</font>
+<a name="line182">182: </a>  PetscScalar    theta,Vd,Vq,SE;
+
+<a name="line185">185: </a>  M[0] = 2*H[0]/w_s; M[1] = 2*H[1]/w_s; M[2] = 2*H[2]/w_s;
+<a name="line186">186: </a>      <font color="#B22222">/*      D[0] = 0.1*M[0]; D[1] = 0.1*M[1]; D[2] = 0.1*M[2];</font>
+<a name="line187">187: </a><font color="#B22222">       */</font>
+<a name="line188">188: </a>  D[0] = D[1] = D[2] = 0.0;
+<a name="line189">189: </a>  DMCompositeGetLocalVectors(user->dmpgrid,&Xgen,&Xnet);
+
+<a name="line191">191: </a>  <font color="#B22222">/* Network subsystem initialization */</font>
+<a name="line192">192: </a>  VecCopy(user->V0,Xnet);
+
+<a name="line194">194: </a>  <font color="#B22222">/* Generator subsystem initialization */</font>
+<a name="line195">195: </a>  VecGetArray(Xgen,&xgen);
+<a name="line196">196: </a>  VecGetArray(Xnet,&xnet);
+
+<a name="line198">198: </a>  <font color="#4169E1">for</font> (i=0; i < ngen; i++) {
+<a name="line199">199: </a>    Vr  = xnet[2*gbus[i]]; <font color="#B22222">/* Real part of generator terminal voltage */</font>
+<a name="line200">200: </a>    Vi  = xnet[2*gbus[i]+1]; <font color="#B22222">/* Imaginary part of the generator terminal voltage */</font>
+<a name="line201">201: </a>    Vm  = PetscSqrtScalar(Vr*Vr + Vi*Vi); Vm2 = Vm*Vm;
+<a name="line202">202: </a>    IGr = (Vr*PG[i] + Vi*QG[i])/Vm2;
+<a name="line203">203: </a>    IGi = (Vi*PG[i] - Vr*QG[i])/Vm2;
+
+<a name="line205">205: </a>    delta = atan2(Vi+Xq[i]*IGr,Vr-Xq[i]*IGi); <font color="#B22222">/* Machine angle */</font>
+
+<a name="line207">207: </a>    theta = PETSC_PI/2.0 - delta;
+
+<a name="line209">209: </a>    Id = IGr*PetscCosScalar(theta) - IGi*PetscSinScalar(theta); <font color="#B22222">/* d-axis stator current */</font>
+<a name="line210">210: </a>    Iq = IGr*PetscSinScalar(theta) + IGi*PetscCosScalar(theta); <font color="#B22222">/* q-axis stator current */</font>
+
+<a name="line212">212: </a>    Vd = Vr*PetscCosScalar(theta) - Vi*PetscSinScalar(theta);
+<a name="line213">213: </a>    Vq = Vr*PetscSinScalar(theta) + Vi*PetscCosScalar(theta);
+
+<a name="line215">215: </a>    Edp = Vd + Rs[i]*Id - Xqp[i]*Iq; <font color="#B22222">/* d-axis transient EMF */</font>
+<a name="line216">216: </a>    Eqp = Vq + Rs[i]*Iq + Xdp[i]*Id; <font color="#B22222">/* q-axis transient EMF */</font>
+
+<a name="line218">218: </a>    TM[i] = PG[i];
+
+<a name="line220">220: </a>    <font color="#B22222">/* The generator variables are ordered as [Eqp,Edp,delta,w,Id,Iq] */</font>
+<a name="line221">221: </a>    xgen[idx]   = Eqp;
+<a name="line222">222: </a>    xgen[idx+1] = Edp;
+<a name="line223">223: </a>    xgen[idx+2] = delta;
+<a name="line224">224: </a>    xgen[idx+3] = w_s;
+
+<a name="line226">226: </a>    idx = idx + 4;
+
+<a name="line228">228: </a>    xgen[idx]   = Id;
+<a name="line229">229: </a>    xgen[idx+1] = Iq;
+
+<a name="line231">231: </a>    idx = idx + 2;
+
+<a name="line233">233: </a>    <font color="#B22222">/* Exciter */</font>
+<a name="line234">234: </a>    Efd = Eqp + (Xd[i] - Xdp[i])*Id;
+<a name="line235">235: </a>    SE  = k1[i]*PetscExpScalar(k2[i]*Efd);
+<a name="line236">236: </a>    VR  =  KE[i]*Efd + SE;
+<a name="line237">237: </a>    RF  =  KF[i]*Efd/TF[i];
+
+<a name="line239">239: </a>    xgen[idx]   = Efd;
+<a name="line240">240: </a>    xgen[idx+1] = RF;
+<a name="line241">241: </a>    xgen[idx+2] = VR;
+
+<a name="line243">243: </a>    Vref[i] = Vm + (VR/KA[i]);
+
+<a name="line245">245: </a>    idx = idx + 3;
+<a name="line246">246: </a>  }
+
+<a name="line248">248: </a>  VecRestoreArray(Xgen,&xgen);
+<a name="line249">249: </a>  VecRestoreArray(Xnet,&xnet);
+
+<a name="line251">251: </a>  <font color="#B22222">/* VecView(Xgen,0); */</font>
+<a name="line252">252: </a>  DMCompositeGather(user->dmpgrid,X,INSERT_VALUES,Xgen,Xnet);
+<a name="line253">253: </a>  DMCompositeRestoreLocalVectors(user->dmpgrid,&Xgen,&Xnet);
+<a name="line254">254: </a>  <font color="#4169E1">return</font>(0);
+<a name="line255">255: </a>}
+
+<a name="line259">259: </a><strong><font color="#4169E1"><a name="PreallocateJacobian"></a>PetscErrorCode PreallocateJacobian(Mat J,Userctx *user)</font></strong>
+<a name="line260">260: </a>{
+<a name="line262">262: </a>  PetscInt       *d_nnz;
+<a name="line263">263: </a>  PetscInt       i,idx=0,start=0;
+<a name="line264">264: </a>  PetscInt       ncols;
+
+<a name="line267">267: </a>  PetscMalloc1(user->neqs_pgrid,&d_nnz);
+<a name="line268">268: </a>  <font color="#4169E1">for</font> (i=0; i<user->neqs_pgrid; i++) d_nnz[i] = 0;
+<a name="line269">269: </a>  <font color="#B22222">/* Generator subsystem */</font>
+<a name="line270">270: </a>  <font color="#4169E1">for</font> (i=0; i < ngen; i++) {
+
+<a name="line272">272: </a>    d_nnz[idx]   += 3;
+<a name="line273">273: </a>    d_nnz[idx+1] += 2;
+<a name="line274">274: </a>    d_nnz[idx+2] += 2;
+<a name="line275">275: </a>    d_nnz[idx+3] += 5;
+<a name="line276">276: </a>    d_nnz[idx+4] += 6;
+<a name="line277">277: </a>    d_nnz[idx+5] += 6;
+
+<a name="line279">279: </a>    d_nnz[user->neqs_gen+2*gbus[i]]   += 3;
+<a name="line280">280: </a>    d_nnz[user->neqs_gen+2*gbus[i]+1] += 3;
+
+<a name="line282">282: </a>    d_nnz[idx+6] += 2;
+<a name="line283">283: </a>    d_nnz[idx+7] += 2;
+<a name="line284">284: </a>    d_nnz[idx+8] += 5;
+
+<a name="line286">286: </a>    idx = idx + 9;
+<a name="line287">287: </a>  }
+
+<a name="line289">289: </a>  start = user->neqs_gen;
+
+<a name="line291">291: </a>  <font color="#4169E1">for</font> (i=0; i < nbus; i++) {
+<a name="line292">292: </a>    MatGetRow(user->Ybus,2*i,&ncols,NULL,NULL);
+<a name="line293">293: </a>    d_nnz[start+2*i]   += ncols;
+<a name="line294">294: </a>    d_nnz[start+2*i+1] += ncols;
+<a name="line295">295: </a>    MatRestoreRow(user->Ybus,2*i,&ncols,NULL,NULL);
+<a name="line296">296: </a>  }
+
+<a name="line298">298: </a>  MatSeqAIJSetPreallocation(J,0,d_nnz);
+
+<a name="line300">300: </a>  PetscFree(d_nnz);
+<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
+<a name="line302">302: </a>}
+
+<a name="line304">304: </a><font color="#B22222">/*</font>
+<a name="line305">305: </a><font color="#B22222">   J = [-df_dx, -df_dy</font>
+<a name="line306">306: </a><font color="#B22222">        dg_dx, dg_dy]</font>
+<a name="line307">307: </a><font color="#B22222">*/</font>
+<a name="line310">310: </a><strong><font color="#4169E1"><a name="ResidualJacobian"></a>PetscErrorCode ResidualJacobian(Vec X,Mat J,void *ctx)</font></strong>
+<a name="line311">311: </a>{
+<a name="line313">313: </a>  Userctx        *user=(Userctx*)ctx;
+<a name="line314">314: </a>  Vec            Xgen,Xnet;
+<a name="line315">315: </a>  PetscScalar    *xgen,*xnet;
+<a name="line316">316: </a>  PetscInt       i,idx=0;
+<a name="line317">317: </a>  PetscScalar    Vr,Vi,Vm,Vm2;
+<a name="line318">318: </a>  PetscScalar    Eqp,Edp,delta; <font color="#B22222">/* Generator variables */</font>
+<a name="line319">319: </a>  PetscScalar    Efd;
+<a name="line320">320: </a>  PetscScalar    Id,Iq;  <font color="#B22222">/* Generator dq axis currents */</font>
+<a name="line321">321: </a>  PetscScalar    Vd,Vq;
+<a name="line322">322: </a>  PetscScalar    val[10];
+<a name="line323">323: </a>  PetscInt       row[2],col[10];
+<a name="line324">324: </a>  PetscInt       net_start=user->neqs_gen;
+<a name="line325">325: </a>  PetscScalar    Zdq_inv[4],det;
+<a name="line326">326: </a>  PetscScalar    dVd_dVr,dVd_dVi,dVq_dVr,dVq_dVi,dVd_ddelta,dVq_ddelta;
+<a name="line327">327: </a>  PetscScalar    dIGr_ddelta,dIGi_ddelta,dIGr_dId,dIGr_dIq,dIGi_dId,dIGi_dIq;
+<a name="line328">328: </a>  PetscScalar    dSE_dEfd;
+<a name="line329">329: </a>  PetscScalar    dVm_dVd,dVm_dVq,dVm_dVr,dVm_dVi;
+<a name="line330">330: </a>  PetscInt          ncols;
+<a name="line331">331: </a>  const PetscInt    *cols;
+<a name="line332">332: </a>  const PetscScalar *yvals;
+<a name="line333">333: </a>  PetscInt          k;
+<a name="line334">334: </a>  PetscScalar PD,QD,Vm0,*v0,Vm4;
+<a name="line335">335: </a>  PetscScalar dPD_dVr,dPD_dVi,dQD_dVr,dQD_dVi;
+<a name="line336">336: </a>  PetscScalar dIDr_dVr,dIDr_dVi,dIDi_dVr,dIDi_dVi;
+
+
+<a name="line340">340: </a>  MatZeroEntries(J);
+<a name="line341">341: </a>  DMCompositeGetLocalVectors(user->dmpgrid,&Xgen,&Xnet);
+<a name="line342">342: </a>  DMCompositeScatter(user->dmpgrid,X,Xgen,Xnet);
+
+<a name="line344">344: </a>  VecGetArray(Xgen,&xgen);
+<a name="line345">345: </a>  VecGetArray(Xnet,&xnet);
+
+<a name="line347">347: </a>  <font color="#B22222">/* Generator subsystem */</font>
+<a name="line348">348: </a>  <font color="#4169E1">for</font> (i=0; i < ngen; i++) {
+<a name="line349">349: </a>    Eqp   = xgen[idx];
+<a name="line350">350: </a>    Edp   = xgen[idx+1];
+<a name="line351">351: </a>    delta = xgen[idx+2];
+<a name="line352">352: </a>    Id    = xgen[idx+4];
+<a name="line353">353: </a>    Iq    = xgen[idx+5];
+<a name="line354">354: </a>    Efd   = xgen[idx+6];
+
+<a name="line356">356: </a>    <font color="#B22222">/*    fgen[idx]   = (Eqp + (Xd[i] - Xdp[i])*Id - Efd)/Td0p[i]; */</font>
+<a name="line357">357: </a>    row[0] = idx;
+<a name="line358">358: </a>    col[0] = idx;           col[1] = idx+4;          col[2] = idx+6;
+<a name="line359">359: </a>    val[0] = 1/ Td0p[i]; val[1] = (Xd[i] - Xdp[i])/ Td0p[i]; val[2] = -1/Td0p[i];
+
+<a name="line361">361: </a>    MatSetValues(J,1,row,3,col,val,INSERT_VALUES);
+
+<a name="line363">363: </a>    <font color="#B22222">/*    fgen[idx+1] = (Edp - (Xq[i] - Xqp[i])*Iq)/Tq0p[i]; */</font>
+<a name="line364">364: </a>    row[0] = idx + 1;
+<a name="line365">365: </a>    col[0] = idx + 1;       col[1] = idx+5;
+<a name="line366">366: </a>    val[0] = 1/Tq0p[i]; val[1] = -(Xq[i] - Xqp[i])/Tq0p[i];
+<a name="line367">367: </a>    MatSetValues(J,1,row,2,col,val,INSERT_VALUES);
+
+<a name="line369">369: </a>    <font color="#B22222">/*    fgen[idx+2] = - w + w_s; */</font>
+<a name="line370">370: </a>    row[0] = idx + 2;
+<a name="line371">371: </a>    col[0] = idx + 2; col[1] = idx + 3;
+<a name="line372">372: </a>    val[0] = 0;       val[1] = -1;
+<a name="line373">373: </a>    MatSetValues(J,1,row,2,col,val,INSERT_VALUES);
+
+<a name="line375">375: </a>    <font color="#B22222">/*    fgen[idx+3] = (-TM[i] + Edp*Id + Eqp*Iq + (Xqp[i] - Xdp[i])*Id*Iq + D[i]*(w - w_s))/M[i]; */</font>
+<a name="line376">376: </a>    row[0] = idx + 3;
+<a name="line377">377: </a>    col[0] = idx; col[1] = idx + 1; col[2] = idx + 3;       col[3] = idx + 4;                  col[4] = idx + 5;
+<a name="line378">378: </a>    val[0] = Iq/M[i];  val[1] = Id/M[i];      val[2] = D[i]/M[i]; val[3] = (Edp + (Xqp[i]-Xdp[i])*Iq)/M[i]; val[4] = (Eqp + (Xqp[i] - Xdp[i])*Id)/M[i];
+<a name="line379">379: </a>    MatSetValues(J,1,row,5,col,val,INSERT_VALUES);
+
+<a name="line381">381: </a>    Vr   = xnet[2*gbus[i]]; <font color="#B22222">/* Real part of generator terminal voltage */</font>
+<a name="line382">382: </a>    Vi   = xnet[2*gbus[i]+1]; <font color="#B22222">/* Imaginary part of the generator terminal voltage */</font>
+<a name="line383">383: </a>    ri2dq(Vr,Vi,delta,&Vd,&Vq);
+
+<a name="line385">385: </a>    det = Rs[i]*Rs[i] + Xdp[i]*Xqp[i];
+
+<a name="line387">387: </a>    Zdq_inv[0] = Rs[i]/det;
+<a name="line388">388: </a>    Zdq_inv[1] = Xqp[i]/det;
+<a name="line389">389: </a>    Zdq_inv[2] = -Xdp[i]/det;
+<a name="line390">390: </a>    Zdq_inv[3] = Rs[i]/det;
+
+<a name="line392">392: </a>    dVd_dVr    = PetscSinScalar(delta); dVd_dVi = -PetscCosScalar(delta);
+<a name="line393">393: </a>    dVq_dVr    = PetscCosScalar(delta); dVq_dVi = PetscSinScalar(delta);
+<a name="line394">394: </a>    dVd_ddelta = Vr*PetscCosScalar(delta) + Vi*PetscSinScalar(delta);
+<a name="line395">395: </a>    dVq_ddelta = -Vr*PetscSinScalar(delta) + Vi*PetscCosScalar(delta);
+
+<a name="line397">397: </a>    <font color="#B22222">/*    fgen[idx+4] = Zdq_inv[0]*(-Edp + Vd) + Zdq_inv[1]*(-Eqp + Vq) + Id; */</font>
+<a name="line398">398: </a>    row[0] = idx+4;
+<a name="line399">399: </a>    col[0] = idx;         col[1] = idx+1;        col[2] = idx + 2;
+<a name="line400">400: </a>    val[0] = -Zdq_inv[1]; val[1] = -Zdq_inv[0];  val[2] = Zdq_inv[0]*dVd_ddelta + Zdq_inv[1]*dVq_ddelta;
+<a name="line401">401: </a>    col[3] = idx + 4; col[4] = net_start+2*gbus[i];                     col[5] = net_start + 2*gbus[i]+1;
+<a name="line402">402: </a>    val[3] = 1;       val[4] = Zdq_inv[0]*dVd_dVr + Zdq_inv[1]*dVq_dVr; val[5] = Zdq_inv[0]*dVd_dVi + Zdq_inv[1]*dVq_dVi;
+<a name="line403">403: </a>    MatSetValues(J,1,row,6,col,val,INSERT_VALUES);
+
+<a name="line405">405: </a>    <font color="#B22222">/*  fgen[idx+5] = Zdq_inv[2]*(-Edp + Vd) + Zdq_inv[3]*(-Eqp + Vq) + Iq; */</font>
+<a name="line406">406: </a>    row[0] = idx+5;
+<a name="line407">407: </a>    col[0] = idx;         col[1] = idx+1;        col[2] = idx + 2;
+<a name="line408">408: </a>    val[0] = -Zdq_inv[3]; val[1] = -Zdq_inv[2];  val[2] = Zdq_inv[2]*dVd_ddelta + Zdq_inv[3]*dVq_ddelta;
+<a name="line409">409: </a>    col[3] = idx + 5; col[4] = net_start+2*gbus[i];                     col[5] = net_start + 2*gbus[i]+1;
+<a name="line410">410: </a>    val[3] = 1;       val[4] = Zdq_inv[2]*dVd_dVr + Zdq_inv[3]*dVq_dVr; val[5] = Zdq_inv[2]*dVd_dVi + Zdq_inv[3]*dVq_dVi;
+<a name="line411">411: </a>    MatSetValues(J,1,row,6,col,val,INSERT_VALUES);
+
+<a name="line413">413: </a>    dIGr_ddelta = Id*PetscCosScalar(delta) - Iq*PetscSinScalar(delta);
+<a name="line414">414: </a>    dIGi_ddelta = Id*PetscSinScalar(delta) + Iq*PetscCosScalar(delta);
+<a name="line415">415: </a>    dIGr_dId    = PetscSinScalar(delta);  dIGr_dIq = PetscCosScalar(delta);
+<a name="line416">416: </a>    dIGi_dId    = -PetscCosScalar(delta); dIGi_dIq = PetscSinScalar(delta);
+
+<a name="line418">418: </a>    <font color="#B22222">/* fnet[2*gbus[i]]   -= IGi; */</font>
+<a name="line419">419: </a>    row[0] = net_start + 2*gbus[i];
+<a name="line420">420: </a>    col[0] = idx+2;        col[1] = idx + 4;   col[2] = idx + 5;
+<a name="line421">421: </a>    val[0] = -dIGi_ddelta; val[1] = -dIGi_dId; val[2] = -dIGi_dIq;
+<a name="line422">422: </a>    MatSetValues(J,1,row,3,col,val,INSERT_VALUES);
+
+<a name="line424">424: </a>    <font color="#B22222">/* fnet[2*gbus[i]+1]   -= IGr; */</font>
+<a name="line425">425: </a>    row[0] = net_start + 2*gbus[i]+1;
+<a name="line426">426: </a>    col[0] = idx+2;        col[1] = idx + 4;   col[2] = idx + 5;
+<a name="line427">427: </a>    val[0] = -dIGr_ddelta; val[1] = -dIGr_dId; val[2] = -dIGr_dIq;
+<a name="line428">428: </a>    MatSetValues(J,1,row,3,col,val,INSERT_VALUES);
+
+<a name="line430">430: </a>    Vm = PetscSqrtScalar(Vd*Vd + Vq*Vq); Vm2 = Vm*Vm;
+
+<a name="line432">432: </a>    <font color="#B22222">/*    fgen[idx+6] = (KE[i]*Efd + SE - VR)/TE[i]; */</font>
+<a name="line433">433: </a>    <font color="#B22222">/*    SE  = k1[i]*PetscExpScalar(k2[i]*Efd); */</font>
+
+<a name="line435">435: </a>    dSE_dEfd = k1[i]*k2[i]*PetscExpScalar(k2[i]*Efd);
+
+<a name="line437">437: </a>    row[0] = idx + 6;
+<a name="line438">438: </a>    col[0] = idx + 6;                     col[1] = idx + 8;
+<a name="line439">439: </a>    val[0] = (KE[i] + dSE_dEfd)/TE[i];  val[1] = -1/TE[i];
+<a name="line440">440: </a>    MatSetValues(J,1,row,2,col,val,INSERT_VALUES);
+
+<a name="line442">442: </a>    <font color="#B22222">/* Exciter differential equations */</font>
+
+<a name="line444">444: </a>    <font color="#B22222">/*    fgen[idx+7] = (RF - KF[i]*Efd/TF[i])/TF[i]; */</font>
+<a name="line445">445: </a>    row[0] = idx + 7;
+<a name="line446">446: </a>    col[0] = idx + 6;       col[1] = idx + 7;
+<a name="line447">447: </a>    val[0] = (-KF[i]/TF[i])/TF[i];  val[1] = 1/TF[i];
+<a name="line448">448: </a>    MatSetValues(J,1,row,2,col,val,INSERT_VALUES);
+
+<a name="line450">450: </a>    <font color="#B22222">/*    fgen[idx+8] = (VR - KA[i]*RF + KA[i]*KF[i]*Efd/TF[i] - KA[i]*(Vref[i] - Vm))/TA[i]; */</font>
+<a name="line451">451: </a>    <font color="#B22222">/* Vm = (Vd^2 + Vq^2)^0.5; */</font>
+
+<a name="line453">453: </a>    dVm_dVd = Vd/Vm; dVm_dVq = Vq/Vm;
+<a name="line454">454: </a>    dVm_dVr = dVm_dVd*dVd_dVr + dVm_dVq*dVq_dVr;
+<a name="line455">455: </a>    dVm_dVi = dVm_dVd*dVd_dVi + dVm_dVq*dVq_dVi;
+<a name="line456">456: </a>    row[0]  = idx + 8;
+<a name="line457">457: </a>    col[0]  = idx + 6;           col[1] = idx + 7; col[2] = idx + 8;
+<a name="line458">458: </a>    val[0]  = (KA[i]*KF[i]/TF[i])/TA[i]; val[1] = -KA[i]/TA[i];  val[2] = 1/TA[i];
+<a name="line459">459: </a>    col[3]  = net_start + 2*gbus[i]; col[4] = net_start + 2*gbus[i]+1;
+<a name="line460">460: </a>    val[3]  = KA[i]*dVm_dVr/TA[i];         val[4] = KA[i]*dVm_dVi/TA[i];
+<a name="line461">461: </a>    MatSetValues(J,1,row,5,col,val,INSERT_VALUES);
+<a name="line462">462: </a>    idx     = idx + 9;
+<a name="line463">463: </a>  }
+
+<a name="line465">465: </a>  <font color="#4169E1">for</font> (i=0; i<nbus; i++) {
+<a name="line466">466: </a>    MatGetRow(user->Ybus,2*i,&ncols,&cols,&yvals);
+<a name="line467">467: </a>    row[0] = net_start + 2*i;
+<a name="line468">468: </a>    <font color="#4169E1">for</font> (k=0; k<ncols; k++) {
+<a name="line469">469: </a>      col[k] = net_start + cols[k];
+<a name="line470">470: </a>      val[k] = yvals[k];
+<a name="line471">471: </a>    }
+<a name="line472">472: </a>    MatSetValues(J,1,row,ncols,col,val,INSERT_VALUES);
+<a name="line473">473: </a>    MatRestoreRow(user->Ybus,2*i,&ncols,&cols,&yvals);
+
+<a name="line475">475: </a>    MatGetRow(user->Ybus,2*i+1,&ncols,&cols,&yvals);
+<a name="line476">476: </a>    row[0] = net_start + 2*i+1;
+<a name="line477">477: </a>    <font color="#4169E1">for</font> (k=0; k<ncols; k++) {
+<a name="line478">478: </a>      col[k] = net_start + cols[k];
+<a name="line479">479: </a>      val[k] = yvals[k];
+<a name="line480">480: </a>    }
+<a name="line481">481: </a>    MatSetValues(J,1,row,ncols,col,val,INSERT_VALUES);
+<a name="line482">482: </a>    MatRestoreRow(user->Ybus,2*i+1,&ncols,&cols,&yvals);
+<a name="line483">483: </a>  }
+
+<a name="line485">485: </a>  MatAssemblyBegin(J,MAT_FLUSH_ASSEMBLY);
+<a name="line486">486: </a>  MatAssemblyEnd(J,MAT_FLUSH_ASSEMBLY);
+
+<a name="line488">488: </a>  VecGetArray(user->V0,&v0);
+<a name="line489">489: </a>  <font color="#4169E1">for</font> (i=0; i < nload; i++) {
+<a name="line490">490: </a>    Vr      = xnet[2*lbus[i]]; <font color="#B22222">/* Real part of load bus voltage */</font>
+<a name="line491">491: </a>    Vi      = xnet[2*lbus[i]+1]; <font color="#B22222">/* Imaginary part of the load bus voltage */</font>
+<a name="line492">492: </a>    Vm      = PetscSqrtScalar(Vr*Vr + Vi*Vi); Vm2 = Vm*Vm; Vm4 = Vm2*Vm2;
+<a name="line493">493: </a>    Vm0     = PetscSqrtScalar(v0[2*lbus[i]]*v0[2*lbus[i]] + v0[2*lbus[i]+1]*v0[2*lbus[i]+1]);
+<a name="line494">494: </a>    PD      = QD = 0.0;
+<a name="line495">495: </a>    dPD_dVr = dPD_dVi = dQD_dVr = dQD_dVi = 0.0;
+<a name="line496">496: </a>    <font color="#4169E1">for</font> (k=0; k < ld_nsegsp[i]; k++) {
+<a name="line497">497: </a>      PD      += ld_alphap[k]*PD0[i]*PetscPowScalar((Vm/Vm0),ld_betap[k]);
+<a name="line498">498: </a>      dPD_dVr += ld_alphap[k]*ld_betap[k]*PD0[i]*PetscPowScalar((1/Vm0),ld_betap[k])*Vr*PetscPowScalar(Vm,(ld_betap[k]-2));
+<a name="line499">499: </a>      dPD_dVi += ld_alphap[k]*ld_betap[k]*PD0[i]*PetscPowScalar((1/Vm0),ld_betap[k])*Vi*PetscPowScalar(Vm,(ld_betap[k]-2));
+<a name="line500">500: </a>    }
+<a name="line501">501: </a>    <font color="#4169E1">for</font> (k=0; k < ld_nsegsq[i]; k++) {
+<a name="line502">502: </a>      QD      += ld_alphaq[k]*QD0[i]*PetscPowScalar((Vm/Vm0),ld_betaq[k]);
+<a name="line503">503: </a>      dQD_dVr += ld_alphaq[k]*ld_betaq[k]*QD0[i]*PetscPowScalar((1/Vm0),ld_betaq[k])*Vr*PetscPowScalar(Vm,(ld_betaq[k]-2));
+<a name="line504">504: </a>      dQD_dVi += ld_alphaq[k]*ld_betaq[k]*QD0[i]*PetscPowScalar((1/Vm0),ld_betaq[k])*Vi*PetscPowScalar(Vm,(ld_betaq[k]-2));
+<a name="line505">505: </a>    }
+
+<a name="line507">507: </a>    <font color="#B22222">/*    IDr = (PD*Vr + QD*Vi)/Vm2; */</font>
+<a name="line508">508: </a>    <font color="#B22222">/*    IDi = (-QD*Vr + PD*Vi)/Vm2; */</font>
+
+<a name="line510">510: </a>    dIDr_dVr = (dPD_dVr*Vr + dQD_dVr*Vi + PD)/Vm2 - ((PD*Vr + QD*Vi)*2*Vr)/Vm4;
+<a name="line511">511: </a>    dIDr_dVi = (dPD_dVi*Vr + dQD_dVi*Vi + QD)/Vm2 - ((PD*Vr + QD*Vi)*2*Vi)/Vm4;
+
+<a name="line513">513: </a>    dIDi_dVr = (-dQD_dVr*Vr + dPD_dVr*Vi - QD)/Vm2 - ((-QD*Vr + PD*Vi)*2*Vr)/Vm4;
+<a name="line514">514: </a>    dIDi_dVi = (-dQD_dVi*Vr + dPD_dVi*Vi + PD)/Vm2 - ((-QD*Vr + PD*Vi)*2*Vi)/Vm4;
+
+
+<a name="line517">517: </a>    <font color="#B22222">/*    fnet[2*lbus[i]]   += IDi; */</font>
+<a name="line518">518: </a>    row[0] = net_start + 2*lbus[i];
+<a name="line519">519: </a>    col[0] = net_start + 2*lbus[i];  col[1] = net_start + 2*lbus[i]+1;
+<a name="line520">520: </a>    val[0] = dIDi_dVr;               val[1] = dIDi_dVi;
+<a name="line521">521: </a>    MatSetValues(J,1,row,2,col,val,ADD_VALUES);
+<a name="line522">522: </a>    <font color="#B22222">/*    fnet[2*lbus[i]+1] += IDr; */</font>
+<a name="line523">523: </a>    row[0] = net_start + 2*lbus[i]+1;
+<a name="line524">524: </a>    col[0] = net_start + 2*lbus[i];  col[1] = net_start + 2*lbus[i]+1;
+<a name="line525">525: </a>    val[0] = dIDr_dVr;               val[1] = dIDr_dVi;
+<a name="line526">526: </a>    MatSetValues(J,1,row,2,col,val,ADD_VALUES);
+<a name="line527">527: </a>  }
+<a name="line528">528: </a>  VecRestoreArray(user->V0,&v0);
+
+<a name="line530">530: </a>  VecRestoreArray(Xgen,&xgen);
+<a name="line531">531: </a>  VecRestoreArray(Xnet,&xnet);
+
+<a name="line533">533: </a>  DMCompositeRestoreLocalVectors(user->dmpgrid,&Xgen,&Xnet);
+
+<a name="line535">535: </a>  MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);
+<a name="line536">536: </a>  MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);
+<a name="line537">537: </a>  <font color="#4169E1">return</font>(0);
+<a name="line538">538: </a>}
+
+<a name="line542">542: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line543">543: </a>{
+<a name="line544">544: </a>  <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
+<a name="line545">545: </a>  <a href="../../../../docs/manualpages/EPS/EPSType.html#EPSType">EPSType</a>        type;
+<a name="line547">547: </a>  PetscMPIInt    size;
+<a name="line548">548: </a>  Userctx        user;
+<a name="line549">549: </a>  PetscViewer    Xview,Ybusview;
+<a name="line550">550: </a>  Vec            X,Xr,Xi;
+<a name="line551">551: </a>  Mat            J,Jred=NULL;
+<a name="line552">552: </a>  IS             is0,is1;
+<a name="line553">553: </a>  PetscInt       i,*idx2,its,nev,nconv;
+<a name="line554">554: </a>  PetscReal      error,re,im;
+<a name="line555">555: </a>  PetscScalar    kr,ki;
+<a name="line556">556: </a>  PetscBool      terse;
+
+<a name="line558">558: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,NULL,help);
+<a name="line559">559: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PETSC_COMM_WORLD,&size);
+<a name="line560">560: </a>  <font color="#4169E1">if</font> (size > 1) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_SUP,<font color="#666666">"Only for sequential runs"</font>);
+<a name="line561">561: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line562">562: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+
+<a name="line564">564: </a>  user.neqs_gen   = 9*ngen; <font color="#B22222">/* # eqs. for generator subsystem */</font>
+<a name="line565">565: </a>  user.neqs_net   = 2*nbus; <font color="#B22222">/* # eqs. for network subsystem   */</font>
+<a name="line566">566: </a>  user.neqs_pgrid = user.neqs_gen + user.neqs_net;
+<a name="line567">567: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nStability analysis in a network with %D buses and %D generators\n\n"</font>,nbus,ngen);
+
+<a name="line569">569: </a>  <font color="#B22222">/* Create indices for differential and algebraic equations */</font>
+<a name="line570">570: </a>  PetscMalloc1(7*ngen,&idx2);
+<a name="line571">571: </a>  <font color="#4169E1">for</font> (i=0; i<ngen; i++) {
+<a name="line572">572: </a>    idx2[7*i]   = 9*i;   idx2[7*i+1] = 9*i+1; idx2[7*i+2] = 9*i+2; idx2[7*i+3] = 9*i+3;
+<a name="line573">573: </a>    idx2[7*i+4] = 9*i+6; idx2[7*i+5] = 9*i+7; idx2[7*i+6] = 9*i+8;
+<a name="line574">574: </a>  }
+<a name="line575">575: </a>  ISCreateGeneral(PETSC_COMM_WORLD,7*ngen,idx2,PETSC_COPY_VALUES,&user.is_diff);
+<a name="line576">576: </a>  ISComplement(user.is_diff,0,user.neqs_pgrid,&user.is_alg);
+<a name="line577">577: </a>  PetscFree(idx2);
+
+<a name="line579">579: </a>  <font color="#B22222">/* Read initial voltage vector and Ybus */</font>
+<a name="line580">580: </a>  PetscViewerBinaryOpen(PETSC_COMM_WORLD,<font color="#666666">"X.bin"</font>,FILE_MODE_READ,&Xview);
+<a name="line581">581: </a>  PetscViewerBinaryOpen(PETSC_COMM_WORLD,<font color="#666666">"Ybus.bin"</font>,FILE_MODE_READ,&Ybusview);
+
+<a name="line583">583: </a>  VecCreate(PETSC_COMM_WORLD,&user.V0);
+<a name="line584">584: </a>  VecSetSizes(user.V0,PETSC_DECIDE,user.neqs_net);
+<a name="line585">585: </a>  VecLoad(user.V0,Xview);
+
+<a name="line587">587: </a>  MatCreate(PETSC_COMM_WORLD,&user.Ybus);
+<a name="line588">588: </a>  MatSetSizes(user.Ybus,PETSC_DECIDE,PETSC_DECIDE,user.neqs_net,user.neqs_net);
+<a name="line589">589: </a>  MatSetType(user.Ybus,MATBAIJ);
+<a name="line590">590: </a>  <font color="#B22222">/*  MatSetBlockSize(user.Ybus,2); */</font>
+<a name="line591">591: </a>  MatLoad(user.Ybus,Ybusview);
+
+<a name="line593">593: </a>  PetscViewerDestroy(&Xview);
+<a name="line594">594: </a>  PetscViewerDestroy(&Ybusview);
+
+<a name="line596">596: </a>  <font color="#B22222">/* Create DMs for generator and network subsystems */</font>
+<a name="line597">597: </a>  DMDACreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,user.neqs_gen,1,1,NULL,&user.dmgen);
+<a name="line598">598: </a>  DMSetOptionsPrefix(user.dmgen,<font color="#666666">"dmgen_"</font>);
+<a name="line599">599: </a>  DMDACreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,user.neqs_net,1,1,NULL,&user.dmnet);
+<a name="line600">600: </a>  DMSetOptionsPrefix(user.dmnet,<font color="#666666">"dmnet_"</font>);
+<a name="line601">601: </a>  <font color="#B22222">/* Create a composite DM packer and add the two DMs */</font>
+<a name="line602">602: </a>  DMCompositeCreate(PETSC_COMM_WORLD,&user.dmpgrid);
+<a name="line603">603: </a>  DMSetOptionsPrefix(user.dmpgrid,<font color="#666666">"pgrid_"</font>);
+<a name="line604">604: </a>  DMCompositeAddDM(user.dmpgrid,user.dmgen);
+<a name="line605">605: </a>  DMCompositeAddDM(user.dmpgrid,user.dmnet);
+
+<a name="line607">607: </a>  DMCreateGlobalVector(user.dmpgrid,&X);
+
+<a name="line609">609: </a>  MatCreate(PETSC_COMM_WORLD,&J);
+<a name="line610">610: </a>  MatSetSizes(J,PETSC_DECIDE,PETSC_DECIDE,user.neqs_pgrid,user.neqs_pgrid);
+<a name="line611">611: </a>  MatSetFromOptions(J);
+<a name="line612">612: </a>  PreallocateJacobian(J,&user);
+
+<a name="line614">614: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line615">615: </a><font color="#B22222">     Set initial conditions</font>
+<a name="line616">616: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line617">617: </a>  SetInitialGuess(X,&user);
+
+<a name="line619">619: </a>  <font color="#B22222">/* Form Jacobian */</font>
+<a name="line620">620: </a>  ResidualJacobian(X,J,(void*)&user);
+<a name="line621">621: </a>  MatScale(J,-1);
+<a name="line622">622: </a>  is0 = user.is_diff;
+<a name="line623">623: </a>  is1 = user.is_alg;
+
+<a name="line625">625: </a>  MatGetSchurComplement(J,is1,is1,is0,is0,MAT_IGNORE_MATRIX,NULL,MAT_SCHUR_COMPLEMENT_AINV_DIAG,MAT_INITIAL_MATRIX,&Jred);
+
+<a name="line627">627: </a>  <font color="#4169E1">if</font> (!terse) {
+<a name="line628">628: </a>    MatView(Jred,NULL);
+<a name="line629">629: </a>  }
+
+<a name="line631">631: </a>  MatCreateVecs(Jred,NULL,&Xr);
+<a name="line632">632: </a>  MatCreateVecs(Jred,NULL,&Xi);
+
+<a name="line634">634: </a>  <font color="#B22222">/* Create the eigensolver and set the various options */</font>
+<a name="line635">635: </a>  <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,&eps);
+<a name="line636">636: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,Jred,NULL);
+<a name="line637">637: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
+<a name="line638">638: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps);
+<a name="line639">639: </a>  
+<a name="line640">640: </a>  <font color="#B22222">/* Solve the eigenvalue problem */</font>
+<a name="line641">641: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps);
+
+<a name="line643">643: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,&its);
+<a name="line644">644: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of iterations of the eigensolver: %D\n"</font>,its);
+<a name="line645">645: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,&type);
+<a name="line646">646: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>, type);
+<a name="line647">647: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,&nev,NULL,NULL);
+<a name="line648">648: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line650">650: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line651">651: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line652">652: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line653">653: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line654">654: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
+<a name="line655">655: </a>  } <font color="#4169E1">else</font> {
+<a name="line656">656: </a>    <font color="#B22222">/* Get number of converged approximate eigenpairs */</font>
+<a name="line657">657: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,&nconv);
+<a name="line658">658: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of converged eigenpairs: %D\n\n"</font>,nconv);
+<a name="line659">659: </a>  
+<a name="line660">660: </a>    <font color="#4169E1">if</font> (nconv>0) {
+<a name="line661">661: </a>      <font color="#B22222">/* Display eigenvalues and relative errors */</font>
+<a name="line662">662: </a>      PetscPrintf(PETSC_COMM_WORLD,
+<a name="line663">663: </a>           <font color="#666666">"           k          ||Ax-kx||/||kx||\n"</font>
+<a name="line664">664: </a>           <font color="#666666">"   ----------------- ------------------\n"</font>);
+<a name="line665">665: </a>  
+<a name="line666">666: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
+<a name="line667">667: </a>        <font color="#B22222">/* Get converged eigenpairs: i-th eigenvalue is stored in kr (real part) and</font>
+<a name="line668">668: </a><font color="#B22222">          ki (imaginary part) */</font>
+<a name="line669">669: </a>        <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,&kr,&ki,Xr,Xi);
+<a name="line670">670: </a>        <font color="#B22222">/* Compute the relative error associated to each eigenpair */</font>
+<a name="line671">671: </a>        <a href="../../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,EPS_ERROR_RELATIVE,&error);
+
+<a name="line673">673: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line674">674: </a>        re = PetscRealPart(kr);
+<a name="line675">675: </a>        im = PetscImaginaryPart(kr);
+<a name="line676">676: </a><font color="#A020F0">#else</font>
+<a name="line677">677: </a>        re = kr;
+<a name="line678">678: </a>        im = ki;
+<a name="line679">679: </a><font color="#A020F0">#endif</font>
+<a name="line680">680: </a>        <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line681">681: </a>          PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %9f%+9fi %12g\n"</font>,(double)re,(double)im,(double)error);
+<a name="line682">682: </a>        } <font color="#4169E1">else</font> {
+<a name="line683">683: </a>          PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f       %12g\n"</font>,(double)re,(double)error);
+<a name="line684">684: </a>        }
+<a name="line685">685: </a>      }
+<a name="line686">686: </a>      PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
+<a name="line687">687: </a>    }
+<a name="line688">688: </a>  }
+
+<a name="line690">690: </a>  <font color="#B22222">/* Free work space */</font>
+<a name="line691">691: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
+<a name="line692">692: </a>  MatDestroy(&J);
+<a name="line693">693: </a>  MatDestroy(&Jred);
+<a name="line694">694: </a>  MatDestroy(&user.Ybus);
+<a name="line695">695: </a>  VecDestroy(&X);
+<a name="line696">696: </a>  VecDestroy(&Xr);
+<a name="line697">697: </a>  VecDestroy(&Xi);
+<a name="line698">698: </a>  VecDestroy(&user.V0);
+<a name="line699">699: </a>  DMDestroy(&user.dmgen);
+<a name="line700">700: </a>  DMDestroy(&user.dmnet);
+<a name="line701">701: </a>  DMDestroy(&user.dmpgrid);
+<a name="line702">702: </a>  ISDestroy(&user.is_diff);
+<a name="line703">703: </a>  ISDestroy(&user.is_alg);
+<a name="line704">704: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line705">705: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line706">706: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/eps/examples/tutorials/ex4.c b/src/eps/examples/tutorials/ex4.c
index ad18b44..3b50c9f 100644
--- a/src/eps/examples/tutorials/ex4.c
+++ b/src/eps/examples/tutorials/ex4.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -47,7 +47,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nEigenproblem stored in file.\n\n");CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-file",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-file",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
   if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must indicate a file name with the -file option");
 
 #if defined(PETSC_USE_COMPLEX)
@@ -103,7 +103,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -115,6 +115,6 @@ int main(int argc,char **argv)
   ierr = EPSDestroy(&eps);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex4.c.html b/src/eps/examples/tutorials/ex4.c.html
index a9c6f66..42ace02 100644
--- a/src/eps/examples/tutorials/ex4.c.html
+++ b/src/eps/examples/tutorials/ex4.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex4.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:28+00:00">
+<meta name="date" content="2016-05-16T10:33:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex4.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex4.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -56,7 +56,7 @@
 <a name="line47"> 47: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nEigenproblem stored in file.\n\n"</font>);
-<a name="line50"> 50: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-file"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line50"> 50: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-file"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
 <a name="line51"> 51: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must indicate a file name with the -file option"</font>);
 
 <a name="line53"> 53: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
@@ -112,7 +112,7 @@
 <a name="line103">103: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line105">105: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line106">106: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line106">106: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line107">107: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line108">108: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line109">109: </a>  } <font color="#4169E1">else</font> {
@@ -124,7 +124,7 @@
 <a name="line115">115: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&eps);
 <a name="line116">116: </a>  MatDestroy(&A);
 <a name="line117">117: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line118">118: </a>  <font color="#4169E1">return</font> 0;
+<a name="line118">118: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line119">119: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex5.c b/src/eps/examples/tutorials/ex5.c
index 1463ed9..8d9c18c 100644
--- a/src/eps/examples/tutorials/ex5.c
+++ b/src/eps/examples/tutorials/ex5.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -46,7 +46,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   N = m*(m+1)/2;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMarkov Model, N=%D (m=%D)\n\n",N,m);CHKERRQ(ierr);
 
@@ -107,7 +107,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -120,7 +120,7 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = VecDestroy(&v0);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/eps/examples/tutorials/ex5.c.html b/src/eps/examples/tutorials/ex5.c.html
index 7218835..89c2530 100644
--- a/src/eps/examples/tutorials/ex5.c.html
+++ b/src/eps/examples/tutorials/ex5.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex5.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:28+00:00">
+<meta name="date" content="2016-05-16T10:33:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex5.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex5.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -55,7 +55,7 @@
 
 <a name="line47"> 47: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line49"> 49: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line49"> 49: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line50"> 50: </a>  N = m*(m+1)/2;
 <a name="line51"> 51: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov Model, N=%D (m=%D)\n\n"</font>,N,m);
 
@@ -116,7 +116,7 @@
 <a name="line107">107: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line109">109: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line110">110: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line110">110: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line111">111: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line112">112: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line113">113: </a>  } <font color="#4169E1">else</font> {
@@ -129,7 +129,7 @@
 <a name="line120">120: </a>  MatDestroy(&A);
 <a name="line121">121: </a>  VecDestroy(&v0);
 <a name="line122">122: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line123">123: </a>  <font color="#4169E1">return</font> 0;
+<a name="line123">123: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line124">124: </a>}
 
 <a name="line128">128: </a><font color="#B22222">/*</font>
diff --git a/src/eps/examples/tutorials/ex6f.F b/src/eps/examples/tutorials/ex6f.F
index 4b00d2f..5bec33f 100644
--- a/src/eps/examples/tutorials/ex6f.F
+++ b/src/eps/examples/tutorials/ex6f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n ex6f [-help] [-m <m>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./ex6f [-help] [-m <m>] [all SLEPc options] 
 !
 !  Description: This example solves the eigensystem arising in the Ising
 !  model for ferromagnetic materials. The file mvmisg.f must be linked
@@ -79,7 +79,8 @@
          SETERRQ(PETSC_COMM_WORLD,1,' ',ierr)
       endif
       m = 30
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-m',m,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-m',m,flg,ierr)
       N = 2*m
 
       if (rank .eq. 0) then
@@ -142,7 +143,8 @@
 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 !     ** show detailed info unless -terse option is given by user
-      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-terse',terse,ierr)
+      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+     &                        '-terse',terse,ierr)
       if (terse) then
         call EPSErrorView(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
       else
diff --git a/src/eps/examples/tutorials/ex6f.F.html b/src/eps/examples/tutorials/ex6f.F.html
index 51ad44a..41997c1 100644
--- a/src/eps/examples/tutorials/ex6f.F.html
+++ b/src/eps/examples/tutorials/ex6f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex6f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:33+00:00">
+<meta name="date" content="2016-05-16T10:33:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex6f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex6f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n ex6f [-help] [-m <m>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./ex6f [-help] [-m <m>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: This example solves the eigensystem arising in the Ising
 <a name="line23"> 23: </a>!  model <font color="#4169E1">for</font> ferromagnetic materials. The file mvmisg.f must be linked
@@ -91,248 +91,250 @@
 <a name="line79"> 79: </a>         SETERRQ(PETSC_COMM_WORLD,1,' ',ierr)
 <a name="line80"> 80: </a>      endif
 <a name="line81"> 81: </a>      m = 30
-<a name="line82"> 82: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-m',m,flg,ierr)
-<a name="line83"> 83: </a>      N = 2*m
-
-<a name="line85"> 85: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line86"> 86: </a>        write(*,*)
-<a name="line87"> 87: </a>        write(*,'(A,I6,A)') 'Ising Model Eigenproblem, m=',m,', (N=2*m)'
-<a name="line88"> 88: </a>        write(*,*)
-<a name="line89"> 89: </a>      endif
-
-<a name="line91"> 91: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line92"> 92: </a>!     Register the matrix-vector subroutine <font color="#4169E1">for</font> the operator that defines
-<a name="line93"> 93: </a>!     the eigensystem, Ax=kx
-<a name="line94"> 94: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line96"> 96: </a>      call MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,PETSC_NULL_OBJECT,   &
-<a name="line97"> 97: </a>     &                    A,ierr)
-<a name="line98"> 98: </a>      call MatShellSetOperation(A,MATOP_MULT,MatIsing_Mult,ierr)
-
-<a name="line100">100: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line101">101: </a>!     Create the eigensolver and display info
-<a name="line102">102: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line104">104: </a>!     ** Create eigensolver context
-<a name="line105">105: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
-
-<a name="line107">107: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
-<a name="line108">108: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
-<a name="line109">109: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP,ierr)
-
-<a name="line111">111: </a>!     ** Set solver parameters at runtime
-<a name="line112">112: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
-
-<a name="line114">114: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line115">115: </a>!     Solve the eigensystem
-<a name="line116">116: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line118">118: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
-<a name="line119">119: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,its,ierr)
-<a name="line120">120: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line121">121: </a>        write(*,'(A,I4)') ' Number of iterations of the method: ', its
-<a name="line122">122: </a>      endif
-
-<a name="line124">124: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line125">125: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
-<a name="line126">126: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line127">127: </a>        write(*,'(A,A)') ' Solution method: ', tname
-<a name="line128">128: </a>      endif
-<a name="line129">129: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
-<a name="line130">130: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line131">131: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line132">132: </a>        write(*,'(A,I2)') ' Number of requested eigenvalues:', nev
-<a name="line133">133: </a>      endif
-<a name="line134">134: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,tol,maxit,ierr)
-<a name="line135">135: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line136">136: </a>        write(*,'(A,1PE10.4,A,I6)') ' Stopping condition: tol=', tol,   &
-<a name="line137">137: </a>     &                              ', maxit=', maxit
-<a name="line138">138: </a>      endif
-
-<a name="line140">140: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line141">141: </a>!     Display solution and clean up
-<a name="line142">142: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line144">144: </a>!     ** show detailed info unless -terse option is given by user
-<a name="line145">145: </a>      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-terse',terse,ierr)
-<a name="line146">146: </a>      <font color="#4169E1">if</font> (terse) then
-<a name="line147">147: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
-<a name="line148">148: </a>      <font color="#4169E1">else</font>
-<a name="line149">149: </a>        call PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,           &
-<a name="line150">150: </a>     &                   PETSC_VIEWER_ASCII_INFO_DETAIL,ierr)
-<a name="line151">151: </a>        call <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line152">152: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,                       &
-<a name="line153">153: </a>     &                   PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line154">154: </a>        call PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line155">155: </a>      endif
-<a name="line156">156: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
-<a name="line157">157: </a>      call MatDestroy(A,ierr)
-
-<a name="line159">159: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line160">160: </a> 999  <font color="#4169E1">continue</font>
-<a name="line161">161: </a><font color="#A020F0">#endif</font>
-<a name="line162">162: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line163">163: </a>      end
-
-<a name="line165">165: </a>! ------------------------------------------------------------------- 
-<a name="line166">166: </a>! 
-<a name="line167">167: </a>!   MatIsing_Mult - user provided matrix-vector multiply 
-<a name="line168">168: </a>!
-<a name="line169">169: </a>!   Input Parameters:
-<a name="line170">170: </a>!   A - matrix
-<a name="line171">171: </a>!   x - input vector
-<a name="line172">172: </a>!
-<a name="line173">173: </a>!   Output Parameter:
-<a name="line174">174: </a>!   y - output vector
-<a name="line175">175: </a>! 
-<a name="line176">176: </a>      subroutine MatIsing_Mult(A,x,y,ierr)
-<a name="line177">177: </a>      implicit none
-
-<a name="line179">179: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
-<a name="line180">180: </a><font color="#A020F0">#include <petsc/finclude/petscvec.h></font>
-<a name="line181">181: </a><font color="#A020F0">#include <petsc/finclude/petscmat.h></font>
-
-<a name="line183">183: </a>      Mat            A
-<a name="line184">184: </a>      Vec            x,y
-<a name="line185">185: </a>      PetscInt       trans,one,N
-<a name="line186">186: </a>      PetscScalar    x_array(1),y_array(1)
-<a name="line187">187: </a>      PetscOffset    i_x,i_y
-<a name="line188">188: </a>      PetscErrorCode ierr
-
-<a name="line190">190: </a>!     The actual routine <font color="#4169E1">for</font> the matrix-vector product
-<a name="line191">191: </a>      external mvmisg
-
-<a name="line193">193: </a>      call MatGetSize(A,N,PETSC_NULL_INTEGER,ierr)
-<a name="line194">194: </a>      call VecGetArrayRead(x,x_array,i_x,ierr)
-<a name="line195">195: </a>      call VecGetArray(y,y_array,i_y,ierr)
-
-<a name="line197">197: </a>      trans = 0
-<a name="line198">198: </a>      one = 1
-<a name="line199">199: </a>      call mvmisg(trans,N,one,x_array(i_x+1),N,y_array(i_y+1),N)
-
-<a name="line201">201: </a>      call VecRestoreArrayRead(x,x_array,i_x,ierr)
-<a name="line202">202: </a>      call VecRestoreArray(y,y_array,i_y,ierr)
-
-<a name="line204">204: </a>      <font color="#4169E1">return</font>
-<a name="line205">205: </a>      end
-
-<a name="line207">207: </a>! ------------------------------------------------------------------- 
-<a name="line208">208: </a>!     The actual routine <font color="#4169E1">for</font> the matrix-vector product
-<a name="line209">209: </a>!     See http://math.nist.gov/MatrixMarket/data/<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>/mvmisg/mvmisg.html
-
-<a name="line211">211: </a>      SUBROUTINE MVMISG( TRANS, N, M, X, LDX, Y, LDY )
-<a name="line212">212: </a>!     ..
-<a name="line213">213: </a>!     .. Scalar Arguments ..
-<a name="line214">214: </a>      PetscInt     LDY, LDX, M, N, TRANS
-<a name="line215">215: </a>!     ..
-<a name="line216">216: </a>!     .. Array Arguments ..
-<a name="line217">217: </a>      PetscScalar  Y( LDY, * ), X( LDX, * )
-<a name="line218">218: </a>!     ..
-<a name="line219">219: </a>!
-<a name="line220">220: </a>!  Purpose
-<a name="line221">221: </a>!  =======
-<a name="line222">222: </a>!
-<a name="line223">223: </a>!  Compute
+<a name="line82"> 82: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line83"> 83: </a>     &                        '-m',m,flg,ierr)
+<a name="line84"> 84: </a>      N = 2*m
+
+<a name="line86"> 86: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line87"> 87: </a>        write(*,*)
+<a name="line88"> 88: </a>        write(*,'(A,I6,A)') 'Ising Model Eigenproblem, m=',m,', (N=2*m)'
+<a name="line89"> 89: </a>        write(*,*)
+<a name="line90"> 90: </a>      endif
+
+<a name="line92"> 92: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line93"> 93: </a>!     Register the matrix-vector subroutine <font color="#4169E1">for</font> the operator that defines
+<a name="line94"> 94: </a>!     the eigensystem, Ax=kx
+<a name="line95"> 95: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line97"> 97: </a>      call MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,PETSC_NULL_OBJECT,   &
+<a name="line98"> 98: </a>     &                    A,ierr)
+<a name="line99"> 99: </a>      call MatShellSetOperation(A,MATOP_MULT,MatIsing_Mult,ierr)
+
+<a name="line101">101: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line102">102: </a>!     Create the eigensolver and display info
+<a name="line103">103: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line105">105: </a>!     ** Create eigensolver context
+<a name="line106">106: </a>      call <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PETSC_COMM_WORLD,eps,ierr)
+
+<a name="line108">108: </a>!     ** Set operators. In this <font color="#4169E1">case</font>, it is a standard eigenvalue problem
+<a name="line109">109: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,A,PETSC_NULL_OBJECT,ierr)
+<a name="line110">110: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP,ierr)
+
+<a name="line112">112: </a>!     ** Set solver parameters at runtime
+<a name="line113">113: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(eps,ierr)
+
+<a name="line115">115: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line116">116: </a>!     Solve the eigensystem
+<a name="line117">117: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line119">119: </a>      call <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(eps,ierr) 
+<a name="line120">120: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(eps,its,ierr)
+<a name="line121">121: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line122">122: </a>        write(*,'(A,I4)') ' Number of iterations of the method: ', its
+<a name="line123">123: </a>      endif
+
+<a name="line125">125: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line126">126: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetType.html#EPSGetType">EPSGetType</a>(eps,tname,ierr)
+<a name="line127">127: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line128">128: </a>        write(*,'(A,A)') ' Solution method: ', tname
+<a name="line129">129: </a>      endif
+<a name="line130">130: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(eps,nev,PETSC_NULL_INTEGER,                 &
+<a name="line131">131: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line132">132: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line133">133: </a>        write(*,'(A,I2)') ' Number of requested eigenvalues:', nev
+<a name="line134">134: </a>      endif
+<a name="line135">135: </a>      call <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(eps,tol,maxit,ierr)
+<a name="line136">136: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line137">137: </a>        write(*,'(A,1PE10.4,A,I6)') ' Stopping condition: tol=', tol,   &
+<a name="line138">138: </a>     &                              ', maxit=', maxit
+<a name="line139">139: </a>      endif
+
+<a name="line141">141: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line142">142: </a>!     Display solution and clean up
+<a name="line143">143: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line145">145: </a>!     ** show detailed info unless -terse option is given by user
+<a name="line146">146: </a>      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+<a name="line147">147: </a>     &                        '-terse',terse,ierr)
+<a name="line148">148: </a>      <font color="#4169E1">if</font> (terse) then
+<a name="line149">149: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+<a name="line150">150: </a>      <font color="#4169E1">else</font>
+<a name="line151">151: </a>        call PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,           &
+<a name="line152">152: </a>     &                   PETSC_VIEWER_ASCII_INFO_DETAIL,ierr)
+<a name="line153">153: </a>        call <a href="../../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line154">154: </a>        call <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,                       &
+<a name="line155">155: </a>     &                   PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line156">156: </a>        call PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line157">157: </a>      endif
+<a name="line158">158: </a>      call <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(eps,ierr)
+<a name="line159">159: </a>      call MatDestroy(A,ierr)
+
+<a name="line161">161: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line162">162: </a> 999  <font color="#4169E1">continue</font>
+<a name="line163">163: </a><font color="#A020F0">#endif</font>
+<a name="line164">164: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line165">165: </a>      end
+
+<a name="line167">167: </a>! ------------------------------------------------------------------- 
+<a name="line168">168: </a>! 
+<a name="line169">169: </a>!   MatIsing_Mult - user provided matrix-vector multiply 
+<a name="line170">170: </a>!
+<a name="line171">171: </a>!   Input Parameters:
+<a name="line172">172: </a>!   A - matrix
+<a name="line173">173: </a>!   x - input vector
+<a name="line174">174: </a>!
+<a name="line175">175: </a>!   Output Parameter:
+<a name="line176">176: </a>!   y - output vector
+<a name="line177">177: </a>! 
+<a name="line178">178: </a>      subroutine MatIsing_Mult(A,x,y,ierr)
+<a name="line179">179: </a>      implicit none
+
+<a name="line181">181: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
+<a name="line182">182: </a><font color="#A020F0">#include <petsc/finclude/petscvec.h></font>
+<a name="line183">183: </a><font color="#A020F0">#include <petsc/finclude/petscmat.h></font>
+
+<a name="line185">185: </a>      Mat            A
+<a name="line186">186: </a>      Vec            x,y
+<a name="line187">187: </a>      PetscInt       trans,one,N
+<a name="line188">188: </a>      PetscScalar    x_array(1),y_array(1)
+<a name="line189">189: </a>      PetscOffset    i_x,i_y
+<a name="line190">190: </a>      PetscErrorCode ierr
+
+<a name="line192">192: </a>!     The actual routine <font color="#4169E1">for</font> the matrix-vector product
+<a name="line193">193: </a>      external mvmisg
+
+<a name="line195">195: </a>      call MatGetSize(A,N,PETSC_NULL_INTEGER,ierr)
+<a name="line196">196: </a>      call VecGetArrayRead(x,x_array,i_x,ierr)
+<a name="line197">197: </a>      call VecGetArray(y,y_array,i_y,ierr)
+
+<a name="line199">199: </a>      trans = 0
+<a name="line200">200: </a>      one = 1
+<a name="line201">201: </a>      call mvmisg(trans,N,one,x_array(i_x+1),N,y_array(i_y+1),N)
+
+<a name="line203">203: </a>      call VecRestoreArrayRead(x,x_array,i_x,ierr)
+<a name="line204">204: </a>      call VecRestoreArray(y,y_array,i_y,ierr)
+
+<a name="line206">206: </a>      <font color="#4169E1">return</font>
+<a name="line207">207: </a>      end
+
+<a name="line209">209: </a>! ------------------------------------------------------------------- 
+<a name="line210">210: </a>!     The actual routine <font color="#4169E1">for</font> the matrix-vector product
+<a name="line211">211: </a>!     See http://math.nist.gov/MatrixMarket/data/<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>/mvmisg/mvmisg.html
+
+<a name="line213">213: </a>      SUBROUTINE MVMISG( TRANS, N, M, X, LDX, Y, LDY )
+<a name="line214">214: </a>!     ..
+<a name="line215">215: </a>!     .. Scalar Arguments ..
+<a name="line216">216: </a>      PetscInt     LDY, LDX, M, N, TRANS
+<a name="line217">217: </a>!     ..
+<a name="line218">218: </a>!     .. Array Arguments ..
+<a name="line219">219: </a>      PetscScalar  Y( LDY, * ), X( LDX, * )
+<a name="line220">220: </a>!     ..
+<a name="line221">221: </a>!
+<a name="line222">222: </a>!  Purpose
+<a name="line223">223: </a>!  =======
 <a name="line224">224: </a>!
-<a name="line225">225: </a>!               Y(:,1:M) = op(A)*X(:,1:M)
+<a name="line225">225: </a>!  Compute
 <a name="line226">226: </a>!
-<a name="line227">227: </a>!  where op(A) is A or A' (the transpose of A). The A is the Ising 
-<a name="line228">228: </a>!  matrix.
-<a name="line229">229: </a>!
-<a name="line230">230: </a>!  Arguments
-<a name="line231">231: </a>!  =========
-<a name="line232">232: </a>!
-<a name="line233">233: </a>!  TRANS   (input) INTEGER
-<a name="line234">234: </a>!          If TRANS = 0, compute Y(:,1:M) = A*X(:,1:M) 
-<a name="line235">235: </a>!          If TRANS = 1, compute Y(:,1:M) = A'*X(:,1:M) 
-<a name="line236">236: </a>!           
-<a name="line237">237: </a>!  N       (input) INTEGER
-<a name="line238">238: </a>!          The order of the matrix A. N has to be an even number.
-<a name="line239">239: </a>!
-<a name="line240">240: </a>!  M       (input) INTEGER
-<a name="line241">241: </a>!          The number of columns of X to multiply.
-<a name="line242">242: </a>!
-<a name="line243">243: </a>!  X       (input) DOUBLE PRECISION array, dimension ( LDX, M )
-<a name="line244">244: </a>!          X contains the matrix (vectors) X.
-<a name="line245">245: </a>!
-<a name="line246">246: </a>!  LDX     (input) INTEGER
-<a name="line247">247: </a>!          The leading dimension of array X, LDX >= max( 1, N )
-<a name="line248">248: </a>!
-<a name="line249">249: </a>!  Y       (output) DOUBLE PRECISION array, dimension (LDX, M )
-<a name="line250">250: </a>!          contains the product of the matrix op(A) with X.
-<a name="line251">251: </a>!
-<a name="line252">252: </a>!  LDY     (input) INTEGER
-<a name="line253">253: </a>!          The leading dimension of array Y, LDY >= max( 1, N )
-<a name="line254">254: </a>!
-<a name="line255">255: </a>!  ===================================================================
+<a name="line227">227: </a>!               Y(:,1:M) = op(A)*X(:,1:M)
+<a name="line228">228: </a>!
+<a name="line229">229: </a>!  where op(A) is A or A' (the transpose of A). The A is the Ising 
+<a name="line230">230: </a>!  matrix.
+<a name="line231">231: </a>!
+<a name="line232">232: </a>!  Arguments
+<a name="line233">233: </a>!  =========
+<a name="line234">234: </a>!
+<a name="line235">235: </a>!  TRANS   (input) INTEGER
+<a name="line236">236: </a>!          If TRANS = 0, compute Y(:,1:M) = A*X(:,1:M) 
+<a name="line237">237: </a>!          If TRANS = 1, compute Y(:,1:M) = A'*X(:,1:M) 
+<a name="line238">238: </a>!           
+<a name="line239">239: </a>!  N       (input) INTEGER
+<a name="line240">240: </a>!          The order of the matrix A. N has to be an even number.
+<a name="line241">241: </a>!
+<a name="line242">242: </a>!  M       (input) INTEGER
+<a name="line243">243: </a>!          The number of columns of X to multiply.
+<a name="line244">244: </a>!
+<a name="line245">245: </a>!  X       (input) DOUBLE PRECISION array, dimension ( LDX, M )
+<a name="line246">246: </a>!          X contains the matrix (vectors) X.
+<a name="line247">247: </a>!
+<a name="line248">248: </a>!  LDX     (input) INTEGER
+<a name="line249">249: </a>!          The leading dimension of array X, LDX >= max( 1, N )
+<a name="line250">250: </a>!
+<a name="line251">251: </a>!  Y       (output) DOUBLE PRECISION array, dimension (LDX, M )
+<a name="line252">252: </a>!          contains the product of the matrix op(A) with X.
+<a name="line253">253: </a>!
+<a name="line254">254: </a>!  LDY     (input) INTEGER
+<a name="line255">255: </a>!          The leading dimension of array Y, LDY >= max( 1, N )
 <a name="line256">256: </a>!
-<a name="line257">257: </a>!
-<a name="line258">258: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
-
-<a name="line260">260: </a>!     .. Local Variables .. 
-<a name="line261">261: </a>      PetscInt    I, K 
-<a name="line262">262: </a>      PetscReal   ALPHA, BETA
-<a name="line263">263: </a>      PetscReal   COSA, COSB, SINA
-<a name="line264">264: </a>      PetscReal   SINB, TEMP, TEMP1 
-<a name="line265">265: </a>!
-<a name="line266">266: </a>!     .. Intrinsic functions ..
-<a name="line267">267: </a>      INTRINSIC   COS, SIN 
-<a name="line268">268: </a>!
-<a name="line269">269: </a>      ALPHA = PETSC_PI/4
-<a name="line270">270: </a>      BETA = PETSC_PI/4
-<a name="line271">271: </a>      COSA = COS( ALPHA ) 
-<a name="line272">272: </a>      SINA = SIN( ALPHA ) 
-<a name="line273">273: </a>      COSB = COS( BETA )
-<a name="line274">274: </a>      SINB = SIN( BETA ) 
-<a name="line275">275: </a>!      
-<a name="line276">276: </a>      IF ( TRANS.EQ.0 ) THEN 
-<a name="line277">277: </a>!
-<a name="line278">278: </a>!     Compute Y(:,1:M) = A*X(:,1:M)
-
-<a name="line280">280: </a>         DO 30 K = 1, M
-<a name="line281">281: </a>!
-<a name="line282">282: </a>            Y( 1, K ) = COSB*X( 1, K ) - SINB*X( N, K ) 
-<a name="line283">283: </a>            DO 10 I = 2, N-1, 2   
-<a name="line284">284: </a>               Y( I, K )   =  COSB*X( I, K ) + SINB*X( I+1, K )
-<a name="line285">285: </a>               Y( I+1, K ) = -SINB*X( I, K ) + COSB*X( I+1, K )  
-<a name="line286">286: </a>   10       CONTINUE
-<a name="line287">287: </a>            Y( N, K ) = SINB*X( 1, K ) + COSB*X( N, K ) 
-<a name="line288">288: </a>!
-<a name="line289">289: </a>            DO 20 I = 1, N, 2
-<a name="line290">290: </a>               TEMP        =  COSA*Y( I, K ) + SINA*Y( I+1, K )
-<a name="line291">291: </a>               Y( I+1, K ) = -SINA*Y( I, K ) + COSA*Y( I+1, K )  
-<a name="line292">292: </a>               Y( I, K )   = TEMP 
-<a name="line293">293: </a>   20       CONTINUE  
-<a name="line294">294: </a>!
-<a name="line295">295: </a>   30    CONTINUE 
+<a name="line257">257: </a>!  ===================================================================
+<a name="line258">258: </a>!
+<a name="line259">259: </a>!
+<a name="line260">260: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
+
+<a name="line262">262: </a>!     .. Local Variables .. 
+<a name="line263">263: </a>      PetscInt    I, K 
+<a name="line264">264: </a>      PetscReal   ALPHA, BETA
+<a name="line265">265: </a>      PetscReal   COSA, COSB, SINA
+<a name="line266">266: </a>      PetscReal   SINB, TEMP, TEMP1 
+<a name="line267">267: </a>!
+<a name="line268">268: </a>!     .. Intrinsic functions ..
+<a name="line269">269: </a>      INTRINSIC   COS, SIN 
+<a name="line270">270: </a>!
+<a name="line271">271: </a>      ALPHA = PETSC_PI/4
+<a name="line272">272: </a>      BETA = PETSC_PI/4
+<a name="line273">273: </a>      COSA = COS( ALPHA ) 
+<a name="line274">274: </a>      SINA = SIN( ALPHA ) 
+<a name="line275">275: </a>      COSB = COS( BETA )
+<a name="line276">276: </a>      SINB = SIN( BETA ) 
+<a name="line277">277: </a>!      
+<a name="line278">278: </a>      IF ( TRANS.EQ.0 ) THEN 
+<a name="line279">279: </a>!
+<a name="line280">280: </a>!     Compute Y(:,1:M) = A*X(:,1:M)
+
+<a name="line282">282: </a>         DO 30 K = 1, M
+<a name="line283">283: </a>!
+<a name="line284">284: </a>            Y( 1, K ) = COSB*X( 1, K ) - SINB*X( N, K ) 
+<a name="line285">285: </a>            DO 10 I = 2, N-1, 2   
+<a name="line286">286: </a>               Y( I, K )   =  COSB*X( I, K ) + SINB*X( I+1, K )
+<a name="line287">287: </a>               Y( I+1, K ) = -SINB*X( I, K ) + COSB*X( I+1, K )  
+<a name="line288">288: </a>   10       CONTINUE
+<a name="line289">289: </a>            Y( N, K ) = SINB*X( 1, K ) + COSB*X( N, K ) 
+<a name="line290">290: </a>!
+<a name="line291">291: </a>            DO 20 I = 1, N, 2
+<a name="line292">292: </a>               TEMP        =  COSA*Y( I, K ) + SINA*Y( I+1, K )
+<a name="line293">293: </a>               Y( I+1, K ) = -SINA*Y( I, K ) + COSA*Y( I+1, K )  
+<a name="line294">294: </a>               Y( I, K )   = TEMP 
+<a name="line295">295: </a>   20       CONTINUE  
 <a name="line296">296: </a>!
-<a name="line297">297: </a>      ELSE IF ( TRANS.EQ.1 ) THEN 
+<a name="line297">297: </a>   30    CONTINUE 
 <a name="line298">298: </a>!
-<a name="line299">299: </a>!        Compute Y(:1:M) = A'*X(:,1:M) 
+<a name="line299">299: </a>      ELSE IF ( TRANS.EQ.1 ) THEN 
 <a name="line300">300: </a>!
-<a name="line301">301: </a>         DO 60 K = 1, M 
+<a name="line301">301: </a>!        Compute Y(:1:M) = A'*X(:,1:M) 
 <a name="line302">302: </a>!
-<a name="line303">303: </a>            DO 40 I = 1, N, 2
-<a name="line304">304: </a>               Y( I, K )   =  COSA*X( I, K ) - SINA*X( I+1, K )
-<a name="line305">305: </a>               Y( I+1, K ) =  SINA*X( I, K ) + COSA*X( I+1, K )  
-<a name="line306">306: </a>   40       CONTINUE  
-<a name="line307">307: </a>            TEMP  = COSB*Y(1,K) + SINB*Y(N,K) 
-<a name="line308">308: </a>            DO 50 I = 2, N-1, 2   
-<a name="line309">309: </a>               TEMP1       =  COSB*Y( I, K ) - SINB*Y( I+1, K )
-<a name="line310">310: </a>               Y( I+1, K ) =  SINB*Y( I, K ) + COSB*Y( I+1, K )  
-<a name="line311">311: </a>               Y( I, K )   =  TEMP1
-<a name="line312">312: </a>   50       CONTINUE
-<a name="line313">313: </a>            Y( N, K ) = -SINB*Y( 1, K ) + COSB*Y( N, K ) 
-<a name="line314">314: </a>            Y( 1, K ) = TEMP 
-<a name="line315">315: </a>!
-<a name="line316">316: </a>   60    CONTINUE
+<a name="line303">303: </a>         DO 60 K = 1, M 
+<a name="line304">304: </a>!
+<a name="line305">305: </a>            DO 40 I = 1, N, 2
+<a name="line306">306: </a>               Y( I, K )   =  COSA*X( I, K ) - SINA*X( I+1, K )
+<a name="line307">307: </a>               Y( I+1, K ) =  SINA*X( I, K ) + COSA*X( I+1, K )  
+<a name="line308">308: </a>   40       CONTINUE  
+<a name="line309">309: </a>            TEMP  = COSB*Y(1,K) + SINB*Y(N,K) 
+<a name="line310">310: </a>            DO 50 I = 2, N-1, 2   
+<a name="line311">311: </a>               TEMP1       =  COSB*Y( I, K ) - SINB*Y( I+1, K )
+<a name="line312">312: </a>               Y( I+1, K ) =  SINB*Y( I, K ) + COSB*Y( I+1, K )  
+<a name="line313">313: </a>               Y( I, K )   =  TEMP1
+<a name="line314">314: </a>   50       CONTINUE
+<a name="line315">315: </a>            Y( N, K ) = -SINB*Y( 1, K ) + COSB*Y( N, K ) 
+<a name="line316">316: </a>            Y( 1, K ) = TEMP 
 <a name="line317">317: </a>!
-<a name="line318">318: </a>      END IF 
+<a name="line318">318: </a>   60    CONTINUE
 <a name="line319">319: </a>!
-<a name="line320">320: </a>      RETURN
-<a name="line321">321: </a>!  
-<a name="line322">322: </a>!     END OF MVMISG
-<a name="line323">323: </a>      END 
+<a name="line320">320: </a>      END IF 
+<a name="line321">321: </a>!
+<a name="line322">322: </a>      RETURN
+<a name="line323">323: </a>!  
+<a name="line324">324: </a>!     END OF MVMISG
+<a name="line325">325: </a>      END 
 </pre>
 </body>
 
diff --git a/src/eps/examples/tutorials/ex7.c b/src/eps/examples/tutorials/ex7.c
index 0f43fef..570cdea 100644
--- a/src/eps/examples/tutorials/ex7.c
+++ b/src/eps/examples/tutorials/ex7.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -54,7 +54,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nGeneralized eigenproblem stored in file.\n\n");CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-f1",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-f1",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
   if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must indicate a file name for matrix A with the -f1 option");
 
 #if defined(PETSC_USE_COMPLEX)
@@ -68,7 +68,7 @@ int main(int argc,char **argv)
   ierr = MatLoad(A,viewer);CHKERRQ(ierr);
   ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
 
-  ierr = PetscOptionsGetString(NULL,"-f2",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-f2",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
   if (flg) {
     ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);CHKERRQ(ierr);
     ierr = MatCreate(PETSC_COMM_WORLD,&B);CHKERRQ(ierr);
@@ -86,10 +86,10 @@ int main(int argc,char **argv)
   /*
      Read user constraints if available
   */
-  ierr = PetscOptionsGetInt(NULL,"-nconstr",&ncon,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-nconstr",&ncon,&flg);CHKERRQ(ierr);
   if (flg) {
     if (ncon<=0) SETERRQ(PETSC_COMM_WORLD,1,"The number of constraints must be >0");
-    ierr = PetscOptionsGetString(NULL,"-fconstr",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+    ierr = PetscOptionsGetString(NULL,NULL,"-fconstr",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
     if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must specify the name of the file storing the constraints");
     ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);CHKERRQ(ierr);
     ierr = VecDuplicateVecs(xr,ncon,&Cv);CHKERRQ(ierr);
@@ -102,10 +102,10 @@ int main(int argc,char **argv)
   /*
      Read initial guesses if available
   */
-  ierr = PetscOptionsGetInt(NULL,"-ninitial",&nini,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-ninitial",&nini,&flg);CHKERRQ(ierr);
   if (flg) {
     if (nini<=0) SETERRQ(PETSC_COMM_WORLD,1,"The number of initial vectors must be >0");
-    ierr = PetscOptionsGetString(NULL,"-finitial",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+    ierr = PetscOptionsGetString(NULL,NULL,"-finitial",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
     if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must specify the name of the file containing the initial vectors");
     ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);CHKERRQ(ierr);
     ierr = VecDuplicateVecs(xr,nini,&Iv);CHKERRQ(ierr);
@@ -169,7 +169,7 @@ int main(int argc,char **argv)
   /*
      Show detailed info unless -terse option is given by user
    */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -182,7 +182,7 @@ int main(int argc,char **argv)
   /*
      Save eigenvectors, if requested
   */
-  ierr = PetscOptionsGetString(NULL,"-evecs",filename,PETSC_MAX_PATH_LEN,&evecs);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-evecs",filename,PETSC_MAX_PATH_LEN,&evecs);CHKERRQ(ierr);
   ierr = EPSGetConverged(eps,&nconv);CHKERRQ(ierr);
   if (nconv>0 && evecs) {
     ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);
@@ -212,6 +212,6 @@ int main(int argc,char **argv)
     ierr = VecDestroyVecs(ncon,&Cv);CHKERRQ(ierr);
   }
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/eps/examples/tutorials/ex7.c.html b/src/eps/examples/tutorials/ex7.c.html
index abbf4b7..72c7477 100644
--- a/src/eps/examples/tutorials/ex7.c.html
+++ b/src/eps/examples/tutorials/ex7.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex7.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:28+00:00">
+<meta name="date" content="2016-05-16T10:33:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex7.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex7.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -63,7 +63,7 @@
 <a name="line54"> 54: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line56"> 56: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nGeneralized eigenproblem stored in file.\n\n"</font>);
-<a name="line57"> 57: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-f1"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line57"> 57: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-f1"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
 <a name="line58"> 58: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must indicate a file name for matrix A with the -f1 option"</font>);
 
 <a name="line60"> 60: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
@@ -77,7 +77,7 @@
 <a name="line68"> 68: </a>  MatLoad(A,viewer);
 <a name="line69"> 69: </a>  PetscViewerDestroy(&viewer);
 
-<a name="line71"> 71: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-f2"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line71"> 71: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-f2"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
 <a name="line72"> 72: </a>  <font color="#4169E1">if</font> (flg) {
 <a name="line73"> 73: </a>    PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);
 <a name="line74"> 74: </a>    MatCreate(PETSC_COMM_WORLD,&B);
@@ -95,10 +95,10 @@
 <a name="line86"> 86: </a>  <font color="#B22222">/*</font>
 <a name="line87"> 87: </a><font color="#B22222">     Read user constraints if available</font>
 <a name="line88"> 88: </a><font color="#B22222">  */</font>
-<a name="line89"> 89: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-nconstr"</font>,&ncon,&flg);
+<a name="line89"> 89: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-nconstr"</font>,&ncon,&flg);
 <a name="line90"> 90: </a>  <font color="#4169E1">if</font> (flg) {
 <a name="line91"> 91: </a>    <font color="#4169E1">if</font> (ncon<=0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"The number of constraints must be >0"</font>);
-<a name="line92"> 92: </a>    PetscOptionsGetString(NULL,<font color="#666666">"-fconstr"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line92"> 92: </a>    PetscOptionsGetString(NULL,NULL,<font color="#666666">"-fconstr"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
 <a name="line93"> 93: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must specify the name of the file storing the constraints"</font>);
 <a name="line94"> 94: </a>    PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);
 <a name="line95"> 95: </a>    VecDuplicateVecs(xr,ncon,&Cv);
@@ -111,10 +111,10 @@
 <a name="line102">102: </a>  <font color="#B22222">/*</font>
 <a name="line103">103: </a><font color="#B22222">     Read initial guesses if available</font>
 <a name="line104">104: </a><font color="#B22222">  */</font>
-<a name="line105">105: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-ninitial"</font>,&nini,&flg);
+<a name="line105">105: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-ninitial"</font>,&nini,&flg);
 <a name="line106">106: </a>  <font color="#4169E1">if</font> (flg) {
 <a name="line107">107: </a>    <font color="#4169E1">if</font> (nini<=0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"The number of initial vectors must be >0"</font>);
-<a name="line108">108: </a>    PetscOptionsGetString(NULL,<font color="#666666">"-finitial"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line108">108: </a>    PetscOptionsGetString(NULL,NULL,<font color="#666666">"-finitial"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
 <a name="line109">109: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must specify the name of the file containing the initial vectors"</font>);
 <a name="line110">110: </a>    PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);
 <a name="line111">111: </a>    VecDuplicateVecs(xr,nini,&Iv);
@@ -178,7 +178,7 @@
 <a name="line169">169: </a>  <font color="#B22222">/*</font>
 <a name="line170">170: </a><font color="#B22222">     Show detailed info unless -terse option is given by user</font>
 <a name="line171">171: </a><font color="#B22222">   */</font>
-<a name="line172">172: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line172">172: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line173">173: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line174">174: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line175">175: </a>  } <font color="#4169E1">else</font> {
@@ -191,7 +191,7 @@
 <a name="line182">182: </a>  <font color="#B22222">/*</font>
 <a name="line183">183: </a><font color="#B22222">     Save eigenvectors, if requested</font>
 <a name="line184">184: </a><font color="#B22222">  */</font>
-<a name="line185">185: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-evecs"</font>,filename,PETSC_MAX_PATH_LEN,&evecs);
+<a name="line185">185: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-evecs"</font>,filename,PETSC_MAX_PATH_LEN,&evecs);
 <a name="line186">186: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(eps,&nconv);
 <a name="line187">187: </a>  <font color="#4169E1">if</font> (nconv>0 && evecs) {
 <a name="line188">188: </a>    PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_WRITE,&viewer);
@@ -221,7 +221,7 @@
 <a name="line212">212: </a>    VecDestroyVecs(ncon,&Cv);
 <a name="line213">213: </a>  }
 <a name="line214">214: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line215">215: </a>  <font color="#4169E1">return</font> 0;
+<a name="line215">215: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line216">216: </a>}
 
 </pre>
diff --git a/src/eps/examples/tutorials/ex9.c b/src/eps/examples/tutorials/ex9.c
index 376384e..5018aa8 100644
--- a/src/eps/examples/tutorials/ex9.c
+++ b/src/eps/examples/tutorials/ex9.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -73,7 +73,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&N,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&N,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nBrusselator wave model, n=%D\n\n",N);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -93,11 +93,11 @@ int main(int argc,char **argv)
   /*
      Look the command line for user-provided parameters
   */
-  ierr = PetscOptionsGetScalar(NULL,"-L",&L,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-alpha",&ctx->alpha,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-beta",&ctx->beta,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-delta1",&delta1,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-delta2",&delta2,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-L",&L,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-alpha",&ctx->alpha,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-beta",&ctx->beta,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-delta1",&delta1,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-delta2",&delta2,NULL);CHKERRQ(ierr);
 
   /*
      Create matrix T
@@ -182,7 +182,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = EPSErrorView(eps,EPS_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -201,7 +201,7 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&ctx->y2);CHKERRQ(ierr);
   ierr = PetscFree(ctx);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/eps/examples/tutorials/ex9.c.html b/src/eps/examples/tutorials/ex9.c.html
index bd1d992..641e976 100644
--- a/src/eps/examples/tutorials/ex9.c.html
+++ b/src/eps/examples/tutorials/ex9.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex9.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:29+00:00">
+<meta name="date" content="2016-05-16T10:33:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/ex9.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/ex9.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -82,7 +82,7 @@
 
 <a name="line74"> 74: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line76"> 76: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&N,NULL);
+<a name="line76"> 76: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&N,NULL);
 <a name="line77"> 77: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nBrusselator wave model, n=%D\n\n"</font>,N);
 
 <a name="line79"> 79: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -102,11 +102,11 @@
 <a name="line93"> 93: </a>  <font color="#B22222">/*</font>
 <a name="line94"> 94: </a><font color="#B22222">     Look the command line for user-provided parameters</font>
 <a name="line95"> 95: </a><font color="#B22222">  */</font>
-<a name="line96"> 96: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-L"</font>,&L,NULL);
-<a name="line97"> 97: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-alpha"</font>,&ctx->alpha,NULL);
-<a name="line98"> 98: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-beta"</font>,&ctx->beta,NULL);
-<a name="line99"> 99: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-delta1"</font>,&delta1,NULL);
-<a name="line100">100: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-delta2"</font>,&delta2,NULL);
+<a name="line96"> 96: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-L"</font>,&L,NULL);
+<a name="line97"> 97: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-alpha"</font>,&ctx->alpha,NULL);
+<a name="line98"> 98: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-beta"</font>,&ctx->beta,NULL);
+<a name="line99"> 99: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-delta1"</font>,&delta1,NULL);
+<a name="line100">100: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-delta2"</font>,&delta2,NULL);
 
 <a name="line102">102: </a>  <font color="#B22222">/*</font>
 <a name="line103">103: </a><font color="#B22222">     Create matrix T</font>
@@ -191,7 +191,7 @@
 <a name="line182">182: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line184">184: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line185">185: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line185">185: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line186">186: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line187">187: </a>    <a href="../../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,NULL);
 <a name="line188">188: </a>  } <font color="#4169E1">else</font> {
@@ -210,7 +210,7 @@
 <a name="line201">201: </a>  VecDestroy(&ctx->y2);
 <a name="line202">202: </a>  PetscFree(ctx);
 <a name="line203">203: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line204">204: </a>  <font color="#4169E1">return</font> 0;
+<a name="line204">204: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line205">205: </a>}
 
 <a name="line209">209: </a><strong><font color="#4169E1"><a name="MatMult_Brussel"></a>PetscErrorCode MatMult_Brussel(Mat A,Vec x,Vec y)</font></strong>
diff --git a/src/eps/examples/tutorials/index.html b/src/eps/examples/tutorials/index.html
index 6205b11..ae9a63a 100644
--- a/src/eps/examples/tutorials/index.html
+++ b/src/eps/examples/tutorials/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
@@ -34,5 +34,8 @@ Options can also be set directly in application codes by calling the correspondi
 <a href="ex19.c.html">ex19.c: Standard symmetric eigenproblem for the 3-D Laplacian built with the DM interface</a><br>
 <a href="ex24.c.html">ex24.c: Spectrum folding for a standard symmetric eigenproblem</a><br>
 <a href="ex25.c.html">ex25.c: Spectrum slicing on generalized symmetric eigenproblem</a><br>
+<a href="ex29.c.html">ex29.c: Solves the same problem as in ex5, with a user-defined stopping test</a><br>
+<a href="ex30.c.html">ex30.c: Illustrates the use of a region for filtering; the number of wanted eigenvalues in not known a priori</a><br>
+<a href="ex31.c.html">ex31.c: Power grid small signal stability analysis of WECC 9 bus system</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/eps/examples/tutorials/makefile b/src/eps/examples/tutorials/makefile
index bba7099..2a50e4d 100644
--- a/src/eps/examples/tutorials/makefile
+++ b/src/eps/examples/tutorials/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -25,25 +25,30 @@ CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/eps/examples/tutorials/
 EXAMPLESC  = ex1.c ex2.c ex3.c ex4.c ex5.c ex7.c ex9.c ex10.c ex11.c ex12.c ex13.c \
-             ex18.c ex19.c ex24.c ex25.c
+             ex18.c ex19.c ex24.c ex25.c ex29.c ex30.c ex31.c
 EXAMPLESF  = ex1f.F ex1f90.F90 ex6f.F
 MANSEC     = EPS
 
-TESTEXAMPLES_C                 = ex2.PETSc runex2_1 ex2.rm \
+TESTEXAMPLES_C                 = ex2.PETSc runex2_1 runex2_ciss_1 runex2_ciss_2 ex2.rm \
                                  ex3.PETSc runex3_1 ex3.rm \
                                  ex5.PETSc runex5_1 ex5.rm \
-                                 ex9.PETSc runex9_1 ex9.rm \
+                                 ex9.PETSc runex9_1 runex9_2 ex9.rm \
                                  ex10.PETSc runex10_1 ex10.rm \
                                  ex11.PETSc runex11_1 ex11.rm \
                                  ex12.PETSc runex12_1 ex12.rm \
                                  ex13.PETSc runex13_1 ex13.rm \
                                  ex18.PETSc runex18_1 ex18.rm \
-                                 ex24.PETSc runex24_1 ex24.rm
+                                 ex24.PETSc runex24_1 ex24.rm \
+                                 ex29.PETSc runex29_1 ex29.rm \
+                                 ex30.PETSc runex30_1 ex30.rm
 TESTEXAMPLES_C_NOCOMPLEX       = ex4.PETSc runex4_1 ex4.rm \
                                  ex7.PETSc runex7_1 ex7.rm \
-                                 ex25.PETSc runex25_1 ex25.rm
+                                 ex25.PETSc runex25_1 ex25.rm \
+                                 ex31.PETSc runex31_1 ex31.rm
 TESTEXAMPLES_FORTRAN_NOCOMPLEX = ex6f.PETSc runex6f_1 ex6f.rm
 TESTEXAMPLES_F90               = ex1f90.PETSc runex1f90_1 ex1f90.rm
+TESTEXAMPLES_DATAFILESPATH_COMPLEX = ex4.PETSc runex4_ciss_1 ex4.rm \
+                                 ex7.PETSc runex7_ciss_1 ex7.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -119,121 +124,193 @@ ex25: ex25.o chkopts
 	-${CLINKER} -o ex25 ex25.o ${SLEPC_EPS_LIB}
 	${RM} ex25.o
 
+ex29: ex29.o chkopts
+	-${CLINKER} -o ex29 ex29.o ${SLEPC_EPS_LIB}
+	${RM} ex29.o
+
+ex30: ex30.o chkopts
+	-${CLINKER} -o ex30 ex30.o ${SLEPC_EPS_LIB}
+	${RM} ex30.o
+
+ex31: ex31.o chkopts
+	-${CLINKER} -o ex31 ex31.o ${SLEPC_EPS_LIB}
+	${RM} ex31.o
+
 #------------------------------------------------------------------------------------
 DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 
 runex1_1:
-	-@${MPIEXEC} -np 1 ./ex1 > ex1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex1 > ex1_1.tmp 2>&1; \
 	   if (${DIFF} output/ex1_1.out ex1_1.tmp) then true; \
 	   else echo "Possible problem with ex1_1, diffs above"; fi; \
 	   ${RM} -f ex1_1.tmp
 
 runex1f_1:
-	-@${MPIEXEC} -np 1 ./ex1f > ex1f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex1f > ex1f_1.tmp 2>&1; \
 	   if (${DIFF} output/ex1f_1.out ex1f_1.tmp) then true; \
 	   else echo "Possible problem with ex1f_1, diffs above"; fi; \
 	   ${RM} -f ex1f_1.tmp
 
 runex1f90_1:
-	-@${MPIEXEC} -np 1 ./ex1f90 -eps_nev 4 -terse > ex1f90_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex1f90 -eps_nev 4 -terse > ex1f90_1.tmp 2>&1; \
 	   if (${DIFF} output/ex1f90_1.out ex1f90_1.tmp) then true; \
 	   else echo "Possible problem with ex1f90_1, diffs above"; fi; \
 	   ${RM} -f ex1f90_1.tmp
 
 runex2_1:
-	-@${MPIEXEC} -np 1 ./ex2 -eps_nev 4 -terse > ex2_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex2 -eps_nev 4 -terse > ex2_1.tmp 2>&1; \
 	   if (${DIFF} output/ex2_1.out ex2_1.tmp) then true; \
 	   else echo "Possible problem with ex2_1, diffs above"; fi; \
 	   ${RM} -f ex2_1.tmp
 
+runex2_ciss_1:
+	- at if [ "${PETSC_PRECISION}" != "double" ]; then \
+	   echo "Skipping ex2_ciss_1 test"; \
+	 else \
+	   ${MPIEXEC} -n 1 ./ex2 -n 30 -eps_type ciss -rg_type interval -rg_interval_endpoints 1.1,1.25 -terse > ex2_ciss.tmp 2>&1; \
+	   if (${DIFF} output/ex2_ciss.out ex2_ciss.tmp) then true; \
+	   else echo "Possible problem with ex2_ciss_1, diffs above"; fi; \
+	   ${RM} -f ex2_ciss.tmp; \
+	 fi
+
+runex2_ciss_2:
+	- at if [ "${PETSC_PRECISION}" != "double" ]; then \
+	   echo "Skipping ex2_ciss_2 test"; \
+	 else \
+	   ${MPIEXEC} -n 2 ./ex2 -n 30 -eps_type ciss -rg_type ellipse -rg_ellipse_center 1.175 -rg_ellipse_radius 0.075 -eps_ciss_partitions 2 -terse > ex2_ciss.tmp 2>&1; \
+	   if (${DIFF} output/ex2_ciss.out ex2_ciss.tmp) then true; \
+	   else echo "Possible problem with ex2_ciss_2, diffs above"; fi; \
+	   ${RM} -f ex2_ciss.tmp; \
+	 fi
+
 runex3_1:
-	-@${MPIEXEC} -np 1 ./ex3 -eps_nev 4 -terse > ex3_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex3 -eps_nev 4 -terse > ex3_1.tmp 2>&1; \
 	   if (${DIFF} output/ex3_1.out ex3_1.tmp) then true; \
 	   else echo "Possible problem with ex3_1, diffs above"; fi; \
 	   ${RM} -f ex3_1.tmp
 
 runex4_1:
 	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
-           echo "Skipping ex4 test"; \
-         else \
-           ${MPIEXEC} -np 1 ./ex4 -file ${DATAPATH}/rdb200.petsc -eps_nev 4 -terse > ex4_1.tmp 2>&1; \
+	   echo "Skipping ex4 test"; \
+	 else \
+	   ${MPIEXEC} -n 1 ./ex4 -file ${DATAPATH}/rdb200.petsc -eps_nev 4 -terse > ex4_1.tmp 2>&1; \
 	   if (${DIFF} output/ex4_1.out ex4_1.tmp) then true; \
 	   else echo "Possible problem with ex4_1, diffs above"; fi; \
 	   ${RM} -f ex4_1.tmp; \
-         fi
+	 fi
+
+runex4_ciss_1:
+	-@${MPIEXEC} -n 1 ./ex4 -file $(DATAFILESPATH)/matrices/complex/qc324.petsc -eps_type ciss -rg_type ellipse -rg_ellipse_center -.012-.08i -rg_ellipse_radius .05 -terse > ex4_ciss_1.tmp 2>&1; \
+	   if (${DIFF} output/ex4_ciss_1.out ex4_ciss_1.tmp) then true; \
+	   else echo "Possible problem with ex4_ciss_1, diffs above"; fi; \
+	   ${RM} -f ex4_ciss_1.tmp;
 
 runex5_1:
-	-@${MPIEXEC} -np 1 ./ex5 -st_shift 1 -eps_nev 4 -terse > ex5_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex5 -st_shift 1 -eps_nev 4 -terse > ex5_1.tmp 2>&1; \
 	   if (${DIFF} output/ex5_1.out ex5_1.tmp) then true; \
 	   else echo "Possible problem with ex5_1, diffs above"; fi; \
 	   ${RM} -f ex5_1.tmp
 
 runex6f_1:
-	-@${MPIEXEC} -np 1 ./ex6f -eps_max_it 1000 -eps_ncv 12 -eps_tol 1e-5 -eps_nev 4 -terse > ex6f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex6f -eps_max_it 1000 -eps_ncv 12 -eps_tol 1e-5 -eps_nev 4 -terse > ex6f_1.tmp 2>&1; \
 	   if (${DIFF} output/ex6f_1.out ex6f_1.tmp) then true; \
 	   else echo "Possible problem with ex6f_1, diffs above"; fi; \
 	   ${RM} -f ex6f_1.tmp
 
 runex7_1:
 	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
-           echo "Skipping ex7 test"; \
-         else \
-           ${MPIEXEC} -np 1 ./ex7 -f1 ${DATAPATH}/bfw62a.petsc -f2 ${DATAPATH}/bfw62b.petsc -eps_nev 4 -terse > ex7_1.tmp 2>&1; \
+	   echo "Skipping ex7 test"; \
+	 else \
+           ${MPIEXEC} -n 1 ./ex7 -f1 ${DATAPATH}/bfw62a.petsc -f2 ${DATAPATH}/bfw62b.petsc -eps_nev 4 -terse > ex7_1.tmp 2>&1; \
 	   if (${DIFF} output/ex7_1.out ex7_1.tmp) then true; \
 	   else echo "Possible problem with ex7_1, diffs above"; fi; \
 	   ${RM} -f ex7_1.tmp; \
-         fi
+	 fi
+
+runex7_ciss_1:
+	-@${MPIEXEC} -n 1 ./ex7 -f1 $(DATAFILESPATH)/matrices/complex/mhd1280a.petsc -f2 $(DATAFILESPATH)/matrices/complex/mhd1280b.petsc -eps_type ciss -eps_ciss_usest 0 -eps_ciss_quadrule chebyshev -rg_type ring -rg_ring_center 0 -rg_ring_radius .5 -rg_ring_width 0.2 -rg_ring_startangle .25 -rg_ring_endangle .5 -terse > ex7_ciss_1.tmp 2>&1; \
+	   if (${DIFF} output/ex7_ciss_1.out ex7_ciss_1.tmp) then true; \
+	   else echo "Possible problem with ex7_ciss_1, diffs above"; fi; \
+	   ${RM} -f ex7_ciss_1.tmp;
 
 runex9_1:
-	-@${MPIEXEC} -np 1 ./ex9 -eps_nev 4 -terse > ex9_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex9 -eps_nev 4 -terse > ex9_1.tmp 2>&1; \
 	   if (${DIFF} output/ex9_1.out ex9_1.tmp) then true; \
 	   else echo "Possible problem with ex9_1, diffs above"; fi; \
 	   ${RM} -f ex9_1.tmp
 
+runex9_2:
+	-@${MPIEXEC} -n 1 ./ex9 -eps_nev 8 -eps_max_it 300 -eps_target -28 -rg_type interval -rg_interval_endpoints -40,-20,-.1,.1 -terse > ex9_2.tmp 2>&1; \
+	   if (${DIFF} output/ex9_2.out ex9_2.tmp) then true; \
+	   else echo "Possible problem with ex9_2, diffs above"; fi; \
+	   ${RM} -f ex9_2.tmp
+
 runex10_1:
-	-@${MPIEXEC} -np 1 ./ex10 -eps_nev 4 -st_type shell -terse > ex10_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex10 -eps_nev 5 -st_type shell -terse > ex10_1.tmp 2>&1; \
 	   if (${DIFF} output/ex10_1.out ex10_1.tmp) then true; \
 	   else echo "Possible problem with ex10_1, diffs above"; fi; \
 	   ${RM} -f ex10_1.tmp
 runex11_1:
-	-@${MPIEXEC} -np 1 ./ex11 -eps_nev 4 -terse > ex11_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex11 -eps_nev 4 -terse > ex11_1.tmp 2>&1; \
 	   if (${DIFF} output/ex11_1.out ex11_1.tmp) then true; \
 	   else echo "Possible problem with ex11_1, diffs above"; fi; \
 	   ${RM} -f ex11_1.tmp
 
 runex12_1:
-	-@${MPIEXEC} -np 1 ./ex12 > ex12_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex12 -eps_krylovschur_nev 30 > ex12_1.tmp 2>&1; \
 	   if (${DIFF} output/ex12_1.out ex12_1.tmp) then true; \
 	   else echo "Possible problem with ex12_1, diffs above"; fi; \
 	   ${RM} -f ex12_1.tmp
 
 runex13_1:
-	-@${MPIEXEC} -np 1 ./ex13 -eps_nev 4 -terse > ex13_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex13 -eps_nev 4 -terse > ex13_1.tmp 2>&1; \
 	   if (${DIFF} output/ex13_1.out ex13_1.tmp) then true; \
 	   else echo "Possible problem with ex13_1, diffs above"; fi; \
 	   ${RM} -f ex13_1.tmp
 
 runex18_1:
-	-@${MPIEXEC} -np 1 ./ex18 -eps_nev 4 -terse > ex18_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex18 -eps_nev 4 -terse > ex18_1.tmp 2>&1; \
 	   if (${DIFF} output/ex18_1.out ex18_1.tmp) then true; \
 	   else echo "Possible problem with ex18_1, diffs above"; fi; \
 	   ${RM} -f ex18_1.tmp
 
 runex19_1:
-	-@${MPIEXEC} -np 1 ./ex19 -eps_nev 8 -eps_ncv 64 > ex19_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex19 -eps_nev 8 -eps_ncv 64 > ex19_1.tmp 2>&1; \
 	   if (${DIFF} output/ex19_1.out ex19_1.tmp) then true; \
 	   else echo "Possible problem with ex19_1, diffs above"; fi; \
 	   ${RM} -f ex19_1.tmp
 
 runex24_1:
-	-@${MPIEXEC} -np 1 ./ex24 > ex24_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex24 -n 15 -eps_ncv 20 -terse > ex24_1.tmp 2>&1; \
 	   if (${DIFF} output/ex24_1.out ex24_1.tmp) then true; \
 	   else echo "Possible problem with ex24_1, diffs above"; fi; \
 	   ${RM} -f ex24_1.tmp
 
 runex25_1:
-	-@${MPIEXEC} -np 1 ./ex25 -terse > ex25_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex25 -terse > ex25_1.tmp 2>&1; \
 	   if (${DIFF} output/ex25_1.out ex25_1.tmp) then true; \
 	   else echo "Possible problem with ex25_1, diffs above"; fi; \
 	   ${RM} -f ex25_1.tmp
 
+runex29_1:
+	-@${MPIEXEC} -n 1 ./ex29 -m 350 > ex29_1.tmp 2>&1; \
+	   if (${DIFF} output/ex29_1.out ex29_1.tmp) then true; \
+	   else echo "Possible problem with ex29_1, diffs above"; fi; \
+	   ${RM} -f ex29_1.tmp
+
+runex30_1:
+	-@${MPIEXEC} -n 1 ./ex30 -n 100 -terse > ex30_1.tmp 2>&1; \
+	   if (${DIFF} output/ex30_1.out ex30_1.tmp) then true; \
+	   else echo "Possible problem with ex30_1, diffs above"; fi; \
+	   ${RM} -f ex30_1.tmp
+
+runex31_1:
+	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
+           echo "Skipping ex31 test"; \
+         else \
+	   ${MPIEXEC} -n 1 ./ex31 -terse > ex31_1.tmp 2>&1; \
+	   if (${DIFF} output/ex31_1.out ex31_1.tmp) then true; \
+	   else echo "Possible problem with ex31_1, diffs above"; fi; \
+	   ${RM} -f ex31_1.tmp; \
+         fi
+
diff --git a/src/eps/examples/tutorials/makefile.html b/src/eps/examples/tutorials/makefile.html
index cf09b4b..e7e56a8 100644
--- a/src/eps/examples/tutorials/makefile.html
+++ b/src/eps/examples/tutorials/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:34+00:00">
+<meta name="date" content="2016-05-16T10:33:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -36,25 +36,30 @@ CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/eps/examples/tutorials/
 EXAMPLESC  = ex1.c ex2.c ex3.c ex4.c ex5.c ex7.c ex9.c ex10.c ex11.c ex12.c ex13.c \
-             ex18.c ex19.c ex24.c ex25.c
+             ex18.c ex19.c ex24.c ex25.c ex29.c ex30.c ex31.c
 EXAMPLESF  = ex1f.F ex1f90.F90 ex6f.F
 MANSEC     = <a href="ROOT/docs/manualpages/EPS/EPS.html#EPS">EPS</a>
 
-TESTEXAMPLES_C                 = ex2.PETSc runex2_1 ex2.rm \
+TESTEXAMPLES_C                 = ex2.PETSc runex2_1 runex2_ciss_1 runex2_ciss_2 ex2.rm \
                                  ex3.PETSc runex3_1 ex3.rm \
                                  ex5.PETSc runex5_1 ex5.rm \
-                                 ex9.PETSc runex9_1 ex9.rm \
+                                 ex9.PETSc runex9_1 runex9_2 ex9.rm \
                                  ex10.PETSc runex10_1 ex10.rm \
                                  ex11.PETSc runex11_1 ex11.rm \
                                  ex12.PETSc runex12_1 ex12.rm \
                                  ex13.PETSc runex13_1 ex13.rm \
                                  ex18.PETSc runex18_1 ex18.rm \
-                                 ex24.PETSc runex24_1 ex24.rm
+                                 ex24.PETSc runex24_1 ex24.rm \
+                                 ex29.PETSc runex29_1 ex29.rm \
+                                 ex30.PETSc runex30_1 ex30.rm
 TESTEXAMPLES_C_NOCOMPLEX       = ex4.PETSc runex4_1 ex4.rm \
                                  ex7.PETSc runex7_1 ex7.rm \
-                                 ex25.PETSc runex25_1 ex25.rm
+                                 ex25.PETSc runex25_1 ex25.rm \
+                                 ex31.PETSc runex31_1 ex31.rm
 TESTEXAMPLES_FORTRAN_NOCOMPLEX = ex6f.PETSc runex6f_1 ex6f.rm
 TESTEXAMPLES_F90               = ex1f90.PETSc runex1f90_1 ex1f90.rm
+TESTEXAMPLES_DATAFILESPATH_COMPLEX = ex4.PETSc runex4_ciss_1 ex4.rm \
+                                 ex7.PETSc runex7_ciss_1 ex7.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -130,124 +135,196 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o ex25 ex25.o ${SLEPC_EPS_LIB}
 	${RM} ex25.o
 
+<strong><font color="#FF0000">ex29:</font></strong> ex29.o chkopts
+	-${CLINKER} -o ex29 ex29.o ${SLEPC_EPS_LIB}
+	${RM} ex29.o
+
+<strong><font color="#FF0000">ex30:</font></strong> ex30.o chkopts
+	-${CLINKER} -o ex30 ex30.o ${SLEPC_EPS_LIB}
+	${RM} ex30.o
+
+<strong><font color="#FF0000">ex31:</font></strong> ex31.o chkopts
+	-${CLINKER} -o ex31 ex31.o ${SLEPC_EPS_LIB}
+	${RM} ex31.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 
 <strong><font color="#FF0000">runex1_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex1 > ex1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex1 > ex1_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex1_1.out ex1_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex1_1, diffs above"</font>; fi; \
 	   ${RM} -f ex1_1.tmp
 
 <strong><font color="#FF0000">runex1f_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex1f > ex1f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex1f > ex1f_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex1f_1.out ex1f_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex1f_1, diffs above"</font>; fi; \
 	   ${RM} -f ex1f_1.tmp
 
 <strong><font color="#FF0000">runex1f90_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex1f90 -eps_nev 4 -terse > ex1f90_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex1f90 -eps_nev 4 -terse > ex1f90_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex1f90_1.out ex1f90_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex1f90_1, diffs above"</font>; fi; \
 	   ${RM} -f ex1f90_1.tmp
 
 <strong><font color="#FF0000">runex2_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex2 -eps_nev 4 -terse > ex2_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex2 -eps_nev 4 -terse > ex2_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex2_1.out ex2_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex2_1, diffs above"</font>; fi; \
 	   ${RM} -f ex2_1.tmp
 
+<strong><font color="#FF0000">runex2_ciss_1:</font></strong>
+	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ]; then \
+	   echo <font color="#666666">"Skipping ex2_ciss_1 test"</font>; \
+	 <font color="#4169E1">else</font> \
+	   ${MPIEXEC} -n 1 ./ex2 -n 30 -eps_type ciss -rg_type interval -rg_interval_endpoints 1.1,1.25 -terse > ex2_ciss.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex2_ciss.out ex2_ciss.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex2_ciss_1, diffs above"</font>; fi; \
+	   ${RM} -f ex2_ciss.tmp; \
+	 fi
+
+<strong><font color="#FF0000">runex2_ciss_2:</font></strong>
+	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ]; then \
+	   echo <font color="#666666">"Skipping ex2_ciss_2 test"</font>; \
+	 <font color="#4169E1">else</font> \
+	   ${MPIEXEC} -n 2 ./ex2 -n 30 -eps_type ciss -rg_type ellipse -rg_ellipse_center 1.175 -rg_ellipse_radius 0.075 -eps_ciss_partitions 2 -terse > ex2_ciss.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex2_ciss.out ex2_ciss.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex2_ciss_2, diffs above"</font>; fi; \
+	   ${RM} -f ex2_ciss.tmp; \
+	 fi
+
 <strong><font color="#FF0000">runex3_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex3 -eps_nev 4 -terse > ex3_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex3 -eps_nev 4 -terse > ex3_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex3_1.out ex3_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex3_1, diffs above"</font>; fi; \
 	   ${RM} -f ex3_1.tmp
 
 <strong><font color="#FF0000">runex4_1:</font></strong>
 	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
-           echo <font color="#666666">"Skipping ex4 test"</font>; \
-         <font color="#4169E1">else</font> \
-           ${MPIEXEC} -np 1 ./ex4 -file ${DATAPATH}/rdb200.petsc -eps_nev 4 -terse > ex4_1.tmp 2>&1; \
+	   echo <font color="#666666">"Skipping ex4 test"</font>; \
+	 <font color="#4169E1">else</font> \
+	   ${MPIEXEC} -n 1 ./ex4 -file ${DATAPATH}/rdb200.petsc -eps_nev 4 -terse > ex4_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex4_1.out ex4_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex4_1, diffs above"</font>; fi; \
 	   ${RM} -f ex4_1.tmp; \
-         fi
+	 fi
+
+<strong><font color="#FF0000">runex4_ciss_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex4 -file $(DATAFILESPATH)/matrices/complex/qc324.petsc -eps_type ciss -rg_type ellipse -rg_ellipse_center -.012-.08i -rg_ellipse_radius .05 -terse > ex4_ciss_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex4_ciss_1.out ex4_ciss_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex4_ciss_1, diffs above"</font>; fi; \
+	   ${RM} -f ex4_ciss_1.tmp;
 
 <strong><font color="#FF0000">runex5_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex5 -st_shift 1 -eps_nev 4 -terse > ex5_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex5 -st_shift 1 -eps_nev 4 -terse > ex5_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex5_1.out ex5_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex5_1, diffs above"</font>; fi; \
 	   ${RM} -f ex5_1.tmp
 
 <strong><font color="#FF0000">runex6f_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex6f -eps_max_it 1000 -eps_ncv 12 -eps_tol 1e-5 -eps_nev 4 -terse > ex6f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex6f -eps_max_it 1000 -eps_ncv 12 -eps_tol 1e-5 -eps_nev 4 -terse > ex6f_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex6f_1.out ex6f_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex6f_1, diffs above"</font>; fi; \
 	   ${RM} -f ex6f_1.tmp
 
 <strong><font color="#FF0000">runex7_1:</font></strong>
 	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
-           echo <font color="#666666">"Skipping ex7 test"</font>; \
-         <font color="#4169E1">else</font> \
-           ${MPIEXEC} -np 1 ./ex7 -f1 ${DATAPATH}/bfw62a.petsc -f2 ${DATAPATH}/bfw62b.petsc -eps_nev 4 -terse > ex7_1.tmp 2>&1; \
+	   echo <font color="#666666">"Skipping ex7 test"</font>; \
+	 <font color="#4169E1">else</font> \
+           ${MPIEXEC} -n 1 ./ex7 -f1 ${DATAPATH}/bfw62a.petsc -f2 ${DATAPATH}/bfw62b.petsc -eps_nev 4 -terse > ex7_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex7_1.out ex7_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex7_1, diffs above"</font>; fi; \
 	   ${RM} -f ex7_1.tmp; \
-         fi
+	 fi
+
+<strong><font color="#FF0000">runex7_ciss_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex7 -f1 $(DATAFILESPATH)/matrices/complex/mhd1280a.petsc -f2 $(DATAFILESPATH)/matrices/complex/mhd1280b.petsc -eps_type ciss -eps_ciss_usest 0 -eps_ciss_quadrule chebyshev -rg_type ring -rg_ring_center 0 -rg_ring_radius .5 -rg_ring_width 0.2 -rg_ring_startangle .25 -rg_ring_endangle .5 -terse > ex7_ciss_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex7_ciss_1.out ex7_ciss_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex7_ciss_1, diffs above"</font>; fi; \
+	   ${RM} -f ex7_ciss_1.tmp;
 
 <strong><font color="#FF0000">runex9_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex9 -eps_nev 4 -terse > ex9_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex9 -eps_nev 4 -terse > ex9_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex9_1.out ex9_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex9_1, diffs above"</font>; fi; \
 	   ${RM} -f ex9_1.tmp
 
+<strong><font color="#FF0000">runex9_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex9 -eps_nev 8 -eps_max_it 300 -eps_target -28 -rg_type interval -rg_interval_endpoints -40,-20,-.1,.1 -terse > ex9_2.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex9_2.out ex9_2.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex9_2, diffs above"</font>; fi; \
+	   ${RM} -f ex9_2.tmp
+
 <strong><font color="#FF0000">runex10_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex10 -eps_nev 4 -st_type shell -terse > ex10_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex10 -eps_nev 5 -st_type shell -terse > ex10_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex10_1.out ex10_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex10_1, diffs above"</font>; fi; \
 	   ${RM} -f ex10_1.tmp
 <strong><font color="#FF0000">runex11_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex11 -eps_nev 4 -terse > ex11_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex11 -eps_nev 4 -terse > ex11_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex11_1.out ex11_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex11_1, diffs above"</font>; fi; \
 	   ${RM} -f ex11_1.tmp
 
 <strong><font color="#FF0000">runex12_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex12 > ex12_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex12 -eps_krylovschur_nev 30 > ex12_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex12_1.out ex12_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex12_1, diffs above"</font>; fi; \
 	   ${RM} -f ex12_1.tmp
 
 <strong><font color="#FF0000">runex13_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex13 -eps_nev 4 -terse > ex13_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex13 -eps_nev 4 -terse > ex13_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex13_1.out ex13_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex13_1, diffs above"</font>; fi; \
 	   ${RM} -f ex13_1.tmp
 
 <strong><font color="#FF0000">runex18_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex18 -eps_nev 4 -terse > ex18_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex18 -eps_nev 4 -terse > ex18_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex18_1.out ex18_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex18_1, diffs above"</font>; fi; \
 	   ${RM} -f ex18_1.tmp
 
 <strong><font color="#FF0000">runex19_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex19 -eps_nev 8 -eps_ncv 64 > ex19_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex19 -eps_nev 8 -eps_ncv 64 > ex19_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex19_1.out ex19_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex19_1, diffs above"</font>; fi; \
 	   ${RM} -f ex19_1.tmp
 
 <strong><font color="#FF0000">runex24_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex24 > ex24_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex24 -n 15 -eps_ncv 20 -terse > ex24_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex24_1.out ex24_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex24_1, diffs above"</font>; fi; \
 	   ${RM} -f ex24_1.tmp
 
 <strong><font color="#FF0000">runex25_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex25 -terse > ex25_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex25 -terse > ex25_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex25_1.out ex25_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex25_1, diffs above"</font>; fi; \
 	   ${RM} -f ex25_1.tmp
 
+<strong><font color="#FF0000">runex29_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex29 -m 350 > ex29_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex29_1.out ex29_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex29_1, diffs above"</font>; fi; \
+	   ${RM} -f ex29_1.tmp
+
+<strong><font color="#FF0000">runex30_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex30 -n 100 -terse > ex30_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex30_1.out ex30_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex30_1, diffs above"</font>; fi; \
+	   ${RM} -f ex30_1.tmp
+
+<strong><font color="#FF0000">runex31_1:</font></strong>
+	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
+           echo <font color="#666666">"Skipping ex31 test"</font>; \
+         <font color="#4169E1">else</font> \
+	   ${MPIEXEC} -n 1 ./ex31 -terse > ex31_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex31_1.out ex31_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex31_1, diffs above"</font>; fi; \
+	   ${RM} -f ex31_1.tmp; \
+         fi
+
 </pre>
 </body>
 
diff --git a/src/eps/examples/tutorials/output/ex10_1.out b/src/eps/examples/tutorials/output/ex10_1.out
index 8ae82eb..c19615e 100644
--- a/src/eps/examples/tutorials/output/ex10_1.out
+++ b/src/eps/examples/tutorials/output/ex10_1.out
@@ -3,7 +3,7 @@
 
  Solution method: krylovschur
 
- Number of requested eigenvalues: 4
+ Number of requested eigenvalues: 5
  All requested eigenvalues computed up to the required tolerance:
-     0.01026, 0.04094, 0.09172, 0.16208
+     0.01026, 0.04094, 0.09172, 0.16208, 0.25131
 
diff --git a/src/eps/examples/tutorials/output/ex12_1.out b/src/eps/examples/tutorials/output/ex12_1.out
index 9e6c593..9e405f9 100644
--- a/src/eps/examples/tutorials/output/ex12_1.out
+++ b/src/eps/examples/tutorials/output/ex12_1.out
@@ -1,13 +1,13 @@
 
 Symmetric-definite problem with two intervals, N=1225 (35x35 grid)
 
- Found 92 eigenvalues in interval [1,1.3]
- Used 4 shifts (inertia):
- .. 1 (218)
- .. 1.14226 (261)
- .. 1.28869 (306)
+ Found 58 eigenvalues in interval [1.1,1.3]
+ Used 3 shifts (inertia):
+ .. 1.1 (252)
+ .. 1.2 (280)
  .. 1.3 (310)
  Found 38 eigenvalues in interval [1.5,1.6]
- Used 2 shifts (inertia):
+ Used 3 shifts (inertia):
  .. 1.5 (376)
+ .. 1.55 (392)
  .. 1.6 (414)
diff --git a/src/eps/examples/tutorials/output/ex18_1.out b/src/eps/examples/tutorials/output/ex18_1.out
index d074218..1ae2d50 100644
--- a/src/eps/examples/tutorials/output/ex18_1.out
+++ b/src/eps/examples/tutorials/output/ex18_1.out
@@ -6,5 +6,5 @@ Searching closest eigenvalues to the right of 0.5.
 
  Number of requested eigenvalues: 4
  All requested eigenvalues computed up to the required tolerance:
-     0.57028, 0.57143, 0.63056, 0.70232
+     0.51928, 0.55740, 0.57028, 0.57143
 
diff --git a/src/eps/examples/tutorials/output/ex24_1.out b/src/eps/examples/tutorials/output/ex24_1.out
index 32a3fed..bf501f5 100644
--- a/src/eps/examples/tutorials/output/ex24_1.out
+++ b/src/eps/examples/tutorials/output/ex24_1.out
@@ -1,12 +1,8 @@
 
-Spectrum Folding, N=100 (10x10 grid) target=2.100000
+Spectrum Folding, N=225 (15x15 grid) target=2.100000
 
- Number of iterations of the method: 25
  Solution method: krylovschur
 
  Number of converged eigenpairs: 1
 
-           k              ||Ax-kx||
-   ----------------- ------------------
-       2.032863            1.4e-11
-
+ nconv=1 eigenvalues computed up to the required tolerance: 2.12349
diff --git a/src/eps/examples/tutorials/output/ex25_1.out b/src/eps/examples/tutorials/output/ex25_1.out
index df35c41..86e2e10 100644
--- a/src/eps/examples/tutorials/output/ex25_1.out
+++ b/src/eps/examples/tutorials/output/ex25_1.out
@@ -4,6 +4,6 @@ Spectrum slicing on GHEP, N=100 (10x10 grid)
  Solution method: krylovschur
 
  3 eigenvalues found in [0.1, 0.2]
- All requested eigenvalues computed up to the required tolerance:
+ Found 3 eigenvalues, all of them computed up to the required tolerance:
      0.15875, 0.19282, 0.19282
 
diff --git a/src/eps/examples/tutorials/output/ex29_1.out b/src/eps/examples/tutorials/output/ex29_1.out
new file mode 100644
index 0000000..a0f7d37
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex29_1.out
@@ -0,0 +1,5 @@
+
+Markov Model, N=61425 (m=350)
+Maximum time for computation is set to 2.5 seconds.
+
+Eigensolve finished with 0 converged eigenpairs; reason=CONVERGED_USER
diff --git a/src/eps/examples/tutorials/output/ex2_ciss.out b/src/eps/examples/tutorials/output/ex2_ciss.out
new file mode 100644
index 0000000..ca263a8
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex2_ciss.out
@@ -0,0 +1,10 @@
+
+2-D Laplacian Eigenproblem, N=900 (30x30 grid)
+
+ Solution method: ciss
+
+ Number of requested eigenvalues: 1
+ Found 15 eigenvalues, all of them computed up to the required tolerance:
+     1.10416, 1.10416, 1.10455, 1.10455, 1.12947, 1.12947, 1.13426, 1.13426, 
+     1.16015, 1.16015, 1.19338, 1.19338, 1.21093, 1.21093, 1.24413
+
diff --git a/src/eps/examples/tutorials/output/ex30_1.out b/src/eps/examples/tutorials/output/ex30_1.out
new file mode 100644
index 0000000..3337959
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex30_1.out
@@ -0,0 +1,4 @@
+
+Brusselator wave model, n=100
+
+ Linear eigensolve converged (20 eigenpairs) due to CONVERGED_USER; iterations 26
diff --git a/src/eps/examples/tutorials/output/ex31_1.out b/src/eps/examples/tutorials/output/ex31_1.out
new file mode 100644
index 0000000..676e6e4
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex31_1.out
@@ -0,0 +1,10 @@
+
+Stability analysis in a network with 9 buses and 3 generators
+
+ Number of iterations of the eigensolver: 1
+ Solution method: krylovschur
+
+ Number of requested eigenvalues: 1
+ All requested eigenvalues computed up to the required tolerance:
+     -1.44091+17.35854i
+
diff --git a/src/eps/examples/tutorials/output/ex4_ciss_1.out b/src/eps/examples/tutorials/output/ex4_ciss_1.out
new file mode 100644
index 0000000..c61dd85
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex4_ciss_1.out
@@ -0,0 +1,12 @@
+
+Eigenproblem stored in file.
+
+ Reading COMPLEX matrix from a binary file...
+ Number of iterations of the method: 1
+ Solution method: ciss
+
+ Number of requested eigenvalues: 1
+ Stopping condition: tol=1e-08, maxit=1
+ Found 4 eigenvalues, all of them computed up to the required tolerance:
+     -0.04079-0.04791i, -0.04021-0.07188i, -0.03153-0.05665i, 0.00464-0.07540i
+
diff --git a/src/eps/examples/tutorials/output/ex7_ciss_1.out b/src/eps/examples/tutorials/output/ex7_ciss_1.out
new file mode 100644
index 0000000..930e86b
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex7_ciss_1.out
@@ -0,0 +1,14 @@
+
+Generalized eigenproblem stored in file.
+
+ Reading COMPLEX matrices from binary files...
+ Number of iterations of the method: 1
+ Number of linear iterations of the method: 0
+ Solution method: ciss
+
+ Number of requested eigenvalues: 1
+ Stopping condition: tol=1e-08, maxit=1
+ Found 14 eigenvalues, all of them computed up to the required tolerance:
+     -0.52247+0.13601i, -0.45897+0.29122i, -0.39887+0.37515i, -0.34178+0.43306i, -0.28745+0.47540i, -0.23601+0.50651i, -0.18794+0.52882i, -0.14379+0.54411i, 
+     -0.10350+0.55413i, -0.07225+0.56125i, -0.06688+0.58413i, -0.05186+0.54060i, -0.02676+0.51734i, -0.01613+0.47357i
+
diff --git a/src/eps/examples/tutorials/output/ex9_2.out b/src/eps/examples/tutorials/output/ex9_2.out
new file mode 100644
index 0000000..39786e6
--- /dev/null
+++ b/src/eps/examples/tutorials/output/ex9_2.out
@@ -0,0 +1,9 @@
+
+Brusselator wave model, n=30
+
+ Solution method: krylovschur
+
+ Number of requested eigenvalues: 8
+ All requested eigenvalues computed up to the required tolerance:
+     -27.77623, -25.84906, -30.25342, -30.89832, -32.93745, -35.71808, -37.44109, -38.53184
+
diff --git a/src/eps/f90-mod/index.html b/src/eps/f90-mod/index.html
index e9f7878..c7ce8e5 100644
--- a/src/eps/f90-mod/index.html
+++ b/src/eps/f90-mod/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/f90-mod/makefile b/src/eps/f90-mod/makefile
index 522aa14..cab14bb 100644
--- a/src/eps/f90-mod/makefile
+++ b/src/eps/f90-mod/makefile
@@ -1,7 +1,7 @@
 
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/f90-mod/makefile.html b/src/eps/f90-mod/makefile.html
index 25e98d1..2e03f89 100644
--- a/src/eps/f90-mod/makefile.html
+++ b/src/eps/f90-mod/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/f90-mod/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:34+00:00">
+<meta name="date" content="2016-05-16T10:33:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80">
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/f90-mod/slepcepsmod.F b/src/eps/f90-mod/slepcepsmod.F
index 5434910..7f9201f 100644
--- a/src/eps/f90-mod/slepcepsmod.F
+++ b/src/eps/f90-mod/slepcepsmod.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
diff --git a/src/eps/f90-mod/slepcepsmod.F.html b/src/eps/f90-mod/slepcepsmod.F.html
index 39ec327..657b14c 100644
--- a/src/eps/f90-mod/slepcepsmod.F.html
+++ b/src/eps/f90-mod/slepcepsmod.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/f90-mod/slepcepsmod.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:34+00:00">
+<meta name="date" content="2016-05-16T10:33:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/f90-mod/slepcepsmod.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/f90-mod/slepcepsmod.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
diff --git a/src/eps/impls/cg/index.html b/src/eps/impls/cg/index.html
index 52ca5f0..28098e2 100644
--- a/src/eps/impls/cg/index.html
+++ b/src/eps/impls/cg/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/cg/lobpcg/ftn-auto/lobpcgf.c b/src/eps/impls/cg/lobpcg/ftn-auto/lobpcgf.c
index 64a0b5c..54aac86 100644
--- a/src/eps/impls/cg/lobpcg/ftn-auto/lobpcgf.c
+++ b/src/eps/impls/cg/lobpcg/ftn-auto/lobpcgf.c
@@ -28,7 +28,6 @@ extern void PetscRmPointer(void*);
 #endif
 
 #include "slepceps.h"
-#include "slepcds.h"
 #ifdef PETSC_HAVE_FORTRAN_CAPS
 #define epslobpcgsetblocksize_ EPSLOBPCGSETBLOCKSIZE
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
@@ -40,6 +39,16 @@ extern void PetscRmPointer(void*);
 #define epslobpcggetblocksize_ epslobpcggetblocksize
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epslobpcgsetrestart_ EPSLOBPCGSETRESTART
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epslobpcgsetrestart_ epslobpcgsetrestart
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epslobpcggetrestart_ EPSLOBPCGGETRESTART
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epslobpcggetrestart_ epslobpcggetrestart
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define epslobpcgsetlocking_ EPSLOBPCGSETLOCKING
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define epslobpcgsetlocking_ epslobpcgsetlocking
@@ -63,6 +72,14 @@ PETSC_EXTERN void PETSC_STDCALL  epslobpcggetblocksize_(EPS eps,PetscInt *bs, in
 *__ierr = EPSLOBPCGGetBlockSize(
 	(EPS)PetscToPointer((eps) ),bs);
 }
+PETSC_EXTERN void PETSC_STDCALL  epslobpcgsetrestart_(EPS eps,PetscReal *restart, int *__ierr ){
+*__ierr = EPSLOBPCGSetRestart(
+	(EPS)PetscToPointer((eps) ),*restart);
+}
+PETSC_EXTERN void PETSC_STDCALL  epslobpcggetrestart_(EPS eps,PetscReal *restart, int *__ierr ){
+*__ierr = EPSLOBPCGGetRestart(
+	(EPS)PetscToPointer((eps) ),restart);
+}
 PETSC_EXTERN void PETSC_STDCALL  epslobpcgsetlocking_(EPS eps,PetscBool *lock, int *__ierr ){
 *__ierr = EPSLOBPCGSetLocking(
 	(EPS)PetscToPointer((eps) ),*lock);
diff --git a/src/eps/impls/cg/lobpcg/index.html b/src/eps/impls/cg/lobpcg/index.html
index 82d965b..223c531 100644
--- a/src/eps/impls/cg/lobpcg/index.html
+++ b/src/eps/impls/cg/lobpcg/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/lobpcg/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/lobpcg/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/cg/lobpcg/lobpcg.c b/src/eps/impls/cg/lobpcg/lobpcg.c
index 14624b7..96a55d1 100644
--- a/src/eps/impls/cg/lobpcg/lobpcg.c
+++ b/src/eps/impls/cg/lobpcg/lobpcg.c
@@ -21,7 +21,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,11 +40,11 @@
 */
 
 #include <slepc/private/epsimpl.h>                /*I "slepceps.h" I*/
-#include <slepc/private/dsimpl.h>                 /*I "slepcds.h" I*/
 
 typedef struct {
-  PetscInt  bs;     /* block size */
-  PetscBool lock;   /* soft locking active/inactive */
+  PetscInt  bs;        /* block size */
+  PetscBool lock;      /* soft locking active/inactive */
+  PetscReal restart;   /* restart parameter */
 } EPS_LOBPCG;
 
 #undef __FUNCT__
@@ -85,6 +85,8 @@ PetscErrorCode EPSSetUp_LOBPCG(EPS eps)
   ierr = RGIsTrivial(eps->rg,&istrivial);CHKERRQ(ierr);
   if (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"This solver does not support region filtering");
 
+  if (!ctx->restart) ctx->restart = 0.9;
+
   ierr = STSetUp(eps->st);CHKERRQ(ierr);
   ierr = PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&precond);CHKERRQ(ierr);
   if (!precond) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"LOBPCG only works with precond ST");
@@ -103,8 +105,9 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
 {
   PetscErrorCode ierr;
   EPS_LOBPCG     *ctx = (EPS_LOBPCG*)eps->data;
-  PetscInt       i,j,k,ld,nv,ini,kini,nmat,nc,nconv,bdone,its;
+  PetscInt       i,j,k,ld,nv,ini,kini,nmat,nc,nconv,locked,guard,its;
   PetscReal      norm;
+  PetscScalar    *eigr;
   PetscBool      breakdown,countc;
   Mat            A,B,M;
   Vec            v,w=eps->work[0];
@@ -117,7 +120,10 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
   if (nmat>1) { ierr = STGetOperators(eps->st,1,&B);CHKERRQ(ierr); }
   else B = NULL;
 
+  guard = (PetscInt)((1.0-ctx->restart)*ctx->bs);  /* number of guard vectors */
+
   /* 1. Allocate memory */
+  ierr = PetscCalloc1(3*ctx->bs,&eigr);CHKERRQ(ierr);
   ierr = BVDuplicateResize(eps->V,3*ctx->bs,&Z);CHKERRQ(ierr);
   ierr = BVDuplicateResize(eps->V,ctx->bs,&X);CHKERRQ(ierr);
   ierr = BVDuplicateResize(eps->V,ctx->bs,&R);CHKERRQ(ierr);
@@ -127,7 +133,7 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
     ierr = BVDuplicateResize(eps->V,ctx->bs,&BX);CHKERRQ(ierr);
   }
   nc = eps->nds;
-  if (nc>0 || eps->nev>ctx->bs) {
+  if (nc>0 || eps->nev>ctx->bs-guard) {
     ierr = BVDuplicateResize(eps->V,nc+eps->nev,&Y);CHKERRQ(ierr);
   }
   if (nc>0) {
@@ -141,8 +147,8 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
 
   /* 2. Apply the constraints to the initial vectors */
   kini = eps->nini;
-  while (kini<eps->ncv-2*ctx->bs) { /* Generate more initial vectors if necessary */
-    ierr = BVSetRandomColumn(eps->V,kini,eps->rand);CHKERRQ(ierr);
+  while (kini<eps->ncv-ctx->bs) { /* Generate more initial vectors if necessary */
+    ierr = BVSetRandomColumn(eps->V,kini);CHKERRQ(ierr);
     ierr = BVOrthogonalizeColumn(eps->V,kini,NULL,&norm,&breakdown);CHKERRQ(ierr);
     if (norm>0.0 && !breakdown) {
       ierr = BVScaleColumn(eps->V,kini,1.0/norm);CHKERRQ(ierr);
@@ -156,9 +162,6 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
   ierr = BVCopy(Z,X);CHKERRQ(ierr);
 
   /* 3. B-orthogonalize initial vectors */
-  if (B) {
-    ierr = BVMatMult(X,B,BX);CHKERRQ(ierr);
-  }
 
   /* 4. Compute initial Ritz vectors */
   ierr = BVMatMult(X,A,AX);CHKERRQ(ierr);
@@ -168,8 +171,8 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
   ierr = DSRestoreMat(eps->ds,DS_MAT_A,&M);CHKERRQ(ierr);
   ierr = DSSetIdentity(eps->ds,DS_MAT_B);CHKERRQ(ierr);
   ierr = DSSetState(eps->ds,DS_STATE_RAW);CHKERRQ(ierr);
-  ierr = DSSolve(eps->ds,eps->eigr,eps->eigi);CHKERRQ(ierr);
-  ierr = DSSort(eps->ds,eps->eigr,eps->eigi,NULL,NULL,NULL);CHKERRQ(ierr);
+  ierr = DSSolve(eps->ds,eps->eigr,NULL);CHKERRQ(ierr);
+  ierr = DSSort(eps->ds,eps->eigr,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
   ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
   ierr = DSGetMat(eps->ds,DS_MAT_X,&M);CHKERRQ(ierr);
   ierr = BVMultInPlace(X,M,0,nv);CHKERRQ(ierr);
@@ -177,9 +180,9 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
   ierr = DSRestoreMat(eps->ds,DS_MAT_X,&M);CHKERRQ(ierr);
 
   /* 5. Initialize range of active iterates */
-  bdone = 0;  /* finished blocks, the leading bdone*bs columns of V are eigenvectors */
-  nconv = 0;  /* number of converged eigenvalues in the current block */
-  its   = 0;  /* iterations for the current block */
+  locked = 0;  /* hard-locked vectors, the leading locked columns of V are eigenvectors */
+  nconv  = 0;  /* number of converged eigenvalues in the current block */
+  its    = 0;  /* iterations for the current block */
 
   /* 6. Main loop */
   while (eps->reason == EPS_CONVERGED_ITERATING) {
@@ -196,6 +199,7 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
     ierr = DSGetMat(eps->ds,DS_MAT_A,&M);CHKERRQ(ierr);
     ierr = BVCopy(AX,R);CHKERRQ(ierr);
     if (B) {
+      ierr = BVMatMult(X,B,BX);CHKERRQ(ierr);
       ierr = BVMult(R,-1.0,1.0,BX,M);CHKERRQ(ierr);
     } else {
       ierr = BVMult(R,-1.0,1.0,X,M);CHKERRQ(ierr);
@@ -207,7 +211,7 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
     k = ini;
     countc = PETSC_TRUE;
     for (j=ini;j<ctx->bs;j++) {
-      i = bdone*ctx->bs+j;
+      i = locked+j;
       ierr = BVGetColumn(R,j,&v);CHKERRQ(ierr);
       ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
       ierr = BVRestoreColumn(R,j,&v);CHKERRQ(ierr);
@@ -219,66 +223,71 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
       if (!countc && !eps->trackall) break;
     }
     nconv = k;
-    eps->nconv = bdone*ctx->bs + nconv;
-    if (eps->its+its) {
-      ierr = EPSMonitor(eps,eps->its+its,eps->nconv,eps->eigr,eps->eigi,eps->errest,(bdone+1)*ctx->bs);CHKERRQ(ierr);
-    }
-    if (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-    else if (eps->its+its >= eps->max_it) {
-      eps->its += its;
-      eps->reason = EPS_DIVERGED_ITS;
+    eps->nconv = locked + nconv;
+    if (its) {
+      ierr = EPSMonitor(eps,eps->its+its,eps->nconv,eps->eigr,eps->eigi,eps->errest,locked+ctx->bs);CHKERRQ(ierr);
     }
-    if (eps->reason != EPS_CONVERGED_ITERATING || nconv == ctx->bs) {
-      ierr = BVSetActiveColumns(eps->V,bdone*ctx->bs,eps->nconv);CHKERRQ(ierr);
-      ierr = BVSetActiveColumns(Z,0,nconv);CHKERRQ(ierr);
+    ierr = (*eps->stopping)(eps,eps->its+its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
+    if (eps->reason != EPS_CONVERGED_ITERATING || nconv >= ctx->bs-guard) {
+      ierr = BVSetActiveColumns(eps->V,locked,eps->nconv);CHKERRQ(ierr);
       ierr = BVSetActiveColumns(X,0,nconv);CHKERRQ(ierr);
       ierr = BVCopy(X,eps->V);CHKERRQ(ierr);
-      ierr = BVCopy(X,Z);CHKERRQ(ierr);
     }
     if (eps->reason != EPS_CONVERGED_ITERATING) {
       eps->its += its;
       break;
-    } else if (nconv == ctx->bs) {
+    } else if (nconv >= ctx->bs-guard) {
       eps->its += its;
       its = 0;
-    }
-    its++;
+    } else its++;
 
-    if (nconv == ctx->bs) {  /* block finished: lock eigenvectors and compute new R */
+    if (nconv >= ctx->bs-guard) {  /* force hard locking of vectors and compute new R */
 
       /* extend constraints */
-      ierr = BVSetActiveColumns(Y,nc+bdone*ctx->bs,nc+(bdone+1)*ctx->bs);CHKERRQ(ierr);
-      ierr = BVCopy(Z,Y);CHKERRQ(ierr);
-      for (j=0;j<ctx->bs;j++) {
-        ierr = BVOrthogonalizeColumn(Y,nc+bdone*ctx->bs+j,NULL,&norm,&breakdown);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(Y,nc+locked,nc+locked+nconv);CHKERRQ(ierr);
+      ierr = BVCopy(X,Y);CHKERRQ(ierr);
+      for (j=0;j<nconv;j++) {
+        ierr = BVOrthogonalizeColumn(Y,nc+locked+j,NULL,&norm,&breakdown);CHKERRQ(ierr);
         if (norm>0.0 && !breakdown) {
-          ierr = BVScaleColumn(Y,nc+bdone*ctx->bs+j,1.0/norm);CHKERRQ(ierr);
+          ierr = BVScaleColumn(Y,nc+locked+j,1.0/norm);CHKERRQ(ierr);
         } else SETERRQ(PetscObjectComm((PetscObject)eps),1,"Orthogonalization of constraints failed");
       }
-      ierr = BVSetActiveColumns(Y,0,nc+(bdone+1)*ctx->bs);CHKERRQ(ierr);
-
-      bdone++;
-      nconv = 0;
+      ierr = BVSetActiveColumns(Y,0,nc+locked+nconv);CHKERRQ(ierr);
+
+      /* shift work BV's */
+      for (j=nconv;j<ctx->bs;j++) {
+        ierr = BVCopyColumn(X,j,j-nconv);CHKERRQ(ierr);
+        ierr = BVCopyColumn(R,j,j-nconv);CHKERRQ(ierr);
+        ierr = BVCopyColumn(P,j,j-nconv);CHKERRQ(ierr);
+        ierr = BVCopyColumn(AX,j,j-nconv);CHKERRQ(ierr);
+        if (B) {
+          ierr = BVCopyColumn(BX,j,j-nconv);CHKERRQ(ierr);
+        }
+      }
 
       /* set new initial vectors */
-      ierr = BVSetActiveColumns(eps->V,bdone*ctx->bs,(bdone+1)*ctx->bs);CHKERRQ(ierr);
-      ierr = BVCopy(eps->V,Z);CHKERRQ(ierr);
-      for (j=0;j<ctx->bs;j++) {
-        ierr = BVGetColumn(Z,j,&v);CHKERRQ(ierr);
-        ierr = BVOrthogonalizeVec(Y,v,NULL,NULL,NULL);CHKERRQ(ierr);
-        ierr = VecNormalize(v,NULL);CHKERRQ(ierr);
-        ierr = BVRestoreColumn(Z,j,&v);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(eps->V,locked+ctx->bs,locked+ctx->bs+nconv);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(X,ctx->bs-nconv,ctx->bs);CHKERRQ(ierr);
+      ierr = BVCopy(eps->V,X);CHKERRQ(ierr);
+      for (j=ctx->bs-nconv;j<ctx->bs;j++) {
+        ierr = BVGetColumn(X,j,&v);CHKERRQ(ierr);
+        ierr = BVOrthogonalizeVec(Y,v,NULL,&norm,&breakdown);CHKERRQ(ierr);
+        if (norm>0.0 && !breakdown) {
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+        } else SETERRQ(PetscObjectComm((PetscObject)eps),1,"Orthogonalization of initial vector failed");
+        ierr = BVRestoreColumn(X,j,&v);CHKERRQ(ierr);
       }
+      locked += nconv;
+      nconv = 0;
       ierr = BVSetActiveColumns(X,nconv,ctx->bs);CHKERRQ(ierr);
-      ierr = BVSetActiveColumns(AX,nconv,ctx->bs);CHKERRQ(ierr);
-      ierr = BVCopy(Z,X);CHKERRQ(ierr);
 
       /* B-orthogonalize initial vectors */
-      if (B) {
-        ierr = BVOrthogonalize(X,NULL);CHKERRQ(ierr);
-      }
+      ierr = BVOrthogonalize(X,NULL);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(Z,nconv,ctx->bs);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(AX,nconv,ctx->bs);CHKERRQ(ierr);
+      ierr = BVCopy(X,Z);CHKERRQ(ierr);
 
-      /* Compute initial Ritz vectors */
+      /* compute initial Ritz vectors */
       nv = ctx->bs;
       ierr = BVMatMult(X,A,AX);CHKERRQ(ierr);
       ierr = DSSetDimensions(eps->ds,nv,0,0,0);CHKERRQ(ierr);
@@ -287,34 +296,16 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
       ierr = DSRestoreMat(eps->ds,DS_MAT_A,&M);CHKERRQ(ierr);
       ierr = DSSetIdentity(eps->ds,DS_MAT_B);CHKERRQ(ierr);
       ierr = DSSetState(eps->ds,DS_STATE_RAW);CHKERRQ(ierr);
-      ierr = DSSolve(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi);CHKERRQ(ierr);
-      ierr = DSSort(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi,NULL,NULL,NULL);CHKERRQ(ierr);
+      ierr = DSSolve(eps->ds,eigr,NULL);CHKERRQ(ierr);
+      ierr = DSSort(eps->ds,eigr,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+      for (j=0;j<nv;j++) if (locked+j<eps->ncv) eps->eigr[locked+j] = eigr[j];
       ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
       ierr = DSGetMat(eps->ds,DS_MAT_X,&M);CHKERRQ(ierr);
       ierr = BVMultInPlace(X,M,0,nv);CHKERRQ(ierr);
       ierr = BVMultInPlace(AX,M,0,nv);CHKERRQ(ierr);
       ierr = DSRestoreMat(eps->ds,DS_MAT_X,&M);CHKERRQ(ierr);
 
-      ierr = EPSMonitor(eps,eps->its+its-1,eps->nconv,eps->eigr,eps->eigi,eps->errest,(bdone+1)*ctx->bs);CHKERRQ(ierr);
-
-      if (ctx->lock) {
-        ierr = BVSetActiveColumns(R,nconv,ctx->bs);CHKERRQ(ierr);
-        ierr = BVSetActiveColumns(AX,nconv,ctx->bs);CHKERRQ(ierr);
-        if (B) {
-          ierr = BVSetActiveColumns(BX,nconv,ctx->bs);CHKERRQ(ierr);
-        }
-      }
-
-      /* compute residuals */
-      ierr = DSGetMat(eps->ds,DS_MAT_A,&M);CHKERRQ(ierr);
-      ierr = BVCopy(AX,R);CHKERRQ(ierr);
-      if (B) {
-        ierr = BVMatMult(X,B,BX);CHKERRQ(ierr);
-        ierr = BVMult(R,-1.0,1.0,BX,M);CHKERRQ(ierr);
-      } else {
-        ierr = BVMult(R,-1.0,1.0,X,M);CHKERRQ(ierr);
-      }
-      ierr = DSRestoreMat(eps->ds,DS_MAT_A,&M);CHKERRQ(ierr);
+      continue;   /* skip the rest of the iteration */
     }
 
     ini = (ctx->lock)? nconv: 0;
@@ -331,9 +322,11 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
     for (j=ini;j<ctx->bs;j++) {
       ierr = BVGetColumn(R,j,&v);CHKERRQ(ierr);
       ierr = STMatSolve(eps->st,v,w);CHKERRQ(ierr);
-      if (nc+bdone*ctx->bs>0) {
-        ierr = BVOrthogonalizeVec(Y,w,NULL,NULL,NULL);CHKERRQ(ierr);
-        ierr = VecNormalize(w,NULL);CHKERRQ(ierr);
+      if (nc+locked>0) {
+        ierr = BVOrthogonalizeVec(Y,w,NULL,&norm,&breakdown);CHKERRQ(ierr);
+        if (norm>0.0 && !breakdown) {
+          ierr = VecScale(w,1.0/norm);CHKERRQ(ierr);
+        } else SETERRQ(PetscObjectComm((PetscObject)eps),1,"Orthogonalization of preconditioned residual failed");
       }
       ierr = VecCopy(w,v);CHKERRQ(ierr);
       ierr = BVRestoreColumn(R,j,&v);CHKERRQ(ierr);
@@ -376,8 +369,9 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
     
     /* 24. Solve the generalized eigenvalue problem */
     ierr = DSSetState(eps->ds,DS_STATE_RAW);CHKERRQ(ierr);
-    ierr = DSSolve(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi);CHKERRQ(ierr);
-    ierr = DSSort(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi,NULL,NULL,NULL);CHKERRQ(ierr);
+    ierr = DSSolve(eps->ds,eigr,NULL);CHKERRQ(ierr);
+    ierr = DSSort(eps->ds,eigr,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+    for (j=0;j<nv;j++) if (locked+j<eps->ncv) eps->eigr[locked+j] = eigr[j];
     ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
     
     /* 25-33. Compute Ritz vectors */
@@ -397,12 +391,10 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
       ierr = BVSetActiveColumns(X,nconv,ctx->bs);CHKERRQ(ierr);
     }
     ierr = BVMatMult(X,A,AX);CHKERRQ(ierr);
-    if (B) {
-      ierr = BVMatMult(X,B,BX);CHKERRQ(ierr);
-    }
     ierr = DSRestoreMat(eps->ds,DS_MAT_X,&M);CHKERRQ(ierr);
   }
 
+  ierr = PetscFree(eigr);CHKERRQ(ierr);
   ierr = BVDestroy(&Z);CHKERRQ(ierr);
   ierr = BVDestroy(&X);CHKERRQ(ierr);
   ierr = BVDestroy(&R);CHKERRQ(ierr);
@@ -411,7 +403,7 @@ PetscErrorCode EPSSolve_LOBPCG(EPS eps)
   if (B) {
     ierr = BVDestroy(&BX);CHKERRQ(ierr);
   }
-  if (nc>0 || eps->nev>ctx->bs) {
+  if (nc>0 || eps->nev>ctx->bs-guard) {
     ierr = BVDestroy(&Y);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
@@ -492,7 +484,96 @@ PetscErrorCode EPSLOBPCGGetBlockSize(EPS eps,PetscInt *bs)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(bs,2);
-  ierr = PetscTryMethod(eps,"EPSLOBPCGGetBlockSize_C",(EPS,PetscInt*),(eps,bs));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSLOBPCGGetBlockSize_C",(EPS,PetscInt*),(eps,bs));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSLOBPCGSetRestart_LOBPCG"
+static PetscErrorCode EPSLOBPCGSetRestart_LOBPCG(EPS eps,PetscReal restart)
+{
+  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+  PetscFunctionBegin;
+  if (restart==PETSC_DEFAULT) ctx->restart = 0.6;
+  else {
+    if (restart<0.1 || restart>1.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,"The restart argument must be in the range [0.1,1.0]");
+    ctx->restart = restart;
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSLOBPCGSetRestart"
+/*@
+   EPSLOBPCGSetRestart - Sets the restart parameter for the LOBPCG method.
+   The meaning of this parameter is the proportion of vectors within the
+   current block iterate that must have converged in order to force a
+   restart with hard locking.
+
+   Logically Collective on EPS
+
+   Input Parameters:
++  eps - the eigenproblem solver context
+-  restart - the percentage of the block of vectors to force a restart
+
+   Options Database Key:
+.  -eps_lobpcg_restart - Sets the restart parameter
+
+   Notes:
+   Allowed values are in the range [0.1,1.0]. The default is 0.6.
+
+   Level: advanced
+
+.seealso: EPSLOBPCGGetRestart()
+@*/
+PetscErrorCode EPSLOBPCGSetRestart(EPS eps,PetscReal restart)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidLogicalCollectiveReal(eps,restart,2);
+  ierr = PetscTryMethod(eps,"EPSLOBPCGSetRestart_C",(EPS,PetscReal),(eps,restart));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSLOBPCGGetRestart_LOBPCG"
+static PetscErrorCode EPSLOBPCGGetRestart_LOBPCG(EPS eps,PetscReal *restart)
+{
+  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+  PetscFunctionBegin;
+  *restart = ctx->restart;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSLOBPCGGetRestart"
+/*@
+   EPSLOBPCGGetRestart - Gets the restart parameter used in the LOBPCG method.
+
+   Not Collective
+
+   Input Parameter:
+.  eps - the eigenproblem solver context
+
+   Output Parameter:
+.  restart - the restart parameter
+
+   Level: advanced
+
+.seealso: EPSLOBPCGSetRestart()
+@*/
+PetscErrorCode EPSLOBPCGGetRestart(EPS eps,PetscReal *restart)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(restart,2);
+  ierr = PetscUseMethod(eps,"EPSLOBPCGGetRestart_C",(EPS,PetscReal*),(eps,restart));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -577,7 +658,7 @@ PetscErrorCode EPSLOBPCGGetLocking(EPS eps,PetscBool *lock)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(lock,2);
-  ierr = PetscTryMethod(eps,"EPSLOBPCGGetLocking_C",(EPS,PetscBool*),(eps,lock));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSLOBPCGGetLocking_C",(EPS,PetscBool*),(eps,lock));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -593,6 +674,7 @@ PetscErrorCode EPSView_LOBPCG(EPS eps,PetscViewer viewer)
   ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
   if (isascii) {
     ierr = PetscViewerASCIIPrintf(viewer,"  LOBPCG: block size %D\n",ctx->bs);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  LOBPCG: restart parameter=%g (using %d guard vectors)\n",(double)ctx->restart,(int)((1.0-ctx->restart)*ctx->bs));CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  LOBPCG: soft locking %sactivated\n",ctx->lock?"":"de");CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
@@ -600,11 +682,12 @@ PetscErrorCode EPSView_LOBPCG(EPS eps,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_LOBPCG"
-PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   PetscBool      lock,flg;
   PetscInt       bs;
+  PetscReal      restart;
   KSP            ksp;
 
   PetscFunctionBegin;
@@ -613,6 +696,10 @@ PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptions *PetscOptionsObject,EPS eps
   if (flg) {
     ierr = EPSLOBPCGSetBlockSize(eps,bs);CHKERRQ(ierr);
   }
+  ierr = PetscOptionsReal("-eps_lobpcg_restart","Percentage of the block of vectors to force a restart","EPSLOBPCGSetRestart",0.5,&restart,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = EPSLOBPCGSetRestart(eps,restart);CHKERRQ(ierr);
+  }
   ierr = PetscOptionsBool("-eps_lobpcg_locking","Choose between locking and non-locking variants","EPSLOBPCGSetLocking",PETSC_TRUE,&lock,&flg);CHKERRQ(ierr);
   if (flg) {
     ierr = EPSLOBPCGSetLocking(eps,lock);CHKERRQ(ierr);
@@ -642,6 +729,8 @@ PetscErrorCode EPSDestroy_LOBPCG(EPS eps)
   ierr = PetscFree(eps->data);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGSetBlockSize_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGGetBlockSize_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGSetRestart_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGGetRestart_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGSetLocking_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGGetLocking_C",NULL);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -669,6 +758,8 @@ PETSC_EXTERN PetscErrorCode EPSCreate_LOBPCG(EPS eps)
   ierr = STPrecondSetKSPHasMat(eps->st,PETSC_TRUE);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGSetBlockSize_C",EPSLOBPCGSetBlockSize_LOBPCG);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGGetBlockSize_C",EPSLOBPCGGetBlockSize_LOBPCG);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGSetRestart_C",EPSLOBPCGSetRestart_LOBPCG);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGGetRestart_C",EPSLOBPCGGetRestart_LOBPCG);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGSetLocking_C",EPSLOBPCGSetLocking_LOBPCG);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSLOBPCGGetLocking_C",EPSLOBPCGGetLocking_LOBPCG);CHKERRQ(ierr);
   PetscFunctionReturn(0);
diff --git a/src/eps/impls/cg/lobpcg/lobpcg.c.html b/src/eps/impls/cg/lobpcg/lobpcg.c.html
index fe78dfc..4514ca9 100644
--- a/src/eps/impls/cg/lobpcg/lobpcg.c.html
+++ b/src/eps/impls/cg/lobpcg/lobpcg.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/cg/lobpcg/lobpcg.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:12+00:00">
+<meta name="date" content="2016-05-16T10:33:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/lobpcg/lobpcg.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/lobpcg/lobpcg.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "lobpcg"</font>
@@ -33,7 +33,7 @@
 
 <a name="line22"> 22: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line23"> 23: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line26"> 26: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -52,11 +52,11 @@
 <a name="line40"> 40: </a><font color="#B22222">*/</font>
 
 <a name="line42"> 42: </a><font color="#A020F0">#include <slepc/private/epsimpl.h>                </font><font color="#B22222">/*I "slepceps.h" I*/</font><font color="#A020F0"></font>
-<a name="line43"> 43: </a><font color="#A020F0">#include <slepc/private/dsimpl.h>                 </font><font color="#B22222">/*I "slepcds.h" I*/</font><font color="#A020F0"></font>
 
-<a name="line45"> 45: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line46"> 46: </a>  PetscInt  bs;     <font color="#B22222">/* block size */</font>
-<a name="line47"> 47: </a>  PetscBool lock;   <font color="#B22222">/* soft locking active/inactive */</font>
+<a name="line44"> 44: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line45"> 45: </a>  PetscInt  bs;        <font color="#B22222">/* block size */</font>
+<a name="line46"> 46: </a>  PetscBool lock;      <font color="#B22222">/* soft locking active/inactive */</font>
+<a name="line47"> 47: </a>  PetscReal restart;   <font color="#B22222">/* restart parameter */</font>
 <a name="line48"> 48: </a>} EPS_LOBPCG;
 
 <a name="line52"> 52: </a><strong><font color="#4169E1"><a name="EPSSetDimensions_LOBPCG"></a>PetscErrorCode EPSSetDimensions_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
@@ -90,538 +90,611 @@
 <a name="line85"> 85: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
 <a name="line86"> 86: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
 
-<a name="line88"> 88: </a>  <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
-<a name="line89"> 89: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&precond);
-<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (!precond) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"LOBPCG only works with precond <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>"</font>);
-
-<a name="line92"> 92: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-<a name="line93"> 93: </a>  EPS_SetInnerProduct(eps);
-<a name="line94"> 94: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
-<a name="line95"> 95: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->mpd);
-<a name="line96"> 96: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,1);
-<a name="line97"> 97: </a>  <font color="#4169E1">return</font>(0);
-<a name="line98"> 98: </a>}
-
-<a name="line102">102: </a><strong><font color="#4169E1"><a name="EPSSolve_LOBPCG"></a>PetscErrorCode EPSSolve_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line103">103: </a>{
-<a name="line105">105: </a>  EPS_LOBPCG     *ctx = (EPS_LOBPCG*)eps->data;
-<a name="line106">106: </a>  PetscInt       i,j,k,ld,nv,ini,kini,nmat,nc,nconv,bdone,its;
-<a name="line107">107: </a>  PetscReal      norm;
-<a name="line108">108: </a>  PetscBool      breakdown,countc;
-<a name="line109">109: </a>  Mat            A,B,M;
-<a name="line110">110: </a>  Vec            v,w=eps->work[0];
-<a name="line111">111: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X,Y,Z,R,P,AX,BX;
-
-<a name="line114">114: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line115">115: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line116">116: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line117">117: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
-<a name="line118">118: </a>  <font color="#4169E1">else</font> B = NULL;
-
-<a name="line120">120: </a>  <font color="#B22222">/* 1. Allocate memory */</font>
-<a name="line121">121: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,3*ctx->bs,&Z);
-<a name="line122">122: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&X);
-<a name="line123">123: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&R);
-<a name="line124">124: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&P);
-<a name="line125">125: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&AX);
-<a name="line126">126: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line127">127: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&BX);
-<a name="line128">128: </a>  }
-<a name="line129">129: </a>  nc = eps->nds;
-<a name="line130">130: </a>  <font color="#4169E1">if</font> (nc>0 || eps->nev>ctx->bs) {
-<a name="line131">131: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,nc+eps->nev,&Y);
-<a name="line132">132: </a>  }
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (nc>0) {
-<a name="line134">134: </a>    <font color="#4169E1">for</font> (j=0;j<nc;j++) {
-<a name="line135">135: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,-nc+j,&v);
-<a name="line136">136: </a>      <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(Y,j,v);
-<a name="line137">137: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,-nc+j,&v);
-<a name="line138">138: </a>    }
-<a name="line139">139: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Y,0,nc);
-<a name="line140">140: </a>  }
-
-<a name="line142">142: </a>  <font color="#B22222">/* 2. Apply the constraints to the initial vectors */</font>
-<a name="line143">143: </a>  kini = eps->nini;
-<a name="line144">144: </a>  <font color="#4169E1">while</font> (kini<eps->ncv-2*ctx->bs) { <font color="#B22222">/* Generate more initial vectors if necessary */</font>
-<a name="line145">145: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,kini,eps->rand);
-<a name="line146">146: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,kini,NULL,&norm,&breakdown);
-<a name="line147">147: </a>    <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
-<a name="line148">148: </a>      <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,kini,1.0/norm);
-<a name="line149">149: </a>      kini++;
-<a name="line150">150: </a>    }
-<a name="line151">151: </a>  }
-<a name="line152">152: </a>  nv = ctx->bs;
-<a name="line153">153: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,nv);
-<a name="line154">154: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,nv);
-<a name="line155">155: </a>  <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(eps->V,Z);
-<a name="line156">156: </a>  <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(Z,X);
-
-<a name="line158">158: </a>  <font color="#B22222">/* 3. B-orthogonalize initial vectors */</font>
-<a name="line159">159: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line160">160: </a>    <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,B,BX);
-<a name="line161">161: </a>  }
-
-<a name="line163">163: </a>  <font color="#B22222">/* 4. Compute initial Ritz vectors */</font>
-<a name="line164">164: </a>  <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,AX);
-<a name="line165">165: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
-<a name="line166">166: </a>  <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line167">167: </a>  <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(AX,NULL,X,M);
-<a name="line168">168: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line169">169: </a>  <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(eps->ds,DS_MAT_B);
-<a name="line170">170: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line171">171: </a>  <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
-<a name="line172">172: </a>  <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,NULL,NULL,NULL);
-<a name="line173">173: </a>  <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line174">174: </a>  <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&M);
-<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,nv);
-<a name="line176">176: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(AX,M,0,nv);
-<a name="line177">177: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&M);
-
-<a name="line179">179: </a>  <font color="#B22222">/* 5. Initialize range of active iterates */</font>
-<a name="line180">180: </a>  bdone = 0;  <font color="#B22222">/* finished blocks, the leading bdone*bs columns of V are eigenvectors */</font>
-<a name="line181">181: </a>  nconv = 0;  <font color="#B22222">/* number of converged eigenvalues in the current block */</font>
-<a name="line182">182: </a>  its   = 0;  <font color="#B22222">/* iterations for the current block */</font>
-
-<a name="line184">184: </a>  <font color="#B22222">/* 6. Main loop */</font>
-<a name="line185">185: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-
-<a name="line187">187: </a>    <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line188">188: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(R,nconv,ctx->bs);
-<a name="line189">189: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
-<a name="line190">190: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line191">191: </a>        <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,nconv,ctx->bs);
-<a name="line192">192: </a>      }
-<a name="line193">193: </a>    }
-
-<a name="line195">195: </a>    <font color="#B22222">/* 7. Compute residuals */</font>
-<a name="line196">196: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line197">197: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(AX,R);
-<a name="line198">198: </a>    <font color="#4169E1">if</font> (B) {
-<a name="line199">199: </a>      <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R,-1.0,1.0,BX,M);
-<a name="line200">200: </a>    } <font color="#4169E1">else</font> {
-<a name="line201">201: </a>      <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R,-1.0,1.0,X,M);
-<a name="line202">202: </a>    }
-<a name="line203">203: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
-
-<a name="line205">205: </a>    <font color="#B22222">/* 8. Compute residual norms and update index set of active iterates */</font>
-<a name="line206">206: </a>    ini = (ctx->lock)? nconv: 0;
-<a name="line207">207: </a>    k = ini;
-<a name="line208">208: </a>    countc = PETSC_TRUE;
-<a name="line209">209: </a>    <font color="#4169E1">for</font> (j=ini;j<ctx->bs;j++) {
-<a name="line210">210: </a>      i = bdone*ctx->bs+j;
-<a name="line211">211: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(R,j,&v);
-<a name="line212">212: </a>      VecNorm(v,NORM_2,&norm);
-<a name="line213">213: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(R,j,&v);
-<a name="line214">214: </a>      (*eps->converged)(eps,eps->eigr[i],eps->eigi[i],norm,&eps->errest[i],eps->convergedctx);
-<a name="line215">215: </a>      <font color="#4169E1">if</font> (countc) {
-<a name="line216">216: </a>        <font color="#4169E1">if</font> (eps->errest[i] < eps->tol) k++;
-<a name="line217">217: </a>        <font color="#4169E1">else</font> countc = PETSC_FALSE;
-<a name="line218">218: </a>      }
-<a name="line219">219: </a>      <font color="#4169E1">if</font> (!countc && !eps->trackall) <font color="#4169E1">break</font>;
-<a name="line220">220: </a>    }
-<a name="line221">221: </a>    nconv = k;
-<a name="line222">222: </a>    eps->nconv = bdone*ctx->bs + nconv;
-<a name="line223">223: </a>    <font color="#4169E1">if</font> (eps->its+its) {
-<a name="line224">224: </a>      EPSMonitor(eps,eps->its+its,eps->nconv,eps->eigr,eps->eigi,eps->errest,(bdone+1)*ctx->bs);
-<a name="line225">225: </a>    }
-<a name="line226">226: </a>    <font color="#4169E1">if</font> (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line227">227: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->its+its >= eps->max_it) {
-<a name="line228">228: </a>      eps->its += its;
-<a name="line229">229: </a>      eps->reason = EPS_DIVERGED_ITS;
-<a name="line230">230: </a>    }
-<a name="line231">231: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || nconv == ctx->bs) {
-<a name="line232">232: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,bdone*ctx->bs,eps->nconv);
-<a name="line233">233: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,nconv);
-<a name="line234">234: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,nconv);
-<a name="line235">235: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,eps->V);
-<a name="line236">236: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,Z);
-<a name="line237">237: </a>    }
-<a name="line238">238: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING) {
-<a name="line239">239: </a>      eps->its += its;
-<a name="line240">240: </a>      <font color="#4169E1">break</font>;
-<a name="line241">241: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nconv == ctx->bs) {
-<a name="line242">242: </a>      eps->its += its;
-<a name="line243">243: </a>      its = 0;
-<a name="line244">244: </a>    }
-<a name="line245">245: </a>    its++;
-
-<a name="line247">247: </a>    <font color="#4169E1">if</font> (nconv == ctx->bs) {  <font color="#B22222">/* block finished: lock eigenvectors and compute new R */</font>
-
-<a name="line249">249: </a>      <font color="#B22222">/* extend constraints */</font>
-<a name="line250">250: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Y,nc+bdone*ctx->bs,nc+(bdone+1)*ctx->bs);
-<a name="line251">251: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(Z,Y);
-<a name="line252">252: </a>      <font color="#4169E1">for</font> (j=0;j<ctx->bs;j++) {
-<a name="line253">253: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(Y,nc+bdone*ctx->bs+j,NULL,&norm,&breakdown);
-<a name="line254">254: </a>        <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
-<a name="line255">255: </a>          <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(Y,nc+bdone*ctx->bs+j,1.0/norm);
-<a name="line256">256: </a>        } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Orthogonalization of constraints failed"</font>);
-<a name="line257">257: </a>      }
-<a name="line258">258: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Y,0,nc+(bdone+1)*ctx->bs);
-
-<a name="line260">260: </a>      bdone++;
-<a name="line261">261: </a>      nconv = 0;
-
-<a name="line263">263: </a>      <font color="#B22222">/* set new initial vectors */</font>
-<a name="line264">264: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,bdone*ctx->bs,(bdone+1)*ctx->bs);
-<a name="line265">265: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(eps->V,Z);
-<a name="line266">266: </a>      <font color="#4169E1">for</font> (j=0;j<ctx->bs;j++) {
-<a name="line267">267: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Z,j,&v);
-<a name="line268">268: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(Y,v,NULL,NULL,NULL);
-<a name="line269">269: </a>        VecNormalize(v,NULL);
-<a name="line270">270: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Z,j,&v);
-<a name="line271">271: </a>      }
-<a name="line272">272: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,nconv,ctx->bs);
-<a name="line273">273: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
-<a name="line274">274: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(Z,X);
-
-<a name="line276">276: </a>      <font color="#B22222">/* B-orthogonalize initial vectors */</font>
-<a name="line277">277: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line278">278: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(X,NULL);
+<a name="line88"> 88: </a>  <font color="#4169E1">if</font> (!ctx->restart) ctx->restart = 0.9;
+
+<a name="line90"> 90: </a>  <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
+<a name="line91"> 91: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&precond);
+<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (!precond) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"LOBPCG only works with precond <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>"</font>);
+
+<a name="line94"> 94: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+<a name="line95"> 95: </a>  EPS_SetInnerProduct(eps);
+<a name="line96"> 96: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
+<a name="line97"> 97: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->mpd);
+<a name="line98"> 98: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,1);
+<a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);
+<a name="line100">100: </a>}
+
+<a name="line104">104: </a><strong><font color="#4169E1"><a name="EPSSolve_LOBPCG"></a>PetscErrorCode EPSSolve_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line105">105: </a>{
+<a name="line107">107: </a>  EPS_LOBPCG     *ctx = (EPS_LOBPCG*)eps->data;
+<a name="line108">108: </a>  PetscInt       i,j,k,ld,nv,ini,kini,nmat,nc,nconv,locked,guard,its;
+<a name="line109">109: </a>  PetscReal      norm;
+<a name="line110">110: </a>  PetscScalar    *eigr;
+<a name="line111">111: </a>  PetscBool      breakdown,countc;
+<a name="line112">112: </a>  Mat            A,B,M;
+<a name="line113">113: </a>  Vec            v,w=eps->work[0];
+<a name="line114">114: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X,Y,Z,R,P,AX,BX;
+
+<a name="line117">117: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line118">118: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line119">119: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line120">120: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
+<a name="line121">121: </a>  <font color="#4169E1">else</font> B = NULL;
+
+<a name="line123">123: </a>  guard = (PetscInt)((1.0-ctx->restart)*ctx->bs);  <font color="#B22222">/* number of guard vectors */</font>
+
+<a name="line125">125: </a>  <font color="#B22222">/* 1. Allocate memory */</font>
+<a name="line126">126: </a>  PetscCalloc1(3*ctx->bs,&eigr);
+<a name="line127">127: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,3*ctx->bs,&Z);
+<a name="line128">128: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&X);
+<a name="line129">129: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&R);
+<a name="line130">130: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&P);
+<a name="line131">131: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&AX);
+<a name="line132">132: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line133">133: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->bs,&BX);
+<a name="line134">134: </a>  }
+<a name="line135">135: </a>  nc = eps->nds;
+<a name="line136">136: </a>  <font color="#4169E1">if</font> (nc>0 || eps->nev>ctx->bs-guard) {
+<a name="line137">137: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,nc+eps->nev,&Y);
+<a name="line138">138: </a>  }
+<a name="line139">139: </a>  <font color="#4169E1">if</font> (nc>0) {
+<a name="line140">140: </a>    <font color="#4169E1">for</font> (j=0;j<nc;j++) {
+<a name="line141">141: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,-nc+j,&v);
+<a name="line142">142: </a>      <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(Y,j,v);
+<a name="line143">143: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,-nc+j,&v);
+<a name="line144">144: </a>    }
+<a name="line145">145: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Y,0,nc);
+<a name="line146">146: </a>  }
+
+<a name="line148">148: </a>  <font color="#B22222">/* 2. Apply the constraints to the initial vectors */</font>
+<a name="line149">149: </a>  kini = eps->nini;
+<a name="line150">150: </a>  <font color="#4169E1">while</font> (kini<eps->ncv-ctx->bs) { <font color="#B22222">/* Generate more initial vectors if necessary */</font>
+<a name="line151">151: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,kini);
+<a name="line152">152: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,kini,NULL,&norm,&breakdown);
+<a name="line153">153: </a>    <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
+<a name="line154">154: </a>      <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,kini,1.0/norm);
+<a name="line155">155: </a>      kini++;
+<a name="line156">156: </a>    }
+<a name="line157">157: </a>  }
+<a name="line158">158: </a>  nv = ctx->bs;
+<a name="line159">159: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,nv);
+<a name="line160">160: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,nv);
+<a name="line161">161: </a>  <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(eps->V,Z);
+<a name="line162">162: </a>  <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(Z,X);
+
+<a name="line164">164: </a>  <font color="#B22222">/* 3. B-orthogonalize initial vectors */</font>
+
+<a name="line166">166: </a>  <font color="#B22222">/* 4. Compute initial Ritz vectors */</font>
+<a name="line167">167: </a>  <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,AX);
+<a name="line168">168: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
+<a name="line169">169: </a>  <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line170">170: </a>  <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(AX,NULL,X,M);
+<a name="line171">171: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line172">172: </a>  <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(eps->ds,DS_MAT_B);
+<a name="line173">173: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line174">174: </a>  <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,NULL);
+<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,NULL,NULL,NULL,NULL);
+<a name="line176">176: </a>  <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+<a name="line177">177: </a>  <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&M);
+<a name="line178">178: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,nv);
+<a name="line179">179: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(AX,M,0,nv);
+<a name="line180">180: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&M);
+
+<a name="line182">182: </a>  <font color="#B22222">/* 5. Initialize range of active iterates */</font>
+<a name="line183">183: </a>  locked = 0;  <font color="#B22222">/* hard-locked vectors, the leading locked columns of V are eigenvectors */</font>
+<a name="line184">184: </a>  nconv  = 0;  <font color="#B22222">/* number of converged eigenvalues in the current block */</font>
+<a name="line185">185: </a>  its    = 0;  <font color="#B22222">/* iterations for the current block */</font>
+
+<a name="line187">187: </a>  <font color="#B22222">/* 6. Main loop */</font>
+<a name="line188">188: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+
+<a name="line190">190: </a>    <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line191">191: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(R,nconv,ctx->bs);
+<a name="line192">192: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
+<a name="line193">193: </a>      <font color="#4169E1">if</font> (B) {
+<a name="line194">194: </a>        <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,nconv,ctx->bs);
+<a name="line195">195: </a>      }
+<a name="line196">196: </a>    }
+
+<a name="line198">198: </a>    <font color="#B22222">/* 7. Compute residuals */</font>
+<a name="line199">199: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line200">200: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(AX,R);
+<a name="line201">201: </a>    <font color="#4169E1">if</font> (B) {
+<a name="line202">202: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,B,BX);
+<a name="line203">203: </a>      <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R,-1.0,1.0,BX,M);
+<a name="line204">204: </a>    } <font color="#4169E1">else</font> {
+<a name="line205">205: </a>      <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R,-1.0,1.0,X,M);
+<a name="line206">206: </a>    }
+<a name="line207">207: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
+
+<a name="line209">209: </a>    <font color="#B22222">/* 8. Compute residual norms and update index set of active iterates */</font>
+<a name="line210">210: </a>    ini = (ctx->lock)? nconv: 0;
+<a name="line211">211: </a>    k = ini;
+<a name="line212">212: </a>    countc = PETSC_TRUE;
+<a name="line213">213: </a>    <font color="#4169E1">for</font> (j=ini;j<ctx->bs;j++) {
+<a name="line214">214: </a>      i = locked+j;
+<a name="line215">215: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(R,j,&v);
+<a name="line216">216: </a>      VecNorm(v,NORM_2,&norm);
+<a name="line217">217: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(R,j,&v);
+<a name="line218">218: </a>      (*eps->converged)(eps,eps->eigr[i],eps->eigi[i],norm,&eps->errest[i],eps->convergedctx);
+<a name="line219">219: </a>      <font color="#4169E1">if</font> (countc) {
+<a name="line220">220: </a>        <font color="#4169E1">if</font> (eps->errest[i] < eps->tol) k++;
+<a name="line221">221: </a>        <font color="#4169E1">else</font> countc = PETSC_FALSE;
+<a name="line222">222: </a>      }
+<a name="line223">223: </a>      <font color="#4169E1">if</font> (!countc && !eps->trackall) <font color="#4169E1">break</font>;
+<a name="line224">224: </a>    }
+<a name="line225">225: </a>    nconv = k;
+<a name="line226">226: </a>    eps->nconv = locked + nconv;
+<a name="line227">227: </a>    <font color="#4169E1">if</font> (its) {
+<a name="line228">228: </a>      EPSMonitor(eps,eps->its+its,eps->nconv,eps->eigr,eps->eigi,eps->errest,locked+ctx->bs);
+<a name="line229">229: </a>    }
+<a name="line230">230: </a>    (*eps->stopping)(eps,eps->its+its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line231">231: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || nconv >= ctx->bs-guard) {
+<a name="line232">232: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,locked,eps->nconv);
+<a name="line233">233: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,nconv);
+<a name="line234">234: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,eps->V);
+<a name="line235">235: </a>    }
+<a name="line236">236: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING) {
+<a name="line237">237: </a>      eps->its += its;
+<a name="line238">238: </a>      <font color="#4169E1">break</font>;
+<a name="line239">239: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nconv >= ctx->bs-guard) {
+<a name="line240">240: </a>      eps->its += its;
+<a name="line241">241: </a>      its = 0;
+<a name="line242">242: </a>    } <font color="#4169E1">else</font> its++;
+
+<a name="line244">244: </a>    <font color="#4169E1">if</font> (nconv >= ctx->bs-guard) {  <font color="#B22222">/* force hard locking of vectors and compute new R */</font>
+
+<a name="line246">246: </a>      <font color="#B22222">/* extend constraints */</font>
+<a name="line247">247: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Y,nc+locked,nc+locked+nconv);
+<a name="line248">248: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,Y);
+<a name="line249">249: </a>      <font color="#4169E1">for</font> (j=0;j<nconv;j++) {
+<a name="line250">250: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(Y,nc+locked+j,NULL,&norm,&breakdown);
+<a name="line251">251: </a>        <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
+<a name="line252">252: </a>          <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(Y,nc+locked+j,1.0/norm);
+<a name="line253">253: </a>        } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Orthogonalization of constraints failed"</font>);
+<a name="line254">254: </a>      }
+<a name="line255">255: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Y,0,nc+locked+nconv);
+
+<a name="line257">257: </a>      <font color="#B22222">/* shift work <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>'s */</font>
+<a name="line258">258: </a>      <font color="#4169E1">for</font> (j=nconv;j<ctx->bs;j++) {
+<a name="line259">259: </a>        <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(X,j,j-nconv);
+<a name="line260">260: </a>        <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(R,j,j-nconv);
+<a name="line261">261: </a>        <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(P,j,j-nconv);
+<a name="line262">262: </a>        <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(AX,j,j-nconv);
+<a name="line263">263: </a>        <font color="#4169E1">if</font> (B) {
+<a name="line264">264: </a>          <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(BX,j,j-nconv);
+<a name="line265">265: </a>        }
+<a name="line266">266: </a>      }
+
+<a name="line268">268: </a>      <font color="#B22222">/* set new initial vectors */</font>
+<a name="line269">269: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,locked+ctx->bs,locked+ctx->bs+nconv);
+<a name="line270">270: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,ctx->bs-nconv,ctx->bs);
+<a name="line271">271: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(eps->V,X);
+<a name="line272">272: </a>      <font color="#4169E1">for</font> (j=ctx->bs-nconv;j<ctx->bs;j++) {
+<a name="line273">273: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&v);
+<a name="line274">274: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(Y,v,NULL,&norm,&breakdown);
+<a name="line275">275: </a>        <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
+<a name="line276">276: </a>          VecScale(v,1.0/norm);
+<a name="line277">277: </a>        } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Orthogonalization of initial vector failed"</font>);
+<a name="line278">278: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&v);
 <a name="line279">279: </a>      }
-
-<a name="line281">281: </a>      <font color="#B22222">/* Compute initial Ritz vectors */</font>
-<a name="line282">282: </a>      nv = ctx->bs;
-<a name="line283">283: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,AX);
-<a name="line284">284: </a>      <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
-<a name="line285">285: </a>      <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line286">286: </a>      <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(AX,NULL,X,M);
-<a name="line287">287: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line288">288: </a>      <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(eps->ds,DS_MAT_B);
-<a name="line289">289: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line290">290: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi);
-<a name="line291">291: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi,NULL,NULL,NULL);
-<a name="line292">292: </a>      <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line293">293: </a>      <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&M);
-<a name="line294">294: </a>      <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,nv);
-<a name="line295">295: </a>      <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(AX,M,0,nv);
-<a name="line296">296: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&M);
-
-<a name="line298">298: </a>      EPSMonitor(eps,eps->its+its-1,eps->nconv,eps->eigr,eps->eigi,eps->errest,(bdone+1)*ctx->bs);
-
-<a name="line300">300: </a>      <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line301">301: </a>        <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(R,nconv,ctx->bs);
-<a name="line302">302: </a>        <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
-<a name="line303">303: </a>        <font color="#4169E1">if</font> (B) {
-<a name="line304">304: </a>          <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,nconv,ctx->bs);
-<a name="line305">305: </a>        }
-<a name="line306">306: </a>      }
-
-<a name="line308">308: </a>      <font color="#B22222">/* compute residuals */</font>
-<a name="line309">309: </a>      <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line310">310: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(AX,R);
-<a name="line311">311: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line312">312: </a>        <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,B,BX);
-<a name="line313">313: </a>        <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R,-1.0,1.0,BX,M);
-<a name="line314">314: </a>      } <font color="#4169E1">else</font> {
-<a name="line315">315: </a>        <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R,-1.0,1.0,X,M);
-<a name="line316">316: </a>      }
-<a name="line317">317: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line318">318: </a>    }
-
-<a name="line320">320: </a>    ini = (ctx->lock)? nconv: 0;
-<a name="line321">321: </a>    <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line322">322: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(R,nconv,ctx->bs);
-<a name="line323">323: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(P,nconv,ctx->bs);
-<a name="line324">324: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
-<a name="line325">325: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line326">326: </a>        <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,nconv,ctx->bs);
-<a name="line327">327: </a>      }
-<a name="line328">328: </a>    }
-
-<a name="line330">330: </a>    <font color="#B22222">/* 9. Apply preconditioner to the residuals */</font>
-<a name="line331">331: </a>    <font color="#4169E1">for</font> (j=ini;j<ctx->bs;j++) {
-<a name="line332">332: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(R,j,&v);
-<a name="line333">333: </a>      <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,v,w);
-<a name="line334">334: </a>      <font color="#4169E1">if</font> (nc+bdone*ctx->bs>0) {
-<a name="line335">335: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(Y,w,NULL,NULL,NULL);
-<a name="line336">336: </a>        VecNormalize(w,NULL);
-<a name="line337">337: </a>      }
-<a name="line338">338: </a>      VecCopy(w,v);
-<a name="line339">339: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(R,j,&v);
-<a name="line340">340: </a>    }
-
-<a name="line342">342: </a>    <font color="#B22222">/* 11. B-orthonormalize preconditioned residuals */</font>
-<a name="line343">343: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(R,NULL);
-
-<a name="line345">345: </a>    <font color="#B22222">/* 13-16. B-orthonormalize conjugate directions */</font>
-<a name="line346">346: </a>    <font color="#4169E1">if</font> (its>1) {
-<a name="line347">347: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(P,NULL);
-<a name="line348">348: </a>    }
-
-<a name="line350">350: </a>    <font color="#B22222">/* 17-23. Compute symmetric Gram matrices */</font>
-<a name="line351">351: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,ctx->bs);
-<a name="line352">352: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,ctx->bs);
-<a name="line353">353: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,Z);
-<a name="line354">354: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,ctx->bs,2*ctx->bs-ini);
-<a name="line355">355: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(R,Z);
-<a name="line356">356: </a>    <font color="#4169E1">if</font> (its>1) {
-<a name="line357">357: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,2*ctx->bs-ini,3*ctx->bs-2*ini);
-<a name="line358">358: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(P,Z);
-<a name="line359">359: </a>    }
-
-<a name="line361">361: </a>    <font color="#4169E1">if</font> (its>1) nv = 3*ctx->bs-2*ini;
-<a name="line362">362: </a>    <font color="#4169E1">else</font> nv = 2*ctx->bs-ini;
-
-<a name="line364">364: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,nv);
-<a name="line365">365: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
-<a name="line366">366: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line367">367: </a>    <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(Z,A,Z,M);
-<a name="line368">368: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
-<a name="line369">369: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_B,&M);
-<a name="line370">370: </a>    <font color="#4169E1">if</font> (B) {
-<a name="line371">371: </a>      <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(Z,B,Z,M);
-<a name="line372">372: </a>    } <font color="#4169E1">else</font> {
-<a name="line373">373: </a>      <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(Z,Z,M);
-<a name="line374">374: </a>    }
-<a name="line375">375: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_B,&M);
+<a name="line280">280: </a>      locked += nconv;
+<a name="line281">281: </a>      nconv = 0;
+<a name="line282">282: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,nconv,ctx->bs);
+
+<a name="line284">284: </a>      <font color="#B22222">/* B-orthogonalize initial vectors */</font>
+<a name="line285">285: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(X,NULL);
+<a name="line286">286: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,nconv,ctx->bs);
+<a name="line287">287: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
+<a name="line288">288: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,Z);
+
+<a name="line290">290: </a>      <font color="#B22222">/* compute initial Ritz vectors */</font>
+<a name="line291">291: </a>      nv = ctx->bs;
+<a name="line292">292: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,AX);
+<a name="line293">293: </a>      <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
+<a name="line294">294: </a>      <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line295">295: </a>      <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(AX,NULL,X,M);
+<a name="line296">296: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line297">297: </a>      <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(eps->ds,DS_MAT_B);
+<a name="line298">298: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line299">299: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eigr,NULL);
+<a name="line300">300: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eigr,NULL,NULL,NULL,NULL);
+<a name="line301">301: </a>      <font color="#4169E1">for</font> (j=0;j<nv;j++) <font color="#4169E1">if</font> (locked+j<eps->ncv) eps->eigr[locked+j] = eigr[j];
+<a name="line302">302: </a>      <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+<a name="line303">303: </a>      <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&M);
+<a name="line304">304: </a>      <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,nv);
+<a name="line305">305: </a>      <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(AX,M,0,nv);
+<a name="line306">306: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&M);
+
+<a name="line308">308: </a>      <font color="#4169E1">continue</font>;   <font color="#B22222">/* skip the rest of the iteration */</font>
+<a name="line309">309: </a>    }
+
+<a name="line311">311: </a>    ini = (ctx->lock)? nconv: 0;
+<a name="line312">312: </a>    <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line313">313: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(R,nconv,ctx->bs);
+<a name="line314">314: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(P,nconv,ctx->bs);
+<a name="line315">315: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AX,nconv,ctx->bs);
+<a name="line316">316: </a>      <font color="#4169E1">if</font> (B) {
+<a name="line317">317: </a>        <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,nconv,ctx->bs);
+<a name="line318">318: </a>      }
+<a name="line319">319: </a>    }
+
+<a name="line321">321: </a>    <font color="#B22222">/* 9. Apply preconditioner to the residuals */</font>
+<a name="line322">322: </a>    <font color="#4169E1">for</font> (j=ini;j<ctx->bs;j++) {
+<a name="line323">323: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(R,j,&v);
+<a name="line324">324: </a>      <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,v,w);
+<a name="line325">325: </a>      <font color="#4169E1">if</font> (nc+locked>0) {
+<a name="line326">326: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(Y,w,NULL,&norm,&breakdown);
+<a name="line327">327: </a>        <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
+<a name="line328">328: </a>          VecScale(w,1.0/norm);
+<a name="line329">329: </a>        } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Orthogonalization of preconditioned residual failed"</font>);
+<a name="line330">330: </a>      }
+<a name="line331">331: </a>      VecCopy(w,v);
+<a name="line332">332: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(R,j,&v);
+<a name="line333">333: </a>    }
+
+<a name="line335">335: </a>    <font color="#B22222">/* 11. B-orthonormalize preconditioned residuals */</font>
+<a name="line336">336: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(R,NULL);
+
+<a name="line338">338: </a>    <font color="#B22222">/* 13-16. B-orthonormalize conjugate directions */</font>
+<a name="line339">339: </a>    <font color="#4169E1">if</font> (its>1) {
+<a name="line340">340: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(P,NULL);
+<a name="line341">341: </a>    }
+
+<a name="line343">343: </a>    <font color="#B22222">/* 17-23. Compute symmetric Gram matrices */</font>
+<a name="line344">344: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,ctx->bs);
+<a name="line345">345: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,ctx->bs);
+<a name="line346">346: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,Z);
+<a name="line347">347: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,ctx->bs,2*ctx->bs-ini);
+<a name="line348">348: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(R,Z);
+<a name="line349">349: </a>    <font color="#4169E1">if</font> (its>1) {
+<a name="line350">350: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,2*ctx->bs-ini,3*ctx->bs-2*ini);
+<a name="line351">351: </a>      <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(P,Z);
+<a name="line352">352: </a>    }
+
+<a name="line354">354: </a>    <font color="#4169E1">if</font> (its>1) nv = 3*ctx->bs-2*ini;
+<a name="line355">355: </a>    <font color="#4169E1">else</font> nv = 2*ctx->bs-ini;
+
+<a name="line357">357: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,nv);
+<a name="line358">358: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
+<a name="line359">359: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line360">360: </a>    <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(Z,A,Z,M);
+<a name="line361">361: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&M);
+<a name="line362">362: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_B,&M);
+<a name="line363">363: </a>    <font color="#4169E1">if</font> (B) {
+<a name="line364">364: </a>      <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(Z,B,Z,M);
+<a name="line365">365: </a>    } <font color="#4169E1">else</font> {
+<a name="line366">366: </a>      <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(Z,Z,M);
+<a name="line367">367: </a>    }
+<a name="line368">368: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_B,&M);
+<a name="line369">369: </a>    
+<a name="line370">370: </a>    <font color="#B22222">/* 24. Solve the generalized eigenvalue problem */</font>
+<a name="line371">371: </a>    <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line372">372: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eigr,NULL);
+<a name="line373">373: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eigr,NULL,NULL,NULL,NULL);
+<a name="line374">374: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) <font color="#4169E1">if</font> (locked+j<eps->ncv) eps->eigr[locked+j] = eigr[j];
+<a name="line375">375: </a>    <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
 <a name="line376">376: </a>    
-<a name="line377">377: </a>    <font color="#B22222">/* 24. Solve the generalized eigenvalue problem */</font>
-<a name="line378">378: </a>    <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line379">379: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi);
-<a name="line380">380: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr+bdone*ctx->bs,eps->eigi,NULL,NULL,NULL);
-<a name="line381">381: </a>    <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line382">382: </a>    
-<a name="line383">383: </a>    <font color="#B22222">/* 25-33. Compute Ritz vectors */</font>
-<a name="line384">384: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&M);
-<a name="line385">385: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,ctx->bs,nv);
-<a name="line386">386: </a>    <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line387">387: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(P,0,ctx->bs);
-<a name="line388">388: </a>    }
-<a name="line389">389: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(P,1.0,0.0,Z,M);
-<a name="line390">390: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(P,X);
-<a name="line391">391: </a>    <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line392">392: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(P,nconv,ctx->bs);
-<a name="line393">393: </a>    }
-<a name="line394">394: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,ctx->bs);
-<a name="line395">395: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(X,1.0,1.0,Z,M);
-<a name="line396">396: </a>    <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line397">397: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,nconv,ctx->bs);
-<a name="line398">398: </a>    }
-<a name="line399">399: </a>    <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,AX);
-<a name="line400">400: </a>    <font color="#4169E1">if</font> (B) {
-<a name="line401">401: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,B,BX);
-<a name="line402">402: </a>    }
-<a name="line403">403: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&M);
-<a name="line404">404: </a>  }
-
-<a name="line406">406: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Z);
-<a name="line407">407: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
-<a name="line408">408: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&R);
-<a name="line409">409: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&P);
-<a name="line410">410: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&AX);
-<a name="line411">411: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line412">412: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&BX);
-<a name="line413">413: </a>  }
-<a name="line414">414: </a>  <font color="#4169E1">if</font> (nc>0 || eps->nev>ctx->bs) {
-<a name="line415">415: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Y);
-<a name="line416">416: </a>  }
-<a name="line417">417: </a>  <font color="#4169E1">return</font>(0);
-<a name="line418">418: </a>}
-
-<a name="line422">422: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetBlockSize_LOBPCG"></a>static PetscErrorCode EPSLOBPCGSetBlockSize_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line423">423: </a>{
-<a name="line424">424: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
-
-<a name="line427">427: </a>  ctx->bs = bs;
-<a name="line428">428: </a>  <font color="#4169E1">return</font>(0);
-<a name="line429">429: </a>}
-
-<a name="line433">433: </a><font color="#B22222">/*@</font>
-<a name="line434">434: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a> - Sets the block size of the LOBPCG method.</font>
-
-<a name="line436">436: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line438">438: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line439">439: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line440">440: </a><font color="#B22222">-  bs  - the block size</font>
-
-<a name="line442">442: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line443">443: </a><font color="#B22222">.  -eps_lobpcg_blocksize - Sets the block size</font>
-
-<a name="line445">445: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line447">447: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a>()</font>
-<a name="line448">448: </a><font color="#B22222">@*/</font>
-<a name="line449">449: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line450">450: </a>{
-
-<a name="line456">456: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
-<a name="line457">457: </a>  <font color="#4169E1">return</font>(0);
-<a name="line458">458: </a>}
-
-<a name="line462">462: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetBlockSize_LOBPCG"></a>static PetscErrorCode EPSLOBPCGGetBlockSize_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
-<a name="line463">463: </a>{
-<a name="line464">464: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
-
-<a name="line467">467: </a>  *bs = ctx->bs;
-<a name="line468">468: </a>  <font color="#4169E1">return</font>(0);
-<a name="line469">469: </a>}
-
-<a name="line473">473: </a><font color="#B22222">/*@</font>
-<a name="line474">474: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a> - Gets the block size used in the LOBPCG method.</font>
-
-<a name="line476">476: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line478">478: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line479">479: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line481">481: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line482">482: </a><font color="#B22222">.  bs - the block size</font>
-
-<a name="line484">484: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line486">486: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>()</font>
-<a name="line487">487: </a><font color="#B22222">@*/</font>
-<a name="line488">488: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
-<a name="line489">489: </a>{
-
-<a name="line495">495: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,bs));
-<a name="line496">496: </a>  <font color="#4169E1">return</font>(0);
-<a name="line497">497: </a>}
-
-<a name="line501">501: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetLocking_LOBPCG"></a>static PetscErrorCode EPSLOBPCGSetLocking_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
-<a name="line502">502: </a>{
-<a name="line503">503: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
-
-<a name="line506">506: </a>  ctx->lock = lock;
-<a name="line507">507: </a>  <font color="#4169E1">return</font>(0);
-<a name="line508">508: </a>}
-
-<a name="line512">512: </a><font color="#B22222">/*@</font>
-<a name="line513">513: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a> - Choose between locking and non-locking variants of</font>
-<a name="line514">514: </a><font color="#B22222">   the LOBPCG method.</font>
-
-<a name="line516">516: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line518">518: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line519">519: </a><font color="#B22222">+  eps  - the eigenproblem solver context</font>
-<a name="line520">520: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
-
-<a name="line522">522: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line523">523: </a><font color="#B22222">.  -eps_lobpcg_locking - Sets the locking flag</font>
-
-<a name="line525">525: </a><font color="#B22222">   Notes:</font>
-<a name="line526">526: </a><font color="#B22222">   This flag refers to soft locking (converged vectors within the current</font>
-<a name="line527">527: </a><font color="#B22222">   block iterate), since hard locking is always used (when nev is larger</font>
-<a name="line528">528: </a><font color="#B22222">   than the block size).</font>
-
-<a name="line530">530: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line532">532: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a>()</font>
-<a name="line533">533: </a><font color="#B22222">@*/</font>
-<a name="line534">534: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
-<a name="line535">535: </a>{
-
-<a name="line541">541: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,lock));
-<a name="line542">542: </a>  <font color="#4169E1">return</font>(0);
-<a name="line543">543: </a>}
-
-<a name="line547">547: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetLocking_LOBPCG"></a>static PetscErrorCode EPSLOBPCGGetLocking_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
-<a name="line548">548: </a>{
-<a name="line549">549: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
-
-<a name="line552">552: </a>  *lock = ctx->lock;
-<a name="line553">553: </a>  <font color="#4169E1">return</font>(0);
-<a name="line554">554: </a>}
-
-<a name="line558">558: </a><font color="#B22222">/*@</font>
-<a name="line559">559: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a> - Gets the locking flag used in the LOBPCG method.</font>
-
-<a name="line561">561: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line563">563: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line564">564: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line566">566: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line567">567: </a><font color="#B22222">.  lock - the locking flag</font>
-
-<a name="line569">569: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line571">571: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>()</font>
-<a name="line572">572: </a><font color="#B22222">@*/</font>
-<a name="line573">573: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
-<a name="line574">574: </a>{
-
-<a name="line580">580: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,lock));
-<a name="line581">581: </a>  <font color="#4169E1">return</font>(0);
-<a name="line582">582: </a>}
-
-<a name="line586">586: </a><strong><font color="#4169E1"><a name="EPSView_LOBPCG"></a>PetscErrorCode EPSView_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line587">587: </a>{
-<a name="line589">589: </a>  EPS_LOBPCG     *ctx = (EPS_LOBPCG*)eps->data;
-<a name="line590">590: </a>  PetscBool      isascii;
-
-<a name="line593">593: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line594">594: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line595">595: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  LOBPCG: block size %D\n"</font>,ctx->bs);
-<a name="line596">596: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  LOBPCG: soft locking %sactivated\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"de"</font>);
-<a name="line597">597: </a>  }
-<a name="line598">598: </a>  <font color="#4169E1">return</font>(0);
-<a name="line599">599: </a>}
-
-<a name="line603">603: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_LOBPCG"></a>PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line604">604: </a>{
-<a name="line606">606: </a>  PetscBool      lock,flg;
-<a name="line607">607: </a>  PetscInt       bs;
-<a name="line608">608: </a>  KSP            ksp;
-
-<a name="line611">611: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> LOBPCG Options"</font>);
-<a name="line612">612: </a>  PetscOptionsInt(<font color="#666666">"-eps_lobpcg_blocksize"</font>,<font color="#666666">"LOBPCG block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>"</font>,20,&bs,&flg);
-<a name="line613">613: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line614">614: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>(eps,bs);
-<a name="line615">615: </a>  }
-<a name="line616">616: </a>  PetscOptionsBool(<font color="#666666">"-eps_lobpcg_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>"</font>,PETSC_TRUE,&lock,&flg);
-<a name="line617">617: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line618">618: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>(eps,lock);
-<a name="line619">619: </a>  }
-
-<a name="line621">621: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line622">622: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
-<a name="line623">623: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
-<a name="line624">624: </a>  }
-
-<a name="line626">626: </a>  <font color="#B22222">/* Set the default options of the KSP */</font>
-<a name="line627">627: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line628">628: </a>  <font color="#4169E1">if</font> (!((PetscObject)ksp)->type_name) {
-<a name="line629">629: </a>    KSPSetType(ksp,KSPPREONLY);
-<a name="line630">630: </a>  }
-<a name="line631">631: </a>  PetscOptionsTail();
-<a name="line632">632: </a>  <font color="#4169E1">return</font>(0);
-<a name="line633">633: </a>}
-
-<a name="line637">637: </a><strong><font color="#4169E1"><a name="EPSDestroy_LOBPCG"></a>PetscErrorCode EPSDestroy_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line638">638: </a>{
-
-<a name="line642">642: </a>  PetscFree(eps->data);
-<a name="line643">643: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetBlockSize_C"</font>,NULL);
-<a name="line644">644: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetBlockSize_C"</font>,NULL);
-<a name="line645">645: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetLocking_C"</font>,NULL);
-<a name="line646">646: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetLocking_C"</font>,NULL);
-<a name="line647">647: </a>  <font color="#4169E1">return</font>(0);
-<a name="line648">648: </a>}
-
-<a name="line652">652: </a><strong><font color="#4169E1"><a name="EPSCreate_LOBPCG"></a>PETSC_EXTERN PetscErrorCode EPSCreate_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line653">653: </a>{
-<a name="line654">654: </a>  EPS_LOBPCG     *lobpcg;
-
-<a name="line658">658: </a>  PetscNewLog(eps,&lobpcg);
-<a name="line659">659: </a>  eps->data = (void*)lobpcg;
-<a name="line660">660: </a>  lobpcg->lock = PETSC_TRUE;
-
-<a name="line662">662: </a>  eps->ops->setup          = EPSSetUp_LOBPCG;
-<a name="line663">663: </a>  eps->ops->solve          = EPSSolve_LOBPCG;
-<a name="line664">664: </a>  eps->ops->setfromoptions = EPSSetFromOptions_LOBPCG;
-<a name="line665">665: </a>  eps->ops->destroy        = EPSDestroy_LOBPCG;
-<a name="line666">666: </a>  eps->ops->view           = EPSView_LOBPCG;
-<a name="line667">667: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
-<a name="line668">668: </a>  <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
-<a name="line669">669: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
-<a name="line670">670: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetBlockSize_C"</font>,EPSLOBPCGSetBlockSize_LOBPCG);
-<a name="line671">671: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetBlockSize_C"</font>,EPSLOBPCGGetBlockSize_LOBPCG);
-<a name="line672">672: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetLocking_C"</font>,EPSLOBPCGSetLocking_LOBPCG);
-<a name="line673">673: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetLocking_C"</font>,EPSLOBPCGGetLocking_LOBPCG);
-<a name="line674">674: </a>  <font color="#4169E1">return</font>(0);
-<a name="line675">675: </a>}
+<a name="line377">377: </a>    <font color="#B22222">/* 25-33. Compute Ritz vectors */</font>
+<a name="line378">378: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&M);
+<a name="line379">379: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,ctx->bs,nv);
+<a name="line380">380: </a>    <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line381">381: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(P,0,ctx->bs);
+<a name="line382">382: </a>    }
+<a name="line383">383: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(P,1.0,0.0,Z,M);
+<a name="line384">384: </a>    <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(P,X);
+<a name="line385">385: </a>    <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line386">386: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(P,nconv,ctx->bs);
+<a name="line387">387: </a>    }
+<a name="line388">388: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(Z,0,ctx->bs);
+<a name="line389">389: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(X,1.0,1.0,Z,M);
+<a name="line390">390: </a>    <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line391">391: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,nconv,ctx->bs);
+<a name="line392">392: </a>    }
+<a name="line393">393: </a>    <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,AX);
+<a name="line394">394: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&M);
+<a name="line395">395: </a>  }
+
+<a name="line397">397: </a>  PetscFree(eigr);
+<a name="line398">398: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Z);
+<a name="line399">399: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
+<a name="line400">400: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&R);
+<a name="line401">401: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&P);
+<a name="line402">402: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&AX);
+<a name="line403">403: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line404">404: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&BX);
+<a name="line405">405: </a>  }
+<a name="line406">406: </a>  <font color="#4169E1">if</font> (nc>0 || eps->nev>ctx->bs-guard) {
+<a name="line407">407: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Y);
+<a name="line408">408: </a>  }
+<a name="line409">409: </a>  <font color="#4169E1">return</font>(0);
+<a name="line410">410: </a>}
+
+<a name="line414">414: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetBlockSize_LOBPCG"></a>static PetscErrorCode EPSLOBPCGSetBlockSize_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line415">415: </a>{
+<a name="line416">416: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+<a name="line419">419: </a>  ctx->bs = bs;
+<a name="line420">420: </a>  <font color="#4169E1">return</font>(0);
+<a name="line421">421: </a>}
+
+<a name="line425">425: </a><font color="#B22222">/*@</font>
+<a name="line426">426: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a> - Sets the block size of the LOBPCG method.</font>
+
+<a name="line428">428: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line430">430: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line431">431: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line432">432: </a><font color="#B22222">-  bs  - the block size</font>
+
+<a name="line434">434: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line435">435: </a><font color="#B22222">.  -eps_lobpcg_blocksize - Sets the block size</font>
+
+<a name="line437">437: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line439">439: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a>()</font>
+<a name="line440">440: </a><font color="#B22222">@*/</font>
+<a name="line441">441: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line442">442: </a>{
+
+<a name="line448">448: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
+<a name="line449">449: </a>  <font color="#4169E1">return</font>(0);
+<a name="line450">450: </a>}
+
+<a name="line454">454: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetBlockSize_LOBPCG"></a>static PetscErrorCode EPSLOBPCGGetBlockSize_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
+<a name="line455">455: </a>{
+<a name="line456">456: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+<a name="line459">459: </a>  *bs = ctx->bs;
+<a name="line460">460: </a>  <font color="#4169E1">return</font>(0);
+<a name="line461">461: </a>}
+
+<a name="line465">465: </a><font color="#B22222">/*@</font>
+<a name="line466">466: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a> - Gets the block size used in the LOBPCG method.</font>
+
+<a name="line468">468: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line470">470: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line471">471: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line473">473: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line474">474: </a><font color="#B22222">.  bs - the block size</font>
+
+<a name="line476">476: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line478">478: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>()</font>
+<a name="line479">479: </a><font color="#B22222">@*/</font>
+<a name="line480">480: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetBlockSize.html#EPSLOBPCGGetBlockSize">EPSLOBPCGGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
+<a name="line481">481: </a>{
+
+<a name="line487">487: </a>  PetscUseMethod(eps,<font color="#666666">"EPSLOBPCGGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,bs));
+<a name="line488">488: </a>  <font color="#4169E1">return</font>(0);
+<a name="line489">489: </a>}
+
+<a name="line493">493: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetRestart_LOBPCG"></a>static PetscErrorCode EPSLOBPCGSetRestart_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal restart)</font></strong>
+<a name="line494">494: </a>{
+<a name="line495">495: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+<a name="line498">498: </a>  <font color="#4169E1">if</font> (restart==PETSC_DEFAULT) ctx->restart = 0.6;
+<a name="line499">499: </a>  <font color="#4169E1">else</font> {
+<a name="line500">500: </a>    <font color="#4169E1">if</font> (restart<0.1 || restart>1.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The restart argument must be in the range [0.1,1.0]"</font>);
+<a name="line501">501: </a>    ctx->restart = restart;
+<a name="line502">502: </a>  }
+<a name="line503">503: </a>  <font color="#4169E1">return</font>(0);
+<a name="line504">504: </a>}
+
+<a name="line508">508: </a><font color="#B22222">/*@</font>
+<a name="line509">509: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</a> - Sets the restart parameter for the LOBPCG method.</font>
+<a name="line510">510: </a><font color="#B22222">   The meaning of this parameter is the proportion of vectors within the</font>
+<a name="line511">511: </a><font color="#B22222">   current block iterate that must have converged in order to force a</font>
+<a name="line512">512: </a><font color="#B22222">   restart with hard locking.</font>
+
+<a name="line514">514: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line516">516: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line517">517: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line518">518: </a><font color="#B22222">-  restart - the percentage of the block of vectors to force a restart</font>
+
+<a name="line520">520: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line521">521: </a><font color="#B22222">.  -eps_lobpcg_restart - Sets the restart parameter</font>
+
+<a name="line523">523: </a><font color="#B22222">   Notes:</font>
+<a name="line524">524: </a><font color="#B22222">   Allowed values are in the range [0.1,1.0]. The default is 0.6.</font>
+
+<a name="line526">526: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line528">528: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetRestart.html#EPSLOBPCGGetRestart">EPSLOBPCGGetRestart</a>()</font>
+<a name="line529">529: </a><font color="#B22222">@*/</font>
+<a name="line530">530: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal restart)</font></strong>
+<a name="line531">531: </a>{
+
+<a name="line537">537: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal),(eps,restart));
+<a name="line538">538: </a>  <font color="#4169E1">return</font>(0);
+<a name="line539">539: </a>}
+
+<a name="line543">543: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetRestart_LOBPCG"></a>static PetscErrorCode EPSLOBPCGGetRestart_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *restart)</font></strong>
+<a name="line544">544: </a>{
+<a name="line545">545: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+<a name="line548">548: </a>  *restart = ctx->restart;
+<a name="line549">549: </a>  <font color="#4169E1">return</font>(0);
+<a name="line550">550: </a>}
+
+<a name="line554">554: </a><font color="#B22222">/*@</font>
+<a name="line555">555: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetRestart.html#EPSLOBPCGGetRestart">EPSLOBPCGGetRestart</a> - Gets the restart parameter used in the LOBPCG method.</font>
+
+<a name="line557">557: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line559">559: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line560">560: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line562">562: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line563">563: </a><font color="#B22222">.  restart - the restart parameter</font>
+
+<a name="line565">565: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line567">567: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</a>()</font>
+<a name="line568">568: </a><font color="#B22222">@*/</font>
+<a name="line569">569: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetRestart.html#EPSLOBPCGGetRestart">EPSLOBPCGGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *restart)</font></strong>
+<a name="line570">570: </a>{
+
+<a name="line576">576: </a>  PetscUseMethod(eps,<font color="#666666">"EPSLOBPCGGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,restart));
+<a name="line577">577: </a>  <font color="#4169E1">return</font>(0);
+<a name="line578">578: </a>}
+
+<a name="line582">582: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetLocking_LOBPCG"></a>static PetscErrorCode EPSLOBPCGSetLocking_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
+<a name="line583">583: </a>{
+<a name="line584">584: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+<a name="line587">587: </a>  ctx->lock = lock;
+<a name="line588">588: </a>  <font color="#4169E1">return</font>(0);
+<a name="line589">589: </a>}
+
+<a name="line593">593: </a><font color="#B22222">/*@</font>
+<a name="line594">594: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a> - Choose between locking and non-locking variants of</font>
+<a name="line595">595: </a><font color="#B22222">   the LOBPCG method.</font>
+
+<a name="line597">597: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line599">599: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line600">600: </a><font color="#B22222">+  eps  - the eigenproblem solver context</font>
+<a name="line601">601: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
+
+<a name="line603">603: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line604">604: </a><font color="#B22222">.  -eps_lobpcg_locking - Sets the locking flag</font>
+
+<a name="line606">606: </a><font color="#B22222">   Notes:</font>
+<a name="line607">607: </a><font color="#B22222">   This flag refers to soft locking (converged vectors within the current</font>
+<a name="line608">608: </a><font color="#B22222">   block iterate), since hard locking is always used (when nev is larger</font>
+<a name="line609">609: </a><font color="#B22222">   than the block size).</font>
+
+<a name="line611">611: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line613">613: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a>()</font>
+<a name="line614">614: </a><font color="#B22222">@*/</font>
+<a name="line615">615: </a><strong><font color="#4169E1"><a name="EPSLOBPCGSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
+<a name="line616">616: </a>{
+
+<a name="line622">622: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLOBPCGSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,lock));
+<a name="line623">623: </a>  <font color="#4169E1">return</font>(0);
+<a name="line624">624: </a>}
+
+<a name="line628">628: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetLocking_LOBPCG"></a>static PetscErrorCode EPSLOBPCGGetLocking_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
+<a name="line629">629: </a>{
+<a name="line630">630: </a>  EPS_LOBPCG *ctx = (EPS_LOBPCG*)eps->data;
+
+<a name="line633">633: </a>  *lock = ctx->lock;
+<a name="line634">634: </a>  <font color="#4169E1">return</font>(0);
+<a name="line635">635: </a>}
+
+<a name="line639">639: </a><font color="#B22222">/*@</font>
+<a name="line640">640: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a> - Gets the locking flag used in the LOBPCG method.</font>
+
+<a name="line642">642: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line644">644: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line645">645: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line647">647: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line648">648: </a><font color="#B22222">.  lock - the locking flag</font>
+
+<a name="line650">650: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line652">652: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>()</font>
+<a name="line653">653: </a><font color="#B22222">@*/</font>
+<a name="line654">654: </a><strong><font color="#4169E1"><a name="EPSLOBPCGGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGGetLocking.html#EPSLOBPCGGetLocking">EPSLOBPCGGetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
+<a name="line655">655: </a>{
+
+<a name="line661">661: </a>  PetscUseMethod(eps,<font color="#666666">"EPSLOBPCGGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,lock));
+<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
+<a name="line663">663: </a>}
+
+<a name="line667">667: </a><strong><font color="#4169E1"><a name="EPSView_LOBPCG"></a>PetscErrorCode EPSView_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line668">668: </a>{
+<a name="line670">670: </a>  EPS_LOBPCG     *ctx = (EPS_LOBPCG*)eps->data;
+<a name="line671">671: </a>  PetscBool      isascii;
+
+<a name="line674">674: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line675">675: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line676">676: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  LOBPCG: block size %D\n"</font>,ctx->bs);
+<a name="line677">677: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  LOBPCG: restart parameter=%g (using %d guard vectors)\n"</font>,(double)ctx->restart,(int)((1.0-ctx->restart)*ctx->bs));
+<a name="line678">678: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  LOBPCG: soft locking %sactivated\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"de"</font>);
+<a name="line679">679: </a>  }
+<a name="line680">680: </a>  <font color="#4169E1">return</font>(0);
+<a name="line681">681: </a>}
+
+<a name="line685">685: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_LOBPCG"></a>PetscErrorCode EPSSetFromOptions_LOBPCG(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line686">686: </a>{
+<a name="line688">688: </a>  PetscBool      lock,flg;
+<a name="line689">689: </a>  PetscInt       bs;
+<a name="line690">690: </a>  PetscReal      restart;
+<a name="line691">691: </a>  KSP            ksp;
+
+<a name="line694">694: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> LOBPCG Options"</font>);
+<a name="line695">695: </a>  PetscOptionsInt(<font color="#666666">"-eps_lobpcg_blocksize"</font>,<font color="#666666">"LOBPCG block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>"</font>,20,&bs,&flg);
+<a name="line696">696: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line697">697: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetBlockSize.html#EPSLOBPCGSetBlockSize">EPSLOBPCGSetBlockSize</a>(eps,bs);
+<a name="line698">698: </a>  }
+<a name="line699">699: </a>  PetscOptionsReal(<font color="#666666">"-eps_lobpcg_restart"</font>,<font color="#666666">"Percentage of the block of vectors to force a restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</a>"</font>,0.5,&restart,&flg);
+<a name="line700">700: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line701">701: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetRestart.html#EPSLOBPCGSetRestart">EPSLOBPCGSetRestart</a>(eps,restart);
+<a name="line702">702: </a>  }
+<a name="line703">703: </a>  PetscOptionsBool(<font color="#666666">"-eps_lobpcg_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>"</font>,PETSC_TRUE,&lock,&flg);
+<a name="line704">704: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line705">705: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLOBPCGSetLocking.html#EPSLOBPCGSetLocking">EPSLOBPCGSetLocking</a>(eps,lock);
+<a name="line706">706: </a>  }
+
+<a name="line708">708: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line709">709: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
+<a name="line710">710: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
+<a name="line711">711: </a>  }
+
+<a name="line713">713: </a>  <font color="#B22222">/* Set the default options of the KSP */</font>
+<a name="line714">714: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line715">715: </a>  <font color="#4169E1">if</font> (!((PetscObject)ksp)->type_name) {
+<a name="line716">716: </a>    KSPSetType(ksp,KSPPREONLY);
+<a name="line717">717: </a>  }
+<a name="line718">718: </a>  PetscOptionsTail();
+<a name="line719">719: </a>  <font color="#4169E1">return</font>(0);
+<a name="line720">720: </a>}
+
+<a name="line724">724: </a><strong><font color="#4169E1"><a name="EPSDestroy_LOBPCG"></a>PetscErrorCode EPSDestroy_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line725">725: </a>{
+
+<a name="line729">729: </a>  PetscFree(eps->data);
+<a name="line730">730: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetBlockSize_C"</font>,NULL);
+<a name="line731">731: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetBlockSize_C"</font>,NULL);
+<a name="line732">732: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetRestart_C"</font>,NULL);
+<a name="line733">733: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetRestart_C"</font>,NULL);
+<a name="line734">734: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetLocking_C"</font>,NULL);
+<a name="line735">735: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetLocking_C"</font>,NULL);
+<a name="line736">736: </a>  <font color="#4169E1">return</font>(0);
+<a name="line737">737: </a>}
+
+<a name="line741">741: </a><strong><font color="#4169E1"><a name="EPSCreate_LOBPCG"></a>PETSC_EXTERN PetscErrorCode EPSCreate_LOBPCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line742">742: </a>{
+<a name="line743">743: </a>  EPS_LOBPCG     *lobpcg;
+
+<a name="line747">747: </a>  PetscNewLog(eps,&lobpcg);
+<a name="line748">748: </a>  eps->data = (void*)lobpcg;
+<a name="line749">749: </a>  lobpcg->lock = PETSC_TRUE;
+
+<a name="line751">751: </a>  eps->ops->setup          = EPSSetUp_LOBPCG;
+<a name="line752">752: </a>  eps->ops->solve          = EPSSolve_LOBPCG;
+<a name="line753">753: </a>  eps->ops->setfromoptions = EPSSetFromOptions_LOBPCG;
+<a name="line754">754: </a>  eps->ops->destroy        = EPSDestroy_LOBPCG;
+<a name="line755">755: </a>  eps->ops->view           = EPSView_LOBPCG;
+<a name="line756">756: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+<a name="line757">757: </a>  <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
+<a name="line758">758: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
+<a name="line759">759: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetBlockSize_C"</font>,EPSLOBPCGSetBlockSize_LOBPCG);
+<a name="line760">760: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetBlockSize_C"</font>,EPSLOBPCGGetBlockSize_LOBPCG);
+<a name="line761">761: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetRestart_C"</font>,EPSLOBPCGSetRestart_LOBPCG);
+<a name="line762">762: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetRestart_C"</font>,EPSLOBPCGGetRestart_LOBPCG);
+<a name="line763">763: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGSetLocking_C"</font>,EPSLOBPCGSetLocking_LOBPCG);
+<a name="line764">764: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLOBPCGGetLocking_C"</font>,EPSLOBPCGGetLocking_LOBPCG);
+<a name="line765">765: </a>  <font color="#4169E1">return</font>(0);
+<a name="line766">766: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/cg/lobpcg/makefile b/src/eps/impls/cg/lobpcg/makefile
index 3621222..4ac1605 100644
--- a/src/eps/impls/cg/lobpcg/makefile
+++ b/src/eps/impls/cg/lobpcg/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/cg/lobpcg/makefile.html b/src/eps/impls/cg/lobpcg/makefile.html
index d61f933..c742518 100644
--- a/src/eps/impls/cg/lobpcg/makefile.html
+++ b/src/eps/impls/cg/lobpcg/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/cg/lobpcg/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:13+00:00">
+<meta name="date" content="2016-05-16T10:33:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/lobpcg/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/lobpcg/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/cg/makefile b/src/eps/impls/cg/makefile
index 07d8d39..0b10d58 100644
--- a/src/eps/impls/cg/makefile
+++ b/src/eps/impls/cg/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/cg/makefile.html b/src/eps/impls/cg/makefile.html
index f1b3601..7ca4a31 100644
--- a/src/eps/impls/cg/makefile.html
+++ b/src/eps/impls/cg/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/cg/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:11+00:00">
+<meta name="date" content="2016-05-16T10:33:06+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/cg/rqcg/index.html b/src/eps/impls/cg/rqcg/index.html
index 1002bdd..645bbbf 100644
--- a/src/eps/impls/cg/rqcg/index.html
+++ b/src/eps/impls/cg/rqcg/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/rqcg/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/rqcg/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/cg/rqcg/makefile b/src/eps/impls/cg/rqcg/makefile
index 2c570fe..8318b11 100644
--- a/src/eps/impls/cg/rqcg/makefile
+++ b/src/eps/impls/cg/rqcg/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/cg/rqcg/makefile.html b/src/eps/impls/cg/rqcg/makefile.html
index 9db4d48..7e55dfd 100644
--- a/src/eps/impls/cg/rqcg/makefile.html
+++ b/src/eps/impls/cg/rqcg/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/cg/rqcg/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:12+00:00">
+<meta name="date" content="2016-05-16T10:33:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/rqcg/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/rqcg/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/cg/rqcg/rqcg.c b/src/eps/impls/cg/rqcg/rqcg.c
index 5bac29d..72ceea7 100644
--- a/src/eps/impls/cg/rqcg/rqcg.c
+++ b/src/eps/impls/cg/rqcg/rqcg.c
@@ -17,7 +17,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -143,7 +143,7 @@ PetscErrorCode EPSSolve_RQCG(EPS eps)
     ierr = DSSetDimensions(eps->ds,nv,0,eps->nconv,0);CHKERRQ(ierr);
     /* Generate more initial vectors if necessary */
     while (kini<nv) {
-      ierr = BVSetRandomColumn(eps->V,kini,eps->rand);CHKERRQ(ierr);
+      ierr = BVSetRandomColumn(eps->V,kini);CHKERRQ(ierr);
       ierr = BVOrthogonalizeColumn(eps->V,kini,NULL,&norm,&breakdown);CHKERRQ(ierr);
       if (norm>0.0 && !breakdown) {
         ierr = BVScaleColumn(eps->V,kini,1.0/norm);CHKERRQ(ierr);
@@ -217,8 +217,7 @@ PetscErrorCode EPSSolve_RQCG(EPS eps)
       if (k==-1 && eps->errest[i] >= eps->tol) k = i;
     }
     if (k==-1) k = nv;
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-    if (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
 
     /* The next lines are necessary to avoid DS zeroing eigr */
     ierr = DSGetArray(eps->ds,DS_MAT_A,&C);CHKERRQ(ierr);
@@ -372,7 +371,7 @@ PetscErrorCode EPSRQCGGetReset(EPS eps,PetscInt *nrest)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(nrest,2);
-  ierr = PetscTryMethod(eps,"EPSRQCGGetReset_C",(EPS,PetscInt*),(eps,nrest));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSRQCGGetReset_C",(EPS,PetscInt*),(eps,nrest));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -394,7 +393,7 @@ PetscErrorCode EPSReset_RQCG(EPS eps)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_RQCG"
-PetscErrorCode EPSSetFromOptions_RQCG(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_RQCG(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   PetscBool      flg;
diff --git a/src/eps/impls/cg/rqcg/rqcg.c.html b/src/eps/impls/cg/rqcg/rqcg.c.html
index 5712b3f..1ac56db 100644
--- a/src/eps/impls/cg/rqcg/rqcg.c.html
+++ b/src/eps/impls/cg/rqcg/rqcg.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/cg/rqcg/rqcg.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:11+00:00">
+<meta name="date" content="2016-05-16T10:33:06+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/cg/rqcg/rqcg.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/cg/rqcg/rqcg.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "rqcg"</font>
@@ -29,7 +29,7 @@
 
 <a name="line18"> 18: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line19"> 19: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line20"> 20: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line20"> 20: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line22"> 22: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -143,7 +143,7 @@
 <a name="line143">143: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,eps->nconv,0);
 <a name="line144">144: </a>    <font color="#B22222">/* Generate more initial vectors if necessary */</font>
 <a name="line145">145: </a>    <font color="#4169E1">while</font> (kini<nv) {
-<a name="line146">146: </a>      <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,kini,eps->rand);
+<a name="line146">146: </a>      <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,kini);
 <a name="line147">147: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,kini,NULL,&norm,&breakdown);
 <a name="line148">148: </a>      <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
 <a name="line149">149: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,kini,1.0/norm);
@@ -217,214 +217,213 @@
 <a name="line217">217: </a>      <font color="#4169E1">if</font> (k==-1 && eps->errest[i] >= eps->tol) k = i;
 <a name="line218">218: </a>    }
 <a name="line219">219: </a>    <font color="#4169E1">if</font> (k==-1) k = nv;
-<a name="line220">220: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line221">221: </a>    <font color="#4169E1">if</font> (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-
-<a name="line223">223: </a>    <font color="#B22222">/* The next lines are necessary to avoid <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> zeroing eigr */</font>
-<a name="line224">224: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&C);
-<a name="line225">225: </a>    <font color="#4169E1">for</font> (i=eps->nconv;i<k;i++) C[i+i*ld] = eps->eigr[i];
-<a name="line226">226: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&C);
-
-<a name="line228">228: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-
-<a name="line230">230: </a>      <font color="#B22222">/* Search direction */</font>
-<a name="line231">231: </a>      <font color="#4169E1">for</font> (i=0;i<nv-eps->nconv;i++) {
-<a name="line232">232: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->G,i,&v);
-<a name="line233">233: </a>        <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,v,w);
-<a name="line234">234: </a>        VecDot(v,w,&g);
-<a name="line235">235: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->G,i,&v);
-<a name="line236">236: </a>        beta = (!reset && eps->its>1)? g/gamma[i]: 0.0;
-<a name="line237">237: </a>        gamma[i] = g;
-<a name="line238">238: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->P,i,&v);
-<a name="line239">239: </a>        VecAXPBY(v,1.0,beta,w);
-<a name="line240">240: </a>        <font color="#4169E1">if</font> (i+eps->nconv>0) {
-<a name="line241">241: </a>          <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,i+eps->nconv);
-<a name="line242">242: </a>          <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(eps->V,v,NULL,NULL,NULL);
-<a name="line243">243: </a>        }
-<a name="line244">244: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->P,i,&v);
-<a name="line245">245: </a>      }
-
-<a name="line247">247: </a>      <font color="#B22222">/* Minimization problem */</font>
-<a name="line248">248: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line249">249: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&v);
-<a name="line250">250: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->AV,i-eps->nconv,&av);
-<a name="line251">251: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->P,i-eps->nconv,&p);
-<a name="line252">252: </a>        VecDot(v,av,&nu);
-<a name="line253">253: </a>        VecDot(p,av,&pax);
-<a name="line254">254: </a>        MatMult(A,p,w);
-<a name="line255">255: </a>        VecDot(p,w,&pap);
-<a name="line256">256: </a>        <font color="#4169E1">if</font> (B) {
-<a name="line257">257: </a>          <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->W,i-eps->nconv,&bv);
-<a name="line258">258: </a>          VecDot(v,bv,&mu);
-<a name="line259">259: </a>          VecDot(p,bv,&pbx);
-<a name="line260">260: </a>          <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->W,i-eps->nconv,&bv);
-<a name="line261">261: </a>          MatMult(B,p,w);
-<a name="line262">262: </a>          VecDot(p,w,&pbp);
-<a name="line263">263: </a>        } <font color="#4169E1">else</font> {
-<a name="line264">264: </a>          VecDot(v,v,&mu);
-<a name="line265">265: </a>          VecDot(p,v,&pbx);
-<a name="line266">266: </a>          VecDot(p,p,&pbp);
-<a name="line267">267: </a>        }
-<a name="line268">268: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->AV,i-eps->nconv,&av);
-<a name="line269">269: </a>        a = PetscRealPart(pap*pbx-pax*pbp);
-<a name="line270">270: </a>        b = PetscRealPart(nu*pbp-mu*pap);
-<a name="line271">271: </a>        c = PetscRealPart(mu*pax-nu*pbx);
-<a name="line272">272: </a>        t = PetscMax(PetscMax(PetscAbsReal(a),PetscAbsReal(b)),PetscAbsReal(c));
-<a name="line273">273: </a>        <font color="#4169E1">if</font> (t!=0.0) { a /= t; b /= t; c /= t; }
-<a name="line274">274: </a>        disc = PetscSqrtReal(PetscAbsReal(b*b-4.0*a*c));
-<a name="line275">275: </a>        <font color="#4169E1">if</font> (b>=0.0 && a!=0.0) alpha = (b+disc)/(2.0*a);
-<a name="line276">276: </a>        <font color="#4169E1">else</font> <font color="#4169E1">if</font> (b!=disc) alpha = 2.0*c/(b-disc);
-<a name="line277">277: </a>        <font color="#4169E1">else</font> alpha = 0;
-<a name="line278">278: </a>        <font color="#B22222">/* Next iterate */</font>
-<a name="line279">279: </a>        <font color="#4169E1">if</font> (alpha!=0.0) {
-<a name="line280">280: </a>          VecAXPY(v,alpha,p);
-<a name="line281">281: </a>        }
-<a name="line282">282: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&v);
-<a name="line283">283: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->P,i-eps->nconv,&p);
-<a name="line284">284: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&breakdown);
-<a name="line285">285: </a>        <font color="#4169E1">if</font> (!breakdown && norm!=0.0) {
-<a name="line286">286: </a>          <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1.0/norm);
-<a name="line287">287: </a>        }
-<a name="line288">288: </a>      }
-<a name="line289">289: </a>    }
-
-<a name="line291">291: </a>    EPSMonitor(eps,eps->its,k,eps->eigr,eps->eigi,eps->errest,nv);
-<a name="line292">292: </a>    eps->nconv = k;
-<a name="line293">293: </a>  }
-
-<a name="line295">295: </a>  PetscFree(gamma);
-<a name="line296">296: </a>  <font color="#4169E1">return</font>(0);
-<a name="line297">297: </a>}
-
-<a name="line301">301: </a><strong><font color="#4169E1"><a name="EPSRQCGSetReset_RQCG"></a>static PetscErrorCode EPSRQCGSetReset_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nrest)</font></strong>
-<a name="line302">302: </a>{
-<a name="line303">303: </a>  EPS_RQCG *ctx = (EPS_RQCG*)eps->data;
-
-<a name="line306">306: </a>  ctx->nrest = nrest;
-<a name="line307">307: </a>  <font color="#4169E1">return</font>(0);
-<a name="line308">308: </a>}
-
-<a name="line312">312: </a><font color="#B22222">/*@</font>
-<a name="line313">313: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a> - Sets the reset parameter of the RQCG iteration. Every</font>
-<a name="line314">314: </a><font color="#B22222">   nrest iterations, the solver performs a Rayleigh-Ritz projection step.</font>
-
-<a name="line316">316: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line318">318: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line319">319: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line320">320: </a><font color="#B22222">-  nrest - the number of iterations between resets</font>
-
-<a name="line322">322: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line323">323: </a><font color="#B22222">.  -eps_rqcg_reset - Sets the reset parameter</font>
-
-<a name="line325">325: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line327">327: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a>()</font>
-<a name="line328">328: </a><font color="#B22222">@*/</font>
-<a name="line329">329: </a><strong><font color="#4169E1"><a name="EPSRQCGSetReset"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nrest)</font></strong>
-<a name="line330">330: </a>{
-
-<a name="line336">336: </a>  PetscTryMethod(eps,<font color="#666666">"EPSRQCGSetReset_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,nrest));
-<a name="line337">337: </a>  <font color="#4169E1">return</font>(0);
-<a name="line338">338: </a>}
-
-<a name="line342">342: </a><strong><font color="#4169E1"><a name="EPSRQCGGetReset_RQCG"></a>static PetscErrorCode EPSRQCGGetReset_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nrest)</font></strong>
-<a name="line343">343: </a>{
-<a name="line344">344: </a>  EPS_RQCG *ctx = (EPS_RQCG*)eps->data;
-
-<a name="line347">347: </a>  *nrest = ctx->nrest;
-<a name="line348">348: </a>  <font color="#4169E1">return</font>(0);
-<a name="line349">349: </a>}
-
-<a name="line353">353: </a><font color="#B22222">/*@</font>
-<a name="line354">354: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a> - Gets the reset parameter used in the RQCG method.</font>
-
-<a name="line356">356: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line358">358: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line359">359: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line361">361: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line362">362: </a><font color="#B22222">.  nrest - the reset parameter</font>
-
-<a name="line364">364: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line366">366: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>()</font>
-<a name="line367">367: </a><font color="#B22222">@*/</font>
-<a name="line368">368: </a><strong><font color="#4169E1"><a name="EPSRQCGGetReset"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nrest)</font></strong>
-<a name="line369">369: </a>{
-
-<a name="line375">375: </a>  PetscTryMethod(eps,<font color="#666666">"EPSRQCGGetReset_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,nrest));
-<a name="line376">376: </a>  <font color="#4169E1">return</font>(0);
-<a name="line377">377: </a>}
-
-<a name="line381">381: </a><strong><font color="#4169E1"><a name="EPSReset_RQCG"></a>PetscErrorCode EPSReset_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line382">382: </a>{
-<a name="line384">384: </a>  EPS_RQCG       *ctx = (EPS_RQCG*)eps->data;
-
-<a name="line387">387: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->AV);
-<a name="line388">388: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->W);
-<a name="line389">389: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->P);
-<a name="line390">390: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->G);
-<a name="line391">391: </a>  ctx->nrest = 0;
-<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
-<a name="line393">393: </a>}
-
-<a name="line397">397: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_RQCG"></a>PetscErrorCode EPSSetFromOptions_RQCG(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line398">398: </a>{
-<a name="line400">400: </a>  PetscBool      flg;
-<a name="line401">401: </a>  PetscInt       nrest;
-
-<a name="line404">404: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> RQCG Options"</font>);
-<a name="line405">405: </a>  PetscOptionsInt(<font color="#666666">"-eps_rqcg_reset"</font>,<font color="#666666">"RQCG reset parameter"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>"</font>,20,&nrest,&flg);
-<a name="line406">406: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line407">407: </a>    <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>(eps,nrest);
-<a name="line408">408: </a>  }
-<a name="line409">409: </a>  PetscOptionsTail();
-<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
-<a name="line411">411: </a>}
-
-<a name="line415">415: </a><strong><font color="#4169E1"><a name="EPSDestroy_RQCG"></a>PetscErrorCode EPSDestroy_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line416">416: </a>{
-
-<a name="line420">420: </a>  PetscFree(eps->data);
-<a name="line421">421: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGSetReset_C"</font>,NULL);
-<a name="line422">422: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGGetReset_C"</font>,NULL);
-<a name="line423">423: </a>  <font color="#4169E1">return</font>(0);
-<a name="line424">424: </a>}
-
-<a name="line428">428: </a><strong><font color="#4169E1"><a name="EPSView_RQCG"></a>PetscErrorCode EPSView_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line429">429: </a>{
-<a name="line431">431: </a>  EPS_RQCG       *ctx = (EPS_RQCG*)eps->data;
-<a name="line432">432: </a>  PetscBool      isascii;
-
-<a name="line435">435: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line436">436: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line437">437: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  RQCG: reset every %D iterations\n"</font>,ctx->nrest);
-<a name="line438">438: </a>  }
-<a name="line439">439: </a>  <font color="#4169E1">return</font>(0);
-<a name="line440">440: </a>}
-
-<a name="line444">444: </a><strong><font color="#4169E1"><a name="EPSCreate_RQCG"></a>PETSC_EXTERN PetscErrorCode EPSCreate_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line445">445: </a>{
-<a name="line446">446: </a>  EPS_RQCG       *rqcg;
-
-<a name="line450">450: </a>  PetscNewLog(eps,&rqcg);
-<a name="line451">451: </a>  eps->data = (void*)rqcg;
-
-<a name="line453">453: </a>  eps->ops->setup          = EPSSetUp_RQCG;
-<a name="line454">454: </a>  eps->ops->solve          = EPSSolve_RQCG;
-<a name="line455">455: </a>  eps->ops->setfromoptions = EPSSetFromOptions_RQCG;
-<a name="line456">456: </a>  eps->ops->destroy        = EPSDestroy_RQCG;
-<a name="line457">457: </a>  eps->ops->reset          = EPSReset_RQCG;
-<a name="line458">458: </a>  eps->ops->view           = EPSView_RQCG;
-<a name="line459">459: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
-<a name="line460">460: </a>  <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
-<a name="line461">461: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
-<a name="line462">462: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGSetReset_C"</font>,EPSRQCGSetReset_RQCG);
-<a name="line463">463: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGGetReset_C"</font>,EPSRQCGGetReset_RQCG);
-<a name="line464">464: </a>  <font color="#4169E1">return</font>(0);
-<a name="line465">465: </a>}
+<a name="line220">220: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);
+
+<a name="line222">222: </a>    <font color="#B22222">/* The next lines are necessary to avoid <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> zeroing eigr */</font>
+<a name="line223">223: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&C);
+<a name="line224">224: </a>    <font color="#4169E1">for</font> (i=eps->nconv;i<k;i++) C[i+i*ld] = eps->eigr[i];
+<a name="line225">225: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&C);
+
+<a name="line227">227: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+
+<a name="line229">229: </a>      <font color="#B22222">/* Search direction */</font>
+<a name="line230">230: </a>      <font color="#4169E1">for</font> (i=0;i<nv-eps->nconv;i++) {
+<a name="line231">231: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->G,i,&v);
+<a name="line232">232: </a>        <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,v,w);
+<a name="line233">233: </a>        VecDot(v,w,&g);
+<a name="line234">234: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->G,i,&v);
+<a name="line235">235: </a>        beta = (!reset && eps->its>1)? g/gamma[i]: 0.0;
+<a name="line236">236: </a>        gamma[i] = g;
+<a name="line237">237: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->P,i,&v);
+<a name="line238">238: </a>        VecAXPBY(v,1.0,beta,w);
+<a name="line239">239: </a>        <font color="#4169E1">if</font> (i+eps->nconv>0) {
+<a name="line240">240: </a>          <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,i+eps->nconv);
+<a name="line241">241: </a>          <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(eps->V,v,NULL,NULL,NULL);
+<a name="line242">242: </a>        }
+<a name="line243">243: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->P,i,&v);
+<a name="line244">244: </a>      }
+
+<a name="line246">246: </a>      <font color="#B22222">/* Minimization problem */</font>
+<a name="line247">247: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line248">248: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&v);
+<a name="line249">249: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->AV,i-eps->nconv,&av);
+<a name="line250">250: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->P,i-eps->nconv,&p);
+<a name="line251">251: </a>        VecDot(v,av,&nu);
+<a name="line252">252: </a>        VecDot(p,av,&pax);
+<a name="line253">253: </a>        MatMult(A,p,w);
+<a name="line254">254: </a>        VecDot(p,w,&pap);
+<a name="line255">255: </a>        <font color="#4169E1">if</font> (B) {
+<a name="line256">256: </a>          <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->W,i-eps->nconv,&bv);
+<a name="line257">257: </a>          VecDot(v,bv,&mu);
+<a name="line258">258: </a>          VecDot(p,bv,&pbx);
+<a name="line259">259: </a>          <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->W,i-eps->nconv,&bv);
+<a name="line260">260: </a>          MatMult(B,p,w);
+<a name="line261">261: </a>          VecDot(p,w,&pbp);
+<a name="line262">262: </a>        } <font color="#4169E1">else</font> {
+<a name="line263">263: </a>          VecDot(v,v,&mu);
+<a name="line264">264: </a>          VecDot(p,v,&pbx);
+<a name="line265">265: </a>          VecDot(p,p,&pbp);
+<a name="line266">266: </a>        }
+<a name="line267">267: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->AV,i-eps->nconv,&av);
+<a name="line268">268: </a>        a = PetscRealPart(pap*pbx-pax*pbp);
+<a name="line269">269: </a>        b = PetscRealPart(nu*pbp-mu*pap);
+<a name="line270">270: </a>        c = PetscRealPart(mu*pax-nu*pbx);
+<a name="line271">271: </a>        t = PetscMax(PetscMax(PetscAbsReal(a),PetscAbsReal(b)),PetscAbsReal(c));
+<a name="line272">272: </a>        <font color="#4169E1">if</font> (t!=0.0) { a /= t; b /= t; c /= t; }
+<a name="line273">273: </a>        disc = PetscSqrtReal(PetscAbsReal(b*b-4.0*a*c));
+<a name="line274">274: </a>        <font color="#4169E1">if</font> (b>=0.0 && a!=0.0) alpha = (b+disc)/(2.0*a);
+<a name="line275">275: </a>        <font color="#4169E1">else</font> <font color="#4169E1">if</font> (b!=disc) alpha = 2.0*c/(b-disc);
+<a name="line276">276: </a>        <font color="#4169E1">else</font> alpha = 0;
+<a name="line277">277: </a>        <font color="#B22222">/* Next iterate */</font>
+<a name="line278">278: </a>        <font color="#4169E1">if</font> (alpha!=0.0) {
+<a name="line279">279: </a>          VecAXPY(v,alpha,p);
+<a name="line280">280: </a>        }
+<a name="line281">281: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&v);
+<a name="line282">282: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->P,i-eps->nconv,&p);
+<a name="line283">283: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&breakdown);
+<a name="line284">284: </a>        <font color="#4169E1">if</font> (!breakdown && norm!=0.0) {
+<a name="line285">285: </a>          <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1.0/norm);
+<a name="line286">286: </a>        }
+<a name="line287">287: </a>      }
+<a name="line288">288: </a>    }
+
+<a name="line290">290: </a>    EPSMonitor(eps,eps->its,k,eps->eigr,eps->eigi,eps->errest,nv);
+<a name="line291">291: </a>    eps->nconv = k;
+<a name="line292">292: </a>  }
+
+<a name="line294">294: </a>  PetscFree(gamma);
+<a name="line295">295: </a>  <font color="#4169E1">return</font>(0);
+<a name="line296">296: </a>}
+
+<a name="line300">300: </a><strong><font color="#4169E1"><a name="EPSRQCGSetReset_RQCG"></a>static PetscErrorCode EPSRQCGSetReset_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nrest)</font></strong>
+<a name="line301">301: </a>{
+<a name="line302">302: </a>  EPS_RQCG *ctx = (EPS_RQCG*)eps->data;
+
+<a name="line305">305: </a>  ctx->nrest = nrest;
+<a name="line306">306: </a>  <font color="#4169E1">return</font>(0);
+<a name="line307">307: </a>}
+
+<a name="line311">311: </a><font color="#B22222">/*@</font>
+<a name="line312">312: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a> - Sets the reset parameter of the RQCG iteration. Every</font>
+<a name="line313">313: </a><font color="#B22222">   nrest iterations, the solver performs a Rayleigh-Ritz projection step.</font>
+
+<a name="line315">315: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line317">317: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line318">318: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line319">319: </a><font color="#B22222">-  nrest - the number of iterations between resets</font>
+
+<a name="line321">321: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line322">322: </a><font color="#B22222">.  -eps_rqcg_reset - Sets the reset parameter</font>
+
+<a name="line324">324: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line326">326: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a>()</font>
+<a name="line327">327: </a><font color="#B22222">@*/</font>
+<a name="line328">328: </a><strong><font color="#4169E1"><a name="EPSRQCGSetReset"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nrest)</font></strong>
+<a name="line329">329: </a>{
+
+<a name="line335">335: </a>  PetscTryMethod(eps,<font color="#666666">"EPSRQCGSetReset_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,nrest));
+<a name="line336">336: </a>  <font color="#4169E1">return</font>(0);
+<a name="line337">337: </a>}
+
+<a name="line341">341: </a><strong><font color="#4169E1"><a name="EPSRQCGGetReset_RQCG"></a>static PetscErrorCode EPSRQCGGetReset_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nrest)</font></strong>
+<a name="line342">342: </a>{
+<a name="line343">343: </a>  EPS_RQCG *ctx = (EPS_RQCG*)eps->data;
+
+<a name="line346">346: </a>  *nrest = ctx->nrest;
+<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
+<a name="line348">348: </a>}
+
+<a name="line352">352: </a><font color="#B22222">/*@</font>
+<a name="line353">353: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a> - Gets the reset parameter used in the RQCG method.</font>
+
+<a name="line355">355: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line357">357: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line358">358: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line360">360: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line361">361: </a><font color="#B22222">.  nrest - the reset parameter</font>
+
+<a name="line363">363: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line365">365: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>()</font>
+<a name="line366">366: </a><font color="#B22222">@*/</font>
+<a name="line367">367: </a><strong><font color="#4169E1"><a name="EPSRQCGGetReset"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSRQCGGetReset.html#EPSRQCGGetReset">EPSRQCGGetReset</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nrest)</font></strong>
+<a name="line368">368: </a>{
+
+<a name="line374">374: </a>  PetscUseMethod(eps,<font color="#666666">"EPSRQCGGetReset_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,nrest));
+<a name="line375">375: </a>  <font color="#4169E1">return</font>(0);
+<a name="line376">376: </a>}
+
+<a name="line380">380: </a><strong><font color="#4169E1"><a name="EPSReset_RQCG"></a>PetscErrorCode EPSReset_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line381">381: </a>{
+<a name="line383">383: </a>  EPS_RQCG       *ctx = (EPS_RQCG*)eps->data;
+
+<a name="line386">386: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->AV);
+<a name="line387">387: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->W);
+<a name="line388">388: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->P);
+<a name="line389">389: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->G);
+<a name="line390">390: </a>  ctx->nrest = 0;
+<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
+<a name="line392">392: </a>}
+
+<a name="line396">396: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_RQCG"></a>PetscErrorCode EPSSetFromOptions_RQCG(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line397">397: </a>{
+<a name="line399">399: </a>  PetscBool      flg;
+<a name="line400">400: </a>  PetscInt       nrest;
+
+<a name="line403">403: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> RQCG Options"</font>);
+<a name="line404">404: </a>  PetscOptionsInt(<font color="#666666">"-eps_rqcg_reset"</font>,<font color="#666666">"RQCG reset parameter"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>"</font>,20,&nrest,&flg);
+<a name="line405">405: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line406">406: </a>    <a href="../../../../../docs/manualpages/EPS/EPSRQCGSetReset.html#EPSRQCGSetReset">EPSRQCGSetReset</a>(eps,nrest);
+<a name="line407">407: </a>  }
+<a name="line408">408: </a>  PetscOptionsTail();
+<a name="line409">409: </a>  <font color="#4169E1">return</font>(0);
+<a name="line410">410: </a>}
+
+<a name="line414">414: </a><strong><font color="#4169E1"><a name="EPSDestroy_RQCG"></a>PetscErrorCode EPSDestroy_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line415">415: </a>{
+
+<a name="line419">419: </a>  PetscFree(eps->data);
+<a name="line420">420: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGSetReset_C"</font>,NULL);
+<a name="line421">421: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGGetReset_C"</font>,NULL);
+<a name="line422">422: </a>  <font color="#4169E1">return</font>(0);
+<a name="line423">423: </a>}
+
+<a name="line427">427: </a><strong><font color="#4169E1"><a name="EPSView_RQCG"></a>PetscErrorCode EPSView_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line428">428: </a>{
+<a name="line430">430: </a>  EPS_RQCG       *ctx = (EPS_RQCG*)eps->data;
+<a name="line431">431: </a>  PetscBool      isascii;
+
+<a name="line434">434: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line435">435: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line436">436: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  RQCG: reset every %D iterations\n"</font>,ctx->nrest);
+<a name="line437">437: </a>  }
+<a name="line438">438: </a>  <font color="#4169E1">return</font>(0);
+<a name="line439">439: </a>}
+
+<a name="line443">443: </a><strong><font color="#4169E1"><a name="EPSCreate_RQCG"></a>PETSC_EXTERN PetscErrorCode EPSCreate_RQCG(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line444">444: </a>{
+<a name="line445">445: </a>  EPS_RQCG       *rqcg;
+
+<a name="line449">449: </a>  PetscNewLog(eps,&rqcg);
+<a name="line450">450: </a>  eps->data = (void*)rqcg;
+
+<a name="line452">452: </a>  eps->ops->setup          = EPSSetUp_RQCG;
+<a name="line453">453: </a>  eps->ops->solve          = EPSSolve_RQCG;
+<a name="line454">454: </a>  eps->ops->setfromoptions = EPSSetFromOptions_RQCG;
+<a name="line455">455: </a>  eps->ops->destroy        = EPSDestroy_RQCG;
+<a name="line456">456: </a>  eps->ops->reset          = EPSReset_RQCG;
+<a name="line457">457: </a>  eps->ops->view           = EPSView_RQCG;
+<a name="line458">458: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+<a name="line459">459: </a>  <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
+<a name="line460">460: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
+<a name="line461">461: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGSetReset_C"</font>,EPSRQCGSetReset_RQCG);
+<a name="line462">462: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSRQCGGetReset_C"</font>,EPSRQCGGetReset_RQCG);
+<a name="line463">463: </a>  <font color="#4169E1">return</font>(0);
+<a name="line464">464: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/ciss/ciss.c b/src/eps/impls/ciss/ciss.c
index 7bcbfcd..d1a2911 100644
--- a/src/eps/impls/ciss/ciss.c
+++ b/src/eps/impls/ciss/ciss.c
@@ -23,7 +23,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,42 +44,42 @@
 #include <slepc/private/epsimpl.h>                /*I "slepceps.h" I*/
 #include <slepcblaslapack.h>
 
-PetscErrorCode EPSSolve_CISS(EPS);
-
 typedef struct {
   /* parameters */
-  PetscInt    N;          /* number of integration points (32) */
-  PetscInt    L;          /* block size (16) */
-  PetscInt    M;          /* moment degree (N/4 = 4) */
-  PetscReal   delta;      /* threshold of singular value (1e-12) */
-  PetscInt    L_max;      /* maximum number of columns of the source matrix V */
-  PetscReal   spurious_threshold; /* discard spurious eigenpairs */
-  PetscBool   isreal;     /* A and B are real */
-  PetscInt    refine_inner;
-  PetscInt    refine_outer;
-  PetscInt    refine_blocksize;
+  PetscInt          N;          /* number of integration points (32) */
+  PetscInt          L;          /* block size (16) */
+  PetscInt          M;          /* moment degree (N/4 = 4) */
+  PetscReal         delta;      /* threshold of singular value (1e-12) */
+  PetscInt          L_max;      /* maximum number of columns of the source matrix V */
+  PetscReal         spurious_threshold; /* discard spurious eigenpairs */
+  PetscBool         isreal;     /* A and B are real */
+  PetscInt          refine_inner;
+  PetscInt          refine_blocksize;
   /* private data */
-  PetscReal    *sigma;     /* threshold for numerical rank */
-  PetscInt     num_subcomm;
-  PetscInt     subcomm_id;
-  PetscInt     num_solve_point;
-  PetscScalar  *weight;
-  PetscScalar  *omega;
-  PetscScalar  *pp;
-  BV           V;
-  BV           S;
-  BV           pV;
-  BV           Y;
-  Vec          xsub;
-  Vec          xdup;
-  KSP          *ksp;
-  Mat          *kspMat;
-  PetscBool    useconj;
-  PetscReal    est_eig;
-  VecScatter   scatterin;
-  Mat          pA,pB;
-  PetscSubcomm subcomm;
-  PetscBool    usest;
+  PetscReal         *sigma;     /* threshold for numerical rank */
+  PetscInt          num_subcomm;
+  PetscInt          subcomm_id;
+  PetscInt          num_solve_point;
+  PetscScalar       *weight;
+  PetscScalar       *omega;
+  PetscScalar       *pp;
+  BV                V;
+  BV                S;
+  BV                pV;
+  BV                Y;
+  Vec               xsub;
+  Vec               xdup;
+  KSP               *ksp;
+  Mat               *kspMat;
+  PetscBool         useconj;
+  PetscReal         est_eig;
+  VecScatter        scatterin;
+  Mat               pA,pB;
+  PetscSubcomm      subcomm;
+  PetscBool         usest;
+  PetscBool         usest_set;  /* whether the user set the usest flag or not */
+  EPSCISSQuadRule   quad;
+  EPSCISSExtraction extraction;
 } EPS_CISS;
 
 #undef __FUNCT__
@@ -121,7 +121,7 @@ static PetscErrorCode CISSRedundantMat(EPS eps)
     ierr = MatCreateRedundantMatrix(A,ctx->subcomm->n,PetscSubcommChild(ctx->subcomm),MAT_INITIAL_MATRIX,&ctx->pA);CHKERRQ(ierr);
     if (nmat>1) {
       ierr = STGetOperators(eps->st,1,&B);CHKERRQ(ierr);
-      ierr = MatCreateRedundantMatrix(B,ctx->subcomm->n,PetscSubcommChild(ctx->subcomm),MAT_INITIAL_MATRIX,&ctx->pB);CHKERRQ(ierr); 
+      ierr = MatCreateRedundantMatrix(B,ctx->subcomm->n,PetscSubcommChild(ctx->subcomm),MAT_INITIAL_MATRIX,&ctx->pB);CHKERRQ(ierr);
     } else ctx->pB = NULL;
   } else {
     ctx->pA = NULL;
@@ -174,60 +174,103 @@ static PetscErrorCode SetPathParameter(EPS eps)
 {
   PetscErrorCode ierr;
   EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-  PetscInt       i;
-  PetscScalar    center;
-  PetscReal      theta,radius,vscale,start_ang,end_ang,width;
-  PetscBool      isring=PETSC_FALSE,isellipse=PETSC_FALSE;
+  PetscInt       i,j;
+  PetscScalar    center=0.0,tmp,tmp2,*omegai;
+  PetscReal      theta,radius=1.0,vscale,a,b,c,d,max_w=0.0,rgscale;
+#if defined(PETSC_USE_COMPLEX) 
+  PetscReal      start_ang,end_ang;
+#endif
+  PetscBool      isring=PETSC_FALSE,isellipse=PETSC_FALSE,isinterval=PETSC_FALSE;
 
   PetscFunctionBegin;
   ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGINTERVAL,&isinterval);CHKERRQ(ierr);
+  ierr = RGGetScale(eps->rg,&rgscale);CHKERRQ(ierr);
+  ierr = PetscMalloc1(ctx->N+1l,&omegai);CHKERRQ(ierr);
+  ierr = RGComputeContour(eps->rg,ctx->N,ctx->omega,omegai);CHKERRQ(ierr);
   if (isellipse) {
     ierr = RGEllipseGetParameters(eps->rg,&center,&radius,&vscale);CHKERRQ(ierr);
-  } else {
-    ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);CHKERRQ(ierr);
-    if (!isring) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Region must be Ellipse or Ring");
-    ierr = RGRingGetParameters(eps->rg,&center,&radius,&vscale,&start_ang,&end_ang,&width);CHKERRQ(ierr);
-  }
-  for (i=0;i<ctx->N;i++) {
-    if (isring) {
-      /* Ring region only supported for complex scalars */
-#if defined(PETSC_USE_COMPLEX)
+    for (i=0;i<ctx->N;i++) {
+#if defined(PETSC_USE_COMPLEX) 
+      theta = 2.0*PETSC_PI*(i+0.5)/ctx->N;
+      ctx->pp[i] = PetscCosReal(theta)+vscale*PetscSinReal(theta)*PETSC_i;
+      ctx->weight[i] = rgscale*radius*(vscale*PetscCosReal(theta)+PetscSinReal(theta)*PETSC_i)/(PetscReal)ctx->N;
+#else
       theta = (PETSC_PI/ctx->N)*(i+0.5);
       ctx->pp[i] = PetscCosReal(theta);
       ctx->weight[i] = PetscCosReal((ctx->N-1)*theta)/ctx->N;
-      theta = (start_ang*2+(end_ang-start_ang)*(PetscCosReal(theta)+1.0))*PETSC_PI;
-      ctx->omega[i] = center + radius*(PetscCosReal(theta)+PETSC_i*vscale*PetscSinReal(theta));
+      ctx->omega[i] = rgscale*(center + radius*ctx->pp[i]);
 #endif
-    } else {
-#if defined(PETSC_USE_COMPLEX)
-      theta = ((2*PETSC_PI)/ctx->N)*(i+0.5);
-      ctx->pp[i] = PetscCosReal(theta) + PETSC_i*vscale*PetscSinReal(theta);
-      ctx->weight[i] = radius*(vscale*PetscCosReal(theta) + PETSC_i*PetscSinReal(theta))/(PetscReal)ctx->N;
-      ctx->omega[i] = center + radius*ctx->pp[i];
-#else
+    }
+  } else if (ctx->quad == EPS_CISS_QUADRULE_CHEBYSHEV) {
+    for (i=0;i<ctx->N;i++) {
       theta = (PETSC_PI/ctx->N)*(i+0.5);
       ctx->pp[i] = PetscCosReal(theta);
       ctx->weight[i] = PetscCosReal((ctx->N-1)*theta)/ctx->N;
-      ctx->omega[i] = center + radius*ctx->pp[i];
+    }
+    if (isinterval) {
+      ierr = RGIntervalGetEndpoints(eps->rg,&a,&b,&c,&d);CHKERRQ(ierr);
+      if ((c!=d || c!=0.0) && (a!=b || a!=0.0)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Endpoints of the imaginary axis or the real axis must be both zero");
+      for (i=0;i<ctx->N;i++) {
+        if (c==d) ctx->omega[i] = ((b-a)*(ctx->pp[i]+1.0)/2.0+a)*rgscale;
+        if (a==b) {
+#if defined(PETSC_USE_COMPLEX) 
+          ctx->omega[i] = ((d-c)*(ctx->pp[i]+1.0)/2.0+c)*rgscale*PETSC_i;
+#else
+          SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Integration points on a vertical line require complex arithmetic");
 #endif
+        }
+      }
+    }
+    if (isring) {  /* only supported in complex scalars */
+#if defined(PETSC_USE_COMPLEX) 
+      ierr = RGRingGetParameters(eps->rg,&center,&radius,&vscale,&start_ang,&end_ang,NULL);CHKERRQ(ierr);
+      for (i=0;i<ctx->N;i++) {
+        theta = (start_ang*2.0+(end_ang-start_ang)*(PetscRealPart(ctx->pp[i])+1.0))*PETSC_PI;
+        ctx->omega[i] = rgscale*(center + radius*(PetscCosReal(theta)+PETSC_i*vscale*PetscSinReal(theta)));
+      }
+#endif
+    }
+  } else {
+    if (isinterval) {
+      ierr = RGIntervalGetEndpoints(eps->rg,&a,&b,&c,&d);CHKERRQ(ierr);
+      center = rgscale*((b+a)/2.0+(d+c)/2.0*PETSC_PI);
+      radius = PetscSqrtReal(PetscPowRealInt(rgscale*(b-a)/2.0,2)+PetscPowRealInt(rgscale*(d-c)/2.0,2));
+    } else if (isring) {
+      ierr = RGRingGetParameters(eps->rg,&center,&radius,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+      center *= rgscale;
+      radius *= rgscale;
     }
+    for (i=0;i<ctx->N;i++) { 
+      ctx->pp[i] = (ctx->omega[i]-center)/radius;
+      tmp = 1; tmp2 = 1;
+      for (j=0;j<ctx->N;j++) {
+        tmp *= ctx->omega[j];
+        if (i != j) tmp2 *= ctx->omega[j]-ctx->omega[i];
+      }
+      ctx->weight[i] = tmp/tmp2;
+      max_w = PetscMax(PetscAbsScalar(ctx->weight[i]),max_w);
+    }
+    for (i=0;i<ctx->N;i++) ctx->weight[i] /= (PetscScalar)max_w;
   }
+  ierr = PetscFree(omegai);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "CISSVecSetRandom"
-static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom rctx)
+static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1)
 {
   PetscErrorCode ierr;
   PetscInt       i,j,nlocal;
   PetscScalar    *vdata;
   Vec            x;
- 
+
   PetscFunctionBegin;
   ierr = BVGetSizes(V,&nlocal,NULL,NULL);CHKERRQ(ierr);
   for (i=i0;i<i1;i++) {
-    ierr = BVSetRandomColumn(V,i,rctx);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(V,i);CHKERRQ(ierr);
     ierr = BVGetColumn(V,i,&x);CHKERRQ(ierr);
     ierr = VecGetArray(x,&vdata);CHKERRQ(ierr);
     for (j=0;j<nlocal;j++) {
@@ -285,56 +328,40 @@ static PetscErrorCode SolveLinearSystem(EPS eps,Mat A,Mat B,BV V,PetscInt L_star
   if (ctx->usest) {
     ierr = MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&Fz);CHKERRQ(ierr);
   }
-  if (ctx->usest && ctx->pA) {
-    ierr = KSPCreate(PetscSubcommChild(ctx->subcomm),&ksp);CHKERRQ(ierr);
-  }
   for (i=0;i<ctx->num_solve_point;i++) {
     p_id = i*ctx->subcomm->n + ctx->subcomm_id;
     if (!ctx->usest && initksp == PETSC_TRUE) {
       ierr = MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&ctx->kspMat[i]);CHKERRQ(ierr);
       ierr = MatCopy(A,ctx->kspMat[i],DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
       if (B) {
-	ierr = MatAXPY(ctx->kspMat[i],-ctx->omega[p_id],B,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
+        ierr = MatAXPY(ctx->kspMat[i],-ctx->omega[p_id],B,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
       } else {
-	ierr = MatShift(ctx->kspMat[i],-ctx->omega[p_id]);CHKERRQ(ierr);
+        ierr = MatShift(ctx->kspMat[i],-ctx->omega[p_id]);CHKERRQ(ierr);
       }
       ierr = KSPSetOperators(ctx->ksp[i],ctx->kspMat[i],ctx->kspMat[i]);CHKERRQ(ierr);
       ierr = KSPSetType(ctx->ksp[i],KSPPREONLY);CHKERRQ(ierr);
       ierr = KSPGetPC(ctx->ksp[i],&pc);CHKERRQ(ierr);
-      ierr = PCSetType(pc,PCREDUNDANT);CHKERRQ(ierr);
+      ierr = PCSetType(pc,PCLU);CHKERRQ(ierr);
       ierr = KSPSetFromOptions(ctx->ksp[i]);CHKERRQ(ierr);
-    } else if (ctx->usest && ctx->pA) {
-      ierr = MatCopy(A,Fz,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
-      if (B) {
-        ierr = MatAXPY(Fz,-ctx->omega[p_id],B,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
-      } else {
-        ierr = MatShift(Fz,-ctx->omega[p_id]);CHKERRQ(ierr);
-      }
-      ierr = KSPSetOperators(ksp,Fz,Fz);CHKERRQ(ierr);
-      ierr = KSPSetType(ksp,KSPPREONLY);CHKERRQ(ierr);
-      ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
-      ierr = PCSetType(pc,PCREDUNDANT);CHKERRQ(ierr);
-      ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr);
-    } else if (ctx->usest && !ctx->pA) {
+    } else if (ctx->usest) {
       ierr = STSetShift(eps->st,ctx->omega[p_id]);CHKERRQ(ierr);
       ierr = STGetKSP(eps->st,&ksp);CHKERRQ(ierr);
     }
-    
     for (j=L_start;j<L_end;j++) {
       ierr = BVGetColumn(V,j,&vj);CHKERRQ(ierr);
       ierr = BVGetColumn(ctx->Y,i*ctx->L_max+j,&yj);CHKERRQ(ierr);
       if (B) {
         ierr = MatMult(B,vj,Bvj);CHKERRQ(ierr);
         if (ctx->usest) {
-	  ierr = KSPSolve(ksp,Bvj,yj);CHKERRQ(ierr);
+          ierr = KSPSolve(ksp,Bvj,yj);CHKERRQ(ierr);
         } else {
-	  ierr = KSPSolve(ctx->ksp[i],Bvj,yj);CHKERRQ(ierr);
+          ierr = KSPSolve(ctx->ksp[i],Bvj,yj);CHKERRQ(ierr);
         }
       } else {
         if (ctx->usest) {
-	  ierr = KSPSolve(ksp,vj,yj);CHKERRQ(ierr);
+          ierr = KSPSolve(ksp,vj,yj);CHKERRQ(ierr);
         } else {
-	  ierr = KSPSolve(ctx->ksp[i],vj,yj);CHKERRQ(ierr);
+          ierr = KSPSolve(ctx->ksp[i],vj,yj);CHKERRQ(ierr);
         }
       }
       ierr = BVRestoreColumn(V,j,&vj);CHKERRQ(ierr);
@@ -344,9 +371,6 @@ static PetscErrorCode SolveLinearSystem(EPS eps,Mat A,Mat B,BV V,PetscInt L_star
   }
   if (ctx->usest) { ierr = MatDestroy(&Fz);CHKERRQ(ierr); }
   ierr = VecDestroy(&Bvj);CHKERRQ(ierr);
-  if (ctx->usest && ctx->pA) {
-    ierr = KSPDestroy(&ksp);CHKERRQ(ierr);
-  }
   PetscFunctionReturn(0);
 }
 
@@ -407,7 +431,7 @@ static PetscErrorCode EstimateNumberEigs(EPS eps,PetscInt *L_add)
 static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)
 {
   PetscErrorCode ierr;
-  PetscMPIInt    sub_size;
+  PetscMPIInt    sub_size,len;
   PetscInt       i,j,k,s;
   PetscScalar    *m,*temp,*temp2,*ppk,alp;
   EPS_CISS       *ctx = (EPS_CISS*)eps->data;
@@ -419,10 +443,10 @@ static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)
   ierr = MatCreateSeqDense(PETSC_COMM_SELF,ctx->L,ctx->L_max*ctx->num_solve_point,NULL,&M);CHKERRQ(ierr);
   for (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] = 0;
   ierr = BVSetActiveColumns(ctx->Y,0,ctx->L_max*ctx->num_solve_point);CHKERRQ(ierr);
-  if (ctx->pA) { 
+  if (ctx->pA) {
     ierr = BVSetActiveColumns(ctx->pV,0,ctx->L);CHKERRQ(ierr);
     ierr = BVDot(ctx->Y,ctx->pV,M);CHKERRQ(ierr);
-  } else { 
+  } else {
     ierr = BVSetActiveColumns(ctx->V,0,ctx->L);CHKERRQ(ierr);
     ierr = BVDot(ctx->Y,ctx->V,M);CHKERRQ(ierr);
   }
@@ -430,7 +454,7 @@ static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)
   for (i=0;i<ctx->num_solve_point;i++) {
     for (j=0;j<ctx->L;j++) {
       for (k=0;k<ctx->L;k++) {
-	temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
+        temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
       }
     }
   }
@@ -446,11 +470,12 @@ static PetscErrorCode CalcMu(EPS eps,PetscScalar *Mu)
         }
       }
     }
-    for (i=0;i<ctx->num_solve_point;i++) 
+    for (i=0;i<ctx->num_solve_point;i++)
       ppk[i] *= ctx->pp[i*ctx->subcomm->n + ctx->subcomm_id];
   }
   for (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] /= sub_size;
-  ierr = MPI_Allreduce(temp2,Mu,2*ctx->M*ctx->L*ctx->L,MPIU_SCALAR,MPIU_SUM,(PetscObjectComm((PetscObject)eps)));CHKERRQ(ierr);
+  ierr = PetscMPIIntCast(2*ctx->M*ctx->L*ctx->L,&len);CHKERRQ(ierr);
+  ierr = MPI_Allreduce(temp2,Mu,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)eps));CHKERRQ(ierr);
   ierr = PetscFree3(temp,temp2,ppk);CHKERRQ(ierr);
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -464,8 +489,8 @@ static PetscErrorCode BlockHankel(EPS eps,PetscScalar *Mu,PetscInt s,PetscScalar
   PetscInt i,j,k,L=ctx->L,M=ctx->M;
 
   PetscFunctionBegin;
-  for (k=0;k<L*M;k++) 
-    for (j=0;j<M;j++) 
+  for (k=0;k<L*M;k++)
+    for (j=0;j<M;j++)
       for (i=0;i<L;i++)
         H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
   PetscFunctionReturn(0);
@@ -475,7 +500,7 @@ static PetscErrorCode BlockHankel(EPS eps,PetscScalar *Mu,PetscInt s,PetscScalar
 #define __FUNCT__ "SVD_H0"
 static PetscErrorCode SVD_H0(EPS eps,PetscScalar *S,PetscInt *K)
 {
-#if defined(SLEPC_MISSING_LAPACK_GESVD)
+#if defined(PETSC_MISSING_LAPACK_GESVD)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD - Lapack routine is unavailable");
 #else
@@ -537,8 +562,8 @@ static PetscErrorCode ConstructS(EPS eps)
       ierr = VecSet(v,0);CHKERRQ(ierr);
       for (i=0;i<ctx->num_solve_point;i++) {
         p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-	ierr = BVSetActiveColumns(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);CHKERRQ(ierr);
-	ierr = BVMultVec(ctx->Y,ppk[i]*ctx->weight[p_id],1,v,&m);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);CHKERRQ(ierr);
+        ierr = BVMultVec(ctx->Y,ppk[i]*ctx->weight[p_id],1.0,v,&m);CHKERRQ(ierr);
       }
       if (ctx->useconj) {
         ierr = VecGetArray(v,&v_data);CHKERRQ(ierr);
@@ -569,12 +594,13 @@ static PetscErrorCode ConstructS(EPS eps)
 #define __FUNCT__ "SVD_S"
 static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,PetscInt *K)
 {
-#if defined(SLEPC_MISSING_LAPACK_GESVD)
+#if defined(PETSC_MISSING_LAPACK_GESVD)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD - Lapack routine is unavailable");
 #else
   PetscErrorCode ierr;
   PetscInt       i,j,k,local_size;
+  PetscMPIInt    len;
   PetscScalar    *work,*temp,*B,*tempB,*s_data,*Q1,*Q2,*temp2,alpha=1,beta=0;
   PetscBLASInt   l,m,n,lda,ldu,ldvt,lwork,info,ldb,ldc;
 #if defined(PETSC_USE_COMPLEX)
@@ -582,7 +608,7 @@ static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,Pe
 #endif
 
   PetscFunctionBegin;
-  ierr = BVGetSizes(S,&local_size,NULL,NULL);CHKERRQ(ierr);    
+  ierr = BVGetSizes(S,&local_size,NULL,NULL);CHKERRQ(ierr);
   ierr = BVGetArray(S,&s_data);CHKERRQ(ierr);
   ierr = PetscMalloc7(ml*ml,&temp,ml*ml,&temp2,local_size*ml,&Q1,local_size*ml,&Q2,ml*ml,&B,ml*ml,&tempB,5*ml,&work);CHKERRQ(ierr);
   ierr = PetscMemzero(B,ml*ml*sizeof(PetscScalar));CHKERRQ(ierr);
@@ -591,9 +617,7 @@ static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,Pe
 #endif
   ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
 
-  for (i=0;i<ml;i++) {
-    B[i*ml+i]=1;
-  }
+  for (i=0;i<ml;i++) B[i*ml+i]=1;
 
   for (k=0;k<2;k++) {
     ierr = PetscBLASIntCast(local_size,&m);CHKERRQ(ierr);
@@ -607,7 +631,8 @@ static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,Pe
       PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&l,&n,&m,&alpha,Q2,&lda,Q2,&ldb,&beta,temp,&ldc));
     }
     ierr = PetscMemzero(temp2,ml*ml*sizeof(PetscScalar));CHKERRQ(ierr);
-    ierr = MPI_Allreduce(temp,temp2,ml*ml,MPIU_SCALAR,MPIU_SUM,(PetscObjectComm((PetscObject)S)));CHKERRQ(ierr);
+    ierr = PetscMPIIntCast(ml*ml,&len);CHKERRQ(ierr);
+    ierr = MPI_Allreduce(temp,temp2,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)S));CHKERRQ(ierr);
 
     ierr = PetscBLASIntCast(ml,&m);CHKERRQ(ierr);
     n = m; lda = m; lwork = 5*m, ldu = 1; ldvt = 1;
@@ -661,7 +686,7 @@ static PetscErrorCode SVD_S(BV S,PetscInt ml,PetscReal delta,PetscReal *sigma,Pe
   } else {
     PetscStackCallBLAS("BLASgemm",BLASgemm_("N","T",&l,&n,&m,&alpha,Q2,&lda,B,&ldb,&beta,s_data,&ldc));
   }
- 
+
   ierr = PetscFPTrapPop();CHKERRQ(ierr);
   ierr = BVRestoreArray(S,&s_data);CHKERRQ(ierr);
 
@@ -715,37 +740,122 @@ static PetscErrorCode isGhost(EPS eps,PetscInt ld,PetscInt nv,PetscBool *fl)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "rescale_eig"
+static PetscErrorCode rescale_eig(EPS eps,PetscInt nv)
+{
+  PetscErrorCode ierr;
+  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+  PetscInt       i;
+  PetscScalar    center;
+  PetscReal      radius,a,b,c,d,rgscale;
+#if defined(PETSC_USE_COMPLEX) 
+  PetscReal      start_ang,end_ang,vscale,theta;
+#endif
+  PetscBool      isring,isellipse,isinterval;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGINTERVAL,&isinterval);CHKERRQ(ierr);
+  ierr = RGGetScale(eps->rg,&rgscale);CHKERRQ(ierr);
+  if (isinterval) {
+    ierr = RGIntervalGetEndpoints(eps->rg,NULL,NULL,&c,&d);CHKERRQ(ierr);
+    if (c==d) {
+      for (i=0;i<nv;i++) {
+#if defined(PETSC_USE_COMPLEX)
+        eps->eigr[i] = PetscRealPart(eps->eigr[i]);
+#else
+        eps->eigi[i] = 0;
+#endif
+      }
+    }
+  }
+  if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+    if (isellipse) {
+      ierr = RGEllipseGetParameters(eps->rg,&center,&radius,NULL);CHKERRQ(ierr);
+      for (i=0;i<nv;i++) eps->eigr[i] = rgscale*(center + radius*eps->eigr[i]);
+    } else if (isinterval) {
+      ierr = RGIntervalGetEndpoints(eps->rg,&a,&b,&c,&d);CHKERRQ(ierr);
+      if (ctx->quad == EPS_CISS_QUADRULE_CHEBYSHEV) {
+        for (i=0;i<nv;i++) {
+          if (c==d) eps->eigr[i] = ((b-a)*(eps->eigr[i]+1.0)/2.0+a)*rgscale;
+          if (a==b) {
+#if defined(PETSC_USE_COMPLEX) 
+            eps->eigr[i] = ((d-c)*(eps->eigr[i]+1.0)/2.0+c)*rgscale*PETSC_i;
+#else
+            SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Integration points on a vertical line require complex arithmetic");
+#endif
+          }
+        }
+      } else {
+        center = (b+a)/2.0+(d+c)/2.0*PETSC_PI;
+        radius = PetscSqrtReal(PetscPowRealInt((b-a)/2.0,2)+PetscPowRealInt((d-c)/2.0,2));
+        for (i=0;i<nv;i++) eps->eigr[i] = center + radius*eps->eigr[i];
+      }
+    } else if (isring) {  /* only supported in complex scalars */
+#if defined(PETSC_USE_COMPLEX) 
+      ierr = RGRingGetParameters(eps->rg,&center,&radius,&vscale,&start_ang,&end_ang,NULL);CHKERRQ(ierr);
+      if (ctx->quad == EPS_CISS_QUADRULE_CHEBYSHEV) {
+        for (i=0;i<nv;i++) {
+          theta = (start_ang*2.0+(end_ang-start_ang)*(PetscRealPart(eps->eigr[i])+1.0))*PETSC_PI;
+          eps->eigr[i] = rgscale*center + (rgscale*radius+PetscImaginaryPart(eps->eigr[i]))*(PetscCosReal(theta)+PETSC_i*vscale*PetscSinReal(theta));
+        }
+      } else {
+        for (i=0;i<nv;i++) eps->eigr[i] = rgscale*(center + radius*eps->eigr[i]);
+      }
+#endif
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSSetUp_CISS"
 PetscErrorCode EPSSetUp_CISS(EPS eps)
 {
   PetscErrorCode ierr;
   EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-  const char     *prefix;
   PetscInt       i;
-  PetscBool      issinvert,istrivial,isring,isellipse,flg;
+  PetscBool      issinvert,istrivial,isring,isellipse,isinterval,flg;
   PetscScalar    center;
+  PetscReal      c,d;
   Mat            A;
 
   PetscFunctionBegin;
-  eps->ncv = PetscMin(eps->n,ctx->L_max*ctx->M);
+  if (!eps->ncv) eps->ncv = ctx->L_max*ctx->M;
+  else {
+    ierr = EPSSetDimensions_Default(eps,eps->nev,&eps->ncv,&eps->mpd);CHKERRQ(ierr);
+    ctx->L_max = eps->ncv/ctx->M;
+    if (ctx->L_max == 0) {
+      ctx->L_max = 1;
+      eps->ncv = ctx->L_max*ctx->M;
+    }
+    if (ctx->L > ctx->L_max) ctx->L = ctx->L_max;
+  }
+  if (!eps->max_it) eps->max_it = 1;
   if (!eps->mpd) eps->mpd = eps->ncv;
   if (!eps->which) eps->which = EPS_ALL;
-  if (!eps->extraction) { ierr = EPSSetExtraction(eps,EPS_RITZ);CHKERRQ(ierr); } 
+  if (!eps->extraction) { ierr = EPSSetExtraction(eps,EPS_RITZ);CHKERRQ(ierr); }
   else if (eps->extraction!=EPS_RITZ) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Unsupported extraction type");
   if (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Arbitrary selection of eigenpairs not supported in this solver");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"This solver does not support user-defined stopping test");
 
   /* check region */
   ierr = RGIsTrivial(eps->rg,&istrivial);CHKERRQ(ierr);
-  if (istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"EPSCISS requires a nontrivial region, e.g. -rg_type ellipse ...");
+  if (istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"CISS requires a nontrivial region, e.g. -rg_type ellipse ...");
+  ierr = RGGetComplement(eps->rg,&flg);CHKERRQ(ierr);
+  if (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"A region with complement flag set is not allowed");
   ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);CHKERRQ(ierr);
   ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);CHKERRQ(ierr);
-  if (!isellipse && !isring) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Currently only implemented for elliptic or ring regions");
+  ierr = PetscObjectTypeCompare((PetscObject)eps->rg,RGINTERVAL,&isinterval);CHKERRQ(ierr);
+  if (!isellipse && !isring && !isinterval) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Currently only implemented for interval, elliptic or ring regions");
   if (isring) {
 #if !defined(PETSC_USE_COMPLEX)
-    SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Currently only implemented for elliptic regions");
+    SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Ring region only supported for complex scalars");
 #endif
     ctx->useconj = PETSC_FALSE;
-  } else {
+  }
+  if (isellipse) {
     ierr = RGEllipseGetParameters(eps->rg,&center,NULL,NULL);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
     if (ctx->isreal && PetscImaginaryPart(center) == 0.0) ctx->useconj = PETSC_TRUE;
@@ -754,11 +864,23 @@ PetscErrorCode EPSSetUp_CISS(EPS eps)
     ctx->useconj = PETSC_FALSE;
 #endif
   }
+  if (isinterval) {
+    ierr = RGIntervalGetEndpoints(eps->rg,NULL,NULL,&c,&d);CHKERRQ(ierr);
+#if defined(PETSC_USE_COMPLEX)
+    if (ctx->isreal && c==d) ctx->useconj = PETSC_TRUE;
+    else ctx->useconj = PETSC_FALSE;
+#else
+    if (c!=d || c!=0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"In real scalars, endpoints of the imaginary axis must be both zero");
+    ctx->useconj = PETSC_FALSE;
+#endif
+    if (!ctx->quad && c==d) ctx->quad = EPS_CISS_QUADRULE_CHEBYSHEV;
+  }
+  if (!ctx->quad) ctx->quad = EPS_CISS_QUADRULE_TRAPEZOIDAL;
   /* create split comm */
   ierr = SetSolverComm(eps);CHKERRQ(ierr);
 
   ierr = EPSAllocateSolution(eps,0);CHKERRQ(ierr);
-  ierr = PetscMalloc4(ctx->N,&ctx->weight,ctx->N,&ctx->omega,ctx->N,&ctx->pp,ctx->L_max*ctx->M,&ctx->sigma);CHKERRQ(ierr);
+  ierr = PetscMalloc4(ctx->N,&ctx->weight,ctx->N+1,&ctx->omega,ctx->N,&ctx->pp,ctx->L_max*ctx->M,&ctx->sigma);CHKERRQ(ierr);
   ierr = PetscLogObjectMemory((PetscObject)eps,3*ctx->N*sizeof(PetscScalar)+ctx->L_max*ctx->N*sizeof(PetscReal));CHKERRQ(ierr);
 
   /* allocate basis vectors */
@@ -769,7 +891,10 @@ PetscErrorCode EPSSetUp_CISS(EPS eps)
 
   ierr = STGetOperators(eps->st,0,&A);CHKERRQ(ierr);
   ierr = PetscObjectTypeCompare((PetscObject)A,MATSHELL,&flg);CHKERRQ(ierr);
-  if (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Matrix type shell not supported in this solver");
+  if (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Matrix type shell is not supported in this solver");
+
+  if (!ctx->usest_set) ctx->usest = (ctx->num_subcomm>1)? PETSC_FALSE: PETSC_TRUE;
+  if (ctx->usest && ctx->num_subcomm>1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"The usest flag is not supported when partitions > 1");
 
   ierr = CISSRedundantMat(eps);CHKERRQ(ierr);
   if (ctx->pA) {
@@ -785,15 +910,15 @@ PetscErrorCode EPSSetUp_CISS(EPS eps)
     ierr = PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&issinvert);CHKERRQ(ierr);
     if (!issinvert) { ierr = STSetType(eps->st,STSINVERT);CHKERRQ(ierr); }
   } else {
+    ierr = STSetType(eps->st,STSHIFT);CHKERRQ(ierr);  /* we are not going to use ST, so avoid problems in case the user provided one */
     ierr = PetscMalloc2(ctx->num_solve_point,&ctx->ksp,ctx->num_solve_point,&ctx->kspMat);CHKERRQ(ierr);
     ierr = PetscLogObjectMemory((PetscObject)eps,ctx->num_solve_point*sizeof(KSP)+ctx->num_solve_point*sizeof(Mat));CHKERRQ(ierr);
     for (i=0;i<ctx->num_solve_point;i++) {
       ierr = KSPCreate(PetscSubcommChild(ctx->subcomm),&ctx->ksp[i]);CHKERRQ(ierr);
       ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)eps,1);CHKERRQ(ierr);
       ierr = PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->ksp[i]);CHKERRQ(ierr);
+      ierr = KSPSetOptionsPrefix(ctx->ksp[i],((PetscObject)eps)->prefix);CHKERRQ(ierr);
       ierr = KSPAppendOptionsPrefix(ctx->ksp[i],"eps_ciss_");CHKERRQ(ierr);
-      ierr = EPSGetOptionsPrefix(eps,&prefix);CHKERRQ(ierr);
-      ierr = KSPAppendOptionsPrefix(ctx->ksp[i],prefix);CHKERRQ(ierr);
       ierr = KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);CHKERRQ(ierr);
     }
   }
@@ -808,10 +933,20 @@ PetscErrorCode EPSSetUp_CISS(EPS eps)
   }
   ierr = PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->Y);CHKERRQ(ierr);
 
-  if (eps->ishermitian && eps->ispositive) {
-    ierr = DSSetType(eps->ds,DSGHEP);CHKERRQ(ierr);
-  } else {
+  if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
     ierr = DSSetType(eps->ds,DSGNHEP);CHKERRQ(ierr);
+  } else if (eps->isgeneralized) {
+    if (eps->ishermitian && eps->ispositive) {
+      ierr = DSSetType(eps->ds,DSGHEP);CHKERRQ(ierr);
+    } else {
+      ierr = DSSetType(eps->ds,DSGNHEP);CHKERRQ(ierr);
+    }
+  } else {
+    if (eps->ishermitian) {
+      ierr = DSSetType(eps->ds,DSGHEP);CHKERRQ(ierr);
+    } else {
+      ierr = DSSetType(eps->ds,DSGNHEP);CHKERRQ(ierr);
+    }
   }
   ierr = DSAllocate(eps->ds,eps->ncv);CHKERRQ(ierr);
   ierr = EPSSetWorkVecs(eps,2);CHKERRQ(ierr);
@@ -819,9 +954,6 @@ PetscErrorCode EPSSetUp_CISS(EPS eps)
 #if !defined(PETSC_USE_COMPLEX)
   if (!eps->ishermitian) { ierr = PetscInfo(eps,"Warning: complex eigenvalues are not calculated exactly without --with-scalar-type=complex in PETSc\n");CHKERRQ(ierr); }
 #endif
-
-  /* dispatch solve method */
-  eps->ops->solve = EPSSolve_CISS;
   PetscFunctionReturn(0);
 }
 
@@ -832,12 +964,13 @@ PetscErrorCode EPSSolve_CISS(EPS eps)
   PetscErrorCode ierr;
   EPS_CISS       *ctx = (EPS_CISS*)eps->data;
   Mat            A,B,X,M,pA,pB;
-  PetscInt       i,ld,nmat,L_add=0,nv=0,L_base=ctx->L,inner,outer,nlocal,*inside;
-  PetscScalar    *Mu,*H0,*rr,*temp;
+  PetscInt       i,j,ld,nmat,L_add=0,nv=0,L_base=ctx->L,inner,nlocal,*inside;
+  PetscScalar    *Mu,*H0,*H1=NULL,*rr,*temp;
   PetscReal      error,max_error;
   PetscBool      *fl1;
   Vec            si,w[3];
   SlepcSC        sc;
+  PetscRandom    rand;
 #if defined(PETSC_USE_COMPLEX)
   PetscBool      isellipse;
 #endif
@@ -859,7 +992,8 @@ PetscErrorCode EPSSolve_CISS(EPS eps)
   if (nmat>1) { ierr = STGetOperators(eps->st,1,&B);CHKERRQ(ierr); }
   else B = NULL;
   ierr = SetPathParameter(eps);CHKERRQ(ierr);
-  ierr = CISSVecSetRandom(ctx->V,0,ctx->L,eps->rand);CHKERRQ(ierr);
+  ierr = CISSVecSetRandom(ctx->V,0,ctx->L);CHKERRQ(ierr);
+  ierr = BVGetRandomContext(ctx->V,&rand);CHKERRQ(ierr);
 
   if (ctx->pA) {
     ierr = VecScatterVecs(eps,ctx->V,ctx->L);CHKERRQ(ierr);
@@ -879,7 +1013,7 @@ PetscErrorCode EPSSolve_CISS(EPS eps)
 #endif
   if (L_add>0) {
     ierr = PetscInfo2(eps,"Changing L %D -> %D by Estimate #Eig\n",ctx->L,ctx->L+L_add);CHKERRQ(ierr);
-    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,eps->rand);CHKERRQ(ierr);
+    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);CHKERRQ(ierr);
     if (ctx->pA) {
       ierr = VecScatterVecs(eps,ctx->V,ctx->L+L_add);CHKERRQ(ierr);
       ierr = SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,ctx->L,ctx->L+L_add,PETSC_FALSE);CHKERRQ(ierr);
@@ -897,7 +1031,7 @@ PetscErrorCode EPSSolve_CISS(EPS eps)
     L_add = L_base;
     if (ctx->L+L_add>ctx->L_max) L_add = ctx->L_max-ctx->L;
     ierr = PetscInfo2(eps,"Changing L %D -> %D by SVD(H0)\n",ctx->L,ctx->L+L_add);CHKERRQ(ierr);
-    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,eps->rand);CHKERRQ(ierr);
+    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);CHKERRQ(ierr);
     if (ctx->pA) {
       ierr = VecScatterVecs(eps,ctx->V,ctx->L+L_add);CHKERRQ(ierr);
       ierr = SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,ctx->L,ctx->L+L_add,PETSC_FALSE);CHKERRQ(ierr);
@@ -906,105 +1040,146 @@ PetscErrorCode EPSSolve_CISS(EPS eps)
     }
     ctx->L += L_add;
   }
-  ierr = PetscFree2(Mu,H0);CHKERRQ(ierr);
+  if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+    ierr = PetscMalloc1(ctx->L*ctx->M*ctx->L*ctx->M,&H1);CHKERRQ(ierr);
+  }
 
-  for (outer=0;outer<=ctx->refine_outer;outer++) {
+  while (eps->reason == EPS_CONVERGED_ITERATING) {
+    eps->its++;
     for (inner=0;inner<=ctx->refine_inner;inner++) {
-      ierr = ConstructS(eps);CHKERRQ(ierr);
-      ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
-      ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
-      ierr = SVD_S(ctx->S,ctx->L*ctx->M,ctx->delta,ctx->sigma,&nv);CHKERRQ(ierr);
-      if (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
+      if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+        ierr = CalcMu(eps,Mu);CHKERRQ(ierr);
+        ierr = BlockHankel(eps,Mu,0,H0);CHKERRQ(ierr);
+        ierr = SVD_H0(eps,H0,&nv);CHKERRQ(ierr);
+        break;
+      } else {
+        ierr = ConstructS(eps);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
+        ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
+        ierr = SVD_S(ctx->S,ctx->L*ctx->M,ctx->delta,ctx->sigma,&nv);CHKERRQ(ierr);
+        if (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
+          if (ctx->pA) {
+            ierr = VecScatterVecs(eps,ctx->V,ctx->L);CHKERRQ(ierr);
+            ierr = SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
+          } else {
+            ierr = SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
+          }
+        } else break;
+      }
+    }
+    eps->nconv = 0;
+    if (nv == 0) eps->reason = EPS_CONVERGED_TOL;
+    else {
+      ierr = DSSetDimensions(eps->ds,nv,0,0,0);CHKERRQ(ierr);
+      ierr = DSSetState(eps->ds,DS_STATE_RAW);CHKERRQ(ierr);
+
+      if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+        ierr = BlockHankel(eps,Mu,0,H0);CHKERRQ(ierr);
+        ierr = BlockHankel(eps,Mu,1,H1);CHKERRQ(ierr);
+        ierr = DSGetArray(eps->ds,DS_MAT_A,&temp);CHKERRQ(ierr);
+        for (j=0;j<nv;j++) {
+          for (i=0;i<nv;i++) {
+            temp[i+j*ld] = H1[i+j*ctx->L*ctx->M];
+          }
+        }
+        ierr = DSRestoreArray(eps->ds,DS_MAT_A,&temp);CHKERRQ(ierr);
+        ierr = DSGetArray(eps->ds,DS_MAT_B,&temp);CHKERRQ(ierr);
+        for (j=0;j<nv;j++) {
+          for (i=0;i<nv;i++) {
+            temp[i+j*ld] = H0[i+j*ctx->L*ctx->M];
+          }
+        }
+        ierr = DSRestoreArray(eps->ds,DS_MAT_B,&temp);CHKERRQ(ierr);
+      } else {
+        ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
+        ierr = DSGetMat(eps->ds,DS_MAT_A,&pA);CHKERRQ(ierr);
+        ierr = MatZeroEntries(pA);CHKERRQ(ierr);
+        ierr = BVMatProject(ctx->S,A,ctx->S,pA);CHKERRQ(ierr);
+        ierr = DSRestoreMat(eps->ds,DS_MAT_A,&pA);CHKERRQ(ierr);
+        ierr = DSGetMat(eps->ds,DS_MAT_B,&pB);CHKERRQ(ierr);
+        ierr = MatZeroEntries(pB);CHKERRQ(ierr);
+        if (B) { ierr = BVMatProject(ctx->S,B,ctx->S,pB);CHKERRQ(ierr); }
+        else { ierr = MatShift(pB,1);CHKERRQ(ierr); }
+        ierr = DSRestoreMat(eps->ds,DS_MAT_B,&pB);CHKERRQ(ierr);
+      }
+
+      ierr = DSSolve(eps->ds,eps->eigr,eps->eigi);CHKERRQ(ierr);
+      ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
+
+      ierr = PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);CHKERRQ(ierr);
+      ierr = rescale_eig(eps,nv);CHKERRQ(ierr);
+      ierr = isGhost(eps,ld,nv,fl1);CHKERRQ(ierr);
+      ierr = RGCheckInside(eps->rg,nv,eps->eigr,eps->eigi,inside);CHKERRQ(ierr);
+      for (i=0;i<nv;i++) {
+        if (fl1[i] && inside[i]>=0) {
+          rr[i] = 1.0;
+          eps->nconv++;
+        } else rr[i] = 0.0;
+      }
+      ierr = DSSort(eps->ds,eps->eigr,eps->eigi,rr,NULL,&eps->nconv);CHKERRQ(ierr);
+      ierr = rescale_eig(eps,nv);CHKERRQ(ierr);
+      ierr = PetscFree3(fl1,inside,rr);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(eps->V,0,nv);CHKERRQ(ierr);
+      if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+        ierr = ConstructS(eps);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
+        ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
+      }
+      ierr = BVCopy(ctx->S,eps->V);CHKERRQ(ierr);
+
+      ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
+      ierr = DSGetMat(eps->ds,DS_MAT_X,&X);CHKERRQ(ierr);
+      ierr = BVMultInPlace(ctx->S,X,0,eps->nconv);CHKERRQ(ierr);
+      if (eps->ishermitian) {
+        ierr = BVMultInPlace(eps->V,X,0,eps->nconv);CHKERRQ(ierr);
+      }
+      ierr = MatDestroy(&X);CHKERRQ(ierr);
+      max_error = 0.0;
+      for (i=0;i<eps->nconv;i++) {
+        ierr = BVGetColumn(ctx->S,i,&si);CHKERRQ(ierr);
+        ierr = EPSComputeResidualNorm_Private(eps,eps->eigr[i],eps->eigi[i],si,NULL,w,&error);CHKERRQ(ierr);
+        ierr = (*eps->converged)(eps,eps->eigr[i],eps->eigi[i],error,&error,eps->convergedctx);CHKERRQ(ierr);
+        ierr = BVRestoreColumn(ctx->S,i,&si);CHKERRQ(ierr);
+        max_error = PetscMax(max_error,error);
+      }
+
+      if (max_error <= eps->tol) eps->reason = EPS_CONVERGED_TOL;
+      else if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
+      else {
+        if (eps->nconv > ctx->L) {
+          ierr = MatCreateSeqDense(PETSC_COMM_SELF,eps->nconv,ctx->L,NULL,&M);CHKERRQ(ierr);
+          ierr = MatDenseGetArray(M,&temp);CHKERRQ(ierr);
+          for (i=0;i<ctx->L*eps->nconv;i++) {
+            ierr = PetscRandomGetValue(rand,&temp[i]);CHKERRQ(ierr);
+            temp[i] = PetscRealPart(temp[i]);
+          }
+          ierr = MatDenseRestoreArray(M,&temp);CHKERRQ(ierr);
+          ierr = BVSetActiveColumns(ctx->S,0,eps->nconv);CHKERRQ(ierr);
+          ierr = BVMultInPlace(ctx->S,M,0,ctx->L);CHKERRQ(ierr);
+          ierr = MatDestroy(&M);CHKERRQ(ierr);
+          ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
+          ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
+        }
         if (ctx->pA) {
           ierr = VecScatterVecs(eps,ctx->V,ctx->L);CHKERRQ(ierr);
           ierr = SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
         } else {
           ierr = SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
         }
-      } else break;
-    }
-
-    eps->nconv = 0;
-    if (nv == 0) break;
-    ierr = DSSetDimensions(eps->ds,nv,0,0,0);CHKERRQ(ierr);
-    ierr = DSSetState(eps->ds,DS_STATE_RAW);CHKERRQ(ierr);
-
-    ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
-    ierr = DSGetMat(eps->ds,DS_MAT_A,&pA);CHKERRQ(ierr);
-    ierr = MatZeroEntries(pA);CHKERRQ(ierr);
-    ierr = BVMatProject(ctx->S,A,ctx->S,pA);CHKERRQ(ierr);
-    ierr = DSRestoreMat(eps->ds,DS_MAT_A,&pA);CHKERRQ(ierr);
-    ierr = DSGetMat(eps->ds,DS_MAT_B,&pB);CHKERRQ(ierr);
-    ierr = MatZeroEntries(pB);CHKERRQ(ierr);
-    if (B) { ierr = BVMatProject(ctx->S,B,ctx->S,pB);CHKERRQ(ierr); }
-    else { ierr = MatShift(pB,1);CHKERRQ(ierr); }
-    ierr = DSRestoreMat(eps->ds,DS_MAT_B,&pB);CHKERRQ(ierr);
-
-    ierr = DSSolve(eps->ds,eps->eigr,eps->eigi);CHKERRQ(ierr);
-    ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
-
-    ierr = PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);CHKERRQ(ierr);
-    ierr = isGhost(eps,ld,nv,fl1);CHKERRQ(ierr);
-    ierr = RGCheckInside(eps->rg,nv,eps->eigr,eps->eigi,inside);CHKERRQ(ierr);
-    for (i=0;i<nv;i++) {
-      if (fl1[i] && inside[i]>0) {
-        rr[i] = 1.0;
-        eps->nconv++;
-      } else rr[i] = 0.0;
-    }
-    ierr = DSSort(eps->ds,eps->eigr,eps->eigi,rr,NULL,&eps->nconv);CHKERRQ(ierr);
-    ierr = PetscFree3(fl1,inside,rr);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(eps->V,0,nv);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
-    ierr = BVCopy(ctx->S,eps->V);CHKERRQ(ierr);
-
-    ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
-    ierr = DSGetMat(eps->ds,DS_MAT_X,&X);CHKERRQ(ierr);
-    ierr = BVMultInPlace(ctx->S,X,0,eps->nconv);CHKERRQ(ierr);
-    if (eps->ishermitian) {
-      ierr = BVMultInPlace(eps->V,X,0,eps->nconv);CHKERRQ(ierr);
-    }
-    ierr = MatDestroy(&X);CHKERRQ(ierr);
-    max_error = 0.0;
-    for (i=0;i<eps->nconv;i++) {
-      ierr = BVGetColumn(ctx->S,i,&si);CHKERRQ(ierr);
-      ierr = VecNormalize(si,NULL);CHKERRQ(ierr);
-      ierr = EPSComputeResidualNorm_Private(eps,eps->eigr[i],0,si,NULL,w,&error);CHKERRQ(ierr);
-      ierr = (*eps->converged)(eps,eps->eigr[i],0,error,&error,eps->convergedctx);CHKERRQ(ierr);
-      ierr = BVRestoreColumn(ctx->S,i,&si);CHKERRQ(ierr);
-      max_error = PetscMax(max_error,error);
-    }
-
-    if (max_error <= eps->tol || outer == ctx->refine_outer) break;
-
-    if (eps->nconv > ctx->L) nv = eps->nconv;
-    else if (ctx->L > nv) nv = ctx->L;
-    ierr = MatCreateSeqDense(PETSC_COMM_SELF,nv,ctx->L,NULL,&M);CHKERRQ(ierr);
-    ierr = MatDenseGetArray(M,&temp);CHKERRQ(ierr);
-    for (i=0;i<ctx->L*nv;i++) {
-      ierr = PetscRandomGetValue(eps->rand,&temp[i]);CHKERRQ(ierr);
-      temp[i] = PetscRealPart(temp[i]);
-    }
-    ierr = MatDenseRestoreArray(M,&temp);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
-    ierr = BVMultInPlace(ctx->S,M,0,ctx->L);CHKERRQ(ierr);
-    ierr = MatDestroy(&M);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
-    ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
-    if (ctx->pA) {
-      ierr = VecScatterVecs(eps,ctx->V,ctx->L);CHKERRQ(ierr);
-      ierr = SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
-    } else {
-      ierr = SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
+      }
     }
   }
-  eps->reason = EPS_CONVERGED_TOL;
+  if (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+    ierr = PetscFree(H1);CHKERRQ(ierr);
+  }
+  ierr = PetscFree2(Mu,H0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSCISSSetSizes_CISS"
-static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)
+static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)
 {
   PetscErrorCode ierr;
   EPS_CISS       *ctx = (EPS_CISS*)eps->data;
@@ -1044,7 +1219,7 @@ static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,Petsc
     if (bsmax<ctx->L) ctx->L_max = ctx->L;
     else ctx->L_max = bsmax;
   }
-  ctx->isreal = isreal;
+  ctx->isreal = realmats;
   ierr = EPSReset(eps);CHKERRQ(ierr);   /* clean allocated arrays and force new setup */
   PetscFunctionReturn(0);
 }
@@ -1063,7 +1238,7 @@ static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,Petsc
 .  ms    - moment size
 .  npart - number of partitions when splitting the communicator
 .  bsmax - max block size
--  isreal - A and B are real
+-  realmats - A and B are real
 
    Options Database Keys:
 +  -eps_ciss_integration_points - Sets the number of integration points
@@ -1082,7 +1257,7 @@ static PetscErrorCode EPSCISSSetSizes_CISS(EPS eps,PetscInt ip,PetscInt bs,Petsc
 
 .seealso: EPSCISSGetSizes()
 @*/
-PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)
+PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)
 {
   PetscErrorCode ierr;
 
@@ -1093,14 +1268,14 @@ PetscErrorCode EPSCISSSetSizes(EPS eps,PetscInt ip,PetscInt bs,PetscInt ms,Petsc
   PetscValidLogicalCollectiveInt(eps,ms,4);
   PetscValidLogicalCollectiveInt(eps,npart,5);
   PetscValidLogicalCollectiveInt(eps,bsmax,6);
-  PetscValidLogicalCollectiveBool(eps,isreal,7);
-  ierr = PetscTryMethod(eps,"EPSCISSSetSizes_C",(EPS,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(eps,ip,bs,ms,npart,bsmax,isreal));CHKERRQ(ierr);
+  PetscValidLogicalCollectiveBool(eps,realmats,7);
+  ierr = PetscTryMethod(eps,"EPSCISSSetSizes_C",(EPS,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(eps,ip,bs,ms,npart,bsmax,realmats));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSCISSGetSizes_CISS"
-static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)
+static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)
 {
   EPS_CISS *ctx = (EPS_CISS*)eps->data;
 
@@ -1110,7 +1285,7 @@ static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,Pet
   if (ms) *ms = ctx->M;
   if (npart) *npart = ctx->num_subcomm;
   if (bsmax) *bsmax = ctx->L_max;
-  if (isreal) *isreal = ctx->isreal;
+  if (realmats) *realmats = ctx->isreal;
   PetscFunctionReturn(0);
 }
 
@@ -1130,19 +1305,19 @@ static PetscErrorCode EPSCISSGetSizes_CISS(EPS eps,PetscInt *ip,PetscInt *bs,Pet
 .  ms    - moment size
 .  npart - number of partitions when splitting the communicator
 .  bsmax - max block size
--  isreal - A and B are real
+-  realmats - A and B are real
 
    Level: advanced
 
 .seealso: EPSCISSSetSizes()
 @*/
-PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)
+PetscErrorCode EPSCISSGetSizes(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSCISSGetSizes_C",(EPS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(eps,ip,bs,ms,npart,bsmax,isreal));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSCISSGetSizes_C",(EPS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(eps,ip,bs,ms,npart,bsmax,realmats));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1238,13 +1413,13 @@ PetscErrorCode EPSCISSGetThreshold(EPS eps,PetscReal *delta,PetscReal *spur)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSCISSGetThreshold_C",(EPS,PetscReal*,PetscReal*),(eps,delta,spur));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSCISSGetThreshold_C",(EPS,PetscReal*,PetscReal*),(eps,delta,spur));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSCISSSetRefinement_CISS"
-static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt outer,PetscInt blsize)
+static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt blsize)
 {
   EPS_CISS *ctx = (EPS_CISS*)eps->data;
 
@@ -1255,12 +1430,6 @@ static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt
     if (inner<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,"The refine inner argument must be >= 0");
     ctx->refine_inner = inner;
   }
-  if (outer == PETSC_DEFAULT) {
-    ctx->refine_outer = 0;
-  } else {
-    if (outer<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,"The refine outer argument must be >= 0");
-    ctx->refine_outer = outer;
-  }
   if (blsize == PETSC_DEFAULT) {
     ctx->refine_blocksize = 0;
   } else {
@@ -1281,40 +1450,36 @@ static PetscErrorCode EPSCISSSetRefinement_CISS(EPS eps,PetscInt inner,PetscInt
    Input Parameters:
 +  eps    - the eigenproblem solver context
 .  inner  - number of iterative refinement iterations (inner loop)
-.  outer  - number of iterative refinement iterations (outer loop)
 -  blsize - number of iterative refinement iterations (blocksize loop)
 
    Options Database Keys:
 +  -eps_ciss_refine_inner - Sets number of inner iterations
-.  -eps_ciss_refine_outer - Sets number of outer iterations
 -  -eps_ciss_refine_blocksize - Sets number of blocksize iterations
 
    Level: advanced
 
 .seealso: EPSCISSGetRefinement()
 @*/
-PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt outer,PetscInt blsize)
+PetscErrorCode EPSCISSSetRefinement(EPS eps,PetscInt inner,PetscInt blsize)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidLogicalCollectiveInt(eps,inner,2);
-  PetscValidLogicalCollectiveInt(eps,outer,3);
-  PetscValidLogicalCollectiveInt(eps,blsize,4);
-  ierr = PetscTryMethod(eps,"EPSCISSSetRefinement_C",(EPS,PetscInt,PetscInt,PetscInt),(eps,inner,outer,blsize));CHKERRQ(ierr);
+  PetscValidLogicalCollectiveInt(eps,blsize,3);
+  ierr = PetscTryMethod(eps,"EPSCISSSetRefinement_C",(EPS,PetscInt,PetscInt),(eps,inner,blsize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSCISSGetRefinement_CISS"
-static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt *outer,PetscInt *blsize)
+static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt *blsize)
 {
   EPS_CISS *ctx = (EPS_CISS*)eps->data;
 
   PetscFunctionBegin;
   if (inner)  *inner = ctx->refine_inner;
-  if (outer)  *outer = ctx->refine_outer;
   if (blsize) *blsize = ctx->refine_blocksize;
   PetscFunctionReturn(0);
 }
@@ -1332,20 +1497,19 @@ static PetscErrorCode EPSCISSGetRefinement_CISS(EPS eps,PetscInt *inner,PetscInt
 
    Output Parameters:
 +  inner  - number of iterative refinement iterations (inner loop)
-.  outer  - number of iterative refinement iterations (outer loop)
 -  blsize - number of iterative refinement iterations (blocksize loop)
 
    Level: advanced
 
 .seealso: EPSCISSSetRefinement()
 @*/
-PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *outer,PetscInt *blsize)
+PetscErrorCode EPSCISSGetRefinement(EPS eps, PetscInt *inner, PetscInt *blsize)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSCISSGetRefinement_C",(EPS,PetscInt*,PetscInt*,PetscInt*),(eps,inner,outer,blsize));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSCISSGetRefinement_C",(EPS,PetscInt*,PetscInt*),(eps,inner,blsize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1356,7 +1520,8 @@ static PetscErrorCode EPSCISSSetUseST_CISS(EPS eps,PetscBool usest)
   EPS_CISS *ctx = (EPS_CISS*)eps->data;
 
   PetscFunctionBegin;
-  ctx->usest = usest;
+  ctx->usest     = usest;
+  ctx->usest_set = PETSC_TRUE;
   PetscFunctionReturn(0);
 }
 
@@ -1373,7 +1538,7 @@ static PetscErrorCode EPSCISSSetUseST_CISS(EPS eps,PetscBool usest)
 -  usest  - boolean flag to use the ST object or not
 
    Options Database Keys:
-+  -eps_ciss_usest <bool> - whether the ST object will be used or not
+.  -eps_ciss_usest <bool> - whether the ST object will be used or not
 
    Level: advanced
 
@@ -1413,23 +1578,197 @@ static PetscErrorCode EPSCISSGetUseST_CISS(EPS eps,PetscBool *usest)
 .  eps - the eigenproblem solver context
 
    Output Parameters:
-+  usest - boolean flag indicating if the ST object is being used
+.  usest - boolean flag indicating if the ST object is being used
 
    Level: advanced
 
 .seealso: EPSCISSSetUseST()
 @*/
-PetscErrorCode EPSCISSGetUseST(EPS eps, PetscBool *usest)
+PetscErrorCode EPSCISSGetUseST(EPS eps,PetscBool *usest)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSCISSGetUseST_C",(EPS,PetscBool*),(eps,usest));CHKERRQ(ierr);
+  PetscValidPointer(usest,2);
+  ierr = PetscUseMethod(eps,"EPSCISSGetUseST_C",(EPS,PetscBool*),(eps,usest));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "EPSCISSSetQuadRule_CISS"
+static PetscErrorCode EPSCISSSetQuadRule_CISS(EPS eps,EPSCISSQuadRule quad)
+{
+  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+  PetscFunctionBegin;
+  ctx->quad = quad;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSSetQuadRule"
+/*@
+   EPSCISSSetQuadRule - Sets the quadrature rule used in the CISS solver. 
+
+   Logically Collective on EPS
+
+   Input Parameters:
++  eps  - the eigenproblem solver context
+-  quad - the quadrature rule
+
+   Options Database Key:
+.  -eps_ciss_quadrule - Sets the quadrature rule (either 'trapezoidal' or
+                           'chebyshev')
+
+   Notes:
+   By default, the trapezoidal rule is used (EPS_CISS_QUADRULE_TRAPEZOIDAL).
+
+   If the 'chebyshev' option is specified (EPS_CISS_QUADRULE_CHEBYSHEV), then
+   Chebyshev points are used as quadrature points.
+
+   Level: advanced
+
+.seealso: EPSCISSGetQuadRule(), EPSCISSQuadRule
+@*/
+PetscErrorCode EPSCISSSetQuadRule(EPS eps,EPSCISSQuadRule quad)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(eps,quad,2);
+  ierr = PetscTryMethod(eps,"EPSCISSSetQuadRule_C",(EPS,EPSCISSQuadRule),(eps,quad));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSGetQuadRule_CISS"
+static PetscErrorCode EPSCISSGetQuadRule_CISS(EPS eps,EPSCISSQuadRule *quad)
+{
+  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+  PetscFunctionBegin;
+  *quad = ctx->quad;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSGetQuadRule"
+/*@
+   EPSCISSGetQuadRule - Gets the quadrature rule used in the CISS solver.
+   
+   Not Collective
+
+   Input Parameter:
+.  eps - the eigenproblem solver context
+
+   Output Parameters:
+.  quad - quadrature rule
+
+   Level: advanced
+
+.seealso: EPSCISSSetQuadRule() EPSCISSQuadRule
+@*/
+PetscErrorCode EPSCISSGetQuadRule(EPS eps, EPSCISSQuadRule *quad)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(quad,2);
+  ierr = PetscUseMethod(eps,"EPSCISSGetQuadRule_C",(EPS,EPSCISSQuadRule*),(eps,quad));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSSetExtraction_CISS"
+static PetscErrorCode EPSCISSSetExtraction_CISS(EPS eps,EPSCISSExtraction extraction)
+{
+  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+  PetscFunctionBegin;
+  ctx->extraction = extraction;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSSetExtraction"
+/*@
+   EPSCISSSetExtraction - Sets the extraction technique used in the CISS solver. 
+
+   Logically Collective on EPS
+
+   Input Parameters:
++  eps        - the eigenproblem solver context
+-  extraction - the extraction technique
+
+   Options Database Key:
+.  -eps_ciss_extraction - Sets the extraction technique (either 'ritz' or
+                           'hankel')
+
+   Notes:
+   By default, the Rayleigh-Ritz extraction is used (EPS_CISS_EXTRACTION_RITZ).
+
+   If the 'hankel' option is specified (EPS_CISS_EXTRACTION_HANKEL), then
+   the Block Hankel method is used for extracting eigenpairs.
+
+   Level: advanced
+
+.seealso: EPSCISSGetExtraction(), EPSCISSExtraction
+@*/
+PetscErrorCode EPSCISSSetExtraction(EPS eps,EPSCISSExtraction extraction)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(eps,extraction,2);
+  ierr = PetscTryMethod(eps,"EPSCISSSetExtraction_C",(EPS,EPSCISSExtraction),(eps,extraction));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSGetExtraction_CISS"
+static PetscErrorCode EPSCISSGetExtraction_CISS(EPS eps,EPSCISSExtraction *extraction)
+{
+  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+  PetscFunctionBegin;
+  *extraction = ctx->extraction;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSCISSGetExtraction"
+/*@
+   EPSCISSGetExtraction - Gets the extraction technique used in the CISS solver.
+
+   Not Collective
+
+   Input Parameter:
+.  eps - the eigenproblem solver context
+
+   Output Parameters:
++  extraction - extraction technique
+
+   Level: advanced
+
+.seealso: EPSCISSSetExtraction() EPSCISSExtraction
+@*/
+PetscErrorCode EPSCISSGetExtraction(EPS eps,EPSCISSExtraction *extraction)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(extraction,2);
+  ierr = PetscUseMethod(eps,"EPSCISSGetExtraction_C",(EPS,EPSCISSExtraction*),(eps,extraction));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSReset_CISS"
 PetscErrorCode EPSReset_CISS(EPS eps)
 {
@@ -1465,12 +1804,15 @@ PetscErrorCode EPSReset_CISS(EPS eps)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_CISS"
-PetscErrorCode EPSSetFromOptions_CISS(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
-  PetscErrorCode ierr;
-  PetscReal      r3,r4;
-  PetscInt       i1,i2,i3,i4,i5,i6,i7,i8;
-  PetscBool      b1,b2;
+  PetscErrorCode    ierr;
+  PetscReal         r3,r4;
+  PetscInt          i1,i2,i3,i4,i5,i6,i7;
+  PetscBool         b1,b2,flg;
+  EPS_CISS          *ctx = (EPS_CISS*)eps->data;
+  EPSCISSQuadRule   quad;
+  EPSCISSExtraction extraction;
 
   PetscFunctionBegin;
   ierr = PetscOptionsHead(PetscOptionsObject,"EPS CISS Options");CHKERRQ(ierr);
@@ -1488,15 +1830,20 @@ PetscErrorCode EPSSetFromOptions_CISS(PetscOptions *PetscOptionsObject,EPS eps)
   ierr = PetscOptionsReal("-eps_ciss_spurious_threshold","CISS threshold for the spurious eigenpairs","EPSCISSSetThreshold",r4,&r4,NULL);CHKERRQ(ierr);
   ierr = EPSCISSSetThreshold(eps,r3,r4);CHKERRQ(ierr);
 
-  ierr = EPSCISSGetRefinement(eps,&i6,&i7,&i8);CHKERRQ(ierr);
+  ierr = EPSCISSGetRefinement(eps,&i6,&i7);CHKERRQ(ierr);
   ierr = PetscOptionsInt("-eps_ciss_refine_inner","CISS number of inner iterative refinement iterations","EPSCISSSetRefinement",i6,&i6,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsInt("-eps_ciss_refine_outer","CISS number of outer iterative refinement iterations","EPSCISSSetRefinement",i7,&i7,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsInt("-eps_ciss_refine_blocksize","CISS number of blocksize iterative refinement iterations","EPSCISSSetRefinement",i8,&i8,NULL);CHKERRQ(ierr);
-  ierr = EPSCISSSetRefinement(eps,i6,i7,i8);CHKERRQ(ierr);
+  ierr = PetscOptionsInt("-eps_ciss_refine_blocksize","CISS number of blocksize iterative refinement iterations","EPSCISSSetRefinement",i7,&i7,NULL);CHKERRQ(ierr);
+  ierr = EPSCISSSetRefinement(eps,i6,i7);CHKERRQ(ierr);
 
   ierr = EPSCISSGetUseST(eps,&b2);CHKERRQ(ierr);
-  ierr = PetscOptionsBool("-eps_ciss_usest","CISS use ST for linear solves","EPSCISSSetUseST",b2,&b2,NULL);CHKERRQ(ierr);
-  ierr = EPSCISSSetUseST(eps,b2);CHKERRQ(ierr);
+  ierr = PetscOptionsBool("-eps_ciss_usest","CISS use ST for linear solves","EPSCISSSetUseST",b2,&b2,&flg);CHKERRQ(ierr);
+  if (flg) { ierr = EPSCISSSetUseST(eps,b2);CHKERRQ(ierr); }
+
+  ierr = PetscOptionsEnum("-eps_ciss_quadrule","Quadrature rule","EPSCISSSetQuadRule",EPSCISSQuadRules,(PetscEnum)ctx->quad,(PetscEnum*)&quad,&flg);CHKERRQ(ierr);
+  if (flg) { ierr = EPSCISSSetQuadRule(eps,quad);CHKERRQ(ierr); }
+
+  ierr = PetscOptionsEnum("-eps_ciss_extraction","Extraction technique","EPSCISSSetExtraction",EPSCISSExtractions,(PetscEnum)ctx->extraction,(PetscEnum*)&extraction,&flg);CHKERRQ(ierr);
+  if (flg) { ierr = EPSCISSSetExtraction(eps,extraction);CHKERRQ(ierr); }
 
   ierr = PetscOptionsTail();CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -1518,6 +1865,10 @@ PetscErrorCode EPSDestroy_CISS(EPS eps)
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetRefinement_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSSetUseST_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetUseST_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSSetQuadRule_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetQuadRule_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSSetExtraction_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetExtraction_C",NULL);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1537,12 +1888,15 @@ PetscErrorCode EPSView_CISS(EPS eps,PetscViewer viewer)
       ierr = PetscViewerASCIIPrintf(viewer,"  CISS: exploiting symmetry of integration points\n");CHKERRQ(ierr);
     }
     ierr = PetscViewerASCIIPrintf(viewer,"  CISS: threshold { delta: %g, spurious threshold: %g }\n",(double)ctx->delta,(double)ctx->spurious_threshold);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  CISS: iterative refinement  { inner: %D, outer: %D, blocksize: %D }\n",ctx->refine_inner,ctx->refine_outer, ctx->refine_blocksize);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  CISS: iterative refinement  { inner: %D, blocksize: %D }\n",ctx->refine_inner, ctx->refine_blocksize);CHKERRQ(ierr);
     if (ctx->usest) {
       ierr = PetscViewerASCIIPrintf(viewer,"  CISS: using ST for linear solves\n");CHKERRQ(ierr);
     }
+    ierr = PetscViewerASCIIPrintf(viewer,"  CISS: extraction: %s\n",EPSCISSExtractions[ctx->extraction]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  CISS: quadrature rule: %s\n",EPSCISSQuadRules[ctx->quad]);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-    /*ierr = KSPView(ctx->ksp[0],viewer);CHKERRQ(ierr);*/
+    
+    if (!ctx->usest && ctx->ksp[0]) { ierr = KSPView(ctx->ksp[0],viewer);CHKERRQ(ierr); }
     ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
@@ -1558,6 +1912,7 @@ PETSC_EXTERN PetscErrorCode EPSCreate_CISS(EPS eps)
   PetscFunctionBegin;
   ierr = PetscNewLog(eps,&ctx);CHKERRQ(ierr);
   eps->data = ctx;
+  eps->ops->solve          = EPSSolve_CISS;
   eps->ops->setup          = EPSSetUp_CISS;
   eps->ops->setfromoptions = EPSSetFromOptions_CISS;
   eps->ops->destroy        = EPSDestroy_CISS;
@@ -1573,19 +1928,25 @@ PETSC_EXTERN PetscErrorCode EPSCreate_CISS(EPS eps)
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetRefinement_C",EPSCISSGetRefinement_CISS);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSSetUseST_C",EPSCISSSetUseST_CISS);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetUseST_C",EPSCISSGetUseST_CISS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSSetQuadRule_C",EPSCISSSetQuadRule_CISS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetQuadRule_C",EPSCISSGetQuadRule_CISS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSSetExtraction_C",EPSCISSSetExtraction_CISS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSCISSGetExtraction_C",EPSCISSGetExtraction_CISS);CHKERRQ(ierr);
   /* set default values of parameters */
-  ctx->N       = 32;
-  ctx->L       = 16;
-  ctx->M       = ctx->N/4;
-  ctx->delta   = 1e-12;
-  ctx->L_max   = 64;
+  ctx->N                  = 32;
+  ctx->L                  = 16;
+  ctx->M                  = ctx->N/4;
+  ctx->delta              = 1e-12;
+  ctx->L_max              = 64;
   ctx->spurious_threshold = 1e-4;
-  ctx->usest   = PETSC_FALSE;
-  ctx->isreal  = PETSC_FALSE;
-  ctx->refine_outer = 1;
-  ctx->refine_inner = 1;
-  ctx->refine_blocksize = 1;
-  ctx->num_subcomm = 1;
+  ctx->usest              = PETSC_TRUE;
+  ctx->usest_set          = PETSC_FALSE;
+  ctx->isreal             = PETSC_FALSE;
+  ctx->refine_inner       = 0;
+  ctx->refine_blocksize   = 0;
+  ctx->num_subcomm        = 1;
+  ctx->quad               = (EPSCISSQuadRule)0;
+  ctx->extraction         = EPS_CISS_EXTRACTION_RITZ;
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/ciss/ciss.c.html b/src/eps/impls/ciss/ciss.c.html
index 8ca9a33..31e8a98 100644
--- a/src/eps/impls/ciss/ciss.c.html
+++ b/src/eps/impls/ciss/ciss.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/ciss/ciss.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:13+00:00">
+<meta name="date" content="2016-05-16T10:33:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/ciss/ciss.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/ciss/ciss.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "ciss"</font>
@@ -35,7 +35,7 @@
 
 <a name="line24"> 24: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line25"> 25: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line26"> 26: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line26"> 26: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line28"> 28: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -56,42 +56,42 @@
 <a name="line44"> 44: </a><font color="#A020F0">#include <slepc/private/epsimpl.h>                </font><font color="#B22222">/*I "slepceps.h" I*/</font><font color="#A020F0"></font>
 <a name="line45"> 45: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
 
-<a name="line47"> 47: </a><strong><font color="#4169E1">PetscErrorCode EPSSolve_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-
-<a name="line49"> 49: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line50"> 50: </a>  <font color="#B22222">/* parameters */</font>
-<a name="line51"> 51: </a>  PetscInt    N;          <font color="#B22222">/* number of integration points (32) */</font>
-<a name="line52"> 52: </a>  PetscInt    L;          <font color="#B22222">/* block size (16) */</font>
-<a name="line53"> 53: </a>  PetscInt    M;          <font color="#B22222">/* moment degree (N/4 = 4) */</font>
-<a name="line54"> 54: </a>  PetscReal   delta;      <font color="#B22222">/* threshold of singular value (1e-12) */</font>
-<a name="line55"> 55: </a>  PetscInt    L_max;      <font color="#B22222">/* maximum number of columns of the source matrix V */</font>
-<a name="line56"> 56: </a>  PetscReal   spurious_threshold; <font color="#B22222">/* discard spurious eigenpairs */</font>
-<a name="line57"> 57: </a>  PetscBool   isreal;     <font color="#B22222">/* A and B are real */</font>
-<a name="line58"> 58: </a>  PetscInt    refine_inner;
-<a name="line59"> 59: </a>  PetscInt    refine_outer;
-<a name="line60"> 60: </a>  PetscInt    refine_blocksize;
-<a name="line61"> 61: </a>  <font color="#B22222">/* private data */</font>
-<a name="line62"> 62: </a>  PetscReal    *sigma;     <font color="#B22222">/* threshold for numerical rank */</font>
-<a name="line63"> 63: </a>  PetscInt     num_subcomm;
-<a name="line64"> 64: </a>  PetscInt     subcomm_id;
-<a name="line65"> 65: </a>  PetscInt     num_solve_point;
-<a name="line66"> 66: </a>  PetscScalar  *weight;
-<a name="line67"> 67: </a>  PetscScalar  *omega;
-<a name="line68"> 68: </a>  PetscScalar  *pp;
-<a name="line69"> 69: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V;
-<a name="line70"> 70: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           S;
-<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           pV;
-<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           Y;
-<a name="line73"> 73: </a>  Vec          xsub;
-<a name="line74"> 74: </a>  Vec          xdup;
-<a name="line75"> 75: </a>  KSP          *ksp;
-<a name="line76"> 76: </a>  Mat          *kspMat;
-<a name="line77"> 77: </a>  PetscBool    useconj;
-<a name="line78"> 78: </a>  PetscReal    est_eig;
-<a name="line79"> 79: </a>  VecScatter   scatterin;
-<a name="line80"> 80: </a>  Mat          pA,pB;
-<a name="line81"> 81: </a>  PetscSubcomm subcomm;
-<a name="line82"> 82: </a>  PetscBool    usest;
+<a name="line47"> 47: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line48"> 48: </a>  <font color="#B22222">/* parameters */</font>
+<a name="line49"> 49: </a>  PetscInt          N;          <font color="#B22222">/* number of integration points (32) */</font>
+<a name="line50"> 50: </a>  PetscInt          L;          <font color="#B22222">/* block size (16) */</font>
+<a name="line51"> 51: </a>  PetscInt          M;          <font color="#B22222">/* moment degree (N/4 = 4) */</font>
+<a name="line52"> 52: </a>  PetscReal         delta;      <font color="#B22222">/* threshold of singular value (1e-12) */</font>
+<a name="line53"> 53: </a>  PetscInt          L_max;      <font color="#B22222">/* maximum number of columns of the source matrix V */</font>
+<a name="line54"> 54: </a>  PetscReal         spurious_threshold; <font color="#B22222">/* discard spurious eigenpairs */</font>
+<a name="line55"> 55: </a>  PetscBool         isreal;     <font color="#B22222">/* A and B are real */</font>
+<a name="line56"> 56: </a>  PetscInt          refine_inner;
+<a name="line57"> 57: </a>  PetscInt          refine_blocksize;
+<a name="line58"> 58: </a>  <font color="#B22222">/* private data */</font>
+<a name="line59"> 59: </a>  PetscReal         *sigma;     <font color="#B22222">/* threshold for numerical rank */</font>
+<a name="line60"> 60: </a>  PetscInt          num_subcomm;
+<a name="line61"> 61: </a>  PetscInt          subcomm_id;
+<a name="line62"> 62: </a>  PetscInt          num_solve_point;
+<a name="line63"> 63: </a>  PetscScalar       *weight;
+<a name="line64"> 64: </a>  PetscScalar       *omega;
+<a name="line65"> 65: </a>  PetscScalar       *pp;
+<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>                V;
+<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>                S;
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>                pV;
+<a name="line69"> 69: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>                Y;
+<a name="line70"> 70: </a>  Vec               xsub;
+<a name="line71"> 71: </a>  Vec               xdup;
+<a name="line72"> 72: </a>  KSP               *ksp;
+<a name="line73"> 73: </a>  Mat               *kspMat;
+<a name="line74"> 74: </a>  PetscBool         useconj;
+<a name="line75"> 75: </a>  PetscReal         est_eig;
+<a name="line76"> 76: </a>  VecScatter        scatterin;
+<a name="line77"> 77: </a>  Mat               pA,pB;
+<a name="line78"> 78: </a>  PetscSubcomm      subcomm;
+<a name="line79"> 79: </a>  PetscBool         usest;
+<a name="line80"> 80: </a>  PetscBool         usest_set;  <font color="#B22222">/* whether the user set the usest flag or not */</font>
+<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>   quad;
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> extraction;
 <a name="line83"> 83: </a>} EPS_CISS;
 
 <a name="line87"> 87: </a><strong><font color="#4169E1"><a name="SetSolverComm"></a>static PetscErrorCode SetSolverComm(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
@@ -125,7 +125,7 @@
 <a name="line121">121: </a>    MatCreateRedundantMatrix(A,ctx->subcomm->n,PetscSubcommChild(ctx->subcomm),MAT_INITIAL_MATRIX,&ctx->pA);
 <a name="line122">122: </a>    <font color="#4169E1">if</font> (nmat>1) {
 <a name="line123">123: </a>      <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B);
-<a name="line124">124: </a>      MatCreateRedundantMatrix(B,ctx->subcomm->n,PetscSubcommChild(ctx->subcomm),MAT_INITIAL_MATRIX,&ctx->pB); 
+<a name="line124">124: </a>      MatCreateRedundantMatrix(B,ctx->subcomm->n,PetscSubcommChild(ctx->subcomm),MAT_INITIAL_MATRIX,&ctx->pB);
 <a name="line125">125: </a>    } <font color="#4169E1">else</font> ctx->pB = NULL;
 <a name="line126">126: </a>  } <font color="#4169E1">else</font> {
 <a name="line127">127: </a>    ctx->pA = NULL;
@@ -171,1274 +171,1596 @@
 <a name="line173">173: </a><strong><font color="#4169E1"><a name="SetPathParameter"></a>static PetscErrorCode SetPathParameter(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
 <a name="line174">174: </a>{
 <a name="line176">176: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line177">177: </a>  PetscInt       i;
-<a name="line178">178: </a>  PetscScalar    center;
-<a name="line179">179: </a>  PetscReal      theta,radius,vscale,start_ang,end_ang,width;
-<a name="line180">180: </a>  PetscBool      isring=PETSC_FALSE,isellipse=PETSC_FALSE;
-
-<a name="line183">183: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
-<a name="line184">184: </a>  <font color="#4169E1">if</font> (isellipse) {
-<a name="line185">185: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(eps->rg,&center,&radius,&vscale);
-<a name="line186">186: </a>  } <font color="#4169E1">else</font> {
-<a name="line187">187: </a>    PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);
-<a name="line188">188: </a>    <font color="#4169E1">if</font> (!isring) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Region must be Ellipse or Ring"</font>);
-<a name="line189">189: </a>    <a href="../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(eps->rg,&center,&radius,&vscale,&start_ang,&end_ang,&width);
-<a name="line190">190: </a>  }
-<a name="line191">191: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
-<a name="line192">192: </a>    <font color="#4169E1">if</font> (isring) {
-<a name="line193">193: </a>      <font color="#B22222">/* Ring region only supported for complex scalars */</font>
-<a name="line194">194: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line195">195: </a>      theta = (PETSC_PI/ctx->N)*(i+0.5);
-<a name="line196">196: </a>      ctx->pp[i] = PetscCosReal(theta);
-<a name="line197">197: </a>      ctx->weight[i] = PetscCosReal((ctx->N-1)*theta)/ctx->N;
-<a name="line198">198: </a>      theta = (start_ang*2+(end_ang-start_ang)*(PetscCosReal(theta)+1.0))*PETSC_PI;
-<a name="line199">199: </a>      ctx->omega[i] = center + radius*(PetscCosReal(theta)+PETSC_i*vscale*PetscSinReal(theta));
-<a name="line200">200: </a><font color="#A020F0">#endif</font>
-<a name="line201">201: </a>    } <font color="#4169E1">else</font> {
-<a name="line202">202: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line203">203: </a>      theta = ((2*PETSC_PI)/ctx->N)*(i+0.5);
-<a name="line204">204: </a>      ctx->pp[i] = PetscCosReal(theta) + PETSC_i*vscale*PetscSinReal(theta);
-<a name="line205">205: </a>      ctx->weight[i] = radius*(vscale*PetscCosReal(theta) + PETSC_i*PetscSinReal(theta))/(PetscReal)ctx->N;
-<a name="line206">206: </a>      ctx->omega[i] = center + radius*ctx->pp[i];
-<a name="line207">207: </a><font color="#A020F0">#else</font>
+<a name="line177">177: </a>  PetscInt       i,j;
+<a name="line178">178: </a>  PetscScalar    center=0.0,tmp,tmp2,*omegai;
+<a name="line179">179: </a>  PetscReal      theta,radius=1.0,vscale,a,b,c,d,max_w=0.0,rgscale;
+<a name="line180">180: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line181">181: </a>  PetscReal      start_ang,end_ang;
+<a name="line182">182: </a><font color="#A020F0">#endif</font>
+<a name="line183">183: </a>  PetscBool      isring=PETSC_FALSE,isellipse=PETSC_FALSE,isinterval=PETSC_FALSE;
+
+<a name="line186">186: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
+<a name="line187">187: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);
+<a name="line188">188: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGINTERVAL,&isinterval);
+<a name="line189">189: </a>  <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(eps->rg,&rgscale);
+<a name="line190">190: </a>  PetscMalloc1(ctx->N+1l,&omegai);
+<a name="line191">191: </a>  <a href="../../../../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a>(eps->rg,ctx->N,ctx->omega,omegai);
+<a name="line192">192: </a>  <font color="#4169E1">if</font> (isellipse) {
+<a name="line193">193: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(eps->rg,&center,&radius,&vscale);
+<a name="line194">194: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
+<a name="line195">195: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line196">196: </a>      theta = 2.0*PETSC_PI*(i+0.5)/ctx->N;
+<a name="line197">197: </a>      ctx->pp[i] = PetscCosReal(theta)+vscale*PetscSinReal(theta)*PETSC_i;
+<a name="line198">198: </a>      ctx->weight[i] = rgscale*radius*(vscale*PetscCosReal(theta)+PetscSinReal(theta)*PETSC_i)/(PetscReal)ctx->N;
+<a name="line199">199: </a><font color="#A020F0">#else</font>
+<a name="line200">200: </a>      theta = (PETSC_PI/ctx->N)*(i+0.5);
+<a name="line201">201: </a>      ctx->pp[i] = PetscCosReal(theta);
+<a name="line202">202: </a>      ctx->weight[i] = PetscCosReal((ctx->N-1)*theta)/ctx->N;
+<a name="line203">203: </a>      ctx->omega[i] = rgscale*(center + radius*ctx->pp[i]);
+<a name="line204">204: </a><font color="#A020F0">#endif</font>
+<a name="line205">205: </a>    }
+<a name="line206">206: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->quad == EPS_CISS_QUADRULE_CHEBYSHEV) {
+<a name="line207">207: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
 <a name="line208">208: </a>      theta = (PETSC_PI/ctx->N)*(i+0.5);
 <a name="line209">209: </a>      ctx->pp[i] = PetscCosReal(theta);
 <a name="line210">210: </a>      ctx->weight[i] = PetscCosReal((ctx->N-1)*theta)/ctx->N;
-<a name="line211">211: </a>      ctx->omega[i] = center + radius*ctx->pp[i];
-<a name="line212">212: </a><font color="#A020F0">#endif</font>
-<a name="line213">213: </a>    }
-<a name="line214">214: </a>  }
-<a name="line215">215: </a>  <font color="#4169E1">return</font>(0);
-<a name="line216">216: </a>}
-
-<a name="line220">220: </a><strong><font color="#4169E1"><a name="CISSVecSetRandom"></a>static PetscErrorCode CISSVecSetRandom(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt i0,PetscInt i1,PetscRandom rctx)</font></strong>
-<a name="line221">221: </a>{
-<a name="line223">223: </a>  PetscInt       i,j,nlocal;
-<a name="line224">224: </a>  PetscScalar    *vdata;
-<a name="line225">225: </a>  Vec            x;
-<a name="line226">226: </a> 
-<a name="line228">228: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(V,&nlocal,NULL,NULL);
-<a name="line229">229: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
-<a name="line230">230: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(V,i,rctx);
-<a name="line231">231: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&x);
-<a name="line232">232: </a>    VecGetArray(x,&vdata);
-<a name="line233">233: </a>    <font color="#4169E1">for</font> (j=0;j<nlocal;j++) {
-<a name="line234">234: </a>      vdata[j] = PetscRealPart(vdata[j]);
-<a name="line235">235: </a>      <font color="#4169E1">if</font> (PetscRealPart(vdata[j]) < 0.5) vdata[j] = -1.0;
-<a name="line236">236: </a>      <font color="#4169E1">else</font> vdata[j] = 1.0;
-<a name="line237">237: </a>    }
-<a name="line238">238: </a>    VecRestoreArray(x,&vdata);
-<a name="line239">239: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&x);
-<a name="line240">240: </a>  }
-<a name="line241">241: </a>  <font color="#4169E1">return</font>(0);
-<a name="line242">242: </a>}
-
-<a name="line246">246: </a><strong><font color="#4169E1"><a name="VecScatterVecs"></a>static PetscErrorCode VecScatterVecs(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> Vin,PetscInt n)</font></strong>
-<a name="line247">247: </a>{
-<a name="line248">248: </a>  PetscErrorCode    ierr;
-<a name="line249">249: </a>  EPS_CISS          *ctx = (EPS_CISS*)eps->data;
-<a name="line250">250: </a>  PetscInt          i;
-<a name="line251">251: </a>  Vec               vi,pvi;
-<a name="line252">252: </a>  const PetscScalar *array;
-
-<a name="line255">255: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line256">256: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Vin,i,&vi);
-<a name="line257">257: </a>    VecScatterBegin(ctx->scatterin,vi,ctx->xdup,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line258">258: </a>    VecScatterEnd(ctx->scatterin,vi,ctx->xdup,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line259">259: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Vin,i,&vi);
-<a name="line260">260: </a>    VecGetArrayRead(ctx->xdup,&array);
-<a name="line261">261: </a>    VecPlaceArray(ctx->xsub,array);
-<a name="line262">262: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->pV,i,&pvi);
-<a name="line263">263: </a>    VecCopy(ctx->xsub,pvi);
-<a name="line264">264: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->pV,i,&pvi);
-<a name="line265">265: </a>    VecResetArray(ctx->xsub);
-<a name="line266">266: </a>    VecRestoreArrayRead(ctx->xdup,&array);
-<a name="line267">267: </a>  }
-<a name="line268">268: </a>  <font color="#4169E1">return</font>(0);
-<a name="line269">269: </a>}
-
-<a name="line273">273: </a><strong><font color="#4169E1"><a name="SolveLinearSystem"></a>static PetscErrorCode SolveLinearSystem(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat A,Mat B,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt L_start,PetscInt L_end,PetscBool initksp)</font></strong>
-<a name="line274">274: </a>{
-<a name="line276">276: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line277">277: </a>  PetscInt       i,j,p_id;
-<a name="line278">278: </a>  Mat            Fz;
-<a name="line279">279: </a>  PC             pc;
-<a name="line280">280: </a>  Vec            Bvj,vj,yj;
-<a name="line281">281: </a>  KSP            ksp;
-
-<a name="line284">284: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,&Bvj);
-<a name="line285">285: </a>  <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line286">286: </a>    MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&Fz);
-<a name="line287">287: </a>  }
-<a name="line288">288: </a>  <font color="#4169E1">if</font> (ctx->usest && ctx->pA) {
-<a name="line289">289: </a>    KSPCreate(PetscSubcommChild(ctx->subcomm),&ksp);
-<a name="line290">290: </a>  }
-<a name="line291">291: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line292">292: </a>    p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line293">293: </a>    <font color="#4169E1">if</font> (!ctx->usest && initksp == PETSC_TRUE) {
-<a name="line294">294: </a>      MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&ctx->kspMat[i]);
-<a name="line295">295: </a>      MatCopy(A,ctx->kspMat[i],DIFFERENT_NONZERO_PATTERN);
-<a name="line296">296: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line297">297: </a>        MatAXPY(ctx->kspMat[i],-ctx->omega[p_id],B,DIFFERENT_NONZERO_PATTERN);
-<a name="line298">298: </a>      } <font color="#4169E1">else</font> {
-<a name="line299">299: </a>        MatShift(ctx->kspMat[i],-ctx->omega[p_id]);
-<a name="line300">300: </a>      }
-<a name="line301">301: </a>      KSPSetOperators(ctx->ksp[i],ctx->kspMat[i],ctx->kspMat[i]);
-<a name="line302">302: </a>      KSPSetType(ctx->ksp[i],KSPPREONLY);
-<a name="line303">303: </a>      KSPGetPC(ctx->ksp[i],&pc);
-<a name="line304">304: </a>      PCSetType(pc,PCREDUNDANT);
-<a name="line305">305: </a>      KSPSetFromOptions(ctx->ksp[i]);
-<a name="line306">306: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->usest && ctx->pA) {
-<a name="line307">307: </a>      MatCopy(A,Fz,DIFFERENT_NONZERO_PATTERN);
-<a name="line308">308: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line309">309: </a>        MatAXPY(Fz,-ctx->omega[p_id],B,DIFFERENT_NONZERO_PATTERN);
-<a name="line310">310: </a>      } <font color="#4169E1">else</font> {
-<a name="line311">311: </a>        MatShift(Fz,-ctx->omega[p_id]);
-<a name="line312">312: </a>      }
-<a name="line313">313: </a>      KSPSetOperators(ksp,Fz,Fz);
-<a name="line314">314: </a>      KSPSetType(ksp,KSPPREONLY);
-<a name="line315">315: </a>      KSPGetPC(ksp,&pc);
-<a name="line316">316: </a>      PCSetType(pc,PCREDUNDANT);
-<a name="line317">317: </a>      KSPSetFromOptions(ksp);
-<a name="line318">318: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->usest && !ctx->pA) {
-<a name="line319">319: </a>      <a href="../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,ctx->omega[p_id]);
-<a name="line320">320: </a>      <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line321">321: </a>    }
-<a name="line322">322: </a>    
-<a name="line323">323: </a>    <font color="#4169E1">for</font> (j=L_start;j<L_end;j++) {
-<a name="line324">324: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&vj);
-<a name="line325">325: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
-<a name="line326">326: </a>      <font color="#4169E1">if</font> (B) {
-<a name="line327">327: </a>        MatMult(B,vj,Bvj);
-<a name="line328">328: </a>        <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line329">329: </a>          KSPSolve(ksp,Bvj,yj);
-<a name="line330">330: </a>        } <font color="#4169E1">else</font> {
-<a name="line331">331: </a>          KSPSolve(ctx->ksp[i],Bvj,yj);
-<a name="line332">332: </a>        }
-<a name="line333">333: </a>      } <font color="#4169E1">else</font> {
-<a name="line334">334: </a>        <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line335">335: </a>          KSPSolve(ksp,vj,yj);
-<a name="line336">336: </a>        } <font color="#4169E1">else</font> {
-<a name="line337">337: </a>          KSPSolve(ctx->ksp[i],vj,yj);
-<a name="line338">338: </a>        }
-<a name="line339">339: </a>      }
-<a name="line340">340: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&vj);
-<a name="line341">341: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
-<a name="line342">342: </a>    }
-<a name="line343">343: </a>    <font color="#4169E1">if</font> (ctx->usest && i<ctx->num_solve_point-1) {  KSPReset(ksp); }
-<a name="line344">344: </a>  }
-<a name="line345">345: </a>  <font color="#4169E1">if</font> (ctx->usest) { MatDestroy(&Fz); }
-<a name="line346">346: </a>  VecDestroy(&Bvj);
-<a name="line347">347: </a>  <font color="#4169E1">if</font> (ctx->usest && ctx->pA) {
-<a name="line348">348: </a>    KSPDestroy(&ksp);
-<a name="line349">349: </a>  }
-<a name="line350">350: </a>  <font color="#4169E1">return</font>(0);
-<a name="line351">351: </a>}
-
-<a name="line353">353: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line356">356: </a><strong><font color="#4169E1"><a name="EstimateNumberEigs"></a>static PetscErrorCode EstimateNumberEigs(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *L_add)</font></strong>
-<a name="line357">357: </a>{
-<a name="line359">359: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line360">360: </a>  PetscInt       i,j,p_id;
-<a name="line361">361: </a>  PetscScalar    tmp,m = 1,sum = 0.0;
-<a name="line362">362: </a>  PetscReal      eta;
-<a name="line363">363: </a>  Vec            v,vtemp,vj,yj;
-
-<a name="line366">366: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
-<a name="line367">367: </a>  VecDuplicate(yj,&v);
-<a name="line368">368: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
-<a name="line369">369: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(ctx->V,&vtemp);
-<a name="line370">370: </a>  <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line371">371: </a>    VecSet(v,0);
-<a name="line372">372: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point; i++) {
-<a name="line373">373: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line374">374: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
-<a name="line375">375: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ctx->weight[p_id],1,v,&m);
-<a name="line376">376: </a>    }
-<a name="line377">377: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->V,j,&vj);
-<a name="line378">378: </a>    <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line379">379: </a>      VecSet(vtemp,0);
-<a name="line380">380: </a>      VecScatterBegin(ctx->scatterin,v,vtemp,ADD_VALUES,SCATTER_REVERSE);
-<a name="line381">381: </a>      VecScatterEnd(ctx->scatterin,v,vtemp,ADD_VALUES,SCATTER_REVERSE);
-<a name="line382">382: </a>      VecDot(vj,vtemp,&tmp);
-<a name="line383">383: </a>    } <font color="#4169E1">else</font> {
-<a name="line384">384: </a>      VecDot(vj,v,&tmp);
-<a name="line385">385: </a>    }
-<a name="line386">386: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->V,j,&vj);
-<a name="line387">387: </a>    <font color="#4169E1">if</font> (ctx->useconj) sum += PetscRealPart(tmp)*2;
-<a name="line388">388: </a>    <font color="#4169E1">else</font> sum += tmp;
-<a name="line389">389: </a>  }
-<a name="line390">390: </a>  ctx->est_eig = PetscAbsScalar(sum/(PetscReal)ctx->L);
-<a name="line391">391: </a>  eta = PetscPowReal(10.0,-PetscLog10Real(eps->tol)/ctx->N);
-<a name="line392">392: </a>  PetscInfo1(eps,<font color="#666666">"Estimation_#Eig %f\n"</font>,(double)ctx->est_eig);
-<a name="line393">393: </a>  *L_add = (PetscInt)PetscCeilReal((ctx->est_eig*eta)/ctx->M) - ctx->L;
-<a name="line394">394: </a>  <font color="#4169E1">if</font> (*L_add < 0) *L_add = 0;
-<a name="line395">395: </a>  <font color="#4169E1">if</font> (*L_add>ctx->L_max-ctx->L) {
-<a name="line396">396: </a>    PetscInfo(eps,<font color="#666666">"Number of eigenvalues around the contour path may be too large\n"</font>);
-<a name="line397">397: </a>    *L_add = ctx->L_max-ctx->L;
-<a name="line398">398: </a>  }
-<a name="line399">399: </a>  VecDestroy(&v);
-<a name="line400">400: </a>  VecDestroy(&vtemp);
-<a name="line401">401: </a>  <font color="#4169E1">return</font>(0);
-<a name="line402">402: </a>}
-<a name="line403">403: </a><font color="#A020F0">#endif</font>
-
-<a name="line407">407: </a><strong><font color="#4169E1"><a name="CalcMu"></a>static PetscErrorCode CalcMu(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *Mu)</font></strong>
-<a name="line408">408: </a>{
-<a name="line410">410: </a>  PetscMPIInt    sub_size;
-<a name="line411">411: </a>  PetscInt       i,j,k,s;
-<a name="line412">412: </a>  PetscScalar    *m,*temp,*temp2,*ppk,alp;
-<a name="line413">413: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line414">414: </a>  Mat            M;
-
-<a name="line417">417: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscSubcommChild(ctx->subcomm),&sub_size);
-<a name="line418">418: </a>  PetscMalloc3(ctx->num_solve_point*ctx->L*(ctx->L+1),&temp,2*ctx->M*ctx->L*ctx->L,&temp2,ctx->num_solve_point,&ppk);
-<a name="line419">419: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ctx->L,ctx->L_max*ctx->num_solve_point,NULL,&M);
-<a name="line420">420: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] = 0;
-<a name="line421">421: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,0,ctx->L_max*ctx->num_solve_point);
-<a name="line422">422: </a>  <font color="#4169E1">if</font> (ctx->pA) { 
-<a name="line423">423: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->pV,0,ctx->L);
-<a name="line424">424: </a>    <a href="../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(ctx->Y,ctx->pV,M);
-<a name="line425">425: </a>  } <font color="#4169E1">else</font> { 
-<a name="line426">426: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->V,0,ctx->L);
-<a name="line427">427: </a>    <a href="../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(ctx->Y,ctx->V,M);
-<a name="line428">428: </a>  }
-<a name="line429">429: </a>  MatDenseGetArray(M,&m);
-<a name="line430">430: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line431">431: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line432">432: </a>      <font color="#4169E1">for</font> (k=0;k<ctx->L;k++) {
-<a name="line433">433: </a>        temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
-<a name="line434">434: </a>      }
-<a name="line435">435: </a>    }
-<a name="line436">436: </a>  }
-<a name="line437">437: </a>  MatDenseRestoreArray(M,&m);
-<a name="line438">438: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
-<a name="line439">439: </a>  <font color="#4169E1">for</font> (k=0;k<2*ctx->M;k++) {
-<a name="line440">440: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line441">441: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line442">442: </a>        alp = ppk[i]*ctx->weight[i*ctx->subcomm->n + ctx->subcomm_id];
-<a name="line443">443: </a>        <font color="#4169E1">for</font> (s=0;s<ctx->L;s++) {
-<a name="line444">444: </a>          <font color="#4169E1">if</font> (ctx->useconj) temp2[s+(j+k*ctx->L)*ctx->L] += PetscRealPart(alp*temp[s+(j+i*ctx->L)*ctx->L])*2;
-<a name="line445">445: </a>          <font color="#4169E1">else</font> temp2[s+(j+k*ctx->L)*ctx->L] += alp*temp[s+(j+i*ctx->L)*ctx->L];
-<a name="line446">446: </a>        }
-<a name="line447">447: </a>      }
-<a name="line448">448: </a>    }
-<a name="line449">449: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) 
-<a name="line450">450: </a>      ppk[i] *= ctx->pp[i*ctx->subcomm->n + ctx->subcomm_id];
-<a name="line451">451: </a>  }
-<a name="line452">452: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] /= sub_size;
-<a name="line453">453: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(temp2,Mu,2*ctx->M*ctx->L*ctx->L,MPIU_SCALAR,MPIU_SUM,(PetscObjectComm((PetscObject)eps)));
-<a name="line454">454: </a>  PetscFree3(temp,temp2,ppk);
-<a name="line455">455: </a>  MatDestroy(&M);
-<a name="line456">456: </a>  <font color="#4169E1">return</font>(0);
-<a name="line457">457: </a>}
-
-<a name="line461">461: </a><strong><font color="#4169E1"><a name="BlockHankel"></a>static PetscErrorCode BlockHankel(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *Mu,PetscInt s,PetscScalar *H)</font></strong>
-<a name="line462">462: </a>{
-<a name="line463">463: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-<a name="line464">464: </a>  PetscInt i,j,k,L=ctx->L,M=ctx->M;
-
-<a name="line467">467: </a>  <font color="#4169E1">for</font> (k=0;k<L*M;k++) 
-<a name="line468">468: </a>    <font color="#4169E1">for</font> (j=0;j<M;j++) 
-<a name="line469">469: </a>      <font color="#4169E1">for</font> (i=0;i<L;i++)
-<a name="line470">470: </a>        H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
-<a name="line471">471: </a>  <font color="#4169E1">return</font>(0);
-<a name="line472">472: </a>}
-
-<a name="line476">476: </a><strong><font color="#4169E1"><a name="SVD_H0"></a>static PetscErrorCode SVD_H0(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *S,PetscInt *K)</font></strong>
-<a name="line477">477: </a>{
-<a name="line478">478: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GESVD)</font>
-<a name="line480">480: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
-<a name="line481">481: </a><font color="#A020F0">#else</font>
-<a name="line483">483: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line484">484: </a>  PetscInt       i,ml=ctx->L*ctx->M;
-<a name="line485">485: </a>  PetscBLASInt   m,n,lda,ldu,ldvt,lwork,info;
-<a name="line486">486: </a>  PetscScalar    *work;
-<a name="line487">487: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line488">488: </a>  PetscReal      *rwork;
-<a name="line489">489: </a><font color="#A020F0">#endif</font>
-
-<a name="line492">492: </a>  PetscMalloc1(5*ml,&work);
-<a name="line493">493: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line494">494: </a>  PetscMalloc1(5*ml,&rwork);
-<a name="line495">495: </a><font color="#A020F0">#endif</font>
-<a name="line496">496: </a>  PetscBLASIntCast(ml,&m);
-<a name="line497">497: </a>  n = m; lda = m; ldu = m; ldvt = m; lwork = 5*m;
-<a name="line498">498: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line499">499: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line500">500: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
-<a name="line501">501: </a><font color="#A020F0">#else</font>
-<a name="line502">502: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
-<a name="line503">503: </a><font color="#A020F0">#endif</font>
-<a name="line504">504: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-<a name="line505">505: </a>  PetscFPTrapPop();
-<a name="line506">506: </a>  (*K) = 0;
-<a name="line507">507: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
-<a name="line508">508: </a>    <font color="#4169E1">if</font> (ctx->sigma[i]/PetscMax(ctx->sigma[0],1)>ctx->delta) (*K)++;
-<a name="line509">509: </a>  }
-<a name="line510">510: </a>  PetscFree(work);
-<a name="line511">511: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line512">512: </a>  PetscFree(rwork);
-<a name="line513">513: </a><font color="#A020F0">#endif</font>
-<a name="line514">514: </a>  <font color="#4169E1">return</font>(0);
-<a name="line515">515: </a><font color="#A020F0">#endif</font>
-<a name="line516">516: </a>}
-
-<a name="line520">520: </a><strong><font color="#4169E1"><a name="ConstructS"></a>static PetscErrorCode ConstructS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line521">521: </a>{
-<a name="line523">523: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line524">524: </a>  PetscInt       i,j,k,vec_local_size,p_id;
-<a name="line525">525: </a>  Vec            v,sj,yj;
-<a name="line526">526: </a>  PetscScalar    *ppk, *v_data, m = 1;
-
-<a name="line529">529: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(ctx->Y,&vec_local_size,NULL,NULL);
-<a name="line530">530: </a>  PetscMalloc1(ctx->num_solve_point,&ppk);
-<a name="line531">531: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
-<a name="line532">532: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
-<a name="line533">533: </a>  VecDuplicate(yj,&v);
-<a name="line534">534: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
-<a name="line535">535: </a>  <font color="#4169E1">for</font> (k=0;k<ctx->M;k++) {
-<a name="line536">536: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line537">537: </a>      VecSet(v,0);
-<a name="line538">538: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line539">539: </a>        p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line540">540: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
-<a name="line541">541: </a>        <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ppk[i]*ctx->weight[p_id],1,v,&m);
-<a name="line542">542: </a>      }
-<a name="line543">543: </a>      <font color="#4169E1">if</font> (ctx->useconj) {
-<a name="line544">544: </a>        VecGetArray(v,&v_data);
-<a name="line545">545: </a>        <font color="#4169E1">for</font> (i=0;i<vec_local_size;i++) v_data[i] = PetscRealPart(v_data[i])*2;
-<a name="line546">546: </a>        VecRestoreArray(v,&v_data);
-<a name="line547">547: </a>      }
-<a name="line548">548: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->S,k*ctx->L+j,&sj);
-<a name="line549">549: </a>      <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line550">550: </a>        VecSet(sj,0);
-<a name="line551">551: </a>        VecScatterBegin(ctx->scatterin,v,sj,ADD_VALUES,SCATTER_REVERSE);
-<a name="line552">552: </a>        VecScatterEnd(ctx->scatterin,v,sj,ADD_VALUES,SCATTER_REVERSE);
-<a name="line553">553: </a>      } <font color="#4169E1">else</font> {
-<a name="line554">554: </a>        VecCopy(v,sj);
-<a name="line555">555: </a>      }
-<a name="line556">556: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->S,k*ctx->L+j,&sj);
-<a name="line557">557: </a>    }
-<a name="line558">558: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line559">559: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line560">560: </a>      ppk[i] *= ctx->pp[p_id];
-<a name="line561">561: </a>    }
-<a name="line562">562: </a>  }
-<a name="line563">563: </a>  PetscFree(ppk);
-<a name="line564">564: </a>  VecDestroy(&v);
-<a name="line565">565: </a>  <font color="#4169E1">return</font>(0);
-<a name="line566">566: </a>}
-
-<a name="line570">570: </a><strong><font color="#4169E1"><a name="SVD_S"></a>static PetscErrorCode SVD_S(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> S,PetscInt ml,PetscReal delta,PetscReal *sigma,PetscInt *K)</font></strong>
-<a name="line571">571: </a>{
-<a name="line572">572: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GESVD)</font>
-<a name="line574">574: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
-<a name="line575">575: </a><font color="#A020F0">#else</font>
-<a name="line577">577: </a>  PetscInt       i,j,k,local_size;
-<a name="line578">578: </a>  PetscScalar    *work,*temp,*B,*tempB,*s_data,*Q1,*Q2,*temp2,alpha=1,beta=0;
-<a name="line579">579: </a>  PetscBLASInt   l,m,n,lda,ldu,ldvt,lwork,info,ldb,ldc;
-<a name="line580">580: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line581">581: </a>  PetscReal      *rwork;
-<a name="line582">582: </a><font color="#A020F0">#endif</font>
-
-<a name="line585">585: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(S,&local_size,NULL,NULL);    
-<a name="line586">586: </a>  <a href="../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>(S,&s_data);
-<a name="line587">587: </a>  PetscMalloc7(ml*ml,&temp,ml*ml,&temp2,local_size*ml,&Q1,local_size*ml,&Q2,ml*ml,&B,ml*ml,&tempB,5*ml,&work);
-<a name="line588">588: </a>  PetscMemzero(B,ml*ml*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line589">589: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line590">590: </a>  PetscMalloc1(5*ml,&rwork);
-<a name="line591">591: </a><font color="#A020F0">#endif</font>
-<a name="line592">592: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-
-<a name="line594">594: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
-<a name="line595">595: </a>    B[i*ml+i]=1;
-<a name="line596">596: </a>  }
-
-<a name="line598">598: </a>  <font color="#4169E1">for</font> (k=0;k<2;k++) {
-<a name="line599">599: </a>    PetscBLASIntCast(local_size,&m);
-<a name="line600">600: </a>    PetscBLASIntCast(ml,&l);
-<a name="line601">601: </a>    n = l; lda = m; ldb = m; ldc = l;
-<a name="line602">602: </a>    <font color="#4169E1">if</font> (k == 0) {
-<a name="line603">603: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,s_data,&lda,s_data,&ldb,&beta,temp,&ldc));
-<a name="line604">604: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> ((k%2)==1) {
-<a name="line605">605: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q1,&lda,Q1,&ldb,&beta,temp,&ldc));
-<a name="line606">606: </a>    } <font color="#4169E1">else</font> {
-<a name="line607">607: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q2,&lda,Q2,&ldb,&beta,temp,&ldc));
-<a name="line608">608: </a>    }
-<a name="line609">609: </a>    PetscMemzero(temp2,ml*ml*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line610">610: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(temp,temp2,ml*ml,MPIU_SCALAR,MPIU_SUM,(PetscObjectComm((PetscObject)S)));
-
-<a name="line612">612: </a>    PetscBLASIntCast(ml,&m);
-<a name="line613">613: </a>    n = m; lda = m; lwork = 5*m, ldu = 1; ldvt = 1;
-<a name="line614">614: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line615">615: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"O"</font>,<font color="#666666">"N"</font>,&m,&n,temp2,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
-<a name="line616">616: </a><font color="#A020F0">#else</font>
-<a name="line617">617: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"O"</font>,<font color="#666666">"N"</font>,&m,&n,temp2,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
-<a name="line618">618: </a><font color="#A020F0">#endif</font>
-<a name="line619">619: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-
-<a name="line621">621: </a>    PetscBLASIntCast(local_size,&l);
-<a name="line622">622: </a>    PetscBLASIntCast(ml,&n);
-<a name="line623">623: </a>    m = n; lda = l; ldb = m; ldc = l;
-<a name="line624">624: </a>    <font color="#4169E1">if</font> (k==0) {
-<a name="line625">625: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,s_data,&lda,temp2,&ldb,&beta,Q1,&ldc));
-<a name="line626">626: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> ((k%2)==1) {
-<a name="line627">627: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q1,&lda,temp2,&ldb,&beta,Q2,&ldc));
-<a name="line628">628: </a>    } <font color="#4169E1">else</font> {
-<a name="line629">629: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q2,&lda,temp2,&ldb,&beta,Q1,&ldc));
-<a name="line630">630: </a>    }
-
-<a name="line632">632: </a>    PetscBLASIntCast(ml,&l);
-<a name="line633">633: </a>    m = l; n = l; lda = l; ldb = m; ldc = l;
-<a name="line634">634: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,B,&lda,temp2,&ldb,&beta,tempB,&ldc));
-<a name="line635">635: </a>    <font color="#4169E1">for</font> (i=0;i<ml;i++) {
-<a name="line636">636: </a>      sigma[i] = sqrt(sigma[i]);
-<a name="line637">637: </a>      <font color="#4169E1">for</font> (j=0;j<local_size;j++) {
-<a name="line638">638: </a>        <font color="#4169E1">if</font> ((k%2)==1) Q2[j+i*local_size]/=sigma[i];
-<a name="line639">639: </a>        <font color="#4169E1">else</font> Q1[j+i*local_size]/=sigma[i];
-<a name="line640">640: </a>      }
-<a name="line641">641: </a>      <font color="#4169E1">for</font> (j=0;j<ml;j++) {
-<a name="line642">642: </a>        B[j+i*ml]=tempB[j+i*ml]*sigma[i];
-<a name="line643">643: </a>      }
-<a name="line644">644: </a>    }
-<a name="line645">645: </a>  }
-
-<a name="line647">647: </a>  PetscBLASIntCast(ml,&m);
-<a name="line648">648: </a>  n = m; lda = m; ldu=1; ldvt=1;
-<a name="line649">649: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line650">650: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"O"</font>,&m,&n,B,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
-<a name="line651">651: </a><font color="#A020F0">#else</font>
-<a name="line652">652: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"O"</font>,&m,&n,B,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
-<a name="line653">653: </a><font color="#A020F0">#endif</font>
-<a name="line654">654: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-
-<a name="line656">656: </a>  PetscBLASIntCast(local_size,&l);
-<a name="line657">657: </a>  PetscBLASIntCast(ml,&n);
-<a name="line658">658: </a>  m = n; lda = l; ldb = m; ldc = l;
-<a name="line659">659: </a>  <font color="#4169E1">if</font> ((k%2)==1) {
-<a name="line660">660: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"T"</font>,&l,&n,&m,&alpha,Q1,&lda,B,&ldb,&beta,s_data,&ldc));
-<a name="line661">661: </a>  } <font color="#4169E1">else</font> {
-<a name="line662">662: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"T"</font>,&l,&n,&m,&alpha,Q2,&lda,B,&ldb,&beta,s_data,&ldc));
-<a name="line663">663: </a>  }
-<a name="line664">664: </a> 
-<a name="line665">665: </a>  PetscFPTrapPop();
-<a name="line666">666: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(S,&s_data);
-
-<a name="line668">668: </a>  (*K) = 0;
-<a name="line669">669: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
-<a name="line670">670: </a>    <font color="#4169E1">if</font> (sigma[i]/PetscMax(sigma[0],1)>delta) (*K)++;
-<a name="line671">671: </a>  }
-<a name="line672">672: </a>  PetscFree7(temp,temp2,Q1,Q2,B,tempB,work);
-<a name="line673">673: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line674">674: </a>  PetscFree(rwork);
-<a name="line675">675: </a><font color="#A020F0">#endif</font>
-<a name="line676">676: </a>  <font color="#4169E1">return</font>(0);
-<a name="line677">677: </a><font color="#A020F0">#endif</font>
-<a name="line678">678: </a>}
-
-<a name="line682">682: </a><strong><font color="#4169E1"><a name="isGhost"></a>static PetscErrorCode isGhost(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt ld,PetscInt nv,PetscBool *fl)</font></strong>
-<a name="line683">683: </a>{
-<a name="line685">685: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line686">686: </a>  PetscInt       i,j;
-<a name="line687">687: </a>  PetscScalar    *pX;
-<a name="line688">688: </a>  PetscReal      *tau,s1,s2,tau_max=0.0;
-
-<a name="line691">691: </a>  PetscMalloc1(nv,&tau);
-<a name="line692">692: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line693">693: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_X,&pX);
-
-<a name="line695">695: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line696">696: </a>    s1 = 0;
-<a name="line697">697: </a>    s2 = 0;
-<a name="line698">698: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) {
-<a name="line699">699: </a>      s1 += PetscAbsScalar(PetscPowScalarInt(pX[i*ld+j],2));
-<a name="line700">700: </a>      s2 += PetscPowRealInt(PetscAbsScalar(pX[i*ld+j]),2)/ctx->sigma[j];
-<a name="line701">701: </a>    }
-<a name="line702">702: </a>    tau[i] = s1/s2;
-<a name="line703">703: </a>    tau_max = PetscMax(tau_max,tau[i]);
-<a name="line704">704: </a>  }
-<a name="line705">705: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_X,&pX);
-<a name="line706">706: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line707">707: </a>    tau[i] /= tau_max;
-<a name="line708">708: </a>  }
-<a name="line709">709: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line710">710: </a>    <font color="#4169E1">if</font> (tau[i]>=ctx->spurious_threshold) fl[i] = PETSC_TRUE;
-<a name="line711">711: </a>    <font color="#4169E1">else</font> fl[i] = PETSC_FALSE;
-<a name="line712">712: </a>  }
-<a name="line713">713: </a>  PetscFree(tau);
-<a name="line714">714: </a>  <font color="#4169E1">return</font>(0);
-<a name="line715">715: </a>}
-
-<a name="line719">719: </a><strong><font color="#4169E1"><a name="EPSSetUp_CISS"></a>PetscErrorCode EPSSetUp_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line720">720: </a>{
-<a name="line722">722: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line723">723: </a>  const char     *prefix;
-<a name="line724">724: </a>  PetscInt       i;
-<a name="line725">725: </a>  PetscBool      issinvert,istrivial,isring,isellipse,flg;
-<a name="line726">726: </a>  PetscScalar    center;
-<a name="line727">727: </a>  Mat            A;
-
-<a name="line730">730: </a>  eps->ncv = PetscMin(eps->n,ctx->L_max*ctx->M);
-<a name="line731">731: </a>  <font color="#4169E1">if</font> (!eps->mpd) eps->mpd = eps->ncv;
-<a name="line732">732: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_ALL;
-<a name="line733">733: </a>  <font color="#4169E1">if</font> (!eps->extraction) { <a href="../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_RITZ); } 
-<a name="line734">734: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->extraction!=EPS_RITZ) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
-<a name="line735">735: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
-
-<a name="line737">737: </a>  <font color="#B22222">/* check region */</font>
-<a name="line738">738: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line739">739: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"EPSCISS requires a nontrivial region, e.g. -rg_type ellipse ..."</font>);
-<a name="line740">740: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
-<a name="line741">741: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);
-<a name="line742">742: </a>  <font color="#4169E1">if</font> (!isellipse && !isring) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Currently only implemented for elliptic or ring regions"</font>);
-<a name="line743">743: </a>  <font color="#4169E1">if</font> (isring) {
-<a name="line744">744: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line745">745: </a>    SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Currently only implemented for elliptic regions"</font>);
-<a name="line746">746: </a><font color="#A020F0">#endif</font>
-<a name="line747">747: </a>    ctx->useconj = PETSC_FALSE;
-<a name="line748">748: </a>  } <font color="#4169E1">else</font> {
-<a name="line749">749: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(eps->rg,&center,NULL,NULL);
-<a name="line750">750: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line751">751: </a>    <font color="#4169E1">if</font> (ctx->isreal && PetscImaginaryPart(center) == 0.0) ctx->useconj = PETSC_TRUE;
-<a name="line752">752: </a>    <font color="#4169E1">else</font> ctx->useconj = PETSC_FALSE;
-<a name="line753">753: </a><font color="#A020F0">#else</font>
-<a name="line754">754: </a>    ctx->useconj = PETSC_FALSE;
-<a name="line755">755: </a><font color="#A020F0">#endif</font>
-<a name="line756">756: </a>  }
-<a name="line757">757: </a>  <font color="#B22222">/* create split comm */</font>
-<a name="line758">758: </a>  SetSolverComm(eps);
-
-<a name="line760">760: </a>  <a href="../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-<a name="line761">761: </a>  PetscMalloc4(ctx->N,&ctx->weight,ctx->N,&ctx->omega,ctx->N,&ctx->pp,ctx->L_max*ctx->M,&ctx->sigma);
-<a name="line762">762: </a>  PetscLogObjectMemory((PetscObject)eps,3*ctx->N*<font color="#4169E1">sizeof</font>(PetscScalar)+ctx->L_max*ctx->N*<font color="#4169E1">sizeof</font>(PetscReal));
-
-<a name="line764">764: </a>  <font color="#B22222">/* allocate basis vectors */</font>
-<a name="line765">765: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->L_max*ctx->M,&ctx->S);
-<a name="line766">766: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->S);
-<a name="line767">767: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->L_max,&ctx->V);
-<a name="line768">768: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->V);
-
-<a name="line770">770: </a>  <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line771">771: </a>  PetscObjectTypeCompare((PetscObject)A,MATSHELL,&flg);
-<a name="line772">772: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Matrix type shell not supported in this solver"</font>);
-
-<a name="line774">774: </a>  CISSRedundantMat(eps);
-<a name="line775">775: </a>  <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line776">776: </a>    CISSScatterVec(eps);
-<a name="line777">777: </a>    <a href="../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)ctx->xsub),&ctx->pV);
-<a name="line778">778: </a>    <a href="../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(ctx->pV,ctx->xsub,eps->n);
-<a name="line779">779: </a>    <a href="../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(ctx->pV);
-<a name="line780">780: </a>    <a href="../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(ctx->pV,ctx->L_max,PETSC_FALSE);
-<a name="line781">781: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->pV);
-<a name="line782">782: </a>  }
-
-<a name="line784">784: </a>  <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line785">785: </a>    PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&issinvert);
-<a name="line786">786: </a>    <font color="#4169E1">if</font> (!issinvert) { <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSINVERT); }
-<a name="line787">787: </a>  } <font color="#4169E1">else</font> {
-<a name="line788">788: </a>    PetscMalloc2(ctx->num_solve_point,&ctx->ksp,ctx->num_solve_point,&ctx->kspMat);
-<a name="line789">789: </a>    PetscLogObjectMemory((PetscObject)eps,ctx->num_solve_point*<font color="#4169E1">sizeof</font>(KSP)+ctx->num_solve_point*<font color="#4169E1">sizeof</font>(Mat));
-<a name="line790">790: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line791">791: </a>      KSPCreate(PetscSubcommChild(ctx->subcomm),&ctx->ksp[i]);
-<a name="line792">792: </a>      PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)eps,1);
-<a name="line793">793: </a>      PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->ksp[i]);
-<a name="line794">794: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],<font color="#666666">"eps_ciss_"</font>);
-<a name="line795">795: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>(eps,&prefix);
-<a name="line796">796: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],prefix);
-<a name="line797">797: </a>      KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);
-<a name="line798">798: </a>    }
-<a name="line799">799: </a>  }
-
-<a name="line801">801: </a>  <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line802">802: </a>    <a href="../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)ctx->xsub),&ctx->Y);
-<a name="line803">803: </a>    <a href="../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(ctx->Y,ctx->xsub,eps->n);
-<a name="line804">804: </a>    <a href="../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(ctx->Y);
-<a name="line805">805: </a>    <a href="../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(ctx->Y,ctx->num_solve_point*ctx->L_max,PETSC_FALSE);
-<a name="line806">806: </a>  } <font color="#4169E1">else</font> {
-<a name="line807">807: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->num_solve_point*ctx->L_max,&ctx->Y);
+<a name="line211">211: </a>    }
+<a name="line212">212: </a>    <font color="#4169E1">if</font> (isinterval) {
+<a name="line213">213: </a>      <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(eps->rg,&a,&b,&c,&d);
+<a name="line214">214: </a>      <font color="#4169E1">if</font> ((c!=d || c!=0.0) && (a!=b || a!=0.0)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Endpoints of the imaginary axis or the real axis must be both zero"</font>);
+<a name="line215">215: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
+<a name="line216">216: </a>        <font color="#4169E1">if</font> (c==d) ctx->omega[i] = ((b-a)*(ctx->pp[i]+1.0)/2.0+a)*rgscale;
+<a name="line217">217: </a>        <font color="#4169E1">if</font> (a==b) {
+<a name="line218">218: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line219">219: </a>          ctx->omega[i] = ((d-c)*(ctx->pp[i]+1.0)/2.0+c)*rgscale*PETSC_i;
+<a name="line220">220: </a><font color="#A020F0">#else</font>
+<a name="line221">221: </a>          SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Integration points on a vertical line require complex arithmetic"</font>);
+<a name="line222">222: </a><font color="#A020F0">#endif</font>
+<a name="line223">223: </a>        }
+<a name="line224">224: </a>      }
+<a name="line225">225: </a>    }
+<a name="line226">226: </a>    <font color="#4169E1">if</font> (isring) {  <font color="#B22222">/* only supported in complex scalars */</font>
+<a name="line227">227: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line228">228: </a>      <a href="../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(eps->rg,&center,&radius,&vscale,&start_ang,&end_ang,NULL);
+<a name="line229">229: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
+<a name="line230">230: </a>        theta = (start_ang*2.0+(end_ang-start_ang)*(PetscRealPart(ctx->pp[i])+1.0))*PETSC_PI;
+<a name="line231">231: </a>        ctx->omega[i] = rgscale*(center + radius*(PetscCosReal(theta)+PETSC_i*vscale*PetscSinReal(theta)));
+<a name="line232">232: </a>      }
+<a name="line233">233: </a><font color="#A020F0">#endif</font>
+<a name="line234">234: </a>    }
+<a name="line235">235: </a>  } <font color="#4169E1">else</font> {
+<a name="line236">236: </a>    <font color="#4169E1">if</font> (isinterval) {
+<a name="line237">237: </a>      <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(eps->rg,&a,&b,&c,&d);
+<a name="line238">238: </a>      center = rgscale*((b+a)/2.0+(d+c)/2.0*PETSC_PI);
+<a name="line239">239: </a>      radius = PetscSqrtReal(PetscPowRealInt(rgscale*(b-a)/2.0,2)+PetscPowRealInt(rgscale*(d-c)/2.0,2));
+<a name="line240">240: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isring) {
+<a name="line241">241: </a>      <a href="../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(eps->rg,&center,&radius,NULL,NULL,NULL,NULL);
+<a name="line242">242: </a>      center *= rgscale;
+<a name="line243">243: </a>      radius *= rgscale;
+<a name="line244">244: </a>    }
+<a name="line245">245: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) { 
+<a name="line246">246: </a>      ctx->pp[i] = (ctx->omega[i]-center)/radius;
+<a name="line247">247: </a>      tmp = 1; tmp2 = 1;
+<a name="line248">248: </a>      <font color="#4169E1">for</font> (j=0;j<ctx->N;j++) {
+<a name="line249">249: </a>        tmp *= ctx->omega[j];
+<a name="line250">250: </a>        <font color="#4169E1">if</font> (i != j) tmp2 *= ctx->omega[j]-ctx->omega[i];
+<a name="line251">251: </a>      }
+<a name="line252">252: </a>      ctx->weight[i] = tmp/tmp2;
+<a name="line253">253: </a>      max_w = PetscMax(PetscAbsScalar(ctx->weight[i]),max_w);
+<a name="line254">254: </a>    }
+<a name="line255">255: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) ctx->weight[i] /= (PetscScalar)max_w;
+<a name="line256">256: </a>  }
+<a name="line257">257: </a>  PetscFree(omegai);
+<a name="line258">258: </a>  <font color="#4169E1">return</font>(0);
+<a name="line259">259: </a>}
+
+<a name="line263">263: </a><strong><font color="#4169E1"><a name="CISSVecSetRandom"></a>static PetscErrorCode CISSVecSetRandom(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt i0,PetscInt i1)</font></strong>
+<a name="line264">264: </a>{
+<a name="line266">266: </a>  PetscInt       i,j,nlocal;
+<a name="line267">267: </a>  PetscScalar    *vdata;
+<a name="line268">268: </a>  Vec            x;
+
+<a name="line271">271: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(V,&nlocal,NULL,NULL);
+<a name="line272">272: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
+<a name="line273">273: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(V,i);
+<a name="line274">274: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&x);
+<a name="line275">275: </a>    VecGetArray(x,&vdata);
+<a name="line276">276: </a>    <font color="#4169E1">for</font> (j=0;j<nlocal;j++) {
+<a name="line277">277: </a>      vdata[j] = PetscRealPart(vdata[j]);
+<a name="line278">278: </a>      <font color="#4169E1">if</font> (PetscRealPart(vdata[j]) < 0.5) vdata[j] = -1.0;
+<a name="line279">279: </a>      <font color="#4169E1">else</font> vdata[j] = 1.0;
+<a name="line280">280: </a>    }
+<a name="line281">281: </a>    VecRestoreArray(x,&vdata);
+<a name="line282">282: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&x);
+<a name="line283">283: </a>  }
+<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
+<a name="line285">285: </a>}
+
+<a name="line289">289: </a><strong><font color="#4169E1"><a name="VecScatterVecs"></a>static PetscErrorCode VecScatterVecs(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> Vin,PetscInt n)</font></strong>
+<a name="line290">290: </a>{
+<a name="line291">291: </a>  PetscErrorCode    ierr;
+<a name="line292">292: </a>  EPS_CISS          *ctx = (EPS_CISS*)eps->data;
+<a name="line293">293: </a>  PetscInt          i;
+<a name="line294">294: </a>  Vec               vi,pvi;
+<a name="line295">295: </a>  const PetscScalar *array;
+
+<a name="line298">298: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line299">299: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Vin,i,&vi);
+<a name="line300">300: </a>    VecScatterBegin(ctx->scatterin,vi,ctx->xdup,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line301">301: </a>    VecScatterEnd(ctx->scatterin,vi,ctx->xdup,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line302">302: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Vin,i,&vi);
+<a name="line303">303: </a>    VecGetArrayRead(ctx->xdup,&array);
+<a name="line304">304: </a>    VecPlaceArray(ctx->xsub,array);
+<a name="line305">305: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->pV,i,&pvi);
+<a name="line306">306: </a>    VecCopy(ctx->xsub,pvi);
+<a name="line307">307: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->pV,i,&pvi);
+<a name="line308">308: </a>    VecResetArray(ctx->xsub);
+<a name="line309">309: </a>    VecRestoreArrayRead(ctx->xdup,&array);
+<a name="line310">310: </a>  }
+<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
+<a name="line312">312: </a>}
+
+<a name="line316">316: </a><strong><font color="#4169E1"><a name="SolveLinearSystem"></a>static PetscErrorCode SolveLinearSystem(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat A,Mat B,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt L_start,PetscInt L_end,PetscBool initksp)</font></strong>
+<a name="line317">317: </a>{
+<a name="line319">319: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line320">320: </a>  PetscInt       i,j,p_id;
+<a name="line321">321: </a>  Mat            Fz;
+<a name="line322">322: </a>  PC             pc;
+<a name="line323">323: </a>  Vec            Bvj,vj,yj;
+<a name="line324">324: </a>  KSP            ksp;
+
+<a name="line327">327: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,&Bvj);
+<a name="line328">328: </a>  <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line329">329: </a>    MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&Fz);
+<a name="line330">330: </a>  }
+<a name="line331">331: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line332">332: </a>    p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line333">333: </a>    <font color="#4169E1">if</font> (!ctx->usest && initksp == PETSC_TRUE) {
+<a name="line334">334: </a>      MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&ctx->kspMat[i]);
+<a name="line335">335: </a>      MatCopy(A,ctx->kspMat[i],DIFFERENT_NONZERO_PATTERN);
+<a name="line336">336: </a>      <font color="#4169E1">if</font> (B) {
+<a name="line337">337: </a>        MatAXPY(ctx->kspMat[i],-ctx->omega[p_id],B,DIFFERENT_NONZERO_PATTERN);
+<a name="line338">338: </a>      } <font color="#4169E1">else</font> {
+<a name="line339">339: </a>        MatShift(ctx->kspMat[i],-ctx->omega[p_id]);
+<a name="line340">340: </a>      }
+<a name="line341">341: </a>      KSPSetOperators(ctx->ksp[i],ctx->kspMat[i],ctx->kspMat[i]);
+<a name="line342">342: </a>      KSPSetType(ctx->ksp[i],KSPPREONLY);
+<a name="line343">343: </a>      KSPGetPC(ctx->ksp[i],&pc);
+<a name="line344">344: </a>      PCSetType(pc,PCLU);
+<a name="line345">345: </a>      KSPSetFromOptions(ctx->ksp[i]);
+<a name="line346">346: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line347">347: </a>      <a href="../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,ctx->omega[p_id]);
+<a name="line348">348: </a>      <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line349">349: </a>    }
+<a name="line350">350: </a>    <font color="#4169E1">for</font> (j=L_start;j<L_end;j++) {
+<a name="line351">351: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&vj);
+<a name="line352">352: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
+<a name="line353">353: </a>      <font color="#4169E1">if</font> (B) {
+<a name="line354">354: </a>        MatMult(B,vj,Bvj);
+<a name="line355">355: </a>        <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line356">356: </a>          KSPSolve(ksp,Bvj,yj);
+<a name="line357">357: </a>        } <font color="#4169E1">else</font> {
+<a name="line358">358: </a>          KSPSolve(ctx->ksp[i],Bvj,yj);
+<a name="line359">359: </a>        }
+<a name="line360">360: </a>      } <font color="#4169E1">else</font> {
+<a name="line361">361: </a>        <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line362">362: </a>          KSPSolve(ksp,vj,yj);
+<a name="line363">363: </a>        } <font color="#4169E1">else</font> {
+<a name="line364">364: </a>          KSPSolve(ctx->ksp[i],vj,yj);
+<a name="line365">365: </a>        }
+<a name="line366">366: </a>      }
+<a name="line367">367: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&vj);
+<a name="line368">368: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
+<a name="line369">369: </a>    }
+<a name="line370">370: </a>    <font color="#4169E1">if</font> (ctx->usest && i<ctx->num_solve_point-1) {  KSPReset(ksp); }
+<a name="line371">371: </a>  }
+<a name="line372">372: </a>  <font color="#4169E1">if</font> (ctx->usest) { MatDestroy(&Fz); }
+<a name="line373">373: </a>  VecDestroy(&Bvj);
+<a name="line374">374: </a>  <font color="#4169E1">return</font>(0);
+<a name="line375">375: </a>}
+
+<a name="line377">377: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line380">380: </a><strong><font color="#4169E1"><a name="EstimateNumberEigs"></a>static PetscErrorCode EstimateNumberEigs(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *L_add)</font></strong>
+<a name="line381">381: </a>{
+<a name="line383">383: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line384">384: </a>  PetscInt       i,j,p_id;
+<a name="line385">385: </a>  PetscScalar    tmp,m = 1,sum = 0.0;
+<a name="line386">386: </a>  PetscReal      eta;
+<a name="line387">387: </a>  Vec            v,vtemp,vj,yj;
+
+<a name="line390">390: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
+<a name="line391">391: </a>  VecDuplicate(yj,&v);
+<a name="line392">392: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
+<a name="line393">393: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(ctx->V,&vtemp);
+<a name="line394">394: </a>  <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line395">395: </a>    VecSet(v,0);
+<a name="line396">396: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point; i++) {
+<a name="line397">397: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line398">398: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
+<a name="line399">399: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ctx->weight[p_id],1,v,&m);
+<a name="line400">400: </a>    }
+<a name="line401">401: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->V,j,&vj);
+<a name="line402">402: </a>    <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line403">403: </a>      VecSet(vtemp,0);
+<a name="line404">404: </a>      VecScatterBegin(ctx->scatterin,v,vtemp,ADD_VALUES,SCATTER_REVERSE);
+<a name="line405">405: </a>      VecScatterEnd(ctx->scatterin,v,vtemp,ADD_VALUES,SCATTER_REVERSE);
+<a name="line406">406: </a>      VecDot(vj,vtemp,&tmp);
+<a name="line407">407: </a>    } <font color="#4169E1">else</font> {
+<a name="line408">408: </a>      VecDot(vj,v,&tmp);
+<a name="line409">409: </a>    }
+<a name="line410">410: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->V,j,&vj);
+<a name="line411">411: </a>    <font color="#4169E1">if</font> (ctx->useconj) sum += PetscRealPart(tmp)*2;
+<a name="line412">412: </a>    <font color="#4169E1">else</font> sum += tmp;
+<a name="line413">413: </a>  }
+<a name="line414">414: </a>  ctx->est_eig = PetscAbsScalar(sum/(PetscReal)ctx->L);
+<a name="line415">415: </a>  eta = PetscPowReal(10.0,-PetscLog10Real(eps->tol)/ctx->N);
+<a name="line416">416: </a>  PetscInfo1(eps,<font color="#666666">"Estimation_#Eig %f\n"</font>,(double)ctx->est_eig);
+<a name="line417">417: </a>  *L_add = (PetscInt)PetscCeilReal((ctx->est_eig*eta)/ctx->M) - ctx->L;
+<a name="line418">418: </a>  <font color="#4169E1">if</font> (*L_add < 0) *L_add = 0;
+<a name="line419">419: </a>  <font color="#4169E1">if</font> (*L_add>ctx->L_max-ctx->L) {
+<a name="line420">420: </a>    PetscInfo(eps,<font color="#666666">"Number of eigenvalues around the contour path may be too large\n"</font>);
+<a name="line421">421: </a>    *L_add = ctx->L_max-ctx->L;
+<a name="line422">422: </a>  }
+<a name="line423">423: </a>  VecDestroy(&v);
+<a name="line424">424: </a>  VecDestroy(&vtemp);
+<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
+<a name="line426">426: </a>}
+<a name="line427">427: </a><font color="#A020F0">#endif</font>
+
+<a name="line431">431: </a><strong><font color="#4169E1"><a name="CalcMu"></a>static PetscErrorCode CalcMu(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *Mu)</font></strong>
+<a name="line432">432: </a>{
+<a name="line434">434: </a>  PetscMPIInt    sub_size,len;
+<a name="line435">435: </a>  PetscInt       i,j,k,s;
+<a name="line436">436: </a>  PetscScalar    *m,*temp,*temp2,*ppk,alp;
+<a name="line437">437: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line438">438: </a>  Mat            M;
+
+<a name="line441">441: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscSubcommChild(ctx->subcomm),&sub_size);
+<a name="line442">442: </a>  PetscMalloc3(ctx->num_solve_point*ctx->L*(ctx->L+1),&temp,2*ctx->M*ctx->L*ctx->L,&temp2,ctx->num_solve_point,&ppk);
+<a name="line443">443: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ctx->L,ctx->L_max*ctx->num_solve_point,NULL,&M);
+<a name="line444">444: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] = 0;
+<a name="line445">445: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,0,ctx->L_max*ctx->num_solve_point);
+<a name="line446">446: </a>  <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line447">447: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->pV,0,ctx->L);
+<a name="line448">448: </a>    <a href="../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(ctx->Y,ctx->pV,M);
+<a name="line449">449: </a>  } <font color="#4169E1">else</font> {
+<a name="line450">450: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->V,0,ctx->L);
+<a name="line451">451: </a>    <a href="../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(ctx->Y,ctx->V,M);
+<a name="line452">452: </a>  }
+<a name="line453">453: </a>  MatDenseGetArray(M,&m);
+<a name="line454">454: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line455">455: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line456">456: </a>      <font color="#4169E1">for</font> (k=0;k<ctx->L;k++) {
+<a name="line457">457: </a>        temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
+<a name="line458">458: </a>      }
+<a name="line459">459: </a>    }
+<a name="line460">460: </a>  }
+<a name="line461">461: </a>  MatDenseRestoreArray(M,&m);
+<a name="line462">462: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
+<a name="line463">463: </a>  <font color="#4169E1">for</font> (k=0;k<2*ctx->M;k++) {
+<a name="line464">464: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line465">465: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line466">466: </a>        alp = ppk[i]*ctx->weight[i*ctx->subcomm->n + ctx->subcomm_id];
+<a name="line467">467: </a>        <font color="#4169E1">for</font> (s=0;s<ctx->L;s++) {
+<a name="line468">468: </a>          <font color="#4169E1">if</font> (ctx->useconj) temp2[s+(j+k*ctx->L)*ctx->L] += PetscRealPart(alp*temp[s+(j+i*ctx->L)*ctx->L])*2;
+<a name="line469">469: </a>          <font color="#4169E1">else</font> temp2[s+(j+k*ctx->L)*ctx->L] += alp*temp[s+(j+i*ctx->L)*ctx->L];
+<a name="line470">470: </a>        }
+<a name="line471">471: </a>      }
+<a name="line472">472: </a>    }
+<a name="line473">473: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++)
+<a name="line474">474: </a>      ppk[i] *= ctx->pp[i*ctx->subcomm->n + ctx->subcomm_id];
+<a name="line475">475: </a>  }
+<a name="line476">476: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] /= sub_size;
+<a name="line477">477: </a>  PetscMPIIntCast(2*ctx->M*ctx->L*ctx->L,&len);
+<a name="line478">478: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(temp2,Mu,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)eps));
+<a name="line479">479: </a>  PetscFree3(temp,temp2,ppk);
+<a name="line480">480: </a>  MatDestroy(&M);
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><strong><font color="#4169E1"><a name="BlockHankel"></a>static PetscErrorCode BlockHankel(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *Mu,PetscInt s,PetscScalar *H)</font></strong>
+<a name="line487">487: </a>{
+<a name="line488">488: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+<a name="line489">489: </a>  PetscInt i,j,k,L=ctx->L,M=ctx->M;
+
+<a name="line492">492: </a>  <font color="#4169E1">for</font> (k=0;k<L*M;k++)
+<a name="line493">493: </a>    <font color="#4169E1">for</font> (j=0;j<M;j++)
+<a name="line494">494: </a>      <font color="#4169E1">for</font> (i=0;i<L;i++)
+<a name="line495">495: </a>        H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
+<a name="line496">496: </a>  <font color="#4169E1">return</font>(0);
+<a name="line497">497: </a>}
+
+<a name="line501">501: </a><strong><font color="#4169E1"><a name="SVD_H0"></a>static PetscErrorCode SVD_H0(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *S,PetscInt *K)</font></strong>
+<a name="line502">502: </a>{
+<a name="line503">503: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD)</font>
+<a name="line505">505: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
+<a name="line506">506: </a><font color="#A020F0">#else</font>
+<a name="line508">508: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line509">509: </a>  PetscInt       i,ml=ctx->L*ctx->M;
+<a name="line510">510: </a>  PetscBLASInt   m,n,lda,ldu,ldvt,lwork,info;
+<a name="line511">511: </a>  PetscScalar    *work;
+<a name="line512">512: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line513">513: </a>  PetscReal      *rwork;
+<a name="line514">514: </a><font color="#A020F0">#endif</font>
+
+<a name="line517">517: </a>  PetscMalloc1(5*ml,&work);
+<a name="line518">518: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line519">519: </a>  PetscMalloc1(5*ml,&rwork);
+<a name="line520">520: </a><font color="#A020F0">#endif</font>
+<a name="line521">521: </a>  PetscBLASIntCast(ml,&m);
+<a name="line522">522: </a>  n = m; lda = m; ldu = m; ldvt = m; lwork = 5*m;
+<a name="line523">523: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line524">524: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line525">525: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
+<a name="line526">526: </a><font color="#A020F0">#else</font>
+<a name="line527">527: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
+<a name="line528">528: </a><font color="#A020F0">#endif</font>
+<a name="line529">529: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+<a name="line530">530: </a>  PetscFPTrapPop();
+<a name="line531">531: </a>  (*K) = 0;
+<a name="line532">532: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
+<a name="line533">533: </a>    <font color="#4169E1">if</font> (ctx->sigma[i]/PetscMax(ctx->sigma[0],1)>ctx->delta) (*K)++;
+<a name="line534">534: </a>  }
+<a name="line535">535: </a>  PetscFree(work);
+<a name="line536">536: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line537">537: </a>  PetscFree(rwork);
+<a name="line538">538: </a><font color="#A020F0">#endif</font>
+<a name="line539">539: </a>  <font color="#4169E1">return</font>(0);
+<a name="line540">540: </a><font color="#A020F0">#endif</font>
+<a name="line541">541: </a>}
+
+<a name="line545">545: </a><strong><font color="#4169E1"><a name="ConstructS"></a>static PetscErrorCode ConstructS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line546">546: </a>{
+<a name="line548">548: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line549">549: </a>  PetscInt       i,j,k,vec_local_size,p_id;
+<a name="line550">550: </a>  Vec            v,sj,yj;
+<a name="line551">551: </a>  PetscScalar    *ppk, *v_data, m = 1;
+
+<a name="line554">554: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(ctx->Y,&vec_local_size,NULL,NULL);
+<a name="line555">555: </a>  PetscMalloc1(ctx->num_solve_point,&ppk);
+<a name="line556">556: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
+<a name="line557">557: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
+<a name="line558">558: </a>  VecDuplicate(yj,&v);
+<a name="line559">559: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
+<a name="line560">560: </a>  <font color="#4169E1">for</font> (k=0;k<ctx->M;k++) {
+<a name="line561">561: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line562">562: </a>      VecSet(v,0);
+<a name="line563">563: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line564">564: </a>        p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line565">565: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
+<a name="line566">566: </a>        <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ppk[i]*ctx->weight[p_id],1.0,v,&m);
+<a name="line567">567: </a>      }
+<a name="line568">568: </a>      <font color="#4169E1">if</font> (ctx->useconj) {
+<a name="line569">569: </a>        VecGetArray(v,&v_data);
+<a name="line570">570: </a>        <font color="#4169E1">for</font> (i=0;i<vec_local_size;i++) v_data[i] = PetscRealPart(v_data[i])*2;
+<a name="line571">571: </a>        VecRestoreArray(v,&v_data);
+<a name="line572">572: </a>      }
+<a name="line573">573: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->S,k*ctx->L+j,&sj);
+<a name="line574">574: </a>      <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line575">575: </a>        VecSet(sj,0);
+<a name="line576">576: </a>        VecScatterBegin(ctx->scatterin,v,sj,ADD_VALUES,SCATTER_REVERSE);
+<a name="line577">577: </a>        VecScatterEnd(ctx->scatterin,v,sj,ADD_VALUES,SCATTER_REVERSE);
+<a name="line578">578: </a>      } <font color="#4169E1">else</font> {
+<a name="line579">579: </a>        VecCopy(v,sj);
+<a name="line580">580: </a>      }
+<a name="line581">581: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->S,k*ctx->L+j,&sj);
+<a name="line582">582: </a>    }
+<a name="line583">583: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line584">584: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line585">585: </a>      ppk[i] *= ctx->pp[p_id];
+<a name="line586">586: </a>    }
+<a name="line587">587: </a>  }
+<a name="line588">588: </a>  PetscFree(ppk);
+<a name="line589">589: </a>  VecDestroy(&v);
+<a name="line590">590: </a>  <font color="#4169E1">return</font>(0);
+<a name="line591">591: </a>}
+
+<a name="line595">595: </a><strong><font color="#4169E1"><a name="SVD_S"></a>static PetscErrorCode SVD_S(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> S,PetscInt ml,PetscReal delta,PetscReal *sigma,PetscInt *K)</font></strong>
+<a name="line596">596: </a>{
+<a name="line597">597: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD)</font>
+<a name="line599">599: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
+<a name="line600">600: </a><font color="#A020F0">#else</font>
+<a name="line602">602: </a>  PetscInt       i,j,k,local_size;
+<a name="line603">603: </a>  PetscMPIInt    len;
+<a name="line604">604: </a>  PetscScalar    *work,*temp,*B,*tempB,*s_data,*Q1,*Q2,*temp2,alpha=1,beta=0;
+<a name="line605">605: </a>  PetscBLASInt   l,m,n,lda,ldu,ldvt,lwork,info,ldb,ldc;
+<a name="line606">606: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line607">607: </a>  PetscReal      *rwork;
+<a name="line608">608: </a><font color="#A020F0">#endif</font>
+
+<a name="line611">611: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(S,&local_size,NULL,NULL);
+<a name="line612">612: </a>  <a href="../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>(S,&s_data);
+<a name="line613">613: </a>  PetscMalloc7(ml*ml,&temp,ml*ml,&temp2,local_size*ml,&Q1,local_size*ml,&Q2,ml*ml,&B,ml*ml,&tempB,5*ml,&work);
+<a name="line614">614: </a>  PetscMemzero(B,ml*ml*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line615">615: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line616">616: </a>  PetscMalloc1(5*ml,&rwork);
+<a name="line617">617: </a><font color="#A020F0">#endif</font>
+<a name="line618">618: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+
+<a name="line620">620: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) B[i*ml+i]=1;
+
+<a name="line622">622: </a>  <font color="#4169E1">for</font> (k=0;k<2;k++) {
+<a name="line623">623: </a>    PetscBLASIntCast(local_size,&m);
+<a name="line624">624: </a>    PetscBLASIntCast(ml,&l);
+<a name="line625">625: </a>    n = l; lda = m; ldb = m; ldc = l;
+<a name="line626">626: </a>    <font color="#4169E1">if</font> (k == 0) {
+<a name="line627">627: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,s_data,&lda,s_data,&ldb,&beta,temp,&ldc));
+<a name="line628">628: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> ((k%2)==1) {
+<a name="line629">629: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q1,&lda,Q1,&ldb,&beta,temp,&ldc));
+<a name="line630">630: </a>    } <font color="#4169E1">else</font> {
+<a name="line631">631: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q2,&lda,Q2,&ldb,&beta,temp,&ldc));
+<a name="line632">632: </a>    }
+<a name="line633">633: </a>    PetscMemzero(temp2,ml*ml*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line634">634: </a>    PetscMPIIntCast(ml*ml,&len);
+<a name="line635">635: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(temp,temp2,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)S));
+
+<a name="line637">637: </a>    PetscBLASIntCast(ml,&m);
+<a name="line638">638: </a>    n = m; lda = m; lwork = 5*m, ldu = 1; ldvt = 1;
+<a name="line639">639: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line640">640: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"O"</font>,<font color="#666666">"N"</font>,&m,&n,temp2,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
+<a name="line641">641: </a><font color="#A020F0">#else</font>
+<a name="line642">642: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"O"</font>,<font color="#666666">"N"</font>,&m,&n,temp2,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
+<a name="line643">643: </a><font color="#A020F0">#endif</font>
+<a name="line644">644: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+
+<a name="line646">646: </a>    PetscBLASIntCast(local_size,&l);
+<a name="line647">647: </a>    PetscBLASIntCast(ml,&n);
+<a name="line648">648: </a>    m = n; lda = l; ldb = m; ldc = l;
+<a name="line649">649: </a>    <font color="#4169E1">if</font> (k==0) {
+<a name="line650">650: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,s_data,&lda,temp2,&ldb,&beta,Q1,&ldc));
+<a name="line651">651: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> ((k%2)==1) {
+<a name="line652">652: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q1,&lda,temp2,&ldb,&beta,Q2,&ldc));
+<a name="line653">653: </a>    } <font color="#4169E1">else</font> {
+<a name="line654">654: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,Q2,&lda,temp2,&ldb,&beta,Q1,&ldc));
+<a name="line655">655: </a>    }
+
+<a name="line657">657: </a>    PetscBLASIntCast(ml,&l);
+<a name="line658">658: </a>    m = l; n = l; lda = l; ldb = m; ldc = l;
+<a name="line659">659: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&l,&n,&m,&alpha,B,&lda,temp2,&ldb,&beta,tempB,&ldc));
+<a name="line660">660: </a>    <font color="#4169E1">for</font> (i=0;i<ml;i++) {
+<a name="line661">661: </a>      sigma[i] = sqrt(sigma[i]);
+<a name="line662">662: </a>      <font color="#4169E1">for</font> (j=0;j<local_size;j++) {
+<a name="line663">663: </a>        <font color="#4169E1">if</font> ((k%2)==1) Q2[j+i*local_size]/=sigma[i];
+<a name="line664">664: </a>        <font color="#4169E1">else</font> Q1[j+i*local_size]/=sigma[i];
+<a name="line665">665: </a>      }
+<a name="line666">666: </a>      <font color="#4169E1">for</font> (j=0;j<ml;j++) {
+<a name="line667">667: </a>        B[j+i*ml]=tempB[j+i*ml]*sigma[i];
+<a name="line668">668: </a>      }
+<a name="line669">669: </a>    }
+<a name="line670">670: </a>  }
+
+<a name="line672">672: </a>  PetscBLASIntCast(ml,&m);
+<a name="line673">673: </a>  n = m; lda = m; ldu=1; ldvt=1;
+<a name="line674">674: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line675">675: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"O"</font>,&m,&n,B,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
+<a name="line676">676: </a><font color="#A020F0">#else</font>
+<a name="line677">677: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"O"</font>,&m,&n,B,&lda,sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
+<a name="line678">678: </a><font color="#A020F0">#endif</font>
+<a name="line679">679: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+
+<a name="line681">681: </a>  PetscBLASIntCast(local_size,&l);
+<a name="line682">682: </a>  PetscBLASIntCast(ml,&n);
+<a name="line683">683: </a>  m = n; lda = l; ldb = m; ldc = l;
+<a name="line684">684: </a>  <font color="#4169E1">if</font> ((k%2)==1) {
+<a name="line685">685: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"T"</font>,&l,&n,&m,&alpha,Q1,&lda,B,&ldb,&beta,s_data,&ldc));
+<a name="line686">686: </a>  } <font color="#4169E1">else</font> {
+<a name="line687">687: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"T"</font>,&l,&n,&m,&alpha,Q2,&lda,B,&ldb,&beta,s_data,&ldc));
+<a name="line688">688: </a>  }
+
+<a name="line690">690: </a>  PetscFPTrapPop();
+<a name="line691">691: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(S,&s_data);
+
+<a name="line693">693: </a>  (*K) = 0;
+<a name="line694">694: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
+<a name="line695">695: </a>    <font color="#4169E1">if</font> (sigma[i]/PetscMax(sigma[0],1)>delta) (*K)++;
+<a name="line696">696: </a>  }
+<a name="line697">697: </a>  PetscFree7(temp,temp2,Q1,Q2,B,tempB,work);
+<a name="line698">698: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line699">699: </a>  PetscFree(rwork);
+<a name="line700">700: </a><font color="#A020F0">#endif</font>
+<a name="line701">701: </a>  <font color="#4169E1">return</font>(0);
+<a name="line702">702: </a><font color="#A020F0">#endif</font>
+<a name="line703">703: </a>}
+
+<a name="line707">707: </a><strong><font color="#4169E1"><a name="isGhost"></a>static PetscErrorCode isGhost(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt ld,PetscInt nv,PetscBool *fl)</font></strong>
+<a name="line708">708: </a>{
+<a name="line710">710: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line711">711: </a>  PetscInt       i,j;
+<a name="line712">712: </a>  PetscScalar    *pX;
+<a name="line713">713: </a>  PetscReal      *tau,s1,s2,tau_max=0.0;
+
+<a name="line716">716: </a>  PetscMalloc1(nv,&tau);
+<a name="line717">717: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+<a name="line718">718: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_X,&pX);
+
+<a name="line720">720: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line721">721: </a>    s1 = 0;
+<a name="line722">722: </a>    s2 = 0;
+<a name="line723">723: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) {
+<a name="line724">724: </a>      s1 += PetscAbsScalar(PetscPowScalarInt(pX[i*ld+j],2));
+<a name="line725">725: </a>      s2 += PetscPowRealInt(PetscAbsScalar(pX[i*ld+j]),2)/ctx->sigma[j];
+<a name="line726">726: </a>    }
+<a name="line727">727: </a>    tau[i] = s1/s2;
+<a name="line728">728: </a>    tau_max = PetscMax(tau_max,tau[i]);
+<a name="line729">729: </a>  }
+<a name="line730">730: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_X,&pX);
+<a name="line731">731: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line732">732: </a>    tau[i] /= tau_max;
+<a name="line733">733: </a>  }
+<a name="line734">734: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line735">735: </a>    <font color="#4169E1">if</font> (tau[i]>=ctx->spurious_threshold) fl[i] = PETSC_TRUE;
+<a name="line736">736: </a>    <font color="#4169E1">else</font> fl[i] = PETSC_FALSE;
+<a name="line737">737: </a>  }
+<a name="line738">738: </a>  PetscFree(tau);
+<a name="line739">739: </a>  <font color="#4169E1">return</font>(0);
+<a name="line740">740: </a>}
+
+<a name="line744">744: </a><strong><font color="#4169E1"><a name="rescale_eig"></a>static PetscErrorCode rescale_eig(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nv)</font></strong>
+<a name="line745">745: </a>{
+<a name="line747">747: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line748">748: </a>  PetscInt       i;
+<a name="line749">749: </a>  PetscScalar    center;
+<a name="line750">750: </a>  PetscReal      radius,a,b,c,d,rgscale;
+<a name="line751">751: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line752">752: </a>  PetscReal      start_ang,end_ang,vscale,theta;
+<a name="line753">753: </a><font color="#A020F0">#endif</font>
+<a name="line754">754: </a>  PetscBool      isring,isellipse,isinterval;
+
+<a name="line757">757: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
+<a name="line758">758: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);
+<a name="line759">759: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGINTERVAL,&isinterval);
+<a name="line760">760: </a>  <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(eps->rg,&rgscale);
+<a name="line761">761: </a>  <font color="#4169E1">if</font> (isinterval) {
+<a name="line762">762: </a>    <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(eps->rg,NULL,NULL,&c,&d);
+<a name="line763">763: </a>    <font color="#4169E1">if</font> (c==d) {
+<a name="line764">764: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line765">765: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line766">766: </a>        eps->eigr[i] = PetscRealPart(eps->eigr[i]);
+<a name="line767">767: </a><font color="#A020F0">#else</font>
+<a name="line768">768: </a>        eps->eigi[i] = 0;
+<a name="line769">769: </a><font color="#A020F0">#endif</font>
+<a name="line770">770: </a>      }
+<a name="line771">771: </a>    }
+<a name="line772">772: </a>  }
+<a name="line773">773: </a>  <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line774">774: </a>    <font color="#4169E1">if</font> (isellipse) {
+<a name="line775">775: </a>      <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(eps->rg,&center,&radius,NULL);
+<a name="line776">776: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++) eps->eigr[i] = rgscale*(center + radius*eps->eigr[i]);
+<a name="line777">777: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isinterval) {
+<a name="line778">778: </a>      <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(eps->rg,&a,&b,&c,&d);
+<a name="line779">779: </a>      <font color="#4169E1">if</font> (ctx->quad == EPS_CISS_QUADRULE_CHEBYSHEV) {
+<a name="line780">780: </a>        <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line781">781: </a>          <font color="#4169E1">if</font> (c==d) eps->eigr[i] = ((b-a)*(eps->eigr[i]+1.0)/2.0+a)*rgscale;
+<a name="line782">782: </a>          <font color="#4169E1">if</font> (a==b) {
+<a name="line783">783: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line784">784: </a>            eps->eigr[i] = ((d-c)*(eps->eigr[i]+1.0)/2.0+c)*rgscale*PETSC_i;
+<a name="line785">785: </a><font color="#A020F0">#else</font>
+<a name="line786">786: </a>            SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Integration points on a vertical line require complex arithmetic"</font>);
+<a name="line787">787: </a><font color="#A020F0">#endif</font>
+<a name="line788">788: </a>          }
+<a name="line789">789: </a>        }
+<a name="line790">790: </a>      } <font color="#4169E1">else</font> {
+<a name="line791">791: </a>        center = (b+a)/2.0+(d+c)/2.0*PETSC_PI;
+<a name="line792">792: </a>        radius = PetscSqrtReal(PetscPowRealInt((b-a)/2.0,2)+PetscPowRealInt((d-c)/2.0,2));
+<a name="line793">793: </a>        <font color="#4169E1">for</font> (i=0;i<nv;i++) eps->eigr[i] = center + radius*eps->eigr[i];
+<a name="line794">794: </a>      }
+<a name="line795">795: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isring) {  <font color="#B22222">/* only supported in complex scalars */</font>
+<a name="line796">796: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX) </font>
+<a name="line797">797: </a>      <a href="../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(eps->rg,&center,&radius,&vscale,&start_ang,&end_ang,NULL);
+<a name="line798">798: </a>      <font color="#4169E1">if</font> (ctx->quad == EPS_CISS_QUADRULE_CHEBYSHEV) {
+<a name="line799">799: </a>        <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line800">800: </a>          theta = (start_ang*2.0+(end_ang-start_ang)*(PetscRealPart(eps->eigr[i])+1.0))*PETSC_PI;
+<a name="line801">801: </a>          eps->eigr[i] = rgscale*center + (rgscale*radius+PetscImaginaryPart(eps->eigr[i]))*(PetscCosReal(theta)+PETSC_i*vscale*PetscSinReal(theta));
+<a name="line802">802: </a>        }
+<a name="line803">803: </a>      } <font color="#4169E1">else</font> {
+<a name="line804">804: </a>        <font color="#4169E1">for</font> (i=0;i<nv;i++) eps->eigr[i] = rgscale*(center + radius*eps->eigr[i]);
+<a name="line805">805: </a>      }
+<a name="line806">806: </a><font color="#A020F0">#endif</font>
+<a name="line807">807: </a>    }
 <a name="line808">808: </a>  }
-<a name="line809">809: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->Y);
-
-<a name="line811">811: </a>  <font color="#4169E1">if</font> (eps->ishermitian && eps->ispositive) {
-<a name="line812">812: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
-<a name="line813">813: </a>  } <font color="#4169E1">else</font> {
-<a name="line814">814: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP);
-<a name="line815">815: </a>  }
-<a name="line816">816: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv);
-<a name="line817">817: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,2);
-
-<a name="line819">819: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line820">820: </a>  <font color="#4169E1">if</font> (!eps->ishermitian) { PetscInfo(eps,<font color="#666666">"Warning: complex eigenvalues are not calculated exactly without --with-scalar-type=complex in PETSc\n"</font>); }
-<a name="line821">821: </a><font color="#A020F0">#endif</font>
-
-<a name="line823">823: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line824">824: </a>  eps->ops->solve = EPSSolve_CISS;
-<a name="line825">825: </a>  <font color="#4169E1">return</font>(0);
-<a name="line826">826: </a>}
-
-<a name="line830">830: </a><strong><font color="#4169E1"><a name="EPSSolve_CISS"></a>PetscErrorCode EPSSolve_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line831">831: </a>{
-<a name="line833">833: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line834">834: </a>  Mat            A,B,X,M,pA,pB;
-<a name="line835">835: </a>  PetscInt       i,ld,nmat,L_add=0,nv=0,L_base=ctx->L,inner,outer,nlocal,*inside;
-<a name="line836">836: </a>  PetscScalar    *Mu,*H0,*rr,*temp;
-<a name="line837">837: </a>  PetscReal      error,max_error;
-<a name="line838">838: </a>  PetscBool      *fl1;
-<a name="line839">839: </a>  Vec            si,w[3];
-<a name="line840">840: </a>  SlepcSC        sc;
-<a name="line841">841: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line842">842: </a>  PetscBool      isellipse;
-<a name="line843">843: </a><font color="#A020F0">#endif</font>
-
-<a name="line846">846: </a>  w[0] = eps->work[0];
-<a name="line847">847: </a>  w[1] = NULL;
-<a name="line848">848: </a>  w[2] = eps->work[1];
-<a name="line849">849: </a>  <font color="#B22222">/* override SC settings */</font>
-<a name="line850">850: </a>  <a href="../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(eps->ds,&sc);
-<a name="line851">851: </a>  sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line852">852: </a>  sc->comparisonctx = NULL;
-<a name="line853">853: </a>  sc->map           = NULL;
-<a name="line854">854: </a>  sc->mapobj        = NULL;
-<a name="line855">855: </a>  VecGetLocalSize(w[0],&nlocal);
-<a name="line856">856: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line857">857: </a>  <a href="../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line858">858: </a>  <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line859">859: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
-<a name="line860">860: </a>  <font color="#4169E1">else</font> B = NULL;
-<a name="line861">861: </a>  SetPathParameter(eps);
-<a name="line862">862: </a>  CISSVecSetRandom(ctx->V,0,ctx->L,eps->rand);
-
-<a name="line864">864: </a>  <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line865">865: </a>    VecScatterVecs(eps,ctx->V,ctx->L);
-<a name="line866">866: </a>    SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_TRUE);
-<a name="line867">867: </a>  } <font color="#4169E1">else</font> {
-<a name="line868">868: </a>    SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_TRUE);
-<a name="line869">869: </a>  }
-<a name="line870">870: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line871">871: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
-<a name="line872">872: </a>  <font color="#4169E1">if</font> (isellipse) {
-<a name="line873">873: </a>    EstimateNumberEigs(eps,&L_add);
-<a name="line874">874: </a>  } <font color="#4169E1">else</font> {
-<a name="line875">875: </a>    L_add = 0;
-<a name="line876">876: </a>  }
-<a name="line877">877: </a><font color="#A020F0">#else</font>
-<a name="line878">878: </a>  L_add = 0;
-<a name="line879">879: </a><font color="#A020F0">#endif</font>
-<a name="line880">880: </a>  <font color="#4169E1">if</font> (L_add>0) {
-<a name="line881">881: </a>    PetscInfo2(eps,<font color="#666666">"Changing L %D -> %D by Estimate #Eig\n"</font>,ctx->L,ctx->L+L_add);
-<a name="line882">882: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,eps->rand);
-<a name="line883">883: </a>    <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line884">884: </a>      VecScatterVecs(eps,ctx->V,ctx->L+L_add);
-<a name="line885">885: </a>      SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,ctx->L,ctx->L+L_add,PETSC_FALSE);
-<a name="line886">886: </a>    } <font color="#4169E1">else</font> {
-<a name="line887">887: </a>      SolveLinearSystem(eps,A,B,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
-<a name="line888">888: </a>    }
-<a name="line889">889: </a>    ctx->L += L_add;
-<a name="line890">890: </a>  }
-<a name="line891">891: </a>  PetscMalloc2(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0);
-<a name="line892">892: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->refine_blocksize;i++) {
-<a name="line893">893: </a>    CalcMu(eps,Mu);
-<a name="line894">894: </a>    BlockHankel(eps,Mu,0,H0);
-<a name="line895">895: </a>    SVD_H0(eps,H0,&nv);
-<a name="line896">896: </a>    <font color="#4169E1">if</font> (ctx->sigma[0]<=ctx->delta || nv < ctx->L*ctx->M || ctx->L == ctx->L_max) <font color="#4169E1">break</font>;
-<a name="line897">897: </a>    L_add = L_base;
-<a name="line898">898: </a>    <font color="#4169E1">if</font> (ctx->L+L_add>ctx->L_max) L_add = ctx->L_max-ctx->L;
-<a name="line899">899: </a>    PetscInfo2(eps,<font color="#666666">"Changing L %D -> %D by <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>(H0)\n"</font>,ctx->L,ctx->L+L_add);
-<a name="line900">900: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,eps->rand);
-<a name="line901">901: </a>    <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line902">902: </a>      VecScatterVecs(eps,ctx->V,ctx->L+L_add);
-<a name="line903">903: </a>      SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,ctx->L,ctx->L+L_add,PETSC_FALSE);
-<a name="line904">904: </a>    } <font color="#4169E1">else</font> {
-<a name="line905">905: </a>      SolveLinearSystem(eps,A,B,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
-<a name="line906">906: </a>    }
-<a name="line907">907: </a>    ctx->L += L_add;
-<a name="line908">908: </a>  }
-<a name="line909">909: </a>  PetscFree2(Mu,H0);
-
-<a name="line911">911: </a>  <font color="#4169E1">for</font> (outer=0;outer<=ctx->refine_outer;outer++) {
-<a name="line912">912: </a>    <font color="#4169E1">for</font> (inner=0;inner<=ctx->refine_inner;inner++) {
-<a name="line913">913: </a>      ConstructS(eps);
-<a name="line914">914: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
-<a name="line915">915: </a>      <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
-<a name="line916">916: </a>      SVD_S(ctx->S,ctx->L*ctx->M,ctx->delta,ctx->sigma,&nv);
-<a name="line917">917: </a>      <font color="#4169E1">if</font> (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
-<a name="line918">918: </a>        <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line919">919: </a>          VecScatterVecs(eps,ctx->V,ctx->L);
-<a name="line920">920: </a>          SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);
-<a name="line921">921: </a>        } <font color="#4169E1">else</font> {
-<a name="line922">922: </a>          SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);
-<a name="line923">923: </a>        }
-<a name="line924">924: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line925">925: </a>    }
-
-<a name="line927">927: </a>    eps->nconv = 0;
-<a name="line928">928: </a>    <font color="#4169E1">if</font> (nv == 0) <font color="#4169E1">break</font>;
-<a name="line929">929: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
-<a name="line930">930: </a>    <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-
-<a name="line932">932: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
-<a name="line933">933: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&pA);
-<a name="line934">934: </a>    MatZeroEntries(pA);
-<a name="line935">935: </a>    <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(ctx->S,A,ctx->S,pA);
-<a name="line936">936: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&pA);
-<a name="line937">937: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_B,&pB);
-<a name="line938">938: </a>    MatZeroEntries(pB);
-<a name="line939">939: </a>    <font color="#4169E1">if</font> (B) { <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(ctx->S,B,ctx->S,pB); }
-<a name="line940">940: </a>    <font color="#4169E1">else</font> { MatShift(pB,1); }
-<a name="line941">941: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_B,&pB);
-
-<a name="line943">943: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
-<a name="line944">944: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-
-<a name="line946">946: </a>    PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);
-<a name="line947">947: </a>    isGhost(eps,ld,nv,fl1);
-<a name="line948">948: </a>    <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(eps->rg,nv,eps->eigr,eps->eigi,inside);
-<a name="line949">949: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line950">950: </a>      <font color="#4169E1">if</font> (fl1[i] && inside[i]>0) {
-<a name="line951">951: </a>        rr[i] = 1.0;
-<a name="line952">952: </a>        eps->nconv++;
-<a name="line953">953: </a>      } <font color="#4169E1">else</font> rr[i] = 0.0;
-<a name="line954">954: </a>    }
-<a name="line955">955: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,rr,NULL,&eps->nconv);
-<a name="line956">956: </a>    PetscFree3(fl1,inside,rr);
-<a name="line957">957: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,nv);
-<a name="line958">958: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
-<a name="line959">959: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,eps->V);
-
-<a name="line961">961: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line962">962: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&X);
-<a name="line963">963: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,X,0,eps->nconv);
-<a name="line964">964: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line965">965: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,X,0,eps->nconv);
-<a name="line966">966: </a>    }
-<a name="line967">967: </a>    MatDestroy(&X);
-<a name="line968">968: </a>    max_error = 0.0;
-<a name="line969">969: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line970">970: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->S,i,&si);
-<a name="line971">971: </a>      VecNormalize(si,NULL);
-<a name="line972">972: </a>      EPSComputeResidualNorm_Private(eps,eps->eigr[i],0,si,NULL,w,&error);
-<a name="line973">973: </a>      (*eps->converged)(eps,eps->eigr[i],0,error,&error,eps->convergedctx);
-<a name="line974">974: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->S,i,&si);
-<a name="line975">975: </a>      max_error = PetscMax(max_error,error);
-<a name="line976">976: </a>    }
-
-<a name="line978">978: </a>    <font color="#4169E1">if</font> (max_error <= eps->tol || outer == ctx->refine_outer) <font color="#4169E1">break</font>;
-
-<a name="line980">980: </a>    <font color="#4169E1">if</font> (eps->nconv > ctx->L) nv = eps->nconv;
-<a name="line981">981: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->L > nv) nv = ctx->L;
-<a name="line982">982: </a>    MatCreateSeqDense(PETSC_COMM_SELF,nv,ctx->L,NULL,&M);
-<a name="line983">983: </a>    MatDenseGetArray(M,&temp);
-<a name="line984">984: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->L*nv;i++) {
-<a name="line985">985: </a>      PetscRandomGetValue(eps->rand,&temp[i]);
-<a name="line986">986: </a>      temp[i] = PetscRealPart(temp[i]);
-<a name="line987">987: </a>    }
-<a name="line988">988: </a>    MatDenseRestoreArray(M,&temp);
-<a name="line989">989: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
-<a name="line990">990: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,M,0,ctx->L);
-<a name="line991">991: </a>    MatDestroy(&M);
-<a name="line992">992: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
-<a name="line993">993: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
-<a name="line994">994: </a>    <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line995">995: </a>      VecScatterVecs(eps,ctx->V,ctx->L);
-<a name="line996">996: </a>      SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);
-<a name="line997">997: </a>    } <font color="#4169E1">else</font> {
-<a name="line998">998: </a>      SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);
-<a name="line999">999: </a>    }
-<a name="line1000">1000: </a>  }
-<a name="line1001">1001: </a>  eps->reason = EPS_CONVERGED_TOL;
-<a name="line1002">1002: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1003">1003: </a>}
-
-<a name="line1007">1007: </a><strong><font color="#4169E1"><a name="EPSCISSSetSizes_CISS"></a>static PetscErrorCode EPSCISSSetSizes_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)</font></strong>
-<a name="line1008">1008: </a>{
-<a name="line1010">1010: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1013">1013: </a>  <font color="#4169E1">if</font> (ip == PETSC_DECIDE || ip == PETSC_DEFAULT) {
-<a name="line1014">1014: </a>    <font color="#4169E1">if</font> (ctx->N!=32) { ctx->N =32; ctx->M = ctx->N/4; }
-<a name="line1015">1015: </a>  } <font color="#4169E1">else</font> {
-<a name="line1016">1016: </a>    <font color="#4169E1">if</font> (ip<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be > 0"</font>);
-<a name="line1017">1017: </a>    <font color="#4169E1">if</font> (ip%2) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be an even number"</font>);
-<a name="line1018">1018: </a>    <font color="#4169E1">if</font> (ctx->N!=ip) { ctx->N = ip; ctx->M = ctx->N/4; }
-<a name="line1019">1019: </a>  }
-<a name="line1020">1020: </a>  <font color="#4169E1">if</font> (bs == PETSC_DECIDE || bs == PETSC_DEFAULT) {
-<a name="line1021">1021: </a>    ctx->L = 16;
-<a name="line1022">1022: </a>  } <font color="#4169E1">else</font> {
-<a name="line1023">1023: </a>    <font color="#4169E1">if</font> (bs<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be > 0"</font>);
-<a name="line1024">1024: </a>    <font color="#4169E1">if</font> (bs>ctx->L_max) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be less than or equal to the maximum number of block size"</font>);
-<a name="line1025">1025: </a>    ctx->L = bs;
-<a name="line1026">1026: </a>  }
-<a name="line1027">1027: </a>  <font color="#4169E1">if</font> (ms == PETSC_DECIDE || ms == PETSC_DEFAULT) {
-<a name="line1028">1028: </a>    ctx->M = ctx->N/4;
-<a name="line1029">1029: </a>  } <font color="#4169E1">else</font> {
-<a name="line1030">1030: </a>    <font color="#4169E1">if</font> (ms<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be > 0"</font>);
-<a name="line1031">1031: </a>    <font color="#4169E1">if</font> (ms>ctx->N) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be less than or equal to the number of integration points"</font>);
-<a name="line1032">1032: </a>    ctx->M = ms;
-<a name="line1033">1033: </a>  }
-<a name="line1034">1034: </a>  <font color="#4169E1">if</font> (npart == PETSC_DECIDE || npart == PETSC_DEFAULT) {
-<a name="line1035">1035: </a>    ctx->num_subcomm = 1;
-<a name="line1036">1036: </a>  } <font color="#4169E1">else</font> {
-<a name="line1037">1037: </a>    <font color="#4169E1">if</font> (npart<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The npart argument must be > 0"</font>);
-<a name="line1038">1038: </a>    ctx->num_subcomm = npart;
-<a name="line1039">1039: </a>  }
-<a name="line1040">1040: </a>  <font color="#4169E1">if</font> (bsmax == PETSC_DECIDE || bsmax == PETSC_DEFAULT) {
-<a name="line1041">1041: </a>    ctx->L = 256;
-<a name="line1042">1042: </a>  } <font color="#4169E1">else</font> {
-<a name="line1043">1043: </a>    <font color="#4169E1">if</font> (bsmax<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bsmax argument must be > 0"</font>);
-<a name="line1044">1044: </a>    <font color="#4169E1">if</font> (bsmax<ctx->L) ctx->L_max = ctx->L;
-<a name="line1045">1045: </a>    <font color="#4169E1">else</font> ctx->L_max = bsmax;
-<a name="line1046">1046: </a>  }
-<a name="line1047">1047: </a>  ctx->isreal = isreal;
-<a name="line1048">1048: </a>  <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(eps);   <font color="#B22222">/* clean allocated arrays and force new setup */</font>
-<a name="line1049">1049: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1050">1050: </a>}
-
-<a name="line1054">1054: </a><font color="#B22222">/*@</font>
-<a name="line1055">1055: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a> - Sets the values of various size parameters in the CISS solver.</font>
-
-<a name="line1057">1057: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1059">1059: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1060">1060: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
-<a name="line1061">1061: </a><font color="#B22222">.  ip    - number of integration points</font>
-<a name="line1062">1062: </a><font color="#B22222">.  bs    - block size</font>
-<a name="line1063">1063: </a><font color="#B22222">.  ms    - moment size</font>
-<a name="line1064">1064: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
-<a name="line1065">1065: </a><font color="#B22222">.  bsmax - max block size</font>
-<a name="line1066">1066: </a><font color="#B22222">-  isreal - A and B are real</font>
-
-<a name="line1068">1068: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1069">1069: </a><font color="#B22222">+  -eps_ciss_integration_points - Sets the number of integration points</font>
-<a name="line1070">1070: </a><font color="#B22222">.  -eps_ciss_blocksize - Sets the block size</font>
-<a name="line1071">1071: </a><font color="#B22222">.  -eps_ciss_moments - Sets the moment size</font>
-<a name="line1072">1072: </a><font color="#B22222">.  -eps_ciss_partitions - Sets the number of partitions</font>
-<a name="line1073">1073: </a><font color="#B22222">.  -eps_ciss_maxblocksize - Sets the maximum block size</font>
-<a name="line1074">1074: </a><font color="#B22222">-  -eps_ciss_realmats - A and B are real</font>
-
-<a name="line1076">1076: </a><font color="#B22222">   Note:</font>
-<a name="line1077">1077: </a><font color="#B22222">   The default number of partitions is 1. This means the internal KSP object is shared</font>
-<a name="line1078">1078: </a><font color="#B22222">   among all processes of the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> communicator. Otherwise, the communicator is split</font>
-<a name="line1079">1079: </a><font color="#B22222">   into npart communicators, so that npart KSP solves proceed simultaneously.</font>
-
-<a name="line1081">1081: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1083">1083: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>()</font>
-<a name="line1084">1084: </a><font color="#B22222">@*/</font>
-<a name="line1085">1085: </a><strong><font color="#4169E1"><a name="EPSCISSSetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)</font></strong>
-<a name="line1086">1086: </a>{
-
-<a name="line1097">1097: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetSizes_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(eps,ip,bs,ms,npart,bsmax,isreal));
-<a name="line1098">1098: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1099">1099: </a>}
-
-<a name="line1103">1103: </a><strong><font color="#4169E1"><a name="EPSCISSGetSizes_CISS"></a>static PetscErrorCode EPSCISSGetSizes_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)</font></strong>
-<a name="line1104">1104: </a>{
-<a name="line1105">1105: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1108">1108: </a>  <font color="#4169E1">if</font> (ip) *ip = ctx->N;
-<a name="line1109">1109: </a>  <font color="#4169E1">if</font> (bs) *bs = ctx->L;
-<a name="line1110">1110: </a>  <font color="#4169E1">if</font> (ms) *ms = ctx->M;
-<a name="line1111">1111: </a>  <font color="#4169E1">if</font> (npart) *npart = ctx->num_subcomm;
-<a name="line1112">1112: </a>  <font color="#4169E1">if</font> (bsmax) *bsmax = ctx->L_max;
-<a name="line1113">1113: </a>  <font color="#4169E1">if</font> (isreal) *isreal = ctx->isreal;
-<a name="line1114">1114: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1115">1115: </a>}
-
-<a name="line1119">1119: </a><font color="#B22222">/*@</font>
-<a name="line1120">1120: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a> - Gets the values of various size parameters in the CISS solver.</font>
-
-<a name="line1122">1122: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1124">1124: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1125">1125: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line1127">1127: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1128">1128: </a><font color="#B22222">+  ip    - number of integration points</font>
-<a name="line1129">1129: </a><font color="#B22222">.  bs    - block size</font>
-<a name="line1130">1130: </a><font color="#B22222">.  ms    - moment size</font>
-<a name="line1131">1131: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
-<a name="line1132">1132: </a><font color="#B22222">.  bsmax - max block size</font>
-<a name="line1133">1133: </a><font color="#B22222">-  isreal - A and B are real</font>
-
-<a name="line1135">1135: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1137">1137: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>()</font>
-<a name="line1138">1138: </a><font color="#B22222">@*/</font>
-<a name="line1139">1139: </a><strong><font color="#4169E1"><a name="EPSCISSGetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)</font></strong>
-<a name="line1140">1140: </a>{
-
-<a name="line1145">1145: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSGetSizes_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(eps,ip,bs,ms,npart,bsmax,isreal));
-<a name="line1146">1146: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1147">1147: </a>}
-
-<a name="line1151">1151: </a><strong><font color="#4169E1"><a name="EPSCISSSetThreshold_CISS"></a>static PetscErrorCode EPSCISSSetThreshold_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal delta,PetscReal spur)</font></strong>
-<a name="line1152">1152: </a>{
-<a name="line1153">1153: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1156">1156: </a>  <font color="#4169E1">if</font> (delta == PETSC_DEFAULT) {
-<a name="line1157">1157: </a>    ctx->delta = 1e-12;
-<a name="line1158">1158: </a>  } <font color="#4169E1">else</font> {
-<a name="line1159">1159: </a>    <font color="#4169E1">if</font> (delta<=0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The delta argument must be > 0.0"</font>);
-<a name="line1160">1160: </a>    ctx->delta = delta;
-<a name="line1161">1161: </a>  }
-<a name="line1162">1162: </a>  <font color="#4169E1">if</font> (spur == PETSC_DEFAULT) {
-<a name="line1163">1163: </a>    ctx->spurious_threshold = 1e-4;
-<a name="line1164">1164: </a>  } <font color="#4169E1">else</font> {
-<a name="line1165">1165: </a>    <font color="#4169E1">if</font> (spur<=0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The spurious threshold argument must be > 0.0"</font>);
-<a name="line1166">1166: </a>    ctx->spurious_threshold = spur;
-<a name="line1167">1167: </a>  }
-<a name="line1168">1168: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1169">1169: </a>}
-
-<a name="line1173">1173: </a><font color="#B22222">/*@</font>
-<a name="line1174">1174: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a> - Sets the values of various threshold parameters in</font>
-<a name="line1175">1175: </a><font color="#B22222">   the CISS solver.</font>
-
-<a name="line1177">1177: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1179">1179: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1180">1180: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
-<a name="line1181">1181: </a><font color="#B22222">.  delta - threshold for numerical rank</font>
-<a name="line1182">1182: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
-
-<a name="line1184">1184: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1185">1185: </a><font color="#B22222">+  -eps_ciss_delta - Sets the delta</font>
-<a name="line1186">1186: </a><font color="#B22222">-  -eps_ciss_spurious_threshold - Sets the spurious threshold</font>
-
-<a name="line1188">1188: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1190">1190: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>()</font>
-<a name="line1191">1191: </a><font color="#B22222">@*/</font>
-<a name="line1192">1192: </a><strong><font color="#4169E1"><a name="EPSCISSSetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal delta,PetscReal spur)</font></strong>
-<a name="line1193">1193: </a>{
-
-<a name="line1200">1200: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetThreshold_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscReal),(eps,delta,spur));
-<a name="line1201">1201: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1202">1202: </a>}
-
-<a name="line1206">1206: </a><strong><font color="#4169E1"><a name="EPSCISSGetThreshold_CISS"></a>static PetscErrorCode EPSCISSGetThreshold_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *delta,PetscReal *spur)</font></strong>
-<a name="line1207">1207: </a>{
-<a name="line1208">1208: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1211">1211: </a>  <font color="#4169E1">if</font> (delta) *delta = ctx->delta;
-<a name="line1212">1212: </a>  <font color="#4169E1">if</font> (spur)  *spur = ctx->spurious_threshold;
-<a name="line1213">1213: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1214">1214: </a>}
-
-<a name="line1218">1218: </a><font color="#B22222">/*@</font>
-<a name="line1219">1219: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a> - Gets the values of various threshold parameters</font>
-<a name="line1220">1220: </a><font color="#B22222">   in the CISS solver.</font>
-
-<a name="line1222">1222: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1224">1224: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1225">1225: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line1227">1227: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1228">1228: </a><font color="#B22222">+  delta - threshold for numerical rank</font>
-<a name="line1229">1229: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
-
-<a name="line1231">1231: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1233">1233: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>()</font>
-<a name="line1234">1234: </a><font color="#B22222">@*/</font>
-<a name="line1235">1235: </a><strong><font color="#4169E1"><a name="EPSCISSGetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *delta,PetscReal *spur)</font></strong>
-<a name="line1236">1236: </a>{
-
-<a name="line1241">1241: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSGetThreshold_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*),(eps,delta,spur));
-<a name="line1242">1242: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1243">1243: </a>}
-
-<a name="line1247">1247: </a><strong><font color="#4169E1"><a name="EPSCISSSetRefinement_CISS"></a>static PetscErrorCode EPSCISSSetRefinement_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt inner,PetscInt outer,PetscInt blsize)</font></strong>
-<a name="line1248">1248: </a>{
-<a name="line1249">1249: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1252">1252: </a>  <font color="#4169E1">if</font> (inner == PETSC_DEFAULT) {
-<a name="line1253">1253: </a>    ctx->refine_inner = 0;
-<a name="line1254">1254: </a>  } <font color="#4169E1">else</font> {
-<a name="line1255">1255: </a>    <font color="#4169E1">if</font> (inner<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine inner argument must be >= 0"</font>);
-<a name="line1256">1256: </a>    ctx->refine_inner = inner;
-<a name="line1257">1257: </a>  }
-<a name="line1258">1258: </a>  <font color="#4169E1">if</font> (outer == PETSC_DEFAULT) {
-<a name="line1259">1259: </a>    ctx->refine_outer = 0;
-<a name="line1260">1260: </a>  } <font color="#4169E1">else</font> {
-<a name="line1261">1261: </a>    <font color="#4169E1">if</font> (outer<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine outer argument must be >= 0"</font>);
-<a name="line1262">1262: </a>    ctx->refine_outer = outer;
-<a name="line1263">1263: </a>  }
-<a name="line1264">1264: </a>  <font color="#4169E1">if</font> (blsize == PETSC_DEFAULT) {
-<a name="line1265">1265: </a>    ctx->refine_blocksize = 0;
-<a name="line1266">1266: </a>  } <font color="#4169E1">else</font> {
-<a name="line1267">1267: </a>    <font color="#4169E1">if</font> (blsize<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine blocksize argument must be >= 0"</font>);
-<a name="line1268">1268: </a>    ctx->refine_blocksize = blsize;
-<a name="line1269">1269: </a>  }
-<a name="line1270">1270: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1271">1271: </a>}
-
-<a name="line1275">1275: </a><font color="#B22222">/*@</font>
-<a name="line1276">1276: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a> - Sets the values of various refinement parameters</font>
-<a name="line1277">1277: </a><font color="#B22222">   in the CISS solver.</font>
-
-<a name="line1279">1279: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1281">1281: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1282">1282: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
-<a name="line1283">1283: </a><font color="#B22222">.  inner  - number of iterative refinement iterations (inner loop)</font>
-<a name="line1284">1284: </a><font color="#B22222">.  outer  - number of iterative refinement iterations (outer loop)</font>
-<a name="line1285">1285: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
-
-<a name="line1287">1287: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1288">1288: </a><font color="#B22222">+  -eps_ciss_refine_inner - Sets number of inner iterations</font>
-<a name="line1289">1289: </a><font color="#B22222">.  -eps_ciss_refine_outer - Sets number of outer iterations</font>
-<a name="line1290">1290: </a><font color="#B22222">-  -eps_ciss_refine_blocksize - Sets number of blocksize iterations</font>
+<a name="line809">809: </a>  <font color="#4169E1">return</font>(0);
+<a name="line810">810: </a>}
+
+<a name="line814">814: </a><strong><font color="#4169E1"><a name="EPSSetUp_CISS"></a>PetscErrorCode EPSSetUp_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line815">815: </a>{
+<a name="line817">817: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line818">818: </a>  PetscInt       i;
+<a name="line819">819: </a>  PetscBool      issinvert,istrivial,isring,isellipse,isinterval,flg;
+<a name="line820">820: </a>  PetscScalar    center;
+<a name="line821">821: </a>  PetscReal      c,d;
+<a name="line822">822: </a>  Mat            A;
+
+<a name="line825">825: </a>  <font color="#4169E1">if</font> (!eps->ncv) eps->ncv = ctx->L_max*ctx->M;
+<a name="line826">826: </a>  <font color="#4169E1">else</font> {
+<a name="line827">827: </a>    EPSSetDimensions_Default(eps,eps->nev,&eps->ncv,&eps->mpd);
+<a name="line828">828: </a>    ctx->L_max = eps->ncv/ctx->M;
+<a name="line829">829: </a>    <font color="#4169E1">if</font> (ctx->L_max == 0) {
+<a name="line830">830: </a>      ctx->L_max = 1;
+<a name="line831">831: </a>      eps->ncv = ctx->L_max*ctx->M;
+<a name="line832">832: </a>    }
+<a name="line833">833: </a>    <font color="#4169E1">if</font> (ctx->L > ctx->L_max) ctx->L = ctx->L_max;
+<a name="line834">834: </a>  }
+<a name="line835">835: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = 1;
+<a name="line836">836: </a>  <font color="#4169E1">if</font> (!eps->mpd) eps->mpd = eps->ncv;
+<a name="line837">837: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_ALL;
+<a name="line838">838: </a>  <font color="#4169E1">if</font> (!eps->extraction) { <a href="../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_RITZ); }
+<a name="line839">839: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->extraction!=EPS_RITZ) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
+<a name="line840">840: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
+<a name="line841">841: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support user-defined stopping test"</font>);
+
+<a name="line843">843: </a>  <font color="#B22222">/* check region */</font>
+<a name="line844">844: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line845">845: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"CISS requires a nontrivial region, e.g. -rg_type ellipse ..."</font>);
+<a name="line846">846: </a>  <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>(eps->rg,&flg);
+<a name="line847">847: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"A region with complement flag set is not allowed"</font>);
+<a name="line848">848: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
+<a name="line849">849: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGRING,&isring);
+<a name="line850">850: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGINTERVAL,&isinterval);
+<a name="line851">851: </a>  <font color="#4169E1">if</font> (!isellipse && !isring && !isinterval) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Currently only implemented for interval, elliptic or ring regions"</font>);
+<a name="line852">852: </a>  <font color="#4169E1">if</font> (isring) {
+<a name="line853">853: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line854">854: </a>    SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Ring region only supported for complex scalars"</font>);
+<a name="line855">855: </a><font color="#A020F0">#endif</font>
+<a name="line856">856: </a>    ctx->useconj = PETSC_FALSE;
+<a name="line857">857: </a>  }
+<a name="line858">858: </a>  <font color="#4169E1">if</font> (isellipse) {
+<a name="line859">859: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(eps->rg,&center,NULL,NULL);
+<a name="line860">860: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line861">861: </a>    <font color="#4169E1">if</font> (ctx->isreal && PetscImaginaryPart(center) == 0.0) ctx->useconj = PETSC_TRUE;
+<a name="line862">862: </a>    <font color="#4169E1">else</font> ctx->useconj = PETSC_FALSE;
+<a name="line863">863: </a><font color="#A020F0">#else</font>
+<a name="line864">864: </a>    ctx->useconj = PETSC_FALSE;
+<a name="line865">865: </a><font color="#A020F0">#endif</font>
+<a name="line866">866: </a>  }
+<a name="line867">867: </a>  <font color="#4169E1">if</font> (isinterval) {
+<a name="line868">868: </a>    <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(eps->rg,NULL,NULL,&c,&d);
+<a name="line869">869: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line870">870: </a>    <font color="#4169E1">if</font> (ctx->isreal && c==d) ctx->useconj = PETSC_TRUE;
+<a name="line871">871: </a>    <font color="#4169E1">else</font> ctx->useconj = PETSC_FALSE;
+<a name="line872">872: </a><font color="#A020F0">#else</font>
+<a name="line873">873: </a>    <font color="#4169E1">if</font> (c!=d || c!=0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"In real scalars, endpoints of the imaginary axis must be both zero"</font>);
+<a name="line874">874: </a>    ctx->useconj = PETSC_FALSE;
+<a name="line875">875: </a><font color="#A020F0">#endif</font>
+<a name="line876">876: </a>    <font color="#4169E1">if</font> (!ctx->quad && c==d) ctx->quad = EPS_CISS_QUADRULE_CHEBYSHEV;
+<a name="line877">877: </a>  }
+<a name="line878">878: </a>  <font color="#4169E1">if</font> (!ctx->quad) ctx->quad = EPS_CISS_QUADRULE_TRAPEZOIDAL;
+<a name="line879">879: </a>  <font color="#B22222">/* create split comm */</font>
+<a name="line880">880: </a>  SetSolverComm(eps);
+
+<a name="line882">882: </a>  <a href="../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+<a name="line883">883: </a>  PetscMalloc4(ctx->N,&ctx->weight,ctx->N+1,&ctx->omega,ctx->N,&ctx->pp,ctx->L_max*ctx->M,&ctx->sigma);
+<a name="line884">884: </a>  PetscLogObjectMemory((PetscObject)eps,3*ctx->N*<font color="#4169E1">sizeof</font>(PetscScalar)+ctx->L_max*ctx->N*<font color="#4169E1">sizeof</font>(PetscReal));
+
+<a name="line886">886: </a>  <font color="#B22222">/* allocate basis vectors */</font>
+<a name="line887">887: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->L_max*ctx->M,&ctx->S);
+<a name="line888">888: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->S);
+<a name="line889">889: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->L_max,&ctx->V);
+<a name="line890">890: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->V);
+
+<a name="line892">892: </a>  <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line893">893: </a>  PetscObjectTypeCompare((PetscObject)A,MATSHELL,&flg);
+<a name="line894">894: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Matrix type shell is not supported in this solver"</font>);
+
+<a name="line896">896: </a>  <font color="#4169E1">if</font> (!ctx->usest_set) ctx->usest = (ctx->num_subcomm>1)? PETSC_FALSE: PETSC_TRUE;
+<a name="line897">897: </a>  <font color="#4169E1">if</font> (ctx->usest && ctx->num_subcomm>1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The usest flag is not supported when partitions > 1"</font>);
+
+<a name="line899">899: </a>  CISSRedundantMat(eps);
+<a name="line900">900: </a>  <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line901">901: </a>    CISSScatterVec(eps);
+<a name="line902">902: </a>    <a href="../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)ctx->xsub),&ctx->pV);
+<a name="line903">903: </a>    <a href="../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(ctx->pV,ctx->xsub,eps->n);
+<a name="line904">904: </a>    <a href="../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(ctx->pV);
+<a name="line905">905: </a>    <a href="../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(ctx->pV,ctx->L_max,PETSC_FALSE);
+<a name="line906">906: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->pV);
+<a name="line907">907: </a>  }
+
+<a name="line909">909: </a>  <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line910">910: </a>    PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&issinvert);
+<a name="line911">911: </a>    <font color="#4169E1">if</font> (!issinvert) { <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSINVERT); }
+<a name="line912">912: </a>  } <font color="#4169E1">else</font> {
+<a name="line913">913: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSHIFT);  <font color="#B22222">/* we are not going to use <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>, so avoid problems in case the user provided one */</font>
+<a name="line914">914: </a>    PetscMalloc2(ctx->num_solve_point,&ctx->ksp,ctx->num_solve_point,&ctx->kspMat);
+<a name="line915">915: </a>    PetscLogObjectMemory((PetscObject)eps,ctx->num_solve_point*<font color="#4169E1">sizeof</font>(KSP)+ctx->num_solve_point*<font color="#4169E1">sizeof</font>(Mat));
+<a name="line916">916: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line917">917: </a>      KSPCreate(PetscSubcommChild(ctx->subcomm),&ctx->ksp[i]);
+<a name="line918">918: </a>      PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)eps,1);
+<a name="line919">919: </a>      PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->ksp[i]);
+<a name="line920">920: </a>      KSPSetOptionsPrefix(ctx->ksp[i],((PetscObject)eps)->prefix);
+<a name="line921">921: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],<font color="#666666">"eps_ciss_"</font>);
+<a name="line922">922: </a>      KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);
+<a name="line923">923: </a>    }
+<a name="line924">924: </a>  }
+
+<a name="line926">926: </a>  <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line927">927: </a>    <a href="../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)ctx->xsub),&ctx->Y);
+<a name="line928">928: </a>    <a href="../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(ctx->Y,ctx->xsub,eps->n);
+<a name="line929">929: </a>    <a href="../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(ctx->Y);
+<a name="line930">930: </a>    <a href="../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(ctx->Y,ctx->num_solve_point*ctx->L_max,PETSC_FALSE);
+<a name="line931">931: </a>  } <font color="#4169E1">else</font> {
+<a name="line932">932: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,ctx->num_solve_point*ctx->L_max,&ctx->Y);
+<a name="line933">933: </a>  }
+<a name="line934">934: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ctx->Y);
+
+<a name="line936">936: </a>  <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line937">937: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP);
+<a name="line938">938: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->isgeneralized) {
+<a name="line939">939: </a>    <font color="#4169E1">if</font> (eps->ishermitian && eps->ispositive) {
+<a name="line940">940: </a>      <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
+<a name="line941">941: </a>    } <font color="#4169E1">else</font> {
+<a name="line942">942: </a>      <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP);
+<a name="line943">943: </a>    }
+<a name="line944">944: </a>  } <font color="#4169E1">else</font> {
+<a name="line945">945: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line946">946: </a>      <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
+<a name="line947">947: </a>    } <font color="#4169E1">else</font> {
+<a name="line948">948: </a>      <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP);
+<a name="line949">949: </a>    }
+<a name="line950">950: </a>  }
+<a name="line951">951: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv);
+<a name="line952">952: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,2);
+
+<a name="line954">954: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line955">955: </a>  <font color="#4169E1">if</font> (!eps->ishermitian) { PetscInfo(eps,<font color="#666666">"Warning: complex eigenvalues are not calculated exactly without --with-scalar-type=complex in PETSc\n"</font>); }
+<a name="line956">956: </a><font color="#A020F0">#endif</font>
+<a name="line957">957: </a>  <font color="#4169E1">return</font>(0);
+<a name="line958">958: </a>}
+
+<a name="line962">962: </a><strong><font color="#4169E1"><a name="EPSSolve_CISS"></a>PetscErrorCode EPSSolve_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line963">963: </a>{
+<a name="line965">965: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line966">966: </a>  Mat            A,B,X,M,pA,pB;
+<a name="line967">967: </a>  PetscInt       i,j,ld,nmat,L_add=0,nv=0,L_base=ctx->L,inner,nlocal,*inside;
+<a name="line968">968: </a>  PetscScalar    *Mu,*H0,*H1=NULL,*rr,*temp;
+<a name="line969">969: </a>  PetscReal      error,max_error;
+<a name="line970">970: </a>  PetscBool      *fl1;
+<a name="line971">971: </a>  Vec            si,w[3];
+<a name="line972">972: </a>  SlepcSC        sc;
+<a name="line973">973: </a>  PetscRandom    rand;
+<a name="line974">974: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line975">975: </a>  PetscBool      isellipse;
+<a name="line976">976: </a><font color="#A020F0">#endif</font>
+
+<a name="line979">979: </a>  w[0] = eps->work[0];
+<a name="line980">980: </a>  w[1] = NULL;
+<a name="line981">981: </a>  w[2] = eps->work[1];
+<a name="line982">982: </a>  <font color="#B22222">/* override SC settings */</font>
+<a name="line983">983: </a>  <a href="../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(eps->ds,&sc);
+<a name="line984">984: </a>  sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line985">985: </a>  sc->comparisonctx = NULL;
+<a name="line986">986: </a>  sc->map           = NULL;
+<a name="line987">987: </a>  sc->mapobj        = NULL;
+<a name="line988">988: </a>  VecGetLocalSize(w[0],&nlocal);
+<a name="line989">989: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line990">990: </a>  <a href="../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line991">991: </a>  <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line992">992: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
+<a name="line993">993: </a>  <font color="#4169E1">else</font> B = NULL;
+<a name="line994">994: </a>  SetPathParameter(eps);
+<a name="line995">995: </a>  CISSVecSetRandom(ctx->V,0,ctx->L);
+<a name="line996">996: </a>  <a href="../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(ctx->V,&rand);
+
+<a name="line998">998: </a>  <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line999">999: </a>    VecScatterVecs(eps,ctx->V,ctx->L);
+<a name="line1000">1000: </a>    SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_TRUE);
+<a name="line1001">1001: </a>  } <font color="#4169E1">else</font> {
+<a name="line1002">1002: </a>    SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_TRUE);
+<a name="line1003">1003: </a>  }
+<a name="line1004">1004: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line1005">1005: </a>  PetscObjectTypeCompare((PetscObject)eps->rg,RGELLIPSE,&isellipse);
+<a name="line1006">1006: </a>  <font color="#4169E1">if</font> (isellipse) {
+<a name="line1007">1007: </a>    EstimateNumberEigs(eps,&L_add);
+<a name="line1008">1008: </a>  } <font color="#4169E1">else</font> {
+<a name="line1009">1009: </a>    L_add = 0;
+<a name="line1010">1010: </a>  }
+<a name="line1011">1011: </a><font color="#A020F0">#else</font>
+<a name="line1012">1012: </a>  L_add = 0;
+<a name="line1013">1013: </a><font color="#A020F0">#endif</font>
+<a name="line1014">1014: </a>  <font color="#4169E1">if</font> (L_add>0) {
+<a name="line1015">1015: </a>    PetscInfo2(eps,<font color="#666666">"Changing L %D -> %D by Estimate #Eig\n"</font>,ctx->L,ctx->L+L_add);
+<a name="line1016">1016: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);
+<a name="line1017">1017: </a>    <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line1018">1018: </a>      VecScatterVecs(eps,ctx->V,ctx->L+L_add);
+<a name="line1019">1019: </a>      SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,ctx->L,ctx->L+L_add,PETSC_FALSE);
+<a name="line1020">1020: </a>    } <font color="#4169E1">else</font> {
+<a name="line1021">1021: </a>      SolveLinearSystem(eps,A,B,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
+<a name="line1022">1022: </a>    }
+<a name="line1023">1023: </a>    ctx->L += L_add;
+<a name="line1024">1024: </a>  }
+<a name="line1025">1025: </a>  PetscMalloc2(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0);
+<a name="line1026">1026: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->refine_blocksize;i++) {
+<a name="line1027">1027: </a>    CalcMu(eps,Mu);
+<a name="line1028">1028: </a>    BlockHankel(eps,Mu,0,H0);
+<a name="line1029">1029: </a>    SVD_H0(eps,H0,&nv);
+<a name="line1030">1030: </a>    <font color="#4169E1">if</font> (ctx->sigma[0]<=ctx->delta || nv < ctx->L*ctx->M || ctx->L == ctx->L_max) <font color="#4169E1">break</font>;
+<a name="line1031">1031: </a>    L_add = L_base;
+<a name="line1032">1032: </a>    <font color="#4169E1">if</font> (ctx->L+L_add>ctx->L_max) L_add = ctx->L_max-ctx->L;
+<a name="line1033">1033: </a>    PetscInfo2(eps,<font color="#666666">"Changing L %D -> %D by <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>(H0)\n"</font>,ctx->L,ctx->L+L_add);
+<a name="line1034">1034: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);
+<a name="line1035">1035: </a>    <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line1036">1036: </a>      VecScatterVecs(eps,ctx->V,ctx->L+L_add);
+<a name="line1037">1037: </a>      SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,ctx->L,ctx->L+L_add,PETSC_FALSE);
+<a name="line1038">1038: </a>    } <font color="#4169E1">else</font> {
+<a name="line1039">1039: </a>      SolveLinearSystem(eps,A,B,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
+<a name="line1040">1040: </a>    }
+<a name="line1041">1041: </a>    ctx->L += L_add;
+<a name="line1042">1042: </a>  }
+<a name="line1043">1043: </a>  <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line1044">1044: </a>    PetscMalloc1(ctx->L*ctx->M*ctx->L*ctx->M,&H1);
+<a name="line1045">1045: </a>  }
+
+<a name="line1047">1047: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line1048">1048: </a>    eps->its++;
+<a name="line1049">1049: </a>    <font color="#4169E1">for</font> (inner=0;inner<=ctx->refine_inner;inner++) {
+<a name="line1050">1050: </a>      <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line1051">1051: </a>        CalcMu(eps,Mu);
+<a name="line1052">1052: </a>        BlockHankel(eps,Mu,0,H0);
+<a name="line1053">1053: </a>        SVD_H0(eps,H0,&nv);
+<a name="line1054">1054: </a>        <font color="#4169E1">break</font>;
+<a name="line1055">1055: </a>      } <font color="#4169E1">else</font> {
+<a name="line1056">1056: </a>        ConstructS(eps);
+<a name="line1057">1057: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
+<a name="line1058">1058: </a>        <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
+<a name="line1059">1059: </a>        SVD_S(ctx->S,ctx->L*ctx->M,ctx->delta,ctx->sigma,&nv);
+<a name="line1060">1060: </a>        <font color="#4169E1">if</font> (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
+<a name="line1061">1061: </a>          <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line1062">1062: </a>            VecScatterVecs(eps,ctx->V,ctx->L);
+<a name="line1063">1063: </a>            SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);
+<a name="line1064">1064: </a>          } <font color="#4169E1">else</font> {
+<a name="line1065">1065: </a>            SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);
+<a name="line1066">1066: </a>          }
+<a name="line1067">1067: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line1068">1068: </a>      }
+<a name="line1069">1069: </a>    }
+<a name="line1070">1070: </a>    eps->nconv = 0;
+<a name="line1071">1071: </a>    <font color="#4169E1">if</font> (nv == 0) eps->reason = EPS_CONVERGED_TOL;
+<a name="line1072">1072: </a>    <font color="#4169E1">else</font> {
+<a name="line1073">1073: </a>      <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,0);
+<a name="line1074">1074: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+
+<a name="line1076">1076: </a>      <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line1077">1077: </a>        BlockHankel(eps,Mu,0,H0);
+<a name="line1078">1078: </a>        BlockHankel(eps,Mu,1,H1);
+<a name="line1079">1079: </a>        <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&temp);
+<a name="line1080">1080: </a>        <font color="#4169E1">for</font> (j=0;j<nv;j++) {
+<a name="line1081">1081: </a>          <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line1082">1082: </a>            temp[i+j*ld] = H1[i+j*ctx->L*ctx->M];
+<a name="line1083">1083: </a>          }
+<a name="line1084">1084: </a>        }
+<a name="line1085">1085: </a>        <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&temp);
+<a name="line1086">1086: </a>        <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_B,&temp);
+<a name="line1087">1087: </a>        <font color="#4169E1">for</font> (j=0;j<nv;j++) {
+<a name="line1088">1088: </a>          <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line1089">1089: </a>            temp[i+j*ld] = H0[i+j*ctx->L*ctx->M];
+<a name="line1090">1090: </a>          }
+<a name="line1091">1091: </a>        }
+<a name="line1092">1092: </a>        <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_B,&temp);
+<a name="line1093">1093: </a>      } <font color="#4169E1">else</font> {
+<a name="line1094">1094: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
+<a name="line1095">1095: </a>        <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_A,&pA);
+<a name="line1096">1096: </a>        MatZeroEntries(pA);
+<a name="line1097">1097: </a>        <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(ctx->S,A,ctx->S,pA);
+<a name="line1098">1098: </a>        <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_A,&pA);
+<a name="line1099">1099: </a>        <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_B,&pB);
+<a name="line1100">1100: </a>        MatZeroEntries(pB);
+<a name="line1101">1101: </a>        <font color="#4169E1">if</font> (B) { <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(ctx->S,B,ctx->S,pB); }
+<a name="line1102">1102: </a>        <font color="#4169E1">else</font> { MatShift(pB,1); }
+<a name="line1103">1103: </a>        <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_B,&pB);
+<a name="line1104">1104: </a>      }
+
+<a name="line1106">1106: </a>      <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
+<a name="line1107">1107: </a>      <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+
+<a name="line1109">1109: </a>      PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);
+<a name="line1110">1110: </a>      rescale_eig(eps,nv);
+<a name="line1111">1111: </a>      isGhost(eps,ld,nv,fl1);
+<a name="line1112">1112: </a>      <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(eps->rg,nv,eps->eigr,eps->eigi,inside);
+<a name="line1113">1113: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line1114">1114: </a>        <font color="#4169E1">if</font> (fl1[i] && inside[i]>=0) {
+<a name="line1115">1115: </a>          rr[i] = 1.0;
+<a name="line1116">1116: </a>          eps->nconv++;
+<a name="line1117">1117: </a>        } <font color="#4169E1">else</font> rr[i] = 0.0;
+<a name="line1118">1118: </a>      }
+<a name="line1119">1119: </a>      <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,rr,NULL,&eps->nconv);
+<a name="line1120">1120: </a>      rescale_eig(eps,nv);
+<a name="line1121">1121: </a>      PetscFree3(fl1,inside,rr);
+<a name="line1122">1122: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,nv);
+<a name="line1123">1123: </a>      <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line1124">1124: </a>        ConstructS(eps);
+<a name="line1125">1125: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
+<a name="line1126">1126: </a>        <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
+<a name="line1127">1127: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
+<a name="line1128">1128: </a>      }
+<a name="line1129">1129: </a>      <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,eps->V);
+
+<a name="line1131">1131: </a>      <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+<a name="line1132">1132: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&X);
+<a name="line1133">1133: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,X,0,eps->nconv);
+<a name="line1134">1134: </a>      <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line1135">1135: </a>        <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,X,0,eps->nconv);
+<a name="line1136">1136: </a>      }
+<a name="line1137">1137: </a>      MatDestroy(&X);
+<a name="line1138">1138: </a>      max_error = 0.0;
+<a name="line1139">1139: </a>      <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line1140">1140: </a>        <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->S,i,&si);
+<a name="line1141">1141: </a>        EPSComputeResidualNorm_Private(eps,eps->eigr[i],eps->eigi[i],si,NULL,w,&error);
+<a name="line1142">1142: </a>        (*eps->converged)(eps,eps->eigr[i],eps->eigi[i],error,&error,eps->convergedctx);
+<a name="line1143">1143: </a>        <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->S,i,&si);
+<a name="line1144">1144: </a>        max_error = PetscMax(max_error,error);
+<a name="line1145">1145: </a>      }
+
+<a name="line1147">1147: </a>      <font color="#4169E1">if</font> (max_error <= eps->tol) eps->reason = EPS_CONVERGED_TOL;
+<a name="line1148">1148: </a>      <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
+<a name="line1149">1149: </a>      <font color="#4169E1">else</font> {
+<a name="line1150">1150: </a>        <font color="#4169E1">if</font> (eps->nconv > ctx->L) {
+<a name="line1151">1151: </a>          MatCreateSeqDense(PETSC_COMM_SELF,eps->nconv,ctx->L,NULL,&M);
+<a name="line1152">1152: </a>          MatDenseGetArray(M,&temp);
+<a name="line1153">1153: </a>          <font color="#4169E1">for</font> (i=0;i<ctx->L*eps->nconv;i++) {
+<a name="line1154">1154: </a>            PetscRandomGetValue(rand,&temp[i]);
+<a name="line1155">1155: </a>            temp[i] = PetscRealPart(temp[i]);
+<a name="line1156">1156: </a>          }
+<a name="line1157">1157: </a>          MatDenseRestoreArray(M,&temp);
+<a name="line1158">1158: </a>          <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,eps->nconv);
+<a name="line1159">1159: </a>          <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,M,0,ctx->L);
+<a name="line1160">1160: </a>          MatDestroy(&M);
+<a name="line1161">1161: </a>          <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
+<a name="line1162">1162: </a>          <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
+<a name="line1163">1163: </a>        }
+<a name="line1164">1164: </a>        <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line1165">1165: </a>          VecScatterVecs(eps,ctx->V,ctx->L);
+<a name="line1166">1166: </a>          SolveLinearSystem(eps,ctx->pA,ctx->pB,ctx->pV,0,ctx->L,PETSC_FALSE);
+<a name="line1167">1167: </a>        } <font color="#4169E1">else</font> {
+<a name="line1168">1168: </a>          SolveLinearSystem(eps,A,B,ctx->V,0,ctx->L,PETSC_FALSE);
+<a name="line1169">1169: </a>        }
+<a name="line1170">1170: </a>      }
+<a name="line1171">1171: </a>    }
+<a name="line1172">1172: </a>  }
+<a name="line1173">1173: </a>  <font color="#4169E1">if</font> (ctx->extraction == EPS_CISS_EXTRACTION_HANKEL) {
+<a name="line1174">1174: </a>    PetscFree(H1);
+<a name="line1175">1175: </a>  }
+<a name="line1176">1176: </a>  PetscFree2(Mu,H0);
+<a name="line1177">1177: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1178">1178: </a>}
+
+<a name="line1182">1182: </a><strong><font color="#4169E1"><a name="EPSCISSSetSizes_CISS"></a>static PetscErrorCode EPSCISSSetSizes_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)</font></strong>
+<a name="line1183">1183: </a>{
+<a name="line1185">1185: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1188">1188: </a>  <font color="#4169E1">if</font> (ip == PETSC_DECIDE || ip == PETSC_DEFAULT) {
+<a name="line1189">1189: </a>    <font color="#4169E1">if</font> (ctx->N!=32) { ctx->N =32; ctx->M = ctx->N/4; }
+<a name="line1190">1190: </a>  } <font color="#4169E1">else</font> {
+<a name="line1191">1191: </a>    <font color="#4169E1">if</font> (ip<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be > 0"</font>);
+<a name="line1192">1192: </a>    <font color="#4169E1">if</font> (ip%2) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be an even number"</font>);
+<a name="line1193">1193: </a>    <font color="#4169E1">if</font> (ctx->N!=ip) { ctx->N = ip; ctx->M = ctx->N/4; }
+<a name="line1194">1194: </a>  }
+<a name="line1195">1195: </a>  <font color="#4169E1">if</font> (bs == PETSC_DECIDE || bs == PETSC_DEFAULT) {
+<a name="line1196">1196: </a>    ctx->L = 16;
+<a name="line1197">1197: </a>  } <font color="#4169E1">else</font> {
+<a name="line1198">1198: </a>    <font color="#4169E1">if</font> (bs<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be > 0"</font>);
+<a name="line1199">1199: </a>    <font color="#4169E1">if</font> (bs>ctx->L_max) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be less than or equal to the maximum number of block size"</font>);
+<a name="line1200">1200: </a>    ctx->L = bs;
+<a name="line1201">1201: </a>  }
+<a name="line1202">1202: </a>  <font color="#4169E1">if</font> (ms == PETSC_DECIDE || ms == PETSC_DEFAULT) {
+<a name="line1203">1203: </a>    ctx->M = ctx->N/4;
+<a name="line1204">1204: </a>  } <font color="#4169E1">else</font> {
+<a name="line1205">1205: </a>    <font color="#4169E1">if</font> (ms<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be > 0"</font>);
+<a name="line1206">1206: </a>    <font color="#4169E1">if</font> (ms>ctx->N) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be less than or equal to the number of integration points"</font>);
+<a name="line1207">1207: </a>    ctx->M = ms;
+<a name="line1208">1208: </a>  }
+<a name="line1209">1209: </a>  <font color="#4169E1">if</font> (npart == PETSC_DECIDE || npart == PETSC_DEFAULT) {
+<a name="line1210">1210: </a>    ctx->num_subcomm = 1;
+<a name="line1211">1211: </a>  } <font color="#4169E1">else</font> {
+<a name="line1212">1212: </a>    <font color="#4169E1">if</font> (npart<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The npart argument must be > 0"</font>);
+<a name="line1213">1213: </a>    ctx->num_subcomm = npart;
+<a name="line1214">1214: </a>  }
+<a name="line1215">1215: </a>  <font color="#4169E1">if</font> (bsmax == PETSC_DECIDE || bsmax == PETSC_DEFAULT) {
+<a name="line1216">1216: </a>    ctx->L = 256;
+<a name="line1217">1217: </a>  } <font color="#4169E1">else</font> {
+<a name="line1218">1218: </a>    <font color="#4169E1">if</font> (bsmax<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bsmax argument must be > 0"</font>);
+<a name="line1219">1219: </a>    <font color="#4169E1">if</font> (bsmax<ctx->L) ctx->L_max = ctx->L;
+<a name="line1220">1220: </a>    <font color="#4169E1">else</font> ctx->L_max = bsmax;
+<a name="line1221">1221: </a>  }
+<a name="line1222">1222: </a>  ctx->isreal = realmats;
+<a name="line1223">1223: </a>  <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(eps);   <font color="#B22222">/* clean allocated arrays and force new setup */</font>
+<a name="line1224">1224: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1225">1225: </a>}
+
+<a name="line1229">1229: </a><font color="#B22222">/*@</font>
+<a name="line1230">1230: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a> - Sets the values of various size parameters in the CISS solver.</font>
+
+<a name="line1232">1232: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1234">1234: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1235">1235: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
+<a name="line1236">1236: </a><font color="#B22222">.  ip    - number of integration points</font>
+<a name="line1237">1237: </a><font color="#B22222">.  bs    - block size</font>
+<a name="line1238">1238: </a><font color="#B22222">.  ms    - moment size</font>
+<a name="line1239">1239: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
+<a name="line1240">1240: </a><font color="#B22222">.  bsmax - max block size</font>
+<a name="line1241">1241: </a><font color="#B22222">-  realmats - A and B are real</font>
+
+<a name="line1243">1243: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1244">1244: </a><font color="#B22222">+  -eps_ciss_integration_points - Sets the number of integration points</font>
+<a name="line1245">1245: </a><font color="#B22222">.  -eps_ciss_blocksize - Sets the block size</font>
+<a name="line1246">1246: </a><font color="#B22222">.  -eps_ciss_moments - Sets the moment size</font>
+<a name="line1247">1247: </a><font color="#B22222">.  -eps_ciss_partitions - Sets the number of partitions</font>
+<a name="line1248">1248: </a><font color="#B22222">.  -eps_ciss_maxblocksize - Sets the maximum block size</font>
+<a name="line1249">1249: </a><font color="#B22222">-  -eps_ciss_realmats - A and B are real</font>
+
+<a name="line1251">1251: </a><font color="#B22222">   Note:</font>
+<a name="line1252">1252: </a><font color="#B22222">   The default number of partitions is 1. This means the internal KSP object is shared</font>
+<a name="line1253">1253: </a><font color="#B22222">   among all processes of the <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> communicator. Otherwise, the communicator is split</font>
+<a name="line1254">1254: </a><font color="#B22222">   into npart communicators, so that npart KSP solves proceed simultaneously.</font>
+
+<a name="line1256">1256: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1258">1258: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>()</font>
+<a name="line1259">1259: </a><font color="#B22222">@*/</font>
+<a name="line1260">1260: </a><strong><font color="#4169E1"><a name="EPSCISSSetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)</font></strong>
+<a name="line1261">1261: </a>{
+
+<a name="line1272">1272: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetSizes_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(eps,ip,bs,ms,npart,bsmax,realmats));
+<a name="line1273">1273: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1274">1274: </a>}
+
+<a name="line1278">1278: </a><strong><font color="#4169E1"><a name="EPSCISSGetSizes_CISS"></a>static PetscErrorCode EPSCISSGetSizes_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)</font></strong>
+<a name="line1279">1279: </a>{
+<a name="line1280">1280: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1283">1283: </a>  <font color="#4169E1">if</font> (ip) *ip = ctx->N;
+<a name="line1284">1284: </a>  <font color="#4169E1">if</font> (bs) *bs = ctx->L;
+<a name="line1285">1285: </a>  <font color="#4169E1">if</font> (ms) *ms = ctx->M;
+<a name="line1286">1286: </a>  <font color="#4169E1">if</font> (npart) *npart = ctx->num_subcomm;
+<a name="line1287">1287: </a>  <font color="#4169E1">if</font> (bsmax) *bsmax = ctx->L_max;
+<a name="line1288">1288: </a>  <font color="#4169E1">if</font> (realmats) *realmats = ctx->isreal;
+<a name="line1289">1289: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1290">1290: </a>}
+
+<a name="line1294">1294: </a><font color="#B22222">/*@</font>
+<a name="line1295">1295: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a> - Gets the values of various size parameters in the CISS solver.</font>
+
+<a name="line1297">1297: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1299">1299: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1300">1300: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1302">1302: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1303">1303: </a><font color="#B22222">+  ip    - number of integration points</font>
+<a name="line1304">1304: </a><font color="#B22222">.  bs    - block size</font>
+<a name="line1305">1305: </a><font color="#B22222">.  ms    - moment size</font>
+<a name="line1306">1306: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
+<a name="line1307">1307: </a><font color="#B22222">.  bsmax - max block size</font>
+<a name="line1308">1308: </a><font color="#B22222">-  realmats - A and B are real</font>
+
+<a name="line1310">1310: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1312">1312: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>()</font>
+<a name="line1313">1313: </a><font color="#B22222">@*/</font>
+<a name="line1314">1314: </a><strong><font color="#4169E1"><a name="EPSCISSGetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)</font></strong>
+<a name="line1315">1315: </a>{
+
+<a name="line1320">1320: </a>  PetscUseMethod(eps,<font color="#666666">"EPSCISSGetSizes_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(eps,ip,bs,ms,npart,bsmax,realmats));
+<a name="line1321">1321: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1322">1322: </a>}
+
+<a name="line1326">1326: </a><strong><font color="#4169E1"><a name="EPSCISSSetThreshold_CISS"></a>static PetscErrorCode EPSCISSSetThreshold_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal delta,PetscReal spur)</font></strong>
+<a name="line1327">1327: </a>{
+<a name="line1328">1328: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1331">1331: </a>  <font color="#4169E1">if</font> (delta == PETSC_DEFAULT) {
+<a name="line1332">1332: </a>    ctx->delta = 1e-12;
+<a name="line1333">1333: </a>  } <font color="#4169E1">else</font> {
+<a name="line1334">1334: </a>    <font color="#4169E1">if</font> (delta<=0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The delta argument must be > 0.0"</font>);
+<a name="line1335">1335: </a>    ctx->delta = delta;
+<a name="line1336">1336: </a>  }
+<a name="line1337">1337: </a>  <font color="#4169E1">if</font> (spur == PETSC_DEFAULT) {
+<a name="line1338">1338: </a>    ctx->spurious_threshold = 1e-4;
+<a name="line1339">1339: </a>  } <font color="#4169E1">else</font> {
+<a name="line1340">1340: </a>    <font color="#4169E1">if</font> (spur<=0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The spurious threshold argument must be > 0.0"</font>);
+<a name="line1341">1341: </a>    ctx->spurious_threshold = spur;
+<a name="line1342">1342: </a>  }
+<a name="line1343">1343: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1344">1344: </a>}
+
+<a name="line1348">1348: </a><font color="#B22222">/*@</font>
+<a name="line1349">1349: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a> - Sets the values of various threshold parameters in</font>
+<a name="line1350">1350: </a><font color="#B22222">   the CISS solver.</font>
+
+<a name="line1352">1352: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1354">1354: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1355">1355: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
+<a name="line1356">1356: </a><font color="#B22222">.  delta - threshold for numerical rank</font>
+<a name="line1357">1357: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
+
+<a name="line1359">1359: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1360">1360: </a><font color="#B22222">+  -eps_ciss_delta - Sets the delta</font>
+<a name="line1361">1361: </a><font color="#B22222">-  -eps_ciss_spurious_threshold - Sets the spurious threshold</font>
+
+<a name="line1363">1363: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1365">1365: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>()</font>
+<a name="line1366">1366: </a><font color="#B22222">@*/</font>
+<a name="line1367">1367: </a><strong><font color="#4169E1"><a name="EPSCISSSetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal delta,PetscReal spur)</font></strong>
+<a name="line1368">1368: </a>{
+
+<a name="line1375">1375: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetThreshold_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal,PetscReal),(eps,delta,spur));
+<a name="line1376">1376: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1377">1377: </a>}
+
+<a name="line1381">1381: </a><strong><font color="#4169E1"><a name="EPSCISSGetThreshold_CISS"></a>static PetscErrorCode EPSCISSGetThreshold_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *delta,PetscReal *spur)</font></strong>
+<a name="line1382">1382: </a>{
+<a name="line1383">1383: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1386">1386: </a>  <font color="#4169E1">if</font> (delta) *delta = ctx->delta;
+<a name="line1387">1387: </a>  <font color="#4169E1">if</font> (spur)  *spur = ctx->spurious_threshold;
+<a name="line1388">1388: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1389">1389: </a>}
+
+<a name="line1393">1393: </a><font color="#B22222">/*@</font>
+<a name="line1394">1394: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a> - Gets the values of various threshold parameters</font>
+<a name="line1395">1395: </a><font color="#B22222">   in the CISS solver.</font>
+
+<a name="line1397">1397: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1399">1399: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1400">1400: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1402">1402: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1403">1403: </a><font color="#B22222">+  delta - threshold for numerical rank</font>
+<a name="line1404">1404: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
+
+<a name="line1406">1406: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1408">1408: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>()</font>
+<a name="line1409">1409: </a><font color="#B22222">@*/</font>
+<a name="line1410">1410: </a><strong><font color="#4169E1"><a name="EPSCISSGetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *delta,PetscReal *spur)</font></strong>
+<a name="line1411">1411: </a>{
+
+<a name="line1416">1416: </a>  PetscUseMethod(eps,<font color="#666666">"EPSCISSGetThreshold_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*,PetscReal*),(eps,delta,spur));
+<a name="line1417">1417: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1418">1418: </a>}
+
+<a name="line1422">1422: </a><strong><font color="#4169E1"><a name="EPSCISSSetRefinement_CISS"></a>static PetscErrorCode EPSCISSSetRefinement_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt inner,PetscInt blsize)</font></strong>
+<a name="line1423">1423: </a>{
+<a name="line1424">1424: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
 
-<a name="line1292">1292: </a><font color="#B22222">   Level: advanced</font>
+<a name="line1427">1427: </a>  <font color="#4169E1">if</font> (inner == PETSC_DEFAULT) {
+<a name="line1428">1428: </a>    ctx->refine_inner = 0;
+<a name="line1429">1429: </a>  } <font color="#4169E1">else</font> {
+<a name="line1430">1430: </a>    <font color="#4169E1">if</font> (inner<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine inner argument must be >= 0"</font>);
+<a name="line1431">1431: </a>    ctx->refine_inner = inner;
+<a name="line1432">1432: </a>  }
+<a name="line1433">1433: </a>  <font color="#4169E1">if</font> (blsize == PETSC_DEFAULT) {
+<a name="line1434">1434: </a>    ctx->refine_blocksize = 0;
+<a name="line1435">1435: </a>  } <font color="#4169E1">else</font> {
+<a name="line1436">1436: </a>    <font color="#4169E1">if</font> (blsize<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine blocksize argument must be >= 0"</font>);
+<a name="line1437">1437: </a>    ctx->refine_blocksize = blsize;
+<a name="line1438">1438: </a>  }
+<a name="line1439">1439: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1440">1440: </a>}
 
-<a name="line1294">1294: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>()</font>
-<a name="line1295">1295: </a><font color="#B22222">@*/</font>
-<a name="line1296">1296: </a><strong><font color="#4169E1"><a name="EPSCISSSetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt inner,PetscInt outer,PetscInt blsize)</font></strong>
-<a name="line1297">1297: </a>{
-
-<a name="line1305">1305: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetRefinement_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt),(eps,inner,outer,blsize));
-<a name="line1306">1306: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1307">1307: </a>}
-
-<a name="line1311">1311: </a><strong><font color="#4169E1"><a name="EPSCISSGetRefinement_CISS"></a>static PetscErrorCode EPSCISSGetRefinement_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *inner,PetscInt *outer,PetscInt *blsize)</font></strong>
-<a name="line1312">1312: </a>{
-<a name="line1313">1313: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1316">1316: </a>  <font color="#4169E1">if</font> (inner)  *inner = ctx->refine_inner;
-<a name="line1317">1317: </a>  <font color="#4169E1">if</font> (outer)  *outer = ctx->refine_outer;
-<a name="line1318">1318: </a>  <font color="#4169E1">if</font> (blsize) *blsize = ctx->refine_blocksize;
-<a name="line1319">1319: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1320">1320: </a>}
+<a name="line1444">1444: </a><font color="#B22222">/*@</font>
+<a name="line1445">1445: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a> - Sets the values of various refinement parameters</font>
+<a name="line1446">1446: </a><font color="#B22222">   in the CISS solver.</font>
 
-<a name="line1324">1324: </a><font color="#B22222">/*@</font>
-<a name="line1325">1325: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a> - Gets the values of various refinement parameters</font>
-<a name="line1326">1326: </a><font color="#B22222">   in the CISS solver.</font>
+<a name="line1448">1448: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line1328">1328: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1330">1330: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1331">1331: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line1333">1333: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1334">1334: </a><font color="#B22222">+  inner  - number of iterative refinement iterations (inner loop)</font>
-<a name="line1335">1335: </a><font color="#B22222">.  outer  - number of iterative refinement iterations (outer loop)</font>
-<a name="line1336">1336: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
-
-<a name="line1338">1338: </a><font color="#B22222">   Level: advanced</font>
+<a name="line1450">1450: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1451">1451: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
+<a name="line1452">1452: </a><font color="#B22222">.  inner  - number of iterative refinement iterations (inner loop)</font>
+<a name="line1453">1453: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
 
-<a name="line1340">1340: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>()</font>
-<a name="line1341">1341: </a><font color="#B22222">@*/</font>
-<a name="line1342">1342: </a><strong><font color="#4169E1"><a name="EPSCISSGetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps, PetscInt *inner, PetscInt *outer,PetscInt *blsize)</font></strong>
-<a name="line1343">1343: </a>{
-
-<a name="line1348">1348: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSGetRefinement_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*),(eps,inner,outer,blsize));
-<a name="line1349">1349: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1350">1350: </a>}
-
-<a name="line1354">1354: </a><strong><font color="#4169E1"><a name="EPSCISSSetUseST_CISS"></a>static PetscErrorCode EPSCISSSetUseST_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool usest)</font></strong>
-<a name="line1355">1355: </a>{
-<a name="line1356">1356: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1359">1359: </a>  ctx->usest = usest;
-<a name="line1360">1360: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1361">1361: </a>}
-
-<a name="line1365">1365: </a><font color="#B22222">/*@</font>
-<a name="line1366">1366: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a> - Sets a flag indicating that the CISS solver will</font>
-<a name="line1367">1367: </a><font color="#B22222">   use the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object for the linear solves.</font>
-
-<a name="line1369">1369: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1371">1371: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1372">1372: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
-<a name="line1373">1373: </a><font color="#B22222">-  usest  - boolean flag to use the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object or not</font>
-
-<a name="line1375">1375: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1376">1376: </a><font color="#B22222">+  -eps_ciss_usest <bool> - whether the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object will be used or not</font>
-
-<a name="line1378">1378: </a><font color="#B22222">   Level: advanced</font>
+<a name="line1455">1455: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1456">1456: </a><font color="#B22222">+  -eps_ciss_refine_inner - Sets number of inner iterations</font>
+<a name="line1457">1457: </a><font color="#B22222">-  -eps_ciss_refine_blocksize - Sets number of blocksize iterations</font>
 
-<a name="line1380">1380: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>()</font>
-<a name="line1381">1381: </a><font color="#B22222">@*/</font>
-<a name="line1382">1382: </a><strong><font color="#4169E1"><a name="EPSCISSSetUseST"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool usest)</font></strong>
-<a name="line1383">1383: </a>{
+<a name="line1459">1459: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line1389">1389: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetUseST_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,usest));
-<a name="line1390">1390: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1391">1391: </a>}
+<a name="line1461">1461: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>()</font>
+<a name="line1462">1462: </a><font color="#B22222">@*/</font>
+<a name="line1463">1463: </a><strong><font color="#4169E1"><a name="EPSCISSSetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt inner,PetscInt blsize)</font></strong>
+<a name="line1464">1464: </a>{
 
-<a name="line1395">1395: </a><strong><font color="#4169E1"><a name="EPSCISSGetUseST_CISS"></a>static PetscErrorCode EPSCISSGetUseST_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *usest)</font></strong>
-<a name="line1396">1396: </a>{
-<a name="line1397">1397: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+<a name="line1471">1471: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetRefinement_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,inner,blsize));
+<a name="line1472">1472: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1473">1473: </a>}
 
-<a name="line1400">1400: </a>  *usest = ctx->usest;
-<a name="line1401">1401: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1402">1402: </a>}
+<a name="line1477">1477: </a><strong><font color="#4169E1"><a name="EPSCISSGetRefinement_CISS"></a>static PetscErrorCode EPSCISSGetRefinement_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *inner,PetscInt *blsize)</font></strong>
+<a name="line1478">1478: </a>{
+<a name="line1479">1479: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
 
-<a name="line1406">1406: </a><font color="#B22222">/*@</font>
-<a name="line1407">1407: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a> - Gets the flag for using the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object</font>
-<a name="line1408">1408: </a><font color="#B22222">   in the CISS solver.</font>
+<a name="line1482">1482: </a>  <font color="#4169E1">if</font> (inner)  *inner = ctx->refine_inner;
+<a name="line1483">1483: </a>  <font color="#4169E1">if</font> (blsize) *blsize = ctx->refine_blocksize;
+<a name="line1484">1484: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1485">1485: </a>}
 
-<a name="line1410">1410: </a><font color="#B22222">   Not Collective</font>
+<a name="line1489">1489: </a><font color="#B22222">/*@</font>
+<a name="line1490">1490: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a> - Gets the values of various refinement parameters</font>
+<a name="line1491">1491: </a><font color="#B22222">   in the CISS solver.</font>
 
-<a name="line1412">1412: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1413">1413: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line1493">1493: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line1415">1415: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1416">1416: </a><font color="#B22222">+  usest - boolean flag indicating if the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object is being used</font>
+<a name="line1495">1495: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1496">1496: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line1418">1418: </a><font color="#B22222">   Level: advanced</font>
+<a name="line1498">1498: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1499">1499: </a><font color="#B22222">+  inner  - number of iterative refinement iterations (inner loop)</font>
+<a name="line1500">1500: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
 
-<a name="line1420">1420: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>()</font>
-<a name="line1421">1421: </a><font color="#B22222">@*/</font>
-<a name="line1422">1422: </a><strong><font color="#4169E1"><a name="EPSCISSGetUseST"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps, PetscBool *usest)</font></strong>
-<a name="line1423">1423: </a>{
+<a name="line1502">1502: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1504">1504: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>()</font>
+<a name="line1505">1505: </a><font color="#B22222">@*/</font>
+<a name="line1506">1506: </a><strong><font color="#4169E1"><a name="EPSCISSGetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps, PetscInt *inner, PetscInt *blsize)</font></strong>
+<a name="line1507">1507: </a>{
+
+<a name="line1512">1512: </a>  PetscUseMethod(eps,<font color="#666666">"EPSCISSGetRefinement_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,inner,blsize));
+<a name="line1513">1513: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1514">1514: </a>}
+
+<a name="line1518">1518: </a><strong><font color="#4169E1"><a name="EPSCISSSetUseST_CISS"></a>static PetscErrorCode EPSCISSSetUseST_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool usest)</font></strong>
+<a name="line1519">1519: </a>{
+<a name="line1520">1520: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1523">1523: </a>  ctx->usest     = usest;
+<a name="line1524">1524: </a>  ctx->usest_set = PETSC_TRUE;
+<a name="line1525">1525: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1526">1526: </a>}
+
+<a name="line1530">1530: </a><font color="#B22222">/*@</font>
+<a name="line1531">1531: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a> - Sets a flag indicating that the CISS solver will</font>
+<a name="line1532">1532: </a><font color="#B22222">   use the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object for the linear solves.</font>
+
+<a name="line1534">1534: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1536">1536: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1537">1537: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
+<a name="line1538">1538: </a><font color="#B22222">-  usest  - boolean flag to use the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object or not</font>
+
+<a name="line1540">1540: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1541">1541: </a><font color="#B22222">.  -eps_ciss_usest <bool> - whether the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object will be used or not</font>
+
+<a name="line1543">1543: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1545">1545: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>()</font>
+<a name="line1546">1546: </a><font color="#B22222">@*/</font>
+<a name="line1547">1547: </a><strong><font color="#4169E1"><a name="EPSCISSSetUseST"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool usest)</font></strong>
+<a name="line1548">1548: </a>{
+
+<a name="line1554">1554: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetUseST_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,usest));
+<a name="line1555">1555: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1556">1556: </a>}
+
+<a name="line1560">1560: </a><strong><font color="#4169E1"><a name="EPSCISSGetUseST_CISS"></a>static PetscErrorCode EPSCISSGetUseST_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *usest)</font></strong>
+<a name="line1561">1561: </a>{
+<a name="line1562">1562: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1565">1565: </a>  *usest = ctx->usest;
+<a name="line1566">1566: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1567">1567: </a>}
+
+<a name="line1571">1571: </a><font color="#B22222">/*@</font>
+<a name="line1572">1572: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a> - Gets the flag for using the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object</font>
+<a name="line1573">1573: </a><font color="#B22222">   in the CISS solver.</font>
+
+<a name="line1575">1575: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1577">1577: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1578">1578: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1580">1580: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1581">1581: </a><font color="#B22222">.  usest - boolean flag indicating if the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> object is being used</font>
+
+<a name="line1583">1583: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1585">1585: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>()</font>
+<a name="line1586">1586: </a><font color="#B22222">@*/</font>
+<a name="line1587">1587: </a><strong><font color="#4169E1"><a name="EPSCISSGetUseST"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *usest)</font></strong>
+<a name="line1588">1588: </a>{
+
+<a name="line1594">1594: </a>  PetscUseMethod(eps,<font color="#666666">"EPSCISSGetUseST_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,usest));
+<a name="line1595">1595: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1596">1596: </a>}
+
+<a name="line1600">1600: </a><strong><font color="#4169E1"><a name="EPSCISSSetQuadRule_CISS"></a>static PetscErrorCode EPSCISSSetQuadRule_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a> quad)</font></strong>
+<a name="line1601">1601: </a>{
+<a name="line1602">1602: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1605">1605: </a>  ctx->quad = quad;
+<a name="line1606">1606: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1607">1607: </a>}
+
+<a name="line1611">1611: </a><font color="#B22222">/*@</font>
+<a name="line1612">1612: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a> - Sets the quadrature rule used in the CISS solver. </font>
+
+<a name="line1614">1614: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1616">1616: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1617">1617: </a><font color="#B22222">+  eps  - the eigenproblem solver context</font>
+<a name="line1618">1618: </a><font color="#B22222">-  quad - the quadrature rule</font>
+
+<a name="line1620">1620: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1621">1621: </a><font color="#B22222">.  -eps_ciss_quadrule - Sets the quadrature rule (either 'trapezoidal' or</font>
+<a name="line1622">1622: </a><font color="#B22222">                           'chebyshev')</font>
+
+<a name="line1624">1624: </a><font color="#B22222">   Notes:</font>
+<a name="line1625">1625: </a><font color="#B22222">   By default, the trapezoidal rule is used (EPS_CISS_QUADRULE_TRAPEZOIDAL).</font>
+
+<a name="line1627">1627: </a><font color="#B22222">   If the 'chebyshev' option is specified (EPS_CISS_QUADRULE_CHEBYSHEV), then</font>
+<a name="line1628">1628: </a><font color="#B22222">   Chebyshev points are used as quadrature points.</font>
+
+<a name="line1630">1630: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1632">1632: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</a>(), <a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a></font>
+<a name="line1633">1633: </a><font color="#B22222">@*/</font>
+<a name="line1634">1634: </a><strong><font color="#4169E1"><a name="EPSCISSSetQuadRule"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a> quad)</font></strong>
+<a name="line1635">1635: </a>{
+
+<a name="line1641">1641: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetQuadRule_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>),(eps,quad));
+<a name="line1642">1642: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1643">1643: </a>}
+
+<a name="line1647">1647: </a><strong><font color="#4169E1"><a name="EPSCISSGetQuadRule_CISS"></a>static PetscErrorCode EPSCISSGetQuadRule_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a> *quad)</font></strong>
+<a name="line1648">1648: </a>{
+<a name="line1649">1649: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1652">1652: </a>  *quad = ctx->quad;
+<a name="line1653">1653: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1654">1654: </a>}
+
+<a name="line1658">1658: </a><font color="#B22222">/*@</font>
+<a name="line1659">1659: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</a> - Gets the quadrature rule used in the CISS solver.</font>
+<a name="line1660">1660: </a><font color="#B22222">   </font>
+<a name="line1661">1661: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1663">1663: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1664">1664: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1666">1666: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1667">1667: </a><font color="#B22222">.  quad - quadrature rule</font>
+
+<a name="line1669">1669: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1671">1671: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a>() <a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a></font>
+<a name="line1672">1672: </a><font color="#B22222">@*/</font>
+<a name="line1673">1673: </a><strong><font color="#4169E1"><a name="EPSCISSGetQuadRule"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetQuadRule.html#EPSCISSGetQuadRule">EPSCISSGetQuadRule</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps, <a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a> *quad)</font></strong>
+<a name="line1674">1674: </a>{
+
+<a name="line1680">1680: </a>  PetscUseMethod(eps,<font color="#666666">"EPSCISSGetQuadRule_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>*),(eps,quad));
+<a name="line1681">1681: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1682">1682: </a>}
+
+<a name="line1686">1686: </a><strong><font color="#4169E1"><a name="EPSCISSSetExtraction_CISS"></a>static PetscErrorCode EPSCISSSetExtraction_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> extraction)</font></strong>
+<a name="line1687">1687: </a>{
+<a name="line1688">1688: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1691">1691: </a>  ctx->extraction = extraction;
+<a name="line1692">1692: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1693">1693: </a>}
+
+<a name="line1697">1697: </a><font color="#B22222">/*@</font>
+<a name="line1698">1698: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a> - Sets the extraction technique used in the CISS solver. </font>
+
+<a name="line1700">1700: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line1428">1428: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSGetUseST_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,usest));
-<a name="line1429">1429: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1430">1430: </a>}
-
-<a name="line1434">1434: </a><strong><font color="#4169E1"><a name="EPSReset_CISS"></a>PetscErrorCode EPSReset_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1435">1435: </a>{
-<a name="line1437">1437: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line1438">1438: </a>  PetscInt       i;
-
-<a name="line1441">1441: </a>  PetscSubcommDestroy(&ctx->subcomm);
-<a name="line1442">1442: </a>  PetscFree4(ctx->weight,ctx->omega,ctx->pp,ctx->sigma);
-<a name="line1443">1443: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->S);
-<a name="line1444">1444: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->V);
-<a name="line1445">1445: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->Y);
-<a name="line1446">1446: </a>  <font color="#4169E1">if</font> (!ctx->usest) {
-<a name="line1447">1447: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line1448">1448: </a>      KSPDestroy(&ctx->ksp[i]);
-<a name="line1449">1449: </a>    }
-<a name="line1450">1450: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line1451">1451: </a>      MatDestroy(&ctx->kspMat[i]);
-<a name="line1452">1452: </a>    }
-<a name="line1453">1453: </a>    PetscFree2(ctx->ksp,ctx->kspMat);
-<a name="line1454">1454: </a>  }
-<a name="line1455">1455: </a>  VecScatterDestroy(&ctx->scatterin);
-<a name="line1456">1456: </a>  VecDestroy(&ctx->xsub);
-<a name="line1457">1457: </a>  VecDestroy(&ctx->xdup);
-<a name="line1458">1458: </a>  <font color="#4169E1">if</font> (ctx->pA) {
-<a name="line1459">1459: </a>    MatDestroy(&ctx->pA);
-<a name="line1460">1460: </a>    MatDestroy(&ctx->pB);
-<a name="line1461">1461: </a>    <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->pV);
-<a name="line1462">1462: </a>  }
-<a name="line1463">1463: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1464">1464: </a>}
-
-<a name="line1468">1468: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_CISS"></a>PetscErrorCode EPSSetFromOptions_CISS(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1469">1469: </a>{
-<a name="line1471">1471: </a>  PetscReal      r3,r4;
-<a name="line1472">1472: </a>  PetscInt       i1,i2,i3,i4,i5,i6,i7,i8;
-<a name="line1473">1473: </a>  PetscBool      b1,b2;
-
-<a name="line1476">1476: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> CISS Options"</font>);
-<a name="line1477">1477: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>(eps,&i1,&i2,&i3,&i4,&i5,&b1);
-<a name="line1478">1478: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_integration_points"</font>,<font color="#666666">"CISS number of integration points"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i1,&i1,NULL);
-<a name="line1479">1479: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_blocksize"</font>,<font color="#666666">"CISS block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i2,&i2,NULL);
-<a name="line1480">1480: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_moments"</font>,<font color="#666666">"CISS moment size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i3,&i3,NULL);
-<a name="line1481">1481: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_partitions"</font>,<font color="#666666">"CISS number of partitions"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i4,&i4,NULL);
-<a name="line1482">1482: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_maxblocksize"</font>,<font color="#666666">"CISS maximum block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i5,&i5,NULL);
-<a name="line1483">1483: </a>  PetscOptionsBool(<font color="#666666">"-eps_ciss_realmats"</font>,<font color="#666666">"CISS A and B are real"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,b1,&b1,NULL);
-<a name="line1484">1484: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>(eps,i1,i2,i3,i4,i5,b1);
-
-<a name="line1486">1486: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>(eps,&r3,&r4);
-<a name="line1487">1487: </a>  PetscOptionsReal(<font color="#666666">"-eps_ciss_delta"</font>,<font color="#666666">"CISS threshold for numerical rank"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>"</font>,r3,&r3,NULL);
-<a name="line1488">1488: </a>  PetscOptionsReal(<font color="#666666">"-eps_ciss_spurious_threshold"</font>,<font color="#666666">"CISS threshold for the spurious eigenpairs"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>"</font>,r4,&r4,NULL);
-<a name="line1489">1489: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>(eps,r3,r4);
-
-<a name="line1491">1491: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>(eps,&i6,&i7,&i8);
-<a name="line1492">1492: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_refine_inner"</font>,<font color="#666666">"CISS number of inner iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>"</font>,i6,&i6,NULL);
-<a name="line1493">1493: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_refine_outer"</font>,<font color="#666666">"CISS number of outer iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>"</font>,i7,&i7,NULL);
-<a name="line1494">1494: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_refine_blocksize"</font>,<font color="#666666">"CISS number of blocksize iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>"</font>,i8,&i8,NULL);
-<a name="line1495">1495: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>(eps,i6,i7,i8);
-
-<a name="line1497">1497: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>(eps,&b2);
-<a name="line1498">1498: </a>  PetscOptionsBool(<font color="#666666">"-eps_ciss_usest"</font>,<font color="#666666">"CISS use <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> for linear solves"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>"</font>,b2,&b2,NULL);
-<a name="line1499">1499: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>(eps,b2);
-
-<a name="line1501">1501: </a>  PetscOptionsTail();
-<a name="line1502">1502: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1503">1503: </a>}
-
-<a name="line1507">1507: </a><strong><font color="#4169E1"><a name="EPSDestroy_CISS"></a>PetscErrorCode EPSDestroy_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1508">1508: </a>{
-
-<a name="line1512">1512: </a>  PetscFree(eps->data);
-<a name="line1513">1513: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetSizes_C"</font>,NULL);
-<a name="line1514">1514: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetSizes_C"</font>,NULL);
-<a name="line1515">1515: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetThreshold_C"</font>,NULL);
-<a name="line1516">1516: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetThreshold_C"</font>,NULL);
-<a name="line1517">1517: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetRefinement_C"</font>,NULL);
-<a name="line1518">1518: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetRefinement_C"</font>,NULL);
-<a name="line1519">1519: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetUseST_C"</font>,NULL);
-<a name="line1520">1520: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetUseST_C"</font>,NULL);
-<a name="line1521">1521: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1522">1522: </a>}
-
-<a name="line1526">1526: </a><strong><font color="#4169E1"><a name="EPSView_CISS"></a>PetscErrorCode EPSView_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line1527">1527: </a>{
-<a name="line1529">1529: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-<a name="line1530">1530: </a>  PetscBool      isascii;
-
-<a name="line1533">1533: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line1534">1534: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line1535">1535: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: sizes { integration points: %D, block size: %D, moment size: %D, partitions: %D, maximum block size: %D }\n"</font>,ctx->N,ctx->L,ctx->M,ctx->num_subcomm,ctx->L_max);
-<a name="line1536">1536: </a>    <font color="#4169E1">if</font> (ctx->isreal) {
-<a name="line1537">1537: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: exploiting symmetry of integration points\n"</font>);
-<a name="line1538">1538: </a>    }
-<a name="line1539">1539: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: threshold { delta: %g, spurious threshold: %g }\n"</font>,(double)ctx->delta,(double)ctx->spurious_threshold);
-<a name="line1540">1540: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: iterative refinement  { inner: %D, outer: %D, blocksize: %D }\n"</font>,ctx->refine_inner,ctx->refine_outer, ctx->refine_blocksize);
-<a name="line1541">1541: </a>    <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line1542">1542: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: using <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> for linear solves\n"</font>);
-<a name="line1543">1543: </a>    }
-<a name="line1544">1544: </a>    PetscViewerASCIIPushTab(viewer);
-<a name="line1545">1545: </a>    <font color="#B22222">/*KSPView(ctx->ksp[0],viewer);*/</font>
-<a name="line1546">1546: </a>    PetscViewerASCIIPopTab(viewer);
-<a name="line1547">1547: </a>  }
-<a name="line1548">1548: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1549">1549: </a>}
-
-<a name="line1553">1553: </a><strong><font color="#4169E1"><a name="EPSCreate_CISS"></a>PETSC_EXTERN PetscErrorCode EPSCreate_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1554">1554: </a>{
-<a name="line1556">1556: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
-
-<a name="line1559">1559: </a>  PetscNewLog(eps,&ctx);
-<a name="line1560">1560: </a>  eps->data = ctx;
-<a name="line1561">1561: </a>  eps->ops->setup          = EPSSetUp_CISS;
-<a name="line1562">1562: </a>  eps->ops->setfromoptions = EPSSetFromOptions_CISS;
-<a name="line1563">1563: </a>  eps->ops->destroy        = EPSDestroy_CISS;
-<a name="line1564">1564: </a>  eps->ops->reset          = EPSReset_CISS;
-<a name="line1565">1565: </a>  eps->ops->view           = EPSView_CISS;
-<a name="line1566">1566: </a>  eps->ops->backtransform  = NULL;
-<a name="line1567">1567: </a>  eps->ops->computevectors = EPSComputeVectors_Schur;
-<a name="line1568">1568: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetSizes_C"</font>,EPSCISSSetSizes_CISS);
-<a name="line1569">1569: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetSizes_C"</font>,EPSCISSGetSizes_CISS);
-<a name="line1570">1570: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetThreshold_C"</font>,EPSCISSSetThreshold_CISS);
-<a name="line1571">1571: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetThreshold_C"</font>,EPSCISSGetThreshold_CISS);
-<a name="line1572">1572: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetRefinement_C"</font>,EPSCISSSetRefinement_CISS);
-<a name="line1573">1573: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetRefinement_C"</font>,EPSCISSGetRefinement_CISS);
-<a name="line1574">1574: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetUseST_C"</font>,EPSCISSSetUseST_CISS);
-<a name="line1575">1575: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetUseST_C"</font>,EPSCISSGetUseST_CISS);
-<a name="line1576">1576: </a>  <font color="#B22222">/* set default values of parameters */</font>
-<a name="line1577">1577: </a>  ctx->N       = 32;
-<a name="line1578">1578: </a>  ctx->L       = 16;
-<a name="line1579">1579: </a>  ctx->M       = ctx->N/4;
-<a name="line1580">1580: </a>  ctx->delta   = 1e-12;
-<a name="line1581">1581: </a>  ctx->L_max   = 64;
-<a name="line1582">1582: </a>  ctx->spurious_threshold = 1e-4;
-<a name="line1583">1583: </a>  ctx->usest   = PETSC_FALSE;
-<a name="line1584">1584: </a>  ctx->isreal  = PETSC_FALSE;
-<a name="line1585">1585: </a>  ctx->refine_outer = 1;
-<a name="line1586">1586: </a>  ctx->refine_inner = 1;
-<a name="line1587">1587: </a>  ctx->refine_blocksize = 1;
-<a name="line1588">1588: </a>  ctx->num_subcomm = 1;
-<a name="line1589">1589: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1590">1590: </a>}
+<a name="line1702">1702: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1703">1703: </a><font color="#B22222">+  eps        - the eigenproblem solver context</font>
+<a name="line1704">1704: </a><font color="#B22222">-  extraction - the extraction technique</font>
+
+<a name="line1706">1706: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1707">1707: </a><font color="#B22222">.  -eps_ciss_extraction - Sets the extraction technique (either 'ritz' or</font>
+<a name="line1708">1708: </a><font color="#B22222">                           'hankel')</font>
+
+<a name="line1710">1710: </a><font color="#B22222">   Notes:</font>
+<a name="line1711">1711: </a><font color="#B22222">   By default, the Rayleigh-Ritz extraction is used (EPS_CISS_EXTRACTION_RITZ).</font>
+
+<a name="line1713">1713: </a><font color="#B22222">   If the 'hankel' option is specified (EPS_CISS_EXTRACTION_HANKEL), then</font>
+<a name="line1714">1714: </a><font color="#B22222">   the Block Hankel method is used for extracting eigenpairs.</font>
+
+<a name="line1716">1716: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1718">1718: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</a>(), <a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a></font>
+<a name="line1719">1719: </a><font color="#B22222">@*/</font>
+<a name="line1720">1720: </a><strong><font color="#4169E1"><a name="EPSCISSSetExtraction"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> extraction)</font></strong>
+<a name="line1721">1721: </a>{
+
+<a name="line1727">1727: </a>  PetscTryMethod(eps,<font color="#666666">"EPSCISSSetExtraction_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>),(eps,extraction));
+<a name="line1728">1728: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1729">1729: </a>}
+
+<a name="line1733">1733: </a><strong><font color="#4169E1"><a name="EPSCISSGetExtraction_CISS"></a>static PetscErrorCode EPSCISSGetExtraction_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> *extraction)</font></strong>
+<a name="line1734">1734: </a>{
+<a name="line1735">1735: </a>  EPS_CISS *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1738">1738: </a>  *extraction = ctx->extraction;
+<a name="line1739">1739: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1740">1740: </a>}
+
+<a name="line1744">1744: </a><font color="#B22222">/*@</font>
+<a name="line1745">1745: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</a> - Gets the extraction technique used in the CISS solver.</font>
+
+<a name="line1747">1747: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1749">1749: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1750">1750: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1752">1752: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1753">1753: </a><font color="#B22222">+  extraction - extraction technique</font>
+
+<a name="line1755">1755: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1757">1757: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a>() <a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a></font>
+<a name="line1758">1758: </a><font color="#B22222">@*/</font>
+<a name="line1759">1759: </a><strong><font color="#4169E1"><a name="EPSCISSGetExtraction"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSCISSGetExtraction.html#EPSCISSGetExtraction">EPSCISSGetExtraction</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> *extraction)</font></strong>
+<a name="line1760">1760: </a>{
+
+<a name="line1766">1766: </a>  PetscUseMethod(eps,<font color="#666666">"EPSCISSGetExtraction_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>*),(eps,extraction));
+<a name="line1767">1767: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1768">1768: </a>}
+
+
+<a name="line1773">1773: </a><strong><font color="#4169E1"><a name="EPSReset_CISS"></a>PetscErrorCode EPSReset_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1774">1774: </a>{
+<a name="line1776">1776: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line1777">1777: </a>  PetscInt       i;
+
+<a name="line1780">1780: </a>  PetscSubcommDestroy(&ctx->subcomm);
+<a name="line1781">1781: </a>  PetscFree4(ctx->weight,ctx->omega,ctx->pp,ctx->sigma);
+<a name="line1782">1782: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->S);
+<a name="line1783">1783: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->V);
+<a name="line1784">1784: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->Y);
+<a name="line1785">1785: </a>  <font color="#4169E1">if</font> (!ctx->usest) {
+<a name="line1786">1786: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line1787">1787: </a>      KSPDestroy(&ctx->ksp[i]);
+<a name="line1788">1788: </a>    }
+<a name="line1789">1789: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line1790">1790: </a>      MatDestroy(&ctx->kspMat[i]);
+<a name="line1791">1791: </a>    }
+<a name="line1792">1792: </a>    PetscFree2(ctx->ksp,ctx->kspMat);
+<a name="line1793">1793: </a>  }
+<a name="line1794">1794: </a>  VecScatterDestroy(&ctx->scatterin);
+<a name="line1795">1795: </a>  VecDestroy(&ctx->xsub);
+<a name="line1796">1796: </a>  VecDestroy(&ctx->xdup);
+<a name="line1797">1797: </a>  <font color="#4169E1">if</font> (ctx->pA) {
+<a name="line1798">1798: </a>    MatDestroy(&ctx->pA);
+<a name="line1799">1799: </a>    MatDestroy(&ctx->pB);
+<a name="line1800">1800: </a>    <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->pV);
+<a name="line1801">1801: </a>  }
+<a name="line1802">1802: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1803">1803: </a>}
+
+<a name="line1807">1807: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_CISS"></a>PetscErrorCode EPSSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1808">1808: </a>{
+<a name="line1809">1809: </a>  PetscErrorCode    ierr;
+<a name="line1810">1810: </a>  PetscReal         r3,r4;
+<a name="line1811">1811: </a>  PetscInt          i1,i2,i3,i4,i5,i6,i7;
+<a name="line1812">1812: </a>  PetscBool         b1,b2,flg;
+<a name="line1813">1813: </a>  EPS_CISS          *ctx = (EPS_CISS*)eps->data;
+<a name="line1814">1814: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>   quad;
+<a name="line1815">1815: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a> extraction;
+
+<a name="line1818">1818: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> CISS Options"</font>);
+<a name="line1819">1819: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetSizes.html#EPSCISSGetSizes">EPSCISSGetSizes</a>(eps,&i1,&i2,&i3,&i4,&i5,&b1);
+<a name="line1820">1820: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_integration_points"</font>,<font color="#666666">"CISS number of integration points"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i1,&i1,NULL);
+<a name="line1821">1821: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_blocksize"</font>,<font color="#666666">"CISS block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i2,&i2,NULL);
+<a name="line1822">1822: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_moments"</font>,<font color="#666666">"CISS moment size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i3,&i3,NULL);
+<a name="line1823">1823: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_partitions"</font>,<font color="#666666">"CISS number of partitions"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i4,&i4,NULL);
+<a name="line1824">1824: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_maxblocksize"</font>,<font color="#666666">"CISS maximum block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,i5,&i5,NULL);
+<a name="line1825">1825: </a>  PetscOptionsBool(<font color="#666666">"-eps_ciss_realmats"</font>,<font color="#666666">"CISS A and B are real"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>"</font>,b1,&b1,NULL);
+<a name="line1826">1826: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetSizes.html#EPSCISSSetSizes">EPSCISSSetSizes</a>(eps,i1,i2,i3,i4,i5,b1);
+
+<a name="line1828">1828: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetThreshold.html#EPSCISSGetThreshold">EPSCISSGetThreshold</a>(eps,&r3,&r4);
+<a name="line1829">1829: </a>  PetscOptionsReal(<font color="#666666">"-eps_ciss_delta"</font>,<font color="#666666">"CISS threshold for numerical rank"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>"</font>,r3,&r3,NULL);
+<a name="line1830">1830: </a>  PetscOptionsReal(<font color="#666666">"-eps_ciss_spurious_threshold"</font>,<font color="#666666">"CISS threshold for the spurious eigenpairs"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>"</font>,r4,&r4,NULL);
+<a name="line1831">1831: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetThreshold.html#EPSCISSSetThreshold">EPSCISSSetThreshold</a>(eps,r3,r4);
+
+<a name="line1833">1833: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetRefinement.html#EPSCISSGetRefinement">EPSCISSGetRefinement</a>(eps,&i6,&i7);
+<a name="line1834">1834: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_refine_inner"</font>,<font color="#666666">"CISS number of inner iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>"</font>,i6,&i6,NULL);
+<a name="line1835">1835: </a>  PetscOptionsInt(<font color="#666666">"-eps_ciss_refine_blocksize"</font>,<font color="#666666">"CISS number of blocksize iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>"</font>,i7,&i7,NULL);
+<a name="line1836">1836: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSSetRefinement.html#EPSCISSSetRefinement">EPSCISSSetRefinement</a>(eps,i6,i7);
+
+<a name="line1838">1838: </a>  <a href="../../../../docs/manualpages/EPS/EPSCISSGetUseST.html#EPSCISSGetUseST">EPSCISSGetUseST</a>(eps,&b2);
+<a name="line1839">1839: </a>  PetscOptionsBool(<font color="#666666">"-eps_ciss_usest"</font>,<font color="#666666">"CISS use <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> for linear solves"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>"</font>,b2,&b2,&flg);
+<a name="line1840">1840: </a>  <font color="#4169E1">if</font> (flg) { <a href="../../../../docs/manualpages/EPS/EPSCISSSetUseST.html#EPSCISSSetUseST">EPSCISSSetUseST</a>(eps,b2); }
+
+<a name="line1842">1842: </a>  PetscOptionsEnum(<font color="#666666">"-eps_ciss_quadrule"</font>,<font color="#666666">"Quadrature rule"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a>"</font>,EPSCISSQuadRules,(PetscEnum)ctx->quad,(PetscEnum*)&quad,&flg);
+<a name="line1843">1843: </a>  <font color="#4169E1">if</font> (flg) { <a href="../../../../docs/manualpages/EPS/EPSCISSSetQuadRule.html#EPSCISSSetQuadRule">EPSCISSSetQuadRule</a>(eps,quad); }
+
+<a name="line1845">1845: </a>  PetscOptionsEnum(<font color="#666666">"-eps_ciss_extraction"</font>,<font color="#666666">"Extraction technique"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a>"</font>,EPSCISSExtractions,(PetscEnum)ctx->extraction,(PetscEnum*)&extraction,&flg);
+<a name="line1846">1846: </a>  <font color="#4169E1">if</font> (flg) { <a href="../../../../docs/manualpages/EPS/EPSCISSSetExtraction.html#EPSCISSSetExtraction">EPSCISSSetExtraction</a>(eps,extraction); }
+
+<a name="line1848">1848: </a>  PetscOptionsTail();
+<a name="line1849">1849: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1850">1850: </a>}
+
+<a name="line1854">1854: </a><strong><font color="#4169E1"><a name="EPSDestroy_CISS"></a>PetscErrorCode EPSDestroy_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1855">1855: </a>{
+
+<a name="line1859">1859: </a>  PetscFree(eps->data);
+<a name="line1860">1860: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetSizes_C"</font>,NULL);
+<a name="line1861">1861: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetSizes_C"</font>,NULL);
+<a name="line1862">1862: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetThreshold_C"</font>,NULL);
+<a name="line1863">1863: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetThreshold_C"</font>,NULL);
+<a name="line1864">1864: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetRefinement_C"</font>,NULL);
+<a name="line1865">1865: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetRefinement_C"</font>,NULL);
+<a name="line1866">1866: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetUseST_C"</font>,NULL);
+<a name="line1867">1867: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetUseST_C"</font>,NULL);
+<a name="line1868">1868: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetQuadRule_C"</font>,NULL);
+<a name="line1869">1869: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetQuadRule_C"</font>,NULL);
+<a name="line1870">1870: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetExtraction_C"</font>,NULL);
+<a name="line1871">1871: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetExtraction_C"</font>,NULL);
+<a name="line1872">1872: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1873">1873: </a>}
+
+<a name="line1877">1877: </a><strong><font color="#4169E1"><a name="EPSView_CISS"></a>PetscErrorCode EPSView_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line1878">1878: </a>{
+<a name="line1880">1880: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+<a name="line1881">1881: </a>  PetscBool      isascii;
+
+<a name="line1884">1884: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line1885">1885: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line1886">1886: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: sizes { integration points: %D, block size: %D, moment size: %D, partitions: %D, maximum block size: %D }\n"</font>,ctx->N,ctx->L,ctx->M,ctx->num_subcomm,ctx->L_max);
+<a name="line1887">1887: </a>    <font color="#4169E1">if</font> (ctx->isreal) {
+<a name="line1888">1888: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: exploiting symmetry of integration points\n"</font>);
+<a name="line1889">1889: </a>    }
+<a name="line1890">1890: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: threshold { delta: %g, spurious threshold: %g }\n"</font>,(double)ctx->delta,(double)ctx->spurious_threshold);
+<a name="line1891">1891: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: iterative refinement  { inner: %D, blocksize: %D }\n"</font>,ctx->refine_inner, ctx->refine_blocksize);
+<a name="line1892">1892: </a>    <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line1893">1893: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: using <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> for linear solves\n"</font>);
+<a name="line1894">1894: </a>    }
+<a name="line1895">1895: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: extraction: %s\n"</font>,EPSCISSExtractions[ctx->extraction]);
+<a name="line1896">1896: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: quadrature rule: %s\n"</font>,EPSCISSQuadRules[ctx->quad]);
+<a name="line1897">1897: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line1898">1898: </a>    
+<a name="line1899">1899: </a>    <font color="#4169E1">if</font> (!ctx->usest && ctx->ksp[0]) { KSPView(ctx->ksp[0],viewer); }
+<a name="line1900">1900: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line1901">1901: </a>  }
+<a name="line1902">1902: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1903">1903: </a>}
+
+<a name="line1907">1907: </a><strong><font color="#4169E1"><a name="EPSCreate_CISS"></a>PETSC_EXTERN PetscErrorCode EPSCreate_CISS(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1908">1908: </a>{
+<a name="line1910">1910: </a>  EPS_CISS       *ctx = (EPS_CISS*)eps->data;
+
+<a name="line1913">1913: </a>  PetscNewLog(eps,&ctx);
+<a name="line1914">1914: </a>  eps->data = ctx;
+<a name="line1915">1915: </a>  eps->ops->solve          = EPSSolve_CISS;
+<a name="line1916">1916: </a>  eps->ops->setup          = EPSSetUp_CISS;
+<a name="line1917">1917: </a>  eps->ops->setfromoptions = EPSSetFromOptions_CISS;
+<a name="line1918">1918: </a>  eps->ops->destroy        = EPSDestroy_CISS;
+<a name="line1919">1919: </a>  eps->ops->reset          = EPSReset_CISS;
+<a name="line1920">1920: </a>  eps->ops->view           = EPSView_CISS;
+<a name="line1921">1921: </a>  eps->ops->backtransform  = NULL;
+<a name="line1922">1922: </a>  eps->ops->computevectors = EPSComputeVectors_Schur;
+<a name="line1923">1923: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetSizes_C"</font>,EPSCISSSetSizes_CISS);
+<a name="line1924">1924: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetSizes_C"</font>,EPSCISSGetSizes_CISS);
+<a name="line1925">1925: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetThreshold_C"</font>,EPSCISSSetThreshold_CISS);
+<a name="line1926">1926: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetThreshold_C"</font>,EPSCISSGetThreshold_CISS);
+<a name="line1927">1927: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetRefinement_C"</font>,EPSCISSSetRefinement_CISS);
+<a name="line1928">1928: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetRefinement_C"</font>,EPSCISSGetRefinement_CISS);
+<a name="line1929">1929: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetUseST_C"</font>,EPSCISSSetUseST_CISS);
+<a name="line1930">1930: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetUseST_C"</font>,EPSCISSGetUseST_CISS);
+<a name="line1931">1931: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetQuadRule_C"</font>,EPSCISSSetQuadRule_CISS);
+<a name="line1932">1932: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetQuadRule_C"</font>,EPSCISSGetQuadRule_CISS);
+<a name="line1933">1933: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSSetExtraction_C"</font>,EPSCISSSetExtraction_CISS);
+<a name="line1934">1934: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSCISSGetExtraction_C"</font>,EPSCISSGetExtraction_CISS);
+<a name="line1935">1935: </a>  <font color="#B22222">/* set default values of parameters */</font>
+<a name="line1936">1936: </a>  ctx->N                  = 32;
+<a name="line1937">1937: </a>  ctx->L                  = 16;
+<a name="line1938">1938: </a>  ctx->M                  = ctx->N/4;
+<a name="line1939">1939: </a>  ctx->delta              = 1e-12;
+<a name="line1940">1940: </a>  ctx->L_max              = 64;
+<a name="line1941">1941: </a>  ctx->spurious_threshold = 1e-4;
+<a name="line1942">1942: </a>  ctx->usest              = PETSC_TRUE;
+<a name="line1943">1943: </a>  ctx->usest_set          = PETSC_FALSE;
+<a name="line1944">1944: </a>  ctx->isreal             = PETSC_FALSE;
+<a name="line1945">1945: </a>  ctx->refine_inner       = 0;
+<a name="line1946">1946: </a>  ctx->refine_blocksize   = 0;
+<a name="line1947">1947: </a>  ctx->num_subcomm        = 1;
+<a name="line1948">1948: </a>  ctx->quad               = (<a href="../../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>)0;
+<a name="line1949">1949: </a>  ctx->extraction         = EPS_CISS_EXTRACTION_RITZ;
+<a name="line1950">1950: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1951">1951: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/ciss/ftn-auto/cissf.c b/src/eps/impls/ciss/ftn-auto/cissf.c
index 95d5845..fad3914 100644
--- a/src/eps/impls/ciss/ftn-auto/cissf.c
+++ b/src/eps/impls/ciss/ftn-auto/cissf.c
@@ -68,19 +68,39 @@ extern void PetscRmPointer(void*);
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define epscissgetusest_ epscissgetusest
 #endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epscisssetquadrule_ EPSCISSSETQUADRULE
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epscisssetquadrule_ epscisssetquadrule
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epscissgetquadrule_ EPSCISSGETQUADRULE
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epscissgetquadrule_ epscissgetquadrule
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epscisssetextraction_ EPSCISSSETEXTRACTION
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epscisssetextraction_ epscisssetextraction
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epscissgetextraction_ EPSCISSGETEXTRACTION
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epscissgetextraction_ epscissgetextraction
+#endif
 
 
 /* Definitions of Fortran Wrapper routines */
 #if defined(__cplusplus)
 extern "C" {
 #endif
-PETSC_EXTERN void PETSC_STDCALL  epscisssetsizes_(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  epscisssetsizes_(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats, int *__ierr ){
 *__ierr = EPSCISSSetSizes(
-	(EPS)PetscToPointer((eps) ),*ip,*bs,*ms,*npart,*bsmax,*isreal);
+	(EPS)PetscToPointer((eps) ),*ip,*bs,*ms,*npart,*bsmax,*realmats);
 }
-PETSC_EXTERN void PETSC_STDCALL  epscissgetsizes_(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  epscissgetsizes_(EPS eps,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats, int *__ierr ){
 *__ierr = EPSCISSGetSizes(
-	(EPS)PetscToPointer((eps) ),ip,bs,ms,npart,bsmax,isreal);
+	(EPS)PetscToPointer((eps) ),ip,bs,ms,npart,bsmax,realmats);
 }
 PETSC_EXTERN void PETSC_STDCALL  epscisssetthreshold_(EPS eps,PetscReal *delta,PetscReal *spur, int *__ierr ){
 *__ierr = EPSCISSSetThreshold(
@@ -90,13 +110,13 @@ PETSC_EXTERN void PETSC_STDCALL  epscissgetthreshold_(EPS eps,PetscReal *delta,P
 *__ierr = EPSCISSGetThreshold(
 	(EPS)PetscToPointer((eps) ),delta,spur);
 }
-PETSC_EXTERN void PETSC_STDCALL  epscisssetrefinement_(EPS eps,PetscInt *inner,PetscInt *outer,PetscInt *blsize, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  epscisssetrefinement_(EPS eps,PetscInt *inner,PetscInt *blsize, int *__ierr ){
 *__ierr = EPSCISSSetRefinement(
-	(EPS)PetscToPointer((eps) ),*inner,*outer,*blsize);
+	(EPS)PetscToPointer((eps) ),*inner,*blsize);
 }
-PETSC_EXTERN void PETSC_STDCALL  epscissgetrefinement_(EPS eps,PetscInt *inner,PetscInt *outer,PetscInt *blsize, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  epscissgetrefinement_(EPS eps,PetscInt *inner,PetscInt *blsize, int *__ierr ){
 *__ierr = EPSCISSGetRefinement(
-	(EPS)PetscToPointer((eps) ),inner,outer,blsize);
+	(EPS)PetscToPointer((eps) ),inner,blsize);
 }
 PETSC_EXTERN void PETSC_STDCALL  epscisssetusest_(EPS eps,PetscBool *usest, int *__ierr ){
 *__ierr = EPSCISSSetUseST(
@@ -106,6 +126,22 @@ PETSC_EXTERN void PETSC_STDCALL  epscissgetusest_(EPS eps,PetscBool *usest, int
 *__ierr = EPSCISSGetUseST(
 	(EPS)PetscToPointer((eps) ),usest);
 }
+PETSC_EXTERN void PETSC_STDCALL  epscisssetquadrule_(EPS eps,EPSCISSQuadRule *quad, int *__ierr ){
+*__ierr = EPSCISSSetQuadRule(
+	(EPS)PetscToPointer((eps) ),*quad);
+}
+PETSC_EXTERN void PETSC_STDCALL  epscissgetquadrule_(EPS eps,EPSCISSQuadRule *quad, int *__ierr ){
+*__ierr = EPSCISSGetQuadRule(
+	(EPS)PetscToPointer((eps) ),quad);
+}
+PETSC_EXTERN void PETSC_STDCALL  epscisssetextraction_(EPS eps,EPSCISSExtraction *extraction, int *__ierr ){
+*__ierr = EPSCISSSetExtraction(
+	(EPS)PetscToPointer((eps) ),*extraction);
+}
+PETSC_EXTERN void PETSC_STDCALL  epscissgetextraction_(EPS eps,EPSCISSExtraction *extraction, int *__ierr ){
+*__ierr = EPSCISSGetExtraction(
+	(EPS)PetscToPointer((eps) ),extraction);
+}
 #if defined(__cplusplus)
 }
 #endif
diff --git a/src/eps/impls/ciss/index.html b/src/eps/impls/ciss/index.html
index 5c14f28..b0b7938 100644
--- a/src/eps/impls/ciss/index.html
+++ b/src/eps/impls/ciss/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/ciss/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/ciss/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/ciss/makefile b/src/eps/impls/ciss/makefile
index f20c381..4a089ec 100644
--- a/src/eps/impls/ciss/makefile
+++ b/src/eps/impls/ciss/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/ciss/makefile.html b/src/eps/impls/ciss/makefile.html
index 78287e6..178ba2b 100644
--- a/src/eps/impls/ciss/makefile.html
+++ b/src/eps/impls/ciss/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/ciss/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:16+00:00">
+<meta name="date" content="2016-05-16T10:33:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/ciss/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/ciss/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/davidson/davidson.c b/src/eps/impls/davidson/davidson.c
index cc319d6..b1b95bc 100644
--- a/src/eps/impls/davidson/davidson.c
+++ b/src/eps/impls/davidson/davidson.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -23,57 +23,18 @@
 
 #include "davidson.h"
 
-PetscErrorCode EPSView_XD(EPS eps,PetscViewer viewer);
-
-typedef struct {
-  /**** Solver options ****/
-  PetscInt  blocksize;     /* block size */
-  PetscInt  initialsize;   /* initial size of V */
-  PetscInt  minv;          /* size of V after restarting */
-  PetscInt  plusk;         /* keep plusk eigenvectors from the last iteration */
-  PetscBool ipB;           /* true if B-ortho is used */
-  PetscInt  method;        /* method for improving the approximate solution */
-  PetscReal fix;           /* the fix parameter */
-  PetscBool krylovstart;   /* true if the starting subspace is a Krylov basis */
-  PetscBool dynamic;       /* true if dynamic stopping criterion is used */
-  PetscInt  cX_in_proj;    /* converged vectors in the projected problem */
-  PetscInt  cX_in_impr;    /* converged vectors in the projector */
-  Method_t  scheme;        /* method employed: GD, JD or GD2 */
-
-  /**** Solver data ****/
-  dvdDashboard ddb;
-} EPS_DAVIDSON;
-
-#undef __FUNCT__
-#define __FUNCT__ "EPSCreate_XD"
-PetscErrorCode EPSCreate_XD(EPS eps)
-{
-  PetscErrorCode ierr;
-  EPS_DAVIDSON   *data;
-
-  PetscFunctionBegin;
-  eps->ops->solve          = EPSSolve_XD;
-  eps->ops->setup          = EPSSetUp_XD;
-  eps->ops->reset          = EPSReset_XD;
-  eps->ops->backtransform  = EPSBackTransform_Default;
-  eps->ops->computevectors = EPSComputeVectors_XD;
-  eps->ops->view           = EPSView_XD;
-
-  ierr = PetscNewLog(eps,&data);CHKERRQ(ierr);
-  eps->data = (void*)data;
-  ierr = PetscMemzero(&data->ddb,sizeof(dvdDashboard));CHKERRQ(ierr);
-
-  /* Set default values */
-  ierr = EPSXDSetKrylovStart_XD(eps,PETSC_FALSE);CHKERRQ(ierr);
-  ierr = EPSXDSetBlockSize_XD(eps,1);CHKERRQ(ierr);
-  ierr = EPSXDSetRestart_XD(eps,6,0);CHKERRQ(ierr);
-  ierr = EPSXDSetInitialSize_XD(eps,5);CHKERRQ(ierr);
-  ierr = EPSJDSetFix_JD(eps,0.01);CHKERRQ(ierr);
-  ierr = EPSXDSetBOrth_XD(eps,PETSC_TRUE);CHKERRQ(ierr);
-  ierr = EPSJDSetConstCorrectionTol_JD(eps,PETSC_TRUE);CHKERRQ(ierr);
-  ierr = EPSXDSetWindowSizes_XD(eps,0,0);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
+static PetscBool  cited = PETSC_FALSE;
+static const char citation[] =
+  "@Article{slepc-davidson,\n"
+  "   author = \"E. Romero and J. E. Roman\",\n"
+  "   title = \"A parallel implementation of {Davidson} methods for large-scale eigenvalue problems in {SLEPc}\",\n"
+  "   journal = \"{ACM} Trans. Math. Software\",\n"
+  "   volume = \"40\",\n"
+  "   number = \"2\",\n"
+  "   pages = \"13:1--13:29\",\n"
+  "   year = \"2014,\"\n"
+  "   doi = \"http://dx.doi.org/10.1145/2543696\"\n"
+  "}\n";
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetUp_XD"
@@ -239,7 +200,7 @@ PetscErrorCode EPSSetUp_XD(EPS eps)
 
   /* Preconfigure dvd */
   ierr = STGetKSP(eps->st,&ksp);CHKERRQ(ierr);
-  ierr = dvd_schm_basic_preconf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,ksp,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,data->scheme);CHKERRQ(ierr);
+  ierr = dvd_schm_basic_preconf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,ksp,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,data->doubleexp);CHKERRQ(ierr);
 
   /* Allocate memory */
   ierr = EPSAllocateSolution(eps,0);CHKERRQ(ierr);
@@ -253,7 +214,7 @@ PetscErrorCode EPSSetUp_XD(EPS eps)
   for (i=0;i<eps->ncv;i++) eps->perm[i] = i;
 
   /* Configure dvd for a basic GD */
-  ierr = dvd_schm_basic_conf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,dvd->withTarget,target,ksp,fix,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,dynamic,data->scheme);CHKERRQ(ierr);
+  ierr = dvd_schm_basic_conf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,dvd->withTarget,target,ksp,fix,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,dynamic,data->doubleexp);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -267,10 +228,12 @@ PetscErrorCode EPSSolve_XD(EPS eps)
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
+  ierr = PetscCitationsRegister(citation,&cited);CHKERRQ(ierr);
   /* Call the starting routines */
   ierr = EPSDavidsonFLCall(d->startList,d);CHKERRQ(ierr);
 
-  for (eps->its=0;eps->its<eps->max_it;eps->its++) {
+  while (eps->reason == EPS_CONVERGED_ITERATING) {
+
     /* Initialize V, if it is needed */
     ierr = BVGetActiveColumns(d->eps->V,&l,&k);CHKERRQ(ierr);
     if (l == k) { ierr = d->initV(d);CHKERRQ(ierr); }
@@ -279,22 +242,21 @@ PetscErrorCode EPSSolve_XD(EPS eps)
     ierr = d->calcPairs(d);CHKERRQ(ierr);
 
     /* Test for convergence */
-    if (eps->nconv >= eps->nev) break;
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
+    if (eps->reason != EPS_CONVERGED_ITERATING) break;
 
     /* Expand the subspace */
     ierr = d->updateV(d);CHKERRQ(ierr);
 
     /* Monitor progress */
     eps->nconv = d->nconv;
+    eps->its++;
     ierr = BVGetActiveColumns(d->eps->V,&l,&k);CHKERRQ(ierr);
-    ierr = EPSMonitor(eps,eps->its+1,eps->nconv,eps->eigr,eps->eigi,eps->errest,k);CHKERRQ(ierr);
+    ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,k);CHKERRQ(ierr);
   }
 
   /* Call the ending routines */
   ierr = EPSDavidsonFLCall(d->endList,d);CHKERRQ(ierr);
-
-  if (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-  else eps->reason = EPS_DIVERGED_ITS;
   PetscFunctionReturn(0);
 }
 
@@ -316,44 +278,6 @@ PetscErrorCode EPSReset_XD(EPS eps)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "EPSView_XD"
-PetscErrorCode EPSView_XD(EPS eps,PetscViewer viewer)
-{
-  PetscErrorCode ierr;
-  PetscBool      isascii,opb;
-  PetscInt       opi,opi0;
-  Method_t       meth;
-  PetscBool      borth;
-
-  PetscFunctionBegin;
-  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
-  if (isascii) {
-    ierr = EPSXDGetMethod_XD(eps,&meth);CHKERRQ(ierr);
-    if (meth==DVD_METH_GD2) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: using double expansion variant (GD2)\n");CHKERRQ(ierr);
-    }
-    ierr = EPSXDGetBOrth_XD(eps,&borth);CHKERRQ(ierr);
-    if (borth) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: search subspace is B-orthogonalized\n");CHKERRQ(ierr);
-    } else {
-      ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: search subspace is orthogonalized\n");CHKERRQ(ierr);
-    }
-    ierr = EPSXDGetBlockSize_XD(eps,&opi);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: block size=%D\n",opi);CHKERRQ(ierr);
-    ierr = EPSXDGetKrylovStart_XD(eps,&opb);CHKERRQ(ierr);
-    if (!opb) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: type of the initial subspace: non-Krylov\n");CHKERRQ(ierr);
-    } else {
-      ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: type of the initial subspace: Krylov\n");CHKERRQ(ierr);
-    }
-    ierr = EPSXDGetRestart_XD(eps,&opi,&opi0);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: size of the subspace after restarting: %D\n",opi);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  Davidson: number of vectors after restarting from the previous iteration: %D\n",opi0);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "EPSXDSetKrylovStart_XD"
 PetscErrorCode EPSXDSetKrylovStart_XD(EPS eps,PetscBool krylovstart)
 {
@@ -504,7 +428,7 @@ PetscErrorCode EPSJDSetConstCorrectionTol_JD(EPS eps,PetscBool constant)
   EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
   PetscFunctionBegin;
-  data->dynamic = (!constant)? PETSC_TRUE: PETSC_FALSE;
+  data->dynamic = PetscNot(constant);
   PetscFunctionReturn(0);
 }
 
@@ -515,7 +439,7 @@ PetscErrorCode EPSJDGetConstCorrectionTol_JD(EPS eps,PetscBool *constant)
   EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
   PetscFunctionBegin;
-  *constant = (!data->dynamic)? PETSC_TRUE: PETSC_FALSE;
+  *constant = PetscNot(data->dynamic);
   PetscFunctionReturn(0);
 }
 
@@ -548,28 +472,6 @@ PetscErrorCode EPSXDGetWindowSizes_XD(EPS eps,PetscInt *pwindow,PetscInt *qwindo
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "EPSXDSetMethod"
-PetscErrorCode EPSXDSetMethod(EPS eps,Method_t method)
-{
-  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-  PetscFunctionBegin;
-  data->scheme = method;
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "EPSXDGetMethod_XD"
-PetscErrorCode EPSXDGetMethod_XD(EPS eps,Method_t *method)
-{
-  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-  PetscFunctionBegin;
-  *method = data->scheme;
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "EPSComputeVectors_XD"
 /*
   EPSComputeVectors_XD - Compute eigenvectors from the vectors
@@ -586,10 +488,9 @@ PetscErrorCode EPSComputeVectors_XD(EPS eps)
   PetscBool      symm;
 
   PetscFunctionBegin;
-  ierr = PetscObjectTypeCompareAny((PetscObject)eps->ds,&symm,DSHEP,"");CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)eps->ds,DSHEP,&symm);CHKERRQ(ierr);
   if (symm) PetscFunctionReturn(0);
   ierr = DSVectors(eps->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
-  ierr = DSNormalize(eps->ds,DS_MAT_X,-1);CHKERRQ(ierr);
 
   /* V <- V * X */
   ierr = DSGetMat(eps->ds,DS_MAT_X,&X);CHKERRQ(ierr);
diff --git a/src/eps/impls/davidson/davidson.c.html b/src/eps/impls/davidson/davidson.c.html
index d90e261..1598c1a 100644
--- a/src/eps/impls/davidson/davidson.c.html
+++ b/src/eps/impls/davidson/davidson.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/davidson.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:01+00:00">
+<meta name="date" content="2016-05-16T10:32:56+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/davidson.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/davidson.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Skeleton of Davidson solver. Actual solvers are GD and JD.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,503 +35,418 @@
 
 <a name="line24"> 24: </a> #include <A href="davidson.h.html">davidson.h</A>
 
-<a name="line26"> 26: </a><strong><font color="#4169E1">PetscErrorCode EPSView_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>;
-
-<a name="line28"> 28: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line29"> 29: </a>  <font color="#B22222">/**** Solver options ****/</font>
-<a name="line30"> 30: </a>  PetscInt  blocksize;     <font color="#B22222">/* block size */</font>
-<a name="line31"> 31: </a>  PetscInt  initialsize;   <font color="#B22222">/* initial size of V */</font>
-<a name="line32"> 32: </a>  PetscInt  minv;          <font color="#B22222">/* size of V after restarting */</font>
-<a name="line33"> 33: </a>  PetscInt  plusk;         <font color="#B22222">/* keep plusk eigenvectors from the last iteration */</font>
-<a name="line34"> 34: </a>  PetscBool ipB;           <font color="#B22222">/* true if B-ortho is used */</font>
-<a name="line35"> 35: </a>  PetscInt  method;        <font color="#B22222">/* method for improving the approximate solution */</font>
-<a name="line36"> 36: </a>  PetscReal fix;           <font color="#B22222">/* the fix parameter */</font>
-<a name="line37"> 37: </a>  PetscBool krylovstart;   <font color="#B22222">/* true if the starting subspace is a Krylov basis */</font>
-<a name="line38"> 38: </a>  PetscBool dynamic;       <font color="#B22222">/* true if dynamic stopping criterion is used */</font>
-<a name="line39"> 39: </a>  PetscInt  cX_in_proj;    <font color="#B22222">/* converged vectors in the projected problem */</font>
-<a name="line40"> 40: </a>  PetscInt  cX_in_impr;    <font color="#B22222">/* converged vectors in the projector */</font>
-<a name="line41"> 41: </a>  Method_t  scheme;        <font color="#B22222">/* method employed: GD, JD or GD2 */</font>
-
-<a name="line43"> 43: </a>  <font color="#B22222">/**** Solver data ****/</font>
-<a name="line44"> 44: </a>  dvdDashboard ddb;
-<a name="line45"> 45: </a>} EPS_DAVIDSON;
-
-<a name="line49"> 49: </a><strong><font color="#4169E1"><a name="EPSCreate_XD"></a>PetscErrorCode EPSCreate_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line50"> 50: </a>{
-<a name="line52"> 52: </a>  EPS_DAVIDSON   *data;
-
-<a name="line55"> 55: </a>  eps->ops->solve          = EPSSolve_XD;
-<a name="line56"> 56: </a>  eps->ops->setup          = EPSSetUp_XD;
-<a name="line57"> 57: </a>  eps->ops->reset          = EPSReset_XD;
-<a name="line58"> 58: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
-<a name="line59"> 59: </a>  eps->ops->computevectors = EPSComputeVectors_XD;
-<a name="line60"> 60: </a>  eps->ops->view           = EPSView_XD;
-
-<a name="line62"> 62: </a>  PetscNewLog(eps,&data);
-<a name="line63"> 63: </a>  eps->data = (void*)data;
-<a name="line64"> 64: </a>  PetscMemzero(&data->ddb,<font color="#4169E1">sizeof</font>(dvdDashboard));
-
-<a name="line66"> 66: </a>  <font color="#B22222">/* Set default values */</font>
-<a name="line67"> 67: </a>  EPSXDSetKrylovStart_XD(eps,PETSC_FALSE);
-<a name="line68"> 68: </a>  EPSXDSetBlockSize_XD(eps,1);
-<a name="line69"> 69: </a>  EPSXDSetRestart_XD(eps,6,0);
-<a name="line70"> 70: </a>  EPSXDSetInitialSize_XD(eps,5);
-<a name="line71"> 71: </a>  EPSJDSetFix_JD(eps,0.01);
-<a name="line72"> 72: </a>  EPSXDSetBOrth_XD(eps,PETSC_TRUE);
-<a name="line73"> 73: </a>  EPSJDSetConstCorrectionTol_JD(eps,PETSC_TRUE);
-<a name="line74"> 74: </a>  EPSXDSetWindowSizes_XD(eps,0,0);
-<a name="line75"> 75: </a>  <font color="#4169E1">return</font>(0);
-<a name="line76"> 76: </a>}
-
-<a name="line80"> 80: </a><strong><font color="#4169E1"><a name="EPSSetUp_XD"></a>PetscErrorCode EPSSetUp_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line81"> 81: </a>{
-<a name="line83"> 83: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
-<a name="line84"> 84: </a>  dvdDashboard   *dvd = &data->ddb;
-<a name="line85"> 85: </a>  dvdBlackboard  b;
-<a name="line86"> 86: </a>  PetscInt       min_size_V,plusk,bs,initv,i,cX_in_proj,cX_in_impr,nmat;
-<a name="line87"> 87: </a>  Mat            A,B;
-<a name="line88"> 88: </a>  KSP            ksp;
-<a name="line89"> 89: </a>  PetscBool      t,ipB,ispositive,dynamic;
-<a name="line90"> 90: </a>  HarmType_t     harm;
-<a name="line91"> 91: </a>  InitType_t     init;
-<a name="line92"> 92: </a>  PetscReal      fix;
-<a name="line93"> 93: </a>  PetscScalar    target;
-
-<a name="line96"> 96: </a>  <font color="#B22222">/* Setup <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options and get the problem specification */</font>
-<a name="line97"> 97: </a>  EPSXDGetBlockSize_XD(eps,&bs);
-<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (bs <= 0) bs = 1;
-<a name="line99"> 99: </a>  <font color="#4169E1">if</font> (eps->ncv) {
-<a name="line100">100: </a>    <font color="#4169E1">if</font> (eps->ncv<eps->nev) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line101">101: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->mpd) eps->ncv = eps->mpd + eps->nev + bs;
-<a name="line102">102: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->nev<500) eps->ncv = PetscMin(eps->n-bs,PetscMax(2*eps->nev,eps->nev+15))+bs;
-<a name="line103">103: </a>  <font color="#4169E1">else</font> eps->ncv = PetscMin(eps->n-bs,eps->nev+500)+bs;
-<a name="line104">104: </a>  <font color="#4169E1">if</font> (!eps->mpd) eps->mpd = eps->ncv;
-<a name="line105">105: </a>  <font color="#4169E1">if</font> (eps->mpd > eps->ncv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The mpd has to be less or equal than ncv"</font>);
-<a name="line106">106: </a>  <font color="#4169E1">if</font> (eps->mpd < 2) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The mpd has to be greater than 2"</font>);
-<a name="line107">107: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = PetscMax(100*eps->ncv,2*eps->n);
-<a name="line108">108: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_LARGEST_MAGNITUDE;
-<a name="line109">109: </a>  <font color="#4169E1">if</font> (eps->ishermitian && (eps->which==EPS_LARGEST_IMAGINARY || eps->which==EPS_SMALLEST_IMAGINARY)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Wrong value of eps->which"</font>);
-<a name="line110">110: </a>  <font color="#4169E1">if</font> (!(eps->nev + bs <= eps->ncv)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The ncv has to be greater than nev plus blocksize"</font>);
-<a name="line111">111: </a>  <font color="#4169E1">if</font> (eps->trueres) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"-eps_true_residual is temporally disable in this solver."</font>);
-
-<a name="line113">113: </a>  EPSXDGetRestart_XD(eps,&min_size_V,&plusk);
-<a name="line114">114: </a>  <font color="#4169E1">if</font> (!min_size_V) min_size_V = PetscMin(PetscMax(bs,5),eps->mpd/2);
-<a name="line115">115: </a>  <font color="#4169E1">if</font> (!(min_size_V+bs <= eps->mpd)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The value of minv must be less than mpd minus blocksize"</font>);
-<a name="line116">116: </a>  EPSXDGetInitialSize_XD(eps,&initv);
-<a name="line117">117: </a>  <font color="#4169E1">if</font> (eps->mpd < initv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The initv has to be less or equal than mpd"</font>);
-
-<a name="line119">119: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line120">120: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
-<a name="line121">121: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
-<a name="line122">122: </a>  }
-<a name="line123">123: </a>  <a href="../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_FALSE);
-
-<a name="line125">125: </a>  <font color="#B22222">/* Change the default sigma to inf if necessary */</font>
-<a name="line126">126: </a>  <font color="#4169E1">if</font> (eps->which == EPS_LARGEST_MAGNITUDE || eps->which == EPS_LARGEST_REAL || eps->which == EPS_LARGEST_IMAGINARY) {
-<a name="line127">127: </a>    <a href="../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(eps->st,PETSC_MAX_REAL);
-<a name="line128">128: </a>  }
-
-<a name="line130">130: </a>  <font color="#B22222">/* Davidson solvers only support STPRECOND */</font>
-<a name="line131">131: </a>  <a href="../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
-<a name="line132">132: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&t);
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (!t) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"%s only works with precond spectral transformation"</font>,((PetscObject)eps)->type_name);
-
-<a name="line135">135: </a>  <font color="#B22222">/* Setup problem specification in dvd */</font>
-<a name="line136">136: </a>  <a href="../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line137">137: </a>  <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line138">138: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
-<a name="line139">139: </a>  EPSReset_XD(eps);
-<a name="line140">140: </a>  PetscMemzero(dvd,<font color="#4169E1">sizeof</font>(dvdDashboard));
-<a name="line141">141: </a>  dvd->A = A; dvd->B = eps->isgeneralized? B: NULL;
-<a name="line142">142: </a>  ispositive = eps->ispositive;
-<a name="line143">143: </a>  dvd->sA = DVD_MAT_IMPLICIT | (eps->ishermitian? DVD_MAT_HERMITIAN: 0) | ((ispositive && !eps->isgeneralized) ? DVD_MAT_POS_DEF: 0);
-<a name="line144">144: </a>  <font color="#B22222">/* Asume -eps_hermitian means hermitian-definite in generalized problems */</font>
-<a name="line145">145: </a>  <font color="#4169E1">if</font> (!ispositive && !eps->isgeneralized && eps->ishermitian) ispositive = PETSC_TRUE;
-<a name="line146">146: </a>  <font color="#4169E1">if</font> (!eps->isgeneralized) dvd->sB = DVD_MAT_IMPLICIT | DVD_MAT_HERMITIAN | DVD_MAT_IDENTITY | DVD_MAT_UNITARY | DVD_MAT_POS_DEF;
-<a name="line147">147: </a>  <font color="#4169E1">else</font> dvd->sB = DVD_MAT_IMPLICIT | (eps->ishermitian? DVD_MAT_HERMITIAN: 0) | (ispositive? DVD_MAT_POS_DEF: 0);
-<a name="line148">148: </a>  ipB = (dvd->B && data->ipB && DVD_IS(dvd->sB,DVD_MAT_HERMITIAN))?PETSC_TRUE:PETSC_FALSE;
-<a name="line149">149: </a>  <font color="#4169E1">if</font> (data->ipB && !ipB) data->ipB = PETSC_FALSE;
-<a name="line150">150: </a>  dvd->correctXnorm = ipB;
-<a name="line151">151: </a>  dvd->sEP = ((!eps->isgeneralized || (eps->isgeneralized && ipB))? DVD_EP_STD: 0) | (ispositive? DVD_EP_HERMITIAN: 0) | ((eps->problem_type == EPS_GHIEP && ipB) ? DVD_EP_INDEFINITE : 0);
-<a name="line152">152: </a>  dvd->nev        = eps->nev;
-<a name="line153">153: </a>  dvd->which      = eps->which;
-<a name="line154">154: </a>  dvd->withTarget = PETSC_TRUE;
-<a name="line155">155: </a>  <font color="#4169E1">switch</font> (eps->which) {
-<a name="line156">156: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line157">157: </a>    <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
-<a name="line158">158: </a>      dvd->target[0] = target = eps->target;
-<a name="line159">159: </a>      dvd->target[1] = 1.0;
-<a name="line160">160: </a>      <font color="#4169E1">break</font>;
-<a name="line161">161: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line162">162: </a>      dvd->target[0] = PetscRealPart(target = eps->target);
-<a name="line163">163: </a>      dvd->target[1] = 1.0;
-<a name="line164">164: </a>      <font color="#4169E1">break</font>;
-<a name="line165">165: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
-<a name="line166">166: </a>    <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
-<a name="line167">167: </a>    <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY: <font color="#B22222">/* TODO: think about this case */</font>
-<a name="line168">168: </a>      dvd->target[0] = 1.0;
-<a name="line169">169: </a>      dvd->target[1] = target = 0.0;
-<a name="line170">170: </a>      <font color="#4169E1">break</font>;
-<a name="line171">171: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
-<a name="line172">172: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
-<a name="line173">173: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY: <font color="#B22222">/* TODO: think about this case */</font>
-<a name="line174">174: </a>      dvd->target[0] = target = 0.0;
-<a name="line175">175: </a>      dvd->target[1] = 1.0;
-<a name="line176">176: </a>      <font color="#4169E1">break</font>;
-<a name="line177">177: </a>    <font color="#4169E1">case</font> EPS_WHICH_USER:
-<a name="line178">178: </a>      <a href="../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&target);
-<a name="line179">179: </a>      dvd->target[0] = target;
-<a name="line180">180: </a>      dvd->target[1] = 1.0;
-<a name="line181">181: </a>      <font color="#4169E1">break</font>;
-<a name="line182">182: </a>    <font color="#4169E1">case</font> EPS_ALL:
-<a name="line183">183: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported option: which == EPS_ALL"</font>);
-<a name="line184">184: </a>      <font color="#4169E1">break</font>;
-<a name="line185">185: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line186">186: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported value of option 'which'"</font>);
-<a name="line187">187: </a>  }
-<a name="line188">188: </a>  dvd->tol = (eps->tol==PETSC_DEFAULT)? SLEPC_DEFAULT_TOL: eps->tol;
-<a name="line189">189: </a>  dvd->eps = eps;
-
-<a name="line191">191: </a>  <font color="#B22222">/* Setup the extraction technique */</font>
-<a name="line192">192: </a>  <font color="#4169E1">if</font> (!eps->extraction) {
-<a name="line193">193: </a>    <font color="#4169E1">if</font> (ipB || ispositive) eps->extraction = EPS_RITZ;
-<a name="line194">194: </a>    <font color="#4169E1">else</font> {
-<a name="line195">195: </a>      <font color="#4169E1">switch</font> (eps->which) {
-<a name="line196">196: </a>        <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line197">197: </a>        <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line198">198: </a>        <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
-<a name="line199">199: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
-<a name="line200">200: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
-<a name="line201">201: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
-<a name="line202">202: </a>          eps->extraction = EPS_HARMONIC;
-<a name="line203">203: </a>          <font color="#4169E1">break</font>;
-<a name="line204">204: </a>        <font color="#4169E1">case</font> EPS_LARGEST_REAL:
-<a name="line205">205: </a>        <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
-<a name="line206">206: </a>        <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
-<a name="line207">207: </a>          eps->extraction = EPS_HARMONIC_LARGEST;
-<a name="line208">208: </a>          <font color="#4169E1">break</font>;
-<a name="line209">209: </a><strong><font color="#FF0000">        default:</font></strong>
-<a name="line210">210: </a>          eps->extraction = EPS_RITZ;
-<a name="line211">211: </a>      }
-<a name="line212">212: </a>    }
-<a name="line213">213: </a>  }
-<a name="line214">214: </a>  <font color="#4169E1">switch</font> (eps->extraction) {
-<a name="line215">215: </a>    <font color="#4169E1">case</font> EPS_RITZ:              harm = DVD_HARM_NONE; <font color="#4169E1">break</font>;
-<a name="line216">216: </a>    <font color="#4169E1">case</font> EPS_HARMONIC:          harm = DVD_HARM_RR; <font color="#4169E1">break</font>;
-<a name="line217">217: </a>    <font color="#4169E1">case</font> EPS_HARMONIC_RELATIVE: harm = DVD_HARM_RRR; <font color="#4169E1">break</font>;
-<a name="line218">218: </a>    <font color="#4169E1">case</font> EPS_HARMONIC_RIGHT:    harm = DVD_HARM_REIGS; <font color="#4169E1">break</font>;
-<a name="line219">219: </a>    <font color="#4169E1">case</font> EPS_HARMONIC_LARGEST:  harm = DVD_HARM_LEIGS; <font color="#4169E1">break</font>;
-<a name="line220">220: </a><strong><font color="#FF0000">    default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
-<a name="line221">221: </a>  }
-
-<a name="line223">223: </a>  <font color="#B22222">/* Setup the type of starting subspace */</font>
-<a name="line224">224: </a>  EPSXDGetKrylovStart_XD(eps,&t);
-<a name="line225">225: </a>  init = (!t)? DVD_INITV_CLASSIC : DVD_INITV_KRYLOV;
-
-<a name="line227">227: </a>  <font color="#B22222">/* Setup the presence of converged vectors in the projected problem and the projector */</font>
-<a name="line228">228: </a>  EPSXDGetWindowSizes_XD(eps,&cX_in_impr,&cX_in_proj);
-<a name="line229">229: </a>  <font color="#4169E1">if</font> (cX_in_impr>0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The option pwindow is temporally disable in this solver."</font>);
-<a name="line230">230: </a>  <font color="#4169E1">if</font> (cX_in_proj>0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The option qwindow is temporally disable in this solver."</font>);
-<a name="line231">231: </a>  <font color="#4169E1">if</font> (min_size_V <= cX_in_proj) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"minv has to be greater than qwindow"</font>);
-<a name="line232">232: </a>  <font color="#4169E1">if</font> (bs > 1 && cX_in_impr > 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported option: pwindow > 0 and bs > 1"</font>);
-
-<a name="line234">234: </a>  <font color="#B22222">/* Get the fix parameter */</font>
-<a name="line235">235: </a>  EPSXDGetFix_XD(eps,&fix);
-
-<a name="line237">237: </a>  <font color="#B22222">/* Get whether the stopping criterion is used */</font>
-<a name="line238">238: </a>  EPSJDGetConstCorrectionTol_JD(eps,&dynamic);
-
-<a name="line240">240: </a>  <font color="#B22222">/* Preconfigure dvd */</font>
-<a name="line241">241: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line242">242: </a>  dvd_schm_basic_preconf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,ksp,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,data->scheme);
-
-<a name="line244">244: </a>  <font color="#B22222">/* Allocate memory */</font>
-<a name="line245">245: </a>  <a href="../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-
-<a name="line247">247: </a>  <font color="#B22222">/* Setup orthogonalization */</font>
-<a name="line248">248: </a>  EPS_SetInnerProduct(eps);
-<a name="line249">249: </a>  <font color="#4169E1">if</font> (!(ipB && dvd->B)) {
-<a name="line250">250: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(eps->V,NULL,PETSC_FALSE);
-<a name="line251">251: </a>  }
-
-<a name="line253">253: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) eps->perm[i] = i;
-
-<a name="line255">255: </a>  <font color="#B22222">/* Configure dvd for a basic GD */</font>
-<a name="line256">256: </a>  dvd_schm_basic_conf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,dvd->withTarget,target,ksp,fix,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,dynamic,data->scheme);
-<a name="line257">257: </a>  <font color="#4169E1">return</font>(0);
-<a name="line258">258: </a>}
-
-<a name="line262">262: </a><strong><font color="#4169E1"><a name="EPSSolve_XD"></a>PetscErrorCode EPSSolve_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line263">263: </a>{
-<a name="line264">264: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
-<a name="line265">265: </a>  dvdDashboard   *d = &data->ddb;
-<a name="line266">266: </a>  PetscInt       l,k;
-
-<a name="line270">270: </a>  <font color="#B22222">/* Call the starting routines */</font>
-<a name="line271">271: </a>  EPSDavidsonFLCall(d->startList,d);
-
-<a name="line273">273: </a>  <font color="#4169E1">for</font> (eps->its=0;eps->its<eps->max_it;eps->its++) {
-<a name="line274">274: </a>    <font color="#B22222">/* Initialize V, if it is needed */</font>
-<a name="line275">275: </a>    <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
-<a name="line276">276: </a>    <font color="#4169E1">if</font> (l == k) { d->initV(d); }
-
-<a name="line278">278: </a>    <font color="#B22222">/* Find the best approximated eigenpairs in V, X */</font>
-<a name="line279">279: </a>    d->calcPairs(d);
-
-<a name="line281">281: </a>    <font color="#B22222">/* Test for convergence */</font>
-<a name="line282">282: </a>    <font color="#4169E1">if</font> (eps->nconv >= eps->nev) <font color="#4169E1">break</font>;
-
-<a name="line284">284: </a>    <font color="#B22222">/* Expand the subspace */</font>
-<a name="line285">285: </a>    d->updateV(d);
-
-<a name="line287">287: </a>    <font color="#B22222">/* Monitor progress */</font>
-<a name="line288">288: </a>    eps->nconv = d->nconv;
-<a name="line289">289: </a>    <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
-<a name="line290">290: </a>    EPSMonitor(eps,eps->its+1,eps->nconv,eps->eigr,eps->eigi,eps->errest,k);
-<a name="line291">291: </a>  }
-
-<a name="line293">293: </a>  <font color="#B22222">/* Call the ending routines */</font>
-<a name="line294">294: </a>  EPSDavidsonFLCall(d->endList,d);
-
-<a name="line296">296: </a>  <font color="#4169E1">if</font> (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line297">297: </a>  <font color="#4169E1">else</font> eps->reason = EPS_DIVERGED_ITS;
-<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
-<a name="line299">299: </a>}
-
-<a name="line303">303: </a><strong><font color="#4169E1"><a name="EPSReset_XD"></a>PetscErrorCode EPSReset_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line304">304: </a>{
-<a name="line305">305: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
-<a name="line306">306: </a>  dvdDashboard   *dvd = &data->ddb;
-
-<a name="line310">310: </a>  <font color="#B22222">/* Call step destructors and destroys the list */</font>
-<a name="line311">311: </a>  EPSDavidsonFLCall(dvd->destroyList,dvd);
-<a name="line312">312: </a>  EPSDavidsonFLDestroy(&dvd->destroyList);
-<a name="line313">313: </a>  EPSDavidsonFLDestroy(&dvd->startList);
-<a name="line314">314: </a>  EPSDavidsonFLDestroy(&dvd->endList);
-<a name="line315">315: </a>  <font color="#4169E1">return</font>(0);
-<a name="line316">316: </a>}
-
-<a name="line320">320: </a><strong><font color="#4169E1"><a name="EPSView_XD"></a>PetscErrorCode EPSView_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line321">321: </a>{
-<a name="line323">323: </a>  PetscBool      isascii,opb;
-<a name="line324">324: </a>  PetscInt       opi,opi0;
-<a name="line325">325: </a>  Method_t       meth;
-<a name="line326">326: </a>  PetscBool      borth;
-
-<a name="line329">329: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line330">330: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line331">331: </a>    EPSXDGetMethod_XD(eps,&meth);
-<a name="line332">332: </a>    <font color="#4169E1">if</font> (meth==DVD_METH_GD2) {
-<a name="line333">333: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: using double expansion variant (GD2)\n"</font>);
-<a name="line334">334: </a>    }
-<a name="line335">335: </a>    EPSXDGetBOrth_XD(eps,&borth);
-<a name="line336">336: </a>    <font color="#4169E1">if</font> (borth) {
-<a name="line337">337: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: search subspace is B-orthogonalized\n"</font>);
-<a name="line338">338: </a>    } <font color="#4169E1">else</font> {
-<a name="line339">339: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: search subspace is orthogonalized\n"</font>);
-<a name="line340">340: </a>    }
-<a name="line341">341: </a>    EPSXDGetBlockSize_XD(eps,&opi);
-<a name="line342">342: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: block size=%D\n"</font>,opi);
-<a name="line343">343: </a>    EPSXDGetKrylovStart_XD(eps,&opb);
-<a name="line344">344: </a>    <font color="#4169E1">if</font> (!opb) {
-<a name="line345">345: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: type of the initial subspace: non-Krylov\n"</font>);
-<a name="line346">346: </a>    } <font color="#4169E1">else</font> {
-<a name="line347">347: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: type of the initial subspace: Krylov\n"</font>);
-<a name="line348">348: </a>    }
-<a name="line349">349: </a>    EPSXDGetRestart_XD(eps,&opi,&opi0);
-<a name="line350">350: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: size of the subspace after restarting: %D\n"</font>,opi);
-<a name="line351">351: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Davidson: number of vectors after restarting from the previous iteration: %D\n"</font>,opi0);
-<a name="line352">352: </a>  }
-<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
-<a name="line354">354: </a>}
-
-<a name="line358">358: </a><strong><font color="#4169E1"><a name="EPSXDSetKrylovStart_XD"></a>PetscErrorCode EPSXDSetKrylovStart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool krylovstart)</font></strong>
-<a name="line359">359: </a>{
-<a name="line360">360: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line363">363: </a>  data->krylovstart = krylovstart;
-<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
-<a name="line365">365: </a>}
-
-<a name="line369">369: </a><strong><font color="#4169E1"><a name="EPSXDGetKrylovStart_XD"></a>PetscErrorCode EPSXDGetKrylovStart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *krylovstart)</font></strong>
-<a name="line370">370: </a>{
-<a name="line371">371: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line374">374: </a>  *krylovstart = data->krylovstart;
+<a name="line26"> 26: </a>static PetscBool  cited = PETSC_FALSE;
+<a name="line27"> 27: </a>static const char citation[] =
+<a name="line28"> 28: </a>  <font color="#666666">"@Article{slepc-davidson,\n"</font>
+<a name="line29"> 29: </a>  <font color="#666666">"   author = \"E. Romero and J. E. Roman\",\n"</font>
+<a name="line30"> 30: </a>  <font color="#666666">"   title = \"A parallel implementation of {Davidson} methods for large-scale eigenvalue problems in {SLEPc}\",\n"</font>
+<a name="line31"> 31: </a>  <font color="#666666">"   journal = \"{ACM} Trans. Math. Software\",\n"</font>
+<a name="line32"> 32: </a>  <font color="#666666">"   volume = \"40\",\n"</font>
+<a name="line33"> 33: </a>  <font color="#666666">"   number = \"2\",\n"</font>
+<a name="line34"> 34: </a>  <font color="#666666">"   pages = \"13:1--13:29\",\n"</font>
+<a name="line35"> 35: </a>  <font color="#666666">"   year = \"2014,\"\n"</font>
+<a name="line36"> 36: </a>  <font color="#666666">"   doi = \"http://dx.doi.org/10.1145/2543696\"\n"</font>
+<a name="line37"> 37: </a>  <font color="#666666">"}\n"</font>;
+
+<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="EPSSetUp_XD"></a>PetscErrorCode EPSSetUp_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line42"> 42: </a>{
+<a name="line44"> 44: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
+<a name="line45"> 45: </a>  dvdDashboard   *dvd = &data->ddb;
+<a name="line46"> 46: </a>  dvdBlackboard  b;
+<a name="line47"> 47: </a>  PetscInt       min_size_V,plusk,bs,initv,i,cX_in_proj,cX_in_impr,nmat;
+<a name="line48"> 48: </a>  Mat            A,B;
+<a name="line49"> 49: </a>  KSP            ksp;
+<a name="line50"> 50: </a>  PetscBool      t,ipB,ispositive,dynamic;
+<a name="line51"> 51: </a>  HarmType_t     harm;
+<a name="line52"> 52: </a>  InitType_t     init;
+<a name="line53"> 53: </a>  PetscReal      fix;
+<a name="line54"> 54: </a>  PetscScalar    target;
+
+<a name="line57"> 57: </a>  <font color="#B22222">/* Setup <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options and get the problem specification */</font>
+<a name="line58"> 58: </a>  EPSXDGetBlockSize_XD(eps,&bs);
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (bs <= 0) bs = 1;
+<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (eps->ncv) {
+<a name="line61"> 61: </a>    <font color="#4169E1">if</font> (eps->ncv<eps->nev) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The value of ncv must be at least nev"</font>);
+<a name="line62"> 62: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->mpd) eps->ncv = eps->mpd + eps->nev + bs;
+<a name="line63"> 63: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->nev<500) eps->ncv = PetscMin(eps->n-bs,PetscMax(2*eps->nev,eps->nev+15))+bs;
+<a name="line64"> 64: </a>  <font color="#4169E1">else</font> eps->ncv = PetscMin(eps->n-bs,eps->nev+500)+bs;
+<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (!eps->mpd) eps->mpd = eps->ncv;
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (eps->mpd > eps->ncv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The mpd has to be less or equal than ncv"</font>);
+<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (eps->mpd < 2) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The mpd has to be greater than 2"</font>);
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = PetscMax(100*eps->ncv,2*eps->n);
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_LARGEST_MAGNITUDE;
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (eps->ishermitian && (eps->which==EPS_LARGEST_IMAGINARY || eps->which==EPS_SMALLEST_IMAGINARY)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Wrong value of eps->which"</font>);
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (!(eps->nev + bs <= eps->ncv)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The ncv has to be greater than nev plus blocksize"</font>);
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (eps->trueres) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"-eps_true_residual is temporally disable in this solver."</font>);
+
+<a name="line74"> 74: </a>  EPSXDGetRestart_XD(eps,&min_size_V,&plusk);
+<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (!min_size_V) min_size_V = PetscMin(PetscMax(bs,5),eps->mpd/2);
+<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (!(min_size_V+bs <= eps->mpd)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The value of minv must be less than mpd minus blocksize"</font>);
+<a name="line77"> 77: </a>  EPSXDGetInitialSize_XD(eps,&initv);
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (eps->mpd < initv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The initv has to be less or equal than mpd"</font>);
+
+<a name="line80"> 80: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line81"> 81: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
+<a name="line82"> 82: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
+<a name="line83"> 83: </a>  }
+<a name="line84"> 84: </a>  <a href="../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_FALSE);
+
+<a name="line86"> 86: </a>  <font color="#B22222">/* Change the default sigma to inf if necessary */</font>
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (eps->which == EPS_LARGEST_MAGNITUDE || eps->which == EPS_LARGEST_REAL || eps->which == EPS_LARGEST_IMAGINARY) {
+<a name="line88"> 88: </a>    <a href="../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(eps->st,PETSC_MAX_REAL);
+<a name="line89"> 89: </a>  }
+
+<a name="line91"> 91: </a>  <font color="#B22222">/* Davidson solvers only support STPRECOND */</font>
+<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
+<a name="line93"> 93: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&t);
+<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (!t) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"%s only works with precond spectral transformation"</font>,((PetscObject)eps)->type_name);
+
+<a name="line96"> 96: </a>  <font color="#B22222">/* Setup problem specification in dvd */</font>
+<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line99"> 99: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
+<a name="line100">100: </a>  EPSReset_XD(eps);
+<a name="line101">101: </a>  PetscMemzero(dvd,<font color="#4169E1">sizeof</font>(dvdDashboard));
+<a name="line102">102: </a>  dvd->A = A; dvd->B = eps->isgeneralized? B: NULL;
+<a name="line103">103: </a>  ispositive = eps->ispositive;
+<a name="line104">104: </a>  dvd->sA = DVD_MAT_IMPLICIT | (eps->ishermitian? DVD_MAT_HERMITIAN: 0) | ((ispositive && !eps->isgeneralized) ? DVD_MAT_POS_DEF: 0);
+<a name="line105">105: </a>  <font color="#B22222">/* Asume -eps_hermitian means hermitian-definite in generalized problems */</font>
+<a name="line106">106: </a>  <font color="#4169E1">if</font> (!ispositive && !eps->isgeneralized && eps->ishermitian) ispositive = PETSC_TRUE;
+<a name="line107">107: </a>  <font color="#4169E1">if</font> (!eps->isgeneralized) dvd->sB = DVD_MAT_IMPLICIT | DVD_MAT_HERMITIAN | DVD_MAT_IDENTITY | DVD_MAT_UNITARY | DVD_MAT_POS_DEF;
+<a name="line108">108: </a>  <font color="#4169E1">else</font> dvd->sB = DVD_MAT_IMPLICIT | (eps->ishermitian? DVD_MAT_HERMITIAN: 0) | (ispositive? DVD_MAT_POS_DEF: 0);
+<a name="line109">109: </a>  ipB = (dvd->B && data->ipB && DVD_IS(dvd->sB,DVD_MAT_HERMITIAN))?PETSC_TRUE:PETSC_FALSE;
+<a name="line110">110: </a>  <font color="#4169E1">if</font> (data->ipB && !ipB) data->ipB = PETSC_FALSE;
+<a name="line111">111: </a>  dvd->correctXnorm = ipB;
+<a name="line112">112: </a>  dvd->sEP = ((!eps->isgeneralized || (eps->isgeneralized && ipB))? DVD_EP_STD: 0) | (ispositive? DVD_EP_HERMITIAN: 0) | ((eps->problem_type == EPS_GHIEP && ipB) ? DVD_EP_INDEFINITE : 0);
+<a name="line113">113: </a>  dvd->nev        = eps->nev;
+<a name="line114">114: </a>  dvd->which      = eps->which;
+<a name="line115">115: </a>  dvd->withTarget = PETSC_TRUE;
+<a name="line116">116: </a>  <font color="#4169E1">switch</font> (eps->which) {
+<a name="line117">117: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line118">118: </a>    <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
+<a name="line119">119: </a>      dvd->target[0] = target = eps->target;
+<a name="line120">120: </a>      dvd->target[1] = 1.0;
+<a name="line121">121: </a>      <font color="#4169E1">break</font>;
+<a name="line122">122: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line123">123: </a>      dvd->target[0] = PetscRealPart(target = eps->target);
+<a name="line124">124: </a>      dvd->target[1] = 1.0;
+<a name="line125">125: </a>      <font color="#4169E1">break</font>;
+<a name="line126">126: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
+<a name="line127">127: </a>    <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
+<a name="line128">128: </a>    <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY: <font color="#B22222">/* TODO: think about this case */</font>
+<a name="line129">129: </a>      dvd->target[0] = 1.0;
+<a name="line130">130: </a>      dvd->target[1] = target = 0.0;
+<a name="line131">131: </a>      <font color="#4169E1">break</font>;
+<a name="line132">132: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
+<a name="line133">133: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
+<a name="line134">134: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY: <font color="#B22222">/* TODO: think about this case */</font>
+<a name="line135">135: </a>      dvd->target[0] = target = 0.0;
+<a name="line136">136: </a>      dvd->target[1] = 1.0;
+<a name="line137">137: </a>      <font color="#4169E1">break</font>;
+<a name="line138">138: </a>    <font color="#4169E1">case</font> EPS_WHICH_USER:
+<a name="line139">139: </a>      <a href="../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&target);
+<a name="line140">140: </a>      dvd->target[0] = target;
+<a name="line141">141: </a>      dvd->target[1] = 1.0;
+<a name="line142">142: </a>      <font color="#4169E1">break</font>;
+<a name="line143">143: </a>    <font color="#4169E1">case</font> EPS_ALL:
+<a name="line144">144: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported option: which == EPS_ALL"</font>);
+<a name="line145">145: </a>      <font color="#4169E1">break</font>;
+<a name="line146">146: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line147">147: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported value of option 'which'"</font>);
+<a name="line148">148: </a>  }
+<a name="line149">149: </a>  dvd->tol = (eps->tol==PETSC_DEFAULT)? SLEPC_DEFAULT_TOL: eps->tol;
+<a name="line150">150: </a>  dvd->eps = eps;
+
+<a name="line152">152: </a>  <font color="#B22222">/* Setup the extraction technique */</font>
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (!eps->extraction) {
+<a name="line154">154: </a>    <font color="#4169E1">if</font> (ipB || ispositive) eps->extraction = EPS_RITZ;
+<a name="line155">155: </a>    <font color="#4169E1">else</font> {
+<a name="line156">156: </a>      <font color="#4169E1">switch</font> (eps->which) {
+<a name="line157">157: </a>        <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line158">158: </a>        <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line159">159: </a>        <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
+<a name="line160">160: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
+<a name="line161">161: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
+<a name="line162">162: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
+<a name="line163">163: </a>          eps->extraction = EPS_HARMONIC;
+<a name="line164">164: </a>          <font color="#4169E1">break</font>;
+<a name="line165">165: </a>        <font color="#4169E1">case</font> EPS_LARGEST_REAL:
+<a name="line166">166: </a>        <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
+<a name="line167">167: </a>        <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
+<a name="line168">168: </a>          eps->extraction = EPS_HARMONIC_LARGEST;
+<a name="line169">169: </a>          <font color="#4169E1">break</font>;
+<a name="line170">170: </a><strong><font color="#FF0000">        default:</font></strong>
+<a name="line171">171: </a>          eps->extraction = EPS_RITZ;
+<a name="line172">172: </a>      }
+<a name="line173">173: </a>    }
+<a name="line174">174: </a>  }
+<a name="line175">175: </a>  <font color="#4169E1">switch</font> (eps->extraction) {
+<a name="line176">176: </a>    <font color="#4169E1">case</font> EPS_RITZ:              harm = DVD_HARM_NONE; <font color="#4169E1">break</font>;
+<a name="line177">177: </a>    <font color="#4169E1">case</font> EPS_HARMONIC:          harm = DVD_HARM_RR; <font color="#4169E1">break</font>;
+<a name="line178">178: </a>    <font color="#4169E1">case</font> EPS_HARMONIC_RELATIVE: harm = DVD_HARM_RRR; <font color="#4169E1">break</font>;
+<a name="line179">179: </a>    <font color="#4169E1">case</font> EPS_HARMONIC_RIGHT:    harm = DVD_HARM_REIGS; <font color="#4169E1">break</font>;
+<a name="line180">180: </a>    <font color="#4169E1">case</font> EPS_HARMONIC_LARGEST:  harm = DVD_HARM_LEIGS; <font color="#4169E1">break</font>;
+<a name="line181">181: </a><strong><font color="#FF0000">    default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
+<a name="line182">182: </a>  }
+
+<a name="line184">184: </a>  <font color="#B22222">/* Setup the type of starting subspace */</font>
+<a name="line185">185: </a>  EPSXDGetKrylovStart_XD(eps,&t);
+<a name="line186">186: </a>  init = (!t)? DVD_INITV_CLASSIC : DVD_INITV_KRYLOV;
+
+<a name="line188">188: </a>  <font color="#B22222">/* Setup the presence of converged vectors in the projected problem and the projector */</font>
+<a name="line189">189: </a>  EPSXDGetWindowSizes_XD(eps,&cX_in_impr,&cX_in_proj);
+<a name="line190">190: </a>  <font color="#4169E1">if</font> (cX_in_impr>0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The option pwindow is temporally disable in this solver."</font>);
+<a name="line191">191: </a>  <font color="#4169E1">if</font> (cX_in_proj>0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"The option qwindow is temporally disable in this solver."</font>);
+<a name="line192">192: </a>  <font color="#4169E1">if</font> (min_size_V <= cX_in_proj) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"minv has to be greater than qwindow"</font>);
+<a name="line193">193: </a>  <font color="#4169E1">if</font> (bs > 1 && cX_in_impr > 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported option: pwindow > 0 and bs > 1"</font>);
+
+<a name="line195">195: </a>  <font color="#B22222">/* Get the fix parameter */</font>
+<a name="line196">196: </a>  EPSXDGetFix_XD(eps,&fix);
+
+<a name="line198">198: </a>  <font color="#B22222">/* Get whether the stopping criterion is used */</font>
+<a name="line199">199: </a>  EPSJDGetConstCorrectionTol_JD(eps,&dynamic);
+
+<a name="line201">201: </a>  <font color="#B22222">/* Preconfigure dvd */</font>
+<a name="line202">202: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line203">203: </a>  dvd_schm_basic_preconf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,ksp,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,data->doubleexp);
+
+<a name="line205">205: </a>  <font color="#B22222">/* Allocate memory */</font>
+<a name="line206">206: </a>  <a href="../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+
+<a name="line208">208: </a>  <font color="#B22222">/* Setup orthogonalization */</font>
+<a name="line209">209: </a>  EPS_SetInnerProduct(eps);
+<a name="line210">210: </a>  <font color="#4169E1">if</font> (!(ipB && dvd->B)) {
+<a name="line211">211: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(eps->V,NULL,PETSC_FALSE);
+<a name="line212">212: </a>  }
+
+<a name="line214">214: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) eps->perm[i] = i;
+
+<a name="line216">216: </a>  <font color="#B22222">/* Configure dvd for a basic GD */</font>
+<a name="line217">217: </a>  dvd_schm_basic_conf(dvd,&b,eps->mpd,min_size_V,bs,initv,PetscAbs(eps->nini),plusk,harm,dvd->withTarget,target,ksp,fix,init,eps->trackall,data->ipB,cX_in_proj,cX_in_impr,dynamic,data->doubleexp);
+<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
+<a name="line219">219: </a>}
+
+<a name="line223">223: </a><strong><font color="#4169E1"><a name="EPSSolve_XD"></a>PetscErrorCode EPSSolve_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line224">224: </a>{
+<a name="line225">225: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
+<a name="line226">226: </a>  dvdDashboard   *d = &data->ddb;
+<a name="line227">227: </a>  PetscInt       l,k;
+
+<a name="line231">231: </a>  PetscCitationsRegister(citation,&cited);
+<a name="line232">232: </a>  <font color="#B22222">/* Call the starting routines */</font>
+<a name="line233">233: </a>  EPSDavidsonFLCall(d->startList,d);
+
+<a name="line235">235: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+
+<a name="line237">237: </a>    <font color="#B22222">/* Initialize V, if it is needed */</font>
+<a name="line238">238: </a>    <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
+<a name="line239">239: </a>    <font color="#4169E1">if</font> (l == k) { d->initV(d); }
+
+<a name="line241">241: </a>    <font color="#B22222">/* Find the best approximated eigenpairs in V, X */</font>
+<a name="line242">242: </a>    d->calcPairs(d);
+
+<a name="line244">244: </a>    <font color="#B22222">/* Test for convergence */</font>
+<a name="line245">245: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line246">246: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING) <font color="#4169E1">break</font>;
+
+<a name="line248">248: </a>    <font color="#B22222">/* Expand the subspace */</font>
+<a name="line249">249: </a>    d->updateV(d);
+
+<a name="line251">251: </a>    <font color="#B22222">/* Monitor progress */</font>
+<a name="line252">252: </a>    eps->nconv = d->nconv;
+<a name="line253">253: </a>    eps->its++;
+<a name="line254">254: </a>    <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
+<a name="line255">255: </a>    EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,k);
+<a name="line256">256: </a>  }
+
+<a name="line258">258: </a>  <font color="#B22222">/* Call the ending routines */</font>
+<a name="line259">259: </a>  EPSDavidsonFLCall(d->endList,d);
+<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
+<a name="line261">261: </a>}
+
+<a name="line265">265: </a><strong><font color="#4169E1"><a name="EPSReset_XD"></a>PetscErrorCode EPSReset_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line266">266: </a>{
+<a name="line267">267: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
+<a name="line268">268: </a>  dvdDashboard   *dvd = &data->ddb;
+
+<a name="line272">272: </a>  <font color="#B22222">/* Call step destructors and destroys the list */</font>
+<a name="line273">273: </a>  EPSDavidsonFLCall(dvd->destroyList,dvd);
+<a name="line274">274: </a>  EPSDavidsonFLDestroy(&dvd->destroyList);
+<a name="line275">275: </a>  EPSDavidsonFLDestroy(&dvd->startList);
+<a name="line276">276: </a>  EPSDavidsonFLDestroy(&dvd->endList);
+<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="EPSXDSetKrylovStart_XD"></a>PetscErrorCode EPSXDSetKrylovStart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool krylovstart)</font></strong>
+<a name="line283">283: </a>{
+<a name="line284">284: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line287">287: </a>  data->krylovstart = krylovstart;
+<a name="line288">288: </a>  <font color="#4169E1">return</font>(0);
+<a name="line289">289: </a>}
+
+<a name="line293">293: </a><strong><font color="#4169E1"><a name="EPSXDGetKrylovStart_XD"></a>PetscErrorCode EPSXDGetKrylovStart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *krylovstart)</font></strong>
+<a name="line294">294: </a>{
+<a name="line295">295: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line298">298: </a>  *krylovstart = data->krylovstart;
+<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
+<a name="line300">300: </a>}
+
+<a name="line304">304: </a><strong><font color="#4169E1"><a name="EPSXDSetBlockSize_XD"></a>PetscErrorCode EPSXDSetBlockSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt blocksize)</font></strong>
+<a name="line305">305: </a>{
+<a name="line306">306: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line309">309: </a>  <font color="#4169E1">if</font> (blocksize == PETSC_DEFAULT || blocksize == PETSC_DECIDE) blocksize = 1;
+<a name="line310">310: </a>  <font color="#4169E1">if</font> (blocksize <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid blocksize value"</font>);
+<a name="line311">311: </a>  data->blocksize = blocksize;
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
+
+<a name="line317">317: </a><strong><font color="#4169E1"><a name="EPSXDGetBlockSize_XD"></a>PetscErrorCode EPSXDGetBlockSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *blocksize)</font></strong>
+<a name="line318">318: </a>{
+<a name="line319">319: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line322">322: </a>  *blocksize = data->blocksize;
+<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
+<a name="line324">324: </a>}
+
+<a name="line328">328: </a><strong><font color="#4169E1"><a name="EPSXDSetRestart_XD"></a>PetscErrorCode EPSXDSetRestart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt minv,PetscInt plusk)</font></strong>
+<a name="line329">329: </a>{
+<a name="line330">330: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line333">333: </a>  <font color="#4169E1">if</font> (minv == PETSC_DEFAULT || minv == PETSC_DECIDE) minv = 5;
+<a name="line334">334: </a>  <font color="#4169E1">if</font> (minv <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid minv value"</font>);
+<a name="line335">335: </a>  <font color="#4169E1">if</font> (plusk == PETSC_DEFAULT || plusk == PETSC_DECIDE) plusk = 5;
+<a name="line336">336: </a>  <font color="#4169E1">if</font> (plusk < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid plusk value"</font>);
+<a name="line337">337: </a>  data->minv = minv;
+<a name="line338">338: </a>  data->plusk = plusk;
+<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>}
+
+<a name="line344">344: </a><strong><font color="#4169E1"><a name="EPSXDGetRestart_XD"></a>PetscErrorCode EPSXDGetRestart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *minv,PetscInt *plusk)</font></strong>
+<a name="line345">345: </a>{
+<a name="line346">346: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line349">349: </a>  <font color="#4169E1">if</font> (minv) *minv = data->minv;
+<a name="line350">350: </a>  <font color="#4169E1">if</font> (plusk) *plusk = data->plusk;
+<a name="line351">351: </a>  <font color="#4169E1">return</font>(0);
+<a name="line352">352: </a>}
+
+<a name="line356">356: </a><strong><font color="#4169E1"><a name="EPSXDGetInitialSize_XD"></a>PetscErrorCode EPSXDGetInitialSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *initialsize)</font></strong>
+<a name="line357">357: </a>{
+<a name="line358">358: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line361">361: </a>  *initialsize = data->initialsize;
+<a name="line362">362: </a>  <font color="#4169E1">return</font>(0);
+<a name="line363">363: </a>}
+
+<a name="line367">367: </a><strong><font color="#4169E1"><a name="EPSXDSetInitialSize_XD"></a>PetscErrorCode EPSXDSetInitialSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt initialsize)</font></strong>
+<a name="line368">368: </a>{
+<a name="line369">369: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line372">372: </a>  <font color="#4169E1">if</font> (initialsize == PETSC_DEFAULT || initialsize == PETSC_DECIDE) initialsize = 5;
+<a name="line373">373: </a>  <font color="#4169E1">if</font> (initialsize <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid initial size value"</font>);
+<a name="line374">374: </a>  data->initialsize = initialsize;
 <a name="line375">375: </a>  <font color="#4169E1">return</font>(0);
 <a name="line376">376: </a>}
 
-<a name="line380">380: </a><strong><font color="#4169E1"><a name="EPSXDSetBlockSize_XD"></a>PetscErrorCode EPSXDSetBlockSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt blocksize)</font></strong>
+<a name="line380">380: </a><strong><font color="#4169E1"><a name="EPSXDGetFix_XD"></a>PetscErrorCode EPSXDGetFix_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *fix)</font></strong>
 <a name="line381">381: </a>{
 <a name="line382">382: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
-<a name="line385">385: </a>  <font color="#4169E1">if</font> (blocksize == PETSC_DEFAULT || blocksize == PETSC_DECIDE) blocksize = 1;
-<a name="line386">386: </a>  <font color="#4169E1">if</font> (blocksize <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid blocksize value"</font>);
-<a name="line387">387: </a>  data->blocksize = blocksize;
-<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
-<a name="line389">389: </a>}
+<a name="line385">385: </a>  *fix = data->fix;
+<a name="line386">386: </a>  <font color="#4169E1">return</font>(0);
+<a name="line387">387: </a>}
 
-<a name="line393">393: </a><strong><font color="#4169E1"><a name="EPSXDGetBlockSize_XD"></a>PetscErrorCode EPSXDGetBlockSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *blocksize)</font></strong>
-<a name="line394">394: </a>{
-<a name="line395">395: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+<a name="line391">391: </a><strong><font color="#4169E1"><a name="EPSJDSetFix_JD"></a>PetscErrorCode EPSJDSetFix_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal fix)</font></strong>
+<a name="line392">392: </a>{
+<a name="line393">393: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
-<a name="line398">398: </a>  *blocksize = data->blocksize;
+<a name="line396">396: </a>  <font color="#4169E1">if</font> (fix == PETSC_DEFAULT || fix == PETSC_DECIDE) fix = 0.01;
+<a name="line397">397: </a>  <font color="#4169E1">if</font> (fix < 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid fix value"</font>);
+<a name="line398">398: </a>  data->fix = fix;
 <a name="line399">399: </a>  <font color="#4169E1">return</font>(0);
 <a name="line400">400: </a>}
 
-<a name="line404">404: </a><strong><font color="#4169E1"><a name="EPSXDSetRestart_XD"></a>PetscErrorCode EPSXDSetRestart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt minv,PetscInt plusk)</font></strong>
+<a name="line404">404: </a><strong><font color="#4169E1"><a name="EPSXDSetBOrth_XD"></a>PetscErrorCode EPSXDSetBOrth_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool borth)</font></strong>
 <a name="line405">405: </a>{
 <a name="line406">406: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
-<a name="line409">409: </a>  <font color="#4169E1">if</font> (minv == PETSC_DEFAULT || minv == PETSC_DECIDE) minv = 5;
-<a name="line410">410: </a>  <font color="#4169E1">if</font> (minv <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid minv value"</font>);
-<a name="line411">411: </a>  <font color="#4169E1">if</font> (plusk == PETSC_DEFAULT || plusk == PETSC_DECIDE) plusk = 5;
-<a name="line412">412: </a>  <font color="#4169E1">if</font> (plusk < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid plusk value"</font>);
-<a name="line413">413: </a>  data->minv = minv;
-<a name="line414">414: </a>  data->plusk = plusk;
-<a name="line415">415: </a>  <font color="#4169E1">return</font>(0);
-<a name="line416">416: </a>}
-
-<a name="line420">420: </a><strong><font color="#4169E1"><a name="EPSXDGetRestart_XD"></a>PetscErrorCode EPSXDGetRestart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *minv,PetscInt *plusk)</font></strong>
-<a name="line421">421: </a>{
-<a name="line422">422: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line425">425: </a>  <font color="#4169E1">if</font> (minv) *minv = data->minv;
-<a name="line426">426: </a>  <font color="#4169E1">if</font> (plusk) *plusk = data->plusk;
-<a name="line427">427: </a>  <font color="#4169E1">return</font>(0);
-<a name="line428">428: </a>}
-
-<a name="line432">432: </a><strong><font color="#4169E1"><a name="EPSXDGetInitialSize_XD"></a>PetscErrorCode EPSXDGetInitialSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *initialsize)</font></strong>
-<a name="line433">433: </a>{
-<a name="line434">434: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line437">437: </a>  *initialsize = data->initialsize;
-<a name="line438">438: </a>  <font color="#4169E1">return</font>(0);
-<a name="line439">439: </a>}
-
-<a name="line443">443: </a><strong><font color="#4169E1"><a name="EPSXDSetInitialSize_XD"></a>PetscErrorCode EPSXDSetInitialSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt initialsize)</font></strong>
-<a name="line444">444: </a>{
-<a name="line445">445: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line448">448: </a>  <font color="#4169E1">if</font> (initialsize == PETSC_DEFAULT || initialsize == PETSC_DECIDE) initialsize = 5;
-<a name="line449">449: </a>  <font color="#4169E1">if</font> (initialsize <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid initial size value"</font>);
-<a name="line450">450: </a>  data->initialsize = initialsize;
-<a name="line451">451: </a>  <font color="#4169E1">return</font>(0);
-<a name="line452">452: </a>}
-
-<a name="line456">456: </a><strong><font color="#4169E1"><a name="EPSXDGetFix_XD"></a>PetscErrorCode EPSXDGetFix_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *fix)</font></strong>
-<a name="line457">457: </a>{
-<a name="line458">458: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line461">461: </a>  *fix = data->fix;
-<a name="line462">462: </a>  <font color="#4169E1">return</font>(0);
-<a name="line463">463: </a>}
-
-<a name="line467">467: </a><strong><font color="#4169E1"><a name="EPSJDSetFix_JD"></a>PetscErrorCode EPSJDSetFix_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal fix)</font></strong>
-<a name="line468">468: </a>{
-<a name="line469">469: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line472">472: </a>  <font color="#4169E1">if</font> (fix == PETSC_DEFAULT || fix == PETSC_DECIDE) fix = 0.01;
-<a name="line473">473: </a>  <font color="#4169E1">if</font> (fix < 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid fix value"</font>);
-<a name="line474">474: </a>  data->fix = fix;
-<a name="line475">475: </a>  <font color="#4169E1">return</font>(0);
-<a name="line476">476: </a>}
-
-<a name="line480">480: </a><strong><font color="#4169E1"><a name="EPSXDSetBOrth_XD"></a>PetscErrorCode EPSXDSetBOrth_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool borth)</font></strong>
-<a name="line481">481: </a>{
-<a name="line482">482: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line485">485: </a>  data->ipB = borth;
-<a name="line486">486: </a>  <font color="#4169E1">return</font>(0);
-<a name="line487">487: </a>}
-
-<a name="line491">491: </a><strong><font color="#4169E1"><a name="EPSXDGetBOrth_XD"></a>PetscErrorCode EPSXDGetBOrth_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *borth)</font></strong>
-<a name="line492">492: </a>{
-<a name="line493">493: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line496">496: </a>  *borth = data->ipB;
-<a name="line497">497: </a>  <font color="#4169E1">return</font>(0);
-<a name="line498">498: </a>}
-
-<a name="line502">502: </a><strong><font color="#4169E1"><a name="EPSJDSetConstCorrectionTol_JD"></a>PetscErrorCode EPSJDSetConstCorrectionTol_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool constant)</font></strong>
-<a name="line503">503: </a>{
-<a name="line504">504: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line507">507: </a>  data->dynamic = (!constant)? PETSC_TRUE: PETSC_FALSE;
-<a name="line508">508: </a>  <font color="#4169E1">return</font>(0);
-<a name="line509">509: </a>}
-
-<a name="line513">513: </a><strong><font color="#4169E1"><a name="EPSJDGetConstCorrectionTol_JD"></a>PetscErrorCode EPSJDGetConstCorrectionTol_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *constant)</font></strong>
-<a name="line514">514: </a>{
-<a name="line515">515: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line518">518: </a>  *constant = (!data->dynamic)? PETSC_TRUE: PETSC_FALSE;
-<a name="line519">519: </a>  <font color="#4169E1">return</font>(0);
-<a name="line520">520: </a>}
-
-<a name="line524">524: </a><strong><font color="#4169E1"><a name="EPSXDSetWindowSizes_XD"></a>PetscErrorCode EPSXDSetWindowSizes_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt pwindow,PetscInt qwindow)</font></strong>
-<a name="line525">525: </a>{
-<a name="line526">526: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line529">529: </a>  <font color="#4169E1">if</font> (pwindow == PETSC_DEFAULT || pwindow == PETSC_DECIDE) pwindow = 0;
-<a name="line530">530: </a>  <font color="#4169E1">if</font> (pwindow < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid pwindow value"</font>);
-<a name="line531">531: </a>  <font color="#4169E1">if</font> (qwindow == PETSC_DEFAULT || qwindow == PETSC_DECIDE) qwindow = 0;
-<a name="line532">532: </a>  <font color="#4169E1">if</font> (qwindow < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid qwindow value"</font>);
-<a name="line533">533: </a>  data->cX_in_proj = qwindow;
-<a name="line534">534: </a>  data->cX_in_impr = pwindow;
-<a name="line535">535: </a>  <font color="#4169E1">return</font>(0);
-<a name="line536">536: </a>}
-
-<a name="line540">540: </a><strong><font color="#4169E1"><a name="EPSXDGetWindowSizes_XD"></a>PetscErrorCode EPSXDGetWindowSizes_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *pwindow,PetscInt *qwindow)</font></strong>
-<a name="line541">541: </a>{
-<a name="line542">542: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line545">545: </a>  <font color="#4169E1">if</font> (pwindow) *pwindow = data->cX_in_impr;
-<a name="line546">546: </a>  <font color="#4169E1">if</font> (qwindow) *qwindow = data->cX_in_proj;
-<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
-<a name="line548">548: </a>}
-
-<a name="line552">552: </a><strong><font color="#4169E1"><a name="EPSXDSetMethod"></a>PetscErrorCode EPSXDSetMethod(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Method_t method)</font></strong>
-<a name="line553">553: </a>{
-<a name="line554">554: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line557">557: </a>  data->scheme = method;
-<a name="line558">558: </a>  <font color="#4169E1">return</font>(0);
-<a name="line559">559: </a>}
-
-<a name="line563">563: </a><strong><font color="#4169E1"><a name="EPSXDGetMethod_XD"></a>PetscErrorCode EPSXDGetMethod_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Method_t *method)</font></strong>
-<a name="line564">564: </a>{
-<a name="line565">565: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
-
-<a name="line568">568: </a>  *method = data->scheme;
-<a name="line569">569: </a>  <font color="#4169E1">return</font>(0);
-<a name="line570">570: </a>}
-
-<a name="line574">574: </a><font color="#B22222">/*</font>
-<a name="line575">575: </a><font color="#B22222">  EPSComputeVectors_XD - Compute eigenvectors from the vectors</font>
-<a name="line576">576: </a><font color="#B22222">  provided by the eigensolver. This version is intended for solvers</font>
-<a name="line577">577: </a><font color="#B22222">  that provide Schur vectors from the QZ decomposition. Given the partial</font>
-<a name="line578">578: </a><font color="#B22222">  Schur decomposition OP*V=V*T, the following steps are performed:</font>
-<a name="line579">579: </a><font color="#B22222">      1) compute eigenvectors of (S,T): S*Z=T*Z*D</font>
-<a name="line580">580: </a><font color="#B22222">      2) compute eigenvectors of OP: X=V*Z</font>
-<a name="line581">581: </a><font color="#B22222"> */</font>
-<a name="line582">582: </a><strong><font color="#4169E1"><a name="EPSComputeVectors_XD"></a>PetscErrorCode EPSComputeVectors_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line583">583: </a>{
-<a name="line585">585: </a>  Mat            X;
-<a name="line586">586: </a>  PetscBool      symm;
-
-<a name="line589">589: </a>  PetscObjectTypeCompareAny((PetscObject)eps->ds,&symm,DSHEP,<font color="#666666">""</font>);
-<a name="line590">590: </a>  <font color="#4169E1">if</font> (symm) <font color="#4169E1">return</font>(0);
-<a name="line591">591: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line592">592: </a>  <a href="../../../../docs/manualpages/DS/DSNormalize.html#DSNormalize">DSNormalize</a>(eps->ds,DS_MAT_X,-1);
-
-<a name="line594">594: </a>  <font color="#B22222">/* V <- V * X */</font>
-<a name="line595">595: </a>  <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&X);
-<a name="line596">596: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,eps->nconv);
-<a name="line597">597: </a>  <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,X,0,eps->nconv);
-<a name="line598">598: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&X);
-<a name="line599">599: </a>  <font color="#4169E1">return</font>(0);
-<a name="line600">600: </a>}
+<a name="line409">409: </a>  data->ipB = borth;
+<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
+<a name="line411">411: </a>}
+
+<a name="line415">415: </a><strong><font color="#4169E1"><a name="EPSXDGetBOrth_XD"></a>PetscErrorCode EPSXDGetBOrth_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *borth)</font></strong>
+<a name="line416">416: </a>{
+<a name="line417">417: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line420">420: </a>  *borth = data->ipB;
+<a name="line421">421: </a>  <font color="#4169E1">return</font>(0);
+<a name="line422">422: </a>}
+
+<a name="line426">426: </a><strong><font color="#4169E1"><a name="EPSJDSetConstCorrectionTol_JD"></a>PetscErrorCode EPSJDSetConstCorrectionTol_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool constant)</font></strong>
+<a name="line427">427: </a>{
+<a name="line428">428: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line431">431: </a>  data->dynamic = PetscNot(constant);
+<a name="line432">432: </a>  <font color="#4169E1">return</font>(0);
+<a name="line433">433: </a>}
+
+<a name="line437">437: </a><strong><font color="#4169E1"><a name="EPSJDGetConstCorrectionTol_JD"></a>PetscErrorCode EPSJDGetConstCorrectionTol_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *constant)</font></strong>
+<a name="line438">438: </a>{
+<a name="line439">439: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line442">442: </a>  *constant = PetscNot(data->dynamic);
+<a name="line443">443: </a>  <font color="#4169E1">return</font>(0);
+<a name="line444">444: </a>}
+
+<a name="line448">448: </a><strong><font color="#4169E1"><a name="EPSXDSetWindowSizes_XD"></a>PetscErrorCode EPSXDSetWindowSizes_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt pwindow,PetscInt qwindow)</font></strong>
+<a name="line449">449: </a>{
+<a name="line450">450: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line453">453: </a>  <font color="#4169E1">if</font> (pwindow == PETSC_DEFAULT || pwindow == PETSC_DECIDE) pwindow = 0;
+<a name="line454">454: </a>  <font color="#4169E1">if</font> (pwindow < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid pwindow value"</font>);
+<a name="line455">455: </a>  <font color="#4169E1">if</font> (qwindow == PETSC_DEFAULT || qwindow == PETSC_DECIDE) qwindow = 0;
+<a name="line456">456: </a>  <font color="#4169E1">if</font> (qwindow < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid qwindow value"</font>);
+<a name="line457">457: </a>  data->cX_in_proj = qwindow;
+<a name="line458">458: </a>  data->cX_in_impr = pwindow;
+<a name="line459">459: </a>  <font color="#4169E1">return</font>(0);
+<a name="line460">460: </a>}
+
+<a name="line464">464: </a><strong><font color="#4169E1"><a name="EPSXDGetWindowSizes_XD"></a>PetscErrorCode EPSXDGetWindowSizes_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *pwindow,PetscInt *qwindow)</font></strong>
+<a name="line465">465: </a>{
+<a name="line466">466: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line469">469: </a>  <font color="#4169E1">if</font> (pwindow) *pwindow = data->cX_in_impr;
+<a name="line470">470: </a>  <font color="#4169E1">if</font> (qwindow) *qwindow = data->cX_in_proj;
+<a name="line471">471: </a>  <font color="#4169E1">return</font>(0);
+<a name="line472">472: </a>}
+
+<a name="line476">476: </a><font color="#B22222">/*</font>
+<a name="line477">477: </a><font color="#B22222">  EPSComputeVectors_XD - Compute eigenvectors from the vectors</font>
+<a name="line478">478: </a><font color="#B22222">  provided by the eigensolver. This version is intended for solvers</font>
+<a name="line479">479: </a><font color="#B22222">  that provide Schur vectors from the QZ decomposition. Given the partial</font>
+<a name="line480">480: </a><font color="#B22222">  Schur decomposition OP*V=V*T, the following steps are performed:</font>
+<a name="line481">481: </a><font color="#B22222">      1) compute eigenvectors of (S,T): S*Z=T*Z*D</font>
+<a name="line482">482: </a><font color="#B22222">      2) compute eigenvectors of OP: X=V*Z</font>
+<a name="line483">483: </a><font color="#B22222"> */</font>
+<a name="line484">484: </a><strong><font color="#4169E1"><a name="EPSComputeVectors_XD"></a>PetscErrorCode EPSComputeVectors_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line485">485: </a>{
+<a name="line487">487: </a>  Mat            X;
+<a name="line488">488: </a>  PetscBool      symm;
+
+<a name="line491">491: </a>  PetscObjectTypeCompare((PetscObject)eps->ds,DSHEP,&symm);
+<a name="line492">492: </a>  <font color="#4169E1">if</font> (symm) <font color="#4169E1">return</font>(0);
+<a name="line493">493: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+
+<a name="line495">495: </a>  <font color="#B22222">/* V <- V * X */</font>
+<a name="line496">496: </a>  <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_X,&X);
+<a name="line497">497: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,eps->nconv);
+<a name="line498">498: </a>  <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,X,0,eps->nconv);
+<a name="line499">499: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(eps->ds,DS_MAT_X,&X);
+<a name="line500">500: </a>  <font color="#4169E1">return</font>(0);
+<a name="line501">501: </a>}
 </pre>
 </body>
 
diff --git a/src/eps/impls/davidson/davidson.h b/src/eps/impls/davidson/davidson.h
index 51f48c3..32fe514 100644
--- a/src/eps/impls/davidson/davidson.h
+++ b/src/eps/impls/davidson/davidson.h
@@ -3,11 +3,11 @@
 
   References:
     - Ernest R. Davidson. Super-matrix methods. Computer Physics Communications,
-      53:49–60, May 1989.
+      53:49-60, May 1989.
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -53,12 +53,6 @@ typedef enum {
   DVD_PROJ_KZX
 } ProjType_t;
 
-typedef enum {
-  DVD_METH_GD,
-  DVD_METH_JD,
-  DVD_METH_GD2
-} Method_t;
-
 /*
    Dashboard struct: contains the methods that will be employed and the tuning
    options.
@@ -75,11 +69,11 @@ typedef struct _dvdDashboard {
   void *calcPairs_data;
 
   /* Eigenpair test for convergence */
-  PetscBool (*testConv)(struct _dvdDashboard*,PetscScalar eigvr,PetscScalar eigvi,PetscReal res,PetscReal *error);
+  PetscBool (*testConv)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscReal,PetscReal*);
   void *testConv_data;
 
   /* Improve the selected eigenpairs */
-  PetscErrorCode (*improveX)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);
+  PetscErrorCode (*improveX)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt*);
   void *improveX_data;
 
   /* Check for restarting */
@@ -118,7 +112,7 @@ typedef struct _dvdDashboard {
   PetscInt max_cX_in_impr;    /* max vectros from cX in the projector */
   PetscInt max_size_P;        /* max unconverged vectors in the projector */
   PetscInt bs;                /* max vectors that expands the subspace every iteration */
-  EPS eps;                    /* connection to SLEPc */
+  EPS      eps;               /* connection to SLEPc */
 
   /**** Auxiliary space ****/
   VecPool auxV;               /* auxiliary vectors */
@@ -135,22 +129,22 @@ typedef struct _dvdDashboard {
   PetscReal   *nBds;          /* B-norms of projected problem  */
 
   /**** Shared function and variables ****/
-  PetscErrorCode (*e_Vchanged)(struct _dvdDashboard*,PetscInt s_imm,PetscInt e_imm,PetscInt s_new,PetscInt e_new);
+  PetscErrorCode (*e_Vchanged)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt,PetscInt);
   void *e_Vchanged_data;
-  PetscErrorCode (*calcpairs_residual)(struct _dvdDashboard*,PetscInt s,PetscInt e);
-  PetscErrorCode (*calcpairs_selectPairs)(struct _dvdDashboard*,PetscInt n);
+  PetscErrorCode (*calcpairs_residual)(struct _dvdDashboard*,PetscInt,PetscInt);
+  PetscErrorCode (*calcpairs_selectPairs)(struct _dvdDashboard*,PetscInt);
   void *calcpairs_residual_data;
-  PetscErrorCode (*improvex_precond)(struct _dvdDashboard*,PetscInt i,Vec x,Vec Px);
+  PetscErrorCode (*improvex_precond)(struct _dvdDashboard*,PetscInt,Vec,Vec);
   void *improvex_precond_data;
-  PetscErrorCode (*improvex_jd_proj_uv)(struct _dvdDashboard*,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld);
-  PetscErrorCode (*improvex_jd_lit)(struct _dvdDashboard*,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol);
+  PetscErrorCode (*improvex_jd_proj_uv)(struct _dvdDashboard*,PetscInt,PetscInt,Vec*,Vec*,Vec*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt);
+  PetscErrorCode (*improvex_jd_lit)(struct _dvdDashboard*,PetscInt,PetscScalar*,PetscScalar*,PetscInt*,PetscReal*);
   PetscErrorCode (*calcpairs_W)(struct _dvdDashboard*);
   void *calcpairs_W_data;
   PetscErrorCode (*calcpairs_proj_trans)(struct _dvdDashboard*);
   PetscErrorCode (*calcpairs_eigs_trans)(struct _dvdDashboard*);
   PetscErrorCode (*calcpairs_eig_backtrans)(struct _dvdDashboard*,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*);
-  PetscErrorCode (*calcpairs_proj_res)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,Vec *R);
-  PetscErrorCode (*preTestConv)(struct _dvdDashboard*,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv);
+  PetscErrorCode (*calcpairs_proj_res)(struct _dvdDashboard*,PetscInt,PetscInt,Vec*);
+  PetscErrorCode (*preTestConv)(struct _dvdDashboard*,PetscInt,PetscInt,PetscInt,PetscInt*);
   PetscErrorCode (*e_newIteration)(struct _dvdDashboard*);
   void *e_newIteration_data;
 
@@ -168,10 +162,26 @@ typedef struct _dvdDashboard {
   PetscInt  V_new_e;           /* added to V the columns V_new_s:V_new_e */
   PetscBool BV_shift;          /* if true BV is shifted when vectors converge */
   PetscBool W_shift;           /* if true W is shifted when vectors converge */
-
-  void* prof_data;             /* profiler data */
 } dvdDashboard;
 
+typedef struct {
+  /*------------------------- User parameters ---------------------------*/
+  PetscInt  blocksize;     /* block size */
+  PetscInt  initialsize;   /* initial size of V */
+  PetscInt  minv;          /* size of V after restarting */
+  PetscInt  plusk;         /* keep plusk eigenvectors from the last iteration */
+  PetscBool ipB;           /* true if B-ortho is used */
+  PetscReal fix;           /* the fix parameter */
+  PetscBool krylovstart;   /* true if the starting subspace is a Krylov basis */
+  PetscBool dynamic;       /* true if dynamic stopping criterion is used */
+  PetscInt  cX_in_proj;    /* converged vectors in the projected problem */
+  PetscInt  cX_in_impr;    /* converged vectors in the projector */
+  PetscBool doubleexp;     /* double expansion in GD (GD2) */
+
+  /*----------------- Child objects and working data -------------------*/
+  dvdDashboard ddb;
+} EPS_DAVIDSON;
+
 #undef __FUNCT__
 #define __FUNCT__ "EPSDavidsonFLAdd"
 PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLAdd(dvdFunctionList **fl,dvdCallback f)
@@ -253,50 +263,26 @@ typedef struct {
 #define DVD_STATE_CONF 1
 #define DVD_STATE_RUN 2
 
-/* Shared types */
-typedef PetscErrorCode (*dvdPrecond)(dvdDashboard*,PetscInt i,Vec x,Vec Px);
-typedef PetscErrorCode (*e_Vchanged_type)(dvdDashboard*,PetscInt s_imm,PetscInt e_imm,PetscInt s_new,PetscInt e_new);
-typedef PetscErrorCode (*isRestarting_type)(dvdDashboard*,PetscBool*);
-typedef PetscErrorCode (*e_newIteration_type)(dvdDashboard*);
-typedef PetscErrorCode (*improveX_type)(dvdDashboard*,Vec *D,PetscInt max_size_D,PetscInt r_s,PetscInt r_e,PetscInt *size_D);
-
-/* Routines for initV step */
-PETSC_INTERN PetscErrorCode dvd_initV(dvdDashboard *d,dvdBlackboard *b,PetscInt k,PetscInt user,PetscBool krylov);
-
-/* Routines for calcPairs step */
-PETSC_INTERN PetscErrorCode dvd_calcpairs_qz(dvdDashboard *d,dvdBlackboard *b,PetscBool orth,PetscInt cX_proj,PetscBool harm);
-PETSC_INTERN PetscErrorCode dvd_harm_updateproj(dvdDashboard *d);
-
-/* Routines for improveX step */
-PETSC_INTERN PetscErrorCode dvd_improvex_jd(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs,PetscInt cX_impr,PetscBool dynamic);
-PETSC_INTERN PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard *d,dvdBlackboard *b,ProjType_t p);
-PETSC_INTERN PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard *d,dvdBlackboard *b,PetscInt maxits,PetscReal tol,PetscReal fix);
-PETSC_INTERN PetscErrorCode dvd_improvex_gd2(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs);
-
-/* Routines for testConv step */
-PETSC_INTERN PetscErrorCode dvd_testconv_basic(dvdDashboard *d,dvdBlackboard *b);
-PETSC_INTERN PetscErrorCode dvd_testconv_slepc(dvdDashboard *d,dvdBlackboard *b);
-
-/* Routines for management of V */
-PETSC_INTERN PetscErrorCode dvd_managementV_basic(dvdDashboard *d,dvdBlackboard *b,PetscInt bs,PetscInt mpd,PetscInt min_size_V,PetscInt plusk,PetscBool harm,PetscBool allResiduals);
-
-/* Some utilities */
-PETSC_INTERN PetscErrorCode dvd_static_precond_PC(dvdDashboard *d,dvdBlackboard *b,PC pc);
-PETSC_INTERN PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b);
-PETSC_INTERN PetscErrorCode dvd_profiler(dvdDashboard *d,dvdBlackboard *b);
-PETSC_INTERN PetscErrorCode dvd_prof_init();
-PETSC_INTERN PetscErrorCode dvd_harm_conf(dvdDashboard *d,dvdBlackboard *b,HarmType_t mode,PetscBool fixedTarget,PetscScalar t);
-PETSC_INTERN PetscErrorCode BVMultS(BV X,BV Y,PetscScalar *H,PetscInt ldh);
-
-/* Methods */
-PETSC_INTERN PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,Method_t method);
-PETSC_INTERN PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,Method_t method);
-
-/* Orthogonalization routines */
-PETSC_INTERN PetscErrorCode dvd_orthV(BV bv,PetscInt V_new_s,PetscInt V_new_e,PetscRandom rand);
-
-/* SLEPc interface routines */
-PETSC_INTERN PetscErrorCode EPSCreate_XD(EPS);
+/* Prototypes of non-static auxiliary functions */
+PETSC_INTERN PetscErrorCode dvd_calcpairs_qz(dvdDashboard*,dvdBlackboard*,PetscBool,PetscInt,PetscBool);
+PETSC_INTERN PetscErrorCode dvd_improvex_gd2(dvdDashboard*,dvdBlackboard*,KSP,PetscInt);
+PETSC_INTERN PetscErrorCode dvd_improvex_jd(dvdDashboard*,dvdBlackboard*,KSP,PetscInt,PetscInt,PetscBool);
+PETSC_INTERN PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard*,dvdBlackboard*,ProjType_t);
+PETSC_INTERN PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard*,dvdBlackboard*,PetscInt,PetscReal,PetscReal);
+PETSC_INTERN PetscErrorCode dvd_improvex_compute_X(dvdDashboard*,PetscInt,PetscInt,Vec*,PetscScalar*,PetscInt);
+PETSC_INTERN PetscErrorCode dvd_initV(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscBool);
+PETSC_INTERN PetscErrorCode dvd_orthV(BV,PetscInt,PetscInt);
+PETSC_INTERN PetscErrorCode dvd_schm_basic_preconf(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,HarmType_t,KSP,InitType_t,PetscBool,PetscBool,PetscInt,PetscInt,PetscBool);
+PETSC_INTERN PetscErrorCode dvd_schm_basic_conf(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,HarmType_t,PetscBool,PetscScalar,KSP,PetscReal,InitType_t,PetscBool,PetscBool,PetscInt,PetscInt,PetscBool,PetscBool);
+PETSC_INTERN PetscErrorCode dvd_testconv_basic(dvdDashboard*,dvdBlackboard*);
+PETSC_INTERN PetscErrorCode dvd_testconv_slepc(dvdDashboard*,dvdBlackboard*);
+PETSC_INTERN PetscErrorCode dvd_managementV_basic(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool,PetscBool);
+PETSC_INTERN PetscErrorCode dvd_static_precond_PC(dvdDashboard*,dvdBlackboard*,PC);
+PETSC_INTERN PetscErrorCode dvd_jacobi_precond(dvdDashboard*,dvdBlackboard*);
+PETSC_INTERN PetscErrorCode dvd_harm_updateproj(dvdDashboard*);
+PETSC_INTERN PetscErrorCode dvd_harm_conf(dvdDashboard*,dvdBlackboard*,HarmType_t,PetscBool,PetscScalar);
+
+/* Internal interface routines */
 PETSC_INTERN PetscErrorCode EPSReset_XD(EPS);
 PETSC_INTERN PetscErrorCode EPSSetUp_XD(EPS);
 PETSC_INTERN PetscErrorCode EPSSolve_XD(EPS);
@@ -317,50 +303,4 @@ PETSC_INTERN PetscErrorCode EPSJDSetConstCorrectionTol_JD(EPS,PetscBool);
 PETSC_INTERN PetscErrorCode EPSJDGetConstCorrectionTol_JD(EPS,PetscBool*);
 PETSC_INTERN PetscErrorCode EPSXDSetWindowSizes_XD(EPS,PetscInt,PetscInt);
 PETSC_INTERN PetscErrorCode EPSXDGetWindowSizes_XD(EPS,PetscInt*,PetscInt*);
-PETSC_INTERN PetscErrorCode EPSXDSetMethod(EPS,Method_t);
-PETSC_INTERN PetscErrorCode EPSXDGetMethod_XD(EPS,Method_t*);
-
-/* Common inline function */
-#undef __FUNCT__
-#define __FUNCT__ "dvd_improvex_compute_X"
-PETSC_STATIC_INLINE PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)
-{
-  PetscErrorCode ierr;
-  PetscInt       n = i_e - i_s,i;
-  Vec            *u;
-
-  PetscFunctionBegin;
-  if (u_) u = u_;
-  else if (d->correctXnorm) {
-    ierr = SlepcVecPoolGetVecs(d->auxV,i_e-i_s,&u);CHKERRQ(ierr);
-  }
-  if (u_ || d->correctXnorm) {
-    for (i=0; i<n; i++) {
-      ierr = BVMultVec(d->eps->V,1.0,0.0,u[i],&pX[ld*(i+i_s)]);CHKERRQ(ierr);
-    }
-  }
-  /* nX(i) <- ||X(i)|| */
-  if (d->correctXnorm) {
-    for (i=0; i<n; i++) {
-      ierr = VecNormBegin(u[i],NORM_2,&d->nX[i_s+i]);CHKERRQ(ierr);
-    }
-    for (i=0; i<n; i++) {
-      ierr = VecNormEnd(u[i],NORM_2,&d->nX[i_s+i]);CHKERRQ(ierr);
-    }
-#if !defined(PETSC_USE_COMPLEX)
-    for (i=0;i<n;i++) {
-      if (d->eigi[i_s+i] != 0.0) {
-        d->nX[i_s+i] = d->nX[i_s+i+1] = PetscSqrtScalar(d->nX[i_s+i]*d->nX[i_s+i]+d->nX[i_s+i+1]*d->nX[i_s+i+1]);
-        i++;
-      }
-    }
-#endif
-  } else {
-    for (i=0;i<n;i++) d->nX[i_s+i] = 1.0;
-  }
-  if (d->correctXnorm && !u_) {
-    ierr = SlepcVecPoolRestoreVecs(d->auxV,i_e-i_s,&u);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}
 
diff --git a/src/eps/impls/davidson/davidson.h.html b/src/eps/impls/davidson/davidson.h.html
index 99a62e8..7e614b0 100644
--- a/src/eps/impls/davidson/davidson.h.html
+++ b/src/eps/impls/davidson/davidson.h.html
@@ -1 +1,311 @@
 <center><a href="davidson.h">Actual source code: davidson.h</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/davidson.h.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:33:03+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/davidson.h.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">  Method: General Davidson Method (includes GD and JD)</font>
+
+<a name="line4">  4: </a><font color="#B22222">  References:</font>
+<a name="line5">  5: </a><font color="#B22222">    - Ernest R. Davidson. Super-matrix methods. Computer Physics Communications,</font>
+<a name="line6">  6: </a><font color="#B22222">      53:49-60, May 1989.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line9">  9: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line10"> 10: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line14"> 14: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line15"> 15: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line16"> 16: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line18"> 18: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line19"> 19: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line20"> 20: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line21"> 21: </a><font color="#B22222">   more details.</font>
+
+<a name="line23"> 23: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line24"> 24: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line25"> 25: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line26"> 26: </a><font color="#B22222">*/</font>
+
+<a name="line28"> 28: </a><font color="#A020F0">#include <slepc/private/epsimpl.h></font>
+<a name="line29"> 29: </a><font color="#A020F0">#include <slepc/private/vecimplslepc.h></font>
+
+<a name="line31"> 31: </a><font color="#4169E1"><a name="_dvdDashboard"></a>struct _dvdDashboard</font>;
+<a name="line32"> 32: </a><strong><font color="#4169E1">typedef PetscErrorCode (*dvdCallback)(struct _dvdDashboard*)</font></strong>;
+<a name="line33"> 33: </a><font color="#4169E1"><a name="_dvdFunctionList"></a>typedef struct _dvdFunctionList </font>{
+<a name="line34"> 34: </a>  dvdCallback f;
+<a name="line35"> 35: </a>  <font color="#4169E1">struct _dvdFunctionList</font> *next;
+<a name="line36"> 36: </a>} dvdFunctionList;
+
+<a name="line38"> 38: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
+<a name="line39"> 39: </a>  DVD_HARM_NONE,
+<a name="line40"> 40: </a>  DVD_HARM_RR,
+<a name="line41"> 41: </a>  DVD_HARM_RRR,
+<a name="line42"> 42: </a>  DVD_HARM_REIGS,
+<a name="line43"> 43: </a>  DVD_HARM_LEIGS
+<a name="line44"> 44: </a>} HarmType_t;
+
+<a name="line46"> 46: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
+<a name="line47"> 47: </a>  DVD_INITV_CLASSIC,
+<a name="line48"> 48: </a>  DVD_INITV_KRYLOV
+<a name="line49"> 49: </a>} InitType_t;
+
+<a name="line51"> 51: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
+<a name="line52"> 52: </a>  DVD_PROJ_KXX,
+<a name="line53"> 53: </a>  DVD_PROJ_KZX
+<a name="line54"> 54: </a>} ProjType_t;
+
+<a name="line56"> 56: </a><font color="#B22222">/*</font>
+<a name="line57"> 57: </a><font color="#B22222">   Dashboard struct: contains the methods that will be employed and the tuning</font>
+<a name="line58"> 58: </a><font color="#B22222">   options.</font>
+<a name="line59"> 59: </a><font color="#B22222">*/</font>
+
+<a name="line61"> 61: </a><font color="#4169E1"><a name="_dvdDashboard"></a>typedef struct _dvdDashboard </font>{
+<a name="line62"> 62: </a>  <font color="#B22222">/**** Function steps ****/</font>
+<a name="line63"> 63: </a>  <font color="#B22222">/* Initialize V */</font>
+<a name="line64"> 64: </a>  PetscErrorCode (*initV)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line65"> 65: </a>  void *initV_data;
+
+<a name="line67"> 67: </a>  <font color="#B22222">/* Find the approximate eigenpairs from V */</font>
+<a name="line68"> 68: </a>  PetscErrorCode (*calcPairs)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line69"> 69: </a>  void *calcPairs_data;
+
+<a name="line71"> 71: </a>  <font color="#B22222">/* Eigenpair test for convergence */</font>
+<a name="line72"> 72: </a>  PetscBool (*testConv)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscScalar,PetscScalar,PetscReal,PetscReal*);
+<a name="line73"> 73: </a>  void *testConv_data;
+
+<a name="line75"> 75: </a>  <font color="#B22222">/* Improve the selected eigenpairs */</font>
+<a name="line76"> 76: </a>  PetscErrorCode (*improveX)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscInt,PetscInt*);
+<a name="line77"> 77: </a>  void *improveX_data;
+
+<a name="line79"> 79: </a>  <font color="#B22222">/* Check for restarting */</font>
+<a name="line80"> 80: </a>  PetscErrorCode (*isRestarting)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscBool*);
+<a name="line81"> 81: </a>  void *isRestarting_data;
+
+<a name="line83"> 83: </a>  <font color="#B22222">/* Perform restarting */</font>
+<a name="line84"> 84: </a>  PetscErrorCode (*restartV)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line85"> 85: </a>  void *restartV_data;
+
+<a name="line87"> 87: </a>  <font color="#B22222">/* Update V */</font>
+<a name="line88"> 88: </a>  PetscErrorCode (*updateV)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line89"> 89: </a>  void *updateV_data;
+
+<a name="line91"> 91: </a>  <font color="#B22222">/**** Problem specification ****/</font>
+<a name="line92"> 92: </a>  Mat         A,B;            <font color="#B22222">/* problem matrices */</font>
+<a name="line93"> 93: </a>  MatType_t   sA,sB;          <font color="#B22222">/* matrix specifications */</font>
+<a name="line94"> 94: </a>  EPType_t    sEP;            <font color="#B22222">/* problem specifications */</font>
+<a name="line95"> 95: </a>  PetscInt    nev;            <font color="#B22222">/* number of eigenpairs */</font>
+<a name="line96"> 96: </a>  <a href="../../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>    which;          <font color="#B22222">/* spectrum selection */</font>
+<a name="line97"> 97: </a>  PetscBool   withTarget;     <font color="#B22222">/* if there is a target */</font>
+<a name="line98"> 98: </a>  PetscScalar target[2];      <font color="#B22222">/* target value */</font>
+<a name="line99"> 99: </a>  PetscReal   tol;            <font color="#B22222">/* tolerance */</font>
+<a name="line100">100: </a>  PetscBool   correctXnorm;   <font color="#B22222">/* if true, norm of X are computed */</font>
+
+<a name="line102">102: </a>  <font color="#B22222">/**** Subspaces specification ****/</font>
+<a name="line103">103: </a>  PetscInt nconv;             <font color="#B22222">/* number of converged eigenpairs */</font>
+<a name="line104">104: </a>  PetscInt npreconv;          <font color="#B22222">/* number of pairs ready to converge */</font>
+
+<a name="line106">106: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>       W;                 <font color="#B22222">/* left basis for harmonic case */</font>
+<a name="line107">107: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>       AX;                <font color="#B22222">/* A*V */</font>
+<a name="line108">108: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>       BX;                <font color="#B22222">/* B*V */</font>
+<a name="line109">109: </a>  PetscInt size_D;            <font color="#B22222">/* active vectors */</font>
+<a name="line110">110: </a>  PetscInt max_size_proj;     <font color="#B22222">/* max size projected problem */</font>
+<a name="line111">111: </a>  PetscInt max_cX_in_proj;    <font color="#B22222">/* max vectors from cX in the projected problem */</font>
+<a name="line112">112: </a>  PetscInt max_cX_in_impr;    <font color="#B22222">/* max vectros from cX in the projector */</font>
+<a name="line113">113: </a>  PetscInt max_size_P;        <font color="#B22222">/* max unconverged vectors in the projector */</font>
+<a name="line114">114: </a>  PetscInt bs;                <font color="#B22222">/* max vectors that expands the subspace every iteration */</font>
+<a name="line115">115: </a>  <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>      eps;               <font color="#B22222">/* connection to SLEPc */</font>
+
+<a name="line117">117: </a>  <font color="#B22222">/**** Auxiliary space ****/</font>
+<a name="line118">118: </a>  VecPool auxV;               <font color="#B22222">/* auxiliary vectors */</font>
+<a name="line119">119: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>      auxBV;              <font color="#B22222">/* auxiliary vectors */</font>
+
+<a name="line121">121: </a>  <font color="#B22222">/**** Eigenvalues and errors ****/</font>
+<a name="line122">122: </a>  PetscScalar *ceigr,*ceigi;  <font color="#B22222">/* converged eigenvalues */</font>
+<a name="line123">123: </a>  PetscScalar *eigr,*eigi;    <font color="#B22222">/* current eigenvalues */</font>
+<a name="line124">124: </a>  PetscReal   *nR;            <font color="#B22222">/* residual norm */</font>
+<a name="line125">125: </a>  PetscReal   *real_nR;       <font color="#B22222">/* original nR */</font>
+<a name="line126">126: </a>  PetscReal   *nX;            <font color="#B22222">/* X norm */</font>
+<a name="line127">127: </a>  PetscReal   *real_nX;       <font color="#B22222">/* original nX */</font>
+<a name="line128">128: </a>  PetscReal   *errest;        <font color="#B22222">/* relative error eigenpairs */</font>
+<a name="line129">129: </a>  PetscReal   *nBds;          <font color="#B22222">/* B-norms of projected problem  */</font>
+
+<a name="line131">131: </a>  <font color="#B22222">/**** Shared function and variables ****/</font>
+<a name="line132">132: </a>  PetscErrorCode (*e_Vchanged)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscInt,PetscInt,PetscInt);
+<a name="line133">133: </a>  void *e_Vchanged_data;
+<a name="line134">134: </a>  PetscErrorCode (*calcpairs_residual)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscInt);
+<a name="line135">135: </a>  PetscErrorCode (*calcpairs_selectPairs)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt);
+<a name="line136">136: </a>  void *calcpairs_residual_data;
+<a name="line137">137: </a>  PetscErrorCode (*improvex_precond)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,Vec,Vec);
+<a name="line138">138: </a>  void *improvex_precond_data;
+<a name="line139">139: </a>  PetscErrorCode (*improvex_jd_proj_uv)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscInt,Vec*,Vec*,Vec*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt);
+<a name="line140">140: </a>  PetscErrorCode (*improvex_jd_lit)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscScalar*,PetscScalar*,PetscInt*,PetscReal*);
+<a name="line141">141: </a>  PetscErrorCode (*calcpairs_W)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line142">142: </a>  void *calcpairs_W_data;
+<a name="line143">143: </a>  PetscErrorCode (*calcpairs_proj_trans)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line144">144: </a>  PetscErrorCode (*calcpairs_eigs_trans)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line145">145: </a>  PetscErrorCode (*calcpairs_eig_backtrans)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*);
+<a name="line146">146: </a>  PetscErrorCode (*calcpairs_proj_res)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscInt,Vec*);
+<a name="line147">147: </a>  PetscErrorCode (*preTestConv)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt,PetscInt,PetscInt,PetscInt*);
+<a name="line148">148: </a>  PetscErrorCode (*e_newIteration)(<font color="#4169E1">struct _dvdDashboard</font>*);
+<a name="line149">149: </a>  void *e_newIteration_data;
+
+<a name="line151">151: </a>  dvdFunctionList *startList;  <font color="#B22222">/* starting list */</font>
+<a name="line152">152: </a>  dvdFunctionList *endList;    <font color="#B22222">/* ending list */</font>
+<a name="line153">153: </a>  dvdFunctionList *destroyList;<font color="#B22222">/* destructor list */</font>
+
+<a name="line155">155: </a>  Mat       H,G;               <font color="#B22222">/* projected problem matrices */</font>
+<a name="line156">156: </a>  Mat       auxM;              <font color="#B22222">/* auxiliary dense matrix */</font>
+<a name="line157">157: </a>  PetscInt  size_MT;           <font color="#B22222">/* rows in MT */</font>
+
+<a name="line159">159: </a>  PetscInt  V_tra_s;
+<a name="line160">160: </a>  PetscInt  V_tra_e;       <font color="#B22222">/* cX <- [cX V*MT(0:V_tra_s-1)], V <- V*MT(V_tra_s:V_tra_e) */</font>
+<a name="line161">161: </a>  PetscInt  V_new_s;
+<a name="line162">162: </a>  PetscInt  V_new_e;           <font color="#B22222">/* added to V the columns V_new_s:V_new_e */</font>
+<a name="line163">163: </a>  PetscBool BV_shift;          <font color="#B22222">/* if true <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> is shifted when vectors converge */</font>
+<a name="line164">164: </a>  PetscBool W_shift;           <font color="#B22222">/* if true W is shifted when vectors converge */</font>
+<a name="line165">165: </a>} dvdDashboard;
+
+<a name="line167">167: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line168">168: </a>  <font color="#B22222">/*------------------------- User parameters ---------------------------*/</font>
+<a name="line169">169: </a>  PetscInt  blocksize;     <font color="#B22222">/* block size */</font>
+<a name="line170">170: </a>  PetscInt  initialsize;   <font color="#B22222">/* initial size of V */</font>
+<a name="line171">171: </a>  PetscInt  minv;          <font color="#B22222">/* size of V after restarting */</font>
+<a name="line172">172: </a>  PetscInt  plusk;         <font color="#B22222">/* keep plusk eigenvectors from the last iteration */</font>
+<a name="line173">173: </a>  PetscBool ipB;           <font color="#B22222">/* true if B-ortho is used */</font>
+<a name="line174">174: </a>  PetscReal fix;           <font color="#B22222">/* the fix parameter */</font>
+<a name="line175">175: </a>  PetscBool krylovstart;   <font color="#B22222">/* true if the starting subspace is a Krylov basis */</font>
+<a name="line176">176: </a>  PetscBool dynamic;       <font color="#B22222">/* true if dynamic stopping criterion is used */</font>
+<a name="line177">177: </a>  PetscInt  cX_in_proj;    <font color="#B22222">/* converged vectors in the projected problem */</font>
+<a name="line178">178: </a>  PetscInt  cX_in_impr;    <font color="#B22222">/* converged vectors in the projector */</font>
+<a name="line179">179: </a>  PetscBool doubleexp;     <font color="#B22222">/* double expansion in GD (GD2) */</font>
+
+<a name="line181">181: </a>  <font color="#B22222">/*----------------- Child objects and working data -------------------*/</font>
+<a name="line182">182: </a>  dvdDashboard ddb;
+<a name="line183">183: </a>} EPS_DAVIDSON;
+
+<a name="line187">187: </a><strong><font color="#4169E1"><a name="EPSDavidsonFLAdd"></a>PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLAdd(dvdFunctionList **fl,dvdCallback f)</font></strong>
+<a name="line188">188: </a>{
+<a name="line190">190: </a>  dvdFunctionList *l;
+
+<a name="line193">193: </a>  PetscNew(&l);
+<a name="line194">194: </a>  l->f = f;
+<a name="line195">195: </a>  l->next = *fl;
+<a name="line196">196: </a>  *fl = l;
+<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
+<a name="line198">198: </a>}
+<a name="line199">199: </a>  
+<a name="line202">202: </a><strong><font color="#4169E1"><a name="EPSDavidsonFLCall"></a>PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLCall(dvdFunctionList *fl,dvdDashboard *d)</font></strong>
+<a name="line203">203: </a>{
+<a name="line205">205: </a>  dvdFunctionList *l;
+
+<a name="line208">208: </a>  <font color="#4169E1">for</font> (l=fl;l;l=l->next) { (l->f)(d); }
+<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
+<a name="line210">210: </a>}
+
+<a name="line214">214: </a><strong><font color="#4169E1"><a name="EPSDavidsonFLDestroy"></a>PETSC_STATIC_INLINE PetscErrorCode EPSDavidsonFLDestroy(dvdFunctionList **fl)</font></strong>
+<a name="line215">215: </a>{
+<a name="line216">216: </a>  PetscErrorCode  ierr;
+<a name="line217">217: </a>  dvdFunctionList *l,*l0;
+
+<a name="line220">220: </a>  <font color="#4169E1">for</font> (l=*fl;l;l=l0) {
+<a name="line221">221: </a>    l0 = l->next;
+<a name="line222">222: </a>    PetscFree(l);
+<a name="line223">223: </a>  }
+<a name="line224">224: </a>  *fl = NULL;
+<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
+<a name="line226">226: </a>}
+
+<a name="line228">228: </a><font color="#B22222">/*</font>
+<a name="line229">229: </a><font color="#B22222">  The blackboard configuration structure: saves information about the memory</font>
+<a name="line230">230: </a><font color="#B22222">  and other requirements.</font>
+
+<a name="line232">232: </a><font color="#B22222">  The starting memory structure:</font>
+
+<a name="line234">234: </a><font color="#B22222">  V           W?          AV          <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>?          tKZ</font>
+<a name="line235">235: </a><font color="#B22222">  |-----------|-----------|-----------|------------|-------|</font>
+<a name="line236">236: </a><font color="#B22222">  nev+mpd     nev+mpd     scP+mpd     nev?+mpd     sP+scP</font>
+<a name="line237">237: </a><font color="#B22222">              scP+mpd                 scP+mpd</font>
+
+<a name="line239">239: </a><font color="#B22222">  The final memory structure considering W_shift and BV_shift:</font>
+
+<a name="line241">241: </a><font color="#B22222">  cX  V       cY?  W?     cAV AV      BcX? <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>?     KZ  tKZ</font>
+<a name="line242">242: </a><font color="#B22222">  |---|-------|----|------|---|-------|----|-------|---|---|</font>
+<a name="line243">243: </a><font color="#B22222">  nev mpd     nev  mpd    scP mpd     nev  mpd     scP sP    <- shift</font>
+<a name="line244">244: </a><font color="#B22222">              scP                     scP                    <- !shift</font>
+<a name="line245">245: </a><font color="#B22222">*/</font>
+<a name="line246">246: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line247">247: </a>  PetscInt max_size_V;         <font color="#B22222">/* max size of the searching subspace (mpd) */</font>
+<a name="line248">248: </a>  PetscInt max_size_X;         <font color="#B22222">/* max size of X (bs) */</font>
+<a name="line249">249: </a>  PetscInt size_V;             <font color="#B22222">/* real size of V (nev+size_P+mpd) */</font>
+<a name="line250">250: </a>  PetscInt max_size_oldX;      <font color="#B22222">/* max size of oldX */</font>
+<a name="line251">251: </a>  PetscInt max_nev;            <font color="#B22222">/* max number of converged pairs */</font>
+<a name="line252">252: </a>  PetscInt max_size_P;         <font color="#B22222">/* number of computed vectors for the projector */</font>
+<a name="line253">253: </a>  PetscInt max_size_cP;        <font color="#B22222">/* number of converged vectors in the projectors */</font>
+<a name="line254">254: </a>  PetscInt max_size_proj;      <font color="#B22222">/* max size projected problem */</font>
+<a name="line255">255: </a>  PetscInt max_size_cX_proj;   <font color="#B22222">/* max converged vectors in the projected problem */</font>
+<a name="line256">256: </a>  PetscInt state;              <font color="#B22222">/* method states:</font>
+<a name="line257">257: </a><font color="#B22222">                                   0: preconfiguring</font>
+<a name="line258">258: </a><font color="#B22222">                                   1: configuring</font>
+<a name="line259">259: </a><font color="#B22222">                                   2: running */</font>
+<a name="line260">260: </a>} dvdBlackboard;
+
+<a name="line262">262: </a><strong><font color="#228B22">#define DVD_STATE_PRECONF 0</font></strong>
+<a name="line263">263: </a><strong><font color="#228B22">#define DVD_STATE_CONF 1</font></strong>
+<a name="line264">264: </a><strong><font color="#228B22">#define DVD_STATE_RUN 2</font></strong>
+
+<a name="line266">266: </a><font color="#B22222">/* Prototypes of non-static auxiliary functions */</font>
+<a name="line267">267: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_calcpairs_qz(dvdDashboard*,dvdBlackboard*,PetscBool,PetscInt,PetscBool)</font></strong>;
+<a name="line268">268: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_improvex_gd2(dvdDashboard*,dvdBlackboard*,KSP,PetscInt)</font></strong>;
+<a name="line269">269: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_improvex_jd(dvdDashboard*,dvdBlackboard*,KSP,PetscInt,PetscInt,PetscBool)</font></strong>;
+<a name="line270">270: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard*,dvdBlackboard*,ProjType_t)</font></strong>;
+<a name="line271">271: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard*,dvdBlackboard*,PetscInt,PetscReal,PetscReal)</font></strong>;
+<a name="line272">272: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_improvex_compute_X(dvdDashboard*,PetscInt,PetscInt,Vec*,PetscScalar*,PetscInt)</font></strong>;
+<a name="line273">273: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_initV(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscBool)</font></strong>;
+<a name="line274">274: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_orthV(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line275">275: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_schm_basic_preconf(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,HarmType_t,KSP,InitType_t,PetscBool,PetscBool,PetscInt,PetscInt,PetscBool)</font></strong>;
+<a name="line276">276: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_schm_basic_conf(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,HarmType_t,PetscBool,PetscScalar,KSP,PetscReal,InitType_t,PetscBool,PetscBool,PetscInt,PetscInt,PetscBool,PetscBool)</font></strong>;
+<a name="line277">277: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_testconv_basic(dvdDashboard*,dvdBlackboard*)</font></strong>;
+<a name="line278">278: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_testconv_slepc(dvdDashboard*,dvdBlackboard*)</font></strong>;
+<a name="line279">279: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_managementV_basic(dvdDashboard*,dvdBlackboard*,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool,PetscBool)</font></strong>;
+<a name="line280">280: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_static_precond_PC(dvdDashboard*,dvdBlackboard*,PC)</font></strong>;
+<a name="line281">281: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_jacobi_precond(dvdDashboard*,dvdBlackboard*)</font></strong>;
+<a name="line282">282: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_harm_updateproj(dvdDashboard*)</font></strong>;
+<a name="line283">283: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode dvd_harm_conf(dvdDashboard*,dvdBlackboard*,HarmType_t,PetscBool,PetscScalar)</font></strong>;
+
+<a name="line285">285: </a><font color="#B22222">/* Internal interface routines */</font>
+<a name="line286">286: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSReset_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line287">287: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSSetUp_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line288">288: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSSolve_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line289">289: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSComputeVectors_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+<a name="line290">290: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDSetKrylovStart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line291">291: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetKrylovStart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line292">292: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDSetBlockSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line293">293: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetBlockSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line294">294: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDSetRestart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line295">295: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetRestart_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+<a name="line296">296: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetInitialSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*)</font></strong>;
+<a name="line297">297: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDSetInitialSize_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt)</font></strong>;
+<a name="line298">298: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetFix_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*)</font></strong>;
+<a name="line299">299: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSJDSetFix_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal)</font></strong>;
+<a name="line300">300: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDSetBOrth_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line301">301: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetBOrth_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line302">302: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSJDSetConstCorrectionTol_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool)</font></strong>;
+<a name="line303">303: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSJDGetConstCorrectionTol_JD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*)</font></strong>;
+<a name="line304">304: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDSetWindowSizes_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt)</font></strong>;
+<a name="line305">305: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode EPSXDGetWindowSizes_XD(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*)</font></strong>;
+
+</pre>
+</body>
+
+</html>
diff --git a/src/eps/impls/davidson/dvdcalcpairs.c b/src/eps/impls/davidson/dvdcalcpairs.c
index 1ab9892..360022d 100644
--- a/src/eps/impls/davidson/dvdcalcpairs.c
+++ b/src/eps/impls/davidson/dvdcalcpairs.c
@@ -12,7 +12,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -270,7 +270,7 @@ static PetscErrorCode dvd_calcpairs_proj(dvdDashboard *d)
     l+= d->V_tra_s;
   } else {
     /* 2. V <- orth(V, V_new) */
-    ierr = dvd_orthV(d->eps->V,l+d->V_new_s,l+d->V_new_e,d->eps->rand);CHKERRQ(ierr);
+    ierr = dvd_orthV(d->eps->V,l+d->V_new_s,l+d->V_new_e);CHKERRQ(ierr);
     /* 3. AV <- [AV A * V(V_new_s:V_new_e-1)] */
     /* Check consistency */
     if (k-l != d->V_new_s) SETERRQ(PETSC_COMM_SELF,1, "Consistency broken");
@@ -296,7 +296,7 @@ static PetscErrorCode dvd_calcpairs_proj(dvdDashboard *d)
     /* 5. W <- [W f(AV,BV)] */
     if (d->W) {
       ierr = d->calcpairs_W(d);CHKERRQ(ierr);
-      ierr = dvd_orthV(d->W,l+d->V_new_s,l+d->V_new_e,d->eps->rand);CHKERRQ(ierr);
+      ierr = dvd_orthV(d->W,l+d->V_new_s,l+d->V_new_e);CHKERRQ(ierr);
     }
     /* 6. H <- W' * AX; G <- W' * BX */
     ierr = BVSetActiveColumns(d->eps->V,l+d->V_new_s,l+d->V_new_e);CHKERRQ(ierr);
@@ -360,7 +360,6 @@ static PetscErrorCode dvd_calcpairs_apply_arbitrary(dvdDashboard *d,PetscInt r_s
   for (i=r_s;i<r_e;i++) {
     k = i;
     ierr = DSVectors(d->eps->ds,DS_MAT_X,&k,NULL);CHKERRQ(ierr);
-    ierr = DSNormalize(d->eps->ds,DS_MAT_X,i);CHKERRQ(ierr);
     ierr = DSGetArray(d->eps->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
     ierr = dvd_improvex_compute_X(d,i,k+1,X,pX,ld);CHKERRQ(ierr);
     ierr = DSRestoreArray(d->eps->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
@@ -520,7 +519,7 @@ static PetscErrorCode dvd_calcpairs_proj_res(dvdDashboard *d,PetscInt r_s,PetscI
 {
   PetscInt       i,l,k;
   PetscErrorCode ierr;
-  PetscBool      lindep;
+  PetscBool      lindep=PETSC_FALSE;
   BV             cX;
 
   PetscFunctionBegin;
diff --git a/src/eps/impls/davidson/dvdcalcpairs.c.html b/src/eps/impls/davidson/dvdcalcpairs.c.html
index 516b3d7..561b4e2 100644
--- a/src/eps/impls/davidson/dvdcalcpairs.c.html
+++ b/src/eps/impls/davidson/dvdcalcpairs.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdcalcpairs.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:02+00:00">
+<meta name="date" content="2016-05-16T10:32:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdcalcpairs.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdcalcpairs.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -24,7 +24,7 @@
 
 <a name="line13"> 13: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line14"> 14: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line15"> 15: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line15"> 15: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line17"> 17: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -256,7 +256,7 @@
 <a name="line270">270: </a>    l+= d->V_tra_s;
 <a name="line271">271: </a>  } <font color="#4169E1">else</font> {
 <a name="line272">272: </a>    <font color="#B22222">/* 2. V <- orth(V, V_new) */</font>
-<a name="line273">273: </a>    dvd_orthV(d->eps->V,l+d->V_new_s,l+d->V_new_e,d->eps->rand);
+<a name="line273">273: </a>    dvd_orthV(d->eps->V,l+d->V_new_s,l+d->V_new_e);
 <a name="line274">274: </a>    <font color="#B22222">/* 3. AV <- [AV A * V(V_new_s:V_new_e-1)] */</font>
 <a name="line275">275: </a>    <font color="#B22222">/* Check consistency */</font>
 <a name="line276">276: </a>    <font color="#4169E1">if</font> (k-l != d->V_new_s) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Consistency broken"</font>);
@@ -282,7 +282,7 @@
 <a name="line296">296: </a>    <font color="#B22222">/* 5. W <- [W f(AV,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>)] */</font>
 <a name="line297">297: </a>    <font color="#4169E1">if</font> (d->W) {
 <a name="line298">298: </a>      d->calcpairs_W(d);
-<a name="line299">299: </a>      dvd_orthV(d->W,l+d->V_new_s,l+d->V_new_e,d->eps->rand);
+<a name="line299">299: </a>      dvd_orthV(d->W,l+d->V_new_s,l+d->V_new_e);
 <a name="line300">300: </a>    }
 <a name="line301">301: </a>    <font color="#B22222">/* 6. H <- W' * AX; G <- W' * BX */</font>
 <a name="line302">302: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->eps->V,l+d->V_new_s,l+d->V_new_e);
@@ -342,253 +342,252 @@
 <a name="line360">360: </a>  <font color="#4169E1">for</font> (i=r_s;i<r_e;i++) {
 <a name="line361">361: </a>    k = i;
 <a name="line362">362: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(d->eps->ds,DS_MAT_X,&k,NULL);
-<a name="line363">363: </a>    <a href="../../../../docs/manualpages/DS/DSNormalize.html#DSNormalize">DSNormalize</a>(d->eps->ds,DS_MAT_X,i);
-<a name="line364">364: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_X,&pX);
-<a name="line365">365: </a>    dvd_improvex_compute_X(d,i,k+1,X,pX,ld);
-<a name="line366">366: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_X,&pX);
-<a name="line367">367: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line368">368: </a>    <font color="#4169E1">if</font> (d->nX[i] != 1.0) {
-<a name="line369">369: </a>      <font color="#4169E1">for</font> (j=i;j<k+1;j++) {
-<a name="line370">370: </a>        VecScale(X[j-i],1.0/d->nX[i]);
-<a name="line371">371: </a>      }
-<a name="line372">372: </a>    }
-<a name="line373">373: </a>    xr = X[0];
-<a name="line374">374: </a>    xi = X[1];
-<a name="line375">375: </a>    <font color="#4169E1">if</font> (i == k) {
-<a name="line376">376: </a>      VecSet(xi,0.0);
-<a name="line377">377: </a>    }
-<a name="line378">378: </a><font color="#A020F0">#else</font>
-<a name="line379">379: </a>    xr = X[0];
-<a name="line380">380: </a>    xi = NULL;
-<a name="line381">381: </a>    <font color="#4169E1">if</font> (d->nX[i] != 1.0) {
-<a name="line382">382: </a>      VecScale(xr,1.0/d->nX[i]);
-<a name="line383">383: </a>    }
-<a name="line384">384: </a><font color="#A020F0">#endif</font>
-<a name="line385">385: </a>    (d->eps->arbitrary)(rr[i-r_s],ri[i-r_s],xr,xi,&rr[i-r_s],&ri[i-r_s],d->eps->arbitraryctx);
-<a name="line386">386: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line387">387: </a>    <font color="#4169E1">if</font> (i != k) {
-<a name="line388">388: </a>      rr[i+1-r_s] = rr[i-r_s];
-<a name="line389">389: </a>      ri[i+1-r_s] = ri[i-r_s];
-<a name="line390">390: </a>      i++;
-<a name="line391">391: </a>    }
-<a name="line392">392: </a><font color="#A020F0">#endif</font>
-<a name="line393">393: </a>  }
-<a name="line394">394: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,N,&X);
-<a name="line395">395: </a>  <font color="#4169E1">return</font>(0);
-<a name="line396">396: </a>}
-
-<a name="line400">400: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_selectPairs"></a>static PetscErrorCode dvd_calcpairs_selectPairs(dvdDashboard *d,PetscInt n)</font></strong>
-<a name="line401">401: </a>{
-<a name="line402">402: </a>  PetscInt       k,lV,kV,nV;
-<a name="line403">403: </a>  PetscScalar    *rr,*ri;
-
-<a name="line407">407: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
-<a name="line408">408: </a>  nV = kV - lV; 
-<a name="line409">409: </a>  n = PetscMin(n,nV);
-<a name="line410">410: </a>  <font color="#B22222">/* Put the best n pairs at the beginning. Useful for restarting */</font>
-<a name="line411">411: </a>  <font color="#4169E1">if</font> (d->eps->arbitrary || d->calcpairs_eig_backtrans) {
-<a name="line412">412: </a>    PetscMalloc1(nV,&rr);
-<a name="line413">413: </a>    PetscMalloc1(nV,&ri);
-<a name="line414">414: </a>    dvd_calcpairs_apply_arbitrary(d,0,nV,rr,ri);
-<a name="line415">415: </a>  } <font color="#4169E1">else</font> {
-<a name="line416">416: </a>    rr = d->eigr;
-<a name="line417">417: </a>    ri = d->eigi;
-<a name="line418">418: </a>  }
-<a name="line419">419: </a>  k = n;
-<a name="line420">420: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(d->eps->ds,d->eigr,d->eigi,rr,ri,&k);
-<a name="line421">421: </a>  <font color="#B22222">/* Put the best pair at the beginning. Useful to check its residual */</font>
-<a name="line422">422: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line423">423: </a>  <font color="#4169E1">if</font> (n != 1 && (n != 2 || d->eigi[0] == 0.0))
-<a name="line424">424: </a><font color="#A020F0">#else</font>
-<a name="line425">425: </a>  <font color="#4169E1">if</font> (n != 1)
-<a name="line426">426: </a><font color="#A020F0">#endif</font>
-<a name="line427">427: </a>  {
-<a name="line428">428: </a>    dvd_calcpairs_apply_arbitrary(d,0,nV,rr,ri);
-<a name="line429">429: </a>    k = 1;
-<a name="line430">430: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(d->eps->ds,d->eigr,d->eigi,rr,ri,&k);
-<a name="line431">431: </a>  }
-<a name="line432">432: </a>  <font color="#4169E1">if</font> (d->calcpairs_eigs_trans) {
-<a name="line433">433: </a>    d->calcpairs_eigs_trans(d);
-<a name="line434">434: </a>  }
-<a name="line435">435: </a>  <font color="#4169E1">if</font> (d->eps->arbitrary || d->calcpairs_eig_backtrans) {
-<a name="line436">436: </a>    PetscFree(rr);
-<a name="line437">437: </a>    PetscFree(ri);
-<a name="line438">438: </a>  }
-<a name="line439">439: </a>  <font color="#4169E1">return</font>(0);
-<a name="line440">440: </a>}
-
-<a name="line444">444: </a><strong><font color="#4169E1"><a name="EPSXDComputeDSConv"></a>static PetscErrorCode EPSXDComputeDSConv(dvdDashboard *d)</font></strong>
-<a name="line445">445: </a>{
-<a name="line446">446: </a>  PetscErrorCode    ierr;
-<a name="line447">447: </a>  PetscInt          i,ld;
-<a name="line448">448: </a>  Vec               v;
-<a name="line449">449: </a>  PetscScalar       *pA;
-<a name="line450">450: </a>  const PetscScalar *pv;
-<a name="line451">451: </a>  PetscBool         symm;
-
-<a name="line454">454: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->eps->V,0,d->eps->nconv);
-<a name="line455">455: </a>  PetscObjectTypeCompareAny((PetscObject)d->eps->ds,&symm,DSHEP,<font color="#666666">""</font>);
-<a name="line456">456: </a>  <font color="#4169E1">if</font> (symm) <font color="#4169E1">return</font>(0);
-<a name="line457">457: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(d->eps->ds,d->eps->nconv,0,0,0);
-<a name="line458">458: </a>  <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_A,0,0,d->H,0,0,d->eps->nconv,d->eps->nconv,PETSC_FALSE);
-<a name="line459">459: </a>  <font color="#4169E1">if</font> (d->G) {
-<a name="line460">460: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_B,0,0,d->G,0,0,d->eps->nconv,d->eps->nconv,PETSC_FALSE);
-<a name="line461">461: </a>  }
-<a name="line462">462: </a>  <font color="#B22222">/* Set the signature on projected matrix B */</font>
-<a name="line463">463: </a>  <font color="#4169E1">if</font> (DVD_IS(d->sEP,DVD_EP_INDEFINITE)) {
-<a name="line464">464: </a>    <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ld);
-<a name="line465">465: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_B,&pA);
-<a name="line466">466: </a>    PetscMemzero(pA,<font color="#4169E1">sizeof</font>(PetscScalar)*d->eps->nconv*ld);
-<a name="line467">467: </a>    VecCreateSeq(PETSC_COMM_SELF,d->eps->nconv,&v);
-<a name="line468">468: </a>    <a href="../../../../docs/manualpages/BV/BVGetSignature.html#BVGetSignature">BVGetSignature</a>(d->eps->V,v);
-<a name="line469">469: </a>    VecGetArrayRead(v,&pv);
-<a name="line470">470: </a>    <font color="#4169E1">for</font> (i=0;i<d->eps->nconv;i++) pA[i+ld*i] = pv[i];
-<a name="line471">471: </a>    VecRestoreArrayRead(v,&pv);
-<a name="line472">472: </a>    VecDestroy(&v);
-<a name="line473">473: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_B,&pA);
-<a name="line474">474: </a>  }
-<a name="line475">475: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(d->eps->ds,DS_STATE_RAW);
-<a name="line476">476: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(d->eps->ds,d->eps->eigr,d->eps->eigi);
-<a name="line477">477: </a>  <font color="#4169E1">if</font> (d->W) {
-<a name="line478">478: </a>    <font color="#4169E1">for</font> (i=0; i<d->eps->nconv; i++) {
-<a name="line479">479: </a>      d->calcpairs_eig_backtrans(d,d->eps->eigr[i],d->eps->eigi[i],&d->eps->eigr[i],&d->eps->eigi[i]);
-<a name="line480">480: </a>    }
-<a name="line481">481: </a>  }
-<a name="line482">482: </a>  <font color="#4169E1">return</font>(0);
-<a name="line483">483: </a>}
-
-<a name="line487">487: </a><font color="#B22222">/*</font>
-<a name="line488">488: </a><font color="#B22222">   Compute the residual vectors R(i) <- (AV - <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>*eigr(i))*pX(i), and also</font>
-<a name="line489">489: </a><font color="#B22222">   the norm associated to the Schur pair, where i = r_s..r_e</font>
-<a name="line490">490: </a><font color="#B22222">*/</font>
-<a name="line491">491: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_res_0"></a>static PetscErrorCode dvd_calcpairs_res_0(dvdDashboard *d,PetscInt r_s,PetscInt r_e)</font></strong>
-<a name="line492">492: </a>{
-<a name="line493">493: </a>  PetscInt       i,ldpX;
-<a name="line494">494: </a>  PetscScalar    *pX;
-<a name="line496">496: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             BX = d->BX?d->BX:d->eps->V;
-<a name="line497">497: </a>  Vec            *R;
-
-<a name="line500">500: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ldpX);
-<a name="line501">501: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_Q,&pX);
-<a name="line502">502: </a>  <font color="#B22222">/* nX(i) <- ||X(i)|| */</font>
-<a name="line503">503: </a>  dvd_improvex_compute_X(d,r_s,r_e,NULL,pX,ldpX);
-<a name="line504">504: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,r_e-r_s,&R);
-<a name="line505">505: </a>  <font color="#4169E1">for</font> (i=r_s;i<r_e;i++) {
-<a name="line506">506: </a>    <font color="#B22222">/* R(i-r_s) <- AV*pX(i) */</font>
-<a name="line507">507: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,R[i-r_s],&pX[ldpX*i]);
-<a name="line508">508: </a>    <font color="#B22222">/* R(i-r_s) <- R(i-r_s) - eigr(i)*BX*pX(i) */</font>
-<a name="line509">509: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(BX,-d->eigr[i],1.0,R[i-r_s],&pX[ldpX*i]);
-<a name="line510">510: </a>  }
-<a name="line511">511: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_Q,&pX);
-<a name="line512">512: </a>  d->calcpairs_proj_res(d,r_s,r_e,R);
-<a name="line513">513: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,r_e-r_s,&R);
-<a name="line514">514: </a>  <font color="#4169E1">return</font>(0);
-<a name="line515">515: </a>}
-
-<a name="line519">519: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_proj_res"></a>static PetscErrorCode dvd_calcpairs_proj_res(dvdDashboard *d,PetscInt r_s,PetscInt r_e,Vec *R)</font></strong>
-<a name="line520">520: </a>{
-<a name="line521">521: </a>  PetscInt       i,l,k;
-<a name="line523">523: </a>  PetscBool      lindep;
-<a name="line524">524: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             cX;
-
-<a name="line527">527: </a>  <font color="#4169E1">if</font> (d->W) cX = d->W; <font color="#B22222">/* If left subspace exists, R <- orth(cY, R), nR[i] <- ||R[i]|| */</font>
-<a name="line528">528: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!(DVD_IS(d->sEP, DVD_EP_STD) && DVD_IS(d->sEP, DVD_EP_HERMITIAN))) cX = d->eps->V; <font color="#B22222">/* If not HEP, R <- orth(cX, R), nR[i] <- ||R[i]|| */</font>
-<a name="line529">529: </a>  <font color="#4169E1">else</font> cX = NULL; <font color="#B22222">/* Otherwise, nR[i] <- ||R[i]|| */</font>
-
-<a name="line531">531: </a>  <font color="#4169E1">if</font> (cX) {
-<a name="line532">532: </a>    <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(cX,&l,&k);
-<a name="line533">533: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(cX,0,l);
-<a name="line534">534: </a>    <font color="#4169E1">for</font> (i=0;i<r_e-r_s;i++) {
-<a name="line535">535: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(cX,R[i],NULL,&d->nR[r_s+i],&lindep);
-<a name="line536">536: </a>    }
-<a name="line537">537: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(cX,l,k);
-<a name="line538">538: </a>    <font color="#4169E1">if</font> (lindep || (PetscAbs(d->nR[r_s+i]) < PETSC_MACHINE_EPSILON)) {
-<a name="line539">539: </a>      PetscInfo2(d->eps,<font color="#666666">"The computed eigenvector residual %D is too low, %g!\n"</font>,r_s+i,(double)(d->nR[r_s+i]));
-<a name="line540">540: </a>    }
-<a name="line541">541: </a>  } <font color="#4169E1">else</font> {
-<a name="line542">542: </a>    <font color="#4169E1">for</font> (i=0;i<r_e-r_s;i++) {
-<a name="line543">543: </a>      VecNormBegin(R[i],NORM_2,&d->nR[r_s+i]);
-<a name="line544">544: </a>    }
-<a name="line545">545: </a>    <font color="#4169E1">for</font> (i=0;i<r_e-r_s;i++) {
-<a name="line546">546: </a>      VecNormEnd(R[i],NORM_2,&d->nR[r_s+i]);
-<a name="line547">547: </a>    }
-<a name="line548">548: </a>  }
-<a name="line549">549: </a>  <font color="#4169E1">return</font>(0);
-<a name="line550">550: </a>}
-
-<a name="line554">554: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_qz"></a>PetscErrorCode dvd_calcpairs_qz(dvdDashboard *d,dvdBlackboard *b,PetscBool borth,PetscInt cX_proj,PetscBool harm)</font></strong>
-<a name="line555">555: </a>{
-<a name="line557">557: </a>  PetscBool      std_probl,her_probl,ind_probl,her_ind_probl;
-<a name="line558">558: </a>  <a href="../../../../docs/manualpages/DS/DSType.html#DSType">DSType</a>         dstype;
-<a name="line559">559: </a>  Vec            v1;
-
-<a name="line562">562: </a>  std_probl = DVD_IS(d->sEP,DVD_EP_STD)? PETSC_TRUE: PETSC_FALSE;
-<a name="line563">563: </a>  her_probl = DVD_IS(d->sEP,DVD_EP_HERMITIAN)? PETSC_TRUE: PETSC_FALSE;
-<a name="line564">564: </a>  ind_probl = DVD_IS(d->sEP,DVD_EP_INDEFINITE)? PETSC_TRUE: PETSC_FALSE;
-<a name="line565">565: </a>  her_ind_probl = (her_probl||ind_probl)? PETSC_TRUE: PETSC_FALSE;
-
-<a name="line567">567: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
-<a name="line568">568: </a>  b->max_size_proj = PetscMax(b->max_size_proj,b->max_size_V+cX_proj);
-<a name="line569">569: </a>  d->W_shift = d->B? PETSC_TRUE: PETSC_FALSE;
-<a name="line570">570: </a>  <font color="#4169E1">if</font> (d->B && her_ind_probl && !borth) d->BV_shift = PETSC_TRUE;
-<a name="line571">571: </a>  <font color="#4169E1">else</font> d->BV_shift = PETSC_FALSE;
-
-<a name="line573">573: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line574">574: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line575">575: </a>    d->max_cX_in_proj = cX_proj;
-<a name="line576">576: </a>    d->max_size_P = b->max_size_P;
-<a name="line577">577: </a>    d->max_size_proj = b->max_size_proj;
-<a name="line578">578: </a>    <font color="#B22222">/* Create a <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> if the method works with Schur decompositions */</font>
-<a name="line579">579: </a>    d->calcPairs = dvd_calcpairs_proj;
-<a name="line580">580: </a>    d->calcpairs_residual = dvd_calcpairs_res_0;
-<a name="line581">581: </a>    d->calcpairs_proj_res = dvd_calcpairs_proj_res;
-<a name="line582">582: </a>    d->calcpairs_selectPairs = dvd_calcpairs_selectPairs;
-<a name="line583">583: </a>    <font color="#B22222">/* Create and configure a <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> for solving the projected problems */</font>
-<a name="line584">584: </a>    <font color="#4169E1">if</font> (d->W) dstype = DSGNHEP;    <font color="#B22222">/* If we use harmonics */</font>
-<a name="line585">585: </a>    <font color="#4169E1">else</font> {
-<a name="line586">586: </a>      <font color="#4169E1">if</font> (ind_probl) dstype = DSGHIEP;
-<a name="line587">587: </a>      <font color="#4169E1">else</font> <font color="#4169E1">if</font> (std_probl) dstype = her_probl? DSHEP : DSNHEP;
-<a name="line588">588: </a>      <font color="#4169E1">else</font> dstype = her_probl? DSGHEP : DSGNHEP;
-<a name="line589">589: </a>    }
-<a name="line590">590: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(d->eps->ds,dstype);
-<a name="line591">591: </a>    <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(d->eps->ds,d->eps->ncv);
-<a name="line592">592: </a>    <font color="#B22222">/* Create various vector basis */</font>
-<a name="line593">593: </a>    <font color="#4169E1">if</font> (harm) {
-<a name="line594">594: </a>      <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->W);
-<a name="line595">595: </a>      <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->W,NULL,PETSC_FALSE);
-<a name="line596">596: </a>    } <font color="#4169E1">else</font> d->W = NULL;
-<a name="line597">597: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->AX);
-<a name="line598">598: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->AX,NULL,PETSC_FALSE);
-<a name="line599">599: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->auxBV);
-<a name="line600">600: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->auxBV,NULL,PETSC_FALSE);
-<a name="line601">601: </a>    <font color="#4169E1">if</font> (d->B) {
-<a name="line602">602: </a>      <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->BX);
-<a name="line603">603: </a>      <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->BX,NULL,PETSC_FALSE);
-<a name="line604">604: </a>    } <font color="#4169E1">else</font> d->BX = NULL;
-<a name="line605">605: </a>    MatCreateVecs(d->A,&v1,NULL);
-<a name="line606">606: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolCreate.html#SlepcVecPoolCreate">SlepcVecPoolCreate</a>(v1,0,&d->auxV);
-<a name="line607">607: </a>    VecDestroy(&v1);
-<a name="line608">608: </a>    <font color="#B22222">/* Create projected problem matrices */</font>
-<a name="line609">609: </a>    MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&d->H);
-<a name="line610">610: </a>    <font color="#4169E1">if</font> (!std_probl) {
-<a name="line611">611: </a>      MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&d->G);
-<a name="line612">612: </a>    } <font color="#4169E1">else</font> d->G = NULL;
-<a name="line613">613: </a>    <font color="#4169E1">if</font> (her_probl) {
-<a name="line614">614: </a>      MatSetOption(d->H,MAT_HERMITIAN,PETSC_TRUE);
-<a name="line615">615: </a>      <font color="#4169E1">if</font> (d->G) { MatSetOption(d->G,MAT_HERMITIAN,PETSC_TRUE); }
-<a name="line616">616: </a>    }
-
-<a name="line618">618: </a>    <font color="#4169E1">if</font> (ind_probl) {
-<a name="line619">619: </a>      PetscMalloc1(d->eps->ncv,&d->nBds);
-<a name="line620">620: </a>    } <font color="#4169E1">else</font> d->nBds = NULL;
-<a name="line621">621: </a>    MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&d->auxM);
-
-<a name="line623">623: </a>    EPSDavidsonFLAdd(&d->startList,dvd_calcpairs_qz_start);
-<a name="line624">624: </a>    EPSDavidsonFLAdd(&d->endList,EPSXDComputeDSConv);
-<a name="line625">625: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_calcpairs_qz_d);
-<a name="line626">626: </a>  }
-<a name="line627">627: </a>  <font color="#4169E1">return</font>(0);
-<a name="line628">628: </a>}
+<a name="line363">363: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_X,&pX);
+<a name="line364">364: </a>    dvd_improvex_compute_X(d,i,k+1,X,pX,ld);
+<a name="line365">365: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_X,&pX);
+<a name="line366">366: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line367">367: </a>    <font color="#4169E1">if</font> (d->nX[i] != 1.0) {
+<a name="line368">368: </a>      <font color="#4169E1">for</font> (j=i;j<k+1;j++) {
+<a name="line369">369: </a>        VecScale(X[j-i],1.0/d->nX[i]);
+<a name="line370">370: </a>      }
+<a name="line371">371: </a>    }
+<a name="line372">372: </a>    xr = X[0];
+<a name="line373">373: </a>    xi = X[1];
+<a name="line374">374: </a>    <font color="#4169E1">if</font> (i == k) {
+<a name="line375">375: </a>      VecSet(xi,0.0);
+<a name="line376">376: </a>    }
+<a name="line377">377: </a><font color="#A020F0">#else</font>
+<a name="line378">378: </a>    xr = X[0];
+<a name="line379">379: </a>    xi = NULL;
+<a name="line380">380: </a>    <font color="#4169E1">if</font> (d->nX[i] != 1.0) {
+<a name="line381">381: </a>      VecScale(xr,1.0/d->nX[i]);
+<a name="line382">382: </a>    }
+<a name="line383">383: </a><font color="#A020F0">#endif</font>
+<a name="line384">384: </a>    (d->eps->arbitrary)(rr[i-r_s],ri[i-r_s],xr,xi,&rr[i-r_s],&ri[i-r_s],d->eps->arbitraryctx);
+<a name="line385">385: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line386">386: </a>    <font color="#4169E1">if</font> (i != k) {
+<a name="line387">387: </a>      rr[i+1-r_s] = rr[i-r_s];
+<a name="line388">388: </a>      ri[i+1-r_s] = ri[i-r_s];
+<a name="line389">389: </a>      i++;
+<a name="line390">390: </a>    }
+<a name="line391">391: </a><font color="#A020F0">#endif</font>
+<a name="line392">392: </a>  }
+<a name="line393">393: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,N,&X);
+<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
+<a name="line395">395: </a>}
+
+<a name="line399">399: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_selectPairs"></a>static PetscErrorCode dvd_calcpairs_selectPairs(dvdDashboard *d,PetscInt n)</font></strong>
+<a name="line400">400: </a>{
+<a name="line401">401: </a>  PetscInt       k,lV,kV,nV;
+<a name="line402">402: </a>  PetscScalar    *rr,*ri;
+
+<a name="line406">406: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
+<a name="line407">407: </a>  nV = kV - lV; 
+<a name="line408">408: </a>  n = PetscMin(n,nV);
+<a name="line409">409: </a>  <font color="#B22222">/* Put the best n pairs at the beginning. Useful for restarting */</font>
+<a name="line410">410: </a>  <font color="#4169E1">if</font> (d->eps->arbitrary || d->calcpairs_eig_backtrans) {
+<a name="line411">411: </a>    PetscMalloc1(nV,&rr);
+<a name="line412">412: </a>    PetscMalloc1(nV,&ri);
+<a name="line413">413: </a>    dvd_calcpairs_apply_arbitrary(d,0,nV,rr,ri);
+<a name="line414">414: </a>  } <font color="#4169E1">else</font> {
+<a name="line415">415: </a>    rr = d->eigr;
+<a name="line416">416: </a>    ri = d->eigi;
+<a name="line417">417: </a>  }
+<a name="line418">418: </a>  k = n;
+<a name="line419">419: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(d->eps->ds,d->eigr,d->eigi,rr,ri,&k);
+<a name="line420">420: </a>  <font color="#B22222">/* Put the best pair at the beginning. Useful to check its residual */</font>
+<a name="line421">421: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line422">422: </a>  <font color="#4169E1">if</font> (n != 1 && (n != 2 || d->eigi[0] == 0.0))
+<a name="line423">423: </a><font color="#A020F0">#else</font>
+<a name="line424">424: </a>  <font color="#4169E1">if</font> (n != 1)
+<a name="line425">425: </a><font color="#A020F0">#endif</font>
+<a name="line426">426: </a>  {
+<a name="line427">427: </a>    dvd_calcpairs_apply_arbitrary(d,0,nV,rr,ri);
+<a name="line428">428: </a>    k = 1;
+<a name="line429">429: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(d->eps->ds,d->eigr,d->eigi,rr,ri,&k);
+<a name="line430">430: </a>  }
+<a name="line431">431: </a>  <font color="#4169E1">if</font> (d->calcpairs_eigs_trans) {
+<a name="line432">432: </a>    d->calcpairs_eigs_trans(d);
+<a name="line433">433: </a>  }
+<a name="line434">434: </a>  <font color="#4169E1">if</font> (d->eps->arbitrary || d->calcpairs_eig_backtrans) {
+<a name="line435">435: </a>    PetscFree(rr);
+<a name="line436">436: </a>    PetscFree(ri);
+<a name="line437">437: </a>  }
+<a name="line438">438: </a>  <font color="#4169E1">return</font>(0);
+<a name="line439">439: </a>}
+
+<a name="line443">443: </a><strong><font color="#4169E1"><a name="EPSXDComputeDSConv"></a>static PetscErrorCode EPSXDComputeDSConv(dvdDashboard *d)</font></strong>
+<a name="line444">444: </a>{
+<a name="line445">445: </a>  PetscErrorCode    ierr;
+<a name="line446">446: </a>  PetscInt          i,ld;
+<a name="line447">447: </a>  Vec               v;
+<a name="line448">448: </a>  PetscScalar       *pA;
+<a name="line449">449: </a>  const PetscScalar *pv;
+<a name="line450">450: </a>  PetscBool         symm;
+
+<a name="line453">453: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->eps->V,0,d->eps->nconv);
+<a name="line454">454: </a>  PetscObjectTypeCompareAny((PetscObject)d->eps->ds,&symm,DSHEP,<font color="#666666">""</font>);
+<a name="line455">455: </a>  <font color="#4169E1">if</font> (symm) <font color="#4169E1">return</font>(0);
+<a name="line456">456: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(d->eps->ds,d->eps->nconv,0,0,0);
+<a name="line457">457: </a>  <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_A,0,0,d->H,0,0,d->eps->nconv,d->eps->nconv,PETSC_FALSE);
+<a name="line458">458: </a>  <font color="#4169E1">if</font> (d->G) {
+<a name="line459">459: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_B,0,0,d->G,0,0,d->eps->nconv,d->eps->nconv,PETSC_FALSE);
+<a name="line460">460: </a>  }
+<a name="line461">461: </a>  <font color="#B22222">/* Set the signature on projected matrix B */</font>
+<a name="line462">462: </a>  <font color="#4169E1">if</font> (DVD_IS(d->sEP,DVD_EP_INDEFINITE)) {
+<a name="line463">463: </a>    <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ld);
+<a name="line464">464: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_B,&pA);
+<a name="line465">465: </a>    PetscMemzero(pA,<font color="#4169E1">sizeof</font>(PetscScalar)*d->eps->nconv*ld);
+<a name="line466">466: </a>    VecCreateSeq(PETSC_COMM_SELF,d->eps->nconv,&v);
+<a name="line467">467: </a>    <a href="../../../../docs/manualpages/BV/BVGetSignature.html#BVGetSignature">BVGetSignature</a>(d->eps->V,v);
+<a name="line468">468: </a>    VecGetArrayRead(v,&pv);
+<a name="line469">469: </a>    <font color="#4169E1">for</font> (i=0;i<d->eps->nconv;i++) pA[i+ld*i] = pv[i];
+<a name="line470">470: </a>    VecRestoreArrayRead(v,&pv);
+<a name="line471">471: </a>    VecDestroy(&v);
+<a name="line472">472: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_B,&pA);
+<a name="line473">473: </a>  }
+<a name="line474">474: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(d->eps->ds,DS_STATE_RAW);
+<a name="line475">475: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(d->eps->ds,d->eps->eigr,d->eps->eigi);
+<a name="line476">476: </a>  <font color="#4169E1">if</font> (d->W) {
+<a name="line477">477: </a>    <font color="#4169E1">for</font> (i=0; i<d->eps->nconv; i++) {
+<a name="line478">478: </a>      d->calcpairs_eig_backtrans(d,d->eps->eigr[i],d->eps->eigi[i],&d->eps->eigr[i],&d->eps->eigi[i]);
+<a name="line479">479: </a>    }
+<a name="line480">480: </a>  }
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><font color="#B22222">/*</font>
+<a name="line487">487: </a><font color="#B22222">   Compute the residual vectors R(i) <- (AV - <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>*eigr(i))*pX(i), and also</font>
+<a name="line488">488: </a><font color="#B22222">   the norm associated to the Schur pair, where i = r_s..r_e</font>
+<a name="line489">489: </a><font color="#B22222">*/</font>
+<a name="line490">490: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_res_0"></a>static PetscErrorCode dvd_calcpairs_res_0(dvdDashboard *d,PetscInt r_s,PetscInt r_e)</font></strong>
+<a name="line491">491: </a>{
+<a name="line492">492: </a>  PetscInt       i,ldpX;
+<a name="line493">493: </a>  PetscScalar    *pX;
+<a name="line495">495: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             BX = d->BX?d->BX:d->eps->V;
+<a name="line496">496: </a>  Vec            *R;
+
+<a name="line499">499: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ldpX);
+<a name="line500">500: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_Q,&pX);
+<a name="line501">501: </a>  <font color="#B22222">/* nX(i) <- ||X(i)|| */</font>
+<a name="line502">502: </a>  dvd_improvex_compute_X(d,r_s,r_e,NULL,pX,ldpX);
+<a name="line503">503: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,r_e-r_s,&R);
+<a name="line504">504: </a>  <font color="#4169E1">for</font> (i=r_s;i<r_e;i++) {
+<a name="line505">505: </a>    <font color="#B22222">/* R(i-r_s) <- AV*pX(i) */</font>
+<a name="line506">506: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,R[i-r_s],&pX[ldpX*i]);
+<a name="line507">507: </a>    <font color="#B22222">/* R(i-r_s) <- R(i-r_s) - eigr(i)*BX*pX(i) */</font>
+<a name="line508">508: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(BX,-d->eigr[i],1.0,R[i-r_s],&pX[ldpX*i]);
+<a name="line509">509: </a>  }
+<a name="line510">510: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_Q,&pX);
+<a name="line511">511: </a>  d->calcpairs_proj_res(d,r_s,r_e,R);
+<a name="line512">512: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,r_e-r_s,&R);
+<a name="line513">513: </a>  <font color="#4169E1">return</font>(0);
+<a name="line514">514: </a>}
+
+<a name="line518">518: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_proj_res"></a>static PetscErrorCode dvd_calcpairs_proj_res(dvdDashboard *d,PetscInt r_s,PetscInt r_e,Vec *R)</font></strong>
+<a name="line519">519: </a>{
+<a name="line520">520: </a>  PetscInt       i,l,k;
+<a name="line522">522: </a>  PetscBool      lindep=PETSC_FALSE;
+<a name="line523">523: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             cX;
+
+<a name="line526">526: </a>  <font color="#4169E1">if</font> (d->W) cX = d->W; <font color="#B22222">/* If left subspace exists, R <- orth(cY, R), nR[i] <- ||R[i]|| */</font>
+<a name="line527">527: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!(DVD_IS(d->sEP, DVD_EP_STD) && DVD_IS(d->sEP, DVD_EP_HERMITIAN))) cX = d->eps->V; <font color="#B22222">/* If not HEP, R <- orth(cX, R), nR[i] <- ||R[i]|| */</font>
+<a name="line528">528: </a>  <font color="#4169E1">else</font> cX = NULL; <font color="#B22222">/* Otherwise, nR[i] <- ||R[i]|| */</font>
+
+<a name="line530">530: </a>  <font color="#4169E1">if</font> (cX) {
+<a name="line531">531: </a>    <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(cX,&l,&k);
+<a name="line532">532: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(cX,0,l);
+<a name="line533">533: </a>    <font color="#4169E1">for</font> (i=0;i<r_e-r_s;i++) {
+<a name="line534">534: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(cX,R[i],NULL,&d->nR[r_s+i],&lindep);
+<a name="line535">535: </a>    }
+<a name="line536">536: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(cX,l,k);
+<a name="line537">537: </a>    <font color="#4169E1">if</font> (lindep || (PetscAbs(d->nR[r_s+i]) < PETSC_MACHINE_EPSILON)) {
+<a name="line538">538: </a>      PetscInfo2(d->eps,<font color="#666666">"The computed eigenvector residual %D is too low, %g!\n"</font>,r_s+i,(double)(d->nR[r_s+i]));
+<a name="line539">539: </a>    }
+<a name="line540">540: </a>  } <font color="#4169E1">else</font> {
+<a name="line541">541: </a>    <font color="#4169E1">for</font> (i=0;i<r_e-r_s;i++) {
+<a name="line542">542: </a>      VecNormBegin(R[i],NORM_2,&d->nR[r_s+i]);
+<a name="line543">543: </a>    }
+<a name="line544">544: </a>    <font color="#4169E1">for</font> (i=0;i<r_e-r_s;i++) {
+<a name="line545">545: </a>      VecNormEnd(R[i],NORM_2,&d->nR[r_s+i]);
+<a name="line546">546: </a>    }
+<a name="line547">547: </a>  }
+<a name="line548">548: </a>  <font color="#4169E1">return</font>(0);
+<a name="line549">549: </a>}
+
+<a name="line553">553: </a><strong><font color="#4169E1"><a name="dvd_calcpairs_qz"></a>PetscErrorCode dvd_calcpairs_qz(dvdDashboard *d,dvdBlackboard *b,PetscBool borth,PetscInt cX_proj,PetscBool harm)</font></strong>
+<a name="line554">554: </a>{
+<a name="line556">556: </a>  PetscBool      std_probl,her_probl,ind_probl,her_ind_probl;
+<a name="line557">557: </a>  <a href="../../../../docs/manualpages/DS/DSType.html#DSType">DSType</a>         dstype;
+<a name="line558">558: </a>  Vec            v1;
+
+<a name="line561">561: </a>  std_probl = DVD_IS(d->sEP,DVD_EP_STD)? PETSC_TRUE: PETSC_FALSE;
+<a name="line562">562: </a>  her_probl = DVD_IS(d->sEP,DVD_EP_HERMITIAN)? PETSC_TRUE: PETSC_FALSE;
+<a name="line563">563: </a>  ind_probl = DVD_IS(d->sEP,DVD_EP_INDEFINITE)? PETSC_TRUE: PETSC_FALSE;
+<a name="line564">564: </a>  her_ind_probl = (her_probl||ind_probl)? PETSC_TRUE: PETSC_FALSE;
+
+<a name="line566">566: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
+<a name="line567">567: </a>  b->max_size_proj = PetscMax(b->max_size_proj,b->max_size_V+cX_proj);
+<a name="line568">568: </a>  d->W_shift = d->B? PETSC_TRUE: PETSC_FALSE;
+<a name="line569">569: </a>  <font color="#4169E1">if</font> (d->B && her_ind_probl && !borth) d->BV_shift = PETSC_TRUE;
+<a name="line570">570: </a>  <font color="#4169E1">else</font> d->BV_shift = PETSC_FALSE;
+
+<a name="line572">572: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line573">573: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line574">574: </a>    d->max_cX_in_proj = cX_proj;
+<a name="line575">575: </a>    d->max_size_P = b->max_size_P;
+<a name="line576">576: </a>    d->max_size_proj = b->max_size_proj;
+<a name="line577">577: </a>    <font color="#B22222">/* Create a <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> if the method works with Schur decompositions */</font>
+<a name="line578">578: </a>    d->calcPairs = dvd_calcpairs_proj;
+<a name="line579">579: </a>    d->calcpairs_residual = dvd_calcpairs_res_0;
+<a name="line580">580: </a>    d->calcpairs_proj_res = dvd_calcpairs_proj_res;
+<a name="line581">581: </a>    d->calcpairs_selectPairs = dvd_calcpairs_selectPairs;
+<a name="line582">582: </a>    <font color="#B22222">/* Create and configure a <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> for solving the projected problems */</font>
+<a name="line583">583: </a>    <font color="#4169E1">if</font> (d->W) dstype = DSGNHEP;    <font color="#B22222">/* If we use harmonics */</font>
+<a name="line584">584: </a>    <font color="#4169E1">else</font> {
+<a name="line585">585: </a>      <font color="#4169E1">if</font> (ind_probl) dstype = DSGHIEP;
+<a name="line586">586: </a>      <font color="#4169E1">else</font> <font color="#4169E1">if</font> (std_probl) dstype = her_probl? DSHEP : DSNHEP;
+<a name="line587">587: </a>      <font color="#4169E1">else</font> dstype = her_probl? DSGHEP : DSGNHEP;
+<a name="line588">588: </a>    }
+<a name="line589">589: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(d->eps->ds,dstype);
+<a name="line590">590: </a>    <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(d->eps->ds,d->eps->ncv);
+<a name="line591">591: </a>    <font color="#B22222">/* Create various vector basis */</font>
+<a name="line592">592: </a>    <font color="#4169E1">if</font> (harm) {
+<a name="line593">593: </a>      <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->W);
+<a name="line594">594: </a>      <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->W,NULL,PETSC_FALSE);
+<a name="line595">595: </a>    } <font color="#4169E1">else</font> d->W = NULL;
+<a name="line596">596: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->AX);
+<a name="line597">597: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->AX,NULL,PETSC_FALSE);
+<a name="line598">598: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->auxBV);
+<a name="line599">599: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->auxBV,NULL,PETSC_FALSE);
+<a name="line600">600: </a>    <font color="#4169E1">if</font> (d->B) {
+<a name="line601">601: </a>      <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,d->eps->ncv,&d->BX);
+<a name="line602">602: </a>      <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(d->BX,NULL,PETSC_FALSE);
+<a name="line603">603: </a>    } <font color="#4169E1">else</font> d->BX = NULL;
+<a name="line604">604: </a>    MatCreateVecs(d->A,&v1,NULL);
+<a name="line605">605: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolCreate.html#SlepcVecPoolCreate">SlepcVecPoolCreate</a>(v1,0,&d->auxV);
+<a name="line606">606: </a>    VecDestroy(&v1);
+<a name="line607">607: </a>    <font color="#B22222">/* Create projected problem matrices */</font>
+<a name="line608">608: </a>    MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&d->H);
+<a name="line609">609: </a>    <font color="#4169E1">if</font> (!std_probl) {
+<a name="line610">610: </a>      MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&d->G);
+<a name="line611">611: </a>    } <font color="#4169E1">else</font> d->G = NULL;
+<a name="line612">612: </a>    <font color="#4169E1">if</font> (her_probl) {
+<a name="line613">613: </a>      MatSetOption(d->H,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line614">614: </a>      <font color="#4169E1">if</font> (d->G) { MatSetOption(d->G,MAT_HERMITIAN,PETSC_TRUE); }
+<a name="line615">615: </a>    }
+
+<a name="line617">617: </a>    <font color="#4169E1">if</font> (ind_probl) {
+<a name="line618">618: </a>      PetscMalloc1(d->eps->ncv,&d->nBds);
+<a name="line619">619: </a>    } <font color="#4169E1">else</font> d->nBds = NULL;
+<a name="line620">620: </a>    MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&d->auxM);
+
+<a name="line622">622: </a>    EPSDavidsonFLAdd(&d->startList,dvd_calcpairs_qz_start);
+<a name="line623">623: </a>    EPSDavidsonFLAdd(&d->endList,EPSXDComputeDSConv);
+<a name="line624">624: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_calcpairs_qz_d);
+<a name="line625">625: </a>  }
+<a name="line626">626: </a>  <font color="#4169E1">return</font>(0);
+<a name="line627">627: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/davidson/dvdgd2.c b/src/eps/impls/davidson/dvdgd2.c
index 04ca974..a5308d6 100644
--- a/src/eps/impls/davidson/dvdgd2.c
+++ b/src/eps/impls/davidson/dvdgd2.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -83,7 +83,6 @@ static PetscErrorCode dvd_improvex_gd2_gen(dvdDashboard *d,PetscInt r_s,PetscInt
   for (i=0;i<n;) {
     k = r_s+i;
     ierr = DSVectors(d->eps->ds,DS_MAT_X,&k,NULL);CHKERRQ(ierr);
-    ierr = DSNormalize(d->eps->ds,DS_MAT_X,r_s+i);CHKERRQ(ierr);
     i = k+1; /* skip complex conjugate pairs */
   }
   ierr = DSGetArray(d->eps->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
diff --git a/src/eps/impls/davidson/dvdgd2.c.html b/src/eps/impls/davidson/dvdgd2.c.html
index e95fdb9..b34fab0 100644
--- a/src/eps/impls/davidson/dvdgd2.c.html
+++ b/src/eps/impls/davidson/dvdgd2.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdgd2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:07+00:00">
+<meta name="date" content="2016-05-16T10:33:03+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdgd2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdgd2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -89,175 +89,174 @@
 <a name="line83"> 83: </a>  <font color="#4169E1">for</font> (i=0;i<n;) {
 <a name="line84"> 84: </a>    k = r_s+i;
 <a name="line85"> 85: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(d->eps->ds,DS_MAT_X,&k,NULL);
-<a name="line86"> 86: </a>    <a href="../../../../docs/manualpages/DS/DSNormalize.html#DSNormalize">DSNormalize</a>(d->eps->ds,DS_MAT_X,r_s+i);
-<a name="line87"> 87: </a>    i = k+1; <font color="#B22222">/* skip complex conjugate pairs */</font>
-<a name="line88"> 88: </a>  }
-<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_X,&pX);
-<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ld);
-
-<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,n,&Ax);
-<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,n,&Bx);
-
-<a name="line95"> 95: </a>  <font color="#B22222">/* Bx <- B*X(i) */</font>
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (d->BX) {
-<a name="line97"> 97: </a>    <font color="#B22222">/* Compute the norms of the eigenvectors */</font>
-<a name="line98"> 98: </a>    <font color="#4169E1">if</font> (d->correctXnorm) {
-<a name="line99"> 99: </a>      dvd_improvex_compute_X(d,r_s,r_s+n,Bx,pX,ld);
-<a name="line100">100: </a>    } <font color="#4169E1">else</font> {
-<a name="line101">101: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) d->nX[r_s+i] = 1.0;
-<a name="line102">102: </a>    }
-<a name="line103">103: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line104">104: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->BX,1.0,0.0,Bx[i],&pX[ld*(r_s+i)]);
-<a name="line105">105: </a>    }
-<a name="line106">106: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (d->B) {
-<a name="line107">107: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,1,&x);
-<a name="line108">108: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line109">109: </a>      <font color="#B22222">/* auxV(0) <- X(i) */</font>
-<a name="line110">110: </a>      dvd_improvex_compute_X(d,r_s+i,r_s+i+1,x,pX,ld);
-<a name="line111">111: </a>      <font color="#B22222">/* Bx(i) <- B*auxV(0) */</font>
-<a name="line112">112: </a>      MatMult(d->B,x[0],Bx[i]);
-<a name="line113">113: </a>    }
-<a name="line114">114: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,1,&x);
-<a name="line115">115: </a>  } <font color="#4169E1">else</font> {
-<a name="line116">116: </a>    <font color="#B22222">/* Bx <- X */</font>
-<a name="line117">117: </a>    dvd_improvex_compute_X(d,r_s,r_s+n,Bx,pX,ld);
-<a name="line118">118: </a>  }
-
-<a name="line120">120: </a>  <font color="#B22222">/* Ax <- A*X(i) */</font>
-<a name="line121">121: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line122">122: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,Ax[i],&pX[ld*(i+r_s)]);
-<a name="line123">123: </a>  }
-
-<a name="line125">125: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_X,&pX);
-
-<a name="line127">127: </a>  <font color="#4169E1">for</font> (i=0,s=0;i<n;i+=s) {
-<a name="line128">128: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line129">129: </a>    <font color="#4169E1">if</font> (d->eigi[r_s+i] != 0.0) {
-<a name="line130">130: </a>       <font color="#B22222">/* [Ax_i Ax_i+1 Bx_i Bx_i+1]*= [   1        0</font>
-<a name="line131">131: </a><font color="#B22222">                                          0        1</font>
-<a name="line132">132: </a><font color="#B22222">                                       -eigr_i -eigi_i</font>
-<a name="line133">133: </a><font color="#B22222">                                        eigi_i -eigr_i] */</font>
-<a name="line134">134: </a>      MatDenseGetArray(M,&b);
-<a name="line135">135: </a>      b[0] = b[5] = 1.0/d->nX[r_s+i];
-<a name="line136">136: </a>      b[2] = b[7] = -d->eigr[r_s+i]/d->nX[r_s+i];
-<a name="line137">137: </a>      b[6] = -(b[3] = d->eigi[r_s+i]/d->nX[r_s+i]);
-<a name="line138">138: </a>      b[1] = b[4] = 0.0;
-<a name="line139">139: </a>      MatDenseRestoreArray(M,&b);
-<a name="line140">140: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
-<a name="line141">141: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Ax[i+1]);
-<a name="line142">142: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,2,Bx[i]);
-<a name="line143">143: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,3,Bx[i+1]);
-<a name="line144">144: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,4);
-<a name="line145">145: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
-<a name="line146">146: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
-<a name="line147">147: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Ax[i+1]);
-<a name="line148">148: </a>      s = 2;
-<a name="line149">149: </a>    } <font color="#4169E1">else</font>
-<a name="line150">150: </a><font color="#A020F0">#endif</font>
-<a name="line151">151: </a>    {
-<a name="line152">152: </a>      <font color="#B22222">/* [Ax_i Bx_i]*= [ 1/nX_i    conj(eig_i/nX_i)</font>
-<a name="line153">153: </a><font color="#B22222">                       -eig_i/nX_i     1/nX_i       ] */</font>
-<a name="line154">154: </a>      MatDenseGetArray(M,&b);
-<a name="line155">155: </a>      b[0] = 1.0/d->nX[r_s+i];
-<a name="line156">156: </a>      b[1] = -d->eigr[r_s+i]/d->nX[r_s+i];
-<a name="line157">157: </a>      b[4] = PetscConj(d->eigr[r_s+i]/d->nX[r_s+i]);
-<a name="line158">158: </a>      b[5] = 1.0/d->nX[r_s+i];
-<a name="line159">159: </a>      MatDenseRestoreArray(M,&b);
-<a name="line160">160: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
-<a name="line161">161: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Bx[i]);
-<a name="line162">162: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,2);
-<a name="line163">163: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
-<a name="line164">164: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
-<a name="line165">165: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Bx[i]);
-<a name="line166">166: </a>      s = 1;
-<a name="line167">167: </a>    }
-<a name="line168">168: </a>    <font color="#4169E1">for</font> (j=0;j<s;j++) d->nX[r_s+i+j] = 1.0;
-
-<a name="line170">170: </a>    <font color="#B22222">/* Ax = R <- P*(Ax - eig_i*Bx) */</font>
-<a name="line171">171: </a>    d->calcpairs_proj_res(d,r_s+i,r_s+i+s,&Ax[i]);
-
-<a name="line173">173: </a>    <font color="#B22222">/* Check if the first eigenpairs are converged */</font>
-<a name="line174">174: </a>    <font color="#4169E1">if</font> (i == 0) {
-<a name="line175">175: </a>      d->preTestConv(d,0,s,s,&d->npreconv);
-<a name="line176">176: </a>      <font color="#4169E1">if</font> (d->npreconv > 0) <font color="#4169E1">break</font>;
-<a name="line177">177: </a>    }
-<a name="line178">178: </a>  }
-
-<a name="line180">180: </a>  <font color="#B22222">/* D <- K*[Ax Bx] */</font>
-<a name="line181">181: </a>  <font color="#4169E1">if</font> (d->npreconv == 0) {
-<a name="line182">182: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line183">183: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kv+i,&v);
-<a name="line184">184: </a>      d->improvex_precond(d,r_s+i,Ax[i],v);
-<a name="line185">185: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kv+i,&v);
-<a name="line186">186: </a>    }
-<a name="line187">187: </a>    <font color="#4169E1">for</font> (i=n;i<n*2;i++) {
-<a name="line188">188: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kv+i,&v);
-<a name="line189">189: </a>      d->improvex_precond(d,r_s+i-n,Bx[i-n],v);
-<a name="line190">190: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kv+i,&v);
-<a name="line191">191: </a>    }
-<a name="line192">192: </a>    *size_D = 2*n;
-<a name="line193">193: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line194">194: </a>    <font color="#4169E1">if</font> (d->eigi[r_s] != 0.0) {
-<a name="line195">195: </a>      s = 4;
-<a name="line196">196: </a>    } <font color="#4169E1">else</font>
-<a name="line197">197: </a><font color="#A020F0">#endif</font>
-<a name="line198">198: </a>    {
-<a name="line199">199: </a>      s = 2;
-<a name="line200">200: </a>    }
-<a name="line201">201: </a>    <font color="#B22222">/* Prevent that short vectors are discarded in the orthogonalization */</font>
-<a name="line202">202: </a>    <font color="#4169E1">for</font> (i=0; i<s && i<*size_D; i++) {
-<a name="line203">203: </a>      <font color="#4169E1">if</font> (d->eps->errest[d->nconv+r_s+i] > PETSC_MACHINE_EPSILON && d->eps->errest[d->nconv+r_s+i] < PETSC_MAX_REAL) {
-<a name="line204">204: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(d->eps->V,i+kv,1.0/d->eps->errest[d->nconv+r_s+i]);
-<a name="line205">205: </a>      }
-<a name="line206">206: </a>    }
-<a name="line207">207: </a>  } <font color="#4169E1">else</font> *size_D = 0;
-
-<a name="line209">209: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,n,&Bx);
-<a name="line210">210: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,n,&Ax);
-<a name="line211">211: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
-<a name="line212">212: </a>  MatDestroy(&M);
-<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
-<a name="line214">214: </a>}
-
-<a name="line218">218: </a><strong><font color="#4169E1"><a name="dvd_improvex_gd2"></a>PetscErrorCode dvd_improvex_gd2(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs)</font></strong>
-<a name="line219">219: </a>{
-<a name="line220">220: </a>  PetscErrorCode  ierr;
-<a name="line221">221: </a>  dvdImprovex_gd2 *data;
-<a name="line222">222: </a>  PC              pc;
-
-<a name="line225">225: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
-<a name="line226">226: </a>  <font color="#B22222">/* If the arithmetic is real and the problem is not Hermitian, then</font>
-<a name="line227">227: </a><font color="#B22222">     the block size is incremented in one */</font>
-<a name="line228">228: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line229">229: </a>  <font color="#4169E1">if</font> (!DVD_IS(d->sEP, DVD_EP_HERMITIAN)) {
-<a name="line230">230: </a>    max_bs++;
-<a name="line231">231: </a>    b->max_size_P = PetscMax(b->max_size_P,2);
-<a name="line232">232: </a>  } <font color="#4169E1">else</font>
-<a name="line233">233: </a><font color="#A020F0">#endif</font>
-<a name="line234">234: </a>  {
-<a name="line235">235: </a>    b->max_size_P = PetscMax(b->max_size_P,1);
-<a name="line236">236: </a>  }
-<a name="line237">237: </a>  b->max_size_X = PetscMax(b->max_size_X,max_bs);
-
-<a name="line239">239: </a>  <font color="#B22222">/* Setup the preconditioner */</font>
-<a name="line240">240: </a>  <font color="#4169E1">if</font> (ksp) {
-<a name="line241">241: </a>    KSPGetPC(ksp,&pc);
-<a name="line242">242: </a>    dvd_static_precond_PC(d,b,pc);
-<a name="line243">243: </a>  } <font color="#4169E1">else</font> {
-<a name="line244">244: </a>    dvd_static_precond_PC(d,b,0);
-<a name="line245">245: </a>  }
-
-<a name="line247">247: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line248">248: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line249">249: </a>    PetscNewLog(d->eps,&data);
-<a name="line250">250: </a>    d->improveX_data = data;
-<a name="line251">251: </a>    data->size_X = b->max_size_X;
-<a name="line252">252: </a>    d->improveX = dvd_improvex_gd2_gen;
-
-<a name="line254">254: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_improvex_gd2_d);
-<a name="line255">255: </a>  }
-<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
-<a name="line257">257: </a>}
+<a name="line86"> 86: </a>    i = k+1; <font color="#B22222">/* skip complex conjugate pairs */</font>
+<a name="line87"> 87: </a>  }
+<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_X,&pX);
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ld);
+
+<a name="line91"> 91: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,n,&Ax);
+<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,n,&Bx);
+
+<a name="line94"> 94: </a>  <font color="#B22222">/* Bx <- B*X(i) */</font>
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (d->BX) {
+<a name="line96"> 96: </a>    <font color="#B22222">/* Compute the norms of the eigenvectors */</font>
+<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (d->correctXnorm) {
+<a name="line98"> 98: </a>      dvd_improvex_compute_X(d,r_s,r_s+n,Bx,pX,ld);
+<a name="line99"> 99: </a>    } <font color="#4169E1">else</font> {
+<a name="line100">100: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) d->nX[r_s+i] = 1.0;
+<a name="line101">101: </a>    }
+<a name="line102">102: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line103">103: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->BX,1.0,0.0,Bx[i],&pX[ld*(r_s+i)]);
+<a name="line104">104: </a>    }
+<a name="line105">105: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (d->B) {
+<a name="line106">106: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,1,&x);
+<a name="line107">107: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line108">108: </a>      <font color="#B22222">/* auxV(0) <- X(i) */</font>
+<a name="line109">109: </a>      dvd_improvex_compute_X(d,r_s+i,r_s+i+1,x,pX,ld);
+<a name="line110">110: </a>      <font color="#B22222">/* Bx(i) <- B*auxV(0) */</font>
+<a name="line111">111: </a>      MatMult(d->B,x[0],Bx[i]);
+<a name="line112">112: </a>    }
+<a name="line113">113: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,1,&x);
+<a name="line114">114: </a>  } <font color="#4169E1">else</font> {
+<a name="line115">115: </a>    <font color="#B22222">/* Bx <- X */</font>
+<a name="line116">116: </a>    dvd_improvex_compute_X(d,r_s,r_s+n,Bx,pX,ld);
+<a name="line117">117: </a>  }
+
+<a name="line119">119: </a>  <font color="#B22222">/* Ax <- A*X(i) */</font>
+<a name="line120">120: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line121">121: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,Ax[i],&pX[ld*(i+r_s)]);
+<a name="line122">122: </a>  }
+
+<a name="line124">124: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_X,&pX);
+
+<a name="line126">126: </a>  <font color="#4169E1">for</font> (i=0,s=0;i<n;i+=s) {
+<a name="line127">127: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line128">128: </a>    <font color="#4169E1">if</font> (d->eigi[r_s+i] != 0.0) {
+<a name="line129">129: </a>       <font color="#B22222">/* [Ax_i Ax_i+1 Bx_i Bx_i+1]*= [   1        0</font>
+<a name="line130">130: </a><font color="#B22222">                                          0        1</font>
+<a name="line131">131: </a><font color="#B22222">                                       -eigr_i -eigi_i</font>
+<a name="line132">132: </a><font color="#B22222">                                        eigi_i -eigr_i] */</font>
+<a name="line133">133: </a>      MatDenseGetArray(M,&b);
+<a name="line134">134: </a>      b[0] = b[5] = 1.0/d->nX[r_s+i];
+<a name="line135">135: </a>      b[2] = b[7] = -d->eigr[r_s+i]/d->nX[r_s+i];
+<a name="line136">136: </a>      b[6] = -(b[3] = d->eigi[r_s+i]/d->nX[r_s+i]);
+<a name="line137">137: </a>      b[1] = b[4] = 0.0;
+<a name="line138">138: </a>      MatDenseRestoreArray(M,&b);
+<a name="line139">139: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
+<a name="line140">140: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Ax[i+1]);
+<a name="line141">141: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,2,Bx[i]);
+<a name="line142">142: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,3,Bx[i+1]);
+<a name="line143">143: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,4);
+<a name="line144">144: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
+<a name="line145">145: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
+<a name="line146">146: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Ax[i+1]);
+<a name="line147">147: </a>      s = 2;
+<a name="line148">148: </a>    } <font color="#4169E1">else</font>
+<a name="line149">149: </a><font color="#A020F0">#endif</font>
+<a name="line150">150: </a>    {
+<a name="line151">151: </a>      <font color="#B22222">/* [Ax_i Bx_i]*= [ 1/nX_i    conj(eig_i/nX_i)</font>
+<a name="line152">152: </a><font color="#B22222">                       -eig_i/nX_i     1/nX_i       ] */</font>
+<a name="line153">153: </a>      MatDenseGetArray(M,&b);
+<a name="line154">154: </a>      b[0] = 1.0/d->nX[r_s+i];
+<a name="line155">155: </a>      b[1] = -d->eigr[r_s+i]/d->nX[r_s+i];
+<a name="line156">156: </a>      b[4] = PetscConj(d->eigr[r_s+i]/d->nX[r_s+i]);
+<a name="line157">157: </a>      b[5] = 1.0/d->nX[r_s+i];
+<a name="line158">158: </a>      MatDenseRestoreArray(M,&b);
+<a name="line159">159: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
+<a name="line160">160: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Bx[i]);
+<a name="line161">161: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,2);
+<a name="line162">162: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
+<a name="line163">163: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
+<a name="line164">164: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Bx[i]);
+<a name="line165">165: </a>      s = 1;
+<a name="line166">166: </a>    }
+<a name="line167">167: </a>    <font color="#4169E1">for</font> (j=0;j<s;j++) d->nX[r_s+i+j] = 1.0;
+
+<a name="line169">169: </a>    <font color="#B22222">/* Ax = R <- P*(Ax - eig_i*Bx) */</font>
+<a name="line170">170: </a>    d->calcpairs_proj_res(d,r_s+i,r_s+i+s,&Ax[i]);
+
+<a name="line172">172: </a>    <font color="#B22222">/* Check if the first eigenpairs are converged */</font>
+<a name="line173">173: </a>    <font color="#4169E1">if</font> (i == 0) {
+<a name="line174">174: </a>      d->preTestConv(d,0,s,s,&d->npreconv);
+<a name="line175">175: </a>      <font color="#4169E1">if</font> (d->npreconv > 0) <font color="#4169E1">break</font>;
+<a name="line176">176: </a>    }
+<a name="line177">177: </a>  }
+
+<a name="line179">179: </a>  <font color="#B22222">/* D <- K*[Ax Bx] */</font>
+<a name="line180">180: </a>  <font color="#4169E1">if</font> (d->npreconv == 0) {
+<a name="line181">181: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line182">182: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kv+i,&v);
+<a name="line183">183: </a>      d->improvex_precond(d,r_s+i,Ax[i],v);
+<a name="line184">184: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kv+i,&v);
+<a name="line185">185: </a>    }
+<a name="line186">186: </a>    <font color="#4169E1">for</font> (i=n;i<n*2;i++) {
+<a name="line187">187: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kv+i,&v);
+<a name="line188">188: </a>      d->improvex_precond(d,r_s+i-n,Bx[i-n],v);
+<a name="line189">189: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kv+i,&v);
+<a name="line190">190: </a>    }
+<a name="line191">191: </a>    *size_D = 2*n;
+<a name="line192">192: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line193">193: </a>    <font color="#4169E1">if</font> (d->eigi[r_s] != 0.0) {
+<a name="line194">194: </a>      s = 4;
+<a name="line195">195: </a>    } <font color="#4169E1">else</font>
+<a name="line196">196: </a><font color="#A020F0">#endif</font>
+<a name="line197">197: </a>    {
+<a name="line198">198: </a>      s = 2;
+<a name="line199">199: </a>    }
+<a name="line200">200: </a>    <font color="#B22222">/* Prevent that short vectors are discarded in the orthogonalization */</font>
+<a name="line201">201: </a>    <font color="#4169E1">for</font> (i=0; i<s && i<*size_D; i++) {
+<a name="line202">202: </a>      <font color="#4169E1">if</font> (d->eps->errest[d->nconv+r_s+i] > PETSC_MACHINE_EPSILON && d->eps->errest[d->nconv+r_s+i] < PETSC_MAX_REAL) {
+<a name="line203">203: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(d->eps->V,i+kv,1.0/d->eps->errest[d->nconv+r_s+i]);
+<a name="line204">204: </a>      }
+<a name="line205">205: </a>    }
+<a name="line206">206: </a>  } <font color="#4169E1">else</font> *size_D = 0;
+
+<a name="line208">208: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,n,&Bx);
+<a name="line209">209: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,n,&Ax);
+<a name="line210">210: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
+<a name="line211">211: </a>  MatDestroy(&M);
+<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
+<a name="line213">213: </a>}
+
+<a name="line217">217: </a><strong><font color="#4169E1"><a name="dvd_improvex_gd2"></a>PetscErrorCode dvd_improvex_gd2(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs)</font></strong>
+<a name="line218">218: </a>{
+<a name="line219">219: </a>  PetscErrorCode  ierr;
+<a name="line220">220: </a>  dvdImprovex_gd2 *data;
+<a name="line221">221: </a>  PC              pc;
+
+<a name="line224">224: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
+<a name="line225">225: </a>  <font color="#B22222">/* If the arithmetic is real and the problem is not Hermitian, then</font>
+<a name="line226">226: </a><font color="#B22222">     the block size is incremented in one */</font>
+<a name="line227">227: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line228">228: </a>  <font color="#4169E1">if</font> (!DVD_IS(d->sEP, DVD_EP_HERMITIAN)) {
+<a name="line229">229: </a>    max_bs++;
+<a name="line230">230: </a>    b->max_size_P = PetscMax(b->max_size_P,2);
+<a name="line231">231: </a>  } <font color="#4169E1">else</font>
+<a name="line232">232: </a><font color="#A020F0">#endif</font>
+<a name="line233">233: </a>  {
+<a name="line234">234: </a>    b->max_size_P = PetscMax(b->max_size_P,1);
+<a name="line235">235: </a>  }
+<a name="line236">236: </a>  b->max_size_X = PetscMax(b->max_size_X,max_bs);
+
+<a name="line238">238: </a>  <font color="#B22222">/* Setup the preconditioner */</font>
+<a name="line239">239: </a>  <font color="#4169E1">if</font> (ksp) {
+<a name="line240">240: </a>    KSPGetPC(ksp,&pc);
+<a name="line241">241: </a>    dvd_static_precond_PC(d,b,pc);
+<a name="line242">242: </a>  } <font color="#4169E1">else</font> {
+<a name="line243">243: </a>    dvd_static_precond_PC(d,b,0);
+<a name="line244">244: </a>  }
+
+<a name="line246">246: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line247">247: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line248">248: </a>    PetscNewLog(d->eps,&data);
+<a name="line249">249: </a>    d->improveX_data = data;
+<a name="line250">250: </a>    data->size_X = b->max_size_X;
+<a name="line251">251: </a>    d->improveX = dvd_improvex_gd2_gen;
+
+<a name="line253">253: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_improvex_gd2_d);
+<a name="line254">254: </a>  }
+<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
+<a name="line256">256: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/davidson/dvdimprovex.c b/src/eps/impls/davidson/dvdimprovex.c
index 5731e43..666facb 100644
--- a/src/eps/impls/davidson/dvdimprovex.c
+++ b/src/eps/impls/davidson/dvdimprovex.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -618,6 +618,8 @@ static PetscErrorCode dvd_improvex_jd_proj_cuv(dvdDashboard *d,PetscInt i_s,Pets
   PetscErrorCode ierr;
   PetscInt       n=i_e-i_s,size_KZ,V_new,rm,i,lv,kv,lKZ,kKZ;
   dvdImprovex_jd *data = (dvdImprovex_jd*)d->improveX_data;
+  PetscScalar    *array;
+  Mat            M;
   Vec            u[2],v[2];
   PetscBLASInt   s,ldXKZ,info;
 
@@ -641,7 +643,7 @@ static PetscErrorCode dvd_improvex_jd_proj_cuv(dvdDashboard *d,PetscInt i_s,Pets
 
   /* XKZ <- XKZ(rm:rm+max_cX-1,rm:rm+max_cX-1) */
   if (rm > 0) {
-    for (i=0; i<lKZ; i++) {
+    for (i=0;i<lKZ;i++) {
       ierr = PetscMemcpy(&data->XKZ[i*data->ldXKZ+i],&data->XKZ[(i+rm)*data->ldXKZ+i+rm],sizeof(PetscScalar)*lKZ);CHKERRQ(ierr);
     }
   }
@@ -661,7 +663,17 @@ static PetscErrorCode dvd_improvex_jd_proj_cuv(dvdDashboard *d,PetscInt i_s,Pets
   if (n>1) { ierr = BVRestoreColumn(data->KZ,lKZ+1,&v[1]);CHKERRQ(ierr); }
 
   /* XKZ <- U'*KZ */
-  ierr = BVMultS(data->KZ,data->U,data->XKZ,data->ldXKZ);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,lKZ+n,lKZ+n,NULL,&M);CHKERRQ(ierr);
+  ierr = BVMatProject(data->KZ,NULL,data->U,M);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(M,&array);CHKERRQ(ierr);
+  for (i=lKZ;i<lKZ+n;i++) { /* upper part */
+    ierr = PetscMemcpy(&data->XKZ[data->ldXKZ*i],&array[i*(lKZ+n)],lKZ*sizeof(PetscScalar));CHKERRQ(ierr);
+  }
+  for (i=0;i<lKZ+n;i++) { /* lower part */
+    ierr = PetscMemcpy(&data->XKZ[data->ldXKZ*i+lKZ],&array[i*(lKZ+n)+lKZ],n*sizeof(PetscScalar));CHKERRQ(ierr);
+  }
+  ierr = MatDenseRestoreArray(M,&array);CHKERRQ(ierr);
+  ierr = MatDestroy(&M);CHKERRQ(ierr);
 
   /* iXKZ <- inv(XKZ) */
   size_KZ = lKZ+n;
@@ -738,10 +750,8 @@ static PetscErrorCode dvd_improvex_jd_gen(dvdDashboard *d,PetscInt r_s,PetscInt
     /* Compute u, v and kr */
     k = r_s+i;
     ierr = DSVectors(d->eps->ds,DS_MAT_X,&k,NULL);CHKERRQ(ierr);
-    ierr = DSNormalize(d->eps->ds,DS_MAT_X,r_s+i);CHKERRQ(ierr);
     k = r_s+i;
     ierr = DSVectors(d->eps->ds,DS_MAT_Y,&k,NULL);CHKERRQ(ierr);
-    ierr = DSNormalize(d->eps->ds,DS_MAT_Y,r_s+i);CHKERRQ(ierr);
     ierr = DSGetArray(d->eps->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
     ierr = DSGetArray(d->eps->ds,DS_MAT_Y,&pY);CHKERRQ(ierr);
     ierr = dvd_improvex_jd_proj_cuv(d,r_s+i,r_s+i+s,kr,data->theta,data->thetai,pX,pY,ld);CHKERRQ(ierr);
@@ -933,7 +943,7 @@ PETSC_STATIC_INLINE PetscErrorCode dvd_compute_n_rr(PetscInt i_s,PetscInt n,Pets
       PetscScalar eigr0=0.0,eigi0=0.0;
       ierr = dvd_complex_rayleigh_quotient(u[i],u[i+1],Ax[i],Ax[i+1],Bx[i],Bx[i+1],&eigr0,&eigi0);CHKERRQ(ierr);
       if (PetscAbsScalar(eigr[i_s+i]-eigr0)/PetscAbsScalar(eigr[i_s+i]) > 1e-10 || PetscAbsScalar(eigi[i_s+i]-eigi0)/PetscAbsScalar(eigi[i_s+i]) > 1e-10) {
-        ierr = PetscInfo4(u[0],"The eigenvalue %g%+gi is far from its Rayleigh quotient value %g%+gi\n",(double)eigr[i_s+i],(double)eigi[i_s+i],(double)eigr0,(double)eigi0);
+        ierr = PetscInfo4(u[0],"The eigenvalue %g%+gi is far from its Rayleigh quotient value %g%+gi\n",(double)eigr[i_s+i],(double)eigi[i_s+i],(double)eigr0,(double)eigi0);CHKERRQ(ierr);
       }
       i++;
     } else
@@ -945,7 +955,7 @@ PETSC_STATIC_INLINE PetscErrorCode dvd_compute_n_rr(PetscInt i_s,PetscInt n,Pets
       ierr = VecDotEnd(Bx[i],u[i],&b1);CHKERRQ(ierr);
       b0 = b0/b1;
       if (PetscAbsScalar(eigr[i_s+i]-b0)/PetscAbsScalar(eigr[i_s+i]) > 1e-10) {
-        ierr = PetscInfo4(u[0],"The eigenvalue %g+%g is far from its Rayleigh quotient value %g+%g\n",(double)PetscRealPart(eigr[i_s+i]),(double)PetscImaginaryPart(eigr[i_s+i]),(double)PetscRealPart(b0),(double)PetscImaginaryPart(b0));
+        ierr = PetscInfo4(u[0],"The eigenvalue %g+%g is far from its Rayleigh quotient value %g+%g\n",(double)PetscRealPart(eigr[i_s+i]),(double)PetscImaginaryPart(eigr[i_s+i]),(double)PetscRealPart(b0),(double)PetscImaginaryPart(b0));CHKERRQ(ierr);
       }
     }
   }
@@ -1229,3 +1239,46 @@ PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard *d,dvdBlackboard *b,ProjType
   PetscFunctionReturn(0);
 }
 
+#undef __FUNCT__
+#define __FUNCT__ "dvd_improvex_compute_X"
+PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)
+{
+  PetscErrorCode ierr;
+  PetscInt       n = i_e - i_s,i;
+  Vec            *u;
+
+  PetscFunctionBegin;
+  if (u_) u = u_;
+  else if (d->correctXnorm) {
+    ierr = SlepcVecPoolGetVecs(d->auxV,i_e-i_s,&u);CHKERRQ(ierr);
+  }
+  if (u_ || d->correctXnorm) {
+    for (i=0; i<n; i++) {
+      ierr = BVMultVec(d->eps->V,1.0,0.0,u[i],&pX[ld*(i+i_s)]);CHKERRQ(ierr);
+    }
+  }
+  /* nX(i) <- ||X(i)|| */
+  if (d->correctXnorm) {
+    for (i=0; i<n; i++) {
+      ierr = VecNormBegin(u[i],NORM_2,&d->nX[i_s+i]);CHKERRQ(ierr);
+    }
+    for (i=0; i<n; i++) {
+      ierr = VecNormEnd(u[i],NORM_2,&d->nX[i_s+i]);CHKERRQ(ierr);
+    }
+#if !defined(PETSC_USE_COMPLEX)
+    for (i=0;i<n;i++) {
+      if (d->eigi[i_s+i] != 0.0) {
+        d->nX[i_s+i] = d->nX[i_s+i+1] = PetscSqrtScalar(d->nX[i_s+i]*d->nX[i_s+i]+d->nX[i_s+i+1]*d->nX[i_s+i+1]);
+        i++;
+      }
+    }
+#endif
+  } else {
+    for (i=0;i<n;i++) d->nX[i_s+i] = 1.0;
+  }
+  if (d->correctXnorm && !u_) {
+    ierr = SlepcVecPoolRestoreVecs(d->auxV,i_e-i_s,&u);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/eps/impls/davidson/dvdimprovex.c.html b/src/eps/impls/davidson/dvdimprovex.c.html
index f2f4089..5bc6729 100644
--- a/src/eps/impls/davidson/dvdimprovex.c.html
+++ b/src/eps/impls/davidson/dvdimprovex.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdimprovex.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:03+00:00">
+<meta name="date" content="2016-05-16T10:32:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdimprovex.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdimprovex.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -570,582 +570,631 @@
 <a name="line617">617: </a><font color="#A020F0">#else</font>
 <a name="line619">619: </a>  PetscInt       n=i_e-i_s,size_KZ,V_new,rm,i,lv,kv,lKZ,kKZ;
 <a name="line620">620: </a>  dvdImprovex_jd *data = (dvdImprovex_jd*)d->improveX_data;
-<a name="line621">621: </a>  Vec            u[2],v[2];
-<a name="line622">622: </a>  PetscBLASInt   s,ldXKZ,info;
-
-<a name="line625">625: </a>  <font color="#B22222">/* Check consistency */</font>
-<a name="line626">626: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lv,&kv);
-<a name="line627">627: </a>  V_new = lv - data->size_cX;
-<a name="line628">628: </a>  <font color="#4169E1">if</font> (V_new > data->old_size_X) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Consistency broken"</font>);
-<a name="line629">629: </a>  data->old_size_X = n;
-<a name="line630">630: </a>  data->size_cX = lv;
-
-<a name="line632">632: </a>  <font color="#B22222">/* KZ <- KZ(rm:rm+max_cX-1) */</font>
-<a name="line633">633: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(data->KZ,&lKZ,&kKZ);
-<a name="line634">634: </a>  rm = PetscMax(V_new+lKZ-d->max_cX_in_impr,0);
-<a name="line635">635: </a>  <font color="#4169E1">if</font> (rm > 0) {
-<a name="line636">636: </a>    <font color="#4169E1">for</font> (i=0;i<lKZ;i++) {
-<a name="line637">637: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(data->KZ,i+rm,i);
-<a name="line638">638: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(data->U,i+rm,i);
-<a name="line639">639: </a>    }
-<a name="line640">640: </a>  }
-
-<a name="line642">642: </a>  <font color="#B22222">/* XKZ <- XKZ(rm:rm+max_cX-1,rm:rm+max_cX-1) */</font>
-<a name="line643">643: </a>  <font color="#4169E1">if</font> (rm > 0) {
-<a name="line644">644: </a>    <font color="#4169E1">for</font> (i=0; i<lKZ; i++) {
-<a name="line645">645: </a>      PetscMemcpy(&data->XKZ[i*data->ldXKZ+i],&data->XKZ[(i+rm)*data->ldXKZ+i+rm],<font color="#4169E1">sizeof</font>(PetscScalar)*lKZ);
-<a name="line646">646: </a>    }
-<a name="line647">647: </a>  }
-<a name="line648">648: </a>  lKZ = PetscMin(d->max_cX_in_impr,lKZ+V_new);
-<a name="line649">649: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(data->KZ,lKZ,lKZ+n);
-<a name="line650">650: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(data->U,lKZ,lKZ+n);
-
-<a name="line652">652: </a>  <font color="#B22222">/* Compute X, KZ and KR */</font>
-<a name="line653">653: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->U,lKZ,u);
-<a name="line654">654: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->U,lKZ+1,&u[1]); }
-<a name="line655">655: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->KZ,lKZ,v);
-<a name="line656">656: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->KZ,lKZ+1,&v[1]); }
-<a name="line657">657: </a>  d->improvex_jd_proj_uv(d,i_s,i_e,u,v,kr,theta,thetai,pX,pY,ld);
-<a name="line658">658: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->U,lKZ,u);
-<a name="line659">659: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->U,lKZ+1,&u[1]); }
-<a name="line660">660: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->KZ,lKZ,v);
-<a name="line661">661: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->KZ,lKZ+1,&v[1]); }
-
-<a name="line663">663: </a>  <font color="#B22222">/* XKZ <- U'*KZ */</font>
-<a name="line664">664: </a>  BVMultS(data->KZ,data->U,data->XKZ,data->ldXKZ);
-
-<a name="line666">666: </a>  <font color="#B22222">/* iXKZ <- inv(XKZ) */</font>
-<a name="line667">667: </a>  size_KZ = lKZ+n;
-<a name="line668">668: </a>  PetscBLASIntCast(lKZ+n,&s);
-<a name="line669">669: </a>  data->ldiXKZ = data->size_iXKZ = size_KZ;
-<a name="line670">670: </a>  <font color="#4169E1">for</font> (i=0;i<size_KZ;i++) {
-<a name="line671">671: </a>    PetscMemcpy(&data->iXKZ[data->ldiXKZ*i],&data->XKZ[data->ldXKZ*i],<font color="#4169E1">sizeof</font>(PetscScalar)*size_KZ);
-<a name="line672">672: </a>  }
-<a name="line673">673: </a>  PetscBLASIntCast(data->ldiXKZ,&ldXKZ);
-<a name="line674">674: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line675">675: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&s,&s,data->iXKZ,&ldXKZ,data->iXKZPivots,&info));
-<a name="line676">676: </a>  PetscFPTrapPop();
-<a name="line677">677: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack XGETRF %d"</font>,info);
-<a name="line678">678: </a>  <font color="#4169E1">return</font>(0);
-<a name="line679">679: </a><font color="#A020F0">#endif</font>
-<a name="line680">680: </a>}
-
-<a name="line684">684: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_gen"></a>static PetscErrorCode dvd_improvex_jd_gen(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)</font></strong>
-<a name="line685">685: </a>{
-<a name="line686">686: </a>  dvdImprovex_jd *data = (dvdImprovex_jd*)d->improveX_data;
-<a name="line688">688: </a>  PetscInt       i,j,n,maxits,maxits0,lits,s,ld,k,max_size_D,lV,kV;
-<a name="line689">689: </a>  PetscScalar    *pX,*pY;
-<a name="line690">690: </a>  PetscReal      tol,tol0;
-<a name="line691">691: </a>  Vec            *kr,kr_comp,D_comp,D[2],kr0[2];
-<a name="line692">692: </a>  PetscBool      odd_situation = PETSC_FALSE;
-
-<a name="line695">695: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
-<a name="line696">696: </a>  max_size_D = d->eps->ncv-kV;
-<a name="line697">697: </a>  <font color="#B22222">/* Quick exit */</font>
-<a name="line698">698: </a>  <font color="#4169E1">if</font> ((max_size_D == 0) || r_e-r_s <= 0) {
-<a name="line699">699: </a>   *size_D = 0;
-<a name="line700">700: </a>    <font color="#4169E1">return</font>(0);
-<a name="line701">701: </a>  }
-
-<a name="line703">703: </a>  n = PetscMin(PetscMin(data->size_X, max_size_D), r_e-r_s);
-<a name="line704">704: </a>  <font color="#4169E1">if</font> (n == 0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"n == 0"</font>);
-<a name="line705">705: </a>  <font color="#4169E1">if</font> (data->size_X < r_e-r_s) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"size_X < r_e-r_s"</font>);
-
-<a name="line707">707: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ld);
-
-<a name="line709">709: </a>  <font color="#B22222">/* Restart lastTol if a new pair converged */</font>
-<a name="line710">710: </a>  <font color="#4169E1">if</font> (data->dynamic && data->size_cX < lV)
-<a name="line711">711: </a>    data->lastTol = 0.5;
-
-<a name="line713">713: </a>  <font color="#4169E1">for</font> (i=0,s=0;i<n;i+=s) {
-<a name="line714">714: </a>    <font color="#B22222">/* If the selected eigenvalue is complex, but the arithmetic is real... */</font>
-<a name="line715">715: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line716">716: </a>    <font color="#4169E1">if</font> (d->eigi[i] != 0.0) {
-<a name="line717">717: </a>      <font color="#4169E1">if</font> (i+2 <= max_size_D) s=2;
-<a name="line718">718: </a>      <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line719">719: </a>    } <font color="#4169E1">else</font>
-<a name="line720">720: </a><font color="#A020F0">#endif</font>
-<a name="line721">721: </a>      s=1;
-
-<a name="line723">723: </a>    data->r_s = r_s+i;
-<a name="line724">724: </a>    data->r_e = r_s+i+s;
-<a name="line725">725: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,s,&kr);
-
-<a name="line727">727: </a>    <font color="#B22222">/* Compute theta, maximum iterations and tolerance */</font>
-<a name="line728">728: </a>    maxits = 0;
-<a name="line729">729: </a>    tol = 1;
-<a name="line730">730: </a>    <font color="#4169E1">for</font> (j=0;j<s;j++) {
-<a name="line731">731: </a>      d->improvex_jd_lit(d,r_s+i+j,&data->theta[2*j],&data->thetai[j],&maxits0,&tol0);
-<a name="line732">732: </a>      maxits += maxits0;
-<a name="line733">733: </a>      tol *= tol0;
-<a name="line734">734: </a>    }
-<a name="line735">735: </a>    maxits/= s;
-<a name="line736">736: </a>    tol = data->dynamic?data->lastTol:PetscExpReal(PetscLogReal(tol)/s);
-
-<a name="line738">738: </a>    <font color="#B22222">/* Compute u, v and kr */</font>
-<a name="line739">739: </a>    k = r_s+i;
-<a name="line740">740: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(d->eps->ds,DS_MAT_X,&k,NULL);
-<a name="line741">741: </a>    <a href="../../../../docs/manualpages/DS/DSNormalize.html#DSNormalize">DSNormalize</a>(d->eps->ds,DS_MAT_X,r_s+i);
-<a name="line742">742: </a>    k = r_s+i;
-<a name="line743">743: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(d->eps->ds,DS_MAT_Y,&k,NULL);
-<a name="line744">744: </a>    <a href="../../../../docs/manualpages/DS/DSNormalize.html#DSNormalize">DSNormalize</a>(d->eps->ds,DS_MAT_Y,r_s+i);
-<a name="line745">745: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_X,&pX);
-<a name="line746">746: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_Y,&pY);
-<a name="line747">747: </a>    dvd_improvex_jd_proj_cuv(d,r_s+i,r_s+i+s,kr,data->theta,data->thetai,pX,pY,ld);
-<a name="line748">748: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_X,&pX);
-<a name="line749">749: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_Y,&pY);
-
-<a name="line751">751: </a>    <font color="#B22222">/* Check if the first eigenpairs are converged */</font>
-<a name="line752">752: </a>    <font color="#4169E1">if</font> (i == 0) {
-<a name="line753">753: </a>      d->preTestConv(d,0,s,s,&d->npreconv);
-<a name="line754">754: </a>      <font color="#4169E1">if</font> (d->npreconv > 0) <font color="#4169E1">break</font>;
-<a name="line755">755: </a>    }
-
-<a name="line757">757: </a>    <font color="#B22222">/* Test the odd situation of solving Ax=b with A=I */</font>
-<a name="line758">758: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line759">759: </a>    odd_situation = (data->ksp && data->theta[0] == 1. && data->theta[1] == 0. && data->thetai[0] == 0. && d->B == NULL)? PETSC_TRUE: PETSC_FALSE;
-<a name="line760">760: </a><font color="#A020F0">#else</font>
-<a name="line761">761: </a>    odd_situation = (data->ksp && data->theta[0] == 1. && data->theta[1] == 0. && d->B == NULL)? PETSC_TRUE: PETSC_FALSE;
-<a name="line762">762: </a><font color="#A020F0">#endif</font>
-<a name="line763">763: </a>    <font color="#B22222">/* If JD */</font>
-<a name="line764">764: </a>    <font color="#4169E1">if</font> (data->ksp && !odd_situation) {
-<a name="line765">765: </a>      <font color="#B22222">/* kr <- -kr */</font>
-<a name="line766">766: </a>      <font color="#4169E1">for</font> (j=0;j<s;j++) {
-<a name="line767">767: </a>        VecScale(kr[j],-1.0);
-<a name="line768">768: </a>      }
-
-<a name="line770">770: </a>      <font color="#B22222">/* Compose kr and D */</font>
-<a name="line771">771: </a>      kr0[0] = kr[0];
-<a name="line772">772: </a>      kr0[1] = (s==2 ? kr[1] : NULL);
-<a name="line773">773: </a>      <a href="../../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(kr0,data->ksp_max_size,data->friends,&kr_comp);
-<a name="line774">774: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
-<a name="line775">775: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
-<a name="line776">776: </a>      <font color="#4169E1">else</font> D[1] = NULL;
-<a name="line777">777: </a>      <a href="../../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(D,data->ksp_max_size,data->friends,&D_comp);
-<a name="line778">778: </a>      <a href="../../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>(data->friends,s,NULL);
-
-<a name="line780">780: </a>      <font color="#B22222">/* Solve the correction equation */</font>
-<a name="line781">781: </a>      KSPSetTolerances(data->ksp,tol,PETSC_DEFAULT,PETSC_DEFAULT,maxits);
-<a name="line782">782: </a>      KSPSolve(data->ksp,kr_comp,D_comp);
-<a name="line783">783: </a>      KSPGetIterationNumber(data->ksp,&lits);
-
-<a name="line785">785: </a>      <font color="#B22222">/* Destroy the composed ks and D */</font>
-<a name="line786">786: </a>      VecDestroy(&kr_comp);
-<a name="line787">787: </a>      VecDestroy(&D_comp);
-<a name="line788">788: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
-<a name="line789">789: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
-
-<a name="line791">791: </a>    <font color="#B22222">/* If GD */</font>
-<a name="line792">792: </a>    } <font color="#4169E1">else</font> {
-<a name="line793">793: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
-<a name="line794">794: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
-<a name="line795">795: </a>      <font color="#4169E1">for</font> (j=0;j<s;j++) {
-<a name="line796">796: </a>        d->improvex_precond(d,r_s+i+j,kr[j],D[j]);
-<a name="line797">797: </a>      }
-<a name="line798">798: </a>      dvd_improvex_apply_proj(d,D,s);
-<a name="line799">799: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
-<a name="line800">800: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
-<a name="line801">801: </a>    }
-<a name="line802">802: </a>    <font color="#B22222">/* Prevent that short vectors are discarded in the orthogonalization */</font>
-<a name="line803">803: </a>    <font color="#4169E1">if</font> (i == 0 && d->eps->errest[d->nconv+r_s] > PETSC_MACHINE_EPSILON && d->eps->errest[d->nconv+r_s] < PETSC_MAX_REAL) {
-<a name="line804">804: </a>      <font color="#4169E1">for</font> (j=0;j<s;j++) {
-<a name="line805">805: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(d->eps->V,kV+r_s+i+j,1.0/d->eps->errest[d->nconv+r_s]);
-<a name="line806">806: </a>      }
-<a name="line807">807: </a>    }
-<a name="line808">808: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,s,&kr);
-<a name="line809">809: </a>  }
-<a name="line810">810: </a>  *size_D = i;
-<a name="line811">811: </a>  <font color="#4169E1">if</font> (data->dynamic) data->lastTol = PetscMax(data->lastTol/2.0,PETSC_MACHINE_EPSILON*10.0);
-<a name="line812">812: </a>  <font color="#4169E1">return</font>(0);
-<a name="line813">813: </a>}
-
-<a name="line817">817: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd"></a>PetscErrorCode dvd_improvex_jd(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs,PetscInt cX_impr,PetscBool dynamic)</font></strong>
-<a name="line818">818: </a>{
-<a name="line820">820: </a>  dvdImprovex_jd *data;
-<a name="line821">821: </a>  PetscBool      useGD;
-<a name="line822">822: </a>  PC             pc;
-<a name="line823">823: </a>  PetscInt       size_P;
-
-<a name="line826">826: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
-<a name="line827">827: </a>  PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&useGD);
-
-<a name="line829">829: </a>  <font color="#B22222">/* If the arithmetic is real and the problem is not Hermitian, then</font>
-<a name="line830">830: </a><font color="#B22222">     the block size is incremented in one */</font>
-<a name="line831">831: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line832">832: </a>  <font color="#4169E1">if</font> (!DVD_IS(d->sEP,DVD_EP_HERMITIAN)) {
-<a name="line833">833: </a>    max_bs++;
-<a name="line834">834: </a>    b->max_size_P = PetscMax(b->max_size_P,2);
-<a name="line835">835: </a>  } <font color="#4169E1">else</font>
-<a name="line836">836: </a><font color="#A020F0">#endif</font>
-<a name="line837">837: </a>  {
-<a name="line838">838: </a>    b->max_size_P = PetscMax(b->max_size_P,1);
-<a name="line839">839: </a>  }
-<a name="line840">840: </a>  b->max_size_X = PetscMax(b->max_size_X,max_bs);
-<a name="line841">841: </a>  size_P = b->max_size_P+cX_impr;
-
-<a name="line843">843: </a>  <font color="#B22222">/* Setup the preconditioner */</font>
-<a name="line844">844: </a>  <font color="#4169E1">if</font> (ksp) {
-<a name="line845">845: </a>    KSPGetPC(ksp,&pc);
-<a name="line846">846: </a>    dvd_static_precond_PC(d,b,pc);
-<a name="line847">847: </a>  } <font color="#4169E1">else</font> {
-<a name="line848">848: </a>    dvd_static_precond_PC(d,b,0);
+<a name="line621">621: </a>  PetscScalar    *array;
+<a name="line622">622: </a>  Mat            M;
+<a name="line623">623: </a>  Vec            u[2],v[2];
+<a name="line624">624: </a>  PetscBLASInt   s,ldXKZ,info;
+
+<a name="line627">627: </a>  <font color="#B22222">/* Check consistency */</font>
+<a name="line628">628: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lv,&kv);
+<a name="line629">629: </a>  V_new = lv - data->size_cX;
+<a name="line630">630: </a>  <font color="#4169E1">if</font> (V_new > data->old_size_X) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Consistency broken"</font>);
+<a name="line631">631: </a>  data->old_size_X = n;
+<a name="line632">632: </a>  data->size_cX = lv;
+
+<a name="line634">634: </a>  <font color="#B22222">/* KZ <- KZ(rm:rm+max_cX-1) */</font>
+<a name="line635">635: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(data->KZ,&lKZ,&kKZ);
+<a name="line636">636: </a>  rm = PetscMax(V_new+lKZ-d->max_cX_in_impr,0);
+<a name="line637">637: </a>  <font color="#4169E1">if</font> (rm > 0) {
+<a name="line638">638: </a>    <font color="#4169E1">for</font> (i=0;i<lKZ;i++) {
+<a name="line639">639: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(data->KZ,i+rm,i);
+<a name="line640">640: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(data->U,i+rm,i);
+<a name="line641">641: </a>    }
+<a name="line642">642: </a>  }
+
+<a name="line644">644: </a>  <font color="#B22222">/* XKZ <- XKZ(rm:rm+max_cX-1,rm:rm+max_cX-1) */</font>
+<a name="line645">645: </a>  <font color="#4169E1">if</font> (rm > 0) {
+<a name="line646">646: </a>    <font color="#4169E1">for</font> (i=0;i<lKZ;i++) {
+<a name="line647">647: </a>      PetscMemcpy(&data->XKZ[i*data->ldXKZ+i],&data->XKZ[(i+rm)*data->ldXKZ+i+rm],<font color="#4169E1">sizeof</font>(PetscScalar)*lKZ);
+<a name="line648">648: </a>    }
+<a name="line649">649: </a>  }
+<a name="line650">650: </a>  lKZ = PetscMin(d->max_cX_in_impr,lKZ+V_new);
+<a name="line651">651: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(data->KZ,lKZ,lKZ+n);
+<a name="line652">652: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(data->U,lKZ,lKZ+n);
+
+<a name="line654">654: </a>  <font color="#B22222">/* Compute X, KZ and KR */</font>
+<a name="line655">655: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->U,lKZ,u);
+<a name="line656">656: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->U,lKZ+1,&u[1]); }
+<a name="line657">657: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->KZ,lKZ,v);
+<a name="line658">658: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(data->KZ,lKZ+1,&v[1]); }
+<a name="line659">659: </a>  d->improvex_jd_proj_uv(d,i_s,i_e,u,v,kr,theta,thetai,pX,pY,ld);
+<a name="line660">660: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->U,lKZ,u);
+<a name="line661">661: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->U,lKZ+1,&u[1]); }
+<a name="line662">662: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->KZ,lKZ,v);
+<a name="line663">663: </a>  <font color="#4169E1">if</font> (n>1) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(data->KZ,lKZ+1,&v[1]); }
+
+<a name="line665">665: </a>  <font color="#B22222">/* XKZ <- U'*KZ */</font>
+<a name="line666">666: </a>  MatCreateSeqDense(PETSC_COMM_SELF,lKZ+n,lKZ+n,NULL,&M);
+<a name="line667">667: </a>  <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(data->KZ,NULL,data->U,M);
+<a name="line668">668: </a>  MatDenseGetArray(M,&array);
+<a name="line669">669: </a>  <font color="#4169E1">for</font> (i=lKZ;i<lKZ+n;i++) { <font color="#B22222">/* upper part */</font>
+<a name="line670">670: </a>    PetscMemcpy(&data->XKZ[data->ldXKZ*i],&array[i*(lKZ+n)],lKZ*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line671">671: </a>  }
+<a name="line672">672: </a>  <font color="#4169E1">for</font> (i=0;i<lKZ+n;i++) { <font color="#B22222">/* lower part */</font>
+<a name="line673">673: </a>    PetscMemcpy(&data->XKZ[data->ldXKZ*i+lKZ],&array[i*(lKZ+n)+lKZ],n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line674">674: </a>  }
+<a name="line675">675: </a>  MatDenseRestoreArray(M,&array);
+<a name="line676">676: </a>  MatDestroy(&M);
+
+<a name="line678">678: </a>  <font color="#B22222">/* iXKZ <- inv(XKZ) */</font>
+<a name="line679">679: </a>  size_KZ = lKZ+n;
+<a name="line680">680: </a>  PetscBLASIntCast(lKZ+n,&s);
+<a name="line681">681: </a>  data->ldiXKZ = data->size_iXKZ = size_KZ;
+<a name="line682">682: </a>  <font color="#4169E1">for</font> (i=0;i<size_KZ;i++) {
+<a name="line683">683: </a>    PetscMemcpy(&data->iXKZ[data->ldiXKZ*i],&data->XKZ[data->ldXKZ*i],<font color="#4169E1">sizeof</font>(PetscScalar)*size_KZ);
+<a name="line684">684: </a>  }
+<a name="line685">685: </a>  PetscBLASIntCast(data->ldiXKZ,&ldXKZ);
+<a name="line686">686: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line687">687: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&s,&s,data->iXKZ,&ldXKZ,data->iXKZPivots,&info));
+<a name="line688">688: </a>  PetscFPTrapPop();
+<a name="line689">689: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack XGETRF %d"</font>,info);
+<a name="line690">690: </a>  <font color="#4169E1">return</font>(0);
+<a name="line691">691: </a><font color="#A020F0">#endif</font>
+<a name="line692">692: </a>}
+
+<a name="line696">696: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_gen"></a>static PetscErrorCode dvd_improvex_jd_gen(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)</font></strong>
+<a name="line697">697: </a>{
+<a name="line698">698: </a>  dvdImprovex_jd *data = (dvdImprovex_jd*)d->improveX_data;
+<a name="line700">700: </a>  PetscInt       i,j,n,maxits,maxits0,lits,s,ld,k,max_size_D,lV,kV;
+<a name="line701">701: </a>  PetscScalar    *pX,*pY;
+<a name="line702">702: </a>  PetscReal      tol,tol0;
+<a name="line703">703: </a>  Vec            *kr,kr_comp,D_comp,D[2],kr0[2];
+<a name="line704">704: </a>  PetscBool      odd_situation = PETSC_FALSE;
+
+<a name="line707">707: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
+<a name="line708">708: </a>  max_size_D = d->eps->ncv-kV;
+<a name="line709">709: </a>  <font color="#B22222">/* Quick exit */</font>
+<a name="line710">710: </a>  <font color="#4169E1">if</font> ((max_size_D == 0) || r_e-r_s <= 0) {
+<a name="line711">711: </a>   *size_D = 0;
+<a name="line712">712: </a>    <font color="#4169E1">return</font>(0);
+<a name="line713">713: </a>  }
+
+<a name="line715">715: </a>  n = PetscMin(PetscMin(data->size_X, max_size_D), r_e-r_s);
+<a name="line716">716: </a>  <font color="#4169E1">if</font> (n == 0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"n == 0"</font>);
+<a name="line717">717: </a>  <font color="#4169E1">if</font> (data->size_X < r_e-r_s) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"size_X < r_e-r_s"</font>);
+
+<a name="line719">719: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(d->eps->ds,&ld);
+
+<a name="line721">721: </a>  <font color="#B22222">/* Restart lastTol if a new pair converged */</font>
+<a name="line722">722: </a>  <font color="#4169E1">if</font> (data->dynamic && data->size_cX < lV)
+<a name="line723">723: </a>    data->lastTol = 0.5;
+
+<a name="line725">725: </a>  <font color="#4169E1">for</font> (i=0,s=0;i<n;i+=s) {
+<a name="line726">726: </a>    <font color="#B22222">/* If the selected eigenvalue is complex, but the arithmetic is real... */</font>
+<a name="line727">727: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line728">728: </a>    <font color="#4169E1">if</font> (d->eigi[i] != 0.0) {
+<a name="line729">729: </a>      <font color="#4169E1">if</font> (i+2 <= max_size_D) s=2;
+<a name="line730">730: </a>      <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line731">731: </a>    } <font color="#4169E1">else</font>
+<a name="line732">732: </a><font color="#A020F0">#endif</font>
+<a name="line733">733: </a>      s=1;
+
+<a name="line735">735: </a>    data->r_s = r_s+i;
+<a name="line736">736: </a>    data->r_e = r_s+i+s;
+<a name="line737">737: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,s,&kr);
+
+<a name="line739">739: </a>    <font color="#B22222">/* Compute theta, maximum iterations and tolerance */</font>
+<a name="line740">740: </a>    maxits = 0;
+<a name="line741">741: </a>    tol = 1;
+<a name="line742">742: </a>    <font color="#4169E1">for</font> (j=0;j<s;j++) {
+<a name="line743">743: </a>      d->improvex_jd_lit(d,r_s+i+j,&data->theta[2*j],&data->thetai[j],&maxits0,&tol0);
+<a name="line744">744: </a>      maxits += maxits0;
+<a name="line745">745: </a>      tol *= tol0;
+<a name="line746">746: </a>    }
+<a name="line747">747: </a>    maxits/= s;
+<a name="line748">748: </a>    tol = data->dynamic?data->lastTol:PetscExpReal(PetscLogReal(tol)/s);
+
+<a name="line750">750: </a>    <font color="#B22222">/* Compute u, v and kr */</font>
+<a name="line751">751: </a>    k = r_s+i;
+<a name="line752">752: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(d->eps->ds,DS_MAT_X,&k,NULL);
+<a name="line753">753: </a>    k = r_s+i;
+<a name="line754">754: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(d->eps->ds,DS_MAT_Y,&k,NULL);
+<a name="line755">755: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_X,&pX);
+<a name="line756">756: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(d->eps->ds,DS_MAT_Y,&pY);
+<a name="line757">757: </a>    dvd_improvex_jd_proj_cuv(d,r_s+i,r_s+i+s,kr,data->theta,data->thetai,pX,pY,ld);
+<a name="line758">758: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_X,&pX);
+<a name="line759">759: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(d->eps->ds,DS_MAT_Y,&pY);
+
+<a name="line761">761: </a>    <font color="#B22222">/* Check if the first eigenpairs are converged */</font>
+<a name="line762">762: </a>    <font color="#4169E1">if</font> (i == 0) {
+<a name="line763">763: </a>      d->preTestConv(d,0,s,s,&d->npreconv);
+<a name="line764">764: </a>      <font color="#4169E1">if</font> (d->npreconv > 0) <font color="#4169E1">break</font>;
+<a name="line765">765: </a>    }
+
+<a name="line767">767: </a>    <font color="#B22222">/* Test the odd situation of solving Ax=b with A=I */</font>
+<a name="line768">768: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line769">769: </a>    odd_situation = (data->ksp && data->theta[0] == 1. && data->theta[1] == 0. && data->thetai[0] == 0. && d->B == NULL)? PETSC_TRUE: PETSC_FALSE;
+<a name="line770">770: </a><font color="#A020F0">#else</font>
+<a name="line771">771: </a>    odd_situation = (data->ksp && data->theta[0] == 1. && data->theta[1] == 0. && d->B == NULL)? PETSC_TRUE: PETSC_FALSE;
+<a name="line772">772: </a><font color="#A020F0">#endif</font>
+<a name="line773">773: </a>    <font color="#B22222">/* If JD */</font>
+<a name="line774">774: </a>    <font color="#4169E1">if</font> (data->ksp && !odd_situation) {
+<a name="line775">775: </a>      <font color="#B22222">/* kr <- -kr */</font>
+<a name="line776">776: </a>      <font color="#4169E1">for</font> (j=0;j<s;j++) {
+<a name="line777">777: </a>        VecScale(kr[j],-1.0);
+<a name="line778">778: </a>      }
+
+<a name="line780">780: </a>      <font color="#B22222">/* Compose kr and D */</font>
+<a name="line781">781: </a>      kr0[0] = kr[0];
+<a name="line782">782: </a>      kr0[1] = (s==2 ? kr[1] : NULL);
+<a name="line783">783: </a>      <a href="../../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(kr0,data->ksp_max_size,data->friends,&kr_comp);
+<a name="line784">784: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
+<a name="line785">785: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
+<a name="line786">786: </a>      <font color="#4169E1">else</font> D[1] = NULL;
+<a name="line787">787: </a>      <a href="../../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(D,data->ksp_max_size,data->friends,&D_comp);
+<a name="line788">788: </a>      <a href="../../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>(data->friends,s,NULL);
+
+<a name="line790">790: </a>      <font color="#B22222">/* Solve the correction equation */</font>
+<a name="line791">791: </a>      KSPSetTolerances(data->ksp,tol,PETSC_DEFAULT,PETSC_DEFAULT,maxits);
+<a name="line792">792: </a>      KSPSolve(data->ksp,kr_comp,D_comp);
+<a name="line793">793: </a>      KSPGetIterationNumber(data->ksp,&lits);
+
+<a name="line795">795: </a>      <font color="#B22222">/* Destroy the composed ks and D */</font>
+<a name="line796">796: </a>      VecDestroy(&kr_comp);
+<a name="line797">797: </a>      VecDestroy(&D_comp);
+<a name="line798">798: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
+<a name="line799">799: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
+
+<a name="line801">801: </a>    <font color="#B22222">/* If GD */</font>
+<a name="line802">802: </a>    } <font color="#4169E1">else</font> {
+<a name="line803">803: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
+<a name="line804">804: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
+<a name="line805">805: </a>      <font color="#4169E1">for</font> (j=0;j<s;j++) {
+<a name="line806">806: </a>        d->improvex_precond(d,r_s+i+j,kr[j],D[j]);
+<a name="line807">807: </a>      }
+<a name="line808">808: </a>      dvd_improvex_apply_proj(d,D,s);
+<a name="line809">809: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i,&D[0]);
+<a name="line810">810: </a>      <font color="#4169E1">if</font> (s==2) { <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,kV+r_s+i+1,&D[1]); }
+<a name="line811">811: </a>    }
+<a name="line812">812: </a>    <font color="#B22222">/* Prevent that short vectors are discarded in the orthogonalization */</font>
+<a name="line813">813: </a>    <font color="#4169E1">if</font> (i == 0 && d->eps->errest[d->nconv+r_s] > PETSC_MACHINE_EPSILON && d->eps->errest[d->nconv+r_s] < PETSC_MAX_REAL) {
+<a name="line814">814: </a>      <font color="#4169E1">for</font> (j=0;j<s;j++) {
+<a name="line815">815: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(d->eps->V,kV+r_s+i+j,1.0/d->eps->errest[d->nconv+r_s]);
+<a name="line816">816: </a>      }
+<a name="line817">817: </a>    }
+<a name="line818">818: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,s,&kr);
+<a name="line819">819: </a>  }
+<a name="line820">820: </a>  *size_D = i;
+<a name="line821">821: </a>  <font color="#4169E1">if</font> (data->dynamic) data->lastTol = PetscMax(data->lastTol/2.0,PETSC_MACHINE_EPSILON*10.0);
+<a name="line822">822: </a>  <font color="#4169E1">return</font>(0);
+<a name="line823">823: </a>}
+
+<a name="line827">827: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd"></a>PetscErrorCode dvd_improvex_jd(dvdDashboard *d,dvdBlackboard *b,KSP ksp,PetscInt max_bs,PetscInt cX_impr,PetscBool dynamic)</font></strong>
+<a name="line828">828: </a>{
+<a name="line830">830: </a>  dvdImprovex_jd *data;
+<a name="line831">831: </a>  PetscBool      useGD;
+<a name="line832">832: </a>  PC             pc;
+<a name="line833">833: </a>  PetscInt       size_P;
+
+<a name="line836">836: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
+<a name="line837">837: </a>  PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&useGD);
+
+<a name="line839">839: </a>  <font color="#B22222">/* If the arithmetic is real and the problem is not Hermitian, then</font>
+<a name="line840">840: </a><font color="#B22222">     the block size is incremented in one */</font>
+<a name="line841">841: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line842">842: </a>  <font color="#4169E1">if</font> (!DVD_IS(d->sEP,DVD_EP_HERMITIAN)) {
+<a name="line843">843: </a>    max_bs++;
+<a name="line844">844: </a>    b->max_size_P = PetscMax(b->max_size_P,2);
+<a name="line845">845: </a>  } <font color="#4169E1">else</font>
+<a name="line846">846: </a><font color="#A020F0">#endif</font>
+<a name="line847">847: </a>  {
+<a name="line848">848: </a>    b->max_size_P = PetscMax(b->max_size_P,1);
 <a name="line849">849: </a>  }
-
-<a name="line851">851: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line852">852: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line853">853: </a>    PetscNewLog(d->eps,&data);
-<a name="line854">854: </a>    data->dynamic = dynamic;
-<a name="line855">855: </a>    d->max_cX_in_impr = cX_impr;
-<a name="line856">856: </a>    PetscMalloc1(size_P*size_P,&data->XKZ);
-<a name="line857">857: </a>    PetscMalloc1(size_P*size_P,&data->iXKZ);
-<a name="line858">858: </a>    PetscMalloc1(size_P,&data->iXKZPivots);
-<a name="line859">859: </a>    data->ldXKZ = size_P;
-<a name="line860">860: </a>    data->size_X = b->max_size_X;
-<a name="line861">861: </a>    d->improveX_data = data;
-<a name="line862">862: </a>    data->ksp = useGD? NULL: ksp;
-<a name="line863">863: </a>    data->d = d;
-<a name="line864">864: </a>    d->improveX = dvd_improvex_jd_gen;
-<a name="line865">865: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line866">866: </a>    <font color="#4169E1">if</font> (!DVD_IS(d->sEP,DVD_EP_HERMITIAN)) data->ksp_max_size = 2;
-<a name="line867">867: </a>    <font color="#4169E1">else</font>
-<a name="line868">868: </a><font color="#A020F0">#endif</font>
-<a name="line869">869: </a>      data->ksp_max_size = 1;
-<a name="line870">870: </a>    <font color="#B22222">/* Create various vector basis */</font>
-<a name="line871">871: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,size_P,&data->KZ);
-<a name="line872">872: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(data->KZ,NULL,PETSC_FALSE);
-<a name="line873">873: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(data->KZ,&data->U);
-
-<a name="line875">875: </a>    EPSDavidsonFLAdd(&d->startList,dvd_improvex_jd_start);
-<a name="line876">876: </a>    EPSDavidsonFLAdd(&d->endList,dvd_improvex_jd_end);
-<a name="line877">877: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_improvex_jd_d);
-<a name="line878">878: </a>  }
-<a name="line879">879: </a>  <font color="#4169E1">return</font>(0);
-<a name="line880">880: </a>}
-
-<a name="line882">882: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line885">885: </a><strong><font color="#4169E1"><a name="dvd_complex_rayleigh_quotient"></a>PETSC_STATIC_INLINE PetscErrorCode dvd_complex_rayleigh_quotient(Vec ur,Vec ui,Vec Axr,Vec Axi,Vec Bxr,Vec Bxi,PetscScalar *eigr,PetscScalar *eigi)</font></strong>
-<a name="line886">886: </a>{ 
-<a name="line888">888: </a>  PetscScalar    rAr,iAr,rAi,iAi,rBr,iBr,rBi,iBi,b0,b2,b4,b6,b7;
-
-<a name="line891">891: </a>  <font color="#B22222">/* eigr = [(rAr+iAi)*(rBr+iBi) + (rAi-iAr)*(rBi-iBr)]/k</font>
-<a name="line892">892: </a><font color="#B22222">     eigi = [(rAi-iAr)*(rBr+iBi) - (rAr+iAi)*(rBi-iBr)]/k</font>
-<a name="line893">893: </a><font color="#B22222">     k    =  (rBr+iBi)*(rBr+iBi) + (rBi-iBr)*(rBi-iBr)    */</font>
-<a name="line894">894: </a>  VecDotBegin(Axr,ur,&rAr); <font color="#B22222">/* r*A*r */</font>
-<a name="line895">895: </a>  VecDotBegin(Axr,ui,&iAr); <font color="#B22222">/* i*A*r */</font>
-<a name="line896">896: </a>  VecDotBegin(Axi,ur,&rAi); <font color="#B22222">/* r*A*i */</font>
-<a name="line897">897: </a>  VecDotBegin(Axi,ui,&iAi); <font color="#B22222">/* i*A*i */</font>
-<a name="line898">898: </a>  VecDotBegin(Bxr,ur,&rBr); <font color="#B22222">/* r*B*r */</font>
-<a name="line899">899: </a>  VecDotBegin(Bxr,ui,&iBr); <font color="#B22222">/* i*B*r */</font>
-<a name="line900">900: </a>  VecDotBegin(Bxi,ur,&rBi); <font color="#B22222">/* r*B*i */</font>
-<a name="line901">901: </a>  VecDotBegin(Bxi,ui,&iBi); <font color="#B22222">/* i*B*i */</font>
-<a name="line902">902: </a>  VecDotEnd(Axr,ur,&rAr); <font color="#B22222">/* r*A*r */</font>
-<a name="line903">903: </a>  VecDotEnd(Axr,ui,&iAr); <font color="#B22222">/* i*A*r */</font>
-<a name="line904">904: </a>  VecDotEnd(Axi,ur,&rAi); <font color="#B22222">/* r*A*i */</font>
-<a name="line905">905: </a>  VecDotEnd(Axi,ui,&iAi); <font color="#B22222">/* i*A*i */</font>
-<a name="line906">906: </a>  VecDotEnd(Bxr,ur,&rBr); <font color="#B22222">/* r*B*r */</font>
-<a name="line907">907: </a>  VecDotEnd(Bxr,ui,&iBr); <font color="#B22222">/* i*B*r */</font>
-<a name="line908">908: </a>  VecDotEnd(Bxi,ur,&rBi); <font color="#B22222">/* r*B*i */</font>
-<a name="line909">909: </a>  VecDotEnd(Bxi,ui,&iBi); <font color="#B22222">/* i*B*i */</font>
-<a name="line910">910: </a>  b0 = rAr+iAi; <font color="#B22222">/* rAr+iAi */</font>
-<a name="line911">911: </a>  b2 = rAi-iAr; <font color="#B22222">/* rAi-iAr */</font>
-<a name="line912">912: </a>  b4 = rBr+iBi; <font color="#B22222">/* rBr+iBi */</font>
-<a name="line913">913: </a>  b6 = rBi-iBr; <font color="#B22222">/* rBi-iBr */</font>
-<a name="line914">914: </a>  b7 = b4*b4 + b6*b6; <font color="#B22222">/* k */</font>
-<a name="line915">915: </a>  *eigr = (b0*b4 + b2*b6) / b7; <font color="#B22222">/* eig_r */</font>
-<a name="line916">916: </a>  *eigi = (b2*b4 - b0*b6) / b7; <font color="#B22222">/* eig_i */</font>
-<a name="line917">917: </a>  <font color="#4169E1">return</font>(0);
-<a name="line918">918: </a>}
-<a name="line919">919: </a><font color="#A020F0">#endif</font>
-
-<a name="line923">923: </a><strong><font color="#4169E1"><a name="dvd_compute_n_rr"></a>PETSC_STATIC_INLINE PetscErrorCode dvd_compute_n_rr(PetscInt i_s,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,Vec *u,Vec *Ax,Vec *Bx)</font></strong>
-<a name="line924">924: </a>{
-<a name="line926">926: </a>  PetscInt       i;
-<a name="line927">927: </a>  PetscScalar    b0,b1;
-
-<a name="line930">930: </a>  <font color="#4169E1">for</font> (i=0; i<n; i++) {
-<a name="line931">931: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line932">932: </a>    <font color="#4169E1">if</font> (eigi[i_s+i] != 0.0) {
-<a name="line933">933: </a>      PetscScalar eigr0=0.0,eigi0=0.0;
-<a name="line934">934: </a>      dvd_complex_rayleigh_quotient(u[i],u[i+1],Ax[i],Ax[i+1],Bx[i],Bx[i+1],&eigr0,&eigi0);
-<a name="line935">935: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(eigr[i_s+i]-eigr0)/PetscAbsScalar(eigr[i_s+i]) > 1e-10 || PetscAbsScalar(eigi[i_s+i]-eigi0)/PetscAbsScalar(eigi[i_s+i]) > 1e-10) {
-<a name="line936">936: </a>        PetscInfo4(u[0],<font color="#666666">"The eigenvalue %g%+gi is far from its Rayleigh quotient value %g%+gi\n"</font>,(double)eigr[i_s+i],(double)eigi[i_s+i],(double)eigr0,(double)eigi0);
-<a name="line937">937: </a>      }
-<a name="line938">938: </a>      i++;
-<a name="line939">939: </a>    } <font color="#4169E1">else</font>
-<a name="line940">940: </a><font color="#A020F0">#endif</font>
-<a name="line941">941: </a>    {
-<a name="line942">942: </a>      VecDotBegin(Ax[i],u[i],&b0);
-<a name="line943">943: </a>      VecDotBegin(Bx[i],u[i],&b1);
-<a name="line944">944: </a>      VecDotEnd(Ax[i],u[i],&b0);
-<a name="line945">945: </a>      VecDotEnd(Bx[i],u[i],&b1);
-<a name="line946">946: </a>      b0 = b0/b1;
-<a name="line947">947: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(eigr[i_s+i]-b0)/PetscAbsScalar(eigr[i_s+i]) > 1e-10) {
-<a name="line948">948: </a>        PetscInfo4(u[0],<font color="#666666">"The eigenvalue %g+%g is far from its Rayleigh quotient value %g+%g\n"</font>,(double)PetscRealPart(eigr[i_s+i]),(double)PetscImaginaryPart(eigr[i_s+i]),(double)PetscRealPart(b0),(double)PetscImaginaryPart(b0));
-<a name="line949">949: </a>      }
-<a name="line950">950: </a>    }
-<a name="line951">951: </a>  }
-<a name="line952">952: </a>  <font color="#4169E1">return</font>(0);
-<a name="line953">953: </a>}
-
-<a name="line957">957: </a><font color="#B22222">/*</font>
-<a name="line958">958: </a><font color="#B22222">  Compute: u <- X, v <- K*(theta[0]*A+theta[1]*B)*X,</font>
-<a name="line959">959: </a><font color="#B22222">  kr <- K^{-1}*(A-eig*B)*X, being X <- V*pX[i_s..i_e-1], Y <- W*pY[i_s..i_e-1]</font>
-<a name="line960">960: </a><font color="#B22222">  where</font>
-<a name="line961">961: </a><font color="#B22222">  pX,pY, the right and left eigenvectors of the projected system</font>
-<a name="line962">962: </a><font color="#B22222">  ld, the leading dimension of pX and pY</font>
-<a name="line963">963: </a><font color="#B22222">*/</font>
-<a name="line964">964: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_proj_uv_KZX"></a>static PetscErrorCode dvd_improvex_jd_proj_uv_KZX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)</font></strong>
-<a name="line965">965: </a>{
-<a name="line967">967: </a>  PetscInt       n = i_e-i_s,i;
-<a name="line968">968: </a>  PetscScalar    *b;
-<a name="line969">969: </a>  Vec            *Ax,*Bx,*r;
-<a name="line970">970: </a>  Mat            M;
-<a name="line971">971: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X;
-
-<a name="line974">974: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,4,&X);
-<a name="line975">975: </a>  MatCreateSeqDense(PETSC_COMM_SELF,4,4,NULL,&M);
-<a name="line976">976: </a>  <font color="#B22222">/* u <- X(i) */</font>
-<a name="line977">977: </a>  dvd_improvex_compute_X(d,i_s,i_e,u,pX,ld);
-
-<a name="line979">979: </a>  <font color="#B22222">/* v <- theta[0]A*u + theta[1]*B*u */</font>
-
-<a name="line981">981: </a>  <font color="#B22222">/* Bx <- B*X(i) */</font>
-<a name="line982">982: </a>  Bx = kr;
-<a name="line983">983: </a>  <font color="#4169E1">if</font> (d->BX) {
-<a name="line984">984: </a>    <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
-<a name="line985">985: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->BX,1.0,0.0,Bx[i-i_s],&pX[ld*i]);
-<a name="line986">986: </a>    }
-<a name="line987">987: </a>  } <font color="#4169E1">else</font> {
-<a name="line988">988: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line989">989: </a>      <font color="#4169E1">if</font> (d->B) {
-<a name="line990">990: </a>        MatMult(d->B, u[i], Bx[i]);
-<a name="line991">991: </a>      } <font color="#4169E1">else</font> {
-<a name="line992">992: </a>        VecCopy(u[i], Bx[i]);
-<a name="line993">993: </a>      }
-<a name="line994">994: </a>    }
-<a name="line995">995: </a>  }
-
-<a name="line997">997: </a>  <font color="#B22222">/* Ax <- A*X(i) */</font>
-<a name="line998">998: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,i_e-i_s,&r);
-<a name="line999">999: </a>  Ax = r;
-<a name="line1000">1000: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
-<a name="line1001">1001: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,Ax[i-i_s],&pX[ld*i]);
-<a name="line1002">1002: </a>  }
-
-<a name="line1004">1004: </a>  <font color="#B22222">/* v <- Y(i) */</font>
-<a name="line1005">1005: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
-<a name="line1006">1006: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->W?d->W:d->eps->V,1.0,0.0,v[i-i_s],&pY[ld*i]);
-<a name="line1007">1007: </a>  }
-
-<a name="line1009">1009: </a>  <font color="#B22222">/* Recompute the eigenvalue */</font>
-<a name="line1010">1010: </a>  dvd_compute_n_rr(i_s,n,d->eigr,d->eigi,v,Ax,Bx);
-
-<a name="line1012">1012: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line1013">1013: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line1014">1014: </a>    <font color="#4169E1">if</font> (d->eigi[i_s+i] != 0.0) {
-<a name="line1015">1015: </a>      <font color="#B22222">/* [r_i r_i+1 kr_i kr_i+1]*= [ theta_2i'    0            1        0</font>
-<a name="line1016">1016: </a><font color="#B22222">                                       0         theta_2i'     0        1</font>
-<a name="line1017">1017: </a><font color="#B22222">                                     theta_2i+1 -thetai_i   -eigr_i -eigi_i</font>
-<a name="line1018">1018: </a><font color="#B22222">                                     thetai_i    theta_2i+1  eigi_i -eigr_i ] */</font>
-<a name="line1019">1019: </a>      MatDenseGetArray(M,&b);
-<a name="line1020">1020: </a>      b[0] = b[5] = PetscConj(theta[2*i]);
-<a name="line1021">1021: </a>      b[2] = b[7] = -theta[2*i+1];
-<a name="line1022">1022: </a>      b[6] = -(b[3] = thetai[i]);
-<a name="line1023">1023: </a>      b[1] = b[4] = 0.0;
-<a name="line1024">1024: </a>      b[8] = b[13] = 1.0/d->nX[i_s+i];
-<a name="line1025">1025: </a>      b[10] = b[15] = -d->eigr[i_s+i]/d->nX[i_s+i];
-<a name="line1026">1026: </a>      b[14] = -(b[11] = d->eigi[i_s+i]/d->nX[i_s+i]);
-<a name="line1027">1027: </a>      b[9] = b[12] = 0.0;
-<a name="line1028">1028: </a>      MatDenseRestoreArray(M,&b);
-<a name="line1029">1029: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
-<a name="line1030">1030: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Ax[i+1]);
-<a name="line1031">1031: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,2,Bx[i]);
-<a name="line1032">1032: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,3,Bx[i+1]);
-<a name="line1033">1033: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,4);
-<a name="line1034">1034: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,4);
-<a name="line1035">1035: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
-<a name="line1036">1036: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Ax[i+1]);
-<a name="line1037">1037: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,2,Bx[i]);
-<a name="line1038">1038: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,3,Bx[i+1]);
-<a name="line1039">1039: </a>      i++;
-<a name="line1040">1040: </a>    } <font color="#4169E1">else</font>
-<a name="line1041">1041: </a><font color="#A020F0">#endif</font>
-<a name="line1042">1042: </a>    {
-<a name="line1043">1043: </a>      <font color="#B22222">/* [Ax_i Bx_i]*= [ theta_2i'    1/nX_i</font>
-<a name="line1044">1044: </a><font color="#B22222">                        theta_2i+1  -eig_i/nX_i ] */</font>
-<a name="line1045">1045: </a>      MatDenseGetArray(M,&b);
-<a name="line1046">1046: </a>      b[0] = PetscConj(theta[i*2]);
-<a name="line1047">1047: </a>      b[1] = theta[i*2+1];
-<a name="line1048">1048: </a>      b[4] = 1.0/d->nX[i_s+i];
-<a name="line1049">1049: </a>      b[5] = -d->eigr[i_s+i]/d->nX[i_s+i];
-<a name="line1050">1050: </a>      MatDenseRestoreArray(M,&b);
-<a name="line1051">1051: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
-<a name="line1052">1052: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Bx[i]);
-<a name="line1053">1053: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,2);
-<a name="line1054">1054: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
-<a name="line1055">1055: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
-<a name="line1056">1056: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Bx[i]);
-<a name="line1057">1057: </a>    }
-<a name="line1058">1058: </a>  }
-<a name="line1059">1059: </a>  <font color="#4169E1">for</font> (i=0; i<n; i++) d->nX[i_s+i] = 1.0;
-
-<a name="line1061">1061: </a>  <font color="#B22222">/* v <- K^{-1} r = K^{-1}(theta_2i'*Ax + theta_2i+1*Bx) */</font>
-<a name="line1062">1062: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line1063">1063: </a>    d->improvex_precond(d,i_s+i,r[i],v[i]);
-<a name="line1064">1064: </a>  }
-<a name="line1065">1065: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,i_e-i_s,&r);
-
-<a name="line1067">1067: </a>  <font color="#B22222">/* kr <- P*(Ax - eig_i*Bx) */</font>
-<a name="line1068">1068: </a>  d->calcpairs_proj_res(d,i_s,i_e,kr);
-<a name="line1069">1069: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
-<a name="line1070">1070: </a>  MatDestroy(&M);
-<a name="line1071">1071: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1072">1072: </a>}
-
-<a name="line1076">1076: </a><font color="#B22222">/*</font>
-<a name="line1077">1077: </a><font color="#B22222">  Compute: u <- K^{-1}*X, v <- X,</font>
-<a name="line1078">1078: </a><font color="#B22222">  kr <- K^{-1}*(A-eig*B)*X, being X <- V*pX[i_s..i_e-1]</font>
-<a name="line1079">1079: </a><font color="#B22222">  where</font>
-<a name="line1080">1080: </a><font color="#B22222">  pX,pY, the right and left eigenvectors of the projected system</font>
-<a name="line1081">1081: </a><font color="#B22222">  ld, the leading dimension of pX and pY</font>
-<a name="line1082">1082: </a><font color="#B22222">*/</font>
-<a name="line1083">1083: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_proj_uv_KXX"></a>static PetscErrorCode dvd_improvex_jd_proj_uv_KXX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)</font></strong>
-<a name="line1084">1084: </a>{
-<a name="line1086">1086: </a>  PetscInt       n = i_e - i_s,i;
-<a name="line1087">1087: </a>  PetscScalar    *b;
-<a name="line1088">1088: </a>  Vec            *Ax,*Bx,*r;
-<a name="line1089">1089: </a>  Mat            M;
-<a name="line1090">1090: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X;
-
-<a name="line1093">1093: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,4,&X);
-<a name="line1094">1094: </a>  MatCreateSeqDense(PETSC_COMM_SELF,4,2,NULL,&M);
-<a name="line1095">1095: </a>  <font color="#B22222">/* [v u] <- X(i) Y(i) */</font>
-<a name="line1096">1096: </a>  dvd_improvex_compute_X(d,i_s,i_e,v,pX,ld);
-<a name="line1097">1097: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
-<a name="line1098">1098: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->W?d->W:d->eps->V,1.0,0.0,u[i-i_s],&pY[ld*i]);
-<a name="line1099">1099: </a>  }
-
-<a name="line1101">1101: </a>  <font color="#B22222">/* Bx <- B*X(i) */</font>
-<a name="line1102">1102: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,i_e-i_s,&r);
-<a name="line1103">1103: </a>  Bx = r;
-<a name="line1104">1104: </a>  <font color="#4169E1">if</font> (d->BX) {
-<a name="line1105">1105: </a>    <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
-<a name="line1106">1106: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->BX,1.0,0.0,Bx[i-i_s],&pX[ld*i]);
-<a name="line1107">1107: </a>    }
-<a name="line1108">1108: </a>  } <font color="#4169E1">else</font> {
-<a name="line1109">1109: </a>    <font color="#4169E1">if</font> (d->B) {
-<a name="line1110">1110: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line1111">1111: </a>        MatMult(d->B,v[i],Bx[i]);
-<a name="line1112">1112: </a>      }
-<a name="line1113">1113: </a>    } <font color="#4169E1">else</font> Bx = v;
-<a name="line1114">1114: </a>  }
-
-<a name="line1116">1116: </a>  <font color="#B22222">/* Ax <- A*X(i) */</font>
-<a name="line1117">1117: </a>  Ax = kr;
-<a name="line1118">1118: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
-<a name="line1119">1119: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,Ax[i-i_s],&pX[ld*i]);
-<a name="line1120">1120: </a>  }
-
-<a name="line1122">1122: </a>  <font color="#B22222">/* Recompute the eigenvalue */</font>
-<a name="line1123">1123: </a>  dvd_compute_n_rr(i_s,n,d->eigr,d->eigi,u,Ax,Bx);
-
-<a name="line1125">1125: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line1126">1126: </a>    <font color="#4169E1">if</font> (d->eigi[i_s+i] == 0.0) {
-<a name="line1127">1127: </a>      <font color="#B22222">/* kr <- Ax -eig*Bx */</font>
-<a name="line1128">1128: </a>      VecAXPBY(kr[i],-d->eigr[i_s+i]/d->nX[i_s+i],1.0/d->nX[i_s+i],Bx[i]);
-<a name="line1129">1129: </a>    } <font color="#4169E1">else</font> {
-<a name="line1130">1130: </a>      <font color="#B22222">/* [kr_i kr_i+1 r_i r_i+1]*= [   1        0</font>
-<a name="line1131">1131: </a><font color="#B22222">                                       0        1</font>
-<a name="line1132">1132: </a><font color="#B22222">                                    -eigr_i -eigi_i</font>
-<a name="line1133">1133: </a><font color="#B22222">                                     eigi_i -eigr_i] */</font>
-<a name="line1134">1134: </a>      MatDenseGetArray(M,&b);
-<a name="line1135">1135: </a>      b[0] = b[5] = 1.0/d->nX[i_s+i];
-<a name="line1136">1136: </a>      b[2] = b[7] = -d->eigr[i_s+i]/d->nX[i_s+i];
-<a name="line1137">1137: </a>      b[6] = -(b[3] = d->eigi[i_s+i]/d->nX[i_s+i]);
-<a name="line1138">1138: </a>      b[1] = b[4] = 0.0;
-<a name="line1139">1139: </a>      MatDenseRestoreArray(M,&b);
-<a name="line1140">1140: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,kr[i]);
-<a name="line1141">1141: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,kr[i+1]);
-<a name="line1142">1142: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,2,r[i]);
-<a name="line1143">1143: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,3,r[i+1]);
-<a name="line1144">1144: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,4);
-<a name="line1145">1145: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
-<a name="line1146">1146: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,kr[i]);
-<a name="line1147">1147: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,kr[i+1]);
-<a name="line1148">1148: </a>      i++;
-<a name="line1149">1149: </a>    }
-<a name="line1150">1150: </a>  }
-<a name="line1151">1151: </a>  <font color="#4169E1">for</font> (i=0; i<n; i++) d->nX[i_s+i] = 1.0;
-
-<a name="line1153">1153: </a>  <font color="#B22222">/* kr <- P*kr */</font>
-<a name="line1154">1154: </a>  d->calcpairs_proj_res(d,i_s,i_e,r);
-<a name="line1155">1155: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,i_e-i_s,&r);
-
-<a name="line1157">1157: </a>  <font color="#B22222">/* u <- K^{-1} X(i) */</font>
-<a name="line1158">1158: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line1159">1159: </a>    d->improvex_precond(d,i_s+i,v[i],u[i]);
+<a name="line850">850: </a>  b->max_size_X = PetscMax(b->max_size_X,max_bs);
+<a name="line851">851: </a>  size_P = b->max_size_P+cX_impr;
+
+<a name="line853">853: </a>  <font color="#B22222">/* Setup the preconditioner */</font>
+<a name="line854">854: </a>  <font color="#4169E1">if</font> (ksp) {
+<a name="line855">855: </a>    KSPGetPC(ksp,&pc);
+<a name="line856">856: </a>    dvd_static_precond_PC(d,b,pc);
+<a name="line857">857: </a>  } <font color="#4169E1">else</font> {
+<a name="line858">858: </a>    dvd_static_precond_PC(d,b,0);
+<a name="line859">859: </a>  }
+
+<a name="line861">861: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line862">862: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line863">863: </a>    PetscNewLog(d->eps,&data);
+<a name="line864">864: </a>    data->dynamic = dynamic;
+<a name="line865">865: </a>    d->max_cX_in_impr = cX_impr;
+<a name="line866">866: </a>    PetscMalloc1(size_P*size_P,&data->XKZ);
+<a name="line867">867: </a>    PetscMalloc1(size_P*size_P,&data->iXKZ);
+<a name="line868">868: </a>    PetscMalloc1(size_P,&data->iXKZPivots);
+<a name="line869">869: </a>    data->ldXKZ = size_P;
+<a name="line870">870: </a>    data->size_X = b->max_size_X;
+<a name="line871">871: </a>    d->improveX_data = data;
+<a name="line872">872: </a>    data->ksp = useGD? NULL: ksp;
+<a name="line873">873: </a>    data->d = d;
+<a name="line874">874: </a>    d->improveX = dvd_improvex_jd_gen;
+<a name="line875">875: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line876">876: </a>    <font color="#4169E1">if</font> (!DVD_IS(d->sEP,DVD_EP_HERMITIAN)) data->ksp_max_size = 2;
+<a name="line877">877: </a>    <font color="#4169E1">else</font>
+<a name="line878">878: </a><font color="#A020F0">#endif</font>
+<a name="line879">879: </a>      data->ksp_max_size = 1;
+<a name="line880">880: </a>    <font color="#B22222">/* Create various vector basis */</font>
+<a name="line881">881: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,size_P,&data->KZ);
+<a name="line882">882: </a>    <a href="../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(data->KZ,NULL,PETSC_FALSE);
+<a name="line883">883: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(data->KZ,&data->U);
+
+<a name="line885">885: </a>    EPSDavidsonFLAdd(&d->startList,dvd_improvex_jd_start);
+<a name="line886">886: </a>    EPSDavidsonFLAdd(&d->endList,dvd_improvex_jd_end);
+<a name="line887">887: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_improvex_jd_d);
+<a name="line888">888: </a>  }
+<a name="line889">889: </a>  <font color="#4169E1">return</font>(0);
+<a name="line890">890: </a>}
+
+<a name="line892">892: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line895">895: </a><strong><font color="#4169E1"><a name="dvd_complex_rayleigh_quotient"></a>PETSC_STATIC_INLINE PetscErrorCode dvd_complex_rayleigh_quotient(Vec ur,Vec ui,Vec Axr,Vec Axi,Vec Bxr,Vec Bxi,PetscScalar *eigr,PetscScalar *eigi)</font></strong>
+<a name="line896">896: </a>{ 
+<a name="line898">898: </a>  PetscScalar    rAr,iAr,rAi,iAi,rBr,iBr,rBi,iBi,b0,b2,b4,b6,b7;
+
+<a name="line901">901: </a>  <font color="#B22222">/* eigr = [(rAr+iAi)*(rBr+iBi) + (rAi-iAr)*(rBi-iBr)]/k</font>
+<a name="line902">902: </a><font color="#B22222">     eigi = [(rAi-iAr)*(rBr+iBi) - (rAr+iAi)*(rBi-iBr)]/k</font>
+<a name="line903">903: </a><font color="#B22222">     k    =  (rBr+iBi)*(rBr+iBi) + (rBi-iBr)*(rBi-iBr)    */</font>
+<a name="line904">904: </a>  VecDotBegin(Axr,ur,&rAr); <font color="#B22222">/* r*A*r */</font>
+<a name="line905">905: </a>  VecDotBegin(Axr,ui,&iAr); <font color="#B22222">/* i*A*r */</font>
+<a name="line906">906: </a>  VecDotBegin(Axi,ur,&rAi); <font color="#B22222">/* r*A*i */</font>
+<a name="line907">907: </a>  VecDotBegin(Axi,ui,&iAi); <font color="#B22222">/* i*A*i */</font>
+<a name="line908">908: </a>  VecDotBegin(Bxr,ur,&rBr); <font color="#B22222">/* r*B*r */</font>
+<a name="line909">909: </a>  VecDotBegin(Bxr,ui,&iBr); <font color="#B22222">/* i*B*r */</font>
+<a name="line910">910: </a>  VecDotBegin(Bxi,ur,&rBi); <font color="#B22222">/* r*B*i */</font>
+<a name="line911">911: </a>  VecDotBegin(Bxi,ui,&iBi); <font color="#B22222">/* i*B*i */</font>
+<a name="line912">912: </a>  VecDotEnd(Axr,ur,&rAr); <font color="#B22222">/* r*A*r */</font>
+<a name="line913">913: </a>  VecDotEnd(Axr,ui,&iAr); <font color="#B22222">/* i*A*r */</font>
+<a name="line914">914: </a>  VecDotEnd(Axi,ur,&rAi); <font color="#B22222">/* r*A*i */</font>
+<a name="line915">915: </a>  VecDotEnd(Axi,ui,&iAi); <font color="#B22222">/* i*A*i */</font>
+<a name="line916">916: </a>  VecDotEnd(Bxr,ur,&rBr); <font color="#B22222">/* r*B*r */</font>
+<a name="line917">917: </a>  VecDotEnd(Bxr,ui,&iBr); <font color="#B22222">/* i*B*r */</font>
+<a name="line918">918: </a>  VecDotEnd(Bxi,ur,&rBi); <font color="#B22222">/* r*B*i */</font>
+<a name="line919">919: </a>  VecDotEnd(Bxi,ui,&iBi); <font color="#B22222">/* i*B*i */</font>
+<a name="line920">920: </a>  b0 = rAr+iAi; <font color="#B22222">/* rAr+iAi */</font>
+<a name="line921">921: </a>  b2 = rAi-iAr; <font color="#B22222">/* rAi-iAr */</font>
+<a name="line922">922: </a>  b4 = rBr+iBi; <font color="#B22222">/* rBr+iBi */</font>
+<a name="line923">923: </a>  b6 = rBi-iBr; <font color="#B22222">/* rBi-iBr */</font>
+<a name="line924">924: </a>  b7 = b4*b4 + b6*b6; <font color="#B22222">/* k */</font>
+<a name="line925">925: </a>  *eigr = (b0*b4 + b2*b6) / b7; <font color="#B22222">/* eig_r */</font>
+<a name="line926">926: </a>  *eigi = (b2*b4 - b0*b6) / b7; <font color="#B22222">/* eig_i */</font>
+<a name="line927">927: </a>  <font color="#4169E1">return</font>(0);
+<a name="line928">928: </a>}
+<a name="line929">929: </a><font color="#A020F0">#endif</font>
+
+<a name="line933">933: </a><strong><font color="#4169E1"><a name="dvd_compute_n_rr"></a>PETSC_STATIC_INLINE PetscErrorCode dvd_compute_n_rr(PetscInt i_s,PetscInt n,PetscScalar *eigr,PetscScalar *eigi,Vec *u,Vec *Ax,Vec *Bx)</font></strong>
+<a name="line934">934: </a>{
+<a name="line936">936: </a>  PetscInt       i;
+<a name="line937">937: </a>  PetscScalar    b0,b1;
+
+<a name="line940">940: </a>  <font color="#4169E1">for</font> (i=0; i<n; i++) {
+<a name="line941">941: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line942">942: </a>    <font color="#4169E1">if</font> (eigi[i_s+i] != 0.0) {
+<a name="line943">943: </a>      PetscScalar eigr0=0.0,eigi0=0.0;
+<a name="line944">944: </a>      dvd_complex_rayleigh_quotient(u[i],u[i+1],Ax[i],Ax[i+1],Bx[i],Bx[i+1],&eigr0,&eigi0);
+<a name="line945">945: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(eigr[i_s+i]-eigr0)/PetscAbsScalar(eigr[i_s+i]) > 1e-10 || PetscAbsScalar(eigi[i_s+i]-eigi0)/PetscAbsScalar(eigi[i_s+i]) > 1e-10) {
+<a name="line946">946: </a>        PetscInfo4(u[0],<font color="#666666">"The eigenvalue %g%+gi is far from its Rayleigh quotient value %g%+gi\n"</font>,(double)eigr[i_s+i],(double)eigi[i_s+i],(double)eigr0,(double)eigi0);
+<a name="line947">947: </a>      }
+<a name="line948">948: </a>      i++;
+<a name="line949">949: </a>    } <font color="#4169E1">else</font>
+<a name="line950">950: </a><font color="#A020F0">#endif</font>
+<a name="line951">951: </a>    {
+<a name="line952">952: </a>      VecDotBegin(Ax[i],u[i],&b0);
+<a name="line953">953: </a>      VecDotBegin(Bx[i],u[i],&b1);
+<a name="line954">954: </a>      VecDotEnd(Ax[i],u[i],&b0);
+<a name="line955">955: </a>      VecDotEnd(Bx[i],u[i],&b1);
+<a name="line956">956: </a>      b0 = b0/b1;
+<a name="line957">957: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(eigr[i_s+i]-b0)/PetscAbsScalar(eigr[i_s+i]) > 1e-10) {
+<a name="line958">958: </a>        PetscInfo4(u[0],<font color="#666666">"The eigenvalue %g+%g is far from its Rayleigh quotient value %g+%g\n"</font>,(double)PetscRealPart(eigr[i_s+i]),(double)PetscImaginaryPart(eigr[i_s+i]),(double)PetscRealPart(b0),(double)PetscImaginaryPart(b0));
+<a name="line959">959: </a>      }
+<a name="line960">960: </a>    }
+<a name="line961">961: </a>  }
+<a name="line962">962: </a>  <font color="#4169E1">return</font>(0);
+<a name="line963">963: </a>}
+
+<a name="line967">967: </a><font color="#B22222">/*</font>
+<a name="line968">968: </a><font color="#B22222">  Compute: u <- X, v <- K*(theta[0]*A+theta[1]*B)*X,</font>
+<a name="line969">969: </a><font color="#B22222">  kr <- K^{-1}*(A-eig*B)*X, being X <- V*pX[i_s..i_e-1], Y <- W*pY[i_s..i_e-1]</font>
+<a name="line970">970: </a><font color="#B22222">  where</font>
+<a name="line971">971: </a><font color="#B22222">  pX,pY, the right and left eigenvectors of the projected system</font>
+<a name="line972">972: </a><font color="#B22222">  ld, the leading dimension of pX and pY</font>
+<a name="line973">973: </a><font color="#B22222">*/</font>
+<a name="line974">974: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_proj_uv_KZX"></a>static PetscErrorCode dvd_improvex_jd_proj_uv_KZX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)</font></strong>
+<a name="line975">975: </a>{
+<a name="line977">977: </a>  PetscInt       n = i_e-i_s,i;
+<a name="line978">978: </a>  PetscScalar    *b;
+<a name="line979">979: </a>  Vec            *Ax,*Bx,*r;
+<a name="line980">980: </a>  Mat            M;
+<a name="line981">981: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X;
+
+<a name="line984">984: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,4,&X);
+<a name="line985">985: </a>  MatCreateSeqDense(PETSC_COMM_SELF,4,4,NULL,&M);
+<a name="line986">986: </a>  <font color="#B22222">/* u <- X(i) */</font>
+<a name="line987">987: </a>  dvd_improvex_compute_X(d,i_s,i_e,u,pX,ld);
+
+<a name="line989">989: </a>  <font color="#B22222">/* v <- theta[0]A*u + theta[1]*B*u */</font>
+
+<a name="line991">991: </a>  <font color="#B22222">/* Bx <- B*X(i) */</font>
+<a name="line992">992: </a>  Bx = kr;
+<a name="line993">993: </a>  <font color="#4169E1">if</font> (d->BX) {
+<a name="line994">994: </a>    <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
+<a name="line995">995: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->BX,1.0,0.0,Bx[i-i_s],&pX[ld*i]);
+<a name="line996">996: </a>    }
+<a name="line997">997: </a>  } <font color="#4169E1">else</font> {
+<a name="line998">998: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line999">999: </a>      <font color="#4169E1">if</font> (d->B) {
+<a name="line1000">1000: </a>        MatMult(d->B, u[i], Bx[i]);
+<a name="line1001">1001: </a>      } <font color="#4169E1">else</font> {
+<a name="line1002">1002: </a>        VecCopy(u[i], Bx[i]);
+<a name="line1003">1003: </a>      }
+<a name="line1004">1004: </a>    }
+<a name="line1005">1005: </a>  }
+
+<a name="line1007">1007: </a>  <font color="#B22222">/* Ax <- A*X(i) */</font>
+<a name="line1008">1008: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,i_e-i_s,&r);
+<a name="line1009">1009: </a>  Ax = r;
+<a name="line1010">1010: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
+<a name="line1011">1011: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,Ax[i-i_s],&pX[ld*i]);
+<a name="line1012">1012: </a>  }
+
+<a name="line1014">1014: </a>  <font color="#B22222">/* v <- Y(i) */</font>
+<a name="line1015">1015: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
+<a name="line1016">1016: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->W?d->W:d->eps->V,1.0,0.0,v[i-i_s],&pY[ld*i]);
+<a name="line1017">1017: </a>  }
+
+<a name="line1019">1019: </a>  <font color="#B22222">/* Recompute the eigenvalue */</font>
+<a name="line1020">1020: </a>  dvd_compute_n_rr(i_s,n,d->eigr,d->eigi,v,Ax,Bx);
+
+<a name="line1022">1022: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line1023">1023: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line1024">1024: </a>    <font color="#4169E1">if</font> (d->eigi[i_s+i] != 0.0) {
+<a name="line1025">1025: </a>      <font color="#B22222">/* [r_i r_i+1 kr_i kr_i+1]*= [ theta_2i'    0            1        0</font>
+<a name="line1026">1026: </a><font color="#B22222">                                       0         theta_2i'     0        1</font>
+<a name="line1027">1027: </a><font color="#B22222">                                     theta_2i+1 -thetai_i   -eigr_i -eigi_i</font>
+<a name="line1028">1028: </a><font color="#B22222">                                     thetai_i    theta_2i+1  eigi_i -eigr_i ] */</font>
+<a name="line1029">1029: </a>      MatDenseGetArray(M,&b);
+<a name="line1030">1030: </a>      b[0] = b[5] = PetscConj(theta[2*i]);
+<a name="line1031">1031: </a>      b[2] = b[7] = -theta[2*i+1];
+<a name="line1032">1032: </a>      b[6] = -(b[3] = thetai[i]);
+<a name="line1033">1033: </a>      b[1] = b[4] = 0.0;
+<a name="line1034">1034: </a>      b[8] = b[13] = 1.0/d->nX[i_s+i];
+<a name="line1035">1035: </a>      b[10] = b[15] = -d->eigr[i_s+i]/d->nX[i_s+i];
+<a name="line1036">1036: </a>      b[14] = -(b[11] = d->eigi[i_s+i]/d->nX[i_s+i]);
+<a name="line1037">1037: </a>      b[9] = b[12] = 0.0;
+<a name="line1038">1038: </a>      MatDenseRestoreArray(M,&b);
+<a name="line1039">1039: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
+<a name="line1040">1040: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Ax[i+1]);
+<a name="line1041">1041: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,2,Bx[i]);
+<a name="line1042">1042: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,3,Bx[i+1]);
+<a name="line1043">1043: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,4);
+<a name="line1044">1044: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,4);
+<a name="line1045">1045: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
+<a name="line1046">1046: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Ax[i+1]);
+<a name="line1047">1047: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,2,Bx[i]);
+<a name="line1048">1048: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,3,Bx[i+1]);
+<a name="line1049">1049: </a>      i++;
+<a name="line1050">1050: </a>    } <font color="#4169E1">else</font>
+<a name="line1051">1051: </a><font color="#A020F0">#endif</font>
+<a name="line1052">1052: </a>    {
+<a name="line1053">1053: </a>      <font color="#B22222">/* [Ax_i Bx_i]*= [ theta_2i'    1/nX_i</font>
+<a name="line1054">1054: </a><font color="#B22222">                        theta_2i+1  -eig_i/nX_i ] */</font>
+<a name="line1055">1055: </a>      MatDenseGetArray(M,&b);
+<a name="line1056">1056: </a>      b[0] = PetscConj(theta[i*2]);
+<a name="line1057">1057: </a>      b[1] = theta[i*2+1];
+<a name="line1058">1058: </a>      b[4] = 1.0/d->nX[i_s+i];
+<a name="line1059">1059: </a>      b[5] = -d->eigr[i_s+i]/d->nX[i_s+i];
+<a name="line1060">1060: </a>      MatDenseRestoreArray(M,&b);
+<a name="line1061">1061: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,Ax[i]);
+<a name="line1062">1062: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,Bx[i]);
+<a name="line1063">1063: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,2);
+<a name="line1064">1064: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
+<a name="line1065">1065: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,Ax[i]);
+<a name="line1066">1066: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,Bx[i]);
+<a name="line1067">1067: </a>    }
+<a name="line1068">1068: </a>  }
+<a name="line1069">1069: </a>  <font color="#4169E1">for</font> (i=0; i<n; i++) d->nX[i_s+i] = 1.0;
+
+<a name="line1071">1071: </a>  <font color="#B22222">/* v <- K^{-1} r = K^{-1}(theta_2i'*Ax + theta_2i+1*Bx) */</font>
+<a name="line1072">1072: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line1073">1073: </a>    d->improvex_precond(d,i_s+i,r[i],v[i]);
+<a name="line1074">1074: </a>  }
+<a name="line1075">1075: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,i_e-i_s,&r);
+
+<a name="line1077">1077: </a>  <font color="#B22222">/* kr <- P*(Ax - eig_i*Bx) */</font>
+<a name="line1078">1078: </a>  d->calcpairs_proj_res(d,i_s,i_e,kr);
+<a name="line1079">1079: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
+<a name="line1080">1080: </a>  MatDestroy(&M);
+<a name="line1081">1081: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1082">1082: </a>}
+
+<a name="line1086">1086: </a><font color="#B22222">/*</font>
+<a name="line1087">1087: </a><font color="#B22222">  Compute: u <- K^{-1}*X, v <- X,</font>
+<a name="line1088">1088: </a><font color="#B22222">  kr <- K^{-1}*(A-eig*B)*X, being X <- V*pX[i_s..i_e-1]</font>
+<a name="line1089">1089: </a><font color="#B22222">  where</font>
+<a name="line1090">1090: </a><font color="#B22222">  pX,pY, the right and left eigenvectors of the projected system</font>
+<a name="line1091">1091: </a><font color="#B22222">  ld, the leading dimension of pX and pY</font>
+<a name="line1092">1092: </a><font color="#B22222">*/</font>
+<a name="line1093">1093: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_proj_uv_KXX"></a>static PetscErrorCode dvd_improvex_jd_proj_uv_KXX(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u,Vec *v,Vec *kr,PetscScalar *theta,PetscScalar *thetai,PetscScalar *pX,PetscScalar *pY,PetscInt ld)</font></strong>
+<a name="line1094">1094: </a>{
+<a name="line1096">1096: </a>  PetscInt       n = i_e - i_s,i;
+<a name="line1097">1097: </a>  PetscScalar    *b;
+<a name="line1098">1098: </a>  Vec            *Ax,*Bx,*r;
+<a name="line1099">1099: </a>  Mat            M;
+<a name="line1100">1100: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X;
+
+<a name="line1103">1103: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(d->eps->V,4,&X);
+<a name="line1104">1104: </a>  MatCreateSeqDense(PETSC_COMM_SELF,4,2,NULL,&M);
+<a name="line1105">1105: </a>  <font color="#B22222">/* [v u] <- X(i) Y(i) */</font>
+<a name="line1106">1106: </a>  dvd_improvex_compute_X(d,i_s,i_e,v,pX,ld);
+<a name="line1107">1107: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
+<a name="line1108">1108: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->W?d->W:d->eps->V,1.0,0.0,u[i-i_s],&pY[ld*i]);
+<a name="line1109">1109: </a>  }
+
+<a name="line1111">1111: </a>  <font color="#B22222">/* Bx <- B*X(i) */</font>
+<a name="line1112">1112: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,i_e-i_s,&r);
+<a name="line1113">1113: </a>  Bx = r;
+<a name="line1114">1114: </a>  <font color="#4169E1">if</font> (d->BX) {
+<a name="line1115">1115: </a>    <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
+<a name="line1116">1116: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->BX,1.0,0.0,Bx[i-i_s],&pX[ld*i]);
+<a name="line1117">1117: </a>    }
+<a name="line1118">1118: </a>  } <font color="#4169E1">else</font> {
+<a name="line1119">1119: </a>    <font color="#4169E1">if</font> (d->B) {
+<a name="line1120">1120: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line1121">1121: </a>        MatMult(d->B,v[i],Bx[i]);
+<a name="line1122">1122: </a>      }
+<a name="line1123">1123: </a>    } <font color="#4169E1">else</font> Bx = v;
+<a name="line1124">1124: </a>  }
+
+<a name="line1126">1126: </a>  <font color="#B22222">/* Ax <- A*X(i) */</font>
+<a name="line1127">1127: </a>  Ax = kr;
+<a name="line1128">1128: </a>  <font color="#4169E1">for</font> (i=i_s; i<i_e; ++i) {
+<a name="line1129">1129: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->AX,1.0,0.0,Ax[i-i_s],&pX[ld*i]);
+<a name="line1130">1130: </a>  }
+
+<a name="line1132">1132: </a>  <font color="#B22222">/* Recompute the eigenvalue */</font>
+<a name="line1133">1133: </a>  dvd_compute_n_rr(i_s,n,d->eigr,d->eigi,u,Ax,Bx);
+
+<a name="line1135">1135: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line1136">1136: </a>    <font color="#4169E1">if</font> (d->eigi[i_s+i] == 0.0) {
+<a name="line1137">1137: </a>      <font color="#B22222">/* kr <- Ax -eig*Bx */</font>
+<a name="line1138">1138: </a>      VecAXPBY(kr[i],-d->eigr[i_s+i]/d->nX[i_s+i],1.0/d->nX[i_s+i],Bx[i]);
+<a name="line1139">1139: </a>    } <font color="#4169E1">else</font> {
+<a name="line1140">1140: </a>      <font color="#B22222">/* [kr_i kr_i+1 r_i r_i+1]*= [   1        0</font>
+<a name="line1141">1141: </a><font color="#B22222">                                       0        1</font>
+<a name="line1142">1142: </a><font color="#B22222">                                    -eigr_i -eigi_i</font>
+<a name="line1143">1143: </a><font color="#B22222">                                     eigi_i -eigr_i] */</font>
+<a name="line1144">1144: </a>      MatDenseGetArray(M,&b);
+<a name="line1145">1145: </a>      b[0] = b[5] = 1.0/d->nX[i_s+i];
+<a name="line1146">1146: </a>      b[2] = b[7] = -d->eigr[i_s+i]/d->nX[i_s+i];
+<a name="line1147">1147: </a>      b[6] = -(b[3] = d->eigi[i_s+i]/d->nX[i_s+i]);
+<a name="line1148">1148: </a>      b[1] = b[4] = 0.0;
+<a name="line1149">1149: </a>      MatDenseRestoreArray(M,&b);
+<a name="line1150">1150: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,0,kr[i]);
+<a name="line1151">1151: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,1,kr[i+1]);
+<a name="line1152">1152: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,2,r[i]);
+<a name="line1153">1153: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(X,3,r[i+1]);
+<a name="line1154">1154: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(X,0,4);
+<a name="line1155">1155: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(X,M,0,2);
+<a name="line1156">1156: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,0,kr[i]);
+<a name="line1157">1157: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(X,1,kr[i+1]);
+<a name="line1158">1158: </a>      i++;
+<a name="line1159">1159: </a>    }
 <a name="line1160">1160: </a>  }
-<a name="line1161">1161: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1162">1162: </a>}
-
-<a name="line1166">1166: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_lit_const_0"></a>static PetscErrorCode dvd_improvex_jd_lit_const_0(dvdDashboard *d,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol)</font></strong>
-<a name="line1167">1167: </a>{
-<a name="line1168">1168: </a>  dvdImprovex_jd *data = (dvdImprovex_jd*)d->improveX_data;
-<a name="line1169">1169: </a>  PetscReal      a;
-
-<a name="line1172">1172: </a>  a = SlepcAbsEigenvalue(d->eigr[i],d->eigi[i]);
-
-<a name="line1174">1174: </a>  <font color="#4169E1">if</font> (d->nR[i]/a < data->fix) {
-<a name="line1175">1175: </a>    theta[0] = d->eigr[i];
-<a name="line1176">1176: </a>    theta[1] = 1.0;
-<a name="line1177">1177: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line1178">1178: </a>    *thetai = d->eigi[i];
-<a name="line1179">1179: </a><font color="#A020F0">#endif</font>
-<a name="line1180">1180: </a>  } <font color="#4169E1">else</font> {
-<a name="line1181">1181: </a>    theta[0] = d->target[0];
-<a name="line1182">1182: </a>    theta[1] = d->target[1];
-<a name="line1183">1183: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line1184">1184: </a>    *thetai = 0.0;
-<a name="line1185">1185: </a><font color="#A020F0">#endif</font>
-<a name="line1186">1186: </a>}
-
-<a name="line1188">1188: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line1189">1189: </a>  <font color="#4169E1">if</font> (thetai) *thetai = 0.0;
-<a name="line1190">1190: </a><font color="#A020F0">#endif</font>
-<a name="line1191">1191: </a>  *maxits = data->maxits;
-<a name="line1192">1192: </a>  *tol = data->tol;
-<a name="line1193">1193: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1194">1194: </a>}
-
-<a name="line1198">1198: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_lit_const"></a>PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard *d,dvdBlackboard *b,PetscInt maxits,PetscReal tol,PetscReal fix)</font></strong>
-<a name="line1199">1199: </a>{
-<a name="line1200">1200: </a>  dvdImprovex_jd  *data = (dvdImprovex_jd*)d->improveX_data;
-
-<a name="line1203">1203: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line1204">1204: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line1205">1205: </a>    data->maxits = maxits;
-<a name="line1206">1206: </a>    data->tol = tol;
-<a name="line1207">1207: </a>    data->fix = fix;
-<a name="line1208">1208: </a>    d->improvex_jd_lit = dvd_improvex_jd_lit_const_0;
-<a name="line1209">1209: </a>  }
-<a name="line1210">1210: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1211">1211: </a>}
-
-<a name="line1215">1215: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_proj_uv"></a>PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard *d,dvdBlackboard *b,ProjType_t p)</font></strong>
-<a name="line1216">1216: </a>{
-<a name="line1218">1218: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line1219">1219: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line1220">1220: </a>    <font color="#4169E1">switch</font> (p) {
-<a name="line1221">1221: </a>    <font color="#4169E1">case</font> DVD_PROJ_KXX:
-<a name="line1222">1222: </a>      d->improvex_jd_proj_uv = dvd_improvex_jd_proj_uv_KXX;
-<a name="line1223">1223: </a>      <font color="#4169E1">break</font>;
-<a name="line1224">1224: </a>    <font color="#4169E1">case</font> DVD_PROJ_KZX:
-<a name="line1225">1225: </a>      d->improvex_jd_proj_uv = dvd_improvex_jd_proj_uv_KZX;
-<a name="line1226">1226: </a>      <font color="#4169E1">break</font>;
-<a name="line1227">1227: </a>    }
-<a name="line1228">1228: </a>  }
-<a name="line1229">1229: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1230">1230: </a>}
+<a name="line1161">1161: </a>  <font color="#4169E1">for</font> (i=0; i<n; i++) d->nX[i_s+i] = 1.0;
+
+<a name="line1163">1163: </a>  <font color="#B22222">/* kr <- P*kr */</font>
+<a name="line1164">1164: </a>  d->calcpairs_proj_res(d,i_s,i_e,r);
+<a name="line1165">1165: </a>  <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,i_e-i_s,&r);
+
+<a name="line1167">1167: </a>  <font color="#B22222">/* u <- K^{-1} X(i) */</font>
+<a name="line1168">1168: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line1169">1169: </a>    d->improvex_precond(d,i_s+i,v[i],u[i]);
+<a name="line1170">1170: </a>  }
+<a name="line1171">1171: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1172">1172: </a>}
+
+<a name="line1176">1176: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_lit_const_0"></a>static PetscErrorCode dvd_improvex_jd_lit_const_0(dvdDashboard *d,PetscInt i,PetscScalar* theta,PetscScalar* thetai,PetscInt *maxits,PetscReal *tol)</font></strong>
+<a name="line1177">1177: </a>{
+<a name="line1178">1178: </a>  dvdImprovex_jd *data = (dvdImprovex_jd*)d->improveX_data;
+<a name="line1179">1179: </a>  PetscReal      a;
+
+<a name="line1182">1182: </a>  a = SlepcAbsEigenvalue(d->eigr[i],d->eigi[i]);
+
+<a name="line1184">1184: </a>  <font color="#4169E1">if</font> (d->nR[i]/a < data->fix) {
+<a name="line1185">1185: </a>    theta[0] = d->eigr[i];
+<a name="line1186">1186: </a>    theta[1] = 1.0;
+<a name="line1187">1187: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line1188">1188: </a>    *thetai = d->eigi[i];
+<a name="line1189">1189: </a><font color="#A020F0">#endif</font>
+<a name="line1190">1190: </a>  } <font color="#4169E1">else</font> {
+<a name="line1191">1191: </a>    theta[0] = d->target[0];
+<a name="line1192">1192: </a>    theta[1] = d->target[1];
+<a name="line1193">1193: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line1194">1194: </a>    *thetai = 0.0;
+<a name="line1195">1195: </a><font color="#A020F0">#endif</font>
+<a name="line1196">1196: </a>}
+
+<a name="line1198">1198: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line1199">1199: </a>  <font color="#4169E1">if</font> (thetai) *thetai = 0.0;
+<a name="line1200">1200: </a><font color="#A020F0">#endif</font>
+<a name="line1201">1201: </a>  *maxits = data->maxits;
+<a name="line1202">1202: </a>  *tol = data->tol;
+<a name="line1203">1203: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1204">1204: </a>}
+
+<a name="line1208">1208: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_lit_const"></a>PetscErrorCode dvd_improvex_jd_lit_const(dvdDashboard *d,dvdBlackboard *b,PetscInt maxits,PetscReal tol,PetscReal fix)</font></strong>
+<a name="line1209">1209: </a>{
+<a name="line1210">1210: </a>  dvdImprovex_jd  *data = (dvdImprovex_jd*)d->improveX_data;
+
+<a name="line1213">1213: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line1214">1214: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line1215">1215: </a>    data->maxits = maxits;
+<a name="line1216">1216: </a>    data->tol = tol;
+<a name="line1217">1217: </a>    data->fix = fix;
+<a name="line1218">1218: </a>    d->improvex_jd_lit = dvd_improvex_jd_lit_const_0;
+<a name="line1219">1219: </a>  }
+<a name="line1220">1220: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1221">1221: </a>}
+
+<a name="line1225">1225: </a><strong><font color="#4169E1"><a name="dvd_improvex_jd_proj_uv"></a>PetscErrorCode dvd_improvex_jd_proj_uv(dvdDashboard *d,dvdBlackboard *b,ProjType_t p)</font></strong>
+<a name="line1226">1226: </a>{
+<a name="line1228">1228: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line1229">1229: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line1230">1230: </a>    <font color="#4169E1">switch</font> (p) {
+<a name="line1231">1231: </a>    <font color="#4169E1">case</font> DVD_PROJ_KXX:
+<a name="line1232">1232: </a>      d->improvex_jd_proj_uv = dvd_improvex_jd_proj_uv_KXX;
+<a name="line1233">1233: </a>      <font color="#4169E1">break</font>;
+<a name="line1234">1234: </a>    <font color="#4169E1">case</font> DVD_PROJ_KZX:
+<a name="line1235">1235: </a>      d->improvex_jd_proj_uv = dvd_improvex_jd_proj_uv_KZX;
+<a name="line1236">1236: </a>      <font color="#4169E1">break</font>;
+<a name="line1237">1237: </a>    }
+<a name="line1238">1238: </a>  }
+<a name="line1239">1239: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1240">1240: </a>}
+
+<a name="line1244">1244: </a><strong><font color="#4169E1"><a name="dvd_improvex_compute_X"></a>PetscErrorCode dvd_improvex_compute_X(dvdDashboard *d,PetscInt i_s,PetscInt i_e,Vec *u_,PetscScalar *pX,PetscInt ld)</font></strong>
+<a name="line1245">1245: </a>{
+<a name="line1247">1247: </a>  PetscInt       n = i_e - i_s,i;
+<a name="line1248">1248: </a>  Vec            *u;
+
+<a name="line1251">1251: </a>  <font color="#4169E1">if</font> (u_) u = u_;
+<a name="line1252">1252: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (d->correctXnorm) {
+<a name="line1253">1253: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolGetVecs.html#SlepcVecPoolGetVecs">SlepcVecPoolGetVecs</a>(d->auxV,i_e-i_s,&u);
+<a name="line1254">1254: </a>  }
+<a name="line1255">1255: </a>  <font color="#4169E1">if</font> (u_ || d->correctXnorm) {
+<a name="line1256">1256: </a>    <font color="#4169E1">for</font> (i=0; i<n; i++) {
+<a name="line1257">1257: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(d->eps->V,1.0,0.0,u[i],&pX[ld*(i+i_s)]);
+<a name="line1258">1258: </a>    }
+<a name="line1259">1259: </a>  }
+<a name="line1260">1260: </a>  <font color="#B22222">/* nX(i) <- ||X(i)|| */</font>
+<a name="line1261">1261: </a>  <font color="#4169E1">if</font> (d->correctXnorm) {
+<a name="line1262">1262: </a>    <font color="#4169E1">for</font> (i=0; i<n; i++) {
+<a name="line1263">1263: </a>      VecNormBegin(u[i],NORM_2,&d->nX[i_s+i]);
+<a name="line1264">1264: </a>    }
+<a name="line1265">1265: </a>    <font color="#4169E1">for</font> (i=0; i<n; i++) {
+<a name="line1266">1266: </a>      VecNormEnd(u[i],NORM_2,&d->nX[i_s+i]);
+<a name="line1267">1267: </a>    }
+<a name="line1268">1268: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line1269">1269: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line1270">1270: </a>      <font color="#4169E1">if</font> (d->eigi[i_s+i] != 0.0) {
+<a name="line1271">1271: </a>        d->nX[i_s+i] = d->nX[i_s+i+1] = PetscSqrtScalar(d->nX[i_s+i]*d->nX[i_s+i]+d->nX[i_s+i+1]*d->nX[i_s+i+1]);
+<a name="line1272">1272: </a>        i++;
+<a name="line1273">1273: </a>      }
+<a name="line1274">1274: </a>    }
+<a name="line1275">1275: </a><font color="#A020F0">#endif</font>
+<a name="line1276">1276: </a>  } <font color="#4169E1">else</font> {
+<a name="line1277">1277: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) d->nX[i_s+i] = 1.0;
+<a name="line1278">1278: </a>  }
+<a name="line1279">1279: </a>  <font color="#4169E1">if</font> (d->correctXnorm && !u_) {
+<a name="line1280">1280: </a>    <a href="../../../../docs/manualpages/sys/SlepcVecPoolRestoreVecs.html#SlepcVecPoolRestoreVecs">SlepcVecPoolRestoreVecs</a>(d->auxV,i_e-i_s,&u);
+<a name="line1281">1281: </a>  }
+<a name="line1282">1282: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1283">1283: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/davidson/dvdinitv.c b/src/eps/impls/davidson/dvdinitv.c
index eddc15b..d664110 100644
--- a/src/eps/impls/davidson/dvdinitv.c
+++ b/src/eps/impls/davidson/dvdinitv.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -42,7 +42,7 @@ static PetscErrorCode dvd_initV_classic_0(dvdDashboard *d)
   PetscFunctionBegin;
   /* Generate a set of random initial vectors and orthonormalize them */
   for (i=user;i<k;i++) {
-    ierr = BVSetRandomColumn(d->eps->V,i,d->eps->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(d->eps->V,i);CHKERRQ(ierr);
   }
   d->V_tra_s = 0; d->V_tra_e = 0;
   d->V_new_s = 0; d->V_new_e = i;
@@ -64,12 +64,12 @@ static PetscErrorCode dvd_initV_krylov_0(dvdDashboard *d)
   PetscFunctionBegin;
   /* If needed, generate a random vector for starting the arnoldi method */
   if (user == 0) {
-    ierr = BVSetRandomColumn(d->eps->V,0,d->eps->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(d->eps->V,0);CHKERRQ(ierr);
     user = 1;
   }
 
   /* Perform k steps of Arnoldi with the operator K^{-1}*(t[1]*A-t[2]*B) */
-  ierr = dvd_orthV(d->eps->V,0,user,d->eps->rand);CHKERRQ(ierr);
+  ierr = dvd_orthV(d->eps->V,0,user);CHKERRQ(ierr);
   for (i=user;i<k;i++) {
     /* aux <- theta[1]A*in - theta[0]*B*in */
     ierr = BVGetColumn(d->eps->V,i,&v1);CHKERRQ(ierr);
@@ -87,7 +87,7 @@ static PetscErrorCode dvd_initV_krylov_0(dvdDashboard *d)
     ierr = BVRestoreColumn(d->eps->V,i,&v1);CHKERRQ(ierr);
     ierr = BVRestoreColumn(d->eps->V,i-user,&v2);CHKERRQ(ierr);
     ierr = BVRestoreColumn(d->auxBV,0,&av);CHKERRQ(ierr);
-    ierr = dvd_orthV(d->eps->V,i,i+1,d->eps->rand);CHKERRQ(ierr);
+    ierr = dvd_orthV(d->eps->V,i,i+1);CHKERRQ(ierr);
   }
 
   d->V_tra_s = 0; d->V_tra_e = 0;
@@ -141,7 +141,7 @@ PetscErrorCode dvd_initV(dvdDashboard *d, dvdBlackboard *b, PetscInt k,PetscInt
 
 #undef __FUNCT__
 #define __FUNCT__ "dvd_orthV"
-PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e,PetscRandom rand)
+PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e)
 {
   PetscErrorCode ierr;
   PetscInt       i,j,l,k;
@@ -154,7 +154,7 @@ PetscErrorCode dvd_orthV(BV V,PetscInt V_new_s,PetscInt V_new_e,PetscRandom rand
     ierr = BVSetActiveColumns(V,0,i);CHKERRQ(ierr);
     for (j=0;j<3;j++) {
       if (j>0) {
-        ierr = BVSetRandomColumn(V,i,rand);CHKERRQ(ierr);
+        ierr = BVSetRandomColumn(V,i);CHKERRQ(ierr);
         ierr = PetscInfo1(V,"Orthonormalization problems adding the vector %D to the searching subspace\n",i);CHKERRQ(ierr);
       }
       ierr = BVOrthogonalizeColumn(V,i,NULL,&norm,&lindep);CHKERRQ(ierr);
diff --git a/src/eps/impls/davidson/dvdinitv.c.html b/src/eps/impls/davidson/dvdinitv.c.html
index 9f19770..56512be 100644
--- a/src/eps/impls/davidson/dvdinitv.c.html
+++ b/src/eps/impls/davidson/dvdinitv.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdinitv.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:05+00:00">
+<meta name="date" content="2016-05-16T10:33:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdinitv.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdinitv.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -50,7 +50,7 @@
 
 <a name="line43"> 43: </a>  <font color="#B22222">/* Generate a set of random initial vectors and orthonormalize them */</font>
 <a name="line44"> 44: </a>  <font color="#4169E1">for</font> (i=user;i<k;i++) {
-<a name="line45"> 45: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(d->eps->V,i,d->eps->rand);
+<a name="line45"> 45: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(d->eps->V,i);
 <a name="line46"> 46: </a>  }
 <a name="line47"> 47: </a>  d->V_tra_s = 0; d->V_tra_e = 0;
 <a name="line48"> 48: </a>  d->V_new_s = 0; d->V_new_e = i;
@@ -68,12 +68,12 @@
 
 <a name="line65"> 65: </a>  <font color="#B22222">/* If needed, generate a random vector for starting the arnoldi method */</font>
 <a name="line66"> 66: </a>  <font color="#4169E1">if</font> (user == 0) {
-<a name="line67"> 67: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(d->eps->V,0,d->eps->rand);
+<a name="line67"> 67: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(d->eps->V,0);
 <a name="line68"> 68: </a>    user = 1;
 <a name="line69"> 69: </a>  }
 
 <a name="line71"> 71: </a>  <font color="#B22222">/* Perform k steps of Arnoldi with the operator K^{-1}*(t[1]*A-t[2]*B) */</font>
-<a name="line72"> 72: </a>  dvd_orthV(d->eps->V,0,user,d->eps->rand);
+<a name="line72"> 72: </a>  dvd_orthV(d->eps->V,0,user);
 <a name="line73"> 73: </a>  <font color="#4169E1">for</font> (i=user;i<k;i++) {
 <a name="line74"> 74: </a>    <font color="#B22222">/* aux <- theta[1]A*in - theta[0]*B*in */</font>
 <a name="line75"> 75: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(d->eps->V,i,&v1);
@@ -91,7 +91,7 @@
 <a name="line87"> 87: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,i,&v1);
 <a name="line88"> 88: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->eps->V,i-user,&v2);
 <a name="line89"> 89: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(d->auxBV,0,&av);
-<a name="line90"> 90: </a>    dvd_orthV(d->eps->V,i,i+1,d->eps->rand);
+<a name="line90"> 90: </a>    dvd_orthV(d->eps->V,i,i+1);
 <a name="line91"> 91: </a>  }
 
 <a name="line93"> 93: </a>  d->V_tra_s = 0; d->V_tra_e = 0;
@@ -135,7 +135,7 @@
 <a name="line139">139: </a>  <font color="#4169E1">return</font>(0);
 <a name="line140">140: </a>}
 
-<a name="line144">144: </a><strong><font color="#4169E1"><a name="dvd_orthV"></a>PetscErrorCode dvd_orthV(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt V_new_s,PetscInt V_new_e,PetscRandom rand)</font></strong>
+<a name="line144">144: </a><strong><font color="#4169E1"><a name="dvd_orthV"></a>PetscErrorCode dvd_orthV(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt V_new_s,PetscInt V_new_e)</font></strong>
 <a name="line145">145: </a>{
 <a name="line147">147: </a>  PetscInt       i,j,l,k;
 <a name="line148">148: </a>  PetscBool      lindep;
@@ -146,7 +146,7 @@
 <a name="line154">154: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
 <a name="line155">155: </a>    <font color="#4169E1">for</font> (j=0;j<3;j++) {
 <a name="line156">156: </a>      <font color="#4169E1">if</font> (j>0) {
-<a name="line157">157: </a>        <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(V,i,rand);
+<a name="line157">157: </a>        <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(V,i);
 <a name="line158">158: </a>        PetscInfo1(V,<font color="#666666">"Orthonormalization problems adding the vector %D to the searching subspace\n"</font>,i);
 <a name="line159">159: </a>      }
 <a name="line160">160: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,i,NULL,&norm,&lindep);
diff --git a/src/eps/impls/davidson/dvdschm.c b/src/eps/impls/davidson/dvdschm.c
index f957577..4d2fe54 100644
--- a/src/eps/impls/davidson/dvdschm.c
+++ b/src/eps/impls/davidson/dvdschm.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -25,7 +25,7 @@
 
 #undef __FUNCT__
 #define __FUNCT__ "dvd_schm_basic_preconf"
-PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,Method_t method)
+PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool doubleexp)
 {
   PetscErrorCode ierr;
   PetscInt       check_sum0,check_sum1;
@@ -37,7 +37,7 @@ PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt
   for (check_sum0=-1,check_sum1=DVD_CHECKSUM(b); check_sum0 != check_sum1; check_sum0 = check_sum1, check_sum1 = DVD_CHECKSUM(b)) {
 
     /* Setup basic management of V */
-    ierr = dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,harmMode==DVD_HARM_NONE?PETSC_FALSE:PETSC_TRUE,allResiduals);CHKERRQ(ierr);
+    ierr = dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,PetscNot(harmMode==DVD_HARM_NONE),allResiduals);CHKERRQ(ierr);
 
     /* Setup the initial subspace for V */
     ierr = dvd_initV(d,b,ini_size_V,size_initV,(init==DVD_INITV_KRYLOV)?PETSC_TRUE:PETSC_FALSE);CHKERRQ(ierr);
@@ -46,22 +46,18 @@ PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt
     ierr = dvd_testconv_slepc(d,b);CHKERRQ(ierr);
 
     /* Setup Raileigh-Ritz for selecting the best eigenpairs in V */
-    ierr = dvd_calcpairs_qz(d,b,orth,cX_proj,(harmMode==DVD_HARM_NONE)?PETSC_FALSE:PETSC_TRUE);CHKERRQ(ierr);
+    ierr = dvd_calcpairs_qz(d,b,orth,cX_proj,PetscNot(harmMode==DVD_HARM_NONE));CHKERRQ(ierr);
     if (harmMode != DVD_HARM_NONE) {
       ierr = dvd_harm_conf(d,b,harmMode,PETSC_FALSE,0.0);CHKERRQ(ierr);
     }
 
     /* Setup the method for improving the eigenvectors */
-    switch (method) {
-    case DVD_METH_GD:
-    case DVD_METH_JD:
+    if (doubleexp) {
+      ierr = dvd_improvex_gd2(d,b,ksp,bs);CHKERRQ(ierr);
+    } else {
       ierr = dvd_improvex_jd(d,b,ksp,bs,cX_impr,PETSC_FALSE);CHKERRQ(ierr);
       ierr = dvd_improvex_jd_proj_uv(d,b,DVD_PROJ_KZX);CHKERRQ(ierr);
       ierr = dvd_improvex_jd_lit_const(d,b,0,0.0,0.0);CHKERRQ(ierr);
-      break;
-    case DVD_METH_GD2:
-      ierr = dvd_improvex_gd2(d,b,ksp,bs);CHKERRQ(ierr);
-      break;
     }
   }
   PetscFunctionReturn(0);
@@ -69,7 +65,7 @@ PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt
 
 #undef __FUNCT__
 #define __FUNCT__ "dvd_schm_basic_conf"
-PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,Method_t method)
+PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,PetscBool doubleexp)
 {
   PetscInt       check_sum0,check_sum1,maxits;
   PetscReal      tol;
@@ -80,7 +76,7 @@ PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd
   check_sum0 = DVD_CHECKSUM(b);
 
   /* Setup basic management of V */
-  ierr = dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,(harmMode==DVD_HARM_NONE)?PETSC_FALSE:PETSC_TRUE,allResiduals);CHKERRQ(ierr);
+  ierr = dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,PetscNot(harmMode==DVD_HARM_NONE),allResiduals);CHKERRQ(ierr);
 
   /* Setup the initial subspace for V */
   ierr = dvd_initV(d,b,ini_size_V,size_initV,(init==DVD_INITV_KRYLOV)?PETSC_TRUE:PETSC_FALSE);CHKERRQ(ierr);
@@ -89,23 +85,19 @@ PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd
   ierr = dvd_testconv_slepc(d,b);CHKERRQ(ierr);
 
   /* Setup Raileigh-Ritz for selecting the best eigenpairs in V */
-  ierr = dvd_calcpairs_qz(d,b,orth,cX_proj,(harmMode==DVD_HARM_NONE)?PETSC_FALSE:PETSC_TRUE);CHKERRQ(ierr);
+  ierr = dvd_calcpairs_qz(d,b,orth,cX_proj,PetscNot(harmMode==DVD_HARM_NONE));CHKERRQ(ierr);
   if (harmMode != DVD_HARM_NONE) {
     ierr = dvd_harm_conf(d,b,harmMode,fixedTarget,t);CHKERRQ(ierr);
   }
 
   /* Setup the method for improving the eigenvectors */
-  switch (method) {
-    case DVD_METH_GD:
-    case DVD_METH_JD:
-      ierr = dvd_improvex_jd(d,b,ksp,bs,cX_impr,dynamic);CHKERRQ(ierr);
-      ierr = dvd_improvex_jd_proj_uv(d,b,DVD_PROJ_KZX);CHKERRQ(ierr);
-      ierr = KSPGetTolerances(ksp,&tol,NULL,NULL,&maxits);CHKERRQ(ierr);
-      ierr = dvd_improvex_jd_lit_const(d,b,maxits,tol,fix);CHKERRQ(ierr);
-      break;
-    case DVD_METH_GD2:
-      ierr = dvd_improvex_gd2(d,b,ksp,bs);CHKERRQ(ierr);
-      break;
+  if (doubleexp) {
+    ierr = dvd_improvex_gd2(d,b,ksp,bs);CHKERRQ(ierr);
+  } else {
+    ierr = dvd_improvex_jd(d,b,ksp,bs,cX_impr,dynamic);CHKERRQ(ierr);
+    ierr = dvd_improvex_jd_proj_uv(d,b,DVD_PROJ_KZX);CHKERRQ(ierr);
+    ierr = KSPGetTolerances(ksp,&tol,NULL,NULL,&maxits);CHKERRQ(ierr);
+    ierr = dvd_improvex_jd_lit_const(d,b,maxits,tol,fix);CHKERRQ(ierr);
   }
 
   check_sum1 = DVD_CHECKSUM(b);
diff --git a/src/eps/impls/davidson/dvdschm.c.html b/src/eps/impls/davidson/dvdschm.c.html
index c96bcb6..fa42aad 100644
--- a/src/eps/impls/davidson/dvdschm.c.html
+++ b/src/eps/impls/davidson/dvdschm.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdschm.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:05+00:00">
+<meta name="date" content="2016-05-16T10:33:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdschm.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdschm.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,7 +35,7 @@
 
 <a name="line24"> 24: </a><strong><font color="#228B22">#define DVD_CHECKSUM(b) ((b)->max_size_V + (b)->max_size_oldX)</font></strong>
 
-<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="dvd_schm_basic_preconf"></a>PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,Method_t method)</font></strong>
+<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="dvd_schm_basic_preconf"></a>PetscErrorCode dvd_schm_basic_preconf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,KSP ksp,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool doubleexp)</font></strong>
 <a name="line29"> 29: </a>{
 <a name="line31"> 31: </a>  PetscInt       check_sum0,check_sum1;
 
@@ -45,7 +45,7 @@
 <a name="line37"> 37: </a>  <font color="#4169E1">for</font> (check_sum0=-1,check_sum1=DVD_CHECKSUM(b); check_sum0 != check_sum1; check_sum0 = check_sum1, check_sum1 = DVD_CHECKSUM(b)) {
 
 <a name="line39"> 39: </a>    <font color="#B22222">/* Setup basic management of V */</font>
-<a name="line40"> 40: </a>    dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,harmMode==DVD_HARM_NONE?PETSC_FALSE:PETSC_TRUE,allResiduals);
+<a name="line40"> 40: </a>    dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,PetscNot(harmMode==DVD_HARM_NONE),allResiduals);
 
 <a name="line42"> 42: </a>    <font color="#B22222">/* Setup the initial subspace for V */</font>
 <a name="line43"> 43: </a>    dvd_initV(d,b,ini_size_V,size_initV,(init==DVD_INITV_KRYLOV)?PETSC_TRUE:PETSC_FALSE);
@@ -54,68 +54,60 @@
 <a name="line46"> 46: </a>    dvd_testconv_slepc(d,b);
 
 <a name="line48"> 48: </a>    <font color="#B22222">/* Setup Raileigh-Ritz for selecting the best eigenpairs in V */</font>
-<a name="line49"> 49: </a>    dvd_calcpairs_qz(d,b,orth,cX_proj,(harmMode==DVD_HARM_NONE)?PETSC_FALSE:PETSC_TRUE);
+<a name="line49"> 49: </a>    dvd_calcpairs_qz(d,b,orth,cX_proj,PetscNot(harmMode==DVD_HARM_NONE));
 <a name="line50"> 50: </a>    <font color="#4169E1">if</font> (harmMode != DVD_HARM_NONE) {
 <a name="line51"> 51: </a>      dvd_harm_conf(d,b,harmMode,PETSC_FALSE,0.0);
 <a name="line52"> 52: </a>    }
 
 <a name="line54"> 54: </a>    <font color="#B22222">/* Setup the method for improving the eigenvectors */</font>
-<a name="line55"> 55: </a>    <font color="#4169E1">switch</font> (method) {
-<a name="line56"> 56: </a>    <font color="#4169E1">case</font> DVD_METH_GD:
-<a name="line57"> 57: </a>    <font color="#4169E1">case</font> DVD_METH_JD:
+<a name="line55"> 55: </a>    <font color="#4169E1">if</font> (doubleexp) {
+<a name="line56"> 56: </a>      dvd_improvex_gd2(d,b,ksp,bs);
+<a name="line57"> 57: </a>    } <font color="#4169E1">else</font> {
 <a name="line58"> 58: </a>      dvd_improvex_jd(d,b,ksp,bs,cX_impr,PETSC_FALSE);
 <a name="line59"> 59: </a>      dvd_improvex_jd_proj_uv(d,b,DVD_PROJ_KZX);
 <a name="line60"> 60: </a>      dvd_improvex_jd_lit_const(d,b,0,0.0,0.0);
-<a name="line61"> 61: </a>      <font color="#4169E1">break</font>;
-<a name="line62"> 62: </a>    <font color="#4169E1">case</font> DVD_METH_GD2:
-<a name="line63"> 63: </a>      dvd_improvex_gd2(d,b,ksp,bs);
-<a name="line64"> 64: </a>      <font color="#4169E1">break</font>;
-<a name="line65"> 65: </a>    }
-<a name="line66"> 66: </a>  }
-<a name="line67"> 67: </a>  <font color="#4169E1">return</font>(0);
-<a name="line68"> 68: </a>}
-
-<a name="line72"> 72: </a><strong><font color="#4169E1"><a name="dvd_schm_basic_conf"></a>PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,Method_t method)</font></strong>
-<a name="line73"> 73: </a>{
-<a name="line74"> 74: </a>  PetscInt       check_sum0,check_sum1,maxits;
-<a name="line75"> 75: </a>  PetscReal      tol;
-
-<a name="line79"> 79: </a>  b->state = DVD_STATE_CONF;
-<a name="line80"> 80: </a>  check_sum0 = DVD_CHECKSUM(b);
-
-<a name="line82"> 82: </a>  <font color="#B22222">/* Setup basic management of V */</font>
-<a name="line83"> 83: </a>  dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,(harmMode==DVD_HARM_NONE)?PETSC_FALSE:PETSC_TRUE,allResiduals);
-
-<a name="line85"> 85: </a>  <font color="#B22222">/* Setup the initial subspace for V */</font>
-<a name="line86"> 86: </a>  dvd_initV(d,b,ini_size_V,size_initV,(init==DVD_INITV_KRYLOV)?PETSC_TRUE:PETSC_FALSE);
-
-<a name="line88"> 88: </a>  <font color="#B22222">/* Setup the convergence in order to use the SLEPc convergence test */</font>
-<a name="line89"> 89: </a>  dvd_testconv_slepc(d,b);
-
-<a name="line91"> 91: </a>  <font color="#B22222">/* Setup Raileigh-Ritz for selecting the best eigenpairs in V */</font>
-<a name="line92"> 92: </a>  dvd_calcpairs_qz(d,b,orth,cX_proj,(harmMode==DVD_HARM_NONE)?PETSC_FALSE:PETSC_TRUE);
-<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (harmMode != DVD_HARM_NONE) {
-<a name="line94"> 94: </a>    dvd_harm_conf(d,b,harmMode,fixedTarget,t);
-<a name="line95"> 95: </a>  }
-
-<a name="line97"> 97: </a>  <font color="#B22222">/* Setup the method for improving the eigenvectors */</font>
-<a name="line98"> 98: </a>  <font color="#4169E1">switch</font> (method) {
-<a name="line99"> 99: </a>    <font color="#4169E1">case</font> DVD_METH_GD:
-<a name="line100">100: </a>    <font color="#4169E1">case</font> DVD_METH_JD:
-<a name="line101">101: </a>      dvd_improvex_jd(d,b,ksp,bs,cX_impr,dynamic);
-<a name="line102">102: </a>      dvd_improvex_jd_proj_uv(d,b,DVD_PROJ_KZX);
-<a name="line103">103: </a>      KSPGetTolerances(ksp,&tol,NULL,NULL,&maxits);
-<a name="line104">104: </a>      dvd_improvex_jd_lit_const(d,b,maxits,tol,fix);
-<a name="line105">105: </a>      <font color="#4169E1">break</font>;
-<a name="line106">106: </a>    <font color="#4169E1">case</font> DVD_METH_GD2:
-<a name="line107">107: </a>      dvd_improvex_gd2(d,b,ksp,bs);
-<a name="line108">108: </a>      <font color="#4169E1">break</font>;
-<a name="line109">109: </a>  }
-
-<a name="line111">111: </a>  check_sum1 = DVD_CHECKSUM(b);
-<a name="line112">112: </a>  <font color="#4169E1">if</font> (check_sum0 != check_sum1) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Something awful happened"</font>);
-<a name="line113">113: </a>  <font color="#4169E1">return</font>(0);
-<a name="line114">114: </a>}
+<a name="line61"> 61: </a>    }
+<a name="line62"> 62: </a>  }
+<a name="line63"> 63: </a>  <font color="#4169E1">return</font>(0);
+<a name="line64"> 64: </a>}
+
+<a name="line68"> 68: </a><strong><font color="#4169E1"><a name="dvd_schm_basic_conf"></a>PetscErrorCode dvd_schm_basic_conf(dvdDashboard *d,dvdBlackboard *b,PetscInt mpd,PetscInt min_size_V,PetscInt bs,PetscInt ini_size_V,PetscInt size_initV,PetscInt plusk,HarmType_t harmMode,PetscBool fixedTarget,PetscScalar t,KSP ksp,PetscReal fix,InitType_t init,PetscBool allResiduals,PetscBool orth,PetscInt cX_proj,PetscInt cX_impr,PetscBool dynamic,PetscBool doubleexp)</font></strong>
+<a name="line69"> 69: </a>{
+<a name="line70"> 70: </a>  PetscInt       check_sum0,check_sum1,maxits;
+<a name="line71"> 71: </a>  PetscReal      tol;
+
+<a name="line75"> 75: </a>  b->state = DVD_STATE_CONF;
+<a name="line76"> 76: </a>  check_sum0 = DVD_CHECKSUM(b);
+
+<a name="line78"> 78: </a>  <font color="#B22222">/* Setup basic management of V */</font>
+<a name="line79"> 79: </a>  dvd_managementV_basic(d,b,bs,mpd,min_size_V,plusk,PetscNot(harmMode==DVD_HARM_NONE),allResiduals);
+
+<a name="line81"> 81: </a>  <font color="#B22222">/* Setup the initial subspace for V */</font>
+<a name="line82"> 82: </a>  dvd_initV(d,b,ini_size_V,size_initV,(init==DVD_INITV_KRYLOV)?PETSC_TRUE:PETSC_FALSE);
+
+<a name="line84"> 84: </a>  <font color="#B22222">/* Setup the convergence in order to use the SLEPc convergence test */</font>
+<a name="line85"> 85: </a>  dvd_testconv_slepc(d,b);
+
+<a name="line87"> 87: </a>  <font color="#B22222">/* Setup Raileigh-Ritz for selecting the best eigenpairs in V */</font>
+<a name="line88"> 88: </a>  dvd_calcpairs_qz(d,b,orth,cX_proj,PetscNot(harmMode==DVD_HARM_NONE));
+<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (harmMode != DVD_HARM_NONE) {
+<a name="line90"> 90: </a>    dvd_harm_conf(d,b,harmMode,fixedTarget,t);
+<a name="line91"> 91: </a>  }
+
+<a name="line93"> 93: </a>  <font color="#B22222">/* Setup the method for improving the eigenvectors */</font>
+<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (doubleexp) {
+<a name="line95"> 95: </a>    dvd_improvex_gd2(d,b,ksp,bs);
+<a name="line96"> 96: </a>  } <font color="#4169E1">else</font> {
+<a name="line97"> 97: </a>    dvd_improvex_jd(d,b,ksp,bs,cX_impr,dynamic);
+<a name="line98"> 98: </a>    dvd_improvex_jd_proj_uv(d,b,DVD_PROJ_KZX);
+<a name="line99"> 99: </a>    KSPGetTolerances(ksp,&tol,NULL,NULL,&maxits);
+<a name="line100">100: </a>    dvd_improvex_jd_lit_const(d,b,maxits,tol,fix);
+<a name="line101">101: </a>  }
+
+<a name="line103">103: </a>  check_sum1 = DVD_CHECKSUM(b);
+<a name="line104">104: </a>  <font color="#4169E1">if</font> (check_sum0 != check_sum1) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Something awful happened"</font>);
+<a name="line105">105: </a>  <font color="#4169E1">return</font>(0);
+<a name="line106">106: </a>}
 </pre>
 </body>
 
diff --git a/src/eps/impls/davidson/dvdtestconv.c b/src/eps/impls/davidson/dvdtestconv.c
index 81edbe6..c69108d 100644
--- a/src/eps/impls/davidson/dvdtestconv.c
+++ b/src/eps/impls/davidson/dvdtestconv.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -35,7 +35,7 @@ static PetscBool dvd_testconv_basic_0(dvdDashboard *d,PetscScalar eigvr,PetscSca
   PetscFunctionBegin;
   eig_norm = SlepcAbsEigenvalue(eigvr, eigvi);
   errest = r/eig_norm;
-  conv = (errest <= d->tol)? PETSC_TRUE: PETSC_FALSE;
+  conv = PetscNot(errest > d->tol);
   if (err) *err = errest;
   PetscFunctionReturn(conv);
 }
@@ -63,7 +63,7 @@ static PetscBool dvd_testconv_slepc_0(dvdDashboard *d,PetscScalar eigvr,PetscSca
 
   PetscFunctionBegin;
   ierr = (*d->eps->converged)(d->eps,eigvr,eigvi,r,err,d->eps->convergedctx);CHKERRABORT(PetscObjectComm((PetscObject)d->eps),ierr);
-  PetscFunctionReturn((*err<d->eps->tol)? PETSC_TRUE: PETSC_FALSE);
+  PetscFunctionReturn(PetscNot(*err>=d->eps->tol));
 }
 
 #undef __FUNCT__
diff --git a/src/eps/impls/davidson/dvdtestconv.c.html b/src/eps/impls/davidson/dvdtestconv.c.html
index 81ddb93..367682c 100644
--- a/src/eps/impls/davidson/dvdtestconv.c.html
+++ b/src/eps/impls/davidson/dvdtestconv.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdtestconv.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:05+00:00">
+<meta name="date" content="2016-05-16T10:33:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdtestconv.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdtestconv.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -44,7 +44,7 @@
 
 <a name="line36"> 36: </a>  eig_norm = SlepcAbsEigenvalue(eigvr, eigvi);
 <a name="line37"> 37: </a>  errest = r/eig_norm;
-<a name="line38"> 38: </a>  conv = (errest <= d->tol)? PETSC_TRUE: PETSC_FALSE;
+<a name="line38"> 38: </a>  conv = PetscNot(errest > d->tol);
 <a name="line39"> 39: </a>  <font color="#4169E1">if</font> (err) *err = errest;
 <a name="line40"> 40: </a>  PetscFunctionReturn(conv);
 <a name="line41"> 41: </a>}
@@ -64,7 +64,7 @@
 <a name="line61"> 61: </a>{
 
 <a name="line65"> 65: </a>  (*d->eps->converged)(d->eps,eigvr,eigvi,r,err,d->eps->convergedctx);CHKERRABORT(PetscObjectComm((PetscObject)d->eps),ierr);
-<a name="line66"> 66: </a>  PetscFunctionReturn((*err<d->eps->tol)? PETSC_TRUE: PETSC_FALSE);
+<a name="line66"> 66: </a>  PetscFunctionReturn(PetscNot(*err>=d->eps->tol));
 <a name="line67"> 67: </a>}
 
 <a name="line71"> 71: </a><strong><font color="#4169E1"><a name="dvd_testconv_slepc"></a>PetscErrorCode dvd_testconv_slepc(dvdDashboard *d, dvdBlackboard *b)</font></strong>
diff --git a/src/eps/impls/davidson/dvdupdatev.c b/src/eps/impls/davidson/dvdupdatev.c
index a244cc5..66d14af 100644
--- a/src/eps/impls/davidson/dvdupdatev.c
+++ b/src/eps/impls/davidson/dvdupdatev.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -24,14 +24,13 @@
 */
 
 #include "davidson.h"
-#include <slepc/private/dsimpl.h>
 
 typedef struct {
   PetscInt          min_size_V;        /* restart with this number of eigenvectors */
   PetscInt          plusk;             /* at restart, save plusk vectors from last iteration */
   PetscInt          mpd;               /* max size of the searching subspace */
   void              *old_updateV_data; /* old updateV data */
-  isRestarting_type old_isRestarting;  /* old isRestarting */
+  PetscErrorCode    (*old_isRestarting)(dvdDashboard*,PetscBool*);  /* old isRestarting */
   Mat               oldU;              /* previous projected right igenvectors */
   Mat               oldV;              /* previous projected left eigenvectors */
   PetscInt          size_oldU;         /* size of oldU */
diff --git a/src/eps/impls/davidson/dvdupdatev.c.html b/src/eps/impls/davidson/dvdupdatev.c.html
index 3fa7349..3148431 100644
--- a/src/eps/impls/davidson/dvdupdatev.c.html
+++ b/src/eps/impls/davidson/dvdupdatev.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdupdatev.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:05+00:00">
+<meta name="date" content="2016-05-16T10:33:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdupdatev.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdupdatev.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -36,364 +36,363 @@
 <a name="line24"> 24: </a><font color="#B22222">*/</font>
 
 <a name="line26"> 26: </a> #include <A href="davidson.h.html">davidson.h</A>
-<a name="line27"> 27: </a><font color="#A020F0">#include <slepc/private/dsimpl.h></font>
-
-<a name="line29"> 29: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line30"> 30: </a>  PetscInt          min_size_V;        <font color="#B22222">/* restart with this number of eigenvectors */</font>
-<a name="line31"> 31: </a>  PetscInt          plusk;             <font color="#B22222">/* at restart, save plusk vectors from last iteration */</font>
-<a name="line32"> 32: </a>  PetscInt          mpd;               <font color="#B22222">/* max size of the searching subspace */</font>
-<a name="line33"> 33: </a>  void              *old_updateV_data; <font color="#B22222">/* old updateV data */</font>
-<a name="line34"> 34: </a>  isRestarting_type old_isRestarting;  <font color="#B22222">/* old isRestarting */</font>
-<a name="line35"> 35: </a>  Mat               oldU;              <font color="#B22222">/* previous projected right igenvectors */</font>
-<a name="line36"> 36: </a>  Mat               oldV;              <font color="#B22222">/* previous projected left eigenvectors */</font>
-<a name="line37"> 37: </a>  PetscInt          size_oldU;         <font color="#B22222">/* size of oldU */</font>
-<a name="line38"> 38: </a>  PetscBool         allResiduals;      <font color="#B22222">/* if computing all the residuals */</font>
-<a name="line39"> 39: </a>} dvdManagV_basic;
-
-<a name="line43"> 43: </a><strong><font color="#4169E1"><a name="dvd_updateV_start"></a>static PetscErrorCode dvd_updateV_start(dvdDashboard *d)</font></strong>
-<a name="line44"> 44: </a>{
-<a name="line45"> 45: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-<a name="line46"> 46: </a>  PetscInt        i;
-
-<a name="line49"> 49: </a>  <font color="#4169E1">for</font> (i=0;i<d->eps->ncv;i++) d->eigi[i] = 0.0;
-<a name="line50"> 50: </a>  d->nR = d->real_nR;
-<a name="line51"> 51: </a>  <font color="#4169E1">for</font> (i=0;i<d->eps->ncv;i++) d->nR[i] = PETSC_MAX_REAL;
-<a name="line52"> 52: </a>  d->nX = d->real_nX;
-<a name="line53"> 53: </a>  <font color="#4169E1">for</font> (i=0;i<d->eps->ncv;i++) d->errest[i] = PETSC_MAX_REAL;
-<a name="line54"> 54: </a>  data->size_oldU = 0;
-<a name="line55"> 55: </a>  d->nconv = 0;
-<a name="line56"> 56: </a>  d->npreconv = 0;
-<a name="line57"> 57: </a>  d->V_tra_s = d->V_tra_e = d->V_new_s = d->V_new_e = 0;
-<a name="line58"> 58: </a>  d->size_D = 0;
-<a name="line59"> 59: </a>  <font color="#4169E1">return</font>(0);
-<a name="line60"> 60: </a>}
-
-<a name="line64"> 64: </a><strong><font color="#4169E1"><a name="dvd_isrestarting_fullV"></a>static PetscErrorCode dvd_isrestarting_fullV(dvdDashboard *d,PetscBool *r)</font></strong>
-<a name="line65"> 65: </a>{
-<a name="line66"> 66: </a>  PetscErrorCode  ierr;
-<a name="line67"> 67: </a>  PetscInt        l,k;
-<a name="line68"> 68: </a>  PetscBool       restart;
-<a name="line69"> 69: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-
-<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
-<a name="line73"> 73: </a>  restart = (k+2 > d->eps->ncv)? PETSC_TRUE: PETSC_FALSE;
-
-<a name="line75"> 75: </a>  <font color="#B22222">/* Check old isRestarting function */</font>
-<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (!restart && data->old_isRestarting) {
-<a name="line77"> 77: </a>    data->old_isRestarting(d,&restart);
-<a name="line78"> 78: </a>  }
-<a name="line79"> 79: </a>  *r = restart;
-<a name="line80"> 80: </a>  <font color="#4169E1">return</font>(0);
-<a name="line81"> 81: </a>}
-
-<a name="line85"> 85: </a><strong><font color="#4169E1"><a name="dvd_managementV_basic_d"></a>static PetscErrorCode dvd_managementV_basic_d(dvdDashboard *d)</font></strong>
-<a name="line86"> 86: </a>{
-<a name="line87"> 87: </a>  PetscErrorCode  ierr;
-<a name="line88"> 88: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-
-<a name="line91"> 91: </a>  <font color="#B22222">/* Restore changes in dvdDashboard */</font>
-<a name="line92"> 92: </a>  d->updateV_data = data->old_updateV_data;
-
-<a name="line94"> 94: </a>  <font color="#B22222">/* Free local data */</font>
-<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (data->oldU) { MatDestroy(&data->oldU); }
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (data->oldV) { MatDestroy(&data->oldV); }
-<a name="line97"> 97: </a>  PetscFree(d->real_nR);
-<a name="line98"> 98: </a>  PetscFree(d->real_nX);
-<a name="line99"> 99: </a>  PetscFree(data);
-<a name="line100">100: </a>  <font color="#4169E1">return</font>(0);
-<a name="line101">101: </a>}
-
-<a name="line105">105: </a><strong><font color="#4169E1"><a name="dvd_updateV_conv_gen"></a>static PetscErrorCode dvd_updateV_conv_gen(dvdDashboard *d)</font></strong>
-<a name="line106">106: </a>{
-<a name="line107">107: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-<a name="line108">108: </a>  PetscInt        npreconv,cMT,cMTX,lV,kV,nV;
-<a name="line109">109: </a>  PetscErrorCode  ierr;
-<a name="line110">110: </a>  Mat             Q;
-<a name="line111">111: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line112">112: </a>  PetscInt        i;
-<a name="line113">113: </a><font color="#A020F0">#endif</font>
-
-<a name="line116">116: </a>  npreconv = d->npreconv;
-<a name="line117">117: </a>  <font color="#B22222">/* Constrains the converged pairs to nev */</font>
-<a name="line118">118: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line119">119: </a>  <font color="#B22222">/* Tries to maintain together conjugate eigenpairs */</font>
-<a name="line120">120: </a>  <font color="#4169E1">for</font> (i=0; (i + (d->eigi[i]!=0.0?1:0) < npreconv) && (d->nconv + i < d->nev); i+= (d->eigi[i]!=0.0?2:1));
-<a name="line121">121: </a>  npreconv = i;
-<a name="line122">122: </a><font color="#A020F0">#else</font>
-<a name="line123">123: </a>  npreconv = PetscMax(PetscMin(d->nev-d->nconv,npreconv),0);
-<a name="line124">124: </a><font color="#A020F0">#endif</font>
-<a name="line125">125: </a>  <font color="#B22222">/* Quick exit */</font>
-<a name="line126">126: </a>  <font color="#4169E1">if</font> (npreconv == 0) <font color="#4169E1">return</font>(0);
-
-<a name="line128">128: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
-<a name="line129">129: </a>  nV  = kV - lV; 
-<a name="line130">130: </a>  cMT = nV - npreconv;
-<a name="line131">131: </a>  <font color="#B22222">/* Harmonics restarts wiht right eigenvectors, and other with the left ones.</font>
-<a name="line132">132: </a><font color="#B22222">     If the problem is standard or hermitian, left and right vectors are the same */</font>
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (!(d->W||DVD_IS(d->sEP,DVD_EP_STD)||DVD_IS(d->sEP,DVD_EP_HERMITIAN))) {
-<a name="line134">134: </a>    <font color="#B22222">/* ps.Q <- [ps.Q(0:npreconv-1) ps.Z(npreconv:size_H-1)] */</font>
-<a name="line135">135: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(d->eps->ds,DS_MAT_Q,&Q);
-<a name="line136">136: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,npreconv,Q,0,npreconv,nV,cMT,PETSC_TRUE);
-<a name="line137">137: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(d->eps->ds,DS_MAT_Q,&Q);
-<a name="line138">138: </a>  }
-<a name="line139">139: </a>  <font color="#4169E1">if</font> (DVD_IS(d->sEP,DVD_EP_INDEFINITE)) {
-<a name="line140">140: </a>    DSPseudoOrthogonalize(d->eps->ds,DS_MAT_Q,nV,d->nBds,&cMTX,d->nBds);
-<a name="line141">141: </a>  } <font color="#4169E1">else</font> {
-<a name="line142">142: </a>    DSOrthogonalize(d->eps->ds,DS_MAT_Q,nV,&cMTX);
-<a name="line143">143: </a>  }
-<a name="line144">144: </a>  cMT = cMTX - npreconv;
-
-<a name="line146">146: </a>  <font color="#4169E1">if</font> (d->W) {
-<a name="line147">147: </a>    DSOrthogonalize(d->eps->ds,DS_MAT_Z,nV,&cMTX);
-<a name="line148">148: </a>    cMT = PetscMin(cMT,cMTX - npreconv);
-<a name="line149">149: </a>  }
-
-<a name="line151">151: </a>  <font color="#B22222">/* Lock the converged pairs */</font>
-<a name="line152">152: </a>  d->eigr+= npreconv;
-<a name="line153">153: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line154">154: </a>  <font color="#4169E1">if</font> (d->eigi) d->eigi+= npreconv;
-<a name="line155">155: </a><font color="#A020F0">#endif</font>
-<a name="line156">156: </a>  d->nconv+= npreconv;
-<a name="line157">157: </a>  d->errest+= npreconv;
-<a name="line158">158: </a>  <font color="#B22222">/* Notify the changes in V and update the other subspaces */</font>
-<a name="line159">159: </a>  d->V_tra_s = npreconv;          d->V_tra_e = nV;
-<a name="line160">160: </a>  d->V_new_s = cMT;               d->V_new_e = d->V_new_s;
-<a name="line161">161: </a>  <font color="#B22222">/* Remove oldU */</font>
-<a name="line162">162: </a>  data->size_oldU = 0;
-
-<a name="line164">164: </a>  d->npreconv-= npreconv;
-<a name="line165">165: </a>  <font color="#4169E1">return</font>(0);
-<a name="line166">166: </a>}
-
-<a name="line170">170: </a><strong><font color="#4169E1"><a name="dvd_updateV_restart_gen"></a>static PetscErrorCode dvd_updateV_restart_gen(dvdDashboard *d)</font></strong>
-<a name="line171">171: </a>{
-<a name="line172">172: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-<a name="line173">173: </a>  PetscInt        lV,kV,nV,size_plusk,size_X,cMTX,cMTY;
-<a name="line174">174: </a>  Mat             Q;
-<a name="line175">175: </a>  PetscErrorCode  ierr;
-
-<a name="line178">178: </a>  <font color="#B22222">/* Select size_X desired pairs from V */</font>
-<a name="line179">179: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
-<a name="line180">180: </a>  nV = kV - lV;
-<a name="line181">181: </a>  size_X = PetscMin(data->min_size_V,nV);
-
-<a name="line183">183: </a>  <font color="#B22222">/* Add plusk eigenvectors from the previous iteration */</font>
-<a name="line184">184: </a>  size_plusk = PetscMax(0,PetscMin(PetscMin(data->plusk,data->size_oldU),d->eps->ncv - size_X));
-
-<a name="line186">186: </a>  d->size_MT = nV;
-<a name="line187">187: </a>  <font color="#B22222">/* ps.Q <- orth([pX(0:size_X-1) [oldU(0:size_plusk-1); 0] ]) */</font>
-<a name="line188">188: </a>  <font color="#B22222">/* Harmonics restarts wiht right eigenvectors, and other with the left ones.</font>
-<a name="line189">189: </a><font color="#B22222">     If the problem is standard or hermitian, left and right vectors are the same */</font>
-<a name="line190">190: </a>  <font color="#4169E1">if</font> (!(d->W||DVD_IS(d->sEP,DVD_EP_STD)||DVD_IS(d->sEP,DVD_EP_HERMITIAN))) {
-<a name="line191">191: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(d->eps->ds,DS_MAT_Q,&Q);
-<a name="line192">192: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,0,Q,0,0,nV,size_X,PETSC_TRUE);
-<a name="line193">193: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(d->eps->ds,DS_MAT_Q,&Q);
-<a name="line194">194: </a>  }
-<a name="line195">195: </a>  <font color="#4169E1">if</font> (size_plusk > 0 && DVD_IS(d->sEP,DVD_EP_INDEFINITE)) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Unsupported plusk>0 in indefinite eigenvalue problems"</font>);
-<a name="line196">196: </a>  <font color="#4169E1">if</font> (size_plusk > 0) {
-<a name="line197">197: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Q,0,size_X,data->oldU,0,0,nV,size_plusk,PETSC_FALSE);
-<a name="line198">198: </a>  }
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (DVD_IS(d->sEP,DVD_EP_INDEFINITE)) {
-<a name="line200">200: </a>    DSPseudoOrthogonalize(d->eps->ds,DS_MAT_Q,size_X,d->nBds,&cMTX,d->nBds);
-<a name="line201">201: </a>  } <font color="#4169E1">else</font> {
-<a name="line202">202: </a>    DSOrthogonalize(d->eps->ds,DS_MAT_Q,size_X+size_plusk,&cMTX);
-<a name="line203">203: </a>  }
-
-<a name="line205">205: </a>  <font color="#4169E1">if</font> (d->W && size_plusk > 0) {
-<a name="line206">206: </a>    <font color="#B22222">/* ps.Z <- orth([ps.Z(0:size_X-1) [oldV(0:size_plusk-1); 0] ]) */</font>
-<a name="line207">207: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,size_X,data->oldV,0,0,nV,size_plusk,PETSC_FALSE);
-<a name="line208">208: </a>    DSOrthogonalize(d->eps->ds,DS_MAT_Z,size_X+size_plusk,&cMTY);
-<a name="line209">209: </a>    cMTX = PetscMin(cMTX, cMTY);
-<a name="line210">210: </a>  }
-
-<a name="line212">212: </a>  <font color="#B22222">/* Notify the changes in V and update the other subspaces */</font>
-<a name="line213">213: </a>  d->V_tra_s = 0;                     d->V_tra_e = cMTX;
-<a name="line214">214: </a>  d->V_new_s = d->V_tra_e;            d->V_new_e = d->V_new_s;
-
-<a name="line216">216: </a>  <font color="#B22222">/* Remove oldU */</font>
-<a name="line217">217: </a>  data->size_oldU = 0;
-
-<a name="line219">219: </a>  <font color="#B22222">/* Remove npreconv */</font>
-<a name="line220">220: </a>  d->npreconv = 0;
-<a name="line221">221: </a>  <font color="#4169E1">return</font>(0);
-<a name="line222">222: </a>}
-
-<a name="line226">226: </a><strong><font color="#4169E1"><a name="dvd_updateV_testConv"></a>static PetscErrorCode dvd_updateV_testConv(dvdDashboard *d,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv)</font></strong>
-<a name="line227">227: </a>{
-<a name="line228">228: </a>  PetscInt        i,j,b;
-<a name="line229">229: </a>  PetscReal       norm;
-<a name="line230">230: </a>  PetscErrorCode  ierr;
-<a name="line231">231: </a>  PetscBool       conv, c;
-<a name="line232">232: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-
-<a name="line235">235: </a>  <font color="#4169E1">if</font> (nConv) *nConv = s;
-<a name="line236">236: </a>  <font color="#4169E1">for</font> (i=s,conv=PETSC_TRUE;(conv || data->allResiduals) && (i < e);i+=b) {
-<a name="line237">237: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line238">238: </a>    b = d->eigi[i]!=0.0?2:1;
-<a name="line239">239: </a><font color="#A020F0">#else</font>
-<a name="line240">240: </a>    b = 1;
-<a name="line241">241: </a><font color="#A020F0">#endif</font>
-<a name="line242">242: </a>    <font color="#4169E1">if</font> (i+b-1 >= pre) {
-<a name="line243">243: </a>      d->calcpairs_residual(d,i,i+b);
-<a name="line244">244: </a>    }
-<a name="line245">245: </a>    <font color="#B22222">/* Test the Schur vector */</font>
-<a name="line246">246: </a>    <font color="#4169E1">for</font> (j=0,c=PETSC_TRUE;j<b && c;j++) {
-<a name="line247">247: </a>      norm = d->nR[i+j]/d->nX[i+j];
-<a name="line248">248: </a>      c = d->testConv(d,d->eigr[i+j],d->eigi[i+j],norm,&d->errest[i+j]);
-<a name="line249">249: </a>    }
-<a name="line250">250: </a>    <font color="#4169E1">if</font> (conv && c) { <font color="#4169E1">if</font> (nConv) *nConv = i+b; }
-<a name="line251">251: </a>    <font color="#4169E1">else</font> conv = PETSC_FALSE;
-<a name="line252">252: </a>  }
-<a name="line253">253: </a>  pre = PetscMax(pre,i);
-
-<a name="line255">255: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line256">256: </a>  <font color="#B22222">/* Enforce converged conjugate complex eigenpairs */</font>
-<a name="line257">257: </a>  <font color="#4169E1">if</font> (nConv) {
-<a name="line258">258: </a>    <font color="#4169E1">for</font> (j=0;j<*nConv;j++) <font color="#4169E1">if</font> (d->eigi[j] != 0.0) j++;
-<a name="line259">259: </a>    <font color="#4169E1">if</font> (j>*nConv) (*nConv)--;
-<a name="line260">260: </a>  }
-<a name="line261">261: </a><font color="#A020F0">#endif</font>
-<a name="line262">262: </a>  <font color="#4169E1">for</font> (i=pre;i<e;i++) d->errest[i] = d->nR[i] = PETSC_MAX_REAL;
-<a name="line263">263: </a>  <font color="#4169E1">return</font>(0);
-<a name="line264">264: </a>}
-
-<a name="line268">268: </a><strong><font color="#4169E1"><a name="dvd_updateV_update_gen"></a>static PetscErrorCode dvd_updateV_update_gen(dvdDashboard *d)</font></strong>
-<a name="line269">269: </a>{
-<a name="line270">270: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-<a name="line271">271: </a>  PetscInt        size_D,s,lV,kV,nV;
-<a name="line272">272: </a>  PetscErrorCode  ierr;
-
-<a name="line275">275: </a>  <font color="#B22222">/* Select the desired pairs */</font>
-<a name="line276">276: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
-<a name="line277">277: </a>  nV = kV - lV;
-<a name="line278">278: </a>  size_D = PetscMin(PetscMin(PetscMin(d->bs,nV),d->eps->ncv-nV),nV);
-<a name="line279">279: </a>  <font color="#4169E1">if</font> (size_D == 0) {
-<a name="line280">280: </a>    d->initV(d);
-<a name="line281">281: </a>    d->calcPairs(d);
-<a name="line282">282: </a>  }
-
-<a name="line284">284: </a>  <font color="#B22222">/* Fill V with D */</font>
-<a name="line285">285: </a>  d->improveX(d,0,size_D,&size_D);
-
-<a name="line287">287: </a>  <font color="#B22222">/* If D is empty, exit */</font>
-<a name="line288">288: </a>  d->size_D = size_D;
-<a name="line289">289: </a>  <font color="#4169E1">if</font> (size_D == 0) <font color="#4169E1">return</font>(0);
-
-<a name="line291">291: </a>  <font color="#B22222">/* Get the residual of all pairs */</font>
-<a name="line292">292: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line293">293: </a>  s = (d->eigi[0]!=0.0)? 2: 1;
-<a name="line294">294: </a><font color="#A020F0">#else</font>
-<a name="line295">295: </a>  s = 1;
-<a name="line296">296: </a><font color="#A020F0">#endif</font>
-<a name="line297">297: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
-<a name="line298">298: </a>  nV = kV - lV;
-<a name="line299">299: </a>  dvd_updateV_testConv(d,s,s,data->allResiduals?nV:size_D,NULL);
-
-<a name="line301">301: </a>  <font color="#B22222">/* Notify the changes in V */</font>
-<a name="line302">302: </a>  d->V_tra_s = 0;                 d->V_tra_e = 0;
-<a name="line303">303: </a>  d->V_new_s = nV;                d->V_new_e = nV+size_D;
-
-<a name="line305">305: </a>  <font color="#B22222">/* Save the projected eigenvectors */</font>
-<a name="line306">306: </a>  <font color="#4169E1">if</font> (data->plusk > 0) {
-<a name="line307">307: </a>    MatZeroEntries(data->oldU);
-<a name="line308">308: </a>    data->size_oldU = nV;
-<a name="line309">309: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Q,0,0,data->oldU,0,0,nV,nV,PETSC_TRUE);
-<a name="line310">310: </a>    <font color="#4169E1">if</font> (d->W) {
-<a name="line311">311: </a>      MatZeroEntries(data->oldV);
-<a name="line312">312: </a>      <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,0,data->oldV,0,0,nV,nV,PETSC_TRUE);
-<a name="line313">313: </a>    }
-<a name="line314">314: </a>  }
-<a name="line315">315: </a>  <font color="#4169E1">return</font>(0);
-<a name="line316">316: </a>}
-
-<a name="line320">320: </a><strong><font color="#4169E1"><a name="dvd_updateV_extrapol"></a>static PetscErrorCode dvd_updateV_extrapol(dvdDashboard *d)</font></strong>
-<a name="line321">321: </a>{
-<a name="line322">322: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
-<a name="line323">323: </a>  PetscInt        i;
-<a name="line324">324: </a>  PetscBool       restart;
-<a name="line325">325: </a>  PetscErrorCode  ierr;
-
-<a name="line328">328: </a>  <font color="#B22222">/* TODO: restrict select pairs to each case */</font>
-<a name="line329">329: </a>  d->calcpairs_selectPairs(d, data->min_size_V);
-
-<a name="line331">331: </a>  <font color="#B22222">/* If the subspaces doesn't need restart, add new vector */</font>
-<a name="line332">332: </a>  d->isRestarting(d,&restart);
-<a name="line333">333: </a>  <font color="#4169E1">if</font> (!restart) {
-<a name="line334">334: </a>    d->size_D = 0;
-<a name="line335">335: </a>    dvd_updateV_update_gen(d);
-
-<a name="line337">337: </a>    <font color="#B22222">/* If some vector were add, exit */</font>
-<a name="line338">338: </a>    <font color="#4169E1">if</font> (d->size_D > 0) <font color="#4169E1">return</font>(0);
-<a name="line339">339: </a>  }
-
-<a name="line341">341: </a>  <font color="#B22222">/* If some eigenpairs were converged, lock them  */</font>
-<a name="line342">342: </a>  <font color="#4169E1">if</font> (d->npreconv > 0) {
-<a name="line343">343: </a>    i = d->npreconv;
-<a name="line344">344: </a>    dvd_updateV_conv_gen(d);
-
-<a name="line346">346: </a>    <font color="#B22222">/* If some eigenpair was locked, exit */</font>
-<a name="line347">347: </a>    <font color="#4169E1">if</font> (i > d->npreconv) <font color="#4169E1">return</font>(0);
-<a name="line348">348: </a>  }
-
-<a name="line350">350: </a>  <font color="#B22222">/* Else, a restarting is performed */</font>
-<a name="line351">351: </a>  dvd_updateV_restart_gen(d);
-<a name="line352">352: </a>  <font color="#4169E1">return</font>(0);
-<a name="line353">353: </a>}
-
-<a name="line357">357: </a><strong><font color="#4169E1"><a name="dvd_managementV_basic"></a>PetscErrorCode dvd_managementV_basic(dvdDashboard *d,dvdBlackboard *b,PetscInt bs,PetscInt mpd,PetscInt min_size_V,PetscInt plusk,PetscBool harm,PetscBool allResiduals)</font></strong>
-<a name="line358">358: </a>{
-<a name="line359">359: </a>  PetscErrorCode  ierr;
-<a name="line360">360: </a>  dvdManagV_basic *data;
-<a name="line361">361: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line362">362: </a>  PetscBool       her_probl,std_probl;
-<a name="line363">363: </a><font color="#A020F0">#endif</font>
-
-<a name="line366">366: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
-<a name="line367">367: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line368">368: </a>  <font color="#B22222">/* if the last converged eigenvalue is complex its conjugate pair is also</font>
-<a name="line369">369: </a><font color="#B22222">     converged */</font>
-<a name="line370">370: </a>  her_probl = DVD_IS(d->sEP,DVD_EP_HERMITIAN)? PETSC_TRUE: PETSC_FALSE;
-<a name="line371">371: </a>  std_probl = DVD_IS(d->sEP,DVD_EP_STD)? PETSC_TRUE: PETSC_FALSE;
-<a name="line372">372: </a>  b->max_size_X = PetscMax(b->max_size_X,bs+((her_probl && std_probl)?0:1));
-<a name="line373">373: </a><font color="#A020F0">#else</font>
-<a name="line374">374: </a>  b->max_size_X = PetscMax(b->max_size_X,bs);
-<a name="line375">375: </a><font color="#A020F0">#endif</font>
-
-<a name="line377">377: </a>  b->max_size_V = PetscMax(b->max_size_V,mpd);
-<a name="line378">378: </a>  min_size_V = PetscMin(min_size_V,mpd-bs);
-<a name="line379">379: </a>  b->size_V = PetscMax(b->size_V,b->max_size_V+b->max_size_P+b->max_nev);
-<a name="line380">380: </a>  b->max_size_oldX = plusk;
-
-<a name="line382">382: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line383">383: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line384">384: </a>    PetscNewLog(d->eps,&data);
-<a name="line385">385: </a>    data->mpd = b->max_size_V;
-<a name="line386">386: </a>    data->min_size_V = min_size_V;
-<a name="line387">387: </a>    d->bs = bs;
-<a name="line388">388: </a>    data->plusk = plusk;
-<a name="line389">389: </a>    data->allResiduals = allResiduals;
-
-<a name="line391">391: </a>    d->eigr = d->eps->eigr;
-<a name="line392">392: </a>    d->eigi = d->eps->eigi;
-<a name="line393">393: </a>    d->errest = d->eps->errest;
-<a name="line394">394: </a>    PetscMalloc1(d->eps->ncv,&d->real_nR);
-<a name="line395">395: </a>    PetscMalloc1(d->eps->ncv,&d->real_nX);
-<a name="line396">396: </a>    <font color="#4169E1">if</font> (plusk > 0) { MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&data->oldU); }
-<a name="line397">397: </a>    <font color="#4169E1">else</font> data->oldU = NULL;
-<a name="line398">398: </a>    <font color="#4169E1">if</font> (harm && plusk>0) { MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&data->oldV); }
-<a name="line399">399: </a>    <font color="#4169E1">else</font> data->oldV = NULL;
-
-<a name="line401">401: </a>    data->old_updateV_data = d->updateV_data;
-<a name="line402">402: </a>    d->updateV_data = data;
-<a name="line403">403: </a>    data->old_isRestarting = d->isRestarting;
-<a name="line404">404: </a>    d->isRestarting = dvd_isrestarting_fullV;
-<a name="line405">405: </a>    d->updateV = dvd_updateV_extrapol;
-<a name="line406">406: </a>    d->preTestConv = dvd_updateV_testConv;
-<a name="line407">407: </a>    EPSDavidsonFLAdd(&d->startList,dvd_updateV_start);
-<a name="line408">408: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_managementV_basic_d);
-<a name="line409">409: </a>  }
-<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
-<a name="line411">411: </a>}
+
+<a name="line28"> 28: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line29"> 29: </a>  PetscInt          min_size_V;        <font color="#B22222">/* restart with this number of eigenvectors */</font>
+<a name="line30"> 30: </a>  PetscInt          plusk;             <font color="#B22222">/* at restart, save plusk vectors from last iteration */</font>
+<a name="line31"> 31: </a>  PetscInt          mpd;               <font color="#B22222">/* max size of the searching subspace */</font>
+<a name="line32"> 32: </a>  void              *old_updateV_data; <font color="#B22222">/* old updateV data */</font>
+<a name="line33"> 33: </a>  PetscErrorCode    (*old_isRestarting)(dvdDashboard*,PetscBool*);  <font color="#B22222">/* old isRestarting */</font>
+<a name="line34"> 34: </a>  Mat               oldU;              <font color="#B22222">/* previous projected right igenvectors */</font>
+<a name="line35"> 35: </a>  Mat               oldV;              <font color="#B22222">/* previous projected left eigenvectors */</font>
+<a name="line36"> 36: </a>  PetscInt          size_oldU;         <font color="#B22222">/* size of oldU */</font>
+<a name="line37"> 37: </a>  PetscBool         allResiduals;      <font color="#B22222">/* if computing all the residuals */</font>
+<a name="line38"> 38: </a>} dvdManagV_basic;
+
+<a name="line42"> 42: </a><strong><font color="#4169E1"><a name="dvd_updateV_start"></a>static PetscErrorCode dvd_updateV_start(dvdDashboard *d)</font></strong>
+<a name="line43"> 43: </a>{
+<a name="line44"> 44: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+<a name="line45"> 45: </a>  PetscInt        i;
+
+<a name="line48"> 48: </a>  <font color="#4169E1">for</font> (i=0;i<d->eps->ncv;i++) d->eigi[i] = 0.0;
+<a name="line49"> 49: </a>  d->nR = d->real_nR;
+<a name="line50"> 50: </a>  <font color="#4169E1">for</font> (i=0;i<d->eps->ncv;i++) d->nR[i] = PETSC_MAX_REAL;
+<a name="line51"> 51: </a>  d->nX = d->real_nX;
+<a name="line52"> 52: </a>  <font color="#4169E1">for</font> (i=0;i<d->eps->ncv;i++) d->errest[i] = PETSC_MAX_REAL;
+<a name="line53"> 53: </a>  data->size_oldU = 0;
+<a name="line54"> 54: </a>  d->nconv = 0;
+<a name="line55"> 55: </a>  d->npreconv = 0;
+<a name="line56"> 56: </a>  d->V_tra_s = d->V_tra_e = d->V_new_s = d->V_new_e = 0;
+<a name="line57"> 57: </a>  d->size_D = 0;
+<a name="line58"> 58: </a>  <font color="#4169E1">return</font>(0);
+<a name="line59"> 59: </a>}
+
+<a name="line63"> 63: </a><strong><font color="#4169E1"><a name="dvd_isrestarting_fullV"></a>static PetscErrorCode dvd_isrestarting_fullV(dvdDashboard *d,PetscBool *r)</font></strong>
+<a name="line64"> 64: </a>{
+<a name="line65"> 65: </a>  PetscErrorCode  ierr;
+<a name="line66"> 66: </a>  PetscInt        l,k;
+<a name="line67"> 67: </a>  PetscBool       restart;
+<a name="line68"> 68: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+
+<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
+<a name="line72"> 72: </a>  restart = (k+2 > d->eps->ncv)? PETSC_TRUE: PETSC_FALSE;
+
+<a name="line74"> 74: </a>  <font color="#B22222">/* Check old isRestarting function */</font>
+<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (!restart && data->old_isRestarting) {
+<a name="line76"> 76: </a>    data->old_isRestarting(d,&restart);
+<a name="line77"> 77: </a>  }
+<a name="line78"> 78: </a>  *r = restart;
+<a name="line79"> 79: </a>  <font color="#4169E1">return</font>(0);
+<a name="line80"> 80: </a>}
+
+<a name="line84"> 84: </a><strong><font color="#4169E1"><a name="dvd_managementV_basic_d"></a>static PetscErrorCode dvd_managementV_basic_d(dvdDashboard *d)</font></strong>
+<a name="line85"> 85: </a>{
+<a name="line86"> 86: </a>  PetscErrorCode  ierr;
+<a name="line87"> 87: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+
+<a name="line90"> 90: </a>  <font color="#B22222">/* Restore changes in dvdDashboard */</font>
+<a name="line91"> 91: </a>  d->updateV_data = data->old_updateV_data;
+
+<a name="line93"> 93: </a>  <font color="#B22222">/* Free local data */</font>
+<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (data->oldU) { MatDestroy(&data->oldU); }
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (data->oldV) { MatDestroy(&data->oldV); }
+<a name="line96"> 96: </a>  PetscFree(d->real_nR);
+<a name="line97"> 97: </a>  PetscFree(d->real_nX);
+<a name="line98"> 98: </a>  PetscFree(data);
+<a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);
+<a name="line100">100: </a>}
+
+<a name="line104">104: </a><strong><font color="#4169E1"><a name="dvd_updateV_conv_gen"></a>static PetscErrorCode dvd_updateV_conv_gen(dvdDashboard *d)</font></strong>
+<a name="line105">105: </a>{
+<a name="line106">106: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+<a name="line107">107: </a>  PetscInt        npreconv,cMT,cMTX,lV,kV,nV;
+<a name="line108">108: </a>  PetscErrorCode  ierr;
+<a name="line109">109: </a>  Mat             Q;
+<a name="line110">110: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line111">111: </a>  PetscInt        i;
+<a name="line112">112: </a><font color="#A020F0">#endif</font>
+
+<a name="line115">115: </a>  npreconv = d->npreconv;
+<a name="line116">116: </a>  <font color="#B22222">/* Constrains the converged pairs to nev */</font>
+<a name="line117">117: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line118">118: </a>  <font color="#B22222">/* Tries to maintain together conjugate eigenpairs */</font>
+<a name="line119">119: </a>  <font color="#4169E1">for</font> (i=0; (i + (d->eigi[i]!=0.0?1:0) < npreconv) && (d->nconv + i < d->nev); i+= (d->eigi[i]!=0.0?2:1));
+<a name="line120">120: </a>  npreconv = i;
+<a name="line121">121: </a><font color="#A020F0">#else</font>
+<a name="line122">122: </a>  npreconv = PetscMax(PetscMin(d->nev-d->nconv,npreconv),0);
+<a name="line123">123: </a><font color="#A020F0">#endif</font>
+<a name="line124">124: </a>  <font color="#B22222">/* Quick exit */</font>
+<a name="line125">125: </a>  <font color="#4169E1">if</font> (npreconv == 0) <font color="#4169E1">return</font>(0);
+
+<a name="line127">127: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
+<a name="line128">128: </a>  nV  = kV - lV; 
+<a name="line129">129: </a>  cMT = nV - npreconv;
+<a name="line130">130: </a>  <font color="#B22222">/* Harmonics restarts wiht right eigenvectors, and other with the left ones.</font>
+<a name="line131">131: </a><font color="#B22222">     If the problem is standard or hermitian, left and right vectors are the same */</font>
+<a name="line132">132: </a>  <font color="#4169E1">if</font> (!(d->W||DVD_IS(d->sEP,DVD_EP_STD)||DVD_IS(d->sEP,DVD_EP_HERMITIAN))) {
+<a name="line133">133: </a>    <font color="#B22222">/* ps.Q <- [ps.Q(0:npreconv-1) ps.Z(npreconv:size_H-1)] */</font>
+<a name="line134">134: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(d->eps->ds,DS_MAT_Q,&Q);
+<a name="line135">135: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,npreconv,Q,0,npreconv,nV,cMT,PETSC_TRUE);
+<a name="line136">136: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(d->eps->ds,DS_MAT_Q,&Q);
+<a name="line137">137: </a>  }
+<a name="line138">138: </a>  <font color="#4169E1">if</font> (DVD_IS(d->sEP,DVD_EP_INDEFINITE)) {
+<a name="line139">139: </a>    <a href="../../../../docs/manualpages/DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</a>(d->eps->ds,DS_MAT_Q,nV,d->nBds,&cMTX,d->nBds);
+<a name="line140">140: </a>  } <font color="#4169E1">else</font> {
+<a name="line141">141: </a>    <a href="../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>(d->eps->ds,DS_MAT_Q,nV,&cMTX);
+<a name="line142">142: </a>  }
+<a name="line143">143: </a>  cMT = cMTX - npreconv;
+
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (d->W) {
+<a name="line146">146: </a>    <a href="../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>(d->eps->ds,DS_MAT_Z,nV,&cMTX);
+<a name="line147">147: </a>    cMT = PetscMin(cMT,cMTX - npreconv);
+<a name="line148">148: </a>  }
+
+<a name="line150">150: </a>  <font color="#B22222">/* Lock the converged pairs */</font>
+<a name="line151">151: </a>  d->eigr+= npreconv;
+<a name="line152">152: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (d->eigi) d->eigi+= npreconv;
+<a name="line154">154: </a><font color="#A020F0">#endif</font>
+<a name="line155">155: </a>  d->nconv+= npreconv;
+<a name="line156">156: </a>  d->errest+= npreconv;
+<a name="line157">157: </a>  <font color="#B22222">/* Notify the changes in V and update the other subspaces */</font>
+<a name="line158">158: </a>  d->V_tra_s = npreconv;          d->V_tra_e = nV;
+<a name="line159">159: </a>  d->V_new_s = cMT;               d->V_new_e = d->V_new_s;
+<a name="line160">160: </a>  <font color="#B22222">/* Remove oldU */</font>
+<a name="line161">161: </a>  data->size_oldU = 0;
+
+<a name="line163">163: </a>  d->npreconv-= npreconv;
+<a name="line164">164: </a>  <font color="#4169E1">return</font>(0);
+<a name="line165">165: </a>}
+
+<a name="line169">169: </a><strong><font color="#4169E1"><a name="dvd_updateV_restart_gen"></a>static PetscErrorCode dvd_updateV_restart_gen(dvdDashboard *d)</font></strong>
+<a name="line170">170: </a>{
+<a name="line171">171: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+<a name="line172">172: </a>  PetscInt        lV,kV,nV,size_plusk,size_X,cMTX,cMTY;
+<a name="line173">173: </a>  Mat             Q;
+<a name="line174">174: </a>  PetscErrorCode  ierr;
+
+<a name="line177">177: </a>  <font color="#B22222">/* Select size_X desired pairs from V */</font>
+<a name="line178">178: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
+<a name="line179">179: </a>  nV = kV - lV;
+<a name="line180">180: </a>  size_X = PetscMin(data->min_size_V,nV);
+
+<a name="line182">182: </a>  <font color="#B22222">/* Add plusk eigenvectors from the previous iteration */</font>
+<a name="line183">183: </a>  size_plusk = PetscMax(0,PetscMin(PetscMin(data->plusk,data->size_oldU),d->eps->ncv - size_X));
+
+<a name="line185">185: </a>  d->size_MT = nV;
+<a name="line186">186: </a>  <font color="#B22222">/* ps.Q <- orth([pX(0:size_X-1) [oldU(0:size_plusk-1); 0] ]) */</font>
+<a name="line187">187: </a>  <font color="#B22222">/* Harmonics restarts wiht right eigenvectors, and other with the left ones.</font>
+<a name="line188">188: </a><font color="#B22222">     If the problem is standard or hermitian, left and right vectors are the same */</font>
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (!(d->W||DVD_IS(d->sEP,DVD_EP_STD)||DVD_IS(d->sEP,DVD_EP_HERMITIAN))) {
+<a name="line190">190: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(d->eps->ds,DS_MAT_Q,&Q);
+<a name="line191">191: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,0,Q,0,0,nV,size_X,PETSC_TRUE);
+<a name="line192">192: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(d->eps->ds,DS_MAT_Q,&Q);
+<a name="line193">193: </a>  }
+<a name="line194">194: </a>  <font color="#4169E1">if</font> (size_plusk > 0 && DVD_IS(d->sEP,DVD_EP_INDEFINITE)) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Unsupported plusk>0 in indefinite eigenvalue problems"</font>);
+<a name="line195">195: </a>  <font color="#4169E1">if</font> (size_plusk > 0) {
+<a name="line196">196: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Q,0,size_X,data->oldU,0,0,nV,size_plusk,PETSC_FALSE);
+<a name="line197">197: </a>  }
+<a name="line198">198: </a>  <font color="#4169E1">if</font> (DVD_IS(d->sEP,DVD_EP_INDEFINITE)) {
+<a name="line199">199: </a>    <a href="../../../../docs/manualpages/DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</a>(d->eps->ds,DS_MAT_Q,size_X,d->nBds,&cMTX,d->nBds);
+<a name="line200">200: </a>  } <font color="#4169E1">else</font> {
+<a name="line201">201: </a>    <a href="../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>(d->eps->ds,DS_MAT_Q,size_X+size_plusk,&cMTX);
+<a name="line202">202: </a>  }
+
+<a name="line204">204: </a>  <font color="#4169E1">if</font> (d->W && size_plusk > 0) {
+<a name="line205">205: </a>    <font color="#B22222">/* ps.Z <- orth([ps.Z(0:size_X-1) [oldV(0:size_plusk-1); 0] ]) */</font>
+<a name="line206">206: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,size_X,data->oldV,0,0,nV,size_plusk,PETSC_FALSE);
+<a name="line207">207: </a>    <a href="../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>(d->eps->ds,DS_MAT_Z,size_X+size_plusk,&cMTY);
+<a name="line208">208: </a>    cMTX = PetscMin(cMTX, cMTY);
+<a name="line209">209: </a>  }
+
+<a name="line211">211: </a>  <font color="#B22222">/* Notify the changes in V and update the other subspaces */</font>
+<a name="line212">212: </a>  d->V_tra_s = 0;                     d->V_tra_e = cMTX;
+<a name="line213">213: </a>  d->V_new_s = d->V_tra_e;            d->V_new_e = d->V_new_s;
+
+<a name="line215">215: </a>  <font color="#B22222">/* Remove oldU */</font>
+<a name="line216">216: </a>  data->size_oldU = 0;
+
+<a name="line218">218: </a>  <font color="#B22222">/* Remove npreconv */</font>
+<a name="line219">219: </a>  d->npreconv = 0;
+<a name="line220">220: </a>  <font color="#4169E1">return</font>(0);
+<a name="line221">221: </a>}
+
+<a name="line225">225: </a><strong><font color="#4169E1"><a name="dvd_updateV_testConv"></a>static PetscErrorCode dvd_updateV_testConv(dvdDashboard *d,PetscInt s,PetscInt pre,PetscInt e,PetscInt *nConv)</font></strong>
+<a name="line226">226: </a>{
+<a name="line227">227: </a>  PetscInt        i,j,b;
+<a name="line228">228: </a>  PetscReal       norm;
+<a name="line229">229: </a>  PetscErrorCode  ierr;
+<a name="line230">230: </a>  PetscBool       conv, c;
+<a name="line231">231: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+
+<a name="line234">234: </a>  <font color="#4169E1">if</font> (nConv) *nConv = s;
+<a name="line235">235: </a>  <font color="#4169E1">for</font> (i=s,conv=PETSC_TRUE;(conv || data->allResiduals) && (i < e);i+=b) {
+<a name="line236">236: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line237">237: </a>    b = d->eigi[i]!=0.0?2:1;
+<a name="line238">238: </a><font color="#A020F0">#else</font>
+<a name="line239">239: </a>    b = 1;
+<a name="line240">240: </a><font color="#A020F0">#endif</font>
+<a name="line241">241: </a>    <font color="#4169E1">if</font> (i+b-1 >= pre) {
+<a name="line242">242: </a>      d->calcpairs_residual(d,i,i+b);
+<a name="line243">243: </a>    }
+<a name="line244">244: </a>    <font color="#B22222">/* Test the Schur vector */</font>
+<a name="line245">245: </a>    <font color="#4169E1">for</font> (j=0,c=PETSC_TRUE;j<b && c;j++) {
+<a name="line246">246: </a>      norm = d->nR[i+j]/d->nX[i+j];
+<a name="line247">247: </a>      c = d->testConv(d,d->eigr[i+j],d->eigi[i+j],norm,&d->errest[i+j]);
+<a name="line248">248: </a>    }
+<a name="line249">249: </a>    <font color="#4169E1">if</font> (conv && c) { <font color="#4169E1">if</font> (nConv) *nConv = i+b; }
+<a name="line250">250: </a>    <font color="#4169E1">else</font> conv = PETSC_FALSE;
+<a name="line251">251: </a>  }
+<a name="line252">252: </a>  pre = PetscMax(pre,i);
+
+<a name="line254">254: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line255">255: </a>  <font color="#B22222">/* Enforce converged conjugate complex eigenpairs */</font>
+<a name="line256">256: </a>  <font color="#4169E1">if</font> (nConv) {
+<a name="line257">257: </a>    <font color="#4169E1">for</font> (j=0;j<*nConv;j++) <font color="#4169E1">if</font> (d->eigi[j] != 0.0) j++;
+<a name="line258">258: </a>    <font color="#4169E1">if</font> (j>*nConv) (*nConv)--;
+<a name="line259">259: </a>  }
+<a name="line260">260: </a><font color="#A020F0">#endif</font>
+<a name="line261">261: </a>  <font color="#4169E1">for</font> (i=pre;i<e;i++) d->errest[i] = d->nR[i] = PETSC_MAX_REAL;
+<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
+<a name="line263">263: </a>}
+
+<a name="line267">267: </a><strong><font color="#4169E1"><a name="dvd_updateV_update_gen"></a>static PetscErrorCode dvd_updateV_update_gen(dvdDashboard *d)</font></strong>
+<a name="line268">268: </a>{
+<a name="line269">269: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+<a name="line270">270: </a>  PetscInt        size_D,s,lV,kV,nV;
+<a name="line271">271: </a>  PetscErrorCode  ierr;
+
+<a name="line274">274: </a>  <font color="#B22222">/* Select the desired pairs */</font>
+<a name="line275">275: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
+<a name="line276">276: </a>  nV = kV - lV;
+<a name="line277">277: </a>  size_D = PetscMin(PetscMin(PetscMin(d->bs,nV),d->eps->ncv-nV),nV);
+<a name="line278">278: </a>  <font color="#4169E1">if</font> (size_D == 0) {
+<a name="line279">279: </a>    d->initV(d);
+<a name="line280">280: </a>    d->calcPairs(d);
+<a name="line281">281: </a>  }
+
+<a name="line283">283: </a>  <font color="#B22222">/* Fill V with D */</font>
+<a name="line284">284: </a>  d->improveX(d,0,size_D,&size_D);
+
+<a name="line286">286: </a>  <font color="#B22222">/* If D is empty, exit */</font>
+<a name="line287">287: </a>  d->size_D = size_D;
+<a name="line288">288: </a>  <font color="#4169E1">if</font> (size_D == 0) <font color="#4169E1">return</font>(0);
+
+<a name="line290">290: </a>  <font color="#B22222">/* Get the residual of all pairs */</font>
+<a name="line291">291: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line292">292: </a>  s = (d->eigi[0]!=0.0)? 2: 1;
+<a name="line293">293: </a><font color="#A020F0">#else</font>
+<a name="line294">294: </a>  s = 1;
+<a name="line295">295: </a><font color="#A020F0">#endif</font>
+<a name="line296">296: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&lV,&kV);
+<a name="line297">297: </a>  nV = kV - lV;
+<a name="line298">298: </a>  dvd_updateV_testConv(d,s,s,data->allResiduals?nV:size_D,NULL);
+
+<a name="line300">300: </a>  <font color="#B22222">/* Notify the changes in V */</font>
+<a name="line301">301: </a>  d->V_tra_s = 0;                 d->V_tra_e = 0;
+<a name="line302">302: </a>  d->V_new_s = nV;                d->V_new_e = nV+size_D;
+
+<a name="line304">304: </a>  <font color="#B22222">/* Save the projected eigenvectors */</font>
+<a name="line305">305: </a>  <font color="#4169E1">if</font> (data->plusk > 0) {
+<a name="line306">306: </a>    MatZeroEntries(data->oldU);
+<a name="line307">307: </a>    data->size_oldU = nV;
+<a name="line308">308: </a>    <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Q,0,0,data->oldU,0,0,nV,nV,PETSC_TRUE);
+<a name="line309">309: </a>    <font color="#4169E1">if</font> (d->W) {
+<a name="line310">310: </a>      MatZeroEntries(data->oldV);
+<a name="line311">311: </a>      <a href="../../../../docs/manualpages/DS/DSCopyMat.html#DSCopyMat">DSCopyMat</a>(d->eps->ds,DS_MAT_Z,0,0,data->oldV,0,0,nV,nV,PETSC_TRUE);
+<a name="line312">312: </a>    }
+<a name="line313">313: </a>  }
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
+
+<a name="line319">319: </a><strong><font color="#4169E1"><a name="dvd_updateV_extrapol"></a>static PetscErrorCode dvd_updateV_extrapol(dvdDashboard *d)</font></strong>
+<a name="line320">320: </a>{
+<a name="line321">321: </a>  dvdManagV_basic *data = (dvdManagV_basic*)d->updateV_data;
+<a name="line322">322: </a>  PetscInt        i;
+<a name="line323">323: </a>  PetscBool       restart;
+<a name="line324">324: </a>  PetscErrorCode  ierr;
+
+<a name="line327">327: </a>  <font color="#B22222">/* TODO: restrict select pairs to each case */</font>
+<a name="line328">328: </a>  d->calcpairs_selectPairs(d, data->min_size_V);
+
+<a name="line330">330: </a>  <font color="#B22222">/* If the subspaces doesn't need restart, add new vector */</font>
+<a name="line331">331: </a>  d->isRestarting(d,&restart);
+<a name="line332">332: </a>  <font color="#4169E1">if</font> (!restart) {
+<a name="line333">333: </a>    d->size_D = 0;
+<a name="line334">334: </a>    dvd_updateV_update_gen(d);
+
+<a name="line336">336: </a>    <font color="#B22222">/* If some vector were add, exit */</font>
+<a name="line337">337: </a>    <font color="#4169E1">if</font> (d->size_D > 0) <font color="#4169E1">return</font>(0);
+<a name="line338">338: </a>  }
+
+<a name="line340">340: </a>  <font color="#B22222">/* If some eigenpairs were converged, lock them  */</font>
+<a name="line341">341: </a>  <font color="#4169E1">if</font> (d->npreconv > 0) {
+<a name="line342">342: </a>    i = d->npreconv;
+<a name="line343">343: </a>    dvd_updateV_conv_gen(d);
+
+<a name="line345">345: </a>    <font color="#B22222">/* If some eigenpair was locked, exit */</font>
+<a name="line346">346: </a>    <font color="#4169E1">if</font> (i > d->npreconv) <font color="#4169E1">return</font>(0);
+<a name="line347">347: </a>  }
+
+<a name="line349">349: </a>  <font color="#B22222">/* Else, a restarting is performed */</font>
+<a name="line350">350: </a>  dvd_updateV_restart_gen(d);
+<a name="line351">351: </a>  <font color="#4169E1">return</font>(0);
+<a name="line352">352: </a>}
+
+<a name="line356">356: </a><strong><font color="#4169E1"><a name="dvd_managementV_basic"></a>PetscErrorCode dvd_managementV_basic(dvdDashboard *d,dvdBlackboard *b,PetscInt bs,PetscInt mpd,PetscInt min_size_V,PetscInt plusk,PetscBool harm,PetscBool allResiduals)</font></strong>
+<a name="line357">357: </a>{
+<a name="line358">358: </a>  PetscErrorCode  ierr;
+<a name="line359">359: </a>  dvdManagV_basic *data;
+<a name="line360">360: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line361">361: </a>  PetscBool       her_probl,std_probl;
+<a name="line362">362: </a><font color="#A020F0">#endif</font>
+
+<a name="line365">365: </a>  <font color="#B22222">/* Setting configuration constrains */</font>
+<a name="line366">366: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line367">367: </a>  <font color="#B22222">/* if the last converged eigenvalue is complex its conjugate pair is also</font>
+<a name="line368">368: </a><font color="#B22222">     converged */</font>
+<a name="line369">369: </a>  her_probl = DVD_IS(d->sEP,DVD_EP_HERMITIAN)? PETSC_TRUE: PETSC_FALSE;
+<a name="line370">370: </a>  std_probl = DVD_IS(d->sEP,DVD_EP_STD)? PETSC_TRUE: PETSC_FALSE;
+<a name="line371">371: </a>  b->max_size_X = PetscMax(b->max_size_X,bs+((her_probl && std_probl)?0:1));
+<a name="line372">372: </a><font color="#A020F0">#else</font>
+<a name="line373">373: </a>  b->max_size_X = PetscMax(b->max_size_X,bs);
+<a name="line374">374: </a><font color="#A020F0">#endif</font>
+
+<a name="line376">376: </a>  b->max_size_V = PetscMax(b->max_size_V,mpd);
+<a name="line377">377: </a>  min_size_V = PetscMin(min_size_V,mpd-bs);
+<a name="line378">378: </a>  b->size_V = PetscMax(b->size_V,b->max_size_V+b->max_size_P+b->max_nev);
+<a name="line379">379: </a>  b->max_size_oldX = plusk;
+
+<a name="line381">381: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line382">382: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line383">383: </a>    PetscNewLog(d->eps,&data);
+<a name="line384">384: </a>    data->mpd = b->max_size_V;
+<a name="line385">385: </a>    data->min_size_V = min_size_V;
+<a name="line386">386: </a>    d->bs = bs;
+<a name="line387">387: </a>    data->plusk = plusk;
+<a name="line388">388: </a>    data->allResiduals = allResiduals;
+
+<a name="line390">390: </a>    d->eigr = d->eps->eigr;
+<a name="line391">391: </a>    d->eigi = d->eps->eigi;
+<a name="line392">392: </a>    d->errest = d->eps->errest;
+<a name="line393">393: </a>    PetscMalloc1(d->eps->ncv,&d->real_nR);
+<a name="line394">394: </a>    PetscMalloc1(d->eps->ncv,&d->real_nX);
+<a name="line395">395: </a>    <font color="#4169E1">if</font> (plusk > 0) { MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&data->oldU); }
+<a name="line396">396: </a>    <font color="#4169E1">else</font> data->oldU = NULL;
+<a name="line397">397: </a>    <font color="#4169E1">if</font> (harm && plusk>0) { MatCreateSeqDense(PETSC_COMM_SELF,d->eps->ncv,d->eps->ncv,NULL,&data->oldV); }
+<a name="line398">398: </a>    <font color="#4169E1">else</font> data->oldV = NULL;
+
+<a name="line400">400: </a>    data->old_updateV_data = d->updateV_data;
+<a name="line401">401: </a>    d->updateV_data = data;
+<a name="line402">402: </a>    data->old_isRestarting = d->isRestarting;
+<a name="line403">403: </a>    d->isRestarting = dvd_isrestarting_fullV;
+<a name="line404">404: </a>    d->updateV = dvd_updateV_extrapol;
+<a name="line405">405: </a>    d->preTestConv = dvd_updateV_testConv;
+<a name="line406">406: </a>    EPSDavidsonFLAdd(&d->startList,dvd_updateV_start);
+<a name="line407">407: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_managementV_basic_d);
+<a name="line408">408: </a>  }
+<a name="line409">409: </a>  <font color="#4169E1">return</font>(0);
+<a name="line410">410: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/davidson/dvdutils.c b/src/eps/impls/davidson/dvdutils.c
index b32c67b..1fe57ad 100644
--- a/src/eps/impls/davidson/dvdutils.c
+++ b/src/eps/impls/davidson/dvdutils.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -51,28 +51,6 @@ typedef struct {
   Vec diagA, diagB;
 } dvdJacobiPrecond;
 
-/*
-  Use of PETSc profiler functions
-*/
-
-/* Define stages */
-#define DVD_STAGE_INITV 0
-#define DVD_STAGE_NEWITER 1
-#define DVD_STAGE_CALCPAIRS 2
-#define DVD_STAGE_IMPROVEX 3
-#define DVD_STAGE_UPDATEV 4
-#define DVD_STAGE_ORTHV 5
-
-typedef struct {
-  PetscErrorCode (*old_initV)(struct _dvdDashboard*);
-  PetscErrorCode (*old_calcPairs)(struct _dvdDashboard*);
-  PetscErrorCode (*old_improveX)(struct _dvdDashboard*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);
-  PetscErrorCode (*old_updateV)(struct _dvdDashboard*);
-  PetscErrorCode (*old_orthV)(struct _dvdDashboard*);
-} DvdProfiler;
-
-static PetscLogStage stages[6] = {0,0,0,0,0,0};
-
 #undef __FUNCT__
 #define __FUNCT__ "dvd_improvex_precond_d"
 static PetscErrorCode dvd_improvex_precond_d(dvdDashboard *d)
@@ -242,115 +220,6 @@ PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "dvd_prof_init"
-PetscErrorCode dvd_prof_init()
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  if (!stages[0]) {
-    ierr = PetscLogStageRegister("Dvd_step_initV",&stages[DVD_STAGE_INITV]);CHKERRQ(ierr);
-    ierr = PetscLogStageRegister("Dvd_step_calcPairs",&stages[DVD_STAGE_CALCPAIRS]);CHKERRQ(ierr);
-    ierr = PetscLogStageRegister("Dvd_step_improveX",&stages[DVD_STAGE_IMPROVEX]);CHKERRQ(ierr);
-    ierr = PetscLogStageRegister("Dvd_step_updateV",&stages[DVD_STAGE_UPDATEV]);CHKERRQ(ierr);
-    ierr = PetscLogStageRegister("Dvd_step_orthV",&stages[DVD_STAGE_ORTHV]);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "dvd_initV_prof"
-PetscErrorCode dvd_initV_prof(dvdDashboard* d)
-{
-  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscLogStagePush(stages[DVD_STAGE_INITV]);
-  ierr = p->old_initV(d);CHKERRQ(ierr);
-  PetscLogStagePop();
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "dvd_calcPairs_prof"
-static PetscErrorCode dvd_calcPairs_prof(dvdDashboard* d)
-{
-  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscLogStagePush(stages[DVD_STAGE_CALCPAIRS]);
-  ierr = p->old_calcPairs(d);CHKERRQ(ierr);
-  PetscLogStagePop();
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "dvd_improveX_prof"
-static PetscErrorCode dvd_improveX_prof(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)
-{
-  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscLogStagePush(stages[DVD_STAGE_IMPROVEX]);
-  ierr = p->old_improveX(d,r_s,r_e,size_D);CHKERRQ(ierr);
-  PetscLogStagePop();
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "dvd_updateV_prof"
-static PetscErrorCode dvd_updateV_prof(dvdDashboard *d)
-{
-  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscLogStagePush(stages[DVD_STAGE_UPDATEV]);
-  ierr = p->old_updateV(d);CHKERRQ(ierr);
-  PetscLogStagePop();
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "dvd_profiler_d"
-static PetscErrorCode dvd_profiler_d(dvdDashboard *d)
-{
-  PetscErrorCode ierr;
-  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-
-  PetscFunctionBegin;
-  /* Free local data */
-  ierr = PetscFree(p);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "dvd_profiler"
-PetscErrorCode dvd_profiler(dvdDashboard *d,dvdBlackboard *b)
-{
-  PetscErrorCode ierr;
-  DvdProfiler    *p;
-
-  PetscFunctionBegin;
-  /* Setup the step */
-  if (b->state >= DVD_STATE_CONF) {
-    ierr = PetscFree(d->prof_data);CHKERRQ(ierr);
-    ierr = PetscNewLog(d->eps,&p);CHKERRQ(ierr);
-    d->prof_data = p;
-    p->old_initV = d->initV; d->initV = dvd_initV_prof;
-    p->old_calcPairs = d->calcPairs; d->calcPairs = dvd_calcPairs_prof;
-    p->old_improveX = d->improveX; d->improveX = dvd_improveX_prof;
-    p->old_updateV = d->updateV; d->updateV = dvd_updateV_prof;
-
-    ierr = EPSDavidsonFLAdd(&d->destroyList,dvd_profiler_d);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "dvd_harm_d"
 static PetscErrorCode dvd_harm_d(dvdDashboard *d)
 {
@@ -401,7 +270,7 @@ static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)
 {
   dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
   PetscErrorCode ierr;
-  PetscInt       l,k,i;
+  PetscInt       l,k;
   BV             BX = d->BX?d->BX:d->eps->V;
 
   PetscFunctionBegin;
@@ -417,12 +286,8 @@ static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)
   ierr = BVSetActiveColumns(d->AX,l+d->V_new_s,l+d->V_new_e);CHKERRQ(ierr);
   ierr = BVSetActiveColumns(BX,l+d->V_new_s,l+d->V_new_e);CHKERRQ(ierr);
   ierr = BVCopy(d->AX,d->W);CHKERRQ(ierr);
-  /* Work around bug in BVScale
-  ierr = BVScale(d->W,data->Wa);CHKERRQ(ierr); */
-  for (i=l+d->V_new_s;i<l+d->V_new_e; ++i) {
-    ierr = BVScaleColumn(d->W,i,data->Wa);CHKERRQ(ierr);
-  }
-  ierr = BVAXPY(d->W,-data->Wb,BX);CHKERRQ(ierr);
+  ierr = BVScale(d->W,data->Wa);CHKERRQ(ierr);
+  ierr = BVMult(d->W,-data->Wb,1.0,BX,NULL);CHKERRQ(ierr);
   ierr = BVSetActiveColumns(d->W,l,k);CHKERRQ(ierr);
   ierr = BVSetActiveColumns(d->AX,l,k);CHKERRQ(ierr);
   ierr = BVSetActiveColumns(BX,l,k);CHKERRQ(ierr);
@@ -593,36 +458,3 @@ PetscErrorCode dvd_harm_conf(dvdDashboard *d,dvdBlackboard *b,HarmType_t mode,Pe
   PetscFunctionReturn(0);
 }
 
-#undef __FUNCT__
-#define __FUNCT__ "BVMultS"
-/*
-   H = [H              Y(old)'*X(new);
-        Y(new)'*X(old) Y(new)'*X(new) ],
-     being old=0:l-1, new=l:k-1
- */
-PetscErrorCode BVMultS(BV X,BV Y,PetscScalar *H,PetscInt ldh)
-{
-  PetscErrorCode ierr;
-  PetscInt       j,lx,ly,kx,ky;
-  PetscScalar    *array;
-  Mat            M;
-
-  PetscFunctionBegin;
-  ierr = BVGetActiveColumns(X,&lx,&kx);CHKERRQ(ierr);
-  ierr = BVGetActiveColumns(Y,&ly,&ky);CHKERRQ(ierr);
-  ierr = MatCreateSeqDense(PETSC_COMM_SELF,ky,kx,NULL,&M);CHKERRQ(ierr);
-  ierr = BVMatProject(X,NULL,Y,M);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(M,&array);CHKERRQ(ierr);
-  /* upper part */
-  for (j=lx;j<kx;j++) {
-    ierr = PetscMemcpy(&H[ldh*j],&array[j*ky],ly*sizeof(PetscScalar));CHKERRQ(ierr);
-  }
-  /* lower part */
-  for (j=0;j<kx;j++) {
-    ierr = PetscMemcpy(&H[ldh*j+ly],&array[j*ky+ly],(ky-ly)*sizeof(PetscScalar));CHKERRQ(ierr);
-  }
-  ierr = MatDenseRestoreArray(M,&array);CHKERRQ(ierr);
-  ierr = MatDestroy(&M);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
diff --git a/src/eps/impls/davidson/dvdutils.c.html b/src/eps/impls/davidson/dvdutils.c.html
index fc126ce..11272bf 100644
--- a/src/eps/impls/davidson/dvdutils.c.html
+++ b/src/eps/impls/davidson/dvdutils.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/dvdutils.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:06+00:00">
+<meta name="date" content="2016-05-16T10:33:02+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/dvdutils.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/dvdutils.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">  SLEPc eigensolver: "davidson"</font>
 
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -63,487 +63,351 @@
 <a name="line51"> 51: </a>  Vec diagA, diagB;
 <a name="line52"> 52: </a>} dvdJacobiPrecond;
 
-<a name="line54"> 54: </a><font color="#B22222">/*</font>
-<a name="line55"> 55: </a><font color="#B22222">  Use of PETSc profiler functions</font>
-<a name="line56"> 56: </a><font color="#B22222">*/</font>
-
-<a name="line58"> 58: </a><font color="#B22222">/* Define stages */</font>
-<a name="line59"> 59: </a><strong><font color="#228B22">#define DVD_STAGE_INITV 0</font></strong>
-<a name="line60"> 60: </a><strong><font color="#228B22">#define DVD_STAGE_NEWITER 1</font></strong>
-<a name="line61"> 61: </a><strong><font color="#228B22">#define DVD_STAGE_CALCPAIRS 2</font></strong>
-<a name="line62"> 62: </a><strong><font color="#228B22">#define DVD_STAGE_IMPROVEX 3</font></strong>
-<a name="line63"> 63: </a><strong><font color="#228B22">#define DVD_STAGE_UPDATEV 4</font></strong>
-<a name="line64"> 64: </a><strong><font color="#228B22">#define DVD_STAGE_ORTHV 5</font></strong>
-
-<a name="line66"> 66: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line67"> 67: </a>  PetscErrorCode (*old_initV)(<font color="#4169E1">struct _dvdDashboard</font>*);
-<a name="line68"> 68: </a>  PetscErrorCode (*old_calcPairs)(<font color="#4169E1">struct _dvdDashboard</font>*);
-<a name="line69"> 69: </a>  PetscErrorCode (*old_improveX)(<font color="#4169E1">struct _dvdDashboard</font>*,PetscInt r_s,PetscInt r_e,PetscInt *size_D);
-<a name="line70"> 70: </a>  PetscErrorCode (*old_updateV)(<font color="#4169E1">struct _dvdDashboard</font>*);
-<a name="line71"> 71: </a>  PetscErrorCode (*old_orthV)(<font color="#4169E1">struct _dvdDashboard</font>*);
-<a name="line72"> 72: </a>} DvdProfiler;
-
-<a name="line74"> 74: </a>static PetscLogStage stages[6] = {0,0,0,0,0,0};
-
-<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="dvd_improvex_precond_d"></a>static PetscErrorCode dvd_improvex_precond_d(dvdDashboard *d)</font></strong>
-<a name="line79"> 79: </a>{
-<a name="line81"> 81: </a>  dvdPCWrapper   *dvdpc = (dvdPCWrapper*)d->improvex_precond_data;
-
-<a name="line84"> 84: </a>  <font color="#B22222">/* Free local data */</font>
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (dvdpc->pc) { PCDestroy(&dvdpc->pc); }
-<a name="line86"> 86: </a>  PetscFree(d->improvex_precond_data);
-<a name="line87"> 87: </a>  <font color="#4169E1">return</font>(0);
-<a name="line88"> 88: </a>}
-
-<a name="line92"> 92: </a><strong><font color="#4169E1"><a name="dvd_static_precond_PC_0"></a>static PetscErrorCode dvd_static_precond_PC_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)</font></strong>
-<a name="line93"> 93: </a>{
-<a name="line95"> 95: </a>  dvdPCWrapper   *dvdpc = (dvdPCWrapper*)d->improvex_precond_data;
-
-<a name="line98"> 98: </a>  PCApply(dvdpc->pc,x,Px);
-<a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);
-<a name="line100">100: </a>}
-
-<a name="line104">104: </a><font color="#B22222">/*</font>
-<a name="line105">105: </a><font color="#B22222">  Create a trivial preconditioner</font>
-<a name="line106">106: </a><font color="#B22222">*/</font>
-<a name="line107">107: </a><strong><font color="#4169E1"><a name="dvd_precond_none"></a>static PetscErrorCode dvd_precond_none(dvdDashboard *d,PetscInt i,Vec x,Vec Px)</font></strong>
-<a name="line108">108: </a>{
-
-<a name="line112">112: </a>  VecCopy(x,Px);
-<a name="line113">113: </a>  <font color="#4169E1">return</font>(0);
-<a name="line114">114: </a>}
-
-<a name="line118">118: </a><font color="#B22222">/*</font>
-<a name="line119">119: </a><font color="#B22222">  Create a static preconditioner from a PC</font>
-<a name="line120">120: </a><font color="#B22222">*/</font>
-<a name="line121">121: </a><strong><font color="#4169E1"><a name="dvd_static_precond_PC"></a>PetscErrorCode dvd_static_precond_PC(dvdDashboard *d,dvdBlackboard *b,PC pc)</font></strong>
-<a name="line122">122: </a>{
-<a name="line124">124: </a>  dvdPCWrapper   *dvdpc;
-<a name="line125">125: </a>  Mat            P;
-<a name="line126">126: </a>  PetscBool      t0,t1,t2;
-
-<a name="line129">129: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line130">130: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line131">131: </a>    <font color="#B22222">/* If the preconditioner is valid */</font>
-<a name="line132">132: </a>    <font color="#4169E1">if</font> (pc) {
-<a name="line133">133: </a>      PetscNewLog(d->eps,&dvdpc);
-<a name="line134">134: </a>      dvdpc->pc = pc;
-<a name="line135">135: </a>      PetscObjectReference((PetscObject)pc);
-<a name="line136">136: </a>      d->improvex_precond_data = dvdpc;
-<a name="line137">137: </a>      d->improvex_precond = dvd_static_precond_PC_0;
-
-<a name="line139">139: </a>      <font color="#B22222">/* PC saves the matrix associated with the linear system, and it has to</font>
-<a name="line140">140: </a><font color="#B22222">         be initialize to a valid matrix */</font>
-<a name="line141">141: </a>      PCGetOperatorsSet(pc,NULL,&t0);
-<a name="line142">142: </a>      PetscObjectTypeCompare((PetscObject)pc,PCNONE,&t1);
-<a name="line143">143: </a>      PetscObjectTypeCompare((PetscObject)pc,PCSHELL,&t2);
-<a name="line144">144: </a>      <font color="#4169E1">if</font> (t0 && !t1) {
-<a name="line145">145: </a>        PCGetOperators(pc,NULL,&P);
-<a name="line146">146: </a>        PetscObjectReference((PetscObject)P);
-<a name="line147">147: </a>        PCSetOperators(pc,P,P);
-<a name="line148">148: </a>        PCSetReusePreconditioner(pc,PETSC_TRUE);
-<a name="line149">149: </a>        MatDestroy(&P);
-<a name="line150">150: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (t2) {
-<a name="line151">151: </a>        PCSetOperators(pc,d->A,d->A);
-<a name="line152">152: </a>        PCSetReusePreconditioner(pc,PETSC_TRUE);
-<a name="line153">153: </a>      } <font color="#4169E1">else</font> {
-<a name="line154">154: </a>        d->improvex_precond = dvd_precond_none;
-<a name="line155">155: </a>      }
-
-<a name="line157">157: </a>      EPSDavidsonFLAdd(&d->destroyList,dvd_improvex_precond_d);
-
-<a name="line159">159: </a>    <font color="#B22222">/* Else, use no preconditioner */</font>
-<a name="line160">160: </a>    } <font color="#4169E1">else</font> d->improvex_precond = dvd_precond_none;
-<a name="line161">161: </a>  }
-<a name="line162">162: </a>  <font color="#4169E1">return</font>(0);
-<a name="line163">163: </a>}
-
-<a name="line167">167: </a><strong><font color="#4169E1"><a name="dvd_jacobi_precond_0"></a>static PetscErrorCode dvd_jacobi_precond_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)</font></strong>
-<a name="line168">168: </a>{
-<a name="line169">169: </a>  PetscErrorCode   ierr;
-<a name="line170">170: </a>  dvdJacobiPrecond *dvdjp = (dvdJacobiPrecond*)d->improvex_precond_data;
-
-<a name="line173">173: </a>  <font color="#B22222">/* Compute inv(D - eig)*x */</font>
-<a name="line174">174: </a>  <font color="#4169E1">if</font> (dvdjp->diagB == 0) {
-<a name="line175">175: </a>    <font color="#B22222">/* Px <- diagA - l */</font>
-<a name="line176">176: </a>    VecCopy(dvdjp->diagA,Px);
-<a name="line177">177: </a>    VecShift(Px,-d->eigr[i]);
-<a name="line178">178: </a>  } <font color="#4169E1">else</font> {
-<a name="line179">179: </a>    <font color="#B22222">/* Px <- diagA - l*diagB */</font>
-<a name="line180">180: </a>    VecWAXPY(Px,-d->eigr[i],dvdjp->diagB,dvdjp->diagA);
-<a name="line181">181: </a>  }
-
-<a name="line183">183: </a>  <font color="#B22222">/* Px(i) <- x/Px(i) */</font>
-<a name="line184">184: </a>  VecPointwiseDivide(Px,x,Px);
-<a name="line185">185: </a>  <font color="#4169E1">return</font>(0);
-<a name="line186">186: </a>}
-
-<a name="line190">190: </a><strong><font color="#4169E1"><a name="dvd_jacobi_precond_d"></a>static PetscErrorCode dvd_jacobi_precond_d(dvdDashboard *d)</font></strong>
-<a name="line191">191: </a>{
-<a name="line192">192: </a>  PetscErrorCode   ierr;
-<a name="line193">193: </a>  dvdJacobiPrecond *dvdjp = (dvdJacobiPrecond*)d->improvex_precond_data;
-
-<a name="line196">196: </a>  <font color="#4169E1">if</font> (dvdjp->diagA) { VecDestroy(&dvdjp->diagA); }
-<a name="line197">197: </a>  <font color="#4169E1">if</font> (dvdjp->diagB) { VecDestroy(&dvdjp->diagB); }
-<a name="line198">198: </a>  PetscFree(d->improvex_precond_data);
-<a name="line199">199: </a>  <font color="#4169E1">return</font>(0);
-<a name="line200">200: </a>}
-
-<a name="line204">204: </a><font color="#B22222">/*</font>
-<a name="line205">205: </a><font color="#B22222">  Create the Jacobi preconditioner for Generalized Eigenproblems</font>
-<a name="line206">206: </a><font color="#B22222">*/</font>
-<a name="line207">207: </a><strong><font color="#4169E1"><a name="dvd_jacobi_precond"></a>PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b)</font></strong>
-<a name="line208">208: </a>{
-<a name="line209">209: </a>  PetscErrorCode   ierr;
-<a name="line210">210: </a>  dvdJacobiPrecond *dvdjp;
-<a name="line211">211: </a>  PetscBool        t;
-
-<a name="line214">214: </a>  <font color="#B22222">/* Check if the problem matrices support GetDiagonal */</font>
-<a name="line215">215: </a>  MatHasOperation(d->A,MATOP_GET_DIAGONAL,&t);
-<a name="line216">216: </a>  <font color="#4169E1">if</font> (t && d->B) {
-<a name="line217">217: </a>    MatHasOperation(d->B,MATOP_GET_DIAGONAL,&t);
+<a name="line56"> 56: </a><strong><font color="#4169E1"><a name="dvd_improvex_precond_d"></a>static PetscErrorCode dvd_improvex_precond_d(dvdDashboard *d)</font></strong>
+<a name="line57"> 57: </a>{
+<a name="line59"> 59: </a>  dvdPCWrapper   *dvdpc = (dvdPCWrapper*)d->improvex_precond_data;
+
+<a name="line62"> 62: </a>  <font color="#B22222">/* Free local data */</font>
+<a name="line63"> 63: </a>  <font color="#4169E1">if</font> (dvdpc->pc) { PCDestroy(&dvdpc->pc); }
+<a name="line64"> 64: </a>  PetscFree(d->improvex_precond_data);
+<a name="line65"> 65: </a>  <font color="#4169E1">return</font>(0);
+<a name="line66"> 66: </a>}
+
+<a name="line70"> 70: </a><strong><font color="#4169E1"><a name="dvd_static_precond_PC_0"></a>static PetscErrorCode dvd_static_precond_PC_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)</font></strong>
+<a name="line71"> 71: </a>{
+<a name="line73"> 73: </a>  dvdPCWrapper   *dvdpc = (dvdPCWrapper*)d->improvex_precond_data;
+
+<a name="line76"> 76: </a>  PCApply(dvdpc->pc,x,Px);
+<a name="line77"> 77: </a>  <font color="#4169E1">return</font>(0);
+<a name="line78"> 78: </a>}
+
+<a name="line82"> 82: </a><font color="#B22222">/*</font>
+<a name="line83"> 83: </a><font color="#B22222">  Create a trivial preconditioner</font>
+<a name="line84"> 84: </a><font color="#B22222">*/</font>
+<a name="line85"> 85: </a><strong><font color="#4169E1"><a name="dvd_precond_none"></a>static PetscErrorCode dvd_precond_none(dvdDashboard *d,PetscInt i,Vec x,Vec Px)</font></strong>
+<a name="line86"> 86: </a>{
+
+<a name="line90"> 90: </a>  VecCopy(x,Px);
+<a name="line91"> 91: </a>  <font color="#4169E1">return</font>(0);
+<a name="line92"> 92: </a>}
+
+<a name="line96"> 96: </a><font color="#B22222">/*</font>
+<a name="line97"> 97: </a><font color="#B22222">  Create a static preconditioner from a PC</font>
+<a name="line98"> 98: </a><font color="#B22222">*/</font>
+<a name="line99"> 99: </a><strong><font color="#4169E1"><a name="dvd_static_precond_PC"></a>PetscErrorCode dvd_static_precond_PC(dvdDashboard *d,dvdBlackboard *b,PC pc)</font></strong>
+<a name="line100">100: </a>{
+<a name="line102">102: </a>  dvdPCWrapper   *dvdpc;
+<a name="line103">103: </a>  Mat            P;
+<a name="line104">104: </a>  PetscBool      t0,t1,t2;
+
+<a name="line107">107: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line109">109: </a>    <font color="#B22222">/* If the preconditioner is valid */</font>
+<a name="line110">110: </a>    <font color="#4169E1">if</font> (pc) {
+<a name="line111">111: </a>      PetscNewLog(d->eps,&dvdpc);
+<a name="line112">112: </a>      dvdpc->pc = pc;
+<a name="line113">113: </a>      PetscObjectReference((PetscObject)pc);
+<a name="line114">114: </a>      d->improvex_precond_data = dvdpc;
+<a name="line115">115: </a>      d->improvex_precond = dvd_static_precond_PC_0;
+
+<a name="line117">117: </a>      <font color="#B22222">/* PC saves the matrix associated with the linear system, and it has to</font>
+<a name="line118">118: </a><font color="#B22222">         be initialize to a valid matrix */</font>
+<a name="line119">119: </a>      PCGetOperatorsSet(pc,NULL,&t0);
+<a name="line120">120: </a>      PetscObjectTypeCompare((PetscObject)pc,PCNONE,&t1);
+<a name="line121">121: </a>      PetscObjectTypeCompare((PetscObject)pc,PCSHELL,&t2);
+<a name="line122">122: </a>      <font color="#4169E1">if</font> (t0 && !t1) {
+<a name="line123">123: </a>        PCGetOperators(pc,NULL,&P);
+<a name="line124">124: </a>        PetscObjectReference((PetscObject)P);
+<a name="line125">125: </a>        PCSetOperators(pc,P,P);
+<a name="line126">126: </a>        PCSetReusePreconditioner(pc,PETSC_TRUE);
+<a name="line127">127: </a>        MatDestroy(&P);
+<a name="line128">128: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (t2) {
+<a name="line129">129: </a>        PCSetOperators(pc,d->A,d->A);
+<a name="line130">130: </a>        PCSetReusePreconditioner(pc,PETSC_TRUE);
+<a name="line131">131: </a>      } <font color="#4169E1">else</font> {
+<a name="line132">132: </a>        d->improvex_precond = dvd_precond_none;
+<a name="line133">133: </a>      }
+
+<a name="line135">135: </a>      EPSDavidsonFLAdd(&d->destroyList,dvd_improvex_precond_d);
+
+<a name="line137">137: </a>    <font color="#B22222">/* Else, use no preconditioner */</font>
+<a name="line138">138: </a>    } <font color="#4169E1">else</font> d->improvex_precond = dvd_precond_none;
+<a name="line139">139: </a>  }
+<a name="line140">140: </a>  <font color="#4169E1">return</font>(0);
+<a name="line141">141: </a>}
+
+<a name="line145">145: </a><strong><font color="#4169E1"><a name="dvd_jacobi_precond_0"></a>static PetscErrorCode dvd_jacobi_precond_0(dvdDashboard *d,PetscInt i,Vec x,Vec Px)</font></strong>
+<a name="line146">146: </a>{
+<a name="line147">147: </a>  PetscErrorCode   ierr;
+<a name="line148">148: </a>  dvdJacobiPrecond *dvdjp = (dvdJacobiPrecond*)d->improvex_precond_data;
+
+<a name="line151">151: </a>  <font color="#B22222">/* Compute inv(D - eig)*x */</font>
+<a name="line152">152: </a>  <font color="#4169E1">if</font> (dvdjp->diagB == 0) {
+<a name="line153">153: </a>    <font color="#B22222">/* Px <- diagA - l */</font>
+<a name="line154">154: </a>    VecCopy(dvdjp->diagA,Px);
+<a name="line155">155: </a>    VecShift(Px,-d->eigr[i]);
+<a name="line156">156: </a>  } <font color="#4169E1">else</font> {
+<a name="line157">157: </a>    <font color="#B22222">/* Px <- diagA - l*diagB */</font>
+<a name="line158">158: </a>    VecWAXPY(Px,-d->eigr[i],dvdjp->diagB,dvdjp->diagA);
+<a name="line159">159: </a>  }
+
+<a name="line161">161: </a>  <font color="#B22222">/* Px(i) <- x/Px(i) */</font>
+<a name="line162">162: </a>  VecPointwiseDivide(Px,x,Px);
+<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
+<a name="line164">164: </a>}
+
+<a name="line168">168: </a><strong><font color="#4169E1"><a name="dvd_jacobi_precond_d"></a>static PetscErrorCode dvd_jacobi_precond_d(dvdDashboard *d)</font></strong>
+<a name="line169">169: </a>{
+<a name="line170">170: </a>  PetscErrorCode   ierr;
+<a name="line171">171: </a>  dvdJacobiPrecond *dvdjp = (dvdJacobiPrecond*)d->improvex_precond_data;
+
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (dvdjp->diagA) { VecDestroy(&dvdjp->diagA); }
+<a name="line175">175: </a>  <font color="#4169E1">if</font> (dvdjp->diagB) { VecDestroy(&dvdjp->diagB); }
+<a name="line176">176: </a>  PetscFree(d->improvex_precond_data);
+<a name="line177">177: </a>  <font color="#4169E1">return</font>(0);
+<a name="line178">178: </a>}
+
+<a name="line182">182: </a><font color="#B22222">/*</font>
+<a name="line183">183: </a><font color="#B22222">  Create the Jacobi preconditioner for Generalized Eigenproblems</font>
+<a name="line184">184: </a><font color="#B22222">*/</font>
+<a name="line185">185: </a><strong><font color="#4169E1"><a name="dvd_jacobi_precond"></a>PetscErrorCode dvd_jacobi_precond(dvdDashboard *d,dvdBlackboard *b)</font></strong>
+<a name="line186">186: </a>{
+<a name="line187">187: </a>  PetscErrorCode   ierr;
+<a name="line188">188: </a>  dvdJacobiPrecond *dvdjp;
+<a name="line189">189: </a>  PetscBool        t;
+
+<a name="line192">192: </a>  <font color="#B22222">/* Check if the problem matrices support GetDiagonal */</font>
+<a name="line193">193: </a>  MatHasOperation(d->A,MATOP_GET_DIAGONAL,&t);
+<a name="line194">194: </a>  <font color="#4169E1">if</font> (t && d->B) {
+<a name="line195">195: </a>    MatHasOperation(d->B,MATOP_GET_DIAGONAL,&t);
+<a name="line196">196: </a>  }
+
+<a name="line198">198: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line199">199: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line200">200: </a>    PetscNewLog(d->eps,&dvdjp);
+<a name="line201">201: </a>    <font color="#4169E1">if</font> (t) {
+<a name="line202">202: </a>      MatCreateVecs(d->A,&dvdjp->diagA,NULL);
+<a name="line203">203: </a>      MatGetDiagonal(d->A,dvdjp->diagA);
+<a name="line204">204: </a>      <font color="#4169E1">if</font> (d->B) {
+<a name="line205">205: </a>        MatCreateVecs(d->B,&dvdjp->diagB,NULL);
+<a name="line206">206: </a>        MatGetDiagonal(d->B,dvdjp->diagB);
+<a name="line207">207: </a>      } <font color="#4169E1">else</font> dvdjp->diagB = 0;
+<a name="line208">208: </a>      d->improvex_precond_data = dvdjp;
+<a name="line209">209: </a>      d->improvex_precond = dvd_jacobi_precond_0;
+
+<a name="line211">211: </a>      EPSDavidsonFLAdd(&d->destroyList,dvd_jacobi_precond_d);
+
+<a name="line213">213: </a>    <font color="#B22222">/* Else, use no preconditioner */</font>
+<a name="line214">214: </a>    } <font color="#4169E1">else</font> {
+<a name="line215">215: </a>      dvdjp->diagA = dvdjp->diagB = 0;
+<a name="line216">216: </a>      d->improvex_precond = dvd_precond_none;
+<a name="line217">217: </a>    }
 <a name="line218">218: </a>  }
-
-<a name="line220">220: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line222">222: </a>    PetscNewLog(d->eps,&dvdjp);
-<a name="line223">223: </a>    <font color="#4169E1">if</font> (t) {
-<a name="line224">224: </a>      MatCreateVecs(d->A,&dvdjp->diagA,NULL);
-<a name="line225">225: </a>      MatGetDiagonal(d->A,dvdjp->diagA);
-<a name="line226">226: </a>      <font color="#4169E1">if</font> (d->B) {
-<a name="line227">227: </a>        MatCreateVecs(d->B,&dvdjp->diagB,NULL);
-<a name="line228">228: </a>        MatGetDiagonal(d->B,dvdjp->diagB);
-<a name="line229">229: </a>      } <font color="#4169E1">else</font> dvdjp->diagB = 0;
-<a name="line230">230: </a>      d->improvex_precond_data = dvdjp;
-<a name="line231">231: </a>      d->improvex_precond = dvd_jacobi_precond_0;
-
-<a name="line233">233: </a>      EPSDavidsonFLAdd(&d->destroyList,dvd_jacobi_precond_d);
-
-<a name="line235">235: </a>    <font color="#B22222">/* Else, use no preconditioner */</font>
-<a name="line236">236: </a>    } <font color="#4169E1">else</font> {
-<a name="line237">237: </a>      dvdjp->diagA = dvdjp->diagB = 0;
-<a name="line238">238: </a>      d->improvex_precond = dvd_precond_none;
-<a name="line239">239: </a>    }
-<a name="line240">240: </a>  }
-<a name="line241">241: </a>  <font color="#4169E1">return</font>(0);
-<a name="line242">242: </a>}
-
-<a name="line246">246: </a><strong><font color="#4169E1"><a name="dvd_prof_init"></a>PetscErrorCode dvd_prof_init()</font></strong>
-<a name="line247">247: </a>{
-
-<a name="line251">251: </a>  <font color="#4169E1">if</font> (!stages[0]) {
-<a name="line252">252: </a>    PetscLogStageRegister(<font color="#666666">"Dvd_step_initV"</font>,&stages[DVD_STAGE_INITV]);
-<a name="line253">253: </a>    PetscLogStageRegister(<font color="#666666">"Dvd_step_calcPairs"</font>,&stages[DVD_STAGE_CALCPAIRS]);
-<a name="line254">254: </a>    PetscLogStageRegister(<font color="#666666">"Dvd_step_improveX"</font>,&stages[DVD_STAGE_IMPROVEX]);
-<a name="line255">255: </a>    PetscLogStageRegister(<font color="#666666">"Dvd_step_updateV"</font>,&stages[DVD_STAGE_UPDATEV]);
-<a name="line256">256: </a>    PetscLogStageRegister(<font color="#666666">"Dvd_step_orthV"</font>,&stages[DVD_STAGE_ORTHV]);
-<a name="line257">257: </a>  }
-<a name="line258">258: </a>  <font color="#4169E1">return</font>(0);
-<a name="line259">259: </a>}
-
-<a name="line263">263: </a><strong><font color="#4169E1"><a name="dvd_initV_prof"></a>PetscErrorCode dvd_initV_prof(dvdDashboard* d)</font></strong>
-<a name="line264">264: </a>{
-<a name="line265">265: </a>  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-
-<a name="line269">269: </a>  PetscLogStagePush(stages[DVD_STAGE_INITV]);
-<a name="line270">270: </a>  p->old_initV(d);
-<a name="line271">271: </a>  PetscLogStagePop();
-<a name="line272">272: </a>  <font color="#4169E1">return</font>(0);
-<a name="line273">273: </a>}
-
-<a name="line277">277: </a><strong><font color="#4169E1"><a name="dvd_calcPairs_prof"></a>static PetscErrorCode dvd_calcPairs_prof(dvdDashboard* d)</font></strong>
-<a name="line278">278: </a>{
-<a name="line279">279: </a>  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-
-<a name="line283">283: </a>  PetscLogStagePush(stages[DVD_STAGE_CALCPAIRS]);
-<a name="line284">284: </a>  p->old_calcPairs(d);
-<a name="line285">285: </a>  PetscLogStagePop();
-<a name="line286">286: </a>  <font color="#4169E1">return</font>(0);
-<a name="line287">287: </a>}
-
-<a name="line291">291: </a><strong><font color="#4169E1"><a name="dvd_improveX_prof"></a>static PetscErrorCode dvd_improveX_prof(dvdDashboard *d,PetscInt r_s,PetscInt r_e,PetscInt *size_D)</font></strong>
-<a name="line292">292: </a>{
-<a name="line293">293: </a>  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-
-<a name="line297">297: </a>  PetscLogStagePush(stages[DVD_STAGE_IMPROVEX]);
-<a name="line298">298: </a>  p->old_improveX(d,r_s,r_e,size_D);
-<a name="line299">299: </a>  PetscLogStagePop();
-<a name="line300">300: </a>  <font color="#4169E1">return</font>(0);
-<a name="line301">301: </a>}
-
-<a name="line305">305: </a><strong><font color="#4169E1"><a name="dvd_updateV_prof"></a>static PetscErrorCode dvd_updateV_prof(dvdDashboard *d)</font></strong>
-<a name="line306">306: </a>{
-<a name="line307">307: </a>  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-
-<a name="line311">311: </a>  PetscLogStagePush(stages[DVD_STAGE_UPDATEV]);
-<a name="line312">312: </a>  p->old_updateV(d);
-<a name="line313">313: </a>  PetscLogStagePop();
-<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
-<a name="line315">315: </a>}
-
-<a name="line319">319: </a><strong><font color="#4169E1"><a name="dvd_profiler_d"></a>static PetscErrorCode dvd_profiler_d(dvdDashboard *d)</font></strong>
-<a name="line320">320: </a>{
-<a name="line322">322: </a>  DvdProfiler    *p = (DvdProfiler*)d->prof_data;
-
-<a name="line325">325: </a>  <font color="#B22222">/* Free local data */</font>
-<a name="line326">326: </a>  PetscFree(p);
-<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
-<a name="line328">328: </a>}
-
-<a name="line332">332: </a><strong><font color="#4169E1"><a name="dvd_profiler"></a>PetscErrorCode dvd_profiler(dvdDashboard *d,dvdBlackboard *b)</font></strong>
-<a name="line333">333: </a>{
-<a name="line335">335: </a>  DvdProfiler    *p;
-
-<a name="line338">338: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line339">339: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line340">340: </a>    PetscFree(d->prof_data);
-<a name="line341">341: </a>    PetscNewLog(d->eps,&p);
-<a name="line342">342: </a>    d->prof_data = p;
-<a name="line343">343: </a>    p->old_initV = d->initV; d->initV = dvd_initV_prof;
-<a name="line344">344: </a>    p->old_calcPairs = d->calcPairs; d->calcPairs = dvd_calcPairs_prof;
-<a name="line345">345: </a>    p->old_improveX = d->improveX; d->improveX = dvd_improveX_prof;
-<a name="line346">346: </a>    p->old_updateV = d->updateV; d->updateV = dvd_updateV_prof;
-
-<a name="line348">348: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_profiler_d);
-<a name="line349">349: </a>  }
-<a name="line350">350: </a>  <font color="#4169E1">return</font>(0);
-<a name="line351">351: </a>}
-
-<a name="line355">355: </a><strong><font color="#4169E1"><a name="dvd_harm_d"></a>static PetscErrorCode dvd_harm_d(dvdDashboard *d)</font></strong>
-<a name="line356">356: </a>{
-
-<a name="line360">360: </a>  <font color="#B22222">/* Free local data */</font>
-<a name="line361">361: </a>  PetscFree(d->calcpairs_W_data);
-<a name="line362">362: </a>  <font color="#4169E1">return</font>(0);
-<a name="line363">363: </a>}
-
-<a name="line367">367: </a><strong><font color="#4169E1"><a name="dvd_harm_transf"></a>static PetscErrorCode dvd_harm_transf(dvdHarmonic *dvdh,PetscScalar t)</font></strong>
-<a name="line368">368: </a>{
-<a name="line370">370: </a>  <font color="#4169E1">switch</font> (dvdh->mode) {
-<a name="line371">371: </a>  <font color="#4169E1">case</font> DVD_HARM_RR:    <font color="#B22222">/* harmonic RR */</font>
-<a name="line372">372: </a>    dvdh->Wa = 1.0; dvdh->Wb = t;   dvdh->Pa = 0.0; dvdh->Pb = -1.0;
-<a name="line373">373: </a>    <font color="#4169E1">break</font>;
-<a name="line374">374: </a>  <font color="#4169E1">case</font> DVD_HARM_RRR:   <font color="#B22222">/* relative harmonic RR */</font>
-<a name="line375">375: </a>    dvdh->Wa = 1.0; dvdh->Wb = t;   dvdh->Pa = 1.0; dvdh->Pb = 0.0;
-<a name="line376">376: </a>    <font color="#4169E1">break</font>;
-<a name="line377">377: </a>  <font color="#4169E1">case</font> DVD_HARM_REIGS: <font color="#B22222">/* rightmost eigenvalues */</font>
-<a name="line378">378: </a>    dvdh->Wa = 1.0; dvdh->Wb = t;   dvdh->Pa = 1.0; dvdh->Pb = -PetscConj(t);
-<a name="line379">379: </a>    <font color="#4169E1">break</font>;
-<a name="line380">380: </a>  <font color="#4169E1">case</font> DVD_HARM_LEIGS: <font color="#B22222">/* largest eigenvalues */</font>
-<a name="line381">381: </a>    dvdh->Wa = 0.0; dvdh->Wb = 1.0; dvdh->Pa = 1.0; dvdh->Pb = 0.0;
-<a name="line382">382: </a>    <font color="#4169E1">break</font>;
-<a name="line383">383: </a>  <font color="#4169E1">case</font> DVD_HARM_NONE:
-<a name="line384">384: </a><strong><font color="#FF0000">  default:</font></strong>
-<a name="line385">385: </a>    SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Harmonic type not supported"</font>);
-<a name="line386">386: </a>  }
-
-<a name="line388">388: </a>  <font color="#B22222">/* Check the transformation does not change the sign of the imaginary part */</font>
-<a name="line389">389: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line390">390: </a>  <font color="#4169E1">if</font> (dvdh->Pb*dvdh->Wa - dvdh->Wb*dvdh->Pa < 0.0) {
-<a name="line391">391: </a>    dvdh->Pa *= -1.0;
-<a name="line392">392: </a>    dvdh->Pb *= -1.0;
-<a name="line393">393: </a>  }
-<a name="line394">394: </a><font color="#A020F0">#endif</font>
-<a name="line395">395: </a>  <font color="#4169E1">return</font>(0);
-<a name="line396">396: </a>}
-
-<a name="line400">400: </a><strong><font color="#4169E1"><a name="dvd_harm_updateW"></a>static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)</font></strong>
-<a name="line401">401: </a>{
-<a name="line402">402: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
-<a name="line404">404: </a>  PetscInt       l,k,i;
-<a name="line405">405: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             BX = d->BX?d->BX:d->eps->V;
-
-<a name="line408">408: </a>  <font color="#B22222">/* Update the target if it is necessary */</font>
-<a name="line409">409: </a>  <font color="#4169E1">if</font> (!data->withTarget) {
-<a name="line410">410: </a>    dvd_harm_transf(data,d->eigr[0]);
-<a name="line411">411: </a>  }
-
-<a name="line413">413: </a>  <font color="#B22222">/* W(i) <- Wa*AV(i) - Wb*<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>(i) */</font>
-<a name="line414">414: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
-<a name="line415">415: </a>  <font color="#4169E1">if</font> (k != l+d->V_new_s) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Consistency broken"</font>);
-<a name="line416">416: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->W,l+d->V_new_s,l+d->V_new_e);
-<a name="line417">417: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->AX,l+d->V_new_s,l+d->V_new_e);
-<a name="line418">418: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,l+d->V_new_s,l+d->V_new_e);
-<a name="line419">419: </a>  <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(d->AX,d->W);
-<a name="line420">420: </a>  <font color="#B22222">/* Work around bug in <a href="../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a></font>
-<a name="line421">421: </a><font color="#B22222">  <a href="../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(d->W,data->Wa); */</font>
-<a name="line422">422: </a>  <font color="#4169E1">for</font> (i=l+d->V_new_s;i<l+d->V_new_e; ++i) {
-<a name="line423">423: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(d->W,i,data->Wa);
-<a name="line424">424: </a>  }
-<a name="line425">425: </a>  <a href="../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(d->W,-data->Wb,BX);
-<a name="line426">426: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->W,l,k);
-<a name="line427">427: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->AX,l,k);
-<a name="line428">428: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,l,k);
+<a name="line219">219: </a>  <font color="#4169E1">return</font>(0);
+<a name="line220">220: </a>}
+
+<a name="line224">224: </a><strong><font color="#4169E1"><a name="dvd_harm_d"></a>static PetscErrorCode dvd_harm_d(dvdDashboard *d)</font></strong>
+<a name="line225">225: </a>{
+
+<a name="line229">229: </a>  <font color="#B22222">/* Free local data */</font>
+<a name="line230">230: </a>  PetscFree(d->calcpairs_W_data);
+<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
+<a name="line232">232: </a>}
+
+<a name="line236">236: </a><strong><font color="#4169E1"><a name="dvd_harm_transf"></a>static PetscErrorCode dvd_harm_transf(dvdHarmonic *dvdh,PetscScalar t)</font></strong>
+<a name="line237">237: </a>{
+<a name="line239">239: </a>  <font color="#4169E1">switch</font> (dvdh->mode) {
+<a name="line240">240: </a>  <font color="#4169E1">case</font> DVD_HARM_RR:    <font color="#B22222">/* harmonic RR */</font>
+<a name="line241">241: </a>    dvdh->Wa = 1.0; dvdh->Wb = t;   dvdh->Pa = 0.0; dvdh->Pb = -1.0;
+<a name="line242">242: </a>    <font color="#4169E1">break</font>;
+<a name="line243">243: </a>  <font color="#4169E1">case</font> DVD_HARM_RRR:   <font color="#B22222">/* relative harmonic RR */</font>
+<a name="line244">244: </a>    dvdh->Wa = 1.0; dvdh->Wb = t;   dvdh->Pa = 1.0; dvdh->Pb = 0.0;
+<a name="line245">245: </a>    <font color="#4169E1">break</font>;
+<a name="line246">246: </a>  <font color="#4169E1">case</font> DVD_HARM_REIGS: <font color="#B22222">/* rightmost eigenvalues */</font>
+<a name="line247">247: </a>    dvdh->Wa = 1.0; dvdh->Wb = t;   dvdh->Pa = 1.0; dvdh->Pb = -PetscConj(t);
+<a name="line248">248: </a>    <font color="#4169E1">break</font>;
+<a name="line249">249: </a>  <font color="#4169E1">case</font> DVD_HARM_LEIGS: <font color="#B22222">/* largest eigenvalues */</font>
+<a name="line250">250: </a>    dvdh->Wa = 0.0; dvdh->Wb = 1.0; dvdh->Pa = 1.0; dvdh->Pb = 0.0;
+<a name="line251">251: </a>    <font color="#4169E1">break</font>;
+<a name="line252">252: </a>  <font color="#4169E1">case</font> DVD_HARM_NONE:
+<a name="line253">253: </a><strong><font color="#FF0000">  default:</font></strong>
+<a name="line254">254: </a>    SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Harmonic type not supported"</font>);
+<a name="line255">255: </a>  }
+
+<a name="line257">257: </a>  <font color="#B22222">/* Check the transformation does not change the sign of the imaginary part */</font>
+<a name="line258">258: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line259">259: </a>  <font color="#4169E1">if</font> (dvdh->Pb*dvdh->Wa - dvdh->Wb*dvdh->Pa < 0.0) {
+<a name="line260">260: </a>    dvdh->Pa *= -1.0;
+<a name="line261">261: </a>    dvdh->Pb *= -1.0;
+<a name="line262">262: </a>  }
+<a name="line263">263: </a><font color="#A020F0">#endif</font>
+<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
+<a name="line265">265: </a>}
+
+<a name="line269">269: </a><strong><font color="#4169E1"><a name="dvd_harm_updateW"></a>static PetscErrorCode dvd_harm_updateW(dvdDashboard *d)</font></strong>
+<a name="line270">270: </a>{
+<a name="line271">271: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
+<a name="line273">273: </a>  PetscInt       l,k;
+<a name="line274">274: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             BX = d->BX?d->BX:d->eps->V;
+
+<a name="line277">277: </a>  <font color="#B22222">/* Update the target if it is necessary */</font>
+<a name="line278">278: </a>  <font color="#4169E1">if</font> (!data->withTarget) {
+<a name="line279">279: </a>    dvd_harm_transf(data,d->eigr[0]);
+<a name="line280">280: </a>  }
+
+<a name="line282">282: </a>  <font color="#B22222">/* W(i) <- Wa*AV(i) - Wb*<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>(i) */</font>
+<a name="line283">283: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
+<a name="line284">284: </a>  <font color="#4169E1">if</font> (k != l+d->V_new_s) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Consistency broken"</font>);
+<a name="line285">285: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->W,l+d->V_new_s,l+d->V_new_e);
+<a name="line286">286: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->AX,l+d->V_new_s,l+d->V_new_e);
+<a name="line287">287: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,l+d->V_new_s,l+d->V_new_e);
+<a name="line288">288: </a>  <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(d->AX,d->W);
+<a name="line289">289: </a>  <a href="../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(d->W,data->Wa);
+<a name="line290">290: </a>  <a href="../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(d->W,-data->Wb,1.0,BX,NULL);
+<a name="line291">291: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->W,l,k);
+<a name="line292">292: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(d->AX,l,k);
+<a name="line293">293: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(BX,l,k);
+<a name="line294">294: </a>  <font color="#4169E1">return</font>(0);
+<a name="line295">295: </a>}
+
+<a name="line299">299: </a><strong><font color="#4169E1"><a name="dvd_harm_proj"></a>static PetscErrorCode dvd_harm_proj(dvdDashboard *d)</font></strong>
+<a name="line300">300: </a>{
+<a name="line302">302: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
+<a name="line303">303: </a>  PetscInt       i,j,l0,l,k,ld;
+<a name="line304">304: </a>  PetscScalar    h,g,*H,*G;
+
+<a name="line307">307: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l0,&k);
+<a name="line308">308: </a>  l = l0 + d->V_new_s;
+<a name="line309">309: </a>  k = l0 + d->V_new_e;
+<a name="line310">310: </a>  MatGetSize(d->H,&ld,NULL);
+<a name="line311">311: </a>  MatDenseGetArray(d->H,&H);
+<a name="line312">312: </a>  MatDenseGetArray(d->G,&G);
+<a name="line313">313: </a>  <font color="#B22222">/* [H G] <- [Pa*H - Pb*G, Wa*H - Wb*G] */</font>
+<a name="line314">314: </a>  <font color="#B22222">/* Right part */</font>
+<a name="line315">315: </a>  <font color="#4169E1">for</font> (i=l;i<k;i++) {
+<a name="line316">316: </a>    <font color="#4169E1">for</font> (j=l0;j<k;j++) {
+<a name="line317">317: </a>      h = H[ld*i+j];
+<a name="line318">318: </a>      g = G[ld*i+j];
+<a name="line319">319: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
+<a name="line320">320: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
+<a name="line321">321: </a>    }
+<a name="line322">322: </a>  }
+<a name="line323">323: </a>  <font color="#B22222">/* Left part */</font>
+<a name="line324">324: </a>  <font color="#4169E1">for</font> (i=l0;i<l;i++) {
+<a name="line325">325: </a>    <font color="#4169E1">for</font> (j=l;j<k;j++) {
+<a name="line326">326: </a>      h = H[ld*i+j];
+<a name="line327">327: </a>      g = G[ld*i+j];
+<a name="line328">328: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
+<a name="line329">329: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
+<a name="line330">330: </a>    }
+<a name="line331">331: </a>  }
+<a name="line332">332: </a>  MatDenseRestoreArray(d->H,&H);
+<a name="line333">333: </a>  MatDenseRestoreArray(d->G,&G);
+<a name="line334">334: </a>  <font color="#4169E1">return</font>(0);
+<a name="line335">335: </a>}
+
+<a name="line339">339: </a><strong><font color="#4169E1"><a name="dvd_harm_updateproj"></a>PetscErrorCode dvd_harm_updateproj(dvdDashboard *d)</font></strong>
+<a name="line340">340: </a>{
+<a name="line342">342: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
+<a name="line343">343: </a>  PetscInt       i,j,l,k,ld;
+<a name="line344">344: </a>  PetscScalar    h,g,*H,*G;
+
+<a name="line347">347: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
+<a name="line348">348: </a>  k = l + d->V_tra_s;
+<a name="line349">349: </a>  MatGetSize(d->H,&ld,NULL);
+<a name="line350">350: </a>  MatDenseGetArray(d->H,&H);
+<a name="line351">351: </a>  MatDenseGetArray(d->G,&G);
+<a name="line352">352: </a>  <font color="#B22222">/* [H G] <- [Pa*H - Pb*G, Wa*H - Wb*G] */</font>
+<a name="line353">353: </a>  <font color="#B22222">/* Right part */</font>
+<a name="line354">354: </a>  <font color="#4169E1">for</font> (i=l;i<k;i++) {
+<a name="line355">355: </a>    <font color="#4169E1">for</font> (j=0;j<l;j++) {
+<a name="line356">356: </a>      h = H[ld*i+j];
+<a name="line357">357: </a>      g = G[ld*i+j];
+<a name="line358">358: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
+<a name="line359">359: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
+<a name="line360">360: </a>    }
+<a name="line361">361: </a>  }
+<a name="line362">362: </a>  <font color="#B22222">/* Lower triangular part */</font>
+<a name="line363">363: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) {
+<a name="line364">364: </a>    <font color="#4169E1">for</font> (j=l;j<k;j++) {
+<a name="line365">365: </a>      h = H[ld*i+j];
+<a name="line366">366: </a>      g = G[ld*i+j];
+<a name="line367">367: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
+<a name="line368">368: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
+<a name="line369">369: </a>    }
+<a name="line370">370: </a>  }
+<a name="line371">371: </a>  MatDenseRestoreArray(d->H,&H);
+<a name="line372">372: </a>  MatDenseRestoreArray(d->G,&G);
+<a name="line373">373: </a>  <font color="#4169E1">return</font>(0);
+<a name="line374">374: </a>}
+
+<a name="line378">378: </a><strong><font color="#4169E1"><a name="dvd_harm_backtrans"></a>static PetscErrorCode dvd_harm_backtrans(dvdHarmonic *data,PetscScalar *ar,PetscScalar *ai)</font></strong>
+<a name="line379">379: </a>{
+<a name="line380">380: </a>  PetscScalar xr;
+<a name="line381">381: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line382">382: </a>  PetscScalar xi, k;
+<a name="line383">383: </a><font color="#A020F0">#endif</font>
+
+<a name="line387">387: </a>  xr = *ar;
+<a name="line388">388: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line390">390: </a>  xi = *ai;
+
+<a name="line392">392: </a>  <font color="#4169E1">if</font> (xi != 0.0) {
+<a name="line393">393: </a>    k = (data->Pa - data->Wa*xr)*(data->Pa - data->Wa*xr) + data->Wa*data->Wa*xi*xi;
+<a name="line394">394: </a>    *ar = (data->Pb*data->Pa - (data->Pb*data->Wa + data->Wb*data->Pa)*xr + data->Wb*data->Wa*(xr*xr + xi*xi))/k;
+<a name="line395">395: </a>    *ai = (data->Pb*data->Wa - data->Wb*data->Pa)*xi/k;
+<a name="line396">396: </a>  } <font color="#4169E1">else</font>
+<a name="line397">397: </a><font color="#A020F0">#endif</font>
+<a name="line398">398: </a>    *ar = (data->Pb - data->Wb*xr) / (data->Pa - data->Wa*xr);
+<a name="line399">399: </a>  <font color="#4169E1">return</font>(0);
+<a name="line400">400: </a>}
+
+<a name="line404">404: </a><strong><font color="#4169E1"><a name="dvd_harm_eig_backtrans"></a>static PetscErrorCode dvd_harm_eig_backtrans(dvdDashboard *d,PetscScalar ar,PetscScalar ai,PetscScalar *br,PetscScalar *bi)</font></strong>
+<a name="line405">405: </a>{
+<a name="line406">406: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
+
+<a name="line410">410: </a>  dvd_harm_backtrans(data,&ar,&ai);
+<a name="line411">411: </a>  *br = ar;
+<a name="line412">412: </a>  *bi = ai;
+<a name="line413">413: </a>  <font color="#4169E1">return</font>(0);
+<a name="line414">414: </a>}
+
+<a name="line418">418: </a><strong><font color="#4169E1"><a name="dvd_harm_eigs_trans"></a>static PetscErrorCode dvd_harm_eigs_trans(dvdDashboard *d)</font></strong>
+<a name="line419">419: </a>{
+<a name="line420">420: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
+<a name="line421">421: </a>  PetscInt       i,l,k;
+
+<a name="line425">425: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
+<a name="line426">426: </a>  <font color="#4169E1">for</font> (i=0;i<k-l;i++) {
+<a name="line427">427: </a>    dvd_harm_backtrans(data,&d->eigr[i],&d->eigi[i]);
+<a name="line428">428: </a>  }
 <a name="line429">429: </a>  <font color="#4169E1">return</font>(0);
 <a name="line430">430: </a>}
 
-<a name="line434">434: </a><strong><font color="#4169E1"><a name="dvd_harm_proj"></a>static PetscErrorCode dvd_harm_proj(dvdDashboard *d)</font></strong>
+<a name="line434">434: </a><strong><font color="#4169E1"><a name="dvd_harm_conf"></a>PetscErrorCode dvd_harm_conf(dvdDashboard *d,dvdBlackboard *b,HarmType_t mode,PetscBool fixedTarget,PetscScalar t)</font></strong>
 <a name="line435">435: </a>{
-<a name="line437">437: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
-<a name="line438">438: </a>  PetscInt       i,j,l0,l,k,ld;
-<a name="line439">439: </a>  PetscScalar    h,g,*H,*G;
-
-<a name="line442">442: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l0,&k);
-<a name="line443">443: </a>  l = l0 + d->V_new_s;
-<a name="line444">444: </a>  k = l0 + d->V_new_e;
-<a name="line445">445: </a>  MatGetSize(d->H,&ld,NULL);
-<a name="line446">446: </a>  MatDenseGetArray(d->H,&H);
-<a name="line447">447: </a>  MatDenseGetArray(d->G,&G);
-<a name="line448">448: </a>  <font color="#B22222">/* [H G] <- [Pa*H - Pb*G, Wa*H - Wb*G] */</font>
-<a name="line449">449: </a>  <font color="#B22222">/* Right part */</font>
-<a name="line450">450: </a>  <font color="#4169E1">for</font> (i=l;i<k;i++) {
-<a name="line451">451: </a>    <font color="#4169E1">for</font> (j=l0;j<k;j++) {
-<a name="line452">452: </a>      h = H[ld*i+j];
-<a name="line453">453: </a>      g = G[ld*i+j];
-<a name="line454">454: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
-<a name="line455">455: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
-<a name="line456">456: </a>    }
+<a name="line437">437: </a>  dvdHarmonic    *dvdh;
+
+<a name="line440">440: </a>  <font color="#B22222">/* Set the problem to GNHEP:</font>
+<a name="line441">441: </a><font color="#B22222">     d->G maybe is upper triangular due to biorthogonality of V and W */</font>
+<a name="line442">442: </a>  d->sEP = d->sA = d->sB = 0;
+
+<a name="line444">444: </a>  <font color="#B22222">/* Setup the step */</font>
+<a name="line445">445: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
+<a name="line446">446: </a>    PetscNewLog(d->eps,&dvdh);
+<a name="line447">447: </a>    dvdh->withTarget = fixedTarget;
+<a name="line448">448: </a>    dvdh->mode = mode;
+<a name="line449">449: </a>    <font color="#4169E1">if</font> (fixedTarget) dvd_harm_transf(dvdh, t);
+<a name="line450">450: </a>    d->calcpairs_W_data = dvdh;
+<a name="line451">451: </a>    d->calcpairs_W = dvd_harm_updateW;
+<a name="line452">452: </a>    d->calcpairs_proj_trans = dvd_harm_proj;
+<a name="line453">453: </a>    d->calcpairs_eigs_trans = dvd_harm_eigs_trans;
+<a name="line454">454: </a>    d->calcpairs_eig_backtrans = dvd_harm_eig_backtrans;
+
+<a name="line456">456: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_harm_d);
 <a name="line457">457: </a>  }
-<a name="line458">458: </a>  <font color="#B22222">/* Left part */</font>
-<a name="line459">459: </a>  <font color="#4169E1">for</font> (i=l0;i<l;i++) {
-<a name="line460">460: </a>    <font color="#4169E1">for</font> (j=l;j<k;j++) {
-<a name="line461">461: </a>      h = H[ld*i+j];
-<a name="line462">462: </a>      g = G[ld*i+j];
-<a name="line463">463: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
-<a name="line464">464: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
-<a name="line465">465: </a>    }
-<a name="line466">466: </a>  }
-<a name="line467">467: </a>  MatDenseRestoreArray(d->H,&H);
-<a name="line468">468: </a>  MatDenseRestoreArray(d->G,&G);
-<a name="line469">469: </a>  <font color="#4169E1">return</font>(0);
-<a name="line470">470: </a>}
-
-<a name="line474">474: </a><strong><font color="#4169E1"><a name="dvd_harm_updateproj"></a>PetscErrorCode dvd_harm_updateproj(dvdDashboard *d)</font></strong>
-<a name="line475">475: </a>{
-<a name="line477">477: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
-<a name="line478">478: </a>  PetscInt       i,j,l,k,ld;
-<a name="line479">479: </a>  PetscScalar    h,g,*H,*G;
-
-<a name="line482">482: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
-<a name="line483">483: </a>  k = l + d->V_tra_s;
-<a name="line484">484: </a>  MatGetSize(d->H,&ld,NULL);
-<a name="line485">485: </a>  MatDenseGetArray(d->H,&H);
-<a name="line486">486: </a>  MatDenseGetArray(d->G,&G);
-<a name="line487">487: </a>  <font color="#B22222">/* [H G] <- [Pa*H - Pb*G, Wa*H - Wb*G] */</font>
-<a name="line488">488: </a>  <font color="#B22222">/* Right part */</font>
-<a name="line489">489: </a>  <font color="#4169E1">for</font> (i=l;i<k;i++) {
-<a name="line490">490: </a>    <font color="#4169E1">for</font> (j=0;j<l;j++) {
-<a name="line491">491: </a>      h = H[ld*i+j];
-<a name="line492">492: </a>      g = G[ld*i+j];
-<a name="line493">493: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
-<a name="line494">494: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
-<a name="line495">495: </a>    }
-<a name="line496">496: </a>  }
-<a name="line497">497: </a>  <font color="#B22222">/* Lower triangular part */</font>
-<a name="line498">498: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) {
-<a name="line499">499: </a>    <font color="#4169E1">for</font> (j=l;j<k;j++) {
-<a name="line500">500: </a>      h = H[ld*i+j];
-<a name="line501">501: </a>      g = G[ld*i+j];
-<a name="line502">502: </a>      H[ld*i+j] = data->Pa*h - data->Pb*g;
-<a name="line503">503: </a>      G[ld*i+j] = data->Wa*h - data->Wb*g;
-<a name="line504">504: </a>    }
-<a name="line505">505: </a>  }
-<a name="line506">506: </a>  MatDenseRestoreArray(d->H,&H);
-<a name="line507">507: </a>  MatDenseRestoreArray(d->G,&G);
-<a name="line508">508: </a>  <font color="#4169E1">return</font>(0);
-<a name="line509">509: </a>}
-
-<a name="line513">513: </a><strong><font color="#4169E1"><a name="dvd_harm_backtrans"></a>static PetscErrorCode dvd_harm_backtrans(dvdHarmonic *data,PetscScalar *ar,PetscScalar *ai)</font></strong>
-<a name="line514">514: </a>{
-<a name="line515">515: </a>  PetscScalar xr;
-<a name="line516">516: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line517">517: </a>  PetscScalar xi, k;
-<a name="line518">518: </a><font color="#A020F0">#endif</font>
-
-<a name="line522">522: </a>  xr = *ar;
-<a name="line523">523: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line525">525: </a>  xi = *ai;
-
-<a name="line527">527: </a>  <font color="#4169E1">if</font> (xi != 0.0) {
-<a name="line528">528: </a>    k = (data->Pa - data->Wa*xr)*(data->Pa - data->Wa*xr) + data->Wa*data->Wa*xi*xi;
-<a name="line529">529: </a>    *ar = (data->Pb*data->Pa - (data->Pb*data->Wa + data->Wb*data->Pa)*xr + data->Wb*data->Wa*(xr*xr + xi*xi))/k;
-<a name="line530">530: </a>    *ai = (data->Pb*data->Wa - data->Wb*data->Pa)*xi/k;
-<a name="line531">531: </a>  } <font color="#4169E1">else</font>
-<a name="line532">532: </a><font color="#A020F0">#endif</font>
-<a name="line533">533: </a>    *ar = (data->Pb - data->Wb*xr) / (data->Pa - data->Wa*xr);
-<a name="line534">534: </a>  <font color="#4169E1">return</font>(0);
-<a name="line535">535: </a>}
-
-<a name="line539">539: </a><strong><font color="#4169E1"><a name="dvd_harm_eig_backtrans"></a>static PetscErrorCode dvd_harm_eig_backtrans(dvdDashboard *d,PetscScalar ar,PetscScalar ai,PetscScalar *br,PetscScalar *bi)</font></strong>
-<a name="line540">540: </a>{
-<a name="line541">541: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
-
-<a name="line545">545: </a>  dvd_harm_backtrans(data,&ar,&ai);
-<a name="line546">546: </a>  *br = ar;
-<a name="line547">547: </a>  *bi = ai;
-<a name="line548">548: </a>  <font color="#4169E1">return</font>(0);
-<a name="line549">549: </a>}
-
-<a name="line553">553: </a><strong><font color="#4169E1"><a name="dvd_harm_eigs_trans"></a>static PetscErrorCode dvd_harm_eigs_trans(dvdDashboard *d)</font></strong>
-<a name="line554">554: </a>{
-<a name="line555">555: </a>  dvdHarmonic    *data = (dvdHarmonic*)d->calcpairs_W_data;
-<a name="line556">556: </a>  PetscInt       i,l,k;
-
-<a name="line560">560: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(d->eps->V,&l,&k);
-<a name="line561">561: </a>  <font color="#4169E1">for</font> (i=0;i<k-l;i++) {
-<a name="line562">562: </a>    dvd_harm_backtrans(data,&d->eigr[i],&d->eigi[i]);
-<a name="line563">563: </a>  }
-<a name="line564">564: </a>  <font color="#4169E1">return</font>(0);
-<a name="line565">565: </a>}
-
-<a name="line569">569: </a><strong><font color="#4169E1"><a name="dvd_harm_conf"></a>PetscErrorCode dvd_harm_conf(dvdDashboard *d,dvdBlackboard *b,HarmType_t mode,PetscBool fixedTarget,PetscScalar t)</font></strong>
-<a name="line570">570: </a>{
-<a name="line572">572: </a>  dvdHarmonic    *dvdh;
-
-<a name="line575">575: </a>  <font color="#B22222">/* Set the problem to GNHEP:</font>
-<a name="line576">576: </a><font color="#B22222">     d->G maybe is upper triangular due to biorthogonality of V and W */</font>
-<a name="line577">577: </a>  d->sEP = d->sA = d->sB = 0;
-
-<a name="line579">579: </a>  <font color="#B22222">/* Setup the step */</font>
-<a name="line580">580: </a>  <font color="#4169E1">if</font> (b->state >= DVD_STATE_CONF) {
-<a name="line581">581: </a>    PetscNewLog(d->eps,&dvdh);
-<a name="line582">582: </a>    dvdh->withTarget = fixedTarget;
-<a name="line583">583: </a>    dvdh->mode = mode;
-<a name="line584">584: </a>    <font color="#4169E1">if</font> (fixedTarget) dvd_harm_transf(dvdh, t);
-<a name="line585">585: </a>    d->calcpairs_W_data = dvdh;
-<a name="line586">586: </a>    d->calcpairs_W = dvd_harm_updateW;
-<a name="line587">587: </a>    d->calcpairs_proj_trans = dvd_harm_proj;
-<a name="line588">588: </a>    d->calcpairs_eigs_trans = dvd_harm_eigs_trans;
-<a name="line589">589: </a>    d->calcpairs_eig_backtrans = dvd_harm_eig_backtrans;
-
-<a name="line591">591: </a>    EPSDavidsonFLAdd(&d->destroyList,dvd_harm_d);
-<a name="line592">592: </a>  }
-<a name="line593">593: </a>  <font color="#4169E1">return</font>(0);
-<a name="line594">594: </a>}
-
-<a name="line598">598: </a><font color="#B22222">/*</font>
-<a name="line599">599: </a><font color="#B22222">   H = [H              Y(old)'*X(new);</font>
-<a name="line600">600: </a><font color="#B22222">        Y(new)'*X(old) Y(new)'*X(new) ],</font>
-<a name="line601">601: </a><font color="#B22222">     being old=0:l-1, new=l:k-1</font>
-<a name="line602">602: </a><font color="#B22222"> */</font>
-<a name="line603">603: </a><strong><font color="#4169E1"><a name="BVMultS"></a>PetscErrorCode BVMultS(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *H,PetscInt ldh)</font></strong>
-<a name="line604">604: </a>{
-<a name="line606">606: </a>  PetscInt       j,lx,ly,kx,ky;
-<a name="line607">607: </a>  PetscScalar    *array;
-<a name="line608">608: </a>  Mat            M;
-
-<a name="line611">611: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(X,&lx,&kx);
-<a name="line612">612: </a>  <a href="../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(Y,&ly,&ky);
-<a name="line613">613: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ky,kx,NULL,&M);
-<a name="line614">614: </a>  <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(X,NULL,Y,M);
-<a name="line615">615: </a>  MatDenseGetArray(M,&array);
-<a name="line616">616: </a>  <font color="#B22222">/* upper part */</font>
-<a name="line617">617: </a>  <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
-<a name="line618">618: </a>    PetscMemcpy(&H[ldh*j],&array[j*ky],ly*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line619">619: </a>  }
-<a name="line620">620: </a>  <font color="#B22222">/* lower part */</font>
-<a name="line621">621: </a>  <font color="#4169E1">for</font> (j=0;j<kx;j++) {
-<a name="line622">622: </a>    PetscMemcpy(&H[ldh*j+ly],&array[j*ky+ly],(ky-ly)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line623">623: </a>  }
-<a name="line624">624: </a>  MatDenseRestoreArray(M,&array);
-<a name="line625">625: </a>  MatDestroy(&M);
-<a name="line626">626: </a>  <font color="#4169E1">return</font>(0);
-<a name="line627">627: </a>}
+<a name="line458">458: </a>  <font color="#4169E1">return</font>(0);
+<a name="line459">459: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/davidson/gd/ftn-auto/gdf.c b/src/eps/impls/davidson/gd/ftn-auto/gdf.c
index 782562f..1d213df 100644
--- a/src/eps/impls/davidson/gd/ftn-auto/gdf.c
+++ b/src/eps/impls/davidson/gd/ftn-auto/gdf.c
@@ -152,13 +152,13 @@ PETSC_EXTERN void PETSC_STDCALL  epsgdsetwindowsizes_(EPS eps,PetscInt *pwindow,
 *__ierr = EPSGDSetWindowSizes(
 	(EPS)PetscToPointer((eps) ),*pwindow,*qwindow);
 }
-PETSC_EXTERN void PETSC_STDCALL  epsgdgetdoubleexpansion_(EPS eps,PetscBool *flg, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  epsgdgetdoubleexpansion_(EPS eps,PetscBool *doubleexp, int *__ierr ){
 *__ierr = EPSGDGetDoubleExpansion(
-	(EPS)PetscToPointer((eps) ),flg);
+	(EPS)PetscToPointer((eps) ),doubleexp);
 }
-PETSC_EXTERN void PETSC_STDCALL  epsgdsetdoubleexpansion_(EPS eps,PetscBool *use_gd2, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  epsgdsetdoubleexpansion_(EPS eps,PetscBool *doubleexp, int *__ierr ){
 *__ierr = EPSGDSetDoubleExpansion(
-	(EPS)PetscToPointer((eps) ),*use_gd2);
+	(EPS)PetscToPointer((eps) ),*doubleexp);
 }
 #if defined(__cplusplus)
 }
diff --git a/src/eps/impls/davidson/gd/gd.c b/src/eps/impls/davidson/gd/gd.c
index f6b96a2..0f0d31b 100644
--- a/src/eps/impls/davidson/gd/gd.c
+++ b/src/eps/impls/davidson/gd/gd.c
@@ -20,7 +20,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -43,7 +43,7 @@
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_GD"
-PetscErrorCode EPSSetFromOptions_GD(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_GD(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   PetscBool      flg,op;
@@ -128,6 +128,43 @@ PetscErrorCode EPSSetUp_GD(EPS eps)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "EPSView_GD"
+PetscErrorCode EPSView_GD(EPS eps,PetscViewer viewer)
+{
+  PetscErrorCode ierr;
+  PetscBool      isascii,opb;
+  PetscInt       opi,opi0;
+  PetscBool      borth;
+  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (data->doubleexp) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  GD: using double expansion variant (GD2)\n");CHKERRQ(ierr);
+    }
+    ierr = EPSXDGetBOrth_XD(eps,&borth);CHKERRQ(ierr);
+    if (borth) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  GD: search subspace is B-orthogonalized\n");CHKERRQ(ierr);
+    } else {
+      ierr = PetscViewerASCIIPrintf(viewer,"  GD: search subspace is orthogonalized\n");CHKERRQ(ierr);
+    }
+    ierr = EPSXDGetBlockSize_XD(eps,&opi);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  GD: block size=%D\n",opi);CHKERRQ(ierr);
+    ierr = EPSXDGetKrylovStart_XD(eps,&opb);CHKERRQ(ierr);
+    if (!opb) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  GD: type of the initial subspace: non-Krylov\n");CHKERRQ(ierr);
+    } else {
+      ierr = PetscViewerASCIIPrintf(viewer,"  GD: type of the initial subspace: Krylov\n");CHKERRQ(ierr);
+    }
+    ierr = EPSXDGetRestart_XD(eps,&opi,&opi0);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  GD: size of the subspace after restarting: %D\n",opi);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  GD: number of vectors after restarting from the previous iteration: %D\n",opi0);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSDestroy_GD"
 PetscErrorCode EPSDestroy_GD(EPS eps)
 {
@@ -209,7 +246,7 @@ PetscErrorCode EPSGDGetKrylovStart(EPS eps,PetscBool *krylovstart)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(krylovstart,2);
-  ierr = PetscTryMethod(eps,"EPSGDGetKrylovStart_C",(EPS,PetscBool*),(eps,krylovstart));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSGDGetKrylovStart_C",(EPS,PetscBool*),(eps,krylovstart));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -268,7 +305,7 @@ PetscErrorCode EPSGDGetBlockSize(EPS eps,PetscInt *blocksize)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidIntPointer(blocksize,2);
-  ierr = PetscTryMethod(eps,"EPSGDGetBlockSize_C",(EPS,PetscInt*),(eps,blocksize));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSGDGetBlockSize_C",(EPS,PetscInt*),(eps,blocksize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -297,7 +334,7 @@ PetscErrorCode EPSGDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSGDGetRestart_C",(EPS,PetscInt*,PetscInt*),(eps,minv,plusk));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSGDGetRestart_C",(EPS,PetscInt*,PetscInt*),(eps,minv,plusk));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -366,7 +403,7 @@ PetscErrorCode EPSGDGetInitialSize(EPS eps,PetscInt *initialsize)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidIntPointer(initialsize,2);
-  ierr = PetscTryMethod(eps,"EPSGDGetInitialSize_C",(EPS,PetscInt*),(eps,initialsize));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSGDGetInitialSize_C",(EPS,PetscInt*),(eps,initialsize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -462,7 +499,7 @@ PetscErrorCode EPSGDGetBOrth(EPS eps,PetscBool *borth)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(borth,2);
-  ierr = PetscTryMethod(eps,"EPSGDGetBOrth_C",(EPS,PetscBool*),(eps,borth));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSGDGetBOrth_C",(EPS,PetscBool*),(eps,borth));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -492,7 +529,7 @@ PetscErrorCode EPSGDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSGDGetWindowSizes_C",(EPS,PetscInt*,PetscInt*),(eps,pwindow,qwindow));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSGDGetWindowSizes_C",(EPS,PetscInt*,PetscInt*),(eps,pwindow,qwindow));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -531,27 +568,13 @@ PetscErrorCode EPSGDSetWindowSizes(EPS eps,PetscInt pwindow,PetscInt qwindow)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "EPSGDSetDoubleExpansion_GD"
-static PetscErrorCode EPSGDSetDoubleExpansion_GD(EPS eps,PetscBool use_gd2)
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  ierr = EPSXDSetMethod(eps,use_gd2?DVD_METH_GD2:DVD_METH_GD);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "EPSGDGetDoubleExpansion_GD"
-static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *flg)
+static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *doubleexp)
 {
-  Method_t       meth;
-  PetscErrorCode ierr;
+  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
   PetscFunctionBegin;
-  ierr = EPSXDGetMethod_XD(eps,&meth);CHKERRQ(ierr);
-  if (meth==DVD_METH_GD2) *flg = PETSC_TRUE;
-  else *flg = PETSC_FALSE;
+  *doubleexp = data->doubleexp;
   PetscFunctionReturn(0);
 }
 
@@ -567,20 +590,31 @@ static PetscErrorCode EPSGDGetDoubleExpansion_GD(EPS eps,PetscBool *flg)
 .  eps - the eigenproblem solver context
 
    Output Parameter:
-.  flg - the flag
+.  doubleexp - the flag
 
    Level: advanced
 
 .seealso: EPSGDSetDoubleExpansion()
 @*/
-PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *flg)
+PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *doubleexp)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  PetscValidPointer(flg,2);
-  ierr = PetscTryMethod(eps,"EPSGDGetDoubleExpansion_C",(EPS,PetscBool*),(eps,flg));CHKERRQ(ierr);
+  PetscValidPointer(doubleexp,2);
+  ierr = PetscUseMethod(eps,"EPSGDGetDoubleExpansion_C",(EPS,PetscBool*),(eps,doubleexp));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSGDSetDoubleExpansion_GD"
+static PetscErrorCode EPSGDSetDoubleExpansion_GD(EPS eps,PetscBool doubleexp)
+{
+  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+  PetscFunctionBegin;
+  data->doubleexp = doubleexp;
   PetscFunctionReturn(0);
 }
 
@@ -596,21 +630,21 @@ PetscErrorCode EPSGDGetDoubleExpansion(EPS eps,PetscBool *flg)
 
    Input Parameters:
 +  eps - the eigenproblem solver context
--  use_gd2 - the boolean flag
+-  doubleexp - the boolean flag
 
    Options Database Keys:
 .  -eps_gd_double_expansion - activate the double-expansion variant of GD
 
    Level: advanced
 @*/
-PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool use_gd2)
+PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool doubleexp)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  PetscValidLogicalCollectiveBool(eps,use_gd2,2);
-  ierr = PetscTryMethod(eps,"EPSGDSetDoubleExpansion_C",(EPS,PetscBool),(eps,use_gd2));CHKERRQ(ierr);
+  PetscValidLogicalCollectiveBool(eps,doubleexp,2);
+  ierr = PetscTryMethod(eps,"EPSGDSetDoubleExpansion_C",(EPS,PetscBool),(eps,doubleexp));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -619,17 +653,32 @@ PetscErrorCode EPSGDSetDoubleExpansion(EPS eps,PetscBool use_gd2)
 PETSC_EXTERN PetscErrorCode EPSCreate_GD(EPS eps)
 {
   PetscErrorCode  ierr;
+  EPS_DAVIDSON    *data;
 
   PetscFunctionBegin;
-  /* Load the Davidson solver */
-  ierr = EPSCreate_XD(eps);CHKERRQ(ierr);
-  ierr = EPSJDSetFix_JD(eps,0.0);CHKERRQ(ierr);
-  ierr = EPSXDSetMethod(eps,DVD_METH_GD);CHKERRQ(ierr);
-
-  /* Overload the GD properties */
-  eps->ops->setfromoptions       = EPSSetFromOptions_GD;
-  eps->ops->setup                = EPSSetUp_GD;
-  eps->ops->destroy              = EPSDestroy_GD;
+  ierr = PetscNewLog(eps,&data);CHKERRQ(ierr);
+  eps->data = (void*)data;
+
+  data->blocksize   = 1;
+  data->initialsize = 6;
+  data->minv        = 6;
+  data->plusk       = 0;
+  data->ipB         = PETSC_TRUE;
+  data->fix         = 0.0;
+  data->krylovstart = PETSC_FALSE;
+  data->dynamic     = PETSC_FALSE;
+  data->cX_in_proj  = 0;
+  data->cX_in_impr  = 0;
+
+  eps->ops->solve          = EPSSolve_XD;
+  eps->ops->setup          = EPSSetUp_XD;
+  eps->ops->reset          = EPSReset_XD;
+  eps->ops->backtransform  = EPSBackTransform_Default;
+  eps->ops->computevectors = EPSComputeVectors_XD;
+  eps->ops->view           = EPSView_GD;
+  eps->ops->setfromoptions = EPSSetFromOptions_GD;
+  eps->ops->setup          = EPSSetUp_GD;
+  eps->ops->destroy        = EPSDestroy_GD;
 
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSGDSetKrylovStart_C",EPSXDSetKrylovStart_XD);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSGDGetKrylovStart_C",EPSXDGetKrylovStart_XD);CHKERRQ(ierr);
diff --git a/src/eps/impls/davidson/gd/gd.c.html b/src/eps/impls/davidson/gd/gd.c.html
index e0fc361..5bf7ee7 100644
--- a/src/eps/impls/davidson/gd/gd.c.html
+++ b/src/eps/impls/davidson/gd/gd.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/gd/gd.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:08+00:00">
+<meta name="date" content="2016-05-16T10:33:04+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/gd/gd.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/gd/gd.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "gd"</font>
@@ -32,7 +32,7 @@
 
 <a name="line21"> 21: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line22"> 22: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line23"> 23: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line23"> 23: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line25"> 25: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,7 +53,7 @@
 <a name="line41"> 41: </a><font color="#A020F0">#include <slepc/private/epsimpl.h>                </font><font color="#B22222">/*I "slepceps.h" I*/</font><font color="#A020F0"></font>
 <a name="line42"> 42: </a><font color="#A020F0">#include <../src/eps/impls/davidson/davidson.h></font>
 
-<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_GD"></a>PetscErrorCode EPSSetFromOptions_GD(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_GD"></a>PetscErrorCode EPSSetFromOptions_GD(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
 <a name="line47"> 47: </a>{
 <a name="line49"> 49: </a>  PetscBool      flg,op;
 <a name="line50"> 50: </a>  PetscInt       opi,opi0;
@@ -131,215 +131,217 @@
 <a name="line127">127: </a>  <font color="#4169E1">return</font>(0);
 <a name="line128">128: </a>}
 
-<a name="line132">132: </a><strong><font color="#4169E1"><a name="EPSDestroy_GD"></a>PetscErrorCode EPSDestroy_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line132">132: </a><strong><font color="#4169E1"><a name="EPSView_GD"></a>PetscErrorCode EPSView_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
 <a name="line133">133: </a>{
-<a name="line134">134: </a>  PetscErrorCode  ierr;
+<a name="line135">135: </a>  PetscBool      isascii,opb;
+<a name="line136">136: </a>  PetscInt       opi,opi0;
+<a name="line137">137: </a>  PetscBool      borth;
+<a name="line138">138: </a>  EPS_DAVIDSON   *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line141">141: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line142">142: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line143">143: </a>    <font color="#4169E1">if</font> (data->doubleexp) {
+<a name="line144">144: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: using double expansion variant (GD2)\n"</font>);
+<a name="line145">145: </a>    }
+<a name="line146">146: </a>    EPSXDGetBOrth_XD(eps,&borth);
+<a name="line147">147: </a>    <font color="#4169E1">if</font> (borth) {
+<a name="line148">148: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: search subspace is B-orthogonalized\n"</font>);
+<a name="line149">149: </a>    } <font color="#4169E1">else</font> {
+<a name="line150">150: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: search subspace is orthogonalized\n"</font>);
+<a name="line151">151: </a>    }
+<a name="line152">152: </a>    EPSXDGetBlockSize_XD(eps,&opi);
+<a name="line153">153: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: block size=%D\n"</font>,opi);
+<a name="line154">154: </a>    EPSXDGetKrylovStart_XD(eps,&opb);
+<a name="line155">155: </a>    <font color="#4169E1">if</font> (!opb) {
+<a name="line156">156: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: type of the initial subspace: non-Krylov\n"</font>);
+<a name="line157">157: </a>    } <font color="#4169E1">else</font> {
+<a name="line158">158: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: type of the initial subspace: Krylov\n"</font>);
+<a name="line159">159: </a>    }
+<a name="line160">160: </a>    EPSXDGetRestart_XD(eps,&opi,&opi0);
+<a name="line161">161: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: size of the subspace after restarting: %D\n"</font>,opi);
+<a name="line162">162: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  GD: number of vectors after restarting from the previous iteration: %D\n"</font>,opi0);
+<a name="line163">163: </a>  }
+<a name="line164">164: </a>  <font color="#4169E1">return</font>(0);
+<a name="line165">165: </a>}
+
+<a name="line169">169: </a><strong><font color="#4169E1"><a name="EPSDestroy_GD"></a>PetscErrorCode EPSDestroy_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line170">170: </a>{
+<a name="line171">171: </a>  PetscErrorCode  ierr;
+
+<a name="line174">174: </a>  PetscFree(eps->data);
+<a name="line175">175: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetKrylovStart_C"</font>,NULL);
+<a name="line176">176: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetKrylovStart_C"</font>,NULL);
+<a name="line177">177: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBOrth_C"</font>,NULL);
+<a name="line178">178: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBOrth_C"</font>,NULL);
+<a name="line179">179: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBlockSize_C"</font>,NULL);
+<a name="line180">180: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBlockSize_C"</font>,NULL);
+<a name="line181">181: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetRestart_C"</font>,NULL);
+<a name="line182">182: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetRestart_C"</font>,NULL);
+<a name="line183">183: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetInitialSize_C"</font>,NULL);
+<a name="line184">184: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetInitialSize_C"</font>,NULL);
+<a name="line185">185: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetWindowSizes_C"</font>,NULL);
+<a name="line186">186: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetWindowSizes_C"</font>,NULL);
+<a name="line187">187: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetDoubleExpansion_C"</font>,NULL);
+<a name="line188">188: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetDoubleExpansion_C"</font>,NULL);
+<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
+<a name="line190">190: </a>}
+
+<a name="line194">194: </a><font color="#B22222">/*@</font>
+<a name="line195">195: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a> - Activates or deactivates starting the searching</font>
+<a name="line196">196: </a><font color="#B22222">   subspace with a Krylov basis.</font>
+
+<a name="line198">198: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line200">200: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line201">201: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line202">202: </a><font color="#B22222">-  krylovstart - boolean flag</font>
+
+<a name="line204">204: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line205">205: </a><font color="#B22222">.  -eps_gd_krylov_start - Activates starting the searching subspace with a</font>
+<a name="line206">206: </a><font color="#B22222">    Krylov basis</font>
+
+<a name="line208">208: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line210">210: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
+<a name="line211">211: </a><font color="#B22222">@*/</font>
+<a name="line212">212: </a><strong><font color="#4169E1"><a name="EPSGDSetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool krylovstart)</font></strong>
+<a name="line213">213: </a>{
+
+<a name="line219">219: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,krylovstart));
+<a name="line220">220: </a>  <font color="#4169E1">return</font>(0);
+<a name="line221">221: </a>}
+
+<a name="line225">225: </a><font color="#B22222">/*@</font>
+<a name="line226">226: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a> - Returns a flag indicating if the search subspace is started with a</font>
+<a name="line227">227: </a><font color="#B22222">   Krylov basis.</font>
+
+<a name="line229">229: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line231">231: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line232">232: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line234">234: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line235">235: </a><font color="#B22222">.  krylovstart - boolean flag indicating if the search subspace is started</font>
+<a name="line236">236: </a><font color="#B22222">   with a Krylov basis</font>
+
+<a name="line238">238: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line240">240: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
+<a name="line241">241: </a><font color="#B22222">@*/</font>
+<a name="line242">242: </a><strong><font color="#4169E1"><a name="EPSGDGetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *krylovstart)</font></strong>
+<a name="line243">243: </a>{
+
+<a name="line249">249: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,krylovstart));
+<a name="line250">250: </a>  <font color="#4169E1">return</font>(0);
+<a name="line251">251: </a>}
+
+<a name="line255">255: </a><font color="#B22222">/*@</font>
+<a name="line256">256: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a> - Sets the number of vectors to be added to the searching space</font>
+<a name="line257">257: </a><font color="#B22222">   in every iteration.</font>
+
+<a name="line259">259: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line261">261: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line262">262: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line263">263: </a><font color="#B22222">-  blocksize - number of vectors added to the search space in every iteration</font>
+
+<a name="line265">265: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line266">266: </a><font color="#B22222">.  -eps_gd_blocksize - number of vectors added to the search space in every iteration</font>
+
+<a name="line268">268: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line270">270: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a>()</font>
+<a name="line271">271: </a><font color="#B22222">@*/</font>
+<a name="line272">272: </a><strong><font color="#4169E1"><a name="EPSGDSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt blocksize)</font></strong>
+<a name="line273">273: </a>{
 
-<a name="line137">137: </a>  PetscFree(eps->data);
-<a name="line138">138: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetKrylovStart_C"</font>,NULL);
-<a name="line139">139: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetKrylovStart_C"</font>,NULL);
-<a name="line140">140: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBOrth_C"</font>,NULL);
-<a name="line141">141: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBOrth_C"</font>,NULL);
-<a name="line142">142: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBlockSize_C"</font>,NULL);
-<a name="line143">143: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBlockSize_C"</font>,NULL);
-<a name="line144">144: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetRestart_C"</font>,NULL);
-<a name="line145">145: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetRestart_C"</font>,NULL);
-<a name="line146">146: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetInitialSize_C"</font>,NULL);
-<a name="line147">147: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetInitialSize_C"</font>,NULL);
-<a name="line148">148: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetWindowSizes_C"</font>,NULL);
-<a name="line149">149: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetWindowSizes_C"</font>,NULL);
-<a name="line150">150: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetDoubleExpansion_C"</font>,NULL);
-<a name="line151">151: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetDoubleExpansion_C"</font>,NULL);
-<a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
-<a name="line153">153: </a>}
+<a name="line279">279: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,blocksize));
+<a name="line280">280: </a>  <font color="#4169E1">return</font>(0);
+<a name="line281">281: </a>}
 
-<a name="line157">157: </a><font color="#B22222">/*@</font>
-<a name="line158">158: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a> - Activates or deactivates starting the searching</font>
-<a name="line159">159: </a><font color="#B22222">   subspace with a Krylov basis.</font>
+<a name="line285">285: </a><font color="#B22222">/*@</font>
+<a name="line286">286: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</a> - Returns the number of vectors to be added to the searching space</font>
+<a name="line287">287: </a><font color="#B22222">   in every iteration.</font>
 
-<a name="line161">161: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line289">289: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line163">163: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line164">164: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line165">165: </a><font color="#B22222">-  krylovstart - boolean flag</font>
+<a name="line291">291: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line292">292: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line167">167: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line168">168: </a><font color="#B22222">.  -eps_gd_krylov_start - Activates starting the searching subspace with a</font>
-<a name="line169">169: </a><font color="#B22222">    Krylov basis</font>
+<a name="line294">294: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line295">295: </a><font color="#B22222">.  blocksize - number of vectors added to the search space in every iteration</font>
 
-<a name="line171">171: </a><font color="#B22222">   Level: advanced</font>
+<a name="line297">297: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line173">173: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
-<a name="line174">174: </a><font color="#B22222">@*/</font>
-<a name="line175">175: </a><strong><font color="#4169E1"><a name="EPSGDSetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool krylovstart)</font></strong>
-<a name="line176">176: </a>{
+<a name="line299">299: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a>()</font>
+<a name="line300">300: </a><font color="#B22222">@*/</font>
+<a name="line301">301: </a><strong><font color="#4169E1"><a name="EPSGDGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *blocksize)</font></strong>
+<a name="line302">302: </a>{
 
-<a name="line182">182: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,krylovstart));
-<a name="line183">183: </a>  <font color="#4169E1">return</font>(0);
-<a name="line184">184: </a>}
+<a name="line308">308: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,blocksize));
+<a name="line309">309: </a>  <font color="#4169E1">return</font>(0);
+<a name="line310">310: </a>}
 
-<a name="line188">188: </a><font color="#B22222">/*@</font>
-<a name="line189">189: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a> - Returns a flag indicating if the search subspace is started with a</font>
-<a name="line190">190: </a><font color="#B22222">   Krylov basis.</font>
+<a name="line314">314: </a><font color="#B22222">/*@</font>
+<a name="line315">315: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</a> - Gets the number of vectors of the searching space after</font>
+<a name="line316">316: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
 
-<a name="line192">192: </a><font color="#B22222">   Not Collective</font>
+<a name="line318">318: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line194">194: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line195">195: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line320">320: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line321">321: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line197">197: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line198">198: </a><font color="#B22222">.  krylovstart - boolean flag indicating if the search subspace is started</font>
-<a name="line199">199: </a><font color="#B22222">   with a Krylov basis</font>
+<a name="line323">323: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line324">324: </a><font color="#B22222">+  minv - number of vectors of the searching subspace after restarting</font>
+<a name="line325">325: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
 
-<a name="line201">201: </a><font color="#B22222">   Level: advanced</font>
+<a name="line327">327: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line203">203: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
-<a name="line204">204: </a><font color="#B22222">@*/</font>
-<a name="line205">205: </a><strong><font color="#4169E1"><a name="EPSGDGetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *krylovstart)</font></strong>
-<a name="line206">206: </a>{
+<a name="line329">329: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>()</font>
+<a name="line330">330: </a><font color="#B22222">@*/</font>
+<a name="line331">331: </a><strong><font color="#4169E1"><a name="EPSGDGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *minv,PetscInt *plusk)</font></strong>
+<a name="line332">332: </a>{
 
-<a name="line212">212: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,krylovstart));
-<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
-<a name="line214">214: </a>}
+<a name="line337">337: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,minv,plusk));
+<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
+<a name="line339">339: </a>}
 
-<a name="line218">218: </a><font color="#B22222">/*@</font>
-<a name="line219">219: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a> - Sets the number of vectors to be added to the searching space</font>
-<a name="line220">220: </a><font color="#B22222">   in every iteration.</font>
+<a name="line343">343: </a><font color="#B22222">/*@</font>
+<a name="line344">344: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a> - Sets the number of vectors of the searching space after</font>
+<a name="line345">345: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
 
-<a name="line222">222: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line347">347: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line224">224: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line225">225: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line226">226: </a><font color="#B22222">-  blocksize - number of vectors added to the search space in every iteration</font>
+<a name="line349">349: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line350">350: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line351">351: </a><font color="#B22222">.  minv - number of vectors of the searching subspace after restarting</font>
+<a name="line352">352: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
 
-<a name="line228">228: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line229">229: </a><font color="#B22222">.  -eps_gd_blocksize - number of vectors added to the search space in every iteration</font>
-
-<a name="line231">231: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line233">233: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetKrylovStart.html#EPSGDSetKrylovStart">EPSGDSetKrylovStart</a>()</font>
-<a name="line234">234: </a><font color="#B22222">@*/</font>
-<a name="line235">235: </a><strong><font color="#4169E1"><a name="EPSGDSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt blocksize)</font></strong>
-<a name="line236">236: </a>{
-
-<a name="line242">242: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,blocksize));
-<a name="line243">243: </a>  <font color="#4169E1">return</font>(0);
-<a name="line244">244: </a>}
-
-<a name="line248">248: </a><font color="#B22222">/*@</font>
-<a name="line249">249: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</a> - Returns the number of vectors to be added to the searching space</font>
-<a name="line250">250: </a><font color="#B22222">   in every iteration.</font>
-
-<a name="line252">252: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line254">254: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line255">255: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line257">257: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line258">258: </a><font color="#B22222">.  blocksize - number of vectors added to the search space in every iteration</font>
-
-<a name="line260">260: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line262">262: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetBlockSize.html#EPSGDSetBlockSize">EPSGDSetBlockSize</a>()</font>
-<a name="line263">263: </a><font color="#B22222">@*/</font>
-<a name="line264">264: </a><strong><font color="#4169E1"><a name="EPSGDGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetBlockSize.html#EPSGDGetBlockSize">EPSGDGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *blocksize)</font></strong>
-<a name="line265">265: </a>{
-
-<a name="line271">271: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,blocksize));
-<a name="line272">272: </a>  <font color="#4169E1">return</font>(0);
-<a name="line273">273: </a>}
-
-<a name="line277">277: </a><font color="#B22222">/*@</font>
-<a name="line278">278: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</a> - Gets the number of vectors of the searching space after</font>
-<a name="line279">279: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
-
-<a name="line281">281: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line283">283: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line284">284: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line286">286: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line287">287: </a><font color="#B22222">+  minv - number of vectors of the searching subspace after restarting</font>
-<a name="line288">288: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
-
-<a name="line290">290: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line292">292: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>()</font>
-<a name="line293">293: </a><font color="#B22222">@*/</font>
-<a name="line294">294: </a><strong><font color="#4169E1"><a name="EPSGDGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetRestart.html#EPSGDGetRestart">EPSGDGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *minv,PetscInt *plusk)</font></strong>
-<a name="line295">295: </a>{
-
-<a name="line300">300: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,minv,plusk));
-<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
-<a name="line302">302: </a>}
-
-<a name="line306">306: </a><font color="#B22222">/*@</font>
-<a name="line307">307: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a> - Sets the number of vectors of the searching space after</font>
-<a name="line308">308: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
-
-<a name="line310">310: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line312">312: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line313">313: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line314">314: </a><font color="#B22222">.  minv - number of vectors of the searching subspace after restarting</font>
-<a name="line315">315: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
-
-<a name="line317">317: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line318">318: </a><font color="#B22222">+  -eps_gd_minv - number of vectors of the searching subspace after restarting</font>
-<a name="line319">319: </a><font color="#B22222">-  -eps_gd_plusk - number of vectors saved from the previous iteration</font>
-
-<a name="line321">321: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line323">323: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>()</font>
-<a name="line324">324: </a><font color="#B22222">@*/</font>
-<a name="line325">325: </a><strong><font color="#4169E1"><a name="EPSGDSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt minv,PetscInt plusk)</font></strong>
-<a name="line326">326: </a>{
-
-<a name="line333">333: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,minv,plusk));
-<a name="line334">334: </a>  <font color="#4169E1">return</font>(0);
-<a name="line335">335: </a>}
-
-<a name="line339">339: </a><font color="#B22222">/*@</font>
-<a name="line340">340: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a> - Returns the initial size of the searching space.</font>
-
-<a name="line342">342: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line344">344: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line345">345: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line347">347: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line348">348: </a><font color="#B22222">.  initialsize - number of vectors of the initial searching subspace</font>
-
-<a name="line350">350: </a><font color="#B22222">   Notes:</font>
-<a name="line351">351: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
-<a name="line352">352: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(), up to initialsize vectors will be used; and if the</font>
-<a name="line353">353: </a><font color="#B22222">   provided vectors are not enough, the solver completes the subspace with</font>
-<a name="line354">354: </a><font color="#B22222">   random vectors. In the case of <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>() being PETSC_TRUE, the solver</font>
-<a name="line355">355: </a><font color="#B22222">   gets the first vector provided by the user or, if not available, a random vector,</font>
-<a name="line356">356: </a><font color="#B22222">   and expands the Krylov basis up to initialsize vectors.</font>
+<a name="line354">354: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line355">355: </a><font color="#B22222">+  -eps_gd_minv - number of vectors of the searching subspace after restarting</font>
+<a name="line356">356: </a><font color="#B22222">-  -eps_gd_plusk - number of vectors saved from the previous iteration</font>
 
 <a name="line358">358: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line360">360: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
+<a name="line360">360: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>()</font>
 <a name="line361">361: </a><font color="#B22222">@*/</font>
-<a name="line362">362: </a><strong><font color="#4169E1"><a name="EPSGDGetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *initialsize)</font></strong>
+<a name="line362">362: </a><strong><font color="#4169E1"><a name="EPSGDSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetRestart.html#EPSGDSetRestart">EPSGDSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt minv,PetscInt plusk)</font></strong>
 <a name="line363">363: </a>{
 
-<a name="line369">369: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,initialsize));
-<a name="line370">370: </a>  <font color="#4169E1">return</font>(0);
-<a name="line371">371: </a>}
+<a name="line370">370: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,minv,plusk));
+<a name="line371">371: </a>  <font color="#4169E1">return</font>(0);
+<a name="line372">372: </a>}
 
-<a name="line375">375: </a><font color="#B22222">/*@</font>
-<a name="line376">376: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a> - Sets the initial size of the searching space.</font>
+<a name="line376">376: </a><font color="#B22222">/*@</font>
+<a name="line377">377: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a> - Returns the initial size of the searching space.</font>
 
-<a name="line378">378: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line379">379: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line380">380: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line381">381: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line382">382: </a><font color="#B22222">-  initialsize - number of vectors of the initial searching subspace</font>
+<a name="line381">381: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line382">382: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line384">384: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line385">385: </a><font color="#B22222">.  -eps_gd_initial_size - number of vectors of the initial searching subspace</font>
+<a name="line384">384: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line385">385: </a><font color="#B22222">.  initialsize - number of vectors of the initial searching subspace</font>
 
 <a name="line387">387: </a><font color="#B22222">   Notes:</font>
 <a name="line388">388: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
@@ -351,209 +353,254 @@
 
 <a name="line395">395: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line397">397: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
+<a name="line397">397: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
 <a name="line398">398: </a><font color="#B22222">@*/</font>
-<a name="line399">399: </a><strong><font color="#4169E1"><a name="EPSGDSetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt initialsize)</font></strong>
+<a name="line399">399: </a><strong><font color="#4169E1"><a name="EPSGDGetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *initialsize)</font></strong>
 <a name="line400">400: </a>{
 
-<a name="line406">406: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,initialsize));
+<a name="line406">406: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,initialsize));
 <a name="line407">407: </a>  <font color="#4169E1">return</font>(0);
 <a name="line408">408: </a>}
 
 <a name="line412">412: </a><font color="#B22222">/*@</font>
-<a name="line413">413: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a> - Selects the orthogonalization that will be used in the search</font>
-<a name="line414">414: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
+<a name="line413">413: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a> - Sets the initial size of the searching space.</font>
+
+<a name="line415">415: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line417">417: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line418">418: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line419">419: </a><font color="#B22222">-  initialsize - number of vectors of the initial searching subspace</font>
+
+<a name="line421">421: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line422">422: </a><font color="#B22222">.  -eps_gd_initial_size - number of vectors of the initial searching subspace</font>
+
+<a name="line424">424: </a><font color="#B22222">   Notes:</font>
+<a name="line425">425: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
+<a name="line426">426: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(), up to initialsize vectors will be used; and if the</font>
+<a name="line427">427: </a><font color="#B22222">   provided vectors are not enough, the solver completes the subspace with</font>
+<a name="line428">428: </a><font color="#B22222">   random vectors. In the case of <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>() being PETSC_TRUE, the solver</font>
+<a name="line429">429: </a><font color="#B22222">   gets the first vector provided by the user or, if not available, a random vector,</font>
+<a name="line430">430: </a><font color="#B22222">   and expands the Krylov basis up to initialsize vectors.</font>
+
+<a name="line432">432: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line434">434: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetInitialSize.html#EPSGDGetInitialSize">EPSGDGetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSGDGetKrylovStart.html#EPSGDGetKrylovStart">EPSGDGetKrylovStart</a>()</font>
+<a name="line435">435: </a><font color="#B22222">@*/</font>
+<a name="line436">436: </a><strong><font color="#4169E1"><a name="EPSGDSetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetInitialSize.html#EPSGDSetInitialSize">EPSGDSetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt initialsize)</font></strong>
+<a name="line437">437: </a>{
 
-<a name="line416">416: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line443">443: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,initialsize));
+<a name="line444">444: </a>  <font color="#4169E1">return</font>(0);
+<a name="line445">445: </a>}
 
-<a name="line418">418: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line419">419: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
-<a name="line420">420: </a><font color="#B22222">-  borth - whether to B-orthogonalize the search subspace</font>
+<a name="line449">449: </a><font color="#B22222">/*@</font>
+<a name="line450">450: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a> - Selects the orthogonalization that will be used in the search</font>
+<a name="line451">451: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
 
-<a name="line422">422: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line423">423: </a><font color="#B22222">.  -eps_gd_borth - Set the orthogonalization used in the search subspace</font>
+<a name="line453">453: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line425">425: </a><font color="#B22222">   Level: advanced</font>
+<a name="line455">455: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line456">456: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
+<a name="line457">457: </a><font color="#B22222">-  borth - whether to B-orthogonalize the search subspace</font>
 
-<a name="line427">427: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a>()</font>
-<a name="line428">428: </a><font color="#B22222">@*/</font>
-<a name="line429">429: </a><strong><font color="#4169E1"><a name="EPSGDSetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool borth)</font></strong>
-<a name="line430">430: </a>{
+<a name="line459">459: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line460">460: </a><font color="#B22222">.  -eps_gd_borth - Set the orthogonalization used in the search subspace</font>
 
-<a name="line436">436: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,borth));
-<a name="line437">437: </a>  <font color="#4169E1">return</font>(0);
-<a name="line438">438: </a>}
+<a name="line462">462: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line442">442: </a><font color="#B22222">/*@</font>
-<a name="line443">443: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a> - Returns the orthogonalization used in the search</font>
-<a name="line444">444: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
+<a name="line464">464: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a>()</font>
+<a name="line465">465: </a><font color="#B22222">@*/</font>
+<a name="line466">466: </a><strong><font color="#4169E1"><a name="EPSGDSetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool borth)</font></strong>
+<a name="line467">467: </a>{
 
-<a name="line446">446: </a><font color="#B22222">   Not Collective</font>
+<a name="line473">473: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,borth));
+<a name="line474">474: </a>  <font color="#4169E1">return</font>(0);
+<a name="line475">475: </a>}
 
-<a name="line448">448: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line449">449: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line479">479: </a><font color="#B22222">/*@</font>
+<a name="line480">480: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a> - Returns the orthogonalization used in the search</font>
+<a name="line481">481: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
 
-<a name="line451">451: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line452">452: </a><font color="#B22222">.  borth - whether to B-orthogonalize the search subspace</font>
+<a name="line483">483: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line454">454: </a><font color="#B22222">   Level: advanced</font>
+<a name="line485">485: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line486">486: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line456">456: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a>()</font>
-<a name="line457">457: </a><font color="#B22222">@*/</font>
-<a name="line458">458: </a><strong><font color="#4169E1"><a name="EPSGDGetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *borth)</font></strong>
-<a name="line459">459: </a>{
+<a name="line488">488: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line489">489: </a><font color="#B22222">.  borth - whether to B-orthogonalize the search subspace</font>
 
-<a name="line465">465: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,borth));
-<a name="line466">466: </a>  <font color="#4169E1">return</font>(0);
-<a name="line467">467: </a>}
+<a name="line491">491: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line471">471: </a><font color="#B22222">/*@</font>
-<a name="line472">472: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a> - Gets the number of converged vectors in the projected</font>
-<a name="line473">473: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
-<a name="line474">474: </a><font color="#B22222">   equation.</font>
+<a name="line493">493: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetBOrth.html#EPSGDSetBOrth">EPSGDSetBOrth</a>()</font>
+<a name="line494">494: </a><font color="#B22222">@*/</font>
+<a name="line495">495: </a><strong><font color="#4169E1"><a name="EPSGDGetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetBOrth.html#EPSGDGetBOrth">EPSGDGetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *borth)</font></strong>
+<a name="line496">496: </a>{
 
-<a name="line476">476: </a><font color="#B22222">   Not Collective</font>
+<a name="line502">502: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,borth));
+<a name="line503">503: </a>  <font color="#4169E1">return</font>(0);
+<a name="line504">504: </a>}
 
-<a name="line478">478: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line479">479: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line508">508: </a><font color="#B22222">/*@</font>
+<a name="line509">509: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a> - Gets the number of converged vectors in the projected</font>
+<a name="line510">510: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
+<a name="line511">511: </a><font color="#B22222">   equation.</font>
 
-<a name="line481">481: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line482">482: </a><font color="#B22222">+  pwindow - number of converged vectors in the projector</font>
-<a name="line483">483: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
+<a name="line513">513: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line485">485: </a><font color="#B22222">   Level: advanced</font>
+<a name="line515">515: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line516">516: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line487">487: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a>()</font>
-<a name="line488">488: </a><font color="#B22222">@*/</font>
-<a name="line489">489: </a><strong><font color="#4169E1"><a name="EPSGDGetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *pwindow,PetscInt *qwindow)</font></strong>
-<a name="line490">490: </a>{
+<a name="line518">518: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line519">519: </a><font color="#B22222">+  pwindow - number of converged vectors in the projector</font>
+<a name="line520">520: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
 
-<a name="line495">495: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,pwindow,qwindow));
-<a name="line496">496: </a>  <font color="#4169E1">return</font>(0);
-<a name="line497">497: </a>}
+<a name="line522">522: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line501">501: </a><font color="#B22222">/*@</font>
-<a name="line502">502: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a> - Sets the number of converged vectors in the projected</font>
-<a name="line503">503: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
-<a name="line504">504: </a><font color="#B22222">   equation.</font>
+<a name="line524">524: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a>()</font>
+<a name="line525">525: </a><font color="#B22222">@*/</font>
+<a name="line526">526: </a><strong><font color="#4169E1"><a name="EPSGDGetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *pwindow,PetscInt *qwindow)</font></strong>
+<a name="line527">527: </a>{
 
-<a name="line506">506: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line532">532: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,pwindow,qwindow));
+<a name="line533">533: </a>  <font color="#4169E1">return</font>(0);
+<a name="line534">534: </a>}
 
-<a name="line508">508: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line509">509: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line510">510: </a><font color="#B22222">.  pwindow - number of converged vectors in the projector</font>
-<a name="line511">511: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
+<a name="line538">538: </a><font color="#B22222">/*@</font>
+<a name="line539">539: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a> - Sets the number of converged vectors in the projected</font>
+<a name="line540">540: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
+<a name="line541">541: </a><font color="#B22222">   equation.</font>
 
-<a name="line513">513: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line514">514: </a><font color="#B22222">+  -eps_gd_pwindow - set the number of converged vectors in the projector</font>
-<a name="line515">515: </a><font color="#B22222">-  -eps_gd_qwindow - set the number of converged vectors in the projected problem</font>
+<a name="line543">543: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line517">517: </a><font color="#B22222">   Level: advanced</font>
+<a name="line545">545: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line546">546: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line547">547: </a><font color="#B22222">.  pwindow - number of converged vectors in the projector</font>
+<a name="line548">548: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
 
-<a name="line519">519: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a>()</font>
-<a name="line520">520: </a><font color="#B22222">@*/</font>
-<a name="line521">521: </a><strong><font color="#4169E1"><a name="EPSGDSetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt pwindow,PetscInt qwindow)</font></strong>
-<a name="line522">522: </a>{
+<a name="line550">550: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line551">551: </a><font color="#B22222">+  -eps_gd_pwindow - set the number of converged vectors in the projector</font>
+<a name="line552">552: </a><font color="#B22222">-  -eps_gd_qwindow - set the number of converged vectors in the projected problem</font>
 
-<a name="line529">529: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,pwindow,qwindow));
-<a name="line530">530: </a>  <font color="#4169E1">return</font>(0);
-<a name="line531">531: </a>}
+<a name="line554">554: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line535">535: </a><strong><font color="#4169E1"><a name="EPSGDSetDoubleExpansion_GD"></a>static PetscErrorCode EPSGDSetDoubleExpansion_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool use_gd2)</font></strong>
-<a name="line536">536: </a>{
+<a name="line556">556: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDGetWindowSizes.html#EPSGDGetWindowSizes">EPSGDGetWindowSizes</a>()</font>
+<a name="line557">557: </a><font color="#B22222">@*/</font>
+<a name="line558">558: </a><strong><font color="#4169E1"><a name="EPSGDSetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetWindowSizes.html#EPSGDSetWindowSizes">EPSGDSetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt pwindow,PetscInt qwindow)</font></strong>
+<a name="line559">559: </a>{
 
-<a name="line540">540: </a>  EPSXDSetMethod(eps,use_gd2?DVD_METH_GD2:DVD_METH_GD);
-<a name="line541">541: </a>  <font color="#4169E1">return</font>(0);
-<a name="line542">542: </a>}
+<a name="line566">566: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,pwindow,qwindow));
+<a name="line567">567: </a>  <font color="#4169E1">return</font>(0);
+<a name="line568">568: </a>}
 
-<a name="line546">546: </a><strong><font color="#4169E1"><a name="EPSGDGetDoubleExpansion_GD"></a>static PetscErrorCode EPSGDGetDoubleExpansion_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *flg)</font></strong>
-<a name="line547">547: </a>{
-<a name="line548">548: </a>  Method_t       meth;
+<a name="line572">572: </a><strong><font color="#4169E1"><a name="EPSGDGetDoubleExpansion_GD"></a>static PetscErrorCode EPSGDGetDoubleExpansion_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *doubleexp)</font></strong>
+<a name="line573">573: </a>{
+<a name="line574">574: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
 
-<a name="line552">552: </a>  EPSXDGetMethod_XD(eps,&meth);
-<a name="line553">553: </a>  <font color="#4169E1">if</font> (meth==DVD_METH_GD2) *flg = PETSC_TRUE;
-<a name="line554">554: </a>  <font color="#4169E1">else</font> *flg = PETSC_FALSE;
-<a name="line555">555: </a>  <font color="#4169E1">return</font>(0);
-<a name="line556">556: </a>}
-
-<a name="line560">560: </a><font color="#B22222">/*@</font>
-<a name="line561">561: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</a> - Gets a flag indicating whether the double</font>
-<a name="line562">562: </a><font color="#B22222">   expansion variant has been activated or not.</font>
+<a name="line577">577: </a>  *doubleexp = data->doubleexp;
+<a name="line578">578: </a>  <font color="#4169E1">return</font>(0);
+<a name="line579">579: </a>}
 
-<a name="line564">564: </a><font color="#B22222">   Not Collective</font>
+<a name="line583">583: </a><font color="#B22222">/*@</font>
+<a name="line584">584: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</a> - Gets a flag indicating whether the double</font>
+<a name="line585">585: </a><font color="#B22222">   expansion variant has been activated or not.</font>
 
-<a name="line566">566: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line567">567: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line587">587: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line569">569: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line570">570: </a><font color="#B22222">.  flg - the flag</font>
+<a name="line589">589: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line590">590: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line572">572: </a><font color="#B22222">   Level: advanced</font>
+<a name="line592">592: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line593">593: </a><font color="#B22222">.  doubleexp - the flag</font>
 
-<a name="line574">574: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>()</font>
-<a name="line575">575: </a><font color="#B22222">@*/</font>
-<a name="line576">576: </a><strong><font color="#4169E1"><a name="EPSGDGetDoubleExpansion"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *flg)</font></strong>
-<a name="line577">577: </a>{
-
-<a name="line583">583: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDGetDoubleExpansion_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,flg));
-<a name="line584">584: </a>  <font color="#4169E1">return</font>(0);
-<a name="line585">585: </a>}
-
-<a name="line589">589: </a><font color="#B22222">/*@</font>
-<a name="line590">590: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a> - Activate a variant where the search subspace is</font>
-<a name="line591">591: </a><font color="#B22222">   expanded with K*[A*x B*x] (double expansion) instead of the classic K*r,</font>
-<a name="line592">592: </a><font color="#B22222">   where K is the preconditioner, x the selected approximate eigenvector and</font>
-<a name="line593">593: </a><font color="#B22222">   r its associated residual vector.</font>
-
-<a name="line595">595: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line597">597: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line598">598: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line599">599: </a><font color="#B22222">-  use_gd2 - the boolean flag</font>
-
-<a name="line601">601: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line602">602: </a><font color="#B22222">.  -eps_gd_double_expansion - activate the double-expansion variant of GD</font>
-
-<a name="line604">604: </a><font color="#B22222">   Level: advanced</font>
-<a name="line605">605: </a><font color="#B22222">@*/</font>
-<a name="line606">606: </a><strong><font color="#4169E1"><a name="EPSGDSetDoubleExpansion"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool use_gd2)</font></strong>
-<a name="line607">607: </a>{
-
-<a name="line613">613: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetDoubleExpansion_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,use_gd2));
-<a name="line614">614: </a>  <font color="#4169E1">return</font>(0);
-<a name="line615">615: </a>}
-
-<a name="line619">619: </a><strong><font color="#4169E1"><a name="EPSCreate_GD"></a>PETSC_EXTERN PetscErrorCode EPSCreate_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line620">620: </a>{
-<a name="line621">621: </a>  PetscErrorCode  ierr;
-
-<a name="line624">624: </a>  <font color="#B22222">/* Load the Davidson solver */</font>
-<a name="line625">625: </a>  EPSCreate_XD(eps);
-<a name="line626">626: </a>  EPSJDSetFix_JD(eps,0.0);
-<a name="line627">627: </a>  EPSXDSetMethod(eps,DVD_METH_GD);
-
-<a name="line629">629: </a>  <font color="#B22222">/* Overload the GD properties */</font>
-<a name="line630">630: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_GD;
-<a name="line631">631: </a>  eps->ops->setup                = EPSSetUp_GD;
-<a name="line632">632: </a>  eps->ops->destroy              = EPSDestroy_GD;
-
-<a name="line634">634: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetKrylovStart_C"</font>,EPSXDSetKrylovStart_XD);
-<a name="line635">635: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetKrylovStart_C"</font>,EPSXDGetKrylovStart_XD);
-<a name="line636">636: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBOrth_C"</font>,EPSXDSetBOrth_XD);
-<a name="line637">637: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBOrth_C"</font>,EPSXDGetBOrth_XD);
-<a name="line638">638: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBlockSize_C"</font>,EPSXDSetBlockSize_XD);
-<a name="line639">639: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBlockSize_C"</font>,EPSXDGetBlockSize_XD);
-<a name="line640">640: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetRestart_C"</font>,EPSXDSetRestart_XD);
-<a name="line641">641: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetRestart_C"</font>,EPSXDGetRestart_XD);
-<a name="line642">642: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetInitialSize_C"</font>,EPSXDSetInitialSize_XD);
-<a name="line643">643: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetInitialSize_C"</font>,EPSXDGetInitialSize_XD);
-<a name="line644">644: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetWindowSizes_C"</font>,EPSXDSetWindowSizes_XD);
-<a name="line645">645: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetWindowSizes_C"</font>,EPSXDGetWindowSizes_XD);
-<a name="line646">646: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetDoubleExpansion_C"</font>,EPSGDSetDoubleExpansion_GD);
-<a name="line647">647: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetDoubleExpansion_C"</font>,EPSGDGetDoubleExpansion_GD);
+<a name="line595">595: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line597">597: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>()</font>
+<a name="line598">598: </a><font color="#B22222">@*/</font>
+<a name="line599">599: </a><strong><font color="#4169E1"><a name="EPSGDGetDoubleExpansion"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDGetDoubleExpansion.html#EPSGDGetDoubleExpansion">EPSGDGetDoubleExpansion</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *doubleexp)</font></strong>
+<a name="line600">600: </a>{
+
+<a name="line606">606: </a>  PetscUseMethod(eps,<font color="#666666">"EPSGDGetDoubleExpansion_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,doubleexp));
+<a name="line607">607: </a>  <font color="#4169E1">return</font>(0);
+<a name="line608">608: </a>}
+
+<a name="line612">612: </a><strong><font color="#4169E1"><a name="EPSGDSetDoubleExpansion_GD"></a>static PetscErrorCode EPSGDSetDoubleExpansion_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool doubleexp)</font></strong>
+<a name="line613">613: </a>{
+<a name="line614">614: </a>  EPS_DAVIDSON *data = (EPS_DAVIDSON*)eps->data;
+
+<a name="line617">617: </a>  data->doubleexp = doubleexp;
+<a name="line618">618: </a>  <font color="#4169E1">return</font>(0);
+<a name="line619">619: </a>}
+
+<a name="line623">623: </a><font color="#B22222">/*@</font>
+<a name="line624">624: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a> - Activate a variant where the search subspace is</font>
+<a name="line625">625: </a><font color="#B22222">   expanded with K*[A*x B*x] (double expansion) instead of the classic K*r,</font>
+<a name="line626">626: </a><font color="#B22222">   where K is the preconditioner, x the selected approximate eigenvector and</font>
+<a name="line627">627: </a><font color="#B22222">   r its associated residual vector.</font>
+
+<a name="line629">629: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line631">631: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line632">632: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line633">633: </a><font color="#B22222">-  doubleexp - the boolean flag</font>
+
+<a name="line635">635: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line636">636: </a><font color="#B22222">.  -eps_gd_double_expansion - activate the double-expansion variant of GD</font>
+
+<a name="line638">638: </a><font color="#B22222">   Level: advanced</font>
+<a name="line639">639: </a><font color="#B22222">@*/</font>
+<a name="line640">640: </a><strong><font color="#4169E1"><a name="EPSGDSetDoubleExpansion"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool doubleexp)</font></strong>
+<a name="line641">641: </a>{
+
+<a name="line647">647: </a>  PetscTryMethod(eps,<font color="#666666">"EPSGDSetDoubleExpansion_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,doubleexp));
 <a name="line648">648: </a>  <font color="#4169E1">return</font>(0);
 <a name="line649">649: </a>}
 
+<a name="line653">653: </a><strong><font color="#4169E1"><a name="EPSCreate_GD"></a>PETSC_EXTERN PetscErrorCode EPSCreate_GD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line654">654: </a>{
+<a name="line655">655: </a>  PetscErrorCode  ierr;
+<a name="line656">656: </a>  EPS_DAVIDSON    *data;
+
+<a name="line659">659: </a>  PetscNewLog(eps,&data);
+<a name="line660">660: </a>  eps->data = (void*)data;
+
+<a name="line662">662: </a>  data->blocksize   = 1;
+<a name="line663">663: </a>  data->initialsize = 6;
+<a name="line664">664: </a>  data->minv        = 6;
+<a name="line665">665: </a>  data->plusk       = 0;
+<a name="line666">666: </a>  data->ipB         = PETSC_TRUE;
+<a name="line667">667: </a>  data->fix         = 0.0;
+<a name="line668">668: </a>  data->krylovstart = PETSC_FALSE;
+<a name="line669">669: </a>  data->dynamic     = PETSC_FALSE;
+<a name="line670">670: </a>  data->cX_in_proj  = 0;
+<a name="line671">671: </a>  data->cX_in_impr  = 0;
+
+<a name="line673">673: </a>  eps->ops->solve          = EPSSolve_XD;
+<a name="line674">674: </a>  eps->ops->setup          = EPSSetUp_XD;
+<a name="line675">675: </a>  eps->ops->reset          = EPSReset_XD;
+<a name="line676">676: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+<a name="line677">677: </a>  eps->ops->computevectors = EPSComputeVectors_XD;
+<a name="line678">678: </a>  eps->ops->view           = EPSView_GD;
+<a name="line679">679: </a>  eps->ops->setfromoptions = EPSSetFromOptions_GD;
+<a name="line680">680: </a>  eps->ops->setup          = EPSSetUp_GD;
+<a name="line681">681: </a>  eps->ops->destroy        = EPSDestroy_GD;
+
+<a name="line683">683: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetKrylovStart_C"</font>,EPSXDSetKrylovStart_XD);
+<a name="line684">684: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetKrylovStart_C"</font>,EPSXDGetKrylovStart_XD);
+<a name="line685">685: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBOrth_C"</font>,EPSXDSetBOrth_XD);
+<a name="line686">686: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBOrth_C"</font>,EPSXDGetBOrth_XD);
+<a name="line687">687: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetBlockSize_C"</font>,EPSXDSetBlockSize_XD);
+<a name="line688">688: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetBlockSize_C"</font>,EPSXDGetBlockSize_XD);
+<a name="line689">689: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetRestart_C"</font>,EPSXDSetRestart_XD);
+<a name="line690">690: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetRestart_C"</font>,EPSXDGetRestart_XD);
+<a name="line691">691: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetInitialSize_C"</font>,EPSXDSetInitialSize_XD);
+<a name="line692">692: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetInitialSize_C"</font>,EPSXDGetInitialSize_XD);
+<a name="line693">693: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetWindowSizes_C"</font>,EPSXDSetWindowSizes_XD);
+<a name="line694">694: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetWindowSizes_C"</font>,EPSXDGetWindowSizes_XD);
+<a name="line695">695: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDSetDoubleExpansion_C"</font>,EPSGDSetDoubleExpansion_GD);
+<a name="line696">696: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSGDGetDoubleExpansion_C"</font>,EPSGDGetDoubleExpansion_GD);
+<a name="line697">697: </a>  <font color="#4169E1">return</font>(0);
+<a name="line698">698: </a>}
+
 </pre>
 </body>
 
diff --git a/src/eps/impls/davidson/gd/index.html b/src/eps/impls/davidson/gd/index.html
index 46ed038..32ca565 100644
--- a/src/eps/impls/davidson/gd/index.html
+++ b/src/eps/impls/davidson/gd/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/gd/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/gd/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/davidson/gd/makefile b/src/eps/impls/davidson/gd/makefile
index 5779037..6dc8a53 100644
--- a/src/eps/impls/davidson/gd/makefile
+++ b/src/eps/impls/davidson/gd/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/davidson/gd/makefile.html b/src/eps/impls/davidson/gd/makefile.html
index 6ba4876..4795170 100644
--- a/src/eps/impls/davidson/gd/makefile.html
+++ b/src/eps/impls/davidson/gd/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/gd/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:09+00:00">
+<meta name="date" content="2016-05-16T10:33:05+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/gd/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/gd/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/davidson/index.html b/src/eps/impls/davidson/index.html
index 59a0f3e..8ab8fee 100644
--- a/src/eps/impls/davidson/index.html
+++ b/src/eps/impls/davidson/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/davidson/jd/index.html b/src/eps/impls/davidson/jd/index.html
index 766c7c2..b1340d3 100644
--- a/src/eps/impls/davidson/jd/index.html
+++ b/src/eps/impls/davidson/jd/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/jd/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/jd/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/davidson/jd/jd.c b/src/eps/impls/davidson/jd/jd.c
index e710ce7..c4758f7 100644
--- a/src/eps/impls/davidson/jd/jd.c
+++ b/src/eps/impls/davidson/jd/jd.c
@@ -21,7 +21,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,7 +44,7 @@
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_JD"
-PetscErrorCode EPSSetFromOptions_JD(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   PetscBool      flg,op;
@@ -137,6 +137,39 @@ PetscErrorCode EPSSetUp_JD(EPS eps)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "EPSView_JD"
+PetscErrorCode EPSView_JD(EPS eps,PetscViewer viewer)
+{
+  PetscErrorCode ierr;
+  PetscBool      isascii,opb;
+  PetscInt       opi,opi0;
+  PetscBool      borth;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    ierr = EPSXDGetBOrth_XD(eps,&borth);CHKERRQ(ierr);
+    if (borth) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  JD: search subspace is B-orthogonalized\n");CHKERRQ(ierr);
+    } else {
+      ierr = PetscViewerASCIIPrintf(viewer,"  JD: search subspace is orthogonalized\n");CHKERRQ(ierr);
+    }
+    ierr = EPSXDGetBlockSize_XD(eps,&opi);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  JD: block size=%D\n",opi);CHKERRQ(ierr);
+    ierr = EPSXDGetKrylovStart_XD(eps,&opb);CHKERRQ(ierr);
+    if (!opb) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  JD: type of the initial subspace: non-Krylov\n");CHKERRQ(ierr);
+    } else {
+      ierr = PetscViewerASCIIPrintf(viewer,"  JD: type of the initial subspace: Krylov\n");CHKERRQ(ierr);
+    }
+    ierr = EPSXDGetRestart_XD(eps,&opi,&opi0);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  JD: size of the subspace after restarting: %D\n",opi);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  JD: number of vectors after restarting from the previous iteration: %D\n",opi0);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSDestroy_JD"
 PetscErrorCode EPSDestroy_JD(EPS eps)
 {
@@ -220,7 +253,7 @@ PetscErrorCode EPSJDGetKrylovStart(EPS eps,PetscBool *krylovstart)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(krylovstart,2);
-  ierr = PetscTryMethod(eps,"EPSJDGetKrylovStart_C",(EPS,PetscBool*),(eps,krylovstart));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetKrylovStart_C",(EPS,PetscBool*),(eps,krylovstart));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -279,7 +312,7 @@ PetscErrorCode EPSJDGetBlockSize(EPS eps,PetscInt *blocksize)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidIntPointer(blocksize,2);
-  ierr = PetscTryMethod(eps,"EPSJDGetBlockSize_C",(EPS,PetscInt*),(eps,blocksize));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetBlockSize_C",(EPS,PetscInt*),(eps,blocksize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -308,7 +341,7 @@ PetscErrorCode EPSJDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSJDGetRestart_C",(EPS,PetscInt*,PetscInt*),(eps,minv,plusk));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetRestart_C",(EPS,PetscInt*,PetscInt*),(eps,minv,plusk));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -377,7 +410,7 @@ PetscErrorCode EPSJDGetInitialSize(EPS eps,PetscInt *initialsize)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidIntPointer(initialsize,2);
-  ierr = PetscTryMethod(eps,"EPSJDGetInitialSize_C",(EPS,PetscInt*),(eps,initialsize));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetInitialSize_C",(EPS,PetscInt*),(eps,initialsize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -448,7 +481,7 @@ PetscErrorCode EPSJDGetFix(EPS eps,PetscReal *fix)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(fix,2);
-  ierr = PetscTryMethod(eps,"EPSJDGetFix_C",(EPS,PetscReal*),(eps,fix));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetFix_C",(EPS,PetscReal*),(eps,fix));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -544,7 +577,7 @@ PetscErrorCode EPSJDGetConstCorrectionTol(EPS eps,PetscBool *constant)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(constant,2);
-  ierr = PetscTryMethod(eps,"EPSJDGetConstCorrectionTol",(EPS,PetscBool*),(eps,constant));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetConstCorrectionTol_C",(EPS,PetscBool*),(eps,constant));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -574,7 +607,7 @@ PetscErrorCode EPSJDGetWindowSizes(EPS eps,PetscInt *pwindow,PetscInt *qwindow)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSJDGetWindowSizes_C",(EPS,PetscInt*,PetscInt*),(eps,pwindow,qwindow));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetWindowSizes_C",(EPS,PetscInt*,PetscInt*),(eps,pwindow,qwindow));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -667,7 +700,7 @@ PetscErrorCode EPSJDGetBOrth(EPS eps,PetscBool *borth)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(borth,2);
-  ierr = PetscTryMethod(eps,"EPSJDGetBOrth_C",(EPS,PetscBool*),(eps,borth));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSJDGetBOrth_C",(EPS,PetscBool*),(eps,borth));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -676,13 +709,29 @@ PetscErrorCode EPSJDGetBOrth(EPS eps,PetscBool *borth)
 PETSC_EXTERN PetscErrorCode EPSCreate_JD(EPS eps)
 {
   PetscErrorCode ierr;
+  EPS_DAVIDSON   *data;
 
   PetscFunctionBegin;
-  /* Load the Davidson solver */
-  ierr = EPSCreate_XD(eps);CHKERRQ(ierr);
-  ierr = EPSXDSetMethod(eps,DVD_METH_JD);CHKERRQ(ierr);
-
-  /* Overload the JD properties */
+  ierr = PetscNewLog(eps,&data);CHKERRQ(ierr);
+  eps->data = (void*)data;
+
+  data->blocksize   = 1;
+  data->initialsize = 6;
+  data->minv        = 6;
+  data->plusk       = 0;
+  data->ipB         = PETSC_TRUE;
+  data->fix         = 0.01;
+  data->krylovstart = PETSC_FALSE;
+  data->dynamic     = PETSC_FALSE;
+  data->cX_in_proj  = 0;
+  data->cX_in_impr  = 0;
+
+  eps->ops->solve          = EPSSolve_XD;
+  eps->ops->setup          = EPSSetUp_XD;
+  eps->ops->reset          = EPSReset_XD;
+  eps->ops->backtransform  = EPSBackTransform_Default;
+  eps->ops->computevectors = EPSComputeVectors_XD;
+  eps->ops->view           = EPSView_JD;
   eps->ops->setfromoptions = EPSSetFromOptions_JD;
   eps->ops->setup          = EPSSetUp_JD;
   eps->ops->destroy        = EPSDestroy_JD;
diff --git a/src/eps/impls/davidson/jd/jd.c.html b/src/eps/impls/davidson/jd/jd.c.html
index df8b16d..eec3eb5 100644
--- a/src/eps/impls/davidson/jd/jd.c.html
+++ b/src/eps/impls/davidson/jd/jd.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/jd/jd.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:09+00:00">
+<meta name="date" content="2016-05-16T10:33:05+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/jd/jd.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/jd/jd.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "jd"</font>
@@ -33,7 +33,7 @@
 
 <a name="line22"> 22: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line23"> 23: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line26"> 26: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -54,7 +54,7 @@
 <a name="line42"> 42: </a><font color="#A020F0">#include <slepc/private/epsimpl.h>                </font><font color="#B22222">/*I "slepceps.h" I*/</font><font color="#A020F0"></font>
 <a name="line43"> 43: </a><font color="#A020F0">#include <../src/eps/impls/davidson/davidson.h></font>
 
-<a name="line47"> 47: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_JD"></a>PetscErrorCode EPSSetFromOptions_JD(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line47"> 47: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_JD"></a>PetscErrorCode EPSSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
 <a name="line48"> 48: </a>{
 <a name="line50"> 50: </a>  PetscBool      flg,op;
 <a name="line51"> 51: </a>  PetscInt       opi,opi0;
@@ -140,472 +140,517 @@
 <a name="line136">136: </a>  <font color="#4169E1">return</font>(0);
 <a name="line137">137: </a>}
 
-<a name="line141">141: </a><strong><font color="#4169E1"><a name="EPSDestroy_JD"></a>PetscErrorCode EPSDestroy_JD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line141">141: </a><strong><font color="#4169E1"><a name="EPSView_JD"></a>PetscErrorCode EPSView_JD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
 <a name="line142">142: </a>{
-<a name="line143">143: </a>  PetscErrorCode  ierr;
+<a name="line144">144: </a>  PetscBool      isascii,opb;
+<a name="line145">145: </a>  PetscInt       opi,opi0;
+<a name="line146">146: </a>  PetscBool      borth;
+
+<a name="line149">149: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line150">150: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line151">151: </a>    EPSXDGetBOrth_XD(eps,&borth);
+<a name="line152">152: </a>    <font color="#4169E1">if</font> (borth) {
+<a name="line153">153: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: search subspace is B-orthogonalized\n"</font>);
+<a name="line154">154: </a>    } <font color="#4169E1">else</font> {
+<a name="line155">155: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: search subspace is orthogonalized\n"</font>);
+<a name="line156">156: </a>    }
+<a name="line157">157: </a>    EPSXDGetBlockSize_XD(eps,&opi);
+<a name="line158">158: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: block size=%D\n"</font>,opi);
+<a name="line159">159: </a>    EPSXDGetKrylovStart_XD(eps,&opb);
+<a name="line160">160: </a>    <font color="#4169E1">if</font> (!opb) {
+<a name="line161">161: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: type of the initial subspace: non-Krylov\n"</font>);
+<a name="line162">162: </a>    } <font color="#4169E1">else</font> {
+<a name="line163">163: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: type of the initial subspace: Krylov\n"</font>);
+<a name="line164">164: </a>    }
+<a name="line165">165: </a>    EPSXDGetRestart_XD(eps,&opi,&opi0);
+<a name="line166">166: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: size of the subspace after restarting: %D\n"</font>,opi);
+<a name="line167">167: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: number of vectors after restarting from the previous iteration: %D\n"</font>,opi0);
+<a name="line168">168: </a>  }
+<a name="line169">169: </a>  <font color="#4169E1">return</font>(0);
+<a name="line170">170: </a>}
+
+<a name="line174">174: </a><strong><font color="#4169E1"><a name="EPSDestroy_JD"></a>PetscErrorCode EPSDestroy_JD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line175">175: </a>{
+<a name="line176">176: </a>  PetscErrorCode  ierr;
+
+<a name="line179">179: </a>  PetscFree(eps->data);
+<a name="line180">180: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetKrylovStart_C"</font>,NULL);
+<a name="line181">181: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetKrylovStart_C"</font>,NULL);
+<a name="line182">182: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBlockSize_C"</font>,NULL);
+<a name="line183">183: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBlockSize_C"</font>,NULL);
+<a name="line184">184: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetRestart_C"</font>,NULL);
+<a name="line185">185: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetRestart_C"</font>,NULL);
+<a name="line186">186: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetInitialSize_C"</font>,NULL);
+<a name="line187">187: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetInitialSize_C"</font>,NULL);
+<a name="line188">188: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetFix_C"</font>,NULL);
+<a name="line189">189: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetFix_C"</font>,NULL);
+<a name="line190">190: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetConstCorrectionTol_C"</font>,NULL);
+<a name="line191">191: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetConstCorrectionTol_C"</font>,NULL);
+<a name="line192">192: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetWindowSizes_C"</font>,NULL);
+<a name="line193">193: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetWindowSizes_C"</font>,NULL);
+<a name="line194">194: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBOrth_C"</font>,NULL);
+<a name="line195">195: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBOrth_C"</font>,NULL);
+<a name="line196">196: </a>  <font color="#4169E1">return</font>(0);
+<a name="line197">197: </a>}
+
+<a name="line201">201: </a><font color="#B22222">/*@</font>
+<a name="line202">202: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a> - Activates or deactivates starting the searching</font>
+<a name="line203">203: </a><font color="#B22222">   subspace with a Krylov basis.</font>
+
+<a name="line205">205: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line207">207: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line208">208: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line209">209: </a><font color="#B22222">-  krylovstart - boolean flag</font>
+
+<a name="line211">211: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line212">212: </a><font color="#B22222">.  -eps_jd_krylov_start - Activates starting the searching subspace with a</font>
+<a name="line213">213: </a><font color="#B22222">    Krylov basis</font>
+
+<a name="line215">215: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line217">217: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
+<a name="line218">218: </a><font color="#B22222">@*/</font>
+<a name="line219">219: </a><strong><font color="#4169E1"><a name="EPSJDSetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool krylovstart)</font></strong>
+<a name="line220">220: </a>{
+
+<a name="line226">226: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,krylovstart));
+<a name="line227">227: </a>  <font color="#4169E1">return</font>(0);
+<a name="line228">228: </a>}
+
+<a name="line232">232: </a><font color="#B22222">/*@</font>
+<a name="line233">233: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a> - Returns a flag indicating if the searching subspace is started with a</font>
+<a name="line234">234: </a><font color="#B22222">   Krylov basis.</font>
+
+<a name="line236">236: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line238">238: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line239">239: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line241">241: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line242">242: </a><font color="#B22222">.  krylovstart - boolean flag indicating if the searching subspace is started</font>
+<a name="line243">243: </a><font color="#B22222">   with a Krylov basis</font>
+
+<a name="line245">245: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line247">247: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
+<a name="line248">248: </a><font color="#B22222">@*/</font>
+<a name="line249">249: </a><strong><font color="#4169E1"><a name="EPSJDGetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *krylovstart)</font></strong>
+<a name="line250">250: </a>{
+
+<a name="line256">256: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,krylovstart));
+<a name="line257">257: </a>  <font color="#4169E1">return</font>(0);
+<a name="line258">258: </a>}
+
+<a name="line262">262: </a><font color="#B22222">/*@</font>
+<a name="line263">263: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a> - Sets the number of vectors to be added to the searching space</font>
+<a name="line264">264: </a><font color="#B22222">   in every iteration.</font>
+
+<a name="line266">266: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line268">268: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line269">269: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line270">270: </a><font color="#B22222">-  blocksize - number of vectors added to the search space in every iteration</font>
+
+<a name="line272">272: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line273">273: </a><font color="#B22222">.  -eps_jd_blocksize - number of vectors added to the searching space every iteration</font>
+
+<a name="line275">275: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line277">277: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a>()</font>
+<a name="line278">278: </a><font color="#B22222">@*/</font>
+<a name="line279">279: </a><strong><font color="#4169E1"><a name="EPSJDSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt blocksize)</font></strong>
+<a name="line280">280: </a>{
 
-<a name="line146">146: </a>  PetscFree(eps->data);
-<a name="line147">147: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetKrylovStart_C"</font>,NULL);
-<a name="line148">148: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetKrylovStart_C"</font>,NULL);
-<a name="line149">149: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBlockSize_C"</font>,NULL);
-<a name="line150">150: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBlockSize_C"</font>,NULL);
-<a name="line151">151: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetRestart_C"</font>,NULL);
-<a name="line152">152: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetRestart_C"</font>,NULL);
-<a name="line153">153: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetInitialSize_C"</font>,NULL);
-<a name="line154">154: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetInitialSize_C"</font>,NULL);
-<a name="line155">155: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetFix_C"</font>,NULL);
-<a name="line156">156: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetFix_C"</font>,NULL);
-<a name="line157">157: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetConstCorrectionTol_C"</font>,NULL);
-<a name="line158">158: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetConstCorrectionTol_C"</font>,NULL);
-<a name="line159">159: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetWindowSizes_C"</font>,NULL);
-<a name="line160">160: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetWindowSizes_C"</font>,NULL);
-<a name="line161">161: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBOrth_C"</font>,NULL);
-<a name="line162">162: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBOrth_C"</font>,NULL);
-<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
-<a name="line164">164: </a>}
+<a name="line286">286: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,blocksize));
+<a name="line287">287: </a>  <font color="#4169E1">return</font>(0);
+<a name="line288">288: </a>}
 
-<a name="line168">168: </a><font color="#B22222">/*@</font>
-<a name="line169">169: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a> - Activates or deactivates starting the searching</font>
-<a name="line170">170: </a><font color="#B22222">   subspace with a Krylov basis.</font>
+<a name="line292">292: </a><font color="#B22222">/*@</font>
+<a name="line293">293: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</a> - Returns the number of vectors to be added to the searching space</font>
+<a name="line294">294: </a><font color="#B22222">   in every iteration.</font>
 
-<a name="line172">172: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line296">296: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line174">174: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line175">175: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line176">176: </a><font color="#B22222">-  krylovstart - boolean flag</font>
+<a name="line298">298: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line299">299: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line178">178: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line179">179: </a><font color="#B22222">.  -eps_jd_krylov_start - Activates starting the searching subspace with a</font>
-<a name="line180">180: </a><font color="#B22222">    Krylov basis</font>
+<a name="line301">301: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line302">302: </a><font color="#B22222">.  blocksize - number of vectors added to the search space in every iteration</font>
 
-<a name="line182">182: </a><font color="#B22222">   Level: advanced</font>
+<a name="line304">304: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line184">184: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
-<a name="line185">185: </a><font color="#B22222">@*/</font>
-<a name="line186">186: </a><strong><font color="#4169E1"><a name="EPSJDSetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool krylovstart)</font></strong>
-<a name="line187">187: </a>{
+<a name="line306">306: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a>()</font>
+<a name="line307">307: </a><font color="#B22222">@*/</font>
+<a name="line308">308: </a><strong><font color="#4169E1"><a name="EPSJDGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *blocksize)</font></strong>
+<a name="line309">309: </a>{
 
-<a name="line193">193: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,krylovstart));
-<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
-<a name="line195">195: </a>}
+<a name="line315">315: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,blocksize));
+<a name="line316">316: </a>  <font color="#4169E1">return</font>(0);
+<a name="line317">317: </a>}
 
-<a name="line199">199: </a><font color="#B22222">/*@</font>
-<a name="line200">200: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a> - Returns a flag indicating if the searching subspace is started with a</font>
-<a name="line201">201: </a><font color="#B22222">   Krylov basis.</font>
+<a name="line321">321: </a><font color="#B22222">/*@</font>
+<a name="line322">322: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a> - Gets the number of vectors of the searching space after</font>
+<a name="line323">323: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
 
-<a name="line203">203: </a><font color="#B22222">   Not Collective</font>
+<a name="line325">325: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line205">205: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line206">206: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line327">327: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line328">328: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line208">208: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line209">209: </a><font color="#B22222">.  krylovstart - boolean flag indicating if the searching subspace is started</font>
-<a name="line210">210: </a><font color="#B22222">   with a Krylov basis</font>
+<a name="line330">330: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line331">331: </a><font color="#B22222">+  minv - number of vectors of the searching subspace after restarting</font>
+<a name="line332">332: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
 
-<a name="line212">212: </a><font color="#B22222">   Level: advanced</font>
+<a name="line334">334: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line214">214: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
-<a name="line215">215: </a><font color="#B22222">@*/</font>
-<a name="line216">216: </a><strong><font color="#4169E1"><a name="EPSJDGetKrylovStart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *krylovstart)</font></strong>
-<a name="line217">217: </a>{
+<a name="line336">336: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a>()</font>
+<a name="line337">337: </a><font color="#B22222">@*/</font>
+<a name="line338">338: </a><strong><font color="#4169E1"><a name="EPSJDGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *minv,PetscInt *plusk)</font></strong>
+<a name="line339">339: </a>{
 
-<a name="line223">223: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetKrylovStart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,krylovstart));
-<a name="line224">224: </a>  <font color="#4169E1">return</font>(0);
-<a name="line225">225: </a>}
-
-<a name="line229">229: </a><font color="#B22222">/*@</font>
-<a name="line230">230: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a> - Sets the number of vectors to be added to the searching space</font>
-<a name="line231">231: </a><font color="#B22222">   in every iteration.</font>
-
-<a name="line233">233: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line235">235: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line236">236: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line237">237: </a><font color="#B22222">-  blocksize - number of vectors added to the search space in every iteration</font>
-
-<a name="line239">239: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line240">240: </a><font color="#B22222">.  -eps_jd_blocksize - number of vectors added to the searching space every iteration</font>
-
-<a name="line242">242: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line244">244: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetKrylovStart.html#EPSJDSetKrylovStart">EPSJDSetKrylovStart</a>()</font>
-<a name="line245">245: </a><font color="#B22222">@*/</font>
-<a name="line246">246: </a><strong><font color="#4169E1"><a name="EPSJDSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt blocksize)</font></strong>
-<a name="line247">247: </a>{
-
-<a name="line253">253: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,blocksize));
-<a name="line254">254: </a>  <font color="#4169E1">return</font>(0);
-<a name="line255">255: </a>}
-
-<a name="line259">259: </a><font color="#B22222">/*@</font>
-<a name="line260">260: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</a> - Returns the number of vectors to be added to the searching space</font>
-<a name="line261">261: </a><font color="#B22222">   in every iteration.</font>
-
-<a name="line263">263: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line265">265: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line266">266: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line268">268: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line269">269: </a><font color="#B22222">.  blocksize - number of vectors added to the search space in every iteration</font>
-
-<a name="line271">271: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line273">273: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetBlockSize.html#EPSJDSetBlockSize">EPSJDSetBlockSize</a>()</font>
-<a name="line274">274: </a><font color="#B22222">@*/</font>
-<a name="line275">275: </a><strong><font color="#4169E1"><a name="EPSJDGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetBlockSize.html#EPSJDGetBlockSize">EPSJDGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *blocksize)</font></strong>
-<a name="line276">276: </a>{
-
-<a name="line282">282: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,blocksize));
-<a name="line283">283: </a>  <font color="#4169E1">return</font>(0);
-<a name="line284">284: </a>}
-
-<a name="line288">288: </a><font color="#B22222">/*@</font>
-<a name="line289">289: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a> - Gets the number of vectors of the searching space after</font>
-<a name="line290">290: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
-
-<a name="line292">292: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line294">294: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line295">295: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line297">297: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line298">298: </a><font color="#B22222">+  minv - number of vectors of the searching subspace after restarting</font>
-<a name="line299">299: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
-
-<a name="line301">301: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line303">303: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a>()</font>
-<a name="line304">304: </a><font color="#B22222">@*/</font>
-<a name="line305">305: </a><strong><font color="#4169E1"><a name="EPSJDGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *minv,PetscInt *plusk)</font></strong>
-<a name="line306">306: </a>{
-
-<a name="line311">311: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,minv,plusk));
-<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
-<a name="line313">313: </a>}
-
-<a name="line317">317: </a><font color="#B22222">/*@</font>
-<a name="line318">318: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a> - Sets the number of vectors of the searching space after</font>
-<a name="line319">319: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
-
-<a name="line321">321: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line323">323: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line324">324: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line325">325: </a><font color="#B22222">.  minv - number of vectors of the searching subspace after restarting</font>
-<a name="line326">326: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
-
-<a name="line328">328: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line329">329: </a><font color="#B22222">+  -eps_jd_minv - number of vectors of the searching subspace after restarting</font>
-<a name="line330">330: </a><font color="#B22222">-  -eps_jd_plusk - number of vectors saved from the previous iteration</font>
-
-<a name="line332">332: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line334">334: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a>()</font>
-<a name="line335">335: </a><font color="#B22222">@*/</font>
-<a name="line336">336: </a><strong><font color="#4169E1"><a name="EPSJDSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt minv,PetscInt plusk)</font></strong>
-<a name="line337">337: </a>{
-
-<a name="line344">344: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,minv,plusk));
+<a name="line344">344: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,minv,plusk));
 <a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
 <a name="line346">346: </a>}
 
 <a name="line350">350: </a><font color="#B22222">/*@</font>
-<a name="line351">351: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a> - Returns the initial size of the searching space.</font>
+<a name="line351">351: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a> - Sets the number of vectors of the searching space after</font>
+<a name="line352">352: </a><font color="#B22222">   restarting and the number of vectors saved from the previous iteration.</font>
 
-<a name="line353">353: </a><font color="#B22222">   Not Collective</font>
+<a name="line354">354: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line355">355: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line356">356: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line356">356: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line357">357: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line358">358: </a><font color="#B22222">.  minv - number of vectors of the searching subspace after restarting</font>
+<a name="line359">359: </a><font color="#B22222">-  plusk - number of vectors saved from the previous iteration</font>
 
-<a name="line358">358: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line359">359: </a><font color="#B22222">.  initialsize - number of vectors of the initial searching subspace</font>
+<a name="line361">361: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line362">362: </a><font color="#B22222">+  -eps_jd_minv - number of vectors of the searching subspace after restarting</font>
+<a name="line363">363: </a><font color="#B22222">-  -eps_jd_plusk - number of vectors saved from the previous iteration</font>
 
-<a name="line361">361: </a><font color="#B22222">   Notes:</font>
-<a name="line362">362: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
-<a name="line363">363: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(), up to initialsize vectors will be used; and if the</font>
-<a name="line364">364: </a><font color="#B22222">   provided vectors are not enough, the solver completes the subspace with</font>
-<a name="line365">365: </a><font color="#B22222">   random vectors. In the case of <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() being PETSC_TRUE, the solver</font>
-<a name="line366">366: </a><font color="#B22222">   gets the first vector provided by the user or, if not available, a random vector,</font>
-<a name="line367">367: </a><font color="#B22222">   and expands the Krylov basis up to initialsize vectors.</font>
+<a name="line365">365: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line369">369: </a><font color="#B22222">   Level: advanced</font>
+<a name="line367">367: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetRestart.html#EPSJDGetRestart">EPSJDGetRestart</a>()</font>
+<a name="line368">368: </a><font color="#B22222">@*/</font>
+<a name="line369">369: </a><strong><font color="#4169E1"><a name="EPSJDSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetRestart.html#EPSJDSetRestart">EPSJDSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt minv,PetscInt plusk)</font></strong>
+<a name="line370">370: </a>{
 
-<a name="line371">371: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
-<a name="line372">372: </a><font color="#B22222">@*/</font>
-<a name="line373">373: </a><strong><font color="#4169E1"><a name="EPSJDGetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *initialsize)</font></strong>
-<a name="line374">374: </a>{
+<a name="line377">377: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,minv,plusk));
+<a name="line378">378: </a>  <font color="#4169E1">return</font>(0);
+<a name="line379">379: </a>}
 
-<a name="line380">380: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,initialsize));
-<a name="line381">381: </a>  <font color="#4169E1">return</font>(0);
-<a name="line382">382: </a>}
+<a name="line383">383: </a><font color="#B22222">/*@</font>
+<a name="line384">384: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a> - Returns the initial size of the searching space.</font>
 
-<a name="line386">386: </a><font color="#B22222">/*@</font>
-<a name="line387">387: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a> - Sets the initial size of the searching space.</font>
+<a name="line386">386: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line389">389: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line388">388: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line389">389: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line391">391: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line392">392: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line393">393: </a><font color="#B22222">-  initialsize - number of vectors of the initial searching subspace</font>
+<a name="line391">391: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line392">392: </a><font color="#B22222">.  initialsize - number of vectors of the initial searching subspace</font>
 
-<a name="line395">395: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line396">396: </a><font color="#B22222">.  -eps_jd_initial_size - number of vectors of the initial searching subspace</font>
+<a name="line394">394: </a><font color="#B22222">   Notes:</font>
+<a name="line395">395: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
+<a name="line396">396: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(), up to initialsize vectors will be used; and if the</font>
+<a name="line397">397: </a><font color="#B22222">   provided vectors are not enough, the solver completes the subspace with</font>
+<a name="line398">398: </a><font color="#B22222">   random vectors. In the case of <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() being PETSC_TRUE, the solver</font>
+<a name="line399">399: </a><font color="#B22222">   gets the first vector provided by the user or, if not available, a random vector,</font>
+<a name="line400">400: </a><font color="#B22222">   and expands the Krylov basis up to initialsize vectors.</font>
 
-<a name="line398">398: </a><font color="#B22222">   Notes:</font>
-<a name="line399">399: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
-<a name="line400">400: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(), up to initialsize vectors will be used; and if the</font>
-<a name="line401">401: </a><font color="#B22222">   provided vectors are not enough, the solver completes the subspace with</font>
-<a name="line402">402: </a><font color="#B22222">   random vectors. In the case of <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() being PETSC_TRUE, the solver</font>
-<a name="line403">403: </a><font color="#B22222">   gets the first vector provided by the user or, if not available, a random vector,</font>
-<a name="line404">404: </a><font color="#B22222">   and expands the Krylov basis up to initialsize vectors.</font>
+<a name="line402">402: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line406">406: </a><font color="#B22222">   Level: advanced</font>
+<a name="line404">404: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
+<a name="line405">405: </a><font color="#B22222">@*/</font>
+<a name="line406">406: </a><strong><font color="#4169E1"><a name="EPSJDGetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *initialsize)</font></strong>
+<a name="line407">407: </a>{
 
-<a name="line408">408: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
-<a name="line409">409: </a><font color="#B22222">@*/</font>
-<a name="line410">410: </a><strong><font color="#4169E1"><a name="EPSJDSetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt initialsize)</font></strong>
-<a name="line411">411: </a>{
+<a name="line413">413: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,initialsize));
+<a name="line414">414: </a>  <font color="#4169E1">return</font>(0);
+<a name="line415">415: </a>}
 
-<a name="line417">417: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,initialsize));
-<a name="line418">418: </a>  <font color="#4169E1">return</font>(0);
-<a name="line419">419: </a>}
+<a name="line419">419: </a><font color="#B22222">/*@</font>
+<a name="line420">420: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a> - Sets the initial size of the searching space.</font>
 
-<a name="line423">423: </a><font color="#B22222">/*@</font>
-<a name="line424">424: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a> - Returns the threshold for changing the target in the correction</font>
-<a name="line425">425: </a><font color="#B22222">   equation.</font>
+<a name="line422">422: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line427">427: </a><font color="#B22222">   Not Collective</font>
+<a name="line424">424: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line425">425: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line426">426: </a><font color="#B22222">-  initialsize - number of vectors of the initial searching subspace</font>
 
-<a name="line429">429: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line430">430: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line428">428: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line429">429: </a><font color="#B22222">.  -eps_jd_initial_size - number of vectors of the initial searching subspace</font>
 
-<a name="line432">432: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line433">433: </a><font color="#B22222">.  fix - threshold for changing the target</font>
+<a name="line431">431: </a><font color="#B22222">   Notes:</font>
+<a name="line432">432: </a><font color="#B22222">   If <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() is PETSC_FALSE and the user provides vectors with</font>
+<a name="line433">433: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(), up to initialsize vectors will be used; and if the</font>
+<a name="line434">434: </a><font color="#B22222">   provided vectors are not enough, the solver completes the subspace with</font>
+<a name="line435">435: </a><font color="#B22222">   random vectors. In the case of <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>() being PETSC_TRUE, the solver</font>
+<a name="line436">436: </a><font color="#B22222">   gets the first vector provided by the user or, if not available, a random vector,</font>
+<a name="line437">437: </a><font color="#B22222">   and expands the Krylov basis up to initialsize vectors.</font>
 
-<a name="line435">435: </a><font color="#B22222">   Note:</font>
-<a name="line436">436: </a><font color="#B22222">   The target in the correction equation is fixed at the first iterations.</font>
-<a name="line437">437: </a><font color="#B22222">   When the norm of the residual vector is lower than the fix value,</font>
-<a name="line438">438: </a><font color="#B22222">   the target is set to the corresponding eigenvalue.</font>
+<a name="line439">439: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line440">440: </a><font color="#B22222">   Level: advanced</font>
+<a name="line441">441: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetInitialSize.html#EPSJDGetInitialSize">EPSJDGetInitialSize</a>(), <a href="../../../../../docs/manualpages/EPS/EPSJDGetKrylovStart.html#EPSJDGetKrylovStart">EPSJDGetKrylovStart</a>()</font>
+<a name="line442">442: </a><font color="#B22222">@*/</font>
+<a name="line443">443: </a><strong><font color="#4169E1"><a name="EPSJDSetInitialSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetInitialSize.html#EPSJDSetInitialSize">EPSJDSetInitialSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt initialsize)</font></strong>
+<a name="line444">444: </a>{
 
-<a name="line442">442: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a>()</font>
-<a name="line443">443: </a><font color="#B22222">@*/</font>
-<a name="line444">444: </a><strong><font color="#4169E1"><a name="EPSJDGetFix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *fix)</font></strong>
-<a name="line445">445: </a>{
+<a name="line450">450: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetInitialSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,initialsize));
+<a name="line451">451: </a>  <font color="#4169E1">return</font>(0);
+<a name="line452">452: </a>}
 
-<a name="line451">451: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetFix_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,fix));
-<a name="line452">452: </a>  <font color="#4169E1">return</font>(0);
-<a name="line453">453: </a>}
+<a name="line456">456: </a><font color="#B22222">/*@</font>
+<a name="line457">457: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a> - Returns the threshold for changing the target in the correction</font>
+<a name="line458">458: </a><font color="#B22222">   equation.</font>
 
-<a name="line457">457: </a><font color="#B22222">/*@</font>
-<a name="line458">458: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a> - Sets the threshold for changing the target in the correction</font>
-<a name="line459">459: </a><font color="#B22222">   equation.</font>
+<a name="line460">460: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line461">461: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line462">462: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line463">463: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line463">463: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line464">464: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line465">465: </a><font color="#B22222">-  fix - threshold for changing the target</font>
+<a name="line465">465: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line466">466: </a><font color="#B22222">.  fix - threshold for changing the target</font>
 
-<a name="line467">467: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line468">468: </a><font color="#B22222">.  -eps_jd_fix - the fix value</font>
+<a name="line468">468: </a><font color="#B22222">   Note:</font>
+<a name="line469">469: </a><font color="#B22222">   The target in the correction equation is fixed at the first iterations.</font>
+<a name="line470">470: </a><font color="#B22222">   When the norm of the residual vector is lower than the fix value,</font>
+<a name="line471">471: </a><font color="#B22222">   the target is set to the corresponding eigenvalue.</font>
 
-<a name="line470">470: </a><font color="#B22222">   Note:</font>
-<a name="line471">471: </a><font color="#B22222">   The target in the correction equation is fixed at the first iterations.</font>
-<a name="line472">472: </a><font color="#B22222">   When the norm of the residual vector is lower than the fix value,</font>
-<a name="line473">473: </a><font color="#B22222">   the target is set to the corresponding eigenvalue.</font>
+<a name="line473">473: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line475">475: </a><font color="#B22222">   Level: advanced</font>
+<a name="line475">475: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a>()</font>
+<a name="line476">476: </a><font color="#B22222">@*/</font>
+<a name="line477">477: </a><strong><font color="#4169E1"><a name="EPSJDGetFix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *fix)</font></strong>
+<a name="line478">478: </a>{
 
-<a name="line477">477: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a>()</font>
-<a name="line478">478: </a><font color="#B22222">@*/</font>
-<a name="line479">479: </a><strong><font color="#4169E1"><a name="EPSJDSetFix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal fix)</font></strong>
-<a name="line480">480: </a>{
+<a name="line484">484: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetFix_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,fix));
+<a name="line485">485: </a>  <font color="#4169E1">return</font>(0);
+<a name="line486">486: </a>}
 
-<a name="line486">486: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetFix_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal),(eps,fix));
-<a name="line487">487: </a>  <font color="#4169E1">return</font>(0);
-<a name="line488">488: </a>}
+<a name="line490">490: </a><font color="#B22222">/*@</font>
+<a name="line491">491: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a> - Sets the threshold for changing the target in the correction</font>
+<a name="line492">492: </a><font color="#B22222">   equation.</font>
 
-<a name="line492">492: </a><font color="#B22222">/*@</font>
-<a name="line493">493: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</a> - If true, deactivates the dynamic stopping criterion</font>
-<a name="line494">494: </a><font color="#B22222">   (also called Newton) that sets the KSP relative tolerance</font>
-<a name="line495">495: </a><font color="#B22222">   to 0.5**i, where i is the number of <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> iterations from the last converged value.</font>
+<a name="line494">494: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line497">497: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line496">496: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line497">497: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line498">498: </a><font color="#B22222">-  fix - threshold for changing the target</font>
 
-<a name="line499">499: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line500">500: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line501">501: </a><font color="#B22222">-  constant - if false, the KSP relative tolerance is set to 0.5**i.</font>
+<a name="line500">500: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line501">501: </a><font color="#B22222">.  -eps_jd_fix - the fix value</font>
 
-<a name="line503">503: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line504">504: </a><font color="#B22222">.  -eps_jd_const_correction_tol - Deactivates the dynamic stopping criterion.</font>
+<a name="line503">503: </a><font color="#B22222">   Note:</font>
+<a name="line504">504: </a><font color="#B22222">   The target in the correction equation is fixed at the first iterations.</font>
+<a name="line505">505: </a><font color="#B22222">   When the norm of the residual vector is lower than the fix value,</font>
+<a name="line506">506: </a><font color="#B22222">   the target is set to the corresponding eigenvalue.</font>
 
-<a name="line506">506: </a><font color="#B22222">   Level: advanced</font>
+<a name="line508">508: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line508">508: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>()</font>
-<a name="line509">509: </a><font color="#B22222">@*/</font>
-<a name="line510">510: </a><strong><font color="#4169E1"><a name="EPSJDSetConstCorrectionTol"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool constant)</font></strong>
-<a name="line511">511: </a>{
+<a name="line510">510: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetFix.html#EPSJDGetFix">EPSJDGetFix</a>()</font>
+<a name="line511">511: </a><font color="#B22222">@*/</font>
+<a name="line512">512: </a><strong><font color="#4169E1"><a name="EPSJDSetFix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetFix.html#EPSJDSetFix">EPSJDSetFix</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal fix)</font></strong>
+<a name="line513">513: </a>{
 
-<a name="line517">517: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetConstCorrectionTol_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,constant));
-<a name="line518">518: </a>  <font color="#4169E1">return</font>(0);
-<a name="line519">519: </a>}
+<a name="line519">519: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetFix_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal),(eps,fix));
+<a name="line520">520: </a>  <font color="#4169E1">return</font>(0);
+<a name="line521">521: </a>}
 
-<a name="line523">523: </a><font color="#B22222">/*@</font>
-<a name="line524">524: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a> - Returns a flag indicating if the dynamic stopping is being used for</font>
-<a name="line525">525: </a><font color="#B22222">   solving the correction equation. If the flag is false the KSP relative tolerance is set</font>
-<a name="line526">526: </a><font color="#B22222">   to 0.5**i, where i is the number of <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> iterations from the last converged value.</font>
+<a name="line525">525: </a><font color="#B22222">/*@</font>
+<a name="line526">526: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</a> - If true, deactivates the dynamic stopping criterion</font>
+<a name="line527">527: </a><font color="#B22222">   (also called Newton) that sets the KSP relative tolerance</font>
+<a name="line528">528: </a><font color="#B22222">   to 0.5**i, where i is the number of <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> iterations from the last converged value.</font>
 
-<a name="line528">528: </a><font color="#B22222">   Not Collective</font>
+<a name="line530">530: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line530">530: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line531">531: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line532">532: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line533">533: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line534">534: </a><font color="#B22222">-  constant - if false, the KSP relative tolerance is set to 0.5**i.</font>
 
-<a name="line533">533: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line534">534: </a><font color="#B22222">.  constant - boolean flag indicating if the dynamic stopping criterion is not being used.</font>
+<a name="line536">536: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line537">537: </a><font color="#B22222">.  -eps_jd_const_correction_tol - Deactivates the dynamic stopping criterion.</font>
 
-<a name="line536">536: </a><font color="#B22222">   Level: advanced</font>
+<a name="line539">539: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line538">538: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>()</font>
-<a name="line539">539: </a><font color="#B22222">@*/</font>
-<a name="line540">540: </a><strong><font color="#4169E1"><a name="EPSJDGetConstCorrectionTol"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *constant)</font></strong>
-<a name="line541">541: </a>{
+<a name="line541">541: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>()</font>
+<a name="line542">542: </a><font color="#B22222">@*/</font>
+<a name="line543">543: </a><strong><font color="#4169E1"><a name="EPSJDSetConstCorrectionTol"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetConstCorrectionTol.html#EPSJDSetConstCorrectionTol">EPSJDSetConstCorrectionTol</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool constant)</font></strong>
+<a name="line544">544: </a>{
 
-<a name="line547">547: </a>  PetscTryMethod(eps,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,constant));
-<a name="line548">548: </a>  <font color="#4169E1">return</font>(0);
-<a name="line549">549: </a>}
+<a name="line550">550: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetConstCorrectionTol_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,constant));
+<a name="line551">551: </a>  <font color="#4169E1">return</font>(0);
+<a name="line552">552: </a>}
 
-<a name="line553">553: </a><font color="#B22222">/*@</font>
-<a name="line554">554: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a> - Gets the number of converged vectors in the projected</font>
-<a name="line555">555: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
-<a name="line556">556: </a><font color="#B22222">   equation.</font>
+<a name="line556">556: </a><font color="#B22222">/*@</font>
+<a name="line557">557: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a> - Returns a flag indicating if the dynamic stopping is being used for</font>
+<a name="line558">558: </a><font color="#B22222">   solving the correction equation. If the flag is false the KSP relative tolerance is set</font>
+<a name="line559">559: </a><font color="#B22222">   to 0.5**i, where i is the number of <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> iterations from the last converged value.</font>
 
-<a name="line558">558: </a><font color="#B22222">   Not Collective</font>
+<a name="line561">561: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line560">560: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line561">561: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line563">563: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line564">564: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line563">563: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line564">564: </a><font color="#B22222">+  pwindow - number of converged vectors in the projector</font>
-<a name="line565">565: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
+<a name="line566">566: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line567">567: </a><font color="#B22222">.  constant - boolean flag indicating if the dynamic stopping criterion is not being used.</font>
 
-<a name="line567">567: </a><font color="#B22222">   Level: advanced</font>
+<a name="line569">569: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line569">569: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a>()</font>
-<a name="line570">570: </a><font color="#B22222">@*/</font>
-<a name="line571">571: </a><strong><font color="#4169E1"><a name="EPSJDGetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *pwindow,PetscInt *qwindow)</font></strong>
-<a name="line572">572: </a>{
+<a name="line571">571: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>()</font>
+<a name="line572">572: </a><font color="#B22222">@*/</font>
+<a name="line573">573: </a><strong><font color="#4169E1"><a name="EPSJDGetConstCorrectionTol"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetConstCorrectionTol.html#EPSJDGetConstCorrectionTol">EPSJDGetConstCorrectionTol</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *constant)</font></strong>
+<a name="line574">574: </a>{
 
-<a name="line577">577: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,pwindow,qwindow));
-<a name="line578">578: </a>  <font color="#4169E1">return</font>(0);
-<a name="line579">579: </a>}
+<a name="line580">580: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetConstCorrectionTol_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,constant));
+<a name="line581">581: </a>  <font color="#4169E1">return</font>(0);
+<a name="line582">582: </a>}
 
-<a name="line583">583: </a><font color="#B22222">/*@</font>
-<a name="line584">584: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a> - Sets the number of converged vectors in the projected</font>
-<a name="line585">585: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
-<a name="line586">586: </a><font color="#B22222">   equation.</font>
+<a name="line586">586: </a><font color="#B22222">/*@</font>
+<a name="line587">587: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a> - Gets the number of converged vectors in the projected</font>
+<a name="line588">588: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
+<a name="line589">589: </a><font color="#B22222">   equation.</font>
 
-<a name="line588">588: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line591">591: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line590">590: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line591">591: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line592">592: </a><font color="#B22222">.  pwindow - number of converged vectors in the projector</font>
-<a name="line593">593: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
+<a name="line593">593: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line594">594: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line595">595: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line596">596: </a><font color="#B22222">+  -eps_jd_pwindow - set the number of converged vectors in the projector</font>
-<a name="line597">597: </a><font color="#B22222">-  -eps_jd_qwindow - set the number of converged vectors in the projected problem</font>
+<a name="line596">596: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line597">597: </a><font color="#B22222">+  pwindow - number of converged vectors in the projector</font>
+<a name="line598">598: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
 
-<a name="line599">599: </a><font color="#B22222">   Level: advanced</font>
+<a name="line600">600: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line601">601: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a>()</font>
-<a name="line602">602: </a><font color="#B22222">@*/</font>
-<a name="line603">603: </a><strong><font color="#4169E1"><a name="EPSJDSetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt pwindow,PetscInt qwindow)</font></strong>
-<a name="line604">604: </a>{
+<a name="line602">602: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a>()</font>
+<a name="line603">603: </a><font color="#B22222">@*/</font>
+<a name="line604">604: </a><strong><font color="#4169E1"><a name="EPSJDGetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *pwindow,PetscInt *qwindow)</font></strong>
+<a name="line605">605: </a>{
 
-<a name="line611">611: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,pwindow,qwindow));
-<a name="line612">612: </a>  <font color="#4169E1">return</font>(0);
-<a name="line613">613: </a>}
+<a name="line610">610: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*),(eps,pwindow,qwindow));
+<a name="line611">611: </a>  <font color="#4169E1">return</font>(0);
+<a name="line612">612: </a>}
 
-<a name="line617">617: </a><font color="#B22222">/*@</font>
-<a name="line618">618: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a> - Selects the orthogonalization that will be used in the search</font>
-<a name="line619">619: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
+<a name="line616">616: </a><font color="#B22222">/*@</font>
+<a name="line617">617: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a> - Sets the number of converged vectors in the projected</font>
+<a name="line618">618: </a><font color="#B22222">   problem (or Rayleigh quotient) and in the projector employed in the correction</font>
+<a name="line619">619: </a><font color="#B22222">   equation.</font>
 
 <a name="line621">621: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
 <a name="line623">623: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line624">624: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
-<a name="line625">625: </a><font color="#B22222">-  borth - whether to B-orthogonalize the search subspace</font>
-
-<a name="line627">627: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line628">628: </a><font color="#B22222">.  -eps_jd_borth - Set the orthogonalization used in the search subspace</font>
-
-<a name="line630">630: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line632">632: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a>()</font>
-<a name="line633">633: </a><font color="#B22222">@*/</font>
-<a name="line634">634: </a><strong><font color="#4169E1"><a name="EPSJDSetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool borth)</font></strong>
-<a name="line635">635: </a>{
-
-<a name="line641">641: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,borth));
-<a name="line642">642: </a>  <font color="#4169E1">return</font>(0);
-<a name="line643">643: </a>}
-
-<a name="line647">647: </a><font color="#B22222">/*@</font>
-<a name="line648">648: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a> - Returns the orthogonalization used in the search</font>
-<a name="line649">649: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
-
-<a name="line651">651: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line653">653: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line654">654: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line656">656: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line657">657: </a><font color="#B22222">.  borth - whether to B-orthogonalize the search subspace</font>
-
-<a name="line659">659: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line661">661: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a>()</font>
-<a name="line662">662: </a><font color="#B22222">@*/</font>
-<a name="line663">663: </a><strong><font color="#4169E1"><a name="EPSJDGetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *borth)</font></strong>
-<a name="line664">664: </a>{
-
-<a name="line670">670: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDGetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,borth));
-<a name="line671">671: </a>  <font color="#4169E1">return</font>(0);
-<a name="line672">672: </a>}
-
-<a name="line676">676: </a><strong><font color="#4169E1"><a name="EPSCreate_JD"></a>PETSC_EXTERN PetscErrorCode EPSCreate_JD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line677">677: </a>{
-
-<a name="line681">681: </a>  <font color="#B22222">/* Load the Davidson solver */</font>
-<a name="line682">682: </a>  EPSCreate_XD(eps);
-<a name="line683">683: </a>  EPSXDSetMethod(eps,DVD_METH_JD);
-
-<a name="line685">685: </a>  <font color="#B22222">/* Overload the JD properties */</font>
-<a name="line686">686: </a>  eps->ops->setfromoptions = EPSSetFromOptions_JD;
-<a name="line687">687: </a>  eps->ops->setup          = EPSSetUp_JD;
-<a name="line688">688: </a>  eps->ops->destroy        = EPSDestroy_JD;
-
-<a name="line690">690: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetKrylovStart_C"</font>,EPSXDSetKrylovStart_XD);
-<a name="line691">691: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetKrylovStart_C"</font>,EPSXDGetKrylovStart_XD);
-<a name="line692">692: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBlockSize_C"</font>,EPSXDSetBlockSize_XD);
-<a name="line693">693: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBlockSize_C"</font>,EPSXDGetBlockSize_XD);
-<a name="line694">694: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetRestart_C"</font>,EPSXDSetRestart_XD);
-<a name="line695">695: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetRestart_C"</font>,EPSXDGetRestart_XD);
-<a name="line696">696: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetInitialSize_C"</font>,EPSXDSetInitialSize_XD);
-<a name="line697">697: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetInitialSize_C"</font>,EPSXDGetInitialSize_XD);
-<a name="line698">698: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetFix_C"</font>,EPSJDSetFix_JD);
-<a name="line699">699: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetFix_C"</font>,EPSXDGetFix_XD);
-<a name="line700">700: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetConstCorrectionTol_C"</font>,EPSJDSetConstCorrectionTol_JD);
-<a name="line701">701: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetConstCorrectionTol_C"</font>,EPSJDGetConstCorrectionTol_JD);
-<a name="line702">702: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetWindowSizes_C"</font>,EPSXDSetWindowSizes_XD);
-<a name="line703">703: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetWindowSizes_C"</font>,EPSXDGetWindowSizes_XD);
-<a name="line704">704: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBOrth_C"</font>,EPSXDSetBOrth_XD);
-<a name="line705">705: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBOrth_C"</font>,EPSXDGetBOrth_XD);
-<a name="line706">706: </a>  <font color="#4169E1">return</font>(0);
-<a name="line707">707: </a>}
+<a name="line624">624: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line625">625: </a><font color="#B22222">.  pwindow - number of converged vectors in the projector</font>
+<a name="line626">626: </a><font color="#B22222">-  qwindow - number of converged vectors in the projected problem</font>
+
+<a name="line628">628: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line629">629: </a><font color="#B22222">+  -eps_jd_pwindow - set the number of converged vectors in the projector</font>
+<a name="line630">630: </a><font color="#B22222">-  -eps_jd_qwindow - set the number of converged vectors in the projected problem</font>
+
+<a name="line632">632: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line634">634: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetWindowSizes.html#EPSJDGetWindowSizes">EPSJDGetWindowSizes</a>()</font>
+<a name="line635">635: </a><font color="#B22222">@*/</font>
+<a name="line636">636: </a><strong><font color="#4169E1"><a name="EPSJDSetWindowSizes"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetWindowSizes.html#EPSJDSetWindowSizes">EPSJDSetWindowSizes</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt pwindow,PetscInt qwindow)</font></strong>
+<a name="line637">637: </a>{
+
+<a name="line644">644: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetWindowSizes_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt),(eps,pwindow,qwindow));
+<a name="line645">645: </a>  <font color="#4169E1">return</font>(0);
+<a name="line646">646: </a>}
+
+<a name="line650">650: </a><font color="#B22222">/*@</font>
+<a name="line651">651: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a> - Selects the orthogonalization that will be used in the search</font>
+<a name="line652">652: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
+
+<a name="line654">654: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line656">656: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line657">657: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
+<a name="line658">658: </a><font color="#B22222">-  borth - whether to B-orthogonalize the search subspace</font>
+
+<a name="line660">660: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line661">661: </a><font color="#B22222">.  -eps_jd_borth - Set the orthogonalization used in the search subspace</font>
+
+<a name="line663">663: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line665">665: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a>()</font>
+<a name="line666">666: </a><font color="#B22222">@*/</font>
+<a name="line667">667: </a><strong><font color="#4169E1"><a name="EPSJDSetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool borth)</font></strong>
+<a name="line668">668: </a>{
+
+<a name="line674">674: </a>  PetscTryMethod(eps,<font color="#666666">"EPSJDSetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,borth));
+<a name="line675">675: </a>  <font color="#4169E1">return</font>(0);
+<a name="line676">676: </a>}
+
+<a name="line680">680: </a><font color="#B22222">/*@</font>
+<a name="line681">681: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a> - Returns the orthogonalization used in the search</font>
+<a name="line682">682: </a><font color="#B22222">   subspace in case of generalized Hermitian problems.</font>
+
+<a name="line684">684: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line686">686: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line687">687: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line689">689: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line690">690: </a><font color="#B22222">.  borth - whether to B-orthogonalize the search subspace</font>
+
+<a name="line692">692: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line694">694: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSJDSetBOrth.html#EPSJDSetBOrth">EPSJDSetBOrth</a>()</font>
+<a name="line695">695: </a><font color="#B22222">@*/</font>
+<a name="line696">696: </a><strong><font color="#4169E1"><a name="EPSJDGetBOrth"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSJDGetBOrth.html#EPSJDGetBOrth">EPSJDGetBOrth</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *borth)</font></strong>
+<a name="line697">697: </a>{
+
+<a name="line703">703: </a>  PetscUseMethod(eps,<font color="#666666">"EPSJDGetBOrth_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,borth));
+<a name="line704">704: </a>  <font color="#4169E1">return</font>(0);
+<a name="line705">705: </a>}
+
+<a name="line709">709: </a><strong><font color="#4169E1"><a name="EPSCreate_JD"></a>PETSC_EXTERN PetscErrorCode EPSCreate_JD(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line710">710: </a>{
+<a name="line712">712: </a>  EPS_DAVIDSON   *data;
+
+<a name="line715">715: </a>  PetscNewLog(eps,&data);
+<a name="line716">716: </a>  eps->data = (void*)data;
+
+<a name="line718">718: </a>  data->blocksize   = 1;
+<a name="line719">719: </a>  data->initialsize = 6;
+<a name="line720">720: </a>  data->minv        = 6;
+<a name="line721">721: </a>  data->plusk       = 0;
+<a name="line722">722: </a>  data->ipB         = PETSC_TRUE;
+<a name="line723">723: </a>  data->fix         = 0.01;
+<a name="line724">724: </a>  data->krylovstart = PETSC_FALSE;
+<a name="line725">725: </a>  data->dynamic     = PETSC_FALSE;
+<a name="line726">726: </a>  data->cX_in_proj  = 0;
+<a name="line727">727: </a>  data->cX_in_impr  = 0;
+
+<a name="line729">729: </a>  eps->ops->solve          = EPSSolve_XD;
+<a name="line730">730: </a>  eps->ops->setup          = EPSSetUp_XD;
+<a name="line731">731: </a>  eps->ops->reset          = EPSReset_XD;
+<a name="line732">732: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+<a name="line733">733: </a>  eps->ops->computevectors = EPSComputeVectors_XD;
+<a name="line734">734: </a>  eps->ops->view           = EPSView_JD;
+<a name="line735">735: </a>  eps->ops->setfromoptions = EPSSetFromOptions_JD;
+<a name="line736">736: </a>  eps->ops->setup          = EPSSetUp_JD;
+<a name="line737">737: </a>  eps->ops->destroy        = EPSDestroy_JD;
+
+<a name="line739">739: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetKrylovStart_C"</font>,EPSXDSetKrylovStart_XD);
+<a name="line740">740: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetKrylovStart_C"</font>,EPSXDGetKrylovStart_XD);
+<a name="line741">741: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBlockSize_C"</font>,EPSXDSetBlockSize_XD);
+<a name="line742">742: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBlockSize_C"</font>,EPSXDGetBlockSize_XD);
+<a name="line743">743: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetRestart_C"</font>,EPSXDSetRestart_XD);
+<a name="line744">744: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetRestart_C"</font>,EPSXDGetRestart_XD);
+<a name="line745">745: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetInitialSize_C"</font>,EPSXDSetInitialSize_XD);
+<a name="line746">746: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetInitialSize_C"</font>,EPSXDGetInitialSize_XD);
+<a name="line747">747: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetFix_C"</font>,EPSJDSetFix_JD);
+<a name="line748">748: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetFix_C"</font>,EPSXDGetFix_XD);
+<a name="line749">749: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetConstCorrectionTol_C"</font>,EPSJDSetConstCorrectionTol_JD);
+<a name="line750">750: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetConstCorrectionTol_C"</font>,EPSJDGetConstCorrectionTol_JD);
+<a name="line751">751: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetWindowSizes_C"</font>,EPSXDSetWindowSizes_XD);
+<a name="line752">752: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetWindowSizes_C"</font>,EPSXDGetWindowSizes_XD);
+<a name="line753">753: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDSetBOrth_C"</font>,EPSXDSetBOrth_XD);
+<a name="line754">754: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSJDGetBOrth_C"</font>,EPSXDGetBOrth_XD);
+<a name="line755">755: </a>  <font color="#4169E1">return</font>(0);
+<a name="line756">756: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/davidson/jd/makefile b/src/eps/impls/davidson/jd/makefile
index 2313f86..d7914fb 100644
--- a/src/eps/impls/davidson/jd/makefile
+++ b/src/eps/impls/davidson/jd/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/davidson/jd/makefile.html b/src/eps/impls/davidson/jd/makefile.html
index 2e956ed..af6f29b 100644
--- a/src/eps/impls/davidson/jd/makefile.html
+++ b/src/eps/impls/davidson/jd/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/jd/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:11+00:00">
+<meta name="date" content="2016-05-16T10:33:06+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/jd/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/jd/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/davidson/makefile b/src/eps/impls/davidson/makefile
index de21be7..834bfcd 100644
--- a/src/eps/impls/davidson/makefile
+++ b/src/eps/impls/davidson/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/davidson/makefile.html b/src/eps/impls/davidson/makefile.html
index 16a9a46..23cde6d 100644
--- a/src/eps/impls/davidson/makefile.html
+++ b/src/eps/impls/davidson/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/davidson/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:08+00:00">
+<meta name="date" content="2016-05-16T10:33:04+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/davidson/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/davidson/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/external/arpack/arpack.c b/src/eps/impls/external/arpack/arpack.c
index 54bf692..3166f02 100644
--- a/src/eps/impls/external/arpack/arpack.c
+++ b/src/eps/impls/external/arpack/arpack.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -76,6 +76,7 @@ PetscErrorCode EPSSetUp_ARPACK(EPS eps)
 
   if (eps->balance!=EPS_BALANCE_NONE) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Balancing not supported in the Arpack interface");
   if (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Arbitrary selection of eigenpairs not supported in this solver");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"External packages do not support user-defined stopping test");
 
   ierr = EPSAllocateSolution(eps,0);CHKERRQ(ierr);
   ierr = EPS_SetInnerProduct(eps);CHKERRQ(ierr);
diff --git a/src/eps/impls/external/arpack/arpack.c.html b/src/eps/impls/external/arpack/arpack.c.html
index df81a28..c2a9e35 100644
--- a/src/eps/impls/external/arpack/arpack.c.html
+++ b/src/eps/impls/external/arpack/arpack.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/arpack/arpack.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:16+00:00">
+<meta name="date" content="2016-05-16T10:33:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/arpack/arpack.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/arpack/arpack.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the ARPACK package</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -84,261 +84,262 @@
 
 <a name="line77"> 77: </a>  <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Balancing not supported in the Arpack interface"</font>);
 <a name="line78"> 78: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
-
-<a name="line80"> 80: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-<a name="line81"> 81: </a>  EPS_SetInnerProduct(eps);
-<a name="line82"> 82: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,2);
-
-<a name="line84"> 84: </a>  PetscObjectTypeCompare((PetscObject)eps->V,BVVECS,&flg);
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
-<a name="line86"> 86: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line89"> 89: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line90"> 90: </a>  eps->ops->solve = EPSSolve_ARPACK;
-<a name="line91"> 91: </a>  <font color="#4169E1">return</font>(0);
-<a name="line92"> 92: </a>}
-
-<a name="line96"> 96: </a><strong><font color="#4169E1"><a name="EPSSolve_ARPACK"></a>PetscErrorCode EPSSolve_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line97"> 97: </a>{
-<a name="line99"> 99: </a>  EPS_ARPACK     *ar = (EPS_ARPACK*)eps->data;
-<a name="line100">100: </a>  char           bmat[1],howmny[] = <font color="#666666">"A"</font>;
-<a name="line101">101: </a>  const char     *which;
-<a name="line102">102: </a>  PetscBLASInt   n,iparam[11],ipntr[14],ido,info,nev,ncv;
-<a name="line103">103: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
-<a name="line104">104: </a>  PetscBLASInt   fcomm;
-<a name="line105">105: </a><font color="#A020F0">#endif</font>
-<a name="line106">106: </a>  PetscScalar    sigmar,*pV,*resid;
-<a name="line107">107: </a>  Vec            v0,x,y,w = eps->work[0];
-<a name="line108">108: </a>  Mat            A;
-<a name="line109">109: </a>  PetscBool      isSinv,isShift,rvec;
-<a name="line110">110: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line111">111: </a>  PetscScalar    sigmai = 0.0;
-<a name="line112">112: </a><font color="#A020F0">#endif</font>
-
-<a name="line115">115: </a>  PetscBLASIntCast(eps->nev,&nev);
-<a name="line116">116: </a>  PetscBLASIntCast(eps->ncv,&ncv);
-<a name="line117">117: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
-<a name="line118">118: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&fcomm);
-<a name="line119">119: </a><font color="#A020F0">#endif</font>
-<a name="line120">120: </a>  PetscBLASIntCast(eps->nloc,&n);
-<a name="line121">121: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&x);
-<a name="line122">122: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&y);
-<a name="line123">123: </a>  EPSGetStartVector(eps,0,NULL);
-<a name="line124">124: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,0);  <font color="#B22222">/* just for deflation space */</font>
-<a name="line125">125: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
-<a name="line126">126: </a>  VecCopy(v0,eps->work[1]);
-<a name="line127">127: </a>  VecGetArray(v0,&pV);
-<a name="line128">128: </a>  VecGetArray(eps->work[1],&resid);
-
-<a name="line130">130: </a>  ido  = 0;            <font color="#B22222">/* first call to reverse communication interface */</font>
-<a name="line131">131: </a>  info = 1;            <font color="#B22222">/* indicates a initial vector is provided */</font>
-<a name="line132">132: </a>  iparam[0] = 1;       <font color="#B22222">/* use exact shifts */</font>
-<a name="line133">133: </a>  PetscBLASIntCast(eps->max_it,&iparam[2]);  <font color="#B22222">/* max Arnoldi iterations */</font>
-<a name="line134">134: </a>  iparam[3] = 1;       <font color="#B22222">/* blocksize */</font>
-<a name="line135">135: </a>  iparam[4] = 0;       <font color="#B22222">/* number of converged Ritz values */</font>
-
-<a name="line137">137: </a>  <font color="#B22222">/*</font>
-<a name="line138">138: </a><font color="#B22222">     Computational modes ([]=not supported):</font>
-<a name="line139">139: </a><font color="#B22222">            symmetric    non-symmetric    complex</font>
-<a name="line140">140: </a><font color="#B22222">        1     1  'I'        1  'I'         1  'I'</font>
-<a name="line141">141: </a><font color="#B22222">        2     3  'I'        3  'I'         3  'I'</font>
-<a name="line142">142: </a><font color="#B22222">        3     2  'G'        2  'G'         2  'G'</font>
-<a name="line143">143: </a><font color="#B22222">        4     3  'G'        3  'G'         3  'G'</font>
-<a name="line144">144: </a><font color="#B22222">        5   [ 4  'G' ]    [ 3  'G' ]</font>
-<a name="line145">145: </a><font color="#B22222">        6   [ 5  'G' ]    [ 4  'G' ]</font>
-<a name="line146">146: </a><font color="#B22222">   */</font>
-<a name="line147">147: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&isSinv);
-<a name="line148">148: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSHIFT,&isShift);
-<a name="line149">149: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigmar);
-<a name="line150">150: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-
-<a name="line152">152: </a>  <font color="#4169E1">if</font> (isSinv) {
-<a name="line153">153: </a>    <font color="#B22222">/* shift-and-invert mode */</font>
-<a name="line154">154: </a>    iparam[6] = 3;
-<a name="line155">155: </a>    <font color="#4169E1">if</font> (eps->ispositive) bmat[0] = 'G';
-<a name="line156">156: </a>    <font color="#4169E1">else</font> bmat[0] = 'I';
-<a name="line157">157: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isShift && eps->ispositive) {
-<a name="line158">158: </a>    <font color="#B22222">/* generalized shift mode with B positive definite */</font>
-<a name="line159">159: </a>    iparam[6] = 2;
-<a name="line160">160: </a>    bmat[0] = 'G';
-<a name="line161">161: </a>  } <font color="#4169E1">else</font> {
-<a name="line162">162: </a>    <font color="#B22222">/* regular mode */</font>
-<a name="line163">163: </a>    <font color="#4169E1">if</font> (eps->ishermitian && eps->isgeneralized)
-<a name="line164">164: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectral transformation not supported by ARPACK hermitian solver"</font>);
-<a name="line165">165: </a>    iparam[6] = 1;
-<a name="line166">166: </a>    bmat[0] = 'I';
-<a name="line167">167: </a>  }
-
-<a name="line169">169: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line170">170: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line171">171: </a>      <font color="#4169E1">switch</font> (eps->which) {
-<a name="line172">172: </a>        <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line173">173: </a>        <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:  which = <font color="#666666">"LM"</font>; <font color="#4169E1">break</font>;
-<a name="line174">174: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE: which = <font color="#666666">"SM"</font>; <font color="#4169E1">break</font>;
-<a name="line175">175: </a>        <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line176">176: </a>        <font color="#4169E1">case</font> EPS_LARGEST_REAL:       which = <font color="#666666">"LA"</font>; <font color="#4169E1">break</font>;
-<a name="line177">177: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_REAL:      which = <font color="#666666">"SA"</font>; <font color="#4169E1">break</font>;
-<a name="line178">178: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Wrong value of eps->which"</font>);
-<a name="line179">179: </a>      }
-<a name="line180">180: </a>    } <font color="#4169E1">else</font> {
-<a name="line181">181: </a><font color="#A020F0">#endif</font>
-<a name="line182">182: </a>      <font color="#4169E1">switch</font> (eps->which) {
-<a name="line183">183: </a>        <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line184">184: </a>        <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:  which = <font color="#666666">"LM"</font>; <font color="#4169E1">break</font>;
-<a name="line185">185: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE: which = <font color="#666666">"SM"</font>; <font color="#4169E1">break</font>;
-<a name="line186">186: </a>        <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line187">187: </a>        <font color="#4169E1">case</font> EPS_LARGEST_REAL:       which = <font color="#666666">"LR"</font>; <font color="#4169E1">break</font>;
-<a name="line188">188: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_REAL:      which = <font color="#666666">"SR"</font>; <font color="#4169E1">break</font>;
-<a name="line189">189: </a>        <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
-<a name="line190">190: </a>        <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:  which = <font color="#666666">"LI"</font>; <font color="#4169E1">break</font>;
-<a name="line191">191: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY: which = <font color="#666666">"SI"</font>; <font color="#4169E1">break</font>;
-<a name="line192">192: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Wrong value of eps->which"</font>);
-<a name="line193">193: </a>      }
-<a name="line194">194: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line195">195: </a>    }
-<a name="line196">196: </a><font color="#A020F0">#endif</font>
-
-<a name="line198">198: </a>  <font color="#4169E1">do</font> {
-
-<a name="line200">200: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line201">201: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line202">202: </a>      PetscStackCall(<font color="#666666">"ARPACKsaupd"</font>,ARPACKsaupd_(&fcomm,&ido,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
-<a name="line203">203: </a>    } <font color="#4169E1">else</font> {
-<a name="line204">204: </a>      PetscStackCall(<font color="#666666">"ARPACKnaupd"</font>,ARPACKnaupd_(&fcomm,&ido,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
-<a name="line205">205: </a>    }
-<a name="line206">206: </a><font color="#A020F0">#else</font>
-<a name="line207">207: </a>    PetscStackCall(<font color="#666666">"ARPACKnaupd"</font>,ARPACKnaupd_(&fcomm,&ido,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,ar->rwork,&info));
-<a name="line208">208: </a><font color="#A020F0">#endif</font>
-
-<a name="line210">210: </a>    <font color="#4169E1">if</font> (ido == -1 || ido == 1 || ido == 2) {
-<a name="line211">211: </a>      <font color="#4169E1">if</font> (ido == 1 && iparam[6] == 3 && bmat[0] == 'G') {
-<a name="line212">212: </a>        <font color="#B22222">/* special case for shift-and-invert with B semi-positive definite*/</font>
-<a name="line213">213: </a>        VecPlaceArray(x,&ar->workd[ipntr[2]-1]);
-<a name="line214">214: </a>      } <font color="#4169E1">else</font> {
-<a name="line215">215: </a>        VecPlaceArray(x,&ar->workd[ipntr[0]-1]);
-<a name="line216">216: </a>      }
-<a name="line217">217: </a>      VecPlaceArray(y,&ar->workd[ipntr[1]-1]);
-
-<a name="line219">219: </a>      <font color="#4169E1">if</font> (ido == -1) {
-<a name="line220">220: </a>        <font color="#B22222">/* Y = OP * X for for the initialization phase to</font>
-<a name="line221">221: </a><font color="#B22222">           force the starting vector into the range of OP */</font>
-<a name="line222">222: </a>        <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
-<a name="line223">223: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ido == 2) {
-<a name="line224">224: </a>        <font color="#B22222">/* Y = B * X */</font>
-<a name="line225">225: </a>        <a href="../../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,x,y);
-<a name="line226">226: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* ido == 1 */</font>
-<a name="line227">227: </a>        <font color="#4169E1">if</font> (iparam[6] == 3 && bmat[0] == 'G') {
-<a name="line228">228: </a>          <font color="#B22222">/* Y = OP * X for shift-and-invert with B semi-positive definite */</font>
-<a name="line229">229: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,y);
-<a name="line230">230: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (iparam[6] == 2) {
-<a name="line231">231: </a>          <font color="#B22222">/* X=A*X Y=B^-1*X for shift with B positive definite */</font>
-<a name="line232">232: </a>          MatMult(A,x,y);
-<a name="line233">233: </a>          <font color="#4169E1">if</font> (sigmar != 0.0) {
-<a name="line234">234: </a>            <a href="../../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,x,w);
-<a name="line235">235: </a>            VecAXPY(y,sigmar,w);
-<a name="line236">236: </a>          }
-<a name="line237">237: </a>          VecCopy(y,x);
-<a name="line238">238: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,y);
-<a name="line239">239: </a>        } <font color="#4169E1">else</font> {
-<a name="line240">240: </a>          <font color="#B22222">/* Y = OP * X */</font>
-<a name="line241">241: </a>          <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
-<a name="line242">242: </a>        }
-<a name="line243">243: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(eps->V,y,NULL,NULL,NULL);
-<a name="line244">244: </a>      }
-
-<a name="line246">246: </a>      VecResetArray(x);
-<a name="line247">247: </a>      VecResetArray(y);
-<a name="line248">248: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ido != 99) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Internal error in ARPACK reverse comunication interface (ido=%d)"</font>,ido);
-
-<a name="line250">250: </a>  } <font color="#4169E1">while</font> (ido != 99);
-
-<a name="line252">252: </a>  eps->nconv = iparam[4];
-<a name="line253">253: </a>  eps->its = iparam[2];
-
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (info==3) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"No shift could be applied in xxAUPD.\nTry increasing the size of NCV relative to NEV"</font>);
-<a name="line256">256: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (info!=0 && info!=1) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error reported by ARPACK subroutine xxAUPD (%d)"</font>,info);
-
-<a name="line258">258: </a>  rvec = PETSC_TRUE;
-
-<a name="line260">260: </a>  <font color="#4169E1">if</font> (eps->nconv > 0) {
-<a name="line261">261: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line262">262: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line263">263: </a>      EPSMonitor(eps,iparam[2],iparam[4],&ar->workl[ipntr[5]-1],eps->eigi,&ar->workl[ipntr[6]-1],eps->ncv);
-<a name="line264">264: </a>      PetscStackCall(<font color="#666666">"ARPACKseupd"</font>,ARPACKseupd_(&fcomm,&rvec,howmny,ar->select,eps->eigr,pV,&n,&sigmar,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
-<a name="line265">265: </a>    } <font color="#4169E1">else</font> {
-<a name="line266">266: </a>      EPSMonitor(eps,iparam[2],iparam[4],&ar->workl[ipntr[5]-1],&ar->workl[ipntr[6]-1],&ar->workl[ipntr[7]-1],eps->ncv);
-<a name="line267">267: </a>      PetscStackCall(<font color="#666666">"ARPACKneupd"</font>,ARPACKneupd_(&fcomm,&rvec,howmny,ar->select,eps->eigr,eps->eigi,pV,&n,&sigmar,&sigmai,ar->workev,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
-<a name="line268">268: </a>    }
-<a name="line269">269: </a><font color="#A020F0">#else</font>
-<a name="line270">270: </a>    EPSMonitor(eps,eps->its,iparam[4],&ar->workl[ipntr[5]-1],eps->eigi,(PetscReal*)&ar->workl[ipntr[7]-1],eps->ncv);
-<a name="line271">271: </a>    PetscStackCall(<font color="#666666">"ARPACKneupd"</font>,ARPACKneupd_(&fcomm,&rvec,howmny,ar->select,eps->eigr,pV,&n,&sigmar,ar->workev,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,ar->rwork,&info));
-<a name="line272">272: </a><font color="#A020F0">#endif</font>
-<a name="line273">273: </a>    <font color="#4169E1">if</font> (info!=0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error reported by ARPACK subroutine xxEUPD (%d)"</font>,info);
-<a name="line274">274: </a>  }
-
-<a name="line276">276: </a>  VecRestoreArray(v0,&pV);
-<a name="line277">277: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
-<a name="line278">278: </a>  VecRestoreArray(eps->work[1],&resid);
-<a name="line279">279: </a>  <font color="#4169E1">if</font> (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line280">280: </a>  <font color="#4169E1">else</font> eps->reason = EPS_DIVERGED_ITS;
-
-<a name="line282">282: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line283">283: </a>    PetscMemcpy(eps->errest,&ar->workl[ipntr[8]-1],eps->nconv);
-<a name="line284">284: </a>  } <font color="#4169E1">else</font> {
-<a name="line285">285: </a>    PetscMemcpy(eps->errest,&ar->workl[ipntr[10]-1],eps->nconv);
-<a name="line286">286: </a>  }
-
-<a name="line288">288: </a>  VecDestroy(&x);
-<a name="line289">289: </a>  VecDestroy(&y);
-<a name="line290">290: </a>  <font color="#4169E1">return</font>(0);
-<a name="line291">291: </a>}
-
-<a name="line295">295: </a><strong><font color="#4169E1"><a name="EPSBackTransform_ARPACK"></a>PetscErrorCode EPSBackTransform_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line296">296: </a>{
-<a name="line298">298: </a>  PetscBool      isSinv;
-
-<a name="line301">301: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&isSinv);
-<a name="line302">302: </a>  <font color="#4169E1">if</font> (!isSinv) {
-<a name="line303">303: </a>    EPSBackTransform_Default(eps);
-<a name="line304">304: </a>  }
-<a name="line305">305: </a>  <font color="#4169E1">return</font>(0);
-<a name="line306">306: </a>}
-
-<a name="line310">310: </a><strong><font color="#4169E1"><a name="EPSReset_ARPACK"></a>PetscErrorCode EPSReset_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line311">311: </a>{
-<a name="line313">313: </a>  EPS_ARPACK     *ar = (EPS_ARPACK*)eps->data;
-
-<a name="line316">316: </a>  PetscFree(ar->workev);
-<a name="line317">317: </a>  PetscFree(ar->workl);
-<a name="line318">318: </a>  PetscFree(ar->select);
-<a name="line319">319: </a>  PetscFree(ar->workd);
-<a name="line320">320: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line321">321: </a>  PetscFree(ar->rwork);
-<a name="line322">322: </a><font color="#A020F0">#endif</font>
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a>}
-
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="EPSDestroy_ARPACK"></a>PetscErrorCode EPSDestroy_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line329">329: </a>{
-
-<a name="line333">333: </a>  PetscFree(eps->data);
-<a name="line334">334: </a>  <font color="#4169E1">return</font>(0);
-<a name="line335">335: </a>}
-
-<a name="line339">339: </a><strong><font color="#4169E1"><a name="EPSCreate_ARPACK"></a>PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line340">340: </a>{
-<a name="line341">341: </a>  EPS_ARPACK     *ctx;
-
-<a name="line345">345: </a>  PetscNewLog(eps,&ctx);
-<a name="line346">346: </a>  eps->data = (void*)ctx;
-
-<a name="line348">348: </a>  eps->ops->setup                = EPSSetUp_ARPACK;
-<a name="line349">349: </a>  eps->ops->destroy              = EPSDestroy_ARPACK;
-<a name="line350">350: </a>  eps->ops->reset                = EPSReset_ARPACK;
-<a name="line351">351: </a>  eps->ops->backtransform        = EPSBackTransform_ARPACK;
-<a name="line352">352: </a>  <font color="#4169E1">return</font>(0);
-<a name="line353">353: </a>}
+<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"External packages do not support user-defined stopping test"</font>);
+
+<a name="line81"> 81: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+<a name="line82"> 82: </a>  EPS_SetInnerProduct(eps);
+<a name="line83"> 83: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,2);
+
+<a name="line85"> 85: </a>  PetscObjectTypeCompare((PetscObject)eps->V,BVVECS,&flg);
+<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
+<a name="line87"> 87: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line88"> 88: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line90"> 90: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line91"> 91: </a>  eps->ops->solve = EPSSolve_ARPACK;
+<a name="line92"> 92: </a>  <font color="#4169E1">return</font>(0);
+<a name="line93"> 93: </a>}
+
+<a name="line97"> 97: </a><strong><font color="#4169E1"><a name="EPSSolve_ARPACK"></a>PetscErrorCode EPSSolve_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line98"> 98: </a>{
+<a name="line100">100: </a>  EPS_ARPACK     *ar = (EPS_ARPACK*)eps->data;
+<a name="line101">101: </a>  char           bmat[1],howmny[] = <font color="#666666">"A"</font>;
+<a name="line102">102: </a>  const char     *which;
+<a name="line103">103: </a>  PetscBLASInt   n,iparam[11],ipntr[14],ido,info,nev,ncv;
+<a name="line104">104: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
+<a name="line105">105: </a>  PetscBLASInt   fcomm;
+<a name="line106">106: </a><font color="#A020F0">#endif</font>
+<a name="line107">107: </a>  PetscScalar    sigmar,*pV,*resid;
+<a name="line108">108: </a>  Vec            v0,x,y,w = eps->work[0];
+<a name="line109">109: </a>  Mat            A;
+<a name="line110">110: </a>  PetscBool      isSinv,isShift,rvec;
+<a name="line111">111: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line112">112: </a>  PetscScalar    sigmai = 0.0;
+<a name="line113">113: </a><font color="#A020F0">#endif</font>
+
+<a name="line116">116: </a>  PetscBLASIntCast(eps->nev,&nev);
+<a name="line117">117: </a>  PetscBLASIntCast(eps->ncv,&ncv);
+<a name="line118">118: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
+<a name="line119">119: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&fcomm);
+<a name="line120">120: </a><font color="#A020F0">#endif</font>
+<a name="line121">121: </a>  PetscBLASIntCast(eps->nloc,&n);
+<a name="line122">122: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&x);
+<a name="line123">123: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&y);
+<a name="line124">124: </a>  EPSGetStartVector(eps,0,NULL);
+<a name="line125">125: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,0);  <font color="#B22222">/* just for deflation space */</font>
+<a name="line126">126: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
+<a name="line127">127: </a>  VecCopy(v0,eps->work[1]);
+<a name="line128">128: </a>  VecGetArray(v0,&pV);
+<a name="line129">129: </a>  VecGetArray(eps->work[1],&resid);
+
+<a name="line131">131: </a>  ido  = 0;            <font color="#B22222">/* first call to reverse communication interface */</font>
+<a name="line132">132: </a>  info = 1;            <font color="#B22222">/* indicates a initial vector is provided */</font>
+<a name="line133">133: </a>  iparam[0] = 1;       <font color="#B22222">/* use exact shifts */</font>
+<a name="line134">134: </a>  PetscBLASIntCast(eps->max_it,&iparam[2]);  <font color="#B22222">/* max Arnoldi iterations */</font>
+<a name="line135">135: </a>  iparam[3] = 1;       <font color="#B22222">/* blocksize */</font>
+<a name="line136">136: </a>  iparam[4] = 0;       <font color="#B22222">/* number of converged Ritz values */</font>
+
+<a name="line138">138: </a>  <font color="#B22222">/*</font>
+<a name="line139">139: </a><font color="#B22222">     Computational modes ([]=not supported):</font>
+<a name="line140">140: </a><font color="#B22222">            symmetric    non-symmetric    complex</font>
+<a name="line141">141: </a><font color="#B22222">        1     1  'I'        1  'I'         1  'I'</font>
+<a name="line142">142: </a><font color="#B22222">        2     3  'I'        3  'I'         3  'I'</font>
+<a name="line143">143: </a><font color="#B22222">        3     2  'G'        2  'G'         2  'G'</font>
+<a name="line144">144: </a><font color="#B22222">        4     3  'G'        3  'G'         3  'G'</font>
+<a name="line145">145: </a><font color="#B22222">        5   [ 4  'G' ]    [ 3  'G' ]</font>
+<a name="line146">146: </a><font color="#B22222">        6   [ 5  'G' ]    [ 4  'G' ]</font>
+<a name="line147">147: </a><font color="#B22222">   */</font>
+<a name="line148">148: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&isSinv);
+<a name="line149">149: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSHIFT,&isShift);
+<a name="line150">150: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigmar);
+<a name="line151">151: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (isSinv) {
+<a name="line154">154: </a>    <font color="#B22222">/* shift-and-invert mode */</font>
+<a name="line155">155: </a>    iparam[6] = 3;
+<a name="line156">156: </a>    <font color="#4169E1">if</font> (eps->ispositive) bmat[0] = 'G';
+<a name="line157">157: </a>    <font color="#4169E1">else</font> bmat[0] = 'I';
+<a name="line158">158: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isShift && eps->ispositive) {
+<a name="line159">159: </a>    <font color="#B22222">/* generalized shift mode with B positive definite */</font>
+<a name="line160">160: </a>    iparam[6] = 2;
+<a name="line161">161: </a>    bmat[0] = 'G';
+<a name="line162">162: </a>  } <font color="#4169E1">else</font> {
+<a name="line163">163: </a>    <font color="#B22222">/* regular mode */</font>
+<a name="line164">164: </a>    <font color="#4169E1">if</font> (eps->ishermitian && eps->isgeneralized)
+<a name="line165">165: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectral transformation not supported by ARPACK hermitian solver"</font>);
+<a name="line166">166: </a>    iparam[6] = 1;
+<a name="line167">167: </a>    bmat[0] = 'I';
+<a name="line168">168: </a>  }
+
+<a name="line170">170: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line171">171: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line172">172: </a>      <font color="#4169E1">switch</font> (eps->which) {
+<a name="line173">173: </a>        <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line174">174: </a>        <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:  which = <font color="#666666">"LM"</font>; <font color="#4169E1">break</font>;
+<a name="line175">175: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE: which = <font color="#666666">"SM"</font>; <font color="#4169E1">break</font>;
+<a name="line176">176: </a>        <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line177">177: </a>        <font color="#4169E1">case</font> EPS_LARGEST_REAL:       which = <font color="#666666">"LA"</font>; <font color="#4169E1">break</font>;
+<a name="line178">178: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_REAL:      which = <font color="#666666">"SA"</font>; <font color="#4169E1">break</font>;
+<a name="line179">179: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Wrong value of eps->which"</font>);
+<a name="line180">180: </a>      }
+<a name="line181">181: </a>    } <font color="#4169E1">else</font> {
+<a name="line182">182: </a><font color="#A020F0">#endif</font>
+<a name="line183">183: </a>      <font color="#4169E1">switch</font> (eps->which) {
+<a name="line184">184: </a>        <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line185">185: </a>        <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:  which = <font color="#666666">"LM"</font>; <font color="#4169E1">break</font>;
+<a name="line186">186: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE: which = <font color="#666666">"SM"</font>; <font color="#4169E1">break</font>;
+<a name="line187">187: </a>        <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line188">188: </a>        <font color="#4169E1">case</font> EPS_LARGEST_REAL:       which = <font color="#666666">"LR"</font>; <font color="#4169E1">break</font>;
+<a name="line189">189: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_REAL:      which = <font color="#666666">"SR"</font>; <font color="#4169E1">break</font>;
+<a name="line190">190: </a>        <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
+<a name="line191">191: </a>        <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:  which = <font color="#666666">"LI"</font>; <font color="#4169E1">break</font>;
+<a name="line192">192: </a>        <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY: which = <font color="#666666">"SI"</font>; <font color="#4169E1">break</font>;
+<a name="line193">193: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Wrong value of eps->which"</font>);
+<a name="line194">194: </a>      }
+<a name="line195">195: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line196">196: </a>    }
+<a name="line197">197: </a><font color="#A020F0">#endif</font>
+
+<a name="line199">199: </a>  <font color="#4169E1">do</font> {
+
+<a name="line201">201: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line202">202: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line203">203: </a>      PetscStackCall(<font color="#666666">"ARPACKsaupd"</font>,ARPACKsaupd_(&fcomm,&ido,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
+<a name="line204">204: </a>    } <font color="#4169E1">else</font> {
+<a name="line205">205: </a>      PetscStackCall(<font color="#666666">"ARPACKnaupd"</font>,ARPACKnaupd_(&fcomm,&ido,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
+<a name="line206">206: </a>    }
+<a name="line207">207: </a><font color="#A020F0">#else</font>
+<a name="line208">208: </a>    PetscStackCall(<font color="#666666">"ARPACKnaupd"</font>,ARPACKnaupd_(&fcomm,&ido,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,ar->rwork,&info));
+<a name="line209">209: </a><font color="#A020F0">#endif</font>
+
+<a name="line211">211: </a>    <font color="#4169E1">if</font> (ido == -1 || ido == 1 || ido == 2) {
+<a name="line212">212: </a>      <font color="#4169E1">if</font> (ido == 1 && iparam[6] == 3 && bmat[0] == 'G') {
+<a name="line213">213: </a>        <font color="#B22222">/* special case for shift-and-invert with B semi-positive definite*/</font>
+<a name="line214">214: </a>        VecPlaceArray(x,&ar->workd[ipntr[2]-1]);
+<a name="line215">215: </a>      } <font color="#4169E1">else</font> {
+<a name="line216">216: </a>        VecPlaceArray(x,&ar->workd[ipntr[0]-1]);
+<a name="line217">217: </a>      }
+<a name="line218">218: </a>      VecPlaceArray(y,&ar->workd[ipntr[1]-1]);
+
+<a name="line220">220: </a>      <font color="#4169E1">if</font> (ido == -1) {
+<a name="line221">221: </a>        <font color="#B22222">/* Y = OP * X for for the initialization phase to</font>
+<a name="line222">222: </a><font color="#B22222">           force the starting vector into the range of OP */</font>
+<a name="line223">223: </a>        <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
+<a name="line224">224: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ido == 2) {
+<a name="line225">225: </a>        <font color="#B22222">/* Y = B * X */</font>
+<a name="line226">226: </a>        <a href="../../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,x,y);
+<a name="line227">227: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* ido == 1 */</font>
+<a name="line228">228: </a>        <font color="#4169E1">if</font> (iparam[6] == 3 && bmat[0] == 'G') {
+<a name="line229">229: </a>          <font color="#B22222">/* Y = OP * X for shift-and-invert with B semi-positive definite */</font>
+<a name="line230">230: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,y);
+<a name="line231">231: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (iparam[6] == 2) {
+<a name="line232">232: </a>          <font color="#B22222">/* X=A*X Y=B^-1*X for shift with B positive definite */</font>
+<a name="line233">233: </a>          MatMult(A,x,y);
+<a name="line234">234: </a>          <font color="#4169E1">if</font> (sigmar != 0.0) {
+<a name="line235">235: </a>            <a href="../../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,x,w);
+<a name="line236">236: </a>            VecAXPY(y,sigmar,w);
+<a name="line237">237: </a>          }
+<a name="line238">238: </a>          VecCopy(y,x);
+<a name="line239">239: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,y);
+<a name="line240">240: </a>        } <font color="#4169E1">else</font> {
+<a name="line241">241: </a>          <font color="#B22222">/* Y = OP * X */</font>
+<a name="line242">242: </a>          <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
+<a name="line243">243: </a>        }
+<a name="line244">244: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(eps->V,y,NULL,NULL,NULL);
+<a name="line245">245: </a>      }
+
+<a name="line247">247: </a>      VecResetArray(x);
+<a name="line248">248: </a>      VecResetArray(y);
+<a name="line249">249: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ido != 99) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Internal error in ARPACK reverse comunication interface (ido=%d)"</font>,ido);
+
+<a name="line251">251: </a>  } <font color="#4169E1">while</font> (ido != 99);
+
+<a name="line253">253: </a>  eps->nconv = iparam[4];
+<a name="line254">254: </a>  eps->its = iparam[2];
+
+<a name="line256">256: </a>  <font color="#4169E1">if</font> (info==3) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"No shift could be applied in xxAUPD.\nTry increasing the size of NCV relative to NEV"</font>);
+<a name="line257">257: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (info!=0 && info!=1) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error reported by ARPACK subroutine xxAUPD (%d)"</font>,info);
+
+<a name="line259">259: </a>  rvec = PETSC_TRUE;
+
+<a name="line261">261: </a>  <font color="#4169E1">if</font> (eps->nconv > 0) {
+<a name="line262">262: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line263">263: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line264">264: </a>      EPSMonitor(eps,iparam[2],iparam[4],&ar->workl[ipntr[5]-1],eps->eigi,&ar->workl[ipntr[6]-1],eps->ncv);
+<a name="line265">265: </a>      PetscStackCall(<font color="#666666">"ARPACKseupd"</font>,ARPACKseupd_(&fcomm,&rvec,howmny,ar->select,eps->eigr,pV,&n,&sigmar,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
+<a name="line266">266: </a>    } <font color="#4169E1">else</font> {
+<a name="line267">267: </a>      EPSMonitor(eps,iparam[2],iparam[4],&ar->workl[ipntr[5]-1],&ar->workl[ipntr[6]-1],&ar->workl[ipntr[7]-1],eps->ncv);
+<a name="line268">268: </a>      PetscStackCall(<font color="#666666">"ARPACKneupd"</font>,ARPACKneupd_(&fcomm,&rvec,howmny,ar->select,eps->eigr,eps->eigi,pV,&n,&sigmar,&sigmai,ar->workev,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,&info));
+<a name="line269">269: </a>    }
+<a name="line270">270: </a><font color="#A020F0">#else</font>
+<a name="line271">271: </a>    EPSMonitor(eps,eps->its,iparam[4],&ar->workl[ipntr[5]-1],eps->eigi,(PetscReal*)&ar->workl[ipntr[7]-1],eps->ncv);
+<a name="line272">272: </a>    PetscStackCall(<font color="#666666">"ARPACKneupd"</font>,ARPACKneupd_(&fcomm,&rvec,howmny,ar->select,eps->eigr,pV,&n,&sigmar,ar->workev,bmat,&n,which,&nev,&eps->tol,resid,&ncv,pV,&n,iparam,ipntr,ar->workd,ar->workl,&ar->lworkl,ar->rwork,&info));
+<a name="line273">273: </a><font color="#A020F0">#endif</font>
+<a name="line274">274: </a>    <font color="#4169E1">if</font> (info!=0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error reported by ARPACK subroutine xxEUPD (%d)"</font>,info);
+<a name="line275">275: </a>  }
+
+<a name="line277">277: </a>  VecRestoreArray(v0,&pV);
+<a name="line278">278: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
+<a name="line279">279: </a>  VecRestoreArray(eps->work[1],&resid);
+<a name="line280">280: </a>  <font color="#4169E1">if</font> (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+<a name="line281">281: </a>  <font color="#4169E1">else</font> eps->reason = EPS_DIVERGED_ITS;
+
+<a name="line283">283: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line284">284: </a>    PetscMemcpy(eps->errest,&ar->workl[ipntr[8]-1],eps->nconv);
+<a name="line285">285: </a>  } <font color="#4169E1">else</font> {
+<a name="line286">286: </a>    PetscMemcpy(eps->errest,&ar->workl[ipntr[10]-1],eps->nconv);
+<a name="line287">287: </a>  }
+
+<a name="line289">289: </a>  VecDestroy(&x);
+<a name="line290">290: </a>  VecDestroy(&y);
+<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
+<a name="line292">292: </a>}
+
+<a name="line296">296: </a><strong><font color="#4169E1"><a name="EPSBackTransform_ARPACK"></a>PetscErrorCode EPSBackTransform_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line297">297: </a>{
+<a name="line299">299: </a>  PetscBool      isSinv;
+
+<a name="line302">302: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSINVERT,&isSinv);
+<a name="line303">303: </a>  <font color="#4169E1">if</font> (!isSinv) {
+<a name="line304">304: </a>    EPSBackTransform_Default(eps);
+<a name="line305">305: </a>  }
+<a name="line306">306: </a>  <font color="#4169E1">return</font>(0);
+<a name="line307">307: </a>}
+
+<a name="line311">311: </a><strong><font color="#4169E1"><a name="EPSReset_ARPACK"></a>PetscErrorCode EPSReset_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line312">312: </a>{
+<a name="line314">314: </a>  EPS_ARPACK     *ar = (EPS_ARPACK*)eps->data;
+
+<a name="line317">317: </a>  PetscFree(ar->workev);
+<a name="line318">318: </a>  PetscFree(ar->workl);
+<a name="line319">319: </a>  PetscFree(ar->select);
+<a name="line320">320: </a>  PetscFree(ar->workd);
+<a name="line321">321: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line322">322: </a>  PetscFree(ar->rwork);
+<a name="line323">323: </a><font color="#A020F0">#endif</font>
+<a name="line324">324: </a>  <font color="#4169E1">return</font>(0);
+<a name="line325">325: </a>}
+
+<a name="line329">329: </a><strong><font color="#4169E1"><a name="EPSDestroy_ARPACK"></a>PetscErrorCode EPSDestroy_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line330">330: </a>{
+
+<a name="line334">334: </a>  PetscFree(eps->data);
+<a name="line335">335: </a>  <font color="#4169E1">return</font>(0);
+<a name="line336">336: </a>}
+
+<a name="line340">340: </a><strong><font color="#4169E1"><a name="EPSCreate_ARPACK"></a>PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line341">341: </a>{
+<a name="line342">342: </a>  EPS_ARPACK     *ctx;
+
+<a name="line346">346: </a>  PetscNewLog(eps,&ctx);
+<a name="line347">347: </a>  eps->data = (void*)ctx;
+
+<a name="line349">349: </a>  eps->ops->setup                = EPSSetUp_ARPACK;
+<a name="line350">350: </a>  eps->ops->destroy              = EPSDestroy_ARPACK;
+<a name="line351">351: </a>  eps->ops->reset                = EPSReset_ARPACK;
+<a name="line352">352: </a>  eps->ops->backtransform        = EPSBackTransform_ARPACK;
+<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
+<a name="line354">354: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/arpack/arpackp.h b/src/eps/impls/external/arpack/arpackp.h
index 6d0076f..abc7d47 100644
--- a/src/eps/impls/external/arpack/arpackp.h
+++ b/src/eps/impls/external/arpack/arpackp.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/eps/impls/external/arpack/arpackp.h.html b/src/eps/impls/external/arpack/arpackp.h.html
index 6da8aff..46e2058 100644
--- a/src/eps/impls/external/arpack/arpackp.h.html
+++ b/src/eps/impls/external/arpack/arpackp.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/arpack/arpackp.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:17+00:00">
+<meta name="date" content="2016-05-16T10:33:13+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/arpack/arpackp.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/arpack/arpackp.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private data structure used by the ARPACK interface</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/eps/impls/external/arpack/index.html b/src/eps/impls/external/arpack/index.html
index 87b4857..fc1a099 100644
--- a/src/eps/impls/external/arpack/index.html
+++ b/src/eps/impls/external/arpack/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/arpack/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/arpack/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/arpack/makefile b/src/eps/impls/external/arpack/makefile
index a7ae2db..e86ddc6 100644
--- a/src/eps/impls/external/arpack/makefile
+++ b/src/eps/impls/external/arpack/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/external/arpack/makefile.html b/src/eps/impls/external/arpack/makefile.html
index 97fd4fe..be92548 100644
--- a/src/eps/impls/external/arpack/makefile.html
+++ b/src/eps/impls/external/arpack/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/arpack/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:17+00:00">
+<meta name="date" content="2016-05-16T10:33:13+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/arpack/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/arpack/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/external/blopex/blopex.c b/src/eps/impls/external/blopex/blopex.c
index 6ff103d..3dfc01d 100644
--- a/src/eps/impls/external/blopex/blopex.c
+++ b/src/eps/impls/external/blopex/blopex.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -28,6 +28,8 @@
 #include <blopex_multivector.h>
 #include <blopex_temp_multivector.h>
 
+PetscInt slepc_blopex_useconstr = -1;
+
 PetscErrorCode EPSSolve_BLOPEX(EPS);
 
 typedef struct {
@@ -168,6 +170,7 @@ PetscErrorCode EPSSetUp_BLOPEX(EPS eps)
   if (!eps->which) eps->which = EPS_SMALLEST_REAL;
   if (eps->which!=EPS_SMALLEST_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),1,"Wrong value of eps->which");
   if (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Arbitrary selection of eigenpairs not supported in this solver");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"External packages do not support user-defined stopping test");
   if (eps->extraction) { ierr = PetscInfo(eps,"Warning: extraction type ignored\n");CHKERRQ(ierr); }
   ierr = RGIsTrivial(eps->rg,&istrivial);CHKERRQ(ierr);
   if (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"This solver does not support region filtering");
@@ -177,7 +180,7 @@ PetscErrorCode EPSSetUp_BLOPEX(EPS eps)
   if (!isPrecond) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"blopex only works with STPRECOND");
   blopex->st = eps->st;
 
-  if (eps->converged == EPSConvergedEigRelative) {
+  if (eps->converged == EPSConvergedRelative) {
     blopex->tol.absolute = 0.0;
     blopex->tol.relative = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
   } else if (eps->converged == EPSConvergedAbsolute) {
@@ -237,18 +240,18 @@ PetscErrorCode EPSSolve_BLOPEX(EPS eps)
 
   /* Complete the initial basis with random vectors */
   for (i=eps->nini;i<eps->ncv;i++) {
-    ierr = BVSetRandomColumn(eps->V,i,eps->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(eps->V,i);CHKERRQ(ierr);
   }
 
   while (eps->reason == EPS_CONVERGED_ITERATING) {
 
     /* Create multivector of constraints from leading columns of V */
-    ierr = PetscObjectComposedDataSetInt((PetscObject)eps->V,SLEPC_BLOPEX_USECONSTR,1);CHKERRQ(ierr);
+    ierr = PetscObjectComposedDataSetInt((PetscObject)eps->V,slepc_blopex_useconstr,1);CHKERRQ(ierr);
     ierr = BVSetActiveColumns(eps->V,0,eps->nconv);CHKERRQ(ierr);
     constraints = mv_MultiVectorCreateFromSampleVector(&blopex->ii,eps->nds+eps->nconv,eps->V);
 
     /* Create multivector where eigenvectors of this run will be stored */
-    ierr = PetscObjectComposedDataSetInt((PetscObject)eps->V,SLEPC_BLOPEX_USECONSTR,0);CHKERRQ(ierr);
+    ierr = PetscObjectComposedDataSetInt((PetscObject)eps->V,slepc_blopex_useconstr,0);CHKERRQ(ierr);
     ierr = BVSetActiveColumns(eps->V,eps->nconv,eps->nconv+blopex->bs);CHKERRQ(ierr);
     eigenvectors = mv_MultiVectorCreateFromSampleVector(&blopex->ii,blopex->bs,eps->V);
 
@@ -388,7 +391,7 @@ PetscErrorCode EPSBLOPEXGetBlockSize(EPS eps,PetscInt *bs)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(bs,2);
-  ierr = PetscTryMethod(eps,"EPSBLOPEXGetBlockSize_C",(EPS,PetscInt*),(eps,bs));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSBLOPEXGetBlockSize_C",(EPS,PetscInt*),(eps,bs));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -436,7 +439,7 @@ PetscErrorCode EPSView_BLOPEX(EPS eps,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_BLOPEX"
-PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   KSP            ksp;
@@ -483,9 +486,10 @@ PETSC_EXTERN PetscErrorCode EPSCreate_BLOPEX(EPS eps)
   eps->ops->reset          = EPSReset_BLOPEX;
   eps->ops->view           = EPSView_BLOPEX;
   eps->ops->backtransform  = EPSBackTransform_Default;
-  LOBPCG_InitRandomContext(PetscObjectComm((PetscObject)eps),eps->rand);
+  LOBPCG_InitRandomContext(PetscObjectComm((PetscObject)eps),NULL);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSBLOPEXSetBlockSize_C",EPSBLOPEXSetBlockSize_BLOPEX);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSBLOPEXGetBlockSize_C",EPSBLOPEXGetBlockSize_BLOPEX);CHKERRQ(ierr);
+  if (slepc_blopex_useconstr < 0) { ierr = PetscObjectComposedDataRegister(&slepc_blopex_useconstr);CHKERRQ(ierr); }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/external/blopex/blopex.c.html b/src/eps/impls/external/blopex/blopex.c.html
index 0d65a76..3c7e12a 100644
--- a/src/eps/impls/external/blopex/blopex.c.html
+++ b/src/eps/impls/external/blopex/blopex.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blopex/blopex.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:17+00:00">
+<meta name="date" content="2016-05-16T10:33:13+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/blopex.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/blopex.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the BLOPEX package</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -40,395 +40,399 @@
 <a name="line28"> 28: </a><font color="#A020F0">#include <blopex_multivector.h></font>
 <a name="line29"> 29: </a><font color="#A020F0">#include <blopex_temp_multivector.h></font>
 
-<a name="line31"> 31: </a><strong><font color="#4169E1">PetscErrorCode EPSSolve_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-
-<a name="line33"> 33: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line34"> 34: </a>  lobpcg_Tolerance           tol;
-<a name="line35"> 35: </a>  lobpcg_BLASLAPACKFunctions blap_fn;
-<a name="line36"> 36: </a>  mv_InterfaceInterpreter    ii;
-<a name="line37"> 37: </a>  <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>                         st;
-<a name="line38"> 38: </a>  Vec                        w;
-<a name="line39"> 39: </a>  PetscInt                   bs;     <font color="#B22222">/* block size */</font>
-<a name="line40"> 40: </a>} EPS_BLOPEX;
-
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="Precond_FnSingleVector"></a>static void Precond_FnSingleVector(void *data,void *x,void *y)</font></strong>
-<a name="line45"> 45: </a>{
-<a name="line47"> 47: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)data;
-<a name="line48"> 48: </a>  MPI_Comm       comm = PetscObjectComm((PetscObject)blopex->st);
-<a name="line49"> 49: </a>  KSP            ksp;
-
-<a name="line52"> 52: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(blopex->st,&ksp);CHKERRABORT(comm,ierr);
-<a name="line53"> 53: </a>  KSPSolve(ksp,(Vec)x,(Vec)y);CHKERRABORT(comm,ierr);
-<a name="line54"> 54: </a>  PetscFunctionReturnVoid();
-<a name="line55"> 55: </a>}
-
-<a name="line59"> 59: </a><strong><font color="#4169E1"><a name="Precond_FnMultiVector"></a>static void Precond_FnMultiVector(void *data,void *x,void *y)</font></strong>
-<a name="line60"> 60: </a>{
-<a name="line61"> 61: </a>  EPS_BLOPEX *blopex = (EPS_BLOPEX*)data;
-
-<a name="line64"> 64: </a>  blopex->ii.Eval(Precond_FnSingleVector,data,x,y);
-<a name="line65"> 65: </a>  PetscFunctionReturnVoid();
-<a name="line66"> 66: </a>}
-
-<a name="line70"> 70: </a><strong><font color="#4169E1"><a name="OperatorASingleVector"></a>static void OperatorASingleVector(void *data,void *x,void *y)</font></strong>
-<a name="line71"> 71: </a>{
-<a name="line73"> 73: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)data;
-<a name="line74"> 74: </a>  MPI_Comm       comm = PetscObjectComm((PetscObject)blopex->st);
-<a name="line75"> 75: </a>  Mat            A,B;
-<a name="line76"> 76: </a>  PetscScalar    sigma;
-<a name="line77"> 77: </a>  PetscInt       nmat;
-
-<a name="line80"> 80: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(blopex->st,&nmat);CHKERRABORT(comm,ierr);
-<a name="line81"> 81: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(blopex->st,0,&A);CHKERRABORT(comm,ierr);
-<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(blopex->st,1,&B);CHKERRABORT(comm,ierr); }
-<a name="line83"> 83: </a>  MatMult(A,(Vec)x,(Vec)y);CHKERRABORT(comm,ierr);
-<a name="line84"> 84: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(blopex->st,&sigma);CHKERRABORT(comm,ierr);
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (sigma != 0.0) {
-<a name="line86"> 86: </a>    <font color="#4169E1">if</font> (nmat>1) {
-<a name="line87"> 87: </a>      MatMult(B,(Vec)x,blopex->w);CHKERRABORT(comm,ierr);
-<a name="line88"> 88: </a>    } <font color="#4169E1">else</font> {
-<a name="line89"> 89: </a>      VecCopy((Vec)x,blopex->w);CHKERRABORT(comm,ierr);
-<a name="line90"> 90: </a>    }
-<a name="line91"> 91: </a>    VecAXPY((Vec)y,-sigma,blopex->w);CHKERRABORT(comm,ierr);
-<a name="line92"> 92: </a>  }
-<a name="line93"> 93: </a>  PetscFunctionReturnVoid();
-<a name="line94"> 94: </a>}
-
-<a name="line98"> 98: </a><strong><font color="#4169E1"><a name="OperatorAMultiVector"></a>static void OperatorAMultiVector(void *data,void *x,void *y)</font></strong>
-<a name="line99"> 99: </a>{
-<a name="line100">100: </a>  EPS_BLOPEX *blopex = (EPS_BLOPEX*)data;
-
-<a name="line103">103: </a>  blopex->ii.Eval(OperatorASingleVector,data,x,y);
-<a name="line104">104: </a>  PetscFunctionReturnVoid();
-<a name="line105">105: </a>}
-
-<a name="line109">109: </a><strong><font color="#4169E1"><a name="OperatorBSingleVector"></a>static void OperatorBSingleVector(void *data,void *x,void *y)</font></strong>
-<a name="line110">110: </a>{
-<a name="line112">112: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)data;
-<a name="line113">113: </a>  MPI_Comm       comm = PetscObjectComm((PetscObject)blopex->st);
-<a name="line114">114: </a>  Mat            B;
-
-<a name="line117">117: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(blopex->st,1,&B);CHKERRABORT(comm,ierr);
-<a name="line118">118: </a>  MatMult(B,(Vec)x,(Vec)y);CHKERRABORT(comm,ierr);
-<a name="line119">119: </a>  PetscFunctionReturnVoid();
-<a name="line120">120: </a>}
-
-<a name="line124">124: </a><strong><font color="#4169E1"><a name="OperatorBMultiVector"></a>static void OperatorBMultiVector(void *data,void *x,void *y)</font></strong>
-<a name="line125">125: </a>{
-<a name="line126">126: </a>  EPS_BLOPEX *blopex = (EPS_BLOPEX*)data;
-
-<a name="line129">129: </a>  blopex->ii.Eval(OperatorBSingleVector,data,x,y);
-<a name="line130">130: </a>  PetscFunctionReturnVoid();
-<a name="line131">131: </a>}
-
-<a name="line135">135: </a><strong><font color="#4169E1"><a name="EPSSetDimensions_BLOPEX"></a>PetscErrorCode EPSSetDimensions_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line136">136: </a>{
-<a name="line138">138: </a>  EPS_BLOPEX     *ctx = (EPS_BLOPEX*)eps->data;
-<a name="line139">139: </a>  PetscInt       k;
-
-<a name="line142">142: </a>  k = ((eps->nev-1)/ctx->bs+1)*ctx->bs;
-<a name="line143">143: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line144">144: </a>    <font color="#4169E1">if</font> (*ncv<k) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The value of ncv is not sufficiently large"</font>);
-<a name="line145">145: </a>  } <font color="#4169E1">else</font> *ncv = k;
-<a name="line146">146: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
-<a name="line147">147: </a>  <font color="#4169E1">else</font> { PetscInfo(eps,<font color="#666666">"Warning: given value of mpd ignored\n"</font>); }
-<a name="line148">148: </a>  <font color="#4169E1">return</font>(0);
-<a name="line149">149: </a>}
-
-<a name="line153">153: </a><strong><font color="#4169E1"><a name="EPSSetUp_BLOPEX"></a>PetscErrorCode EPSSetUp_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line154">154: </a>{
-<a name="line155">155: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_POTRF) || defined(PETSC_MISSING_LAPACK_SYGV)</font>
-<a name="line157">157: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"POTRF/SYGV - Lapack routine is unavailable"</font>);
-<a name="line158">158: </a><font color="#A020F0">#else</font>
-<a name="line160">160: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)eps->data;
-<a name="line161">161: </a>  PetscBool      isPrecond,istrivial,flg;
-
-<a name="line164">164: </a>  <font color="#4169E1">if</font> (!eps->ishermitian || (eps->isgeneralized && !eps->ispositive)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"blopex only works for Hermitian problems"</font>);
-<a name="line165">165: </a>  <font color="#4169E1">if</font> (!blopex->bs) blopex->bs = PetscMin(16,eps->nev);
-<a name="line166">166: </a>  EPSSetDimensions_BLOPEX(eps,eps->nev,&eps->ncv,&eps->mpd);
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = PetscMax(100,2*eps->n/eps->ncv);
-<a name="line168">168: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_SMALLEST_REAL;
-<a name="line169">169: </a>  <font color="#4169E1">if</font> (eps->which!=EPS_SMALLEST_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
-<a name="line170">170: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
-<a name="line171">171: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
-<a name="line172">172: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line173">173: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
-<a name="line176">176: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&isPrecond);
-<a name="line177">177: </a>  <font color="#4169E1">if</font> (!isPrecond) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"blopex only works with STPRECOND"</font>);
-<a name="line178">178: </a>  blopex->st = eps->st;
-
-<a name="line180">180: </a>  <font color="#4169E1">if</font> (eps->converged == EPSConvergedEigRelative) {
-<a name="line181">181: </a>    blopex->tol.absolute = 0.0;
-<a name="line182">182: </a>    blopex->tol.relative = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
-<a name="line183">183: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->converged == EPSConvergedAbsolute) {
-<a name="line184">184: </a>    blopex->tol.absolute = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
-<a name="line185">185: </a>    blopex->tol.relative = 0.0;
-<a name="line186">186: </a>  } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Convergence test not supported in this solver"</font>);
-
-<a name="line188">188: </a>  SLEPCSetupInterpreter(&blopex->ii);
-
-<a name="line190">190: </a>  <font color="#B22222">/* allocate memory */</font>
-<a name="line191">191: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line192">192: </a>  PetscObjectTypeCompareAny((PetscObject)eps->V,&flg,BVVECS,BVCONTIGUOUS,<font color="#666666">""</font>);
-<a name="line193">193: </a>  <font color="#4169E1">if</font> (!flg) {  <font color="#B22222">/* blopex only works with BVVECS or BVCONTIGUOUS */</font>
-<a name="line194">194: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(eps->V,BVCONTIGUOUS);
-<a name="line195">195: </a>  }
-<a name="line196">196: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-<a name="line197">197: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&blopex->w);
-<a name="line198">198: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)blopex->w);
-
-<a name="line200">200: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line201">201: </a>  blopex->blap_fn.zpotrf = PETSC_zpotrf_interface;
-<a name="line202">202: </a>  blopex->blap_fn.zhegv = PETSC_zsygv_interface;
-<a name="line203">203: </a><font color="#A020F0">#else</font>
-<a name="line204">204: </a>  blopex->blap_fn.dpotrf = PETSC_dpotrf_interface;
-<a name="line205">205: </a>  blopex->blap_fn.dsygv = PETSC_dsygv_interface;
-<a name="line206">206: </a><font color="#A020F0">#endif</font>
-
-<a name="line208">208: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line209">209: </a>  eps->ops->solve = EPSSolve_BLOPEX;
-<a name="line210">210: </a>  <font color="#4169E1">return</font>(0);
-<a name="line211">211: </a><font color="#A020F0">#endif</font>
-<a name="line212">212: </a>}
-
-<a name="line216">216: </a><strong><font color="#4169E1"><a name="EPSSolve_BLOPEX"></a>PetscErrorCode EPSSolve_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line217">217: </a>{
-<a name="line218">218: </a>  EPS_BLOPEX        *blopex = (EPS_BLOPEX*)eps->data;
-<a name="line219">219: </a>  PetscScalar       sigma,*eigr=NULL;
-<a name="line220">220: </a>  PetscReal         *errest=NULL;
-<a name="line221">221: </a>  int               i,j,info,its,nconv;
-<a name="line222">222: </a>  double            *residhist=NULL;
-<a name="line223">223: </a>  PetscErrorCode    ierr;
-<a name="line224">224: </a>  mv_MultiVectorPtr eigenvectors,constraints;
-<a name="line225">225: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line226">226: </a>  komplex           *lambda=NULL,*lambdahist=NULL;
-<a name="line227">227: </a><font color="#A020F0">#else</font>
-<a name="line228">228: </a>  double            *lambda=NULL,*lambdahist=NULL;
-<a name="line229">229: </a><font color="#A020F0">#endif</font>
-
-<a name="line232">232: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigma);
-<a name="line233">233: </a>  PetscMalloc1(blopex->bs,&lambda);
-<a name="line234">234: </a>  <font color="#4169E1">if</font> (eps->numbermonitors>0) {
-<a name="line235">235: </a>    PetscMalloc4(blopex->bs*(eps->max_it+1),&lambdahist,eps->ncv,&eigr,blopex->bs*(eps->max_it+1),&residhist,eps->ncv,&errest);
-<a name="line236">236: </a>  }
-
-<a name="line238">238: </a>  <font color="#B22222">/* Complete the initial basis with random vectors */</font>
-<a name="line239">239: </a>  <font color="#4169E1">for</font> (i=eps->nini;i<eps->ncv;i++) {
-<a name="line240">240: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,i,eps->rand);
-<a name="line241">241: </a>  }
-
-<a name="line243">243: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-
-<a name="line245">245: </a>    <font color="#B22222">/* Create multivector of constraints from leading columns of V */</font>
-<a name="line246">246: </a>    PetscObjectComposedDataSetInt((PetscObject)eps->V,SLEPC_BLOPEX_USECONSTR,1);
-<a name="line247">247: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,eps->nconv);
-<a name="line248">248: </a>    constraints = mv_MultiVectorCreateFromSampleVector(&blopex->ii,eps->nds+eps->nconv,eps->V);
-
-<a name="line250">250: </a>    <font color="#B22222">/* Create multivector where eigenvectors of this run will be stored */</font>
-<a name="line251">251: </a>    PetscObjectComposedDataSetInt((PetscObject)eps->V,SLEPC_BLOPEX_USECONSTR,0);
-<a name="line252">252: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,eps->nconv+blopex->bs);
-<a name="line253">253: </a>    eigenvectors = mv_MultiVectorCreateFromSampleVector(&blopex->ii,blopex->bs,eps->V);
-
-<a name="line255">255: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line256">256: </a>    info = lobpcg_solve_complex(eigenvectors,blopex,OperatorAMultiVector,
-<a name="line257">257: </a>          eps->isgeneralized?blopex:NULL,eps->isgeneralized?OperatorBMultiVector:NULL,
-<a name="line258">258: </a>          blopex,Precond_FnMultiVector,constraints,
-<a name="line259">259: </a>          blopex->blap_fn,blopex->tol,eps->max_it,0,&its,
-<a name="line260">260: </a>          lambda,lambdahist,blopex->bs,eps->errest+eps->nconv,residhist,blopex->bs);
-<a name="line261">261: </a><font color="#A020F0">#else</font>
-<a name="line262">262: </a>    info = lobpcg_solve_double(eigenvectors,blopex,OperatorAMultiVector,
-<a name="line263">263: </a>          eps->isgeneralized?blopex:NULL,eps->isgeneralized?OperatorBMultiVector:NULL,
-<a name="line264">264: </a>          blopex,Precond_FnMultiVector,constraints,
-<a name="line265">265: </a>          blopex->blap_fn,blopex->tol,eps->max_it,0,&its,
-<a name="line266">266: </a>          lambda,lambdahist,blopex->bs,eps->errest+eps->nconv,residhist,blopex->bs);
-<a name="line267">267: </a><font color="#A020F0">#endif</font>
-<a name="line268">268: </a>    <font color="#4169E1">if</font> (info>0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"BLOPEX failed with exit code=%d"</font>,info);
-<a name="line269">269: </a>    mv_MultiVectorDestroy(constraints);
-<a name="line270">270: </a>    mv_MultiVectorDestroy(eigenvectors);
-
-<a name="line272">272: </a>    <font color="#4169E1">for</font> (j=0;j<blopex->bs;j++) {
-<a name="line273">273: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line274">274: </a>      eps->eigr[eps->nconv+j] = lambda[j].real+PETSC_i*lambda[j].imag;
-<a name="line275">275: </a><font color="#A020F0">#else</font>
-<a name="line276">276: </a>      eps->eigr[eps->nconv+j] = lambda[j];
-<a name="line277">277: </a><font color="#A020F0">#endif</font>
-<a name="line278">278: </a>    }
-
-<a name="line280">280: </a>    <font color="#4169E1">if</font> (eps->numbermonitors>0) {
-<a name="line281">281: </a>      <font color="#4169E1">for</font> (i=0;i<its;i++) {
-<a name="line282">282: </a>        nconv = 0;
-<a name="line283">283: </a>        <font color="#4169E1">for</font> (j=0;j<blopex->bs;j++) {
-<a name="line284">284: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line285">285: </a>          eigr[eps->nconv+j] = lambdahist[j+i*blopex->bs].real+PETSC_i*lambdahist[j+i*blopex->bs].imag;
-<a name="line286">286: </a><font color="#A020F0">#else</font>
-<a name="line287">287: </a>          eigr[eps->nconv+j] = lambdahist[j+i*blopex->bs];
-<a name="line288">288: </a><font color="#A020F0">#endif</font>
-<a name="line289">289: </a>          errest[eps->nconv+j] = residhist[j+i*blopex->bs];
-<a name="line290">290: </a>          <font color="#4169E1">if</font> (residhist[j+i*blopex->bs]<=eps->tol) nconv++;
-<a name="line291">291: </a>        }
-<a name="line292">292: </a>        EPSMonitor(eps,eps->its+i,eps->nconv+nconv,eigr,eps->eigi,errest,eps->nconv+blopex->bs);
-<a name="line293">293: </a>      }
-<a name="line294">294: </a>    }
-
-<a name="line296">296: </a>    eps->its += its;
-<a name="line297">297: </a>    <font color="#4169E1">if</font> (info==-1) {
-<a name="line298">298: </a>      eps->reason = EPS_DIVERGED_ITS;
-<a name="line299">299: </a>      <font color="#4169E1">break</font>;
-<a name="line300">300: </a>    } <font color="#4169E1">else</font> {
-<a name="line301">301: </a>      <font color="#4169E1">for</font> (i=0;i<blopex->bs;i++) {
-<a name="line302">302: </a>        <font color="#4169E1">if</font> (sigma != 0.0) eps->eigr[eps->nconv+i] += sigma;
-<a name="line303">303: </a>      }
-<a name="line304">304: </a>      eps->nconv += blopex->bs;
-<a name="line305">305: </a>      <font color="#4169E1">if</font> (eps->nconv>=eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line306">306: </a>    }
-<a name="line307">307: </a>  }
-
-<a name="line309">309: </a>  PetscFree(lambda);
-<a name="line310">310: </a>  <font color="#4169E1">if</font> (eps->numbermonitors>0) {
-<a name="line311">311: </a>    PetscFree4(lambdahist,eigr,residhist,errest);
-<a name="line312">312: </a>  }
-<a name="line313">313: </a>  <font color="#4169E1">return</font>(0);
-<a name="line314">314: </a>}
-
-<a name="line318">318: </a><strong><font color="#4169E1"><a name="EPSBLOPEXSetBlockSize_BLOPEX"></a>static PetscErrorCode EPSBLOPEXSetBlockSize_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line319">319: </a>{
-<a name="line320">320: </a>  EPS_BLOPEX *ctx = (EPS_BLOPEX*)eps->data;
-
-<a name="line323">323: </a>  ctx->bs = bs;
-<a name="line324">324: </a>  <font color="#4169E1">return</font>(0);
-<a name="line325">325: </a>}
-
-<a name="line329">329: </a><font color="#B22222">/*@</font>
-<a name="line330">330: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a> - Sets the block size of the BLOPEX solver.</font>
-
-<a name="line332">332: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line334">334: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line335">335: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line336">336: </a><font color="#B22222">-  bs  - the block size</font>
-
-<a name="line338">338: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line339">339: </a><font color="#B22222">.  -eps_blopex_blocksize - Sets the block size</font>
-
-<a name="line341">341: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line343">343: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a>()</font>
-<a name="line344">344: </a><font color="#B22222">@*/</font>
-<a name="line345">345: </a><strong><font color="#4169E1"><a name="EPSBLOPEXSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line346">346: </a>{
-
-<a name="line352">352: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBLOPEXSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
-<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
-<a name="line354">354: </a>}
-
-<a name="line358">358: </a><strong><font color="#4169E1"><a name="EPSBLOPEXGetBlockSize_BLOPEX"></a>static PetscErrorCode EPSBLOPEXGetBlockSize_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
-<a name="line359">359: </a>{
-<a name="line360">360: </a>  EPS_BLOPEX *ctx = (EPS_BLOPEX*)eps->data;
-
-<a name="line363">363: </a>  *bs = ctx->bs;
-<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
-<a name="line365">365: </a>}
-
-<a name="line369">369: </a><font color="#B22222">/*@</font>
-<a name="line370">370: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a> - Gets the block size used in the BLOPEX solver.</font>
-
-<a name="line372">372: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line374">374: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line375">375: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line377">377: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line378">378: </a><font color="#B22222">.  bs - the block size</font>
-
-<a name="line380">380: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line382">382: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>()</font>
-<a name="line383">383: </a><font color="#B22222">@*/</font>
-<a name="line384">384: </a><strong><font color="#4169E1"><a name="EPSBLOPEXGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
-<a name="line385">385: </a>{
-
-<a name="line391">391: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBLOPEXGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,bs));
-<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
-<a name="line393">393: </a>}
-
-<a name="line397">397: </a><strong><font color="#4169E1"><a name="EPSReset_BLOPEX"></a>PetscErrorCode EPSReset_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line398">398: </a>{
-<a name="line400">400: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)eps->data;
-
-<a name="line403">403: </a>  VecDestroy(&blopex->w);
-<a name="line404">404: </a>  <font color="#4169E1">return</font>(0);
-<a name="line405">405: </a>}
-
-<a name="line409">409: </a><strong><font color="#4169E1"><a name="EPSDestroy_BLOPEX"></a>PetscErrorCode EPSDestroy_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line410">410: </a>{
-
-<a name="line414">414: </a>  LOBPCG_DestroyRandomContext();
-<a name="line415">415: </a>  PetscFree(eps->data);
-<a name="line416">416: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXSetBlockSize_C"</font>,NULL);
-<a name="line417">417: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXGetBlockSize_C"</font>,NULL);
-<a name="line418">418: </a>  <font color="#4169E1">return</font>(0);
-<a name="line419">419: </a>}
-
-<a name="line423">423: </a><strong><font color="#4169E1"><a name="EPSView_BLOPEX"></a>PetscErrorCode EPSView_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line424">424: </a>{
-<a name="line426">426: </a>  EPS_BLOPEX     *ctx = (EPS_BLOPEX*)eps->data;
-<a name="line427">427: </a>  PetscBool      isascii;
-
-<a name="line430">430: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line431">431: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line432">432: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLOPEX: block size %D\n"</font>,ctx->bs);
-<a name="line433">433: </a>  }
-<a name="line434">434: </a>  <font color="#4169E1">return</font>(0);
-<a name="line435">435: </a>}
-
-<a name="line439">439: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_BLOPEX"></a>PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line440">440: </a>{
-<a name="line442">442: </a>  KSP            ksp;
-<a name="line443">443: </a>  PetscBool      flg;
-<a name="line444">444: </a>  PetscInt       bs;
-
-<a name="line447">447: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> BLOPEX Options"</font>);
-<a name="line448">448: </a>  PetscOptionsInt(<font color="#666666">"-eps_blopex_blocksize"</font>,<font color="#666666">"BLOPEX block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>"</font>,20,&bs,&flg);
-<a name="line449">449: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line450">450: </a>    <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>(eps,bs);
-<a name="line451">451: </a>  }
-<a name="line452">452: </a>  LOBPCG_SetFromOptionsRandomContext();
-
-<a name="line454">454: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line455">455: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
-<a name="line456">456: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
-<a name="line457">457: </a>  }
-<a name="line458">458: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
-
-<a name="line460">460: </a>  <font color="#B22222">/* Set the default options of the KSP */</font>
-<a name="line461">461: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line462">462: </a>  <font color="#4169E1">if</font> (!((PetscObject)ksp)->type_name) {
-<a name="line463">463: </a>    KSPSetType(ksp,KSPPREONLY);
-<a name="line464">464: </a>  }
-<a name="line465">465: </a>  PetscOptionsTail();
-<a name="line466">466: </a>  <font color="#4169E1">return</font>(0);
-<a name="line467">467: </a>}
-
-<a name="line471">471: </a><strong><font color="#4169E1"><a name="EPSCreate_BLOPEX"></a>PETSC_EXTERN PetscErrorCode EPSCreate_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line472">472: </a>{
-<a name="line473">473: </a>  EPS_BLOPEX     *ctx;
-
-<a name="line477">477: </a>  PetscNewLog(eps,&ctx);
-<a name="line478">478: </a>  eps->data = (void*)ctx;
-
-<a name="line480">480: </a>  eps->ops->setup          = EPSSetUp_BLOPEX;
-<a name="line481">481: </a>  eps->ops->setfromoptions = EPSSetFromOptions_BLOPEX;
-<a name="line482">482: </a>  eps->ops->destroy        = EPSDestroy_BLOPEX;
-<a name="line483">483: </a>  eps->ops->reset          = EPSReset_BLOPEX;
-<a name="line484">484: </a>  eps->ops->view           = EPSView_BLOPEX;
-<a name="line485">485: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
-<a name="line486">486: </a>  LOBPCG_InitRandomContext(PetscObjectComm((PetscObject)eps),eps->rand);
-<a name="line487">487: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXSetBlockSize_C"</font>,EPSBLOPEXSetBlockSize_BLOPEX);
-<a name="line488">488: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXGetBlockSize_C"</font>,EPSBLOPEXGetBlockSize_BLOPEX);
-<a name="line489">489: </a>  <font color="#4169E1">return</font>(0);
-<a name="line490">490: </a>}
+<a name="line31"> 31: </a>PetscInt slepc_blopex_useconstr = -1;
+
+<a name="line33"> 33: </a><strong><font color="#4169E1">PetscErrorCode EPSSolve_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
+
+<a name="line35"> 35: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line36"> 36: </a>  lobpcg_Tolerance           tol;
+<a name="line37"> 37: </a>  lobpcg_BLASLAPACKFunctions blap_fn;
+<a name="line38"> 38: </a>  mv_InterfaceInterpreter    ii;
+<a name="line39"> 39: </a>  <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>                         st;
+<a name="line40"> 40: </a>  Vec                        w;
+<a name="line41"> 41: </a>  PetscInt                   bs;     <font color="#B22222">/* block size */</font>
+<a name="line42"> 42: </a>} EPS_BLOPEX;
+
+<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="Precond_FnSingleVector"></a>static void Precond_FnSingleVector(void *data,void *x,void *y)</font></strong>
+<a name="line47"> 47: </a>{
+<a name="line49"> 49: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)data;
+<a name="line50"> 50: </a>  MPI_Comm       comm = PetscObjectComm((PetscObject)blopex->st);
+<a name="line51"> 51: </a>  KSP            ksp;
+
+<a name="line54"> 54: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(blopex->st,&ksp);CHKERRABORT(comm,ierr);
+<a name="line55"> 55: </a>  KSPSolve(ksp,(Vec)x,(Vec)y);CHKERRABORT(comm,ierr);
+<a name="line56"> 56: </a>  PetscFunctionReturnVoid();
+<a name="line57"> 57: </a>}
+
+<a name="line61"> 61: </a><strong><font color="#4169E1"><a name="Precond_FnMultiVector"></a>static void Precond_FnMultiVector(void *data,void *x,void *y)</font></strong>
+<a name="line62"> 62: </a>{
+<a name="line63"> 63: </a>  EPS_BLOPEX *blopex = (EPS_BLOPEX*)data;
+
+<a name="line66"> 66: </a>  blopex->ii.Eval(Precond_FnSingleVector,data,x,y);
+<a name="line67"> 67: </a>  PetscFunctionReturnVoid();
+<a name="line68"> 68: </a>}
+
+<a name="line72"> 72: </a><strong><font color="#4169E1"><a name="OperatorASingleVector"></a>static void OperatorASingleVector(void *data,void *x,void *y)</font></strong>
+<a name="line73"> 73: </a>{
+<a name="line75"> 75: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)data;
+<a name="line76"> 76: </a>  MPI_Comm       comm = PetscObjectComm((PetscObject)blopex->st);
+<a name="line77"> 77: </a>  Mat            A,B;
+<a name="line78"> 78: </a>  PetscScalar    sigma;
+<a name="line79"> 79: </a>  PetscInt       nmat;
+
+<a name="line82"> 82: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(blopex->st,&nmat);CHKERRABORT(comm,ierr);
+<a name="line83"> 83: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(blopex->st,0,&A);CHKERRABORT(comm,ierr);
+<a name="line84"> 84: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(blopex->st,1,&B);CHKERRABORT(comm,ierr); }
+<a name="line85"> 85: </a>  MatMult(A,(Vec)x,(Vec)y);CHKERRABORT(comm,ierr);
+<a name="line86"> 86: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(blopex->st,&sigma);CHKERRABORT(comm,ierr);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (sigma != 0.0) {
+<a name="line88"> 88: </a>    <font color="#4169E1">if</font> (nmat>1) {
+<a name="line89"> 89: </a>      MatMult(B,(Vec)x,blopex->w);CHKERRABORT(comm,ierr);
+<a name="line90"> 90: </a>    } <font color="#4169E1">else</font> {
+<a name="line91"> 91: </a>      VecCopy((Vec)x,blopex->w);CHKERRABORT(comm,ierr);
+<a name="line92"> 92: </a>    }
+<a name="line93"> 93: </a>    VecAXPY((Vec)y,-sigma,blopex->w);CHKERRABORT(comm,ierr);
+<a name="line94"> 94: </a>  }
+<a name="line95"> 95: </a>  PetscFunctionReturnVoid();
+<a name="line96"> 96: </a>}
+
+<a name="line100">100: </a><strong><font color="#4169E1"><a name="OperatorAMultiVector"></a>static void OperatorAMultiVector(void *data,void *x,void *y)</font></strong>
+<a name="line101">101: </a>{
+<a name="line102">102: </a>  EPS_BLOPEX *blopex = (EPS_BLOPEX*)data;
+
+<a name="line105">105: </a>  blopex->ii.Eval(OperatorASingleVector,data,x,y);
+<a name="line106">106: </a>  PetscFunctionReturnVoid();
+<a name="line107">107: </a>}
+
+<a name="line111">111: </a><strong><font color="#4169E1"><a name="OperatorBSingleVector"></a>static void OperatorBSingleVector(void *data,void *x,void *y)</font></strong>
+<a name="line112">112: </a>{
+<a name="line114">114: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)data;
+<a name="line115">115: </a>  MPI_Comm       comm = PetscObjectComm((PetscObject)blopex->st);
+<a name="line116">116: </a>  Mat            B;
+
+<a name="line119">119: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(blopex->st,1,&B);CHKERRABORT(comm,ierr);
+<a name="line120">120: </a>  MatMult(B,(Vec)x,(Vec)y);CHKERRABORT(comm,ierr);
+<a name="line121">121: </a>  PetscFunctionReturnVoid();
+<a name="line122">122: </a>}
+
+<a name="line126">126: </a><strong><font color="#4169E1"><a name="OperatorBMultiVector"></a>static void OperatorBMultiVector(void *data,void *x,void *y)</font></strong>
+<a name="line127">127: </a>{
+<a name="line128">128: </a>  EPS_BLOPEX *blopex = (EPS_BLOPEX*)data;
+
+<a name="line131">131: </a>  blopex->ii.Eval(OperatorBSingleVector,data,x,y);
+<a name="line132">132: </a>  PetscFunctionReturnVoid();
+<a name="line133">133: </a>}
+
+<a name="line137">137: </a><strong><font color="#4169E1"><a name="EPSSetDimensions_BLOPEX"></a>PetscErrorCode EPSSetDimensions_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line138">138: </a>{
+<a name="line140">140: </a>  EPS_BLOPEX     *ctx = (EPS_BLOPEX*)eps->data;
+<a name="line141">141: </a>  PetscInt       k;
+
+<a name="line144">144: </a>  k = ((eps->nev-1)/ctx->bs+1)*ctx->bs;
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
+<a name="line146">146: </a>    <font color="#4169E1">if</font> (*ncv<k) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The value of ncv is not sufficiently large"</font>);
+<a name="line147">147: </a>  } <font color="#4169E1">else</font> *ncv = k;
+<a name="line148">148: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
+<a name="line149">149: </a>  <font color="#4169E1">else</font> { PetscInfo(eps,<font color="#666666">"Warning: given value of mpd ignored\n"</font>); }
+<a name="line150">150: </a>  <font color="#4169E1">return</font>(0);
+<a name="line151">151: </a>}
+
+<a name="line155">155: </a><strong><font color="#4169E1"><a name="EPSSetUp_BLOPEX"></a>PetscErrorCode EPSSetUp_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line156">156: </a>{
+<a name="line157">157: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_POTRF) || defined(PETSC_MISSING_LAPACK_SYGV)</font>
+<a name="line159">159: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"POTRF/SYGV - Lapack routine is unavailable"</font>);
+<a name="line160">160: </a><font color="#A020F0">#else</font>
+<a name="line162">162: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)eps->data;
+<a name="line163">163: </a>  PetscBool      isPrecond,istrivial,flg;
+
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (!eps->ishermitian || (eps->isgeneralized && !eps->ispositive)) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"blopex only works for Hermitian problems"</font>);
+<a name="line167">167: </a>  <font color="#4169E1">if</font> (!blopex->bs) blopex->bs = PetscMin(16,eps->nev);
+<a name="line168">168: </a>  EPSSetDimensions_BLOPEX(eps,eps->nev,&eps->ncv,&eps->mpd);
+<a name="line169">169: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = PetscMax(100,2*eps->n/eps->ncv);
+<a name="line170">170: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_SMALLEST_REAL;
+<a name="line171">171: </a>  <font color="#4169E1">if</font> (eps->which!=EPS_SMALLEST_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
+<a name="line172">172: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
+<a name="line173">173: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"External packages do not support user-defined stopping test"</font>);
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
+<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line176">176: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line178">178: </a>  <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
+<a name="line179">179: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&isPrecond);
+<a name="line180">180: </a>  <font color="#4169E1">if</font> (!isPrecond) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"blopex only works with STPRECOND"</font>);
+<a name="line181">181: </a>  blopex->st = eps->st;
+
+<a name="line183">183: </a>  <font color="#4169E1">if</font> (eps->converged == EPSConvergedRelative) {
+<a name="line184">184: </a>    blopex->tol.absolute = 0.0;
+<a name="line185">185: </a>    blopex->tol.relative = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
+<a name="line186">186: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->converged == EPSConvergedAbsolute) {
+<a name="line187">187: </a>    blopex->tol.absolute = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
+<a name="line188">188: </a>    blopex->tol.relative = 0.0;
+<a name="line189">189: </a>  } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Convergence test not supported in this solver"</font>);
+
+<a name="line191">191: </a>  SLEPCSetupInterpreter(&blopex->ii);
+
+<a name="line193">193: </a>  <font color="#B22222">/* allocate memory */</font>
+<a name="line194">194: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line195">195: </a>  PetscObjectTypeCompareAny((PetscObject)eps->V,&flg,BVVECS,BVCONTIGUOUS,<font color="#666666">""</font>);
+<a name="line196">196: </a>  <font color="#4169E1">if</font> (!flg) {  <font color="#B22222">/* blopex only works with BVVECS or BVCONTIGUOUS */</font>
+<a name="line197">197: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(eps->V,BVCONTIGUOUS);
+<a name="line198">198: </a>  }
+<a name="line199">199: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+<a name="line200">200: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&blopex->w);
+<a name="line201">201: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)blopex->w);
+
+<a name="line203">203: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line204">204: </a>  blopex->blap_fn.zpotrf = PETSC_zpotrf_interface;
+<a name="line205">205: </a>  blopex->blap_fn.zhegv = PETSC_zsygv_interface;
+<a name="line206">206: </a><font color="#A020F0">#else</font>
+<a name="line207">207: </a>  blopex->blap_fn.dpotrf = PETSC_dpotrf_interface;
+<a name="line208">208: </a>  blopex->blap_fn.dsygv = PETSC_dsygv_interface;
+<a name="line209">209: </a><font color="#A020F0">#endif</font>
+
+<a name="line211">211: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line212">212: </a>  eps->ops->solve = EPSSolve_BLOPEX;
+<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
+<a name="line214">214: </a><font color="#A020F0">#endif</font>
+<a name="line215">215: </a>}
+
+<a name="line219">219: </a><strong><font color="#4169E1"><a name="EPSSolve_BLOPEX"></a>PetscErrorCode EPSSolve_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line220">220: </a>{
+<a name="line221">221: </a>  EPS_BLOPEX        *blopex = (EPS_BLOPEX*)eps->data;
+<a name="line222">222: </a>  PetscScalar       sigma,*eigr=NULL;
+<a name="line223">223: </a>  PetscReal         *errest=NULL;
+<a name="line224">224: </a>  int               i,j,info,its,nconv;
+<a name="line225">225: </a>  double            *residhist=NULL;
+<a name="line226">226: </a>  PetscErrorCode    ierr;
+<a name="line227">227: </a>  mv_MultiVectorPtr eigenvectors,constraints;
+<a name="line228">228: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line229">229: </a>  komplex           *lambda=NULL,*lambdahist=NULL;
+<a name="line230">230: </a><font color="#A020F0">#else</font>
+<a name="line231">231: </a>  double            *lambda=NULL,*lambdahist=NULL;
+<a name="line232">232: </a><font color="#A020F0">#endif</font>
+
+<a name="line235">235: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigma);
+<a name="line236">236: </a>  PetscMalloc1(blopex->bs,&lambda);
+<a name="line237">237: </a>  <font color="#4169E1">if</font> (eps->numbermonitors>0) {
+<a name="line238">238: </a>    PetscMalloc4(blopex->bs*(eps->max_it+1),&lambdahist,eps->ncv,&eigr,blopex->bs*(eps->max_it+1),&residhist,eps->ncv,&errest);
+<a name="line239">239: </a>  }
+
+<a name="line241">241: </a>  <font color="#B22222">/* Complete the initial basis with random vectors */</font>
+<a name="line242">242: </a>  <font color="#4169E1">for</font> (i=eps->nini;i<eps->ncv;i++) {
+<a name="line243">243: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,i);
+<a name="line244">244: </a>  }
+
+<a name="line246">246: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+
+<a name="line248">248: </a>    <font color="#B22222">/* Create multivector of constraints from leading columns of V */</font>
+<a name="line249">249: </a>    PetscObjectComposedDataSetInt((PetscObject)eps->V,slepc_blopex_useconstr,1);
+<a name="line250">250: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,eps->nconv);
+<a name="line251">251: </a>    constraints = mv_MultiVectorCreateFromSampleVector(&blopex->ii,eps->nds+eps->nconv,eps->V);
+
+<a name="line253">253: </a>    <font color="#B22222">/* Create multivector where eigenvectors of this run will be stored */</font>
+<a name="line254">254: </a>    PetscObjectComposedDataSetInt((PetscObject)eps->V,slepc_blopex_useconstr,0);
+<a name="line255">255: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,eps->nconv+blopex->bs);
+<a name="line256">256: </a>    eigenvectors = mv_MultiVectorCreateFromSampleVector(&blopex->ii,blopex->bs,eps->V);
+
+<a name="line258">258: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line259">259: </a>    info = lobpcg_solve_complex(eigenvectors,blopex,OperatorAMultiVector,
+<a name="line260">260: </a>          eps->isgeneralized?blopex:NULL,eps->isgeneralized?OperatorBMultiVector:NULL,
+<a name="line261">261: </a>          blopex,Precond_FnMultiVector,constraints,
+<a name="line262">262: </a>          blopex->blap_fn,blopex->tol,eps->max_it,0,&its,
+<a name="line263">263: </a>          lambda,lambdahist,blopex->bs,eps->errest+eps->nconv,residhist,blopex->bs);
+<a name="line264">264: </a><font color="#A020F0">#else</font>
+<a name="line265">265: </a>    info = lobpcg_solve_double(eigenvectors,blopex,OperatorAMultiVector,
+<a name="line266">266: </a>          eps->isgeneralized?blopex:NULL,eps->isgeneralized?OperatorBMultiVector:NULL,
+<a name="line267">267: </a>          blopex,Precond_FnMultiVector,constraints,
+<a name="line268">268: </a>          blopex->blap_fn,blopex->tol,eps->max_it,0,&its,
+<a name="line269">269: </a>          lambda,lambdahist,blopex->bs,eps->errest+eps->nconv,residhist,blopex->bs);
+<a name="line270">270: </a><font color="#A020F0">#endif</font>
+<a name="line271">271: </a>    <font color="#4169E1">if</font> (info>0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"BLOPEX failed with exit code=%d"</font>,info);
+<a name="line272">272: </a>    mv_MultiVectorDestroy(constraints);
+<a name="line273">273: </a>    mv_MultiVectorDestroy(eigenvectors);
+
+<a name="line275">275: </a>    <font color="#4169E1">for</font> (j=0;j<blopex->bs;j++) {
+<a name="line276">276: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line277">277: </a>      eps->eigr[eps->nconv+j] = lambda[j].real+PETSC_i*lambda[j].imag;
+<a name="line278">278: </a><font color="#A020F0">#else</font>
+<a name="line279">279: </a>      eps->eigr[eps->nconv+j] = lambda[j];
+<a name="line280">280: </a><font color="#A020F0">#endif</font>
+<a name="line281">281: </a>    }
+
+<a name="line283">283: </a>    <font color="#4169E1">if</font> (eps->numbermonitors>0) {
+<a name="line284">284: </a>      <font color="#4169E1">for</font> (i=0;i<its;i++) {
+<a name="line285">285: </a>        nconv = 0;
+<a name="line286">286: </a>        <font color="#4169E1">for</font> (j=0;j<blopex->bs;j++) {
+<a name="line287">287: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line288">288: </a>          eigr[eps->nconv+j] = lambdahist[j+i*blopex->bs].real+PETSC_i*lambdahist[j+i*blopex->bs].imag;
+<a name="line289">289: </a><font color="#A020F0">#else</font>
+<a name="line290">290: </a>          eigr[eps->nconv+j] = lambdahist[j+i*blopex->bs];
+<a name="line291">291: </a><font color="#A020F0">#endif</font>
+<a name="line292">292: </a>          errest[eps->nconv+j] = residhist[j+i*blopex->bs];
+<a name="line293">293: </a>          <font color="#4169E1">if</font> (residhist[j+i*blopex->bs]<=eps->tol) nconv++;
+<a name="line294">294: </a>        }
+<a name="line295">295: </a>        EPSMonitor(eps,eps->its+i,eps->nconv+nconv,eigr,eps->eigi,errest,eps->nconv+blopex->bs);
+<a name="line296">296: </a>      }
+<a name="line297">297: </a>    }
+
+<a name="line299">299: </a>    eps->its += its;
+<a name="line300">300: </a>    <font color="#4169E1">if</font> (info==-1) {
+<a name="line301">301: </a>      eps->reason = EPS_DIVERGED_ITS;
+<a name="line302">302: </a>      <font color="#4169E1">break</font>;
+<a name="line303">303: </a>    } <font color="#4169E1">else</font> {
+<a name="line304">304: </a>      <font color="#4169E1">for</font> (i=0;i<blopex->bs;i++) {
+<a name="line305">305: </a>        <font color="#4169E1">if</font> (sigma != 0.0) eps->eigr[eps->nconv+i] += sigma;
+<a name="line306">306: </a>      }
+<a name="line307">307: </a>      eps->nconv += blopex->bs;
+<a name="line308">308: </a>      <font color="#4169E1">if</font> (eps->nconv>=eps->nev) eps->reason = EPS_CONVERGED_TOL;
+<a name="line309">309: </a>    }
+<a name="line310">310: </a>  }
+
+<a name="line312">312: </a>  PetscFree(lambda);
+<a name="line313">313: </a>  <font color="#4169E1">if</font> (eps->numbermonitors>0) {
+<a name="line314">314: </a>    PetscFree4(lambdahist,eigr,residhist,errest);
+<a name="line315">315: </a>  }
+<a name="line316">316: </a>  <font color="#4169E1">return</font>(0);
+<a name="line317">317: </a>}
+
+<a name="line321">321: </a><strong><font color="#4169E1"><a name="EPSBLOPEXSetBlockSize_BLOPEX"></a>static PetscErrorCode EPSBLOPEXSetBlockSize_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line322">322: </a>{
+<a name="line323">323: </a>  EPS_BLOPEX *ctx = (EPS_BLOPEX*)eps->data;
+
+<a name="line326">326: </a>  ctx->bs = bs;
+<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
+<a name="line328">328: </a>}
+
+<a name="line332">332: </a><font color="#B22222">/*@</font>
+<a name="line333">333: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a> - Sets the block size of the BLOPEX solver.</font>
+
+<a name="line335">335: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line337">337: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line338">338: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line339">339: </a><font color="#B22222">-  bs  - the block size</font>
+
+<a name="line341">341: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line342">342: </a><font color="#B22222">.  -eps_blopex_blocksize - Sets the block size</font>
+
+<a name="line344">344: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line346">346: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a>()</font>
+<a name="line347">347: </a><font color="#B22222">@*/</font>
+<a name="line348">348: </a><strong><font color="#4169E1"><a name="EPSBLOPEXSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line349">349: </a>{
+
+<a name="line355">355: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBLOPEXSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
+<a name="line356">356: </a>  <font color="#4169E1">return</font>(0);
+<a name="line357">357: </a>}
+
+<a name="line361">361: </a><strong><font color="#4169E1"><a name="EPSBLOPEXGetBlockSize_BLOPEX"></a>static PetscErrorCode EPSBLOPEXGetBlockSize_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
+<a name="line362">362: </a>{
+<a name="line363">363: </a>  EPS_BLOPEX *ctx = (EPS_BLOPEX*)eps->data;
+
+<a name="line366">366: </a>  *bs = ctx->bs;
+<a name="line367">367: </a>  <font color="#4169E1">return</font>(0);
+<a name="line368">368: </a>}
+
+<a name="line372">372: </a><font color="#B22222">/*@</font>
+<a name="line373">373: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a> - Gets the block size used in the BLOPEX solver.</font>
+
+<a name="line375">375: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line377">377: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line378">378: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line380">380: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line381">381: </a><font color="#B22222">.  bs - the block size</font>
+
+<a name="line383">383: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line385">385: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>()</font>
+<a name="line386">386: </a><font color="#B22222">@*/</font>
+<a name="line387">387: </a><strong><font color="#4169E1"><a name="EPSBLOPEXGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXGetBlockSize.html#EPSBLOPEXGetBlockSize">EPSBLOPEXGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
+<a name="line388">388: </a>{
+
+<a name="line394">394: </a>  PetscUseMethod(eps,<font color="#666666">"EPSBLOPEXGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,bs));
+<a name="line395">395: </a>  <font color="#4169E1">return</font>(0);
+<a name="line396">396: </a>}
+
+<a name="line400">400: </a><strong><font color="#4169E1"><a name="EPSReset_BLOPEX"></a>PetscErrorCode EPSReset_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line401">401: </a>{
+<a name="line403">403: </a>  EPS_BLOPEX     *blopex = (EPS_BLOPEX*)eps->data;
+
+<a name="line406">406: </a>  VecDestroy(&blopex->w);
+<a name="line407">407: </a>  <font color="#4169E1">return</font>(0);
+<a name="line408">408: </a>}
+
+<a name="line412">412: </a><strong><font color="#4169E1"><a name="EPSDestroy_BLOPEX"></a>PetscErrorCode EPSDestroy_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line413">413: </a>{
+
+<a name="line417">417: </a>  LOBPCG_DestroyRandomContext();
+<a name="line418">418: </a>  PetscFree(eps->data);
+<a name="line419">419: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXSetBlockSize_C"</font>,NULL);
+<a name="line420">420: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXGetBlockSize_C"</font>,NULL);
+<a name="line421">421: </a>  <font color="#4169E1">return</font>(0);
+<a name="line422">422: </a>}
+
+<a name="line426">426: </a><strong><font color="#4169E1"><a name="EPSView_BLOPEX"></a>PetscErrorCode EPSView_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line427">427: </a>{
+<a name="line429">429: </a>  EPS_BLOPEX     *ctx = (EPS_BLOPEX*)eps->data;
+<a name="line430">430: </a>  PetscBool      isascii;
+
+<a name="line433">433: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line434">434: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line435">435: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLOPEX: block size %D\n"</font>,ctx->bs);
+<a name="line436">436: </a>  }
+<a name="line437">437: </a>  <font color="#4169E1">return</font>(0);
+<a name="line438">438: </a>}
+
+<a name="line442">442: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_BLOPEX"></a>PetscErrorCode EPSSetFromOptions_BLOPEX(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line443">443: </a>{
+<a name="line445">445: </a>  KSP            ksp;
+<a name="line446">446: </a>  PetscBool      flg;
+<a name="line447">447: </a>  PetscInt       bs;
+
+<a name="line450">450: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> BLOPEX Options"</font>);
+<a name="line451">451: </a>  PetscOptionsInt(<font color="#666666">"-eps_blopex_blocksize"</font>,<font color="#666666">"BLOPEX block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>"</font>,20,&bs,&flg);
+<a name="line452">452: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line453">453: </a>    <a href="../../../../../docs/manualpages/EPS/EPSBLOPEXSetBlockSize.html#EPSBLOPEXSetBlockSize">EPSBLOPEXSetBlockSize</a>(eps,bs);
+<a name="line454">454: </a>  }
+<a name="line455">455: </a>  LOBPCG_SetFromOptionsRandomContext();
+
+<a name="line457">457: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line458">458: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
+<a name="line459">459: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
+<a name="line460">460: </a>  }
+<a name="line461">461: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
+
+<a name="line463">463: </a>  <font color="#B22222">/* Set the default options of the KSP */</font>
+<a name="line464">464: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line465">465: </a>  <font color="#4169E1">if</font> (!((PetscObject)ksp)->type_name) {
+<a name="line466">466: </a>    KSPSetType(ksp,KSPPREONLY);
+<a name="line467">467: </a>  }
+<a name="line468">468: </a>  PetscOptionsTail();
+<a name="line469">469: </a>  <font color="#4169E1">return</font>(0);
+<a name="line470">470: </a>}
+
+<a name="line474">474: </a><strong><font color="#4169E1"><a name="EPSCreate_BLOPEX"></a>PETSC_EXTERN PetscErrorCode EPSCreate_BLOPEX(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line475">475: </a>{
+<a name="line476">476: </a>  EPS_BLOPEX     *ctx;
+
+<a name="line480">480: </a>  PetscNewLog(eps,&ctx);
+<a name="line481">481: </a>  eps->data = (void*)ctx;
+
+<a name="line483">483: </a>  eps->ops->setup          = EPSSetUp_BLOPEX;
+<a name="line484">484: </a>  eps->ops->setfromoptions = EPSSetFromOptions_BLOPEX;
+<a name="line485">485: </a>  eps->ops->destroy        = EPSDestroy_BLOPEX;
+<a name="line486">486: </a>  eps->ops->reset          = EPSReset_BLOPEX;
+<a name="line487">487: </a>  eps->ops->view           = EPSView_BLOPEX;
+<a name="line488">488: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+<a name="line489">489: </a>  LOBPCG_InitRandomContext(PetscObjectComm((PetscObject)eps),NULL);
+<a name="line490">490: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXSetBlockSize_C"</font>,EPSBLOPEXSetBlockSize_BLOPEX);
+<a name="line491">491: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBLOPEXGetBlockSize_C"</font>,EPSBLOPEXGetBlockSize_BLOPEX);
+<a name="line492">492: </a>  <font color="#4169E1">if</font> (slepc_blopex_useconstr < 0) { PetscObjectComposedDataRegister(&slepc_blopex_useconstr); }
+<a name="line493">493: </a>  <font color="#4169E1">return</font>(0);
+<a name="line494">494: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/blopex/index.html b/src/eps/impls/external/blopex/index.html
index f63e4da..f9d82b2 100644
--- a/src/eps/impls/external/blopex/index.html
+++ b/src/eps/impls/external/blopex/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/blopex/makefile b/src/eps/impls/external/blopex/makefile
index af58bef..c0819c1 100644
--- a/src/eps/impls/external/blopex/makefile
+++ b/src/eps/impls/external/blopex/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -22,7 +22,6 @@
 ALL: lib
 
 #requiresdefine  'SLEPC_HAVE_BLOPEX'
-#requiresprecision double
 
 CFLAGS   = ${BLOPEX_INCLUDE} -DBlopexInt=PetscInt
 FFLAGS   =
diff --git a/src/eps/impls/external/blopex/makefile.html b/src/eps/impls/external/blopex/makefile.html
index 3d0b410..6058b54 100644
--- a/src/eps/impls/external/blopex/makefile.html
+++ b/src/eps/impls/external/blopex/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blopex/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:19+00:00">
+<meta name="date" content="2016-05-16T10:33:15+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -33,7 +33,6 @@
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
 <font color="#A020F0">#requiresdefine  'SLEPC_HAVE_BLOPEX'</font>
-<font color="#A020F0">#requiresprecision double</font>
 
 CFLAGS   = ${BLOPEX_INCLUDE} -DBlopexInt=PetscInt
 FFLAGS   =
diff --git a/src/eps/impls/external/blopex/petsc-interface.c.html b/src/eps/impls/external/blopex/petsc-interface.c.html
index b311f3d..c0eb63f 100644
--- a/src/eps/impls/external/blopex/petsc-interface.c.html
+++ b/src/eps/impls/external/blopex/petsc-interface.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blopex/petsc-interface.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:18+00:00">
+<meta name="date" content="2016-05-16T10:33:14+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/petsc-interface.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/petsc-interface.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */</font>
 <a name="line2">  2: </a><font color="#B22222">/* @@@ BLOPEX (version 1.1) LGPL Version 2.1 or above.See www.gnu.org. */</font>
 <a name="line3">  3: </a><font color="#B22222">/* @@@ Copyright 2010 BLOPEX team http://code.google.com/p/blopex/     */</font>
diff --git a/src/eps/impls/external/blopex/petsc-interface.h.html b/src/eps/impls/external/blopex/petsc-interface.h.html
index c151118..fcd0b10 100644
--- a/src/eps/impls/external/blopex/petsc-interface.h.html
+++ b/src/eps/impls/external/blopex/petsc-interface.h.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blopex/petsc-interface.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:19+00:00">
+<meta name="date" content="2016-05-16T10:33:15+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/petsc-interface.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/petsc-interface.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */</font>
 <a name="line2">  2: </a><font color="#B22222">/* @@@ BLOPEX (version 1.1) LGPL Version 2.1 or above.See www.gnu.org. */</font>
 <a name="line3">  3: </a><font color="#B22222">/* @@@ Copyright 2010 BLOPEX team http://code.google.com/p/blopex/     */</font>
diff --git a/src/eps/impls/external/blopex/slepc-interface.c b/src/eps/impls/external/blopex/slepc-interface.c
index 07f9a20..dd62c93 100644
--- a/src/eps/impls/external/blopex/slepc-interface.c
+++ b/src/eps/impls/external/blopex/slepc-interface.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -51,7 +51,7 @@ static void* mv_TempMultiVectorCreateFromBV(void* ii_,BlopexInt n,void* sample)
   x->ownsMask = 0;
 
   ierr = BVGetActiveColumns(bv,&l,&k);CHKERRABORT(PETSC_COMM_SELF,ierr);
-  ierr = PetscObjectComposedDataGetInt((PetscObject)bv,SLEPC_BLOPEX_USECONSTR,useconstr,flg);CHKERRABORT(PETSC_COMM_SELF,ierr);
+  ierr = PetscObjectComposedDataGetInt((PetscObject)bv,slepc_blopex_useconstr,useconstr,flg);CHKERRABORT(PETSC_COMM_SELF,ierr);
   if (!l && useconstr) {
     ierr = BVGetNumConstraints(bv,&nc);CHKERRABORT(PETSC_COMM_SELF,ierr);
     l = -nc;
diff --git a/src/eps/impls/external/blopex/slepc-interface.c.html b/src/eps/impls/external/blopex/slepc-interface.c.html
index efded04..cdad417 100644
--- a/src/eps/impls/external/blopex/slepc-interface.c.html
+++ b/src/eps/impls/external/blopex/slepc-interface.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blopex/slepc-interface.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:18+00:00">
+<meta name="date" content="2016-05-16T10:33:14+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/slepc-interface.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/slepc-interface.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Modification of the *temp* implementation of the BLOPEX multivector in order</font>
 <a name="line3">  3: </a><font color="#B22222">   to wrap created PETSc vectors as multivectors.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -63,7 +63,7 @@
 <a name="line51"> 51: </a>  x->ownsMask = 0;
 
 <a name="line53"> 53: </a>  <a href="../../../../../docs/manualpages/BV/BVGetActiveColumns.html#BVGetActiveColumns">BVGetActiveColumns</a>(bv,&l,&k);CHKERRABORT(PETSC_COMM_SELF,ierr);
-<a name="line54"> 54: </a>  PetscObjectComposedDataGetInt((PetscObject)bv,SLEPC_BLOPEX_USECONSTR,useconstr,flg);CHKERRABORT(PETSC_COMM_SELF,ierr);
+<a name="line54"> 54: </a>  PetscObjectComposedDataGetInt((PetscObject)bv,slepc_blopex_useconstr,useconstr,flg);CHKERRABORT(PETSC_COMM_SELF,ierr);
 <a name="line55"> 55: </a>  <font color="#4169E1">if</font> (!l && useconstr) {
 <a name="line56"> 56: </a>    <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(bv,&nc);CHKERRABORT(PETSC_COMM_SELF,ierr);
 <a name="line57"> 57: </a>    l = -nc;
diff --git a/src/eps/impls/external/blopex/slepc-interface.h b/src/eps/impls/external/blopex/slepc-interface.h
index 39a3a2f..1e5371e 100644
--- a/src/eps/impls/external/blopex/slepc-interface.h
+++ b/src/eps/impls/external/blopex/slepc-interface.h
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -22,14 +22,13 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 */
 
-
 #if !defined(SLEPC_INTERFACE_HEADER)
 #define SLEPC_INTERFACE_HEADER
 
 #include <blopex_lobpcg.h>
 #include "petsc-interface.h"
 
-#define SLEPC_BLOPEX_USECONSTR 1121
+PETSC_INTERN PetscInt slepc_blopex_useconstr;
 
 extern int
 SLEPCSetupInterpreter(mv_InterfaceInterpreter *ii);
diff --git a/src/eps/impls/external/blopex/slepc-interface.h.html b/src/eps/impls/external/blopex/slepc-interface.h.html
index 9e2fb51..5d3af06 100644
--- a/src/eps/impls/external/blopex/slepc-interface.h.html
+++ b/src/eps/impls/external/blopex/slepc-interface.h.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blopex/slepc-interface.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:19+00:00">
+<meta name="date" content="2016-05-16T10:33:15+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blopex/slepc-interface.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blopex/slepc-interface.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Modification of the *temp* implementation of the BLOPEX multivector in order</font>
 <a name="line3">  3: </a><font color="#B22222">   to wrap created PETSc vectors as multivectors.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -34,22 +34,21 @@
 <a name="line22"> 22: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line23"> 23: </a><font color="#B22222">*/</font>
 
+<a name="line25"> 25: </a><font color="#A020F0">#if !defined(SLEPC_INTERFACE_HEADER)</font>
+<a name="line26"> 26: </a><strong><font color="#228B22">#define SLEPC_INTERFACE_HEADER</font></strong>
 
-<a name="line26"> 26: </a><font color="#A020F0">#if !defined(SLEPC_INTERFACE_HEADER)</font>
-<a name="line27"> 27: </a><strong><font color="#228B22">#define SLEPC_INTERFACE_HEADER</font></strong>
+<a name="line28"> 28: </a><font color="#A020F0">#include <blopex_lobpcg.h></font>
+<a name="line29"> 29: </a><font color="#A020F0">#include </font><font color="#666666">"petsc-interface.h"</font><font color="#A020F0"></font>
 
-<a name="line29"> 29: </a><font color="#A020F0">#include <blopex_lobpcg.h></font>
-<a name="line30"> 30: </a><font color="#A020F0">#include </font><font color="#666666">"petsc-interface.h"</font><font color="#A020F0"></font>
+<a name="line31"> 31: </a>PETSC_INTERN PetscInt slepc_blopex_useconstr;
 
-<a name="line32"> 32: </a><strong><font color="#228B22">#define SLEPC_BLOPEX_USECONSTR 1121</font></strong>
+<a name="line33"> 33: </a><strong><font color="#4169E1">extern int</font></strong>
+<a name="line34"> 34: </a><strong><font color="#4169E1">SLEPCSetupInterpreter(mv_InterfaceInterpreter *ii)</font></strong>;
 
-<a name="line34"> 34: </a><strong><font color="#4169E1">extern int</font></strong>
-<a name="line35"> 35: </a><strong><font color="#4169E1">SLEPCSetupInterpreter(mv_InterfaceInterpreter *ii)</font></strong>;
+<a name="line36"> 36: </a><strong><font color="#4169E1">extern void</font></strong>
+<a name="line37"> 37: </a><strong><font color="#4169E1">SLEPCSetupInterpreterForDignifiedDeath(mv_InterfaceInterpreter *i)</font></strong>;
 
-<a name="line37"> 37: </a><strong><font color="#4169E1">extern void</font></strong>
-<a name="line38"> 38: </a><strong><font color="#4169E1">SLEPCSetupInterpreterForDignifiedDeath(mv_InterfaceInterpreter *i)</font></strong>;
-
-<a name="line40"> 40: </a><font color="#A020F0">#endif</font>
+<a name="line39"> 39: </a><font color="#A020F0">#endif</font>
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/blzpack/blzpack.c b/src/eps/impls/external/blzpack/blzpack.c
index 1d99d65..694f82f 100644
--- a/src/eps/impls/external/blzpack/blzpack.c
+++ b/src/eps/impls/external/blzpack/blzpack.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -142,6 +142,7 @@ lrstor*=10;
   if (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"This solver requires a BV with contiguous storage");
   ierr = RGIsTrivial(eps->rg,&istrivial);CHKERRQ(ierr);
   if (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"This solver does not support region filtering");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"External packages do not support user-defined stopping test");
 
   /* dispatch solve method */
   eps->ops->solve = EPSSolve_BLZPACK;
@@ -345,7 +346,7 @@ PetscErrorCode EPSView_BLZPACK(EPS eps,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_BLZPACK"
-PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
diff --git a/src/eps/impls/external/blzpack/blzpack.c.html b/src/eps/impls/external/blzpack/blzpack.c.html
index 6e58596..80fb119 100644
--- a/src/eps/impls/external/blzpack/blzpack.c.html
+++ b/src/eps/impls/external/blzpack/blzpack.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blzpack/blzpack.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:19+00:00">
+<meta name="date" content="2016-05-16T10:33:15+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blzpack/blzpack.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blzpack/blzpack.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the BLZPACK package</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -150,295 +150,296 @@
 <a name="line142">142: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
 <a name="line143">143: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
 <a name="line144">144: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line146">146: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line147">147: </a>  eps->ops->solve = EPSSolve_BLZPACK;
-<a name="line148">148: </a>  <font color="#4169E1">return</font>(0);
-<a name="line149">149: </a>}
-
-<a name="line153">153: </a><strong><font color="#4169E1"><a name="EPSSolve_BLZPACK"></a>PetscErrorCode EPSSolve_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line154">154: </a>{
-<a name="line156">156: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-<a name="line157">157: </a>  PetscInt       nn;
-<a name="line158">158: </a>  PetscBLASInt   i,nneig,lflag,nvopu;
-<a name="line159">159: </a>  Vec            x,y,v0;
-<a name="line160">160: </a>  PetscScalar    sigma,*pV;
-<a name="line161">161: </a>  Mat            A;
-<a name="line162">162: </a>  KSP            ksp;
-<a name="line163">163: </a>  PC             pc;
-
-<a name="line166">166: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&x);
-<a name="line167">167: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&y);
-<a name="line168">168: </a>  EPSGetStartVector(eps,0,NULL);
-<a name="line169">169: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,0);  <font color="#B22222">/* just for deflation space */</font>
-<a name="line170">170: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
-<a name="line171">171: </a>  VecGetArray(v0,&pV);
-
-<a name="line173">173: </a>  <font color="#4169E1">if</font> (eps->isgeneralized && !blz->slice) {
-<a name="line174">174: </a>    <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigma); <font color="#B22222">/* shift of origin */</font>
-<a name="line175">175: </a>    blz->rstor[0]  = sigma;        <font color="#B22222">/* lower limit of eigenvalue interval */</font>
-<a name="line176">176: </a>    blz->rstor[1]  = sigma;        <font color="#B22222">/* upper limit of eigenvalue interval */</font>
-<a name="line177">177: </a>  } <font color="#4169E1">else</font> {
-<a name="line178">178: </a>    sigma = 0.0;
-<a name="line179">179: </a>    blz->rstor[0]  = eps->inta;    <font color="#B22222">/* lower limit of eigenvalue interval */</font>
-<a name="line180">180: </a>    blz->rstor[1]  = eps->intb;    <font color="#B22222">/* upper limit of eigenvalue interval */</font>
-<a name="line181">181: </a>  }
-<a name="line182">182: </a>  nneig = 0;                       <font color="#B22222">/* no. of eigs less than sigma */</font>
-
-<a name="line184">184: </a>  PetscBLASIntCast(eps->nloc,&blz->istor[0]); <font color="#B22222">/* no. of rows of U, V, X */</font>
-<a name="line185">185: </a>  PetscBLASIntCast(eps->nloc,&blz->istor[1]); <font color="#B22222">/* leading dim of U, V, X */</font>
-<a name="line186">186: </a>  PetscBLASIntCast(eps->nev,&blz->istor[2]);  <font color="#B22222">/* required eigenpairs */</font>
-<a name="line187">187: </a>  PetscBLASIntCast(eps->ncv,&blz->istor[3]);  <font color="#B22222">/* working eigenpairs */</font>
-<a name="line188">188: </a>  blz->istor[4]  = blz->block_size;    <font color="#B22222">/* number of vectors in a block */</font>
-<a name="line189">189: </a>  blz->istor[5]  = blz->nsteps;        <font color="#B22222">/* maximun number of steps per run */</font>
-<a name="line190">190: </a>  blz->istor[6]  = 1;                  <font color="#B22222">/* number of starting vectors as input */</font>
-<a name="line191">191: </a>  blz->istor[7]  = 0;                  <font color="#B22222">/* number of eigenpairs given as input */</font>
-<a name="line192">192: </a>  blz->istor[8]  = (blz->slice || eps->isgeneralized) ? 1 : 0;   <font color="#B22222">/* problem type */</font>
-<a name="line193">193: </a>  blz->istor[9]  = blz->slice;         <font color="#B22222">/* spectrum slicing */</font>
-<a name="line194">194: </a>  blz->istor[10] = eps->isgeneralized ? 1 : 0;   <font color="#B22222">/* solutions refinement (purify) */</font>
-<a name="line195">195: </a>  blz->istor[11] = 0;                  <font color="#B22222">/* level of printing */</font>
-<a name="line196">196: </a>  blz->istor[12] = 6;                  <font color="#B22222">/* file unit for output */</font>
-<a name="line197">197: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&blz->istor[13]);
-
-<a name="line199">199: </a>  blz->rstor[2]  = eps->tol;           <font color="#B22222">/* threshold for convergence */</font>
-
-<a name="line201">201: </a>  lflag = 0;           <font color="#B22222">/* reverse communication interface flag */</font>
-
-<a name="line203">203: </a>  <font color="#4169E1">do</font> {
-<a name="line204">204: </a>    BLZpack_(blz->istor,blz->rstor,&sigma,&nneig,blz->u,blz->v,&lflag,&nvopu,blz->eig,pV);
-
-<a name="line206">206: </a>    <font color="#4169E1">switch</font> (lflag) {
-<a name="line207">207: </a>    <font color="#4169E1">case</font> 1:
-<a name="line208">208: </a>      <font color="#B22222">/* compute v = OP u */</font>
-<a name="line209">209: </a>      <font color="#4169E1">for</font> (i=0;i<nvopu;i++) {
-<a name="line210">210: </a>        VecPlaceArray(x,blz->u+i*eps->nloc);
-<a name="line211">211: </a>        VecPlaceArray(y,blz->v+i*eps->nloc);
-<a name="line212">212: </a>        <font color="#4169E1">if</font> (blz->slice || eps->isgeneralized) {
-<a name="line213">213: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,y);
-<a name="line214">214: </a>        } <font color="#4169E1">else</font> {
-<a name="line215">215: </a>          <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
-<a name="line216">216: </a>        }
-<a name="line217">217: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(eps->V,y,NULL,NULL,NULL);
-<a name="line218">218: </a>        VecResetArray(x);
-<a name="line219">219: </a>        VecResetArray(y);
-<a name="line220">220: </a>      }
-<a name="line221">221: </a>      <font color="#B22222">/* monitor */</font>
-<a name="line222">222: </a>      eps->nconv  = BLZistorr_(blz->istor,<font color="#666666">"NTEIG"</font>,5);
-<a name="line223">223: </a>      EPSMonitor(eps,eps->its,eps->nconv,
-<a name="line224">224: </a>        blz->rstor+BLZistorr_(blz->istor,<font color="#666666">"IRITZ"</font>,5),
-<a name="line225">225: </a>        eps->eigi,
-<a name="line226">226: </a>        blz->rstor+BLZistorr_(blz->istor,<font color="#666666">"IRITZ"</font>,5)+BLZistorr_(blz->istor,<font color="#666666">"JT"</font>,2),
-<a name="line227">227: </a>        BLZistorr_(blz->istor,<font color="#666666">"NRITZ"</font>,5));
-<a name="line228">228: </a>      eps->its = eps->its + 1;
-<a name="line229">229: </a>      <font color="#4169E1">if</font> (eps->its >= eps->max_it || eps->nconv >= eps->nev) lflag = 5;
-<a name="line230">230: </a>      <font color="#4169E1">break</font>;
-<a name="line231">231: </a>    <font color="#4169E1">case</font> 2:
-<a name="line232">232: </a>      <font color="#B22222">/* compute v = B u */</font>
-<a name="line233">233: </a>      <font color="#4169E1">for</font> (i=0;i<nvopu;i++) {
-<a name="line234">234: </a>        VecPlaceArray(x,blz->u+i*eps->nloc);
-<a name="line235">235: </a>        VecPlaceArray(y,blz->v+i*eps->nloc);
-<a name="line236">236: </a>        <a href="../../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,x,y);
-<a name="line237">237: </a>        VecResetArray(x);
-<a name="line238">238: </a>        VecResetArray(y);
-<a name="line239">239: </a>      }
-<a name="line240">240: </a>      <font color="#4169E1">break</font>;
-<a name="line241">241: </a>    <font color="#4169E1">case</font> 3:
-<a name="line242">242: </a>      <font color="#B22222">/* update shift */</font>
-<a name="line243">243: </a>      PetscInfo1(eps,<font color="#666666">"Factorization update (sigma=%g)\n"</font>,(double)sigma);
-<a name="line244">244: </a>      <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,sigma);
-<a name="line245">245: </a>      <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line246">246: </a>      KSPGetPC(ksp,&pc);
-<a name="line247">247: </a>      PCFactorGetMatrix(pc,&A);
-<a name="line248">248: </a>      MatGetInertia(A,&nn,NULL,NULL);
-<a name="line249">249: </a>      PetscBLASIntCast(nn,&nneig);
-<a name="line250">250: </a>      <font color="#4169E1">break</font>;
-<a name="line251">251: </a>    <font color="#4169E1">case</font> 4:
-<a name="line252">252: </a>      <font color="#B22222">/* copy the initial vector */</font>
-<a name="line253">253: </a>      VecPlaceArray(x,blz->v);
-<a name="line254">254: </a>      VecCopy(v0,x);
-<a name="line255">255: </a>      VecResetArray(x);
-<a name="line256">256: </a>      <font color="#4169E1">break</font>;
-<a name="line257">257: </a>    }
-
-<a name="line259">259: </a>  } <font color="#4169E1">while</font> (lflag > 0);
-
-<a name="line261">261: </a>  VecRestoreArray(v0,&pV);
-<a name="line262">262: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
-
-<a name="line264">264: </a>  eps->nconv  = BLZistorr_(blz->istor,<font color="#666666">"NTEIG"</font>,5);
-<a name="line265">265: </a>  eps->reason = EPS_CONVERGED_TOL;
-
-<a name="line267">267: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line268">268: </a>    eps->eigr[i]=blz->eig[i];
-<a name="line269">269: </a>  }
-
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (lflag!=0) {
-<a name="line272">272: </a>    char msg[2048] = <font color="#666666">""</font>;
-<a name="line273">273: </a>    <font color="#4169E1">for</font> (i = 0; i < 33; i++) {
-<a name="line274">274: </a>      <font color="#4169E1">if</font> (blz->istor[15] & (1 << i)) PetscStrcat(msg,blzpack_error[i]);
-<a name="line275">275: </a>    }
-<a name="line276">276: </a>    SETERRQ2(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error in BLZPACK (code=%d): '%s'"</font>,blz->istor[15],msg);
-<a name="line277">277: </a>  }
-<a name="line278">278: </a>  VecDestroy(&x);
-<a name="line279">279: </a>  VecDestroy(&y);
-<a name="line280">280: </a>  <font color="#4169E1">return</font>(0);
-<a name="line281">281: </a>}
-
-<a name="line285">285: </a><strong><font color="#4169E1"><a name="EPSBackTransform_BLZPACK"></a>PetscErrorCode EPSBackTransform_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line286">286: </a>{
-<a name="line288">288: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-
-<a name="line291">291: </a>  <font color="#4169E1">if</font> (!blz->slice && !eps->isgeneralized) {
-<a name="line292">292: </a>    EPSBackTransform_Default(eps);
-<a name="line293">293: </a>  }
-<a name="line294">294: </a>  <font color="#4169E1">return</font>(0);
-<a name="line295">295: </a>}
-
-<a name="line299">299: </a><strong><font color="#4169E1"><a name="EPSReset_BLZPACK"></a>PetscErrorCode EPSReset_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line300">300: </a>{
-<a name="line302">302: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-
-<a name="line305">305: </a>  PetscFree(blz->istor);
-<a name="line306">306: </a>  PetscFree(blz->rstor);
-<a name="line307">307: </a>  PetscFree(blz->u);
-<a name="line308">308: </a>  PetscFree(blz->v);
-<a name="line309">309: </a>  PetscFree(blz->eig);
-<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>}
-
-<a name="line315">315: </a><strong><font color="#4169E1"><a name="EPSDestroy_BLZPACK"></a>PetscErrorCode EPSDestroy_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line316">316: </a>{
-
-<a name="line320">320: </a>  PetscFree(eps->data);
-<a name="line321">321: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetBlockSize_C"</font>,NULL);
-<a name="line322">322: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetNSteps_C"</font>,NULL);
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a>}
-
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="EPSView_BLZPACK"></a>PetscErrorCode EPSView_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line329">329: </a>{
-<a name="line331">331: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-<a name="line332">332: </a>  PetscBool      isascii;
-
-<a name="line335">335: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line336">336: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line337">337: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLZPACK: block size=%d\n"</font>,blz->block_size);
-<a name="line338">338: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLZPACK: maximum number of steps per run=%d\n"</font>,blz->nsteps);
-<a name="line339">339: </a>    <font color="#4169E1">if</font> (blz->slice) {
-<a name="line340">340: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLZPACK: computational interval [%f,%f]\n"</font>,eps->inta,eps->intb);
-<a name="line341">341: </a>    }
-<a name="line342">342: </a>  }
-<a name="line343">343: </a>  <font color="#4169E1">return</font>(0);
-<a name="line344">344: </a>}
-
-<a name="line348">348: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_BLZPACK"></a>PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line349">349: </a>{
-<a name="line351">351: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-<a name="line352">352: </a>  PetscInt       bs,n;
-<a name="line353">353: </a>  PetscBool      flg;
-
-<a name="line356">356: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> BLZPACK Options"</font>);
-
-<a name="line358">358: </a>  bs = blz->block_size;
-<a name="line359">359: </a>  PetscOptionsInt(<font color="#666666">"-eps_blzpack_block_size"</font>,<font color="#666666">"Block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>"</font>,bs,&bs,&flg);
-<a name="line360">360: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line361">361: </a>    <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>(eps,bs);
-<a name="line362">362: </a>  }
-
-<a name="line364">364: </a>  n = blz->nsteps;
-<a name="line365">365: </a>  PetscOptionsInt(<font color="#666666">"-eps_blzpack_nsteps"</font>,<font color="#666666">"Number of steps"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>"</font>,n,&n,&flg);
-<a name="line366">366: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line367">367: </a>    <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>(eps,n);
-<a name="line368">368: </a>  }
-
-<a name="line370">370: </a>  PetscOptionsTail();
-<a name="line371">371: </a>  <font color="#4169E1">return</font>(0);
-<a name="line372">372: </a>}
-
-<a name="line376">376: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetBlockSize_BLZPACK"></a>static PetscErrorCode EPSBlzpackSetBlockSize_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line377">377: </a>{
-<a name="line379">379: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-
-<a name="line382">382: </a>  <font color="#4169E1">if</font> (bs == PETSC_DEFAULT) blz->block_size = 3;
-<a name="line383">383: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bs <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Block size must be positive"</font>);
-<a name="line384">384: </a>  <font color="#4169E1">else</font> {
-<a name="line385">385: </a>    PetscBLASIntCast(bs,&blz->block_size);
-<a name="line386">386: </a>  }
-<a name="line387">387: </a>  <font color="#4169E1">return</font>(0);
-<a name="line388">388: </a>}
-
-<a name="line392">392: </a><font color="#B22222">/*@</font>
-<a name="line393">393: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a> - Sets the block size for the BLZPACK package.</font>
-
-<a name="line395">395: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line397">397: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line398">398: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line399">399: </a><font color="#B22222">-  bs - block size</font>
-
-<a name="line401">401: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line402">402: </a><font color="#B22222">.  -eps_blzpack_block_size - Sets the value of the block size</font>
-
-<a name="line404">404: </a><font color="#B22222">   Level: advanced</font>
-<a name="line405">405: </a><font color="#B22222">@*/</font>
-<a name="line406">406: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line407">407: </a>{
-
-<a name="line413">413: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBlzpackSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
-<a name="line414">414: </a>  <font color="#4169E1">return</font>(0);
-<a name="line415">415: </a>}
-
-<a name="line419">419: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetNSteps_BLZPACK"></a>static PetscErrorCode EPSBlzpackSetNSteps_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nsteps)</font></strong>
-<a name="line420">420: </a>{
-<a name="line422">422: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
-
-<a name="line425">425: </a>  <font color="#4169E1">if</font> (nsteps == PETSC_DEFAULT) blz->nsteps = 0;
-<a name="line426">426: </a>  <font color="#4169E1">else</font> {
-<a name="line427">427: </a>    PetscBLASIntCast(nsteps,&blz->nsteps);
-<a name="line428">428: </a>  }
-<a name="line429">429: </a>  <font color="#4169E1">return</font>(0);
-<a name="line430">430: </a>}
-
-<a name="line434">434: </a><font color="#B22222">/*@</font>
-<a name="line435">435: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a> - Sets the maximum number of steps per run for the BLZPACK</font>
-<a name="line436">436: </a><font color="#B22222">   package.</font>
-
-<a name="line438">438: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line440">440: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line441">441: </a><font color="#B22222">+  eps     - the eigenproblem solver context</font>
-<a name="line442">442: </a><font color="#B22222">-  nsteps  - maximum number of steps</font>
-
-<a name="line444">444: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line445">445: </a><font color="#B22222">.  -eps_blzpack_nsteps - Sets the maximum number of steps per run</font>
-
-<a name="line447">447: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line449">449: </a><font color="#B22222">@*/</font>
-<a name="line450">450: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetNSteps"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nsteps)</font></strong>
-<a name="line451">451: </a>{
-
-<a name="line457">457: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBlzpackSetNSteps_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,nsteps));
-<a name="line458">458: </a>  <font color="#4169E1">return</font>(0);
-<a name="line459">459: </a>}
-
-<a name="line463">463: </a><strong><font color="#4169E1"><a name="EPSCreate_BLZPACK"></a>PETSC_EXTERN PetscErrorCode EPSCreate_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line464">464: </a>{
-<a name="line466">466: </a>  EPS_BLZPACK    *blzpack;
-
-<a name="line469">469: </a>  PetscNewLog(eps,&blzpack);
-<a name="line470">470: </a>  eps->data = (void*)blzpack;
-
-<a name="line472">472: </a>  eps->ops->setup                = EPSSetUp_BLZPACK;
-<a name="line473">473: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_BLZPACK;
-<a name="line474">474: </a>  eps->ops->destroy              = EPSDestroy_BLZPACK;
-<a name="line475">475: </a>  eps->ops->reset                = EPSReset_BLZPACK;
-<a name="line476">476: </a>  eps->ops->view                 = EPSView_BLZPACK;
-<a name="line477">477: </a>  eps->ops->backtransform        = EPSBackTransform_BLZPACK;
-<a name="line478">478: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetBlockSize_C"</font>,EPSBlzpackSetBlockSize_BLZPACK);
-<a name="line479">479: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetNSteps_C"</font>,EPSBlzpackSetNSteps_BLZPACK);
-<a name="line480">480: </a>  <font color="#4169E1">return</font>(0);
-<a name="line481">481: </a>}
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"External packages do not support user-defined stopping test"</font>);
+
+<a name="line147">147: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line148">148: </a>  eps->ops->solve = EPSSolve_BLZPACK;
+<a name="line149">149: </a>  <font color="#4169E1">return</font>(0);
+<a name="line150">150: </a>}
+
+<a name="line154">154: </a><strong><font color="#4169E1"><a name="EPSSolve_BLZPACK"></a>PetscErrorCode EPSSolve_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line155">155: </a>{
+<a name="line157">157: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+<a name="line158">158: </a>  PetscInt       nn;
+<a name="line159">159: </a>  PetscBLASInt   i,nneig,lflag,nvopu;
+<a name="line160">160: </a>  Vec            x,y,v0;
+<a name="line161">161: </a>  PetscScalar    sigma,*pV;
+<a name="line162">162: </a>  Mat            A;
+<a name="line163">163: </a>  KSP            ksp;
+<a name="line164">164: </a>  PC             pc;
+
+<a name="line167">167: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&x);
+<a name="line168">168: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&y);
+<a name="line169">169: </a>  EPSGetStartVector(eps,0,NULL);
+<a name="line170">170: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,0);  <font color="#B22222">/* just for deflation space */</font>
+<a name="line171">171: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
+<a name="line172">172: </a>  VecGetArray(v0,&pV);
+
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (eps->isgeneralized && !blz->slice) {
+<a name="line175">175: </a>    <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigma); <font color="#B22222">/* shift of origin */</font>
+<a name="line176">176: </a>    blz->rstor[0]  = sigma;        <font color="#B22222">/* lower limit of eigenvalue interval */</font>
+<a name="line177">177: </a>    blz->rstor[1]  = sigma;        <font color="#B22222">/* upper limit of eigenvalue interval */</font>
+<a name="line178">178: </a>  } <font color="#4169E1">else</font> {
+<a name="line179">179: </a>    sigma = 0.0;
+<a name="line180">180: </a>    blz->rstor[0]  = eps->inta;    <font color="#B22222">/* lower limit of eigenvalue interval */</font>
+<a name="line181">181: </a>    blz->rstor[1]  = eps->intb;    <font color="#B22222">/* upper limit of eigenvalue interval */</font>
+<a name="line182">182: </a>  }
+<a name="line183">183: </a>  nneig = 0;                       <font color="#B22222">/* no. of eigs less than sigma */</font>
+
+<a name="line185">185: </a>  PetscBLASIntCast(eps->nloc,&blz->istor[0]); <font color="#B22222">/* no. of rows of U, V, X */</font>
+<a name="line186">186: </a>  PetscBLASIntCast(eps->nloc,&blz->istor[1]); <font color="#B22222">/* leading dim of U, V, X */</font>
+<a name="line187">187: </a>  PetscBLASIntCast(eps->nev,&blz->istor[2]);  <font color="#B22222">/* required eigenpairs */</font>
+<a name="line188">188: </a>  PetscBLASIntCast(eps->ncv,&blz->istor[3]);  <font color="#B22222">/* working eigenpairs */</font>
+<a name="line189">189: </a>  blz->istor[4]  = blz->block_size;    <font color="#B22222">/* number of vectors in a block */</font>
+<a name="line190">190: </a>  blz->istor[5]  = blz->nsteps;        <font color="#B22222">/* maximun number of steps per run */</font>
+<a name="line191">191: </a>  blz->istor[6]  = 1;                  <font color="#B22222">/* number of starting vectors as input */</font>
+<a name="line192">192: </a>  blz->istor[7]  = 0;                  <font color="#B22222">/* number of eigenpairs given as input */</font>
+<a name="line193">193: </a>  blz->istor[8]  = (blz->slice || eps->isgeneralized) ? 1 : 0;   <font color="#B22222">/* problem type */</font>
+<a name="line194">194: </a>  blz->istor[9]  = blz->slice;         <font color="#B22222">/* spectrum slicing */</font>
+<a name="line195">195: </a>  blz->istor[10] = eps->isgeneralized ? 1 : 0;   <font color="#B22222">/* solutions refinement (purify) */</font>
+<a name="line196">196: </a>  blz->istor[11] = 0;                  <font color="#B22222">/* level of printing */</font>
+<a name="line197">197: </a>  blz->istor[12] = 6;                  <font color="#B22222">/* file unit for output */</font>
+<a name="line198">198: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&blz->istor[13]);
+
+<a name="line200">200: </a>  blz->rstor[2]  = eps->tol;           <font color="#B22222">/* threshold for convergence */</font>
+
+<a name="line202">202: </a>  lflag = 0;           <font color="#B22222">/* reverse communication interface flag */</font>
+
+<a name="line204">204: </a>  <font color="#4169E1">do</font> {
+<a name="line205">205: </a>    BLZpack_(blz->istor,blz->rstor,&sigma,&nneig,blz->u,blz->v,&lflag,&nvopu,blz->eig,pV);
+
+<a name="line207">207: </a>    <font color="#4169E1">switch</font> (lflag) {
+<a name="line208">208: </a>    <font color="#4169E1">case</font> 1:
+<a name="line209">209: </a>      <font color="#B22222">/* compute v = OP u */</font>
+<a name="line210">210: </a>      <font color="#4169E1">for</font> (i=0;i<nvopu;i++) {
+<a name="line211">211: </a>        VecPlaceArray(x,blz->u+i*eps->nloc);
+<a name="line212">212: </a>        VecPlaceArray(y,blz->v+i*eps->nloc);
+<a name="line213">213: </a>        <font color="#4169E1">if</font> (blz->slice || eps->isgeneralized) {
+<a name="line214">214: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,y);
+<a name="line215">215: </a>        } <font color="#4169E1">else</font> {
+<a name="line216">216: </a>          <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
+<a name="line217">217: </a>        }
+<a name="line218">218: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(eps->V,y,NULL,NULL,NULL);
+<a name="line219">219: </a>        VecResetArray(x);
+<a name="line220">220: </a>        VecResetArray(y);
+<a name="line221">221: </a>      }
+<a name="line222">222: </a>      <font color="#B22222">/* monitor */</font>
+<a name="line223">223: </a>      eps->nconv  = BLZistorr_(blz->istor,<font color="#666666">"NTEIG"</font>,5);
+<a name="line224">224: </a>      EPSMonitor(eps,eps->its,eps->nconv,
+<a name="line225">225: </a>        blz->rstor+BLZistorr_(blz->istor,<font color="#666666">"IRITZ"</font>,5),
+<a name="line226">226: </a>        eps->eigi,
+<a name="line227">227: </a>        blz->rstor+BLZistorr_(blz->istor,<font color="#666666">"IRITZ"</font>,5)+BLZistorr_(blz->istor,<font color="#666666">"JT"</font>,2),
+<a name="line228">228: </a>        BLZistorr_(blz->istor,<font color="#666666">"NRITZ"</font>,5));
+<a name="line229">229: </a>      eps->its = eps->its + 1;
+<a name="line230">230: </a>      <font color="#4169E1">if</font> (eps->its >= eps->max_it || eps->nconv >= eps->nev) lflag = 5;
+<a name="line231">231: </a>      <font color="#4169E1">break</font>;
+<a name="line232">232: </a>    <font color="#4169E1">case</font> 2:
+<a name="line233">233: </a>      <font color="#B22222">/* compute v = B u */</font>
+<a name="line234">234: </a>      <font color="#4169E1">for</font> (i=0;i<nvopu;i++) {
+<a name="line235">235: </a>        VecPlaceArray(x,blz->u+i*eps->nloc);
+<a name="line236">236: </a>        VecPlaceArray(y,blz->v+i*eps->nloc);
+<a name="line237">237: </a>        <a href="../../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,x,y);
+<a name="line238">238: </a>        VecResetArray(x);
+<a name="line239">239: </a>        VecResetArray(y);
+<a name="line240">240: </a>      }
+<a name="line241">241: </a>      <font color="#4169E1">break</font>;
+<a name="line242">242: </a>    <font color="#4169E1">case</font> 3:
+<a name="line243">243: </a>      <font color="#B22222">/* update shift */</font>
+<a name="line244">244: </a>      PetscInfo1(eps,<font color="#666666">"Factorization update (sigma=%g)\n"</font>,(double)sigma);
+<a name="line245">245: </a>      <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,sigma);
+<a name="line246">246: </a>      <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line247">247: </a>      KSPGetPC(ksp,&pc);
+<a name="line248">248: </a>      PCFactorGetMatrix(pc,&A);
+<a name="line249">249: </a>      MatGetInertia(A,&nn,NULL,NULL);
+<a name="line250">250: </a>      PetscBLASIntCast(nn,&nneig);
+<a name="line251">251: </a>      <font color="#4169E1">break</font>;
+<a name="line252">252: </a>    <font color="#4169E1">case</font> 4:
+<a name="line253">253: </a>      <font color="#B22222">/* copy the initial vector */</font>
+<a name="line254">254: </a>      VecPlaceArray(x,blz->v);
+<a name="line255">255: </a>      VecCopy(v0,x);
+<a name="line256">256: </a>      VecResetArray(x);
+<a name="line257">257: </a>      <font color="#4169E1">break</font>;
+<a name="line258">258: </a>    }
+
+<a name="line260">260: </a>  } <font color="#4169E1">while</font> (lflag > 0);
+
+<a name="line262">262: </a>  VecRestoreArray(v0,&pV);
+<a name="line263">263: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
+
+<a name="line265">265: </a>  eps->nconv  = BLZistorr_(blz->istor,<font color="#666666">"NTEIG"</font>,5);
+<a name="line266">266: </a>  eps->reason = EPS_CONVERGED_TOL;
+
+<a name="line268">268: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line269">269: </a>    eps->eigr[i]=blz->eig[i];
+<a name="line270">270: </a>  }
+
+<a name="line272">272: </a>  <font color="#4169E1">if</font> (lflag!=0) {
+<a name="line273">273: </a>    char msg[2048] = <font color="#666666">""</font>;
+<a name="line274">274: </a>    <font color="#4169E1">for</font> (i = 0; i < 33; i++) {
+<a name="line275">275: </a>      <font color="#4169E1">if</font> (blz->istor[15] & (1 << i)) PetscStrcat(msg,blzpack_error[i]);
+<a name="line276">276: </a>    }
+<a name="line277">277: </a>    SETERRQ2(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error in BLZPACK (code=%d): '%s'"</font>,blz->istor[15],msg);
+<a name="line278">278: </a>  }
+<a name="line279">279: </a>  VecDestroy(&x);
+<a name="line280">280: </a>  VecDestroy(&y);
+<a name="line281">281: </a>  <font color="#4169E1">return</font>(0);
+<a name="line282">282: </a>}
+
+<a name="line286">286: </a><strong><font color="#4169E1"><a name="EPSBackTransform_BLZPACK"></a>PetscErrorCode EPSBackTransform_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line287">287: </a>{
+<a name="line289">289: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+
+<a name="line292">292: </a>  <font color="#4169E1">if</font> (!blz->slice && !eps->isgeneralized) {
+<a name="line293">293: </a>    EPSBackTransform_Default(eps);
+<a name="line294">294: </a>  }
+<a name="line295">295: </a>  <font color="#4169E1">return</font>(0);
+<a name="line296">296: </a>}
+
+<a name="line300">300: </a><strong><font color="#4169E1"><a name="EPSReset_BLZPACK"></a>PetscErrorCode EPSReset_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line301">301: </a>{
+<a name="line303">303: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+
+<a name="line306">306: </a>  PetscFree(blz->istor);
+<a name="line307">307: </a>  PetscFree(blz->rstor);
+<a name="line308">308: </a>  PetscFree(blz->u);
+<a name="line309">309: </a>  PetscFree(blz->v);
+<a name="line310">310: </a>  PetscFree(blz->eig);
+<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
+<a name="line312">312: </a>}
+
+<a name="line316">316: </a><strong><font color="#4169E1"><a name="EPSDestroy_BLZPACK"></a>PetscErrorCode EPSDestroy_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line317">317: </a>{
+
+<a name="line321">321: </a>  PetscFree(eps->data);
+<a name="line322">322: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetBlockSize_C"</font>,NULL);
+<a name="line323">323: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetNSteps_C"</font>,NULL);
+<a name="line324">324: </a>  <font color="#4169E1">return</font>(0);
+<a name="line325">325: </a>}
+
+<a name="line329">329: </a><strong><font color="#4169E1"><a name="EPSView_BLZPACK"></a>PetscErrorCode EPSView_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line330">330: </a>{
+<a name="line332">332: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+<a name="line333">333: </a>  PetscBool      isascii;
+
+<a name="line336">336: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line337">337: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line338">338: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLZPACK: block size=%d\n"</font>,blz->block_size);
+<a name="line339">339: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLZPACK: maximum number of steps per run=%d\n"</font>,blz->nsteps);
+<a name="line340">340: </a>    <font color="#4169E1">if</font> (blz->slice) {
+<a name="line341">341: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  BLZPACK: computational interval [%f,%f]\n"</font>,eps->inta,eps->intb);
+<a name="line342">342: </a>    }
+<a name="line343">343: </a>  }
+<a name="line344">344: </a>  <font color="#4169E1">return</font>(0);
+<a name="line345">345: </a>}
+
+<a name="line349">349: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_BLZPACK"></a>PetscErrorCode EPSSetFromOptions_BLZPACK(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line350">350: </a>{
+<a name="line352">352: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+<a name="line353">353: </a>  PetscInt       bs,n;
+<a name="line354">354: </a>  PetscBool      flg;
+
+<a name="line357">357: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> BLZPACK Options"</font>);
+
+<a name="line359">359: </a>  bs = blz->block_size;
+<a name="line360">360: </a>  PetscOptionsInt(<font color="#666666">"-eps_blzpack_block_size"</font>,<font color="#666666">"Block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>"</font>,bs,&bs,&flg);
+<a name="line361">361: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line362">362: </a>    <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>(eps,bs);
+<a name="line363">363: </a>  }
+
+<a name="line365">365: </a>  n = blz->nsteps;
+<a name="line366">366: </a>  PetscOptionsInt(<font color="#666666">"-eps_blzpack_nsteps"</font>,<font color="#666666">"Number of steps"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>"</font>,n,&n,&flg);
+<a name="line367">367: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line368">368: </a>    <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>(eps,n);
+<a name="line369">369: </a>  }
+
+<a name="line371">371: </a>  PetscOptionsTail();
+<a name="line372">372: </a>  <font color="#4169E1">return</font>(0);
+<a name="line373">373: </a>}
+
+<a name="line377">377: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetBlockSize_BLZPACK"></a>static PetscErrorCode EPSBlzpackSetBlockSize_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line378">378: </a>{
+<a name="line380">380: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+
+<a name="line383">383: </a>  <font color="#4169E1">if</font> (bs == PETSC_DEFAULT) blz->block_size = 3;
+<a name="line384">384: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bs <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Block size must be positive"</font>);
+<a name="line385">385: </a>  <font color="#4169E1">else</font> {
+<a name="line386">386: </a>    PetscBLASIntCast(bs,&blz->block_size);
+<a name="line387">387: </a>  }
+<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
+<a name="line389">389: </a>}
+
+<a name="line393">393: </a><font color="#B22222">/*@</font>
+<a name="line394">394: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a> - Sets the block size for the BLZPACK package.</font>
+
+<a name="line396">396: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line398">398: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line399">399: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line400">400: </a><font color="#B22222">-  bs - block size</font>
+
+<a name="line402">402: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line403">403: </a><font color="#B22222">.  -eps_blzpack_block_size - Sets the value of the block size</font>
+
+<a name="line405">405: </a><font color="#B22222">   Level: advanced</font>
+<a name="line406">406: </a><font color="#B22222">@*/</font>
+<a name="line407">407: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetBlockSize.html#EPSBlzpackSetBlockSize">EPSBlzpackSetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line408">408: </a>{
+
+<a name="line414">414: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBlzpackSetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
+<a name="line415">415: </a>  <font color="#4169E1">return</font>(0);
+<a name="line416">416: </a>}
+
+<a name="line420">420: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetNSteps_BLZPACK"></a>static PetscErrorCode EPSBlzpackSetNSteps_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nsteps)</font></strong>
+<a name="line421">421: </a>{
+<a name="line423">423: </a>  EPS_BLZPACK    *blz = (EPS_BLZPACK*)eps->data;
+
+<a name="line426">426: </a>  <font color="#4169E1">if</font> (nsteps == PETSC_DEFAULT) blz->nsteps = 0;
+<a name="line427">427: </a>  <font color="#4169E1">else</font> {
+<a name="line428">428: </a>    PetscBLASIntCast(nsteps,&blz->nsteps);
+<a name="line429">429: </a>  }
+<a name="line430">430: </a>  <font color="#4169E1">return</font>(0);
+<a name="line431">431: </a>}
+
+<a name="line435">435: </a><font color="#B22222">/*@</font>
+<a name="line436">436: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a> - Sets the maximum number of steps per run for the BLZPACK</font>
+<a name="line437">437: </a><font color="#B22222">   package.</font>
+
+<a name="line439">439: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line441">441: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line442">442: </a><font color="#B22222">+  eps     - the eigenproblem solver context</font>
+<a name="line443">443: </a><font color="#B22222">-  nsteps  - maximum number of steps</font>
+
+<a name="line445">445: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line446">446: </a><font color="#B22222">.  -eps_blzpack_nsteps - Sets the maximum number of steps per run</font>
+
+<a name="line448">448: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line450">450: </a><font color="#B22222">@*/</font>
+<a name="line451">451: </a><strong><font color="#4169E1"><a name="EPSBlzpackSetNSteps"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSBlzpackSetNSteps.html#EPSBlzpackSetNSteps">EPSBlzpackSetNSteps</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nsteps)</font></strong>
+<a name="line452">452: </a>{
+
+<a name="line458">458: </a>  PetscTryMethod(eps,<font color="#666666">"EPSBlzpackSetNSteps_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,nsteps));
+<a name="line459">459: </a>  <font color="#4169E1">return</font>(0);
+<a name="line460">460: </a>}
+
+<a name="line464">464: </a><strong><font color="#4169E1"><a name="EPSCreate_BLZPACK"></a>PETSC_EXTERN PetscErrorCode EPSCreate_BLZPACK(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line465">465: </a>{
+<a name="line467">467: </a>  EPS_BLZPACK    *blzpack;
+
+<a name="line470">470: </a>  PetscNewLog(eps,&blzpack);
+<a name="line471">471: </a>  eps->data = (void*)blzpack;
+
+<a name="line473">473: </a>  eps->ops->setup                = EPSSetUp_BLZPACK;
+<a name="line474">474: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_BLZPACK;
+<a name="line475">475: </a>  eps->ops->destroy              = EPSDestroy_BLZPACK;
+<a name="line476">476: </a>  eps->ops->reset                = EPSReset_BLZPACK;
+<a name="line477">477: </a>  eps->ops->view                 = EPSView_BLZPACK;
+<a name="line478">478: </a>  eps->ops->backtransform        = EPSBackTransform_BLZPACK;
+<a name="line479">479: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetBlockSize_C"</font>,EPSBlzpackSetBlockSize_BLZPACK);
+<a name="line480">480: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSBlzpackSetNSteps_C"</font>,EPSBlzpackSetNSteps_BLZPACK);
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/blzpack/blzpackp.h b/src/eps/impls/external/blzpack/blzpackp.h
index d785801..c2772c2 100644
--- a/src/eps/impls/external/blzpack/blzpackp.h
+++ b/src/eps/impls/external/blzpack/blzpackp.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/eps/impls/external/blzpack/blzpackp.h.html b/src/eps/impls/external/blzpack/blzpackp.h.html
index e0f33d9..2698e34 100644
--- a/src/eps/impls/external/blzpack/blzpackp.h.html
+++ b/src/eps/impls/external/blzpack/blzpackp.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blzpack/blzpackp.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:20+00:00">
+<meta name="date" content="2016-05-16T10:33:16+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blzpack/blzpackp.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blzpack/blzpackp.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private data structure used by the BLZPACK interface</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/eps/impls/external/blzpack/index.html b/src/eps/impls/external/blzpack/index.html
index ad6f535..b296fda 100644
--- a/src/eps/impls/external/blzpack/index.html
+++ b/src/eps/impls/external/blzpack/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blzpack/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blzpack/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/blzpack/makefile b/src/eps/impls/external/blzpack/makefile
index 4712042..d474f08 100644
--- a/src/eps/impls/external/blzpack/makefile
+++ b/src/eps/impls/external/blzpack/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -22,7 +22,6 @@
 ALL: lib
 
 #requiresdefine  'SLEPC_HAVE_BLZPACK'
-#requiresscalar   real
 
 CFLAGS   =
 FFLAGS   =
diff --git a/src/eps/impls/external/blzpack/makefile.html b/src/eps/impls/external/blzpack/makefile.html
index 644abc0..11a6475 100644
--- a/src/eps/impls/external/blzpack/makefile.html
+++ b/src/eps/impls/external/blzpack/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/blzpack/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:20+00:00">
+<meta name="date" content="2016-05-16T10:33:16+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/blzpack/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/blzpack/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -33,7 +33,6 @@
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
 <font color="#A020F0">#requiresdefine  'SLEPC_HAVE_BLZPACK'</font>
-<font color="#A020F0">#requiresscalar   real</font>
 
 CFLAGS   =
 FFLAGS   =
diff --git a/src/eps/impls/external/feast/feast.c b/src/eps/impls/external/feast/feast.c
index 15d8ce7..acef4b6 100644
--- a/src/eps/impls/external/feast/feast.c
+++ b/src/eps/impls/external/feast/feast.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -63,6 +63,7 @@ PetscErrorCode EPSSetUp_FEAST(EPS eps)
   if (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"FEAST only available for symmetric/Hermitian eigenproblems");
   if (eps->balance!=EPS_BALANCE_NONE) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Balancing not supported in the FEAST interface");
   if (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Arbitrary selection of eigenpairs not supported in this solver");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"External packages do not support user-defined stopping test");
 
   if (!ctx->npoints) ctx->npoints = 8;
 
@@ -202,7 +203,7 @@ PetscErrorCode EPSDestroy_FEAST(EPS eps)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_FEAST"
-PetscErrorCode EPSSetFromOptions_FEAST(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_FEAST(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
@@ -233,7 +234,7 @@ PetscErrorCode EPSView_FEAST(EPS eps,PetscViewer viewer)
   PetscFunctionBegin;
   ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
   if (isascii) {
-    ierr = PetscViewerASCIIPrintf(viewer,"  FEAST: number of contour integration points=%d\n",ctx->npoints);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  FEAST: number of contour integration points=%D\n",ctx->npoints);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -290,7 +291,7 @@ static PetscErrorCode EPSFEASTGetNumPoints_FEAST(EPS eps,PetscInt *npoints)
   EPS_FEAST *ctx = (EPS_FEAST*)eps->data;
 
   PetscFunctionBegin;
-  if (npoints) *npoints = ctx->npoints;
+  *npoints = ctx->npoints;
   PetscFunctionReturn(0);
 }
 
@@ -318,7 +319,8 @@ PetscErrorCode EPSFEASTGetNumPoints(EPS eps,PetscInt *npoints)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSFEASTSetNumPoints_C",(EPS,PetscInt*),(eps,npoints));CHKERRQ(ierr);
+  PetscValidPointer(npoints,2);
+  ierr = PetscUseMethod(eps,"EPSFEASTGetNumPoints_C",(EPS,PetscInt*),(eps,npoints));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/external/feast/feast.c.html b/src/eps/impls/external/feast/feast.c.html
index 1535c46..fa1004b 100644
--- a/src/eps/impls/external/feast/feast.c.html
+++ b/src/eps/impls/external/feast/feast.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/feast/feast.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:21+00:00">
+<meta name="date" content="2016-05-16T10:33:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/feast/feast.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/feast/feast.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the FEAST package</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -71,243 +71,244 @@
 <a name="line63"> 63: </a>  <font color="#4169E1">if</font> (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"FEAST only available for symmetric/Hermitian eigenproblems"</font>);
 <a name="line64"> 64: </a>  <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Balancing not supported in the FEAST interface"</font>);
 <a name="line65"> 65: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
-
-<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (!ctx->npoints) ctx->npoints = 8;
-
-<a name="line69"> 69: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-<a name="line70"> 70: </a>  PetscObjectTypeCompare((PetscObject)eps->V,BVVECS,&flg);
-<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
-<a name="line72"> 72: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,1);
-
-<a name="line74"> 74: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line75"> 75: </a>  eps->ops->solve = EPSSolve_FEAST;
-<a name="line76"> 76: </a>  <font color="#4169E1">return</font>(0);
-<a name="line77"> 77: </a>}
-
-<a name="line81"> 81: </a><strong><font color="#4169E1"><a name="EPSSolve_FEAST"></a>PetscErrorCode EPSSolve_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line82"> 82: </a>{
-<a name="line84"> 84: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
-<a name="line85"> 85: </a>  PetscBLASInt   n,fpm[64],ijob,info,nev,ncv,loop;
-<a name="line86"> 86: </a>  PetscReal      *evals,epsout;
-<a name="line87"> 87: </a>  PetscInt       i,k,nmat;
-<a name="line88"> 88: </a>  PetscScalar    *pV,Ze;
-<a name="line89"> 89: </a>  Vec            v0,x,y,w = eps->work[0];
-<a name="line90"> 90: </a>  Mat            A,B;
-
-<a name="line93"> 93: </a>  PetscBLASIntCast(eps->nev,&nev);
-<a name="line94"> 94: </a>  PetscBLASIntCast(eps->ncv,&ncv);
-<a name="line95"> 95: </a>  PetscBLASIntCast(eps->nloc,&n);
-
-<a name="line97"> 97: </a>  <font color="#B22222">/* parameters */</font>
-<a name="line98"> 98: </a>  FEASTinit_(fpm);
-<a name="line99"> 99: </a>  fpm[0] = (eps->numbermonitors>0)? 1: 0;                      <font color="#B22222">/* runtime comments */</font>
-<a name="line100">100: </a>  fpm[1] = ctx->npoints;                                       <font color="#B22222">/* contour points */</font>
-<a name="line101">101: </a>  PetscBLASIntCast(eps->max_it,&fpm[3]);  <font color="#B22222">/* refinement loops */</font>
-<a name="line102">102: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
-<a name="line103">103: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&fpm[8]);
-<a name="line104">104: </a><font color="#A020F0">#endif</font>
-
-<a name="line106">106: </a>  PetscMalloc1(eps->ncv,&evals);
-<a name="line107">107: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&x);
-<a name="line108">108: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&y);
-<a name="line109">109: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
-<a name="line110">110: </a>  VecGetArray(v0,&pV);
-
-<a name="line112">112: </a>  ijob = -1;           <font color="#B22222">/* first call to reverse communication interface */</font>
-<a name="line113">113: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line114">114: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line115">115: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
-<a name="line116">116: </a>  <font color="#4169E1">else</font> B = NULL;
-
-<a name="line118">118: </a>  <font color="#4169E1">do</font> {
-
-<a name="line120">120: </a>    PetscStackCall(<font color="#666666">"FEASTrci"</font>,FEASTrci_(&ijob,&n,&Ze,ctx->work1,ctx->work2,ctx->Aq,ctx->Bq,fpm,&epsout,&loop,&eps->inta,&eps->intb,&eps->ncv,evals,pV,&eps->nconv,eps->errest,&info));
-
-<a name="line122">122: </a>    <font color="#4169E1">if</font> (ncv!=eps->ncv) SETERRQ1(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"FEAST changed value of ncv to %d"</font>,ncv);
-<a name="line123">123: </a>    <font color="#4169E1">if</font> (ijob == 10 || ijob == 20) {
-<a name="line124">124: </a>      <font color="#B22222">/* set new quadrature point */</font>
-<a name="line125">125: </a>      <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,-Ze);
-<a name="line126">126: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ijob == 11 || ijob == 21) {
-<a name="line127">127: </a>      <font color="#B22222">/* linear solve (A-sigma*B)\work2, overwrite work2 */</font>
-<a name="line128">128: </a>      <font color="#4169E1">for</font> (k=0;k<ncv;k++) {
-<a name="line129">129: </a>        VecPlaceArray(x,ctx->work2+eps->nloc*k);
-<a name="line130">130: </a>        <font color="#4169E1">if</font> (ijob == 11) {
-<a name="line131">131: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,w);
-<a name="line132">132: </a>        } <font color="#4169E1">else</font> {
-<a name="line133">133: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolveTranspose.html#STMatSolveTranspose">STMatSolveTranspose</a>(eps->st,x,w);
-<a name="line134">134: </a>        }
-<a name="line135">135: </a>        VecCopy(w,x);
-<a name="line136">136: </a>        VecScale(x,-1.0);
-<a name="line137">137: </a>        VecResetArray(x);
-<a name="line138">138: </a>      }
-<a name="line139">139: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ijob == 30 || ijob == 40) {
-<a name="line140">140: </a>      <font color="#B22222">/* multiplication A*V or B*V, result in work1 */</font>
-<a name="line141">141: </a>      <font color="#4169E1">for</font> (k=0;k<fpm[24];k++) {
-<a name="line142">142: </a>        VecPlaceArray(x,&pV[(fpm[23]+k-1)*eps->nloc]);
-<a name="line143">143: </a>        VecPlaceArray(y,&ctx->work1[(fpm[23]+k-1)*eps->nloc]);
-<a name="line144">144: </a>        <font color="#4169E1">if</font> (ijob == 30) {
-<a name="line145">145: </a>          MatMult(A,x,y);
-<a name="line146">146: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nmat>1) {
-<a name="line147">147: </a>          MatMult(B,x,y);
-<a name="line148">148: </a>        } <font color="#4169E1">else</font> {
-<a name="line149">149: </a>          VecCopy(x,y);
-<a name="line150">150: </a>        }
-<a name="line151">151: </a>        VecResetArray(x);
-<a name="line152">152: </a>        VecResetArray(y);
-<a name="line153">153: </a>      }
-<a name="line154">154: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ijob != 0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Internal error in FEAST reverse comunication interface (ijob=%d)"</font>,ijob);
-
-<a name="line156">156: </a>  } <font color="#4169E1">while</font> (ijob != 0);
-
-<a name="line158">158: </a>  eps->reason = EPS_CONVERGED_TOL;
-<a name="line159">159: </a>  eps->its = loop;
-<a name="line160">160: </a>  <font color="#4169E1">if</font> (info!=0) {
-<a name="line161">161: </a>    <font color="#4169E1">if</font> (info==1) { <font color="#B22222">/* No eigenvalue has been found in the proposed search interval */</font>
-<a name="line162">162: </a>      eps->nconv = 0;
-<a name="line163">163: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (info==2) { <font color="#B22222">/* FEAST did not converge "yet" */</font>
-<a name="line164">164: </a>      eps->reason = EPS_DIVERGED_ITS;
-<a name="line165">165: </a>    } <font color="#4169E1">else</font> SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error reported by FEAST (%d)"</font>,info);
-<a name="line166">166: </a>  }
-
-<a name="line168">168: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) eps->eigr[i] = evals[i];
-
-<a name="line170">170: </a>  VecRestoreArray(v0,&pV);
-<a name="line171">171: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
-<a name="line172">172: </a>  VecDestroy(&x);
-<a name="line173">173: </a>  VecDestroy(&y);
-<a name="line174">174: </a>  PetscFree(evals);
-<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
-<a name="line176">176: </a>}
-
-<a name="line180">180: </a><strong><font color="#4169E1"><a name="EPSReset_FEAST"></a>PetscErrorCode EPSReset_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line181">181: </a>{
-<a name="line183">183: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
-
-<a name="line186">186: </a>  PetscFree4(ctx->work1,ctx->work2,ctx->Aq,ctx->Bq);
-<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
-<a name="line188">188: </a>}
-
-<a name="line192">192: </a><strong><font color="#4169E1"><a name="EPSDestroy_FEAST"></a>PetscErrorCode EPSDestroy_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line193">193: </a>{
-
-<a name="line197">197: </a>  PetscFree(eps->data);
-<a name="line198">198: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,NULL);
-<a name="line199">199: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTGetNumPoints_C"</font>,NULL);
-<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
-<a name="line201">201: </a>}
-
-<a name="line205">205: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_FEAST"></a>PetscErrorCode EPSSetFromOptions_FEAST(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line206">206: </a>{
-<a name="line208">208: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
-<a name="line209">209: </a>  PetscInt       n;
-<a name="line210">210: </a>  PetscBool      flg;
-
-<a name="line213">213: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> FEAST Options"</font>);
-
-<a name="line215">215: </a>  n = ctx->npoints;
-<a name="line216">216: </a>  PetscOptionsInt(<font color="#666666">"-eps_feast_num_points"</font>,<font color="#666666">"Number of contour integration points"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>"</font>,n,&n,&flg);
-<a name="line217">217: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line218">218: </a>    <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>(eps,n);
-<a name="line219">219: </a>  }
-
-<a name="line221">221: </a>  PetscOptionsTail();
-<a name="line222">222: </a>  <font color="#4169E1">return</font>(0);
-<a name="line223">223: </a>}
-
-<a name="line227">227: </a><strong><font color="#4169E1"><a name="EPSView_FEAST"></a>PetscErrorCode EPSView_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line228">228: </a>{
-<a name="line230">230: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
-<a name="line231">231: </a>  PetscBool      isascii;
-
-<a name="line234">234: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line235">235: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line236">236: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  FEAST: number of contour integration points=%d\n"</font>,ctx->npoints);
-<a name="line237">237: </a>  }
-<a name="line238">238: </a>  <font color="#4169E1">return</font>(0);
-<a name="line239">239: </a>}
-
-<a name="line243">243: </a><strong><font color="#4169E1"><a name="EPSFEASTSetNumPoints_FEAST"></a>static PetscErrorCode EPSFEASTSetNumPoints_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npoints)</font></strong>
-<a name="line244">244: </a>{
-<a name="line246">246: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
-
-<a name="line249">249: </a>  <font color="#4169E1">if</font> (npoints == PETSC_DEFAULT) ctx->npoints = 8;
-<a name="line250">250: </a>  <font color="#4169E1">else</font> {
-<a name="line251">251: </a>    PetscBLASIntCast(npoints,&ctx->npoints);
-<a name="line252">252: </a>  }
-<a name="line253">253: </a>  <font color="#4169E1">return</font>(0);
-<a name="line254">254: </a>}
-
-<a name="line258">258: </a><font color="#B22222">/*@</font>
-<a name="line259">259: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a> - Sets the number of contour integration points for</font>
-<a name="line260">260: </a><font color="#B22222">   the FEAST package.</font>
-
-<a name="line262">262: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line264">264: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line265">265: </a><font color="#B22222">+  eps     - the eigenproblem solver context</font>
-<a name="line266">266: </a><font color="#B22222">-  npoints - number of contour integration points</font>
-
-<a name="line268">268: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line269">269: </a><font color="#B22222">.  -eps_feast_num_points - Sets the number of points</font>
-
-<a name="line271">271: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line273">273: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a>()</font>
-<a name="line274">274: </a><font color="#B22222">@*/</font>
-<a name="line275">275: </a><strong><font color="#4169E1"><a name="EPSFEASTSetNumPoints"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npoints)</font></strong>
-<a name="line276">276: </a>{
-
-<a name="line282">282: </a>  PetscTryMethod(eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,npoints));
-<a name="line283">283: </a>  <font color="#4169E1">return</font>(0);
-<a name="line284">284: </a>}
-
-<a name="line288">288: </a><strong><font color="#4169E1"><a name="EPSFEASTGetNumPoints_FEAST"></a>static PetscErrorCode EPSFEASTGetNumPoints_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npoints)</font></strong>
-<a name="line289">289: </a>{
-<a name="line290">290: </a>  EPS_FEAST *ctx = (EPS_FEAST*)eps->data;
-
-<a name="line293">293: </a>  <font color="#4169E1">if</font> (npoints) *npoints = ctx->npoints;
-<a name="line294">294: </a>  <font color="#4169E1">return</font>(0);
-<a name="line295">295: </a>}
-
-<a name="line299">299: </a><font color="#B22222">/*@</font>
-<a name="line300">300: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a> - Gets the number of contour integration points for</font>
-<a name="line301">301: </a><font color="#B22222">   the FEAST package.</font>
-
-<a name="line303">303: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line305">305: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line306">306: </a><font color="#B22222">.  eps     - the eigenproblem solver context</font>
-
-<a name="line308">308: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line309">309: </a><font color="#B22222">-  npoints - number of contour integration points</font>
-
-<a name="line311">311: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line313">313: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>()</font>
-<a name="line314">314: </a><font color="#B22222">@*/</font>
-<a name="line315">315: </a><strong><font color="#4169E1"><a name="EPSFEASTGetNumPoints"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npoints)</font></strong>
-<a name="line316">316: </a>{
-
-<a name="line321">321: </a>  PetscTryMethod(eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,npoints));
-<a name="line322">322: </a>  <font color="#4169E1">return</font>(0);
-<a name="line323">323: </a>}
-
-<a name="line327">327: </a><strong><font color="#4169E1"><a name="EPSCreate_FEAST"></a>PETSC_EXTERN PetscErrorCode EPSCreate_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line328">328: </a>{
-<a name="line329">329: </a>  EPS_FEAST      *ctx;
-
-<a name="line333">333: </a>  PetscNewLog(eps,&ctx);
-<a name="line334">334: </a>  eps->data = (void*)ctx;
-
-<a name="line336">336: </a>  eps->ops->setup                = EPSSetUp_FEAST;
-<a name="line337">337: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_FEAST;
-<a name="line338">338: </a>  eps->ops->destroy              = EPSDestroy_FEAST;
-<a name="line339">339: </a>  eps->ops->reset                = EPSReset_FEAST;
-<a name="line340">340: </a>  eps->ops->view                 = EPSView_FEAST;
-<a name="line341">341: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,EPSFEASTSetNumPoints_FEAST);
-<a name="line342">342: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTGetNumPoints_C"</font>,EPSFEASTGetNumPoints_FEAST);
-<a name="line343">343: </a>  <font color="#4169E1">return</font>(0);
-<a name="line344">344: </a>}
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"External packages do not support user-defined stopping test"</font>);
+
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!ctx->npoints) ctx->npoints = 8;
+
+<a name="line70"> 70: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+<a name="line71"> 71: </a>  PetscObjectTypeCompare((PetscObject)eps->V,BVVECS,&flg);
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
+<a name="line73"> 73: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,1);
+
+<a name="line75"> 75: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line76"> 76: </a>  eps->ops->solve = EPSSolve_FEAST;
+<a name="line77"> 77: </a>  <font color="#4169E1">return</font>(0);
+<a name="line78"> 78: </a>}
+
+<a name="line82"> 82: </a><strong><font color="#4169E1"><a name="EPSSolve_FEAST"></a>PetscErrorCode EPSSolve_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line83"> 83: </a>{
+<a name="line85"> 85: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
+<a name="line86"> 86: </a>  PetscBLASInt   n,fpm[64],ijob,info,nev,ncv,loop;
+<a name="line87"> 87: </a>  PetscReal      *evals,epsout;
+<a name="line88"> 88: </a>  PetscInt       i,k,nmat;
+<a name="line89"> 89: </a>  PetscScalar    *pV,Ze;
+<a name="line90"> 90: </a>  Vec            v0,x,y,w = eps->work[0];
+<a name="line91"> 91: </a>  Mat            A,B;
+
+<a name="line94"> 94: </a>  PetscBLASIntCast(eps->nev,&nev);
+<a name="line95"> 95: </a>  PetscBLASIntCast(eps->ncv,&ncv);
+<a name="line96"> 96: </a>  PetscBLASIntCast(eps->nloc,&n);
+
+<a name="line98"> 98: </a>  <font color="#B22222">/* parameters */</font>
+<a name="line99"> 99: </a>  FEASTinit_(fpm);
+<a name="line100">100: </a>  fpm[0] = (eps->numbermonitors>0)? 1: 0;                      <font color="#B22222">/* runtime comments */</font>
+<a name="line101">101: </a>  fpm[1] = ctx->npoints;                                       <font color="#B22222">/* contour points */</font>
+<a name="line102">102: </a>  PetscBLASIntCast(eps->max_it,&fpm[3]);  <font color="#B22222">/* refinement loops */</font>
+<a name="line103">103: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
+<a name="line104">104: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&fpm[8]);
+<a name="line105">105: </a><font color="#A020F0">#endif</font>
+
+<a name="line107">107: </a>  PetscMalloc1(eps->ncv,&evals);
+<a name="line108">108: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&x);
+<a name="line109">109: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,PETSC_DECIDE,NULL,&y);
+<a name="line110">110: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
+<a name="line111">111: </a>  VecGetArray(v0,&pV);
+
+<a name="line113">113: </a>  ijob = -1;           <font color="#B22222">/* first call to reverse communication interface */</font>
+<a name="line114">114: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line115">115: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line116">116: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
+<a name="line117">117: </a>  <font color="#4169E1">else</font> B = NULL;
+
+<a name="line119">119: </a>  <font color="#4169E1">do</font> {
+
+<a name="line121">121: </a>    PetscStackCall(<font color="#666666">"FEASTrci"</font>,FEASTrci_(&ijob,&n,&Ze,ctx->work1,ctx->work2,ctx->Aq,ctx->Bq,fpm,&epsout,&loop,&eps->inta,&eps->intb,&eps->ncv,evals,pV,&eps->nconv,eps->errest,&info));
+
+<a name="line123">123: </a>    <font color="#4169E1">if</font> (ncv!=eps->ncv) SETERRQ1(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"FEAST changed value of ncv to %d"</font>,ncv);
+<a name="line124">124: </a>    <font color="#4169E1">if</font> (ijob == 10 || ijob == 20) {
+<a name="line125">125: </a>      <font color="#B22222">/* set new quadrature point */</font>
+<a name="line126">126: </a>      <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,-Ze);
+<a name="line127">127: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ijob == 11 || ijob == 21) {
+<a name="line128">128: </a>      <font color="#B22222">/* linear solve (A-sigma*B)\work2, overwrite work2 */</font>
+<a name="line129">129: </a>      <font color="#4169E1">for</font> (k=0;k<ncv;k++) {
+<a name="line130">130: </a>        VecPlaceArray(x,ctx->work2+eps->nloc*k);
+<a name="line131">131: </a>        <font color="#4169E1">if</font> (ijob == 11) {
+<a name="line132">132: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(eps->st,x,w);
+<a name="line133">133: </a>        } <font color="#4169E1">else</font> {
+<a name="line134">134: </a>          <a href="../../../../../docs/manualpages/ST/STMatSolveTranspose.html#STMatSolveTranspose">STMatSolveTranspose</a>(eps->st,x,w);
+<a name="line135">135: </a>        }
+<a name="line136">136: </a>        VecCopy(w,x);
+<a name="line137">137: </a>        VecScale(x,-1.0);
+<a name="line138">138: </a>        VecResetArray(x);
+<a name="line139">139: </a>      }
+<a name="line140">140: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ijob == 30 || ijob == 40) {
+<a name="line141">141: </a>      <font color="#B22222">/* multiplication A*V or B*V, result in work1 */</font>
+<a name="line142">142: </a>      <font color="#4169E1">for</font> (k=0;k<fpm[24];k++) {
+<a name="line143">143: </a>        VecPlaceArray(x,&pV[(fpm[23]+k-1)*eps->nloc]);
+<a name="line144">144: </a>        VecPlaceArray(y,&ctx->work1[(fpm[23]+k-1)*eps->nloc]);
+<a name="line145">145: </a>        <font color="#4169E1">if</font> (ijob == 30) {
+<a name="line146">146: </a>          MatMult(A,x,y);
+<a name="line147">147: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nmat>1) {
+<a name="line148">148: </a>          MatMult(B,x,y);
+<a name="line149">149: </a>        } <font color="#4169E1">else</font> {
+<a name="line150">150: </a>          VecCopy(x,y);
+<a name="line151">151: </a>        }
+<a name="line152">152: </a>        VecResetArray(x);
+<a name="line153">153: </a>        VecResetArray(y);
+<a name="line154">154: </a>      }
+<a name="line155">155: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ijob != 0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Internal error in FEAST reverse comunication interface (ijob=%d)"</font>,ijob);
+
+<a name="line157">157: </a>  } <font color="#4169E1">while</font> (ijob != 0);
+
+<a name="line159">159: </a>  eps->reason = EPS_CONVERGED_TOL;
+<a name="line160">160: </a>  eps->its = loop;
+<a name="line161">161: </a>  <font color="#4169E1">if</font> (info!=0) {
+<a name="line162">162: </a>    <font color="#4169E1">if</font> (info==1) { <font color="#B22222">/* No eigenvalue has been found in the proposed search interval */</font>
+<a name="line163">163: </a>      eps->nconv = 0;
+<a name="line164">164: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (info==2) { <font color="#B22222">/* FEAST did not converge "yet" */</font>
+<a name="line165">165: </a>      eps->reason = EPS_DIVERGED_ITS;
+<a name="line166">166: </a>    } <font color="#4169E1">else</font> SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error reported by FEAST (%d)"</font>,info);
+<a name="line167">167: </a>  }
+
+<a name="line169">169: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) eps->eigr[i] = evals[i];
+
+<a name="line171">171: </a>  VecRestoreArray(v0,&pV);
+<a name="line172">172: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
+<a name="line173">173: </a>  VecDestroy(&x);
+<a name="line174">174: </a>  VecDestroy(&y);
+<a name="line175">175: </a>  PetscFree(evals);
+<a name="line176">176: </a>  <font color="#4169E1">return</font>(0);
+<a name="line177">177: </a>}
+
+<a name="line181">181: </a><strong><font color="#4169E1"><a name="EPSReset_FEAST"></a>PetscErrorCode EPSReset_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line182">182: </a>{
+<a name="line184">184: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
+
+<a name="line187">187: </a>  PetscFree4(ctx->work1,ctx->work2,ctx->Aq,ctx->Bq);
+<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
+<a name="line189">189: </a>}
+
+<a name="line193">193: </a><strong><font color="#4169E1"><a name="EPSDestroy_FEAST"></a>PetscErrorCode EPSDestroy_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line194">194: </a>{
+
+<a name="line198">198: </a>  PetscFree(eps->data);
+<a name="line199">199: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,NULL);
+<a name="line200">200: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTGetNumPoints_C"</font>,NULL);
+<a name="line201">201: </a>  <font color="#4169E1">return</font>(0);
+<a name="line202">202: </a>}
+
+<a name="line206">206: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_FEAST"></a>PetscErrorCode EPSSetFromOptions_FEAST(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line207">207: </a>{
+<a name="line209">209: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
+<a name="line210">210: </a>  PetscInt       n;
+<a name="line211">211: </a>  PetscBool      flg;
+
+<a name="line214">214: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> FEAST Options"</font>);
+
+<a name="line216">216: </a>  n = ctx->npoints;
+<a name="line217">217: </a>  PetscOptionsInt(<font color="#666666">"-eps_feast_num_points"</font>,<font color="#666666">"Number of contour integration points"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>"</font>,n,&n,&flg);
+<a name="line218">218: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line219">219: </a>    <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>(eps,n);
+<a name="line220">220: </a>  }
+
+<a name="line222">222: </a>  PetscOptionsTail();
+<a name="line223">223: </a>  <font color="#4169E1">return</font>(0);
+<a name="line224">224: </a>}
+
+<a name="line228">228: </a><strong><font color="#4169E1"><a name="EPSView_FEAST"></a>PetscErrorCode EPSView_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line229">229: </a>{
+<a name="line231">231: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
+<a name="line232">232: </a>  PetscBool      isascii;
+
+<a name="line235">235: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line236">236: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line237">237: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  FEAST: number of contour integration points=%D\n"</font>,ctx->npoints);
+<a name="line238">238: </a>  }
+<a name="line239">239: </a>  <font color="#4169E1">return</font>(0);
+<a name="line240">240: </a>}
+
+<a name="line244">244: </a><strong><font color="#4169E1"><a name="EPSFEASTSetNumPoints_FEAST"></a>static PetscErrorCode EPSFEASTSetNumPoints_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npoints)</font></strong>
+<a name="line245">245: </a>{
+<a name="line247">247: </a>  EPS_FEAST      *ctx = (EPS_FEAST*)eps->data;
+
+<a name="line250">250: </a>  <font color="#4169E1">if</font> (npoints == PETSC_DEFAULT) ctx->npoints = 8;
+<a name="line251">251: </a>  <font color="#4169E1">else</font> {
+<a name="line252">252: </a>    PetscBLASIntCast(npoints,&ctx->npoints);
+<a name="line253">253: </a>  }
+<a name="line254">254: </a>  <font color="#4169E1">return</font>(0);
+<a name="line255">255: </a>}
+
+<a name="line259">259: </a><font color="#B22222">/*@</font>
+<a name="line260">260: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a> - Sets the number of contour integration points for</font>
+<a name="line261">261: </a><font color="#B22222">   the FEAST package.</font>
+
+<a name="line263">263: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line265">265: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line266">266: </a><font color="#B22222">+  eps     - the eigenproblem solver context</font>
+<a name="line267">267: </a><font color="#B22222">-  npoints - number of contour integration points</font>
+
+<a name="line269">269: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line270">270: </a><font color="#B22222">.  -eps_feast_num_points - Sets the number of points</font>
+
+<a name="line272">272: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line274">274: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a>()</font>
+<a name="line275">275: </a><font color="#B22222">@*/</font>
+<a name="line276">276: </a><strong><font color="#4169E1"><a name="EPSFEASTSetNumPoints"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npoints)</font></strong>
+<a name="line277">277: </a>{
+
+<a name="line283">283: </a>  PetscTryMethod(eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,npoints));
+<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
+<a name="line285">285: </a>}
+
+<a name="line289">289: </a><strong><font color="#4169E1"><a name="EPSFEASTGetNumPoints_FEAST"></a>static PetscErrorCode EPSFEASTGetNumPoints_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npoints)</font></strong>
+<a name="line290">290: </a>{
+<a name="line291">291: </a>  EPS_FEAST *ctx = (EPS_FEAST*)eps->data;
+
+<a name="line294">294: </a>  *npoints = ctx->npoints;
+<a name="line295">295: </a>  <font color="#4169E1">return</font>(0);
+<a name="line296">296: </a>}
+
+<a name="line300">300: </a><font color="#B22222">/*@</font>
+<a name="line301">301: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a> - Gets the number of contour integration points for</font>
+<a name="line302">302: </a><font color="#B22222">   the FEAST package.</font>
+
+<a name="line304">304: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line306">306: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line307">307: </a><font color="#B22222">.  eps     - the eigenproblem solver context</font>
+
+<a name="line309">309: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line310">310: </a><font color="#B22222">-  npoints - number of contour integration points</font>
+
+<a name="line312">312: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line314">314: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSFEASTSetNumPoints.html#EPSFEASTSetNumPoints">EPSFEASTSetNumPoints</a>()</font>
+<a name="line315">315: </a><font color="#B22222">@*/</font>
+<a name="line316">316: </a><strong><font color="#4169E1"><a name="EPSFEASTGetNumPoints"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSFEASTGetNumPoints.html#EPSFEASTGetNumPoints">EPSFEASTGetNumPoints</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npoints)</font></strong>
+<a name="line317">317: </a>{
+
+<a name="line323">323: </a>  PetscUseMethod(eps,<font color="#666666">"EPSFEASTGetNumPoints_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,npoints));
+<a name="line324">324: </a>  <font color="#4169E1">return</font>(0);
+<a name="line325">325: </a>}
+
+<a name="line329">329: </a><strong><font color="#4169E1"><a name="EPSCreate_FEAST"></a>PETSC_EXTERN PetscErrorCode EPSCreate_FEAST(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line330">330: </a>{
+<a name="line331">331: </a>  EPS_FEAST      *ctx;
+
+<a name="line335">335: </a>  PetscNewLog(eps,&ctx);
+<a name="line336">336: </a>  eps->data = (void*)ctx;
+
+<a name="line338">338: </a>  eps->ops->setup                = EPSSetUp_FEAST;
+<a name="line339">339: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_FEAST;
+<a name="line340">340: </a>  eps->ops->destroy              = EPSDestroy_FEAST;
+<a name="line341">341: </a>  eps->ops->reset                = EPSReset_FEAST;
+<a name="line342">342: </a>  eps->ops->view                 = EPSView_FEAST;
+<a name="line343">343: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTSetNumPoints_C"</font>,EPSFEASTSetNumPoints_FEAST);
+<a name="line344">344: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSFEASTGetNumPoints_C"</font>,EPSFEASTGetNumPoints_FEAST);
+<a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
+<a name="line346">346: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/feast/feastp.h b/src/eps/impls/external/feast/feastp.h
index f11915e..17234ff 100644
--- a/src/eps/impls/external/feast/feastp.h
+++ b/src/eps/impls/external/feast/feastp.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/eps/impls/external/feast/feastp.h.html b/src/eps/impls/external/feast/feastp.h.html
index cc2fd85..0a41d7b 100644
--- a/src/eps/impls/external/feast/feastp.h.html
+++ b/src/eps/impls/external/feast/feastp.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/feast/feastp.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:22+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/feast/feastp.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/feast/feastp.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private data structure used by the FEAST interface</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/eps/impls/external/feast/index.html b/src/eps/impls/external/feast/index.html
index 7be43c6..6773a96 100644
--- a/src/eps/impls/external/feast/index.html
+++ b/src/eps/impls/external/feast/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/feast/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/feast/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/feast/makefile b/src/eps/impls/external/feast/makefile
index d6c26d5..05ab05c 100644
--- a/src/eps/impls/external/feast/makefile
+++ b/src/eps/impls/external/feast/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -22,7 +22,6 @@
 ALL: lib
 
 #requiresdefine  'SLEPC_HAVE_FEAST'
-#requiresscalar  complex
 
 CFLAGS   =
 FFLAGS   =
diff --git a/src/eps/impls/external/feast/makefile.html b/src/eps/impls/external/feast/makefile.html
index 0617aff..90054ac 100644
--- a/src/eps/impls/external/feast/makefile.html
+++ b/src/eps/impls/external/feast/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/feast/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:22+00:00">
+<meta name="date" content="2016-05-16T10:33:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/feast/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/feast/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -33,7 +33,6 @@
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
 <font color="#A020F0">#requiresdefine  'SLEPC_HAVE_FEAST'</font>
-<font color="#A020F0">#requiresscalar  complex</font>
 
 CFLAGS   =
 FFLAGS   =
diff --git a/src/eps/impls/external/index.html b/src/eps/impls/external/index.html
index c1670d9..45a7c65 100644
--- a/src/eps/impls/external/index.html
+++ b/src/eps/impls/external/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/makefile b/src/eps/impls/external/makefile
index 21be493..273d294 100644
--- a/src/eps/impls/external/makefile
+++ b/src/eps/impls/external/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/external/makefile.html b/src/eps/impls/external/makefile.html
index c889c50..849c367 100644
--- a/src/eps/impls/external/makefile.html
+++ b/src/eps/impls/external/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:16+00:00">
+<meta name="date" content="2016-05-16T10:33:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/external/primme/index.html b/src/eps/impls/external/primme/index.html
index da783e7..e35d949 100644
--- a/src/eps/impls/external/primme/index.html
+++ b/src/eps/impls/external/primme/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/primme/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/primme/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/primme/makefile b/src/eps/impls/external/primme/makefile
index a07087f..58b3268 100644
--- a/src/eps/impls/external/primme/makefile
+++ b/src/eps/impls/external/primme/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -21,7 +21,7 @@
 
 ALL: lib
 
-#requiresdefine   'SLEPC_HAVE_PRIMME'
+#requiresdefine  'SLEPC_HAVE_PRIMME'
 
 CFLAGS   = ${PRIMME_FLAGS}
 FFLAGS   =
diff --git a/src/eps/impls/external/primme/makefile.html b/src/eps/impls/external/primme/makefile.html
index fda9997..22e0696 100644
--- a/src/eps/impls/external/primme/makefile.html
+++ b/src/eps/impls/external/primme/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/primme/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:21+00:00">
+<meta name="date" content="2016-05-16T10:33:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/primme/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/primme/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -32,7 +32,7 @@
 
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
-<font color="#A020F0">#requiresdefine   'SLEPC_HAVE_PRIMME'</font>
+<font color="#A020F0">#requiresdefine  'SLEPC_HAVE_PRIMME'</font>
 
 CFLAGS   = ${PRIMME_FLAGS}
 FFLAGS   =
diff --git a/src/eps/impls/external/primme/primme.c b/src/eps/impls/external/primme/primme.c
index f1dadcf..df5ec80 100644
--- a/src/eps/impls/external/primme/primme.c
+++ b/src/eps/impls/external/primme/primme.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -39,24 +39,6 @@ typedef struct {
   PetscReal target;               /* a copy of eps's target */
 } EPS_PRIMME;
 
-EPSPRIMMEMethod methodN[] = {
-  EPS_PRIMME_DYNAMIC,
-  EPS_PRIMME_DEFAULT_MIN_TIME,
-  EPS_PRIMME_DEFAULT_MIN_MATVECS,
-  EPS_PRIMME_ARNOLDI,
-  EPS_PRIMME_GD,
-  EPS_PRIMME_GD_PLUSK,
-  EPS_PRIMME_GD_OLSEN_PLUSK,
-  EPS_PRIMME_JD_OLSEN_PLUSK,
-  EPS_PRIMME_RQI,
-  EPS_PRIMME_JDQR,
-  EPS_PRIMME_JDQMR,
-  EPS_PRIMME_JDQMR_ETOL,
-  EPS_PRIMME_SUBSPACE_ITERATION,
-  EPS_PRIMME_LOBPCG_ORTHOBASIS,
-  EPS_PRIMME_LOBPCG_ORTHOBASISW
-};
-
 static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme);
 static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme);
 
@@ -86,6 +68,7 @@ PetscErrorCode EPSSetUp_PRIMME(EPS eps)
   if (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"PRIMME is only available for Hermitian problems");
   if (eps->isgeneralized) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"PRIMME is not available for generalized problems");
   if (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Arbitrary selection of eigenpairs not supported in this solver");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"External packages do not support user-defined stopping test");
   if (!eps->which) eps->which = EPS_LARGEST_REAL;
   if (eps->converged != EPSConvergedAbsolute) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"PRIMME only supports absolute convergence test");
   ierr = RGIsTrivial(eps->rg,&istrivial);CHKERRQ(ierr);
@@ -292,7 +275,7 @@ PetscErrorCode EPSView_PRIMME(EPS eps,PetscViewer viewer)
   PetscFunctionBegin;
   ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
   if (isascii) {
-    ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: block size=%d\n",primme->maxBlockSize);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: block size=%D\n",primme->maxBlockSize);CHKERRQ(ierr);
     ierr = EPSPRIMMEGetMethod(eps,&methodn);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: solver method: %s\n",EPSPRIMMEMethods[methodn]);CHKERRQ(ierr);
 
@@ -305,7 +288,7 @@ PetscErrorCode EPSView_PRIMME(EPS eps,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_PRIMME"
-PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode  ierr;
   EPS_PRIMME      *ctx = (EPS_PRIMME*)eps->data;
@@ -356,12 +339,7 @@ static PetscErrorCode EPSPRIMMESetBlockSize_PRIMME(EPS eps,PetscInt bs)
 #undef __FUNCT__
 #define __FUNCT__ "EPSPRIMMESetBlockSize"
 /*@
-   EPSPRIMMESetBlockSize - The maximum block size the code will try to use.
-   The user should set
-   this based on the architecture specifics of the target computer,
-   as well as any a priori knowledge of multiplicities. The code does
-   NOT require BlockSize > 1 to find multiple eigenvalues.  For some
-   methods, keeping BlockSize = 1 yields the best overall performance.
+   EPSPRIMMESetBlockSize - The maximum block size that PRIMME will try to use.
 
    Logically Collective on EPS
 
@@ -376,6 +354,11 @@ static PetscErrorCode EPSPRIMMESetBlockSize_PRIMME(EPS eps,PetscInt bs)
    If the block size is not set, the value established by primme_initialize
    is used.
 
+   The user should set the block size based on the architecture specifics
+   of the target computer, as well as any a priori knowledge of multiplicities.
+   The code does NOT require bs > 1 to find multiple eigenvalues. For some
+   methods, keeping bs = 1 yields the best overall performance.
+
    Level: advanced
 
 .seealso: EPSPRIMMEGetBlockSize()
@@ -398,7 +381,7 @@ static PetscErrorCode EPSPRIMMEGetBlockSize_PRIMME(EPS eps,PetscInt *bs)
   EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
 
   PetscFunctionBegin;
-  if (bs) *bs = ops->primme.maxBlockSize;
+  *bs = ops->primme.maxBlockSize;
   PetscFunctionReturn(0);
 }
 
@@ -425,7 +408,8 @@ PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,PetscInt *bs)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSPRIMMEGetBlockSize_C",(EPS,PetscInt*),(eps,bs));CHKERRQ(ierr);
+  PetscValidPointer(bs,2);
+  ierr = PetscUseMethod(eps,"EPSPRIMMEGetBlockSize_C",(EPS,PetscInt*),(eps,bs));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -436,8 +420,7 @@ static PetscErrorCode EPSPRIMMESetMethod_PRIMME(EPS eps,EPSPRIMMEMethod method)
   EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
 
   PetscFunctionBegin;
-  if (method == PETSC_DEFAULT) ops->method = DEFAULT_MIN_TIME;
-  else ops->method = (primme_preset_method)method;
+  ops->method = (primme_preset_method)method;
   PetscFunctionReturn(0);
 }
 
@@ -450,19 +433,10 @@ static PetscErrorCode EPSPRIMMESetMethod_PRIMME(EPS eps,EPSPRIMMEMethod method)
 
    Input Parameters:
 +  eps - the eigenproblem solver context
--  method - method that will be used by PRIMME. It must be one of:
-    EPS_PRIMME_DYNAMIC, EPS_PRIMME_DEFAULT_MIN_TIME(EPS_PRIMME_JDQMR_ETOL),
-    EPS_PRIMME_DEFAULT_MIN_MATVECS(EPS_PRIMME_GD_OLSEN_PLUSK), EPS_PRIMME_ARNOLDI,
-    EPS_PRIMME_GD, EPS_PRIMME_GD_PLUSK, EPS_PRIMME_GD_OLSEN_PLUSK,
-    EPS_PRIMME_JD_OLSEN_PLUSK, EPS_PRIMME_RQI, EPS_PRIMME_JDQR, EPS_PRIMME_JDQMR,
-    EPS_PRIMME_JDQMR_ETOL, EPS_PRIMME_SUBSPACE_ITERATION,
-    EPS_PRIMME_LOBPCG_ORTHOBASIS, EPS_PRIMME_LOBPCG_ORTHOBASISW
+-  method - method that will be used by PRIMME
 
    Options Database Key:
-.  -eps_primme_method - Sets the method for the PRIMME library (one of 
-    'dynamic', 'default_min_time', 'default_min_matvecs', 'arnoldi',
-    'gd', 'gd_plusk', 'gd_olsen_plusk', 'jd_olsen_plusk', 'rqi', 'jdqr', 'jdqmr',
-    'jdqmr_etol', 'subspace_iteration', 'lobpcg_orthobasis', 'lobpcg_orthobasisw').
+.  -eps_primme_method - Sets the method for the PRIMME library
 
    Note:
    If not set, the method defaults to EPS_PRIMME_DEFAULT_MIN_TIME.
@@ -489,7 +463,7 @@ static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(EPS eps,EPSPRIMMEMethod *method)
   EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
 
   PetscFunctionBegin;
-  if (method) *method = (EPSPRIMMEMethod)ops->method;
+  *method = (EPSPRIMMEMethod)ops->method;
   PetscFunctionReturn(0);
 }
 
@@ -504,13 +478,7 @@ static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(EPS eps,EPSPRIMMEMethod *method)
 .  eps - the eigenproblem solver context
 
    Output Parameter:
-.  method - method that will be used by PRIMME, one of
-    EPS_PRIMME_DYNAMIC, EPS_PRIMME_DEFAULT_MIN_TIME(EPS_PRIMME_JDQMR_ETOL),
-    EPS_PRIMME_DEFAULT_MIN_MATVECS(EPS_PRIMME_GD_OLSEN_PLUSK), EPS_PRIMME_ARNOLDI,
-    EPS_PRIMME_GD, EPS_PRIMME_GD_PLUSK, EPS_PRIMME_GD_OLSEN_PLUSK,
-    EPS_PRIMME_JD_OLSEN_PLUSK, EPS_PRIMME_RQI, EPS_PRIMME_JDQR, EPS_PRIMME_JDQMR,
-    EPS_PRIMME_JDQMR_ETOL, EPS_PRIMME_SUBSPACE_ITERATION,
-    EPS_PRIMME_LOBPCG_ORTHOBASIS, EPS_PRIMME_LOBPCG_ORTHOBASISW
+.  method - method that will be used by PRIMME
 
    Level: advanced
 
@@ -522,7 +490,8 @@ PetscErrorCode EPSPRIMMEGetMethod(EPS eps,EPSPRIMMEMethod *method)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSPRIMMEGetMethod_C",(EPS,EPSPRIMMEMethod*),(eps,method));CHKERRQ(ierr);
+  PetscValidPointer(method,2);
+  ierr = PetscUseMethod(eps,"EPSPRIMMEGetMethod_C",(EPS,EPSPRIMMEMethod*),(eps,method));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/external/primme/primme.c.html b/src/eps/impls/external/primme/primme.c.html
index c02609b..38b9e3b 100644
--- a/src/eps/impls/external/primme/primme.c.html
+++ b/src/eps/impls/external/primme/primme.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/primme/primme.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:20+00:00">
+<meta name="date" content="2016-05-16T10:33:16+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/primme/primme.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/primme/primme.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the PRIMME package</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -51,453 +51,420 @@
 <a name="line39"> 39: </a>  PetscReal target;               <font color="#B22222">/* a copy of eps's target */</font>
 <a name="line40"> 40: </a>} EPS_PRIMME;
 
-<a name="line42"> 42: </a><a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> methodN[] = {
-<a name="line43"> 43: </a>  EPS_PRIMME_DYNAMIC,
-<a name="line44"> 44: </a>  EPS_PRIMME_DEFAULT_MIN_TIME,
-<a name="line45"> 45: </a>  EPS_PRIMME_DEFAULT_MIN_MATVECS,
-<a name="line46"> 46: </a>  EPS_PRIMME_ARNOLDI,
-<a name="line47"> 47: </a>  EPS_PRIMME_GD,
-<a name="line48"> 48: </a>  EPS_PRIMME_GD_PLUSK,
-<a name="line49"> 49: </a>  EPS_PRIMME_GD_OLSEN_PLUSK,
-<a name="line50"> 50: </a>  EPS_PRIMME_JD_OLSEN_PLUSK,
-<a name="line51"> 51: </a>  EPS_PRIMME_RQI,
-<a name="line52"> 52: </a>  EPS_PRIMME_JDQR,
-<a name="line53"> 53: </a>  EPS_PRIMME_JDQMR,
-<a name="line54"> 54: </a>  EPS_PRIMME_JDQMR_ETOL,
-<a name="line55"> 55: </a>  EPS_PRIMME_SUBSPACE_ITERATION,
-<a name="line56"> 56: </a>  EPS_PRIMME_LOBPCG_ORTHOBASIS,
-<a name="line57"> 57: </a>  EPS_PRIMME_LOBPCG_ORTHOBASISW
-<a name="line58"> 58: </a>};
-
-<a name="line60"> 60: </a><strong><font color="#4169E1">static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)</font></strong>;
-<a name="line61"> 61: </a><strong><font color="#4169E1">static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)</font></strong>;
-
-<a name="line63"> 63: </a><strong><font color="#4169E1"><a name="par_GlobalSumDouble"></a>static void par_GlobalSumDouble(void *sendBuf,void *recvBuf,int *count,primme_params *primme)</font></strong>
-<a name="line64"> 64: </a>{
-<a name="line66"> 66: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>((double*)sendBuf,(double*)recvBuf,*count,MPI_DOUBLE,MPI_SUM,PetscObjectComm((PetscObject)primme->commInfo));CHKERRABORT(PetscObjectComm((PetscObject)primme->commInfo),ierr);
-<a name="line67"> 67: </a>}
-
-<a name="line71"> 71: </a><strong><font color="#4169E1"><a name="EPSSetUp_PRIMME"></a>PetscErrorCode EPSSetUp_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line72"> 72: </a>{
-<a name="line74"> 74: </a>  PetscMPIInt    numProcs,procID;
-<a name="line75"> 75: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)eps->data;
-<a name="line76"> 76: </a>  primme_params  *primme = &ops->primme;
-<a name="line77"> 77: </a>  PetscBool      istrivial,flg;
-
-<a name="line80"> 80: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)eps),&numProcs);
-<a name="line81"> 81: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)eps),&procID);
-
-<a name="line83"> 83: </a>  <font color="#B22222">/* Check some constraints and set some default values */</font>
-<a name="line84"> 84: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = PetscMax(1000,eps->n);
-<a name="line85"> 85: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&ops->A);
-<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME is only available for Hermitian problems"</font>);
-<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (eps->isgeneralized) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME is not available for generalized problems"</font>);
-<a name="line88"> 88: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
-<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_LARGEST_REAL;
-<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (eps->converged != EPSConvergedAbsolute) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME only supports absolute convergence test"</font>);
-<a name="line91"> 91: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line94"> 94: </a>  <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
-<a name="line95"> 95: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&flg);
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME only works with STPRECOND"</font>);
-
-<a name="line98"> 98: </a>  <font color="#B22222">/* Transfer SLEPc options to PRIMME options */</font>
-<a name="line99"> 99: </a>  primme->n          = eps->n;
-<a name="line100">100: </a>  primme->nLocal     = eps->nloc;
-<a name="line101">101: </a>  primme->numEvals   = eps->nev;
-<a name="line102">102: </a>  primme->matrix     = ops;
-<a name="line103">103: </a>  primme->commInfo   = eps;
-<a name="line104">104: </a>  primme->maxMatvecs = eps->max_it;
-<a name="line105">105: </a>  primme->eps        = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
-<a name="line106">106: </a>  primme->numProcs   = numProcs;
-<a name="line107">107: </a>  primme->procID     = procID;
-<a name="line108">108: </a>  primme->printLevel = 0;
-<a name="line109">109: </a>  primme->correctionParams.precondition = 1;
-
-<a name="line111">111: </a>  <font color="#4169E1">switch</font> (eps->which) {
-<a name="line112">112: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
-<a name="line113">113: </a>      primme->target = primme_largest;
-<a name="line114">114: </a>      <font color="#4169E1">break</font>;
-<a name="line115">115: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
-<a name="line116">116: </a>      primme->target = primme_smallest;
-<a name="line117">117: </a>      <font color="#4169E1">break</font>;
-<a name="line118">118: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line119">119: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line120">120: </a>      primme->target = primme_closest_abs;
-<a name="line121">121: </a>      primme->numTargetShifts = 1;
-<a name="line122">122: </a>      ops->target = PetscRealPart(eps->target);
-<a name="line123">123: </a>      primme->targetShifts = &ops->target;
-<a name="line124">124: </a>      <font color="#4169E1">break</font>;
-<a name="line125">125: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line126">126: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"'which' value not supported by PRIMME"</font>);
-<a name="line127">127: </a>      <font color="#4169E1">break</font>;
-<a name="line128">128: </a>  }
-
-<a name="line130">130: </a>  <font color="#4169E1">if</font> (primme_set_method(ops->method,primme) < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME method not valid"</font>);
-
-<a name="line132">132: </a>  <font color="#B22222">/* If user sets ncv, maxBasisSize is modified. If not, ncv is set as maxBasisSize */</font>
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (eps->ncv) primme->maxBasisSize = eps->ncv;
-<a name="line134">134: </a>  <font color="#4169E1">else</font> eps->ncv = primme->maxBasisSize;
-<a name="line135">135: </a>  <font color="#4169E1">if</font> (eps->ncv < eps->nev+primme->maxBlockSize)  SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME needs ncv >= nev+maxBlockSize"</font>);
-<a name="line136">136: </a>  <font color="#4169E1">if</font> (eps->mpd) { PetscInfo(eps,<font color="#666666">"Warning: parameter mpd ignored\n"</font>); }
-
-<a name="line138">138: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
-
-<a name="line140">140: </a>  <font color="#B22222">/* Set workspace */</font>
-<a name="line141">141: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-<a name="line142">142: </a>  PetscObjectTypeCompare((PetscObject)eps->V,BVVECS,&flg);
-<a name="line143">143: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
-
-<a name="line145">145: </a>  <font color="#B22222">/* Setup the preconditioner */</font>
-<a name="line146">146: </a>  ops->eps = eps;
-<a name="line147">147: </a>  <font color="#4169E1">if</font> (primme->correctionParams.precondition) {
-<a name="line148">148: </a>    <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ops->ksp);
-<a name="line149">149: </a>    PetscObjectTypeCompare((PetscObject)ops->ksp,KSPPREONLY,&flg);
-<a name="line150">150: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME only works with KSPPREONLY"</font>);
-<a name="line151">151: </a>    primme->preconditioner = NULL;
-<a name="line152">152: </a>    primme->applyPreconditioner = applyPreconditioner_PRIMME;
-<a name="line153">153: </a>  }
-
-<a name="line155">155: </a>  <font color="#B22222">/* Prepare auxiliary vectors */</font>
-<a name="line156">156: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,eps->n,NULL,&ops->x);
-<a name="line157">157: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,eps->n,NULL,&ops->y);
-<a name="line158">158: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ops->x);
-<a name="line159">159: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ops->y);
-
-<a name="line161">161: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line162">162: </a>  eps->ops->solve = EPSSolve_PRIMME;
-<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
-<a name="line164">164: </a>}
-
-<a name="line168">168: </a><strong><font color="#4169E1"><a name="EPSSolve_PRIMME"></a>PetscErrorCode EPSSolve_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line169">169: </a>{
-<a name="line171">171: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)eps->data;
-<a name="line172">172: </a>  PetscScalar    *a;
-<a name="line173">173: </a>  Vec            v0;
-<a name="line174">174: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line175">175: </a>  PetscInt       i;
-<a name="line176">176: </a>  PetscReal      *evals;
-<a name="line177">177: </a><font color="#A020F0">#endif</font>
-
-<a name="line180">180: </a>  <font color="#B22222">/* Reset some parameters left from previous runs */</font>
-<a name="line181">181: </a>  ops->primme.aNorm    = 1.0;
-<a name="line182">182: </a>  ops->primme.initSize = eps->nini;
-<a name="line183">183: </a>  ops->primme.iseed[0] = -1;
-
-<a name="line185">185: </a>  <font color="#B22222">/* Call PRIMME solver */</font>
-<a name="line186">186: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
-<a name="line187">187: </a>  VecGetArray(v0,&a);
-<a name="line188">188: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line189">189: </a>  dprimme(eps->eigr,a,eps->errest,&ops->primme);
-<a name="line190">190: </a>  <font color="#4169E1">if</font> (ierr) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"PRIMME library failed with error code=%d"</font>,ierr);
-<a name="line191">191: </a><font color="#A020F0">#else</font>
-<a name="line192">192: </a>  <font color="#B22222">/* PRIMME returns real eigenvalues, but SLEPc works with complex ones */</font>
-<a name="line193">193: </a>  PetscMalloc1(eps->ncv,&evals);
-<a name="line194">194: </a>  zprimme(evals,(Complex_Z*)a,eps->errest,&ops->primme);
-<a name="line195">195: </a>  <font color="#4169E1">if</font> (ierr) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"PRIMME library failed with error code=%d"</font>,ierr);
-<a name="line196">196: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) eps->eigr[i] = evals[i];
-<a name="line197">197: </a>  PetscFree(evals);
-<a name="line198">198: </a><font color="#A020F0">#endif</font>
-<a name="line199">199: </a>  VecRestoreArray(v0,&a);
-<a name="line200">200: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
-
-<a name="line202">202: </a>  eps->nconv  = ops->primme.initSize >= 0 ? ops->primme.initSize : 0;
-<a name="line203">203: </a>  eps->reason = eps->ncv >= eps->nev ? EPS_CONVERGED_TOL: EPS_DIVERGED_ITS;
-<a name="line204">204: </a>  eps->its    = ops->primme.stats.numOuterIterations;
-<a name="line205">205: </a>  <font color="#4169E1">return</font>(0);
-<a name="line206">206: </a>}
-
-<a name="line210">210: </a><strong><font color="#4169E1"><a name="multMatvec_PRIMME"></a>static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)</font></strong>
-<a name="line211">211: </a>{
-<a name="line213">213: </a>  PetscInt       i,N = primme->n;
-<a name="line214">214: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)primme->matrix;
-<a name="line215">215: </a>  Vec            x = ops->x,y = ops->y;
-<a name="line216">216: </a>  Mat            A = ops->A;
-
-<a name="line219">219: </a>  <font color="#4169E1">for</font> (i=0;i<*blockSize;i++) {
-<a name="line220">220: </a>    <font color="#B22222">/* build vectors using 'in' an 'out' workspace */</font>
-<a name="line221">221: </a>    VecPlaceArray(x,(PetscScalar*)in+N*i);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
-<a name="line222">222: </a>    VecPlaceArray(y,(PetscScalar*)out+N*i);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
-
-<a name="line224">224: </a>    MatMult(A,x,y);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
-
-<a name="line226">226: </a>    VecResetArray(x);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
-<a name="line227">227: </a>    VecResetArray(y);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
-<a name="line228">228: </a>  }
-<a name="line229">229: </a>  PetscFunctionReturnVoid();
-<a name="line230">230: </a>}
-
-<a name="line234">234: </a><strong><font color="#4169E1"><a name="applyPreconditioner_PRIMME"></a>static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)</font></strong>
-<a name="line235">235: </a>{
-<a name="line237">237: </a>  PetscInt       i,N = primme->n;
-<a name="line238">238: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)primme->matrix;
-<a name="line239">239: </a>  Vec            x = ops->x,y = ops->y;
-
-<a name="line242">242: </a>  <font color="#4169E1">for</font> (i=0;i<*blockSize;i++) {
-<a name="line243">243: </a>    <font color="#B22222">/* build vectors using 'in' an 'out' workspace */</font>
-<a name="line244">244: </a>    VecPlaceArray(x,(PetscScalar*)in+N*i);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
-<a name="line245">245: </a>    VecPlaceArray(y,(PetscScalar*)out+N*i);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
-<a name="line246">246: </a>    KSPSolve(ops->ksp,x,y);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
-<a name="line247">247: </a>    VecResetArray(x);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
-<a name="line248">248: </a>    VecResetArray(y);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
-<a name="line249">249: </a>  }
-<a name="line250">250: </a>  PetscFunctionReturnVoid();
-<a name="line251">251: </a>}
-
-<a name="line255">255: </a><strong><font color="#4169E1"><a name="EPSReset_PRIMME"></a>PetscErrorCode EPSReset_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line256">256: </a>{
-<a name="line258">258: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)eps->data;
-
-<a name="line261">261: </a>  primme_Free(&ops->primme);
-<a name="line262">262: </a>  VecDestroy(&ops->x);
-<a name="line263">263: </a>  VecDestroy(&ops->y);
-<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
-<a name="line265">265: </a>}
-
-<a name="line269">269: </a><strong><font color="#4169E1"><a name="EPSDestroy_PRIMME"></a>PetscErrorCode EPSDestroy_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line270">270: </a>{
-
-<a name="line274">274: </a>  PetscFree(eps->data);
-<a name="line275">275: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetBlockSize_C"</font>,NULL);
-<a name="line276">276: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetMethod_C"</font>,NULL);
-<a name="line277">277: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetBlockSize_C"</font>,NULL);
-<a name="line278">278: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetMethod_C"</font>,NULL);
-<a name="line279">279: </a>  <font color="#4169E1">return</font>(0);
-<a name="line280">280: </a>}
-
-<a name="line284">284: </a><strong><font color="#4169E1"><a name="EPSView_PRIMME"></a>PetscErrorCode EPSView_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line285">285: </a>{
-<a name="line286">286: </a>  PetscErrorCode  ierr;
-<a name="line287">287: </a>  PetscBool       isascii;
-<a name="line288">288: </a>  primme_params   *primme = &((EPS_PRIMME*)eps->data)->primme;
-<a name="line289">289: </a>  <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> methodn;
-<a name="line290">290: </a>  PetscMPIInt     rank;
-
-<a name="line293">293: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line294">294: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line295">295: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  PRIMME: block size=%d\n"</font>,primme->maxBlockSize);
-<a name="line296">296: </a>    <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(eps,&methodn);
-<a name="line297">297: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  PRIMME: solver method: %s\n"</font>,EPSPRIMMEMethods[methodn]);
-
-<a name="line299">299: </a>    <font color="#B22222">/* Display PRIMME params */</font>
-<a name="line300">300: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)eps),&rank);
-<a name="line301">301: </a>    <font color="#4169E1">if</font> (!rank) primme_display_params(*primme);
-<a name="line302">302: </a>  }
-<a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
-<a name="line304">304: </a>}
-
-<a name="line308">308: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_PRIMME"></a>PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line309">309: </a>{
-<a name="line310">310: </a>  PetscErrorCode  ierr;
-<a name="line311">311: </a>  EPS_PRIMME      *ctx = (EPS_PRIMME*)eps->data;
-<a name="line312">312: </a>  PetscInt        bs;
-<a name="line313">313: </a>  <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> meth;
-<a name="line314">314: </a>  PetscBool       flg;
-<a name="line315">315: </a>  KSP             ksp;
-
-<a name="line318">318: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> PRIMME Options"</font>);
-<a name="line319">319: </a>  PetscOptionsInt(<font color="#666666">"-eps_primme_block_size"</font>,<font color="#666666">"Maximum block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>"</font>,ctx->primme.maxBlockSize,&bs,&flg);
-<a name="line320">320: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line321">321: </a>    <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>(eps,bs);
-<a name="line322">322: </a>  }
-<a name="line323">323: </a>  PetscOptionsEnum(<font color="#666666">"-eps_primme_method"</font>,<font color="#666666">"Method for solving the eigenproblem"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>"</font>,EPSPRIMMEMethods,(PetscEnum)ctx->method,(PetscEnum*)&meth,&flg);
-<a name="line324">324: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line325">325: </a>    <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(eps,meth);
-<a name="line326">326: </a>  }
-
-<a name="line328">328: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line329">329: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
-<a name="line330">330: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
-<a name="line331">331: </a>  }
-<a name="line332">332: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
-
-<a name="line334">334: </a>  <font color="#B22222">/* Set the default options of the KSP */</font>
-<a name="line335">335: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line336">336: </a>  <font color="#4169E1">if</font> (!((PetscObject)ksp)->type_name) {
-<a name="line337">337: </a>    KSPSetType(ksp,KSPPREONLY);
-<a name="line338">338: </a>  }
-<a name="line339">339: </a>  PetscOptionsTail();
-<a name="line340">340: </a>  <font color="#4169E1">return</font>(0);
-<a name="line341">341: </a>}
-
-<a name="line345">345: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetBlockSize_PRIMME"></a>static PetscErrorCode EPSPRIMMESetBlockSize_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line346">346: </a>{
-<a name="line347">347: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
-
-<a name="line350">350: </a>  <font color="#4169E1">if</font> (bs == PETSC_DEFAULT) ops->primme.maxBlockSize = 1;
-<a name="line351">351: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bs <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"PRIMME: block size must be positive"</font>);
-<a name="line352">352: </a>  <font color="#4169E1">else</font> ops->primme.maxBlockSize = bs;
-<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
-<a name="line354">354: </a>}
-
-<a name="line358">358: </a><font color="#B22222">/*@</font>
-<a name="line359">359: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a> - The maximum block size the code will try to use.</font>
-<a name="line360">360: </a><font color="#B22222">   The user should set</font>
-<a name="line361">361: </a><font color="#B22222">   this based on the architecture specifics of the target computer,</font>
-<a name="line362">362: </a><font color="#B22222">   as well as any a priori knowledge of multiplicities. The code does</font>
-<a name="line363">363: </a><font color="#B22222">   NOT require BlockSize > 1 to find multiple eigenvalues.  For some</font>
-<a name="line364">364: </a><font color="#B22222">   methods, keeping BlockSize = 1 yields the best overall performance.</font>
-
-<a name="line366">366: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line368">368: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line369">369: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line370">370: </a><font color="#B22222">-  bs - block size</font>
-
-<a name="line372">372: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line373">373: </a><font color="#B22222">.  -eps_primme_block_size - Sets the max allowed block size value</font>
-
-<a name="line375">375: </a><font color="#B22222">   Notes:</font>
-<a name="line376">376: </a><font color="#B22222">   If the block size is not set, the value established by primme_initialize</font>
-<a name="line377">377: </a><font color="#B22222">   is used.</font>
-
-<a name="line379">379: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line381">381: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a>()</font>
-<a name="line382">382: </a><font color="#B22222">@*/</font>
-<a name="line383">383: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
-<a name="line384">384: </a>{
-
-<a name="line390">390: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPRIMMESetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
-<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
-<a name="line392">392: </a>}
-
-<a name="line396">396: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetBlockSize_PRIMME"></a>static PetscErrorCode EPSPRIMMEGetBlockSize_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
-<a name="line397">397: </a>{
-<a name="line398">398: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
-
-<a name="line401">401: </a>  <font color="#4169E1">if</font> (bs) *bs = ops->primme.maxBlockSize;
-<a name="line402">402: </a>  <font color="#4169E1">return</font>(0);
-<a name="line403">403: </a>}
-
-<a name="line407">407: </a><font color="#B22222">/*@</font>
-<a name="line408">408: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a> - Get the maximum block size the code will try to use.</font>
-
-<a name="line410">410: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line412">412: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line413">413: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line415">415: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line416">416: </a><font color="#B22222">.  bs - returned block size</font>
-
-<a name="line418">418: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line420">420: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>()</font>
-<a name="line421">421: </a><font color="#B22222">@*/</font>
-<a name="line422">422: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
-<a name="line423">423: </a>{
-
-<a name="line428">428: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPRIMMEGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,bs));
-<a name="line429">429: </a>  <font color="#4169E1">return</font>(0);
-<a name="line430">430: </a>}
-
-<a name="line434">434: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetMethod_PRIMME"></a>static PetscErrorCode EPSPRIMMESetMethod_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> method)</font></strong>
-<a name="line435">435: </a>{
-<a name="line436">436: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
-
-<a name="line439">439: </a>  <font color="#4169E1">if</font> (method == PETSC_DEFAULT) ops->method = DEFAULT_MIN_TIME;
-<a name="line440">440: </a>  <font color="#4169E1">else</font> ops->method = (primme_preset_method)method;
-<a name="line441">441: </a>  <font color="#4169E1">return</font>(0);
-<a name="line442">442: </a>}
-
-<a name="line446">446: </a><font color="#B22222">/*@</font>
-<a name="line447">447: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a> - Sets the method for the PRIMME library.</font>
-
-<a name="line449">449: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line451">451: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line452">452: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line453">453: </a><font color="#B22222">-  method - method that will be used by PRIMME. It must be one of:</font>
-<a name="line454">454: </a><font color="#B22222">    EPS_PRIMME_DYNAMIC, EPS_PRIMME_DEFAULT_MIN_TIME(EPS_PRIMME_JDQMR_ETOL),</font>
-<a name="line455">455: </a><font color="#B22222">    EPS_PRIMME_DEFAULT_MIN_MATVECS(EPS_PRIMME_GD_OLSEN_PLUSK), EPS_PRIMME_ARNOLDI,</font>
-<a name="line456">456: </a><font color="#B22222">    EPS_PRIMME_GD, EPS_PRIMME_GD_PLUSK, EPS_PRIMME_GD_OLSEN_PLUSK,</font>
-<a name="line457">457: </a><font color="#B22222">    EPS_PRIMME_JD_OLSEN_PLUSK, EPS_PRIMME_RQI, EPS_PRIMME_JDQR, EPS_PRIMME_JDQMR,</font>
-<a name="line458">458: </a><font color="#B22222">    EPS_PRIMME_JDQMR_ETOL, EPS_PRIMME_SUBSPACE_ITERATION,</font>
-<a name="line459">459: </a><font color="#B22222">    EPS_PRIMME_LOBPCG_ORTHOBASIS, EPS_PRIMME_LOBPCG_ORTHOBASISW</font>
+<a name="line42"> 42: </a><strong><font color="#4169E1">static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)</font></strong>;
+<a name="line43"> 43: </a><strong><font color="#4169E1">static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)</font></strong>;
+
+<a name="line45"> 45: </a><strong><font color="#4169E1"><a name="par_GlobalSumDouble"></a>static void par_GlobalSumDouble(void *sendBuf,void *recvBuf,int *count,primme_params *primme)</font></strong>
+<a name="line46"> 46: </a>{
+<a name="line48"> 48: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>((double*)sendBuf,(double*)recvBuf,*count,MPI_DOUBLE,MPI_SUM,PetscObjectComm((PetscObject)primme->commInfo));CHKERRABORT(PetscObjectComm((PetscObject)primme->commInfo),ierr);
+<a name="line49"> 49: </a>}
+
+<a name="line53"> 53: </a><strong><font color="#4169E1"><a name="EPSSetUp_PRIMME"></a>PetscErrorCode EPSSetUp_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line54"> 54: </a>{
+<a name="line56"> 56: </a>  PetscMPIInt    numProcs,procID;
+<a name="line57"> 57: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)eps->data;
+<a name="line58"> 58: </a>  primme_params  *primme = &ops->primme;
+<a name="line59"> 59: </a>  PetscBool      istrivial,flg;
+
+<a name="line62"> 62: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)eps),&numProcs);
+<a name="line63"> 63: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)eps),&procID);
+
+<a name="line65"> 65: </a>  <font color="#B22222">/* Check some constraints and set some default values */</font>
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = PetscMax(1000,eps->n);
+<a name="line67"> 67: </a>  <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&ops->A);
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME is only available for Hermitian problems"</font>);
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (eps->isgeneralized) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME is not available for generalized problems"</font>);
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"External packages do not support user-defined stopping test"</font>);
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_LARGEST_REAL;
+<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (eps->converged != EPSConvergedAbsolute) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME only supports absolute convergence test"</font>);
+<a name="line74"> 74: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line77"> 77: </a>  <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
+<a name="line78"> 78: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STPRECOND,&flg);
+<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME only works with STPRECOND"</font>);
+
+<a name="line81"> 81: </a>  <font color="#B22222">/* Transfer SLEPc options to PRIMME options */</font>
+<a name="line82"> 82: </a>  primme->n          = eps->n;
+<a name="line83"> 83: </a>  primme->nLocal     = eps->nloc;
+<a name="line84"> 84: </a>  primme->numEvals   = eps->nev;
+<a name="line85"> 85: </a>  primme->matrix     = ops;
+<a name="line86"> 86: </a>  primme->commInfo   = eps;
+<a name="line87"> 87: </a>  primme->maxMatvecs = eps->max_it;
+<a name="line88"> 88: </a>  primme->eps        = eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol;
+<a name="line89"> 89: </a>  primme->numProcs   = numProcs;
+<a name="line90"> 90: </a>  primme->procID     = procID;
+<a name="line91"> 91: </a>  primme->printLevel = 0;
+<a name="line92"> 92: </a>  primme->correctionParams.precondition = 1;
+
+<a name="line94"> 94: </a>  <font color="#4169E1">switch</font> (eps->which) {
+<a name="line95"> 95: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
+<a name="line96"> 96: </a>      primme->target = primme_largest;
+<a name="line97"> 97: </a>      <font color="#4169E1">break</font>;
+<a name="line98"> 98: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
+<a name="line99"> 99: </a>      primme->target = primme_smallest;
+<a name="line100">100: </a>      <font color="#4169E1">break</font>;
+<a name="line101">101: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line102">102: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line103">103: </a>      primme->target = primme_closest_abs;
+<a name="line104">104: </a>      primme->numTargetShifts = 1;
+<a name="line105">105: </a>      ops->target = PetscRealPart(eps->target);
+<a name="line106">106: </a>      primme->targetShifts = &ops->target;
+<a name="line107">107: </a>      <font color="#4169E1">break</font>;
+<a name="line108">108: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line109">109: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"'which' value not supported by PRIMME"</font>);
+<a name="line110">110: </a>      <font color="#4169E1">break</font>;
+<a name="line111">111: </a>  }
+
+<a name="line113">113: </a>  <font color="#4169E1">if</font> (primme_set_method(ops->method,primme) < 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME method not valid"</font>);
+
+<a name="line115">115: </a>  <font color="#B22222">/* If user sets ncv, maxBasisSize is modified. If not, ncv is set as maxBasisSize */</font>
+<a name="line116">116: </a>  <font color="#4169E1">if</font> (eps->ncv) primme->maxBasisSize = eps->ncv;
+<a name="line117">117: </a>  <font color="#4169E1">else</font> eps->ncv = primme->maxBasisSize;
+<a name="line118">118: </a>  <font color="#4169E1">if</font> (eps->ncv < eps->nev+primme->maxBlockSize)  SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME needs ncv >= nev+maxBlockSize"</font>);
+<a name="line119">119: </a>  <font color="#4169E1">if</font> (eps->mpd) { PetscInfo(eps,<font color="#666666">"Warning: parameter mpd ignored\n"</font>); }
+
+<a name="line121">121: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
+
+<a name="line123">123: </a>  <font color="#B22222">/* Set workspace */</font>
+<a name="line124">124: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+<a name="line125">125: </a>  PetscObjectTypeCompare((PetscObject)eps->V,BVVECS,&flg);
+<a name="line126">126: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver requires a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with contiguous storage"</font>);
+
+<a name="line128">128: </a>  <font color="#B22222">/* Setup the preconditioner */</font>
+<a name="line129">129: </a>  ops->eps = eps;
+<a name="line130">130: </a>  <font color="#4169E1">if</font> (primme->correctionParams.precondition) {
+<a name="line131">131: </a>    <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ops->ksp);
+<a name="line132">132: </a>    PetscObjectTypeCompare((PetscObject)ops->ksp,KSPPREONLY,&flg);
+<a name="line133">133: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"PRIMME only works with KSPPREONLY"</font>);
+<a name="line134">134: </a>    primme->preconditioner = NULL;
+<a name="line135">135: </a>    primme->applyPreconditioner = applyPreconditioner_PRIMME;
+<a name="line136">136: </a>  }
+
+<a name="line138">138: </a>  <font color="#B22222">/* Prepare auxiliary vectors */</font>
+<a name="line139">139: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,eps->n,NULL,&ops->x);
+<a name="line140">140: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)eps),1,eps->nloc,eps->n,NULL,&ops->y);
+<a name="line141">141: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ops->x);
+<a name="line142">142: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)ops->y);
+
+<a name="line144">144: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line145">145: </a>  eps->ops->solve = EPSSolve_PRIMME;
+<a name="line146">146: </a>  <font color="#4169E1">return</font>(0);
+<a name="line147">147: </a>}
+
+<a name="line151">151: </a><strong><font color="#4169E1"><a name="EPSSolve_PRIMME"></a>PetscErrorCode EPSSolve_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line152">152: </a>{
+<a name="line154">154: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)eps->data;
+<a name="line155">155: </a>  PetscScalar    *a;
+<a name="line156">156: </a>  Vec            v0;
+<a name="line157">157: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line158">158: </a>  PetscInt       i;
+<a name="line159">159: </a>  PetscReal      *evals;
+<a name="line160">160: </a><font color="#A020F0">#endif</font>
+
+<a name="line163">163: </a>  <font color="#B22222">/* Reset some parameters left from previous runs */</font>
+<a name="line164">164: </a>  ops->primme.aNorm    = 1.0;
+<a name="line165">165: </a>  ops->primme.initSize = eps->nini;
+<a name="line166">166: </a>  ops->primme.iseed[0] = -1;
+
+<a name="line168">168: </a>  <font color="#B22222">/* Call PRIMME solver */</font>
+<a name="line169">169: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
+<a name="line170">170: </a>  VecGetArray(v0,&a);
+<a name="line171">171: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line172">172: </a>  dprimme(eps->eigr,a,eps->errest,&ops->primme);
+<a name="line173">173: </a>  <font color="#4169E1">if</font> (ierr) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"PRIMME library failed with error code=%d"</font>,ierr);
+<a name="line174">174: </a><font color="#A020F0">#else</font>
+<a name="line175">175: </a>  <font color="#B22222">/* PRIMME returns real eigenvalues, but SLEPc works with complex ones */</font>
+<a name="line176">176: </a>  PetscMalloc1(eps->ncv,&evals);
+<a name="line177">177: </a>  zprimme(evals,(Complex_Z*)a,eps->errest,&ops->primme);
+<a name="line178">178: </a>  <font color="#4169E1">if</font> (ierr) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"PRIMME library failed with error code=%d"</font>,ierr);
+<a name="line179">179: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) eps->eigr[i] = evals[i];
+<a name="line180">180: </a>  PetscFree(evals);
+<a name="line181">181: </a><font color="#A020F0">#endif</font>
+<a name="line182">182: </a>  VecRestoreArray(v0,&a);
+<a name="line183">183: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
+
+<a name="line185">185: </a>  eps->nconv  = ops->primme.initSize >= 0 ? ops->primme.initSize : 0;
+<a name="line186">186: </a>  eps->reason = eps->ncv >= eps->nev ? EPS_CONVERGED_TOL: EPS_DIVERGED_ITS;
+<a name="line187">187: </a>  eps->its    = ops->primme.stats.numOuterIterations;
+<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
+<a name="line189">189: </a>}
+
+<a name="line193">193: </a><strong><font color="#4169E1"><a name="multMatvec_PRIMME"></a>static void multMatvec_PRIMME(void *in,void *out,int *blockSize,primme_params *primme)</font></strong>
+<a name="line194">194: </a>{
+<a name="line196">196: </a>  PetscInt       i,N = primme->n;
+<a name="line197">197: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)primme->matrix;
+<a name="line198">198: </a>  Vec            x = ops->x,y = ops->y;
+<a name="line199">199: </a>  Mat            A = ops->A;
+
+<a name="line202">202: </a>  <font color="#4169E1">for</font> (i=0;i<*blockSize;i++) {
+<a name="line203">203: </a>    <font color="#B22222">/* build vectors using 'in' an 'out' workspace */</font>
+<a name="line204">204: </a>    VecPlaceArray(x,(PetscScalar*)in+N*i);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
+<a name="line205">205: </a>    VecPlaceArray(y,(PetscScalar*)out+N*i);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
+
+<a name="line207">207: </a>    MatMult(A,x,y);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
+
+<a name="line209">209: </a>    VecResetArray(x);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
+<a name="line210">210: </a>    VecResetArray(y);CHKERRABORT(PetscObjectComm((PetscObject)A),ierr);
+<a name="line211">211: </a>  }
+<a name="line212">212: </a>  PetscFunctionReturnVoid();
+<a name="line213">213: </a>}
+
+<a name="line217">217: </a><strong><font color="#4169E1"><a name="applyPreconditioner_PRIMME"></a>static void applyPreconditioner_PRIMME(void *in,void *out,int *blockSize,struct primme_params *primme)</font></strong>
+<a name="line218">218: </a>{
+<a name="line220">220: </a>  PetscInt       i,N = primme->n;
+<a name="line221">221: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)primme->matrix;
+<a name="line222">222: </a>  Vec            x = ops->x,y = ops->y;
+
+<a name="line225">225: </a>  <font color="#4169E1">for</font> (i=0;i<*blockSize;i++) {
+<a name="line226">226: </a>    <font color="#B22222">/* build vectors using 'in' an 'out' workspace */</font>
+<a name="line227">227: </a>    VecPlaceArray(x,(PetscScalar*)in+N*i);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
+<a name="line228">228: </a>    VecPlaceArray(y,(PetscScalar*)out+N*i);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
+<a name="line229">229: </a>    KSPSolve(ops->ksp,x,y);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
+<a name="line230">230: </a>    VecResetArray(x);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
+<a name="line231">231: </a>    VecResetArray(y);CHKERRABORT(PetscObjectComm((PetscObject)ops->ksp),ierr);
+<a name="line232">232: </a>  }
+<a name="line233">233: </a>  PetscFunctionReturnVoid();
+<a name="line234">234: </a>}
+
+<a name="line238">238: </a><strong><font color="#4169E1"><a name="EPSReset_PRIMME"></a>PetscErrorCode EPSReset_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line239">239: </a>{
+<a name="line241">241: </a>  EPS_PRIMME     *ops = (EPS_PRIMME*)eps->data;
+
+<a name="line244">244: </a>  primme_Free(&ops->primme);
+<a name="line245">245: </a>  VecDestroy(&ops->x);
+<a name="line246">246: </a>  VecDestroy(&ops->y);
+<a name="line247">247: </a>  <font color="#4169E1">return</font>(0);
+<a name="line248">248: </a>}
+
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="EPSDestroy_PRIMME"></a>PetscErrorCode EPSDestroy_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line253">253: </a>{
+
+<a name="line257">257: </a>  PetscFree(eps->data);
+<a name="line258">258: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetBlockSize_C"</font>,NULL);
+<a name="line259">259: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetMethod_C"</font>,NULL);
+<a name="line260">260: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetBlockSize_C"</font>,NULL);
+<a name="line261">261: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetMethod_C"</font>,NULL);
+<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
+<a name="line263">263: </a>}
+
+<a name="line267">267: </a><strong><font color="#4169E1"><a name="EPSView_PRIMME"></a>PetscErrorCode EPSView_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line268">268: </a>{
+<a name="line269">269: </a>  PetscErrorCode  ierr;
+<a name="line270">270: </a>  PetscBool       isascii;
+<a name="line271">271: </a>  primme_params   *primme = &((EPS_PRIMME*)eps->data)->primme;
+<a name="line272">272: </a>  <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> methodn;
+<a name="line273">273: </a>  PetscMPIInt     rank;
+
+<a name="line276">276: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line277">277: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line278">278: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  PRIMME: block size=%D\n"</font>,primme->maxBlockSize);
+<a name="line279">279: </a>    <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(eps,&methodn);
+<a name="line280">280: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  PRIMME: solver method: %s\n"</font>,EPSPRIMMEMethods[methodn]);
+
+<a name="line282">282: </a>    <font color="#B22222">/* Display PRIMME params */</font>
+<a name="line283">283: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)eps),&rank);
+<a name="line284">284: </a>    <font color="#4169E1">if</font> (!rank) primme_display_params(*primme);
+<a name="line285">285: </a>  }
+<a name="line286">286: </a>  <font color="#4169E1">return</font>(0);
+<a name="line287">287: </a>}
+
+<a name="line291">291: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_PRIMME"></a>PetscErrorCode EPSSetFromOptions_PRIMME(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line292">292: </a>{
+<a name="line293">293: </a>  PetscErrorCode  ierr;
+<a name="line294">294: </a>  EPS_PRIMME      *ctx = (EPS_PRIMME*)eps->data;
+<a name="line295">295: </a>  PetscInt        bs;
+<a name="line296">296: </a>  <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> meth;
+<a name="line297">297: </a>  PetscBool       flg;
+<a name="line298">298: </a>  KSP             ksp;
+
+<a name="line301">301: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> PRIMME Options"</font>);
+<a name="line302">302: </a>  PetscOptionsInt(<font color="#666666">"-eps_primme_block_size"</font>,<font color="#666666">"Maximum block size"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>"</font>,ctx->primme.maxBlockSize,&bs,&flg);
+<a name="line303">303: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line304">304: </a>    <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>(eps,bs);
+<a name="line305">305: </a>  }
+<a name="line306">306: </a>  PetscOptionsEnum(<font color="#666666">"-eps_primme_method"</font>,<font color="#666666">"Method for solving the eigenproblem"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>"</font>,EPSPRIMMEMethods,(PetscEnum)ctx->method,(PetscEnum*)&meth,&flg);
+<a name="line307">307: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line308">308: </a>    <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(eps,meth);
+<a name="line309">309: </a>  }
+
+<a name="line311">311: </a>  <font color="#B22222">/* Set STPrecond as the default <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line312">312: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->st)->type_name) {
+<a name="line313">313: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STPRECOND);
+<a name="line314">314: </a>  }
+<a name="line315">315: </a>  <a href="../../../../../docs/manualpages/ST/STPrecondSetKSPHasMat.html#STPrecondSetKSPHasMat">STPrecondSetKSPHasMat</a>(eps->st,PETSC_TRUE);
+
+<a name="line317">317: </a>  <font color="#B22222">/* Set the default options of the KSP */</font>
+<a name="line318">318: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line319">319: </a>  <font color="#4169E1">if</font> (!((PetscObject)ksp)->type_name) {
+<a name="line320">320: </a>    KSPSetType(ksp,KSPPREONLY);
+<a name="line321">321: </a>  }
+<a name="line322">322: </a>  PetscOptionsTail();
+<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
+<a name="line324">324: </a>}
+
+<a name="line328">328: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetBlockSize_PRIMME"></a>static PetscErrorCode EPSPRIMMESetBlockSize_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line329">329: </a>{
+<a name="line330">330: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
+
+<a name="line333">333: </a>  <font color="#4169E1">if</font> (bs == PETSC_DEFAULT) ops->primme.maxBlockSize = 1;
+<a name="line334">334: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bs <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"PRIMME: block size must be positive"</font>);
+<a name="line335">335: </a>  <font color="#4169E1">else</font> ops->primme.maxBlockSize = bs;
+<a name="line336">336: </a>  <font color="#4169E1">return</font>(0);
+<a name="line337">337: </a>}
+
+<a name="line341">341: </a><font color="#B22222">/*@</font>
+<a name="line342">342: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a> - The maximum block size that PRIMME will try to use.</font>
+
+<a name="line344">344: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line346">346: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line347">347: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line348">348: </a><font color="#B22222">-  bs - block size</font>
+
+<a name="line350">350: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line351">351: </a><font color="#B22222">.  -eps_primme_block_size - Sets the max allowed block size value</font>
+
+<a name="line353">353: </a><font color="#B22222">   Notes:</font>
+<a name="line354">354: </a><font color="#B22222">   If the block size is not set, the value established by primme_initialize</font>
+<a name="line355">355: </a><font color="#B22222">   is used.</font>
+
+<a name="line357">357: </a><font color="#B22222">   The user should set the block size based on the architecture specifics</font>
+<a name="line358">358: </a><font color="#B22222">   of the target computer, as well as any a priori knowledge of multiplicities.</font>
+<a name="line359">359: </a><font color="#B22222">   The code does NOT require bs > 1 to find multiple eigenvalues. For some</font>
+<a name="line360">360: </a><font color="#B22222">   methods, keeping bs = 1 yields the best overall performance.</font>
+
+<a name="line362">362: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line364">364: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a>()</font>
+<a name="line365">365: </a><font color="#B22222">@*/</font>
+<a name="line366">366: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt bs)</font></strong>
+<a name="line367">367: </a>{
+
+<a name="line373">373: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPRIMMESetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,bs));
+<a name="line374">374: </a>  <font color="#4169E1">return</font>(0);
+<a name="line375">375: </a>}
+
+<a name="line379">379: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetBlockSize_PRIMME"></a>static PetscErrorCode EPSPRIMMEGetBlockSize_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
+<a name="line380">380: </a>{
+<a name="line381">381: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
+
+<a name="line384">384: </a>  *bs = ops->primme.maxBlockSize;
+<a name="line385">385: </a>  <font color="#4169E1">return</font>(0);
+<a name="line386">386: </a>}
+
+<a name="line390">390: </a><font color="#B22222">/*@</font>
+<a name="line391">391: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a> - Get the maximum block size the code will try to use.</font>
 
-<a name="line461">461: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line462">462: </a><font color="#B22222">.  -eps_primme_method - Sets the method for the PRIMME library (one of </font>
-<a name="line463">463: </a><font color="#B22222">    'dynamic', 'default_min_time', 'default_min_matvecs', 'arnoldi',</font>
-<a name="line464">464: </a><font color="#B22222">    'gd', 'gd_plusk', 'gd_olsen_plusk', 'jd_olsen_plusk', 'rqi', 'jdqr', 'jdqmr',</font>
-<a name="line465">465: </a><font color="#B22222">    'jdqmr_etol', 'subspace_iteration', 'lobpcg_orthobasis', 'lobpcg_orthobasisw').</font>
+<a name="line393">393: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line395">395: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line396">396: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line467">467: </a><font color="#B22222">   Note:</font>
-<a name="line468">468: </a><font color="#B22222">   If not set, the method defaults to EPS_PRIMME_DEFAULT_MIN_TIME.</font>
+<a name="line398">398: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line399">399: </a><font color="#B22222">.  bs - returned block size</font>
 
-<a name="line470">470: </a><font color="#B22222">   Level: advanced</font>
+<a name="line401">401: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line472">472: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(), <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a></font>
-<a name="line473">473: </a><font color="#B22222">@*/</font>
-<a name="line474">474: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> method)</font></strong>
-<a name="line475">475: </a>{
+<a name="line403">403: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetBlockSize.html#EPSPRIMMESetBlockSize">EPSPRIMMESetBlockSize</a>()</font>
+<a name="line404">404: </a><font color="#B22222">@*/</font>
+<a name="line405">405: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetBlockSize.html#EPSPRIMMEGetBlockSize">EPSPRIMMEGetBlockSize</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *bs)</font></strong>
+<a name="line406">406: </a>{
 
-<a name="line481">481: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPRIMMESetMethod_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>),(eps,method));
-<a name="line482">482: </a>  <font color="#4169E1">return</font>(0);
-<a name="line483">483: </a>}
+<a name="line412">412: </a>  PetscUseMethod(eps,<font color="#666666">"EPSPRIMMEGetBlockSize_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,bs));
+<a name="line413">413: </a>  <font color="#4169E1">return</font>(0);
+<a name="line414">414: </a>}
 
-<a name="line487">487: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetMethod_PRIMME"></a>static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> *method)</font></strong>
+<a name="line418">418: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetMethod_PRIMME"></a>static PetscErrorCode EPSPRIMMESetMethod_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> method)</font></strong>
+<a name="line419">419: </a>{
+<a name="line420">420: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
+
+<a name="line423">423: </a>  ops->method = (primme_preset_method)method;
+<a name="line424">424: </a>  <font color="#4169E1">return</font>(0);
+<a name="line425">425: </a>}
+
+<a name="line429">429: </a><font color="#B22222">/*@</font>
+<a name="line430">430: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a> - Sets the method for the PRIMME library.</font>
+
+<a name="line432">432: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line434">434: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line435">435: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line436">436: </a><font color="#B22222">-  method - method that will be used by PRIMME</font>
+
+<a name="line438">438: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line439">439: </a><font color="#B22222">.  -eps_primme_method - Sets the method for the PRIMME library</font>
+
+<a name="line441">441: </a><font color="#B22222">   Note:</font>
+<a name="line442">442: </a><font color="#B22222">   If not set, the method defaults to EPS_PRIMME_DEFAULT_MIN_TIME.</font>
+
+<a name="line444">444: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line446">446: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(), <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a></font>
+<a name="line447">447: </a><font color="#B22222">@*/</font>
+<a name="line448">448: </a><strong><font color="#4169E1"><a name="EPSPRIMMESetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> method)</font></strong>
+<a name="line449">449: </a>{
+
+<a name="line455">455: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPRIMMESetMethod_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>),(eps,method));
+<a name="line456">456: </a>  <font color="#4169E1">return</font>(0);
+<a name="line457">457: </a>}
+
+<a name="line461">461: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetMethod_PRIMME"></a>static PetscErrorCode EPSPRIMMEGetMethod_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> *method)</font></strong>
+<a name="line462">462: </a>{
+<a name="line463">463: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
+
+<a name="line466">466: </a>  *method = (<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>)ops->method;
+<a name="line467">467: </a>  <font color="#4169E1">return</font>(0);
+<a name="line468">468: </a>}
+
+<a name="line472">472: </a><font color="#B22222">/*@</font>
+<a name="line473">473: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a> - Gets the method for the PRIMME library.</font>
+
+<a name="line475">475: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line477">477: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line478">478: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line480">480: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line481">481: </a><font color="#B22222">.  method - method that will be used by PRIMME</font>
+
+<a name="line483">483: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line485">485: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(), <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a></font>
+<a name="line486">486: </a><font color="#B22222">@*/</font>
+<a name="line487">487: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> *method)</font></strong>
 <a name="line488">488: </a>{
-<a name="line489">489: </a>  EPS_PRIMME *ops = (EPS_PRIMME*)eps->data;
-
-<a name="line492">492: </a>  <font color="#4169E1">if</font> (method) *method = (<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>)ops->method;
-<a name="line493">493: </a>  <font color="#4169E1">return</font>(0);
-<a name="line494">494: </a>}
-
-<a name="line498">498: </a><font color="#B22222">/*@</font>
-<a name="line499">499: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a> - Gets the method for the PRIMME library.</font>
-
-<a name="line501">501: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line503">503: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line504">504: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line506">506: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line507">507: </a><font color="#B22222">.  method - method that will be used by PRIMME, one of</font>
-<a name="line508">508: </a><font color="#B22222">    EPS_PRIMME_DYNAMIC, EPS_PRIMME_DEFAULT_MIN_TIME(EPS_PRIMME_JDQMR_ETOL),</font>
-<a name="line509">509: </a><font color="#B22222">    EPS_PRIMME_DEFAULT_MIN_MATVECS(EPS_PRIMME_GD_OLSEN_PLUSK), EPS_PRIMME_ARNOLDI,</font>
-<a name="line510">510: </a><font color="#B22222">    EPS_PRIMME_GD, EPS_PRIMME_GD_PLUSK, EPS_PRIMME_GD_OLSEN_PLUSK,</font>
-<a name="line511">511: </a><font color="#B22222">    EPS_PRIMME_JD_OLSEN_PLUSK, EPS_PRIMME_RQI, EPS_PRIMME_JDQR, EPS_PRIMME_JDQMR,</font>
-<a name="line512">512: </a><font color="#B22222">    EPS_PRIMME_JDQMR_ETOL, EPS_PRIMME_SUBSPACE_ITERATION,</font>
-<a name="line513">513: </a><font color="#B22222">    EPS_PRIMME_LOBPCG_ORTHOBASIS, EPS_PRIMME_LOBPCG_ORTHOBASISW</font>
-
-<a name="line515">515: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line517">517: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSPRIMMESetMethod.html#EPSPRIMMESetMethod">EPSPRIMMESetMethod</a>(), <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a></font>
-<a name="line518">518: </a><font color="#B22222">@*/</font>
-<a name="line519">519: </a><strong><font color="#4169E1"><a name="EPSPRIMMEGetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSPRIMMEGetMethod.html#EPSPRIMMEGetMethod">EPSPRIMMEGetMethod</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a> *method)</font></strong>
-<a name="line520">520: </a>{
-
-<a name="line525">525: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPRIMMEGetMethod_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>*),(eps,method));
-<a name="line526">526: </a>  <font color="#4169E1">return</font>(0);
-<a name="line527">527: </a>}
-
-<a name="line531">531: </a><strong><font color="#4169E1"><a name="EPSCreate_PRIMME"></a>PETSC_EXTERN PetscErrorCode EPSCreate_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line532">532: </a>{
-<a name="line534">534: </a>  EPS_PRIMME     *primme;
-
-<a name="line537">537: </a>  PetscNewLog(eps,&primme);
-<a name="line538">538: </a>  eps->data = (void*)primme;
-
-<a name="line540">540: </a>  eps->ops->setup          = EPSSetUp_PRIMME;
-<a name="line541">541: </a>  eps->ops->setfromoptions = EPSSetFromOptions_PRIMME;
-<a name="line542">542: </a>  eps->ops->destroy        = EPSDestroy_PRIMME;
-<a name="line543">543: </a>  eps->ops->reset          = EPSReset_PRIMME;
-<a name="line544">544: </a>  eps->ops->view           = EPSView_PRIMME;
-<a name="line545">545: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
-
-<a name="line547">547: </a>  primme_initialize(&primme->primme);
-<a name="line548">548: </a>  primme->primme.matrixMatvec = multMatvec_PRIMME;
-<a name="line549">549: </a>  primme->primme.globalSumDouble = par_GlobalSumDouble;
-<a name="line550">550: </a>  primme->method = (primme_preset_method)EPS_PRIMME_DEFAULT_MIN_TIME;
-
-<a name="line552">552: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetBlockSize_C"</font>,EPSPRIMMESetBlockSize_PRIMME);
-<a name="line553">553: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetMethod_C"</font>,EPSPRIMMESetMethod_PRIMME);
-<a name="line554">554: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetBlockSize_C"</font>,EPSPRIMMEGetBlockSize_PRIMME);
-<a name="line555">555: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetMethod_C"</font>,EPSPRIMMEGetMethod_PRIMME);
-<a name="line556">556: </a>  <font color="#4169E1">return</font>(0);
-<a name="line557">557: </a>}
+
+<a name="line494">494: </a>  PetscUseMethod(eps,<font color="#666666">"EPSPRIMMEGetMethod_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSPRIMMEMethod.html#EPSPRIMMEMethod">EPSPRIMMEMethod</a>*),(eps,method));
+<a name="line495">495: </a>  <font color="#4169E1">return</font>(0);
+<a name="line496">496: </a>}
+
+<a name="line500">500: </a><strong><font color="#4169E1"><a name="EPSCreate_PRIMME"></a>PETSC_EXTERN PetscErrorCode EPSCreate_PRIMME(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line501">501: </a>{
+<a name="line503">503: </a>  EPS_PRIMME     *primme;
+
+<a name="line506">506: </a>  PetscNewLog(eps,&primme);
+<a name="line507">507: </a>  eps->data = (void*)primme;
+
+<a name="line509">509: </a>  eps->ops->setup          = EPSSetUp_PRIMME;
+<a name="line510">510: </a>  eps->ops->setfromoptions = EPSSetFromOptions_PRIMME;
+<a name="line511">511: </a>  eps->ops->destroy        = EPSDestroy_PRIMME;
+<a name="line512">512: </a>  eps->ops->reset          = EPSReset_PRIMME;
+<a name="line513">513: </a>  eps->ops->view           = EPSView_PRIMME;
+<a name="line514">514: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+
+<a name="line516">516: </a>  primme_initialize(&primme->primme);
+<a name="line517">517: </a>  primme->primme.matrixMatvec = multMatvec_PRIMME;
+<a name="line518">518: </a>  primme->primme.globalSumDouble = par_GlobalSumDouble;
+<a name="line519">519: </a>  primme->method = (primme_preset_method)EPS_PRIMME_DEFAULT_MIN_TIME;
+
+<a name="line521">521: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetBlockSize_C"</font>,EPSPRIMMESetBlockSize_PRIMME);
+<a name="line522">522: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMESetMethod_C"</font>,EPSPRIMMESetMethod_PRIMME);
+<a name="line523">523: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetBlockSize_C"</font>,EPSPRIMMEGetBlockSize_PRIMME);
+<a name="line524">524: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPRIMMEGetMethod_C"</font>,EPSPRIMMEGetMethod_PRIMME);
+<a name="line525">525: </a>  <font color="#4169E1">return</font>(0);
+<a name="line526">526: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/trlan/index.html b/src/eps/impls/external/trlan/index.html
index 98070d8..fda89fa 100644
--- a/src/eps/impls/external/trlan/index.html
+++ b/src/eps/impls/external/trlan/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/trlan/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/trlan/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/external/trlan/makefile b/src/eps/impls/external/trlan/makefile
index a1237f4..a01a40c 100644
--- a/src/eps/impls/external/trlan/makefile
+++ b/src/eps/impls/external/trlan/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -21,8 +21,7 @@
 
 ALL: lib
 
-#requiresdefine   'SLEPC_HAVE_TRLAN'
-#requiresscalar    real
+#requiresdefine  'SLEPC_HAVE_TRLAN'
 
 CFLAGS   =
 FFLAGS   =
diff --git a/src/eps/impls/external/trlan/makefile.html b/src/eps/impls/external/trlan/makefile.html
index 4ddc55a..d8fbcf2 100644
--- a/src/eps/impls/external/trlan/makefile.html
+++ b/src/eps/impls/external/trlan/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/trlan/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:21+00:00">
+<meta name="date" content="2016-05-16T10:33:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/trlan/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/trlan/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -32,8 +32,7 @@
 
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
-<font color="#A020F0">#requiresdefine   'SLEPC_HAVE_TRLAN'</font>
-<font color="#A020F0">#requiresscalar    real</font>
+<font color="#A020F0">#requiresdefine  'SLEPC_HAVE_TRLAN'</font>
 
 CFLAGS   =
 FFLAGS   =
diff --git a/src/eps/impls/external/trlan/trlan.c b/src/eps/impls/external/trlan/trlan.c
index b8138e5..8e2dd92 100644
--- a/src/eps/impls/external/trlan/trlan.c
+++ b/src/eps/impls/external/trlan/trlan.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -52,6 +52,7 @@ PetscErrorCode EPSSetUp_TRLAN(EPS eps)
   if (!eps->which) eps->which = EPS_LARGEST_REAL;
   if (eps->which!=EPS_LARGEST_REAL && eps->which!=EPS_SMALLEST_REAL && eps->which!=EPS_TARGET_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),1,"Wrong value of eps->which");
   if (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Arbitrary selection of eigenpairs not supported in this solver");
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"External packages do not support user-defined stopping test");
 
   tr->restart = 0;
   if (tr->maxlan+1-eps->ncv<=0) {
diff --git a/src/eps/impls/external/trlan/trlan.c.html b/src/eps/impls/external/trlan/trlan.c.html
index 230a740..7ad5629 100644
--- a/src/eps/impls/external/trlan/trlan.c.html
+++ b/src/eps/impls/external/trlan/trlan.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/trlan/trlan.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:21+00:00">
+<meta name="date" content="2016-05-16T10:33:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/trlan/trlan.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/trlan/trlan.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the TRLAN package</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -60,130 +60,131 @@
 <a name="line52"> 52: </a>  <font color="#4169E1">if</font> (!eps->which) eps->which = EPS_LARGEST_REAL;
 <a name="line53"> 53: </a>  <font color="#4169E1">if</font> (eps->which!=EPS_LARGEST_REAL && eps->which!=EPS_SMALLEST_REAL && eps->which!=EPS_TARGET_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
 <a name="line54"> 54: </a>  <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs not supported in this solver"</font>);
-
-<a name="line56"> 56: </a>  tr->restart = 0;
-<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (tr->maxlan+1-eps->ncv<=0) {
-<a name="line58"> 58: </a>    PetscBLASIntCast(tr->maxlan*(tr->maxlan+10),&tr->lwork);
-<a name="line59"> 59: </a>  } <font color="#4169E1">else</font> {
-<a name="line60"> 60: </a>    PetscBLASIntCast(eps->nloc*(tr->maxlan+1-eps->ncv) + tr->maxlan*(tr->maxlan+10),&tr->lwork);
-<a name="line61"> 61: </a>  }
-<a name="line62"> 62: </a>  PetscMalloc1(tr->lwork,&tr->work);
-<a name="line63"> 63: </a>  PetscLogObjectMemory((PetscObject)eps,tr->lwork*<font color="#4169E1">sizeof</font>(PetscReal));
-
-<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
-<a name="line66"> 66: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line69"> 69: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-
-<a name="line71"> 71: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line72"> 72: </a>  eps->ops->solve = EPSSolve_TRLAN;
-<a name="line73"> 73: </a>  <font color="#4169E1">return</font>(0);
-<a name="line74"> 74: </a>}
-
-<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="MatMult_TRLAN"></a>static PetscBLASInt MatMult_TRLAN(PetscBLASInt *n,PetscBLASInt *m,PetscReal *xin,PetscBLASInt *ldx,PetscReal *yout,PetscBLASInt *ldy)</font></strong>
-<a name="line79"> 79: </a>{
-<a name="line81"> 81: </a>  Vec            x,y;
-<a name="line82"> 82: </a>  PetscBLASInt   i;
-
-<a name="line85"> 85: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)globaleps),1,*n,PETSC_DECIDE,NULL,&x);
-<a name="line86"> 86: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)globaleps),1,*n,PETSC_DECIDE,NULL,&y);
-<a name="line87"> 87: </a>  <font color="#4169E1">for</font> (i=0;i<*m;i++) {
-<a name="line88"> 88: </a>    VecPlaceArray(x,(PetscScalar*)xin+i*(*ldx));
-<a name="line89"> 89: </a>    VecPlaceArray(y,(PetscScalar*)yout+i*(*ldy));
-<a name="line90"> 90: </a>    <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(globaleps->st,x,y);
-<a name="line91"> 91: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(globaleps->V,y,NULL,NULL,NULL);
-<a name="line92"> 92: </a>    VecResetArray(x);
-<a name="line93"> 93: </a>    VecResetArray(y);
-<a name="line94"> 94: </a>  }
-<a name="line95"> 95: </a>  VecDestroy(&x);
-<a name="line96"> 96: </a>  VecDestroy(&y);
-<a name="line97"> 97: </a>  <font color="#4169E1">return</font>(0);
-<a name="line98"> 98: </a>}
-
-<a name="line102">102: </a><strong><font color="#4169E1"><a name="EPSSolve_TRLAN"></a>PetscErrorCode EPSSolve_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line103">103: </a>{
-<a name="line105">105: </a>  PetscInt       i;
-<a name="line106">106: </a>  PetscBLASInt   ipar[32],n,lohi,stat,ncv;
-<a name="line107">107: </a>  EPS_TRLAN      *tr = (EPS_TRLAN*)eps->data;
-<a name="line108">108: </a>  PetscScalar    *pV;
-<a name="line109">109: </a>  Vec            v0;
-
-<a name="line112">112: </a>  PetscBLASIntCast(eps->ncv,&ncv);
-<a name="line113">113: </a>  PetscBLASIntCast(eps->nloc,&n);
-
-<a name="line115">115: </a>  <font color="#4169E1">if</font> (eps->which==EPS_LARGEST_REAL || eps->which==EPS_TARGET_REAL) lohi = 1;
-<a name="line116">116: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->which==EPS_SMALLEST_REAL) lohi = -1;
-<a name="line117">117: </a>  <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
-
-<a name="line119">119: </a>  globaleps = eps;
-
-<a name="line121">121: </a>  ipar[0]  = 0;            <font color="#B22222">/* stat: error flag */</font>
-<a name="line122">122: </a>  ipar[1]  = lohi;         <font color="#B22222">/* smallest (lohi<0) or largest eigenvalues (lohi>0) */</font>
-<a name="line123">123: </a>  PetscBLASIntCast(eps->nev,&ipar[2]); <font color="#B22222">/* number of desired eigenpairs */</font>
-<a name="line124">124: </a>  ipar[3]  = 0;            <font color="#B22222">/* number of eigenpairs already converged */</font>
-<a name="line125">125: </a>  ipar[4]  = tr->maxlan;   <font color="#B22222">/* maximum Lanczos basis size */</font>
-<a name="line126">126: </a>  ipar[5]  = tr->restart;  <font color="#B22222">/* restarting scheme */</font>
-<a name="line127">127: </a>  PetscBLASIntCast(eps->max_it,&ipar[6]); <font color="#B22222">/* maximum number of MATVECs */</font>
-<a name="line128">128: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
-<a name="line129">129: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&ipar[7]);
-<a name="line130">130: </a><font color="#A020F0">#endif</font>
-<a name="line131">131: </a>  ipar[8]  = 0;            <font color="#B22222">/* verboseness */</font>
-<a name="line132">132: </a>  ipar[9]  = 99;           <font color="#B22222">/* Fortran IO unit number used to write log messages */</font>
-<a name="line133">133: </a>  ipar[10] = 1;            <font color="#B22222">/* use supplied starting vector */</font>
-<a name="line134">134: </a>  ipar[11] = 0;            <font color="#B22222">/* checkpointing flag */</font>
-<a name="line135">135: </a>  ipar[12] = 98;           <font color="#B22222">/* Fortran IO unit number used to write checkpoint files */</font>
-<a name="line136">136: </a>  ipar[13] = 0;            <font color="#B22222">/* number of flops per matvec per PE (not used) */</font>
-<a name="line137">137: </a>  tr->work[0] = eps->tol;  <font color="#B22222">/* relative tolerance on residual norms */</font>
-
-<a name="line139">139: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) eps->eigr[i]=0.0;
-<a name="line140">140: </a>  EPSGetStartVector(eps,0,NULL);
-<a name="line141">141: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,0);  <font color="#B22222">/* just for deflation space */</font>
-<a name="line142">142: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
-<a name="line143">143: </a>  VecGetArray(v0,&pV);
-
-<a name="line145">145: </a>  PetscStackCall(<font color="#666666">"TRLan"</font>,TRLan_(MatMult_TRLAN,ipar,&n,&ncv,eps->eigr,pV,&n,tr->work,&tr->lwork));
-
-<a name="line147">147: </a>  VecRestoreArray(v0,&pV);
-<a name="line148">148: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
-
-<a name="line150">150: </a>  stat        = ipar[0];
-<a name="line151">151: </a>  eps->nconv  = ipar[3];
-<a name="line152">152: </a>  eps->its    = ipar[25];
-<a name="line153">153: </a>  eps->reason = EPS_CONVERGED_TOL;
-
-<a name="line155">155: </a>  <font color="#4169E1">if</font> (stat!=0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error in TRLAN (code=%d)"</font>,stat);
-<a name="line156">156: </a>  <font color="#4169E1">return</font>(0);
-<a name="line157">157: </a>}
-
-<a name="line161">161: </a><strong><font color="#4169E1"><a name="EPSReset_TRLAN"></a>PetscErrorCode EPSReset_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line162">162: </a>{
-<a name="line164">164: </a>  EPS_TRLAN      *tr = (EPS_TRLAN*)eps->data;
-
-<a name="line167">167: </a>  PetscFree(tr->work);
-<a name="line168">168: </a>  <font color="#4169E1">return</font>(0);
-<a name="line169">169: </a>}
-
-<a name="line173">173: </a><strong><font color="#4169E1"><a name="EPSDestroy_TRLAN"></a>PetscErrorCode EPSDestroy_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line174">174: </a>{
-
-<a name="line178">178: </a>  PetscFree(eps->data);
-<a name="line179">179: </a>  <font color="#4169E1">return</font>(0);
-<a name="line180">180: </a>}
-
-<a name="line184">184: </a><strong><font color="#4169E1"><a name="EPSCreate_TRLAN"></a>PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line185">185: </a>{
-<a name="line186">186: </a>  EPS_TRLAN      *ctx;
-
-<a name="line190">190: </a>  PetscNewLog(eps,&ctx);
-<a name="line191">191: </a>  eps->data = (void*)ctx;
-
-<a name="line193">193: </a>  eps->ops->setup                = EPSSetUp_TRLAN;
-<a name="line194">194: </a>  eps->ops->destroy              = EPSDestroy_TRLAN;
-<a name="line195">195: </a>  eps->ops->reset                = EPSReset_TRLAN;
-<a name="line196">196: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
-<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
-<a name="line198">198: </a>}
+<a name="line55"> 55: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"External packages do not support user-defined stopping test"</font>);
+
+<a name="line57"> 57: </a>  tr->restart = 0;
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (tr->maxlan+1-eps->ncv<=0) {
+<a name="line59"> 59: </a>    PetscBLASIntCast(tr->maxlan*(tr->maxlan+10),&tr->lwork);
+<a name="line60"> 60: </a>  } <font color="#4169E1">else</font> {
+<a name="line61"> 61: </a>    PetscBLASIntCast(eps->nloc*(tr->maxlan+1-eps->ncv) + tr->maxlan*(tr->maxlan+10),&tr->lwork);
+<a name="line62"> 62: </a>  }
+<a name="line63"> 63: </a>  PetscMalloc1(tr->lwork,&tr->work);
+<a name="line64"> 64: </a>  PetscLogObjectMemory((PetscObject)eps,tr->lwork*<font color="#4169E1">sizeof</font>(PetscReal));
+
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
+<a name="line67"> 67: </a>  <a href="../../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line70"> 70: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+
+<a name="line72"> 72: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line73"> 73: </a>  eps->ops->solve = EPSSolve_TRLAN;
+<a name="line74"> 74: </a>  <font color="#4169E1">return</font>(0);
+<a name="line75"> 75: </a>}
+
+<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="MatMult_TRLAN"></a>static PetscBLASInt MatMult_TRLAN(PetscBLASInt *n,PetscBLASInt *m,PetscReal *xin,PetscBLASInt *ldx,PetscReal *yout,PetscBLASInt *ldy)</font></strong>
+<a name="line80"> 80: </a>{
+<a name="line82"> 82: </a>  Vec            x,y;
+<a name="line83"> 83: </a>  PetscBLASInt   i;
+
+<a name="line86"> 86: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)globaleps),1,*n,PETSC_DECIDE,NULL,&x);
+<a name="line87"> 87: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)globaleps),1,*n,PETSC_DECIDE,NULL,&y);
+<a name="line88"> 88: </a>  <font color="#4169E1">for</font> (i=0;i<*m;i++) {
+<a name="line89"> 89: </a>    VecPlaceArray(x,(PetscScalar*)xin+i*(*ldx));
+<a name="line90"> 90: </a>    VecPlaceArray(y,(PetscScalar*)yout+i*(*ldy));
+<a name="line91"> 91: </a>    <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(globaleps->st,x,y);
+<a name="line92"> 92: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(globaleps->V,y,NULL,NULL,NULL);
+<a name="line93"> 93: </a>    VecResetArray(x);
+<a name="line94"> 94: </a>    VecResetArray(y);
+<a name="line95"> 95: </a>  }
+<a name="line96"> 96: </a>  VecDestroy(&x);
+<a name="line97"> 97: </a>  VecDestroy(&y);
+<a name="line98"> 98: </a>  <font color="#4169E1">return</font>(0);
+<a name="line99"> 99: </a>}
+
+<a name="line103">103: </a><strong><font color="#4169E1"><a name="EPSSolve_TRLAN"></a>PetscErrorCode EPSSolve_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line104">104: </a>{
+<a name="line106">106: </a>  PetscInt       i;
+<a name="line107">107: </a>  PetscBLASInt   ipar[32],n,lohi,stat,ncv;
+<a name="line108">108: </a>  EPS_TRLAN      *tr = (EPS_TRLAN*)eps->data;
+<a name="line109">109: </a>  PetscScalar    *pV;
+<a name="line110">110: </a>  Vec            v0;
+
+<a name="line113">113: </a>  PetscBLASIntCast(eps->ncv,&ncv);
+<a name="line114">114: </a>  PetscBLASIntCast(eps->nloc,&n);
+
+<a name="line116">116: </a>  <font color="#4169E1">if</font> (eps->which==EPS_LARGEST_REAL || eps->which==EPS_TARGET_REAL) lohi = 1;
+<a name="line117">117: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->which==EPS_SMALLEST_REAL) lohi = -1;
+<a name="line118">118: </a>  <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
+
+<a name="line120">120: </a>  globaleps = eps;
+
+<a name="line122">122: </a>  ipar[0]  = 0;            <font color="#B22222">/* stat: error flag */</font>
+<a name="line123">123: </a>  ipar[1]  = lohi;         <font color="#B22222">/* smallest (lohi<0) or largest eigenvalues (lohi>0) */</font>
+<a name="line124">124: </a>  PetscBLASIntCast(eps->nev,&ipar[2]); <font color="#B22222">/* number of desired eigenpairs */</font>
+<a name="line125">125: </a>  ipar[3]  = 0;            <font color="#B22222">/* number of eigenpairs already converged */</font>
+<a name="line126">126: </a>  ipar[4]  = tr->maxlan;   <font color="#B22222">/* maximum Lanczos basis size */</font>
+<a name="line127">127: </a>  ipar[5]  = tr->restart;  <font color="#B22222">/* restarting scheme */</font>
+<a name="line128">128: </a>  PetscBLASIntCast(eps->max_it,&ipar[6]); <font color="#B22222">/* maximum number of MATVECs */</font>
+<a name="line129">129: </a><font color="#A020F0">#if !defined(PETSC_HAVE_MPIUNI)</font>
+<a name="line130">130: </a>  PetscBLASIntCast(MPI_Comm_c2f(PetscObjectComm((PetscObject)eps)),&ipar[7]);
+<a name="line131">131: </a><font color="#A020F0">#endif</font>
+<a name="line132">132: </a>  ipar[8]  = 0;            <font color="#B22222">/* verboseness */</font>
+<a name="line133">133: </a>  ipar[9]  = 99;           <font color="#B22222">/* Fortran IO unit number used to write log messages */</font>
+<a name="line134">134: </a>  ipar[10] = 1;            <font color="#B22222">/* use supplied starting vector */</font>
+<a name="line135">135: </a>  ipar[11] = 0;            <font color="#B22222">/* checkpointing flag */</font>
+<a name="line136">136: </a>  ipar[12] = 98;           <font color="#B22222">/* Fortran IO unit number used to write checkpoint files */</font>
+<a name="line137">137: </a>  ipar[13] = 0;            <font color="#B22222">/* number of flops per matvec per PE (not used) */</font>
+<a name="line138">138: </a>  tr->work[0] = eps->tol;  <font color="#B22222">/* relative tolerance on residual norms */</font>
+
+<a name="line140">140: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) eps->eigr[i]=0.0;
+<a name="line141">141: </a>  EPSGetStartVector(eps,0,NULL);
+<a name="line142">142: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,0);  <font color="#B22222">/* just for deflation space */</font>
+<a name="line143">143: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v0);
+<a name="line144">144: </a>  VecGetArray(v0,&pV);
+
+<a name="line146">146: </a>  PetscStackCall(<font color="#666666">"TRLan"</font>,TRLan_(MatMult_TRLAN,ipar,&n,&ncv,eps->eigr,pV,&n,tr->work,&tr->lwork));
+
+<a name="line148">148: </a>  VecRestoreArray(v0,&pV);
+<a name="line149">149: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v0);
+
+<a name="line151">151: </a>  stat        = ipar[0];
+<a name="line152">152: </a>  eps->nconv  = ipar[3];
+<a name="line153">153: </a>  eps->its    = ipar[25];
+<a name="line154">154: </a>  eps->reason = EPS_CONVERGED_TOL;
+
+<a name="line156">156: </a>  <font color="#4169E1">if</font> (stat!=0) SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_LIB,<font color="#666666">"Error in TRLAN (code=%d)"</font>,stat);
+<a name="line157">157: </a>  <font color="#4169E1">return</font>(0);
+<a name="line158">158: </a>}
+
+<a name="line162">162: </a><strong><font color="#4169E1"><a name="EPSReset_TRLAN"></a>PetscErrorCode EPSReset_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line163">163: </a>{
+<a name="line165">165: </a>  EPS_TRLAN      *tr = (EPS_TRLAN*)eps->data;
+
+<a name="line168">168: </a>  PetscFree(tr->work);
+<a name="line169">169: </a>  <font color="#4169E1">return</font>(0);
+<a name="line170">170: </a>}
+
+<a name="line174">174: </a><strong><font color="#4169E1"><a name="EPSDestroy_TRLAN"></a>PetscErrorCode EPSDestroy_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line175">175: </a>{
+
+<a name="line179">179: </a>  PetscFree(eps->data);
+<a name="line180">180: </a>  <font color="#4169E1">return</font>(0);
+<a name="line181">181: </a>}
+
+<a name="line185">185: </a><strong><font color="#4169E1"><a name="EPSCreate_TRLAN"></a>PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line186">186: </a>{
+<a name="line187">187: </a>  EPS_TRLAN      *ctx;
+
+<a name="line191">191: </a>  PetscNewLog(eps,&ctx);
+<a name="line192">192: </a>  eps->data = (void*)ctx;
+
+<a name="line194">194: </a>  eps->ops->setup                = EPSSetUp_TRLAN;
+<a name="line195">195: </a>  eps->ops->destroy              = EPSDestroy_TRLAN;
+<a name="line196">196: </a>  eps->ops->reset                = EPSReset_TRLAN;
+<a name="line197">197: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
+<a name="line198">198: </a>  <font color="#4169E1">return</font>(0);
+<a name="line199">199: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/external/trlan/trlanp.h b/src/eps/impls/external/trlan/trlanp.h
index df4758f..fbd0d23 100644
--- a/src/eps/impls/external/trlan/trlanp.h
+++ b/src/eps/impls/external/trlan/trlanp.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/eps/impls/external/trlan/trlanp.h.html b/src/eps/impls/external/trlan/trlanp.h.html
index ccbef8a..41b7570 100644
--- a/src/eps/impls/external/trlan/trlanp.h.html
+++ b/src/eps/impls/external/trlan/trlanp.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/external/trlan/trlanp.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:21+00:00">
+<meta name="date" content="2016-05-16T10:33:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/external/trlan/trlanp.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/external/trlan/trlanp.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private data structure used by the TRLAN interface</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/eps/impls/index.html b/src/eps/impls/index.html
index 10bc2e7..5c78726 100644
--- a/src/eps/impls/index.html
+++ b/src/eps/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/krylov/arnoldi/arnoldi.c b/src/eps/impls/krylov/arnoldi/arnoldi.c
index 3a55413..69147cd 100644
--- a/src/eps/impls/krylov/arnoldi/arnoldi.c
+++ b/src/eps/impls/krylov/arnoldi/arnoldi.c
@@ -15,7 +15,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -140,10 +140,8 @@ PetscErrorCode EPSSolve_Arnoldi(EPS eps)
       ierr = BVMultInPlace(eps->V,U,eps->nconv,nv);CHKERRQ(ierr);
       ierr = MatDestroy(&U);CHKERRQ(ierr);
     }
-    eps->nconv = k;
-
-    ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,nv);CHKERRQ(ierr);
-    if (breakdown && k<eps->nev) {
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
+    if (eps->reason == EPS_CONVERGED_ITERATING && breakdown) {
       ierr = PetscInfo2(eps,"Breakdown in Arnoldi method (it=%D norm=%g)\n",eps->its,(double)beta);CHKERRQ(ierr);
       ierr = EPSGetStartVector(eps,k,&breakdown);CHKERRQ(ierr);
       if (breakdown) {
@@ -151,8 +149,8 @@ PetscErrorCode EPSSolve_Arnoldi(EPS eps)
         ierr = PetscInfo(eps,"Unable to generate more start vectors\n");CHKERRQ(ierr);
       }
     }
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-    if (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+    eps->nconv = k;
+    ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,nv);CHKERRQ(ierr);
   }
 
   /* truncate Schur decomposition and change the state to raw so that
@@ -164,7 +162,7 @@ PetscErrorCode EPSSolve_Arnoldi(EPS eps)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_Arnoldi"
-PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode ierr;
   PetscBool      set,val;
@@ -262,7 +260,7 @@ PetscErrorCode EPSArnoldiGetDelayed(EPS eps,PetscBool *delayed)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(delayed,2);
-  ierr = PetscTryMethod(eps,"EPSArnoldiGetDelayed_C",(EPS,PetscBool*),(eps,delayed));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSArnoldiGetDelayed_C",(EPS,PetscBool*),(eps,delayed));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/krylov/arnoldi/arnoldi.c.html b/src/eps/impls/krylov/arnoldi/arnoldi.c.html
index 0bc84ea..d57b78e 100644
--- a/src/eps/impls/krylov/arnoldi/arnoldi.c.html
+++ b/src/eps/impls/krylov/arnoldi/arnoldi.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/arnoldi/arnoldi.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:53+00:00">
+<meta name="date" content="2016-05-16T10:32:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/arnoldi/arnoldi.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/arnoldi/arnoldi.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "arnoldi"</font>
@@ -27,7 +27,7 @@
 
 <a name="line16"> 16: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line17"> 17: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line20"> 20: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -145,150 +145,148 @@
 <a name="line140">140: </a>      <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,nv);
 <a name="line141">141: </a>      MatDestroy(&U);
 <a name="line142">142: </a>    }
-<a name="line143">143: </a>    eps->nconv = k;
-
-<a name="line145">145: </a>    EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,nv);
-<a name="line146">146: </a>    <font color="#4169E1">if</font> (breakdown && k<eps->nev) {
-<a name="line147">147: </a>      PetscInfo2(eps,<font color="#666666">"Breakdown in Arnoldi method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
-<a name="line148">148: </a>      EPSGetStartVector(eps,k,&breakdown);
-<a name="line149">149: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line150">150: </a>        eps->reason = EPS_DIVERGED_BREAKDOWN;
-<a name="line151">151: </a>        PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
-<a name="line152">152: </a>      }
-<a name="line153">153: </a>    }
-<a name="line154">154: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line155">155: </a>    <font color="#4169E1">if</font> (eps->nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line156">156: </a>  }
-
-<a name="line158">158: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
-<a name="line159">159: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
-<a name="line160">160: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
-<a name="line161">161: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line162">162: </a>  <font color="#4169E1">return</font>(0);
-<a name="line163">163: </a>}
-
-<a name="line167">167: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_Arnoldi"></a>PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line168">168: </a>{
-<a name="line170">170: </a>  PetscBool      set,val;
-<a name="line171">171: </a>  EPS_ARNOLDI    *arnoldi = (EPS_ARNOLDI*)eps->data;
-
-<a name="line174">174: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Arnoldi Options"</font>);
-<a name="line175">175: </a>  PetscOptionsBool(<font color="#666666">"-eps_arnoldi_delayed"</font>,<font color="#666666">"Arnoldi with delayed reorthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>"</font>,arnoldi->delayed,&val,&set);
-<a name="line176">176: </a>  <font color="#4169E1">if</font> (set) {
-<a name="line177">177: </a>    <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>(eps,val);
-<a name="line178">178: </a>  }
-<a name="line179">179: </a>  PetscOptionsTail();
-<a name="line180">180: </a>  <font color="#4169E1">return</font>(0);
-<a name="line181">181: </a>}
-
-<a name="line185">185: </a><strong><font color="#4169E1"><a name="EPSArnoldiSetDelayed_Arnoldi"></a>static PetscErrorCode EPSArnoldiSetDelayed_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool delayed)</font></strong>
-<a name="line186">186: </a>{
-<a name="line187">187: </a>  EPS_ARNOLDI *arnoldi = (EPS_ARNOLDI*)eps->data;
-
-<a name="line190">190: </a>  arnoldi->delayed = delayed;
-<a name="line191">191: </a>  <font color="#4169E1">return</font>(0);
-<a name="line192">192: </a>}
-
-<a name="line196">196: </a><font color="#B22222">/*@</font>
-<a name="line197">197: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a> - Activates or deactivates delayed reorthogonalization</font>
-<a name="line198">198: </a><font color="#B22222">   in the Arnoldi iteration.</font>
-
-<a name="line200">200: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line202">202: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line203">203: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line204">204: </a><font color="#B22222">-  delayed - boolean flag</font>
-
-<a name="line206">206: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line207">207: </a><font color="#B22222">.  -eps_arnoldi_delayed - Activates delayed reorthogonalization in Arnoldi</font>
-
-<a name="line209">209: </a><font color="#B22222">   Note:</font>
-<a name="line210">210: </a><font color="#B22222">   Delayed reorthogonalization is an aggressive optimization for the Arnoldi</font>
-<a name="line211">211: </a><font color="#B22222">   eigensolver than may provide better scalability, but sometimes makes the</font>
-<a name="line212">212: </a><font color="#B22222">   solver converge less than the default algorithm.</font>
-
-<a name="line214">214: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line216">216: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a>()</font>
-<a name="line217">217: </a><font color="#B22222">@*/</font>
-<a name="line218">218: </a><strong><font color="#4169E1"><a name="EPSArnoldiSetDelayed"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool delayed)</font></strong>
-<a name="line219">219: </a>{
-
-<a name="line225">225: </a>  PetscTryMethod(eps,<font color="#666666">"EPSArnoldiSetDelayed_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,delayed));
-<a name="line226">226: </a>  <font color="#4169E1">return</font>(0);
-<a name="line227">227: </a>}
-
-<a name="line231">231: </a><strong><font color="#4169E1"><a name="EPSArnoldiGetDelayed_Arnoldi"></a>static PetscErrorCode EPSArnoldiGetDelayed_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *delayed)</font></strong>
-<a name="line232">232: </a>{
-<a name="line233">233: </a>  EPS_ARNOLDI *arnoldi = (EPS_ARNOLDI*)eps->data;
-
-<a name="line236">236: </a>  *delayed = arnoldi->delayed;
-<a name="line237">237: </a>  <font color="#4169E1">return</font>(0);
-<a name="line238">238: </a>}
-
-<a name="line242">242: </a><font color="#B22222">/*@</font>
-<a name="line243">243: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a> - Gets the type of reorthogonalization used during the Arnoldi</font>
-<a name="line244">244: </a><font color="#B22222">   iteration.</font>
-
-<a name="line246">246: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line248">248: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line249">249: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line251">251: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line252">252: </a><font color="#B22222">.  delayed - boolean flag indicating if delayed reorthogonalization has been enabled</font>
-
-<a name="line254">254: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line256">256: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>()</font>
-<a name="line257">257: </a><font color="#B22222">@*/</font>
-<a name="line258">258: </a><strong><font color="#4169E1"><a name="EPSArnoldiGetDelayed"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *delayed)</font></strong>
-<a name="line259">259: </a>{
-
-<a name="line265">265: </a>  PetscTryMethod(eps,<font color="#666666">"EPSArnoldiGetDelayed_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,delayed));
-<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
-<a name="line267">267: </a>}
-
-<a name="line271">271: </a><strong><font color="#4169E1"><a name="EPSDestroy_Arnoldi"></a>PetscErrorCode EPSDestroy_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line272">272: </a>{
-
-<a name="line276">276: </a>  PetscFree(eps->data);
-<a name="line277">277: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiSetDelayed_C"</font>,NULL);
-<a name="line278">278: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiGetDelayed_C"</font>,NULL);
-<a name="line279">279: </a>  <font color="#4169E1">return</font>(0);
-<a name="line280">280: </a>}
-
-<a name="line284">284: </a><strong><font color="#4169E1"><a name="EPSView_Arnoldi"></a>PetscErrorCode EPSView_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line285">285: </a>{
-<a name="line287">287: </a>  PetscBool      isascii;
-<a name="line288">288: </a>  EPS_ARNOLDI    *arnoldi = (EPS_ARNOLDI*)eps->data;
-
-<a name="line291">291: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line292">292: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line293">293: </a>    <font color="#4169E1">if</font> (arnoldi->delayed) {
-<a name="line294">294: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Arnoldi: using delayed reorthogonalization\n"</font>);
-<a name="line295">295: </a>    }
-<a name="line296">296: </a>  }
-<a name="line297">297: </a>  <font color="#4169E1">return</font>(0);
-<a name="line298">298: </a>}
-
-<a name="line302">302: </a><strong><font color="#4169E1"><a name="EPSCreate_Arnoldi"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line303">303: </a>{
-<a name="line304">304: </a>  EPS_ARNOLDI    *ctx;
-
-<a name="line308">308: </a>  PetscNewLog(eps,&ctx);
-<a name="line309">309: </a>  eps->data = (void*)ctx;
-
-<a name="line311">311: </a>  eps->ops->setup                = EPSSetUp_Arnoldi;
-<a name="line312">312: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_Arnoldi;
-<a name="line313">313: </a>  eps->ops->destroy              = EPSDestroy_Arnoldi;
-<a name="line314">314: </a>  eps->ops->view                 = EPSView_Arnoldi;
-<a name="line315">315: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
-<a name="line316">316: </a>  eps->ops->computevectors       = EPSComputeVectors_Schur;
-<a name="line317">317: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiSetDelayed_C"</font>,EPSArnoldiSetDelayed_Arnoldi);
-<a name="line318">318: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiGetDelayed_C"</font>,EPSArnoldiGetDelayed_Arnoldi);
-<a name="line319">319: </a>  <font color="#4169E1">return</font>(0);
-<a name="line320">320: </a>}
+<a name="line143">143: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line144">144: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && breakdown) {
+<a name="line145">145: </a>      PetscInfo2(eps,<font color="#666666">"Breakdown in Arnoldi method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
+<a name="line146">146: </a>      EPSGetStartVector(eps,k,&breakdown);
+<a name="line147">147: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line148">148: </a>        eps->reason = EPS_DIVERGED_BREAKDOWN;
+<a name="line149">149: </a>        PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
+<a name="line150">150: </a>      }
+<a name="line151">151: </a>    }
+<a name="line152">152: </a>    eps->nconv = k;
+<a name="line153">153: </a>    EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,nv);
+<a name="line154">154: </a>  }
+
+<a name="line156">156: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
+<a name="line157">157: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line158">158: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
+<a name="line159">159: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line160">160: </a>  <font color="#4169E1">return</font>(0);
+<a name="line161">161: </a>}
+
+<a name="line165">165: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_Arnoldi"></a>PetscErrorCode EPSSetFromOptions_Arnoldi(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line166">166: </a>{
+<a name="line168">168: </a>  PetscBool      set,val;
+<a name="line169">169: </a>  EPS_ARNOLDI    *arnoldi = (EPS_ARNOLDI*)eps->data;
+
+<a name="line172">172: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Arnoldi Options"</font>);
+<a name="line173">173: </a>  PetscOptionsBool(<font color="#666666">"-eps_arnoldi_delayed"</font>,<font color="#666666">"Arnoldi with delayed reorthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>"</font>,arnoldi->delayed,&val,&set);
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (set) {
+<a name="line175">175: </a>    <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>(eps,val);
+<a name="line176">176: </a>  }
+<a name="line177">177: </a>  PetscOptionsTail();
+<a name="line178">178: </a>  <font color="#4169E1">return</font>(0);
+<a name="line179">179: </a>}
+
+<a name="line183">183: </a><strong><font color="#4169E1"><a name="EPSArnoldiSetDelayed_Arnoldi"></a>static PetscErrorCode EPSArnoldiSetDelayed_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool delayed)</font></strong>
+<a name="line184">184: </a>{
+<a name="line185">185: </a>  EPS_ARNOLDI *arnoldi = (EPS_ARNOLDI*)eps->data;
+
+<a name="line188">188: </a>  arnoldi->delayed = delayed;
+<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
+<a name="line190">190: </a>}
+
+<a name="line194">194: </a><font color="#B22222">/*@</font>
+<a name="line195">195: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a> - Activates or deactivates delayed reorthogonalization</font>
+<a name="line196">196: </a><font color="#B22222">   in the Arnoldi iteration.</font>
+
+<a name="line198">198: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line200">200: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line201">201: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line202">202: </a><font color="#B22222">-  delayed - boolean flag</font>
+
+<a name="line204">204: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line205">205: </a><font color="#B22222">.  -eps_arnoldi_delayed - Activates delayed reorthogonalization in Arnoldi</font>
+
+<a name="line207">207: </a><font color="#B22222">   Note:</font>
+<a name="line208">208: </a><font color="#B22222">   Delayed reorthogonalization is an aggressive optimization for the Arnoldi</font>
+<a name="line209">209: </a><font color="#B22222">   eigensolver than may provide better scalability, but sometimes makes the</font>
+<a name="line210">210: </a><font color="#B22222">   solver converge less than the default algorithm.</font>
+
+<a name="line212">212: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line214">214: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a>()</font>
+<a name="line215">215: </a><font color="#B22222">@*/</font>
+<a name="line216">216: </a><strong><font color="#4169E1"><a name="EPSArnoldiSetDelayed"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool delayed)</font></strong>
+<a name="line217">217: </a>{
+
+<a name="line223">223: </a>  PetscTryMethod(eps,<font color="#666666">"EPSArnoldiSetDelayed_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,delayed));
+<a name="line224">224: </a>  <font color="#4169E1">return</font>(0);
+<a name="line225">225: </a>}
+
+<a name="line229">229: </a><strong><font color="#4169E1"><a name="EPSArnoldiGetDelayed_Arnoldi"></a>static PetscErrorCode EPSArnoldiGetDelayed_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *delayed)</font></strong>
+<a name="line230">230: </a>{
+<a name="line231">231: </a>  EPS_ARNOLDI *arnoldi = (EPS_ARNOLDI*)eps->data;
+
+<a name="line234">234: </a>  *delayed = arnoldi->delayed;
+<a name="line235">235: </a>  <font color="#4169E1">return</font>(0);
+<a name="line236">236: </a>}
+
+<a name="line240">240: </a><font color="#B22222">/*@</font>
+<a name="line241">241: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a> - Gets the type of reorthogonalization used during the Arnoldi</font>
+<a name="line242">242: </a><font color="#B22222">   iteration.</font>
+
+<a name="line244">244: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line246">246: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line247">247: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line249">249: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line250">250: </a><font color="#B22222">.  delayed - boolean flag indicating if delayed reorthogonalization has been enabled</font>
+
+<a name="line252">252: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line254">254: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSArnoldiSetDelayed.html#EPSArnoldiSetDelayed">EPSArnoldiSetDelayed</a>()</font>
+<a name="line255">255: </a><font color="#B22222">@*/</font>
+<a name="line256">256: </a><strong><font color="#4169E1"><a name="EPSArnoldiGetDelayed"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSArnoldiGetDelayed.html#EPSArnoldiGetDelayed">EPSArnoldiGetDelayed</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *delayed)</font></strong>
+<a name="line257">257: </a>{
+
+<a name="line263">263: </a>  PetscUseMethod(eps,<font color="#666666">"EPSArnoldiGetDelayed_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,delayed));
+<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
+<a name="line265">265: </a>}
+
+<a name="line269">269: </a><strong><font color="#4169E1"><a name="EPSDestroy_Arnoldi"></a>PetscErrorCode EPSDestroy_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line270">270: </a>{
+
+<a name="line274">274: </a>  PetscFree(eps->data);
+<a name="line275">275: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiSetDelayed_C"</font>,NULL);
+<a name="line276">276: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiGetDelayed_C"</font>,NULL);
+<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="EPSView_Arnoldi"></a>PetscErrorCode EPSView_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line283">283: </a>{
+<a name="line285">285: </a>  PetscBool      isascii;
+<a name="line286">286: </a>  EPS_ARNOLDI    *arnoldi = (EPS_ARNOLDI*)eps->data;
+
+<a name="line289">289: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line291">291: </a>    <font color="#4169E1">if</font> (arnoldi->delayed) {
+<a name="line292">292: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Arnoldi: using delayed reorthogonalization\n"</font>);
+<a name="line293">293: </a>    }
+<a name="line294">294: </a>  }
+<a name="line295">295: </a>  <font color="#4169E1">return</font>(0);
+<a name="line296">296: </a>}
+
+<a name="line300">300: </a><strong><font color="#4169E1"><a name="EPSCreate_Arnoldi"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Arnoldi(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line301">301: </a>{
+<a name="line302">302: </a>  EPS_ARNOLDI    *ctx;
+
+<a name="line306">306: </a>  PetscNewLog(eps,&ctx);
+<a name="line307">307: </a>  eps->data = (void*)ctx;
+
+<a name="line309">309: </a>  eps->ops->setup                = EPSSetUp_Arnoldi;
+<a name="line310">310: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_Arnoldi;
+<a name="line311">311: </a>  eps->ops->destroy              = EPSDestroy_Arnoldi;
+<a name="line312">312: </a>  eps->ops->view                 = EPSView_Arnoldi;
+<a name="line313">313: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
+<a name="line314">314: </a>  eps->ops->computevectors       = EPSComputeVectors_Schur;
+<a name="line315">315: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiSetDelayed_C"</font>,EPSArnoldiSetDelayed_Arnoldi);
+<a name="line316">316: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSArnoldiGetDelayed_C"</font>,EPSArnoldiGetDelayed_Arnoldi);
+<a name="line317">317: </a>  <font color="#4169E1">return</font>(0);
+<a name="line318">318: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/arnoldi/index.html b/src/eps/impls/krylov/arnoldi/index.html
index 75f158d..dc7eb63 100644
--- a/src/eps/impls/krylov/arnoldi/index.html
+++ b/src/eps/impls/krylov/arnoldi/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/arnoldi/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/arnoldi/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/krylov/arnoldi/makefile b/src/eps/impls/krylov/arnoldi/makefile
index f159f6d..e302233 100644
--- a/src/eps/impls/krylov/arnoldi/makefile
+++ b/src/eps/impls/krylov/arnoldi/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/krylov/arnoldi/makefile.html b/src/eps/impls/krylov/arnoldi/makefile.html
index 231c29c..7ceec92 100644
--- a/src/eps/impls/krylov/arnoldi/makefile.html
+++ b/src/eps/impls/krylov/arnoldi/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/arnoldi/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:54+00:00">
+<meta name="date" content="2016-05-16T10:32:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/arnoldi/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/arnoldi/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/krylov/epskrylov.c b/src/eps/impls/krylov/epskrylov.c
index 744ef14..43c8c61 100644
--- a/src/eps/impls/krylov/epskrylov.c
+++ b/src/eps/impls/krylov/epskrylov.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -57,11 +57,12 @@ PetscErrorCode EPSBasicArnoldi(EPS eps,PetscBool trans,PetscScalar *H,PetscInt l
     ierr = BVRestoreColumn(eps->V,j,&vj);CHKERRQ(ierr);
     ierr = BVRestoreColumn(eps->V,j+1,&vj1);CHKERRQ(ierr);
     ierr = BVOrthogonalizeColumn(eps->V,j+1,H+ldh*j,beta,breakdown);CHKERRQ(ierr);
-    H[j+1+ldh*j] = *beta;
     if (*breakdown) {
+      H[j+1+ldh*j] = 0.0;
       *M = j+1;
       break;
     } else {
+      H[j+1+ldh*j] = *beta;
       ierr = BVScaleColumn(eps->V,j+1,1.0/(*beta));CHKERRQ(ierr);
     }
   }
@@ -82,7 +83,7 @@ PetscErrorCode EPSDelayedArnoldi(EPS eps,PetscScalar *H,PetscInt ldh,PetscInt k,
   PetscInt       i,j,m=*M;
   Vec            u,t;
   PetscScalar    shh[100],*lhh,dot,dot2;
-  PetscReal      norm1=0.0,norm2;
+  PetscReal      norm1=0.0,norm2=1.0;
   Vec            vj,vj1,vj2;
 
   PetscFunctionBegin;
diff --git a/src/eps/impls/krylov/epskrylov.c.html b/src/eps/impls/krylov/epskrylov.c.html
index db93386..afbe935 100644
--- a/src/eps/impls/krylov/epskrylov.c.html
+++ b/src/eps/impls/krylov/epskrylov.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/epskrylov.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:52+00:00">
+<meta name="date" content="2016-05-16T10:32:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/epskrylov.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/epskrylov.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Common subroutines for all Krylov-type solvers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -65,369 +65,370 @@
 <a name="line57"> 57: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
 <a name="line58"> 58: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
 <a name="line59"> 59: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,j+1,H+ldh*j,beta,breakdown);
-<a name="line60"> 60: </a>    H[j+1+ldh*j] = *beta;
-<a name="line61"> 61: </a>    <font color="#4169E1">if</font> (*breakdown) {
+<a name="line60"> 60: </a>    <font color="#4169E1">if</font> (*breakdown) {
+<a name="line61"> 61: </a>      H[j+1+ldh*j] = 0.0;
 <a name="line62"> 62: </a>      *M = j+1;
 <a name="line63"> 63: </a>      <font color="#4169E1">break</font>;
 <a name="line64"> 64: </a>    } <font color="#4169E1">else</font> {
-<a name="line65"> 65: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/(*beta));
-<a name="line66"> 66: </a>    }
-<a name="line67"> 67: </a>  }
-<a name="line68"> 68: </a>  <font color="#4169E1">return</font>(0);
-<a name="line69"> 69: </a>}
-
-<a name="line73"> 73: </a><font color="#B22222">/*</font>
-<a name="line74"> 74: </a><font color="#B22222">   EPSDelayedArnoldi - This function is equivalent to EPSBasicArnoldi but</font>
-<a name="line75"> 75: </a><font color="#B22222">   performs the computation in a different way. The main idea is that</font>
-<a name="line76"> 76: </a><font color="#B22222">   reorthogonalization is delayed to the next Arnoldi step. This version is</font>
-<a name="line77"> 77: </a><font color="#B22222">   more scalable but in some cases convergence may stagnate.</font>
-<a name="line78"> 78: </a><font color="#B22222">*/</font>
-<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="EPSDelayedArnoldi"></a>PetscErrorCode EPSDelayedArnoldi(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)</font></strong>
-<a name="line80"> 80: </a>{
-<a name="line82"> 82: </a>  PetscInt       i,j,m=*M;
-<a name="line83"> 83: </a>  Vec            u,t;
-<a name="line84"> 84: </a>  PetscScalar    shh[100],*lhh,dot,dot2;
-<a name="line85"> 85: </a>  PetscReal      norm1=0.0,norm2;
-<a name="line86"> 86: </a>  Vec            vj,vj1,vj2;
-
-<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (m<=100) lhh = shh;
-<a name="line90"> 90: </a>  <font color="#4169E1">else</font> {
-<a name="line91"> 91: </a>    PetscMalloc1(m,&lhh);
-<a name="line92"> 92: </a>  }
-<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&u);
-<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&t);
-
-<a name="line96"> 96: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
-<a name="line97"> 97: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
-<a name="line98"> 98: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
-<a name="line99"> 99: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
-<a name="line100">100: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
-<a name="line101">101: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
-<a name="line102">102: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
-
-<a name="line104">104: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(eps->V,j+1,H+ldh*j);
-<a name="line105">105: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line106">106: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(eps->V,j,lhh);
-<a name="line107">107: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
-<a name="line108">108: </a>      VecDotBegin(vj,vj,&dot);
-<a name="line109">109: </a>    }
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (j>k+1) {
-<a name="line111">111: </a>      <a href="../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(eps->V,u,NORM_2,&norm2);
-<a name="line112">112: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j-2,&vj2);
-<a name="line113">113: </a>      VecDotBegin(u,vj2,&dot2);
-<a name="line114">114: </a>    }
-
-<a name="line116">116: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(eps->V,j+1,H+ldh*j);
-<a name="line117">117: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line118">118: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(eps->V,j,lhh);
-<a name="line119">119: </a>      VecDotEnd(vj,vj,&dot);
-<a name="line120">120: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
-<a name="line121">121: </a>    }
-<a name="line122">122: </a>    <font color="#4169E1">if</font> (j>k+1) {
-<a name="line123">123: </a>      <a href="../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(eps->V,u,NORM_2,&norm2);
-<a name="line124">124: </a>      VecDotEnd(u,vj2,&dot2);
-<a name="line125">125: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j-2,&vj2);
-<a name="line126">126: </a>    }
-
-<a name="line128">128: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line129">129: </a>      norm1 = PetscSqrtReal(PetscRealPart(dot));
-<a name="line130">130: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++)
-<a name="line131">131: </a>        H[ldh*j+i] = H[ldh*j+i]/norm1;
-<a name="line132">132: </a>      H[ldh*j+j] = H[ldh*j+j]/dot;
-
-<a name="line134">134: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,j,t);
-<a name="line135">135: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j,1.0/norm1);
-<a name="line136">136: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/norm1);
-<a name="line137">137: </a>    }
-
-<a name="line139">139: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,j+1,H+ldh*j);
-
-<a name="line141">141: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line142">142: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,j);
-<a name="line143">143: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(eps->V,-1.0,1.0,t,lhh);
-<a name="line144">144: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
-<a name="line145">145: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++)
-<a name="line146">146: </a>        H[ldh*(j-1)+i] += lhh[i];
-<a name="line147">147: </a>    }
-
-<a name="line149">149: </a>    <font color="#4169E1">if</font> (j>k+1) {
-<a name="line150">150: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j-1,&vj1);
-<a name="line151">151: </a>      VecCopy(u,vj1);
-<a name="line152">152: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j-1,&vj1);
-<a name="line153">153: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j-1,1.0/norm2);
-<a name="line154">154: </a>      H[ldh*(j-2)+j-1] = norm2;
-<a name="line155">155: </a>    }
-
-<a name="line157">157: </a>    <font color="#4169E1">if</font> (j<m-1) {
-<a name="line158">158: </a>      VecCopy(t,u);
-<a name="line159">159: </a>    }
-<a name="line160">160: </a>  }
-
-<a name="line162">162: </a>  <a href="../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(eps->V,t,NORM_2,&norm2);
-<a name="line163">163: </a>  VecScale(t,1.0/norm2);
-<a name="line164">164: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,m-1,&vj1);
-<a name="line165">165: </a>  VecCopy(t,vj1);
-<a name="line166">166: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,m-1,&vj1);
-<a name="line167">167: </a>  H[ldh*(m-2)+m-1] = norm2;
-
-<a name="line169">169: </a>  <a href="../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(eps->V,m,lhh);
-
-<a name="line171">171: </a>  <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,m,lhh);
-<a name="line172">172: </a>  <font color="#4169E1">for</font> (i=0;i<m;i++)
-<a name="line173">173: </a>    H[ldh*(m-1)+i] += lhh[i];
-
-<a name="line175">175: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(eps->V,m,NORM_2,beta);
-<a name="line176">176: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,m,1.0 / *beta);
-<a name="line177">177: </a>  *breakdown = PETSC_FALSE;
-
-<a name="line179">179: </a>  <font color="#4169E1">if</font> (m>100) { PetscFree(lhh); }
-<a name="line180">180: </a>  VecDestroy(&u);
-<a name="line181">181: </a>  VecDestroy(&t);
-<a name="line182">182: </a>  <font color="#4169E1">return</font>(0);
-<a name="line183">183: </a>}
-
-<a name="line187">187: </a><font color="#B22222">/*</font>
-<a name="line188">188: </a><font color="#B22222">   EPSDelayedArnoldi1 - This function is similar to EPSDelayedArnoldi,</font>
-<a name="line189">189: </a><font color="#B22222">   but without reorthogonalization (only delayed normalization).</font>
-<a name="line190">190: </a><font color="#B22222">*/</font>
-<a name="line191">191: </a><strong><font color="#4169E1"><a name="EPSDelayedArnoldi1"></a>PetscErrorCode EPSDelayedArnoldi1(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)</font></strong>
-<a name="line192">192: </a>{
-<a name="line194">194: </a>  PetscInt       i,j,m=*M;
-<a name="line195">195: </a>  PetscScalar    dot;
-<a name="line196">196: </a>  PetscReal      norm=0.0;
-<a name="line197">197: </a>  Vec            vj,vj1;
-
-<a name="line200">200: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
-<a name="line201">201: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
-<a name="line202">202: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
-<a name="line203">203: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
-<a name="line204">204: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
-<a name="line205">205: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
-<a name="line206">206: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(eps->V,j+1,H+ldh*j);
-<a name="line207">207: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line208">208: </a>      VecDotBegin(vj,vj,&dot);
-<a name="line209">209: </a>    }
-<a name="line210">210: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(eps->V,j+1,H+ldh*j);
-<a name="line211">211: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line212">212: </a>      VecDotEnd(vj,vj,&dot);
-<a name="line213">213: </a>    }
-<a name="line214">214: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
-
-<a name="line216">216: </a>    <font color="#4169E1">if</font> (j>k) {
-<a name="line217">217: </a>      norm = PetscSqrtReal(PetscRealPart(dot));
-<a name="line218">218: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j,1.0/norm);
-<a name="line219">219: </a>      H[ldh*(j-1)+j] = norm;
-
-<a name="line221">221: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++)
-<a name="line222">222: </a>        H[ldh*j+i] = H[ldh*j+i]/norm;
-<a name="line223">223: </a>      H[ldh*j+j] = H[ldh*j+j]/dot;
-<a name="line224">224: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/norm);
-<a name="line225">225: </a>      *beta = norm;
-<a name="line226">226: </a>    }
-<a name="line227">227: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,j+1,H+ldh*j);
-<a name="line228">228: </a>  }
-
-<a name="line230">230: </a>  *breakdown = PETSC_FALSE;
-<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
-<a name="line232">232: </a>}
-
-<a name="line236">236: </a><font color="#B22222">/*</font>
-<a name="line237">237: </a><font color="#B22222">   EPSKrylovConvergence - Implements the loop that checks for convergence</font>
-<a name="line238">238: </a><font color="#B22222">   in Krylov methods.</font>
-
-<a name="line240">240: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line241">241: </a><font color="#B22222">     eps   - the eigensolver; some error estimates are updated in eps->errest</font>
-<a name="line242">242: </a><font color="#B22222">     getall - whether all residuals must be computed</font>
-<a name="line243">243: </a><font color="#B22222">     kini  - initial value of k (the loop variable)</font>
-<a name="line244">244: </a><font color="#B22222">     nits  - number of iterations of the loop</font>
-<a name="line245">245: </a><font color="#B22222">     V     - set of basis vectors (used only if trueresidual is activated)</font>
-<a name="line246">246: </a><font color="#B22222">     nv    - number of vectors to process (dimension of Q, columns of V)</font>
-<a name="line247">247: </a><font color="#B22222">     beta  - norm of f (the residual vector of the Arnoldi/Lanczos factorization)</font>
-<a name="line248">248: </a><font color="#B22222">     corrf - correction factor for residual estimates (only in harmonic KS)</font>
-
-<a name="line250">250: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line251">251: </a><font color="#B22222">     kout  - the first index where the convergence test failed</font>
-<a name="line252">252: </a><font color="#B22222">*/</font>
-<a name="line253">253: </a><strong><font color="#4169E1"><a name="EPSKrylovConvergence"></a>PetscErrorCode EPSKrylovConvergence(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscReal corrf,PetscInt *kout)</font></strong>
-<a name="line254">254: </a>{
-<a name="line256">256: </a>  PetscInt       k,newk,marker,ld,inside;
-<a name="line257">257: </a>  PetscScalar    re,im,*Zr,*Zi,*X;
-<a name="line258">258: </a>  PetscReal      resnorm;
-<a name="line259">259: </a>  PetscBool      isshift,refined,istrivial;
-<a name="line260">260: </a>  Vec            x,y,w[3];
-
-<a name="line263">263: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line264">264: </a>  <font color="#4169E1">if</font> (eps->trueres) {
-<a name="line265">265: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&x);
-<a name="line266">266: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&y);
-<a name="line267">267: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w[0]);
-<a name="line268">268: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w[2]);
-<a name="line269">269: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line270">270: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w[1]);
-<a name="line271">271: </a><font color="#A020F0">#else</font>
-<a name="line272">272: </a>    w[1] = NULL;
-<a name="line273">273: </a><font color="#A020F0">#endif</font>
-<a name="line274">274: </a>  }
-<a name="line275">275: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line276">276: </a>  <a href="../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a>(eps->ds,&refined);
-<a name="line277">277: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSHIFT,&isshift);
-<a name="line278">278: </a>  marker = -1;
-<a name="line279">279: </a>  <font color="#4169E1">if</font> (eps->trackall) getall = PETSC_TRUE;
-<a name="line280">280: </a>  <font color="#4169E1">for</font> (k=kini;k<kini+nits;k++) {
-<a name="line281">281: </a>    <font color="#B22222">/* eigenvalue */</font>
-<a name="line282">282: </a>    re = eps->eigr[k];
-<a name="line283">283: </a>    im = eps->eigi[k];
-<a name="line284">284: </a>    <font color="#4169E1">if</font> (!istrivial || eps->trueres || isshift || eps->conv==EPS_CONV_NORM) {
-<a name="line285">285: </a>      <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&re,&im);
-<a name="line286">286: </a>    }
-<a name="line287">287: </a>    <font color="#4169E1">if</font> (!istrivial) {
-<a name="line288">288: </a>      <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(eps->rg,1,&re,&im,&inside);
-<a name="line289">289: </a>      <font color="#4169E1">if</font> (marker==-1 && inside<=0) marker = k;
-<a name="line290">290: </a>      <font color="#4169E1">if</font> (!(eps->trueres || isshift || eps->conv==EPS_CONV_NORM)) {  <font color="#B22222">/* make sure eps->converged below uses the right value */</font>
-<a name="line291">291: </a>        re = eps->eigr[k];
-<a name="line292">292: </a>        im = eps->eigi[k];
-<a name="line293">293: </a>      }
-<a name="line294">294: </a>    }
-<a name="line295">295: </a>    newk = k;
-<a name="line296">296: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,&newk,&resnorm);
-<a name="line297">297: </a>    <font color="#4169E1">if</font> (eps->trueres) {
-<a name="line298">298: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_X,&X);
-<a name="line299">299: </a>      Zr = X+k*ld;
-<a name="line300">300: </a>      <font color="#4169E1">if</font> (newk==k+1) Zi = X+newk*ld;
-<a name="line301">301: </a>      <font color="#4169E1">else</font> Zi = NULL;
-<a name="line302">302: </a>      EPSComputeRitzVector(eps,Zr,Zi,eps->V,x,y);
-<a name="line303">303: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_X,&X);
-<a name="line304">304: </a>      EPSComputeResidualNorm_Private(eps,re,im,x,y,w,&resnorm);
-<a name="line305">305: </a>    }
-<a name="line306">306: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!refined) resnorm *= beta*corrf;
-<a name="line307">307: </a>    <font color="#B22222">/* error estimate */</font>
-<a name="line308">308: </a>    (*eps->converged)(eps,re,im,resnorm,&eps->errest[k],eps->convergedctx);
-<a name="line309">309: </a>    <font color="#4169E1">if</font> (marker==-1 && eps->errest[k] >= eps->tol) marker = k;
-<a name="line310">310: </a>    <font color="#4169E1">if</font> (newk==k+1) {
-<a name="line311">311: </a>      eps->errest[k+1] = eps->errest[k];
-<a name="line312">312: </a>      k++;
-<a name="line313">313: </a>    }
-<a name="line314">314: </a>    <font color="#4169E1">if</font> (marker!=-1 && !getall) <font color="#4169E1">break</font>;
-<a name="line315">315: </a>  }
-<a name="line316">316: </a>  <font color="#4169E1">if</font> (marker!=-1) k = marker;
-<a name="line317">317: </a>  *kout = k;
-<a name="line318">318: </a>  <font color="#4169E1">if</font> (eps->trueres) {
-<a name="line319">319: </a>    VecDestroy(&x);
-<a name="line320">320: </a>    VecDestroy(&y);
-<a name="line321">321: </a>    VecDestroy(&w[0]);
-<a name="line322">322: </a>    VecDestroy(&w[2]);
-<a name="line323">323: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line324">324: </a>    VecDestroy(&w[1]);
-<a name="line325">325: </a><font color="#A020F0">#endif</font>
-<a name="line326">326: </a>  }
-<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
-<a name="line328">328: </a>}
-
-<a name="line332">332: </a><font color="#B22222">/*</font>
-<a name="line333">333: </a><font color="#B22222">   EPSFullLanczos - Computes an m-step Lanczos factorization with full</font>
-<a name="line334">334: </a><font color="#B22222">   reorthogonalization.  At each Lanczos step, the corresponding Lanczos</font>
-<a name="line335">335: </a><font color="#B22222">   vector is orthogonalized with respect to all previous Lanczos vectors.</font>
-<a name="line336">336: </a><font color="#B22222">   This is equivalent to computing an m-step Arnoldi factorization and</font>
-<a name="line337">337: </a><font color="#B22222">   exploting symmetry of the operator.</font>
-
-<a name="line339">339: </a><font color="#B22222">   The first k columns are assumed to be locked and therefore they are</font>
-<a name="line340">340: </a><font color="#B22222">   not modified. On exit, the following relation is satisfied:</font>
-
-<a name="line342">342: </a><font color="#B22222">                    OP * V - V * T = beta_m*v_m * e_m^T</font>
-
-<a name="line344">344: </a><font color="#B22222">   where the columns of V are the Lanczos vectors (which are B-orthonormal),</font>
-<a name="line345">345: </a><font color="#B22222">   T is a real symmetric tridiagonal matrix, and e_m is the m-th vector of</font>
-<a name="line346">346: </a><font color="#B22222">   the canonical basis. The tridiagonal is stored as two arrays: alpha</font>
-<a name="line347">347: </a><font color="#B22222">   contains the diagonal elements, beta the off-diagonal. On exit, the last</font>
-<a name="line348">348: </a><font color="#B22222">   element of beta contains the B-norm of V[m] before normalization.</font>
-<a name="line349">349: </a><font color="#B22222">*/</font>
-<a name="line350">350: </a><strong><font color="#4169E1"><a name="EPSFullLanczos"></a>PetscErrorCode EPSFullLanczos(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown)</font></strong>
-<a name="line351">351: </a>{
-<a name="line353">353: </a>  PetscInt       j,m = *M;
-<a name="line354">354: </a>  Vec            vj,vj1;
-<a name="line355">355: </a>  PetscScalar    *hwork,lhwork[100];
-
-<a name="line358">358: </a>  <font color="#4169E1">if</font> (m > 100) {
-<a name="line359">359: </a>    PetscMalloc1(m,&hwork);
-<a name="line360">360: </a>  } <font color="#4169E1">else</font> hwork = lhwork;
-
-<a name="line362">362: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
-<a name="line363">363: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
-<a name="line364">364: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
-<a name="line365">365: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
-<a name="line366">366: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
-<a name="line367">367: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
-<a name="line368">368: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
-<a name="line369">369: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,j+1,hwork,beta+j,breakdown);
-<a name="line370">370: </a>    alpha[j] = PetscRealPart(hwork[j]);
-<a name="line371">371: </a>    <font color="#4169E1">if</font> (*breakdown) {
-<a name="line372">372: </a>      *M = j+1;
-<a name="line373">373: </a>      <font color="#4169E1">break</font>;
-<a name="line374">374: </a>    } <font color="#4169E1">else</font> {
-<a name="line375">375: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/beta[j]);
-<a name="line376">376: </a>    }
-<a name="line377">377: </a>  }
-<a name="line378">378: </a>  <font color="#4169E1">if</font> (m > 100) {
-<a name="line379">379: </a>    PetscFree(hwork);
-<a name="line380">380: </a>  }
-<a name="line381">381: </a>  <font color="#4169E1">return</font>(0);
-<a name="line382">382: </a>}
-
-<a name="line386">386: </a><strong><font color="#4169E1"><a name="EPSPseudoLanczos"></a>PetscErrorCode EPSPseudoLanczos(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *alpha,PetscReal *beta,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscReal *cos,Vec w)</font></strong>
-<a name="line387">387: </a>{
-<a name="line389">389: </a>  PetscInt       j,m = *M,i,ld,l;
-<a name="line390">390: </a>  Vec            vj,vj1;
-<a name="line391">391: </a>  PetscScalar    *hwork,lhwork[100];
-<a name="line392">392: </a>  PetscReal      norm,norm1,norm2,t,*f,sym=0.0,fro=0.0;
-<a name="line393">393: </a>  PetscBLASInt   j_,one=1;
-
-<a name="line396">396: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line397">397: </a>  <a href="../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(eps->ds,NULL,NULL,&l,NULL,NULL);
-<a name="line398">398: </a>  <font color="#4169E1">if</font> (cos) *cos = 1.0;
-<a name="line399">399: </a>  <font color="#4169E1">if</font> (m > 100) {
-<a name="line400">400: </a>    PetscMalloc1(m,&hwork);
-<a name="line401">401: </a>  } <font color="#4169E1">else</font> hwork = lhwork;
-
-<a name="line403">403: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
-<a name="line404">404: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
-<a name="line405">405: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
-<a name="line406">406: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
-<a name="line407">407: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
-<a name="line408">408: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
-<a name="line409">409: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
-<a name="line410">410: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,j+1,hwork,&norm,breakdown);
-<a name="line411">411: </a>    alpha[j] = PetscRealPart(hwork[j]);
-<a name="line412">412: </a>    beta[j] = PetscAbsReal(norm);
-<a name="line413">413: </a>    <a href="../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&f);
-<a name="line414">414: </a>    <font color="#4169E1">if</font> (j==k) { 
-<a name="line415">415: </a>      <font color="#4169E1">for</font> (i=l;i<j-1;i++) hwork[i]-= f[2*ld+i];
-<a name="line416">416: </a>      <font color="#4169E1">for</font> (i=0;i<l;i++) hwork[i] = 0.0;
-<a name="line417">417: </a>    }
-<a name="line418">418: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&f);
-<a name="line419">419: </a>    hwork[j-1] -= beta[j-1];
-<a name="line420">420: </a>    PetscBLASIntCast(j,&j_);
-<a name="line421">421: </a>    sym = SlepcAbs(BLASnrm2_(&j_,hwork,&one),sym);
-<a name="line422">422: </a>    fro = SlepcAbs(fro,SlepcAbs(alpha[j],beta[j]));
-<a name="line423">423: </a>    <font color="#4169E1">if</font> (j>0) fro = SlepcAbs(fro,beta[j-1]);
-<a name="line424">424: </a>    <font color="#4169E1">if</font> (sym/fro>PetscMax(PETSC_SQRT_MACHINE_EPSILON,10*eps->tol)) { *symmlost = PETSC_TRUE; *M=j+1; <font color="#4169E1">break</font>; }
-<a name="line425">425: </a>    omega[j+1] = (norm<0.0)? -1.0: 1.0;
-<a name="line426">426: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/norm);
-<a name="line427">427: </a>    <font color="#B22222">/* */</font>
-<a name="line428">428: </a>    <font color="#4169E1">if</font> (cos) {
-<a name="line429">429: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
-<a name="line430">430: </a>      VecNorm(vj1,NORM_2,&norm1);
-<a name="line431">431: </a>      <a href="../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,vj1,w);
-<a name="line432">432: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
-<a name="line433">433: </a>      VecNorm(w,NORM_2,&norm2);
-<a name="line434">434: </a>      t = 1.0/(norm1*norm2);
-<a name="line435">435: </a>      <font color="#4169E1">if</font> (*cos>t) *cos = t;
-<a name="line436">436: </a>    }
-<a name="line437">437: </a>  }
-<a name="line438">438: </a>  <font color="#4169E1">if</font> (m > 100) {
-<a name="line439">439: </a>    PetscFree(hwork);
-<a name="line440">440: </a>  }
-<a name="line441">441: </a>  <font color="#4169E1">return</font>(0);
-<a name="line442">442: </a>}
+<a name="line65"> 65: </a>      H[j+1+ldh*j] = *beta;
+<a name="line66"> 66: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/(*beta));
+<a name="line67"> 67: </a>    }
+<a name="line68"> 68: </a>  }
+<a name="line69"> 69: </a>  <font color="#4169E1">return</font>(0);
+<a name="line70"> 70: </a>}
+
+<a name="line74"> 74: </a><font color="#B22222">/*</font>
+<a name="line75"> 75: </a><font color="#B22222">   EPSDelayedArnoldi - This function is equivalent to EPSBasicArnoldi but</font>
+<a name="line76"> 76: </a><font color="#B22222">   performs the computation in a different way. The main idea is that</font>
+<a name="line77"> 77: </a><font color="#B22222">   reorthogonalization is delayed to the next Arnoldi step. This version is</font>
+<a name="line78"> 78: </a><font color="#B22222">   more scalable but in some cases convergence may stagnate.</font>
+<a name="line79"> 79: </a><font color="#B22222">*/</font>
+<a name="line80"> 80: </a><strong><font color="#4169E1"><a name="EPSDelayedArnoldi"></a>PetscErrorCode EPSDelayedArnoldi(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)</font></strong>
+<a name="line81"> 81: </a>{
+<a name="line83"> 83: </a>  PetscInt       i,j,m=*M;
+<a name="line84"> 84: </a>  Vec            u,t;
+<a name="line85"> 85: </a>  PetscScalar    shh[100],*lhh,dot,dot2;
+<a name="line86"> 86: </a>  PetscReal      norm1=0.0,norm2=1.0;
+<a name="line87"> 87: </a>  Vec            vj,vj1,vj2;
+
+<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (m<=100) lhh = shh;
+<a name="line91"> 91: </a>  <font color="#4169E1">else</font> {
+<a name="line92"> 92: </a>    PetscMalloc1(m,&lhh);
+<a name="line93"> 93: </a>  }
+<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&u);
+<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&t);
+
+<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
+<a name="line98"> 98: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line99"> 99: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
+<a name="line100">100: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
+<a name="line101">101: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
+<a name="line102">102: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
+<a name="line103">103: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
+
+<a name="line105">105: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(eps->V,j+1,H+ldh*j);
+<a name="line106">106: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line107">107: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(eps->V,j,lhh);
+<a name="line108">108: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
+<a name="line109">109: </a>      VecDotBegin(vj,vj,&dot);
+<a name="line110">110: </a>    }
+<a name="line111">111: </a>    <font color="#4169E1">if</font> (j>k+1) {
+<a name="line112">112: </a>      <a href="../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(eps->V,u,NORM_2,&norm2);
+<a name="line113">113: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j-2,&vj2);
+<a name="line114">114: </a>      VecDotBegin(u,vj2,&dot2);
+<a name="line115">115: </a>    }
+
+<a name="line117">117: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(eps->V,j+1,H+ldh*j);
+<a name="line118">118: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line119">119: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(eps->V,j,lhh);
+<a name="line120">120: </a>      VecDotEnd(vj,vj,&dot);
+<a name="line121">121: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
+<a name="line122">122: </a>    }
+<a name="line123">123: </a>    <font color="#4169E1">if</font> (j>k+1) {
+<a name="line124">124: </a>      <a href="../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(eps->V,u,NORM_2,&norm2);
+<a name="line125">125: </a>      VecDotEnd(u,vj2,&dot2);
+<a name="line126">126: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j-2,&vj2);
+<a name="line127">127: </a>    }
+
+<a name="line129">129: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line130">130: </a>      norm1 = PetscSqrtReal(PetscRealPart(dot));
+<a name="line131">131: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++)
+<a name="line132">132: </a>        H[ldh*j+i] = H[ldh*j+i]/norm1;
+<a name="line133">133: </a>      H[ldh*j+j] = H[ldh*j+j]/dot;
+
+<a name="line135">135: </a>      <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,j,t);
+<a name="line136">136: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j,1.0/norm1);
+<a name="line137">137: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/norm1);
+<a name="line138">138: </a>    }
+
+<a name="line140">140: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,j+1,H+ldh*j);
+
+<a name="line142">142: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line143">143: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,j);
+<a name="line144">144: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(eps->V,-1.0,1.0,t,lhh);
+<a name="line145">145: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
+<a name="line146">146: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++)
+<a name="line147">147: </a>        H[ldh*(j-1)+i] += lhh[i];
+<a name="line148">148: </a>    }
+
+<a name="line150">150: </a>    <font color="#4169E1">if</font> (j>k+1) {
+<a name="line151">151: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j-1,&vj1);
+<a name="line152">152: </a>      VecCopy(u,vj1);
+<a name="line153">153: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j-1,&vj1);
+<a name="line154">154: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j-1,1.0/norm2);
+<a name="line155">155: </a>      H[ldh*(j-2)+j-1] = norm2;
+<a name="line156">156: </a>    }
+
+<a name="line158">158: </a>    <font color="#4169E1">if</font> (j<m-1) {
+<a name="line159">159: </a>      VecCopy(t,u);
+<a name="line160">160: </a>    }
+<a name="line161">161: </a>  }
+
+<a name="line163">163: </a>  <a href="../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(eps->V,t,NORM_2,&norm2);
+<a name="line164">164: </a>  VecScale(t,1.0/norm2);
+<a name="line165">165: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,m-1,&vj1);
+<a name="line166">166: </a>  VecCopy(t,vj1);
+<a name="line167">167: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,m-1,&vj1);
+<a name="line168">168: </a>  H[ldh*(m-2)+m-1] = norm2;
+
+<a name="line170">170: </a>  <a href="../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(eps->V,m,lhh);
+
+<a name="line172">172: </a>  <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,m,lhh);
+<a name="line173">173: </a>  <font color="#4169E1">for</font> (i=0;i<m;i++)
+<a name="line174">174: </a>    H[ldh*(m-1)+i] += lhh[i];
+
+<a name="line176">176: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(eps->V,m,NORM_2,beta);
+<a name="line177">177: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,m,1.0 / *beta);
+<a name="line178">178: </a>  *breakdown = PETSC_FALSE;
+
+<a name="line180">180: </a>  <font color="#4169E1">if</font> (m>100) { PetscFree(lhh); }
+<a name="line181">181: </a>  VecDestroy(&u);
+<a name="line182">182: </a>  VecDestroy(&t);
+<a name="line183">183: </a>  <font color="#4169E1">return</font>(0);
+<a name="line184">184: </a>}
+
+<a name="line188">188: </a><font color="#B22222">/*</font>
+<a name="line189">189: </a><font color="#B22222">   EPSDelayedArnoldi1 - This function is similar to EPSDelayedArnoldi,</font>
+<a name="line190">190: </a><font color="#B22222">   but without reorthogonalization (only delayed normalization).</font>
+<a name="line191">191: </a><font color="#B22222">*/</font>
+<a name="line192">192: </a><strong><font color="#4169E1"><a name="EPSDelayedArnoldi1"></a>PetscErrorCode EPSDelayedArnoldi1(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)</font></strong>
+<a name="line193">193: </a>{
+<a name="line195">195: </a>  PetscInt       i,j,m=*M;
+<a name="line196">196: </a>  PetscScalar    dot;
+<a name="line197">197: </a>  PetscReal      norm=0.0;
+<a name="line198">198: </a>  Vec            vj,vj1;
+
+<a name="line201">201: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
+<a name="line202">202: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line203">203: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
+<a name="line204">204: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
+<a name="line205">205: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
+<a name="line206">206: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
+<a name="line207">207: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(eps->V,j+1,H+ldh*j);
+<a name="line208">208: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line209">209: </a>      VecDotBegin(vj,vj,&dot);
+<a name="line210">210: </a>    }
+<a name="line211">211: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(eps->V,j+1,H+ldh*j);
+<a name="line212">212: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line213">213: </a>      VecDotEnd(vj,vj,&dot);
+<a name="line214">214: </a>    }
+<a name="line215">215: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
+
+<a name="line217">217: </a>    <font color="#4169E1">if</font> (j>k) {
+<a name="line218">218: </a>      norm = PetscSqrtReal(PetscRealPart(dot));
+<a name="line219">219: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j,1.0/norm);
+<a name="line220">220: </a>      H[ldh*(j-1)+j] = norm;
+
+<a name="line222">222: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++)
+<a name="line223">223: </a>        H[ldh*j+i] = H[ldh*j+i]/norm;
+<a name="line224">224: </a>      H[ldh*j+j] = H[ldh*j+j]/dot;
+<a name="line225">225: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/norm);
+<a name="line226">226: </a>      *beta = norm;
+<a name="line227">227: </a>    }
+<a name="line228">228: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,j+1,H+ldh*j);
+<a name="line229">229: </a>  }
+
+<a name="line231">231: </a>  *breakdown = PETSC_FALSE;
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a>}
+
+<a name="line237">237: </a><font color="#B22222">/*</font>
+<a name="line238">238: </a><font color="#B22222">   EPSKrylovConvergence - Implements the loop that checks for convergence</font>
+<a name="line239">239: </a><font color="#B22222">   in Krylov methods.</font>
+
+<a name="line241">241: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line242">242: </a><font color="#B22222">     eps   - the eigensolver; some error estimates are updated in eps->errest</font>
+<a name="line243">243: </a><font color="#B22222">     getall - whether all residuals must be computed</font>
+<a name="line244">244: </a><font color="#B22222">     kini  - initial value of k (the loop variable)</font>
+<a name="line245">245: </a><font color="#B22222">     nits  - number of iterations of the loop</font>
+<a name="line246">246: </a><font color="#B22222">     V     - set of basis vectors (used only if trueresidual is activated)</font>
+<a name="line247">247: </a><font color="#B22222">     nv    - number of vectors to process (dimension of Q, columns of V)</font>
+<a name="line248">248: </a><font color="#B22222">     beta  - norm of f (the residual vector of the Arnoldi/Lanczos factorization)</font>
+<a name="line249">249: </a><font color="#B22222">     corrf - correction factor for residual estimates (only in harmonic KS)</font>
+
+<a name="line251">251: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line252">252: </a><font color="#B22222">     kout  - the first index where the convergence test failed</font>
+<a name="line253">253: </a><font color="#B22222">*/</font>
+<a name="line254">254: </a><strong><font color="#4169E1"><a name="EPSKrylovConvergence"></a>PetscErrorCode EPSKrylovConvergence(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscReal corrf,PetscInt *kout)</font></strong>
+<a name="line255">255: </a>{
+<a name="line257">257: </a>  PetscInt       k,newk,marker,ld,inside;
+<a name="line258">258: </a>  PetscScalar    re,im,*Zr,*Zi,*X;
+<a name="line259">259: </a>  PetscReal      resnorm;
+<a name="line260">260: </a>  PetscBool      isshift,refined,istrivial;
+<a name="line261">261: </a>  Vec            x,y,w[3];
+
+<a name="line264">264: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line265">265: </a>  <font color="#4169E1">if</font> (eps->trueres) {
+<a name="line266">266: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&x);
+<a name="line267">267: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&y);
+<a name="line268">268: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w[0]);
+<a name="line269">269: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w[2]);
+<a name="line270">270: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line271">271: </a>    <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w[1]);
+<a name="line272">272: </a><font color="#A020F0">#else</font>
+<a name="line273">273: </a>    w[1] = NULL;
+<a name="line274">274: </a><font color="#A020F0">#endif</font>
+<a name="line275">275: </a>  }
+<a name="line276">276: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line277">277: </a>  <a href="../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a>(eps->ds,&refined);
+<a name="line278">278: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSHIFT,&isshift);
+<a name="line279">279: </a>  marker = -1;
+<a name="line280">280: </a>  <font color="#4169E1">if</font> (eps->trackall) getall = PETSC_TRUE;
+<a name="line281">281: </a>  <font color="#4169E1">for</font> (k=kini;k<kini+nits;k++) {
+<a name="line282">282: </a>    <font color="#B22222">/* eigenvalue */</font>
+<a name="line283">283: </a>    re = eps->eigr[k];
+<a name="line284">284: </a>    im = eps->eigi[k];
+<a name="line285">285: </a>    <font color="#4169E1">if</font> (!istrivial || eps->trueres || isshift || eps->conv==EPS_CONV_NORM) {
+<a name="line286">286: </a>      <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&re,&im);
+<a name="line287">287: </a>    }
+<a name="line288">288: </a>    <font color="#4169E1">if</font> (!istrivial) {
+<a name="line289">289: </a>      <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(eps->rg,1,&re,&im,&inside);
+<a name="line290">290: </a>      <font color="#4169E1">if</font> (marker==-1 && inside<=0) marker = k;
+<a name="line291">291: </a>      <font color="#4169E1">if</font> (!(eps->trueres || isshift || eps->conv==EPS_CONV_NORM)) {  <font color="#B22222">/* make sure eps->converged below uses the right value */</font>
+<a name="line292">292: </a>        re = eps->eigr[k];
+<a name="line293">293: </a>        im = eps->eigi[k];
+<a name="line294">294: </a>      }
+<a name="line295">295: </a>    }
+<a name="line296">296: </a>    newk = k;
+<a name="line297">297: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,&newk,&resnorm);
+<a name="line298">298: </a>    <font color="#4169E1">if</font> (eps->trueres) {
+<a name="line299">299: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_X,&X);
+<a name="line300">300: </a>      Zr = X+k*ld;
+<a name="line301">301: </a>      <font color="#4169E1">if</font> (newk==k+1) Zi = X+newk*ld;
+<a name="line302">302: </a>      <font color="#4169E1">else</font> Zi = NULL;
+<a name="line303">303: </a>      EPSComputeRitzVector(eps,Zr,Zi,eps->V,x,y);
+<a name="line304">304: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_X,&X);
+<a name="line305">305: </a>      EPSComputeResidualNorm_Private(eps,re,im,x,y,w,&resnorm);
+<a name="line306">306: </a>    }
+<a name="line307">307: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!refined) resnorm *= beta*corrf;
+<a name="line308">308: </a>    <font color="#B22222">/* error estimate */</font>
+<a name="line309">309: </a>    (*eps->converged)(eps,re,im,resnorm,&eps->errest[k],eps->convergedctx);
+<a name="line310">310: </a>    <font color="#4169E1">if</font> (marker==-1 && eps->errest[k] >= eps->tol) marker = k;
+<a name="line311">311: </a>    <font color="#4169E1">if</font> (newk==k+1) {
+<a name="line312">312: </a>      eps->errest[k+1] = eps->errest[k];
+<a name="line313">313: </a>      k++;
+<a name="line314">314: </a>    }
+<a name="line315">315: </a>    <font color="#4169E1">if</font> (marker!=-1 && !getall) <font color="#4169E1">break</font>;
+<a name="line316">316: </a>  }
+<a name="line317">317: </a>  <font color="#4169E1">if</font> (marker!=-1) k = marker;
+<a name="line318">318: </a>  *kout = k;
+<a name="line319">319: </a>  <font color="#4169E1">if</font> (eps->trueres) {
+<a name="line320">320: </a>    VecDestroy(&x);
+<a name="line321">321: </a>    VecDestroy(&y);
+<a name="line322">322: </a>    VecDestroy(&w[0]);
+<a name="line323">323: </a>    VecDestroy(&w[2]);
+<a name="line324">324: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line325">325: </a>    VecDestroy(&w[1]);
+<a name="line326">326: </a><font color="#A020F0">#endif</font>
+<a name="line327">327: </a>  }
+<a name="line328">328: </a>  <font color="#4169E1">return</font>(0);
+<a name="line329">329: </a>}
+
+<a name="line333">333: </a><font color="#B22222">/*</font>
+<a name="line334">334: </a><font color="#B22222">   EPSFullLanczos - Computes an m-step Lanczos factorization with full</font>
+<a name="line335">335: </a><font color="#B22222">   reorthogonalization.  At each Lanczos step, the corresponding Lanczos</font>
+<a name="line336">336: </a><font color="#B22222">   vector is orthogonalized with respect to all previous Lanczos vectors.</font>
+<a name="line337">337: </a><font color="#B22222">   This is equivalent to computing an m-step Arnoldi factorization and</font>
+<a name="line338">338: </a><font color="#B22222">   exploting symmetry of the operator.</font>
+
+<a name="line340">340: </a><font color="#B22222">   The first k columns are assumed to be locked and therefore they are</font>
+<a name="line341">341: </a><font color="#B22222">   not modified. On exit, the following relation is satisfied:</font>
+
+<a name="line343">343: </a><font color="#B22222">                    OP * V - V * T = beta_m*v_m * e_m^T</font>
+
+<a name="line345">345: </a><font color="#B22222">   where the columns of V are the Lanczos vectors (which are B-orthonormal),</font>
+<a name="line346">346: </a><font color="#B22222">   T is a real symmetric tridiagonal matrix, and e_m is the m-th vector of</font>
+<a name="line347">347: </a><font color="#B22222">   the canonical basis. The tridiagonal is stored as two arrays: alpha</font>
+<a name="line348">348: </a><font color="#B22222">   contains the diagonal elements, beta the off-diagonal. On exit, the last</font>
+<a name="line349">349: </a><font color="#B22222">   element of beta contains the B-norm of V[m] before normalization.</font>
+<a name="line350">350: </a><font color="#B22222">*/</font>
+<a name="line351">351: </a><strong><font color="#4169E1"><a name="EPSFullLanczos"></a>PetscErrorCode EPSFullLanczos(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *M,PetscBool *breakdown)</font></strong>
+<a name="line352">352: </a>{
+<a name="line354">354: </a>  PetscInt       j,m = *M;
+<a name="line355">355: </a>  Vec            vj,vj1;
+<a name="line356">356: </a>  PetscScalar    *hwork,lhwork[100];
+
+<a name="line359">359: </a>  <font color="#4169E1">if</font> (m > 100) {
+<a name="line360">360: </a>    PetscMalloc1(m,&hwork);
+<a name="line361">361: </a>  } <font color="#4169E1">else</font> hwork = lhwork;
+
+<a name="line363">363: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
+<a name="line364">364: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line365">365: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
+<a name="line366">366: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
+<a name="line367">367: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
+<a name="line368">368: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
+<a name="line369">369: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
+<a name="line370">370: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,j+1,hwork,beta+j,breakdown);
+<a name="line371">371: </a>    alpha[j] = PetscRealPart(hwork[j]);
+<a name="line372">372: </a>    <font color="#4169E1">if</font> (*breakdown) {
+<a name="line373">373: </a>      *M = j+1;
+<a name="line374">374: </a>      <font color="#4169E1">break</font>;
+<a name="line375">375: </a>    } <font color="#4169E1">else</font> {
+<a name="line376">376: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/beta[j]);
+<a name="line377">377: </a>    }
+<a name="line378">378: </a>  }
+<a name="line379">379: </a>  <font color="#4169E1">if</font> (m > 100) {
+<a name="line380">380: </a>    PetscFree(hwork);
+<a name="line381">381: </a>  }
+<a name="line382">382: </a>  <font color="#4169E1">return</font>(0);
+<a name="line383">383: </a>}
+
+<a name="line387">387: </a><strong><font color="#4169E1"><a name="EPSPseudoLanczos"></a>PetscErrorCode EPSPseudoLanczos(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *alpha,PetscReal *beta,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscReal *cos,Vec w)</font></strong>
+<a name="line388">388: </a>{
+<a name="line390">390: </a>  PetscInt       j,m = *M,i,ld,l;
+<a name="line391">391: </a>  Vec            vj,vj1;
+<a name="line392">392: </a>  PetscScalar    *hwork,lhwork[100];
+<a name="line393">393: </a>  PetscReal      norm,norm1,norm2,t,*f,sym=0.0,fro=0.0;
+<a name="line394">394: </a>  PetscBLASInt   j_,one=1;
+
+<a name="line397">397: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line398">398: </a>  <a href="../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(eps->ds,NULL,NULL,&l,NULL,NULL);
+<a name="line399">399: </a>  <font color="#4169E1">if</font> (cos) *cos = 1.0;
+<a name="line400">400: </a>  <font color="#4169E1">if</font> (m > 100) {
+<a name="line401">401: </a>    PetscMalloc1(m,&hwork);
+<a name="line402">402: </a>  } <font color="#4169E1">else</font> hwork = lhwork;
+
+<a name="line404">404: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,m);
+<a name="line405">405: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line406">406: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j,&vj);
+<a name="line407">407: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
+<a name="line408">408: </a>    <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,vj,vj1);
+<a name="line409">409: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j,&vj);
+<a name="line410">410: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
+<a name="line411">411: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,j+1,hwork,&norm,breakdown);
+<a name="line412">412: </a>    alpha[j] = PetscRealPart(hwork[j]);
+<a name="line413">413: </a>    beta[j] = PetscAbsReal(norm);
+<a name="line414">414: </a>    <a href="../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&f);
+<a name="line415">415: </a>    <font color="#4169E1">if</font> (j==k) { 
+<a name="line416">416: </a>      <font color="#4169E1">for</font> (i=l;i<j-1;i++) hwork[i]-= f[2*ld+i];
+<a name="line417">417: </a>      <font color="#4169E1">for</font> (i=0;i<l;i++) hwork[i] = 0.0;
+<a name="line418">418: </a>    }
+<a name="line419">419: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&f);
+<a name="line420">420: </a>    hwork[j-1] -= beta[j-1];
+<a name="line421">421: </a>    PetscBLASIntCast(j,&j_);
+<a name="line422">422: </a>    sym = SlepcAbs(BLASnrm2_(&j_,hwork,&one),sym);
+<a name="line423">423: </a>    fro = SlepcAbs(fro,SlepcAbs(alpha[j],beta[j]));
+<a name="line424">424: </a>    <font color="#4169E1">if</font> (j>0) fro = SlepcAbs(fro,beta[j-1]);
+<a name="line425">425: </a>    <font color="#4169E1">if</font> (sym/fro>PetscMax(PETSC_SQRT_MACHINE_EPSILON,10*eps->tol)) { *symmlost = PETSC_TRUE; *M=j+1; <font color="#4169E1">break</font>; }
+<a name="line426">426: </a>    omega[j+1] = (norm<0.0)? -1.0: 1.0;
+<a name="line427">427: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,j+1,1.0/norm);
+<a name="line428">428: </a>    <font color="#B22222">/* */</font>
+<a name="line429">429: </a>    <font color="#4169E1">if</font> (cos) {
+<a name="line430">430: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,j+1,&vj1);
+<a name="line431">431: </a>      VecNorm(vj1,NORM_2,&norm1);
+<a name="line432">432: </a>      <a href="../../../../docs/manualpages/BV/BVApplyMatrix.html#BVApplyMatrix">BVApplyMatrix</a>(eps->V,vj1,w);
+<a name="line433">433: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,j+1,&vj1);
+<a name="line434">434: </a>      VecNorm(w,NORM_2,&norm2);
+<a name="line435">435: </a>      t = 1.0/(norm1*norm2);
+<a name="line436">436: </a>      <font color="#4169E1">if</font> (*cos>t) *cos = t;
+<a name="line437">437: </a>    }
+<a name="line438">438: </a>  }
+<a name="line439">439: </a>  <font color="#4169E1">if</font> (m > 100) {
+<a name="line440">440: </a>    PetscFree(hwork);
+<a name="line441">441: </a>  }
+<a name="line442">442: </a>  <font color="#4169E1">return</font>(0);
+<a name="line443">443: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/index.html b/src/eps/impls/krylov/index.html
index 48a34db..5356031 100644
--- a/src/eps/impls/krylov/index.html
+++ b/src/eps/impls/krylov/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/krylov/krylovschur/index.html b/src/eps/impls/krylov/krylovschur/index.html
index fbae1cb..91b8952 100644
--- a/src/eps/impls/krylov/krylovschur/index.html
+++ b/src/eps/impls/krylov/krylovschur/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/krylov/krylovschur/krylovschur.c b/src/eps/impls/krylov/krylovschur/krylovschur.c
index 838f435..0a28f95 100644
--- a/src/eps/impls/krylov/krylovschur/krylovschur.c
+++ b/src/eps/impls/krylov/krylovschur/krylovschur.c
@@ -22,7 +22,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -102,6 +102,7 @@ PetscErrorCode EPSSetUp_KrylovSchur(EPS eps)
     ierr = EPSSetExtraction(eps,EPS_RITZ);CHKERRQ(ierr);
   } else if (eps->extraction!=EPS_RITZ && eps->extraction!=EPS_HARMONIC)
     SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Unsupported extraction type");
+  if (eps->extraction==EPS_HARMONIC && ctx->lock) { ierr = PetscInfo(eps,"Locking was requested but will be deactivated since is not supported with harmonic extraction\n");CHKERRQ(ierr); }
 
   if (!ctx->keep) ctx->keep = 0.5;
 
@@ -150,6 +151,7 @@ PetscErrorCode EPSSetUp_KrylovSchur(EPS eps)
       ierr = DSAllocate(eps->ds,eps->ncv+1);CHKERRQ(ierr);
       break;
     case EPS_KS_SLICE:
+      if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Spectrum slicing does not support user-defined stopping test");
       eps->ops->solve = EPSSolve_KrylovSchur_Slice;
       eps->ops->computevectors = EPSComputeVectors_Slice;
       break;
@@ -223,8 +225,7 @@ PetscErrorCode EPSSolve_KrylovSchur_Default(EPS eps)
 
     /* Check convergence */
     ierr = EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,nv-eps->nconv,beta,gamma,&k);CHKERRQ(ierr);
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-    if (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
     nconv = k;
 
     /* Update l */
@@ -240,7 +241,7 @@ PetscErrorCode EPSSolve_KrylovSchur_Default(EPS eps)
       ierr = DSRestoreArray(eps->ds,DS_MAT_A,&S);CHKERRQ(ierr);
 #endif
     }
-    if (!ctx->lock && l>0) { l += k; k = 0; } /* non-locking variant: reset no. of converged pairs */
+    if ((!ctx->lock || harmonic) && l>0) { l += k; k = 0; } /* non-locking variant: reset no. of converged pairs */
 
     if (eps->reason == EPS_CONVERGED_ITERATING) {
       if (breakdown) {
@@ -377,7 +378,7 @@ PetscErrorCode EPSKrylovSchurGetRestart(EPS eps,PetscReal *keep)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(keep,2);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetRestart_C",(EPS,PetscReal*),(eps,keep));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetRestart_C",(EPS,PetscReal*),(eps,keep));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -464,7 +465,7 @@ PetscErrorCode EPSKrylovSchurGetLocking(EPS eps,PetscBool *lock)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(lock,2);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetLocking_C",(EPS,PetscBool*),(eps,lock));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetLocking_C",(EPS,PetscBool*),(eps,lock));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -568,7 +569,7 @@ PetscErrorCode EPSKrylovSchurGetPartitions(EPS eps,PetscInt *npart)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(npart,2);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetPartitions_C",(EPS,PetscInt*),(eps,npart));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetPartitions_C",(EPS,PetscInt*),(eps,npart));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -659,7 +660,7 @@ PetscErrorCode EPSKrylovSchurGetDetectZeros(EPS eps,PetscBool *detect)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(detect,2);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetDetectZeros_C",(EPS,PetscBool*),(eps,detect));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetDetectZeros_C",(EPS,PetscBool*),(eps,detect));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -764,7 +765,7 @@ PetscErrorCode EPSKrylovSchurGetDimensions(EPS eps,PetscInt *nev,PetscInt *ncv,P
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetDimensions_C",(EPS,PetscInt*,PetscInt*,PetscInt*),(eps,nev,ncv,mpd));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetDimensions_C",(EPS,PetscInt*,PetscInt*,PetscInt*),(eps,nev,ncv,mpd));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -875,7 +876,8 @@ PetscErrorCode EPSKrylovSchurGetSubintervals(EPS eps,PetscReal** subint)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetSubintervals_C",(EPS,PetscReal**),(eps,subint));CHKERRQ(ierr);
+  PetscValidPointer(subint,2);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetSubintervals_C",(EPS,PetscReal**),(eps,subint));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -962,7 +964,7 @@ PetscErrorCode EPSKrylovSchurGetInertias(EPS eps,PetscInt *n,PetscReal **shifts,
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidIntPointer(n,2);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetInertias_C",(EPS,PetscInt*,PetscReal**,PetscInt**),(eps,n,shifts,inertias));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetInertias_C",(EPS,PetscInt*,PetscReal**,PetscInt**),(eps,n,shifts,inertias));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -998,7 +1000,7 @@ static PetscErrorCode EPSKrylovSchurGetSubcommInfo_KrylovSchur(EPS eps,PetscInt
 .  eps - the eigenproblem solver context
 
    Output Parameters:
-+  k - number of the subinterval for the calling process
++  k - index of the subinterval for the calling process
 .  n - number of eigenvalues found in the k-th subinterval
 -  v - a vector owned by processes in the subcommunicator with dimensions
        compatible for locally computed eigenvectors (or NULL)
@@ -1018,7 +1020,7 @@ PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS eps,PetscInt *k,PetscInt *n,Vec
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetSubcommInfo_C",(EPS,PetscInt*,PetscInt*,Vec*),(eps,k,n,v));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetSubcommInfo_C",(EPS,PetscInt*,PetscInt*,Vec*),(eps,k,n,v));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1043,7 +1045,7 @@ static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(EPS eps,PetscInt
 #define __FUNCT__ "EPSKrylovSchurGetSubcommPairs"
 /*@C
    EPSKrylovSchurGetSubcommPairs - Gets the i-th eigenpair stored
-   internally in the multi-communicator to which the calling process belongs.
+   internally in the subcommunicator to which the calling process belongs.
 
    Collective on the subcommunicator (if v is given)
 
@@ -1065,7 +1067,7 @@ static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(EPS eps,PetscInt
 
    Level: advanced
 
-.seealso: EPSSetInterval(), EPSKrylovSchurSetPartitions(), EPSKrylovSchurGetSubcommInfo()
+.seealso: EPSSetInterval(), EPSKrylovSchurSetPartitions(), EPSKrylovSchurGetSubcommInfo(), EPSKrylovSchurGetSubcommMats()
 @*/
 PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS eps,PetscInt i,PetscScalar *eig,Vec v)
 {
@@ -1074,17 +1076,182 @@ PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS eps,PetscInt i,PetscScalar *eig
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   if (v) PetscValidLogicalCollectiveInt(v,i,2);
-  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetSubcommPairs_C",(EPS,PetscInt,PetscScalar*,Vec),(eps,i,eig,v));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSKrylovSchurGetSubcommPairs_C",(EPS,PetscInt,PetscScalar*,Vec),(eps,i,eig,v));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSKrylovSchurGetSubcommMats_KrylovSchur"
+static PetscErrorCode EPSKrylovSchurGetSubcommMats_KrylovSchur(EPS eps,Mat *A,Mat *B)
+{
+  PetscErrorCode  ierr;
+  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+  PetscFunctionBegin;
+  if (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,"Only available in interval computations, see EPSSetInterval()");
+  if (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,"Must call EPSSetUp() first");
+  ierr = EPSGetOperators(ctx->eps,A,B);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSKrylovSchurGetSubcommMats"
+/*@C
+   EPSKrylovSchurGetSubcommMats - Gets the eigenproblem matrices stored
+   internally in the subcommunicator to which the calling process belongs.
+
+   Collective on the subcommunicator
+
+   Input Parameter:
+.  eps - the eigenproblem solver context
+
+   Output Parameters:
++  A  - the matrix associated with the eigensystem
+-  B  - the second matrix in the case of generalized eigenproblems
+
+   Notes:
+   This is the analog of EPSGetOperators(), but returns the matrices distributed
+   differently (in the subcommunicator rather than in the parent communicator).
+
+   These matrices should not be modified by the user.
+
+   Level: advanced
+
+.seealso: EPSSetInterval(), EPSKrylovSchurSetPartitions(), EPSKrylovSchurGetSubcommInfo()
+@*/
+PetscErrorCode EPSKrylovSchurGetSubcommMats(EPS eps,Mat *A,Mat *B)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  ierr = PetscTryMethod(eps,"EPSKrylovSchurGetSubcommMats_C",(EPS,Mat*,Mat*),(eps,A,B));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSKrylovSchurUpdateSubcommMats_KrylovSchur"
+static PetscErrorCode EPSKrylovSchurUpdateSubcommMats_KrylovSchur(EPS eps,PetscScalar a,PetscScalar ap,Mat Au,PetscScalar b,PetscScalar bp, Mat Bu,MatStructure str,PetscBool globalup)
+{
+  PetscErrorCode  ierr;
+  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data,*subctx;
+  Mat             A,B=NULL,Ag,Bg=NULL;
+  PetscBool       reuse=PETSC_TRUE;
+   
+  PetscFunctionBegin;
+  if (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,"Only available in interval computations, see EPSSetInterval()");
+  if (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,"Must call EPSSetUp() first");
+  ierr = EPSGetOperators(eps,&Ag,&Bg);CHKERRQ(ierr);
+  ierr = EPSGetOperators(ctx->eps,&A,&B);CHKERRQ(ierr);
+  
+  ierr = MatScale(A,a);CHKERRQ(ierr);
+  if (Au) {
+    ierr = MatAXPY(A,ap,Au,str);CHKERRQ(ierr);
+  }
+  if (B) ierr = MatScale(B,b);CHKERRQ(ierr);
+  if (Bu) {
+    ierr = MatAXPY(B,bp,Bu,str);CHKERRQ(ierr);
+  }
+  ierr = EPSSetOperators(ctx->eps,A,B);CHKERRQ(ierr);
+
+  /* Update stored matrix state */
+  subctx = (EPS_KRYLOVSCHUR*)ctx->eps->data;
+  ierr = PetscObjectStateGet((PetscObject)A,&subctx->Astate);CHKERRQ(ierr);
+  if (B) { ierr = PetscObjectStateGet((PetscObject)B,&subctx->Bstate);CHKERRQ(ierr); }
+
+  /* Update matrices in the parent communicator if requested by user */
+  if (globalup) {
+    if (ctx->npart>1) {
+      if (!ctx->isrow) {
+        ierr = MatGetOwnershipIS(Ag,&ctx->isrow,&ctx->iscol);CHKERRQ(ierr);
+        reuse = PETSC_FALSE;
+      }
+      if (str==DIFFERENT_NONZERO_PATTERN) reuse = PETSC_FALSE;
+      if (ctx->submata && !reuse) {
+        ierr = MatDestroyMatrices(1,&ctx->submata);CHKERRQ(ierr);
+      }
+      ierr = MatGetSubMatrices(A,1,&ctx->isrow,&ctx->iscol,(reuse)?MAT_REUSE_MATRIX:MAT_INITIAL_MATRIX,&ctx->submata);CHKERRQ(ierr);
+      ierr = MatCreateMPIMatConcatenateSeqMat(((PetscObject)Ag)->comm,ctx->submata[0],PETSC_DECIDE,MAT_REUSE_MATRIX,&Ag);CHKERRQ(ierr);
+      if (B) {
+        if (ctx->submatb && !reuse) {
+          ierr = MatDestroyMatrices(1,&ctx->submatb);CHKERRQ(ierr);
+        }
+        ierr = MatGetSubMatrices(B,1,&ctx->isrow,&ctx->iscol,(reuse)?MAT_REUSE_MATRIX:MAT_INITIAL_MATRIX,&ctx->submatb);CHKERRQ(ierr);
+        ierr = MatCreateMPIMatConcatenateSeqMat(((PetscObject)Bg)->comm,ctx->submatb[0],PETSC_DECIDE,MAT_REUSE_MATRIX,&Bg);CHKERRQ(ierr);
+      }
+    }
+    ierr = PetscObjectStateGet((PetscObject)Ag,&ctx->Astate);CHKERRQ(ierr);
+    if (Bg) { ierr = PetscObjectStateGet((PetscObject)Bg,&ctx->Bstate);CHKERRQ(ierr); }
+  }
+  ierr = EPSSetOperators(eps,Ag,Bg);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSKrylovSchurUpdateSubcommMats"
+/*@C
+   EPSKrylovSchurUpdateSubcommMats - Update the eigenproblem matrices stored
+   internally in the subcommunicator to which the calling process belongs.
+
+   Collective on EPS
+
+   Input Parameters:
++  eps - the eigenproblem solver context
+.  s   - scalar that multiplies the existing A matrix
+.  a   - scalar used in the axpy operation on A
+.  Au  - matrix used in the axpy operation on A
+.  t   - scalar that multiplies the existing B matrix
+.  b   - scalar used in the axpy operation on B
+.  Bu  - matrix used in the axpy operation on B
+.  str - structure flag
+-  globalup - flag indicating if global matrices must be updated
+
+   Notes:
+   This function modifies the eigenproblem matrices at the subcommunicator level,
+   and optionally updates the global matrices in the parent communicator. The updates
+   are expressed as A <-- s*A + a*Au,  B <-- t*B + b*Bu.
+
+   It is possible to update one of the matrices, or both.
+
+   The matrices Au and Bu must be equal in all subcommunicators.
+
+   The str flag is passed to the MatAXPY() operations to perform the updates.
+
+   If globalup is true, communication is carried out to reconstruct the updated
+   matrices in the parent communicator. The user must be warned that if global
+   matrices are not in sync with subcommunicator matrices, the errors computed
+   by EPSComputeError() will be wrong even if the computed solution is correct
+   (the synchronization may be done only once at the end).
+
+   Level: advanced
+
+.seealso: EPSSetInterval(), EPSKrylovSchurSetPartitions(), EPSKrylovSchurGetSubcommMats()
+@*/
+PetscErrorCode EPSKrylovSchurUpdateSubcommMats(EPS eps,PetscScalar s,PetscScalar a,Mat Au,PetscScalar t,PetscScalar b, Mat Bu,MatStructure str,PetscBool globalup)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidLogicalCollectiveScalar(eps,s,2);
+  PetscValidLogicalCollectiveScalar(eps,a,3);
+  if (Au) PetscValidHeaderSpecific(Au,MAT_CLASSID,4);
+  PetscValidLogicalCollectiveScalar(eps,t,5);
+  PetscValidLogicalCollectiveScalar(eps,b,6);
+  if (Bu) PetscValidHeaderSpecific(Bu,MAT_CLASSID,7);
+  PetscValidLogicalCollectiveEnum(eps,str,8);
+  PetscValidLogicalCollectiveBool(eps,globalup,9);
+  ierr = PetscTryMethod(eps,"EPSKrylovSchurUpdateSubcommMats_C",(EPS,PetscScalar,PetscScalar,Mat,PetscScalar,PetscScalar,Mat,MatStructure,PetscBool),(eps,s,a,Au,t,b,Bu,str,globalup));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_KrylovSchur"
-PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode  ierr;
   EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-  PetscBool       flg,lock,b;
+  PetscBool       flg,lock,b,f1,f2,f3;
   PetscReal       keep;
   PetscInt        i,j,k;
 
@@ -1110,10 +1277,12 @@ PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptions *PetscOptionsObject,EP
   }
   i = 1;
   j = k = PETSC_DECIDE;
-  ierr = PetscOptionsInt("-eps_krylovschur_nev","Number of eigenvalues to compute in each subsolve (only for spectrum slicing)","EPSKrylovSchurSetDimensions",40,&i,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsInt("-eps_krylovschur_ncv","Number of basis vectors in each subsolve (only for spectrum slicing)","EPSKrylovSchurSetDimensions",80,&j,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsInt("-eps_krylovschur_mpd","Maximum dimension of projected problem in each subsolve (only for spectrum slicing)","EPSKrylovSchurSetDimensions",80,&k,NULL);CHKERRQ(ierr);
-  ierr = EPSKrylovSchurSetDimensions(eps,i,j,k);CHKERRQ(ierr);
+  ierr = PetscOptionsInt("-eps_krylovschur_nev","Number of eigenvalues to compute in each subsolve (only for spectrum slicing)","EPSKrylovSchurSetDimensions",40,&i,&f1);CHKERRQ(ierr);
+  ierr = PetscOptionsInt("-eps_krylovschur_ncv","Number of basis vectors in each subsolve (only for spectrum slicing)","EPSKrylovSchurSetDimensions",80,&j,&f2);CHKERRQ(ierr);
+  ierr = PetscOptionsInt("-eps_krylovschur_mpd","Maximum dimension of projected problem in each subsolve (only for spectrum slicing)","EPSKrylovSchurSetDimensions",80,&k,&f3);CHKERRQ(ierr);
+  if (f1 || f2 || f3) {
+    ierr = EPSKrylovSchurSetDimensions(eps,i,j,k);CHKERRQ(ierr);
+  }
   ierr = PetscOptionsTail();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -1134,7 +1303,7 @@ PetscErrorCode EPSView_KrylovSchur(EPS eps,PetscViewer viewer)
     if (eps->which==EPS_ALL) {
       ierr = PetscViewerASCIIPrintf(viewer,"  Krylov-Schur: doing spectrum slicing with nev=%D, ncv=%D, mpd=%D\n",ctx->nev,ctx->ncv,ctx->mpd);CHKERRQ(ierr);
       if (ctx->npart>1) {
-        ierr = PetscViewerASCIIPrintf(viewer,"  Krylov-Schur: multi-communicator spectrum slicing with %d partitions\n",ctx->npart);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIPrintf(viewer,"  Krylov-Schur: multi-communicator spectrum slicing with %D partitions\n",ctx->npart);CHKERRQ(ierr);
         if (ctx->detect) { ierr = PetscViewerASCIIPrintf(viewer,"  Krylov-Schur: detecting zeros when factorizing at subinterval boundaries\n");CHKERRQ(ierr); }
       }
     }
@@ -1165,6 +1334,8 @@ PetscErrorCode EPSDestroy_KrylovSchur(EPS eps)
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetInertias_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetSubcommInfo_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetSubcommPairs_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetSubcommMats_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurUpdateSubcommMats_C",NULL);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1217,6 +1388,8 @@ PETSC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(EPS eps)
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetInertias_C",EPSKrylovSchurGetInertias_KrylovSchur);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetSubcommInfo_C",EPSKrylovSchurGetSubcommInfo_KrylovSchur);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetSubcommPairs_C",EPSKrylovSchurGetSubcommPairs_KrylovSchur);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurGetSubcommMats_C",EPSKrylovSchurGetSubcommMats_KrylovSchur);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)eps,"EPSKrylovSchurUpdateSubcommMats_C",EPSKrylovSchurUpdateSubcommMats_KrylovSchur);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/krylov/krylovschur/krylovschur.c.html b/src/eps/impls/krylov/krylovschur/krylovschur.c.html
index 7dd28e8..42d1a3a 100644
--- a/src/eps/impls/krylov/krylovschur/krylovschur.c.html
+++ b/src/eps/impls/krylov/krylovschur/krylovschur.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/krylovschur/krylovschur.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:55+00:00">
+<meta name="date" content="2016-05-16T10:32:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/krylovschur.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/krylovschur.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "krylovschur"</font>
@@ -34,7 +34,7 @@
 
 <a name="line23"> 23: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line24"> 24: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line25"> 25: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line25"> 25: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line27"> 27: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -107,970 +107,1118 @@
 <a name="line102">102: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_RITZ);
 <a name="line103">103: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->extraction!=EPS_RITZ && eps->extraction!=EPS_HARMONIC)
 <a name="line104">104: </a>    SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
+<a name="line105">105: </a>  <font color="#4169E1">if</font> (eps->extraction==EPS_HARMONIC && ctx->lock) { PetscInfo(eps,<font color="#666666">"Locking was requested but will be deactivated since is not supported with harmonic extraction\n"</font>); }
+
+<a name="line107">107: </a>  <font color="#4169E1">if</font> (!ctx->keep) ctx->keep = 0.5;
+
+<a name="line109">109: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,1);
+<a name="line110">110: </a>  EPS_SetInnerProduct(eps);
+<a name="line111">111: </a>  <font color="#4169E1">if</font> (eps->arbitrary) {
+<a name="line112">112: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,2);
+<a name="line113">113: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->ishermitian && !eps->ispositive){
+<a name="line114">114: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,1);
+<a name="line115">115: </a>  }
+
+<a name="line117">117: </a>  <font color="#B22222">/* dispatch solve method */</font>
+<a name="line118">118: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line119">119: </a>    <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
+<a name="line120">120: </a>      <font color="#4169E1">if</font> (eps->isgeneralized && !eps->ispositive) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectrum slicing not implemented for indefinite problems"</font>);
+<a name="line121">121: </a>      <font color="#4169E1">else</font> variant = EPS_KS_SLICE;
+<a name="line122">122: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->isgeneralized && !eps->ispositive) {
+<a name="line123">123: </a>      variant = EPS_KS_INDEF;
+<a name="line124">124: </a>    } <font color="#4169E1">else</font> {
+<a name="line125">125: </a>      <font color="#4169E1">switch</font> (eps->extraction) {
+<a name="line126">126: </a>        <font color="#4169E1">case</font> EPS_RITZ:     variant = EPS_KS_SYMM; <font color="#4169E1">break</font>;
+<a name="line127">127: </a>        <font color="#4169E1">case</font> EPS_HARMONIC: variant = EPS_KS_DEFAULT; <font color="#4169E1">break</font>;
+<a name="line128">128: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
+<a name="line129">129: </a>      }
+<a name="line130">130: </a>    }
+<a name="line131">131: </a>  } <font color="#4169E1">else</font> {
+<a name="line132">132: </a>    <font color="#4169E1">switch</font> (eps->extraction) {
+<a name="line133">133: </a>      <font color="#4169E1">case</font> EPS_RITZ:     variant = EPS_KS_DEFAULT; <font color="#4169E1">break</font>;
+<a name="line134">134: </a>      <font color="#4169E1">case</font> EPS_HARMONIC: variant = EPS_KS_DEFAULT; <font color="#4169E1">break</font>;
+<a name="line135">135: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
+<a name="line136">136: </a>    }
+<a name="line137">137: </a>  }
+<a name="line138">138: </a>  <font color="#4169E1">switch</font> (variant) {
+<a name="line139">139: </a>    <font color="#4169E1">case</font> EPS_KS_DEFAULT:
+<a name="line140">140: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Default;
+<a name="line141">141: </a>      eps->ops->computevectors = EPSComputeVectors_Schur;
+<a name="line142">142: </a>      <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSNHEP);
+<a name="line143">143: </a>      <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv+1);
+<a name="line144">144: </a>      <font color="#4169E1">break</font>;
+<a name="line145">145: </a>    <font color="#4169E1">case</font> EPS_KS_SYMM:
+<a name="line146">146: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Symm;
+<a name="line147">147: </a>      eps->ops->computevectors = EPSComputeVectors_Hermitian;
+<a name="line148">148: </a>      <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSHEP);
+<a name="line149">149: </a>      <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
+<a name="line150">150: </a>      <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(eps->ds,PETSC_TRUE);
+<a name="line151">151: </a>      <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv+1);
+<a name="line152">152: </a>      <font color="#4169E1">break</font>;
+<a name="line153">153: </a>    <font color="#4169E1">case</font> EPS_KS_SLICE:
+<a name="line154">154: </a>      <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectrum slicing does not support user-defined stopping test"</font>);
+<a name="line155">155: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Slice;
+<a name="line156">156: </a>      eps->ops->computevectors = EPSComputeVectors_Slice;
+<a name="line157">157: </a>      <font color="#4169E1">break</font>;
+<a name="line158">158: </a>    <font color="#4169E1">case</font> EPS_KS_INDEF:
+<a name="line159">159: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Indefinite;
+<a name="line160">160: </a>      eps->ops->computevectors = EPSComputeVectors_Indefinite;
+<a name="line161">161: </a>      <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHIEP);
+<a name="line162">162: </a>      <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
+<a name="line163">163: </a>      <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv+1);
+<a name="line164">164: </a>      <font color="#B22222">/* force reorthogonalization for pseudo-Lanczos */</font>
+<a name="line165">165: </a>      <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(eps->V,&otype,NULL,&eta,&obtype);
+<a name="line166">166: </a>      <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(eps->V,otype,BV_ORTHOG_REFINE_ALWAYS,eta,obtype);
+<a name="line167">167: </a>      <font color="#4169E1">break</font>;
+<a name="line168">168: </a><strong><font color="#FF0000">    default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unexpected error"</font>);
+<a name="line169">169: </a>  }
+<a name="line170">170: </a>  <font color="#4169E1">return</font>(0);
+<a name="line171">171: </a>}
+
+<a name="line175">175: </a><strong><font color="#4169E1"><a name="EPSSolve_KrylovSchur_Default"></a>PetscErrorCode EPSSolve_KrylovSchur_Default(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line176">176: </a>{
+<a name="line177">177: </a>  PetscErrorCode  ierr;
+<a name="line178">178: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line179">179: </a>  PetscInt        i,j,*pj,k,l,nv,ld,nconv;
+<a name="line180">180: </a>  Mat             U;
+<a name="line181">181: </a>  PetscScalar     *S,*Q,*g;
+<a name="line182">182: </a>  PetscReal       beta,gamma=1.0;
+<a name="line183">183: </a>  PetscBool       breakdown,harmonic;
+
+<a name="line186">186: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line187">187: </a>  harmonic = (eps->extraction==EPS_HARMONIC || eps->extraction==EPS_REFINED_HARMONIC)?PETSC_TRUE:PETSC_FALSE;
+<a name="line188">188: </a>  <font color="#4169E1">if</font> (harmonic) { PetscMalloc1(ld,&g); }
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (eps->arbitrary) pj = &j;
+<a name="line190">190: </a>  <font color="#4169E1">else</font> pj = NULL;
+
+<a name="line192">192: </a>  <font color="#B22222">/* Get the starting Arnoldi vector */</font>
+<a name="line193">193: </a>  EPSGetStartVector(eps,0,NULL);
+<a name="line194">194: </a>  l = 0;
+
+<a name="line196">196: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line197">197: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line198">198: </a>    eps->its++;
+
+<a name="line200">200: </a>    <font color="#B22222">/* Compute an nv-step Arnoldi factorization */</font>
+<a name="line201">201: </a>    nv = PetscMin(eps->nconv+eps->mpd,eps->ncv);
+<a name="line202">202: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&S);
+<a name="line203">203: </a>    EPSBasicArnoldi(eps,PETSC_FALSE,S,ld,eps->nconv+l,&nv,&beta,&breakdown);
+<a name="line204">204: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&S);
+<a name="line205">205: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,eps->nconv,eps->nconv+l);
+<a name="line206">206: </a>    <font color="#4169E1">if</font> (l==0) {
+<a name="line207">207: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_INTERMEDIATE);
+<a name="line208">208: </a>    } <font color="#4169E1">else</font> {
+<a name="line209">209: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line210">210: </a>    }
+<a name="line211">211: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,nv);
+
+<a name="line213">213: </a>    <font color="#B22222">/* Compute translation of Krylov decomposition if harmonic extraction used */</font>
+<a name="line214">214: </a>    <font color="#4169E1">if</font> (harmonic) {
+<a name="line215">215: </a>      <a href="../../../../../docs/manualpages/DS/DSTranslateHarmonic.html#DSTranslateHarmonic">DSTranslateHarmonic</a>(eps->ds,eps->target,beta,PETSC_FALSE,g,&gamma);
+<a name="line216">216: </a>    }
+
+<a name="line218">218: </a>    <font color="#B22222">/* Solve projected problem */</font>
+<a name="line219">219: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
+<a name="line220">220: </a>    <font color="#4169E1">if</font> (eps->arbitrary) {
+<a name="line221">221: </a>      EPSGetArbitraryValues(eps,eps->rr,eps->ri);
+<a name="line222">222: </a>      j=1;
+<a name="line223">223: </a>    }
+<a name="line224">224: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,eps->rr,eps->ri,pj);
+
+<a name="line226">226: </a>    <font color="#B22222">/* Check convergence */</font>
+<a name="line227">227: </a>    EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,nv-eps->nconv,beta,gamma,&k);
+<a name="line228">228: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line229">229: </a>    nconv = k;
+
+<a name="line231">231: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line232">232: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line233">233: </a>    <font color="#4169E1">else</font> {
+<a name="line234">234: </a>      l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line235">235: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line236">236: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&S);
+<a name="line237">237: </a>      <font color="#4169E1">if</font> (S[k+l+(k+l-1)*ld] != 0.0) {
+<a name="line238">238: </a>        <font color="#4169E1">if</font> (k+l<nv-1) l = l+1;
+<a name="line239">239: </a>        <font color="#4169E1">else</font> l = l-1;
+<a name="line240">240: </a>      }
+<a name="line241">241: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&S);
+<a name="line242">242: </a><font color="#A020F0">#endif</font>
+<a name="line243">243: </a>    }
+<a name="line244">244: </a>    <font color="#4169E1">if</font> ((!ctx->lock || harmonic) && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+
+<a name="line246">246: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line247">247: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line248">248: </a>        <font color="#B22222">/* Start a new Arnoldi factorization */</font>
+<a name="line249">249: </a>        PetscInfo2(eps,<font color="#666666">"Breakdown in Krylov-Schur method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
+<a name="line250">250: </a>        <font color="#4169E1">if</font> (k<eps->nev) {
+<a name="line251">251: </a>          EPSGetStartVector(eps,k,&breakdown);
+<a name="line252">252: </a>          <font color="#4169E1">if</font> (breakdown) {
+<a name="line253">253: </a>            eps->reason = EPS_DIVERGED_BREAKDOWN;
+<a name="line254">254: </a>            PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
+<a name="line255">255: </a>          }
+<a name="line256">256: </a>        }
+<a name="line257">257: </a>      } <font color="#4169E1">else</font> {
+<a name="line258">258: </a>        <font color="#B22222">/* Undo translation of Krylov decomposition */</font>
+<a name="line259">259: </a>        <font color="#4169E1">if</font> (harmonic) {
+<a name="line260">260: </a>          <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,k,l);
+<a name="line261">261: </a>          <a href="../../../../../docs/manualpages/DS/DSTranslateHarmonic.html#DSTranslateHarmonic">DSTranslateHarmonic</a>(eps->ds,0.0,beta,PETSC_TRUE,g,&gamma);
+<a name="line262">262: </a>          <font color="#B22222">/* gamma u^ = u - U*g~ */</font>
+<a name="line263">263: </a>          <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,nv,g);
+<a name="line264">264: </a>          <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,nv,1.0/gamma);
+<a name="line265">265: </a>        }
+<a name="line266">266: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line267">267: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&S);
+<a name="line268">268: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line269">269: </a>        <font color="#4169E1">for</font> (i=k;i<k+l;i++) {
+<a name="line270">270: </a>          S[k+l+i*ld] = Q[nv-1+i*ld]*beta*gamma;
+<a name="line271">271: </a>        }
+<a name="line272">272: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&S);
+<a name="line273">273: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line274">274: </a>      }
+<a name="line275">275: </a>    }
+<a name="line276">276: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line277">277: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
+<a name="line278">278: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
+<a name="line279">279: </a>    MatDestroy(&U);
+
+<a name="line281">281: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
+<a name="line282">282: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
+<a name="line283">283: </a>    }
+<a name="line284">284: </a>    eps->nconv = k;
+<a name="line285">285: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,nv);
+<a name="line286">286: </a>  }
+
+<a name="line288">288: </a>  <font color="#4169E1">if</font> (harmonic) { PetscFree(g); }
+<a name="line289">289: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
+<a name="line290">290: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line291">291: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
+<a name="line292">292: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line293">293: </a>  <font color="#4169E1">return</font>(0);
+<a name="line294">294: </a>}
+
+<a name="line298">298: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetRestart_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetRestart_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal keep)</font></strong>
+<a name="line299">299: </a>{
+<a name="line300">300: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line303">303: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
+<a name="line304">304: </a>  <font color="#4169E1">else</font> {
+<a name="line305">305: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
+<a name="line306">306: </a>    ctx->keep = keep;
+<a name="line307">307: </a>  }
+<a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
+<a name="line309">309: </a>}
+
+<a name="line313">313: </a><font color="#B22222">/*@</font>
+<a name="line314">314: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a> - Sets the restart parameter for the Krylov-Schur</font>
+<a name="line315">315: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
+<a name="line316">316: </a><font color="#B22222">   after restart.</font>
+
+<a name="line318">318: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line320">320: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line321">321: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line322">322: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
+
+<a name="line324">324: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line325">325: </a><font color="#B22222">.  -eps_krylovschur_restart - Sets the restart parameter</font>
+
+<a name="line327">327: </a><font color="#B22222">   Notes:</font>
+<a name="line328">328: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
+
+<a name="line330">330: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line332">332: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a>()</font>
+<a name="line333">333: </a><font color="#B22222">@*/</font>
+<a name="line334">334: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal keep)</font></strong>
+<a name="line335">335: </a>{
+
+<a name="line341">341: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal),(eps,keep));
+<a name="line342">342: </a>  <font color="#4169E1">return</font>(0);
+<a name="line343">343: </a>}
+
+<a name="line347">347: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetRestart_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetRestart_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *keep)</font></strong>
+<a name="line348">348: </a>{
+<a name="line349">349: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line352">352: </a>  *keep = ctx->keep;
+<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
+<a name="line354">354: </a>}
+
+<a name="line358">358: </a><font color="#B22222">/*@</font>
+<a name="line359">359: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a> - Gets the restart parameter used in the</font>
+<a name="line360">360: </a><font color="#B22222">   Krylov-Schur method.</font>
+
+<a name="line362">362: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line364">364: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line365">365: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line367">367: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line368">368: </a><font color="#B22222">.  keep - the restart parameter</font>
+
+<a name="line370">370: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line372">372: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>()</font>
+<a name="line373">373: </a><font color="#B22222">@*/</font>
+<a name="line374">374: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *keep)</font></strong>
+<a name="line375">375: </a>{
+
+<a name="line381">381: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,keep));
+<a name="line382">382: </a>  <font color="#4169E1">return</font>(0);
+<a name="line383">383: </a>}
+
+<a name="line387">387: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetLocking_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetLocking_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
+<a name="line388">388: </a>{
+<a name="line389">389: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line392">392: </a>  ctx->lock = lock;
+<a name="line393">393: </a>  <font color="#4169E1">return</font>(0);
+<a name="line394">394: </a>}
+
+<a name="line398">398: </a><font color="#B22222">/*@</font>
+<a name="line399">399: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a> - Choose between locking and non-locking variants of</font>
+<a name="line400">400: </a><font color="#B22222">   the Krylov-Schur method.</font>
+
+<a name="line402">402: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line404">404: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line405">405: </a><font color="#B22222">+  eps  - the eigenproblem solver context</font>
+<a name="line406">406: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
+
+<a name="line408">408: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line409">409: </a><font color="#B22222">.  -eps_krylovschur_locking - Sets the locking flag</font>
 
-<a name="line106">106: </a>  <font color="#4169E1">if</font> (!ctx->keep) ctx->keep = 0.5;
-
-<a name="line108">108: </a>  <a href="../../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,1);
-<a name="line109">109: </a>  EPS_SetInnerProduct(eps);
-<a name="line110">110: </a>  <font color="#4169E1">if</font> (eps->arbitrary) {
-<a name="line111">111: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,2);
-<a name="line112">112: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->ishermitian && !eps->ispositive){
-<a name="line113">113: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,1);
-<a name="line114">114: </a>  }
-
-<a name="line116">116: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line117">117: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line118">118: </a>    <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
-<a name="line119">119: </a>      <font color="#4169E1">if</font> (eps->isgeneralized && !eps->ispositive) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectrum slicing not implemented for indefinite problems"</font>);
-<a name="line120">120: </a>      <font color="#4169E1">else</font> variant = EPS_KS_SLICE;
-<a name="line121">121: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->isgeneralized && !eps->ispositive) {
-<a name="line122">122: </a>      variant = EPS_KS_INDEF;
-<a name="line123">123: </a>    } <font color="#4169E1">else</font> {
-<a name="line124">124: </a>      <font color="#4169E1">switch</font> (eps->extraction) {
-<a name="line125">125: </a>        <font color="#4169E1">case</font> EPS_RITZ:     variant = EPS_KS_SYMM; <font color="#4169E1">break</font>;
-<a name="line126">126: </a>        <font color="#4169E1">case</font> EPS_HARMONIC: variant = EPS_KS_DEFAULT; <font color="#4169E1">break</font>;
-<a name="line127">127: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
-<a name="line128">128: </a>      }
-<a name="line129">129: </a>    }
-<a name="line130">130: </a>  } <font color="#4169E1">else</font> {
-<a name="line131">131: </a>    <font color="#4169E1">switch</font> (eps->extraction) {
-<a name="line132">132: </a>      <font color="#4169E1">case</font> EPS_RITZ:     variant = EPS_KS_DEFAULT; <font color="#4169E1">break</font>;
-<a name="line133">133: </a>      <font color="#4169E1">case</font> EPS_HARMONIC: variant = EPS_KS_DEFAULT; <font color="#4169E1">break</font>;
-<a name="line134">134: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Unsupported extraction type"</font>);
-<a name="line135">135: </a>    }
-<a name="line136">136: </a>  }
-<a name="line137">137: </a>  <font color="#4169E1">switch</font> (variant) {
-<a name="line138">138: </a>    <font color="#4169E1">case</font> EPS_KS_DEFAULT:
-<a name="line139">139: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Default;
-<a name="line140">140: </a>      eps->ops->computevectors = EPSComputeVectors_Schur;
-<a name="line141">141: </a>      <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSNHEP);
-<a name="line142">142: </a>      <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv+1);
-<a name="line143">143: </a>      <font color="#4169E1">break</font>;
-<a name="line144">144: </a>    <font color="#4169E1">case</font> EPS_KS_SYMM:
-<a name="line145">145: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Symm;
-<a name="line146">146: </a>      eps->ops->computevectors = EPSComputeVectors_Hermitian;
-<a name="line147">147: </a>      <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSHEP);
-<a name="line148">148: </a>      <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
-<a name="line149">149: </a>      <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(eps->ds,PETSC_TRUE);
-<a name="line150">150: </a>      <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv+1);
-<a name="line151">151: </a>      <font color="#4169E1">break</font>;
-<a name="line152">152: </a>    <font color="#4169E1">case</font> EPS_KS_SLICE:
-<a name="line153">153: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Slice;
-<a name="line154">154: </a>      eps->ops->computevectors = EPSComputeVectors_Slice;
-<a name="line155">155: </a>      <font color="#4169E1">break</font>;
-<a name="line156">156: </a>    <font color="#4169E1">case</font> EPS_KS_INDEF:
-<a name="line157">157: </a>      eps->ops->solve = EPSSolve_KrylovSchur_Indefinite;
-<a name="line158">158: </a>      eps->ops->computevectors = EPSComputeVectors_Indefinite;
-<a name="line159">159: </a>      <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHIEP);
-<a name="line160">160: </a>      <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
-<a name="line161">161: </a>      <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv+1);
-<a name="line162">162: </a>      <font color="#B22222">/* force reorthogonalization for pseudo-Lanczos */</font>
-<a name="line163">163: </a>      <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(eps->V,&otype,NULL,&eta,&obtype);
-<a name="line164">164: </a>      <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(eps->V,otype,BV_ORTHOG_REFINE_ALWAYS,eta,obtype);
-<a name="line165">165: </a>      <font color="#4169E1">break</font>;
-<a name="line166">166: </a><strong><font color="#FF0000">    default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unexpected error"</font>);
-<a name="line167">167: </a>  }
-<a name="line168">168: </a>  <font color="#4169E1">return</font>(0);
-<a name="line169">169: </a>}
-
-<a name="line173">173: </a><strong><font color="#4169E1"><a name="EPSSolve_KrylovSchur_Default"></a>PetscErrorCode EPSSolve_KrylovSchur_Default(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line174">174: </a>{
-<a name="line175">175: </a>  PetscErrorCode  ierr;
-<a name="line176">176: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line177">177: </a>  PetscInt        i,j,*pj,k,l,nv,ld,nconv;
-<a name="line178">178: </a>  Mat             U;
-<a name="line179">179: </a>  PetscScalar     *S,*Q,*g;
-<a name="line180">180: </a>  PetscReal       beta,gamma=1.0;
-<a name="line181">181: </a>  PetscBool       breakdown,harmonic;
-
-<a name="line184">184: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line185">185: </a>  harmonic = (eps->extraction==EPS_HARMONIC || eps->extraction==EPS_REFINED_HARMONIC)?PETSC_TRUE:PETSC_FALSE;
-<a name="line186">186: </a>  <font color="#4169E1">if</font> (harmonic) { PetscMalloc1(ld,&g); }
-<a name="line187">187: </a>  <font color="#4169E1">if</font> (eps->arbitrary) pj = &j;
-<a name="line188">188: </a>  <font color="#4169E1">else</font> pj = NULL;
-
-<a name="line190">190: </a>  <font color="#B22222">/* Get the starting Arnoldi vector */</font>
-<a name="line191">191: </a>  EPSGetStartVector(eps,0,NULL);
-<a name="line192">192: </a>  l = 0;
-
-<a name="line194">194: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line195">195: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-<a name="line196">196: </a>    eps->its++;
-
-<a name="line198">198: </a>    <font color="#B22222">/* Compute an nv-step Arnoldi factorization */</font>
-<a name="line199">199: </a>    nv = PetscMin(eps->nconv+eps->mpd,eps->ncv);
-<a name="line200">200: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&S);
-<a name="line201">201: </a>    EPSBasicArnoldi(eps,PETSC_FALSE,S,ld,eps->nconv+l,&nv,&beta,&breakdown);
-<a name="line202">202: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&S);
-<a name="line203">203: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,eps->nconv,eps->nconv+l);
-<a name="line204">204: </a>    <font color="#4169E1">if</font> (l==0) {
-<a name="line205">205: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_INTERMEDIATE);
-<a name="line206">206: </a>    } <font color="#4169E1">else</font> {
-<a name="line207">207: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line208">208: </a>    }
-<a name="line209">209: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,nv);
-
-<a name="line211">211: </a>    <font color="#B22222">/* Compute translation of Krylov decomposition if harmonic extraction used */</font>
-<a name="line212">212: </a>    <font color="#4169E1">if</font> (harmonic) {
-<a name="line213">213: </a>      <a href="../../../../../docs/manualpages/DS/DSTranslateHarmonic.html#DSTranslateHarmonic">DSTranslateHarmonic</a>(eps->ds,eps->target,beta,PETSC_FALSE,g,&gamma);
-<a name="line214">214: </a>    }
-
-<a name="line216">216: </a>    <font color="#B22222">/* Solve projected problem */</font>
-<a name="line217">217: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
-<a name="line218">218: </a>    <font color="#4169E1">if</font> (eps->arbitrary) {
-<a name="line219">219: </a>      EPSGetArbitraryValues(eps,eps->rr,eps->ri);
-<a name="line220">220: </a>      j=1;
-<a name="line221">221: </a>    }
-<a name="line222">222: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,eps->rr,eps->ri,pj);
-
-<a name="line224">224: </a>    <font color="#B22222">/* Check convergence */</font>
-<a name="line225">225: </a>    EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,nv-eps->nconv,beta,gamma,&k);
-<a name="line226">226: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line227">227: </a>    <font color="#4169E1">if</font> (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line228">228: </a>    nconv = k;
-
-<a name="line230">230: </a>    <font color="#B22222">/* Update l */</font>
-<a name="line231">231: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || breakdown) l = 0;
-<a name="line232">232: </a>    <font color="#4169E1">else</font> {
-<a name="line233">233: </a>      l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
-<a name="line234">234: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line235">235: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&S);
-<a name="line236">236: </a>      <font color="#4169E1">if</font> (S[k+l+(k+l-1)*ld] != 0.0) {
-<a name="line237">237: </a>        <font color="#4169E1">if</font> (k+l<nv-1) l = l+1;
-<a name="line238">238: </a>        <font color="#4169E1">else</font> l = l-1;
-<a name="line239">239: </a>      }
-<a name="line240">240: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&S);
-<a name="line241">241: </a><font color="#A020F0">#endif</font>
-<a name="line242">242: </a>    }
-<a name="line243">243: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-
-<a name="line245">245: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-<a name="line246">246: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line247">247: </a>        <font color="#B22222">/* Start a new Arnoldi factorization */</font>
-<a name="line248">248: </a>        PetscInfo2(eps,<font color="#666666">"Breakdown in Krylov-Schur method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
-<a name="line249">249: </a>        <font color="#4169E1">if</font> (k<eps->nev) {
-<a name="line250">250: </a>          EPSGetStartVector(eps,k,&breakdown);
-<a name="line251">251: </a>          <font color="#4169E1">if</font> (breakdown) {
-<a name="line252">252: </a>            eps->reason = EPS_DIVERGED_BREAKDOWN;
-<a name="line253">253: </a>            PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
-<a name="line254">254: </a>          }
-<a name="line255">255: </a>        }
-<a name="line256">256: </a>      } <font color="#4169E1">else</font> {
-<a name="line257">257: </a>        <font color="#B22222">/* Undo translation of Krylov decomposition */</font>
-<a name="line258">258: </a>        <font color="#4169E1">if</font> (harmonic) {
-<a name="line259">259: </a>          <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,k,l);
-<a name="line260">260: </a>          <a href="../../../../../docs/manualpages/DS/DSTranslateHarmonic.html#DSTranslateHarmonic">DSTranslateHarmonic</a>(eps->ds,0.0,beta,PETSC_TRUE,g,&gamma);
-<a name="line261">261: </a>          <font color="#B22222">/* gamma u^ = u - U*g~ */</font>
-<a name="line262">262: </a>          <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(eps->V,-1.0,1.0,nv,g);
-<a name="line263">263: </a>          <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,nv,1.0/gamma);
-<a name="line264">264: </a>        }
-<a name="line265">265: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
-<a name="line266">266: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&S);
-<a name="line267">267: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line268">268: </a>        <font color="#4169E1">for</font> (i=k;i<k+l;i++) {
-<a name="line269">269: </a>          S[k+l+i*ld] = Q[nv-1+i*ld]*beta*gamma;
-<a name="line270">270: </a>        }
-<a name="line271">271: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&S);
-<a name="line272">272: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line273">273: </a>      }
-<a name="line274">274: </a>    }
-<a name="line275">275: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line276">276: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
-<a name="line277">277: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
-<a name="line278">278: </a>    MatDestroy(&U);
-
-<a name="line280">280: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
-<a name="line281">281: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
-<a name="line282">282: </a>    }
-<a name="line283">283: </a>    eps->nconv = k;
-<a name="line284">284: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,nv);
-<a name="line285">285: </a>  }
-
-<a name="line287">287: </a>  <font color="#4169E1">if</font> (harmonic) { PetscFree(g); }
-<a name="line288">288: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
-<a name="line289">289: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
-<a name="line290">290: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
-<a name="line291">291: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line292">292: </a>  <font color="#4169E1">return</font>(0);
-<a name="line293">293: </a>}
-
-<a name="line297">297: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetRestart_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetRestart_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal keep)</font></strong>
-<a name="line298">298: </a>{
-<a name="line299">299: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line302">302: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
-<a name="line303">303: </a>  <font color="#4169E1">else</font> {
-<a name="line304">304: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
-<a name="line305">305: </a>    ctx->keep = keep;
-<a name="line306">306: </a>  }
-<a name="line307">307: </a>  <font color="#4169E1">return</font>(0);
-<a name="line308">308: </a>}
-
-<a name="line312">312: </a><font color="#B22222">/*@</font>
-<a name="line313">313: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a> - Sets the restart parameter for the Krylov-Schur</font>
-<a name="line314">314: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
-<a name="line315">315: </a><font color="#B22222">   after restart.</font>
-
-<a name="line317">317: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line319">319: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line320">320: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line321">321: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
-
-<a name="line323">323: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line324">324: </a><font color="#B22222">.  -eps_krylovschur_restart - Sets the restart parameter</font>
-
-<a name="line326">326: </a><font color="#B22222">   Notes:</font>
-<a name="line327">327: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
-
-<a name="line329">329: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line331">331: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a>()</font>
-<a name="line332">332: </a><font color="#B22222">@*/</font>
-<a name="line333">333: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal keep)</font></strong>
-<a name="line334">334: </a>{
-
-<a name="line340">340: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal),(eps,keep));
-<a name="line341">341: </a>  <font color="#4169E1">return</font>(0);
-<a name="line342">342: </a>}
-
-<a name="line346">346: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetRestart_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetRestart_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *keep)</font></strong>
-<a name="line347">347: </a>{
-<a name="line348">348: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line351">351: </a>  *keep = ctx->keep;
-<a name="line352">352: </a>  <font color="#4169E1">return</font>(0);
-<a name="line353">353: </a>}
-
-<a name="line357">357: </a><font color="#B22222">/*@</font>
-<a name="line358">358: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a> - Gets the restart parameter used in the</font>
-<a name="line359">359: </a><font color="#B22222">   Krylov-Schur method.</font>
-
-<a name="line361">361: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line363">363: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line364">364: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line366">366: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line367">367: </a><font color="#B22222">.  keep - the restart parameter</font>
-
-<a name="line369">369: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line371">371: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>()</font>
-<a name="line372">372: </a><font color="#B22222">@*/</font>
-<a name="line373">373: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetRestart.html#EPSKrylovSchurGetRestart">EPSKrylovSchurGetRestart</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *keep)</font></strong>
-<a name="line374">374: </a>{
-
-<a name="line380">380: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,keep));
-<a name="line381">381: </a>  <font color="#4169E1">return</font>(0);
-<a name="line382">382: </a>}
-
-<a name="line386">386: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetLocking_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetLocking_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
-<a name="line387">387: </a>{
-<a name="line388">388: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line391">391: </a>  ctx->lock = lock;
-<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
-<a name="line393">393: </a>}
-
-<a name="line397">397: </a><font color="#B22222">/*@</font>
-<a name="line398">398: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a> - Choose between locking and non-locking variants of</font>
-<a name="line399">399: </a><font color="#B22222">   the Krylov-Schur method.</font>
-
-<a name="line401">401: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line403">403: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line404">404: </a><font color="#B22222">+  eps  - the eigenproblem solver context</font>
-<a name="line405">405: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
-
-<a name="line407">407: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line408">408: </a><font color="#B22222">.  -eps_krylovschur_locking - Sets the locking flag</font>
+<a name="line411">411: </a><font color="#B22222">   Notes:</font>
+<a name="line412">412: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
+<a name="line413">413: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
+<a name="line414">414: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
+<a name="line415">415: </a><font color="#B22222">   non-locking variant).</font>
 
-<a name="line410">410: </a><font color="#B22222">   Notes:</font>
-<a name="line411">411: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
-<a name="line412">412: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
-<a name="line413">413: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
-<a name="line414">414: </a><font color="#B22222">   non-locking variant).</font>
+<a name="line417">417: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line416">416: </a><font color="#B22222">   Level: advanced</font>
+<a name="line419">419: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a>()</font>
+<a name="line420">420: </a><font color="#B22222">@*/</font>
+<a name="line421">421: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
+<a name="line422">422: </a>{
 
-<a name="line418">418: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a>()</font>
-<a name="line419">419: </a><font color="#B22222">@*/</font>
-<a name="line420">420: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool lock)</font></strong>
-<a name="line421">421: </a>{
+<a name="line428">428: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,lock));
+<a name="line429">429: </a>  <font color="#4169E1">return</font>(0);
+<a name="line430">430: </a>}
 
-<a name="line427">427: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,lock));
-<a name="line428">428: </a>  <font color="#4169E1">return</font>(0);
-<a name="line429">429: </a>}
+<a name="line434">434: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetLocking_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetLocking_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
+<a name="line435">435: </a>{
+<a name="line436">436: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
 
-<a name="line433">433: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetLocking_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetLocking_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
-<a name="line434">434: </a>{
-<a name="line435">435: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line439">439: </a>  *lock = ctx->lock;
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
 
-<a name="line438">438: </a>  *lock = ctx->lock;
-<a name="line439">439: </a>  <font color="#4169E1">return</font>(0);
-<a name="line440">440: </a>}
+<a name="line445">445: </a><font color="#B22222">/*@</font>
+<a name="line446">446: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a> - Gets the locking flag used in the Krylov-Schur</font>
+<a name="line447">447: </a><font color="#B22222">   method.</font>
 
-<a name="line444">444: </a><font color="#B22222">/*@</font>
-<a name="line445">445: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a> - Gets the locking flag used in the Krylov-Schur</font>
-<a name="line446">446: </a><font color="#B22222">   method.</font>
+<a name="line449">449: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line448">448: </a><font color="#B22222">   Not Collective</font>
+<a name="line451">451: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line452">452: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line450">450: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line451">451: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line454">454: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line455">455: </a><font color="#B22222">.  lock - the locking flag</font>
 
-<a name="line453">453: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line454">454: </a><font color="#B22222">.  lock - the locking flag</font>
+<a name="line457">457: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line456">456: </a><font color="#B22222">   Level: advanced</font>
+<a name="line459">459: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>()</font>
+<a name="line460">460: </a><font color="#B22222">@*/</font>
+<a name="line461">461: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
+<a name="line462">462: </a>{
 
-<a name="line458">458: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>()</font>
-<a name="line459">459: </a><font color="#B22222">@*/</font>
-<a name="line460">460: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetLocking.html#EPSKrylovSchurGetLocking">EPSKrylovSchurGetLocking</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *lock)</font></strong>
-<a name="line461">461: </a>{
+<a name="line468">468: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,lock));
+<a name="line469">469: </a>  <font color="#4169E1">return</font>(0);
+<a name="line470">470: </a>}
 
-<a name="line467">467: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,lock));
-<a name="line468">468: </a>  <font color="#4169E1">return</font>(0);
-<a name="line469">469: </a>}
+<a name="line474">474: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetPartitions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetPartitions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npart)</font></strong>
+<a name="line475">475: </a>{
+<a name="line476">476: </a>  PetscErrorCode  ierr;
+<a name="line477">477: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line478">478: </a>  PetscMPIInt     size;
 
-<a name="line473">473: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetPartitions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetPartitions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npart)</font></strong>
-<a name="line474">474: </a>{
-<a name="line475">475: </a>  PetscErrorCode  ierr;
-<a name="line476">476: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line477">477: </a>  PetscMPIInt     size;
+<a name="line481">481: </a>  <font color="#4169E1">if</font> (ctx->npart!=npart) {
+<a name="line482">482: </a>    <font color="#4169E1">if</font> (ctx->commset) { PetscSubcommDestroy(&ctx->subc); }
+<a name="line483">483: </a>    <font color="#4169E1">if</font> (ctx->eps) { <a href="../../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps); }
+<a name="line484">484: </a>  } 
+<a name="line485">485: </a>  <font color="#4169E1">if</font> (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
+<a name="line486">486: </a>    ctx->npart = 1;
+<a name="line487">487: </a>  } <font color="#4169E1">else</font> {
+<a name="line488">488: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)eps),&size);
+<a name="line489">489: </a>    <font color="#4169E1">if</font> (npart<1 || npart>size) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of npart"</font>);
+<a name="line490">490: </a>    ctx->npart = npart;
+<a name="line491">491: </a>  }
+<a name="line492">492: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line493">493: </a>  <font color="#4169E1">return</font>(0);
+<a name="line494">494: </a>}
 
-<a name="line480">480: </a>  <font color="#4169E1">if</font> (ctx->npart!=npart) {
-<a name="line481">481: </a>    <font color="#4169E1">if</font> (ctx->commset) { PetscSubcommDestroy(&ctx->subc); }
-<a name="line482">482: </a>    <font color="#4169E1">if</font> (ctx->eps) { <a href="../../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps); }
-<a name="line483">483: </a>  } 
-<a name="line484">484: </a>  <font color="#4169E1">if</font> (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
-<a name="line485">485: </a>    ctx->npart = 1;
-<a name="line486">486: </a>  } <font color="#4169E1">else</font> {
-<a name="line487">487: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)eps),&size);
-<a name="line488">488: </a>    <font color="#4169E1">if</font> (npart<1 || npart>size) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of npart"</font>);
-<a name="line489">489: </a>    ctx->npart = npart;
-<a name="line490">490: </a>  }
-<a name="line491">491: </a>  eps->state = EPS_STATE_INITIAL;
-<a name="line492">492: </a>  <font color="#4169E1">return</font>(0);
-<a name="line493">493: </a>}
+<a name="line498">498: </a><font color="#B22222">/*@</font>
+<a name="line499">499: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a> - Sets the number of partitions for the</font>
+<a name="line500">500: </a><font color="#B22222">   case of doing spectrum slicing for a computational interval with the</font>
+<a name="line501">501: </a><font color="#B22222">   communicator split in several sub-communicators.</font>
 
-<a name="line497">497: </a><font color="#B22222">/*@</font>
-<a name="line498">498: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a> - Sets the number of partitions for the</font>
-<a name="line499">499: </a><font color="#B22222">   case of doing spectrum slicing for a computational interval with the</font>
-<a name="line500">500: </a><font color="#B22222">   communicator split in several sub-communicators.</font>
+<a name="line503">503: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line502">502: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line505">505: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line506">506: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
+<a name="line507">507: </a><font color="#B22222">-  npart - number of partitions</font>
 
-<a name="line504">504: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line505">505: </a><font color="#B22222">+  eps   - the eigenproblem solver context</font>
-<a name="line506">506: </a><font color="#B22222">-  npart - number of partitions</font>
+<a name="line509">509: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line510">510: </a><font color="#B22222">.  -eps_krylovschur_partitions <npart> - Sets the number of partitions</font>
 
-<a name="line508">508: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line509">509: </a><font color="#B22222">.  -eps_krylovschur_partitions <npart> - Sets the number of partitions</font>
+<a name="line512">512: </a><font color="#B22222">   Notes:</font>
+<a name="line513">513: </a><font color="#B22222">   By default, npart=1 so all processes in the communicator participate in</font>
+<a name="line514">514: </a><font color="#B22222">   the processing of the whole interval. If npart>1 then the interval is</font>
+<a name="line515">515: </a><font color="#B22222">   divided into npart subintervals, each of them being processed by a</font>
+<a name="line516">516: </a><font color="#B22222">   subset of processes.</font>
 
-<a name="line511">511: </a><font color="#B22222">   Notes:</font>
-<a name="line512">512: </a><font color="#B22222">   By default, npart=1 so all processes in the communicator participate in</font>
-<a name="line513">513: </a><font color="#B22222">   the processing of the whole interval. If npart>1 then the interval is</font>
-<a name="line514">514: </a><font color="#B22222">   divided into npart subintervals, each of them being processed by a</font>
-<a name="line515">515: </a><font color="#B22222">   subset of processes.</font>
+<a name="line518">518: </a><font color="#B22222">   The interval is split proportionally unless the separation points are</font>
+<a name="line519">519: </a><font color="#B22222">   specified with <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>().</font>
 
-<a name="line517">517: </a><font color="#B22222">   The interval is split proportionally unless the separation points are</font>
-<a name="line518">518: </a><font color="#B22222">   specified with <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>().</font>
+<a name="line521">521: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line520">520: </a><font color="#B22222">   Level: advanced</font>
+<a name="line523">523: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line524">524: </a><font color="#B22222">@*/</font>
+<a name="line525">525: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetPartitions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npart)</font></strong>
+<a name="line526">526: </a>{
 
-<a name="line522">522: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line523">523: </a><font color="#B22222">@*/</font>
-<a name="line524">524: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetPartitions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt npart)</font></strong>
-<a name="line525">525: </a>{
+<a name="line532">532: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetPartitions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,npart));
+<a name="line533">533: </a>  <font color="#4169E1">return</font>(0);
+<a name="line534">534: </a>}
 
-<a name="line531">531: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetPartitions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt),(eps,npart));
-<a name="line532">532: </a>  <font color="#4169E1">return</font>(0);
-<a name="line533">533: </a>}
+<a name="line538">538: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetPartitions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetPartitions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npart)</font></strong>
+<a name="line539">539: </a>{
+<a name="line540">540: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
 
-<a name="line537">537: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetPartitions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetPartitions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npart)</font></strong>
-<a name="line538">538: </a>{
-<a name="line539">539: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line543">543: </a>  *npart  = ctx->npart;
+<a name="line544">544: </a>  <font color="#4169E1">return</font>(0);
+<a name="line545">545: </a>}
 
-<a name="line542">542: </a>  *npart  = ctx->npart;
-<a name="line543">543: </a>  <font color="#4169E1">return</font>(0);
-<a name="line544">544: </a>}
+<a name="line549">549: </a><font color="#B22222">/*@</font>
+<a name="line550">550: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a> - Gets the number of partitions of the</font>
+<a name="line551">551: </a><font color="#B22222">   communicator in case of spectrum slicing.</font>
 
-<a name="line548">548: </a><font color="#B22222">/*@</font>
-<a name="line549">549: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a> - Gets the number of partitions of the</font>
-<a name="line550">550: </a><font color="#B22222">   communicator in case of spectrum slicing.</font>
+<a name="line553">553: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line552">552: </a><font color="#B22222">   Not Collective</font>
+<a name="line555">555: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line556">556: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line554">554: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line555">555: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line558">558: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line559">559: </a><font color="#B22222">.  npart - number of partitions</font>
+
+<a name="line561">561: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line563">563: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>()</font>
+<a name="line564">564: </a><font color="#B22222">@*/</font>
+<a name="line565">565: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetPartitions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npart)</font></strong>
+<a name="line566">566: </a>{
+
+<a name="line572">572: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetPartitions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,npart));
+<a name="line573">573: </a>  <font color="#4169E1">return</font>(0);
+<a name="line574">574: </a>}
+
+<a name="line578">578: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDetectZeros_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetDetectZeros_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool detect)</font></strong>
+<a name="line579">579: </a>{
+<a name="line580">580: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line583">583: </a>  ctx->detect = detect;
+<a name="line584">584: </a>  eps->state  = EPS_STATE_INITIAL;
+<a name="line585">585: </a>  <font color="#4169E1">return</font>(0);
+<a name="line586">586: </a>}
+
+<a name="line590">590: </a><font color="#B22222">/*@</font>
+<a name="line591">591: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a> - Sets a flag to enforce detection of</font>
+<a name="line592">592: </a><font color="#B22222">   zeros during the factorizations throughout the spectrum slicing computation.</font>
+
+<a name="line594">594: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line596">596: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line597">597: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
+<a name="line598">598: </a><font color="#B22222">-  detect - check for zeros</font>
+
+<a name="line600">600: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line601">601: </a><font color="#B22222">.  -eps_krylovschur_detect_zeros - Check for zeros; this takes an optional</font>
+<a name="line602">602: </a><font color="#B22222">   bool value (0/1/no/yes/true/false)</font>
+
+<a name="line604">604: </a><font color="#B22222">   Notes:</font>
+<a name="line605">605: </a><font color="#B22222">   A zero in the factorization indicates that a shift coincides with an eigenvalue.</font>
+
+<a name="line607">607: </a><font color="#B22222">   This flag is turned off by default, and may be necessary in some cases,</font>
+<a name="line608">608: </a><font color="#B22222">   especially when several partitions are being used. This feature currently</font>
+<a name="line609">609: </a><font color="#B22222">   requires an external package for factorizations with support for zero</font>
+<a name="line610">610: </a><font color="#B22222">   detection, e.g. MUMPS.</font>
+
+<a name="line612">612: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line614">614: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line615">615: </a><font color="#B22222">@*/</font>
+<a name="line616">616: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDetectZeros"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool detect)</font></strong>
+<a name="line617">617: </a>{
 
-<a name="line557">557: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line558">558: </a><font color="#B22222">.  npart - number of partitions</font>
-
-<a name="line560">560: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line562">562: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>()</font>
-<a name="line563">563: </a><font color="#B22222">@*/</font>
-<a name="line564">564: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetPartitions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *npart)</font></strong>
-<a name="line565">565: </a>{
-
-<a name="line571">571: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetPartitions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*),(eps,npart));
-<a name="line572">572: </a>  <font color="#4169E1">return</font>(0);
-<a name="line573">573: </a>}
-
-<a name="line577">577: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDetectZeros_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetDetectZeros_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool detect)</font></strong>
-<a name="line578">578: </a>{
-<a name="line579">579: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line582">582: </a>  ctx->detect = detect;
-<a name="line583">583: </a>  eps->state  = EPS_STATE_INITIAL;
-<a name="line584">584: </a>  <font color="#4169E1">return</font>(0);
-<a name="line585">585: </a>}
-
-<a name="line589">589: </a><font color="#B22222">/*@</font>
-<a name="line590">590: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a> - Sets a flag to enforce detection of</font>
-<a name="line591">591: </a><font color="#B22222">   zeros during the factorizations throughout the spectrum slicing computation.</font>
-
-<a name="line593">593: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line595">595: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line596">596: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
-<a name="line597">597: </a><font color="#B22222">-  detect - check for zeros</font>
-
-<a name="line599">599: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line600">600: </a><font color="#B22222">.  -eps_krylovschur_detect_zeros - Check for zeros; this takes an optional</font>
-<a name="line601">601: </a><font color="#B22222">   bool value (0/1/no/yes/true/false)</font>
-
-<a name="line603">603: </a><font color="#B22222">   Notes:</font>
-<a name="line604">604: </a><font color="#B22222">   A zero in the factorization indicates that a shift coincides with an eigenvalue.</font>
-
-<a name="line606">606: </a><font color="#B22222">   This flag is turned off by default, and may be necessary in some cases,</font>
-<a name="line607">607: </a><font color="#B22222">   especially when several partitions are being used. This feature currently</font>
-<a name="line608">608: </a><font color="#B22222">   requires an external package for factorizations with support for zero</font>
-<a name="line609">609: </a><font color="#B22222">   detection, e.g. MUMPS.</font>
-
-<a name="line611">611: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line613">613: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line614">614: </a><font color="#B22222">@*/</font>
-<a name="line615">615: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDetectZeros"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool detect)</font></strong>
-<a name="line616">616: </a>{
+<a name="line623">623: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetDetectZeros_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,detect));
+<a name="line624">624: </a>  <font color="#4169E1">return</font>(0);
+<a name="line625">625: </a>}
 
-<a name="line622">622: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetDetectZeros_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool),(eps,detect));
-<a name="line623">623: </a>  <font color="#4169E1">return</font>(0);
-<a name="line624">624: </a>}
+<a name="line629">629: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDetectZeros_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetDetectZeros_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *detect)</font></strong>
+<a name="line630">630: </a>{
+<a name="line631">631: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
 
-<a name="line628">628: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDetectZeros_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetDetectZeros_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *detect)</font></strong>
-<a name="line629">629: </a>{
-<a name="line630">630: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line634">634: </a>  *detect = ctx->detect;
+<a name="line635">635: </a>  <font color="#4169E1">return</font>(0);
+<a name="line636">636: </a>}
 
-<a name="line633">633: </a>  *detect = ctx->detect;
-<a name="line634">634: </a>  <font color="#4169E1">return</font>(0);
-<a name="line635">635: </a>}
+<a name="line640">640: </a><font color="#B22222">/*@</font>
+<a name="line641">641: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</a> - Gets the flag that enforces zero detection</font>
+<a name="line642">642: </a><font color="#B22222">   in spectrum slicing.</font>
 
-<a name="line639">639: </a><font color="#B22222">/*@</font>
-<a name="line640">640: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</a> - Gets the flag that enforces zero detection</font>
-<a name="line641">641: </a><font color="#B22222">   in spectrum slicing.</font>
+<a name="line644">644: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line643">643: </a><font color="#B22222">   Not Collective</font>
+<a name="line646">646: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line647">647: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line645">645: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line646">646: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line648">648: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line649">649: </a><font color="#B22222">.  detect - whether zeros detection is enforced during factorizations</font>
-
-<a name="line651">651: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line653">653: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()</font>
-<a name="line654">654: </a><font color="#B22222">@*/</font>
-<a name="line655">655: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDetectZeros"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *detect)</font></strong>
-<a name="line656">656: </a>{
-
-<a name="line662">662: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetDetectZeros_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,detect));
-<a name="line663">663: </a>  <font color="#4169E1">return</font>(0);
-<a name="line664">664: </a>}
-
-<a name="line668">668: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDimensions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetDimensions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
-<a name="line669">669: </a>{
-<a name="line670">670: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line673">673: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
-<a name="line674">674: </a>  ctx->nev = nev;
-<a name="line675">675: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
-<a name="line676">676: </a>    ctx->ncv = 0;
-<a name="line677">677: </a>  } <font color="#4169E1">else</font> {
-<a name="line678">678: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
-<a name="line679">679: </a>    ctx->ncv = ncv;
-<a name="line680">680: </a>  }
-<a name="line681">681: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
-<a name="line682">682: </a>    ctx->mpd = 0;
-<a name="line683">683: </a>  } <font color="#4169E1">else</font> {
-<a name="line684">684: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
-<a name="line685">685: </a>    ctx->mpd = mpd;
-<a name="line686">686: </a>  }
-<a name="line687">687: </a>  eps->state = EPS_STATE_INITIAL;
-<a name="line688">688: </a>  <font color="#4169E1">return</font>(0);
-<a name="line689">689: </a>}
-
-<a name="line693">693: </a><font color="#B22222">/*@</font>
-<a name="line694">694: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a> - Sets the dimensions used for each subsolve</font>
-<a name="line695">695: </a><font color="#B22222">   step in case of doing spectrum slicing for a computational interval.</font>
-<a name="line696">696: </a><font color="#B22222">   The meaning of the parameters is the same as in <a href="../../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>().</font>
-
-<a name="line698">698: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line700">700: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line701">701: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line702">702: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
-<a name="line703">703: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the subsolve</font>
-<a name="line704">704: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line706">706: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line707">707: </a><font color="#B22222">+  -eps_krylovschur_nev <nev> - Sets the number of eigenvalues</font>
-<a name="line708">708: </a><font color="#B22222">.  -eps_krylovschur_ncv <ncv> - Sets the dimension of the subspace</font>
-<a name="line709">709: </a><font color="#B22222">-  -eps_krylovschur_mpd <mpd> - Sets the maximum projected dimension</font>
-
-<a name="line711">711: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line713">713: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line714">714: </a><font color="#B22222">@*/</font>
-<a name="line715">715: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDimensions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
-<a name="line716">716: </a>{
-
-<a name="line724">724: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetDimensions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt),(eps,nev,ncv,mpd));
-<a name="line725">725: </a>  <font color="#4169E1">return</font>(0);
-<a name="line726">726: </a>}
-
-<a name="line730">730: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDimensions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetDimensions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line731">731: </a>{
-<a name="line732">732: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line735">735: </a>  <font color="#4169E1">if</font> (nev) *nev = ctx->nev;
-<a name="line736">736: </a>  <font color="#4169E1">if</font> (ncv) *ncv = ctx->ncv;
-<a name="line737">737: </a>  <font color="#4169E1">if</font> (mpd) *mpd = ctx->mpd;
-<a name="line738">738: </a>  <font color="#4169E1">return</font>(0);
-<a name="line739">739: </a>}
-
-<a name="line743">743: </a><font color="#B22222">/*@</font>
-<a name="line744">744: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a> - Gets the dimensions used for each subsolve</font>
-<a name="line745">745: </a><font color="#B22222">   step in case of doing spectrum slicing for a computational interval.</font>
-
-<a name="line747">747: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line749">749: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line750">750: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line752">752: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line753">753: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
-<a name="line754">754: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the subsolve</font>
-<a name="line755">755: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line757">757: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line759">759: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>()</font>
-<a name="line760">760: </a><font color="#B22222">@*/</font>
-<a name="line761">761: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDimensions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line762">762: </a>{
-
-<a name="line767">767: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetDimensions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*),(eps,nev,ncv,mpd));
-<a name="line768">768: </a>  <font color="#4169E1">return</font>(0);
-<a name="line769">769: </a>}
-
-<a name="line773">773: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetSubintervals_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetSubintervals_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal* subint)</font></strong>
-<a name="line774">774: </a>{
-<a name="line775">775: </a>  PetscErrorCode  ierr;
-<a name="line776">776: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line777">777: </a>  PetscInt        i;
-
-<a name="line780">780: </a>  <font color="#4169E1">if</font> (subint[0]!=eps->inta || subint[ctx->npart]!=eps->intb) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"First and last values must match the endpoints of <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
-<a name="line781">781: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) <font color="#4169E1">if</font> (subint[i]>=subint[i+1]) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Array must contain values in ascending order"</font>);
-<a name="line782">782: </a>  <font color="#4169E1">if</font> (ctx->subintervals) { PetscFree(ctx->subintervals); }
-<a name="line783">783: </a>  PetscMalloc1(ctx->npart+1,&ctx->subintervals);
-<a name="line784">784: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart+1;i++) ctx->subintervals[i] = subint[i];
-<a name="line785">785: </a>  ctx->subintset = PETSC_TRUE;
-<a name="line786">786: </a>  eps->state = EPS_STATE_INITIAL;
-<a name="line787">787: </a>  <font color="#4169E1">return</font>(0);
-<a name="line788">788: </a>}
-
-<a name="line792">792: </a><font color="#B22222">/*@C</font>
-<a name="line793">793: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a> - Sets the points that delimit the</font>
-<a name="line794">794: </a><font color="#B22222">   subintervals to be used in spectrum slicing with several partitions.</font>
-
-<a name="line796">796: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line798">798: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line799">799: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
-<a name="line800">800: </a><font color="#B22222">-  subint - array of real values specifying subintervals</font>
-
-<a name="line802">802: </a><font color="#B22222">   Notes:</font>
-<a name="line803">803: </a><font color="#B22222">   This function must be called after <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(). For npart</font>
-<a name="line804">804: </a><font color="#B22222">   partitions, the argument subint must contain npart+1 real values sorted in</font>
-<a name="line805">805: </a><font color="#B22222">   ascending order: subint_0, subint_1, ..., subint_npart, where the first</font>
-<a name="line806">806: </a><font color="#B22222">   and last values must coincide with the interval endpoints set with</font>
-<a name="line807">807: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>().</font>
-
-<a name="line809">809: </a><font color="#B22222">   The subintervals are then defined by two consecutive points: [subint_0,subint_1],</font>
-<a name="line810">810: </a><font color="#B22222">   [subint_1,subint_2], and so on.</font>
-
-<a name="line812">812: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line814">814: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line815">815: </a><font color="#B22222">@*/</font>
-<a name="line816">816: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetSubintervals"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *subint)</font></strong>
-<a name="line817">817: </a>{
-
-<a name="line822">822: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetSubintervals_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,subint));
-<a name="line823">823: </a>  <font color="#4169E1">return</font>(0);
-<a name="line824">824: </a>}
-
-<a name="line828">828: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubintervals_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubintervals_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal **subint)</font></strong>
-<a name="line829">829: </a>{
-<a name="line830">830: </a>  PetscErrorCode  ierr;
-<a name="line831">831: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line832">832: </a>  PetscInt        i;
-
-<a name="line835">835: </a>  <font color="#4169E1">if</font> (!ctx->subintset) {
-<a name="line836">836: </a>    <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
-<a name="line837">837: </a>    <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
-<a name="line838">838: </a>  }
-<a name="line839">839: </a>  PetscMalloc1(ctx->npart+1,subint);
-<a name="line840">840: </a>  <font color="#4169E1">for</font> (i=0;i<=ctx->npart;i++) (*subint)[i] = ctx->subintervals[i];
-<a name="line841">841: </a>  <font color="#4169E1">return</font>(0);
-<a name="line842">842: </a>}
-
-<a name="line846">846: </a><font color="#B22222">/*@C</font>
-<a name="line847">847: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a> - Returns the points that delimit the</font>
-<a name="line848">848: </a><font color="#B22222">   subintervals used in spectrum slicing with several partitions.</font>
-
-<a name="line850">850: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line852">852: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line853">853: </a><font color="#B22222">.  eps    - the eigenproblem solver context</font>
-
-<a name="line855">855: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line856">856: </a><font color="#B22222">.  subint - array of real values specifying subintervals</font>
-
-<a name="line858">858: </a><font color="#B22222">   Notes:</font>
-<a name="line859">859: </a><font color="#B22222">   If the user passed values with <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(), then the</font>
-<a name="line860">860: </a><font color="#B22222">   same values are returned. Otherwise, the values computed internally are</font>
-<a name="line861">861: </a><font color="#B22222">   obtained.</font>
-
-<a name="line863">863: </a><font color="#B22222">   This function is only available for spectrum slicing runs.</font>
-
-<a name="line865">865: </a><font color="#B22222">   The returned array has length npart+1 (see <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>())</font>
-<a name="line866">866: </a><font color="#B22222">   and should be freed by the user.</font>
-
-<a name="line868">868: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line870">870: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line871">871: </a><font color="#B22222">@*/</font>
-<a name="line872">872: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubintervals"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal** subint)</font></strong>
-<a name="line873">873: </a>{
-
-<a name="line878">878: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubintervals_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal**),(eps,subint));
-<a name="line879">879: </a>  <font color="#4169E1">return</font>(0);
-<a name="line880">880: </a>}
-
-<a name="line884">884: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetInertias_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetInertias_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)</font></strong>
-<a name="line885">885: </a>{
-<a name="line886">886: </a>  PetscErrorCode  ierr;
-<a name="line887">887: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line888">888: </a>  PetscInt        i;
-<a name="line889">889: </a>  EPS_SR          sr = ctx->sr;
-
-<a name="line892">892: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
-<a name="line893">893: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
-<a name="line894">894: </a>  <font color="#4169E1">switch</font> (eps->state) {
-<a name="line895">895: </a>  <font color="#4169E1">case</font> EPS_STATE_INITIAL:
-<a name="line896">896: </a>    <font color="#4169E1">break</font>;
-<a name="line897">897: </a>  <font color="#4169E1">case</font> EPS_STATE_SETUP:
-<a name="line898">898: </a>    *n = ctx->npart+1;
-<a name="line899">899: </a>    PetscMalloc1(*n,shifts);
-<a name="line900">900: </a>    PetscMalloc1(*n,inertias);
-<a name="line901">901: </a>    (*shifts)[0] = eps->inta;
-<a name="line902">902: </a>    (*inertias)[0] = (sr->dir==1)?sr->inertia0:sr->inertia1;
-<a name="line903">903: </a>    <font color="#4169E1">if</font> (ctx->npart==1) {
-<a name="line904">904: </a>      (*shifts)[1] = eps->intb;
-<a name="line905">905: </a>      (*inertias)[1] = (sr->dir==1)?sr->inertia1:sr->inertia0;
-<a name="line906">906: </a>    } <font color="#4169E1">else</font> {
-<a name="line907">907: </a>      <font color="#4169E1">for</font> (i=1;i<*n;i++) {
-<a name="line908">908: </a>        (*shifts)[i] = ctx->subintervals[i];
-<a name="line909">909: </a>        (*inertias)[i] = (*inertias)[i-1]+ctx->nconv_loc[i-1];
-<a name="line910">910: </a>      }
-<a name="line911">911: </a>    }
-<a name="line912">912: </a>    <font color="#4169E1">break</font>;
-<a name="line913">913: </a>  <font color="#4169E1">case</font> EPS_STATE_SOLVED:
-<a name="line914">914: </a>  <font color="#4169E1">case</font> EPS_STATE_EIGENVECTORS:
-<a name="line915">915: </a>    *n = ctx->nshifts;
-<a name="line916">916: </a>    PetscMalloc1(*n,shifts);
-<a name="line917">917: </a>    PetscMalloc1(*n,inertias);
-<a name="line918">918: </a>    <font color="#4169E1">for</font> (i=0;i<*n;i++) {
-<a name="line919">919: </a>      (*shifts)[i] = ctx->shifts[i];
-<a name="line920">920: </a>      (*inertias)[i] = ctx->inertias[i];
-<a name="line921">921: </a>    }
-<a name="line922">922: </a>    <font color="#4169E1">break</font>;
-<a name="line923">923: </a>  }
-<a name="line924">924: </a>  <font color="#4169E1">return</font>(0);
-<a name="line925">925: </a>}
-
-<a name="line929">929: </a><font color="#B22222">/*@C</font>
-<a name="line930">930: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a> - Gets the values of the shifts and their</font>
-<a name="line931">931: </a><font color="#B22222">   corresponding inertias in case of doing spectrum slicing for a</font>
-<a name="line932">932: </a><font color="#B22222">   computational interval.</font>
-
-<a name="line934">934: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line936">936: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line937">937: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line939">939: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line940">940: </a><font color="#B22222">+  n        - number of shifts, including the endpoints of the interval</font>
-<a name="line941">941: </a><font color="#B22222">.  shifts   - the values of the shifts used internally in the solver</font>
-<a name="line942">942: </a><font color="#B22222">-  inertias - the values of the inertia in each shift</font>
-
-<a name="line944">944: </a><font color="#B22222">   Notes:</font>
-<a name="line945">945: </a><font color="#B22222">   If called after <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), all shifts used internally by the solver are</font>
-<a name="line946">946: </a><font color="#B22222">   returned (including both endpoints and any intermediate ones). If called</font>
-<a name="line947">947: </a><font color="#B22222">   before <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() and after <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() then only the information of the</font>
-<a name="line948">948: </a><font color="#B22222">   endpoints of subintervals is available.</font>
-
-<a name="line950">950: </a><font color="#B22222">   This function is only available for spectrum slicing runs.</font>
-
-<a name="line952">952: </a><font color="#B22222">   The returned arrays should be freed by the user.</font>
-
-<a name="line954">954: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line956">956: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>()</font>
-<a name="line957">957: </a><font color="#B22222">@*/</font>
-<a name="line958">958: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetInertias"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)</font></strong>
-<a name="line959">959: </a>{
-
-<a name="line965">965: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetInertias_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscReal**,PetscInt**),(eps,n,shifts,inertias));
-<a name="line966">966: </a>  <font color="#4169E1">return</font>(0);
-<a name="line967">967: </a>}
-
-<a name="line971">971: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommInfo_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubcommInfo_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *k,PetscInt *n,Vec *v)</font></strong>
-<a name="line972">972: </a>{
-<a name="line973">973: </a>  PetscErrorCode  ierr;
-<a name="line974">974: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line975">975: </a>  EPS_SR          sr = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
-
-<a name="line978">978: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
-<a name="line979">979: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
-<a name="line980">980: </a>  <font color="#4169E1">if</font> (k) *k = (ctx->npart==1)? 0: ctx->subc->color;
-<a name="line981">981: </a>  <font color="#4169E1">if</font> (n) *n = sr->numEigs;
-<a name="line982">982: </a>  <font color="#4169E1">if</font> (v) {
-<a name="line983">983: </a>    <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(sr->V,v);
-<a name="line984">984: </a>  }
-<a name="line985">985: </a>  <font color="#4169E1">return</font>(0);
-<a name="line986">986: </a>}
-
-<a name="line990">990: </a><font color="#B22222">/*@C</font>
-<a name="line991">991: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a> - Gets information related to the case of</font>
-<a name="line992">992: </a><font color="#B22222">   doing spectrum slicing for a computational interval with multiple</font>
-<a name="line993">993: </a><font color="#B22222">   communicators.</font>
-
-<a name="line995">995: </a><font color="#B22222">   Collective on the subcommunicator (if v is given)</font>
-
-<a name="line997">997: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line998">998: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line1000">1000: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1001">1001: </a><font color="#B22222">+  k - number of the subinterval for the calling process</font>
-<a name="line1002">1002: </a><font color="#B22222">.  n - number of eigenvalues found in the k-th subinterval</font>
-<a name="line1003">1003: </a><font color="#B22222">-  v - a vector owned by processes in the subcommunicator with dimensions</font>
-<a name="line1004">1004: </a><font color="#B22222">       compatible for locally computed eigenvectors (or NULL)</font>
-
-<a name="line1006">1006: </a><font color="#B22222">   Notes:</font>
-<a name="line1007">1007: </a><font color="#B22222">   This function is only available for spectrum slicing runs.</font>
-
-<a name="line1009">1009: </a><font color="#B22222">   The returned Vec should be destroyed by the user.</font>
-
-<a name="line1011">1011: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1013">1013: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a>()</font>
-<a name="line1014">1014: </a><font color="#B22222">@*/</font>
-<a name="line1015">1015: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommInfo"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *k,PetscInt *n,Vec *v)</font></strong>
-<a name="line1016">1016: </a>{
-
-<a name="line1021">1021: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubcommInfo_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,Vec*),(eps,k,n,v));
-<a name="line1022">1022: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1023">1023: </a>}
-
-<a name="line1027">1027: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommPairs_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eig,Vec v)</font></strong>
-<a name="line1028">1028: </a>{
-<a name="line1029">1029: </a>  PetscErrorCode  ierr;
-<a name="line1030">1030: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line1031">1031: </a>  EPS_SR          sr = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
-
-<a name="line1034">1034: </a>  EPSCheckSolved(eps,1);
-<a name="line1035">1035: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
-<a name="line1036">1036: </a>  <font color="#4169E1">if</font> (i<0 || i>=sr->numEigs) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line1037">1037: </a>  <font color="#4169E1">if</font> (eig) *eig = sr->eigr[sr->perm[i]];
-<a name="line1038">1038: </a>  <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(sr->V,sr->perm[i],v);
-<a name="line1039">1039: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1040">1040: </a>}
-
-<a name="line1044">1044: </a><font color="#B22222">/*@C</font>
-<a name="line1045">1045: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a> - Gets the i-th eigenpair stored</font>
-<a name="line1046">1046: </a><font color="#B22222">   internally in the multi-communicator to which the calling process belongs.</font>
-
-<a name="line1048">1048: </a><font color="#B22222">   Collective on the subcommunicator (if v is given)</font>
-
-<a name="line1050">1050: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1051">1051: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line1052">1052: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line1054">1054: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1055">1055: </a><font color="#B22222">+  eig - the eigenvalue</font>
-<a name="line1056">1056: </a><font color="#B22222">-  v   - the eigenvector</font>
-
-<a name="line1058">1058: </a><font color="#B22222">   Notes:</font>
-<a name="line1059">1059: </a><font color="#B22222">   It is allowed to pass NULL for v if the eigenvector is not required.</font>
-<a name="line1060">1060: </a><font color="#B22222">   Otherwise, the caller must provide a valid Vec objects, i.e.,</font>
-<a name="line1061">1061: </a><font color="#B22222">   it must be created by the calling program with <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>().</font>
-
-<a name="line1063">1063: </a><font color="#B22222">   The index i should be a value between 0 and n-1, where n is the number of</font>
-<a name="line1064">1064: </a><font color="#B22222">   vectors in the local subinterval, see <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>().</font>
-
-<a name="line1066">1066: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1068">1068: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>()</font>
-<a name="line1069">1069: </a><font color="#B22222">@*/</font>
-<a name="line1070">1070: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommPairs"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eig,Vec v)</font></strong>
-<a name="line1071">1071: </a>{
-
-<a name="line1077">1077: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubcommPairs_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,Vec),(eps,i,eig,v));
-<a name="line1078">1078: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1079">1079: </a>}
-
-<a name="line1083">1083: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_KrylovSchur"></a>PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1084">1084: </a>{
-<a name="line1085">1085: </a>  PetscErrorCode  ierr;
-<a name="line1086">1086: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line1087">1087: </a>  PetscBool       flg,lock,b;
-<a name="line1088">1088: </a>  PetscReal       keep;
-<a name="line1089">1089: </a>  PetscInt        i,j,k;
-
-<a name="line1092">1092: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Krylov-Schur Options"</font>);
-<a name="line1093">1093: </a>  PetscOptionsReal(<font color="#666666">"-eps_krylovschur_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>"</font>,0.5,&keep,&flg);
-<a name="line1094">1094: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1095">1095: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>(eps,keep);
-<a name="line1096">1096: </a>  }
-<a name="line1097">1097: </a>  PetscOptionsBool(<font color="#666666">"-eps_krylovschur_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>"</font>,PETSC_TRUE,&lock,&flg);
-<a name="line1098">1098: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1099">1099: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(eps,lock);
-<a name="line1100">1100: </a>  }
-<a name="line1101">1101: </a>  i = ctx->npart;
-<a name="line1102">1102: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_partitions"</font>,<font color="#666666">"Number of partitions of the communicator for spectrum slicing"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>"</font>,ctx->npart,&i,&flg);
-<a name="line1103">1103: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1104">1104: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(eps,i);
-<a name="line1105">1105: </a>  }
-<a name="line1106">1106: </a>  b = ctx->detect;
-<a name="line1107">1107: </a>  PetscOptionsBool(<font color="#666666">"-eps_krylovschur_detect_zeros"</font>,<font color="#666666">"Check zeros during factorizations at subinterval boundaries"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>"</font>,ctx->detect,&b,&flg);
-<a name="line1108">1108: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1109">1109: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>(eps,b);
-<a name="line1110">1110: </a>  }
-<a name="line1111">1111: </a>  i = 1;
-<a name="line1112">1112: </a>  j = k = PETSC_DECIDE;
-<a name="line1113">1113: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_nev"</font>,<font color="#666666">"Number of eigenvalues to compute in each subsolve (only for spectrum slicing)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>"</font>,40,&i,NULL);
-<a name="line1114">1114: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_ncv"</font>,<font color="#666666">"Number of basis vectors in each subsolve (only for spectrum slicing)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>"</font>,80,&j,NULL);
-<a name="line1115">1115: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem in each subsolve (only for spectrum slicing)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>"</font>,80,&k,NULL);
-<a name="line1116">1116: </a>  <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>(eps,i,j,k);
-<a name="line1117">1117: </a>  PetscOptionsTail();
-<a name="line1118">1118: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1119">1119: </a>}
-
-<a name="line1123">1123: </a><strong><font color="#4169E1"><a name="EPSView_KrylovSchur"></a>PetscErrorCode EPSView_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line1124">1124: </a>{
-<a name="line1125">1125: </a>  PetscErrorCode  ierr;
-<a name="line1126">1126: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
-<a name="line1127">1127: </a>  PetscBool       isascii;
-
-<a name="line1130">1130: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line1131">1131: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line1132">1132: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
-<a name="line1133">1133: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
-<a name="line1134">1134: </a>    <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
-<a name="line1135">1135: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: doing spectrum slicing with nev=%D, ncv=%D, mpd=%D\n"</font>,ctx->nev,ctx->ncv,ctx->mpd);
-<a name="line1136">1136: </a>      <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line1137">1137: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: multi-communicator spectrum slicing with %d partitions\n"</font>,ctx->npart);
-<a name="line1138">1138: </a>        <font color="#4169E1">if</font> (ctx->detect) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: detecting zeros when factorizing at subinterval boundaries\n"</font>); }
-<a name="line1139">1139: </a>      }
-<a name="line1140">1140: </a>    }
-<a name="line1141">1141: </a>  }
-<a name="line1142">1142: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1143">1143: </a>}
-
-<a name="line1147">1147: </a><strong><font color="#4169E1"><a name="EPSDestroy_KrylovSchur"></a>PetscErrorCode EPSDestroy_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1148">1148: </a>{
-
-<a name="line1152">1152: </a>  PetscFree(eps->data);
-<a name="line1153">1153: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetRestart_C"</font>,NULL);
-<a name="line1154">1154: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetRestart_C"</font>,NULL);
-<a name="line1155">1155: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetLocking_C"</font>,NULL);
-<a name="line1156">1156: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetLocking_C"</font>,NULL);
-<a name="line1157">1157: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetPartitions_C"</font>,NULL);
-<a name="line1158">1158: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetPartitions_C"</font>,NULL);
-<a name="line1159">1159: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDetectZeros_C"</font>,NULL);
-<a name="line1160">1160: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDetectZeros_C"</font>,NULL);
-<a name="line1161">1161: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDimensions_C"</font>,NULL);
-<a name="line1162">1162: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDimensions_C"</font>,NULL);
-<a name="line1163">1163: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetSubintervals_C"</font>,NULL);
-<a name="line1164">1164: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubintervals_C"</font>,NULL);
-<a name="line1165">1165: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetInertias_C"</font>,NULL);
-<a name="line1166">1166: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommInfo_C"</font>,NULL);
-<a name="line1167">1167: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommPairs_C"</font>,NULL);
-<a name="line1168">1168: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1169">1169: </a>}
-
-<a name="line1173">1173: </a><strong><font color="#4169E1"><a name="EPSReset_KrylovSchur"></a>PetscErrorCode EPSReset_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1174">1174: </a>{
-<a name="line1177">1177: </a>  <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
-<a name="line1178">1178: </a>    EPSReset_KrylovSchur_Slice(eps);
-<a name="line1179">1179: </a>  }
-<a name="line1180">1180: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1181">1181: </a>}
-
-<a name="line1185">1185: </a><strong><font color="#4169E1"><a name="EPSCreate_KrylovSchur"></a>PETSC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1186">1186: </a>{
-<a name="line1187">1187: </a>  EPS_KRYLOVSCHUR *ctx;
-<a name="line1188">1188: </a>  PetscErrorCode  ierr;
-
-<a name="line1191">1191: </a>  PetscNewLog(eps,&ctx);
-<a name="line1192">1192: </a>  eps->data   = (void*)ctx;
-<a name="line1193">1193: </a>  ctx->lock   = PETSC_TRUE;
-<a name="line1194">1194: </a>  ctx->nev    = 1;
-<a name="line1195">1195: </a>  ctx->npart  = 1;
-<a name="line1196">1196: </a>  ctx->detect = PETSC_FALSE;
-<a name="line1197">1197: </a>  ctx->global = PETSC_TRUE;
-
-<a name="line1199">1199: </a>  eps->ops->setup          = EPSSetUp_KrylovSchur;
-<a name="line1200">1200: </a>  eps->ops->setfromoptions = EPSSetFromOptions_KrylovSchur;
-<a name="line1201">1201: </a>  eps->ops->destroy        = EPSDestroy_KrylovSchur;
-<a name="line1202">1202: </a>  eps->ops->reset          = EPSReset_KrylovSchur;
-<a name="line1203">1203: </a>  eps->ops->view           = EPSView_KrylovSchur;
-<a name="line1204">1204: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
-<a name="line1205">1205: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetRestart_C"</font>,EPSKrylovSchurSetRestart_KrylovSchur);
-<a name="line1206">1206: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetRestart_C"</font>,EPSKrylovSchurGetRestart_KrylovSchur);
-<a name="line1207">1207: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetLocking_C"</font>,EPSKrylovSchurSetLocking_KrylovSchur);
-<a name="line1208">1208: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetLocking_C"</font>,EPSKrylovSchurGetLocking_KrylovSchur);
-<a name="line1209">1209: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetPartitions_C"</font>,EPSKrylovSchurSetPartitions_KrylovSchur);
-<a name="line1210">1210: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetPartitions_C"</font>,EPSKrylovSchurGetPartitions_KrylovSchur);
-<a name="line1211">1211: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDetectZeros_C"</font>,EPSKrylovSchurSetDetectZeros_KrylovSchur);
-<a name="line1212">1212: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDetectZeros_C"</font>,EPSKrylovSchurGetDetectZeros_KrylovSchur);
-<a name="line1213">1213: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDimensions_C"</font>,EPSKrylovSchurSetDimensions_KrylovSchur);
-<a name="line1214">1214: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDimensions_C"</font>,EPSKrylovSchurGetDimensions_KrylovSchur);
-<a name="line1215">1215: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetSubintervals_C"</font>,EPSKrylovSchurSetSubintervals_KrylovSchur);
-<a name="line1216">1216: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubintervals_C"</font>,EPSKrylovSchurGetSubintervals_KrylovSchur);
-<a name="line1217">1217: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetInertias_C"</font>,EPSKrylovSchurGetInertias_KrylovSchur);
-<a name="line1218">1218: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommInfo_C"</font>,EPSKrylovSchurGetSubcommInfo_KrylovSchur);
-<a name="line1219">1219: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommPairs_C"</font>,EPSKrylovSchurGetSubcommPairs_KrylovSchur);
-<a name="line1220">1220: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1221">1221: </a>}
+<a name="line649">649: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line650">650: </a><font color="#B22222">.  detect - whether zeros detection is enforced during factorizations</font>
+
+<a name="line652">652: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line654">654: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()</font>
+<a name="line655">655: </a><font color="#B22222">@*/</font>
+<a name="line656">656: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDetectZeros"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDetectZeros.html#EPSKrylovSchurGetDetectZeros">EPSKrylovSchurGetDetectZeros</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *detect)</font></strong>
+<a name="line657">657: </a>{
+
+<a name="line663">663: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetDetectZeros_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscBool*),(eps,detect));
+<a name="line664">664: </a>  <font color="#4169E1">return</font>(0);
+<a name="line665">665: </a>}
+
+<a name="line669">669: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDimensions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetDimensions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
+<a name="line670">670: </a>{
+<a name="line671">671: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line674">674: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
+<a name="line675">675: </a>  ctx->nev = nev;
+<a name="line676">676: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
+<a name="line677">677: </a>    ctx->ncv = 0;
+<a name="line678">678: </a>  } <font color="#4169E1">else</font> {
+<a name="line679">679: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
+<a name="line680">680: </a>    ctx->ncv = ncv;
+<a name="line681">681: </a>  }
+<a name="line682">682: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
+<a name="line683">683: </a>    ctx->mpd = 0;
+<a name="line684">684: </a>  } <font color="#4169E1">else</font> {
+<a name="line685">685: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
+<a name="line686">686: </a>    ctx->mpd = mpd;
+<a name="line687">687: </a>  }
+<a name="line688">688: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line689">689: </a>  <font color="#4169E1">return</font>(0);
+<a name="line690">690: </a>}
+
+<a name="line694">694: </a><font color="#B22222">/*@</font>
+<a name="line695">695: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a> - Sets the dimensions used for each subsolve</font>
+<a name="line696">696: </a><font color="#B22222">   step in case of doing spectrum slicing for a computational interval.</font>
+<a name="line697">697: </a><font color="#B22222">   The meaning of the parameters is the same as in <a href="../../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>().</font>
+
+<a name="line699">699: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line701">701: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line702">702: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line703">703: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
+<a name="line704">704: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the subsolve</font>
+<a name="line705">705: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line707">707: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line708">708: </a><font color="#B22222">+  -eps_krylovschur_nev <nev> - Sets the number of eigenvalues</font>
+<a name="line709">709: </a><font color="#B22222">.  -eps_krylovschur_ncv <ncv> - Sets the dimension of the subspace</font>
+<a name="line710">710: </a><font color="#B22222">-  -eps_krylovschur_mpd <mpd> - Sets the maximum projected dimension</font>
+
+<a name="line712">712: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line714">714: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line715">715: </a><font color="#B22222">@*/</font>
+<a name="line716">716: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetDimensions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
+<a name="line717">717: </a>{
+
+<a name="line725">725: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetDimensions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt),(eps,nev,ncv,mpd));
+<a name="line726">726: </a>  <font color="#4169E1">return</font>(0);
+<a name="line727">727: </a>}
+
+<a name="line731">731: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDimensions_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetDimensions_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line732">732: </a>{
+<a name="line733">733: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line736">736: </a>  <font color="#4169E1">if</font> (nev) *nev = ctx->nev;
+<a name="line737">737: </a>  <font color="#4169E1">if</font> (ncv) *ncv = ctx->ncv;
+<a name="line738">738: </a>  <font color="#4169E1">if</font> (mpd) *mpd = ctx->mpd;
+<a name="line739">739: </a>  <font color="#4169E1">return</font>(0);
+<a name="line740">740: </a>}
+
+<a name="line744">744: </a><font color="#B22222">/*@</font>
+<a name="line745">745: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a> - Gets the dimensions used for each subsolve</font>
+<a name="line746">746: </a><font color="#B22222">   step in case of doing spectrum slicing for a computational interval.</font>
+
+<a name="line748">748: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line750">750: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line751">751: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line753">753: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line754">754: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
+<a name="line755">755: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the subsolve</font>
+<a name="line756">756: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line758">758: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line760">760: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>()</font>
+<a name="line761">761: </a><font color="#B22222">@*/</font>
+<a name="line762">762: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetDimensions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetDimensions.html#EPSKrylovSchurGetDimensions">EPSKrylovSchurGetDimensions</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line763">763: </a>{
+
+<a name="line768">768: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetDimensions_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,PetscInt*),(eps,nev,ncv,mpd));
+<a name="line769">769: </a>  <font color="#4169E1">return</font>(0);
+<a name="line770">770: </a>}
+
+<a name="line774">774: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetSubintervals_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurSetSubintervals_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal* subint)</font></strong>
+<a name="line775">775: </a>{
+<a name="line776">776: </a>  PetscErrorCode  ierr;
+<a name="line777">777: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line778">778: </a>  PetscInt        i;
+
+<a name="line781">781: </a>  <font color="#4169E1">if</font> (subint[0]!=eps->inta || subint[ctx->npart]!=eps->intb) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"First and last values must match the endpoints of <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line782">782: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) <font color="#4169E1">if</font> (subint[i]>=subint[i+1]) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Array must contain values in ascending order"</font>);
+<a name="line783">783: </a>  <font color="#4169E1">if</font> (ctx->subintervals) { PetscFree(ctx->subintervals); }
+<a name="line784">784: </a>  PetscMalloc1(ctx->npart+1,&ctx->subintervals);
+<a name="line785">785: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart+1;i++) ctx->subintervals[i] = subint[i];
+<a name="line786">786: </a>  ctx->subintset = PETSC_TRUE;
+<a name="line787">787: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line788">788: </a>  <font color="#4169E1">return</font>(0);
+<a name="line789">789: </a>}
+
+<a name="line793">793: </a><font color="#B22222">/*@C</font>
+<a name="line794">794: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a> - Sets the points that delimit the</font>
+<a name="line795">795: </a><font color="#B22222">   subintervals to be used in spectrum slicing with several partitions.</font>
+
+<a name="line797">797: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line799">799: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line800">800: </a><font color="#B22222">+  eps    - the eigenproblem solver context</font>
+<a name="line801">801: </a><font color="#B22222">-  subint - array of real values specifying subintervals</font>
+
+<a name="line803">803: </a><font color="#B22222">   Notes:</font>
+<a name="line804">804: </a><font color="#B22222">   This function must be called after <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(). For npart</font>
+<a name="line805">805: </a><font color="#B22222">   partitions, the argument subint must contain npart+1 real values sorted in</font>
+<a name="line806">806: </a><font color="#B22222">   ascending order: subint_0, subint_1, ..., subint_npart, where the first</font>
+<a name="line807">807: </a><font color="#B22222">   and last values must coincide with the interval endpoints set with</font>
+<a name="line808">808: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>().</font>
+
+<a name="line810">810: </a><font color="#B22222">   The subintervals are then defined by two consecutive points: [subint_0,subint_1],</font>
+<a name="line811">811: </a><font color="#B22222">   [subint_1,subint_2], and so on.</font>
+
+<a name="line813">813: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line815">815: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line816">816: </a><font color="#B22222">@*/</font>
+<a name="line817">817: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurSetSubintervals"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *subint)</font></strong>
+<a name="line818">818: </a>{
+
+<a name="line823">823: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurSetSubintervals_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal*),(eps,subint));
+<a name="line824">824: </a>  <font color="#4169E1">return</font>(0);
+<a name="line825">825: </a>}
+
+<a name="line829">829: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubintervals_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubintervals_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal **subint)</font></strong>
+<a name="line830">830: </a>{
+<a name="line831">831: </a>  PetscErrorCode  ierr;
+<a name="line832">832: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line833">833: </a>  PetscInt        i;
+
+<a name="line836">836: </a>  <font color="#4169E1">if</font> (!ctx->subintset) {
+<a name="line837">837: </a>    <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
+<a name="line838">838: </a>    <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line839">839: </a>  }
+<a name="line840">840: </a>  PetscMalloc1(ctx->npart+1,subint);
+<a name="line841">841: </a>  <font color="#4169E1">for</font> (i=0;i<=ctx->npart;i++) (*subint)[i] = ctx->subintervals[i];
+<a name="line842">842: </a>  <font color="#4169E1">return</font>(0);
+<a name="line843">843: </a>}
+
+<a name="line847">847: </a><font color="#B22222">/*@C</font>
+<a name="line848">848: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a> - Returns the points that delimit the</font>
+<a name="line849">849: </a><font color="#B22222">   subintervals used in spectrum slicing with several partitions.</font>
+
+<a name="line851">851: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line853">853: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line854">854: </a><font color="#B22222">.  eps    - the eigenproblem solver context</font>
+
+<a name="line856">856: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line857">857: </a><font color="#B22222">.  subint - array of real values specifying subintervals</font>
+
+<a name="line859">859: </a><font color="#B22222">   Notes:</font>
+<a name="line860">860: </a><font color="#B22222">   If the user passed values with <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(), then the</font>
+<a name="line861">861: </a><font color="#B22222">   same values are returned. Otherwise, the values computed internally are</font>
+<a name="line862">862: </a><font color="#B22222">   obtained.</font>
+
+<a name="line864">864: </a><font color="#B22222">   This function is only available for spectrum slicing runs.</font>
+
+<a name="line866">866: </a><font color="#B22222">   The returned array has length npart+1 (see <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>())</font>
+<a name="line867">867: </a><font color="#B22222">   and should be freed by the user.</font>
+
+<a name="line869">869: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line871">871: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetPartitions.html#EPSKrylovSchurGetPartitions">EPSKrylovSchurGetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line872">872: </a><font color="#B22222">@*/</font>
+<a name="line873">873: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubintervals"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubintervals.html#EPSKrylovSchurGetSubintervals">EPSKrylovSchurGetSubintervals</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal** subint)</font></strong>
+<a name="line874">874: </a>{
+
+<a name="line880">880: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubintervals_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscReal**),(eps,subint));
+<a name="line881">881: </a>  <font color="#4169E1">return</font>(0);
+<a name="line882">882: </a>}
+
+<a name="line886">886: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetInertias_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetInertias_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)</font></strong>
+<a name="line887">887: </a>{
+<a name="line888">888: </a>  PetscErrorCode  ierr;
+<a name="line889">889: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line890">890: </a>  PetscInt        i;
+<a name="line891">891: </a>  EPS_SR          sr = ctx->sr;
+
+<a name="line894">894: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
+<a name="line895">895: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line896">896: </a>  <font color="#4169E1">switch</font> (eps->state) {
+<a name="line897">897: </a>  <font color="#4169E1">case</font> EPS_STATE_INITIAL:
+<a name="line898">898: </a>    <font color="#4169E1">break</font>;
+<a name="line899">899: </a>  <font color="#4169E1">case</font> EPS_STATE_SETUP:
+<a name="line900">900: </a>    *n = ctx->npart+1;
+<a name="line901">901: </a>    PetscMalloc1(*n,shifts);
+<a name="line902">902: </a>    PetscMalloc1(*n,inertias);
+<a name="line903">903: </a>    (*shifts)[0] = eps->inta;
+<a name="line904">904: </a>    (*inertias)[0] = (sr->dir==1)?sr->inertia0:sr->inertia1;
+<a name="line905">905: </a>    <font color="#4169E1">if</font> (ctx->npart==1) {
+<a name="line906">906: </a>      (*shifts)[1] = eps->intb;
+<a name="line907">907: </a>      (*inertias)[1] = (sr->dir==1)?sr->inertia1:sr->inertia0;
+<a name="line908">908: </a>    } <font color="#4169E1">else</font> {
+<a name="line909">909: </a>      <font color="#4169E1">for</font> (i=1;i<*n;i++) {
+<a name="line910">910: </a>        (*shifts)[i] = ctx->subintervals[i];
+<a name="line911">911: </a>        (*inertias)[i] = (*inertias)[i-1]+ctx->nconv_loc[i-1];
+<a name="line912">912: </a>      }
+<a name="line913">913: </a>    }
+<a name="line914">914: </a>    <font color="#4169E1">break</font>;
+<a name="line915">915: </a>  <font color="#4169E1">case</font> EPS_STATE_SOLVED:
+<a name="line916">916: </a>  <font color="#4169E1">case</font> EPS_STATE_EIGENVECTORS:
+<a name="line917">917: </a>    *n = ctx->nshifts;
+<a name="line918">918: </a>    PetscMalloc1(*n,shifts);
+<a name="line919">919: </a>    PetscMalloc1(*n,inertias);
+<a name="line920">920: </a>    <font color="#4169E1">for</font> (i=0;i<*n;i++) {
+<a name="line921">921: </a>      (*shifts)[i] = ctx->shifts[i];
+<a name="line922">922: </a>      (*inertias)[i] = ctx->inertias[i];
+<a name="line923">923: </a>    }
+<a name="line924">924: </a>    <font color="#4169E1">break</font>;
+<a name="line925">925: </a>  }
+<a name="line926">926: </a>  <font color="#4169E1">return</font>(0);
+<a name="line927">927: </a>}
+
+<a name="line931">931: </a><font color="#B22222">/*@C</font>
+<a name="line932">932: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a> - Gets the values of the shifts and their</font>
+<a name="line933">933: </a><font color="#B22222">   corresponding inertias in case of doing spectrum slicing for a</font>
+<a name="line934">934: </a><font color="#B22222">   computational interval.</font>
+
+<a name="line936">936: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line938">938: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line939">939: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line941">941: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line942">942: </a><font color="#B22222">+  n        - number of shifts, including the endpoints of the interval</font>
+<a name="line943">943: </a><font color="#B22222">.  shifts   - the values of the shifts used internally in the solver</font>
+<a name="line944">944: </a><font color="#B22222">-  inertias - the values of the inertia in each shift</font>
+
+<a name="line946">946: </a><font color="#B22222">   Notes:</font>
+<a name="line947">947: </a><font color="#B22222">   If called after <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), all shifts used internally by the solver are</font>
+<a name="line948">948: </a><font color="#B22222">   returned (including both endpoints and any intermediate ones). If called</font>
+<a name="line949">949: </a><font color="#B22222">   before <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() and after <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() then only the information of the</font>
+<a name="line950">950: </a><font color="#B22222">   endpoints of subintervals is available.</font>
+
+<a name="line952">952: </a><font color="#B22222">   This function is only available for spectrum slicing runs.</font>
+
+<a name="line954">954: </a><font color="#B22222">   The returned arrays should be freed by the user.</font>
+
+<a name="line956">956: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line958">958: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetSubintervals.html#EPSKrylovSchurSetSubintervals">EPSKrylovSchurSetSubintervals</a>()</font>
+<a name="line959">959: </a><font color="#B22222">@*/</font>
+<a name="line960">960: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetInertias"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetInertias.html#EPSKrylovSchurGetInertias">EPSKrylovSchurGetInertias</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)</font></strong>
+<a name="line961">961: </a>{
+
+<a name="line967">967: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetInertias_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscReal**,PetscInt**),(eps,n,shifts,inertias));
+<a name="line968">968: </a>  <font color="#4169E1">return</font>(0);
+<a name="line969">969: </a>}
+
+<a name="line973">973: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommInfo_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubcommInfo_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *k,PetscInt *n,Vec *v)</font></strong>
+<a name="line974">974: </a>{
+<a name="line975">975: </a>  PetscErrorCode  ierr;
+<a name="line976">976: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line977">977: </a>  EPS_SR          sr = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
+
+<a name="line980">980: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
+<a name="line981">981: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line982">982: </a>  <font color="#4169E1">if</font> (k) *k = (ctx->npart==1)? 0: ctx->subc->color;
+<a name="line983">983: </a>  <font color="#4169E1">if</font> (n) *n = sr->numEigs;
+<a name="line984">984: </a>  <font color="#4169E1">if</font> (v) {
+<a name="line985">985: </a>    <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(sr->V,v);
+<a name="line986">986: </a>  }
+<a name="line987">987: </a>  <font color="#4169E1">return</font>(0);
+<a name="line988">988: </a>}
+
+<a name="line992">992: </a><font color="#B22222">/*@C</font>
+<a name="line993">993: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a> - Gets information related to the case of</font>
+<a name="line994">994: </a><font color="#B22222">   doing spectrum slicing for a computational interval with multiple</font>
+<a name="line995">995: </a><font color="#B22222">   communicators.</font>
+
+<a name="line997">997: </a><font color="#B22222">   Collective on the subcommunicator (if v is given)</font>
+
+<a name="line999">999: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1000">1000: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1002">1002: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1003">1003: </a><font color="#B22222">+  k - index of the subinterval for the calling process</font>
+<a name="line1004">1004: </a><font color="#B22222">.  n - number of eigenvalues found in the k-th subinterval</font>
+<a name="line1005">1005: </a><font color="#B22222">-  v - a vector owned by processes in the subcommunicator with dimensions</font>
+<a name="line1006">1006: </a><font color="#B22222">       compatible for locally computed eigenvectors (or NULL)</font>
+
+<a name="line1008">1008: </a><font color="#B22222">   Notes:</font>
+<a name="line1009">1009: </a><font color="#B22222">   This function is only available for spectrum slicing runs.</font>
+
+<a name="line1011">1011: </a><font color="#B22222">   The returned Vec should be destroyed by the user.</font>
+
+<a name="line1013">1013: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1015">1015: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a>()</font>
+<a name="line1016">1016: </a><font color="#B22222">@*/</font>
+<a name="line1017">1017: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommInfo"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *k,PetscInt *n,Vec *v)</font></strong>
+<a name="line1018">1018: </a>{
+
+<a name="line1023">1023: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubcommInfo_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt*,PetscInt*,Vec*),(eps,k,n,v));
+<a name="line1024">1024: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1025">1025: </a>}
+
+<a name="line1029">1029: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommPairs_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubcommPairs_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eig,Vec v)</font></strong>
+<a name="line1030">1030: </a>{
+<a name="line1031">1031: </a>  PetscErrorCode  ierr;
+<a name="line1032">1032: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line1033">1033: </a>  EPS_SR          sr = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
+
+<a name="line1036">1036: </a>  EPSCheckSolved(eps,1);
+<a name="line1037">1037: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line1038">1038: </a>  <font color="#4169E1">if</font> (i<0 || i>=sr->numEigs) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line1039">1039: </a>  <font color="#4169E1">if</font> (eig) *eig = sr->eigr[sr->perm[i]];
+<a name="line1040">1040: </a>  <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(sr->V,sr->perm[i],v);
+<a name="line1041">1041: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1042">1042: </a>}
+
+<a name="line1046">1046: </a><font color="#B22222">/*@C</font>
+<a name="line1047">1047: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a> - Gets the i-th eigenpair stored</font>
+<a name="line1048">1048: </a><font color="#B22222">   internally in the subcommunicator to which the calling process belongs.</font>
+
+<a name="line1050">1050: </a><font color="#B22222">   Collective on the subcommunicator (if v is given)</font>
+
+<a name="line1052">1052: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1053">1053: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line1054">1054: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line1056">1056: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1057">1057: </a><font color="#B22222">+  eig - the eigenvalue</font>
+<a name="line1058">1058: </a><font color="#B22222">-  v   - the eigenvector</font>
+
+<a name="line1060">1060: </a><font color="#B22222">   Notes:</font>
+<a name="line1061">1061: </a><font color="#B22222">   It is allowed to pass NULL for v if the eigenvector is not required.</font>
+<a name="line1062">1062: </a><font color="#B22222">   Otherwise, the caller must provide a valid Vec objects, i.e.,</font>
+<a name="line1063">1063: </a><font color="#B22222">   it must be created by the calling program with <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>().</font>
+
+<a name="line1065">1065: </a><font color="#B22222">   The index i should be a value between 0 and n-1, where n is the number of</font>
+<a name="line1066">1066: </a><font color="#B22222">   vectors in the local subinterval, see <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>().</font>
+
+<a name="line1068">1068: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1070">1070: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>(), <a href="../../../../../docs/manualpages/ [...]
+<a name="line1071">1071: </a><font color="#B22222">@*/</font>
+<a name="line1072">1072: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommPairs"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommPairs.html#EPSKrylovSchurGetSubcommPairs">EPSKrylovSchurGetSubcommPairs</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eig,Vec v)</font></strong>
+<a name="line1073">1073: </a>{
+
+<a name="line1079">1079: </a>  PetscUseMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubcommPairs_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscScalar*,Vec),(eps,i,eig,v));
+<a name="line1080">1080: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1081">1081: </a>}
+
+<a name="line1085">1085: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommMats_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurGetSubcommMats_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat *A,Mat *B)</font></strong>
+<a name="line1086">1086: </a>{
+<a name="line1087">1087: </a>  PetscErrorCode  ierr;
+<a name="line1088">1088: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line1091">1091: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line1092">1092: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
+<a name="line1093">1093: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(ctx->eps,A,B);
+<a name="line1094">1094: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1095">1095: </a>}
+
+<a name="line1099">1099: </a><font color="#B22222">/*@C</font>
+<a name="line1100">1100: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html#EPSKrylovSchurGetSubcommMats">EPSKrylovSchurGetSubcommMats</a> - Gets the eigenproblem matrices stored</font>
+<a name="line1101">1101: </a><font color="#B22222">   internally in the subcommunicator to which the calling process belongs.</font>
+
+<a name="line1103">1103: </a><font color="#B22222">   Collective on the subcommunicator</font>
+
+<a name="line1105">1105: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1106">1106: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line1108">1108: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1109">1109: </a><font color="#B22222">+  A  - the matrix associated with the eigensystem</font>
+<a name="line1110">1110: </a><font color="#B22222">-  B  - the second matrix in the case of generalized eigenproblems</font>
+
+<a name="line1112">1112: </a><font color="#B22222">   Notes:</font>
+<a name="line1113">1113: </a><font color="#B22222">   This is the analog of <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(), but returns the matrices distributed</font>
+<a name="line1114">1114: </a><font color="#B22222">   differently (in the subcommunicator rather than in the parent communicator).</font>
+
+<a name="line1116">1116: </a><font color="#B22222">   These matrices should not be modified by the user.</font>
+
+<a name="line1118">1118: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1120">1120: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommInfo.html#EPSKrylovSchurGetSubcommInfo">EPSKrylovSchurGetSubcommInfo</a>()</font>
+<a name="line1121">1121: </a><font color="#B22222">@*/</font>
+<a name="line1122">1122: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurGetSubcommMats"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html#EPSKrylovSchurGetSubcommMats">EPSKrylovSchurGetSubcommMats</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat *A,Mat *B)</font></strong>
+<a name="line1123">1123: </a>{
+
+<a name="line1128">1128: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurGetSubcommMats_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,Mat*,Mat*),(eps,A,B));
+<a name="line1129">1129: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1130">1130: </a>}
+
+<a name="line1134">1134: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurUpdateSubcommMats_KrylovSchur"></a>static PetscErrorCode EPSKrylovSchurUpdateSubcommMats_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar a,PetscScalar ap,Mat Au,PetscScalar b,PetscScalar bp, Mat Bu,MatStructure str,PetscBool globalup)</font></strong>
+<a name="line1135">1135: </a>{
+<a name="line1136">1136: </a>  PetscErrorCode  ierr;
+<a name="line1137">1137: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data,*subctx;
+<a name="line1138">1138: </a>  Mat             A,B=NULL,Ag,Bg=NULL;
+<a name="line1139">1139: </a>  PetscBool       reuse=PETSC_TRUE;
+<a name="line1140">1140: </a>   
+<a name="line1142">1142: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line1143">1143: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
+<a name="line1144">1144: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&Ag,&Bg);
+<a name="line1145">1145: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(ctx->eps,&A,&B);
+<a name="line1146">1146: </a>  
+<a name="line1147">1147: </a>  MatScale(A,a);
+<a name="line1148">1148: </a>  <font color="#4169E1">if</font> (Au) {
+<a name="line1149">1149: </a>    MatAXPY(A,ap,Au,str);
+<a name="line1150">1150: </a>  }
+<a name="line1151">1151: </a>  <font color="#4169E1">if</font> (B) MatScale(B,b);
+<a name="line1152">1152: </a>  <font color="#4169E1">if</font> (Bu) {
+<a name="line1153">1153: </a>    MatAXPY(B,bp,Bu,str);
+<a name="line1154">1154: </a>  }
+<a name="line1155">1155: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,A,B);
+
+<a name="line1157">1157: </a>  <font color="#B22222">/* Update stored matrix state */</font>
+<a name="line1158">1158: </a>  subctx = (EPS_KRYLOVSCHUR*)ctx->eps->data;
+<a name="line1159">1159: </a>  PetscObjectStateGet((PetscObject)A,&subctx->Astate);
+<a name="line1160">1160: </a>  <font color="#4169E1">if</font> (B) { PetscObjectStateGet((PetscObject)B,&subctx->Bstate); }
+
+<a name="line1162">1162: </a>  <font color="#B22222">/* Update matrices in the parent communicator if requested by user */</font>
+<a name="line1163">1163: </a>  <font color="#4169E1">if</font> (globalup) {
+<a name="line1164">1164: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line1165">1165: </a>      <font color="#4169E1">if</font> (!ctx->isrow) {
+<a name="line1166">1166: </a>        MatGetOwnershipIS(Ag,&ctx->isrow,&ctx->iscol);
+<a name="line1167">1167: </a>        reuse = PETSC_FALSE;
+<a name="line1168">1168: </a>      }
+<a name="line1169">1169: </a>      <font color="#4169E1">if</font> (str==DIFFERENT_NONZERO_PATTERN) reuse = PETSC_FALSE;
+<a name="line1170">1170: </a>      <font color="#4169E1">if</font> (ctx->submata && !reuse) {
+<a name="line1171">1171: </a>        MatDestroyMatrices(1,&ctx->submata);
+<a name="line1172">1172: </a>      }
+<a name="line1173">1173: </a>      MatGetSubMatrices(A,1,&ctx->isrow,&ctx->iscol,(reuse)?MAT_REUSE_MATRIX:MAT_INITIAL_MATRIX,&ctx->submata);
+<a name="line1174">1174: </a>      MatCreateMPIMatConcatenateSeqMat(((PetscObject)Ag)->comm,ctx->submata[0],PETSC_DECIDE,MAT_REUSE_MATRIX,&Ag);
+<a name="line1175">1175: </a>      <font color="#4169E1">if</font> (B) {
+<a name="line1176">1176: </a>        <font color="#4169E1">if</font> (ctx->submatb && !reuse) {
+<a name="line1177">1177: </a>          MatDestroyMatrices(1,&ctx->submatb);
+<a name="line1178">1178: </a>        }
+<a name="line1179">1179: </a>        MatGetSubMatrices(B,1,&ctx->isrow,&ctx->iscol,(reuse)?MAT_REUSE_MATRIX:MAT_INITIAL_MATRIX,&ctx->submatb);
+<a name="line1180">1180: </a>        MatCreateMPIMatConcatenateSeqMat(((PetscObject)Bg)->comm,ctx->submatb[0],PETSC_DECIDE,MAT_REUSE_MATRIX,&Bg);
+<a name="line1181">1181: </a>      }
+<a name="line1182">1182: </a>    }
+<a name="line1183">1183: </a>    PetscObjectStateGet((PetscObject)Ag,&ctx->Astate);
+<a name="line1184">1184: </a>    <font color="#4169E1">if</font> (Bg) { PetscObjectStateGet((PetscObject)Bg,&ctx->Bstate); }
+<a name="line1185">1185: </a>  }
+<a name="line1186">1186: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(eps,Ag,Bg);
+<a name="line1187">1187: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1188">1188: </a>}
+
+<a name="line1192">1192: </a><font color="#B22222">/*@C</font>
+<a name="line1193">1193: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html#EPSKrylovSchurUpdateSubcommMats">EPSKrylovSchurUpdateSubcommMats</a> - Update the eigenproblem matrices stored</font>
+<a name="line1194">1194: </a><font color="#B22222">   internally in the subcommunicator to which the calling process belongs.</font>
+
+<a name="line1196">1196: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1198">1198: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1199">1199: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line1200">1200: </a><font color="#B22222">.  s   - scalar that multiplies the existing A matrix</font>
+<a name="line1201">1201: </a><font color="#B22222">.  a   - scalar used in the axpy operation on A</font>
+<a name="line1202">1202: </a><font color="#B22222">.  Au  - matrix used in the axpy operation on A</font>
+<a name="line1203">1203: </a><font color="#B22222">.  t   - scalar that multiplies the existing B matrix</font>
+<a name="line1204">1204: </a><font color="#B22222">.  b   - scalar used in the axpy operation on B</font>
+<a name="line1205">1205: </a><font color="#B22222">.  Bu  - matrix used in the axpy operation on B</font>
+<a name="line1206">1206: </a><font color="#B22222">.  str - structure flag</font>
+<a name="line1207">1207: </a><font color="#B22222">-  globalup - flag indicating if global matrices must be updated</font>
+
+<a name="line1209">1209: </a><font color="#B22222">   Notes:</font>
+<a name="line1210">1210: </a><font color="#B22222">   This function modifies the eigenproblem matrices at the subcommunicator level,</font>
+<a name="line1211">1211: </a><font color="#B22222">   and optionally updates the global matrices in the parent communicator. The updates</font>
+<a name="line1212">1212: </a><font color="#B22222">   are expressed as A <-- s*A + a*Au,  B <-- t*B + b*Bu.</font>
+
+<a name="line1214">1214: </a><font color="#B22222">   It is possible to update one of the matrices, or both.</font>
+
+<a name="line1216">1216: </a><font color="#B22222">   The matrices Au and Bu must be equal in all subcommunicators.</font>
+
+<a name="line1218">1218: </a><font color="#B22222">   The str flag is passed to the MatAXPY() operations to perform the updates.</font>
+
+<a name="line1220">1220: </a><font color="#B22222">   If globalup is true, communication is carried out to reconstruct the updated</font>
+<a name="line1221">1221: </a><font color="#B22222">   matrices in the parent communicator. The user must be warned that if global</font>
+<a name="line1222">1222: </a><font color="#B22222">   matrices are not in sync with subcommunicator matrices, the errors computed</font>
+<a name="line1223">1223: </a><font color="#B22222">   by <a href="../../../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>() will be wrong even if the computed solution is correct</font>
+<a name="line1224">1224: </a><font color="#B22222">   (the synchronization may be done only once at the end).</font>
+
+<a name="line1226">1226: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1228">1228: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(), <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurGetSubcommMats.html#EPSKrylovSchurGetSubcommMats">EPSKrylovSchurGetSubcommMats</a>()</font>
+<a name="line1229">1229: </a><font color="#B22222">@*/</font>
+<a name="line1230">1230: </a><strong><font color="#4169E1"><a name="EPSKrylovSchurUpdateSubcommMats"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurUpdateSubcommMats.html#EPSKrylovSchurUpdateSubcommMats">EPSKrylovSchurUpdateSubcommMats</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar s,PetscScalar a,Mat Au,PetscScalar t,PetscScalar b, Mat Bu,MatStructure str,PetscBool globalup)</font></strong>
+<a name="line1231">1231: </a>{
+
+<a name="line1244">1244: </a>  PetscTryMethod(eps,<font color="#666666">"EPSKrylovSchurUpdateSubcommMats_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,Mat,PetscScalar,PetscScalar,Mat,MatStructure,PetscBool),(eps,s,a,Au,t,b,Bu,str,globalup));
+<a name="line1245">1245: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1246">1246: </a>}
+
+<a name="line1250">1250: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_KrylovSchur"></a>PetscErrorCode EPSSetFromOptions_KrylovSchur(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1251">1251: </a>{
+<a name="line1252">1252: </a>  PetscErrorCode  ierr;
+<a name="line1253">1253: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line1254">1254: </a>  PetscBool       flg,lock,b,f1,f2,f3;
+<a name="line1255">1255: </a>  PetscReal       keep;
+<a name="line1256">1256: </a>  PetscInt        i,j,k;
+
+<a name="line1259">1259: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Krylov-Schur Options"</font>);
+<a name="line1260">1260: </a>  PetscOptionsReal(<font color="#666666">"-eps_krylovschur_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>"</font>,0.5,&keep,&flg);
+<a name="line1261">1261: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1262">1262: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetRestart.html#EPSKrylovSchurSetRestart">EPSKrylovSchurSetRestart</a>(eps,keep);
+<a name="line1263">1263: </a>  }
+<a name="line1264">1264: </a>  PetscOptionsBool(<font color="#666666">"-eps_krylovschur_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>"</font>,PETSC_TRUE,&lock,&flg);
+<a name="line1265">1265: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1266">1266: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(eps,lock);
+<a name="line1267">1267: </a>  }
+<a name="line1268">1268: </a>  i = ctx->npart;
+<a name="line1269">1269: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_partitions"</font>,<font color="#666666">"Number of partitions of the communicator for spectrum slicing"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>"</font>,ctx->npart,&i,&flg);
+<a name="line1270">1270: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1271">1271: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetPartitions.html#EPSKrylovSchurSetPartitions">EPSKrylovSchurSetPartitions</a>(eps,i);
+<a name="line1272">1272: </a>  }
+<a name="line1273">1273: </a>  b = ctx->detect;
+<a name="line1274">1274: </a>  PetscOptionsBool(<font color="#666666">"-eps_krylovschur_detect_zeros"</font>,<font color="#666666">"Check zeros during factorizations at subinterval boundaries"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>"</font>,ctx->detect,&b,&flg);
+<a name="line1275">1275: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1276">1276: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>(eps,b);
+<a name="line1277">1277: </a>  }
+<a name="line1278">1278: </a>  i = 1;
+<a name="line1279">1279: </a>  j = k = PETSC_DECIDE;
+<a name="line1280">1280: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_nev"</font>,<font color="#666666">"Number of eigenvalues to compute in each subsolve (only for spectrum slicing)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>"</font>,40,&i,&f1);
+<a name="line1281">1281: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_ncv"</font>,<font color="#666666">"Number of basis vectors in each subsolve (only for spectrum slicing)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>"</font>,80,&j,&f2);
+<a name="line1282">1282: </a>  PetscOptionsInt(<font color="#666666">"-eps_krylovschur_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem in each subsolve (only for spectrum slicing)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>"</font>,80,&k,&f3);
+<a name="line1283">1283: </a>  <font color="#4169E1">if</font> (f1 || f2 || f3) {
+<a name="line1284">1284: </a>    <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>(eps,i,j,k);
+<a name="line1285">1285: </a>  }
+<a name="line1286">1286: </a>  PetscOptionsTail();
+<a name="line1287">1287: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1288">1288: </a>}
+
+<a name="line1292">1292: </a><strong><font color="#4169E1"><a name="EPSView_KrylovSchur"></a>PetscErrorCode EPSView_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line1293">1293: </a>{
+<a name="line1294">1294: </a>  PetscErrorCode  ierr;
+<a name="line1295">1295: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data;
+<a name="line1296">1296: </a>  PetscBool       isascii;
+
+<a name="line1299">1299: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line1300">1300: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line1301">1301: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
+<a name="line1302">1302: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
+<a name="line1303">1303: </a>    <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
+<a name="line1304">1304: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: doing spectrum slicing with nev=%D, ncv=%D, mpd=%D\n"</font>,ctx->nev,ctx->ncv,ctx->mpd);
+<a name="line1305">1305: </a>      <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line1306">1306: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: multi-communicator spectrum slicing with %D partitions\n"</font>,ctx->npart);
+<a name="line1307">1307: </a>        <font color="#4169E1">if</font> (ctx->detect) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Krylov-Schur: detecting zeros when factorizing at subinterval boundaries\n"</font>); }
+<a name="line1308">1308: </a>      }
+<a name="line1309">1309: </a>    }
+<a name="line1310">1310: </a>  }
+<a name="line1311">1311: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1312">1312: </a>}
+
+<a name="line1316">1316: </a><strong><font color="#4169E1"><a name="EPSDestroy_KrylovSchur"></a>PetscErrorCode EPSDestroy_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1317">1317: </a>{
+
+<a name="line1321">1321: </a>  PetscFree(eps->data);
+<a name="line1322">1322: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetRestart_C"</font>,NULL);
+<a name="line1323">1323: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetRestart_C"</font>,NULL);
+<a name="line1324">1324: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetLocking_C"</font>,NULL);
+<a name="line1325">1325: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetLocking_C"</font>,NULL);
+<a name="line1326">1326: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetPartitions_C"</font>,NULL);
+<a name="line1327">1327: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetPartitions_C"</font>,NULL);
+<a name="line1328">1328: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDetectZeros_C"</font>,NULL);
+<a name="line1329">1329: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDetectZeros_C"</font>,NULL);
+<a name="line1330">1330: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDimensions_C"</font>,NULL);
+<a name="line1331">1331: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDimensions_C"</font>,NULL);
+<a name="line1332">1332: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetSubintervals_C"</font>,NULL);
+<a name="line1333">1333: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubintervals_C"</font>,NULL);
+<a name="line1334">1334: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetInertias_C"</font>,NULL);
+<a name="line1335">1335: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommInfo_C"</font>,NULL);
+<a name="line1336">1336: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommPairs_C"</font>,NULL);
+<a name="line1337">1337: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommMats_C"</font>,NULL);
+<a name="line1338">1338: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurUpdateSubcommMats_C"</font>,NULL);
+<a name="line1339">1339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1340">1340: </a>}
+
+<a name="line1344">1344: </a><strong><font color="#4169E1"><a name="EPSReset_KrylovSchur"></a>PetscErrorCode EPSReset_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1345">1345: </a>{
+<a name="line1348">1348: </a>  <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
+<a name="line1349">1349: </a>    EPSReset_KrylovSchur_Slice(eps);
+<a name="line1350">1350: </a>  }
+<a name="line1351">1351: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1352">1352: </a>}
+
+<a name="line1356">1356: </a><strong><font color="#4169E1"><a name="EPSCreate_KrylovSchur"></a>PETSC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1357">1357: </a>{
+<a name="line1358">1358: </a>  EPS_KRYLOVSCHUR *ctx;
+<a name="line1359">1359: </a>  PetscErrorCode  ierr;
+
+<a name="line1362">1362: </a>  PetscNewLog(eps,&ctx);
+<a name="line1363">1363: </a>  eps->data   = (void*)ctx;
+<a name="line1364">1364: </a>  ctx->lock   = PETSC_TRUE;
+<a name="line1365">1365: </a>  ctx->nev    = 1;
+<a name="line1366">1366: </a>  ctx->npart  = 1;
+<a name="line1367">1367: </a>  ctx->detect = PETSC_FALSE;
+<a name="line1368">1368: </a>  ctx->global = PETSC_TRUE;
+
+<a name="line1370">1370: </a>  eps->ops->setup          = EPSSetUp_KrylovSchur;
+<a name="line1371">1371: </a>  eps->ops->setfromoptions = EPSSetFromOptions_KrylovSchur;
+<a name="line1372">1372: </a>  eps->ops->destroy        = EPSDestroy_KrylovSchur;
+<a name="line1373">1373: </a>  eps->ops->reset          = EPSReset_KrylovSchur;
+<a name="line1374">1374: </a>  eps->ops->view           = EPSView_KrylovSchur;
+<a name="line1375">1375: </a>  eps->ops->backtransform  = EPSBackTransform_Default;
+<a name="line1376">1376: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetRestart_C"</font>,EPSKrylovSchurSetRestart_KrylovSchur);
+<a name="line1377">1377: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetRestart_C"</font>,EPSKrylovSchurGetRestart_KrylovSchur);
+<a name="line1378">1378: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetLocking_C"</font>,EPSKrylovSchurSetLocking_KrylovSchur);
+<a name="line1379">1379: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetLocking_C"</font>,EPSKrylovSchurGetLocking_KrylovSchur);
+<a name="line1380">1380: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetPartitions_C"</font>,EPSKrylovSchurSetPartitions_KrylovSchur);
+<a name="line1381">1381: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetPartitions_C"</font>,EPSKrylovSchurGetPartitions_KrylovSchur);
+<a name="line1382">1382: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDetectZeros_C"</font>,EPSKrylovSchurSetDetectZeros_KrylovSchur);
+<a name="line1383">1383: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDetectZeros_C"</font>,EPSKrylovSchurGetDetectZeros_KrylovSchur);
+<a name="line1384">1384: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetDimensions_C"</font>,EPSKrylovSchurSetDimensions_KrylovSchur);
+<a name="line1385">1385: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetDimensions_C"</font>,EPSKrylovSchurGetDimensions_KrylovSchur);
+<a name="line1386">1386: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurSetSubintervals_C"</font>,EPSKrylovSchurSetSubintervals_KrylovSchur);
+<a name="line1387">1387: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubintervals_C"</font>,EPSKrylovSchurGetSubintervals_KrylovSchur);
+<a name="line1388">1388: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetInertias_C"</font>,EPSKrylovSchurGetInertias_KrylovSchur);
+<a name="line1389">1389: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommInfo_C"</font>,EPSKrylovSchurGetSubcommInfo_KrylovSchur);
+<a name="line1390">1390: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommPairs_C"</font>,EPSKrylovSchurGetSubcommPairs_KrylovSchur);
+<a name="line1391">1391: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurGetSubcommMats_C"</font>,EPSKrylovSchurGetSubcommMats_KrylovSchur);
+<a name="line1392">1392: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSKrylovSchurUpdateSubcommMats_C"</font>,EPSKrylovSchurUpdateSubcommMats_KrylovSchur);
+<a name="line1393">1393: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1394">1394: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/krylovschur/krylovschur.h b/src/eps/impls/krylov/krylovschur/krylovschur.h
index 273631d..1fd182f 100644
--- a/src/eps/impls/krylov/krylovschur/krylovschur.h
+++ b/src/eps/impls/krylov/krylovschur/krylovschur.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -75,29 +75,33 @@ struct _n_SR {
   PetscReal     *errest;      /* error estimates (for subsolve) */
   PetscInt      *perm;        /* permutation (for subsolve) */
 };
-typedef struct _n_SR  *EPS_SR;
+typedef struct _n_SR *EPS_SR;
 
 typedef struct {
-  PetscReal     keep;               /* restart parameter */
-  PetscBool     lock;               /* locking/non-locking variant */
+  PetscReal        keep;               /* restart parameter */
+  PetscBool        lock;               /* locking/non-locking variant */
   /* the following are used only in spectrum slicing */
-  EPS_SR        sr;                 /* spectrum slicing context */
-  PetscInt      nev;                /* number of eigenvalues to compute */
-  PetscInt      ncv;                /* number of basis vectors */
-  PetscInt      mpd;                /* maximum dimension of projected problem */
-  PetscInt      npart;              /* number of partitions of subcommunicator */
-  PetscBool     detect;             /* check for zeros during factorizations */
-  PetscReal     *subintervals;      /* partition of global interval */
-  PetscBool     subintset;          /* subintervals set by user */
-  PetscMPIInt   *nconv_loc;         /* converged eigenpairs for each subinterval */
-  EPS           eps;                /* additional eps for slice runs */
-  PetscBool     global;             /* flag distinguishing global from local eps */
-  PetscReal     *shifts;            /* array containing global shifts */
-  PetscInt      *inertias;          /* array containing global inertias */
-  PetscInt      nshifts;            /* elements in the arrays of shifts and inertias */
-  PetscSubcomm  subc;               /* context for subcommunicators */
-  MPI_Comm      commrank;           /* group processes with same rank in subcommunicators */
-  PetscBool     commset;            /* flag indicating that commrank was created */
+  EPS_SR           sr;                 /* spectrum slicing context */
+  PetscInt         nev;                /* number of eigenvalues to compute */
+  PetscInt         ncv;                /* number of basis vectors */
+  PetscInt         mpd;                /* maximum dimension of projected problem */
+  PetscInt         npart;              /* number of partitions of subcommunicator */
+  PetscBool        detect;             /* check for zeros during factorizations */
+  PetscReal        *subintervals;      /* partition of global interval */
+  PetscBool        subintset;          /* subintervals set by user */
+  PetscMPIInt      *nconv_loc;         /* converged eigenpairs for each subinterval */
+  EPS              eps;                /* additional eps for slice runs */
+  PetscBool        global;             /* flag distinguishing global from local eps */
+  PetscReal        *shifts;            /* array containing global shifts */
+  PetscInt         *inertias;          /* array containing global inertias */
+  PetscInt         nshifts;            /* elements in the arrays of shifts and inertias */
+  PetscSubcomm     subc;               /* context for subcommunicators */
+  MPI_Comm         commrank;           /* group processes with same rank in subcommunicators */
+  PetscBool        commset;            /* flag indicating that commrank was created */
+  PetscObjectState Astate,Bstate;      /* state of subcommunicator matrices */
+  PetscObjectId    Aid,Bid;            /* Id of subcommunicator matrices */
+  IS               isrow,iscol;        /* index sets used in update of subcomm mats */
+  Mat              *submata,*submatb;  /* seq matrices used in update of subcomm mats */
 } EPS_KRYLOVSCHUR;
 
 #endif
diff --git a/src/eps/impls/krylov/krylovschur/krylovschur.h.html b/src/eps/impls/krylov/krylovschur/krylovschur.h.html
index f195516..bc6e464 100644
--- a/src/eps/impls/krylov/krylovschur/krylovschur.h.html
+++ b/src/eps/impls/krylov/krylovschur/krylovschur.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/krylovschur/krylovschur.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:00+00:00">
+<meta name="date" content="2016-05-16T10:32:56+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/krylovschur.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/krylovschur.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private header for Krylov-Schur.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -85,32 +85,36 @@
 <a name="line75"> 75: </a>  PetscReal     *errest;      <font color="#B22222">/* error estimates (for subsolve) */</font>
 <a name="line76"> 76: </a>  PetscInt      *perm;        <font color="#B22222">/* permutation (for subsolve) */</font>
 <a name="line77"> 77: </a>};
-<a name="line78"> 78: </a><font color="#4169E1">typedef struct _n_SR  *EPS_SR;</font>
+<a name="line78"> 78: </a><font color="#4169E1">typedef struct _n_SR *EPS_SR;</font>
 
 <a name="line80"> 80: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line81"> 81: </a>  PetscReal     keep;               <font color="#B22222">/* restart parameter */</font>
-<a name="line82"> 82: </a>  PetscBool     lock;               <font color="#B22222">/* locking/non-locking variant */</font>
+<a name="line81"> 81: </a>  PetscReal        keep;               <font color="#B22222">/* restart parameter */</font>
+<a name="line82"> 82: </a>  PetscBool        lock;               <font color="#B22222">/* locking/non-locking variant */</font>
 <a name="line83"> 83: </a>  <font color="#B22222">/* the following are used only in spectrum slicing */</font>
-<a name="line84"> 84: </a>  EPS_SR        sr;                 <font color="#B22222">/* spectrum slicing context */</font>
-<a name="line85"> 85: </a>  PetscInt      nev;                <font color="#B22222">/* number of eigenvalues to compute */</font>
-<a name="line86"> 86: </a>  PetscInt      ncv;                <font color="#B22222">/* number of basis vectors */</font>
-<a name="line87"> 87: </a>  PetscInt      mpd;                <font color="#B22222">/* maximum dimension of projected problem */</font>
-<a name="line88"> 88: </a>  PetscInt      npart;              <font color="#B22222">/* number of partitions of subcommunicator */</font>
-<a name="line89"> 89: </a>  PetscBool     detect;             <font color="#B22222">/* check for zeros during factorizations */</font>
-<a name="line90"> 90: </a>  PetscReal     *subintervals;      <font color="#B22222">/* partition of global interval */</font>
-<a name="line91"> 91: </a>  PetscBool     subintset;          <font color="#B22222">/* subintervals set by user */</font>
-<a name="line92"> 92: </a>  PetscMPIInt   *nconv_loc;         <font color="#B22222">/* converged eigenpairs for each subinterval */</font>
-<a name="line93"> 93: </a>  <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>           eps;                <font color="#B22222">/* additional eps for slice runs */</font>
-<a name="line94"> 94: </a>  PetscBool     global;             <font color="#B22222">/* flag distinguishing global from local eps */</font>
-<a name="line95"> 95: </a>  PetscReal     *shifts;            <font color="#B22222">/* array containing global shifts */</font>
-<a name="line96"> 96: </a>  PetscInt      *inertias;          <font color="#B22222">/* array containing global inertias */</font>
-<a name="line97"> 97: </a>  PetscInt      nshifts;            <font color="#B22222">/* elements in the arrays of shifts and inertias */</font>
-<a name="line98"> 98: </a>  PetscSubcomm  subc;               <font color="#B22222">/* context for subcommunicators */</font>
-<a name="line99"> 99: </a>  MPI_Comm      commrank;           <font color="#B22222">/* group processes with same rank in subcommunicators */</font>
-<a name="line100">100: </a>  PetscBool     commset;            <font color="#B22222">/* flag indicating that commrank was created */</font>
-<a name="line101">101: </a>} EPS_KRYLOVSCHUR;
+<a name="line84"> 84: </a>  EPS_SR           sr;                 <font color="#B22222">/* spectrum slicing context */</font>
+<a name="line85"> 85: </a>  PetscInt         nev;                <font color="#B22222">/* number of eigenvalues to compute */</font>
+<a name="line86"> 86: </a>  PetscInt         ncv;                <font color="#B22222">/* number of basis vectors */</font>
+<a name="line87"> 87: </a>  PetscInt         mpd;                <font color="#B22222">/* maximum dimension of projected problem */</font>
+<a name="line88"> 88: </a>  PetscInt         npart;              <font color="#B22222">/* number of partitions of subcommunicator */</font>
+<a name="line89"> 89: </a>  PetscBool        detect;             <font color="#B22222">/* check for zeros during factorizations */</font>
+<a name="line90"> 90: </a>  PetscReal        *subintervals;      <font color="#B22222">/* partition of global interval */</font>
+<a name="line91"> 91: </a>  PetscBool        subintset;          <font color="#B22222">/* subintervals set by user */</font>
+<a name="line92"> 92: </a>  PetscMPIInt      *nconv_loc;         <font color="#B22222">/* converged eigenpairs for each subinterval */</font>
+<a name="line93"> 93: </a>  <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>              eps;                <font color="#B22222">/* additional eps for slice runs */</font>
+<a name="line94"> 94: </a>  PetscBool        global;             <font color="#B22222">/* flag distinguishing global from local eps */</font>
+<a name="line95"> 95: </a>  PetscReal        *shifts;            <font color="#B22222">/* array containing global shifts */</font>
+<a name="line96"> 96: </a>  PetscInt         *inertias;          <font color="#B22222">/* array containing global inertias */</font>
+<a name="line97"> 97: </a>  PetscInt         nshifts;            <font color="#B22222">/* elements in the arrays of shifts and inertias */</font>
+<a name="line98"> 98: </a>  PetscSubcomm     subc;               <font color="#B22222">/* context for subcommunicators */</font>
+<a name="line99"> 99: </a>  MPI_Comm         commrank;           <font color="#B22222">/* group processes with same rank in subcommunicators */</font>
+<a name="line100">100: </a>  PetscBool        commset;            <font color="#B22222">/* flag indicating that commrank was created */</font>
+<a name="line101">101: </a>  PetscObjectState Astate,Bstate;      <font color="#B22222">/* state of subcommunicator matrices */</font>
+<a name="line102">102: </a>  PetscObjectId    Aid,Bid;            <font color="#B22222">/* Id of subcommunicator matrices */</font>
+<a name="line103">103: </a>  IS               isrow,iscol;        <font color="#B22222">/* index sets used in update of subcomm mats */</font>
+<a name="line104">104: </a>  Mat              *submata,*submatb;  <font color="#B22222">/* seq matrices used in update of subcomm mats */</font>
+<a name="line105">105: </a>} EPS_KRYLOVSCHUR;
 
-<a name="line103">103: </a><font color="#A020F0">#endif</font>
+<a name="line107">107: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/src/eps/impls/krylov/krylovschur/ks-indef.c b/src/eps/impls/krylov/krylovschur/ks-indef.c
index f8b1ad6..41f4303 100644
--- a/src/eps/impls/krylov/krylovschur/ks-indef.c
+++ b/src/eps/impls/krylov/krylovschur/ks-indef.c
@@ -6,7 +6,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -97,8 +97,7 @@ PetscErrorCode EPSSolve_KrylovSchur_Indefinite(EPS eps)
     beta1 = PetscMax(beta1,beta2);
 #endif
     ierr = EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,t-eps->nconv,beta*beta1,1.0,&k);CHKERRQ(ierr);
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-    if (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
     nconv = k;
 
     /* Update l */
diff --git a/src/eps/impls/krylov/krylovschur/ks-indef.c.html b/src/eps/impls/krylov/krylovschur/ks-indef.c.html
index 80a5b0c..3b44917 100644
--- a/src/eps/impls/krylov/krylovschur/ks-indef.c.html
+++ b/src/eps/impls/krylov/krylovschur/ks-indef.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/krylovschur/ks-indef.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:00+00:00">
+<meta name="date" content="2016-05-16T10:32:55+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/ks-indef.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/ks-indef.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "krylovschur"</font>
@@ -18,7 +18,7 @@
 
 <a name="line7">  7: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line8">  8: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line11"> 11: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -106,70 +106,69 @@
 <a name="line97"> 97: </a>    beta1 = PetscMax(beta1,beta2);
 <a name="line98"> 98: </a><font color="#A020F0">#endif</font>
 <a name="line99"> 99: </a>    EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,t-eps->nconv,beta*beta1,1.0,&k);
-<a name="line100">100: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line101">101: </a>    <font color="#4169E1">if</font> (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line102">102: </a>    nconv = k;
-
-<a name="line104">104: </a>    <font color="#B22222">/* Update l */</font>
-<a name="line105">105: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || breakdown) l = 0;
-<a name="line106">106: </a>    <font color="#4169E1">else</font> {
-<a name="line107">107: </a>      l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
-<a name="line108">108: </a>      l = PetscMin(l,t);
-<a name="line109">109: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line110">110: </a>      <font color="#4169E1">if</font> (*(a+ld+k+l-1)!=0) {
-<a name="line111">111: </a>        <font color="#4169E1">if</font> (k+l<t-1) l = l+1;
-<a name="line112">112: </a>        <font color="#4169E1">else</font> l = l-1;
-<a name="line113">113: </a>      }
-<a name="line114">114: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line115">115: </a>    }
-<a name="line116">116: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-
-<a name="line118">118: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-<a name="line119">119: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line120">120: </a>        SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_CONV_FAILED,<font color="#666666">"Breakdown in Indefinite Krylov-Schur (beta=%g)"</font>,beta);
-<a name="line121">121: </a>      } <font color="#4169E1">else</font> {
-<a name="line122">122: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
-<a name="line123">123: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line124">124: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line125">125: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_D,&omega);
-<a name="line126">126: </a>        b = a + ld;
-<a name="line127">127: </a>        r = a + 2*ld;
-<a name="line128">128: </a>        <font color="#4169E1">for</font> (i=k;i<k+l;i++) {
-<a name="line129">129: </a>          r[i] = PetscRealPart(Q[nv-1+i*ld]*beta);
-<a name="line130">130: </a>        }
-<a name="line131">131: </a>        b[k+l-1] = r[k+l-1];
-<a name="line132">132: </a>        omega[k+l] = omega[nv];
-<a name="line133">133: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line134">134: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line135">135: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_D,&omega);
-<a name="line136">136: </a>      }
-<a name="line137">137: </a>    }
-<a name="line138">138: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line139">139: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
-<a name="line140">140: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
-<a name="line141">141: </a>    MatDestroy(&U);
-
-<a name="line143">143: </a>    <font color="#B22222">/* Move restart vector and update signature */</font>
-<a name="line144">144: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
-<a name="line145">145: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
-<a name="line146">146: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_D,&omega);
-<a name="line147">147: </a>      VecCreateSeq(PETSC_COMM_SELF,k+l,&vomega);
-<a name="line148">148: </a>      VecGetArray(vomega,&aux);
-<a name="line149">149: </a>      <font color="#4169E1">for</font> (i=0;i<k+l;i++) aux[i] = omega[i];
-<a name="line150">150: </a>      VecRestoreArray(vomega,&aux);
-<a name="line151">151: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,k+l);
-<a name="line152">152: </a>      <a href="../../../../../docs/manualpages/BV/BVSetSignature.html#BVSetSignature">BVSetSignature</a>(eps->V,vomega);
-<a name="line153">153: </a>      VecDestroy(&vomega);
-<a name="line154">154: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_D,&omega);
-<a name="line155">155: </a>    }
-
-<a name="line157">157: </a>    eps->nconv = k;
-<a name="line158">158: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,nv);
-<a name="line159">159: </a>  }
-<a name="line160">160: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
-<a name="line161">161: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line162">162: </a>  <font color="#4169E1">return</font>(0);
-<a name="line163">163: </a>}
+<a name="line100">100: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line101">101: </a>    nconv = k;
+
+<a name="line103">103: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line104">104: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line105">105: </a>    <font color="#4169E1">else</font> {
+<a name="line106">106: </a>      l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line107">107: </a>      l = PetscMin(l,t);
+<a name="line108">108: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line109">109: </a>      <font color="#4169E1">if</font> (*(a+ld+k+l-1)!=0) {
+<a name="line110">110: </a>        <font color="#4169E1">if</font> (k+l<t-1) l = l+1;
+<a name="line111">111: </a>        <font color="#4169E1">else</font> l = l-1;
+<a name="line112">112: </a>      }
+<a name="line113">113: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line114">114: </a>    }
+<a name="line115">115: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+
+<a name="line117">117: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line118">118: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line119">119: </a>        SETERRQ1(PetscObjectComm((PetscObject)eps),PETSC_ERR_CONV_FAILED,<font color="#666666">"Breakdown in Indefinite Krylov-Schur (beta=%g)"</font>,beta);
+<a name="line120">120: </a>      } <font color="#4169E1">else</font> {
+<a name="line121">121: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line122">122: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line123">123: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line124">124: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_D,&omega);
+<a name="line125">125: </a>        b = a + ld;
+<a name="line126">126: </a>        r = a + 2*ld;
+<a name="line127">127: </a>        <font color="#4169E1">for</font> (i=k;i<k+l;i++) {
+<a name="line128">128: </a>          r[i] = PetscRealPart(Q[nv-1+i*ld]*beta);
+<a name="line129">129: </a>        }
+<a name="line130">130: </a>        b[k+l-1] = r[k+l-1];
+<a name="line131">131: </a>        omega[k+l] = omega[nv];
+<a name="line132">132: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line133">133: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line134">134: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_D,&omega);
+<a name="line135">135: </a>      }
+<a name="line136">136: </a>    }
+<a name="line137">137: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line138">138: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
+<a name="line139">139: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
+<a name="line140">140: </a>    MatDestroy(&U);
+
+<a name="line142">142: </a>    <font color="#B22222">/* Move restart vector and update signature */</font>
+<a name="line143">143: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
+<a name="line144">144: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
+<a name="line145">145: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_D,&omega);
+<a name="line146">146: </a>      VecCreateSeq(PETSC_COMM_SELF,k+l,&vomega);
+<a name="line147">147: </a>      VecGetArray(vomega,&aux);
+<a name="line148">148: </a>      <font color="#4169E1">for</font> (i=0;i<k+l;i++) aux[i] = omega[i];
+<a name="line149">149: </a>      VecRestoreArray(vomega,&aux);
+<a name="line150">150: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,k+l);
+<a name="line151">151: </a>      <a href="../../../../../docs/manualpages/BV/BVSetSignature.html#BVSetSignature">BVSetSignature</a>(eps->V,vomega);
+<a name="line152">152: </a>      VecDestroy(&vomega);
+<a name="line153">153: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_D,&omega);
+<a name="line154">154: </a>    }
+
+<a name="line156">156: </a>    eps->nconv = k;
+<a name="line157">157: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,nv);
+<a name="line158">158: </a>  }
+<a name="line159">159: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
+<a name="line160">160: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line161">161: </a>  <font color="#4169E1">return</font>(0);
+<a name="line162">162: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/krylovschur/ks-slice.c b/src/eps/impls/krylov/krylovschur/ks-slice.c
index 442a437..80746b6 100644
--- a/src/eps/impls/krylov/krylovschur/ks-slice.c
+++ b/src/eps/impls/krylov/krylovschur/ks-slice.c
@@ -16,7 +16,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,6 +37,19 @@
 #include <slepc/private/epsimpl.h>
 #include "krylovschur.h"
 
+static PetscBool  cited = PETSC_FALSE;
+static const char citation[] =
+  "@Article{slepc-slice,\n"
+  "   author = \"C. Campos and J. E. Roman\",\n"
+  "   title = \"Strategies for spectrum slicing based on restarted {Lanczos} methods\",\n"
+  "   journal = \"Numer. Algorithms\",\n"
+  "   volume = \"60\",\n"
+  "   number = \"2\",\n"
+  "   pages = \"279--295\",\n"
+  "   year = \"2012,\"\n"
+  "   doi = \"http://dx.doi.org/10.1007/s11075-012-9564-z\"\n"
+  "}\n";
+
 #define SLICE_PTOL PETSC_SQRT_MACHINE_EPSILON
 
 #undef __FUNCT__
@@ -64,7 +77,7 @@ static PetscErrorCode EPSSliceResetSR(EPS eps) {
     }
     ierr = PetscFree(sr);CHKERRQ(ierr);
   }
-  ctx->sr = PETSC_NULL;
+  ctx->sr = NULL;
   PetscFunctionReturn(0);
 }
 
@@ -92,6 +105,12 @@ PetscErrorCode EPSReset_KrylovSchur_Slice(EPS eps)
   ierr = EPSSliceResetSR(eps);CHKERRQ(ierr);
   ierr = PetscFree(ctx->inertias);CHKERRQ(ierr);
   ierr = PetscFree(ctx->shifts);CHKERRQ(ierr);
+  if (ctx->npart>1) {
+    ierr = ISDestroy(&ctx->isrow);CHKERRQ(ierr);
+    ierr = ISDestroy(&ctx->iscol);CHKERRQ(ierr);
+    ierr = MatDestroyMatrices(1,&ctx->submata);CHKERRQ(ierr);
+    ierr = MatDestroyMatrices(1,&ctx->submatb);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
@@ -169,6 +188,8 @@ static PetscErrorCode EPSSliceGetEPS(EPS eps)
   KSP                ksp;
   KSPType            ksptype;
   STType             sttype;
+  PetscObjectState   Astate,Bstate=0;
+  PetscObjectId      Aid,Bid=0;
   const MatSolverPackage stype;
 
   PetscFunctionBegin;
@@ -176,9 +197,15 @@ static PetscErrorCode EPSSliceGetEPS(EPS eps)
   if (ctx->npart==1) {
     if (!ctx->eps) { ierr = EPSCreate(((PetscObject)eps)->comm,&ctx->eps);CHKERRQ(ierr); }
     ierr = EPSSetType(ctx->eps,((PetscObject)eps)->type_name);CHKERRQ(ierr);
-    ierr = EPSSetST(ctx->eps,eps->st);CHKERRQ(ierr);
+    ierr = EPSSetOperators(ctx->eps,A,B);CHKERRQ(ierr);
     a = eps->inta; b = eps->intb;
   } else {
+    ierr = PetscObjectStateGet((PetscObject)A,&Astate);CHKERRQ(ierr);
+    ierr = PetscObjectGetId((PetscObject)A,&Aid);CHKERRQ(ierr);
+    if (B) {
+      ierr = PetscObjectStateGet((PetscObject)B,&Bstate);CHKERRQ(ierr);
+      ierr = PetscObjectGetId((PetscObject)B,&Bid);CHKERRQ(ierr);
+    }
     if (!ctx->subc) {
       /* Create context for subcommunicators */
       ierr = PetscSubcommCreate(PetscObjectComm((PetscObject)eps),&ctx->subc);CHKERRQ(ierr);
@@ -188,7 +215,28 @@ static PetscErrorCode EPSSliceGetEPS(EPS eps)
 
       /* Duplicate matrices */
       ierr = MatCreateRedundantMatrix(A,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Ar);CHKERRQ(ierr);
-      if (B) { ierr = MatCreateRedundantMatrix(B,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Br);CHKERRQ(ierr); }
+      ctx->Astate = Astate;
+      ctx->Aid = Aid;
+      if (B) {
+        ierr = MatCreateRedundantMatrix(B,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Br);CHKERRQ(ierr);
+        ctx->Bstate = Bstate;
+        ctx->Bid = Bid;
+      }
+    } else {
+      if (ctx->Astate != Astate || (B && ctx->Bstate != Bstate) || ctx->Aid != Aid || (B && ctx->Bid != Bid)) {
+        ierr = EPSGetOperators(ctx->eps,&Ar,&Br);CHKERRQ(ierr);
+        ierr = MatCreateRedundantMatrix(A,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Ar);CHKERRQ(ierr);
+        ctx->Astate = Astate;
+        ctx->Aid = Aid;
+        if (B) {
+          ierr = MatCreateRedundantMatrix(B,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Br);CHKERRQ(ierr);
+          ctx->Bstate = Bstate;
+          ctx->Bid = Bid;
+        }
+        ierr = EPSSetOperators(ctx->eps,Ar,Br);CHKERRQ(ierr);
+        ierr = MatDestroy(&Ar);CHKERRQ(ierr);
+        ierr = MatDestroy(&Br);CHKERRQ(ierr);
+      }
     }
 
     /* Determine subintervals */
@@ -213,21 +261,6 @@ static PetscErrorCode EPSSliceGetEPS(EPS eps)
       ierr = MatDestroy(&Ar);CHKERRQ(ierr);
       ierr = MatDestroy(&Br);CHKERRQ(ierr);
     }
-    ierr = EPSSetType(ctx->eps,((PetscObject)eps)->type_name);CHKERRQ(ierr);
-
-    /* Transfer options for ST, KSP and PC */
-    ierr = STGetType(eps->st,&sttype);CHKERRQ(ierr);
-    ierr = STSetType(ctx->eps->st,sttype);CHKERRQ(ierr);
-    ierr = STGetKSP(eps->st,&ksp);CHKERRQ(ierr);
-    ierr = KSPGetType(ksp,&ksptype);CHKERRQ(ierr);
-    ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
-    ierr = PCGetType(pc,&pctype);CHKERRQ(ierr);
-    ierr = PCFactorGetMatSolverPackage(pc,&stype);CHKERRQ(ierr);
-    ierr = STGetKSP(ctx->eps->st,&ksp);CHKERRQ(ierr);
-    ierr = KSPSetType(ksp,ksptype);CHKERRQ(ierr);
-    ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
-    ierr = PCSetType(pc,pctype);CHKERRQ(ierr);
-    ierr = PCFactorSetMatSolverPackage(pc,stype);CHKERRQ(ierr);
 
     /* Create subcommunicator grouping processes with same rank */
     if (ctx->commset) { ierr = MPI_Comm_free(&ctx->commrank);CHKERRQ(ierr); }
@@ -235,6 +268,22 @@ static PetscErrorCode EPSSliceGetEPS(EPS eps)
     ierr = MPI_Comm_split(((PetscObject)eps)->comm,rank,ctx->subc->color,&ctx->commrank);CHKERRQ(ierr);
     ctx->commset = PETSC_TRUE;
   }
+  ierr = EPSSetType(ctx->eps,((PetscObject)eps)->type_name);CHKERRQ(ierr);
+
+  /* Transfer options for ST, KSP and PC */
+  ierr = STGetType(eps->st,&sttype);CHKERRQ(ierr);
+  ierr = STSetType(ctx->eps->st,sttype);CHKERRQ(ierr);
+  ierr = STGetKSP(eps->st,&ksp);CHKERRQ(ierr);
+  ierr = KSPGetType(ksp,&ksptype);CHKERRQ(ierr);
+  ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
+  ierr = PCGetType(pc,&pctype);CHKERRQ(ierr);
+  ierr = PCFactorGetMatSolverPackage(pc,&stype);CHKERRQ(ierr);
+  ierr = STGetKSP(ctx->eps->st,&ksp);CHKERRQ(ierr);
+  ierr = KSPSetType(ksp,ksptype);CHKERRQ(ierr);
+  ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
+  ierr = PCSetType(pc,pctype);CHKERRQ(ierr);
+  if (stype) { ierr = PCFactorSetMatSolverPackage(pc,stype);CHKERRQ(ierr); }
+
   ierr = EPSSetConvergenceTest(ctx->eps,eps->conv);CHKERRQ(ierr);
   ierr = EPSSetInterval(ctx->eps,a,b);CHKERRQ(ierr);
   ctx_local = (EPS_KRYLOVSCHUR*)ctx->eps->data;
@@ -284,6 +333,7 @@ static PetscErrorCode EPSSliceGetInertia(EPS eps,PetscReal shift,PetscInt *inert
   KSP            ksp;
   PC             pc;
   Mat            F;
+  PetscReal      nzshift;
 
   PetscFunctionBegin;
   if (shift >= PETSC_MAX_REAL) { /* Right-open interval */
@@ -292,7 +342,11 @@ static PetscErrorCode EPSSliceGetInertia(EPS eps,PetscReal shift,PetscInt *inert
     if (inertia) *inertia = 0;
     if (zeros) *zeros = 0;
   } else {
-    ierr = STSetShift(eps->st,shift);CHKERRQ(ierr);
+    /* If the shift is zero, perturb it to a very small positive value.
+       The goal is that the nonzero pattern is the same in all cases and reuse
+       the symbolic factorizations */
+    nzshift = (shift==0.0)? 10.0/PETSC_MAX_REAL: shift;
+    ierr = STSetShift(eps->st,nzshift);CHKERRQ(ierr);
     ierr = STSetUp(eps->st);CHKERRQ(ierr);
     ierr = STGetKSP(eps->st,&ksp);CHKERRQ(ierr);
     ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
@@ -313,6 +367,7 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
   PetscInt        nEigs,dssz=1,i,zeros=0,off=0;
   PetscMPIInt     nproc,rank,aux;
   MPI_Request     req;
+  Mat             A,B=NULL;
 
   PetscFunctionBegin;
   if (ctx->global) {
@@ -327,8 +382,8 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
     if (!issinv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"Shift-and-invert or Cayley ST is needed for spectrum slicing");
     if (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL*1e-2;  /* use tighter tolerance */
     if (!eps->max_it) eps->max_it = 100;
-    if (ctx->nev==1) ctx->nev = 40;  /* nev not set, use default value */
-    if (ctx->nev<10) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,"nev cannot be less than 10 in spectrum slicing runs");
+    if (ctx->nev==1) ctx->nev = PetscMin(40,eps->n);  /* nev not set, use default value */
+    if (eps->n>10 && ctx->nev<10) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,"nev cannot be less than 10 in spectrum slicing runs");
   }
   eps->ops->backtransform = NULL;
 
@@ -356,14 +411,12 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
       sr->int0 = eps->intb;
       sr->int1 = eps->inta;
       sr->dir = -1;
-      sr->hasEnd = (eps->inta <= PETSC_MIN_REAL)?PETSC_FALSE:PETSC_TRUE;
+      sr->hasEnd = PetscNot(eps->inta <= PETSC_MIN_REAL);
     }
   }
   if (ctx->global) {
-    if (ctx->npart>1) {
-      /* prevent computation of factorization in global eps unless npart==1 */
-      ierr = STSetTransform(eps->st,PETSC_FALSE);CHKERRQ(ierr);
-    }
+    /* prevent computation of factorization in global eps */
+    ierr = STSetTransform(eps->st,PETSC_FALSE);CHKERRQ(ierr);
     ierr = EPSSetDimensions_Default(eps,ctx->nev,&ctx->ncv,&ctx->mpd);CHKERRQ(ierr);
     /* create subintervals and initialize auxiliary eps for slicing runs */
     ierr = EPSSliceGetEPS(eps);CHKERRQ(ierr);
@@ -416,12 +469,6 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
       else sr->hasEnd = PETSC_TRUE;
     }
 
-    /* last process in eps comm computes inertia1 */
-    if (ctx->npart==1 || ((sr->dir>0 && ctx->subc->color==ctx->npart-1) || (sr->dir<0 && ctx->subc->color==0))) {
-      ierr = EPSSliceGetInertia(eps,sr->int1,&sr->inertia1,ctx->detect?&zeros:NULL);CHKERRQ(ierr);
-      if (zeros) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_USER,"Found singular matrix for the transformed problem in an interval endpoint defined by user");
-    }
-
     /* compute inertia0 */
     ierr = EPSSliceGetInertia(eps,sr->int0,&sr->inertia0,ctx->detect?&zeros:NULL);CHKERRQ(ierr);
     if (zeros) { /* error in factorization */
@@ -441,8 +488,8 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
           ierr = MPI_Isend(&(sr->int0),1,MPIU_REAL,ctx->subc->color-sr->dir,0,ctx->commrank,&req);CHKERRQ(ierr);
         }
         if ((sr->dir>0 && ctx->subc->color<ctx->npart-1)|| (sr->dir<0 && ctx->subc->color>0)) { /* receive inertia1 from neighbour1 */
-          ierr = MPI_Recv(&(sr->inertia1),1,MPIU_INT,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);
-          ierr = MPI_Recv(&(sr->int1),1,MPIU_REAL,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);
+          ierr = MPI_Recv(&(sr->inertia1),1,MPIU_INT,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);CHKERRQ(ierr);
+          ierr = MPI_Recv(&(sr->int1),1,MPIU_REAL,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);CHKERRQ(ierr);
         }
       }
       if ((sr->dir>0 && ctx->subc->color<ctx->npart-1)||(sr->dir<0 && ctx->subc->color>0)) {
@@ -451,6 +498,12 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
       } else sr_glob->inertia1 = sr->inertia1;
     }
 
+    /* last process in eps comm computes inertia1 */
+    if (ctx->npart==1 || ((sr->dir>0 && ctx->subc->color==ctx->npart-1) || (sr->dir<0 && ctx->subc->color==0))) {
+      ierr = EPSSliceGetInertia(eps,sr->int1,&sr->inertia1,ctx->detect?&zeros:NULL);CHKERRQ(ierr);
+      if (zeros) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_USER,"Found singular matrix for the transformed problem in an interval endpoint defined by user");
+    }
+
     /* number of eigenvalues in interval */
     sr->numEigs = (sr->dir)*(sr->inertia1 - sr->inertia0);
     if (ctx->npart>1) {
@@ -462,6 +515,17 @@ PetscErrorCode EPSSetUp_KrylovSchur_Slice(EPS eps)
   ierr = DSSetType(eps->ds,DSHEP);CHKERRQ(ierr);
   ierr = DSSetCompact(eps->ds,PETSC_TRUE);CHKERRQ(ierr);
   ierr = DSAllocate(eps->ds,dssz);CHKERRQ(ierr);
+  /* keep state of subcomm matrices to check that the user does not modify them */
+  ierr = EPSGetOperators(eps,&A,&B);CHKERRQ(ierr);
+  ierr = PetscObjectStateGet((PetscObject)A,&ctx->Astate);CHKERRQ(ierr);
+  ierr = PetscObjectGetId((PetscObject)A,&ctx->Aid);CHKERRQ(ierr);
+  if (B) { 
+    ierr = PetscObjectStateGet((PetscObject)B,&ctx->Bstate);CHKERRQ(ierr);
+    ierr = PetscObjectGetId((PetscObject)B,&ctx->Bid);CHKERRQ(ierr);
+  } else {
+    ctx->Bstate=0;
+    ctx->Bid=0;
+  }
   PetscFunctionReturn(0);
 }
 
@@ -808,7 +872,7 @@ static PetscErrorCode EPSExtractShift(EPS eps)
       newShift = sPres->value*(1.0+SLICE_PTOL);
       if (sr->dir*(sPres->neighb[0] && newShift-sPres->neighb[0]->value) < 0) newShift = (sPres->value+sPres->neighb[0]->value)/2;
       else if (sPres->neighb[1] && sr->dir*(sPres->neighb[1]->value-newShift) < 0) newShift = (sPres->value+sPres->neighb[1]->value)/2;
-      ierr = EPSSliceGetInertia(eps,newShift,&iner,&zeros);
+      ierr = EPSSliceGetInertia(eps,newShift,&iner,&zeros);CHKERRQ(ierr);
       if (zeros) SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_CONV_FAILED,"Inertia computation fails in %g",newShift);
       sPres->value = newShift;
     }
@@ -1038,8 +1102,8 @@ static PetscErrorCode EPSKrylovSchur_Slice(EPS eps)
     if ((sr->dir)*PetscRealPart(eps->eigr[i])>0) sPres->nconv[1]++;
     else sPres->nconv[0]++;
   }
-  sPres->comp[0] = (count0 >= sPres->nsch[0])?PETSC_TRUE:PETSC_FALSE;
-  sPres->comp[1] = (count1 >= sPres->nsch[1])?PETSC_TRUE:PETSC_FALSE;
+  sPres->comp[0] = PetscNot(count0 < sPres->nsch[0]);
+  sPres->comp[1] = PetscNot(count1 < sPres->nsch[1]);
   if (count0 > sPres->nsch[0] || count1 > sPres->nsch[1])SETERRQ(PetscObjectComm((PetscObject)eps),1,"Mismatch between number of values found and information from inertia, consider using EPSKrylovSchurSetDetectZeros()");
   ierr = PetscFree(iwork);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -1282,13 +1346,17 @@ static PetscErrorCode EPSLookForDeflation(EPS eps)
 #define __FUNCT__ "EPSSolve_KrylovSchur_Slice"
 PetscErrorCode EPSSolve_KrylovSchur_Slice(EPS eps)
 {
-  PetscErrorCode  ierr;
-  PetscInt        i,lds;
-  PetscReal       newS;
-  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-  EPS_SR          sr=ctx->sr;
+  PetscErrorCode   ierr;
+  PetscInt         i,lds;
+  PetscReal        newS;
+  EPS_KRYLOVSCHUR  *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+  EPS_SR           sr=ctx->sr;
+  Mat              A,B=NULL;
+  PetscObjectState Astate,Bstate=0;
+  PetscObjectId    Aid,Bid=0;
 
   PetscFunctionBegin;
+  ierr = PetscCitationsRegister(citation,&cited);CHKERRQ(ierr);
   if (ctx->global) {
     ierr = EPSSolve_KrylovSchur_Slice(ctx->eps);CHKERRQ(ierr);
     ctx->eps->state = EPS_STATE_SOLVED;
@@ -1311,6 +1379,15 @@ PetscErrorCode EPSSolve_KrylovSchur_Slice(EPS eps)
       sr->errest = ctx->eps->errest;
       sr->V      = ctx->eps->V;
     }
+    /* Check that the user did not modify subcomm matrices */
+    ierr = EPSGetOperators(eps,&A,&B);CHKERRQ(ierr);
+    ierr = PetscObjectStateGet((PetscObject)A,&Astate);CHKERRQ(ierr);
+    ierr = PetscObjectGetId((PetscObject)A,&Aid);CHKERRQ(ierr);
+    if (B) { 
+      ierr = PetscObjectStateGet((PetscObject)B,&Bstate);CHKERRQ(ierr);
+      ierr = PetscObjectGetId((PetscObject)B,&Bid);CHKERRQ(ierr);
+    }
+    if (Astate!=ctx->Astate || (B && Bstate!=ctx->Bstate) || Aid!=ctx->Aid || (B && Bid!=ctx->Bid)) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"Subcomm matrices have been modified by user");
     /* Only with eigenvalues present in the interval ...*/
     if (sr->numEigs==0) {
       eps->reason = EPS_CONVERGED_TOL;
diff --git a/src/eps/impls/krylov/krylovschur/ks-slice.c.html b/src/eps/impls/krylov/krylovschur/ks-slice.c.html
index d4a9a80..1b46dda 100644
--- a/src/eps/impls/krylov/krylovschur/ks-slice.c.html
+++ b/src/eps/impls/krylov/krylovschur/ks-slice.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/krylovschur/ks-slice.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:58+00:00">
+<meta name="date" content="2016-05-16T10:32:53+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/ks-slice.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/ks-slice.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "krylovschur"</font>
@@ -28,7 +28,7 @@
 
 <a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -49,1293 +49,1370 @@
 <a name="line37"> 37: </a><font color="#A020F0">#include <slepc/private/epsimpl.h></font>
 <a name="line38"> 38: </a> #include <A href="krylovschur.h.html">krylovschur.h</A>
 
-<a name="line40"> 40: </a><strong><font color="#228B22">#define SLICE_PTOL PETSC_SQRT_MACHINE_EPSILON</font></strong>
-
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="EPSSliceResetSR"></a>static PetscErrorCode EPSSliceResetSR(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong> {
-<a name="line45"> 45: </a>  PetscErrorCode  ierr;
-<a name="line46"> 46: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line47"> 47: </a>  EPS_SR          sr=ctx->sr;
-<a name="line48"> 48: </a>  EPS_shift       s;
-
-<a name="line51"> 51: </a>  <font color="#4169E1">if</font> (sr) {
-<a name="line52"> 52: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line53"> 53: </a>      <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&sr->V);
-<a name="line54"> 54: </a>      PetscFree4(sr->eigr,sr->eigi,sr->errest,sr->perm);
-<a name="line55"> 55: </a>    }
-<a name="line56"> 56: </a>    <font color="#B22222">/* Reviewing list of shifts to free memory */</font>
-<a name="line57"> 57: </a>    s = sr->s0;
-<a name="line58"> 58: </a>    <font color="#4169E1">if</font> (s) {
-<a name="line59"> 59: </a>      <font color="#4169E1">while</font> (s->neighb[1]) {
-<a name="line60"> 60: </a>        s = s->neighb[1];
-<a name="line61"> 61: </a>        PetscFree(s->neighb[0]);
-<a name="line62"> 62: </a>      }
-<a name="line63"> 63: </a>      PetscFree(s);
-<a name="line64"> 64: </a>    }
-<a name="line65"> 65: </a>    PetscFree(sr);
-<a name="line66"> 66: </a>  }
-<a name="line67"> 67: </a>  ctx->sr = PETSC_NULL;
-<a name="line68"> 68: </a>  <font color="#4169E1">return</font>(0);
-<a name="line69"> 69: </a>}
-
-<a name="line73"> 73: </a><strong><font color="#4169E1"><a name="EPSReset_KrylovSchur_Slice"></a>PetscErrorCode EPSReset_KrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line74"> 74: </a>{
-<a name="line75"> 75: </a>  PetscErrorCode  ierr;
-<a name="line76"> 76: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (!ctx->global) <font color="#4169E1">return</font>(0);
-<a name="line80"> 80: </a>  <font color="#B22222">/* Destroy auxiliary <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> */</font>
-<a name="line81"> 81: </a>  EPSSliceResetSR(ctx->eps);
-<a name="line82"> 82: </a>  <a href="../../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
-<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line84"> 84: </a>    PetscSubcommDestroy(&ctx->subc);
-<a name="line85"> 85: </a>    <font color="#4169E1">if</font> (ctx->commset) {
-<a name="line86"> 86: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_free.html#MPI_Comm_free">MPI_Comm_free</a>(&ctx->commrank);
-<a name="line87"> 87: </a>      ctx->commset = PETSC_FALSE;
-<a name="line88"> 88: </a>    }
-<a name="line89"> 89: </a>  }
-<a name="line90"> 90: </a>  PetscFree(ctx->subintervals);
-<a name="line91"> 91: </a>  PetscFree(ctx->nconv_loc);
-<a name="line92"> 92: </a>  EPSSliceResetSR(eps);
-<a name="line93"> 93: </a>  PetscFree(ctx->inertias);
-<a name="line94"> 94: </a>  PetscFree(ctx->shifts);
-<a name="line95"> 95: </a>  <font color="#4169E1">return</font>(0);
-<a name="line96"> 96: </a>}
-
-<a name="line100">100: </a><font color="#B22222">/*</font>
-<a name="line101">101: </a><font color="#B22222">  EPSSliceAllocateSolution - Allocate memory storage for common variables such</font>
-<a name="line102">102: </a><font color="#B22222">  as eigenvalues and eigenvectors. The argument extra is used for methods</font>
-<a name="line103">103: </a><font color="#B22222">  that require a working basis slightly larger than ncv.</font>
-<a name="line104">104: </a><font color="#B22222">*/</font>
-<a name="line105">105: </a><strong><font color="#4169E1"><a name="EPSSliceAllocateSolution"></a>static PetscErrorCode EPSSliceAllocateSolution(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt extra)</font></strong>
-<a name="line106">106: </a>{
-<a name="line107">107: </a>  PetscErrorCode     ierr;
-<a name="line108">108: </a>  EPS_KRYLOVSCHUR    *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line109">109: </a>  PetscReal          eta;
-<a name="line110">110: </a>  PetscInt           k;
-<a name="line111">111: </a>  PetscLogDouble     cnt;
-<a name="line112">112: </a>  <a href="../../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>             type;
-<a name="line113">113: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       orthog_type;
-<a name="line114">114: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> orthog_ref;
-<a name="line115">115: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  ob_type;
-<a name="line116">116: </a>  Mat                matrix;
-<a name="line117">117: </a>  Vec                t;
-<a name="line118">118: </a>  EPS_SR             sr = ctx->sr;
-
-<a name="line121">121: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
-<a name="line122">122: </a>  k = PetscMax(1,sr->numEigs);
-<a name="line123">123: </a>  PetscFree4(sr->eigr,sr->eigi,sr->errest,sr->perm);
-<a name="line124">124: </a>  PetscMalloc4(k,&sr->eigr,k,&sr->eigi,k,&sr->errest,k,&sr->perm);
-<a name="line125">125: </a>  cnt = 2*k*<font color="#4169E1">sizeof</font>(PetscScalar) + 2*k*<font color="#4169E1">sizeof</font>(PetscReal) + k*<font color="#4169E1">sizeof</font>(PetscInt);
-<a name="line126">126: </a>  PetscLogObjectMemory((PetscObject)eps,cnt);
-
-<a name="line128">128: </a>  <font color="#B22222">/* allocate sr->V and transfer options from eps->V */</font>
-<a name="line129">129: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&sr->V);
-<a name="line130">130: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)eps),&sr->V);
-<a name="line131">131: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)sr->V);
-<a name="line132">132: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (!((PetscObject)(eps->V))->type_name) {
-<a name="line134">134: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(sr->V,BVSVEC);
-<a name="line135">135: </a>  } <font color="#4169E1">else</font> {
-<a name="line136">136: </a>    <a href="../../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(eps->V,&type);
-<a name="line137">137: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(sr->V,type);
-<a name="line138">138: </a>  }
-<a name="line139">139: </a>  <a href="../../../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(eps->st,&t,NULL);
-<a name="line140">140: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(sr->V,t,k);
-<a name="line141">141: </a>  VecDestroy(&t);
-<a name="line142">142: </a>  EPS_SetInnerProduct(eps);
-<a name="line143">143: </a>  <a href="../../../../../docs/manualpages/BV/BVGetMatrix.html#BVGetMatrix">BVGetMatrix</a>(eps->V,&matrix,NULL);
-<a name="line144">144: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(sr->V,matrix,PETSC_FALSE);
-<a name="line145">145: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(eps->V,&orthog_type,&orthog_ref,&eta,&ob_type);
-<a name="line146">146: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(sr->V,orthog_type,orthog_ref,eta,ob_type);
-<a name="line147">147: </a>  <font color="#4169E1">return</font>(0);
-<a name="line148">148: </a>}
-
-<a name="line152">152: </a><strong><font color="#4169E1"><a name="EPSSliceGetEPS"></a>static PetscErrorCode EPSSliceGetEPS(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line153">153: </a>{
-<a name="line154">154: </a>  PetscErrorCode     ierr;
-<a name="line155">155: </a>  EPS_KRYLOVSCHUR    *ctx=(EPS_KRYLOVSCHUR*)eps->data,*ctx_local;
-<a name="line156">156: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>                 V;
-<a name="line157">157: </a>  <a href="../../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>             type;
-<a name="line158">158: </a>  PetscReal          eta;
-<a name="line159">159: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       orthog_type;
-<a name="line160">160: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> orthog_ref;
-<a name="line161">161: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  ob_type;
-<a name="line162">162: </a>  Mat                A,B=NULL,Ar,Br=NULL;
-<a name="line163">163: </a>  PetscInt           i;
-<a name="line164">164: </a>  PetscReal          h,a,b;
-<a name="line165">165: </a>  PetscMPIInt        rank;
-<a name="line166">166: </a>  EPS_SR             sr=ctx->sr;
-<a name="line167">167: </a>  PC                 pc;
-<a name="line168">168: </a>  PCType             pctype;
-<a name="line169">169: </a>  KSP                ksp;
-<a name="line170">170: </a>  KSPType            ksptype;
-<a name="line171">171: </a>  <a href="../../../../../docs/manualpages/ST/STType.html#STType">STType</a>             sttype;
-<a name="line172">172: </a>  const MatSolverPackage stype;
-
-<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,&B);
-<a name="line176">176: </a>  <font color="#4169E1">if</font> (ctx->npart==1) {
-<a name="line177">177: </a>    <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(((PetscObject)eps)->comm,&ctx->eps); }
-<a name="line178">178: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(ctx->eps,((PetscObject)eps)->type_name);
-<a name="line179">179: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>(ctx->eps,eps->st);
-<a name="line180">180: </a>    a = eps->inta; b = eps->intb;
-<a name="line181">181: </a>  } <font color="#4169E1">else</font> {
-<a name="line182">182: </a>    <font color="#4169E1">if</font> (!ctx->subc) {
-<a name="line183">183: </a>      <font color="#B22222">/* Create context for subcommunicators */</font>
-<a name="line184">184: </a>      PetscSubcommCreate(PetscObjectComm((PetscObject)eps),&ctx->subc);
-<a name="line185">185: </a>      PetscSubcommSetNumber(ctx->subc,ctx->npart);
-<a name="line186">186: </a>      PetscSubcommSetType(ctx->subc,PETSC_SUBCOMM_CONTIGUOUS);
-<a name="line187">187: </a>      PetscLogObjectMemory((PetscObject)eps,<font color="#4169E1">sizeof</font>(PetscSubcomm));
-
-<a name="line189">189: </a>      <font color="#B22222">/* Duplicate matrices */</font>
-<a name="line190">190: </a>      MatCreateRedundantMatrix(A,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Ar);
-<a name="line191">191: </a>      <font color="#4169E1">if</font> (B) { MatCreateRedundantMatrix(B,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Br); }
-<a name="line192">192: </a>    }
-
-<a name="line194">194: </a>    <font color="#B22222">/* Determine subintervals */</font>
-<a name="line195">195: </a>    <font color="#4169E1">if</font> (!ctx->subintset) { <font color="#B22222">/* uniform distribution if no set by user */</font>
-<a name="line196">196: </a>      <font color="#4169E1">if</font> (!sr->hasEnd) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Global interval must be bounded for splitting it in uniform subintervals"</font>);
-<a name="line197">197: </a>      h = (eps->intb-eps->inta)/ctx->npart;
-<a name="line198">198: </a>      a = eps->inta+ctx->subc->color*h;
-<a name="line199">199: </a>      b = (ctx->subc->color==ctx->npart-1)?eps->intb:eps->inta+(ctx->subc->color+1)*h;
-<a name="line200">200: </a>      PetscFree(ctx->subintervals);
-<a name="line201">201: </a>      PetscMalloc1(ctx->npart+1,&ctx->subintervals);
-<a name="line202">202: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) ctx->subintervals[i] = eps->inta+h*i;
-<a name="line203">203: </a>      ctx->subintervals[ctx->npart] = eps->intb;
-<a name="line204">204: </a>    } <font color="#4169E1">else</font> {
-<a name="line205">205: </a>      a = ctx->subintervals[ctx->subc->color];
-<a name="line206">206: </a>      b = ctx->subintervals[ctx->subc->color+1];
-<a name="line207">207: </a>    }
-
-<a name="line209">209: </a>    <font color="#4169E1">if</font> (!ctx->eps) {
-<a name="line210">210: </a>      <font color="#B22222">/* Create auxiliary <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> */</font>
-<a name="line211">211: </a>      <a href="../../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscSubcommChild(ctx->subc),&ctx->eps);
-<a name="line212">212: </a>      <a href="../../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,Ar,Br);
-<a name="line213">213: </a>      MatDestroy(&Ar);
-<a name="line214">214: </a>      MatDestroy(&Br);
-<a name="line215">215: </a>    }
-<a name="line216">216: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(ctx->eps,((PetscObject)eps)->type_name);
-
-<a name="line218">218: </a>    <font color="#B22222">/* Transfer options for <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>, KSP and PC */</font>
-<a name="line219">219: </a>    <a href="../../../../../docs/manualpages/ST/STGetType.html#STGetType">STGetType</a>(eps->st,&sttype);
-<a name="line220">220: </a>    <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(ctx->eps->st,sttype);
-<a name="line221">221: </a>    <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line222">222: </a>    KSPGetType(ksp,&ksptype);
-<a name="line223">223: </a>    KSPGetPC(ksp,&pc);
-<a name="line224">224: </a>    PCGetType(pc,&pctype);
-<a name="line225">225: </a>    PCFactorGetMatSolverPackage(pc,&stype);
-<a name="line226">226: </a>    <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(ctx->eps->st,&ksp);
-<a name="line227">227: </a>    KSPSetType(ksp,ksptype);
-<a name="line228">228: </a>    KSPGetPC(ksp,&pc);
-<a name="line229">229: </a>    PCSetType(pc,pctype);
-<a name="line230">230: </a>    PCFactorSetMatSolverPackage(pc,stype);
-
-<a name="line232">232: </a>    <font color="#B22222">/* Create subcommunicator grouping processes with same rank */</font>
-<a name="line233">233: </a>    <font color="#4169E1">if</font> (ctx->commset) { <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_free.html#MPI_Comm_free">MPI_Comm_free</a>(&ctx->commrank); }
-<a name="line234">234: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
-<a name="line235">235: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_split.html#MPI_Comm_split">MPI_Comm_split</a>(((PetscObject)eps)->comm,rank,ctx->subc->color,&ctx->commrank);
-<a name="line236">236: </a>    ctx->commset = PETSC_TRUE;
-<a name="line237">237: </a>  }
-<a name="line238">238: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(ctx->eps,eps->conv);
-<a name="line239">239: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(ctx->eps,a,b);
-<a name="line240">240: </a>  ctx_local = (EPS_KRYLOVSCHUR*)ctx->eps->data;
-<a name="line241">241: </a>  ctx_local->npart = ctx->npart;
-<a name="line242">242: </a>  ctx_local->detect = ctx->detect;
-<a name="line243">243: </a>  ctx_local->global = PETSC_FALSE;
-<a name="line244">244: </a>  ctx_local->eps = eps;
-<a name="line245">245: </a>  ctx_local->subc = ctx->subc;
-<a name="line246">246: </a>  ctx_local->commrank = ctx->commrank;
-
-<a name="line248">248: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(ctx->eps,ctx->nev,ctx->ncv,ctx->mpd);
-<a name="line249">249: </a>  <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(ctx->eps,ctx->lock);
-
-<a name="line251">251: </a>  <font color="#B22222">/* transfer options from eps->V */</font>
-<a name="line252">252: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(ctx->eps,&V);
-<a name="line253">253: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line254">254: </a>  <font color="#4169E1">if</font> (!((PetscObject)(eps->V))->type_name) {
-<a name="line255">255: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(V,BVSVEC);
-<a name="line256">256: </a>  } <font color="#4169E1">else</font> {
-<a name="line257">257: </a>    <a href="../../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(eps->V,&type);
-<a name="line258">258: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(V,type);
-<a name="line259">259: </a>  }
-<a name="line260">260: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(eps->V,&orthog_type,&orthog_ref,&eta,&ob_type);
-<a name="line261">261: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(V,orthog_type,orthog_ref,eta,ob_type);
-<a name="line262">262: </a>  ctx->eps->which = eps->which;
-<a name="line263">263: </a>  ctx->eps->max_it = eps->max_it;
-<a name="line264">264: </a>  ctx->eps->tol = eps->tol;
-<a name="line265">265: </a>  ctx->eps->purify = eps->purify;
-<a name="line266">266: </a>  <font color="#4169E1">if</font> (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL;
-<a name="line267">267: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(ctx->eps,eps->problem_type);
-<a name="line268">268: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(ctx->eps);
-<a name="line269">269: </a>  ctx->eps->nconv = 0;
-<a name="line270">270: </a>  ctx->eps->its   = 0;
-<a name="line271">271: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->eps->ncv;i++) {
-<a name="line272">272: </a>    ctx->eps->eigr[i]   = 0.0;
-<a name="line273">273: </a>    ctx->eps->eigi[i]   = 0.0;
-<a name="line274">274: </a>    ctx->eps->errest[i] = 0.0;
-<a name="line275">275: </a>  }
-<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
-<a name="line277">277: </a>}
-
-<a name="line281">281: </a><strong><font color="#4169E1"><a name="EPSSliceGetInertia"></a>static PetscErrorCode EPSSliceGetInertia(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal shift,PetscInt *inertia,PetscInt *zeros)</font></strong>
-<a name="line282">282: </a>{
-<a name="line284">284: </a>  KSP            ksp;
-<a name="line285">285: </a>  PC             pc;
-<a name="line286">286: </a>  Mat            F;
-
-<a name="line289">289: </a>  <font color="#4169E1">if</font> (shift >= PETSC_MAX_REAL) { <font color="#B22222">/* Right-open interval */</font>
-<a name="line290">290: </a>    <font color="#4169E1">if</font> (inertia) *inertia = eps->n;
-<a name="line291">291: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (shift <= PETSC_MIN_REAL) {
-<a name="line292">292: </a>    <font color="#4169E1">if</font> (inertia) *inertia = 0;
-<a name="line293">293: </a>    <font color="#4169E1">if</font> (zeros) *zeros = 0;
-<a name="line294">294: </a>  } <font color="#4169E1">else</font> {
-<a name="line295">295: </a>    <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,shift);
-<a name="line296">296: </a>    <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
-<a name="line297">297: </a>    <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line298">298: </a>    KSPGetPC(ksp,&pc);
-<a name="line299">299: </a>    PCFactorGetMatrix(pc,&F);
-<a name="line300">300: </a>    MatGetInertia(F,inertia,zeros,NULL);
-<a name="line301">301: </a>  }
-<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
-<a name="line303">303: </a>}
-
-<a name="line307">307: </a><strong><font color="#4169E1"><a name="EPSSetUp_KrylovSchur_Slice"></a>PetscErrorCode EPSSetUp_KrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line308">308: </a>{
-<a name="line309">309: </a>  PetscErrorCode  ierr;
-<a name="line310">310: </a>  PetscBool       issinv;
-<a name="line311">311: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data,*ctx_glob;
-<a name="line312">312: </a>  EPS_SR          sr,sr_loc,sr_glob;
-<a name="line313">313: </a>  PetscInt        nEigs,dssz=1,i,zeros=0,off=0;
-<a name="line314">314: </a>  PetscMPIInt     nproc,rank,aux;
-<a name="line315">315: </a>  MPI_Request     req;
-
-<a name="line318">318: </a>  <font color="#4169E1">if</font> (ctx->global) {
-<a name="line319">319: </a>    <font color="#4169E1">if</font> (eps->inta==0.0 && eps->intb==0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Must define a computational interval when using EPS_ALL"</font>);
-<a name="line320">320: </a>    <font color="#4169E1">if</font> (eps->intb >= PETSC_MAX_REAL && eps->inta <= PETSC_MIN_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"The defined computational interval should have at least one of their sides bounded"</font>);
-<a name="line321">321: </a>    <font color="#4169E1">if</font> (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectrum slicing only available for symmetric/Hermitian eigenproblems"</font>);
-<a name="line322">322: </a>    <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs cannot be used with spectrum slicing"</font>);
-<a name="line323">323: </a>    <font color="#4169E1">if</font> (!((PetscObject)(eps->st))->type_name) { <font color="#B22222">/* default to shift-and-invert */</font>
-<a name="line324">324: </a>      <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSINVERT);
-<a name="line325">325: </a>    }
-<a name="line326">326: </a>    PetscObjectTypeCompareAny((PetscObject)eps->st,&issinv,STSINVERT,STCAYLEY,<font color="#666666">""</font>);
-<a name="line327">327: </a>    <font color="#4169E1">if</font> (!issinv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Shift-and-invert or Cayley <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> is needed for spectrum slicing"</font>);
-<a name="line328">328: </a>    <font color="#4169E1">if</font> (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL*1e-2;  <font color="#B22222">/* use tighter tolerance */</font>
-<a name="line329">329: </a>    <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = 100;
-<a name="line330">330: </a>    <font color="#4169E1">if</font> (ctx->nev==1) ctx->nev = 40;  <font color="#B22222">/* nev not set, use default value */</font>
-<a name="line331">331: </a>    <font color="#4169E1">if</font> (ctx->nev<10) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"nev cannot be less than 10 in spectrum slicing runs"</font>);
-<a name="line332">332: </a>  }
-<a name="line333">333: </a>  eps->ops->backtransform = NULL;
-
-<a name="line335">335: </a>  <font color="#B22222">/* create spectrum slicing context and initialize it */</font>
-<a name="line336">336: </a>  EPSSliceResetSR(eps);
-<a name="line337">337: </a>  PetscNewLog(eps,&sr);
-<a name="line338">338: </a>  ctx->sr = sr;
-<a name="line339">339: </a>  sr->itsKs = 0;
-<a name="line340">340: </a>  sr->nleap = 0;
-<a name="line341">341: </a>  sr->nMAXCompl = eps->nev/4;
-<a name="line342">342: </a>  sr->iterCompl = eps->max_it/4;
-<a name="line343">343: </a>  sr->sPres = NULL;
-<a name="line344">344: </a>  sr->nS = 0;
-
-<a name="line346">346: </a>  <font color="#4169E1">if</font> (ctx->npart==1 || ctx->global) {
-<a name="line347">347: </a>    <font color="#B22222">/* check presence of ends and finding direction */</font>
-<a name="line348">348: </a>    <font color="#4169E1">if</font> ((eps->inta > PETSC_MIN_REAL && eps->inta != 0.0) || eps->intb >= PETSC_MAX_REAL) {
-<a name="line349">349: </a>      sr->int0 = eps->inta;
-<a name="line350">350: </a>      sr->int1 = eps->intb;
-<a name="line351">351: </a>      sr->dir = 1;
-<a name="line352">352: </a>      <font color="#4169E1">if</font> (eps->intb >= PETSC_MAX_REAL) { <font color="#B22222">/* Right-open interval */</font>
-<a name="line353">353: </a>        sr->hasEnd = PETSC_FALSE;
-<a name="line354">354: </a>      } <font color="#4169E1">else</font> sr->hasEnd = PETSC_TRUE;
-<a name="line355">355: </a>    } <font color="#4169E1">else</font> {
-<a name="line356">356: </a>      sr->int0 = eps->intb;
-<a name="line357">357: </a>      sr->int1 = eps->inta;
-<a name="line358">358: </a>      sr->dir = -1;
-<a name="line359">359: </a>      sr->hasEnd = (eps->inta <= PETSC_MIN_REAL)?PETSC_FALSE:PETSC_TRUE;
-<a name="line360">360: </a>    }
-<a name="line361">361: </a>  }
-<a name="line362">362: </a>  <font color="#4169E1">if</font> (ctx->global) {
-<a name="line363">363: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line364">364: </a>      <font color="#B22222">/* prevent computation of factorization in global eps unless npart==1 */</font>
-<a name="line365">365: </a>      <a href="../../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>(eps->st,PETSC_FALSE);
-<a name="line366">366: </a>    }
-<a name="line367">367: </a>    EPSSetDimensions_Default(eps,ctx->nev,&ctx->ncv,&ctx->mpd);
-<a name="line368">368: </a>    <font color="#B22222">/* create subintervals and initialize auxiliary eps for slicing runs */</font>
-<a name="line369">369: </a>    EPSSliceGetEPS(eps);
-<a name="line370">370: </a>    sr_loc = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
-<a name="line371">371: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line372">372: </a>      <font color="#4169E1">if</font> ((sr->dir>0&&ctx->subc->color==0)||(sr->dir<0&&ctx->subc->color==ctx->npart-1)) sr->inertia0 = sr_loc->inertia0;
-<a name="line373">373: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
-<a name="line374">374: </a>      <font color="#4169E1">if</font> (rank==0) {
-<a name="line375">375: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->inertia0,1,MPIU_INT,(sr->dir>0)?0:ctx->npart-1,ctx->commrank);
-<a name="line376">376: </a>      }
-<a name="line377">377: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->inertia0,1,MPIU_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line378">378: </a>      PetscFree(ctx->nconv_loc);
-<a name="line379">379: </a>      PetscMalloc1(ctx->npart,&ctx->nconv_loc);
-<a name="line380">380: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(((PetscObject)eps)->comm,&nproc);
-<a name="line381">381: </a>      <font color="#4169E1">if</font> (sr->dir<0) off = 1;
-<a name="line382">382: </a>      <font color="#4169E1">if</font> (nproc%ctx->npart==0) { <font color="#B22222">/* subcommunicators with the same size */</font>
-<a name="line383">383: </a>        PetscMPIIntCast(sr_loc->numEigs,&aux);
-<a name="line384">384: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&aux,1,MPI_INT,ctx->nconv_loc,1,MPI_INT,ctx->commrank);
-<a name="line385">385: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&sr_loc->int0,1,MPIU_REAL,ctx->subintervals+off,1,MPIU_REAL,ctx->commrank);
-<a name="line386">386: </a>      } <font color="#4169E1">else</font> {
-<a name="line387">387: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
-<a name="line388">388: </a>        <font color="#4169E1">if</font> (!rank) {
-<a name="line389">389: </a>          PetscMPIIntCast(sr_loc->numEigs,&aux);
-<a name="line390">390: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&aux,1,MPI_INT,ctx->nconv_loc,1,MPI_INT,ctx->commrank);
-<a name="line391">391: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&sr_loc->int0,1,MPIU_REAL,ctx->subintervals+off,1,MPIU_REAL,ctx->commrank);
-<a name="line392">392: </a>        }
-<a name="line393">393: </a>        PetscMPIIntCast(ctx->npart,&aux);
-<a name="line394">394: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->nconv_loc,aux,MPI_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line395">395: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->subintervals+off,aux,MPIU_REAL,0,PetscSubcommChild(ctx->subc));
-<a name="line396">396: </a>      }
-<a name="line397">397: </a>      nEigs = 0;
-<a name="line398">398: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) nEigs += ctx->nconv_loc[i];
-<a name="line399">399: </a>    } <font color="#4169E1">else</font> {
-<a name="line400">400: </a>      nEigs = sr_loc->numEigs;
-<a name="line401">401: </a>      sr->inertia0 = sr_loc->inertia0;
-<a name="line402">402: </a>    }
-<a name="line403">403: </a>    sr->inertia1 = sr->inertia0+sr->dir*nEigs;
-<a name="line404">404: </a>    sr->numEigs = nEigs;
-<a name="line405">405: </a>    eps->nev = nEigs;
-<a name="line406">406: </a>    eps->ncv = nEigs;
-<a name="line407">407: </a>    eps->mpd = nEigs;
-<a name="line408">408: </a>  } <font color="#4169E1">else</font> {
-<a name="line409">409: </a>    ctx_glob = (EPS_KRYLOVSCHUR*)ctx->eps->data;
-<a name="line410">410: </a>    sr_glob = ctx_glob->sr;
-<a name="line411">411: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line412">412: </a>      sr->dir = sr_glob->dir;
-<a name="line413">413: </a>      sr->int0 = (sr->dir==1)?eps->inta:eps->intb;
-<a name="line414">414: </a>      sr->int1 = (sr->dir==1)?eps->intb:eps->inta;
-<a name="line415">415: </a>      <font color="#4169E1">if</font> ((sr->dir>0&&ctx->subc->color==ctx->npart-1)||(sr->dir<0&&ctx->subc->color==0)) sr->hasEnd = sr_glob->hasEnd;
-<a name="line416">416: </a>      <font color="#4169E1">else</font> sr->hasEnd = PETSC_TRUE;
-<a name="line417">417: </a>    }
-
-<a name="line419">419: </a>    <font color="#B22222">/* last process in eps comm computes inertia1 */</font>
-<a name="line420">420: </a>    <font color="#4169E1">if</font> (ctx->npart==1 || ((sr->dir>0 && ctx->subc->color==ctx->npart-1) || (sr->dir<0 && ctx->subc->color==0))) {
-<a name="line421">421: </a>      EPSSliceGetInertia(eps,sr->int1,&sr->inertia1,ctx->detect?&zeros:NULL);
-<a name="line422">422: </a>      <font color="#4169E1">if</font> (zeros) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_USER,<font color="#666666">"Found singular matrix for the transformed problem in an interval endpoint defined by user"</font>);
-<a name="line423">423: </a>    }
-
-<a name="line425">425: </a>    <font color="#B22222">/* compute inertia0 */</font>
-<a name="line426">426: </a>    EPSSliceGetInertia(eps,sr->int0,&sr->inertia0,ctx->detect?&zeros:NULL);
-<a name="line427">427: </a>    <font color="#4169E1">if</font> (zeros) { <font color="#B22222">/* error in factorization */</font>
-<a name="line428">428: </a>      <font color="#4169E1">if</font> (ctx->npart==1 || ctx_glob->subintset || ((sr->dir>0 && ctx->subc->color==0) || (sr->dir<0 && ctx->subc->color==ctx->npart-1))) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_USER,<font color="#666666">"Found singular matrix for the transformed problem in an interval endpoint defined by user"</font>);
-<a name="line429">429: </a>      <font color="#4169E1">else</font> { <font color="#B22222">/* perturb shift */</font>
-<a name="line430">430: </a>        sr->int0 *= (1.0+SLICE_PTOL);
-<a name="line431">431: </a>        EPSSliceGetInertia(eps,sr->int0,&sr->inertia0,&zeros);
-<a name="line432">432: </a>        <font color="#4169E1">if</font> (zeros) SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_CONV_FAILED,<font color="#666666">"Inertia computation fails in %g"</font>,sr->int1);
-<a name="line433">433: </a>      }
-<a name="line434">434: </a>    }
-<a name="line435">435: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line436">436: </a>      <font color="#B22222">/* inertia1 is received from neighbour */</font>
-<a name="line437">437: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
-<a name="line438">438: </a>      <font color="#4169E1">if</font> (!rank) {
-<a name="line439">439: </a>        <font color="#4169E1">if</font> ((sr->dir>0 && ctx->subc->color>0) || (sr->dir<0 && ctx->subc->color<ctx->npart-1)) { <font color="#B22222">/* send inertia0 to neighbour0 */</font>
-<a name="line440">440: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Isend.html#MPI_Isend">MPI_Isend</a>(&(sr->inertia0),1,MPIU_INT,ctx->subc->color-sr->dir,0,ctx->commrank,&req);
-<a name="line441">441: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Isend.html#MPI_Isend">MPI_Isend</a>(&(sr->int0),1,MPIU_REAL,ctx->subc->color-sr->dir,0,ctx->commrank,&req);
-<a name="line442">442: </a>        }
-<a name="line443">443: </a>        <font color="#4169E1">if</font> ((sr->dir>0 && ctx->subc->color<ctx->npart-1)|| (sr->dir<0 && ctx->subc->color>0)) { <font color="#B22222">/* receive inertia1 from neighbour1 */</font>
-<a name="line444">444: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Recv.html#MPI_Recv">MPI_Recv</a>(&(sr->inertia1),1,MPIU_INT,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);
-<a name="line445">445: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Recv.html#MPI_Recv">MPI_Recv</a>(&(sr->int1),1,MPIU_REAL,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);
-<a name="line446">446: </a>        }
-<a name="line447">447: </a>      }
-<a name="line448">448: </a>      <font color="#4169E1">if</font> ((sr->dir>0 && ctx->subc->color<ctx->npart-1)||(sr->dir<0 && ctx->subc->color>0)) {
-<a name="line449">449: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->inertia1,1,MPIU_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line450">450: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->int1,1,MPIU_REAL,0,PetscSubcommChild(ctx->subc));
-<a name="line451">451: </a>      } <font color="#4169E1">else</font> sr_glob->inertia1 = sr->inertia1;
-<a name="line452">452: </a>    }
-
-<a name="line454">454: </a>    <font color="#B22222">/* number of eigenvalues in interval */</font>
-<a name="line455">455: </a>    sr->numEigs = (sr->dir)*(sr->inertia1 - sr->inertia0);
-<a name="line456">456: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line457">457: </a>      <font color="#B22222">/* memory allocate for subinterval eigenpairs */</font>
-<a name="line458">458: </a>      EPSSliceAllocateSolution(eps,1);
-<a name="line459">459: </a>    }
-<a name="line460">460: </a>    dssz = eps->ncv+1;
-<a name="line461">461: </a>  }
-<a name="line462">462: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSHEP);
-<a name="line463">463: </a>  <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
-<a name="line464">464: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,dssz);
-<a name="line465">465: </a>  <font color="#4169E1">return</font>(0);
-<a name="line466">466: </a>}
-
-<a name="line470">470: </a><strong><font color="#4169E1"><a name="EPSSliceGatherEigenVectors"></a>static PetscErrorCode EPSSliceGatherEigenVectors(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line471">471: </a>{
-<a name="line472">472: </a>  PetscErrorCode  ierr;
-<a name="line473">473: </a>  Vec             v,vg,v_loc;
-<a name="line474">474: </a>  IS              is1,is2;
-<a name="line475">475: </a>  VecScatter      vec_sc;
-<a name="line476">476: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line477">477: </a>  PetscInt        nloc,m0,n0,i,si,idx,*idx1,*idx2,j;
-<a name="line478">478: </a>  PetscScalar     *array;
-<a name="line479">479: </a>  EPS_SR          sr_loc;
-<a name="line480">480: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>              V_loc;
-
-<a name="line483">483: </a>  sr_loc = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
-<a name="line484">484: </a>  V_loc = sr_loc->V;
-
-<a name="line486">486: </a>  <font color="#B22222">/* Gather parallel eigenvectors */</font>
-<a name="line487">487: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v);
-<a name="line488">488: </a>  VecGetOwnershipRange(v,&n0,&m0);
-<a name="line489">489: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v);
-<a name="line490">490: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->eps->V,0,&v);
-<a name="line491">491: </a>  VecGetLocalSize(v,&nloc);
-<a name="line492">492: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->eps->V,0,&v);
-<a name="line493">493: </a>  PetscMalloc2(m0-n0,&idx1,m0-n0,&idx2);
-<a name="line494">494: </a>  VecCreateMPI(PetscObjectComm((PetscObject)eps),nloc,PETSC_DECIDE,&vg);
-<a name="line495">495: </a>  idx = -1;
-<a name="line496">496: </a>  <font color="#4169E1">for</font> (si=0;si<ctx->npart;si++) {
-<a name="line497">497: </a>    j = 0;
-<a name="line498">498: </a>    <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
-<a name="line499">499: </a>      idx1[j]   = i;
-<a name="line500">500: </a>      idx2[j++] = i+eps->n*si;
-<a name="line501">501: </a>    }
-<a name="line502">502: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)eps),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
-<a name="line503">503: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)eps),(m0-n0),idx2,PETSC_COPY_VALUES,&is2);
-<a name="line504">504: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v);
-<a name="line505">505: </a>    VecScatterCreate(v,is1,vg,is2,&vec_sc);
-<a name="line506">506: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v);
-<a name="line507">507: </a>    ISDestroy(&is1);
-<a name="line508">508: </a>    ISDestroy(&is2);
-<a name="line509">509: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nconv_loc[si];i++) {
-<a name="line510">510: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,++idx,&v);
-<a name="line511">511: </a>      <font color="#4169E1">if</font> (ctx->subc->color==si) {
-<a name="line512">512: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V_loc,i,&v_loc);
-<a name="line513">513: </a>        VecGetArray(v_loc,&array);
-<a name="line514">514: </a>        VecPlaceArray(vg,array);
-<a name="line515">515: </a>      }
-<a name="line516">516: </a>      VecScatterBegin(vec_sc,vg,v,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line517">517: </a>      VecScatterEnd(vec_sc,vg,v,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line518">518: </a>      <font color="#4169E1">if</font> (ctx->subc->color==si) {
-<a name="line519">519: </a>        VecResetArray(vg);
-<a name="line520">520: </a>        VecRestoreArray(v_loc,&array);
-<a name="line521">521: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V_loc,i,&v_loc);
-<a name="line522">522: </a>      }
-<a name="line523">523: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,idx,&v);
-<a name="line524">524: </a>    }
-<a name="line525">525: </a>    VecScatterDestroy(&vec_sc);
-<a name="line526">526: </a>  }
-<a name="line527">527: </a>  PetscFree2(idx1,idx2);
-<a name="line528">528: </a>  VecDestroy(&vg);
+<a name="line40"> 40: </a>static PetscBool  cited = PETSC_FALSE;
+<a name="line41"> 41: </a>static const char citation[] =
+<a name="line42"> 42: </a>  <font color="#666666">"@Article{slepc-slice,\n"</font>
+<a name="line43"> 43: </a>  <font color="#666666">"   author = \"C. Campos and J. E. Roman\",\n"</font>
+<a name="line44"> 44: </a>  <font color="#666666">"   title = \"Strategies for spectrum slicing based on restarted {Lanczos} methods\",\n"</font>
+<a name="line45"> 45: </a>  <font color="#666666">"   journal = \"Numer. Algorithms\",\n"</font>
+<a name="line46"> 46: </a>  <font color="#666666">"   volume = \"60\",\n"</font>
+<a name="line47"> 47: </a>  <font color="#666666">"   number = \"2\",\n"</font>
+<a name="line48"> 48: </a>  <font color="#666666">"   pages = \"279--295\",\n"</font>
+<a name="line49"> 49: </a>  <font color="#666666">"   year = \"2012,\"\n"</font>
+<a name="line50"> 50: </a>  <font color="#666666">"   doi = \"http://dx.doi.org/10.1007/s11075-012-9564-z\"\n"</font>
+<a name="line51"> 51: </a>  <font color="#666666">"}\n"</font>;
+
+<a name="line53"> 53: </a><strong><font color="#228B22">#define SLICE_PTOL PETSC_SQRT_MACHINE_EPSILON</font></strong>
+
+<a name="line57"> 57: </a><strong><font color="#4169E1"><a name="EPSSliceResetSR"></a>static PetscErrorCode EPSSliceResetSR(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong> {
+<a name="line58"> 58: </a>  PetscErrorCode  ierr;
+<a name="line59"> 59: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line60"> 60: </a>  EPS_SR          sr=ctx->sr;
+<a name="line61"> 61: </a>  EPS_shift       s;
+
+<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (sr) {
+<a name="line65"> 65: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line66"> 66: </a>      <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&sr->V);
+<a name="line67"> 67: </a>      PetscFree4(sr->eigr,sr->eigi,sr->errest,sr->perm);
+<a name="line68"> 68: </a>    }
+<a name="line69"> 69: </a>    <font color="#B22222">/* Reviewing list of shifts to free memory */</font>
+<a name="line70"> 70: </a>    s = sr->s0;
+<a name="line71"> 71: </a>    <font color="#4169E1">if</font> (s) {
+<a name="line72"> 72: </a>      <font color="#4169E1">while</font> (s->neighb[1]) {
+<a name="line73"> 73: </a>        s = s->neighb[1];
+<a name="line74"> 74: </a>        PetscFree(s->neighb[0]);
+<a name="line75"> 75: </a>      }
+<a name="line76"> 76: </a>      PetscFree(s);
+<a name="line77"> 77: </a>    }
+<a name="line78"> 78: </a>    PetscFree(sr);
+<a name="line79"> 79: </a>  }
+<a name="line80"> 80: </a>  ctx->sr = NULL;
+<a name="line81"> 81: </a>  <font color="#4169E1">return</font>(0);
+<a name="line82"> 82: </a>}
+
+<a name="line86"> 86: </a><strong><font color="#4169E1"><a name="EPSReset_KrylovSchur_Slice"></a>PetscErrorCode EPSReset_KrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line87"> 87: </a>{
+<a name="line88"> 88: </a>  PetscErrorCode  ierr;
+<a name="line89"> 89: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (!ctx->global) <font color="#4169E1">return</font>(0);
+<a name="line93"> 93: </a>  <font color="#B22222">/* Destroy auxiliary <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> */</font>
+<a name="line94"> 94: </a>  EPSSliceResetSR(ctx->eps);
+<a name="line95"> 95: </a>  <a href="../../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
+<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line97"> 97: </a>    PetscSubcommDestroy(&ctx->subc);
+<a name="line98"> 98: </a>    <font color="#4169E1">if</font> (ctx->commset) {
+<a name="line99"> 99: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_free.html#MPI_Comm_free">MPI_Comm_free</a>(&ctx->commrank);
+<a name="line100">100: </a>      ctx->commset = PETSC_FALSE;
+<a name="line101">101: </a>    }
+<a name="line102">102: </a>  }
+<a name="line103">103: </a>  PetscFree(ctx->subintervals);
+<a name="line104">104: </a>  PetscFree(ctx->nconv_loc);
+<a name="line105">105: </a>  EPSSliceResetSR(eps);
+<a name="line106">106: </a>  PetscFree(ctx->inertias);
+<a name="line107">107: </a>  PetscFree(ctx->shifts);
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line109">109: </a>    ISDestroy(&ctx->isrow);
+<a name="line110">110: </a>    ISDestroy(&ctx->iscol);
+<a name="line111">111: </a>    MatDestroyMatrices(1,&ctx->submata);
+<a name="line112">112: </a>    MatDestroyMatrices(1,&ctx->submatb);
+<a name="line113">113: </a>  }
+<a name="line114">114: </a>  <font color="#4169E1">return</font>(0);
+<a name="line115">115: </a>}
+
+<a name="line119">119: </a><font color="#B22222">/*</font>
+<a name="line120">120: </a><font color="#B22222">  EPSSliceAllocateSolution - Allocate memory storage for common variables such</font>
+<a name="line121">121: </a><font color="#B22222">  as eigenvalues and eigenvectors. The argument extra is used for methods</font>
+<a name="line122">122: </a><font color="#B22222">  that require a working basis slightly larger than ncv.</font>
+<a name="line123">123: </a><font color="#B22222">*/</font>
+<a name="line124">124: </a><strong><font color="#4169E1"><a name="EPSSliceAllocateSolution"></a>static PetscErrorCode EPSSliceAllocateSolution(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt extra)</font></strong>
+<a name="line125">125: </a>{
+<a name="line126">126: </a>  PetscErrorCode     ierr;
+<a name="line127">127: </a>  EPS_KRYLOVSCHUR    *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line128">128: </a>  PetscReal          eta;
+<a name="line129">129: </a>  PetscInt           k;
+<a name="line130">130: </a>  PetscLogDouble     cnt;
+<a name="line131">131: </a>  <a href="../../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>             type;
+<a name="line132">132: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       orthog_type;
+<a name="line133">133: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> orthog_ref;
+<a name="line134">134: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  ob_type;
+<a name="line135">135: </a>  Mat                matrix;
+<a name="line136">136: </a>  Vec                t;
+<a name="line137">137: </a>  EPS_SR             sr = ctx->sr;
+
+<a name="line140">140: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
+<a name="line141">141: </a>  k = PetscMax(1,sr->numEigs);
+<a name="line142">142: </a>  PetscFree4(sr->eigr,sr->eigi,sr->errest,sr->perm);
+<a name="line143">143: </a>  PetscMalloc4(k,&sr->eigr,k,&sr->eigi,k,&sr->errest,k,&sr->perm);
+<a name="line144">144: </a>  cnt = 2*k*<font color="#4169E1">sizeof</font>(PetscScalar) + 2*k*<font color="#4169E1">sizeof</font>(PetscReal) + k*<font color="#4169E1">sizeof</font>(PetscInt);
+<a name="line145">145: </a>  PetscLogObjectMemory((PetscObject)eps,cnt);
+
+<a name="line147">147: </a>  <font color="#B22222">/* allocate sr->V and transfer options from eps->V */</font>
+<a name="line148">148: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&sr->V);
+<a name="line149">149: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)eps),&sr->V);
+<a name="line150">150: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)sr->V);
+<a name="line151">151: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line152">152: </a>  <font color="#4169E1">if</font> (!((PetscObject)(eps->V))->type_name) {
+<a name="line153">153: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(sr->V,BVSVEC);
+<a name="line154">154: </a>  } <font color="#4169E1">else</font> {
+<a name="line155">155: </a>    <a href="../../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(eps->V,&type);
+<a name="line156">156: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(sr->V,type);
+<a name="line157">157: </a>  }
+<a name="line158">158: </a>  <a href="../../../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(eps->st,&t,NULL);
+<a name="line159">159: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(sr->V,t,k);
+<a name="line160">160: </a>  VecDestroy(&t);
+<a name="line161">161: </a>  EPS_SetInnerProduct(eps);
+<a name="line162">162: </a>  <a href="../../../../../docs/manualpages/BV/BVGetMatrix.html#BVGetMatrix">BVGetMatrix</a>(eps->V,&matrix,NULL);
+<a name="line163">163: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(sr->V,matrix,PETSC_FALSE);
+<a name="line164">164: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(eps->V,&orthog_type,&orthog_ref,&eta,&ob_type);
+<a name="line165">165: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(sr->V,orthog_type,orthog_ref,eta,ob_type);
+<a name="line166">166: </a>  <font color="#4169E1">return</font>(0);
+<a name="line167">167: </a>}
+
+<a name="line171">171: </a><strong><font color="#4169E1"><a name="EPSSliceGetEPS"></a>static PetscErrorCode EPSSliceGetEPS(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line172">172: </a>{
+<a name="line173">173: </a>  PetscErrorCode     ierr;
+<a name="line174">174: </a>  EPS_KRYLOVSCHUR    *ctx=(EPS_KRYLOVSCHUR*)eps->data,*ctx_local;
+<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>                 V;
+<a name="line176">176: </a>  <a href="../../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>             type;
+<a name="line177">177: </a>  PetscReal          eta;
+<a name="line178">178: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       orthog_type;
+<a name="line179">179: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> orthog_ref;
+<a name="line180">180: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  ob_type;
+<a name="line181">181: </a>  Mat                A,B=NULL,Ar,Br=NULL;
+<a name="line182">182: </a>  PetscInt           i;
+<a name="line183">183: </a>  PetscReal          h,a,b;
+<a name="line184">184: </a>  PetscMPIInt        rank;
+<a name="line185">185: </a>  EPS_SR             sr=ctx->sr;
+<a name="line186">186: </a>  PC                 pc;
+<a name="line187">187: </a>  PCType             pctype;
+<a name="line188">188: </a>  KSP                ksp;
+<a name="line189">189: </a>  KSPType            ksptype;
+<a name="line190">190: </a>  <a href="../../../../../docs/manualpages/ST/STType.html#STType">STType</a>             sttype;
+<a name="line191">191: </a>  PetscObjectState   Astate,Bstate=0;
+<a name="line192">192: </a>  PetscObjectId      Aid,Bid=0;
+<a name="line193">193: </a>  const MatSolverPackage stype;
+
+<a name="line196">196: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,&B);
+<a name="line197">197: </a>  <font color="#4169E1">if</font> (ctx->npart==1) {
+<a name="line198">198: </a>    <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(((PetscObject)eps)->comm,&ctx->eps); }
+<a name="line199">199: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(ctx->eps,((PetscObject)eps)->type_name);
+<a name="line200">200: </a>    <a href="../../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,A,B);
+<a name="line201">201: </a>    a = eps->inta; b = eps->intb;
+<a name="line202">202: </a>  } <font color="#4169E1">else</font> {
+<a name="line203">203: </a>    PetscObjectStateGet((PetscObject)A,&Astate);
+<a name="line204">204: </a>    PetscObjectGetId((PetscObject)A,&Aid);
+<a name="line205">205: </a>    <font color="#4169E1">if</font> (B) {
+<a name="line206">206: </a>      PetscObjectStateGet((PetscObject)B,&Bstate);
+<a name="line207">207: </a>      PetscObjectGetId((PetscObject)B,&Bid);
+<a name="line208">208: </a>    }
+<a name="line209">209: </a>    <font color="#4169E1">if</font> (!ctx->subc) {
+<a name="line210">210: </a>      <font color="#B22222">/* Create context for subcommunicators */</font>
+<a name="line211">211: </a>      PetscSubcommCreate(PetscObjectComm((PetscObject)eps),&ctx->subc);
+<a name="line212">212: </a>      PetscSubcommSetNumber(ctx->subc,ctx->npart);
+<a name="line213">213: </a>      PetscSubcommSetType(ctx->subc,PETSC_SUBCOMM_CONTIGUOUS);
+<a name="line214">214: </a>      PetscLogObjectMemory((PetscObject)eps,<font color="#4169E1">sizeof</font>(PetscSubcomm));
+
+<a name="line216">216: </a>      <font color="#B22222">/* Duplicate matrices */</font>
+<a name="line217">217: </a>      MatCreateRedundantMatrix(A,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Ar);
+<a name="line218">218: </a>      ctx->Astate = Astate;
+<a name="line219">219: </a>      ctx->Aid = Aid;
+<a name="line220">220: </a>      <font color="#4169E1">if</font> (B) {
+<a name="line221">221: </a>        MatCreateRedundantMatrix(B,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Br);
+<a name="line222">222: </a>        ctx->Bstate = Bstate;
+<a name="line223">223: </a>        ctx->Bid = Bid;
+<a name="line224">224: </a>      }
+<a name="line225">225: </a>    } <font color="#4169E1">else</font> {
+<a name="line226">226: </a>      <font color="#4169E1">if</font> (ctx->Astate != Astate || (B && ctx->Bstate != Bstate) || ctx->Aid != Aid || (B && ctx->Bid != Bid)) {
+<a name="line227">227: </a>        <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(ctx->eps,&Ar,&Br);
+<a name="line228">228: </a>        MatCreateRedundantMatrix(A,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Ar);
+<a name="line229">229: </a>        ctx->Astate = Astate;
+<a name="line230">230: </a>        ctx->Aid = Aid;
+<a name="line231">231: </a>        <font color="#4169E1">if</font> (B) {
+<a name="line232">232: </a>          MatCreateRedundantMatrix(B,0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&Br);
+<a name="line233">233: </a>          ctx->Bstate = Bstate;
+<a name="line234">234: </a>          ctx->Bid = Bid;
+<a name="line235">235: </a>        }
+<a name="line236">236: </a>        <a href="../../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,Ar,Br);
+<a name="line237">237: </a>        MatDestroy(&Ar);
+<a name="line238">238: </a>        MatDestroy(&Br);
+<a name="line239">239: </a>      }
+<a name="line240">240: </a>    }
+
+<a name="line242">242: </a>    <font color="#B22222">/* Determine subintervals */</font>
+<a name="line243">243: </a>    <font color="#4169E1">if</font> (!ctx->subintset) { <font color="#B22222">/* uniform distribution if no set by user */</font>
+<a name="line244">244: </a>      <font color="#4169E1">if</font> (!sr->hasEnd) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Global interval must be bounded for splitting it in uniform subintervals"</font>);
+<a name="line245">245: </a>      h = (eps->intb-eps->inta)/ctx->npart;
+<a name="line246">246: </a>      a = eps->inta+ctx->subc->color*h;
+<a name="line247">247: </a>      b = (ctx->subc->color==ctx->npart-1)?eps->intb:eps->inta+(ctx->subc->color+1)*h;
+<a name="line248">248: </a>      PetscFree(ctx->subintervals);
+<a name="line249">249: </a>      PetscMalloc1(ctx->npart+1,&ctx->subintervals);
+<a name="line250">250: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) ctx->subintervals[i] = eps->inta+h*i;
+<a name="line251">251: </a>      ctx->subintervals[ctx->npart] = eps->intb;
+<a name="line252">252: </a>    } <font color="#4169E1">else</font> {
+<a name="line253">253: </a>      a = ctx->subintervals[ctx->subc->color];
+<a name="line254">254: </a>      b = ctx->subintervals[ctx->subc->color+1];
+<a name="line255">255: </a>    }
+
+<a name="line257">257: </a>    <font color="#4169E1">if</font> (!ctx->eps) {
+<a name="line258">258: </a>      <font color="#B22222">/* Create auxiliary <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> */</font>
+<a name="line259">259: </a>      <a href="../../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscSubcommChild(ctx->subc),&ctx->eps);
+<a name="line260">260: </a>      <a href="../../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,Ar,Br);
+<a name="line261">261: </a>      MatDestroy(&Ar);
+<a name="line262">262: </a>      MatDestroy(&Br);
+<a name="line263">263: </a>    }
+
+<a name="line265">265: </a>    <font color="#B22222">/* Create subcommunicator grouping processes with same rank */</font>
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (ctx->commset) { <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_free.html#MPI_Comm_free">MPI_Comm_free</a>(&ctx->commrank); }
+<a name="line267">267: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
+<a name="line268">268: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_split.html#MPI_Comm_split">MPI_Comm_split</a>(((PetscObject)eps)->comm,rank,ctx->subc->color,&ctx->commrank);
+<a name="line269">269: </a>    ctx->commset = PETSC_TRUE;
+<a name="line270">270: </a>  }
+<a name="line271">271: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(ctx->eps,((PetscObject)eps)->type_name);
+
+<a name="line273">273: </a>  <font color="#B22222">/* Transfer options for <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>, KSP and PC */</font>
+<a name="line274">274: </a>  <a href="../../../../../docs/manualpages/ST/STGetType.html#STGetType">STGetType</a>(eps->st,&sttype);
+<a name="line275">275: </a>  <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(ctx->eps->st,sttype);
+<a name="line276">276: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line277">277: </a>  KSPGetType(ksp,&ksptype);
+<a name="line278">278: </a>  KSPGetPC(ksp,&pc);
+<a name="line279">279: </a>  PCGetType(pc,&pctype);
+<a name="line280">280: </a>  PCFactorGetMatSolverPackage(pc,&stype);
+<a name="line281">281: </a>  <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(ctx->eps->st,&ksp);
+<a name="line282">282: </a>  KSPSetType(ksp,ksptype);
+<a name="line283">283: </a>  KSPGetPC(ksp,&pc);
+<a name="line284">284: </a>  PCSetType(pc,pctype);
+<a name="line285">285: </a>  <font color="#4169E1">if</font> (stype) { PCFactorSetMatSolverPackage(pc,stype); }
+
+<a name="line287">287: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(ctx->eps,eps->conv);
+<a name="line288">288: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(ctx->eps,a,b);
+<a name="line289">289: </a>  ctx_local = (EPS_KRYLOVSCHUR*)ctx->eps->data;
+<a name="line290">290: </a>  ctx_local->npart = ctx->npart;
+<a name="line291">291: </a>  ctx_local->detect = ctx->detect;
+<a name="line292">292: </a>  ctx_local->global = PETSC_FALSE;
+<a name="line293">293: </a>  ctx_local->eps = eps;
+<a name="line294">294: </a>  ctx_local->subc = ctx->subc;
+<a name="line295">295: </a>  ctx_local->commrank = ctx->commrank;
+
+<a name="line297">297: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(ctx->eps,ctx->nev,ctx->ncv,ctx->mpd);
+<a name="line298">298: </a>  <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetLocking.html#EPSKrylovSchurSetLocking">EPSKrylovSchurSetLocking</a>(ctx->eps,ctx->lock);
+
+<a name="line300">300: </a>  <font color="#B22222">/* transfer options from eps->V */</font>
+<a name="line301">301: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(ctx->eps,&V);
+<a name="line302">302: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line303">303: </a>  <font color="#4169E1">if</font> (!((PetscObject)(eps->V))->type_name) {
+<a name="line304">304: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(V,BVSVEC);
+<a name="line305">305: </a>  } <font color="#4169E1">else</font> {
+<a name="line306">306: </a>    <a href="../../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(eps->V,&type);
+<a name="line307">307: </a>    <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(V,type);
+<a name="line308">308: </a>  }
+<a name="line309">309: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(eps->V,&orthog_type,&orthog_ref,&eta,&ob_type);
+<a name="line310">310: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(V,orthog_type,orthog_ref,eta,ob_type);
+<a name="line311">311: </a>  ctx->eps->which = eps->which;
+<a name="line312">312: </a>  ctx->eps->max_it = eps->max_it;
+<a name="line313">313: </a>  ctx->eps->tol = eps->tol;
+<a name="line314">314: </a>  ctx->eps->purify = eps->purify;
+<a name="line315">315: </a>  <font color="#4169E1">if</font> (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL;
+<a name="line316">316: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(ctx->eps,eps->problem_type);
+<a name="line317">317: </a>  <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(ctx->eps);
+<a name="line318">318: </a>  ctx->eps->nconv = 0;
+<a name="line319">319: </a>  ctx->eps->its   = 0;
+<a name="line320">320: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->eps->ncv;i++) {
+<a name="line321">321: </a>    ctx->eps->eigr[i]   = 0.0;
+<a name="line322">322: </a>    ctx->eps->eigi[i]   = 0.0;
+<a name="line323">323: </a>    ctx->eps->errest[i] = 0.0;
+<a name="line324">324: </a>  }
+<a name="line325">325: </a>  <font color="#4169E1">return</font>(0);
+<a name="line326">326: </a>}
+
+<a name="line330">330: </a><strong><font color="#4169E1"><a name="EPSSliceGetInertia"></a>static PetscErrorCode EPSSliceGetInertia(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal shift,PetscInt *inertia,PetscInt *zeros)</font></strong>
+<a name="line331">331: </a>{
+<a name="line333">333: </a>  KSP            ksp;
+<a name="line334">334: </a>  PC             pc;
+<a name="line335">335: </a>  Mat            F;
+<a name="line336">336: </a>  PetscReal      nzshift;
+
+<a name="line339">339: </a>  <font color="#4169E1">if</font> (shift >= PETSC_MAX_REAL) { <font color="#B22222">/* Right-open interval */</font>
+<a name="line340">340: </a>    <font color="#4169E1">if</font> (inertia) *inertia = eps->n;
+<a name="line341">341: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (shift <= PETSC_MIN_REAL) {
+<a name="line342">342: </a>    <font color="#4169E1">if</font> (inertia) *inertia = 0;
+<a name="line343">343: </a>    <font color="#4169E1">if</font> (zeros) *zeros = 0;
+<a name="line344">344: </a>  } <font color="#4169E1">else</font> {
+<a name="line345">345: </a>    <font color="#B22222">/* If the shift is zero, perturb it to a very small positive value.</font>
+<a name="line346">346: </a><font color="#B22222">       The goal is that the nonzero pattern is the same in all cases and reuse</font>
+<a name="line347">347: </a><font color="#B22222">       the symbolic factorizations */</font>
+<a name="line348">348: </a>    nzshift = (shift==0.0)? 10.0/PETSC_MAX_REAL: shift;
+<a name="line349">349: </a>    <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(eps->st,nzshift);
+<a name="line350">350: </a>    <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
+<a name="line351">351: </a>    <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line352">352: </a>    KSPGetPC(ksp,&pc);
+<a name="line353">353: </a>    PCFactorGetMatrix(pc,&F);
+<a name="line354">354: </a>    MatGetInertia(F,inertia,zeros,NULL);
+<a name="line355">355: </a>  }
+<a name="line356">356: </a>  <font color="#4169E1">return</font>(0);
+<a name="line357">357: </a>}
+
+<a name="line361">361: </a><strong><font color="#4169E1"><a name="EPSSetUp_KrylovSchur_Slice"></a>PetscErrorCode EPSSetUp_KrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line362">362: </a>{
+<a name="line363">363: </a>  PetscErrorCode  ierr;
+<a name="line364">364: </a>  PetscBool       issinv;
+<a name="line365">365: </a>  EPS_KRYLOVSCHUR *ctx = (EPS_KRYLOVSCHUR*)eps->data,*ctx_glob;
+<a name="line366">366: </a>  EPS_SR          sr,sr_loc,sr_glob;
+<a name="line367">367: </a>  PetscInt        nEigs,dssz=1,i,zeros=0,off=0;
+<a name="line368">368: </a>  PetscMPIInt     nproc,rank,aux;
+<a name="line369">369: </a>  MPI_Request     req;
+<a name="line370">370: </a>  Mat             A,B=NULL;
+
+<a name="line373">373: </a>  <font color="#4169E1">if</font> (ctx->global) {
+<a name="line374">374: </a>    <font color="#4169E1">if</font> (eps->inta==0.0 && eps->intb==0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Must define a computational interval when using EPS_ALL"</font>);
+<a name="line375">375: </a>    <font color="#4169E1">if</font> (eps->intb >= PETSC_MAX_REAL && eps->inta <= PETSC_MIN_REAL) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"The defined computational interval should have at least one of their sides bounded"</font>);
+<a name="line376">376: </a>    <font color="#4169E1">if</font> (!eps->ishermitian) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Spectrum slicing only available for symmetric/Hermitian eigenproblems"</font>);
+<a name="line377">377: </a>    <font color="#4169E1">if</font> (eps->arbitrary) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Arbitrary selection of eigenpairs cannot be used with spectrum slicing"</font>);
+<a name="line378">378: </a>    <font color="#4169E1">if</font> (!((PetscObject)(eps->st))->type_name) { <font color="#B22222">/* default to shift-and-invert */</font>
+<a name="line379">379: </a>      <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSINVERT);
+<a name="line380">380: </a>    }
+<a name="line381">381: </a>    PetscObjectTypeCompareAny((PetscObject)eps->st,&issinv,STSINVERT,STCAYLEY,<font color="#666666">""</font>);
+<a name="line382">382: </a>    <font color="#4169E1">if</font> (!issinv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Shift-and-invert or Cayley <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> is needed for spectrum slicing"</font>);
+<a name="line383">383: </a>    <font color="#4169E1">if</font> (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL*1e-2;  <font color="#B22222">/* use tighter tolerance */</font>
+<a name="line384">384: </a>    <font color="#4169E1">if</font> (!eps->max_it) eps->max_it = 100;
+<a name="line385">385: </a>    <font color="#4169E1">if</font> (ctx->nev==1) ctx->nev = PetscMin(40,eps->n);  <font color="#B22222">/* nev not set, use default value */</font>
+<a name="line386">386: </a>    <font color="#4169E1">if</font> (eps->n>10 && ctx->nev<10) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"nev cannot be less than 10 in spectrum slicing runs"</font>);
+<a name="line387">387: </a>  }
+<a name="line388">388: </a>  eps->ops->backtransform = NULL;
+
+<a name="line390">390: </a>  <font color="#B22222">/* create spectrum slicing context and initialize it */</font>
+<a name="line391">391: </a>  EPSSliceResetSR(eps);
+<a name="line392">392: </a>  PetscNewLog(eps,&sr);
+<a name="line393">393: </a>  ctx->sr = sr;
+<a name="line394">394: </a>  sr->itsKs = 0;
+<a name="line395">395: </a>  sr->nleap = 0;
+<a name="line396">396: </a>  sr->nMAXCompl = eps->nev/4;
+<a name="line397">397: </a>  sr->iterCompl = eps->max_it/4;
+<a name="line398">398: </a>  sr->sPres = NULL;
+<a name="line399">399: </a>  sr->nS = 0;
+
+<a name="line401">401: </a>  <font color="#4169E1">if</font> (ctx->npart==1 || ctx->global) {
+<a name="line402">402: </a>    <font color="#B22222">/* check presence of ends and finding direction */</font>
+<a name="line403">403: </a>    <font color="#4169E1">if</font> ((eps->inta > PETSC_MIN_REAL && eps->inta != 0.0) || eps->intb >= PETSC_MAX_REAL) {
+<a name="line404">404: </a>      sr->int0 = eps->inta;
+<a name="line405">405: </a>      sr->int1 = eps->intb;
+<a name="line406">406: </a>      sr->dir = 1;
+<a name="line407">407: </a>      <font color="#4169E1">if</font> (eps->intb >= PETSC_MAX_REAL) { <font color="#B22222">/* Right-open interval */</font>
+<a name="line408">408: </a>        sr->hasEnd = PETSC_FALSE;
+<a name="line409">409: </a>      } <font color="#4169E1">else</font> sr->hasEnd = PETSC_TRUE;
+<a name="line410">410: </a>    } <font color="#4169E1">else</font> {
+<a name="line411">411: </a>      sr->int0 = eps->intb;
+<a name="line412">412: </a>      sr->int1 = eps->inta;
+<a name="line413">413: </a>      sr->dir = -1;
+<a name="line414">414: </a>      sr->hasEnd = PetscNot(eps->inta <= PETSC_MIN_REAL);
+<a name="line415">415: </a>    }
+<a name="line416">416: </a>  }
+<a name="line417">417: </a>  <font color="#4169E1">if</font> (ctx->global) {
+<a name="line418">418: </a>    <font color="#B22222">/* prevent computation of factorization in global eps */</font>
+<a name="line419">419: </a>    <a href="../../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>(eps->st,PETSC_FALSE);
+<a name="line420">420: </a>    EPSSetDimensions_Default(eps,ctx->nev,&ctx->ncv,&ctx->mpd);
+<a name="line421">421: </a>    <font color="#B22222">/* create subintervals and initialize auxiliary eps for slicing runs */</font>
+<a name="line422">422: </a>    EPSSliceGetEPS(eps);
+<a name="line423">423: </a>    sr_loc = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
+<a name="line424">424: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line425">425: </a>      <font color="#4169E1">if</font> ((sr->dir>0&&ctx->subc->color==0)||(sr->dir<0&&ctx->subc->color==ctx->npart-1)) sr->inertia0 = sr_loc->inertia0;
+<a name="line426">426: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
+<a name="line427">427: </a>      <font color="#4169E1">if</font> (rank==0) {
+<a name="line428">428: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->inertia0,1,MPIU_INT,(sr->dir>0)?0:ctx->npart-1,ctx->commrank);
+<a name="line429">429: </a>      }
+<a name="line430">430: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->inertia0,1,MPIU_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line431">431: </a>      PetscFree(ctx->nconv_loc);
+<a name="line432">432: </a>      PetscMalloc1(ctx->npart,&ctx->nconv_loc);
+<a name="line433">433: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(((PetscObject)eps)->comm,&nproc);
+<a name="line434">434: </a>      <font color="#4169E1">if</font> (sr->dir<0) off = 1;
+<a name="line435">435: </a>      <font color="#4169E1">if</font> (nproc%ctx->npart==0) { <font color="#B22222">/* subcommunicators with the same size */</font>
+<a name="line436">436: </a>        PetscMPIIntCast(sr_loc->numEigs,&aux);
+<a name="line437">437: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&aux,1,MPI_INT,ctx->nconv_loc,1,MPI_INT,ctx->commrank);
+<a name="line438">438: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&sr_loc->int0,1,MPIU_REAL,ctx->subintervals+off,1,MPIU_REAL,ctx->commrank);
+<a name="line439">439: </a>      } <font color="#4169E1">else</font> {
+<a name="line440">440: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
+<a name="line441">441: </a>        <font color="#4169E1">if</font> (!rank) {
+<a name="line442">442: </a>          PetscMPIIntCast(sr_loc->numEigs,&aux);
+<a name="line443">443: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&aux,1,MPI_INT,ctx->nconv_loc,1,MPI_INT,ctx->commrank);
+<a name="line444">444: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&sr_loc->int0,1,MPIU_REAL,ctx->subintervals+off,1,MPIU_REAL,ctx->commrank);
+<a name="line445">445: </a>        }
+<a name="line446">446: </a>        PetscMPIIntCast(ctx->npart,&aux);
+<a name="line447">447: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->nconv_loc,aux,MPI_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line448">448: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->subintervals+off,aux,MPIU_REAL,0,PetscSubcommChild(ctx->subc));
+<a name="line449">449: </a>      }
+<a name="line450">450: </a>      nEigs = 0;
+<a name="line451">451: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) nEigs += ctx->nconv_loc[i];
+<a name="line452">452: </a>    } <font color="#4169E1">else</font> {
+<a name="line453">453: </a>      nEigs = sr_loc->numEigs;
+<a name="line454">454: </a>      sr->inertia0 = sr_loc->inertia0;
+<a name="line455">455: </a>    }
+<a name="line456">456: </a>    sr->inertia1 = sr->inertia0+sr->dir*nEigs;
+<a name="line457">457: </a>    sr->numEigs = nEigs;
+<a name="line458">458: </a>    eps->nev = nEigs;
+<a name="line459">459: </a>    eps->ncv = nEigs;
+<a name="line460">460: </a>    eps->mpd = nEigs;
+<a name="line461">461: </a>  } <font color="#4169E1">else</font> {
+<a name="line462">462: </a>    ctx_glob = (EPS_KRYLOVSCHUR*)ctx->eps->data;
+<a name="line463">463: </a>    sr_glob = ctx_glob->sr;
+<a name="line464">464: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line465">465: </a>      sr->dir = sr_glob->dir;
+<a name="line466">466: </a>      sr->int0 = (sr->dir==1)?eps->inta:eps->intb;
+<a name="line467">467: </a>      sr->int1 = (sr->dir==1)?eps->intb:eps->inta;
+<a name="line468">468: </a>      <font color="#4169E1">if</font> ((sr->dir>0&&ctx->subc->color==ctx->npart-1)||(sr->dir<0&&ctx->subc->color==0)) sr->hasEnd = sr_glob->hasEnd;
+<a name="line469">469: </a>      <font color="#4169E1">else</font> sr->hasEnd = PETSC_TRUE;
+<a name="line470">470: </a>    }
+
+<a name="line472">472: </a>    <font color="#B22222">/* compute inertia0 */</font>
+<a name="line473">473: </a>    EPSSliceGetInertia(eps,sr->int0,&sr->inertia0,ctx->detect?&zeros:NULL);
+<a name="line474">474: </a>    <font color="#4169E1">if</font> (zeros) { <font color="#B22222">/* error in factorization */</font>
+<a name="line475">475: </a>      <font color="#4169E1">if</font> (ctx->npart==1 || ctx_glob->subintset || ((sr->dir>0 && ctx->subc->color==0) || (sr->dir<0 && ctx->subc->color==ctx->npart-1))) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_USER,<font color="#666666">"Found singular matrix for the transformed problem in an interval endpoint defined by user"</font>);
+<a name="line476">476: </a>      <font color="#4169E1">else</font> { <font color="#B22222">/* perturb shift */</font>
+<a name="line477">477: </a>        sr->int0 *= (1.0+SLICE_PTOL);
+<a name="line478">478: </a>        EPSSliceGetInertia(eps,sr->int0,&sr->inertia0,&zeros);
+<a name="line479">479: </a>        <font color="#4169E1">if</font> (zeros) SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_CONV_FAILED,<font color="#666666">"Inertia computation fails in %g"</font>,sr->int1);
+<a name="line480">480: </a>      }
+<a name="line481">481: </a>    }
+<a name="line482">482: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line483">483: </a>      <font color="#B22222">/* inertia1 is received from neighbour */</font>
+<a name="line484">484: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
+<a name="line485">485: </a>      <font color="#4169E1">if</font> (!rank) {
+<a name="line486">486: </a>        <font color="#4169E1">if</font> ((sr->dir>0 && ctx->subc->color>0) || (sr->dir<0 && ctx->subc->color<ctx->npart-1)) { <font color="#B22222">/* send inertia0 to neighbour0 */</font>
+<a name="line487">487: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Isend.html#MPI_Isend">MPI_Isend</a>(&(sr->inertia0),1,MPIU_INT,ctx->subc->color-sr->dir,0,ctx->commrank,&req);
+<a name="line488">488: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Isend.html#MPI_Isend">MPI_Isend</a>(&(sr->int0),1,MPIU_REAL,ctx->subc->color-sr->dir,0,ctx->commrank,&req);
+<a name="line489">489: </a>        }
+<a name="line490">490: </a>        <font color="#4169E1">if</font> ((sr->dir>0 && ctx->subc->color<ctx->npart-1)|| (sr->dir<0 && ctx->subc->color>0)) { <font color="#B22222">/* receive inertia1 from neighbour1 */</font>
+<a name="line491">491: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Recv.html#MPI_Recv">MPI_Recv</a>(&(sr->inertia1),1,MPIU_INT,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);
+<a name="line492">492: </a>          <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Recv.html#MPI_Recv">MPI_Recv</a>(&(sr->int1),1,MPIU_REAL,ctx->subc->color+sr->dir,0,ctx->commrank,MPI_STATUS_IGNORE);
+<a name="line493">493: </a>        }
+<a name="line494">494: </a>      }
+<a name="line495">495: </a>      <font color="#4169E1">if</font> ((sr->dir>0 && ctx->subc->color<ctx->npart-1)||(sr->dir<0 && ctx->subc->color>0)) {
+<a name="line496">496: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->inertia1,1,MPIU_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line497">497: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sr->int1,1,MPIU_REAL,0,PetscSubcommChild(ctx->subc));
+<a name="line498">498: </a>      } <font color="#4169E1">else</font> sr_glob->inertia1 = sr->inertia1;
+<a name="line499">499: </a>    }
+
+<a name="line501">501: </a>    <font color="#B22222">/* last process in eps comm computes inertia1 */</font>
+<a name="line502">502: </a>    <font color="#4169E1">if</font> (ctx->npart==1 || ((sr->dir>0 && ctx->subc->color==ctx->npart-1) || (sr->dir<0 && ctx->subc->color==0))) {
+<a name="line503">503: </a>      EPSSliceGetInertia(eps,sr->int1,&sr->inertia1,ctx->detect?&zeros:NULL);
+<a name="line504">504: </a>      <font color="#4169E1">if</font> (zeros) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_USER,<font color="#666666">"Found singular matrix for the transformed problem in an interval endpoint defined by user"</font>);
+<a name="line505">505: </a>    }
+
+<a name="line507">507: </a>    <font color="#B22222">/* number of eigenvalues in interval */</font>
+<a name="line508">508: </a>    sr->numEigs = (sr->dir)*(sr->inertia1 - sr->inertia0);
+<a name="line509">509: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line510">510: </a>      <font color="#B22222">/* memory allocate for subinterval eigenpairs */</font>
+<a name="line511">511: </a>      EPSSliceAllocateSolution(eps,1);
+<a name="line512">512: </a>    }
+<a name="line513">513: </a>    dssz = eps->ncv+1;
+<a name="line514">514: </a>  }
+<a name="line515">515: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSHEP);
+<a name="line516">516: </a>  <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
+<a name="line517">517: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,dssz);
+<a name="line518">518: </a>  <font color="#B22222">/* keep state of subcomm matrices to check that the user does not modify them */</font>
+<a name="line519">519: </a>  <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,&B);
+<a name="line520">520: </a>  PetscObjectStateGet((PetscObject)A,&ctx->Astate);
+<a name="line521">521: </a>  PetscObjectGetId((PetscObject)A,&ctx->Aid);
+<a name="line522">522: </a>  <font color="#4169E1">if</font> (B) { 
+<a name="line523">523: </a>    PetscObjectStateGet((PetscObject)B,&ctx->Bstate);
+<a name="line524">524: </a>    PetscObjectGetId((PetscObject)B,&ctx->Bid);
+<a name="line525">525: </a>  } <font color="#4169E1">else</font> {
+<a name="line526">526: </a>    ctx->Bstate=0;
+<a name="line527">527: </a>    ctx->Bid=0;
+<a name="line528">528: </a>  }
 <a name="line529">529: </a>  <font color="#4169E1">return</font>(0);
 <a name="line530">530: </a>}
 
-<a name="line534">534: </a><font color="#B22222">/*</font>
-<a name="line535">535: </a><font color="#B22222">  EPSComputeVectors_Slice - Recover Eigenvectors from subcomunicators</font>
-<a name="line536">536: </a><font color="#B22222"> */</font>
-<a name="line537">537: </a><strong><font color="#4169E1"><a name="EPSComputeVectors_Slice"></a>PetscErrorCode EPSComputeVectors_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line538">538: </a>{
-<a name="line539">539: </a>  PetscErrorCode  ierr;
+<a name="line534">534: </a><strong><font color="#4169E1"><a name="EPSSliceGatherEigenVectors"></a>static PetscErrorCode EPSSliceGatherEigenVectors(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line535">535: </a>{
+<a name="line536">536: </a>  PetscErrorCode  ierr;
+<a name="line537">537: </a>  Vec             v,vg,v_loc;
+<a name="line538">538: </a>  IS              is1,is2;
+<a name="line539">539: </a>  VecScatter      vec_sc;
 <a name="line540">540: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line543">543: </a>  <font color="#4169E1">if</font> (ctx->global && ctx->npart>1) {
-<a name="line544">544: </a>    EPSComputeVectors(ctx->eps);
-<a name="line545">545: </a>    EPSSliceGatherEigenVectors(eps);
-<a name="line546">546: </a>  }
-<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
-<a name="line548">548: </a>}
-
-<a name="line550">550: </a><strong><font color="#228B22">#define SWAP(a,b,t) {t=a;a=b;b=t;}</font></strong>
-
-<a name="line554">554: </a><strong><font color="#4169E1"><a name="EPSSliceGetInertias"></a>static PetscErrorCode EPSSliceGetInertias(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)</font></strong>
-<a name="line555">555: </a>{
-<a name="line556">556: </a>  PetscErrorCode  ierr;
-<a name="line557">557: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line558">558: </a>  PetscInt        i=0,j,tmpi;
-<a name="line559">559: </a>  PetscReal       v,tmpr;
-<a name="line560">560: </a>  EPS_shift       s;
-
-<a name="line563">563: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
-<a name="line564">564: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
-<a name="line565">565: </a>  <font color="#4169E1">if</font> (!ctx->sr->s0) {  <font color="#B22222">/* <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a> not called yet */</font>
-<a name="line566">566: </a>    *n = 2;
-<a name="line567">567: </a>  } <font color="#4169E1">else</font> {
-<a name="line568">568: </a>    *n = 1;
-<a name="line569">569: </a>    s = ctx->sr->s0;
-<a name="line570">570: </a>    <font color="#4169E1">while</font> (s) {
-<a name="line571">571: </a>      (*n)++;
-<a name="line572">572: </a>      s = s->neighb[1];
-<a name="line573">573: </a>    }
-<a name="line574">574: </a>  }
-<a name="line575">575: </a>  PetscMalloc1(*n,shifts);
-<a name="line576">576: </a>  PetscMalloc1(*n,inertias);
-<a name="line577">577: </a>  <font color="#4169E1">if</font> (!ctx->sr->s0) {  <font color="#B22222">/* <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a> not called yet */</font>
-<a name="line578">578: </a>    (*shifts)[0]   = ctx->sr->int0;
-<a name="line579">579: </a>    (*shifts)[1]   = ctx->sr->int1;
-<a name="line580">580: </a>    (*inertias)[0] = ctx->sr->inertia0;
-<a name="line581">581: </a>    (*inertias)[1] = ctx->sr->inertia1;
-<a name="line582">582: </a>  } <font color="#4169E1">else</font> {
-<a name="line583">583: </a>    s = ctx->sr->s0;
-<a name="line584">584: </a>    <font color="#4169E1">while</font> (s) {
-<a name="line585">585: </a>      (*shifts)[i]     = s->value;
-<a name="line586">586: </a>      (*inertias)[i++] = s->inertia;
-<a name="line587">587: </a>      s = s->neighb[1];
+<a name="line541">541: </a>  PetscInt        nloc,m0,n0,i,si,idx,*idx1,*idx2,j;
+<a name="line542">542: </a>  PetscScalar     *array;
+<a name="line543">543: </a>  EPS_SR          sr_loc;
+<a name="line544">544: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>              V_loc;
+
+<a name="line547">547: </a>  sr_loc = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
+<a name="line548">548: </a>  V_loc = sr_loc->V;
+
+<a name="line550">550: </a>  <font color="#B22222">/* Gather parallel eigenvectors */</font>
+<a name="line551">551: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v);
+<a name="line552">552: </a>  VecGetOwnershipRange(v,&n0,&m0);
+<a name="line553">553: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v);
+<a name="line554">554: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->eps->V,0,&v);
+<a name="line555">555: </a>  VecGetLocalSize(v,&nloc);
+<a name="line556">556: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->eps->V,0,&v);
+<a name="line557">557: </a>  PetscMalloc2(m0-n0,&idx1,m0-n0,&idx2);
+<a name="line558">558: </a>  VecCreateMPI(PetscObjectComm((PetscObject)eps),nloc,PETSC_DECIDE,&vg);
+<a name="line559">559: </a>  idx = -1;
+<a name="line560">560: </a>  <font color="#4169E1">for</font> (si=0;si<ctx->npart;si++) {
+<a name="line561">561: </a>    j = 0;
+<a name="line562">562: </a>    <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line563">563: </a>      idx1[j]   = i;
+<a name="line564">564: </a>      idx2[j++] = i+eps->n*si;
+<a name="line565">565: </a>    }
+<a name="line566">566: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)eps),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
+<a name="line567">567: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)eps),(m0-n0),idx2,PETSC_COPY_VALUES,&is2);
+<a name="line568">568: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,0,&v);
+<a name="line569">569: </a>    VecScatterCreate(v,is1,vg,is2,&vec_sc);
+<a name="line570">570: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,0,&v);
+<a name="line571">571: </a>    ISDestroy(&is1);
+<a name="line572">572: </a>    ISDestroy(&is2);
+<a name="line573">573: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nconv_loc[si];i++) {
+<a name="line574">574: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,++idx,&v);
+<a name="line575">575: </a>      <font color="#4169E1">if</font> (ctx->subc->color==si) {
+<a name="line576">576: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V_loc,i,&v_loc);
+<a name="line577">577: </a>        VecGetArray(v_loc,&array);
+<a name="line578">578: </a>        VecPlaceArray(vg,array);
+<a name="line579">579: </a>      }
+<a name="line580">580: </a>      VecScatterBegin(vec_sc,vg,v,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line581">581: </a>      VecScatterEnd(vec_sc,vg,v,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line582">582: </a>      <font color="#4169E1">if</font> (ctx->subc->color==si) {
+<a name="line583">583: </a>        VecResetArray(vg);
+<a name="line584">584: </a>        VecRestoreArray(v_loc,&array);
+<a name="line585">585: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V_loc,i,&v_loc);
+<a name="line586">586: </a>      }
+<a name="line587">587: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,idx,&v);
 <a name="line588">588: </a>    }
-<a name="line589">589: </a>    (*shifts)[i]   = ctx->sr->int1;
-<a name="line590">590: </a>    (*inertias)[i] = ctx->sr->inertia1;
-<a name="line591">591: </a>  }
-<a name="line592">592: </a>  <font color="#B22222">/* remove possible duplicate in last position */</font>
-<a name="line593">593: </a>  <font color="#4169E1">if</font> ((*shifts)[(*n)-1]==(*shifts)[(*n)-2]) (*n)--;
-<a name="line594">594: </a>  <font color="#B22222">/* sort result */</font>
-<a name="line595">595: </a>  <font color="#4169E1">for</font> (i=0;i<*n;i++) {
-<a name="line596">596: </a>    v = (*shifts)[i];
-<a name="line597">597: </a>    <font color="#4169E1">for</font> (j=i+1;j<*n;j++) {
-<a name="line598">598: </a>      <font color="#4169E1">if</font> (v > (*shifts)[j]) {
-<a name="line599">599: </a>        SWAP((*shifts)[i],(*shifts)[j],tmpr);
-<a name="line600">600: </a>        SWAP((*inertias)[i],(*inertias)[j],tmpi);
-<a name="line601">601: </a>        v = (*shifts)[i];
-<a name="line602">602: </a>      }
-<a name="line603">603: </a>    }
-<a name="line604">604: </a>  }
-<a name="line605">605: </a>  <font color="#4169E1">return</font>(0);
-<a name="line606">606: </a>}
-
-<a name="line610">610: </a><strong><font color="#4169E1"><a name="EPSSliceGatherSolution"></a>static PetscErrorCode EPSSliceGatherSolution(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line611">611: </a>{
-<a name="line612">612: </a>  PetscErrorCode  ierr;
-<a name="line613">613: </a>  PetscMPIInt     rank,nproc;
-<a name="line614">614: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line615">615: </a>  PetscInt        i,idx,j;
-<a name="line616">616: </a>  PetscInt        *perm_loc,off=0,*inertias_loc,ns;
-<a name="line617">617: </a>  PetscScalar     *eigr_loc;
-<a name="line618">618: </a>  EPS_SR          sr_loc;
-<a name="line619">619: </a>  PetscReal       *shifts_loc;
-<a name="line620">620: </a>  PetscMPIInt     *disp,*ns_loc,aux;
-
-<a name="line623">623: </a>  eps->nconv = 0;
-<a name="line624">624: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) eps->nconv += ctx->nconv_loc[i];
-<a name="line625">625: </a>  sr_loc = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
-
-<a name="line627">627: </a>  <font color="#B22222">/* Gather the shifts used and the inertias computed */</font>
-<a name="line628">628: </a>  EPSSliceGetInertias(ctx->eps,&ns,&shifts_loc,&inertias_loc);
-<a name="line629">629: </a>  <font color="#4169E1">if</font> (ctx->sr->dir>0 && shifts_loc[ns-1]==sr_loc->int1 && ctx->subc->color<ctx->npart-1) ns--;
-<a name="line630">630: </a>  <font color="#4169E1">if</font> (ctx->sr->dir<0 && shifts_loc[ns-1]==sr_loc->int0 && ctx->subc->color>0) {
-<a name="line631">631: </a>    ns--;
-<a name="line632">632: </a>    <font color="#4169E1">for</font> (i=0;i<ns;i++) {
-<a name="line633">633: </a>      inertias_loc[i] = inertias_loc[i+1];
-<a name="line634">634: </a>      shifts_loc[i] = shifts_loc[i+1];
-<a name="line635">635: </a>    }
-<a name="line636">636: </a>  }
-<a name="line637">637: </a>  PetscMalloc1(ctx->npart,&ns_loc);
-<a name="line638">638: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
-<a name="line639">639: </a>  PetscMPIIntCast(ns,&aux);
-<a name="line640">640: </a>  <font color="#4169E1">if</font> (rank==0) { <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&aux,1,MPI_INT,ns_loc,1,MPI_INT,ctx->commrank); }
-<a name="line641">641: </a>  PetscMPIIntCast(ctx->npart,&aux);
-<a name="line642">642: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ns_loc,aux,MPI_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line643">643: </a>  ctx->nshifts = 0;
-<a name="line644">644: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) ctx->nshifts += ns_loc[i];
-<a name="line645">645: </a>  PetscFree(ctx->inertias);
-<a name="line646">646: </a>  PetscFree(ctx->shifts);
-<a name="line647">647: </a>  PetscMalloc1(ctx->nshifts,&ctx->inertias);
-<a name="line648">648: </a>  PetscMalloc1(ctx->nshifts,&ctx->shifts);
-
-<a name="line650">650: </a>  <font color="#B22222">/* Gather eigenvalues (same ranks have fully set of eigenvalues)*/</font>
-<a name="line651">651: </a>  eigr_loc = sr_loc->eigr;
-<a name="line652">652: </a>  perm_loc = sr_loc->perm;
-<a name="line653">653: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(((PetscObject)eps)->comm,&nproc);
-<a name="line654">654: </a>  PetscMalloc1(ctx->npart,&disp);
-<a name="line655">655: </a>  disp[0] = 0;
-<a name="line656">656: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) disp[i] = disp[i-1]+ctx->nconv_loc[i-1];
-<a name="line657">657: </a>  <font color="#4169E1">if</font> (nproc%ctx->npart==0) { <font color="#B22222">/* subcommunicators with the same size */</font>
-<a name="line658">658: </a>    PetscMPIIntCast(sr_loc->numEigs,&aux);
-<a name="line659">659: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(eigr_loc,aux,MPIU_SCALAR,eps->eigr,ctx->nconv_loc,disp,MPIU_SCALAR,ctx->commrank); <font color="#B22222">/* eigenvalues */</font>
-<a name="line660">660: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(perm_loc,aux,MPIU_INT,eps->perm,ctx->nconv_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* perm */</font>
-<a name="line661">661: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) disp[i] = disp[i-1]+ns_loc[i-1];
-<a name="line662">662: </a>    PetscMPIIntCast(ns,&aux);
-<a name="line663">663: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(shifts_loc,aux,MPIU_REAL,ctx->shifts,ns_loc,disp,MPIU_REAL,ctx->commrank); <font color="#B22222">/* shifts */</font>
-<a name="line664">664: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(inertias_loc,aux,MPIU_INT,ctx->inertias,ns_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* inertias */</font>
-<a name="line665">665: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&sr_loc->itsKs,&eps->its,1,MPIU_INT,MPI_SUM,ctx->commrank);
-<a name="line666">666: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* subcommunicators with different size */</font>
-<a name="line667">667: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
-<a name="line668">668: </a>    <font color="#4169E1">if</font> (rank==0) {
-<a name="line669">669: </a>      PetscMPIIntCast(sr_loc->numEigs,&aux);
-<a name="line670">670: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(eigr_loc,aux,MPIU_SCALAR,eps->eigr,ctx->nconv_loc,disp,MPIU_SCALAR,ctx->commrank); <font color="#B22222">/* eigenvalues */</font>
-<a name="line671">671: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(perm_loc,aux,MPIU_INT,eps->perm,ctx->nconv_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* perm */</font>
-<a name="line672">672: </a>      <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) disp[i] = disp[i-1]+ns_loc[i-1];
-<a name="line673">673: </a>      PetscMPIIntCast(ns,&aux);
-<a name="line674">674: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(shifts_loc,aux,MPIU_REAL,ctx->shifts,ns_loc,disp,MPIU_REAL,ctx->commrank); <font color="#B22222">/* shifts */</font>
-<a name="line675">675: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(inertias_loc,aux,MPIU_INT,ctx->inertias,ns_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* inertias */</font>
-<a name="line676">676: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&sr_loc->itsKs,&eps->its,1,MPIU_INT,MPI_SUM,ctx->commrank);
-<a name="line677">677: </a>    }
-<a name="line678">678: </a>    PetscMPIIntCast(eps->nconv,&aux);
-<a name="line679">679: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(eps->eigr,aux,MPIU_SCALAR,0,PetscSubcommChild(ctx->subc));
-<a name="line680">680: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(eps->perm,aux,MPIU_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line681">681: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->shifts,ctx->nshifts,MPIU_REAL,0,PetscSubcommChild(ctx->subc));
-<a name="line682">682: </a>    PetscMPIIntCast(ctx->nshifts,&aux);
-<a name="line683">683: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->inertias,aux,MPIU_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line684">684: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&eps->its,1,MPIU_INT,0,PetscSubcommChild(ctx->subc));
-<a name="line685">685: </a>  }
-<a name="line686">686: </a>  <font color="#B22222">/* Update global array eps->perm */</font>
-<a name="line687">687: </a>  idx = ctx->nconv_loc[0];
-<a name="line688">688: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) {
-<a name="line689">689: </a>    off += ctx->nconv_loc[i-1];
-<a name="line690">690: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->nconv_loc[i];j++) eps->perm[idx++] += off;
-<a name="line691">691: </a>  }
-
-<a name="line693">693: </a>  <font color="#B22222">/* Gather parallel eigenvectors */</font>
-<a name="line694">694: </a>  PetscFree(ns_loc);
-<a name="line695">695: </a>  PetscFree(disp);
-<a name="line696">696: </a>  PetscFree(shifts_loc);
-<a name="line697">697: </a>  PetscFree(inertias_loc);
-<a name="line698">698: </a>  <font color="#4169E1">return</font>(0);
-<a name="line699">699: </a>}
-
-<a name="line701">701: </a><font color="#B22222">/*</font>
-<a name="line702">702: </a><font color="#B22222">   Fills the fields of a shift structure</font>
-<a name="line703">703: </a><font color="#B22222">*/</font>
-<a name="line706">706: </a><strong><font color="#4169E1"><a name="EPSCreateShift"></a>static PetscErrorCode EPSCreateShift(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal val,EPS_shift neighb0,EPS_shift neighb1)</font></strong>
-<a name="line707">707: </a>{
-<a name="line708">708: </a>  PetscErrorCode  ierr;
-<a name="line709">709: </a>  EPS_shift       s,*pending2;
-<a name="line710">710: </a>  PetscInt        i;
-<a name="line711">711: </a>  EPS_SR          sr;
-<a name="line712">712: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line715">715: </a>  sr = ctx->sr;
-<a name="line716">716: </a>  PetscNewLog(eps,&s);
-<a name="line717">717: </a>  s->value = val;
-<a name="line718">718: </a>  s->neighb[0] = neighb0;
-<a name="line719">719: </a>  <font color="#4169E1">if</font> (neighb0) neighb0->neighb[1] = s;
-<a name="line720">720: </a>  s->neighb[1] = neighb1;
-<a name="line721">721: </a>  <font color="#4169E1">if</font> (neighb1) neighb1->neighb[0] = s;
-<a name="line722">722: </a>  s->comp[0] = PETSC_FALSE;
-<a name="line723">723: </a>  s->comp[1] = PETSC_FALSE;
-<a name="line724">724: </a>  s->index = -1;
-<a name="line725">725: </a>  s->neigs = 0;
-<a name="line726">726: </a>  s->nconv[0] = s->nconv[1] = 0;
-<a name="line727">727: </a>  s->nsch[0] = s->nsch[1]=0;
-<a name="line728">728: </a>  <font color="#B22222">/* Inserts in the stack of pending shifts */</font>
-<a name="line729">729: </a>  <font color="#B22222">/* If needed, the array is resized */</font>
-<a name="line730">730: </a>  <font color="#4169E1">if</font> (sr->nPend >= sr->maxPend) {
-<a name="line731">731: </a>    sr->maxPend *= 2;
-<a name="line732">732: </a>    PetscMalloc1(sr->maxPend,&pending2);
-<a name="line733">733: </a>    PetscLogObjectMemory((PetscObject)eps,<font color="#4169E1">sizeof</font>(EPS_shift));
-<a name="line734">734: </a>    <font color="#4169E1">for</font> (i=0;i<sr->nPend;i++) pending2[i] = sr->pending[i];
-<a name="line735">735: </a>    PetscFree(sr->pending);
-<a name="line736">736: </a>    sr->pending = pending2;
-<a name="line737">737: </a>  }
-<a name="line738">738: </a>  sr->pending[sr->nPend++]=s;
-<a name="line739">739: </a>  <font color="#4169E1">return</font>(0);
-<a name="line740">740: </a>}
-
-<a name="line742">742: </a><font color="#B22222">/* Prepare for Rational Krylov update */</font>
-<a name="line745">745: </a><strong><font color="#4169E1"><a name="EPSPrepareRational"></a>static PetscErrorCode EPSPrepareRational(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line746">746: </a>{
-<a name="line747">747: </a>  EPS_KRYLOVSCHUR  *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line748">748: </a>  PetscErrorCode   ierr;
-<a name="line749">749: </a>  PetscInt         dir,i,k,ld,nv;
-<a name="line750">750: </a>  PetscScalar      *A;
-<a name="line751">751: </a>  EPS_SR           sr = ctx->sr;
-<a name="line752">752: </a>  Vec              v;
-
-<a name="line755">755: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line756">756: </a>  dir = (sr->sPres->neighb[0] == sr->sPrev)?1:-1;
-<a name="line757">757: </a>  dir*=sr->dir;
-<a name="line758">758: </a>  k = 0;
-<a name="line759">759: </a>  <font color="#4169E1">for</font> (i=0;i<sr->nS;i++) {
-<a name="line760">760: </a>    <font color="#4169E1">if</font> (dir*PetscRealPart(sr->S[i])>0.0) {
-<a name="line761">761: </a>      sr->S[k] = sr->S[i];
-<a name="line762">762: </a>      sr->S[sr->nS+k] = sr->S[sr->nS+i];
-<a name="line763">763: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->Vnext,k,&v);
-<a name="line764">764: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,eps->nconv+i,v);
-<a name="line765">765: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->Vnext,k,&v);
-<a name="line766">766: </a>      k++;
-<a name="line767">767: </a>      <font color="#4169E1">if</font> (k>=sr->nS/2)<font color="#4169E1">break</font>;
-<a name="line768">768: </a>    }
-<a name="line769">769: </a>  }
-<a name="line770">770: </a>  <font color="#B22222">/* Copy to <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
-<a name="line771">771: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&A);
-<a name="line772">772: </a>  PetscMemzero(A,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line773">773: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line774">774: </a>    A[i*(1+ld)] = sr->S[i];
-<a name="line775">775: </a>    A[k+i*ld] = sr->S[sr->nS+i];
-<a name="line776">776: </a>  }
-<a name="line777">777: </a>  sr->nS = k;
-<a name="line778">778: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&A);
-<a name="line779">779: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(eps->ds,&nv,NULL,NULL,NULL,NULL);
-<a name="line780">780: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,k);
-<a name="line781">781: </a>  <font color="#B22222">/* Append u to V */</font>
-<a name="line782">782: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->Vnext,sr->nS,&v);
-<a name="line783">783: </a>  <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,sr->nv,v);
-<a name="line784">784: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->Vnext,sr->nS,&v);
-<a name="line785">785: </a>  <font color="#4169E1">return</font>(0);
-<a name="line786">786: </a>}
-
-<a name="line788">788: </a><font color="#B22222">/* Provides next shift to be computed */</font>
-<a name="line791">791: </a><strong><font color="#4169E1"><a name="EPSExtractShift"></a>static PetscErrorCode EPSExtractShift(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line792">792: </a>{
-<a name="line793">793: </a>  PetscErrorCode   ierr;
-<a name="line794">794: </a>  PetscInt         iner,zeros=0;
-<a name="line795">795: </a>  EPS_KRYLOVSCHUR  *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line796">796: </a>  EPS_SR           sr;
-<a name="line797">797: </a>  PetscReal        newShift;
-<a name="line798">798: </a>  EPS_shift        sPres;
-
-<a name="line801">801: </a>  sr = ctx->sr;
-<a name="line802">802: </a>  <font color="#4169E1">if</font> (sr->nPend > 0) {
-<a name="line803">803: </a>    sr->sPrev = sr->sPres;
-<a name="line804">804: </a>    sr->sPres = sr->pending[--sr->nPend];
-<a name="line805">805: </a>    sPres = sr->sPres;
-<a name="line806">806: </a>    EPSSliceGetInertia(eps,sPres->value,&iner,ctx->detect?&zeros:NULL);
-<a name="line807">807: </a>    <font color="#4169E1">if</font> (zeros) {
-<a name="line808">808: </a>      newShift = sPres->value*(1.0+SLICE_PTOL);
-<a name="line809">809: </a>      <font color="#4169E1">if</font> (sr->dir*(sPres->neighb[0] && newShift-sPres->neighb[0]->value) < 0) newShift = (sPres->value+sPres->neighb[0]->value)/2;
-<a name="line810">810: </a>      <font color="#4169E1">else</font> <font color="#4169E1">if</font> (sPres->neighb[1] && sr->dir*(sPres->neighb[1]->value-newShift) < 0) newShift = (sPres->value+sPres->neighb[1]->value)/2;
-<a name="line811">811: </a>      EPSSliceGetInertia(eps,newShift,&iner,&zeros);
-<a name="line812">812: </a>      <font color="#4169E1">if</font> (zeros) SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_CONV_FAILED,<font color="#666666">"Inertia computation fails in %g"</font>,newShift);
-<a name="line813">813: </a>      sPres->value = newShift;
-<a name="line814">814: </a>    }
-<a name="line815">815: </a>    sr->sPres->inertia = iner;
-<a name="line816">816: </a>    eps->target = sr->sPres->value;
-<a name="line817">817: </a>    eps->reason = EPS_CONVERGED_ITERATING;
-<a name="line818">818: </a>    eps->its = 0;
-<a name="line819">819: </a>  } <font color="#4169E1">else</font> sr->sPres = NULL;
-<a name="line820">820: </a>  <font color="#4169E1">return</font>(0);
-<a name="line821">821: </a>}
-
-<a name="line823">823: </a><font color="#B22222">/*</font>
-<a name="line824">824: </a><font color="#B22222">   Symmetric KrylovSchur adapted to spectrum slicing:</font>
-<a name="line825">825: </a><font color="#B22222">   Allows searching an specific amount of eigenvalues in the subintervals left and right.</font>
-<a name="line826">826: </a><font color="#B22222">   Returns whether the search has succeeded</font>
-<a name="line827">827: </a><font color="#B22222">*/</font>
-<a name="line830">830: </a><strong><font color="#4169E1"><a name="EPSKrylovSchur_Slice"></a>static PetscErrorCode EPSKrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line831">831: </a>{
-<a name="line832">832: </a>  PetscErrorCode  ierr;
-<a name="line833">833: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line834">834: </a>  PetscInt        i,conv,k,l,ld,nv,*iwork,j,p;
-<a name="line835">835: </a>  Mat             U;
-<a name="line836">836: </a>  PetscScalar     *Q,*A,rtmp;
-<a name="line837">837: </a>  PetscReal       *a,*b,beta;
-<a name="line838">838: </a>  PetscBool       breakdown;
-<a name="line839">839: </a>  PetscInt        count0,count1;
-<a name="line840">840: </a>  PetscReal       lambda;
-<a name="line841">841: </a>  EPS_shift       sPres;
-<a name="line842">842: </a>  PetscBool       complIterating;
-<a name="line843">843: </a>  PetscBool       sch0,sch1;
-<a name="line844">844: </a>  PetscInt        iterCompl=0,n0,n1;
-<a name="line845">845: </a>  EPS_SR          sr = ctx->sr;
-
-<a name="line848">848: </a>  <font color="#B22222">/* Spectrum slicing data */</font>
-<a name="line849">849: </a>  sPres = sr->sPres;
-<a name="line850">850: </a>  complIterating =PETSC_FALSE;
-<a name="line851">851: </a>  sch1 = sch0 = PETSC_TRUE;
-<a name="line852">852: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line853">853: </a>  PetscMalloc1(2*ld,&iwork);
-<a name="line854">854: </a>  count0=0;count1=0; <font color="#B22222">/* Found on both sides */</font>
-<a name="line855">855: </a>  <font color="#4169E1">if</font> (sr->nS > 0 && (sPres->neighb[0] == sr->sPrev || sPres->neighb[1] == sr->sPrev)) {
-<a name="line856">856: </a>    <font color="#B22222">/* Rational Krylov */</font>
-<a name="line857">857: </a>    <a href="../../../../../docs/manualpages/DS/DSTranslateRKS.html#DSTranslateRKS">DSTranslateRKS</a>(eps->ds,sr->sPrev->value-sPres->value);
-<a name="line858">858: </a>    <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(eps->ds,NULL,NULL,NULL,&l,NULL);
-<a name="line859">859: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,l+1,0,0,0);
-<a name="line860">860: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,l+1);
-<a name="line861">861: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
-<a name="line862">862: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,0,l+1);
-<a name="line863">863: </a>    MatDestroy(&U);
-<a name="line864">864: </a>  } <font color="#4169E1">else</font> {
-<a name="line865">865: </a>    <font color="#B22222">/* Get the starting Lanczos vector */</font>
-<a name="line866">866: </a>    EPSGetStartVector(eps,0,NULL);
-<a name="line867">867: </a>    l = 0;
-<a name="line868">868: </a>  }
-<a name="line869">869: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line870">870: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-<a name="line871">871: </a>    eps->its++; sr->itsKs++;
-<a name="line872">872: </a>    <font color="#B22222">/* Compute an nv-step Lanczos factorization */</font>
-<a name="line873">873: </a>    nv = PetscMin(eps->nconv+eps->mpd,eps->ncv);
-<a name="line874">874: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line875">875: </a>    b = a + ld;
-<a name="line876">876: </a>    EPSFullLanczos(eps,a,b,eps->nconv+l,&nv,&breakdown);
-<a name="line877">877: </a>    sr->nv = nv;
-<a name="line878">878: </a>    beta = b[nv-1];
-<a name="line879">879: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line880">880: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,eps->nconv,eps->nconv+l);
-<a name="line881">881: </a>    <font color="#4169E1">if</font> (l==0) {
-<a name="line882">882: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_INTERMEDIATE);
-<a name="line883">883: </a>    } <font color="#4169E1">else</font> {
-<a name="line884">884: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line885">885: </a>    }
-<a name="line886">886: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,nv);
-
-<a name="line888">888: </a>    <font color="#B22222">/* Solve projected problem and compute residual norm estimates */</font>
-<a name="line889">889: </a>    <font color="#4169E1">if</font> (eps->its == 1 && l > 0) {<font color="#B22222">/* After rational update */</font>
-<a name="line890">890: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&A);
-<a name="line891">891: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line892">892: </a>      b = a + ld;
-<a name="line893">893: </a>      k = eps->nconv+l;
-<a name="line894">894: </a>      A[k*ld+k-1] = A[(k-1)*ld+k];
-<a name="line895">895: </a>      A[k*ld+k] = a[k];
-<a name="line896">896: </a>      <font color="#4169E1">for</font> (j=k+1; j< nv; j++) {
-<a name="line897">897: </a>        A[j*ld+j] = a[j];
-<a name="line898">898: </a>        A[j*ld+j-1] = b[j-1] ;
-<a name="line899">899: </a>        A[(j-1)*ld+j] = b[j-1];
-<a name="line900">900: </a>      }
-<a name="line901">901: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&A);
-<a name="line902">902: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line903">903: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,NULL);
-<a name="line904">904: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,NULL,NULL,NULL,NULL);
-<a name="line905">905: </a>      <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
-<a name="line906">906: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* Restart */</font>
-<a name="line907">907: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,NULL);
-<a name="line908">908: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,NULL,NULL,NULL,NULL);
-<a name="line909">909: </a>    }
-<a name="line910">910: </a>    <font color="#B22222">/* Residual */</font>
-<a name="line911">911: </a>    EPSKrylovConvergence(eps,PETSC_TRUE,eps->nconv,nv-eps->nconv,beta,1.0,&k);
-
-<a name="line913">913: </a>    <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line914">914: </a>      <font color="#B22222">/* Check convergence */</font>
-<a name="line915">915: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line916">916: </a>      b = a + ld;
-<a name="line917">917: </a>      conv = 0;
-<a name="line918">918: </a>      j = k = eps->nconv;
-<a name="line919">919: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) <font color="#4169E1">if</font> (eps->errest[i] < eps->tol) conv++;
-<a name="line920">920: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line921">921: </a>        <font color="#4169E1">if</font> (eps->errest[i] < eps->tol) {
-<a name="line922">922: </a>          iwork[j++]=i;
-<a name="line923">923: </a>        } <font color="#4169E1">else</font> iwork[conv+k++]=i;
-<a name="line924">924: </a>      }
-<a name="line925">925: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line926">926: </a>        a[i]=PetscRealPart(eps->eigr[i]);
-<a name="line927">927: </a>        b[i]=eps->errest[i];
-<a name="line928">928: </a>      }
-<a name="line929">929: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line930">930: </a>        eps->eigr[i] = a[iwork[i]];
-<a name="line931">931: </a>        eps->errest[i] = b[iwork[i]];
-<a name="line932">932: </a>      }
-<a name="line933">933: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line934">934: </a>        a[i]=PetscRealPart(eps->eigr[i]);
-<a name="line935">935: </a>        b[i]=eps->errest[i];
-<a name="line936">936: </a>      }
-<a name="line937">937: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line938">938: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line939">939: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line940">940: </a>        p=iwork[i];
-<a name="line941">941: </a>        <font color="#4169E1">if</font> (p!=i) {
-<a name="line942">942: </a>          j=i+1;
-<a name="line943">943: </a>          <font color="#4169E1">while</font> (iwork[j]!=i) j++;
-<a name="line944">944: </a>          iwork[j]=p;iwork[i]=i;
-<a name="line945">945: </a>          <font color="#4169E1">for</font> (k=0;k<nv;k++) {
-<a name="line946">946: </a>            rtmp=Q[k+p*ld];Q[k+p*ld]=Q[k+i*ld];Q[k+i*ld]=rtmp;
-<a name="line947">947: </a>          }
-<a name="line948">948: </a>        }
-<a name="line949">949: </a>      }
-<a name="line950">950: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line951">951: </a>      k=eps->nconv+conv;
-<a name="line952">952: </a>    }
-
-<a name="line954">954: </a>    <font color="#B22222">/* Checking values obtained for completing */</font>
-<a name="line955">955: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line956">956: </a>      sr->back[i]=eps->eigr[i];
-<a name="line957">957: </a>    }
-<a name="line958">958: </a>    <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,k,sr->back,eps->eigi);
-<a name="line959">959: </a>    count0=count1=0;
-<a name="line960">960: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line961">961: </a>      lambda = PetscRealPart(sr->back[i]);
-<a name="line962">962: </a>      <font color="#4169E1">if</font> (((sr->dir)*(sPres->value - lambda) > 0) && ((sr->dir)*(lambda - sPres->ext[0]) > 0)) count0++;
-<a name="line963">963: </a>      <font color="#4169E1">if</font> (((sr->dir)*(lambda - sPres->value) > 0) && ((sr->dir)*(sPres->ext[1] - lambda) > 0)) count1++;
-<a name="line964">964: </a>    }
-<a name="line965">965: </a>    <font color="#4169E1">if</font> (k>eps->nev && eps->ncv-k<5) eps->reason = EPS_CONVERGED_TOL;
-<a name="line966">966: </a>    <font color="#4169E1">else</font> {
-<a name="line967">967: </a>      <font color="#B22222">/* Checks completion */</font>
-<a name="line968">968: </a>      <font color="#4169E1">if</font> ((!sch0||count0 >= sPres->nsch[0]) && (!sch1 ||count1 >= sPres->nsch[1])) {
-<a name="line969">969: </a>        eps->reason = EPS_CONVERGED_TOL;
-<a name="line970">970: </a>      } <font color="#4169E1">else</font> {
-<a name="line971">971: </a>        <font color="#4169E1">if</font> (!complIterating && eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line972">972: </a>        <font color="#4169E1">if</font> (complIterating) {
-<a name="line973">973: </a>          <font color="#4169E1">if</font> (--iterCompl <= 0) eps->reason = EPS_DIVERGED_ITS;
-<a name="line974">974: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (k >= eps->nev) {
-<a name="line975">975: </a>          n0 = sPres->nsch[0]-count0;
-<a name="line976">976: </a>          n1 = sPres->nsch[1]-count1;
-<a name="line977">977: </a>          <font color="#4169E1">if</font> (sr->iterCompl>0 && ((n0>0 && n0<= sr->nMAXCompl)||(n1>0&&n1<=sr->nMAXCompl))) {
-<a name="line978">978: </a>            <font color="#B22222">/* Iterating for completion*/</font>
-<a name="line979">979: </a>            complIterating = PETSC_TRUE;
-<a name="line980">980: </a>            <font color="#4169E1">if</font> (n0 >sr->nMAXCompl)sch0 = PETSC_FALSE;
-<a name="line981">981: </a>            <font color="#4169E1">if</font> (n1 >sr->nMAXCompl)sch1 = PETSC_FALSE;
-<a name="line982">982: </a>            iterCompl = sr->iterCompl;
-<a name="line983">983: </a>          } <font color="#4169E1">else</font> eps->reason = EPS_CONVERGED_TOL;
-<a name="line984">984: </a>        }
-<a name="line985">985: </a>      }
-<a name="line986">986: </a>    }
-<a name="line987">987: </a>    <font color="#B22222">/* Update l */</font>
-<a name="line988">988: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
-<a name="line989">989: </a>    <font color="#4169E1">else</font> l = 0;
-<a name="line990">990: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-<a name="line991">991: </a>    <font color="#4169E1">if</font> (breakdown) l=0;
-
-<a name="line993">993: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-<a name="line994">994: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line995">995: </a>        <font color="#B22222">/* Start a new Lanczos factorization */</font>
-<a name="line996">996: </a>        PetscInfo2(eps,<font color="#666666">"Breakdown in Krylov-Schur method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
-<a name="line997">997: </a>        EPSGetStartVector(eps,k,&breakdown);
-<a name="line998">998: </a>        <font color="#4169E1">if</font> (breakdown) {
-<a name="line999">999: </a>          eps->reason = EPS_DIVERGED_BREAKDOWN;
-<a name="line1000">1000: </a>          PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
-<a name="line1001">1001: </a>        }
-<a name="line1002">1002: </a>      } <font color="#4169E1">else</font> {
-<a name="line1003">1003: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
-<a name="line1004">1004: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line1005">1005: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line1006">1006: </a>        b = a + ld;
-<a name="line1007">1007: </a>        <font color="#4169E1">for</font> (i=k;i<k+l;i++) {
-<a name="line1008">1008: </a>          a[i] = PetscRealPart(eps->eigr[i]);
-<a name="line1009">1009: </a>          b[i] = PetscRealPart(Q[nv-1+i*ld]*beta);
-<a name="line1010">1010: </a>        }
-<a name="line1011">1011: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
-<a name="line1012">1012: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line589">589: </a>    VecScatterDestroy(&vec_sc);
+<a name="line590">590: </a>  }
+<a name="line591">591: </a>  PetscFree2(idx1,idx2);
+<a name="line592">592: </a>  VecDestroy(&vg);
+<a name="line593">593: </a>  <font color="#4169E1">return</font>(0);
+<a name="line594">594: </a>}
+
+<a name="line598">598: </a><font color="#B22222">/*</font>
+<a name="line599">599: </a><font color="#B22222">  EPSComputeVectors_Slice - Recover Eigenvectors from subcomunicators</font>
+<a name="line600">600: </a><font color="#B22222"> */</font>
+<a name="line601">601: </a><strong><font color="#4169E1"><a name="EPSComputeVectors_Slice"></a>PetscErrorCode EPSComputeVectors_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line602">602: </a>{
+<a name="line603">603: </a>  PetscErrorCode  ierr;
+<a name="line604">604: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line607">607: </a>  <font color="#4169E1">if</font> (ctx->global && ctx->npart>1) {
+<a name="line608">608: </a>    EPSComputeVectors(ctx->eps);
+<a name="line609">609: </a>    EPSSliceGatherEigenVectors(eps);
+<a name="line610">610: </a>  }
+<a name="line611">611: </a>  <font color="#4169E1">return</font>(0);
+<a name="line612">612: </a>}
+
+<a name="line614">614: </a><strong><font color="#228B22">#define SWAP(a,b,t) {t=a;a=b;b=t;}</font></strong>
+
+<a name="line618">618: </a><strong><font color="#4169E1"><a name="EPSSliceGetInertias"></a>static PetscErrorCode EPSSliceGetInertias(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *n,PetscReal **shifts,PetscInt **inertias)</font></strong>
+<a name="line619">619: </a>{
+<a name="line620">620: </a>  PetscErrorCode  ierr;
+<a name="line621">621: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line622">622: </a>  PetscInt        i=0,j,tmpi;
+<a name="line623">623: </a>  PetscReal       v,tmpr;
+<a name="line624">624: </a>  EPS_shift       s;
+
+<a name="line627">627: </a>  <font color="#4169E1">if</font> (!eps->state) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Must call <a href="../../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() first"</font>);
+<a name="line628">628: </a>  <font color="#4169E1">if</font> (!ctx->sr) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Only available in interval computations, see <a href="../../../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()"</font>);
+<a name="line629">629: </a>  <font color="#4169E1">if</font> (!ctx->sr->s0) {  <font color="#B22222">/* <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a> not called yet */</font>
+<a name="line630">630: </a>    *n = 2;
+<a name="line631">631: </a>  } <font color="#4169E1">else</font> {
+<a name="line632">632: </a>    *n = 1;
+<a name="line633">633: </a>    s = ctx->sr->s0;
+<a name="line634">634: </a>    <font color="#4169E1">while</font> (s) {
+<a name="line635">635: </a>      (*n)++;
+<a name="line636">636: </a>      s = s->neighb[1];
+<a name="line637">637: </a>    }
+<a name="line638">638: </a>  }
+<a name="line639">639: </a>  PetscMalloc1(*n,shifts);
+<a name="line640">640: </a>  PetscMalloc1(*n,inertias);
+<a name="line641">641: </a>  <font color="#4169E1">if</font> (!ctx->sr->s0) {  <font color="#B22222">/* <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a> not called yet */</font>
+<a name="line642">642: </a>    (*shifts)[0]   = ctx->sr->int0;
+<a name="line643">643: </a>    (*shifts)[1]   = ctx->sr->int1;
+<a name="line644">644: </a>    (*inertias)[0] = ctx->sr->inertia0;
+<a name="line645">645: </a>    (*inertias)[1] = ctx->sr->inertia1;
+<a name="line646">646: </a>  } <font color="#4169E1">else</font> {
+<a name="line647">647: </a>    s = ctx->sr->s0;
+<a name="line648">648: </a>    <font color="#4169E1">while</font> (s) {
+<a name="line649">649: </a>      (*shifts)[i]     = s->value;
+<a name="line650">650: </a>      (*inertias)[i++] = s->inertia;
+<a name="line651">651: </a>      s = s->neighb[1];
+<a name="line652">652: </a>    }
+<a name="line653">653: </a>    (*shifts)[i]   = ctx->sr->int1;
+<a name="line654">654: </a>    (*inertias)[i] = ctx->sr->inertia1;
+<a name="line655">655: </a>  }
+<a name="line656">656: </a>  <font color="#B22222">/* remove possible duplicate in last position */</font>
+<a name="line657">657: </a>  <font color="#4169E1">if</font> ((*shifts)[(*n)-1]==(*shifts)[(*n)-2]) (*n)--;
+<a name="line658">658: </a>  <font color="#B22222">/* sort result */</font>
+<a name="line659">659: </a>  <font color="#4169E1">for</font> (i=0;i<*n;i++) {
+<a name="line660">660: </a>    v = (*shifts)[i];
+<a name="line661">661: </a>    <font color="#4169E1">for</font> (j=i+1;j<*n;j++) {
+<a name="line662">662: </a>      <font color="#4169E1">if</font> (v > (*shifts)[j]) {
+<a name="line663">663: </a>        SWAP((*shifts)[i],(*shifts)[j],tmpr);
+<a name="line664">664: </a>        SWAP((*inertias)[i],(*inertias)[j],tmpi);
+<a name="line665">665: </a>        v = (*shifts)[i];
+<a name="line666">666: </a>      }
+<a name="line667">667: </a>    }
+<a name="line668">668: </a>  }
+<a name="line669">669: </a>  <font color="#4169E1">return</font>(0);
+<a name="line670">670: </a>}
+
+<a name="line674">674: </a><strong><font color="#4169E1"><a name="EPSSliceGatherSolution"></a>static PetscErrorCode EPSSliceGatherSolution(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line675">675: </a>{
+<a name="line676">676: </a>  PetscErrorCode  ierr;
+<a name="line677">677: </a>  PetscMPIInt     rank,nproc;
+<a name="line678">678: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line679">679: </a>  PetscInt        i,idx,j;
+<a name="line680">680: </a>  PetscInt        *perm_loc,off=0,*inertias_loc,ns;
+<a name="line681">681: </a>  PetscScalar     *eigr_loc;
+<a name="line682">682: </a>  EPS_SR          sr_loc;
+<a name="line683">683: </a>  PetscReal       *shifts_loc;
+<a name="line684">684: </a>  PetscMPIInt     *disp,*ns_loc,aux;
+
+<a name="line687">687: </a>  eps->nconv = 0;
+<a name="line688">688: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) eps->nconv += ctx->nconv_loc[i];
+<a name="line689">689: </a>  sr_loc = ((EPS_KRYLOVSCHUR*)ctx->eps->data)->sr;
+
+<a name="line691">691: </a>  <font color="#B22222">/* Gather the shifts used and the inertias computed */</font>
+<a name="line692">692: </a>  EPSSliceGetInertias(ctx->eps,&ns,&shifts_loc,&inertias_loc);
+<a name="line693">693: </a>  <font color="#4169E1">if</font> (ctx->sr->dir>0 && shifts_loc[ns-1]==sr_loc->int1 && ctx->subc->color<ctx->npart-1) ns--;
+<a name="line694">694: </a>  <font color="#4169E1">if</font> (ctx->sr->dir<0 && shifts_loc[ns-1]==sr_loc->int0 && ctx->subc->color>0) {
+<a name="line695">695: </a>    ns--;
+<a name="line696">696: </a>    <font color="#4169E1">for</font> (i=0;i<ns;i++) {
+<a name="line697">697: </a>      inertias_loc[i] = inertias_loc[i+1];
+<a name="line698">698: </a>      shifts_loc[i] = shifts_loc[i+1];
+<a name="line699">699: </a>    }
+<a name="line700">700: </a>  }
+<a name="line701">701: </a>  PetscMalloc1(ctx->npart,&ns_loc);
+<a name="line702">702: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
+<a name="line703">703: </a>  PetscMPIIntCast(ns,&aux);
+<a name="line704">704: </a>  <font color="#4169E1">if</font> (rank==0) { <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(&aux,1,MPI_INT,ns_loc,1,MPI_INT,ctx->commrank); }
+<a name="line705">705: </a>  PetscMPIIntCast(ctx->npart,&aux);
+<a name="line706">706: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ns_loc,aux,MPI_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line707">707: </a>  ctx->nshifts = 0;
+<a name="line708">708: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->npart;i++) ctx->nshifts += ns_loc[i];
+<a name="line709">709: </a>  PetscFree(ctx->inertias);
+<a name="line710">710: </a>  PetscFree(ctx->shifts);
+<a name="line711">711: </a>  PetscMalloc1(ctx->nshifts,&ctx->inertias);
+<a name="line712">712: </a>  PetscMalloc1(ctx->nshifts,&ctx->shifts);
+
+<a name="line714">714: </a>  <font color="#B22222">/* Gather eigenvalues (same ranks have fully set of eigenvalues)*/</font>
+<a name="line715">715: </a>  eigr_loc = sr_loc->eigr;
+<a name="line716">716: </a>  perm_loc = sr_loc->perm;
+<a name="line717">717: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(((PetscObject)eps)->comm,&nproc);
+<a name="line718">718: </a>  PetscMalloc1(ctx->npart,&disp);
+<a name="line719">719: </a>  disp[0] = 0;
+<a name="line720">720: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) disp[i] = disp[i-1]+ctx->nconv_loc[i-1];
+<a name="line721">721: </a>  <font color="#4169E1">if</font> (nproc%ctx->npart==0) { <font color="#B22222">/* subcommunicators with the same size */</font>
+<a name="line722">722: </a>    PetscMPIIntCast(sr_loc->numEigs,&aux);
+<a name="line723">723: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(eigr_loc,aux,MPIU_SCALAR,eps->eigr,ctx->nconv_loc,disp,MPIU_SCALAR,ctx->commrank); <font color="#B22222">/* eigenvalues */</font>
+<a name="line724">724: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(perm_loc,aux,MPIU_INT,eps->perm,ctx->nconv_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* perm */</font>
+<a name="line725">725: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) disp[i] = disp[i-1]+ns_loc[i-1];
+<a name="line726">726: </a>    PetscMPIIntCast(ns,&aux);
+<a name="line727">727: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(shifts_loc,aux,MPIU_REAL,ctx->shifts,ns_loc,disp,MPIU_REAL,ctx->commrank); <font color="#B22222">/* shifts */</font>
+<a name="line728">728: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(inertias_loc,aux,MPIU_INT,ctx->inertias,ns_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* inertias */</font>
+<a name="line729">729: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&sr_loc->itsKs,&eps->its,1,MPIU_INT,MPI_SUM,ctx->commrank);
+<a name="line730">730: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* subcommunicators with different size */</font>
+<a name="line731">731: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscSubcommChild(ctx->subc),&rank);
+<a name="line732">732: </a>    <font color="#4169E1">if</font> (rank==0) {
+<a name="line733">733: </a>      PetscMPIIntCast(sr_loc->numEigs,&aux);
+<a name="line734">734: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(eigr_loc,aux,MPIU_SCALAR,eps->eigr,ctx->nconv_loc,disp,MPIU_SCALAR,ctx->commrank); <font color="#B22222">/* eigenvalues */</font>
+<a name="line735">735: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(perm_loc,aux,MPIU_INT,eps->perm,ctx->nconv_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* perm */</font>
+<a name="line736">736: </a>      <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) disp[i] = disp[i-1]+ns_loc[i-1];
+<a name="line737">737: </a>      PetscMPIIntCast(ns,&aux);
+<a name="line738">738: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(shifts_loc,aux,MPIU_REAL,ctx->shifts,ns_loc,disp,MPIU_REAL,ctx->commrank); <font color="#B22222">/* shifts */</font>
+<a name="line739">739: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgatherv.html#MPI_Allgatherv">MPI_Allgatherv</a>(inertias_loc,aux,MPIU_INT,ctx->inertias,ns_loc,disp,MPIU_INT,ctx->commrank); <font color="#B22222">/* inertias */</font>
+<a name="line740">740: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&sr_loc->itsKs,&eps->its,1,MPIU_INT,MPI_SUM,ctx->commrank);
+<a name="line741">741: </a>    }
+<a name="line742">742: </a>    PetscMPIIntCast(eps->nconv,&aux);
+<a name="line743">743: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(eps->eigr,aux,MPIU_SCALAR,0,PetscSubcommChild(ctx->subc));
+<a name="line744">744: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(eps->perm,aux,MPIU_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line745">745: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->shifts,ctx->nshifts,MPIU_REAL,0,PetscSubcommChild(ctx->subc));
+<a name="line746">746: </a>    PetscMPIIntCast(ctx->nshifts,&aux);
+<a name="line747">747: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(ctx->inertias,aux,MPIU_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line748">748: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&eps->its,1,MPIU_INT,0,PetscSubcommChild(ctx->subc));
+<a name="line749">749: </a>  }
+<a name="line750">750: </a>  <font color="#B22222">/* Update global array eps->perm */</font>
+<a name="line751">751: </a>  idx = ctx->nconv_loc[0];
+<a name="line752">752: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->npart;i++) {
+<a name="line753">753: </a>    off += ctx->nconv_loc[i-1];
+<a name="line754">754: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->nconv_loc[i];j++) eps->perm[idx++] += off;
+<a name="line755">755: </a>  }
+
+<a name="line757">757: </a>  <font color="#B22222">/* Gather parallel eigenvectors */</font>
+<a name="line758">758: </a>  PetscFree(ns_loc);
+<a name="line759">759: </a>  PetscFree(disp);
+<a name="line760">760: </a>  PetscFree(shifts_loc);
+<a name="line761">761: </a>  PetscFree(inertias_loc);
+<a name="line762">762: </a>  <font color="#4169E1">return</font>(0);
+<a name="line763">763: </a>}
+
+<a name="line765">765: </a><font color="#B22222">/*</font>
+<a name="line766">766: </a><font color="#B22222">   Fills the fields of a shift structure</font>
+<a name="line767">767: </a><font color="#B22222">*/</font>
+<a name="line770">770: </a><strong><font color="#4169E1"><a name="EPSCreateShift"></a>static PetscErrorCode EPSCreateShift(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal val,EPS_shift neighb0,EPS_shift neighb1)</font></strong>
+<a name="line771">771: </a>{
+<a name="line772">772: </a>  PetscErrorCode  ierr;
+<a name="line773">773: </a>  EPS_shift       s,*pending2;
+<a name="line774">774: </a>  PetscInt        i;
+<a name="line775">775: </a>  EPS_SR          sr;
+<a name="line776">776: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line779">779: </a>  sr = ctx->sr;
+<a name="line780">780: </a>  PetscNewLog(eps,&s);
+<a name="line781">781: </a>  s->value = val;
+<a name="line782">782: </a>  s->neighb[0] = neighb0;
+<a name="line783">783: </a>  <font color="#4169E1">if</font> (neighb0) neighb0->neighb[1] = s;
+<a name="line784">784: </a>  s->neighb[1] = neighb1;
+<a name="line785">785: </a>  <font color="#4169E1">if</font> (neighb1) neighb1->neighb[0] = s;
+<a name="line786">786: </a>  s->comp[0] = PETSC_FALSE;
+<a name="line787">787: </a>  s->comp[1] = PETSC_FALSE;
+<a name="line788">788: </a>  s->index = -1;
+<a name="line789">789: </a>  s->neigs = 0;
+<a name="line790">790: </a>  s->nconv[0] = s->nconv[1] = 0;
+<a name="line791">791: </a>  s->nsch[0] = s->nsch[1]=0;
+<a name="line792">792: </a>  <font color="#B22222">/* Inserts in the stack of pending shifts */</font>
+<a name="line793">793: </a>  <font color="#B22222">/* If needed, the array is resized */</font>
+<a name="line794">794: </a>  <font color="#4169E1">if</font> (sr->nPend >= sr->maxPend) {
+<a name="line795">795: </a>    sr->maxPend *= 2;
+<a name="line796">796: </a>    PetscMalloc1(sr->maxPend,&pending2);
+<a name="line797">797: </a>    PetscLogObjectMemory((PetscObject)eps,<font color="#4169E1">sizeof</font>(EPS_shift));
+<a name="line798">798: </a>    <font color="#4169E1">for</font> (i=0;i<sr->nPend;i++) pending2[i] = sr->pending[i];
+<a name="line799">799: </a>    PetscFree(sr->pending);
+<a name="line800">800: </a>    sr->pending = pending2;
+<a name="line801">801: </a>  }
+<a name="line802">802: </a>  sr->pending[sr->nPend++]=s;
+<a name="line803">803: </a>  <font color="#4169E1">return</font>(0);
+<a name="line804">804: </a>}
+
+<a name="line806">806: </a><font color="#B22222">/* Prepare for Rational Krylov update */</font>
+<a name="line809">809: </a><strong><font color="#4169E1"><a name="EPSPrepareRational"></a>static PetscErrorCode EPSPrepareRational(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line810">810: </a>{
+<a name="line811">811: </a>  EPS_KRYLOVSCHUR  *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line812">812: </a>  PetscErrorCode   ierr;
+<a name="line813">813: </a>  PetscInt         dir,i,k,ld,nv;
+<a name="line814">814: </a>  PetscScalar      *A;
+<a name="line815">815: </a>  EPS_SR           sr = ctx->sr;
+<a name="line816">816: </a>  Vec              v;
+
+<a name="line819">819: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line820">820: </a>  dir = (sr->sPres->neighb[0] == sr->sPrev)?1:-1;
+<a name="line821">821: </a>  dir*=sr->dir;
+<a name="line822">822: </a>  k = 0;
+<a name="line823">823: </a>  <font color="#4169E1">for</font> (i=0;i<sr->nS;i++) {
+<a name="line824">824: </a>    <font color="#4169E1">if</font> (dir*PetscRealPart(sr->S[i])>0.0) {
+<a name="line825">825: </a>      sr->S[k] = sr->S[i];
+<a name="line826">826: </a>      sr->S[sr->nS+k] = sr->S[sr->nS+i];
+<a name="line827">827: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->Vnext,k,&v);
+<a name="line828">828: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,eps->nconv+i,v);
+<a name="line829">829: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->Vnext,k,&v);
+<a name="line830">830: </a>      k++;
+<a name="line831">831: </a>      <font color="#4169E1">if</font> (k>=sr->nS/2)<font color="#4169E1">break</font>;
+<a name="line832">832: </a>    }
+<a name="line833">833: </a>  }
+<a name="line834">834: </a>  <font color="#B22222">/* Copy to <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
+<a name="line835">835: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&A);
+<a name="line836">836: </a>  PetscMemzero(A,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line837">837: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line838">838: </a>    A[i*(1+ld)] = sr->S[i];
+<a name="line839">839: </a>    A[k+i*ld] = sr->S[sr->nS+i];
+<a name="line840">840: </a>  }
+<a name="line841">841: </a>  sr->nS = k;
+<a name="line842">842: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&A);
+<a name="line843">843: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(eps->ds,&nv,NULL,NULL,NULL,NULL);
+<a name="line844">844: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,0,k);
+<a name="line845">845: </a>  <font color="#B22222">/* Append u to V */</font>
+<a name="line846">846: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->Vnext,sr->nS,&v);
+<a name="line847">847: </a>  <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,sr->nv,v);
+<a name="line848">848: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->Vnext,sr->nS,&v);
+<a name="line849">849: </a>  <font color="#4169E1">return</font>(0);
+<a name="line850">850: </a>}
+
+<a name="line852">852: </a><font color="#B22222">/* Provides next shift to be computed */</font>
+<a name="line855">855: </a><strong><font color="#4169E1"><a name="EPSExtractShift"></a>static PetscErrorCode EPSExtractShift(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line856">856: </a>{
+<a name="line857">857: </a>  PetscErrorCode   ierr;
+<a name="line858">858: </a>  PetscInt         iner,zeros=0;
+<a name="line859">859: </a>  EPS_KRYLOVSCHUR  *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line860">860: </a>  EPS_SR           sr;
+<a name="line861">861: </a>  PetscReal        newShift;
+<a name="line862">862: </a>  EPS_shift        sPres;
+
+<a name="line865">865: </a>  sr = ctx->sr;
+<a name="line866">866: </a>  <font color="#4169E1">if</font> (sr->nPend > 0) {
+<a name="line867">867: </a>    sr->sPrev = sr->sPres;
+<a name="line868">868: </a>    sr->sPres = sr->pending[--sr->nPend];
+<a name="line869">869: </a>    sPres = sr->sPres;
+<a name="line870">870: </a>    EPSSliceGetInertia(eps,sPres->value,&iner,ctx->detect?&zeros:NULL);
+<a name="line871">871: </a>    <font color="#4169E1">if</font> (zeros) {
+<a name="line872">872: </a>      newShift = sPres->value*(1.0+SLICE_PTOL);
+<a name="line873">873: </a>      <font color="#4169E1">if</font> (sr->dir*(sPres->neighb[0] && newShift-sPres->neighb[0]->value) < 0) newShift = (sPres->value+sPres->neighb[0]->value)/2;
+<a name="line874">874: </a>      <font color="#4169E1">else</font> <font color="#4169E1">if</font> (sPres->neighb[1] && sr->dir*(sPres->neighb[1]->value-newShift) < 0) newShift = (sPres->value+sPres->neighb[1]->value)/2;
+<a name="line875">875: </a>      EPSSliceGetInertia(eps,newShift,&iner,&zeros);
+<a name="line876">876: </a>      <font color="#4169E1">if</font> (zeros) SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_CONV_FAILED,<font color="#666666">"Inertia computation fails in %g"</font>,newShift);
+<a name="line877">877: </a>      sPres->value = newShift;
+<a name="line878">878: </a>    }
+<a name="line879">879: </a>    sr->sPres->inertia = iner;
+<a name="line880">880: </a>    eps->target = sr->sPres->value;
+<a name="line881">881: </a>    eps->reason = EPS_CONVERGED_ITERATING;
+<a name="line882">882: </a>    eps->its = 0;
+<a name="line883">883: </a>  } <font color="#4169E1">else</font> sr->sPres = NULL;
+<a name="line884">884: </a>  <font color="#4169E1">return</font>(0);
+<a name="line885">885: </a>}
+
+<a name="line887">887: </a><font color="#B22222">/*</font>
+<a name="line888">888: </a><font color="#B22222">   Symmetric KrylovSchur adapted to spectrum slicing:</font>
+<a name="line889">889: </a><font color="#B22222">   Allows searching an specific amount of eigenvalues in the subintervals left and right.</font>
+<a name="line890">890: </a><font color="#B22222">   Returns whether the search has succeeded</font>
+<a name="line891">891: </a><font color="#B22222">*/</font>
+<a name="line894">894: </a><strong><font color="#4169E1"><a name="EPSKrylovSchur_Slice"></a>static PetscErrorCode EPSKrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line895">895: </a>{
+<a name="line896">896: </a>  PetscErrorCode  ierr;
+<a name="line897">897: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line898">898: </a>  PetscInt        i,conv,k,l,ld,nv,*iwork,j,p;
+<a name="line899">899: </a>  Mat             U;
+<a name="line900">900: </a>  PetscScalar     *Q,*A,rtmp;
+<a name="line901">901: </a>  PetscReal       *a,*b,beta;
+<a name="line902">902: </a>  PetscBool       breakdown;
+<a name="line903">903: </a>  PetscInt        count0,count1;
+<a name="line904">904: </a>  PetscReal       lambda;
+<a name="line905">905: </a>  EPS_shift       sPres;
+<a name="line906">906: </a>  PetscBool       complIterating;
+<a name="line907">907: </a>  PetscBool       sch0,sch1;
+<a name="line908">908: </a>  PetscInt        iterCompl=0,n0,n1;
+<a name="line909">909: </a>  EPS_SR          sr = ctx->sr;
+
+<a name="line912">912: </a>  <font color="#B22222">/* Spectrum slicing data */</font>
+<a name="line913">913: </a>  sPres = sr->sPres;
+<a name="line914">914: </a>  complIterating =PETSC_FALSE;
+<a name="line915">915: </a>  sch1 = sch0 = PETSC_TRUE;
+<a name="line916">916: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line917">917: </a>  PetscMalloc1(2*ld,&iwork);
+<a name="line918">918: </a>  count0=0;count1=0; <font color="#B22222">/* Found on both sides */</font>
+<a name="line919">919: </a>  <font color="#4169E1">if</font> (sr->nS > 0 && (sPres->neighb[0] == sr->sPrev || sPres->neighb[1] == sr->sPrev)) {
+<a name="line920">920: </a>    <font color="#B22222">/* Rational Krylov */</font>
+<a name="line921">921: </a>    <a href="../../../../../docs/manualpages/DS/DSTranslateRKS.html#DSTranslateRKS">DSTranslateRKS</a>(eps->ds,sr->sPrev->value-sPres->value);
+<a name="line922">922: </a>    <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(eps->ds,NULL,NULL,NULL,&l,NULL);
+<a name="line923">923: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,l+1,0,0,0);
+<a name="line924">924: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,0,l+1);
+<a name="line925">925: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
+<a name="line926">926: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,0,l+1);
+<a name="line927">927: </a>    MatDestroy(&U);
+<a name="line928">928: </a>  } <font color="#4169E1">else</font> {
+<a name="line929">929: </a>    <font color="#B22222">/* Get the starting Lanczos vector */</font>
+<a name="line930">930: </a>    EPSGetStartVector(eps,0,NULL);
+<a name="line931">931: </a>    l = 0;
+<a name="line932">932: </a>  }
+<a name="line933">933: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line934">934: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line935">935: </a>    eps->its++; sr->itsKs++;
+<a name="line936">936: </a>    <font color="#B22222">/* Compute an nv-step Lanczos factorization */</font>
+<a name="line937">937: </a>    nv = PetscMin(eps->nconv+eps->mpd,eps->ncv);
+<a name="line938">938: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line939">939: </a>    b = a + ld;
+<a name="line940">940: </a>    EPSFullLanczos(eps,a,b,eps->nconv+l,&nv,&breakdown);
+<a name="line941">941: </a>    sr->nv = nv;
+<a name="line942">942: </a>    beta = b[nv-1];
+<a name="line943">943: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line944">944: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,eps->nconv,eps->nconv+l);
+<a name="line945">945: </a>    <font color="#4169E1">if</font> (l==0) {
+<a name="line946">946: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_INTERMEDIATE);
+<a name="line947">947: </a>    } <font color="#4169E1">else</font> {
+<a name="line948">948: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line949">949: </a>    }
+<a name="line950">950: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,nv);
+
+<a name="line952">952: </a>    <font color="#B22222">/* Solve projected problem and compute residual norm estimates */</font>
+<a name="line953">953: </a>    <font color="#4169E1">if</font> (eps->its == 1 && l > 0) {<font color="#B22222">/* After rational update */</font>
+<a name="line954">954: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&A);
+<a name="line955">955: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line956">956: </a>      b = a + ld;
+<a name="line957">957: </a>      k = eps->nconv+l;
+<a name="line958">958: </a>      A[k*ld+k-1] = A[(k-1)*ld+k];
+<a name="line959">959: </a>      A[k*ld+k] = a[k];
+<a name="line960">960: </a>      <font color="#4169E1">for</font> (j=k+1; j< nv; j++) {
+<a name="line961">961: </a>        A[j*ld+j] = a[j];
+<a name="line962">962: </a>        A[j*ld+j-1] = b[j-1] ;
+<a name="line963">963: </a>        A[(j-1)*ld+j] = b[j-1];
+<a name="line964">964: </a>      }
+<a name="line965">965: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&A);
+<a name="line966">966: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line967">967: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,NULL);
+<a name="line968">968: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,NULL,NULL,NULL,NULL);
+<a name="line969">969: </a>      <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(eps->ds,PETSC_TRUE);
+<a name="line970">970: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* Restart */</font>
+<a name="line971">971: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,NULL);
+<a name="line972">972: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,NULL,NULL,NULL,NULL);
+<a name="line973">973: </a>    }
+<a name="line974">974: </a>    <font color="#B22222">/* Residual */</font>
+<a name="line975">975: </a>    EPSKrylovConvergence(eps,PETSC_TRUE,eps->nconv,nv-eps->nconv,beta,1.0,&k);
+
+<a name="line977">977: </a>    <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line978">978: </a>      <font color="#B22222">/* Check convergence */</font>
+<a name="line979">979: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line980">980: </a>      b = a + ld;
+<a name="line981">981: </a>      conv = 0;
+<a name="line982">982: </a>      j = k = eps->nconv;
+<a name="line983">983: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) <font color="#4169E1">if</font> (eps->errest[i] < eps->tol) conv++;
+<a name="line984">984: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line985">985: </a>        <font color="#4169E1">if</font> (eps->errest[i] < eps->tol) {
+<a name="line986">986: </a>          iwork[j++]=i;
+<a name="line987">987: </a>        } <font color="#4169E1">else</font> iwork[conv+k++]=i;
+<a name="line988">988: </a>      }
+<a name="line989">989: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line990">990: </a>        a[i]=PetscRealPart(eps->eigr[i]);
+<a name="line991">991: </a>        b[i]=eps->errest[i];
+<a name="line992">992: </a>      }
+<a name="line993">993: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line994">994: </a>        eps->eigr[i] = a[iwork[i]];
+<a name="line995">995: </a>        eps->errest[i] = b[iwork[i]];
+<a name="line996">996: </a>      }
+<a name="line997">997: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line998">998: </a>        a[i]=PetscRealPart(eps->eigr[i]);
+<a name="line999">999: </a>        b[i]=eps->errest[i];
+<a name="line1000">1000: </a>      }
+<a name="line1001">1001: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line1002">1002: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line1003">1003: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line1004">1004: </a>        p=iwork[i];
+<a name="line1005">1005: </a>        <font color="#4169E1">if</font> (p!=i) {
+<a name="line1006">1006: </a>          j=i+1;
+<a name="line1007">1007: </a>          <font color="#4169E1">while</font> (iwork[j]!=i) j++;
+<a name="line1008">1008: </a>          iwork[j]=p;iwork[i]=i;
+<a name="line1009">1009: </a>          <font color="#4169E1">for</font> (k=0;k<nv;k++) {
+<a name="line1010">1010: </a>            rtmp=Q[k+p*ld];Q[k+p*ld]=Q[k+i*ld];Q[k+i*ld]=rtmp;
+<a name="line1011">1011: </a>          }
+<a name="line1012">1012: </a>        }
 <a name="line1013">1013: </a>      }
-<a name="line1014">1014: </a>    }
-<a name="line1015">1015: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line1016">1016: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
-<a name="line1017">1017: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
-<a name="line1018">1018: </a>    MatDestroy(&U);
-
-<a name="line1020">1020: </a>    <font color="#B22222">/* Normalize u and append it to V */</font>
-<a name="line1021">1021: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
-<a name="line1022">1022: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
-<a name="line1023">1023: </a>    }
-<a name="line1024">1024: </a>    eps->nconv = k;
-<a name="line1025">1025: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING) {
-<a name="line1026">1026: </a>      <font color="#B22222">/* Store approximated values for next shift */</font>
-<a name="line1027">1027: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line1028">1028: </a>      sr->nS = l;
-<a name="line1029">1029: </a>      <font color="#4169E1">for</font> (i=0;i<l;i++) {
-<a name="line1030">1030: </a>        sr->S[i] = eps->eigr[i+k];<font color="#B22222">/* Diagonal elements */</font>
-<a name="line1031">1031: </a>        sr->S[i+l] = Q[nv-1+(i+k)*ld]*beta; <font color="#B22222">/* Out of diagonal elements */</font>
-<a name="line1032">1032: </a>      }
-<a name="line1033">1033: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
-<a name="line1034">1034: </a>    }
-<a name="line1035">1035: </a>  }
-<a name="line1036">1036: </a>  <font color="#B22222">/* Check for completion */</font>
-<a name="line1037">1037: </a>  <font color="#4169E1">for</font> (i=0;i< eps->nconv; i++) {
-<a name="line1038">1038: </a>    <font color="#4169E1">if</font> ((sr->dir)*PetscRealPart(eps->eigr[i])>0) sPres->nconv[1]++;
-<a name="line1039">1039: </a>    <font color="#4169E1">else</font> sPres->nconv[0]++;
-<a name="line1040">1040: </a>  }
-<a name="line1041">1041: </a>  sPres->comp[0] = (count0 >= sPres->nsch[0])?PETSC_TRUE:PETSC_FALSE;
-<a name="line1042">1042: </a>  sPres->comp[1] = (count1 >= sPres->nsch[1])?PETSC_TRUE:PETSC_FALSE;
-<a name="line1043">1043: </a>  <font color="#4169E1">if</font> (count0 > sPres->nsch[0] || count1 > sPres->nsch[1])SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Mismatch between number of values found and information from inertia, consider using <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()"</font>);
-<a name="line1044">1044: </a>  PetscFree(iwork);
-<a name="line1045">1045: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1046">1046: </a>}
-
-<a name="line1048">1048: </a><font color="#B22222">/*</font>
-<a name="line1049">1049: </a><font color="#B22222">  Obtains value of subsequent shift</font>
-<a name="line1050">1050: </a><font color="#B22222">*/</font>
-<a name="line1053">1053: </a><strong><font color="#4169E1"><a name="EPSGetNewShiftValue"></a>static PetscErrorCode EPSGetNewShiftValue(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt side,PetscReal *newS)</font></strong>
-<a name="line1054">1054: </a>{
-<a name="line1055">1055: </a>  PetscReal       lambda,d_prev;
-<a name="line1056">1056: </a>  PetscInt        i,idxP;
-<a name="line1057">1057: </a>  EPS_SR          sr;
-<a name="line1058">1058: </a>  EPS_shift       sPres,s;
-<a name="line1059">1059: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line1062">1062: </a>  sr = ctx->sr;
-<a name="line1063">1063: </a>  sPres = sr->sPres;
-<a name="line1064">1064: </a>  <font color="#4169E1">if</font> (sPres->neighb[side]) {
-<a name="line1065">1065: </a>  <font color="#B22222">/* Completing a previous interval */</font>
-<a name="line1066">1066: </a>    <font color="#4169E1">if</font> (!sPres->neighb[side]->neighb[side] && sPres->neighb[side]->nconv[side]==0) { <font color="#B22222">/* One of the ends might be too far from eigenvalues */</font>
-<a name="line1067">1067: </a>      <font color="#4169E1">if</font> (side) *newS = (sPres->value + PetscRealPart(sr->eigr[sr->perm[sr->indexEig-1]]))/2;
-<a name="line1068">1068: </a>      <font color="#4169E1">else</font> *newS = (sPres->value + PetscRealPart(sr->eigr[sr->perm[0]]))/2;
-<a name="line1069">1069: </a>    } <font color="#4169E1">else</font> *newS=(sPres->value + sPres->neighb[side]->value)/2;
-<a name="line1070">1070: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* (Only for side=1). Creating a new interval. */</font>
-<a name="line1071">1071: </a>    <font color="#4169E1">if</font> (sPres->neigs==0) {<font color="#B22222">/* No value has been accepted*/</font>
-<a name="line1072">1072: </a>      <font color="#4169E1">if</font> (sPres->neighb[0]) {
-<a name="line1073">1073: </a>        <font color="#B22222">/* Multiplying by 10 the previous distance */</font>
-<a name="line1074">1074: </a>        *newS = sPres->value + 10*(sr->dir)*PetscAbsReal(sPres->value - sPres->neighb[0]->value);
-<a name="line1075">1075: </a>        sr->nleap++;
-<a name="line1076">1076: </a>        <font color="#B22222">/* Stops when the interval is open and no values are found in the last 5 shifts (there might be infinite eigenvalues) */</font>
-<a name="line1077">1077: </a>        <font color="#4169E1">if</font> (!sr->hasEnd && sr->nleap > 5) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unable to compute the wanted eigenvalues with open interval"</font>);
-<a name="line1078">1078: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* First shift */</font>
-<a name="line1079">1079: </a>        <font color="#4169E1">if</font> (eps->nconv != 0) {
-<a name="line1080">1080: </a>          <font color="#B22222">/* Unaccepted values give information for next shift */</font>
-<a name="line1081">1081: </a>          idxP=0;<font color="#B22222">/* Number of values left from shift */</font>
-<a name="line1082">1082: </a>          <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line1083">1083: </a>            lambda = PetscRealPart(sr->eigr[i]);
-<a name="line1084">1084: </a>            <font color="#4169E1">if</font> ((sr->dir)*(lambda - sPres->value) <0) idxP++;
-<a name="line1085">1085: </a>            <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line1086">1086: </a>          }
-<a name="line1087">1087: </a>          <font color="#B22222">/* Avoiding subtraction of eigenvalues (might be the same).*/</font>
-<a name="line1088">1088: </a>          <font color="#4169E1">if</font> (idxP>0) {
-<a name="line1089">1089: </a>            d_prev = PetscAbsReal(sPres->value - PetscRealPart(sr->eigr[0]))/(idxP+0.3);
-<a name="line1090">1090: </a>          } <font color="#4169E1">else</font> {
-<a name="line1091">1091: </a>            d_prev = PetscAbsReal(sPres->value - PetscRealPart(sr->eigr[eps->nconv-1]))/(eps->nconv+0.3);
-<a name="line1092">1092: </a>          }
-<a name="line1093">1093: </a>          *newS = sPres->value + ((sr->dir)*d_prev*eps->nev)/2;
-<a name="line1094">1094: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* No values found, no information for next shift */</font>
-<a name="line1095">1095: </a>          SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"First shift renders no information"</font>);
-<a name="line1096">1096: </a>        }
-<a name="line1097">1097: </a>      }
-<a name="line1098">1098: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* Accepted values found */</font>
-<a name="line1099">1099: </a>      sr->nleap = 0;
-<a name="line1100">1100: </a>      <font color="#B22222">/* Average distance of values in previous subinterval */</font>
-<a name="line1101">1101: </a>      s = sPres->neighb[0];
-<a name="line1102">1102: </a>      <font color="#4169E1">while</font> (s && PetscAbs(s->inertia - sPres->inertia)==0) {
-<a name="line1103">1103: </a>        s = s->neighb[0];<font color="#B22222">/* Looking for previous shifts with eigenvalues within */</font>
-<a name="line1104">1104: </a>      }
-<a name="line1105">1105: </a>      <font color="#4169E1">if</font> (s) {
-<a name="line1106">1106: </a>        d_prev = PetscAbsReal((sPres->value - s->value)/(sPres->inertia - s->inertia));
-<a name="line1107">1107: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* First shift. Average distance obtained with values in this shift */</font>
-<a name="line1108">1108: </a>        <font color="#B22222">/* first shift might be too far from first wanted eigenvalue (no values found outside the interval)*/</font>
-<a name="line1109">1109: </a>        <font color="#4169E1">if</font> ((sr->dir)*(PetscRealPart(sr->eigr[0])-sPres->value)>0 && PetscAbsReal((PetscRealPart(sr->eigr[sr->indexEig-1]) - PetscRealPart(sr->eigr[0]))/PetscRealPart(sr->eigr[0])) > PetscSqrtReal(eps->tol)) {
-<a name="line1110">1110: </a>          d_prev =  PetscAbsReal((PetscRealPart(sr->eigr[sr->indexEig-1]) - PetscRealPart(sr->eigr[0])))/(sPres->neigs+0.3);
-<a name="line1111">1111: </a>        } <font color="#4169E1">else</font> {
-<a name="line1112">1112: </a>          d_prev = PetscAbsReal(PetscRealPart(sr->eigr[sr->indexEig-1]) - sPres->value)/(sPres->neigs+0.3);
-<a name="line1113">1113: </a>        }
-<a name="line1114">1114: </a>      }
-<a name="line1115">1115: </a>      <font color="#B22222">/* Average distance is used for next shift by adding it to value on the right or to shift */</font>
-<a name="line1116">1116: </a>      <font color="#4169E1">if</font> ((sr->dir)*(PetscRealPart(sr->eigr[sPres->index + sPres->neigs -1]) - sPres->value)>0) {
-<a name="line1117">1117: </a>        *newS = PetscRealPart(sr->eigr[sPres->index + sPres->neigs -1])+ ((sr->dir)*d_prev*(eps->nev))/2;
-<a name="line1118">1118: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* Last accepted value is on the left of shift. Adding to shift */</font>
-<a name="line1119">1119: </a>        *newS = sPres->value + ((sr->dir)*d_prev*(eps->nev))/2;
-<a name="line1120">1120: </a>      }
-<a name="line1121">1121: </a>    }
-<a name="line1122">1122: </a>    <font color="#B22222">/* End of interval can not be surpassed */</font>
-<a name="line1123">1123: </a>    <font color="#4169E1">if</font> ((sr->dir)*(sr->int1 - *newS) < 0) *newS = sr->int1;
-<a name="line1124">1124: </a>  }<font color="#B22222">/* of neighb[side]==null */</font>
-<a name="line1125">1125: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1126">1126: </a>}
-
-<a name="line1128">1128: </a><font color="#B22222">/*</font>
-<a name="line1129">1129: </a><font color="#B22222">  Function for sorting an array of real values</font>
-<a name="line1130">1130: </a><font color="#B22222">*/</font>
-<a name="line1133">1133: </a><strong><font color="#4169E1"><a name="sortRealEigenvalues"></a>static PetscErrorCode sortRealEigenvalues(PetscScalar *r,PetscInt *perm,PetscInt nr,PetscBool prev,PetscInt dir)</font></strong>
-<a name="line1134">1134: </a>{
-<a name="line1135">1135: </a>  PetscReal      re;
-<a name="line1136">1136: </a>  PetscInt       i,j,tmp;
-
-<a name="line1139">1139: </a>  <font color="#4169E1">if</font> (!prev) <font color="#4169E1">for</font> (i=0;i<nr;i++) perm[i] = i;
-<a name="line1140">1140: </a>  <font color="#B22222">/* Insertion sort */</font>
-<a name="line1141">1141: </a>  <font color="#4169E1">for</font> (i=1;i<nr;i++) {
-<a name="line1142">1142: </a>    re = PetscRealPart(r[perm[i]]);
-<a name="line1143">1143: </a>    j = i-1;
-<a name="line1144">1144: </a>    <font color="#4169E1">while</font> (j>=0 && dir*(re - PetscRealPart(r[perm[j]])) <= 0) {
-<a name="line1145">1145: </a>      tmp = perm[j]; perm[j] = perm[j+1]; perm[j+1] = tmp; j--;
-<a name="line1146">1146: </a>    }
-<a name="line1147">1147: </a>  }
-<a name="line1148">1148: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1149">1149: </a>}
-
-<a name="line1151">1151: </a><font color="#B22222">/* Stores the pairs obtained since the last shift in the global arrays */</font>
-<a name="line1154">1154: </a><strong><font color="#4169E1"><a name="EPSStoreEigenpairs"></a>static PetscErrorCode EPSStoreEigenpairs(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1155">1155: </a>{
-<a name="line1156">1156: </a>  PetscErrorCode  ierr;
-<a name="line1157">1157: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line1158">1158: </a>  PetscReal       lambda,err,norm;
-<a name="line1159">1159: </a>  PetscInt        i,count;
-<a name="line1160">1160: </a>  PetscBool       iscayley;
-<a name="line1161">1161: </a>  EPS_SR          sr = ctx->sr;
-<a name="line1162">1162: </a>  EPS_shift       sPres;
-<a name="line1163">1163: </a>  Vec             v,w;
-
-<a name="line1166">1166: </a>  sPres = sr->sPres;
-<a name="line1167">1167: </a>  sPres->index = sr->indexEig;
-<a name="line1168">1168: </a>  count = sr->indexEig;
-<a name="line1169">1169: </a>  <font color="#B22222">/* Back-transform */</font>
-<a name="line1170">1170: </a>  <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,eps->nconv,eps->eigr,eps->eigi);
-<a name="line1171">1171: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STCAYLEY,&iscayley);
-<a name="line1172">1172: </a>  <font color="#B22222">/* Sort eigenvalues */</font>
-<a name="line1173">1173: </a>  sortRealEigenvalues(eps->eigr,eps->perm,eps->nconv,PETSC_FALSE,sr->dir);
-<a name="line1174">1174: </a>  <font color="#B22222">/* Values stored in global array */</font>
-<a name="line1175">1175: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line1176">1176: </a>    lambda = PetscRealPart(eps->eigr[eps->perm[i]]);
-<a name="line1177">1177: </a>    err = eps->errest[eps->perm[i]];
-
-<a name="line1179">1179: </a>    <font color="#4169E1">if</font> ((sr->dir)*(lambda - sPres->ext[0]) > 0 && (sr->dir)*(sPres->ext[1] - lambda) > 0) {<font color="#B22222">/* Valid value */</font>
-<a name="line1180">1180: </a>      <font color="#4169E1">if</font> (count>=sr->numEigs) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unexpected error in Spectrum Slicing"</font>);
-<a name="line1181">1181: </a>      sr->eigr[count] = lambda;
-<a name="line1182">1182: </a>      sr->errest[count] = err;
-<a name="line1183">1183: </a>      <font color="#B22222">/* Explicit purification */</font>
-<a name="line1184">1184: </a>      <font color="#4169E1">if</font> (eps->purify) {
-<a name="line1185">1185: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->V,count,&v);
-<a name="line1186">1186: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,eps->perm[i],&w);
-<a name="line1187">1187: </a>        <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,w,v);
-<a name="line1188">1188: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->V,count,&v);
-<a name="line1189">1189: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,eps->perm[i],&w);
-<a name="line1190">1190: </a>        <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(sr->V,count,NORM_2,&norm);
-<a name="line1191">1191: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(sr->V,count,1.0/norm);
-<a name="line1192">1192: </a>      } <font color="#4169E1">else</font> {
-<a name="line1193">1193: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,eps->perm[i],&w);
-<a name="line1194">1194: </a>        <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(sr->V,count,w);
-<a name="line1195">1195: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,eps->perm[i],&w);
-<a name="line1196">1196: </a>        <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(sr->V,count,NORM_2,&norm);
-<a name="line1197">1197: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(sr->V,count,1.0/norm);
-<a name="line1198">1198: </a>      }
-<a name="line1199">1199: </a>      count++;
-<a name="line1200">1200: </a>    }
-<a name="line1201">1201: </a>  }
-<a name="line1202">1202: </a>  sPres->neigs = count - sr->indexEig;
-<a name="line1203">1203: </a>  sr->indexEig = count;
-<a name="line1204">1204: </a>  <font color="#B22222">/* Global ordering array updating */</font>
-<a name="line1205">1205: </a>  sortRealEigenvalues(sr->eigr,sr->perm,count,PETSC_TRUE,sr->dir);
-<a name="line1206">1206: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1207">1207: </a>}
-
-<a name="line1211">1211: </a><strong><font color="#4169E1"><a name="EPSLookForDeflation"></a>static PetscErrorCode EPSLookForDeflation(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1212">1212: </a>{
-<a name="line1213">1213: </a>  PetscErrorCode  ierr;
-<a name="line1214">1214: </a>  PetscReal       val;
-<a name="line1215">1215: </a>  PetscInt        i,count0=0,count1=0;
-<a name="line1216">1216: </a>  EPS_shift       sPres;
-<a name="line1217">1217: </a>  PetscInt        ini,fin,k,idx0,idx1;
-<a name="line1218">1218: </a>  EPS_SR          sr;
-<a name="line1219">1219: </a>  Vec             v;
-<a name="line1220">1220: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-
-<a name="line1223">1223: </a>  sr = ctx->sr;
-<a name="line1224">1224: </a>  sPres = sr->sPres;
-
-<a name="line1226">1226: </a>  <font color="#4169E1">if</font> (sPres->neighb[0]) ini = (sr->dir)*(sPres->neighb[0]->inertia - sr->inertia0);
-<a name="line1227">1227: </a>  <font color="#4169E1">else</font> ini = 0;
-<a name="line1228">1228: </a>  fin = sr->indexEig;
-<a name="line1229">1229: </a>  <font color="#B22222">/* Selection of ends for searching new values */</font>
-<a name="line1230">1230: </a>  <font color="#4169E1">if</font> (!sPres->neighb[0]) sPres->ext[0] = sr->int0;<font color="#B22222">/* First shift */</font>
-<a name="line1231">1231: </a>  <font color="#4169E1">else</font> sPres->ext[0] = sPres->neighb[0]->value;
-<a name="line1232">1232: </a>  <font color="#4169E1">if</font> (!sPres->neighb[1]) {
-<a name="line1233">1233: </a>    <font color="#4169E1">if</font> (sr->hasEnd) sPres->ext[1] = sr->int1;
-<a name="line1234">1234: </a>    <font color="#4169E1">else</font> sPres->ext[1] = (sr->dir > 0)?PETSC_MAX_REAL:PETSC_MIN_REAL;
-<a name="line1235">1235: </a>  } <font color="#4169E1">else</font> sPres->ext[1] = sPres->neighb[1]->value;
-<a name="line1236">1236: </a>  <font color="#B22222">/* Selection of values between right and left ends */</font>
-<a name="line1237">1237: </a>  <font color="#4169E1">for</font> (i=ini;i<fin;i++) {
-<a name="line1238">1238: </a>    val=PetscRealPart(sr->eigr[sr->perm[i]]);
-<a name="line1239">1239: </a>    <font color="#B22222">/* Values to the right of left shift */</font>
-<a name="line1240">1240: </a>    <font color="#4169E1">if</font> ((sr->dir)*(val - sPres->ext[1]) < 0) {
-<a name="line1241">1241: </a>      <font color="#4169E1">if</font> ((sr->dir)*(val - sPres->value) < 0) count0++;
-<a name="line1242">1242: </a>      <font color="#4169E1">else</font> count1++;
-<a name="line1243">1243: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line1244">1244: </a>  }
-<a name="line1245">1245: </a>  <font color="#B22222">/* The number of values on each side are found */</font>
-<a name="line1246">1246: </a>  <font color="#4169E1">if</font> (sPres->neighb[0]) {
-<a name="line1247">1247: </a>    sPres->nsch[0] = (sr->dir)*(sPres->inertia - sPres->neighb[0]->inertia)-count0;
-<a name="line1248">1248: </a>    <font color="#4169E1">if</font> (sPres->nsch[0]<0)SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Mismatch between number of values found and information from inertia, consider using <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()"</font>);
-<a name="line1249">1249: </a>  } <font color="#4169E1">else</font> sPres->nsch[0] = 0;
-
-<a name="line1251">1251: </a>  <font color="#4169E1">if</font> (sPres->neighb[1]) {
-<a name="line1252">1252: </a>    sPres->nsch[1] = (sr->dir)*(sPres->neighb[1]->inertia - sPres->inertia) - count1;
-<a name="line1253">1253: </a>    <font color="#4169E1">if</font> (sPres->nsch[1]<0)SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Mismatch between number of values found and information from inertia, consider using <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()"</font>);
-<a name="line1254">1254: </a>  } <font color="#4169E1">else</font> sPres->nsch[1] = (sr->dir)*(sr->inertia1 - sPres->inertia);
-
-<a name="line1256">1256: </a>  <font color="#B22222">/* Completing vector of indexes for deflation */</font>
-<a name="line1257">1257: </a>  idx0 = ini;
-<a name="line1258">1258: </a>  idx1 = ini+count0+count1;
-<a name="line1259">1259: </a>  k=0;
-<a name="line1260">1260: </a>  <font color="#4169E1">for</font> (i=idx0;i<idx1;i++) sr->idxDef[k++]=sr->perm[i];
-<a name="line1261">1261: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,k+eps->ncv+1,&sr->Vnext);
-<a name="line1262">1262: </a>  <a href="../../../../../docs/manualpages/BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</a>(sr->Vnext,k);
-<a name="line1263">1263: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line1264">1264: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->Vnext,-i-1,&v);
-<a name="line1265">1265: </a>    <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(sr->V,sr->idxDef[i],v);
-<a name="line1266">1266: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->Vnext,-i-1,&v);
-<a name="line1267">1267: </a>  }
-
-<a name="line1269">1269: </a>  <font color="#B22222">/* For rational Krylov */</font>
-<a name="line1270">1270: </a>  <font color="#4169E1">if</font> (sr->nS>0 && (sr->sPrev == sr->sPres->neighb[0] || sr->sPrev == sr->sPres->neighb[1])) {
-<a name="line1271">1271: </a>    EPSPrepareRational(eps);
-<a name="line1272">1272: </a>  }
-<a name="line1273">1273: </a>  eps->nconv = 0;
-<a name="line1274">1274: </a>  <font color="#B22222">/* Get rid of temporary Vnext */</font>
-<a name="line1275">1275: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&eps->V);
-<a name="line1276">1276: </a>  eps->V = sr->Vnext;
-<a name="line1277">1277: </a>  sr->Vnext = NULL;
-<a name="line1278">1278: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1279">1279: </a>}
-
-<a name="line1283">1283: </a><strong><font color="#4169E1"><a name="EPSSolve_KrylovSchur_Slice"></a>PetscErrorCode EPSSolve_KrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line1284">1284: </a>{
-<a name="line1285">1285: </a>  PetscErrorCode  ierr;
-<a name="line1286">1286: </a>  PetscInt        i,lds;
-<a name="line1287">1287: </a>  PetscReal       newS;
-<a name="line1288">1288: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
-<a name="line1289">1289: </a>  EPS_SR          sr=ctx->sr;
-
-<a name="line1292">1292: </a>  <font color="#4169E1">if</font> (ctx->global) {
-<a name="line1293">1293: </a>    EPSSolve_KrylovSchur_Slice(ctx->eps);
-<a name="line1294">1294: </a>    ctx->eps->state = EPS_STATE_SOLVED;
-<a name="line1295">1295: </a>    eps->reason = EPS_CONVERGED_TOL;
-<a name="line1296">1296: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
-<a name="line1297">1297: </a>      <font color="#B22222">/* Gather solution from subsolvers */</font>
-<a name="line1298">1298: </a>      EPSSliceGatherSolution(eps);
-<a name="line1299">1299: </a>    } <font color="#4169E1">else</font> {
-<a name="line1300">1300: </a>      eps->nconv = sr->numEigs;
-<a name="line1301">1301: </a>      eps->its   = ctx->eps->its;
-<a name="line1302">1302: </a>      PetscFree(ctx->inertias);
-<a name="line1303">1303: </a>      PetscFree(ctx->shifts);
-<a name="line1304">1304: </a>      EPSSliceGetInertias(ctx->eps,&ctx->nshifts,&ctx->shifts,&ctx->inertias);
-<a name="line1305">1305: </a>    }
-<a name="line1306">1306: </a>  } <font color="#4169E1">else</font> {
-<a name="line1307">1307: </a>    <font color="#4169E1">if</font> (ctx->npart==1) {
-<a name="line1308">1308: </a>      sr->eigr   = ctx->eps->eigr;
-<a name="line1309">1309: </a>      sr->eigi   = ctx->eps->eigi;
-<a name="line1310">1310: </a>      sr->perm   = ctx->eps->perm;
-<a name="line1311">1311: </a>      sr->errest = ctx->eps->errest;
-<a name="line1312">1312: </a>      sr->V      = ctx->eps->V;
-<a name="line1313">1313: </a>    }
-<a name="line1314">1314: </a>    <font color="#B22222">/* Only with eigenvalues present in the interval ...*/</font>
-<a name="line1315">1315: </a>    <font color="#4169E1">if</font> (sr->numEigs==0) {
-<a name="line1316">1316: </a>      eps->reason = EPS_CONVERGED_TOL;
-<a name="line1317">1317: </a>      <font color="#4169E1">return</font>(0);
-<a name="line1318">1318: </a>    }
-<a name="line1319">1319: </a>    <font color="#B22222">/* Array of pending shifts */</font>
-<a name="line1320">1320: </a>    sr->maxPend = 100; <font color="#B22222">/* Initial size */</font>
-<a name="line1321">1321: </a>    sr->nPend = 0;
-<a name="line1322">1322: </a>    PetscMalloc1(sr->maxPend,&sr->pending);
-<a name="line1323">1323: </a>    PetscLogObjectMemory((PetscObject)eps,(sr->maxPend)*<font color="#4169E1">sizeof</font>(EPS_shift));
-<a name="line1324">1324: </a>    EPSCreateShift(eps,sr->int0,NULL,NULL);
-<a name="line1325">1325: </a>    <font color="#B22222">/* extract first shift */</font>
-<a name="line1326">1326: </a>    sr->sPrev = NULL;
-<a name="line1327">1327: </a>    sr->sPres = sr->pending[--sr->nPend];
-<a name="line1328">1328: </a>    sr->sPres->inertia = sr->inertia0;
-<a name="line1329">1329: </a>    eps->target = sr->sPres->value;
-<a name="line1330">1330: </a>    sr->s0 = sr->sPres;
-<a name="line1331">1331: </a>    sr->indexEig = 0;
-<a name="line1332">1332: </a>    <font color="#B22222">/* Memory reservation for auxiliary variables */</font>
-<a name="line1333">1333: </a>    lds = PetscMin(eps->mpd,eps->ncv);
-<a name="line1334">1334: </a>    PetscCalloc1(lds*lds,&sr->S);
-<a name="line1335">1335: </a>    PetscMalloc1(eps->ncv,&sr->back);
-<a name="line1336">1336: </a>    PetscLogObjectMemory((PetscObject)eps,(sr->numEigs+2*eps->ncv)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line1337">1337: </a>    <font color="#4169E1">for</font> (i=0;i<sr->numEigs;i++) {
-<a name="line1338">1338: </a>      sr->eigr[i]   = 0.0;
-<a name="line1339">1339: </a>      sr->eigi[i]   = 0.0;
-<a name="line1340">1340: </a>      sr->errest[i] = 0.0;
-<a name="line1341">1341: </a>      sr->perm[i]   = i;
-<a name="line1342">1342: </a>    }
-<a name="line1343">1343: </a>    <font color="#B22222">/* Vectors for deflation */</font>
-<a name="line1344">1344: </a>    PetscMalloc1(sr->numEigs,&sr->idxDef);
-<a name="line1345">1345: </a>    PetscLogObjectMemory((PetscObject)eps,sr->numEigs*<font color="#4169E1">sizeof</font>(PetscInt));
-<a name="line1346">1346: </a>    sr->indexEig = 0;
-<a name="line1347">1347: </a>    <font color="#B22222">/* Main loop */</font>
-<a name="line1348">1348: </a>    <font color="#4169E1">while</font> (sr->sPres) {
-<a name="line1349">1349: </a>      <font color="#B22222">/* Search for deflation */</font>
-<a name="line1350">1350: </a>      EPSLookForDeflation(eps);
-<a name="line1351">1351: </a>      <font color="#B22222">/* KrylovSchur */</font>
-<a name="line1352">1352: </a>      EPSKrylovSchur_Slice(eps);
-
-<a name="line1354">1354: </a>      EPSStoreEigenpairs(eps);
-<a name="line1355">1355: </a>      <font color="#B22222">/* Select new shift */</font>
-<a name="line1356">1356: </a>      <font color="#4169E1">if</font> (!sr->sPres->comp[1]) {
-<a name="line1357">1357: </a>        EPSGetNewShiftValue(eps,1,&newS);
-<a name="line1358">1358: </a>        EPSCreateShift(eps,newS,sr->sPres,sr->sPres->neighb[1]);
-<a name="line1359">1359: </a>      }
-<a name="line1360">1360: </a>      <font color="#4169E1">if</font> (!sr->sPres->comp[0]) {
-<a name="line1361">1361: </a>        <font color="#B22222">/* Completing earlier interval */</font>
-<a name="line1362">1362: </a>        EPSGetNewShiftValue(eps,0,&newS);
-<a name="line1363">1363: </a>        EPSCreateShift(eps,newS,sr->sPres->neighb[0],sr->sPres);
-<a name="line1364">1364: </a>      }
-<a name="line1365">1365: </a>      <font color="#B22222">/* Preparing for a new search of values */</font>
-<a name="line1366">1366: </a>      EPSExtractShift(eps);
-<a name="line1367">1367: </a>    }
-
-<a name="line1369">1369: </a>    <font color="#B22222">/* Updating eps values prior to exit */</font>
-<a name="line1370">1370: </a>    PetscFree(sr->S);
-<a name="line1371">1371: </a>    PetscFree(sr->idxDef);
-<a name="line1372">1372: </a>    PetscFree(sr->pending);
-<a name="line1373">1373: </a>    PetscFree(sr->back);
-<a name="line1374">1374: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,eps->ncv+1,&sr->Vnext);
-<a name="line1375">1375: </a>    <a href="../../../../../docs/manualpages/BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</a>(sr->Vnext,0);
-<a name="line1376">1376: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&eps->V);
-<a name="line1377">1377: </a>    eps->V      = sr->Vnext;
-<a name="line1378">1378: </a>    eps->nconv  = sr->indexEig;
-<a name="line1379">1379: </a>    eps->reason = EPS_CONVERGED_TOL;
-<a name="line1380">1380: </a>    eps->its    = sr->itsKs;
-<a name="line1381">1381: </a>    eps->nds    = 0;
-<a name="line1382">1382: </a>  }
-<a name="line1383">1383: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1384">1384: </a>}
+<a name="line1014">1014: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line1015">1015: </a>      k=eps->nconv+conv;
+<a name="line1016">1016: </a>    }
+
+<a name="line1018">1018: </a>    <font color="#B22222">/* Checking values obtained for completing */</font>
+<a name="line1019">1019: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1020">1020: </a>      sr->back[i]=eps->eigr[i];
+<a name="line1021">1021: </a>    }
+<a name="line1022">1022: </a>    <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,k,sr->back,eps->eigi);
+<a name="line1023">1023: </a>    count0=count1=0;
+<a name="line1024">1024: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1025">1025: </a>      lambda = PetscRealPart(sr->back[i]);
+<a name="line1026">1026: </a>      <font color="#4169E1">if</font> (((sr->dir)*(sPres->value - lambda) > 0) && ((sr->dir)*(lambda - sPres->ext[0]) > 0)) count0++;
+<a name="line1027">1027: </a>      <font color="#4169E1">if</font> (((sr->dir)*(lambda - sPres->value) > 0) && ((sr->dir)*(sPres->ext[1] - lambda) > 0)) count1++;
+<a name="line1028">1028: </a>    }
+<a name="line1029">1029: </a>    <font color="#4169E1">if</font> (k>eps->nev && eps->ncv-k<5) eps->reason = EPS_CONVERGED_TOL;
+<a name="line1030">1030: </a>    <font color="#4169E1">else</font> {
+<a name="line1031">1031: </a>      <font color="#B22222">/* Checks completion */</font>
+<a name="line1032">1032: </a>      <font color="#4169E1">if</font> ((!sch0||count0 >= sPres->nsch[0]) && (!sch1 ||count1 >= sPres->nsch[1])) {
+<a name="line1033">1033: </a>        eps->reason = EPS_CONVERGED_TOL;
+<a name="line1034">1034: </a>      } <font color="#4169E1">else</font> {
+<a name="line1035">1035: </a>        <font color="#4169E1">if</font> (!complIterating && eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
+<a name="line1036">1036: </a>        <font color="#4169E1">if</font> (complIterating) {
+<a name="line1037">1037: </a>          <font color="#4169E1">if</font> (--iterCompl <= 0) eps->reason = EPS_DIVERGED_ITS;
+<a name="line1038">1038: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (k >= eps->nev) {
+<a name="line1039">1039: </a>          n0 = sPres->nsch[0]-count0;
+<a name="line1040">1040: </a>          n1 = sPres->nsch[1]-count1;
+<a name="line1041">1041: </a>          <font color="#4169E1">if</font> (sr->iterCompl>0 && ((n0>0 && n0<= sr->nMAXCompl)||(n1>0&&n1<=sr->nMAXCompl))) {
+<a name="line1042">1042: </a>            <font color="#B22222">/* Iterating for completion*/</font>
+<a name="line1043">1043: </a>            complIterating = PETSC_TRUE;
+<a name="line1044">1044: </a>            <font color="#4169E1">if</font> (n0 >sr->nMAXCompl)sch0 = PETSC_FALSE;
+<a name="line1045">1045: </a>            <font color="#4169E1">if</font> (n1 >sr->nMAXCompl)sch1 = PETSC_FALSE;
+<a name="line1046">1046: </a>            iterCompl = sr->iterCompl;
+<a name="line1047">1047: </a>          } <font color="#4169E1">else</font> eps->reason = EPS_CONVERGED_TOL;
+<a name="line1048">1048: </a>        }
+<a name="line1049">1049: </a>      }
+<a name="line1050">1050: </a>    }
+<a name="line1051">1051: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line1052">1052: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line1053">1053: </a>    <font color="#4169E1">else</font> l = 0;
+<a name="line1054">1054: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+<a name="line1055">1055: </a>    <font color="#4169E1">if</font> (breakdown) l=0;
+
+<a name="line1057">1057: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line1058">1058: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line1059">1059: </a>        <font color="#B22222">/* Start a new Lanczos factorization */</font>
+<a name="line1060">1060: </a>        PetscInfo2(eps,<font color="#666666">"Breakdown in Krylov-Schur method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
+<a name="line1061">1061: </a>        EPSGetStartVector(eps,k,&breakdown);
+<a name="line1062">1062: </a>        <font color="#4169E1">if</font> (breakdown) {
+<a name="line1063">1063: </a>          eps->reason = EPS_DIVERGED_BREAKDOWN;
+<a name="line1064">1064: </a>          PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
+<a name="line1065">1065: </a>        }
+<a name="line1066">1066: </a>      } <font color="#4169E1">else</font> {
+<a name="line1067">1067: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line1068">1068: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line1069">1069: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line1070">1070: </a>        b = a + ld;
+<a name="line1071">1071: </a>        <font color="#4169E1">for</font> (i=k;i<k+l;i++) {
+<a name="line1072">1072: </a>          a[i] = PetscRealPart(eps->eigr[i]);
+<a name="line1073">1073: </a>          b[i] = PetscRealPart(Q[nv-1+i*ld]*beta);
+<a name="line1074">1074: </a>        }
+<a name="line1075">1075: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(eps->ds,DS_MAT_T,&a);
+<a name="line1076">1076: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line1077">1077: </a>      }
+<a name="line1078">1078: </a>    }
+<a name="line1079">1079: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line1080">1080: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
+<a name="line1081">1081: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
+<a name="line1082">1082: </a>    MatDestroy(&U);
+
+<a name="line1084">1084: </a>    <font color="#B22222">/* Normalize u and append it to V */</font>
+<a name="line1085">1085: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
+<a name="line1086">1086: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
+<a name="line1087">1087: </a>    }
+<a name="line1088">1088: </a>    eps->nconv = k;
+<a name="line1089">1089: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING) {
+<a name="line1090">1090: </a>      <font color="#B22222">/* Store approximated values for next shift */</font>
+<a name="line1091">1091: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line1092">1092: </a>      sr->nS = l;
+<a name="line1093">1093: </a>      <font color="#4169E1">for</font> (i=0;i<l;i++) {
+<a name="line1094">1094: </a>        sr->S[i] = eps->eigr[i+k];<font color="#B22222">/* Diagonal elements */</font>
+<a name="line1095">1095: </a>        sr->S[i+l] = Q[nv-1+(i+k)*ld]*beta; <font color="#B22222">/* Out of diagonal elements */</font>
+<a name="line1096">1096: </a>      }
+<a name="line1097">1097: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_Q,&Q);
+<a name="line1098">1098: </a>    }
+<a name="line1099">1099: </a>  }
+<a name="line1100">1100: </a>  <font color="#B22222">/* Check for completion */</font>
+<a name="line1101">1101: </a>  <font color="#4169E1">for</font> (i=0;i< eps->nconv; i++) {
+<a name="line1102">1102: </a>    <font color="#4169E1">if</font> ((sr->dir)*PetscRealPart(eps->eigr[i])>0) sPres->nconv[1]++;
+<a name="line1103">1103: </a>    <font color="#4169E1">else</font> sPres->nconv[0]++;
+<a name="line1104">1104: </a>  }
+<a name="line1105">1105: </a>  sPres->comp[0] = PetscNot(count0 < sPres->nsch[0]);
+<a name="line1106">1106: </a>  sPres->comp[1] = PetscNot(count1 < sPres->nsch[1]);
+<a name="line1107">1107: </a>  <font color="#4169E1">if</font> (count0 > sPres->nsch[0] || count1 > sPres->nsch[1])SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Mismatch between number of values found and information from inertia, consider using <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()"</font>);
+<a name="line1108">1108: </a>  PetscFree(iwork);
+<a name="line1109">1109: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1110">1110: </a>}
+
+<a name="line1112">1112: </a><font color="#B22222">/*</font>
+<a name="line1113">1113: </a><font color="#B22222">  Obtains value of subsequent shift</font>
+<a name="line1114">1114: </a><font color="#B22222">*/</font>
+<a name="line1117">1117: </a><strong><font color="#4169E1"><a name="EPSGetNewShiftValue"></a>static PetscErrorCode EPSGetNewShiftValue(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt side,PetscReal *newS)</font></strong>
+<a name="line1118">1118: </a>{
+<a name="line1119">1119: </a>  PetscReal       lambda,d_prev;
+<a name="line1120">1120: </a>  PetscInt        i,idxP;
+<a name="line1121">1121: </a>  EPS_SR          sr;
+<a name="line1122">1122: </a>  EPS_shift       sPres,s;
+<a name="line1123">1123: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line1126">1126: </a>  sr = ctx->sr;
+<a name="line1127">1127: </a>  sPres = sr->sPres;
+<a name="line1128">1128: </a>  <font color="#4169E1">if</font> (sPres->neighb[side]) {
+<a name="line1129">1129: </a>  <font color="#B22222">/* Completing a previous interval */</font>
+<a name="line1130">1130: </a>    <font color="#4169E1">if</font> (!sPres->neighb[side]->neighb[side] && sPres->neighb[side]->nconv[side]==0) { <font color="#B22222">/* One of the ends might be too far from eigenvalues */</font>
+<a name="line1131">1131: </a>      <font color="#4169E1">if</font> (side) *newS = (sPres->value + PetscRealPart(sr->eigr[sr->perm[sr->indexEig-1]]))/2;
+<a name="line1132">1132: </a>      <font color="#4169E1">else</font> *newS = (sPres->value + PetscRealPart(sr->eigr[sr->perm[0]]))/2;
+<a name="line1133">1133: </a>    } <font color="#4169E1">else</font> *newS=(sPres->value + sPres->neighb[side]->value)/2;
+<a name="line1134">1134: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* (Only for side=1). Creating a new interval. */</font>
+<a name="line1135">1135: </a>    <font color="#4169E1">if</font> (sPres->neigs==0) {<font color="#B22222">/* No value has been accepted*/</font>
+<a name="line1136">1136: </a>      <font color="#4169E1">if</font> (sPres->neighb[0]) {
+<a name="line1137">1137: </a>        <font color="#B22222">/* Multiplying by 10 the previous distance */</font>
+<a name="line1138">1138: </a>        *newS = sPres->value + 10*(sr->dir)*PetscAbsReal(sPres->value - sPres->neighb[0]->value);
+<a name="line1139">1139: </a>        sr->nleap++;
+<a name="line1140">1140: </a>        <font color="#B22222">/* Stops when the interval is open and no values are found in the last 5 shifts (there might be infinite eigenvalues) */</font>
+<a name="line1141">1141: </a>        <font color="#4169E1">if</font> (!sr->hasEnd && sr->nleap > 5) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unable to compute the wanted eigenvalues with open interval"</font>);
+<a name="line1142">1142: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* First shift */</font>
+<a name="line1143">1143: </a>        <font color="#4169E1">if</font> (eps->nconv != 0) {
+<a name="line1144">1144: </a>          <font color="#B22222">/* Unaccepted values give information for next shift */</font>
+<a name="line1145">1145: </a>          idxP=0;<font color="#B22222">/* Number of values left from shift */</font>
+<a name="line1146">1146: </a>          <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line1147">1147: </a>            lambda = PetscRealPart(sr->eigr[i]);
+<a name="line1148">1148: </a>            <font color="#4169E1">if</font> ((sr->dir)*(lambda - sPres->value) <0) idxP++;
+<a name="line1149">1149: </a>            <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line1150">1150: </a>          }
+<a name="line1151">1151: </a>          <font color="#B22222">/* Avoiding subtraction of eigenvalues (might be the same).*/</font>
+<a name="line1152">1152: </a>          <font color="#4169E1">if</font> (idxP>0) {
+<a name="line1153">1153: </a>            d_prev = PetscAbsReal(sPres->value - PetscRealPart(sr->eigr[0]))/(idxP+0.3);
+<a name="line1154">1154: </a>          } <font color="#4169E1">else</font> {
+<a name="line1155">1155: </a>            d_prev = PetscAbsReal(sPres->value - PetscRealPart(sr->eigr[eps->nconv-1]))/(eps->nconv+0.3);
+<a name="line1156">1156: </a>          }
+<a name="line1157">1157: </a>          *newS = sPres->value + ((sr->dir)*d_prev*eps->nev)/2;
+<a name="line1158">1158: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* No values found, no information for next shift */</font>
+<a name="line1159">1159: </a>          SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"First shift renders no information"</font>);
+<a name="line1160">1160: </a>        }
+<a name="line1161">1161: </a>      }
+<a name="line1162">1162: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* Accepted values found */</font>
+<a name="line1163">1163: </a>      sr->nleap = 0;
+<a name="line1164">1164: </a>      <font color="#B22222">/* Average distance of values in previous subinterval */</font>
+<a name="line1165">1165: </a>      s = sPres->neighb[0];
+<a name="line1166">1166: </a>      <font color="#4169E1">while</font> (s && PetscAbs(s->inertia - sPres->inertia)==0) {
+<a name="line1167">1167: </a>        s = s->neighb[0];<font color="#B22222">/* Looking for previous shifts with eigenvalues within */</font>
+<a name="line1168">1168: </a>      }
+<a name="line1169">1169: </a>      <font color="#4169E1">if</font> (s) {
+<a name="line1170">1170: </a>        d_prev = PetscAbsReal((sPres->value - s->value)/(sPres->inertia - s->inertia));
+<a name="line1171">1171: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* First shift. Average distance obtained with values in this shift */</font>
+<a name="line1172">1172: </a>        <font color="#B22222">/* first shift might be too far from first wanted eigenvalue (no values found outside the interval)*/</font>
+<a name="line1173">1173: </a>        <font color="#4169E1">if</font> ((sr->dir)*(PetscRealPart(sr->eigr[0])-sPres->value)>0 && PetscAbsReal((PetscRealPart(sr->eigr[sr->indexEig-1]) - PetscRealPart(sr->eigr[0]))/PetscRealPart(sr->eigr[0])) > PetscSqrtReal(eps->tol)) {
+<a name="line1174">1174: </a>          d_prev =  PetscAbsReal((PetscRealPart(sr->eigr[sr->indexEig-1]) - PetscRealPart(sr->eigr[0])))/(sPres->neigs+0.3);
+<a name="line1175">1175: </a>        } <font color="#4169E1">else</font> {
+<a name="line1176">1176: </a>          d_prev = PetscAbsReal(PetscRealPart(sr->eigr[sr->indexEig-1]) - sPres->value)/(sPres->neigs+0.3);
+<a name="line1177">1177: </a>        }
+<a name="line1178">1178: </a>      }
+<a name="line1179">1179: </a>      <font color="#B22222">/* Average distance is used for next shift by adding it to value on the right or to shift */</font>
+<a name="line1180">1180: </a>      <font color="#4169E1">if</font> ((sr->dir)*(PetscRealPart(sr->eigr[sPres->index + sPres->neigs -1]) - sPres->value)>0) {
+<a name="line1181">1181: </a>        *newS = PetscRealPart(sr->eigr[sPres->index + sPres->neigs -1])+ ((sr->dir)*d_prev*(eps->nev))/2;
+<a name="line1182">1182: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* Last accepted value is on the left of shift. Adding to shift */</font>
+<a name="line1183">1183: </a>        *newS = sPres->value + ((sr->dir)*d_prev*(eps->nev))/2;
+<a name="line1184">1184: </a>      }
+<a name="line1185">1185: </a>    }
+<a name="line1186">1186: </a>    <font color="#B22222">/* End of interval can not be surpassed */</font>
+<a name="line1187">1187: </a>    <font color="#4169E1">if</font> ((sr->dir)*(sr->int1 - *newS) < 0) *newS = sr->int1;
+<a name="line1188">1188: </a>  }<font color="#B22222">/* of neighb[side]==null */</font>
+<a name="line1189">1189: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1190">1190: </a>}
+
+<a name="line1192">1192: </a><font color="#B22222">/*</font>
+<a name="line1193">1193: </a><font color="#B22222">  Function for sorting an array of real values</font>
+<a name="line1194">1194: </a><font color="#B22222">*/</font>
+<a name="line1197">1197: </a><strong><font color="#4169E1"><a name="sortRealEigenvalues"></a>static PetscErrorCode sortRealEigenvalues(PetscScalar *r,PetscInt *perm,PetscInt nr,PetscBool prev,PetscInt dir)</font></strong>
+<a name="line1198">1198: </a>{
+<a name="line1199">1199: </a>  PetscReal      re;
+<a name="line1200">1200: </a>  PetscInt       i,j,tmp;
+
+<a name="line1203">1203: </a>  <font color="#4169E1">if</font> (!prev) <font color="#4169E1">for</font> (i=0;i<nr;i++) perm[i] = i;
+<a name="line1204">1204: </a>  <font color="#B22222">/* Insertion sort */</font>
+<a name="line1205">1205: </a>  <font color="#4169E1">for</font> (i=1;i<nr;i++) {
+<a name="line1206">1206: </a>    re = PetscRealPart(r[perm[i]]);
+<a name="line1207">1207: </a>    j = i-1;
+<a name="line1208">1208: </a>    <font color="#4169E1">while</font> (j>=0 && dir*(re - PetscRealPart(r[perm[j]])) <= 0) {
+<a name="line1209">1209: </a>      tmp = perm[j]; perm[j] = perm[j+1]; perm[j+1] = tmp; j--;
+<a name="line1210">1210: </a>    }
+<a name="line1211">1211: </a>  }
+<a name="line1212">1212: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1213">1213: </a>}
+
+<a name="line1215">1215: </a><font color="#B22222">/* Stores the pairs obtained since the last shift in the global arrays */</font>
+<a name="line1218">1218: </a><strong><font color="#4169E1"><a name="EPSStoreEigenpairs"></a>static PetscErrorCode EPSStoreEigenpairs(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1219">1219: </a>{
+<a name="line1220">1220: </a>  PetscErrorCode  ierr;
+<a name="line1221">1221: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line1222">1222: </a>  PetscReal       lambda,err,norm;
+<a name="line1223">1223: </a>  PetscInt        i,count;
+<a name="line1224">1224: </a>  PetscBool       iscayley;
+<a name="line1225">1225: </a>  EPS_SR          sr = ctx->sr;
+<a name="line1226">1226: </a>  EPS_shift       sPres;
+<a name="line1227">1227: </a>  Vec             v,w;
+
+<a name="line1230">1230: </a>  sPres = sr->sPres;
+<a name="line1231">1231: </a>  sPres->index = sr->indexEig;
+<a name="line1232">1232: </a>  count = sr->indexEig;
+<a name="line1233">1233: </a>  <font color="#B22222">/* Back-transform */</font>
+<a name="line1234">1234: </a>  <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,eps->nconv,eps->eigr,eps->eigi);
+<a name="line1235">1235: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STCAYLEY,&iscayley);
+<a name="line1236">1236: </a>  <font color="#B22222">/* Sort eigenvalues */</font>
+<a name="line1237">1237: </a>  sortRealEigenvalues(eps->eigr,eps->perm,eps->nconv,PETSC_FALSE,sr->dir);
+<a name="line1238">1238: </a>  <font color="#B22222">/* Values stored in global array */</font>
+<a name="line1239">1239: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line1240">1240: </a>    lambda = PetscRealPart(eps->eigr[eps->perm[i]]);
+<a name="line1241">1241: </a>    err = eps->errest[eps->perm[i]];
+
+<a name="line1243">1243: </a>    <font color="#4169E1">if</font> ((sr->dir)*(lambda - sPres->ext[0]) > 0 && (sr->dir)*(sPres->ext[1] - lambda) > 0) {<font color="#B22222">/* Valid value */</font>
+<a name="line1244">1244: </a>      <font color="#4169E1">if</font> (count>=sr->numEigs) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unexpected error in Spectrum Slicing"</font>);
+<a name="line1245">1245: </a>      sr->eigr[count] = lambda;
+<a name="line1246">1246: </a>      sr->errest[count] = err;
+<a name="line1247">1247: </a>      <font color="#B22222">/* Explicit purification */</font>
+<a name="line1248">1248: </a>      <font color="#4169E1">if</font> (eps->purify) {
+<a name="line1249">1249: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->V,count,&v);
+<a name="line1250">1250: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,eps->perm[i],&w);
+<a name="line1251">1251: </a>        <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,w,v);
+<a name="line1252">1252: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->V,count,&v);
+<a name="line1253">1253: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,eps->perm[i],&w);
+<a name="line1254">1254: </a>        <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(sr->V,count,NORM_2,&norm);
+<a name="line1255">1255: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(sr->V,count,1.0/norm);
+<a name="line1256">1256: </a>      } <font color="#4169E1">else</font> {
+<a name="line1257">1257: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,eps->perm[i],&w);
+<a name="line1258">1258: </a>        <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(sr->V,count,w);
+<a name="line1259">1259: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,eps->perm[i],&w);
+<a name="line1260">1260: </a>        <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(sr->V,count,NORM_2,&norm);
+<a name="line1261">1261: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(sr->V,count,1.0/norm);
+<a name="line1262">1262: </a>      }
+<a name="line1263">1263: </a>      count++;
+<a name="line1264">1264: </a>    }
+<a name="line1265">1265: </a>  }
+<a name="line1266">1266: </a>  sPres->neigs = count - sr->indexEig;
+<a name="line1267">1267: </a>  sr->indexEig = count;
+<a name="line1268">1268: </a>  <font color="#B22222">/* Global ordering array updating */</font>
+<a name="line1269">1269: </a>  sortRealEigenvalues(sr->eigr,sr->perm,count,PETSC_TRUE,sr->dir);
+<a name="line1270">1270: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1271">1271: </a>}
+
+<a name="line1275">1275: </a><strong><font color="#4169E1"><a name="EPSLookForDeflation"></a>static PetscErrorCode EPSLookForDeflation(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1276">1276: </a>{
+<a name="line1277">1277: </a>  PetscErrorCode  ierr;
+<a name="line1278">1278: </a>  PetscReal       val;
+<a name="line1279">1279: </a>  PetscInt        i,count0=0,count1=0;
+<a name="line1280">1280: </a>  EPS_shift       sPres;
+<a name="line1281">1281: </a>  PetscInt        ini,fin,k,idx0,idx1;
+<a name="line1282">1282: </a>  EPS_SR          sr;
+<a name="line1283">1283: </a>  Vec             v;
+<a name="line1284">1284: </a>  EPS_KRYLOVSCHUR *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+
+<a name="line1287">1287: </a>  sr = ctx->sr;
+<a name="line1288">1288: </a>  sPres = sr->sPres;
+
+<a name="line1290">1290: </a>  <font color="#4169E1">if</font> (sPres->neighb[0]) ini = (sr->dir)*(sPres->neighb[0]->inertia - sr->inertia0);
+<a name="line1291">1291: </a>  <font color="#4169E1">else</font> ini = 0;
+<a name="line1292">1292: </a>  fin = sr->indexEig;
+<a name="line1293">1293: </a>  <font color="#B22222">/* Selection of ends for searching new values */</font>
+<a name="line1294">1294: </a>  <font color="#4169E1">if</font> (!sPres->neighb[0]) sPres->ext[0] = sr->int0;<font color="#B22222">/* First shift */</font>
+<a name="line1295">1295: </a>  <font color="#4169E1">else</font> sPres->ext[0] = sPres->neighb[0]->value;
+<a name="line1296">1296: </a>  <font color="#4169E1">if</font> (!sPres->neighb[1]) {
+<a name="line1297">1297: </a>    <font color="#4169E1">if</font> (sr->hasEnd) sPres->ext[1] = sr->int1;
+<a name="line1298">1298: </a>    <font color="#4169E1">else</font> sPres->ext[1] = (sr->dir > 0)?PETSC_MAX_REAL:PETSC_MIN_REAL;
+<a name="line1299">1299: </a>  } <font color="#4169E1">else</font> sPres->ext[1] = sPres->neighb[1]->value;
+<a name="line1300">1300: </a>  <font color="#B22222">/* Selection of values between right and left ends */</font>
+<a name="line1301">1301: </a>  <font color="#4169E1">for</font> (i=ini;i<fin;i++) {
+<a name="line1302">1302: </a>    val=PetscRealPart(sr->eigr[sr->perm[i]]);
+<a name="line1303">1303: </a>    <font color="#B22222">/* Values to the right of left shift */</font>
+<a name="line1304">1304: </a>    <font color="#4169E1">if</font> ((sr->dir)*(val - sPres->ext[1]) < 0) {
+<a name="line1305">1305: </a>      <font color="#4169E1">if</font> ((sr->dir)*(val - sPres->value) < 0) count0++;
+<a name="line1306">1306: </a>      <font color="#4169E1">else</font> count1++;
+<a name="line1307">1307: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line1308">1308: </a>  }
+<a name="line1309">1309: </a>  <font color="#B22222">/* The number of values on each side are found */</font>
+<a name="line1310">1310: </a>  <font color="#4169E1">if</font> (sPres->neighb[0]) {
+<a name="line1311">1311: </a>    sPres->nsch[0] = (sr->dir)*(sPres->inertia - sPres->neighb[0]->inertia)-count0;
+<a name="line1312">1312: </a>    <font color="#4169E1">if</font> (sPres->nsch[0]<0)SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Mismatch between number of values found and information from inertia, consider using <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()"</font>);
+<a name="line1313">1313: </a>  } <font color="#4169E1">else</font> sPres->nsch[0] = 0;
+
+<a name="line1315">1315: </a>  <font color="#4169E1">if</font> (sPres->neighb[1]) {
+<a name="line1316">1316: </a>    sPres->nsch[1] = (sr->dir)*(sPres->neighb[1]->inertia - sPres->inertia) - count1;
+<a name="line1317">1317: </a>    <font color="#4169E1">if</font> (sPres->nsch[1]<0)SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Mismatch between number of values found and information from inertia, consider using <a href="../../../../../docs/manualpages/EPS/EPSKrylovSchurSetDetectZeros.html#EPSKrylovSchurSetDetectZeros">EPSKrylovSchurSetDetectZeros</a>()"</font>);
+<a name="line1318">1318: </a>  } <font color="#4169E1">else</font> sPres->nsch[1] = (sr->dir)*(sr->inertia1 - sPres->inertia);
+
+<a name="line1320">1320: </a>  <font color="#B22222">/* Completing vector of indexes for deflation */</font>
+<a name="line1321">1321: </a>  idx0 = ini;
+<a name="line1322">1322: </a>  idx1 = ini+count0+count1;
+<a name="line1323">1323: </a>  k=0;
+<a name="line1324">1324: </a>  <font color="#4169E1">for</font> (i=idx0;i<idx1;i++) sr->idxDef[k++]=sr->perm[i];
+<a name="line1325">1325: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,k+eps->ncv+1,&sr->Vnext);
+<a name="line1326">1326: </a>  <a href="../../../../../docs/manualpages/BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</a>(sr->Vnext,k);
+<a name="line1327">1327: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1328">1328: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(sr->Vnext,-i-1,&v);
+<a name="line1329">1329: </a>    <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(sr->V,sr->idxDef[i],v);
+<a name="line1330">1330: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(sr->Vnext,-i-1,&v);
+<a name="line1331">1331: </a>  }
+
+<a name="line1333">1333: </a>  <font color="#B22222">/* For rational Krylov */</font>
+<a name="line1334">1334: </a>  <font color="#4169E1">if</font> (sr->nS>0 && (sr->sPrev == sr->sPres->neighb[0] || sr->sPrev == sr->sPres->neighb[1])) {
+<a name="line1335">1335: </a>    EPSPrepareRational(eps);
+<a name="line1336">1336: </a>  }
+<a name="line1337">1337: </a>  eps->nconv = 0;
+<a name="line1338">1338: </a>  <font color="#B22222">/* Get rid of temporary Vnext */</font>
+<a name="line1339">1339: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&eps->V);
+<a name="line1340">1340: </a>  eps->V = sr->Vnext;
+<a name="line1341">1341: </a>  sr->Vnext = NULL;
+<a name="line1342">1342: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1343">1343: </a>}
+
+<a name="line1347">1347: </a><strong><font color="#4169E1"><a name="EPSSolve_KrylovSchur_Slice"></a>PetscErrorCode EPSSolve_KrylovSchur_Slice(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line1348">1348: </a>{
+<a name="line1349">1349: </a>  PetscErrorCode   ierr;
+<a name="line1350">1350: </a>  PetscInt         i,lds;
+<a name="line1351">1351: </a>  PetscReal        newS;
+<a name="line1352">1352: </a>  EPS_KRYLOVSCHUR  *ctx=(EPS_KRYLOVSCHUR*)eps->data;
+<a name="line1353">1353: </a>  EPS_SR           sr=ctx->sr;
+<a name="line1354">1354: </a>  Mat              A,B=NULL;
+<a name="line1355">1355: </a>  PetscObjectState Astate,Bstate=0;
+<a name="line1356">1356: </a>  PetscObjectId    Aid,Bid=0;
+
+<a name="line1359">1359: </a>  PetscCitationsRegister(citation,&cited);
+<a name="line1360">1360: </a>  <font color="#4169E1">if</font> (ctx->global) {
+<a name="line1361">1361: </a>    EPSSolve_KrylovSchur_Slice(ctx->eps);
+<a name="line1362">1362: </a>    ctx->eps->state = EPS_STATE_SOLVED;
+<a name="line1363">1363: </a>    eps->reason = EPS_CONVERGED_TOL;
+<a name="line1364">1364: </a>    <font color="#4169E1">if</font> (ctx->npart>1) {
+<a name="line1365">1365: </a>      <font color="#B22222">/* Gather solution from subsolvers */</font>
+<a name="line1366">1366: </a>      EPSSliceGatherSolution(eps);
+<a name="line1367">1367: </a>    } <font color="#4169E1">else</font> {
+<a name="line1368">1368: </a>      eps->nconv = sr->numEigs;
+<a name="line1369">1369: </a>      eps->its   = ctx->eps->its;
+<a name="line1370">1370: </a>      PetscFree(ctx->inertias);
+<a name="line1371">1371: </a>      PetscFree(ctx->shifts);
+<a name="line1372">1372: </a>      EPSSliceGetInertias(ctx->eps,&ctx->nshifts,&ctx->shifts,&ctx->inertias);
+<a name="line1373">1373: </a>    }
+<a name="line1374">1374: </a>  } <font color="#4169E1">else</font> {
+<a name="line1375">1375: </a>    <font color="#4169E1">if</font> (ctx->npart==1) {
+<a name="line1376">1376: </a>      sr->eigr   = ctx->eps->eigr;
+<a name="line1377">1377: </a>      sr->eigi   = ctx->eps->eigi;
+<a name="line1378">1378: </a>      sr->perm   = ctx->eps->perm;
+<a name="line1379">1379: </a>      sr->errest = ctx->eps->errest;
+<a name="line1380">1380: </a>      sr->V      = ctx->eps->V;
+<a name="line1381">1381: </a>    }
+<a name="line1382">1382: </a>    <font color="#B22222">/* Check that the user did not modify subcomm matrices */</font>
+<a name="line1383">1383: </a>    <a href="../../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,&B);
+<a name="line1384">1384: </a>    PetscObjectStateGet((PetscObject)A,&Astate);
+<a name="line1385">1385: </a>    PetscObjectGetId((PetscObject)A,&Aid);
+<a name="line1386">1386: </a>    <font color="#4169E1">if</font> (B) { 
+<a name="line1387">1387: </a>      PetscObjectStateGet((PetscObject)B,&Bstate);
+<a name="line1388">1388: </a>      PetscObjectGetId((PetscObject)B,&Bid);
+<a name="line1389">1389: </a>    }
+<a name="line1390">1390: </a>    <font color="#4169E1">if</font> (Astate!=ctx->Astate || (B && Bstate!=ctx->Bstate) || Aid!=ctx->Aid || (B && Bid!=ctx->Bid)) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Subcomm matrices have been modified by user"</font>);
+<a name="line1391">1391: </a>    <font color="#B22222">/* Only with eigenvalues present in the interval ...*/</font>
+<a name="line1392">1392: </a>    <font color="#4169E1">if</font> (sr->numEigs==0) {
+<a name="line1393">1393: </a>      eps->reason = EPS_CONVERGED_TOL;
+<a name="line1394">1394: </a>      <font color="#4169E1">return</font>(0);
+<a name="line1395">1395: </a>    }
+<a name="line1396">1396: </a>    <font color="#B22222">/* Array of pending shifts */</font>
+<a name="line1397">1397: </a>    sr->maxPend = 100; <font color="#B22222">/* Initial size */</font>
+<a name="line1398">1398: </a>    sr->nPend = 0;
+<a name="line1399">1399: </a>    PetscMalloc1(sr->maxPend,&sr->pending);
+<a name="line1400">1400: </a>    PetscLogObjectMemory((PetscObject)eps,(sr->maxPend)*<font color="#4169E1">sizeof</font>(EPS_shift));
+<a name="line1401">1401: </a>    EPSCreateShift(eps,sr->int0,NULL,NULL);
+<a name="line1402">1402: </a>    <font color="#B22222">/* extract first shift */</font>
+<a name="line1403">1403: </a>    sr->sPrev = NULL;
+<a name="line1404">1404: </a>    sr->sPres = sr->pending[--sr->nPend];
+<a name="line1405">1405: </a>    sr->sPres->inertia = sr->inertia0;
+<a name="line1406">1406: </a>    eps->target = sr->sPres->value;
+<a name="line1407">1407: </a>    sr->s0 = sr->sPres;
+<a name="line1408">1408: </a>    sr->indexEig = 0;
+<a name="line1409">1409: </a>    <font color="#B22222">/* Memory reservation for auxiliary variables */</font>
+<a name="line1410">1410: </a>    lds = PetscMin(eps->mpd,eps->ncv);
+<a name="line1411">1411: </a>    PetscCalloc1(lds*lds,&sr->S);
+<a name="line1412">1412: </a>    PetscMalloc1(eps->ncv,&sr->back);
+<a name="line1413">1413: </a>    PetscLogObjectMemory((PetscObject)eps,(sr->numEigs+2*eps->ncv)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1414">1414: </a>    <font color="#4169E1">for</font> (i=0;i<sr->numEigs;i++) {
+<a name="line1415">1415: </a>      sr->eigr[i]   = 0.0;
+<a name="line1416">1416: </a>      sr->eigi[i]   = 0.0;
+<a name="line1417">1417: </a>      sr->errest[i] = 0.0;
+<a name="line1418">1418: </a>      sr->perm[i]   = i;
+<a name="line1419">1419: </a>    }
+<a name="line1420">1420: </a>    <font color="#B22222">/* Vectors for deflation */</font>
+<a name="line1421">1421: </a>    PetscMalloc1(sr->numEigs,&sr->idxDef);
+<a name="line1422">1422: </a>    PetscLogObjectMemory((PetscObject)eps,sr->numEigs*<font color="#4169E1">sizeof</font>(PetscInt));
+<a name="line1423">1423: </a>    sr->indexEig = 0;
+<a name="line1424">1424: </a>    <font color="#B22222">/* Main loop */</font>
+<a name="line1425">1425: </a>    <font color="#4169E1">while</font> (sr->sPres) {
+<a name="line1426">1426: </a>      <font color="#B22222">/* Search for deflation */</font>
+<a name="line1427">1427: </a>      EPSLookForDeflation(eps);
+<a name="line1428">1428: </a>      <font color="#B22222">/* KrylovSchur */</font>
+<a name="line1429">1429: </a>      EPSKrylovSchur_Slice(eps);
+
+<a name="line1431">1431: </a>      EPSStoreEigenpairs(eps);
+<a name="line1432">1432: </a>      <font color="#B22222">/* Select new shift */</font>
+<a name="line1433">1433: </a>      <font color="#4169E1">if</font> (!sr->sPres->comp[1]) {
+<a name="line1434">1434: </a>        EPSGetNewShiftValue(eps,1,&newS);
+<a name="line1435">1435: </a>        EPSCreateShift(eps,newS,sr->sPres,sr->sPres->neighb[1]);
+<a name="line1436">1436: </a>      }
+<a name="line1437">1437: </a>      <font color="#4169E1">if</font> (!sr->sPres->comp[0]) {
+<a name="line1438">1438: </a>        <font color="#B22222">/* Completing earlier interval */</font>
+<a name="line1439">1439: </a>        EPSGetNewShiftValue(eps,0,&newS);
+<a name="line1440">1440: </a>        EPSCreateShift(eps,newS,sr->sPres->neighb[0],sr->sPres);
+<a name="line1441">1441: </a>      }
+<a name="line1442">1442: </a>      <font color="#B22222">/* Preparing for a new search of values */</font>
+<a name="line1443">1443: </a>      EPSExtractShift(eps);
+<a name="line1444">1444: </a>    }
+
+<a name="line1446">1446: </a>    <font color="#B22222">/* Updating eps values prior to exit */</font>
+<a name="line1447">1447: </a>    PetscFree(sr->S);
+<a name="line1448">1448: </a>    PetscFree(sr->idxDef);
+<a name="line1449">1449: </a>    PetscFree(sr->pending);
+<a name="line1450">1450: </a>    PetscFree(sr->back);
+<a name="line1451">1451: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(eps->V,eps->ncv+1,&sr->Vnext);
+<a name="line1452">1452: </a>    <a href="../../../../../docs/manualpages/BV/BVSetNumConstraints.html#BVSetNumConstraints">BVSetNumConstraints</a>(sr->Vnext,0);
+<a name="line1453">1453: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&eps->V);
+<a name="line1454">1454: </a>    eps->V      = sr->Vnext;
+<a name="line1455">1455: </a>    eps->nconv  = sr->indexEig;
+<a name="line1456">1456: </a>    eps->reason = EPS_CONVERGED_TOL;
+<a name="line1457">1457: </a>    eps->its    = sr->itsKs;
+<a name="line1458">1458: </a>    eps->nds    = 0;
+<a name="line1459">1459: </a>  }
+<a name="line1460">1460: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1461">1461: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/krylovschur/ks-symm.c b/src/eps/impls/krylov/krylovschur/ks-symm.c
index 0b65859..556680f 100644
--- a/src/eps/impls/krylov/krylovschur/ks-symm.c
+++ b/src/eps/impls/krylov/krylovschur/ks-symm.c
@@ -6,7 +6,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -72,8 +72,7 @@ PetscErrorCode EPSSolve_KrylovSchur_Symm(EPS eps)
 
     /* Check convergence */
     ierr = EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,nv-eps->nconv,beta,1.0,&k);CHKERRQ(ierr);
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-    if (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
     nconv = k;
 
     /* Update l */
diff --git a/src/eps/impls/krylov/krylovschur/ks-symm.c.html b/src/eps/impls/krylov/krylovschur/ks-symm.c.html
index 37d625c..a70aad3 100644
--- a/src/eps/impls/krylov/krylovschur/ks-symm.c.html
+++ b/src/eps/impls/krylov/krylovschur/ks-symm.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/krylovschur/ks-symm.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:57+00:00">
+<meta name="date" content="2016-05-16T10:32:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/ks-symm.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/ks-symm.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "krylovschur"</font>
@@ -18,7 +18,7 @@
 
 <a name="line7">  7: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line8">  8: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line11"> 11: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -81,46 +81,45 @@
 
 <a name="line73"> 73: </a>    <font color="#B22222">/* Check convergence */</font>
 <a name="line74"> 74: </a>    EPSKrylovConvergence(eps,PETSC_FALSE,eps->nconv,nv-eps->nconv,beta,1.0,&k);
-<a name="line75"> 75: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line76"> 76: </a>    <font color="#4169E1">if</font> (k >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line77"> 77: </a>    nconv = k;
-
-<a name="line79"> 79: </a>    <font color="#B22222">/* Update l */</font>
-<a name="line80"> 80: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || breakdown) l = 0;
-<a name="line81"> 81: </a>    <font color="#4169E1">else</font> l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
-<a name="line82"> 82: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-
-<a name="line84"> 84: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
-<a name="line85"> 85: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line86"> 86: </a>        <font color="#B22222">/* Start a new Lanczos factorization */</font>
-<a name="line87"> 87: </a>        PetscInfo2(eps,<font color="#666666">"Breakdown in Krylov-Schur method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
-<a name="line88"> 88: </a>        <font color="#4169E1">if</font> (k<eps->nev) {
-<a name="line89"> 89: </a>          EPSGetStartVector(eps,k,&breakdown);
-<a name="line90"> 90: </a>          <font color="#4169E1">if</font> (breakdown) {
-<a name="line91"> 91: </a>            eps->reason = EPS_DIVERGED_BREAKDOWN;
-<a name="line92"> 92: </a>            PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
-<a name="line93"> 93: </a>          }
-<a name="line94"> 94: </a>        }
-<a name="line95"> 95: </a>      } <font color="#4169E1">else</font> {
-<a name="line96"> 96: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
-<a name="line97"> 97: </a>        <a href="../../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(eps->ds,k+l);
-<a name="line98"> 98: </a>      }
-<a name="line99"> 99: </a>    }
-<a name="line100">100: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line101">101: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
-<a name="line102">102: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
-<a name="line103">103: </a>    MatDestroy(&U);
-
-<a name="line105">105: </a>    <font color="#B22222">/* Normalize u and append it to V */</font>
-<a name="line106">106: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
-<a name="line107">107: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
-<a name="line108">108: </a>    }
-
-<a name="line110">110: </a>    eps->nconv = k;
-<a name="line111">111: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,nv);
-<a name="line112">112: </a>  }
-<a name="line113">113: </a>  <font color="#4169E1">return</font>(0);
-<a name="line114">114: </a>}
+<a name="line75"> 75: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,k,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line76"> 76: </a>    nconv = k;
+
+<a name="line78"> 78: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line79"> 79: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line80"> 80: </a>    <font color="#4169E1">else</font> l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line81"> 81: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+
+<a name="line83"> 83: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) {
+<a name="line84"> 84: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line85"> 85: </a>        <font color="#B22222">/* Start a new Lanczos factorization */</font>
+<a name="line86"> 86: </a>        PetscInfo2(eps,<font color="#666666">"Breakdown in Krylov-Schur method (it=%D norm=%g)\n"</font>,eps->its,(double)beta);
+<a name="line87"> 87: </a>        <font color="#4169E1">if</font> (k<eps->nev) {
+<a name="line88"> 88: </a>          EPSGetStartVector(eps,k,&breakdown);
+<a name="line89"> 89: </a>          <font color="#4169E1">if</font> (breakdown) {
+<a name="line90"> 90: </a>            eps->reason = EPS_DIVERGED_BREAKDOWN;
+<a name="line91"> 91: </a>            PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
+<a name="line92"> 92: </a>          }
+<a name="line93"> 93: </a>        }
+<a name="line94"> 94: </a>      } <font color="#4169E1">else</font> {
+<a name="line95"> 95: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line96"> 96: </a>        <a href="../../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(eps->ds,k+l);
+<a name="line97"> 97: </a>      }
+<a name="line98"> 98: </a>    }
+<a name="line99"> 99: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line100">100: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(eps->ds,DS_MAT_Q,&U);
+<a name="line101">101: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(eps->V,U,eps->nconv,k+l);
+<a name="line102">102: </a>    MatDestroy(&U);
+
+<a name="line104">104: </a>    <font color="#B22222">/* Normalize u and append it to V */</font>
+<a name="line105">105: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING && !breakdown) {
+<a name="line106">106: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,nv,k+l);
+<a name="line107">107: </a>    }
+
+<a name="line109">109: </a>    eps->nconv = k;
+<a name="line110">110: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,nv);
+<a name="line111">111: </a>  }
+<a name="line112">112: </a>  <font color="#4169E1">return</font>(0);
+<a name="line113">113: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/krylovschur/makefile b/src/eps/impls/krylov/krylovschur/makefile
index 08aa652..bc59868 100644
--- a/src/eps/impls/krylov/krylovschur/makefile
+++ b/src/eps/impls/krylov/krylovschur/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/krylov/krylovschur/makefile.html b/src/eps/impls/krylov/krylovschur/makefile.html
index 8de74f6..b07442f 100644
--- a/src/eps/impls/krylov/krylovschur/makefile.html
+++ b/src/eps/impls/krylov/krylovschur/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/krylovschur/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:01+00:00">
+<meta name="date" content="2016-05-16T10:32:56+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/krylovschur/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/krylovschur/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/krylov/lanczos/index.html b/src/eps/impls/krylov/lanczos/index.html
index 1326b0d..ff504b2 100644
--- a/src/eps/impls/krylov/lanczos/index.html
+++ b/src/eps/impls/krylov/lanczos/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/lanczos/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/lanczos/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/krylov/lanczos/lanczos.c b/src/eps/impls/krylov/lanczos/lanczos.c
index 0c58585..f224162 100644
--- a/src/eps/impls/krylov/lanczos/lanczos.c
+++ b/src/eps/impls/krylov/lanczos/lanczos.c
@@ -17,7 +17,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -715,10 +715,9 @@ PetscErrorCode EPSSolve_Lanczos(EPS eps)
       eps->eigr[i] = ritz[i];
       eps->errest[i] = bnd[i];
     }
-    ierr = EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,n);CHKERRQ(ierr);
     nconv = k;
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-    if (nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
+    ierr = EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,n);CHKERRQ(ierr);
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,nconv,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
 
     if (eps->reason == EPS_CONVERGED_ITERATING) { /* copy restart vector */
       ierr = BVCopyColumn(eps->V,n,nconv);CHKERRQ(ierr);
@@ -746,7 +745,7 @@ PetscErrorCode EPSSolve_Lanczos(EPS eps)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_Lanczos"
-PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode         ierr;
   EPS_LANCZOS            *lanczos = (EPS_LANCZOS*)eps->data;
@@ -852,7 +851,7 @@ PetscErrorCode EPSLanczosGetReorthog(EPS eps,EPSLanczosReorthogType *reorthog)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(reorthog,2);
-  ierr = PetscTryMethod(eps,"EPSLanczosGetReorthog_C",(EPS,EPSLanczosReorthogType*),(eps,reorthog));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSLanczosGetReorthog_C",(EPS,EPSLanczosReorthogType*),(eps,reorthog));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/krylov/lanczos/lanczos.c.html b/src/eps/impls/krylov/lanczos/lanczos.c.html
index aedbc01..e5e133d 100644
--- a/src/eps/impls/krylov/lanczos/lanczos.c.html
+++ b/src/eps/impls/krylov/lanczos/lanczos.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/lanczos/lanczos.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:54+00:00">
+<meta name="date" content="2016-05-16T10:32:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/lanczos/lanczos.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/lanczos/lanczos.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "lanczos"</font>
@@ -29,7 +29,7 @@
 
 <a name="line18"> 18: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line19"> 19: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line20"> 20: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line20"> 20: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line22"> 22: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -694,173 +694,172 @@
 <a name="line715">715: </a>      eps->eigr[i] = ritz[i];
 <a name="line716">716: </a>      eps->errest[i] = bnd[i];
 <a name="line717">717: </a>    }
-<a name="line718">718: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,n);
-<a name="line719">719: </a>    nconv = k;
-<a name="line720">720: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line721">721: </a>    <font color="#4169E1">if</font> (nconv >= eps->nev) eps->reason = EPS_CONVERGED_TOL;
-
-<a name="line723">723: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) { <font color="#B22222">/* copy restart vector */</font>
-<a name="line724">724: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,n,nconv);
-<a name="line725">725: </a>      <font color="#4169E1">if</font> (lanczos->reorthog == EPS_LANCZOS_REORTHOG_LOCAL && !breakdown) {
-<a name="line726">726: </a>        <font color="#B22222">/* Reorthonormalize restart vector */</font>
-<a name="line727">727: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,nconv,NULL,&norm,&breakdown);
-<a name="line728">728: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,nconv,1.0/norm);
-<a name="line729">729: </a>      }
-<a name="line730">730: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line731">731: </a>        <font color="#B22222">/* Use random vector for restarting */</font>
-<a name="line732">732: </a>        PetscInfo(eps,<font color="#666666">"Using random vector for restart\n"</font>);
-<a name="line733">733: </a>        EPSGetStartVector(eps,nconv,&breakdown);
-<a name="line734">734: </a>      }
-<a name="line735">735: </a>      <font color="#4169E1">if</font> (breakdown) { <font color="#B22222">/* give up */</font>
-<a name="line736">736: </a>        eps->reason = EPS_DIVERGED_BREAKDOWN;
-<a name="line737">737: </a>        PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
-<a name="line738">738: </a>      }
-<a name="line739">739: </a>    }
-<a name="line740">740: </a>  }
-<a name="line741">741: </a>  eps->nconv = nconv;
-
-<a name="line743">743: </a>  PetscFree4(ritz,bnd,perm,conv);
-<a name="line744">744: </a>  <font color="#4169E1">return</font>(0);
-<a name="line745">745: </a>}
-
-<a name="line749">749: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_Lanczos"></a>PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line750">750: </a>{
-<a name="line751">751: </a>  PetscErrorCode         ierr;
-<a name="line752">752: </a>  EPS_LANCZOS            *lanczos = (EPS_LANCZOS*)eps->data;
-<a name="line753">753: </a>  PetscBool              flg;
-<a name="line754">754: </a>  <a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> reorthog;
-
-<a name="line757">757: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Lanczos Options"</font>);
-<a name="line758">758: </a>  PetscOptionsEnum(<font color="#666666">"-eps_lanczos_reorthog"</font>,<font color="#666666">"Lanczos reorthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>"</font>,EPSLanczosReorthogTypes,(PetscEnum)lanczos->reorthog,(PetscEnum*)&reorthog,&flg);
-<a name="line759">759: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line760">760: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(eps,reorthog);
-<a name="line761">761: </a>  }
-<a name="line762">762: </a>  PetscOptionsTail();
-<a name="line763">763: </a>  <font color="#4169E1">return</font>(0);
-<a name="line764">764: </a>}
-
-<a name="line768">768: </a><strong><font color="#4169E1"><a name="EPSLanczosSetReorthog_Lanczos"></a>static PetscErrorCode EPSLanczosSetReorthog_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> reorthog)</font></strong>
-<a name="line769">769: </a>{
-<a name="line770">770: </a>  EPS_LANCZOS *lanczos = (EPS_LANCZOS*)eps->data;
-
-<a name="line773">773: </a>  <font color="#4169E1">switch</font> (reorthog) {
-<a name="line774">774: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_LOCAL:
-<a name="line775">775: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_FULL:
-<a name="line776">776: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_DELAYED:
-<a name="line777">777: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_SELECTIVE:
-<a name="line778">778: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_PERIODIC:
-<a name="line779">779: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_PARTIAL:
-<a name="line780">780: </a>      lanczos->reorthog = reorthog;
-<a name="line781">781: </a>      <font color="#4169E1">break</font>;
-<a name="line782">782: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line783">783: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid reorthogonalization type"</font>);
-<a name="line784">784: </a>  }
-<a name="line785">785: </a>  <font color="#4169E1">return</font>(0);
-<a name="line786">786: </a>}
-
-<a name="line790">790: </a><font color="#B22222">/*@</font>
-<a name="line791">791: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a> - Sets the type of reorthogonalization used during the Lanczos</font>
-<a name="line792">792: </a><font color="#B22222">   iteration.</font>
-
-<a name="line794">794: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line796">796: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line797">797: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line798">798: </a><font color="#B22222">-  reorthog - the type of reorthogonalization</font>
-
-<a name="line800">800: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line801">801: </a><font color="#B22222">.  -eps_lanczos_reorthog - Sets the reorthogonalization type (either 'local', 'selective',</font>
-<a name="line802">802: </a><font color="#B22222">                         'periodic', 'partial', 'full' or 'delayed')</font>
-
-<a name="line804">804: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line806">806: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>(), <a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a></font>
-<a name="line807">807: </a><font color="#B22222">@*/</font>
-<a name="line808">808: </a><strong><font color="#4169E1"><a name="EPSLanczosSetReorthog"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> reorthog)</font></strong>
-<a name="line809">809: </a>{
-
-<a name="line815">815: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLanczosSetReorthog_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>),(eps,reorthog));
-<a name="line816">816: </a>  <font color="#4169E1">return</font>(0);
-<a name="line817">817: </a>}
-
-<a name="line821">821: </a><strong><font color="#4169E1"><a name="EPSLanczosGetReorthog_Lanczos"></a>static PetscErrorCode EPSLanczosGetReorthog_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> *reorthog)</font></strong>
-<a name="line822">822: </a>{
-<a name="line823">823: </a>  EPS_LANCZOS *lanczos = (EPS_LANCZOS*)eps->data;
-
-<a name="line826">826: </a>  *reorthog = lanczos->reorthog;
-<a name="line827">827: </a>  <font color="#4169E1">return</font>(0);
-<a name="line828">828: </a>}
-
-<a name="line832">832: </a><font color="#B22222">/*@</font>
-<a name="line833">833: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a> - Gets the type of reorthogonalization used during</font>
-<a name="line834">834: </a><font color="#B22222">   the Lanczos iteration.</font>
-
-<a name="line836">836: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line838">838: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line839">839: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line841">841: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line842">842: </a><font color="#B22222">.  reorthog - the type of reorthogonalization</font>
-
-<a name="line844">844: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line846">846: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(), <a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a></font>
-<a name="line847">847: </a><font color="#B22222">@*/</font>
-<a name="line848">848: </a><strong><font color="#4169E1"><a name="EPSLanczosGetReorthog"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> *reorthog)</font></strong>
-<a name="line849">849: </a>{
-
-<a name="line855">855: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLanczosGetReorthog_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>*),(eps,reorthog));
-<a name="line856">856: </a>  <font color="#4169E1">return</font>(0);
-<a name="line857">857: </a>}
-
-<a name="line861">861: </a><strong><font color="#4169E1"><a name="EPSReset_Lanczos"></a>PetscErrorCode EPSReset_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line862">862: </a>{
-<a name="line864">864: </a>  EPS_LANCZOS    *lanczos = (EPS_LANCZOS*)eps->data;
-
-<a name="line867">867: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&lanczos->AV);
-<a name="line868">868: </a>  <font color="#4169E1">return</font>(0);
-<a name="line869">869: </a>}
-
-<a name="line873">873: </a><strong><font color="#4169E1"><a name="EPSDestroy_Lanczos"></a>PetscErrorCode EPSDestroy_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line874">874: </a>{
-
-<a name="line878">878: </a>  PetscFree(eps->data);
-<a name="line879">879: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosSetReorthog_C"</font>,NULL);
-<a name="line880">880: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosGetReorthog_C"</font>,NULL);
-<a name="line881">881: </a>  <font color="#4169E1">return</font>(0);
-<a name="line882">882: </a>}
-
-<a name="line886">886: </a><strong><font color="#4169E1"><a name="EPSView_Lanczos"></a>PetscErrorCode EPSView_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line887">887: </a>{
-<a name="line889">889: </a>  EPS_LANCZOS    *lanczos = (EPS_LANCZOS*)eps->data;
-<a name="line890">890: </a>  PetscBool      isascii;
-
-<a name="line893">893: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line894">894: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line895">895: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Lanczos: %s reorthogonalization\n"</font>,EPSLanczosReorthogTypes[lanczos->reorthog]);
-<a name="line896">896: </a>  }
-<a name="line897">897: </a>  <font color="#4169E1">return</font>(0);
-<a name="line898">898: </a>}
-
-<a name="line902">902: </a><strong><font color="#4169E1"><a name="EPSCreate_Lanczos"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line903">903: </a>{
-<a name="line904">904: </a>  EPS_LANCZOS    *ctx;
-
-<a name="line908">908: </a>  PetscNewLog(eps,&ctx);
-<a name="line909">909: </a>  eps->data = (void*)ctx;
-
-<a name="line911">911: </a>  eps->ops->setup                = EPSSetUp_Lanczos;
-<a name="line912">912: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_Lanczos;
-<a name="line913">913: </a>  eps->ops->destroy              = EPSDestroy_Lanczos;
-<a name="line914">914: </a>  eps->ops->reset                = EPSReset_Lanczos;
-<a name="line915">915: </a>  eps->ops->view                 = EPSView_Lanczos;
-<a name="line916">916: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
-<a name="line917">917: </a>  eps->ops->computevectors       = EPSComputeVectors_Hermitian;
-<a name="line918">918: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosSetReorthog_C"</font>,EPSLanczosSetReorthog_Lanczos);
-<a name="line919">919: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosGetReorthog_C"</font>,EPSLanczosGetReorthog_Lanczos);
-<a name="line920">920: </a>  <font color="#4169E1">return</font>(0);
-<a name="line921">921: </a>}
+<a name="line718">718: </a>    nconv = k;
+<a name="line719">719: </a>    EPSMonitor(eps,eps->its,nconv,eps->eigr,eps->eigi,eps->errest,n);
+<a name="line720">720: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,nconv,eps->nev,&eps->reason,eps->stoppingctx);
+
+<a name="line722">722: </a>    <font color="#4169E1">if</font> (eps->reason == EPS_CONVERGED_ITERATING) { <font color="#B22222">/* copy restart vector */</font>
+<a name="line723">723: </a>      <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(eps->V,n,nconv);
+<a name="line724">724: </a>      <font color="#4169E1">if</font> (lanczos->reorthog == EPS_LANCZOS_REORTHOG_LOCAL && !breakdown) {
+<a name="line725">725: </a>        <font color="#B22222">/* Reorthonormalize restart vector */</font>
+<a name="line726">726: </a>        <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,nconv,NULL,&norm,&breakdown);
+<a name="line727">727: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,nconv,1.0/norm);
+<a name="line728">728: </a>      }
+<a name="line729">729: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line730">730: </a>        <font color="#B22222">/* Use random vector for restarting */</font>
+<a name="line731">731: </a>        PetscInfo(eps,<font color="#666666">"Using random vector for restart\n"</font>);
+<a name="line732">732: </a>        EPSGetStartVector(eps,nconv,&breakdown);
+<a name="line733">733: </a>      }
+<a name="line734">734: </a>      <font color="#4169E1">if</font> (breakdown) { <font color="#B22222">/* give up */</font>
+<a name="line735">735: </a>        eps->reason = EPS_DIVERGED_BREAKDOWN;
+<a name="line736">736: </a>        PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
+<a name="line737">737: </a>      }
+<a name="line738">738: </a>    }
+<a name="line739">739: </a>  }
+<a name="line740">740: </a>  eps->nconv = nconv;
+
+<a name="line742">742: </a>  PetscFree4(ritz,bnd,perm,conv);
+<a name="line743">743: </a>  <font color="#4169E1">return</font>(0);
+<a name="line744">744: </a>}
+
+<a name="line748">748: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_Lanczos"></a>PetscErrorCode EPSSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line749">749: </a>{
+<a name="line750">750: </a>  PetscErrorCode         ierr;
+<a name="line751">751: </a>  EPS_LANCZOS            *lanczos = (EPS_LANCZOS*)eps->data;
+<a name="line752">752: </a>  PetscBool              flg;
+<a name="line753">753: </a>  <a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> reorthog;
+
+<a name="line756">756: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Lanczos Options"</font>);
+<a name="line757">757: </a>  PetscOptionsEnum(<font color="#666666">"-eps_lanczos_reorthog"</font>,<font color="#666666">"Lanczos reorthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>"</font>,EPSLanczosReorthogTypes,(PetscEnum)lanczos->reorthog,(PetscEnum*)&reorthog,&flg);
+<a name="line758">758: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line759">759: </a>    <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(eps,reorthog);
+<a name="line760">760: </a>  }
+<a name="line761">761: </a>  PetscOptionsTail();
+<a name="line762">762: </a>  <font color="#4169E1">return</font>(0);
+<a name="line763">763: </a>}
+
+<a name="line767">767: </a><strong><font color="#4169E1"><a name="EPSLanczosSetReorthog_Lanczos"></a>static PetscErrorCode EPSLanczosSetReorthog_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> reorthog)</font></strong>
+<a name="line768">768: </a>{
+<a name="line769">769: </a>  EPS_LANCZOS *lanczos = (EPS_LANCZOS*)eps->data;
+
+<a name="line772">772: </a>  <font color="#4169E1">switch</font> (reorthog) {
+<a name="line773">773: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_LOCAL:
+<a name="line774">774: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_FULL:
+<a name="line775">775: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_DELAYED:
+<a name="line776">776: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_SELECTIVE:
+<a name="line777">777: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_PERIODIC:
+<a name="line778">778: </a>    <font color="#4169E1">case</font> EPS_LANCZOS_REORTHOG_PARTIAL:
+<a name="line779">779: </a>      lanczos->reorthog = reorthog;
+<a name="line780">780: </a>      <font color="#4169E1">break</font>;
+<a name="line781">781: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line782">782: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid reorthogonalization type"</font>);
+<a name="line783">783: </a>  }
+<a name="line784">784: </a>  <font color="#4169E1">return</font>(0);
+<a name="line785">785: </a>}
+
+<a name="line789">789: </a><font color="#B22222">/*@</font>
+<a name="line790">790: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a> - Sets the type of reorthogonalization used during the Lanczos</font>
+<a name="line791">791: </a><font color="#B22222">   iteration.</font>
+
+<a name="line793">793: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line795">795: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line796">796: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line797">797: </a><font color="#B22222">-  reorthog - the type of reorthogonalization</font>
+
+<a name="line799">799: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line800">800: </a><font color="#B22222">.  -eps_lanczos_reorthog - Sets the reorthogonalization type (either 'local', 'selective',</font>
+<a name="line801">801: </a><font color="#B22222">                         'periodic', 'partial', 'full' or 'delayed')</font>
+
+<a name="line803">803: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line805">805: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>(), <a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a></font>
+<a name="line806">806: </a><font color="#B22222">@*/</font>
+<a name="line807">807: </a><strong><font color="#4169E1"><a name="EPSLanczosSetReorthog"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> reorthog)</font></strong>
+<a name="line808">808: </a>{
+
+<a name="line814">814: </a>  PetscTryMethod(eps,<font color="#666666">"EPSLanczosSetReorthog_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>),(eps,reorthog));
+<a name="line815">815: </a>  <font color="#4169E1">return</font>(0);
+<a name="line816">816: </a>}
+
+<a name="line820">820: </a><strong><font color="#4169E1"><a name="EPSLanczosGetReorthog_Lanczos"></a>static PetscErrorCode EPSLanczosGetReorthog_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> *reorthog)</font></strong>
+<a name="line821">821: </a>{
+<a name="line822">822: </a>  EPS_LANCZOS *lanczos = (EPS_LANCZOS*)eps->data;
+
+<a name="line825">825: </a>  *reorthog = lanczos->reorthog;
+<a name="line826">826: </a>  <font color="#4169E1">return</font>(0);
+<a name="line827">827: </a>}
+
+<a name="line831">831: </a><font color="#B22222">/*@</font>
+<a name="line832">832: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a> - Gets the type of reorthogonalization used during</font>
+<a name="line833">833: </a><font color="#B22222">   the Lanczos iteration.</font>
+
+<a name="line835">835: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line837">837: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line838">838: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line840">840: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line841">841: </a><font color="#B22222">.  reorthog - the type of reorthogonalization</font>
+
+<a name="line843">843: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line845">845: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSLanczosSetReorthog.html#EPSLanczosSetReorthog">EPSLanczosSetReorthog</a>(), <a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a></font>
+<a name="line846">846: </a><font color="#B22222">@*/</font>
+<a name="line847">847: </a><strong><font color="#4169E1"><a name="EPSLanczosGetReorthog"></a>PetscErrorCode <a href="../../../../../docs/manualpages/EPS/EPSLanczosGetReorthog.html#EPSLanczosGetReorthog">EPSLanczosGetReorthog</a>(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a> *reorthog)</font></strong>
+<a name="line848">848: </a>{
+
+<a name="line854">854: </a>  PetscUseMethod(eps,<font color="#666666">"EPSLanczosGetReorthog_C"</font>,(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>*),(eps,reorthog));
+<a name="line855">855: </a>  <font color="#4169E1">return</font>(0);
+<a name="line856">856: </a>}
+
+<a name="line860">860: </a><strong><font color="#4169E1"><a name="EPSReset_Lanczos"></a>PetscErrorCode EPSReset_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line861">861: </a>{
+<a name="line863">863: </a>  EPS_LANCZOS    *lanczos = (EPS_LANCZOS*)eps->data;
+
+<a name="line866">866: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&lanczos->AV);
+<a name="line867">867: </a>  <font color="#4169E1">return</font>(0);
+<a name="line868">868: </a>}
+
+<a name="line872">872: </a><strong><font color="#4169E1"><a name="EPSDestroy_Lanczos"></a>PetscErrorCode EPSDestroy_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line873">873: </a>{
+
+<a name="line877">877: </a>  PetscFree(eps->data);
+<a name="line878">878: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosSetReorthog_C"</font>,NULL);
+<a name="line879">879: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosGetReorthog_C"</font>,NULL);
+<a name="line880">880: </a>  <font color="#4169E1">return</font>(0);
+<a name="line881">881: </a>}
+
+<a name="line885">885: </a><strong><font color="#4169E1"><a name="EPSView_Lanczos"></a>PetscErrorCode EPSView_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line886">886: </a>{
+<a name="line888">888: </a>  EPS_LANCZOS    *lanczos = (EPS_LANCZOS*)eps->data;
+<a name="line889">889: </a>  PetscBool      isascii;
+
+<a name="line892">892: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line893">893: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line894">894: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Lanczos: %s reorthogonalization\n"</font>,EPSLanczosReorthogTypes[lanczos->reorthog]);
+<a name="line895">895: </a>  }
+<a name="line896">896: </a>  <font color="#4169E1">return</font>(0);
+<a name="line897">897: </a>}
+
+<a name="line901">901: </a><strong><font color="#4169E1"><a name="EPSCreate_Lanczos"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Lanczos(<a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line902">902: </a>{
+<a name="line903">903: </a>  EPS_LANCZOS    *ctx;
+
+<a name="line907">907: </a>  PetscNewLog(eps,&ctx);
+<a name="line908">908: </a>  eps->data = (void*)ctx;
+
+<a name="line910">910: </a>  eps->ops->setup                = EPSSetUp_Lanczos;
+<a name="line911">911: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_Lanczos;
+<a name="line912">912: </a>  eps->ops->destroy              = EPSDestroy_Lanczos;
+<a name="line913">913: </a>  eps->ops->reset                = EPSReset_Lanczos;
+<a name="line914">914: </a>  eps->ops->view                 = EPSView_Lanczos;
+<a name="line915">915: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
+<a name="line916">916: </a>  eps->ops->computevectors       = EPSComputeVectors_Hermitian;
+<a name="line917">917: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosSetReorthog_C"</font>,EPSLanczosSetReorthog_Lanczos);
+<a name="line918">918: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSLanczosGetReorthog_C"</font>,EPSLanczosGetReorthog_Lanczos);
+<a name="line919">919: </a>  <font color="#4169E1">return</font>(0);
+<a name="line920">920: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/krylov/lanczos/makefile b/src/eps/impls/krylov/lanczos/makefile
index 986aede..e9b1a00 100644
--- a/src/eps/impls/krylov/lanczos/makefile
+++ b/src/eps/impls/krylov/lanczos/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/krylov/lanczos/makefile.html b/src/eps/impls/krylov/lanczos/makefile.html
index fffdc5a..67dc8db 100644
--- a/src/eps/impls/krylov/lanczos/makefile.html
+++ b/src/eps/impls/krylov/lanczos/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/lanczos/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:55+00:00">
+<meta name="date" content="2016-05-16T10:32:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/lanczos/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/lanczos/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/krylov/makefile b/src/eps/impls/krylov/makefile
index 0041bc2..2b34935 100644
--- a/src/eps/impls/krylov/makefile
+++ b/src/eps/impls/krylov/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/krylov/makefile.html b/src/eps/impls/krylov/makefile.html
index 1afdd94..3ef9ef6 100644
--- a/src/eps/impls/krylov/makefile.html
+++ b/src/eps/impls/krylov/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/krylov/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:53+00:00">
+<meta name="date" content="2016-05-16T10:32:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/krylov/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/krylov/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/lapack/index.html b/src/eps/impls/lapack/index.html
index 3690ba3..06763ca 100644
--- a/src/eps/impls/lapack/index.html
+++ b/src/eps/impls/lapack/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/lapack/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/lapack/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/lapack/lapack.c b/src/eps/impls/lapack/lapack.c
index 9368472..3607b93 100644
--- a/src/eps/impls/lapack/lapack.c
+++ b/src/eps/impls/lapack/lapack.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -42,6 +42,7 @@ PetscErrorCode EPSSetUp_LAPACK(EPS eps)
   if (eps->mpd) { ierr = PetscInfo(eps,"Warning: parameter mpd ignored\n");CHKERRQ(ierr); }
   if (!eps->which) { ierr = EPSSetWhichEigenpairs_Default(eps);CHKERRQ(ierr); }
   if (eps->balance!=EPS_BALANCE_NONE) { ierr = PetscInfo(eps,"Warning: balancing ignored\n");CHKERRQ(ierr); }
+  if (eps->stopping!=EPSStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,"User-defined stopping test not supported");
   if (eps->extraction) { ierr = PetscInfo(eps,"Warning: extraction type ignored\n");CHKERRQ(ierr); }
   ierr = EPSAllocateSolution(eps,0);CHKERRQ(ierr);
 
@@ -53,13 +54,13 @@ PetscErrorCode EPSSetUp_LAPACK(EPS eps)
     if (nmat>1) { ierr = STGetOperators(eps->st,1,&B);CHKERRQ(ierr); }
     PetscPushErrorHandler(PetscIgnoreErrorHandler,NULL);
     ierra = SlepcMatConvertSeqDense(A,&Adense);CHKERRQ(ierr);
-    if (eps->isgeneralized) {
+    if (nmat>1) {
       ierrb = SlepcMatConvertSeqDense(B,&Bdense);CHKERRQ(ierr);
     } else {
       ierrb = 0;
     }
     PetscPopErrorHandler();
-    denseok = (ierra == 0 && ierrb == 0)? PETSC_TRUE: PETSC_FALSE;
+    denseok = PetscNot(ierra || ierrb);
   }
 
   /* setup DS */
diff --git a/src/eps/impls/lapack/lapack.c.html b/src/eps/impls/lapack/lapack.c.html
index 5fc83db..9a600f4 100644
--- a/src/eps/impls/lapack/lapack.c.html
+++ b/src/eps/impls/lapack/lapack.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/lapack/lapack.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:16+00:00">
+<meta name="date" content="2016-05-16T10:33:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/lapack/lapack.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/lapack/lapack.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the LAPACK eigenvalue subroutines.</font>
 <a name="line3">  3: </a><font color="#B22222">   Generalized problems are transformed to standard ones only if necessary.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -51,129 +51,130 @@
 <a name="line42"> 42: </a>  <font color="#4169E1">if</font> (eps->mpd) { PetscInfo(eps,<font color="#666666">"Warning: parameter mpd ignored\n"</font>); }
 <a name="line43"> 43: </a>  <font color="#4169E1">if</font> (!eps->which) { EPSSetWhichEigenpairs_Default(eps); }
 <a name="line44"> 44: </a>  <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE) { PetscInfo(eps,<font color="#666666">"Warning: balancing ignored\n"</font>); }
-<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
-<a name="line46"> 46: </a>  <a href="../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
-
-<a name="line48"> 48: </a>  <font color="#B22222">/* attempt to get dense representations of A and B separately */</font>
-<a name="line49"> 49: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSHIFT,&isshift);
-<a name="line50"> 50: </a>  <font color="#4169E1">if</font> (isshift) {
-<a name="line51"> 51: </a>    <a href="../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line52"> 52: </a>    <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line53"> 53: </a>    <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
-<a name="line54"> 54: </a>    PetscPushErrorHandler(PetscIgnoreErrorHandler,NULL);
-<a name="line55"> 55: </a>    ierra = <a href="../../../../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(A,&Adense);
-<a name="line56"> 56: </a>    <font color="#4169E1">if</font> (eps->isgeneralized) {
-<a name="line57"> 57: </a>      ierrb = <a href="../../../../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(B,&Bdense);
-<a name="line58"> 58: </a>    } <font color="#4169E1">else</font> {
-<a name="line59"> 59: </a>      ierrb = 0;
-<a name="line60"> 60: </a>    }
-<a name="line61"> 61: </a>    PetscPopErrorHandler();
-<a name="line62"> 62: </a>    denseok = (ierra == 0 && ierrb == 0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line63"> 63: </a>  }
-
-<a name="line65"> 65: </a>  <font color="#B22222">/* setup <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
-<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (denseok) {
-<a name="line67"> 67: </a>    <font color="#4169E1">if</font> (eps->isgeneralized) {
-<a name="line68"> 68: </a>      <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line69"> 69: </a>        <font color="#4169E1">if</font> (eps->ispositive) {
-<a name="line70"> 70: </a>          <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
-<a name="line71"> 71: </a>        } <font color="#4169E1">else</font> {
-<a name="line72"> 72: </a>          <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP); <font color="#B22222">/* TODO: should be DSGHIEP */</font>
-<a name="line73"> 73: </a>        }
-<a name="line74"> 74: </a>      } <font color="#4169E1">else</font> {
-<a name="line75"> 75: </a>        <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP);
-<a name="line76"> 76: </a>      }
-<a name="line77"> 77: </a>    } <font color="#4169E1">else</font> {
-<a name="line78"> 78: </a>      <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line79"> 79: </a>        <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSHEP);
-<a name="line80"> 80: </a>      } <font color="#4169E1">else</font> {
-<a name="line81"> 81: </a>        <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSNHEP);
-<a name="line82"> 82: </a>      }
-<a name="line83"> 83: </a>    }
-<a name="line84"> 84: </a>  } <font color="#4169E1">else</font> {
-<a name="line85"> 85: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSNHEP);
-<a name="line86"> 86: </a>  }
-<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv);
-<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
-<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->ncv,0,0,0);
-
-<a name="line91"> 91: </a>  <font color="#4169E1">if</font> (denseok) {
-<a name="line92"> 92: </a>    <a href="../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&shift);
-<a name="line93"> 93: </a>    <font color="#4169E1">if</font> (shift != 0.0) {
-<a name="line94"> 94: </a>      MatShift(Adense,shift);
-<a name="line95"> 95: </a>    }
-<a name="line96"> 96: </a>    <font color="#B22222">/* use dummy pc and ksp to avoid problems when B is not positive definite */</font>
-<a name="line97"> 97: </a>    <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
-<a name="line98"> 98: </a>    KSPSetType(ksp,KSPPREONLY);
-<a name="line99"> 99: </a>    KSPGetPC(ksp,&pc);
-<a name="line100">100: </a>    PCSetType(pc,PCNONE);
-<a name="line101">101: </a>  } <font color="#4169E1">else</font> {
-<a name="line102">102: </a>    PetscInfo(eps,<font color="#666666">"Using slow explicit operator\n"</font>);
-<a name="line103">103: </a>    <a href="../../../../docs/manualpages/ST/STComputeExplicitOperator.html#STComputeExplicitOperator">STComputeExplicitOperator</a>(eps->st,&OP);
-<a name="line104">104: </a>    MatDestroy(&Adense);
-<a name="line105">105: </a>    <a href="../../../../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(OP,&Adense);
-<a name="line106">106: </a>  }
-
-<a name="line108">108: </a>  <font color="#B22222">/* fill <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> matrices */</font>
-<a name="line109">109: </a>  VecCreateSeqWithArray(PETSC_COMM_SELF,1,ld,NULL,&v);
-<a name="line110">110: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&Ap);
-<a name="line111">111: </a>  <font color="#4169E1">for</font> (i=0;i<ld;i++) {
-<a name="line112">112: </a>    VecPlaceArray(v,Ap+i*ld);
-<a name="line113">113: </a>    MatGetColumnVector(Adense,v,i);
-<a name="line114">114: </a>    VecResetArray(v);
-<a name="line115">115: </a>  }
-<a name="line116">116: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&Ap);
-<a name="line117">117: </a>  <font color="#4169E1">if</font> (denseok && eps->isgeneralized) {
-<a name="line118">118: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_B,&Bp);
-<a name="line119">119: </a>    <font color="#4169E1">for</font> (i=0;i<ld;i++) {
-<a name="line120">120: </a>      VecPlaceArray(v,Bp+i*ld);
-<a name="line121">121: </a>      MatGetColumnVector(Bdense,v,i);
-<a name="line122">122: </a>      VecResetArray(v);
-<a name="line123">123: </a>    }
-<a name="line124">124: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_B,&Bp);
-<a name="line125">125: </a>  }
-<a name="line126">126: </a>  VecDestroy(&v);
-<a name="line127">127: </a>  MatDestroy(&Adense);
-<a name="line128">128: </a>  <font color="#4169E1">if</font> (!denseok) { MatDestroy(&OP); }
-<a name="line129">129: </a>  <font color="#4169E1">if</font> (denseok && eps->isgeneralized) { MatDestroy(&Bdense); }
-<a name="line130">130: </a>  <font color="#4169E1">return</font>(0);
-<a name="line131">131: </a>}
-
-<a name="line135">135: </a><strong><font color="#4169E1"><a name="EPSSolve_LAPACK"></a>PetscErrorCode EPSSolve_LAPACK(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line136">136: </a>{
-<a name="line138">138: </a>  PetscInt       n=eps->n,i,low,high;
-<a name="line139">139: </a>  PetscScalar    *array,*pX;
-<a name="line140">140: </a>  Vec            v;
-
-<a name="line143">143: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
-<a name="line144">144: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,NULL,NULL,NULL);
-
-<a name="line146">146: </a>  <font color="#B22222">/* right eigenvectors */</font>
-<a name="line147">147: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
-<a name="line148">148: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_X,&pX);
-<a name="line149">149: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) {
-<a name="line150">150: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&v);
-<a name="line151">151: </a>    VecGetOwnershipRange(v,&low,&high);
-<a name="line152">152: </a>    VecGetArray(v,&array);
-<a name="line153">153: </a>    PetscMemcpy(array,pX+i*n+low,(high-low)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line154">154: </a>    VecRestoreArray(v,&array);
-<a name="line155">155: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&v);
-<a name="line156">156: </a>  }
-<a name="line157">157: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_X,&pX);
-
-<a name="line159">159: </a>  eps->nconv  = eps->ncv;
-<a name="line160">160: </a>  eps->its    = 1;
-<a name="line161">161: </a>  eps->reason = EPS_CONVERGED_TOL;
-<a name="line162">162: </a>  <font color="#4169E1">return</font>(0);
-<a name="line163">163: </a>}
-
-<a name="line167">167: </a><strong><font color="#4169E1"><a name="EPSCreate_LAPACK"></a>PETSC_EXTERN PetscErrorCode EPSCreate_LAPACK(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line168">168: </a>{
-<a name="line170">170: </a>  eps->ops->solve                = EPSSolve_LAPACK;
-<a name="line171">171: </a>  eps->ops->setup                = EPSSetUp_LAPACK;
-<a name="line172">172: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
-<a name="line173">173: </a>  <font color="#4169E1">return</font>(0);
-<a name="line174">174: </a>}
+<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (eps->stopping!=<a href="../../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"User-defined stopping test not supported"</font>);
+<a name="line46"> 46: </a>  <font color="#4169E1">if</font> (eps->extraction) { PetscInfo(eps,<font color="#666666">"Warning: extraction type ignored\n"</font>); }
+<a name="line47"> 47: </a>  <a href="../../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(eps,0);
+
+<a name="line49"> 49: </a>  <font color="#B22222">/* attempt to get dense representations of A and B separately */</font>
+<a name="line50"> 50: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STSHIFT,&isshift);
+<a name="line51"> 51: </a>  <font color="#4169E1">if</font> (isshift) {
+<a name="line52"> 52: </a>    <a href="../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line53"> 53: </a>    <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line54"> 54: </a>    <font color="#4169E1">if</font> (nmat>1) { <a href="../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
+<a name="line55"> 55: </a>    PetscPushErrorHandler(PetscIgnoreErrorHandler,NULL);
+<a name="line56"> 56: </a>    ierra = <a href="../../../../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(A,&Adense);
+<a name="line57"> 57: </a>    <font color="#4169E1">if</font> (nmat>1) {
+<a name="line58"> 58: </a>      ierrb = <a href="../../../../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(B,&Bdense);
+<a name="line59"> 59: </a>    } <font color="#4169E1">else</font> {
+<a name="line60"> 60: </a>      ierrb = 0;
+<a name="line61"> 61: </a>    }
+<a name="line62"> 62: </a>    PetscPopErrorHandler();
+<a name="line63"> 63: </a>    denseok = PetscNot(ierra || ierrb);
+<a name="line64"> 64: </a>  }
+
+<a name="line66"> 66: </a>  <font color="#B22222">/* setup <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
+<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (denseok) {
+<a name="line68"> 68: </a>    <font color="#4169E1">if</font> (eps->isgeneralized) {
+<a name="line69"> 69: </a>      <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line70"> 70: </a>        <font color="#4169E1">if</font> (eps->ispositive) {
+<a name="line71"> 71: </a>          <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGHEP);
+<a name="line72"> 72: </a>        } <font color="#4169E1">else</font> {
+<a name="line73"> 73: </a>          <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP); <font color="#B22222">/* TODO: should be DSGHIEP */</font>
+<a name="line74"> 74: </a>        }
+<a name="line75"> 75: </a>      } <font color="#4169E1">else</font> {
+<a name="line76"> 76: </a>        <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSGNHEP);
+<a name="line77"> 77: </a>      }
+<a name="line78"> 78: </a>    } <font color="#4169E1">else</font> {
+<a name="line79"> 79: </a>      <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line80"> 80: </a>        <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSHEP);
+<a name="line81"> 81: </a>      } <font color="#4169E1">else</font> {
+<a name="line82"> 82: </a>        <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSNHEP);
+<a name="line83"> 83: </a>      }
+<a name="line84"> 84: </a>    }
+<a name="line85"> 85: </a>  } <font color="#4169E1">else</font> {
+<a name="line86"> 86: </a>    <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(eps->ds,DSNHEP);
+<a name="line87"> 87: </a>  }
+<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(eps->ds,eps->ncv);
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(eps->ds,&ld);
+<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->ncv,0,0,0);
+
+<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (denseok) {
+<a name="line93"> 93: </a>    <a href="../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&shift);
+<a name="line94"> 94: </a>    <font color="#4169E1">if</font> (shift != 0.0) {
+<a name="line95"> 95: </a>      MatShift(Adense,shift);
+<a name="line96"> 96: </a>    }
+<a name="line97"> 97: </a>    <font color="#B22222">/* use dummy pc and ksp to avoid problems when B is not positive definite */</font>
+<a name="line98"> 98: </a>    <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(eps->st,&ksp);
+<a name="line99"> 99: </a>    KSPSetType(ksp,KSPPREONLY);
+<a name="line100">100: </a>    KSPGetPC(ksp,&pc);
+<a name="line101">101: </a>    PCSetType(pc,PCNONE);
+<a name="line102">102: </a>  } <font color="#4169E1">else</font> {
+<a name="line103">103: </a>    PetscInfo(eps,<font color="#666666">"Using slow explicit operator\n"</font>);
+<a name="line104">104: </a>    <a href="../../../../docs/manualpages/ST/STComputeExplicitOperator.html#STComputeExplicitOperator">STComputeExplicitOperator</a>(eps->st,&OP);
+<a name="line105">105: </a>    MatDestroy(&Adense);
+<a name="line106">106: </a>    <a href="../../../../docs/manualpages/sys/SlepcMatConvertSeqDense.html#SlepcMatConvertSeqDense">SlepcMatConvertSeqDense</a>(OP,&Adense);
+<a name="line107">107: </a>  }
+
+<a name="line109">109: </a>  <font color="#B22222">/* fill <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> matrices */</font>
+<a name="line110">110: </a>  VecCreateSeqWithArray(PETSC_COMM_SELF,1,ld,NULL,&v);
+<a name="line111">111: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_A,&Ap);
+<a name="line112">112: </a>  <font color="#4169E1">for</font> (i=0;i<ld;i++) {
+<a name="line113">113: </a>    VecPlaceArray(v,Ap+i*ld);
+<a name="line114">114: </a>    MatGetColumnVector(Adense,v,i);
+<a name="line115">115: </a>    VecResetArray(v);
+<a name="line116">116: </a>  }
+<a name="line117">117: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_A,&Ap);
+<a name="line118">118: </a>  <font color="#4169E1">if</font> (denseok && eps->isgeneralized) {
+<a name="line119">119: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_B,&Bp);
+<a name="line120">120: </a>    <font color="#4169E1">for</font> (i=0;i<ld;i++) {
+<a name="line121">121: </a>      VecPlaceArray(v,Bp+i*ld);
+<a name="line122">122: </a>      MatGetColumnVector(Bdense,v,i);
+<a name="line123">123: </a>      VecResetArray(v);
+<a name="line124">124: </a>    }
+<a name="line125">125: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_B,&Bp);
+<a name="line126">126: </a>  }
+<a name="line127">127: </a>  VecDestroy(&v);
+<a name="line128">128: </a>  MatDestroy(&Adense);
+<a name="line129">129: </a>  <font color="#4169E1">if</font> (!denseok) { MatDestroy(&OP); }
+<a name="line130">130: </a>  <font color="#4169E1">if</font> (denseok && eps->isgeneralized) { MatDestroy(&Bdense); }
+<a name="line131">131: </a>  <font color="#4169E1">return</font>(0);
+<a name="line132">132: </a>}
+
+<a name="line136">136: </a><strong><font color="#4169E1"><a name="EPSSolve_LAPACK"></a>PetscErrorCode EPSSolve_LAPACK(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line137">137: </a>{
+<a name="line139">139: </a>  PetscInt       n=eps->n,i,low,high;
+<a name="line140">140: </a>  PetscScalar    *array,*pX;
+<a name="line141">141: </a>  Vec            v;
+
+<a name="line144">144: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(eps->ds,eps->eigr,eps->eigi);
+<a name="line145">145: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(eps->ds,eps->eigr,eps->eigi,NULL,NULL,NULL);
+
+<a name="line147">147: </a>  <font color="#B22222">/* right eigenvectors */</font>
+<a name="line148">148: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(eps->ds,DS_MAT_X,NULL,NULL);
+<a name="line149">149: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(eps->ds,DS_MAT_X,&pX);
+<a name="line150">150: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) {
+<a name="line151">151: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&v);
+<a name="line152">152: </a>    VecGetOwnershipRange(v,&low,&high);
+<a name="line153">153: </a>    VecGetArray(v,&array);
+<a name="line154">154: </a>    PetscMemcpy(array,pX+i*n+low,(high-low)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line155">155: </a>    VecRestoreArray(v,&array);
+<a name="line156">156: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&v);
+<a name="line157">157: </a>  }
+<a name="line158">158: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(eps->ds,DS_MAT_X,&pX);
+
+<a name="line160">160: </a>  eps->nconv  = eps->ncv;
+<a name="line161">161: </a>  eps->its    = 1;
+<a name="line162">162: </a>  eps->reason = EPS_CONVERGED_TOL;
+<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
+<a name="line164">164: </a>}
+
+<a name="line168">168: </a><strong><font color="#4169E1"><a name="EPSCreate_LAPACK"></a>PETSC_EXTERN PetscErrorCode EPSCreate_LAPACK(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line169">169: </a>{
+<a name="line171">171: </a>  eps->ops->solve                = EPSSolve_LAPACK;
+<a name="line172">172: </a>  eps->ops->setup                = EPSSetUp_LAPACK;
+<a name="line173">173: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
+<a name="line174">174: </a>  <font color="#4169E1">return</font>(0);
+<a name="line175">175: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/lapack/makefile b/src/eps/impls/lapack/makefile
index fac8166..ce811b2 100644
--- a/src/eps/impls/lapack/makefile
+++ b/src/eps/impls/lapack/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/lapack/makefile.html b/src/eps/impls/lapack/makefile.html
index d33773c..164430e 100644
--- a/src/eps/impls/lapack/makefile.html
+++ b/src/eps/impls/lapack/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/lapack/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:16+00:00">
+<meta name="date" content="2016-05-16T10:33:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/lapack/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/lapack/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/makefile b/src/eps/impls/makefile
index 44d5c7f..6009a16 100644
--- a/src/eps/impls/makefile
+++ b/src/eps/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/makefile.html b/src/eps/impls/makefile.html
index 8f194f7..9376339 100644
--- a/src/eps/impls/makefile.html
+++ b/src/eps/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:51+00:00">
+<meta name="date" content="2016-05-16T10:32:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/power/index.html b/src/eps/impls/power/index.html
index 900791a..1eba3ed 100644
--- a/src/eps/impls/power/index.html
+++ b/src/eps/impls/power/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/power/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/power/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/power/makefile b/src/eps/impls/power/makefile
index ea06ee2..b19b342 100644
--- a/src/eps/impls/power/makefile
+++ b/src/eps/impls/power/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/power/makefile.html b/src/eps/impls/power/makefile.html
index ed64236..255dfec 100644
--- a/src/eps/impls/power/makefile.html
+++ b/src/eps/impls/power/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/power/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:52+00:00">
+<meta name="date" content="2016-05-16T10:32:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/power/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/power/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/power/power.c b/src/eps/impls/power/power.c
index 98bd2d3..632fa26 100644
--- a/src/eps/impls/power/power.c
+++ b/src/eps/impls/power/power.c
@@ -20,7 +20,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -185,9 +185,7 @@ PetscErrorCode EPSSolve_Power(EPS eps)
         }
       }
     }
-
     eps->errest[eps->nconv] = relerr;
-    ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,eps->nconv+1);CHKERRQ(ierr);
 
     /* purge previously converged eigenvectors */
     ierr = BVInsertVec(eps->V,k,y);CHKERRQ(ierr);
@@ -197,16 +195,17 @@ PetscErrorCode EPSSolve_Power(EPS eps)
     /* if relerr<tol, accept eigenpair */
     if (relerr<eps->tol) {
       eps->nconv = eps->nconv + 1;
-      if (eps->nconv==eps->nev) eps->reason = EPS_CONVERGED_TOL;
-      else {
+      if (eps->nconv<eps->nev) {
         ierr = EPSGetStartVector(eps,eps->nconv,&breakdown);CHKERRQ(ierr);
         if (breakdown) {
           eps->reason = EPS_DIVERGED_BREAKDOWN;
           ierr = PetscInfo(eps,"Unable to generate more start vectors\n");CHKERRQ(ierr);
+          break;
         }
       }
     }
-    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
+    ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,eps->nconv+1);CHKERRQ(ierr);
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 #endif
@@ -228,7 +227,7 @@ PetscErrorCode EPSBackTransform_Power(EPS eps)
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions_Power"
-PetscErrorCode EPSSetFromOptions_Power(PetscOptions *PetscOptionsObject,EPS eps)
+PetscErrorCode EPSSetFromOptions_Power(PetscOptionItems *PetscOptionsObject,EPS eps)
 {
   PetscErrorCode    ierr;
   EPS_POWER         *power = (EPS_POWER*)eps->data;
@@ -344,7 +343,7 @@ PetscErrorCode EPSPowerGetShiftType(EPS eps,EPSPowerShiftType *shift)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidPointer(shift,2);
-  ierr = PetscTryMethod(eps,"EPSPowerGetShiftType_C",(EPS,EPSPowerShiftType*),(eps,shift));CHKERRQ(ierr);
+  ierr = PetscUseMethod(eps,"EPSPowerGetShiftType_C",(EPS,EPSPowerShiftType*),(eps,shift));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/impls/power/power.c.html b/src/eps/impls/power/power.c.html
index 61aaf4c..ffe503e 100644
--- a/src/eps/impls/power/power.c.html
+++ b/src/eps/impls/power/power.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/power/power.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:51+00:00">
+<meta name="date" content="2016-05-16T10:32:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/power/power.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/power/power.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "power"</font>
@@ -32,7 +32,7 @@
 
 <a name="line21"> 21: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line22"> 22: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line23"> 23: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line23"> 23: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line25"> 25: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -188,182 +188,181 @@
 <a name="line185">185: </a>        }
 <a name="line186">186: </a>      }
 <a name="line187">187: </a>    }
-
-<a name="line189">189: </a>    eps->errest[eps->nconv] = relerr;
-<a name="line190">190: </a>    EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,eps->nconv+1);
-
-<a name="line192">192: </a>    <font color="#B22222">/* purge previously converged eigenvectors */</font>
-<a name="line193">193: </a>    <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(eps->V,k,y);
-<a name="line194">194: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,k,NULL,&norm,NULL);
-<a name="line195">195: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,k,1.0/norm);
-
-<a name="line197">197: </a>    <font color="#B22222">/* if relerr<tol, accept eigenpair */</font>
-<a name="line198">198: </a>    <font color="#4169E1">if</font> (relerr<eps->tol) {
-<a name="line199">199: </a>      eps->nconv = eps->nconv + 1;
-<a name="line200">200: </a>      <font color="#4169E1">if</font> (eps->nconv==eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line201">201: </a>      <font color="#4169E1">else</font> {
-<a name="line202">202: </a>        EPSGetStartVector(eps,eps->nconv,&breakdown);
-<a name="line203">203: </a>        <font color="#4169E1">if</font> (breakdown) {
-<a name="line204">204: </a>          eps->reason = EPS_DIVERGED_BREAKDOWN;
-<a name="line205">205: </a>          PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
-<a name="line206">206: </a>        }
-<a name="line207">207: </a>      }
-<a name="line208">208: </a>    }
-<a name="line209">209: </a>    <font color="#4169E1">if</font> (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
-<a name="line210">210: </a>  }
-<a name="line211">211: </a>  <font color="#4169E1">return</font>(0);
-<a name="line212">212: </a><font color="#A020F0">#endif</font>
-<a name="line213">213: </a>}
-
-<a name="line217">217: </a><strong><font color="#4169E1"><a name="EPSBackTransform_Power"></a>PetscErrorCode EPSBackTransform_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line218">218: </a>{
-<a name="line220">220: </a>  EPS_POWER      *power = (EPS_POWER*)eps->data;
-
-<a name="line223">223: </a>  <font color="#4169E1">if</font> (power->shift_type == EPS_POWER_SHIFT_CONSTANT) {
-<a name="line224">224: </a>    EPSBackTransform_Default(eps);
-<a name="line225">225: </a>  }
-<a name="line226">226: </a>  <font color="#4169E1">return</font>(0);
-<a name="line227">227: </a>}
-
-<a name="line231">231: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_Power"></a>PetscErrorCode EPSSetFromOptions_Power(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line232">232: </a>{
-<a name="line233">233: </a>  PetscErrorCode    ierr;
-<a name="line234">234: </a>  EPS_POWER         *power = (EPS_POWER*)eps->data;
-<a name="line235">235: </a>  PetscBool         flg;
-<a name="line236">236: </a>  <a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> shift;
-
-<a name="line239">239: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Power Options"</font>);
-<a name="line240">240: </a>  PetscOptionsEnum(<font color="#666666">"-eps_power_shift_type"</font>,<font color="#666666">"Shift type"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>"</font>,EPSPowerShiftTypes,(PetscEnum)power->shift_type,(PetscEnum*)&shift,&flg);
-<a name="line241">241: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line242">242: </a>    <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(eps,shift);
-<a name="line243">243: </a>  }
-<a name="line244">244: </a>  <font color="#4169E1">if</font> (power->shift_type != EPS_POWER_SHIFT_CONSTANT) {
-<a name="line245">245: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSINVERT);
-<a name="line246">246: </a>  }
-<a name="line247">247: </a>  PetscOptionsTail();
-<a name="line248">248: </a>  <font color="#4169E1">return</font>(0);
-<a name="line249">249: </a>}
-
-<a name="line253">253: </a><strong><font color="#4169E1"><a name="EPSPowerSetShiftType_Power"></a>static PetscErrorCode EPSPowerSetShiftType_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> shift)</font></strong>
-<a name="line254">254: </a>{
-<a name="line255">255: </a>  EPS_POWER *power = (EPS_POWER*)eps->data;
-
-<a name="line258">258: </a>  <font color="#4169E1">switch</font> (shift) {
-<a name="line259">259: </a>    <font color="#4169E1">case</font> EPS_POWER_SHIFT_CONSTANT:
-<a name="line260">260: </a>    <font color="#4169E1">case</font> EPS_POWER_SHIFT_RAYLEIGH:
-<a name="line261">261: </a>    <font color="#4169E1">case</font> EPS_POWER_SHIFT_WILKINSON:
-<a name="line262">262: </a>      power->shift_type = shift;
-<a name="line263">263: </a>      <font color="#4169E1">break</font>;
-<a name="line264">264: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line265">265: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid shift type"</font>);
-<a name="line266">266: </a>  }
-<a name="line267">267: </a>  <font color="#4169E1">return</font>(0);
-<a name="line268">268: </a>}
-
-<a name="line272">272: </a><font color="#B22222">/*@</font>
-<a name="line273">273: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a> - Sets the type of shifts used during the power</font>
-<a name="line274">274: </a><font color="#B22222">   iteration. This can be used to emulate the Rayleigh Quotient Iteration</font>
-<a name="line275">275: </a><font color="#B22222">   (RQI) method.</font>
-
-<a name="line277">277: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line279">279: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line280">280: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line281">281: </a><font color="#B22222">-  shift - the type of shift</font>
-
-<a name="line283">283: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line284">284: </a><font color="#B22222">.  -eps_power_shift_type - Sets the shift type (either 'constant' or</font>
-<a name="line285">285: </a><font color="#B22222">                           'rayleigh' or 'wilkinson')</font>
-
-<a name="line287">287: </a><font color="#B22222">   Notes:</font>
-<a name="line288">288: </a><font color="#B22222">   By default, shifts are constant (EPS_POWER_SHIFT_CONSTANT) and the iteration</font>
-<a name="line289">289: </a><font color="#B22222">   is the simple power method (or inverse iteration if a shift-and-invert</font>
-<a name="line290">290: </a><font color="#B22222">   transformation is being used).</font>
-
-<a name="line292">292: </a><font color="#B22222">   A variable shift can be specified (EPS_POWER_SHIFT_RAYLEIGH or</font>
-<a name="line293">293: </a><font color="#B22222">   EPS_POWER_SHIFT_WILKINSON). In this case, the iteration behaves rather like</font>
-<a name="line294">294: </a><font color="#B22222">   a cubic converging method as RQI. See the users manual for details.</font>
-
-<a name="line296">296: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line298">298: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>(), <a href="../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(), <a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a></font>
-<a name="line299">299: </a><font color="#B22222">@*/</font>
-<a name="line300">300: </a><strong><font color="#4169E1"><a name="EPSPowerSetShiftType"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> shift)</font></strong>
-<a name="line301">301: </a>{
-
-<a name="line307">307: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPowerSetShiftType_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>),(eps,shift));
-<a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
-<a name="line309">309: </a>}
-
-<a name="line313">313: </a><strong><font color="#4169E1"><a name="EPSPowerGetShiftType_Power"></a>static PetscErrorCode EPSPowerGetShiftType_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> *shift)</font></strong>
-<a name="line314">314: </a>{
-<a name="line315">315: </a>  EPS_POWER  *power = (EPS_POWER*)eps->data;
-
-<a name="line318">318: </a>  *shift = power->shift_type;
-<a name="line319">319: </a>  <font color="#4169E1">return</font>(0);
-<a name="line320">320: </a>}
-
-<a name="line324">324: </a><font color="#B22222">/*@</font>
-<a name="line325">325: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a> - Gets the type of shifts used during the power</font>
-<a name="line326">326: </a><font color="#B22222">   iteration.</font>
-
-<a name="line328">328: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line330">330: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line331">331: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
-
-<a name="line333">333: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line334">334: </a><font color="#B22222">.  shift - the type of shift</font>
-
-<a name="line336">336: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line338">338: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(), <a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a></font>
-<a name="line339">339: </a><font color="#B22222">@*/</font>
-<a name="line340">340: </a><strong><font color="#4169E1"><a name="EPSPowerGetShiftType"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> *shift)</font></strong>
-<a name="line341">341: </a>{
-
-<a name="line347">347: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPowerGetShiftType_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>*),(eps,shift));
-<a name="line348">348: </a>  <font color="#4169E1">return</font>(0);
-<a name="line349">349: </a>}
-
-<a name="line353">353: </a><strong><font color="#4169E1"><a name="EPSDestroy_Power"></a>PetscErrorCode EPSDestroy_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line354">354: </a>{
-
-<a name="line358">358: </a>  PetscFree(eps->data);
-<a name="line359">359: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerSetShiftType_C"</font>,NULL);
-<a name="line360">360: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerGetShiftType_C"</font>,NULL);
-<a name="line361">361: </a>  <font color="#4169E1">return</font>(0);
-<a name="line362">362: </a>}
-
-<a name="line366">366: </a><strong><font color="#4169E1"><a name="EPSView_Power"></a>PetscErrorCode EPSView_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line367">367: </a>{
-<a name="line369">369: </a>  EPS_POWER      *power = (EPS_POWER*)eps->data;
-<a name="line370">370: </a>  PetscBool      isascii;
-
-<a name="line373">373: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line374">374: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line375">375: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Power: %s shifts\n"</font>,EPSPowerShiftTypes[power->shift_type]);
-<a name="line376">376: </a>  }
-<a name="line377">377: </a>  <font color="#4169E1">return</font>(0);
-<a name="line378">378: </a>}
-
-<a name="line382">382: </a><strong><font color="#4169E1"><a name="EPSCreate_Power"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line383">383: </a>{
-<a name="line384">384: </a>  EPS_POWER      *ctx;
-
-<a name="line388">388: </a>  PetscNewLog(eps,&ctx);
-<a name="line389">389: </a>  eps->data = (void*)ctx;
-
-<a name="line391">391: </a>  eps->ops->setup                = EPSSetUp_Power;
-<a name="line392">392: </a>  eps->ops->solve                = EPSSolve_Power;
-<a name="line393">393: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_Power;
-<a name="line394">394: </a>  eps->ops->destroy              = EPSDestroy_Power;
-<a name="line395">395: </a>  eps->ops->view                 = EPSView_Power;
-<a name="line396">396: </a>  eps->ops->backtransform        = EPSBackTransform_Power;
-<a name="line397">397: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerSetShiftType_C"</font>,EPSPowerSetShiftType_Power);
-<a name="line398">398: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerGetShiftType_C"</font>,EPSPowerGetShiftType_Power);
-<a name="line399">399: </a>  <font color="#4169E1">return</font>(0);
-<a name="line400">400: </a>}
+<a name="line188">188: </a>    eps->errest[eps->nconv] = relerr;
+
+<a name="line190">190: </a>    <font color="#B22222">/* purge previously converged eigenvectors */</font>
+<a name="line191">191: </a>    <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(eps->V,k,y);
+<a name="line192">192: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,k,NULL,&norm,NULL);
+<a name="line193">193: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,k,1.0/norm);
+
+<a name="line195">195: </a>    <font color="#B22222">/* if relerr<tol, accept eigenpair */</font>
+<a name="line196">196: </a>    <font color="#4169E1">if</font> (relerr<eps->tol) {
+<a name="line197">197: </a>      eps->nconv = eps->nconv + 1;
+<a name="line198">198: </a>      <font color="#4169E1">if</font> (eps->nconv<eps->nev) {
+<a name="line199">199: </a>        EPSGetStartVector(eps,eps->nconv,&breakdown);
+<a name="line200">200: </a>        <font color="#4169E1">if</font> (breakdown) {
+<a name="line201">201: </a>          eps->reason = EPS_DIVERGED_BREAKDOWN;
+<a name="line202">202: </a>          PetscInfo(eps,<font color="#666666">"Unable to generate more start vectors\n"</font>);
+<a name="line203">203: </a>          <font color="#4169E1">break</font>;
+<a name="line204">204: </a>        }
+<a name="line205">205: </a>      }
+<a name="line206">206: </a>    }
+<a name="line207">207: </a>    EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,eps->nconv+1);
+<a name="line208">208: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line209">209: </a>  }
+<a name="line210">210: </a>  <font color="#4169E1">return</font>(0);
+<a name="line211">211: </a><font color="#A020F0">#endif</font>
+<a name="line212">212: </a>}
+
+<a name="line216">216: </a><strong><font color="#4169E1"><a name="EPSBackTransform_Power"></a>PetscErrorCode EPSBackTransform_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line217">217: </a>{
+<a name="line219">219: </a>  EPS_POWER      *power = (EPS_POWER*)eps->data;
+
+<a name="line222">222: </a>  <font color="#4169E1">if</font> (power->shift_type == EPS_POWER_SHIFT_CONSTANT) {
+<a name="line223">223: </a>    EPSBackTransform_Default(eps);
+<a name="line224">224: </a>  }
+<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
+<a name="line226">226: </a>}
+
+<a name="line230">230: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions_Power"></a>PetscErrorCode EPSSetFromOptions_Power(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line231">231: </a>{
+<a name="line232">232: </a>  PetscErrorCode    ierr;
+<a name="line233">233: </a>  EPS_POWER         *power = (EPS_POWER*)eps->data;
+<a name="line234">234: </a>  PetscBool         flg;
+<a name="line235">235: </a>  <a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> shift;
+
+<a name="line238">238: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Power Options"</font>);
+<a name="line239">239: </a>  PetscOptionsEnum(<font color="#666666">"-eps_power_shift_type"</font>,<font color="#666666">"Shift type"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>"</font>,EPSPowerShiftTypes,(PetscEnum)power->shift_type,(PetscEnum*)&shift,&flg);
+<a name="line240">240: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line241">241: </a>    <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(eps,shift);
+<a name="line242">242: </a>  }
+<a name="line243">243: </a>  <font color="#4169E1">if</font> (power->shift_type != EPS_POWER_SHIFT_CONSTANT) {
+<a name="line244">244: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(eps->st,STSINVERT);
+<a name="line245">245: </a>  }
+<a name="line246">246: </a>  PetscOptionsTail();
+<a name="line247">247: </a>  <font color="#4169E1">return</font>(0);
+<a name="line248">248: </a>}
+
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="EPSPowerSetShiftType_Power"></a>static PetscErrorCode EPSPowerSetShiftType_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> shift)</font></strong>
+<a name="line253">253: </a>{
+<a name="line254">254: </a>  EPS_POWER *power = (EPS_POWER*)eps->data;
+
+<a name="line257">257: </a>  <font color="#4169E1">switch</font> (shift) {
+<a name="line258">258: </a>    <font color="#4169E1">case</font> EPS_POWER_SHIFT_CONSTANT:
+<a name="line259">259: </a>    <font color="#4169E1">case</font> EPS_POWER_SHIFT_RAYLEIGH:
+<a name="line260">260: </a>    <font color="#4169E1">case</font> EPS_POWER_SHIFT_WILKINSON:
+<a name="line261">261: </a>      power->shift_type = shift;
+<a name="line262">262: </a>      <font color="#4169E1">break</font>;
+<a name="line263">263: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line264">264: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid shift type"</font>);
+<a name="line265">265: </a>  }
+<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
+<a name="line267">267: </a>}
+
+<a name="line271">271: </a><font color="#B22222">/*@</font>
+<a name="line272">272: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a> - Sets the type of shifts used during the power</font>
+<a name="line273">273: </a><font color="#B22222">   iteration. This can be used to emulate the Rayleigh Quotient Iteration</font>
+<a name="line274">274: </a><font color="#B22222">   (RQI) method.</font>
+
+<a name="line276">276: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line278">278: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line279">279: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line280">280: </a><font color="#B22222">-  shift - the type of shift</font>
+
+<a name="line282">282: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line283">283: </a><font color="#B22222">.  -eps_power_shift_type - Sets the shift type (either 'constant' or</font>
+<a name="line284">284: </a><font color="#B22222">                           'rayleigh' or 'wilkinson')</font>
+
+<a name="line286">286: </a><font color="#B22222">   Notes:</font>
+<a name="line287">287: </a><font color="#B22222">   By default, shifts are constant (EPS_POWER_SHIFT_CONSTANT) and the iteration</font>
+<a name="line288">288: </a><font color="#B22222">   is the simple power method (or inverse iteration if a shift-and-invert</font>
+<a name="line289">289: </a><font color="#B22222">   transformation is being used).</font>
+
+<a name="line291">291: </a><font color="#B22222">   A variable shift can be specified (EPS_POWER_SHIFT_RAYLEIGH or</font>
+<a name="line292">292: </a><font color="#B22222">   EPS_POWER_SHIFT_WILKINSON). In this case, the iteration behaves rather like</font>
+<a name="line293">293: </a><font color="#B22222">   a cubic converging method as RQI. See the users manual for details.</font>
+
+<a name="line295">295: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line297">297: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>(), <a href="../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(), <a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a></font>
+<a name="line298">298: </a><font color="#B22222">@*/</font>
+<a name="line299">299: </a><strong><font color="#4169E1"><a name="EPSPowerSetShiftType"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> shift)</font></strong>
+<a name="line300">300: </a>{
+
+<a name="line306">306: </a>  PetscTryMethod(eps,<font color="#666666">"EPSPowerSetShiftType_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>),(eps,shift));
+<a name="line307">307: </a>  <font color="#4169E1">return</font>(0);
+<a name="line308">308: </a>}
+
+<a name="line312">312: </a><strong><font color="#4169E1"><a name="EPSPowerGetShiftType_Power"></a>static PetscErrorCode EPSPowerGetShiftType_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> *shift)</font></strong>
+<a name="line313">313: </a>{
+<a name="line314">314: </a>  EPS_POWER  *power = (EPS_POWER*)eps->data;
+
+<a name="line317">317: </a>  *shift = power->shift_type;
+<a name="line318">318: </a>  <font color="#4169E1">return</font>(0);
+<a name="line319">319: </a>}
+
+<a name="line323">323: </a><font color="#B22222">/*@</font>
+<a name="line324">324: </a><font color="#B22222">   <a href="../../../../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a> - Gets the type of shifts used during the power</font>
+<a name="line325">325: </a><font color="#B22222">   iteration.</font>
+
+<a name="line327">327: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line329">329: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line330">330: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line332">332: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line333">333: </a><font color="#B22222">.  shift - the type of shift</font>
+
+<a name="line335">335: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line337">337: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/EPS/EPSPowerSetShiftType.html#EPSPowerSetShiftType">EPSPowerSetShiftType</a>(), <a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a></font>
+<a name="line338">338: </a><font color="#B22222">@*/</font>
+<a name="line339">339: </a><strong><font color="#4169E1"><a name="EPSPowerGetShiftType"></a>PetscErrorCode <a href="../../../../docs/manualpages/EPS/EPSPowerGetShiftType.html#EPSPowerGetShiftType">EPSPowerGetShiftType</a>(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a> *shift)</font></strong>
+<a name="line340">340: </a>{
+
+<a name="line346">346: </a>  PetscUseMethod(eps,<font color="#666666">"EPSPowerGetShiftType_C"</font>,(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,<a href="../../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>*),(eps,shift));
+<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
+<a name="line348">348: </a>}
+
+<a name="line352">352: </a><strong><font color="#4169E1"><a name="EPSDestroy_Power"></a>PetscErrorCode EPSDestroy_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line353">353: </a>{
+
+<a name="line357">357: </a>  PetscFree(eps->data);
+<a name="line358">358: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerSetShiftType_C"</font>,NULL);
+<a name="line359">359: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerGetShiftType_C"</font>,NULL);
+<a name="line360">360: </a>  <font color="#4169E1">return</font>(0);
+<a name="line361">361: </a>}
+
+<a name="line365">365: </a><strong><font color="#4169E1"><a name="EPSView_Power"></a>PetscErrorCode EPSView_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line366">366: </a>{
+<a name="line368">368: </a>  EPS_POWER      *power = (EPS_POWER*)eps->data;
+<a name="line369">369: </a>  PetscBool      isascii;
+
+<a name="line372">372: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line373">373: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line374">374: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Power: %s shifts\n"</font>,EPSPowerShiftTypes[power->shift_type]);
+<a name="line375">375: </a>  }
+<a name="line376">376: </a>  <font color="#4169E1">return</font>(0);
+<a name="line377">377: </a>}
+
+<a name="line381">381: </a><strong><font color="#4169E1"><a name="EPSCreate_Power"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Power(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line382">382: </a>{
+<a name="line383">383: </a>  EPS_POWER      *ctx;
+
+<a name="line387">387: </a>  PetscNewLog(eps,&ctx);
+<a name="line388">388: </a>  eps->data = (void*)ctx;
+
+<a name="line390">390: </a>  eps->ops->setup                = EPSSetUp_Power;
+<a name="line391">391: </a>  eps->ops->solve                = EPSSolve_Power;
+<a name="line392">392: </a>  eps->ops->setfromoptions       = EPSSetFromOptions_Power;
+<a name="line393">393: </a>  eps->ops->destroy              = EPSDestroy_Power;
+<a name="line394">394: </a>  eps->ops->view                 = EPSView_Power;
+<a name="line395">395: </a>  eps->ops->backtransform        = EPSBackTransform_Power;
+<a name="line396">396: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerSetShiftType_C"</font>,EPSPowerSetShiftType_Power);
+<a name="line397">397: </a>  PetscObjectComposeFunction((PetscObject)eps,<font color="#666666">"EPSPowerGetShiftType_C"</font>,EPSPowerGetShiftType_Power);
+<a name="line398">398: </a>  <font color="#4169E1">return</font>(0);
+<a name="line399">399: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/impls/subspace/index.html b/src/eps/impls/subspace/index.html
index 86afbbd..70404ab 100644
--- a/src/eps/impls/subspace/index.html
+++ b/src/eps/impls/subspace/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/subspace/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/subspace/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/impls/subspace/makefile b/src/eps/impls/subspace/makefile
index e719ea4..88b48be 100644
--- a/src/eps/impls/subspace/makefile
+++ b/src/eps/impls/subspace/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/impls/subspace/makefile.html b/src/eps/impls/subspace/makefile.html
index b7810c7..d701731 100644
--- a/src/eps/impls/subspace/makefile.html
+++ b/src/eps/impls/subspace/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/subspace/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:52+00:00">
+<meta name="date" content="2016-05-16T10:32:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/subspace/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/subspace/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/impls/subspace/subspace.c b/src/eps/impls/subspace/subspace.c
index 1a1377e..5569c7e 100644
--- a/src/eps/impls/subspace/subspace.c
+++ b/src/eps/impls/subspace/subspace.c
@@ -16,7 +16,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -190,7 +190,7 @@ PetscErrorCode EPSSolve_Subspace(EPS eps)
   /* Complete the initial basis with random vectors and orthonormalize them */
   k = eps->nini;
   while (k<ncv) {
-    ierr = BVSetRandomColumn(eps->V,k,eps->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(eps->V,k);CHKERRQ(ierr);
     ierr = BVOrthogonalizeColumn(eps->V,k,NULL,&norm,&breakdown);CHKERRQ(ierr);
     if (norm>0.0 && !breakdown) {
       ierr = BVScaleColumn(eps->V,k,1.0/norm);CHKERRQ(ierr);
@@ -198,7 +198,7 @@ PetscErrorCode EPSSolve_Subspace(EPS eps)
     }
   }
 
-  while (eps->its<eps->max_it) {
+  while (eps->reason == EPS_CONVERGED_ITERATING) {
     eps->its++;
     nv = PetscMin(eps->nconv+eps->mpd,ncv);
     ierr = DSSetDimensions(eps->ds,nv,0,eps->nconv,0);CHKERRQ(ierr);
@@ -257,7 +257,8 @@ PetscErrorCode EPSSolve_Subspace(EPS eps)
     }
 
     ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,nv);CHKERRQ(ierr);
-    if (eps->nconv>=eps->nev) break;
+    ierr = (*eps->stopping)(eps,eps->its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);CHKERRQ(ierr);
+    if (eps->reason != EPS_CONVERGED_ITERATING) break;
 
     /* Compute nxtsrr (iteration of next projection step) */
     nxtsrr = PetscMin(eps->max_it,PetscMax((PetscInt)PetscFloorReal(stpfac*its),init));
@@ -300,7 +301,7 @@ PetscErrorCode EPSSolve_Subspace(EPS eps)
       for (i=eps->nconv;i<nv;i++) {
         ierr = BVOrthogonalizeColumn(eps->V,i,NULL,&norm,&breakdown);CHKERRQ(ierr);
         if (breakdown) {
-          ierr = BVSetRandomColumn(eps->V,i,eps->rand);CHKERRQ(ierr);
+          ierr = BVSetRandomColumn(eps->V,i);CHKERRQ(ierr);
           ierr = BVOrthogonalizeColumn(eps->V,i,NULL,&norm,&breakdown);CHKERRQ(ierr);
         }
         ierr = BVScaleColumn(eps->V,i,1/norm);CHKERRQ(ierr);
@@ -310,9 +311,6 @@ PetscErrorCode EPSSolve_Subspace(EPS eps)
   }
 
   ierr = PetscFree3(rsd,itrsd,itrsdold);CHKERRQ(ierr);
-
-  if (eps->nconv == eps->nev) eps->reason = EPS_CONVERGED_TOL;
-  else eps->reason = EPS_DIVERGED_ITS;
   ierr = BVDestroy(&AV);CHKERRQ(ierr);
   /* truncate Schur decomposition and change the state to raw so that
      DSVectors() computes eigenvectors from scratch */
diff --git a/src/eps/impls/subspace/subspace.c.html b/src/eps/impls/subspace/subspace.c.html
index f11955d..ce11f18 100644
--- a/src/eps/impls/subspace/subspace.c.html
+++ b/src/eps/impls/subspace/subspace.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/impls/subspace/subspace.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:52+00:00">
+<meta name="date" content="2016-05-16T10:32:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/impls/subspace/subspace.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/impls/subspace/subspace.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "subspace"</font>
@@ -28,7 +28,7 @@
 
 <a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -187,7 +187,7 @@
 <a name="line190">190: </a>  <font color="#B22222">/* Complete the initial basis with random vectors and orthonormalize them */</font>
 <a name="line191">191: </a>  k = eps->nini;
 <a name="line192">192: </a>  <font color="#4169E1">while</font> (k<ncv) {
-<a name="line193">193: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,k,eps->rand);
+<a name="line193">193: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,k);
 <a name="line194">194: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,k,NULL,&norm,&breakdown);
 <a name="line195">195: </a>    <font color="#4169E1">if</font> (norm>0.0 && !breakdown) {
 <a name="line196">196: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,k,1.0/norm);
@@ -195,7 +195,7 @@
 <a name="line198">198: </a>    }
 <a name="line199">199: </a>  }
 
-<a name="line201">201: </a>  <font color="#4169E1">while</font> (eps->its<eps->max_it) {
+<a name="line201">201: </a>  <font color="#4169E1">while</font> (eps->reason == EPS_CONVERGED_ITERATING) {
 <a name="line202">202: </a>    eps->its++;
 <a name="line203">203: </a>    nv = PetscMin(eps->nconv+eps->mpd,ncv);
 <a name="line204">204: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,nv,0,eps->nconv,0);
@@ -254,86 +254,84 @@
 <a name="line257">257: </a>    }
 
 <a name="line259">259: </a>    EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,nv);
-<a name="line260">260: </a>    <font color="#4169E1">if</font> (eps->nconv>=eps->nev) <font color="#4169E1">break</font>;
-
-<a name="line262">262: </a>    <font color="#B22222">/* Compute nxtsrr (iteration of next projection step) */</font>
-<a name="line263">263: </a>    nxtsrr = PetscMin(eps->max_it,PetscMax((PetscInt)PetscFloorReal(stpfac*its),init));
-
-<a name="line265">265: </a>    <font color="#4169E1">if</font> (ngrp!=nogrp || ngrp==0 || arsd>=oarsd) {
-<a name="line266">266: </a>      idsrr = nxtsrr - its;
-<a name="line267">267: </a>    } <font color="#4169E1">else</font> {
-<a name="line268">268: </a>      idsrr = (PetscInt)PetscFloorReal(alpha+beta*(itrsdold[eps->nconv]-itrsd[eps->nconv])*PetscLogReal(arsd/eps->tol)/PetscLogReal(arsd/oarsd));
-<a name="line269">269: </a>      idsrr = PetscMax(1,idsrr);
-<a name="line270">270: </a>    }
-<a name="line271">271: </a>    nxtsrr = PetscMin(nxtsrr,its+idsrr);
-
-<a name="line273">273: </a>    <font color="#B22222">/* Compute nxtort (iteration of next orthogonalization step) */</font>
-<a name="line274">274: </a>    <a href="../../../../docs/manualpages/DS/DSCond.html#DSCond">DSCond</a>(eps->ds,&tcond);
-<a name="line275">275: </a>    idort = PetscMax(1,(PetscInt)PetscFloorReal(orttol/PetscMax(1,PetscLog10Real(tcond))));
-<a name="line276">276: </a>    nxtort = PetscMin(its+idort,nxtsrr);
-
-<a name="line278">278: </a>    <font color="#B22222">/* V(:,idx) = AV(:,idx) */</font>
-<a name="line279">279: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,nv);
-<a name="line280">280: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AV,eps->nconv,nv);
-<a name="line281">281: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(AV,eps->V);
-<a name="line282">282: </a>    its++;
-
-<a name="line284">284: </a>    <font color="#B22222">/* Orthogonalization loop */</font>
-<a name="line285">285: </a>    <font color="#4169E1">do</font> {
-<a name="line286">286: </a>      <font color="#4169E1">while</font> (its<nxtort) {
-
-<a name="line288">288: </a>        <font color="#B22222">/* A(:,idx) = OP*V(:,idx) with normalization */</font>
-<a name="line289">289: </a>        <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line290">290: </a>          <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&v);
-<a name="line291">291: </a>          <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,v,w);
-<a name="line292">292: </a>          VecCopy(w,v);
-<a name="line293">293: </a>          <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&v);
-<a name="line294">294: </a>          <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(eps->V,i,NORM_INFINITY,&norm);
-<a name="line295">295: </a>          <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1/norm);
-<a name="line296">296: </a>        }
-<a name="line297">297: </a>        its++;
-<a name="line298">298: </a>      }
-<a name="line299">299: </a>      <font color="#B22222">/* Orthonormalize vectors */</font>
-<a name="line300">300: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
-<a name="line301">301: </a>        <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&breakdown);
-<a name="line302">302: </a>        <font color="#4169E1">if</font> (breakdown) {
-<a name="line303">303: </a>          <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,i,eps->rand);
-<a name="line304">304: </a>          <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&breakdown);
-<a name="line305">305: </a>        }
-<a name="line306">306: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1/norm);
-<a name="line307">307: </a>      }
-<a name="line308">308: </a>      nxtort = PetscMin(its+idort,nxtsrr);
-<a name="line309">309: </a>    } <font color="#4169E1">while</font> (its<nxtsrr);
-<a name="line310">310: </a>  }
-
-<a name="line312">312: </a>  PetscFree3(rsd,itrsd,itrsdold);
-
-<a name="line314">314: </a>  <font color="#4169E1">if</font> (eps->nconv == eps->nev) eps->reason = EPS_CONVERGED_TOL;
-<a name="line315">315: </a>  <font color="#4169E1">else</font> eps->reason = EPS_DIVERGED_ITS;
-<a name="line316">316: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&AV);
-<a name="line317">317: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
-<a name="line318">318: </a><font color="#B22222">     <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
-<a name="line319">319: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
-<a name="line320">320: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
-<a name="line321">321: </a>  <font color="#4169E1">return</font>(0);
-<a name="line322">322: </a>}
-
-<a name="line326">326: </a><strong><font color="#4169E1"><a name="EPSDestroy_Subspace"></a>PetscErrorCode EPSDestroy_Subspace(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line327">327: </a>{
-
-<a name="line331">331: </a>  PetscFree(eps->data);
-<a name="line332">332: </a>  <font color="#4169E1">return</font>(0);
-<a name="line333">333: </a>}
-
-<a name="line337">337: </a><strong><font color="#4169E1"><a name="EPSCreate_Subspace"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Subspace(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line338">338: </a>{
-<a name="line340">340: </a>  eps->ops->setup                = EPSSetUp_Subspace;
-<a name="line341">341: </a>  eps->ops->solve                = EPSSolve_Subspace;
-<a name="line342">342: </a>  eps->ops->destroy              = EPSDestroy_Subspace;
-<a name="line343">343: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
-<a name="line344">344: </a>  eps->ops->computevectors       = EPSComputeVectors_Schur;
-<a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
-<a name="line346">346: </a>}
+<a name="line260">260: </a>    (*eps->stopping)(eps,eps->its,eps->max_it,eps->nconv,eps->nev,&eps->reason,eps->stoppingctx);
+<a name="line261">261: </a>    <font color="#4169E1">if</font> (eps->reason != EPS_CONVERGED_ITERATING) <font color="#4169E1">break</font>;
+
+<a name="line263">263: </a>    <font color="#B22222">/* Compute nxtsrr (iteration of next projection step) */</font>
+<a name="line264">264: </a>    nxtsrr = PetscMin(eps->max_it,PetscMax((PetscInt)PetscFloorReal(stpfac*its),init));
+
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (ngrp!=nogrp || ngrp==0 || arsd>=oarsd) {
+<a name="line267">267: </a>      idsrr = nxtsrr - its;
+<a name="line268">268: </a>    } <font color="#4169E1">else</font> {
+<a name="line269">269: </a>      idsrr = (PetscInt)PetscFloorReal(alpha+beta*(itrsdold[eps->nconv]-itrsd[eps->nconv])*PetscLogReal(arsd/eps->tol)/PetscLogReal(arsd/oarsd));
+<a name="line270">270: </a>      idsrr = PetscMax(1,idsrr);
+<a name="line271">271: </a>    }
+<a name="line272">272: </a>    nxtsrr = PetscMin(nxtsrr,its+idsrr);
+
+<a name="line274">274: </a>    <font color="#B22222">/* Compute nxtort (iteration of next orthogonalization step) */</font>
+<a name="line275">275: </a>    <a href="../../../../docs/manualpages/DS/DSCond.html#DSCond">DSCond</a>(eps->ds,&tcond);
+<a name="line276">276: </a>    idort = PetscMax(1,(PetscInt)PetscFloorReal(orttol/PetscMax(1,PetscLog10Real(tcond))));
+<a name="line277">277: </a>    nxtort = PetscMin(its+idort,nxtsrr);
+
+<a name="line279">279: </a>    <font color="#B22222">/* V(:,idx) = AV(:,idx) */</font>
+<a name="line280">280: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(eps->V,eps->nconv,nv);
+<a name="line281">281: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(AV,eps->nconv,nv);
+<a name="line282">282: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(AV,eps->V);
+<a name="line283">283: </a>    its++;
+
+<a name="line285">285: </a>    <font color="#B22222">/* Orthogonalization loop */</font>
+<a name="line286">286: </a>    <font color="#4169E1">do</font> {
+<a name="line287">287: </a>      <font color="#4169E1">while</font> (its<nxtort) {
+
+<a name="line289">289: </a>        <font color="#B22222">/* A(:,idx) = OP*V(:,idx) with normalization */</font>
+<a name="line290">290: </a>        <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line291">291: </a>          <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&v);
+<a name="line292">292: </a>          <a href="../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,v,w);
+<a name="line293">293: </a>          VecCopy(w,v);
+<a name="line294">294: </a>          <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&v);
+<a name="line295">295: </a>          <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(eps->V,i,NORM_INFINITY,&norm);
+<a name="line296">296: </a>          <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1/norm);
+<a name="line297">297: </a>        }
+<a name="line298">298: </a>        its++;
+<a name="line299">299: </a>      }
+<a name="line300">300: </a>      <font color="#B22222">/* Orthonormalize vectors */</font>
+<a name="line301">301: </a>      <font color="#4169E1">for</font> (i=eps->nconv;i<nv;i++) {
+<a name="line302">302: </a>        <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&breakdown);
+<a name="line303">303: </a>        <font color="#4169E1">if</font> (breakdown) {
+<a name="line304">304: </a>          <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,i);
+<a name="line305">305: </a>          <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&breakdown);
+<a name="line306">306: </a>        }
+<a name="line307">307: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1/norm);
+<a name="line308">308: </a>      }
+<a name="line309">309: </a>      nxtort = PetscMin(its+idort,nxtsrr);
+<a name="line310">310: </a>    } <font color="#4169E1">while</font> (its<nxtsrr);
+<a name="line311">311: </a>  }
+
+<a name="line313">313: </a>  PetscFree3(rsd,itrsd,itrsdold);
+<a name="line314">314: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&AV);
+<a name="line315">315: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
+<a name="line316">316: </a><font color="#B22222">     <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line317">317: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(eps->ds,eps->nconv,0,0,0);
+<a name="line318">318: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(eps->ds,DS_STATE_RAW);
+<a name="line319">319: </a>  <font color="#4169E1">return</font>(0);
+<a name="line320">320: </a>}
+
+<a name="line324">324: </a><strong><font color="#4169E1"><a name="EPSDestroy_Subspace"></a>PetscErrorCode EPSDestroy_Subspace(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line325">325: </a>{
+
+<a name="line329">329: </a>  PetscFree(eps->data);
+<a name="line330">330: </a>  <font color="#4169E1">return</font>(0);
+<a name="line331">331: </a>}
+
+<a name="line335">335: </a><strong><font color="#4169E1"><a name="EPSCreate_Subspace"></a>PETSC_EXTERN PetscErrorCode EPSCreate_Subspace(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line336">336: </a>{
+<a name="line338">338: </a>  eps->ops->setup                = EPSSetUp_Subspace;
+<a name="line339">339: </a>  eps->ops->solve                = EPSSolve_Subspace;
+<a name="line340">340: </a>  eps->ops->destroy              = EPSDestroy_Subspace;
+<a name="line341">341: </a>  eps->ops->backtransform        = EPSBackTransform_Default;
+<a name="line342">342: </a>  eps->ops->computevectors       = EPSComputeVectors_Schur;
+<a name="line343">343: </a>  <font color="#4169E1">return</font>(0);
+<a name="line344">344: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/index.html b/src/eps/index.html
index 8e1d5e5..6af8e7a 100644
--- a/src/eps/index.html
+++ b/src/eps/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/interface/dlregiseps.c b/src/eps/interface/dlregiseps.c
index 9f999bf..c452150 100644
--- a/src/eps/interface/dlregiseps.c
+++ b/src/eps/interface/dlregiseps.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -28,8 +28,10 @@ const char *EPSErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","EPSErrorType","
 const char *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",0};
 const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",0};
 const char *EPSPRIMMEMethods[] = {"DYNAMIC","DEFAULT_MIN_TIME","DEFAULT_MIN_MATVECS","ARNOLDI","GD","GD_PLUSK","GD_OLSEN_PLUSK","JD_OLSEN_PLUSK","RQI","JDQR","JDQMR","JDQMR_ETOL","SUBSPACE_ITERATION","LOBPCG_ORTHOBASIS","LOBPCG_ORTHOBASISW","EPSPRIMMEMethod","EPS_PRIMME_",0};
-const char *const EPSConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","EPSConvergedReason","EPS_",0};
-const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 5;
+const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",0};
+const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",0};
+const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",0};
+const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSFinalizePackage"
@@ -81,7 +83,7 @@ PetscErrorCode EPSInitializePackage()
   ierr = PetscLogEventRegister("EPSSetUp",EPS_CLASSID,&EPS_SetUp);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("EPSSolve",EPS_CLASSID,&EPS_Solve);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"eps",&className);CHKERRQ(ierr);
     if (className) {
@@ -89,7 +91,7 @@ PetscErrorCode EPSInitializePackage()
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"eps",&className);CHKERRQ(ierr);
     if (className) {
diff --git a/src/eps/interface/dlregiseps.c.html b/src/eps/interface/dlregiseps.c.html
index 6d351b8..d95f62a 100644
--- a/src/eps/interface/dlregiseps.c.html
+++ b/src/eps/interface/dlregiseps.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/dlregiseps.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:51+00:00">
+<meta name="date" content="2016-05-16T10:32:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/dlregiseps.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/dlregiseps.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -40,86 +40,88 @@
 <a name="line28"> 28: </a>const char *EPSPowerShiftTypes[] = {<font color="#666666">"CONSTANT"</font>,<font color="#666666">"RAYLEIGH"</font>,<font color="#666666">"WILKINSON"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSPowerShiftType.html#EPSPowerShiftType">EPSPowerShiftType</a>"</font>,<font color="#666666">"EPS_POWER_SHIFT_"</font>,0};
 <a name="line29"> 29: </a>const char *EPSLanczosReorthogTypes[] = {<font color="#666666">"LOCAL"</font>,<font color="#666666">"FULL"</font>,<font color="#666666">"SELECTIVE"</font>,<font color="#666666">"PERIODIC"</font>,<font color="#666666">"PARTIAL"</font>,<font color="#666666">"DELAYED"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSLanczosReorthogType.html#EPSLanczosReorthogType">EPSLanczosReorthogType</a>"</font>,<font color="#666666">"EPS_LANCZOS_REORTHOG_ [...]
 <a name="line30"> 30: </a>const char *EPSPRIMMEMethods[] = {<font color="#666666">"DYNAMIC"</font>,<font color="#666666">"DEFAULT_MIN_TIME"</font>,<font color="#666666">"DEFAULT_MIN_MATVECS"</font>,<font color="#666666">"ARNOLDI"</font>,<font color="#666666">"GD"</font>,<font color="#666666">"GD_PLUSK"</font>,<font color="#666666">"GD_OLSEN_PLUSK"</font>,<font color="#666666">"JD_OLSEN_PLUSK"</font>,<font color="#666666">"RQI"</font>,<font color="#666666">"JDQR"</font>,<font color="#6666 [...]
-<a name="line31"> 31: </a>const char *const EPSConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_SYMMETRY_LOST"</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">""</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSConvergedR [...]
-<a name="line32"> 32: </a>const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 5;
-
-<a name="line36"> 36: </a><font color="#B22222">/*@C</font>
-<a name="line37"> 37: </a><font color="#B22222">  <a href="../../../docs/manualpages/EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</a> - This function destroys everything in the SLEPc interface</font>
-<a name="line38"> 38: </a><font color="#B22222">  to the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> package. It is called from <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
-
-<a name="line40"> 40: </a><font color="#B22222">  Level: developer</font>
-
-<a name="line42"> 42: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
-<a name="line43"> 43: </a><font color="#B22222">@*/</font>
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="EPSFinalizePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</a>(void)</font></strong>
-<a name="line45"> 45: </a>{
-
-<a name="line49"> 49: </a>  PetscFunctionListDestroy(&EPSList);
-<a name="line50"> 50: </a>  EPSPackageInitialized = PETSC_FALSE;
-<a name="line51"> 51: </a>  EPSRegisterAllCalled  = PETSC_FALSE;
-<a name="line52"> 52: </a>  <font color="#4169E1">return</font>(0);
-<a name="line53"> 53: </a>}
-
-<a name="line57"> 57: </a><font color="#B22222">/*@C</font>
-<a name="line58"> 58: </a><font color="#B22222">  <a href="../../../docs/manualpages/EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</a> - This function initializes everything in the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> package.</font>
-<a name="line59"> 59: </a><font color="#B22222">  It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
-<a name="line60"> 60: </a><font color="#B22222">  on the first call to <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>() when using static libraries.</font>
-
-<a name="line62"> 62: </a><font color="#B22222">  Level: developer</font>
-
-<a name="line64"> 64: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
-<a name="line65"> 65: </a><font color="#B22222">@*/</font>
-<a name="line66"> 66: </a><strong><font color="#4169E1"><a name="EPSInitializePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</a>()</font></strong>
-<a name="line67"> 67: </a>{
-<a name="line68"> 68: </a>  char           logList[256];
-<a name="line69"> 69: </a>  char           *className;
-<a name="line70"> 70: </a>  PetscBool      opt;
-
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (EPSPackageInitialized) <font color="#4169E1">return</font>(0);
-<a name="line75"> 75: </a>  EPSPackageInitialized = PETSC_TRUE;
-<a name="line76"> 76: </a>  <font color="#B22222">/* Register Classes */</font>
-<a name="line77"> 77: </a>  PetscClassIdRegister(<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Solver"</font>,&EPS_CLASSID);
-<a name="line78"> 78: </a>  <font color="#B22222">/* Register Constructors */</font>
-<a name="line79"> 79: </a>  <a href="../../../docs/manualpages/EPS/EPSRegisterAll.html#EPSRegisterAll">EPSRegisterAll</a>();
-<a name="line80"> 80: </a>  <font color="#B22222">/* Register Events */</font>
-<a name="line81"> 81: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>"</font>,EPS_CLASSID,&EPS_SetUp);
-<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>"</font>,EPS_CLASSID,&EPS_Solve);
-<a name="line83"> 83: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line84"> 84: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line86"> 86: </a>    PetscStrstr(logList,<font color="#666666">"eps"</font>,&className);
-<a name="line87"> 87: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line88"> 88: </a>      PetscInfoDeactivateClass(EPS_CLASSID);
-<a name="line89"> 89: </a>    }
-<a name="line90"> 90: </a>  }
-<a name="line91"> 91: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line92"> 92: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
-<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line94"> 94: </a>    PetscStrstr(logList,<font color="#666666">"eps"</font>,&className);
-<a name="line95"> 95: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line96"> 96: </a>      PetscLogEventDeactivateClass(EPS_CLASSID);
-<a name="line97"> 97: </a>    }
-<a name="line98"> 98: </a>  }
-<a name="line99"> 99: </a>  PetscRegisterFinalize(<a href="../../../docs/manualpages/EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</a>);
-<a name="line100">100: </a>  <font color="#4169E1">return</font>(0);
-<a name="line101">101: </a>}
-
-<a name="line103">103: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
-
-<a name="line107">107: </a><font color="#B22222">/*</font>
-<a name="line108">108: </a><font color="#B22222">  PetscDLLibraryRegister - This function is called when the dynamic library</font>
-<a name="line109">109: </a><font color="#B22222">  it is in is opened.</font>
-
-<a name="line111">111: </a><font color="#B22222">  This one registers all the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> methods that are in the basic SLEPc libslepceps</font>
-<a name="line112">112: </a><font color="#B22222">  library.</font>
-<a name="line113">113: </a><font color="#B22222"> */</font>
-<a name="line114">114: </a><strong><font color="#4169E1"><a name="PetscDLLibraryRegister_slepceps"></a>PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()</font></strong>
-<a name="line115">115: </a>{
-
-<a name="line119">119: </a>  <a href="../../../docs/manualpages/EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</a>();
-<a name="line120">120: </a>  <font color="#4169E1">return</font>(0);
-<a name="line121">121: </a>}
-<a name="line122">122: </a><font color="#A020F0">#endif </font><font color="#B22222">/* PETSC_HAVE_DYNAMIC_LIBRARIES */</font><font color="#A020F0"></font>
+<a name="line31"> 31: </a>const char *EPSCISSQuadRules[] = {<font color="#666666">"(not set yet)"</font>,<font color="#666666">"TRAPEZOIDAL"</font>,<font color="#666666">"CHEBYSHEV"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSCISSQuadRule.html#EPSCISSQuadRule">EPSCISSQuadRule</a>"</font>,<font color="#666666">"EPS_CISS_QUADRULE_"</font>,0};
+<a name="line32"> 32: </a>const char *EPSCISSExtractions[] = {<font color="#666666">"RITZ"</font>,<font color="#666666">"HANKEL"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSCISSExtraction.html#EPSCISSExtraction">EPSCISSExtraction</a>"</font>,<font color="#666666">"EPS_CISS_EXTRACTION_"</font>,0};
+<a name="line33"> 33: </a>const char *const EPSConvergedReasons_Shifted[] = {<font color="#666666">""</font>,<font color="#666666">"DIVERGED_SYMMETRY_LOST"</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"CONVERGED_USER"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConv [...]
+<a name="line34"> 34: </a>const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;
+
+<a name="line38"> 38: </a><font color="#B22222">/*@C</font>
+<a name="line39"> 39: </a><font color="#B22222">  <a href="../../../docs/manualpages/EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</a> - This function destroys everything in the SLEPc interface</font>
+<a name="line40"> 40: </a><font color="#B22222">  to the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> package. It is called from <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
+
+<a name="line42"> 42: </a><font color="#B22222">  Level: developer</font>
+
+<a name="line44"> 44: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
+<a name="line45"> 45: </a><font color="#B22222">@*/</font>
+<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="EPSFinalizePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</a>(void)</font></strong>
+<a name="line47"> 47: </a>{
+
+<a name="line51"> 51: </a>  PetscFunctionListDestroy(&EPSList);
+<a name="line52"> 52: </a>  EPSPackageInitialized = PETSC_FALSE;
+<a name="line53"> 53: </a>  EPSRegisterAllCalled  = PETSC_FALSE;
+<a name="line54"> 54: </a>  <font color="#4169E1">return</font>(0);
+<a name="line55"> 55: </a>}
+
+<a name="line59"> 59: </a><font color="#B22222">/*@C</font>
+<a name="line60"> 60: </a><font color="#B22222">  <a href="../../../docs/manualpages/EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</a> - This function initializes everything in the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> package.</font>
+<a name="line61"> 61: </a><font color="#B22222">  It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
+<a name="line62"> 62: </a><font color="#B22222">  on the first call to <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>() when using static libraries.</font>
+
+<a name="line64"> 64: </a><font color="#B22222">  Level: developer</font>
+
+<a name="line66"> 66: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
+<a name="line67"> 67: </a><font color="#B22222">@*/</font>
+<a name="line68"> 68: </a><strong><font color="#4169E1"><a name="EPSInitializePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</a>()</font></strong>
+<a name="line69"> 69: </a>{
+<a name="line70"> 70: </a>  char           logList[256];
+<a name="line71"> 71: </a>  char           *className;
+<a name="line72"> 72: </a>  PetscBool      opt;
+
+<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (EPSPackageInitialized) <font color="#4169E1">return</font>(0);
+<a name="line77"> 77: </a>  EPSPackageInitialized = PETSC_TRUE;
+<a name="line78"> 78: </a>  <font color="#B22222">/* Register Classes */</font>
+<a name="line79"> 79: </a>  PetscClassIdRegister(<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> Solver"</font>,&EPS_CLASSID);
+<a name="line80"> 80: </a>  <font color="#B22222">/* Register Constructors */</font>
+<a name="line81"> 81: </a>  <a href="../../../docs/manualpages/EPS/EPSRegisterAll.html#EPSRegisterAll">EPSRegisterAll</a>();
+<a name="line82"> 82: </a>  <font color="#B22222">/* Register Events */</font>
+<a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>"</font>,EPS_CLASSID,&EPS_SetUp);
+<a name="line84"> 84: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>"</font>,EPS_CLASSID,&EPS_Solve);
+<a name="line85"> 85: </a>  <font color="#B22222">/* Process info exclusions */</font>
+<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line88"> 88: </a>    PetscStrstr(logList,<font color="#666666">"eps"</font>,&className);
+<a name="line89"> 89: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line90"> 90: </a>      PetscInfoDeactivateClass(EPS_CLASSID);
+<a name="line91"> 91: </a>    }
+<a name="line92"> 92: </a>  }
+<a name="line93"> 93: </a>  <font color="#B22222">/* Process summary exclusions */</font>
+<a name="line94"> 94: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line96"> 96: </a>    PetscStrstr(logList,<font color="#666666">"eps"</font>,&className);
+<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line98"> 98: </a>      PetscLogEventDeactivateClass(EPS_CLASSID);
+<a name="line99"> 99: </a>    }
+<a name="line100">100: </a>  }
+<a name="line101">101: </a>  PetscRegisterFinalize(<a href="../../../docs/manualpages/EPS/EPSFinalizePackage.html#EPSFinalizePackage">EPSFinalizePackage</a>);
+<a name="line102">102: </a>  <font color="#4169E1">return</font>(0);
+<a name="line103">103: </a>}
+
+<a name="line105">105: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
+
+<a name="line109">109: </a><font color="#B22222">/*</font>
+<a name="line110">110: </a><font color="#B22222">  PetscDLLibraryRegister - This function is called when the dynamic library</font>
+<a name="line111">111: </a><font color="#B22222">  it is in is opened.</font>
+
+<a name="line113">113: </a><font color="#B22222">  This one registers all the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> methods that are in the basic SLEPc libslepceps</font>
+<a name="line114">114: </a><font color="#B22222">  library.</font>
+<a name="line115">115: </a><font color="#B22222"> */</font>
+<a name="line116">116: </a><strong><font color="#4169E1"><a name="PetscDLLibraryRegister_slepceps"></a>PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()</font></strong>
+<a name="line117">117: </a>{
+
+<a name="line121">121: </a>  <a href="../../../docs/manualpages/EPS/EPSInitializePackage.html#EPSInitializePackage">EPSInitializePackage</a>();
+<a name="line122">122: </a>  <font color="#4169E1">return</font>(0);
+<a name="line123">123: </a>}
+<a name="line124">124: </a><font color="#A020F0">#endif </font><font color="#B22222">/* PETSC_HAVE_DYNAMIC_LIBRARIES */</font><font color="#A020F0"></font>
 
 </pre>
 </body>
diff --git a/src/eps/interface/epsbasic.c b/src/eps/interface/epsbasic.c
index e6d7322..3086422 100644
--- a/src/eps/interface/epsbasic.c
+++ b/src/eps/interface/epsbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -67,7 +67,8 @@ PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)
   eps->nds             = 0;
   eps->target          = 0.0;
   eps->tol             = PETSC_DEFAULT;
-  eps->conv            = EPS_CONV_EIG;
+  eps->conv            = EPS_CONV_REL;
+  eps->stop            = EPS_STOP_BASIC;
   eps->which           = (EPSWhich)0;
   eps->inta            = 0.0;
   eps->intb            = 0.0;
@@ -80,10 +81,13 @@ PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)
   eps->trackall        = PETSC_FALSE;
   eps->purify          = PETSC_TRUE;
 
-  eps->converged       = EPSConvergedEigRelative;
+  eps->converged       = EPSConvergedRelative;
   eps->convergeddestroy= NULL;
+  eps->stopping        = EPSStoppingBasic;
+  eps->stoppingdestroy = NULL;
   eps->arbitrary       = NULL;
   eps->convergedctx    = NULL;
+  eps->stoppingctx     = NULL;
   eps->arbitraryctx    = NULL;
   eps->numbermonitors  = 0;
 
@@ -91,7 +95,6 @@ PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)
   eps->ds              = NULL;
   eps->V               = NULL;
   eps->rg              = NULL;
-  eps->rand            = NULL;
   eps->D               = NULL;
   eps->IS              = NULL;
   eps->defl            = NULL;
@@ -117,9 +120,6 @@ PetscErrorCode EPSCreate(MPI_Comm comm,EPS *outeps)
   eps->reason          = EPS_CONVERGED_ITERATING;
 
   ierr = PetscNewLog(eps,&eps->sc);CHKERRQ(ierr);
-  ierr = PetscRandomCreate(comm,&eps->rand);CHKERRQ(ierr);
-  ierr = PetscRandomSetSeed(eps->rand,0x12345678);CHKERRQ(ierr);
-  ierr = PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->rand);CHKERRQ(ierr);
   *outeps = eps;
   PetscFunctionReturn(0);
 }
@@ -307,7 +307,6 @@ PetscErrorCode EPSDestroy(EPS *eps)
   ierr = STDestroy(&(*eps)->st);CHKERRQ(ierr);
   ierr = RGDestroy(&(*eps)->rg);CHKERRQ(ierr);
   ierr = DSDestroy(&(*eps)->ds);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&(*eps)->rand);CHKERRQ(ierr);
   ierr = PetscFree((*eps)->sc);CHKERRQ(ierr);
   /* just in case the initial vectors have not been used */
   ierr = SlepcBasisDestroy_Private(&(*eps)->nds,&(*eps)->defl);CHKERRQ(ierr);
diff --git a/src/eps/interface/epsbasic.c.html b/src/eps/interface/epsbasic.c.html
index 39100d0..fcea5cf 100644
--- a/src/eps/interface/epsbasic.c.html
+++ b/src/eps/interface/epsbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epsbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:42+00:00">
+<meta name="date" content="2016-05-16T10:32:37+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epsbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epsbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The basic <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> routines, Create, Destroy, etc. are here.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -74,59 +74,59 @@
 <a name="line67"> 67: </a>  eps->nds             = 0;
 <a name="line68"> 68: </a>  eps->target          = 0.0;
 <a name="line69"> 69: </a>  eps->tol             = PETSC_DEFAULT;
-<a name="line70"> 70: </a>  eps->conv            = EPS_CONV_EIG;
-<a name="line71"> 71: </a>  eps->which           = (<a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>)0;
-<a name="line72"> 72: </a>  eps->inta            = 0.0;
-<a name="line73"> 73: </a>  eps->intb            = 0.0;
-<a name="line74"> 74: </a>  eps->problem_type    = (<a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>)0;
-<a name="line75"> 75: </a>  eps->extraction      = EPS_RITZ;
-<a name="line76"> 76: </a>  eps->balance         = EPS_BALANCE_NONE;
-<a name="line77"> 77: </a>  eps->balance_its     = 5;
-<a name="line78"> 78: </a>  eps->balance_cutoff  = 1e-8;
-<a name="line79"> 79: </a>  eps->trueres         = PETSC_FALSE;
-<a name="line80"> 80: </a>  eps->trackall        = PETSC_FALSE;
-<a name="line81"> 81: </a>  eps->purify          = PETSC_TRUE;
-
-<a name="line83"> 83: </a>  eps->converged       = EPSConvergedEigRelative;
-<a name="line84"> 84: </a>  eps->convergeddestroy= NULL;
-<a name="line85"> 85: </a>  eps->arbitrary       = NULL;
-<a name="line86"> 86: </a>  eps->convergedctx    = NULL;
-<a name="line87"> 87: </a>  eps->arbitraryctx    = NULL;
-<a name="line88"> 88: </a>  eps->numbermonitors  = 0;
-
-<a name="line90"> 90: </a>  eps->st              = NULL;
-<a name="line91"> 91: </a>  eps->ds              = NULL;
-<a name="line92"> 92: </a>  eps->V               = NULL;
-<a name="line93"> 93: </a>  eps->rg              = NULL;
-<a name="line94"> 94: </a>  eps->rand            = NULL;
-<a name="line95"> 95: </a>  eps->D               = NULL;
-<a name="line96"> 96: </a>  eps->IS              = NULL;
-<a name="line97"> 97: </a>  eps->defl            = NULL;
-<a name="line98"> 98: </a>  eps->eigr            = NULL;
-<a name="line99"> 99: </a>  eps->eigi            = NULL;
-<a name="line100">100: </a>  eps->errest          = NULL;
-<a name="line101">101: </a>  eps->rr              = NULL;
-<a name="line102">102: </a>  eps->ri              = NULL;
-<a name="line103">103: </a>  eps->perm            = NULL;
-<a name="line104">104: </a>  eps->nwork           = 0;
-<a name="line105">105: </a>  eps->work            = NULL;
-<a name="line106">106: </a>  eps->data            = NULL;
-
-<a name="line108">108: </a>  eps->state           = EPS_STATE_INITIAL;
-<a name="line109">109: </a>  eps->nconv           = 0;
-<a name="line110">110: </a>  eps->its             = 0;
-<a name="line111">111: </a>  eps->nloc            = 0;
-<a name="line112">112: </a>  eps->nrma            = 0.0;
-<a name="line113">113: </a>  eps->nrmb            = 0.0;
-<a name="line114">114: </a>  eps->isgeneralized   = PETSC_FALSE;
-<a name="line115">115: </a>  eps->ispositive      = PETSC_FALSE;
-<a name="line116">116: </a>  eps->ishermitian     = PETSC_FALSE;
-<a name="line117">117: </a>  eps->reason          = EPS_CONVERGED_ITERATING;
-
-<a name="line119">119: </a>  PetscNewLog(eps,&eps->sc);
-<a name="line120">120: </a>  PetscRandomCreate(comm,&eps->rand);
-<a name="line121">121: </a>  PetscRandomSetSeed(eps->rand,0x12345678);
-<a name="line122">122: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->rand);
+<a name="line70"> 70: </a>  eps->conv            = EPS_CONV_REL;
+<a name="line71"> 71: </a>  eps->stop            = EPS_STOP_BASIC;
+<a name="line72"> 72: </a>  eps->which           = (<a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a>)0;
+<a name="line73"> 73: </a>  eps->inta            = 0.0;
+<a name="line74"> 74: </a>  eps->intb            = 0.0;
+<a name="line75"> 75: </a>  eps->problem_type    = (<a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a>)0;
+<a name="line76"> 76: </a>  eps->extraction      = EPS_RITZ;
+<a name="line77"> 77: </a>  eps->balance         = EPS_BALANCE_NONE;
+<a name="line78"> 78: </a>  eps->balance_its     = 5;
+<a name="line79"> 79: </a>  eps->balance_cutoff  = 1e-8;
+<a name="line80"> 80: </a>  eps->trueres         = PETSC_FALSE;
+<a name="line81"> 81: </a>  eps->trackall        = PETSC_FALSE;
+<a name="line82"> 82: </a>  eps->purify          = PETSC_TRUE;
+
+<a name="line84"> 84: </a>  eps->converged       = EPSConvergedRelative;
+<a name="line85"> 85: </a>  eps->convergeddestroy= NULL;
+<a name="line86"> 86: </a>  eps->stopping        = <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>;
+<a name="line87"> 87: </a>  eps->stoppingdestroy = NULL;
+<a name="line88"> 88: </a>  eps->arbitrary       = NULL;
+<a name="line89"> 89: </a>  eps->convergedctx    = NULL;
+<a name="line90"> 90: </a>  eps->stoppingctx     = NULL;
+<a name="line91"> 91: </a>  eps->arbitraryctx    = NULL;
+<a name="line92"> 92: </a>  eps->numbermonitors  = 0;
+
+<a name="line94"> 94: </a>  eps->st              = NULL;
+<a name="line95"> 95: </a>  eps->ds              = NULL;
+<a name="line96"> 96: </a>  eps->V               = NULL;
+<a name="line97"> 97: </a>  eps->rg              = NULL;
+<a name="line98"> 98: </a>  eps->D               = NULL;
+<a name="line99"> 99: </a>  eps->IS              = NULL;
+<a name="line100">100: </a>  eps->defl            = NULL;
+<a name="line101">101: </a>  eps->eigr            = NULL;
+<a name="line102">102: </a>  eps->eigi            = NULL;
+<a name="line103">103: </a>  eps->errest          = NULL;
+<a name="line104">104: </a>  eps->rr              = NULL;
+<a name="line105">105: </a>  eps->ri              = NULL;
+<a name="line106">106: </a>  eps->perm            = NULL;
+<a name="line107">107: </a>  eps->nwork           = 0;
+<a name="line108">108: </a>  eps->work            = NULL;
+<a name="line109">109: </a>  eps->data            = NULL;
+
+<a name="line111">111: </a>  eps->state           = EPS_STATE_INITIAL;
+<a name="line112">112: </a>  eps->nconv           = 0;
+<a name="line113">113: </a>  eps->its             = 0;
+<a name="line114">114: </a>  eps->nloc            = 0;
+<a name="line115">115: </a>  eps->nrma            = 0.0;
+<a name="line116">116: </a>  eps->nrmb            = 0.0;
+<a name="line117">117: </a>  eps->isgeneralized   = PETSC_FALSE;
+<a name="line118">118: </a>  eps->ispositive      = PETSC_FALSE;
+<a name="line119">119: </a>  eps->ishermitian     = PETSC_FALSE;
+<a name="line120">120: </a>  eps->reason          = EPS_CONVERGED_ITERATING;
+
+<a name="line122">122: </a>  PetscNewLog(eps,&eps->sc);
 <a name="line123">123: </a>  *outeps = eps;
 <a name="line124">124: </a>  <font color="#4169E1">return</font>(0);
 <a name="line125">125: </a>}
@@ -290,417 +290,416 @@
 <a name="line307">307: </a>  <a href="../../../docs/manualpages/ST/STDestroy.html#STDestroy">STDestroy</a>(&(*eps)->st);
 <a name="line308">308: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&(*eps)->rg);
 <a name="line309">309: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&(*eps)->ds);
-<a name="line310">310: </a>  PetscRandomDestroy(&(*eps)->rand);
-<a name="line311">311: </a>  PetscFree((*eps)->sc);
-<a name="line312">312: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
-<a name="line313">313: </a>  SlepcBasisDestroy_Private(&(*eps)->nds,&(*eps)->defl);
-<a name="line314">314: </a>  SlepcBasisDestroy_Private(&(*eps)->nini,&(*eps)->IS);
-<a name="line315">315: </a>  <font color="#4169E1">if</font> ((*eps)->convergeddestroy) {
-<a name="line316">316: </a>    (*(*eps)->convergeddestroy)((*eps)->convergedctx);
-<a name="line317">317: </a>  }
-<a name="line318">318: </a>  <a href="../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(*eps);
-<a name="line319">319: </a>  PetscHeaderDestroy(eps);
-<a name="line320">320: </a>  <font color="#4169E1">return</font>(0);
-<a name="line321">321: </a>}
-
-<a name="line325">325: </a><font color="#B22222">/*@</font>
-<a name="line326">326: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a> - Sets the value of the target.</font>
-
-<a name="line328">328: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line330">330: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line331">331: </a><font color="#B22222">+  eps    - eigensolver context</font>
-<a name="line332">332: </a><font color="#B22222">-  target - the value of the target</font>
+<a name="line310">310: </a>  PetscFree((*eps)->sc);
+<a name="line311">311: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
+<a name="line312">312: </a>  SlepcBasisDestroy_Private(&(*eps)->nds,&(*eps)->defl);
+<a name="line313">313: </a>  SlepcBasisDestroy_Private(&(*eps)->nini,&(*eps)->IS);
+<a name="line314">314: </a>  <font color="#4169E1">if</font> ((*eps)->convergeddestroy) {
+<a name="line315">315: </a>    (*(*eps)->convergeddestroy)((*eps)->convergedctx);
+<a name="line316">316: </a>  }
+<a name="line317">317: </a>  <a href="../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(*eps);
+<a name="line318">318: </a>  PetscHeaderDestroy(eps);
+<a name="line319">319: </a>  <font color="#4169E1">return</font>(0);
+<a name="line320">320: </a>}
+
+<a name="line324">324: </a><font color="#B22222">/*@</font>
+<a name="line325">325: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a> - Sets the value of the target.</font>
 
-<a name="line334">334: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line335">335: </a><font color="#B22222">.  -eps_target <scalar> - the value of the target</font>
+<a name="line327">327: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line329">329: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line330">330: </a><font color="#B22222">+  eps    - eigensolver context</font>
+<a name="line331">331: </a><font color="#B22222">-  target - the value of the target</font>
 
-<a name="line337">337: </a><font color="#B22222">   Notes:</font>
-<a name="line338">338: </a><font color="#B22222">   The target is a scalar value used to determine the portion of the spectrum</font>
-<a name="line339">339: </a><font color="#B22222">   of interest. It is used in combination with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
-
-<a name="line341">341: </a><font color="#B22222">   In the case of complex scalars, a complex value can be provided in the</font>
-<a name="line342">342: </a><font color="#B22222">   command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
-<a name="line343">343: </a><font color="#B22222">   -eps_target 1.0+2.0i</font>
-
-<a name="line345">345: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line347">347: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()</font>
-<a name="line348">348: </a><font color="#B22222">@*/</font>
-<a name="line349">349: </a><strong><font color="#4169E1"><a name="EPSSetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar target)</font></strong>
-<a name="line350">350: </a>{
-
-<a name="line356">356: </a>  eps->target = target;
-<a name="line357">357: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
-<a name="line358">358: </a>  <a href="../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(eps->st,target);
-<a name="line359">359: </a>  <font color="#4169E1">return</font>(0);
-<a name="line360">360: </a>}
+<a name="line333">333: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line334">334: </a><font color="#B22222">.  -eps_target <scalar> - the value of the target</font>
 
-<a name="line364">364: </a><font color="#B22222">/*@</font>
-<a name="line365">365: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a> - Gets the value of the target.</font>
+<a name="line336">336: </a><font color="#B22222">   Notes:</font>
+<a name="line337">337: </a><font color="#B22222">   The target is a scalar value used to determine the portion of the spectrum</font>
+<a name="line338">338: </a><font color="#B22222">   of interest. It is used in combination with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
+
+<a name="line340">340: </a><font color="#B22222">   In the case of complex scalars, a complex value can be provided in the</font>
+<a name="line341">341: </a><font color="#B22222">   command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
+<a name="line342">342: </a><font color="#B22222">   -eps_target 1.0+2.0i</font>
+
+<a name="line344">344: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line346">346: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()</font>
+<a name="line347">347: </a><font color="#B22222">@*/</font>
+<a name="line348">348: </a><strong><font color="#4169E1"><a name="EPSSetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar target)</font></strong>
+<a name="line349">349: </a>{
 
-<a name="line367">367: </a><font color="#B22222">   Not Collective</font>
+<a name="line355">355: </a>  eps->target = target;
+<a name="line356">356: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
+<a name="line357">357: </a>  <a href="../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(eps->st,target);
+<a name="line358">358: </a>  <font color="#4169E1">return</font>(0);
+<a name="line359">359: </a>}
 
-<a name="line369">369: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line370">370: </a><font color="#B22222">.  eps - eigensolver context</font>
+<a name="line363">363: </a><font color="#B22222">/*@</font>
+<a name="line364">364: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a> - Gets the value of the target.</font>
 
-<a name="line372">372: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line373">373: </a><font color="#B22222">.  target - the value of the target</font>
-
-<a name="line375">375: </a><font color="#B22222">   Note:</font>
-<a name="line376">376: </a><font color="#B22222">   If the target was not set by the user, then zero is returned.</font>
-
-<a name="line378">378: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line380">380: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>()</font>
-<a name="line381">381: </a><font color="#B22222">@*/</font>
-<a name="line382">382: </a><strong><font color="#4169E1"><a name="EPSGetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar* target)</font></strong>
-<a name="line383">383: </a>{
-<a name="line387">387: </a>  *target = eps->target;
-<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
-<a name="line389">389: </a>}
+<a name="line366">366: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line393">393: </a><font color="#B22222">/*@</font>
-<a name="line394">394: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a> - Defines the computational interval for spectrum slicing.</font>
+<a name="line368">368: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line369">369: </a><font color="#B22222">.  eps - eigensolver context</font>
 
-<a name="line396">396: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line371">371: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line372">372: </a><font color="#B22222">.  target - the value of the target</font>
+
+<a name="line374">374: </a><font color="#B22222">   Note:</font>
+<a name="line375">375: </a><font color="#B22222">   If the target was not set by the user, then zero is returned.</font>
 
-<a name="line398">398: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line399">399: </a><font color="#B22222">+  eps  - eigensolver context</font>
-<a name="line400">400: </a><font color="#B22222">.  inta - left end of the interval</font>
-<a name="line401">401: </a><font color="#B22222">-  intb - right end of the interval</font>
+<a name="line377">377: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line379">379: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>()</font>
+<a name="line380">380: </a><font color="#B22222">@*/</font>
+<a name="line381">381: </a><strong><font color="#4169E1"><a name="EPSGetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar* target)</font></strong>
+<a name="line382">382: </a>{
+<a name="line386">386: </a>  *target = eps->target;
+<a name="line387">387: </a>  <font color="#4169E1">return</font>(0);
+<a name="line388">388: </a>}
 
-<a name="line403">403: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line404">404: </a><font color="#B22222">.  -eps_interval <a,b> - set [a,b] as the interval of interest</font>
+<a name="line392">392: </a><font color="#B22222">/*@</font>
+<a name="line393">393: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a> - Defines the computational interval for spectrum slicing.</font>
 
-<a name="line406">406: </a><font color="#B22222">   Notes:</font>
-<a name="line407">407: </a><font color="#B22222">   Spectrum slicing is a technique employed for computing all eigenvalues of</font>
-<a name="line408">408: </a><font color="#B22222">   symmetric eigenproblems in a given interval. This function provides the</font>
-<a name="line409">409: </a><font color="#B22222">   interval to be considered. It must be used in combination with EPS_ALL, see</font>
-<a name="line410">410: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
-
-<a name="line412">412: </a><font color="#B22222">   In the command-line option, two values must be provided. For an open interval,</font>
-<a name="line413">413: </a><font color="#B22222">   one can give an infinite, e.g., -eps_interval 1.0,inf or -eps_interval -inf,1.0.</font>
-<a name="line414">414: </a><font color="#B22222">   An open interval in the programmatic interface can be specified with</font>
-<a name="line415">415: </a><font color="#B22222">   PETSC_MAX_REAL and -PETSC_MAX_REAL.</font>
+<a name="line395">395: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line417">417: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line397">397: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line398">398: </a><font color="#B22222">+  eps  - eigensolver context</font>
+<a name="line399">399: </a><font color="#B22222">.  inta - left end of the interval</font>
+<a name="line400">400: </a><font color="#B22222">-  intb - right end of the interval</font>
 
-<a name="line419">419: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()</font>
-<a name="line420">420: </a><font color="#B22222">@*/</font>
-<a name="line421">421: </a><strong><font color="#4169E1"><a name="EPSSetInterval"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal inta,PetscReal intb)</font></strong>
-<a name="line422">422: </a>{
-<a name="line427">427: </a>  <font color="#4169E1">if</font> (inta>=intb) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Badly defined interval, must be inta<intb"</font>);
-<a name="line428">428: </a>  eps->inta = inta;
-<a name="line429">429: </a>  eps->intb = intb;
-<a name="line430">430: </a>  eps->state = EPS_STATE_INITIAL;
-<a name="line431">431: </a>  <font color="#4169E1">return</font>(0);
-<a name="line432">432: </a>}
+<a name="line402">402: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line403">403: </a><font color="#B22222">.  -eps_interval <a,b> - set [a,b] as the interval of interest</font>
 
-<a name="line436">436: </a><font color="#B22222">/*@</font>
-<a name="line437">437: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a> - Gets the computational interval for spectrum slicing.</font>
+<a name="line405">405: </a><font color="#B22222">   Notes:</font>
+<a name="line406">406: </a><font color="#B22222">   Spectrum slicing is a technique employed for computing all eigenvalues of</font>
+<a name="line407">407: </a><font color="#B22222">   symmetric eigenproblems in a given interval. This function provides the</font>
+<a name="line408">408: </a><font color="#B22222">   interval to be considered. It must be used in combination with EPS_ALL, see</font>
+<a name="line409">409: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
+
+<a name="line411">411: </a><font color="#B22222">   In the command-line option, two values must be provided. For an open interval,</font>
+<a name="line412">412: </a><font color="#B22222">   one can give an infinite, e.g., -eps_interval 1.0,inf or -eps_interval -inf,1.0.</font>
+<a name="line413">413: </a><font color="#B22222">   An open interval in the programmatic interface can be specified with</font>
+<a name="line414">414: </a><font color="#B22222">   PETSC_MAX_REAL and -PETSC_MAX_REAL.</font>
 
-<a name="line439">439: </a><font color="#B22222">   Not Collective</font>
+<a name="line416">416: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line441">441: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line442">442: </a><font color="#B22222">.  eps - eigensolver context</font>
+<a name="line418">418: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()</font>
+<a name="line419">419: </a><font color="#B22222">@*/</font>
+<a name="line420">420: </a><strong><font color="#4169E1"><a name="EPSSetInterval"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal inta,PetscReal intb)</font></strong>
+<a name="line421">421: </a>{
+<a name="line426">426: </a>  <font color="#4169E1">if</font> (inta>=intb) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Badly defined interval, must be inta<intb"</font>);
+<a name="line427">427: </a>  eps->inta = inta;
+<a name="line428">428: </a>  eps->intb = intb;
+<a name="line429">429: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line430">430: </a>  <font color="#4169E1">return</font>(0);
+<a name="line431">431: </a>}
 
-<a name="line444">444: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line445">445: </a><font color="#B22222">+  inta - left end of the interval</font>
-<a name="line446">446: </a><font color="#B22222">-  intb - right end of the interval</font>
+<a name="line435">435: </a><font color="#B22222">/*@</font>
+<a name="line436">436: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a> - Gets the computational interval for spectrum slicing.</font>
 
-<a name="line448">448: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line438">438: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line450">450: </a><font color="#B22222">   Note:</font>
-<a name="line451">451: </a><font color="#B22222">   If the interval was not set by the user, then zeros are returned.</font>
+<a name="line440">440: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line441">441: </a><font color="#B22222">.  eps - eigensolver context</font>
 
-<a name="line453">453: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line454">454: </a><font color="#B22222">@*/</font>
-<a name="line455">455: </a><strong><font color="#4169E1"><a name="EPSGetInterval"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal* inta,PetscReal* intb)</font></strong>
-<a name="line456">456: </a>{
-<a name="line461">461: </a>  <font color="#4169E1">if</font> (inta) *inta = eps->inta;
-<a name="line462">462: </a>  <font color="#4169E1">if</font> (intb) *intb = eps->intb;
-<a name="line463">463: </a>  <font color="#4169E1">return</font>(0);
-<a name="line464">464: </a>}
+<a name="line443">443: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line444">444: </a><font color="#B22222">+  inta - left end of the interval</font>
+<a name="line445">445: </a><font color="#B22222">-  intb - right end of the interval</font>
 
-<a name="line468">468: </a><font color="#B22222">/*@</font>
-<a name="line469">469: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a> - Associates a spectral transformation object to the eigensolver.</font>
+<a name="line447">447: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line471">471: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line449">449: </a><font color="#B22222">   Note:</font>
+<a name="line450">450: </a><font color="#B22222">   If the interval was not set by the user, then zeros are returned.</font>
 
-<a name="line473">473: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line474">474: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line475">475: </a><font color="#B22222">-  st   - the spectral transformation object</font>
+<a name="line452">452: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line453">453: </a><font color="#B22222">@*/</font>
+<a name="line454">454: </a><strong><font color="#4169E1"><a name="EPSGetInterval"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetInterval.html#EPSGetInterval">EPSGetInterval</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal* inta,PetscReal* intb)</font></strong>
+<a name="line455">455: </a>{
+<a name="line460">460: </a>  <font color="#4169E1">if</font> (inta) *inta = eps->inta;
+<a name="line461">461: </a>  <font color="#4169E1">if</font> (intb) *intb = eps->intb;
+<a name="line462">462: </a>  <font color="#4169E1">return</font>(0);
+<a name="line463">463: </a>}
 
-<a name="line477">477: </a><font color="#B22222">   Note:</font>
-<a name="line478">478: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>() to retrieve the spectral transformation context (for example,</font>
-<a name="line479">479: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line467">467: </a><font color="#B22222">/*@</font>
+<a name="line468">468: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a> - Associates a spectral transformation object to the eigensolver.</font>
 
-<a name="line481">481: </a><font color="#B22222">   Level: advanced</font>
+<a name="line470">470: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line483">483: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>()</font>
-<a name="line484">484: </a><font color="#B22222">@*/</font>
-<a name="line485">485: </a><strong><font color="#4169E1"><a name="EPSSetST"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line486">486: </a>{
+<a name="line472">472: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line473">473: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line474">474: </a><font color="#B22222">-  st   - the spectral transformation object</font>
 
-<a name="line493">493: </a>  PetscObjectReference((PetscObject)st);
-<a name="line494">494: </a>  <a href="../../../docs/manualpages/ST/STDestroy.html#STDestroy">STDestroy</a>(&eps->st);
-<a name="line495">495: </a>  eps->st = st;
-<a name="line496">496: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->st);
-<a name="line497">497: </a>  <font color="#4169E1">return</font>(0);
-<a name="line498">498: </a>}
+<a name="line476">476: </a><font color="#B22222">   Note:</font>
+<a name="line477">477: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>() to retrieve the spectral transformation context (for example,</font>
+<a name="line478">478: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line502">502: </a><font color="#B22222">/*@</font>
-<a name="line503">503: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a> - Obtain the spectral transformation (<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>) object associated</font>
-<a name="line504">504: </a><font color="#B22222">   to the eigensolver object.</font>
+<a name="line480">480: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line506">506: </a><font color="#B22222">   Not Collective</font>
+<a name="line482">482: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>()</font>
+<a name="line483">483: </a><font color="#B22222">@*/</font>
+<a name="line484">484: </a><strong><font color="#4169E1"><a name="EPSSetST"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line485">485: </a>{
 
-<a name="line508">508: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line509">509: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line492">492: </a>  PetscObjectReference((PetscObject)st);
+<a name="line493">493: </a>  <a href="../../../docs/manualpages/ST/STDestroy.html#STDestroy">STDestroy</a>(&eps->st);
+<a name="line494">494: </a>  eps->st = st;
+<a name="line495">495: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->st);
+<a name="line496">496: </a>  <font color="#4169E1">return</font>(0);
+<a name="line497">497: </a>}
 
-<a name="line511">511: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line512">512: </a><font color="#B22222">.  st - spectral transformation context</font>
+<a name="line501">501: </a><font color="#B22222">/*@</font>
+<a name="line502">502: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a> - Obtain the spectral transformation (<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>) object associated</font>
+<a name="line503">503: </a><font color="#B22222">   to the eigensolver object.</font>
 
-<a name="line514">514: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line505">505: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line516">516: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>()</font>
-<a name="line517">517: </a><font color="#B22222">@*/</font>
-<a name="line518">518: </a><strong><font color="#4169E1"><a name="EPSGetST"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> *st)</font></strong>
-<a name="line519">519: </a>{
+<a name="line507">507: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line508">508: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
 
-<a name="line525">525: </a>  <font color="#4169E1">if</font> (!eps->st) {
-<a name="line526">526: </a>    <a href="../../../docs/manualpages/ST/STCreate.html#STCreate">STCreate</a>(PetscObjectComm((PetscObject)eps),&eps->st);
-<a name="line527">527: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->st);
-<a name="line528">528: </a>  }
-<a name="line529">529: </a>  *st = eps->st;
-<a name="line530">530: </a>  <font color="#4169E1">return</font>(0);
-<a name="line531">531: </a>}
+<a name="line510">510: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line511">511: </a><font color="#B22222">.  st - spectral transformation context</font>
 
-<a name="line535">535: </a><font color="#B22222">/*@</font>
-<a name="line536">536: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a> - Associates a basis vectors object to the eigensolver.</font>
+<a name="line513">513: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line538">538: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line515">515: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetST.html#EPSSetST">EPSSetST</a>()</font>
+<a name="line516">516: </a><font color="#B22222">@*/</font>
+<a name="line517">517: </a><strong><font color="#4169E1"><a name="EPSGetST"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> *st)</font></strong>
+<a name="line518">518: </a>{
 
-<a name="line540">540: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line541">541: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line542">542: </a><font color="#B22222">-  V   - the basis vectors object</font>
+<a name="line524">524: </a>  <font color="#4169E1">if</font> (!eps->st) {
+<a name="line525">525: </a>    <a href="../../../docs/manualpages/ST/STCreate.html#STCreate">STCreate</a>(PetscObjectComm((PetscObject)eps),&eps->st);
+<a name="line526">526: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->st);
+<a name="line527">527: </a>  }
+<a name="line528">528: </a>  *st = eps->st;
+<a name="line529">529: </a>  <font color="#4169E1">return</font>(0);
+<a name="line530">530: </a>}
 
-<a name="line544">544: </a><font color="#B22222">   Note:</font>
-<a name="line545">545: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>() to retrieve the basis vectors context (for example,</font>
-<a name="line546">546: </a><font color="#B22222">   to free them at the end of the computations).</font>
+<a name="line534">534: </a><font color="#B22222">/*@</font>
+<a name="line535">535: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a> - Associates a basis vectors object to the eigensolver.</font>
 
-<a name="line548">548: </a><font color="#B22222">   Level: advanced</font>
+<a name="line537">537: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line550">550: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>()</font>
-<a name="line551">551: </a><font color="#B22222">@*/</font>
-<a name="line552">552: </a><strong><font color="#4169E1"><a name="EPSSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
-<a name="line553">553: </a>{
+<a name="line539">539: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line540">540: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line541">541: </a><font color="#B22222">-  V   - the basis vectors object</font>
 
-<a name="line560">560: </a>  PetscObjectReference((PetscObject)V);
-<a name="line561">561: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&eps->V);
-<a name="line562">562: </a>  eps->V = V;
-<a name="line563">563: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->V);
-<a name="line564">564: </a>  <font color="#4169E1">return</font>(0);
-<a name="line565">565: </a>}
+<a name="line543">543: </a><font color="#B22222">   Note:</font>
+<a name="line544">544: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>() to retrieve the basis vectors context (for example,</font>
+<a name="line545">545: </a><font color="#B22222">   to free them at the end of the computations).</font>
 
-<a name="line569">569: </a><font color="#B22222">/*@</font>
-<a name="line570">570: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a> - Obtain the basis vectors object associated to the eigensolver object.</font>
+<a name="line547">547: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line572">572: </a><font color="#B22222">   Not Collective</font>
+<a name="line549">549: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>()</font>
+<a name="line550">550: </a><font color="#B22222">@*/</font>
+<a name="line551">551: </a><strong><font color="#4169E1"><a name="EPSSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
+<a name="line552">552: </a>{
 
-<a name="line574">574: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line575">575: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line559">559: </a>  PetscObjectReference((PetscObject)V);
+<a name="line560">560: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&eps->V);
+<a name="line561">561: </a>  eps->V = V;
+<a name="line562">562: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->V);
+<a name="line563">563: </a>  <font color="#4169E1">return</font>(0);
+<a name="line564">564: </a>}
 
-<a name="line577">577: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line578">578: </a><font color="#B22222">.  V - basis vectors context</font>
+<a name="line568">568: </a><font color="#B22222">/*@</font>
+<a name="line569">569: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a> - Obtain the basis vectors object associated to the eigensolver object.</font>
 
-<a name="line580">580: </a><font color="#B22222">   Level: advanced</font>
+<a name="line571">571: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line582">582: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a>()</font>
-<a name="line583">583: </a><font color="#B22222">@*/</font>
-<a name="line584">584: </a><strong><font color="#4169E1"><a name="EPSGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *V)</font></strong>
-<a name="line585">585: </a>{
+<a name="line573">573: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line574">574: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
 
-<a name="line591">591: </a>  <font color="#4169E1">if</font> (!eps->V) {
-<a name="line592">592: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)eps),&eps->V);
-<a name="line593">593: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->V);
-<a name="line594">594: </a>  }
-<a name="line595">595: </a>  *V = eps->V;
-<a name="line596">596: </a>  <font color="#4169E1">return</font>(0);
-<a name="line597">597: </a>}
+<a name="line576">576: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line577">577: </a><font color="#B22222">.  V - basis vectors context</font>
 
-<a name="line601">601: </a><font color="#B22222">/*@</font>
-<a name="line602">602: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a> - Associates a region object to the eigensolver.</font>
+<a name="line579">579: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line604">604: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line581">581: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetBV.html#EPSSetBV">EPSSetBV</a>()</font>
+<a name="line582">582: </a><font color="#B22222">@*/</font>
+<a name="line583">583: </a><strong><font color="#4169E1"><a name="EPSGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *V)</font></strong>
+<a name="line584">584: </a>{
 
-<a name="line606">606: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line607">607: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line608">608: </a><font color="#B22222">-  rg  - the region object</font>
+<a name="line590">590: </a>  <font color="#4169E1">if</font> (!eps->V) {
+<a name="line591">591: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)eps),&eps->V);
+<a name="line592">592: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->V);
+<a name="line593">593: </a>  }
+<a name="line594">594: </a>  *V = eps->V;
+<a name="line595">595: </a>  <font color="#4169E1">return</font>(0);
+<a name="line596">596: </a>}
 
-<a name="line610">610: </a><font color="#B22222">   Note:</font>
-<a name="line611">611: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>() to retrieve the region context (for example,</font>
-<a name="line612">612: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line600">600: </a><font color="#B22222">/*@</font>
+<a name="line601">601: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a> - Associates a region object to the eigensolver.</font>
 
-<a name="line614">614: </a><font color="#B22222">   Level: advanced</font>
+<a name="line603">603: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line616">616: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>()</font>
-<a name="line617">617: </a><font color="#B22222">@*/</font>
-<a name="line618">618: </a><strong><font color="#4169E1"><a name="EPSSetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line619">619: </a>{
+<a name="line605">605: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line606">606: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line607">607: </a><font color="#B22222">-  rg  - the region object</font>
 
-<a name="line626">626: </a>  PetscObjectReference((PetscObject)rg);
-<a name="line627">627: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&eps->rg);
-<a name="line628">628: </a>  eps->rg = rg;
-<a name="line629">629: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->rg);
-<a name="line630">630: </a>  <font color="#4169E1">return</font>(0);
-<a name="line631">631: </a>}
+<a name="line609">609: </a><font color="#B22222">   Note:</font>
+<a name="line610">610: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>() to retrieve the region context (for example,</font>
+<a name="line611">611: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line635">635: </a><font color="#B22222">/*@</font>
-<a name="line636">636: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a> - Obtain the region object associated to the eigensolver.</font>
+<a name="line613">613: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line638">638: </a><font color="#B22222">   Not Collective</font>
+<a name="line615">615: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>()</font>
+<a name="line616">616: </a><font color="#B22222">@*/</font>
+<a name="line617">617: </a><strong><font color="#4169E1"><a name="EPSSetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line618">618: </a>{
 
-<a name="line640">640: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line641">641: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line625">625: </a>  PetscObjectReference((PetscObject)rg);
+<a name="line626">626: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&eps->rg);
+<a name="line627">627: </a>  eps->rg = rg;
+<a name="line628">628: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->rg);
+<a name="line629">629: </a>  <font color="#4169E1">return</font>(0);
+<a name="line630">630: </a>}
 
-<a name="line643">643: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line644">644: </a><font color="#B22222">.  rg - region context</font>
+<a name="line634">634: </a><font color="#B22222">/*@</font>
+<a name="line635">635: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a> - Obtain the region object associated to the eigensolver.</font>
 
-<a name="line646">646: </a><font color="#B22222">   Level: advanced</font>
+<a name="line637">637: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line648">648: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>()</font>
-<a name="line649">649: </a><font color="#B22222">@*/</font>
-<a name="line650">650: </a><strong><font color="#4169E1"><a name="EPSGetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
-<a name="line651">651: </a>{
+<a name="line639">639: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line640">640: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
 
-<a name="line657">657: </a>  <font color="#4169E1">if</font> (!eps->rg) {
-<a name="line658">658: </a>    <a href="../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>(PetscObjectComm((PetscObject)eps),&eps->rg);
-<a name="line659">659: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->rg);
-<a name="line660">660: </a>  }
-<a name="line661">661: </a>  *rg = eps->rg;
-<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
-<a name="line663">663: </a>}
+<a name="line642">642: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line643">643: </a><font color="#B22222">.  rg - region context</font>
 
-<a name="line667">667: </a><font color="#B22222">/*@</font>
-<a name="line668">668: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a> - Associates a direct solver object to the eigensolver.</font>
+<a name="line645">645: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line670">670: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line647">647: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>()</font>
+<a name="line648">648: </a><font color="#B22222">@*/</font>
+<a name="line649">649: </a><strong><font color="#4169E1"><a name="EPSGetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
+<a name="line650">650: </a>{
 
-<a name="line672">672: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line673">673: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line674">674: </a><font color="#B22222">-  ds  - the direct solver object</font>
+<a name="line656">656: </a>  <font color="#4169E1">if</font> (!eps->rg) {
+<a name="line657">657: </a>    <a href="../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>(PetscObjectComm((PetscObject)eps),&eps->rg);
+<a name="line658">658: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->rg);
+<a name="line659">659: </a>  }
+<a name="line660">660: </a>  *rg = eps->rg;
+<a name="line661">661: </a>  <font color="#4169E1">return</font>(0);
+<a name="line662">662: </a>}
 
-<a name="line676">676: </a><font color="#B22222">   Note:</font>
-<a name="line677">677: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>() to retrieve the direct solver context (for example,</font>
-<a name="line678">678: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line666">666: </a><font color="#B22222">/*@</font>
+<a name="line667">667: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a> - Associates a direct solver object to the eigensolver.</font>
 
-<a name="line680">680: </a><font color="#B22222">   Level: advanced</font>
+<a name="line669">669: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
-<a name="line682">682: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>()</font>
-<a name="line683">683: </a><font color="#B22222">@*/</font>
-<a name="line684">684: </a><strong><font color="#4169E1"><a name="EPSSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line685">685: </a>{
+<a name="line671">671: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line672">672: </a><font color="#B22222">+  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line673">673: </a><font color="#B22222">-  ds  - the direct solver object</font>
 
-<a name="line692">692: </a>  PetscObjectReference((PetscObject)ds);
-<a name="line693">693: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&eps->ds);
-<a name="line694">694: </a>  eps->ds = ds;
-<a name="line695">695: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->ds);
-<a name="line696">696: </a>  <font color="#4169E1">return</font>(0);
-<a name="line697">697: </a>}
+<a name="line675">675: </a><font color="#B22222">   Note:</font>
+<a name="line676">676: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>() to retrieve the direct solver context (for example,</font>
+<a name="line677">677: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line701">701: </a><font color="#B22222">/*@</font>
-<a name="line702">702: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a> - Obtain the direct solver object associated to the eigensolver object.</font>
+<a name="line679">679: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line704">704: </a><font color="#B22222">   Not Collective</font>
+<a name="line681">681: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>()</font>
+<a name="line682">682: </a><font color="#B22222">@*/</font>
+<a name="line683">683: </a><strong><font color="#4169E1"><a name="EPSSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line684">684: </a>{
 
-<a name="line706">706: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line707">707: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line691">691: </a>  PetscObjectReference((PetscObject)ds);
+<a name="line692">692: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&eps->ds);
+<a name="line693">693: </a>  eps->ds = ds;
+<a name="line694">694: </a>  PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->ds);
+<a name="line695">695: </a>  <font color="#4169E1">return</font>(0);
+<a name="line696">696: </a>}
 
-<a name="line709">709: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line710">710: </a><font color="#B22222">.  ds - direct solver context</font>
+<a name="line700">700: </a><font color="#B22222">/*@</font>
+<a name="line701">701: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a> - Obtain the direct solver object associated to the eigensolver object.</font>
 
-<a name="line712">712: </a><font color="#B22222">   Level: advanced</font>
+<a name="line703">703: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line714">714: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a>()</font>
-<a name="line715">715: </a><font color="#B22222">@*/</font>
-<a name="line716">716: </a><strong><font color="#4169E1"><a name="EPSGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
-<a name="line717">717: </a>{
+<a name="line705">705: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line706">706: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
 
-<a name="line723">723: </a>  <font color="#4169E1">if</font> (!eps->ds) {
-<a name="line724">724: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)eps),&eps->ds);
-<a name="line725">725: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->ds);
-<a name="line726">726: </a>  }
-<a name="line727">727: </a>  *ds = eps->ds;
-<a name="line728">728: </a>  <font color="#4169E1">return</font>(0);
-<a name="line729">729: </a>}
+<a name="line708">708: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line709">709: </a><font color="#B22222">.  ds - direct solver context</font>
 
-<a name="line733">733: </a><font color="#B22222">/*@</font>
-<a name="line734">734: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a> - Ask if the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object corresponds to a generalized</font>
-<a name="line735">735: </a><font color="#B22222">   eigenvalue problem.</font>
+<a name="line711">711: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line737">737: </a><font color="#B22222">   Not collective</font>
+<a name="line713">713: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetDS.html#EPSSetDS">EPSSetDS</a>()</font>
+<a name="line714">714: </a><font color="#B22222">@*/</font>
+<a name="line715">715: </a><strong><font color="#4169E1"><a name="EPSGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
+<a name="line716">716: </a>{
 
-<a name="line739">739: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line740">740: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line722">722: </a>  <font color="#4169E1">if</font> (!eps->ds) {
+<a name="line723">723: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)eps),&eps->ds);
+<a name="line724">724: </a>    PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->ds);
+<a name="line725">725: </a>  }
+<a name="line726">726: </a>  *ds = eps->ds;
+<a name="line727">727: </a>  <font color="#4169E1">return</font>(0);
+<a name="line728">728: </a>}
 
-<a name="line742">742: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line743">743: </a><font color="#B22222">.  is - the answer</font>
+<a name="line732">732: </a><font color="#B22222">/*@</font>
+<a name="line733">733: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a> - Ask if the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object corresponds to a generalized</font>
+<a name="line734">734: </a><font color="#B22222">   eigenvalue problem.</font>
 
-<a name="line745">745: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line736">736: </a><font color="#B22222">   Not collective</font>
 
-<a name="line747">747: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(), <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>()</font>
-<a name="line748">748: </a><font color="#B22222">@*/</font>
-<a name="line749">749: </a><strong><font color="#4169E1"><a name="EPSIsGeneralized"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool* is)</font></strong>
-<a name="line750">750: </a>{
-<a name="line754">754: </a>  *is = eps->isgeneralized;
-<a name="line755">755: </a>  <font color="#4169E1">return</font>(0);
-<a name="line756">756: </a>}
+<a name="line738">738: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line739">739: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line760">760: </a><font color="#B22222">/*@</font>
-<a name="line761">761: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a> - Ask if the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object corresponds to a Hermitian</font>
-<a name="line762">762: </a><font color="#B22222">   eigenvalue problem.</font>
+<a name="line741">741: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line742">742: </a><font color="#B22222">.  is - the answer</font>
 
-<a name="line764">764: </a><font color="#B22222">   Not collective</font>
+<a name="line744">744: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line766">766: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line767">767: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line746">746: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(), <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>()</font>
+<a name="line747">747: </a><font color="#B22222">@*/</font>
+<a name="line748">748: </a><strong><font color="#4169E1"><a name="EPSIsGeneralized"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool* is)</font></strong>
+<a name="line749">749: </a>{
+<a name="line753">753: </a>  *is = eps->isgeneralized;
+<a name="line754">754: </a>  <font color="#4169E1">return</font>(0);
+<a name="line755">755: </a>}
 
-<a name="line769">769: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line770">770: </a><font color="#B22222">.  is - the answer</font>
+<a name="line759">759: </a><font color="#B22222">/*@</font>
+<a name="line760">760: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a> - Ask if the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object corresponds to a Hermitian</font>
+<a name="line761">761: </a><font color="#B22222">   eigenvalue problem.</font>
 
-<a name="line772">772: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line763">763: </a><font color="#B22222">   Not collective</font>
 
-<a name="line774">774: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(), <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>()</font>
-<a name="line775">775: </a><font color="#B22222">@*/</font>
-<a name="line776">776: </a><strong><font color="#4169E1"><a name="EPSIsHermitian"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool* is)</font></strong>
-<a name="line777">777: </a>{
-<a name="line781">781: </a>  *is = eps->ishermitian;
-<a name="line782">782: </a>  <font color="#4169E1">return</font>(0);
-<a name="line783">783: </a>}
+<a name="line765">765: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line766">766: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
 
-<a name="line787">787: </a><font color="#B22222">/*@</font>
-<a name="line788">788: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a> - Ask if the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object corresponds to an eigenvalue</font>
-<a name="line789">789: </a><font color="#B22222">   problem type that requires a positive (semi-) definite matrix B.</font>
+<a name="line768">768: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line769">769: </a><font color="#B22222">.  is - the answer</font>
 
-<a name="line791">791: </a><font color="#B22222">   Not collective</font>
+<a name="line771">771: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line793">793: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line794">794: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+<a name="line773">773: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(), <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>()</font>
+<a name="line774">774: </a><font color="#B22222">@*/</font>
+<a name="line775">775: </a><strong><font color="#4169E1"><a name="EPSIsHermitian"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool* is)</font></strong>
+<a name="line776">776: </a>{
+<a name="line780">780: </a>  *is = eps->ishermitian;
+<a name="line781">781: </a>  <font color="#4169E1">return</font>(0);
+<a name="line782">782: </a>}
 
-<a name="line796">796: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line797">797: </a><font color="#B22222">.  is - the answer</font>
+<a name="line786">786: </a><font color="#B22222">/*@</font>
+<a name="line787">787: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a> - Ask if the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object corresponds to an eigenvalue</font>
+<a name="line788">788: </a><font color="#B22222">   problem type that requires a positive (semi-) definite matrix B.</font>
 
-<a name="line799">799: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line790">790: </a><font color="#B22222">   Not collective</font>
 
-<a name="line801">801: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(), <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>()</font>
-<a name="line802">802: </a><font color="#B22222">@*/</font>
-<a name="line803">803: </a><strong><font color="#4169E1"><a name="EPSIsPositive"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool* is)</font></strong>
-<a name="line804">804: </a>{
-<a name="line808">808: </a>  *is = eps->ispositive;
-<a name="line809">809: </a>  <font color="#4169E1">return</font>(0);
-<a name="line810">810: </a>}
+<a name="line792">792: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line793">793: </a><font color="#B22222">.  eps - the eigenproblem solver context</font>
+
+<a name="line795">795: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line796">796: </a><font color="#B22222">.  is - the answer</font>
+
+<a name="line798">798: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line800">800: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSIsGeneralized.html#EPSIsGeneralized">EPSIsGeneralized</a>(), <a href="../../../docs/manualpages/EPS/EPSIsHermitian.html#EPSIsHermitian">EPSIsHermitian</a>()</font>
+<a name="line801">801: </a><font color="#B22222">@*/</font>
+<a name="line802">802: </a><strong><font color="#4169E1"><a name="EPSIsPositive"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSIsPositive.html#EPSIsPositive">EPSIsPositive</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool* is)</font></strong>
+<a name="line803">803: </a>{
+<a name="line807">807: </a>  *is = eps->ispositive;
+<a name="line808">808: </a>  <font color="#4169E1">return</font>(0);
+<a name="line809">809: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/epsdefault.c b/src/eps/interface/epsdefault.c
index 72e61f2..0e05fe9 100644
--- a/src/eps/interface/epsdefault.c
+++ b/src/eps/interface/epsdefault.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -271,11 +271,11 @@ PetscErrorCode EPSSetWhichEigenpairs_Default(EPS eps)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "EPSConvergedEigRelative"
+#define __FUNCT__ "EPSConvergedRelative"
 /*
-  EPSConvergedEigRelative - Checks convergence relative to the eigenvalue.
+  EPSConvergedRelative - Checks convergence relative to the eigenvalue.
 */
-PetscErrorCode EPSConvergedEigRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+PetscErrorCode EPSConvergedRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
 {
   PetscReal w;
 
@@ -298,12 +298,12 @@ PetscErrorCode EPSConvergedAbsolute(EPS eps,PetscScalar eigr,PetscScalar eigi,Pe
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "EPSConvergedNormRelative"
+#define __FUNCT__ "EPSConvergedNorm"
 /*
-  EPSConvergedNormRelative - Checks convergence relative to the eigenvalue and
+  EPSConvergedNorm - Checks convergence relative to the eigenvalue and
   the matrix norms.
 */
-PetscErrorCode EPSConvergedNormRelative(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+PetscErrorCode EPSConvergedNorm(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
 {
   PetscReal w;
 
@@ -314,6 +314,56 @@ PetscErrorCode EPSConvergedNormRelative(EPS eps,PetscScalar eigr,PetscScalar eig
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "EPSStoppingBasic"
+/*@C
+   EPSStoppingBasic - Default routine to determine whether the outer eigensolver
+   iteration must be stopped.
+
+   Collective on EPS
+
+   Input Parameters:
++  eps    - eigensolver context obtained from EPSCreate()
+.  its    - current number of iterations
+.  max_it - maximum number of iterations
+.  nconv  - number of currently converged eigenpairs
+.  nev    - number of requested eigenpairs
+-  ctx    - context (not used here)
+
+   Output Parameter:
+.  reason - result of the stopping test
+
+   Notes:
+   A positive value of reason indicates that the iteration has finished successfully
+   (converged), and a negative value indicates an error condition (diverged). If
+   the iteration needs to be continued, reason must be set to EPS_CONVERGED_ITERATING
+   (zero).
+
+   EPSStoppingBasic() will stop if all requested eigenvalues are converged, or if
+   the maximum number of iterations has been reached.
+
+   Use EPSSetStoppingTest() to provide your own test instead of using this one.
+
+   Level: advanced
+
+.seealso: EPSSetStoppingTest(), EPSConvergedReason, EPSGetConvergedReason()
+@*/
+PetscErrorCode EPSStoppingBasic(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  *reason = EPS_CONVERGED_ITERATING;
+  if (nconv >= nev) {
+    ierr = PetscInfo2(eps,"Linear eigensolver finished successfully: %D eigenpairs converged at iteration %D\n",nconv,its);CHKERRQ(ierr);
+    *reason = EPS_CONVERGED_TOL;
+  } else if (its >= max_it) {
+    *reason = EPS_DIVERGED_ITS;
+    ierr = PetscInfo1(eps,"Linear eigensolver iteration reached maximum number of iterations (%D)\n",its);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSComputeRitzVector"
 /*
   EPSComputeRitzVector - Computes the current Ritz vector.
@@ -387,10 +437,12 @@ PetscErrorCode EPSBuildBalance_Krylov(EPS eps)
   PetscReal         norma;
   PetscScalar       *pz,*pD;
   const PetscScalar *pr,*pp;
+  PetscRandom       rand;
   PetscErrorCode    ierr;
 
   PetscFunctionBegin;
   ierr = EPSSetWorkVecs(eps,3);CHKERRQ(ierr);
+  ierr = BVGetRandomContext(eps->V,&rand);CHKERRQ(ierr);
   r = eps->work[0];
   p = eps->work[1];
   z = eps->work[2];
@@ -399,7 +451,7 @@ PetscErrorCode EPSBuildBalance_Krylov(EPS eps)
   for (j=0;j<eps->balance_its;j++) {
 
     /* Build a random vector of +-1's */
-    ierr = VecSetRandom(z,eps->rand);CHKERRQ(ierr);
+    ierr = VecSetRandom(z,rand);CHKERRQ(ierr);
     ierr = VecGetArray(z,&pz);CHKERRQ(ierr);
     for (i=0;i<eps->nloc;i++) {
       if (PetscRealPart(pz[i])<0.5) pz[i]=-1.0;
diff --git a/src/eps/interface/epsdefault.c.html b/src/eps/interface/epsdefault.c.html
index 56e6d28..7282cf1 100644
--- a/src/eps/interface/epsdefault.c.html
+++ b/src/eps/interface/epsdefault.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epsdefault.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:44+00:00">
+<meta name="date" content="2016-05-16T10:32:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epsdefault.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epsdefault.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     This file contains some simple default routines for common operations.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -259,9 +259,9 @@
 <a name="line271">271: </a>}
 
 <a name="line275">275: </a><font color="#B22222">/*</font>
-<a name="line276">276: </a><font color="#B22222">  EPSConvergedEigRelative - Checks convergence relative to the eigenvalue.</font>
+<a name="line276">276: </a><font color="#B22222">  EPSConvergedRelative - Checks convergence relative to the eigenvalue.</font>
 <a name="line277">277: </a><font color="#B22222">*/</font>
-<a name="line278">278: </a><strong><font color="#4169E1"><a name="EPSConvergedEigRelative"></a>PetscErrorCode EPSConvergedEigRelative(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line278">278: </a><strong><font color="#4169E1"><a name="EPSConvergedRelative"></a>PetscErrorCode EPSConvergedRelative(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
 <a name="line279">279: </a>{
 <a name="line280">280: </a>  PetscReal w;
 
@@ -280,10 +280,10 @@
 <a name="line298">298: </a>}
 
 <a name="line302">302: </a><font color="#B22222">/*</font>
-<a name="line303">303: </a><font color="#B22222">  EPSConvergedNormRelative - Checks convergence relative to the eigenvalue and</font>
+<a name="line303">303: </a><font color="#B22222">  EPSConvergedNorm - Checks convergence relative to the eigenvalue and</font>
 <a name="line304">304: </a><font color="#B22222">  the matrix norms.</font>
 <a name="line305">305: </a><font color="#B22222">*/</font>
-<a name="line306">306: </a><strong><font color="#4169E1"><a name="EPSConvergedNormRelative"></a>PetscErrorCode EPSConvergedNormRelative(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line306">306: </a><strong><font color="#4169E1"><a name="EPSConvergedNorm"></a>PetscErrorCode EPSConvergedNorm(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
 <a name="line307">307: </a>{
 <a name="line308">308: </a>  PetscReal w;
 
@@ -292,127 +292,175 @@
 <a name="line313">313: </a>  <font color="#4169E1">return</font>(0);
 <a name="line314">314: </a>}
 
-<a name="line318">318: </a><font color="#B22222">/*</font>
-<a name="line319">319: </a><font color="#B22222">  EPSComputeRitzVector - Computes the current Ritz vector.</font>
-
-<a name="line321">321: </a><font color="#B22222">  Simple case (complex scalars or real scalars with Zi=NULL):</font>
-<a name="line322">322: </a><font color="#B22222">    x = V*Zr  (V is a basis of nv vectors, Zr has length nv)</font>
-
-<a name="line324">324: </a><font color="#B22222">  Split case:</font>
-<a name="line325">325: </a><font color="#B22222">    x = V*Zr  y = V*Zi  (Zr and Zi have length nv)</font>
-<a name="line326">326: </a><font color="#B22222">*/</font>
-<a name="line327">327: </a><strong><font color="#4169E1"><a name="EPSComputeRitzVector"></a>PetscErrorCode EPSComputeRitzVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *Zr,PetscScalar *Zi,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec x,Vec y)</font></strong>
-<a name="line328">328: </a>{
-<a name="line330">330: </a>  PetscReal      norm;
-<a name="line331">331: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line332">332: </a>  Vec            z;
-<a name="line333">333: </a><font color="#A020F0">#endif</font>
-
-<a name="line336">336: </a>  <font color="#B22222">/* compute eigenvector */</font>
-<a name="line337">337: </a>  <a href="../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,x,Zr);
-
-<a name="line339">339: </a>  <font color="#B22222">/* purify eigenvector in positive generalized problems */</font>
-<a name="line340">340: </a>  <font color="#4169E1">if</font> (eps->ispositive && eps->purify) {
-<a name="line341">341: </a>    <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
-<a name="line342">342: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line343">343: </a>      <a href="../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(eps->V,y,NORM_2,&norm);
-<a name="line344">344: </a>    } <font color="#4169E1">else</font> {
-<a name="line345">345: </a>      VecNorm(y,NORM_2,&norm);
-<a name="line346">346: </a>    }
-<a name="line347">347: </a>    VecScale(y,1.0/norm);
-<a name="line348">348: </a>    VecCopy(y,x);
-<a name="line349">349: </a>  }
-<a name="line350">350: </a>  <font color="#B22222">/* fix eigenvector if balancing is used */</font>
-<a name="line351">351: </a>  <font color="#4169E1">if</font> (!eps->ishermitian && eps->balance!=EPS_BALANCE_NONE && eps->D) {
-<a name="line352">352: </a>    VecPointwiseDivide(x,x,eps->D);
-<a name="line353">353: </a>    VecNormalize(x,&norm);
-<a name="line354">354: </a>  }
-<a name="line355">355: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line356">356: </a>  <font color="#B22222">/* compute imaginary part of eigenvector */</font>
-<a name="line357">357: </a>  <font color="#4169E1">if</font> (Zi) {
-<a name="line358">358: </a>    <a href="../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,y,Zi);
-<a name="line359">359: </a>    <font color="#4169E1">if</font> (eps->ispositive) {
-<a name="line360">360: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,&z);
-<a name="line361">361: </a>      <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,y,z);
-<a name="line362">362: </a>      VecNorm(z,NORM_2,&norm);
-<a name="line363">363: </a>      VecScale(z,1.0/norm);
-<a name="line364">364: </a>      VecCopy(z,y);
-<a name="line365">365: </a>      VecDestroy(&z);
-<a name="line366">366: </a>    }
-<a name="line367">367: </a>    <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE && eps->D) {
-<a name="line368">368: </a>      VecPointwiseDivide(y,y,eps->D);
-<a name="line369">369: </a>      VecNormalize(y,&norm);
-<a name="line370">370: </a>    }
-<a name="line371">371: </a>  } <font color="#4169E1">else</font>
-<a name="line372">372: </a><font color="#A020F0">#endif</font>
-<a name="line373">373: </a>  { VecSet(y,0.0); }
-<a name="line374">374: </a>  <font color="#4169E1">return</font>(0);
-<a name="line375">375: </a>}
-
-<a name="line379">379: </a><font color="#B22222">/*</font>
-<a name="line380">380: </a><font color="#B22222">  EPSBuildBalance_Krylov - uses a Krylov subspace method to compute the</font>
-<a name="line381">381: </a><font color="#B22222">  diagonal matrix to be applied for balancing in non-Hermitian problems.</font>
-<a name="line382">382: </a><font color="#B22222">*/</font>
-<a name="line383">383: </a><strong><font color="#4169E1"><a name="EPSBuildBalance_Krylov"></a>PetscErrorCode EPSBuildBalance_Krylov(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line384">384: </a>{
-<a name="line385">385: </a>  Vec               z,p,r;
-<a name="line386">386: </a>  PetscInt          i,j;
-<a name="line387">387: </a>  PetscReal         norma;
-<a name="line388">388: </a>  PetscScalar       *pz,*pD;
-<a name="line389">389: </a>  const PetscScalar *pr,*pp;
-<a name="line390">390: </a>  PetscErrorCode    ierr;
-
-<a name="line393">393: </a>  <a href="../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,3);
-<a name="line394">394: </a>  r = eps->work[0];
-<a name="line395">395: </a>  p = eps->work[1];
-<a name="line396">396: </a>  z = eps->work[2];
-<a name="line397">397: </a>  VecSet(eps->D,1.0);
-
-<a name="line399">399: </a>  <font color="#4169E1">for</font> (j=0;j<eps->balance_its;j++) {
-
-<a name="line401">401: </a>    <font color="#B22222">/* Build a random vector of +-1's */</font>
-<a name="line402">402: </a>    VecSetRandom(z,eps->rand);
-<a name="line403">403: </a>    VecGetArray(z,&pz);
-<a name="line404">404: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nloc;i++) {
-<a name="line405">405: </a>      <font color="#4169E1">if</font> (PetscRealPart(pz[i])<0.5) pz[i]=-1.0;
-<a name="line406">406: </a>      <font color="#4169E1">else</font> pz[i]=1.0;
-<a name="line407">407: </a>    }
-<a name="line408">408: </a>    VecRestoreArray(z,&pz);
-
-<a name="line410">410: </a>    <font color="#B22222">/* Compute p=DA(D\z) */</font>
-<a name="line411">411: </a>    VecPointwiseDivide(r,z,eps->D);
-<a name="line412">412: </a>    <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,r,p);
-<a name="line413">413: </a>    VecPointwiseMult(p,p,eps->D);
-<a name="line414">414: </a>    <font color="#4169E1">if</font> (j==0) {
-<a name="line415">415: </a>      <font color="#B22222">/* Estimate the matrix inf-norm */</font>
-<a name="line416">416: </a>      VecAbs(p);
-<a name="line417">417: </a>      VecMax(p,NULL,&norma);
-<a name="line418">418: </a>    }
-<a name="line419">419: </a>    <font color="#4169E1">if</font> (eps->balance == EPS_BALANCE_TWOSIDE) {
-<a name="line420">420: </a>      <font color="#B22222">/* Compute r=D\(A'Dz) */</font>
-<a name="line421">421: </a>      VecPointwiseMult(z,z,eps->D);
-<a name="line422">422: </a>      <a href="../../../docs/manualpages/ST/STApplyTranspose.html#STApplyTranspose">STApplyTranspose</a>(eps->st,z,r);
-<a name="line423">423: </a>      VecPointwiseDivide(r,r,eps->D);
-<a name="line424">424: </a>    }
-
-<a name="line426">426: </a>    <font color="#B22222">/* Adjust values of D */</font>
-<a name="line427">427: </a>    VecGetArrayRead(r,&pr);
-<a name="line428">428: </a>    VecGetArrayRead(p,&pp);
-<a name="line429">429: </a>    VecGetArray(eps->D,&pD);
-<a name="line430">430: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nloc;i++) {
-<a name="line431">431: </a>      <font color="#4169E1">if</font> (eps->balance == EPS_BALANCE_TWOSIDE) {
-<a name="line432">432: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(pp[i])>eps->balance_cutoff*norma && pr[i]!=0.0)
-<a name="line433">433: </a>          pD[i] *= PetscSqrtReal(PetscAbsScalar(pr[i]/pp[i]));
-<a name="line434">434: </a>      } <font color="#4169E1">else</font> {
-<a name="line435">435: </a>        <font color="#4169E1">if</font> (pp[i]!=0.0) pD[i] *= 1.0/PetscAbsScalar(pp[i]);
-<a name="line436">436: </a>      }
-<a name="line437">437: </a>    }
-<a name="line438">438: </a>    VecRestoreArrayRead(r,&pr);
-<a name="line439">439: </a>    VecRestoreArrayRead(p,&pp);
-<a name="line440">440: </a>    VecRestoreArray(eps->D,&pD);
-<a name="line441">441: </a>  }
-<a name="line442">442: </a>  <font color="#4169E1">return</font>(0);
-<a name="line443">443: </a>}
+<a name="line318">318: </a><font color="#B22222">/*@C</font>
+<a name="line319">319: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a> - Default routine to determine whether the outer eigensolver</font>
+<a name="line320">320: </a><font color="#B22222">   iteration must be stopped.</font>
+
+<a name="line322">322: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line324">324: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line325">325: </a><font color="#B22222">+  eps    - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line326">326: </a><font color="#B22222">.  its    - current number of iterations</font>
+<a name="line327">327: </a><font color="#B22222">.  max_it - maximum number of iterations</font>
+<a name="line328">328: </a><font color="#B22222">.  nconv  - number of currently converged eigenpairs</font>
+<a name="line329">329: </a><font color="#B22222">.  nev    - number of requested eigenpairs</font>
+<a name="line330">330: </a><font color="#B22222">-  ctx    - context (not used here)</font>
+
+<a name="line332">332: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line333">333: </a><font color="#B22222">.  reason - result of the stopping test</font>
+
+<a name="line335">335: </a><font color="#B22222">   Notes:</font>
+<a name="line336">336: </a><font color="#B22222">   A positive value of reason indicates that the iteration has finished successfully</font>
+<a name="line337">337: </a><font color="#B22222">   (converged), and a negative value indicates an error condition (diverged). If</font>
+<a name="line338">338: </a><font color="#B22222">   the iteration needs to be continued, reason must be set to EPS_CONVERGED_ITERATING</font>
+<a name="line339">339: </a><font color="#B22222">   (zero).</font>
+
+<a name="line341">341: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>() will stop if all requested eigenvalues are converged, or if</font>
+<a name="line342">342: </a><font color="#B22222">   the maximum number of iterations has been reached.</font>
+
+<a name="line344">344: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>() to provide your own test instead of using this one.</font>
+
+<a name="line346">346: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line348">348: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(), <a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>, <a href="../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>()</font>
+<a name="line349">349: </a><font color="#B22222">@*/</font>
+<a name="line350">350: </a><strong><font color="#4169E1"><a name="EPSStoppingBasic"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> *reason,void *ctx)</font></strong>
+<a name="line351">351: </a>{
+
+<a name="line355">355: </a>  *reason = EPS_CONVERGED_ITERATING;
+<a name="line356">356: </a>  <font color="#4169E1">if</font> (nconv >= nev) {
+<a name="line357">357: </a>    PetscInfo2(eps,<font color="#666666">"Linear eigensolver finished successfully: %D eigenpairs converged at iteration %D\n"</font>,nconv,its);
+<a name="line358">358: </a>    *reason = EPS_CONVERGED_TOL;
+<a name="line359">359: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (its >= max_it) {
+<a name="line360">360: </a>    *reason = EPS_DIVERGED_ITS;
+<a name="line361">361: </a>    PetscInfo1(eps,<font color="#666666">"Linear eigensolver iteration reached maximum number of iterations (%D)\n"</font>,its);
+<a name="line362">362: </a>  }
+<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
+<a name="line364">364: </a>}
+
+<a name="line368">368: </a><font color="#B22222">/*</font>
+<a name="line369">369: </a><font color="#B22222">  EPSComputeRitzVector - Computes the current Ritz vector.</font>
+
+<a name="line371">371: </a><font color="#B22222">  Simple case (complex scalars or real scalars with Zi=NULL):</font>
+<a name="line372">372: </a><font color="#B22222">    x = V*Zr  (V is a basis of nv vectors, Zr has length nv)</font>
+
+<a name="line374">374: </a><font color="#B22222">  Split case:</font>
+<a name="line375">375: </a><font color="#B22222">    x = V*Zr  y = V*Zi  (Zr and Zi have length nv)</font>
+<a name="line376">376: </a><font color="#B22222">*/</font>
+<a name="line377">377: </a><strong><font color="#4169E1"><a name="EPSComputeRitzVector"></a>PetscErrorCode EPSComputeRitzVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar *Zr,PetscScalar *Zi,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec x,Vec y)</font></strong>
+<a name="line378">378: </a>{
+<a name="line380">380: </a>  PetscReal      norm;
+<a name="line381">381: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line382">382: </a>  Vec            z;
+<a name="line383">383: </a><font color="#A020F0">#endif</font>
+
+<a name="line386">386: </a>  <font color="#B22222">/* compute eigenvector */</font>
+<a name="line387">387: </a>  <a href="../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,x,Zr);
+
+<a name="line389">389: </a>  <font color="#B22222">/* purify eigenvector in positive generalized problems */</font>
+<a name="line390">390: </a>  <font color="#4169E1">if</font> (eps->ispositive && eps->purify) {
+<a name="line391">391: </a>    <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,x,y);
+<a name="line392">392: </a>    <font color="#4169E1">if</font> (eps->ishermitian) {
+<a name="line393">393: </a>      <a href="../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(eps->V,y,NORM_2,&norm);
+<a name="line394">394: </a>    } <font color="#4169E1">else</font> {
+<a name="line395">395: </a>      VecNorm(y,NORM_2,&norm);
+<a name="line396">396: </a>    }
+<a name="line397">397: </a>    VecScale(y,1.0/norm);
+<a name="line398">398: </a>    VecCopy(y,x);
+<a name="line399">399: </a>  }
+<a name="line400">400: </a>  <font color="#B22222">/* fix eigenvector if balancing is used */</font>
+<a name="line401">401: </a>  <font color="#4169E1">if</font> (!eps->ishermitian && eps->balance!=EPS_BALANCE_NONE && eps->D) {
+<a name="line402">402: </a>    VecPointwiseDivide(x,x,eps->D);
+<a name="line403">403: </a>    VecNormalize(x,&norm);
+<a name="line404">404: </a>  }
+<a name="line405">405: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line406">406: </a>  <font color="#B22222">/* compute imaginary part of eigenvector */</font>
+<a name="line407">407: </a>  <font color="#4169E1">if</font> (Zi) {
+<a name="line408">408: </a>    <a href="../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,y,Zi);
+<a name="line409">409: </a>    <font color="#4169E1">if</font> (eps->ispositive) {
+<a name="line410">410: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,&z);
+<a name="line411">411: </a>      <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,y,z);
+<a name="line412">412: </a>      VecNorm(z,NORM_2,&norm);
+<a name="line413">413: </a>      VecScale(z,1.0/norm);
+<a name="line414">414: </a>      VecCopy(z,y);
+<a name="line415">415: </a>      VecDestroy(&z);
+<a name="line416">416: </a>    }
+<a name="line417">417: </a>    <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE && eps->D) {
+<a name="line418">418: </a>      VecPointwiseDivide(y,y,eps->D);
+<a name="line419">419: </a>      VecNormalize(y,&norm);
+<a name="line420">420: </a>    }
+<a name="line421">421: </a>  } <font color="#4169E1">else</font>
+<a name="line422">422: </a><font color="#A020F0">#endif</font>
+<a name="line423">423: </a>  { VecSet(y,0.0); }
+<a name="line424">424: </a>  <font color="#4169E1">return</font>(0);
+<a name="line425">425: </a>}
+
+<a name="line429">429: </a><font color="#B22222">/*</font>
+<a name="line430">430: </a><font color="#B22222">  EPSBuildBalance_Krylov - uses a Krylov subspace method to compute the</font>
+<a name="line431">431: </a><font color="#B22222">  diagonal matrix to be applied for balancing in non-Hermitian problems.</font>
+<a name="line432">432: </a><font color="#B22222">*/</font>
+<a name="line433">433: </a><strong><font color="#4169E1"><a name="EPSBuildBalance_Krylov"></a>PetscErrorCode EPSBuildBalance_Krylov(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line434">434: </a>{
+<a name="line435">435: </a>  Vec               z,p,r;
+<a name="line436">436: </a>  PetscInt          i,j;
+<a name="line437">437: </a>  PetscReal         norma;
+<a name="line438">438: </a>  PetscScalar       *pz,*pD;
+<a name="line439">439: </a>  const PetscScalar *pr,*pp;
+<a name="line440">440: </a>  PetscRandom       rand;
+<a name="line441">441: </a>  PetscErrorCode    ierr;
+
+<a name="line444">444: </a>  <a href="../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,3);
+<a name="line445">445: </a>  <a href="../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(eps->V,&rand);
+<a name="line446">446: </a>  r = eps->work[0];
+<a name="line447">447: </a>  p = eps->work[1];
+<a name="line448">448: </a>  z = eps->work[2];
+<a name="line449">449: </a>  VecSet(eps->D,1.0);
+
+<a name="line451">451: </a>  <font color="#4169E1">for</font> (j=0;j<eps->balance_its;j++) {
+
+<a name="line453">453: </a>    <font color="#B22222">/* Build a random vector of +-1's */</font>
+<a name="line454">454: </a>    VecSetRandom(z,rand);
+<a name="line455">455: </a>    VecGetArray(z,&pz);
+<a name="line456">456: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nloc;i++) {
+<a name="line457">457: </a>      <font color="#4169E1">if</font> (PetscRealPart(pz[i])<0.5) pz[i]=-1.0;
+<a name="line458">458: </a>      <font color="#4169E1">else</font> pz[i]=1.0;
+<a name="line459">459: </a>    }
+<a name="line460">460: </a>    VecRestoreArray(z,&pz);
+
+<a name="line462">462: </a>    <font color="#B22222">/* Compute p=DA(D\z) */</font>
+<a name="line463">463: </a>    VecPointwiseDivide(r,z,eps->D);
+<a name="line464">464: </a>    <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,r,p);
+<a name="line465">465: </a>    VecPointwiseMult(p,p,eps->D);
+<a name="line466">466: </a>    <font color="#4169E1">if</font> (j==0) {
+<a name="line467">467: </a>      <font color="#B22222">/* Estimate the matrix inf-norm */</font>
+<a name="line468">468: </a>      VecAbs(p);
+<a name="line469">469: </a>      VecMax(p,NULL,&norma);
+<a name="line470">470: </a>    }
+<a name="line471">471: </a>    <font color="#4169E1">if</font> (eps->balance == EPS_BALANCE_TWOSIDE) {
+<a name="line472">472: </a>      <font color="#B22222">/* Compute r=D\(A'Dz) */</font>
+<a name="line473">473: </a>      VecPointwiseMult(z,z,eps->D);
+<a name="line474">474: </a>      <a href="../../../docs/manualpages/ST/STApplyTranspose.html#STApplyTranspose">STApplyTranspose</a>(eps->st,z,r);
+<a name="line475">475: </a>      VecPointwiseDivide(r,r,eps->D);
+<a name="line476">476: </a>    }
+
+<a name="line478">478: </a>    <font color="#B22222">/* Adjust values of D */</font>
+<a name="line479">479: </a>    VecGetArrayRead(r,&pr);
+<a name="line480">480: </a>    VecGetArrayRead(p,&pp);
+<a name="line481">481: </a>    VecGetArray(eps->D,&pD);
+<a name="line482">482: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nloc;i++) {
+<a name="line483">483: </a>      <font color="#4169E1">if</font> (eps->balance == EPS_BALANCE_TWOSIDE) {
+<a name="line484">484: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(pp[i])>eps->balance_cutoff*norma && pr[i]!=0.0)
+<a name="line485">485: </a>          pD[i] *= PetscSqrtReal(PetscAbsScalar(pr[i]/pp[i]));
+<a name="line486">486: </a>      } <font color="#4169E1">else</font> {
+<a name="line487">487: </a>        <font color="#4169E1">if</font> (pp[i]!=0.0) pD[i] *= 1.0/PetscAbsScalar(pp[i]);
+<a name="line488">488: </a>      }
+<a name="line489">489: </a>    }
+<a name="line490">490: </a>    VecRestoreArrayRead(r,&pr);
+<a name="line491">491: </a>    VecRestoreArrayRead(p,&pp);
+<a name="line492">492: </a>    VecRestoreArray(eps->D,&pD);
+<a name="line493">493: </a>  }
+<a name="line494">494: </a>  <font color="#4169E1">return</font>(0);
+<a name="line495">495: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/epsmon.c b/src/eps/interface/epsmon.c
index bb8796f..a170c47 100644
--- a/src/eps/interface/epsmon.c
+++ b/src/eps/interface/epsmon.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -178,37 +178,46 @@ PetscErrorCode EPSGetMonitorContext(EPS eps,void **ctx)
 .  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: EPSMonitorSet(), EPSMonitorFirst(), EPSMonitorConverged()
 @*/
-PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
   PetscInt       i;
   PetscScalar    er,ei;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its) {
-    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"%3D EPS nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
-    for (i=0;i<nest;i++) {
-      er = eigr[i]; ei = eigi[i];
-      ierr = STBackTransform(eps->st,1,&er,&ei);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(vf,8);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
+  if (its==1 && ((PetscObject)eps)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Eigenvalue approximations and residual norms for %s solve.\n",((PetscObject)eps)->prefix);CHKERRQ(ierr);
+  }
+  ierr = PetscViewerASCIIPrintf(viewer,"%3D EPS nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+  for (i=0;i<nest;i++) {
+    er = eigr[i]; ei = eigi[i];
+    ierr = STBackTransform(eps->st,1,&er,&ei);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
-      ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(er),(double)PetscImaginaryPart(er));CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(er),(double)PetscImaginaryPart(er));CHKERRQ(ierr);
 #else
-      ierr = PetscViewerASCIIPrintf(viewer," %g",(double)er);CHKERRQ(ierr);
-      if (ei!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPrintf(viewer," %g",(double)er);CHKERRQ(ierr);
+    if (ei!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
 #endif
-      ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)",(double)errest[i]);CHKERRQ(ierr);
-    }
-    ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
-    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)",(double)errest[i]);CHKERRQ(ierr);
   }
+  ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
+  ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -228,22 +237,31 @@ PetscErrorCode EPSMonitorAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *ei
 .  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: EPSMonitorSet(), EPSMonitorAll(), EPSMonitorConverged()
 @*/
-PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
   PetscScalar    er,ei;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its && nconv<nest) {
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(vf,8);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  if (its==1 && ((PetscObject)eps)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Eigenvalue approximations and residual norms for %s solve.\n",((PetscObject)eps)->prefix);CHKERRQ(ierr);
+  }
+  if (nconv<nest) {
+    ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"%3D EPS nconv=%D first unconverged value (error)",its,nconv);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     er = eigr[nconv]; ei = eigi[nconv];
     ierr = STBackTransform(eps->st,1,&er,&ei);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
@@ -253,7 +271,9 @@ PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *
     if (ei!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
 #endif
     ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)\n",(double)errest[nconv]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -274,33 +294,34 @@ PetscErrorCode EPSMonitorFirst(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *
 .  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context
-
-   Note:
-   The monitor context must contain a struct with a PetscViewer and a
-   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
+-  ctx    - monitor context
 
    Level: intermediate
 
 .seealso: EPSMonitorSet(), EPSMonitorFirst(), EPSMonitorAll()
 @*/
-PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 {
-  PetscErrorCode   ierr;
-  PetscInt         i;
-  PetscScalar      er,ei;
-  PetscViewer      viewer;
-  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
+  PetscErrorCode ierr;
+  PetscInt       i;
+  PetscScalar    er,ei;
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (!monctx) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,"Must provide a context for EPSMonitorConverged");
-  if (!its) {
-    ctx->oldnconv = 0;
-  } else {
-    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(ctx,8);
+  viewer = ctx->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  if (its==1 && ((PetscObject)eps)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Convergence history for %s solve.\n",((PetscObject)eps)->prefix);CHKERRQ(ierr);
+  }
+  if (its==1) ctx->oldnconv = 0;
+  if (ctx->oldnconv!=nconv) {
+    ierr = PetscViewerPushFormat(viewer,ctx->format);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
     for (i=ctx->oldnconv;i<nconv;i++) {
-      ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%3D EPS converged value (error) #%D",its,i);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       er = eigr[i]; ei = eigi[i];
       ierr = STBackTransform(eps->st,1,&er,&ei);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
@@ -310,103 +331,103 @@ PetscErrorCode EPSMonitorConverged(EPS eps,PetscInt its,PetscInt nconv,PetscScal
       if (ei!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
 #endif
       ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)\n",(double)errest[i]);CHKERRQ(ierr);
-      ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     }
+    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
     ctx->oldnconv = nconv;
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "EPSMonitorLGCreate"
+/*@C
+   EPSMonitorLGCreate - Creates a line graph context for use with
+   EPS to monitor convergence.
+
+   Collective on MPI_Comm
+
+   Input Parameters:
++  comm - communicator context
+.  host - the X display to open, or null for the local machine
+.  label - the title to put in the title bar
+.  x, y - the screen coordinates of the upper left coordinate of
+          the window
+-  m, n - the screen width and height in pixels
+
+   Output Parameter:
+.  lgctx - the drawing context
+
+   Options Database Keys:
++  -eps_monitor_lg - Sets line graph monitor for the first residual
+-  -eps_monitor_lg_all - Sets line graph monitor for all residuals
+
+   Notes:
+   Use PetscDrawLGDestroy() to destroy this line graph.
+
+   Level: intermediate
+
+.seealso: EPSMonitorSet()
+@*/
+PetscErrorCode EPSMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+{
+  PetscDraw      draw;
+  PetscDrawLG    lg;
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscDrawCreate(comm,host,label,x,y,m,n,&draw);CHKERRQ(ierr);
+  ierr = PetscDrawSetFromOptions(draw);CHKERRQ(ierr);
+  ierr = PetscDrawLGCreate(draw,1,&lg);CHKERRQ(ierr);
+  ierr = PetscDrawLGSetFromOptions(lg);CHKERRQ(ierr);
+  ierr = PetscDrawDestroy(&draw);CHKERRQ(ierr);
+  *lgctx = lg;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSMonitorLG"
-PetscErrorCode EPSMonitorLG(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorLG(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
-  PetscDraw      draw,draw1;
-  PetscDrawLG    lg,lg1;
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
+  PetscReal      x,y;
   PetscErrorCode ierr;
-  PetscReal      x,y,myeigr,p;
-  PetscScalar    er,ei;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)eps));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(eps->tol)-2,0.0);CHKERRQ(ierr);
-  }
-
-  /* In the hermitian case, the eigenvalues are real and can be plotted */
-  if (eps->ishermitian) {
-    ierr = PetscViewerDrawGetDraw(viewer,1,&draw1);CHKERRQ(ierr);
-    ierr = PetscViewerDrawGetDrawLG(viewer,1,&lg1);CHKERRQ(ierr);
-    if (!its) {
-      ierr = PetscDrawSetTitle(draw1,"Approximate eigenvalues");CHKERRQ(ierr);
-      ierr = PetscDrawSetDoubleBuffer(draw1);CHKERRQ(ierr);
-      ierr = PetscDrawLGSetDimension(lg1,1);CHKERRQ(ierr);
-      ierr = PetscDrawLGReset(lg1);CHKERRQ(ierr);
-      ierr = PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);CHKERRQ(ierr);
-    }
+    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(eps->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   x = (PetscReal)its;
-  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]); else y = 0.0;
+  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+  else y = 0.0;
   ierr = PetscDrawLGAddPoint(lg,&x,&y);CHKERRQ(ierr);
-  if (eps->ishermitian) {
-    er = eigr[nconv]; ei = eigi[nconv];
-    ierr = STBackTransform(eps->st,1,&er,&ei);CHKERRQ(ierr);
-    myeigr = PetscRealPart(er);
-    ierr = PetscDrawLGAddPoint(lg1,&x,&myeigr);CHKERRQ(ierr);
-    ierr = PetscDrawGetPause(draw1,&p);CHKERRQ(ierr);
-    ierr = PetscDrawSetPause(draw1,0);CHKERRQ(ierr);
-    ierr = PetscDrawLGDraw(lg1);CHKERRQ(ierr);
-    ierr = PetscDrawSetPause(draw1,p);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || eps->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
   }
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSMonitorLGAll"
-PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
-  PetscDraw      draw,draw1;
-  PetscDrawLG    lg,lg1;
-  PetscErrorCode ierr;
-  PetscReal      *x,*y,*myeigr,p;
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscInt       i,n = PetscMin(eps->nev,255);
-  PetscScalar    er,ei;
+  PetscReal      *x,*y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)eps));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(eps->tol)-2,0.0);CHKERRQ(ierr);
-  }
-
-  /* In the hermitian case, the eigenvalues are real and can be plotted */
-  if (eps->ishermitian) {
-    ierr = PetscViewerDrawGetDraw(viewer,1,&draw1);CHKERRQ(ierr);
-    ierr = PetscViewerDrawGetDrawLG(viewer,1,&lg1);CHKERRQ(ierr);
-    if (!its) {
-      ierr = PetscDrawSetTitle(draw1,"Approximate eigenvalues");CHKERRQ(ierr);
-      ierr = PetscDrawSetDoubleBuffer(draw1);CHKERRQ(ierr);
-      ierr = PetscDrawLGSetDimension(lg1,n);CHKERRQ(ierr);
-      ierr = PetscDrawLGReset(lg1);CHKERRQ(ierr);
-      ierr = PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);CHKERRQ(ierr);
-    }
+    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(eps->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   ierr = PetscMalloc2(n,&x,n,&y);CHKERRQ(ierr);
   for (i=0;i<n;i++) {
     x[i] = (PetscReal)its;
@@ -414,22 +435,10 @@ PetscErrorCode EPSMonitorLGAll(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *
     else y[i] = 0.0;
   }
   ierr = PetscDrawLGAddPoint(lg,x,y);CHKERRQ(ierr);
-  if (eps->ishermitian) {
-    ierr = PetscMalloc(sizeof(PetscReal)*n,&myeigr);CHKERRQ(ierr);
-    for (i=0;i<n;i++) {
-      er = eigr[i]; ei = eigi[i];
-      ierr = STBackTransform(eps->st,1,&er,&ei);CHKERRQ(ierr);
-      if (i < nest) myeigr[i] = PetscRealPart(er);
-      else myeigr[i] = 0.0;
-    }
-    ierr = PetscDrawLGAddPoint(lg1,x,myeigr);CHKERRQ(ierr);
-    ierr = PetscDrawGetPause(draw1,&p);CHKERRQ(ierr);
-    ierr = PetscDrawSetPause(draw1,0);CHKERRQ(ierr);
-    ierr = PetscDrawLGDraw(lg1);CHKERRQ(ierr);
-    ierr = PetscDrawSetPause(draw1,p);CHKERRQ(ierr);
-    ierr = PetscFree(myeigr);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || eps->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
   }
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
   ierr = PetscFree2(x,y);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
diff --git a/src/eps/interface/epsmon.c.html b/src/eps/interface/epsmon.c.html
index 072c332..61c43c7 100644
--- a/src/eps/interface/epsmon.c.html
+++ b/src/eps/interface/epsmon.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epsmon.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:41+00:00">
+<meta name="date" content="2016-05-16T10:32:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epsmon.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epsmon.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> routines related to monitors.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -171,244 +171,237 @@
 <a name="line178">178: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
 <a name="line179">179: </a><font color="#B22222">.  errest - error estimates</font>
 <a name="line180">180: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line181">181: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
+<a name="line181">181: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
 
 <a name="line183">183: </a><font color="#B22222">   Level: intermediate</font>
 
 <a name="line185">185: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>()</font>
 <a name="line186">186: </a><font color="#B22222">@*/</font>
-<a name="line187">187: </a><strong><font color="#4169E1"><a name="EPSMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
+<a name="line187">187: </a><strong><font color="#4169E1"><a name="EPSMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
 <a name="line188">188: </a>{
 <a name="line190">190: </a>  PetscInt       i;
 <a name="line191">191: </a>  PetscScalar    er,ei;
-<a name="line192">192: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
-
-<a name="line195">195: </a>  <font color="#4169E1">if</font> (its) {
-<a name="line196">196: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line197">197: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> nconv=%D Values (Errors)"</font>,its,nconv);
-<a name="line198">198: </a>    <font color="#4169E1">for</font> (i=0;i<nest;i++) {
-<a name="line199">199: </a>      er = eigr[i]; ei = eigi[i];
-<a name="line200">200: </a>      <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line201">201: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line202">202: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
-<a name="line203">203: </a><font color="#A020F0">#else</font>
-<a name="line204">204: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
-<a name="line205">205: </a>      <font color="#4169E1">if</font> (ei!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
-<a name="line206">206: </a><font color="#A020F0">#endif</font>
-<a name="line207">207: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)"</font>,(double)errest[i]);
-<a name="line208">208: </a>    }
-<a name="line209">209: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line210">210: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line211">211: </a>  }
-<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
-<a name="line213">213: </a>}
-
-<a name="line217">217: </a><font color="#B22222">/*@C</font>
-<a name="line218">218: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a> - Print the first approximate value and</font>
-<a name="line219">219: </a><font color="#B22222">   error estimate at each iteration of the eigensolver.</font>
-
-<a name="line221">221: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line223">223: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line224">224: </a><font color="#B22222">+  eps    - eigensolver context</font>
-<a name="line225">225: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line226">226: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line227">227: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
-<a name="line228">228: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
-<a name="line229">229: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line230">230: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line231">231: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
-
-<a name="line233">233: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line235">235: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>()</font>
-<a name="line236">236: </a><font color="#B22222">@*/</font>
-<a name="line237">237: </a><strong><font color="#4169E1"><a name="EPSMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line238">238: </a>{
-<a name="line240">240: </a>  PetscScalar    er,ei;
-<a name="line241">241: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
-
-<a name="line244">244: </a>  <font color="#4169E1">if</font> (its && nconv<nest) {
-<a name="line245">245: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line246">246: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
-<a name="line247">247: </a>    er = eigr[nconv]; ei = eigi[nconv];
-<a name="line248">248: </a>    <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line249">249: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line250">250: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
-<a name="line251">251: </a><font color="#A020F0">#else</font>
-<a name="line252">252: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
-<a name="line253">253: </a>    <font color="#4169E1">if</font> (ei!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
-<a name="line254">254: </a><font color="#A020F0">#endif</font>
-<a name="line255">255: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[nconv]);
-<a name="line256">256: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line257">257: </a>  }
-<a name="line258">258: </a>  <font color="#4169E1">return</font>(0);
-<a name="line259">259: </a>}
-
-<a name="line263">263: </a><font color="#B22222">/*@C</font>
-<a name="line264">264: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a> - Print the approximate values and</font>
-<a name="line265">265: </a><font color="#B22222">   error estimates as they converge.</font>
-
-<a name="line267">267: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line269">269: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line270">270: </a><font color="#B22222">+  eps    - eigensolver context</font>
-<a name="line271">271: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line272">272: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line273">273: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
-<a name="line274">274: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
-<a name="line275">275: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line276">276: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line277">277: </a><font color="#B22222">-  monctx - monitor context</font>
-
-<a name="line279">279: </a><font color="#B22222">   Note:</font>
-<a name="line280">280: </a><font color="#B22222">   The monitor context must contain a struct with a PetscViewer and a</font>
-<a name="line281">281: </a><font color="#B22222">   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.</font>
-
-<a name="line283">283: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line285">285: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>()</font>
-<a name="line286">286: </a><font color="#B22222">@*/</font>
-<a name="line287">287: </a><strong><font color="#4169E1"><a name="EPSMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line288">288: </a>{
-<a name="line289">289: </a>  PetscErrorCode   ierr;
-<a name="line290">290: </a>  PetscInt         i;
-<a name="line291">291: </a>  PetscScalar      er,ei;
-<a name="line292">292: </a>  PetscViewer      viewer;
-<a name="line293">293: </a>  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
-
-<a name="line296">296: </a>  <font color="#4169E1">if</font> (!monctx) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Must provide a context for <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>"</font>);
-<a name="line297">297: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line298">298: </a>    ctx->oldnconv = 0;
-<a name="line299">299: </a>  } <font color="#4169E1">else</font> {
-<a name="line300">300: </a>    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
-<a name="line301">301: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
-<a name="line302">302: </a>      PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line303">303: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> converged value (error) #%D"</font>,its,i);
-<a name="line304">304: </a>      er = eigr[i]; ei = eigi[i];
-<a name="line305">305: </a>      <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line306">306: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line307">307: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
-<a name="line308">308: </a><font color="#A020F0">#else</font>
-<a name="line309">309: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
-<a name="line310">310: </a>      <font color="#4169E1">if</font> (ei!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
-<a name="line311">311: </a><font color="#A020F0">#endif</font>
-<a name="line312">312: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[i]);
-<a name="line313">313: </a>      PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line314">314: </a>    }
-<a name="line315">315: </a>    ctx->oldnconv = nconv;
-<a name="line316">316: </a>  }
-<a name="line317">317: </a>  <font color="#4169E1">return</font>(0);
-<a name="line318">318: </a>}
-
-<a name="line322">322: </a><strong><font color="#4169E1"><a name="EPSMonitorLG"></a>PetscErrorCode EPSMonitorLG(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line323">323: </a>{
-<a name="line324">324: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line325">325: </a>  PetscDraw      draw,draw1;
-<a name="line326">326: </a>  PetscDrawLG    lg,lg1;
-<a name="line328">328: </a>  PetscReal      x,y,myeigr,p;
-<a name="line329">329: </a>  PetscScalar    er,ei;
-
-<a name="line332">332: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)eps));
-<a name="line333">333: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line334">334: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line335">335: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line336">336: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line337">337: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line338">338: </a>    PetscDrawLGSetDimension(lg,1);
-<a name="line339">339: </a>    PetscDrawLGReset(lg);
-<a name="line340">340: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(eps->tol)-2,0.0);
-<a name="line341">341: </a>  }
-
-<a name="line343">343: </a>  <font color="#B22222">/* In the hermitian case, the eigenvalues are real and can be plotted */</font>
-<a name="line344">344: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line345">345: </a>    PetscViewerDrawGetDraw(viewer,1,&draw1);
-<a name="line346">346: </a>    PetscViewerDrawGetDrawLG(viewer,1,&lg1);
-<a name="line347">347: </a>    <font color="#4169E1">if</font> (!its) {
-<a name="line348">348: </a>      PetscDrawSetTitle(draw1,<font color="#666666">"Approximate eigenvalues"</font>);
-<a name="line349">349: </a>      PetscDrawSetDoubleBuffer(draw1);
-<a name="line350">350: </a>      PetscDrawLGSetDimension(lg1,1);
-<a name="line351">351: </a>      PetscDrawLGReset(lg1);
-<a name="line352">352: </a>      PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);
-<a name="line353">353: </a>    }
-<a name="line354">354: </a>  }
-
-<a name="line356">356: </a>  x = (PetscReal)its;
-<a name="line357">357: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]); <font color="#4169E1">else</font> y = 0.0;
-<a name="line358">358: </a>  PetscDrawLGAddPoint(lg,&x,&y);
-<a name="line359">359: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line360">360: </a>    er = eigr[nconv]; ei = eigi[nconv];
-<a name="line361">361: </a>    <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line362">362: </a>    myeigr = PetscRealPart(er);
-<a name="line363">363: </a>    PetscDrawLGAddPoint(lg1,&x,&myeigr);
-<a name="line364">364: </a>    PetscDrawGetPause(draw1,&p);
-<a name="line365">365: </a>    PetscDrawSetPause(draw1,0);
-<a name="line366">366: </a>    PetscDrawLGDraw(lg1);
-<a name="line367">367: </a>    PetscDrawSetPause(draw1,p);
-<a name="line368">368: </a>  }
-<a name="line369">369: </a>  PetscDrawLGDraw(lg);
-<a name="line370">370: </a>  <font color="#4169E1">return</font>(0);
-<a name="line371">371: </a>}
-
-<a name="line375">375: </a><strong><font color="#4169E1"><a name="EPSMonitorLGAll"></a>PetscErrorCode EPSMonitorLGAll(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line376">376: </a>{
-<a name="line377">377: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line378">378: </a>  PetscDraw      draw,draw1;
-<a name="line379">379: </a>  PetscDrawLG    lg,lg1;
-<a name="line381">381: </a>  PetscReal      *x,*y,*myeigr,p;
-<a name="line382">382: </a>  PetscInt       i,n = PetscMin(eps->nev,255);
-<a name="line383">383: </a>  PetscScalar    er,ei;
-
-<a name="line386">386: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)eps));
-<a name="line387">387: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line388">388: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line389">389: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line390">390: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line391">391: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line392">392: </a>    PetscDrawLGSetDimension(lg,n);
-<a name="line393">393: </a>    PetscDrawLGReset(lg);
-<a name="line394">394: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(eps->tol)-2,0.0);
-<a name="line395">395: </a>  }
-
-<a name="line397">397: </a>  <font color="#B22222">/* In the hermitian case, the eigenvalues are real and can be plotted */</font>
-<a name="line398">398: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line399">399: </a>    PetscViewerDrawGetDraw(viewer,1,&draw1);
-<a name="line400">400: </a>    PetscViewerDrawGetDrawLG(viewer,1,&lg1);
-<a name="line401">401: </a>    <font color="#4169E1">if</font> (!its) {
-<a name="line402">402: </a>      PetscDrawSetTitle(draw1,<font color="#666666">"Approximate eigenvalues"</font>);
-<a name="line403">403: </a>      PetscDrawSetDoubleBuffer(draw1);
-<a name="line404">404: </a>      PetscDrawLGSetDimension(lg1,n);
-<a name="line405">405: </a>      PetscDrawLGReset(lg1);
-<a name="line406">406: </a>      PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);
-<a name="line407">407: </a>    }
-<a name="line408">408: </a>  }
-
-<a name="line410">410: </a>  PetscMalloc2(n,&x,n,&y);
-<a name="line411">411: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line412">412: </a>    x[i] = (PetscReal)its;
-<a name="line413">413: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
-<a name="line414">414: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
-<a name="line415">415: </a>  }
-<a name="line416">416: </a>  PetscDrawLGAddPoint(lg,x,y);
-<a name="line417">417: </a>  <font color="#4169E1">if</font> (eps->ishermitian) {
-<a name="line418">418: </a>    PetscMalloc(<font color="#4169E1">sizeof</font>(PetscReal)*n,&myeigr);
-<a name="line419">419: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line420">420: </a>      er = eigr[i]; ei = eigi[i];
-<a name="line421">421: </a>      <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line422">422: </a>      <font color="#4169E1">if</font> (i < nest) myeigr[i] = PetscRealPart(er);
-<a name="line423">423: </a>      <font color="#4169E1">else</font> myeigr[i] = 0.0;
-<a name="line424">424: </a>    }
-<a name="line425">425: </a>    PetscDrawLGAddPoint(lg1,x,myeigr);
-<a name="line426">426: </a>    PetscDrawGetPause(draw1,&p);
-<a name="line427">427: </a>    PetscDrawSetPause(draw1,0);
-<a name="line428">428: </a>    PetscDrawLGDraw(lg1);
-<a name="line429">429: </a>    PetscDrawSetPause(draw1,p);
-<a name="line430">430: </a>    PetscFree(myeigr);
-<a name="line431">431: </a>  }
-<a name="line432">432: </a>  PetscDrawLGDraw(lg);
-<a name="line433">433: </a>  PetscFree2(x,y);
-<a name="line434">434: </a>  <font color="#4169E1">return</font>(0);
-<a name="line435">435: </a>}
+<a name="line192">192: </a>  PetscViewer    viewer;
+
+<a name="line197">197: </a>  viewer = vf->viewer;
+<a name="line199">199: </a>  PetscViewerPushFormat(viewer,vf->format);
+<a name="line200">200: </a>  PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line201">201: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)eps)->prefix) {
+<a name="line202">202: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Eigenvalue approximations and residual norms for %s solve.\n"</font>,((PetscObject)eps)->prefix);
+<a name="line203">203: </a>  }
+<a name="line204">204: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> nconv=%D Values (Errors)"</font>,its,nconv);
+<a name="line205">205: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line206">206: </a>  <font color="#4169E1">for</font> (i=0;i<nest;i++) {
+<a name="line207">207: </a>    er = eigr[i]; ei = eigi[i];
+<a name="line208">208: </a>    <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
+<a name="line209">209: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line210">210: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
+<a name="line211">211: </a><font color="#A020F0">#else</font>
+<a name="line212">212: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
+<a name="line213">213: </a>    <font color="#4169E1">if</font> (ei!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
+<a name="line214">214: </a><font color="#A020F0">#endif</font>
+<a name="line215">215: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)"</font>,(double)errest[i]);
+<a name="line216">216: </a>  }
+<a name="line217">217: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line218">218: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line219">219: </a>  PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line220">220: </a>  PetscViewerPopFormat(viewer);
+<a name="line221">221: </a>  <font color="#4169E1">return</font>(0);
+<a name="line222">222: </a>}
+
+<a name="line226">226: </a><font color="#B22222">/*@C</font>
+<a name="line227">227: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a> - Print the first approximate value and</font>
+<a name="line228">228: </a><font color="#B22222">   error estimate at each iteration of the eigensolver.</font>
+
+<a name="line230">230: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line232">232: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line233">233: </a><font color="#B22222">+  eps    - eigensolver context</font>
+<a name="line234">234: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line235">235: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line236">236: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line237">237: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line238">238: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line239">239: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line240">240: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
+
+<a name="line242">242: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line244">244: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>()</font>
+<a name="line245">245: </a><font color="#B22222">@*/</font>
+<a name="line246">246: </a><strong><font color="#4169E1"><a name="EPSMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
+<a name="line247">247: </a>{
+<a name="line249">249: </a>  PetscScalar    er,ei;
+<a name="line250">250: </a>  PetscViewer    viewer;
+
+<a name="line255">255: </a>  viewer = vf->viewer;
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)eps)->prefix) {
+<a name="line258">258: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Eigenvalue approximations and residual norms for %s solve.\n"</font>,((PetscObject)eps)->prefix);
+<a name="line259">259: </a>  }
+<a name="line260">260: </a>  <font color="#4169E1">if</font> (nconv<nest) {
+<a name="line261">261: </a>    PetscViewerPushFormat(viewer,vf->format);
+<a name="line262">262: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line263">263: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
+<a name="line264">264: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line265">265: </a>    er = eigr[nconv]; ei = eigi[nconv];
+<a name="line266">266: </a>    <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
+<a name="line267">267: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line268">268: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
+<a name="line269">269: </a><font color="#A020F0">#else</font>
+<a name="line270">270: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
+<a name="line271">271: </a>    <font color="#4169E1">if</font> (ei!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
+<a name="line272">272: </a><font color="#A020F0">#endif</font>
+<a name="line273">273: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[nconv]);
+<a name="line274">274: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line275">275: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line276">276: </a>    PetscViewerPopFormat(viewer);
+<a name="line277">277: </a>  }
+<a name="line278">278: </a>  <font color="#4169E1">return</font>(0);
+<a name="line279">279: </a>}
+
+<a name="line283">283: </a><font color="#B22222">/*@C</font>
+<a name="line284">284: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a> - Print the approximate values and</font>
+<a name="line285">285: </a><font color="#B22222">   error estimates as they converge.</font>
+
+<a name="line287">287: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line289">289: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line290">290: </a><font color="#B22222">+  eps    - eigensolver context</font>
+<a name="line291">291: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line292">292: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line293">293: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line294">294: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line295">295: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line296">296: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line297">297: </a><font color="#B22222">-  ctx    - monitor context</font>
+
+<a name="line299">299: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line301">301: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>()</font>
+<a name="line302">302: </a><font color="#B22222">@*/</font>
+<a name="line303">303: </a><strong><font color="#4169E1"><a name="EPSMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)</font></strong>
+<a name="line304">304: </a>{
+<a name="line306">306: </a>  PetscInt       i;
+<a name="line307">307: </a>  PetscScalar    er,ei;
+<a name="line308">308: </a>  PetscViewer    viewer;
+
+<a name="line313">313: </a>  viewer = ctx->viewer;
+<a name="line315">315: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)eps)->prefix) {
+<a name="line316">316: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Convergence history for %s solve.\n"</font>,((PetscObject)eps)->prefix);
+<a name="line317">317: </a>  }
+<a name="line318">318: </a>  <font color="#4169E1">if</font> (its==1) ctx->oldnconv = 0;
+<a name="line319">319: </a>  <font color="#4169E1">if</font> (ctx->oldnconv!=nconv) {
+<a name="line320">320: </a>    PetscViewerPushFormat(viewer,ctx->format);
+<a name="line321">321: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line322">322: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
+<a name="line323">323: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> converged value (error) #%D"</font>,its,i);
+<a name="line324">324: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line325">325: </a>      er = eigr[i]; ei = eigi[i];
+<a name="line326">326: </a>      <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
+<a name="line327">327: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line328">328: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
+<a name="line329">329: </a><font color="#A020F0">#else</font>
+<a name="line330">330: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
+<a name="line331">331: </a>      <font color="#4169E1">if</font> (ei!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
+<a name="line332">332: </a><font color="#A020F0">#endif</font>
+<a name="line333">333: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[i]);
+<a name="line334">334: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line335">335: </a>    }
+<a name="line336">336: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line337">337: </a>    PetscViewerPopFormat(viewer);
+<a name="line338">338: </a>    ctx->oldnconv = nconv;
+<a name="line339">339: </a>  }
+<a name="line340">340: </a>  <font color="#4169E1">return</font>(0);
+<a name="line341">341: </a>}
+
+<a name="line345">345: </a><font color="#B22222">/*@C</font>
+<a name="line346">346: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSMonitorLGCreate.html#EPSMonitorLGCreate">EPSMonitorLGCreate</a> - Creates a line graph context for use with</font>
+<a name="line347">347: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> to monitor convergence.</font>
+
+<a name="line349">349: </a><font color="#B22222">   Collective on MPI_Comm</font>
+
+<a name="line351">351: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line352">352: </a><font color="#B22222">+  comm - communicator context</font>
+<a name="line353">353: </a><font color="#B22222">.  host - the X display to open, or null for the local machine</font>
+<a name="line354">354: </a><font color="#B22222">.  label - the title to put in the title bar</font>
+<a name="line355">355: </a><font color="#B22222">.  x, y - the screen coordinates of the upper left coordinate of</font>
+<a name="line356">356: </a><font color="#B22222">          the window</font>
+<a name="line357">357: </a><font color="#B22222">-  m, n - the screen width and height in pixels</font>
+
+<a name="line359">359: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line360">360: </a><font color="#B22222">.  lgctx - the drawing context</font>
+
+<a name="line362">362: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line363">363: </a><font color="#B22222">+  -eps_monitor_lg - Sets line graph monitor for the first residual</font>
+<a name="line364">364: </a><font color="#B22222">-  -eps_monitor_lg_all - Sets line graph monitor for all residuals</font>
+
+<a name="line366">366: </a><font color="#B22222">   Notes:</font>
+<a name="line367">367: </a><font color="#B22222">   Use PetscDrawLGDestroy() to destroy this line graph.</font>
+
+<a name="line369">369: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line371">371: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>()</font>
+<a name="line372">372: </a><font color="#B22222">@*/</font>
+<a name="line373">373: </a><strong><font color="#4169E1"><a name="EPSMonitorLGCreate"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorLGCreate.html#EPSMonitorLGCreate">EPSMonitorLGCreate</a>(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)</font></strong>
+<a name="line374">374: </a>{
+<a name="line375">375: </a>  PetscDraw      draw;
+<a name="line376">376: </a>  PetscDrawLG    lg;
+
+<a name="line380">380: </a>  PetscDrawCreate(comm,host,label,x,y,m,n,&draw);
+<a name="line381">381: </a>  PetscDrawSetFromOptions(draw);
+<a name="line382">382: </a>  PetscDrawLGCreate(draw,1,&lg);
+<a name="line383">383: </a>  PetscDrawLGSetFromOptions(lg);
+<a name="line384">384: </a>  PetscDrawDestroy(&draw);
+<a name="line385">385: </a>  *lgctx = lg;
+<a name="line386">386: </a>  <font color="#4169E1">return</font>(0);
+<a name="line387">387: </a>}
+
+<a name="line391">391: </a><strong><font color="#4169E1"><a name="EPSMonitorLG"></a>PetscErrorCode EPSMonitorLG(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line392">392: </a>{
+<a name="line393">393: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line394">394: </a>  PetscReal      x,y;
+
+<a name="line399">399: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line400">400: </a>    PetscDrawLGReset(lg);
+<a name="line401">401: </a>    PetscDrawLGSetDimension(lg,1);
+<a name="line402">402: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(eps->tol)-2,0.0);
+<a name="line403">403: </a>  }
+<a name="line404">404: </a>  x = (PetscReal)its;
+<a name="line405">405: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+<a name="line406">406: </a>  <font color="#4169E1">else</font> y = 0.0;
+<a name="line407">407: </a>  PetscDrawLGAddPoint(lg,&x,&y);
+<a name="line408">408: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || eps->reason) {
+<a name="line409">409: </a>    PetscDrawLGDraw(lg);
+<a name="line410">410: </a>    PetscDrawLGSave(lg);
+<a name="line411">411: </a>  }
+<a name="line412">412: </a>  <font color="#4169E1">return</font>(0);
+<a name="line413">413: </a>}
+
+<a name="line417">417: </a><strong><font color="#4169E1"><a name="EPSMonitorLGAll"></a>PetscErrorCode EPSMonitorLGAll(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line418">418: </a>{
+<a name="line419">419: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line420">420: </a>  PetscInt       i,n = PetscMin(eps->nev,255);
+<a name="line421">421: </a>  PetscReal      *x,*y;
+
+<a name="line426">426: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line427">427: </a>    PetscDrawLGReset(lg);
+<a name="line428">428: </a>    PetscDrawLGSetDimension(lg,n);
+<a name="line429">429: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(eps->tol)-2,0.0);
+<a name="line430">430: </a>  }
+<a name="line431">431: </a>  PetscMalloc2(n,&x,n,&y);
+<a name="line432">432: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line433">433: </a>    x[i] = (PetscReal)its;
+<a name="line434">434: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
+<a name="line435">435: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
+<a name="line436">436: </a>  }
+<a name="line437">437: </a>  PetscDrawLGAddPoint(lg,x,y);
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || eps->reason) {
+<a name="line439">439: </a>    PetscDrawLGDraw(lg);
+<a name="line440">440: </a>    PetscDrawLGSave(lg);
+<a name="line441">441: </a>  }
+<a name="line442">442: </a>  PetscFree2(x,y);
+<a name="line443">443: </a>  <font color="#4169E1">return</font>(0);
+<a name="line444">444: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/epsopts.c b/src/eps/interface/epsopts.c
index 30d8b84..aac96e6 100644
--- a/src/eps/interface/epsopts.c
+++ b/src/eps/interface/epsopts.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -23,6 +23,85 @@
 */
 
 #include <slepc/private/epsimpl.h>   /*I "slepceps.h" I*/
+#include <petscdraw.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSMonitorSetFromOptions"
+/*@C
+   EPSMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user.
+
+   Collective on EPS
+
+   Input Parameters:
++  eps      - the eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+.  monitor  - the monitor function, whose context is a PetscViewerAndFormat
+-  trackall - whether this monitor tracks all eigenvalues or not
+
+   Level: developer
+
+.seealso: EPSMonitorSet(), EPSSetTrackAll(), EPSConvMonitorSetFromOptions()
+@*/
+PetscErrorCode EPSMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+{
+  PetscErrorCode       ierr;
+  PetscBool            flg;
+  PetscViewer          viewer;
+  PetscViewerFormat    format;
+  PetscViewerAndFormat *vf;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = PetscViewerAndFormatCreate(viewer,format,&vf);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = EPSMonitorSet(eps,(PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
+    if (trackall) {
+      ierr = EPSSetTrackAll(eps,PETSC_TRUE);CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSConvMonitorSetFromOptions"
+/*@C
+   EPSConvMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user (for monitors that only show iteration numbers of convergence).
+
+   Collective on EPS
+
+   Input Parameters:
++  eps      - the eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+-  monitor  - the monitor function, whose context is a SlepcConvMonitor
+
+   Level: developer
+
+.seealso: EPSMonitorSet(), EPSMonitorSetFromOptions()
+@*/
+PetscErrorCode EPSConvMonitorSetFromOptions(EPS eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))
+{
+  PetscErrorCode    ierr;
+  PetscBool         flg;
+  PetscViewer       viewer;
+  PetscViewerFormat format;
+  SlepcConvMonitor  ctx;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = SlepcConvMonitorCreate(viewer,format,&ctx);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = EPSMonitorSet(eps,(PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "EPSSetFromOptions"
@@ -43,14 +122,13 @@
 @*/
 PetscErrorCode EPSSetFromOptions(EPS eps)
 {
-  PetscErrorCode   ierr;
-  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-  PetscBool        flg,flg1,flg2,flg3;
-  PetscReal        r,array[2]={0,0};
-  PetscScalar      s;
-  PetscInt         i,j,k;
-  PetscViewer      monviewer;
-  SlepcConvMonitor ctx;
+  PetscErrorCode ierr;
+  char           type[256];
+  PetscBool      set,flg,flg1,flg2,flg3;
+  PetscReal      r,array[2]={0,0};
+  PetscScalar    s;
+  PetscInt       i,j,k;
+  PetscDrawLG    lg;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
@@ -113,8 +191,8 @@ PetscErrorCode EPSSetFromOptions(EPS eps)
       ierr = EPSSetTolerances(eps,r,i);CHKERRQ(ierr);
     }
 
-    ierr = PetscOptionsBoolGroupBegin("-eps_conv_eig","Relative error convergence test","EPSSetConvergenceTest",&flg);CHKERRQ(ierr);
-    if (flg) { ierr = EPSSetConvergenceTest(eps,EPS_CONV_EIG);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupBegin("-eps_conv_rel","Relative error convergence test","EPSSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = EPSSetConvergenceTest(eps,EPS_CONV_REL);CHKERRQ(ierr); }
     ierr = PetscOptionsBoolGroup("-eps_conv_norm","Convergence test relative to the eigenvalue and the matrix norms","EPSSetConvergenceTest",&flg);CHKERRQ(ierr);
     if (flg) { ierr = EPSSetConvergenceTest(eps,EPS_CONV_NORM);CHKERRQ(ierr); }
     ierr = PetscOptionsBoolGroup("-eps_conv_abs","Absolute error convergence test","EPSSetConvergenceTest",&flg);CHKERRQ(ierr);
@@ -122,6 +200,11 @@ PetscErrorCode EPSSetFromOptions(EPS eps)
     ierr = PetscOptionsBoolGroupEnd("-eps_conv_user","User-defined convergence test","EPSSetConvergenceTest",&flg);CHKERRQ(ierr);
     if (flg) { ierr = EPSSetConvergenceTest(eps,EPS_CONV_USER);CHKERRQ(ierr); }
 
+    ierr = PetscOptionsBoolGroupBegin("-eps_stop_basic","Stop iteration if all eigenvalues converged or max_it reached","EPSSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = EPSSetStoppingTest(eps,EPS_STOP_BASIC);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-eps_stop_user","User-defined stopping test","EPSSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = EPSSetStoppingTest(eps,EPS_STOP_USER);CHKERRQ(ierr); }
+
     i = eps->nev;
     ierr = PetscOptionsInt("-eps_nev","Number of eigenvalues to compute","EPSSetDimensions",eps->nev,&i,&flg1);CHKERRQ(ierr);
     j = eps->ncv? eps->ncv: PETSC_DEFAULT;
@@ -136,40 +219,28 @@ PetscErrorCode EPSSetFromOptions(EPS eps)
     /*
       Cancels all monitors hardwired into code before call to EPSSetFromOptions()
     */
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-eps_monitor_cancel","Remove any hardwired monitor routines","EPSMonitorCancel",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
+    ierr = PetscOptionsBool("-eps_monitor_cancel","Remove any hardwired monitor routines","EPSMonitorCancel",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
       ierr = EPSMonitorCancel(eps);CHKERRQ(ierr);
     }
     /*
-      Prints approximate eigenvalues and error estimates at each iteration
+      Text monitors
     */
-    ierr = PetscOptionsString("-eps_monitor","Monitor first unconverged approximate eigenvalue and error estimate","EPSMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)eps),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = EPSMonitorSet(eps,EPSMonitorFirst,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-eps_monitor_conv","Monitor approximate eigenvalues and error estimates as they converge","EPSMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscNew(&ctx);CHKERRQ(ierr);
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)eps),monfilename,&ctx->viewer);CHKERRQ(ierr);
-      ierr = EPSMonitorSet(eps,EPSMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-eps_monitor_all","Monitor approximate eigenvalues and error estimates","EPSMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)eps),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = EPSMonitorSet(eps,EPSMonitorAll,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-      ierr = EPSSetTrackAll(eps,PETSC_TRUE);CHKERRQ(ierr);
-    }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-eps_monitor_lg","Monitor first unconverged approximate eigenvalue and error estimate graphically","EPSMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = EPSMonitorSet(eps,EPSMonitorLG,NULL,NULL);CHKERRQ(ierr);
+    ierr = EPSMonitorSetFromOptions(eps,"-eps_monitor","Monitor first unconverged approximate eigenvalue and error estimate","EPSMonitorFirst",EPSMonitorFirst,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = EPSConvMonitorSetFromOptions(eps,"-eps_monitor_conv","Monitor approximate eigenvalues and error estimates as they converge","EPSMonitorConverged",EPSMonitorConverged);CHKERRQ(ierr);
+    ierr = EPSMonitorSetFromOptions(eps,"-eps_monitor_all","Monitor approximate eigenvalues and error estimates","EPSMonitorAll",EPSMonitorAll,PETSC_TRUE);CHKERRQ(ierr);
+    /*
+      Line graph monitors
+    */
+    ierr = PetscOptionsBool("-eps_monitor_lg","Monitor first unconverged approximate eigenvalue and error estimate graphically","EPSMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = EPSMonitorLGCreate(PetscObjectComm((PetscObject)eps),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = EPSMonitorSet(eps,EPSMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
     }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-eps_monitor_lg_all","Monitor error estimates graphically","EPSMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = EPSMonitorSet(eps,EPSMonitorLGAll,NULL,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsBool("-eps_monitor_lg_all","Monitor error estimates graphically","EPSMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = EPSMonitorLGCreate(PetscObjectComm((PetscObject)eps),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = EPSMonitorSet(eps,EPSMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
       ierr = EPSSetTrackAll(eps,PETSC_TRUE);CHKERRQ(ierr);
     }
   /* -----------------------------------------------------------------------*/
@@ -191,7 +262,7 @@ PetscErrorCode EPSSetFromOptions(EPS eps)
     if (flg) { ierr = EPSSetWhichEigenpairs(eps,EPS_TARGET_REAL);CHKERRQ(ierr); }
     ierr = PetscOptionsBoolGroup("-eps_target_imaginary","compute eigenvalues with imaginary parts close to target","EPSSetWhichEigenpairs",&flg);CHKERRQ(ierr);
     if (flg) { ierr = EPSSetWhichEigenpairs(eps,EPS_TARGET_IMAGINARY);CHKERRQ(ierr); }
-    ierr = PetscOptionsBoolGroupEnd("-eps_all","compute all eigenvalues in an interval","EPSSetWhichEigenpairs",&flg);CHKERRQ(ierr);
+    ierr = PetscOptionsBoolGroupEnd("-eps_all","compute all eigenvalues in an interval or a region","EPSSetWhichEigenpairs",&flg);CHKERRQ(ierr);
     if (flg) { ierr = EPSSetWhichEigenpairs(eps,EPS_ALL);CHKERRQ(ierr); }
 
     ierr = PetscOptionsScalar("-eps_target","Value of the target","EPSSetTarget",eps->target,&s,&flg);CHKERRQ(ierr);
@@ -212,18 +283,18 @@ PetscErrorCode EPSSetFromOptions(EPS eps)
     ierr = PetscOptionsBool("-eps_true_residual","Compute true residuals explicitly","EPSSetTrueResidual",eps->trueres,&eps->trueres,NULL);CHKERRQ(ierr);
     ierr = PetscOptionsBool("-eps_purify","Postprocess eigenvectors for purification","EPSSetPurify",eps->purify,&eps->purify,NULL);CHKERRQ(ierr);
 
-    ierr = PetscOptionsName("-eps_view","Print detailed information on solver used","EPSView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-eps_view_vectors","View computed eigenvectors","EPSVectorsView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-eps_view_values","View computed eigenvalues","EPSValuesView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-eps_converged_reason","Print reason for convergence, and number of iterations","EPSReasonView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-eps_error_absolute","Print absolute errors of each eigenpair","EPSErrorView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-eps_error_relative","Print relative errors of each eigenpair","EPSErrorView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-eps_error_backward","Print backward errors of each eigenpair","EPSErrorView",0);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_view","Print detailed information on solver used","EPSView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_view_vectors","View computed eigenvectors","EPSVectorsView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_view_values","View computed eigenvalues","EPSValuesView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_converged_reason","Print reason for convergence, and number of iterations","EPSReasonView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_error_absolute","Print absolute errors of each eigenpair","EPSErrorView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_error_relative","Print relative errors of each eigenpair","EPSErrorView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-eps_error_backward","Print backward errors of each eigenpair","EPSErrorView",NULL);CHKERRQ(ierr);
 
     if (eps->ops->setfromoptions) {
       ierr = (*eps->ops->setfromoptions)(PetscOptionsObject,eps);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)eps);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)eps);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
 
   if (!eps->V) { ierr = EPSGetBV(eps,&eps->V);CHKERRQ(ierr); }
@@ -234,7 +305,6 @@ PetscErrorCode EPSSetFromOptions(EPS eps)
   ierr = DSSetFromOptions(eps->ds);CHKERRQ(ierr);
   if (!eps->st) { ierr = EPSGetST(eps,&eps->st);CHKERRQ(ierr); }
   ierr = STSetFromOptions(eps->st);CHKERRQ(ierr);
-  ierr = PetscRandomSetFromOptions(eps->rand);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -435,7 +505,7 @@ PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
 .     EPS_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)
 .     EPS_TARGET_REAL - eigenvalues with real part closest to target
 .     EPS_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target
-.     EPS_ALL - all eigenvalues contained in a given interval
+.     EPS_ALL - all eigenvalues contained in a given interval or region
 -     EPS_WHICH_USER - user defined ordering set with EPSSetEigenvalueComparison()
 
    Options Database Keys:
@@ -448,7 +518,7 @@ PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
 .   -eps_target_magnitude - Sets eigenvalues closest to target
 .   -eps_target_real - Sets real parts closest to target
 .   -eps_target_imaginary - Sets imaginary parts closest to target
--   -eps_all - Sets all eigenvalues in an interval
+-   -eps_all - Sets all eigenvalues in an interval or region
 
    Notes:
    Not all eigensolvers implemented in EPS account for all the possible values
@@ -463,8 +533,9 @@ PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
    SLEPc have been built with complex scalars.
 
    EPS_ALL is intended for use in combination with an interval (see
-   EPSSetInterval()), when all eigenvalues within the interval are requested.
-   In that case, the number of eigenvalues is unknown, so the nev parameter
+   EPSSetInterval()), when all eigenvalues within the interval are requested,
+   or in the context of the CISS solver for computing all eigenvalues in a region.
+   In those cases, the number of eigenvalues is unknown, so the nev parameter
    has a different sense, see EPSSetDimensions().
 
    Level: intermediate
@@ -645,9 +716,8 @@ PetscErrorCode EPSSetArbitrarySelection(EPS eps,PetscErrorCode (*func)(PetscScal
    Input Parameters:
 +  eps     - eigensolver context obtained from EPSCreate()
 .  func    - a pointer to the convergence test function
-.  ctx     - [optional] context for private data for the convergence routine
--  destroy - [optional] destructor for the context (may be NULL;
-             PETSC_NULL_FUNCTION in Fortran)
+.  ctx     - context for private data for the convergence routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
 
    Calling Sequence of func:
 $   func(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
@@ -657,7 +727,7 @@ $   func(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *erre
 .   eigi   - imaginary part of the eigenvalue
 .   res    - residual norm associated to the eigenpair
 .   errest - (output) computed error estimate
--   ctx    - optional context, as set by EPSSetConvergenceTest()
+-   ctx    - optional context, as set by EPSSetConvergenceTestFunction()
 
    Note:
    If the error estimate returned by the convergence test function is less than
@@ -679,8 +749,8 @@ PetscErrorCode EPSSetConvergenceTestFunction(EPS eps,PetscErrorCode (*func)(EPS,
   eps->converged        = func;
   eps->convergeddestroy = destroy;
   eps->convergedctx     = ctx;
-  if (func == EPSConvergedEigRelative) eps->conv = EPS_CONV_EIG;
-  else if (func == EPSConvergedNormRelative) eps->conv = EPS_CONV_NORM;
+  if (func == EPSConvergedRelative) eps->conv = EPS_CONV_REL;
+  else if (func == EPSConvergedNorm) eps->conv = EPS_CONV_NORM;
   else if (func == EPSConvergedAbsolute) eps->conv = EPS_CONV_ABS;
   else eps->conv = EPS_CONV_USER;
   PetscFunctionReturn(0);
@@ -700,20 +770,20 @@ PetscErrorCode EPSSetConvergenceTestFunction(EPS eps,PetscErrorCode (*func)(EPS,
 
    Options Database Keys:
 +  -eps_conv_abs  - Sets the absolute convergence test
-.  -eps_conv_eig  - Sets the convergence test relative to the eigenvalue
+.  -eps_conv_rel  - Sets the convergence test relative to the eigenvalue
 .  -eps_conv_norm - Sets the convergence test relative to the matrix norms
 -  -eps_conv_user - Selects the user-defined convergence test
 
    Note:
    The parameter 'conv' can have one of these values
 +     EPS_CONV_ABS  - absolute error ||r||
-.     EPS_CONV_EIG  - error relative to the eigenvalue l, ||r||/|l|
+.     EPS_CONV_REL  - error relative to the eigenvalue l, ||r||/|l|
 .     EPS_CONV_NORM - error relative to the matrix norms, ||r||/(||A||+|l|*||B||)
 -     EPS_CONV_USER - function set by EPSSetConvergenceTestFunction()
 
    Level: intermediate
 
-.seealso: EPSGetConvergenceTest(), EPSSetConvergenceTestFunction(), EPSConv
+.seealso: EPSGetConvergenceTest(), EPSSetConvergenceTestFunction(), EPSSetStoppingTest(), EPSConv
 @*/
 PetscErrorCode EPSSetConvergenceTest(EPS eps,EPSConv conv)
 {
@@ -722,8 +792,8 @@ PetscErrorCode EPSSetConvergenceTest(EPS eps,EPSConv conv)
   PetscValidLogicalCollectiveEnum(eps,conv,2);
   switch (conv) {
     case EPS_CONV_ABS:  eps->converged = EPSConvergedAbsolute; break;
-    case EPS_CONV_EIG:  eps->converged = EPSConvergedEigRelative; break;
-    case EPS_CONV_NORM: eps->converged = EPSConvergedNormRelative; break;
+    case EPS_CONV_REL:  eps->converged = EPSConvergedRelative; break;
+    case EPS_CONV_NORM: eps->converged = EPSConvergedNorm; break;
     case EPS_CONV_USER: break;
     default:
       SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'conv' value");
@@ -760,6 +830,125 @@ PetscErrorCode EPSGetConvergenceTest(EPS eps,EPSConv *conv)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "EPSSetStoppingTestFunction"
+/*@C
+   EPSSetStoppingTestFunction - Sets a function to decide when to stop the outer
+   iteration of the eigensolver.
+
+   Logically Collective on EPS
+
+   Input Parameters:
++  eps     - eigensolver context obtained from EPSCreate()
+.  func    - pointer to the stopping test function
+.  ctx     - context for private data for the stopping routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
+
+   Calling Sequence of func:
+$   func(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)
+
++   eps    - eigensolver context obtained from EPSCreate()
+.   its    - current number of iterations
+.   max_it - maximum number of iterations
+.   nconv  - number of currently converged eigenpairs
+.   nev    - number of requested eigenpairs
+.   reason - (output) result of the stopping test
+-   ctx    - optional context, as set by EPSSetStoppingTestFunction()
+
+   Note:
+   Normal usage is to first call the default routine EPSStoppingBasic() and then
+   set reason to EPS_CONVERGED_USER if some user-defined conditions have been
+   met. To let the eigensolver continue iterating, the result must be left as
+   EPS_CONVERGED_ITERATING.
+
+   Level: advanced
+
+.seealso: EPSSetStoppingTest(), EPSStoppingBasic()
+@*/
+PetscErrorCode EPSSetStoppingTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  if (eps->stoppingdestroy) {
+    ierr = (*eps->stoppingdestroy)(eps->stoppingctx);CHKERRQ(ierr);
+  }
+  eps->stopping        = func;
+  eps->stoppingdestroy = destroy;
+  eps->stoppingctx     = ctx;
+  if (func == EPSStoppingBasic) eps->stop = EPS_STOP_BASIC;
+  else eps->stop = EPS_STOP_USER;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSSetStoppingTest"
+/*@
+   EPSSetStoppingTest - Specifies how to decide the termination of the outer
+   loop of the eigensolver.
+
+   Logically Collective on EPS
+
+   Input Parameters:
++  eps  - eigensolver context obtained from EPSCreate()
+-  stop - the type of stopping test
+
+   Options Database Keys:
++  -eps_stop_basic - Sets the default stopping test
+-  -eps_stop_user  - Selects the user-defined stopping test
+
+   Note:
+   The parameter 'stop' can have one of these values
++     EPS_STOP_BASIC - default stopping test
+-     EPS_STOP_USER  - function set by EPSSetStoppingTestFunction()
+
+   Level: advanced
+
+.seealso: EPSGetStoppingTest(), EPSSetStoppingTestFunction(), EPSSetConvergenceTest(), EPSStop
+@*/
+PetscErrorCode EPSSetStoppingTest(EPS eps,EPSStop stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(eps,stop,2);
+  switch (stop) {
+    case EPS_STOP_BASIC: eps->stopping = EPSStoppingBasic; break;
+    case EPS_STOP_USER:  break;
+    default:
+      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'stop' value");
+  }
+  eps->stop = stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "EPSGetStoppingTest"
+/*@
+   EPSGetStoppingTest - Gets the method used to decide the termination of the outer
+   loop of the eigensolver.
+
+   Not Collective
+
+   Input Parameters:
+.  eps   - eigensolver context obtained from EPSCreate()
+
+   Output Parameters:
+.  stop  - the type of stopping test
+
+   Level: advanced
+
+.seealso: EPSSetStoppingTest(), EPSStop
+@*/
+PetscErrorCode EPSGetStoppingTest(EPS eps,EPSStop *stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  PetscValidPointer(stop,2);
+  *stop = eps->stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "EPSSetProblemType"
 /*@
    EPSSetProblemType - Specifies the type of the eigenvalue problem.
@@ -800,6 +989,7 @@ PetscErrorCode EPSSetProblemType(EPS eps,EPSProblemType type)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
   PetscValidLogicalCollectiveEnum(eps,type,2);
+  if (type == eps->problem_type) PetscFunctionReturn(0);
   switch (type) {
     case EPS_HEP:
       eps->isgeneralized = PETSC_FALSE;
@@ -835,6 +1025,7 @@ PetscErrorCode EPSSetProblemType(EPS eps,EPSProblemType type)
       SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,"Unknown eigenvalue problem type");
   }
   eps->problem_type = type;
+  eps->state = EPS_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
@@ -1325,7 +1516,8 @@ PetscErrorCode EPSAppendOptionsPrefix(EPS eps,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
diff --git a/src/eps/interface/epsopts.c.html b/src/eps/interface/epsopts.c.html
index cd87b4a..8e6ea42 100644
--- a/src/eps/interface/epsopts.c.html
+++ b/src/eps/interface/epsopts.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epsopts.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:45+00:00">
+<meta name="date" content="2016-05-16T10:32:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epsopts.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epsopts.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> routines related to options that can be set via the command-line</font>
 <a name="line3">  3: </a><font color="#B22222">      or procedurally.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,1190 +35,1360 @@
 <a name="line23"> 23: </a><font color="#B22222">*/</font>
 
 <a name="line25"> 25: </a><font color="#A020F0">#include <slepc/private/epsimpl.h>   </font><font color="#B22222">/*I "slepceps.h" I*/</font><font color="#A020F0"></font>
+<a name="line26"> 26: </a><font color="#A020F0">#include <petscdraw.h></font>
 
-<a name="line29"> 29: </a><font color="#B22222">/*@</font>
-<a name="line30"> 30: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a> - Sets <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options from the options database.</font>
-<a name="line31"> 31: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() if the user is to be</font>
-<a name="line32"> 32: </a><font color="#B22222">   allowed to set the solver type.</font>
+<a name="line30"> 30: </a><font color="#B22222">/*@C</font>
+<a name="line31"> 31: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line32"> 32: </a><font color="#B22222">   indicated by the user.</font>
 
 <a name="line34"> 34: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
 
 <a name="line36"> 36: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line37"> 37: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line39"> 39: </a><font color="#B22222">   Notes:</font>
-<a name="line40"> 40: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line42"> 42: </a><font color="#B22222">   Level: beginner</font>
-<a name="line43"> 43: </a><font color="#B22222">@*/</font>
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line45"> 45: </a>{
-<a name="line46"> 46: </a>  PetscErrorCode   ierr;
-<a name="line47"> 47: </a>  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-<a name="line48"> 48: </a>  PetscBool        flg,flg1,flg2,flg3;
-<a name="line49"> 49: </a>  PetscReal        r,array[2]={0,0};
-<a name="line50"> 50: </a>  PetscScalar      s;
-<a name="line51"> 51: </a>  PetscInt         i,j,k;
-<a name="line52"> 52: </a>  PetscViewer      monviewer;
-<a name="line53"> 53: </a>  SlepcConvMonitor ctx;
-
-<a name="line57"> 57: </a>  <a href="../../../docs/manualpages/EPS/EPSRegisterAll.html#EPSRegisterAll">EPSRegisterAll</a>();
-<a name="line58"> 58: </a>  PetscObjectOptionsBegin((PetscObject)eps);
-<a name="line59"> 59: </a>    PetscOptionsFList(<font color="#666666">"-eps_type"</font>,<font color="#666666">"Eigenvalue Problem Solver method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>"</font>,EPSList,(char*)(((PetscObject)eps)->type_name?((PetscObject)eps)->type_name:EPSKRYLOVSCHUR),type,256,&flg);
-<a name="line60"> 60: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line61"> 61: </a>      <a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,type);
-<a name="line62"> 62: </a>    }
-<a name="line63"> 63: </a>    <font color="#B22222">/*</font>
-<a name="line64"> 64: </a><font color="#B22222">      Set the type if it was never set.</font>
-<a name="line65"> 65: </a><font color="#B22222">    */</font>
-<a name="line66"> 66: </a>    <font color="#4169E1">if</font> (!((PetscObject)eps)->type_name) {
-<a name="line67"> 67: </a>      <a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSKRYLOVSCHUR);
-<a name="line68"> 68: </a>    }
-
-<a name="line70"> 70: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_hermitian"</font>,<font color="#666666">"hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
-<a name="line71"> 71: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP); }
-<a name="line72"> 72: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_gen_hermitian"</font>,<font color="#666666">"generalized hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
-<a name="line73"> 73: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GHEP); }
-<a name="line74"> 74: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_non_hermitian"</font>,<font color="#666666">"non-hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
-<a name="line75"> 75: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP); }
-<a name="line76"> 76: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_gen_non_hermitian"</font>,<font color="#666666">"generalized non-hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
-<a name="line77"> 77: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GNHEP); }
-<a name="line78"> 78: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_pos_gen_non_hermitian"</font>,<font color="#666666">"generalized non-hermitian eigenvalue problem with positive semi-definite B"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
-<a name="line79"> 79: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_PGNHEP); }
-<a name="line80"> 80: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_gen_indefinite"</font>,<font color="#666666">"generalized hermitian-indefinite eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
-<a name="line81"> 81: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GHIEP); }
-
-<a name="line83"> 83: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_ritz"</font>,<font color="#666666">"Rayleigh-Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line84"> 84: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_RITZ); }
-<a name="line85"> 85: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic"</font>,<font color="#666666">"harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line86"> 86: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC); }
-<a name="line87"> 87: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic_relative"</font>,<font color="#666666">"relative harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line88"> 88: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC_RELATIVE); }
-<a name="line89"> 89: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic_right"</font>,<font color="#666666">"right harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line90"> 90: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC_RIGHT); }
-<a name="line91"> 91: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic_largest"</font>,<font color="#666666">"largest harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line92"> 92: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC_LARGEST); }
-<a name="line93"> 93: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_refined"</font>,<font color="#666666">"refined Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line94"> 94: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_REFINED); }
-<a name="line95"> 95: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_refined_harmonic"</font>,<font color="#666666">"refined harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
-<a name="line96"> 96: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_REFINED_HARMONIC); }
-
-<a name="line98"> 98: </a>    PetscOptionsEnum(<font color="#666666">"-eps_balance"</font>,<font color="#666666">"Balancing method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>"</font>,EPSBalanceTypes,(PetscEnum)eps->balance,(PetscEnum*)&eps->balance,NULL);
-
-<a name="line100">100: </a>    j = eps->balance_its;
-<a name="line101">101: </a>    PetscOptionsInt(<font color="#666666">"-eps_balance_its"</font>,<font color="#666666">"Number of iterations in balancing"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>"</font>,eps->balance_its,&j,&flg1);
-<a name="line102">102: </a>    r = eps->balance_cutoff;
-<a name="line103">103: </a>    PetscOptionsReal(<font color="#666666">"-eps_balance_cutoff"</font>,<font color="#666666">"Cutoff value in balancing"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>"</font>,eps->balance_cutoff,&r,&flg2);
-<a name="line104">104: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line105">105: </a>      <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(eps,eps->balance,j,r);
-<a name="line106">106: </a>    }
-
-<a name="line108">108: </a>    i = eps->max_it? eps->max_it: PETSC_DEFAULT;
-<a name="line109">109: </a>    PetscOptionsInt(<font color="#666666">"-eps_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>"</font>,eps->max_it,&i,&flg1);
-<a name="line110">110: </a>    r = eps->tol;
-<a name="line111">111: </a>    PetscOptionsReal(<font color="#666666">"-eps_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>"</font>,eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol,&r,&flg2);
-<a name="line112">112: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line113">113: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,r,i);
-<a name="line114">114: </a>    }
-
-<a name="line116">116: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_conv_eig"</font>,<font color="#666666">"Relative error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
-<a name="line117">117: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_EIG); }
-<a name="line118">118: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_conv_norm"</font>,<font color="#666666">"Convergence test relative to the eigenvalue and the matrix norms"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
-<a name="line119">119: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_NORM); }
-<a name="line120">120: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_conv_abs"</font>,<font color="#666666">"Absolute error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
-<a name="line121">121: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_ABS); }
-<a name="line122">122: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_conv_user"</font>,<font color="#666666">"User-defined convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
-<a name="line123">123: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_USER); }
-
-<a name="line125">125: </a>    i = eps->nev;
-<a name="line126">126: </a>    PetscOptionsInt(<font color="#666666">"-eps_nev"</font>,<font color="#666666">"Number of eigenvalues to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>"</font>,eps->nev,&i,&flg1);
-<a name="line127">127: </a>    j = eps->ncv? eps->ncv: PETSC_DEFAULT;
-<a name="line128">128: </a>    PetscOptionsInt(<font color="#666666">"-eps_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>"</font>,eps->ncv,&j,&flg2);
-<a name="line129">129: </a>    k = eps->mpd? eps->mpd: PETSC_DEFAULT;
-<a name="line130">130: </a>    PetscOptionsInt(<font color="#666666">"-eps_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>"</font>,eps->mpd,&k,&flg3);
-<a name="line131">131: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line132">132: </a>      <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,i,j,k);
-<a name="line133">133: </a>    }
-
-<a name="line135">135: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-<a name="line136">136: </a>    <font color="#B22222">/*</font>
-<a name="line137">137: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>()</font>
-<a name="line138">138: </a><font color="#B22222">    */</font>
-<a name="line139">139: </a>    flg = PETSC_FALSE;
-<a name="line140">140: </a>    PetscOptionsBool(<font color="#666666">"-eps_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>"</font>,flg,&flg,NULL);
-<a name="line141">141: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line142">142: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(eps);
-<a name="line143">143: </a>    }
-<a name="line144">144: </a>    <font color="#B22222">/*</font>
-<a name="line145">145: </a><font color="#B22222">      Prints approximate eigenvalues and error estimates at each iteration</font>
-<a name="line146">146: </a><font color="#B22222">    */</font>
-<a name="line147">147: </a>    PetscOptionsString(<font color="#666666">"-eps_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line148">148: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line149">149: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)eps),monfilename,&monviewer);
-<a name="line150">150: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,<a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line151">151: </a>    }
-<a name="line152">152: </a>    PetscOptionsString(<font color="#666666">"-eps_monitor_conv"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line153">153: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line154">154: </a>      PetscNew(&ctx);
-<a name="line155">155: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)eps),monfilename,&ctx->viewer);
-<a name="line156">156: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,<a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-<a name="line157">157: </a>    }
-<a name="line158">158: </a>    PetscOptionsString(<font color="#666666">"-eps_monitor_all"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line159">159: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line160">160: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)eps),monfilename,&monviewer);
-<a name="line161">161: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,<a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line162">162: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(eps,PETSC_TRUE);
-<a name="line163">163: </a>    }
-<a name="line164">164: </a>    flg = PETSC_FALSE;
-<a name="line165">165: </a>    PetscOptionsBool(<font color="#666666">"-eps_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line166">166: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line167">167: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMonitorLG,NULL,NULL);
-<a name="line168">168: </a>    }
-<a name="line169">169: </a>    flg = PETSC_FALSE;
-<a name="line170">170: </a>    PetscOptionsBool(<font color="#666666">"-eps_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line171">171: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line172">172: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMonitorLGAll,NULL,NULL);
-<a name="line173">173: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(eps,PETSC_TRUE);
-<a name="line174">174: </a>    }
-<a name="line175">175: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-<a name="line176">176: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_largest_magnitude"</font>,<font color="#666666">"compute largest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line177">177: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_LARGEST_MAGNITUDE); }
-<a name="line178">178: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_smallest_magnitude"</font>,<font color="#666666">"compute smallest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line179">179: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_MAGNITUDE); }
-<a name="line180">180: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_largest_real"</font>,<font color="#666666">"compute largest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line181">181: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_LARGEST_REAL); }
-<a name="line182">182: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_smallest_real"</font>,<font color="#666666">"compute smallest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line183">183: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_REAL); }
-<a name="line184">184: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_largest_imaginary"</font>,<font color="#666666">"compute largest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_LARGEST_IMAGINARY); }
-<a name="line186">186: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_smallest_imaginary"</font>,<font color="#666666">"compute smallest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line187">187: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_IMAGINARY); }
-<a name="line188">188: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_target_magnitude"</font>,<font color="#666666">"compute nearest eigenvalues to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line189">189: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE); }
-<a name="line190">190: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_target_real"</font>,<font color="#666666">"compute eigenvalues with real parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line191">191: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_REAL); }
-<a name="line192">192: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_target_imaginary"</font>,<font color="#666666">"compute eigenvalues with imaginary parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line193">193: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_IMAGINARY); }
-<a name="line194">194: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_all"</font>,<font color="#666666">"compute all eigenvalues in an interval"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line195">195: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_ALL); }
-
-<a name="line197">197: </a>    PetscOptionsScalar(<font color="#666666">"-eps_target"</font>,<font color="#666666">"Value of the target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>"</font>,eps->target,&s,&flg);
-<a name="line198">198: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line199">199: </a>      <font color="#4169E1">if</font> (eps->which!=EPS_TARGET_REAL && eps->which!=EPS_TARGET_IMAGINARY) {
-<a name="line200">200: </a>        <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE);
-<a name="line201">201: </a>      }
-<a name="line202">202: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,s);
-<a name="line203">203: </a>    }
-<a name="line204">204: </a>    k = 2;
-<a name="line205">205: </a>    PetscOptionsRealArray(<font color="#666666">"-eps_interval"</font>,<font color="#666666">"Computational interval (two real values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>"</font>,array,&k,&flg);
-<a name="line206">206: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line207">207: </a>      <font color="#4169E1">if</font> (k<2) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_SIZ,<font color="#666666">"Must pass two values in -eps_interval (comma-separated without spaces)"</font>);
-<a name="line208">208: </a>      <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_ALL);
-<a name="line209">209: </a>      <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(eps,array[0],array[1]);
-<a name="line210">210: </a>    }
-
-<a name="line212">212: </a>    PetscOptionsBool(<font color="#666666">"-eps_true_residual"</font>,<font color="#666666">"Compute true residuals explicitly"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>"</font>,eps->trueres,&eps->trueres,NULL);
-<a name="line213">213: </a>    PetscOptionsBool(<font color="#666666">"-eps_purify"</font>,<font color="#666666">"Postprocess eigenvectors for purification"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>"</font>,eps->purify,&eps->purify,NULL);
-
-<a name="line215">215: </a>    PetscOptionsName(<font color="#666666">"-eps_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>"</font>,0);
-<a name="line216">216: </a>    PetscOptionsName(<font color="#666666">"-eps_view_vectors"</font>,<font color="#666666">"View computed eigenvectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>"</font>,0);
-<a name="line217">217: </a>    PetscOptionsName(<font color="#666666">"-eps_view_values"</font>,<font color="#666666">"View computed eigenvalues"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>"</font>,0);
-<a name="line218">218: </a>    PetscOptionsName(<font color="#666666">"-eps_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>"</font>,0);
-<a name="line219">219: </a>    PetscOptionsName(<font color="#666666">"-eps_error_absolute"</font>,<font color="#666666">"Print absolute errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>"</font>,0);
-<a name="line220">220: </a>    PetscOptionsName(<font color="#666666">"-eps_error_relative"</font>,<font color="#666666">"Print relative errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>"</font>,0);
-<a name="line221">221: </a>    PetscOptionsName(<font color="#666666">"-eps_error_backward"</font>,<font color="#666666">"Print backward errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>"</font>,0);
-
-<a name="line223">223: </a>    <font color="#4169E1">if</font> (eps->ops->setfromoptions) {
-<a name="line224">224: </a>      (*eps->ops->setfromoptions)(PetscOptionsObject,eps);
+<a name="line37"> 37: </a><font color="#B22222">+  eps      - the eigensolver context</font>
+<a name="line38"> 38: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line39"> 39: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line40"> 40: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line41"> 41: </a><font color="#B22222">.  monitor  - the monitor function, whose context is a PetscViewerAndFormat</font>
+<a name="line42"> 42: </a><font color="#B22222">-  trackall - whether this monitor tracks all eigenvalues or not</font>
+
+<a name="line44"> 44: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line46"> 46: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(), <a href="../../../docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html#EPSConvMonitorSetFromOptions">EPSConvMonitorSetFromOptions</a>()</font>
+<a name="line47"> 47: </a><font color="#B22222">@*/</font>
+<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="EPSMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscR [...]
+<a name="line49"> 49: </a>{
+<a name="line50"> 50: </a>  PetscErrorCode       ierr;
+<a name="line51"> 51: </a>  PetscBool            flg;
+<a name="line52"> 52: </a>  PetscViewer          viewer;
+<a name="line53"> 53: </a>  PetscViewerFormat    format;
+<a name="line54"> 54: </a>  PetscViewerAndFormat *vf;
+
+<a name="line57"> 57: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,name,&viewer,&format,&flg);
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line59"> 59: </a>    PetscViewerAndFormatCreate(viewer,format,&vf);
+<a name="line60"> 60: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line61"> 61: </a>    <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,(PetscErrorCode (*)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line62"> 62: </a>    <font color="#4169E1">if</font> (trackall) {
+<a name="line63"> 63: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(eps,PETSC_TRUE);
+<a name="line64"> 64: </a>    }
+<a name="line65"> 65: </a>  }
+<a name="line66"> 66: </a>  <font color="#4169E1">return</font>(0);
+<a name="line67"> 67: </a>}
+
+<a name="line71"> 71: </a><font color="#B22222">/*@C</font>
+<a name="line72"> 72: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html#EPSConvMonitorSetFromOptions">EPSConvMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line73"> 73: </a><font color="#B22222">   indicated by the user (for monitors that only show iteration numbers of convergence).</font>
+
+<a name="line75"> 75: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line77"> 77: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line78"> 78: </a><font color="#B22222">+  eps      - the eigensolver context</font>
+<a name="line79"> 79: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line80"> 80: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line81"> 81: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line82"> 82: </a><font color="#B22222">-  monitor  - the monitor function, whose context is a SlepcConvMonitor</font>
+
+<a name="line84"> 84: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line86"> 86: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(), <a href="../../../docs/manualpages/EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</a>()</font>
+<a name="line87"> 87: </a><font color="#B22222">@*/</font>
+<a name="line88"> 88: </a><strong><font color="#4169E1"><a name="EPSConvMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html#EPSConvMonitorSetFromOptions">EPSConvMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,Pet [...]
+<a name="line89"> 89: </a>{
+<a name="line90"> 90: </a>  PetscErrorCode    ierr;
+<a name="line91"> 91: </a>  PetscBool         flg;
+<a name="line92"> 92: </a>  PetscViewer       viewer;
+<a name="line93"> 93: </a>  PetscViewerFormat format;
+<a name="line94"> 94: </a>  SlepcConvMonitor  ctx;
+
+<a name="line97"> 97: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,name,&viewer,&format,&flg);
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line99"> 99: </a>    <a href="../../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(viewer,format,&ctx);
+<a name="line100">100: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line101">101: </a>    <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,(PetscErrorCode (*)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))<a href="../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>);
+<a name="line102">102: </a>  }
+<a name="line103">103: </a>  <font color="#4169E1">return</font>(0);
+<a name="line104">104: </a>}
+
+<a name="line108">108: </a><font color="#B22222">/*@</font>
+<a name="line109">109: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a> - Sets <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options from the options database.</font>
+<a name="line110">110: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() if the user is to be</font>
+<a name="line111">111: </a><font color="#B22222">   allowed to set the solver type.</font>
+
+<a name="line113">113: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line115">115: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line116">116: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line118">118: </a><font color="#B22222">   Notes:</font>
+<a name="line119">119: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line121">121: </a><font color="#B22222">   Level: beginner</font>
+<a name="line122">122: </a><font color="#B22222">@*/</font>
+<a name="line123">123: </a><strong><font color="#4169E1"><a name="EPSSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line124">124: </a>{
+<a name="line126">126: </a>  char           type[256];
+<a name="line127">127: </a>  PetscBool      set,flg,flg1,flg2,flg3;
+<a name="line128">128: </a>  PetscReal      r,array[2]={0,0};
+<a name="line129">129: </a>  PetscScalar    s;
+<a name="line130">130: </a>  PetscInt       i,j,k;
+<a name="line131">131: </a>  PetscDrawLG    lg;
+
+<a name="line135">135: </a>  <a href="../../../docs/manualpages/EPS/EPSRegisterAll.html#EPSRegisterAll">EPSRegisterAll</a>();
+<a name="line136">136: </a>  PetscObjectOptionsBegin((PetscObject)eps);
+<a name="line137">137: </a>    PetscOptionsFList(<font color="#666666">"-eps_type"</font>,<font color="#666666">"Eigenvalue Problem Solver method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>"</font>,EPSList,(char*)(((PetscObject)eps)->type_name?((PetscObject)eps)->type_name:EPSKRYLOVSCHUR),type,256,&flg);
+<a name="line138">138: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line139">139: </a>      <a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,type);
+<a name="line140">140: </a>    }
+<a name="line141">141: </a>    <font color="#B22222">/*</font>
+<a name="line142">142: </a><font color="#B22222">      Set the type if it was never set.</font>
+<a name="line143">143: </a><font color="#B22222">    */</font>
+<a name="line144">144: </a>    <font color="#4169E1">if</font> (!((PetscObject)eps)->type_name) {
+<a name="line145">145: </a>      <a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSKRYLOVSCHUR);
+<a name="line146">146: </a>    }
+
+<a name="line148">148: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_hermitian"</font>,<font color="#666666">"hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
+<a name="line149">149: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_HEP); }
+<a name="line150">150: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_gen_hermitian"</font>,<font color="#666666">"generalized hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
+<a name="line151">151: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GHEP); }
+<a name="line152">152: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_non_hermitian"</font>,<font color="#666666">"non-hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
+<a name="line153">153: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP); }
+<a name="line154">154: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_gen_non_hermitian"</font>,<font color="#666666">"generalized non-hermitian eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
+<a name="line155">155: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GNHEP); }
+<a name="line156">156: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_pos_gen_non_hermitian"</font>,<font color="#666666">"generalized non-hermitian eigenvalue problem with positive semi-definite B"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
+<a name="line157">157: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_PGNHEP); }
+<a name="line158">158: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_gen_indefinite"</font>,<font color="#666666">"generalized hermitian-indefinite eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>"</font>,&flg);
+<a name="line159">159: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GHIEP); }
+
+<a name="line161">161: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_ritz"</font>,<font color="#666666">"Rayleigh-Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line162">162: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_RITZ); }
+<a name="line163">163: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic"</font>,<font color="#666666">"harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line164">164: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC); }
+<a name="line165">165: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic_relative"</font>,<font color="#666666">"relative harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line166">166: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC_RELATIVE); }
+<a name="line167">167: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic_right"</font>,<font color="#666666">"right harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line168">168: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC_RIGHT); }
+<a name="line169">169: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_harmonic_largest"</font>,<font color="#666666">"largest harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line170">170: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_HARMONIC_LARGEST); }
+<a name="line171">171: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_refined"</font>,<font color="#666666">"refined Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line172">172: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_REFINED); }
+<a name="line173">173: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_refined_harmonic"</font>,<font color="#666666">"refined harmonic Ritz extraction"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>"</font>,&flg);
+<a name="line174">174: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(eps,EPS_REFINED_HARMONIC); }
+
+<a name="line176">176: </a>    PetscOptionsEnum(<font color="#666666">"-eps_balance"</font>,<font color="#666666">"Balancing method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>"</font>,EPSBalanceTypes,(PetscEnum)eps->balance,(PetscEnum*)&eps->balance,NULL);
+
+<a name="line178">178: </a>    j = eps->balance_its;
+<a name="line179">179: </a>    PetscOptionsInt(<font color="#666666">"-eps_balance_its"</font>,<font color="#666666">"Number of iterations in balancing"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>"</font>,eps->balance_its,&j,&flg1);
+<a name="line180">180: </a>    r = eps->balance_cutoff;
+<a name="line181">181: </a>    PetscOptionsReal(<font color="#666666">"-eps_balance_cutoff"</font>,<font color="#666666">"Cutoff value in balancing"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>"</font>,eps->balance_cutoff,&r,&flg2);
+<a name="line182">182: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line183">183: </a>      <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(eps,eps->balance,j,r);
+<a name="line184">184: </a>    }
+
+<a name="line186">186: </a>    i = eps->max_it? eps->max_it: PETSC_DEFAULT;
+<a name="line187">187: </a>    PetscOptionsInt(<font color="#666666">"-eps_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>"</font>,eps->max_it,&i,&flg1);
+<a name="line188">188: </a>    r = eps->tol;
+<a name="line189">189: </a>    PetscOptionsReal(<font color="#666666">"-eps_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>"</font>,eps->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:eps->tol,&r,&flg2);
+<a name="line190">190: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line191">191: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(eps,r,i);
+<a name="line192">192: </a>    }
+
+<a name="line194">194: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_conv_rel"</font>,<font color="#666666">"Relative error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
+<a name="line195">195: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_REL); }
+<a name="line196">196: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_conv_norm"</font>,<font color="#666666">"Convergence test relative to the eigenvalue and the matrix norms"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
+<a name="line197">197: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_NORM); }
+<a name="line198">198: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_conv_abs"</font>,<font color="#666666">"Absolute error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
+<a name="line199">199: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_ABS); }
+<a name="line200">200: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_conv_user"</font>,<font color="#666666">"User-defined convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>"</font>,&flg);
+<a name="line201">201: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(eps,EPS_CONV_USER); }
+
+<a name="line203">203: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_stop_basic"</font>,<font color="#666666">"Stop iteration if all eigenvalues converged or max_it reached"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>"</font>,&flg);
+<a name="line204">204: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(eps,EPS_STOP_BASIC); }
+<a name="line205">205: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_stop_user"</font>,<font color="#666666">"User-defined stopping test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>"</font>,&flg);
+<a name="line206">206: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(eps,EPS_STOP_USER); }
+
+<a name="line208">208: </a>    i = eps->nev;
+<a name="line209">209: </a>    PetscOptionsInt(<font color="#666666">"-eps_nev"</font>,<font color="#666666">"Number of eigenvalues to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>"</font>,eps->nev,&i,&flg1);
+<a name="line210">210: </a>    j = eps->ncv? eps->ncv: PETSC_DEFAULT;
+<a name="line211">211: </a>    PetscOptionsInt(<font color="#666666">"-eps_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>"</font>,eps->ncv,&j,&flg2);
+<a name="line212">212: </a>    k = eps->mpd? eps->mpd: PETSC_DEFAULT;
+<a name="line213">213: </a>    PetscOptionsInt(<font color="#666666">"-eps_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>"</font>,eps->mpd,&k,&flg3);
+<a name="line214">214: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line215">215: </a>      <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(eps,i,j,k);
+<a name="line216">216: </a>    }
+
+<a name="line218">218: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+<a name="line219">219: </a>    <font color="#B22222">/*</font>
+<a name="line220">220: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>()</font>
+<a name="line221">221: </a><font color="#B22222">    */</font>
+<a name="line222">222: </a>    PetscOptionsBool(<font color="#666666">"-eps_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line223">223: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line224">224: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorCancel.html#EPSMonitorCancel">EPSMonitorCancel</a>(eps);
 <a name="line225">225: </a>    }
-<a name="line226">226: </a>    PetscObjectProcessOptionsHandlers((PetscObject)eps);
-<a name="line227">227: </a>  PetscOptionsEnd();
-
-<a name="line229">229: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line230">230: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(eps->V);
-<a name="line231">231: </a>  <font color="#4169E1">if</font> (!eps->rg) { <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&eps->rg); }
-<a name="line232">232: </a>  <a href="../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(eps->rg);
-<a name="line233">233: </a>  <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
-<a name="line234">234: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(eps->ds);
-<a name="line235">235: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
-<a name="line236">236: </a>  <a href="../../../docs/manualpages/ST/STSetFromOptions.html#STSetFromOptions">STSetFromOptions</a>(eps->st);
-<a name="line237">237: </a>  PetscRandomSetFromOptions(eps->rand);
-<a name="line238">238: </a>  <font color="#4169E1">return</font>(0);
-<a name="line239">239: </a>}
-
-<a name="line243">243: </a><font color="#B22222">/*@</font>
-<a name="line244">244: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
-<a name="line245">245: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> convergence tests.</font>
-
-<a name="line247">247: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line249">249: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line250">250: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line252">252: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line253">253: </a><font color="#B22222">+  tol - the convergence tolerance</font>
-<a name="line254">254: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
-
-<a name="line256">256: </a><font color="#B22222">   Notes:</font>
-<a name="line257">257: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line259">259: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line261">261: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>()</font>
-<a name="line262">262: </a><font color="#B22222">@*/</font>
-<a name="line263">263: </a><strong><font color="#4169E1"><a name="EPSGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *tol,PetscInt *maxits)</font></strong>
-<a name="line264">264: </a>{
-<a name="line267">267: </a>  <font color="#4169E1">if</font> (tol)    *tol    = eps->tol;
-<a name="line268">268: </a>  <font color="#4169E1">if</font> (maxits) *maxits = eps->max_it;
-<a name="line269">269: </a>  <font color="#4169E1">return</font>(0);
-<a name="line270">270: </a>}
-
-<a name="line274">274: </a><font color="#B22222">/*@</font>
-<a name="line275">275: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
-<a name="line276">276: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> convergence tests.</font>
-
-<a name="line278">278: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line280">280: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line281">281: </a><font color="#B22222">+  eps - the eigensolver context</font>
-<a name="line282">282: </a><font color="#B22222">.  tol - the convergence tolerance</font>
-<a name="line283">283: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
-
-<a name="line285">285: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line286">286: </a><font color="#B22222">+  -eps_tol <tol> - Sets the convergence tolerance</font>
-<a name="line287">287: </a><font color="#B22222">-  -eps_max_it <maxits> - Sets the maximum number of iterations allowed</font>
-
-<a name="line289">289: </a><font color="#B22222">   Notes:</font>
-<a name="line290">290: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
-
-<a name="line292">292: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line294">294: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>()</font>
-<a name="line295">295: </a><font color="#B22222">@*/</font>
-<a name="line296">296: </a><strong><font color="#4169E1"><a name="EPSSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal tol,PetscInt maxits)</font></strong>
-<a name="line297">297: </a>{
-<a name="line302">302: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
-<a name="line303">303: </a>    eps->tol   = PETSC_DEFAULT;
-<a name="line304">304: </a>    eps->state = EPS_STATE_INITIAL;
-<a name="line305">305: </a>  } <font color="#4169E1">else</font> {
-<a name="line306">306: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
-<a name="line307">307: </a>    eps->tol = tol;
-<a name="line308">308: </a>  }
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
-<a name="line310">310: </a>    eps->max_it = 0;
-<a name="line311">311: </a>    eps->state  = EPS_STATE_INITIAL;
-<a name="line312">312: </a>  } <font color="#4169E1">else</font> {
-<a name="line313">313: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
-<a name="line314">314: </a>    eps->max_it = maxits;
-<a name="line315">315: </a>  }
-<a name="line316">316: </a>  <font color="#4169E1">return</font>(0);
-<a name="line317">317: </a>}
-
-<a name="line321">321: </a><font color="#B22222">/*@</font>
-<a name="line322">322: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a> - Gets the number of eigenvalues to compute</font>
-<a name="line323">323: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line325">325: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line327">327: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line328">328: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line330">330: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line331">331: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
-<a name="line332">332: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line333">333: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line335">335: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line337">337: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>()</font>
-<a name="line338">338: </a><font color="#B22222">@*/</font>
-<a name="line339">339: </a><strong><font color="#4169E1"><a name="EPSGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line340">340: </a>{
-<a name="line343">343: </a>  <font color="#4169E1">if</font> (nev) *nev = eps->nev;
-<a name="line344">344: </a>  <font color="#4169E1">if</font> (ncv) *ncv = eps->ncv;
-<a name="line345">345: </a>  <font color="#4169E1">if</font> (mpd) *mpd = eps->mpd;
-<a name="line346">346: </a>  <font color="#4169E1">return</font>(0);
-<a name="line347">347: </a>}
-
-<a name="line351">351: </a><font color="#B22222">/*@</font>
-<a name="line352">352: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a> - Sets the number of eigenvalues to compute</font>
-<a name="line353">353: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line355">355: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line357">357: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line358">358: </a><font color="#B22222">+  eps - the eigensolver context</font>
-<a name="line359">359: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
-<a name="line360">360: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line361">361: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line363">363: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line364">364: </a><font color="#B22222">+  -eps_nev <nev> - Sets the number of eigenvalues</font>
-<a name="line365">365: </a><font color="#B22222">.  -eps_ncv <ncv> - Sets the dimension of the subspace</font>
-<a name="line366">366: </a><font color="#B22222">-  -eps_mpd <mpd> - Sets the maximum projected dimension</font>
-
-<a name="line368">368: </a><font color="#B22222">   Notes:</font>
-<a name="line369">369: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
-<a name="line370">370: </a><font color="#B22222">   dependent on the solution method.</font>
-
-<a name="line372">372: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
-<a name="line373">373: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
-<a name="line374">374: </a><font color="#B22222">   (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and</font>
-<a name="line375">375: </a><font color="#B22222">   (b) in cases where nev is large, the user sets mpd.</font>
-
-<a name="line377">377: </a><font color="#B22222">   The value of ncv should always be between nev and (nev+mpd), typically</font>
-<a name="line378">378: </a><font color="#B22222">   ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise</font>
-<a name="line379">379: </a><font color="#B22222">   a smaller value should be used.</font>
-
-<a name="line381">381: </a><font color="#B22222">   When computing all eigenvalues in an interval, see <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), these</font>
-<a name="line382">382: </a><font color="#B22222">   parameters lose relevance, and tuning must be done with</font>
-<a name="line383">383: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>().</font>
-
-<a name="line385">385: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line387">387: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(), <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>()</font>
-<a name="line388">388: </a><font color="#B22222">@*/</font>
-<a name="line389">389: </a><strong><font color="#4169E1"><a name="EPSSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
-<a name="line390">390: </a>{
-<a name="line396">396: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
-<a name="line397">397: </a>  eps->nev = nev;
-<a name="line398">398: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
-<a name="line399">399: </a>    eps->ncv = 0;
-<a name="line400">400: </a>  } <font color="#4169E1">else</font> {
-<a name="line401">401: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
-<a name="line402">402: </a>    eps->ncv = ncv;
-<a name="line403">403: </a>  }
-<a name="line404">404: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
-<a name="line405">405: </a>    eps->mpd = 0;
-<a name="line406">406: </a>  } <font color="#4169E1">else</font> {
-<a name="line407">407: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
-<a name="line408">408: </a>    eps->mpd = mpd;
-<a name="line409">409: </a>  }
-<a name="line410">410: </a>  eps->state = EPS_STATE_INITIAL;
-<a name="line411">411: </a>  <font color="#4169E1">return</font>(0);
-<a name="line412">412: </a>}
-
-<a name="line416">416: </a><font color="#B22222">/*@</font>
-<a name="line417">417: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a> - Specifies which portion of the spectrum is</font>
-<a name="line418">418: </a><font color="#B22222">   to be sought.</font>
-
-<a name="line420">420: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line422">422: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line423">423: </a><font color="#B22222">+  eps   - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line424">424: </a><font color="#B22222">-  which - the portion of the spectrum to be sought</font>
-
-<a name="line426">426: </a><font color="#B22222">   Possible values:</font>
-<a name="line427">427: </a><font color="#B22222">   The parameter 'which' can have one of these values</font>
-
-<a name="line429">429: </a><font color="#B22222">+     EPS_LARGEST_MAGNITUDE - largest eigenvalues in magnitude (default)</font>
-<a name="line430">430: </a><font color="#B22222">.     EPS_SMALLEST_MAGNITUDE - smallest eigenvalues in magnitude</font>
-<a name="line431">431: </a><font color="#B22222">.     EPS_LARGEST_REAL - largest real parts</font>
-<a name="line432">432: </a><font color="#B22222">.     EPS_SMALLEST_REAL - smallest real parts</font>
-<a name="line433">433: </a><font color="#B22222">.     EPS_LARGEST_IMAGINARY - largest imaginary parts</font>
-<a name="line434">434: </a><font color="#B22222">.     EPS_SMALLEST_IMAGINARY - smallest imaginary parts</font>
-<a name="line435">435: </a><font color="#B22222">.     EPS_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)</font>
-<a name="line436">436: </a><font color="#B22222">.     EPS_TARGET_REAL - eigenvalues with real part closest to target</font>
-<a name="line437">437: </a><font color="#B22222">.     EPS_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target</font>
-<a name="line438">438: </a><font color="#B22222">.     EPS_ALL - all eigenvalues contained in a given interval</font>
-<a name="line439">439: </a><font color="#B22222">-     EPS_WHICH_USER - user defined ordering set with <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>()</font>
-
-<a name="line441">441: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line442">442: </a><font color="#B22222">+   -eps_largest_magnitude - Sets largest eigenvalues in magnitude</font>
-<a name="line443">443: </a><font color="#B22222">.   -eps_smallest_magnitude - Sets smallest eigenvalues in magnitude</font>
-<a name="line444">444: </a><font color="#B22222">.   -eps_largest_real - Sets largest real parts</font>
-<a name="line445">445: </a><font color="#B22222">.   -eps_smallest_real - Sets smallest real parts</font>
-<a name="line446">446: </a><font color="#B22222">.   -eps_largest_imaginary - Sets largest imaginary parts</font>
-<a name="line447">447: </a><font color="#B22222">.   -eps_smallest_imaginary - Sets smallest imaginary parts</font>
-<a name="line448">448: </a><font color="#B22222">.   -eps_target_magnitude - Sets eigenvalues closest to target</font>
-<a name="line449">449: </a><font color="#B22222">.   -eps_target_real - Sets real parts closest to target</font>
-<a name="line450">450: </a><font color="#B22222">.   -eps_target_imaginary - Sets imaginary parts closest to target</font>
-<a name="line451">451: </a><font color="#B22222">-   -eps_all - Sets all eigenvalues in an interval</font>
-
-<a name="line453">453: </a><font color="#B22222">   Notes:</font>
-<a name="line454">454: </a><font color="#B22222">   Not all eigensolvers implemented in <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> account for all the possible values</font>
-<a name="line455">455: </a><font color="#B22222">   stated above. Also, some values make sense only for certain types of</font>
-<a name="line456">456: </a><font color="#B22222">   problems. If SLEPc is compiled for real numbers EPS_LARGEST_IMAGINARY</font>
-<a name="line457">457: </a><font color="#B22222">   and EPS_SMALLEST_IMAGINARY use the absolute value of the imaginary part</font>
-<a name="line458">458: </a><font color="#B22222">   for eigenvalue selection.</font>
-
-<a name="line460">460: </a><font color="#B22222">   The target is a scalar value provided with <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>().</font>
-
-<a name="line462">462: </a><font color="#B22222">   The criterion EPS_TARGET_IMAGINARY is available only in case PETSc and</font>
-<a name="line463">463: </a><font color="#B22222">   SLEPc have been built with complex scalars.</font>
-
-<a name="line465">465: </a><font color="#B22222">   EPS_ALL is intended for use in combination with an interval (see</font>
-<a name="line466">466: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()), when all eigenvalues within the interval are requested.</font>
-<a name="line467">467: </a><font color="#B22222">   In that case, the number of eigenvalues is unknown, so the nev parameter</font>
-<a name="line468">468: </a><font color="#B22222">   has a different sense, see <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>().</font>
-
-<a name="line470">470: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line472">472: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(), <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(),</font>
-<a name="line473">473: </a><font color="#B22222">          <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(), <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(), <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a></font>
-<a name="line474">474: </a><font color="#B22222">@*/</font>
-<a name="line475">475: </a><strong><font color="#4169E1"><a name="EPSSetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a> which)</font></strong>
-<a name="line476">476: </a>{
-<a name="line480">480: </a>  <font color="#4169E1">switch</font> (which) {
-<a name="line481">481: </a>    <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
-<a name="line482">482: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
-<a name="line483">483: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
-<a name="line484">484: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
-<a name="line485">485: </a>    <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
-<a name="line486">486: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
-<a name="line487">487: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line488">488: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line489">489: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line490">490: </a>    <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
-<a name="line491">491: </a><font color="#A020F0">#endif</font>
-<a name="line492">492: </a>    <font color="#4169E1">case</font> EPS_ALL:
-<a name="line493">493: </a>    <font color="#4169E1">case</font> EPS_WHICH_USER:
-<a name="line494">494: </a>      <font color="#4169E1">if</font> (eps->which != which) {
-<a name="line495">495: </a>        eps->state = EPS_STATE_INITIAL;
-<a name="line496">496: </a>        eps->which = which;
-<a name="line497">497: </a>      }
-<a name="line498">498: </a>      <font color="#4169E1">break</font>;
-<a name="line499">499: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line500">500: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' value"</font>);
-<a name="line501">501: </a>  }
-<a name="line502">502: </a>  <font color="#4169E1">return</font>(0);
-<a name="line503">503: </a>}
-
-<a name="line507">507: </a><font color="#B22222">/*@</font>
-<a name="line508">508: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a> - Returns which portion of the spectrum is to be</font>
-<a name="line509">509: </a><font color="#B22222">   sought.</font>
-
-<a name="line511">511: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line513">513: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line514">514: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-
-<a name="line516">516: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line517">517: </a><font color="#B22222">.  which - the portion of the spectrum to be sought</font>
-
-<a name="line519">519: </a><font color="#B22222">   Notes:</font>
-<a name="line520">520: </a><font color="#B22222">   See <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>() for possible values of 'which'.</font>
-
-<a name="line522">522: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line524">524: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a></font>
-<a name="line525">525: </a><font color="#B22222">@*/</font>
-<a name="line526">526: </a><strong><font color="#4169E1"><a name="EPSGetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a> *which)</font></strong>
-<a name="line527">527: </a>{
-<a name="line531">531: </a>  *which = eps->which;
-<a name="line532">532: </a>  <font color="#4169E1">return</font>(0);
-<a name="line533">533: </a>}
-
-<a name="line537">537: </a><font color="#B22222">/*@C</font>
-<a name="line538">538: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a> - Specifies the eigenvalue comparison function</font>
-<a name="line539">539: </a><font color="#B22222">   when <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>() is set to EPS_WHICH_USER.</font>
-
-<a name="line541">541: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line543">543: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line544">544: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line545">545: </a><font color="#B22222">.  func - a pointer to the comparison function</font>
-<a name="line546">546: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the comparison function)</font>
-
-<a name="line548">548: </a><font color="#B22222">   Calling Sequence of func:</font>
-<a name="line549">549: </a><font color="#B22222">$   func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)</font>
-
-<a name="line551">551: </a><font color="#B22222">+   ar     - real part of the 1st eigenvalue</font>
-<a name="line552">552: </a><font color="#B22222">.   ai     - imaginary part of the 1st eigenvalue</font>
-<a name="line553">553: </a><font color="#B22222">.   br     - real part of the 2nd eigenvalue</font>
-<a name="line554">554: </a><font color="#B22222">.   bi     - imaginary part of the 2nd eigenvalue</font>
-<a name="line555">555: </a><font color="#B22222">.   res    - result of comparison</font>
-<a name="line556">556: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>()</font>
-
-<a name="line558">558: </a><font color="#B22222">   Note:</font>
-<a name="line559">559: </a><font color="#B22222">   The returning parameter 'res' can be:</font>
-<a name="line560">560: </a><font color="#B22222">+  negative - if the 1st eigenvalue is preferred to the 2st one</font>
-<a name="line561">561: </a><font color="#B22222">.  zero     - if both eigenvalues are equally preferred</font>
-<a name="line562">562: </a><font color="#B22222">-  positive - if the 2st eigenvalue is preferred to the 1st one</font>
-
-<a name="line564">564: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line566">566: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a></font>
-<a name="line567">567: </a><font color="#B22222">@*/</font>
-<a name="line568">568: </a><strong><font color="#4169E1"><a name="EPSSetEigenvalueComparison"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)</font></strong>
-<a name="line569">569: </a>{
-<a name="line572">572: </a>  eps->sc->comparison    = func;
-<a name="line573">573: </a>  eps->sc->comparisonctx = ctx;
-<a name="line574">574: </a>  eps->which             = EPS_WHICH_USER;
-<a name="line575">575: </a>  <font color="#4169E1">return</font>(0);
-<a name="line576">576: </a>}
-
-<a name="line580">580: </a><font color="#B22222">/*@C</font>
-<a name="line581">581: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a> - Specifies a function intended to look for</font>
-<a name="line582">582: </a><font color="#B22222">   eigenvalues according to an arbitrary selection criterion. This criterion</font>
-<a name="line583">583: </a><font color="#B22222">   can be based on a computation involving the current eigenvector approximation.</font>
-
-<a name="line585">585: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line587">587: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line588">588: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line589">589: </a><font color="#B22222">.  func - a pointer to the evaluation function</font>
-<a name="line590">590: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the evaluation function)</font>
-
-<a name="line592">592: </a><font color="#B22222">   Calling Sequence of func:</font>
-<a name="line593">593: </a><font color="#B22222">$   func(PetscScalar er,PetscScalar ei,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx)</font>
-
-<a name="line595">595: </a><font color="#B22222">+   er     - real part of the current eigenvalue approximation</font>
-<a name="line596">596: </a><font color="#B22222">.   ei     - imaginary part of the current eigenvalue approximation</font>
-<a name="line597">597: </a><font color="#B22222">.   xr     - real part of the current eigenvector approximation</font>
-<a name="line598">598: </a><font color="#B22222">.   xi     - imaginary part of the current eigenvector approximation</font>
-<a name="line599">599: </a><font color="#B22222">.   rr     - result of evaluation (real part)</font>
-<a name="line600">600: </a><font color="#B22222">.   ri     - result of evaluation (imaginary part)</font>
-<a name="line601">601: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a>()</font>
-
-<a name="line603">603: </a><font color="#B22222">   Notes:</font>
-<a name="line604">604: </a><font color="#B22222">   This provides a mechanism to select eigenpairs by evaluating a user-defined</font>
-<a name="line605">605: </a><font color="#B22222">   function. When a function has been provided, the default selection based on</font>
-<a name="line606">606: </a><font color="#B22222">   sorting the eigenvalues is replaced by the sorting of the results of this</font>
-<a name="line607">607: </a><font color="#B22222">   function (with the same sorting criterion given in <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()).</font>
-
-<a name="line609">609: </a><font color="#B22222">   For instance, suppose you want to compute those eigenvectors that maximize</font>
-<a name="line610">610: </a><font color="#B22222">   a certain computable expression. Then implement the computation using</font>
-<a name="line611">611: </a><font color="#B22222">   the arguments xr and xi, and return the result in rr. Then set the standard</font>
-<a name="line612">612: </a><font color="#B22222">   sorting by magnitude so that the eigenpair with largest value of rr is</font>
-<a name="line613">613: </a><font color="#B22222">   selected.</font>
-
-<a name="line615">615: </a><font color="#B22222">   This evaluation function is collective, that is, all processes call it and</font>
-<a name="line616">616: </a><font color="#B22222">   it can use collective operations; furthermore, the computed result must</font>
-<a name="line617">617: </a><font color="#B22222">   be the same in all processes.</font>
-
-<a name="line619">619: </a><font color="#B22222">   The result of func is expressed as a complex number so that it is possible to</font>
-<a name="line620">620: </a><font color="#B22222">   use the standard eigenvalue sorting functions, but normally only rr is used.</font>
-<a name="line621">621: </a><font color="#B22222">   Set ri to zero unless it is meaningful in your application.</font>
-
-<a name="line623">623: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line625">625: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()</font>
-<a name="line626">626: </a><font color="#B22222">@*/</font>
-<a name="line627">627: </a><strong><font color="#4169E1"><a name="EPSSetArbitrarySelection"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)</font></strong>
-<a name="line628">628: </a>{
-<a name="line631">631: </a>  eps->arbitrary    = func;
-<a name="line632">632: </a>  eps->arbitraryctx = ctx;
-<a name="line633">633: </a>  eps->state        = EPS_STATE_INITIAL;
-<a name="line634">634: </a>  <font color="#4169E1">return</font>(0);
-<a name="line635">635: </a>}
-
-<a name="line639">639: </a><font color="#B22222">/*@C</font>
-<a name="line640">640: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a> - Sets a function to compute the error estimate</font>
-<a name="line641">641: </a><font color="#B22222">   used in the convergence test.</font>
-
-<a name="line643">643: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line645">645: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line646">646: </a><font color="#B22222">+  eps     - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line647">647: </a><font color="#B22222">.  func    - a pointer to the convergence test function</font>
-<a name="line648">648: </a><font color="#B22222">.  ctx     - [optional] context for private data for the convergence routine</font>
-<a name="line649">649: </a><font color="#B22222">-  destroy - [optional] destructor for the context (may be NULL;</font>
-<a name="line650">650: </a><font color="#B22222">             PETSC_NULL_FUNCTION in Fortran)</font>
-
-<a name="line652">652: </a><font color="#B22222">   Calling Sequence of func:</font>
-<a name="line653">653: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font>
-
-<a name="line655">655: </a><font color="#B22222">+   eps    - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line656">656: </a><font color="#B22222">.   eigr   - real part of the eigenvalue</font>
-<a name="line657">657: </a><font color="#B22222">.   eigi   - imaginary part of the eigenvalue</font>
-<a name="line658">658: </a><font color="#B22222">.   res    - residual norm associated to the eigenpair</font>
-<a name="line659">659: </a><font color="#B22222">.   errest - (output) computed error estimate</font>
-<a name="line660">660: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>()</font>
-
-<a name="line662">662: </a><font color="#B22222">   Note:</font>
-<a name="line663">663: </a><font color="#B22222">   If the error estimate returned by the convergence test function is less than</font>
-<a name="line664">664: </a><font color="#B22222">   the tolerance, then the eigenvalue is accepted as converged.</font>
-
-<a name="line666">666: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line668">668: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>()</font>
-<a name="line669">669: </a><font color="#B22222">@*/</font>
-<a name="line670">670: </a><strong><font color="#4169E1"><a name="EPSSetConvergenceTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)( [...]
-<a name="line671">671: </a>{
-
-<a name="line676">676: </a>  <font color="#4169E1">if</font> (eps->convergeddestroy) {
-<a name="line677">677: </a>    (*eps->convergeddestroy)(eps->convergedctx);
-<a name="line678">678: </a>  }
-<a name="line679">679: </a>  eps->converged        = func;
-<a name="line680">680: </a>  eps->convergeddestroy = destroy;
-<a name="line681">681: </a>  eps->convergedctx     = ctx;
-<a name="line682">682: </a>  <font color="#4169E1">if</font> (func == EPSConvergedEigRelative) eps->conv = EPS_CONV_EIG;
-<a name="line683">683: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == EPSConvergedNormRelative) eps->conv = EPS_CONV_NORM;
-<a name="line684">684: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == EPSConvergedAbsolute) eps->conv = EPS_CONV_ABS;
-<a name="line685">685: </a>  <font color="#4169E1">else</font> eps->conv = EPS_CONV_USER;
-<a name="line686">686: </a>  <font color="#4169E1">return</font>(0);
-<a name="line687">687: </a>}
-
-<a name="line691">691: </a><font color="#B22222">/*@</font>
-<a name="line692">692: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a> - Specifies how to compute the error estimate</font>
-<a name="line693">693: </a><font color="#B22222">   used in the convergence test.</font>
-
-<a name="line695">695: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line697">697: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line698">698: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-<a name="line699">699: </a><font color="#B22222">-  conv - the type of convergence test</font>
-
-<a name="line701">701: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line702">702: </a><font color="#B22222">+  -eps_conv_abs  - Sets the absolute convergence test</font>
-<a name="line703">703: </a><font color="#B22222">.  -eps_conv_eig  - Sets the convergence test relative to the eigenvalue</font>
-<a name="line704">704: </a><font color="#B22222">.  -eps_conv_norm - Sets the convergence test relative to the matrix norms</font>
-<a name="line705">705: </a><font color="#B22222">-  -eps_conv_user - Selects the user-defined convergence test</font>
-
-<a name="line707">707: </a><font color="#B22222">   Note:</font>
-<a name="line708">708: </a><font color="#B22222">   The parameter 'conv' can have one of these values</font>
-<a name="line709">709: </a><font color="#B22222">+     EPS_CONV_ABS  - absolute error ||r||</font>
-<a name="line710">710: </a><font color="#B22222">.     EPS_CONV_EIG  - error relative to the eigenvalue l, ||r||/|l|</font>
-<a name="line711">711: </a><font color="#B22222">.     EPS_CONV_NORM - error relative to the matrix norms, ||r||/(||A||+|l|*||B||)</font>
-<a name="line712">712: </a><font color="#B22222">-     EPS_CONV_USER - function set by <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>()</font>
-
-<a name="line714">714: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line716">716: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>(), <a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a></font>
-<a name="line717">717: </a><font color="#B22222">@*/</font>
-<a name="line718">718: </a><strong><font color="#4169E1"><a name="EPSSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a> conv)</font></strong>
-<a name="line719">719: </a>{
-<a name="line723">723: </a>  <font color="#4169E1">switch</font> (conv) {
-<a name="line724">724: </a>    <font color="#4169E1">case</font> EPS_CONV_ABS:  eps->converged = EPSConvergedAbsolute; <font color="#4169E1">break</font>;
-<a name="line725">725: </a>    <font color="#4169E1">case</font> EPS_CONV_EIG:  eps->converged = EPSConvergedEigRelative; <font color="#4169E1">break</font>;
-<a name="line726">726: </a>    <font color="#4169E1">case</font> EPS_CONV_NORM: eps->converged = EPSConvergedNormRelative; <font color="#4169E1">break</font>;
-<a name="line727">727: </a>    <font color="#4169E1">case</font> EPS_CONV_USER: <font color="#4169E1">break</font>;
-<a name="line728">728: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line729">729: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'conv' value"</font>);
-<a name="line730">730: </a>  }
-<a name="line731">731: </a>  eps->conv = conv;
-<a name="line732">732: </a>  <font color="#4169E1">return</font>(0);
-<a name="line733">733: </a>}
-
-<a name="line737">737: </a><font color="#B22222">/*@</font>
-<a name="line738">738: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a> - Gets the method used to compute the error estimate</font>
-<a name="line739">739: </a><font color="#B22222">   used in the convergence test.</font>
-
-<a name="line741">741: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line743">743: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line744">744: </a><font color="#B22222">.  eps   - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
-
-<a name="line746">746: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line747">747: </a><font color="#B22222">.  conv  - the type of convergence test</font>
-
-<a name="line749">749: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line751">751: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a></font>
-<a name="line752">752: </a><font color="#B22222">@*/</font>
-<a name="line753">753: </a><strong><font color="#4169E1"><a name="EPSGetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a> *conv)</font></strong>
-<a name="line754">754: </a>{
-<a name="line758">758: </a>  *conv = eps->conv;
-<a name="line759">759: </a>  <font color="#4169E1">return</font>(0);
-<a name="line760">760: </a>}
-
-<a name="line764">764: </a><font color="#B22222">/*@</font>
-<a name="line765">765: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a> - Specifies the type of the eigenvalue problem.</font>
-
-<a name="line767">767: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line769">769: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line770">770: </a><font color="#B22222">+  eps      - the eigensolver context</font>
-<a name="line771">771: </a><font color="#B22222">-  type     - a known type of eigenvalue problem</font>
-
-<a name="line773">773: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line774">774: </a><font color="#B22222">+  -eps_hermitian - Hermitian eigenvalue problem</font>
-<a name="line775">775: </a><font color="#B22222">.  -eps_gen_hermitian - generalized Hermitian eigenvalue problem</font>
-<a name="line776">776: </a><font color="#B22222">.  -eps_non_hermitian - non-Hermitian eigenvalue problem</font>
-<a name="line777">777: </a><font color="#B22222">.  -eps_gen_non_hermitian - generalized non-Hermitian eigenvalue problem</font>
-<a name="line778">778: </a><font color="#B22222">-  -eps_pos_gen_non_hermitian - generalized non-Hermitian eigenvalue problem</font>
-<a name="line779">779: </a><font color="#B22222">   with positive semi-definite B</font>
-
-<a name="line781">781: </a><font color="#B22222">   Notes:</font>
-<a name="line782">782: </a><font color="#B22222">   Allowed values for the problem type are: Hermitian (EPS_HEP), non-Hermitian</font>
-<a name="line783">783: </a><font color="#B22222">   (EPS_NHEP), generalized Hermitian (EPS_GHEP), generalized non-Hermitian</font>
-<a name="line784">784: </a><font color="#B22222">   (EPS_GNHEP), generalized non-Hermitian with positive semi-definite B</font>
-<a name="line785">785: </a><font color="#B22222">   (EPS_PGNHEP), and generalized Hermitian-indefinite (EPS_GHIEP).</font>
-
-<a name="line787">787: </a><font color="#B22222">   This function must be used to instruct SLEPc to exploit symmetry. If no</font>
-<a name="line788">788: </a><font color="#B22222">   problem type is specified, by default a non-Hermitian problem is assumed</font>
-<a name="line789">789: </a><font color="#B22222">   (either standard or generalized). If the user knows that the problem is</font>
-<a name="line790">790: </a><font color="#B22222">   Hermitian (i.e. A=A^H) or generalized Hermitian (i.e. A=A^H, B=B^H, and</font>
-<a name="line791">791: </a><font color="#B22222">   B positive definite) then it is recommended to set the problem type so</font>
-<a name="line792">792: </a><font color="#B22222">   that eigensolver can exploit these properties.</font>
-
-<a name="line794">794: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line796">796: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(), <a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(), <a href="../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(), <a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a></font>
-<a name="line797">797: </a><font color="#B22222">@*/</font>
-<a name="line798">798: </a><strong><font color="#4169E1"><a name="EPSSetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a> type)</font></strong>
-<a name="line799">799: </a>{
-<a name="line803">803: </a>  <font color="#4169E1">switch</font> (type) {
-<a name="line804">804: </a>    <font color="#4169E1">case</font> EPS_HEP:
-<a name="line805">805: </a>      eps->isgeneralized = PETSC_FALSE;
-<a name="line806">806: </a>      eps->ishermitian = PETSC_TRUE;
-<a name="line807">807: </a>      eps->ispositive = PETSC_FALSE;
-<a name="line808">808: </a>      <font color="#4169E1">break</font>;
-<a name="line809">809: </a>    <font color="#4169E1">case</font> EPS_NHEP:
-<a name="line810">810: </a>      eps->isgeneralized = PETSC_FALSE;
-<a name="line811">811: </a>      eps->ishermitian = PETSC_FALSE;
-<a name="line812">812: </a>      eps->ispositive = PETSC_FALSE;
-<a name="line813">813: </a>      <font color="#4169E1">break</font>;
-<a name="line814">814: </a>    <font color="#4169E1">case</font> EPS_GHEP:
-<a name="line815">815: </a>      eps->isgeneralized = PETSC_TRUE;
-<a name="line816">816: </a>      eps->ishermitian = PETSC_TRUE;
-<a name="line817">817: </a>      eps->ispositive = PETSC_TRUE;
-<a name="line818">818: </a>      <font color="#4169E1">break</font>;
-<a name="line819">819: </a>    <font color="#4169E1">case</font> EPS_GNHEP:
-<a name="line820">820: </a>      eps->isgeneralized = PETSC_TRUE;
-<a name="line821">821: </a>      eps->ishermitian = PETSC_FALSE;
-<a name="line822">822: </a>      eps->ispositive = PETSC_FALSE;
-<a name="line823">823: </a>      <font color="#4169E1">break</font>;
-<a name="line824">824: </a>    <font color="#4169E1">case</font> EPS_PGNHEP:
-<a name="line825">825: </a>      eps->isgeneralized = PETSC_TRUE;
-<a name="line826">826: </a>      eps->ishermitian = PETSC_FALSE;
-<a name="line827">827: </a>      eps->ispositive = PETSC_TRUE;
-<a name="line828">828: </a>      <font color="#4169E1">break</font>;
-<a name="line829">829: </a>    <font color="#4169E1">case</font> EPS_GHIEP:
-<a name="line830">830: </a>      eps->isgeneralized = PETSC_TRUE;
-<a name="line831">831: </a>      eps->ishermitian = PETSC_TRUE;
-<a name="line832">832: </a>      eps->ispositive = PETSC_FALSE;
-<a name="line833">833: </a>      <font color="#4169E1">break</font>;
-<a name="line834">834: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line835">835: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown eigenvalue problem type"</font>);
-<a name="line836">836: </a>  }
-<a name="line837">837: </a>  eps->problem_type = type;
-<a name="line838">838: </a>  <font color="#4169E1">return</font>(0);
-<a name="line839">839: </a>}
-
-<a name="line843">843: </a><font color="#B22222">/*@</font>
-<a name="line844">844: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a> - Gets the problem type from the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.</font>
-
-<a name="line846">846: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line848">848: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line849">849: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line851">851: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line852">852: </a><font color="#B22222">.  type - name of <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> problem type</font>
-
-<a name="line854">854: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line856">856: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(), <a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a></font>
-<a name="line857">857: </a><font color="#B22222">@*/</font>
-<a name="line858">858: </a><strong><font color="#4169E1"><a name="EPSGetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a> *type)</font></strong>
-<a name="line859">859: </a>{
-<a name="line863">863: </a>  *type = eps->problem_type;
-<a name="line864">864: </a>  <font color="#4169E1">return</font>(0);
-<a name="line865">865: </a>}
-
-<a name="line869">869: </a><font color="#B22222">/*@</font>
-<a name="line870">870: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a> - Specifies the type of extraction technique to be employed</font>
-<a name="line871">871: </a><font color="#B22222">   by the eigensolver.</font>
-
-<a name="line873">873: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line875">875: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line876">876: </a><font color="#B22222">+  eps  - the eigensolver context</font>
-<a name="line877">877: </a><font color="#B22222">-  extr - a known type of extraction</font>
-
-<a name="line879">879: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line880">880: </a><font color="#B22222">+  -eps_ritz - Rayleigh-Ritz extraction</font>
-<a name="line881">881: </a><font color="#B22222">.  -eps_harmonic - harmonic Ritz extraction</font>
-<a name="line882">882: </a><font color="#B22222">.  -eps_harmonic_relative - harmonic Ritz extraction relative to the eigenvalue</font>
-<a name="line883">883: </a><font color="#B22222">.  -eps_harmonic_right - harmonic Ritz extraction for rightmost eigenvalues</font>
-<a name="line884">884: </a><font color="#B22222">.  -eps_harmonic_largest - harmonic Ritz extraction for largest magnitude</font>
-<a name="line885">885: </a><font color="#B22222">   (without target)</font>
-<a name="line886">886: </a><font color="#B22222">.  -eps_refined - refined Ritz extraction</font>
-<a name="line887">887: </a><font color="#B22222">-  -eps_refined_harmonic - refined harmonic Ritz extraction</font>
-
-<a name="line889">889: </a><font color="#B22222">   Notes:</font>
-<a name="line890">890: </a><font color="#B22222">   Not all eigensolvers support all types of extraction. See the SLEPc</font>
-<a name="line891">891: </a><font color="#B22222">   Users Manual for details.</font>
-
-<a name="line893">893: </a><font color="#B22222">   By default, a standard Rayleigh-Ritz extraction is used. Other extractions</font>
-<a name="line894">894: </a><font color="#B22222">   may be useful when computing interior eigenvalues.</font>
-
-<a name="line896">896: </a><font color="#B22222">   Harmonic-type extractions are used in combination with a 'target'.</font>
-
-<a name="line898">898: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line900">900: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(), <a href="../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(), <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a></font>
-<a name="line901">901: </a><font color="#B22222">@*/</font>
-<a name="line902">902: </a><strong><font color="#4169E1"><a name="EPSSetExtraction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a> extr)</font></strong>
-<a name="line903">903: </a>{
-<a name="line907">907: </a>  eps->extraction = extr;
-<a name="line908">908: </a>  <font color="#4169E1">return</font>(0);
-<a name="line909">909: </a>}
-
-<a name="line913">913: </a><font color="#B22222">/*@</font>
-<a name="line914">914: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a> - Gets the extraction type used by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.</font>
-
-<a name="line916">916: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line918">918: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line919">919: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line921">921: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line922">922: </a><font color="#B22222">.  extr - name of extraction type</font>
-
-<a name="line924">924: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line926">926: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(), <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a></font>
-<a name="line927">927: </a><font color="#B22222">@*/</font>
-<a name="line928">928: </a><strong><font color="#4169E1"><a name="EPSGetExtraction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a> *extr)</font></strong>
-<a name="line929">929: </a>{
-<a name="line933">933: </a>  *extr = eps->extraction;
-<a name="line934">934: </a>  <font color="#4169E1">return</font>(0);
-<a name="line935">935: </a>}
-
-<a name="line939">939: </a><font color="#B22222">/*@</font>
-<a name="line940">940: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a> - Specifies the balancing technique to be employed by the</font>
-<a name="line941">941: </a><font color="#B22222">   eigensolver, and some parameters associated to it.</font>
-
-<a name="line943">943: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line945">945: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line946">946: </a><font color="#B22222">+  eps    - the eigensolver context</font>
-<a name="line947">947: </a><font color="#B22222">.  bal    - the balancing method, one of EPS_BALANCE_NONE, EPS_BALANCE_ONESIDE,</font>
-<a name="line948">948: </a><font color="#B22222">            EPS_BALANCE_TWOSIDE, or EPS_BALANCE_USER</font>
-<a name="line949">949: </a><font color="#B22222">.  its    - number of iterations of the balancing algorithm</font>
-<a name="line950">950: </a><font color="#B22222">-  cutoff - cutoff value</font>
-
-<a name="line952">952: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line953">953: </a><font color="#B22222">+  -eps_balance <method> - the balancing method, where <method> is one of</font>
-<a name="line954">954: </a><font color="#B22222">                           'none', 'oneside', 'twoside', or 'user'</font>
-<a name="line955">955: </a><font color="#B22222">.  -eps_balance_its <its> - number of iterations</font>
-<a name="line956">956: </a><font color="#B22222">-  -eps_balance_cutoff <cutoff> - cutoff value</font>
-
-<a name="line958">958: </a><font color="#B22222">   Notes:</font>
-<a name="line959">959: </a><font color="#B22222">   When balancing is enabled, the solver works implicitly with matrix DAD^-1,</font>
-<a name="line960">960: </a><font color="#B22222">   where D is an appropriate diagonal matrix. This improves the accuracy of</font>
-<a name="line961">961: </a><font color="#B22222">   the computed results in some cases. See the SLEPc Users Manual for details.</font>
-
-<a name="line963">963: </a><font color="#B22222">   Balancing makes sense only for non-Hermitian problems when the required</font>
-<a name="line964">964: </a><font color="#B22222">   precision is high (i.e. a small tolerance such as 1e-15).</font>
-
-<a name="line966">966: </a><font color="#B22222">   By default, balancing is disabled. The two-sided method is much more</font>
-<a name="line967">967: </a><font color="#B22222">   effective than the one-sided counterpart, but it requires the system</font>
-<a name="line968">968: </a><font color="#B22222">   matrices to have the MatMultTranspose operation defined.</font>
-
-<a name="line970">970: </a><font color="#B22222">   The parameter 'its' is the number of iterations performed by the method. The</font>
-<a name="line971">971: </a><font color="#B22222">   cutoff value is used only in the two-side variant. Use PETSC_DEFAULT to assign</font>
-<a name="line972">972: </a><font color="#B22222">   a reasonably good value.</font>
-
-<a name="line974">974: </a><font color="#B22222">   User-defined balancing is allowed provided that the corresponding matrix</font>
-<a name="line975">975: </a><font color="#B22222">   is set via <a href="../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>.</font>
-
-<a name="line977">977: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line979">979: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(), <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>, <a href="../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>()</font>
-<a name="line980">980: </a><font color="#B22222">@*/</font>
-<a name="line981">981: </a><strong><font color="#4169E1"><a name="EPSSetBalance"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a> bal,PetscInt its,PetscReal cutoff)</font></strong>
-<a name="line982">982: </a>{
-<a name="line988">988: </a>  <font color="#4169E1">switch</font> (bal) {
-<a name="line989">989: </a>    <font color="#4169E1">case</font> EPS_BALANCE_NONE:
-<a name="line990">990: </a>    <font color="#4169E1">case</font> EPS_BALANCE_ONESIDE:
-<a name="line991">991: </a>    <font color="#4169E1">case</font> EPS_BALANCE_TWOSIDE:
-<a name="line992">992: </a>    <font color="#4169E1">case</font> EPS_BALANCE_USER:
-<a name="line993">993: </a>      eps->balance = bal;
-<a name="line994">994: </a>      <font color="#4169E1">break</font>;
-<a name="line995">995: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line996">996: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid value of argument 'bal'"</font>);
-<a name="line997">997: </a>  }
-<a name="line998">998: </a>  <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) eps->balance_its = 5;
-<a name="line999">999: </a>  <font color="#4169E1">else</font> {
-<a name="line1000">1000: </a>    <font color="#4169E1">if</font> (its <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of its. Must be > 0"</font>);
-<a name="line1001">1001: </a>    eps->balance_its = its;
-<a name="line1002">1002: </a>  }
-<a name="line1003">1003: </a>  <font color="#4169E1">if</font> (cutoff==PETSC_DECIDE || cutoff==PETSC_DEFAULT) eps->balance_cutoff = 1e-8;
-<a name="line1004">1004: </a>  <font color="#4169E1">else</font> {
-<a name="line1005">1005: </a>    <font color="#4169E1">if</font> (cutoff <= 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of cutoff. Must be > 0"</font>);
-<a name="line1006">1006: </a>    eps->balance_cutoff = cutoff;
-<a name="line1007">1007: </a>  }
-<a name="line1008">1008: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1009">1009: </a>}
-
-<a name="line1013">1013: </a><font color="#B22222">/*@</font>
-<a name="line1014">1014: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a> - Gets the balancing type used by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object, and the</font>
-<a name="line1015">1015: </a><font color="#B22222">   associated parameters.</font>
-
-<a name="line1017">1017: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1019">1019: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1020">1020: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line1022">1022: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1023">1023: </a><font color="#B22222">+  bal    - the balancing method</font>
-<a name="line1024">1024: </a><font color="#B22222">.  its    - number of iterations of the balancing algorithm</font>
-<a name="line1025">1025: </a><font color="#B22222">-  cutoff - cutoff value</font>
-
-<a name="line1027">1027: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1029">1029: </a><font color="#B22222">   Note:</font>
-<a name="line1030">1030: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line1032">1032: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(), <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a></font>
-<a name="line1033">1033: </a><font color="#B22222">@*/</font>
-<a name="line1034">1034: </a><strong><font color="#4169E1"><a name="EPSGetBalance"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a> *bal,PetscInt *its,PetscReal *cutoff)</font></strong>
-<a name="line1035">1035: </a>{
-<a name="line1038">1038: </a>  <font color="#4169E1">if</font> (bal)    *bal = eps->balance;
-<a name="line1039">1039: </a>  <font color="#4169E1">if</font> (its)    *its = eps->balance_its;
-<a name="line1040">1040: </a>  <font color="#4169E1">if</font> (cutoff) *cutoff = eps->balance_cutoff;
-<a name="line1041">1041: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1042">1042: </a>}
-
-<a name="line1046">1046: </a><font color="#B22222">/*@</font>
-<a name="line1047">1047: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a> - Specifies if the solver must compute the true residual</font>
-<a name="line1048">1048: </a><font color="#B22222">   explicitly or not.</font>
-
-<a name="line1050">1050: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1052">1052: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1053">1053: </a><font color="#B22222">+  eps     - the eigensolver context</font>
-<a name="line1054">1054: </a><font color="#B22222">-  trueres - whether true residuals are required or not</font>
-
-<a name="line1056">1056: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1057">1057: </a><font color="#B22222">.  -eps_true_residual <boolean> - Sets/resets the boolean flag 'trueres'</font>
-
-<a name="line1059">1059: </a><font color="#B22222">   Notes:</font>
-<a name="line1060">1060: </a><font color="#B22222">   If the user sets trueres=PETSC_TRUE then the solver explicitly computes</font>
-<a name="line1061">1061: </a><font color="#B22222">   the true residual for each eigenpair approximation, and uses it for</font>
-<a name="line1062">1062: </a><font color="#B22222">   convergence testing. Computing the residual is usually an expensive</font>
-<a name="line1063">1063: </a><font color="#B22222">   operation. Some solvers (e.g., Krylov solvers) can avoid this computation</font>
-<a name="line1064">1064: </a><font color="#B22222">   by using a cheap estimate of the residual norm, but this may sometimes</font>
-<a name="line1065">1065: </a><font color="#B22222">   give inaccurate results (especially if a spectral transform is being</font>
-<a name="line1066">1066: </a><font color="#B22222">   used). On the contrary, preconditioned eigensolvers (e.g., Davidson solvers)</font>
-<a name="line1067">1067: </a><font color="#B22222">   do rely on computing the true residual, so this option is irrelevant for them.</font>
-
-<a name="line1069">1069: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1071">1071: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a>()</font>
-<a name="line1072">1072: </a><font color="#B22222">@*/</font>
-<a name="line1073">1073: </a><strong><font color="#4169E1"><a name="EPSSetTrueResidual"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool trueres)</font></strong>
-<a name="line1074">1074: </a>{
-<a name="line1078">1078: </a>  eps->trueres = trueres;
-<a name="line1079">1079: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1080">1080: </a>}
-
-<a name="line1084">1084: </a><font color="#B22222">/*@</font>
-<a name="line1085">1085: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a> - Returns the flag indicating whether true</font>
-<a name="line1086">1086: </a><font color="#B22222">   residuals must be computed explicitly or not.</font>
-
-<a name="line1088">1088: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1090">1090: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1091">1091: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line1093">1093: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1094">1094: </a><font color="#B22222">.  trueres - the returned flag</font>
-
-<a name="line1096">1096: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1098">1098: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>()</font>
-<a name="line1099">1099: </a><font color="#B22222">@*/</font>
-<a name="line1100">1100: </a><strong><font color="#4169E1"><a name="EPSGetTrueResidual"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *trueres)</font></strong>
-<a name="line1101">1101: </a>{
-<a name="line1105">1105: </a>  *trueres = eps->trueres;
-<a name="line1106">1106: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1107">1107: </a>}
-
-<a name="line1111">1111: </a><font color="#B22222">/*@</font>
-<a name="line1112">1112: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a> - Specifies if the solver must compute the residual norm of all</font>
-<a name="line1113">1113: </a><font color="#B22222">   approximate eigenpairs or not.</font>
-
-<a name="line1115">1115: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1117">1117: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1118">1118: </a><font color="#B22222">+  eps      - the eigensolver context</font>
-<a name="line1119">1119: </a><font color="#B22222">-  trackall - whether to compute all residuals or not</font>
-
-<a name="line1121">1121: </a><font color="#B22222">   Notes:</font>
-<a name="line1122">1122: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver computes (or estimates)</font>
-<a name="line1123">1123: </a><font color="#B22222">   the residual norm for each eigenpair approximation. Computing the residual is</font>
-<a name="line1124">1124: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute only the residual</font>
-<a name="line1125">1125: </a><font color="#B22222">   associated to the first unconverged eigenpair.</font>
+<a name="line226">226: </a>    <font color="#B22222">/*</font>
+<a name="line227">227: </a><font color="#B22222">      Text monitors</font>
+<a name="line228">228: </a><font color="#B22222">    */</font>
+<a name="line229">229: </a>    <a href="../../../docs/manualpages/EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</a>(eps,<font color="#666666">"-eps_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EPSMonitorFirst">EPSMonitorFirst</a>"</font>,<a href="../../../docs/manualpages/EPS/EPSMonitorFirst.html#EP [...]
+<a name="line230">230: </a>    <a href="../../../docs/manualpages/EPS/EPSConvMonitorSetFromOptions.html#EPSConvMonitorSetFromOptions">EPSConvMonitorSetFromOptions</a>(eps,<font color="#666666">"-eps_monitor_conv"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorConverged.html#EPSMonitorConverged">EPSMonitorConverged</a>"</font>,<a href="../../../docs/manualpag [...]
+<a name="line231">231: </a>    <a href="../../../docs/manualpages/EPS/EPSMonitorSetFromOptions.html#EPSMonitorSetFromOptions">EPSMonitorSetFromOptions</a>(eps,<font color="#666666">"-eps_monitor_all"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMonitorAll</a>"</font>,<a href="../../../docs/manualpages/EPS/EPSMonitorAll.html#EPSMonitorAll">EPSMoni [...]
+<a name="line232">232: </a>    <font color="#B22222">/*</font>
+<a name="line233">233: </a><font color="#B22222">      Line graph monitors</font>
+<a name="line234">234: </a><font color="#B22222">    */</font>
+<a name="line235">235: </a>    PetscOptionsBool(<font color="#666666">"-eps_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line236">236: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line237">237: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorLGCreate.html#EPSMonitorLGCreate">EPSMonitorLGCreate</a>(PetscObjectComm((PetscObject)eps),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line238">238: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line239">239: </a>    }
+<a name="line240">240: </a>    PetscOptionsBool(<font color="#666666">"-eps_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line241">241: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line242">242: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorLGCreate.html#EPSMonitorLGCreate">EPSMonitorLGCreate</a>(PetscObjectComm((PetscObject)eps),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line243">243: </a>      <a href="../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(eps,EPSMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line244">244: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(eps,PETSC_TRUE);
+<a name="line245">245: </a>    }
+<a name="line246">246: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+<a name="line247">247: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-eps_largest_magnitude"</font>,<font color="#666666">"compute largest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line248">248: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_LARGEST_MAGNITUDE); }
+<a name="line249">249: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_smallest_magnitude"</font>,<font color="#666666">"compute smallest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line250">250: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_MAGNITUDE); }
+<a name="line251">251: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_largest_real"</font>,<font color="#666666">"compute largest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line252">252: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_LARGEST_REAL); }
+<a name="line253">253: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_smallest_real"</font>,<font color="#666666">"compute smallest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line254">254: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_REAL); }
+<a name="line255">255: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_largest_imaginary"</font>,<font color="#666666">"compute largest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line256">256: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_LARGEST_IMAGINARY); }
+<a name="line257">257: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_smallest_imaginary"</font>,<font color="#666666">"compute smallest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line258">258: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_SMALLEST_IMAGINARY); }
+<a name="line259">259: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_target_magnitude"</font>,<font color="#666666">"compute nearest eigenvalues to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line260">260: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE); }
+<a name="line261">261: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_target_real"</font>,<font color="#666666">"compute eigenvalues with real parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line262">262: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_REAL); }
+<a name="line263">263: </a>    PetscOptionsBoolGroup(<font color="#666666">"-eps_target_imaginary"</font>,<font color="#666666">"compute eigenvalues with imaginary parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line264">264: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_IMAGINARY); }
+<a name="line265">265: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-eps_all"</font>,<font color="#666666">"compute all eigenvalues in an interval or a region"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_ALL); }
+
+<a name="line268">268: </a>    PetscOptionsScalar(<font color="#666666">"-eps_target"</font>,<font color="#666666">"Value of the target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>"</font>,eps->target,&s,&flg);
+<a name="line269">269: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line270">270: </a>      <font color="#4169E1">if</font> (eps->which!=EPS_TARGET_REAL && eps->which!=EPS_TARGET_IMAGINARY) {
+<a name="line271">271: </a>        <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_TARGET_MAGNITUDE);
+<a name="line272">272: </a>      }
+<a name="line273">273: </a>      <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(eps,s);
+<a name="line274">274: </a>    }
+<a name="line275">275: </a>    k = 2;
+<a name="line276">276: </a>    PetscOptionsRealArray(<font color="#666666">"-eps_interval"</font>,<font color="#666666">"Computational interval (two real values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>"</font>,array,&k,&flg);
+<a name="line277">277: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line278">278: </a>      <font color="#4169E1">if</font> (k<2) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_SIZ,<font color="#666666">"Must pass two values in -eps_interval (comma-separated without spaces)"</font>);
+<a name="line279">279: </a>      <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(eps,EPS_ALL);
+<a name="line280">280: </a>      <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(eps,array[0],array[1]);
+<a name="line281">281: </a>    }
+
+<a name="line283">283: </a>    PetscOptionsBool(<font color="#666666">"-eps_true_residual"</font>,<font color="#666666">"Compute true residuals explicitly"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>"</font>,eps->trueres,&eps->trueres,NULL);
+<a name="line284">284: </a>    PetscOptionsBool(<font color="#666666">"-eps_purify"</font>,<font color="#666666">"Postprocess eigenvectors for purification"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>"</font>,eps->purify,&eps->purify,NULL);
+
+<a name="line286">286: </a>    PetscOptionsName(<font color="#666666">"-eps_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>"</font>,NULL);
+<a name="line287">287: </a>    PetscOptionsName(<font color="#666666">"-eps_view_vectors"</font>,<font color="#666666">"View computed eigenvectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>"</font>,NULL);
+<a name="line288">288: </a>    PetscOptionsName(<font color="#666666">"-eps_view_values"</font>,<font color="#666666">"View computed eigenvalues"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>"</font>,NULL);
+<a name="line289">289: </a>    PetscOptionsName(<font color="#666666">"-eps_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>"</font>,NULL);
+<a name="line290">290: </a>    PetscOptionsName(<font color="#666666">"-eps_error_absolute"</font>,<font color="#666666">"Print absolute errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>"</font>,NULL);
+<a name="line291">291: </a>    PetscOptionsName(<font color="#666666">"-eps_error_relative"</font>,<font color="#666666">"Print relative errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>"</font>,NULL);
+<a name="line292">292: </a>    PetscOptionsName(<font color="#666666">"-eps_error_backward"</font>,<font color="#666666">"Print backward errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>"</font>,NULL);
+
+<a name="line294">294: </a>    <font color="#4169E1">if</font> (eps->ops->setfromoptions) {
+<a name="line295">295: </a>      (*eps->ops->setfromoptions)(PetscOptionsObject,eps);
+<a name="line296">296: </a>    }
+<a name="line297">297: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)eps);
+<a name="line298">298: </a>  PetscOptionsEnd();
+
+<a name="line300">300: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line301">301: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(eps->V);
+<a name="line302">302: </a>  <font color="#4169E1">if</font> (!eps->rg) { <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&eps->rg); }
+<a name="line303">303: </a>  <a href="../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(eps->rg);
+<a name="line304">304: </a>  <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
+<a name="line305">305: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(eps->ds);
+<a name="line306">306: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
+<a name="line307">307: </a>  <a href="../../../docs/manualpages/ST/STSetFromOptions.html#STSetFromOptions">STSetFromOptions</a>(eps->st);
+<a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
+<a name="line309">309: </a>}
+
+<a name="line313">313: </a><font color="#B22222">/*@</font>
+<a name="line314">314: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
+<a name="line315">315: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> convergence tests.</font>
+
+<a name="line317">317: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line319">319: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line320">320: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line322">322: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line323">323: </a><font color="#B22222">+  tol - the convergence tolerance</font>
+<a name="line324">324: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
+
+<a name="line326">326: </a><font color="#B22222">   Notes:</font>
+<a name="line327">327: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line329">329: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line331">331: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>()</font>
+<a name="line332">332: </a><font color="#B22222">@*/</font>
+<a name="line333">333: </a><strong><font color="#4169E1"><a name="EPSGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line334">334: </a>{
+<a name="line337">337: </a>  <font color="#4169E1">if</font> (tol)    *tol    = eps->tol;
+<a name="line338">338: </a>  <font color="#4169E1">if</font> (maxits) *maxits = eps->max_it;
+<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>}
+
+<a name="line344">344: </a><font color="#B22222">/*@</font>
+<a name="line345">345: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
+<a name="line346">346: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> convergence tests.</font>
+
+<a name="line348">348: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line350">350: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line351">351: </a><font color="#B22222">+  eps - the eigensolver context</font>
+<a name="line352">352: </a><font color="#B22222">.  tol - the convergence tolerance</font>
+<a name="line353">353: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
+
+<a name="line355">355: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line356">356: </a><font color="#B22222">+  -eps_tol <tol> - Sets the convergence tolerance</font>
+<a name="line357">357: </a><font color="#B22222">-  -eps_max_it <maxits> - Sets the maximum number of iterations allowed</font>
+
+<a name="line359">359: </a><font color="#B22222">   Notes:</font>
+<a name="line360">360: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
+
+<a name="line362">362: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line364">364: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>()</font>
+<a name="line365">365: </a><font color="#B22222">@*/</font>
+<a name="line366">366: </a><strong><font color="#4169E1"><a name="EPSSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line367">367: </a>{
+<a name="line372">372: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
+<a name="line373">373: </a>    eps->tol   = PETSC_DEFAULT;
+<a name="line374">374: </a>    eps->state = EPS_STATE_INITIAL;
+<a name="line375">375: </a>  } <font color="#4169E1">else</font> {
+<a name="line376">376: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line377">377: </a>    eps->tol = tol;
+<a name="line378">378: </a>  }
+<a name="line379">379: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+<a name="line380">380: </a>    eps->max_it = 0;
+<a name="line381">381: </a>    eps->state  = EPS_STATE_INITIAL;
+<a name="line382">382: </a>  } <font color="#4169E1">else</font> {
+<a name="line383">383: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
+<a name="line384">384: </a>    eps->max_it = maxits;
+<a name="line385">385: </a>  }
+<a name="line386">386: </a>  <font color="#4169E1">return</font>(0);
+<a name="line387">387: </a>}
+
+<a name="line391">391: </a><font color="#B22222">/*@</font>
+<a name="line392">392: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a> - Gets the number of eigenvalues to compute</font>
+<a name="line393">393: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line395">395: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line397">397: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line398">398: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line400">400: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line401">401: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
+<a name="line402">402: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line403">403: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line405">405: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line407">407: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>()</font>
+<a name="line408">408: </a><font color="#B22222">@*/</font>
+<a name="line409">409: </a><strong><font color="#4169E1"><a name="EPSGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line410">410: </a>{
+<a name="line413">413: </a>  <font color="#4169E1">if</font> (nev) *nev = eps->nev;
+<a name="line414">414: </a>  <font color="#4169E1">if</font> (ncv) *ncv = eps->ncv;
+<a name="line415">415: </a>  <font color="#4169E1">if</font> (mpd) *mpd = eps->mpd;
+<a name="line416">416: </a>  <font color="#4169E1">return</font>(0);
+<a name="line417">417: </a>}
+
+<a name="line421">421: </a><font color="#B22222">/*@</font>
+<a name="line422">422: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a> - Sets the number of eigenvalues to compute</font>
+<a name="line423">423: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line425">425: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line427">427: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line428">428: </a><font color="#B22222">+  eps - the eigensolver context</font>
+<a name="line429">429: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
+<a name="line430">430: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line431">431: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line433">433: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line434">434: </a><font color="#B22222">+  -eps_nev <nev> - Sets the number of eigenvalues</font>
+<a name="line435">435: </a><font color="#B22222">.  -eps_ncv <ncv> - Sets the dimension of the subspace</font>
+<a name="line436">436: </a><font color="#B22222">-  -eps_mpd <mpd> - Sets the maximum projected dimension</font>
+
+<a name="line438">438: </a><font color="#B22222">   Notes:</font>
+<a name="line439">439: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
+<a name="line440">440: </a><font color="#B22222">   dependent on the solution method.</font>
+
+<a name="line442">442: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
+<a name="line443">443: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
+<a name="line444">444: </a><font color="#B22222">   (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and</font>
+<a name="line445">445: </a><font color="#B22222">   (b) in cases where nev is large, the user sets mpd.</font>
+
+<a name="line447">447: </a><font color="#B22222">   The value of ncv should always be between nev and (nev+mpd), typically</font>
+<a name="line448">448: </a><font color="#B22222">   ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise</font>
+<a name="line449">449: </a><font color="#B22222">   a smaller value should be used.</font>
+
+<a name="line451">451: </a><font color="#B22222">   When computing all eigenvalues in an interval, see <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), these</font>
+<a name="line452">452: </a><font color="#B22222">   parameters lose relevance, and tuning must be done with</font>
+<a name="line453">453: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>().</font>
+
+<a name="line455">455: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line457">457: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(), <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(), <a href="../../../docs/manualpages/EPS/EPSKrylovSchurSetDimensions.html#EPSKrylovSchurSetDimensions">EPSKrylovSchurSetDimensions</a>()</font>
+<a name="line458">458: </a><font color="#B22222">@*/</font>
+<a name="line459">459: </a><strong><font color="#4169E1"><a name="EPSSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
+<a name="line460">460: </a>{
+<a name="line466">466: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
+<a name="line467">467: </a>  eps->nev = nev;
+<a name="line468">468: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
+<a name="line469">469: </a>    eps->ncv = 0;
+<a name="line470">470: </a>  } <font color="#4169E1">else</font> {
+<a name="line471">471: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
+<a name="line472">472: </a>    eps->ncv = ncv;
+<a name="line473">473: </a>  }
+<a name="line474">474: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
+<a name="line475">475: </a>    eps->mpd = 0;
+<a name="line476">476: </a>  } <font color="#4169E1">else</font> {
+<a name="line477">477: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
+<a name="line478">478: </a>    eps->mpd = mpd;
+<a name="line479">479: </a>  }
+<a name="line480">480: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><font color="#B22222">/*@</font>
+<a name="line487">487: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a> - Specifies which portion of the spectrum is</font>
+<a name="line488">488: </a><font color="#B22222">   to be sought.</font>
+
+<a name="line490">490: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line492">492: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line493">493: </a><font color="#B22222">+  eps   - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line494">494: </a><font color="#B22222">-  which - the portion of the spectrum to be sought</font>
+
+<a name="line496">496: </a><font color="#B22222">   Possible values:</font>
+<a name="line497">497: </a><font color="#B22222">   The parameter 'which' can have one of these values</font>
+
+<a name="line499">499: </a><font color="#B22222">+     EPS_LARGEST_MAGNITUDE - largest eigenvalues in magnitude (default)</font>
+<a name="line500">500: </a><font color="#B22222">.     EPS_SMALLEST_MAGNITUDE - smallest eigenvalues in magnitude</font>
+<a name="line501">501: </a><font color="#B22222">.     EPS_LARGEST_REAL - largest real parts</font>
+<a name="line502">502: </a><font color="#B22222">.     EPS_SMALLEST_REAL - smallest real parts</font>
+<a name="line503">503: </a><font color="#B22222">.     EPS_LARGEST_IMAGINARY - largest imaginary parts</font>
+<a name="line504">504: </a><font color="#B22222">.     EPS_SMALLEST_IMAGINARY - smallest imaginary parts</font>
+<a name="line505">505: </a><font color="#B22222">.     EPS_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)</font>
+<a name="line506">506: </a><font color="#B22222">.     EPS_TARGET_REAL - eigenvalues with real part closest to target</font>
+<a name="line507">507: </a><font color="#B22222">.     EPS_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target</font>
+<a name="line508">508: </a><font color="#B22222">.     EPS_ALL - all eigenvalues contained in a given interval or region</font>
+<a name="line509">509: </a><font color="#B22222">-     EPS_WHICH_USER - user defined ordering set with <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>()</font>
+
+<a name="line511">511: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line512">512: </a><font color="#B22222">+   -eps_largest_magnitude - Sets largest eigenvalues in magnitude</font>
+<a name="line513">513: </a><font color="#B22222">.   -eps_smallest_magnitude - Sets smallest eigenvalues in magnitude</font>
+<a name="line514">514: </a><font color="#B22222">.   -eps_largest_real - Sets largest real parts</font>
+<a name="line515">515: </a><font color="#B22222">.   -eps_smallest_real - Sets smallest real parts</font>
+<a name="line516">516: </a><font color="#B22222">.   -eps_largest_imaginary - Sets largest imaginary parts</font>
+<a name="line517">517: </a><font color="#B22222">.   -eps_smallest_imaginary - Sets smallest imaginary parts</font>
+<a name="line518">518: </a><font color="#B22222">.   -eps_target_magnitude - Sets eigenvalues closest to target</font>
+<a name="line519">519: </a><font color="#B22222">.   -eps_target_real - Sets real parts closest to target</font>
+<a name="line520">520: </a><font color="#B22222">.   -eps_target_imaginary - Sets imaginary parts closest to target</font>
+<a name="line521">521: </a><font color="#B22222">-   -eps_all - Sets all eigenvalues in an interval or region</font>
+
+<a name="line523">523: </a><font color="#B22222">   Notes:</font>
+<a name="line524">524: </a><font color="#B22222">   Not all eigensolvers implemented in <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> account for all the possible values</font>
+<a name="line525">525: </a><font color="#B22222">   stated above. Also, some values make sense only for certain types of</font>
+<a name="line526">526: </a><font color="#B22222">   problems. If SLEPc is compiled for real numbers EPS_LARGEST_IMAGINARY</font>
+<a name="line527">527: </a><font color="#B22222">   and EPS_SMALLEST_IMAGINARY use the absolute value of the imaginary part</font>
+<a name="line528">528: </a><font color="#B22222">   for eigenvalue selection.</font>
+
+<a name="line530">530: </a><font color="#B22222">   The target is a scalar value provided with <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>().</font>
+
+<a name="line532">532: </a><font color="#B22222">   The criterion EPS_TARGET_IMAGINARY is available only in case PETSc and</font>
+<a name="line533">533: </a><font color="#B22222">   SLEPc have been built with complex scalars.</font>
+
+<a name="line535">535: </a><font color="#B22222">   EPS_ALL is intended for use in combination with an interval (see</font>
+<a name="line536">536: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()), when all eigenvalues within the interval are requested,</font>
+<a name="line537">537: </a><font color="#B22222">   or in the context of the CISS solver for computing all eigenvalues in a region.</font>
+<a name="line538">538: </a><font color="#B22222">   In those cases, the number of eigenvalues is unknown, so the nev parameter</font>
+<a name="line539">539: </a><font color="#B22222">   has a different sense, see <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>().</font>
+
+<a name="line541">541: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line543">543: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(), <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>(),</font>
+<a name="line544">544: </a><font color="#B22222">          <a href="../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(), <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(), <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a></font>
+<a name="line545">545: </a><font color="#B22222">@*/</font>
+<a name="line546">546: </a><strong><font color="#4169E1"><a name="EPSSetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a> which)</font></strong>
+<a name="line547">547: </a>{
+<a name="line551">551: </a>  <font color="#4169E1">switch</font> (which) {
+<a name="line552">552: </a>    <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
+<a name="line553">553: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
+<a name="line554">554: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
+<a name="line555">555: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
+<a name="line556">556: </a>    <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
+<a name="line557">557: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
+<a name="line558">558: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line559">559: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line560">560: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line561">561: </a>    <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
+<a name="line562">562: </a><font color="#A020F0">#endif</font>
+<a name="line563">563: </a>    <font color="#4169E1">case</font> EPS_ALL:
+<a name="line564">564: </a>    <font color="#4169E1">case</font> EPS_WHICH_USER:
+<a name="line565">565: </a>      <font color="#4169E1">if</font> (eps->which != which) {
+<a name="line566">566: </a>        eps->state = EPS_STATE_INITIAL;
+<a name="line567">567: </a>        eps->which = which;
+<a name="line568">568: </a>      }
+<a name="line569">569: </a>      <font color="#4169E1">break</font>;
+<a name="line570">570: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line571">571: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' value"</font>);
+<a name="line572">572: </a>  }
+<a name="line573">573: </a>  <font color="#4169E1">return</font>(0);
+<a name="line574">574: </a>}
+
+<a name="line578">578: </a><font color="#B22222">/*@</font>
+<a name="line579">579: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a> - Returns which portion of the spectrum is to be</font>
+<a name="line580">580: </a><font color="#B22222">   sought.</font>
+
+<a name="line582">582: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line584">584: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line585">585: </a><font color="#B22222">.  eps - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+
+<a name="line587">587: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line588">588: </a><font color="#B22222">.  which - the portion of the spectrum to be sought</font>
+
+<a name="line590">590: </a><font color="#B22222">   Notes:</font>
+<a name="line591">591: </a><font color="#B22222">   See <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>() for possible values of 'which'.</font>
+
+<a name="line593">593: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line595">595: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a></font>
+<a name="line596">596: </a><font color="#B22222">@*/</font>
+<a name="line597">597: </a><strong><font color="#4169E1"><a name="EPSGetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetWhichEigenpairs.html#EPSGetWhichEigenpairs">EPSGetWhichEigenpairs</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a> *which)</font></strong>
+<a name="line598">598: </a>{
+<a name="line602">602: </a>  *which = eps->which;
+<a name="line603">603: </a>  <font color="#4169E1">return</font>(0);
+<a name="line604">604: </a>}
+
+<a name="line608">608: </a><font color="#B22222">/*@C</font>
+<a name="line609">609: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a> - Specifies the eigenvalue comparison function</font>
+<a name="line610">610: </a><font color="#B22222">   when <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>() is set to EPS_WHICH_USER.</font>
+
+<a name="line612">612: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line614">614: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line615">615: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line616">616: </a><font color="#B22222">.  func - a pointer to the comparison function</font>
+<a name="line617">617: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the comparison function)</font>
+
+<a name="line619">619: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line620">620: </a><font color="#B22222">$   func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)</font>
+
+<a name="line622">622: </a><font color="#B22222">+   ar     - real part of the 1st eigenvalue</font>
+<a name="line623">623: </a><font color="#B22222">.   ai     - imaginary part of the 1st eigenvalue</font>
+<a name="line624">624: </a><font color="#B22222">.   br     - real part of the 2nd eigenvalue</font>
+<a name="line625">625: </a><font color="#B22222">.   bi     - imaginary part of the 2nd eigenvalue</font>
+<a name="line626">626: </a><font color="#B22222">.   res    - result of comparison</font>
+<a name="line627">627: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>()</font>
+
+<a name="line629">629: </a><font color="#B22222">   Note:</font>
+<a name="line630">630: </a><font color="#B22222">   The returning parameter 'res' can be:</font>
+<a name="line631">631: </a><font color="#B22222">+  negative - if the 1st eigenvalue is preferred to the 2st one</font>
+<a name="line632">632: </a><font color="#B22222">.  zero     - if both eigenvalues are equally preferred</font>
+<a name="line633">633: </a><font color="#B22222">-  positive - if the 2st eigenvalue is preferred to the 1st one</font>
+
+<a name="line635">635: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line637">637: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSWhich.html#EPSWhich">EPSWhich</a></font>
+<a name="line638">638: </a><font color="#B22222">@*/</font>
+<a name="line639">639: </a><strong><font color="#4169E1"><a name="EPSSetEigenvalueComparison"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)</font></strong>
+<a name="line640">640: </a>{
+<a name="line643">643: </a>  eps->sc->comparison    = func;
+<a name="line644">644: </a>  eps->sc->comparisonctx = ctx;
+<a name="line645">645: </a>  eps->which             = EPS_WHICH_USER;
+<a name="line646">646: </a>  <font color="#4169E1">return</font>(0);
+<a name="line647">647: </a>}
+
+<a name="line651">651: </a><font color="#B22222">/*@C</font>
+<a name="line652">652: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a> - Specifies a function intended to look for</font>
+<a name="line653">653: </a><font color="#B22222">   eigenvalues according to an arbitrary selection criterion. This criterion</font>
+<a name="line654">654: </a><font color="#B22222">   can be based on a computation involving the current eigenvector approximation.</font>
+
+<a name="line656">656: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line658">658: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line659">659: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line660">660: </a><font color="#B22222">.  func - a pointer to the evaluation function</font>
+<a name="line661">661: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the evaluation function)</font>
+
+<a name="line663">663: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line664">664: </a><font color="#B22222">$   func(PetscScalar er,PetscScalar ei,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx)</font>
+
+<a name="line666">666: </a><font color="#B22222">+   er     - real part of the current eigenvalue approximation</font>
+<a name="line667">667: </a><font color="#B22222">.   ei     - imaginary part of the current eigenvalue approximation</font>
+<a name="line668">668: </a><font color="#B22222">.   xr     - real part of the current eigenvector approximation</font>
+<a name="line669">669: </a><font color="#B22222">.   xi     - imaginary part of the current eigenvector approximation</font>
+<a name="line670">670: </a><font color="#B22222">.   rr     - result of evaluation (real part)</font>
+<a name="line671">671: </a><font color="#B22222">.   ri     - result of evaluation (imaginary part)</font>
+<a name="line672">672: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a>()</font>
+
+<a name="line674">674: </a><font color="#B22222">   Notes:</font>
+<a name="line675">675: </a><font color="#B22222">   This provides a mechanism to select eigenpairs by evaluating a user-defined</font>
+<a name="line676">676: </a><font color="#B22222">   function. When a function has been provided, the default selection based on</font>
+<a name="line677">677: </a><font color="#B22222">   sorting the eigenvalues is replaced by the sorting of the results of this</font>
+<a name="line678">678: </a><font color="#B22222">   function (with the same sorting criterion given in <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()).</font>
+
+<a name="line680">680: </a><font color="#B22222">   For instance, suppose you want to compute those eigenvectors that maximize</font>
+<a name="line681">681: </a><font color="#B22222">   a certain computable expression. Then implement the computation using</font>
+<a name="line682">682: </a><font color="#B22222">   the arguments xr and xi, and return the result in rr. Then set the standard</font>
+<a name="line683">683: </a><font color="#B22222">   sorting by magnitude so that the eigenpair with largest value of rr is</font>
+<a name="line684">684: </a><font color="#B22222">   selected.</font>
+
+<a name="line686">686: </a><font color="#B22222">   This evaluation function is collective, that is, all processes call it and</font>
+<a name="line687">687: </a><font color="#B22222">   it can use collective operations; furthermore, the computed result must</font>
+<a name="line688">688: </a><font color="#B22222">   be the same in all processes.</font>
+
+<a name="line690">690: </a><font color="#B22222">   The result of func is expressed as a complex number so that it is possible to</font>
+<a name="line691">691: </a><font color="#B22222">   use the standard eigenvalue sorting functions, but normally only rr is used.</font>
+<a name="line692">692: </a><font color="#B22222">   Set ri to zero unless it is meaningful in your application.</font>
+
+<a name="line694">694: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line696">696: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>()</font>
+<a name="line697">697: </a><font color="#B22222">@*/</font>
+<a name="line698">698: </a><strong><font color="#4169E1"><a name="EPSSetArbitrarySelection"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetArbitrarySelection.html#EPSSetArbitrarySelection">EPSSetArbitrarySelection</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(PetscScalar,PetscScalar,Vec,Vec,PetscScalar*,PetscScalar*,void*),void* ctx)</font></strong>
+<a name="line699">699: </a>{
+<a name="line702">702: </a>  eps->arbitrary    = func;
+<a name="line703">703: </a>  eps->arbitraryctx = ctx;
+<a name="line704">704: </a>  eps->state        = EPS_STATE_INITIAL;
+<a name="line705">705: </a>  <font color="#4169E1">return</font>(0);
+<a name="line706">706: </a>}
+
+<a name="line710">710: </a><font color="#B22222">/*@C</font>
+<a name="line711">711: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a> - Sets a function to compute the error estimate</font>
+<a name="line712">712: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line714">714: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line716">716: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line717">717: </a><font color="#B22222">+  eps     - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line718">718: </a><font color="#B22222">.  func    - a pointer to the convergence test function</font>
+<a name="line719">719: </a><font color="#B22222">.  ctx     - context for private data for the convergence routine (may be null)</font>
+<a name="line720">720: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line722">722: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line723">723: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font>
+
+<a name="line725">725: </a><font color="#B22222">+   eps    - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line726">726: </a><font color="#B22222">.   eigr   - real part of the eigenvalue</font>
+<a name="line727">727: </a><font color="#B22222">.   eigi   - imaginary part of the eigenvalue</font>
+<a name="line728">728: </a><font color="#B22222">.   res    - residual norm associated to the eigenpair</font>
+<a name="line729">729: </a><font color="#B22222">.   errest - (output) computed error estimate</font>
+<a name="line730">730: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>()</font>
+
+<a name="line732">732: </a><font color="#B22222">   Note:</font>
+<a name="line733">733: </a><font color="#B22222">   If the error estimate returned by the convergence test function is less than</font>
+<a name="line734">734: </a><font color="#B22222">   the tolerance, then the eigenvalue is accepted as converged.</font>
+
+<a name="line736">736: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line738">738: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>()</font>
+<a name="line739">739: </a><font color="#B22222">@*/</font>
+<a name="line740">740: </a><strong><font color="#4169E1"><a name="EPSSetConvergenceTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)( [...]
+<a name="line741">741: </a>{
+
+<a name="line746">746: </a>  <font color="#4169E1">if</font> (eps->convergeddestroy) {
+<a name="line747">747: </a>    (*eps->convergeddestroy)(eps->convergedctx);
+<a name="line748">748: </a>  }
+<a name="line749">749: </a>  eps->converged        = func;
+<a name="line750">750: </a>  eps->convergeddestroy = destroy;
+<a name="line751">751: </a>  eps->convergedctx     = ctx;
+<a name="line752">752: </a>  <font color="#4169E1">if</font> (func == EPSConvergedRelative) eps->conv = EPS_CONV_REL;
+<a name="line753">753: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == EPSConvergedNorm) eps->conv = EPS_CONV_NORM;
+<a name="line754">754: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == EPSConvergedAbsolute) eps->conv = EPS_CONV_ABS;
+<a name="line755">755: </a>  <font color="#4169E1">else</font> eps->conv = EPS_CONV_USER;
+<a name="line756">756: </a>  <font color="#4169E1">return</font>(0);
+<a name="line757">757: </a>}
+
+<a name="line761">761: </a><font color="#B22222">/*@</font>
+<a name="line762">762: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a> - Specifies how to compute the error estimate</font>
+<a name="line763">763: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line765">765: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line767">767: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line768">768: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line769">769: </a><font color="#B22222">-  conv - the type of convergence test</font>
+
+<a name="line771">771: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line772">772: </a><font color="#B22222">+  -eps_conv_abs  - Sets the absolute convergence test</font>
+<a name="line773">773: </a><font color="#B22222">.  -eps_conv_rel  - Sets the convergence test relative to the eigenvalue</font>
+<a name="line774">774: </a><font color="#B22222">.  -eps_conv_norm - Sets the convergence test relative to the matrix norms</font>
+<a name="line775">775: </a><font color="#B22222">-  -eps_conv_user - Selects the user-defined convergence test</font>
+
+<a name="line777">777: </a><font color="#B22222">   Note:</font>
+<a name="line778">778: </a><font color="#B22222">   The parameter 'conv' can have one of these values</font>
+<a name="line779">779: </a><font color="#B22222">+     EPS_CONV_ABS  - absolute error ||r||</font>
+<a name="line780">780: </a><font color="#B22222">.     EPS_CONV_REL  - error relative to the eigenvalue l, ||r||/|l|</font>
+<a name="line781">781: </a><font color="#B22222">.     EPS_CONV_NORM - error relative to the matrix norms, ||r||/(||A||+|l|*||B||)</font>
+<a name="line782">782: </a><font color="#B22222">-     EPS_CONV_USER - function set by <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>()</font>
+
+<a name="line784">784: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line786">786: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTestFunction.html#EPSSetConvergenceTestFunction">EPSSetConvergenceTestFunction</a>(), <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(), <a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPS [...]
+<a name="line787">787: </a><font color="#B22222">@*/</font>
+<a name="line788">788: </a><strong><font color="#4169E1"><a name="EPSSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a> conv)</font></strong>
+<a name="line789">789: </a>{
+<a name="line793">793: </a>  <font color="#4169E1">switch</font> (conv) {
+<a name="line794">794: </a>    <font color="#4169E1">case</font> EPS_CONV_ABS:  eps->converged = EPSConvergedAbsolute; <font color="#4169E1">break</font>;
+<a name="line795">795: </a>    <font color="#4169E1">case</font> EPS_CONV_REL:  eps->converged = EPSConvergedRelative; <font color="#4169E1">break</font>;
+<a name="line796">796: </a>    <font color="#4169E1">case</font> EPS_CONV_NORM: eps->converged = EPSConvergedNorm; <font color="#4169E1">break</font>;
+<a name="line797">797: </a>    <font color="#4169E1">case</font> EPS_CONV_USER: <font color="#4169E1">break</font>;
+<a name="line798">798: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line799">799: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'conv' value"</font>);
+<a name="line800">800: </a>  }
+<a name="line801">801: </a>  eps->conv = conv;
+<a name="line802">802: </a>  <font color="#4169E1">return</font>(0);
+<a name="line803">803: </a>}
+
+<a name="line807">807: </a><font color="#B22222">/*@</font>
+<a name="line808">808: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a> - Gets the method used to compute the error estimate</font>
+<a name="line809">809: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line811">811: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line813">813: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line814">814: </a><font color="#B22222">.  eps   - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+
+<a name="line816">816: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line817">817: </a><font color="#B22222">.  conv  - the type of convergence test</font>
+
+<a name="line819">819: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line821">821: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a></font>
+<a name="line822">822: </a><font color="#B22222">@*/</font>
+<a name="line823">823: </a><strong><font color="#4169E1"><a name="EPSGetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetConvergenceTest.html#EPSGetConvergenceTest">EPSGetConvergenceTest</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSConv.html#EPSConv">EPSConv</a> *conv)</font></strong>
+<a name="line824">824: </a>{
+<a name="line828">828: </a>  *conv = eps->conv;
+<a name="line829">829: </a>  <font color="#4169E1">return</font>(0);
+<a name="line830">830: </a>}
+
+<a name="line834">834: </a><font color="#B22222">/*@C</font>
+<a name="line835">835: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a> - Sets a function to decide when to stop the outer</font>
+<a name="line836">836: </a><font color="#B22222">   iteration of the eigensolver.</font>
+
+<a name="line838">838: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line840">840: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line841">841: </a><font color="#B22222">+  eps     - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line842">842: </a><font color="#B22222">.  func    - pointer to the stopping test function</font>
+<a name="line843">843: </a><font color="#B22222">.  ctx     - context for private data for the stopping routine (may be null)</font>
+<a name="line844">844: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line846">846: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line847">847: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> *reason,void *ctx)</font>
+
+<a name="line849">849: </a><font color="#B22222">+   eps    - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line850">850: </a><font color="#B22222">.   its    - current number of iterations</font>
+<a name="line851">851: </a><font color="#B22222">.   max_it - maximum number of iterations</font>
+<a name="line852">852: </a><font color="#B22222">.   nconv  - number of currently converged eigenpairs</font>
+<a name="line853">853: </a><font color="#B22222">.   nev    - number of requested eigenpairs</font>
+<a name="line854">854: </a><font color="#B22222">.   reason - (output) result of the stopping test</font>
+<a name="line855">855: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>()</font>
+
+<a name="line857">857: </a><font color="#B22222">   Note:</font>
+<a name="line858">858: </a><font color="#B22222">   Normal usage is to first call the default routine <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>() and then</font>
+<a name="line859">859: </a><font color="#B22222">   set reason to EPS_CONVERGED_USER if some user-defined conditions have been</font>
+<a name="line860">860: </a><font color="#B22222">   met. To let the eigensolver continue iterating, the result must be left as</font>
+<a name="line861">861: </a><font color="#B22222">   EPS_CONVERGED_ITERATING.</font>
+
+<a name="line863">863: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line865">865: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(), <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>()</font>
+<a name="line866">866: </a><font color="#B22222">@*/</font>
+<a name="line867">867: </a><strong><font color="#4169E1"><a name="EPSSetStoppingTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscErrorCode (*func)(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#E [...]
+<a name="line868">868: </a>{
+
+<a name="line873">873: </a>  <font color="#4169E1">if</font> (eps->stoppingdestroy) {
+<a name="line874">874: </a>    (*eps->stoppingdestroy)(eps->stoppingctx);
+<a name="line875">875: </a>  }
+<a name="line876">876: </a>  eps->stopping        = func;
+<a name="line877">877: </a>  eps->stoppingdestroy = destroy;
+<a name="line878">878: </a>  eps->stoppingctx     = ctx;
+<a name="line879">879: </a>  <font color="#4169E1">if</font> (func == <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>) eps->stop = EPS_STOP_BASIC;
+<a name="line880">880: </a>  <font color="#4169E1">else</font> eps->stop = EPS_STOP_USER;
+<a name="line881">881: </a>  <font color="#4169E1">return</font>(0);
+<a name="line882">882: </a>}
+
+<a name="line886">886: </a><font color="#B22222">/*@</font>
+<a name="line887">887: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a> - Specifies how to decide the termination of the outer</font>
+<a name="line888">888: </a><font color="#B22222">   loop of the eigensolver.</font>
+
+<a name="line890">890: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line892">892: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line893">893: </a><font color="#B22222">+  eps  - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+<a name="line894">894: </a><font color="#B22222">-  stop - the type of stopping test</font>
+
+<a name="line896">896: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line897">897: </a><font color="#B22222">+  -eps_stop_basic - Sets the default stopping test</font>
+<a name="line898">898: </a><font color="#B22222">-  -eps_stop_user  - Selects the user-defined stopping test</font>
+
+<a name="line900">900: </a><font color="#B22222">   Note:</font>
+<a name="line901">901: </a><font color="#B22222">   The parameter 'stop' can have one of these values</font>
+<a name="line902">902: </a><font color="#B22222">+     EPS_STOP_BASIC - default stopping test</font>
+<a name="line903">903: </a><font color="#B22222">-     EPS_STOP_USER  - function set by <a href="../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>()</font>
+
+<a name="line905">905: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line907">907: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetStoppingTest.html#EPSGetStoppingTest">EPSGetStoppingTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction">EPSSetStoppingTestFunction</a>(), <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a></font>
+<a name="line908">908: </a><font color="#B22222">@*/</font>
+<a name="line909">909: </a><strong><font color="#4169E1"><a name="EPSSetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a> stop)</font></strong>
+<a name="line910">910: </a>{
+<a name="line914">914: </a>  <font color="#4169E1">switch</font> (stop) {
+<a name="line915">915: </a>    <font color="#4169E1">case</font> EPS_STOP_BASIC: eps->stopping = <a href="../../../docs/manualpages/EPS/EPSStoppingBasic.html#EPSStoppingBasic">EPSStoppingBasic</a>; <font color="#4169E1">break</font>;
+<a name="line916">916: </a>    <font color="#4169E1">case</font> EPS_STOP_USER:  <font color="#4169E1">break</font>;
+<a name="line917">917: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line918">918: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'stop' value"</font>);
+<a name="line919">919: </a>  }
+<a name="line920">920: </a>  eps->stop = stop;
+<a name="line921">921: </a>  <font color="#4169E1">return</font>(0);
+<a name="line922">922: </a>}
+
+<a name="line926">926: </a><font color="#B22222">/*@</font>
+<a name="line927">927: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetStoppingTest.html#EPSGetStoppingTest">EPSGetStoppingTest</a> - Gets the method used to decide the termination of the outer</font>
+<a name="line928">928: </a><font color="#B22222">   loop of the eigensolver.</font>
+
+<a name="line930">930: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line932">932: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line933">933: </a><font color="#B22222">.  eps   - eigensolver context obtained from <a href="../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>()</font>
+
+<a name="line935">935: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line936">936: </a><font color="#B22222">.  stop  - the type of stopping test</font>
+
+<a name="line938">938: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line940">940: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetStoppingTest.html#EPSSetStoppingTest">EPSSetStoppingTest</a>(), <a href="../../../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a></font>
+<a name="line941">941: </a><font color="#B22222">@*/</font>
+<a name="line942">942: </a><strong><font color="#4169E1"><a name="EPSGetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetStoppingTest.html#EPSGetStoppingTest">EPSGetStoppingTest</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSStop.html#EPSStop">EPSStop</a> *stop)</font></strong>
+<a name="line943">943: </a>{
+<a name="line947">947: </a>  *stop = eps->stop;
+<a name="line948">948: </a>  <font color="#4169E1">return</font>(0);
+<a name="line949">949: </a>}
+
+<a name="line953">953: </a><font color="#B22222">/*@</font>
+<a name="line954">954: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a> - Specifies the type of the eigenvalue problem.</font>
+
+<a name="line956">956: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line958">958: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line959">959: </a><font color="#B22222">+  eps      - the eigensolver context</font>
+<a name="line960">960: </a><font color="#B22222">-  type     - a known type of eigenvalue problem</font>
+
+<a name="line962">962: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line963">963: </a><font color="#B22222">+  -eps_hermitian - Hermitian eigenvalue problem</font>
+<a name="line964">964: </a><font color="#B22222">.  -eps_gen_hermitian - generalized Hermitian eigenvalue problem</font>
+<a name="line965">965: </a><font color="#B22222">.  -eps_non_hermitian - non-Hermitian eigenvalue problem</font>
+<a name="line966">966: </a><font color="#B22222">.  -eps_gen_non_hermitian - generalized non-Hermitian eigenvalue problem</font>
+<a name="line967">967: </a><font color="#B22222">-  -eps_pos_gen_non_hermitian - generalized non-Hermitian eigenvalue problem</font>
+<a name="line968">968: </a><font color="#B22222">   with positive semi-definite B</font>
+
+<a name="line970">970: </a><font color="#B22222">   Notes:</font>
+<a name="line971">971: </a><font color="#B22222">   Allowed values for the problem type are: Hermitian (EPS_HEP), non-Hermitian</font>
+<a name="line972">972: </a><font color="#B22222">   (EPS_NHEP), generalized Hermitian (EPS_GHEP), generalized non-Hermitian</font>
+<a name="line973">973: </a><font color="#B22222">   (EPS_GNHEP), generalized non-Hermitian with positive semi-definite B</font>
+<a name="line974">974: </a><font color="#B22222">   (EPS_PGNHEP), and generalized Hermitian-indefinite (EPS_GHIEP).</font>
+
+<a name="line976">976: </a><font color="#B22222">   This function must be used to instruct SLEPc to exploit symmetry. If no</font>
+<a name="line977">977: </a><font color="#B22222">   problem type is specified, by default a non-Hermitian problem is assumed</font>
+<a name="line978">978: </a><font color="#B22222">   (either standard or generalized). If the user knows that the problem is</font>
+<a name="line979">979: </a><font color="#B22222">   Hermitian (i.e. A=A^H) or generalized Hermitian (i.e. A=A^H, B=B^H, and</font>
+<a name="line980">980: </a><font color="#B22222">   B positive definite) then it is recommended to set the problem type so</font>
+<a name="line981">981: </a><font color="#B22222">   that eigensolver can exploit these properties.</font>
+
+<a name="line983">983: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line985">985: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(), <a href="../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(), <a href="../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(), <a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a></font>
+<a name="line986">986: </a><font color="#B22222">@*/</font>
+<a name="line987">987: </a><strong><font color="#4169E1"><a name="EPSSetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a> type)</font></strong>
+<a name="line988">988: </a>{
+<a name="line992">992: </a>  <font color="#4169E1">if</font> (type == eps->problem_type) <font color="#4169E1">return</font>(0);
+<a name="line993">993: </a>  <font color="#4169E1">switch</font> (type) {
+<a name="line994">994: </a>    <font color="#4169E1">case</font> EPS_HEP:
+<a name="line995">995: </a>      eps->isgeneralized = PETSC_FALSE;
+<a name="line996">996: </a>      eps->ishermitian = PETSC_TRUE;
+<a name="line997">997: </a>      eps->ispositive = PETSC_FALSE;
+<a name="line998">998: </a>      <font color="#4169E1">break</font>;
+<a name="line999">999: </a>    <font color="#4169E1">case</font> EPS_NHEP:
+<a name="line1000">1000: </a>      eps->isgeneralized = PETSC_FALSE;
+<a name="line1001">1001: </a>      eps->ishermitian = PETSC_FALSE;
+<a name="line1002">1002: </a>      eps->ispositive = PETSC_FALSE;
+<a name="line1003">1003: </a>      <font color="#4169E1">break</font>;
+<a name="line1004">1004: </a>    <font color="#4169E1">case</font> EPS_GHEP:
+<a name="line1005">1005: </a>      eps->isgeneralized = PETSC_TRUE;
+<a name="line1006">1006: </a>      eps->ishermitian = PETSC_TRUE;
+<a name="line1007">1007: </a>      eps->ispositive = PETSC_TRUE;
+<a name="line1008">1008: </a>      <font color="#4169E1">break</font>;
+<a name="line1009">1009: </a>    <font color="#4169E1">case</font> EPS_GNHEP:
+<a name="line1010">1010: </a>      eps->isgeneralized = PETSC_TRUE;
+<a name="line1011">1011: </a>      eps->ishermitian = PETSC_FALSE;
+<a name="line1012">1012: </a>      eps->ispositive = PETSC_FALSE;
+<a name="line1013">1013: </a>      <font color="#4169E1">break</font>;
+<a name="line1014">1014: </a>    <font color="#4169E1">case</font> EPS_PGNHEP:
+<a name="line1015">1015: </a>      eps->isgeneralized = PETSC_TRUE;
+<a name="line1016">1016: </a>      eps->ishermitian = PETSC_FALSE;
+<a name="line1017">1017: </a>      eps->ispositive = PETSC_TRUE;
+<a name="line1018">1018: </a>      <font color="#4169E1">break</font>;
+<a name="line1019">1019: </a>    <font color="#4169E1">case</font> EPS_GHIEP:
+<a name="line1020">1020: </a>      eps->isgeneralized = PETSC_TRUE;
+<a name="line1021">1021: </a>      eps->ishermitian = PETSC_TRUE;
+<a name="line1022">1022: </a>      eps->ispositive = PETSC_FALSE;
+<a name="line1023">1023: </a>      <font color="#4169E1">break</font>;
+<a name="line1024">1024: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line1025">1025: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown eigenvalue problem type"</font>);
+<a name="line1026">1026: </a>  }
+<a name="line1027">1027: </a>  eps->problem_type = type;
+<a name="line1028">1028: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line1029">1029: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1030">1030: </a>}
+
+<a name="line1034">1034: </a><font color="#B22222">/*@</font>
+<a name="line1035">1035: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a> - Gets the problem type from the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.</font>
+
+<a name="line1037">1037: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1039">1039: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1040">1040: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1042">1042: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1043">1043: </a><font color="#B22222">.  type - name of <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> problem type</font>
+
+<a name="line1045">1045: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1047">1047: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(), <a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a></font>
+<a name="line1048">1048: </a><font color="#B22222">@*/</font>
+<a name="line1049">1049: </a><strong><font color="#4169E1"><a name="EPSGetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSProblemType.html#EPSProblemType">EPSProblemType</a> *type)</font></strong>
+<a name="line1050">1050: </a>{
+<a name="line1054">1054: </a>  *type = eps->problem_type;
+<a name="line1055">1055: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1056">1056: </a>}
+
+<a name="line1060">1060: </a><font color="#B22222">/*@</font>
+<a name="line1061">1061: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a> - Specifies the type of extraction technique to be employed</font>
+<a name="line1062">1062: </a><font color="#B22222">   by the eigensolver.</font>
+
+<a name="line1064">1064: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1066">1066: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1067">1067: </a><font color="#B22222">+  eps  - the eigensolver context</font>
+<a name="line1068">1068: </a><font color="#B22222">-  extr - a known type of extraction</font>
+
+<a name="line1070">1070: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1071">1071: </a><font color="#B22222">+  -eps_ritz - Rayleigh-Ritz extraction</font>
+<a name="line1072">1072: </a><font color="#B22222">.  -eps_harmonic - harmonic Ritz extraction</font>
+<a name="line1073">1073: </a><font color="#B22222">.  -eps_harmonic_relative - harmonic Ritz extraction relative to the eigenvalue</font>
+<a name="line1074">1074: </a><font color="#B22222">.  -eps_harmonic_right - harmonic Ritz extraction for rightmost eigenvalues</font>
+<a name="line1075">1075: </a><font color="#B22222">.  -eps_harmonic_largest - harmonic Ritz extraction for largest magnitude</font>
+<a name="line1076">1076: </a><font color="#B22222">   (without target)</font>
+<a name="line1077">1077: </a><font color="#B22222">.  -eps_refined - refined Ritz extraction</font>
+<a name="line1078">1078: </a><font color="#B22222">-  -eps_refined_harmonic - refined harmonic Ritz extraction</font>
+
+<a name="line1080">1080: </a><font color="#B22222">   Notes:</font>
+<a name="line1081">1081: </a><font color="#B22222">   Not all eigensolvers support all types of extraction. See the SLEPc</font>
+<a name="line1082">1082: </a><font color="#B22222">   Users Manual for details.</font>
+
+<a name="line1084">1084: </a><font color="#B22222">   By default, a standard Rayleigh-Ritz extraction is used. Other extractions</font>
+<a name="line1085">1085: </a><font color="#B22222">   may be useful when computing interior eigenvalues.</font>
+
+<a name="line1087">1087: </a><font color="#B22222">   Harmonic-type extractions are used in combination with a 'target'.</font>
+
+<a name="line1089">1089: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1091">1091: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(), <a href="../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(), <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a></font>
+<a name="line1092">1092: </a><font color="#B22222">@*/</font>
+<a name="line1093">1093: </a><strong><font color="#4169E1"><a name="EPSSetExtraction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a> extr)</font></strong>
+<a name="line1094">1094: </a>{
+<a name="line1098">1098: </a>  eps->extraction = extr;
+<a name="line1099">1099: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1100">1100: </a>}
+
+<a name="line1104">1104: </a><font color="#B22222">/*@</font>
+<a name="line1105">1105: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a> - Gets the extraction type used by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object.</font>
+
+<a name="line1107">1107: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1109">1109: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1110">1110: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1112">1112: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1113">1113: </a><font color="#B22222">.  extr - name of extraction type</font>
+
+<a name="line1115">1115: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1117">1117: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetExtraction.html#EPSSetExtraction">EPSSetExtraction</a>(), <a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a></font>
+<a name="line1118">1118: </a><font color="#B22222">@*/</font>
+<a name="line1119">1119: </a><strong><font color="#4169E1"><a name="EPSGetExtraction"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetExtraction.html#EPSGetExtraction">EPSGetExtraction</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSExtraction.html#EPSExtraction">EPSExtraction</a> *extr)</font></strong>
+<a name="line1120">1120: </a>{
+<a name="line1124">1124: </a>  *extr = eps->extraction;
+<a name="line1125">1125: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1126">1126: </a>}
+
+<a name="line1130">1130: </a><font color="#B22222">/*@</font>
+<a name="line1131">1131: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a> - Specifies the balancing technique to be employed by the</font>
+<a name="line1132">1132: </a><font color="#B22222">   eigensolver, and some parameters associated to it.</font>
+
+<a name="line1134">1134: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1136">1136: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1137">1137: </a><font color="#B22222">+  eps    - the eigensolver context</font>
+<a name="line1138">1138: </a><font color="#B22222">.  bal    - the balancing method, one of EPS_BALANCE_NONE, EPS_BALANCE_ONESIDE,</font>
+<a name="line1139">1139: </a><font color="#B22222">            EPS_BALANCE_TWOSIDE, or EPS_BALANCE_USER</font>
+<a name="line1140">1140: </a><font color="#B22222">.  its    - number of iterations of the balancing algorithm</font>
+<a name="line1141">1141: </a><font color="#B22222">-  cutoff - cutoff value</font>
+
+<a name="line1143">1143: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1144">1144: </a><font color="#B22222">+  -eps_balance <method> - the balancing method, where <method> is one of</font>
+<a name="line1145">1145: </a><font color="#B22222">                           'none', 'oneside', 'twoside', or 'user'</font>
+<a name="line1146">1146: </a><font color="#B22222">.  -eps_balance_its <its> - number of iterations</font>
+<a name="line1147">1147: </a><font color="#B22222">-  -eps_balance_cutoff <cutoff> - cutoff value</font>
+
+<a name="line1149">1149: </a><font color="#B22222">   Notes:</font>
+<a name="line1150">1150: </a><font color="#B22222">   When balancing is enabled, the solver works implicitly with matrix DAD^-1,</font>
+<a name="line1151">1151: </a><font color="#B22222">   where D is an appropriate diagonal matrix. This improves the accuracy of</font>
+<a name="line1152">1152: </a><font color="#B22222">   the computed results in some cases. See the SLEPc Users Manual for details.</font>
+
+<a name="line1154">1154: </a><font color="#B22222">   Balancing makes sense only for non-Hermitian problems when the required</font>
+<a name="line1155">1155: </a><font color="#B22222">   precision is high (i.e. a small tolerance such as 1e-15).</font>
+
+<a name="line1157">1157: </a><font color="#B22222">   By default, balancing is disabled. The two-sided method is much more</font>
+<a name="line1158">1158: </a><font color="#B22222">   effective than the one-sided counterpart, but it requires the system</font>
+<a name="line1159">1159: </a><font color="#B22222">   matrices to have the MatMultTranspose operation defined.</font>
+
+<a name="line1161">1161: </a><font color="#B22222">   The parameter 'its' is the number of iterations performed by the method. The</font>
+<a name="line1162">1162: </a><font color="#B22222">   cutoff value is used only in the two-side variant. Use PETSC_DEFAULT to assign</font>
+<a name="line1163">1163: </a><font color="#B22222">   a reasonably good value.</font>
+
+<a name="line1165">1165: </a><font color="#B22222">   User-defined balancing is allowed provided that the corresponding matrix</font>
+<a name="line1166">1166: </a><font color="#B22222">   is set via <a href="../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>.</font>
+
+<a name="line1168">1168: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1170">1170: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(), <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a>, <a href="../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>()</font>
+<a name="line1171">1171: </a><font color="#B22222">@*/</font>
+<a name="line1172">1172: </a><strong><font color="#4169E1"><a name="EPSSetBalance"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a> bal,PetscInt its,PetscReal cutoff)</font></strong>
+<a name="line1173">1173: </a>{
+<a name="line1179">1179: </a>  <font color="#4169E1">switch</font> (bal) {
+<a name="line1180">1180: </a>    <font color="#4169E1">case</font> EPS_BALANCE_NONE:
+<a name="line1181">1181: </a>    <font color="#4169E1">case</font> EPS_BALANCE_ONESIDE:
+<a name="line1182">1182: </a>    <font color="#4169E1">case</font> EPS_BALANCE_TWOSIDE:
+<a name="line1183">1183: </a>    <font color="#4169E1">case</font> EPS_BALANCE_USER:
+<a name="line1184">1184: </a>      eps->balance = bal;
+<a name="line1185">1185: </a>      <font color="#4169E1">break</font>;
+<a name="line1186">1186: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line1187">1187: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid value of argument 'bal'"</font>);
+<a name="line1188">1188: </a>  }
+<a name="line1189">1189: </a>  <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) eps->balance_its = 5;
+<a name="line1190">1190: </a>  <font color="#4169E1">else</font> {
+<a name="line1191">1191: </a>    <font color="#4169E1">if</font> (its <= 0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of its. Must be > 0"</font>);
+<a name="line1192">1192: </a>    eps->balance_its = its;
+<a name="line1193">1193: </a>  }
+<a name="line1194">1194: </a>  <font color="#4169E1">if</font> (cutoff==PETSC_DECIDE || cutoff==PETSC_DEFAULT) eps->balance_cutoff = 1e-8;
+<a name="line1195">1195: </a>  <font color="#4169E1">else</font> {
+<a name="line1196">1196: </a>    <font color="#4169E1">if</font> (cutoff <= 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of cutoff. Must be > 0"</font>);
+<a name="line1197">1197: </a>    eps->balance_cutoff = cutoff;
+<a name="line1198">1198: </a>  }
+<a name="line1199">1199: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1200">1200: </a>}
+
+<a name="line1204">1204: </a><font color="#B22222">/*@</font>
+<a name="line1205">1205: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a> - Gets the balancing type used by the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object, and the</font>
+<a name="line1206">1206: </a><font color="#B22222">   associated parameters.</font>
+
+<a name="line1208">1208: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1210">1210: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1211">1211: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1213">1213: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1214">1214: </a><font color="#B22222">+  bal    - the balancing method</font>
+<a name="line1215">1215: </a><font color="#B22222">.  its    - number of iterations of the balancing algorithm</font>
+<a name="line1216">1216: </a><font color="#B22222">-  cutoff - cutoff value</font>
+
+<a name="line1218">1218: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1220">1220: </a><font color="#B22222">   Note:</font>
+<a name="line1221">1221: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line1223">1223: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(), <a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a></font>
+<a name="line1224">1224: </a><font color="#B22222">@*/</font>
+<a name="line1225">1225: </a><strong><font color="#4169E1"><a name="EPSGetBalance"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSBalance.html#EPSBalance">EPSBalance</a> *bal,PetscInt *its,PetscReal *cutoff)</font></strong>
+<a name="line1226">1226: </a>{
+<a name="line1229">1229: </a>  <font color="#4169E1">if</font> (bal)    *bal = eps->balance;
+<a name="line1230">1230: </a>  <font color="#4169E1">if</font> (its)    *its = eps->balance_its;
+<a name="line1231">1231: </a>  <font color="#4169E1">if</font> (cutoff) *cutoff = eps->balance_cutoff;
+<a name="line1232">1232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1233">1233: </a>}
+
+<a name="line1237">1237: </a><font color="#B22222">/*@</font>
+<a name="line1238">1238: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a> - Specifies if the solver must compute the true residual</font>
+<a name="line1239">1239: </a><font color="#B22222">   explicitly or not.</font>
+
+<a name="line1241">1241: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1243">1243: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1244">1244: </a><font color="#B22222">+  eps     - the eigensolver context</font>
+<a name="line1245">1245: </a><font color="#B22222">-  trueres - whether true residuals are required or not</font>
+
+<a name="line1247">1247: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1248">1248: </a><font color="#B22222">.  -eps_true_residual <boolean> - Sets/resets the boolean flag 'trueres'</font>
+
+<a name="line1250">1250: </a><font color="#B22222">   Notes:</font>
+<a name="line1251">1251: </a><font color="#B22222">   If the user sets trueres=PETSC_TRUE then the solver explicitly computes</font>
+<a name="line1252">1252: </a><font color="#B22222">   the true residual for each eigenpair approximation, and uses it for</font>
+<a name="line1253">1253: </a><font color="#B22222">   convergence testing. Computing the residual is usually an expensive</font>
+<a name="line1254">1254: </a><font color="#B22222">   operation. Some solvers (e.g., Krylov solvers) can avoid this computation</font>
+<a name="line1255">1255: </a><font color="#B22222">   by using a cheap estimate of the residual norm, but this may sometimes</font>
+<a name="line1256">1256: </a><font color="#B22222">   give inaccurate results (especially if a spectral transform is being</font>
+<a name="line1257">1257: </a><font color="#B22222">   used). On the contrary, preconditioned eigensolvers (e.g., Davidson solvers)</font>
+<a name="line1258">1258: </a><font color="#B22222">   do rely on computing the true residual, so this option is irrelevant for them.</font>
+
+<a name="line1260">1260: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1262">1262: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a>()</font>
+<a name="line1263">1263: </a><font color="#B22222">@*/</font>
+<a name="line1264">1264: </a><strong><font color="#4169E1"><a name="EPSSetTrueResidual"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool trueres)</font></strong>
+<a name="line1265">1265: </a>{
+<a name="line1269">1269: </a>  eps->trueres = trueres;
+<a name="line1270">1270: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1271">1271: </a>}
+
+<a name="line1275">1275: </a><font color="#B22222">/*@</font>
+<a name="line1276">1276: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a> - Returns the flag indicating whether true</font>
+<a name="line1277">1277: </a><font color="#B22222">   residuals must be computed explicitly or not.</font>
+
+<a name="line1279">1279: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1281">1281: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1282">1282: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1284">1284: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1285">1285: </a><font color="#B22222">.  trueres - the returned flag</font>
+
+<a name="line1287">1287: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1289">1289: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTrueResidual.html#EPSSetTrueResidual">EPSSetTrueResidual</a>()</font>
+<a name="line1290">1290: </a><font color="#B22222">@*/</font>
+<a name="line1291">1291: </a><strong><font color="#4169E1"><a name="EPSGetTrueResidual"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTrueResidual.html#EPSGetTrueResidual">EPSGetTrueResidual</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *trueres)</font></strong>
+<a name="line1292">1292: </a>{
+<a name="line1296">1296: </a>  *trueres = eps->trueres;
+<a name="line1297">1297: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1298">1298: </a>}
+
+<a name="line1302">1302: </a><font color="#B22222">/*@</font>
+<a name="line1303">1303: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a> - Specifies if the solver must compute the residual norm of all</font>
+<a name="line1304">1304: </a><font color="#B22222">   approximate eigenpairs or not.</font>
+
+<a name="line1306">1306: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1308">1308: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1309">1309: </a><font color="#B22222">+  eps      - the eigensolver context</font>
+<a name="line1310">1310: </a><font color="#B22222">-  trackall - whether to compute all residuals or not</font>
+
+<a name="line1312">1312: </a><font color="#B22222">   Notes:</font>
+<a name="line1313">1313: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver computes (or estimates)</font>
+<a name="line1314">1314: </a><font color="#B22222">   the residual norm for each eigenpair approximation. Computing the residual is</font>
+<a name="line1315">1315: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute only the residual</font>
+<a name="line1316">1316: </a><font color="#B22222">   associated to the first unconverged eigenpair.</font>
 
-<a name="line1127">1127: </a><font color="#B22222">   The options '-eps_monitor_all' and '-eps_monitor_lg_all' automatically</font>
-<a name="line1128">1128: </a><font color="#B22222">   activate this option.</font>
+<a name="line1318">1318: </a><font color="#B22222">   The options '-eps_monitor_all' and '-eps_monitor_lg_all' automatically</font>
+<a name="line1319">1319: </a><font color="#B22222">   activate this option.</font>
 
-<a name="line1130">1130: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line1132">1132: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a>()</font>
-<a name="line1133">1133: </a><font color="#B22222">@*/</font>
-<a name="line1134">1134: </a><strong><font color="#4169E1"><a name="EPSSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool trackall)</font></strong>
-<a name="line1135">1135: </a>{
-<a name="line1139">1139: </a>  eps->trackall = trackall;
-<a name="line1140">1140: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1141">1141: </a>}
-
-<a name="line1145">1145: </a><font color="#B22222">/*@</font>
-<a name="line1146">1146: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
-<a name="line1147">1147: </a><font color="#B22222">   be computed or not.</font>
-
-<a name="line1149">1149: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1151">1151: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1152">1152: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line1154">1154: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1155">1155: </a><font color="#B22222">.  trackall - the returned flag</font>
-
-<a name="line1157">1157: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line1159">1159: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>()</font>
-<a name="line1160">1160: </a><font color="#B22222">@*/</font>
-<a name="line1161">1161: </a><strong><font color="#4169E1"><a name="EPSGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *trackall)</font></strong>
-<a name="line1162">1162: </a>{
-<a name="line1166">1166: </a>  *trackall = eps->trackall;
-<a name="line1167">1167: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1168">1168: </a>}
-
-<a name="line1172">1172: </a><font color="#B22222">/*@</font>
-<a name="line1173">1173: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a> - Deactivate eigenvector purification (which is activated by default).</font>
-
-<a name="line1175">1175: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1177">1177: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1178">1178: </a><font color="#B22222">+  eps    - the eigensolver context</font>
-<a name="line1179">1179: </a><font color="#B22222">-  purify - whether purification is required or not</font>
-
-<a name="line1181">1181: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1182">1182: </a><font color="#B22222">.  -eps_purify <boolean> - Sets/resets the boolean flag 'purify'</font>
-
-<a name="line1184">1184: </a><font color="#B22222">   Notes:</font>
-<a name="line1185">1185: </a><font color="#B22222">   By default, eigenvectors of generalized symmetric eigenproblems are purified</font>
-<a name="line1186">1186: </a><font color="#B22222">   in order to purge directions in the nullspace of matrix B. If the user knows</font>
-<a name="line1187">1187: </a><font color="#B22222">   that B is non-singular, then purification can be safely deactivated and some</font>
-<a name="line1188">1188: </a><font color="#B22222">   computational cost is avoided (this is particularly important in interval computations).</font>
-
-<a name="line1190">1190: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1192">1192: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a>(), <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
-<a name="line1193">1193: </a><font color="#B22222">@*/</font>
-<a name="line1194">1194: </a><strong><font color="#4169E1"><a name="EPSSetPurify"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool purify)</font></strong>
-<a name="line1195">1195: </a>{
-<a name="line1199">1199: </a>  eps->purify = purify;
-<a name="line1200">1200: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1201">1201: </a>}
-
-<a name="line1205">1205: </a><font color="#B22222">/*@</font>
-<a name="line1206">1206: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a> - Returns the flag indicating whether purification is activated</font>
-<a name="line1207">1207: </a><font color="#B22222">   or not.</font>
-
-<a name="line1209">1209: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1211">1211: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1212">1212: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line1214">1214: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1215">1215: </a><font color="#B22222">.  purify - the returned flag</font>
-
-<a name="line1217">1217: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1219">1219: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>()</font>
-<a name="line1220">1220: </a><font color="#B22222">@*/</font>
-<a name="line1221">1221: </a><strong><font color="#4169E1"><a name="EPSGetPurify"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *purify)</font></strong>
-<a name="line1222">1222: </a>{
-<a name="line1226">1226: </a>  *purify = eps->purify;
-<a name="line1227">1227: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1228">1228: </a>}
-
-<a name="line1232">1232: </a><font color="#B22222">/*@C</font>
-<a name="line1233">1233: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line1234">1234: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options in the database.</font>
-
-<a name="line1236">1236: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1238">1238: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1239">1239: </a><font color="#B22222">+  eps - the eigensolver context</font>
-<a name="line1240">1240: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> option requests</font>
-
-<a name="line1242">1242: </a><font color="#B22222">   Notes:</font>
-<a name="line1243">1243: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line1244">1244: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line1245">1245: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line1247">1247: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
-<a name="line1248">1248: </a><font color="#B22222">   different <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> contexts, one could call</font>
-<a name="line1249">1249: </a><font color="#B22222">.vb</font>
-<a name="line1250">1250: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps1,"eig1_")</font>
-<a name="line1251">1251: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps2,"eig2_")</font>
-<a name="line1252">1252: </a><font color="#B22222">.ve</font>
-
-<a name="line1254">1254: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1256">1256: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>()</font>
-<a name="line1257">1257: </a><font color="#B22222">@*/</font>
-<a name="line1258">1258: </a><strong><font color="#4169E1"><a name="EPSSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char *prefix)</font></strong>
-<a name="line1259">1259: </a>{
-
-<a name="line1264">1264: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
-<a name="line1265">1265: </a>  <a href="../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(eps->st,prefix);
-<a name="line1266">1266: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line1267">1267: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(eps->V,prefix);
-<a name="line1268">1268: </a>  <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
-<a name="line1269">1269: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(eps->ds,prefix);
-<a name="line1270">1270: </a>  <font color="#4169E1">if</font> (!eps->rg) { <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&eps->rg); }
-<a name="line1271">1271: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(eps->rg,prefix);
-<a name="line1272">1272: </a>  PetscObjectSetOptionsPrefix((PetscObject)eps,prefix);
-<a name="line1273">1273: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1274">1274: </a>}
-
-<a name="line1278">1278: </a><font color="#B22222">/*@C</font>
-<a name="line1279">1279: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line1280">1280: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options in the database.</font>
-
-<a name="line1282">1282: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line1284">1284: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1285">1285: </a><font color="#B22222">+  eps - the eigensolver context</font>
-<a name="line1286">1286: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> option requests</font>
-
-<a name="line1288">1288: </a><font color="#B22222">   Notes:</font>
-<a name="line1289">1289: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line1290">1290: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
-
-<a name="line1292">1292: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1294">1294: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>()</font>
-<a name="line1295">1295: </a><font color="#B22222">@*/</font>
-<a name="line1296">1296: </a><strong><font color="#4169E1"><a name="EPSAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char *prefix)</font></strong>
-<a name="line1297">1297: </a>{
-
-<a name="line1302">1302: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
-<a name="line1303">1303: </a>  <a href="../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(eps->st,prefix);
-<a name="line1304">1304: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line1305">1305: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(eps->V,prefix);
-<a name="line1306">1306: </a>  <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
-<a name="line1307">1307: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(eps->ds,prefix);
-<a name="line1308">1308: </a>  <font color="#4169E1">if</font> (!eps->rg) { <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&eps->rg); }
-<a name="line1309">1309: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(eps->rg,prefix);
-<a name="line1310">1310: </a>  PetscObjectAppendOptionsPrefix((PetscObject)eps,prefix);
-<a name="line1311">1311: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1312">1312: </a>}
-
-<a name="line1316">1316: </a><font color="#B22222">/*@C</font>
-<a name="line1317">1317: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line1318">1318: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options in the database.</font>
-
-<a name="line1320">1320: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1322">1322: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1323">1323: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line1325">1325: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1326">1326: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
-
-<a name="line1328">1328: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line1329">1329: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
-
-<a name="line1331">1331: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1333">1333: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>()</font>
-<a name="line1334">1334: </a><font color="#B22222">@*/</font>
-<a name="line1335">1335: </a><strong><font color="#4169E1"><a name="EPSGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char *prefix[])</font></strong>
-<a name="line1336">1336: </a>{
-
-<a name="line1342">1342: </a>  PetscObjectGetOptionsPrefix((PetscObject)eps,prefix);
-<a name="line1343">1343: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1344">1344: </a>}
+<a name="line1321">1321: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line1323">1323: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a>()</font>
+<a name="line1324">1324: </a><font color="#B22222">@*/</font>
+<a name="line1325">1325: </a><strong><font color="#4169E1"><a name="EPSSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool trackall)</font></strong>
+<a name="line1326">1326: </a>{
+<a name="line1330">1330: </a>  eps->trackall = trackall;
+<a name="line1331">1331: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1332">1332: </a>}
+
+<a name="line1336">1336: </a><font color="#B22222">/*@</font>
+<a name="line1337">1337: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
+<a name="line1338">1338: </a><font color="#B22222">   be computed or not.</font>
+
+<a name="line1340">1340: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1342">1342: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1343">1343: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1345">1345: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1346">1346: </a><font color="#B22222">.  trackall - the returned flag</font>
+
+<a name="line1348">1348: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line1350">1350: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>()</font>
+<a name="line1351">1351: </a><font color="#B22222">@*/</font>
+<a name="line1352">1352: </a><strong><font color="#4169E1"><a name="EPSGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetTrackAll.html#EPSGetTrackAll">EPSGetTrackAll</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *trackall)</font></strong>
+<a name="line1353">1353: </a>{
+<a name="line1357">1357: </a>  *trackall = eps->trackall;
+<a name="line1358">1358: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1359">1359: </a>}
+
+<a name="line1363">1363: </a><font color="#B22222">/*@</font>
+<a name="line1364">1364: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a> - Deactivate eigenvector purification (which is activated by default).</font>
+
+<a name="line1366">1366: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1368">1368: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1369">1369: </a><font color="#B22222">+  eps    - the eigensolver context</font>
+<a name="line1370">1370: </a><font color="#B22222">-  purify - whether purification is required or not</font>
+
+<a name="line1372">1372: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1373">1373: </a><font color="#B22222">.  -eps_purify <boolean> - Sets/resets the boolean flag 'purify'</font>
+
+<a name="line1375">1375: </a><font color="#B22222">   Notes:</font>
+<a name="line1376">1376: </a><font color="#B22222">   By default, eigenvectors of generalized symmetric eigenproblems are purified</font>
+<a name="line1377">1377: </a><font color="#B22222">   in order to purge directions in the nullspace of matrix B. If the user knows</font>
+<a name="line1378">1378: </a><font color="#B22222">   that B is non-singular, then purification can be safely deactivated and some</font>
+<a name="line1379">1379: </a><font color="#B22222">   computational cost is avoided (this is particularly important in interval computations).</font>
+
+<a name="line1381">1381: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1383">1383: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a>(), <a href="../../../docs/manualpages/EPS/EPSSetInterval.html#EPSSetInterval">EPSSetInterval</a>()</font>
+<a name="line1384">1384: </a><font color="#B22222">@*/</font>
+<a name="line1385">1385: </a><strong><font color="#4169E1"><a name="EPSSetPurify"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool purify)</font></strong>
+<a name="line1386">1386: </a>{
+<a name="line1390">1390: </a>  eps->purify = purify;
+<a name="line1391">1391: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1392">1392: </a>}
+
+<a name="line1396">1396: </a><font color="#B22222">/*@</font>
+<a name="line1397">1397: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a> - Returns the flag indicating whether purification is activated</font>
+<a name="line1398">1398: </a><font color="#B22222">   or not.</font>
+
+<a name="line1400">1400: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1402">1402: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1403">1403: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1405">1405: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1406">1406: </a><font color="#B22222">.  purify - the returned flag</font>
+
+<a name="line1408">1408: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1410">1410: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetPurify.html#EPSSetPurify">EPSSetPurify</a>()</font>
+<a name="line1411">1411: </a><font color="#B22222">@*/</font>
+<a name="line1412">1412: </a><strong><font color="#4169E1"><a name="EPSGetPurify"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetPurify.html#EPSGetPurify">EPSGetPurify</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscBool *purify)</font></strong>
+<a name="line1413">1413: </a>{
+<a name="line1417">1417: </a>  *purify = eps->purify;
+<a name="line1418">1418: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1419">1419: </a>}
+
+<a name="line1423">1423: </a><font color="#B22222">/*@C</font>
+<a name="line1424">1424: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line1425">1425: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options in the database.</font>
+
+<a name="line1427">1427: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1429">1429: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1430">1430: </a><font color="#B22222">+  eps - the eigensolver context</font>
+<a name="line1431">1431: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> option requests</font>
+
+<a name="line1433">1433: </a><font color="#B22222">   Notes:</font>
+<a name="line1434">1434: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line1435">1435: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line1436">1436: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line1438">1438: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
+<a name="line1439">1439: </a><font color="#B22222">   different <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> contexts, one could call</font>
+<a name="line1440">1440: </a><font color="#B22222">.vb</font>
+<a name="line1441">1441: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps1,"eig1_")</font>
+<a name="line1442">1442: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps2,"eig2_")</font>
+<a name="line1443">1443: </a><font color="#B22222">.ve</font>
+
+<a name="line1445">1445: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1447">1447: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>()</font>
+<a name="line1448">1448: </a><font color="#B22222">@*/</font>
+<a name="line1449">1449: </a><strong><font color="#4169E1"><a name="EPSSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char *prefix)</font></strong>
+<a name="line1450">1450: </a>{
+
+<a name="line1455">1455: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
+<a name="line1456">1456: </a>  <a href="../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(eps->st,prefix);
+<a name="line1457">1457: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line1458">1458: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(eps->V,prefix);
+<a name="line1459">1459: </a>  <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
+<a name="line1460">1460: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(eps->ds,prefix);
+<a name="line1461">1461: </a>  <font color="#4169E1">if</font> (!eps->rg) { <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&eps->rg); }
+<a name="line1462">1462: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(eps->rg,prefix);
+<a name="line1463">1463: </a>  PetscObjectSetOptionsPrefix((PetscObject)eps,prefix);
+<a name="line1464">1464: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1465">1465: </a>}
+
+<a name="line1469">1469: </a><font color="#B22222">/*@C</font>
+<a name="line1470">1470: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line1471">1471: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options in the database.</font>
+
+<a name="line1473">1473: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line1475">1475: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1476">1476: </a><font color="#B22222">+  eps - the eigensolver context</font>
+<a name="line1477">1477: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> option requests</font>
+
+<a name="line1479">1479: </a><font color="#B22222">   Notes:</font>
+<a name="line1480">1480: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line1481">1481: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+
+<a name="line1483">1483: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1485">1485: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>()</font>
+<a name="line1486">1486: </a><font color="#B22222">@*/</font>
+<a name="line1487">1487: </a><strong><font color="#4169E1"><a name="EPSAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char *prefix)</font></strong>
+<a name="line1488">1488: </a>{
+
+<a name="line1493">1493: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
+<a name="line1494">1494: </a>  <a href="../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(eps->st,prefix);
+<a name="line1495">1495: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line1496">1496: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(eps->V,prefix);
+<a name="line1497">1497: </a>  <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
+<a name="line1498">1498: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(eps->ds,prefix);
+<a name="line1499">1499: </a>  <font color="#4169E1">if</font> (!eps->rg) { <a href="../../../docs/manualpages/EPS/EPSGetRG.html#EPSGetRG">EPSGetRG</a>(eps,&eps->rg); }
+<a name="line1500">1500: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(eps->rg,prefix);
+<a name="line1501">1501: </a>  PetscObjectAppendOptionsPrefix((PetscObject)eps,prefix);
+<a name="line1502">1502: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1503">1503: </a>}
+
+<a name="line1507">1507: </a><font color="#B22222">/*@C</font>
+<a name="line1508">1508: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line1509">1509: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> options in the database.</font>
+
+<a name="line1511">1511: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1513">1513: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1514">1514: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line1516">1516: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1517">1517: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+
+<a name="line1519">1519: </a><font color="#B22222">   Note:</font>
+<a name="line1520">1520: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line1521">1521: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+
+<a name="line1523">1523: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1525">1525: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>()</font>
+<a name="line1526">1526: </a><font color="#B22222">@*/</font>
+<a name="line1527">1527: </a><strong><font color="#4169E1"><a name="EPSGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetOptionsPrefix.html#EPSGetOptionsPrefix">EPSGetOptionsPrefix</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,const char *prefix[])</font></strong>
+<a name="line1528">1528: </a>{
+
+<a name="line1534">1534: </a>  PetscObjectGetOptionsPrefix((PetscObject)eps,prefix);
+<a name="line1535">1535: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1536">1536: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/epsregis.c b/src/eps/interface/epsregis.c
index 2ef66c1..2f16ce1 100644
--- a/src/eps/interface/epsregis.c
+++ b/src/eps/interface/epsregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,10 +30,10 @@ PETSC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(EPS);
 PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(EPS);
 #endif
 PETSC_EXTERN PetscErrorCode EPSCreate_LAPACK(EPS);
-#if defined(SLEPC_HAVE_BLZPACK) && !defined(PETSC_USE_COMPLEX)
+#if defined(SLEPC_HAVE_BLZPACK)
 PETSC_EXTERN PetscErrorCode EPSCreate_BLZPACK(EPS);
 #endif
-#if defined(SLEPC_HAVE_TRLAN) && !defined(PETSC_USE_COMPLEX)
+#if defined(SLEPC_HAVE_TRLAN)
 PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(EPS);
 #endif
 #if defined(SLEPC_HAVE_BLOPEX)
@@ -83,10 +83,10 @@ PetscErrorCode EPSRegisterAll(void)
 #if defined(SLEPC_HAVE_ARPACK)
   ierr = EPSRegister(EPSARPACK,EPSCreate_ARPACK);CHKERRQ(ierr);
 #endif
-#if defined(SLEPC_HAVE_BLZPACK) && !defined(PETSC_USE_COMPLEX)
+#if defined(SLEPC_HAVE_BLZPACK)
   ierr = EPSRegister(EPSBLZPACK,EPSCreate_BLZPACK);CHKERRQ(ierr);
 #endif
-#if defined(SLEPC_HAVE_TRLAN) && !defined(PETSC_USE_COMPLEX)
+#if defined(SLEPC_HAVE_TRLAN)
   ierr = EPSRegister(EPSTRLAN,EPSCreate_TRLAN);CHKERRQ(ierr);
 #endif
 #if defined(SLEPC_HAVE_BLOPEX)
@@ -95,7 +95,7 @@ PetscErrorCode EPSRegisterAll(void)
 #if defined(SLEPC_HAVE_PRIMME)
   ierr = EPSRegister(EPSPRIMME,EPSCreate_PRIMME);CHKERRQ(ierr);
 #endif
-#if defined(SLEPC_HAVE_FEAST) && defined(PETSC_USE_COMPLEX)
+#if defined(SLEPC_HAVE_FEAST)
   ierr = EPSRegister(EPSFEAST,EPSCreate_FEAST);CHKERRQ(ierr);
 #endif
   PetscFunctionReturn(0);
diff --git a/src/eps/interface/epsregis.c.html b/src/eps/interface/epsregis.c.html
index 520165f..8c632f9 100644
--- a/src/eps/interface/epsregis.c.html
+++ b/src/eps/interface/epsregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epsregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:45+00:00">
+<meta name="date" content="2016-05-16T10:32:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epsregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epsregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -42,10 +42,10 @@
 <a name="line30"> 30: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCreate_ARPACK(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
 <a name="line31"> 31: </a><font color="#A020F0">#endif</font>
 <a name="line32"> 32: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCreate_LAPACK(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
-<a name="line33"> 33: </a><font color="#A020F0">#if defined(SLEPC_HAVE_BLZPACK) && !defined(PETSC_USE_COMPLEX)</font>
+<a name="line33"> 33: </a><font color="#A020F0">#if defined(SLEPC_HAVE_BLZPACK)</font>
 <a name="line34"> 34: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCreate_BLZPACK(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
 <a name="line35"> 35: </a><font color="#A020F0">#endif</font>
-<a name="line36"> 36: </a><font color="#A020F0">#if defined(SLEPC_HAVE_TRLAN) && !defined(PETSC_USE_COMPLEX)</font>
+<a name="line36"> 36: </a><font color="#A020F0">#if defined(SLEPC_HAVE_TRLAN)</font>
 <a name="line37"> 37: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode EPSCreate_TRLAN(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>)</font></strong>;
 <a name="line38"> 38: </a><font color="#A020F0">#endif</font>
 <a name="line39"> 39: </a><font color="#A020F0">#if defined(SLEPC_HAVE_BLOPEX)</font>
@@ -91,10 +91,10 @@
 <a name="line83"> 83: </a><font color="#A020F0">#if defined(SLEPC_HAVE_ARPACK)</font>
 <a name="line84"> 84: </a>  <a href="../../../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(EPSARPACK,EPSCreate_ARPACK);
 <a name="line85"> 85: </a><font color="#A020F0">#endif</font>
-<a name="line86"> 86: </a><font color="#A020F0">#if defined(SLEPC_HAVE_BLZPACK) && !defined(PETSC_USE_COMPLEX)</font>
+<a name="line86"> 86: </a><font color="#A020F0">#if defined(SLEPC_HAVE_BLZPACK)</font>
 <a name="line87"> 87: </a>  <a href="../../../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(EPSBLZPACK,EPSCreate_BLZPACK);
 <a name="line88"> 88: </a><font color="#A020F0">#endif</font>
-<a name="line89"> 89: </a><font color="#A020F0">#if defined(SLEPC_HAVE_TRLAN) && !defined(PETSC_USE_COMPLEX)</font>
+<a name="line89"> 89: </a><font color="#A020F0">#if defined(SLEPC_HAVE_TRLAN)</font>
 <a name="line90"> 90: </a>  <a href="../../../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(EPSTRLAN,EPSCreate_TRLAN);
 <a name="line91"> 91: </a><font color="#A020F0">#endif</font>
 <a name="line92"> 92: </a><font color="#A020F0">#if defined(SLEPC_HAVE_BLOPEX)</font>
@@ -103,7 +103,7 @@
 <a name="line95"> 95: </a><font color="#A020F0">#if defined(SLEPC_HAVE_PRIMME)</font>
 <a name="line96"> 96: </a>  <a href="../../../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(EPSPRIMME,EPSCreate_PRIMME);
 <a name="line97"> 97: </a><font color="#A020F0">#endif</font>
-<a name="line98"> 98: </a><font color="#A020F0">#if defined(SLEPC_HAVE_FEAST) && defined(PETSC_USE_COMPLEX)</font>
+<a name="line98"> 98: </a><font color="#A020F0">#if defined(SLEPC_HAVE_FEAST)</font>
 <a name="line99"> 99: </a>  <a href="../../../docs/manualpages/EPS/EPSRegister.html#EPSRegister">EPSRegister</a>(EPSFEAST,EPSCreate_FEAST);
 <a name="line100">100: </a><font color="#A020F0">#endif</font>
 <a name="line101">101: </a>  <font color="#4169E1">return</font>(0);
diff --git a/src/eps/interface/epssetup.c b/src/eps/interface/epssetup.c
index af3706d..b2480a8 100644
--- a/src/eps/interface/epssetup.c
+++ b/src/eps/interface/epssetup.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -79,9 +79,6 @@ PetscErrorCode EPSSetUp(EPS eps)
   if (!((PetscObject)eps->rg)->type_name) {
     ierr = RGSetType(eps->rg,RGINTERVAL);CHKERRQ(ierr);
   }
-  if (!((PetscObject)eps->rand)->type_name) {
-    ierr = PetscRandomSetFromOptions(eps->rand);CHKERRQ(ierr);
-  }
 
   /* Set problem dimensions */
   ierr = STGetNumMatrices(eps->st,&nmat);CHKERRQ(ierr);
@@ -278,7 +275,7 @@ PetscErrorCode EPSSetOperators(EPS eps,Mat A,Mat B)
     if (m0!=n) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,"B is a non-square matrix");
     if (m!=m0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_INCOMP,"Dimensions of A and B do not match");
   }
-  if (eps->state) { ierr = EPSReset(eps);CHKERRQ(ierr); }
+  if (eps->state && n!=eps->n) { ierr = EPSReset(eps);CHKERRQ(ierr); }
   eps->nrma = 0.0;
   eps->nrmb = 0.0;
   if (!eps->st) { ierr = EPSGetST(eps,&eps->st);CHKERRQ(ierr); }
@@ -288,6 +285,7 @@ PetscErrorCode EPSSetOperators(EPS eps,Mat A,Mat B)
     nmat = 2;
   } else nmat = 1;
   ierr = STSetOperators(eps->st,nmat,mat);CHKERRQ(ierr);
+  eps->state = EPS_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
diff --git a/src/eps/interface/epssetup.c.html b/src/eps/interface/epssetup.c.html
index 33c11ed..5e9a027 100644
--- a/src/eps/interface/epssetup.c.html
+++ b/src/eps/interface/epssetup.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epssetup.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:48+00:00">
+<meta name="date" content="2016-05-16T10:32:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epssetup.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epssetup.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> routines related to problem setup.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -86,405 +86,403 @@
 <a name="line79"> 79: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->rg)->type_name) {
 <a name="line80"> 80: </a>    <a href="../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(eps->rg,RGINTERVAL);
 <a name="line81"> 81: </a>  }
-<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (!((PetscObject)eps->rand)->type_name) {
-<a name="line83"> 83: </a>    PetscRandomSetFromOptions(eps->rand);
-<a name="line84"> 84: </a>  }
-
-<a name="line86"> 86: </a>  <font color="#B22222">/* Set problem dimensions */</font>
-<a name="line87"> 87: </a>  <a href="../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line88"> 88: </a>  <font color="#4169E1">if</font> (!nmat) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a> must be called first"</font>);
-<a name="line89"> 89: </a>  <a href="../../../docs/manualpages/ST/STMatGetSize.html#STMatGetSize">STMatGetSize</a>(eps->st,&eps->n,NULL);
-<a name="line90"> 90: </a>  <a href="../../../docs/manualpages/ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</a>(eps->st,&eps->nloc,NULL);
-
-<a name="line92"> 92: </a>  <font color="#B22222">/* Set default problem type */</font>
-<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (!eps->problem_type) {
-<a name="line94"> 94: </a>    <font color="#4169E1">if</font> (nmat==1) {
-<a name="line95"> 95: </a>      <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
-<a name="line96"> 96: </a>    } <font color="#4169E1">else</font> {
-<a name="line97"> 97: </a>      <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GNHEP);
-<a name="line98"> 98: </a>    }
-<a name="line99"> 99: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nmat==1 && eps->isgeneralized) {
-<a name="line100">100: </a>    PetscInfo(eps,<font color="#666666">"Eigenproblem set as generalized but no matrix B was provided; reverting to a standard eigenproblem\n"</font>);
-<a name="line101">101: </a>    eps->isgeneralized = PETSC_FALSE;
-<a name="line102">102: </a>    eps->problem_type = eps->ishermitian? EPS_HEP: EPS_NHEP;
-<a name="line103">103: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nmat>1 && !eps->isgeneralized) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Inconsistent <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> state"</font>);
-
-<a name="line105">105: </a>  <font color="#4169E1">if</font> (eps->nev > eps->n) eps->nev = eps->n;
-<a name="line106">106: </a>  <font color="#4169E1">if</font> (eps->ncv > eps->n) eps->ncv = eps->n;
-
-<a name="line108">108: </a>  <font color="#B22222">/* initialization of matrix norms */</font>
-<a name="line109">109: </a>  <font color="#4169E1">if</font> (eps->conv==EPS_CONV_NORM) {
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (!eps->nrma) {
-<a name="line111">111: </a>      <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line112">112: </a>      MatNorm(A,NORM_INFINITY,&eps->nrma);
-<a name="line113">113: </a>    }
-<a name="line114">114: </a>    <font color="#4169E1">if</font> (nmat>1 && !eps->nrmb) {
-<a name="line115">115: </a>      <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B);
-<a name="line116">116: </a>      MatNorm(B,NORM_INFINITY,&eps->nrmb);
-<a name="line117">117: </a>    }
-<a name="line118">118: </a>  }
-
-<a name="line120">120: </a>  <font color="#B22222">/* call specific solver setup */</font>
-<a name="line121">121: </a>  (*eps->ops->setup)(eps);
-
-<a name="line123">123: </a>  <font color="#B22222">/* check extraction */</font>
-<a name="line124">124: </a>  PetscObjectTypeCompareAny((PetscObject)eps->st,&flg,STPRECOND,STSHIFT,<font color="#666666">""</font>);
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (!flg && eps->extraction && eps->extraction!=EPS_RITZ) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Cannot use a spectral transformation combined with harmonic extraction"</font>);
-
-<a name="line127">127: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
-<a name="line128">128: </a>  <font color="#4169E1">if</font> (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL;
-
-<a name="line130">130: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
-<a name="line131">131: </a>  <font color="#4169E1">switch</font> (eps->which) {
-<a name="line132">132: </a>    <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
-<a name="line133">133: </a>      eps->sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line134">134: </a>      eps->sc->comparisonctx = NULL;
-<a name="line135">135: </a>      <font color="#4169E1">break</font>;
-<a name="line136">136: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
-<a name="line137">137: </a>      eps->sc->comparison    = SlepcCompareSmallestMagnitude;
-<a name="line138">138: </a>      eps->sc->comparisonctx = NULL;
-<a name="line139">139: </a>      <font color="#4169E1">break</font>;
-<a name="line140">140: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
-<a name="line141">141: </a>      eps->sc->comparison    = SlepcCompareLargestReal;
-<a name="line142">142: </a>      eps->sc->comparisonctx = NULL;
-<a name="line143">143: </a>      <font color="#4169E1">break</font>;
-<a name="line144">144: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
-<a name="line145">145: </a>      eps->sc->comparison    = SlepcCompareSmallestReal;
-<a name="line146">146: </a>      eps->sc->comparisonctx = NULL;
-<a name="line147">147: </a>      <font color="#4169E1">break</font>;
-<a name="line148">148: </a>    <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
-<a name="line149">149: </a>      eps->sc->comparison    = SlepcCompareLargestImaginary;
-<a name="line150">150: </a>      eps->sc->comparisonctx = NULL;
-<a name="line151">151: </a>      <font color="#4169E1">break</font>;
-<a name="line152">152: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
-<a name="line153">153: </a>      eps->sc->comparison    = SlepcCompareSmallestImaginary;
-<a name="line154">154: </a>      eps->sc->comparisonctx = NULL;
-<a name="line155">155: </a>      <font color="#4169E1">break</font>;
-<a name="line156">156: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line157">157: </a>      eps->sc->comparison    = SlepcCompareTargetMagnitude;
-<a name="line158">158: </a>      eps->sc->comparisonctx = &eps->target;
-<a name="line159">159: </a>      <font color="#4169E1">break</font>;
-<a name="line160">160: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line161">161: </a>      eps->sc->comparison    = SlepcCompareTargetReal;
-<a name="line162">162: </a>      eps->sc->comparisonctx = &eps->target;
-<a name="line163">163: </a>      <font color="#4169E1">break</font>;
-<a name="line164">164: </a>    <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
-<a name="line165">165: </a>      eps->sc->comparison    = SlepcCompareTargetImaginary;
-<a name="line166">166: </a>      eps->sc->comparisonctx = &eps->target;
-<a name="line167">167: </a>      <font color="#4169E1">break</font>;
-<a name="line168">168: </a>    <font color="#4169E1">case</font> EPS_ALL:
-<a name="line169">169: </a>      eps->sc->comparison    = SlepcCompareSmallestReal;
-<a name="line170">170: </a>      eps->sc->comparisonctx = NULL;
-<a name="line171">171: </a>      <font color="#4169E1">break</font>;
-<a name="line172">172: </a>    <font color="#4169E1">case</font> EPS_WHICH_USER:
-<a name="line173">173: </a>      <font color="#4169E1">break</font>;
-<a name="line174">174: </a>  }
-<a name="line175">175: </a>  eps->sc->map    = NULL;
-<a name="line176">176: </a>  eps->sc->mapobj = NULL;
-
-<a name="line178">178: </a>  <font color="#B22222">/* fill sorting criterion for <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
-<a name="line179">179: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(eps->ds,&sc);
-<a name="line180">180: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line181">181: </a>  <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
-<a name="line182">182: </a>    sc->rg            = NULL;
-<a name="line183">183: </a>    sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line184">184: </a>    sc->comparisonctx = NULL;
-<a name="line185">185: </a>    sc->map           = NULL;
-<a name="line186">186: </a>    sc->mapobj        = NULL;
-<a name="line187">187: </a>  } <font color="#4169E1">else</font> {
-<a name="line188">188: </a>    sc->rg            = istrivial? NULL: eps->rg;
-<a name="line189">189: </a>    sc->comparison    = eps->sc->comparison;
-<a name="line190">190: </a>    sc->comparisonctx = eps->sc->comparisonctx;
-<a name="line191">191: </a>    sc->map           = SlepcMap_ST;
-<a name="line192">192: </a>    sc->mapobj        = (PetscObject)eps->st;
-<a name="line193">193: </a>  }
-
-<a name="line195">195: </a>  <font color="#B22222">/* Build balancing matrix if required */</font>
-<a name="line196">196: </a>  <font color="#4169E1">if</font> (!eps->ishermitian && (eps->balance==EPS_BALANCE_ONESIDE || eps->balance==EPS_BALANCE_TWOSIDE)) {
-<a name="line197">197: </a>    <font color="#4169E1">if</font> (!eps->D) {
-<a name="line198">198: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&eps->D);
-<a name="line199">199: </a>      PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->D);
-<a name="line200">200: </a>    } <font color="#4169E1">else</font> {
-<a name="line201">201: </a>      VecSet(eps->D,1.0);
-<a name="line202">202: </a>    }
-<a name="line203">203: </a>    EPSBuildBalance_Krylov(eps);
-<a name="line204">204: </a>    <a href="../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>(eps->st,eps->D);
-<a name="line205">205: </a>  }
-
-<a name="line207">207: </a>  <font color="#B22222">/* Setup <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line208">208: </a>  <a href="../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
-
-<a name="line210">210: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line211">211: </a>  <a href="../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigma);
-<a name="line212">212: </a>  <font color="#4169E1">if</font> (eps->ishermitian && PetscImaginaryPart(sigma) != 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Hermitian problems are not compatible with complex shifts"</font>);
-<a name="line213">213: </a><font color="#A020F0">#endif</font>
-<a name="line214">214: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STCAYLEY,&flg);
-<a name="line215">215: </a>  <font color="#4169E1">if</font> (flg && eps->problem_type == EPS_PGNHEP) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Cayley spectral transformation is not compatible with PGNHEP"</font>);
-
-<a name="line217">217: </a>  <font color="#B22222">/* process deflation and initial vectors */</font>
-<a name="line218">218: </a>  <font color="#4169E1">if</font> (eps->nds<0) {
-<a name="line219">219: </a>    k = -eps->nds;
-<a name="line220">220: </a>    <a href="../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>(eps->V,&k,eps->defl);
-<a name="line221">221: </a>    SlepcBasisDestroy_Private(&eps->nds,&eps->defl);
-<a name="line222">222: </a>    eps->nds = k;
-<a name="line223">223: </a>    <a href="../../../docs/manualpages/ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</a>(eps->st,eps->V);
-<a name="line224">224: </a>  }
-<a name="line225">225: </a>  <font color="#4169E1">if</font> (eps->nini<0) {
-<a name="line226">226: </a>    k = -eps->nini;
-<a name="line227">227: </a>    <font color="#4169E1">if</font> (k>eps->ncv) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
-<a name="line228">228: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(eps->V,0,&k,eps->IS,PETSC_TRUE);
-<a name="line229">229: </a>    SlepcBasisDestroy_Private(&eps->nini,&eps->IS);
-<a name="line230">230: </a>    eps->nini = k;
-<a name="line231">231: </a>  }
-
-<a name="line233">233: </a>  PetscLogEventEnd(EPS_SetUp,eps,0,0,0);
-<a name="line234">234: </a>  eps->state = EPS_STATE_SETUP;
-<a name="line235">235: </a>  <font color="#4169E1">return</font>(0);
-<a name="line236">236: </a>}
-
-<a name="line240">240: </a><font color="#B22222">/*@</font>
-<a name="line241">241: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a> - Sets the matrices associated with the eigenvalue problem.</font>
-
-<a name="line243">243: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Mat</font>
-
-<a name="line245">245: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line246">246: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line247">247: </a><font color="#B22222">.  A  - the matrix associated with the eigensystem</font>
-<a name="line248">248: </a><font color="#B22222">-  B  - the second matrix in the case of generalized eigenproblems</font>
-
-<a name="line250">250: </a><font color="#B22222">   Notes:</font>
-<a name="line251">251: </a><font color="#B22222">   To specify a standard eigenproblem, use NULL for parameter B.</font>
-
-<a name="line253">253: </a><font color="#B22222">   It must be called before <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(). If it is called again after <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() then</font>
-<a name="line254">254: </a><font color="#B22222">   the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object is reset.</font>
-
-<a name="line256">256: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line258">258: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(), <a href="../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(), <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(), <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>()</font>
-<a name="line259">259: </a><font color="#B22222">@*/</font>
-<a name="line260">260: </a><strong><font color="#4169E1"><a name="EPSSetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat A,Mat B)</font></strong>
-<a name="line261">261: </a>{
-<a name="line263">263: </a>  PetscInt       m,n,m0,nmat;
-<a name="line264">264: </a>  Mat            mat[2];
-
-
-<a name="line273">273: </a>  <font color="#B22222">/* Check for square matrices */</font>
-<a name="line274">274: </a>  MatGetSize(A,&m,&n);
-<a name="line275">275: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"A is a non-square matrix"</font>);
-<a name="line276">276: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line277">277: </a>    MatGetSize(B,&m0,&n);
-<a name="line278">278: </a>    <font color="#4169E1">if</font> (m0!=n) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"B is a non-square matrix"</font>);
-<a name="line279">279: </a>    <font color="#4169E1">if</font> (m!=m0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Dimensions of A and B do not match"</font>);
-<a name="line280">280: </a>  }
-<a name="line281">281: </a>  <font color="#4169E1">if</font> (eps->state) { <a href="../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(eps); }
-<a name="line282">282: </a>  eps->nrma = 0.0;
-<a name="line283">283: </a>  eps->nrmb = 0.0;
-<a name="line284">284: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
-<a name="line285">285: </a>  mat[0] = A;
-<a name="line286">286: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line287">287: </a>    mat[1] = B;
-<a name="line288">288: </a>    nmat = 2;
-<a name="line289">289: </a>  } <font color="#4169E1">else</font> nmat = 1;
-<a name="line290">290: </a>  <a href="../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(eps->st,nmat,mat);
-<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
-<a name="line292">292: </a>}
-
-<a name="line296">296: </a><font color="#B22222">/*@</font>
-<a name="line297">297: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a> - Gets the matrices associated with the eigensystem.</font>
-
-<a name="line299">299: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Mat</font>
-
-<a name="line301">301: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line302">302: </a><font color="#B22222">.  eps - the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> context</font>
-
-<a name="line304">304: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line305">305: </a><font color="#B22222">+  A  - the matrix associated with the eigensystem</font>
-<a name="line306">306: </a><font color="#B22222">-  B  - the second matrix in the case of generalized eigenproblems</font>
-
-<a name="line308">308: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line310">310: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(), <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(), <a href="../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>()</font>
-<a name="line311">311: </a><font color="#B22222">@*/</font>
-<a name="line312">312: </a><strong><font color="#4169E1"><a name="EPSGetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat *A,Mat *B)</font></strong>
-<a name="line313">313: </a>{
-<a name="line315">315: </a>  <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-<a name="line316">316: </a>  PetscInt       k;
-
-<a name="line320">320: </a>  <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
-<a name="line321">321: </a>  <font color="#4169E1">if</font> (A) { <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(st,0,A); }
-<a name="line322">322: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line323">323: </a>    <a href="../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(st,&k);
-<a name="line324">324: </a>    <font color="#4169E1">if</font> (k==1) B = NULL;
-<a name="line325">325: </a>    <font color="#4169E1">else</font> {
-<a name="line326">326: </a>      <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(st,1,B);
-<a name="line327">327: </a>    }
-<a name="line328">328: </a>  }
-<a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
-<a name="line330">330: </a>}
-
-<a name="line334">334: </a><font color="#B22222">/*@</font>
-<a name="line335">335: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a> - Specify a basis of vectors that constitute the deflation</font>
-<a name="line336">336: </a><font color="#B22222">   space.</font>
-
-<a name="line338">338: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Vec</font>
-
-<a name="line340">340: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line341">341: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line342">342: </a><font color="#B22222">.  n   - number of vectors</font>
-<a name="line343">343: </a><font color="#B22222">-  v   - set of basis vectors of the deflation space</font>
-
-<a name="line345">345: </a><font color="#B22222">   Notes:</font>
-<a name="line346">346: </a><font color="#B22222">   When a deflation space is given, the eigensolver seeks the eigensolution</font>
-<a name="line347">347: </a><font color="#B22222">   in the restriction of the problem to the orthogonal complement of this</font>
-<a name="line348">348: </a><font color="#B22222">   space. This can be used for instance in the case that an invariant</font>
-<a name="line349">349: </a><font color="#B22222">   subspace is known beforehand (such as the nullspace of the matrix).</font>
-
-<a name="line351">351: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() call to the other, so the</font>
-<a name="line352">352: </a><font color="#B22222">   deflation space should be set every time.</font>
-
-<a name="line354">354: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
-<a name="line355">355: </a><font color="#B22222">   orthonormalized internally.</font>
-
-<a name="line357">357: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line359">359: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>()</font>
-<a name="line360">360: </a><font color="#B22222">@*/</font>
-<a name="line361">361: </a><strong><font color="#4169E1"><a name="EPSSetDeflationSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt n,Vec *v)</font></strong>
-<a name="line362">362: </a>{
-
-<a name="line368">368: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n out of range"</font>);
-<a name="line369">369: </a>  SlepcBasisReference_Private(n,v,&eps->nds,&eps->defl);
-<a name="line370">370: </a>  <font color="#4169E1">if</font> (n>0) eps->state = EPS_STATE_INITIAL;
-<a name="line371">371: </a>  <font color="#4169E1">return</font>(0);
-<a name="line372">372: </a>}
-
-<a name="line376">376: </a><font color="#B22222">/*@</font>
-<a name="line377">377: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
-<a name="line378">378: </a><font color="#B22222">   space, that is, the subspace from which the solver starts to iterate.</font>
-
-<a name="line380">380: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Vec</font>
-
-<a name="line382">382: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line383">383: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
-<a name="line384">384: </a><font color="#B22222">.  n   - number of vectors</font>
-<a name="line385">385: </a><font color="#B22222">-  is  - set of basis vectors of the initial space</font>
-
-<a name="line387">387: </a><font color="#B22222">   Notes:</font>
-<a name="line388">388: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
-<a name="line389">389: </a><font color="#B22222">   the other vectors are ignored.</font>
-
-<a name="line391">391: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() call to the other, so the</font>
-<a name="line392">392: </a><font color="#B22222">   initial space should be set every time.</font>
-
-<a name="line394">394: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
-<a name="line395">395: </a><font color="#B22222">   orthonormalized internally.</font>
-
-<a name="line397">397: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
-<a name="line398">398: </a><font color="#B22222">   of the wanted eigenspace. Then, convergence may be faster.</font>
-
-<a name="line400">400: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line402">402: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>()</font>
-<a name="line403">403: </a><font color="#B22222">@*/</font>
-<a name="line404">404: </a><strong><font color="#4169E1"><a name="EPSSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt n,Vec *is)</font></strong>
-<a name="line405">405: </a>{
-
-<a name="line411">411: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
-<a name="line412">412: </a>  SlepcBasisReference_Private(n,is,&eps->nini,&eps->IS);
-<a name="line413">413: </a>  <font color="#4169E1">if</font> (n>0) eps->state = EPS_STATE_INITIAL;
-<a name="line414">414: </a>  <font color="#4169E1">return</font>(0);
-<a name="line415">415: </a>}
-
-<a name="line419">419: </a><font color="#B22222">/*</font>
-<a name="line420">420: </a><font color="#B22222">  EPSSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
-<a name="line421">421: </a><font color="#B22222">  by the user. This is called at setup.</font>
-<a name="line422">422: </a><font color="#B22222"> */</font>
-<a name="line423">423: </a><strong><font color="#4169E1"><a name="EPSSetDimensions_Default"></a>PetscErrorCode EPSSetDimensions_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line424">424: </a>{
-<a name="line426">426: </a>  PetscBool      krylov;
-
-<a name="line429">429: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line430">430: </a>    PetscObjectTypeCompareAny((PetscObject)eps,&krylov,EPSKRYLOVSCHUR,EPSARNOLDI,EPSLANCZOS,<font color="#666666">""</font>);
-<a name="line431">431: </a>    <font color="#4169E1">if</font> (krylov) {
-<a name="line432">432: </a>      <font color="#4169E1">if</font> (*ncv<nev+1 && !(*ncv==nev && *ncv==eps->n)) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The value of ncv must be at least nev+1"</font>);
-<a name="line433">433: </a>    } <font color="#4169E1">else</font> {
-<a name="line434">434: </a>      <font color="#4169E1">if</font> (*ncv<nev) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line435">435: </a>    }
-<a name="line436">436: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (*mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line437">437: </a>    *ncv = PetscMin(eps->n,nev+(*mpd));
-<a name="line438">438: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
-<a name="line439">439: </a>    <font color="#4169E1">if</font> (nev<500) *ncv = PetscMin(eps->n,PetscMax(2*nev,nev+15));
-<a name="line440">440: </a>    <font color="#4169E1">else</font> {
-<a name="line441">441: </a>      *mpd = 500;
-<a name="line442">442: </a>      *ncv = PetscMin(eps->n,nev+(*mpd));
-<a name="line443">443: </a>    }
-<a name="line444">444: </a>  }
-<a name="line445">445: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
-<a name="line446">446: </a>  <font color="#4169E1">return</font>(0);
-<a name="line447">447: </a>}
-
-<a name="line451">451: </a><font color="#B22222">/*@</font>
-<a name="line452">452: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a> - Allocate memory storage for common variables such</font>
-<a name="line453">453: </a><font color="#B22222">   as eigenvalues and eigenvectors.</font>
-
-<a name="line455">455: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line457">457: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line458">458: </a><font color="#B22222">+  eps   - eigensolver context</font>
-<a name="line459">459: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
-<a name="line460">460: </a><font color="#B22222">           working basis slightly larger than ncv</font>
-
-<a name="line462">462: </a><font color="#B22222">   Developers Note:</font>
-<a name="line463">463: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-<a name="line464">464: </a><font color="#B22222">   implementations.</font>
-
-<a name="line466">466: </a><font color="#B22222">   Level: developer</font>
-<a name="line467">467: </a><font color="#B22222">@*/</font>
-<a name="line468">468: </a><strong><font color="#4169E1"><a name="EPSAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt extra)</font></strong>
-<a name="line469">469: </a>{
-<a name="line471">471: </a>  PetscInt       oldsize,newc,requested;
-<a name="line472">472: </a>  PetscLogDouble cnt;
-<a name="line473">473: </a>  Vec            t;
-
-<a name="line476">476: </a>  requested = eps->ncv + extra;
-
-<a name="line478">478: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
-<a name="line479">479: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(eps->V,NULL,NULL,&oldsize);
-<a name="line480">480: </a>  newc = PetscMax(0,requested-oldsize);
-
-<a name="line482">482: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
-<a name="line483">483: </a>  <font color="#4169E1">if</font> (requested != oldsize || !eps->eigr) {
-<a name="line484">484: </a>    <font color="#4169E1">if</font> (oldsize) {
-<a name="line485">485: </a>      PetscFree4(eps->eigr,eps->eigi,eps->errest,eps->perm);
-<a name="line486">486: </a>    }
-<a name="line487">487: </a>    PetscMalloc4(requested,&eps->eigr,requested,&eps->eigi,requested,&eps->errest,requested,&eps->perm);
-<a name="line488">488: </a>    cnt = 2*newc*<font color="#4169E1">sizeof</font>(PetscScalar) + 2*newc*<font color="#4169E1">sizeof</font>(PetscReal) + newc*<font color="#4169E1">sizeof</font>(PetscInt);
-<a name="line489">489: </a>    PetscLogObjectMemory((PetscObject)eps,cnt);
-<a name="line490">490: </a>  }
-
-<a name="line492">492: </a>  <font color="#B22222">/* workspace for the case of arbitrary selection */</font>
-<a name="line493">493: </a>  <font color="#4169E1">if</font> (eps->arbitrary) {
-<a name="line494">494: </a>    <font color="#4169E1">if</font> (eps->rr) {
-<a name="line495">495: </a>      PetscFree2(eps->rr,eps->ri);
-<a name="line496">496: </a>    }
-<a name="line497">497: </a>    PetscMalloc2(requested,&eps->rr,requested,&eps->ri);
-<a name="line498">498: </a>    PetscLogObjectMemory((PetscObject)eps,2*newc*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line499">499: </a>  }
-
-<a name="line501">501: </a>  <font color="#B22222">/* allocate V */</font>
-<a name="line502">502: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line503">503: </a>  <font color="#4169E1">if</font> (!oldsize) {
-<a name="line504">504: </a>    <font color="#4169E1">if</font> (!((PetscObject)(eps->V))->type_name) {
-<a name="line505">505: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(eps->V,BVSVEC);
-<a name="line506">506: </a>    }
-<a name="line507">507: </a>    <a href="../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(eps->st,&t,NULL);
-<a name="line508">508: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(eps->V,t,requested);
-<a name="line509">509: </a>    VecDestroy(&t);
-<a name="line510">510: </a>  } <font color="#4169E1">else</font> {
-<a name="line511">511: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(eps->V,requested,PETSC_FALSE);
-<a name="line512">512: </a>  }
-<a name="line513">513: </a>  <font color="#4169E1">return</font>(0);
-<a name="line514">514: </a>}
+
+<a name="line83"> 83: </a>  <font color="#B22222">/* Set problem dimensions */</font>
+<a name="line84"> 84: </a>  <a href="../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (!nmat) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a> must be called first"</font>);
+<a name="line86"> 86: </a>  <a href="../../../docs/manualpages/ST/STMatGetSize.html#STMatGetSize">STMatGetSize</a>(eps->st,&eps->n,NULL);
+<a name="line87"> 87: </a>  <a href="../../../docs/manualpages/ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</a>(eps->st,&eps->nloc,NULL);
+
+<a name="line89"> 89: </a>  <font color="#B22222">/* Set default problem type */</font>
+<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (!eps->problem_type) {
+<a name="line91"> 91: </a>    <font color="#4169E1">if</font> (nmat==1) {
+<a name="line92"> 92: </a>      <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_NHEP);
+<a name="line93"> 93: </a>    } <font color="#4169E1">else</font> {
+<a name="line94"> 94: </a>      <a href="../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(eps,EPS_GNHEP);
+<a name="line95"> 95: </a>    }
+<a name="line96"> 96: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nmat==1 && eps->isgeneralized) {
+<a name="line97"> 97: </a>    PetscInfo(eps,<font color="#666666">"Eigenproblem set as generalized but no matrix B was provided; reverting to a standard eigenproblem\n"</font>);
+<a name="line98"> 98: </a>    eps->isgeneralized = PETSC_FALSE;
+<a name="line99"> 99: </a>    eps->problem_type = eps->ishermitian? EPS_HEP: EPS_NHEP;
+<a name="line100">100: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nmat>1 && !eps->isgeneralized) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Inconsistent <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> state"</font>);
+
+<a name="line102">102: </a>  <font color="#4169E1">if</font> (eps->nev > eps->n) eps->nev = eps->n;
+<a name="line103">103: </a>  <font color="#4169E1">if</font> (eps->ncv > eps->n) eps->ncv = eps->n;
+
+<a name="line105">105: </a>  <font color="#B22222">/* initialization of matrix norms */</font>
+<a name="line106">106: </a>  <font color="#4169E1">if</font> (eps->conv==EPS_CONV_NORM) {
+<a name="line107">107: </a>    <font color="#4169E1">if</font> (!eps->nrma) {
+<a name="line108">108: </a>      <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line109">109: </a>      MatNorm(A,NORM_INFINITY,&eps->nrma);
+<a name="line110">110: </a>    }
+<a name="line111">111: </a>    <font color="#4169E1">if</font> (nmat>1 && !eps->nrmb) {
+<a name="line112">112: </a>      <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B);
+<a name="line113">113: </a>      MatNorm(B,NORM_INFINITY,&eps->nrmb);
+<a name="line114">114: </a>    }
+<a name="line115">115: </a>  }
+
+<a name="line117">117: </a>  <font color="#B22222">/* call specific solver setup */</font>
+<a name="line118">118: </a>  (*eps->ops->setup)(eps);
+
+<a name="line120">120: </a>  <font color="#B22222">/* check extraction */</font>
+<a name="line121">121: </a>  PetscObjectTypeCompareAny((PetscObject)eps->st,&flg,STPRECOND,STSHIFT,<font color="#666666">""</font>);
+<a name="line122">122: </a>  <font color="#4169E1">if</font> (!flg && eps->extraction && eps->extraction!=EPS_RITZ) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Cannot use a spectral transformation combined with harmonic extraction"</font>);
+
+<a name="line124">124: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
+<a name="line125">125: </a>  <font color="#4169E1">if</font> (eps->tol==PETSC_DEFAULT) eps->tol = SLEPC_DEFAULT_TOL;
+
+<a name="line127">127: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
+<a name="line128">128: </a>  <font color="#4169E1">switch</font> (eps->which) {
+<a name="line129">129: </a>    <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
+<a name="line130">130: </a>      eps->sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line131">131: </a>      eps->sc->comparisonctx = NULL;
+<a name="line132">132: </a>      <font color="#4169E1">break</font>;
+<a name="line133">133: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
+<a name="line134">134: </a>      eps->sc->comparison    = SlepcCompareSmallestMagnitude;
+<a name="line135">135: </a>      eps->sc->comparisonctx = NULL;
+<a name="line136">136: </a>      <font color="#4169E1">break</font>;
+<a name="line137">137: </a>    <font color="#4169E1">case</font> EPS_LARGEST_REAL:
+<a name="line138">138: </a>      eps->sc->comparison    = SlepcCompareLargestReal;
+<a name="line139">139: </a>      eps->sc->comparisonctx = NULL;
+<a name="line140">140: </a>      <font color="#4169E1">break</font>;
+<a name="line141">141: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
+<a name="line142">142: </a>      eps->sc->comparison    = SlepcCompareSmallestReal;
+<a name="line143">143: </a>      eps->sc->comparisonctx = NULL;
+<a name="line144">144: </a>      <font color="#4169E1">break</font>;
+<a name="line145">145: </a>    <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
+<a name="line146">146: </a>      eps->sc->comparison    = SlepcCompareLargestImaginary;
+<a name="line147">147: </a>      eps->sc->comparisonctx = NULL;
+<a name="line148">148: </a>      <font color="#4169E1">break</font>;
+<a name="line149">149: </a>    <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
+<a name="line150">150: </a>      eps->sc->comparison    = SlepcCompareSmallestImaginary;
+<a name="line151">151: </a>      eps->sc->comparisonctx = NULL;
+<a name="line152">152: </a>      <font color="#4169E1">break</font>;
+<a name="line153">153: </a>    <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line154">154: </a>      eps->sc->comparison    = SlepcCompareTargetMagnitude;
+<a name="line155">155: </a>      eps->sc->comparisonctx = &eps->target;
+<a name="line156">156: </a>      <font color="#4169E1">break</font>;
+<a name="line157">157: </a>    <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line158">158: </a>      eps->sc->comparison    = SlepcCompareTargetReal;
+<a name="line159">159: </a>      eps->sc->comparisonctx = &eps->target;
+<a name="line160">160: </a>      <font color="#4169E1">break</font>;
+<a name="line161">161: </a>    <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
+<a name="line162">162: </a>      eps->sc->comparison    = SlepcCompareTargetImaginary;
+<a name="line163">163: </a>      eps->sc->comparisonctx = &eps->target;
+<a name="line164">164: </a>      <font color="#4169E1">break</font>;
+<a name="line165">165: </a>    <font color="#4169E1">case</font> EPS_ALL:
+<a name="line166">166: </a>      eps->sc->comparison    = SlepcCompareSmallestReal;
+<a name="line167">167: </a>      eps->sc->comparisonctx = NULL;
+<a name="line168">168: </a>      <font color="#4169E1">break</font>;
+<a name="line169">169: </a>    <font color="#4169E1">case</font> EPS_WHICH_USER:
+<a name="line170">170: </a>      <font color="#4169E1">break</font>;
+<a name="line171">171: </a>  }
+<a name="line172">172: </a>  eps->sc->map    = NULL;
+<a name="line173">173: </a>  eps->sc->mapobj = NULL;
+
+<a name="line175">175: </a>  <font color="#B22222">/* fill sorting criterion for <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
+<a name="line176">176: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(eps->ds,&sc);
+<a name="line177">177: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line178">178: </a>  <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
+<a name="line179">179: </a>    sc->rg            = NULL;
+<a name="line180">180: </a>    sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line181">181: </a>    sc->comparisonctx = NULL;
+<a name="line182">182: </a>    sc->map           = NULL;
+<a name="line183">183: </a>    sc->mapobj        = NULL;
+<a name="line184">184: </a>  } <font color="#4169E1">else</font> {
+<a name="line185">185: </a>    sc->rg            = istrivial? NULL: eps->rg;
+<a name="line186">186: </a>    sc->comparison    = eps->sc->comparison;
+<a name="line187">187: </a>    sc->comparisonctx = eps->sc->comparisonctx;
+<a name="line188">188: </a>    sc->map           = SlepcMap_ST;
+<a name="line189">189: </a>    sc->mapobj        = (PetscObject)eps->st;
+<a name="line190">190: </a>  }
+
+<a name="line192">192: </a>  <font color="#B22222">/* Build balancing matrix if required */</font>
+<a name="line193">193: </a>  <font color="#4169E1">if</font> (!eps->ishermitian && (eps->balance==EPS_BALANCE_ONESIDE || eps->balance==EPS_BALANCE_TWOSIDE)) {
+<a name="line194">194: </a>    <font color="#4169E1">if</font> (!eps->D) {
+<a name="line195">195: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&eps->D);
+<a name="line196">196: </a>      PetscLogObjectParent((PetscObject)eps,(PetscObject)eps->D);
+<a name="line197">197: </a>    } <font color="#4169E1">else</font> {
+<a name="line198">198: </a>      VecSet(eps->D,1.0);
+<a name="line199">199: </a>    }
+<a name="line200">200: </a>    EPSBuildBalance_Krylov(eps);
+<a name="line201">201: </a>    <a href="../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>(eps->st,eps->D);
+<a name="line202">202: </a>  }
+
+<a name="line204">204: </a>  <font color="#B22222">/* Setup <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line205">205: </a>  <a href="../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(eps->st);
+
+<a name="line207">207: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line208">208: </a>  <a href="../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(eps->st,&sigma);
+<a name="line209">209: </a>  <font color="#4169E1">if</font> (eps->ishermitian && PetscImaginaryPart(sigma) != 0.0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Hermitian problems are not compatible with complex shifts"</font>);
+<a name="line210">210: </a><font color="#A020F0">#endif</font>
+<a name="line211">211: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STCAYLEY,&flg);
+<a name="line212">212: </a>  <font color="#4169E1">if</font> (flg && eps->problem_type == EPS_PGNHEP) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_SUP,<font color="#666666">"Cayley spectral transformation is not compatible with PGNHEP"</font>);
+
+<a name="line214">214: </a>  <font color="#B22222">/* process deflation and initial vectors */</font>
+<a name="line215">215: </a>  <font color="#4169E1">if</font> (eps->nds<0) {
+<a name="line216">216: </a>    k = -eps->nds;
+<a name="line217">217: </a>    <a href="../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>(eps->V,&k,eps->defl);
+<a name="line218">218: </a>    SlepcBasisDestroy_Private(&eps->nds,&eps->defl);
+<a name="line219">219: </a>    eps->nds = k;
+<a name="line220">220: </a>    <a href="../../../docs/manualpages/ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</a>(eps->st,eps->V);
+<a name="line221">221: </a>  }
+<a name="line222">222: </a>  <font color="#4169E1">if</font> (eps->nini<0) {
+<a name="line223">223: </a>    k = -eps->nini;
+<a name="line224">224: </a>    <font color="#4169E1">if</font> (k>eps->ncv) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
+<a name="line225">225: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(eps->V,0,&k,eps->IS,PETSC_TRUE);
+<a name="line226">226: </a>    SlepcBasisDestroy_Private(&eps->nini,&eps->IS);
+<a name="line227">227: </a>    eps->nini = k;
+<a name="line228">228: </a>  }
+
+<a name="line230">230: </a>  PetscLogEventEnd(EPS_SetUp,eps,0,0,0);
+<a name="line231">231: </a>  eps->state = EPS_STATE_SETUP;
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a>}
+
+<a name="line237">237: </a><font color="#B22222">/*@</font>
+<a name="line238">238: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a> - Sets the matrices associated with the eigenvalue problem.</font>
+
+<a name="line240">240: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Mat</font>
+
+<a name="line242">242: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line243">243: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line244">244: </a><font color="#B22222">.  A  - the matrix associated with the eigensystem</font>
+<a name="line245">245: </a><font color="#B22222">-  B  - the second matrix in the case of generalized eigenproblems</font>
+
+<a name="line247">247: </a><font color="#B22222">   Notes:</font>
+<a name="line248">248: </a><font color="#B22222">   To specify a standard eigenproblem, use NULL for parameter B.</font>
+
+<a name="line250">250: </a><font color="#B22222">   It must be called before <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(). If it is called again after <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>() then</font>
+<a name="line251">251: </a><font color="#B22222">   the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> object is reset.</font>
+
+<a name="line253">253: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line255">255: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(), <a href="../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(), <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(), <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>()</font>
+<a name="line256">256: </a><font color="#B22222">@*/</font>
+<a name="line257">257: </a><strong><font color="#4169E1"><a name="EPSSetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat A,Mat B)</font></strong>
+<a name="line258">258: </a>{
+<a name="line260">260: </a>  PetscInt       m,n,m0,nmat;
+<a name="line261">261: </a>  Mat            mat[2];
+
+
+<a name="line270">270: </a>  <font color="#B22222">/* Check for square matrices */</font>
+<a name="line271">271: </a>  MatGetSize(A,&m,&n);
+<a name="line272">272: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"A is a non-square matrix"</font>);
+<a name="line273">273: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line274">274: </a>    MatGetSize(B,&m0,&n);
+<a name="line275">275: </a>    <font color="#4169E1">if</font> (m0!=n) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"B is a non-square matrix"</font>);
+<a name="line276">276: </a>    <font color="#4169E1">if</font> (m!=m0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Dimensions of A and B do not match"</font>);
+<a name="line277">277: </a>  }
+<a name="line278">278: </a>  <font color="#4169E1">if</font> (eps->state && n!=eps->n) { <a href="../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(eps); }
+<a name="line279">279: </a>  eps->nrma = 0.0;
+<a name="line280">280: </a>  eps->nrmb = 0.0;
+<a name="line281">281: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
+<a name="line282">282: </a>  mat[0] = A;
+<a name="line283">283: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line284">284: </a>    mat[1] = B;
+<a name="line285">285: </a>    nmat = 2;
+<a name="line286">286: </a>  } <font color="#4169E1">else</font> nmat = 1;
+<a name="line287">287: </a>  <a href="../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(eps->st,nmat,mat);
+<a name="line288">288: </a>  eps->state = EPS_STATE_INITIAL;
+<a name="line289">289: </a>  <font color="#4169E1">return</font>(0);
+<a name="line290">290: </a>}
+
+<a name="line294">294: </a><font color="#B22222">/*@</font>
+<a name="line295">295: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a> - Gets the matrices associated with the eigensystem.</font>
+
+<a name="line297">297: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Mat</font>
+
+<a name="line299">299: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line300">300: </a><font color="#B22222">.  eps - the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> context</font>
+
+<a name="line302">302: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line303">303: </a><font color="#B22222">+  A  - the matrix associated with the eigensystem</font>
+<a name="line304">304: </a><font color="#B22222">-  B  - the second matrix in the case of generalized eigenproblems</font>
+
+<a name="line306">306: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line308">308: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(), <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(), <a href="../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>()</font>
+<a name="line309">309: </a><font color="#B22222">@*/</font>
+<a name="line310">310: </a><strong><font color="#4169E1"><a name="EPSGetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Mat *A,Mat *B)</font></strong>
+<a name="line311">311: </a>{
+<a name="line313">313: </a>  <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+<a name="line314">314: </a>  PetscInt       k;
+
+<a name="line318">318: </a>  <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
+<a name="line319">319: </a>  <font color="#4169E1">if</font> (A) { <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(st,0,A); }
+<a name="line320">320: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line321">321: </a>    <a href="../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(st,&k);
+<a name="line322">322: </a>    <font color="#4169E1">if</font> (k==1) B = NULL;
+<a name="line323">323: </a>    <font color="#4169E1">else</font> {
+<a name="line324">324: </a>      <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(st,1,B);
+<a name="line325">325: </a>    }
+<a name="line326">326: </a>  }
+<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
+<a name="line328">328: </a>}
+
+<a name="line332">332: </a><font color="#B22222">/*@</font>
+<a name="line333">333: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a> - Specify a basis of vectors that constitute the deflation</font>
+<a name="line334">334: </a><font color="#B22222">   space.</font>
+
+<a name="line336">336: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Vec</font>
+
+<a name="line338">338: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line339">339: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line340">340: </a><font color="#B22222">.  n   - number of vectors</font>
+<a name="line341">341: </a><font color="#B22222">-  v   - set of basis vectors of the deflation space</font>
+
+<a name="line343">343: </a><font color="#B22222">   Notes:</font>
+<a name="line344">344: </a><font color="#B22222">   When a deflation space is given, the eigensolver seeks the eigensolution</font>
+<a name="line345">345: </a><font color="#B22222">   in the restriction of the problem to the orthogonal complement of this</font>
+<a name="line346">346: </a><font color="#B22222">   space. This can be used for instance in the case that an invariant</font>
+<a name="line347">347: </a><font color="#B22222">   subspace is known beforehand (such as the nullspace of the matrix).</font>
+
+<a name="line349">349: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() call to the other, so the</font>
+<a name="line350">350: </a><font color="#B22222">   deflation space should be set every time.</font>
+
+<a name="line352">352: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
+<a name="line353">353: </a><font color="#B22222">   orthonormalized internally.</font>
+
+<a name="line355">355: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line357">357: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>()</font>
+<a name="line358">358: </a><font color="#B22222">@*/</font>
+<a name="line359">359: </a><strong><font color="#4169E1"><a name="EPSSetDeflationSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt n,Vec *v)</font></strong>
+<a name="line360">360: </a>{
+
+<a name="line366">366: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n out of range"</font>);
+<a name="line367">367: </a>  SlepcBasisReference_Private(n,v,&eps->nds,&eps->defl);
+<a name="line368">368: </a>  <font color="#4169E1">if</font> (n>0) eps->state = EPS_STATE_INITIAL;
+<a name="line369">369: </a>  <font color="#4169E1">return</font>(0);
+<a name="line370">370: </a>}
+
+<a name="line374">374: </a><font color="#B22222">/*@</font>
+<a name="line375">375: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
+<a name="line376">376: </a><font color="#B22222">   space, that is, the subspace from which the solver starts to iterate.</font>
+
+<a name="line378">378: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Vec</font>
+
+<a name="line380">380: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line381">381: </a><font color="#B22222">+  eps - the eigenproblem solver context</font>
+<a name="line382">382: </a><font color="#B22222">.  n   - number of vectors</font>
+<a name="line383">383: </a><font color="#B22222">-  is  - set of basis vectors of the initial space</font>
+
+<a name="line385">385: </a><font color="#B22222">   Notes:</font>
+<a name="line386">386: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
+<a name="line387">387: </a><font color="#B22222">   the other vectors are ignored.</font>
+
+<a name="line389">389: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() call to the other, so the</font>
+<a name="line390">390: </a><font color="#B22222">   initial space should be set every time.</font>
+
+<a name="line392">392: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
+<a name="line393">393: </a><font color="#B22222">   orthonormalized internally.</font>
+
+<a name="line395">395: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
+<a name="line396">396: </a><font color="#B22222">   of the wanted eigenspace. Then, convergence may be faster.</font>
+
+<a name="line398">398: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line400">400: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>()</font>
+<a name="line401">401: </a><font color="#B22222">@*/</font>
+<a name="line402">402: </a><strong><font color="#4169E1"><a name="EPSSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt n,Vec *is)</font></strong>
+<a name="line403">403: </a>{
+
+<a name="line409">409: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
+<a name="line410">410: </a>  SlepcBasisReference_Private(n,is,&eps->nini,&eps->IS);
+<a name="line411">411: </a>  <font color="#4169E1">if</font> (n>0) eps->state = EPS_STATE_INITIAL;
+<a name="line412">412: </a>  <font color="#4169E1">return</font>(0);
+<a name="line413">413: </a>}
+
+<a name="line417">417: </a><font color="#B22222">/*</font>
+<a name="line418">418: </a><font color="#B22222">  EPSSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
+<a name="line419">419: </a><font color="#B22222">  by the user. This is called at setup.</font>
+<a name="line420">420: </a><font color="#B22222"> */</font>
+<a name="line421">421: </a><strong><font color="#4169E1"><a name="EPSSetDimensions_Default"></a>PetscErrorCode EPSSetDimensions_Default(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line422">422: </a>{
+<a name="line424">424: </a>  PetscBool      krylov;
+
+<a name="line427">427: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
+<a name="line428">428: </a>    PetscObjectTypeCompareAny((PetscObject)eps,&krylov,EPSKRYLOVSCHUR,EPSARNOLDI,EPSLANCZOS,<font color="#666666">""</font>);
+<a name="line429">429: </a>    <font color="#4169E1">if</font> (krylov) {
+<a name="line430">430: </a>      <font color="#4169E1">if</font> (*ncv<nev+1 && !(*ncv==nev && *ncv==eps->n)) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The value of ncv must be at least nev+1"</font>);
+<a name="line431">431: </a>    } <font color="#4169E1">else</font> {
+<a name="line432">432: </a>      <font color="#4169E1">if</font> (*ncv<nev) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
+<a name="line433">433: </a>    }
+<a name="line434">434: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (*mpd) { <font color="#B22222">/* mpd set */</font>
+<a name="line435">435: </a>    *ncv = PetscMin(eps->n,nev+(*mpd));
+<a name="line436">436: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
+<a name="line437">437: </a>    <font color="#4169E1">if</font> (nev<500) *ncv = PetscMin(eps->n,PetscMax(2*nev,nev+15));
+<a name="line438">438: </a>    <font color="#4169E1">else</font> {
+<a name="line439">439: </a>      *mpd = 500;
+<a name="line440">440: </a>      *ncv = PetscMin(eps->n,nev+(*mpd));
+<a name="line441">441: </a>    }
+<a name="line442">442: </a>  }
+<a name="line443">443: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
+<a name="line444">444: </a>  <font color="#4169E1">return</font>(0);
+<a name="line445">445: </a>}
+
+<a name="line449">449: </a><font color="#B22222">/*@</font>
+<a name="line450">450: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a> - Allocate memory storage for common variables such</font>
+<a name="line451">451: </a><font color="#B22222">   as eigenvalues and eigenvectors.</font>
+
+<a name="line453">453: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line455">455: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line456">456: </a><font color="#B22222">+  eps   - eigensolver context</font>
+<a name="line457">457: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
+<a name="line458">458: </a><font color="#B22222">           working basis slightly larger than ncv</font>
+
+<a name="line460">460: </a><font color="#B22222">   Developers Note:</font>
+<a name="line461">461: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+<a name="line462">462: </a><font color="#B22222">   implementations.</font>
+
+<a name="line464">464: </a><font color="#B22222">   Level: developer</font>
+<a name="line465">465: </a><font color="#B22222">@*/</font>
+<a name="line466">466: </a><strong><font color="#4169E1"><a name="EPSAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSAllocateSolution.html#EPSAllocateSolution">EPSAllocateSolution</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt extra)</font></strong>
+<a name="line467">467: </a>{
+<a name="line469">469: </a>  PetscInt       oldsize,newc,requested;
+<a name="line470">470: </a>  PetscLogDouble cnt;
+<a name="line471">471: </a>  Vec            t;
+
+<a name="line474">474: </a>  requested = eps->ncv + extra;
+
+<a name="line476">476: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
+<a name="line477">477: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(eps->V,NULL,NULL,&oldsize);
+<a name="line478">478: </a>  newc = PetscMax(0,requested-oldsize);
+
+<a name="line480">480: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
+<a name="line481">481: </a>  <font color="#4169E1">if</font> (requested != oldsize || !eps->eigr) {
+<a name="line482">482: </a>    <font color="#4169E1">if</font> (oldsize) {
+<a name="line483">483: </a>      PetscFree4(eps->eigr,eps->eigi,eps->errest,eps->perm);
+<a name="line484">484: </a>    }
+<a name="line485">485: </a>    PetscMalloc4(requested,&eps->eigr,requested,&eps->eigi,requested,&eps->errest,requested,&eps->perm);
+<a name="line486">486: </a>    cnt = 2*newc*<font color="#4169E1">sizeof</font>(PetscScalar) + 2*newc*<font color="#4169E1">sizeof</font>(PetscReal) + newc*<font color="#4169E1">sizeof</font>(PetscInt);
+<a name="line487">487: </a>    PetscLogObjectMemory((PetscObject)eps,cnt);
+<a name="line488">488: </a>  }
+
+<a name="line490">490: </a>  <font color="#B22222">/* workspace for the case of arbitrary selection */</font>
+<a name="line491">491: </a>  <font color="#4169E1">if</font> (eps->arbitrary) {
+<a name="line492">492: </a>    <font color="#4169E1">if</font> (eps->rr) {
+<a name="line493">493: </a>      PetscFree2(eps->rr,eps->ri);
+<a name="line494">494: </a>    }
+<a name="line495">495: </a>    PetscMalloc2(requested,&eps->rr,requested,&eps->ri);
+<a name="line496">496: </a>    PetscLogObjectMemory((PetscObject)eps,2*newc*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line497">497: </a>  }
+
+<a name="line499">499: </a>  <font color="#B22222">/* allocate V */</font>
+<a name="line500">500: </a>  <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line501">501: </a>  <font color="#4169E1">if</font> (!oldsize) {
+<a name="line502">502: </a>    <font color="#4169E1">if</font> (!((PetscObject)(eps->V))->type_name) {
+<a name="line503">503: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(eps->V,BVSVEC);
+<a name="line504">504: </a>    }
+<a name="line505">505: </a>    <a href="../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(eps->st,&t,NULL);
+<a name="line506">506: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(eps->V,t,requested);
+<a name="line507">507: </a>    VecDestroy(&t);
+<a name="line508">508: </a>  } <font color="#4169E1">else</font> {
+<a name="line509">509: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(eps->V,requested,PETSC_FALSE);
+<a name="line510">510: </a>  }
+<a name="line511">511: </a>  <font color="#4169E1">return</font>(0);
+<a name="line512">512: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/epssolve.c b/src/eps/interface/epssolve.c
index e33dae8..78a7dfc 100644
--- a/src/eps/interface/epssolve.c
+++ b/src/eps/interface/epssolve.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -82,6 +82,7 @@ PetscErrorCode EPSSolve(EPS eps)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
+  if (eps->state>=EPS_STATE_SOLVED) PetscFunctionReturn(0);
   ierr = PetscLogEventBegin(EPS_Solve,eps,0,0,0);CHKERRQ(ierr);
 
   /* call setup */
@@ -94,7 +95,6 @@ PetscErrorCode EPSSolve(EPS eps)
     eps->errest[i] = 0.0;
     eps->perm[i]   = i;
   }
-  ierr = EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,eps->ncv);CHKERRQ(ierr);
   ierr = EPSViewFromOptions(eps,NULL,"-eps_view_pre");CHKERRQ(ierr);
 
   /* call solver */
@@ -138,7 +138,7 @@ PetscErrorCode EPSSolve(EPS eps)
 
   /* In the case of Cayley transform, eigenvectors need to be B-normalized */
   ierr = PetscObjectTypeCompare((PetscObject)eps->st,STCAYLEY,&iscayley);CHKERRQ(ierr);
-  if (iscayley && eps->isgeneralized && eps->ishermitian) {
+  if (iscayley && nmat>1 && eps->ishermitian) {
     ierr = MatCreateVecs(B,NULL,&w);CHKERRQ(ierr);
     ierr = EPSComputeVectors(eps);CHKERRQ(ierr);
     for (i=0;i<eps->nconv;i++) {
@@ -254,7 +254,8 @@ PetscErrorCode EPSGetConverged(EPS eps,PetscInt *nconv)
 
    Possible values for reason:
 +  EPS_CONVERGED_TOL - converged up to tolerance
-.  EPS_DIVERGED_ITS - required more than its to reach convergence
+.  EPS_CONVERGED_USER - converged due to a user-defined condition
+.  EPS_DIVERGED_ITS - required more than max_it iterations to reach convergence
 .  EPS_DIVERGED_BREAKDOWN - generic breakdown in method
 -  EPS_DIVERGED_SYMMETRY_LOST - pseudo-Lanczos was not able to keep symmetry
 
@@ -571,7 +572,7 @@ PetscErrorCode EPSComputeResidualNorm_Private(EPS eps,PetscScalar kr,PetscScalar
 #endif
     ierr = MatMult(A,xr,u);CHKERRQ(ierr);                             /* u=A*x */
     if (PetscAbsScalar(kr) > PETSC_MACHINE_EPSILON) {
-      if (eps->isgeneralized) { ierr = MatMult(B,xr,w);CHKERRQ(ierr); }
+      if (nmat>1) { ierr = MatMult(B,xr,w);CHKERRQ(ierr); }
       else { ierr = VecCopy(xr,w);CHKERRQ(ierr); }                    /* w=B*x */
       ierr = VecAXPY(u,-kr,w);CHKERRQ(ierr);                          /* u=A*x-k*B*x */
     }
@@ -580,10 +581,10 @@ PetscErrorCode EPSComputeResidualNorm_Private(EPS eps,PetscScalar kr,PetscScalar
   } else {
     ierr = MatMult(A,xr,u);CHKERRQ(ierr);                             /* u=A*xr */
     if (SlepcAbsEigenvalue(kr,ki) > PETSC_MACHINE_EPSILON) {
-      if (eps->isgeneralized) { ierr = MatMult(B,xr,v);CHKERRQ(ierr); }
+      if (nmat>1) { ierr = MatMult(B,xr,v);CHKERRQ(ierr); }
       else { ierr = VecCopy(xr,v);CHKERRQ(ierr); }                    /* v=B*xr */
       ierr = VecAXPY(u,-kr,v);CHKERRQ(ierr);                          /* u=A*xr-kr*B*xr */
-      if (eps->isgeneralized) { ierr = MatMult(B,xi,w);CHKERRQ(ierr); }
+      if (nmat>1) { ierr = MatMult(B,xi,w);CHKERRQ(ierr); }
       else { ierr = VecCopy(xi,w);CHKERRQ(ierr); }                    /* w=B*xi */
       ierr = VecAXPY(u,ki,w);CHKERRQ(ierr);                           /* u=A*xr-kr*B*xr+ki*B*xi */
     }
@@ -729,7 +730,7 @@ PetscErrorCode EPSGetStartVector(EPS eps,PetscInt i,PetscBool *breakdown)
 
   /* For the first step, use the first initial vector, otherwise a random one */
   if (i>0 || eps->nini==0) {
-    ierr = BVSetRandomColumn(eps->V,i,eps->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(eps->V,i);CHKERRQ(ierr);
   }
   ierr = BVCreateVec(eps->V,&w);CHKERRQ(ierr);
   ierr = BVCopyVec(eps->V,i,w);CHKERRQ(ierr);
diff --git a/src/eps/interface/epssolve.c.html b/src/eps/interface/epssolve.c.html
index eea01b4..a9a9663 100644
--- a/src/eps/interface/epssolve.c.html
+++ b/src/eps/interface/epssolve.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epssolve.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:49+00:00">
+<meta name="date" content="2016-05-16T10:32:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epssolve.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epssolve.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> routines related to the solution process.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -85,19 +85,19 @@
 <a name="line80"> 80: </a>  Mat            A,B;
 <a name="line81"> 81: </a>  Vec            w,x;
 
-<a name="line85"> 85: </a>  PetscLogEventBegin(EPS_Solve,eps,0,0,0);
-
-<a name="line87"> 87: </a>  <font color="#B22222">/* call setup */</font>
-<a name="line88"> 88: </a>  <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(eps);
-<a name="line89"> 89: </a>  eps->nconv = 0;
-<a name="line90"> 90: </a>  eps->its   = 0;
-<a name="line91"> 91: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) {
-<a name="line92"> 92: </a>    eps->eigr[i]   = 0.0;
-<a name="line93"> 93: </a>    eps->eigi[i]   = 0.0;
-<a name="line94"> 94: </a>    eps->errest[i] = 0.0;
-<a name="line95"> 95: </a>    eps->perm[i]   = i;
-<a name="line96"> 96: </a>  }
-<a name="line97"> 97: </a>  EPSMonitor(eps,eps->its,eps->nconv,eps->eigr,eps->eigi,eps->errest,eps->ncv);
+<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (eps->state>=EPS_STATE_SOLVED) <font color="#4169E1">return</font>(0);
+<a name="line86"> 86: </a>  PetscLogEventBegin(EPS_Solve,eps,0,0,0);
+
+<a name="line88"> 88: </a>  <font color="#B22222">/* call setup */</font>
+<a name="line89"> 89: </a>  <a href="../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(eps);
+<a name="line90"> 90: </a>  eps->nconv = 0;
+<a name="line91"> 91: </a>  eps->its   = 0;
+<a name="line92"> 92: </a>  <font color="#4169E1">for</font> (i=0;i<eps->ncv;i++) {
+<a name="line93"> 93: </a>    eps->eigr[i]   = 0.0;
+<a name="line94"> 94: </a>    eps->eigi[i]   = 0.0;
+<a name="line95"> 95: </a>    eps->errest[i] = 0.0;
+<a name="line96"> 96: </a>    eps->perm[i]   = i;
+<a name="line97"> 97: </a>  }
 <a name="line98"> 98: </a>  EPSViewFromOptions(eps,NULL,<font color="#666666">"-eps_view_pre"</font>);
 
 <a name="line100">100: </a>  <font color="#B22222">/* call solver */</font>
@@ -141,7 +141,7 @@
 
 <a name="line139">139: </a>  <font color="#B22222">/* In the case of Cayley transform, eigenvectors need to be B-normalized */</font>
 <a name="line140">140: </a>  PetscObjectTypeCompare((PetscObject)eps->st,STCAYLEY,&iscayley);
-<a name="line141">141: </a>  <font color="#4169E1">if</font> (iscayley && eps->isgeneralized && eps->ishermitian) {
+<a name="line141">141: </a>  <font color="#4169E1">if</font> (iscayley && nmat>1 && eps->ishermitian) {
 <a name="line142">142: </a>    MatCreateVecs(B,NULL,&w);
 <a name="line143">143: </a>    EPSComputeVectors(eps);
 <a name="line144">144: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
@@ -245,454 +245,455 @@
 
 <a name="line255">255: </a><font color="#B22222">   Possible values for reason:</font>
 <a name="line256">256: </a><font color="#B22222">+  EPS_CONVERGED_TOL - converged up to tolerance</font>
-<a name="line257">257: </a><font color="#B22222">.  EPS_DIVERGED_ITS - required more than its to reach convergence</font>
-<a name="line258">258: </a><font color="#B22222">.  EPS_DIVERGED_BREAKDOWN - generic breakdown in method</font>
-<a name="line259">259: </a><font color="#B22222">-  EPS_DIVERGED_SYMMETRY_LOST - pseudo-Lanczos was not able to keep symmetry</font>
-
-<a name="line261">261: </a><font color="#B22222">   Note:</font>
-<a name="line262">262: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() is complete.</font>
-
-<a name="line264">264: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line266">266: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(), <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a></font>
-<a name="line267">267: </a><font color="#B22222">@*/</font>
-<a name="line268">268: </a><strong><font color="#4169E1"><a name="EPSGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> *reason)</font></strong>
-<a name="line269">269: </a>{
-<a name="line273">273: </a>  EPSCheckSolved(eps,1);
-<a name="line274">274: </a>  *reason = eps->reason;
-<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
-<a name="line276">276: </a>}
-
-<a name="line280">280: </a><font color="#B22222">/*@</font>
-<a name="line281">281: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a> - Gets an orthonormal basis of the computed invariant</font>
-<a name="line282">282: </a><font color="#B22222">   subspace.</font>
-
-<a name="line284">284: </a><font color="#B22222">   Not Collective, but vectors are shared by all processors that share the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line286">286: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line287">287: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line289">289: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line290">290: </a><font color="#B22222">.  v - an array of vectors</font>
-
-<a name="line292">292: </a><font color="#B22222">   Notes:</font>
-<a name="line293">293: </a><font color="#B22222">   This function should be called after <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() has finished.</font>
-
-<a name="line295">295: </a><font color="#B22222">   The user should provide in v an array of nconv vectors, where nconv is</font>
-<a name="line296">296: </a><font color="#B22222">   the value returned by <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>().</font>
-
-<a name="line298">298: </a><font color="#B22222">   The first k vectors returned in v span an invariant subspace associated</font>
-<a name="line299">299: </a><font color="#B22222">   with the first k computed eigenvalues (note that this is not true if the</font>
-<a name="line300">300: </a><font color="#B22222">   k-th eigenvalue is complex and matrix A is real; in this case the first</font>
-<a name="line301">301: </a><font color="#B22222">   k+1 vectors should be used). An invariant subspace X of A satisfies Ax</font>
-<a name="line302">302: </a><font color="#B22222">   in X for all x in X (a similar definition applies for generalized</font>
-<a name="line303">303: </a><font color="#B22222">   eigenproblems).</font>
-
-<a name="line305">305: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line307">307: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(), <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>()</font>
-<a name="line308">308: </a><font color="#B22222">@*/</font>
-<a name="line309">309: </a><strong><font color="#4169E1"><a name="EPSGetInvariantSubspace"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Vec *v)</font></strong>
-<a name="line310">310: </a>{
-<a name="line312">312: </a>  PetscInt       i;
-
-<a name="line318">318: </a>  EPSCheckSolved(eps,1);
-<a name="line319">319: </a>  <font color="#4169E1">if</font> (!eps->ishermitian && eps->state==EPS_STATE_EIGENVECTORS) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a> must be called before <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>,<a href="../../../docs/manual [...]
-<a name="line320">320: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line321">321: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,i,v[i]);
-<a name="line322">322: </a>    <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE && eps->D) {
-<a name="line323">323: </a>      VecPointwiseDivide(v[i],v[i],eps->D);
-<a name="line324">324: </a>      VecNormalize(v[i],NULL);
-<a name="line325">325: </a>    }
-<a name="line326">326: </a>  }
-<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
-<a name="line328">328: </a>}
-
-<a name="line332">332: </a><font color="#B22222">/*@</font>
-<a name="line333">333: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a> - Gets the i-th solution of the eigenproblem as computed by</font>
-<a name="line334">334: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(). The solution consists in both the eigenvalue and the eigenvector.</font>
-
-<a name="line336">336: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line338">338: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line339">339: </a><font color="#B22222">+  eps - eigensolver context</font>
-<a name="line340">340: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line342">342: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line343">343: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
-<a name="line344">344: </a><font color="#B22222">.  eigi - imaginary part of eigenvalue</font>
-<a name="line345">345: </a><font color="#B22222">.  Vr   - real part of eigenvector</font>
-<a name="line346">346: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
-
-<a name="line348">348: </a><font color="#B22222">   Notes:</font>
-<a name="line349">349: </a><font color="#B22222">   It is allowed to pass NULL for Vr and Vi, if the eigenvector is not</font>
-<a name="line350">350: </a><font color="#B22222">   required. Otherwise, the caller must provide valid Vec objects, i.e.,</font>
-<a name="line351">351: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
-
-<a name="line353">353: </a><font color="#B22222">   If the eigenvalue is real, then eigi and Vi are set to zero. If PETSc is</font>
-<a name="line354">354: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
-<a name="line355">355: </a><font color="#B22222">   directly in eigr (eigi is set to zero) and the eigenvector in Vr (Vi is</font>
-<a name="line356">356: </a><font color="#B22222">   set to zero). In both cases, the user can pass NULL in eigi and Vi.</font>
-
-<a name="line358">358: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>()).</font>
-<a name="line359">359: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
-<a name="line360">360: </a><font color="#B22222">   with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
-
-<a name="line362">362: </a><font color="#B22222">   The 2-norm of the eigenvector is one unless the problem is generalized</font>
-<a name="line363">363: </a><font color="#B22222">   Hermitian. In this case the eigenvector is normalized with respect to the</font>
-<a name="line364">364: </a><font color="#B22222">   norm defined by the B matrix.</font>
-
-<a name="line366">366: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line368">368: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(), <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(), <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(),</font>
-<a name="line369">369: </a><font color="#B22222">          <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a>()</font>
-<a name="line370">370: </a><font color="#B22222">@*/</font>
-<a name="line371">371: </a><strong><font color="#4169E1"><a name="EPSGetEigenpair"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)</font></strong>
-<a name="line372">372: </a>{
-
-<a name="line378">378: </a>  EPSCheckSolved(eps,1);
-<a name="line379">379: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line380">380: </a>  <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(eps,i,eigr,eigi);
-<a name="line381">381: </a>  <font color="#4169E1">if</font> (Vr || Vi) { <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(eps,i,Vr,Vi); }
-<a name="line382">382: </a>  <font color="#4169E1">return</font>(0);
-<a name="line383">383: </a>}
-
-<a name="line387">387: </a><font color="#B22222">/*@</font>
-<a name="line388">388: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a> - Gets the i-th eigenvalue as computed by <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>().</font>
-
-<a name="line390">390: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line392">392: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line393">393: </a><font color="#B22222">+  eps - eigensolver context</font>
-<a name="line394">394: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line396">396: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line397">397: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
-<a name="line398">398: </a><font color="#B22222">-  eigi - imaginary part of eigenvalue</font>
-
-<a name="line400">400: </a><font color="#B22222">   Notes:</font>
-<a name="line401">401: </a><font color="#B22222">   If the eigenvalue is real, then eigi is set to zero. If PETSc is</font>
-<a name="line402">402: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
-<a name="line403">403: </a><font color="#B22222">   directly in eigr (eigi is set to zero).</font>
-
-<a name="line405">405: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>()).</font>
-<a name="line406">406: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
-<a name="line407">407: </a><font color="#B22222">   with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
-
-<a name="line409">409: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line411">411: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>()</font>
-<a name="line412">412: </a><font color="#B22222">@*/</font>
-<a name="line413">413: </a><strong><font color="#4169E1"><a name="EPSGetEigenvalue"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi)</font></strong>
-<a name="line414">414: </a>{
-<a name="line415">415: </a>  PetscInt k;
-
-<a name="line419">419: </a>  EPSCheckSolved(eps,1);
-<a name="line420">420: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line421">421: </a>  k = eps->perm[i];
-<a name="line422">422: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line423">423: </a>  <font color="#4169E1">if</font> (eigr) *eigr = eps->eigr[k];
-<a name="line424">424: </a>  <font color="#4169E1">if</font> (eigi) *eigi = 0;
-<a name="line425">425: </a><font color="#A020F0">#else</font>
-<a name="line426">426: </a>  <font color="#4169E1">if</font> (eigr) *eigr = eps->eigr[k];
-<a name="line427">427: </a>  <font color="#4169E1">if</font> (eigi) *eigi = eps->eigi[k];
-<a name="line428">428: </a><font color="#A020F0">#endif</font>
-<a name="line429">429: </a>  <font color="#4169E1">return</font>(0);
-<a name="line430">430: </a>}
-
-<a name="line434">434: </a><font color="#B22222">/*@</font>
-<a name="line435">435: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a> - Gets the i-th right eigenvector as computed by <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>().</font>
-
-<a name="line437">437: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line439">439: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line440">440: </a><font color="#B22222">+  eps - eigensolver context</font>
-<a name="line441">441: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line443">443: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line444">444: </a><font color="#B22222">+  Vr   - real part of eigenvector</font>
-<a name="line445">445: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
-
-<a name="line447">447: </a><font color="#B22222">   Notes:</font>
-<a name="line448">448: </a><font color="#B22222">   The caller must provide valid Vec objects, i.e., they must be created</font>
-<a name="line449">449: </a><font color="#B22222">   by the calling program with e.g. MatCreateVecs().</font>
-
-<a name="line451">451: </a><font color="#B22222">   If the corresponding eigenvalue is real, then Vi is set to zero. If PETSc is</font>
-<a name="line452">452: </a><font color="#B22222">   configured with complex scalars the eigenvector is stored</font>
-<a name="line453">453: </a><font color="#B22222">   directly in Vr (Vi is set to zero). In both cases, the user can pass NULL in Vi.</font>
-
-<a name="line455">455: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>()).</font>
-<a name="line456">456: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
-<a name="line457">457: </a><font color="#B22222">   with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
-
-<a name="line459">459: </a><font color="#B22222">   The 2-norm of the eigenvector is one unless the problem is generalized</font>
-<a name="line460">460: </a><font color="#B22222">   Hermitian. In this case the eigenvector is normalized with respect to the</font>
-<a name="line461">461: </a><font color="#B22222">   norm defined by the B matrix.</font>
-
-<a name="line463">463: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line465">465: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>()</font>
-<a name="line466">466: </a><font color="#B22222">@*/</font>
-<a name="line467">467: </a><strong><font color="#4169E1"><a name="EPSGetEigenvector"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,Vec Vr,Vec Vi)</font></strong>
-<a name="line468">468: </a>{
-<a name="line470">470: </a>  PetscInt       k;
-
-<a name="line478">478: </a>  EPSCheckSolved(eps,1);
-<a name="line479">479: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line480">480: </a>  EPSComputeVectors(eps);
-<a name="line481">481: </a>  k = eps->perm[i];
-<a name="line482">482: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line483">483: </a>  <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vr);
-<a name="line484">484: </a>  <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
-<a name="line485">485: </a><font color="#A020F0">#else</font>
-<a name="line486">486: </a>  <font color="#4169E1">if</font> (eps->eigi[k] > 0) { <font color="#B22222">/* first value of conjugate pair */</font>
-<a name="line487">487: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vr);
-<a name="line488">488: </a>    <font color="#4169E1">if</font> (Vi) {
-<a name="line489">489: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k+1,Vi);
-<a name="line490">490: </a>    }
-<a name="line491">491: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->eigi[k] < 0) { <font color="#B22222">/* second value of conjugate pair */</font>
-<a name="line492">492: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k-1,Vr);
-<a name="line493">493: </a>    <font color="#4169E1">if</font> (Vi) {
-<a name="line494">494: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vi);
-<a name="line495">495: </a>      VecScale(Vi,-1.0);
-<a name="line496">496: </a>    }
-<a name="line497">497: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* real eigenvalue */</font>
-<a name="line498">498: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vr);
-<a name="line499">499: </a>    <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
-<a name="line500">500: </a>  }
-<a name="line501">501: </a><font color="#A020F0">#endif</font>
-<a name="line502">502: </a>  <font color="#4169E1">return</font>(0);
-<a name="line503">503: </a>}
-
-<a name="line507">507: </a><font color="#B22222">/*@</font>
-<a name="line508">508: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a> - Returns the error estimate associated to the i-th</font>
-<a name="line509">509: </a><font color="#B22222">   computed eigenpair.</font>
-
-<a name="line511">511: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line513">513: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line514">514: </a><font color="#B22222">+  eps - eigensolver context</font>
-<a name="line515">515: </a><font color="#B22222">-  i   - index of eigenpair</font>
-
-<a name="line517">517: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line518">518: </a><font color="#B22222">.  errest - the error estimate</font>
-
-<a name="line520">520: </a><font color="#B22222">   Notes:</font>
-<a name="line521">521: </a><font color="#B22222">   This is the error estimate used internally by the eigensolver. The actual</font>
-<a name="line522">522: </a><font color="#B22222">   error bound can be computed with <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(). See also the users</font>
-<a name="line523">523: </a><font color="#B22222">   manual for details.</font>
-
-<a name="line525">525: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line527">527: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>()</font>
-<a name="line528">528: </a><font color="#B22222">@*/</font>
-<a name="line529">529: </a><strong><font color="#4169E1"><a name="EPSGetErrorEstimate"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscReal *errest)</font></strong>
-<a name="line530">530: </a>{
-<a name="line534">534: </a>  EPSCheckSolved(eps,1);
-<a name="line535">535: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line536">536: </a>  <font color="#4169E1">if</font> (errest) *errest = eps->errest[eps->perm[i]];
-<a name="line537">537: </a>  <font color="#4169E1">return</font>(0);
-<a name="line538">538: </a>}
-
-<a name="line542">542: </a><font color="#B22222">/*</font>
-<a name="line543">543: </a><font color="#B22222">   EPSComputeResidualNorm_Private - Computes the norm of the residual vector</font>
-<a name="line544">544: </a><font color="#B22222">   associated with an eigenpair.</font>
-
-<a name="line546">546: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line547">547: </a><font color="#B22222">     kr,ki - eigenvalue</font>
-<a name="line548">548: </a><font color="#B22222">     xr,xi - eigenvector</font>
-<a name="line549">549: </a><font color="#B22222">     z     - three work vectors (the second one not referenced in complex scalars)</font>
-<a name="line550">550: </a><font color="#B22222">*/</font>
-<a name="line551">551: </a><strong><font color="#4169E1"><a name="EPSComputeResidualNorm_Private"></a>PetscErrorCode EPSComputeResidualNorm_Private(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)</font></strong>
-<a name="line552">552: </a>{
-<a name="line554">554: </a>  PetscInt       nmat;
-<a name="line555">555: </a>  Mat            A,B;
-<a name="line556">556: </a>  Vec            u,w;
-<a name="line557">557: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line558">558: </a>  Vec            v;
-<a name="line559">559: </a>  PetscReal      ni,nr;
-<a name="line560">560: </a><font color="#A020F0">#endif</font>
-
-<a name="line563">563: </a>  u = z[0]; w = z[2];
-<a name="line564">564: </a>  <a href="../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
-<a name="line565">565: </a>  <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line566">566: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
-
-<a name="line568">568: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line569">569: </a>  v = z[1]; 
-<a name="line570">570: </a>  <font color="#4169E1">if</font> (ki == 0 || PetscAbsScalar(ki) < PetscAbsScalar(kr*PETSC_MACHINE_EPSILON)) {
-<a name="line571">571: </a><font color="#A020F0">#endif</font>
-<a name="line572">572: </a>    MatMult(A,xr,u);                             <font color="#B22222">/* u=A*x */</font>
-<a name="line573">573: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(kr) > PETSC_MACHINE_EPSILON) {
-<a name="line574">574: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) { MatMult(B,xr,w); }
-<a name="line575">575: </a>      <font color="#4169E1">else</font> { VecCopy(xr,w); }                    <font color="#B22222">/* w=B*x */</font>
-<a name="line576">576: </a>      VecAXPY(u,-kr,w);                          <font color="#B22222">/* u=A*x-k*B*x */</font>
-<a name="line577">577: </a>    }
-<a name="line578">578: </a>    VecNorm(u,NORM_2,norm);
-<a name="line579">579: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line580">580: </a>  } <font color="#4169E1">else</font> {
-<a name="line581">581: </a>    MatMult(A,xr,u);                             <font color="#B22222">/* u=A*xr */</font>
-<a name="line582">582: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(kr,ki) > PETSC_MACHINE_EPSILON) {
-<a name="line583">583: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) { MatMult(B,xr,v); }
-<a name="line584">584: </a>      <font color="#4169E1">else</font> { VecCopy(xr,v); }                    <font color="#B22222">/* v=B*xr */</font>
-<a name="line585">585: </a>      VecAXPY(u,-kr,v);                          <font color="#B22222">/* u=A*xr-kr*B*xr */</font>
-<a name="line586">586: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) { MatMult(B,xi,w); }
-<a name="line587">587: </a>      <font color="#4169E1">else</font> { VecCopy(xi,w); }                    <font color="#B22222">/* w=B*xi */</font>
-<a name="line588">588: </a>      VecAXPY(u,ki,w);                           <font color="#B22222">/* u=A*xr-kr*B*xr+ki*B*xi */</font>
-<a name="line589">589: </a>    }
-<a name="line590">590: </a>    VecNorm(u,NORM_2,&nr);
-<a name="line591">591: </a>    MatMult(A,xi,u);                             <font color="#B22222">/* u=A*xi */</font>
-<a name="line592">592: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(kr,ki) > PETSC_MACHINE_EPSILON) {
-<a name="line593">593: </a>      VecAXPY(u,-kr,w);                          <font color="#B22222">/* u=A*xi-kr*B*xi */</font>
-<a name="line594">594: </a>      VecAXPY(u,-ki,v);                          <font color="#B22222">/* u=A*xi-kr*B*xi-ki*B*xr */</font>
-<a name="line595">595: </a>    }
-<a name="line596">596: </a>    VecNorm(u,NORM_2,&ni);
-<a name="line597">597: </a>    *norm = SlepcAbsEigenvalue(nr,ni);
-<a name="line598">598: </a>  }
-<a name="line599">599: </a><font color="#A020F0">#endif</font>
-<a name="line600">600: </a>  <font color="#4169E1">return</font>(0);
-<a name="line601">601: </a>}
-
-<a name="line605">605: </a><font color="#B22222">/*@</font>
-<a name="line606">606: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a> - Computes the error (based on the residual norm) associated</font>
-<a name="line607">607: </a><font color="#B22222">   with the i-th computed eigenpair.</font>
-
-<a name="line609">609: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line611">611: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line612">612: </a><font color="#B22222">+  eps  - the eigensolver context</font>
-<a name="line613">613: </a><font color="#B22222">.  i    - the solution index</font>
-<a name="line614">614: </a><font color="#B22222">-  type - the type of error to compute</font>
-
-<a name="line616">616: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line617">617: </a><font color="#B22222">.  error - the error</font>
-
-<a name="line619">619: </a><font color="#B22222">   Notes:</font>
-<a name="line620">620: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
-<a name="line621">621: </a><font color="#B22222">   norm ||Ax-kBx||_2 where k is the eigenvalue and x is the eigenvector.</font>
-
-<a name="line623">623: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line625">625: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a>, <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a>()</font>
-<a name="line626">626: </a><font color="#B22222">@*/</font>
-<a name="line627">627: </a><strong><font color="#4169E1"><a name="EPSComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> type,PetscReal *error)</font></strong>
-<a name="line628">628: </a>{
-<a name="line630">630: </a>  Mat            A,B;
-<a name="line631">631: </a>  Vec            xr,xi,w[3];
-<a name="line632">632: </a>  PetscReal      t;
-<a name="line633">633: </a>  PetscScalar    kr,ki;
-<a name="line634">634: </a>  PetscBool      flg;
-
-<a name="line641">641: </a>  EPSCheckSolved(eps,1);
-
-<a name="line643">643: </a>  <font color="#B22222">/* allocate work vectors */</font>
-<a name="line644">644: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line645">645: </a>  <a href="../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,3);
-<a name="line646">646: </a>  xi   = NULL;
-<a name="line647">647: </a>  w[1] = NULL;
-<a name="line648">648: </a><font color="#A020F0">#else</font>
-<a name="line649">649: </a>  <a href="../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,5);
-<a name="line650">650: </a>  xi   = eps->work[3];
-<a name="line651">651: </a>  w[1] = eps->work[4];
-<a name="line652">652: </a><font color="#A020F0">#endif</font>
-<a name="line653">653: </a>  xr   = eps->work[0];
-<a name="line654">654: </a>  w[0] = eps->work[1];
-<a name="line655">655: </a>  w[2] = eps->work[2];
-
-<a name="line657">657: </a>  <font color="#B22222">/* compute residual norms */</font>
-<a name="line658">658: </a>  <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,&kr,&ki,xr,xi);
-<a name="line659">659: </a>  EPSComputeResidualNorm_Private(eps,kr,ki,xr,xi,w,error);
-
-<a name="line661">661: </a>  <font color="#B22222">/* compute error */</font>
-<a name="line662">662: </a>  <font color="#4169E1">switch</font> (type) {
-<a name="line663">663: </a>    <font color="#4169E1">case</font> EPS_ERROR_ABSOLUTE:
-<a name="line664">664: </a>      <font color="#4169E1">break</font>;
-<a name="line665">665: </a>    <font color="#4169E1">case</font> EPS_ERROR_RELATIVE:
-<a name="line666">666: </a>      *error /= SlepcAbsEigenvalue(kr,ki);
-<a name="line667">667: </a>      <font color="#4169E1">break</font>;
-<a name="line668">668: </a>    <font color="#4169E1">case</font> EPS_ERROR_BACKWARD:
-<a name="line669">669: </a>      <font color="#B22222">/* initialization of matrix norms */</font>
-<a name="line670">670: </a>      <font color="#4169E1">if</font> (!eps->nrma) {
-<a name="line671">671: </a>        <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
-<a name="line672">672: </a>        MatHasOperation(A,MATOP_NORM,&flg);
-<a name="line673">673: </a>        <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
-<a name="line674">674: </a>        MatNorm(A,NORM_INFINITY,&eps->nrma);
-<a name="line675">675: </a>      }
-<a name="line676">676: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) {
-<a name="line677">677: </a>        <font color="#4169E1">if</font> (!eps->nrmb) {
-<a name="line678">678: </a>          <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B);
-<a name="line679">679: </a>          MatHasOperation(B,MATOP_NORM,&flg);
-<a name="line680">680: </a>          <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
-<a name="line681">681: </a>          MatNorm(B,NORM_INFINITY,&eps->nrmb);
-<a name="line682">682: </a>        }
-<a name="line683">683: </a>      } <font color="#4169E1">else</font> eps->nrmb = 1.0;
-<a name="line684">684: </a>      t = SlepcAbsEigenvalue(kr,ki);
-<a name="line685">685: </a>      *error /= eps->nrma+t*eps->nrmb;
-<a name="line686">686: </a>      <font color="#4169E1">break</font>;
-<a name="line687">687: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line688">688: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
-<a name="line689">689: </a>  }
-<a name="line690">690: </a>  <font color="#4169E1">return</font>(0);
-<a name="line691">691: </a>}
-
-<a name="line695">695: </a><font color="#B22222">/*</font>
-<a name="line696">696: </a><font color="#B22222">   EPSGetStartVector - Generate a suitable vector to be used as the starting vector</font>
-<a name="line697">697: </a><font color="#B22222">   for the recurrence that builds the right subspace.</font>
-
-<a name="line699">699: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Vec</font>
-
-<a name="line701">701: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line702">702: </a><font color="#B22222">+  eps - the eigensolver context</font>
-<a name="line703">703: </a><font color="#B22222">-  i   - iteration number</font>
-
-<a name="line705">705: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line706">706: </a><font color="#B22222">.  breakdown - flag indicating that a breakdown has occurred</font>
-
-<a name="line708">708: </a><font color="#B22222">   Notes:</font>
-<a name="line709">709: </a><font color="#B22222">   The start vector is computed from another vector: for the first step (i=0),</font>
-<a name="line710">710: </a><font color="#B22222">   the first initial vector is used (see <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>()); otherwise a random</font>
-<a name="line711">711: </a><font color="#B22222">   vector is created. Then this vector is forced to be in the range of OP (only</font>
-<a name="line712">712: </a><font color="#B22222">   for generalized definite problems) and orthonormalized with respect to all</font>
-<a name="line713">713: </a><font color="#B22222">   V-vectors up to i-1. The resulting vector is placed in V[i].</font>
-
-<a name="line715">715: </a><font color="#B22222">   The flag breakdown is set to true if either i=0 and the vector belongs to the</font>
-<a name="line716">716: </a><font color="#B22222">   deflation space, or i>0 and the vector is linearly dependent with respect</font>
-<a name="line717">717: </a><font color="#B22222">   to the V-vectors.</font>
-<a name="line718">718: </a><font color="#B22222">*/</font>
-<a name="line719">719: </a><strong><font color="#4169E1"><a name="EPSGetStartVector"></a>PetscErrorCode EPSGetStartVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscBool *breakdown)</font></strong>
-<a name="line720">720: </a>{
-<a name="line722">722: </a>  PetscReal      norm;
-<a name="line723">723: </a>  PetscBool      lindep;
-<a name="line724">724: </a>  Vec            w,z;
-
-
-<a name="line730">730: </a>  <font color="#B22222">/* For the first step, use the first initial vector, otherwise a random one */</font>
-<a name="line731">731: </a>  <font color="#4169E1">if</font> (i>0 || eps->nini==0) {
-<a name="line732">732: </a>    <a href="../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,i,eps->rand);
-<a name="line733">733: </a>  }
-<a name="line734">734: </a>  <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w);
-<a name="line735">735: </a>  <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,i,w);
-
-<a name="line737">737: </a>  <font color="#B22222">/* Force the vector to be in the range of OP for definite generalized problems */</font>
-<a name="line738">738: </a>  <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&z);
-<a name="line739">739: </a>  <font color="#4169E1">if</font> (eps->ispositive || (eps->isgeneralized && eps->ishermitian)) {
-<a name="line740">740: </a>    <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,w,z);
-<a name="line741">741: </a>  } <font color="#4169E1">else</font> {
-<a name="line742">742: </a>    VecCopy(w,z);
-<a name="line743">743: </a>  }
-<a name="line744">744: </a>  <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&z);
-<a name="line745">745: </a>  VecDestroy(&w);
-
-<a name="line747">747: </a>  <font color="#B22222">/* Orthonormalize the vector with respect to previous vectors */</font>
-<a name="line748">748: </a>  <a href="../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&lindep);
-<a name="line749">749: </a>  <font color="#4169E1">if</font> (breakdown) *breakdown = lindep;
-<a name="line750">750: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (lindep || norm == 0.0) {
-<a name="line751">751: </a>    <font color="#4169E1">if</font> (i==0) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Initial vector is zero or belongs to the deflation space"</font>);
-<a name="line752">752: </a>    <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unable to generate more start vectors"</font>);
-<a name="line753">753: </a>  }
-<a name="line754">754: </a>  <a href="../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1.0/norm);
-<a name="line755">755: </a>  <font color="#4169E1">return</font>(0);
-<a name="line756">756: </a>}
+<a name="line257">257: </a><font color="#B22222">.  EPS_CONVERGED_USER - converged due to a user-defined condition</font>
+<a name="line258">258: </a><font color="#B22222">.  EPS_DIVERGED_ITS - required more than max_it iterations to reach convergence</font>
+<a name="line259">259: </a><font color="#B22222">.  EPS_DIVERGED_BREAKDOWN - generic breakdown in method</font>
+<a name="line260">260: </a><font color="#B22222">-  EPS_DIVERGED_SYMMETRY_LOST - pseudo-Lanczos was not able to keep symmetry</font>
+
+<a name="line262">262: </a><font color="#B22222">   Note:</font>
+<a name="line263">263: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() is complete.</font>
+
+<a name="line265">265: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line267">267: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(), <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a></font>
+<a name="line268">268: </a><font color="#B22222">@*/</font>
+<a name="line269">269: </a><strong><font color="#4169E1"><a name="EPSGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a> *reason)</font></strong>
+<a name="line270">270: </a>{
+<a name="line274">274: </a>  EPSCheckSolved(eps,1);
+<a name="line275">275: </a>  *reason = eps->reason;
+<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
+<a name="line277">277: </a>}
+
+<a name="line281">281: </a><font color="#B22222">/*@</font>
+<a name="line282">282: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a> - Gets an orthonormal basis of the computed invariant</font>
+<a name="line283">283: </a><font color="#B22222">   subspace.</font>
+
+<a name="line285">285: </a><font color="#B22222">   Not Collective, but vectors are shared by all processors that share the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line287">287: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line288">288: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line290">290: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line291">291: </a><font color="#B22222">.  v - an array of vectors</font>
+
+<a name="line293">293: </a><font color="#B22222">   Notes:</font>
+<a name="line294">294: </a><font color="#B22222">   This function should be called after <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>() has finished.</font>
+
+<a name="line296">296: </a><font color="#B22222">   The user should provide in v an array of nconv vectors, where nconv is</font>
+<a name="line297">297: </a><font color="#B22222">   the value returned by <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>().</font>
+
+<a name="line299">299: </a><font color="#B22222">   The first k vectors returned in v span an invariant subspace associated</font>
+<a name="line300">300: </a><font color="#B22222">   with the first k computed eigenvalues (note that this is not true if the</font>
+<a name="line301">301: </a><font color="#B22222">   k-th eigenvalue is complex and matrix A is real; in this case the first</font>
+<a name="line302">302: </a><font color="#B22222">   k+1 vectors should be used). An invariant subspace X of A satisfies Ax</font>
+<a name="line303">303: </a><font color="#B22222">   in X for all x in X (a similar definition applies for generalized</font>
+<a name="line304">304: </a><font color="#B22222">   eigenproblems).</font>
+
+<a name="line306">306: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line308">308: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(), <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>()</font>
+<a name="line309">309: </a><font color="#B22222">@*/</font>
+<a name="line310">310: </a><strong><font color="#4169E1"><a name="EPSGetInvariantSubspace"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,Vec *v)</font></strong>
+<a name="line311">311: </a>{
+<a name="line313">313: </a>  PetscInt       i;
+
+<a name="line319">319: </a>  EPSCheckSolved(eps,1);
+<a name="line320">320: </a>  <font color="#4169E1">if</font> (!eps->ishermitian && eps->state==EPS_STATE_EIGENVECTORS) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a> must be called before <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>,<a href="../../../docs/manual [...]
+<a name="line321">321: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line322">322: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,i,v[i]);
+<a name="line323">323: </a>    <font color="#4169E1">if</font> (eps->balance!=EPS_BALANCE_NONE && eps->D) {
+<a name="line324">324: </a>      VecPointwiseDivide(v[i],v[i],eps->D);
+<a name="line325">325: </a>      VecNormalize(v[i],NULL);
+<a name="line326">326: </a>    }
+<a name="line327">327: </a>  }
+<a name="line328">328: </a>  <font color="#4169E1">return</font>(0);
+<a name="line329">329: </a>}
+
+<a name="line333">333: </a><font color="#B22222">/*@</font>
+<a name="line334">334: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a> - Gets the i-th solution of the eigenproblem as computed by</font>
+<a name="line335">335: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(). The solution consists in both the eigenvalue and the eigenvector.</font>
+
+<a name="line337">337: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line339">339: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line340">340: </a><font color="#B22222">+  eps - eigensolver context</font>
+<a name="line341">341: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line343">343: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line344">344: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
+<a name="line345">345: </a><font color="#B22222">.  eigi - imaginary part of eigenvalue</font>
+<a name="line346">346: </a><font color="#B22222">.  Vr   - real part of eigenvector</font>
+<a name="line347">347: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
+
+<a name="line349">349: </a><font color="#B22222">   Notes:</font>
+<a name="line350">350: </a><font color="#B22222">   It is allowed to pass NULL for Vr and Vi, if the eigenvector is not</font>
+<a name="line351">351: </a><font color="#B22222">   required. Otherwise, the caller must provide valid Vec objects, i.e.,</font>
+<a name="line352">352: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
+
+<a name="line354">354: </a><font color="#B22222">   If the eigenvalue is real, then eigi and Vi are set to zero. If PETSc is</font>
+<a name="line355">355: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
+<a name="line356">356: </a><font color="#B22222">   directly in eigr (eigi is set to zero) and the eigenvector in Vr (Vi is</font>
+<a name="line357">357: </a><font color="#B22222">   set to zero). In both cases, the user can pass NULL in eigi and Vi.</font>
+
+<a name="line359">359: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>()).</font>
+<a name="line360">360: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
+<a name="line361">361: </a><font color="#B22222">   with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
+
+<a name="line363">363: </a><font color="#B22222">   The 2-norm of the eigenvector is one unless the problem is generalized</font>
+<a name="line364">364: </a><font color="#B22222">   Hermitian. In this case the eigenvector is normalized with respect to the</font>
+<a name="line365">365: </a><font color="#B22222">   norm defined by the B matrix.</font>
+
+<a name="line367">367: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line369">369: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(), <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(), <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(),</font>
+<a name="line370">370: </a><font color="#B22222">          <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSGetInvariantSubspace.html#EPSGetInvariantSubspace">EPSGetInvariantSubspace</a>()</font>
+<a name="line371">371: </a><font color="#B22222">@*/</font>
+<a name="line372">372: </a><strong><font color="#4169E1"><a name="EPSGetEigenpair"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)</font></strong>
+<a name="line373">373: </a>{
+
+<a name="line379">379: </a>  EPSCheckSolved(eps,1);
+<a name="line380">380: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line381">381: </a>  <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(eps,i,eigr,eigi);
+<a name="line382">382: </a>  <font color="#4169E1">if</font> (Vr || Vi) { <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(eps,i,Vr,Vi); }
+<a name="line383">383: </a>  <font color="#4169E1">return</font>(0);
+<a name="line384">384: </a>}
+
+<a name="line388">388: </a><font color="#B22222">/*@</font>
+<a name="line389">389: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a> - Gets the i-th eigenvalue as computed by <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>().</font>
+
+<a name="line391">391: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line393">393: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line394">394: </a><font color="#B22222">+  eps - eigensolver context</font>
+<a name="line395">395: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line397">397: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line398">398: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
+<a name="line399">399: </a><font color="#B22222">-  eigi - imaginary part of eigenvalue</font>
+
+<a name="line401">401: </a><font color="#B22222">   Notes:</font>
+<a name="line402">402: </a><font color="#B22222">   If the eigenvalue is real, then eigi is set to zero. If PETSc is</font>
+<a name="line403">403: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
+<a name="line404">404: </a><font color="#B22222">   directly in eigr (eigi is set to zero).</font>
+
+<a name="line406">406: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>()).</font>
+<a name="line407">407: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
+<a name="line408">408: </a><font color="#B22222">   with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
+
+<a name="line410">410: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line412">412: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>()</font>
+<a name="line413">413: </a><font color="#B22222">@*/</font>
+<a name="line414">414: </a><strong><font color="#4169E1"><a name="EPSGetEigenvalue"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetEigenvalue.html#EPSGetEigenvalue">EPSGetEigenvalue</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscScalar *eigr,PetscScalar *eigi)</font></strong>
+<a name="line415">415: </a>{
+<a name="line416">416: </a>  PetscInt k;
+
+<a name="line420">420: </a>  EPSCheckSolved(eps,1);
+<a name="line421">421: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line422">422: </a>  k = eps->perm[i];
+<a name="line423">423: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line424">424: </a>  <font color="#4169E1">if</font> (eigr) *eigr = eps->eigr[k];
+<a name="line425">425: </a>  <font color="#4169E1">if</font> (eigi) *eigi = 0;
+<a name="line426">426: </a><font color="#A020F0">#else</font>
+<a name="line427">427: </a>  <font color="#4169E1">if</font> (eigr) *eigr = eps->eigr[k];
+<a name="line428">428: </a>  <font color="#4169E1">if</font> (eigi) *eigi = eps->eigi[k];
+<a name="line429">429: </a><font color="#A020F0">#endif</font>
+<a name="line430">430: </a>  <font color="#4169E1">return</font>(0);
+<a name="line431">431: </a>}
+
+<a name="line435">435: </a><font color="#B22222">/*@</font>
+<a name="line436">436: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a> - Gets the i-th right eigenvector as computed by <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>().</font>
+
+<a name="line438">438: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line440">440: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line441">441: </a><font color="#B22222">+  eps - eigensolver context</font>
+<a name="line442">442: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line444">444: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line445">445: </a><font color="#B22222">+  Vr   - real part of eigenvector</font>
+<a name="line446">446: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
+
+<a name="line448">448: </a><font color="#B22222">   Notes:</font>
+<a name="line449">449: </a><font color="#B22222">   The caller must provide valid Vec objects, i.e., they must be created</font>
+<a name="line450">450: </a><font color="#B22222">   by the calling program with e.g. MatCreateVecs().</font>
+
+<a name="line452">452: </a><font color="#B22222">   If the corresponding eigenvalue is real, then Vi is set to zero. If PETSc is</font>
+<a name="line453">453: </a><font color="#B22222">   configured with complex scalars the eigenvector is stored</font>
+<a name="line454">454: </a><font color="#B22222">   directly in Vr (Vi is set to zero). In both cases, the user can pass NULL in Vi.</font>
+
+<a name="line456">456: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>()).</font>
+<a name="line457">457: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
+<a name="line458">458: </a><font color="#B22222">   with <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>().</font>
+
+<a name="line460">460: </a><font color="#B22222">   The 2-norm of the eigenvector is one unless the problem is generalized</font>
+<a name="line461">461: </a><font color="#B22222">   Hermitian. In this case the eigenvector is normalized with respect to the</font>
+<a name="line462">462: </a><font color="#B22222">   norm defined by the B matrix.</font>
+
+<a name="line464">464: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line466">466: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(), <a href="../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>()</font>
+<a name="line467">467: </a><font color="#B22222">@*/</font>
+<a name="line468">468: </a><strong><font color="#4169E1"><a name="EPSGetEigenvector"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetEigenvector.html#EPSGetEigenvector">EPSGetEigenvector</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,Vec Vr,Vec Vi)</font></strong>
+<a name="line469">469: </a>{
+<a name="line471">471: </a>  PetscInt       k;
+
+<a name="line479">479: </a>  EPSCheckSolved(eps,1);
+<a name="line480">480: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line481">481: </a>  EPSComputeVectors(eps);
+<a name="line482">482: </a>  k = eps->perm[i];
+<a name="line483">483: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line484">484: </a>  <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vr);
+<a name="line485">485: </a>  <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
+<a name="line486">486: </a><font color="#A020F0">#else</font>
+<a name="line487">487: </a>  <font color="#4169E1">if</font> (eps->eigi[k] > 0) { <font color="#B22222">/* first value of conjugate pair */</font>
+<a name="line488">488: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vr);
+<a name="line489">489: </a>    <font color="#4169E1">if</font> (Vi) {
+<a name="line490">490: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k+1,Vi);
+<a name="line491">491: </a>    }
+<a name="line492">492: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (eps->eigi[k] < 0) { <font color="#B22222">/* second value of conjugate pair */</font>
+<a name="line493">493: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k-1,Vr);
+<a name="line494">494: </a>    <font color="#4169E1">if</font> (Vi) {
+<a name="line495">495: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vi);
+<a name="line496">496: </a>      VecScale(Vi,-1.0);
+<a name="line497">497: </a>    }
+<a name="line498">498: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* real eigenvalue */</font>
+<a name="line499">499: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,k,Vr);
+<a name="line500">500: </a>    <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
+<a name="line501">501: </a>  }
+<a name="line502">502: </a><font color="#A020F0">#endif</font>
+<a name="line503">503: </a>  <font color="#4169E1">return</font>(0);
+<a name="line504">504: </a>}
+
+<a name="line508">508: </a><font color="#B22222">/*@</font>
+<a name="line509">509: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a> - Returns the error estimate associated to the i-th</font>
+<a name="line510">510: </a><font color="#B22222">   computed eigenpair.</font>
+
+<a name="line512">512: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line514">514: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line515">515: </a><font color="#B22222">+  eps - eigensolver context</font>
+<a name="line516">516: </a><font color="#B22222">-  i   - index of eigenpair</font>
+
+<a name="line518">518: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line519">519: </a><font color="#B22222">.  errest - the error estimate</font>
+
+<a name="line521">521: </a><font color="#B22222">   Notes:</font>
+<a name="line522">522: </a><font color="#B22222">   This is the error estimate used internally by the eigensolver. The actual</font>
+<a name="line523">523: </a><font color="#B22222">   error bound can be computed with <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(). See also the users</font>
+<a name="line524">524: </a><font color="#B22222">   manual for details.</font>
+
+<a name="line526">526: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line528">528: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>()</font>
+<a name="line529">529: </a><font color="#B22222">@*/</font>
+<a name="line530">530: </a><strong><font color="#4169E1"><a name="EPSGetErrorEstimate"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscReal *errest)</font></strong>
+<a name="line531">531: </a>{
+<a name="line535">535: </a>  EPSCheckSolved(eps,1);
+<a name="line536">536: </a>  <font color="#4169E1">if</font> (i<0 || i>=eps->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line537">537: </a>  <font color="#4169E1">if</font> (errest) *errest = eps->errest[eps->perm[i]];
+<a name="line538">538: </a>  <font color="#4169E1">return</font>(0);
+<a name="line539">539: </a>}
+
+<a name="line543">543: </a><font color="#B22222">/*</font>
+<a name="line544">544: </a><font color="#B22222">   EPSComputeResidualNorm_Private - Computes the norm of the residual vector</font>
+<a name="line545">545: </a><font color="#B22222">   associated with an eigenpair.</font>
+
+<a name="line547">547: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line548">548: </a><font color="#B22222">     kr,ki - eigenvalue</font>
+<a name="line549">549: </a><font color="#B22222">     xr,xi - eigenvector</font>
+<a name="line550">550: </a><font color="#B22222">     z     - three work vectors (the second one not referenced in complex scalars)</font>
+<a name="line551">551: </a><font color="#B22222">*/</font>
+<a name="line552">552: </a><strong><font color="#4169E1"><a name="EPSComputeResidualNorm_Private"></a>PetscErrorCode EPSComputeResidualNorm_Private(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)</font></strong>
+<a name="line553">553: </a>{
+<a name="line555">555: </a>  PetscInt       nmat;
+<a name="line556">556: </a>  Mat            A,B;
+<a name="line557">557: </a>  Vec            u,w;
+<a name="line558">558: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line559">559: </a>  Vec            v;
+<a name="line560">560: </a>  PetscReal      ni,nr;
+<a name="line561">561: </a><font color="#A020F0">#endif</font>
+
+<a name="line564">564: </a>  u = z[0]; w = z[2];
+<a name="line565">565: </a>  <a href="../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(eps->st,&nmat);
+<a name="line566">566: </a>  <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line567">567: </a>  <font color="#4169E1">if</font> (nmat>1) { <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B); }
+
+<a name="line569">569: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line570">570: </a>  v = z[1]; 
+<a name="line571">571: </a>  <font color="#4169E1">if</font> (ki == 0 || PetscAbsScalar(ki) < PetscAbsScalar(kr*PETSC_MACHINE_EPSILON)) {
+<a name="line572">572: </a><font color="#A020F0">#endif</font>
+<a name="line573">573: </a>    MatMult(A,xr,u);                             <font color="#B22222">/* u=A*x */</font>
+<a name="line574">574: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(kr) > PETSC_MACHINE_EPSILON) {
+<a name="line575">575: </a>      <font color="#4169E1">if</font> (nmat>1) { MatMult(B,xr,w); }
+<a name="line576">576: </a>      <font color="#4169E1">else</font> { VecCopy(xr,w); }                    <font color="#B22222">/* w=B*x */</font>
+<a name="line577">577: </a>      VecAXPY(u,-kr,w);                          <font color="#B22222">/* u=A*x-k*B*x */</font>
+<a name="line578">578: </a>    }
+<a name="line579">579: </a>    VecNorm(u,NORM_2,norm);
+<a name="line580">580: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line581">581: </a>  } <font color="#4169E1">else</font> {
+<a name="line582">582: </a>    MatMult(A,xr,u);                             <font color="#B22222">/* u=A*xr */</font>
+<a name="line583">583: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(kr,ki) > PETSC_MACHINE_EPSILON) {
+<a name="line584">584: </a>      <font color="#4169E1">if</font> (nmat>1) { MatMult(B,xr,v); }
+<a name="line585">585: </a>      <font color="#4169E1">else</font> { VecCopy(xr,v); }                    <font color="#B22222">/* v=B*xr */</font>
+<a name="line586">586: </a>      VecAXPY(u,-kr,v);                          <font color="#B22222">/* u=A*xr-kr*B*xr */</font>
+<a name="line587">587: </a>      <font color="#4169E1">if</font> (nmat>1) { MatMult(B,xi,w); }
+<a name="line588">588: </a>      <font color="#4169E1">else</font> { VecCopy(xi,w); }                    <font color="#B22222">/* w=B*xi */</font>
+<a name="line589">589: </a>      VecAXPY(u,ki,w);                           <font color="#B22222">/* u=A*xr-kr*B*xr+ki*B*xi */</font>
+<a name="line590">590: </a>    }
+<a name="line591">591: </a>    VecNorm(u,NORM_2,&nr);
+<a name="line592">592: </a>    MatMult(A,xi,u);                             <font color="#B22222">/* u=A*xi */</font>
+<a name="line593">593: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(kr,ki) > PETSC_MACHINE_EPSILON) {
+<a name="line594">594: </a>      VecAXPY(u,-kr,w);                          <font color="#B22222">/* u=A*xi-kr*B*xi */</font>
+<a name="line595">595: </a>      VecAXPY(u,-ki,v);                          <font color="#B22222">/* u=A*xi-kr*B*xi-ki*B*xr */</font>
+<a name="line596">596: </a>    }
+<a name="line597">597: </a>    VecNorm(u,NORM_2,&ni);
+<a name="line598">598: </a>    *norm = SlepcAbsEigenvalue(nr,ni);
+<a name="line599">599: </a>  }
+<a name="line600">600: </a><font color="#A020F0">#endif</font>
+<a name="line601">601: </a>  <font color="#4169E1">return</font>(0);
+<a name="line602">602: </a>}
+
+<a name="line606">606: </a><font color="#B22222">/*@</font>
+<a name="line607">607: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a> - Computes the error (based on the residual norm) associated</font>
+<a name="line608">608: </a><font color="#B22222">   with the i-th computed eigenpair.</font>
+
+<a name="line610">610: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line612">612: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line613">613: </a><font color="#B22222">+  eps  - the eigensolver context</font>
+<a name="line614">614: </a><font color="#B22222">.  i    - the solution index</font>
+<a name="line615">615: </a><font color="#B22222">-  type - the type of error to compute</font>
+
+<a name="line617">617: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line618">618: </a><font color="#B22222">.  error - the error</font>
+
+<a name="line620">620: </a><font color="#B22222">   Notes:</font>
+<a name="line621">621: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
+<a name="line622">622: </a><font color="#B22222">   norm ||Ax-kBx||_2 where k is the eigenvalue and x is the eigenvector.</font>
+
+<a name="line624">624: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line626">626: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a>, <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSGetErrorEstimate.html#EPSGetErrorEstimate">EPSGetErrorEstimate</a>()</font>
+<a name="line627">627: </a><font color="#B22222">@*/</font>
+<a name="line628">628: </a><strong><font color="#4169E1"><a name="EPSComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> type,PetscReal *error)</font></strong>
+<a name="line629">629: </a>{
+<a name="line631">631: </a>  Mat            A,B;
+<a name="line632">632: </a>  Vec            xr,xi,w[3];
+<a name="line633">633: </a>  PetscReal      t;
+<a name="line634">634: </a>  PetscScalar    kr,ki;
+<a name="line635">635: </a>  PetscBool      flg;
+
+<a name="line642">642: </a>  EPSCheckSolved(eps,1);
+
+<a name="line644">644: </a>  <font color="#B22222">/* allocate work vectors */</font>
+<a name="line645">645: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line646">646: </a>  <a href="../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,3);
+<a name="line647">647: </a>  xi   = NULL;
+<a name="line648">648: </a>  w[1] = NULL;
+<a name="line649">649: </a><font color="#A020F0">#else</font>
+<a name="line650">650: </a>  <a href="../../../docs/manualpages/EPS/EPSSetWorkVecs.html#EPSSetWorkVecs">EPSSetWorkVecs</a>(eps,5);
+<a name="line651">651: </a>  xi   = eps->work[3];
+<a name="line652">652: </a>  w[1] = eps->work[4];
+<a name="line653">653: </a><font color="#A020F0">#endif</font>
+<a name="line654">654: </a>  xr   = eps->work[0];
+<a name="line655">655: </a>  w[0] = eps->work[1];
+<a name="line656">656: </a>  w[2] = eps->work[2];
+
+<a name="line658">658: </a>  <font color="#B22222">/* compute residual norms */</font>
+<a name="line659">659: </a>  <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,&kr,&ki,xr,xi);
+<a name="line660">660: </a>  EPSComputeResidualNorm_Private(eps,kr,ki,xr,xi,w,error);
+
+<a name="line662">662: </a>  <font color="#B22222">/* compute error */</font>
+<a name="line663">663: </a>  <font color="#4169E1">switch</font> (type) {
+<a name="line664">664: </a>    <font color="#4169E1">case</font> EPS_ERROR_ABSOLUTE:
+<a name="line665">665: </a>      <font color="#4169E1">break</font>;
+<a name="line666">666: </a>    <font color="#4169E1">case</font> EPS_ERROR_RELATIVE:
+<a name="line667">667: </a>      *error /= SlepcAbsEigenvalue(kr,ki);
+<a name="line668">668: </a>      <font color="#4169E1">break</font>;
+<a name="line669">669: </a>    <font color="#4169E1">case</font> EPS_ERROR_BACKWARD:
+<a name="line670">670: </a>      <font color="#B22222">/* initialization of matrix norms */</font>
+<a name="line671">671: </a>      <font color="#4169E1">if</font> (!eps->nrma) {
+<a name="line672">672: </a>        <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,0,&A);
+<a name="line673">673: </a>        MatHasOperation(A,MATOP_NORM,&flg);
+<a name="line674">674: </a>        <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
+<a name="line675">675: </a>        MatNorm(A,NORM_INFINITY,&eps->nrma);
+<a name="line676">676: </a>      }
+<a name="line677">677: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) {
+<a name="line678">678: </a>        <font color="#4169E1">if</font> (!eps->nrmb) {
+<a name="line679">679: </a>          <a href="../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(eps->st,1,&B);
+<a name="line680">680: </a>          MatHasOperation(B,MATOP_NORM,&flg);
+<a name="line681">681: </a>          <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
+<a name="line682">682: </a>          MatNorm(B,NORM_INFINITY,&eps->nrmb);
+<a name="line683">683: </a>        }
+<a name="line684">684: </a>      } <font color="#4169E1">else</font> eps->nrmb = 1.0;
+<a name="line685">685: </a>      t = SlepcAbsEigenvalue(kr,ki);
+<a name="line686">686: </a>      *error /= eps->nrma+t*eps->nrmb;
+<a name="line687">687: </a>      <font color="#4169E1">break</font>;
+<a name="line688">688: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line689">689: </a>      SETERRQ(PetscObjectComm((PetscObject)eps),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
+<a name="line690">690: </a>  }
+<a name="line691">691: </a>  <font color="#4169E1">return</font>(0);
+<a name="line692">692: </a>}
+
+<a name="line696">696: </a><font color="#B22222">/*</font>
+<a name="line697">697: </a><font color="#B22222">   EPSGetStartVector - Generate a suitable vector to be used as the starting vector</font>
+<a name="line698">698: </a><font color="#B22222">   for the recurrence that builds the right subspace.</font>
+
+<a name="line700">700: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> and Vec</font>
+
+<a name="line702">702: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line703">703: </a><font color="#B22222">+  eps - the eigensolver context</font>
+<a name="line704">704: </a><font color="#B22222">-  i   - iteration number</font>
+
+<a name="line706">706: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line707">707: </a><font color="#B22222">.  breakdown - flag indicating that a breakdown has occurred</font>
+
+<a name="line709">709: </a><font color="#B22222">   Notes:</font>
+<a name="line710">710: </a><font color="#B22222">   The start vector is computed from another vector: for the first step (i=0),</font>
+<a name="line711">711: </a><font color="#B22222">   the first initial vector is used (see <a href="../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>()); otherwise a random</font>
+<a name="line712">712: </a><font color="#B22222">   vector is created. Then this vector is forced to be in the range of OP (only</font>
+<a name="line713">713: </a><font color="#B22222">   for generalized definite problems) and orthonormalized with respect to all</font>
+<a name="line714">714: </a><font color="#B22222">   V-vectors up to i-1. The resulting vector is placed in V[i].</font>
+
+<a name="line716">716: </a><font color="#B22222">   The flag breakdown is set to true if either i=0 and the vector belongs to the</font>
+<a name="line717">717: </a><font color="#B22222">   deflation space, or i>0 and the vector is linearly dependent with respect</font>
+<a name="line718">718: </a><font color="#B22222">   to the V-vectors.</font>
+<a name="line719">719: </a><font color="#B22222">*/</font>
+<a name="line720">720: </a><strong><font color="#4169E1"><a name="EPSGetStartVector"></a>PetscErrorCode EPSGetStartVector(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt i,PetscBool *breakdown)</font></strong>
+<a name="line721">721: </a>{
+<a name="line723">723: </a>  PetscReal      norm;
+<a name="line724">724: </a>  PetscBool      lindep;
+<a name="line725">725: </a>  Vec            w,z;
+
+
+<a name="line731">731: </a>  <font color="#B22222">/* For the first step, use the first initial vector, otherwise a random one */</font>
+<a name="line732">732: </a>  <font color="#4169E1">if</font> (i>0 || eps->nini==0) {
+<a name="line733">733: </a>    <a href="../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(eps->V,i);
+<a name="line734">734: </a>  }
+<a name="line735">735: </a>  <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(eps->V,&w);
+<a name="line736">736: </a>  <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(eps->V,i,w);
+
+<a name="line738">738: </a>  <font color="#B22222">/* Force the vector to be in the range of OP for definite generalized problems */</font>
+<a name="line739">739: </a>  <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,i,&z);
+<a name="line740">740: </a>  <font color="#4169E1">if</font> (eps->ispositive || (eps->isgeneralized && eps->ishermitian)) {
+<a name="line741">741: </a>    <a href="../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(eps->st,w,z);
+<a name="line742">742: </a>  } <font color="#4169E1">else</font> {
+<a name="line743">743: </a>    VecCopy(w,z);
+<a name="line744">744: </a>  }
+<a name="line745">745: </a>  <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,i,&z);
+<a name="line746">746: </a>  VecDestroy(&w);
+
+<a name="line748">748: </a>  <font color="#B22222">/* Orthonormalize the vector with respect to previous vectors */</font>
+<a name="line749">749: </a>  <a href="../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(eps->V,i,NULL,&norm,&lindep);
+<a name="line750">750: </a>  <font color="#4169E1">if</font> (breakdown) *breakdown = lindep;
+<a name="line751">751: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (lindep || norm == 0.0) {
+<a name="line752">752: </a>    <font color="#4169E1">if</font> (i==0) SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Initial vector is zero or belongs to the deflation space"</font>);
+<a name="line753">753: </a>    <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Unable to generate more start vectors"</font>);
+<a name="line754">754: </a>  }
+<a name="line755">755: </a>  <a href="../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(eps->V,i,1.0/norm);
+<a name="line756">756: </a>  <font color="#4169E1">return</font>(0);
+<a name="line757">757: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/epsview.c b/src/eps/interface/epsview.c
index 9630bce..abe5def 100644
--- a/src/eps/interface/epsview.c
+++ b/src/eps/interface/epsview.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -112,16 +112,19 @@ PetscErrorCode EPSView(EPS eps,PetscViewer viewer)
         default: SETERRQ(PetscObjectComm((PetscObject)eps),1,"Wrong value of eps->balance");
       }
       ierr = PetscViewerASCIIPrintf(viewer,"  balancing enabled: %s",bal);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       if (eps->balance==EPS_BALANCE_ONESIDE || eps->balance==EPS_BALANCE_TWOSIDE) {
         ierr = PetscViewerASCIIPrintf(viewer,", with its=%D",eps->balance_its);CHKERRQ(ierr);
       }
       if (eps->balance==EPS_BALANCE_TWOSIDE && eps->balance_cutoff!=0.0) {
         ierr = PetscViewerASCIIPrintf(viewer," and cutoff=%g",(double)eps->balance_cutoff);CHKERRQ(ierr);
       }
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
     }
     ierr = PetscViewerASCIIPrintf(viewer,"  selected portion of the spectrum: ");CHKERRQ(ierr);
     ierr = SlepcSNPrintfScalar(str,50,eps->target,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     if (!eps->which) {
       ierr = PetscViewerASCIIPrintf(viewer,"not yet set\n");CHKERRQ(ierr);
     } else switch (eps->which) {
@@ -156,10 +159,15 @@ PetscErrorCode EPSView(EPS eps,PetscViewer viewer)
         ierr = PetscViewerASCIIPrintf(viewer,"smallest imaginary parts\n");CHKERRQ(ierr);
         break;
       case EPS_ALL:
-        ierr = PetscViewerASCIIPrintf(viewer,"all eigenvalues in interval [%g,%g]\n",(double)eps->inta,(double)eps->intb);CHKERRQ(ierr);
+        if (eps->inta || eps->intb) {
+          ierr = PetscViewerASCIIPrintf(viewer,"all eigenvalues in interval [%g,%g]\n",(double)eps->inta,(double)eps->intb);CHKERRQ(ierr);
+        } else {
+          ierr = PetscViewerASCIIPrintf(viewer,"all eigenvalues in the region\n");CHKERRQ(ierr);
+        }
         break;
       default: SETERRQ(PetscObjectComm((PetscObject)eps),1,"Wrong value of eps->which");
     }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     if (eps->isgeneralized && eps->ishermitian && eps->purify) {
       ierr = PetscViewerASCIIPrintf(viewer,"  postprocessing eigenvectors with purification\n");CHKERRQ(ierr);
     }
@@ -175,10 +183,11 @@ PetscErrorCode EPSView(EPS eps,PetscViewer viewer)
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum number of iterations: %D\n",eps->max_it);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  tolerance: %g\n",(double)eps->tol);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  convergence test: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     switch (eps->conv) {
     case EPS_CONV_ABS:
       ierr = PetscViewerASCIIPrintf(viewer,"absolute\n");CHKERRQ(ierr);break;
-    case EPS_CONV_EIG:
+    case EPS_CONV_REL:
       ierr = PetscViewerASCIIPrintf(viewer,"relative to the eigenvalue\n");CHKERRQ(ierr);break;
     case EPS_CONV_NORM:
       ierr = PetscViewerASCIIPrintf(viewer,"relative to the eigenvalue and matrix norms\n");CHKERRQ(ierr);
@@ -191,6 +200,7 @@ PetscErrorCode EPSView(EPS eps,PetscViewer viewer)
     case EPS_CONV_USER:
       ierr = PetscViewerASCIIPrintf(viewer,"user-defined\n");CHKERRQ(ierr);break;
     }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     if (eps->nini) {
       ierr = PetscViewerASCIIPrintf(viewer,"  dimension of user-provided initial space: %D\n",PetscAbs(eps->nini));CHKERRQ(ierr);
     }
@@ -251,7 +261,7 @@ PetscErrorCode EPSReasonView(EPS eps,PetscViewer viewer)
   if (isAscii) {
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);CHKERRQ(ierr);
     if (eps->reason > 0) {
-      ierr = PetscViewerASCIIPrintf(viewer,"%s Linear eigensolve converged (%d eigenpair%s) due to %s; iterations %D\n",((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:"",eps->nconv,(eps->nconv>1)?"s":"",EPSConvergedReasons[eps->reason],eps->its);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"%s Linear eigensolve converged (%D eigenpair%s) due to %s; iterations %D\n",((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:"",eps->nconv,(eps->nconv>1)?"s":"",EPSConvergedReasons[eps->reason],eps->its);CHKERRQ(ierr);
     } else {
       ierr = PetscViewerASCIIPrintf(viewer,"%s Linear eigensolve did not converge due to %s; iterations %D\n",((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:"",EPSConvergedReasons[eps->reason],eps->its);CHKERRQ(ierr);
     }
@@ -302,27 +312,32 @@ static PetscErrorCode EPSErrorView_ASCII(EPS eps,EPSErrorType etype,PetscViewer
   PetscBool      errok;
   PetscReal      error,re,im;
   PetscScalar    kr,ki;
-  PetscInt       i,j;
+  PetscInt       i,j,nvals;
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (eps->nconv<eps->nev) {
+  if (eps->which!=EPS_ALL && eps->nconv<eps->nev) {
     ierr = PetscViewerASCIIPrintf(viewer," Problem: less than %D eigenvalues converged\n\n",eps->nev);CHKERRQ(ierr);
     PetscFunctionReturn(0);
   }
   errok = PETSC_TRUE;
-  for (i=0;i<eps->nev;i++) {
+  nvals = (eps->which==EPS_ALL)? eps->nconv: eps->nev;
+  for (i=0;i<nvals;i++) {
     ierr = EPSComputeError(eps,i,etype,&error);CHKERRQ(ierr);
     errok = (errok && error<5.0*eps->tol)? PETSC_TRUE: PETSC_FALSE;
   }
   if (!errok) {
-    ierr = PetscViewerASCIIPrintf(viewer," Problem: some of the first %D relative errors are higher than the tolerance\n\n",eps->nev);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," Problem: some of the first %D relative errors are higher than the tolerance\n\n",nvals);CHKERRQ(ierr);
     PetscFunctionReturn(0);
   }
-  ierr = PetscViewerASCIIPrintf(viewer," All requested eigenvalues computed up to the required tolerance:");CHKERRQ(ierr);
-  for (i=0;i<=(eps->nev-1)/8;i++) {
+  if (eps->which==EPS_ALL) {
+    ierr = PetscViewerASCIIPrintf(viewer," Found %D eigenvalues, all of them computed up to the required tolerance:",nvals);CHKERRQ(ierr);
+  } else {
+    ierr = PetscViewerASCIIPrintf(viewer," All requested eigenvalues computed up to the required tolerance:");CHKERRQ(ierr);
+  }
+  for (i=0;i<=(nvals-1)/8;i++) {
     ierr = PetscViewerASCIIPrintf(viewer,"\n     ");CHKERRQ(ierr);
-    for (j=0;j<PetscMin(8,eps->nev-8*i);j++) {
+    for (j=0;j<PetscMin(8,nvals-8*i);j++) {
       ierr = EPSGetEigenpair(eps,8*i+j,&kr,&ki,NULL,NULL);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
       re = PetscRealPart(kr);
@@ -338,7 +353,7 @@ static PetscErrorCode EPSErrorView_ASCII(EPS eps,EPSErrorType etype,PetscViewer
       } else {
         ierr = PetscViewerASCIIPrintf(viewer,"%.5f",(double)re);CHKERRQ(ierr);
       }
-      if (8*i+j+1<eps->nev) { ierr = PetscViewerASCIIPrintf(viewer,", ");CHKERRQ(ierr); }
+      if (8*i+j+1<nvals) { ierr = PetscViewerASCIIPrintf(viewer,", ");CHKERRQ(ierr); }
     }
   }
   ierr = PetscViewerASCIIPrintf(viewer,"\n\n");CHKERRQ(ierr);
@@ -547,6 +562,7 @@ static PetscErrorCode EPSValuesView_DRAW(EPS eps,PetscViewer viewer)
     ierr = PetscDrawSPAddPoint(drawsp,&re,&im);CHKERRQ(ierr);
   }
   ierr = PetscDrawSPDraw(drawsp,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscDrawSPSave(drawsp);CHKERRQ(ierr);
   ierr = PetscDrawSPDestroy(&drawsp);CHKERRQ(ierr);
   ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -744,7 +760,7 @@ PetscErrorCode EPSVectorsView(EPS eps,PetscViewer viewer)
     ierr = EPSComputeVectors(eps);CHKERRQ(ierr);
     for (i=0;i<eps->nconv;i++) {
       k = eps->perm[i];
-      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",i,ename);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",(int)i,ename);CHKERRQ(ierr);
       ierr = BVGetColumn(eps->V,k,&x);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)x,vname);CHKERRQ(ierr);
       ierr = VecView(x,viewer);CHKERRQ(ierr);
diff --git a/src/eps/interface/epsview.c.html b/src/eps/interface/epsview.c.html
index 5128b64..2b27a35 100644
--- a/src/eps/interface/epsview.c.html
+++ b/src/eps/interface/epsview.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/epsview.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:43+00:00">
+<meta name="date" content="2016-05-16T10:32:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/epsview.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/epsview.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> routines related to various viewers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -117,623 +117,639 @@
 <a name="line112">112: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->balance"</font>);
 <a name="line113">113: </a>      }
 <a name="line114">114: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  balancing enabled: %s"</font>,bal);
-<a name="line115">115: </a>      <font color="#4169E1">if</font> (eps->balance==EPS_BALANCE_ONESIDE || eps->balance==EPS_BALANCE_TWOSIDE) {
-<a name="line116">116: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">", with its=%D"</font>,eps->balance_its);
-<a name="line117">117: </a>      }
-<a name="line118">118: </a>      <font color="#4169E1">if</font> (eps->balance==EPS_BALANCE_TWOSIDE && eps->balance_cutoff!=0.0) {
-<a name="line119">119: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">" and cutoff=%g"</font>,(double)eps->balance_cutoff);
-<a name="line120">120: </a>      }
-<a name="line121">121: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line122">122: </a>    }
-<a name="line123">123: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected portion of the spectrum: "</font>);
-<a name="line124">124: </a>    <a href="../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,eps->target,PETSC_FALSE);
-<a name="line125">125: </a>    <font color="#4169E1">if</font> (!eps->which) {
-<a name="line126">126: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"not yet set\n"</font>);
-<a name="line127">127: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">switch</font> (eps->which) {
-<a name="line128">128: </a>      <font color="#4169E1">case</font> EPS_WHICH_USER:
-<a name="line129">129: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"user defined\n"</font>);
-<a name="line130">130: </a>        <font color="#4169E1">break</font>;
-<a name="line131">131: </a>      <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
-<a name="line132">132: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (in magnitude)\n"</font>,str);
+<a name="line115">115: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line116">116: </a>      <font color="#4169E1">if</font> (eps->balance==EPS_BALANCE_ONESIDE || eps->balance==EPS_BALANCE_TWOSIDE) {
+<a name="line117">117: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">", with its=%D"</font>,eps->balance_its);
+<a name="line118">118: </a>      }
+<a name="line119">119: </a>      <font color="#4169E1">if</font> (eps->balance==EPS_BALANCE_TWOSIDE && eps->balance_cutoff!=0.0) {
+<a name="line120">120: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">" and cutoff=%g"</font>,(double)eps->balance_cutoff);
+<a name="line121">121: </a>      }
+<a name="line122">122: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line123">123: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line124">124: </a>    }
+<a name="line125">125: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected portion of the spectrum: "</font>);
+<a name="line126">126: </a>    <a href="../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,eps->target,PETSC_FALSE);
+<a name="line127">127: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line128">128: </a>    <font color="#4169E1">if</font> (!eps->which) {
+<a name="line129">129: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"not yet set\n"</font>);
+<a name="line130">130: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">switch</font> (eps->which) {
+<a name="line131">131: </a>      <font color="#4169E1">case</font> EPS_WHICH_USER:
+<a name="line132">132: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"user defined\n"</font>);
 <a name="line133">133: </a>        <font color="#4169E1">break</font>;
-<a name="line134">134: </a>      <font color="#4169E1">case</font> EPS_TARGET_REAL:
-<a name="line135">135: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the real axis)\n"</font>,str);
+<a name="line134">134: </a>      <font color="#4169E1">case</font> EPS_TARGET_MAGNITUDE:
+<a name="line135">135: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (in magnitude)\n"</font>,str);
 <a name="line136">136: </a>        <font color="#4169E1">break</font>;
-<a name="line137">137: </a>      <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
-<a name="line138">138: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the imaginary axis)\n"</font>,str);
+<a name="line137">137: </a>      <font color="#4169E1">case</font> EPS_TARGET_REAL:
+<a name="line138">138: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the real axis)\n"</font>,str);
 <a name="line139">139: </a>        <font color="#4169E1">break</font>;
-<a name="line140">140: </a>      <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
-<a name="line141">141: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest eigenvalues in magnitude\n"</font>);
+<a name="line140">140: </a>      <font color="#4169E1">case</font> EPS_TARGET_IMAGINARY:
+<a name="line141">141: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the imaginary axis)\n"</font>,str);
 <a name="line142">142: </a>        <font color="#4169E1">break</font>;
-<a name="line143">143: </a>      <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
-<a name="line144">144: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest eigenvalues in magnitude\n"</font>);
+<a name="line143">143: </a>      <font color="#4169E1">case</font> EPS_LARGEST_MAGNITUDE:
+<a name="line144">144: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest eigenvalues in magnitude\n"</font>);
 <a name="line145">145: </a>        <font color="#4169E1">break</font>;
-<a name="line146">146: </a>      <font color="#4169E1">case</font> EPS_LARGEST_REAL:
-<a name="line147">147: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest real parts\n"</font>);
+<a name="line146">146: </a>      <font color="#4169E1">case</font> EPS_SMALLEST_MAGNITUDE:
+<a name="line147">147: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest eigenvalues in magnitude\n"</font>);
 <a name="line148">148: </a>        <font color="#4169E1">break</font>;
-<a name="line149">149: </a>      <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
-<a name="line150">150: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest real parts\n"</font>);
+<a name="line149">149: </a>      <font color="#4169E1">case</font> EPS_LARGEST_REAL:
+<a name="line150">150: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest real parts\n"</font>);
 <a name="line151">151: </a>        <font color="#4169E1">break</font>;
-<a name="line152">152: </a>      <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
-<a name="line153">153: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest imaginary parts\n"</font>);
+<a name="line152">152: </a>      <font color="#4169E1">case</font> EPS_SMALLEST_REAL:
+<a name="line153">153: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest real parts\n"</font>);
 <a name="line154">154: </a>        <font color="#4169E1">break</font>;
-<a name="line155">155: </a>      <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
-<a name="line156">156: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest imaginary parts\n"</font>);
+<a name="line155">155: </a>      <font color="#4169E1">case</font> EPS_LARGEST_IMAGINARY:
+<a name="line156">156: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest imaginary parts\n"</font>);
 <a name="line157">157: </a>        <font color="#4169E1">break</font>;
-<a name="line158">158: </a>      <font color="#4169E1">case</font> EPS_ALL:
-<a name="line159">159: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"all eigenvalues in interval [%g,%g]\n"</font>,(double)eps->inta,(double)eps->intb);
+<a name="line158">158: </a>      <font color="#4169E1">case</font> EPS_SMALLEST_IMAGINARY:
+<a name="line159">159: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest imaginary parts\n"</font>);
 <a name="line160">160: </a>        <font color="#4169E1">break</font>;
-<a name="line161">161: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
-<a name="line162">162: </a>    }
-<a name="line163">163: </a>    <font color="#4169E1">if</font> (eps->isgeneralized && eps->ishermitian && eps->purify) {
-<a name="line164">164: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  postprocessing eigenvectors with purification\n"</font>);
-<a name="line165">165: </a>    }
-<a name="line166">166: </a>    <font color="#4169E1">if</font> (eps->trueres) {
-<a name="line167">167: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computing true residuals explicitly\n"</font>);
-<a name="line168">168: </a>    }
-<a name="line169">169: </a>    <font color="#4169E1">if</font> (eps->trackall) {
-<a name="line170">170: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computing all residuals (for tracking convergence)\n"</font>);
-<a name="line171">171: </a>    }
-<a name="line172">172: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of eigenvalues (nev): %D\n"</font>,eps->nev);
-<a name="line173">173: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of column vectors (ncv): %D\n"</font>,eps->ncv);
-<a name="line174">174: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,eps->mpd);
-<a name="line175">175: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,eps->max_it);
-<a name="line176">176: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerance: %g\n"</font>,(double)eps->tol);
-<a name="line177">177: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  convergence test: "</font>);
-<a name="line178">178: </a>    <font color="#4169E1">switch</font> (eps->conv) {
-<a name="line179">179: </a>    <font color="#4169E1">case</font> EPS_CONV_ABS:
-<a name="line180">180: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"absolute\n"</font>);<font color="#4169E1">break</font>;
-<a name="line181">181: </a>    <font color="#4169E1">case</font> EPS_CONV_EIG:
-<a name="line182">182: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue\n"</font>);<font color="#4169E1">break</font>;
-<a name="line183">183: </a>    <font color="#4169E1">case</font> EPS_CONV_NORM:
-<a name="line184">184: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue and matrix norms\n"</font>);
-<a name="line185">185: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computed matrix norms: norm(A)=%g"</font>,(double)eps->nrma);
-<a name="line186">186: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) {
-<a name="line187">187: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">", norm(B)=%g"</font>,(double)eps->nrmb);
-<a name="line188">188: </a>      }
-<a name="line189">189: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line190">190: </a>      <font color="#4169E1">break</font>;
-<a name="line191">191: </a>    <font color="#4169E1">case</font> EPS_CONV_USER:
-<a name="line192">192: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"user-defined\n"</font>);<font color="#4169E1">break</font>;
-<a name="line193">193: </a>    }
-<a name="line194">194: </a>    <font color="#4169E1">if</font> (eps->nini) {
-<a name="line195">195: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(eps->nini));
-<a name="line196">196: </a>    }
-<a name="line197">197: </a>    <font color="#4169E1">if</font> (eps->nds) {
-<a name="line198">198: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided deflation space: %D\n"</font>,PetscAbs(eps->nds));
-<a name="line199">199: </a>    }
-<a name="line200">200: </a>  } <font color="#4169E1">else</font> {
-<a name="line201">201: </a>    <font color="#4169E1">if</font> (eps->ops->view) {
-<a name="line202">202: </a>      (*eps->ops->view)(eps,viewer);
-<a name="line203">203: </a>    }
-<a name="line204">204: </a>  }
-<a name="line205">205: </a>  PetscObjectTypeCompareAny((PetscObject)eps,&isexternal,EPSARPACK,EPSBLZPACK,EPSTRLAN,EPSBLOPEX,EPSPRIMME,<font color="#666666">""</font>);
-<a name="line206">206: </a>  <font color="#4169E1">if</font> (!isexternal) {
-<a name="line207">207: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
-<a name="line208">208: </a>    <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
-<a name="line209">209: </a>    <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(eps->V,viewer);
-<a name="line210">210: </a>    <font color="#4169E1">if</font> (eps->rg) {
-<a name="line211">211: </a>      <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
-<a name="line212">212: </a>      <font color="#4169E1">if</font> (!istrivial) { <a href="../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(eps->rg,viewer); }
+<a name="line161">161: </a>      <font color="#4169E1">case</font> EPS_ALL:
+<a name="line162">162: </a>        <font color="#4169E1">if</font> (eps->inta || eps->intb) {
+<a name="line163">163: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"all eigenvalues in interval [%g,%g]\n"</font>,(double)eps->inta,(double)eps->intb);
+<a name="line164">164: </a>        } <font color="#4169E1">else</font> {
+<a name="line165">165: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"all eigenvalues in the region\n"</font>);
+<a name="line166">166: </a>        }
+<a name="line167">167: </a>        <font color="#4169E1">break</font>;
+<a name="line168">168: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)eps),1,<font color="#666666">"Wrong value of eps->which"</font>);
+<a name="line169">169: </a>    }
+<a name="line170">170: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line171">171: </a>    <font color="#4169E1">if</font> (eps->isgeneralized && eps->ishermitian && eps->purify) {
+<a name="line172">172: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  postprocessing eigenvectors with purification\n"</font>);
+<a name="line173">173: </a>    }
+<a name="line174">174: </a>    <font color="#4169E1">if</font> (eps->trueres) {
+<a name="line175">175: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computing true residuals explicitly\n"</font>);
+<a name="line176">176: </a>    }
+<a name="line177">177: </a>    <font color="#4169E1">if</font> (eps->trackall) {
+<a name="line178">178: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computing all residuals (for tracking convergence)\n"</font>);
+<a name="line179">179: </a>    }
+<a name="line180">180: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of eigenvalues (nev): %D\n"</font>,eps->nev);
+<a name="line181">181: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of column vectors (ncv): %D\n"</font>,eps->ncv);
+<a name="line182">182: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,eps->mpd);
+<a name="line183">183: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,eps->max_it);
+<a name="line184">184: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerance: %g\n"</font>,(double)eps->tol);
+<a name="line185">185: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  convergence test: "</font>);
+<a name="line186">186: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line187">187: </a>    <font color="#4169E1">switch</font> (eps->conv) {
+<a name="line188">188: </a>    <font color="#4169E1">case</font> EPS_CONV_ABS:
+<a name="line189">189: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"absolute\n"</font>);<font color="#4169E1">break</font>;
+<a name="line190">190: </a>    <font color="#4169E1">case</font> EPS_CONV_REL:
+<a name="line191">191: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue\n"</font>);<font color="#4169E1">break</font>;
+<a name="line192">192: </a>    <font color="#4169E1">case</font> EPS_CONV_NORM:
+<a name="line193">193: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue and matrix norms\n"</font>);
+<a name="line194">194: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computed matrix norms: norm(A)=%g"</font>,(double)eps->nrma);
+<a name="line195">195: </a>      <font color="#4169E1">if</font> (eps->isgeneralized) {
+<a name="line196">196: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">", norm(B)=%g"</font>,(double)eps->nrmb);
+<a name="line197">197: </a>      }
+<a name="line198">198: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line199">199: </a>      <font color="#4169E1">break</font>;
+<a name="line200">200: </a>    <font color="#4169E1">case</font> EPS_CONV_USER:
+<a name="line201">201: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"user-defined\n"</font>);<font color="#4169E1">break</font>;
+<a name="line202">202: </a>    }
+<a name="line203">203: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line204">204: </a>    <font color="#4169E1">if</font> (eps->nini) {
+<a name="line205">205: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(eps->nini));
+<a name="line206">206: </a>    }
+<a name="line207">207: </a>    <font color="#4169E1">if</font> (eps->nds) {
+<a name="line208">208: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided deflation space: %D\n"</font>,PetscAbs(eps->nds));
+<a name="line209">209: </a>    }
+<a name="line210">210: </a>  } <font color="#4169E1">else</font> {
+<a name="line211">211: </a>    <font color="#4169E1">if</font> (eps->ops->view) {
+<a name="line212">212: </a>      (*eps->ops->view)(eps,viewer);
 <a name="line213">213: </a>    }
-<a name="line214">214: </a>    PetscObjectTypeCompare((PetscObject)eps,EPSPOWER,&ispower);
-<a name="line215">215: </a>    <font color="#4169E1">if</font> (!ispower) {
-<a name="line216">216: </a>      <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
-<a name="line217">217: </a>      <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(eps->ds,viewer);
-<a name="line218">218: </a>    }
-<a name="line219">219: </a>    PetscViewerPopFormat(viewer);
-<a name="line220">220: </a>  }
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
-<a name="line222">222: </a>  <a href="../../../docs/manualpages/ST/STView.html#STView">STView</a>(eps->st,viewer);
-<a name="line223">223: </a>  <font color="#4169E1">return</font>(0);
-<a name="line224">224: </a>}
-
-<a name="line228">228: </a><font color="#B22222">/*@C</font>
-<a name="line229">229: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a> - Displays the reason an <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> solve converged or diverged.</font>
-
-<a name="line231">231: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line233">233: </a><font color="#B22222">   Parameter:</font>
-<a name="line234">234: </a><font color="#B22222">+  eps - the eigensolver context</font>
-<a name="line235">235: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
-
-<a name="line237">237: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line238">238: </a><font color="#B22222">.  -eps_converged_reason - print reason for convergence, and number of iterations</font>
-
-<a name="line240">240: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line242">242: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(), <a href="../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>()</font>
-<a name="line243">243: </a><font color="#B22222">@*/</font>
-<a name="line244">244: </a><strong><font color="#4169E1"><a name="EPSReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line245">245: </a>{
-<a name="line247">247: </a>  PetscBool      isAscii;
-
-<a name="line250">250: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
-<a name="line251">251: </a>  <font color="#4169E1">if</font> (isAscii) {
-<a name="line252">252: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line253">253: </a>    <font color="#4169E1">if</font> (eps->reason > 0) {
-<a name="line254">254: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Linear eigensolve converged (%d eigenpair%s) due to %s; iterations %D\n"</font>,((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:<font color="#666666">""</font>,eps->nconv,(eps->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,EPSConvergedReasons[eps->reason],eps->its);
-<a name="line255">255: </a>    } <font color="#4169E1">else</font> {
-<a name="line256">256: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Linear eigensolve did not converge due to %s; iterations %D\n"</font>,((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:<font color="#666666">""</font>,EPSConvergedReasons[eps->reason],eps->its);
-<a name="line257">257: </a>    }
-<a name="line258">258: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
-<a name="line259">259: </a>  }
-<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
-<a name="line261">261: </a>}
-
-<a name="line265">265: </a><font color="#B22222">/*@</font>
-<a name="line266">266: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line267">267: </a><font color="#B22222">   the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> converged reason is to be viewed. </font>
-
-<a name="line269">269: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line271">271: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line272">272: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line274">274: </a><font color="#B22222">   Level: developer</font>
-<a name="line275">275: </a><font color="#B22222">@*/</font>
-<a name="line276">276: </a><strong><font color="#4169E1"><a name="EPSReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line277">277: </a>{
-<a name="line278">278: </a>  PetscErrorCode    ierr;
-<a name="line279">279: </a>  PetscViewer       viewer;
-<a name="line280">280: </a>  PetscBool         flg;
-<a name="line281">281: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line282">282: </a>  PetscViewerFormat format;
-
-<a name="line285">285: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line286">286: </a>  incall = PETSC_TRUE;
-<a name="line287">287: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_converged_reason"</font>,&viewer,&format,&flg);
-<a name="line288">288: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line289">289: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line290">290: </a>    <a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,viewer);
-<a name="line291">291: </a>    PetscViewerPopFormat(viewer);
-<a name="line292">292: </a>    PetscViewerDestroy(&viewer);
-<a name="line293">293: </a>  }
-<a name="line294">294: </a>  incall = PETSC_FALSE;
-<a name="line295">295: </a>  <font color="#4169E1">return</font>(0);
-<a name="line296">296: </a>}
-
-<a name="line300">300: </a><strong><font color="#4169E1"><a name="EPSErrorView_ASCII"></a>static PetscErrorCode EPSErrorView_ASCII(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line301">301: </a>{
-<a name="line302">302: </a>  PetscBool      errok;
-<a name="line303">303: </a>  PetscReal      error,re,im;
-<a name="line304">304: </a>  PetscScalar    kr,ki;
-<a name="line305">305: </a>  PetscInt       i,j;
-
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (eps->nconv<eps->nev) {
-<a name="line310">310: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D eigenvalues converged\n\n"</font>,eps->nev);
-<a name="line311">311: </a>    <font color="#4169E1">return</font>(0);
-<a name="line312">312: </a>  }
-<a name="line313">313: </a>  errok = PETSC_TRUE;
-<a name="line314">314: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nev;i++) {
-<a name="line315">315: </a>    <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,etype,&error);
-<a name="line316">316: </a>    errok = (errok && error<5.0*eps->tol)? PETSC_TRUE: PETSC_FALSE;
-<a name="line317">317: </a>  }
-<a name="line318">318: </a>  <font color="#4169E1">if</font> (!errok) {
-<a name="line319">319: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,eps->nev);
-<a name="line320">320: </a>    <font color="#4169E1">return</font>(0);
-<a name="line321">321: </a>  }
-<a name="line322">322: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested eigenvalues computed up to the required tolerance:"</font>);
-<a name="line323">323: </a>  <font color="#4169E1">for</font> (i=0;i<=(eps->nev-1)/8;i++) {
-<a name="line324">324: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
-<a name="line325">325: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,eps->nev-8*i);j++) {
-<a name="line326">326: </a>      <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,8*i+j,&kr,&ki,NULL,NULL);
-<a name="line327">327: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line328">328: </a>      re = PetscRealPart(kr);
-<a name="line329">329: </a>      im = PetscImaginaryPart(kr);
-<a name="line330">330: </a><font color="#A020F0">#else</font>
-<a name="line331">331: </a>      re = kr;
-<a name="line332">332: </a>      im = ki;
-<a name="line333">333: </a><font color="#A020F0">#endif</font>
-<a name="line334">334: </a>      <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
-<a name="line335">335: </a>      <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
-<a name="line336">336: </a>      <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line337">337: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f%+.5fi"</font>,(double)re,(double)im);
-<a name="line338">338: </a>      } <font color="#4169E1">else</font> {
-<a name="line339">339: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)re);
-<a name="line340">340: </a>      }
-<a name="line341">341: </a>      <font color="#4169E1">if</font> (8*i+j+1<eps->nev) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
-<a name="line342">342: </a>    }
-<a name="line343">343: </a>  }
-<a name="line344">344: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
-<a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
-<a name="line346">346: </a>}
-
-<a name="line350">350: </a><strong><font color="#4169E1"><a name="EPSErrorView_DETAIL"></a>static PetscErrorCode EPSErrorView_DETAIL(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line351">351: </a>{
-<a name="line353">353: </a>  PetscReal      error,re,im;
-<a name="line354">354: </a>  PetscScalar    kr,ki;
-<a name="line355">355: </a>  PetscInt       i;
-<a name="line356">356: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
-<a name="line357">357: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
-
-<a name="line360">360: </a>  <font color="#4169E1">if</font> (!eps->nconv) <font color="#4169E1">return</font>(0);
-<a name="line361">361: </a>  <font color="#4169E1">switch</font> (etype) {
-<a name="line362">362: </a>    <font color="#4169E1">case</font> EPS_ERROR_ABSOLUTE:
-<a name="line363">363: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"   ||Ax-k%sx||"</font>,eps->isgeneralized?<font color="#666666">"B"</font>:<font color="#666666">""</font>);
-<a name="line364">364: </a>      <font color="#4169E1">break</font>;
-<a name="line365">365: </a>    <font color="#4169E1">case</font> EPS_ERROR_RELATIVE:
-<a name="line366">366: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"||Ax-k%sx||/||kx||"</font>,eps->isgeneralized?<font color="#666666">"B"</font>:<font color="#666666">""</font>);
-<a name="line367">367: </a>      <font color="#4169E1">break</font>;
-<a name="line368">368: </a>    <font color="#4169E1">case</font> EPS_ERROR_BACKWARD:
-<a name="line369">369: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    eta(x,k)"</font>);
-<a name="line370">370: </a>      <font color="#4169E1">break</font>;
-<a name="line371">371: </a>  }
-<a name="line372">372: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s            k             %s\n%s"</font>,sep,ex,sep);
-<a name="line373">373: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line374">374: </a>    <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,&kr,&ki,NULL,NULL);
-<a name="line375">375: </a>    <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,etype,&error);
-<a name="line376">376: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line377">377: </a>    re = PetscRealPart(kr);
-<a name="line378">378: </a>    im = PetscImaginaryPart(kr);
-<a name="line379">379: </a><font color="#A020F0">#else</font>
-<a name="line380">380: </a>    re = kr;
-<a name="line381">381: </a>    im = ki;
-<a name="line382">382: </a><font color="#A020F0">#endif</font>
-<a name="line383">383: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line384">384: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  % 9f%+9fi      %12g\n"</font>,(double)re,(double)im,(double)error);
-<a name="line385">385: </a>    } <font color="#4169E1">else</font> {
-<a name="line386">386: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"    % 12f           %12g\n"</font>,(double)re,(double)error);
-<a name="line387">387: </a>    }
-<a name="line388">388: </a>  }
-<a name="line389">389: </a>  PetscViewerASCIIPrintf(viewer,sep);
-<a name="line390">390: </a>  <font color="#4169E1">return</font>(0);
-<a name="line391">391: </a>}
-
-<a name="line395">395: </a><strong><font color="#4169E1"><a name="EPSErrorView_MATLAB"></a>static PetscErrorCode EPSErrorView_MATLAB(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line396">396: </a>{
-<a name="line398">398: </a>  PetscReal      error;
-<a name="line399">399: </a>  PetscInt       i;
-<a name="line400">400: </a>  const char     *name;
-
-<a name="line403">403: </a>  PetscObjectGetName((PetscObject)eps,&name);
-<a name="line404">404: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
-<a name="line405">405: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line406">406: </a>    <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,etype,&error);
-<a name="line407">407: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
-<a name="line408">408: </a>  }
-<a name="line409">409: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
-<a name="line411">411: </a>}
-
-<a name="line415">415: </a><font color="#B22222">/*@C</font>
-<a name="line416">416: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a> - Displays the errors associated with the computed solution</font>
-<a name="line417">417: </a><font color="#B22222">   (as well as the eigenvalues).</font>
-
-<a name="line419">419: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line421">421: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line422">422: </a><font color="#B22222">+  eps    - the eigensolver context</font>
-<a name="line423">423: </a><font color="#B22222">.  etype  - error type</font>
-<a name="line424">424: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line426">426: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line427">427: </a><font color="#B22222">+  -eps_error_absolute - print absolute errors of each eigenpair</font>
-<a name="line428">428: </a><font color="#B22222">.  -eps_error_relative - print relative errors of each eigenpair</font>
-<a name="line429">429: </a><font color="#B22222">-  -eps_error_backward - print backward errors of each eigenpair</font>
-
-<a name="line431">431: </a><font color="#B22222">   Notes:</font>
-<a name="line432">432: </a><font color="#B22222">   By default, this function checks the error of all eigenpairs and prints</font>
-<a name="line433">433: </a><font color="#B22222">   the eigenvalues if all of them are below the requested tolerance.</font>
-<a name="line434">434: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
-<a name="line435">435: </a><font color="#B22222">   eigenvalues and corresponding errors is printed.</font>
-
-<a name="line437">437: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line439">439: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(), <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>()</font>
-<a name="line440">440: </a><font color="#B22222">@*/</font>
-<a name="line441">441: </a><strong><font color="#4169E1"><a name="EPSErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line442">442: </a>{
-<a name="line443">443: </a>  PetscBool         isascii;
-<a name="line444">444: </a>  PetscViewerFormat format;
-<a name="line445">445: </a>  PetscErrorCode    ierr;
-
-<a name="line449">449: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
-<a name="line452">452: </a>  EPSCheckSolved(eps,1);
-<a name="line453">453: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line454">454: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
-
-<a name="line456">456: </a>  PetscViewerGetFormat(viewer,&format);
-<a name="line457">457: </a>  <font color="#4169E1">switch</font> (format) {
-<a name="line458">458: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line459">459: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line460">460: </a>      EPSErrorView_ASCII(eps,etype,viewer);
-<a name="line461">461: </a>      <font color="#4169E1">break</font>;
-<a name="line462">462: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line463">463: </a>      EPSErrorView_DETAIL(eps,etype,viewer);
-<a name="line464">464: </a>      <font color="#4169E1">break</font>;
-<a name="line465">465: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line466">466: </a>      EPSErrorView_MATLAB(eps,etype,viewer);
-<a name="line467">467: </a>      <font color="#4169E1">break</font>;
-<a name="line468">468: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line469">469: </a>      PetscInfo1(eps,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line470">470: </a>  }
-<a name="line471">471: </a>  <font color="#4169E1">return</font>(0);
-<a name="line472">472: </a>}
-
-<a name="line476">476: </a><font color="#B22222">/*@</font>
-<a name="line477">477: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line478">478: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
-
-<a name="line480">480: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line482">482: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line483">483: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line485">485: </a><font color="#B22222">   Level: developer</font>
-<a name="line486">486: </a><font color="#B22222">@*/</font>
-<a name="line487">487: </a><strong><font color="#4169E1"><a name="EPSErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line488">488: </a>{
-<a name="line489">489: </a>  PetscErrorCode    ierr;
-<a name="line490">490: </a>  PetscViewer       viewer;
-<a name="line491">491: </a>  PetscBool         flg;
-<a name="line492">492: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line493">493: </a>  PetscViewerFormat format;
-
-<a name="line496">496: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line497">497: </a>  incall = PETSC_TRUE;
-<a name="line498">498: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_error_absolute"</font>,&viewer,&format,&flg);
-<a name="line499">499: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line500">500: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line501">501: </a>    <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_ABSOLUTE,viewer);
-<a name="line502">502: </a>    PetscViewerPopFormat(viewer);
-<a name="line503">503: </a>    PetscViewerDestroy(&viewer);
-<a name="line504">504: </a>  }
-<a name="line505">505: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_error_relative"</font>,&viewer,&format,&flg);
-<a name="line506">506: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line507">507: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line508">508: </a>    <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,viewer);
-<a name="line509">509: </a>    PetscViewerPopFormat(viewer);
-<a name="line510">510: </a>    PetscViewerDestroy(&viewer);
-<a name="line511">511: </a>  }
-<a name="line512">512: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_error_backward"</font>,&viewer,&format,&flg);
-<a name="line513">513: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line514">514: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line515">515: </a>    <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_BACKWARD,viewer);
-<a name="line516">516: </a>    PetscViewerPopFormat(viewer);
-<a name="line517">517: </a>    PetscViewerDestroy(&viewer);
-<a name="line518">518: </a>  }
-<a name="line519">519: </a>  incall = PETSC_FALSE;
-<a name="line520">520: </a>  <font color="#4169E1">return</font>(0);
-<a name="line521">521: </a>}
-
-<a name="line525">525: </a><strong><font color="#4169E1"><a name="EPSValuesView_DRAW"></a>static PetscErrorCode EPSValuesView_DRAW(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line526">526: </a>{
-<a name="line528">528: </a>  PetscDraw      draw;
-<a name="line529">529: </a>  PetscDrawSP    drawsp;
-<a name="line530">530: </a>  PetscReal      re,im;
-<a name="line531">531: </a>  PetscInt       i,k;
-
-<a name="line534">534: </a>  <font color="#4169E1">if</font> (!eps->nconv) <font color="#4169E1">return</font>(0);
-<a name="line535">535: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed Eigenvalues"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
-<a name="line536">536: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line537">537: </a>  PetscDrawSPCreate(draw,1,&drawsp);
-<a name="line538">538: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line539">539: </a>    k = eps->perm[i];
-<a name="line540">540: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line541">541: </a>    re = PetscRealPart(eps->eigr[k]);
-<a name="line542">542: </a>    im = PetscImaginaryPart(eps->eigr[k]);
-<a name="line543">543: </a><font color="#A020F0">#else</font>
-<a name="line544">544: </a>    re = eps->eigr[k];
-<a name="line545">545: </a>    im = eps->eigi[k];
-<a name="line546">546: </a><font color="#A020F0">#endif</font>
-<a name="line547">547: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
-<a name="line548">548: </a>  }
-<a name="line549">549: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
-<a name="line550">550: </a>  PetscDrawSPDestroy(&drawsp);
-<a name="line551">551: </a>  PetscViewerDestroy(&viewer);
-<a name="line552">552: </a>  <font color="#4169E1">return</font>(0);
-<a name="line553">553: </a>}
-
-<a name="line557">557: </a><strong><font color="#4169E1"><a name="EPSValuesView_ASCII"></a>static PetscErrorCode EPSValuesView_ASCII(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line558">558: </a>{
-<a name="line559">559: </a>  PetscReal      re,im;
-<a name="line560">560: </a>  PetscInt       i,k;
-
-<a name="line564">564: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigenvalues = \n"</font>);
-<a name="line565">565: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line566">566: </a>    k = eps->perm[i];
-<a name="line567">567: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line568">568: </a>    re = PetscRealPart(eps->eigr[k]);
-<a name="line569">569: </a>    im = PetscImaginaryPart(eps->eigr[k]);
-<a name="line570">570: </a><font color="#A020F0">#else</font>
-<a name="line571">571: </a>    re = eps->eigr[k];
-<a name="line572">572: </a>    im = eps->eigi[k];
-<a name="line573">573: </a><font color="#A020F0">#endif</font>
-<a name="line574">574: </a>    <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
-<a name="line575">575: </a>    <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
-<a name="line576">576: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line577">577: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f%+.5fi\n"</font>,(double)re,(double)im);
-<a name="line578">578: </a>    } <font color="#4169E1">else</font> {
-<a name="line579">579: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)re);
-<a name="line580">580: </a>    }
-<a name="line581">581: </a>  }
-<a name="line582">582: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line583">583: </a>  <font color="#4169E1">return</font>(0);
-<a name="line584">584: </a>}
-
-<a name="line588">588: </a><strong><font color="#4169E1"><a name="EPSValuesView_MATLAB"></a>static PetscErrorCode EPSValuesView_MATLAB(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line589">589: </a>{
-<a name="line591">591: </a>  PetscInt       i,k;
-<a name="line592">592: </a>  PetscReal      re,im;
-<a name="line593">593: </a>  const char     *name;
-
-<a name="line596">596: </a>  PetscObjectGetName((PetscObject)eps,&name);
-<a name="line597">597: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Lambda_%s = [\n"</font>,name);
-<a name="line598">598: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line599">599: </a>    k = eps->perm[i];
-<a name="line600">600: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line601">601: </a>    re = PetscRealPart(eps->eigr[k]);
-<a name="line602">602: </a>    im = PetscImaginaryPart(eps->eigr[k]);
-<a name="line603">603: </a><font color="#A020F0">#else</font>
-<a name="line604">604: </a>    re = eps->eigr[k];
-<a name="line605">605: </a>    im = eps->eigi[k];
-<a name="line606">606: </a><font color="#A020F0">#endif</font>
-<a name="line607">607: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line608">608: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei\n"</font>,(double)re,(double)im);
-<a name="line609">609: </a>    } <font color="#4169E1">else</font> {
-<a name="line610">610: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)re);
-<a name="line611">611: </a>    }
-<a name="line612">612: </a>  }
-<a name="line613">613: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line614">614: </a>  <font color="#4169E1">return</font>(0);
-<a name="line615">615: </a>}
-
-<a name="line619">619: </a><font color="#B22222">/*@C</font>
-<a name="line620">620: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a> - Displays the computed eigenvalues in a viewer.</font>
-
-<a name="line622">622: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line624">624: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line625">625: </a><font color="#B22222">+  eps    - the eigensolver context</font>
-<a name="line626">626: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line628">628: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line629">629: </a><font color="#B22222">.  -eps_view_values - print computed eigenvalues</font>
-
-<a name="line631">631: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line633">633: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(), <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>()</font>
-<a name="line634">634: </a><font color="#B22222">@*/</font>
-<a name="line635">635: </a><strong><font color="#4169E1"><a name="EPSValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line636">636: </a>{
-<a name="line637">637: </a>  PetscBool         isascii,isdraw;
-<a name="line638">638: </a>  PetscViewerFormat format;
-<a name="line639">639: </a>  PetscErrorCode    ierr;
-
-<a name="line643">643: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
-<a name="line646">646: </a>  EPSCheckSolved(eps,1);
-<a name="line647">647: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
-<a name="line648">648: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line649">649: </a>  <font color="#4169E1">if</font> (isdraw) {
-<a name="line650">650: </a>    EPSValuesView_DRAW(eps,viewer);
-<a name="line651">651: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
-<a name="line652">652: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line653">653: </a>    <font color="#4169E1">switch</font> (format) {
-<a name="line654">654: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line655">655: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line656">656: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line657">657: </a>        EPSValuesView_ASCII(eps,viewer);
-<a name="line658">658: </a>        <font color="#4169E1">break</font>;
-<a name="line659">659: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line660">660: </a>        EPSValuesView_MATLAB(eps,viewer);
-<a name="line661">661: </a>        <font color="#4169E1">break</font>;
-<a name="line662">662: </a><strong><font color="#FF0000">      default:</font></strong>
-<a name="line663">663: </a>        PetscInfo1(eps,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line664">664: </a>    }
-<a name="line665">665: </a>  }
-<a name="line666">666: </a>  <font color="#4169E1">return</font>(0);
-<a name="line667">667: </a>}
-
-<a name="line671">671: </a><font color="#B22222">/*@</font>
-<a name="line672">672: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line673">673: </a><font color="#B22222">   the computed eigenvalues are to be viewed. </font>
-
-<a name="line675">675: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line677">677: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line678">678: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line680">680: </a><font color="#B22222">   Level: developer</font>
-<a name="line681">681: </a><font color="#B22222">@*/</font>
-<a name="line682">682: </a><strong><font color="#4169E1"><a name="EPSValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line683">683: </a>{
-<a name="line684">684: </a>  PetscErrorCode    ierr;
-<a name="line685">685: </a>  PetscViewer       viewer;
-<a name="line686">686: </a>  PetscBool         flg;
-<a name="line687">687: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line688">688: </a>  PetscViewerFormat format;
-
-<a name="line691">691: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line692">692: </a>  incall = PETSC_TRUE;
-<a name="line693">693: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_view_values"</font>,&viewer,&format,&flg);
-<a name="line694">694: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line695">695: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line696">696: </a>    <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(eps,viewer);
-<a name="line697">697: </a>    PetscViewerPopFormat(viewer);
-<a name="line698">698: </a>    PetscViewerDestroy(&viewer);
-<a name="line699">699: </a>  }
-<a name="line700">700: </a>  incall = PETSC_FALSE;
-<a name="line701">701: </a>  <font color="#4169E1">return</font>(0);
-<a name="line702">702: </a>}
-
-<a name="line706">706: </a><font color="#B22222">/*@C</font>
-<a name="line707">707: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a> - Outputs computed eigenvectors to a viewer.</font>
-
-<a name="line709">709: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line711">711: </a><font color="#B22222">   Parameter:</font>
-<a name="line712">712: </a><font color="#B22222">+  eps    - the eigensolver context</font>
-<a name="line713">713: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line715">715: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line716">716: </a><font color="#B22222">.  -eps_view_vectors - output eigenvectors.</font>
-
-<a name="line718">718: </a><font color="#B22222">   Note:</font>
-<a name="line719">719: </a><font color="#B22222">   If PETSc was configured with real scalars, complex conjugate eigenvectors</font>
-<a name="line720">720: </a><font color="#B22222">   will be viewed as two separate real vectors, one containing the real part</font>
-<a name="line721">721: </a><font color="#B22222">   and another one containing the imaginary part.</font>
-
-<a name="line723">723: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line725">725: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(), <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>()</font>
-<a name="line726">726: </a><font color="#B22222">@*/</font>
-<a name="line727">727: </a><strong><font color="#4169E1"><a name="EPSVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
-<a name="line728">728: </a>{
-<a name="line730">730: </a>  PetscInt       i,k;
-<a name="line731">731: </a>  Vec            x;
-<a name="line732">732: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
-<a name="line733">733: </a>  char           vname[NMLEN];
-<a name="line734">734: </a>  const char     *ename;
-
-<a name="line738">738: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
-<a name="line741">741: </a>  EPSCheckSolved(eps,1);
-<a name="line742">742: </a>  <font color="#4169E1">if</font> (eps->nconv) {
-<a name="line743">743: </a>    PetscObjectGetName((PetscObject)eps,&ename);
-<a name="line744">744: </a>    EPSComputeVectors(eps);
-<a name="line745">745: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
-<a name="line746">746: </a>      k = eps->perm[i];
-<a name="line747">747: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,i,ename);
-<a name="line748">748: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,k,&x);
-<a name="line749">749: </a>      PetscObjectSetName((PetscObject)x,vname);
-<a name="line750">750: </a>      VecView(x,viewer);
-<a name="line751">751: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,k,&x);
-<a name="line752">752: </a>    }
-<a name="line753">753: </a>  }
-<a name="line754">754: </a>  <font color="#4169E1">return</font>(0);
-<a name="line755">755: </a>}
-
-<a name="line759">759: </a><font color="#B22222">/*@</font>
-<a name="line760">760: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line761">761: </a><font color="#B22222">   the computed eigenvectors are to be viewed. </font>
-
-<a name="line763">763: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line765">765: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line766">766: </a><font color="#B22222">.  eps - the eigensolver context</font>
-
-<a name="line768">768: </a><font color="#B22222">   Level: developer</font>
-<a name="line769">769: </a><font color="#B22222">@*/</font>
-<a name="line770">770: </a><strong><font color="#4169E1"><a name="EPSVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line771">771: </a>{
-<a name="line772">772: </a>  PetscErrorCode    ierr;
-<a name="line773">773: </a>  PetscViewer       viewer;
-<a name="line774">774: </a>  PetscBool         flg = PETSC_FALSE;
-<a name="line775">775: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line776">776: </a>  PetscViewerFormat format;
-
-<a name="line779">779: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line780">780: </a>  incall = PETSC_TRUE;
-<a name="line781">781: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_view_vectors"</font>,&viewer,&format,&flg);
-<a name="line782">782: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line783">783: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line784">784: </a>    <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(eps,viewer);
-<a name="line785">785: </a>    PetscViewerPopFormat(viewer);
-<a name="line786">786: </a>    PetscViewerDestroy(&viewer);
-<a name="line787">787: </a>  }
-<a name="line788">788: </a>  incall = PETSC_FALSE;
-<a name="line789">789: </a>  <font color="#4169E1">return</font>(0);
-<a name="line790">790: </a>}
+<a name="line214">214: </a>  }
+<a name="line215">215: </a>  PetscObjectTypeCompareAny((PetscObject)eps,&isexternal,EPSARPACK,EPSBLZPACK,EPSTRLAN,EPSBLOPEX,EPSPRIMME,<font color="#666666">""</font>);
+<a name="line216">216: </a>  <font color="#4169E1">if</font> (!isexternal) {
+<a name="line217">217: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
+<a name="line218">218: </a>    <font color="#4169E1">if</font> (!eps->V) { <a href="../../../docs/manualpages/EPS/EPSGetBV.html#EPSGetBV">EPSGetBV</a>(eps,&eps->V); }
+<a name="line219">219: </a>    <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(eps->V,viewer);
+<a name="line220">220: </a>    <font color="#4169E1">if</font> (eps->rg) {
+<a name="line221">221: </a>      <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(eps->rg,&istrivial);
+<a name="line222">222: </a>      <font color="#4169E1">if</font> (!istrivial) { <a href="../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(eps->rg,viewer); }
+<a name="line223">223: </a>    }
+<a name="line224">224: </a>    PetscObjectTypeCompare((PetscObject)eps,EPSPOWER,&ispower);
+<a name="line225">225: </a>    <font color="#4169E1">if</font> (!ispower) {
+<a name="line226">226: </a>      <font color="#4169E1">if</font> (!eps->ds) { <a href="../../../docs/manualpages/EPS/EPSGetDS.html#EPSGetDS">EPSGetDS</a>(eps,&eps->ds); }
+<a name="line227">227: </a>      <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(eps->ds,viewer);
+<a name="line228">228: </a>    }
+<a name="line229">229: </a>    PetscViewerPopFormat(viewer);
+<a name="line230">230: </a>  }
+<a name="line231">231: </a>  <font color="#4169E1">if</font> (!eps->st) { <a href="../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&eps->st); }
+<a name="line232">232: </a>  <a href="../../../docs/manualpages/ST/STView.html#STView">STView</a>(eps->st,viewer);
+<a name="line233">233: </a>  <font color="#4169E1">return</font>(0);
+<a name="line234">234: </a>}
+
+<a name="line238">238: </a><font color="#B22222">/*@C</font>
+<a name="line239">239: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a> - Displays the reason an <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> solve converged or diverged.</font>
+
+<a name="line241">241: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line243">243: </a><font color="#B22222">   Parameter:</font>
+<a name="line244">244: </a><font color="#B22222">+  eps - the eigensolver context</font>
+<a name="line245">245: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
+
+<a name="line247">247: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line248">248: </a><font color="#B22222">.  -eps_converged_reason - print reason for convergence, and number of iterations</font>
+
+<a name="line250">250: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line252">252: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(), <a href="../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(), <a href="../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>()</font>
+<a name="line253">253: </a><font color="#B22222">@*/</font>
+<a name="line254">254: </a><strong><font color="#4169E1"><a name="EPSReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line255">255: </a>{
+<a name="line257">257: </a>  PetscBool      isAscii;
+
+<a name="line260">260: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
+<a name="line261">261: </a>  <font color="#4169E1">if</font> (isAscii) {
+<a name="line262">262: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line263">263: </a>    <font color="#4169E1">if</font> (eps->reason > 0) {
+<a name="line264">264: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Linear eigensolve converged (%D eigenpair%s) due to %s; iterations %D\n"</font>,((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:<font color="#666666">""</font>,eps->nconv,(eps->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,EPSConvergedReasons[eps->reason],eps->its);
+<a name="line265">265: </a>    } <font color="#4169E1">else</font> {
+<a name="line266">266: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Linear eigensolve did not converge due to %s; iterations %D\n"</font>,((PetscObject)eps)->prefix?((PetscObject)eps)->prefix:<font color="#666666">""</font>,EPSConvergedReasons[eps->reason],eps->its);
+<a name="line267">267: </a>    }
+<a name="line268">268: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)eps)->tablevel);
+<a name="line269">269: </a>  }
+<a name="line270">270: </a>  <font color="#4169E1">return</font>(0);
+<a name="line271">271: </a>}
+
+<a name="line275">275: </a><font color="#B22222">/*@</font>
+<a name="line276">276: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line277">277: </a><font color="#B22222">   the <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> converged reason is to be viewed. </font>
+
+<a name="line279">279: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line281">281: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line282">282: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line284">284: </a><font color="#B22222">   Level: developer</font>
+<a name="line285">285: </a><font color="#B22222">@*/</font>
+<a name="line286">286: </a><strong><font color="#4169E1"><a name="EPSReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSReasonViewFromOptions.html#EPSReasonViewFromOptions">EPSReasonViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line287">287: </a>{
+<a name="line288">288: </a>  PetscErrorCode    ierr;
+<a name="line289">289: </a>  PetscViewer       viewer;
+<a name="line290">290: </a>  PetscBool         flg;
+<a name="line291">291: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line292">292: </a>  PetscViewerFormat format;
+
+<a name="line295">295: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line296">296: </a>  incall = PETSC_TRUE;
+<a name="line297">297: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_converged_reason"</font>,&viewer,&format,&flg);
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line299">299: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line300">300: </a>    <a href="../../../docs/manualpages/EPS/EPSReasonView.html#EPSReasonView">EPSReasonView</a>(eps,viewer);
+<a name="line301">301: </a>    PetscViewerPopFormat(viewer);
+<a name="line302">302: </a>    PetscViewerDestroy(&viewer);
+<a name="line303">303: </a>  }
+<a name="line304">304: </a>  incall = PETSC_FALSE;
+<a name="line305">305: </a>  <font color="#4169E1">return</font>(0);
+<a name="line306">306: </a>}
+
+<a name="line310">310: </a><strong><font color="#4169E1"><a name="EPSErrorView_ASCII"></a>static PetscErrorCode EPSErrorView_ASCII(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line311">311: </a>{
+<a name="line312">312: </a>  PetscBool      errok;
+<a name="line313">313: </a>  PetscReal      error,re,im;
+<a name="line314">314: </a>  PetscScalar    kr,ki;
+<a name="line315">315: </a>  PetscInt       i,j,nvals;
+
+<a name="line319">319: </a>  <font color="#4169E1">if</font> (eps->which!=EPS_ALL && eps->nconv<eps->nev) {
+<a name="line320">320: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D eigenvalues converged\n\n"</font>,eps->nev);
+<a name="line321">321: </a>    <font color="#4169E1">return</font>(0);
+<a name="line322">322: </a>  }
+<a name="line323">323: </a>  errok = PETSC_TRUE;
+<a name="line324">324: </a>  nvals = (eps->which==EPS_ALL)? eps->nconv: eps->nev;
+<a name="line325">325: </a>  <font color="#4169E1">for</font> (i=0;i<nvals;i++) {
+<a name="line326">326: </a>    <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,etype,&error);
+<a name="line327">327: </a>    errok = (errok && error<5.0*eps->tol)? PETSC_TRUE: PETSC_FALSE;
+<a name="line328">328: </a>  }
+<a name="line329">329: </a>  <font color="#4169E1">if</font> (!errok) {
+<a name="line330">330: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,nvals);
+<a name="line331">331: </a>    <font color="#4169E1">return</font>(0);
+<a name="line332">332: </a>  }
+<a name="line333">333: </a>  <font color="#4169E1">if</font> (eps->which==EPS_ALL) {
+<a name="line334">334: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Found %D eigenvalues, all of them computed up to the required tolerance:"</font>,nvals);
+<a name="line335">335: </a>  } <font color="#4169E1">else</font> {
+<a name="line336">336: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested eigenvalues computed up to the required tolerance:"</font>);
+<a name="line337">337: </a>  }
+<a name="line338">338: </a>  <font color="#4169E1">for</font> (i=0;i<=(nvals-1)/8;i++) {
+<a name="line339">339: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
+<a name="line340">340: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,nvals-8*i);j++) {
+<a name="line341">341: </a>      <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,8*i+j,&kr,&ki,NULL,NULL);
+<a name="line342">342: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line343">343: </a>      re = PetscRealPart(kr);
+<a name="line344">344: </a>      im = PetscImaginaryPart(kr);
+<a name="line345">345: </a><font color="#A020F0">#else</font>
+<a name="line346">346: </a>      re = kr;
+<a name="line347">347: </a>      im = ki;
+<a name="line348">348: </a><font color="#A020F0">#endif</font>
+<a name="line349">349: </a>      <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
+<a name="line350">350: </a>      <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
+<a name="line351">351: </a>      <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line352">352: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f%+.5fi"</font>,(double)re,(double)im);
+<a name="line353">353: </a>      } <font color="#4169E1">else</font> {
+<a name="line354">354: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)re);
+<a name="line355">355: </a>      }
+<a name="line356">356: </a>      <font color="#4169E1">if</font> (8*i+j+1<nvals) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
+<a name="line357">357: </a>    }
+<a name="line358">358: </a>  }
+<a name="line359">359: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
+<a name="line360">360: </a>  <font color="#4169E1">return</font>(0);
+<a name="line361">361: </a>}
+
+<a name="line365">365: </a><strong><font color="#4169E1"><a name="EPSErrorView_DETAIL"></a>static PetscErrorCode EPSErrorView_DETAIL(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line366">366: </a>{
+<a name="line368">368: </a>  PetscReal      error,re,im;
+<a name="line369">369: </a>  PetscScalar    kr,ki;
+<a name="line370">370: </a>  PetscInt       i;
+<a name="line371">371: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
+<a name="line372">372: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
+
+<a name="line375">375: </a>  <font color="#4169E1">if</font> (!eps->nconv) <font color="#4169E1">return</font>(0);
+<a name="line376">376: </a>  <font color="#4169E1">switch</font> (etype) {
+<a name="line377">377: </a>    <font color="#4169E1">case</font> EPS_ERROR_ABSOLUTE:
+<a name="line378">378: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"   ||Ax-k%sx||"</font>,eps->isgeneralized?<font color="#666666">"B"</font>:<font color="#666666">""</font>);
+<a name="line379">379: </a>      <font color="#4169E1">break</font>;
+<a name="line380">380: </a>    <font color="#4169E1">case</font> EPS_ERROR_RELATIVE:
+<a name="line381">381: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"||Ax-k%sx||/||kx||"</font>,eps->isgeneralized?<font color="#666666">"B"</font>:<font color="#666666">""</font>);
+<a name="line382">382: </a>      <font color="#4169E1">break</font>;
+<a name="line383">383: </a>    <font color="#4169E1">case</font> EPS_ERROR_BACKWARD:
+<a name="line384">384: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    eta(x,k)"</font>);
+<a name="line385">385: </a>      <font color="#4169E1">break</font>;
+<a name="line386">386: </a>  }
+<a name="line387">387: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s            k             %s\n%s"</font>,sep,ex,sep);
+<a name="line388">388: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line389">389: </a>    <a href="../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,&kr,&ki,NULL,NULL);
+<a name="line390">390: </a>    <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,etype,&error);
+<a name="line391">391: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line392">392: </a>    re = PetscRealPart(kr);
+<a name="line393">393: </a>    im = PetscImaginaryPart(kr);
+<a name="line394">394: </a><font color="#A020F0">#else</font>
+<a name="line395">395: </a>    re = kr;
+<a name="line396">396: </a>    im = ki;
+<a name="line397">397: </a><font color="#A020F0">#endif</font>
+<a name="line398">398: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line399">399: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  % 9f%+9fi      %12g\n"</font>,(double)re,(double)im,(double)error);
+<a name="line400">400: </a>    } <font color="#4169E1">else</font> {
+<a name="line401">401: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"    % 12f           %12g\n"</font>,(double)re,(double)error);
+<a name="line402">402: </a>    }
+<a name="line403">403: </a>  }
+<a name="line404">404: </a>  PetscViewerASCIIPrintf(viewer,sep);
+<a name="line405">405: </a>  <font color="#4169E1">return</font>(0);
+<a name="line406">406: </a>}
+
+<a name="line410">410: </a><strong><font color="#4169E1"><a name="EPSErrorView_MATLAB"></a>static PetscErrorCode EPSErrorView_MATLAB(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line411">411: </a>{
+<a name="line413">413: </a>  PetscReal      error;
+<a name="line414">414: </a>  PetscInt       i;
+<a name="line415">415: </a>  const char     *name;
+
+<a name="line418">418: </a>  PetscObjectGetName((PetscObject)eps,&name);
+<a name="line419">419: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
+<a name="line420">420: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line421">421: </a>    <a href="../../../docs/manualpages/EPS/EPSComputeError.html#EPSComputeError">EPSComputeError</a>(eps,i,etype,&error);
+<a name="line422">422: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
+<a name="line423">423: </a>  }
+<a name="line424">424: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
+<a name="line426">426: </a>}
+
+<a name="line430">430: </a><font color="#B22222">/*@C</font>
+<a name="line431">431: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a> - Displays the errors associated with the computed solution</font>
+<a name="line432">432: </a><font color="#B22222">   (as well as the eigenvalues).</font>
+
+<a name="line434">434: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line436">436: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line437">437: </a><font color="#B22222">+  eps    - the eigensolver context</font>
+<a name="line438">438: </a><font color="#B22222">.  etype  - error type</font>
+<a name="line439">439: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line441">441: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line442">442: </a><font color="#B22222">+  -eps_error_absolute - print absolute errors of each eigenpair</font>
+<a name="line443">443: </a><font color="#B22222">.  -eps_error_relative - print relative errors of each eigenpair</font>
+<a name="line444">444: </a><font color="#B22222">-  -eps_error_backward - print backward errors of each eigenpair</font>
+
+<a name="line446">446: </a><font color="#B22222">   Notes:</font>
+<a name="line447">447: </a><font color="#B22222">   By default, this function checks the error of all eigenpairs and prints</font>
+<a name="line448">448: </a><font color="#B22222">   the eigenvalues if all of them are below the requested tolerance.</font>
+<a name="line449">449: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
+<a name="line450">450: </a><font color="#B22222">   eigenvalues and corresponding errors is printed.</font>
+
+<a name="line452">452: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line454">454: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(), <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>()</font>
+<a name="line455">455: </a><font color="#B22222">@*/</font>
+<a name="line456">456: </a><strong><font color="#4169E1"><a name="EPSErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,<a href="../../../docs/manualpages/EPS/EPSErrorType.html#EPSErrorType">EPSErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line457">457: </a>{
+<a name="line458">458: </a>  PetscBool         isascii;
+<a name="line459">459: </a>  PetscViewerFormat format;
+<a name="line460">460: </a>  PetscErrorCode    ierr;
+
+<a name="line464">464: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
+<a name="line467">467: </a>  EPSCheckSolved(eps,1);
+<a name="line468">468: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line469">469: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
+
+<a name="line471">471: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line472">472: </a>  <font color="#4169E1">switch</font> (format) {
+<a name="line473">473: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line474">474: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line475">475: </a>      EPSErrorView_ASCII(eps,etype,viewer);
+<a name="line476">476: </a>      <font color="#4169E1">break</font>;
+<a name="line477">477: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line478">478: </a>      EPSErrorView_DETAIL(eps,etype,viewer);
+<a name="line479">479: </a>      <font color="#4169E1">break</font>;
+<a name="line480">480: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line481">481: </a>      EPSErrorView_MATLAB(eps,etype,viewer);
+<a name="line482">482: </a>      <font color="#4169E1">break</font>;
+<a name="line483">483: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line484">484: </a>      PetscInfo1(eps,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line485">485: </a>  }
+<a name="line486">486: </a>  <font color="#4169E1">return</font>(0);
+<a name="line487">487: </a>}
+
+<a name="line491">491: </a><font color="#B22222">/*@</font>
+<a name="line492">492: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line493">493: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
+
+<a name="line495">495: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line497">497: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line498">498: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line500">500: </a><font color="#B22222">   Level: developer</font>
+<a name="line501">501: </a><font color="#B22222">@*/</font>
+<a name="line502">502: </a><strong><font color="#4169E1"><a name="EPSErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSErrorViewFromOptions.html#EPSErrorViewFromOptions">EPSErrorViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line503">503: </a>{
+<a name="line504">504: </a>  PetscErrorCode    ierr;
+<a name="line505">505: </a>  PetscViewer       viewer;
+<a name="line506">506: </a>  PetscBool         flg;
+<a name="line507">507: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line508">508: </a>  PetscViewerFormat format;
+
+<a name="line511">511: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line512">512: </a>  incall = PETSC_TRUE;
+<a name="line513">513: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_error_absolute"</font>,&viewer,&format,&flg);
+<a name="line514">514: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line515">515: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line516">516: </a>    <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_ABSOLUTE,viewer);
+<a name="line517">517: </a>    PetscViewerPopFormat(viewer);
+<a name="line518">518: </a>    PetscViewerDestroy(&viewer);
+<a name="line519">519: </a>  }
+<a name="line520">520: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_error_relative"</font>,&viewer,&format,&flg);
+<a name="line521">521: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line522">522: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line523">523: </a>    <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_RELATIVE,viewer);
+<a name="line524">524: </a>    PetscViewerPopFormat(viewer);
+<a name="line525">525: </a>    PetscViewerDestroy(&viewer);
+<a name="line526">526: </a>  }
+<a name="line527">527: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_error_backward"</font>,&viewer,&format,&flg);
+<a name="line528">528: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line529">529: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line530">530: </a>    <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>(eps,EPS_ERROR_BACKWARD,viewer);
+<a name="line531">531: </a>    PetscViewerPopFormat(viewer);
+<a name="line532">532: </a>    PetscViewerDestroy(&viewer);
+<a name="line533">533: </a>  }
+<a name="line534">534: </a>  incall = PETSC_FALSE;
+<a name="line535">535: </a>  <font color="#4169E1">return</font>(0);
+<a name="line536">536: </a>}
+
+<a name="line540">540: </a><strong><font color="#4169E1"><a name="EPSValuesView_DRAW"></a>static PetscErrorCode EPSValuesView_DRAW(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line541">541: </a>{
+<a name="line543">543: </a>  PetscDraw      draw;
+<a name="line544">544: </a>  PetscDrawSP    drawsp;
+<a name="line545">545: </a>  PetscReal      re,im;
+<a name="line546">546: </a>  PetscInt       i,k;
+
+<a name="line549">549: </a>  <font color="#4169E1">if</font> (!eps->nconv) <font color="#4169E1">return</font>(0);
+<a name="line550">550: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed Eigenvalues"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
+<a name="line551">551: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
+<a name="line552">552: </a>  PetscDrawSPCreate(draw,1,&drawsp);
+<a name="line553">553: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line554">554: </a>    k = eps->perm[i];
+<a name="line555">555: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line556">556: </a>    re = PetscRealPart(eps->eigr[k]);
+<a name="line557">557: </a>    im = PetscImaginaryPart(eps->eigr[k]);
+<a name="line558">558: </a><font color="#A020F0">#else</font>
+<a name="line559">559: </a>    re = eps->eigr[k];
+<a name="line560">560: </a>    im = eps->eigi[k];
+<a name="line561">561: </a><font color="#A020F0">#endif</font>
+<a name="line562">562: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
+<a name="line563">563: </a>  }
+<a name="line564">564: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
+<a name="line565">565: </a>  PetscDrawSPSave(drawsp);
+<a name="line566">566: </a>  PetscDrawSPDestroy(&drawsp);
+<a name="line567">567: </a>  PetscViewerDestroy(&viewer);
+<a name="line568">568: </a>  <font color="#4169E1">return</font>(0);
+<a name="line569">569: </a>}
+
+<a name="line573">573: </a><strong><font color="#4169E1"><a name="EPSValuesView_ASCII"></a>static PetscErrorCode EPSValuesView_ASCII(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line574">574: </a>{
+<a name="line575">575: </a>  PetscReal      re,im;
+<a name="line576">576: </a>  PetscInt       i,k;
+
+<a name="line580">580: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigenvalues = \n"</font>);
+<a name="line581">581: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line582">582: </a>    k = eps->perm[i];
+<a name="line583">583: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line584">584: </a>    re = PetscRealPart(eps->eigr[k]);
+<a name="line585">585: </a>    im = PetscImaginaryPart(eps->eigr[k]);
+<a name="line586">586: </a><font color="#A020F0">#else</font>
+<a name="line587">587: </a>    re = eps->eigr[k];
+<a name="line588">588: </a>    im = eps->eigi[k];
+<a name="line589">589: </a><font color="#A020F0">#endif</font>
+<a name="line590">590: </a>    <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
+<a name="line591">591: </a>    <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
+<a name="line592">592: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line593">593: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f%+.5fi\n"</font>,(double)re,(double)im);
+<a name="line594">594: </a>    } <font color="#4169E1">else</font> {
+<a name="line595">595: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)re);
+<a name="line596">596: </a>    }
+<a name="line597">597: </a>  }
+<a name="line598">598: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line599">599: </a>  <font color="#4169E1">return</font>(0);
+<a name="line600">600: </a>}
+
+<a name="line604">604: </a><strong><font color="#4169E1"><a name="EPSValuesView_MATLAB"></a>static PetscErrorCode EPSValuesView_MATLAB(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line605">605: </a>{
+<a name="line607">607: </a>  PetscInt       i,k;
+<a name="line608">608: </a>  PetscReal      re,im;
+<a name="line609">609: </a>  const char     *name;
+
+<a name="line612">612: </a>  PetscObjectGetName((PetscObject)eps,&name);
+<a name="line613">613: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Lambda_%s = [\n"</font>,name);
+<a name="line614">614: </a>  <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line615">615: </a>    k = eps->perm[i];
+<a name="line616">616: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line617">617: </a>    re = PetscRealPart(eps->eigr[k]);
+<a name="line618">618: </a>    im = PetscImaginaryPart(eps->eigr[k]);
+<a name="line619">619: </a><font color="#A020F0">#else</font>
+<a name="line620">620: </a>    re = eps->eigr[k];
+<a name="line621">621: </a>    im = eps->eigi[k];
+<a name="line622">622: </a><font color="#A020F0">#endif</font>
+<a name="line623">623: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line624">624: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei\n"</font>,(double)re,(double)im);
+<a name="line625">625: </a>    } <font color="#4169E1">else</font> {
+<a name="line626">626: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)re);
+<a name="line627">627: </a>    }
+<a name="line628">628: </a>  }
+<a name="line629">629: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line630">630: </a>  <font color="#4169E1">return</font>(0);
+<a name="line631">631: </a>}
+
+<a name="line635">635: </a><font color="#B22222">/*@C</font>
+<a name="line636">636: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a> - Displays the computed eigenvalues in a viewer.</font>
+
+<a name="line638">638: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line640">640: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line641">641: </a><font color="#B22222">+  eps    - the eigensolver context</font>
+<a name="line642">642: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line644">644: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line645">645: </a><font color="#B22222">.  -eps_view_values - print computed eigenvalues</font>
+
+<a name="line647">647: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line649">649: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(), <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>()</font>
+<a name="line650">650: </a><font color="#B22222">@*/</font>
+<a name="line651">651: </a><strong><font color="#4169E1"><a name="EPSValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line652">652: </a>{
+<a name="line653">653: </a>  PetscBool         isascii,isdraw;
+<a name="line654">654: </a>  PetscViewerFormat format;
+<a name="line655">655: </a>  PetscErrorCode    ierr;
+
+<a name="line659">659: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
+<a name="line662">662: </a>  EPSCheckSolved(eps,1);
+<a name="line663">663: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
+<a name="line664">664: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line665">665: </a>  <font color="#4169E1">if</font> (isdraw) {
+<a name="line666">666: </a>    EPSValuesView_DRAW(eps,viewer);
+<a name="line667">667: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
+<a name="line668">668: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line669">669: </a>    <font color="#4169E1">switch</font> (format) {
+<a name="line670">670: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line671">671: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line672">672: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line673">673: </a>        EPSValuesView_ASCII(eps,viewer);
+<a name="line674">674: </a>        <font color="#4169E1">break</font>;
+<a name="line675">675: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line676">676: </a>        EPSValuesView_MATLAB(eps,viewer);
+<a name="line677">677: </a>        <font color="#4169E1">break</font>;
+<a name="line678">678: </a><strong><font color="#FF0000">      default:</font></strong>
+<a name="line679">679: </a>        PetscInfo1(eps,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line680">680: </a>    }
+<a name="line681">681: </a>  }
+<a name="line682">682: </a>  <font color="#4169E1">return</font>(0);
+<a name="line683">683: </a>}
+
+<a name="line687">687: </a><font color="#B22222">/*@</font>
+<a name="line688">688: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line689">689: </a><font color="#B22222">   the computed eigenvalues are to be viewed. </font>
+
+<a name="line691">691: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line693">693: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line694">694: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line696">696: </a><font color="#B22222">   Level: developer</font>
+<a name="line697">697: </a><font color="#B22222">@*/</font>
+<a name="line698">698: </a><strong><font color="#4169E1"><a name="EPSValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSValuesViewFromOptions.html#EPSValuesViewFromOptions">EPSValuesViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line699">699: </a>{
+<a name="line700">700: </a>  PetscErrorCode    ierr;
+<a name="line701">701: </a>  PetscViewer       viewer;
+<a name="line702">702: </a>  PetscBool         flg;
+<a name="line703">703: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line704">704: </a>  PetscViewerFormat format;
+
+<a name="line707">707: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line708">708: </a>  incall = PETSC_TRUE;
+<a name="line709">709: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_view_values"</font>,&viewer,&format,&flg);
+<a name="line710">710: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line711">711: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line712">712: </a>    <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(eps,viewer);
+<a name="line713">713: </a>    PetscViewerPopFormat(viewer);
+<a name="line714">714: </a>    PetscViewerDestroy(&viewer);
+<a name="line715">715: </a>  }
+<a name="line716">716: </a>  incall = PETSC_FALSE;
+<a name="line717">717: </a>  <font color="#4169E1">return</font>(0);
+<a name="line718">718: </a>}
+
+<a name="line722">722: </a><font color="#B22222">/*@C</font>
+<a name="line723">723: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a> - Outputs computed eigenvectors to a viewer.</font>
+
+<a name="line725">725: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line727">727: </a><font color="#B22222">   Parameter:</font>
+<a name="line728">728: </a><font color="#B22222">+  eps    - the eigensolver context</font>
+<a name="line729">729: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line731">731: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line732">732: </a><font color="#B22222">.  -eps_view_vectors - output eigenvectors.</font>
+
+<a name="line734">734: </a><font color="#B22222">   Note:</font>
+<a name="line735">735: </a><font color="#B22222">   If PETSc was configured with real scalars, complex conjugate eigenvectors</font>
+<a name="line736">736: </a><font color="#B22222">   will be viewed as two separate real vectors, one containing the real part</font>
+<a name="line737">737: </a><font color="#B22222">   and another one containing the imaginary part.</font>
+
+<a name="line739">739: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line741">741: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(), <a href="../../../docs/manualpages/EPS/EPSValuesView.html#EPSValuesView">EPSValuesView</a>(), <a href="../../../docs/manualpages/EPS/EPSErrorView.html#EPSErrorView">EPSErrorView</a>()</font>
+<a name="line742">742: </a><font color="#B22222">@*/</font>
+<a name="line743">743: </a><strong><font color="#4169E1"><a name="EPSVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscViewer viewer)</font></strong>
+<a name="line744">744: </a>{
+<a name="line746">746: </a>  PetscInt       i,k;
+<a name="line747">747: </a>  Vec            x;
+<a name="line748">748: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
+<a name="line749">749: </a>  char           vname[NMLEN];
+<a name="line750">750: </a>  const char     *ename;
+
+<a name="line754">754: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)eps));
+<a name="line757">757: </a>  EPSCheckSolved(eps,1);
+<a name="line758">758: </a>  <font color="#4169E1">if</font> (eps->nconv) {
+<a name="line759">759: </a>    PetscObjectGetName((PetscObject)eps,&ename);
+<a name="line760">760: </a>    EPSComputeVectors(eps);
+<a name="line761">761: </a>    <font color="#4169E1">for</font> (i=0;i<eps->nconv;i++) {
+<a name="line762">762: </a>      k = eps->perm[i];
+<a name="line763">763: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,(int)i,ename);
+<a name="line764">764: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(eps->V,k,&x);
+<a name="line765">765: </a>      PetscObjectSetName((PetscObject)x,vname);
+<a name="line766">766: </a>      VecView(x,viewer);
+<a name="line767">767: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(eps->V,k,&x);
+<a name="line768">768: </a>    }
+<a name="line769">769: </a>  }
+<a name="line770">770: </a>  <font color="#4169E1">return</font>(0);
+<a name="line771">771: </a>}
+
+<a name="line775">775: </a><font color="#B22222">/*@</font>
+<a name="line776">776: </a><font color="#B22222">   <a href="../../../docs/manualpages/EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line777">777: </a><font color="#B22222">   the computed eigenvectors are to be viewed. </font>
+
+<a name="line779">779: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line781">781: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line782">782: </a><font color="#B22222">.  eps - the eigensolver context</font>
+
+<a name="line784">784: </a><font color="#B22222">   Level: developer</font>
+<a name="line785">785: </a><font color="#B22222">@*/</font>
+<a name="line786">786: </a><strong><font color="#4169E1"><a name="EPSVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/EPS/EPSVectorsViewFromOptions.html#EPSVectorsViewFromOptions">EPSVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line787">787: </a>{
+<a name="line788">788: </a>  PetscErrorCode    ierr;
+<a name="line789">789: </a>  PetscViewer       viewer;
+<a name="line790">790: </a>  PetscBool         flg = PETSC_FALSE;
+<a name="line791">791: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line792">792: </a>  PetscViewerFormat format;
+
+<a name="line795">795: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line796">796: </a>  incall = PETSC_TRUE;
+<a name="line797">797: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)eps),((PetscObject)eps)->prefix,<font color="#666666">"-eps_view_vectors"</font>,&viewer,&format,&flg);
+<a name="line798">798: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line799">799: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line800">800: </a>    <a href="../../../docs/manualpages/EPS/EPSVectorsView.html#EPSVectorsView">EPSVectorsView</a>(eps,viewer);
+<a name="line801">801: </a>    PetscViewerPopFormat(viewer);
+<a name="line802">802: </a>    PetscViewerDestroy(&viewer);
+<a name="line803">803: </a>  }
+<a name="line804">804: </a>  incall = PETSC_FALSE;
+<a name="line805">805: </a>  <font color="#4169E1">return</font>(0);
+<a name="line806">806: </a>}
 
 </pre>
 </body>
diff --git a/src/eps/interface/ftn-auto/epsoptsf.c b/src/eps/interface/ftn-auto/epsoptsf.c
index 4cd6e5f..4dcfe0c 100644
--- a/src/eps/interface/ftn-auto/epsoptsf.c
+++ b/src/eps/interface/ftn-auto/epsoptsf.c
@@ -74,6 +74,16 @@ extern void PetscRmPointer(void*);
 #define epsgetconvergencetest_ epsgetconvergencetest
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epssetstoppingtest_ EPSSETSTOPPINGTEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epssetstoppingtest_ epssetstoppingtest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define epsgetstoppingtest_ EPSGETSTOPPINGTEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define epsgetstoppingtest_ epsgetstoppingtest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define epssetproblemtype_ EPSSETPROBLEMTYPE
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define epssetproblemtype_ epssetproblemtype
@@ -175,6 +185,14 @@ PETSC_EXTERN void PETSC_STDCALL  epsgetconvergencetest_(EPS eps,EPSConv *conv, i
 *__ierr = EPSGetConvergenceTest(
 	(EPS)PetscToPointer((eps) ),conv);
 }
+PETSC_EXTERN void PETSC_STDCALL  epssetstoppingtest_(EPS eps,EPSStop *stop, int *__ierr ){
+*__ierr = EPSSetStoppingTest(
+	(EPS)PetscToPointer((eps) ),*stop);
+}
+PETSC_EXTERN void PETSC_STDCALL  epsgetstoppingtest_(EPS eps,EPSStop *stop, int *__ierr ){
+*__ierr = EPSGetStoppingTest(
+	(EPS)PetscToPointer((eps) ),stop);
+}
 PETSC_EXTERN void PETSC_STDCALL  epssetproblemtype_(EPS eps,EPSProblemType *type, int *__ierr ){
 *__ierr = EPSSetProblemType(
 	(EPS)PetscToPointer((eps) ),*type);
diff --git a/src/eps/interface/ftn-custom/makefile b/src/eps/interface/ftn-custom/makefile
index 654386c..9d18b76 100644
--- a/src/eps/interface/ftn-custom/makefile
+++ b/src/eps/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/interface/ftn-custom/zepsf.c b/src/eps/interface/ftn-custom/zepsf.c
index cfd937d..b9d5ad0 100644
--- a/src/eps/interface/ftn-custom/zepsf.c
+++ b/src/eps/interface/ftn-custom/zepsf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -41,9 +41,10 @@
 #define epsmonitorconverged_        EPSMONITORCONVERGED
 #define epsmonitorfirst_            EPSMONITORFIRST
 #define epsconvergedabsolute_       EPSCONVERGEDABSOLUTE
-#define epsconvergedeigrelative_    EPSCONVERGEDEIGRELATIVE
-#define epsconvergednormrelative_   EPSCONVERGEDNORMRELATIVE
+#define epsconvergedrelative_       EPSCONVERGEDRELATIVE
+#define epsconvergednorm_           EPSCONVERGEDNORM
 #define epssetconvergencetestfunction_ EPSSETCONVERGENCETESTFUNCTION
+#define epssetstoppingtestfunction_ EPSSETSTOPPINGTESTFUNCTION
 #define epsseteigenvaluecomparison_ EPSSETEIGENVALUECOMPARISON
 #define epssetarbitraryselection_   EPSSETARBITRARYSELECTION
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
@@ -64,9 +65,10 @@
 #define epsmonitorconverged_        epsmonitorconverged
 #define epsmonitorfirst_            epsmonitorfirst
 #define epsconvergedabsolute_       epsconvergedabsolute
-#define epsconvergedeigrelative_    epsconvergedeigrelative
-#define epsconvergednormrelative_   epsconvergednormrelative
+#define epsconvergedrelative_       epsconvergedrelative
+#define epsconvergednorm_           epsconvergednorm
 #define epssetconvergencetestfunction_ epssetconvergencetestfunction
+#define epssetstoppingtestfunction_ epssetstoppingtestfunction
 #define epsseteigenvaluecomparison_ epsseteigenvaluecomparison
 #define epssetarbitraryselection_   epssetarbitraryselection
 #endif
@@ -75,29 +77,29 @@
    These are not usually called from Fortran but allow Fortran users
    to transparently set these monitors from .F code, hence no STDCALL
 */
-PETSC_EXTERN void epsmonitorall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void epsmonitorall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSMonitorAll(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = EPSMonitorAll(*eps,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void epsmonitorlg_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void epsmonitorconverged_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSMonitorLG(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = EPSMonitorConverged(*eps,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void epsmonitorlgall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void epsmonitorfirst_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSMonitorLGAll(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = EPSMonitorFirst(*eps,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void epsmonitorconverged_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void epsmonitorlg_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSMonitorConverged(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = EPSMonitorLG(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
 }
 
-PETSC_EXTERN void epsmonitorfirst_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void epsmonitorlgall_(EPS *eps,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSMonitorFirst(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = EPSMonitorLGAll(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx);
 }
 
 static struct {
@@ -105,6 +107,8 @@ static struct {
   PetscFortranCallbackId monitordestroy;
   PetscFortranCallbackId convergence;
   PetscFortranCallbackId convdestroy;
+  PetscFortranCallbackId stopping;
+  PetscFortranCallbackId stopdestroy;
   PetscFortranCallbackId comparison;
   PetscFortranCallbackId arbitrary;
 } _cb;
@@ -141,6 +145,21 @@ static PetscErrorCode ourconvdestroy(void *ctx)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "ourstopping"
+static PetscErrorCode ourstopping(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)
+{
+  PetscObjectUseFortranCallback(eps,_cb.stopping,(EPS*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,EPSConvergedReason*,void*,PetscErrorCode*),(&eps,&its,&max_it,&nconv,&nev,reason,_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourstopdestroy"
+static PetscErrorCode ourstopdestroy(void *ctx)
+{
+  EPS eps = (EPS)ctx;
+  PetscObjectUseFortranCallback(eps,_cb.stopdestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "oureigenvaluecomparison"
 static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)
 {
@@ -237,28 +256,18 @@ PETSC_EXTERN void PETSC_STDCALL epsgetoptionsprefix_(EPS *eps,CHAR prefix PETSC_
 
 PETSC_EXTERN void PETSC_STDCALL epsmonitorset_(EPS *eps,void (PETSC_STDCALL *monitor)(EPS*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)
 {
-  SlepcConvMonitor ctx;
-
   CHKFORTRANNULLOBJECT(mctx);
   CHKFORTRANNULLFUNCTION(monitordestroy);
   if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorall_) {
-    *ierr = EPSMonitorSet(*eps,EPSMonitorAll,0,0);
+    *ierr = EPSMonitorSet(*eps,(PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))EPSMonitorAll,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorconverged_) {
+    *ierr = EPSMonitorSet(*eps,(PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))EPSMonitorConverged,*(SlepcConvMonitor*)mctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorfirst_) {
+    *ierr = EPSMonitorSet(*eps,(PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))EPSMonitorFirst,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorlg_) {
     *ierr = EPSMonitorSet(*eps,EPSMonitorLG,0,0);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorlgall_) {
     *ierr = EPSMonitorSet(*eps,EPSMonitorLGAll,0,0);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorconverged_) {
-    if (mctx) {
-      PetscError(PetscObjectComm((PetscObject)*eps),__LINE__,"epsmonitorset_",__FILE__,PETSC_ERR_ARG_WRONG,PETSC_ERROR_INITIAL,"Must provide PETSC_NULL_OBJECT as a context in the Fortran interface to EPSMonitorSet");
-      *ierr = 1;
-      return;
-    }
-    *ierr = PetscNew(&ctx);
-    if (*ierr) return;
-    ctx->viewer = NULL;
-    *ierr = EPSMonitorSet(*eps,EPSMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)epsmonitorfirst_) {
-    *ierr = EPSMonitorSet(*eps,EPSMonitorFirst,0,0);
   } else {
     *ierr = PetscObjectSetFortranCallback((PetscObject)*eps,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.monitor,(PetscVoidFunction)monitor,mctx); if (*ierr) return;
     if (!monitordestroy) {
@@ -275,14 +284,14 @@ PETSC_EXTERN void PETSC_STDCALL epsconvergedabsolute_(EPS *eps,PetscScalar *eigr
   *ierr = EPSConvergedAbsolute(*eps,*eigr,*eigi,*res,errest,ctx);
 }
 
-PETSC_EXTERN void PETSC_STDCALL epsconvergedeigrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void PETSC_STDCALL epsconvergedrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSConvergedEigRelative(*eps,*eigr,*eigi,*res,errest,ctx);
+  *ierr = EPSConvergedRelative(*eps,*eigr,*eigi,*res,errest,ctx);
 }
 
-PETSC_EXTERN void PETSC_STDCALL epsconvergednormrelative_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void PETSC_STDCALL epsconvergednorm_(EPS *eps,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = EPSConvergedNormRelative(*eps,*eigr,*eigi,*res,errest,ctx);
+  *ierr = EPSConvergedNorm(*eps,*eigr,*eigi,*res,errest,ctx);
 }
 
 PETSC_EXTERN void PETSC_STDCALL epssetconvergencetestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
@@ -291,9 +300,9 @@ PETSC_EXTERN void PETSC_STDCALL epssetconvergencetestfunction_(EPS *eps,void (PE
   CHKFORTRANNULLFUNCTION(destroy);
   if ((PetscVoidFunction)func == (PetscVoidFunction)epsconvergedabsolute_) {
     *ierr = EPSSetConvergenceTest(*eps,EPS_CONV_ABS);
-  } else if ((PetscVoidFunction)func == (PetscVoidFunction)epsconvergedeigrelative_) {
-    *ierr = EPSSetConvergenceTest(*eps,EPS_CONV_EIG);
-  } else if ((PetscVoidFunction)func == (PetscVoidFunction)epsconvergednormrelative_) {
+  } else if ((PetscVoidFunction)func == (PetscVoidFunction)epsconvergedrelative_) {
+    *ierr = EPSSetConvergenceTest(*eps,EPS_CONV_REL);
+  } else if ((PetscVoidFunction)func == (PetscVoidFunction)epsconvergednorm_) {
     *ierr = EPSSetConvergenceTest(*eps,EPS_CONV_NORM);
   } else {
     *ierr = PetscObjectSetFortranCallback((PetscObject)*eps,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.convergence,(PetscVoidFunction)func,ctx); if (*ierr) return;
@@ -306,6 +315,28 @@ PETSC_EXTERN void PETSC_STDCALL epssetconvergencetestfunction_(EPS *eps,void (PE
   }
 }
 
+PETSC_EXTERN void PETSC_STDCALL epsstoppingbasic_(EPS *eps,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,EPSConvergedReason *reason,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = EPSStoppingBasic(*eps,*its,*max_it,*nconv,*nev,reason,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL epssetstoppingtestfunction_(EPS *eps,void (PETSC_STDCALL *func)(EPS*,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  CHKFORTRANNULLFUNCTION(destroy);
+  if ((PetscVoidFunction)func == (PetscVoidFunction)epsstoppingbasic_) {
+    *ierr = EPSSetStoppingTest(*eps,EPS_STOP_BASIC);
+  } else {
+    *ierr = PetscObjectSetFortranCallback((PetscObject)*eps,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopping,(PetscVoidFunction)func,ctx); if (*ierr) return;
+    if (!destroy) {
+      *ierr = EPSSetStoppingTestFunction(*eps,ourstopping,*eps,NULL);
+    } else {
+      *ierr = PetscObjectSetFortranCallback((PetscObject)*eps,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopdestroy,(PetscVoidFunction)destroy,ctx); if (*ierr) return;
+      *ierr = EPSSetStoppingTestFunction(*eps,ourstopping,*eps,ourstopdestroy);
+    }
+  }
+}
+
 PETSC_EXTERN void PETSC_STDCALL epsseteigenvaluecomparison_(EPS *eps,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)
 {
   CHKFORTRANNULLOBJECT(ctx);
diff --git a/src/eps/interface/index.html b/src/eps/interface/index.html
index d19169e..2097e96 100644
--- a/src/eps/interface/index.html
+++ b/src/eps/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Eigenvalue Problem Solver - EPS: <a href="../../../src/eps/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/eps/interface/makefile b/src/eps/interface/makefile
index 9469c47..400131b 100644
--- a/src/eps/interface/makefile
+++ b/src/eps/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/interface/makefile.html b/src/eps/interface/makefile.html
index 5e9e974..151d842 100644
--- a/src/eps/interface/makefile.html
+++ b/src/eps/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:51+00:00">
+<meta name="date" content="2016-05-16T10:32:46+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/eps/makefile b/src/eps/makefile
index 8a1d4d3..ce85f58 100644
--- a/src/eps/makefile
+++ b/src/eps/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/eps/makefile.html b/src/eps/makefile.html
index 1ab32fd..9cd5f7a 100644
--- a/src/eps/makefile.html
+++ b/src/eps/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/eps/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:41+00:00">
+<meta name="date" content="2016-05-16T10:32:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/eps/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/eps/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/index.html b/src/index.html
index 2636d56..4d4ee1a 100644
--- a/src/index.html
+++ b/src/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="sys/">sys/</a><br>
 <a href="eps/">eps/</a><br>
diff --git a/src/makefile b/src/makefile
index dc2da36..f76e6ab 100644
--- a/src/makefile
+++ b/src/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/makefile.html b/src/makefile.html
index 2b05060..cb611d3 100644
--- a/src/makefile.html
+++ b/src/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:37+00:00">
+<meta name="date" content="2016-05-16T10:31:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/mfn/examples/index.html b/src/mfn/examples/index.html
index 37e7e81..663d9f6 100644
--- a/src/mfn/examples/index.html
+++ b/src/mfn/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
 <a href="tutorials/">tutorials/</a><br>
diff --git a/src/mfn/examples/makefile b/src/mfn/examples/makefile
index fc3b827..4a33fef 100644
--- a/src/mfn/examples/makefile
+++ b/src/mfn/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/mfn/examples/makefile.html b/src/mfn/examples/makefile.html
index d93980e..a938565 100644
--- a/src/mfn/examples/makefile.html
+++ b/src/mfn/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/mfn/examples/tests/index.html b/src/mfn/examples/tests/index.html
index 0d20264..6ca6885 100644
--- a/src/mfn/examples/tests/index.html
+++ b/src/mfn/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
@@ -15,6 +15,6 @@ Matrix Function (MFN) is the object provided by SLEPc for computing the action o
 </p>
 
 <p>
- 
+<a href="test1.c.html">test1.c: Computes exp(A)*v for a matrix loaded from file</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/mfn/examples/tests/makefile b/src/mfn/examples/tests/makefile
index 896d301..0afd231 100644
--- a/src/mfn/examples/tests/makefile
+++ b/src/mfn/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,12 +24,39 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/mfn/examples/tests/
-EXAMPLESC  =
+EXAMPLESC  = test1.c
 EXAMPLESF  =
 MANSEC     = MFN
 TESTS      =
 
-TESTEXAMPLES_C           =
+TESTEXAMPLES_C_NOCOMPLEX = test1.PETSc runtest1_1 runtest1_2 test1.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
+test1: test1.o chkopts
+	-${CLINKER} -o test1 test1.o ${SLEPC_MFN_LIB}
+	${RM} test1.o
+
+#------------------------------------------------------------------------------------
+DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
+
+runtest1_1:
+	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
+	   echo "Skipping test1_1 test"; \
+	 else \
+	   ${MPIEXEC} -n 1 ./test1 -file ${DATAPATH}/bfw62b.petsc > test1_1.tmp 2>&1; \
+	   if (${DIFF} output/test1.out test1_1.tmp) then true; \
+	   else echo "Possible problem with test1_1, diffs above"; fi; \
+	   ${RM} -f test1_1.tmp; \
+	 fi
+
+runtest1_2:
+	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
+	   echo "Skipping test1_2 test"; \
+	 else \
+	   ${MPIEXEC} -n 1 ./test1 -file ${DATAPATH}/bfw62b.petsc -mfn_type expokit > test1_2.tmp 2>&1; \
+	   if (${DIFF} output/test1.out test1_2.tmp) then true; \
+	   else echo "Possible problem with test1_2, diffs above"; fi; \
+	   ${RM} -f test1_2.tmp; \
+	 fi
+
diff --git a/src/mfn/examples/tests/makefile.html b/src/mfn/examples/tests/makefile.html
index ce21109..cc66cce 100644
--- a/src/mfn/examples/tests/makefile.html
+++ b/src/mfn/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,15 +35,42 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/mfn/examples/tests/
-EXAMPLESC  =
+EXAMPLESC  = test1.c
 EXAMPLESF  =
 MANSEC     = <a href="ROOT/docs/manualpages/MFN/MFN.html#MFN">MFN</a>
 TESTS      =
 
-TESTEXAMPLES_C           =
+TESTEXAMPLES_C_NOCOMPLEX = test1.PETSc runtest1_1 runtest1_2 test1.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
+<strong><font color="#FF0000">test1:</font></strong> test1.o chkopts
+	-${CLINKER} -o test1 test1.o ${SLEPC_MFN_LIB}
+	${RM} test1.o
+
+<font color="#A020F0">#------------------------------------------------------------------------------------</font>
+DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
+
+<strong><font color="#FF0000">runtest1_1:</font></strong>
+	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
+	   echo <font color="#666666">"Skipping test1_1 test"</font>; \
+	 <font color="#4169E1">else</font> \
+	   ${MPIEXEC} -n 1 ./test1 -file ${DATAPATH}/bfw62b.petsc > test1_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/test1.out test1_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test1_1, diffs above"</font>; fi; \
+	   ${RM} -f test1_1.tmp; \
+	 fi
+
+<strong><font color="#FF0000">runtest1_2:</font></strong>
+	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
+	   echo <font color="#666666">"Skipping test1_2 test"</font>; \
+	 <font color="#4169E1">else</font> \
+	   ${MPIEXEC} -n 1 ./test1 -file ${DATAPATH}/bfw62b.petsc -mfn_type expokit > test1_2.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/test1.out test1_2.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test1_2, diffs above"</font>; fi; \
+	   ${RM} -f test1_2.tmp; \
+	 fi
+
 </pre>
 </body>
 
diff --git a/src/mfn/examples/tests/output/test1.out b/src/mfn/examples/tests/output/test1.out
new file mode 100644
index 0000000..fe8b554
--- /dev/null
+++ b/src/mfn/examples/tests/output/test1.out
@@ -0,0 +1,6 @@
+
+Matrix exponential y=exp(t*A)*e, loaded from file
+
+ Reading REAL matrix from a binary file...
+ Computed vector at time t=2 has norm 7.87264
+
diff --git a/src/mfn/examples/tests/test1.c b/src/mfn/examples/tests/test1.c
new file mode 100644
index 0000000..abfa2be
--- /dev/null
+++ b/src/mfn/examples/tests/test1.c
@@ -0,0 +1,103 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Computes exp(A)*v for a matrix loaded from file.\n\n"
+  "The command line options are:\n"
+  "  -file <filename>, where <filename> = matrix file in PETSc binary form.\n\n";
+
+#include <slepcmfn.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  Mat                A;           /* problem matrix */
+  MFN                mfn;
+  FN                 f;
+  PetscReal          norm;
+  PetscScalar        t=2.0;
+  Vec                v,y;
+  PetscErrorCode     ierr;
+  PetscViewer        viewer;
+  PetscBool          flg;
+  char               filename[PETSC_MAX_PATH_LEN];
+  MFNConvergedReason reason;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-t",&t,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMatrix exponential y=exp(t*A)*e, loaded from file\n\n");CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                Load matrix A from binary file
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = PetscOptionsGetString(NULL,NULL,"-file",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+  if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must indicate a file name with the -file option");
+
+#if defined(PETSC_USE_COMPLEX)
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Reading COMPLEX matrix from a binary file...\n");CHKERRQ(ierr);
+#else
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Reading REAL matrix from a binary file...\n");CHKERRQ(ierr);
+#endif
+  ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);CHKERRQ(ierr);
+  ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(A);CHKERRQ(ierr);
+  ierr = MatLoad(A,viewer);CHKERRQ(ierr);
+  ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
+
+  /* set v = ones(n,1) */
+  ierr = MatCreateVecs(A,NULL,&y);CHKERRQ(ierr);
+  ierr = MatCreateVecs(A,NULL,&v);CHKERRQ(ierr);
+  ierr = VecSet(v,1.0);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                Create the solver and set various options
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = MFNCreate(PETSC_COMM_WORLD,&mfn);CHKERRQ(ierr);
+  ierr = MFNSetOperator(mfn,A);CHKERRQ(ierr);
+  ierr = MFNGetFN(mfn,&f);CHKERRQ(ierr);
+  ierr = FNSetType(f,FNEXP);CHKERRQ(ierr);
+  ierr = FNSetScale(f,t,1.0);CHKERRQ(ierr);  
+  ierr = MFNSetFromOptions(mfn);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                      Solve the problem, y=exp(t*A)*v
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = MFNSolve(mfn,v,y);CHKERRQ(ierr);
+  ierr = MFNGetConvergedReason(mfn,&reason);CHKERRQ(ierr);
+  if (reason<0) SETERRQ(PETSC_COMM_WORLD,1,"Solver did not converge");
+  ierr = VecNorm(y,NORM_2,&norm);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Computed vector at time t=%.4g has norm %g\n\n",(double)PetscRealPart(t),(double)norm);CHKERRQ(ierr);
+  
+  /* 
+     Free work space
+  */
+  ierr = MFNDestroy(&mfn);CHKERRQ(ierr);
+  ierr = MatDestroy(&A);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&y);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
diff --git a/src/mfn/examples/tests/test1.c.html b/src/mfn/examples/tests/test1.c.html
new file mode 100644
index 0000000..c09464e
--- /dev/null
+++ b/src/mfn/examples/tests/test1.c.html
@@ -0,0 +1,117 @@
+<center><a href="test1.c">Actual source code: test1.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/examples/tests/test1.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Computes exp(A)*v for a matrix loaded from file.\n\n"</font>
+<a name="line23"> 23: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line24"> 24: </a>  <font color="#666666">"  -file <filename>, where <filename> = matrix file in PETSc binary form.\n\n"</font>;
+
+<a name="line26"> 26: </a><font color="#A020F0">#include <slepcmfn.h></font>
+
+<a name="line30"> 30: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line31"> 31: </a>{
+<a name="line32"> 32: </a>  Mat                A;           <font color="#B22222">/* problem matrix */</font>
+<a name="line33"> 33: </a>  <a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>                mfn;
+<a name="line34"> 34: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>                 f;
+<a name="line35"> 35: </a>  PetscReal          norm;
+<a name="line36"> 36: </a>  PetscScalar        t=2.0;
+<a name="line37"> 37: </a>  Vec                v,y;
+<a name="line38"> 38: </a>  PetscErrorCode     ierr;
+<a name="line39"> 39: </a>  PetscViewer        viewer;
+<a name="line40"> 40: </a>  PetscBool          flg;
+<a name="line41"> 41: </a>  char               filename[PETSC_MAX_PATH_LEN];
+<a name="line42"> 42: </a>  <a href="../../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> reason;
+
+<a name="line44"> 44: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line46"> 46: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-t"</font>,&t,NULL);
+<a name="line47"> 47: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMatrix exponential y=exp(t*A)*e, loaded from file\n\n"</font>);
+
+<a name="line49"> 49: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line50"> 50: </a><font color="#B22222">                Load matrix A from binary file</font>
+<a name="line51"> 51: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line53"> 53: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-file"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line54"> 54: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must indicate a file name with the -file option"</font>);
+
+<a name="line56"> 56: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line57"> 57: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Reading COMPLEX matrix from a binary file...\n"</font>);
+<a name="line58"> 58: </a><font color="#A020F0">#else</font>
+<a name="line59"> 59: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Reading REAL matrix from a binary file...\n"</font>);
+<a name="line60"> 60: </a><font color="#A020F0">#endif</font>
+<a name="line61"> 61: </a>  PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);
+<a name="line62"> 62: </a>  MatCreate(PETSC_COMM_WORLD,&A);
+<a name="line63"> 63: </a>  MatSetFromOptions(A);
+<a name="line64"> 64: </a>  MatLoad(A,viewer);
+<a name="line65"> 65: </a>  PetscViewerDestroy(&viewer);
+
+<a name="line67"> 67: </a>  <font color="#B22222">/* set v = ones(n,1) */</font>
+<a name="line68"> 68: </a>  MatCreateVecs(A,NULL,&y);
+<a name="line69"> 69: </a>  MatCreateVecs(A,NULL,&v);
+<a name="line70"> 70: </a>  VecSet(v,1.0);
+
+<a name="line72"> 72: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line73"> 73: </a><font color="#B22222">                Create the solver and set various options</font>
+<a name="line74"> 74: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(PETSC_COMM_WORLD,&mfn);
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(mfn,A);
+<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&f);
+<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f,FNEXP);
+<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(f,t,1.0);  
+<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(mfn);
+
+<a name="line83"> 83: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line84"> 84: </a><font color="#B22222">                      Solve the problem, y=exp(t*A)*v</font>
+<a name="line85"> 85: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(mfn,v,y);
+<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(mfn,&reason);
+<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Solver did not converge"</font>);
+<a name="line90"> 90: </a>  VecNorm(y,NORM_2,&norm);
+<a name="line91"> 91: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Computed vector at time t=%.4g has norm %g\n\n"</font>,(double)PetscRealPart(t),(double)norm);
+<a name="line92"> 92: </a>  
+<a name="line93"> 93: </a>  <font color="#B22222">/* </font>
+<a name="line94"> 94: </a><font color="#B22222">     Free work space</font>
+<a name="line95"> 95: </a><font color="#B22222">  */</font>
+<a name="line96"> 96: </a>  <a href="../../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(&mfn);
+<a name="line97"> 97: </a>  MatDestroy(&A);
+<a name="line98"> 98: </a>  VecDestroy(&v);
+<a name="line99"> 99: </a>  VecDestroy(&y);
+<a name="line100">100: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line101">101: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line102">102: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/mfn/examples/tutorials/ex23.c b/src/mfn/examples/tutorials/ex23.c
index b2d34e3..d48d815 100644
--- a/src/mfn/examples/tutorials/ex23.c
+++ b/src/mfn/examples/tutorials/ex23.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -19,8 +19,9 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 */
 
-static char help[] = "Computes exp(A)*v for a matrix associated with a Markov model.\n\n"
+static char help[] = "Computes exp(t*A)*v for a matrix associated with a Markov model.\n\n"
   "The command line options are:\n"
+  "  -t <t>, where <t> = time parameter (multiplies the matrix).\n\n"
   "  -m <m>, where <m> = number of grid subdivisions in each dimension.\n\n";
 
 #include <slepcmfn.h>
@@ -47,12 +48,12 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-t",&t,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-t",&t,NULL);CHKERRQ(ierr);
   N = m*(m+1)/2;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nMarkov y=exp(t*A)*e_1, N=%D (m=%D)\n\n",N,m);CHKERRQ(ierr);
 
-  ierr = PetscOptionsHasName(PETSC_NULL,"-draw_sol",&draw_sol);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-draw_sol",&draw_sol);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
             Compute the transition probability matrix, A
@@ -65,8 +66,8 @@ int main(int argc,char **argv)
   ierr = MatMarkovModel(m,A);CHKERRQ(ierr);
 
   /* set v = e_1 */
-  ierr = MatCreateVecs(A,PETSC_NULL,&y);CHKERRQ(ierr);
-  ierr = MatCreateVecs(A,PETSC_NULL,&v);CHKERRQ(ierr);
+  ierr = MatCreateVecs(A,NULL,&y);CHKERRQ(ierr);
+  ierr = MatCreateVecs(A,NULL,&v);CHKERRQ(ierr);
   ierr = VecSetValue(v,0,1.0,INSERT_VALUES);CHKERRQ(ierr);
   ierr = VecAssemblyBegin(v);CHKERRQ(ierr);
   ierr = VecAssemblyEnd(v);CHKERRQ(ierr);
@@ -94,12 +95,12 @@ int main(int argc,char **argv)
   ierr = MFNSetFromOptions(mfn);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-                      Solve the problem, y=exp(A)*v
+                      Solve the problem, y=exp(t*A)*v
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = MFNSolve(mfn,v,y);CHKERRQ(ierr);
   ierr = MFNGetConvergedReason(mfn,&reason);CHKERRQ(ierr);
-  if (reason!=MFN_CONVERGED_TOL) SETERRQ(PETSC_COMM_WORLD,1,"Solver did not converge");
+  if (reason<0) SETERRQ(PETSC_COMM_WORLD,1,"Solver did not converge");
   ierr = VecNorm(y,NORM_2,&norm);CHKERRQ(ierr);
   
   /*
@@ -128,8 +129,8 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = VecDestroy(&y);CHKERRQ(ierr);
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/mfn/examples/tutorials/ex23.c.html b/src/mfn/examples/tutorials/ex23.c.html
index df9cf83..b83b170 100644
--- a/src/mfn/examples/tutorials/ex23.c.html
+++ b/src/mfn/examples/tutorials/ex23.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/examples/tutorials/ex23.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/tutorials/ex23.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tutorials/ex23.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -31,164 +31,165 @@
 <a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line20"> 20: </a><font color="#B22222">*/</font>
 
-<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Computes exp(A)*v for a matrix associated with a Markov model.\n\n"</font>
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Computes exp(t*A)*v for a matrix associated with a Markov model.\n\n"</font>
 <a name="line23"> 23: </a>  <font color="#666666">"The command line options are:\n"</font>
-<a name="line24"> 24: </a>  <font color="#666666">"  -m <m>, where <m> = number of grid subdivisions in each dimension.\n\n"</font>;
-
-<a name="line26"> 26: </a><font color="#A020F0">#include <slepcmfn.h></font>
-
-<a name="line28"> 28: </a><font color="#B22222">/*</font>
-<a name="line29"> 29: </a><font color="#B22222">   User-defined routines</font>
-<a name="line30"> 30: </a><font color="#B22222">*/</font>
-<a name="line31"> 31: </a><strong><font color="#4169E1">PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>;
-
-<a name="line35"> 35: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
-<a name="line36"> 36: </a>{
-<a name="line37"> 37: </a>  Mat                A;           <font color="#B22222">/* problem matrix */</font>
-<a name="line38"> 38: </a>  <a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>                mfn;
-<a name="line39"> 39: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>                 f;
-<a name="line40"> 40: </a>  PetscReal          tol,norm;
-<a name="line41"> 41: </a>  PetscScalar        t=2.0;
-<a name="line42"> 42: </a>  Vec                v,y;
-<a name="line43"> 43: </a>  PetscInt           N,m=15,ncv,maxit,its;
-<a name="line44"> 44: </a>  PetscErrorCode     ierr;
-<a name="line45"> 45: </a>  PetscBool          draw_sol;
-<a name="line46"> 46: </a>  <a href="../../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> reason;
-
-<a name="line48"> 48: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-
-<a name="line50"> 50: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
-<a name="line51"> 51: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-t"</font>,&t,NULL);
-<a name="line52"> 52: </a>  N = m*(m+1)/2;
-<a name="line53"> 53: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov y=exp(t*A)*e_1, N=%D (m=%D)\n\n"</font>,N,m);
-
-<a name="line55"> 55: </a>  PetscOptionsHasName(PETSC_NULL,<font color="#666666">"-draw_sol"</font>,&draw_sol);
-
-<a name="line57"> 57: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
-<a name="line58"> 58: </a><font color="#B22222">            Compute the transition probability matrix, A</font>
-<a name="line59"> 59: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line61"> 61: </a>  MatCreate(PETSC_COMM_WORLD,&A);
-<a name="line62"> 62: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line63"> 63: </a>  MatSetFromOptions(A);
-<a name="line64"> 64: </a>  MatSetUp(A);
-<a name="line65"> 65: </a>  MatMarkovModel(m,A);
-
-<a name="line67"> 67: </a>  <font color="#B22222">/* set v = e_1 */</font>
-<a name="line68"> 68: </a>  MatCreateVecs(A,PETSC_NULL,&y);
-<a name="line69"> 69: </a>  MatCreateVecs(A,PETSC_NULL,&v);
-<a name="line70"> 70: </a>  VecSetValue(v,0,1.0,INSERT_VALUES);
-<a name="line71"> 71: </a>  VecAssemblyBegin(v);
-<a name="line72"> 72: </a>  VecAssemblyEnd(v);
-
-<a name="line74"> 74: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
-<a name="line75"> 75: </a><font color="#B22222">                Create the solver and set various options</font>
-<a name="line76"> 76: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-<a name="line77"> 77: </a>  <font color="#B22222">/* </font>
-<a name="line78"> 78: </a><font color="#B22222">     Create matrix function solver context</font>
-<a name="line79"> 79: </a><font color="#B22222">  */</font>
-<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(PETSC_COMM_WORLD,&mfn);
-
-<a name="line82"> 82: </a>  <font color="#B22222">/* </font>
-<a name="line83"> 83: </a><font color="#B22222">     Set operator matrix, the function to compute, and other options</font>
-<a name="line84"> 84: </a><font color="#B22222">  */</font>
-<a name="line85"> 85: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(mfn,A);
-<a name="line86"> 86: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&f);
-<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f,FNEXP);
-<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(f,t,1.0);  
-<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(mfn,1e-07,PETSC_DEFAULT);
-
-<a name="line91"> 91: </a>  <font color="#B22222">/*</font>
-<a name="line92"> 92: </a><font color="#B22222">     Set solver parameters at runtime</font>
-<a name="line93"> 93: </a><font color="#B22222">  */</font>
-<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(mfn);
-
-<a name="line96"> 96: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
-<a name="line97"> 97: </a><font color="#B22222">                      Solve the problem, y=exp(A)*v</font>
-<a name="line98"> 98: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line100">100: </a>  <a href="../../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(mfn,v,y);
-<a name="line101">101: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(mfn,&reason);
-<a name="line102">102: </a>  <font color="#4169E1">if</font> (reason!=MFN_CONVERGED_TOL) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Solver did not converge"</font>);
-<a name="line103">103: </a>  VecNorm(y,NORM_2,&norm);
-<a name="line104">104: </a>  
-<a name="line105">105: </a>  <font color="#B22222">/*</font>
-<a name="line106">106: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line107">107: </a><font color="#B22222">  */</font>
-<a name="line108">108: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a>(mfn,&its);
-<a name="line109">109: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of iterations of the method: %D\n"</font>,its);
-<a name="line110">110: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>(mfn,&ncv);
-<a name="line111">111: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Subspace dimension: %D\n"</font>,ncv);
-<a name="line112">112: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>(mfn,&tol,&maxit);
-<a name="line113">113: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: tol=%.4g, maxit=%D\n"</font>,(double)tol,maxit);
-
-<a name="line115">115: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
-<a name="line116">116: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line117">117: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-<a name="line118">118: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Computed vector at time t=%.4g has norm %g\n\n"</font>,(double)PetscRealPart(t),(double)norm);
-<a name="line119">119: </a>  <font color="#4169E1">if</font> (draw_sol) {
-<a name="line120">120: </a>    PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);
-<a name="line121">121: </a>    VecView(y,PETSC_VIEWER_DRAW_WORLD);
-<a name="line122">122: </a>  }
-
-<a name="line124">124: </a>  <font color="#B22222">/* </font>
-<a name="line125">125: </a><font color="#B22222">     Free work space</font>
-<a name="line126">126: </a><font color="#B22222">  */</font>
-<a name="line127">127: </a>  <a href="../../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(&mfn);
-<a name="line128">128: </a>  MatDestroy(&A);
-<a name="line129">129: </a>  VecDestroy(&v);
-<a name="line130">130: </a>  VecDestroy(&y);
-<a name="line131">131: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line132">132: </a>  <font color="#4169E1">return</font> 0;
-<a name="line133">133: </a>}
-
-<a name="line137">137: </a><font color="#B22222">/*</font>
-<a name="line138">138: </a><font color="#B22222">    Matrix generator for a Markov model of a random walk on a triangular grid.</font>
-<a name="line139">139: </a><font color="#B22222">    See ex5.c for additional details.</font>
-<a name="line140">140: </a><font color="#B22222">*/</font>
-<a name="line141">141: </a><strong><font color="#4169E1"><a name="MatMarkovModel"></a>PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>
-<a name="line142">142: </a>{
-<a name="line143">143: </a>  const PetscReal cst = 0.5/(PetscReal)(m-1);
-<a name="line144">144: </a>  PetscReal       pd,pu;
-<a name="line145">145: </a>  PetscInt        Istart,Iend,i,j,jmax,ix=0;
-<a name="line146">146: </a>  PetscErrorCode  ierr;
-
-<a name="line149">149: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
-<a name="line150">150: </a>  <font color="#4169E1">for</font> (i=1;i<=m;i++) {
-<a name="line151">151: </a>    jmax = m-i+1;
-<a name="line152">152: </a>    <font color="#4169E1">for</font> (j=1;j<=jmax;j++) {
-<a name="line153">153: </a>      ix = ix + 1;
-<a name="line154">154: </a>      <font color="#4169E1">if</font> (ix-1<Istart || ix>Iend) <font color="#4169E1">continue</font>;  <font color="#B22222">/* compute only owned rows */</font>
-<a name="line155">155: </a>      <font color="#4169E1">if</font> (j!=jmax) {
-<a name="line156">156: </a>        pd = cst*(PetscReal)(i+j-1);
-<a name="line157">157: </a>        <font color="#B22222">/* north */</font>
-<a name="line158">158: </a>        <font color="#4169E1">if</font> (i==1) {
-<a name="line159">159: </a>          MatSetValue(A,ix-1,ix,2*pd,INSERT_VALUES);
-<a name="line160">160: </a>        } <font color="#4169E1">else</font> {
-<a name="line161">161: </a>          MatSetValue(A,ix-1,ix,pd,INSERT_VALUES);
-<a name="line162">162: </a>        }
-<a name="line163">163: </a>        <font color="#B22222">/* east */</font>
-<a name="line164">164: </a>        <font color="#4169E1">if</font> (j==1) {
-<a name="line165">165: </a>          MatSetValue(A,ix-1,ix+jmax-1,2*pd,INSERT_VALUES);
-<a name="line166">166: </a>        } <font color="#4169E1">else</font> {
-<a name="line167">167: </a>          MatSetValue(A,ix-1,ix+jmax-1,pd,INSERT_VALUES);
-<a name="line168">168: </a>        }
-<a name="line169">169: </a>      }
-<a name="line170">170: </a>      <font color="#B22222">/* south */</font>
-<a name="line171">171: </a>      pu = 0.5 - cst*(PetscReal)(i+j-3);
-<a name="line172">172: </a>      <font color="#4169E1">if</font> (j>1) {
-<a name="line173">173: </a>        MatSetValue(A,ix-1,ix-2,pu,INSERT_VALUES);
-<a name="line174">174: </a>      }
-<a name="line175">175: </a>      <font color="#B22222">/* west */</font>
-<a name="line176">176: </a>      <font color="#4169E1">if</font> (i>1) {
-<a name="line177">177: </a>        MatSetValue(A,ix-1,ix-jmax-2,pu,INSERT_VALUES);
-<a name="line178">178: </a>      }
-<a name="line179">179: </a>    }
-<a name="line180">180: </a>  }
-<a name="line181">181: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
-<a name="line182">182: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
-<a name="line183">183: </a>  <font color="#4169E1">return</font>(0);
-<a name="line184">184: </a>}
+<a name="line24"> 24: </a>  <font color="#666666">"  -t <t>, where <t> = time parameter (multiplies the matrix).\n\n"</font>
+<a name="line25"> 25: </a>  <font color="#666666">"  -m <m>, where <m> = number of grid subdivisions in each dimension.\n\n"</font>;
+
+<a name="line27"> 27: </a><font color="#A020F0">#include <slepcmfn.h></font>
+
+<a name="line29"> 29: </a><font color="#B22222">/*</font>
+<a name="line30"> 30: </a><font color="#B22222">   User-defined routines</font>
+<a name="line31"> 31: </a><font color="#B22222">*/</font>
+<a name="line32"> 32: </a><strong><font color="#4169E1">PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>;
+
+<a name="line36"> 36: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line37"> 37: </a>{
+<a name="line38"> 38: </a>  Mat                A;           <font color="#B22222">/* problem matrix */</font>
+<a name="line39"> 39: </a>  <a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>                mfn;
+<a name="line40"> 40: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>                 f;
+<a name="line41"> 41: </a>  PetscReal          tol,norm;
+<a name="line42"> 42: </a>  PetscScalar        t=2.0;
+<a name="line43"> 43: </a>  Vec                v,y;
+<a name="line44"> 44: </a>  PetscInt           N,m=15,ncv,maxit,its;
+<a name="line45"> 45: </a>  PetscErrorCode     ierr;
+<a name="line46"> 46: </a>  PetscBool          draw_sol;
+<a name="line47"> 47: </a>  <a href="../../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> reason;
+
+<a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line52"> 52: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-t"</font>,&t,NULL);
+<a name="line53"> 53: </a>  N = m*(m+1)/2;
+<a name="line54"> 54: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nMarkov y=exp(t*A)*e_1, N=%D (m=%D)\n\n"</font>,N,m);
+
+<a name="line56"> 56: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-draw_sol"</font>,&draw_sol);
+
+<a name="line58"> 58: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line59"> 59: </a><font color="#B22222">            Compute the transition probability matrix, A</font>
+<a name="line60"> 60: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line62"> 62: </a>  MatCreate(PETSC_COMM_WORLD,&A);
+<a name="line63"> 63: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line64"> 64: </a>  MatSetFromOptions(A);
+<a name="line65"> 65: </a>  MatSetUp(A);
+<a name="line66"> 66: </a>  MatMarkovModel(m,A);
+
+<a name="line68"> 68: </a>  <font color="#B22222">/* set v = e_1 */</font>
+<a name="line69"> 69: </a>  MatCreateVecs(A,NULL,&y);
+<a name="line70"> 70: </a>  MatCreateVecs(A,NULL,&v);
+<a name="line71"> 71: </a>  VecSetValue(v,0,1.0,INSERT_VALUES);
+<a name="line72"> 72: </a>  VecAssemblyBegin(v);
+<a name="line73"> 73: </a>  VecAssemblyEnd(v);
+
+<a name="line75"> 75: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line76"> 76: </a><font color="#B22222">                Create the solver and set various options</font>
+<a name="line77"> 77: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line78"> 78: </a>  <font color="#B22222">/* </font>
+<a name="line79"> 79: </a><font color="#B22222">     Create matrix function solver context</font>
+<a name="line80"> 80: </a><font color="#B22222">  */</font>
+<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(PETSC_COMM_WORLD,&mfn);
+
+<a name="line83"> 83: </a>  <font color="#B22222">/* </font>
+<a name="line84"> 84: </a><font color="#B22222">     Set operator matrix, the function to compute, and other options</font>
+<a name="line85"> 85: </a><font color="#B22222">  */</font>
+<a name="line86"> 86: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(mfn,A);
+<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&f);
+<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f,FNEXP);
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(f,t,1.0);  
+<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(mfn,1e-07,PETSC_DEFAULT);
+
+<a name="line92"> 92: </a>  <font color="#B22222">/*</font>
+<a name="line93"> 93: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line94"> 94: </a><font color="#B22222">  */</font>
+<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(mfn);
+
+<a name="line97"> 97: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line98"> 98: </a><font color="#B22222">                      Solve the problem, y=exp(t*A)*v</font>
+<a name="line99"> 99: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line101">101: </a>  <a href="../../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(mfn,v,y);
+<a name="line102">102: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(mfn,&reason);
+<a name="line103">103: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Solver did not converge"</font>);
+<a name="line104">104: </a>  VecNorm(y,NORM_2,&norm);
+<a name="line105">105: </a>  
+<a name="line106">106: </a>  <font color="#B22222">/*</font>
+<a name="line107">107: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line108">108: </a><font color="#B22222">  */</font>
+<a name="line109">109: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a>(mfn,&its);
+<a name="line110">110: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of iterations of the method: %D\n"</font>,its);
+<a name="line111">111: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>(mfn,&ncv);
+<a name="line112">112: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Subspace dimension: %D\n"</font>,ncv);
+<a name="line113">113: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>(mfn,&tol,&maxit);
+<a name="line114">114: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: tol=%.4g, maxit=%D\n"</font>,(double)tol,maxit);
+
+<a name="line116">116: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line117">117: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line118">118: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line119">119: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Computed vector at time t=%.4g has norm %g\n\n"</font>,(double)PetscRealPart(t),(double)norm);
+<a name="line120">120: </a>  <font color="#4169E1">if</font> (draw_sol) {
+<a name="line121">121: </a>    PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);
+<a name="line122">122: </a>    VecView(y,PETSC_VIEWER_DRAW_WORLD);
+<a name="line123">123: </a>  }
+
+<a name="line125">125: </a>  <font color="#B22222">/* </font>
+<a name="line126">126: </a><font color="#B22222">     Free work space</font>
+<a name="line127">127: </a><font color="#B22222">  */</font>
+<a name="line128">128: </a>  <a href="../../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(&mfn);
+<a name="line129">129: </a>  MatDestroy(&A);
+<a name="line130">130: </a>  VecDestroy(&v);
+<a name="line131">131: </a>  VecDestroy(&y);
+<a name="line132">132: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line133">133: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line134">134: </a>}
+
+<a name="line138">138: </a><font color="#B22222">/*</font>
+<a name="line139">139: </a><font color="#B22222">    Matrix generator for a Markov model of a random walk on a triangular grid.</font>
+<a name="line140">140: </a><font color="#B22222">    See ex5.c for additional details.</font>
+<a name="line141">141: </a><font color="#B22222">*/</font>
+<a name="line142">142: </a><strong><font color="#4169E1"><a name="MatMarkovModel"></a>PetscErrorCode MatMarkovModel(PetscInt m,Mat A)</font></strong>
+<a name="line143">143: </a>{
+<a name="line144">144: </a>  const PetscReal cst = 0.5/(PetscReal)(m-1);
+<a name="line145">145: </a>  PetscReal       pd,pu;
+<a name="line146">146: </a>  PetscInt        Istart,Iend,i,j,jmax,ix=0;
+<a name="line147">147: </a>  PetscErrorCode  ierr;
+
+<a name="line150">150: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
+<a name="line151">151: </a>  <font color="#4169E1">for</font> (i=1;i<=m;i++) {
+<a name="line152">152: </a>    jmax = m-i+1;
+<a name="line153">153: </a>    <font color="#4169E1">for</font> (j=1;j<=jmax;j++) {
+<a name="line154">154: </a>      ix = ix + 1;
+<a name="line155">155: </a>      <font color="#4169E1">if</font> (ix-1<Istart || ix>Iend) <font color="#4169E1">continue</font>;  <font color="#B22222">/* compute only owned rows */</font>
+<a name="line156">156: </a>      <font color="#4169E1">if</font> (j!=jmax) {
+<a name="line157">157: </a>        pd = cst*(PetscReal)(i+j-1);
+<a name="line158">158: </a>        <font color="#B22222">/* north */</font>
+<a name="line159">159: </a>        <font color="#4169E1">if</font> (i==1) {
+<a name="line160">160: </a>          MatSetValue(A,ix-1,ix,2*pd,INSERT_VALUES);
+<a name="line161">161: </a>        } <font color="#4169E1">else</font> {
+<a name="line162">162: </a>          MatSetValue(A,ix-1,ix,pd,INSERT_VALUES);
+<a name="line163">163: </a>        }
+<a name="line164">164: </a>        <font color="#B22222">/* east */</font>
+<a name="line165">165: </a>        <font color="#4169E1">if</font> (j==1) {
+<a name="line166">166: </a>          MatSetValue(A,ix-1,ix+jmax-1,2*pd,INSERT_VALUES);
+<a name="line167">167: </a>        } <font color="#4169E1">else</font> {
+<a name="line168">168: </a>          MatSetValue(A,ix-1,ix+jmax-1,pd,INSERT_VALUES);
+<a name="line169">169: </a>        }
+<a name="line170">170: </a>      }
+<a name="line171">171: </a>      <font color="#B22222">/* south */</font>
+<a name="line172">172: </a>      pu = 0.5 - cst*(PetscReal)(i+j-3);
+<a name="line173">173: </a>      <font color="#4169E1">if</font> (j>1) {
+<a name="line174">174: </a>        MatSetValue(A,ix-1,ix-2,pu,INSERT_VALUES);
+<a name="line175">175: </a>      }
+<a name="line176">176: </a>      <font color="#B22222">/* west */</font>
+<a name="line177">177: </a>      <font color="#4169E1">if</font> (i>1) {
+<a name="line178">178: </a>        MatSetValue(A,ix-1,ix-jmax-2,pu,INSERT_VALUES);
+<a name="line179">179: </a>      }
+<a name="line180">180: </a>    }
+<a name="line181">181: </a>  }
+<a name="line182">182: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
+<a name="line183">183: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
+<a name="line184">184: </a>  <font color="#4169E1">return</font>(0);
+<a name="line185">185: </a>}
 
 </pre>
 </body>
diff --git a/src/mfn/examples/tutorials/ex26.c b/src/mfn/examples/tutorials/ex26.c
new file mode 100644
index 0000000..e9a9276
--- /dev/null
+++ b/src/mfn/examples/tutorials/ex26.c
@@ -0,0 +1,143 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Computes the action of the square root of the 2-D Laplacian.\n\n"
+  "The command line options are:\n"
+  "  -n <n>, where <n> = number of grid subdivisions in x dimension.\n"
+  "  -m <m>, where <m> = number of grid subdivisions in y dimension.\n\n";
+
+#include <slepcmfn.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  Mat                A;           /* problem matrix */
+  MFN                mfn;
+  FN                 f;
+  PetscReal          norm;
+  Vec                v,y,z;
+  PetscInt           N,n=10,m,Istart,Iend,i,j,II;
+  PetscErrorCode     ierr;
+  PetscBool          flag,draw_sol;
+  MFNConvergedReason reason;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  if (!flag) m=n;
+  N = n*m;
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSquare root of Laplacian y=sqrt(A)*e_1, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
+
+  ierr = PetscOptionsHasName(NULL,NULL,"-draw_sol",&draw_sol);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                 Compute the discrete 2-D Laplacian, A
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr);
+  ierr = MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(A);CHKERRQ(ierr);
+  ierr = MatSetUp(A);CHKERRQ(ierr);
+
+  ierr = MatGetOwnershipRange(A,&Istart,&Iend);CHKERRQ(ierr);
+  for (II=Istart;II<Iend;II++) {
+    i = II/n; j = II-i*n;
+    if (i>0) { ierr = MatSetValue(A,II,II-n,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    if (i<m-1) { ierr = MatSetValue(A,II,II+n,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    if (j>0) { ierr = MatSetValue(A,II,II-1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    if (j<n-1) { ierr = MatSetValue(A,II,II+1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    ierr = MatSetValue(A,II,II,4.0,INSERT_VALUES);CHKERRQ(ierr);
+  }
+
+  ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+
+  /* set symmetry flag so that solver can exploit it */
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
+
+  /* set v = e_1 */
+  ierr = MatCreateVecs(A,NULL,&v);CHKERRQ(ierr);
+  ierr = VecSetValue(v,0,1.0,INSERT_VALUES);CHKERRQ(ierr);
+  ierr = VecAssemblyBegin(v);CHKERRQ(ierr);
+  ierr = VecAssemblyEnd(v);CHKERRQ(ierr);
+  ierr = VecDuplicate(v,&y);CHKERRQ(ierr);
+  ierr = VecDuplicate(v,&z);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+             Create the solver, set the matrix and the function
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  ierr = MFNCreate(PETSC_COMM_WORLD,&mfn);CHKERRQ(ierr);
+  ierr = MFNSetOperator(mfn,A);CHKERRQ(ierr);
+  ierr = MFNGetFN(mfn,&f);CHKERRQ(ierr);
+  ierr = FNSetType(f,FNSQRT);CHKERRQ(ierr);
+  ierr = MFNSetFromOptions(mfn);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                      First solve: y=sqrt(A)*v
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = MFNSolve(mfn,v,y);CHKERRQ(ierr);
+  ierr = MFNGetConvergedReason(mfn,&reason);CHKERRQ(ierr);
+  if (reason<0) SETERRQ(PETSC_COMM_WORLD,1,"Solver did not converge");
+  ierr = VecNorm(y,NORM_2,&norm);CHKERRQ(ierr);
+  
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Intermediate vector has norm %g\n",(double)norm);CHKERRQ(ierr);
+  if (draw_sol) {
+    ierr = PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);CHKERRQ(ierr);
+    ierr = VecView(y,PETSC_VIEWER_DRAW_WORLD);CHKERRQ(ierr);
+  }
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+             Second solve: z=sqrt(A)*y and compare against A*v
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = MFNSolve(mfn,y,z);CHKERRQ(ierr);
+  ierr = MFNGetConvergedReason(mfn,&reason);CHKERRQ(ierr);
+  if (reason<0) SETERRQ(PETSC_COMM_WORLD,1,"Solver did not converge");
+
+  ierr = MatMult(A,v,y);CHKERRQ(ierr);   /* overwrite y */
+  ierr = VecAXPY(y,-1.0,z);CHKERRQ(ierr);
+  ierr = VecNorm(y,NORM_2,&norm);CHKERRQ(ierr);
+  
+  if (norm<100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD," Error norm is less than 100*epsilon\n\n");CHKERRQ(ierr);
+  } else {
+    ierr = PetscPrintf(PETSC_COMM_WORLD," Error norm %3.1e\n\n",(double)norm);CHKERRQ(ierr);
+  }
+  if (draw_sol) {
+    ierr = PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);CHKERRQ(ierr);
+    ierr = VecView(z,PETSC_VIEWER_DRAW_WORLD);CHKERRQ(ierr);
+  }
+
+  /* 
+     Free work space
+  */
+  ierr = MFNDestroy(&mfn);CHKERRQ(ierr);
+  ierr = MatDestroy(&A);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&y);CHKERRQ(ierr);
+  ierr = VecDestroy(&z);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
diff --git a/src/mfn/examples/tutorials/ex26.c.html b/src/mfn/examples/tutorials/ex26.c.html
new file mode 100644
index 0000000..c6e33dd
--- /dev/null
+++ b/src/mfn/examples/tutorials/ex26.c.html
@@ -0,0 +1,157 @@
+<center><a href="ex26.c">Actual source code: ex26.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/examples/tutorials/ex26.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tutorials/ex26.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Computes the action of the square root of the 2-D Laplacian.\n\n"</font>
+<a name="line23"> 23: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line24"> 24: </a>  <font color="#666666">"  -n <n>, where <n> = number of grid subdivisions in x dimension.\n"</font>
+<a name="line25"> 25: </a>  <font color="#666666">"  -m <m>, where <m> = number of grid subdivisions in y dimension.\n\n"</font>;
+
+<a name="line27"> 27: </a><font color="#A020F0">#include <slepcmfn.h></font>
+
+<a name="line31"> 31: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line32"> 32: </a>{
+<a name="line33"> 33: </a>  Mat                A;           <font color="#B22222">/* problem matrix */</font>
+<a name="line34"> 34: </a>  <a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>                mfn;
+<a name="line35"> 35: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>                 f;
+<a name="line36"> 36: </a>  PetscReal          norm;
+<a name="line37"> 37: </a>  Vec                v,y,z;
+<a name="line38"> 38: </a>  PetscInt           N,n=10,m,Istart,Iend,i,j,II;
+<a name="line39"> 39: </a>  PetscErrorCode     ierr;
+<a name="line40"> 40: </a>  PetscBool          flag,draw_sol;
+<a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> reason;
+
+<a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line47"> 47: </a>  <font color="#4169E1">if</font> (!flag) m=n;
+<a name="line48"> 48: </a>  N = n*m;
+<a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSquare root of Laplacian y=sqrt(A)*e_1, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
+
+<a name="line51"> 51: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-draw_sol"</font>,&draw_sol);
+
+<a name="line53"> 53: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line54"> 54: </a><font color="#B22222">                 Compute the discrete 2-D Laplacian, A</font>
+<a name="line55"> 55: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line57"> 57: </a>  MatCreate(PETSC_COMM_WORLD,&A);
+<a name="line58"> 58: </a>  MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line59"> 59: </a>  MatSetFromOptions(A);
+<a name="line60"> 60: </a>  MatSetUp(A);
+
+<a name="line62"> 62: </a>  MatGetOwnershipRange(A,&Istart,&Iend);
+<a name="line63"> 63: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line64"> 64: </a>    i = II/n; j = II-i*n;
+<a name="line65"> 65: </a>    <font color="#4169E1">if</font> (i>0) { MatSetValue(A,II,II-n,-1.0,INSERT_VALUES); }
+<a name="line66"> 66: </a>    <font color="#4169E1">if</font> (i<m-1) { MatSetValue(A,II,II+n,-1.0,INSERT_VALUES); }
+<a name="line67"> 67: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(A,II,II-1,-1.0,INSERT_VALUES); }
+<a name="line68"> 68: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(A,II,II+1,-1.0,INSERT_VALUES); }
+<a name="line69"> 69: </a>    MatSetValue(A,II,II,4.0,INSERT_VALUES);
+<a name="line70"> 70: </a>  }
+
+<a name="line72"> 72: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
+<a name="line73"> 73: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
+
+<a name="line75"> 75: </a>  <font color="#B22222">/* set symmetry flag so that solver can exploit it */</font>
+<a name="line76"> 76: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
+
+<a name="line78"> 78: </a>  <font color="#B22222">/* set v = e_1 */</font>
+<a name="line79"> 79: </a>  MatCreateVecs(A,NULL,&v);
+<a name="line80"> 80: </a>  VecSetValue(v,0,1.0,INSERT_VALUES);
+<a name="line81"> 81: </a>  VecAssemblyBegin(v);
+<a name="line82"> 82: </a>  VecAssemblyEnd(v);
+<a name="line83"> 83: </a>  VecDuplicate(v,&y);
+<a name="line84"> 84: </a>  VecDuplicate(v,&z);
+
+<a name="line86"> 86: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line87"> 87: </a><font color="#B22222">             Create the solver, set the matrix and the function</font>
+<a name="line88"> 88: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(PETSC_COMM_WORLD,&mfn);
+<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(mfn,A);
+<a name="line91"> 91: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&f);
+<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f,FNSQRT);
+<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(mfn);
+
+<a name="line95"> 95: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line96"> 96: </a><font color="#B22222">                      First solve: y=sqrt(A)*v</font>
+<a name="line97"> 97: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(mfn,v,y);
+<a name="line100">100: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(mfn,&reason);
+<a name="line101">101: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Solver did not converge"</font>);
+<a name="line102">102: </a>  VecNorm(y,NORM_2,&norm);
+<a name="line103">103: </a>  
+<a name="line104">104: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Intermediate vector has norm %g\n"</font>,(double)norm);
+<a name="line105">105: </a>  <font color="#4169E1">if</font> (draw_sol) {
+<a name="line106">106: </a>    PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);
+<a name="line107">107: </a>    VecView(y,PETSC_VIEWER_DRAW_WORLD);
+<a name="line108">108: </a>  }
+
+<a name="line110">110: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line111">111: </a><font color="#B22222">             Second solve: z=sqrt(A)*y and compare against A*v</font>
+<a name="line112">112: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line114">114: </a>  <a href="../../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(mfn,y,z);
+<a name="line115">115: </a>  <a href="../../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(mfn,&reason);
+<a name="line116">116: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Solver did not converge"</font>);
+
+<a name="line118">118: </a>  MatMult(A,v,y);   <font color="#B22222">/* overwrite y */</font>
+<a name="line119">119: </a>  VecAXPY(y,-1.0,z);
+<a name="line120">120: </a>  VecNorm(y,NORM_2,&norm);
+<a name="line121">121: </a>  
+<a name="line122">122: </a>  <font color="#4169E1">if</font> (norm<100*PETSC_MACHINE_EPSILON) {
+<a name="line123">123: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Error norm is less than 100*epsilon\n\n"</font>);
+<a name="line124">124: </a>  } <font color="#4169E1">else</font> {
+<a name="line125">125: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Error norm %3.1e\n\n"</font>,(double)norm);
+<a name="line126">126: </a>  }
+<a name="line127">127: </a>  <font color="#4169E1">if</font> (draw_sol) {
+<a name="line128">128: </a>    PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);
+<a name="line129">129: </a>    VecView(z,PETSC_VIEWER_DRAW_WORLD);
+<a name="line130">130: </a>  }
+
+<a name="line132">132: </a>  <font color="#B22222">/* </font>
+<a name="line133">133: </a><font color="#B22222">     Free work space</font>
+<a name="line134">134: </a><font color="#B22222">  */</font>
+<a name="line135">135: </a>  <a href="../../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(&mfn);
+<a name="line136">136: </a>  MatDestroy(&A);
+<a name="line137">137: </a>  VecDestroy(&v);
+<a name="line138">138: </a>  VecDestroy(&y);
+<a name="line139">139: </a>  VecDestroy(&z);
+<a name="line140">140: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line141">141: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line142">142: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/mfn/examples/tutorials/index.html b/src/mfn/examples/tutorials/index.html
index 7dc759f..4652923 100644
--- a/src/mfn/examples/tutorials/index.html
+++ b/src/mfn/examples/tutorials/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
@@ -15,6 +15,7 @@ Matrix Function (MFN) is the object provided by SLEPc for computing the action o
 </p>
 
 <p>
-<a href="ex23.c.html">ex23.c: Computes exp(A)*v for a matrix associated with a Markov model</a><br>
+<a href="ex23.c.html">ex23.c: Computes exp(t*A)*v for a matrix associated with a Markov model</a><br>
+<a href="ex26.c.html">ex26.c: Computes the action of the square root of the 2-D Laplacian</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/mfn/examples/tutorials/makefile b/src/mfn/examples/tutorials/makefile
index 43d2ecc..93c2744 100644
--- a/src/mfn/examples/tutorials/makefile
+++ b/src/mfn/examples/tutorials/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,11 +24,11 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/mfn/examples/tutorials/
-EXAMPLESC  = ex23.c
+EXAMPLESC  = ex23.c ex26.c
 EXAMPLESF  =
 MANSEC     = MFN
 
-TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm
+TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm ex26.PETSc runex26_1 ex26.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -36,11 +36,21 @@ ex23: ex23.o chkopts
 	-${CLINKER} -o ex23 ex23.o ${SLEPC_MFN_LIB}
 	${RM} ex23.o
 
+ex26: ex26.o chkopts
+	-${CLINKER} -o ex26 ex26.o ${SLEPC_MFN_LIB}
+	${RM} ex26.o
+
 #------------------------------------------------------------------------------------
 
 runex23_1:
-	-@${MPIEXEC} -np 1 ./ex23 > ex23_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex23 > ex23_1.tmp 2>&1; \
 	   if (${DIFF} output/ex23_1.out ex23_1.tmp) then true; \
 	   else echo "Possible problem with ex23_1, diffs above"; fi; \
 	   ${RM} -f ex23_1.tmp
 
+runex26_1:
+	-@${MPIEXEC} -n 1 ./ex26 > ex26_1.tmp 2>&1; \
+	   if (${DIFF} output/ex26_1.out ex26_1.tmp) then true; \
+	   else echo "Possible problem with ex26_1, diffs above"; fi; \
+	   ${RM} -f ex26_1.tmp
+
diff --git a/src/mfn/examples/tutorials/makefile.html b/src/mfn/examples/tutorials/makefile.html
index 7a45f36..bdc3004 100644
--- a/src/mfn/examples/tutorials/makefile.html
+++ b/src/mfn/examples/tutorials/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/examples/tutorials/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,11 +35,11 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/mfn/examples/tutorials/
-EXAMPLESC  = ex23.c
+EXAMPLESC  = ex23.c ex26.c
 EXAMPLESF  =
 MANSEC     = <a href="ROOT/docs/manualpages/MFN/MFN.html#MFN">MFN</a>
 
-TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm
+TESTEXAMPLES_C = ex23.PETSc runex23_1 ex23.rm ex26.PETSc runex26_1 ex26.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -47,14 +47,24 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o ex23 ex23.o ${SLEPC_MFN_LIB}
 	${RM} ex23.o
 
+<strong><font color="#FF0000">ex26:</font></strong> ex26.o chkopts
+	-${CLINKER} -o ex26 ex26.o ${SLEPC_MFN_LIB}
+	${RM} ex26.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 
 <strong><font color="#FF0000">runex23_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex23 > ex23_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex23 > ex23_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex23_1.out ex23_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex23_1, diffs above"</font>; fi; \
 	   ${RM} -f ex23_1.tmp
 
+<strong><font color="#FF0000">runex26_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex26 > ex26_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex26_1.out ex26_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex26_1, diffs above"</font>; fi; \
+	   ${RM} -f ex26_1.tmp
+
 </pre>
 </body>
 
diff --git a/src/mfn/examples/tutorials/output/ex23_1.out b/src/mfn/examples/tutorials/output/ex23_1.out
index b2ba5a0..b7e8153 100644
--- a/src/mfn/examples/tutorials/output/ex23_1.out
+++ b/src/mfn/examples/tutorials/output/ex23_1.out
@@ -1,7 +1,7 @@
 
 Markov y=exp(t*A)*e_1, N=120 (m=15)
 
- Number of iterations of the method: 1
+ Number of iterations of the method: 2
  Subspace dimension: 30
  Stopping condition: tol=1e-07, maxit=100
  Computed vector at time t=2 has norm 2.47328
diff --git a/src/mfn/examples/tutorials/output/ex26_1.out b/src/mfn/examples/tutorials/output/ex26_1.out
new file mode 100644
index 0000000..83c15b8
--- /dev/null
+++ b/src/mfn/examples/tutorials/output/ex26_1.out
@@ -0,0 +1,6 @@
+
+Square root of Laplacian y=sqrt(A)*e_1, N=100 (10x10 grid)
+
+ Intermediate vector has norm 2.
+ Error norm 1.1e-10
+
diff --git a/src/mfn/f90-mod/index.html b/src/mfn/f90-mod/index.html
index 4ad6c1e..38f7a37 100644
--- a/src/mfn/f90-mod/index.html
+++ b/src/mfn/f90-mod/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/mfn/f90-mod/makefile b/src/mfn/f90-mod/makefile
index 29e279b..c1d6c99 100644
--- a/src/mfn/f90-mod/makefile
+++ b/src/mfn/f90-mod/makefile
@@ -1,7 +1,7 @@
 
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/mfn/f90-mod/makefile.html b/src/mfn/f90-mod/makefile.html
index b7de112..16a5c6e 100644
--- a/src/mfn/f90-mod/makefile.html
+++ b/src/mfn/f90-mod/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/f90-mod/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:32+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80">
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/mfn/f90-mod/slepcmfnmod.F b/src/mfn/f90-mod/slepcmfnmod.F
index 8c21f01..a6431c4 100644
--- a/src/mfn/f90-mod/slepcmfnmod.F
+++ b/src/mfn/f90-mod/slepcmfnmod.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
diff --git a/src/mfn/f90-mod/slepcmfnmod.F.html b/src/mfn/f90-mod/slepcmfnmod.F.html
index 965ed7d..21c8869 100644
--- a/src/mfn/f90-mod/slepcmfnmod.F.html
+++ b/src/mfn/f90-mod/slepcmfnmod.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/f90-mod/slepcmfnmod.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/f90-mod/slepcmfnmod.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/f90-mod/slepcmfnmod.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
diff --git a/src/mfn/impls/expokit/index.html b/src/mfn/impls/expokit/index.html
new file mode 100644
index 0000000..2835dc7
--- /dev/null
+++ b/src/mfn/impls/expokit/index.html
@@ -0,0 +1,21 @@
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/impls/expokit/index.html" />
+  <link rel="stylesheet" href="/slepc.css" type="text/css">
+  <title>Matrix Function - MFN</title>
+</head>
+
+<body class="manpageindex">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/expokit/index.html "><small>Report Typos and Errors</small></a></div>
+
+<h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
+
+<p>
+Matrix Function (MFN) is the object provided by SLEPc for computing the action of a matrix function on a vector. Given a matrix <i>A</i> and a vector <i>b</i>, the call <code>MFNSolve(mfn,b,x)</code> computes <i>x=f(A)b</i>, where <i>f</i> is a function such as the exponential.
+</p>
+
+<p>
+ 
+<a href="mfnexpokit.c.html">mfnexpokit.c</a><br>
+ 
+<a href="makefile.html">makefile</a><br>
diff --git a/src/mfn/impls/expokit/makefile b/src/mfn/impls/expokit/makefile
new file mode 100644
index 0000000..8246a5a
--- /dev/null
+++ b/src/mfn/impls/expokit/makefile
@@ -0,0 +1,36 @@
+#
+#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#  SLEPc - Scalable Library for Eigenvalue Problem Computations
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+#
+#  This file is part of SLEPc.
+#
+#  SLEPc is free software: you can redistribute it and/or modify it under  the
+#  terms of version 3 of the GNU Lesser General Public License as published by
+#  the Free Software Foundation.
+#
+#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+#  more details.
+#
+#  You  should have received a copy of the GNU Lesser General  Public  License
+#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#
+
+ALL: lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = mfnexpokit.c
+SOURCEF  =
+SOURCEH  =
+LIBBASE  = libslepcmfn
+DIRS     =
+MANSEC   = MFN
+LOCDIR   = src/mfn/impls/expokit/
+
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
+
+
diff --git a/src/mfn/impls/expokit/makefile.html b/src/mfn/impls/expokit/makefile.html
new file mode 100644
index 0000000..9cfa74a
--- /dev/null
+++ b/src/mfn/impls/expokit/makefile.html
@@ -0,0 +1,51 @@
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/impls/expokit/makefile.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/expokit/makefile.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><font color="#A020F0">#</font>
+<font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  This file is part of SLEPc.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<font color="#A020F0">#  terms of version 3 of the GNU Lesser General Public License as published by</font>
+<font color="#A020F0">#  the Free Software Foundation.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<font color="#A020F0">#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<font color="#A020F0">#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<font color="#A020F0">#  more details.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  You  should have received a copy of the GNU Lesser General  Public  License</font>
+<font color="#A020F0">#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<font color="#A020F0">#</font>
+
+<strong><font color="#FF0000">ALL:</font></strong> lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = mfnexpokit.c
+SOURCEF  =
+SOURCEH  =
+LIBBASE  = libslepcmfn
+DIRS     =
+MANSEC   = <a href="ROOT/docs/manualpages/MFN/MFN.html#MFN">MFN</a>
+LOCDIR   = src/mfn/impls/expokit/
+
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
+
+
+</pre>
+</body>
+
+</html>
diff --git a/src/mfn/impls/expokit/mfnexpokit.c b/src/mfn/impls/expokit/mfnexpokit.c
new file mode 100644
index 0000000..e46d84a
--- /dev/null
+++ b/src/mfn/impls/expokit/mfnexpokit.c
@@ -0,0 +1,206 @@
+/*
+
+   SLEPc matrix function solver: "expokit"
+
+   Method: Arnoldi method tailored for the matrix exponential
+
+   Algorithm:
+
+       Uses Arnoldi relations to compute exp(t_step*A)*v_last for
+       several time steps.
+
+   References:
+
+       [1] R. Sidje, "Expokit: a software package for computing matrix
+           exponentials", ACM Trans. Math. Softw. 24(1):130-156, 1998.
+
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+#include <slepc/private/mfnimpl.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "MFNSetUp_Expokit"
+PetscErrorCode MFNSetUp_Expokit(MFN mfn)
+{
+  PetscErrorCode ierr;
+  PetscInt       N;
+  PetscBool      isexp;
+
+  PetscFunctionBegin;
+  ierr = MatGetSize(mfn->A,&N,NULL);CHKERRQ(ierr);
+  if (!mfn->ncv) mfn->ncv = PetscMin(30,N);
+  if (!mfn->max_it) mfn->max_it = 100;
+  ierr = MFNAllocateSolution(mfn,2);CHKERRQ(ierr);
+
+  ierr = PetscObjectTypeCompare((PetscObject)mfn->fn,FNEXP,&isexp);CHKERRQ(ierr);
+  if (!isexp) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"This solver only supports the exponential function");
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MFNSolve_Expokit"
+PetscErrorCode MFNSolve_Expokit(MFN mfn,Vec b,Vec x)
+{
+  PetscErrorCode ierr;
+  PetscInt       mxstep,mxrej,m,mb,ld,i,j,ireject,mx,k1;
+  Vec            v,r;
+  Mat            M=NULL,K=NULL;
+  FN             fn;
+  PetscScalar    *H,*B,*F,*betaF,t,sgn,sfactor;
+  PetscReal      anorm,avnorm,tol,err_loc,rndoff;
+  PetscReal      t_out,t_new,t_now,t_step;
+  PetscReal      xm,fact,s,p1,p2;
+  PetscReal      beta,beta2,gamma,delta;
+  PetscBool      breakdown;
+
+  PetscFunctionBegin;
+  m   = mfn->ncv;
+  tol = mfn->tol;
+  mxstep = mfn->max_it;
+  mxrej = 10;
+  gamma = 0.9;
+  delta = 1.2;
+  mb    = m;
+  ierr = FNGetScale(mfn->fn,&t,&sfactor);CHKERRQ(ierr);
+  ierr = FNDuplicate(mfn->fn,PetscObjectComm((PetscObject)mfn->fn),&fn);CHKERRQ(ierr);
+  ierr = FNSetScale(fn,1.0,1.0);CHKERRQ(ierr);
+  t_out = PetscAbsScalar(t);
+  t_now = 0.0;
+  ierr = MatNorm(mfn->A,NORM_INFINITY,&anorm);CHKERRQ(ierr);
+  rndoff = anorm*PETSC_MACHINE_EPSILON;
+
+  k1 = 2;
+  xm = 1.0/(PetscReal)m;
+  beta = mfn->bnorm;
+  fact = PetscPowRealInt((m+1)/2.72,m+1)*PetscSqrtReal(2*PETSC_PI*(m+1));
+  t_new = (1.0/anorm)*PetscPowReal((fact*tol)/(4.0*beta*anorm),xm);
+  s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_new))-1);
+  t_new = PetscCeilReal(t_new/s)*s;
+  sgn = t/PetscAbsScalar(t);
+
+  ierr = VecCopy(b,x);CHKERRQ(ierr);
+  ld = m+2;
+  ierr = PetscCalloc3(m+1,&betaF,ld*ld,&H,ld*ld,&B);CHKERRQ(ierr);
+
+  while (mfn->reason == MFN_CONVERGED_ITERATING) {
+    mfn->its++;
+    if (PetscIsInfOrNanReal(t_new)) t_new = PETSC_MAX_REAL;
+    t_step = PetscMin(t_out-t_now,t_new);
+    ierr = BVInsertVec(mfn->V,0,x);CHKERRQ(ierr);
+    ierr = BVScaleColumn(mfn->V,0,1.0/beta);CHKERRQ(ierr);
+    ierr = MFNBasicArnoldi(mfn,H,ld,0,&mb,&beta2,&breakdown);CHKERRQ(ierr);
+    if (breakdown) {
+      k1 = 0;
+      t_step = t_out-t_now;
+    }
+    if (k1!=0) {
+      H[m+1+ld*m] = 1.0;
+      ierr = BVGetColumn(mfn->V,m,&v);CHKERRQ(ierr);
+      ierr = BVGetColumn(mfn->V,m+1,&r);CHKERRQ(ierr);
+      ierr = MatMult(mfn->A,v,r);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(mfn->V,m,&v);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(mfn->V,m+1,&r);CHKERRQ(ierr);
+      ierr = BVNormColumn(mfn->V,m+1,NORM_2,&avnorm);CHKERRQ(ierr);
+    }
+    ierr = PetscMemcpy(B,H,ld*ld*sizeof(PetscScalar));CHKERRQ(ierr);
+
+    ireject = 0;
+    while (ireject <= mxrej) {
+      mx = mb + k1;
+      for (i=0;i<mx;i++) {
+        for (j=0;j<mx;j++) {
+          H[i+j*ld] = sgn*B[i+j*ld]*t_step;
+        }
+      }
+      ierr = MFN_CreateDenseMat(mx,&M);CHKERRQ(ierr);
+      ierr = MFN_CreateDenseMat(mx,&K);CHKERRQ(ierr);
+      ierr = MatDenseGetArray(M,&F);CHKERRQ(ierr);
+      for (j=0;j<mx;j++) {
+        ierr = PetscMemcpy(F+j*mx,H+j*ld,mx*sizeof(PetscScalar));CHKERRQ(ierr);
+      }
+      ierr = MatDenseRestoreArray(M,&F);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMat(fn,M,K);CHKERRQ(ierr);
+
+      if (k1==0) {
+        err_loc = tol;
+        break;
+      } else {
+        ierr = MatDenseGetArray(K,&F);CHKERRQ(ierr);
+        p1 = PetscAbsScalar(beta*F[m]);
+        p2 = PetscAbsScalar(beta*F[m+1]*avnorm);
+        ierr = MatDenseRestoreArray(K,&F);CHKERRQ(ierr);
+        if (p1 > 10*p2) {
+          err_loc = p2;
+          xm = 1.0/(PetscReal)m;
+        } else if (p1 > p2) {
+          err_loc = (p1*p2)/(p1-p2);
+          xm = 1.0/(PetscReal)m;
+        } else {
+          err_loc = p1;
+          xm = 1.0/(PetscReal)(m-1);
+        }
+      }
+      if (err_loc <= delta*t_step*tol) break;
+      else {
+        t_step = gamma*t_step*PetscPowReal(t_step*tol/err_loc,xm);
+        s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_step))-1);
+        t_step = PetscCeilReal(t_step/s)*s;
+        ireject = ireject+1;
+      }
+    }
+
+    mx = mb + PetscMax(0,k1-1);
+    ierr = MatDenseGetArray(K,&F);CHKERRQ(ierr);
+    for (j=0;j<mx;j++) betaF[j] = beta*F[j];
+    ierr = MatDenseRestoreArray(K,&F);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(mfn->V,0,mx);CHKERRQ(ierr);
+    ierr = BVMultVec(mfn->V,1.0,0.0,x,betaF);CHKERRQ(ierr);
+    ierr = VecNorm(x,NORM_2,&beta);CHKERRQ(ierr);
+
+    t_now = t_now+t_step;
+    if (t_now>=t_out) mfn->reason = MFN_CONVERGED_TOL;
+    else {
+      t_new = gamma*t_step*PetscPowReal((t_step*tol)/err_loc,xm);
+      s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_new))-1);
+      t_new = PetscCeilReal(t_new/s)*s;
+    }
+    err_loc = PetscMax(err_loc,rndoff);
+    if (mfn->its==mxstep) mfn->reason = MFN_DIVERGED_ITS;
+    ierr = MFNMonitor(mfn,mfn->its,err_loc);CHKERRQ(ierr);
+  }
+  ierr = VecScale(x,sfactor);CHKERRQ(ierr);
+
+  ierr = MatDestroy(&M);CHKERRQ(ierr);
+  ierr = MatDestroy(&K);CHKERRQ(ierr);
+  ierr = FNDestroy(&fn);CHKERRQ(ierr);
+  ierr = PetscFree3(betaF,H,B);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MFNCreate_Expokit"
+PETSC_EXTERN PetscErrorCode MFNCreate_Expokit(MFN mfn)
+{
+  PetscFunctionBegin;
+  mfn->ops->solve          = MFNSolve_Expokit;
+  mfn->ops->setup          = MFNSetUp_Expokit;
+  PetscFunctionReturn(0);
+}
diff --git a/src/mfn/impls/expokit/mfnexpokit.c.html b/src/mfn/impls/expokit/mfnexpokit.c.html
new file mode 100644
index 0000000..818b4e7
--- /dev/null
+++ b/src/mfn/impls/expokit/mfnexpokit.c.html
@@ -0,0 +1,211 @@
+<center><a href="mfnexpokit.c">Actual source code: mfnexpokit.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/impls/expokit/mfnexpokit.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/expokit/mfnexpokit.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+
+<a name="line3">  3: </a><font color="#B22222">   SLEPc matrix function solver: "expokit"</font>
+
+<a name="line5">  5: </a><font color="#B22222">   Method: Arnoldi method tailored for the matrix exponential</font>
+
+<a name="line7">  7: </a><font color="#B22222">   Algorithm:</font>
+
+<a name="line9">  9: </a><font color="#B22222">       Uses Arnoldi relations to compute exp(t_step*A)*v_last for</font>
+<a name="line10"> 10: </a><font color="#B22222">       several time steps.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   References:</font>
+
+<a name="line14"> 14: </a><font color="#B22222">       [1] R. Sidje, "Expokit: a software package for computing matrix</font>
+<a name="line15"> 15: </a><font color="#B22222">           exponentials", ACM Trans. Math. Softw. 24(1):130-156, 1998.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line23"> 23: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line24"> 24: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line25"> 25: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line27"> 27: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line28"> 28: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line29"> 29: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line30"> 30: </a><font color="#B22222">   more details.</font>
+
+<a name="line32"> 32: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line33"> 33: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line34"> 34: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line35"> 35: </a><font color="#B22222">*/</font>
+
+<a name="line37"> 37: </a><font color="#A020F0">#include <slepc/private/mfnimpl.h></font>
+
+<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="MFNSetUp_Expokit"></a>PetscErrorCode MFNSetUp_Expokit(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
+<a name="line42"> 42: </a>{
+<a name="line44"> 44: </a>  PetscInt       N;
+<a name="line45"> 45: </a>  PetscBool      isexp;
+
+<a name="line48"> 48: </a>  MatGetSize(mfn->A,&N,NULL);
+<a name="line49"> 49: </a>  <font color="#4169E1">if</font> (!mfn->ncv) mfn->ncv = PetscMin(30,N);
+<a name="line50"> 50: </a>  <font color="#4169E1">if</font> (!mfn->max_it) mfn->max_it = 100;
+<a name="line51"> 51: </a>  <a href="../../../../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a>(mfn,2);
+
+<a name="line53"> 53: </a>  PetscObjectTypeCompare((PetscObject)mfn->fn,FNEXP,&isexp);
+<a name="line54"> 54: </a>  <font color="#4169E1">if</font> (!isexp) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"This solver only supports the exponential function"</font>);
+<a name="line55"> 55: </a>  <font color="#4169E1">return</font>(0);
+<a name="line56"> 56: </a>}
+
+<a name="line60"> 60: </a><strong><font color="#4169E1"><a name="MFNSolve_Expokit"></a>PetscErrorCode MFNSolve_Expokit(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,Vec b,Vec x)</font></strong>
+<a name="line61"> 61: </a>{
+<a name="line63"> 63: </a>  PetscInt       mxstep,mxrej,m,mb,ld,i,j,ireject,mx,k1;
+<a name="line64"> 64: </a>  Vec            v,r;
+<a name="line65"> 65: </a>  Mat            M=NULL,K=NULL;
+<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
+<a name="line67"> 67: </a>  PetscScalar    *H,*B,*F,*betaF,t,sgn,sfactor;
+<a name="line68"> 68: </a>  PetscReal      anorm,avnorm,tol,err_loc,rndoff;
+<a name="line69"> 69: </a>  PetscReal      t_out,t_new,t_now,t_step;
+<a name="line70"> 70: </a>  PetscReal      xm,fact,s,p1,p2;
+<a name="line71"> 71: </a>  PetscReal      beta,beta2,gamma,delta;
+<a name="line72"> 72: </a>  PetscBool      breakdown;
+
+<a name="line75"> 75: </a>  m   = mfn->ncv;
+<a name="line76"> 76: </a>  tol = mfn->tol;
+<a name="line77"> 77: </a>  mxstep = mfn->max_it;
+<a name="line78"> 78: </a>  mxrej = 10;
+<a name="line79"> 79: </a>  gamma = 0.9;
+<a name="line80"> 80: </a>  delta = 1.2;
+<a name="line81"> 81: </a>  mb    = m;
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(mfn->fn,&t,&sfactor);
+<a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(mfn->fn,PetscObjectComm((PetscObject)mfn->fn),&fn);
+<a name="line84"> 84: </a>  <a href="../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,1.0,1.0);
+<a name="line85"> 85: </a>  t_out = PetscAbsScalar(t);
+<a name="line86"> 86: </a>  t_now = 0.0;
+<a name="line87"> 87: </a>  MatNorm(mfn->A,NORM_INFINITY,&anorm);
+<a name="line88"> 88: </a>  rndoff = anorm*PETSC_MACHINE_EPSILON;
+
+<a name="line90"> 90: </a>  k1 = 2;
+<a name="line91"> 91: </a>  xm = 1.0/(PetscReal)m;
+<a name="line92"> 92: </a>  beta = mfn->bnorm;
+<a name="line93"> 93: </a>  fact = PetscPowRealInt((m+1)/2.72,m+1)*PetscSqrtReal(2*PETSC_PI*(m+1));
+<a name="line94"> 94: </a>  t_new = (1.0/anorm)*PetscPowReal((fact*tol)/(4.0*beta*anorm),xm);
+<a name="line95"> 95: </a>  s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_new))-1);
+<a name="line96"> 96: </a>  t_new = PetscCeilReal(t_new/s)*s;
+<a name="line97"> 97: </a>  sgn = t/PetscAbsScalar(t);
+
+<a name="line99"> 99: </a>  VecCopy(b,x);
+<a name="line100">100: </a>  ld = m+2;
+<a name="line101">101: </a>  PetscCalloc3(m+1,&betaF,ld*ld,&H,ld*ld,&B);
+
+<a name="line103">103: </a>  <font color="#4169E1">while</font> (mfn->reason == MFN_CONVERGED_ITERATING) {
+<a name="line104">104: </a>    mfn->its++;
+<a name="line105">105: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(t_new)) t_new = PETSC_MAX_REAL;
+<a name="line106">106: </a>    t_step = PetscMin(t_out-t_now,t_new);
+<a name="line107">107: </a>    <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(mfn->V,0,x);
+<a name="line108">108: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(mfn->V,0,1.0/beta);
+<a name="line109">109: </a>    MFNBasicArnoldi(mfn,H,ld,0,&mb,&beta2,&breakdown);
+<a name="line110">110: </a>    <font color="#4169E1">if</font> (breakdown) {
+<a name="line111">111: </a>      k1 = 0;
+<a name="line112">112: </a>      t_step = t_out-t_now;
+<a name="line113">113: </a>    }
+<a name="line114">114: </a>    <font color="#4169E1">if</font> (k1!=0) {
+<a name="line115">115: </a>      H[m+1+ld*m] = 1.0;
+<a name="line116">116: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(mfn->V,m,&v);
+<a name="line117">117: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(mfn->V,m+1,&r);
+<a name="line118">118: </a>      MatMult(mfn->A,v,r);
+<a name="line119">119: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(mfn->V,m,&v);
+<a name="line120">120: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(mfn->V,m+1,&r);
+<a name="line121">121: </a>      <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(mfn->V,m+1,NORM_2,&avnorm);
+<a name="line122">122: </a>    }
+<a name="line123">123: </a>    PetscMemcpy(B,H,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+
+<a name="line125">125: </a>    ireject = 0;
+<a name="line126">126: </a>    <font color="#4169E1">while</font> (ireject <= mxrej) {
+<a name="line127">127: </a>      mx = mb + k1;
+<a name="line128">128: </a>      <font color="#4169E1">for</font> (i=0;i<mx;i++) {
+<a name="line129">129: </a>        <font color="#4169E1">for</font> (j=0;j<mx;j++) {
+<a name="line130">130: </a>          H[i+j*ld] = sgn*B[i+j*ld]*t_step;
+<a name="line131">131: </a>        }
+<a name="line132">132: </a>      }
+<a name="line133">133: </a>      MFN_CreateDenseMat(mx,&M);
+<a name="line134">134: </a>      MFN_CreateDenseMat(mx,&K);
+<a name="line135">135: </a>      MatDenseGetArray(M,&F);
+<a name="line136">136: </a>      <font color="#4169E1">for</font> (j=0;j<mx;j++) {
+<a name="line137">137: </a>        PetscMemcpy(F+j*mx,H+j*ld,mx*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line138">138: </a>      }
+<a name="line139">139: </a>      MatDenseRestoreArray(M,&F);
+<a name="line140">140: </a>      <a href="../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,M,K);
+
+<a name="line142">142: </a>      <font color="#4169E1">if</font> (k1==0) {
+<a name="line143">143: </a>        err_loc = tol;
+<a name="line144">144: </a>        <font color="#4169E1">break</font>;
+<a name="line145">145: </a>      } <font color="#4169E1">else</font> {
+<a name="line146">146: </a>        MatDenseGetArray(K,&F);
+<a name="line147">147: </a>        p1 = PetscAbsScalar(beta*F[m]);
+<a name="line148">148: </a>        p2 = PetscAbsScalar(beta*F[m+1]*avnorm);
+<a name="line149">149: </a>        MatDenseRestoreArray(K,&F);
+<a name="line150">150: </a>        <font color="#4169E1">if</font> (p1 > 10*p2) {
+<a name="line151">151: </a>          err_loc = p2;
+<a name="line152">152: </a>          xm = 1.0/(PetscReal)m;
+<a name="line153">153: </a>        } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (p1 > p2) {
+<a name="line154">154: </a>          err_loc = (p1*p2)/(p1-p2);
+<a name="line155">155: </a>          xm = 1.0/(PetscReal)m;
+<a name="line156">156: </a>        } <font color="#4169E1">else</font> {
+<a name="line157">157: </a>          err_loc = p1;
+<a name="line158">158: </a>          xm = 1.0/(PetscReal)(m-1);
+<a name="line159">159: </a>        }
+<a name="line160">160: </a>      }
+<a name="line161">161: </a>      <font color="#4169E1">if</font> (err_loc <= delta*t_step*tol) <font color="#4169E1">break</font>;
+<a name="line162">162: </a>      <font color="#4169E1">else</font> {
+<a name="line163">163: </a>        t_step = gamma*t_step*PetscPowReal(t_step*tol/err_loc,xm);
+<a name="line164">164: </a>        s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_step))-1);
+<a name="line165">165: </a>        t_step = PetscCeilReal(t_step/s)*s;
+<a name="line166">166: </a>        ireject = ireject+1;
+<a name="line167">167: </a>      }
+<a name="line168">168: </a>    }
+
+<a name="line170">170: </a>    mx = mb + PetscMax(0,k1-1);
+<a name="line171">171: </a>    MatDenseGetArray(K,&F);
+<a name="line172">172: </a>    <font color="#4169E1">for</font> (j=0;j<mx;j++) betaF[j] = beta*F[j];
+<a name="line173">173: </a>    MatDenseRestoreArray(K,&F);
+<a name="line174">174: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(mfn->V,0,mx);
+<a name="line175">175: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(mfn->V,1.0,0.0,x,betaF);
+<a name="line176">176: </a>    VecNorm(x,NORM_2,&beta);
+
+<a name="line178">178: </a>    t_now = t_now+t_step;
+<a name="line179">179: </a>    <font color="#4169E1">if</font> (t_now>=t_out) mfn->reason = MFN_CONVERGED_TOL;
+<a name="line180">180: </a>    <font color="#4169E1">else</font> {
+<a name="line181">181: </a>      t_new = gamma*t_step*PetscPowReal((t_step*tol)/err_loc,xm);
+<a name="line182">182: </a>      s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_new))-1);
+<a name="line183">183: </a>      t_new = PetscCeilReal(t_new/s)*s;
+<a name="line184">184: </a>    }
+<a name="line185">185: </a>    err_loc = PetscMax(err_loc,rndoff);
+<a name="line186">186: </a>    <font color="#4169E1">if</font> (mfn->its==mxstep) mfn->reason = MFN_DIVERGED_ITS;
+<a name="line187">187: </a>    MFNMonitor(mfn,mfn->its,err_loc);
+<a name="line188">188: </a>  }
+<a name="line189">189: </a>  VecScale(x,sfactor);
+
+<a name="line191">191: </a>  MatDestroy(&M);
+<a name="line192">192: </a>  MatDestroy(&K);
+<a name="line193">193: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
+<a name="line194">194: </a>  PetscFree3(betaF,H,B);
+<a name="line195">195: </a>  <font color="#4169E1">return</font>(0);
+<a name="line196">196: </a>}
+
+<a name="line200">200: </a><strong><font color="#4169E1"><a name="MFNCreate_Expokit"></a>PETSC_EXTERN PetscErrorCode MFNCreate_Expokit(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
+<a name="line201">201: </a>{
+<a name="line203">203: </a>  mfn->ops->solve          = MFNSolve_Expokit;
+<a name="line204">204: </a>  mfn->ops->setup          = MFNSetUp_Expokit;
+<a name="line205">205: </a>  <font color="#4169E1">return</font>(0);
+<a name="line206">206: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/mfn/impls/index.html b/src/mfn/impls/index.html
index 9a03a4b..7489657 100644
--- a/src/mfn/impls/index.html
+++ b/src/mfn/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
@@ -16,6 +16,7 @@ Matrix Function (MFN) is the object provided by SLEPc for computing the action o
 
 <p>
 <a href="krylov/">krylov/</a><br>
+<a href="expokit/">expokit/</a><br>
  
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/mfn/impls/krylov/index.html b/src/mfn/impls/krylov/index.html
index c0c6221..41dfbf1 100644
--- a/src/mfn/impls/krylov/index.html
+++ b/src/mfn/impls/krylov/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/impls/krylov/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/krylov/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/mfn/impls/krylov/makefile b/src/mfn/impls/krylov/makefile
index f1b85ce..cd9afa1 100644
--- a/src/mfn/impls/krylov/makefile
+++ b/src/mfn/impls/krylov/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/mfn/impls/krylov/makefile.html b/src/mfn/impls/krylov/makefile.html
index 2cff9d1..d6f0cff 100644
--- a/src/mfn/impls/krylov/makefile.html
+++ b/src/mfn/impls/krylov/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/impls/krylov/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/impls/krylov/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/krylov/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/mfn/impls/krylov/mfnkrylov.c b/src/mfn/impls/krylov/mfnkrylov.c
index 22aa4be..489da30 100644
--- a/src/mfn/impls/krylov/mfnkrylov.c
+++ b/src/mfn/impls/krylov/mfnkrylov.c
@@ -2,21 +2,22 @@
 
    SLEPc matrix function solver: "krylov"
 
-   Method: Arnoldi
+   Method: Arnoldi with Eiermann-Ernst restart
 
    Algorithm:
 
-       Single-vector Arnoldi method to build a Krylov subspace, then
-       compute f(B) on the projected matrix B.
+       Build Arnoldi approximations using f(H) for the Hessenberg matrix H,
+       restart by discarding the Krylov basis but keeping H.
 
    References:
 
-       [1] R. Sidje, "Expokit: a software package for computing matrix
-           exponentials", ACM Trans. Math. Softw. 24(1):130-156, 1998.
+       [1] M. Eiermann and O. Ernst, "A restarted Krylov subspace method
+           for the evaluation of matrix functions", SIAM J. Numer. Anal.
+           44(6):2481-2504, 2006.
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -35,76 +36,48 @@
 */
 
 #include <slepc/private/mfnimpl.h>
+#include <slepcblaslapack.h>
 
 #undef __FUNCT__
 #define __FUNCT__ "MFNSetUp_Krylov"
 PetscErrorCode MFNSetUp_Krylov(MFN mfn)
 {
-  PetscErrorCode  ierr;
-  PetscInt        N;
-  PetscBool       isexp;
+  PetscErrorCode ierr;
+  PetscInt       N;
 
   PetscFunctionBegin;
-  ierr = PetscObjectTypeCompare((PetscObject)mfn->fn,FNEXP,&isexp);CHKERRQ(ierr);
-  if (!isexp) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_SUP,"Only the exponential function is supported in this version, use the development version or a later release");
   ierr = MatGetSize(mfn->A,&N,NULL);CHKERRQ(ierr);
   if (!mfn->ncv) mfn->ncv = PetscMin(30,N);
-  if (!mfn->max_it) mfn->max_it = PetscMax(100,2*N/mfn->ncv);
-  ierr = MFNAllocateSolution(mfn,2);CHKERRQ(ierr);
+  if (!mfn->max_it) mfn->max_it = 100;
+  ierr = MFNAllocateSolution(mfn,1);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "MFNBasicArnoldi"
-static PetscErrorCode MFNBasicArnoldi(BV V, Mat A,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown)
+PetscErrorCode MFNBasicArnoldi(MFN mfn,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)
 {
   PetscErrorCode ierr;
   PetscInt       j,m = *M;
-  PetscReal      norm;
   Vec            vj,vj1;
 
   PetscFunctionBegin;
+  ierr = BVSetActiveColumns(mfn->V,0,m);CHKERRQ(ierr);
   for (j=k;j<m;j++) {
-    ierr = BVGetColumn(V,j,&vj);CHKERRQ(ierr);
-    ierr = BVGetColumn(V,j+1,&vj1);CHKERRQ(ierr);
-    ierr = MatMult(A,vj,vj1);CHKERRQ(ierr);
-    ierr = BVRestoreColumn(V,j,&vj);CHKERRQ(ierr);
-    ierr = BVRestoreColumn(V,j+1,&vj1);CHKERRQ(ierr);
-    ierr = BVOrthogonalizeColumn(V,j+1,H+ldh*j,&norm,breakdown);CHKERRQ(ierr);
-    H[j+1+ldh*j] = norm;
+    ierr = BVGetColumn(mfn->V,j,&vj);CHKERRQ(ierr);
+    ierr = BVGetColumn(mfn->V,j+1,&vj1);CHKERRQ(ierr);
+    ierr = MatMult(mfn->A,vj,vj1);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(mfn->V,j,&vj);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(mfn->V,j+1,&vj1);CHKERRQ(ierr);
+    ierr = BVOrthogonalizeColumn(mfn->V,j+1,H+ldh*j,beta,breakdown);CHKERRQ(ierr);
+    H[j+1+ldh*j] = *beta;
     if (*breakdown) {
       *M = j+1;
-      PetscFunctionReturn(0);
+      break;
     } else {
-      ierr = BVScaleColumn(V,j+1,1/norm);CHKERRQ(ierr);
-    }
-  }
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "CreateDenseMat"
-/*
-   CreateDenseMat - Creates a dense Mat of size k unless it already has that size
-*/
-static PetscErrorCode CreateDenseMat(PetscInt k,Mat *A)
-{
-  PetscErrorCode ierr;
-  PetscBool      create=PETSC_FALSE;
-  PetscInt       m,n;
-
-  PetscFunctionBegin;
-  if (!*A) create=PETSC_TRUE;
-  else {
-    ierr = MatGetSize(*A,&m,&n);CHKERRQ(ierr);
-    if (m!=k || n!=k) {
-      ierr = MatDestroy(A);CHKERRQ(ierr);
-      create=PETSC_TRUE;
+      ierr = BVScaleColumn(mfn->V,j+1,1.0/(*beta));CHKERRQ(ierr);
     }
   }
-  if (create) {
-    ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,A);CHKERRQ(ierr);
-  }
   PetscFunctionReturn(0);
 }
 
@@ -113,138 +86,96 @@ static PetscErrorCode CreateDenseMat(PetscInt k,Mat *A)
 PetscErrorCode MFNSolve_Krylov(MFN mfn,Vec b,Vec x)
 {
   PetscErrorCode ierr;
-  PetscInt       mxstep,mxrej,m,mb,ld,i,j,ireject,mx,k1;
-  Vec            v,r;
-  Mat            M=NULL,K=NULL;
-  PetscScalar    *H,*B,*F,*betaF,t,sgn;
-  PetscReal      anorm,normb,avnorm,tol,err_loc,rndoff;
-  PetscReal      t_out,t_new,t_now,t_step;
-  PetscReal      xm,fact,s,p1,p2;
-  PetscReal      beta,gamma,delta;
-  PetscBool      breakdown;
+  PetscInt       n=0,m,ld,ldh,j;
+  PetscBLASInt   m_,inc=1;
+  Mat            G=NULL,H=NULL;
+  Vec            F=NULL;
+  PetscScalar    *array,*farray,*garray,*harray;
+  PetscReal      beta,nrm=1.0;
+  PetscBool      breakdown,set,flg,symm=PETSC_FALSE;
 
   PetscFunctionBegin;
-  m   = mfn->ncv;
-  tol = mfn->tol;
-  mxstep = mfn->max_it;
-  mxrej = 10;
-  gamma = 0.9;
-  delta = 1.2;
-  mb    = m;
-  t     = mfn->sfactor;
-  t_out = PetscAbsScalar(t);
-  t_new = 0.0;
-  t_now = 0.0;
-  ierr = MatNorm(mfn->A,NORM_INFINITY,&anorm);CHKERRQ(ierr);
-  rndoff = anorm*PETSC_MACHINE_EPSILON;
-
-  k1 = 2;
-  xm = 1.0/(PetscReal)m;
-  ierr = VecNorm(b,NORM_2,&normb);CHKERRQ(ierr);
-  if (!normb) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Cannot pass a zero b vector to MFNSolve()");
-  beta = normb;
-  fact = PetscPowRealInt((m+1)/2.72,m+1)*PetscSqrtReal(2*PETSC_PI*(m+1));
-  t_new = (1.0/anorm)*PetscPowReal((fact*tol)/(4.0*beta*anorm),xm);
-  s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_new))-1);
-  t_new = PetscCeilReal(t_new/s)*s;
-  sgn = t/PetscAbsScalar(t);
+  m  = mfn->ncv;
+  ld = m+1;
+  ierr = PetscCalloc1(ld*ld,&array);CHKERRQ(ierr);
+  ierr = VecSet(x,0.0);CHKERRQ(ierr);
 
-  ierr = VecCopy(b,x);CHKERRQ(ierr);
-  ld = m+2;
-  ierr = PetscMalloc3(m+1,&betaF,ld*ld,&H,ld*ld,&B);CHKERRQ(ierr);
+  /* set initial vector to b/||b|| */
+  ierr = BVInsertVec(mfn->V,0,b);CHKERRQ(ierr);
+  ierr = BVScaleColumn(mfn->V,0,1.0/mfn->bnorm);CHKERRQ(ierr);
 
+  /* Restart loop */
   while (mfn->reason == MFN_CONVERGED_ITERATING) {
     mfn->its++;
-    if (PetscIsInfOrNanReal(t_new)) t_new = PETSC_MAX_REAL;
-    t_step = PetscMin(t_out-t_now,t_new);
-    ierr = BVInsertVec(mfn->V,0,x);CHKERRQ(ierr);
-    ierr = BVScaleColumn(mfn->V,0,1.0/beta);CHKERRQ(ierr);
-    ierr = MFNBasicArnoldi(mfn->V,mfn->A,H,ld,0,&mb,&breakdown);CHKERRQ(ierr);
-    if (breakdown) {
-      k1 = 0;
-      t_step = t_out-t_now;
-    }
-    if (k1!=0) {
-      H[m+1+ld*m] = 1.0;
-      ierr = BVGetColumn(mfn->V,m,&v);CHKERRQ(ierr);
-      ierr = BVGetColumn(mfn->V,m+1,&r);CHKERRQ(ierr);
-      ierr = MatMult(mfn->A,v,r);CHKERRQ(ierr);
-      ierr = BVRestoreColumn(mfn->V,m,&v);CHKERRQ(ierr);
-      ierr = BVRestoreColumn(mfn->V,m+1,&r);CHKERRQ(ierr);
-      ierr = BVNormColumn(mfn->V,m+1,NORM_2,&avnorm);CHKERRQ(ierr);
-    }
-    ierr = PetscMemcpy(B,H,ld*ld*sizeof(PetscScalar));CHKERRQ(ierr);
 
-    ireject = 0;
-    while (ireject <= mxrej) {
-      mx = mb + k1;
-      for (i=0;i<mx;i++) {
-        for (j=0;j<mx;j++) {
-          H[i+j*ld] = sgn*B[i+j*ld]*t_step;
-        }
-      }
-      ierr = CreateDenseMat(mx,&M);CHKERRQ(ierr);
-      ierr = CreateDenseMat(mx,&K);CHKERRQ(ierr);
-      ierr = MatDenseGetArray(M,&F);CHKERRQ(ierr);
-      for (i=0;i<mx;i++) {
-        for (j=0;j<mx;j++) {
-          F[i+j*mx] = H[i+j*ld];
-        }
-      }
-      ierr = MatDenseRestoreArray(M,&F);CHKERRQ(ierr);
-      ierr = FNEvaluateFunctionMat(mfn->fn,M,K);CHKERRQ(ierr);
+    /* compute Arnoldi factorization */
+    ierr = MFNBasicArnoldi(mfn,array,ld,0,&m,&beta,&breakdown);CHKERRQ(ierr);
+
+    /* save previous Hessenberg matrix in G; allocate new storage for H and f(H) */
+    if (mfn->its>1) { G = H; H = NULL; }
+    ldh = n+m;
+    ierr = MFN_CreateVec(ldh,&F);CHKERRQ(ierr);
+    ierr = MFN_CreateDenseMat(ldh,&H);CHKERRQ(ierr);
 
-      if (k1==0) {
-        err_loc = tol;
-        break;
-      } else {
-        ierr = MatDenseGetArray(K,&F);CHKERRQ(ierr);
-        p1 = PetscAbsScalar(beta*F[m]);
-        p2 = PetscAbsScalar(beta*F[m+1]*avnorm);
-        ierr = MatDenseRestoreArray(K,&F);CHKERRQ(ierr);
-        if (p1 > 10*p2) {
-          err_loc = p2;
-          xm = 1.0/(PetscReal)m;
-        } else if (p1 > p2) {
-          err_loc = (p1*p2)/(p1-p2);
-          xm = 1.0/(PetscReal)m;
-        } else {
-          err_loc = p1;
-          xm = 1.0/(PetscReal)(m-1);
-        }
+    /* glue together the previous H and the new H obtained with Arnoldi */
+    ierr = MatDenseGetArray(H,&harray);CHKERRQ(ierr);
+    for (j=0;j<m;j++) {
+      ierr = PetscMemcpy(harray+n+(j+n)*ldh,array+j*ld,m*sizeof(PetscScalar));CHKERRQ(ierr);
+    }
+    if (mfn->its>1) {
+      ierr = MatDenseGetArray(G,&garray);CHKERRQ(ierr);
+      for (j=0;j<n;j++) {
+        ierr = PetscMemcpy(harray+j*ldh,garray+j*n,n*sizeof(PetscScalar));CHKERRQ(ierr);
       }
-      if (err_loc <= delta*t_step*tol) break;
-      else {
-        t_step = gamma*t_step*PetscPowReal(t_step*tol/err_loc,xm);
-        s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_step))-1);
-        t_step = PetscCeilReal(t_step/s)*s;
-        ireject = ireject+1;
+      ierr = MatDenseRestoreArray(G,&garray);CHKERRQ(ierr);
+      ierr = MatDestroy(&G);CHKERRQ(ierr);
+      harray[n+(n-1)*ldh] = beta;
+    }
+    ierr = MatDenseRestoreArray(H,&harray);CHKERRQ(ierr);
+
+    if (mfn->its==1) {
+      /* set symmetry flag of H from A */
+      ierr = MatIsHermitianKnown(mfn->A,&set,&flg);CHKERRQ(ierr);
+      symm = set? flg: PETSC_FALSE;
+      if (symm) {
+        ierr = MatSetOption(H,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
       }
     }
 
-    mx = mb + PetscMax(0,k1-1);
-    ierr = MatDenseGetArray(K,&F);CHKERRQ(ierr);
-    for (j=0;j<mx;j++) betaF[j] = beta*F[j];
-    ierr = MatDenseRestoreArray(K,&F);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(mfn->V,0,mx);CHKERRQ(ierr);
-    ierr = BVMultVec(mfn->V,1.0,0.0,x,betaF);CHKERRQ(ierr);
-    ierr = VecNorm(x,NORM_2,&beta);CHKERRQ(ierr);
+    /* evaluate f(H) */
+    ierr = FNEvaluateFunctionMatVec(mfn->fn,H,F);CHKERRQ(ierr);
+
+    /* x += ||b||*V*f(H)*e_1 */
+    ierr = VecGetArray(F,&farray);CHKERRQ(ierr);
+    if (mfn->its>1) {
+      ierr = PetscBLASIntCast(m,&m_);CHKERRQ(ierr);
+      nrm = BLASnrm2_(&m_,farray+n,&inc);   /* relative norm of the update ||u||/||b|| */
+      ierr = MFNMonitor(mfn,mfn->its,nrm);CHKERRQ(ierr);
+    } else {
+      ierr = MFNMonitor(mfn,1,1.0);CHKERRQ(ierr);   /* no error estimate available */
+    }
+    for (j=0;j<m;j++) farray[j+n] *= mfn->bnorm;
+    ierr = BVSetActiveColumns(mfn->V,0,m);CHKERRQ(ierr);
+    ierr = BVMultVec(mfn->V,1.0,1.0,x,farray+n);CHKERRQ(ierr);
+    ierr = VecRestoreArray(F,&farray);CHKERRQ(ierr);
+
+    /* check convergence */
+    if (mfn->its>1) {
+      if (mfn->its >= mfn->max_it) mfn->reason = MFN_DIVERGED_ITS;
+      if (m<mfn->ncv || breakdown || beta==0.0 || nrm<mfn->tol) mfn->reason = MFN_CONVERGED_TOL;
+    }
 
-    t_now = t_now+t_step;
-    if (t_now>=t_out) mfn->reason = MFN_CONVERGED_TOL;
-    else {
-      t_new = gamma*t_step*PetscPowReal((t_step*tol)/err_loc,xm);
-      s = PetscPowReal(10.0,PetscFloorReal(PetscLog10Real(t_new))-1);
-      t_new = PetscCeilReal(t_new/s)*s;
+    /* restart with vector v_{m+1} */
+    if (mfn->reason == MFN_CONVERGED_ITERATING) {
+      ierr = BVCopyColumn(mfn->V,m,0);CHKERRQ(ierr);
+      n += m;
     }
-    err_loc = PetscMax(err_loc,rndoff);
-    if (mfn->its==mxstep) mfn->reason = MFN_DIVERGED_ITS;
-    ierr = MFNMonitor(mfn,mfn->its,t_now);CHKERRQ(ierr);
   }
 
-  ierr = MatDestroy(&M);CHKERRQ(ierr);
-  ierr = MatDestroy(&K);CHKERRQ(ierr);
-  ierr = PetscFree3(betaF,H,B);CHKERRQ(ierr);
+  ierr = MatDestroy(&H);CHKERRQ(ierr);
+  ierr = MatDestroy(&G);CHKERRQ(ierr);
+  ierr = VecDestroy(&F);CHKERRQ(ierr);
+  ierr = PetscFree(array);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/mfn/impls/krylov/mfnkrylov.c.html b/src/mfn/impls/krylov/mfnkrylov.c.html
index 367ab58..8fbddc6 100644
--- a/src/mfn/impls/krylov/mfnkrylov.c.html
+++ b/src/mfn/impls/krylov/mfnkrylov.c.html
@@ -1 +1,191 @@
 <center><a href="mfnkrylov.c">Actual source code: mfnkrylov.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/impls/krylov/mfnkrylov.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:38+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/krylov/mfnkrylov.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+
+<a name="line3">  3: </a><font color="#B22222">   SLEPc matrix function solver: "krylov"</font>
+
+<a name="line5">  5: </a><font color="#B22222">   Method: Arnoldi with Eiermann-Ernst restart</font>
+
+<a name="line7">  7: </a><font color="#B22222">   Algorithm:</font>
+
+<a name="line9">  9: </a><font color="#B22222">       Build Arnoldi approximations using f(H) for the Hessenberg matrix H,</font>
+<a name="line10"> 10: </a><font color="#B22222">       restart by discarding the Krylov basis but keeping H.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   References:</font>
+
+<a name="line14"> 14: </a><font color="#B22222">       [1] M. Eiermann and O. Ernst, "A restarted Krylov subspace method</font>
+<a name="line15"> 15: </a><font color="#B22222">           for the evaluation of matrix functions", SIAM J. Numer. Anal.</font>
+<a name="line16"> 16: </a><font color="#B22222">           44(6):2481-2504, 2006.</font>
+
+<a name="line18"> 18: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line19"> 19: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line20"> 20: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line22"> 22: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line24"> 24: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line25"> 25: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line26"> 26: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line28"> 28: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line29"> 29: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line30"> 30: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line31"> 31: </a><font color="#B22222">   more details.</font>
+
+<a name="line33"> 33: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line34"> 34: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line35"> 35: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line36"> 36: </a><font color="#B22222">*/</font>
+
+<a name="line38"> 38: </a><font color="#A020F0">#include <slepc/private/mfnimpl.h></font>
+<a name="line39"> 39: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line43"> 43: </a><strong><font color="#4169E1"><a name="MFNSetUp_Krylov"></a>PetscErrorCode MFNSetUp_Krylov(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
+<a name="line44"> 44: </a>{
+<a name="line46"> 46: </a>  PetscInt       N;
+
+<a name="line49"> 49: </a>  MatGetSize(mfn->A,&N,NULL);
+<a name="line50"> 50: </a>  <font color="#4169E1">if</font> (!mfn->ncv) mfn->ncv = PetscMin(30,N);
+<a name="line51"> 51: </a>  <font color="#4169E1">if</font> (!mfn->max_it) mfn->max_it = 100;
+<a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a>(mfn,1);
+<a name="line53"> 53: </a>  <font color="#4169E1">return</font>(0);
+<a name="line54"> 54: </a>}
+
+<a name="line58"> 58: </a><strong><font color="#4169E1"><a name="MFNBasicArnoldi"></a>PetscErrorCode MFNBasicArnoldi(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscReal *beta,PetscBool *breakdown)</font></strong>
+<a name="line59"> 59: </a>{
+<a name="line61"> 61: </a>  PetscInt       j,m = *M;
+<a name="line62"> 62: </a>  Vec            vj,vj1;
+
+<a name="line65"> 65: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(mfn->V,0,m);
+<a name="line66"> 66: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line67"> 67: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(mfn->V,j,&vj);
+<a name="line68"> 68: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(mfn->V,j+1,&vj1);
+<a name="line69"> 69: </a>    MatMult(mfn->A,vj,vj1);
+<a name="line70"> 70: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(mfn->V,j,&vj);
+<a name="line71"> 71: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(mfn->V,j+1,&vj1);
+<a name="line72"> 72: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(mfn->V,j+1,H+ldh*j,beta,breakdown);
+<a name="line73"> 73: </a>    H[j+1+ldh*j] = *beta;
+<a name="line74"> 74: </a>    <font color="#4169E1">if</font> (*breakdown) {
+<a name="line75"> 75: </a>      *M = j+1;
+<a name="line76"> 76: </a>      <font color="#4169E1">break</font>;
+<a name="line77"> 77: </a>    } <font color="#4169E1">else</font> {
+<a name="line78"> 78: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(mfn->V,j+1,1.0/(*beta));
+<a name="line79"> 79: </a>    }
+<a name="line80"> 80: </a>  }
+<a name="line81"> 81: </a>  <font color="#4169E1">return</font>(0);
+<a name="line82"> 82: </a>}
+
+<a name="line86"> 86: </a><strong><font color="#4169E1"><a name="MFNSolve_Krylov"></a>PetscErrorCode MFNSolve_Krylov(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,Vec b,Vec x)</font></strong>
+<a name="line87"> 87: </a>{
+<a name="line89"> 89: </a>  PetscInt       n=0,m,ld,ldh,j;
+<a name="line90"> 90: </a>  PetscBLASInt   m_,inc=1;
+<a name="line91"> 91: </a>  Mat            G=NULL,H=NULL;
+<a name="line92"> 92: </a>  Vec            F=NULL;
+<a name="line93"> 93: </a>  PetscScalar    *array,*farray,*garray,*harray;
+<a name="line94"> 94: </a>  PetscReal      beta,nrm=1.0;
+<a name="line95"> 95: </a>  PetscBool      breakdown,set,flg,symm=PETSC_FALSE;
+
+<a name="line98"> 98: </a>  m  = mfn->ncv;
+<a name="line99"> 99: </a>  ld = m+1;
+<a name="line100">100: </a>  PetscCalloc1(ld*ld,&array);
+<a name="line101">101: </a>  VecSet(x,0.0);
+
+<a name="line103">103: </a>  <font color="#B22222">/* set initial vector to b/||b|| */</font>
+<a name="line104">104: </a>  <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(mfn->V,0,b);
+<a name="line105">105: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(mfn->V,0,1.0/mfn->bnorm);
+
+<a name="line107">107: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line108">108: </a>  <font color="#4169E1">while</font> (mfn->reason == MFN_CONVERGED_ITERATING) {
+<a name="line109">109: </a>    mfn->its++;
+
+<a name="line111">111: </a>    <font color="#B22222">/* compute Arnoldi factorization */</font>
+<a name="line112">112: </a>    MFNBasicArnoldi(mfn,array,ld,0,&m,&beta,&breakdown);
+
+<a name="line114">114: </a>    <font color="#B22222">/* save previous Hessenberg matrix in G; allocate new storage for H and f(H) */</font>
+<a name="line115">115: </a>    <font color="#4169E1">if</font> (mfn->its>1) { G = H; H = NULL; }
+<a name="line116">116: </a>    ldh = n+m;
+<a name="line117">117: </a>    MFN_CreateVec(ldh,&F);
+<a name="line118">118: </a>    MFN_CreateDenseMat(ldh,&H);
+
+<a name="line120">120: </a>    <font color="#B22222">/* glue together the previous H and the new H obtained with Arnoldi */</font>
+<a name="line121">121: </a>    MatDenseGetArray(H,&harray);
+<a name="line122">122: </a>    <font color="#4169E1">for</font> (j=0;j<m;j++) {
+<a name="line123">123: </a>      PetscMemcpy(harray+n+(j+n)*ldh,array+j*ld,m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line124">124: </a>    }
+<a name="line125">125: </a>    <font color="#4169E1">if</font> (mfn->its>1) {
+<a name="line126">126: </a>      MatDenseGetArray(G,&garray);
+<a name="line127">127: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line128">128: </a>        PetscMemcpy(harray+j*ldh,garray+j*n,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line129">129: </a>      }
+<a name="line130">130: </a>      MatDenseRestoreArray(G,&garray);
+<a name="line131">131: </a>      MatDestroy(&G);
+<a name="line132">132: </a>      harray[n+(n-1)*ldh] = beta;
+<a name="line133">133: </a>    }
+<a name="line134">134: </a>    MatDenseRestoreArray(H,&harray);
+
+<a name="line136">136: </a>    <font color="#4169E1">if</font> (mfn->its==1) {
+<a name="line137">137: </a>      <font color="#B22222">/* set symmetry flag of H from A */</font>
+<a name="line138">138: </a>      MatIsHermitianKnown(mfn->A,&set,&flg);
+<a name="line139">139: </a>      symm = set? flg: PETSC_FALSE;
+<a name="line140">140: </a>      <font color="#4169E1">if</font> (symm) {
+<a name="line141">141: </a>        MatSetOption(H,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line142">142: </a>      }
+<a name="line143">143: </a>    }
+
+<a name="line145">145: </a>    <font color="#B22222">/* evaluate f(H) */</font>
+<a name="line146">146: </a>    <a href="../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(mfn->fn,H,F);
+
+<a name="line148">148: </a>    <font color="#B22222">/* x += ||b||*V*f(H)*e_1 */</font>
+<a name="line149">149: </a>    VecGetArray(F,&farray);
+<a name="line150">150: </a>    <font color="#4169E1">if</font> (mfn->its>1) {
+<a name="line151">151: </a>      PetscBLASIntCast(m,&m_);
+<a name="line152">152: </a>      nrm = BLASnrm2_(&m_,farray+n,&inc);   <font color="#B22222">/* relative norm of the update ||u||/||b|| */</font>
+<a name="line153">153: </a>      MFNMonitor(mfn,mfn->its,nrm);
+<a name="line154">154: </a>    } <font color="#4169E1">else</font> {
+<a name="line155">155: </a>      MFNMonitor(mfn,1,1.0);   <font color="#B22222">/* no error estimate available */</font>
+<a name="line156">156: </a>    }
+<a name="line157">157: </a>    <font color="#4169E1">for</font> (j=0;j<m;j++) farray[j+n] *= mfn->bnorm;
+<a name="line158">158: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(mfn->V,0,m);
+<a name="line159">159: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(mfn->V,1.0,1.0,x,farray+n);
+<a name="line160">160: </a>    VecRestoreArray(F,&farray);
+
+<a name="line162">162: </a>    <font color="#B22222">/* check convergence */</font>
+<a name="line163">163: </a>    <font color="#4169E1">if</font> (mfn->its>1) {
+<a name="line164">164: </a>      <font color="#4169E1">if</font> (mfn->its >= mfn->max_it) mfn->reason = MFN_DIVERGED_ITS;
+<a name="line165">165: </a>      <font color="#4169E1">if</font> (m<mfn->ncv || breakdown || beta==0.0 || nrm<mfn->tol) mfn->reason = MFN_CONVERGED_TOL;
+<a name="line166">166: </a>    }
+
+<a name="line168">168: </a>    <font color="#B22222">/* restart with vector v_{m+1} */</font>
+<a name="line169">169: </a>    <font color="#4169E1">if</font> (mfn->reason == MFN_CONVERGED_ITERATING) {
+<a name="line170">170: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(mfn->V,m,0);
+<a name="line171">171: </a>      n += m;
+<a name="line172">172: </a>    }
+<a name="line173">173: </a>  }
+
+<a name="line175">175: </a>  MatDestroy(&H);
+<a name="line176">176: </a>  MatDestroy(&G);
+<a name="line177">177: </a>  VecDestroy(&F);
+<a name="line178">178: </a>  PetscFree(array);
+<a name="line179">179: </a>  <font color="#4169E1">return</font>(0);
+<a name="line180">180: </a>}
+
+<a name="line184">184: </a><strong><font color="#4169E1"><a name="MFNCreate_Krylov"></a>PETSC_EXTERN PetscErrorCode MFNCreate_Krylov(<a href="../../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
+<a name="line185">185: </a>{
+<a name="line187">187: </a>  mfn->ops->solve          = MFNSolve_Krylov;
+<a name="line188">188: </a>  mfn->ops->setup          = MFNSetUp_Krylov;
+<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
+<a name="line190">190: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/mfn/impls/makefile b/src/mfn/impls/makefile
index 2d20280..ec67eb9 100644
--- a/src/mfn/impls/makefile
+++ b/src/mfn/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -22,7 +22,7 @@
 ALL: lib
 
 LIBBASE  = libslepcmfn
-DIRS     = krylov
+DIRS     = krylov expokit
 LOCDIR   = src/mfn/impls/
 MANSEC   = MFN
 
diff --git a/src/mfn/impls/makefile.html b/src/mfn/impls/makefile.html
index a6930e1..4f6edbe 100644
--- a/src/mfn/impls/makefile.html
+++ b/src/mfn/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -33,7 +33,7 @@
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
 LIBBASE  = libslepcmfn
-DIRS     = krylov
+DIRS     = krylov expokit
 LOCDIR   = src/mfn/impls/
 MANSEC   = <a href="ROOT/docs/manualpages/MFN/MFN.html#MFN">MFN</a>
 
diff --git a/src/mfn/index.html b/src/mfn/index.html
index 1c738da..8a3d52f 100644
--- a/src/mfn/index.html
+++ b/src/mfn/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/mfn/interface/dlregismfn.c b/src/mfn/interface/dlregismfn.c
index 47f80c9..4df989b 100644
--- a/src/mfn/interface/dlregismfn.c
+++ b/src/mfn/interface/dlregismfn.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -23,7 +23,7 @@
 
 static PetscBool MFNPackageInitialized = PETSC_FALSE;
 
-const char *const MFNConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","MFNConvergedReason","MFN_",0};
+const char *const MFNConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","CONVERGED_ITS","MFNConvergedReason","MFN_",0};
 const char *const*MFNConvergedReasons = MFNConvergedReasons_Shifted + 4;
 
 #undef __FUNCT__
@@ -76,7 +76,7 @@ PetscErrorCode MFNInitializePackage(void)
   ierr = PetscLogEventRegister("MFNSetUp",MFN_CLASSID,&MFN_SetUp);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("MFNSolve",MFN_CLASSID,&MFN_Solve);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"mfn",&className);CHKERRQ(ierr);
     if (className) {
@@ -84,7 +84,7 @@ PetscErrorCode MFNInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"mfn",&className);CHKERRQ(ierr);
     if (className) {
diff --git a/src/mfn/interface/dlregismfn.c.html b/src/mfn/interface/dlregismfn.c.html
index 74c8ac6..b80520f 100644
--- a/src/mfn/interface/dlregismfn.c.html
+++ b/src/mfn/interface/dlregismfn.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/dlregismfn.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:30+00:00">
+<meta name="date" content="2016-05-16T10:34:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/dlregismfn.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/dlregismfn.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,7 +35,7 @@
 
 <a name="line24"> 24: </a>static PetscBool MFNPackageInitialized = PETSC_FALSE;
 
-<a name="line26"> 26: </a>const char *const MFNConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">""</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a>" [...]
+<a name="line26"> 26: </a>const char *const MFNConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">""</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"CONVERGED_ITS"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNConvergedReason.htm [...]
 <a name="line27"> 27: </a>const char *const*MFNConvergedReasons = MFNConvergedReasons_Shifted + 4;
 
 <a name="line31"> 31: </a><font color="#B22222">/*@C</font>
@@ -80,7 +80,7 @@
 <a name="line76"> 76: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>"</font>,MFN_CLASSID,&MFN_SetUp);
 <a name="line77"> 77: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>"</font>,MFN_CLASSID,&MFN_Solve);
 <a name="line78"> 78: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line79"> 79: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line79"> 79: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
 <a name="line80"> 80: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line81"> 81: </a>    PetscStrstr(logList,<font color="#666666">"mfn"</font>,&className);
 <a name="line82"> 82: </a>    <font color="#4169E1">if</font> (className) {
@@ -88,7 +88,7 @@
 <a name="line84"> 84: </a>    }
 <a name="line85"> 85: </a>  }
 <a name="line86"> 86: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line87"> 87: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
+<a name="line87"> 87: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
 <a name="line88"> 88: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line89"> 89: </a>    PetscStrstr(logList,<font color="#666666">"mfn"</font>,&className);
 <a name="line90"> 90: </a>    <font color="#4169E1">if</font> (className) {
diff --git a/src/mfn/interface/ftn-custom/makefile b/src/mfn/interface/ftn-custom/makefile
index eb7c188..e6c4532 100644
--- a/src/mfn/interface/ftn-custom/makefile
+++ b/src/mfn/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/mfn/interface/ftn-custom/zmfnf.c b/src/mfn/interface/ftn-custom/zmfnf.c
index c9e3560..1a4da2d 100644
--- a/src/mfn/interface/ftn-custom/zmfnf.c
+++ b/src/mfn/interface/ftn-custom/zmfnf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -50,9 +50,9 @@
    These are not usually called from Fortran but allow Fortran users
    to transparently set these monitors from .F code, hence no STDCALL
 */
-PETSC_EXTERN void mfnmonitordefault_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void mfnmonitordefault_(MFN *mfn,PetscInt *it,PetscReal *errest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = MFNMonitorDefault(*mfn,*it,*errest,ctx);
+  *ierr = MFNMonitorDefault(*mfn,*it,*errest,*ctx);
 }
 
 PETSC_EXTERN void mfnmonitorlg_(MFN *mfn,PetscInt *it,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
@@ -144,7 +144,7 @@ PETSC_EXTERN void PETSC_STDCALL mfnmonitorset_(MFN *mfn,void (PETSC_STDCALL *mon
   CHKFORTRANNULLOBJECT(mctx);
   CHKFORTRANNULLFUNCTION(monitordestroy);
   if ((PetscVoidFunction)monitor == (PetscVoidFunction)mfnmonitordefault_) {
-    *ierr = MFNMonitorSet(*mfn,MFNMonitorDefault,0,0);
+    *ierr = MFNMonitorSet(*mfn,(PetscErrorCode (*)(MFN,PetscInt,PetscReal,void*))MFNMonitorDefault,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)mfnmonitorlg_) {
     *ierr = MFNMonitorSet(*mfn,MFNMonitorLG,0,0);
   } else {
diff --git a/src/mfn/interface/index.html b/src/mfn/interface/index.html
index e6168cf..b171648 100644
--- a/src/mfn/interface/index.html
+++ b/src/mfn/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Matrix Function - MFN: <a href="../../../src/mfn/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/mfn/interface/makefile b/src/mfn/interface/makefile
index bba32e2..c153bec 100644
--- a/src/mfn/interface/makefile
+++ b/src/mfn/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/mfn/interface/makefile.html b/src/mfn/interface/makefile.html
index 4bc1d35..4ebebfe 100644
--- a/src/mfn/interface/makefile.html
+++ b/src/mfn/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:31+00:00">
+<meta name="date" content="2016-05-16T10:34:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/mfn/interface/mfnbasic.c b/src/mfn/interface/mfnbasic.c
index 4a8fe7e..9f2788e 100644
--- a/src/mfn/interface/mfnbasic.c
+++ b/src/mfn/interface/mfnbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -201,13 +201,11 @@ PetscErrorCode MFNCreate(MPI_Comm comm,MFN *outmfn)
   mfn->max_it          = 0;
   mfn->ncv             = 0;
   mfn->tol             = PETSC_DEFAULT;
-  mfn->sfactor         = 1.0;
   mfn->errorifnotconverged = PETSC_FALSE;
 
   mfn->numbermonitors  = 0;
 
   mfn->V               = NULL;
-  mfn->rand            = NULL;
   mfn->nwork           = 0;
   mfn->work            = NULL;
   mfn->data            = NULL;
@@ -218,9 +216,6 @@ PetscErrorCode MFNCreate(MPI_Comm comm,MFN *outmfn)
   mfn->setupcalled     = 0;
   mfn->reason          = MFN_CONVERGED_ITERATING;
 
-  ierr = PetscRandomCreate(comm,&mfn->rand);CHKERRQ(ierr);
-  ierr = PetscRandomSetSeed(mfn->rand,0x12345678);CHKERRQ(ierr);
-  ierr = PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->rand);CHKERRQ(ierr);
   *outmfn = mfn;
   PetscFunctionReturn(0);
 }
@@ -396,7 +391,6 @@ PetscErrorCode MFNDestroy(MFN *mfn)
   ierr = MatDestroy(&(*mfn)->A);CHKERRQ(ierr);
   ierr = BVDestroy(&(*mfn)->V);CHKERRQ(ierr);
   ierr = FNDestroy(&(*mfn)->fn);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&(*mfn)->rand);CHKERRQ(ierr);
   ierr = MFNMonitorCancel(*mfn);CHKERRQ(ierr);
   ierr = PetscHeaderDestroy(mfn);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -516,7 +510,7 @@ PetscErrorCode MFNSetFN(MFN mfn,FN fn)
    Output Parameter:
 .  fn - math function context
 
-   Level: intermediate
+   Level: beginner
 
 .seealso: MFNSetFN()
 @*/
diff --git a/src/mfn/interface/mfnbasic.c.html b/src/mfn/interface/mfnbasic.c.html
index 4f8fa15..d00e807 100644
--- a/src/mfn/interface/mfnbasic.c.html
+++ b/src/mfn/interface/mfnbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/mfnbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:28+00:00">
+<meta name="date" content="2016-05-16T10:34:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/mfnbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/mfnbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     The basic <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> routines, Create, View, etc. are here.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -194,289 +194,283 @@
 <a name="line201">201: </a>  mfn->max_it          = 0;
 <a name="line202">202: </a>  mfn->ncv             = 0;
 <a name="line203">203: </a>  mfn->tol             = PETSC_DEFAULT;
-<a name="line204">204: </a>  mfn->sfactor         = 1.0;
-<a name="line205">205: </a>  mfn->errorifnotconverged = PETSC_FALSE;
+<a name="line204">204: </a>  mfn->errorifnotconverged = PETSC_FALSE;
 
-<a name="line207">207: </a>  mfn->numbermonitors  = 0;
+<a name="line206">206: </a>  mfn->numbermonitors  = 0;
 
-<a name="line209">209: </a>  mfn->V               = NULL;
-<a name="line210">210: </a>  mfn->rand            = NULL;
-<a name="line211">211: </a>  mfn->nwork           = 0;
-<a name="line212">212: </a>  mfn->work            = NULL;
-<a name="line213">213: </a>  mfn->data            = NULL;
+<a name="line208">208: </a>  mfn->V               = NULL;
+<a name="line209">209: </a>  mfn->nwork           = 0;
+<a name="line210">210: </a>  mfn->work            = NULL;
+<a name="line211">211: </a>  mfn->data            = NULL;
 
-<a name="line215">215: </a>  mfn->its             = 0;
-<a name="line216">216: </a>  mfn->nv              = 0;
-<a name="line217">217: </a>  mfn->errest          = 0;
-<a name="line218">218: </a>  mfn->setupcalled     = 0;
-<a name="line219">219: </a>  mfn->reason          = MFN_CONVERGED_ITERATING;
+<a name="line213">213: </a>  mfn->its             = 0;
+<a name="line214">214: </a>  mfn->nv              = 0;
+<a name="line215">215: </a>  mfn->errest          = 0;
+<a name="line216">216: </a>  mfn->setupcalled     = 0;
+<a name="line217">217: </a>  mfn->reason          = MFN_CONVERGED_ITERATING;
 
-<a name="line221">221: </a>  PetscRandomCreate(comm,&mfn->rand);
-<a name="line222">222: </a>  PetscRandomSetSeed(mfn->rand,0x12345678);
-<a name="line223">223: </a>  PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->rand);
-<a name="line224">224: </a>  *outmfn = mfn;
-<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
-<a name="line226">226: </a>}
+<a name="line219">219: </a>  *outmfn = mfn;
+<a name="line220">220: </a>  <font color="#4169E1">return</font>(0);
+<a name="line221">221: </a>}
 
-<a name="line230">230: </a><font color="#B22222">/*@C</font>
-<a name="line231">231: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a> - Selects the particular solver to be used in the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
+<a name="line225">225: </a><font color="#B22222">/*@C</font>
+<a name="line226">226: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a> - Selects the particular solver to be used in the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
 
-<a name="line233">233: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line228">228: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
-<a name="line235">235: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line236">236: </a><font color="#B22222">+  mfn  - the matrix function context</font>
-<a name="line237">237: </a><font color="#B22222">-  type - a known method</font>
+<a name="line230">230: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line231">231: </a><font color="#B22222">+  mfn  - the matrix function context</font>
+<a name="line232">232: </a><font color="#B22222">-  type - a known method</font>
 
-<a name="line239">239: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line240">240: </a><font color="#B22222">.  -mfn_type <method> - Sets the method; use -help for a list</font>
-<a name="line241">241: </a><font color="#B22222">    of available methods</font>
+<a name="line234">234: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line235">235: </a><font color="#B22222">.  -mfn_type <method> - Sets the method; use -help for a list</font>
+<a name="line236">236: </a><font color="#B22222">    of available methods</font>
 
-<a name="line243">243: </a><font color="#B22222">   Notes:</font>
-<a name="line244">244: </a><font color="#B22222">   See "slepc/include/slepcmfn.h" for available methods. The default</font>
-<a name="line245">245: </a><font color="#B22222">   is MFNKRYLOV</font>
+<a name="line238">238: </a><font color="#B22222">   Notes:</font>
+<a name="line239">239: </a><font color="#B22222">   See "slepc/include/slepcmfn.h" for available methods. The default</font>
+<a name="line240">240: </a><font color="#B22222">   is MFNKRYLOV</font>
 
-<a name="line247">247: </a><font color="#B22222">   Normally, it is best to use the <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>() command and</font>
-<a name="line248">248: </a><font color="#B22222">   then set the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> type from the options database rather than by using</font>
-<a name="line249">249: </a><font color="#B22222">   this routine.  Using the options database provides the user with</font>
-<a name="line250">250: </a><font color="#B22222">   maximum flexibility in evaluating the different available methods.</font>
-<a name="line251">251: </a><font color="#B22222">   The <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>() routine is provided for those situations where it</font>
-<a name="line252">252: </a><font color="#B22222">   is necessary to set the iterative solver independently of the command</font>
-<a name="line253">253: </a><font color="#B22222">   line or options database.</font>
+<a name="line242">242: </a><font color="#B22222">   Normally, it is best to use the <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>() command and</font>
+<a name="line243">243: </a><font color="#B22222">   then set the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> type from the options database rather than by using</font>
+<a name="line244">244: </a><font color="#B22222">   this routine.  Using the options database provides the user with</font>
+<a name="line245">245: </a><font color="#B22222">   maximum flexibility in evaluating the different available methods.</font>
+<a name="line246">246: </a><font color="#B22222">   The <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>() routine is provided for those situations where it</font>
+<a name="line247">247: </a><font color="#B22222">   is necessary to set the iterative solver independently of the command</font>
+<a name="line248">248: </a><font color="#B22222">   line or options database.</font>
 
-<a name="line255">255: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line250">250: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line257">257: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a></font>
-<a name="line258">258: </a><font color="#B22222">@*/</font>
-<a name="line259">259: </a><strong><font color="#4169E1"><a name="MFNSetType"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a> type)</font></strong>
-<a name="line260">260: </a>{
-<a name="line261">261: </a>  PetscErrorCode ierr,(*r)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
-<a name="line262">262: </a>  PetscBool      match;
+<a name="line252">252: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a></font>
+<a name="line253">253: </a><font color="#B22222">@*/</font>
+<a name="line254">254: </a><strong><font color="#4169E1"><a name="MFNSetType"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a> type)</font></strong>
+<a name="line255">255: </a>{
+<a name="line256">256: </a>  PetscErrorCode ierr,(*r)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>);
+<a name="line257">257: </a>  PetscBool      match;
 
 
-<a name="line268">268: </a>  PetscObjectTypeCompare((PetscObject)mfn,type,&match);
-<a name="line269">269: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
+<a name="line263">263: </a>  PetscObjectTypeCompare((PetscObject)mfn,type,&match);
+<a name="line264">264: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
 
-<a name="line271">271: </a>  PetscFunctionListFind(MFNList,type,&r);
-<a name="line272">272: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unknown <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> type given: %s"</font>,type);
+<a name="line266">266: </a>  PetscFunctionListFind(MFNList,type,&r);
+<a name="line267">267: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unknown <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> type given: %s"</font>,type);
 
-<a name="line274">274: </a>  <font color="#4169E1">if</font> (mfn->ops->destroy) { (*mfn->ops->destroy)(mfn); }
-<a name="line275">275: </a>  PetscMemzero(mfn->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _MFNOps</font>));
+<a name="line269">269: </a>  <font color="#4169E1">if</font> (mfn->ops->destroy) { (*mfn->ops->destroy)(mfn); }
+<a name="line270">270: </a>  PetscMemzero(mfn->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _MFNOps</font>));
 
-<a name="line277">277: </a>  mfn->setupcalled = 0;
-<a name="line278">278: </a>  PetscObjectChangeTypeName((PetscObject)mfn,type);
-<a name="line279">279: </a>  (*r)(mfn);
-<a name="line280">280: </a>  <font color="#4169E1">return</font>(0);
-<a name="line281">281: </a>}
+<a name="line272">272: </a>  mfn->setupcalled = 0;
+<a name="line273">273: </a>  PetscObjectChangeTypeName((PetscObject)mfn,type);
+<a name="line274">274: </a>  (*r)(mfn);
+<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
+<a name="line276">276: </a>}
 
-<a name="line285">285: </a><font color="#B22222">/*@C</font>
-<a name="line286">286: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetType.html#MFNGetType">MFNGetType</a> - Gets the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> type as a string from the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
+<a name="line280">280: </a><font color="#B22222">/*@C</font>
+<a name="line281">281: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetType.html#MFNGetType">MFNGetType</a> - Gets the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> type as a string from the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
 
-<a name="line288">288: </a><font color="#B22222">   Not Collective</font>
+<a name="line283">283: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line290">290: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line291">291: </a><font color="#B22222">.  mfn - the matrix function context</font>
+<a name="line285">285: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line286">286: </a><font color="#B22222">.  mfn - the matrix function context</font>
 
-<a name="line293">293: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line294">294: </a><font color="#B22222">.  name - name of <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> method</font>
+<a name="line288">288: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line289">289: </a><font color="#B22222">.  name - name of <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> method</font>
 
-<a name="line296">296: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line291">291: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line298">298: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>()</font>
-<a name="line299">299: </a><font color="#B22222">@*/</font>
-<a name="line300">300: </a><strong><font color="#4169E1"><a name="MFNGetType"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetType.html#MFNGetType">MFNGetType</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a> *type)</font></strong>
-<a name="line301">301: </a>{
-<a name="line305">305: </a>  *type = ((PetscObject)mfn)->type_name;
-<a name="line306">306: </a>  <font color="#4169E1">return</font>(0);
-<a name="line307">307: </a>}
+<a name="line293">293: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>()</font>
+<a name="line294">294: </a><font color="#B22222">@*/</font>
+<a name="line295">295: </a><strong><font color="#4169E1"><a name="MFNGetType"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetType.html#MFNGetType">MFNGetType</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/MFN/MFNType.html#MFNType">MFNType</a> *type)</font></strong>
+<a name="line296">296: </a>{
+<a name="line300">300: </a>  *type = ((PetscObject)mfn)->type_name;
+<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
+<a name="line302">302: </a>}
 
-<a name="line311">311: </a><font color="#B22222">/*@C</font>
-<a name="line312">312: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a> - Adds a method to the matrix function solver package.</font>
+<a name="line306">306: </a><font color="#B22222">/*@C</font>
+<a name="line307">307: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a> - Adds a method to the matrix function solver package.</font>
 
-<a name="line314">314: </a><font color="#B22222">   Not Collective</font>
+<a name="line309">309: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line316">316: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line317">317: </a><font color="#B22222">+  name - name of a new user-defined solver</font>
-<a name="line318">318: </a><font color="#B22222">-  function - routine to create the solver context</font>
+<a name="line311">311: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line312">312: </a><font color="#B22222">+  name - name of a new user-defined solver</font>
+<a name="line313">313: </a><font color="#B22222">-  function - routine to create the solver context</font>
 
-<a name="line320">320: </a><font color="#B22222">   Notes:</font>
-<a name="line321">321: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>() may be called multiple times to add several user-defined solvers.</font>
+<a name="line315">315: </a><font color="#B22222">   Notes:</font>
+<a name="line316">316: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>() may be called multiple times to add several user-defined solvers.</font>
 
-<a name="line323">323: </a><font color="#B22222">   Sample usage:</font>
-<a name="line324">324: </a><font color="#B22222">.vb</font>
-<a name="line325">325: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>("my_solver",MySolverCreate);</font>
-<a name="line326">326: </a><font color="#B22222">.ve</font>
+<a name="line318">318: </a><font color="#B22222">   Sample usage:</font>
+<a name="line319">319: </a><font color="#B22222">.vb</font>
+<a name="line320">320: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>("my_solver",MySolverCreate);</font>
+<a name="line321">321: </a><font color="#B22222">.ve</font>
 
-<a name="line328">328: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
-<a name="line329">329: </a><font color="#B22222">$     <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(mfn,"my_solver")</font>
-<a name="line330">330: </a><font color="#B22222">   or at runtime via the option</font>
-<a name="line331">331: </a><font color="#B22222">$     -mfn_type my_solver</font>
+<a name="line323">323: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
+<a name="line324">324: </a><font color="#B22222">$     <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(mfn,"my_solver")</font>
+<a name="line325">325: </a><font color="#B22222">   or at runtime via the option</font>
+<a name="line326">326: </a><font color="#B22222">$     -mfn_type my_solver</font>
 
-<a name="line333">333: </a><font color="#B22222">   Level: advanced</font>
+<a name="line328">328: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line335">335: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a>()</font>
-<a name="line336">336: </a><font color="#B22222">@*/</font>
-<a name="line337">337: </a><strong><font color="#4169E1"><a name="MFNRegister"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>))</font></strong>
-<a name="line338">338: </a>{
+<a name="line330">330: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a>()</font>
+<a name="line331">331: </a><font color="#B22222">@*/</font>
+<a name="line332">332: </a><strong><font color="#4169E1"><a name="MFNRegister"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>))</font></strong>
+<a name="line333">333: </a>{
 
-<a name="line342">342: </a>  PetscFunctionListAdd(&MFNList,name,function);
-<a name="line343">343: </a>  <font color="#4169E1">return</font>(0);
-<a name="line344">344: </a>}
+<a name="line337">337: </a>  PetscFunctionListAdd(&MFNList,name,function);
+<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
+<a name="line339">339: </a>}
 
-<a name="line348">348: </a><font color="#B22222">/*@</font>
-<a name="line349">349: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a> - Resets the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> context to the setupcalled=0 state and removes any</font>
-<a name="line350">350: </a><font color="#B22222">   allocated objects.</font>
+<a name="line343">343: </a><font color="#B22222">/*@</font>
+<a name="line344">344: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a> - Resets the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> context to the setupcalled=0 state and removes any</font>
+<a name="line345">345: </a><font color="#B22222">   allocated objects.</font>
 
-<a name="line352">352: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line347">347: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
-<a name="line354">354: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line355">355: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
+<a name="line349">349: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line350">350: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
 
-<a name="line357">357: </a><font color="#B22222">   Level: advanced</font>
+<a name="line352">352: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line359">359: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>()</font>
-<a name="line360">360: </a><font color="#B22222">@*/</font>
-<a name="line361">361: </a><strong><font color="#4169E1"><a name="MFNReset"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
-<a name="line362">362: </a>{
+<a name="line354">354: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>()</font>
+<a name="line355">355: </a><font color="#B22222">@*/</font>
+<a name="line356">356: </a><strong><font color="#4169E1"><a name="MFNReset"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
+<a name="line357">357: </a>{
 
-<a name="line367">367: </a>  <font color="#4169E1">if</font> (mfn->ops->reset) { (mfn->ops->reset)(mfn); }
-<a name="line368">368: </a>  mfn->setupcalled = 0;
-<a name="line369">369: </a>  <font color="#4169E1">return</font>(0);
-<a name="line370">370: </a>}
+<a name="line362">362: </a>  <font color="#4169E1">if</font> (mfn->ops->reset) { (mfn->ops->reset)(mfn); }
+<a name="line363">363: </a>  mfn->setupcalled = 0;
+<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
+<a name="line365">365: </a>}
 
-<a name="line374">374: </a><font color="#B22222">/*@</font>
-<a name="line375">375: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a> - Destroys the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> context.</font>
+<a name="line369">369: </a><font color="#B22222">/*@</font>
+<a name="line370">370: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a> - Destroys the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> context.</font>
 
-<a name="line377">377: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line372">372: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
-<a name="line379">379: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line380">380: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
+<a name="line374">374: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line375">375: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
 
-<a name="line382">382: </a><font color="#B22222">   Level: beginner</font>
+<a name="line377">377: </a><font color="#B22222">   Level: beginner</font>
 
-<a name="line384">384: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(), <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(), <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>()</font>
-<a name="line385">385: </a><font color="#B22222">@*/</font>
-<a name="line386">386: </a><strong><font color="#4169E1"><a name="MFNDestroy"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> *mfn)</font></strong>
-<a name="line387">387: </a>{
+<a name="line379">379: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>(), <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(), <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>()</font>
+<a name="line380">380: </a><font color="#B22222">@*/</font>
+<a name="line381">381: </a><strong><font color="#4169E1"><a name="MFNDestroy"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNDestroy.html#MFNDestroy">MFNDestroy</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> *mfn)</font></strong>
+<a name="line382">382: </a>{
 
-<a name="line391">391: </a>  <font color="#4169E1">if</font> (!*mfn) <font color="#4169E1">return</font>(0);
-<a name="line393">393: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*mfn))->refct > 0) { *mfn = 0; <font color="#4169E1">return</font>(0); }
-<a name="line394">394: </a>  <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(*mfn);
-<a name="line395">395: </a>  <font color="#4169E1">if</font> ((*mfn)->ops->destroy) { (*(*mfn)->ops->destroy)(*mfn); }
-<a name="line396">396: </a>  MatDestroy(&(*mfn)->A);
-<a name="line397">397: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&(*mfn)->V);
-<a name="line398">398: </a>  <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&(*mfn)->fn);
-<a name="line399">399: </a>  PetscRandomDestroy(&(*mfn)->rand);
-<a name="line400">400: </a>  <a href="../../../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>(*mfn);
-<a name="line401">401: </a>  PetscHeaderDestroy(mfn);
-<a name="line402">402: </a>  <font color="#4169E1">return</font>(0);
-<a name="line403">403: </a>}
+<a name="line386">386: </a>  <font color="#4169E1">if</font> (!*mfn) <font color="#4169E1">return</font>(0);
+<a name="line388">388: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*mfn))->refct > 0) { *mfn = 0; <font color="#4169E1">return</font>(0); }
+<a name="line389">389: </a>  <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(*mfn);
+<a name="line390">390: </a>  <font color="#4169E1">if</font> ((*mfn)->ops->destroy) { (*(*mfn)->ops->destroy)(*mfn); }
+<a name="line391">391: </a>  MatDestroy(&(*mfn)->A);
+<a name="line392">392: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&(*mfn)->V);
+<a name="line393">393: </a>  <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&(*mfn)->fn);
+<a name="line394">394: </a>  <a href="../../../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>(*mfn);
+<a name="line395">395: </a>  PetscHeaderDestroy(mfn);
+<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
+<a name="line397">397: </a>}
 
-<a name="line407">407: </a><font color="#B22222">/*@</font>
-<a name="line408">408: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a> - Associates a basis vectors object to the matrix function solver.</font>
+<a name="line401">401: </a><font color="#B22222">/*@</font>
+<a name="line402">402: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a> - Associates a basis vectors object to the matrix function solver.</font>
 
-<a name="line410">410: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line404">404: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
-<a name="line412">412: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line413">413: </a><font color="#B22222">+  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
-<a name="line414">414: </a><font color="#B22222">-  bv  - the basis vectors object</font>
+<a name="line406">406: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line407">407: </a><font color="#B22222">+  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
+<a name="line408">408: </a><font color="#B22222">-  bv  - the basis vectors object</font>
 
-<a name="line416">416: </a><font color="#B22222">   Note:</font>
-<a name="line417">417: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>() to retrieve the basis vectors context (for example,</font>
-<a name="line418">418: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line410">410: </a><font color="#B22222">   Note:</font>
+<a name="line411">411: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>() to retrieve the basis vectors context (for example,</font>
+<a name="line412">412: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line420">420: </a><font color="#B22222">   Level: advanced</font>
+<a name="line414">414: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line422">422: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>()</font>
-<a name="line423">423: </a><font color="#B22222">@*/</font>
-<a name="line424">424: </a><strong><font color="#4169E1"><a name="MFNSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line425">425: </a>{
+<a name="line416">416: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>()</font>
+<a name="line417">417: </a><font color="#B22222">@*/</font>
+<a name="line418">418: </a><strong><font color="#4169E1"><a name="MFNSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line419">419: </a>{
 
-<a name="line432">432: </a>  PetscObjectReference((PetscObject)bv);
-<a name="line433">433: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&mfn->V);
-<a name="line434">434: </a>  mfn->V = bv;
-<a name="line435">435: </a>  PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->V);
-<a name="line436">436: </a>  <font color="#4169E1">return</font>(0);
-<a name="line437">437: </a>}
+<a name="line426">426: </a>  PetscObjectReference((PetscObject)bv);
+<a name="line427">427: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&mfn->V);
+<a name="line428">428: </a>  mfn->V = bv;
+<a name="line429">429: </a>  PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->V);
+<a name="line430">430: </a>  <font color="#4169E1">return</font>(0);
+<a name="line431">431: </a>}
 
-<a name="line441">441: </a><font color="#B22222">/*@</font>
-<a name="line442">442: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a> - Obtain the basis vectors object associated to the matrix</font>
-<a name="line443">443: </a><font color="#B22222">   function solver.</font>
+<a name="line435">435: </a><font color="#B22222">/*@</font>
+<a name="line436">436: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a> - Obtain the basis vectors object associated to the matrix</font>
+<a name="line437">437: </a><font color="#B22222">   function solver.</font>
 
-<a name="line445">445: </a><font color="#B22222">   Not Collective</font>
+<a name="line439">439: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line447">447: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line448">448: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
+<a name="line441">441: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line442">442: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
 
-<a name="line450">450: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line451">451: </a><font color="#B22222">.  bv - basis vectors context</font>
+<a name="line444">444: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line445">445: </a><font color="#B22222">.  bv - basis vectors context</font>
 
-<a name="line453">453: </a><font color="#B22222">   Level: advanced</font>
+<a name="line447">447: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line455">455: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a>()</font>
-<a name="line456">456: </a><font color="#B22222">@*/</font>
-<a name="line457">457: </a><strong><font color="#4169E1"><a name="MFNGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
-<a name="line458">458: </a>{
+<a name="line449">449: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetBV.html#MFNSetBV">MFNSetBV</a>()</font>
+<a name="line450">450: </a><font color="#B22222">@*/</font>
+<a name="line451">451: </a><strong><font color="#4169E1"><a name="MFNGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
+<a name="line452">452: </a>{
 
-<a name="line464">464: </a>  <font color="#4169E1">if</font> (!mfn->V) {
-<a name="line465">465: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)mfn),&mfn->V);
-<a name="line466">466: </a>    PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->V);
-<a name="line467">467: </a>  }
-<a name="line468">468: </a>  *bv = mfn->V;
-<a name="line469">469: </a>  <font color="#4169E1">return</font>(0);
-<a name="line470">470: </a>}
+<a name="line458">458: </a>  <font color="#4169E1">if</font> (!mfn->V) {
+<a name="line459">459: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)mfn),&mfn->V);
+<a name="line460">460: </a>    PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->V);
+<a name="line461">461: </a>  }
+<a name="line462">462: </a>  *bv = mfn->V;
+<a name="line463">463: </a>  <font color="#4169E1">return</font>(0);
+<a name="line464">464: </a>}
 
-<a name="line474">474: </a><font color="#B22222">/*@</font>
-<a name="line475">475: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a> - Specifies the function to be computed.</font>
+<a name="line468">468: </a><font color="#B22222">/*@</font>
+<a name="line469">469: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a> - Specifies the function to be computed.</font>
 
-<a name="line477">477: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line471">471: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
-<a name="line479">479: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line480">480: </a><font color="#B22222">+  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
-<a name="line481">481: </a><font color="#B22222">-  fn  - the math function object</font>
-
-<a name="line483">483: </a><font color="#B22222">   Note:</font>
-<a name="line484">484: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>() to retrieve the math function context (for example,</font>
-<a name="line485">485: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line473">473: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line474">474: </a><font color="#B22222">+  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
+<a name="line475">475: </a><font color="#B22222">-  fn  - the math function object</font>
 
-<a name="line487">487: </a><font color="#B22222">   Level: beginner</font>
+<a name="line477">477: </a><font color="#B22222">   Note:</font>
+<a name="line478">478: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>() to retrieve the math function context (for example,</font>
+<a name="line479">479: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line489">489: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>()</font>
-<a name="line490">490: </a><font color="#B22222">@*/</font>
-<a name="line491">491: </a><strong><font color="#4169E1"><a name="MFNSetFN"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line492">492: </a>{
+<a name="line481">481: </a><font color="#B22222">   Level: beginner</font>
 
-<a name="line499">499: </a>  PetscObjectReference((PetscObject)fn);
-<a name="line500">500: </a>  <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&mfn->fn);
-<a name="line501">501: </a>  mfn->fn = fn;
-<a name="line502">502: </a>  PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->fn);
-<a name="line503">503: </a>  <font color="#4169E1">return</font>(0);
-<a name="line504">504: </a>}
-
-<a name="line508">508: </a><font color="#B22222">/*@</font>
-<a name="line509">509: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a> - Obtain the math function object associated to the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
-
-<a name="line511">511: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line513">513: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line514">514: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
-
-<a name="line516">516: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line517">517: </a><font color="#B22222">.  fn - math function context</font>
+<a name="line483">483: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>()</font>
+<a name="line484">484: </a><font color="#B22222">@*/</font>
+<a name="line485">485: </a><strong><font color="#4169E1"><a name="MFNSetFN"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line486">486: </a>{
 
-<a name="line519">519: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line493">493: </a>  PetscObjectReference((PetscObject)fn);
+<a name="line494">494: </a>  <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&mfn->fn);
+<a name="line495">495: </a>  mfn->fn = fn;
+<a name="line496">496: </a>  PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->fn);
+<a name="line497">497: </a>  <font color="#4169E1">return</font>(0);
+<a name="line498">498: </a>}
 
-<a name="line521">521: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a>()</font>
-<a name="line522">522: </a><font color="#B22222">@*/</font>
-<a name="line523">523: </a><strong><font color="#4169E1"><a name="MFNGetFN"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> *fn)</font></strong>
-<a name="line524">524: </a>{
+<a name="line502">502: </a><font color="#B22222">/*@</font>
+<a name="line503">503: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a> - Obtain the math function object associated to the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
+
+<a name="line505">505: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line507">507: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line508">508: </a><font color="#B22222">.  mfn - matrix function context obtained from <a href="../../../docs/manualpages/MFN/MFNCreate.html#MFNCreate">MFNCreate</a>()</font>
+
+<a name="line510">510: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line511">511: </a><font color="#B22222">.  fn - math function context</font>
 
-<a name="line530">530: </a>  <font color="#4169E1">if</font> (!mfn->fn) {
-<a name="line531">531: </a>    <a href="../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PetscObjectComm((PetscObject)mfn),&mfn->fn);
-<a name="line532">532: </a>    PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->fn);
-<a name="line533">533: </a>  }
-<a name="line534">534: </a>  *fn = mfn->fn;
-<a name="line535">535: </a>  <font color="#4169E1">return</font>(0);
-<a name="line536">536: </a>}
+<a name="line513">513: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line515">515: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetFN.html#MFNSetFN">MFNSetFN</a>()</font>
+<a name="line516">516: </a><font color="#B22222">@*/</font>
+<a name="line517">517: </a><strong><font color="#4169E1"><a name="MFNGetFN"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> *fn)</font></strong>
+<a name="line518">518: </a>{
+
+<a name="line524">524: </a>  <font color="#4169E1">if</font> (!mfn->fn) {
+<a name="line525">525: </a>    <a href="../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PetscObjectComm((PetscObject)mfn),&mfn->fn);
+<a name="line526">526: </a>    PetscLogObjectParent((PetscObject)mfn,(PetscObject)mfn->fn);
+<a name="line527">527: </a>  }
+<a name="line528">528: </a>  *fn = mfn->fn;
+<a name="line529">529: </a>  <font color="#4169E1">return</font>(0);
+<a name="line530">530: </a>}
 
 </pre>
 </body>
diff --git a/src/mfn/interface/mfnmon.c b/src/mfn/interface/mfnmon.c
index 8afa652..22b7f1a 100644
--- a/src/mfn/interface/mfnmon.c
+++ b/src/mfn/interface/mfnmon.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -164,52 +164,101 @@ PetscErrorCode MFNGetMonitorContext(MFN mfn,void **ctx)
 +  mfn    - matrix function context
 .  its    - iteration number
 .  errest - error estimate
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: MFNMonitorSet()
 @*/
-PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,void *monctx)
+PetscErrorCode MFNMonitorDefault(MFN mfn,PetscInt its,PetscReal errest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)mfn));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
+  PetscValidHeaderSpecific(mfn,MFN_CLASSID,1);
+  PetscValidPointer(vf,4);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,4);
+  ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
   ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)mfn)->tablevel);CHKERRQ(ierr);
-  if (its == 0 && ((PetscObject)mfn)->prefix) {
-    ierr = PetscViewerASCIIPrintf(viewer,"  Monitor for %s solve.\n",((PetscObject)mfn)->prefix);CHKERRQ(ierr);
+  if (its == 1 && ((PetscObject)mfn)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Error estimates for %s solve.\n",((PetscObject)mfn)->prefix);CHKERRQ(ierr);
   }
-  ierr = PetscViewerASCIIPrintf(viewer,"%3D MFN value %14.12e\n",its,(double)errest);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIPrintf(viewer,"%3D MFN Error estimate %14.12e\n",its,(double)errest);CHKERRQ(ierr);
   ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)mfn)->tablevel);CHKERRQ(ierr);
+  ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "MFNMonitorLG"
-PetscErrorCode MFNMonitorLG(MFN mfn,PetscInt its,PetscReal errest,void *monctx)
+#define __FUNCT__ "MFNMonitorLGCreate"
+/*@C
+   MFNMonitorLGCreate - Creates a line graph context for use with
+   MFN to monitor convergence.
+
+   Collective on MPI_Comm
+
+   Input Parameters:
++  comm - communicator context
+.  host - the X display to open, or null for the local machine
+.  label - the title to put in the title bar
+.  x, y - the screen coordinates of the upper left coordinate of
+          the window
+-  m, n - the screen width and height in pixels
+
+   Output Parameter:
+.  lgctx - the drawing context
+
+   Options Database Keys:
+.  -mfn_monitor_lg - Sets line graph monitor
+
+   Notes:
+   Use PetscDrawLGDestroy() to destroy this line graph.
+
+   Level: intermediate
+
+.seealso: MFNMonitorSet()
+@*/
+PetscErrorCode MFNMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
   PetscDraw      draw;
   PetscDrawLG    lg;
   PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscDrawCreate(comm,host,label,x,y,m,n,&draw);CHKERRQ(ierr);
+  ierr = PetscDrawSetFromOptions(draw);CHKERRQ(ierr);
+  ierr = PetscDrawLGCreate(draw,1,&lg);CHKERRQ(ierr);
+  ierr = PetscDrawLGSetFromOptions(lg);CHKERRQ(ierr);
+  ierr = PetscDrawDestroy(&draw);CHKERRQ(ierr);
+  *lgctx = lg;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MFNMonitorLG"
+PetscErrorCode MFNMonitorLG(MFN mfn,PetscInt its,PetscReal errest,void *ctx)
+{
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscReal      x,y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)mfn));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimate");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(mfn->tol)-2,0.0);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(mfn->tol)-2,0.0);CHKERRQ(ierr);
   }
   x = (PetscReal)its;
-  if (errest>0.0) y = PetscLog10Real(errest); else y = 0.0;
+  if (errest > 0.0) y = PetscLog10Real(errest);
+  else y = 0.0;
   ierr = PetscDrawLGAddPoint(lg,&x,&y);CHKERRQ(ierr);
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || mfn->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/mfn/interface/mfnmon.c.html b/src/mfn/interface/mfnmon.c.html
index 8a06fcb..7b57909 100644
--- a/src/mfn/interface/mfnmon.c.html
+++ b/src/mfn/interface/mfnmon.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/mfnmon.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:27+00:00">
+<meta name="date" content="2016-05-16T10:34:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/mfnmon.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/mfnmon.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> routines related to monitors.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -157,48 +157,89 @@
 <a name="line164">164: </a><font color="#B22222">+  mfn    - matrix function context</font>
 <a name="line165">165: </a><font color="#B22222">.  its    - iteration number</font>
 <a name="line166">166: </a><font color="#B22222">.  errest - error estimate</font>
-<a name="line167">167: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
+<a name="line167">167: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
 
 <a name="line169">169: </a><font color="#B22222">   Level: intermediate</font>
 
 <a name="line171">171: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>()</font>
 <a name="line172">172: </a><font color="#B22222">@*/</font>
-<a name="line173">173: </a><strong><font color="#4169E1"><a name="MFNMonitorDefault"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt its,PetscReal errest,void *monctx)</font></strong>
+<a name="line173">173: </a><strong><font color="#4169E1"><a name="MFNMonitorDefault"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt its,PetscReal errest,PetscViewerAndFormat *vf)</font></strong>
 <a name="line174">174: </a>{
-<a name="line176">176: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)mfn));
-
-<a name="line179">179: </a>  PetscViewerASCIIAddTab(viewer,((PetscObject)mfn)->tablevel);
-<a name="line180">180: </a>  <font color="#4169E1">if</font> (its == 0 && ((PetscObject)mfn)->prefix) {
-<a name="line181">181: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Monitor for %s solve.\n"</font>,((PetscObject)mfn)->prefix);
-<a name="line182">182: </a>  }
-<a name="line183">183: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> value %14.12e\n"</font>,its,(double)errest);
-<a name="line184">184: </a>  PetscViewerASCIISubtractTab(viewer,((PetscObject)mfn)->tablevel);
-<a name="line185">185: </a>  <font color="#4169E1">return</font>(0);
-<a name="line186">186: </a>}
-
-<a name="line190">190: </a><strong><font color="#4169E1"><a name="MFNMonitorLG"></a>PetscErrorCode MFNMonitorLG(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt its,PetscReal errest,void *monctx)</font></strong>
-<a name="line191">191: </a>{
-<a name="line192">192: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line193">193: </a>  PetscDraw      draw;
-<a name="line194">194: </a>  PetscDrawLG    lg;
-<a name="line196">196: </a>  PetscReal      x,y;
-
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)mfn));
-<a name="line200">200: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line201">201: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line202">202: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line203">203: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimate"</font>);
-<a name="line204">204: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line205">205: </a>    PetscDrawLGSetDimension(lg,1);
-<a name="line206">206: </a>    PetscDrawLGReset(lg);
-<a name="line207">207: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(mfn->tol)-2,0.0);
-<a name="line208">208: </a>  }
-<a name="line209">209: </a>  x = (PetscReal)its;
-<a name="line210">210: </a>  <font color="#4169E1">if</font> (errest>0.0) y = PetscLog10Real(errest); <font color="#4169E1">else</font> y = 0.0;
-<a name="line211">211: </a>  PetscDrawLGAddPoint(lg,&x,&y);
-<a name="line212">212: </a>  PetscDrawLGDraw(lg);
-<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
-<a name="line214">214: </a>}
+<a name="line176">176: </a>  PetscViewer    viewer;
+
+<a name="line181">181: </a>  viewer = vf->viewer;
+<a name="line183">183: </a>  PetscViewerPushFormat(viewer,vf->format);
+<a name="line184">184: </a>  PetscViewerASCIIAddTab(viewer,((PetscObject)mfn)->tablevel);
+<a name="line185">185: </a>  <font color="#4169E1">if</font> (its == 1 && ((PetscObject)mfn)->prefix) {
+<a name="line186">186: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Error estimates for %s solve.\n"</font>,((PetscObject)mfn)->prefix);
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> Error estimate %14.12e\n"</font>,its,(double)errest);
+<a name="line189">189: </a>  PetscViewerASCIISubtractTab(viewer,((PetscObject)mfn)->tablevel);
+<a name="line190">190: </a>  PetscViewerPopFormat(viewer);
+<a name="line191">191: </a>  <font color="#4169E1">return</font>(0);
+<a name="line192">192: </a>}
+
+<a name="line196">196: </a><font color="#B22222">/*@C</font>
+<a name="line197">197: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNMonitorLGCreate.html#MFNMonitorLGCreate">MFNMonitorLGCreate</a> - Creates a line graph context for use with</font>
+<a name="line198">198: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> to monitor convergence.</font>
+
+<a name="line200">200: </a><font color="#B22222">   Collective on MPI_Comm</font>
+
+<a name="line202">202: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line203">203: </a><font color="#B22222">+  comm - communicator context</font>
+<a name="line204">204: </a><font color="#B22222">.  host - the X display to open, or null for the local machine</font>
+<a name="line205">205: </a><font color="#B22222">.  label - the title to put in the title bar</font>
+<a name="line206">206: </a><font color="#B22222">.  x, y - the screen coordinates of the upper left coordinate of</font>
+<a name="line207">207: </a><font color="#B22222">          the window</font>
+<a name="line208">208: </a><font color="#B22222">-  m, n - the screen width and height in pixels</font>
+
+<a name="line210">210: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line211">211: </a><font color="#B22222">.  lgctx - the drawing context</font>
+
+<a name="line213">213: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line214">214: </a><font color="#B22222">.  -mfn_monitor_lg - Sets line graph monitor</font>
+
+<a name="line216">216: </a><font color="#B22222">   Notes:</font>
+<a name="line217">217: </a><font color="#B22222">   Use PetscDrawLGDestroy() to destroy this line graph.</font>
+
+<a name="line219">219: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line221">221: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>()</font>
+<a name="line222">222: </a><font color="#B22222">@*/</font>
+<a name="line223">223: </a><strong><font color="#4169E1"><a name="MFNMonitorLGCreate"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNMonitorLGCreate.html#MFNMonitorLGCreate">MFNMonitorLGCreate</a>(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)</font></strong>
+<a name="line224">224: </a>{
+<a name="line225">225: </a>  PetscDraw      draw;
+<a name="line226">226: </a>  PetscDrawLG    lg;
+
+<a name="line230">230: </a>  PetscDrawCreate(comm,host,label,x,y,m,n,&draw);
+<a name="line231">231: </a>  PetscDrawSetFromOptions(draw);
+<a name="line232">232: </a>  PetscDrawLGCreate(draw,1,&lg);
+<a name="line233">233: </a>  PetscDrawLGSetFromOptions(lg);
+<a name="line234">234: </a>  PetscDrawDestroy(&draw);
+<a name="line235">235: </a>  *lgctx = lg;
+<a name="line236">236: </a>  <font color="#4169E1">return</font>(0);
+<a name="line237">237: </a>}
+
+<a name="line241">241: </a><strong><font color="#4169E1"><a name="MFNMonitorLG"></a>PetscErrorCode MFNMonitorLG(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt its,PetscReal errest,void *ctx)</font></strong>
+<a name="line242">242: </a>{
+<a name="line243">243: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line244">244: </a>  PetscReal      x,y;
+
+<a name="line249">249: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line250">250: </a>    PetscDrawLGReset(lg);
+<a name="line251">251: </a>    PetscDrawLGSetDimension(lg,1);
+<a name="line252">252: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(mfn->tol)-2,0.0);
+<a name="line253">253: </a>  }
+<a name="line254">254: </a>  x = (PetscReal)its;
+<a name="line255">255: </a>  <font color="#4169E1">if</font> (errest > 0.0) y = PetscLog10Real(errest);
+<a name="line256">256: </a>  <font color="#4169E1">else</font> y = 0.0;
+<a name="line257">257: </a>  PetscDrawLGAddPoint(lg,&x,&y);
+<a name="line258">258: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || mfn->reason) {
+<a name="line259">259: </a>    PetscDrawLGDraw(lg);
+<a name="line260">260: </a>    PetscDrawLGSave(lg);
+<a name="line261">261: </a>  }
+<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
+<a name="line263">263: </a>}
 
 </pre>
 </body>
diff --git a/src/mfn/interface/mfnopts.c b/src/mfn/interface/mfnopts.c
index 2d4bd16..59b9766 100644
--- a/src/mfn/interface/mfnopts.c
+++ b/src/mfn/interface/mfnopts.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -23,6 +23,45 @@
 */
 
 #include <slepc/private/mfnimpl.h>   /*I "slepcmfn.h" I*/
+#include <petscdraw.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "MFNMonitorSetFromOptions"
+/*@C
+   MFNMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user.
+
+   Collective on MFN
+
+   Input Parameters:
++  mfn      - the eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+.  monitor  - the monitor function, whose context is a PetscViewerAndFormat
+-  trackall - whether this monitor tracks all eigenvalues or not
+
+   Level: developer
+
+.seealso: MFNMonitorSet(), MFNSetTrackAll(), MFNConvMonitorSetFromOptions()
+@*/
+PetscErrorCode MFNMonitorSetFromOptions(MFN mfn,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,PetscViewerAndFormat*))
+{
+  PetscErrorCode       ierr;
+  PetscBool            flg;
+  PetscViewer          viewer;
+  PetscViewerFormat    format;
+  PetscViewerAndFormat *vf;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)mfn),((PetscObject)mfn)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = PetscViewerAndFormatCreate(viewer,format,&vf);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = MFNMonitorSet(mfn,(PetscErrorCode (*)(MFN,PetscInt,PetscReal,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "MFNSetFromOptions"
@@ -43,12 +82,12 @@
 @*/
 PetscErrorCode MFNSetFromOptions(MFN mfn)
 {
-  PetscErrorCode   ierr;
-  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-  PetscBool        flg,flg1,flg2;
-  PetscReal        r;
-  PetscInt         i;
-  PetscViewer      monviewer;
+  PetscErrorCode ierr;
+  char           type[256];
+  PetscBool      set,flg,flg1,flg2;
+  PetscReal      r;
+  PetscInt       i;
+  PetscDrawLG    lg;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(mfn,MFN_CLASSID,1);
@@ -85,39 +124,36 @@ PetscErrorCode MFNSetFromOptions(MFN mfn)
     /*
       Cancels all monitors hardwired into code before call to MFNSetFromOptions()
     */
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-mfn_monitor_cancel","Remove any hardwired monitor routines","MFNMonitorCancel",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
+    ierr = PetscOptionsBool("-mfn_monitor_cancel","Remove any hardwired monitor routines","MFNMonitorCancel",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
       ierr = MFNMonitorCancel(mfn);CHKERRQ(ierr);
     }
     /*
-      Prints error estimate at each iteration
+      Text monitors
     */
-    ierr = PetscOptionsString("-mfn_monitor","Monitor error estimate","MFNMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)mfn),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = MFNMonitorSet(mfn,MFNMonitorDefault,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-    }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-mfn_monitor_lg","Monitor error estimate graphically","MFNMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = MFNMonitorSet(mfn,MFNMonitorLG,NULL,NULL);CHKERRQ(ierr);
+    ierr = MFNMonitorSetFromOptions(mfn,"-mfn_monitor","Monitor error estimate","MFNMonitorDefault",MFNMonitorDefault);CHKERRQ(ierr);
+    /*
+      Line graph monitors
+    */
+    ierr = PetscOptionsBool("-mfn_monitor_lg","Monitor error estimate graphically","MFNMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = MFNMonitorLGCreate(PetscObjectComm((PetscObject)mfn),NULL,"Error estimate",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = MFNMonitorSet(mfn,MFNMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
     }
   /* -----------------------------------------------------------------------*/
 
-    ierr = PetscOptionsName("-mfn_view","Print detailed information on solver used","MFNView",0);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-mfn_view","Print detailed information on solver used","MFNView",NULL);CHKERRQ(ierr);
 
     if (mfn->ops->setfromoptions) {
       ierr = (*mfn->ops->setfromoptions)(PetscOptionsObject,mfn);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)mfn);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)mfn);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
 
   if (!mfn->V) { ierr = MFNGetBV(mfn,&mfn->V);CHKERRQ(ierr); }
   ierr = BVSetFromOptions(mfn->V);CHKERRQ(ierr);
   if (!mfn->fn) { ierr = MFNGetFN(mfn,&mfn->fn);CHKERRQ(ierr); }
   ierr = FNSetFromOptions(mfn->fn);CHKERRQ(ierr);
-  ierr = PetscRandomSetFromOptions(mfn->rand);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -411,7 +447,8 @@ PetscErrorCode MFNAppendOptionsPrefix(MFN mfn,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
diff --git a/src/mfn/interface/mfnopts.c.html b/src/mfn/interface/mfnopts.c.html
index 8fe7642..05da775 100644
--- a/src/mfn/interface/mfnopts.c.html
+++ b/src/mfn/interface/mfnopts.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/mfnopts.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:29+00:00">
+<meta name="date" content="2016-05-16T10:34:37+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/mfnopts.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/mfnopts.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> routines related to options that can be set via the command-line</font>
 <a name="line3">  3: </a><font color="#B22222">      or procedurally.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,361 +35,394 @@
 <a name="line23"> 23: </a><font color="#B22222">*/</font>
 
 <a name="line25"> 25: </a><font color="#A020F0">#include <slepc/private/mfnimpl.h>   </font><font color="#B22222">/*I "slepcmfn.h" I*/</font><font color="#A020F0"></font>
+<a name="line26"> 26: </a><font color="#A020F0">#include <petscdraw.h></font>
 
-<a name="line29"> 29: </a><font color="#B22222">/*@</font>
-<a name="line30"> 30: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a> - Sets <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options from the options database.</font>
-<a name="line31"> 31: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>() if the user is to be</font>
-<a name="line32"> 32: </a><font color="#B22222">   allowed to set the solver type.</font>
+<a name="line30"> 30: </a><font color="#B22222">/*@C</font>
+<a name="line31"> 31: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNMonitorSetFromOptions.html#MFNMonitorSetFromOptions">MFNMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line32"> 32: </a><font color="#B22222">   indicated by the user.</font>
 
 <a name="line34"> 34: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
 <a name="line36"> 36: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line37"> 37: </a><font color="#B22222">.  mfn - the matrix function context</font>
-
-<a name="line39"> 39: </a><font color="#B22222">   Notes:</font>
-<a name="line40"> 40: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line42"> 42: </a><font color="#B22222">   Level: beginner</font>
-<a name="line43"> 43: </a><font color="#B22222">@*/</font>
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="MFNSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
-<a name="line45"> 45: </a>{
-<a name="line46"> 46: </a>  PetscErrorCode   ierr;
-<a name="line47"> 47: </a>  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-<a name="line48"> 48: </a>  PetscBool        flg,flg1,flg2;
-<a name="line49"> 49: </a>  PetscReal        r;
-<a name="line50"> 50: </a>  PetscInt         i;
-<a name="line51"> 51: </a>  PetscViewer      monviewer;
-
-<a name="line55"> 55: </a>  <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a>();
-<a name="line56"> 56: </a>  PetscObjectOptionsBegin((PetscObject)mfn);
-<a name="line57"> 57: </a>    PetscOptionsFList(<font color="#666666">"-mfn_type"</font>,<font color="#666666">"Matrix Function method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>"</font>,MFNList,(char*)(((PetscObject)mfn)->type_name?((PetscObject)mfn)->type_name:MFNKRYLOV),type,256,&flg);
-<a name="line58"> 58: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line59"> 59: </a>      <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(mfn,type);
-<a name="line60"> 60: </a>    }
-<a name="line61"> 61: </a>    <font color="#B22222">/*</font>
-<a name="line62"> 62: </a><font color="#B22222">      Set the type if it was never set.</font>
-<a name="line63"> 63: </a><font color="#B22222">    */</font>
-<a name="line64"> 64: </a>    <font color="#4169E1">if</font> (!((PetscObject)mfn)->type_name) {
-<a name="line65"> 65: </a>      <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(mfn,MFNKRYLOV);
-<a name="line66"> 66: </a>    }
-
-<a name="line68"> 68: </a>    i = mfn->max_it;
-<a name="line69"> 69: </a>    PetscOptionsInt(<font color="#666666">"-mfn_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>"</font>,mfn->max_it,&i,&flg1);
-<a name="line70"> 70: </a>    <font color="#4169E1">if</font> (!flg1) i = PETSC_DEFAULT;
-<a name="line71"> 71: </a>    r = mfn->tol;
-<a name="line72"> 72: </a>    PetscOptionsReal(<font color="#666666">"-mfn_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>"</font>,mfn->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:mfn->tol,&r,&flg2);
-<a name="line73"> 73: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line74"> 74: </a>      <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(mfn,r,i);
-<a name="line75"> 75: </a>    }
-
-<a name="line77"> 77: </a>    PetscOptionsInt(<font color="#666666">"-mfn_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>"</font>,mfn->ncv,&i,&flg);
-<a name="line78"> 78: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line79"> 79: </a>      <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>(mfn,i);
-<a name="line80"> 80: </a>    }
-
-<a name="line82"> 82: </a>    PetscOptionsBool(<font color="#666666">"-mfn_error_if_not_converged"</font>,<font color="#666666">"Generate error if solver does not converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>"</font>,mfn->errorifnotconverged,&mfn->errorifnotconverged,NULL);
-
-<a name="line84"> 84: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-<a name="line85"> 85: </a>    <font color="#B22222">/*</font>
-<a name="line86"> 86: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>()</font>
-<a name="line87"> 87: </a><font color="#B22222">    */</font>
-<a name="line88"> 88: </a>    flg = PETSC_FALSE;
-<a name="line89"> 89: </a>    PetscOptionsBool(<font color="#666666">"-mfn_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>"</font>,flg,&flg,NULL);
-<a name="line90"> 90: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line91"> 91: </a>      <a href="../../../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>(mfn);
-<a name="line92"> 92: </a>    }
-<a name="line93"> 93: </a>    <font color="#B22222">/*</font>
-<a name="line94"> 94: </a><font color="#B22222">      Prints error estimate at each iteration</font>
-<a name="line95"> 95: </a><font color="#B22222">    */</font>
-<a name="line96"> 96: </a>    PetscOptionsString(<font color="#666666">"-mfn_monitor"</font>,<font color="#666666">"Monitor error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line37"> 37: </a><font color="#B22222">+  mfn      - the eigensolver context</font>
+<a name="line38"> 38: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line39"> 39: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line40"> 40: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line41"> 41: </a><font color="#B22222">.  monitor  - the monitor function, whose context is a PetscViewerAndFormat</font>
+<a name="line42"> 42: </a><font color="#B22222">-  trackall - whether this monitor tracks all eigenvalues or not</font>
+
+<a name="line44"> 44: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line46"> 46: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(), MFNSetTrackAll(), MFNConvMonitorSetFromOptions()</font>
+<a name="line47"> 47: </a><font color="#B22222">@*/</font>
+<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="MFNMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNMonitorSetFromOptions.html#MFNMonitorSetFromOptions">MFNMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,PetscViewerAndFormat*))</font>< [...]
+<a name="line49"> 49: </a>{
+<a name="line50"> 50: </a>  PetscErrorCode       ierr;
+<a name="line51"> 51: </a>  PetscBool            flg;
+<a name="line52"> 52: </a>  PetscViewer          viewer;
+<a name="line53"> 53: </a>  PetscViewerFormat    format;
+<a name="line54"> 54: </a>  PetscViewerAndFormat *vf;
+
+<a name="line57"> 57: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)mfn),((PetscObject)mfn)->prefix,name,&viewer,&format,&flg);
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line59"> 59: </a>    PetscViewerAndFormatCreate(viewer,format,&vf);
+<a name="line60"> 60: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line61"> 61: </a>    <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(mfn,(PetscErrorCode (*)(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>,PetscInt,PetscReal,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line62"> 62: </a>  }
+<a name="line63"> 63: </a>  <font color="#4169E1">return</font>(0);
+<a name="line64"> 64: </a>}
+
+<a name="line68"> 68: </a><font color="#B22222">/*@</font>
+<a name="line69"> 69: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a> - Sets <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options from the options database.</font>
+<a name="line70"> 70: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>() if the user is to be</font>
+<a name="line71"> 71: </a><font color="#B22222">   allowed to set the solver type.</font>
+
+<a name="line73"> 73: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+
+<a name="line75"> 75: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line76"> 76: </a><font color="#B22222">.  mfn - the matrix function context</font>
+
+<a name="line78"> 78: </a><font color="#B22222">   Notes:</font>
+<a name="line79"> 79: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line81"> 81: </a><font color="#B22222">   Level: beginner</font>
+<a name="line82"> 82: </a><font color="#B22222">@*/</font>
+<a name="line83"> 83: </a><strong><font color="#4169E1"><a name="MFNSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn)</font></strong>
+<a name="line84"> 84: </a>{
+<a name="line86"> 86: </a>  char           type[256];
+<a name="line87"> 87: </a>  PetscBool      set,flg,flg1,flg2;
+<a name="line88"> 88: </a>  PetscReal      r;
+<a name="line89"> 89: </a>  PetscInt       i;
+<a name="line90"> 90: </a>  PetscDrawLG    lg;
+
+<a name="line94"> 94: </a>  <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a>();
+<a name="line95"> 95: </a>  PetscObjectOptionsBegin((PetscObject)mfn);
+<a name="line96"> 96: </a>    PetscOptionsFList(<font color="#666666">"-mfn_type"</font>,<font color="#666666">"Matrix Function method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>"</font>,MFNList,(char*)(((PetscObject)mfn)->type_name?((PetscObject)mfn)->type_name:MFNKRYLOV),type,256,&flg);
 <a name="line97"> 97: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line98"> 98: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)mfn),monfilename,&monviewer);
-<a name="line99"> 99: </a>      <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(mfn,<a href="../../../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line100">100: </a>    }
-<a name="line101">101: </a>    flg = PETSC_FALSE;
-<a name="line102">102: </a>    PetscOptionsBool(<font color="#666666">"-mfn_monitor_lg"</font>,<font color="#666666">"Monitor error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line103">103: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line104">104: </a>      <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(mfn,MFNMonitorLG,NULL,NULL);
+<a name="line98"> 98: </a>      <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(mfn,type);
+<a name="line99"> 99: </a>    }
+<a name="line100">100: </a>    <font color="#B22222">/*</font>
+<a name="line101">101: </a><font color="#B22222">      Set the type if it was never set.</font>
+<a name="line102">102: </a><font color="#B22222">    */</font>
+<a name="line103">103: </a>    <font color="#4169E1">if</font> (!((PetscObject)mfn)->type_name) {
+<a name="line104">104: </a>      <a href="../../../docs/manualpages/MFN/MFNSetType.html#MFNSetType">MFNSetType</a>(mfn,MFNKRYLOV);
 <a name="line105">105: </a>    }
-<a name="line106">106: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-
-<a name="line108">108: </a>    PetscOptionsName(<font color="#666666">"-mfn_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNView.html#MFNView">MFNView</a>"</font>,0);
-
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (mfn->ops->setfromoptions) {
-<a name="line111">111: </a>      (*mfn->ops->setfromoptions)(PetscOptionsObject,mfn);
-<a name="line112">112: </a>    }
-<a name="line113">113: </a>    PetscObjectProcessOptionsHandlers((PetscObject)mfn);
-<a name="line114">114: </a>  PetscOptionsEnd();
-
-<a name="line116">116: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
-<a name="line117">117: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(mfn->V);
-<a name="line118">118: </a>  <font color="#4169E1">if</font> (!mfn->fn) { <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&mfn->fn); }
-<a name="line119">119: </a>  <a href="../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(mfn->fn);
-<a name="line120">120: </a>  PetscRandomSetFromOptions(mfn->rand);
-<a name="line121">121: </a>  <font color="#4169E1">return</font>(0);
-<a name="line122">122: </a>}
-
-<a name="line126">126: </a><font color="#B22222">/*@</font>
-<a name="line127">127: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
-<a name="line128">128: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> convergence tests.</font>
-
-<a name="line130">130: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line132">132: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line133">133: </a><font color="#B22222">.  mfn - the matrix function context</font>
-
-<a name="line135">135: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line136">136: </a><font color="#B22222">+  tol - the convergence tolerance</font>
-<a name="line137">137: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
-
-<a name="line139">139: </a><font color="#B22222">   Notes:</font>
-<a name="line140">140: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line142">142: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line144">144: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>()</font>
-<a name="line145">145: </a><font color="#B22222">@*/</font>
-<a name="line146">146: </a><strong><font color="#4169E1"><a name="MFNGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscReal *tol,PetscInt *maxits)</font></strong>
-<a name="line147">147: </a>{
-<a name="line150">150: </a>  <font color="#4169E1">if</font> (tol)    *tol    = mfn->tol;
-<a name="line151">151: </a>  <font color="#4169E1">if</font> (maxits) *maxits = mfn->max_it;
-<a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
-<a name="line153">153: </a>}
-
-<a name="line157">157: </a><font color="#B22222">/*@</font>
-<a name="line158">158: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
-<a name="line159">159: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> convergence tests.</font>
-
-<a name="line161">161: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
-
-<a name="line163">163: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line164">164: </a><font color="#B22222">+  mfn - the matrix function context</font>
-<a name="line165">165: </a><font color="#B22222">.  tol - the convergence tolerance</font>
-<a name="line166">166: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
-
-<a name="line168">168: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line169">169: </a><font color="#B22222">+  -mfn_tol <tol> - Sets the convergence tolerance</font>
-<a name="line170">170: </a><font color="#B22222">-  -mfn_max_it <maxits> - Sets the maximum number of iterations allowed</font>
-
-<a name="line172">172: </a><font color="#B22222">   Notes:</font>
-<a name="line173">173: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
-
-<a name="line175">175: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line177">177: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>()</font>
-<a name="line178">178: </a><font color="#B22222">@*/</font>
-<a name="line179">179: </a><strong><font color="#4169E1"><a name="MFNSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscReal tol,PetscInt maxits)</font></strong>
-<a name="line180">180: </a>{
-<a name="line185">185: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
-<a name="line186">186: </a>    mfn->tol = PETSC_DEFAULT;
-<a name="line187">187: </a>    mfn->setupcalled = 0;
-<a name="line188">188: </a>  } <font color="#4169E1">else</font> {
-<a name="line189">189: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
-<a name="line190">190: </a>    mfn->tol = tol;
-<a name="line191">191: </a>  }
-<a name="line192">192: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
-<a name="line193">193: </a>    mfn->max_it = 0;
-<a name="line194">194: </a>    mfn->setupcalled = 0;
-<a name="line195">195: </a>  } <font color="#4169E1">else</font> {
-<a name="line196">196: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
-<a name="line197">197: </a>    mfn->max_it = maxits;
-<a name="line198">198: </a>  }
-<a name="line199">199: </a>  <font color="#4169E1">return</font>(0);
-<a name="line200">200: </a>}
-
-<a name="line204">204: </a><font color="#B22222">/*@</font>
-<a name="line205">205: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a> - Gets the dimension of the subspace used by the solver.</font>
-
-<a name="line207">207: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line209">209: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line210">210: </a><font color="#B22222">.  mfn - the matrix function context</font>
-
-<a name="line212">212: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line213">213: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-
-<a name="line215">215: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line217">217: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>()</font>
-<a name="line218">218: </a><font color="#B22222">@*/</font>
-<a name="line219">219: </a><strong><font color="#4169E1"><a name="MFNGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt *ncv)</font></strong>
-<a name="line220">220: </a>{
-<a name="line224">224: </a>  *ncv = mfn->ncv;
-<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
-<a name="line226">226: </a>}
-
-<a name="line230">230: </a><font color="#B22222">/*@</font>
-<a name="line231">231: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a> - Sets the dimension of the subspace to be used by the solver.</font>
-
-<a name="line233">233: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
-
-<a name="line235">235: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line236">236: </a><font color="#B22222">+  mfn - the matrix function context</font>
-<a name="line237">237: </a><font color="#B22222">-  ncv - the maximum dimension of the subspace to be used by the solver</font>
-
-<a name="line239">239: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line240">240: </a><font color="#B22222">.  -mfn_ncv <ncv> - Sets the dimension of the subspace</font>
-
-<a name="line242">242: </a><font color="#B22222">   Notes:</font>
-<a name="line243">243: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv to assign a reasonably good value, which is</font>
-<a name="line244">244: </a><font color="#B22222">   dependent on the solution method.</font>
-
-<a name="line246">246: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line248">248: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>()</font>
-<a name="line249">249: </a><font color="#B22222">@*/</font>
-<a name="line250">250: </a><strong><font color="#4169E1"><a name="MFNSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt ncv)</font></strong>
-<a name="line251">251: </a>{
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
-<a name="line256">256: </a>    mfn->ncv = 0;
-<a name="line257">257: </a>  } <font color="#4169E1">else</font> {
-<a name="line258">258: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
-<a name="line259">259: </a>    mfn->ncv = ncv;
-<a name="line260">260: </a>  }
-<a name="line261">261: </a>  mfn->setupcalled = 0;
-<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
-<a name="line263">263: </a>}
-
-<a name="line267">267: </a><font color="#B22222">/*@</font>
-<a name="line268">268: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a> - Causes <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() to generate an error if the</font>
-<a name="line269">269: </a><font color="#B22222">   solver has not converged.</font>
-
-<a name="line271">271: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
-
-<a name="line273">273: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line274">274: </a><font color="#B22222">+  mfn - the matrix function context</font>
-<a name="line275">275: </a><font color="#B22222">-  flg - PETSC_TRUE indicates you want the error generated</font>
-
-<a name="line277">277: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line278">278: </a><font color="#B22222">.  -mfn_error_if_not_converged - this takes an optional truth value (0/1/no/yes/true/false)</font>
-
-<a name="line280">280: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line282">282: </a><font color="#B22222">   Note:</font>
-<a name="line283">283: </a><font color="#B22222">   Normally SLEPc continues if the solver fails to converge, you can call</font>
-<a name="line284">284: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>() after a <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() to determine if it has converged.</font>
-
-<a name="line286">286: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a>()</font>
-<a name="line287">287: </a><font color="#B22222">@*/</font>
-<a name="line288">288: </a><strong><font color="#4169E1"><a name="MFNSetErrorIfNotConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscBool flg)</font></strong>
-<a name="line289">289: </a>{
-<a name="line293">293: </a>  mfn->errorifnotconverged = flg;
-<a name="line294">294: </a>  <font color="#4169E1">return</font>(0);
-<a name="line295">295: </a>}
-
-<a name="line299">299: </a><font color="#B22222">/*@</font>
-<a name="line300">300: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a> - Return a flag indicating whether <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() will</font>
-<a name="line301">301: </a><font color="#B22222">   generate an error if the solver does not converge.</font>
-
-<a name="line303">303: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line305">305: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line306">306: </a><font color="#B22222">.  mfn - the matrix function context</font>
-
-<a name="line308">308: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line309">309: </a><font color="#B22222">.  flag - PETSC_TRUE if it will generate an error, else PETSC_FALSE</font>
-
-<a name="line311">311: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line313">313: </a><font color="#B22222">.seealso:  <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>()</font>
-<a name="line314">314: </a><font color="#B22222">@*/</font>
-<a name="line315">315: </a><strong><font color="#4169E1"><a name="MFNGetErrorIfNotConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscBool *flag)</font></strong>
-<a name="line316">316: </a>{
-<a name="line320">320: </a>  *flag = mfn->errorifnotconverged;
-<a name="line321">321: </a>  <font color="#4169E1">return</font>(0);
-<a name="line322">322: </a>}
 
-<a name="line326">326: </a><font color="#B22222">/*@C</font>
-<a name="line327">327: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line328">328: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options in the database.</font>
-
-<a name="line330">330: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line107">107: </a>    i = mfn->max_it;
+<a name="line108">108: </a>    PetscOptionsInt(<font color="#666666">"-mfn_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>"</font>,mfn->max_it,&i,&flg1);
+<a name="line109">109: </a>    <font color="#4169E1">if</font> (!flg1) i = PETSC_DEFAULT;
+<a name="line110">110: </a>    r = mfn->tol;
+<a name="line111">111: </a>    PetscOptionsReal(<font color="#666666">"-mfn_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>"</font>,mfn->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:mfn->tol,&r,&flg2);
+<a name="line112">112: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line113">113: </a>      <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(mfn,r,i);
+<a name="line114">114: </a>    }
+
+<a name="line116">116: </a>    PetscOptionsInt(<font color="#666666">"-mfn_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>"</font>,mfn->ncv,&i,&flg);
+<a name="line117">117: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line118">118: </a>      <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>(mfn,i);
+<a name="line119">119: </a>    }
+
+<a name="line121">121: </a>    PetscOptionsBool(<font color="#666666">"-mfn_error_if_not_converged"</font>,<font color="#666666">"Generate error if solver does not converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>"</font>,mfn->errorifnotconverged,&mfn->errorifnotconverged,NULL);
+
+<a name="line123">123: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+<a name="line124">124: </a>    <font color="#B22222">/*</font>
+<a name="line125">125: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/MFN/MFNSetFromOptions.html#MFNSetFromOptions">MFNSetFromOptions</a>()</font>
+<a name="line126">126: </a><font color="#B22222">    */</font>
+<a name="line127">127: </a>    PetscOptionsBool(<font color="#666666">"-mfn_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line128">128: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line129">129: </a>      <a href="../../../docs/manualpages/MFN/MFNMonitorCancel.html#MFNMonitorCancel">MFNMonitorCancel</a>(mfn);
+<a name="line130">130: </a>    }
+<a name="line131">131: </a>    <font color="#B22222">/*</font>
+<a name="line132">132: </a><font color="#B22222">      Text monitors</font>
+<a name="line133">133: </a><font color="#B22222">    */</font>
+<a name="line134">134: </a>    <a href="../../../docs/manualpages/MFN/MFNMonitorSetFromOptions.html#MFNMonitorSetFromOptions">MFNMonitorSetFromOptions</a>(mfn,<font color="#666666">"-mfn_monitor"</font>,<font color="#666666">"Monitor error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>"</font>,<a href="../../../docs/manualpages/MFN/MFNMonitorDefault.html#MFNMonitorDefault">MFNMonitorDefault</a>);
+<a name="line135">135: </a>    <font color="#B22222">/*</font>
+<a name="line136">136: </a><font color="#B22222">      Line graph monitors</font>
+<a name="line137">137: </a><font color="#B22222">    */</font>
+<a name="line138">138: </a>    PetscOptionsBool(<font color="#666666">"-mfn_monitor_lg"</font>,<font color="#666666">"Monitor error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line139">139: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line140">140: </a>      <a href="../../../docs/manualpages/MFN/MFNMonitorLGCreate.html#MFNMonitorLGCreate">MFNMonitorLGCreate</a>(PetscObjectComm((PetscObject)mfn),NULL,<font color="#666666">"Error estimate"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line141">141: </a>      <a href="../../../docs/manualpages/MFN/MFNMonitorSet.html#MFNMonitorSet">MFNMonitorSet</a>(mfn,MFNMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line142">142: </a>    }
+<a name="line143">143: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+
+<a name="line145">145: </a>    PetscOptionsName(<font color="#666666">"-mfn_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNView.html#MFNView">MFNView</a>"</font>,NULL);
+
+<a name="line147">147: </a>    <font color="#4169E1">if</font> (mfn->ops->setfromoptions) {
+<a name="line148">148: </a>      (*mfn->ops->setfromoptions)(PetscOptionsObject,mfn);
+<a name="line149">149: </a>    }
+<a name="line150">150: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)mfn);
+<a name="line151">151: </a>  PetscOptionsEnd();
+
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
+<a name="line154">154: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(mfn->V);
+<a name="line155">155: </a>  <font color="#4169E1">if</font> (!mfn->fn) { <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&mfn->fn); }
+<a name="line156">156: </a>  <a href="../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(mfn->fn);
+<a name="line157">157: </a>  <font color="#4169E1">return</font>(0);
+<a name="line158">158: </a>}
+
+<a name="line162">162: </a><font color="#B22222">/*@</font>
+<a name="line163">163: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
+<a name="line164">164: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> convergence tests.</font>
+
+<a name="line166">166: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line168">168: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line169">169: </a><font color="#B22222">.  mfn - the matrix function context</font>
+
+<a name="line171">171: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line172">172: </a><font color="#B22222">+  tol - the convergence tolerance</font>
+<a name="line173">173: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
+
+<a name="line175">175: </a><font color="#B22222">   Notes:</font>
+<a name="line176">176: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line178">178: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line180">180: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>()</font>
+<a name="line181">181: </a><font color="#B22222">@*/</font>
+<a name="line182">182: </a><strong><font color="#4169E1"><a name="MFNGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line183">183: </a>{
+<a name="line186">186: </a>  <font color="#4169E1">if</font> (tol)    *tol    = mfn->tol;
+<a name="line187">187: </a>  <font color="#4169E1">if</font> (maxits) *maxits = mfn->max_it;
+<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
+<a name="line189">189: </a>}
+
+<a name="line193">193: </a><font color="#B22222">/*@</font>
+<a name="line194">194: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
+<a name="line195">195: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> convergence tests.</font>
+
+<a name="line197">197: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+
+<a name="line199">199: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line200">200: </a><font color="#B22222">+  mfn - the matrix function context</font>
+<a name="line201">201: </a><font color="#B22222">.  tol - the convergence tolerance</font>
+<a name="line202">202: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
+
+<a name="line204">204: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line205">205: </a><font color="#B22222">+  -mfn_tol <tol> - Sets the convergence tolerance</font>
+<a name="line206">206: </a><font color="#B22222">-  -mfn_max_it <maxits> - Sets the maximum number of iterations allowed</font>
+
+<a name="line208">208: </a><font color="#B22222">   Notes:</font>
+<a name="line209">209: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
+
+<a name="line211">211: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line213">213: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetTolerances.html#MFNGetTolerances">MFNGetTolerances</a>()</font>
+<a name="line214">214: </a><font color="#B22222">@*/</font>
+<a name="line215">215: </a><strong><font color="#4169E1"><a name="MFNSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line216">216: </a>{
+<a name="line221">221: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
+<a name="line222">222: </a>    mfn->tol = PETSC_DEFAULT;
+<a name="line223">223: </a>    mfn->setupcalled = 0;
+<a name="line224">224: </a>  } <font color="#4169E1">else</font> {
+<a name="line225">225: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line226">226: </a>    mfn->tol = tol;
+<a name="line227">227: </a>  }
+<a name="line228">228: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+<a name="line229">229: </a>    mfn->max_it = 0;
+<a name="line230">230: </a>    mfn->setupcalled = 0;
+<a name="line231">231: </a>  } <font color="#4169E1">else</font> {
+<a name="line232">232: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
+<a name="line233">233: </a>    mfn->max_it = maxits;
+<a name="line234">234: </a>  }
+<a name="line235">235: </a>  <font color="#4169E1">return</font>(0);
+<a name="line236">236: </a>}
+
+<a name="line240">240: </a><font color="#B22222">/*@</font>
+<a name="line241">241: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a> - Gets the dimension of the subspace used by the solver.</font>
+
+<a name="line243">243: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line245">245: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line246">246: </a><font color="#B22222">.  mfn - the matrix function context</font>
+
+<a name="line248">248: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line249">249: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+
+<a name="line251">251: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line253">253: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>()</font>
+<a name="line254">254: </a><font color="#B22222">@*/</font>
+<a name="line255">255: </a><strong><font color="#4169E1"><a name="MFNGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt *ncv)</font></strong>
+<a name="line256">256: </a>{
+<a name="line260">260: </a>  *ncv = mfn->ncv;
+<a name="line261">261: </a>  <font color="#4169E1">return</font>(0);
+<a name="line262">262: </a>}
+
+<a name="line266">266: </a><font color="#B22222">/*@</font>
+<a name="line267">267: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a> - Sets the dimension of the subspace to be used by the solver.</font>
+
+<a name="line269">269: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+
+<a name="line271">271: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line272">272: </a><font color="#B22222">+  mfn - the matrix function context</font>
+<a name="line273">273: </a><font color="#B22222">-  ncv - the maximum dimension of the subspace to be used by the solver</font>
+
+<a name="line275">275: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line276">276: </a><font color="#B22222">.  -mfn_ncv <ncv> - Sets the dimension of the subspace</font>
+
+<a name="line278">278: </a><font color="#B22222">   Notes:</font>
+<a name="line279">279: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv to assign a reasonably good value, which is</font>
+<a name="line280">280: </a><font color="#B22222">   dependent on the solution method.</font>
+
+<a name="line282">282: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line284">284: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetDimensions.html#MFNGetDimensions">MFNGetDimensions</a>()</font>
+<a name="line285">285: </a><font color="#B22222">@*/</font>
+<a name="line286">286: </a><strong><font color="#4169E1"><a name="MFNSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetDimensions.html#MFNSetDimensions">MFNSetDimensions</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt ncv)</font></strong>
+<a name="line287">287: </a>{
+<a name="line291">291: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
+<a name="line292">292: </a>    mfn->ncv = 0;
+<a name="line293">293: </a>  } <font color="#4169E1">else</font> {
+<a name="line294">294: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
+<a name="line295">295: </a>    mfn->ncv = ncv;
+<a name="line296">296: </a>  }
+<a name="line297">297: </a>  mfn->setupcalled = 0;
+<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
+<a name="line299">299: </a>}
+
+<a name="line303">303: </a><font color="#B22222">/*@</font>
+<a name="line304">304: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a> - Causes <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() to generate an error if the</font>
+<a name="line305">305: </a><font color="#B22222">   solver has not converged.</font>
+
+<a name="line307">307: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+
+<a name="line309">309: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line310">310: </a><font color="#B22222">+  mfn - the matrix function context</font>
+<a name="line311">311: </a><font color="#B22222">-  flg - PETSC_TRUE indicates you want the error generated</font>
+
+<a name="line313">313: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line314">314: </a><font color="#B22222">.  -mfn_error_if_not_converged - this takes an optional truth value (0/1/no/yes/true/false)</font>
+
+<a name="line316">316: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line318">318: </a><font color="#B22222">   Note:</font>
+<a name="line319">319: </a><font color="#B22222">   Normally SLEPc continues if the solver fails to converge, you can call</font>
+<a name="line320">320: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>() after a <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() to determine if it has converged.</font>
+
+<a name="line322">322: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a>()</font>
+<a name="line323">323: </a><font color="#B22222">@*/</font>
+<a name="line324">324: </a><strong><font color="#4169E1"><a name="MFNSetErrorIfNotConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscBool flg)</font></strong>
+<a name="line325">325: </a>{
+<a name="line329">329: </a>  mfn->errorifnotconverged = flg;
+<a name="line330">330: </a>  <font color="#4169E1">return</font>(0);
+<a name="line331">331: </a>}
+
+<a name="line335">335: </a><font color="#B22222">/*@</font>
+<a name="line336">336: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a> - Return a flag indicating whether <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() will</font>
+<a name="line337">337: </a><font color="#B22222">   generate an error if the solver does not converge.</font>
+
+<a name="line339">339: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line341">341: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line342">342: </a><font color="#B22222">.  mfn - the matrix function context</font>
+
+<a name="line344">344: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line345">345: </a><font color="#B22222">.  flag - PETSC_TRUE if it will generate an error, else PETSC_FALSE</font>
+
+<a name="line347">347: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line349">349: </a><font color="#B22222">.seealso:  <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>()</font>
+<a name="line350">350: </a><font color="#B22222">@*/</font>
+<a name="line351">351: </a><strong><font color="#4169E1"><a name="MFNGetErrorIfNotConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetErrorIfNotConverged.html#MFNGetErrorIfNotConverged">MFNGetErrorIfNotConverged</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscBool *flag)</font></strong>
+<a name="line352">352: </a>{
+<a name="line356">356: </a>  *flag = mfn->errorifnotconverged;
+<a name="line357">357: </a>  <font color="#4169E1">return</font>(0);
+<a name="line358">358: </a>}
 
-<a name="line332">332: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line333">333: </a><font color="#B22222">+  mfn - the matrix function context</font>
-<a name="line334">334: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> option requests</font>
-
-<a name="line336">336: </a><font color="#B22222">   Notes:</font>
-<a name="line337">337: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line338">338: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line339">339: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line341">341: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
-<a name="line342">342: </a><font color="#B22222">   different <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> contexts, one could call</font>
-<a name="line343">343: </a><font color="#B22222">.vb</font>
-<a name="line344">344: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(mfn1,"fun1_")</font>
-<a name="line345">345: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(mfn2,"fun2_")</font>
-<a name="line346">346: </a><font color="#B22222">.ve</font>
+<a name="line362">362: </a><font color="#B22222">/*@C</font>
+<a name="line363">363: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line364">364: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options in the database.</font>
+
+<a name="line366">366: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
 
-<a name="line348">348: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line350">350: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>()</font>
-<a name="line351">351: </a><font color="#B22222">@*/</font>
-<a name="line352">352: </a><strong><font color="#4169E1"><a name="MFNSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char *prefix)</font></strong>
-<a name="line353">353: </a>{
-
-<a name="line358">358: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
-<a name="line359">359: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(mfn->V,prefix);
-<a name="line360">360: </a>  <font color="#4169E1">if</font> (!mfn->fn) { <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&mfn->fn); }
-<a name="line361">361: </a>  <a href="../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(mfn->fn,prefix);
-<a name="line362">362: </a>  PetscObjectSetOptionsPrefix((PetscObject)mfn,prefix);
-<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
-<a name="line364">364: </a>}
-
-<a name="line368">368: </a><font color="#B22222">/*@C</font>
-<a name="line369">369: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line370">370: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options in the database.</font>
-
-<a name="line372">372: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
-
-<a name="line374">374: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line375">375: </a><font color="#B22222">+  mfn - the matrix function context</font>
-<a name="line376">376: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> option requests</font>
+<a name="line368">368: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line369">369: </a><font color="#B22222">+  mfn - the matrix function context</font>
+<a name="line370">370: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> option requests</font>
+
+<a name="line372">372: </a><font color="#B22222">   Notes:</font>
+<a name="line373">373: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line374">374: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line375">375: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line377">377: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
+<a name="line378">378: </a><font color="#B22222">   different <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> contexts, one could call</font>
+<a name="line379">379: </a><font color="#B22222">.vb</font>
+<a name="line380">380: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(mfn1,"fun1_")</font>
+<a name="line381">381: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(mfn2,"fun2_")</font>
+<a name="line382">382: </a><font color="#B22222">.ve</font>
 
-<a name="line378">378: </a><font color="#B22222">   Notes:</font>
-<a name="line379">379: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line380">380: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+<a name="line384">384: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line386">386: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>()</font>
+<a name="line387">387: </a><font color="#B22222">@*/</font>
+<a name="line388">388: </a><strong><font color="#4169E1"><a name="MFNSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char *prefix)</font></strong>
+<a name="line389">389: </a>{
+
+<a name="line394">394: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
+<a name="line395">395: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(mfn->V,prefix);
+<a name="line396">396: </a>  <font color="#4169E1">if</font> (!mfn->fn) { <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&mfn->fn); }
+<a name="line397">397: </a>  <a href="../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(mfn->fn,prefix);
+<a name="line398">398: </a>  PetscObjectSetOptionsPrefix((PetscObject)mfn,prefix);
+<a name="line399">399: </a>  <font color="#4169E1">return</font>(0);
+<a name="line400">400: </a>}
+
+<a name="line404">404: </a><font color="#B22222">/*@C</font>
+<a name="line405">405: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line406">406: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options in the database.</font>
+
+<a name="line408">408: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+
+<a name="line410">410: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line411">411: </a><font color="#B22222">+  mfn - the matrix function context</font>
+<a name="line412">412: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> option requests</font>
 
-<a name="line382">382: </a><font color="#B22222">   Level: advanced</font>
+<a name="line414">414: </a><font color="#B22222">   Notes:</font>
+<a name="line415">415: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line416">416: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
 
-<a name="line384">384: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>()</font>
-<a name="line385">385: </a><font color="#B22222">@*/</font>
-<a name="line386">386: </a><strong><font color="#4169E1"><a name="MFNAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char *prefix)</font></strong>
-<a name="line387">387: </a>{
+<a name="line418">418: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line392">392: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
-<a name="line393">393: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(mfn->V,prefix);
-<a name="line394">394: </a>  <font color="#4169E1">if</font> (!mfn->fn) { <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&mfn->fn); }
-<a name="line395">395: </a>  <a href="../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(mfn->fn,prefix);
-<a name="line396">396: </a>  PetscObjectAppendOptionsPrefix((PetscObject)mfn,prefix);
-<a name="line397">397: </a>  <font color="#4169E1">return</font>(0);
-<a name="line398">398: </a>}
+<a name="line420">420: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>()</font>
+<a name="line421">421: </a><font color="#B22222">@*/</font>
+<a name="line422">422: </a><strong><font color="#4169E1"><a name="MFNAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char *prefix)</font></strong>
+<a name="line423">423: </a>{
 
-<a name="line402">402: </a><font color="#B22222">/*@C</font>
-<a name="line403">403: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line404">404: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options in the database.</font>
+<a name="line428">428: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
+<a name="line429">429: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(mfn->V,prefix);
+<a name="line430">430: </a>  <font color="#4169E1">if</font> (!mfn->fn) { <a href="../../../docs/manualpages/MFN/MFNGetFN.html#MFNGetFN">MFNGetFN</a>(mfn,&mfn->fn); }
+<a name="line431">431: </a>  <a href="../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(mfn->fn,prefix);
+<a name="line432">432: </a>  PetscObjectAppendOptionsPrefix((PetscObject)mfn,prefix);
+<a name="line433">433: </a>  <font color="#4169E1">return</font>(0);
+<a name="line434">434: </a>}
 
-<a name="line406">406: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line408">408: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line409">409: </a><font color="#B22222">.  mfn - the matrix function context</font>
+<a name="line438">438: </a><font color="#B22222">/*@C</font>
+<a name="line439">439: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line440">440: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> options in the database.</font>
 
-<a name="line411">411: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line412">412: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+<a name="line442">442: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line444">444: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line445">445: </a><font color="#B22222">.  mfn - the matrix function context</font>
 
-<a name="line414">414: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line415">415: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+<a name="line447">447: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line448">448: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
 
-<a name="line417">417: </a><font color="#B22222">   Level: advanced</font>
+<a name="line450">450: </a><font color="#B22222">   Note:</font>
+<a name="line451">451: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line452">452: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
 
-<a name="line419">419: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>()</font>
-<a name="line420">420: </a><font color="#B22222">@*/</font>
-<a name="line421">421: </a><strong><font color="#4169E1"><a name="MFNGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char *prefix[])</font></strong>
-<a name="line422">422: </a>{
-
-<a name="line428">428: </a>  PetscObjectGetOptionsPrefix((PetscObject)mfn,prefix);
-<a name="line429">429: </a>  <font color="#4169E1">return</font>(0);
-<a name="line430">430: </a>}
+<a name="line454">454: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line456">456: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetOptionsPrefix.html#MFNSetOptionsPrefix">MFNSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/MFN/MFNAppendOptionsPrefix.html#MFNAppendOptionsPrefix">MFNAppendOptionsPrefix</a>()</font>
+<a name="line457">457: </a><font color="#B22222">@*/</font>
+<a name="line458">458: </a><strong><font color="#4169E1"><a name="MFNGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetOptionsPrefix.html#MFNGetOptionsPrefix">MFNGetOptionsPrefix</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,const char *prefix[])</font></strong>
+<a name="line459">459: </a>{
+
+<a name="line465">465: </a>  PetscObjectGetOptionsPrefix((PetscObject)mfn,prefix);
+<a name="line466">466: </a>  <font color="#4169E1">return</font>(0);
+<a name="line467">467: </a>}
 </pre>
 </body>
 
diff --git a/src/mfn/interface/mfnregis.c b/src/mfn/interface/mfnregis.c
index cb445f8..b32e29f 100644
--- a/src/mfn/interface/mfnregis.c
+++ b/src/mfn/interface/mfnregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -22,6 +22,7 @@
 #include <slepc/private/mfnimpl.h>  /*I "slepcmfn.h" I*/
 
 PETSC_EXTERN PetscErrorCode MFNCreate_Krylov(MFN);
+PETSC_EXTERN PetscErrorCode MFNCreate_Expokit(MFN);
 
 #undef __FUNCT__
 #define __FUNCT__ "MFNRegisterAll"
@@ -42,6 +43,7 @@ PetscErrorCode MFNRegisterAll(void)
   if (MFNRegisterAllCalled) PetscFunctionReturn(0);
   MFNRegisterAllCalled = PETSC_TRUE;
   ierr = MFNRegister(MFNKRYLOV,MFNCreate_Krylov);CHKERRQ(ierr);
+  ierr = MFNRegister(MFNEXPOKIT,MFNCreate_Expokit);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/mfn/interface/mfnregis.c.html b/src/mfn/interface/mfnregis.c.html
index 7f1c17c..6a1d27e 100644
--- a/src/mfn/interface/mfnregis.c.html
+++ b/src/mfn/interface/mfnregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/mfnregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:29+00:00">
+<meta name="date" content="2016-05-16T10:34:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/mfnregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/mfnregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -34,24 +34,26 @@
 <a name="line22"> 22: </a><font color="#A020F0">#include <slepc/private/mfnimpl.h>  </font><font color="#B22222">/*I "slepcmfn.h" I*/</font><font color="#A020F0"></font>
 
 <a name="line24"> 24: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode MFNCreate_Krylov(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
+<a name="line25"> 25: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode MFNCreate_Expokit(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a>)</font></strong>;
 
-<a name="line28"> 28: </a><font color="#B22222">/*@C</font>
-<a name="line29"> 29: </a><font color="#B22222">  <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a> - Registers all the matrix functions in the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> package.</font>
+<a name="line29"> 29: </a><font color="#B22222">/*@C</font>
+<a name="line30"> 30: </a><font color="#B22222">  <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a> - Registers all the matrix functions in the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> package.</font>
 
-<a name="line31"> 31: </a><font color="#B22222">  Not Collective</font>
+<a name="line32"> 32: </a><font color="#B22222">  Not Collective</font>
 
-<a name="line33"> 33: </a><font color="#B22222">  Level: advanced</font>
+<a name="line34"> 34: </a><font color="#B22222">  Level: advanced</font>
 
-<a name="line35"> 35: </a><font color="#B22222">.seealso:  <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>()</font>
-<a name="line36"> 36: </a><font color="#B22222">@*/</font>
-<a name="line37"> 37: </a><strong><font color="#4169E1"><a name="MFNRegisterAll"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a>(void)</font></strong>
-<a name="line38"> 38: </a>{
+<a name="line36"> 36: </a><font color="#B22222">.seealso:  <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>()</font>
+<a name="line37"> 37: </a><font color="#B22222">@*/</font>
+<a name="line38"> 38: </a><strong><font color="#4169E1"><a name="MFNRegisterAll"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNRegisterAll.html#MFNRegisterAll">MFNRegisterAll</a>(void)</font></strong>
+<a name="line39"> 39: </a>{
 
-<a name="line42"> 42: </a>  <font color="#4169E1">if</font> (MFNRegisterAllCalled) <font color="#4169E1">return</font>(0);
-<a name="line43"> 43: </a>  MFNRegisterAllCalled = PETSC_TRUE;
-<a name="line44"> 44: </a>  <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(MFNKRYLOV,MFNCreate_Krylov);
-<a name="line45"> 45: </a>  <font color="#4169E1">return</font>(0);
-<a name="line46"> 46: </a>}
+<a name="line43"> 43: </a>  <font color="#4169E1">if</font> (MFNRegisterAllCalled) <font color="#4169E1">return</font>(0);
+<a name="line44"> 44: </a>  MFNRegisterAllCalled = PETSC_TRUE;
+<a name="line45"> 45: </a>  <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(MFNKRYLOV,MFNCreate_Krylov);
+<a name="line46"> 46: </a>  <a href="../../../docs/manualpages/MFN/MFNRegister.html#MFNRegister">MFNRegister</a>(MFNEXPOKIT,MFNCreate_Expokit);
+<a name="line47"> 47: </a>  <font color="#4169E1">return</font>(0);
+<a name="line48"> 48: </a>}
 
 </pre>
 </body>
diff --git a/src/mfn/interface/mfnsetup.c b/src/mfn/interface/mfnsetup.c
index 1173ee6..73d9e84 100644
--- a/src/mfn/interface/mfnsetup.c
+++ b/src/mfn/interface/mfnsetup.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -65,9 +65,6 @@ PetscErrorCode MFNSetUp(MFN mfn)
   if (!((PetscObject)mfn->fn)->type_name) {
     ierr = FNSetFromOptions(mfn->fn);CHKERRQ(ierr);
   }
-  if (!((PetscObject)mfn->rand)->type_name) {
-    ierr = PetscRandomSetFromOptions(mfn->rand);CHKERRQ(ierr);
-  }
 
   /* Check problem dimensions */
   if (!mfn->A) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_WRONGSTATE,"MFNSetOperator must be called first");
diff --git a/src/mfn/interface/mfnsetup.c.html b/src/mfn/interface/mfnsetup.c.html
index 3647813..559070a 100644
--- a/src/mfn/interface/mfnsetup.c.html
+++ b/src/mfn/interface/mfnsetup.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/mfnsetup.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:30+00:00">
+<meta name="date" content="2016-05-16T10:34:37+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/mfnsetup.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/mfnsetup.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> routines related to problem setup.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -72,119 +72,116 @@
 <a name="line65"> 65: </a>  <font color="#4169E1">if</font> (!((PetscObject)mfn->fn)->type_name) {
 <a name="line66"> 66: </a>    <a href="../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(mfn->fn);
 <a name="line67"> 67: </a>  }
-<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!((PetscObject)mfn->rand)->type_name) {
-<a name="line69"> 69: </a>    PetscRandomSetFromOptions(mfn->rand);
-<a name="line70"> 70: </a>  }
 
-<a name="line72"> 72: </a>  <font color="#B22222">/* Check problem dimensions */</font>
-<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (!mfn->A) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a> must be called first"</font>);
-<a name="line74"> 74: </a>  MatGetSize(mfn->A,&N,NULL);
-<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (mfn->ncv > N) mfn->ncv = N;
-
-<a name="line77"> 77: </a>  <font color="#B22222">/* call specific solver setup */</font>
-<a name="line78"> 78: </a>  (*mfn->ops->setup)(mfn);
-
-<a name="line80"> 80: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
-<a name="line81"> 81: </a>  <font color="#4169E1">if</font> (mfn->tol==PETSC_DEFAULT) mfn->tol = SLEPC_DEFAULT_TOL;
-
-<a name="line83"> 83: </a>  PetscLogEventEnd(MFN_SetUp,mfn,0,0,0);
-<a name="line84"> 84: </a>  mfn->setupcalled = 1;
-<a name="line85"> 85: </a>  <font color="#4169E1">return</font>(0);
-<a name="line86"> 86: </a>}
-
-<a name="line90"> 90: </a><font color="#B22222">/*@</font>
-<a name="line91"> 91: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a> - Sets the matrix for which the matrix function is to be computed.</font>
-
-<a name="line93"> 93: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> and Mat</font>
-
-<a name="line95"> 95: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line96"> 96: </a><font color="#B22222">+  mfn - the matrix function context</font>
-<a name="line97"> 97: </a><font color="#B22222">-  A   - the problem matrix</font>
-
-<a name="line99"> 99: </a><font color="#B22222">   Notes:</font>
-<a name="line100">100: </a><font color="#B22222">   It must be called before <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(). If it is called again after <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>() then</font>
-<a name="line101">101: </a><font color="#B22222">   the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object is reset.</font>
-
-<a name="line103">103: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line105">105: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(), <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>()</font>
-<a name="line106">106: </a><font color="#B22222">@*/</font>
-<a name="line107">107: </a><strong><font color="#4169E1"><a name="MFNSetOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,Mat A)</font></strong>
-<a name="line108">108: </a>{
-<a name="line110">110: </a>  PetscInt       m,n;
-
-
-<a name="line117">117: </a>  MatGetSize(A,&m,&n);
-<a name="line118">118: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_WRONG,<font color="#666666">"A is a non-square matrix"</font>);
-<a name="line119">119: </a>  <font color="#4169E1">if</font> (mfn->setupcalled) { <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(mfn); }
-<a name="line120">120: </a>  PetscObjectReference((PetscObject)A);
-<a name="line121">121: </a>  MatDestroy(&mfn->A);
-<a name="line122">122: </a>  mfn->A = A;
-<a name="line123">123: </a>  <font color="#4169E1">return</font>(0);
-<a name="line124">124: </a>}
-
-<a name="line128">128: </a><font color="#B22222">/*@</font>
-<a name="line129">129: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</a> - Gets the matrix associated with the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
-
-<a name="line131">131: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> and Mat</font>
-
-<a name="line133">133: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line134">134: </a><font color="#B22222">.  mfn - the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> context</font>
-
-<a name="line136">136: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line137">137: </a><font color="#B22222">.  A  - the matrix for which the matrix function is to be computed</font>
-
-<a name="line139">139: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line141">141: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>()</font>
-<a name="line142">142: </a><font color="#B22222">@*/</font>
-<a name="line143">143: </a><strong><font color="#4169E1"><a name="MFNGetOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,Mat *A)</font></strong>
-<a name="line144">144: </a>{
-<a name="line148">148: </a>  *A = mfn->A;
-<a name="line149">149: </a>  <font color="#4169E1">return</font>(0);
-<a name="line150">150: </a>}
-
-<a name="line154">154: </a><font color="#B22222">/*@</font>
-<a name="line155">155: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a> - Allocate memory storage for common variables such</font>
-<a name="line156">156: </a><font color="#B22222">   as the basis vectors.</font>
-
-<a name="line158">158: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
-
-<a name="line160">160: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line161">161: </a><font color="#B22222">+  mfn   - eigensolver context</font>
-<a name="line162">162: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
-<a name="line163">163: </a><font color="#B22222">           working basis slightly larger than ncv</font>
-
-<a name="line165">165: </a><font color="#B22222">   Developers Note:</font>
-<a name="line166">166: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
-<a name="line167">167: </a><font color="#B22222">   implementations.</font>
-
-<a name="line169">169: </a><font color="#B22222">   Level: developer</font>
-<a name="line170">170: </a><font color="#B22222">@*/</font>
-<a name="line171">171: </a><strong><font color="#4169E1"><a name="MFNAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt extra)</font></strong>
-<a name="line172">172: </a>{
-<a name="line174">174: </a>  PetscInt       oldsize,requested;
-<a name="line175">175: </a>  Vec            t;
-
-<a name="line178">178: </a>  requested = mfn->ncv + extra;
-
-<a name="line180">180: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
-<a name="line181">181: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(mfn->V,NULL,NULL,&oldsize);
-
-<a name="line183">183: </a>  <font color="#B22222">/* allocate basis vectors */</font>
-<a name="line184">184: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
-<a name="line185">185: </a>  <font color="#4169E1">if</font> (!oldsize) {
-<a name="line186">186: </a>    <font color="#4169E1">if</font> (!((PetscObject)(mfn->V))->type_name) {
-<a name="line187">187: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(mfn->V,BVSVEC);
-<a name="line188">188: </a>    }
-<a name="line189">189: </a>    MatCreateVecs(mfn->A,&t,NULL);
-<a name="line190">190: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(mfn->V,t,requested);
-<a name="line191">191: </a>    VecDestroy(&t);
-<a name="line192">192: </a>  } <font color="#4169E1">else</font> {
-<a name="line193">193: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(mfn->V,requested,PETSC_FALSE);
-<a name="line194">194: </a>  }
-<a name="line195">195: </a>  <font color="#4169E1">return</font>(0);
-<a name="line196">196: </a>}
+<a name="line69"> 69: </a>  <font color="#B22222">/* Check problem dimensions */</font>
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (!mfn->A) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a> must be called first"</font>);
+<a name="line71"> 71: </a>  MatGetSize(mfn->A,&N,NULL);
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (mfn->ncv > N) mfn->ncv = N;
+
+<a name="line74"> 74: </a>  <font color="#B22222">/* call specific solver setup */</font>
+<a name="line75"> 75: </a>  (*mfn->ops->setup)(mfn);
+
+<a name="line77"> 77: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (mfn->tol==PETSC_DEFAULT) mfn->tol = SLEPC_DEFAULT_TOL;
+
+<a name="line80"> 80: </a>  PetscLogEventEnd(MFN_SetUp,mfn,0,0,0);
+<a name="line81"> 81: </a>  mfn->setupcalled = 1;
+<a name="line82"> 82: </a>  <font color="#4169E1">return</font>(0);
+<a name="line83"> 83: </a>}
+
+<a name="line87"> 87: </a><font color="#B22222">/*@</font>
+<a name="line88"> 88: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a> - Sets the matrix for which the matrix function is to be computed.</font>
+
+<a name="line90"> 90: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> and Mat</font>
+
+<a name="line92"> 92: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line93"> 93: </a><font color="#B22222">+  mfn - the matrix function context</font>
+<a name="line94"> 94: </a><font color="#B22222">-  A   - the problem matrix</font>
+
+<a name="line96"> 96: </a><font color="#B22222">   Notes:</font>
+<a name="line97"> 97: </a><font color="#B22222">   It must be called before <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(). If it is called again after <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>() then</font>
+<a name="line98"> 98: </a><font color="#B22222">   the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object is reset.</font>
+
+<a name="line100">100: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line102">102: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(), <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>()</font>
+<a name="line103">103: </a><font color="#B22222">@*/</font>
+<a name="line104">104: </a><strong><font color="#4169E1"><a name="MFNSetOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,Mat A)</font></strong>
+<a name="line105">105: </a>{
+<a name="line107">107: </a>  PetscInt       m,n;
+
+
+<a name="line114">114: </a>  MatGetSize(A,&m,&n);
+<a name="line115">115: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_ARG_WRONG,<font color="#666666">"A is a non-square matrix"</font>);
+<a name="line116">116: </a>  <font color="#4169E1">if</font> (mfn->setupcalled) { <a href="../../../docs/manualpages/MFN/MFNReset.html#MFNReset">MFNReset</a>(mfn); }
+<a name="line117">117: </a>  PetscObjectReference((PetscObject)A);
+<a name="line118">118: </a>  MatDestroy(&mfn->A);
+<a name="line119">119: </a>  mfn->A = A;
+<a name="line120">120: </a>  <font color="#4169E1">return</font>(0);
+<a name="line121">121: </a>}
+
+<a name="line125">125: </a><font color="#B22222">/*@</font>
+<a name="line126">126: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</a> - Gets the matrix associated with the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> object.</font>
+
+<a name="line128">128: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> and Mat</font>
+
+<a name="line130">130: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line131">131: </a><font color="#B22222">.  mfn - the <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> context</font>
+
+<a name="line133">133: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line134">134: </a><font color="#B22222">.  A  - the matrix for which the matrix function is to be computed</font>
+
+<a name="line136">136: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line138">138: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../../../docs/manualpages/MFN/MFNSetOperator.html#MFNSetOperator">MFNSetOperator</a>()</font>
+<a name="line139">139: </a><font color="#B22222">@*/</font>
+<a name="line140">140: </a><strong><font color="#4169E1"><a name="MFNGetOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetOperator.html#MFNGetOperator">MFNGetOperator</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,Mat *A)</font></strong>
+<a name="line141">141: </a>{
+<a name="line145">145: </a>  *A = mfn->A;
+<a name="line146">146: </a>  <font color="#4169E1">return</font>(0);
+<a name="line147">147: </a>}
+
+<a name="line151">151: </a><font color="#B22222">/*@</font>
+<a name="line152">152: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a> - Allocate memory storage for common variables such</font>
+<a name="line153">153: </a><font color="#B22222">   as the basis vectors.</font>
+
+<a name="line155">155: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+
+<a name="line157">157: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line158">158: </a><font color="#B22222">+  mfn   - eigensolver context</font>
+<a name="line159">159: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
+<a name="line160">160: </a><font color="#B22222">           working basis slightly larger than ncv</font>
+
+<a name="line162">162: </a><font color="#B22222">   Developers Note:</font>
+<a name="line163">163: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a></font>
+<a name="line164">164: </a><font color="#B22222">   implementations.</font>
+
+<a name="line166">166: </a><font color="#B22222">   Level: developer</font>
+<a name="line167">167: </a><font color="#B22222">@*/</font>
+<a name="line168">168: </a><strong><font color="#4169E1"><a name="MFNAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNAllocateSolution.html#MFNAllocateSolution">MFNAllocateSolution</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt extra)</font></strong>
+<a name="line169">169: </a>{
+<a name="line171">171: </a>  PetscInt       oldsize,requested;
+<a name="line172">172: </a>  Vec            t;
+
+<a name="line175">175: </a>  requested = mfn->ncv + extra;
+
+<a name="line177">177: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
+<a name="line178">178: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(mfn->V,NULL,NULL,&oldsize);
+
+<a name="line180">180: </a>  <font color="#B22222">/* allocate basis vectors */</font>
+<a name="line181">181: </a>  <font color="#4169E1">if</font> (!mfn->V) { <a href="../../../docs/manualpages/MFN/MFNGetBV.html#MFNGetBV">MFNGetBV</a>(mfn,&mfn->V); }
+<a name="line182">182: </a>  <font color="#4169E1">if</font> (!oldsize) {
+<a name="line183">183: </a>    <font color="#4169E1">if</font> (!((PetscObject)(mfn->V))->type_name) {
+<a name="line184">184: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(mfn->V,BVSVEC);
+<a name="line185">185: </a>    }
+<a name="line186">186: </a>    MatCreateVecs(mfn->A,&t,NULL);
+<a name="line187">187: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(mfn->V,t,requested);
+<a name="line188">188: </a>    VecDestroy(&t);
+<a name="line189">189: </a>  } <font color="#4169E1">else</font> {
+<a name="line190">190: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(mfn->V,requested,PETSC_FALSE);
+<a name="line191">191: </a>  }
+<a name="line192">192: </a>  <font color="#4169E1">return</font>(0);
+<a name="line193">193: </a>}
 
 </pre>
 </body>
diff --git a/src/mfn/interface/mfnsolve.c b/src/mfn/interface/mfnsolve.c
index cbd3107..d674afa 100644
--- a/src/mfn/interface/mfnsolve.c
+++ b/src/mfn/interface/mfnsolve.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -71,9 +71,12 @@ PetscErrorCode MFNSolve(MFN mfn,Vec b,Vec x)
   ierr = MFNSetUp(mfn);CHKERRQ(ierr);
   mfn->its = 0;
 
-  ierr = MFNMonitor(mfn,mfn->its,0);CHKERRQ(ierr);
   ierr = MFNViewFromOptions(mfn,NULL,"-mfn_view_pre");CHKERRQ(ierr);
 
+  /* check nonzero right-hand side */
+  ierr = VecNorm(b,NORM_2,&mfn->bnorm);CHKERRQ(ierr);
+  if (!mfn->bnorm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Cannot pass a zero b vector to MFNSolve()");
+
   /* call solver */
   ierr = PetscLogEventBegin(MFN_Solve,mfn,b,x,0);CHKERRQ(ierr);
   ierr = VecLockPush(b);CHKERRQ(ierr);
@@ -145,12 +148,19 @@ PetscErrorCode MFNGetIterationNumber(MFN mfn,PetscInt *its)
 
    Possible values for reason:
 +  MFN_CONVERGED_TOL - converged up to tolerance
-.  MFN_DIVERGED_ITS - required more than its to reach convergence
+.  MFN_CONVERGED_ITS - solver completed the requested number of steps
+.  MFN_DIVERGED_ITS - required more than max_it iterations to reach convergence
 -  MFN_DIVERGED_BREAKDOWN - generic breakdown in method
 
-   Note:
+   Notes:
    Can only be called after the call to MFNSolve() is complete.
 
+   Basic solvers (e.g. unrestarted Krylov iterations) cannot determine if the
+   computation is accurate up to the requested tolerance. In that case, the
+   converged reason is set to MFN_CONVERGED_ITS if the requested number of steps
+   (for instance, the ncv value in unrestarted Krylov methods) have been
+   completed successfully.
+
    Level: intermediate
 
 .seealso: MFNSetTolerances(), MFNSolve(), MFNConvergedReason, MFNSetErrorIfNotConverged()
diff --git a/src/mfn/interface/mfnsolve.c.html b/src/mfn/interface/mfnsolve.c.html
index 5b94540..b0998a9 100644
--- a/src/mfn/interface/mfnsolve.c.html
+++ b/src/mfn/interface/mfnsolve.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/interface/mfnsolve.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:30+00:00">
+<meta name="date" content="2016-05-16T10:34:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/interface/mfnsolve.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/interface/mfnsolve.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> routines related to the solution process.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -74,88 +74,98 @@
 <a name="line71"> 71: </a>  <a href="../../../docs/manualpages/MFN/MFNSetUp.html#MFNSetUp">MFNSetUp</a>(mfn);
 <a name="line72"> 72: </a>  mfn->its = 0;
 
-<a name="line74"> 74: </a>  MFNMonitor(mfn,mfn->its,0);
-<a name="line75"> 75: </a>  MFNViewFromOptions(mfn,NULL,<font color="#666666">"-mfn_view_pre"</font>);
-
-<a name="line77"> 77: </a>  <font color="#B22222">/* call solver */</font>
-<a name="line78"> 78: </a>  PetscLogEventBegin(MFN_Solve,mfn,b,x,0);
-<a name="line79"> 79: </a>  VecLockPush(b);
-<a name="line80"> 80: </a>  (*mfn->ops->solve)(mfn,b,x);
-<a name="line81"> 81: </a>  VecLockPop(b);
-<a name="line82"> 82: </a>  PetscLogEventEnd(MFN_Solve,mfn,b,x,0);
-
-<a name="line84"> 84: </a>  <font color="#4169E1">if</font> (!mfn->reason) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_PLIB,<font color="#666666">"Internal error, solver returned without setting converged reason"</font>);
-
-<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (mfn->errorifnotconverged && mfn->reason < 0) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a> has not converged"</font>);
-
-<a name="line88"> 88: </a>  <font color="#B22222">/* various viewers */</font>
-<a name="line89"> 89: </a>  MFNViewFromOptions(mfn,NULL,<font color="#666666">"-mfn_view"</font>);
-<a name="line90"> 90: </a>  <a href="../../../docs/manualpages/MFN/MFNReasonViewFromOptions.html#MFNReasonViewFromOptions">MFNReasonViewFromOptions</a>(mfn);
-<a name="line91"> 91: </a>  MatViewFromOptions(mfn->A,(PetscObject)mfn,<font color="#666666">"-mfn_view_mat"</font>);
-<a name="line92"> 92: </a>  VecViewFromOptions(b,(PetscObject)mfn,<font color="#666666">"-mfn_view_rhs"</font>);
-<a name="line93"> 93: </a>  VecViewFromOptions(x,(PetscObject)mfn,<font color="#666666">"-mfn_view_solution"</font>);
-<a name="line94"> 94: </a>  <font color="#4169E1">return</font>(0);
-<a name="line95"> 95: </a>}
-
-<a name="line99"> 99: </a><font color="#B22222">/*@</font>
-<a name="line100">100: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a> - Gets the current iteration number. If the</font>
-<a name="line101">101: </a><font color="#B22222">   call to <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() is complete, then it returns the number of iterations</font>
-<a name="line102">102: </a><font color="#B22222">   carried out by the solution method.</font>
-
-<a name="line104">104: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line106">106: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line107">107: </a><font color="#B22222">.  mfn - the matrix function context</font>
-
-<a name="line109">109: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line110">110: </a><font color="#B22222">.  its - number of iterations</font>
-
-<a name="line112">112: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line114">114: </a><font color="#B22222">   Note:</font>
-<a name="line115">115: </a><font color="#B22222">   During the i-th iteration this call returns i-1. If <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() is</font>
-<a name="line116">116: </a><font color="#B22222">   complete, then parameter "its" contains either the iteration number at</font>
-<a name="line117">117: </a><font color="#B22222">   which convergence was successfully reached, or failure was detected.</font>
-<a name="line118">118: </a><font color="#B22222">   Call <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>() to determine if the solver converged or</font>
-<a name="line119">119: </a><font color="#B22222">   failed and why.</font>
-
-<a name="line121">121: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(), <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>()</font>
-<a name="line122">122: </a><font color="#B22222">@*/</font>
-<a name="line123">123: </a><strong><font color="#4169E1"><a name="MFNGetIterationNumber"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt *its)</font></strong>
-<a name="line124">124: </a>{
-<a name="line128">128: </a>  *its = mfn->its;
-<a name="line129">129: </a>  <font color="#4169E1">return</font>(0);
-<a name="line130">130: </a>}
-
-<a name="line134">134: </a><font color="#B22222">/*@</font>
-<a name="line135">135: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a> - Gets the reason why the <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() iteration was</font>
-<a name="line136">136: </a><font color="#B22222">   stopped.</font>
-
-<a name="line138">138: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line140">140: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line141">141: </a><font color="#B22222">.  mfn - the matrix function context</font>
-
-<a name="line143">143: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line144">144: </a><font color="#B22222">.  reason - negative value indicates diverged, positive value converged</font>
-
-<a name="line146">146: </a><font color="#B22222">   Possible values for reason:</font>
-<a name="line147">147: </a><font color="#B22222">+  MFN_CONVERGED_TOL - converged up to tolerance</font>
-<a name="line148">148: </a><font color="#B22222">.  MFN_DIVERGED_ITS - required more than its to reach convergence</font>
-<a name="line149">149: </a><font color="#B22222">-  MFN_DIVERGED_BREAKDOWN - generic breakdown in method</font>
-
-<a name="line151">151: </a><font color="#B22222">   Note:</font>
-<a name="line152">152: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() is complete.</font>
-
-<a name="line154">154: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line156">156: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(), <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a>, <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>()</font>
-<a name="line157">157: </a><font color="#B22222">@*/</font>
-<a name="line158">158: </a><strong><font color="#4169E1"><a name="MFNGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> *reason)</font></strong>
-<a name="line159">159: </a>{
-<a name="line163">163: </a>  *reason = mfn->reason;
-<a name="line164">164: </a>  <font color="#4169E1">return</font>(0);
-<a name="line165">165: </a>}
+<a name="line74"> 74: </a>  MFNViewFromOptions(mfn,NULL,<font color="#666666">"-mfn_view_pre"</font>);
+
+<a name="line76"> 76: </a>  <font color="#B22222">/* check nonzero right-hand side */</font>
+<a name="line77"> 77: </a>  VecNorm(b,NORM_2,&mfn->bnorm);
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (!mfn->bnorm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Cannot pass a zero b vector to <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>()"</font>);
+
+<a name="line80"> 80: </a>  <font color="#B22222">/* call solver */</font>
+<a name="line81"> 81: </a>  PetscLogEventBegin(MFN_Solve,mfn,b,x,0);
+<a name="line82"> 82: </a>  VecLockPush(b);
+<a name="line83"> 83: </a>  (*mfn->ops->solve)(mfn,b,x);
+<a name="line84"> 84: </a>  VecLockPop(b);
+<a name="line85"> 85: </a>  PetscLogEventEnd(MFN_Solve,mfn,b,x,0);
+
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (!mfn->reason) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_PLIB,<font color="#666666">"Internal error, solver returned without setting converged reason"</font>);
+
+<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (mfn->errorifnotconverged && mfn->reason < 0) SETERRQ(PetscObjectComm((PetscObject)mfn),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"<a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a> has not converged"</font>);
+
+<a name="line91"> 91: </a>  <font color="#B22222">/* various viewers */</font>
+<a name="line92"> 92: </a>  MFNViewFromOptions(mfn,NULL,<font color="#666666">"-mfn_view"</font>);
+<a name="line93"> 93: </a>  <a href="../../../docs/manualpages/MFN/MFNReasonViewFromOptions.html#MFNReasonViewFromOptions">MFNReasonViewFromOptions</a>(mfn);
+<a name="line94"> 94: </a>  MatViewFromOptions(mfn->A,(PetscObject)mfn,<font color="#666666">"-mfn_view_mat"</font>);
+<a name="line95"> 95: </a>  VecViewFromOptions(b,(PetscObject)mfn,<font color="#666666">"-mfn_view_rhs"</font>);
+<a name="line96"> 96: </a>  VecViewFromOptions(x,(PetscObject)mfn,<font color="#666666">"-mfn_view_solution"</font>);
+<a name="line97"> 97: </a>  <font color="#4169E1">return</font>(0);
+<a name="line98"> 98: </a>}
+
+<a name="line102">102: </a><font color="#B22222">/*@</font>
+<a name="line103">103: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a> - Gets the current iteration number. If the</font>
+<a name="line104">104: </a><font color="#B22222">   call to <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() is complete, then it returns the number of iterations</font>
+<a name="line105">105: </a><font color="#B22222">   carried out by the solution method.</font>
+
+<a name="line107">107: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line109">109: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line110">110: </a><font color="#B22222">.  mfn - the matrix function context</font>
+
+<a name="line112">112: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line113">113: </a><font color="#B22222">.  its - number of iterations</font>
+
+<a name="line115">115: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line117">117: </a><font color="#B22222">   Note:</font>
+<a name="line118">118: </a><font color="#B22222">   During the i-th iteration this call returns i-1. If <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() is</font>
+<a name="line119">119: </a><font color="#B22222">   complete, then parameter "its" contains either the iteration number at</font>
+<a name="line120">120: </a><font color="#B22222">   which convergence was successfully reached, or failure was detected.</font>
+<a name="line121">121: </a><font color="#B22222">   Call <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>() to determine if the solver converged or</font>
+<a name="line122">122: </a><font color="#B22222">   failed and why.</font>
+
+<a name="line124">124: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(), <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>()</font>
+<a name="line125">125: </a><font color="#B22222">@*/</font>
+<a name="line126">126: </a><strong><font color="#4169E1"><a name="MFNGetIterationNumber"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetIterationNumber.html#MFNGetIterationNumber">MFNGetIterationNumber</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,PetscInt *its)</font></strong>
+<a name="line127">127: </a>{
+<a name="line131">131: </a>  *its = mfn->its;
+<a name="line132">132: </a>  <font color="#4169E1">return</font>(0);
+<a name="line133">133: </a>}
+
+<a name="line137">137: </a><font color="#B22222">/*@</font>
+<a name="line138">138: </a><font color="#B22222">   <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a> - Gets the reason why the <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() iteration was</font>
+<a name="line139">139: </a><font color="#B22222">   stopped.</font>
+
+<a name="line141">141: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line143">143: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line144">144: </a><font color="#B22222">.  mfn - the matrix function context</font>
+
+<a name="line146">146: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line147">147: </a><font color="#B22222">.  reason - negative value indicates diverged, positive value converged</font>
+
+<a name="line149">149: </a><font color="#B22222">   Possible values for reason:</font>
+<a name="line150">150: </a><font color="#B22222">+  MFN_CONVERGED_TOL - converged up to tolerance</font>
+<a name="line151">151: </a><font color="#B22222">.  MFN_CONVERGED_ITS - solver completed the requested number of steps</font>
+<a name="line152">152: </a><font color="#B22222">.  MFN_DIVERGED_ITS - required more than max_it iterations to reach convergence</font>
+<a name="line153">153: </a><font color="#B22222">-  MFN_DIVERGED_BREAKDOWN - generic breakdown in method</font>
+
+<a name="line155">155: </a><font color="#B22222">   Notes:</font>
+<a name="line156">156: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>() is complete.</font>
+
+<a name="line158">158: </a><font color="#B22222">   Basic solvers (e.g. unrestarted Krylov iterations) cannot determine if the</font>
+<a name="line159">159: </a><font color="#B22222">   computation is accurate up to the requested tolerance. In that case, the</font>
+<a name="line160">160: </a><font color="#B22222">   converged reason is set to MFN_CONVERGED_ITS if the requested number of steps</font>
+<a name="line161">161: </a><font color="#B22222">   (for instance, the ncv value in unrestarted Krylov methods) have been</font>
+<a name="line162">162: </a><font color="#B22222">   completed successfully.</font>
+
+<a name="line164">164: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line166">166: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/MFN/MFNSetTolerances.html#MFNSetTolerances">MFNSetTolerances</a>(), <a href="../../../docs/manualpages/MFN/MFNSolve.html#MFNSolve">MFNSolve</a>(), <a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a>, <a href="../../../docs/manualpages/MFN/MFNSetErrorIfNotConverged.html#MFNSetErrorIfNotConverged">MFNSetErrorIfNotConverged</a>()</font>
+<a name="line167">167: </a><font color="#B22222">@*/</font>
+<a name="line168">168: </a><strong><font color="#4169E1"><a name="MFNGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/MFN/MFNGetConvergedReason.html#MFNGetConvergedReason">MFNGetConvergedReason</a>(<a href="../../../docs/manualpages/MFN/MFN.html#MFN">MFN</a> mfn,<a href="../../../docs/manualpages/MFN/MFNConvergedReason.html#MFNConvergedReason">MFNConvergedReason</a> *reason)</font></strong>
+<a name="line169">169: </a>{
+<a name="line173">173: </a>  *reason = mfn->reason;
+<a name="line174">174: </a>  <font color="#4169E1">return</font>(0);
+<a name="line175">175: </a>}
 
 </pre>
 </body>
diff --git a/src/mfn/makefile b/src/mfn/makefile
index 5c0cf42..f7a8e7f 100644
--- a/src/mfn/makefile
+++ b/src/mfn/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/mfn/makefile.html b/src/mfn/makefile.html
index 7325448..8ad1d4b 100644
--- a/src/mfn/makefile.html
+++ b/src/mfn/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/mfn/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:27+00:00">
+<meta name="date" content="2016-05-16T10:34:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/mfn/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/mfn/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/examples/index.html b/src/nep/examples/index.html
index 04ef877..aa46e84 100644
--- a/src/nep/examples/index.html
+++ b/src/nep/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
 <a href="tutorials/">tutorials/</a><br>
diff --git a/src/nep/examples/makefile b/src/nep/examples/makefile
index 5c5a033..31b11fe 100644
--- a/src/nep/examples/makefile
+++ b/src/nep/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/examples/makefile.html b/src/nep/examples/makefile.html
index 02e096f..22c0869 100644
--- a/src/nep/examples/makefile.html
+++ b/src/nep/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:24+00:00">
+<meta name="date" content="2016-05-16T10:34:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/examples/nlevp/gun.c b/src/nep/examples/nlevp/gun.c
new file mode 100644
index 0000000..7210202
--- /dev/null
+++ b/src/nep/examples/nlevp/gun.c
@@ -0,0 +1,180 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+/*
+   This example implements one of the problems found at
+       NLEVP: A Collection of Nonlinear Eigenvalue Problems,
+       The University of Manchester.
+   The details of the collection can be found at:
+       [1] T. Betcke et al., "NLEVP: A Collection of Nonlinear Eigenvalue
+           Problems", ACM Trans. Math. Software 39(2), Article 7, 2013.
+
+   The gun problem arises from model of a radio-frequency gun cavity, with
+   the complex nonlinear function
+   T(lambda) = K-lambda*M+i*lambda^(1/2)*W1+i*(lambda-108.8774^2)^(1/2)*W2
+
+   Data files can be downloaded from http://slepc.upv.es/datafiles
+*/
+
+static char help[] = "Radio-frequency gun cavity.\n\n"
+  "The command line options are:\n"
+  "-K <filename1> -M <filename2> -W1 <filename3> -W2 <filename4>, where filename1,..,filename4 are files containing the matrices in PETSc binary form defining the GUN problem.\n\n";
+
+#include <slepcnep.h>
+
+#define NMAT 4
+#define SIGMA 108.8774
+
+PetscErrorCode ComputeSingularities(NEP,PetscInt*,PetscScalar*,void*);
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  PetscErrorCode ierr;
+  Mat            A[NMAT];         /* problem matrices */
+  FN             f[NMAT];         /* functions to define the nonlinear operator */
+  FN             ff[2];           /* auxiliary functions to define the nonlinear operator */
+  NEP            nep;             /* nonlinear eigensolver context */
+  PetscBool      terse,flg;
+  const char*    string[NMAT]={"-K","-M","-W1","-W2"};
+  char           filename[PETSC_MAX_PATH_LEN];
+  PetscScalar    numer[2],sigma;
+  PetscInt       i;
+  PetscViewer    viewer;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"GUN problem\n\n");CHKERRQ(ierr);
+#if !defined(PETSC_USE_COMPLEX)
+  SETERRQ(PETSC_COMM_SELF,1,"This example requires complex scalars!");
+#endif
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                       Load the problem matrices 
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  for (i=0;i<NMAT;i++) {
+    ierr = PetscOptionsGetString(NULL,NULL,string[i],filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+    if (!flg) SETERRQ1(PETSC_COMM_WORLD,1,"Must indicate a filename with the %s option",string[i]);
+    ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);CHKERRQ(ierr);
+    ierr = MatCreate(PETSC_COMM_WORLD,&A[i]);CHKERRQ(ierr);
+    ierr = MatSetFromOptions(A[i]);CHKERRQ(ierr);
+    ierr = MatLoad(A[i],viewer);CHKERRQ(ierr);
+    ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
+  }
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                       Create the problem functions
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /* f1=1 */
+  ierr = FNCreate(PETSC_COMM_WORLD,&f[0]);CHKERRQ(ierr);
+  ierr = FNSetType(f[0],FNRATIONAL);CHKERRQ(ierr);
+  numer[0] = 1.0;
+  ierr = FNRationalSetNumerator(f[0],1,numer);CHKERRQ(ierr);
+
+  /* f2=-lambda */
+  ierr = FNCreate(PETSC_COMM_WORLD,&f[1]);CHKERRQ(ierr);
+  ierr = FNSetType(f[1],FNRATIONAL);CHKERRQ(ierr);
+  numer[0] = -1.0; numer[1] = 0.0;
+  ierr = FNRationalSetNumerator(f[1],2,numer);CHKERRQ(ierr);
+
+  /* f3=i*sqrt(lambda) */
+  ierr = FNCreate(PETSC_COMM_WORLD,&f[2]);CHKERRQ(ierr);
+  ierr = FNSetType(f[2],FNSQRT);CHKERRQ(ierr);
+  ierr = FNSetScale(f[2],1.0,PETSC_i);CHKERRQ(ierr);
+
+  /* f4=i*sqrt(lambda-sigma^2) */
+  sigma = SIGMA*SIGMA;
+  ierr = FNCreate(PETSC_COMM_WORLD,&ff[0]);CHKERRQ(ierr);
+  ierr = FNSetType(ff[0],FNSQRT);CHKERRQ(ierr);
+  ierr = FNCreate(PETSC_COMM_WORLD,&ff[1]);CHKERRQ(ierr);
+  ierr = FNSetType(ff[1],FNRATIONAL);CHKERRQ(ierr);
+  numer[0] = 1.0; numer[1] = -sigma;
+  ierr = FNRationalSetNumerator(ff[1],2,numer);CHKERRQ(ierr);
+  ierr = FNCreate(PETSC_COMM_WORLD,&f[3]);CHKERRQ(ierr);
+  ierr = FNSetType(f[3],FNCOMBINE);CHKERRQ(ierr);
+  ierr = FNCombineSetChildren(f[3],FN_COMBINE_COMPOSE,ff[1],ff[0]);CHKERRQ(ierr);
+  ierr = FNSetScale(f[3],1.0,PETSC_i);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+                Create the eigensolver and solve the problem
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = NEPCreate(PETSC_COMM_WORLD,&nep);CHKERRQ(ierr);
+  ierr = NEPSetSplitOperator(nep,4,A,f,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
+  ierr = NEPSetFromOptions(nep);CHKERRQ(ierr);
+
+  ierr = PetscObjectTypeCompare((PetscObject)nep,NEPNLEIGS,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = NEPNLEIGSSetSingularitiesFunction(nep,ComputeSingularities,NULL);CHKERRQ(ierr);
+  }
+
+  ierr = NEPSolve(nep);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                    Display solution and clean up
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  
+  /* show detailed info unless -terse option is given by user */
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+  if (terse) {
+    ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);CHKERRQ(ierr);
+    ierr = NEPReasonView(nep,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+  }
+  ierr = NEPDestroy(&nep);CHKERRQ(ierr);
+  for (i=0;i<NMAT;i++) {
+    ierr = MatDestroy(&A[i]);CHKERRQ(ierr);
+    ierr = FNDestroy(&f[i]);CHKERRQ(ierr);
+  }
+  for (i=0;i<2;i++) {
+    ierr = FNDestroy(&ff[i]);CHKERRQ(ierr);
+  }
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ComputeSingularities"
+/*
+   ComputeSingularities - Computes maxnp points (at most) in the complex plane where
+   the function T(.) is not analytic.
+
+   In this case, we discretize the singularity region (-inf,108.8774^2)~(-10e+12,-10e-12+108.8774^2) 
+*/
+PetscErrorCode ComputeSingularities(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *pt)
+{
+  PetscReal h;
+  PetscInt  i;
+  PetscReal   sigma,end;
+
+  PetscFunctionBeginUser;
+  sigma = SIGMA*SIGMA;
+  end = PetscLogReal(sigma);  
+  h = (12.0+end)/(*maxnp-1);
+  xi[0] = sigma;
+  for (i=1;i<*maxnp;i++) xi[i] = -PetscPowReal(10,h*i)+sigma;
+  PetscFunctionReturn(0);
+}
diff --git a/src/nep/examples/nlevp/gun.c.html b/src/nep/examples/nlevp/gun.c.html
new file mode 100644
index 0000000..8f2621d
--- /dev/null
+++ b/src/nep/examples/nlevp/gun.c.html
@@ -0,0 +1,190 @@
+<center><a href="gun.c">Actual source code: gun.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/nlevp/gun.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:34+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/nlevp/gun.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+<a name="line21"> 21: </a><font color="#B22222">/*</font>
+<a name="line22"> 22: </a><font color="#B22222">   This example implements one of the problems found at</font>
+<a name="line23"> 23: </a><font color="#B22222">       NLEVP: A Collection of Nonlinear Eigenvalue Problems,</font>
+<a name="line24"> 24: </a><font color="#B22222">       The University of Manchester.</font>
+<a name="line25"> 25: </a><font color="#B22222">   The details of the collection can be found at:</font>
+<a name="line26"> 26: </a><font color="#B22222">       [1] T. Betcke et al., "NLEVP: A Collection of Nonlinear Eigenvalue</font>
+<a name="line27"> 27: </a><font color="#B22222">           Problems", ACM Trans. Math. Software 39(2), Article 7, 2013.</font>
+
+<a name="line29"> 29: </a><font color="#B22222">   The gun problem arises from model of a radio-frequency gun cavity, with</font>
+<a name="line30"> 30: </a><font color="#B22222">   the complex nonlinear function</font>
+<a name="line31"> 31: </a><font color="#B22222">   T(lambda) = K-lambda*M+i*lambda^(1/2)*W1+i*(lambda-108.8774^2)^(1/2)*W2</font>
+
+<a name="line33"> 33: </a><font color="#B22222">   Data files can be downloaded from http://slepc.upv.es/datafiles</font>
+<a name="line34"> 34: </a><font color="#B22222">*/</font>
+
+<a name="line36"> 36: </a>static char help[] = <font color="#666666">"Radio-frequency gun cavity.\n\n"</font>
+<a name="line37"> 37: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line38"> 38: </a>  <font color="#666666">"-K <filename1> -M <filename2> -W1 <filename3> -W2 <filename4>, where filename1,..,filename4 are files containing the matrices in PETSc binary form defining the GUN problem.\n\n"</font>;
+
+<a name="line40"> 40: </a><font color="#A020F0">#include <slepcnep.h></font>
+
+<a name="line42"> 42: </a><strong><font color="#228B22">#define NMAT 4</font></strong>
+<a name="line43"> 43: </a><strong><font color="#228B22">#define SIGMA 108.8774</font></strong>
+
+<a name="line45"> 45: </a><strong><font color="#4169E1">PetscErrorCode ComputeSingularities(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*)</font></strong>;
+
+<a name="line49"> 49: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line50"> 50: </a>{
+<a name="line52"> 52: </a>  Mat            A[NMAT];         <font color="#B22222">/* problem matrices */</font>
+<a name="line53"> 53: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>             f[NMAT];         <font color="#B22222">/* functions to define the nonlinear operator */</font>
+<a name="line54"> 54: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>             ff[2];           <font color="#B22222">/* auxiliary functions to define the nonlinear operator */</font>
+<a name="line55"> 55: </a>  <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>            nep;             <font color="#B22222">/* nonlinear eigensolver context */</font>
+<a name="line56"> 56: </a>  PetscBool      terse,flg;
+<a name="line57"> 57: </a>  const char*    string[NMAT]={<font color="#666666">"-K"</font>,<font color="#666666">"-M"</font>,<font color="#666666">"-W1"</font>,<font color="#666666">"-W2"</font>};
+<a name="line58"> 58: </a>  char           filename[PETSC_MAX_PATH_LEN];
+<a name="line59"> 59: </a>  PetscScalar    numer[2],sigma;
+<a name="line60"> 60: </a>  PetscInt       i;
+<a name="line61"> 61: </a>  PetscViewer    viewer;
+
+<a name="line63"> 63: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line65"> 65: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"GUN problem\n\n"</font>);
+<a name="line66"> 66: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line67"> 67: </a>  SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"This example requires complex scalars!"</font>);
+<a name="line68"> 68: </a><font color="#A020F0">#endif</font>
+
+<a name="line70"> 70: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line71"> 71: </a><font color="#B22222">                       Load the problem matrices </font>
+<a name="line72"> 72: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line74"> 74: </a>  <font color="#4169E1">for</font> (i=0;i<NMAT;i++) {
+<a name="line75"> 75: </a>    PetscOptionsGetString(NULL,NULL,string[i],filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line76"> 76: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ1(PETSC_COMM_WORLD,1,<font color="#666666">"Must indicate a filename with the %s option"</font>,string[i]);
+<a name="line77"> 77: </a>    PetscViewerBinaryOpen(PETSC_COMM_WORLD,filename,FILE_MODE_READ,&viewer);
+<a name="line78"> 78: </a>    MatCreate(PETSC_COMM_WORLD,&A[i]);
+<a name="line79"> 79: </a>    MatSetFromOptions(A[i]);
+<a name="line80"> 80: </a>    MatLoad(A[i],viewer);
+<a name="line81"> 81: </a>    PetscViewerDestroy(&viewer);
+<a name="line82"> 82: </a>  }
+
+<a name="line84"> 84: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line85"> 85: </a><font color="#B22222">                       Create the problem functions</font>
+<a name="line86"> 86: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line88"> 88: </a>  <font color="#B22222">/* f1=1 */</font>
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f[0]);
+<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f[0],FNRATIONAL);
+<a name="line91"> 91: </a>  numer[0] = 1.0;
+<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(f[0],1,numer);
+
+<a name="line94"> 94: </a>  <font color="#B22222">/* f2=-lambda */</font>
+<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f[1]);
+<a name="line96"> 96: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f[1],FNRATIONAL);
+<a name="line97"> 97: </a>  numer[0] = -1.0; numer[1] = 0.0;
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(f[1],2,numer);
+
+<a name="line100">100: </a>  <font color="#B22222">/* f3=i*sqrt(lambda) */</font>
+<a name="line101">101: </a>  <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f[2]);
+<a name="line102">102: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f[2],FNSQRT);
+<a name="line103">103: </a>  <a href="../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(f[2],1.0,PETSC_i);
+
+<a name="line105">105: </a>  <font color="#B22222">/* f4=i*sqrt(lambda-sigma^2) */</font>
+<a name="line106">106: </a>  sigma = SIGMA*SIGMA;
+<a name="line107">107: </a>  <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&ff[0]);
+<a name="line108">108: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(ff[0],FNSQRT);
+<a name="line109">109: </a>  <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&ff[1]);
+<a name="line110">110: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(ff[1],FNRATIONAL);
+<a name="line111">111: </a>  numer[0] = 1.0; numer[1] = -sigma;
+<a name="line112">112: </a>  <a href="../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(ff[1],2,numer);
+<a name="line113">113: </a>  <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f[3]);
+<a name="line114">114: </a>  <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f[3],FNCOMBINE);
+<a name="line115">115: </a>  <a href="../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(f[3],FN_COMBINE_COMPOSE,ff[1],ff[0]);
+<a name="line116">116: </a>  <a href="../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(f[3],1.0,PETSC_i);
+
+<a name="line118">118: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
+<a name="line119">119: </a><font color="#B22222">                Create the eigensolver and solve the problem</font>
+<a name="line120">120: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line122">122: </a>  <a href="../../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>(PETSC_COMM_WORLD,&nep);
+<a name="line123">123: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(nep,4,A,f,DIFFERENT_NONZERO_PATTERN);
+<a name="line124">124: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(nep);
+
+<a name="line126">126: </a>  PetscObjectTypeCompare((PetscObject)nep,NEPNLEIGS,&flg);
+<a name="line127">127: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line128">128: </a>    <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a>(nep,ComputeSingularities,NULL);
+<a name="line129">129: </a>  }
+
+<a name="line131">131: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
+
+<a name="line133">133: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line134">134: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line135">135: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line136">136: </a>  
+<a name="line137">137: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line138">138: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line139">139: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line140">140: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
+<a name="line141">141: </a>  } <font color="#4169E1">else</font> {
+<a name="line142">142: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line143">143: </a>    <a href="../../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line144">144: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line145">145: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
+<a name="line146">146: </a>  }
+<a name="line147">147: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
+<a name="line148">148: </a>  <font color="#4169E1">for</font> (i=0;i<NMAT;i++) {
+<a name="line149">149: </a>    MatDestroy(&A[i]);
+<a name="line150">150: </a>    <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f[i]);
+<a name="line151">151: </a>  }
+<a name="line152">152: </a>  <font color="#4169E1">for</font> (i=0;i<2;i++) {
+<a name="line153">153: </a>    <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ff[i]);
+<a name="line154">154: </a>  }
+<a name="line155">155: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line156">156: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line157">157: </a>}
+
+<a name="line161">161: </a><font color="#B22222">/*</font>
+<a name="line162">162: </a><font color="#B22222">   ComputeSingularities - Computes maxnp points (at most) in the complex plane where</font>
+<a name="line163">163: </a><font color="#B22222">   the function T(.) is not analytic.</font>
+
+<a name="line165">165: </a><font color="#B22222">   In this case, we discretize the singularity region (-inf,108.8774^2)~(-10e+12,-10e-12+108.8774^2) </font>
+<a name="line166">166: </a><font color="#B22222">*/</font>
+<a name="line167">167: </a><strong><font color="#4169E1"><a name="ComputeSingularities"></a>PetscErrorCode ComputeSingularities(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *maxnp,PetscScalar *xi,void *pt)</font></strong>
+<a name="line168">168: </a>{
+<a name="line169">169: </a>  PetscReal h;
+<a name="line170">170: </a>  PetscInt  i;
+<a name="line171">171: </a>  PetscReal   sigma,end;
+
+<a name="line174">174: </a>  sigma = SIGMA*SIGMA;
+<a name="line175">175: </a>  end = PetscLogReal(sigma);  
+<a name="line176">176: </a>  h = (12.0+end)/(*maxnp-1);
+<a name="line177">177: </a>  xi[0] = sigma;
+<a name="line178">178: </a>  <font color="#4169E1">for</font> (i=1;i<*maxnp;i++) xi[i] = -PetscPowReal(10,h*i)+sigma;
+<a name="line179">179: </a>  <font color="#4169E1">return</font>(0);
+<a name="line180">180: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/nep/examples/nlevp/index.html b/src/nep/examples/nlevp/index.html
index 7995184..ed4969f 100644
--- a/src/nep/examples/nlevp/index.html
+++ b/src/nep/examples/nlevp/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/nlevp/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/nlevp/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
@@ -19,6 +19,7 @@ Options can also be set directly in application codes by calling the correspondi
 </p>
 
 <p>
-<a href="loaded_string.c.html">loaded_string.c: NLEVP problem: loaded_string</a><br>
+<a href="loaded_string.c.html">loaded_string.c: Finite element model of a loaded vibrating string</a><br>
+<a href="gun.c.html">gun.c: Radio-frequency gun cavity</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/nep/examples/nlevp/loaded_string.c b/src/nep/examples/nlevp/loaded_string.c
index bc5234e..81add06 100644
--- a/src/nep/examples/nlevp/loaded_string.c
+++ b/src/nep/examples/nlevp/loaded_string.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,7 +30,7 @@
    finite element model of a loaded vibrating string.
 */
 
-static char help[] = "NLEVP problem: loaded_string.\n\n"
+static char help[] = "Finite element model of a loaded vibrating string.\n\n"
   "The command line options are:\n"
   "  -n <n>, dimension of the matrices.\n"
   "  -kappa <kappa>, stiffness of elastic spring.\n"
@@ -55,9 +55,9 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-kappa",&kappa,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-mass",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-kappa",&kappa,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-mass",&m,NULL);CHKERRQ(ierr);
   sigma = kappa/m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Loaded vibrating string, n=%D kappa=%g m=%g\n\n",n,(double)kappa,(double)m);CHKERRQ(ierr);
 
@@ -140,7 +140,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -154,6 +154,6 @@ int main(int argc,char **argv)
     ierr = MatDestroy(&A[i]);CHKERRQ(ierr);
     ierr = FNDestroy(&f[i]);CHKERRQ(ierr);
   }
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/nep/examples/nlevp/loaded_string.c.html b/src/nep/examples/nlevp/loaded_string.c.html
index 7d6434f..400d2cf 100644
--- a/src/nep/examples/nlevp/loaded_string.c.html
+++ b/src/nep/examples/nlevp/loaded_string.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/nlevp/loaded_string.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:26+00:00">
+<meta name="date" content="2016-05-16T10:34:34+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/nlevp/loaded_string.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/nlevp/loaded_string.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -42,7 +42,7 @@
 <a name="line30"> 30: </a><font color="#B22222">   finite element model of a loaded vibrating string.</font>
 <a name="line31"> 31: </a><font color="#B22222">*/</font>
 
-<a name="line33"> 33: </a>static char help[] = <font color="#666666">"NLEVP problem: loaded_string.\n\n"</font>
+<a name="line33"> 33: </a>static char help[] = <font color="#666666">"Finite element model of a loaded vibrating string.\n\n"</font>
 <a name="line34"> 34: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"  -n <n>, dimension of the matrices.\n"</font>
 <a name="line36"> 36: </a>  <font color="#666666">"  -kappa <kappa>, stiffness of elastic spring.\n"</font>
@@ -64,9 +64,9 @@
 
 <a name="line56"> 56: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line59"> 59: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-kappa"</font>,&kappa,NULL);
-<a name="line60"> 60: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-mass"</font>,&m,NULL);
+<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line59"> 59: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-kappa"</font>,&kappa,NULL);
+<a name="line60"> 60: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-mass"</font>,&m,NULL);
 <a name="line61"> 61: </a>  sigma = kappa/m;
 <a name="line62"> 62: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Loaded vibrating string, n=%D kappa=%g m=%g\n\n"</font>,n,(double)kappa,(double)m);
 
@@ -149,7 +149,7 @@
 <a name="line140">140: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line141">141: </a>  
 <a name="line142">142: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line143">143: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line143">143: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line144">144: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line145">145: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
 <a name="line146">146: </a>  } <font color="#4169E1">else</font> {
@@ -164,7 +164,7 @@
 <a name="line155">155: </a>    <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f[i]);
 <a name="line156">156: </a>  }
 <a name="line157">157: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line158">158: </a>  <font color="#4169E1">return</font> 0;
+<a name="line158">158: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line159">159: </a>}
 </pre>
 </body>
diff --git a/src/nep/examples/nlevp/makefile b/src/nep/examples/nlevp/makefile
index fc1bbab..e4ad0b1 100644
--- a/src/nep/examples/nlevp/makefile
+++ b/src/nep/examples/nlevp/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,12 +24,13 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/nep/examples/nlevp/
-EXAMPLESC  = loaded_string.c
+EXAMPLESC  = loaded_string.c gun.c
 EXAMPLESF  = 
 MANSEC     = NEP
-TESTS      = loaded_string
+TESTS      = loaded_string gun
 
 TESTEXAMPLES_C = loaded_string.PETSc runloaded_string loaded_string.rm
+TESTEXAMPLES_DATAFILESPATH_COMPLEX = gun.PETSc rungun gun.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -37,12 +38,20 @@ loaded_string: loaded_string.o chkopts
 	-${CLINKER} -o loaded_string loaded_string.o ${SLEPC_NEP_LIB}
 	${RM} loaded_string.o
 
-#------------------------------------------------------------------------------------
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
+gun: gun.o chkopts
+	-${CLINKER} -o gun gun.o ${SLEPC_NEP_LIB}
+	${RM} gun.o
 
+#------------------------------------------------------------------------------------
 runloaded_string:
-	-@${MPIEXEC} -np 1 ./loaded_string -nep_type rii -n 100 -terse > loaded_string_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./loaded_string -nep_type rii -n 100 -terse > loaded_string_1.tmp 2>&1; \
 	   if (${DIFF} output/loaded_string_1.out loaded_string_1.tmp) then true; \
 	   else echo "Possible problem with loaded_string_1, diffs above"; fi; \
 	   ${RM} -f loaded_string_1.tmp
 
+rungun:
+	-@${MPIEXEC} -n 1 ./gun -K $(DATAFILESPATH)/matrices/complex/gun_K.petsc -M $(DATAFILESPATH)/matrices/complex/gun_M.petsc -W1 $(DATAFILESPATH)/matrices/complex/gun_W1.petsc -W2 $(DATAFILESPATH)/matrices/complex/gun_W2.petsc -nep_type nleigs -rg_type interval -rg_interval_endpoints 12500,120500,-1,25000 -nep_target 65000 -nep_nev 4 -nep_tol 1e-12 -terse > gun_1.tmp 2>&1; \
+	   if (${DIFF} output/gun_1.out gun_1.tmp) then true; \
+	   else echo "Possible problem with gun_1, diffs above"; fi; \
+	   ${RM} -f gun_1.tmp;
+
diff --git a/src/nep/examples/nlevp/makefile.html b/src/nep/examples/nlevp/makefile.html
index e22a866..f6790ca 100644
--- a/src/nep/examples/nlevp/makefile.html
+++ b/src/nep/examples/nlevp/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/nlevp/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:27+00:00">
+<meta name="date" content="2016-05-16T10:34:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/nlevp/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/nlevp/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,12 +35,13 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/nep/examples/nlevp/
-EXAMPLESC  = loaded_string.c
+EXAMPLESC  = loaded_string.c gun.c
 EXAMPLESF  = 
 MANSEC     = <a href="ROOT/docs/manualpages/NEP/NEP.html#NEP">NEP</a>
-TESTS      = loaded_string
+TESTS      = loaded_string gun
 
 TESTEXAMPLES_C = loaded_string.PETSc runloaded_string loaded_string.rm
+TESTEXAMPLES_DATAFILESPATH_COMPLEX = gun.PETSc rungun gun.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -48,15 +49,23 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o loaded_string loaded_string.o ${SLEPC_NEP_LIB}
 	${RM} loaded_string.o
 
-<font color="#A020F0">#------------------------------------------------------------------------------------</font>
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
+<strong><font color="#FF0000">gun:</font></strong> gun.o chkopts
+	-${CLINKER} -o gun gun.o ${SLEPC_NEP_LIB}
+	${RM} gun.o
 
+<font color="#A020F0">#------------------------------------------------------------------------------------</font>
 <strong><font color="#FF0000">runloaded_string:</font></strong>
-	-@${MPIEXEC} -np 1 ./loaded_string -nep_type rii -n 100 -terse > loaded_string_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./loaded_string -nep_type rii -n 100 -terse > loaded_string_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/loaded_string_1.out loaded_string_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with loaded_string_1, diffs above"</font>; fi; \
 	   ${RM} -f loaded_string_1.tmp
 
+<strong><font color="#FF0000">rungun:</font></strong>
+	-@${MPIEXEC} -n 1 ./gun -K $(DATAFILESPATH)/matrices/complex/gun_K.petsc -M $(DATAFILESPATH)/matrices/complex/gun_M.petsc -W1 $(DATAFILESPATH)/matrices/complex/gun_W1.petsc -W2 $(DATAFILESPATH)/matrices/complex/gun_W2.petsc -nep_type nleigs -rg_type interval -rg_interval_endpoints 12500,120500,-1,25000 -nep_target 65000 -nep_nev 4 -nep_tol 1e-12 -terse > gun_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/gun_1.out gun_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with gun_1, diffs above"</font>; fi; \
+	   ${RM} -f gun_1.tmp;
+
 </pre>
 </body>
 
diff --git a/src/nep/examples/nlevp/output/gun_1.out b/src/nep/examples/nlevp/output/gun_1.out
new file mode 100644
index 0000000..bd06223
--- /dev/null
+++ b/src/nep/examples/nlevp/output/gun_1.out
@@ -0,0 +1,5 @@
+GUN problem
+
+ All requested eigenvalues computed up to the required tolerance:
+     54550.13915+459.51716i, 75402.85311+4948.34882i, 77240.79035+143.90139i, 80991.85642+32.38708i
+
diff --git a/src/nep/examples/nlevp/output/loaded_string_1.out b/src/nep/examples/nlevp/output/loaded_string_1.out
index 17c8cd4..591f9be 100644
--- a/src/nep/examples/nlevp/output/loaded_string_1.out
+++ b/src/nep/examples/nlevp/output/loaded_string_1.out
@@ -1,4 +1,4 @@
-Loaded vibrating string, n=100 kappa=1 m=1
+Loaded vibrating string, n=100 kappa=1. m=1.
 
  All requested eigenvalues computed up to the required tolerance:
      4.48218
diff --git a/src/nep/examples/tests/index.html b/src/nep/examples/tests/index.html
index 1693eb2..5ae8f61 100644
--- a/src/nep/examples/tests/index.html
+++ b/src/nep/examples/tests/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/examples/tests/makefile b/src/nep/examples/tests/makefile
index f5e246a..fdffe31 100644
--- a/src/nep/examples/tests/makefile
+++ b/src/nep/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/examples/tests/makefile.html b/src/nep/examples/tests/makefile.html
index ca72bdc..48fd951 100644
--- a/src/nep/examples/tests/makefile.html
+++ b/src/nep/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:24+00:00">
+<meta name="date" content="2016-05-16T10:34:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/examples/tutorials/ex20.c b/src/nep/examples/tutorials/ex20.c
index a323643..3aa678f 100644
--- a/src/nep/examples/tutorials/ex20.c
+++ b/src/nep/examples/tutorials/ex20.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -60,17 +60,17 @@ int main(int argc,char **argv)
   Mat            F,J;             /* Function and Jacobian matrices */
   ApplicationCtx ctx;             /* user-defined context */
   NEPType        type;
-  PetscInt       n=128,nev,i,its,maxit,maxf,nconv;
-  PetscReal      re,im,abstol,rtol,stol,norm,error;
+  PetscInt       n=128,nev,i,its,maxit,nconv;
+  PetscReal      re,im,tol,norm,error;
   PetscBool      draw_sol;
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Nonlinear Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
   ctx.h = 1.0/(PetscReal)n;
   ctx.kappa = 1.0;
-  ierr = PetscOptionsHasName(NULL,"-draw_sol",&draw_sol);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-draw_sol",&draw_sol);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Create nonlinear eigensolver context
@@ -116,9 +116,8 @@ int main(int argc,char **argv)
      Customize nonlinear solver; set runtime options
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  ierr = NEPSetTolerances(nep,PETSC_DEFAULT,1e-9,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
+  ierr = NEPSetTolerances(nep,1e-9,PETSC_DEFAULT);CHKERRQ(ierr);
   ierr = NEPSetDimensions(nep,1,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
-  ierr = NEPSetLagPreconditioner(nep,0);CHKERRQ(ierr);
 
   /*
      Set solver parameters at runtime
@@ -151,8 +150,8 @@ int main(int argc,char **argv)
   ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n",type);CHKERRQ(ierr);
   ierr = NEPGetDimensions(nep,&nev,NULL,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD," Number of requested eigenvalues: %D\n",nev);CHKERRQ(ierr);
-  ierr = NEPGetTolerances(nep,&abstol,&rtol,&stol,&maxit,&maxf);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD," Stopping condition: atol=%g, rtol=%g, stol=%g, maxit=%D, maxf=%D\n",(double)abstol,(double)rtol,(double)stol,maxit,maxf);CHKERRQ(ierr);
+  ierr = NEPGetTolerances(nep,&tol,&maxit);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Stopping condition: tol=%g, maxit=%D\n",(double)tol,maxit);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                     Display solution and clean up
@@ -191,7 +190,7 @@ int main(int argc,char **argv)
       im = 0.0;
 #endif
       if (im!=0.0) {
-        ierr = PetscPrintf(PETSC_COMM_WORLD," %9f%+9f j %12g     %12g\n",(double)re,(double)im,(double)norm,(double)error);CHKERRQ(ierr);
+        ierr = PetscPrintf(PETSC_COMM_WORLD," %9f%+9fi %12g     %12g\n",(double)re,(double)im,(double)norm,(double)error);CHKERRQ(ierr);
       } else {
         ierr = PetscPrintf(PETSC_COMM_WORLD,"   %12f         %12g     %12g\n",(double)re,(double)norm,(double)error);CHKERRQ(ierr);
       }
@@ -208,7 +207,7 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&J);CHKERRQ(ierr);
   ierr = VecDestroy(&x);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 /* ------------------------------------------------------------------- */
diff --git a/src/nep/examples/tutorials/ex20.c.html b/src/nep/examples/tutorials/ex20.c.html
index cfa60a7..b9dee99 100644
--- a/src/nep/examples/tutorials/ex20.c.html
+++ b/src/nep/examples/tutorials/ex20.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/tutorials/ex20.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:24+00:00">
+<meta name="date" content="2016-05-16T10:34:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tutorials/ex20.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tutorials/ex20.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -70,16 +70,16 @@
 <a name="line60"> 60: </a>  Mat            F,J;             <font color="#B22222">/* Function and Jacobian matrices */</font>
 <a name="line61"> 61: </a>  ApplicationCtx ctx;             <font color="#B22222">/* user-defined context */</font>
 <a name="line62"> 62: </a>  <a href="../../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>        type;
-<a name="line63"> 63: </a>  PetscInt       n=128,nev,i,its,maxit,maxf,nconv;
-<a name="line64"> 64: </a>  PetscReal      re,im,abstol,rtol,stol,norm,error;
+<a name="line63"> 63: </a>  PetscInt       n=128,nev,i,its,maxit,nconv;
+<a name="line64"> 64: </a>  PetscReal      re,im,tol,norm,error;
 <a name="line65"> 65: </a>  PetscBool      draw_sol;
 
 <a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line69"> 69: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line69"> 69: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line70"> 70: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Nonlinear Eigenproblem, n=%D\n\n"</font>,n);
 <a name="line71"> 71: </a>  ctx.h = 1.0/(PetscReal)n;
 <a name="line72"> 72: </a>  ctx.kappa = 1.0;
-<a name="line73"> 73: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-draw_sol"</font>,&draw_sol);
+<a name="line73"> 73: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-draw_sol"</font>,&draw_sol);
 
 <a name="line75"> 75: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line76"> 76: </a><font color="#B22222">     Create nonlinear eigensolver context</font>
@@ -125,313 +125,312 @@
 <a name="line116">116: </a><font color="#B22222">     Customize nonlinear solver; set runtime options</font>
 <a name="line117">117: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
-<a name="line119">119: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(nep,PETSC_DEFAULT,1e-9,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line119">119: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(nep,1e-9,PETSC_DEFAULT);
 <a name="line120">120: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(nep,1,PETSC_DEFAULT,PETSC_DEFAULT);
-<a name="line121">121: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>(nep,0);
-
-<a name="line123">123: </a>  <font color="#B22222">/*</font>
-<a name="line124">124: </a><font color="#B22222">     Set solver parameters at runtime</font>
-<a name="line125">125: </a><font color="#B22222">  */</font>
-<a name="line126">126: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(nep);
-
-<a name="line128">128: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line129">129: </a><font color="#B22222">                      Initialize application</font>
-<a name="line130">130: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line132">132: </a>  <font color="#B22222">/*</font>
-<a name="line133">133: </a><font color="#B22222">     Evaluate initial guess</font>
-<a name="line134">134: </a><font color="#B22222">  */</font>
-<a name="line135">135: </a>  MatCreateVecs(F,&x,NULL);
-<a name="line136">136: </a>  FormInitialGuess(x);
-<a name="line137">137: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a>(nep,1,&x);
-
-<a name="line139">139: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line140">140: </a><font color="#B22222">                      Solve the eigensystem</font>
-<a name="line141">141: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line143">143: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
-<a name="line144">144: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(nep,&its);
-<a name="line145">145: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> iterations = %D\n\n"</font>,its);
-
-<a name="line147">147: </a>  <font color="#B22222">/*</font>
-<a name="line148">148: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line149">149: </a><font color="#B22222">  */</font>
-<a name="line150">150: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
-<a name="line151">151: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
-<a name="line152">152: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
-<a name="line153">153: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-<a name="line154">154: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>(nep,&abstol,&rtol,&stol,&maxit,&maxf);
-<a name="line155">155: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: atol=%g, rtol=%g, stol=%g, maxit=%D, maxf=%D\n"</font>,(double)abstol,(double)rtol,(double)stol,maxit,maxf);
-
-<a name="line157">157: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line158">158: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line159">159: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line161">161: </a>  <font color="#B22222">/*</font>
-<a name="line162">162: </a><font color="#B22222">     Get number of converged approximate eigenpairs</font>
-<a name="line163">163: </a><font color="#B22222">  */</font>
-<a name="line164">164: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(nep,&nconv);
-<a name="line165">165: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of converged approximate eigenpairs: %D\n\n"</font>,nconv);
-
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (nconv>0) {
-<a name="line168">168: </a>    <font color="#B22222">/*</font>
-<a name="line169">169: </a><font color="#B22222">       Display eigenvalues and relative errors</font>
-<a name="line170">170: </a><font color="#B22222">    */</font>
-<a name="line171">171: </a>    PetscPrintf(PETSC_COMM_WORLD,
-<a name="line172">172: </a>         <font color="#666666">"           k              ||T(k)x||           error\n"</font>
-<a name="line173">173: </a>         <font color="#666666">"   ----------------- ------------------ ------------------\n"</font>);
-<a name="line174">174: </a>    <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
-<a name="line175">175: </a>      <font color="#B22222">/*</font>
-<a name="line176">176: </a><font color="#B22222">        Get converged eigenpairs (in this example they are always real)</font>
-<a name="line177">177: </a><font color="#B22222">      */</font>
-<a name="line178">178: </a>      <a href="../../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,i,&lambda,NULL,x,NULL);
-<a name="line179">179: </a>      FixSign(x);
-<a name="line180">180: </a>      <font color="#B22222">/*</font>
-<a name="line181">181: </a><font color="#B22222">         Compute residual norm and error</font>
-<a name="line182">182: </a><font color="#B22222">      */</font>
-<a name="line183">183: </a>      <a href="../../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,NEP_ERROR_RELATIVE,&norm);
-<a name="line184">184: </a>      CheckSolution(lambda,x,&error,&ctx);
-
-<a name="line186">186: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line187">187: </a>      re = PetscRealPart(lambda);
-<a name="line188">188: </a>      im = PetscImaginaryPart(lambda);
-<a name="line189">189: </a><font color="#A020F0">#else</font>
-<a name="line190">190: </a>      re = lambda;
-<a name="line191">191: </a>      im = 0.0;
-<a name="line192">192: </a><font color="#A020F0">#endif</font>
-<a name="line193">193: </a>      <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line194">194: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %9f%+9f j %12g     %12g\n"</font>,(double)re,(double)im,(double)norm,(double)error);
-<a name="line195">195: </a>      } <font color="#4169E1">else</font> {
-<a name="line196">196: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f         %12g     %12g\n"</font>,(double)re,(double)norm,(double)error);
-<a name="line197">197: </a>      }
-<a name="line198">198: </a>      <font color="#4169E1">if</font> (draw_sol) {
-<a name="line199">199: </a>        PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);
-<a name="line200">200: </a>        VecView(x,PETSC_VIEWER_DRAW_WORLD);
-<a name="line201">201: </a>      }
-<a name="line202">202: </a>    }
-<a name="line203">203: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
-<a name="line204">204: </a>  }
-
-<a name="line206">206: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
-<a name="line207">207: </a>  MatDestroy(&F);
-<a name="line208">208: </a>  MatDestroy(&J);
-<a name="line209">209: </a>  VecDestroy(&x);
-<a name="line210">210: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line211">211: </a>  <font color="#4169E1">return</font> 0;
-<a name="line212">212: </a>}
-
-<a name="line214">214: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line217">217: </a><font color="#B22222">/*</font>
-<a name="line218">218: </a><font color="#B22222">   FormInitialGuess - Computes initial guess.</font>
-
-<a name="line220">220: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line221">221: </a><font color="#B22222">.  x - the solution vector</font>
-<a name="line222">222: </a><font color="#B22222">*/</font>
-<a name="line223">223: </a><strong><font color="#4169E1"><a name="FormInitialGuess"></a>PetscErrorCode FormInitialGuess(Vec x)</font></strong>
-<a name="line224">224: </a>{
-
-<a name="line228">228: </a>  VecSet(x,1.0);
-<a name="line229">229: </a>  <font color="#4169E1">return</font>(0);
-<a name="line230">230: </a>}
-
-<a name="line232">232: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line235">235: </a><font color="#B22222">/*</font>
-<a name="line236">236: </a><font color="#B22222">   FormFunction - Computes Function matrix  T(lambda)</font>
-
-<a name="line238">238: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line239">239: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line240">240: </a><font color="#B22222">.  lambda - the scalar argument</font>
-<a name="line241">241: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
-
-<a name="line243">243: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line244">244: </a><font color="#B22222">.  fun - Function matrix</font>
-<a name="line245">245: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
-<a name="line246">246: </a><font color="#B22222">*/</font>
-<a name="line247">247: </a><strong><font color="#4169E1"><a name="FormFunction"></a>PetscErrorCode FormFunction(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)</font></strong>
-<a name="line248">248: </a>{
-<a name="line250">250: </a>  ApplicationCtx *user = (ApplicationCtx*)ctx;
-<a name="line251">251: </a>  PetscScalar    A[3],c,d;
-<a name="line252">252: </a>  PetscReal      h;
-<a name="line253">253: </a>  PetscInt       i,n,j[3],Istart,Iend;
-<a name="line254">254: </a>  PetscBool      FirstBlock=PETSC_FALSE,LastBlock=PETSC_FALSE;
-
-<a name="line257">257: </a>  <font color="#B22222">/*</font>
-<a name="line258">258: </a><font color="#B22222">     Compute Function entries and insert into matrix</font>
-<a name="line259">259: </a><font color="#B22222">  */</font>
-<a name="line260">260: </a>  MatGetSize(fun,&n,NULL);
-<a name="line261">261: </a>  MatGetOwnershipRange(fun,&Istart,&Iend);
-<a name="line262">262: </a>  <font color="#4169E1">if</font> (Istart==0) FirstBlock=PETSC_TRUE;
-<a name="line263">263: </a>  <font color="#4169E1">if</font> (Iend==n) LastBlock=PETSC_TRUE;
-<a name="line264">264: </a>  h = user->h;
-<a name="line265">265: </a>  c = user->kappa/(lambda-user->kappa);
-<a name="line266">266: </a>  d = n;
-
-<a name="line268">268: </a>  <font color="#B22222">/*</font>
-<a name="line269">269: </a><font color="#B22222">     Interior grid points</font>
-<a name="line270">270: </a><font color="#B22222">  */</font>
-<a name="line271">271: </a>  <font color="#4169E1">for</font> (i=(FirstBlock? Istart+1: Istart);i<(LastBlock? Iend-1: Iend);i++) {
-<a name="line272">272: </a>    j[0] = i-1; j[1] = i; j[2] = i+1;
-<a name="line273">273: </a>    A[0] = A[2] = -d-lambda*h/6.0; A[1] = 2.0*(d-lambda*h/3.0);
-<a name="line274">274: </a>    MatSetValues(fun,1,&i,3,j,A,INSERT_VALUES);
-<a name="line275">275: </a>  }
-
-<a name="line277">277: </a>  <font color="#B22222">/*</font>
-<a name="line278">278: </a><font color="#B22222">     Boundary points</font>
-<a name="line279">279: </a><font color="#B22222">  */</font>
-<a name="line280">280: </a>  <font color="#4169E1">if</font> (FirstBlock) {
-<a name="line281">281: </a>    i = 0;
-<a name="line282">282: </a>    j[0] = 0; j[1] = 1;
-<a name="line283">283: </a>    A[0] = 2.0*(d-lambda*h/3.0); A[1] = -d-lambda*h/6.0;
-<a name="line284">284: </a>    MatSetValues(fun,1,&i,2,j,A,INSERT_VALUES);
-<a name="line285">285: </a>  }
-
-<a name="line287">287: </a>  <font color="#4169E1">if</font> (LastBlock) {
-<a name="line288">288: </a>    i = n-1;
-<a name="line289">289: </a>    j[0] = n-2; j[1] = n-1;
-<a name="line290">290: </a>    A[0] = -d-lambda*h/6.0; A[1] = d-lambda*h/3.0+lambda*c;
-<a name="line291">291: </a>    MatSetValues(fun,1,&i,2,j,A,INSERT_VALUES);
-<a name="line292">292: </a>  }
-
-<a name="line294">294: </a>  <font color="#B22222">/*</font>
-<a name="line295">295: </a><font color="#B22222">     Assemble matrix</font>
-<a name="line296">296: </a><font color="#B22222">  */</font>
-<a name="line297">297: </a>  MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY);
-<a name="line298">298: </a>  MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY);
-<a name="line299">299: </a>  <font color="#4169E1">if</font> (fun != B) {
-<a name="line300">300: </a>    MatAssemblyBegin(fun,MAT_FINAL_ASSEMBLY);
-<a name="line301">301: </a>    MatAssemblyEnd(fun,MAT_FINAL_ASSEMBLY);
-<a name="line302">302: </a>  }
-<a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
-<a name="line304">304: </a>}
-
-<a name="line306">306: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line309">309: </a><font color="#B22222">/*</font>
-<a name="line310">310: </a><font color="#B22222">   FormJacobian - Computes Jacobian matrix  T'(lambda)</font>
-
-<a name="line312">312: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line313">313: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line314">314: </a><font color="#B22222">.  lambda - the scalar argument</font>
-<a name="line315">315: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
-
-<a name="line317">317: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line318">318: </a><font color="#B22222">.  jac - Jacobian matrix</font>
-<a name="line319">319: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
-<a name="line320">320: </a><font color="#B22222">*/</font>
-<a name="line321">321: </a><strong><font color="#4169E1"><a name="FormJacobian"></a>PetscErrorCode FormJacobian(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat jac,void *ctx)</font></strong>
-<a name="line322">322: </a>{
-<a name="line324">324: </a>  ApplicationCtx *user = (ApplicationCtx*)ctx;
-<a name="line325">325: </a>  PetscScalar    A[3],c;
-<a name="line326">326: </a>  PetscReal      h;
-<a name="line327">327: </a>  PetscInt       i,n,j[3],Istart,Iend;
-<a name="line328">328: </a>  PetscBool      FirstBlock=PETSC_FALSE,LastBlock=PETSC_FALSE;
-
-<a name="line331">331: </a>  <font color="#B22222">/*</font>
-<a name="line332">332: </a><font color="#B22222">     Compute Jacobian entries and insert into matrix</font>
-<a name="line333">333: </a><font color="#B22222">  */</font>
-<a name="line334">334: </a>  MatGetSize(jac,&n,NULL);
-<a name="line335">335: </a>  MatGetOwnershipRange(jac,&Istart,&Iend);
-<a name="line336">336: </a>  <font color="#4169E1">if</font> (Istart==0) FirstBlock=PETSC_TRUE;
-<a name="line337">337: </a>  <font color="#4169E1">if</font> (Iend==n) LastBlock=PETSC_TRUE;
-<a name="line338">338: </a>  h = user->h;
-<a name="line339">339: </a>  c = user->kappa/(lambda-user->kappa);
-
-<a name="line341">341: </a>  <font color="#B22222">/*</font>
-<a name="line342">342: </a><font color="#B22222">     Interior grid points</font>
-<a name="line343">343: </a><font color="#B22222">  */</font>
-<a name="line344">344: </a>  <font color="#4169E1">for</font> (i=(FirstBlock? Istart+1: Istart);i<(LastBlock? Iend-1: Iend);i++) {
-<a name="line345">345: </a>    j[0] = i-1; j[1] = i; j[2] = i+1;
-<a name="line346">346: </a>    A[0] = A[2] = -h/6.0; A[1] = -2.0*h/3.0;
-<a name="line347">347: </a>    MatSetValues(jac,1,&i,3,j,A,INSERT_VALUES);
-<a name="line348">348: </a>  }
-
-<a name="line350">350: </a>  <font color="#B22222">/*</font>
-<a name="line351">351: </a><font color="#B22222">     Boundary points</font>
-<a name="line352">352: </a><font color="#B22222">  */</font>
-<a name="line353">353: </a>  <font color="#4169E1">if</font> (FirstBlock) {
-<a name="line354">354: </a>    i = 0;
-<a name="line355">355: </a>    j[0] = 0; j[1] = 1;
-<a name="line356">356: </a>    A[0] = -2.0*h/3.0; A[1] = -h/6.0;
-<a name="line357">357: </a>    MatSetValues(jac,1,&i,2,j,A,INSERT_VALUES);
-<a name="line358">358: </a>  }
-
-<a name="line360">360: </a>  <font color="#4169E1">if</font> (LastBlock) {
-<a name="line361">361: </a>    i = n-1;
-<a name="line362">362: </a>    j[0] = n-2; j[1] = n-1;
-<a name="line363">363: </a>    A[0] = -h/6.0; A[1] = -h/3.0-c*c;
-<a name="line364">364: </a>    MatSetValues(jac,1,&i,2,j,A,INSERT_VALUES);
-<a name="line365">365: </a>  }
-
-<a name="line367">367: </a>  <font color="#B22222">/*</font>
-<a name="line368">368: </a><font color="#B22222">     Assemble matrix</font>
-<a name="line369">369: </a><font color="#B22222">  */</font>
-<a name="line370">370: </a>  MatAssemblyBegin(jac,MAT_FINAL_ASSEMBLY);
-<a name="line371">371: </a>  MatAssemblyEnd(jac,MAT_FINAL_ASSEMBLY);
-<a name="line372">372: </a>  <font color="#4169E1">return</font>(0);
-<a name="line373">373: </a>}
-
-<a name="line375">375: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line378">378: </a><font color="#B22222">/*</font>
-<a name="line379">379: </a><font color="#B22222">   CheckSolution - Given a computed solution (lambda,x) check if it</font>
-<a name="line380">380: </a><font color="#B22222">   satisfies the analytic solution.</font>
-
-<a name="line382">382: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line383">383: </a><font color="#B22222">+  lambda - the computed eigenvalue</font>
-<a name="line384">384: </a><font color="#B22222">-  y      - the computed eigenvector</font>
-
-<a name="line386">386: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line387">387: </a><font color="#B22222">.  error - norm of difference between the computed and exact eigenvector</font>
-<a name="line388">388: </a><font color="#B22222">*/</font>
-<a name="line389">389: </a><strong><font color="#4169E1"><a name="CheckSolution"></a>PetscErrorCode CheckSolution(PetscScalar lambda,Vec y,PetscReal *error,void *ctx)</font></strong>
-<a name="line390">390: </a>{
-<a name="line392">392: </a>  PetscScalar    nu,*uu;
-<a name="line393">393: </a>  PetscInt       i,n,Istart,Iend;
-<a name="line394">394: </a>  PetscReal      x;
-<a name="line395">395: </a>  Vec            u;
-<a name="line396">396: </a>  ApplicationCtx *user = (ApplicationCtx*)ctx;
-
-<a name="line399">399: </a>  nu = PetscSqrtScalar(lambda);
-<a name="line400">400: </a>  VecDuplicate(y,&u);
-<a name="line401">401: </a>  VecGetSize(u,&n);
-<a name="line402">402: </a>  VecGetOwnershipRange(y,&Istart,&Iend);
-<a name="line403">403: </a>  VecGetArray(u,&uu);
-<a name="line404">404: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
-<a name="line405">405: </a>    x = (i+1)*user->h;
-<a name="line406">406: </a>    uu[i-Istart] = PetscSinReal(nu*x);
-<a name="line407">407: </a>  }
-<a name="line408">408: </a>  VecRestoreArray(u,&uu);
-<a name="line409">409: </a>  VecNormalize(u,NULL);
-<a name="line410">410: </a>  VecAXPY(u,-1.0,y);
-<a name="line411">411: </a>  VecNorm(u,NORM_2,error);
-<a name="line412">412: </a>  VecDestroy(&u);
-<a name="line413">413: </a>  <font color="#4169E1">return</font>(0);
-<a name="line414">414: </a>}
-
-<a name="line416">416: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line419">419: </a><font color="#B22222">/*</font>
-<a name="line420">420: </a><font color="#B22222">   FixSign - Force the eigenfunction to be real and positive, since</font>
-<a name="line421">421: </a><font color="#B22222">   some eigensolvers may return the eigenvector multiplied by a</font>
-<a name="line422">422: </a><font color="#B22222">   complex number of modulus one.</font>
-
-<a name="line424">424: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line425">425: </a><font color="#B22222">.  x - the computed vector</font>
-<a name="line426">426: </a><font color="#B22222">*/</font>
-<a name="line427">427: </a><strong><font color="#4169E1"><a name="FixSign"></a>PetscErrorCode FixSign(Vec x)</font></strong>
-<a name="line428">428: </a>{
-<a name="line429">429: </a>  PetscErrorCode    ierr;
-<a name="line430">430: </a>  PetscMPIInt       rank;
-<a name="line431">431: </a>  PetscScalar       sign;
-<a name="line432">432: </a>  const PetscScalar *xx;
-
-<a name="line435">435: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,&rank);
-<a name="line436">436: </a>  <font color="#4169E1">if</font> (!rank) {
-<a name="line437">437: </a>    VecGetArrayRead(x,&xx);
-<a name="line438">438: </a>    sign = *xx/PetscAbsScalar(*xx);
-<a name="line439">439: </a>    VecRestoreArrayRead(x,&xx);
-<a name="line440">440: </a>  }
-<a name="line441">441: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sign,1,MPIU_SCALAR,0,PETSC_COMM_WORLD);
-<a name="line442">442: </a>  VecScale(x,1.0/sign);
-<a name="line443">443: </a>  <font color="#4169E1">return</font>(0);
-<a name="line444">444: </a>}
+
+<a name="line122">122: </a>  <font color="#B22222">/*</font>
+<a name="line123">123: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line124">124: </a><font color="#B22222">  */</font>
+<a name="line125">125: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(nep);
+
+<a name="line127">127: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line128">128: </a><font color="#B22222">                      Initialize application</font>
+<a name="line129">129: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line131">131: </a>  <font color="#B22222">/*</font>
+<a name="line132">132: </a><font color="#B22222">     Evaluate initial guess</font>
+<a name="line133">133: </a><font color="#B22222">  */</font>
+<a name="line134">134: </a>  MatCreateVecs(F,&x,NULL);
+<a name="line135">135: </a>  FormInitialGuess(x);
+<a name="line136">136: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a>(nep,1,&x);
+
+<a name="line138">138: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line139">139: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line140">140: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line142">142: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
+<a name="line143">143: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(nep,&its);
+<a name="line144">144: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> iterations = %D\n\n"</font>,its);
+
+<a name="line146">146: </a>  <font color="#B22222">/*</font>
+<a name="line147">147: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line148">148: </a><font color="#B22222">  */</font>
+<a name="line149">149: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
+<a name="line150">150: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
+<a name="line151">151: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
+<a name="line152">152: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+<a name="line153">153: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>(nep,&tol,&maxit);
+<a name="line154">154: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: tol=%g, maxit=%D\n"</font>,(double)tol,maxit);
+
+<a name="line156">156: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line157">157: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line158">158: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line160">160: </a>  <font color="#B22222">/*</font>
+<a name="line161">161: </a><font color="#B22222">     Get number of converged approximate eigenpairs</font>
+<a name="line162">162: </a><font color="#B22222">  */</font>
+<a name="line163">163: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(nep,&nconv);
+<a name="line164">164: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of converged approximate eigenpairs: %D\n\n"</font>,nconv);
+
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (nconv>0) {
+<a name="line167">167: </a>    <font color="#B22222">/*</font>
+<a name="line168">168: </a><font color="#B22222">       Display eigenvalues and relative errors</font>
+<a name="line169">169: </a><font color="#B22222">    */</font>
+<a name="line170">170: </a>    PetscPrintf(PETSC_COMM_WORLD,
+<a name="line171">171: </a>         <font color="#666666">"           k              ||T(k)x||           error\n"</font>
+<a name="line172">172: </a>         <font color="#666666">"   ----------------- ------------------ ------------------\n"</font>);
+<a name="line173">173: </a>    <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
+<a name="line174">174: </a>      <font color="#B22222">/*</font>
+<a name="line175">175: </a><font color="#B22222">        Get converged eigenpairs (in this example they are always real)</font>
+<a name="line176">176: </a><font color="#B22222">      */</font>
+<a name="line177">177: </a>      <a href="../../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,i,&lambda,NULL,x,NULL);
+<a name="line178">178: </a>      FixSign(x);
+<a name="line179">179: </a>      <font color="#B22222">/*</font>
+<a name="line180">180: </a><font color="#B22222">         Compute residual norm and error</font>
+<a name="line181">181: </a><font color="#B22222">      */</font>
+<a name="line182">182: </a>      <a href="../../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,NEP_ERROR_RELATIVE,&norm);
+<a name="line183">183: </a>      CheckSolution(lambda,x,&error,&ctx);
+
+<a name="line185">185: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line186">186: </a>      re = PetscRealPart(lambda);
+<a name="line187">187: </a>      im = PetscImaginaryPart(lambda);
+<a name="line188">188: </a><font color="#A020F0">#else</font>
+<a name="line189">189: </a>      re = lambda;
+<a name="line190">190: </a>      im = 0.0;
+<a name="line191">191: </a><font color="#A020F0">#endif</font>
+<a name="line192">192: </a>      <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line193">193: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %9f%+9fi %12g     %12g\n"</font>,(double)re,(double)im,(double)norm,(double)error);
+<a name="line194">194: </a>      } <font color="#4169E1">else</font> {
+<a name="line195">195: </a>        PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f         %12g     %12g\n"</font>,(double)re,(double)norm,(double)error);
+<a name="line196">196: </a>      }
+<a name="line197">197: </a>      <font color="#4169E1">if</font> (draw_sol) {
+<a name="line198">198: </a>        PetscViewerDrawSetPause(PETSC_VIEWER_DRAW_WORLD,-1);
+<a name="line199">199: </a>        VecView(x,PETSC_VIEWER_DRAW_WORLD);
+<a name="line200">200: </a>      }
+<a name="line201">201: </a>    }
+<a name="line202">202: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
+<a name="line203">203: </a>  }
+
+<a name="line205">205: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
+<a name="line206">206: </a>  MatDestroy(&F);
+<a name="line207">207: </a>  MatDestroy(&J);
+<a name="line208">208: </a>  VecDestroy(&x);
+<a name="line209">209: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line210">210: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line211">211: </a>}
+
+<a name="line213">213: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line216">216: </a><font color="#B22222">/*</font>
+<a name="line217">217: </a><font color="#B22222">   FormInitialGuess - Computes initial guess.</font>
+
+<a name="line219">219: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line220">220: </a><font color="#B22222">.  x - the solution vector</font>
+<a name="line221">221: </a><font color="#B22222">*/</font>
+<a name="line222">222: </a><strong><font color="#4169E1"><a name="FormInitialGuess"></a>PetscErrorCode FormInitialGuess(Vec x)</font></strong>
+<a name="line223">223: </a>{
+
+<a name="line227">227: </a>  VecSet(x,1.0);
+<a name="line228">228: </a>  <font color="#4169E1">return</font>(0);
+<a name="line229">229: </a>}
+
+<a name="line231">231: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line234">234: </a><font color="#B22222">/*</font>
+<a name="line235">235: </a><font color="#B22222">   FormFunction - Computes Function matrix  T(lambda)</font>
+
+<a name="line237">237: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line238">238: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line239">239: </a><font color="#B22222">.  lambda - the scalar argument</font>
+<a name="line240">240: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
+
+<a name="line242">242: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line243">243: </a><font color="#B22222">.  fun - Function matrix</font>
+<a name="line244">244: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
+<a name="line245">245: </a><font color="#B22222">*/</font>
+<a name="line246">246: </a><strong><font color="#4169E1"><a name="FormFunction"></a>PetscErrorCode FormFunction(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)</font></strong>
+<a name="line247">247: </a>{
+<a name="line249">249: </a>  ApplicationCtx *user = (ApplicationCtx*)ctx;
+<a name="line250">250: </a>  PetscScalar    A[3],c,d;
+<a name="line251">251: </a>  PetscReal      h;
+<a name="line252">252: </a>  PetscInt       i,n,j[3],Istart,Iend;
+<a name="line253">253: </a>  PetscBool      FirstBlock=PETSC_FALSE,LastBlock=PETSC_FALSE;
+
+<a name="line256">256: </a>  <font color="#B22222">/*</font>
+<a name="line257">257: </a><font color="#B22222">     Compute Function entries and insert into matrix</font>
+<a name="line258">258: </a><font color="#B22222">  */</font>
+<a name="line259">259: </a>  MatGetSize(fun,&n,NULL);
+<a name="line260">260: </a>  MatGetOwnershipRange(fun,&Istart,&Iend);
+<a name="line261">261: </a>  <font color="#4169E1">if</font> (Istart==0) FirstBlock=PETSC_TRUE;
+<a name="line262">262: </a>  <font color="#4169E1">if</font> (Iend==n) LastBlock=PETSC_TRUE;
+<a name="line263">263: </a>  h = user->h;
+<a name="line264">264: </a>  c = user->kappa/(lambda-user->kappa);
+<a name="line265">265: </a>  d = n;
+
+<a name="line267">267: </a>  <font color="#B22222">/*</font>
+<a name="line268">268: </a><font color="#B22222">     Interior grid points</font>
+<a name="line269">269: </a><font color="#B22222">  */</font>
+<a name="line270">270: </a>  <font color="#4169E1">for</font> (i=(FirstBlock? Istart+1: Istart);i<(LastBlock? Iend-1: Iend);i++) {
+<a name="line271">271: </a>    j[0] = i-1; j[1] = i; j[2] = i+1;
+<a name="line272">272: </a>    A[0] = A[2] = -d-lambda*h/6.0; A[1] = 2.0*(d-lambda*h/3.0);
+<a name="line273">273: </a>    MatSetValues(fun,1,&i,3,j,A,INSERT_VALUES);
+<a name="line274">274: </a>  }
+
+<a name="line276">276: </a>  <font color="#B22222">/*</font>
+<a name="line277">277: </a><font color="#B22222">     Boundary points</font>
+<a name="line278">278: </a><font color="#B22222">  */</font>
+<a name="line279">279: </a>  <font color="#4169E1">if</font> (FirstBlock) {
+<a name="line280">280: </a>    i = 0;
+<a name="line281">281: </a>    j[0] = 0; j[1] = 1;
+<a name="line282">282: </a>    A[0] = 2.0*(d-lambda*h/3.0); A[1] = -d-lambda*h/6.0;
+<a name="line283">283: </a>    MatSetValues(fun,1,&i,2,j,A,INSERT_VALUES);
+<a name="line284">284: </a>  }
+
+<a name="line286">286: </a>  <font color="#4169E1">if</font> (LastBlock) {
+<a name="line287">287: </a>    i = n-1;
+<a name="line288">288: </a>    j[0] = n-2; j[1] = n-1;
+<a name="line289">289: </a>    A[0] = -d-lambda*h/6.0; A[1] = d-lambda*h/3.0+lambda*c;
+<a name="line290">290: </a>    MatSetValues(fun,1,&i,2,j,A,INSERT_VALUES);
+<a name="line291">291: </a>  }
+
+<a name="line293">293: </a>  <font color="#B22222">/*</font>
+<a name="line294">294: </a><font color="#B22222">     Assemble matrix</font>
+<a name="line295">295: </a><font color="#B22222">  */</font>
+<a name="line296">296: </a>  MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY);
+<a name="line297">297: </a>  MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY);
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (fun != B) {
+<a name="line299">299: </a>    MatAssemblyBegin(fun,MAT_FINAL_ASSEMBLY);
+<a name="line300">300: </a>    MatAssemblyEnd(fun,MAT_FINAL_ASSEMBLY);
+<a name="line301">301: </a>  }
+<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
+<a name="line303">303: </a>}
+
+<a name="line305">305: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line308">308: </a><font color="#B22222">/*</font>
+<a name="line309">309: </a><font color="#B22222">   FormJacobian - Computes Jacobian matrix  T'(lambda)</font>
+
+<a name="line311">311: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line312">312: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line313">313: </a><font color="#B22222">.  lambda - the scalar argument</font>
+<a name="line314">314: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
+
+<a name="line316">316: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line317">317: </a><font color="#B22222">.  jac - Jacobian matrix</font>
+<a name="line318">318: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
+<a name="line319">319: </a><font color="#B22222">*/</font>
+<a name="line320">320: </a><strong><font color="#4169E1"><a name="FormJacobian"></a>PetscErrorCode FormJacobian(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat jac,void *ctx)</font></strong>
+<a name="line321">321: </a>{
+<a name="line323">323: </a>  ApplicationCtx *user = (ApplicationCtx*)ctx;
+<a name="line324">324: </a>  PetscScalar    A[3],c;
+<a name="line325">325: </a>  PetscReal      h;
+<a name="line326">326: </a>  PetscInt       i,n,j[3],Istart,Iend;
+<a name="line327">327: </a>  PetscBool      FirstBlock=PETSC_FALSE,LastBlock=PETSC_FALSE;
+
+<a name="line330">330: </a>  <font color="#B22222">/*</font>
+<a name="line331">331: </a><font color="#B22222">     Compute Jacobian entries and insert into matrix</font>
+<a name="line332">332: </a><font color="#B22222">  */</font>
+<a name="line333">333: </a>  MatGetSize(jac,&n,NULL);
+<a name="line334">334: </a>  MatGetOwnershipRange(jac,&Istart,&Iend);
+<a name="line335">335: </a>  <font color="#4169E1">if</font> (Istart==0) FirstBlock=PETSC_TRUE;
+<a name="line336">336: </a>  <font color="#4169E1">if</font> (Iend==n) LastBlock=PETSC_TRUE;
+<a name="line337">337: </a>  h = user->h;
+<a name="line338">338: </a>  c = user->kappa/(lambda-user->kappa);
+
+<a name="line340">340: </a>  <font color="#B22222">/*</font>
+<a name="line341">341: </a><font color="#B22222">     Interior grid points</font>
+<a name="line342">342: </a><font color="#B22222">  */</font>
+<a name="line343">343: </a>  <font color="#4169E1">for</font> (i=(FirstBlock? Istart+1: Istart);i<(LastBlock? Iend-1: Iend);i++) {
+<a name="line344">344: </a>    j[0] = i-1; j[1] = i; j[2] = i+1;
+<a name="line345">345: </a>    A[0] = A[2] = -h/6.0; A[1] = -2.0*h/3.0;
+<a name="line346">346: </a>    MatSetValues(jac,1,&i,3,j,A,INSERT_VALUES);
+<a name="line347">347: </a>  }
+
+<a name="line349">349: </a>  <font color="#B22222">/*</font>
+<a name="line350">350: </a><font color="#B22222">     Boundary points</font>
+<a name="line351">351: </a><font color="#B22222">  */</font>
+<a name="line352">352: </a>  <font color="#4169E1">if</font> (FirstBlock) {
+<a name="line353">353: </a>    i = 0;
+<a name="line354">354: </a>    j[0] = 0; j[1] = 1;
+<a name="line355">355: </a>    A[0] = -2.0*h/3.0; A[1] = -h/6.0;
+<a name="line356">356: </a>    MatSetValues(jac,1,&i,2,j,A,INSERT_VALUES);
+<a name="line357">357: </a>  }
+
+<a name="line359">359: </a>  <font color="#4169E1">if</font> (LastBlock) {
+<a name="line360">360: </a>    i = n-1;
+<a name="line361">361: </a>    j[0] = n-2; j[1] = n-1;
+<a name="line362">362: </a>    A[0] = -h/6.0; A[1] = -h/3.0-c*c;
+<a name="line363">363: </a>    MatSetValues(jac,1,&i,2,j,A,INSERT_VALUES);
+<a name="line364">364: </a>  }
+
+<a name="line366">366: </a>  <font color="#B22222">/*</font>
+<a name="line367">367: </a><font color="#B22222">     Assemble matrix</font>
+<a name="line368">368: </a><font color="#B22222">  */</font>
+<a name="line369">369: </a>  MatAssemblyBegin(jac,MAT_FINAL_ASSEMBLY);
+<a name="line370">370: </a>  MatAssemblyEnd(jac,MAT_FINAL_ASSEMBLY);
+<a name="line371">371: </a>  <font color="#4169E1">return</font>(0);
+<a name="line372">372: </a>}
+
+<a name="line374">374: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line377">377: </a><font color="#B22222">/*</font>
+<a name="line378">378: </a><font color="#B22222">   CheckSolution - Given a computed solution (lambda,x) check if it</font>
+<a name="line379">379: </a><font color="#B22222">   satisfies the analytic solution.</font>
+
+<a name="line381">381: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line382">382: </a><font color="#B22222">+  lambda - the computed eigenvalue</font>
+<a name="line383">383: </a><font color="#B22222">-  y      - the computed eigenvector</font>
+
+<a name="line385">385: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line386">386: </a><font color="#B22222">.  error - norm of difference between the computed and exact eigenvector</font>
+<a name="line387">387: </a><font color="#B22222">*/</font>
+<a name="line388">388: </a><strong><font color="#4169E1"><a name="CheckSolution"></a>PetscErrorCode CheckSolution(PetscScalar lambda,Vec y,PetscReal *error,void *ctx)</font></strong>
+<a name="line389">389: </a>{
+<a name="line391">391: </a>  PetscScalar    nu,*uu;
+<a name="line392">392: </a>  PetscInt       i,n,Istart,Iend;
+<a name="line393">393: </a>  PetscReal      x;
+<a name="line394">394: </a>  Vec            u;
+<a name="line395">395: </a>  ApplicationCtx *user = (ApplicationCtx*)ctx;
+
+<a name="line398">398: </a>  nu = PetscSqrtScalar(lambda);
+<a name="line399">399: </a>  VecDuplicate(y,&u);
+<a name="line400">400: </a>  VecGetSize(u,&n);
+<a name="line401">401: </a>  VecGetOwnershipRange(y,&Istart,&Iend);
+<a name="line402">402: </a>  VecGetArray(u,&uu);
+<a name="line403">403: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line404">404: </a>    x = (i+1)*user->h;
+<a name="line405">405: </a>    uu[i-Istart] = PetscSinReal(nu*x);
+<a name="line406">406: </a>  }
+<a name="line407">407: </a>  VecRestoreArray(u,&uu);
+<a name="line408">408: </a>  VecNormalize(u,NULL);
+<a name="line409">409: </a>  VecAXPY(u,-1.0,y);
+<a name="line410">410: </a>  VecNorm(u,NORM_2,error);
+<a name="line411">411: </a>  VecDestroy(&u);
+<a name="line412">412: </a>  <font color="#4169E1">return</font>(0);
+<a name="line413">413: </a>}
+
+<a name="line415">415: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line418">418: </a><font color="#B22222">/*</font>
+<a name="line419">419: </a><font color="#B22222">   FixSign - Force the eigenfunction to be real and positive, since</font>
+<a name="line420">420: </a><font color="#B22222">   some eigensolvers may return the eigenvector multiplied by a</font>
+<a name="line421">421: </a><font color="#B22222">   complex number of modulus one.</font>
+
+<a name="line423">423: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line424">424: </a><font color="#B22222">.  x - the computed vector</font>
+<a name="line425">425: </a><font color="#B22222">*/</font>
+<a name="line426">426: </a><strong><font color="#4169E1"><a name="FixSign"></a>PetscErrorCode FixSign(Vec x)</font></strong>
+<a name="line427">427: </a>{
+<a name="line428">428: </a>  PetscErrorCode    ierr;
+<a name="line429">429: </a>  PetscMPIInt       rank;
+<a name="line430">430: </a>  PetscScalar       sign;
+<a name="line431">431: </a>  const PetscScalar *xx;
+
+<a name="line434">434: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,&rank);
+<a name="line435">435: </a>  <font color="#4169E1">if</font> (!rank) {
+<a name="line436">436: </a>    VecGetArrayRead(x,&xx);
+<a name="line437">437: </a>    sign = *xx/PetscAbsScalar(*xx);
+<a name="line438">438: </a>    VecRestoreArrayRead(x,&xx);
+<a name="line439">439: </a>  }
+<a name="line440">440: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&sign,1,MPIU_SCALAR,0,PETSC_COMM_WORLD);
+<a name="line441">441: </a>  VecScale(x,1.0/sign);
+<a name="line442">442: </a>  <font color="#4169E1">return</font>(0);
+<a name="line443">443: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/examples/tutorials/ex21.c b/src/nep/examples/tutorials/ex21.c
index 030c5fd..50bc8f4 100644
--- a/src/nep/examples/tutorials/ex21.c
+++ b/src/nep/examples/tutorials/ex21.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -71,7 +71,7 @@ int main(int argc,char **argv)
   ApplicationCtx ctx;             /* user-defined context */
   MatCtx         *ctxF,*ctxJ;     /* contexts for shell matrices */
   NEPType        type;
-  PetscInt       n=128,nev,its;
+  PetscInt       n=128,nev;
   KSP            ksp;
   PC             pc;
   PetscMPIInt    size;
@@ -81,7 +81,7 @@ int main(int argc,char **argv)
   SlepcInitialize(&argc,&argv,(char*)0,help);
   ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr);
   if (size != 1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"This is a uniprocessor example only!");
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Nonlinear Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
   ctx.h = 1.0/(PetscReal)n;
   ctx.kappa = 1.0;
@@ -134,7 +134,9 @@ int main(int argc,char **argv)
      Customize nonlinear solver; set runtime options
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  ierr = NEPGetKSP(nep,&ksp);CHKERRQ(ierr);
+  ierr = NEPSetType(nep,NEPRII);CHKERRQ(ierr);
+  ierr = NEPRIISetLagPreconditioner(nep,0);CHKERRQ(ierr);
+  ierr = NEPRIIGetKSP(nep,&ksp);CHKERRQ(ierr);
   ierr = KSPSetType(ksp,KSPBCGS);CHKERRQ(ierr);
   ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
   ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr);
@@ -149,12 +151,6 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = NEPSolve(nep);CHKERRQ(ierr);
-  ierr = NEPGetIterationNumber(nep,&its);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of NEP iterations = %D\n\n",its);CHKERRQ(ierr);
-
-  /*
-     Optional: Get some information from the solver and display it
-  */
   ierr = NEPGetType(nep,&type);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n",type);CHKERRQ(ierr);
   ierr = NEPGetDimensions(nep,&nev,NULL,NULL);CHKERRQ(ierr);
@@ -165,7 +161,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -178,7 +174,7 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&F);CHKERRQ(ierr);
   ierr = MatDestroy(&J);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 /* ------------------------------------------------------------------- */
diff --git a/src/nep/examples/tutorials/ex21.c.html b/src/nep/examples/tutorials/ex21.c.html
index 9788ce1..8066a02 100644
--- a/src/nep/examples/tutorials/ex21.c.html
+++ b/src/nep/examples/tutorials/ex21.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/tutorials/ex21.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:25+00:00">
+<meta name="date" content="2016-05-16T10:34:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tutorials/ex21.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tutorials/ex21.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -81,7 +81,7 @@
 <a name="line71"> 71: </a>  ApplicationCtx ctx;             <font color="#B22222">/* user-defined context */</font>
 <a name="line72"> 72: </a>  MatCtx         *ctxF,*ctxJ;     <font color="#B22222">/* contexts for shell matrices */</font>
 <a name="line73"> 73: </a>  <a href="../../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>        type;
-<a name="line74"> 74: </a>  PetscInt       n=128,nev,its;
+<a name="line74"> 74: </a>  PetscInt       n=128,nev;
 <a name="line75"> 75: </a>  KSP            ksp;
 <a name="line76"> 76: </a>  PC             pc;
 <a name="line77"> 77: </a>  PetscMPIInt    size;
@@ -90,7 +90,7 @@
 <a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 <a name="line82"> 82: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PETSC_COMM_WORLD,&size);
 <a name="line83"> 83: </a>  <font color="#4169E1">if</font> (size != 1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"This is a uniprocessor example only!"</font>);
-<a name="line84"> 84: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line84"> 84: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line85"> 85: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Nonlinear Eigenproblem, n=%D\n\n"</font>,n);
 <a name="line86"> 86: </a>  ctx.h = 1.0/(PetscReal)n;
 <a name="line87"> 87: </a>  ctx.kappa = 1.0;
@@ -143,234 +143,230 @@
 <a name="line134">134: </a><font color="#B22222">     Customize nonlinear solver; set runtime options</font>
 <a name="line135">135: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
-<a name="line137">137: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(nep,&ksp);
-<a name="line138">138: </a>  KSPSetType(ksp,KSPBCGS);
-<a name="line139">139: </a>  KSPGetPC(ksp,&pc);
-<a name="line140">140: </a>  PCSetType(pc,PCJACOBI);
-
-<a name="line142">142: </a>  <font color="#B22222">/*</font>
-<a name="line143">143: </a><font color="#B22222">     Set solver parameters at runtime</font>
-<a name="line144">144: </a><font color="#B22222">  */</font>
-<a name="line145">145: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(nep);
-
-<a name="line147">147: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line148">148: </a><font color="#B22222">                      Solve the eigensystem</font>
-<a name="line149">149: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line151">151: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
-<a name="line152">152: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(nep,&its);
-<a name="line153">153: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> iterations = %D\n\n"</font>,its);
-
-<a name="line155">155: </a>  <font color="#B22222">/*</font>
-<a name="line156">156: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line157">157: </a><font color="#B22222">  */</font>
-<a name="line158">158: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
-<a name="line159">159: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
-<a name="line160">160: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
-<a name="line161">161: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-
-<a name="line163">163: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line164">164: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line165">165: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line167">167: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line168">168: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
-<a name="line169">169: </a>  <font color="#4169E1">if</font> (terse) {
-<a name="line170">170: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
-<a name="line171">171: </a>  } <font color="#4169E1">else</font> {
-<a name="line172">172: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
-<a name="line173">173: </a>    <a href="../../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,PETSC_VIEWER_STDOUT_WORLD);
-<a name="line174">174: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
-<a name="line175">175: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
-<a name="line176">176: </a>  }
-<a name="line177">177: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
-<a name="line178">178: </a>  MatDestroy(&F);
-<a name="line179">179: </a>  MatDestroy(&J);
-<a name="line180">180: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line181">181: </a>  <font color="#4169E1">return</font> 0;
-<a name="line182">182: </a>}
-
-<a name="line184">184: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line187">187: </a><font color="#B22222">/*</font>
-<a name="line188">188: </a><font color="#B22222">   FormInitialGuess - Computes initial guess.</font>
-
-<a name="line190">190: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line191">191: </a><font color="#B22222">.  x - the solution vector</font>
-<a name="line192">192: </a><font color="#B22222">*/</font>
-<a name="line193">193: </a><strong><font color="#4169E1"><a name="FormInitialGuess"></a>PetscErrorCode FormInitialGuess(Vec x)</font></strong>
-<a name="line194">194: </a>{
-
-<a name="line198">198: </a>  VecSet(x,1.0);
-<a name="line199">199: </a>  <font color="#4169E1">return</font>(0);
-<a name="line200">200: </a>}
-
-<a name="line202">202: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line205">205: </a><font color="#B22222">/*</font>
-<a name="line206">206: </a><font color="#B22222">   FormFunction - Computes Function matrix  T(lambda)</font>
-
-<a name="line208">208: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line209">209: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line210">210: </a><font color="#B22222">.  lambda - real part of the scalar argument</font>
-<a name="line211">211: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
-
-<a name="line213">213: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line214">214: </a><font color="#B22222">.  fun - Function matrix</font>
-<a name="line215">215: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
-<a name="line216">216: </a><font color="#B22222">*/</font>
-<a name="line217">217: </a><strong><font color="#4169E1"><a name="FormFunction"></a>PetscErrorCode FormFunction(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)</font></strong>
-<a name="line218">218: </a>{
-<a name="line220">220: </a>  MatCtx         *ctxF;
-
-<a name="line223">223: </a>  MatShellGetContext(fun,(void**)&ctxF);
-<a name="line224">224: </a>  ctxF->lambda = lambda;
-<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
-<a name="line226">226: </a>}
-
-<a name="line228">228: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line231">231: </a><font color="#B22222">/*</font>
-<a name="line232">232: </a><font color="#B22222">   FormJacobian - Computes Jacobian matrix  T'(lambda)</font>
-
-<a name="line234">234: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line235">235: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line236">236: </a><font color="#B22222">.  lambda - real part of the scalar argument</font>
-<a name="line237">237: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
-
-<a name="line239">239: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line240">240: </a><font color="#B22222">.  jac - Jacobian matrix</font>
-<a name="line241">241: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
-<a name="line242">242: </a><font color="#B22222">*/</font>
-<a name="line243">243: </a><strong><font color="#4169E1"><a name="FormJacobian"></a>PetscErrorCode FormJacobian(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat jac,void *ctx)</font></strong>
-<a name="line244">244: </a>{
-<a name="line246">246: </a>  MatCtx         *ctxJ;
-
-<a name="line249">249: </a>  MatShellGetContext(jac,(void**)&ctxJ);
-<a name="line250">250: </a>  ctxJ->lambda = lambda;
-<a name="line251">251: </a>  <font color="#4169E1">return</font>(0);
-<a name="line252">252: </a>}
-
-<a name="line254">254: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line257">257: </a><strong><font color="#4169E1"><a name="MatMult_Fun"></a>PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)</font></strong>
-<a name="line258">258: </a>{
-<a name="line259">259: </a>  PetscErrorCode    ierr;
-<a name="line260">260: </a>  MatCtx            *ctx;
-<a name="line261">261: </a>  PetscInt          i,n;
-<a name="line262">262: </a>  const PetscScalar *px;
-<a name="line263">263: </a>  PetscScalar       *py,c,d,de,oe;
-<a name="line264">264: </a>  PetscReal         h;
-
-<a name="line267">267: </a>  MatShellGetContext(A,(void**)&ctx);
-<a name="line268">268: </a>  VecGetArrayRead(x,&px);
-<a name="line269">269: </a>  VecGetArray(y,&py);
-
-<a name="line271">271: </a>  VecGetSize(x,&n);
-<a name="line272">272: </a>  h = ctx->h;
-<a name="line273">273: </a>  c = ctx->kappa/(ctx->lambda-ctx->kappa);
-<a name="line274">274: </a>  d = n;
-<a name="line275">275: </a>  de = 2.0*(d-ctx->lambda*h/3.0);   <font color="#B22222">/* diagonal entry */</font>
-<a name="line276">276: </a>  oe = -d-ctx->lambda*h/6.0;        <font color="#B22222">/* offdiagonal entry */</font>
-<a name="line277">277: </a>  py[0] = de*px[0] + oe*px[1];
-<a name="line278">278: </a>  <font color="#4169E1">for</font> (i=1;i<n-1;i++) py[i] = oe*px[i-1] +de*px[i] + oe*px[i+1];
-<a name="line279">279: </a>  de = d-ctx->lambda*h/3.0+ctx->lambda*c;   <font color="#B22222">/* diagonal entry of last row */</font>
-<a name="line280">280: </a>  py[n-1] = oe*px[n-2] + de*px[n-1];
-
-<a name="line282">282: </a>  VecRestoreArrayRead(x,&px);
-<a name="line283">283: </a>  VecRestoreArray(y,&py);
-<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
-<a name="line285">285: </a>}
-
-<a name="line287">287: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line290">290: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Fun"></a>PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)</font></strong>
-<a name="line291">291: </a>{
-<a name="line292">292: </a>  PetscErrorCode    ierr;
-<a name="line293">293: </a>  MatCtx            *ctx;
-<a name="line294">294: </a>  PetscInt          n;
-<a name="line295">295: </a>  PetscScalar       *pd,c,d;
-<a name="line296">296: </a>  PetscReal         h;
-
-<a name="line299">299: </a>  MatShellGetContext(A,(void**)&ctx);
-<a name="line300">300: </a>  VecGetSize(diag,&n);
-<a name="line301">301: </a>  h = ctx->h;
-<a name="line302">302: </a>  c = ctx->kappa/(ctx->lambda-ctx->kappa);
-<a name="line303">303: </a>  d = n;
-<a name="line304">304: </a>  VecSet(diag,2.0*(d-ctx->lambda*h/3.0));
-<a name="line305">305: </a>  VecGetArray(diag,&pd);
-<a name="line306">306: </a>  pd[n-1] = d-ctx->lambda*h/3.0+ctx->lambda*c;
-<a name="line307">307: </a>  VecRestoreArray(diag,&pd);
-<a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
-<a name="line309">309: </a>}
-
-<a name="line311">311: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line314">314: </a><strong><font color="#4169E1"><a name="MatDestroy_Fun"></a>PetscErrorCode MatDestroy_Fun(Mat A)</font></strong>
-<a name="line315">315: </a>{
-<a name="line316">316: </a>  MatCtx         *ctx;
-
-<a name="line320">320: </a>  MatShellGetContext(A,(void**)&ctx);
-<a name="line321">321: </a>  PetscFree(ctx);
-<a name="line322">322: </a>  <font color="#4169E1">return</font>(0);
-<a name="line323">323: </a>}
-
-<a name="line325">325: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="MatDuplicate_Fun"></a>PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)</font></strong>
-<a name="line329">329: </a>{
-<a name="line330">330: </a>  MatCtx         *actx,*bctx;
-<a name="line331">331: </a>  PetscInt       n;
-<a name="line332">332: </a>  MPI_Comm       comm;
-
-<a name="line336">336: </a>  MatShellGetContext(A,(void**)&actx);
-<a name="line337">337: </a>  MatGetSize(A,&n,NULL);
-
-<a name="line339">339: </a>  PetscNew(&bctx);
-<a name="line340">340: </a>  bctx->h      = actx->h;
-<a name="line341">341: </a>  bctx->kappa  = actx->kappa;
-<a name="line342">342: </a>  bctx->lambda = actx->lambda;
-
-<a name="line344">344: </a>  PetscObjectGetComm((PetscObject)A,&comm);
-<a name="line345">345: </a>  MatCreateShell(comm,n,n,n,n,(void*)bctx,B);
-<a name="line346">346: </a>  MatShellSetOperation(*B,MATOP_MULT,(void(*)())MatMult_Fun);
-<a name="line347">347: </a>  MatShellSetOperation(*B,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Fun);
-<a name="line348">348: </a>  MatShellSetOperation(*B,MATOP_DESTROY,(void(*)())MatDestroy_Fun);
-<a name="line349">349: </a>  MatShellSetOperation(*B,MATOP_DUPLICATE,(void(*)())MatDuplicate_Fun);
-<a name="line350">350: </a>  <font color="#4169E1">return</font>(0);
-<a name="line351">351: </a>}
-
-<a name="line353">353: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line356">356: </a><strong><font color="#4169E1"><a name="MatMult_Jac"></a>PetscErrorCode MatMult_Jac(Mat A,Vec x,Vec y)</font></strong>
-<a name="line357">357: </a>{
-<a name="line358">358: </a>  PetscErrorCode    ierr;
-<a name="line359">359: </a>  MatCtx            *ctx;
-<a name="line360">360: </a>  PetscInt          i,n;
-<a name="line361">361: </a>  const PetscScalar *px;
-<a name="line362">362: </a>  PetscScalar       *py,c,de,oe;
-<a name="line363">363: </a>  PetscReal         h;
-
-<a name="line366">366: </a>  MatShellGetContext(A,(void**)&ctx);
-<a name="line367">367: </a>  VecGetArrayRead(x,&px);
-<a name="line368">368: </a>  VecGetArray(y,&py);
-
-<a name="line370">370: </a>  VecGetSize(x,&n);
-<a name="line371">371: </a>  h = ctx->h;
-<a name="line372">372: </a>  c = ctx->kappa/(ctx->lambda-ctx->kappa);
-<a name="line373">373: </a>  de = -2.0*h/3.0;    <font color="#B22222">/* diagonal entry */</font>
-<a name="line374">374: </a>  oe = -h/6.0;        <font color="#B22222">/* offdiagonal entry */</font>
-<a name="line375">375: </a>  py[0] = de*px[0] + oe*px[1];
-<a name="line376">376: </a>  <font color="#4169E1">for</font> (i=1;i<n-1;i++) py[i] = oe*px[i-1] +de*px[i] + oe*px[i+1];
-<a name="line377">377: </a>  de = -h/3.0-c*c;    <font color="#B22222">/* diagonal entry of last row */</font>
-<a name="line378">378: </a>  py[n-1] = oe*px[n-2] + de*px[n-1];
-
-<a name="line380">380: </a>  VecRestoreArrayRead(x,&px);
-<a name="line381">381: </a>  VecRestoreArray(y,&py);
-<a name="line382">382: </a>  <font color="#4169E1">return</font>(0);
-<a name="line383">383: </a>}
-
-<a name="line385">385: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
-<a name="line388">388: </a><strong><font color="#4169E1"><a name="MatDestroy_Jac"></a>PetscErrorCode MatDestroy_Jac(Mat A)</font></strong>
-<a name="line389">389: </a>{
-<a name="line390">390: </a>  MatCtx         *ctx;
-
-<a name="line394">394: </a>  MatShellGetContext(A,(void**)&ctx);
-<a name="line395">395: </a>  PetscFree(ctx);
-<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
-<a name="line397">397: </a>}
+<a name="line137">137: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,NEPRII);
+<a name="line138">138: </a>  <a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>(nep,0);
+<a name="line139">139: </a>  <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>(nep,&ksp);
+<a name="line140">140: </a>  KSPSetType(ksp,KSPBCGS);
+<a name="line141">141: </a>  KSPGetPC(ksp,&pc);
+<a name="line142">142: </a>  PCSetType(pc,PCJACOBI);
+
+<a name="line144">144: </a>  <font color="#B22222">/*</font>
+<a name="line145">145: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line146">146: </a><font color="#B22222">  */</font>
+<a name="line147">147: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(nep);
+
+<a name="line149">149: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line150">150: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line151">151: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line153">153: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
+<a name="line154">154: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
+<a name="line155">155: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
+<a name="line156">156: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
+<a name="line157">157: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line159">159: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line160">160: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line161">161: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line163">163: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line164">164: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line165">165: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line166">166: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
+<a name="line167">167: </a>  } <font color="#4169E1">else</font> {
+<a name="line168">168: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line169">169: </a>    <a href="../../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line170">170: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line171">171: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
+<a name="line172">172: </a>  }
+<a name="line173">173: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
+<a name="line174">174: </a>  MatDestroy(&F);
+<a name="line175">175: </a>  MatDestroy(&J);
+<a name="line176">176: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line177">177: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line178">178: </a>}
+
+<a name="line180">180: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line183">183: </a><font color="#B22222">/*</font>
+<a name="line184">184: </a><font color="#B22222">   FormInitialGuess - Computes initial guess.</font>
+
+<a name="line186">186: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line187">187: </a><font color="#B22222">.  x - the solution vector</font>
+<a name="line188">188: </a><font color="#B22222">*/</font>
+<a name="line189">189: </a><strong><font color="#4169E1"><a name="FormInitialGuess"></a>PetscErrorCode FormInitialGuess(Vec x)</font></strong>
+<a name="line190">190: </a>{
+
+<a name="line194">194: </a>  VecSet(x,1.0);
+<a name="line195">195: </a>  <font color="#4169E1">return</font>(0);
+<a name="line196">196: </a>}
+
+<a name="line198">198: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line201">201: </a><font color="#B22222">/*</font>
+<a name="line202">202: </a><font color="#B22222">   FormFunction - Computes Function matrix  T(lambda)</font>
+
+<a name="line204">204: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line205">205: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line206">206: </a><font color="#B22222">.  lambda - real part of the scalar argument</font>
+<a name="line207">207: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
+
+<a name="line209">209: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line210">210: </a><font color="#B22222">.  fun - Function matrix</font>
+<a name="line211">211: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
+<a name="line212">212: </a><font color="#B22222">*/</font>
+<a name="line213">213: </a><strong><font color="#4169E1"><a name="FormFunction"></a>PetscErrorCode FormFunction(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)</font></strong>
+<a name="line214">214: </a>{
+<a name="line216">216: </a>  MatCtx         *ctxF;
+
+<a name="line219">219: </a>  MatShellGetContext(fun,(void**)&ctxF);
+<a name="line220">220: </a>  ctxF->lambda = lambda;
+<a name="line221">221: </a>  <font color="#4169E1">return</font>(0);
+<a name="line222">222: </a>}
+
+<a name="line224">224: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line227">227: </a><font color="#B22222">/*</font>
+<a name="line228">228: </a><font color="#B22222">   FormJacobian - Computes Jacobian matrix  T'(lambda)</font>
+
+<a name="line230">230: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line231">231: </a><font color="#B22222">.  nep    - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line232">232: </a><font color="#B22222">.  lambda - real part of the scalar argument</font>
+<a name="line233">233: </a><font color="#B22222">.  ctx    - optional user-defined context, as set by <a href="../../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
+
+<a name="line235">235: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line236">236: </a><font color="#B22222">.  jac - Jacobian matrix</font>
+<a name="line237">237: </a><font color="#B22222">.  B   - optionally different preconditioning matrix</font>
+<a name="line238">238: </a><font color="#B22222">*/</font>
+<a name="line239">239: </a><strong><font color="#4169E1"><a name="FormJacobian"></a>PetscErrorCode FormJacobian(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat jac,void *ctx)</font></strong>
+<a name="line240">240: </a>{
+<a name="line242">242: </a>  MatCtx         *ctxJ;
+
+<a name="line245">245: </a>  MatShellGetContext(jac,(void**)&ctxJ);
+<a name="line246">246: </a>  ctxJ->lambda = lambda;
+<a name="line247">247: </a>  <font color="#4169E1">return</font>(0);
+<a name="line248">248: </a>}
+
+<a name="line250">250: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line253">253: </a><strong><font color="#4169E1"><a name="MatMult_Fun"></a>PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)</font></strong>
+<a name="line254">254: </a>{
+<a name="line255">255: </a>  PetscErrorCode    ierr;
+<a name="line256">256: </a>  MatCtx            *ctx;
+<a name="line257">257: </a>  PetscInt          i,n;
+<a name="line258">258: </a>  const PetscScalar *px;
+<a name="line259">259: </a>  PetscScalar       *py,c,d,de,oe;
+<a name="line260">260: </a>  PetscReal         h;
+
+<a name="line263">263: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line264">264: </a>  VecGetArrayRead(x,&px);
+<a name="line265">265: </a>  VecGetArray(y,&py);
+
+<a name="line267">267: </a>  VecGetSize(x,&n);
+<a name="line268">268: </a>  h = ctx->h;
+<a name="line269">269: </a>  c = ctx->kappa/(ctx->lambda-ctx->kappa);
+<a name="line270">270: </a>  d = n;
+<a name="line271">271: </a>  de = 2.0*(d-ctx->lambda*h/3.0);   <font color="#B22222">/* diagonal entry */</font>
+<a name="line272">272: </a>  oe = -d-ctx->lambda*h/6.0;        <font color="#B22222">/* offdiagonal entry */</font>
+<a name="line273">273: </a>  py[0] = de*px[0] + oe*px[1];
+<a name="line274">274: </a>  <font color="#4169E1">for</font> (i=1;i<n-1;i++) py[i] = oe*px[i-1] +de*px[i] + oe*px[i+1];
+<a name="line275">275: </a>  de = d-ctx->lambda*h/3.0+ctx->lambda*c;   <font color="#B22222">/* diagonal entry of last row */</font>
+<a name="line276">276: </a>  py[n-1] = oe*px[n-2] + de*px[n-1];
+
+<a name="line278">278: </a>  VecRestoreArrayRead(x,&px);
+<a name="line279">279: </a>  VecRestoreArray(y,&py);
+<a name="line280">280: </a>  <font color="#4169E1">return</font>(0);
+<a name="line281">281: </a>}
+
+<a name="line283">283: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line286">286: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Fun"></a>PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)</font></strong>
+<a name="line287">287: </a>{
+<a name="line288">288: </a>  PetscErrorCode    ierr;
+<a name="line289">289: </a>  MatCtx            *ctx;
+<a name="line290">290: </a>  PetscInt          n;
+<a name="line291">291: </a>  PetscScalar       *pd,c,d;
+<a name="line292">292: </a>  PetscReal         h;
+
+<a name="line295">295: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line296">296: </a>  VecGetSize(diag,&n);
+<a name="line297">297: </a>  h = ctx->h;
+<a name="line298">298: </a>  c = ctx->kappa/(ctx->lambda-ctx->kappa);
+<a name="line299">299: </a>  d = n;
+<a name="line300">300: </a>  VecSet(diag,2.0*(d-ctx->lambda*h/3.0));
+<a name="line301">301: </a>  VecGetArray(diag,&pd);
+<a name="line302">302: </a>  pd[n-1] = d-ctx->lambda*h/3.0+ctx->lambda*c;
+<a name="line303">303: </a>  VecRestoreArray(diag,&pd);
+<a name="line304">304: </a>  <font color="#4169E1">return</font>(0);
+<a name="line305">305: </a>}
+
+<a name="line307">307: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line310">310: </a><strong><font color="#4169E1"><a name="MatDestroy_Fun"></a>PetscErrorCode MatDestroy_Fun(Mat A)</font></strong>
+<a name="line311">311: </a>{
+<a name="line312">312: </a>  MatCtx         *ctx;
+
+<a name="line316">316: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line317">317: </a>  PetscFree(ctx);
+<a name="line318">318: </a>  <font color="#4169E1">return</font>(0);
+<a name="line319">319: </a>}
+
+<a name="line321">321: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line324">324: </a><strong><font color="#4169E1"><a name="MatDuplicate_Fun"></a>PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)</font></strong>
+<a name="line325">325: </a>{
+<a name="line326">326: </a>  MatCtx         *actx,*bctx;
+<a name="line327">327: </a>  PetscInt       n;
+<a name="line328">328: </a>  MPI_Comm       comm;
+
+<a name="line332">332: </a>  MatShellGetContext(A,(void**)&actx);
+<a name="line333">333: </a>  MatGetSize(A,&n,NULL);
+
+<a name="line335">335: </a>  PetscNew(&bctx);
+<a name="line336">336: </a>  bctx->h      = actx->h;
+<a name="line337">337: </a>  bctx->kappa  = actx->kappa;
+<a name="line338">338: </a>  bctx->lambda = actx->lambda;
+
+<a name="line340">340: </a>  PetscObjectGetComm((PetscObject)A,&comm);
+<a name="line341">341: </a>  MatCreateShell(comm,n,n,n,n,(void*)bctx,B);
+<a name="line342">342: </a>  MatShellSetOperation(*B,MATOP_MULT,(void(*)())MatMult_Fun);
+<a name="line343">343: </a>  MatShellSetOperation(*B,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Fun);
+<a name="line344">344: </a>  MatShellSetOperation(*B,MATOP_DESTROY,(void(*)())MatDestroy_Fun);
+<a name="line345">345: </a>  MatShellSetOperation(*B,MATOP_DUPLICATE,(void(*)())MatDuplicate_Fun);
+<a name="line346">346: </a>  <font color="#4169E1">return</font>(0);
+<a name="line347">347: </a>}
+
+<a name="line349">349: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line352">352: </a><strong><font color="#4169E1"><a name="MatMult_Jac"></a>PetscErrorCode MatMult_Jac(Mat A,Vec x,Vec y)</font></strong>
+<a name="line353">353: </a>{
+<a name="line354">354: </a>  PetscErrorCode    ierr;
+<a name="line355">355: </a>  MatCtx            *ctx;
+<a name="line356">356: </a>  PetscInt          i,n;
+<a name="line357">357: </a>  const PetscScalar *px;
+<a name="line358">358: </a>  PetscScalar       *py,c,de,oe;
+<a name="line359">359: </a>  PetscReal         h;
+
+<a name="line362">362: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line363">363: </a>  VecGetArrayRead(x,&px);
+<a name="line364">364: </a>  VecGetArray(y,&py);
+
+<a name="line366">366: </a>  VecGetSize(x,&n);
+<a name="line367">367: </a>  h = ctx->h;
+<a name="line368">368: </a>  c = ctx->kappa/(ctx->lambda-ctx->kappa);
+<a name="line369">369: </a>  de = -2.0*h/3.0;    <font color="#B22222">/* diagonal entry */</font>
+<a name="line370">370: </a>  oe = -h/6.0;        <font color="#B22222">/* offdiagonal entry */</font>
+<a name="line371">371: </a>  py[0] = de*px[0] + oe*px[1];
+<a name="line372">372: </a>  <font color="#4169E1">for</font> (i=1;i<n-1;i++) py[i] = oe*px[i-1] +de*px[i] + oe*px[i+1];
+<a name="line373">373: </a>  de = -h/3.0-c*c;    <font color="#B22222">/* diagonal entry of last row */</font>
+<a name="line374">374: </a>  py[n-1] = oe*px[n-2] + de*px[n-1];
+
+<a name="line376">376: </a>  VecRestoreArrayRead(x,&px);
+<a name="line377">377: </a>  VecRestoreArray(y,&py);
+<a name="line378">378: </a>  <font color="#4169E1">return</font>(0);
+<a name="line379">379: </a>}
+
+<a name="line381">381: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line384">384: </a><strong><font color="#4169E1"><a name="MatDestroy_Jac"></a>PetscErrorCode MatDestroy_Jac(Mat A)</font></strong>
+<a name="line385">385: </a>{
+<a name="line386">386: </a>  MatCtx         *ctx;
+
+<a name="line390">390: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line391">391: </a>  PetscFree(ctx);
+<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
+<a name="line393">393: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/examples/tutorials/ex22.c b/src/nep/examples/tutorials/ex22.c
index 4198a2e..73345ea 100644
--- a/src/nep/examples/tutorials/ex22.c
+++ b/src/nep/examples/tutorials/ex22.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -54,14 +54,14 @@ int main(int argc,char **argv)
   FN             funs[3];
   NEPType        type;
   PetscScalar    coeffs[2],b;
-  PetscInt       n=128,nev,Istart,Iend,i,its;
+  PetscInt       n=128,nev,Istart,Iend,i;
   PetscReal      tau=0.001,h,a=20,xi;
   PetscBool      terse;
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Delay Eigenproblem, n=%D, tau=%g\n\n",n,(double)tau);CHKERRQ(ierr);
   h = PETSC_PI/(PetscReal)(n+1);
 
@@ -154,9 +154,9 @@ int main(int argc,char **argv)
              Customize nonlinear solver; set runtime options
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  ierr = NEPSetTolerances(nep,PETSC_DEFAULT,1e-9,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
+  ierr = NEPSetTolerances(nep,1e-9,PETSC_DEFAULT);CHKERRQ(ierr);
   ierr = NEPSetDimensions(nep,1,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
-  ierr = NEPSetLagPreconditioner(nep,0);CHKERRQ(ierr);
+  ierr = NEPRIISetLagPreconditioner(nep,0);CHKERRQ(ierr);
 
   /*
      Set solver parameters at runtime
@@ -168,12 +168,6 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = NEPSolve(nep);CHKERRQ(ierr);
-  ierr = NEPGetIterationNumber(nep,&its);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of NEP iterations = %D\n\n",its);CHKERRQ(ierr);
-
-  /*
-     Optional: Get some information from the solver and display it
-  */
   ierr = NEPGetType(nep,&type);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n",type);CHKERRQ(ierr);
   ierr = NEPGetDimensions(nep,&nev,NULL,NULL);CHKERRQ(ierr);
@@ -184,7 +178,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -201,6 +195,6 @@ int main(int argc,char **argv)
   ierr = FNDestroy(&f2);CHKERRQ(ierr);
   ierr = FNDestroy(&f3);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/nep/examples/tutorials/ex22.c.html b/src/nep/examples/tutorials/ex22.c.html
index 1fab987..59f84d7 100644
--- a/src/nep/examples/tutorials/ex22.c.html
+++ b/src/nep/examples/tutorials/ex22.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/tutorials/ex22.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:26+00:00">
+<meta name="date" content="2016-05-16T10:34:33+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tutorials/ex22.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tutorials/ex22.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -64,13 +64,13 @@
 <a name="line54"> 54: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>             funs[3];
 <a name="line55"> 55: </a>  <a href="../../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>        type;
 <a name="line56"> 56: </a>  PetscScalar    coeffs[2],b;
-<a name="line57"> 57: </a>  PetscInt       n=128,nev,Istart,Iend,i,its;
+<a name="line57"> 57: </a>  PetscInt       n=128,nev,Istart,Iend,i;
 <a name="line58"> 58: </a>  PetscReal      tau=0.001,h,a=20,xi;
 <a name="line59"> 59: </a>  PetscBool      terse;
 
 <a name="line62"> 62: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line63"> 63: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line64"> 64: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line63"> 63: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line64"> 64: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
 <a name="line65"> 65: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Delay Eigenproblem, n=%D, tau=%g\n\n"</font>,n,(double)tau);
 <a name="line66"> 66: </a>  h = PETSC_PI/(PetscReal)(n+1);
 
@@ -163,9 +163,9 @@
 <a name="line154">154: </a><font color="#B22222">             Customize nonlinear solver; set runtime options</font>
 <a name="line155">155: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
-<a name="line157">157: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(nep,PETSC_DEFAULT,1e-9,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line157">157: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(nep,1e-9,PETSC_DEFAULT);
 <a name="line158">158: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(nep,1,PETSC_DEFAULT,PETSC_DEFAULT);
-<a name="line159">159: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>(nep,0);
+<a name="line159">159: </a>  <a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>(nep,0);
 
 <a name="line161">161: </a>  <font color="#B22222">/*</font>
 <a name="line162">162: </a><font color="#B22222">     Set solver parameters at runtime</font>
@@ -177,41 +177,35 @@
 <a name="line168">168: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line170">170: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
-<a name="line171">171: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(nep,&its);
-<a name="line172">172: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> iterations = %D\n\n"</font>,its);
-
-<a name="line174">174: </a>  <font color="#B22222">/*</font>
-<a name="line175">175: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line176">176: </a><font color="#B22222">  */</font>
-<a name="line177">177: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
-<a name="line178">178: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
-<a name="line179">179: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
-<a name="line180">180: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-
-<a name="line182">182: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line183">183: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line184">184: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line186">186: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line187">187: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
-<a name="line188">188: </a>  <font color="#4169E1">if</font> (terse) {
-<a name="line189">189: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
-<a name="line190">190: </a>  } <font color="#4169E1">else</font> {
-<a name="line191">191: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
-<a name="line192">192: </a>    <a href="../../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,PETSC_VIEWER_STDOUT_WORLD);
-<a name="line193">193: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
-<a name="line194">194: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
-<a name="line195">195: </a>  }
-<a name="line196">196: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
-<a name="line197">197: </a>  MatDestroy(&Id);
-<a name="line198">198: </a>  MatDestroy(&A);
-<a name="line199">199: </a>  MatDestroy(&B);
-<a name="line200">200: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f1);
-<a name="line201">201: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f2);
-<a name="line202">202: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f3);
-<a name="line203">203: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line204">204: </a>  <font color="#4169E1">return</font> 0;
-<a name="line205">205: </a>}
+<a name="line171">171: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
+<a name="line172">172: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
+<a name="line173">173: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
+<a name="line174">174: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line176">176: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line177">177: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line178">178: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line180">180: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line181">181: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line182">182: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line183">183: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
+<a name="line184">184: </a>  } <font color="#4169E1">else</font> {
+<a name="line185">185: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line186">186: </a>    <a href="../../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line187">187: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line188">188: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
+<a name="line189">189: </a>  }
+<a name="line190">190: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
+<a name="line191">191: </a>  MatDestroy(&Id);
+<a name="line192">192: </a>  MatDestroy(&A);
+<a name="line193">193: </a>  MatDestroy(&B);
+<a name="line194">194: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f1);
+<a name="line195">195: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f2);
+<a name="line196">196: </a>  <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f3);
+<a name="line197">197: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line198">198: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line199">199: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/examples/tutorials/ex27.c b/src/nep/examples/tutorials/ex27.c
new file mode 100644
index 0000000..09eb0a5
--- /dev/null
+++ b/src/nep/examples/tutorials/ex27.c
@@ -0,0 +1,245 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2013, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Simple nonlinear eigenproblem using the NLEIGS solver.\n\n"
+  "The command line options are:\n"
+  "  -n <n>, where <n> = matrix dimension.\n"
+  "  -split <0/1>, to select the split form in the problem definition (enabled by default)\n";
+
+
+/*
+   Solve T(lambda)x=0 using NLEIGS solver
+      with T(lambda) = -D+sqrt(lambda)*I
+      where D is the Laplacian operator in 1 dimension
+      and with the interpolation interval [.01,16]   
+*/
+
+#include <slepcnep.h>
+
+/*
+   User-defined routines
+*/
+PetscErrorCode FormFunction(NEP,PetscScalar,Mat,Mat,void*);
+PetscErrorCode ComputeSingularities(NEP,PetscInt*,PetscScalar*,void*);
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  NEP            nep;             /* nonlinear eigensolver context */
+  Mat            F,A[2];             
+  NEPType        type;
+  PetscInt       n=100,nev,Istart,Iend,i;
+  PetscErrorCode ierr;
+  PetscBool      split=PETSC_TRUE;
+  RG             rg;
+  FN             f[2];
+  PetscBool      terse;
+  PetscScalar    coeffs;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetBool(NULL,NULL,"-split",&split,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSquare root eigenproblem, n=%D%s\n\n",n,split?" (in split form)":"");CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+     Create nonlinear eigensolver context
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = NEPCreate(PETSC_COMM_WORLD,&nep);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+     Select the NLEIGS solver and set required options for it
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = NEPSetType(nep,NEPNLEIGS);CHKERRQ(ierr);
+  ierr = NEPNLEIGSSetSingularitiesFunction(nep,ComputeSingularities,NULL);CHKERRQ(ierr);
+  ierr = NEPGetRG(nep,&rg);CHKERRQ(ierr);
+  ierr = RGSetType(rg,RGINTERVAL);CHKERRQ(ierr);
+#if defined(PETSC_USE_COMPLEX)
+  ierr = RGIntervalSetEndpoints(rg,0.01,16.0,-0.001,0.001);CHKERRQ(ierr);
+#else
+  ierr = RGIntervalSetEndpoints(rg,0.01,16.0,0,0);CHKERRQ(ierr);
+#endif
+  ierr = NEPSetTarget(nep,1.1);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+     Define the nonlinear problem
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  
+  if (split) {
+    /*
+       Create matrices for the split form 
+    */
+    ierr = MatCreate(PETSC_COMM_WORLD,&A[0]);CHKERRQ(ierr);
+    ierr = MatSetSizes(A[0],PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr);
+    ierr = MatSetFromOptions(A[0]);CHKERRQ(ierr);
+    ierr = MatSetUp(A[0]);CHKERRQ(ierr);
+    ierr = MatGetOwnershipRange(A[0],&Istart,&Iend);CHKERRQ(ierr);
+    for (i=Istart;i<Iend;i++) {
+      if (i>0) { ierr = MatSetValue(A[0],i,i-1,1.0,INSERT_VALUES);CHKERRQ(ierr); }
+      if (i<n-1) { ierr = MatSetValue(A[0],i,i+1,1.0,INSERT_VALUES);CHKERRQ(ierr); }
+      ierr = MatSetValue(A[0],i,i,-2.0,INSERT_VALUES);CHKERRQ(ierr);
+    }
+    ierr = MatAssemblyBegin(A[0],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+    ierr = MatAssemblyEnd(A[0],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+
+    ierr = MatCreate(PETSC_COMM_WORLD,&A[1]);CHKERRQ(ierr);
+    ierr = MatSetSizes(A[1],PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr);
+    ierr = MatSetFromOptions(A[1]);CHKERRQ(ierr);
+    ierr = MatSetUp(A[1]);CHKERRQ(ierr);
+    ierr = MatAssemblyBegin(A[1],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+    ierr = MatAssemblyEnd(A[1],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+    ierr = MatShift(A[1],1.0);CHKERRQ(ierr);
+
+    /*
+       Define funcions for the split form 
+     */
+    ierr = FNCreate(PETSC_COMM_WORLD,&f[0]);CHKERRQ(ierr);
+    ierr = FNSetType(f[0],FNRATIONAL);CHKERRQ(ierr);
+    coeffs = 1.0;
+    ierr = FNRationalSetNumerator(f[0],1,&coeffs);CHKERRQ(ierr);
+    ierr = FNCreate(PETSC_COMM_WORLD,&f[1]);CHKERRQ(ierr);
+    ierr = FNSetType(f[1],FNSQRT);CHKERRQ(ierr);
+    ierr = NEPSetSplitOperator(nep,2,A,f,SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
+
+  } else {
+    /*
+       Callback form: create matrix and set Function evaluation routine
+     */
+    ierr = MatCreate(PETSC_COMM_WORLD,&F);CHKERRQ(ierr);
+    ierr = MatSetSizes(F,PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr);
+    ierr = MatSetFromOptions(F);CHKERRQ(ierr);
+    ierr = MatSeqAIJSetPreallocation(F,3,NULL);CHKERRQ(ierr);
+    ierr = MatMPIAIJSetPreallocation(F,3,NULL,1,NULL);CHKERRQ(ierr);
+    ierr = MatSetUp(F);CHKERRQ(ierr);
+    ierr = NEPSetFunction(nep,F,F,FormFunction,NULL);CHKERRQ(ierr);
+  }
+
+  /*
+     Set solver parameters at runtime
+  */
+  ierr = NEPSetFromOptions(nep);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                      Solve the eigensystem
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  ierr = NEPSolve(nep);CHKERRQ(ierr);
+  ierr = NEPGetType(nep,&type);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n",type);CHKERRQ(ierr);
+  ierr = NEPGetDimensions(nep,&nev,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of requested eigenvalues: %D\n",nev);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                    Display solution and clean up
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /* show detailed info unless -terse option is given by user */
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+  if (terse) {
+    ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);CHKERRQ(ierr);
+    ierr = NEPReasonView(nep,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = NEPErrorView(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+  }
+  ierr = NEPDestroy(&nep);CHKERRQ(ierr);
+  if (split) {
+    ierr = MatDestroy(&A[0]);CHKERRQ(ierr);
+    ierr = MatDestroy(&A[1]);CHKERRQ(ierr);
+    ierr = FNDestroy(&f[0]);CHKERRQ(ierr);
+    ierr = FNDestroy(&f[1]);CHKERRQ(ierr);
+  } else {
+    ierr = MatDestroy(&F);CHKERRQ(ierr);
+  }
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
+/* ------------------------------------------------------------------- */
+#undef __FUNCT__
+#define __FUNCT__ "FormFunction"
+/*
+   FormFunction - Computes Function matrix  T(lambda)
+*/
+PetscErrorCode FormFunction(NEP nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)
+{
+  PetscErrorCode ierr;
+  PetscInt       i,n,col[3],Istart,Iend;
+  PetscBool      FirstBlock=PETSC_FALSE,LastBlock=PETSC_FALSE;
+  PetscScalar    value[3],t;
+
+  PetscFunctionBeginUser;
+  /*
+     Compute Function entries and insert into matrix
+  */
+  t = PetscSqrtScalar(lambda);
+  ierr = MatGetSize(fun,&n,NULL);CHKERRQ(ierr);
+  ierr = MatGetOwnershipRange(fun,&Istart,&Iend);CHKERRQ(ierr);
+  if (Istart==0) FirstBlock=PETSC_TRUE;
+  if (Iend==n) LastBlock=PETSC_TRUE;
+  value[0]=1.0; value[1]=t-2.0; value[2]=1.0;
+  for (i=(FirstBlock? Istart+1: Istart); i<(LastBlock? Iend-1: Iend); i++) {
+    col[0]=i-1; col[1]=i; col[2]=i+1;
+    ierr = MatSetValues(fun,1,&i,3,col,value,INSERT_VALUES);CHKERRQ(ierr);
+  }
+  if (LastBlock) {
+    i=n-1; col[0]=n-2; col[1]=n-1;
+    ierr = MatSetValues(fun,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr);
+  }
+  if (FirstBlock) {
+    i=0; col[0]=0; col[1]=1; value[0]=t-2.0; value[1]=1.0;
+    ierr = MatSetValues(fun,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr);
+  }
+
+  /*
+     Assemble matrix
+  */
+  ierr = MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  if (fun != B) {
+    ierr = MatAssemblyBegin(fun,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+    ierr = MatAssemblyEnd(fun,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ComputeSingularities"
+/*
+   ComputeSingularities - Computes maxnp points (at most) in the complex plane where
+   the function T(.) is not analytic.
+
+   In this case, we discretize the singularity region (-inf,0)~(-10e+6,-10e-6) 
+*/
+PetscErrorCode ComputeSingularities(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *pt)
+{
+  PetscReal h;
+  PetscInt  i;
+
+  PetscFunctionBeginUser;
+  h = 12.0/(*maxnp-1);
+  xi[0] = -1e-6; xi[*maxnp-1] = -1e+6;
+  for (i=1;i<*maxnp-1;i++) xi[i] = -PetscPowReal(10,-6+h*i);
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/nep/examples/tutorials/ex27.c.html b/src/nep/examples/tutorials/ex27.c.html
new file mode 100644
index 0000000..dc6ac31
--- /dev/null
+++ b/src/nep/examples/tutorials/ex27.c.html
@@ -0,0 +1,251 @@
+<center><a href="ex27.c">Actual source code: ex27.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/tutorials/ex27.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:33+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tutorials/ex27.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2013, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Simple nonlinear eigenproblem using the NLEIGS solver.\n\n"</font>
+<a name="line23"> 23: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line24"> 24: </a>  <font color="#666666">"  -n <n>, where <n> = matrix dimension.\n"</font>
+<a name="line25"> 25: </a>  <font color="#666666">"  -split <0/1>, to select the split form in the problem definition (enabled by default)\n"</font>;
+
+
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">   Solve T(lambda)x=0 using NLEIGS solver</font>
+<a name="line30"> 30: </a><font color="#B22222">      with T(lambda) = -D+sqrt(lambda)*I</font>
+<a name="line31"> 31: </a><font color="#B22222">      where D is the Laplacian operator in 1 dimension</font>
+<a name="line32"> 32: </a><font color="#B22222">      and with the interpolation interval [.01,16]   </font>
+<a name="line33"> 33: </a><font color="#B22222">*/</font>
+
+<a name="line35"> 35: </a><font color="#A020F0">#include <slepcnep.h></font>
+
+<a name="line37"> 37: </a><font color="#B22222">/*</font>
+<a name="line38"> 38: </a><font color="#B22222">   User-defined routines</font>
+<a name="line39"> 39: </a><font color="#B22222">*/</font>
+<a name="line40"> 40: </a><strong><font color="#4169E1">PetscErrorCode FormFunction(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*)</font></strong>;
+<a name="line41"> 41: </a><strong><font color="#4169E1">PetscErrorCode ComputeSingularities(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*)</font></strong>;
+
+<a name="line45"> 45: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line46"> 46: </a>{
+<a name="line47"> 47: </a>  <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>            nep;             <font color="#B22222">/* nonlinear eigensolver context */</font>
+<a name="line48"> 48: </a>  Mat            F,A[2];             
+<a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a>        type;
+<a name="line50"> 50: </a>  PetscInt       n=100,nev,Istart,Iend,i;
+<a name="line52"> 52: </a>  PetscBool      split=PETSC_TRUE;
+<a name="line53"> 53: </a>  <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;
+<a name="line54"> 54: </a>  <a href="../../../../docs/manualpages/FN/FN.html#FN">FN</a>             f[2];
+<a name="line55"> 55: </a>  PetscBool      terse;
+<a name="line56"> 56: </a>  PetscScalar    coeffs;
+
+<a name="line58"> 58: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line59"> 59: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line60"> 60: </a>  PetscOptionsGetBool(NULL,NULL,<font color="#666666">"-split"</font>,&split,NULL);
+<a name="line61"> 61: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSquare root eigenproblem, n=%D%s\n\n"</font>,n,split?<font color="#666666">" (in split form)"</font>:<font color="#666666">""</font>);
+
+<a name="line63"> 63: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line64"> 64: </a><font color="#B22222">     Create nonlinear eigensolver context</font>
+<a name="line65"> 65: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>(PETSC_COMM_WORLD,&nep);
+
+<a name="line69"> 69: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line70"> 70: </a><font color="#B22222">     Select the NLEIGS solver and set required options for it</font>
+<a name="line71"> 71: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line73"> 73: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,NEPNLEIGS);
+<a name="line74"> 74: </a>  <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a>(nep,ComputeSingularities,NULL);
+<a name="line75"> 75: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&rg);
+<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,RGINTERVAL);
+<a name="line77"> 77: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,0.01,16.0,-0.001,0.001);
+<a name="line79"> 79: </a><font color="#A020F0">#else</font>
+<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,0.01,16.0,0,0);
+<a name="line81"> 81: </a><font color="#A020F0">#endif</font>
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(nep,1.1);
+
+<a name="line84"> 84: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line85"> 85: </a><font color="#B22222">     Define the nonlinear problem</font>
+<a name="line86"> 86: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line87"> 87: </a>  
+<a name="line88"> 88: </a>  <font color="#4169E1">if</font> (split) {
+<a name="line89"> 89: </a>    <font color="#B22222">/*</font>
+<a name="line90"> 90: </a><font color="#B22222">       Create matrices for the split form </font>
+<a name="line91"> 91: </a><font color="#B22222">    */</font>
+<a name="line92"> 92: </a>    MatCreate(PETSC_COMM_WORLD,&A[0]);
+<a name="line93"> 93: </a>    MatSetSizes(A[0],PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line94"> 94: </a>    MatSetFromOptions(A[0]);
+<a name="line95"> 95: </a>    MatSetUp(A[0]);
+<a name="line96"> 96: </a>    MatGetOwnershipRange(A[0],&Istart,&Iend);
+<a name="line97"> 97: </a>    <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line98"> 98: </a>      <font color="#4169E1">if</font> (i>0) { MatSetValue(A[0],i,i-1,1.0,INSERT_VALUES); }
+<a name="line99"> 99: </a>      <font color="#4169E1">if</font> (i<n-1) { MatSetValue(A[0],i,i+1,1.0,INSERT_VALUES); }
+<a name="line100">100: </a>      MatSetValue(A[0],i,i,-2.0,INSERT_VALUES);
+<a name="line101">101: </a>    }
+<a name="line102">102: </a>    MatAssemblyBegin(A[0],MAT_FINAL_ASSEMBLY);
+<a name="line103">103: </a>    MatAssemblyEnd(A[0],MAT_FINAL_ASSEMBLY);
+
+<a name="line105">105: </a>    MatCreate(PETSC_COMM_WORLD,&A[1]);
+<a name="line106">106: </a>    MatSetSizes(A[1],PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line107">107: </a>    MatSetFromOptions(A[1]);
+<a name="line108">108: </a>    MatSetUp(A[1]);
+<a name="line109">109: </a>    MatAssemblyBegin(A[1],MAT_FINAL_ASSEMBLY);
+<a name="line110">110: </a>    MatAssemblyEnd(A[1],MAT_FINAL_ASSEMBLY);
+<a name="line111">111: </a>    MatShift(A[1],1.0);
+
+<a name="line113">113: </a>    <font color="#B22222">/*</font>
+<a name="line114">114: </a><font color="#B22222">       Define funcions for the split form </font>
+<a name="line115">115: </a><font color="#B22222">     */</font>
+<a name="line116">116: </a>    <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f[0]);
+<a name="line117">117: </a>    <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f[0],FNRATIONAL);
+<a name="line118">118: </a>    coeffs = 1.0;
+<a name="line119">119: </a>    <a href="../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(f[0],1,&coeffs);
+<a name="line120">120: </a>    <a href="../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f[1]);
+<a name="line121">121: </a>    <a href="../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f[1],FNSQRT);
+<a name="line122">122: </a>    <a href="../../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(nep,2,A,f,SUBSET_NONZERO_PATTERN);
+
+<a name="line124">124: </a>  } <font color="#4169E1">else</font> {
+<a name="line125">125: </a>    <font color="#B22222">/*</font>
+<a name="line126">126: </a><font color="#B22222">       Callback form: create matrix and set Function evaluation routine</font>
+<a name="line127">127: </a><font color="#B22222">     */</font>
+<a name="line128">128: </a>    MatCreate(PETSC_COMM_WORLD,&F);
+<a name="line129">129: </a>    MatSetSizes(F,PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line130">130: </a>    MatSetFromOptions(F);
+<a name="line131">131: </a>    MatSeqAIJSetPreallocation(F,3,NULL);
+<a name="line132">132: </a>    MatMPIAIJSetPreallocation(F,3,NULL,1,NULL);
+<a name="line133">133: </a>    MatSetUp(F);
+<a name="line134">134: </a>    <a href="../../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(nep,F,F,FormFunction,NULL);
+<a name="line135">135: </a>  }
+
+<a name="line137">137: </a>  <font color="#B22222">/*</font>
+<a name="line138">138: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line139">139: </a><font color="#B22222">  */</font>
+<a name="line140">140: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(nep);
+
+<a name="line142">142: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line143">143: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line144">144: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line145">145: </a>  <a href="../../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(nep);
+<a name="line146">146: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(nep,&type);
+<a name="line147">147: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n"</font>,type);
+<a name="line148">148: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(nep,&nev,NULL,NULL);
+<a name="line149">149: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line151">151: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line152">152: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line153">153: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line155">155: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line156">156: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line157">157: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line158">158: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,NULL);
+<a name="line159">159: </a>  } <font color="#4169E1">else</font> {
+<a name="line160">160: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line161">161: </a>    <a href="../../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line162">162: </a>    <a href="../../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line163">163: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
+<a name="line164">164: </a>  }
+<a name="line165">165: </a>  <a href="../../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(&nep);
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (split) {
+<a name="line167">167: </a>    MatDestroy(&A[0]);
+<a name="line168">168: </a>    MatDestroy(&A[1]);
+<a name="line169">169: </a>    <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f[0]);
+<a name="line170">170: </a>    <a href="../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f[1]);
+<a name="line171">171: </a>  } <font color="#4169E1">else</font> {
+<a name="line172">172: </a>    MatDestroy(&F);
+<a name="line173">173: </a>  }
+<a name="line174">174: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line175">175: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line176">176: </a>}
+
+<a name="line178">178: </a><font color="#B22222">/* ------------------------------------------------------------------- */</font>
+<a name="line181">181: </a><font color="#B22222">/*</font>
+<a name="line182">182: </a><font color="#B22222">   FormFunction - Computes Function matrix  T(lambda)</font>
+<a name="line183">183: </a><font color="#B22222">*/</font>
+<a name="line184">184: </a><strong><font color="#4169E1"><a name="FormFunction"></a>PetscErrorCode FormFunction(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat fun,Mat B,void *ctx)</font></strong>
+<a name="line185">185: </a>{
+<a name="line187">187: </a>  PetscInt       i,n,col[3],Istart,Iend;
+<a name="line188">188: </a>  PetscBool      FirstBlock=PETSC_FALSE,LastBlock=PETSC_FALSE;
+<a name="line189">189: </a>  PetscScalar    value[3],t;
+
+<a name="line192">192: </a>  <font color="#B22222">/*</font>
+<a name="line193">193: </a><font color="#B22222">     Compute Function entries and insert into matrix</font>
+<a name="line194">194: </a><font color="#B22222">  */</font>
+<a name="line195">195: </a>  t = PetscSqrtScalar(lambda);
+<a name="line196">196: </a>  MatGetSize(fun,&n,NULL);
+<a name="line197">197: </a>  MatGetOwnershipRange(fun,&Istart,&Iend);
+<a name="line198">198: </a>  <font color="#4169E1">if</font> (Istart==0) FirstBlock=PETSC_TRUE;
+<a name="line199">199: </a>  <font color="#4169E1">if</font> (Iend==n) LastBlock=PETSC_TRUE;
+<a name="line200">200: </a>  value[0]=1.0; value[1]=t-2.0; value[2]=1.0;
+<a name="line201">201: </a>  <font color="#4169E1">for</font> (i=(FirstBlock? Istart+1: Istart); i<(LastBlock? Iend-1: Iend); i++) {
+<a name="line202">202: </a>    col[0]=i-1; col[1]=i; col[2]=i+1;
+<a name="line203">203: </a>    MatSetValues(fun,1,&i,3,col,value,INSERT_VALUES);
+<a name="line204">204: </a>  }
+<a name="line205">205: </a>  <font color="#4169E1">if</font> (LastBlock) {
+<a name="line206">206: </a>    i=n-1; col[0]=n-2; col[1]=n-1;
+<a name="line207">207: </a>    MatSetValues(fun,1,&i,2,col,value,INSERT_VALUES);
+<a name="line208">208: </a>  }
+<a name="line209">209: </a>  <font color="#4169E1">if</font> (FirstBlock) {
+<a name="line210">210: </a>    i=0; col[0]=0; col[1]=1; value[0]=t-2.0; value[1]=1.0;
+<a name="line211">211: </a>    MatSetValues(fun,1,&i,2,col,value,INSERT_VALUES);
+<a name="line212">212: </a>  }
+
+<a name="line214">214: </a>  <font color="#B22222">/*</font>
+<a name="line215">215: </a><font color="#B22222">     Assemble matrix</font>
+<a name="line216">216: </a><font color="#B22222">  */</font>
+<a name="line217">217: </a>  MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY);
+<a name="line218">218: </a>  MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY);
+<a name="line219">219: </a>  <font color="#4169E1">if</font> (fun != B) {
+<a name="line220">220: </a>    MatAssemblyBegin(fun,MAT_FINAL_ASSEMBLY);
+<a name="line221">221: </a>    MatAssemblyEnd(fun,MAT_FINAL_ASSEMBLY);
+<a name="line222">222: </a>  }
+<a name="line223">223: </a>  <font color="#4169E1">return</font>(0);
+<a name="line224">224: </a>}
+
+<a name="line228">228: </a><font color="#B22222">/*</font>
+<a name="line229">229: </a><font color="#B22222">   ComputeSingularities - Computes maxnp points (at most) in the complex plane where</font>
+<a name="line230">230: </a><font color="#B22222">   the function T(.) is not analytic.</font>
+
+<a name="line232">232: </a><font color="#B22222">   In this case, we discretize the singularity region (-inf,0)~(-10e+6,-10e-6) </font>
+<a name="line233">233: </a><font color="#B22222">*/</font>
+<a name="line234">234: </a><strong><font color="#4169E1"><a name="ComputeSingularities"></a>PetscErrorCode ComputeSingularities(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *maxnp,PetscScalar *xi,void *pt)</font></strong>
+<a name="line235">235: </a>{
+<a name="line236">236: </a>  PetscReal h;
+<a name="line237">237: </a>  PetscInt  i;
+
+<a name="line240">240: </a>  h = 12.0/(*maxnp-1);
+<a name="line241">241: </a>  xi[0] = -1e-6; xi[*maxnp-1] = -1e+6;
+<a name="line242">242: </a>  <font color="#4169E1">for</font> (i=1;i<*maxnp-1;i++) xi[i] = -PetscPowReal(10,-6+h*i);
+<a name="line243">243: </a>  <font color="#4169E1">return</font>(0);
+<a name="line244">244: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/nep/examples/tutorials/index.html b/src/nep/examples/tutorials/index.html
index a6172bb..609b964 100644
--- a/src/nep/examples/tutorials/index.html
+++ b/src/nep/examples/tutorials/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
@@ -22,5 +22,6 @@ Options can also be set directly in application codes by calling the correspondi
 <a href="ex20.c.html">ex20.c: Simple 1-D nonlinear eigenproblem</a><br>
 <a href="ex21.c.html">ex21.c: Simple 1-D nonlinear eigenproblem (matrix-free version, sequential)</a><br>
 <a href="ex22.c.html">ex22.c: Delay differential equation</a><br>
+<a href="ex27.c.html">ex27.c: Simple nonlinear eigenproblem using the NLEIGS solver</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/nep/examples/tutorials/makefile b/src/nep/examples/tutorials/makefile
index cad3c80..c02c1b3 100644
--- a/src/nep/examples/tutorials/makefile
+++ b/src/nep/examples/tutorials/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,13 +24,14 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/nep/examples/tutorials/
-EXAMPLESC  = ex20.c ex21.c ex22.c
+EXAMPLESC  = ex20.c ex21.c ex22.c ex27.c
 EXAMPLESF  =
 MANSEC     = NEP
 
 TESTEXAMPLES_C           = ex21.PETSc runex21_1 ex21.rm \
-                           ex22.PETSc runex22_1 ex22.rm
-TESTEXAMPLES_C_NOCOMPLEX =
+                           ex22.PETSc runex22_1 ex22.rm \
+                           ex27.PETSc runex27_1 runex27_2 ex27.rm
+TESTEXAMPLES_C_COMPLEX   = ex22.PETSc runex22_ciss_1 ex22.rm
 TESTEXAMPLES_F90         =
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
@@ -47,23 +48,45 @@ ex22: ex22.o chkopts
 	-${CLINKER} -o ex22 ex22.o ${SLEPC_NEP_LIB}
 	${RM} ex22.o
 
+ex27: ex27.o chkopts
+	-${CLINKER} -o ex27 ex27.o ${SLEPC_NEP_LIB}
+	${RM} ex27.o
+
 #------------------------------------------------------------------------------------
 
 runex20_1:
-	-@${MPIEXEC} -np 1 ./ex20 > ex20_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex20 > ex20_1.tmp 2>&1; \
 	   if (${DIFF} output/ex20_1.out ex20_1.tmp) then true; \
 	   else echo "Possible problem with ex20_1, diffs above"; fi; \
 	   ${RM} -f ex20_1.tmp
 
 runex21_1:
-	-@${MPIEXEC} -np 1 ./ex21 -terse > ex21_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex21 -terse > ex21_1.tmp 2>&1; \
 	   if (${DIFF} output/ex21_1.out ex21_1.tmp) then true; \
 	   else echo "Possible problem with ex21_1, diffs above"; fi; \
 	   ${RM} -f ex21_1.tmp
 
 runex22_1:
-	-@${MPIEXEC} -np 1 ./ex22 -terse > ex22_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex22 -terse > ex22_1.tmp 2>&1; \
 	   if (${DIFF} output/ex22_1.out ex22_1.tmp) then true; \
 	   else echo "Possible problem with ex22_1, diffs above"; fi; \
 	   ${RM} -f ex22_1.tmp
 
+runex22_ciss_1:
+	-@${MPIEXEC} -n 1 ./ex22 -nep_type ciss -rg_type ellipse -rg_ellipse_center 10 -rg_ellipse_radius 9.5 -nep_ncv 24 -terse > ex22_ciss_1.tmp 2>&1; \
+	   if (${DIFF} output/ex22_ciss_1.out ex22_ciss_1.tmp) then true; \
+	   else echo "Possible problem with ex22_ciss_1, diffs above"; fi; \
+	   ${RM} -f ex22_ciss_1.tmp
+
+runex27_1:
+	-@${MPIEXEC} -n 1 ./ex27 -nep_nev 3 -terse > ex27_1.tmp 2>&1; \
+	   if (${DIFF} output/ex27_1.out ex27_1.tmp) then true; \
+	   else echo "Possible problem with ex27_1, diffs above"; fi; \
+	   ${RM} -f ex27_1.tmp
+
+runex27_2:
+	-@${MPIEXEC} -n 1 ./ex27 -split 0 -nep_nev 3 -terse > ex27_2.tmp 2>&1; \
+	   if (${DIFF} output/ex27_2.out ex27_2.tmp) then true; \
+	   else echo "Possible problem with ex27_2, diffs above"; fi; \
+	   ${RM} -f ex27_2.tmp
+
diff --git a/src/nep/examples/tutorials/makefile.html b/src/nep/examples/tutorials/makefile.html
index b5bcd3f..af32e1f 100644
--- a/src/nep/examples/tutorials/makefile.html
+++ b/src/nep/examples/tutorials/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/examples/tutorials/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:26+00:00">
+<meta name="date" content="2016-05-16T10:34:34+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,13 +35,14 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/nep/examples/tutorials/
-EXAMPLESC  = ex20.c ex21.c ex22.c
+EXAMPLESC  = ex20.c ex21.c ex22.c ex27.c
 EXAMPLESF  =
 MANSEC     = <a href="ROOT/docs/manualpages/NEP/NEP.html#NEP">NEP</a>
 
 TESTEXAMPLES_C           = ex21.PETSc runex21_1 ex21.rm \
-                           ex22.PETSc runex22_1 ex22.rm
-TESTEXAMPLES_C_NOCOMPLEX =
+                           ex22.PETSc runex22_1 ex22.rm \
+                           ex27.PETSc runex27_1 runex27_2 ex27.rm
+TESTEXAMPLES_C_COMPLEX   = ex22.PETSc runex22_ciss_1 ex22.rm
 TESTEXAMPLES_F90         =
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
@@ -58,26 +59,48 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o ex22 ex22.o ${SLEPC_NEP_LIB}
 	${RM} ex22.o
 
+<strong><font color="#FF0000">ex27:</font></strong> ex27.o chkopts
+	-${CLINKER} -o ex27 ex27.o ${SLEPC_NEP_LIB}
+	${RM} ex27.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 
 <strong><font color="#FF0000">runex20_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex20 > ex20_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex20 > ex20_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex20_1.out ex20_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex20_1, diffs above"</font>; fi; \
 	   ${RM} -f ex20_1.tmp
 
 <strong><font color="#FF0000">runex21_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex21 -terse > ex21_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex21 -terse > ex21_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex21_1.out ex21_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex21_1, diffs above"</font>; fi; \
 	   ${RM} -f ex21_1.tmp
 
 <strong><font color="#FF0000">runex22_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex22 -terse > ex22_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex22 -terse > ex22_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex22_1.out ex22_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex22_1, diffs above"</font>; fi; \
 	   ${RM} -f ex22_1.tmp
 
+<strong><font color="#FF0000">runex22_ciss_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex22 -nep_type ciss -rg_type ellipse -rg_ellipse_center 10 -rg_ellipse_radius 9.5 -nep_ncv 24 -terse > ex22_ciss_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex22_ciss_1.out ex22_ciss_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex22_ciss_1, diffs above"</font>; fi; \
+	   ${RM} -f ex22_ciss_1.tmp
+
+<strong><font color="#FF0000">runex27_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex27 -nep_nev 3 -terse > ex27_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex27_1.out ex27_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex27_1, diffs above"</font>; fi; \
+	   ${RM} -f ex27_1.tmp
+
+<strong><font color="#FF0000">runex27_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex27 -split 0 -nep_nev 3 -terse > ex27_2.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex27_2.out ex27_2.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex27_2, diffs above"</font>; fi; \
+	   ${RM} -f ex27_2.tmp
+
 </pre>
 </body>
 
diff --git a/src/nep/examples/tutorials/output/ex21_1.out b/src/nep/examples/tutorials/output/ex21_1.out
index 249d814..ce52b2b 100644
--- a/src/nep/examples/tutorials/output/ex21_1.out
+++ b/src/nep/examples/tutorials/output/ex21_1.out
@@ -1,8 +1,6 @@
 
 1-D Nonlinear Eigenproblem, n=128
 
- Number of NEP iterations = 7
-
  Solution method: rii
  Number of requested eigenvalues: 1
  All requested eigenvalues computed up to the required tolerance:
diff --git a/src/nep/examples/tutorials/output/ex22_1.out b/src/nep/examples/tutorials/output/ex22_1.out
index a31e861..1f971e1 100644
--- a/src/nep/examples/tutorials/output/ex22_1.out
+++ b/src/nep/examples/tutorials/output/ex22_1.out
@@ -1,8 +1,6 @@
 
 1-D Delay Eigenproblem, n=128, tau=0.001
 
- Number of NEP iterations = 12
-
  Solution method: rii
  Number of requested eigenvalues: 1
  All requested eigenvalues computed up to the required tolerance:
diff --git a/src/nep/examples/tutorials/output/ex22_ciss_1.out b/src/nep/examples/tutorials/output/ex22_ciss_1.out
new file mode 100644
index 0000000..6481b66
--- /dev/null
+++ b/src/nep/examples/tutorials/output/ex22_ciss_1.out
@@ -0,0 +1,8 @@
+
+1-D Delay Eigenproblem, n=128, tau=0.001
+
+ Solution method: ciss
+ Number of requested eigenvalues: 1
+ Found 4 eigenvalues, all of them computed up to the required tolerance:
+     0.80889, 7.83700, 12.88864, 16.07384
+
diff --git a/src/nep/examples/tutorials/output/ex27_1.out b/src/nep/examples/tutorials/output/ex27_1.out
new file mode 100644
index 0000000..40c1fd5
--- /dev/null
+++ b/src/nep/examples/tutorials/output/ex27_1.out
@@ -0,0 +1,8 @@
+
+Square root eigenproblem, n=100 (in split form)
+
+ Solution method: nleigs
+ Number of requested eigenvalues: 3
+ All requested eigenvalues computed up to the required tolerance:
+     1.15063, 1.03635, 0.92988
+
diff --git a/src/nep/examples/tutorials/output/ex27_2.out b/src/nep/examples/tutorials/output/ex27_2.out
new file mode 100644
index 0000000..d7355ad
--- /dev/null
+++ b/src/nep/examples/tutorials/output/ex27_2.out
@@ -0,0 +1,8 @@
+
+Square root eigenproblem, n=100
+
+ Solution method: nleigs
+ Number of requested eigenvalues: 3
+ All requested eigenvalues computed up to the required tolerance:
+     1.15063, 1.03635, 0.92988
+
diff --git a/src/nep/f90-mod/index.html b/src/nep/f90-mod/index.html
index 47aff10..d6d594e 100644
--- a/src/nep/f90-mod/index.html
+++ b/src/nep/f90-mod/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/f90-mod/makefile b/src/nep/f90-mod/makefile
index 45242e1..78c209d 100644
--- a/src/nep/f90-mod/makefile
+++ b/src/nep/f90-mod/makefile
@@ -1,7 +1,7 @@
 
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/f90-mod/makefile.html b/src/nep/f90-mod/makefile.html
index 218f992..e738b34 100644
--- a/src/nep/f90-mod/makefile.html
+++ b/src/nep/f90-mod/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/f90-mod/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:27+00:00">
+<meta name="date" content="2016-05-16T10:34:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80">
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/f90-mod/slepcnepmod.F b/src/nep/f90-mod/slepcnepmod.F
index f39b797..76af86f 100644
--- a/src/nep/f90-mod/slepcnepmod.F
+++ b/src/nep/f90-mod/slepcnepmod.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
diff --git a/src/nep/f90-mod/slepcnepmod.F.html b/src/nep/f90-mod/slepcnepmod.F.html
index c7a4a37..bba2b7a 100644
--- a/src/nep/f90-mod/slepcnepmod.F.html
+++ b/src/nep/f90-mod/slepcnepmod.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/f90-mod/slepcnepmod.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:27+00:00">
+<meta name="date" content="2016-05-16T10:34:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/f90-mod/slepcnepmod.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/f90-mod/slepcnepmod.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
diff --git a/src/nep/impls/ciss/ftn-auto/ncissf.c b/src/nep/impls/ciss/ftn-auto/ncissf.c
index d6fd1b6..9576185 100644
--- a/src/nep/impls/ciss/ftn-auto/ncissf.c
+++ b/src/nep/impls/ciss/ftn-auto/ncissf.c
@@ -64,13 +64,13 @@ extern void PetscRmPointer(void*);
 #if defined(__cplusplus)
 extern "C" {
 #endif
-PETSC_EXTERN void PETSC_STDCALL  nepcisssetsizes_(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepcisssetsizes_(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats, int *__ierr ){
 *__ierr = NEPCISSSetSizes(
-	(NEP)PetscToPointer((nep) ),*ip,*bs,*ms,*npart,*bsmax,*isreal);
+	(NEP)PetscToPointer((nep) ),*ip,*bs,*ms,*npart,*bsmax,*realmats);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepcissgetsizes_(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepcissgetsizes_(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats, int *__ierr ){
 *__ierr = NEPCISSGetSizes(
-	(NEP)PetscToPointer((nep) ),ip,bs,ms,npart,bsmax,isreal);
+	(NEP)PetscToPointer((nep) ),ip,bs,ms,npart,bsmax,realmats);
 }
 PETSC_EXTERN void PETSC_STDCALL  nepcisssetthreshold_(NEP nep,PetscReal *delta,PetscReal *spur, int *__ierr ){
 *__ierr = NEPCISSSetThreshold(
@@ -80,13 +80,13 @@ PETSC_EXTERN void PETSC_STDCALL  nepcissgetthreshold_(NEP nep,PetscReal *delta,P
 *__ierr = NEPCISSGetThreshold(
 	(NEP)PetscToPointer((nep) ),delta,spur);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepcisssetrefinement_(NEP nep,PetscInt *inner,PetscInt *outer,PetscInt *blsize, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepcisssetrefinement_(NEP nep,PetscInt *inner,PetscInt *blsize, int *__ierr ){
 *__ierr = NEPCISSSetRefinement(
-	(NEP)PetscToPointer((nep) ),*inner,*outer,*blsize);
+	(NEP)PetscToPointer((nep) ),*inner,*blsize);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepcissgetrefinement_(NEP nep,PetscInt *inner,PetscInt *outer,PetscInt *blsize, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepcissgetrefinement_(NEP nep,PetscInt *inner,PetscInt *blsize, int *__ierr ){
 *__ierr = NEPCISSGetRefinement(
-	(NEP)PetscToPointer((nep) ),inner,outer,blsize);
+	(NEP)PetscToPointer((nep) ),inner,blsize);
 }
 #if defined(__cplusplus)
 }
diff --git a/src/nep/impls/ciss/index.html b/src/nep/impls/ciss/index.html
index 5e6e5cd..cb56c28 100644
--- a/src/nep/impls/ciss/index.html
+++ b/src/nep/impls/ciss/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/ciss/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/ciss/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/impls/ciss/makefile b/src/nep/impls/ciss/makefile
index d6adee6..d8364e1 100644
--- a/src/nep/impls/ciss/makefile
+++ b/src/nep/impls/ciss/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/impls/ciss/makefile.html b/src/nep/impls/ciss/makefile.html
index 1e73d4e..a9a07e8 100644
--- a/src/nep/impls/ciss/makefile.html
+++ b/src/nep/impls/ciss/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/ciss/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:24+00:00">
+<meta name="date" content="2016-05-16T10:34:28+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/ciss/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/ciss/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/impls/ciss/nciss.c b/src/nep/impls/ciss/nciss.c
index 02c006d..2231c11 100644
--- a/src/nep/impls/ciss/nciss.c
+++ b/src/nep/impls/ciss/nciss.c
@@ -23,7 +23,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -44,8 +44,6 @@
 #include <slepc/private/nepimpl.h>         /*I "slepcnep.h" I*/
 #include <slepcblaslapack.h>
 
-PetscErrorCode NEPSolve_CISS(NEP);
-
 typedef struct {
   /* parameters */
   PetscInt     N;          /* number of integration points (32) */
@@ -54,9 +52,8 @@ typedef struct {
   PetscReal    delta;      /* threshold of singular value (1e-12) */
   PetscInt     L_max;      /* maximum number of columns of the source matrix V */
   PetscReal    spurious_threshold; /* discard spurious eigenpairs */
-  PetscBool    isreal;     /* A and B are real */
+  PetscBool    isreal;     /* T(z) is real for real z */
   PetscInt     refine_inner;
-  PetscInt     refine_outer;
   PetscInt     refine_blocksize;
   /* private data */
   PetscReal    *sigma;     /* threshold for numerical rank */
@@ -108,11 +105,12 @@ static PetscErrorCode SetPathParameter(NEP nep)
   NEP_CISS       *ctx = (NEP_CISS*)nep->data;
   PetscInt       i;
   PetscScalar    center;
-  PetscReal      theta,radius,vscale;
+  PetscReal      theta,radius,vscale,rgscale;
   PetscBool      isellipse=PETSC_FALSE;
 
   PetscFunctionBegin;
   ierr = PetscObjectTypeCompare((PetscObject)nep->rg,RGELLIPSE,&isellipse);CHKERRQ(ierr);
+  ierr = RGGetScale(nep->rg,&rgscale);CHKERRQ(ierr);
   if (isellipse) {
     ierr = RGEllipseGetParameters(nep->rg,&center,&radius,&vscale);CHKERRQ(ierr);
   } else SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Region must be Ellipse");
@@ -120,14 +118,14 @@ static PetscErrorCode SetPathParameter(NEP nep)
     theta = ((2*PETSC_PI)/ctx->N)*(i+0.5);
     ctx->pp[i] = PetscCosReal(theta) + PETSC_i*vscale*PetscSinReal(theta);
     ctx->weight[i] = radius*(vscale*PetscCosReal(theta) + PETSC_i*PetscSinReal(theta))/(PetscReal)ctx->N;
-    ctx->omega[i] = center + radius*ctx->pp[i];
+    ctx->omega[i] = rgscale*(center + radius*ctx->pp[i]);
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "CISSVecSetRandom"
-static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom rctx)
+static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1)
 {
   PetscErrorCode ierr;
   PetscInt       i,j,nlocal;
@@ -137,7 +135,7 @@ static PetscErrorCode CISSVecSetRandom(BV V,PetscInt i0,PetscInt i1,PetscRandom
   PetscFunctionBegin;
   ierr = BVGetSizes(V,&nlocal,NULL,NULL);CHKERRQ(ierr);
   for (i=i0;i<i1;i++) {
-    ierr = BVSetRandomColumn(V,i,rctx);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(V,i);CHKERRQ(ierr);
     ierr = BVGetColumn(V,i,&x);CHKERRQ(ierr);
     ierr = VecGetArray(x,&vdata);CHKERRQ(ierr);
     for (j=0;j<nlocal;j++) {
@@ -179,14 +177,14 @@ static PetscErrorCode SolveLinearSystem(NEP nep,Mat T,Mat dT,BV V,PetscInt L_sta
       ierr = KSPSetOperators(ctx->ksp[i],ctx->kspMat[i],ctx->kspMat[i]);CHKERRQ(ierr);
       ierr = KSPSetType(ctx->ksp[i],KSPPREONLY);CHKERRQ(ierr);
       ierr = KSPGetPC(ctx->ksp[i],&pc);CHKERRQ(ierr);
-      ierr = PCSetType(pc,PCREDUNDANT);CHKERRQ(ierr);
+      ierr = PCSetType(pc,PCLU);CHKERRQ(ierr);
       ierr = KSPSetFromOptions(ctx->ksp[i]);CHKERRQ(ierr);
     } else if (ctx->usest) {
       ierr = MatCopy(T,Fz,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
       ierr = KSPSetOperators(ksp,Fz,Fz);CHKERRQ(ierr);
       ierr = KSPSetType(ksp,KSPPREONLY);CHKERRQ(ierr);
       ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
-      ierr = PCSetType(pc,PCREDUNDANT);CHKERRQ(ierr);
+      ierr = PCSetType(pc,PCLU);CHKERRQ(ierr);
       ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr);
     }
     for (j=L_start;j<L_end;j++) {
@@ -194,9 +192,9 @@ static PetscErrorCode SolveLinearSystem(NEP nep,Mat T,Mat dT,BV V,PetscInt L_sta
       ierr = BVGetColumn(ctx->Y,i*ctx->L_max+j,&yj);CHKERRQ(ierr);
       ierr = MatMult(dT,vj,Bvj);CHKERRQ(ierr);
       if (ctx->usest) {
-	ierr = KSPSolve(ksp,Bvj,yj);CHKERRQ(ierr);
+        ierr = KSPSolve(ksp,Bvj,yj);CHKERRQ(ierr);
       } else {
-	ierr = KSPSolve(ctx->ksp[i],Bvj,yj);CHKERRQ(ierr);
+        ierr = KSPSolve(ctx->ksp[i],Bvj,yj);CHKERRQ(ierr);
       }
       ierr = BVRestoreColumn(V,j,&vj);CHKERRQ(ierr);
       ierr = BVRestoreColumn(ctx->Y,i*ctx->L_max+j,&yj);CHKERRQ(ierr);
@@ -241,7 +239,7 @@ static PetscErrorCode EstimateNumberEigs(NEP nep,PetscInt *L_add)
     else sum += tmp;
   }
   ctx->est_eig = PetscAbsScalar(sum/(PetscReal)ctx->L);
-  eta = PetscPowReal(10,-PetscLog10Real(nep->rtol)/ctx->N);
+  eta = PetscPowReal(10,-PetscLog10Real(nep->tol)/ctx->N);
   ierr = PetscInfo1(nep,"Estimation_#Eig %f\n",(double)ctx->est_eig);CHKERRQ(ierr);
   *L_add = (PetscInt)PetscCeilReal((ctx->est_eig*eta)/ctx->M) - ctx->L;
   if (*L_add < 0) *L_add = 0;
@@ -259,7 +257,7 @@ static PetscErrorCode EstimateNumberEigs(NEP nep,PetscInt *L_add)
 static PetscErrorCode CalcMu(NEP nep, PetscScalar *Mu)
 {
   PetscErrorCode ierr;
-  PetscMPIInt    sub_size;
+  PetscMPIInt    sub_size,len;
   PetscInt       i,j,k,s;
   PetscScalar    *m,*temp,*temp2,*ppk,alp;
   NEP_CISS       *ctx = (NEP_CISS*)nep->data;
@@ -277,7 +275,7 @@ static PetscErrorCode CalcMu(NEP nep, PetscScalar *Mu)
   for (i=0;i<ctx->num_solve_point;i++) {
     for (j=0;j<ctx->L;j++) {
       for (k=0;k<ctx->L;k++) {
-	temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
+        temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
       }
     }
   }
@@ -297,7 +295,8 @@ static PetscErrorCode CalcMu(NEP nep, PetscScalar *Mu)
       ppk[i] *= ctx->pp[i*ctx->subcomm->n + ctx->subcomm_id];
   }
   for (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] /= sub_size;
-  ierr = MPI_Allreduce(temp2,Mu,2*ctx->M*ctx->L*ctx->L,MPIU_SCALAR,MPIU_SUM,(PetscObjectComm((PetscObject)nep)));CHKERRQ(ierr);
+  ierr = PetscMPIIntCast(2*ctx->M*ctx->L*ctx->L,&len);CHKERRQ(ierr);
+  ierr = MPI_Allreduce(temp2,Mu,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)nep));CHKERRQ(ierr);
   ierr = PetscFree3(temp,temp2,ppk);CHKERRQ(ierr);
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -314,7 +313,7 @@ static PetscErrorCode BlockHankel(NEP nep,PetscScalar *Mu,PetscInt s,PetscScalar
   for (k=0;k<L*M;k++)
     for (j=0;j<M;j++) 
       for (i=0;i<L;i++) 
-	H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
+        H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
   PetscFunctionReturn(0);
 }
 
@@ -322,7 +321,7 @@ static PetscErrorCode BlockHankel(NEP nep,PetscScalar *Mu,PetscInt s,PetscScalar
 #define __FUNCT__ "SVD_H0"
 static PetscErrorCode SVD_H0(NEP nep,PetscScalar *S,PetscInt *K)
 {
-#if defined(SLEPC_MISSING_LAPACK_GESVD)
+#if defined(PETSC_MISSING_LAPACK_GESVD)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD - Lapack routine is unavailable");
 #else
@@ -384,8 +383,8 @@ static PetscErrorCode ConstructS(NEP nep)
       ierr = VecSet(v,0);CHKERRQ(ierr);
       for (i=0;i<ctx->num_solve_point;i++) {
         p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-	ierr = BVSetActiveColumns(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);CHKERRQ(ierr);
-	ierr = BVMultVec(ctx->Y,ppk[i]*ctx->weight[p_id],1,v,&m);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);CHKERRQ(ierr);
+        ierr = BVMultVec(ctx->Y,ppk[i]*ctx->weight[p_id],1,v,&m);CHKERRQ(ierr);
       }
       if (ctx->useconj) {
         ierr = VecGetArray(v,&v_data);CHKERRQ(ierr);
@@ -449,19 +448,30 @@ PetscErrorCode NEPSetUp_CISS(NEP nep)
 {
   PetscErrorCode ierr;
   NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-  const char     *prefix;
-  PetscInt       i;
-  PetscBool      istrivial,isellipse;
+  PetscInt       i,nwork;
+  PetscBool      istrivial,isellipse,flg;
   PetscScalar    center;
 
   PetscFunctionBegin;
-  nep->ncv = PetscMin(nep->n,ctx->L*ctx->M);
+  if (!nep->ncv) nep->ncv = ctx->L_max*ctx->M;
+  else {
+    ctx->L_max = nep->ncv/ctx->M;
+    if (ctx->L_max == 0) {
+      ctx->L_max = 1;
+      nep->ncv = ctx->L_max*ctx->M;
+    }
+    if (ctx->L > ctx->L_max) ctx->L = ctx->L_max;
+  }
+  if (!nep->max_it) nep->max_it = 1;
   if (!nep->mpd) nep->mpd = nep->ncv;
-  if (!nep->which) nep->which = NEP_LARGEST_MAGNITUDE;
+  if (!nep->which) nep->which = NEP_ALL;
+  if (nep->stopping!=NEPStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"This solver does not support user-defined stopping test");
 
   /* check region */
   ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
-  if (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NEPCISS requires a nontrivial region, e.g. -rg_type ellipse ...");
+  if (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"CISS requires a nontrivial region, e.g. -rg_type ellipse ...");
+  ierr = RGGetComplement(nep->rg,&flg);CHKERRQ(ierr);
+  if (flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"A region with complement flag set is not allowed");
   ierr = PetscObjectTypeCompare((PetscObject)nep->rg,RGELLIPSE,&isellipse);CHKERRQ(ierr);
   if (!isellipse) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Currently only implemented for elliptic or arc regions");
   ierr = RGEllipseGetParameters(nep->rg,&center,NULL,NULL);CHKERRQ(ierr);
@@ -489,9 +499,8 @@ PetscErrorCode NEPSetUp_CISS(NEP nep)
       ierr = KSPCreate(PetscSubcommChild(ctx->subcomm),&ctx->ksp[i]);CHKERRQ(ierr);
       ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)nep,1);CHKERRQ(ierr);
       ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp[i]);CHKERRQ(ierr);
+      ierr = KSPSetOptionsPrefix(ctx->ksp[i],((PetscObject)nep)->prefix);CHKERRQ(ierr);
       ierr = KSPAppendOptionsPrefix(ctx->ksp[i],"nep_ciss_");CHKERRQ(ierr);
-      ierr = NEPGetOptionsPrefix(nep,&prefix);CHKERRQ(ierr);
-      ierr = KSPAppendOptionsPrefix(ctx->ksp[i],prefix);CHKERRQ(ierr);
       ierr = KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);CHKERRQ(ierr);
     }
   }
@@ -500,10 +509,8 @@ PetscErrorCode NEPSetUp_CISS(NEP nep)
 
   ierr = DSSetType(nep->ds,DSGNHEP);CHKERRQ(ierr);
   ierr = DSAllocate(nep->ds,nep->ncv);CHKERRQ(ierr);
-  ierr = NEPSetWorkVecs(nep,2);CHKERRQ(ierr);
-
-  /* dispatch solve method */
-  nep->ops->solve = NEPSolve_CISS;
+  nwork = (nep->fui==NEP_USER_INTERFACE_SPLIT)? 2: 1;
+  ierr = NEPSetWorkVecs(nep,nwork);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -514,32 +521,30 @@ PetscErrorCode NEPSolve_CISS(NEP nep)
   PetscErrorCode ierr;
   NEP_CISS       *ctx = (NEP_CISS*)nep->data;
   Mat            X,M;
-  PetscInt       i,j,ld,L_add=0,nv=0,L_base=ctx->L,inner,outer,nlocal,*inside;
+  PetscInt       i,j,ld,L_add=0,nv=0,L_base=ctx->L,inner,*inside;
   PetscScalar    *Mu,*H0,*H1,*rr,*temp,center;
-  PetscReal      error,max_error,radius;
+  PetscReal      error,max_error,radius,rgscale;
   PetscBool      *fl1;
-  Vec            si,w[3];
+  Vec            si;
   SlepcSC        sc;
+  PetscRandom    rand;
 
   PetscFunctionBegin;
-  w[0] = nep->work[0];
-  w[1] = NULL;
-  w[2] = nep->work[1];
   ierr = DSGetSlepcSC(nep->ds,&sc);CHKERRQ(ierr);
   sc->comparison    = SlepcCompareLargestMagnitude;
   sc->comparisonctx = NULL;
   sc->map           = NULL;
   sc->mapobj        = NULL;
-  ierr = VecGetLocalSize(w[0],&nlocal);CHKERRQ(ierr);
   ierr = DSGetLeadingDimension(nep->ds,&ld);CHKERRQ(ierr);
   ierr = SetPathParameter(nep);CHKERRQ(ierr);
-  ierr = CISSVecSetRandom(ctx->V,0,ctx->L,nep->rand);CHKERRQ(ierr);
+  ierr = CISSVecSetRandom(ctx->V,0,ctx->L);CHKERRQ(ierr);
+  ierr = BVGetRandomContext(ctx->V,&rand);CHKERRQ(ierr);
 
   ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_TRUE);CHKERRQ(ierr);
   ierr = EstimateNumberEigs(nep,&L_add);CHKERRQ(ierr);
   if (L_add>0) {
     ierr = PetscInfo2(nep,"Changing L %D -> %D by Estimate #Eig\n",ctx->L,ctx->L+L_add);CHKERRQ(ierr);
-    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,nep->rand);CHKERRQ(ierr);
+    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);CHKERRQ(ierr);
     ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);CHKERRQ(ierr);
     ctx->L += L_add;
   }
@@ -552,23 +557,27 @@ PetscErrorCode NEPSolve_CISS(NEP nep)
     L_add = L_base;
     if (ctx->L+L_add>ctx->L_max) L_add = ctx->L_max-ctx->L;
     ierr = PetscInfo2(nep,"Changing L %D -> %D by SVD(H0)\n",ctx->L,ctx->L+L_add);CHKERRQ(ierr);
-    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,nep->rand);CHKERRQ(ierr);
+    ierr = CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);CHKERRQ(ierr);
     ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);CHKERRQ(ierr);
     ctx->L += L_add;
   }
   ierr = PetscFree2(Mu,H0);CHKERRQ(ierr);
 
+  ierr = RGGetScale(nep->rg,&rgscale);CHKERRQ(ierr);
+  ierr = RGEllipseGetParameters(nep->rg,&center,&radius,NULL);CHKERRQ(ierr);
+
   ierr = PetscMalloc3(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0,ctx->L*ctx->M*ctx->L*ctx->M,&H1);CHKERRQ(ierr);
-  for (outer=0;outer<=ctx->refine_outer;outer++) {
+  while (nep->reason == NEP_CONVERGED_ITERATING) {
+    nep->its++;
     for (inner=0;inner<=ctx->refine_inner;inner++) {
       ierr = CalcMu(nep,Mu);CHKERRQ(ierr);
       ierr = BlockHankel(nep,Mu,0,H0);CHKERRQ(ierr);
       ierr = SVD_H0(nep,H0,&nv);CHKERRQ(ierr);
       if (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
-	ierr = ConstructS(nep);CHKERRQ(ierr);
-	ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
-	ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
-	ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
+        ierr = ConstructS(nep);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
+        ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
+        ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
       } else break;
     }
 
@@ -581,20 +590,19 @@ PetscErrorCode NEPSolve_CISS(NEP nep)
     ierr = DSGetArray(nep->ds,DS_MAT_A,&temp);CHKERRQ(ierr);
     for (j=0;j<nv;j++)
       for (i=0;i<nv;i++)
-	temp[i+j*ld] = H1[i+j*ctx->L*ctx->M];
+        temp[i+j*ld] = H1[i+j*ctx->L*ctx->M];
     ierr = DSRestoreArray(nep->ds,DS_MAT_A,&temp);CHKERRQ(ierr);
     ierr = DSGetArray(nep->ds,DS_MAT_B,&temp);CHKERRQ(ierr);
     for (j=0;j<nv;j++) 
       for (i=0;i<nv;i++)
-	temp[i+j*ld] = H0[i+j*ctx->L*ctx->M];
+        temp[i+j*ld] = H0[i+j*ctx->L*ctx->M];
     ierr = DSRestoreArray(nep->ds,DS_MAT_B,&temp);CHKERRQ(ierr);
     ierr = DSSolve(nep->ds,nep->eigr,nep->eigi);CHKERRQ(ierr);
     ierr = DSVectors(nep->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
-    ierr = RGEllipseGetParameters(nep->rg,&center,&radius,NULL);CHKERRQ(ierr);
     for (i=0;i<nv;i++){
-      nep->eigr[i] = nep->eigr[i]*radius+center;
+      nep->eigr[i] = (nep->eigr[i]*radius+center)*rgscale;
 #if !defined(PETSC_USE_COMPLEX)
-      nep->eigi[i] = nep->eigi[i]*radius;
+      nep->eigi[i] = nep->eigi[i]*radius*rgscale;
 #endif
     }
     ierr = PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);CHKERRQ(ierr);
@@ -608,9 +616,9 @@ PetscErrorCode NEPSolve_CISS(NEP nep)
     }
     ierr = DSSort(nep->ds,nep->eigr,nep->eigi,rr,NULL,&nep->nconv);CHKERRQ(ierr);
     for (i=0;i<nv;i++){
-      nep->eigr[i] = nep->eigr[i]*radius+center;
+      nep->eigr[i] = (nep->eigr[i]*radius+center)*rgscale;
 #if !defined(PETSC_USE_COMPLEX)
-      nep->eigi[i] = nep->eigi[i]*radius;
+      nep->eigi[i] = nep->eigi[i]*radius*rgscale;
 #endif
     }
     ierr = PetscFree3(fl1,inside,rr);CHKERRQ(ierr);
@@ -628,36 +636,38 @@ PetscErrorCode NEPSolve_CISS(NEP nep)
     for (i=0;i<nep->nconv;i++) {
       ierr = BVGetColumn(nep->V,i,&si);CHKERRQ(ierr);
       ierr = VecNormalize(si,NULL);CHKERRQ(ierr);
-      ierr = NEPComputeResidualNorm_Private(nep,nep->eigr[i],si,w,&error);CHKERRQ(ierr);
+      ierr = NEPComputeResidualNorm_Private(nep,nep->eigr[i],si,nep->work,&error);CHKERRQ(ierr);
+      ierr = (*nep->converged)(nep,nep->eigr[i],0,error,&error,nep->convergedctx);CHKERRQ(ierr);
       ierr = BVRestoreColumn(nep->V,i,&si);CHKERRQ(ierr);
       max_error = PetscMax(max_error,error);
     }
-    if (max_error <= nep->rtol || outer == ctx->refine_outer) break;
-
-    if (nep->nconv > ctx->L) nv = nep->nconv;
-    else if (ctx->L > nv) nv = ctx->L;
-    ierr = MatCreateSeqDense(PETSC_COMM_SELF,nv,ctx->L,NULL,&M);CHKERRQ(ierr);
-    ierr = MatDenseGetArray(M,&temp);CHKERRQ(ierr);
-    for (i=0;i<ctx->L*nv;i++) {
-      ierr = PetscRandomGetValue(nep->rand,&temp[i]);CHKERRQ(ierr);
-      temp[i] = PetscRealPart(temp[i]);
+    if (max_error <= nep->tol) nep->reason = NEP_CONVERGED_TOL;
+    else if (nep->its > nep->max_it) nep->reason = NEP_DIVERGED_ITS;
+    else {
+      if (nep->nconv > ctx->L) nv = nep->nconv;
+      else if (ctx->L > nv) nv = ctx->L;
+      ierr = MatCreateSeqDense(PETSC_COMM_SELF,nv,ctx->L,NULL,&M);CHKERRQ(ierr);
+      ierr = MatDenseGetArray(M,&temp);CHKERRQ(ierr);
+      for (i=0;i<ctx->L*nv;i++) {
+        ierr = PetscRandomGetValue(rand,&temp[i]);CHKERRQ(ierr);
+        temp[i] = PetscRealPart(temp[i]);
+      }
+      ierr = MatDenseRestoreArray(M,&temp);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
+      ierr = BVMultInPlace(ctx->S,M,0,ctx->L);CHKERRQ(ierr);
+      ierr = MatDestroy(&M);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
+      ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
+      ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
     }
-    ierr = MatDenseRestoreArray(M,&temp);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(ctx->S,0,nv);CHKERRQ(ierr);
-    ierr = BVMultInPlace(ctx->S,M,0,ctx->L);CHKERRQ(ierr);
-    ierr = MatDestroy(&M);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(ctx->S,0,ctx->L);CHKERRQ(ierr);
-    ierr = BVCopy(ctx->S,ctx->V);CHKERRQ(ierr);
-    ierr = SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);CHKERRQ(ierr);
   }
   ierr = PetscFree3(Mu,H0,H1);CHKERRQ(ierr);  
-  nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPCISSSetSizes_CISS"
-static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)
+static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)
 {
   NEP_CISS *ctx = (NEP_CISS*)nep->data;
 
@@ -696,7 +706,7 @@ static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,Petsc
     if (bsmax<ctx->L) ctx->L_max = ctx->L;
     else ctx->L_max = bsmax;
   }
-  ctx->isreal = isreal;
+  ctx->isreal = realmats;
   PetscFunctionReturn(0);
 }
 
@@ -714,7 +724,7 @@ static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,Petsc
 .  ms    - moment size
 .  npart - number of partitions when splitting the communicator
 .  bsmax - max block size
--  isreal - A and B are real
+-  realmats - T(z) is real for real z
 
    Options Database Keys:
 +  -nep_ciss_integration_points - Sets the number of integration points
@@ -722,18 +732,22 @@ static PetscErrorCode NEPCISSSetSizes_CISS(NEP nep,PetscInt ip,PetscInt bs,Petsc
 .  -nep_ciss_moments - Sets the moment size
 .  -nep_ciss_partitions - Sets the number of partitions
 .  -nep_ciss_maxblocksize - Sets the maximum block size
--  -nep_ciss_realmats - A and B are real
+-  -nep_ciss_realmats - T(z) is real for real z
 
    Note:
    The default number of partitions is 1. This means the internal KSP object is shared
    among all processes of the NEP communicator. Otherwise, the communicator is split
    into npart communicators, so that npart KSP solves proceed simultaneously.
 
+   The realmats flag can be set to true when T(.) is guaranteed to be real
+   when the argument is a real value, for example, when all matrices in
+   the split form are real. When set to true, the solver avoids some computations.
+
    Level: advanced
 
 .seealso: NEPCISSGetSizes()
 @*/
-PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)
+PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)
 {
   PetscErrorCode ierr;
 
@@ -744,14 +758,14 @@ PetscErrorCode NEPCISSSetSizes(NEP nep,PetscInt ip,PetscInt bs,PetscInt ms,Petsc
   PetscValidLogicalCollectiveInt(nep,ms,4);
   PetscValidLogicalCollectiveInt(nep,npart,5);
   PetscValidLogicalCollectiveInt(nep,bsmax,6);
-  PetscValidLogicalCollectiveBool(nep,isreal,7);
-  ierr = PetscTryMethod(nep,"NEPCISSSetSizes_C",(NEP,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(nep,ip,bs,ms,npart,bsmax,isreal));CHKERRQ(ierr);
+  PetscValidLogicalCollectiveBool(nep,realmats,7);
+  ierr = PetscTryMethod(nep,"NEPCISSSetSizes_C",(NEP,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(nep,ip,bs,ms,npart,bsmax,realmats));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPCISSGetSizes_CISS"
-static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)
+static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)
 {
   NEP_CISS *ctx = (NEP_CISS*)nep->data;
 
@@ -761,7 +775,7 @@ static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,Pet
   if (ms) *ms = ctx->M;
   if (npart) *npart = ctx->num_subcomm;
   if (bsmax) *bsmax = ctx->L_max;
-  if (isreal) *isreal = ctx->isreal;
+  if (realmats) *realmats = ctx->isreal;
   PetscFunctionReturn(0);
 }
 
@@ -781,19 +795,19 @@ static PetscErrorCode NEPCISSGetSizes_CISS(NEP nep,PetscInt *ip,PetscInt *bs,Pet
 .  ms    - moment size
 .  npart - number of partitions when splitting the communicator
 .  bsmax - max block size
--  isreal - A and B are real
+-  realmats - T(z) is real for real z
 
    Level: advanced
 
 .seealso: NEPCISSSetSizes()
 @*/
-PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)
+PetscErrorCode NEPCISSGetSizes(NEP nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  ierr = PetscTryMethod(nep,"NEPCISSGetSizes_C",(NEP,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(nep,ip,bs,ms,npart,bsmax,isreal));CHKERRQ(ierr);
+  ierr = PetscUseMethod(nep,"NEPCISSGetSizes_C",(NEP,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(nep,ip,bs,ms,npart,bsmax,realmats));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -889,13 +903,13 @@ PetscErrorCode NEPCISSGetThreshold(NEP nep,PetscReal *delta,PetscReal *spur)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  ierr = PetscTryMethod(nep,"NEPCISSGetThreshold_C",(NEP,PetscReal*,PetscReal*),(nep,delta,spur));CHKERRQ(ierr);
+  ierr = PetscUseMethod(nep,"NEPCISSGetThreshold_C",(NEP,PetscReal*,PetscReal*),(nep,delta,spur));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPCISSSetRefinement_CISS"
-static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt outer,PetscInt blsize)
+static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt blsize)
 {
   NEP_CISS *ctx = (NEP_CISS*)nep->data;
 
@@ -906,12 +920,6 @@ static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt
     if (inner<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"The refine inner argument must be >= 0");
     ctx->refine_inner = inner;
   }
-  if (outer == PETSC_DEFAULT) {
-    ctx->refine_outer = 0;
-  } else {
-    if (outer<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"The refine outer argument must be >= 0");
-    ctx->refine_outer = outer;
-  }
   if (blsize == PETSC_DEFAULT) {
     ctx->refine_blocksize = 0;
   } else {
@@ -932,40 +940,36 @@ static PetscErrorCode NEPCISSSetRefinement_CISS(NEP nep,PetscInt inner,PetscInt
    Input Parameters:
 +  nep    - the eigenproblem solver context
 .  inner  - number of iterative refinement iterations (inner loop)
-.  outer  - number of iterative refinement iterations (outer loop)
 -  blsize - number of iterative refinement iterations (blocksize loop)
 
    Options Database Keys:
 +  -nep_ciss_refine_inner - Sets number of inner iterations
-.  -nep_ciss_refine_outer - Sets number of outer iterations
 -  -nep_ciss_refine_blocksize - Sets number of blocksize iterations
 
    Level: advanced
 
 .seealso: NEPCISSGetRefinement()
 @*/
-PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt outer,PetscInt blsize)
+PetscErrorCode NEPCISSSetRefinement(NEP nep,PetscInt inner,PetscInt blsize)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidLogicalCollectiveInt(nep,inner,2);
-  PetscValidLogicalCollectiveInt(nep,outer,3);
-  PetscValidLogicalCollectiveInt(nep,blsize,4);
-  ierr = PetscTryMethod(nep,"NEPCISSSetRefinement_C",(NEP,PetscInt,PetscInt,PetscInt),(nep,inner,outer,blsize));CHKERRQ(ierr);
+  PetscValidLogicalCollectiveInt(nep,blsize,3);
+  ierr = PetscTryMethod(nep,"NEPCISSSetRefinement_C",(NEP,PetscInt,PetscInt),(nep,inner,blsize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPCISSGetRefinement_CISS"
-static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt *outer,PetscInt *blsize)
+static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt *blsize)
 {
   NEP_CISS *ctx = (NEP_CISS*)nep->data;
 
   PetscFunctionBegin;
   if (inner)  *inner = ctx->refine_inner;
-  if (outer)  *outer = ctx->refine_outer;
   if (blsize) *blsize = ctx->refine_blocksize;
   PetscFunctionReturn(0);
 }
@@ -983,20 +987,19 @@ static PetscErrorCode NEPCISSGetRefinement_CISS(NEP nep,PetscInt *inner,PetscInt
 
    Output Parameters:
 +  inner  - number of iterative refinement iterations (inner loop)
-.  outer  - number of iterative refinement iterations (outer loop)
 -  blsize - number of iterative refinement iterations (blocksize loop)
 
    Level: advanced
 
 .seealso: NEPCISSSetRefinement()
 @*/
-PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *outer,PetscInt *blsize)
+PetscErrorCode NEPCISSGetRefinement(NEP nep, PetscInt *inner, PetscInt *blsize)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  ierr = PetscTryMethod(nep,"NEPCISSGetRefinement_C",(NEP,PetscInt*,PetscInt*,PetscInt*),(nep,inner,outer,blsize));CHKERRQ(ierr);
+  ierr = PetscUseMethod(nep,"NEPCISSGetRefinement_C",(NEP,PetscInt*,PetscInt*),(nep,inner,blsize));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1028,11 +1031,11 @@ PetscErrorCode NEPReset_CISS(NEP nep)
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSetFromOptions_CISS"
-PetscErrorCode NEPSetFromOptions_CISS(PetscOptions *PetscOptionsObject,NEP nep)
+PetscErrorCode NEPSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,NEP nep)
 {
   PetscErrorCode ierr;
   PetscReal      r1,r2;
-  PetscInt       i1,i2,i3,i4,i5,i6,i7,i8;
+  PetscInt       i1,i2,i3,i4,i5,i6,i7;
   PetscBool      b1;
 
   PetscFunctionBegin;
@@ -1044,21 +1047,20 @@ PetscErrorCode NEPSetFromOptions_CISS(PetscOptions *PetscOptionsObject,NEP nep)
   ierr = PetscOptionsInt("-nep_ciss_moments","CISS moment size","NEPCISSSetSizes",i3,&i3,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsInt("-nep_ciss_partitions","CISS number of partitions","NEPCISSSetSizes",i4,&i4,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsInt("-nep_ciss_maxblocksize","CISS maximum block size","NEPCISSSetSizes",i5,&i5,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsBool("-nep_ciss_realmats","CISS A and B are real","NEPCISSSetSizes",b1,&b1,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsBool("-nep_ciss_realmats","CISS flag indicating that T(z) is real for real z","NEPCISSSetSizes",b1,&b1,NULL);CHKERRQ(ierr);
   ierr = NEPCISSSetSizes(nep,i1,i2,i3,i4,i5,b1);CHKERRQ(ierr);
 
   ierr = NEPCISSGetThreshold(nep,&r1,&r2);CHKERRQ(ierr);
   ierr = PetscOptionsReal("-nep_ciss_delta","CISS threshold for numerical rank","NEPCISSSetThreshold",r1,&r1,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsReal("-nep_ciss_spurious_threshold","CISS threshold for the spurious eigenpairs","NEPCISSSetThreshold",r2,&r2,NULL);CHKERRQ(ierr);
   ierr = NEPCISSSetThreshold(nep,r1,r2);CHKERRQ(ierr);
-  ierr = PetscOptionsTail();CHKERRQ(ierr);
 
-  ierr = NEPCISSGetRefinement(nep,&i6,&i7,&i8);CHKERRQ(ierr);
+  ierr = NEPCISSGetRefinement(nep,&i6,&i7);CHKERRQ(ierr);
   ierr = PetscOptionsInt("-nep_ciss_refine_inner","CISS number of inner iterative refinement iterations","NEPCISSSetRefinement",i6,&i6,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsInt("-nep_ciss_refine_outer","CISS number of outer iterative refinement iterations","NEPCISSSetRefinement",i7,&i7,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsInt("-nep_ciss_refine_blocksize","CISS number of blocksize iterative refinement iterations","NEPCISSSetRefinement",i8,&i8,NULL);CHKERRQ(ierr);
-  ierr = NEPCISSSetRefinement(nep,i6,i7,i8);CHKERRQ(ierr);
+  ierr = PetscOptionsInt("-nep_ciss_refine_blocksize","CISS number of blocksize iterative refinement iterations","NEPCISSSetRefinement",i7,&i7,NULL);CHKERRQ(ierr);
+  ierr = NEPCISSSetRefinement(nep,i6,i7);CHKERRQ(ierr);
 
+  ierr = PetscOptionsTail();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1095,9 +1097,9 @@ PetscErrorCode NEPView_CISS(NEP nep,PetscViewer viewer)
       ierr = PetscViewerASCIIPrintf(viewer,"  CISS: exploiting symmetry of integration points\n");CHKERRQ(ierr);
     }
     ierr = PetscViewerASCIIPrintf(viewer,"  CISS: threshold { delta: %g, spurious threshold: %g }\n",(double)ctx->delta,(double)ctx->spurious_threshold);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  CISS: iterative refinement  { inner: %D, outer: %D, blocksize: %D }\n",ctx->refine_inner,ctx->refine_outer, ctx->refine_blocksize);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  CISS: iterative refinement  { inner: %D, blocksize: %D }\n",ctx->refine_inner, ctx->refine_blocksize);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-    /*ierr = KSPView(ctx->ksp[0],viewer);CHKERRQ(ierr);*/
+    if (!ctx->usest && ctx->ksp[0]) { ierr = KSPView(ctx->ksp[0],viewer);CHKERRQ(ierr); }
     ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
@@ -1134,9 +1136,8 @@ PETSC_EXTERN PetscErrorCode NEPCreate_CISS(NEP nep)
   ctx->spurious_threshold = 1e-4;
   ctx->usest   = PETSC_FALSE;
   ctx->isreal  = PETSC_FALSE;
-  ctx->refine_outer = 1;
-  ctx->refine_inner = 1;
-  ctx->refine_blocksize = 1;
+  ctx->refine_inner = 0;
+  ctx->refine_blocksize = 0;
   ctx->num_subcomm = 1;
   PetscFunctionReturn(0);
 }
diff --git a/src/nep/impls/ciss/nciss.c.html b/src/nep/impls/ciss/nciss.c.html
index 9a12bc0..c2e17e3 100644
--- a/src/nep/impls/ciss/nciss.c.html
+++ b/src/nep/impls/ciss/nciss.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/ciss/nciss.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:22+00:00">
+<meta name="date" content="2016-05-16T10:34:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/ciss/nciss.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/ciss/nciss.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc eigensolver: "ciss"</font>
@@ -35,7 +35,7 @@
 
 <a name="line24"> 24: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line25"> 25: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line26"> 26: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line26"> 26: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line28"> 28: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -56,975 +56,977 @@
 <a name="line44"> 44: </a><font color="#A020F0">#include <slepc/private/nepimpl.h>         </font><font color="#B22222">/*I "slepcnep.h" I*/</font><font color="#A020F0"></font>
 <a name="line45"> 45: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
 
-<a name="line47"> 47: </a><strong><font color="#4169E1">PetscErrorCode NEPSolve_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
-
-<a name="line49"> 49: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line50"> 50: </a>  <font color="#B22222">/* parameters */</font>
-<a name="line51"> 51: </a>  PetscInt     N;          <font color="#B22222">/* number of integration points (32) */</font>
-<a name="line52"> 52: </a>  PetscInt     L;          <font color="#B22222">/* block size (16) */</font>
-<a name="line53"> 53: </a>  PetscInt     M;          <font color="#B22222">/* moment degree (N/4 = 4) */</font>
-<a name="line54"> 54: </a>  PetscReal    delta;      <font color="#B22222">/* threshold of singular value (1e-12) */</font>
-<a name="line55"> 55: </a>  PetscInt     L_max;      <font color="#B22222">/* maximum number of columns of the source matrix V */</font>
-<a name="line56"> 56: </a>  PetscReal    spurious_threshold; <font color="#B22222">/* discard spurious eigenpairs */</font>
-<a name="line57"> 57: </a>  PetscBool    isreal;     <font color="#B22222">/* A and B are real */</font>
-<a name="line58"> 58: </a>  PetscInt     refine_inner;
-<a name="line59"> 59: </a>  PetscInt     refine_outer;
-<a name="line60"> 60: </a>  PetscInt     refine_blocksize;
-<a name="line61"> 61: </a>  <font color="#B22222">/* private data */</font>
-<a name="line62"> 62: </a>  PetscReal    *sigma;     <font color="#B22222">/* threshold for numerical rank */</font>
-<a name="line63"> 63: </a>  PetscInt     num_subcomm;
-<a name="line64"> 64: </a>  PetscInt     subcomm_id;
-<a name="line65"> 65: </a>  PetscInt     num_solve_point;
-<a name="line66"> 66: </a>  PetscScalar  *weight;
-<a name="line67"> 67: </a>  PetscScalar  *omega;
-<a name="line68"> 68: </a>  PetscScalar  *pp;
-<a name="line69"> 69: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V;
-<a name="line70"> 70: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           S;
-<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           Y;
-<a name="line72"> 72: </a>  KSP          *ksp;
-<a name="line73"> 73: </a>  Mat          *kspMat;
-<a name="line74"> 74: </a>  PetscBool    useconj;
-<a name="line75"> 75: </a>  PetscReal    est_eig;
-<a name="line76"> 76: </a>  PetscSubcomm subcomm;
-<a name="line77"> 77: </a>  PetscBool    usest;
-<a name="line78"> 78: </a>} NEP_CISS;
-
-<a name="line82"> 82: </a><strong><font color="#4169E1"><a name="SetSolverComm"></a>static PetscErrorCode SetSolverComm(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line83"> 83: </a>{
-<a name="line85"> 85: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line86"> 86: </a>  PetscInt       N = ctx->N;
-
-<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (ctx->useconj) N = N/2;
-<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (!ctx->subcomm) {
-<a name="line91"> 91: </a>    PetscSubcommCreate(PetscObjectComm((PetscObject)nep),&ctx->subcomm);
-<a name="line92"> 92: </a>    PetscSubcommSetNumber(ctx->subcomm,ctx->num_subcomm);
-<a name="line93"> 93: </a>    PetscSubcommSetType(ctx->subcomm,PETSC_SUBCOMM_INTERLACED);
-<a name="line94"> 94: </a>    PetscLogObjectMemory((PetscObject)nep,<font color="#4169E1">sizeof</font>(PetscSubcomm));
-<a name="line95"> 95: </a>    PetscSubcommSetFromOptions(ctx->subcomm);
-<a name="line96"> 96: </a>  }
-<a name="line97"> 97: </a>  ctx->subcomm_id = ctx->subcomm->color;
-<a name="line98"> 98: </a>  ctx->num_solve_point = N / ctx->num_subcomm;
-<a name="line99"> 99: </a>  <font color="#4169E1">if</font> ((N%ctx->num_subcomm) > ctx->subcomm_id) ctx->num_solve_point+=1;
-<a name="line100">100: </a>  <font color="#4169E1">return</font>(0);
-<a name="line101">101: </a>}
-
-<a name="line105">105: </a><strong><font color="#4169E1"><a name="SetPathParameter"></a>static PetscErrorCode SetPathParameter(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line106">106: </a>{
-<a name="line108">108: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line109">109: </a>  PetscInt       i;
-<a name="line110">110: </a>  PetscScalar    center;
-<a name="line111">111: </a>  PetscReal      theta,radius,vscale;
-<a name="line112">112: </a>  PetscBool      isellipse=PETSC_FALSE;
-
-<a name="line115">115: </a>  PetscObjectTypeCompare((PetscObject)nep->rg,RGELLIPSE,&isellipse);
-<a name="line116">116: </a>  <font color="#4169E1">if</font> (isellipse) {
-<a name="line117">117: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(nep->rg,&center,&radius,&vscale);
-<a name="line118">118: </a>  } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Region must be Ellipse"</font>);
-<a name="line119">119: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
-<a name="line120">120: </a>    theta = ((2*PETSC_PI)/ctx->N)*(i+0.5);
-<a name="line121">121: </a>    ctx->pp[i] = PetscCosReal(theta) + PETSC_i*vscale*PetscSinReal(theta);
-<a name="line122">122: </a>    ctx->weight[i] = radius*(vscale*PetscCosReal(theta) + PETSC_i*PetscSinReal(theta))/(PetscReal)ctx->N;
-<a name="line123">123: </a>    ctx->omega[i] = center + radius*ctx->pp[i];
-<a name="line124">124: </a>  }
-<a name="line125">125: </a>  <font color="#4169E1">return</font>(0);
-<a name="line126">126: </a>}
-
-<a name="line130">130: </a><strong><font color="#4169E1"><a name="CISSVecSetRandom"></a>static PetscErrorCode CISSVecSetRandom(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt i0,PetscInt i1,PetscRandom rctx)</font></strong>
-<a name="line131">131: </a>{
-<a name="line133">133: </a>  PetscInt       i,j,nlocal;
-<a name="line134">134: </a>  PetscScalar    *vdata;
-<a name="line135">135: </a>  Vec            x;
-
-<a name="line138">138: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(V,&nlocal,NULL,NULL);
-<a name="line139">139: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
-<a name="line140">140: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(V,i,rctx);
-<a name="line141">141: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&x);
-<a name="line142">142: </a>    VecGetArray(x,&vdata);
-<a name="line143">143: </a>    <font color="#4169E1">for</font> (j=0;j<nlocal;j++) {
-<a name="line144">144: </a>      vdata[j] = PetscRealPart(vdata[j]);
-<a name="line145">145: </a>      <font color="#4169E1">if</font> (PetscRealPart(vdata[j]) < 0.5) vdata[j] = -1.0;
-<a name="line146">146: </a>      <font color="#4169E1">else</font> vdata[j] = 1.0;
-<a name="line147">147: </a>    }
-<a name="line148">148: </a>    VecRestoreArray(x,&vdata);
-<a name="line149">149: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&x);
-<a name="line150">150: </a>  }
-<a name="line151">151: </a>  <font color="#4169E1">return</font>(0);
-<a name="line152">152: </a>}
-
-<a name="line156">156: </a><strong><font color="#4169E1"><a name="SolveLinearSystem"></a>static PetscErrorCode SolveLinearSystem(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat T,Mat dT,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt L_start,PetscInt L_end,PetscBool initksp)</font></strong>
-<a name="line157">157: </a>{
-<a name="line159">159: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line160">160: </a>  PetscInt       i,j,p_id;
-<a name="line161">161: </a>  Mat            Fz;
-<a name="line162">162: </a>  PC             pc;
-<a name="line163">163: </a>  Vec            Bvj,vj,yj;
-<a name="line164">164: </a>  KSP            ksp;
-
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line168">168: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,0,T,T);
-<a name="line169">169: </a>    MatDuplicate(T,MAT_DO_NOT_COPY_VALUES,&Fz);
-<a name="line170">170: </a>    KSPCreate(PetscObjectComm((PetscObject)nep),&ksp);
-<a name="line171">171: </a>  }
-<a name="line172">172: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,&Bvj);
-<a name="line173">173: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line174">174: </a>    p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line175">175: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,ctx->omega[p_id],T,T);
-<a name="line176">176: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(nep,ctx->omega[p_id],dT);
-<a name="line177">177: </a>    <font color="#4169E1">if</font> (!ctx->usest && initksp == PETSC_TRUE) {
-<a name="line178">178: </a>      MatDuplicate(T,MAT_COPY_VALUES,&ctx->kspMat[i]);
-<a name="line179">179: </a>      KSPSetOperators(ctx->ksp[i],ctx->kspMat[i],ctx->kspMat[i]);
-<a name="line180">180: </a>      KSPSetType(ctx->ksp[i],KSPPREONLY);
-<a name="line181">181: </a>      KSPGetPC(ctx->ksp[i],&pc);
-<a name="line182">182: </a>      PCSetType(pc,PCREDUNDANT);
-<a name="line183">183: </a>      KSPSetFromOptions(ctx->ksp[i]);
-<a name="line184">184: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line185">185: </a>      MatCopy(T,Fz,DIFFERENT_NONZERO_PATTERN);
-<a name="line186">186: </a>      KSPSetOperators(ksp,Fz,Fz);
-<a name="line187">187: </a>      KSPSetType(ksp,KSPPREONLY);
-<a name="line188">188: </a>      KSPGetPC(ksp,&pc);
-<a name="line189">189: </a>      PCSetType(pc,PCREDUNDANT);
-<a name="line190">190: </a>      KSPSetFromOptions(ksp);
-<a name="line191">191: </a>    }
-<a name="line192">192: </a>    <font color="#4169E1">for</font> (j=L_start;j<L_end;j++) {
-<a name="line193">193: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&vj);
-<a name="line194">194: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
-<a name="line195">195: </a>      MatMult(dT,vj,Bvj);
-<a name="line196">196: </a>      <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line197">197: </a>        KSPSolve(ksp,Bvj,yj);
-<a name="line198">198: </a>      } <font color="#4169E1">else</font> {
-<a name="line199">199: </a>        KSPSolve(ctx->ksp[i],Bvj,yj);
-<a name="line200">200: </a>      }
-<a name="line201">201: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&vj);
-<a name="line202">202: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
-<a name="line203">203: </a>    }
-<a name="line204">204: </a>    <font color="#4169E1">if</font> (ctx->usest && i<ctx->num_solve_point-1) {  KSPReset(ksp); }
-<a name="line205">205: </a>  }
-<a name="line206">206: </a>  <font color="#4169E1">if</font> (ctx->usest) {
-<a name="line207">207: </a>    MatDestroy(&Fz);
-<a name="line208">208: </a>    KSPDestroy(&ksp);
-<a name="line209">209: </a>  }
-<a name="line210">210: </a>  VecDestroy(&Bvj);
-<a name="line211">211: </a>  <font color="#4169E1">return</font>(0);
-<a name="line212">212: </a>}
-
-<a name="line216">216: </a><strong><font color="#4169E1"><a name="EstimateNumberEigs"></a>static PetscErrorCode EstimateNumberEigs(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *L_add)</font></strong>
-<a name="line217">217: </a>{
-<a name="line219">219: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line220">220: </a>  PetscInt       i,j,p_id;
-<a name="line221">221: </a>  PetscScalar    tmp,m = 1,sum = 0.0;
-<a name="line222">222: </a>  PetscReal      eta;
-<a name="line223">223: </a>  Vec            v,vtemp,vj,yj;
-
-<a name="line226">226: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
-<a name="line227">227: </a>  VecDuplicate(yj,&v);
-<a name="line228">228: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
-<a name="line229">229: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(ctx->V,&vtemp);
-<a name="line230">230: </a>  <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line231">231: </a>    VecSet(v,0);
-<a name="line232">232: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point; i++) {
-<a name="line233">233: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line234">234: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
-<a name="line235">235: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ctx->weight[p_id],1,v,&m);
-<a name="line236">236: </a>    }
-<a name="line237">237: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->V,j,&vj);
-<a name="line238">238: </a>    VecDot(vj,v,&tmp);
-<a name="line239">239: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->V,j,&vj);
-<a name="line240">240: </a>    <font color="#4169E1">if</font> (ctx->useconj) sum += PetscRealPart(tmp)*2;
-<a name="line241">241: </a>    <font color="#4169E1">else</font> sum += tmp;
-<a name="line242">242: </a>  }
-<a name="line243">243: </a>  ctx->est_eig = PetscAbsScalar(sum/(PetscReal)ctx->L);
-<a name="line244">244: </a>  eta = PetscPowReal(10,-PetscLog10Real(nep->rtol)/ctx->N);
-<a name="line245">245: </a>  PetscInfo1(nep,<font color="#666666">"Estimation_#Eig %f\n"</font>,(double)ctx->est_eig);
-<a name="line246">246: </a>  *L_add = (PetscInt)PetscCeilReal((ctx->est_eig*eta)/ctx->M) - ctx->L;
-<a name="line247">247: </a>  <font color="#4169E1">if</font> (*L_add < 0) *L_add = 0;
-<a name="line248">248: </a>  <font color="#4169E1">if</font> (*L_add>ctx->L_max-ctx->L) {
-<a name="line249">249: </a>    PetscInfo(nep,<font color="#666666">"Number of eigenvalues around the contour path may be too large\n"</font>);
-<a name="line250">250: </a>    *L_add = ctx->L_max-ctx->L;
-<a name="line251">251: </a>  }
-<a name="line252">252: </a>  VecDestroy(&v);
-<a name="line253">253: </a>  VecDestroy(&vtemp);
-<a name="line254">254: </a>  <font color="#4169E1">return</font>(0);
-<a name="line255">255: </a>}
-
-<a name="line259">259: </a><strong><font color="#4169E1"><a name="CalcMu"></a>static PetscErrorCode CalcMu(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep, PetscScalar *Mu)</font></strong>
-<a name="line260">260: </a>{
-<a name="line262">262: </a>  PetscMPIInt    sub_size;
-<a name="line263">263: </a>  PetscInt       i,j,k,s;
-<a name="line264">264: </a>  PetscScalar    *m,*temp,*temp2,*ppk,alp;
-<a name="line265">265: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line266">266: </a>  Mat            M;
-
-<a name="line269">269: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscSubcommChild(ctx->subcomm),&sub_size);
-<a name="line270">270: </a>  PetscMalloc3(ctx->num_solve_point*ctx->L*(ctx->L+1),&temp,2*ctx->M*ctx->L*ctx->L,&temp2,ctx->num_solve_point,&ppk);
-<a name="line271">271: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ctx->L,ctx->L_max*ctx->num_solve_point,NULL,&M);
-<a name="line272">272: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] = 0;
-<a name="line273">273: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,0,ctx->L_max*ctx->num_solve_point);
-<a name="line274">274: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->V,0,ctx->L);
-<a name="line275">275: </a>  <a href="../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(ctx->Y,ctx->V,M);
-<a name="line276">276: </a>  MatDenseGetArray(M,&m);
-<a name="line277">277: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line278">278: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line279">279: </a>      <font color="#4169E1">for</font> (k=0;k<ctx->L;k++) {
-<a name="line280">280: </a>        temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
-<a name="line281">281: </a>      }
-<a name="line282">282: </a>    }
-<a name="line283">283: </a>  }
-<a name="line284">284: </a>  MatDenseRestoreArray(M,&m);
-<a name="line285">285: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
-<a name="line286">286: </a>  <font color="#4169E1">for</font> (k=0;k<2*ctx->M;k++) {
-<a name="line287">287: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line288">288: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line289">289: </a>        alp = ppk[i]*ctx->weight[i*ctx->subcomm->n + ctx->subcomm_id];
-<a name="line290">290: </a>        <font color="#4169E1">for</font> (s=0;s<ctx->L;s++) {
-<a name="line291">291: </a>          <font color="#4169E1">if</font> (ctx->useconj) temp2[s+(j+k*ctx->L)*ctx->L] += PetscRealPart(alp*temp[s+(j+i*ctx->L)*ctx->L])*2;
-<a name="line292">292: </a>          <font color="#4169E1">else</font> temp2[s+(j+k*ctx->L)*ctx->L] += alp*temp[s+(j+i*ctx->L)*ctx->L];
-<a name="line293">293: </a>        }
-<a name="line294">294: </a>      }
-<a name="line295">295: </a>    }
-<a name="line296">296: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) 
-<a name="line297">297: </a>      ppk[i] *= ctx->pp[i*ctx->subcomm->n + ctx->subcomm_id];
-<a name="line298">298: </a>  }
-<a name="line299">299: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] /= sub_size;
-<a name="line300">300: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(temp2,Mu,2*ctx->M*ctx->L*ctx->L,MPIU_SCALAR,MPIU_SUM,(PetscObjectComm((PetscObject)nep)));
-<a name="line301">301: </a>  PetscFree3(temp,temp2,ppk);
-<a name="line302">302: </a>  MatDestroy(&M);
-<a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
-<a name="line304">304: </a>}
-
-<a name="line308">308: </a><strong><font color="#4169E1"><a name="BlockHankel"></a>static PetscErrorCode BlockHankel(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *Mu,PetscInt s,PetscScalar *H)</font></strong>
-<a name="line309">309: </a>{
-<a name="line310">310: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-<a name="line311">311: </a>  PetscInt  i,j,k,L=ctx->L,M=ctx->M;
-
-<a name="line314">314: </a>  <font color="#4169E1">for</font> (k=0;k<L*M;k++)
-<a name="line315">315: </a>    <font color="#4169E1">for</font> (j=0;j<M;j++) 
-<a name="line316">316: </a>      <font color="#4169E1">for</font> (i=0;i<L;i++) 
-<a name="line317">317: </a>        H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
-<a name="line318">318: </a>  <font color="#4169E1">return</font>(0);
-<a name="line319">319: </a>}
-
-<a name="line323">323: </a><strong><font color="#4169E1"><a name="SVD_H0"></a>static PetscErrorCode SVD_H0(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *S,PetscInt *K)</font></strong>
-<a name="line324">324: </a>{
-<a name="line325">325: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GESVD)</font>
-<a name="line327">327: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
-<a name="line328">328: </a><font color="#A020F0">#else</font>
-<a name="line330">330: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line331">331: </a>  PetscInt       i,ml=ctx->L*ctx->M;
-<a name="line332">332: </a>  PetscBLASInt   m,n,lda,ldu,ldvt,lwork,info;
-<a name="line333">333: </a>  PetscScalar    *work;
-<a name="line334">334: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line335">335: </a>  PetscReal      *rwork;
-<a name="line336">336: </a><font color="#A020F0">#endif</font>
-
-<a name="line339">339: </a>  PetscMalloc1(5*ml,&work);
-<a name="line340">340: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line341">341: </a>  PetscMalloc1(5*ml,&rwork);
-<a name="line342">342: </a><font color="#A020F0">#endif</font>
-<a name="line343">343: </a>  PetscBLASIntCast(ml,&m);
-<a name="line344">344: </a>  n = m; lda = m; ldu = m; ldvt = m; lwork = 5*m;
-<a name="line345">345: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line346">346: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line347">347: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
-<a name="line348">348: </a><font color="#A020F0">#else</font>
-<a name="line349">349: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
-<a name="line350">350: </a><font color="#A020F0">#endif</font>
-<a name="line351">351: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-<a name="line352">352: </a>  PetscFPTrapPop();
-<a name="line353">353: </a>  (*K) = 0;
-<a name="line354">354: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
-<a name="line355">355: </a>    <font color="#4169E1">if</font> (ctx->sigma[i]/PetscMax(ctx->sigma[0],1)>ctx->delta) (*K)++;
-<a name="line356">356: </a>  }
-<a name="line357">357: </a>  PetscFree(work);
-<a name="line358">358: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line359">359: </a>  PetscFree(rwork);
-<a name="line360">360: </a><font color="#A020F0">#endif</font>
-<a name="line361">361: </a>  <font color="#4169E1">return</font>(0);
-<a name="line362">362: </a><font color="#A020F0">#endif</font>
-<a name="line363">363: </a>}
-
-<a name="line367">367: </a><strong><font color="#4169E1"><a name="ConstructS"></a>static PetscErrorCode ConstructS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line368">368: </a>{
-<a name="line370">370: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line371">371: </a>  PetscInt       i,j,k,vec_local_size,p_id;
-<a name="line372">372: </a>  Vec            v,sj,yj;
-<a name="line373">373: </a>  PetscScalar    *ppk, *v_data, m = 1;
-
-<a name="line376">376: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(ctx->Y,&vec_local_size,NULL,NULL);
-<a name="line377">377: </a>  PetscMalloc1(ctx->num_solve_point,&ppk);
-<a name="line378">378: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
-<a name="line379">379: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
-<a name="line380">380: </a>  VecDuplicate(yj,&v);
-<a name="line381">381: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
-<a name="line382">382: </a>  <font color="#4169E1">for</font> (k=0;k<ctx->M;k++) {
-<a name="line383">383: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
-<a name="line384">384: </a>      VecSet(v,0);
-<a name="line385">385: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line386">386: </a>        p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line387">387: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
-<a name="line388">388: </a>        <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ppk[i]*ctx->weight[p_id],1,v,&m);
-<a name="line389">389: </a>      }
-<a name="line390">390: </a>      <font color="#4169E1">if</font> (ctx->useconj) {
-<a name="line391">391: </a>        VecGetArray(v,&v_data);
-<a name="line392">392: </a>        <font color="#4169E1">for</font> (i=0;i<vec_local_size;i++) v_data[i] = PetscRealPart(v_data[i])*2;
-<a name="line393">393: </a>        VecRestoreArray(v,&v_data);
-<a name="line394">394: </a>      }
-<a name="line395">395: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->S,k*ctx->L+j,&sj);
-<a name="line396">396: </a>      VecCopy(v,sj);
-<a name="line397">397: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->S,k*ctx->L+j,&sj);
-<a name="line398">398: </a>    }
-<a name="line399">399: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line400">400: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
-<a name="line401">401: </a>      ppk[i] *= ctx->pp[p_id];
-<a name="line402">402: </a>    }
-<a name="line403">403: </a>  }
-<a name="line404">404: </a>  PetscFree(ppk);
-<a name="line405">405: </a>  VecDestroy(&v);
-<a name="line406">406: </a>  <font color="#4169E1">return</font>(0);
-<a name="line407">407: </a>}
-
-<a name="line411">411: </a><strong><font color="#4169E1"><a name="isGhost"></a>static PetscErrorCode isGhost(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ld,PetscInt nv,PetscBool *fl)</font></strong>
-<a name="line412">412: </a>{
-<a name="line414">414: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line415">415: </a>  PetscInt       i,j;
-<a name="line416">416: </a>  PetscScalar    *pX;
-<a name="line417">417: </a>  PetscReal      *tau,s1,s2,tau_max=0.0;
-
-<a name="line420">420: </a>  PetscMalloc1(nv,&tau);
-<a name="line421">421: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
-<a name="line422">422: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_X,&pX);
-
-<a name="line424">424: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line425">425: </a>    s1 = 0;
-<a name="line426">426: </a>    s2 = 0;
-<a name="line427">427: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) {
-<a name="line428">428: </a>      s1 += PetscAbsScalar(PetscPowScalar(pX[i*ld+j],2));
-<a name="line429">429: </a>      s2 += PetscPowReal(PetscAbsScalar(pX[i*ld+j]),2)/ctx->sigma[j];
-<a name="line430">430: </a>    }
-<a name="line431">431: </a>    tau[i] = s1/s2;
-<a name="line432">432: </a>    tau_max = PetscMax(tau_max,tau[i]);
-<a name="line433">433: </a>  }
-<a name="line434">434: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_X,&pX);
-<a name="line435">435: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line436">436: </a>    tau[i] /= tau_max;
-<a name="line437">437: </a>  }
-<a name="line438">438: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line439">439: </a>    <font color="#4169E1">if</font> (tau[i]>=ctx->spurious_threshold) fl[i] = PETSC_TRUE;
-<a name="line440">440: </a>    <font color="#4169E1">else</font> fl[i] = PETSC_FALSE;
-<a name="line441">441: </a>  }
-<a name="line442">442: </a>  PetscFree(tau);
-<a name="line443">443: </a>  <font color="#4169E1">return</font>(0);
-<a name="line444">444: </a>}
-
-<a name="line448">448: </a><strong><font color="#4169E1"><a name="NEPSetUp_CISS"></a>PetscErrorCode NEPSetUp_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line449">449: </a>{
-<a name="line451">451: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line452">452: </a>  const char     *prefix;
-<a name="line453">453: </a>  PetscInt       i;
-<a name="line454">454: </a>  PetscBool      istrivial,isellipse;
-<a name="line455">455: </a>  PetscScalar    center;
-
-<a name="line458">458: </a>  nep->ncv = PetscMin(nep->n,ctx->L*ctx->M);
-<a name="line459">459: </a>  <font color="#4169E1">if</font> (!nep->mpd) nep->mpd = nep->ncv;
-<a name="line460">460: </a>  <font color="#4169E1">if</font> (!nep->which) nep->which = NEP_LARGEST_MAGNITUDE;
-
-<a name="line462">462: </a>  <font color="#B22222">/* check region */</font>
-<a name="line463">463: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
-<a name="line464">464: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NEPCISS requires a nontrivial region, e.g. -rg_type ellipse ..."</font>);
-<a name="line465">465: </a>  PetscObjectTypeCompare((PetscObject)nep->rg,RGELLIPSE,&isellipse);
-<a name="line466">466: </a>  <font color="#4169E1">if</font> (!isellipse) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Currently only implemented for elliptic or arc regions"</font>);
-<a name="line467">467: </a>  <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(nep->rg,&center,NULL,NULL);
-<a name="line468">468: </a>  <font color="#4169E1">if</font> (ctx->isreal && PetscImaginaryPart(center) == 0.0) ctx->useconj = PETSC_TRUE;
-<a name="line469">469: </a>  <font color="#4169E1">else</font> ctx->useconj = PETSC_FALSE;
-
-<a name="line471">471: </a>  <font color="#B22222">/* create split comm */</font>
-<a name="line472">472: </a>  ctx->num_subcomm = 1;
-<a name="line473">473: </a>  SetSolverComm(nep);
-
-<a name="line475">475: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
-<a name="line476">476: </a>  PetscMalloc4(ctx->N,&ctx->weight,ctx->N,&ctx->omega,ctx->N,&ctx->pp,ctx->L_max*ctx->M,&ctx->sigma);
-<a name="line477">477: </a>  PetscLogObjectMemory((PetscObject)nep,3*ctx->N*<font color="#4169E1">sizeof</font>(PetscScalar)+ctx->L_max*ctx->N*<font color="#4169E1">sizeof</font>(PetscReal));
-
-<a name="line479">479: </a>  <font color="#B22222">/* allocate basis vectors */</font>
-<a name="line480">480: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,ctx->L_max*ctx->M,&ctx->S);
-<a name="line481">481: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->S);
-<a name="line482">482: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,ctx->L_max,&ctx->V);
-<a name="line483">483: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->V);
-
-<a name="line485">485: </a>  <font color="#4169E1">if</font> (!ctx->usest) {
-<a name="line486">486: </a>    PetscMalloc2(ctx->num_solve_point,&ctx->ksp,ctx->num_solve_point,&ctx->kspMat);
-<a name="line487">487: </a>    PetscLogObjectMemory((PetscObject)nep,ctx->num_solve_point*<font color="#4169E1">sizeof</font>(KSP)+ctx->num_solve_point*<font color="#4169E1">sizeof</font>(Mat));
-<a name="line488">488: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line489">489: </a>      KSPCreate(PetscSubcommChild(ctx->subcomm),&ctx->ksp[i]);
-<a name="line490">490: </a>      PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)nep,1);
-<a name="line491">491: </a>      PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp[i]);
-<a name="line492">492: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],<font color="#666666">"nep_ciss_"</font>);
-<a name="line493">493: </a>      <a href="../../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>(nep,&prefix);
-<a name="line494">494: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],prefix);
-<a name="line495">495: </a>      KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);
-<a name="line496">496: </a>    }
-<a name="line497">497: </a>  }
-
-<a name="line499">499: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,ctx->num_solve_point*ctx->L_max,&ctx->Y);
-
-<a name="line501">501: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(nep->ds,DSGNHEP);
-<a name="line502">502: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(nep->ds,nep->ncv);
-<a name="line503">503: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,2);
-
-<a name="line505">505: </a>  <font color="#B22222">/* dispatch solve method */</font>
-<a name="line506">506: </a>  nep->ops->solve = NEPSolve_CISS;
-<a name="line507">507: </a>  <font color="#4169E1">return</font>(0);
-<a name="line508">508: </a>}
-
-<a name="line512">512: </a><strong><font color="#4169E1"><a name="NEPSolve_CISS"></a>PetscErrorCode NEPSolve_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line513">513: </a>{
-<a name="line515">515: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line516">516: </a>  Mat            X,M;
-<a name="line517">517: </a>  PetscInt       i,j,ld,L_add=0,nv=0,L_base=ctx->L,inner,outer,nlocal,*inside;
-<a name="line518">518: </a>  PetscScalar    *Mu,*H0,*H1,*rr,*temp,center;
-<a name="line519">519: </a>  PetscReal      error,max_error,radius;
-<a name="line520">520: </a>  PetscBool      *fl1;
-<a name="line521">521: </a>  Vec            si,w[3];
-<a name="line522">522: </a>  SlepcSC        sc;
-
-<a name="line525">525: </a>  w[0] = nep->work[0];
-<a name="line526">526: </a>  w[1] = NULL;
-<a name="line527">527: </a>  w[2] = nep->work[1];
-<a name="line528">528: </a>  <a href="../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(nep->ds,&sc);
-<a name="line529">529: </a>  sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line530">530: </a>  sc->comparisonctx = NULL;
-<a name="line531">531: </a>  sc->map           = NULL;
-<a name="line532">532: </a>  sc->mapobj        = NULL;
-<a name="line533">533: </a>  VecGetLocalSize(w[0],&nlocal);
-<a name="line534">534: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(nep->ds,&ld);
-<a name="line535">535: </a>  SetPathParameter(nep);
-<a name="line536">536: </a>  CISSVecSetRandom(ctx->V,0,ctx->L,nep->rand);
-
-<a name="line538">538: </a>  SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_TRUE);
-<a name="line539">539: </a>  EstimateNumberEigs(nep,&L_add);
-<a name="line540">540: </a>  <font color="#4169E1">if</font> (L_add>0) {
-<a name="line541">541: </a>    PetscInfo2(nep,<font color="#666666">"Changing L %D -> %D by Estimate #Eig\n"</font>,ctx->L,ctx->L+L_add);
-<a name="line542">542: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,nep->rand);
-<a name="line543">543: </a>    SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
-<a name="line544">544: </a>    ctx->L += L_add;
-<a name="line545">545: </a>  }
-<a name="line546">546: </a>  PetscMalloc2(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0);
-<a name="line547">547: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->refine_blocksize;i++) {
-<a name="line548">548: </a>    CalcMu(nep,Mu);
-<a name="line549">549: </a>    BlockHankel(nep,Mu,0,H0);
-<a name="line550">550: </a>    SVD_H0(nep,H0,&nv);
-<a name="line551">551: </a>    <font color="#4169E1">if</font> (ctx->sigma[0]<=ctx->delta || nv < ctx->L*ctx->M || ctx->L == ctx->L_max) <font color="#4169E1">break</font>;
-<a name="line552">552: </a>    L_add = L_base;
-<a name="line553">553: </a>    <font color="#4169E1">if</font> (ctx->L+L_add>ctx->L_max) L_add = ctx->L_max-ctx->L;
-<a name="line554">554: </a>    PetscInfo2(nep,<font color="#666666">"Changing L %D -> %D by <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>(H0)\n"</font>,ctx->L,ctx->L+L_add);
-<a name="line555">555: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add,nep->rand);
-<a name="line556">556: </a>    SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
-<a name="line557">557: </a>    ctx->L += L_add;
-<a name="line558">558: </a>  }
-<a name="line559">559: </a>  PetscFree2(Mu,H0);
-
-<a name="line561">561: </a>  PetscMalloc3(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0,ctx->L*ctx->M*ctx->L*ctx->M,&H1);
-<a name="line562">562: </a>  <font color="#4169E1">for</font> (outer=0;outer<=ctx->refine_outer;outer++) {
-<a name="line563">563: </a>    <font color="#4169E1">for</font> (inner=0;inner<=ctx->refine_inner;inner++) {
-<a name="line564">564: </a>      CalcMu(nep,Mu);
-<a name="line565">565: </a>      BlockHankel(nep,Mu,0,H0);
-<a name="line566">566: </a>      SVD_H0(nep,H0,&nv);
-<a name="line567">567: </a>      <font color="#4169E1">if</font> (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
-<a name="line568">568: </a>        ConstructS(nep);
-<a name="line569">569: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
-<a name="line570">570: </a>        <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
-<a name="line571">571: </a>        SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);
-<a name="line572">572: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line573">573: </a>    }
-
-<a name="line575">575: </a>    nep->nconv = 0;
-<a name="line576">576: </a>    <font color="#4169E1">if</font> (nv == 0) <font color="#4169E1">break</font>;
-<a name="line577">577: </a>    BlockHankel(nep,Mu,0,H0);
-<a name="line578">578: </a>    BlockHankel(nep,Mu,1,H1);
-<a name="line579">579: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,nv,0,0,0);
-<a name="line580">580: </a>    <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_RAW);
-<a name="line581">581: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_A,&temp);
-<a name="line582">582: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++)
-<a name="line583">583: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++)
-<a name="line584">584: </a>        temp[i+j*ld] = H1[i+j*ctx->L*ctx->M];
-<a name="line585">585: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_A,&temp);
-<a name="line586">586: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_B,&temp);
-<a name="line587">587: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) 
-<a name="line588">588: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++)
-<a name="line589">589: </a>        temp[i+j*ld] = H0[i+j*ctx->L*ctx->M];
-<a name="line590">590: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_B,&temp);
-<a name="line591">591: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(nep->ds,nep->eigr,nep->eigi);
-<a name="line592">592: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
-<a name="line593">593: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(nep->rg,&center,&radius,NULL);
-<a name="line594">594: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++){
-<a name="line595">595: </a>      nep->eigr[i] = nep->eigr[i]*radius+center;
-<a name="line596">596: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line597">597: </a>      nep->eigi[i] = nep->eigi[i]*radius;
-<a name="line598">598: </a><font color="#A020F0">#endif</font>
-<a name="line599">599: </a>    }
-<a name="line600">600: </a>    PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);
-<a name="line601">601: </a>    isGhost(nep,ld,nv,fl1);
-<a name="line602">602: </a>    <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(nep->rg,nv,nep->eigr,nep->eigi,inside);
-<a name="line603">603: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line604">604: </a>      <font color="#4169E1">if</font> (fl1[i] && inside[i]>0) {
-<a name="line605">605: </a>        rr[i] = 1.0;
-<a name="line606">606: </a>        nep->nconv++;
-<a name="line607">607: </a>      } <font color="#4169E1">else</font> rr[i] = 0.0;
-<a name="line608">608: </a>    }
-<a name="line609">609: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(nep->ds,nep->eigr,nep->eigi,rr,NULL,&nep->nconv);
-<a name="line610">610: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++){
-<a name="line611">611: </a>      nep->eigr[i] = nep->eigr[i]*radius+center;
-<a name="line612">612: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line613">613: </a>      nep->eigi[i] = nep->eigi[i]*radius;
-<a name="line614">614: </a><font color="#A020F0">#endif</font>
-<a name="line615">615: </a>    }
-<a name="line616">616: </a>    PetscFree3(fl1,inside,rr);
-<a name="line617">617: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,nv);
-<a name="line618">618: </a>    ConstructS(nep);
-<a name="line619">619: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
-<a name="line620">620: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,nep->V);
-
-<a name="line622">622: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
-<a name="line623">623: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(nep->ds,DS_MAT_X,&X);
-<a name="line624">624: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,X,0,nep->nconv);
-<a name="line625">625: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(nep->V,X,0,nep->nconv);
-<a name="line626">626: </a>    MatDestroy(&X);
-<a name="line627">627: </a>    max_error = 0.0;
-<a name="line628">628: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line629">629: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,i,&si);
-<a name="line630">630: </a>      VecNormalize(si,NULL);
-<a name="line631">631: </a>      NEPComputeResidualNorm_Private(nep,nep->eigr[i],si,w,&error);
-<a name="line632">632: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,i,&si);
-<a name="line633">633: </a>      max_error = PetscMax(max_error,error);
-<a name="line634">634: </a>    }
-<a name="line635">635: </a>    <font color="#4169E1">if</font> (max_error <= nep->rtol || outer == ctx->refine_outer) <font color="#4169E1">break</font>;
-
-<a name="line637">637: </a>    <font color="#4169E1">if</font> (nep->nconv > ctx->L) nv = nep->nconv;
-<a name="line638">638: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->L > nv) nv = ctx->L;
-<a name="line639">639: </a>    MatCreateSeqDense(PETSC_COMM_SELF,nv,ctx->L,NULL,&M);
-<a name="line640">640: </a>    MatDenseGetArray(M,&temp);
-<a name="line641">641: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->L*nv;i++) {
-<a name="line642">642: </a>      PetscRandomGetValue(nep->rand,&temp[i]);
-<a name="line643">643: </a>      temp[i] = PetscRealPart(temp[i]);
-<a name="line644">644: </a>    }
-<a name="line645">645: </a>    MatDenseRestoreArray(M,&temp);
-<a name="line646">646: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
-<a name="line647">647: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,M,0,ctx->L);
-<a name="line648">648: </a>    MatDestroy(&M);
-<a name="line649">649: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
-<a name="line650">650: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
-<a name="line651">651: </a>    SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);
-<a name="line652">652: </a>  }
-<a name="line653">653: </a>  PetscFree3(Mu,H0,H1);  
-<a name="line654">654: </a>  nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
-<a name="line655">655: </a>  <font color="#4169E1">return</font>(0);
-<a name="line656">656: </a>}
-
-<a name="line660">660: </a><strong><font color="#4169E1"><a name="NEPCISSSetSizes_CISS"></a>static PetscErrorCode NEPCISSSetSizes_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)</font></strong>
-<a name="line661">661: </a>{
-<a name="line662">662: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-
-<a name="line665">665: </a>  <font color="#4169E1">if</font> (ip == PETSC_DECIDE || ip == PETSC_DEFAULT) {
-<a name="line666">666: </a>    <font color="#4169E1">if</font> (ctx->N!=32) { ctx->N =32; ctx->M = ctx->N/4; }
-<a name="line667">667: </a>  } <font color="#4169E1">else</font> {
-<a name="line668">668: </a>    <font color="#4169E1">if</font> (ip<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be > 0"</font>);
-<a name="line669">669: </a>    <font color="#4169E1">if</font> (ip%2) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be an even number"</font>);
-<a name="line670">670: </a>    <font color="#4169E1">if</font> (ctx->N!=ip) { ctx->N = ip; ctx->M = ctx->N/4; }
-<a name="line671">671: </a>  }
-<a name="line672">672: </a>  <font color="#4169E1">if</font> (bs == PETSC_DECIDE || bs == PETSC_DEFAULT) {
-<a name="line673">673: </a>    ctx->L = 16;
-<a name="line674">674: </a>  } <font color="#4169E1">else</font> {
-<a name="line675">675: </a>    <font color="#4169E1">if</font> (bs<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be > 0"</font>);
-<a name="line676">676: </a>    <font color="#4169E1">if</font> (bs>ctx->L_max) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be less than or equal to the maximum number of block size"</font>);
-<a name="line677">677: </a>    ctx->L = bs;
-<a name="line678">678: </a>  }
-<a name="line679">679: </a>  <font color="#4169E1">if</font> (ms == PETSC_DECIDE || ms == PETSC_DEFAULT) {
-<a name="line680">680: </a>    ctx->M = ctx->N/4;
-<a name="line681">681: </a>  } <font color="#4169E1">else</font> {
-<a name="line682">682: </a>    <font color="#4169E1">if</font> (ms<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be > 0"</font>);
-<a name="line683">683: </a>    <font color="#4169E1">if</font> (ms>ctx->N) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be less than or equal to the number of integration points"</font>);
-<a name="line684">684: </a>    ctx->M = ms;
-<a name="line685">685: </a>  }
-<a name="line686">686: </a>  <font color="#4169E1">if</font> (npart == PETSC_DECIDE || npart == PETSC_DEFAULT) {
-<a name="line687">687: </a>    ctx->num_subcomm = 1;
-<a name="line688">688: </a>  } <font color="#4169E1">else</font> {
-<a name="line689">689: </a>    <font color="#4169E1">if</font> (npart<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The npart argument must be > 0"</font>);
-<a name="line690">690: </a>    ctx->num_subcomm = npart;
-<a name="line691">691: </a>  }
-<a name="line692">692: </a>  <font color="#4169E1">if</font> (bsmax == PETSC_DECIDE || bsmax == PETSC_DEFAULT) {
-<a name="line693">693: </a>    ctx->L = 256;
-<a name="line694">694: </a>  } <font color="#4169E1">else</font> {
-<a name="line695">695: </a>    <font color="#4169E1">if</font> (bsmax<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bsmax argument must be > 0"</font>);
-<a name="line696">696: </a>    <font color="#4169E1">if</font> (bsmax<ctx->L) ctx->L_max = ctx->L;
-<a name="line697">697: </a>    <font color="#4169E1">else</font> ctx->L_max = bsmax;
-<a name="line698">698: </a>  }
-<a name="line699">699: </a>  ctx->isreal = isreal;
-<a name="line700">700: </a>  <font color="#4169E1">return</font>(0);
-<a name="line701">701: </a>}
-
-<a name="line705">705: </a><font color="#B22222">/*@</font>
-<a name="line706">706: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a> - Sets the values of various size parameters in the CISS solver.</font>
-
-<a name="line708">708: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line710">710: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line711">711: </a><font color="#B22222">+  nep   - the eigenproblem solver context</font>
-<a name="line712">712: </a><font color="#B22222">.  ip    - number of integration points</font>
-<a name="line713">713: </a><font color="#B22222">.  bs    - block size</font>
-<a name="line714">714: </a><font color="#B22222">.  ms    - moment size</font>
-<a name="line715">715: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
-<a name="line716">716: </a><font color="#B22222">.  bsmax - max block size</font>
-<a name="line717">717: </a><font color="#B22222">-  isreal - A and B are real</font>
-
-<a name="line719">719: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line720">720: </a><font color="#B22222">+  -nep_ciss_integration_points - Sets the number of integration points</font>
-<a name="line721">721: </a><font color="#B22222">.  -nep_ciss_blocksize - Sets the block size</font>
-<a name="line722">722: </a><font color="#B22222">.  -nep_ciss_moments - Sets the moment size</font>
-<a name="line723">723: </a><font color="#B22222">.  -nep_ciss_partitions - Sets the number of partitions</font>
-<a name="line724">724: </a><font color="#B22222">.  -nep_ciss_maxblocksize - Sets the maximum block size</font>
-<a name="line725">725: </a><font color="#B22222">-  -nep_ciss_realmats - A and B are real</font>
-
-<a name="line727">727: </a><font color="#B22222">   Note:</font>
-<a name="line728">728: </a><font color="#B22222">   The default number of partitions is 1. This means the internal KSP object is shared</font>
-<a name="line729">729: </a><font color="#B22222">   among all processes of the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> communicator. Otherwise, the communicator is split</font>
-<a name="line730">730: </a><font color="#B22222">   into npart communicators, so that npart KSP solves proceed simultaneously.</font>
-
-<a name="line732">732: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line734">734: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>()</font>
-<a name="line735">735: </a><font color="#B22222">@*/</font>
-<a name="line736">736: </a><strong><font color="#4169E1"><a name="NEPCISSSetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool isreal)</font></strong>
-<a name="line737">737: </a>{
-
-<a name="line748">748: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSSetSizes_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(nep,ip,bs,ms,npart,bsmax,isreal));
-<a name="line749">749: </a>  <font color="#4169E1">return</font>(0);
-<a name="line750">750: </a>}
-
-<a name="line754">754: </a><strong><font color="#4169E1"><a name="NEPCISSGetSizes_CISS"></a>static PetscErrorCode NEPCISSGetSizes_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)</font></strong>
-<a name="line755">755: </a>{
-<a name="line756">756: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-
-<a name="line759">759: </a>  <font color="#4169E1">if</font> (ip) *ip = ctx->N;
-<a name="line760">760: </a>  <font color="#4169E1">if</font> (bs) *bs = ctx->L;
-<a name="line761">761: </a>  <font color="#4169E1">if</font> (ms) *ms = ctx->M;
-<a name="line762">762: </a>  <font color="#4169E1">if</font> (npart) *npart = ctx->num_subcomm;
-<a name="line763">763: </a>  <font color="#4169E1">if</font> (bsmax) *bsmax = ctx->L_max;
-<a name="line764">764: </a>  <font color="#4169E1">if</font> (isreal) *isreal = ctx->isreal;
-<a name="line765">765: </a>  <font color="#4169E1">return</font>(0);
-<a name="line766">766: </a>}
-
-<a name="line770">770: </a><font color="#B22222">/*@</font>
-<a name="line771">771: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a> - Gets the values of various size parameters in the CISS solver.</font>
-
-<a name="line773">773: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line775">775: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line776">776: </a><font color="#B22222">.  nep - the eigenproblem solver context</font>
-
-<a name="line778">778: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line779">779: </a><font color="#B22222">+  ip    - number of integration points</font>
-<a name="line780">780: </a><font color="#B22222">.  bs    - block size</font>
-<a name="line781">781: </a><font color="#B22222">.  ms    - moment size</font>
-<a name="line782">782: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
-<a name="line783">783: </a><font color="#B22222">.  bsmax - max block size</font>
-<a name="line784">784: </a><font color="#B22222">-  isreal - A and B are real</font>
-
-<a name="line786">786: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line788">788: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>()</font>
-<a name="line789">789: </a><font color="#B22222">@*/</font>
-<a name="line790">790: </a><strong><font color="#4169E1"><a name="NEPCISSGetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *isreal)</font></strong>
-<a name="line791">791: </a>{
-
-<a name="line796">796: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSGetSizes_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(nep,ip,bs,ms,npart,bsmax,isreal));
-<a name="line797">797: </a>  <font color="#4169E1">return</font>(0);
-<a name="line798">798: </a>}
-
-<a name="line802">802: </a><strong><font color="#4169E1"><a name="NEPCISSSetThreshold_CISS"></a>static PetscErrorCode NEPCISSSetThreshold_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal delta,PetscReal spur)</font></strong>
-<a name="line803">803: </a>{
-<a name="line804">804: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-
-<a name="line807">807: </a>  <font color="#4169E1">if</font> (delta == PETSC_DEFAULT) {
-<a name="line808">808: </a>    ctx->delta = 1e-12;
-<a name="line809">809: </a>  } <font color="#4169E1">else</font> {
-<a name="line810">810: </a>    <font color="#4169E1">if</font> (delta<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The delta argument must be > 0.0"</font>);
-<a name="line811">811: </a>    ctx->delta = delta;
-<a name="line812">812: </a>  }
-<a name="line813">813: </a>  <font color="#4169E1">if</font> (spur == PETSC_DEFAULT) {
-<a name="line814">814: </a>    ctx->spurious_threshold = 1e-4;
-<a name="line815">815: </a>  } <font color="#4169E1">else</font> {
-<a name="line816">816: </a>    <font color="#4169E1">if</font> (spur<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The spurious threshold argument must be > 0.0"</font>);
-<a name="line817">817: </a>    ctx->spurious_threshold = spur;
-<a name="line818">818: </a>  }
-<a name="line819">819: </a>  <font color="#4169E1">return</font>(0);
-<a name="line820">820: </a>}
-
-<a name="line824">824: </a><font color="#B22222">/*@</font>
-<a name="line825">825: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a> - Sets the values of various threshold parameters in</font>
-<a name="line826">826: </a><font color="#B22222">   the CISS solver.</font>
-
-<a name="line828">828: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line830">830: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line831">831: </a><font color="#B22222">+  nep   - the eigenproblem solver context</font>
-<a name="line832">832: </a><font color="#B22222">.  delta - threshold for numerical rank</font>
-<a name="line833">833: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
-
-<a name="line835">835: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line836">836: </a><font color="#B22222">+  -nep_ciss_delta - Sets the delta</font>
-<a name="line837">837: </a><font color="#B22222">-  -nep_ciss_spurious_threshold - Sets the spurious threshold</font>
-
-<a name="line839">839: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line841">841: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>()</font>
-<a name="line842">842: </a><font color="#B22222">@*/</font>
-<a name="line843">843: </a><strong><font color="#4169E1"><a name="NEPCISSSetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal delta,PetscReal spur)</font></strong>
-<a name="line844">844: </a>{
-
-<a name="line851">851: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSSetThreshold_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscReal),(nep,delta,spur));
-<a name="line852">852: </a>  <font color="#4169E1">return</font>(0);
-<a name="line853">853: </a>}
-
-<a name="line857">857: </a><strong><font color="#4169E1"><a name="NEPCISSGetThreshold_CISS"></a>static PetscErrorCode NEPCISSGetThreshold_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *delta,PetscReal *spur)</font></strong>
+<a name="line47"> 47: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line48"> 48: </a>  <font color="#B22222">/* parameters */</font>
+<a name="line49"> 49: </a>  PetscInt     N;          <font color="#B22222">/* number of integration points (32) */</font>
+<a name="line50"> 50: </a>  PetscInt     L;          <font color="#B22222">/* block size (16) */</font>
+<a name="line51"> 51: </a>  PetscInt     M;          <font color="#B22222">/* moment degree (N/4 = 4) */</font>
+<a name="line52"> 52: </a>  PetscReal    delta;      <font color="#B22222">/* threshold of singular value (1e-12) */</font>
+<a name="line53"> 53: </a>  PetscInt     L_max;      <font color="#B22222">/* maximum number of columns of the source matrix V */</font>
+<a name="line54"> 54: </a>  PetscReal    spurious_threshold; <font color="#B22222">/* discard spurious eigenpairs */</font>
+<a name="line55"> 55: </a>  PetscBool    isreal;     <font color="#B22222">/* T(z) is real for real z */</font>
+<a name="line56"> 56: </a>  PetscInt     refine_inner;
+<a name="line57"> 57: </a>  PetscInt     refine_blocksize;
+<a name="line58"> 58: </a>  <font color="#B22222">/* private data */</font>
+<a name="line59"> 59: </a>  PetscReal    *sigma;     <font color="#B22222">/* threshold for numerical rank */</font>
+<a name="line60"> 60: </a>  PetscInt     num_subcomm;
+<a name="line61"> 61: </a>  PetscInt     subcomm_id;
+<a name="line62"> 62: </a>  PetscInt     num_solve_point;
+<a name="line63"> 63: </a>  PetscScalar  *weight;
+<a name="line64"> 64: </a>  PetscScalar  *omega;
+<a name="line65"> 65: </a>  PetscScalar  *pp;
+<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V;
+<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           S;
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>           Y;
+<a name="line69"> 69: </a>  KSP          *ksp;
+<a name="line70"> 70: </a>  Mat          *kspMat;
+<a name="line71"> 71: </a>  PetscBool    useconj;
+<a name="line72"> 72: </a>  PetscReal    est_eig;
+<a name="line73"> 73: </a>  PetscSubcomm subcomm;
+<a name="line74"> 74: </a>  PetscBool    usest;
+<a name="line75"> 75: </a>} NEP_CISS;
+
+<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="SetSolverComm"></a>static PetscErrorCode SetSolverComm(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line80"> 80: </a>{
+<a name="line82"> 82: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line83"> 83: </a>  PetscInt       N = ctx->N;
+
+<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (ctx->useconj) N = N/2;
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (!ctx->subcomm) {
+<a name="line88"> 88: </a>    PetscSubcommCreate(PetscObjectComm((PetscObject)nep),&ctx->subcomm);
+<a name="line89"> 89: </a>    PetscSubcommSetNumber(ctx->subcomm,ctx->num_subcomm);
+<a name="line90"> 90: </a>    PetscSubcommSetType(ctx->subcomm,PETSC_SUBCOMM_INTERLACED);
+<a name="line91"> 91: </a>    PetscLogObjectMemory((PetscObject)nep,<font color="#4169E1">sizeof</font>(PetscSubcomm));
+<a name="line92"> 92: </a>    PetscSubcommSetFromOptions(ctx->subcomm);
+<a name="line93"> 93: </a>  }
+<a name="line94"> 94: </a>  ctx->subcomm_id = ctx->subcomm->color;
+<a name="line95"> 95: </a>  ctx->num_solve_point = N / ctx->num_subcomm;
+<a name="line96"> 96: </a>  <font color="#4169E1">if</font> ((N%ctx->num_subcomm) > ctx->subcomm_id) ctx->num_solve_point+=1;
+<a name="line97"> 97: </a>  <font color="#4169E1">return</font>(0);
+<a name="line98"> 98: </a>}
+
+<a name="line102">102: </a><strong><font color="#4169E1"><a name="SetPathParameter"></a>static PetscErrorCode SetPathParameter(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line103">103: </a>{
+<a name="line105">105: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line106">106: </a>  PetscInt       i;
+<a name="line107">107: </a>  PetscScalar    center;
+<a name="line108">108: </a>  PetscReal      theta,radius,vscale,rgscale;
+<a name="line109">109: </a>  PetscBool      isellipse=PETSC_FALSE;
+
+<a name="line112">112: </a>  PetscObjectTypeCompare((PetscObject)nep->rg,RGELLIPSE,&isellipse);
+<a name="line113">113: </a>  <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(nep->rg,&rgscale);
+<a name="line114">114: </a>  <font color="#4169E1">if</font> (isellipse) {
+<a name="line115">115: </a>    <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(nep->rg,&center,&radius,&vscale);
+<a name="line116">116: </a>  } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Region must be Ellipse"</font>);
+<a name="line117">117: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->N;i++) {
+<a name="line118">118: </a>    theta = ((2*PETSC_PI)/ctx->N)*(i+0.5);
+<a name="line119">119: </a>    ctx->pp[i] = PetscCosReal(theta) + PETSC_i*vscale*PetscSinReal(theta);
+<a name="line120">120: </a>    ctx->weight[i] = radius*(vscale*PetscCosReal(theta) + PETSC_i*PetscSinReal(theta))/(PetscReal)ctx->N;
+<a name="line121">121: </a>    ctx->omega[i] = rgscale*(center + radius*ctx->pp[i]);
+<a name="line122">122: </a>  }
+<a name="line123">123: </a>  <font color="#4169E1">return</font>(0);
+<a name="line124">124: </a>}
+
+<a name="line128">128: </a><strong><font color="#4169E1"><a name="CISSVecSetRandom"></a>static PetscErrorCode CISSVecSetRandom(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt i0,PetscInt i1)</font></strong>
+<a name="line129">129: </a>{
+<a name="line131">131: </a>  PetscInt       i,j,nlocal;
+<a name="line132">132: </a>  PetscScalar    *vdata;
+<a name="line133">133: </a>  Vec            x;
+
+<a name="line136">136: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(V,&nlocal,NULL,NULL);
+<a name="line137">137: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
+<a name="line138">138: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(V,i);
+<a name="line139">139: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&x);
+<a name="line140">140: </a>    VecGetArray(x,&vdata);
+<a name="line141">141: </a>    <font color="#4169E1">for</font> (j=0;j<nlocal;j++) {
+<a name="line142">142: </a>      vdata[j] = PetscRealPart(vdata[j]);
+<a name="line143">143: </a>      <font color="#4169E1">if</font> (PetscRealPart(vdata[j]) < 0.5) vdata[j] = -1.0;
+<a name="line144">144: </a>      <font color="#4169E1">else</font> vdata[j] = 1.0;
+<a name="line145">145: </a>    }
+<a name="line146">146: </a>    VecRestoreArray(x,&vdata);
+<a name="line147">147: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&x);
+<a name="line148">148: </a>  }
+<a name="line149">149: </a>  <font color="#4169E1">return</font>(0);
+<a name="line150">150: </a>}
+
+<a name="line154">154: </a><strong><font color="#4169E1"><a name="SolveLinearSystem"></a>static PetscErrorCode SolveLinearSystem(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat T,Mat dT,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt L_start,PetscInt L_end,PetscBool initksp)</font></strong>
+<a name="line155">155: </a>{
+<a name="line157">157: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line158">158: </a>  PetscInt       i,j,p_id;
+<a name="line159">159: </a>  Mat            Fz;
+<a name="line160">160: </a>  PC             pc;
+<a name="line161">161: </a>  Vec            Bvj,vj,yj;
+<a name="line162">162: </a>  KSP            ksp;
+
+<a name="line165">165: </a>  <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line166">166: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,0,T,T);
+<a name="line167">167: </a>    MatDuplicate(T,MAT_DO_NOT_COPY_VALUES,&Fz);
+<a name="line168">168: </a>    KSPCreate(PetscObjectComm((PetscObject)nep),&ksp);
+<a name="line169">169: </a>  }
+<a name="line170">170: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,&Bvj);
+<a name="line171">171: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line172">172: </a>    p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line173">173: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,ctx->omega[p_id],T,T);
+<a name="line174">174: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(nep,ctx->omega[p_id],dT);
+<a name="line175">175: </a>    <font color="#4169E1">if</font> (!ctx->usest && initksp == PETSC_TRUE) {
+<a name="line176">176: </a>      MatDuplicate(T,MAT_COPY_VALUES,&ctx->kspMat[i]);
+<a name="line177">177: </a>      KSPSetOperators(ctx->ksp[i],ctx->kspMat[i],ctx->kspMat[i]);
+<a name="line178">178: </a>      KSPSetType(ctx->ksp[i],KSPPREONLY);
+<a name="line179">179: </a>      KSPGetPC(ctx->ksp[i],&pc);
+<a name="line180">180: </a>      PCSetType(pc,PCLU);
+<a name="line181">181: </a>      KSPSetFromOptions(ctx->ksp[i]);
+<a name="line182">182: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line183">183: </a>      MatCopy(T,Fz,DIFFERENT_NONZERO_PATTERN);
+<a name="line184">184: </a>      KSPSetOperators(ksp,Fz,Fz);
+<a name="line185">185: </a>      KSPSetType(ksp,KSPPREONLY);
+<a name="line186">186: </a>      KSPGetPC(ksp,&pc);
+<a name="line187">187: </a>      PCSetType(pc,PCLU);
+<a name="line188">188: </a>      KSPSetFromOptions(ksp);
+<a name="line189">189: </a>    }
+<a name="line190">190: </a>    <font color="#4169E1">for</font> (j=L_start;j<L_end;j++) {
+<a name="line191">191: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&vj);
+<a name="line192">192: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
+<a name="line193">193: </a>      MatMult(dT,vj,Bvj);
+<a name="line194">194: </a>      <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line195">195: </a>        KSPSolve(ksp,Bvj,yj);
+<a name="line196">196: </a>      } <font color="#4169E1">else</font> {
+<a name="line197">197: </a>        KSPSolve(ctx->ksp[i],Bvj,yj);
+<a name="line198">198: </a>      }
+<a name="line199">199: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&vj);
+<a name="line200">200: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,i*ctx->L_max+j,&yj);
+<a name="line201">201: </a>    }
+<a name="line202">202: </a>    <font color="#4169E1">if</font> (ctx->usest && i<ctx->num_solve_point-1) {  KSPReset(ksp); }
+<a name="line203">203: </a>  }
+<a name="line204">204: </a>  <font color="#4169E1">if</font> (ctx->usest) {
+<a name="line205">205: </a>    MatDestroy(&Fz);
+<a name="line206">206: </a>    KSPDestroy(&ksp);
+<a name="line207">207: </a>  }
+<a name="line208">208: </a>  VecDestroy(&Bvj);
+<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
+<a name="line210">210: </a>}
+
+<a name="line214">214: </a><strong><font color="#4169E1"><a name="EstimateNumberEigs"></a>static PetscErrorCode EstimateNumberEigs(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *L_add)</font></strong>
+<a name="line215">215: </a>{
+<a name="line217">217: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line218">218: </a>  PetscInt       i,j,p_id;
+<a name="line219">219: </a>  PetscScalar    tmp,m = 1,sum = 0.0;
+<a name="line220">220: </a>  PetscReal      eta;
+<a name="line221">221: </a>  Vec            v,vtemp,vj,yj;
+
+<a name="line224">224: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
+<a name="line225">225: </a>  VecDuplicate(yj,&v);
+<a name="line226">226: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
+<a name="line227">227: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(ctx->V,&vtemp);
+<a name="line228">228: </a>  <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line229">229: </a>    VecSet(v,0);
+<a name="line230">230: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point; i++) {
+<a name="line231">231: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line232">232: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
+<a name="line233">233: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ctx->weight[p_id],1,v,&m);
+<a name="line234">234: </a>    }
+<a name="line235">235: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->V,j,&vj);
+<a name="line236">236: </a>    VecDot(vj,v,&tmp);
+<a name="line237">237: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->V,j,&vj);
+<a name="line238">238: </a>    <font color="#4169E1">if</font> (ctx->useconj) sum += PetscRealPart(tmp)*2;
+<a name="line239">239: </a>    <font color="#4169E1">else</font> sum += tmp;
+<a name="line240">240: </a>  }
+<a name="line241">241: </a>  ctx->est_eig = PetscAbsScalar(sum/(PetscReal)ctx->L);
+<a name="line242">242: </a>  eta = PetscPowReal(10,-PetscLog10Real(nep->tol)/ctx->N);
+<a name="line243">243: </a>  PetscInfo1(nep,<font color="#666666">"Estimation_#Eig %f\n"</font>,(double)ctx->est_eig);
+<a name="line244">244: </a>  *L_add = (PetscInt)PetscCeilReal((ctx->est_eig*eta)/ctx->M) - ctx->L;
+<a name="line245">245: </a>  <font color="#4169E1">if</font> (*L_add < 0) *L_add = 0;
+<a name="line246">246: </a>  <font color="#4169E1">if</font> (*L_add>ctx->L_max-ctx->L) {
+<a name="line247">247: </a>    PetscInfo(nep,<font color="#666666">"Number of eigenvalues around the contour path may be too large\n"</font>);
+<a name="line248">248: </a>    *L_add = ctx->L_max-ctx->L;
+<a name="line249">249: </a>  }
+<a name="line250">250: </a>  VecDestroy(&v);
+<a name="line251">251: </a>  VecDestroy(&vtemp);
+<a name="line252">252: </a>  <font color="#4169E1">return</font>(0);
+<a name="line253">253: </a>}
+
+<a name="line257">257: </a><strong><font color="#4169E1"><a name="CalcMu"></a>static PetscErrorCode CalcMu(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep, PetscScalar *Mu)</font></strong>
+<a name="line258">258: </a>{
+<a name="line260">260: </a>  PetscMPIInt    sub_size,len;
+<a name="line261">261: </a>  PetscInt       i,j,k,s;
+<a name="line262">262: </a>  PetscScalar    *m,*temp,*temp2,*ppk,alp;
+<a name="line263">263: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line264">264: </a>  Mat            M;
+
+<a name="line267">267: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscSubcommChild(ctx->subcomm),&sub_size);
+<a name="line268">268: </a>  PetscMalloc3(ctx->num_solve_point*ctx->L*(ctx->L+1),&temp,2*ctx->M*ctx->L*ctx->L,&temp2,ctx->num_solve_point,&ppk);
+<a name="line269">269: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ctx->L,ctx->L_max*ctx->num_solve_point,NULL,&M);
+<a name="line270">270: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] = 0;
+<a name="line271">271: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,0,ctx->L_max*ctx->num_solve_point);
+<a name="line272">272: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->V,0,ctx->L);
+<a name="line273">273: </a>  <a href="../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(ctx->Y,ctx->V,M);
+<a name="line274">274: </a>  MatDenseGetArray(M,&m);
+<a name="line275">275: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line276">276: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line277">277: </a>      <font color="#4169E1">for</font> (k=0;k<ctx->L;k++) {
+<a name="line278">278: </a>        temp[k+j*ctx->L+i*ctx->L*ctx->L]=m[k+j*ctx->L+i*ctx->L*ctx->L_max];
+<a name="line279">279: </a>      }
+<a name="line280">280: </a>    }
+<a name="line281">281: </a>  }
+<a name="line282">282: </a>  MatDenseRestoreArray(M,&m);
+<a name="line283">283: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
+<a name="line284">284: </a>  <font color="#4169E1">for</font> (k=0;k<2*ctx->M;k++) {
+<a name="line285">285: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line286">286: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line287">287: </a>        alp = ppk[i]*ctx->weight[i*ctx->subcomm->n + ctx->subcomm_id];
+<a name="line288">288: </a>        <font color="#4169E1">for</font> (s=0;s<ctx->L;s++) {
+<a name="line289">289: </a>          <font color="#4169E1">if</font> (ctx->useconj) temp2[s+(j+k*ctx->L)*ctx->L] += PetscRealPart(alp*temp[s+(j+i*ctx->L)*ctx->L])*2;
+<a name="line290">290: </a>          <font color="#4169E1">else</font> temp2[s+(j+k*ctx->L)*ctx->L] += alp*temp[s+(j+i*ctx->L)*ctx->L];
+<a name="line291">291: </a>        }
+<a name="line292">292: </a>      }
+<a name="line293">293: </a>    }
+<a name="line294">294: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) 
+<a name="line295">295: </a>      ppk[i] *= ctx->pp[i*ctx->subcomm->n + ctx->subcomm_id];
+<a name="line296">296: </a>  }
+<a name="line297">297: </a>  <font color="#4169E1">for</font> (i=0;i<2*ctx->M*ctx->L*ctx->L;i++) temp2[i] /= sub_size;
+<a name="line298">298: </a>  PetscMPIIntCast(2*ctx->M*ctx->L*ctx->L,&len);
+<a name="line299">299: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(temp2,Mu,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)nep));
+<a name="line300">300: </a>  PetscFree3(temp,temp2,ppk);
+<a name="line301">301: </a>  MatDestroy(&M);
+<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
+<a name="line303">303: </a>}
+
+<a name="line307">307: </a><strong><font color="#4169E1"><a name="BlockHankel"></a>static PetscErrorCode BlockHankel(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *Mu,PetscInt s,PetscScalar *H)</font></strong>
+<a name="line308">308: </a>{
+<a name="line309">309: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+<a name="line310">310: </a>  PetscInt  i,j,k,L=ctx->L,M=ctx->M;
+
+<a name="line313">313: </a>  <font color="#4169E1">for</font> (k=0;k<L*M;k++)
+<a name="line314">314: </a>    <font color="#4169E1">for</font> (j=0;j<M;j++) 
+<a name="line315">315: </a>      <font color="#4169E1">for</font> (i=0;i<L;i++) 
+<a name="line316">316: </a>        H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
+<a name="line317">317: </a>  <font color="#4169E1">return</font>(0);
+<a name="line318">318: </a>}
+
+<a name="line322">322: </a><strong><font color="#4169E1"><a name="SVD_H0"></a>static PetscErrorCode SVD_H0(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *S,PetscInt *K)</font></strong>
+<a name="line323">323: </a>{
+<a name="line324">324: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD)</font>
+<a name="line326">326: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
+<a name="line327">327: </a><font color="#A020F0">#else</font>
+<a name="line329">329: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line330">330: </a>  PetscInt       i,ml=ctx->L*ctx->M;
+<a name="line331">331: </a>  PetscBLASInt   m,n,lda,ldu,ldvt,lwork,info;
+<a name="line332">332: </a>  PetscScalar    *work;
+<a name="line333">333: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line334">334: </a>  PetscReal      *rwork;
+<a name="line335">335: </a><font color="#A020F0">#endif</font>
+
+<a name="line338">338: </a>  PetscMalloc1(5*ml,&work);
+<a name="line339">339: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line340">340: </a>  PetscMalloc1(5*ml,&rwork);
+<a name="line341">341: </a><font color="#A020F0">#endif</font>
+<a name="line342">342: </a>  PetscBLASIntCast(ml,&m);
+<a name="line343">343: </a>  n = m; lda = m; ldu = m; ldvt = m; lwork = 5*m;
+<a name="line344">344: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line345">345: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line346">346: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,rwork,&info));
+<a name="line347">347: </a><font color="#A020F0">#else</font>
+<a name="line348">348: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,S,&lda,ctx->sigma,NULL,&ldu,NULL,&ldvt,work,&lwork,&info));
+<a name="line349">349: </a><font color="#A020F0">#endif</font>
+<a name="line350">350: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+<a name="line351">351: </a>  PetscFPTrapPop();
+<a name="line352">352: </a>  (*K) = 0;
+<a name="line353">353: </a>  <font color="#4169E1">for</font> (i=0;i<ml;i++) {
+<a name="line354">354: </a>    <font color="#4169E1">if</font> (ctx->sigma[i]/PetscMax(ctx->sigma[0],1)>ctx->delta) (*K)++;
+<a name="line355">355: </a>  }
+<a name="line356">356: </a>  PetscFree(work);
+<a name="line357">357: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line358">358: </a>  PetscFree(rwork);
+<a name="line359">359: </a><font color="#A020F0">#endif</font>
+<a name="line360">360: </a>  <font color="#4169E1">return</font>(0);
+<a name="line361">361: </a><font color="#A020F0">#endif</font>
+<a name="line362">362: </a>}
+
+<a name="line366">366: </a><strong><font color="#4169E1"><a name="ConstructS"></a>static PetscErrorCode ConstructS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line367">367: </a>{
+<a name="line369">369: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line370">370: </a>  PetscInt       i,j,k,vec_local_size,p_id;
+<a name="line371">371: </a>  Vec            v,sj,yj;
+<a name="line372">372: </a>  PetscScalar    *ppk, *v_data, m = 1;
+
+<a name="line375">375: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(ctx->Y,&vec_local_size,NULL,NULL);
+<a name="line376">376: </a>  PetscMalloc1(ctx->num_solve_point,&ppk);
+<a name="line377">377: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) ppk[i] = 1;
+<a name="line378">378: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->Y,0,&yj);
+<a name="line379">379: </a>  VecDuplicate(yj,&v);
+<a name="line380">380: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->Y,0,&yj);
+<a name="line381">381: </a>  <font color="#4169E1">for</font> (k=0;k<ctx->M;k++) {
+<a name="line382">382: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->L;j++) {
+<a name="line383">383: </a>      VecSet(v,0);
+<a name="line384">384: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line385">385: </a>        p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line386">386: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->Y,i*ctx->L_max+j,i*ctx->L_max+j+1);
+<a name="line387">387: </a>        <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->Y,ppk[i]*ctx->weight[p_id],1,v,&m);
+<a name="line388">388: </a>      }
+<a name="line389">389: </a>      <font color="#4169E1">if</font> (ctx->useconj) {
+<a name="line390">390: </a>        VecGetArray(v,&v_data);
+<a name="line391">391: </a>        <font color="#4169E1">for</font> (i=0;i<vec_local_size;i++) v_data[i] = PetscRealPart(v_data[i])*2;
+<a name="line392">392: </a>        VecRestoreArray(v,&v_data);
+<a name="line393">393: </a>      }
+<a name="line394">394: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->S,k*ctx->L+j,&sj);
+<a name="line395">395: </a>      VecCopy(v,sj);
+<a name="line396">396: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->S,k*ctx->L+j,&sj);
+<a name="line397">397: </a>    }
+<a name="line398">398: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line399">399: </a>      p_id = i*ctx->subcomm->n + ctx->subcomm_id;
+<a name="line400">400: </a>      ppk[i] *= ctx->pp[p_id];
+<a name="line401">401: </a>    }
+<a name="line402">402: </a>  }
+<a name="line403">403: </a>  PetscFree(ppk);
+<a name="line404">404: </a>  VecDestroy(&v);
+<a name="line405">405: </a>  <font color="#4169E1">return</font>(0);
+<a name="line406">406: </a>}
+
+<a name="line410">410: </a><strong><font color="#4169E1"><a name="isGhost"></a>static PetscErrorCode isGhost(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ld,PetscInt nv,PetscBool *fl)</font></strong>
+<a name="line411">411: </a>{
+<a name="line413">413: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line414">414: </a>  PetscInt       i,j;
+<a name="line415">415: </a>  PetscScalar    *pX;
+<a name="line416">416: </a>  PetscReal      *tau,s1,s2,tau_max=0.0;
+
+<a name="line419">419: </a>  PetscMalloc1(nv,&tau);
+<a name="line420">420: </a>  <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
+<a name="line421">421: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_X,&pX);
+
+<a name="line423">423: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line424">424: </a>    s1 = 0;
+<a name="line425">425: </a>    s2 = 0;
+<a name="line426">426: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) {
+<a name="line427">427: </a>      s1 += PetscAbsScalar(PetscPowScalar(pX[i*ld+j],2));
+<a name="line428">428: </a>      s2 += PetscPowReal(PetscAbsScalar(pX[i*ld+j]),2)/ctx->sigma[j];
+<a name="line429">429: </a>    }
+<a name="line430">430: </a>    tau[i] = s1/s2;
+<a name="line431">431: </a>    tau_max = PetscMax(tau_max,tau[i]);
+<a name="line432">432: </a>  }
+<a name="line433">433: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_X,&pX);
+<a name="line434">434: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line435">435: </a>    tau[i] /= tau_max;
+<a name="line436">436: </a>  }
+<a name="line437">437: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line438">438: </a>    <font color="#4169E1">if</font> (tau[i]>=ctx->spurious_threshold) fl[i] = PETSC_TRUE;
+<a name="line439">439: </a>    <font color="#4169E1">else</font> fl[i] = PETSC_FALSE;
+<a name="line440">440: </a>  }
+<a name="line441">441: </a>  PetscFree(tau);
+<a name="line442">442: </a>  <font color="#4169E1">return</font>(0);
+<a name="line443">443: </a>}
+
+<a name="line447">447: </a><strong><font color="#4169E1"><a name="NEPSetUp_CISS"></a>PetscErrorCode NEPSetUp_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line448">448: </a>{
+<a name="line450">450: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line451">451: </a>  PetscInt       i,nwork;
+<a name="line452">452: </a>  PetscBool      istrivial,isellipse,flg;
+<a name="line453">453: </a>  PetscScalar    center;
+
+<a name="line456">456: </a>  <font color="#4169E1">if</font> (!nep->ncv) nep->ncv = ctx->L_max*ctx->M;
+<a name="line457">457: </a>  <font color="#4169E1">else</font> {
+<a name="line458">458: </a>    ctx->L_max = nep->ncv/ctx->M;
+<a name="line459">459: </a>    <font color="#4169E1">if</font> (ctx->L_max == 0) {
+<a name="line460">460: </a>      ctx->L_max = 1;
+<a name="line461">461: </a>      nep->ncv = ctx->L_max*ctx->M;
+<a name="line462">462: </a>    }
+<a name="line463">463: </a>    <font color="#4169E1">if</font> (ctx->L > ctx->L_max) ctx->L = ctx->L_max;
+<a name="line464">464: </a>  }
+<a name="line465">465: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = 1;
+<a name="line466">466: </a>  <font color="#4169E1">if</font> (!nep->mpd) nep->mpd = nep->ncv;
+<a name="line467">467: </a>  <font color="#4169E1">if</font> (!nep->which) nep->which = NEP_ALL;
+<a name="line468">468: </a>  <font color="#4169E1">if</font> (nep->stopping!=<a href="../../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support user-defined stopping test"</font>);
+
+<a name="line470">470: </a>  <font color="#B22222">/* check region */</font>
+<a name="line471">471: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line472">472: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"CISS requires a nontrivial region, e.g. -rg_type ellipse ..."</font>);
+<a name="line473">473: </a>  <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>(nep->rg,&flg);
+<a name="line474">474: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"A region with complement flag set is not allowed"</font>);
+<a name="line475">475: </a>  PetscObjectTypeCompare((PetscObject)nep->rg,RGELLIPSE,&isellipse);
+<a name="line476">476: </a>  <font color="#4169E1">if</font> (!isellipse) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Currently only implemented for elliptic or arc regions"</font>);
+<a name="line477">477: </a>  <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(nep->rg,&center,NULL,NULL);
+<a name="line478">478: </a>  <font color="#4169E1">if</font> (ctx->isreal && PetscImaginaryPart(center) == 0.0) ctx->useconj = PETSC_TRUE;
+<a name="line479">479: </a>  <font color="#4169E1">else</font> ctx->useconj = PETSC_FALSE;
+
+<a name="line481">481: </a>  <font color="#B22222">/* create split comm */</font>
+<a name="line482">482: </a>  ctx->num_subcomm = 1;
+<a name="line483">483: </a>  SetSolverComm(nep);
+
+<a name="line485">485: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
+<a name="line486">486: </a>  PetscMalloc4(ctx->N,&ctx->weight,ctx->N,&ctx->omega,ctx->N,&ctx->pp,ctx->L_max*ctx->M,&ctx->sigma);
+<a name="line487">487: </a>  PetscLogObjectMemory((PetscObject)nep,3*ctx->N*<font color="#4169E1">sizeof</font>(PetscScalar)+ctx->L_max*ctx->N*<font color="#4169E1">sizeof</font>(PetscReal));
+
+<a name="line489">489: </a>  <font color="#B22222">/* allocate basis vectors */</font>
+<a name="line490">490: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,ctx->L_max*ctx->M,&ctx->S);
+<a name="line491">491: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->S);
+<a name="line492">492: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,ctx->L_max,&ctx->V);
+<a name="line493">493: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->V);
+
+<a name="line495">495: </a>  <font color="#4169E1">if</font> (!ctx->usest) {
+<a name="line496">496: </a>    PetscMalloc2(ctx->num_solve_point,&ctx->ksp,ctx->num_solve_point,&ctx->kspMat);
+<a name="line497">497: </a>    PetscLogObjectMemory((PetscObject)nep,ctx->num_solve_point*<font color="#4169E1">sizeof</font>(KSP)+ctx->num_solve_point*<font color="#4169E1">sizeof</font>(Mat));
+<a name="line498">498: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line499">499: </a>      KSPCreate(PetscSubcommChild(ctx->subcomm),&ctx->ksp[i]);
+<a name="line500">500: </a>      PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)nep,1);
+<a name="line501">501: </a>      PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp[i]);
+<a name="line502">502: </a>      KSPSetOptionsPrefix(ctx->ksp[i],((PetscObject)nep)->prefix);
+<a name="line503">503: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],<font color="#666666">"nep_ciss_"</font>);
+<a name="line504">504: </a>      KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);
+<a name="line505">505: </a>    }
+<a name="line506">506: </a>  }
+
+<a name="line508">508: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,ctx->num_solve_point*ctx->L_max,&ctx->Y);
+
+<a name="line510">510: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(nep->ds,DSGNHEP);
+<a name="line511">511: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(nep->ds,nep->ncv);
+<a name="line512">512: </a>  nwork = (nep->fui==NEP_USER_INTERFACE_SPLIT)? 2: 1;
+<a name="line513">513: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,nwork);
+<a name="line514">514: </a>  <font color="#4169E1">return</font>(0);
+<a name="line515">515: </a>}
+
+<a name="line519">519: </a><strong><font color="#4169E1"><a name="NEPSolve_CISS"></a>PetscErrorCode NEPSolve_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line520">520: </a>{
+<a name="line522">522: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line523">523: </a>  Mat            X,M;
+<a name="line524">524: </a>  PetscInt       i,j,ld,L_add=0,nv=0,L_base=ctx->L,inner,*inside;
+<a name="line525">525: </a>  PetscScalar    *Mu,*H0,*H1,*rr,*temp,center;
+<a name="line526">526: </a>  PetscReal      error,max_error,radius,rgscale;
+<a name="line527">527: </a>  PetscBool      *fl1;
+<a name="line528">528: </a>  Vec            si;
+<a name="line529">529: </a>  SlepcSC        sc;
+<a name="line530">530: </a>  PetscRandom    rand;
+
+<a name="line533">533: </a>  <a href="../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(nep->ds,&sc);
+<a name="line534">534: </a>  sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line535">535: </a>  sc->comparisonctx = NULL;
+<a name="line536">536: </a>  sc->map           = NULL;
+<a name="line537">537: </a>  sc->mapobj        = NULL;
+<a name="line538">538: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(nep->ds,&ld);
+<a name="line539">539: </a>  SetPathParameter(nep);
+<a name="line540">540: </a>  CISSVecSetRandom(ctx->V,0,ctx->L);
+<a name="line541">541: </a>  <a href="../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(ctx->V,&rand);
+
+<a name="line543">543: </a>  SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_TRUE);
+<a name="line544">544: </a>  EstimateNumberEigs(nep,&L_add);
+<a name="line545">545: </a>  <font color="#4169E1">if</font> (L_add>0) {
+<a name="line546">546: </a>    PetscInfo2(nep,<font color="#666666">"Changing L %D -> %D by Estimate #Eig\n"</font>,ctx->L,ctx->L+L_add);
+<a name="line547">547: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);
+<a name="line548">548: </a>    SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
+<a name="line549">549: </a>    ctx->L += L_add;
+<a name="line550">550: </a>  }
+<a name="line551">551: </a>  PetscMalloc2(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0);
+<a name="line552">552: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->refine_blocksize;i++) {
+<a name="line553">553: </a>    CalcMu(nep,Mu);
+<a name="line554">554: </a>    BlockHankel(nep,Mu,0,H0);
+<a name="line555">555: </a>    SVD_H0(nep,H0,&nv);
+<a name="line556">556: </a>    <font color="#4169E1">if</font> (ctx->sigma[0]<=ctx->delta || nv < ctx->L*ctx->M || ctx->L == ctx->L_max) <font color="#4169E1">break</font>;
+<a name="line557">557: </a>    L_add = L_base;
+<a name="line558">558: </a>    <font color="#4169E1">if</font> (ctx->L+L_add>ctx->L_max) L_add = ctx->L_max-ctx->L;
+<a name="line559">559: </a>    PetscInfo2(nep,<font color="#666666">"Changing L %D -> %D by <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>(H0)\n"</font>,ctx->L,ctx->L+L_add);
+<a name="line560">560: </a>    CISSVecSetRandom(ctx->V,ctx->L,ctx->L+L_add);
+<a name="line561">561: </a>    SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,ctx->L,ctx->L+L_add,PETSC_FALSE);
+<a name="line562">562: </a>    ctx->L += L_add;
+<a name="line563">563: </a>  }
+<a name="line564">564: </a>  PetscFree2(Mu,H0);
+
+<a name="line566">566: </a>  <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(nep->rg,&rgscale);
+<a name="line567">567: </a>  <a href="../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(nep->rg,&center,&radius,NULL);
+
+<a name="line569">569: </a>  PetscMalloc3(ctx->L*ctx->L*ctx->M*2,&Mu,ctx->L*ctx->M*ctx->L*ctx->M,&H0,ctx->L*ctx->M*ctx->L*ctx->M,&H1);
+<a name="line570">570: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line571">571: </a>    nep->its++;
+<a name="line572">572: </a>    <font color="#4169E1">for</font> (inner=0;inner<=ctx->refine_inner;inner++) {
+<a name="line573">573: </a>      CalcMu(nep,Mu);
+<a name="line574">574: </a>      BlockHankel(nep,Mu,0,H0);
+<a name="line575">575: </a>      SVD_H0(nep,H0,&nv);
+<a name="line576">576: </a>      <font color="#4169E1">if</font> (ctx->sigma[0]>ctx->delta && nv==ctx->L*ctx->M && inner!=ctx->refine_inner) {
+<a name="line577">577: </a>        ConstructS(nep);
+<a name="line578">578: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
+<a name="line579">579: </a>        <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
+<a name="line580">580: </a>        SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);
+<a name="line581">581: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line582">582: </a>    }
+
+<a name="line584">584: </a>    nep->nconv = 0;
+<a name="line585">585: </a>    <font color="#4169E1">if</font> (nv == 0) <font color="#4169E1">break</font>;
+<a name="line586">586: </a>    BlockHankel(nep,Mu,0,H0);
+<a name="line587">587: </a>    BlockHankel(nep,Mu,1,H1);
+<a name="line588">588: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,nv,0,0,0);
+<a name="line589">589: </a>    <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_RAW);
+<a name="line590">590: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_A,&temp);
+<a name="line591">591: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++)
+<a name="line592">592: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++)
+<a name="line593">593: </a>        temp[i+j*ld] = H1[i+j*ctx->L*ctx->M];
+<a name="line594">594: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_A,&temp);
+<a name="line595">595: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_B,&temp);
+<a name="line596">596: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) 
+<a name="line597">597: </a>      <font color="#4169E1">for</font> (i=0;i<nv;i++)
+<a name="line598">598: </a>        temp[i+j*ld] = H0[i+j*ctx->L*ctx->M];
+<a name="line599">599: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_B,&temp);
+<a name="line600">600: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(nep->ds,nep->eigr,nep->eigi);
+<a name="line601">601: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
+<a name="line602">602: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++){
+<a name="line603">603: </a>      nep->eigr[i] = (nep->eigr[i]*radius+center)*rgscale;
+<a name="line604">604: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line605">605: </a>      nep->eigi[i] = nep->eigi[i]*radius*rgscale;
+<a name="line606">606: </a><font color="#A020F0">#endif</font>
+<a name="line607">607: </a>    }
+<a name="line608">608: </a>    PetscMalloc3(nv,&fl1,nv,&inside,nv,&rr);
+<a name="line609">609: </a>    isGhost(nep,ld,nv,fl1);
+<a name="line610">610: </a>    <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(nep->rg,nv,nep->eigr,nep->eigi,inside);
+<a name="line611">611: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line612">612: </a>      <font color="#4169E1">if</font> (fl1[i] && inside[i]>0) {
+<a name="line613">613: </a>        rr[i] = 1.0;
+<a name="line614">614: </a>        nep->nconv++;
+<a name="line615">615: </a>      } <font color="#4169E1">else</font> rr[i] = 0.0;
+<a name="line616">616: </a>    }
+<a name="line617">617: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(nep->ds,nep->eigr,nep->eigi,rr,NULL,&nep->nconv);
+<a name="line618">618: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++){
+<a name="line619">619: </a>      nep->eigr[i] = (nep->eigr[i]*radius+center)*rgscale;
+<a name="line620">620: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line621">621: </a>      nep->eigi[i] = nep->eigi[i]*radius*rgscale;
+<a name="line622">622: </a><font color="#A020F0">#endif</font>
+<a name="line623">623: </a>    }
+<a name="line624">624: </a>    PetscFree3(fl1,inside,rr);
+<a name="line625">625: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,nv);
+<a name="line626">626: </a>    ConstructS(nep);
+<a name="line627">627: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
+<a name="line628">628: </a>    <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,nep->V);
+
+<a name="line630">630: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
+<a name="line631">631: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(nep->ds,DS_MAT_X,&X);
+<a name="line632">632: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,X,0,nep->nconv);
+<a name="line633">633: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(nep->V,X,0,nep->nconv);
+<a name="line634">634: </a>    MatDestroy(&X);
+<a name="line635">635: </a>    max_error = 0.0;
+<a name="line636">636: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line637">637: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,i,&si);
+<a name="line638">638: </a>      VecNormalize(si,NULL);
+<a name="line639">639: </a>      NEPComputeResidualNorm_Private(nep,nep->eigr[i],si,nep->work,&error);
+<a name="line640">640: </a>      (*nep->converged)(nep,nep->eigr[i],0,error,&error,nep->convergedctx);
+<a name="line641">641: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,i,&si);
+<a name="line642">642: </a>      max_error = PetscMax(max_error,error);
+<a name="line643">643: </a>    }
+<a name="line644">644: </a>    <font color="#4169E1">if</font> (max_error <= nep->tol) nep->reason = NEP_CONVERGED_TOL;
+<a name="line645">645: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->its > nep->max_it) nep->reason = NEP_DIVERGED_ITS;
+<a name="line646">646: </a>    <font color="#4169E1">else</font> {
+<a name="line647">647: </a>      <font color="#4169E1">if</font> (nep->nconv > ctx->L) nv = nep->nconv;
+<a name="line648">648: </a>      <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->L > nv) nv = ctx->L;
+<a name="line649">649: </a>      MatCreateSeqDense(PETSC_COMM_SELF,nv,ctx->L,NULL,&M);
+<a name="line650">650: </a>      MatDenseGetArray(M,&temp);
+<a name="line651">651: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->L*nv;i++) {
+<a name="line652">652: </a>        PetscRandomGetValue(rand,&temp[i]);
+<a name="line653">653: </a>        temp[i] = PetscRealPart(temp[i]);
+<a name="line654">654: </a>      }
+<a name="line655">655: </a>      MatDenseRestoreArray(M,&temp);
+<a name="line656">656: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,nv);
+<a name="line657">657: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(ctx->S,M,0,ctx->L);
+<a name="line658">658: </a>      MatDestroy(&M);
+<a name="line659">659: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->S,0,ctx->L);
+<a name="line660">660: </a>      <a href="../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(ctx->S,ctx->V);
+<a name="line661">661: </a>      SolveLinearSystem(nep,nep->function,nep->jacobian,ctx->V,0,ctx->L,PETSC_FALSE);
+<a name="line662">662: </a>    }
+<a name="line663">663: </a>  }
+<a name="line664">664: </a>  PetscFree3(Mu,H0,H1);  
+<a name="line665">665: </a>  <font color="#4169E1">return</font>(0);
+<a name="line666">666: </a>}
+
+<a name="line670">670: </a><strong><font color="#4169E1"><a name="NEPCISSSetSizes_CISS"></a>static PetscErrorCode NEPCISSSetSizes_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)</font></strong>
+<a name="line671">671: </a>{
+<a name="line672">672: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+
+<a name="line675">675: </a>  <font color="#4169E1">if</font> (ip == PETSC_DECIDE || ip == PETSC_DEFAULT) {
+<a name="line676">676: </a>    <font color="#4169E1">if</font> (ctx->N!=32) { ctx->N =32; ctx->M = ctx->N/4; }
+<a name="line677">677: </a>  } <font color="#4169E1">else</font> {
+<a name="line678">678: </a>    <font color="#4169E1">if</font> (ip<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be > 0"</font>);
+<a name="line679">679: </a>    <font color="#4169E1">if</font> (ip%2) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ip argument must be an even number"</font>);
+<a name="line680">680: </a>    <font color="#4169E1">if</font> (ctx->N!=ip) { ctx->N = ip; ctx->M = ctx->N/4; }
+<a name="line681">681: </a>  }
+<a name="line682">682: </a>  <font color="#4169E1">if</font> (bs == PETSC_DECIDE || bs == PETSC_DEFAULT) {
+<a name="line683">683: </a>    ctx->L = 16;
+<a name="line684">684: </a>  } <font color="#4169E1">else</font> {
+<a name="line685">685: </a>    <font color="#4169E1">if</font> (bs<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be > 0"</font>);
+<a name="line686">686: </a>    <font color="#4169E1">if</font> (bs>ctx->L_max) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bs argument must be less than or equal to the maximum number of block size"</font>);
+<a name="line687">687: </a>    ctx->L = bs;
+<a name="line688">688: </a>  }
+<a name="line689">689: </a>  <font color="#4169E1">if</font> (ms == PETSC_DECIDE || ms == PETSC_DEFAULT) {
+<a name="line690">690: </a>    ctx->M = ctx->N/4;
+<a name="line691">691: </a>  } <font color="#4169E1">else</font> {
+<a name="line692">692: </a>    <font color="#4169E1">if</font> (ms<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be > 0"</font>);
+<a name="line693">693: </a>    <font color="#4169E1">if</font> (ms>ctx->N) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The ms argument must be less than or equal to the number of integration points"</font>);
+<a name="line694">694: </a>    ctx->M = ms;
+<a name="line695">695: </a>  }
+<a name="line696">696: </a>  <font color="#4169E1">if</font> (npart == PETSC_DECIDE || npart == PETSC_DEFAULT) {
+<a name="line697">697: </a>    ctx->num_subcomm = 1;
+<a name="line698">698: </a>  } <font color="#4169E1">else</font> {
+<a name="line699">699: </a>    <font color="#4169E1">if</font> (npart<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The npart argument must be > 0"</font>);
+<a name="line700">700: </a>    ctx->num_subcomm = npart;
+<a name="line701">701: </a>  }
+<a name="line702">702: </a>  <font color="#4169E1">if</font> (bsmax == PETSC_DECIDE || bsmax == PETSC_DEFAULT) {
+<a name="line703">703: </a>    ctx->L = 256;
+<a name="line704">704: </a>  } <font color="#4169E1">else</font> {
+<a name="line705">705: </a>    <font color="#4169E1">if</font> (bsmax<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The bsmax argument must be > 0"</font>);
+<a name="line706">706: </a>    <font color="#4169E1">if</font> (bsmax<ctx->L) ctx->L_max = ctx->L;
+<a name="line707">707: </a>    <font color="#4169E1">else</font> ctx->L_max = bsmax;
+<a name="line708">708: </a>  }
+<a name="line709">709: </a>  ctx->isreal = realmats;
+<a name="line710">710: </a>  <font color="#4169E1">return</font>(0);
+<a name="line711">711: </a>}
+
+<a name="line715">715: </a><font color="#B22222">/*@</font>
+<a name="line716">716: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a> - Sets the values of various size parameters in the CISS solver.</font>
+
+<a name="line718">718: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line720">720: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line721">721: </a><font color="#B22222">+  nep   - the eigenproblem solver context</font>
+<a name="line722">722: </a><font color="#B22222">.  ip    - number of integration points</font>
+<a name="line723">723: </a><font color="#B22222">.  bs    - block size</font>
+<a name="line724">724: </a><font color="#B22222">.  ms    - moment size</font>
+<a name="line725">725: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
+<a name="line726">726: </a><font color="#B22222">.  bsmax - max block size</font>
+<a name="line727">727: </a><font color="#B22222">-  realmats - T(z) is real for real z</font>
+
+<a name="line729">729: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line730">730: </a><font color="#B22222">+  -nep_ciss_integration_points - Sets the number of integration points</font>
+<a name="line731">731: </a><font color="#B22222">.  -nep_ciss_blocksize - Sets the block size</font>
+<a name="line732">732: </a><font color="#B22222">.  -nep_ciss_moments - Sets the moment size</font>
+<a name="line733">733: </a><font color="#B22222">.  -nep_ciss_partitions - Sets the number of partitions</font>
+<a name="line734">734: </a><font color="#B22222">.  -nep_ciss_maxblocksize - Sets the maximum block size</font>
+<a name="line735">735: </a><font color="#B22222">-  -nep_ciss_realmats - T(z) is real for real z</font>
+
+<a name="line737">737: </a><font color="#B22222">   Note:</font>
+<a name="line738">738: </a><font color="#B22222">   The default number of partitions is 1. This means the internal KSP object is shared</font>
+<a name="line739">739: </a><font color="#B22222">   among all processes of the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> communicator. Otherwise, the communicator is split</font>
+<a name="line740">740: </a><font color="#B22222">   into npart communicators, so that npart KSP solves proceed simultaneously.</font>
+
+<a name="line742">742: </a><font color="#B22222">   The realmats flag can be set to true when T(.) is guaranteed to be real</font>
+<a name="line743">743: </a><font color="#B22222">   when the argument is a real value, for example, when all matrices in</font>
+<a name="line744">744: </a><font color="#B22222">   the split form are real. When set to true, the solver avoids some computations.</font>
+
+<a name="line746">746: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line748">748: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>()</font>
+<a name="line749">749: </a><font color="#B22222">@*/</font>
+<a name="line750">750: </a><strong><font color="#4169E1"><a name="NEPCISSSetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ip,PetscInt bs,PetscInt ms,PetscInt npart,PetscInt bsmax,PetscBool realmats)</font></strong>
+<a name="line751">751: </a>{
+
+<a name="line762">762: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSSetSizes_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool),(nep,ip,bs,ms,npart,bsmax,realmats));
+<a name="line763">763: </a>  <font color="#4169E1">return</font>(0);
+<a name="line764">764: </a>}
+
+<a name="line768">768: </a><strong><font color="#4169E1"><a name="NEPCISSGetSizes_CISS"></a>static PetscErrorCode NEPCISSGetSizes_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)</font></strong>
+<a name="line769">769: </a>{
+<a name="line770">770: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+
+<a name="line773">773: </a>  <font color="#4169E1">if</font> (ip) *ip = ctx->N;
+<a name="line774">774: </a>  <font color="#4169E1">if</font> (bs) *bs = ctx->L;
+<a name="line775">775: </a>  <font color="#4169E1">if</font> (ms) *ms = ctx->M;
+<a name="line776">776: </a>  <font color="#4169E1">if</font> (npart) *npart = ctx->num_subcomm;
+<a name="line777">777: </a>  <font color="#4169E1">if</font> (bsmax) *bsmax = ctx->L_max;
+<a name="line778">778: </a>  <font color="#4169E1">if</font> (realmats) *realmats = ctx->isreal;
+<a name="line779">779: </a>  <font color="#4169E1">return</font>(0);
+<a name="line780">780: </a>}
+
+<a name="line784">784: </a><font color="#B22222">/*@</font>
+<a name="line785">785: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a> - Gets the values of various size parameters in the CISS solver.</font>
+
+<a name="line787">787: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line789">789: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line790">790: </a><font color="#B22222">.  nep - the eigenproblem solver context</font>
+
+<a name="line792">792: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line793">793: </a><font color="#B22222">+  ip    - number of integration points</font>
+<a name="line794">794: </a><font color="#B22222">.  bs    - block size</font>
+<a name="line795">795: </a><font color="#B22222">.  ms    - moment size</font>
+<a name="line796">796: </a><font color="#B22222">.  npart - number of partitions when splitting the communicator</font>
+<a name="line797">797: </a><font color="#B22222">.  bsmax - max block size</font>
+<a name="line798">798: </a><font color="#B22222">-  realmats - T(z) is real for real z</font>
+
+<a name="line800">800: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line802">802: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>()</font>
+<a name="line803">803: </a><font color="#B22222">@*/</font>
+<a name="line804">804: </a><strong><font color="#4169E1"><a name="NEPCISSGetSizes"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *ip,PetscInt *bs,PetscInt *ms,PetscInt *npart,PetscInt *bsmax,PetscBool *realmats)</font></strong>
+<a name="line805">805: </a>{
+
+<a name="line810">810: </a>  PetscUseMethod(nep,<font color="#666666">"NEPCISSGetSizes_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*),(nep,ip,bs,ms,npart,bsmax,realmats));
+<a name="line811">811: </a>  <font color="#4169E1">return</font>(0);
+<a name="line812">812: </a>}
+
+<a name="line816">816: </a><strong><font color="#4169E1"><a name="NEPCISSSetThreshold_CISS"></a>static PetscErrorCode NEPCISSSetThreshold_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal delta,PetscReal spur)</font></strong>
+<a name="line817">817: </a>{
+<a name="line818">818: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+
+<a name="line821">821: </a>  <font color="#4169E1">if</font> (delta == PETSC_DEFAULT) {
+<a name="line822">822: </a>    ctx->delta = 1e-12;
+<a name="line823">823: </a>  } <font color="#4169E1">else</font> {
+<a name="line824">824: </a>    <font color="#4169E1">if</font> (delta<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The delta argument must be > 0.0"</font>);
+<a name="line825">825: </a>    ctx->delta = delta;
+<a name="line826">826: </a>  }
+<a name="line827">827: </a>  <font color="#4169E1">if</font> (spur == PETSC_DEFAULT) {
+<a name="line828">828: </a>    ctx->spurious_threshold = 1e-4;
+<a name="line829">829: </a>  } <font color="#4169E1">else</font> {
+<a name="line830">830: </a>    <font color="#4169E1">if</font> (spur<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The spurious threshold argument must be > 0.0"</font>);
+<a name="line831">831: </a>    ctx->spurious_threshold = spur;
+<a name="line832">832: </a>  }
+<a name="line833">833: </a>  <font color="#4169E1">return</font>(0);
+<a name="line834">834: </a>}
+
+<a name="line838">838: </a><font color="#B22222">/*@</font>
+<a name="line839">839: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a> - Sets the values of various threshold parameters in</font>
+<a name="line840">840: </a><font color="#B22222">   the CISS solver.</font>
+
+<a name="line842">842: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line844">844: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line845">845: </a><font color="#B22222">+  nep   - the eigenproblem solver context</font>
+<a name="line846">846: </a><font color="#B22222">.  delta - threshold for numerical rank</font>
+<a name="line847">847: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
+
+<a name="line849">849: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line850">850: </a><font color="#B22222">+  -nep_ciss_delta - Sets the delta</font>
+<a name="line851">851: </a><font color="#B22222">-  -nep_ciss_spurious_threshold - Sets the spurious threshold</font>
+
+<a name="line853">853: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line855">855: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>()</font>
+<a name="line856">856: </a><font color="#B22222">@*/</font>
+<a name="line857">857: </a><strong><font color="#4169E1"><a name="NEPCISSSetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal delta,PetscReal spur)</font></strong>
 <a name="line858">858: </a>{
-<a name="line859">859: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-
-<a name="line862">862: </a>  <font color="#4169E1">if</font> (delta) *delta = ctx->delta;
-<a name="line863">863: </a>  <font color="#4169E1">if</font> (spur)  *spur = ctx->spurious_threshold;
-<a name="line864">864: </a>  <font color="#4169E1">return</font>(0);
-<a name="line865">865: </a>}
-
-<a name="line869">869: </a><font color="#B22222">/*@</font>
-<a name="line870">870: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a> - Gets the values of various threshold parameters in</font>
-<a name="line871">871: </a><font color="#B22222">   the CISS solver.</font>
-
-<a name="line873">873: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line875">875: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line876">876: </a><font color="#B22222">.  nep - the eigenproblem solver context</font>
-
-<a name="line878">878: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line879">879: </a><font color="#B22222">+  delta - threshold for numerical rank</font>
-<a name="line880">880: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
-
-<a name="line882">882: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line884">884: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>()</font>
-<a name="line885">885: </a><font color="#B22222">@*/</font>
-<a name="line886">886: </a><strong><font color="#4169E1"><a name="NEPCISSGetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *delta,PetscReal *spur)</font></strong>
-<a name="line887">887: </a>{
-
-<a name="line892">892: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSGetThreshold_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscReal*),(nep,delta,spur));
-<a name="line893">893: </a>  <font color="#4169E1">return</font>(0);
-<a name="line894">894: </a>}
-
-<a name="line898">898: </a><strong><font color="#4169E1"><a name="NEPCISSSetRefinement_CISS"></a>static PetscErrorCode NEPCISSSetRefinement_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt inner,PetscInt outer,PetscInt blsize)</font></strong>
-<a name="line899">899: </a>{
-<a name="line900">900: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-
-<a name="line903">903: </a>  <font color="#4169E1">if</font> (inner == PETSC_DEFAULT) {
-<a name="line904">904: </a>    ctx->refine_inner = 0;
-<a name="line905">905: </a>  } <font color="#4169E1">else</font> {
-<a name="line906">906: </a>    <font color="#4169E1">if</font> (inner<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine inner argument must be >= 0"</font>);
-<a name="line907">907: </a>    ctx->refine_inner = inner;
-<a name="line908">908: </a>  }
-<a name="line909">909: </a>  <font color="#4169E1">if</font> (outer == PETSC_DEFAULT) {
-<a name="line910">910: </a>    ctx->refine_outer = 0;
-<a name="line911">911: </a>  } <font color="#4169E1">else</font> {
-<a name="line912">912: </a>    <font color="#4169E1">if</font> (outer<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine outer argument must be >= 0"</font>);
-<a name="line913">913: </a>    ctx->refine_outer = outer;
-<a name="line914">914: </a>  }
-<a name="line915">915: </a>  <font color="#4169E1">if</font> (blsize == PETSC_DEFAULT) {
-<a name="line916">916: </a>    ctx->refine_blocksize = 0;
-<a name="line917">917: </a>  } <font color="#4169E1">else</font> {
-<a name="line918">918: </a>    <font color="#4169E1">if</font> (blsize<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine blocksize argument must be >= 0"</font>);
-<a name="line919">919: </a>    ctx->refine_blocksize = blsize;
-<a name="line920">920: </a>  }
-<a name="line921">921: </a>  <font color="#4169E1">return</font>(0);
-<a name="line922">922: </a>}
-
-<a name="line926">926: </a><font color="#B22222">/*@</font>
-<a name="line927">927: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a> - Sets the values of various refinement parameters</font>
-<a name="line928">928: </a><font color="#B22222">   in the CISS solver.</font>
-
-<a name="line930">930: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line932">932: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line933">933: </a><font color="#B22222">+  nep    - the eigenproblem solver context</font>
-<a name="line934">934: </a><font color="#B22222">.  inner  - number of iterative refinement iterations (inner loop)</font>
-<a name="line935">935: </a><font color="#B22222">.  outer  - number of iterative refinement iterations (outer loop)</font>
-<a name="line936">936: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
-
-<a name="line938">938: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line939">939: </a><font color="#B22222">+  -nep_ciss_refine_inner - Sets number of inner iterations</font>
-<a name="line940">940: </a><font color="#B22222">.  -nep_ciss_refine_outer - Sets number of outer iterations</font>
-<a name="line941">941: </a><font color="#B22222">-  -nep_ciss_refine_blocksize - Sets number of blocksize iterations</font>
-
-<a name="line943">943: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line945">945: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>()</font>
-<a name="line946">946: </a><font color="#B22222">@*/</font>
-<a name="line947">947: </a><strong><font color="#4169E1"><a name="NEPCISSSetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt inner,PetscInt outer,PetscInt blsize)</font></strong>
-<a name="line948">948: </a>{
-
-<a name="line956">956: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSSetRefinement_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt),(nep,inner,outer,blsize));
-<a name="line957">957: </a>  <font color="#4169E1">return</font>(0);
-<a name="line958">958: </a>}
-
-<a name="line962">962: </a><strong><font color="#4169E1"><a name="NEPCISSGetRefinement_CISS"></a>static PetscErrorCode NEPCISSGetRefinement_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *inner,PetscInt *outer,PetscInt *blsize)</font></strong>
-<a name="line963">963: </a>{
-<a name="line964">964: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
-
-<a name="line967">967: </a>  <font color="#4169E1">if</font> (inner)  *inner = ctx->refine_inner;
-<a name="line968">968: </a>  <font color="#4169E1">if</font> (outer)  *outer = ctx->refine_outer;
-<a name="line969">969: </a>  <font color="#4169E1">if</font> (blsize) *blsize = ctx->refine_blocksize;
-<a name="line970">970: </a>  <font color="#4169E1">return</font>(0);
-<a name="line971">971: </a>}
-
-<a name="line975">975: </a><font color="#B22222">/*@</font>
-<a name="line976">976: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a> - Gets the values of various refinement parameters</font>
-<a name="line977">977: </a><font color="#B22222">   in the CISS solver.</font>
-
-<a name="line979">979: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line981">981: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line982">982: </a><font color="#B22222">.  nep - the eigenproblem solver context</font>
-
-<a name="line984">984: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line985">985: </a><font color="#B22222">+  inner  - number of iterative refinement iterations (inner loop)</font>
-<a name="line986">986: </a><font color="#B22222">.  outer  - number of iterative refinement iterations (outer loop)</font>
-<a name="line987">987: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
-
-<a name="line989">989: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line991">991: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>()</font>
-<a name="line992">992: </a><font color="#B22222">@*/</font>
-<a name="line993">993: </a><strong><font color="#4169E1"><a name="NEPCISSGetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep, PetscInt *inner, PetscInt *outer,PetscInt *blsize)</font></strong>
-<a name="line994">994: </a>{
-
-<a name="line999">999: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSGetRefinement_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*,PetscInt*),(nep,inner,outer,blsize));
-<a name="line1000">1000: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1001">1001: </a>}
-
-<a name="line1005">1005: </a><strong><font color="#4169E1"><a name="NEPReset_CISS"></a>PetscErrorCode NEPReset_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line1006">1006: </a>{
-<a name="line1008">1008: </a>  PetscInt       i;
-<a name="line1009">1009: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-
-<a name="line1012">1012: </a>  PetscSubcommDestroy(&ctx->subcomm);
-<a name="line1013">1013: </a>  PetscFree4(ctx->weight,ctx->omega,ctx->pp,ctx->sigma);
-<a name="line1014">1014: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->S);
-<a name="line1015">1015: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->V);
-<a name="line1016">1016: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->Y);
-<a name="line1017">1017: </a>  <font color="#4169E1">if</font> (!ctx->usest) {
-<a name="line1018">1018: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line1019">1019: </a>      KSPDestroy(&ctx->ksp[i]);
-<a name="line1020">1020: </a>    }
+
+<a name="line865">865: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSSetThreshold_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscReal),(nep,delta,spur));
+<a name="line866">866: </a>  <font color="#4169E1">return</font>(0);
+<a name="line867">867: </a>}
+
+<a name="line871">871: </a><strong><font color="#4169E1"><a name="NEPCISSGetThreshold_CISS"></a>static PetscErrorCode NEPCISSGetThreshold_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *delta,PetscReal *spur)</font></strong>
+<a name="line872">872: </a>{
+<a name="line873">873: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+
+<a name="line876">876: </a>  <font color="#4169E1">if</font> (delta) *delta = ctx->delta;
+<a name="line877">877: </a>  <font color="#4169E1">if</font> (spur)  *spur = ctx->spurious_threshold;
+<a name="line878">878: </a>  <font color="#4169E1">return</font>(0);
+<a name="line879">879: </a>}
+
+<a name="line883">883: </a><font color="#B22222">/*@</font>
+<a name="line884">884: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a> - Gets the values of various threshold parameters in</font>
+<a name="line885">885: </a><font color="#B22222">   the CISS solver.</font>
+
+<a name="line887">887: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line889">889: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line890">890: </a><font color="#B22222">.  nep - the eigenproblem solver context</font>
+
+<a name="line892">892: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line893">893: </a><font color="#B22222">+  delta - threshold for numerical rank</font>
+<a name="line894">894: </a><font color="#B22222">-  spur  - spurious threshold (to discard spurious eigenpairs)</font>
+
+<a name="line896">896: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line898">898: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>()</font>
+<a name="line899">899: </a><font color="#B22222">@*/</font>
+<a name="line900">900: </a><strong><font color="#4169E1"><a name="NEPCISSGetThreshold"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *delta,PetscReal *spur)</font></strong>
+<a name="line901">901: </a>{
+
+<a name="line906">906: </a>  PetscUseMethod(nep,<font color="#666666">"NEPCISSGetThreshold_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscReal*),(nep,delta,spur));
+<a name="line907">907: </a>  <font color="#4169E1">return</font>(0);
+<a name="line908">908: </a>}
+
+<a name="line912">912: </a><strong><font color="#4169E1"><a name="NEPCISSSetRefinement_CISS"></a>static PetscErrorCode NEPCISSSetRefinement_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt inner,PetscInt blsize)</font></strong>
+<a name="line913">913: </a>{
+<a name="line914">914: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+
+<a name="line917">917: </a>  <font color="#4169E1">if</font> (inner == PETSC_DEFAULT) {
+<a name="line918">918: </a>    ctx->refine_inner = 0;
+<a name="line919">919: </a>  } <font color="#4169E1">else</font> {
+<a name="line920">920: </a>    <font color="#4169E1">if</font> (inner<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine inner argument must be >= 0"</font>);
+<a name="line921">921: </a>    ctx->refine_inner = inner;
+<a name="line922">922: </a>  }
+<a name="line923">923: </a>  <font color="#4169E1">if</font> (blsize == PETSC_DEFAULT) {
+<a name="line924">924: </a>    ctx->refine_blocksize = 0;
+<a name="line925">925: </a>  } <font color="#4169E1">else</font> {
+<a name="line926">926: </a>    <font color="#4169E1">if</font> (blsize<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The refine blocksize argument must be >= 0"</font>);
+<a name="line927">927: </a>    ctx->refine_blocksize = blsize;
+<a name="line928">928: </a>  }
+<a name="line929">929: </a>  <font color="#4169E1">return</font>(0);
+<a name="line930">930: </a>}
+
+<a name="line934">934: </a><font color="#B22222">/*@</font>
+<a name="line935">935: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a> - Sets the values of various refinement parameters</font>
+<a name="line936">936: </a><font color="#B22222">   in the CISS solver.</font>
+
+<a name="line938">938: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line940">940: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line941">941: </a><font color="#B22222">+  nep    - the eigenproblem solver context</font>
+<a name="line942">942: </a><font color="#B22222">.  inner  - number of iterative refinement iterations (inner loop)</font>
+<a name="line943">943: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
+
+<a name="line945">945: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line946">946: </a><font color="#B22222">+  -nep_ciss_refine_inner - Sets number of inner iterations</font>
+<a name="line947">947: </a><font color="#B22222">-  -nep_ciss_refine_blocksize - Sets number of blocksize iterations</font>
+
+<a name="line949">949: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line951">951: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>()</font>
+<a name="line952">952: </a><font color="#B22222">@*/</font>
+<a name="line953">953: </a><strong><font color="#4169E1"><a name="NEPCISSSetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt inner,PetscInt blsize)</font></strong>
+<a name="line954">954: </a>{
+
+<a name="line961">961: </a>  PetscTryMethod(nep,<font color="#666666">"NEPCISSSetRefinement_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt),(nep,inner,blsize));
+<a name="line962">962: </a>  <font color="#4169E1">return</font>(0);
+<a name="line963">963: </a>}
+
+<a name="line967">967: </a><strong><font color="#4169E1"><a name="NEPCISSGetRefinement_CISS"></a>static PetscErrorCode NEPCISSGetRefinement_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *inner,PetscInt *blsize)</font></strong>
+<a name="line968">968: </a>{
+<a name="line969">969: </a>  NEP_CISS *ctx = (NEP_CISS*)nep->data;
+
+<a name="line972">972: </a>  <font color="#4169E1">if</font> (inner)  *inner = ctx->refine_inner;
+<a name="line973">973: </a>  <font color="#4169E1">if</font> (blsize) *blsize = ctx->refine_blocksize;
+<a name="line974">974: </a>  <font color="#4169E1">return</font>(0);
+<a name="line975">975: </a>}
+
+<a name="line979">979: </a><font color="#B22222">/*@</font>
+<a name="line980">980: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a> - Gets the values of various refinement parameters</font>
+<a name="line981">981: </a><font color="#B22222">   in the CISS solver.</font>
+
+<a name="line983">983: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line985">985: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line986">986: </a><font color="#B22222">.  nep - the eigenproblem solver context</font>
+
+<a name="line988">988: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line989">989: </a><font color="#B22222">+  inner  - number of iterative refinement iterations (inner loop)</font>
+<a name="line990">990: </a><font color="#B22222">-  blsize - number of iterative refinement iterations (blocksize loop)</font>
+
+<a name="line992">992: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line994">994: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>()</font>
+<a name="line995">995: </a><font color="#B22222">@*/</font>
+<a name="line996">996: </a><strong><font color="#4169E1"><a name="NEPCISSGetRefinement"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep, PetscInt *inner, PetscInt *blsize)</font></strong>
+<a name="line997">997: </a>{
+
+<a name="line1002">1002: </a>  PetscUseMethod(nep,<font color="#666666">"NEPCISSGetRefinement_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscInt*),(nep,inner,blsize));
+<a name="line1003">1003: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1004">1004: </a>}
+
+<a name="line1008">1008: </a><strong><font color="#4169E1"><a name="NEPReset_CISS"></a>PetscErrorCode NEPReset_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1009">1009: </a>{
+<a name="line1011">1011: </a>  PetscInt       i;
+<a name="line1012">1012: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+
+<a name="line1015">1015: </a>  PetscSubcommDestroy(&ctx->subcomm);
+<a name="line1016">1016: </a>  PetscFree4(ctx->weight,ctx->omega,ctx->pp,ctx->sigma);
+<a name="line1017">1017: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->S);
+<a name="line1018">1018: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->V);
+<a name="line1019">1019: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->Y);
+<a name="line1020">1020: </a>  <font color="#4169E1">if</font> (!ctx->usest) {
 <a name="line1021">1021: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
-<a name="line1022">1022: </a>      MatDestroy(&ctx->kspMat[i]);
+<a name="line1022">1022: </a>      KSPDestroy(&ctx->ksp[i]);
 <a name="line1023">1023: </a>    }
-<a name="line1024">1024: </a>    PetscFree2(ctx->ksp,ctx->kspMat);
-<a name="line1025">1025: </a>  }
-<a name="line1026">1026: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1027">1027: </a>}
-
-<a name="line1031">1031: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_CISS"></a>PetscErrorCode NEPSetFromOptions_CISS(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line1032">1032: </a>{
-<a name="line1034">1034: </a>  PetscReal      r1,r2;
-<a name="line1035">1035: </a>  PetscInt       i1,i2,i3,i4,i5,i6,i7,i8;
-<a name="line1036">1036: </a>  PetscBool      b1;
-
-<a name="line1039">1039: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> CISS Options"</font>);
-
-<a name="line1041">1041: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>(nep,&i1,&i2,&i3,&i4,&i5,&b1);
-<a name="line1042">1042: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_integration_points"</font>,<font color="#666666">"CISS number of integration points"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i1,&i1,NULL);
-<a name="line1043">1043: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_blocksize"</font>,<font color="#666666">"CISS block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i2,&i2,NULL);
-<a name="line1044">1044: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_moments"</font>,<font color="#666666">"CISS moment size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i3,&i3,NULL);
-<a name="line1045">1045: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_partitions"</font>,<font color="#666666">"CISS number of partitions"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i4,&i4,NULL);
-<a name="line1046">1046: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_maxblocksize"</font>,<font color="#666666">"CISS maximum block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i5,&i5,NULL);
-<a name="line1047">1047: </a>  PetscOptionsBool(<font color="#666666">"-nep_ciss_realmats"</font>,<font color="#666666">"CISS A and B are real"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,b1,&b1,NULL);
-<a name="line1048">1048: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>(nep,i1,i2,i3,i4,i5,b1);
-
-<a name="line1050">1050: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>(nep,&r1,&r2);
-<a name="line1051">1051: </a>  PetscOptionsReal(<font color="#666666">"-nep_ciss_delta"</font>,<font color="#666666">"CISS threshold for numerical rank"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>"</font>,r1,&r1,NULL);
-<a name="line1052">1052: </a>  PetscOptionsReal(<font color="#666666">"-nep_ciss_spurious_threshold"</font>,<font color="#666666">"CISS threshold for the spurious eigenpairs"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>"</font>,r2,&r2,NULL);
-<a name="line1053">1053: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>(nep,r1,r2);
-<a name="line1054">1054: </a>  PetscOptionsTail();
-
-<a name="line1056">1056: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>(nep,&i6,&i7,&i8);
-<a name="line1057">1057: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_refine_inner"</font>,<font color="#666666">"CISS number of inner iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>"</font>,i6,&i6,NULL);
-<a name="line1058">1058: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_refine_outer"</font>,<font color="#666666">"CISS number of outer iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>"</font>,i7,&i7,NULL);
-<a name="line1059">1059: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_refine_blocksize"</font>,<font color="#666666">"CISS number of blocksize iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>"</font>,i8,&i8,NULL);
-<a name="line1060">1060: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>(nep,i6,i7,i8);
-
-<a name="line1062">1062: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1063">1063: </a>}
-
-<a name="line1067">1067: </a><strong><font color="#4169E1"><a name="NEPDestroy_CISS"></a>PetscErrorCode NEPDestroy_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line1068">1068: </a>{
-
-<a name="line1072">1072: </a>  PetscFree(nep->data);
-<a name="line1073">1073: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetSizes_C"</font>,NULL);
-<a name="line1074">1074: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetSizes_C"</font>,NULL);
-<a name="line1075">1075: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetThreshold_C"</font>,NULL);
-<a name="line1076">1076: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetThreshold_C"</font>,NULL);
-<a name="line1077">1077: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetRefinement_C"</font>,NULL);
-<a name="line1078">1078: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetRefinement_C"</font>,NULL);
-<a name="line1079">1079: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1080">1080: </a>}
-
-<a name="line1084">1084: </a><strong><font color="#4169E1"><a name="NEPView_CISS"></a>PetscErrorCode NEPView_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line1085">1085: </a>{
-<a name="line1087">1087: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-<a name="line1088">1088: </a>  PetscBool      isascii;
-
-<a name="line1091">1091: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line1092">1092: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line1093">1093: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: sizes { integration points: %D, block size: %D, moment size: %D, partitions: %D, maximum block size: %D }\n"</font>,ctx->N,ctx->L,ctx->M,ctx->num_subcomm,ctx->L_max);
-<a name="line1094">1094: </a>    <font color="#4169E1">if</font> (ctx->isreal) {
-<a name="line1095">1095: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: exploiting symmetry of integration points\n"</font>);
-<a name="line1096">1096: </a>    }
-<a name="line1097">1097: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: threshold { delta: %g, spurious threshold: %g }\n"</font>,(double)ctx->delta,(double)ctx->spurious_threshold);
-<a name="line1098">1098: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: iterative refinement  { inner: %D, outer: %D, blocksize: %D }\n"</font>,ctx->refine_inner,ctx->refine_outer, ctx->refine_blocksize);
-<a name="line1099">1099: </a>    PetscViewerASCIIPushTab(viewer);
-<a name="line1100">1100: </a>    <font color="#B22222">/*KSPView(ctx->ksp[0],viewer);*/</font>
-<a name="line1101">1101: </a>    PetscViewerASCIIPopTab(viewer);
-<a name="line1102">1102: </a>  }
-<a name="line1103">1103: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1104">1104: </a>}
-
-<a name="line1108">1108: </a><strong><font color="#4169E1"><a name="NEPCreate_CISS"></a>PETSC_EXTERN PetscErrorCode NEPCreate_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line1109">1109: </a>{
-<a name="line1111">1111: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
-
-<a name="line1114">1114: </a>  PetscNewLog(nep,&ctx);
-<a name="line1115">1115: </a>  nep->data = ctx;
-<a name="line1116">1116: </a>  nep->ops->solve          = NEPSolve_CISS;
-<a name="line1117">1117: </a>  nep->ops->setup          = NEPSetUp_CISS;
-<a name="line1118">1118: </a>  nep->ops->setfromoptions = NEPSetFromOptions_CISS;
-<a name="line1119">1119: </a>  nep->ops->reset          = NEPReset_CISS;
-<a name="line1120">1120: </a>  nep->ops->destroy        = NEPDestroy_CISS;
-<a name="line1121">1121: </a>  nep->ops->view           = NEPView_CISS;
-<a name="line1122">1122: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetSizes_C"</font>,NEPCISSSetSizes_CISS);
-<a name="line1123">1123: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetSizes_C"</font>,NEPCISSGetSizes_CISS);
-<a name="line1124">1124: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetThreshold_C"</font>,NEPCISSSetThreshold_CISS);
-<a name="line1125">1125: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetThreshold_C"</font>,NEPCISSGetThreshold_CISS);
-<a name="line1126">1126: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetRefinement_C"</font>,NEPCISSSetRefinement_CISS);
-<a name="line1127">1127: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetRefinement_C"</font>,NEPCISSGetRefinement_CISS);
-<a name="line1128">1128: </a>  <font color="#B22222">/* set default values of parameters */</font>
-<a name="line1129">1129: </a>  ctx->N       = 32;
-<a name="line1130">1130: </a>  ctx->L       = 16;
-<a name="line1131">1131: </a>  ctx->M       = ctx->N/4;
-<a name="line1132">1132: </a>  ctx->delta   = 1e-12;
-<a name="line1133">1133: </a>  ctx->L_max   = 64;
-<a name="line1134">1134: </a>  ctx->spurious_threshold = 1e-4;
-<a name="line1135">1135: </a>  ctx->usest   = PETSC_FALSE;
-<a name="line1136">1136: </a>  ctx->isreal  = PETSC_FALSE;
-<a name="line1137">1137: </a>  ctx->refine_outer = 1;
-<a name="line1138">1138: </a>  ctx->refine_inner = 1;
-<a name="line1139">1139: </a>  ctx->refine_blocksize = 1;
-<a name="line1140">1140: </a>  ctx->num_subcomm = 1;
-<a name="line1141">1141: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1142">1142: </a>}
+<a name="line1024">1024: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->num_solve_point;i++) {
+<a name="line1025">1025: </a>      MatDestroy(&ctx->kspMat[i]);
+<a name="line1026">1026: </a>    }
+<a name="line1027">1027: </a>    PetscFree2(ctx->ksp,ctx->kspMat);
+<a name="line1028">1028: </a>  }
+<a name="line1029">1029: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1030">1030: </a>}
+
+<a name="line1034">1034: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_CISS"></a>PetscErrorCode NEPSetFromOptions_CISS(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1035">1035: </a>{
+<a name="line1037">1037: </a>  PetscReal      r1,r2;
+<a name="line1038">1038: </a>  PetscInt       i1,i2,i3,i4,i5,i6,i7;
+<a name="line1039">1039: </a>  PetscBool      b1;
+
+<a name="line1042">1042: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> CISS Options"</font>);
+
+<a name="line1044">1044: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSGetSizes.html#NEPCISSGetSizes">NEPCISSGetSizes</a>(nep,&i1,&i2,&i3,&i4,&i5,&b1);
+<a name="line1045">1045: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_integration_points"</font>,<font color="#666666">"CISS number of integration points"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i1,&i1,NULL);
+<a name="line1046">1046: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_blocksize"</font>,<font color="#666666">"CISS block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i2,&i2,NULL);
+<a name="line1047">1047: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_moments"</font>,<font color="#666666">"CISS moment size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i3,&i3,NULL);
+<a name="line1048">1048: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_partitions"</font>,<font color="#666666">"CISS number of partitions"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i4,&i4,NULL);
+<a name="line1049">1049: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_maxblocksize"</font>,<font color="#666666">"CISS maximum block size"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,i5,&i5,NULL);
+<a name="line1050">1050: </a>  PetscOptionsBool(<font color="#666666">"-nep_ciss_realmats"</font>,<font color="#666666">"CISS flag indicating that T(z) is real for real z"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>"</font>,b1,&b1,NULL);
+<a name="line1051">1051: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSSetSizes.html#NEPCISSSetSizes">NEPCISSSetSizes</a>(nep,i1,i2,i3,i4,i5,b1);
+
+<a name="line1053">1053: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSGetThreshold.html#NEPCISSGetThreshold">NEPCISSGetThreshold</a>(nep,&r1,&r2);
+<a name="line1054">1054: </a>  PetscOptionsReal(<font color="#666666">"-nep_ciss_delta"</font>,<font color="#666666">"CISS threshold for numerical rank"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>"</font>,r1,&r1,NULL);
+<a name="line1055">1055: </a>  PetscOptionsReal(<font color="#666666">"-nep_ciss_spurious_threshold"</font>,<font color="#666666">"CISS threshold for the spurious eigenpairs"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>"</font>,r2,&r2,NULL);
+<a name="line1056">1056: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSSetThreshold.html#NEPCISSSetThreshold">NEPCISSSetThreshold</a>(nep,r1,r2);
+
+<a name="line1058">1058: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSGetRefinement.html#NEPCISSGetRefinement">NEPCISSGetRefinement</a>(nep,&i6,&i7);
+<a name="line1059">1059: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_refine_inner"</font>,<font color="#666666">"CISS number of inner iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>"</font>,i6,&i6,NULL);
+<a name="line1060">1060: </a>  PetscOptionsInt(<font color="#666666">"-nep_ciss_refine_blocksize"</font>,<font color="#666666">"CISS number of blocksize iterative refinement iterations"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>"</font>,i7,&i7,NULL);
+<a name="line1061">1061: </a>  <a href="../../../../docs/manualpages/NEP/NEPCISSSetRefinement.html#NEPCISSSetRefinement">NEPCISSSetRefinement</a>(nep,i6,i7);
+
+<a name="line1063">1063: </a>  PetscOptionsTail();
+<a name="line1064">1064: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1065">1065: </a>}
+
+<a name="line1069">1069: </a><strong><font color="#4169E1"><a name="NEPDestroy_CISS"></a>PetscErrorCode NEPDestroy_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1070">1070: </a>{
+
+<a name="line1074">1074: </a>  PetscFree(nep->data);
+<a name="line1075">1075: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetSizes_C"</font>,NULL);
+<a name="line1076">1076: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetSizes_C"</font>,NULL);
+<a name="line1077">1077: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetThreshold_C"</font>,NULL);
+<a name="line1078">1078: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetThreshold_C"</font>,NULL);
+<a name="line1079">1079: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetRefinement_C"</font>,NULL);
+<a name="line1080">1080: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetRefinement_C"</font>,NULL);
+<a name="line1081">1081: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1082">1082: </a>}
+
+<a name="line1086">1086: </a><strong><font color="#4169E1"><a name="NEPView_CISS"></a>PetscErrorCode NEPView_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line1087">1087: </a>{
+<a name="line1089">1089: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+<a name="line1090">1090: </a>  PetscBool      isascii;
+
+<a name="line1093">1093: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line1094">1094: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line1095">1095: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: sizes { integration points: %D, block size: %D, moment size: %D, partitions: %D, maximum block size: %D }\n"</font>,ctx->N,ctx->L,ctx->M,ctx->num_subcomm,ctx->L_max);
+<a name="line1096">1096: </a>    <font color="#4169E1">if</font> (ctx->isreal) {
+<a name="line1097">1097: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: exploiting symmetry of integration points\n"</font>);
+<a name="line1098">1098: </a>    }
+<a name="line1099">1099: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: threshold { delta: %g, spurious threshold: %g }\n"</font>,(double)ctx->delta,(double)ctx->spurious_threshold);
+<a name="line1100">1100: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  CISS: iterative refinement  { inner: %D, blocksize: %D }\n"</font>,ctx->refine_inner, ctx->refine_blocksize);
+<a name="line1101">1101: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line1102">1102: </a>    <font color="#4169E1">if</font> (!ctx->usest && ctx->ksp[0]) { KSPView(ctx->ksp[0],viewer); }
+<a name="line1103">1103: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line1104">1104: </a>  }
+<a name="line1105">1105: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1106">1106: </a>}
+
+<a name="line1110">1110: </a><strong><font color="#4169E1"><a name="NEPCreate_CISS"></a>PETSC_EXTERN PetscErrorCode NEPCreate_CISS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1111">1111: </a>{
+<a name="line1113">1113: </a>  NEP_CISS       *ctx = (NEP_CISS*)nep->data;
+
+<a name="line1116">1116: </a>  PetscNewLog(nep,&ctx);
+<a name="line1117">1117: </a>  nep->data = ctx;
+<a name="line1118">1118: </a>  nep->ops->solve          = NEPSolve_CISS;
+<a name="line1119">1119: </a>  nep->ops->setup          = NEPSetUp_CISS;
+<a name="line1120">1120: </a>  nep->ops->setfromoptions = NEPSetFromOptions_CISS;
+<a name="line1121">1121: </a>  nep->ops->reset          = NEPReset_CISS;
+<a name="line1122">1122: </a>  nep->ops->destroy        = NEPDestroy_CISS;
+<a name="line1123">1123: </a>  nep->ops->view           = NEPView_CISS;
+<a name="line1124">1124: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetSizes_C"</font>,NEPCISSSetSizes_CISS);
+<a name="line1125">1125: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetSizes_C"</font>,NEPCISSGetSizes_CISS);
+<a name="line1126">1126: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetThreshold_C"</font>,NEPCISSSetThreshold_CISS);
+<a name="line1127">1127: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetThreshold_C"</font>,NEPCISSGetThreshold_CISS);
+<a name="line1128">1128: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSSetRefinement_C"</font>,NEPCISSSetRefinement_CISS);
+<a name="line1129">1129: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPCISSGetRefinement_C"</font>,NEPCISSGetRefinement_CISS);
+<a name="line1130">1130: </a>  <font color="#B22222">/* set default values of parameters */</font>
+<a name="line1131">1131: </a>  ctx->N       = 32;
+<a name="line1132">1132: </a>  ctx->L       = 16;
+<a name="line1133">1133: </a>  ctx->M       = ctx->N/4;
+<a name="line1134">1134: </a>  ctx->delta   = 1e-12;
+<a name="line1135">1135: </a>  ctx->L_max   = 64;
+<a name="line1136">1136: </a>  ctx->spurious_threshold = 1e-4;
+<a name="line1137">1137: </a>  ctx->usest   = PETSC_FALSE;
+<a name="line1138">1138: </a>  ctx->isreal  = PETSC_FALSE;
+<a name="line1139">1139: </a>  ctx->refine_inner = 0;
+<a name="line1140">1140: </a>  ctx->refine_blocksize = 0;
+<a name="line1141">1141: </a>  ctx->num_subcomm = 1;
+<a name="line1142">1142: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1143">1143: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/impls/index.html b/src/nep/impls/index.html
index f96d961..09bfc80 100644
--- a/src/nep/impls/index.html
+++ b/src/nep/impls/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
@@ -24,6 +24,7 @@ Options can also be set directly in application codes by calling the correspondi
 <a href="narnoldi/">narnoldi/</a><br>
 <a href="interpol/">interpol/</a><br>
 <a href="ciss/">ciss/</a><br>
+<a href="nleigs/">nleigs/</a><br>
  
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/nep/impls/interpol/ftn-auto/interpolf.c b/src/nep/impls/interpol/ftn-auto/interpolf.c
index aa199f6..88dc7b7 100644
--- a/src/nep/impls/interpol/ftn-auto/interpolf.c
+++ b/src/nep/impls/interpol/ftn-auto/interpolf.c
@@ -28,6 +28,7 @@ extern void PetscRmPointer(void*);
 #endif
 
 #include "slepcnep.h"
+#include "slepcpep.h"
 #ifdef PETSC_HAVE_FORTRAN_CAPS
 #define nepinterpolsetdegree_ NEPINTERPOLSETDEGREE
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
diff --git a/src/nep/impls/interpol/index.html b/src/nep/impls/interpol/index.html
index 16da161..069c907 100644
--- a/src/nep/impls/interpol/index.html
+++ b/src/nep/impls/interpol/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/interpol/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/interpol/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/impls/interpol/interpol.c b/src/nep/impls/interpol/interpol.c
index 842f12d..395555c 100644
--- a/src/nep/impls/interpol/interpol.c
+++ b/src/nep/impls/interpol/interpol.c
@@ -16,7 +16,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -35,7 +35,7 @@
 */
 
 #include <slepc/private/nepimpl.h>         /*I "slepcnep.h" I*/
-#include <slepc/private/pepimpl.h>
+#include <slepc/private/pepimpl.h>         /*I "slepcpep.h" I*/
 
 typedef struct {
   PEP       pep;
@@ -52,26 +52,15 @@ PetscErrorCode NEPSetUp_Interpol(NEP nep)
   RG             rg;
   PetscReal      a,b,c,d,s,tol;
   PetscScalar    zero=0.0;
-  PetscBool      flg,istrivial;
+  PetscBool      flg,istrivial,trackall;
   PetscInt       its,in;
 
   PetscFunctionBegin;
-  if (nep->ncv) { /* ncv set */
-    if (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must be at least nev");
-  } else if (nep->mpd) { /* mpd set */
-    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-  } else { /* neither set: defaults depend on nev being small or large */
-    if (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-    else {
-      nep->mpd = 500;
-      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-    }
-  }
-  if (!nep->mpd) nep->mpd = nep->ncv;
+  ierr = NEPSetDimensions_Default(nep,nep->nev,&nep->ncv,&nep->mpd);CHKERRQ(ierr);
   if (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must not be larger than nev+mpd");
   if (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-  if (!nep->max_funcs) nep->max_funcs = nep->max_it;
-  if (!nep->split) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NEPINTERPOL only available for split operator");
+  if (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NEPINTERPOL only available for split operator");
+  if (nep->stopping!=NEPStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"This solver does not support user-defined stopping test");
 
   /* transfer PEP options */
   if (!ctx->pep) { ierr = NEPInterpolGetPEP(nep,&ctx->pep);CHKERRQ(ierr); }
@@ -82,10 +71,12 @@ PetscErrorCode NEPSetUp_Interpol(NEP nep)
   ierr = STSetType(st,STSINVERT);CHKERRQ(ierr);
   ierr = PEPSetDimensions(ctx->pep,nep->nev,nep->ncv?nep->ncv:PETSC_DEFAULT,nep->mpd?nep->mpd:PETSC_DEFAULT);CHKERRQ(ierr);
   tol=ctx->pep->tol;
-  if (tol==PETSC_DEFAULT) tol = (nep->rtol==PETSC_DEFAULT)?SLEPC_DEFAULT_TOL/10.0:nep->rtol/10.0;
+  if (tol==PETSC_DEFAULT) tol = (nep->tol==PETSC_DEFAULT)?SLEPC_DEFAULT_TOL/10.0:nep->tol/10.0;
   its=ctx->pep->max_it;
   if (!its) its = nep->max_it?nep->max_it:PETSC_DEFAULT;
   ierr = PEPSetTolerances(ctx->pep,tol,its);CHKERRQ(ierr);
+  ierr = NEPGetTrackAll(nep,&trackall);CHKERRQ(ierr);
+  ierr = PEPSetTrackAll(ctx->pep,trackall);CHKERRQ(ierr);
 
   /* transfer region options */
   ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
@@ -98,8 +89,8 @@ PetscErrorCode NEPSetUp_Interpol(NEP nep)
   ierr = RGSetType(rg,RGINTERVAL);CHKERRQ(ierr);
   if (a==b) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Only implemented for intervals on the real axis");
   s = 2.0/(b-a);
-  c = (c==0)? -PETSC_MAX_REAL: c*s;
-  d = (d==0)? PETSC_MAX_REAL: d*s;
+  c = c*s;
+  d = d*s;
   ierr = RGIntervalSetEndpoints(rg,-1.0,1.0,c,d);CHKERRQ(ierr);
   ierr = RGCheckInside(nep->rg,1,&nep->target,&zero,&in);CHKERRQ(ierr);
   if (in<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"The target is not inside the target set");
@@ -167,7 +158,7 @@ PetscErrorCode NEPSolve_Interpol(NEP nep)
       for (i=0;i<deg+1;i++) t += fx[i+j*(deg+1)]*cs[i*(deg+1)+k];
       t *= 2.0/(deg+1); 
       if (k==0) t /= 2.0;
-      ierr = MatAXPY(A[k],t,nep->A[j],SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
+      ierr = MatAXPY(A[k],t,nep->A[j],nep->mstr);CHKERRQ(ierr);
     }
   }
 
@@ -194,8 +185,26 @@ PetscErrorCode NEPSolve_Interpol(NEP nep)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "PEPMonitor_Interpol"
+static PetscErrorCode PEPMonitor_Interpol(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
+{
+  PetscInt       i;
+  NEP            nep = (NEP)ctx;
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  for (i=0;i<PetscMin(nest,nep->ncv);i++) {
+    nep->eigr[i]   = eigr[i];
+    nep->eigi[i]   = eigi[i];
+    nep->errest[i] = errest[i];
+  }
+  ierr = NEPMonitor(nep,its,nconv,nep->eigr,nep->eigi,nep->errest,nest);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "NEPSetFromOptions_Interpol"
-PetscErrorCode NEPSetFromOptions_Interpol(PetscOptions *PetscOptionsObject,NEP nep)
+PetscErrorCode NEPSetFromOptions_Interpol(PetscOptionItems *PetscOptionsObject,NEP nep)
 {
   PetscErrorCode ierr;
   NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
@@ -213,7 +222,7 @@ PetscErrorCode NEPSetFromOptions_Interpol(PetscOptions *PetscOptionsObject,NEP n
 #define __FUNCT__ "NEPInterpolSetDegree_Interpol"
 static PetscErrorCode NEPInterpolSetDegree_Interpol(NEP nep,PetscInt deg)
 {
-  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+  NEP_INTERPOL *ctx = (NEP_INTERPOL*)nep->data;
 
   PetscFunctionBegin;
   ctx->deg = deg;
@@ -250,7 +259,7 @@ PetscErrorCode NEPInterpolSetDegree(NEP nep,PetscInt deg)
 #define __FUNCT__ "NEPInterpolGetDegree_Interpol"
 static PetscErrorCode NEPInterpolGetDegree_Interpol(NEP nep,PetscInt *deg)
 {
-  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+  NEP_INTERPOL *ctx = (NEP_INTERPOL*)nep->data;
 
   PetscFunctionBegin;
   *deg = ctx->deg;
@@ -268,7 +277,7 @@ static PetscErrorCode NEPInterpolGetDegree_Interpol(NEP nep,PetscInt *deg)
 .  nep - nonlinear eigenvalue solver
 
    Output Parameter:
-.  pep - the polynomial degree
+.  deg - the polynomial degree
 
    Level: advanced
 
@@ -281,7 +290,7 @@ PetscErrorCode NEPInterpolGetDegree(NEP nep,PetscInt *deg)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidPointer(deg,2);
-  ierr = PetscTryMethod(nep,"NEPInterpolGetDegree_C",(NEP,PetscInt*),(nep,deg));CHKERRQ(ierr);
+  ierr = PetscUseMethod(nep,"NEPInterpolGetDegree_C",(NEP,PetscInt*),(nep,deg));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -341,11 +350,12 @@ static PetscErrorCode NEPInterpolGetPEP_Interpol(NEP nep,PEP *pep)
   if (!ctx->pep) {
     ierr = PEPCreate(PetscObjectComm((PetscObject)nep),&ctx->pep);CHKERRQ(ierr);
     ierr = PEPSetOptionsPrefix(ctx->pep,((PetscObject)nep)->prefix);CHKERRQ(ierr);
-    ierr = PEPAppendOptionsPrefix(ctx->pep,"nep_");CHKERRQ(ierr);
+    ierr = PEPAppendOptionsPrefix(ctx->pep,"nep_interpol_");CHKERRQ(ierr);
     ierr = PEPGetST(ctx->pep,&st);CHKERRQ(ierr);
     ierr = STSetOptionsPrefix(st,((PetscObject)ctx->pep)->prefix);CHKERRQ(ierr);
     ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->pep,(PetscObject)nep,1);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->pep);CHKERRQ(ierr);
+    ierr = PEPMonitorSet(ctx->pep,PEPMonitor_Interpol,nep,NULL);CHKERRQ(ierr);
   }
   *pep = ctx->pep;
   PetscFunctionReturn(0);
@@ -376,7 +386,7 @@ PetscErrorCode NEPInterpolGetPEP(NEP nep,PEP *pep)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidPointer(pep,2);
-  ierr = PetscTryMethod(nep,"NEPInterpolGetPEP_C",(NEP,PEP*),(nep,pep));CHKERRQ(ierr);
+  ierr = PetscUseMethod(nep,"NEPInterpolGetPEP_C",(NEP,PEP*),(nep,pep));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -386,13 +396,17 @@ PetscErrorCode NEPView_Interpol(NEP nep,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  if (!ctx->pep) { ierr = NEPInterpolGetPEP(nep,&ctx->pep);CHKERRQ(ierr); }
-  ierr = PetscViewerASCIIPrintf(viewer,"  Interpol: polynomial degree %D\n",ctx->deg);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-  ierr = PEPView(ctx->pep,viewer);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!ctx->pep) { ierr = NEPInterpolGetPEP(nep,&ctx->pep);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPrintf(viewer,"  Interpol: polynomial degree %D\n",ctx->deg);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = PEPView(ctx->pep,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/nep/impls/interpol/interpol.c.html b/src/nep/impls/interpol/interpol.c.html
index 36ba48d..f47133d 100644
--- a/src/nep/impls/interpol/interpol.c.html
+++ b/src/nep/impls/interpol/interpol.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/interpol/interpol.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:21+00:00">
+<meta name="date" content="2016-05-16T10:34:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/interpol/interpol.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/interpol/interpol.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc nonlinear eigensolver: "interpol"</font>
@@ -28,7 +28,7 @@
 
 <a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,7 +47,7 @@
 <a name="line35"> 35: </a><font color="#B22222">*/</font>
 
 <a name="line37"> 37: </a><font color="#A020F0">#include <slepc/private/nepimpl.h>         </font><font color="#B22222">/*I "slepcnep.h" I*/</font><font color="#A020F0"></font>
-<a name="line38"> 38: </a><font color="#A020F0">#include <slepc/private/pepimpl.h></font>
+<a name="line38"> 38: </a><font color="#A020F0">#include <slepc/private/pepimpl.h>         </font><font color="#B22222">/*I "slepcpep.h" I*/</font><font color="#A020F0"></font>
 
 <a name="line40"> 40: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
 <a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>       pep;
@@ -61,336 +61,346 @@
 <a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>             rg;
 <a name="line53"> 53: </a>  PetscReal      a,b,c,d,s,tol;
 <a name="line54"> 54: </a>  PetscScalar    zero=0.0;
-<a name="line55"> 55: </a>  PetscBool      flg,istrivial;
+<a name="line55"> 55: </a>  PetscBool      flg,istrivial,trackall;
 <a name="line56"> 56: </a>  PetscInt       its,in;
 
-<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (nep->ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line60"> 60: </a>    <font color="#4169E1">if</font> (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line61"> 61: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line62"> 62: </a>    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line63"> 63: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
-<a name="line64"> 64: </a>    <font color="#4169E1">if</font> (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-<a name="line65"> 65: </a>    <font color="#4169E1">else</font> {
-<a name="line66"> 66: </a>      nep->mpd = 500;
-<a name="line67"> 67: </a>      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line68"> 68: </a>    }
-<a name="line69"> 69: </a>  }
-<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (!nep->mpd) nep->mpd = nep->ncv;
-<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
-<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (!nep->max_funcs) nep->max_funcs = nep->max_it;
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!nep->split) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NEPINTERPOL only available for split operator"</font>);
-
-<a name="line76"> 76: </a>  <font color="#B22222">/* transfer <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options */</font>
-<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(nep,&ctx->pep); }
-<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>(ctx->pep,nep->V);
-<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(ctx->pep,PEP_BASIS_CHEBYSHEV1);
-<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(ctx->pep,PEP_TARGET_MAGNITUDE);
-<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(ctx->pep,&st);
-<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT);
-<a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(ctx->pep,nep->nev,nep->ncv?nep->ncv:PETSC_DEFAULT,nep->mpd?nep->mpd:PETSC_DEFAULT);
-<a name="line84"> 84: </a>  tol=ctx->pep->tol;
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (tol==PETSC_DEFAULT) tol = (nep->rtol==PETSC_DEFAULT)?SLEPC_DEFAULT_TOL/10.0:nep->rtol/10.0;
-<a name="line86"> 86: </a>  its=ctx->pep->max_it;
-<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (!its) its = nep->max_it?nep->max_it:PETSC_DEFAULT;
-<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(ctx->pep,tol,its);
-
-<a name="line90"> 90: </a>  <font color="#B22222">/* transfer region options */</font>
-<a name="line91"> 91: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
-<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NEPINTERPOL requires a nontrivial region"</font>);
-<a name="line93"> 93: </a>  PetscObjectTypeCompare((PetscObject)nep->rg,RGINTERVAL,&flg);
-<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Only implemented for interval regions"</font>);
-<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(nep->rg,&a,&b,&c,&d);
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (a<=-PETSC_MAX_REAL || b>=PETSC_MAX_REAL) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Only implemented for bounded intervals"</font>);
-<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(ctx->pep,&rg);
-<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,RGINTERVAL);
-<a name="line99"> 99: </a>  <font color="#4169E1">if</font> (a==b) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Only implemented for intervals on the real axis"</font>);
-<a name="line100">100: </a>  s = 2.0/(b-a);
-<a name="line101">101: </a>  c = (c==0)? -PETSC_MAX_REAL: c*s;
-<a name="line102">102: </a>  d = (d==0)? PETSC_MAX_REAL: d*s;
-<a name="line103">103: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,-1.0,1.0,c,d);
-<a name="line104">104: </a>  <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(nep->rg,1,&nep->target,&zero,&in);
-<a name="line105">105: </a>  <font color="#4169E1">if</font> (in<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"The target is not inside the target set"</font>);
-<a name="line106">106: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(ctx->pep,(nep->target-(a+b)/2)*s);
-
-<a name="line108">108: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
-<a name="line109">109: </a>  <font color="#4169E1">return</font>(0);
-<a name="line110">110: </a>}
-
-<a name="line114">114: </a><font color="#B22222">/*</font>
-<a name="line115">115: </a><font color="#B22222">  Input: </font>
-<a name="line116">116: </a><font color="#B22222">    d, number of nodes to compute</font>
-<a name="line117">117: </a><font color="#B22222">    a,b, interval extrems</font>
-<a name="line118">118: </a><font color="#B22222">  Output:</font>
-<a name="line119">119: </a><font color="#B22222">    *x, array containing the d Chebyshev nodes of the interval [a,b]</font>
-<a name="line120">120: </a><font color="#B22222">    *dct2, coefficients to compute a discrete cosine transformation (DCT-II)</font>
-<a name="line121">121: </a><font color="#B22222">*/</font>
-<a name="line122">122: </a><strong><font color="#4169E1"><a name="ChebyshevNodes"></a>static PetscErrorCode ChebyshevNodes(PetscInt d,PetscReal a,PetscReal b,PetscScalar *x,PetscReal *dct2)</font></strong>
-<a name="line123">123: </a>{
-<a name="line124">124: </a>  PetscInt  j,i;
-<a name="line125">125: </a>  PetscReal t;
-
-<a name="line128">128: </a>  <font color="#4169E1">for</font> (j=0;j<d+1;j++) {
-<a name="line129">129: </a>    t = ((2*j+1)*PETSC_PI)/(2*(d+1));
-<a name="line130">130: </a>    x[j] = (a+b)/2.0+((b-a)/2.0)*PetscCosReal(t);
-<a name="line131">131: </a>    <font color="#4169E1">for</font> (i=0;i<d+1;i++) dct2[j*(d+1)+i] = PetscCosReal(i*t);
-<a name="line132">132: </a>  }
-<a name="line133">133: </a>  <font color="#4169E1">return</font>(0);
-<a name="line134">134: </a>}
-
-<a name="line138">138: </a><strong><font color="#4169E1"><a name="NEPSolve_Interpol"></a>PetscErrorCode NEPSolve_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line139">139: </a>{
-<a name="line141">141: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-<a name="line142">142: </a>  Mat            *A;   <font color="#B22222">/*T=nep->function,Tp=nep->jacobian;*/</font>
-<a name="line143">143: </a>  PetscScalar    *x,*fx,t;
-<a name="line144">144: </a>  PetscReal      *cs,a,b,s;
-<a name="line145">145: </a>  PetscInt       i,j,k,deg=ctx->deg;
-
-<a name="line148">148: </a>  PetscMalloc4(deg+1,&A,(deg+1)*(deg+1),&cs,deg+1,&x,(deg+1)*nep->nt,&fx);
-<a name="line149">149: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(nep->rg,&a,&b,NULL,NULL);
-<a name="line150">150: </a>  ChebyshevNodes(deg,a,b,x,cs);
-<a name="line151">151: </a>  <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
-<a name="line152">152: </a>    <font color="#4169E1">for</font> (i=0;i<=deg;i++) {
-<a name="line153">153: </a>      <a href="../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[j],x[i],&fx[i+j*(deg+1)]);
-<a name="line154">154: </a>    }
-<a name="line155">155: </a>  }
-
-<a name="line157">157: </a>  <font color="#B22222">/* Polynomial coefficients */</font>
-<a name="line158">158: </a>  <font color="#4169E1">for</font> (k=0;k<=deg;k++) {
-<a name="line159">159: </a>    MatDuplicate(nep->A[0],MAT_COPY_VALUES,&A[k]);
-<a name="line160">160: </a>    t = 0.0;
-<a name="line161">161: </a>    <font color="#4169E1">for</font> (i=0;i<deg+1;i++) t += fx[i]*cs[i*(deg+1)+k];
-<a name="line162">162: </a>    t *= 2.0/(deg+1); 
-<a name="line163">163: </a>    <font color="#4169E1">if</font> (k==0) t /= 2.0;
-<a name="line164">164: </a>    MatScale(A[k],t);
-<a name="line165">165: </a>    <font color="#4169E1">for</font> (j=1;j<nep->nt;j++) {
-<a name="line166">166: </a>      t = 0.0;
-<a name="line167">167: </a>      <font color="#4169E1">for</font> (i=0;i<deg+1;i++) t += fx[i+j*(deg+1)]*cs[i*(deg+1)+k];
-<a name="line168">168: </a>      t *= 2.0/(deg+1); 
-<a name="line169">169: </a>      <font color="#4169E1">if</font> (k==0) t /= 2.0;
-<a name="line170">170: </a>      MatAXPY(A[k],t,nep->A[j],SUBSET_NONZERO_PATTERN);
-<a name="line171">171: </a>    }
-<a name="line172">172: </a>  }
-
-<a name="line174">174: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(ctx->pep,deg+1,A);
-<a name="line175">175: </a>  <font color="#4169E1">for</font> (k=0;k<=deg;k++) {
-<a name="line176">176: </a>    MatDestroy(&A[k]);
-<a name="line177">177: </a>  }
-<a name="line178">178: </a>  PetscFree4(A,cs,x,fx);
-
-<a name="line180">180: </a>  <font color="#B22222">/* Solve polynomial eigenproblem */</font>
-<a name="line181">181: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(ctx->pep);
-<a name="line182">182: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(ctx->pep,&nep->nconv);
-<a name="line183">183: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>(ctx->pep,&nep->its);
-<a name="line184">184: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(ctx->pep,(<a href="../../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>*)&nep->reason);
-<a name="line185">185: </a>  s = 2.0/(b-a);
-<a name="line186">186: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line187">187: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(ctx->pep,i,&nep->eigr[i],&nep->eigi[i],NULL,NULL);
-<a name="line188">188: </a>    nep->eigr[i] /= s;
-<a name="line189">189: </a>    nep->eigr[i] += (a+b)/2.0;
-<a name="line190">190: </a>    nep->eigi[i] /= s;
-<a name="line191">191: </a>  }
-<a name="line192">192: </a>  nep->state = NEP_STATE_EIGENVECTORS;
-<a name="line193">193: </a>  <font color="#4169E1">return</font>(0);
-<a name="line194">194: </a>}
-
-<a name="line198">198: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_Interpol"></a>PetscErrorCode NEPSetFromOptions_Interpol(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line199">199: </a>{
-<a name="line201">201: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line204">204: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(nep,&ctx->pep); }
-<a name="line205">205: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(ctx->pep);
-<a name="line206">206: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> Interpol Options"</font>);
-<a name="line207">207: </a>  PetscOptionsInt(<font color="#666666">"-nep_interpol_degree"</font>,<font color="#666666">"Degree of interpolation polynomial"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>"</font>,ctx->deg,&ctx->deg,NULL);
-<a name="line208">208: </a>  PetscOptionsTail();
-<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
-<a name="line210">210: </a>}
-
-<a name="line214">214: </a><strong><font color="#4169E1"><a name="NEPInterpolSetDegree_Interpol"></a>static PetscErrorCode NEPInterpolSetDegree_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt deg)</font></strong>
-<a name="line215">215: </a>{
-<a name="line216">216: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line219">219: </a>  ctx->deg = deg;
-<a name="line220">220: </a>  <font color="#4169E1">return</font>(0);
-<a name="line221">221: </a>}
-
-<a name="line225">225: </a><font color="#B22222">/*@</font>
-<a name="line226">226: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a> - Sets the degree of the interpolation polynomial.</font>
-
-<a name="line228">228: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line230">230: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line231">231: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
-<a name="line232">232: </a><font color="#B22222">-  deg - polynomial degree</font>
-
-<a name="line234">234: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line236">236: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a>()</font>
-<a name="line237">237: </a><font color="#B22222">@*/</font>
-<a name="line238">238: </a><strong><font color="#4169E1"><a name="NEPInterpolSetDegree"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt deg)</font></strong>
-<a name="line239">239: </a>{
-
-<a name="line245">245: </a>  PetscTryMethod(nep,<font color="#666666">"NEPInterpolSetDegree_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt),(nep,deg));
-<a name="line246">246: </a>  <font color="#4169E1">return</font>(0);
-<a name="line247">247: </a>}
-
-<a name="line251">251: </a><strong><font color="#4169E1"><a name="NEPInterpolGetDegree_Interpol"></a>static PetscErrorCode NEPInterpolGetDegree_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *deg)</font></strong>
-<a name="line252">252: </a>{
-<a name="line253">253: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line256">256: </a>  *deg = ctx->deg;
-<a name="line257">257: </a>  <font color="#4169E1">return</font>(0);
-<a name="line258">258: </a>}
-
-<a name="line262">262: </a><font color="#B22222">/*@</font>
-<a name="line263">263: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a> - Gets the degree of the interpolation polynomial.</font>
-
-<a name="line265">265: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line267">267: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line268">268: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
-
-<a name="line270">270: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line271">271: </a><font color="#B22222">.  pep - the polynomial degree</font>
-
-<a name="line273">273: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line275">275: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>()</font>
-<a name="line276">276: </a><font color="#B22222">@*/</font>
-<a name="line277">277: </a><strong><font color="#4169E1"><a name="NEPInterpolGetDegree"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *deg)</font></strong>
-<a name="line278">278: </a>{
-
-<a name="line284">284: </a>  PetscTryMethod(nep,<font color="#666666">"NEPInterpolGetDegree_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*),(nep,deg));
-<a name="line285">285: </a>  <font color="#4169E1">return</font>(0);
-<a name="line286">286: </a>}
-
-<a name="line290">290: </a><strong><font color="#4169E1"><a name="NEPInterpolSetPEP_Interpol"></a>static PetscErrorCode NEPInterpolSetPEP_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line291">291: </a>{
-<a name="line293">293: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line296">296: </a>  PetscObjectReference((PetscObject)pep);
-<a name="line297">297: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&ctx->pep);
-<a name="line298">298: </a>  ctx->pep = pep;
-<a name="line299">299: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->pep);
-<a name="line300">300: </a>  nep->state = NEP_STATE_INITIAL;
-<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
-<a name="line302">302: </a>}
-
-<a name="line306">306: </a><font color="#B22222">/*@</font>
-<a name="line307">307: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a> - Associate a polynomial eigensolver object (<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>) to the</font>
-<a name="line308">308: </a><font color="#B22222">   nonlinear eigenvalue solver.</font>
-
-<a name="line310">310: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line312">312: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line313">313: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
-<a name="line314">314: </a><font color="#B22222">-  pep - the polynomial eigensolver object</font>
-
-<a name="line316">316: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line318">318: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>()</font>
-<a name="line319">319: </a><font color="#B22222">@*/</font>
-<a name="line320">320: </a><strong><font color="#4169E1"><a name="NEPInterpolSetPEP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line321">321: </a>{
-
-<a name="line328">328: </a>  PetscTryMethod(nep,<font color="#666666">"NEPInterpolSetPEP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>),(nep,pep));
-<a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
-<a name="line330">330: </a>}
-
-<a name="line334">334: </a><strong><font color="#4169E1"><a name="NEPInterpolGetPEP_Interpol"></a>static PetscErrorCode NEPInterpolGetPEP_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> *pep)</font></strong>
-<a name="line335">335: </a>{
-<a name="line337">337: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-<a name="line338">338: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-
-<a name="line341">341: </a>  <font color="#4169E1">if</font> (!ctx->pep) {
-<a name="line342">342: </a>    <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PetscObjectComm((PetscObject)nep),&ctx->pep);
-<a name="line343">343: </a>    <a href="../../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(ctx->pep,((PetscObject)nep)->prefix);
-<a name="line344">344: </a>    <a href="../../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(ctx->pep,<font color="#666666">"nep_"</font>);
-<a name="line345">345: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(ctx->pep,&st);
-<a name="line346">346: </a>    <a href="../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(st,((PetscObject)ctx->pep)->prefix);
-<a name="line347">347: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->pep,(PetscObject)nep,1);
-<a name="line348">348: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->pep);
-<a name="line349">349: </a>  }
-<a name="line350">350: </a>  *pep = ctx->pep;
-<a name="line351">351: </a>  <font color="#4169E1">return</font>(0);
-<a name="line352">352: </a>}
-
-<a name="line356">356: </a><font color="#B22222">/*@</font>
-<a name="line357">357: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a> - Retrieve the polynomial eigensolver object (<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font>
-<a name="line358">358: </a><font color="#B22222">   associated with the nonlinear eigenvalue solver.</font>
-
-<a name="line360">360: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line362">362: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line363">363: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
-
-<a name="line365">365: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line366">366: </a><font color="#B22222">.  pep - the polynomial eigensolver object</font>
-
-<a name="line368">368: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line370">370: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a>()</font>
-<a name="line371">371: </a><font color="#B22222">@*/</font>
-<a name="line372">372: </a><strong><font color="#4169E1"><a name="NEPInterpolGetPEP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> *pep)</font></strong>
-<a name="line373">373: </a>{
-
-<a name="line379">379: </a>  PetscTryMethod(nep,<font color="#666666">"NEPInterpolGetPEP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*),(nep,pep));
-<a name="line380">380: </a>  <font color="#4169E1">return</font>(0);
-<a name="line381">381: </a>}
-
-<a name="line385">385: </a><strong><font color="#4169E1"><a name="NEPView_Interpol"></a>PetscErrorCode NEPView_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line386">386: </a>{
-<a name="line388">388: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line391">391: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(nep,&ctx->pep); }
-<a name="line392">392: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Interpol: polynomial degree %D\n"</font>,ctx->deg);
-<a name="line393">393: </a>  PetscViewerASCIIPushTab(viewer);
-<a name="line394">394: </a>  <a href="../../../../docs/manualpages/PEP/PEPView.html#PEPView">PEPView</a>(ctx->pep,viewer);
-<a name="line395">395: </a>  PetscViewerASCIIPopTab(viewer);
-<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
-<a name="line397">397: </a>}
-
-<a name="line401">401: </a><strong><font color="#4169E1"><a name="NEPReset_Interpol"></a>PetscErrorCode NEPReset_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line402">402: </a>{
-<a name="line404">404: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line407">407: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/PEP/PEPReset.html#PEPReset">PEPReset</a>(ctx->pep); }
-<a name="line408">408: </a>  <font color="#4169E1">return</font>(0);
-<a name="line409">409: </a>}
-
-<a name="line413">413: </a><strong><font color="#4169E1"><a name="NEPDestroy_Interpol"></a>PetscErrorCode NEPDestroy_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line414">414: </a>{
-<a name="line416">416: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
-
-<a name="line419">419: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&ctx->pep);
-<a name="line420">420: </a>  PetscFree(nep->data);
-<a name="line421">421: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetDegree_C"</font>,NULL);
-<a name="line422">422: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetDegree_C"</font>,NULL);
-<a name="line423">423: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetPEP_C"</font>,NULL);
-<a name="line424">424: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetPEP_C"</font>,NULL);
-<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
-<a name="line426">426: </a>}
-
-<a name="line430">430: </a><strong><font color="#4169E1"><a name="NEPCreate_Interpol"></a>PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line431">431: </a>{
-<a name="line433">433: </a>  NEP_INTERPOL   *ctx;
-
-<a name="line436">436: </a>  PetscNewLog(nep,&ctx);
-<a name="line437">437: </a>  ctx->deg  = 5;
-<a name="line438">438: </a>  nep->data = (void*)ctx;
-
-<a name="line440">440: </a>  nep->ops->solve          = NEPSolve_Interpol;
-<a name="line441">441: </a>  nep->ops->setup          = NEPSetUp_Interpol;
-<a name="line442">442: </a>  nep->ops->setfromoptions = NEPSetFromOptions_Interpol;
-<a name="line443">443: </a>  nep->ops->reset          = NEPReset_Interpol;
-<a name="line444">444: </a>  nep->ops->destroy        = NEPDestroy_Interpol;
-<a name="line445">445: </a>  nep->ops->view           = NEPView_Interpol;
-<a name="line446">446: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetDegree_C"</font>,NEPInterpolSetDegree_Interpol);
-<a name="line447">447: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetDegree_C"</font>,NEPInterpolGetDegree_Interpol);
-<a name="line448">448: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetPEP_C"</font>,NEPInterpolSetPEP_Interpol);
-<a name="line449">449: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetPEP_C"</font>,NEPInterpolGetPEP_Interpol);
-<a name="line450">450: </a>  <font color="#4169E1">return</font>(0);
-<a name="line451">451: </a>}
+<a name="line59"> 59: </a>  NEPSetDimensions_Default(nep,nep->nev,&nep->ncv,&nep->mpd);
+<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
+<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
+<a name="line62"> 62: </a>  <font color="#4169E1">if</font> (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NEPINTERPOL only available for split operator"</font>);
+<a name="line63"> 63: </a>  <font color="#4169E1">if</font> (nep->stopping!=<a href="../../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support user-defined stopping test"</font>);
+
+<a name="line65"> 65: </a>  <font color="#B22222">/* transfer <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options */</font>
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(nep,&ctx->pep); }
+<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>(ctx->pep,nep->V);
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(ctx->pep,PEP_BASIS_CHEBYSHEV1);
+<a name="line69"> 69: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(ctx->pep,PEP_TARGET_MAGNITUDE);
+<a name="line70"> 70: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(ctx->pep,&st);
+<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT);
+<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(ctx->pep,nep->nev,nep->ncv?nep->ncv:PETSC_DEFAULT,nep->mpd?nep->mpd:PETSC_DEFAULT);
+<a name="line73"> 73: </a>  tol=ctx->pep->tol;
+<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (tol==PETSC_DEFAULT) tol = (nep->tol==PETSC_DEFAULT)?SLEPC_DEFAULT_TOL/10.0:nep->tol/10.0;
+<a name="line75"> 75: </a>  its=ctx->pep->max_it;
+<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (!its) its = nep->max_it?nep->max_it:PETSC_DEFAULT;
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(ctx->pep,tol,its);
+<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>(nep,&trackall);
+<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(ctx->pep,trackall);
+
+<a name="line81"> 81: </a>  <font color="#B22222">/* transfer region options */</font>
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NEPINTERPOL requires a nontrivial region"</font>);
+<a name="line84"> 84: </a>  PetscObjectTypeCompare((PetscObject)nep->rg,RGINTERVAL,&flg);
+<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Only implemented for interval regions"</font>);
+<a name="line86"> 86: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(nep->rg,&a,&b,&c,&d);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (a<=-PETSC_MAX_REAL || b>=PETSC_MAX_REAL) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Only implemented for bounded intervals"</font>);
+<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(ctx->pep,&rg);
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,RGINTERVAL);
+<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (a==b) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Only implemented for intervals on the real axis"</font>);
+<a name="line91"> 91: </a>  s = 2.0/(b-a);
+<a name="line92"> 92: </a>  c = c*s;
+<a name="line93"> 93: </a>  d = d*s;
+<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,-1.0,1.0,c,d);
+<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(nep->rg,1,&nep->target,&zero,&in);
+<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (in<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"The target is not inside the target set"</font>);
+<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(ctx->pep,(nep->target-(a+b)/2)*s);
+
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
+<a name="line100">100: </a>  <font color="#4169E1">return</font>(0);
+<a name="line101">101: </a>}
+
+<a name="line105">105: </a><font color="#B22222">/*</font>
+<a name="line106">106: </a><font color="#B22222">  Input: </font>
+<a name="line107">107: </a><font color="#B22222">    d, number of nodes to compute</font>
+<a name="line108">108: </a><font color="#B22222">    a,b, interval extrems</font>
+<a name="line109">109: </a><font color="#B22222">  Output:</font>
+<a name="line110">110: </a><font color="#B22222">    *x, array containing the d Chebyshev nodes of the interval [a,b]</font>
+<a name="line111">111: </a><font color="#B22222">    *dct2, coefficients to compute a discrete cosine transformation (DCT-II)</font>
+<a name="line112">112: </a><font color="#B22222">*/</font>
+<a name="line113">113: </a><strong><font color="#4169E1"><a name="ChebyshevNodes"></a>static PetscErrorCode ChebyshevNodes(PetscInt d,PetscReal a,PetscReal b,PetscScalar *x,PetscReal *dct2)</font></strong>
+<a name="line114">114: </a>{
+<a name="line115">115: </a>  PetscInt  j,i;
+<a name="line116">116: </a>  PetscReal t;
+
+<a name="line119">119: </a>  <font color="#4169E1">for</font> (j=0;j<d+1;j++) {
+<a name="line120">120: </a>    t = ((2*j+1)*PETSC_PI)/(2*(d+1));
+<a name="line121">121: </a>    x[j] = (a+b)/2.0+((b-a)/2.0)*PetscCosReal(t);
+<a name="line122">122: </a>    <font color="#4169E1">for</font> (i=0;i<d+1;i++) dct2[j*(d+1)+i] = PetscCosReal(i*t);
+<a name="line123">123: </a>  }
+<a name="line124">124: </a>  <font color="#4169E1">return</font>(0);
+<a name="line125">125: </a>}
+
+<a name="line129">129: </a><strong><font color="#4169E1"><a name="NEPSolve_Interpol"></a>PetscErrorCode NEPSolve_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line130">130: </a>{
+<a name="line132">132: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+<a name="line133">133: </a>  Mat            *A;   <font color="#B22222">/*T=nep->function,Tp=nep->jacobian;*/</font>
+<a name="line134">134: </a>  PetscScalar    *x,*fx,t;
+<a name="line135">135: </a>  PetscReal      *cs,a,b,s;
+<a name="line136">136: </a>  PetscInt       i,j,k,deg=ctx->deg;
+
+<a name="line139">139: </a>  PetscMalloc4(deg+1,&A,(deg+1)*(deg+1),&cs,deg+1,&x,(deg+1)*nep->nt,&fx);
+<a name="line140">140: </a>  <a href="../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(nep->rg,&a,&b,NULL,NULL);
+<a name="line141">141: </a>  ChebyshevNodes(deg,a,b,x,cs);
+<a name="line142">142: </a>  <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
+<a name="line143">143: </a>    <font color="#4169E1">for</font> (i=0;i<=deg;i++) {
+<a name="line144">144: </a>      <a href="../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[j],x[i],&fx[i+j*(deg+1)]);
+<a name="line145">145: </a>    }
+<a name="line146">146: </a>  }
+
+<a name="line148">148: </a>  <font color="#B22222">/* Polynomial coefficients */</font>
+<a name="line149">149: </a>  <font color="#4169E1">for</font> (k=0;k<=deg;k++) {
+<a name="line150">150: </a>    MatDuplicate(nep->A[0],MAT_COPY_VALUES,&A[k]);
+<a name="line151">151: </a>    t = 0.0;
+<a name="line152">152: </a>    <font color="#4169E1">for</font> (i=0;i<deg+1;i++) t += fx[i]*cs[i*(deg+1)+k];
+<a name="line153">153: </a>    t *= 2.0/(deg+1); 
+<a name="line154">154: </a>    <font color="#4169E1">if</font> (k==0) t /= 2.0;
+<a name="line155">155: </a>    MatScale(A[k],t);
+<a name="line156">156: </a>    <font color="#4169E1">for</font> (j=1;j<nep->nt;j++) {
+<a name="line157">157: </a>      t = 0.0;
+<a name="line158">158: </a>      <font color="#4169E1">for</font> (i=0;i<deg+1;i++) t += fx[i+j*(deg+1)]*cs[i*(deg+1)+k];
+<a name="line159">159: </a>      t *= 2.0/(deg+1); 
+<a name="line160">160: </a>      <font color="#4169E1">if</font> (k==0) t /= 2.0;
+<a name="line161">161: </a>      MatAXPY(A[k],t,nep->A[j],nep->mstr);
+<a name="line162">162: </a>    }
+<a name="line163">163: </a>  }
+
+<a name="line165">165: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(ctx->pep,deg+1,A);
+<a name="line166">166: </a>  <font color="#4169E1">for</font> (k=0;k<=deg;k++) {
+<a name="line167">167: </a>    MatDestroy(&A[k]);
+<a name="line168">168: </a>  }
+<a name="line169">169: </a>  PetscFree4(A,cs,x,fx);
+
+<a name="line171">171: </a>  <font color="#B22222">/* Solve polynomial eigenproblem */</font>
+<a name="line172">172: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(ctx->pep);
+<a name="line173">173: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(ctx->pep,&nep->nconv);
+<a name="line174">174: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>(ctx->pep,&nep->its);
+<a name="line175">175: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(ctx->pep,(<a href="../../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>*)&nep->reason);
+<a name="line176">176: </a>  s = 2.0/(b-a);
+<a name="line177">177: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line178">178: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(ctx->pep,i,&nep->eigr[i],&nep->eigi[i],NULL,NULL);
+<a name="line179">179: </a>    nep->eigr[i] /= s;
+<a name="line180">180: </a>    nep->eigr[i] += (a+b)/2.0;
+<a name="line181">181: </a>    nep->eigi[i] /= s;
+<a name="line182">182: </a>  }
+<a name="line183">183: </a>  nep->state = NEP_STATE_EIGENVECTORS;
+<a name="line184">184: </a>  <font color="#4169E1">return</font>(0);
+<a name="line185">185: </a>}
+
+<a name="line189">189: </a><strong><font color="#4169E1"><a name="PEPMonitor_Interpol"></a>static PetscErrorCode PEPMonitor_Interpol(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line190">190: </a>{
+<a name="line191">191: </a>  PetscInt       i;
+<a name="line192">192: </a>  <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>            nep = (<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)ctx;
+
+<a name="line196">196: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(nest,nep->ncv);i++) {
+<a name="line197">197: </a>    nep->eigr[i]   = eigr[i];
+<a name="line198">198: </a>    nep->eigi[i]   = eigi[i];
+<a name="line199">199: </a>    nep->errest[i] = errest[i];
+<a name="line200">200: </a>  }
+<a name="line201">201: </a>  NEPMonitor(nep,its,nconv,nep->eigr,nep->eigi,nep->errest,nest);
+<a name="line202">202: </a>  <font color="#4169E1">return</font>(0);
+<a name="line203">203: </a>}
+
+<a name="line207">207: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_Interpol"></a>PetscErrorCode NEPSetFromOptions_Interpol(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line208">208: </a>{
+<a name="line210">210: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+
+<a name="line213">213: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(nep,&ctx->pep); }
+<a name="line214">214: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(ctx->pep);
+<a name="line215">215: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> Interpol Options"</font>);
+<a name="line216">216: </a>  PetscOptionsInt(<font color="#666666">"-nep_interpol_degree"</font>,<font color="#666666">"Degree of interpolation polynomial"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>"</font>,ctx->deg,&ctx->deg,NULL);
+<a name="line217">217: </a>  PetscOptionsTail();
+<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
+<a name="line219">219: </a>}
+
+<a name="line223">223: </a><strong><font color="#4169E1"><a name="NEPInterpolSetDegree_Interpol"></a>static PetscErrorCode NEPInterpolSetDegree_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt deg)</font></strong>
+<a name="line224">224: </a>{
+<a name="line225">225: </a>  NEP_INTERPOL *ctx = (NEP_INTERPOL*)nep->data;
+
+<a name="line228">228: </a>  ctx->deg = deg;
+<a name="line229">229: </a>  <font color="#4169E1">return</font>(0);
+<a name="line230">230: </a>}
+
+<a name="line234">234: </a><font color="#B22222">/*@</font>
+<a name="line235">235: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a> - Sets the degree of the interpolation polynomial.</font>
+
+<a name="line237">237: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line239">239: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line240">240: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
+<a name="line241">241: </a><font color="#B22222">-  deg - polynomial degree</font>
+
+<a name="line243">243: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line245">245: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a>()</font>
+<a name="line246">246: </a><font color="#B22222">@*/</font>
+<a name="line247">247: </a><strong><font color="#4169E1"><a name="NEPInterpolSetDegree"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt deg)</font></strong>
+<a name="line248">248: </a>{
+
+<a name="line254">254: </a>  PetscTryMethod(nep,<font color="#666666">"NEPInterpolSetDegree_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt),(nep,deg));
+<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
+<a name="line256">256: </a>}
+
+<a name="line260">260: </a><strong><font color="#4169E1"><a name="NEPInterpolGetDegree_Interpol"></a>static PetscErrorCode NEPInterpolGetDegree_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *deg)</font></strong>
+<a name="line261">261: </a>{
+<a name="line262">262: </a>  NEP_INTERPOL *ctx = (NEP_INTERPOL*)nep->data;
+
+<a name="line265">265: </a>  *deg = ctx->deg;
+<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
+<a name="line267">267: </a>}
+
+<a name="line271">271: </a><font color="#B22222">/*@</font>
+<a name="line272">272: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a> - Gets the degree of the interpolation polynomial.</font>
+
+<a name="line274">274: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line276">276: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line277">277: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line279">279: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line280">280: </a><font color="#B22222">.  deg - the polynomial degree</font>
+
+<a name="line282">282: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line284">284: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolSetDegree.html#NEPInterpolSetDegree">NEPInterpolSetDegree</a>()</font>
+<a name="line285">285: </a><font color="#B22222">@*/</font>
+<a name="line286">286: </a><strong><font color="#4169E1"><a name="NEPInterpolGetDegree"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolGetDegree.html#NEPInterpolGetDegree">NEPInterpolGetDegree</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *deg)</font></strong>
+<a name="line287">287: </a>{
+
+<a name="line293">293: </a>  PetscUseMethod(nep,<font color="#666666">"NEPInterpolGetDegree_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*),(nep,deg));
+<a name="line294">294: </a>  <font color="#4169E1">return</font>(0);
+<a name="line295">295: </a>}
+
+<a name="line299">299: </a><strong><font color="#4169E1"><a name="NEPInterpolSetPEP_Interpol"></a>static PetscErrorCode NEPInterpolSetPEP_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line300">300: </a>{
+<a name="line302">302: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+
+<a name="line305">305: </a>  PetscObjectReference((PetscObject)pep);
+<a name="line306">306: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&ctx->pep);
+<a name="line307">307: </a>  ctx->pep = pep;
+<a name="line308">308: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->pep);
+<a name="line309">309: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
+<a name="line311">311: </a>}
+
+<a name="line315">315: </a><font color="#B22222">/*@</font>
+<a name="line316">316: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a> - Associate a polynomial eigensolver object (<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>) to the</font>
+<a name="line317">317: </a><font color="#B22222">   nonlinear eigenvalue solver.</font>
+
+<a name="line319">319: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line321">321: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line322">322: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
+<a name="line323">323: </a><font color="#B22222">-  pep - the polynomial eigensolver object</font>
+
+<a name="line325">325: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line327">327: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>()</font>
+<a name="line328">328: </a><font color="#B22222">@*/</font>
+<a name="line329">329: </a><strong><font color="#4169E1"><a name="NEPInterpolSetPEP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line330">330: </a>{
+
+<a name="line337">337: </a>  PetscTryMethod(nep,<font color="#666666">"NEPInterpolSetPEP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>),(nep,pep));
+<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
+<a name="line339">339: </a>}
+
+<a name="line343">343: </a><strong><font color="#4169E1"><a name="NEPInterpolGetPEP_Interpol"></a>static PetscErrorCode NEPInterpolGetPEP_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> *pep)</font></strong>
+<a name="line344">344: </a>{
+<a name="line346">346: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+<a name="line347">347: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line350">350: </a>  <font color="#4169E1">if</font> (!ctx->pep) {
+<a name="line351">351: </a>    <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PetscObjectComm((PetscObject)nep),&ctx->pep);
+<a name="line352">352: </a>    <a href="../../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(ctx->pep,((PetscObject)nep)->prefix);
+<a name="line353">353: </a>    <a href="../../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(ctx->pep,<font color="#666666">"nep_interpol_"</font>);
+<a name="line354">354: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(ctx->pep,&st);
+<a name="line355">355: </a>    <a href="../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(st,((PetscObject)ctx->pep)->prefix);
+<a name="line356">356: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->pep,(PetscObject)nep,1);
+<a name="line357">357: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->pep);
+<a name="line358">358: </a>    <a href="../../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(ctx->pep,PEPMonitor_Interpol,nep,NULL);
+<a name="line359">359: </a>  }
+<a name="line360">360: </a>  *pep = ctx->pep;
+<a name="line361">361: </a>  <font color="#4169E1">return</font>(0);
+<a name="line362">362: </a>}
+
+<a name="line366">366: </a><font color="#B22222">/*@</font>
+<a name="line367">367: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a> - Retrieve the polynomial eigensolver object (<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font>
+<a name="line368">368: </a><font color="#B22222">   associated with the nonlinear eigenvalue solver.</font>
+
+<a name="line370">370: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line372">372: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line373">373: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line375">375: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line376">376: </a><font color="#B22222">.  pep - the polynomial eigensolver object</font>
+
+<a name="line378">378: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line380">380: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPInterpolSetPEP.html#NEPInterpolSetPEP">NEPInterpolSetPEP</a>()</font>
+<a name="line381">381: </a><font color="#B22222">@*/</font>
+<a name="line382">382: </a><strong><font color="#4169E1"><a name="NEPInterpolGetPEP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> *pep)</font></strong>
+<a name="line383">383: </a>{
+
+<a name="line389">389: </a>  PetscUseMethod(nep,<font color="#666666">"NEPInterpolGetPEP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>*),(nep,pep));
+<a name="line390">390: </a>  <font color="#4169E1">return</font>(0);
+<a name="line391">391: </a>}
+
+<a name="line395">395: </a><strong><font color="#4169E1"><a name="NEPView_Interpol"></a>PetscErrorCode NEPView_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line396">396: </a>{
+<a name="line398">398: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+<a name="line399">399: </a>  PetscBool      isascii;
+
+<a name="line402">402: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line403">403: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line404">404: </a>    <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/NEP/NEPInterpolGetPEP.html#NEPInterpolGetPEP">NEPInterpolGetPEP</a>(nep,&ctx->pep); }
+<a name="line405">405: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Interpol: polynomial degree %D\n"</font>,ctx->deg);
+<a name="line406">406: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line407">407: </a>    <a href="../../../../docs/manualpages/PEP/PEPView.html#PEPView">PEPView</a>(ctx->pep,viewer);
+<a name="line408">408: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line409">409: </a>  }
+<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
+<a name="line411">411: </a>}
+
+<a name="line415">415: </a><strong><font color="#4169E1"><a name="NEPReset_Interpol"></a>PetscErrorCode NEPReset_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line416">416: </a>{
+<a name="line418">418: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+
+<a name="line421">421: </a>  <font color="#4169E1">if</font> (!ctx->pep) { <a href="../../../../docs/manualpages/PEP/PEPReset.html#PEPReset">PEPReset</a>(ctx->pep); }
+<a name="line422">422: </a>  <font color="#4169E1">return</font>(0);
+<a name="line423">423: </a>}
+
+<a name="line427">427: </a><strong><font color="#4169E1"><a name="NEPDestroy_Interpol"></a>PetscErrorCode NEPDestroy_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line428">428: </a>{
+<a name="line430">430: </a>  NEP_INTERPOL   *ctx = (NEP_INTERPOL*)nep->data;
+
+<a name="line433">433: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&ctx->pep);
+<a name="line434">434: </a>  PetscFree(nep->data);
+<a name="line435">435: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetDegree_C"</font>,NULL);
+<a name="line436">436: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetDegree_C"</font>,NULL);
+<a name="line437">437: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetPEP_C"</font>,NULL);
+<a name="line438">438: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetPEP_C"</font>,NULL);
+<a name="line439">439: </a>  <font color="#4169E1">return</font>(0);
+<a name="line440">440: </a>}
+
+<a name="line444">444: </a><strong><font color="#4169E1"><a name="NEPCreate_Interpol"></a>PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line445">445: </a>{
+<a name="line447">447: </a>  NEP_INTERPOL   *ctx;
+
+<a name="line450">450: </a>  PetscNewLog(nep,&ctx);
+<a name="line451">451: </a>  ctx->deg  = 5;
+<a name="line452">452: </a>  nep->data = (void*)ctx;
+
+<a name="line454">454: </a>  nep->ops->solve          = NEPSolve_Interpol;
+<a name="line455">455: </a>  nep->ops->setup          = NEPSetUp_Interpol;
+<a name="line456">456: </a>  nep->ops->setfromoptions = NEPSetFromOptions_Interpol;
+<a name="line457">457: </a>  nep->ops->reset          = NEPReset_Interpol;
+<a name="line458">458: </a>  nep->ops->destroy        = NEPDestroy_Interpol;
+<a name="line459">459: </a>  nep->ops->view           = NEPView_Interpol;
+<a name="line460">460: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetDegree_C"</font>,NEPInterpolSetDegree_Interpol);
+<a name="line461">461: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetDegree_C"</font>,NEPInterpolGetDegree_Interpol);
+<a name="line462">462: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolSetPEP_C"</font>,NEPInterpolSetPEP_Interpol);
+<a name="line463">463: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPInterpolGetPEP_C"</font>,NEPInterpolGetPEP_Interpol);
+<a name="line464">464: </a>  <font color="#4169E1">return</font>(0);
+<a name="line465">465: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/impls/interpol/makefile b/src/nep/impls/interpol/makefile
index 45fae2e..1067365 100644
--- a/src/nep/impls/interpol/makefile
+++ b/src/nep/impls/interpol/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/impls/interpol/makefile.html b/src/nep/impls/interpol/makefile.html
index ca1149f..f84c6d9 100644
--- a/src/nep/impls/interpol/makefile.html
+++ b/src/nep/impls/interpol/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/interpol/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:22+00:00">
+<meta name="date" content="2016-05-16T10:34:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/interpol/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/interpol/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/impls/makefile b/src/nep/impls/makefile
index 3f0c3d1..ff465bc 100644
--- a/src/nep/impls/makefile
+++ b/src/nep/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -22,7 +22,7 @@
 ALL: lib
 
 LIBBASE  = libslepcnep
-DIRS     = rii slp narnoldi interpol ciss
+DIRS     = rii slp narnoldi interpol ciss nleigs
 LOCDIR   = src/nep/impls/
 MANSEC   = NEP
 
diff --git a/src/nep/impls/makefile.html b/src/nep/impls/makefile.html
index cc2e9f8..d310083 100644
--- a/src/nep/impls/makefile.html
+++ b/src/nep/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:20+00:00">
+<meta name="date" content="2016-05-16T10:34:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -33,7 +33,7 @@
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
 LIBBASE  = libslepcnep
-DIRS     = rii slp narnoldi interpol ciss
+DIRS     = rii slp narnoldi interpol ciss nleigs
 LOCDIR   = src/nep/impls/
 MANSEC   = <a href="ROOT/docs/manualpages/NEP/NEP.html#NEP">NEP</a>
 
diff --git a/src/nep/impls/narnoldi/ftn-auto/makefile b/src/nep/impls/narnoldi/ftn-auto/makefile
new file mode 100644
index 0000000..e4451da
--- /dev/null
+++ b/src/nep/impls/narnoldi/ftn-auto/makefile
@@ -0,0 +1,13 @@
+
+#requiresdefine   'PETSC_HAVE_FORTRAN'
+ALL: lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = narnoldif.c
+SOURCEF  =
+SOURCEH  = 
+DIRS     =
+LIBBASE  = libslepcnep
+LOCDIR   = src/nep/impls/narnoldi/ftn-auto/
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
diff --git a/src/nep/impls/narnoldi/ftn-auto/narnoldif.c b/src/nep/impls/narnoldi/ftn-auto/narnoldif.c
new file mode 100644
index 0000000..5e70960
--- /dev/null
+++ b/src/nep/impls/narnoldi/ftn-auto/narnoldif.c
@@ -0,0 +1,58 @@
+#include "petscsys.h"
+#include "petscfix.h"
+#include "petsc/private/fortranimpl.h"
+/* narnoldi.c */
+/* Fortran interface file */
+
+/*
+* This file was generated automatically by bfort from the C source
+* file.  
+ */
+
+#ifdef PETSC_USE_POINTER_CONVERSION
+#if defined(__cplusplus)
+extern "C" { 
+#endif 
+extern void *PetscToPointer(void*);
+extern int PetscFromPointer(void *);
+extern void PetscRmPointer(void*);
+#if defined(__cplusplus)
+} 
+#endif 
+
+#else
+
+#define PetscToPointer(a) (*(PetscFortranAddr *)(a))
+#define PetscFromPointer(a) (PetscFortranAddr)(a)
+#define PetscRmPointer(a)
+#endif
+
+#include "slepcnep.h"
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnarnoldisetksp_ NEPNARNOLDISETKSP
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnarnoldisetksp_ nepnarnoldisetksp
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnarnoldigetksp_ NEPNARNOLDIGETKSP
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnarnoldigetksp_ nepnarnoldigetksp
+#endif
+
+
+/* Definitions of Fortran Wrapper routines */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+PETSC_EXTERN void PETSC_STDCALL  nepnarnoldisetksp_(NEP nep,KSP ksp, int *__ierr ){
+*__ierr = NEPNArnoldiSetKSP(
+	(NEP)PetscToPointer((nep) ),
+	(KSP)PetscToPointer((ksp) ));
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnarnoldigetksp_(NEP nep,KSP *ksp, int *__ierr ){
+*__ierr = NEPNArnoldiGetKSP(
+	(NEP)PetscToPointer((nep) ),ksp);
+}
+#if defined(__cplusplus)
+}
+#endif
diff --git a/src/nep/impls/narnoldi/index.html b/src/nep/impls/narnoldi/index.html
index 2fc17fd..7e3c692 100644
--- a/src/nep/impls/narnoldi/index.html
+++ b/src/nep/impls/narnoldi/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/narnoldi/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/narnoldi/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/impls/narnoldi/makefile b/src/nep/impls/narnoldi/makefile
index 93f3533..ed52758 100644
--- a/src/nep/impls/narnoldi/makefile
+++ b/src/nep/impls/narnoldi/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #     
diff --git a/src/nep/impls/narnoldi/makefile.html b/src/nep/impls/narnoldi/makefile.html
index 909e8df..84a3b6b 100644
--- a/src/nep/impls/narnoldi/makefile.html
+++ b/src/nep/impls/narnoldi/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/narnoldi/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:21+00:00">
+<meta name="date" content="2016-05-16T10:34:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/narnoldi/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/narnoldi/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#     </font>
diff --git a/src/nep/impls/narnoldi/narnoldi.c b/src/nep/impls/narnoldi/narnoldi.c
index 15331ab..0f6f21c 100644
--- a/src/nep/impls/narnoldi/narnoldi.c
+++ b/src/nep/impls/narnoldi/narnoldi.c
@@ -15,7 +15,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -33,7 +33,26 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 */
 
-#include <slepc/private/nepimpl.h>
+#include <slepc/private/nepimpl.h>         /*I "slepcnep.h" I*/
+
+typedef struct {
+  KSP      ksp;              /* linear solver object */
+} NEP_NARNOLDI;
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNArnoldi_KSPSolve"
+PETSC_STATIC_INLINE PetscErrorCode NEPNArnoldi_KSPSolve(NEP nep,Vec b,Vec x)
+{
+  PetscErrorCode ierr;
+  PetscInt       lits;
+  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+  PetscFunctionBegin;
+  ierr = KSPSolve(ctx->ksp,b,x);CHKERRQ(ierr);
+  ierr = KSPGetIterationNumber(ctx->ksp,&lits);CHKERRQ(ierr);
+  ierr = PetscInfo2(nep,"iter=%D, linear solve iterations=%D\n",nep->its,lits);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSetUp_NArnoldi"
@@ -43,22 +62,13 @@ PetscErrorCode NEPSetUp_NArnoldi(NEP nep)
   PetscBool      istrivial;
 
   PetscFunctionBegin;
-  if (nep->ncv) { /* ncv set */
-    if (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must be at least nev");
-  } else if (nep->mpd) { /* mpd set */
-    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-  } else { /* neither set: defaults depend on nev being small or large */
-    if (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-    else {
-      nep->mpd = 500;
-      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-    }
-  }
-  if (!nep->mpd) nep->mpd = nep->ncv;
+  ierr = NEPSetDimensions_Default(nep,nep->nev,&nep->ncv,&nep->mpd);CHKERRQ(ierr);
   if (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must not be larger than nev+mpd");
-  if (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-  if (!nep->max_funcs) nep->max_funcs = nep->max_it;
-  if (!nep->split) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NARNOLDI only available for split operator");
+  if (nep->nev>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Requested several eigenpairs but this solver can compute only one");
+  if (!nep->max_it) nep->max_it = nep->ncv;
+  if (nep->max_it < nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),1,"Current implementation is unrestarted, must set max_it >= ncv");
+  if (nep->which && nep->which!=NEP_TARGET_MAGNITUDE) SETERRQ(PetscObjectComm((PetscObject)nep),1,"Wrong value of which");
+  if (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NARNOLDI only available for split operator");
 
   ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
   if (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"This solver does not support region filtering");
@@ -78,6 +88,7 @@ PetscErrorCode NEPSetUp_NArnoldi(NEP nep)
 PetscErrorCode NEPSolve_NArnoldi(NEP nep)
 {
   PetscErrorCode     ierr;
+  NEP_NARNOLDI       *ctx = (NEP_NARNOLDI*)nep->data;
   Mat                T=nep->function,Tsigma;
   Vec                f,r=nep->work[0],x=nep->work[1],w=nep->work[2];
   PetscScalar        *X,lambda;
@@ -90,7 +101,7 @@ PetscErrorCode NEPSolve_NArnoldi(NEP nep)
   /* get initial space and shift */
   ierr = NEPGetDefaultShift(nep,&lambda);CHKERRQ(ierr);
   if (!nep->nini) {
-    ierr = BVSetRandomColumn(nep->V,0,nep->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(nep->V,0);CHKERRQ(ierr);
     ierr = BVNormColumn(nep->V,0,NORM_2,&nrm);CHKERRQ(ierr);
     ierr = BVScaleColumn(nep->V,0,1.0/nrm);CHKERRQ(ierr);
     n = 1;
@@ -101,9 +112,10 @@ PetscErrorCode NEPSolve_NArnoldi(NEP nep)
   ierr = NEPProjectOperator(nep,0,n);CHKERRQ(ierr);
 
   /* prepare linear solver */
+  if (!ctx->ksp) { ierr = NEPNArnoldiGetKSP(nep,&ctx->ksp);CHKERRQ(ierr); }
   ierr = NEPComputeFunction(nep,lambda,T,T);CHKERRQ(ierr);
   ierr = MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);CHKERRQ(ierr);
-  ierr = KSPSetOperators(nep->ksp,Tsigma,Tsigma);CHKERRQ(ierr);
+  ierr = KSPSetOperators(ctx->ksp,Tsigma,Tsigma);CHKERRQ(ierr);
 
   /* Restart loop */
   while (nep->reason == NEP_CONVERGED_ITERATING) {
@@ -126,21 +138,21 @@ PetscErrorCode NEPSolve_NArnoldi(NEP nep)
 
     /* convergence test */
     ierr = VecNorm(r,NORM_2,&resnorm);CHKERRQ(ierr);
-    nep->errest[nep->nconv] = resnorm;
-    if (resnorm<=nep->rtol) {
+    ierr = (*nep->converged)(nep,lambda,0,resnorm,&nep->errest[nep->nconv],nep->convergedctx);CHKERRQ(ierr);
+    if (nep->errest[nep->nconv]<=nep->tol) {
       ierr = BVInsertVec(nep->V,nep->nconv,x);CHKERRQ(ierr);
       nep->nconv = nep->nconv + 1;
-      nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
     }
-    ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,1);CHKERRQ(ierr);
+    ierr = (*nep->stopping)(nep,nep->its,nep->max_it,nep->nconv,nep->nev,&nep->reason,nep->stoppingctx);CHKERRQ(ierr);
+    ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->eigi,nep->errest,1);CHKERRQ(ierr);
 
     if (nep->reason == NEP_CONVERGED_ITERATING) {
 
       /* continuation vector: f = T(sigma)\r */
       ierr = BVGetColumn(nep->V,n,&f);CHKERRQ(ierr);
-      ierr = NEP_KSPSolve(nep,r,f);CHKERRQ(ierr);
+      ierr = NEPNArnoldi_KSPSolve(nep,r,f);CHKERRQ(ierr);
       ierr = BVRestoreColumn(nep->V,n,&f);CHKERRQ(ierr);
-      ierr = KSPGetConvergedReason(nep->ksp,&kspreason);CHKERRQ(ierr);
+      ierr = KSPGetConvergedReason(ctx->ksp,&kspreason);CHKERRQ(ierr);
       if (kspreason<0) {
         ierr = PetscInfo1(nep,"iter=%D, linear solve failed, stopping solve\n",nep->its);CHKERRQ(ierr);
         nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
@@ -161,19 +173,170 @@ PetscErrorCode NEPSolve_NArnoldi(NEP nep)
       ierr = NEPProjectOperator(nep,n,n+1);CHKERRQ(ierr);
       n++;
     }
-    if (nep->its >= nep->max_it) nep->reason = NEP_DIVERGED_MAX_IT;
   }
   ierr = MatDestroy(&Tsigma);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "NEPSetFromOptions_NArnoldi"
+PetscErrorCode NEPSetFromOptions_NArnoldi(PetscOptionItems *PetscOptionsObject,NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+  PetscFunctionBegin;
+  if (!ctx->ksp) { ierr = NEPNArnoldiGetKSP(nep,&ctx->ksp);CHKERRQ(ierr); }
+  ierr = KSPSetOperators(ctx->ksp,nep->function,nep->function_pre);CHKERRQ(ierr);
+  ierr = KSPSetFromOptions(ctx->ksp);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNArnoldiSetKSP_NArnoldi"
+static PetscErrorCode NEPNArnoldiSetKSP_NArnoldi(NEP nep,KSP ksp)
+{
+  PetscErrorCode ierr;
+  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectReference((PetscObject)ksp);CHKERRQ(ierr);
+  ierr = KSPDestroy(&ctx->ksp);CHKERRQ(ierr);
+  ctx->ksp = ksp;
+  ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);CHKERRQ(ierr);
+  nep->state = NEP_STATE_INITIAL;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNArnoldiSetKSP"
+/*@
+   NEPNArnoldiSetKSP - Associate a linear solver object (KSP) to the nonlinear
+   eigenvalue solver.
+
+   Collective on NEP
+
+   Input Parameters:
++  nep - eigenvalue solver
+-  ksp - the linear solver object
+
+   Level: advanced
+
+.seealso: NEPNArnoldiGetKSP()
+@*/
+PetscErrorCode NEPNArnoldiSetKSP(NEP nep,KSP ksp)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidHeaderSpecific(ksp,KSP_CLASSID,2);
+  PetscCheckSameComm(nep,1,ksp,2);
+  ierr = PetscTryMethod(nep,"NEPNArnoldiSetKSP_C",(NEP,KSP),(nep,ksp));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNArnoldiGetKSP_NArnoldi"
+static PetscErrorCode NEPNArnoldiGetKSP_NArnoldi(NEP nep,KSP *ksp)
+{
+  PetscErrorCode ierr;
+  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+  PetscFunctionBegin;
+  if (!ctx->ksp) {
+    ierr = KSPCreate(PetscObjectComm((PetscObject)nep),&ctx->ksp);CHKERRQ(ierr);
+    ierr = KSPSetOptionsPrefix(ctx->ksp,((PetscObject)nep)->prefix);CHKERRQ(ierr);
+    ierr = KSPAppendOptionsPrefix(ctx->ksp,"nep_narnoldi_");CHKERRQ(ierr);
+    ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->ksp,(PetscObject)nep,1);CHKERRQ(ierr);
+    ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);CHKERRQ(ierr);
+    ierr = KSPSetErrorIfNotConverged(ctx->ksp,PETSC_TRUE);CHKERRQ(ierr);
+  }
+  *ksp = ctx->ksp;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNArnoldiGetKSP"
+/*@
+   NEPNArnoldiGetKSP - Retrieve the linear solver object (KSP) associated with
+   the nonlinear eigenvalue solver.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - nonlinear eigenvalue solver
+
+   Output Parameter:
+.  ksp - the linear solver object
+
+   Level: advanced
+
+.seealso: NEPNArnoldiSetKSP()
+@*/
+PetscErrorCode NEPNArnoldiGetKSP(NEP nep,KSP *ksp)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(ksp,2);
+  ierr = PetscUseMethod(nep,"NEPNArnoldiGetKSP_C",(NEP,KSP*),(nep,ksp));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPView_NArnoldi"
+PetscErrorCode NEPView_NArnoldi(NEP nep,PetscViewer viewer)
+{
+  PetscErrorCode ierr;
+  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+  PetscBool      isascii;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!ctx->ksp) { ierr = NEPNArnoldiGetKSP(nep,&ctx->ksp);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = KSPView(ctx->ksp,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPDestroy_NArnoldi"
+PetscErrorCode NEPDestroy_NArnoldi(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+  PetscFunctionBegin;
+  ierr = KSPDestroy(&ctx->ksp);CHKERRQ(ierr);
+  ierr = PetscFree(nep->data);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNArnoldiSetKSP_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNArnoldiGetKSP_C",NULL);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "NEPCreate_NArnoldi"
 PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(NEP nep)
 {
+  PetscErrorCode ierr;
+  NEP_NARNOLDI   *ctx;
+
   PetscFunctionBegin;
+  ierr = PetscNewLog(nep,&ctx);CHKERRQ(ierr);
+  nep->data = (void*)ctx;
+
   nep->ops->solve          = NEPSolve_NArnoldi;
   nep->ops->setup          = NEPSetUp_NArnoldi;
+  nep->ops->setfromoptions = NEPSetFromOptions_NArnoldi;
+  nep->ops->destroy        = NEPDestroy_NArnoldi;
+  nep->ops->view           = NEPView_NArnoldi;
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNArnoldiSetKSP_C",NEPNArnoldiSetKSP_NArnoldi);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNArnoldiGetKSP_C",NEPNArnoldiGetKSP_NArnoldi);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/nep/impls/narnoldi/narnoldi.c.html b/src/nep/impls/narnoldi/narnoldi.c.html
index f8241c7..53ecbeb 100644
--- a/src/nep/impls/narnoldi/narnoldi.c.html
+++ b/src/nep/impls/narnoldi/narnoldi.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/narnoldi/narnoldi.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:21+00:00">
+<meta name="date" content="2016-05-16T10:34:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/narnoldi/narnoldi.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/narnoldi/narnoldi.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc nonlinear eigensolver: "narnoldi"</font>
@@ -27,7 +27,7 @@
 
 <a name="line16"> 16: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line17"> 17: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line20"> 20: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,139 +45,264 @@
 <a name="line33"> 33: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line34"> 34: </a><font color="#B22222">*/</font>
 
-<a name="line36"> 36: </a><font color="#A020F0">#include <slepc/private/nepimpl.h></font>
-
-<a name="line40"> 40: </a><strong><font color="#4169E1"><a name="NEPSetUp_NArnoldi"></a>PetscErrorCode NEPSetUp_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line41"> 41: </a>{
-<a name="line43"> 43: </a>  PetscBool      istrivial;
-
-<a name="line46"> 46: </a>  <font color="#4169E1">if</font> (nep->ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line47"> 47: </a>    <font color="#4169E1">if</font> (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line48"> 48: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line49"> 49: </a>    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line50"> 50: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
-<a name="line51"> 51: </a>    <font color="#4169E1">if</font> (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-<a name="line52"> 52: </a>    <font color="#4169E1">else</font> {
-<a name="line53"> 53: </a>      nep->mpd = 500;
-<a name="line54"> 54: </a>      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line55"> 55: </a>    }
-<a name="line56"> 56: </a>  }
-<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (!nep->mpd) nep->mpd = nep->ncv;
-<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
-<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (!nep->max_funcs) nep->max_funcs = nep->max_it;
-<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (!nep->split) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NARNOLDI only available for split operator"</font>);
-
-<a name="line63"> 63: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
-<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
-<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,3);
-
-<a name="line69"> 69: </a>  <font color="#B22222">/* set-up <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> and transfer split operator functions */</font>
-<a name="line70"> 70: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(nep->ds,DSNEP);
-<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</a>(nep->ds,nep->nt,nep->f);
-<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(nep->ds,nep->ncv);
-<a name="line73"> 73: </a>  <font color="#4169E1">return</font>(0);
-<a name="line74"> 74: </a>}
-
-<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="NEPSolve_NArnoldi"></a>PetscErrorCode NEPSolve_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line79"> 79: </a>{
-<a name="line80"> 80: </a>  PetscErrorCode     ierr;
-<a name="line81"> 81: </a>  Mat                T=nep->function,Tsigma;
-<a name="line82"> 82: </a>  Vec                f,r=nep->work[0],x=nep->work[1],w=nep->work[2];
-<a name="line83"> 83: </a>  PetscScalar        *X,lambda;
-<a name="line84"> 84: </a>  PetscReal          beta,resnorm=0.0,nrm;
-<a name="line85"> 85: </a>  PetscInt           n;
-<a name="line86"> 86: </a>  PetscBool          breakdown;
-<a name="line87"> 87: </a>  KSPConvergedReason kspreason;
-
-<a name="line90"> 90: </a>  <font color="#B22222">/* get initial space and shift */</font>
-<a name="line91"> 91: </a>  NEPGetDefaultShift(nep,&lambda);
-<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (!nep->nini) {
-<a name="line93"> 93: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,0,nep->rand);
-<a name="line94"> 94: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(nep->V,0,NORM_2,&nrm);
-<a name="line95"> 95: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(nep->V,0,1.0/nrm);
-<a name="line96"> 96: </a>    n = 1;
-<a name="line97"> 97: </a>  } <font color="#4169E1">else</font> n = nep->nini;
-
-<a name="line99"> 99: </a>  <font color="#B22222">/* build projected matrices for initial space */</font>
-<a name="line100">100: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,n,0,0,0);
-<a name="line101">101: </a>  <a href="../../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(nep,0,n);
-
-<a name="line103">103: </a>  <font color="#B22222">/* prepare linear solver */</font>
-<a name="line104">104: </a>  <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
-<a name="line105">105: </a>  MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);
-<a name="line106">106: </a>  KSPSetOperators(nep->ksp,Tsigma,Tsigma);
-
-<a name="line108">108: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line109">109: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
-<a name="line110">110: </a>    nep->its++;
-
-<a name="line112">112: </a>    <font color="#B22222">/* solve projected problem */</font>
-<a name="line113">113: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,n,0,0,0);
-<a name="line114">114: </a>    <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_RAW);
-<a name="line115">115: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(nep->ds,nep->eigr,NULL);
-<a name="line116">116: </a>    lambda = nep->eigr[0];
-
-<a name="line118">118: </a>    <font color="#B22222">/* compute Ritz vector, x = V*s */</font>
-<a name="line119">119: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_X,&X);
-<a name="line120">120: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,n);
-<a name="line121">121: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(nep->V,1.0,0.0,x,X);
-<a name="line122">122: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_X,&X);
-
-<a name="line124">124: </a>    <font color="#B22222">/* compute the residual, r = T(lambda)*x */</font>
-<a name="line125">125: </a>    <a href="../../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,x,w,r,NULL,NULL);
-
-<a name="line127">127: </a>    <font color="#B22222">/* convergence test */</font>
-<a name="line128">128: </a>    VecNorm(r,NORM_2,&resnorm);
-<a name="line129">129: </a>    nep->errest[nep->nconv] = resnorm;
-<a name="line130">130: </a>    <font color="#4169E1">if</font> (resnorm<=nep->rtol) {
-<a name="line131">131: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(nep->V,nep->nconv,x);
-<a name="line132">132: </a>      nep->nconv = nep->nconv + 1;
-<a name="line133">133: </a>      nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
-<a name="line134">134: </a>    }
-<a name="line135">135: </a>    NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,1);
-
-<a name="line137">137: </a>    <font color="#4169E1">if</font> (nep->reason == NEP_CONVERGED_ITERATING) {
-
-<a name="line139">139: </a>      <font color="#B22222">/* continuation vector: f = T(sigma)\r */</font>
-<a name="line140">140: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,n,&f);
-<a name="line141">141: </a>      NEP_KSPSolve(nep,r,f);
-<a name="line142">142: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,n,&f);
-<a name="line143">143: </a>      KSPGetConvergedReason(nep->ksp,&kspreason);
-<a name="line144">144: </a>      <font color="#4169E1">if</font> (kspreason<0) {
-<a name="line145">145: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, linear solve failed, stopping solve\n"</font>,nep->its);
-<a name="line146">146: </a>        nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
-<a name="line147">147: </a>        <font color="#4169E1">break</font>;
-<a name="line148">148: </a>      }
-
-<a name="line150">150: </a>      <font color="#B22222">/* orthonormalize */</font>
-<a name="line151">151: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(nep->V,n,NULL,&beta,&breakdown);
-<a name="line152">152: </a>      <font color="#4169E1">if</font> (breakdown || beta==0.0) {
-<a name="line153">153: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, orthogonalization failed, stopping solve\n"</font>,nep->its);
-<a name="line154">154: </a>        nep->reason = NEP_DIVERGED_BREAKDOWN;
-<a name="line155">155: </a>        <font color="#4169E1">break</font>;
-<a name="line156">156: </a>      }
-<a name="line157">157: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(nep->V,n,1.0/beta);
-
-<a name="line159">159: </a>      <font color="#B22222">/* update projected matrices */</font>
-<a name="line160">160: </a>      <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,n+1,0,0,0);
-<a name="line161">161: </a>      <a href="../../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(nep,n,n+1);
-<a name="line162">162: </a>      n++;
-<a name="line163">163: </a>    }
-<a name="line164">164: </a>    <font color="#4169E1">if</font> (nep->its >= nep->max_it) nep->reason = NEP_DIVERGED_MAX_IT;
-<a name="line165">165: </a>  }
-<a name="line166">166: </a>  MatDestroy(&Tsigma);
-<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
-<a name="line168">168: </a>}
-
-<a name="line172">172: </a><strong><font color="#4169E1"><a name="NEPCreate_NArnoldi"></a>PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line173">173: </a>{
-<a name="line175">175: </a>  nep->ops->solve          = NEPSolve_NArnoldi;
-<a name="line176">176: </a>  nep->ops->setup          = NEPSetUp_NArnoldi;
-<a name="line177">177: </a>  <font color="#4169E1">return</font>(0);
-<a name="line178">178: </a>}
+<a name="line36"> 36: </a><font color="#A020F0">#include <slepc/private/nepimpl.h>         </font><font color="#B22222">/*I "slepcnep.h" I*/</font><font color="#A020F0"></font>
+
+<a name="line38"> 38: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line39"> 39: </a>  KSP      ksp;              <font color="#B22222">/* linear solver object */</font>
+<a name="line40"> 40: </a>} NEP_NARNOLDI;
+
+<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="NEPNArnoldi_KSPSolve"></a>PETSC_STATIC_INLINE PetscErrorCode NEPNArnoldi_KSPSolve(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Vec b,Vec x)</font></strong>
+<a name="line45"> 45: </a>{
+<a name="line47"> 47: </a>  PetscInt       lits;
+<a name="line48"> 48: </a>  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+<a name="line51"> 51: </a>  KSPSolve(ctx->ksp,b,x);
+<a name="line52"> 52: </a>  KSPGetIterationNumber(ctx->ksp,&lits);
+<a name="line53"> 53: </a>  PetscInfo2(nep,<font color="#666666">"iter=%D, linear solve iterations=%D\n"</font>,nep->its,lits);
+<a name="line54"> 54: </a>  <font color="#4169E1">return</font>(0);
+<a name="line55"> 55: </a>}
+
+<a name="line59"> 59: </a><strong><font color="#4169E1"><a name="NEPSetUp_NArnoldi"></a>PetscErrorCode NEPSetUp_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line60"> 60: </a>{
+<a name="line62"> 62: </a>  PetscBool      istrivial;
+
+<a name="line65"> 65: </a>  NEPSetDimensions_Default(nep,nep->nev,&nep->ncv,&nep->mpd);
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
+<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (nep->nev>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Requested several eigenpairs but this solver can compute only one"</font>);
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = nep->ncv;
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (nep->max_it < nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Current implementation is unrestarted, must set max_it >= ncv"</font>);
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (nep->which && nep->which!=NEP_TARGET_MAGNITUDE) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Wrong value of which"</font>);
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NARNOLDI only available for split operator"</font>);
+
+<a name="line73"> 73: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,3);
+
+<a name="line79"> 79: </a>  <font color="#B22222">/* set-up <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> and transfer split operator functions */</font>
+<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(nep->ds,DSNEP);
+<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/DS/DSNEPSetFN.html#DSNEPSetFN">DSNEPSetFN</a>(nep->ds,nep->nt,nep->f);
+<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(nep->ds,nep->ncv);
+<a name="line83"> 83: </a>  <font color="#4169E1">return</font>(0);
+<a name="line84"> 84: </a>}
+
+<a name="line88"> 88: </a><strong><font color="#4169E1"><a name="NEPSolve_NArnoldi"></a>PetscErrorCode NEPSolve_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line89"> 89: </a>{
+<a name="line90"> 90: </a>  PetscErrorCode     ierr;
+<a name="line91"> 91: </a>  NEP_NARNOLDI       *ctx = (NEP_NARNOLDI*)nep->data;
+<a name="line92"> 92: </a>  Mat                T=nep->function,Tsigma;
+<a name="line93"> 93: </a>  Vec                f,r=nep->work[0],x=nep->work[1],w=nep->work[2];
+<a name="line94"> 94: </a>  PetscScalar        *X,lambda;
+<a name="line95"> 95: </a>  PetscReal          beta,resnorm=0.0,nrm;
+<a name="line96"> 96: </a>  PetscInt           n;
+<a name="line97"> 97: </a>  PetscBool          breakdown;
+<a name="line98"> 98: </a>  KSPConvergedReason kspreason;
+
+<a name="line101">101: </a>  <font color="#B22222">/* get initial space and shift */</font>
+<a name="line102">102: </a>  NEPGetDefaultShift(nep,&lambda);
+<a name="line103">103: </a>  <font color="#4169E1">if</font> (!nep->nini) {
+<a name="line104">104: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,0);
+<a name="line105">105: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(nep->V,0,NORM_2,&nrm);
+<a name="line106">106: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(nep->V,0,1.0/nrm);
+<a name="line107">107: </a>    n = 1;
+<a name="line108">108: </a>  } <font color="#4169E1">else</font> n = nep->nini;
+
+<a name="line110">110: </a>  <font color="#B22222">/* build projected matrices for initial space */</font>
+<a name="line111">111: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,n,0,0,0);
+<a name="line112">112: </a>  <a href="../../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(nep,0,n);
+
+<a name="line114">114: </a>  <font color="#B22222">/* prepare linear solver */</font>
+<a name="line115">115: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a>(nep,&ctx->ksp); }
+<a name="line116">116: </a>  <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
+<a name="line117">117: </a>  MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);
+<a name="line118">118: </a>  KSPSetOperators(ctx->ksp,Tsigma,Tsigma);
+
+<a name="line120">120: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line121">121: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line122">122: </a>    nep->its++;
+
+<a name="line124">124: </a>    <font color="#B22222">/* solve projected problem */</font>
+<a name="line125">125: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,n,0,0,0);
+<a name="line126">126: </a>    <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_RAW);
+<a name="line127">127: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(nep->ds,nep->eigr,NULL);
+<a name="line128">128: </a>    lambda = nep->eigr[0];
+
+<a name="line130">130: </a>    <font color="#B22222">/* compute Ritz vector, x = V*s */</font>
+<a name="line131">131: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_X,&X);
+<a name="line132">132: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,n);
+<a name="line133">133: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(nep->V,1.0,0.0,x,X);
+<a name="line134">134: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_X,&X);
+
+<a name="line136">136: </a>    <font color="#B22222">/* compute the residual, r = T(lambda)*x */</font>
+<a name="line137">137: </a>    <a href="../../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,x,w,r,NULL,NULL);
+
+<a name="line139">139: </a>    <font color="#B22222">/* convergence test */</font>
+<a name="line140">140: </a>    VecNorm(r,NORM_2,&resnorm);
+<a name="line141">141: </a>    (*nep->converged)(nep,lambda,0,resnorm,&nep->errest[nep->nconv],nep->convergedctx);
+<a name="line142">142: </a>    <font color="#4169E1">if</font> (nep->errest[nep->nconv]<=nep->tol) {
+<a name="line143">143: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(nep->V,nep->nconv,x);
+<a name="line144">144: </a>      nep->nconv = nep->nconv + 1;
+<a name="line145">145: </a>    }
+<a name="line146">146: </a>    (*nep->stopping)(nep,nep->its,nep->max_it,nep->nconv,nep->nev,&nep->reason,nep->stoppingctx);
+<a name="line147">147: </a>    NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->eigi,nep->errest,1);
+
+<a name="line149">149: </a>    <font color="#4169E1">if</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+
+<a name="line151">151: </a>      <font color="#B22222">/* continuation vector: f = T(sigma)\r */</font>
+<a name="line152">152: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,n,&f);
+<a name="line153">153: </a>      NEPNArnoldi_KSPSolve(nep,r,f);
+<a name="line154">154: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,n,&f);
+<a name="line155">155: </a>      KSPGetConvergedReason(ctx->ksp,&kspreason);
+<a name="line156">156: </a>      <font color="#4169E1">if</font> (kspreason<0) {
+<a name="line157">157: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, linear solve failed, stopping solve\n"</font>,nep->its);
+<a name="line158">158: </a>        nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
+<a name="line159">159: </a>        <font color="#4169E1">break</font>;
+<a name="line160">160: </a>      }
+
+<a name="line162">162: </a>      <font color="#B22222">/* orthonormalize */</font>
+<a name="line163">163: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(nep->V,n,NULL,&beta,&breakdown);
+<a name="line164">164: </a>      <font color="#4169E1">if</font> (breakdown || beta==0.0) {
+<a name="line165">165: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, orthogonalization failed, stopping solve\n"</font>,nep->its);
+<a name="line166">166: </a>        nep->reason = NEP_DIVERGED_BREAKDOWN;
+<a name="line167">167: </a>        <font color="#4169E1">break</font>;
+<a name="line168">168: </a>      }
+<a name="line169">169: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(nep->V,n,1.0/beta);
+
+<a name="line171">171: </a>      <font color="#B22222">/* update projected matrices */</font>
+<a name="line172">172: </a>      <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,n+1,0,0,0);
+<a name="line173">173: </a>      <a href="../../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(nep,n,n+1);
+<a name="line174">174: </a>      n++;
+<a name="line175">175: </a>    }
+<a name="line176">176: </a>  }
+<a name="line177">177: </a>  MatDestroy(&Tsigma);
+<a name="line178">178: </a>  <font color="#4169E1">return</font>(0);
+<a name="line179">179: </a>}
+
+<a name="line183">183: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_NArnoldi"></a>PetscErrorCode NEPSetFromOptions_NArnoldi(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line184">184: </a>{
+<a name="line186">186: </a>  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a>(nep,&ctx->ksp); }
+<a name="line190">190: </a>  KSPSetOperators(ctx->ksp,nep->function,nep->function_pre);
+<a name="line191">191: </a>  KSPSetFromOptions(ctx->ksp);
+<a name="line192">192: </a>  <font color="#4169E1">return</font>(0);
+<a name="line193">193: </a>}
+
+<a name="line197">197: </a><strong><font color="#4169E1"><a name="NEPNArnoldiSetKSP_NArnoldi"></a>static PetscErrorCode NEPNArnoldiSetKSP_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP ksp)</font></strong>
+<a name="line198">198: </a>{
+<a name="line200">200: </a>  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+<a name="line203">203: </a>  PetscObjectReference((PetscObject)ksp);
+<a name="line204">204: </a>  KSPDestroy(&ctx->ksp);
+<a name="line205">205: </a>  ctx->ksp = ksp;
+<a name="line206">206: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);
+<a name="line207">207: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line208">208: </a>  <font color="#4169E1">return</font>(0);
+<a name="line209">209: </a>}
+
+<a name="line213">213: </a><font color="#B22222">/*@</font>
+<a name="line214">214: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNArnoldiSetKSP.html#NEPNArnoldiSetKSP">NEPNArnoldiSetKSP</a> - Associate a linear solver object (KSP) to the nonlinear</font>
+<a name="line215">215: </a><font color="#B22222">   eigenvalue solver.</font>
+
+<a name="line217">217: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line219">219: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line220">220: </a><font color="#B22222">+  nep - eigenvalue solver</font>
+<a name="line221">221: </a><font color="#B22222">-  ksp - the linear solver object</font>
+
+<a name="line223">223: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line225">225: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a>()</font>
+<a name="line226">226: </a><font color="#B22222">@*/</font>
+<a name="line227">227: </a><strong><font color="#4169E1"><a name="NEPNArnoldiSetKSP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNArnoldiSetKSP.html#NEPNArnoldiSetKSP">NEPNArnoldiSetKSP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP ksp)</font></strong>
+<a name="line228">228: </a>{
+
+<a name="line235">235: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNArnoldiSetKSP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP),(nep,ksp));
+<a name="line236">236: </a>  <font color="#4169E1">return</font>(0);
+<a name="line237">237: </a>}
+
+<a name="line241">241: </a><strong><font color="#4169E1"><a name="NEPNArnoldiGetKSP_NArnoldi"></a>static PetscErrorCode NEPNArnoldiGetKSP_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP *ksp)</font></strong>
+<a name="line242">242: </a>{
+<a name="line244">244: </a>  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+<a name="line247">247: </a>  <font color="#4169E1">if</font> (!ctx->ksp) {
+<a name="line248">248: </a>    KSPCreate(PetscObjectComm((PetscObject)nep),&ctx->ksp);
+<a name="line249">249: </a>    KSPSetOptionsPrefix(ctx->ksp,((PetscObject)nep)->prefix);
+<a name="line250">250: </a>    KSPAppendOptionsPrefix(ctx->ksp,<font color="#666666">"nep_narnoldi_"</font>);
+<a name="line251">251: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->ksp,(PetscObject)nep,1);
+<a name="line252">252: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);
+<a name="line253">253: </a>    KSPSetErrorIfNotConverged(ctx->ksp,PETSC_TRUE);
+<a name="line254">254: </a>  }
+<a name="line255">255: </a>  *ksp = ctx->ksp;
+<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
+<a name="line257">257: </a>}
+
+<a name="line261">261: </a><font color="#B22222">/*@</font>
+<a name="line262">262: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a> - Retrieve the linear solver object (KSP) associated with</font>
+<a name="line263">263: </a><font color="#B22222">   the nonlinear eigenvalue solver.</font>
+
+<a name="line265">265: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line267">267: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line268">268: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line270">270: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line271">271: </a><font color="#B22222">.  ksp - the linear solver object</font>
+
+<a name="line273">273: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line275">275: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNArnoldiSetKSP.html#NEPNArnoldiSetKSP">NEPNArnoldiSetKSP</a>()</font>
+<a name="line276">276: </a><font color="#B22222">@*/</font>
+<a name="line277">277: </a><strong><font color="#4169E1"><a name="NEPNArnoldiGetKSP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP *ksp)</font></strong>
+<a name="line278">278: </a>{
+
+<a name="line284">284: </a>  PetscUseMethod(nep,<font color="#666666">"NEPNArnoldiGetKSP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP*),(nep,ksp));
+<a name="line285">285: </a>  <font color="#4169E1">return</font>(0);
+<a name="line286">286: </a>}
+
+<a name="line290">290: </a><strong><font color="#4169E1"><a name="NEPView_NArnoldi"></a>PetscErrorCode NEPView_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line291">291: </a>{
+<a name="line293">293: </a>  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+<a name="line294">294: </a>  PetscBool      isascii;
+
+<a name="line297">297: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line299">299: </a>    <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNArnoldiGetKSP.html#NEPNArnoldiGetKSP">NEPNArnoldiGetKSP</a>(nep,&ctx->ksp); }
+<a name="line300">300: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line301">301: </a>    KSPView(ctx->ksp,viewer);
+<a name="line302">302: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line303">303: </a>  }
+<a name="line304">304: </a>  <font color="#4169E1">return</font>(0);
+<a name="line305">305: </a>}
+
+<a name="line309">309: </a><strong><font color="#4169E1"><a name="NEPDestroy_NArnoldi"></a>PetscErrorCode NEPDestroy_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line310">310: </a>{
+<a name="line312">312: </a>  NEP_NARNOLDI   *ctx = (NEP_NARNOLDI*)nep->data;
+
+<a name="line315">315: </a>  KSPDestroy(&ctx->ksp);
+<a name="line316">316: </a>  PetscFree(nep->data);
+<a name="line317">317: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNArnoldiSetKSP_C"</font>,NULL);
+<a name="line318">318: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNArnoldiGetKSP_C"</font>,NULL);
+<a name="line319">319: </a>  <font color="#4169E1">return</font>(0);
+<a name="line320">320: </a>}
+
+<a name="line324">324: </a><strong><font color="#4169E1"><a name="NEPCreate_NArnoldi"></a>PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line325">325: </a>{
+<a name="line327">327: </a>  NEP_NARNOLDI   *ctx;
+
+<a name="line330">330: </a>  PetscNewLog(nep,&ctx);
+<a name="line331">331: </a>  nep->data = (void*)ctx;
+
+<a name="line333">333: </a>  nep->ops->solve          = NEPSolve_NArnoldi;
+<a name="line334">334: </a>  nep->ops->setup          = NEPSetUp_NArnoldi;
+<a name="line335">335: </a>  nep->ops->setfromoptions = NEPSetFromOptions_NArnoldi;
+<a name="line336">336: </a>  nep->ops->destroy        = NEPDestroy_NArnoldi;
+<a name="line337">337: </a>  nep->ops->view           = NEPView_NArnoldi;
+<a name="line338">338: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNArnoldiSetKSP_C"</font>,NEPNArnoldiSetKSP_NArnoldi);
+<a name="line339">339: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNArnoldiGetKSP_C"</font>,NEPNArnoldiGetKSP_NArnoldi);
+<a name="line340">340: </a>  <font color="#4169E1">return</font>(0);
+<a name="line341">341: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/impls/nleigs/ftn-auto/makefile b/src/nep/impls/nleigs/ftn-auto/makefile
new file mode 100644
index 0000000..39a63b4
--- /dev/null
+++ b/src/nep/impls/nleigs/ftn-auto/makefile
@@ -0,0 +1,13 @@
+
+#requiresdefine   'PETSC_HAVE_FORTRAN'
+ALL: lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = nleigsf.c
+SOURCEF  =
+SOURCEH  = 
+DIRS     =
+LIBBASE  = libslepc
+LOCDIR   = src/nep/impls/nleigs/ftn-auto/
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
diff --git a/src/nep/impls/nleigs/ftn-auto/nleigsf.c b/src/nep/impls/nleigs/ftn-auto/nleigsf.c
new file mode 100644
index 0000000..f090002
--- /dev/null
+++ b/src/nep/impls/nleigs/ftn-auto/nleigsf.c
@@ -0,0 +1,111 @@
+#include "petscsys.h"
+#include "petscfix.h"
+#include "petsc/private/fortranimpl.h"
+/* nleigs.c */
+/* Fortran interface file */
+
+/*
+* This file was generated automatically by bfort from the C source
+* file.  
+ */
+
+#ifdef PETSC_USE_POINTER_CONVERSION
+#if defined(__cplusplus)
+extern "C" { 
+#endif 
+extern void *PetscToPointer(void*);
+extern int PetscFromPointer(void *);
+extern void PetscRmPointer(void*);
+#if defined(__cplusplus)
+} 
+#endif 
+
+#else
+
+#define PetscToPointer(a) (*(PetscFortranAddr *)(a))
+#define PetscFromPointer(a) (PetscFortranAddr)(a)
+#define PetscRmPointer(a)
+#endif
+
+#include "slepcnep.h"
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigssetrestart_ NEPNLEIGSSETRESTART
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigssetrestart_ nepnleigssetrestart
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigsgetrestart_ NEPNLEIGSGETRESTART
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigsgetrestart_ nepnleigsgetrestart
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigssetlocking_ NEPNLEIGSSETLOCKING
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigssetlocking_ nepnleigssetlocking
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigsgetlocking_ NEPNLEIGSGETLOCKING
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigsgetlocking_ nepnleigsgetlocking
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigssetinterpolation_ NEPNLEIGSSETINTERPOLATION
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigssetinterpolation_ nepnleigssetinterpolation
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigsgetinterpolation_ NEPNLEIGSGETINTERPOLATION
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigsgetinterpolation_ nepnleigsgetinterpolation
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigssettrueresidual_ NEPNLEIGSSETTRUERESIDUAL
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigssettrueresidual_ nepnleigssettrueresidual
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepnleigsgettrueresidual_ NEPNLEIGSGETTRUERESIDUAL
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepnleigsgettrueresidual_ nepnleigsgettrueresidual
+#endif
+
+
+/* Definitions of Fortran Wrapper routines */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+PETSC_EXTERN void PETSC_STDCALL  nepnleigssetrestart_(NEP nep,PetscReal *keep, int *__ierr ){
+*__ierr = NEPNLEIGSSetRestart(
+	(NEP)PetscToPointer((nep) ),*keep);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigsgetrestart_(NEP nep,PetscReal *keep, int *__ierr ){
+*__ierr = NEPNLEIGSGetRestart(
+	(NEP)PetscToPointer((nep) ),keep);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigssetlocking_(NEP nep,PetscBool *lock, int *__ierr ){
+*__ierr = NEPNLEIGSSetLocking(
+	(NEP)PetscToPointer((nep) ),*lock);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigsgetlocking_(NEP nep,PetscBool *lock, int *__ierr ){
+*__ierr = NEPNLEIGSGetLocking(
+	(NEP)PetscToPointer((nep) ),lock);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigssetinterpolation_(NEP nep,PetscReal *tol,PetscInt *maxits, int *__ierr ){
+*__ierr = NEPNLEIGSSetInterpolation(
+	(NEP)PetscToPointer((nep) ),*tol,*maxits);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigsgetinterpolation_(NEP nep,PetscReal *tol,PetscInt *maxits, int *__ierr ){
+*__ierr = NEPNLEIGSGetInterpolation(
+	(NEP)PetscToPointer((nep) ),tol,maxits);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigssettrueresidual_(NEP nep,PetscBool *trueres, int *__ierr ){
+*__ierr = NEPNLEIGSSetTrueResidual(
+	(NEP)PetscToPointer((nep) ),*trueres);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepnleigsgettrueresidual_(NEP nep,PetscBool *trueres, int *__ierr ){
+*__ierr = NEPNLEIGSGetTrueResidual(
+	(NEP)PetscToPointer((nep) ),trueres);
+}
+#if defined(__cplusplus)
+}
+#endif
diff --git a/src/nep/impls/nleigs/index.html b/src/nep/impls/nleigs/index.html
new file mode 100644
index 0000000..a2f4683
--- /dev/null
+++ b/src/nep/impls/nleigs/index.html
@@ -0,0 +1,25 @@
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/nleigs/index.html" />
+  <link rel="stylesheet" href="/slepc.css" type="text/css">
+  <title>Nonlinear Eigenvalue Problem Solvers - NEP</title>
+</head>
+
+<body class="manpageindex">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/nleigs/index.html "><small>Report Typos and Errors</small></a></div>
+
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
+
+<p>
+The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
+</p>
+<p>
+As in the other solver objects, users can set various options at runtime via the options database (e.g., <code>-nep_nev 4 -nep_type narnoldi</code>).  
+Options can also be set directly in application codes by calling the corresponding routines (e.g., <a href="NEPSetDimensions.html">NEPSetDimensions</a>() / <a href="NEPSetType.html">NEPSetType</a>()).
+</p>
+
+<p>
+ 
+<a href="nleigs.c.html">nleigs.c</a><br>
+ 
+<a href="makefile.html">makefile</a><br>
diff --git a/src/nep/impls/nleigs/makefile b/src/nep/impls/nleigs/makefile
new file mode 100644
index 0000000..643294f
--- /dev/null
+++ b/src/nep/impls/nleigs/makefile
@@ -0,0 +1,36 @@
+#
+#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#  SLEPc - Scalable Library for Eigenvalue Problem Computations
+#  Copyright (c) 2002-2013, Universitat Politecnica de Valencia, Spain
+#
+#  This file is part of SLEPc.
+#     
+#  SLEPc is free software: you can redistribute it and/or modify it under  the
+#  terms of version 3 of the GNU Lesser General Public License as published by
+#  the Free Software Foundation.
+#
+#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY 
+#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS 
+#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for 
+#  more details.
+#
+#  You  should have received a copy of the GNU Lesser General  Public  License
+#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#
+
+ALL: lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = nleigs.c
+SOURCEF  = 
+SOURCEH  =
+LIBBASE  = libslepc
+DIRS     =
+MANSEC   = NEP
+LOCDIR   = src/nep/impls/nleigs/
+
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
+
+
diff --git a/src/nep/impls/nleigs/makefile.html b/src/nep/impls/nleigs/makefile.html
new file mode 100644
index 0000000..7a9c770
--- /dev/null
+++ b/src/nep/impls/nleigs/makefile.html
@@ -0,0 +1,51 @@
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/nleigs/makefile.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:32+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/nleigs/makefile.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><font color="#A020F0">#</font>
+<font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<font color="#A020F0">#  Copyright (c) 2002-2013, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  This file is part of SLEPc.</font>
+<font color="#A020F0">#     </font>
+<font color="#A020F0">#  SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<font color="#A020F0">#  terms of version 3 of the GNU Lesser General Public License as published by</font>
+<font color="#A020F0">#  the Free Software Foundation.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY </font>
+<font color="#A020F0">#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS </font>
+<font color="#A020F0">#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for </font>
+<font color="#A020F0">#  more details.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  You  should have received a copy of the GNU Lesser General  Public  License</font>
+<font color="#A020F0">#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<font color="#A020F0">#</font>
+
+<strong><font color="#FF0000">ALL:</font></strong> lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = nleigs.c
+SOURCEF  = 
+SOURCEH  =
+LIBBASE  = libslepc
+DIRS     =
+MANSEC   = <a href="ROOT/docs/manualpages/NEP/NEP.html#NEP">NEP</a>
+LOCDIR   = src/nep/impls/nleigs/
+
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
+
+
+</pre>
+</body>
+
+</html>
diff --git a/src/nep/impls/nleigs/nleigs.c b/src/nep/impls/nleigs/nleigs.c
new file mode 100644
index 0000000..c8d3374
--- /dev/null
+++ b/src/nep/impls/nleigs/nleigs.c
@@ -0,0 +1,2059 @@
+/*
+
+   SLEPc nonlinear eigensolver: "nleigs"
+
+   Method: NLEIGS
+
+   Algorithm:
+
+       Fully rational Krylov method for nonlinear eigenvalue problems.
+
+   References:
+
+       [1] S. Guttel et al., "NLEIGS: A class of robust fully rational Krylov
+           method for nonlinear eigenvalue problems", SIAM J. Sci. Comput.
+           36(6):A2842-A2864, 2014.
+
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+#include <slepc/private/nepimpl.h>         /*I "slepcnep.h" I*/
+#include <slepcblaslapack.h>
+
+#define  MAX_LBPOINTS  100
+#define  NDPOINTS      1e4
+#define  MAX_NSHIFTS   100
+
+typedef struct {
+  PetscInt       nmat;      /* number of interpolation points */
+  PetscScalar    *s,*xi;    /* Leja-Bagby points */
+  PetscScalar    *beta;     /* scaling factors */
+  Mat            *D;        /* divided difference matrices */
+  PetscScalar    *coeffD;   /* coefficients for divided differences in split form */
+  PetscInt       nshifts;   /* provided number of shifts */
+  PetscScalar    *shifts;   /* user-provided shifts for the Rational Krylov variant */
+  PetscInt       nshiftsw;  /* actual number of shifts (1 if Krylov-Schur) */
+  PetscReal      ddtol;     /* tolerance for divided difference convergence */
+  PetscInt       ddmaxit;   /* maximum number of divided difference terms */
+  BV             W;         /* auxiliary BV object */
+  PetscReal      keep;      /* restart parameter */
+  PetscBool      lock;      /* locking/non-locking variant */
+  PetscBool      trueres;   /* whether the true residual norm must be computed */
+  PetscInt       idxrk;     /* index of next shift to use */
+  KSP            *ksp;      /* ksp array for storing shift factorizations */
+  Vec            vrn;       /* random vector with normally distributed value */
+  void           *singularitiesctx;
+  PetscErrorCode (*computesingularities)(NEP,PetscInt*,PetscScalar*,void*);
+} NEP_NLEIGS;
+
+typedef struct {
+  PetscInt    nmat;
+  PetscScalar coeff[MAX_NSHIFTS];
+  Mat         A[MAX_NSHIFTS];
+  Vec         t;
+} ShellMatCtx;
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetShifts"
+PETSC_STATIC_INLINE PetscErrorCode NEPNLEIGSSetShifts(NEP nep)
+{
+  NEP_NLEIGS *ctx = (NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (!ctx->nshifts) { 
+    ctx->shifts = &nep->target;
+    ctx->nshiftsw = 1;
+  } else ctx->nshiftsw = ctx->nshifts;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSBackTransform"
+static PetscErrorCode NEPNLEIGSBackTransform(PetscObject ob,PetscInt n,PetscScalar *valr,PetscScalar *vali)
+{
+  NEP         nep;
+  PetscInt    j;
+#if !defined(PETSC_USE_COMPLEX)
+  PetscScalar t;
+#endif
+
+  PetscFunctionBegin;
+  nep = (NEP)ob;
+#if !defined(PETSC_USE_COMPLEX)
+  for (j=0;j<n;j++) {
+    if (vali[j] == 0) valr[j] = 1.0 / valr[j] + nep->target;
+    else {
+      t = valr[j] * valr[j] + vali[j] * vali[j];
+      valr[j] = valr[j] / t + nep->target;
+      vali[j] = - vali[j] / t;
+    }
+  }
+#else
+  for (j=0;j<n;j++) {
+    valr[j] = 1.0 / valr[j] + nep->target;
+  }
+#endif
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSLejaBagbyPoints"
+static PetscErrorCode NEPNLEIGSLejaBagbyPoints(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       i,k,ndpt=NDPOINTS,ndptx=NDPOINTS;
+  PetscScalar    *ds,*dsi,*dxi,*nrs,*nrxi,*s=ctx->s,*xi=ctx->xi,*beta=ctx->beta;
+  PetscReal      maxnrs,minnrxi;
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc5(ndpt+1,&ds,ndpt+1,&dsi,ndpt,&dxi,ndpt+1,&nrs,ndpt,&nrxi);CHKERRQ(ierr);
+
+  /* Discretize the target region boundary */
+  ierr = RGComputeContour(nep->rg,ndpt,ds,dsi);CHKERRQ(ierr);
+#if !defined(PETSC_USE_COMPLEX)
+  for (i=0;i<ndpt;i++) if (dsi[i]!=0.0) break;
+  if (i<ndpt) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NLEIGS with real arithmetic requires the target set to be included in the real axis");
+#endif
+  /* Discretize the singularity region */
+  if (ctx->computesingularities) {
+    ierr = (ctx->computesingularities)(nep,&ndptx,dxi,ctx->singularitiesctx);CHKERRQ(ierr);
+  } else ndptx = 0;
+
+  /* Look for Leja-Bagby points in the discretization sets */
+  s[0]    = ds[0];
+  xi[0]   = (ndptx>0)?dxi[0]:PETSC_INFINITY;
+  beta[0] = 1.0; /* scaling factors are also computed here */
+  maxnrs  = 0.0;
+  minnrxi = PETSC_MAX_REAL; 
+  for (i=0;i<ndpt;i++) {
+    nrs[i] = (ds[i]-s[0])/(1.0-ds[i]/xi[0]);
+    if (PetscAbsScalar(nrs[i])>=maxnrs) {maxnrs = PetscAbsScalar(nrs[i]); s[1] = ds[i];}
+  }
+  for (i=1;i<ndptx;i++) {
+    nrxi[i] = (dxi[i]-s[0])/(1.0-dxi[i]/xi[0]);
+    if (PetscAbsScalar(nrxi[i])<=minnrxi) {minnrxi = PetscAbsScalar(nrxi[i]); xi[1] = dxi[i];}
+  }
+  if (ndptx<2) xi[1] = PETSC_INFINITY;
+
+  beta[1] = maxnrs;
+  for (k=2;k<ctx->ddmaxit;k++) {
+    maxnrs = 0.0;
+    minnrxi = PETSC_MAX_REAL;
+    for (i=0;i<ndpt;i++) {
+      nrs[i] *= ((ds[i]-s[k-1])/(1.0-ds[i]/xi[k-1]))/beta[k-1];
+      if (PetscAbsScalar(nrs[i])>maxnrs) {maxnrs = PetscAbsScalar(nrs[i]); s[k] = ds[i];}
+    }
+    if (ndptx>=k) {
+      for (i=1;i<ndptx;i++) {
+        nrxi[i] *= ((dxi[i]-s[k-1])/(1.0-dxi[i]/xi[k-1]))/beta[k-1];
+        if (PetscAbsScalar(nrxi[i])<minnrxi) {minnrxi = PetscAbsScalar(nrxi[i]); xi[k] = dxi[i];}
+      }
+    }  else xi[k] = PETSC_INFINITY;
+    beta[k] = maxnrs;
+  }
+  ierr = PetscFree5(ds,dsi,dxi,nrs,nrxi);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSEvalNRTFunct"
+static PetscErrorCode NEPNLEIGSEvalNRTFunct(NEP nep,PetscInt k,PetscScalar sigma,PetscScalar *b)
+{
+  NEP_NLEIGS  *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt    i;
+  PetscScalar *beta=ctx->beta,*s=ctx->s,*xi=ctx->xi;
+
+  PetscFunctionBegin;
+  b[0] = 1.0/beta[0];
+  for (i=0;i<k;i++) {
+    b[i+1] = ((sigma-s[i])*b[i])/(beta[i+1]*(1.0-sigma/xi[i]));
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMult_Fun"
+static PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)
+{
+  PetscErrorCode ierr;
+  ShellMatCtx    *ctx;
+  PetscInt       i;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+  ierr = MatMult(ctx->A[0],x,y);CHKERRQ(ierr);
+  if (ctx->coeff[0]!=1.0) { ierr = VecScale(y,ctx->coeff[0]);CHKERRQ(ierr); }
+  for (i=1;i<ctx->nmat;i++) {
+    ierr = MatMult(ctx->A[i],x,ctx->t);CHKERRQ(ierr);
+    ierr = VecAXPY(y,ctx->coeff[i],ctx->t);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMultTranspose_Fun"
+static PetscErrorCode MatMultTranspose_Fun(Mat A,Vec x,Vec y)
+{
+  PetscErrorCode ierr;
+  ShellMatCtx    *ctx;
+  PetscInt       i;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+  ierr = MatMultTranspose(ctx->A[0],x,y);CHKERRQ(ierr);
+  if (ctx->coeff[0]!=1.0) { ierr = VecScale(y,ctx->coeff[0]);CHKERRQ(ierr); }
+  for (i=1;i<ctx->nmat;i++) {
+    ierr = MatMultTranspose(ctx->A[i],x,ctx->t);CHKERRQ(ierr);
+    ierr = VecAXPY(y,ctx->coeff[i],ctx->t);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatGetDiagonal_Fun"
+static PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)
+{
+  PetscErrorCode ierr;
+  ShellMatCtx    *ctx;
+  PetscInt       i;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+  ierr = MatGetDiagonal(ctx->A[0],diag);CHKERRQ(ierr);
+  if (ctx->coeff[0]!=1.0) { ierr = VecScale(diag,ctx->coeff[0]);CHKERRQ(ierr); }
+  for (i=1;i<ctx->nmat;i++) {
+    ierr = MatGetDiagonal(ctx->A[i],ctx->t);CHKERRQ(ierr);
+    ierr = VecAXPY(diag,ctx->coeff[i],ctx->t);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatDuplicate_Fun"
+static PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)
+{
+  PetscInt       n,i;
+  ShellMatCtx    *ctxnew,*ctx;
+  void           (*fun)();
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+  ierr = PetscNew(&ctxnew);CHKERRQ(ierr);
+  ctxnew->nmat = ctx->nmat;
+  for (i=0;i<ctx->nmat;i++) {
+    ierr = PetscObjectReference((PetscObject)ctx->A[i]);CHKERRQ(ierr);
+    ctxnew->A[i] = ctx->A[i];
+    ctxnew->coeff[i] = ctx->coeff[i];
+  }
+  ierr = MatGetSize(ctx->A[0],&n,NULL);CHKERRQ(ierr);
+  ierr = VecDuplicate(ctx->t,&ctxnew->t);CHKERRQ(ierr);
+  ierr = MatCreateShell(PETSC_COMM_WORLD,n,n,n,n,(void*)ctxnew,B);CHKERRQ(ierr);
+  ierr = MatShellGetOperation(A,MATOP_MULT,&fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*B,MATOP_MULT,fun);CHKERRQ(ierr);
+  ierr = MatShellGetOperation(A,MATOP_MULT_TRANSPOSE,&fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*B,MATOP_MULT_TRANSPOSE,fun);CHKERRQ(ierr);
+  ierr = MatShellGetOperation(A,MATOP_GET_DIAGONAL,&fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*B,MATOP_GET_DIAGONAL,fun);CHKERRQ(ierr);
+  ierr = MatShellGetOperation(A,MATOP_DUPLICATE,&fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*B,MATOP_DUPLICATE,fun);CHKERRQ(ierr);
+  ierr = MatShellGetOperation(A,MATOP_DESTROY,&fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*B,MATOP_DESTROY,fun);CHKERRQ(ierr);
+  ierr = MatShellGetOperation(A,MATOP_AXPY,&fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*B,MATOP_AXPY,fun);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatDestroy_Fun"
+static PetscErrorCode MatDestroy_Fun(Mat A)
+{
+  ShellMatCtx    *ctx;
+  PetscErrorCode ierr;
+  PetscInt       i;
+
+  PetscFunctionBeginUser;
+  if (A) {
+    ierr = MatShellGetContext(A,(void**)&ctx);CHKERRQ(ierr);
+    for (i=0;i<ctx->nmat;i++) {
+      ierr = MatDestroy(&ctx->A[i]);CHKERRQ(ierr);
+    }
+    ierr = VecDestroy(&ctx->t);CHKERRQ(ierr);
+    ierr = PetscFree(ctx);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatAXPY_Fun"
+static PetscErrorCode MatAXPY_Fun(Mat Y,PetscScalar a,Mat X,MatStructure str)
+{
+  ShellMatCtx    *ctxY,*ctxX;
+  PetscErrorCode ierr;
+  PetscInt       i,j;
+  PetscBool      found;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(Y,(void**)&ctxY);CHKERRQ(ierr);
+  ierr = MatShellGetContext(X,(void**)&ctxX);CHKERRQ(ierr);
+  for (i=0;i<ctxX->nmat;i++) {
+    found = PETSC_FALSE;
+    for (j=0;!found&&j<ctxY->nmat;j++) {
+      if (ctxX->A[i]==ctxY->A[j]) {
+        found = PETSC_TRUE;
+        ctxY->coeff[j] += a*ctxX->coeff[i];
+      }
+    }
+    if (!found) {
+      ctxY->coeff[ctxY->nmat] = a*ctxX->coeff[i];
+      ctxY->A[ctxY->nmat++] = ctxX->A[i];
+      ierr = PetscObjectReference((PetscObject)ctxX->A[i]);CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatScale_Fun"
+static PetscErrorCode MatScale_Fun(Mat M,PetscScalar a)
+{
+  ShellMatCtx    *ctx;
+  PetscErrorCode ierr;
+  PetscInt       i;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(M,(void**)&ctx);CHKERRQ(ierr);
+  for (i=0;i<ctx->nmat;i++) ctx->coeff[i] *= a;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NLEIGSMatToMatShellArray"
+static PetscErrorCode NLEIGSMatToMatShellArray(Mat M,Mat *Ms)
+{
+  PetscErrorCode ierr;
+  ShellMatCtx    *ctx;
+  PetscInt       n;
+  PetscBool      has;
+  
+  PetscFunctionBegin;
+  ierr = MatHasOperation(M,MATOP_DUPLICATE,&has);CHKERRQ(ierr);
+  if (!has) SETERRQ(PetscObjectComm((PetscObject)M),1,"MatDuplicate operation required");
+  ierr = PetscNew(&ctx);CHKERRQ(ierr);
+  ierr = MatDuplicate(M,MAT_COPY_VALUES,&ctx->A[0]);CHKERRQ(ierr);
+  ctx->nmat = 1;
+  ctx->coeff[0] = 1.0;
+  ierr = MatCreateVecs(M,&ctx->t,NULL);CHKERRQ(ierr);
+  ierr = MatGetSize(M,&n,NULL);CHKERRQ(ierr);
+  ierr = MatCreateShell(PetscObjectComm((PetscObject)M),n,n,n,n,(void*)ctx,Ms);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_MULT,(void(*)())MatMult_Fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_MULT_TRANSPOSE,(void(*)())MatMultTranspose_Fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_DUPLICATE,(void(*)())MatDuplicate_Fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_DESTROY,(void(*)())MatDestroy_Fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_AXPY,(void(*)())MatAXPY_Fun);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(*Ms,MATOP_SCALE,(void(*)())MatScale_Fun);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSNormEstimation"
+static PetscErrorCode NEPNLEIGSNormEstimation(NEP nep,Mat M,PetscReal *norm,Vec *w)
+{
+  PetscScalar    *z,*x,*y;
+  PetscReal      tr;
+  Vec            X=w[0],Y=w[1];
+  PetscInt       n,i;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscRandom    rand;
+  PetscErrorCode ierr;
+  
+  PetscFunctionBegin;
+  if (!ctx->vrn) {
+    /* generate a random vector with normally distributed entries with the Box-Muller transform */
+    ierr = BVGetRandomContext(nep->V,&rand);CHKERRQ(ierr);
+    ierr = MatCreateVecs(M,&ctx->vrn,NULL);CHKERRQ(ierr);
+    ierr = VecSetRandom(X,rand);CHKERRQ(ierr);
+    ierr = VecSetRandom(Y,rand);CHKERRQ(ierr);
+    ierr = VecGetLocalSize(ctx->vrn,&n);CHKERRQ(ierr);
+    ierr = VecGetArray(ctx->vrn,&z);CHKERRQ(ierr);
+    ierr = VecGetArray(X,&x);CHKERRQ(ierr);
+    ierr = VecGetArray(Y,&y);CHKERRQ(ierr);
+    for (i=0;i<n;i++) {
+#if defined(PETSC_USE_COMPLEX)
+      z[i] = PetscSqrtReal(-2.0*PetscLogReal(PetscRealPart(x[i])))*PetscCosReal(2.0*PETSC_PI*PetscRealPart(y[i]));
+      z[i] += PETSC_i*(PetscSqrtReal(-2.0*PetscLogReal(PetscImaginaryPart(x[i])))*PetscCosReal(2.0*PETSC_PI*PetscImaginaryPart(y[i])));
+#else
+      z[i] = PetscSqrtReal(-2.0*PetscLogReal(x[i]))*PetscCosReal(2.0*PETSC_PI*y[i]);
+#endif
+    }
+    ierr = VecRestoreArray(ctx->vrn,&z);CHKERRQ(ierr);
+    ierr = VecRestoreArray(X,&x);CHKERRQ(ierr);
+    ierr = VecRestoreArray(Y,&y);CHKERRQ(ierr);
+    ierr = VecNorm(ctx->vrn,NORM_2,&tr);CHKERRQ(ierr);
+    ierr = VecScale(ctx->vrn,1/tr);CHKERRQ(ierr);
+  }
+  /* matrix-free norm estimator of Ipsen http://www4.ncsu.edu/~ipsen/ps/slides_ima.pdf */
+  ierr = MatGetSize(M,&n,NULL);CHKERRQ(ierr);
+  ierr = MatMult(M,ctx->vrn,X);CHKERRQ(ierr);
+  ierr = VecNorm(X,NORM_2,norm);CHKERRQ(ierr);
+  *norm *= PetscSqrtReal(n);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSDividedDifferences_split"
+static PetscErrorCode NEPNLEIGSDividedDifferences_split(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       k,j,i;
+  PetscReal      norm0,norm,max;
+  PetscScalar    *s=ctx->s,*beta=ctx->beta,*b,alpha,*coeffs;
+  Mat            T,Ts;
+  PetscBool      shell;
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc1(nep->nt*ctx->ddmaxit,&ctx->coeffD);CHKERRQ(ierr);
+  ierr = PetscMalloc2(ctx->ddmaxit+1,&b,ctx->ddmaxit+1,&coeffs);CHKERRQ(ierr);
+  max = 0.0;
+  for (j=0;j<nep->nt;j++) {
+    ierr = FNEvaluateFunction(nep->f[j],s[0],ctx->coeffD+j);CHKERRQ(ierr);
+    ctx->coeffD[j] /= beta[0];
+    max = PetscMax(PetscAbsScalar(ctx->coeffD[j]),max);
+  }
+  norm0 = max;
+  ctx->nmat = ctx->ddmaxit;
+  for (k=1;k<ctx->ddmaxit;k++) {
+    ierr = NEPNLEIGSEvalNRTFunct(nep,k,s[k],b);CHKERRQ(ierr);
+    max = 0.0;
+    for (i=0;i<nep->nt;i++) {
+      ierr = FNEvaluateFunction(nep->f[i],s[k],ctx->coeffD+k*nep->nt+i);CHKERRQ(ierr);
+      for (j=0;j<k;j++) {
+        ctx->coeffD[k*nep->nt+i] -= b[j]*ctx->coeffD[i+nep->nt*j];
+      }
+      ctx->coeffD[k*nep->nt+i] /= b[k];
+      max = PetscMax(PetscAbsScalar(ctx->coeffD[k*nep->nt+i]),max);
+    }
+    norm = max;
+    if (norm/norm0 < ctx->ddtol) {
+      ctx->nmat = k+1;
+      break;
+    } 
+  }
+  if (!ctx->ksp) { ierr = NEPNLEIGSGetKSPs(nep,&ctx->ksp);CHKERRQ(ierr); }
+  ierr = PetscObjectTypeCompare((PetscObject)nep->A[0],MATSHELL,&shell);CHKERRQ(ierr);
+  for (i=0;i<ctx->nshiftsw;i++) {
+    ierr = NEPNLEIGSEvalNRTFunct(nep,ctx->nmat,ctx->shifts[i],coeffs);CHKERRQ(ierr);
+    if (!shell) {
+      ierr = MatDuplicate(nep->A[0],MAT_COPY_VALUES,&T);CHKERRQ(ierr);
+    } else {
+      ierr = NLEIGSMatToMatShellArray(nep->A[0],&T);CHKERRQ(ierr);
+    }
+    alpha = 0.0;
+    for (j=0;j<ctx->nmat-1;j++) alpha += coeffs[j]*ctx->coeffD[j*nep->nt];
+    ierr = MatScale(T,alpha);CHKERRQ(ierr);
+    for (k=1;k<nep->nt;k++) {
+      alpha = 0.0;
+      for (j=0;j<ctx->nmat-1;j++) alpha += coeffs[j]*ctx->coeffD[j*nep->nt+k];
+      if (shell) {
+        ierr = NLEIGSMatToMatShellArray(nep->A[k],&Ts);CHKERRQ(ierr);
+      }
+      ierr = MatAXPY(T,alpha,shell?Ts:nep->A[k],nep->mstr);CHKERRQ(ierr);
+      if (shell) {
+        ierr = MatDestroy(&Ts);CHKERRQ(ierr);
+      }
+    }
+    ierr = KSPSetOperators(ctx->ksp[i],T,T);CHKERRQ(ierr);
+    ierr = KSPSetUp(ctx->ksp[i]);CHKERRQ(ierr);
+    ierr = MatDestroy(&T);CHKERRQ(ierr);
+  }
+  ierr = PetscFree2(b,coeffs);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSDividedDifferences_callback"
+static PetscErrorCode NEPNLEIGSDividedDifferences_callback(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       k,j,i;
+  PetscReal      norm0,norm;
+  PetscScalar    *s=ctx->s,*beta=ctx->beta,*b,*coeffs;
+  Mat            *D=ctx->D,T;
+  PetscBool      shell,has,vec=PETSC_FALSE;
+  Vec            w[2];
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc2(ctx->ddmaxit+1,&b,ctx->ddmaxit+1,&coeffs);CHKERRQ(ierr);
+  T = nep->function;
+  ierr = NEPComputeFunction(nep,s[0],T,T);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)T,MATSHELL,&shell);CHKERRQ(ierr);
+  if (!shell) {
+    ierr = MatDuplicate(T,MAT_COPY_VALUES,&D[0]);CHKERRQ(ierr);
+  } else {
+    ierr = NLEIGSMatToMatShellArray(T,&D[0]);CHKERRQ(ierr);
+  }
+  if (beta[0]!=1.0) {
+    ierr = MatScale(D[0],1.0/beta[0]);CHKERRQ(ierr);
+  }
+  ierr = MatHasOperation(D[0],MATOP_NORM,&has);CHKERRQ(ierr);
+  if (has) {
+    ierr = MatNorm(D[0],NORM_FROBENIUS,&norm0);CHKERRQ(ierr);
+  } else {
+    ierr = MatCreateVecs(D[0],NULL,&w[0]);CHKERRQ(ierr);
+    ierr = VecDuplicate(w[0],&w[1]);CHKERRQ(ierr);
+    vec = PETSC_TRUE;
+    ierr = NEPNLEIGSNormEstimation(nep,D[0],&norm0,w);CHKERRQ(ierr);
+  }
+  ctx->nmat = ctx->ddmaxit;
+  for (k=1;k<ctx->ddmaxit;k++) {
+    ierr = NEPNLEIGSEvalNRTFunct(nep,k,s[k],b);CHKERRQ(ierr);
+    ierr = NEPComputeFunction(nep,s[k],T,T);CHKERRQ(ierr);
+    if (!shell) {
+      ierr = MatDuplicate(T,MAT_COPY_VALUES,&D[k]);CHKERRQ(ierr);
+    } else {
+      ierr = NLEIGSMatToMatShellArray(T,&D[k]);CHKERRQ(ierr);
+    }
+    for (j=0;j<k;j++) {
+      ierr = MatAXPY(D[k],-b[j],D[j],nep->mstr);CHKERRQ(ierr);
+    }
+    ierr = MatScale(D[k],1.0/b[k]);CHKERRQ(ierr);
+    ierr = MatHasOperation(D[k],MATOP_NORM,&has);CHKERRQ(ierr);
+    if (has) {
+      ierr = MatNorm(D[k],NORM_FROBENIUS,&norm);CHKERRQ(ierr);
+    } else {
+      if(!vec) {
+        ierr = MatCreateVecs(D[k],NULL,&w[0]);CHKERRQ(ierr);
+        ierr = VecDuplicate(w[0],&w[1]);CHKERRQ(ierr);
+        vec = PETSC_TRUE;
+      }
+      ierr = NEPNLEIGSNormEstimation(nep,D[k],&norm,w);CHKERRQ(ierr);
+    }
+    if (norm/norm0 < ctx->ddtol) {
+      ctx->nmat = k+1; /* increment (the last matrix is not used) */
+      ierr = MatDestroy(&D[k]);CHKERRQ(ierr);
+      break;
+    } 
+  }
+  if (!ctx->ksp) { ierr = NEPNLEIGSGetKSPs(nep,&ctx->ksp);CHKERRQ(ierr); }
+  for (i=0;i<ctx->nshiftsw;i++) {
+    ierr = NEPNLEIGSEvalNRTFunct(nep,ctx->nmat,ctx->shifts[i],coeffs);CHKERRQ(ierr);
+    ierr = MatDuplicate(ctx->D[0],MAT_COPY_VALUES,&T);CHKERRQ(ierr);
+    if (coeffs[0]!=1.0) { ierr = MatScale(T,coeffs[0]);CHKERRQ(ierr); }
+    for (j=1;j<ctx->nmat-1;j++) {
+      ierr = MatAXPY(T,coeffs[j],ctx->D[j],nep->mstr);CHKERRQ(ierr);
+    }
+    ierr = KSPSetOperators(ctx->ksp[i],T,T);CHKERRQ(ierr);
+    ierr = KSPSetUp(ctx->ksp[i]);CHKERRQ(ierr);
+    ierr = MatDestroy(&T);CHKERRQ(ierr);
+  }
+  ierr = PetscFree2(b,coeffs);CHKERRQ(ierr);
+  if (vec) {
+    ierr = VecDestroy(&w[0]);CHKERRQ(ierr);  
+    ierr = VecDestroy(&w[1]);CHKERRQ(ierr);  
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSRitzVector"
+static PetscErrorCode NEPNLEIGSRitzVector(NEP nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscInt k,Vec t)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       deg=ctx->nmat-1,ldds,n;
+  PetscBLASInt   nq_,lds_,n_,one=1,ldds_;
+  PetscScalar    sone=1.0,zero=0.0,*x,*y,*X;
+
+  PetscFunctionBegin;
+  ierr = DSGetDimensions(nep->ds,&n,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscMalloc1(n+nq,&y);CHKERRQ(ierr);
+  x = y+nq;
+  ierr = DSGetLeadingDimension(nep->ds,&ldds);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(nq,&nq_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(ldds,&ldds_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(deg*ld,&lds_);CHKERRQ(ierr);
+  ierr = DSGetArray(nep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  if (ctx->nshifts) PetscStackCall("BLASgemv",BLASgemv_("N",&n_,&n_,&sone,H,&ldds_,X+k*ldds,&one,&zero,x,&one));
+  else x = X+k*ldds;
+  PetscStackCall("BLASgemv",BLASgemv_("N",&nq_,&n_,&sone,S,&lds_,x,&one,&zero,y,&one));
+  ierr = DSRestoreArray(nep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(nep->V,0,nq);CHKERRQ(ierr);
+  ierr = BVMultVec(nep->V,1.0,0.0,t,y);CHKERRQ(ierr);
+  ierr = VecNormalize(t,NULL);CHKERRQ(ierr);
+  ierr = PetscFree(y);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSKrylovConvergence"
+/*
+   NEPKrylovConvergence - This is the analogue to EPSKrylovConvergence.
+*/
+static PetscErrorCode NEPNLEIGSKrylovConvergence(NEP nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscBool getall,PetscInt kini,PetscInt nits,PetscScalar betak,PetscReal betah,PetscInt *kout,Vec *w)
+{
+  PetscErrorCode ierr;
+  PetscInt       k,newk,marker,inside;
+  PetscScalar    re,im;
+  PetscReal      resnorm,tt;
+  PetscBool      istrivial;
+  Vec            t;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  t = w[0];
+  ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
+  marker = -1;
+  if (nep->trackall) getall = PETSC_TRUE;
+  for (k=kini;k<kini+nits;k++) {
+    /* eigenvalue */
+    re = nep->eigr[k];
+    im = nep->eigi[k];
+    if (!istrivial) {
+      if (!ctx->nshifts) {
+        ierr = NEPNLEIGSBackTransform((PetscObject)nep,1,&re,&im);CHKERRQ(ierr);
+      }
+      ierr = RGCheckInside(nep->rg,1,&re,&im,&inside);CHKERRQ(ierr);
+      if (marker==-1 && inside<0) marker = k;
+    }
+    newk = k;
+    ierr = DSVectors(nep->ds,DS_MAT_X,&newk,&resnorm);CHKERRQ(ierr);
+    tt = (ctx->nshifts)?SlepcAbsEigenvalue(betak-nep->eigr[k]*betah,nep->eigi[k]*betah):betah;
+    resnorm *=  PetscAbsReal(tt);
+    /* error estimate */
+    ierr = (*nep->converged)(nep,nep->eigr[k],nep->eigi[k],resnorm,&nep->errest[k],nep->convergedctx);CHKERRQ(ierr);
+    if (ctx->trueres && (nep->errest[k] < nep->tol) ) {
+      /* check explicit residual */
+      ierr = NEPNLEIGSRitzVector(nep,S,ld,nq,H,k,t);CHKERRQ(ierr);
+      ierr = NEPComputeResidualNorm_Private(nep,re,t,w+1,&resnorm);CHKERRQ(ierr);
+      ierr = (*nep->converged)(nep,re,im,resnorm,&nep->errest[k],nep->convergedctx);CHKERRQ(ierr);
+    }
+    if (marker==-1 && nep->errest[k] >= nep->tol) marker = k;
+    if (newk==k+1) {
+      nep->errest[k+1] = nep->errest[k];
+      k++;
+    }
+    if (marker!=-1 && !getall) break;
+  }
+  if (marker!=-1) k = marker;
+  *kout = k;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPSetUp_NLEIGS"
+PetscErrorCode NEPSetUp_NLEIGS(NEP nep)
+{
+  PetscErrorCode ierr;
+  PetscInt       k,in;
+  PetscScalar    zero=0.0;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  SlepcSC        sc;
+  PetscBool      istrivial;
+
+  PetscFunctionBegin;
+  ierr = NEPSetDimensions_Default(nep,nep->nev,&nep->ncv,&nep->mpd);CHKERRQ(ierr);
+  if (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must not be larger than nev+mpd");
+  if (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
+  if (!ctx->ddmaxit) ctx->ddmaxit = MAX_LBPOINTS;
+  ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
+  if (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"NEPNLEIGS requires a nontrivial region defining the target set");
+  ierr = RGCheckInside(nep->rg,1,&nep->target,&zero,&in);CHKERRQ(ierr);
+  if (in<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"The target is not inside the target set");
+  if (!nep->which) nep->which = NEP_TARGET_MAGNITUDE;
+
+  /* Initialize the NLEIGS context structure */
+  k = ctx->ddmaxit;
+  ierr = PetscMalloc4(k,&ctx->s,k,&ctx->xi,k,&ctx->beta,k,&ctx->D);CHKERRQ(ierr);
+  nep->data = ctx;
+  if (nep->tol==PETSC_DEFAULT) nep->tol = SLEPC_DEFAULT_TOL;
+  if (ctx->ddtol==PETSC_DEFAULT) ctx->ddtol = nep->tol/10.0;
+  if (!ctx->keep) ctx->keep = 0.5;
+
+  /* Compute Leja-Bagby points and scaling values */
+  ierr = NEPNLEIGSLejaBagbyPoints(nep);CHKERRQ(ierr);
+
+  /* Compute the divided difference matrices */
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+    ierr = NEPNLEIGSDividedDifferences_split(nep);CHKERRQ(ierr);
+  } else {
+    ierr = NEPNLEIGSDividedDifferences_callback(nep);CHKERRQ(ierr);
+  }
+  ierr = NEPAllocateSolution(nep,ctx->nmat);CHKERRQ(ierr);
+  ierr = NEPSetWorkVecs(nep,4);CHKERRQ(ierr);
+
+  /* set-up DS and transfer split operator functions */
+  ierr = DSSetType(nep->ds,ctx->nshifts?DSGNHEP:DSNHEP);CHKERRQ(ierr);
+  ierr = DSAllocate(nep->ds,nep->ncv+1);CHKERRQ(ierr);
+  ierr = DSGetSlepcSC(nep->ds,&sc);CHKERRQ(ierr);
+  if (!ctx->nshifts) {
+    sc->map = NEPNLEIGSBackTransform;
+    ierr = DSSetExtraRow(nep->ds,PETSC_TRUE);CHKERRQ(ierr);
+  }
+  sc->mapobj        = (PetscObject)nep;
+  sc->rg            = nep->rg;
+  sc->comparison    = nep->sc->comparison;
+  sc->comparisonctx = nep->sc->comparisonctx;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPTOARSNorm2"
+/*
+  Norm of [sp;sq] 
+*/
+static PetscErrorCode NEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)
+{
+  PetscErrorCode ierr;
+  PetscBLASInt   n_,one=1;
+
+  PetscFunctionBegin;
+  ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+  *norm = BLASnrm2_(&n_,S,&one);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPTOAROrth2"
+/*
+ Computes GS orthogonalization   [z;x] - [Sp;Sq]*y,
+ where y = ([Sp;Sq]'*[z;x]).
+   k: Column from S to be orthogonalized against previous columns.
+   Sq = Sp+ld
+   dim(work)=k;
+*/
+static PetscErrorCode NEPTOAROrth2(NEP nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)
+{
+  PetscErrorCode ierr;
+  PetscBLASInt   n_,lds_,k_,one=1;
+  PetscScalar    sonem=-1.0,sone=1.0,szero=0.0,*x0,*x,*c;
+  PetscInt       i,lds=deg*ld,n;
+  PetscReal      eta,onorm;
+  
+  PetscFunctionBegin;
+  ierr = BVGetOrthogonalization(nep->V,NULL,NULL,&eta,NULL);CHKERRQ(ierr);
+  n = k+deg-1;
+  ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(deg*ld,&lds_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr); /* Number of vectors to orthogonalize against them */
+  c = work;
+  x0 = S+k*lds;
+  PetscStackCall("BLASgemv",BLASgemv_("C",&n_,&k_,&sone,S,&lds_,x0,&one,&szero,y,&one));
+  for (i=1;i<deg;i++) {
+    x = S+i*ld+k*lds;
+    PetscStackCall("BLASgemv",BLASgemv_("C",&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,y,&one));
+  }
+  for (i=0;i<deg;i++) {
+    x= S+i*ld+k*lds;
+    PetscStackCall("BLASgemv",BLASgemv_("N",&n_,&k_,&sonem,S+i*ld,&lds_,y,&one,&sone,x,&one));
+  }
+  ierr = NEPTOARSNorm2(lds,S+k*lds,&onorm);CHKERRQ(ierr);
+  /* twice */
+  PetscStackCall("BLASgemv",BLASgemv_("C",&n_,&k_,&sone,S,&lds_,x0,&one,&szero,c,&one));
+  for (i=1;i<deg;i++) {
+    x = S+i*ld+k*lds;
+    PetscStackCall("BLASgemv",BLASgemv_("C",&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,c,&one));
+  }
+  for (i=0;i<deg;i++) {
+    x= S+i*ld+k*lds;
+    PetscStackCall("BLASgemv",BLASgemv_("N",&n_,&k_,&sonem,S+i*ld,&lds_,c,&one,&sone,x,&one));
+  }
+  for (i=0;i<k;i++) y[i] += c[i];
+  if (norm) {
+    ierr = NEPTOARSNorm2(lds,S+k*lds,norm);CHKERRQ(ierr);
+    if (lindep) *lindep = (*norm < eta * onorm)?PETSC_TRUE:PETSC_FALSE;
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPTOARExtendBasis"
+/*
+  Extend the TOAR basis by applying the the matrix operator
+  over a vector which is decomposed on the TOAR way
+  Input:
+    - S,V: define the latest Arnoldi vector (nv vectors in V)
+  Output:
+    - t: new vector extending the TOAR basis
+    - r: temporally coefficients to compute the TOAR coefficients
+         for the new Arnoldi vector
+  Workspace: t_ (two vectors)
+*/
+static PetscErrorCode NEPTOARExtendBasis(NEP nep,PetscInt idxrktg,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       deg=ctx->nmat-1,k,j;
+  Vec            v=t_[0],q=t_[1],w;
+  PetscScalar    *beta=ctx->beta,*s=ctx->s,*xi=ctx->xi,*coeffs,sigma;
+
+  PetscFunctionBegin;
+  if (!ctx->ksp) { ierr = NEPNLEIGSGetKSPs(nep,&ctx->ksp);CHKERRQ(ierr); }
+  sigma = ctx->shifts[idxrktg];
+  ierr = BVSetActiveColumns(nep->V,0,nv);CHKERRQ(ierr);
+  ierr = PetscMalloc1(ctx->nmat-1,&coeffs);CHKERRQ(ierr);
+  if (PetscAbsScalar(s[deg-2]-sigma)<100*PETSC_MACHINE_EPSILON) SETERRQ(PETSC_COMM_SELF,1,"Breakdown in NLEIGS");
+  /* i-part stored in (i-1) position */
+  for (j=0;j<nv;j++) {
+    r[(deg-2)*lr+j] = (S[(deg-2)*ls+j]+(beta[deg-1]/xi[deg-2])*S[(deg-1)*ls+j])/(s[deg-2]-sigma);
+  }
+  ierr = BVSetActiveColumns(ctx->W,0,deg-1);CHKERRQ(ierr);
+  ierr = BVGetColumn(ctx->W,deg-2,&w);CHKERRQ(ierr);
+  ierr = BVMultVec(V,1.0,0.0,w,r+(deg-2)*lr);CHKERRQ(ierr);
+  ierr = BVRestoreColumn(ctx->W,deg-2,&w);CHKERRQ(ierr);
+  for (k=deg-2;k>0;k--) {
+    if (PetscAbsScalar(s[k-1]-sigma)<100*PETSC_MACHINE_EPSILON) SETERRQ(PETSC_COMM_SELF,1,"Breakdown in NLEIGS");
+    for (j=0;j<nv;j++) r[(k-1)*lr+j] = (S[(k-1)*ls+j]+(beta[k]/xi[k-1])*S[k*ls+j]-beta[k]*(1.0-sigma/xi[k-1])*r[(k)*lr+j])/(s[k-1]-sigma);
+    ierr = BVGetColumn(ctx->W,k-1,&w);CHKERRQ(ierr);
+    ierr = BVMultVec(V,1.0,0.0,w,r+(k-1)*lr);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(ctx->W,k-1,&w);CHKERRQ(ierr);
+  }
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+    for (j=0;j<ctx->nmat-1;j++) coeffs[j] = ctx->coeffD[nep->nt*j];
+    ierr = BVMultVec(ctx->W,1.0,0.0,v,coeffs);CHKERRQ(ierr);
+    ierr = MatMult(nep->A[0],v,q);CHKERRQ(ierr);
+    for (k=1;k<nep->nt;k++) {
+      for (j=0;j<ctx->nmat-1;j++) coeffs[j] = ctx->coeffD[nep->nt*j+k];
+      ierr = BVMultVec(ctx->W,1.0,0,v,coeffs);CHKERRQ(ierr);
+      ierr = MatMult(nep->A[k],v,t);CHKERRQ(ierr);
+      ierr = VecAXPY(q,1.0,t);CHKERRQ(ierr);
+    }
+    ierr = KSPSolve(ctx->ksp[idxrktg],q,t);CHKERRQ(ierr);
+    ierr = VecScale(t,-1.0);CHKERRQ(ierr);
+  } else {
+    for (k=0;k<deg-1;k++) {
+      ierr = BVGetColumn(ctx->W,k,&w);CHKERRQ(ierr);
+      ierr = MatMult(ctx->D[k],w,q);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(ctx->W,k,&w);CHKERRQ(ierr);
+      ierr = BVInsertVec(ctx->W,k,q);CHKERRQ(ierr);
+    }
+    for (j=0;j<ctx->nmat-1;j++) coeffs[j] = 1.0;
+    ierr = BVMultVec(ctx->W,1.0,0.0,q,coeffs);CHKERRQ(ierr);
+    ierr = KSPSolve(ctx->ksp[idxrktg],q,t);CHKERRQ(ierr);
+    ierr = VecScale(t,-1.0);CHKERRQ(ierr);
+  }
+  ierr = PetscFree(coeffs);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPTOARCoefficients"
+/*
+  Compute TOAR coefficients of the blocks of the new Arnoldi vector computed
+*/
+static PetscErrorCode NEPTOARCoefficients(NEP nep,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x,PetscScalar *work)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       k,j,d=ctx->nmat-1;
+  PetscScalar    *t=work;
+
+  PetscFunctionBegin;
+  ierr = NEPNLEIGSEvalNRTFunct(nep,d-1,sigma,t);CHKERRQ(ierr);
+  for (k=0;k<d-1;k++) {
+    for (j=0;j<=nv;j++) r[k*lr+j] += t[k]*x[j];
+  }
+  for (j=0;j<=nv;j++) r[(d-1)*lr+j] = t[d-1]*x[j];
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGS_RKcontinuation"
+/*
+  Compute continuation vector coefficients for the Rational-Krylov run.
+  dim(work) >= (end-ini)*(end-ini+1) + end+1 + 2*(end-ini+1), dim(t) = end. 
+*/
+static PetscErrorCode NEPNLEIGS_RKcontinuation(NEP nep,PetscInt ini,PetscInt end,PetscScalar *K,PetscScalar *H,PetscInt ld,PetscScalar sigma,PetscScalar *S,PetscInt lds,PetscScalar *cont,PetscScalar *t,PetscScalar *work)
+{
+#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_LARF)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQRF/LARF - Lapack routines are unavailable");
+#else
+  PetscErrorCode ierr;
+  PetscScalar    *x,*W,*tau,sone=1.0,szero=0.0;
+  PetscInt       i,j,n1,n,nwu=0;
+  PetscBLASInt   info,n_,n1_,one=1,dim,lds_;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (!ctx->nshifts || !end) {
+    t[0] = 1;
+    ierr = PetscMemcpy(cont,S+end*lds,lds*sizeof(PetscScalar));CHKERRQ(ierr);
+  } else {
+    n   = end-ini;
+    n1  = n+1;
+    x   = work+nwu;
+    nwu += end+1;
+    tau = work+nwu;
+    nwu += n;
+    W   = work+nwu;
+    nwu += n1*n;
+    for (j=ini;j<end;j++) {
+      for (i=ini;i<=end;i++) W[(j-ini)*n1+i-ini] = K[j*ld+i] -H[j*ld+i]*sigma;
+    }
+    ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+    ierr = PetscBLASIntCast(n1,&n1_);CHKERRQ(ierr);
+    ierr = PetscBLASIntCast(end+1,&dim);CHKERRQ(ierr);
+    PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&n1_,&n_,W,&n1_,tau,work+nwu,&n1_,&info));
+    if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEQRF %d",info);
+    for (i=0;i<end;i++) t[i] = 0.0;
+    t[end] = 1.0; 
+    for (j=n-1;j>=0;j--) {
+      for (i=0;i<ini+j;i++) x[i] = 0.0;
+      x[ini+j] = 1.0;
+      for (i=j+1;i<n1;i++) x[i+ini] = W[i+n1*j]; 
+      tau[j] = PetscConj(tau[j]);
+      PetscStackCallBLAS("LAPACKlarf",LAPACKlarf_("L",&dim,&one,x,&one,tau+j,t,&dim,work+nwu));
+    }
+    ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
+    PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&lds_,&n1_,&sone,S,&lds_,t,&one,&szero,cont,&one));
+  }
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSTOARrun"
+/*
+  Compute a run of Arnoldi iterations
+*/
+static PetscErrorCode NEPNLEIGSTOARrun(NEP nep,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *K,PetscScalar *H,PetscInt ldh,BV V,PetscInt k,PetscInt *M,PetscBool *breakdown,Vec *t_)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+  PetscInt       i,j,p,m=*M,lwa,deg=ctx->nmat-1,lds=ld*deg,nqt=*nq;
+  Vec            t=t_[0];
+  PetscReal      norm;
+  PetscScalar    *x,*work,*tt,sigma,*cont;
+  PetscBool      lindep;
+
+  PetscFunctionBegin;
+  lwa = PetscMax(ld,deg)+(m+1)*(m+1)+4*(m+1);
+  ierr = PetscMalloc4(ld,&x,lwa,&work,m+1,&tt,lds,&cont);CHKERRQ(ierr);
+  for (j=k;j<m;j++) {
+    sigma = ctx->shifts[(++(ctx->idxrk))%ctx->nshiftsw];
+
+    /* Continuation vector */
+    ierr = NEPNLEIGS_RKcontinuation(nep,0,j,K,H,ldh,sigma,S,lds,cont,tt,work);CHKERRQ(ierr);
+    
+    /* apply operator */
+    ierr = BVGetColumn(nep->V,nqt,&t);CHKERRQ(ierr);
+    ierr = NEPTOARExtendBasis(nep,(ctx->idxrk)%ctx->nshiftsw,cont,ld,nqt,V,t,S+(j+1)*lds,ld,t_+1);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(nep->V,nqt,&t);CHKERRQ(ierr);
+
+    /* orthogonalize */
+    ierr = BVOrthogonalizeColumn(nep->V,nqt,x,&norm,&lindep);CHKERRQ(ierr);
+    if (!lindep) {
+      x[nqt] = norm;
+      ierr = BVScaleColumn(nep->V,nqt,1.0/norm);CHKERRQ(ierr);
+      nqt++;
+    } else x[nqt] = 0.0;
+
+    ierr = NEPTOARCoefficients(nep,sigma,*nq,cont,ld,S+(j+1)*lds,ld,x,work);CHKERRQ(ierr);
+
+    /* Level-2 orthogonalization */
+    ierr = NEPTOAROrth2(nep,S,ld,deg,j+1,H+j*ldh,&norm,breakdown,work);CHKERRQ(ierr);
+    H[j+1+ldh*j] = norm;
+    if (ctx->nshifts) {
+      for (i=0;i<=j;i++) K[i+ldh*j] = sigma*H[i+ldh*j] + tt[i];
+      K[j+1+ldh*j] = sigma*H[j+1+ldh*j];
+    }
+    *nq = nqt;
+    if (*breakdown) {
+      *M = j+1;
+      break;
+    }
+    for (p=0;p<deg;p++) {
+      for (i=0;i<=j+deg;i++) {
+        S[i+p*ld+(j+1)*lds] /= norm;
+      }
+    }
+  } 
+  ierr = PetscFree4(x,work,tt,cont);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPTOARTrunc"
+/* dim(work)=5*ld*lds dim(rwork)=6*n */
+static PetscErrorCode NEPTOARTrunc(NEP nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *nq,PetscInt cs1,PetscScalar *work,PetscReal *rwork)
+{
+  PetscErrorCode ierr;
+  PetscInt       lwa,nwu=0,nrwu=0;
+  PetscInt       j,i,n,lds=deg*ld,rk=0,rs1;
+  PetscScalar    *M,*V,*pU,t;
+  PetscReal      *sg,tol;
+  PetscBLASInt   cs1_,rs1_,cs1tdeg,n_,info,lw_;
+  Mat            U;
+
+  PetscFunctionBegin;
+  rs1 = *nq;
+  n = (rs1>deg*cs1)?deg*cs1:rs1;
+  lwa = 5*ld*lds;
+  M = work+nwu;
+  nwu += rs1*cs1*deg;
+  sg = rwork+nrwu;
+  nrwu += n;
+  pU = work+nwu;
+  nwu += rs1*n;
+  V = work+nwu;
+  nwu += deg*cs1*n;
+  for (i=0;i<cs1;i++) {
+    for (j=0;j<deg;j++) {
+      ierr = PetscMemcpy(M+(i+j*cs1)*rs1,S+i*lds+j*ld,rs1*sizeof(PetscScalar));CHKERRQ(ierr);
+    } 
+  }
+  ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(cs1,&cs1_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(rs1,&rs1_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(cs1*deg,&cs1tdeg);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(lwa-nwu,&lw_);CHKERRQ(ierr);
+#if !defined (PETSC_USE_COMPLEX)
+  PetscStackCall("LAPACKgesvd",LAPACKgesvd_("S","S",&rs1_,&cs1tdeg,M,&rs1_,sg,pU,&rs1_,V,&n_,work+nwu,&lw_,&info));
+#else
+  PetscStackCall("LAPACKgesvd",LAPACKgesvd_("S","S",&rs1_,&cs1tdeg,M,&rs1_,sg,pU,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
+#endif
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESVD %d",info);
+  
+  /* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,rs1,cs1+deg-1,pU,&U);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(nep->V,0,rs1);CHKERRQ(ierr);
+  ierr = BVMultInPlace(nep->V,U,0,cs1+deg-1);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(nep->V,0,cs1+deg-1);CHKERRQ(ierr);
+  ierr = MatDestroy(&U);CHKERRQ(ierr);  
+  tol = PetscMax(rs1,deg*cs1)*PETSC_MACHINE_EPSILON*sg[0];
+  for (i=0;i<PetscMin(n_,cs1tdeg);i++) if (sg[i]>tol) rk++;
+  rk = PetscMin(cs1+deg-1,rk);
+  
+  /* Update S */
+  ierr = PetscMemzero(S,lds*ld*sizeof(PetscScalar));CHKERRQ(ierr);
+  for (i=0;i<rk;i++) {
+    t = sg[i];
+    PetscStackCall("BLASscal",BLASscal_(&cs1tdeg,&t,V+i,&n_));
+  }
+  for (j=0;j<cs1;j++) {
+    for (i=0;i<deg;i++) {
+      ierr = PetscMemcpy(S+j*lds+i*ld,V+(cs1*i+j)*n,rk*sizeof(PetscScalar));CHKERRQ(ierr);
+    }
+  }
+  *nq = rk;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPTOARSupdate"
+/*
+  S <- S*Q 
+  columns s-s+ncu of S
+  rows 0-sr of S
+  size(Q) qr x ncu
+  dim(work)=sr*ncu
+*/
+static PetscErrorCode NEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)
+{
+  PetscErrorCode ierr;
+  PetscScalar    a=1.0,b=0.0;
+  PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
+  PetscInt       j,lds=deg*ld,i;
+
+  PetscFunctionBegin;
+  ierr = PetscBLASIntCast(sr,&sr_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(qr,&qr_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(ncu,&ncu_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(ldq,&ldq_);CHKERRQ(ierr);
+  for (i=0;i<deg;i++) {
+    PetscStackCall("BLASgemm",BLASgemm_("N","N",&sr_,&ncu_,&qr_,&a,S+i*ld,&lds_,Q,&ldq_,&b,work,&sr_));
+    for (j=0;j<ncu;j++) {
+      ierr = PetscMemcpy(S+lds*(s+j)+i*ld,work+j*sr,sr*sizeof(PetscScalar));CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPSolve_NLEIGS"
+PetscErrorCode NEPSolve_NLEIGS(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+  PetscInt       i,j,k=0,l,nv=0,ld,lds,off,ldds,rs1,nq=0,newn;
+  PetscInt       lwa,lrwa,nwu=0,nrwu=0,deg=ctx->nmat-1,nconv=0;
+  PetscScalar    *S,*Q,*work,*H,*pU,*K,betak=0,*Hc;
+  PetscReal      betah,norm,*rwork;
+  PetscBool      breakdown=PETSC_FALSE,lindep;
+  Mat            U;
+
+  PetscFunctionBegin;
+  ld = nep->ncv+deg;
+  lds = deg*ld;
+  lwa = (deg+6)*ld*lds;
+  lrwa = 7*lds;
+  ierr = DSGetLeadingDimension(nep->ds,&ldds);CHKERRQ(ierr);
+  ierr = PetscMalloc4(lwa,&work,lrwa,&rwork,lds*ld,&S,ldds*ldds,&Hc);CHKERRQ(ierr);
+  ierr = PetscMemzero(S,lds*ld*sizeof(PetscScalar));CHKERRQ(ierr);
+  ierr = BVDuplicateResize(nep->V,PetscMax(nep->nt-1,ctx->nmat-1),&ctx->W);CHKERRQ(ierr);
+
+  /* Get the starting vector */
+  for (i=0;i<deg;i++) {
+    ierr = BVSetRandomColumn(nep->V,i);CHKERRQ(ierr);
+    ierr = BVOrthogonalizeColumn(nep->V,i,S+i*ld,&norm,&lindep);CHKERRQ(ierr);
+    if (!lindep) {
+      ierr = BVScaleColumn(nep->V,i,1/norm);CHKERRQ(ierr);
+      S[i+i*ld] = norm;
+      nq++;
+    }
+  }
+  if (!nq) SETERRQ(PetscObjectComm((PetscObject)nep),1,"NEP: Problem with initial vector");
+  ierr = NEPTOARSNorm2(lds,S,&norm);CHKERRQ(ierr);
+  for (j=0;j<deg;j++) {
+    for (i=0;i<=j;i++) S[i+j*ld] /= norm;
+  }
+
+  /* Restart loop */
+  l = 0;
+  while (nep->reason == NEP_CONVERGED_ITERATING) {
+    nep->its++;
+    
+    /* Compute an nv-step Krylov relation */
+    nv = PetscMin(nep->nconv+nep->mpd,nep->ncv);
+    if (ctx->nshifts) { ierr = DSGetArray(nep->ds,DS_MAT_A,&K);CHKERRQ(ierr); }
+    ierr = DSGetArray(nep->ds,ctx->nshifts?DS_MAT_B:DS_MAT_A,&H);CHKERRQ(ierr);
+    ierr = NEPNLEIGSTOARrun(nep,&nq,S,ld,K,H,ldds,nep->V,nep->nconv+l,&nv,&breakdown,nep->work);CHKERRQ(ierr);
+    betah = PetscAbsScalar(H[(nv-1)*ldds+nv]);
+    ierr = DSRestoreArray(nep->ds,ctx->nshifts?DS_MAT_B:DS_MAT_A,&H);CHKERRQ(ierr);
+    if (ctx->nshifts) {
+      betak = K[(nv-1)*ldds+nv];
+      ierr = DSRestoreArray(nep->ds,DS_MAT_A,&K);CHKERRQ(ierr);
+    }
+    ierr = DSSetDimensions(nep->ds,nv,0,nep->nconv,nep->nconv+l);CHKERRQ(ierr);
+    if (l==0) {
+      ierr = DSSetState(nep->ds,DS_STATE_INTERMEDIATE);CHKERRQ(ierr);
+    } else {
+      ierr = DSSetState(nep->ds,DS_STATE_RAW);CHKERRQ(ierr);
+    }
+
+    /* Solve projected problem */
+    if (ctx->nshifts) {
+      ierr = DSGetArray(nep->ds,DS_MAT_B,&H);CHKERRQ(ierr);
+      ierr = PetscMemcpy(Hc,H,ldds*ldds*sizeof(PetscScalar));CHKERRQ(ierr);
+      ierr = DSRestoreArray(nep->ds,DS_MAT_B,&H);CHKERRQ(ierr);
+    }
+    ierr = DSSolve(nep->ds,nep->eigr,nep->eigi);CHKERRQ(ierr);
+    ierr = DSSort(nep->ds,nep->eigr,nep->eigi,NULL,NULL,NULL);CHKERRQ(ierr);
+    if (!ctx->nshifts) {
+      ierr = DSUpdateExtraRow(nep->ds);CHKERRQ(ierr);
+    }
+
+    /* Check convergence */
+    ierr = NEPNLEIGSKrylovConvergence(nep,S,ld,nq,Hc,PETSC_FALSE,nep->nconv,nv-nep->nconv,betak,betah,&k,nep->work);CHKERRQ(ierr);
+    ierr = (*nep->stopping)(nep,nep->its,nep->max_it,k,nep->nev,&nep->reason,nep->stoppingctx);CHKERRQ(ierr);
+    nconv = k;
+
+    /* Update l */
+    if (nep->reason != NEP_CONVERGED_ITERATING || breakdown) l = 0;
+    else {
+      l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+      if (!breakdown) {
+        /* Prepare the Rayleigh quotient for restart */
+        if (!ctx->nshifts) {
+          ierr = DSTruncate(nep->ds,k+l);CHKERRQ(ierr);
+          ierr = DSGetDimensions(nep->ds,&newn,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+          l = newn-k;
+        } else {
+          ierr = DSGetArray(nep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
+          ierr = DSGetArray(nep->ds,DS_MAT_B,&H);CHKERRQ(ierr);
+          ierr = DSGetArray(nep->ds,DS_MAT_A,&K);CHKERRQ(ierr);
+          for (i=ctx->lock?k:0;i<k+l;i++) {
+            H[k+l+i*ldds] = betah*Q[nv-1+i*ldds];
+            K[k+l+i*ldds] = betak*Q[nv-1+i*ldds];
+          }
+          ierr = DSRestoreArray(nep->ds,DS_MAT_B,&H);CHKERRQ(ierr);
+          ierr = DSRestoreArray(nep->ds,DS_MAT_A,&K);CHKERRQ(ierr);
+          ierr = DSRestoreArray(nep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
+          ierr = DSSetDimensions(nep->ds,k+l,0,nep->nconv,0);CHKERRQ(ierr);
+        }
+      }
+    }
+    if (!ctx->lock && l>0) { l += k; k = 0; }
+
+    /* Update S */
+    off = nep->nconv*ldds;
+    ierr = DSGetArray(nep->ds,ctx->nshifts?DS_MAT_Z:DS_MAT_Q,&Q);CHKERRQ(ierr);
+    ierr = NEPTOARSupdate(S,ld,deg,nq,nep->nconv,k+l-nep->nconv,nv,Q+off,ldds,work+nwu);CHKERRQ(ierr);
+    ierr = DSRestoreArray(nep->ds,ctx->nshifts?DS_MAT_Z:DS_MAT_Q,&Q);CHKERRQ(ierr);
+
+    /* Copy last column of S */
+    ierr = PetscMemcpy(S+lds*(k+l),S+lds*nv,lds*sizeof(PetscScalar));CHKERRQ(ierr);
+    if (nep->reason == NEP_CONVERGED_ITERATING) {
+      if (breakdown) {
+
+        /* Stop if breakdown */
+        ierr = PetscInfo2(nep,"Breakdown (it=%D norm=%g)\n",nep->its,(double)betah);CHKERRQ(ierr);
+        nep->reason = NEP_DIVERGED_BREAKDOWN;
+      } else {
+        /* Truncate S */
+        ierr = NEPTOARTrunc(nep,S,ld,deg,&nq,k+l+1,work+nwu,rwork+nrwu);CHKERRQ(ierr);
+      }
+    }
+    nep->nconv = k;
+    ierr = NEPMonitor(nep,nep->its,nconv,nep->eigr,nep->eigi,nep->errest,nv);CHKERRQ(ierr);
+  }
+  nep->nconv = nconv;
+  if (nep->nconv>0) {
+    /* Extract invariant pair */
+    ierr = NEPTOARTrunc(nep,S,ld,deg,&nq,nep->nconv,work+nwu,rwork+nrwu);CHKERRQ(ierr);
+    /* Update vectors V = V*S or V=V*S*H */    
+    rs1 = nep->nconv;
+    if (ctx->nshifts) {
+      ierr = DSGetArray(nep->ds,DS_MAT_B,&H);CHKERRQ(ierr);
+      ierr = NEPTOARSupdate(S,ld,deg,rs1,0,nep->nconv,nep->nconv,H,ldds,work+nwu);CHKERRQ(ierr);
+      ierr = DSRestoreArray(nep->ds,DS_MAT_B,&H);CHKERRQ(ierr);
+    }
+    ierr = PetscMalloc1(rs1*nep->nconv,&pU);CHKERRQ(ierr);
+    for (i=0;i<nep->nconv;i++) {
+      ierr = PetscMemcpy(pU+i*rs1,S+i*lds,rs1*sizeof(PetscScalar));CHKERRQ(ierr);
+    }
+    ierr = MatCreateSeqDense(PETSC_COMM_SELF,rs1,nep->nconv,pU,&U);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(nep->V,0,rs1);CHKERRQ(ierr);
+    ierr = BVMultInPlace(nep->V,U,0,nep->nconv);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(nep->V,0,nep->nconv);CHKERRQ(ierr);
+    ierr = MatDestroy(&U);CHKERRQ(ierr);
+    ierr = PetscFree(pU);CHKERRQ(ierr);
+  }
+  /* truncate Schur decomposition and change the state to raw so that
+     DSVectors() computes eigenvectors from scratch */
+  ierr = DSSetDimensions(nep->ds,nep->nconv,0,0,0);CHKERRQ(ierr);
+  ierr = DSSetState(nep->ds,DS_STATE_RAW);CHKERRQ(ierr);
+
+  ierr = PetscFree4(work,rwork,S,Hc);CHKERRQ(ierr);
+  /* Map eigenvalues back to the original problem */
+  if (!ctx->nshifts) {
+    ierr = NEPNLEIGSBackTransform((PetscObject)nep,nep->nconv,nep->eigr,nep->eigi);CHKERRQ(ierr);
+  }
+  ierr = BVDestroy(&ctx->W);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetSingularitiesFunction_NLEIGS"
+static PetscErrorCode NEPNLEIGSSetSingularitiesFunction_NLEIGS(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)
+{
+  NEP_NLEIGS *nepctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (fun) nepctx->computesingularities = fun;
+  if (ctx) nepctx->singularitiesctx     = ctx;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetSingularitiesFunction"
+/*@C
+   NEPNLEIGSSetSingularitiesFunction - Sets a user function to compute a discretization
+   of the singularity set (where T(.) is not analytic).
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep - the NEP context
+.  fun - user function (if NULL then NEP retains any previously set value)
+-  ctx - [optional] user-defined context for private data for the function
+         (may be NULL, in which case NEP retains any previously set value)
+
+   Calling Sequence of fun:
+$   fun(NEP nep,PetscInt *maxnp,PetscScalar *xi,void *ctx)
+
++   nep   - the NEP context
+.   maxnp - on input number of requested points in the discretization (can be set)
+.   xi    - computed values of the discretization
+-   ctx   - optional context, as set by NEPNLEIGSSetSingularitiesFunction()
+
+   Note:
+   The user-defined function can set a smaller value of maxnp if necessary.
+
+   Level: intermediate
+
+.seealso: NEPNLEIGSGetSingularitiesFunction()
+@*/
+PetscErrorCode NEPNLEIGSSetSingularitiesFunction(NEP nep,PetscErrorCode (*fun)(NEP,PetscInt*,PetscScalar*,void*),void *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSSetSingularitiesFunction_C",(NEP,PetscErrorCode(*)(NEP,PetscInt*,PetscScalar*,void*),void*),(nep,fun,ctx));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetSingularitiesFunction_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetSingularitiesFunction_NLEIGS(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)
+{
+  NEP_NLEIGS *nepctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (fun) *fun = nepctx->computesingularities;
+  if (ctx) *ctx = nepctx->singularitiesctx;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetSingularitiesFunction"
+/*@C
+   NEPNLEIGSGetSingularitiesFunction - Returns the Function and optionally the user
+   provided context for computing a discretization of the singularity set.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameters:
++  fun - location to put the function (or NULL)
+-  ctx - location to stash the function context (or NULL)
+
+   Level: advanced
+
+.seealso: NEPNLEIGSSetSingularitiesFunction()
+@*/
+PetscErrorCode NEPNLEIGSGetSingularitiesFunction(NEP nep,PetscErrorCode (**fun)(NEP,PetscInt*,PetscScalar*,void*),void **ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  ierr = PetscUseMethod(nep,"NEPNLEIGSGetSingularitiesFunction_C",(NEP,PetscErrorCode(**)(NEP,PetscInt*,PetscScalar*,void*),void**),(nep,fun,ctx));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetRestart_NLEIGS"
+static PetscErrorCode NEPNLEIGSSetRestart_NLEIGS(NEP nep,PetscReal keep)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (keep==PETSC_DEFAULT) ctx->keep = 0.5;
+  else {
+    if (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"The keep argument must be in the range [0.1,0.9]");
+    ctx->keep = keep;
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetRestart"
+/*@
+   NEPNLEIGSSetRestart - Sets the restart parameter for the NLEIGS
+   method, in particular the proportion of basis vectors that must be kept
+   after restart.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep  - the nonlinear eigensolver context
+-  keep - the number of vectors to be kept at restart
+
+   Options Database Key:
+.  -nep_nleigs_restart - Sets the restart parameter
+
+   Notes:
+   Allowed values are in the range [0.1,0.9]. The default is 0.5.
+
+   Level: advanced
+
+.seealso: NEPNLEIGSGetRestart()
+@*/
+PetscErrorCode NEPNLEIGSSetRestart(NEP nep,PetscReal keep)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveReal(nep,keep,2);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSSetRestart_C",(NEP,PetscReal),(nep,keep));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetRestart_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetRestart_NLEIGS(NEP nep,PetscReal *keep)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  *keep = ctx->keep;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetRestart"
+/*@
+   NEPNLEIGSGetRestart - Gets the restart parameter used in the NLEIGS method.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameter:
+.  keep - the restart parameter
+
+   Level: advanced
+
+.seealso: NEPNLEIGSSetRestart()
+@*/
+PetscErrorCode NEPNLEIGSGetRestart(NEP nep,PetscReal *keep)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(keep,2);
+  ierr = PetscUseMethod(nep,"NEPNLEIGSGetRestart_C",(NEP,PetscReal*),(nep,keep));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetLocking_NLEIGS"
+static PetscErrorCode NEPNLEIGSSetLocking_NLEIGS(NEP nep,PetscBool lock)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  ctx->lock = lock;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetLocking"
+/*@
+   NEPNLEIGSSetLocking - Choose between locking and non-locking variants of
+   the NLEIGS method.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep  - the nonlinear eigensolver context
+-  lock - true if the locking variant must be selected
+
+   Options Database Key:
+.  -nep_nleigs_locking - Sets the locking flag
+
+   Notes:
+   The default is to lock converged eigenpairs when the method restarts.
+   This behaviour can be changed so that all directions are kept in the
+   working subspace even if already converged to working accuracy (the
+   non-locking variant).
+
+   Level: advanced
+
+.seealso: NEPNLEIGSGetLocking()
+@*/
+PetscErrorCode NEPNLEIGSSetLocking(NEP nep,PetscBool lock)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveBool(nep,lock,2);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSSetLocking_C",(NEP,PetscBool),(nep,lock));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetLocking_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetLocking_NLEIGS(NEP nep,PetscBool *lock)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  *lock = ctx->lock;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetLocking"
+/*@
+   NEPNLEIGSGetLocking - Gets the locking flag used in the NLEIGS method.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameter:
+.  lock - the locking flag
+
+   Level: advanced
+
+.seealso: NEPNLEIGSSetLocking()
+@*/
+PetscErrorCode NEPNLEIGSGetLocking(NEP nep,PetscBool *lock)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(lock,2);
+  ierr = PetscUseMethod(nep,"NEPNLEIGSGetLocking_C",(NEP,PetscBool*),(nep,lock));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetInterpolation_NLEIGS"
+static PetscErrorCode NEPNLEIGSSetInterpolation_NLEIGS(NEP nep,PetscReal tol,PetscInt maxits)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (tol == PETSC_DEFAULT) {
+    ctx->ddtol = PETSC_DEFAULT;
+    nep->state = NEP_STATE_INITIAL;
+  } else {
+    if (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of tol. Must be > 0");
+    ctx->ddtol = tol;
+  }
+  if (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+    ctx->ddmaxit = 0;
+    nep->state   = NEP_STATE_INITIAL;
+  } else {
+    if (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of maxits. Must be > 0");
+    ctx->ddmaxit = maxits;
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetInterpolation"
+/*@
+   NEPNLEIGSSetInterpolation - Sets the tolerance and maximum iteration count used
+   by the NLEIGS method when building the interpolation via divided differences.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep    - the nonlinear eigensolver context
+.  tol    - the convergence tolerance
+-  maxits - maximum number of iterations to use
+
+   Options Database Key:
++  -nep_nleigs_interpolation_tol <tol> - Sets the convergence tolerance
+-  -nep_nleigs_interpolation_max_it <maxits> - Sets the maximum number of iterations
+
+   Notes:
+   Use PETSC_DEFAULT for either argument to assign a reasonably good value.
+
+   Level: advanced
+
+.seealso: NEPNLEIGSGetInterpolation()
+@*/
+PetscErrorCode NEPNLEIGSSetInterpolation(NEP nep,PetscReal tol,PetscInt maxits)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveReal(nep,tol,2);
+  PetscValidLogicalCollectiveInt(nep,maxits,3);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSSetInterpolation_C",(NEP,PetscReal,PetscInt),(nep,tol,maxits));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetInterpolation_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetInterpolation_NLEIGS(NEP nep,PetscReal *tol,PetscInt *maxits)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (tol)    *tol    = ctx->ddtol;
+  if (maxits) *maxits = ctx->ddmaxit;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetInterpolation"
+/*@
+   NEPNLEIGSGetInterpolation - Gets the tolerance and maximum iteration count used
+   by the NLEIGS method when building the interpolation via divided differences.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameter:
++  tol    - the convergence tolerance
+-  maxits - maximum number of iterations
+
+   Level: advanced
+
+.seealso: NEPNLEIGSSetInterpolation()
+@*/
+PetscErrorCode NEPNLEIGSGetInterpolation(NEP nep,PetscReal *tol,PetscInt *maxits)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSGetInterpolation_C",(NEP,PetscReal*,PetscInt*),(nep,tol,maxits));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetTrueResidual_NLEIGS"
+static PetscErrorCode NEPNLEIGSSetTrueResidual_NLEIGS(NEP nep,PetscBool trueres)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  ctx->trueres = trueres;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetTrueResidual"
+/*@
+   NEPNLEIGSSetTrueResidual - Specifies if the solver must compute the true residual
+   explicitly or not.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep - the nonlinear eigensolver context
+-  trueres - whether true residuals are required or not
+
+   Options Database Key:
+.  -nep_nleigs_true_residual <boolean> - Sets/resets the boolean flag 'trueres'
+
+   Notes:
+   If the user sets trueres=PETSC_TRUE then the solver explicitly computes
+   the true residual norm for each eigenpair approximation, and uses it for
+   convergence testing. The default is to use the cheaper approximation 
+   available from the (rational) Krylov iteration.
+
+   Level: advanced
+
+.seealso: NEPNLEIGSGetTrueResidual()
+@*/
+PetscErrorCode NEPNLEIGSSetTrueResidual(NEP nep,PetscBool trueres)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveBool(nep,trueres,2);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSSetTrueResidual_C",(NEP,PetscBool),(nep,trueres));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetTrueResidual_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetTrueResidual_NLEIGS(NEP nep,PetscBool *trueres)
+{
+  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  *trueres = ctx->trueres;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetTrueResidual"
+/*@
+   NEPNLEIGSGetTrueResidual - Returns the flag indicating whether true
+   residuals must be computed explicitly or not.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameter:
+.  trueres - the returned flag
+
+   Level: advanced
+
+.seealso: NEPNLEIGSSetTrueResidual()
+@*/
+PetscErrorCode NEPNLEIGSGetTrueResidual(NEP nep,PetscBool *trueres)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(trueres,2);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSGetTrueResidual_C",(NEP,PetscBool*),(nep,trueres));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetRKShifts_NLEIGS"
+static PetscErrorCode NEPNLEIGSSetRKShifts_NLEIGS(NEP nep,PetscInt ns,PetscScalar *shifts)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       i;
+
+  PetscFunctionBegin;
+  if (ns<=0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,"Number of shifts must be positive");
+  if (ctx->nshifts) { ierr = PetscFree(ctx->shifts);CHKERRQ(ierr); }
+  for (i=0;i<ctx->nshiftsw;i++) { ierr = KSPDestroy(&ctx->ksp[i]);CHKERRQ(ierr); }
+  ierr = PetscFree(ctx->ksp);CHKERRQ(ierr);
+  ctx->ksp = NULL;
+  ierr = PetscMalloc(ns,&ctx->shifts);CHKERRQ(ierr);
+  for (i=0;i<ns;i++) ctx->shifts[i] = shifts[i];
+  ctx->nshifts = ns;
+  nep->state   = NEP_STATE_INITIAL;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSSetRKShifts"
+/*@C
+   NEPNLEIGSSetRKShifts - Sets a list of shifts to be used in the Rational
+   Krylov method.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep    - the nonlinear eigensolver context
+.  ns     - number of shifts
+-  shifts - array of scalar values specifying the shifts
+
+   Options Database Key:
+.  -nep_nleigs_rk_shifts - Sets the list of shifts
+
+   Notes:
+   If only one shift is provided, the subspace is built with the simpler
+   shift-and-invert Krylov-Schur.
+
+   In the case of real scalars, complex shifts are not allowed. In the
+   command line, a comma-separated list of complex values can be provided with
+   the format [+/-][realnumber][+/-]realnumberi with no spaces, e.g.
+   -nep_nleigs_rk_shifts 1.0+2.0i,1.5+2.0i,1.0+1.5i
+
+   Level: advanced
+
+.seealso: NEPNLEIGSGetRKShifts()
+@*/
+PetscErrorCode NEPNLEIGSSetRKShifts(NEP nep,PetscInt ns,PetscScalar *shifts)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveInt(nep,ns,2);
+  PetscValidPointer(nep,shifts);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSSetRKShifts_C",(NEP,PetscInt,PetscScalar*),(nep,ns,shifts));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetRKShifts_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetRKShifts_NLEIGS(NEP nep,PetscInt *ns,PetscScalar **shifts)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscInt       i;
+
+  PetscFunctionBegin;
+  *ns = ctx->nshifts;
+  if (ctx->nshifts) {
+    ierr = PetscMalloc1(ctx->nshifts,shifts);CHKERRQ(ierr);
+    for (i=0;i<ctx->nshifts;i++) (*shifts)[i] = ctx->shifts[i];
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetRKShifts"
+/*@C
+   NEPNLEIGSGetRKShifts - Gets the list of shifts used in the Rational
+   Krylov method.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameter:
++  ns     - number of shifts
+-  shifts - array of shifts
+
+   Level: advanced
+
+.seealso: NEPNLEIGSSetRKShifts()
+@*/
+PetscErrorCode NEPNLEIGSGetRKShifts(NEP nep,PetscInt *ns,PetscScalar **shifts)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(nep,ns);
+  PetscValidPointer(nep,shifts);
+  ierr = PetscTryMethod(nep,"NEPNLEIGSGetRKShifts_C",(NEP,PetscInt*,PetscScalar**),(nep,ns,shifts));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#define SHIFTMAX 30
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPSetFromOptions_NLEIGS"
+PetscErrorCode NEPSetFromOptions_NLEIGS(PetscOptionItems *PetscOptionsObject,NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+  PetscInt       i,k;
+  PetscBool      flg1,flg2,b;
+  PetscReal      r;
+  PetscScalar    array[SHIFTMAX];
+  PC             pc;
+  PCType         pctype;
+  KSPType        ksptype;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsHead(PetscOptionsObject,"NEP NLEIGS Options");CHKERRQ(ierr);
+  ierr = PetscOptionsReal("-nep_nleigs_restart","Proportion of vectors kept after restart","NEPNLEIGSSetRestart",0.5,&r,&flg1);CHKERRQ(ierr);
+  if (flg1) {
+    ierr = NEPNLEIGSSetRestart(nep,r);CHKERRQ(ierr);
+  }
+  ierr = PetscOptionsBool("-nep_nleigs_locking","Choose between locking and non-locking variants","NEPNLEIGSSetLocking",PETSC_FALSE,&b,&flg1);CHKERRQ(ierr);
+  if (flg1) {
+    ierr = NEPNLEIGSSetLocking(nep,b);CHKERRQ(ierr);
+  }
+  ierr = PetscOptionsBool("-nep_nleigs_true_residual","Compute true residuals explicitly","NEPNLEIGSSetTrueResidual",PETSC_FALSE,&b,&flg1);CHKERRQ(ierr);
+  if (flg1) {
+    ierr = NEPNLEIGSSetTrueResidual(nep,b);CHKERRQ(ierr);
+  }
+  ierr = NEPNLEIGSGetInterpolation(nep,&r,&i);CHKERRQ(ierr);
+  if (!i) i = PETSC_DEFAULT;
+  ierr = PetscOptionsInt("-nep_nleigs_interpolation_max_it","Maximum number of terms for interpolation via divided differences","NEPNLEIGSSetInterpolation",i,&i,&flg1);CHKERRQ(ierr);
+  ierr = PetscOptionsReal("-nep_nleigs_interpolation_tol","Tolerance for interpolation via divided differences","NEPNLEIGSSetInterpolation",r,&r,&flg2);CHKERRQ(ierr);
+  if (flg1 || flg2) {
+    ierr = NEPNLEIGSSetInterpolation(nep,r,i);CHKERRQ(ierr);
+  }
+  k = SHIFTMAX;
+  for (i=0;i<k;i++) array[i] = 0;
+  ierr = PetscOptionsScalarArray("-nep_nleigs_rk_shifts","Shifts for Rational Krylov","NEPNLEIGSSetRKShifts",array,&k,&flg1);CHKERRQ(ierr);
+  if (flg1) {
+    ierr = NEPNLEIGSSetRKShifts(nep,k,array);CHKERRQ(ierr);
+  }
+
+  if (!ctx->ksp) { ierr = NEPNLEIGSGetKSPs(nep,&ctx->ksp);CHKERRQ(ierr); }
+  for (i=0;i<ctx->nshiftsw;i++) {
+    ierr = KSPGetPC(ctx->ksp[i],&pc);CHKERRQ(ierr);
+    ierr = KSPGetType(ctx->ksp[i],&ksptype);CHKERRQ(ierr);
+    ierr = PCGetType(pc,&pctype);CHKERRQ(ierr);
+    if (!pctype && !ksptype) {
+      ierr = KSPSetType(ctx->ksp[i],KSPPREONLY);CHKERRQ(ierr);
+      ierr = PCSetType(pc,PCLU);CHKERRQ(ierr);
+    }
+    ierr = KSPSetOperators(ctx->ksp[i],nep->function,nep->function_pre);CHKERRQ(ierr);
+    ierr = KSPSetFromOptions(ctx->ksp[i]);CHKERRQ(ierr);
+  }
+  ierr = PetscOptionsTail();CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetKSPs_NLEIGS"
+static PetscErrorCode NEPNLEIGSGetKSPs_NLEIGS(NEP nep,KSP **ksp)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+  PetscInt       i;
+
+  PetscFunctionBegin;
+  if (!ctx->ksp) {
+    ierr = NEPNLEIGSSetShifts(nep);CHKERRQ(ierr);
+    ierr = PetscMalloc1(ctx->nshiftsw,&ctx->ksp);CHKERRQ(ierr);
+    for (i=0;i<ctx->nshiftsw;i++) {
+      ierr = KSPCreate(PetscObjectComm((PetscObject)nep),&ctx->ksp[i]);CHKERRQ(ierr);
+      ierr = KSPSetOptionsPrefix(ctx->ksp[i],((PetscObject)nep)->prefix);CHKERRQ(ierr);
+      ierr = KSPAppendOptionsPrefix(ctx->ksp[i],"nep_nleigs_");CHKERRQ(ierr);
+      ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)nep,1);CHKERRQ(ierr);
+      ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp[i]);CHKERRQ(ierr);
+      ierr = KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);CHKERRQ(ierr);
+    }
+  }
+  *ksp = ctx->ksp;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPNLEIGSGetKSPs"
+/*@C
+   NEPNLEIGSGetKSPs - Retrieve the array of linear solver objects associated with
+   the nonlinear eigenvalue solver.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - nonlinear eigenvalue solver
+
+   Output Parameter:
+.  ksp - array of linear solver object
+
+   Level: advanced
+@*/
+PetscErrorCode NEPNLEIGSGetKSPs(NEP nep,KSP **ksp)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(ksp,2);
+  ierr = PetscUseMethod(nep,"NEPNLEIGSGetKSPs_C",(NEP,KSP**),(nep,ksp));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPView_NLEIGS"
+PetscErrorCode NEPView_NLEIGS(NEP nep,PetscViewer viewer)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+  PetscBool      isascii;
+  PetscInt       i;
+  char           str[50];
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  NLEIGS: %d%% of basis vectors kept after restart\n",(int)(100*ctx->keep));CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  NLEIGS: using the %slocking variant\n",ctx->lock?"":"non-");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  NLEIGS: maximum number of divided difference terms: %D\n",ctx->ddmaxit);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  NLEIGS: tolerance for divided difference convergence: %g\n",(double)ctx->ddtol);CHKERRQ(ierr);
+    if (ctx->nshifts) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  NLEIGS: RK shifts: ");CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+      for (i=0;i<ctx->nshifts;i++) {
+        ierr = SlepcSNPrintfScalar(str,50,ctx->shifts[i],PETSC_FALSE);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIPrintf(viewer,"%s%s",str,(i<ctx->nshifts-1)?",":"");CHKERRQ(ierr);
+      }
+      ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+    }
+    if (ctx->trueres) { ierr = PetscViewerASCIIPrintf(viewer,"  NLEIGS: computing true residuals for convergence check\n");CHKERRQ(ierr); }
+    if (!ctx->ksp) { ierr = NEPNLEIGSGetKSPs(nep,&ctx->ksp);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = KSPView(ctx->ksp[0],viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPReset_NLEIGS"
+PetscErrorCode NEPReset_NLEIGS(NEP nep)
+{
+  PetscErrorCode ierr;
+  PetscInt       k;
+  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+    ierr = PetscFree(ctx->coeffD);CHKERRQ(ierr);
+  } else {
+    for (k=0;k<ctx->nmat;k++) { ierr = MatDestroy(&ctx->D[k]);CHKERRQ(ierr); }
+  }
+  if (ctx->vrn) {
+    ierr = VecDestroy(&ctx->vrn);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPDestroy_NLEIGS"
+PetscErrorCode NEPDestroy_NLEIGS(NEP nep)
+{
+  PetscErrorCode ierr;
+  PetscInt       k;
+  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+
+  PetscFunctionBegin;
+  for (k=0;k<ctx->nshiftsw;k++) { ierr = KSPDestroy(&ctx->ksp[k]);CHKERRQ(ierr); }
+  ierr = PetscFree(ctx->ksp);CHKERRQ(ierr);
+  if (ctx->nshifts) { ierr = PetscFree(ctx->shifts);CHKERRQ(ierr); }
+  ierr = PetscFree4(ctx->s,ctx->xi,ctx->beta,ctx->D);CHKERRQ(ierr);
+  ierr = PetscFree(nep->data);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetSingularitiesFunction_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetSingularitiesFunction_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetRestart_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetRestart_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetLocking_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetLocking_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetInterpolation_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetInterpolation_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetTrueResidual_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetTrueResidual_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetRKShifts_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetRKShifts_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetKSPs_C",NULL);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPCreate_NLEIGS"
+PETSC_EXTERN PetscErrorCode NEPCreate_NLEIGS(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_NLEIGS     *ctx;
+
+  PetscFunctionBegin;
+  ierr = PetscNewLog(nep,&ctx);CHKERRQ(ierr);
+  nep->data = (void*)ctx;
+  ctx->lock    = PETSC_TRUE;
+  ctx->ddtol   = PETSC_DEFAULT;
+  ctx->ddmaxit = 0;
+  ctx->trueres = PETSC_FALSE;
+  ctx->nshifts = 0;
+
+  nep->ops->solve          = NEPSolve_NLEIGS;
+  nep->ops->setup          = NEPSetUp_NLEIGS;
+  nep->ops->setfromoptions = NEPSetFromOptions_NLEIGS;
+  nep->ops->view           = NEPView_NLEIGS;
+  nep->ops->destroy        = NEPDestroy_NLEIGS;
+  nep->ops->reset          = NEPReset_NLEIGS;
+  nep->ops->computevectors = NEPComputeVectors_Schur;
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetSingularitiesFunction_C",NEPNLEIGSSetSingularitiesFunction_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetSingularitiesFunction_C",NEPNLEIGSGetSingularitiesFunction_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetRestart_C",NEPNLEIGSSetRestart_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetRestart_C",NEPNLEIGSGetRestart_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetLocking_C",NEPNLEIGSSetLocking_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetLocking_C",NEPNLEIGSGetLocking_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetInterpolation_C",NEPNLEIGSSetInterpolation_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetInterpolation_C",NEPNLEIGSGetInterpolation_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetTrueResidual_C",NEPNLEIGSSetTrueResidual_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetTrueResidual_C",NEPNLEIGSGetTrueResidual_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSSetRKShifts_C",NEPNLEIGSSetRKShifts_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetRKShifts_C",NEPNLEIGSGetRKShifts_NLEIGS);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPNLEIGSGetKSPs_C",NEPNLEIGSGetKSPs_NLEIGS);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/nep/impls/nleigs/nleigs.c.html b/src/nep/impls/nleigs/nleigs.c.html
new file mode 100644
index 0000000..fd80805
--- /dev/null
+++ b/src/nep/impls/nleigs/nleigs.c.html
@@ -0,0 +1,1829 @@
+<center><a href="nleigs.c">Actual source code: nleigs.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/nleigs/nleigs.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:28+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/nleigs/nleigs.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+
+<a name="line3">  3: </a><font color="#B22222">   SLEPc nonlinear eigensolver: "nleigs"</font>
+
+<a name="line5">  5: </a><font color="#B22222">   Method: NLEIGS</font>
+
+<a name="line7">  7: </a><font color="#B22222">   Algorithm:</font>
+
+<a name="line9">  9: </a><font color="#B22222">       Fully rational Krylov method for nonlinear eigenvalue problems.</font>
+
+<a name="line11"> 11: </a><font color="#B22222">   References:</font>
+
+<a name="line13"> 13: </a><font color="#B22222">       [1] S. Guttel et al., "NLEIGS: A class of robust fully rational Krylov</font>
+<a name="line14"> 14: </a><font color="#B22222">           method for nonlinear eigenvalue problems", SIAM J. Sci. Comput.</font>
+<a name="line15"> 15: </a><font color="#B22222">           36(6):A2842-A2864, 2014.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line23"> 23: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line24"> 24: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line25"> 25: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line27"> 27: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line28"> 28: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line29"> 29: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line30"> 30: </a><font color="#B22222">   more details.</font>
+
+<a name="line32"> 32: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line33"> 33: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line34"> 34: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line35"> 35: </a><font color="#B22222">*/</font>
+
+<a name="line37"> 37: </a><font color="#A020F0">#include <slepc/private/nepimpl.h>         </font><font color="#B22222">/*I "slepcnep.h" I*/</font><font color="#A020F0"></font>
+<a name="line38"> 38: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line40"> 40: </a><strong><font color="#228B22">#define  MAX_LBPOINTS  100</font></strong>
+<a name="line41"> 41: </a><strong><font color="#228B22">#define  NDPOINTS      1e4</font></strong>
+<a name="line42"> 42: </a><strong><font color="#228B22">#define  MAX_NSHIFTS   100</font></strong>
+
+<a name="line44"> 44: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line45"> 45: </a>  PetscInt       nmat;      <font color="#B22222">/* number of interpolation points */</font>
+<a name="line46"> 46: </a>  PetscScalar    *s,*xi;    <font color="#B22222">/* Leja-Bagby points */</font>
+<a name="line47"> 47: </a>  PetscScalar    *beta;     <font color="#B22222">/* scaling factors */</font>
+<a name="line48"> 48: </a>  Mat            *D;        <font color="#B22222">/* divided difference matrices */</font>
+<a name="line49"> 49: </a>  PetscScalar    *coeffD;   <font color="#B22222">/* coefficients for divided differences in split form */</font>
+<a name="line50"> 50: </a>  PetscInt       nshifts;   <font color="#B22222">/* provided number of shifts */</font>
+<a name="line51"> 51: </a>  PetscScalar    *shifts;   <font color="#B22222">/* user-provided shifts for the Rational Krylov variant */</font>
+<a name="line52"> 52: </a>  PetscInt       nshiftsw;  <font color="#B22222">/* actual number of shifts (1 if Krylov-Schur) */</font>
+<a name="line53"> 53: </a>  PetscReal      ddtol;     <font color="#B22222">/* tolerance for divided difference convergence */</font>
+<a name="line54"> 54: </a>  PetscInt       ddmaxit;   <font color="#B22222">/* maximum number of divided difference terms */</font>
+<a name="line55"> 55: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;         <font color="#B22222">/* auxiliary <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> object */</font>
+<a name="line56"> 56: </a>  PetscReal      keep;      <font color="#B22222">/* restart parameter */</font>
+<a name="line57"> 57: </a>  PetscBool      lock;      <font color="#B22222">/* locking/non-locking variant */</font>
+<a name="line58"> 58: </a>  PetscBool      trueres;   <font color="#B22222">/* whether the true residual norm must be computed */</font>
+<a name="line59"> 59: </a>  PetscInt       idxrk;     <font color="#B22222">/* index of next shift to use */</font>
+<a name="line60"> 60: </a>  KSP            *ksp;      <font color="#B22222">/* ksp array for storing shift factorizations */</font>
+<a name="line61"> 61: </a>  Vec            vrn;       <font color="#B22222">/* random vector with normally distributed value */</font>
+<a name="line62"> 62: </a>  void           *singularitiesctx;
+<a name="line63"> 63: </a>  PetscErrorCode (*computesingularities)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*);
+<a name="line64"> 64: </a>} NEP_NLEIGS;
+
+<a name="line66"> 66: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line67"> 67: </a>  PetscInt    nmat;
+<a name="line68"> 68: </a>  PetscScalar coeff[MAX_NSHIFTS];
+<a name="line69"> 69: </a>  Mat         A[MAX_NSHIFTS];
+<a name="line70"> 70: </a>  Vec         t;
+<a name="line71"> 71: </a>} ShellMatCtx;
+
+<a name="line75"> 75: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetShifts"></a>PETSC_STATIC_INLINE PetscErrorCode NEPNLEIGSSetShifts(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line76"> 76: </a>{
+<a name="line77"> 77: </a>  NEP_NLEIGS *ctx = (NEP_NLEIGS*)nep->data;
+
+<a name="line80"> 80: </a>  <font color="#4169E1">if</font> (!ctx->nshifts) { 
+<a name="line81"> 81: </a>    ctx->shifts = &nep->target;
+<a name="line82"> 82: </a>    ctx->nshiftsw = 1;
+<a name="line83"> 83: </a>  } <font color="#4169E1">else</font> ctx->nshiftsw = ctx->nshifts;
+<a name="line84"> 84: </a>  <font color="#4169E1">return</font>(0);
+<a name="line85"> 85: </a>}
+
+<a name="line89"> 89: </a><strong><font color="#4169E1"><a name="NEPNLEIGSBackTransform"></a>static PetscErrorCode NEPNLEIGSBackTransform(PetscObject ob,PetscInt n,PetscScalar *valr,PetscScalar *vali)</font></strong>
+<a name="line90"> 90: </a>{
+<a name="line91"> 91: </a>  <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>         nep;
+<a name="line92"> 92: </a>  PetscInt    j;
+<a name="line93"> 93: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line94"> 94: </a>  PetscScalar t;
+<a name="line95"> 95: </a><font color="#A020F0">#endif</font>
+
+<a name="line98"> 98: </a>  nep = (<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)ob;
+<a name="line99"> 99: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line100">100: </a>  <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line101">101: </a>    <font color="#4169E1">if</font> (vali[j] == 0) valr[j] = 1.0 / valr[j] + nep->target;
+<a name="line102">102: </a>    <font color="#4169E1">else</font> {
+<a name="line103">103: </a>      t = valr[j] * valr[j] + vali[j] * vali[j];
+<a name="line104">104: </a>      valr[j] = valr[j] / t + nep->target;
+<a name="line105">105: </a>      vali[j] = - vali[j] / t;
+<a name="line106">106: </a>    }
+<a name="line107">107: </a>  }
+<a name="line108">108: </a><font color="#A020F0">#else</font>
+<a name="line109">109: </a>  <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line110">110: </a>    valr[j] = 1.0 / valr[j] + nep->target;
+<a name="line111">111: </a>  }
+<a name="line112">112: </a><font color="#A020F0">#endif</font>
+<a name="line113">113: </a>  <font color="#4169E1">return</font>(0);
+<a name="line114">114: </a>}
+
+<a name="line118">118: </a><strong><font color="#4169E1"><a name="NEPNLEIGSLejaBagbyPoints"></a>static PetscErrorCode NEPNLEIGSLejaBagbyPoints(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line119">119: </a>{
+<a name="line121">121: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line122">122: </a>  PetscInt       i,k,ndpt=NDPOINTS,ndptx=NDPOINTS;
+<a name="line123">123: </a>  PetscScalar    *ds,*dsi,*dxi,*nrs,*nrxi,*s=ctx->s,*xi=ctx->xi,*beta=ctx->beta;
+<a name="line124">124: </a>  PetscReal      maxnrs,minnrxi;
+
+<a name="line127">127: </a>  PetscMalloc5(ndpt+1,&ds,ndpt+1,&dsi,ndpt,&dxi,ndpt+1,&nrs,ndpt,&nrxi);
+
+<a name="line129">129: </a>  <font color="#B22222">/* Discretize the target region boundary */</font>
+<a name="line130">130: </a>  <a href="../../../../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a>(nep->rg,ndpt,ds,dsi);
+<a name="line131">131: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line132">132: </a>  <font color="#4169E1">for</font> (i=0;i<ndpt;i++) <font color="#4169E1">if</font> (dsi[i]!=0.0) <font color="#4169E1">break</font>;
+<a name="line133">133: </a>  <font color="#4169E1">if</font> (i<ndpt) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NLEIGS with real arithmetic requires the target set to be included in the real axis"</font>);
+<a name="line134">134: </a><font color="#A020F0">#endif</font>
+<a name="line135">135: </a>  <font color="#B22222">/* Discretize the singularity region */</font>
+<a name="line136">136: </a>  <font color="#4169E1">if</font> (ctx->computesingularities) {
+<a name="line137">137: </a>    (ctx->computesingularities)(nep,&ndptx,dxi,ctx->singularitiesctx);
+<a name="line138">138: </a>  } <font color="#4169E1">else</font> ndptx = 0;
+
+<a name="line140">140: </a>  <font color="#B22222">/* Look for Leja-Bagby points in the discretization sets */</font>
+<a name="line141">141: </a>  s[0]    = ds[0];
+<a name="line142">142: </a>  xi[0]   = (ndptx>0)?dxi[0]:PETSC_INFINITY;
+<a name="line143">143: </a>  beta[0] = 1.0; <font color="#B22222">/* scaling factors are also computed here */</font>
+<a name="line144">144: </a>  maxnrs  = 0.0;
+<a name="line145">145: </a>  minnrxi = PETSC_MAX_REAL; 
+<a name="line146">146: </a>  <font color="#4169E1">for</font> (i=0;i<ndpt;i++) {
+<a name="line147">147: </a>    nrs[i] = (ds[i]-s[0])/(1.0-ds[i]/xi[0]);
+<a name="line148">148: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(nrs[i])>=maxnrs) {maxnrs = PetscAbsScalar(nrs[i]); s[1] = ds[i];}
+<a name="line149">149: </a>  }
+<a name="line150">150: </a>  <font color="#4169E1">for</font> (i=1;i<ndptx;i++) {
+<a name="line151">151: </a>    nrxi[i] = (dxi[i]-s[0])/(1.0-dxi[i]/xi[0]);
+<a name="line152">152: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(nrxi[i])<=minnrxi) {minnrxi = PetscAbsScalar(nrxi[i]); xi[1] = dxi[i];}
+<a name="line153">153: </a>  }
+<a name="line154">154: </a>  <font color="#4169E1">if</font> (ndptx<2) xi[1] = PETSC_INFINITY;
+
+<a name="line156">156: </a>  beta[1] = maxnrs;
+<a name="line157">157: </a>  <font color="#4169E1">for</font> (k=2;k<ctx->ddmaxit;k++) {
+<a name="line158">158: </a>    maxnrs = 0.0;
+<a name="line159">159: </a>    minnrxi = PETSC_MAX_REAL;
+<a name="line160">160: </a>    <font color="#4169E1">for</font> (i=0;i<ndpt;i++) {
+<a name="line161">161: </a>      nrs[i] *= ((ds[i]-s[k-1])/(1.0-ds[i]/xi[k-1]))/beta[k-1];
+<a name="line162">162: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(nrs[i])>maxnrs) {maxnrs = PetscAbsScalar(nrs[i]); s[k] = ds[i];}
+<a name="line163">163: </a>    }
+<a name="line164">164: </a>    <font color="#4169E1">if</font> (ndptx>=k) {
+<a name="line165">165: </a>      <font color="#4169E1">for</font> (i=1;i<ndptx;i++) {
+<a name="line166">166: </a>        nrxi[i] *= ((dxi[i]-s[k-1])/(1.0-dxi[i]/xi[k-1]))/beta[k-1];
+<a name="line167">167: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(nrxi[i])<minnrxi) {minnrxi = PetscAbsScalar(nrxi[i]); xi[k] = dxi[i];}
+<a name="line168">168: </a>      }
+<a name="line169">169: </a>    }  <font color="#4169E1">else</font> xi[k] = PETSC_INFINITY;
+<a name="line170">170: </a>    beta[k] = maxnrs;
+<a name="line171">171: </a>  }
+<a name="line172">172: </a>  PetscFree5(ds,dsi,dxi,nrs,nrxi);
+<a name="line173">173: </a>  <font color="#4169E1">return</font>(0);
+<a name="line174">174: </a>}
+
+<a name="line178">178: </a><strong><font color="#4169E1"><a name="NEPNLEIGSEvalNRTFunct"></a>static PetscErrorCode NEPNLEIGSEvalNRTFunct(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt k,PetscScalar sigma,PetscScalar *b)</font></strong>
+<a name="line179">179: </a>{
+<a name="line180">180: </a>  NEP_NLEIGS  *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line181">181: </a>  PetscInt    i;
+<a name="line182">182: </a>  PetscScalar *beta=ctx->beta,*s=ctx->s,*xi=ctx->xi;
+
+<a name="line185">185: </a>  b[0] = 1.0/beta[0];
+<a name="line186">186: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line187">187: </a>    b[i+1] = ((sigma-s[i])*b[i])/(beta[i+1]*(1.0-sigma/xi[i]));
+<a name="line188">188: </a>  }
+<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
+<a name="line190">190: </a>}
+
+<a name="line194">194: </a><strong><font color="#4169E1"><a name="MatMult_Fun"></a>static PetscErrorCode MatMult_Fun(Mat A,Vec x,Vec y)</font></strong>
+<a name="line195">195: </a>{
+<a name="line197">197: </a>  ShellMatCtx    *ctx;
+<a name="line198">198: </a>  PetscInt       i;
+
+<a name="line201">201: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line202">202: </a>  MatMult(ctx->A[0],x,y);
+<a name="line203">203: </a>  <font color="#4169E1">if</font> (ctx->coeff[0]!=1.0) { VecScale(y,ctx->coeff[0]); }
+<a name="line204">204: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->nmat;i++) {
+<a name="line205">205: </a>    MatMult(ctx->A[i],x,ctx->t);
+<a name="line206">206: </a>    VecAXPY(y,ctx->coeff[i],ctx->t);
+<a name="line207">207: </a>  }
+<a name="line208">208: </a>  <font color="#4169E1">return</font>(0);
+<a name="line209">209: </a>}
+
+<a name="line213">213: </a><strong><font color="#4169E1"><a name="MatMultTranspose_Fun"></a>static PetscErrorCode MatMultTranspose_Fun(Mat A,Vec x,Vec y)</font></strong>
+<a name="line214">214: </a>{
+<a name="line216">216: </a>  ShellMatCtx    *ctx;
+<a name="line217">217: </a>  PetscInt       i;
+
+<a name="line220">220: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line221">221: </a>  MatMultTranspose(ctx->A[0],x,y);
+<a name="line222">222: </a>  <font color="#4169E1">if</font> (ctx->coeff[0]!=1.0) { VecScale(y,ctx->coeff[0]); }
+<a name="line223">223: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->nmat;i++) {
+<a name="line224">224: </a>    MatMultTranspose(ctx->A[i],x,ctx->t);
+<a name="line225">225: </a>    VecAXPY(y,ctx->coeff[i],ctx->t);
+<a name="line226">226: </a>  }
+<a name="line227">227: </a>  <font color="#4169E1">return</font>(0);
+<a name="line228">228: </a>}
+
+<a name="line232">232: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Fun"></a>static PetscErrorCode MatGetDiagonal_Fun(Mat A,Vec diag)</font></strong>
+<a name="line233">233: </a>{
+<a name="line235">235: </a>  ShellMatCtx    *ctx;
+<a name="line236">236: </a>  PetscInt       i;
+
+<a name="line239">239: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line240">240: </a>  MatGetDiagonal(ctx->A[0],diag);
+<a name="line241">241: </a>  <font color="#4169E1">if</font> (ctx->coeff[0]!=1.0) { VecScale(diag,ctx->coeff[0]); }
+<a name="line242">242: </a>  <font color="#4169E1">for</font> (i=1;i<ctx->nmat;i++) {
+<a name="line243">243: </a>    MatGetDiagonal(ctx->A[i],ctx->t);
+<a name="line244">244: </a>    VecAXPY(diag,ctx->coeff[i],ctx->t);
+<a name="line245">245: </a>  }
+<a name="line246">246: </a>  <font color="#4169E1">return</font>(0);
+<a name="line247">247: </a>}
+
+<a name="line251">251: </a><strong><font color="#4169E1"><a name="MatDuplicate_Fun"></a>static PetscErrorCode MatDuplicate_Fun(Mat A,MatDuplicateOption op,Mat *B)</font></strong>
+<a name="line252">252: </a>{
+<a name="line253">253: </a>  PetscInt       n,i;
+<a name="line254">254: </a>  ShellMatCtx    *ctxnew,*ctx;
+<a name="line255">255: </a>  void           (*fun)();
+
+<a name="line259">259: </a>  MatShellGetContext(A,(void**)&ctx);
+<a name="line260">260: </a>  PetscNew(&ctxnew);
+<a name="line261">261: </a>  ctxnew->nmat = ctx->nmat;
+<a name="line262">262: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->nmat;i++) {
+<a name="line263">263: </a>    PetscObjectReference((PetscObject)ctx->A[i]);
+<a name="line264">264: </a>    ctxnew->A[i] = ctx->A[i];
+<a name="line265">265: </a>    ctxnew->coeff[i] = ctx->coeff[i];
+<a name="line266">266: </a>  }
+<a name="line267">267: </a>  MatGetSize(ctx->A[0],&n,NULL);
+<a name="line268">268: </a>  VecDuplicate(ctx->t,&ctxnew->t);
+<a name="line269">269: </a>  MatCreateShell(PETSC_COMM_WORLD,n,n,n,n,(void*)ctxnew,B);
+<a name="line270">270: </a>  MatShellGetOperation(A,MATOP_MULT,&fun);
+<a name="line271">271: </a>  MatShellSetOperation(*B,MATOP_MULT,fun);
+<a name="line272">272: </a>  MatShellGetOperation(A,MATOP_MULT_TRANSPOSE,&fun);
+<a name="line273">273: </a>  MatShellSetOperation(*B,MATOP_MULT_TRANSPOSE,fun);
+<a name="line274">274: </a>  MatShellGetOperation(A,MATOP_GET_DIAGONAL,&fun);
+<a name="line275">275: </a>  MatShellSetOperation(*B,MATOP_GET_DIAGONAL,fun);
+<a name="line276">276: </a>  MatShellGetOperation(A,MATOP_DUPLICATE,&fun);
+<a name="line277">277: </a>  MatShellSetOperation(*B,MATOP_DUPLICATE,fun);
+<a name="line278">278: </a>  MatShellGetOperation(A,MATOP_DESTROY,&fun);
+<a name="line279">279: </a>  MatShellSetOperation(*B,MATOP_DESTROY,fun);
+<a name="line280">280: </a>  MatShellGetOperation(A,MATOP_AXPY,&fun);
+<a name="line281">281: </a>  MatShellSetOperation(*B,MATOP_AXPY,fun);
+<a name="line282">282: </a>  <font color="#4169E1">return</font>(0);
+<a name="line283">283: </a>}
+
+<a name="line287">287: </a><strong><font color="#4169E1"><a name="MatDestroy_Fun"></a>static PetscErrorCode MatDestroy_Fun(Mat A)</font></strong>
+<a name="line288">288: </a>{
+<a name="line289">289: </a>  ShellMatCtx    *ctx;
+<a name="line291">291: </a>  PetscInt       i;
+
+<a name="line294">294: </a>  <font color="#4169E1">if</font> (A) {
+<a name="line295">295: </a>    MatShellGetContext(A,(void**)&ctx);
+<a name="line296">296: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nmat;i++) {
+<a name="line297">297: </a>      MatDestroy(&ctx->A[i]);
+<a name="line298">298: </a>    }
+<a name="line299">299: </a>    VecDestroy(&ctx->t);
+<a name="line300">300: </a>    PetscFree(ctx);
+<a name="line301">301: </a>  }
+<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
+<a name="line303">303: </a>}
+
+<a name="line307">307: </a><strong><font color="#4169E1"><a name="MatAXPY_Fun"></a>static PetscErrorCode MatAXPY_Fun(Mat Y,PetscScalar a,Mat X,MatStructure str)</font></strong>
+<a name="line308">308: </a>{
+<a name="line309">309: </a>  ShellMatCtx    *ctxY,*ctxX;
+<a name="line311">311: </a>  PetscInt       i,j;
+<a name="line312">312: </a>  PetscBool      found;
+
+<a name="line315">315: </a>  MatShellGetContext(Y,(void**)&ctxY);
+<a name="line316">316: </a>  MatShellGetContext(X,(void**)&ctxX);
+<a name="line317">317: </a>  <font color="#4169E1">for</font> (i=0;i<ctxX->nmat;i++) {
+<a name="line318">318: </a>    found = PETSC_FALSE;
+<a name="line319">319: </a>    <font color="#4169E1">for</font> (j=0;!found&&j<ctxY->nmat;j++) {
+<a name="line320">320: </a>      <font color="#4169E1">if</font> (ctxX->A[i]==ctxY->A[j]) {
+<a name="line321">321: </a>        found = PETSC_TRUE;
+<a name="line322">322: </a>        ctxY->coeff[j] += a*ctxX->coeff[i];
+<a name="line323">323: </a>      }
+<a name="line324">324: </a>    }
+<a name="line325">325: </a>    <font color="#4169E1">if</font> (!found) {
+<a name="line326">326: </a>      ctxY->coeff[ctxY->nmat] = a*ctxX->coeff[i];
+<a name="line327">327: </a>      ctxY->A[ctxY->nmat++] = ctxX->A[i];
+<a name="line328">328: </a>      PetscObjectReference((PetscObject)ctxX->A[i]);
+<a name="line329">329: </a>    }
+<a name="line330">330: </a>  }
+<a name="line331">331: </a>  <font color="#4169E1">return</font>(0);
+<a name="line332">332: </a>}
+
+<a name="line336">336: </a><strong><font color="#4169E1"><a name="MatScale_Fun"></a>static PetscErrorCode MatScale_Fun(Mat M,PetscScalar a)</font></strong>
+<a name="line337">337: </a>{
+<a name="line338">338: </a>  ShellMatCtx    *ctx;
+<a name="line340">340: </a>  PetscInt       i;
+
+<a name="line343">343: </a>  MatShellGetContext(M,(void**)&ctx);
+<a name="line344">344: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->nmat;i++) ctx->coeff[i] *= a;
+<a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
+<a name="line346">346: </a>}
+
+<a name="line350">350: </a><strong><font color="#4169E1"><a name="NLEIGSMatToMatShellArray"></a>static PetscErrorCode NLEIGSMatToMatShellArray(Mat M,Mat *Ms)</font></strong>
+<a name="line351">351: </a>{
+<a name="line353">353: </a>  ShellMatCtx    *ctx;
+<a name="line354">354: </a>  PetscInt       n;
+<a name="line355">355: </a>  PetscBool      has;
+<a name="line356">356: </a>  
+<a name="line358">358: </a>  MatHasOperation(M,MATOP_DUPLICATE,&has);
+<a name="line359">359: </a>  <font color="#4169E1">if</font> (!has) SETERRQ(PetscObjectComm((PetscObject)M),1,<font color="#666666">"MatDuplicate operation required"</font>);
+<a name="line360">360: </a>  PetscNew(&ctx);
+<a name="line361">361: </a>  MatDuplicate(M,MAT_COPY_VALUES,&ctx->A[0]);
+<a name="line362">362: </a>  ctx->nmat = 1;
+<a name="line363">363: </a>  ctx->coeff[0] = 1.0;
+<a name="line364">364: </a>  MatCreateVecs(M,&ctx->t,NULL);
+<a name="line365">365: </a>  MatGetSize(M,&n,NULL);
+<a name="line366">366: </a>  MatCreateShell(PetscObjectComm((PetscObject)M),n,n,n,n,(void*)ctx,Ms);
+<a name="line367">367: </a>  MatShellSetOperation(*Ms,MATOP_MULT,(void(*)())MatMult_Fun);
+<a name="line368">368: </a>  MatShellSetOperation(*Ms,MATOP_MULT_TRANSPOSE,(void(*)())MatMultTranspose_Fun);
+<a name="line369">369: </a>  MatShellSetOperation(*Ms,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Fun);
+<a name="line370">370: </a>  MatShellSetOperation(*Ms,MATOP_DUPLICATE,(void(*)())MatDuplicate_Fun);
+<a name="line371">371: </a>  MatShellSetOperation(*Ms,MATOP_DESTROY,(void(*)())MatDestroy_Fun);
+<a name="line372">372: </a>  MatShellSetOperation(*Ms,MATOP_AXPY,(void(*)())MatAXPY_Fun);
+<a name="line373">373: </a>  MatShellSetOperation(*Ms,MATOP_SCALE,(void(*)())MatScale_Fun);
+<a name="line374">374: </a>  <font color="#4169E1">return</font>(0);
+<a name="line375">375: </a>}
+
+<a name="line379">379: </a><strong><font color="#4169E1"><a name="NEPNLEIGSNormEstimation"></a>static PetscErrorCode NEPNLEIGSNormEstimation(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat M,PetscReal *norm,Vec *w)</font></strong>
+<a name="line380">380: </a>{
+<a name="line381">381: </a>  PetscScalar    *z,*x,*y;
+<a name="line382">382: </a>  PetscReal      tr;
+<a name="line383">383: </a>  Vec            X=w[0],Y=w[1];
+<a name="line384">384: </a>  PetscInt       n,i;
+<a name="line385">385: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line386">386: </a>  PetscRandom    rand;
+<a name="line388">388: </a>  
+<a name="line390">390: </a>  <font color="#4169E1">if</font> (!ctx->vrn) {
+<a name="line391">391: </a>    <font color="#B22222">/* generate a random vector with normally distributed entries with the Box-Muller transform */</font>
+<a name="line392">392: </a>    <a href="../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(nep->V,&rand);
+<a name="line393">393: </a>    MatCreateVecs(M,&ctx->vrn,NULL);
+<a name="line394">394: </a>    VecSetRandom(X,rand);
+<a name="line395">395: </a>    VecSetRandom(Y,rand);
+<a name="line396">396: </a>    VecGetLocalSize(ctx->vrn,&n);
+<a name="line397">397: </a>    VecGetArray(ctx->vrn,&z);
+<a name="line398">398: </a>    VecGetArray(X,&x);
+<a name="line399">399: </a>    VecGetArray(Y,&y);
+<a name="line400">400: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line401">401: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line402">402: </a>      z[i] = PetscSqrtReal(-2.0*PetscLogReal(PetscRealPart(x[i])))*PetscCosReal(2.0*PETSC_PI*PetscRealPart(y[i]));
+<a name="line403">403: </a>      z[i] += PETSC_i*(PetscSqrtReal(-2.0*PetscLogReal(PetscImaginaryPart(x[i])))*PetscCosReal(2.0*PETSC_PI*PetscImaginaryPart(y[i])));
+<a name="line404">404: </a><font color="#A020F0">#else</font>
+<a name="line405">405: </a>      z[i] = PetscSqrtReal(-2.0*PetscLogReal(x[i]))*PetscCosReal(2.0*PETSC_PI*y[i]);
+<a name="line406">406: </a><font color="#A020F0">#endif</font>
+<a name="line407">407: </a>    }
+<a name="line408">408: </a>    VecRestoreArray(ctx->vrn,&z);
+<a name="line409">409: </a>    VecRestoreArray(X,&x);
+<a name="line410">410: </a>    VecRestoreArray(Y,&y);
+<a name="line411">411: </a>    VecNorm(ctx->vrn,NORM_2,&tr);
+<a name="line412">412: </a>    VecScale(ctx->vrn,1/tr);
+<a name="line413">413: </a>  }
+<a name="line414">414: </a>  <font color="#B22222">/* matrix-free norm estimator of Ipsen http://www4.ncsu.edu/~ipsen/ps/slides_ima.pdf */</font>
+<a name="line415">415: </a>  MatGetSize(M,&n,NULL);
+<a name="line416">416: </a>  MatMult(M,ctx->vrn,X);
+<a name="line417">417: </a>  VecNorm(X,NORM_2,norm);
+<a name="line418">418: </a>  *norm *= PetscSqrtReal(n);
+<a name="line419">419: </a>  <font color="#4169E1">return</font>(0);
+<a name="line420">420: </a>}
+
+<a name="line424">424: </a><strong><font color="#4169E1"><a name="NEPNLEIGSDividedDifferences_split"></a>static PetscErrorCode NEPNLEIGSDividedDifferences_split(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line425">425: </a>{
+<a name="line427">427: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line428">428: </a>  PetscInt       k,j,i;
+<a name="line429">429: </a>  PetscReal      norm0,norm,max;
+<a name="line430">430: </a>  PetscScalar    *s=ctx->s,*beta=ctx->beta,*b,alpha,*coeffs;
+<a name="line431">431: </a>  Mat            T,Ts;
+<a name="line432">432: </a>  PetscBool      shell;
+
+<a name="line435">435: </a>  PetscMalloc1(nep->nt*ctx->ddmaxit,&ctx->coeffD);
+<a name="line436">436: </a>  PetscMalloc2(ctx->ddmaxit+1,&b,ctx->ddmaxit+1,&coeffs);
+<a name="line437">437: </a>  max = 0.0;
+<a name="line438">438: </a>  <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
+<a name="line439">439: </a>    <a href="../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[j],s[0],ctx->coeffD+j);
+<a name="line440">440: </a>    ctx->coeffD[j] /= beta[0];
+<a name="line441">441: </a>    max = PetscMax(PetscAbsScalar(ctx->coeffD[j]),max);
+<a name="line442">442: </a>  }
+<a name="line443">443: </a>  norm0 = max;
+<a name="line444">444: </a>  ctx->nmat = ctx->ddmaxit;
+<a name="line445">445: </a>  <font color="#4169E1">for</font> (k=1;k<ctx->ddmaxit;k++) {
+<a name="line446">446: </a>    NEPNLEIGSEvalNRTFunct(nep,k,s[k],b);
+<a name="line447">447: </a>    max = 0.0;
+<a name="line448">448: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line449">449: </a>      <a href="../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[i],s[k],ctx->coeffD+k*nep->nt+i);
+<a name="line450">450: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line451">451: </a>        ctx->coeffD[k*nep->nt+i] -= b[j]*ctx->coeffD[i+nep->nt*j];
+<a name="line452">452: </a>      }
+<a name="line453">453: </a>      ctx->coeffD[k*nep->nt+i] /= b[k];
+<a name="line454">454: </a>      max = PetscMax(PetscAbsScalar(ctx->coeffD[k*nep->nt+i]),max);
+<a name="line455">455: </a>    }
+<a name="line456">456: </a>    norm = max;
+<a name="line457">457: </a>    <font color="#4169E1">if</font> (norm/norm0 < ctx->ddtol) {
+<a name="line458">458: </a>      ctx->nmat = k+1;
+<a name="line459">459: </a>      <font color="#4169E1">break</font>;
+<a name="line460">460: </a>    } 
+<a name="line461">461: </a>  }
+<a name="line462">462: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(nep,&ctx->ksp); }
+<a name="line463">463: </a>  PetscObjectTypeCompare((PetscObject)nep->A[0],MATSHELL,&shell);
+<a name="line464">464: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->nshiftsw;i++) {
+<a name="line465">465: </a>    NEPNLEIGSEvalNRTFunct(nep,ctx->nmat,ctx->shifts[i],coeffs);
+<a name="line466">466: </a>    <font color="#4169E1">if</font> (!shell) {
+<a name="line467">467: </a>      MatDuplicate(nep->A[0],MAT_COPY_VALUES,&T);
+<a name="line468">468: </a>    } <font color="#4169E1">else</font> {
+<a name="line469">469: </a>      NLEIGSMatToMatShellArray(nep->A[0],&T);
+<a name="line470">470: </a>    }
+<a name="line471">471: </a>    alpha = 0.0;
+<a name="line472">472: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->nmat-1;j++) alpha += coeffs[j]*ctx->coeffD[j*nep->nt];
+<a name="line473">473: </a>    MatScale(T,alpha);
+<a name="line474">474: </a>    <font color="#4169E1">for</font> (k=1;k<nep->nt;k++) {
+<a name="line475">475: </a>      alpha = 0.0;
+<a name="line476">476: </a>      <font color="#4169E1">for</font> (j=0;j<ctx->nmat-1;j++) alpha += coeffs[j]*ctx->coeffD[j*nep->nt+k];
+<a name="line477">477: </a>      <font color="#4169E1">if</font> (shell) {
+<a name="line478">478: </a>        NLEIGSMatToMatShellArray(nep->A[k],&Ts);
+<a name="line479">479: </a>      }
+<a name="line480">480: </a>      MatAXPY(T,alpha,shell?Ts:nep->A[k],nep->mstr);
+<a name="line481">481: </a>      <font color="#4169E1">if</font> (shell) {
+<a name="line482">482: </a>        MatDestroy(&Ts);
+<a name="line483">483: </a>      }
+<a name="line484">484: </a>    }
+<a name="line485">485: </a>    KSPSetOperators(ctx->ksp[i],T,T);
+<a name="line486">486: </a>    KSPSetUp(ctx->ksp[i]);
+<a name="line487">487: </a>    MatDestroy(&T);
+<a name="line488">488: </a>  }
+<a name="line489">489: </a>  PetscFree2(b,coeffs);
+<a name="line490">490: </a>  <font color="#4169E1">return</font>(0);
+<a name="line491">491: </a>}
+
+<a name="line495">495: </a><strong><font color="#4169E1"><a name="NEPNLEIGSDividedDifferences_callback"></a>static PetscErrorCode NEPNLEIGSDividedDifferences_callback(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line496">496: </a>{
+<a name="line498">498: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line499">499: </a>  PetscInt       k,j,i;
+<a name="line500">500: </a>  PetscReal      norm0,norm;
+<a name="line501">501: </a>  PetscScalar    *s=ctx->s,*beta=ctx->beta,*b,*coeffs;
+<a name="line502">502: </a>  Mat            *D=ctx->D,T;
+<a name="line503">503: </a>  PetscBool      shell,has,vec=PETSC_FALSE;
+<a name="line504">504: </a>  Vec            w[2];
+
+<a name="line507">507: </a>  PetscMalloc2(ctx->ddmaxit+1,&b,ctx->ddmaxit+1,&coeffs);
+<a name="line508">508: </a>  T = nep->function;
+<a name="line509">509: </a>  <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,s[0],T,T);
+<a name="line510">510: </a>  PetscObjectTypeCompare((PetscObject)T,MATSHELL,&shell);
+<a name="line511">511: </a>  <font color="#4169E1">if</font> (!shell) {
+<a name="line512">512: </a>    MatDuplicate(T,MAT_COPY_VALUES,&D[0]);
+<a name="line513">513: </a>  } <font color="#4169E1">else</font> {
+<a name="line514">514: </a>    NLEIGSMatToMatShellArray(T,&D[0]);
+<a name="line515">515: </a>  }
+<a name="line516">516: </a>  <font color="#4169E1">if</font> (beta[0]!=1.0) {
+<a name="line517">517: </a>    MatScale(D[0],1.0/beta[0]);
+<a name="line518">518: </a>  }
+<a name="line519">519: </a>  MatHasOperation(D[0],MATOP_NORM,&has);
+<a name="line520">520: </a>  <font color="#4169E1">if</font> (has) {
+<a name="line521">521: </a>    MatNorm(D[0],NORM_FROBENIUS,&norm0);
+<a name="line522">522: </a>  } <font color="#4169E1">else</font> {
+<a name="line523">523: </a>    MatCreateVecs(D[0],NULL,&w[0]);
+<a name="line524">524: </a>    VecDuplicate(w[0],&w[1]);
+<a name="line525">525: </a>    vec = PETSC_TRUE;
+<a name="line526">526: </a>    NEPNLEIGSNormEstimation(nep,D[0],&norm0,w);
+<a name="line527">527: </a>  }
+<a name="line528">528: </a>  ctx->nmat = ctx->ddmaxit;
+<a name="line529">529: </a>  <font color="#4169E1">for</font> (k=1;k<ctx->ddmaxit;k++) {
+<a name="line530">530: </a>    NEPNLEIGSEvalNRTFunct(nep,k,s[k],b);
+<a name="line531">531: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,s[k],T,T);
+<a name="line532">532: </a>    <font color="#4169E1">if</font> (!shell) {
+<a name="line533">533: </a>      MatDuplicate(T,MAT_COPY_VALUES,&D[k]);
+<a name="line534">534: </a>    } <font color="#4169E1">else</font> {
+<a name="line535">535: </a>      NLEIGSMatToMatShellArray(T,&D[k]);
+<a name="line536">536: </a>    }
+<a name="line537">537: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line538">538: </a>      MatAXPY(D[k],-b[j],D[j],nep->mstr);
+<a name="line539">539: </a>    }
+<a name="line540">540: </a>    MatScale(D[k],1.0/b[k]);
+<a name="line541">541: </a>    MatHasOperation(D[k],MATOP_NORM,&has);
+<a name="line542">542: </a>    <font color="#4169E1">if</font> (has) {
+<a name="line543">543: </a>      MatNorm(D[k],NORM_FROBENIUS,&norm);
+<a name="line544">544: </a>    } <font color="#4169E1">else</font> {
+<a name="line545">545: </a>      <font color="#4169E1">if</font>(!vec) {
+<a name="line546">546: </a>        MatCreateVecs(D[k],NULL,&w[0]);
+<a name="line547">547: </a>        VecDuplicate(w[0],&w[1]);
+<a name="line548">548: </a>        vec = PETSC_TRUE;
+<a name="line549">549: </a>      }
+<a name="line550">550: </a>      NEPNLEIGSNormEstimation(nep,D[k],&norm,w);
+<a name="line551">551: </a>    }
+<a name="line552">552: </a>    <font color="#4169E1">if</font> (norm/norm0 < ctx->ddtol) {
+<a name="line553">553: </a>      ctx->nmat = k+1; <font color="#B22222">/* increment (the last matrix is not used) */</font>
+<a name="line554">554: </a>      MatDestroy(&D[k]);
+<a name="line555">555: </a>      <font color="#4169E1">break</font>;
+<a name="line556">556: </a>    } 
+<a name="line557">557: </a>  }
+<a name="line558">558: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(nep,&ctx->ksp); }
+<a name="line559">559: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->nshiftsw;i++) {
+<a name="line560">560: </a>    NEPNLEIGSEvalNRTFunct(nep,ctx->nmat,ctx->shifts[i],coeffs);
+<a name="line561">561: </a>    MatDuplicate(ctx->D[0],MAT_COPY_VALUES,&T);
+<a name="line562">562: </a>    <font color="#4169E1">if</font> (coeffs[0]!=1.0) { MatScale(T,coeffs[0]); }
+<a name="line563">563: </a>    <font color="#4169E1">for</font> (j=1;j<ctx->nmat-1;j++) {
+<a name="line564">564: </a>      MatAXPY(T,coeffs[j],ctx->D[j],nep->mstr);
+<a name="line565">565: </a>    }
+<a name="line566">566: </a>    KSPSetOperators(ctx->ksp[i],T,T);
+<a name="line567">567: </a>    KSPSetUp(ctx->ksp[i]);
+<a name="line568">568: </a>    MatDestroy(&T);
+<a name="line569">569: </a>  }
+<a name="line570">570: </a>  PetscFree2(b,coeffs);
+<a name="line571">571: </a>  <font color="#4169E1">if</font> (vec) {
+<a name="line572">572: </a>    VecDestroy(&w[0]);  
+<a name="line573">573: </a>    VecDestroy(&w[1]);  
+<a name="line574">574: </a>  }
+<a name="line575">575: </a>  <font color="#4169E1">return</font>(0);
+<a name="line576">576: </a>}
+
+<a name="line580">580: </a><strong><font color="#4169E1"><a name="NEPNLEIGSRitzVector"></a>static PetscErrorCode NEPNLEIGSRitzVector(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscInt k,Vec t)</font></strong>
+<a name="line581">581: </a>{
+<a name="line583">583: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line584">584: </a>  PetscInt       deg=ctx->nmat-1,ldds,n;
+<a name="line585">585: </a>  PetscBLASInt   nq_,lds_,n_,one=1,ldds_;
+<a name="line586">586: </a>  PetscScalar    sone=1.0,zero=0.0,*x,*y,*X;
+
+<a name="line589">589: </a>  <a href="../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(nep->ds,&n,NULL,NULL,NULL,NULL);
+<a name="line590">590: </a>  PetscMalloc1(n+nq,&y);
+<a name="line591">591: </a>  x = y+nq;
+<a name="line592">592: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(nep->ds,&ldds);
+<a name="line593">593: </a>  PetscBLASIntCast(n,&n_);
+<a name="line594">594: </a>  PetscBLASIntCast(nq,&nq_);
+<a name="line595">595: </a>  PetscBLASIntCast(ldds,&ldds_);
+<a name="line596">596: </a>  PetscBLASIntCast(deg*ld,&lds_);
+<a name="line597">597: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_X,&X);
+<a name="line598">598: </a>  <font color="#4169E1">if</font> (ctx->nshifts) PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,H,&ldds_,X+k*ldds,&one,&zero,x,&one));
+<a name="line599">599: </a>  <font color="#4169E1">else</font> x = X+k*ldds;
+<a name="line600">600: </a>  PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&nq_,&n_,&sone,S,&lds_,x,&one,&zero,y,&one));
+<a name="line601">601: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_X,&X);
+<a name="line602">602: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,nq);
+<a name="line603">603: </a>  <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(nep->V,1.0,0.0,t,y);
+<a name="line604">604: </a>  VecNormalize(t,NULL);
+<a name="line605">605: </a>  PetscFree(y);
+<a name="line606">606: </a>  <font color="#4169E1">return</font>(0);
+<a name="line607">607: </a>}
+
+<a name="line611">611: </a><font color="#B22222">/*</font>
+<a name="line612">612: </a><font color="#B22222">   NEPKrylovConvergence - This is the analogue to EPSKrylovConvergence.</font>
+<a name="line613">613: </a><font color="#B22222">*/</font>
+<a name="line614">614: </a><strong><font color="#4169E1"><a name="NEPNLEIGSKrylovConvergence"></a>static PetscErrorCode NEPNLEIGSKrylovConvergence(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *S,PetscInt ld,PetscInt nq,PetscScalar *H,PetscBool getall,PetscInt kini,PetscInt nits,PetscScalar betak,PetscReal betah,PetscInt *kout,Vec *w)</font></strong>
+<a name="line615">615: </a>{
+<a name="line617">617: </a>  PetscInt       k,newk,marker,inside;
+<a name="line618">618: </a>  PetscScalar    re,im;
+<a name="line619">619: </a>  PetscReal      resnorm,tt;
+<a name="line620">620: </a>  PetscBool      istrivial;
+<a name="line621">621: </a>  Vec            t;
+<a name="line622">622: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+
+<a name="line625">625: </a>  t = w[0];
+<a name="line626">626: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line627">627: </a>  marker = -1;
+<a name="line628">628: </a>  <font color="#4169E1">if</font> (nep->trackall) getall = PETSC_TRUE;
+<a name="line629">629: </a>  <font color="#4169E1">for</font> (k=kini;k<kini+nits;k++) {
+<a name="line630">630: </a>    <font color="#B22222">/* eigenvalue */</font>
+<a name="line631">631: </a>    re = nep->eigr[k];
+<a name="line632">632: </a>    im = nep->eigi[k];
+<a name="line633">633: </a>    <font color="#4169E1">if</font> (!istrivial) {
+<a name="line634">634: </a>      <font color="#4169E1">if</font> (!ctx->nshifts) {
+<a name="line635">635: </a>        NEPNLEIGSBackTransform((PetscObject)nep,1,&re,&im);
+<a name="line636">636: </a>      }
+<a name="line637">637: </a>      <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(nep->rg,1,&re,&im,&inside);
+<a name="line638">638: </a>      <font color="#4169E1">if</font> (marker==-1 && inside<0) marker = k;
+<a name="line639">639: </a>    }
+<a name="line640">640: </a>    newk = k;
+<a name="line641">641: </a>    <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,&newk,&resnorm);
+<a name="line642">642: </a>    tt = (ctx->nshifts)?SlepcAbsEigenvalue(betak-nep->eigr[k]*betah,nep->eigi[k]*betah):betah;
+<a name="line643">643: </a>    resnorm *=  PetscAbsReal(tt);
+<a name="line644">644: </a>    <font color="#B22222">/* error estimate */</font>
+<a name="line645">645: </a>    (*nep->converged)(nep,nep->eigr[k],nep->eigi[k],resnorm,&nep->errest[k],nep->convergedctx);
+<a name="line646">646: </a>    <font color="#4169E1">if</font> (ctx->trueres && (nep->errest[k] < nep->tol) ) {
+<a name="line647">647: </a>      <font color="#B22222">/* check explicit residual */</font>
+<a name="line648">648: </a>      NEPNLEIGSRitzVector(nep,S,ld,nq,H,k,t);
+<a name="line649">649: </a>      NEPComputeResidualNorm_Private(nep,re,t,w+1,&resnorm);
+<a name="line650">650: </a>      (*nep->converged)(nep,re,im,resnorm,&nep->errest[k],nep->convergedctx);
+<a name="line651">651: </a>    }
+<a name="line652">652: </a>    <font color="#4169E1">if</font> (marker==-1 && nep->errest[k] >= nep->tol) marker = k;
+<a name="line653">653: </a>    <font color="#4169E1">if</font> (newk==k+1) {
+<a name="line654">654: </a>      nep->errest[k+1] = nep->errest[k];
+<a name="line655">655: </a>      k++;
+<a name="line656">656: </a>    }
+<a name="line657">657: </a>    <font color="#4169E1">if</font> (marker!=-1 && !getall) <font color="#4169E1">break</font>;
+<a name="line658">658: </a>  }
+<a name="line659">659: </a>  <font color="#4169E1">if</font> (marker!=-1) k = marker;
+<a name="line660">660: </a>  *kout = k;
+<a name="line661">661: </a>  <font color="#4169E1">return</font>(0);
+<a name="line662">662: </a>}
+
+<a name="line666">666: </a><strong><font color="#4169E1"><a name="NEPSetUp_NLEIGS"></a>PetscErrorCode NEPSetUp_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line667">667: </a>{
+<a name="line669">669: </a>  PetscInt       k,in;
+<a name="line670">670: </a>  PetscScalar    zero=0.0;
+<a name="line671">671: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line672">672: </a>  SlepcSC        sc;
+<a name="line673">673: </a>  PetscBool      istrivial;
+
+<a name="line676">676: </a>  NEPSetDimensions_Default(nep,nep->nev,&nep->ncv,&nep->mpd);
+<a name="line677">677: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
+<a name="line678">678: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
+<a name="line679">679: </a>  <font color="#4169E1">if</font> (!ctx->ddmaxit) ctx->ddmaxit = MAX_LBPOINTS;
+<a name="line680">680: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line681">681: </a>  <font color="#4169E1">if</font> (istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"NEPNLEIGS requires a nontrivial region defining the target set"</font>);
+<a name="line682">682: </a>  <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(nep->rg,1,&nep->target,&zero,&in);
+<a name="line683">683: </a>  <font color="#4169E1">if</font> (in<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"The target is not inside the target set"</font>);
+<a name="line684">684: </a>  <font color="#4169E1">if</font> (!nep->which) nep->which = NEP_TARGET_MAGNITUDE;
+
+<a name="line686">686: </a>  <font color="#B22222">/* Initialize the NLEIGS context structure */</font>
+<a name="line687">687: </a>  k = ctx->ddmaxit;
+<a name="line688">688: </a>  PetscMalloc4(k,&ctx->s,k,&ctx->xi,k,&ctx->beta,k,&ctx->D);
+<a name="line689">689: </a>  nep->data = ctx;
+<a name="line690">690: </a>  <font color="#4169E1">if</font> (nep->tol==PETSC_DEFAULT) nep->tol = SLEPC_DEFAULT_TOL;
+<a name="line691">691: </a>  <font color="#4169E1">if</font> (ctx->ddtol==PETSC_DEFAULT) ctx->ddtol = nep->tol/10.0;
+<a name="line692">692: </a>  <font color="#4169E1">if</font> (!ctx->keep) ctx->keep = 0.5;
+
+<a name="line694">694: </a>  <font color="#B22222">/* Compute Leja-Bagby points and scaling values */</font>
+<a name="line695">695: </a>  NEPNLEIGSLejaBagbyPoints(nep);
+
+<a name="line697">697: </a>  <font color="#B22222">/* Compute the divided difference matrices */</font>
+<a name="line698">698: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line699">699: </a>    NEPNLEIGSDividedDifferences_split(nep);
+<a name="line700">700: </a>  } <font color="#4169E1">else</font> {
+<a name="line701">701: </a>    NEPNLEIGSDividedDifferences_callback(nep);
+<a name="line702">702: </a>  }
+<a name="line703">703: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,ctx->nmat);
+<a name="line704">704: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,4);
+
+<a name="line706">706: </a>  <font color="#B22222">/* set-up <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a> and transfer split operator functions */</font>
+<a name="line707">707: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(nep->ds,ctx->nshifts?DSGNHEP:DSNHEP);
+<a name="line708">708: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(nep->ds,nep->ncv+1);
+<a name="line709">709: </a>  <a href="../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(nep->ds,&sc);
+<a name="line710">710: </a>  <font color="#4169E1">if</font> (!ctx->nshifts) {
+<a name="line711">711: </a>    sc->map = NEPNLEIGSBackTransform;
+<a name="line712">712: </a>    <a href="../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(nep->ds,PETSC_TRUE);
+<a name="line713">713: </a>  }
+<a name="line714">714: </a>  sc->mapobj        = (PetscObject)nep;
+<a name="line715">715: </a>  sc->rg            = nep->rg;
+<a name="line716">716: </a>  sc->comparison    = nep->sc->comparison;
+<a name="line717">717: </a>  sc->comparisonctx = nep->sc->comparisonctx;
+<a name="line718">718: </a>  <font color="#4169E1">return</font>(0);
+<a name="line719">719: </a>}
+
+<a name="line723">723: </a><font color="#B22222">/*</font>
+<a name="line724">724: </a><font color="#B22222">  Norm of [sp;sq] </font>
+<a name="line725">725: </a><font color="#B22222">*/</font>
+<a name="line726">726: </a><strong><font color="#4169E1"><a name="NEPTOARSNorm2"></a>static PetscErrorCode NEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)</font></strong>
+<a name="line727">727: </a>{
+<a name="line729">729: </a>  PetscBLASInt   n_,one=1;
+
+<a name="line732">732: </a>  PetscBLASIntCast(n,&n_);
+<a name="line733">733: </a>  *norm = BLASnrm2_(&n_,S,&one);
+<a name="line734">734: </a>  <font color="#4169E1">return</font>(0);
+<a name="line735">735: </a>}
+
+<a name="line739">739: </a><font color="#B22222">/*</font>
+<a name="line740">740: </a><font color="#B22222"> Computes GS orthogonalization   [z;x] - [Sp;Sq]*y,</font>
+<a name="line741">741: </a><font color="#B22222"> where y = ([Sp;Sq]'*[z;x]).</font>
+<a name="line742">742: </a><font color="#B22222">   k: Column from S to be orthogonalized against previous columns.</font>
+<a name="line743">743: </a><font color="#B22222">   Sq = Sp+ld</font>
+<a name="line744">744: </a><font color="#B22222">   dim(work)=k;</font>
+<a name="line745">745: </a><font color="#B22222">*/</font>
+<a name="line746">746: </a><strong><font color="#4169E1"><a name="NEPTOAROrth2"></a>static PetscErrorCode NEPTOAROrth2(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)</font></strong>
+<a name="line747">747: </a>{
+<a name="line749">749: </a>  PetscBLASInt   n_,lds_,k_,one=1;
+<a name="line750">750: </a>  PetscScalar    sonem=-1.0,sone=1.0,szero=0.0,*x0,*x,*c;
+<a name="line751">751: </a>  PetscInt       i,lds=deg*ld,n;
+<a name="line752">752: </a>  PetscReal      eta,onorm;
+<a name="line753">753: </a>  
+<a name="line755">755: </a>  <a href="../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(nep->V,NULL,NULL,&eta,NULL);
+<a name="line756">756: </a>  n = k+deg-1;
+<a name="line757">757: </a>  PetscBLASIntCast(n,&n_);
+<a name="line758">758: </a>  PetscBLASIntCast(deg*ld,&lds_);
+<a name="line759">759: </a>  PetscBLASIntCast(k,&k_); <font color="#B22222">/* Number of vectors to orthogonalize against them */</font>
+<a name="line760">760: </a>  c = work;
+<a name="line761">761: </a>  x0 = S+k*lds;
+<a name="line762">762: </a>  PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S,&lds_,x0,&one,&szero,y,&one));
+<a name="line763">763: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line764">764: </a>    x = S+i*ld+k*lds;
+<a name="line765">765: </a>    PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,y,&one));
+<a name="line766">766: </a>  }
+<a name="line767">767: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line768">768: </a>    x= S+i*ld+k*lds;
+<a name="line769">769: </a>    PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+i*ld,&lds_,y,&one,&sone,x,&one));
+<a name="line770">770: </a>  }
+<a name="line771">771: </a>  NEPTOARSNorm2(lds,S+k*lds,&onorm);
+<a name="line772">772: </a>  <font color="#B22222">/* twice */</font>
+<a name="line773">773: </a>  PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S,&lds_,x0,&one,&szero,c,&one));
+<a name="line774">774: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line775">775: </a>    x = S+i*ld+k*lds;
+<a name="line776">776: </a>    PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,c,&one));
+<a name="line777">777: </a>  }
+<a name="line778">778: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line779">779: </a>    x= S+i*ld+k*lds;
+<a name="line780">780: </a>    PetscStackCall(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+i*ld,&lds_,c,&one,&sone,x,&one));
+<a name="line781">781: </a>  }
+<a name="line782">782: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] += c[i];
+<a name="line783">783: </a>  <font color="#4169E1">if</font> (norm) {
+<a name="line784">784: </a>    NEPTOARSNorm2(lds,S+k*lds,norm);
+<a name="line785">785: </a>    <font color="#4169E1">if</font> (lindep) *lindep = (*norm < eta * onorm)?PETSC_TRUE:PETSC_FALSE;
+<a name="line786">786: </a>  }
+<a name="line787">787: </a>  <font color="#4169E1">return</font>(0);
+<a name="line788">788: </a>}
+
+<a name="line792">792: </a><font color="#B22222">/*</font>
+<a name="line793">793: </a><font color="#B22222">  Extend the TOAR basis by applying the the matrix operator</font>
+<a name="line794">794: </a><font color="#B22222">  over a vector which is decomposed on the TOAR way</font>
+<a name="line795">795: </a><font color="#B22222">  Input:</font>
+<a name="line796">796: </a><font color="#B22222">    - S,V: define the latest Arnoldi vector (nv vectors in V)</font>
+<a name="line797">797: </a><font color="#B22222">  Output:</font>
+<a name="line798">798: </a><font color="#B22222">    - t: new vector extending the TOAR basis</font>
+<a name="line799">799: </a><font color="#B22222">    - r: temporally coefficients to compute the TOAR coefficients</font>
+<a name="line800">800: </a><font color="#B22222">         for the new Arnoldi vector</font>
+<a name="line801">801: </a><font color="#B22222">  Workspace: t_ (two vectors)</font>
+<a name="line802">802: </a><font color="#B22222">*/</font>
+<a name="line803">803: </a><strong><font color="#4169E1"><a name="NEPTOARExtendBasis"></a>static PetscErrorCode NEPTOARExtendBasis(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt idxrktg,PetscScalar *S,PetscInt ls,PetscInt nv,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)</font></strong>
+<a name="line804">804: </a>{
+<a name="line806">806: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line807">807: </a>  PetscInt       deg=ctx->nmat-1,k,j;
+<a name="line808">808: </a>  Vec            v=t_[0],q=t_[1],w;
+<a name="line809">809: </a>  PetscScalar    *beta=ctx->beta,*s=ctx->s,*xi=ctx->xi,*coeffs,sigma;
+
+<a name="line812">812: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(nep,&ctx->ksp); }
+<a name="line813">813: </a>  sigma = ctx->shifts[idxrktg];
+<a name="line814">814: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,nv);
+<a name="line815">815: </a>  PetscMalloc1(ctx->nmat-1,&coeffs);
+<a name="line816">816: </a>  <font color="#4169E1">if</font> (PetscAbsScalar(s[deg-2]-sigma)<100*PETSC_MACHINE_EPSILON) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Breakdown in NLEIGS"</font>);
+<a name="line817">817: </a>  <font color="#B22222">/* i-part stored in (i-1) position */</font>
+<a name="line818">818: </a>  <font color="#4169E1">for</font> (j=0;j<nv;j++) {
+<a name="line819">819: </a>    r[(deg-2)*lr+j] = (S[(deg-2)*ls+j]+(beta[deg-1]/xi[deg-2])*S[(deg-1)*ls+j])/(s[deg-2]-sigma);
+<a name="line820">820: </a>  }
+<a name="line821">821: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(ctx->W,0,deg-1);
+<a name="line822">822: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->W,deg-2,&w);
+<a name="line823">823: </a>  <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,w,r+(deg-2)*lr);
+<a name="line824">824: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->W,deg-2,&w);
+<a name="line825">825: </a>  <font color="#4169E1">for</font> (k=deg-2;k>0;k--) {
+<a name="line826">826: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(s[k-1]-sigma)<100*PETSC_MACHINE_EPSILON) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Breakdown in NLEIGS"</font>);
+<a name="line827">827: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) r[(k-1)*lr+j] = (S[(k-1)*ls+j]+(beta[k]/xi[k-1])*S[k*ls+j]-beta[k]*(1.0-sigma/xi[k-1])*r[(k)*lr+j])/(s[k-1]-sigma);
+<a name="line828">828: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->W,k-1,&w);
+<a name="line829">829: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,w,r+(k-1)*lr);
+<a name="line830">830: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->W,k-1,&w);
+<a name="line831">831: </a>  }
+<a name="line832">832: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line833">833: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->nmat-1;j++) coeffs[j] = ctx->coeffD[nep->nt*j];
+<a name="line834">834: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->W,1.0,0.0,v,coeffs);
+<a name="line835">835: </a>    MatMult(nep->A[0],v,q);
+<a name="line836">836: </a>    <font color="#4169E1">for</font> (k=1;k<nep->nt;k++) {
+<a name="line837">837: </a>      <font color="#4169E1">for</font> (j=0;j<ctx->nmat-1;j++) coeffs[j] = ctx->coeffD[nep->nt*j+k];
+<a name="line838">838: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->W,1.0,0,v,coeffs);
+<a name="line839">839: </a>      MatMult(nep->A[k],v,t);
+<a name="line840">840: </a>      VecAXPY(q,1.0,t);
+<a name="line841">841: </a>    }
+<a name="line842">842: </a>    KSPSolve(ctx->ksp[idxrktg],q,t);
+<a name="line843">843: </a>    VecScale(t,-1.0);
+<a name="line844">844: </a>  } <font color="#4169E1">else</font> {
+<a name="line845">845: </a>    <font color="#4169E1">for</font> (k=0;k<deg-1;k++) {
+<a name="line846">846: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(ctx->W,k,&w);
+<a name="line847">847: </a>      MatMult(ctx->D[k],w,q);
+<a name="line848">848: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(ctx->W,k,&w);
+<a name="line849">849: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(ctx->W,k,q);
+<a name="line850">850: </a>    }
+<a name="line851">851: </a>    <font color="#4169E1">for</font> (j=0;j<ctx->nmat-1;j++) coeffs[j] = 1.0;
+<a name="line852">852: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->W,1.0,0.0,q,coeffs);
+<a name="line853">853: </a>    KSPSolve(ctx->ksp[idxrktg],q,t);
+<a name="line854">854: </a>    VecScale(t,-1.0);
+<a name="line855">855: </a>  }
+<a name="line856">856: </a>  PetscFree(coeffs);
+<a name="line857">857: </a>  <font color="#4169E1">return</font>(0);
+<a name="line858">858: </a>}
+
+<a name="line862">862: </a><font color="#B22222">/*</font>
+<a name="line863">863: </a><font color="#B22222">  Compute TOAR coefficients of the blocks of the new Arnoldi vector computed</font>
+<a name="line864">864: </a><font color="#B22222">*/</font>
+<a name="line865">865: </a><strong><font color="#4169E1"><a name="NEPTOARCoefficients"></a>static PetscErrorCode NEPTOARCoefficients(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x,PetscScalar *work)</font></strong>
+<a name="line866">866: </a>{
+<a name="line868">868: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line869">869: </a>  PetscInt       k,j,d=ctx->nmat-1;
+<a name="line870">870: </a>  PetscScalar    *t=work;
+
+<a name="line873">873: </a>  NEPNLEIGSEvalNRTFunct(nep,d-1,sigma,t);
+<a name="line874">874: </a>  <font color="#4169E1">for</font> (k=0;k<d-1;k++) {
+<a name="line875">875: </a>    <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[k*lr+j] += t[k]*x[j];
+<a name="line876">876: </a>  }
+<a name="line877">877: </a>  <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[(d-1)*lr+j] = t[d-1]*x[j];
+<a name="line878">878: </a>  <font color="#4169E1">return</font>(0);
+<a name="line879">879: </a>}
+
+<a name="line883">883: </a><font color="#B22222">/*</font>
+<a name="line884">884: </a><font color="#B22222">  Compute continuation vector coefficients for the Rational-Krylov run.</font>
+<a name="line885">885: </a><font color="#B22222">  dim(work) >= (end-ini)*(end-ini+1) + end+1 + 2*(end-ini+1), dim(t) = end. </font>
+<a name="line886">886: </a><font color="#B22222">*/</font>
+<a name="line887">887: </a><strong><font color="#4169E1"><a name="NEPNLEIGS_RKcontinuation"></a>static PetscErrorCode NEPNLEIGS_RKcontinuation(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ini,PetscInt end,PetscScalar *K,PetscScalar *H,PetscInt ld,PetscScalar sigma,PetscScalar *S,PetscInt lds,PetscScalar *cont,PetscScalar *t,PetscScalar *work)</font></strong>
+<a name="line888">888: </a>{
+<a name="line889">889: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_LARF)</font>
+<a name="line891">891: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/LARF - Lapack routines are unavailable"</font>);
+<a name="line892">892: </a><font color="#A020F0">#else</font>
+<a name="line894">894: </a>  PetscScalar    *x,*W,*tau,sone=1.0,szero=0.0;
+<a name="line895">895: </a>  PetscInt       i,j,n1,n,nwu=0;
+<a name="line896">896: </a>  PetscBLASInt   info,n_,n1_,one=1,dim,lds_;
+<a name="line897">897: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+
+<a name="line900">900: </a>  <font color="#4169E1">if</font> (!ctx->nshifts || !end) {
+<a name="line901">901: </a>    t[0] = 1;
+<a name="line902">902: </a>    PetscMemcpy(cont,S+end*lds,lds*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line903">903: </a>  } <font color="#4169E1">else</font> {
+<a name="line904">904: </a>    n   = end-ini;
+<a name="line905">905: </a>    n1  = n+1;
+<a name="line906">906: </a>    x   = work+nwu;
+<a name="line907">907: </a>    nwu += end+1;
+<a name="line908">908: </a>    tau = work+nwu;
+<a name="line909">909: </a>    nwu += n;
+<a name="line910">910: </a>    W   = work+nwu;
+<a name="line911">911: </a>    nwu += n1*n;
+<a name="line912">912: </a>    <font color="#4169E1">for</font> (j=ini;j<end;j++) {
+<a name="line913">913: </a>      <font color="#4169E1">for</font> (i=ini;i<=end;i++) W[(j-ini)*n1+i-ini] = K[j*ld+i] -H[j*ld+i]*sigma;
+<a name="line914">914: </a>    }
+<a name="line915">915: </a>    PetscBLASIntCast(n,&n_);
+<a name="line916">916: </a>    PetscBLASIntCast(n1,&n1_);
+<a name="line917">917: </a>    PetscBLASIntCast(end+1,&dim);
+<a name="line918">918: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&n1_,&n_,W,&n1_,tau,work+nwu,&n1_,&info));
+<a name="line919">919: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line920">920: </a>    <font color="#4169E1">for</font> (i=0;i<end;i++) t[i] = 0.0;
+<a name="line921">921: </a>    t[end] = 1.0; 
+<a name="line922">922: </a>    <font color="#4169E1">for</font> (j=n-1;j>=0;j--) {
+<a name="line923">923: </a>      <font color="#4169E1">for</font> (i=0;i<ini+j;i++) x[i] = 0.0;
+<a name="line924">924: </a>      x[ini+j] = 1.0;
+<a name="line925">925: </a>      <font color="#4169E1">for</font> (i=j+1;i<n1;i++) x[i+ini] = W[i+n1*j]; 
+<a name="line926">926: </a>      tau[j] = PetscConj(tau[j]);
+<a name="line927">927: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&dim,&one,x,&one,tau+j,t,&dim,work+nwu));
+<a name="line928">928: </a>    }
+<a name="line929">929: </a>    PetscBLASIntCast(lds,&lds_);
+<a name="line930">930: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&lds_,&n1_,&sone,S,&lds_,t,&one,&szero,cont,&one));
+<a name="line931">931: </a>  }
+<a name="line932">932: </a>  <font color="#4169E1">return</font>(0);
+<a name="line933">933: </a><font color="#A020F0">#endif</font>
+<a name="line934">934: </a>}
+
+<a name="line938">938: </a><font color="#B22222">/*</font>
+<a name="line939">939: </a><font color="#B22222">  Compute a run of Arnoldi iterations</font>
+<a name="line940">940: </a><font color="#B22222">*/</font>
+<a name="line941">941: </a><strong><font color="#4169E1"><a name="NEPNLEIGSTOARrun"></a>static PetscErrorCode NEPNLEIGSTOARrun(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *K,PetscScalar *H,PetscInt ldh,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt k,PetscInt *M,PetscBool *breakdown,Vec *t_)</font></strong>
+<a name="line942">942: </a>{
+<a name="line944">944: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+<a name="line945">945: </a>  PetscInt       i,j,p,m=*M,lwa,deg=ctx->nmat-1,lds=ld*deg,nqt=*nq;
+<a name="line946">946: </a>  Vec            t=t_[0];
+<a name="line947">947: </a>  PetscReal      norm;
+<a name="line948">948: </a>  PetscScalar    *x,*work,*tt,sigma,*cont;
+<a name="line949">949: </a>  PetscBool      lindep;
+
+<a name="line952">952: </a>  lwa = PetscMax(ld,deg)+(m+1)*(m+1)+4*(m+1);
+<a name="line953">953: </a>  PetscMalloc4(ld,&x,lwa,&work,m+1,&tt,lds,&cont);
+<a name="line954">954: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line955">955: </a>    sigma = ctx->shifts[(++(ctx->idxrk))%ctx->nshiftsw];
+
+<a name="line957">957: </a>    <font color="#B22222">/* Continuation vector */</font>
+<a name="line958">958: </a>    NEPNLEIGS_RKcontinuation(nep,0,j,K,H,ldh,sigma,S,lds,cont,tt,work);
+<a name="line959">959: </a>    
+<a name="line960">960: </a>    <font color="#B22222">/* apply operator */</font>
+<a name="line961">961: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,nqt,&t);
+<a name="line962">962: </a>    NEPTOARExtendBasis(nep,(ctx->idxrk)%ctx->nshiftsw,cont,ld,nqt,V,t,S+(j+1)*lds,ld,t_+1);
+<a name="line963">963: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,nqt,&t);
+
+<a name="line965">965: </a>    <font color="#B22222">/* orthogonalize */</font>
+<a name="line966">966: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(nep->V,nqt,x,&norm,&lindep);
+<a name="line967">967: </a>    <font color="#4169E1">if</font> (!lindep) {
+<a name="line968">968: </a>      x[nqt] = norm;
+<a name="line969">969: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(nep->V,nqt,1.0/norm);
+<a name="line970">970: </a>      nqt++;
+<a name="line971">971: </a>    } <font color="#4169E1">else</font> x[nqt] = 0.0;
+
+<a name="line973">973: </a>    NEPTOARCoefficients(nep,sigma,*nq,cont,ld,S+(j+1)*lds,ld,x,work);
+
+<a name="line975">975: </a>    <font color="#B22222">/* Level-2 orthogonalization */</font>
+<a name="line976">976: </a>    NEPTOAROrth2(nep,S,ld,deg,j+1,H+j*ldh,&norm,breakdown,work);
+<a name="line977">977: </a>    H[j+1+ldh*j] = norm;
+<a name="line978">978: </a>    <font color="#4169E1">if</font> (ctx->nshifts) {
+<a name="line979">979: </a>      <font color="#4169E1">for</font> (i=0;i<=j;i++) K[i+ldh*j] = sigma*H[i+ldh*j] + tt[i];
+<a name="line980">980: </a>      K[j+1+ldh*j] = sigma*H[j+1+ldh*j];
+<a name="line981">981: </a>    }
+<a name="line982">982: </a>    *nq = nqt;
+<a name="line983">983: </a>    <font color="#4169E1">if</font> (*breakdown) {
+<a name="line984">984: </a>      *M = j+1;
+<a name="line985">985: </a>      <font color="#4169E1">break</font>;
+<a name="line986">986: </a>    }
+<a name="line987">987: </a>    <font color="#4169E1">for</font> (p=0;p<deg;p++) {
+<a name="line988">988: </a>      <font color="#4169E1">for</font> (i=0;i<=j+deg;i++) {
+<a name="line989">989: </a>        S[i+p*ld+(j+1)*lds] /= norm;
+<a name="line990">990: </a>      }
+<a name="line991">991: </a>    }
+<a name="line992">992: </a>  } 
+<a name="line993">993: </a>  PetscFree4(x,work,tt,cont);
+<a name="line994">994: </a>  <font color="#4169E1">return</font>(0);
+<a name="line995">995: </a>}
+
+<a name="line999">999: </a><font color="#B22222">/* dim(work)=5*ld*lds dim(rwork)=6*n */</font>
+<a name="line1000">1000: </a><strong><font color="#4169E1"><a name="NEPTOARTrunc"></a>static PetscErrorCode NEPTOARTrunc(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *nq,PetscInt cs1,PetscScalar *work,PetscReal *rwork)</font></strong>
+<a name="line1001">1001: </a>{
+<a name="line1003">1003: </a>  PetscInt       lwa,nwu=0,nrwu=0;
+<a name="line1004">1004: </a>  PetscInt       j,i,n,lds=deg*ld,rk=0,rs1;
+<a name="line1005">1005: </a>  PetscScalar    *M,*V,*pU,t;
+<a name="line1006">1006: </a>  PetscReal      *sg,tol;
+<a name="line1007">1007: </a>  PetscBLASInt   cs1_,rs1_,cs1tdeg,n_,info,lw_;
+<a name="line1008">1008: </a>  Mat            U;
+
+<a name="line1011">1011: </a>  rs1 = *nq;
+<a name="line1012">1012: </a>  n = (rs1>deg*cs1)?deg*cs1:rs1;
+<a name="line1013">1013: </a>  lwa = 5*ld*lds;
+<a name="line1014">1014: </a>  M = work+nwu;
+<a name="line1015">1015: </a>  nwu += rs1*cs1*deg;
+<a name="line1016">1016: </a>  sg = rwork+nrwu;
+<a name="line1017">1017: </a>  nrwu += n;
+<a name="line1018">1018: </a>  pU = work+nwu;
+<a name="line1019">1019: </a>  nwu += rs1*n;
+<a name="line1020">1020: </a>  V = work+nwu;
+<a name="line1021">1021: </a>  nwu += deg*cs1*n;
+<a name="line1022">1022: </a>  <font color="#4169E1">for</font> (i=0;i<cs1;i++) {
+<a name="line1023">1023: </a>    <font color="#4169E1">for</font> (j=0;j<deg;j++) {
+<a name="line1024">1024: </a>      PetscMemcpy(M+(i+j*cs1)*rs1,S+i*lds+j*ld,rs1*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1025">1025: </a>    } 
+<a name="line1026">1026: </a>  }
+<a name="line1027">1027: </a>  PetscBLASIntCast(n,&n_);
+<a name="line1028">1028: </a>  PetscBLASIntCast(cs1,&cs1_);
+<a name="line1029">1029: </a>  PetscBLASIntCast(rs1,&rs1_);
+<a name="line1030">1030: </a>  PetscBLASIntCast(cs1*deg,&cs1tdeg);
+<a name="line1031">1031: </a>  PetscBLASIntCast(lwa-nwu,&lw_);
+<a name="line1032">1032: </a><font color="#A020F0">#if !defined (PETSC_USE_COMPLEX)</font>
+<a name="line1033">1033: </a>  PetscStackCall(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&rs1_,&cs1tdeg,M,&rs1_,sg,pU,&rs1_,V,&n_,work+nwu,&lw_,&info));
+<a name="line1034">1034: </a><font color="#A020F0">#else</font>
+<a name="line1035">1035: </a>  PetscStackCall(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&rs1_,&cs1tdeg,M,&rs1_,sg,pU,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
+<a name="line1036">1036: </a><font color="#A020F0">#endif</font>
+<a name="line1037">1037: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+<a name="line1038">1038: </a>  
+<a name="line1039">1039: </a>  <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line1040">1040: </a>  MatCreateSeqDense(PETSC_COMM_SELF,rs1,cs1+deg-1,pU,&U);
+<a name="line1041">1041: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,rs1);
+<a name="line1042">1042: </a>  <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(nep->V,U,0,cs1+deg-1);
+<a name="line1043">1043: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,cs1+deg-1);
+<a name="line1044">1044: </a>  MatDestroy(&U);  
+<a name="line1045">1045: </a>  tol = PetscMax(rs1,deg*cs1)*PETSC_MACHINE_EPSILON*sg[0];
+<a name="line1046">1046: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(n_,cs1tdeg);i++) <font color="#4169E1">if</font> (sg[i]>tol) rk++;
+<a name="line1047">1047: </a>  rk = PetscMin(cs1+deg-1,rk);
+<a name="line1048">1048: </a>  
+<a name="line1049">1049: </a>  <font color="#B22222">/* Update S */</font>
+<a name="line1050">1050: </a>  PetscMemzero(S,lds*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1051">1051: </a>  <font color="#4169E1">for</font> (i=0;i<rk;i++) {
+<a name="line1052">1052: </a>    t = sg[i];
+<a name="line1053">1053: </a>    PetscStackCall(<font color="#666666">"BLASscal"</font>,BLASscal_(&cs1tdeg,&t,V+i,&n_));
+<a name="line1054">1054: </a>  }
+<a name="line1055">1055: </a>  <font color="#4169E1">for</font> (j=0;j<cs1;j++) {
+<a name="line1056">1056: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line1057">1057: </a>      PetscMemcpy(S+j*lds+i*ld,V+(cs1*i+j)*n,rk*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1058">1058: </a>    }
+<a name="line1059">1059: </a>  }
+<a name="line1060">1060: </a>  *nq = rk;
+<a name="line1061">1061: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1062">1062: </a>}
+
+<a name="line1066">1066: </a><font color="#B22222">/*</font>
+<a name="line1067">1067: </a><font color="#B22222">  S <- S*Q </font>
+<a name="line1068">1068: </a><font color="#B22222">  columns s-s+ncu of S</font>
+<a name="line1069">1069: </a><font color="#B22222">  rows 0-sr of S</font>
+<a name="line1070">1070: </a><font color="#B22222">  size(Q) qr x ncu</font>
+<a name="line1071">1071: </a><font color="#B22222">  dim(work)=sr*ncu</font>
+<a name="line1072">1072: </a><font color="#B22222">*/</font>
+<a name="line1073">1073: </a><strong><font color="#4169E1"><a name="NEPTOARSupdate"></a>static PetscErrorCode NEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)</font></strong>
+<a name="line1074">1074: </a>{
+<a name="line1076">1076: </a>  PetscScalar    a=1.0,b=0.0;
+<a name="line1077">1077: </a>  PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
+<a name="line1078">1078: </a>  PetscInt       j,lds=deg*ld,i;
+
+<a name="line1081">1081: </a>  PetscBLASIntCast(sr,&sr_);
+<a name="line1082">1082: </a>  PetscBLASIntCast(qr,&qr_);
+<a name="line1083">1083: </a>  PetscBLASIntCast(ncu,&ncu_);
+<a name="line1084">1084: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line1085">1085: </a>  PetscBLASIntCast(ldq,&ldq_);
+<a name="line1086">1086: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line1087">1087: </a>    PetscStackCall(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S+i*ld,&lds_,Q,&ldq_,&b,work,&sr_));
+<a name="line1088">1088: </a>    <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
+<a name="line1089">1089: </a>      PetscMemcpy(S+lds*(s+j)+i*ld,work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1090">1090: </a>    }
+<a name="line1091">1091: </a>  }
+<a name="line1092">1092: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1093">1093: </a>}
+
+<a name="line1097">1097: </a><strong><font color="#4169E1"><a name="NEPSolve_NLEIGS"></a>PetscErrorCode NEPSolve_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1098">1098: </a>{
+<a name="line1100">1100: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+<a name="line1101">1101: </a>  PetscInt       i,j,k=0,l,nv=0,ld,lds,off,ldds,rs1,nq=0,newn;
+<a name="line1102">1102: </a>  PetscInt       lwa,lrwa,nwu=0,nrwu=0,deg=ctx->nmat-1,nconv=0;
+<a name="line1103">1103: </a>  PetscScalar    *S,*Q,*work,*H,*pU,*K,betak=0,*Hc;
+<a name="line1104">1104: </a>  PetscReal      betah,norm,*rwork;
+<a name="line1105">1105: </a>  PetscBool      breakdown=PETSC_FALSE,lindep;
+<a name="line1106">1106: </a>  Mat            U;
+
+<a name="line1109">1109: </a>  ld = nep->ncv+deg;
+<a name="line1110">1110: </a>  lds = deg*ld;
+<a name="line1111">1111: </a>  lwa = (deg+6)*ld*lds;
+<a name="line1112">1112: </a>  lrwa = 7*lds;
+<a name="line1113">1113: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(nep->ds,&ldds);
+<a name="line1114">1114: </a>  PetscMalloc4(lwa,&work,lrwa,&rwork,lds*ld,&S,ldds*ldds,&Hc);
+<a name="line1115">1115: </a>  PetscMemzero(S,lds*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1116">1116: </a>  <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(nep->V,PetscMax(nep->nt-1,ctx->nmat-1),&ctx->W);
+
+<a name="line1118">1118: </a>  <font color="#B22222">/* Get the starting vector */</font>
+<a name="line1119">1119: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line1120">1120: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,i);
+<a name="line1121">1121: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(nep->V,i,S+i*ld,&norm,&lindep);
+<a name="line1122">1122: </a>    <font color="#4169E1">if</font> (!lindep) {
+<a name="line1123">1123: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(nep->V,i,1/norm);
+<a name="line1124">1124: </a>      S[i+i*ld] = norm;
+<a name="line1125">1125: </a>      nq++;
+<a name="line1126">1126: </a>    }
+<a name="line1127">1127: </a>  }
+<a name="line1128">1128: </a>  <font color="#4169E1">if</font> (!nq) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>: Problem with initial vector"</font>);
+<a name="line1129">1129: </a>  NEPTOARSNorm2(lds,S,&norm);
+<a name="line1130">1130: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
+<a name="line1131">1131: </a>    <font color="#4169E1">for</font> (i=0;i<=j;i++) S[i+j*ld] /= norm;
+<a name="line1132">1132: </a>  }
+
+<a name="line1134">1134: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line1135">1135: </a>  l = 0;
+<a name="line1136">1136: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line1137">1137: </a>    nep->its++;
+<a name="line1138">1138: </a>    
+<a name="line1139">1139: </a>    <font color="#B22222">/* Compute an nv-step Krylov relation */</font>
+<a name="line1140">1140: </a>    nv = PetscMin(nep->nconv+nep->mpd,nep->ncv);
+<a name="line1141">1141: </a>    <font color="#4169E1">if</font> (ctx->nshifts) { <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_A,&K); }
+<a name="line1142">1142: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,ctx->nshifts?DS_MAT_B:DS_MAT_A,&H);
+<a name="line1143">1143: </a>    NEPNLEIGSTOARrun(nep,&nq,S,ld,K,H,ldds,nep->V,nep->nconv+l,&nv,&breakdown,nep->work);
+<a name="line1144">1144: </a>    betah = PetscAbsScalar(H[(nv-1)*ldds+nv]);
+<a name="line1145">1145: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,ctx->nshifts?DS_MAT_B:DS_MAT_A,&H);
+<a name="line1146">1146: </a>    <font color="#4169E1">if</font> (ctx->nshifts) {
+<a name="line1147">1147: </a>      betak = K[(nv-1)*ldds+nv];
+<a name="line1148">1148: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_A,&K);
+<a name="line1149">1149: </a>    }
+<a name="line1150">1150: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,nv,0,nep->nconv,nep->nconv+l);
+<a name="line1151">1151: </a>    <font color="#4169E1">if</font> (l==0) {
+<a name="line1152">1152: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_INTERMEDIATE);
+<a name="line1153">1153: </a>    } <font color="#4169E1">else</font> {
+<a name="line1154">1154: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_RAW);
+<a name="line1155">1155: </a>    }
+
+<a name="line1157">1157: </a>    <font color="#B22222">/* Solve projected problem */</font>
+<a name="line1158">1158: </a>    <font color="#4169E1">if</font> (ctx->nshifts) {
+<a name="line1159">1159: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_B,&H);
+<a name="line1160">1160: </a>      PetscMemcpy(Hc,H,ldds*ldds*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1161">1161: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_B,&H);
+<a name="line1162">1162: </a>    }
+<a name="line1163">1163: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(nep->ds,nep->eigr,nep->eigi);
+<a name="line1164">1164: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(nep->ds,nep->eigr,nep->eigi,NULL,NULL,NULL);
+<a name="line1165">1165: </a>    <font color="#4169E1">if</font> (!ctx->nshifts) {
+<a name="line1166">1166: </a>      <a href="../../../../docs/manualpages/DS/DSUpdateExtraRow.html#DSUpdateExtraRow">DSUpdateExtraRow</a>(nep->ds);
+<a name="line1167">1167: </a>    }
+
+<a name="line1169">1169: </a>    <font color="#B22222">/* Check convergence */</font>
+<a name="line1170">1170: </a>    NEPNLEIGSKrylovConvergence(nep,S,ld,nq,Hc,PETSC_FALSE,nep->nconv,nv-nep->nconv,betak,betah,&k,nep->work);
+<a name="line1171">1171: </a>    (*nep->stopping)(nep,nep->its,nep->max_it,k,nep->nev,&nep->reason,nep->stoppingctx);
+<a name="line1172">1172: </a>    nconv = k;
+
+<a name="line1174">1174: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line1175">1175: </a>    <font color="#4169E1">if</font> (nep->reason != NEP_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line1176">1176: </a>    <font color="#4169E1">else</font> {
+<a name="line1177">1177: </a>      l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line1178">1178: </a>      <font color="#4169E1">if</font> (!breakdown) {
+<a name="line1179">1179: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line1180">1180: </a>        <font color="#4169E1">if</font> (!ctx->nshifts) {
+<a name="line1181">1181: </a>          <a href="../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(nep->ds,k+l);
+<a name="line1182">1182: </a>          <a href="../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(nep->ds,&newn,NULL,NULL,NULL,NULL);
+<a name="line1183">1183: </a>          l = newn-k;
+<a name="line1184">1184: </a>        } <font color="#4169E1">else</font> {
+<a name="line1185">1185: </a>          <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_Q,&Q);
+<a name="line1186">1186: </a>          <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_B,&H);
+<a name="line1187">1187: </a>          <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_A,&K);
+<a name="line1188">1188: </a>          <font color="#4169E1">for</font> (i=ctx->lock?k:0;i<k+l;i++) {
+<a name="line1189">1189: </a>            H[k+l+i*ldds] = betah*Q[nv-1+i*ldds];
+<a name="line1190">1190: </a>            K[k+l+i*ldds] = betak*Q[nv-1+i*ldds];
+<a name="line1191">1191: </a>          }
+<a name="line1192">1192: </a>          <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_B,&H);
+<a name="line1193">1193: </a>          <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_A,&K);
+<a name="line1194">1194: </a>          <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_Q,&Q);
+<a name="line1195">1195: </a>          <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,k+l,0,nep->nconv,0);
+<a name="line1196">1196: </a>        }
+<a name="line1197">1197: </a>      }
+<a name="line1198">1198: </a>    }
+<a name="line1199">1199: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; }
+
+<a name="line1201">1201: </a>    <font color="#B22222">/* Update S */</font>
+<a name="line1202">1202: </a>    off = nep->nconv*ldds;
+<a name="line1203">1203: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,ctx->nshifts?DS_MAT_Z:DS_MAT_Q,&Q);
+<a name="line1204">1204: </a>    NEPTOARSupdate(S,ld,deg,nq,nep->nconv,k+l-nep->nconv,nv,Q+off,ldds,work+nwu);
+<a name="line1205">1205: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,ctx->nshifts?DS_MAT_Z:DS_MAT_Q,&Q);
+
+<a name="line1207">1207: </a>    <font color="#B22222">/* Copy last column of S */</font>
+<a name="line1208">1208: </a>    PetscMemcpy(S+lds*(k+l),S+lds*nv,lds*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1209">1209: </a>    <font color="#4169E1">if</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line1210">1210: </a>      <font color="#4169E1">if</font> (breakdown) {
+
+<a name="line1212">1212: </a>        <font color="#B22222">/* Stop if breakdown */</font>
+<a name="line1213">1213: </a>        PetscInfo2(nep,<font color="#666666">"Breakdown (it=%D norm=%g)\n"</font>,nep->its,(double)betah);
+<a name="line1214">1214: </a>        nep->reason = NEP_DIVERGED_BREAKDOWN;
+<a name="line1215">1215: </a>      } <font color="#4169E1">else</font> {
+<a name="line1216">1216: </a>        <font color="#B22222">/* Truncate S */</font>
+<a name="line1217">1217: </a>        NEPTOARTrunc(nep,S,ld,deg,&nq,k+l+1,work+nwu,rwork+nrwu);
+<a name="line1218">1218: </a>      }
+<a name="line1219">1219: </a>    }
+<a name="line1220">1220: </a>    nep->nconv = k;
+<a name="line1221">1221: </a>    NEPMonitor(nep,nep->its,nconv,nep->eigr,nep->eigi,nep->errest,nv);
+<a name="line1222">1222: </a>  }
+<a name="line1223">1223: </a>  nep->nconv = nconv;
+<a name="line1224">1224: </a>  <font color="#4169E1">if</font> (nep->nconv>0) {
+<a name="line1225">1225: </a>    <font color="#B22222">/* Extract invariant pair */</font>
+<a name="line1226">1226: </a>    NEPTOARTrunc(nep,S,ld,deg,&nq,nep->nconv,work+nwu,rwork+nrwu);
+<a name="line1227">1227: </a>    <font color="#B22222">/* Update vectors V = V*S or V=V*S*H */</font>    
+<a name="line1228">1228: </a>    rs1 = nep->nconv;
+<a name="line1229">1229: </a>    <font color="#4169E1">if</font> (ctx->nshifts) {
+<a name="line1230">1230: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(nep->ds,DS_MAT_B,&H);
+<a name="line1231">1231: </a>      NEPTOARSupdate(S,ld,deg,rs1,0,nep->nconv,nep->nconv,H,ldds,work+nwu);
+<a name="line1232">1232: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(nep->ds,DS_MAT_B,&H);
+<a name="line1233">1233: </a>    }
+<a name="line1234">1234: </a>    PetscMalloc1(rs1*nep->nconv,&pU);
+<a name="line1235">1235: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line1236">1236: </a>      PetscMemcpy(pU+i*rs1,S+i*lds,rs1*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1237">1237: </a>    }
+<a name="line1238">1238: </a>    MatCreateSeqDense(PETSC_COMM_SELF,rs1,nep->nconv,pU,&U);
+<a name="line1239">1239: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,rs1);
+<a name="line1240">1240: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(nep->V,U,0,nep->nconv);
+<a name="line1241">1241: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,nep->nconv);
+<a name="line1242">1242: </a>    MatDestroy(&U);
+<a name="line1243">1243: </a>    PetscFree(pU);
+<a name="line1244">1244: </a>  }
+<a name="line1245">1245: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
+<a name="line1246">1246: </a><font color="#B22222">     <a href="../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line1247">1247: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(nep->ds,nep->nconv,0,0,0);
+<a name="line1248">1248: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(nep->ds,DS_STATE_RAW);
+
+<a name="line1250">1250: </a>  PetscFree4(work,rwork,S,Hc);
+<a name="line1251">1251: </a>  <font color="#B22222">/* Map eigenvalues back to the original problem */</font>
+<a name="line1252">1252: </a>  <font color="#4169E1">if</font> (!ctx->nshifts) {
+<a name="line1253">1253: </a>    NEPNLEIGSBackTransform((PetscObject)nep,nep->nconv,nep->eigr,nep->eigi);
+<a name="line1254">1254: </a>  }
+<a name="line1255">1255: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->W);
+<a name="line1256">1256: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1257">1257: </a>}
+
+<a name="line1261">1261: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetSingularitiesFunction_NLEIGS"></a>static PetscErrorCode NEPNLEIGSSetSingularitiesFunction_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*fun)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void *ctx)</font></strong>
+<a name="line1262">1262: </a>{
+<a name="line1263">1263: </a>  NEP_NLEIGS *nepctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1266">1266: </a>  <font color="#4169E1">if</font> (fun) nepctx->computesingularities = fun;
+<a name="line1267">1267: </a>  <font color="#4169E1">if</font> (ctx) nepctx->singularitiesctx     = ctx;
+<a name="line1268">1268: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1269">1269: </a>}
+
+<a name="line1273">1273: </a><font color="#B22222">/*@C</font>
+<a name="line1274">1274: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a> - Sets a user function to compute a discretization</font>
+<a name="line1275">1275: </a><font color="#B22222">   of the singularity set (where T(.) is not analytic).</font>
+
+<a name="line1277">1277: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1279">1279: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1280">1280: </a><font color="#B22222">+  nep - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line1281">1281: </a><font color="#B22222">.  fun - user function (if NULL then <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any previously set value)</font>
+<a name="line1282">1282: </a><font color="#B22222">-  ctx - [optional] user-defined context for private data for the function</font>
+<a name="line1283">1283: </a><font color="#B22222">         (may be NULL, in which case <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any previously set value)</font>
+
+<a name="line1285">1285: </a><font color="#B22222">   Calling Sequence of fun:</font>
+<a name="line1286">1286: </a><font color="#B22222">$   fun(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *maxnp,PetscScalar *xi,void *ctx)</font>
+
+<a name="line1288">1288: </a><font color="#B22222">+   nep   - the <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line1289">1289: </a><font color="#B22222">.   maxnp - on input number of requested points in the discretization (can be set)</font>
+<a name="line1290">1290: </a><font color="#B22222">.   xi    - computed values of the discretization</font>
+<a name="line1291">1291: </a><font color="#B22222">-   ctx   - optional context, as set by <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a>()</font>
+
+<a name="line1293">1293: </a><font color="#B22222">   Note:</font>
+<a name="line1294">1294: </a><font color="#B22222">   The user-defined function can set a smaller value of maxnp if necessary.</font>
+
+<a name="line1296">1296: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1298">1298: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html#NEPNLEIGSGetSingularitiesFunction">NEPNLEIGSGetSingularitiesFunction</a>()</font>
+<a name="line1299">1299: </a><font color="#B22222">@*/</font>
+<a name="line1300">1300: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetSingularitiesFunction"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*fun)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void *ctx)</font></strong>
+<a name="line1301">1301: </a>{
+
+<a name="line1306">1306: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSSetSingularitiesFunction_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode(*)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void*),(nep,fun,ctx));
+<a name="line1307">1307: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1308">1308: </a>}
+
+<a name="line1312">1312: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetSingularitiesFunction_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetSingularitiesFunction_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (**fun)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void **ctx)</font></strong>
+<a name="line1313">1313: </a>{
+<a name="line1314">1314: </a>  NEP_NLEIGS *nepctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1317">1317: </a>  <font color="#4169E1">if</font> (fun) *fun = nepctx->computesingularities;
+<a name="line1318">1318: </a>  <font color="#4169E1">if</font> (ctx) *ctx = nepctx->singularitiesctx;
+<a name="line1319">1319: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1320">1320: </a>}
+
+<a name="line1324">1324: </a><font color="#B22222">/*@C</font>
+<a name="line1325">1325: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html#NEPNLEIGSGetSingularitiesFunction">NEPNLEIGSGetSingularitiesFunction</a> - Returns the Function and optionally the user</font>
+<a name="line1326">1326: </a><font color="#B22222">   provided context for computing a discretization of the singularity set.</font>
+
+<a name="line1328">1328: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1330">1330: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1331">1331: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1333">1333: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1334">1334: </a><font color="#B22222">+  fun - location to put the function (or NULL)</font>
+<a name="line1335">1335: </a><font color="#B22222">-  ctx - location to stash the function context (or NULL)</font>
+
+<a name="line1337">1337: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1339">1339: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetSingularitiesFunction.html#NEPNLEIGSSetSingularitiesFunction">NEPNLEIGSSetSingularitiesFunction</a>()</font>
+<a name="line1340">1340: </a><font color="#B22222">@*/</font>
+<a name="line1341">1341: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetSingularitiesFunction"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetSingularitiesFunction.html#NEPNLEIGSGetSingularitiesFunction">NEPNLEIGSGetSingularitiesFunction</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (**fun)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void **ctx)</font></strong>
+<a name="line1342">1342: </a>{
+
+<a name="line1347">1347: </a>  PetscUseMethod(nep,<font color="#666666">"NEPNLEIGSGetSingularitiesFunction_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscErrorCode(**)(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar*,void*),void**),(nep,fun,ctx));
+<a name="line1348">1348: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1349">1349: </a>}
+
+<a name="line1353">1353: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetRestart_NLEIGS"></a>static PetscErrorCode NEPNLEIGSSetRestart_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal keep)</font></strong>
+<a name="line1354">1354: </a>{
+<a name="line1355">1355: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1358">1358: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
+<a name="line1359">1359: </a>  <font color="#4169E1">else</font> {
+<a name="line1360">1360: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
+<a name="line1361">1361: </a>    ctx->keep = keep;
+<a name="line1362">1362: </a>  }
+<a name="line1363">1363: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1364">1364: </a>}
+
+<a name="line1368">1368: </a><font color="#B22222">/*@</font>
+<a name="line1369">1369: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</a> - Sets the restart parameter for the NLEIGS</font>
+<a name="line1370">1370: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
+<a name="line1371">1371: </a><font color="#B22222">   after restart.</font>
+
+<a name="line1373">1373: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1375">1375: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1376">1376: </a><font color="#B22222">+  nep  - the nonlinear eigensolver context</font>
+<a name="line1377">1377: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
+
+<a name="line1379">1379: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1380">1380: </a><font color="#B22222">.  -nep_nleigs_restart - Sets the restart parameter</font>
+
+<a name="line1382">1382: </a><font color="#B22222">   Notes:</font>
+<a name="line1383">1383: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
+
+<a name="line1385">1385: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1387">1387: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetRestart.html#NEPNLEIGSGetRestart">NEPNLEIGSGetRestart</a>()</font>
+<a name="line1388">1388: </a><font color="#B22222">@*/</font>
+<a name="line1389">1389: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetRestart"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal keep)</font></strong>
+<a name="line1390">1390: </a>{
+
+<a name="line1396">1396: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSSetRestart_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal),(nep,keep));
+<a name="line1397">1397: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1398">1398: </a>}
+
+<a name="line1402">1402: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetRestart_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetRestart_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *keep)</font></strong>
+<a name="line1403">1403: </a>{
+<a name="line1404">1404: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1407">1407: </a>  *keep = ctx->keep;
+<a name="line1408">1408: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1409">1409: </a>}
+
+<a name="line1413">1413: </a><font color="#B22222">/*@</font>
+<a name="line1414">1414: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetRestart.html#NEPNLEIGSGetRestart">NEPNLEIGSGetRestart</a> - Gets the restart parameter used in the NLEIGS method.</font>
+
+<a name="line1416">1416: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1418">1418: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1419">1419: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1421">1421: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1422">1422: </a><font color="#B22222">.  keep - the restart parameter</font>
+
+<a name="line1424">1424: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1426">1426: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</a>()</font>
+<a name="line1427">1427: </a><font color="#B22222">@*/</font>
+<a name="line1428">1428: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetRestart"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetRestart.html#NEPNLEIGSGetRestart">NEPNLEIGSGetRestart</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *keep)</font></strong>
+<a name="line1429">1429: </a>{
+
+<a name="line1435">1435: </a>  PetscUseMethod(nep,<font color="#666666">"NEPNLEIGSGetRestart_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*),(nep,keep));
+<a name="line1436">1436: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1437">1437: </a>}
+
+<a name="line1441">1441: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetLocking_NLEIGS"></a>static PetscErrorCode NEPNLEIGSSetLocking_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool lock)</font></strong>
+<a name="line1442">1442: </a>{
+<a name="line1443">1443: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1446">1446: </a>  ctx->lock = lock;
+<a name="line1447">1447: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1448">1448: </a>}
+
+<a name="line1452">1452: </a><font color="#B22222">/*@</font>
+<a name="line1453">1453: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</a> - Choose between locking and non-locking variants of</font>
+<a name="line1454">1454: </a><font color="#B22222">   the NLEIGS method.</font>
+
+<a name="line1456">1456: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1458">1458: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1459">1459: </a><font color="#B22222">+  nep  - the nonlinear eigensolver context</font>
+<a name="line1460">1460: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
+
+<a name="line1462">1462: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1463">1463: </a><font color="#B22222">.  -nep_nleigs_locking - Sets the locking flag</font>
+
+<a name="line1465">1465: </a><font color="#B22222">   Notes:</font>
+<a name="line1466">1466: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
+<a name="line1467">1467: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
+<a name="line1468">1468: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
+<a name="line1469">1469: </a><font color="#B22222">   non-locking variant).</font>
+
+<a name="line1471">1471: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1473">1473: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetLocking.html#NEPNLEIGSGetLocking">NEPNLEIGSGetLocking</a>()</font>
+<a name="line1474">1474: </a><font color="#B22222">@*/</font>
+<a name="line1475">1475: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetLocking"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool lock)</font></strong>
+<a name="line1476">1476: </a>{
+
+<a name="line1482">1482: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSSetLocking_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool),(nep,lock));
+<a name="line1483">1483: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1484">1484: </a>}
+
+<a name="line1488">1488: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetLocking_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetLocking_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *lock)</font></strong>
+<a name="line1489">1489: </a>{
+<a name="line1490">1490: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1493">1493: </a>  *lock = ctx->lock;
+<a name="line1494">1494: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1495">1495: </a>}
+
+<a name="line1499">1499: </a><font color="#B22222">/*@</font>
+<a name="line1500">1500: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetLocking.html#NEPNLEIGSGetLocking">NEPNLEIGSGetLocking</a> - Gets the locking flag used in the NLEIGS method.</font>
+
+<a name="line1502">1502: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1504">1504: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1505">1505: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1507">1507: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1508">1508: </a><font color="#B22222">.  lock - the locking flag</font>
+
+<a name="line1510">1510: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1512">1512: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</a>()</font>
+<a name="line1513">1513: </a><font color="#B22222">@*/</font>
+<a name="line1514">1514: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetLocking"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetLocking.html#NEPNLEIGSGetLocking">NEPNLEIGSGetLocking</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *lock)</font></strong>
+<a name="line1515">1515: </a>{
+
+<a name="line1521">1521: </a>  PetscUseMethod(nep,<font color="#666666">"NEPNLEIGSGetLocking_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*),(nep,lock));
+<a name="line1522">1522: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1523">1523: </a>}
+
+<a name="line1527">1527: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetInterpolation_NLEIGS"></a>static PetscErrorCode NEPNLEIGSSetInterpolation_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line1528">1528: </a>{
+<a name="line1529">1529: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1532">1532: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
+<a name="line1533">1533: </a>    ctx->ddtol = PETSC_DEFAULT;
+<a name="line1534">1534: </a>    nep->state = NEP_STATE_INITIAL;
+<a name="line1535">1535: </a>  } <font color="#4169E1">else</font> {
+<a name="line1536">1536: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line1537">1537: </a>    ctx->ddtol = tol;
+<a name="line1538">1538: </a>  }
+<a name="line1539">1539: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+<a name="line1540">1540: </a>    ctx->ddmaxit = 0;
+<a name="line1541">1541: </a>    nep->state   = NEP_STATE_INITIAL;
+<a name="line1542">1542: </a>  } <font color="#4169E1">else</font> {
+<a name="line1543">1543: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
+<a name="line1544">1544: </a>    ctx->ddmaxit = maxits;
+<a name="line1545">1545: </a>  }
+<a name="line1546">1546: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1547">1547: </a>}
+
+<a name="line1551">1551: </a><font color="#B22222">/*@</font>
+<a name="line1552">1552: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a> - Sets the tolerance and maximum iteration count used</font>
+<a name="line1553">1553: </a><font color="#B22222">   by the NLEIGS method when building the interpolation via divided differences.</font>
+
+<a name="line1555">1555: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1557">1557: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1558">1558: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line1559">1559: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
+<a name="line1560">1560: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
+
+<a name="line1562">1562: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1563">1563: </a><font color="#B22222">+  -nep_nleigs_interpolation_tol <tol> - Sets the convergence tolerance</font>
+<a name="line1564">1564: </a><font color="#B22222">-  -nep_nleigs_interpolation_max_it <maxits> - Sets the maximum number of iterations</font>
+
+<a name="line1566">1566: </a><font color="#B22222">   Notes:</font>
+<a name="line1567">1567: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
+
+<a name="line1569">1569: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1571">1571: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html#NEPNLEIGSGetInterpolation">NEPNLEIGSGetInterpolation</a>()</font>
+<a name="line1572">1572: </a><font color="#B22222">@*/</font>
+<a name="line1573">1573: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetInterpolation"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line1574">1574: </a>{
+
+<a name="line1581">1581: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSSetInterpolation_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal,PetscInt),(nep,tol,maxits));
+<a name="line1582">1582: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1583">1583: </a>}
+
+<a name="line1587">1587: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetInterpolation_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetInterpolation_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line1588">1588: </a>{
+<a name="line1589">1589: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1592">1592: </a>  <font color="#4169E1">if</font> (tol)    *tol    = ctx->ddtol;
+<a name="line1593">1593: </a>  <font color="#4169E1">if</font> (maxits) *maxits = ctx->ddmaxit;
+<a name="line1594">1594: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1595">1595: </a>}
+
+<a name="line1599">1599: </a><font color="#B22222">/*@</font>
+<a name="line1600">1600: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html#NEPNLEIGSGetInterpolation">NEPNLEIGSGetInterpolation</a> - Gets the tolerance and maximum iteration count used</font>
+<a name="line1601">1601: </a><font color="#B22222">   by the NLEIGS method when building the interpolation via divided differences.</font>
+
+<a name="line1603">1603: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1605">1605: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1606">1606: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1608">1608: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1609">1609: </a><font color="#B22222">+  tol    - the convergence tolerance</font>
+<a name="line1610">1610: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
+
+<a name="line1612">1612: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1614">1614: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a>()</font>
+<a name="line1615">1615: </a><font color="#B22222">@*/</font>
+<a name="line1616">1616: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetInterpolation"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html#NEPNLEIGSGetInterpolation">NEPNLEIGSGetInterpolation</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line1617">1617: </a>{
+
+<a name="line1622">1622: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSGetInterpolation_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscReal*,PetscInt*),(nep,tol,maxits));
+<a name="line1623">1623: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1624">1624: </a>}
+
+<a name="line1628">1628: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetTrueResidual_NLEIGS"></a>static PetscErrorCode NEPNLEIGSSetTrueResidual_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool trueres)</font></strong>
+<a name="line1629">1629: </a>{
+<a name="line1630">1630: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1633">1633: </a>  ctx->trueres = trueres;
+<a name="line1634">1634: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1635">1635: </a>}
+
+<a name="line1639">1639: </a><font color="#B22222">/*@</font>
+<a name="line1640">1640: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</a> - Specifies if the solver must compute the true residual</font>
+<a name="line1641">1641: </a><font color="#B22222">   explicitly or not.</font>
+
+<a name="line1643">1643: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1645">1645: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1646">1646: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line1647">1647: </a><font color="#B22222">-  trueres - whether true residuals are required or not</font>
+
+<a name="line1649">1649: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1650">1650: </a><font color="#B22222">.  -nep_nleigs_true_residual <boolean> - Sets/resets the boolean flag 'trueres'</font>
+
+<a name="line1652">1652: </a><font color="#B22222">   Notes:</font>
+<a name="line1653">1653: </a><font color="#B22222">   If the user sets trueres=PETSC_TRUE then the solver explicitly computes</font>
+<a name="line1654">1654: </a><font color="#B22222">   the true residual norm for each eigenpair approximation, and uses it for</font>
+<a name="line1655">1655: </a><font color="#B22222">   convergence testing. The default is to use the cheaper approximation </font>
+<a name="line1656">1656: </a><font color="#B22222">   available from the (rational) Krylov iteration.</font>
+
+<a name="line1658">1658: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1660">1660: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html#NEPNLEIGSGetTrueResidual">NEPNLEIGSGetTrueResidual</a>()</font>
+<a name="line1661">1661: </a><font color="#B22222">@*/</font>
+<a name="line1662">1662: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetTrueResidual"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool trueres)</font></strong>
+<a name="line1663">1663: </a>{
+
+<a name="line1669">1669: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSSetTrueResidual_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool),(nep,trueres));
+<a name="line1670">1670: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1671">1671: </a>}
+
+<a name="line1675">1675: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetTrueResidual_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetTrueResidual_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *trueres)</font></strong>
+<a name="line1676">1676: </a>{
+<a name="line1677">1677: </a>  NEP_NLEIGS *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1680">1680: </a>  *trueres = ctx->trueres;
+<a name="line1681">1681: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1682">1682: </a>}
+
+<a name="line1686">1686: </a><font color="#B22222">/*@</font>
+<a name="line1687">1687: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html#NEPNLEIGSGetTrueResidual">NEPNLEIGSGetTrueResidual</a> - Returns the flag indicating whether true</font>
+<a name="line1688">1688: </a><font color="#B22222">   residuals must be computed explicitly or not.</font>
+
+<a name="line1690">1690: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1692">1692: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1693">1693: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1695">1695: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1696">1696: </a><font color="#B22222">.  trueres - the returned flag</font>
+
+<a name="line1698">1698: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1700">1700: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</a>()</font>
+<a name="line1701">1701: </a><font color="#B22222">@*/</font>
+<a name="line1702">1702: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetTrueResidual"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetTrueResidual.html#NEPNLEIGSGetTrueResidual">NEPNLEIGSGetTrueResidual</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *trueres)</font></strong>
+<a name="line1703">1703: </a>{
+
+<a name="line1709">1709: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSGetTrueResidual_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*),(nep,trueres));
+<a name="line1710">1710: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1711">1711: </a>}
+
+<a name="line1715">1715: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetRKShifts_NLEIGS"></a>static PetscErrorCode NEPNLEIGSSetRKShifts_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ns,PetscScalar *shifts)</font></strong>
+<a name="line1716">1716: </a>{
+<a name="line1718">1718: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line1719">1719: </a>  PetscInt       i;
+
+<a name="line1722">1722: </a>  <font color="#4169E1">if</font> (ns<=0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,<font color="#666666">"Number of shifts must be positive"</font>);
+<a name="line1723">1723: </a>  <font color="#4169E1">if</font> (ctx->nshifts) { PetscFree(ctx->shifts); }
+<a name="line1724">1724: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->nshiftsw;i++) { KSPDestroy(&ctx->ksp[i]); }
+<a name="line1725">1725: </a>  PetscFree(ctx->ksp);
+<a name="line1726">1726: </a>  ctx->ksp = NULL;
+<a name="line1727">1727: </a>  PetscMalloc(ns,&ctx->shifts);
+<a name="line1728">1728: </a>  <font color="#4169E1">for</font> (i=0;i<ns;i++) ctx->shifts[i] = shifts[i];
+<a name="line1729">1729: </a>  ctx->nshifts = ns;
+<a name="line1730">1730: </a>  nep->state   = NEP_STATE_INITIAL;
+<a name="line1731">1731: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1732">1732: </a>}
+
+<a name="line1736">1736: </a><font color="#B22222">/*@C</font>
+<a name="line1737">1737: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</a> - Sets a list of shifts to be used in the Rational</font>
+<a name="line1738">1738: </a><font color="#B22222">   Krylov method.</font>
+
+<a name="line1740">1740: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1742">1742: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1743">1743: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line1744">1744: </a><font color="#B22222">.  ns     - number of shifts</font>
+<a name="line1745">1745: </a><font color="#B22222">-  shifts - array of scalar values specifying the shifts</font>
+
+<a name="line1747">1747: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1748">1748: </a><font color="#B22222">.  -nep_nleigs_rk_shifts - Sets the list of shifts</font>
+
+<a name="line1750">1750: </a><font color="#B22222">   Notes:</font>
+<a name="line1751">1751: </a><font color="#B22222">   If only one shift is provided, the subspace is built with the simpler</font>
+<a name="line1752">1752: </a><font color="#B22222">   shift-and-invert Krylov-Schur.</font>
+
+<a name="line1754">1754: </a><font color="#B22222">   In the case of real scalars, complex shifts are not allowed. In the</font>
+<a name="line1755">1755: </a><font color="#B22222">   command line, a comma-separated list of complex values can be provided with</font>
+<a name="line1756">1756: </a><font color="#B22222">   the format [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
+<a name="line1757">1757: </a><font color="#B22222">   -nep_nleigs_rk_shifts 1.0+2.0i,1.5+2.0i,1.0+1.5i</font>
+
+<a name="line1759">1759: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1761">1761: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html#NEPNLEIGSGetRKShifts">NEPNLEIGSGetRKShifts</a>()</font>
+<a name="line1762">1762: </a><font color="#B22222">@*/</font>
+<a name="line1763">1763: </a><strong><font color="#4169E1"><a name="NEPNLEIGSSetRKShifts"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt ns,PetscScalar *shifts)</font></strong>
+<a name="line1764">1764: </a>{
+
+<a name="line1771">1771: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSSetRKShifts_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscScalar*),(nep,ns,shifts));
+<a name="line1772">1772: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1773">1773: </a>}
+
+<a name="line1777">1777: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetRKShifts_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetRKShifts_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *ns,PetscScalar **shifts)</font></strong>
+<a name="line1778">1778: </a>{
+<a name="line1780">1780: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line1781">1781: </a>  PetscInt       i;
+
+<a name="line1784">1784: </a>  *ns = ctx->nshifts;
+<a name="line1785">1785: </a>  <font color="#4169E1">if</font> (ctx->nshifts) {
+<a name="line1786">1786: </a>    PetscMalloc1(ctx->nshifts,shifts);
+<a name="line1787">1787: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nshifts;i++) (*shifts)[i] = ctx->shifts[i];
+<a name="line1788">1788: </a>  }
+<a name="line1789">1789: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1790">1790: </a>}
+
+<a name="line1794">1794: </a><font color="#B22222">/*@C</font>
+<a name="line1795">1795: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html#NEPNLEIGSGetRKShifts">NEPNLEIGSGetRKShifts</a> - Gets the list of shifts used in the Rational</font>
+<a name="line1796">1796: </a><font color="#B22222">   Krylov method.</font>
+
+<a name="line1798">1798: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1800">1800: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1801">1801: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1803">1803: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1804">1804: </a><font color="#B22222">+  ns     - number of shifts</font>
+<a name="line1805">1805: </a><font color="#B22222">-  shifts - array of shifts</font>
+
+<a name="line1807">1807: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1809">1809: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</a>()</font>
+<a name="line1810">1810: </a><font color="#B22222">@*/</font>
+<a name="line1811">1811: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetRKShifts"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetRKShifts.html#NEPNLEIGSGetRKShifts">NEPNLEIGSGetRKShifts</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *ns,PetscScalar **shifts)</font></strong>
+<a name="line1812">1812: </a>{
+
+<a name="line1819">1819: </a>  PetscTryMethod(nep,<font color="#666666">"NEPNLEIGSGetRKShifts_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*,PetscScalar**),(nep,ns,shifts));
+<a name="line1820">1820: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1821">1821: </a>}
+
+<a name="line1823">1823: </a><strong><font color="#228B22">#define SHIFTMAX 30</font></strong>
+
+<a name="line1827">1827: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_NLEIGS"></a>PetscErrorCode NEPSetFromOptions_NLEIGS(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1828">1828: </a>{
+<a name="line1830">1830: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+<a name="line1831">1831: </a>  PetscInt       i,k;
+<a name="line1832">1832: </a>  PetscBool      flg1,flg2,b;
+<a name="line1833">1833: </a>  PetscReal      r;
+<a name="line1834">1834: </a>  PetscScalar    array[SHIFTMAX];
+<a name="line1835">1835: </a>  PC             pc;
+<a name="line1836">1836: </a>  PCType         pctype;
+<a name="line1837">1837: </a>  KSPType        ksptype;
+
+<a name="line1840">1840: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> NLEIGS Options"</font>);
+<a name="line1841">1841: </a>  PetscOptionsReal(<font color="#666666">"-nep_nleigs_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</a>"</font>,0.5,&r,&flg1);
+<a name="line1842">1842: </a>  <font color="#4169E1">if</font> (flg1) {
+<a name="line1843">1843: </a>    <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRestart.html#NEPNLEIGSSetRestart">NEPNLEIGSSetRestart</a>(nep,r);
+<a name="line1844">1844: </a>  }
+<a name="line1845">1845: </a>  PetscOptionsBool(<font color="#666666">"-nep_nleigs_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</a>"</font>,PETSC_FALSE,&b,&flg1);
+<a name="line1846">1846: </a>  <font color="#4169E1">if</font> (flg1) {
+<a name="line1847">1847: </a>    <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetLocking.html#NEPNLEIGSSetLocking">NEPNLEIGSSetLocking</a>(nep,b);
+<a name="line1848">1848: </a>  }
+<a name="line1849">1849: </a>  PetscOptionsBool(<font color="#666666">"-nep_nleigs_true_residual"</font>,<font color="#666666">"Compute true residuals explicitly"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</a>"</font>,PETSC_FALSE,&b,&flg1);
+<a name="line1850">1850: </a>  <font color="#4169E1">if</font> (flg1) {
+<a name="line1851">1851: </a>    <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetTrueResidual.html#NEPNLEIGSSetTrueResidual">NEPNLEIGSSetTrueResidual</a>(nep,b);
+<a name="line1852">1852: </a>  }
+<a name="line1853">1853: </a>  <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetInterpolation.html#NEPNLEIGSGetInterpolation">NEPNLEIGSGetInterpolation</a>(nep,&r,&i);
+<a name="line1854">1854: </a>  <font color="#4169E1">if</font> (!i) i = PETSC_DEFAULT;
+<a name="line1855">1855: </a>  PetscOptionsInt(<font color="#666666">"-nep_nleigs_interpolation_max_it"</font>,<font color="#666666">"Maximum number of terms for interpolation via divided differences"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a>"</font>,i,&i,&flg1);
+<a name="line1856">1856: </a>  PetscOptionsReal(<font color="#666666">"-nep_nleigs_interpolation_tol"</font>,<font color="#666666">"Tolerance for interpolation via divided differences"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a>"</font>,r,&r,&flg2);
+<a name="line1857">1857: </a>  <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line1858">1858: </a>    <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetInterpolation.html#NEPNLEIGSSetInterpolation">NEPNLEIGSSetInterpolation</a>(nep,r,i);
+<a name="line1859">1859: </a>  }
+<a name="line1860">1860: </a>  k = SHIFTMAX;
+<a name="line1861">1861: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
+<a name="line1862">1862: </a>  PetscOptionsScalarArray(<font color="#666666">"-nep_nleigs_rk_shifts"</font>,<font color="#666666">"Shifts for Rational Krylov"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</a>"</font>,array,&k,&flg1);
+<a name="line1863">1863: </a>  <font color="#4169E1">if</font> (flg1) {
+<a name="line1864">1864: </a>    <a href="../../../../docs/manualpages/NEP/NEPNLEIGSSetRKShifts.html#NEPNLEIGSSetRKShifts">NEPNLEIGSSetRKShifts</a>(nep,k,array);
+<a name="line1865">1865: </a>  }
+
+<a name="line1867">1867: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(nep,&ctx->ksp); }
+<a name="line1868">1868: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->nshiftsw;i++) {
+<a name="line1869">1869: </a>    KSPGetPC(ctx->ksp[i],&pc);
+<a name="line1870">1870: </a>    KSPGetType(ctx->ksp[i],&ksptype);
+<a name="line1871">1871: </a>    PCGetType(pc,&pctype);
+<a name="line1872">1872: </a>    <font color="#4169E1">if</font> (!pctype && !ksptype) {
+<a name="line1873">1873: </a>      KSPSetType(ctx->ksp[i],KSPPREONLY);
+<a name="line1874">1874: </a>      PCSetType(pc,PCLU);
+<a name="line1875">1875: </a>    }
+<a name="line1876">1876: </a>    KSPSetOperators(ctx->ksp[i],nep->function,nep->function_pre);
+<a name="line1877">1877: </a>    KSPSetFromOptions(ctx->ksp[i]);
+<a name="line1878">1878: </a>  }
+<a name="line1879">1879: </a>  PetscOptionsTail();
+<a name="line1880">1880: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1881">1881: </a>}
+
+<a name="line1885">1885: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetKSPs_NLEIGS"></a>static PetscErrorCode NEPNLEIGSGetKSPs_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP **ksp)</font></strong>
+<a name="line1886">1886: </a>{
+<a name="line1888">1888: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+<a name="line1889">1889: </a>  PetscInt       i;
+
+<a name="line1892">1892: </a>  <font color="#4169E1">if</font> (!ctx->ksp) {
+<a name="line1893">1893: </a>    NEPNLEIGSSetShifts(nep);
+<a name="line1894">1894: </a>    PetscMalloc1(ctx->nshiftsw,&ctx->ksp);
+<a name="line1895">1895: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nshiftsw;i++) {
+<a name="line1896">1896: </a>      KSPCreate(PetscObjectComm((PetscObject)nep),&ctx->ksp[i]);
+<a name="line1897">1897: </a>      KSPSetOptionsPrefix(ctx->ksp[i],((PetscObject)nep)->prefix);
+<a name="line1898">1898: </a>      KSPAppendOptionsPrefix(ctx->ksp[i],<font color="#666666">"nep_nleigs_"</font>);
+<a name="line1899">1899: </a>      PetscObjectIncrementTabLevel((PetscObject)ctx->ksp[i],(PetscObject)nep,1);
+<a name="line1900">1900: </a>      PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp[i]);
+<a name="line1901">1901: </a>      KSPSetErrorIfNotConverged(ctx->ksp[i],PETSC_TRUE);
+<a name="line1902">1902: </a>    }
+<a name="line1903">1903: </a>  }
+<a name="line1904">1904: </a>  *ksp = ctx->ksp;
+<a name="line1905">1905: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1906">1906: </a>}
+
+<a name="line1910">1910: </a><font color="#B22222">/*@C</font>
+<a name="line1911">1911: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a> - Retrieve the array of linear solver objects associated with</font>
+<a name="line1912">1912: </a><font color="#B22222">   the nonlinear eigenvalue solver.</font>
+
+<a name="line1914">1914: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1916">1916: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1917">1917: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line1919">1919: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1920">1920: </a><font color="#B22222">.  ksp - array of linear solver object</font>
+
+<a name="line1922">1922: </a><font color="#B22222">   Level: advanced</font>
+<a name="line1923">1923: </a><font color="#B22222">@*/</font>
+<a name="line1924">1924: </a><strong><font color="#4169E1"><a name="NEPNLEIGSGetKSPs"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP **ksp)</font></strong>
+<a name="line1925">1925: </a>{
+
+<a name="line1931">1931: </a>  PetscUseMethod(nep,<font color="#666666">"NEPNLEIGSGetKSPs_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP**),(nep,ksp));
+<a name="line1932">1932: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1933">1933: </a>}
+
+<a name="line1937">1937: </a><strong><font color="#4169E1"><a name="NEPView_NLEIGS"></a>PetscErrorCode NEPView_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line1938">1938: </a>{
+<a name="line1940">1940: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+<a name="line1941">1941: </a>  PetscBool      isascii;
+<a name="line1942">1942: </a>  PetscInt       i;
+<a name="line1943">1943: </a>  char           str[50];
+
+<a name="line1946">1946: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line1947">1947: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line1948">1948: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  NLEIGS: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
+<a name="line1949">1949: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  NLEIGS: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
+<a name="line1950">1950: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  NLEIGS: maximum number of divided difference terms: %D\n"</font>,ctx->ddmaxit);
+<a name="line1951">1951: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  NLEIGS: tolerance for divided difference convergence: %g\n"</font>,(double)ctx->ddtol);
+<a name="line1952">1952: </a>    <font color="#4169E1">if</font> (ctx->nshifts) {
+<a name="line1953">1953: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  NLEIGS: RK shifts: "</font>);
+<a name="line1954">1954: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line1955">1955: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nshifts;i++) {
+<a name="line1956">1956: </a>        <a href="../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->shifts[i],PETSC_FALSE);
+<a name="line1957">1957: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s%s"</font>,str,(i<ctx->nshifts-1)?<font color="#666666">","</font>:<font color="#666666">""</font>);
+<a name="line1958">1958: </a>      }
+<a name="line1959">1959: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line1960">1960: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line1961">1961: </a>    }
+<a name="line1962">1962: </a>    <font color="#4169E1">if</font> (ctx->trueres) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"  NLEIGS: computing true residuals for convergence check\n"</font>); }
+<a name="line1963">1963: </a>    <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPNLEIGSGetKSPs.html#NEPNLEIGSGetKSPs">NEPNLEIGSGetKSPs</a>(nep,&ctx->ksp); }
+<a name="line1964">1964: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line1965">1965: </a>    KSPView(ctx->ksp[0],viewer);
+<a name="line1966">1966: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line1967">1967: </a>  }
+<a name="line1968">1968: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1969">1969: </a>}
+
+<a name="line1973">1973: </a><strong><font color="#4169E1"><a name="NEPReset_NLEIGS"></a>PetscErrorCode NEPReset_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1974">1974: </a>{
+<a name="line1976">1976: </a>  PetscInt       k;
+<a name="line1977">1977: </a>  NEP_NLEIGS     *ctx=(NEP_NLEIGS*)nep->data;
+
+<a name="line1980">1980: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line1981">1981: </a>    PetscFree(ctx->coeffD);
+<a name="line1982">1982: </a>  } <font color="#4169E1">else</font> {
+<a name="line1983">1983: </a>    <font color="#4169E1">for</font> (k=0;k<ctx->nmat;k++) { MatDestroy(&ctx->D[k]); }
+<a name="line1984">1984: </a>  }
+<a name="line1985">1985: </a>  <font color="#4169E1">if</font> (ctx->vrn) {
+<a name="line1986">1986: </a>    VecDestroy(&ctx->vrn);
+<a name="line1987">1987: </a>  }
+<a name="line1988">1988: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1989">1989: </a>}
+
+<a name="line1993">1993: </a><strong><font color="#4169E1"><a name="NEPDestroy_NLEIGS"></a>PetscErrorCode NEPDestroy_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line1994">1994: </a>{
+<a name="line1996">1996: </a>  PetscInt       k;
+<a name="line1997">1997: </a>  NEP_NLEIGS     *ctx = (NEP_NLEIGS*)nep->data;
+
+<a name="line2000">2000: </a>  <font color="#4169E1">for</font> (k=0;k<ctx->nshiftsw;k++) { KSPDestroy(&ctx->ksp[k]); }
+<a name="line2001">2001: </a>  PetscFree(ctx->ksp);
+<a name="line2002">2002: </a>  <font color="#4169E1">if</font> (ctx->nshifts) { PetscFree(ctx->shifts); }
+<a name="line2003">2003: </a>  PetscFree4(ctx->s,ctx->xi,ctx->beta,ctx->D);
+<a name="line2004">2004: </a>  PetscFree(nep->data);
+<a name="line2005">2005: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetSingularitiesFunction_C"</font>,NULL);
+<a name="line2006">2006: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetSingularitiesFunction_C"</font>,NULL);
+<a name="line2007">2007: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetRestart_C"</font>,NULL);
+<a name="line2008">2008: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetRestart_C"</font>,NULL);
+<a name="line2009">2009: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetLocking_C"</font>,NULL);
+<a name="line2010">2010: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetLocking_C"</font>,NULL);
+<a name="line2011">2011: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetInterpolation_C"</font>,NULL);
+<a name="line2012">2012: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetInterpolation_C"</font>,NULL);
+<a name="line2013">2013: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetTrueResidual_C"</font>,NULL);
+<a name="line2014">2014: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetTrueResidual_C"</font>,NULL);
+<a name="line2015">2015: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetRKShifts_C"</font>,NULL);
+<a name="line2016">2016: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetRKShifts_C"</font>,NULL);
+<a name="line2017">2017: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetKSPs_C"</font>,NULL);
+<a name="line2018">2018: </a>  <font color="#4169E1">return</font>(0);
+<a name="line2019">2019: </a>}
+
+<a name="line2023">2023: </a><strong><font color="#4169E1"><a name="NEPCreate_NLEIGS"></a>PETSC_EXTERN PetscErrorCode NEPCreate_NLEIGS(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line2024">2024: </a>{
+<a name="line2026">2026: </a>  NEP_NLEIGS     *ctx;
+
+<a name="line2029">2029: </a>  PetscNewLog(nep,&ctx);
+<a name="line2030">2030: </a>  nep->data = (void*)ctx;
+<a name="line2031">2031: </a>  ctx->lock    = PETSC_TRUE;
+<a name="line2032">2032: </a>  ctx->ddtol   = PETSC_DEFAULT;
+<a name="line2033">2033: </a>  ctx->ddmaxit = 0;
+<a name="line2034">2034: </a>  ctx->trueres = PETSC_FALSE;
+<a name="line2035">2035: </a>  ctx->nshifts = 0;
+
+<a name="line2037">2037: </a>  nep->ops->solve          = NEPSolve_NLEIGS;
+<a name="line2038">2038: </a>  nep->ops->setup          = NEPSetUp_NLEIGS;
+<a name="line2039">2039: </a>  nep->ops->setfromoptions = NEPSetFromOptions_NLEIGS;
+<a name="line2040">2040: </a>  nep->ops->view           = NEPView_NLEIGS;
+<a name="line2041">2041: </a>  nep->ops->destroy        = NEPDestroy_NLEIGS;
+<a name="line2042">2042: </a>  nep->ops->reset          = NEPReset_NLEIGS;
+<a name="line2043">2043: </a>  nep->ops->computevectors = NEPComputeVectors_Schur;
+<a name="line2044">2044: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetSingularitiesFunction_C"</font>,NEPNLEIGSSetSingularitiesFunction_NLEIGS);
+<a name="line2045">2045: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetSingularitiesFunction_C"</font>,NEPNLEIGSGetSingularitiesFunction_NLEIGS);
+<a name="line2046">2046: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetRestart_C"</font>,NEPNLEIGSSetRestart_NLEIGS);
+<a name="line2047">2047: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetRestart_C"</font>,NEPNLEIGSGetRestart_NLEIGS);
+<a name="line2048">2048: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetLocking_C"</font>,NEPNLEIGSSetLocking_NLEIGS);
+<a name="line2049">2049: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetLocking_C"</font>,NEPNLEIGSGetLocking_NLEIGS);
+<a name="line2050">2050: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetInterpolation_C"</font>,NEPNLEIGSSetInterpolation_NLEIGS);
+<a name="line2051">2051: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetInterpolation_C"</font>,NEPNLEIGSGetInterpolation_NLEIGS);
+<a name="line2052">2052: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetTrueResidual_C"</font>,NEPNLEIGSSetTrueResidual_NLEIGS);
+<a name="line2053">2053: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetTrueResidual_C"</font>,NEPNLEIGSGetTrueResidual_NLEIGS);
+<a name="line2054">2054: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSSetRKShifts_C"</font>,NEPNLEIGSSetRKShifts_NLEIGS);
+<a name="line2055">2055: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetRKShifts_C"</font>,NEPNLEIGSGetRKShifts_NLEIGS);
+<a name="line2056">2056: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPNLEIGSGetKSPs_C"</font>,NEPNLEIGSGetKSPs_NLEIGS);
+<a name="line2057">2057: </a>  <font color="#4169E1">return</font>(0);
+<a name="line2058">2058: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/nep/impls/rii/ftn-auto/makefile b/src/nep/impls/rii/ftn-auto/makefile
new file mode 100644
index 0000000..7c33edd
--- /dev/null
+++ b/src/nep/impls/rii/ftn-auto/makefile
@@ -0,0 +1,13 @@
+
+#requiresdefine   'PETSC_HAVE_FORTRAN'
+ALL: lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = riif.c
+SOURCEF  =
+SOURCEH  = 
+DIRS     =
+LIBBASE  = libslepcnep
+LOCDIR   = src/nep/impls/rii/ftn-auto/
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
diff --git a/src/nep/impls/rii/ftn-auto/riif.c b/src/nep/impls/rii/ftn-auto/riif.c
new file mode 100644
index 0000000..25309fd
--- /dev/null
+++ b/src/nep/impls/rii/ftn-auto/riif.c
@@ -0,0 +1,112 @@
+#include "petscsys.h"
+#include "petscfix.h"
+#include "petsc/private/fortranimpl.h"
+/* rii.c */
+/* Fortran interface file */
+
+/*
+* This file was generated automatically by bfort from the C source
+* file.  
+ */
+
+#ifdef PETSC_USE_POINTER_CONVERSION
+#if defined(__cplusplus)
+extern "C" { 
+#endif 
+extern void *PetscToPointer(void*);
+extern int PetscFromPointer(void *);
+extern void PetscRmPointer(void*);
+#if defined(__cplusplus)
+} 
+#endif 
+
+#else
+
+#define PetscToPointer(a) (*(PetscFortranAddr *)(a))
+#define PetscFromPointer(a) (PetscFortranAddr)(a)
+#define PetscRmPointer(a)
+#endif
+
+#include "slepcnep.h"
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriisetmaximumiterations_ NEPRIISETMAXIMUMITERATIONS
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriisetmaximumiterations_ nepriisetmaximumiterations
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriigetmaximumiterations_ NEPRIIGETMAXIMUMITERATIONS
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriigetmaximumiterations_ nepriigetmaximumiterations
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriisetlagpreconditioner_ NEPRIISETLAGPRECONDITIONER
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriisetlagpreconditioner_ nepriisetlagpreconditioner
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriigetlagpreconditioner_ NEPRIIGETLAGPRECONDITIONER
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriigetlagpreconditioner_ nepriigetlagpreconditioner
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriisetconstcorrectiontol_ NEPRIISETCONSTCORRECTIONTOL
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriisetconstcorrectiontol_ nepriisetconstcorrectiontol
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriigetconstcorrectiontol_ NEPRIIGETCONSTCORRECTIONTOL
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriigetconstcorrectiontol_ nepriigetconstcorrectiontol
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriisetksp_ NEPRIISETKSP
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriisetksp_ nepriisetksp
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define nepriigetksp_ NEPRIIGETKSP
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define nepriigetksp_ nepriigetksp
+#endif
+
+
+/* Definitions of Fortran Wrapper routines */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+PETSC_EXTERN void PETSC_STDCALL  nepriisetmaximumiterations_(NEP nep,PetscInt *its, int *__ierr ){
+*__ierr = NEPRIISetMaximumIterations(
+	(NEP)PetscToPointer((nep) ),*its);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriigetmaximumiterations_(NEP nep,PetscInt *its, int *__ierr ){
+*__ierr = NEPRIIGetMaximumIterations(
+	(NEP)PetscToPointer((nep) ),its);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriisetlagpreconditioner_(NEP nep,PetscInt *lag, int *__ierr ){
+*__ierr = NEPRIISetLagPreconditioner(
+	(NEP)PetscToPointer((nep) ),*lag);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriigetlagpreconditioner_(NEP nep,PetscInt *lag, int *__ierr ){
+*__ierr = NEPRIIGetLagPreconditioner(
+	(NEP)PetscToPointer((nep) ),lag);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriisetconstcorrectiontol_(NEP nep,PetscBool *cct, int *__ierr ){
+*__ierr = NEPRIISetConstCorrectionTol(
+	(NEP)PetscToPointer((nep) ),*cct);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriigetconstcorrectiontol_(NEP nep,PetscBool *cct, int *__ierr ){
+*__ierr = NEPRIIGetConstCorrectionTol(
+	(NEP)PetscToPointer((nep) ),cct);
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriisetksp_(NEP nep,KSP ksp, int *__ierr ){
+*__ierr = NEPRIISetKSP(
+	(NEP)PetscToPointer((nep) ),
+	(KSP)PetscToPointer((ksp) ));
+}
+PETSC_EXTERN void PETSC_STDCALL  nepriigetksp_(NEP nep,KSP *ksp, int *__ierr ){
+*__ierr = NEPRIIGetKSP(
+	(NEP)PetscToPointer((nep) ),ksp);
+}
+#if defined(__cplusplus)
+}
+#endif
diff --git a/src/nep/impls/rii/index.html b/src/nep/impls/rii/index.html
index e61ef67..5792e93 100644
--- a/src/nep/impls/rii/index.html
+++ b/src/nep/impls/rii/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/rii/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/rii/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/impls/rii/makefile b/src/nep/impls/rii/makefile
index be1f7bc..4bf1817 100644
--- a/src/nep/impls/rii/makefile
+++ b/src/nep/impls/rii/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/impls/rii/makefile.html b/src/nep/impls/rii/makefile.html
index 03b8946..74e2695 100644
--- a/src/nep/impls/rii/makefile.html
+++ b/src/nep/impls/rii/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/rii/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:20+00:00">
+<meta name="date" content="2016-05-16T10:34:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/rii/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/rii/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/impls/rii/rii.c b/src/nep/impls/rii/rii.c
index 459c385..30d3693 100644
--- a/src/nep/impls/rii/rii.c
+++ b/src/nep/impls/rii/rii.c
@@ -15,7 +15,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -33,7 +33,29 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 */
 
-#include <slepc/private/nepimpl.h>
+#include <slepc/private/nepimpl.h>         /*I "slepcnep.h" I*/
+
+typedef struct {
+  PetscInt  max_inner_it;     /* maximum number of Newton iterations */
+  PetscInt  lag;              /* interval to rebuild preconditioner */
+  PetscBool cctol;            /* constant correction tolerance */
+  KSP       ksp;              /* linear solver object */
+} NEP_RII;
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRII_KSPSolve"
+PETSC_STATIC_INLINE PetscErrorCode NEPRII_KSPSolve(NEP nep,Vec b,Vec x)
+{
+  PetscErrorCode ierr;
+  PetscInt       lits;
+  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  ierr = KSPSolve(ctx->ksp,b,x);CHKERRQ(ierr);
+  ierr = KSPGetIterationNumber(ctx->ksp,&lits);CHKERRQ(ierr);
+  ierr = PetscInfo2(nep,"iter=%D, linear solve iterations=%D\n",nep->its,lits);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSetUp_RII"
@@ -43,22 +65,13 @@ PetscErrorCode NEPSetUp_RII(NEP nep)
   PetscBool      istrivial;
 
   PetscFunctionBegin;
-  if (nep->ncv) { /* ncv set */
-    if (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must be at least nev");
-  } else if (nep->mpd) { /* mpd set */
-    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-  } else { /* neither set: defaults depend on nev being small or large */
-    if (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-    else {
-      nep->mpd = 500;
-      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-    }
-  }
-  if (!nep->mpd) nep->mpd = nep->ncv;
-  if (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must not be larger than nev+mpd");
-  if (nep->nev>1) { ierr = PetscInfo(nep,"Warning: requested more than one eigenpair but RII can only compute one\n");CHKERRQ(ierr); }
+  if (nep->nev>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Requested several eigenpairs but this solver can compute only one");
+  if (nep->ncv) { ierr = PetscInfo(nep,"Setting ncv = 1, ignoring user-provided value\n");CHKERRQ(ierr); }
+  nep->ncv = 1;
+  if (nep->mpd) { ierr = PetscInfo(nep,"Setting mpd = 1, ignoring user-provided value\n");CHKERRQ(ierr); }
+  nep->mpd = 1;
   if (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-  if (!nep->max_funcs) nep->max_funcs = nep->max_it;
+  if (nep->which && nep->which!=NEP_TARGET_MAGNITUDE) SETERRQ(PetscObjectComm((PetscObject)nep),1,"Wrong value of which");
 
   ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
   if (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"This solver does not support region filtering");
@@ -73,39 +86,48 @@ PetscErrorCode NEPSetUp_RII(NEP nep)
 PetscErrorCode NEPSolve_RII(NEP nep)
 {
   PetscErrorCode     ierr;
+  NEP_RII            *ctx = (NEP_RII*)nep->data;
   Mat                T=nep->function,Tp=nep->jacobian,Tsigma;
   Vec                u,r=nep->work[0],delta=nep->work[1];
-  PetscScalar        lambda,a1,a2;
-  PetscReal          relerr;
+  PetscScalar        lambda,a1,a2,corr;
+  PetscReal          resnorm=1.0,ktol=0.1;
   PetscBool          hascopy;
+  PetscInt           inner_its;
   KSPConvergedReason kspreason;
 
   PetscFunctionBegin;
   /* get initial approximation of eigenvalue and eigenvector */
   ierr = NEPGetDefaultShift(nep,&lambda);CHKERRQ(ierr);
   if (!nep->nini) {
-    ierr = BVSetRandomColumn(nep->V,0,nep->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(nep->V,0);CHKERRQ(ierr);
   }
   ierr = BVGetColumn(nep->V,0,&u);CHKERRQ(ierr);
-
-  /* correct eigenvalue approximation: lambda = lambda - (u'*T*u)/(u'*Tp*u) */
   ierr = NEPComputeFunction(nep,lambda,T,T);CHKERRQ(ierr);
-  ierr = MatMult(T,u,r);CHKERRQ(ierr);
-  ierr = VecDot(u,r,&a1);CHKERRQ(ierr);
-  ierr = NEPApplyJacobian(nep,lambda,u,delta,r,Tp);CHKERRQ(ierr);
-  ierr = VecDot(u,r,&a2);CHKERRQ(ierr);
-  lambda = lambda - a1/a2;
 
   /* prepare linear solver */
+  if (!ctx->ksp) { ierr = NEPRIIGetKSP(nep,&ctx->ksp);CHKERRQ(ierr); }
   ierr = MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);CHKERRQ(ierr);
-  ierr = KSPSetOperators(nep->ksp,Tsigma,Tsigma);CHKERRQ(ierr);
+  ierr = KSPSetOperators(ctx->ksp,Tsigma,Tsigma);CHKERRQ(ierr);
 
   /* Restart loop */
   while (nep->reason == NEP_CONVERGED_ITERATING) {
     nep->its++;
 
+    /* Use Newton's method to compute nonlinear Rayleigh functional. Current eigenvalue 
+       estimate as starting value. */
+    inner_its=0;
+    do {
+      ierr = NEPApplyFunction(nep,lambda,u,delta,r,T,T);CHKERRQ(ierr);
+      ierr = VecDot(r,u,&a1);CHKERRQ(ierr);
+      ierr = NEPApplyJacobian(nep,lambda,u,delta,r,Tp);CHKERRQ(ierr);
+      ierr = VecDot(r,u,&a2);CHKERRQ(ierr);
+      corr = a1/a2;
+      lambda = lambda - corr;
+      inner_its++;
+    } while (PetscAbsScalar(corr)>PETSC_SQRT_MACHINE_EPSILON && inner_its<ctx->max_inner_it);
+
     /* update preconditioner and set adaptive tolerance */
-    if (nep->lag && !(nep->its%nep->lag) && nep->its>2*nep->lag && relerr<1e-2) {
+    if (ctx->lag && !(nep->its%ctx->lag) && nep->its>2*ctx->lag && resnorm<1e-2) {
       ierr = MatHasOperation(T,MATOP_COPY,&hascopy);CHKERRQ(ierr);
       if (hascopy) {
         ierr = MatCopy(T,Tsigma,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
@@ -113,30 +135,30 @@ PetscErrorCode NEPSolve_RII(NEP nep)
         ierr = MatDestroy(&Tsigma);CHKERRQ(ierr);
         ierr = MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);CHKERRQ(ierr);
       }
-      ierr = KSPSetOperators(nep->ksp,Tsigma,Tsigma);CHKERRQ(ierr);
+      ierr = KSPSetOperators(ctx->ksp,Tsigma,Tsigma);CHKERRQ(ierr);
     }
-    if (!nep->cctol) {
-      nep->ktol = PetscMax(nep->ktol/2.0,PETSC_MACHINE_EPSILON*10.0);
-      ierr = KSPSetTolerances(nep->ksp,nep->ktol,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
+    if (!ctx->cctol) {
+      ktol = PetscMax(ktol/2.0,PETSC_MACHINE_EPSILON*10.0);
+      ierr = KSPSetTolerances(ctx->ksp,ktol,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
     }
 
     /* form residual,  r = T(lambda)*u */
     ierr = NEPApplyFunction(nep,lambda,u,delta,r,T,T);CHKERRQ(ierr);
 
     /* convergence test */
-    ierr = VecNorm(r,NORM_2,&relerr);CHKERRQ(ierr);
-    nep->errest[nep->nconv] = relerr;
+    ierr = VecNorm(r,NORM_2,&resnorm);CHKERRQ(ierr);
+    ierr = (*nep->converged)(nep,lambda,0,resnorm,&nep->errest[nep->nconv],nep->convergedctx);CHKERRQ(ierr);
     nep->eigr[nep->nconv] = lambda;
-    if (relerr<=nep->rtol) {
+    if (nep->errest[nep->nconv]<=nep->tol) {
       nep->nconv = nep->nconv + 1;
-      nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
     }
-    ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,1);CHKERRQ(ierr);
+    ierr = (*nep->stopping)(nep,nep->its,nep->max_it,nep->nconv,nep->nev,&nep->reason,nep->stoppingctx);CHKERRQ(ierr);
+    ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->eigi,nep->errest,1);CHKERRQ(ierr);
 
-    if (!nep->nconv) {
+    if (nep->reason == NEP_CONVERGED_ITERATING) {
       /* eigenvector correction: delta = T(sigma)\r */
-      ierr = NEP_KSPSolve(nep,r,delta);CHKERRQ(ierr);
-      ierr = KSPGetConvergedReason(nep->ksp,&kspreason);CHKERRQ(ierr);
+      ierr = NEPRII_KSPSolve(nep,r,delta);CHKERRQ(ierr);
+      ierr = KSPGetConvergedReason(ctx->ksp,&kspreason);CHKERRQ(ierr);
       if (kspreason<0) {
         ierr = PetscInfo1(nep,"iter=%D, linear solve failed, stopping solve\n",nep->its);CHKERRQ(ierr);
         nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
@@ -148,15 +170,7 @@ PetscErrorCode NEPSolve_RII(NEP nep)
 
       /* normalize eigenvector */
       ierr = VecNormalize(u,NULL);CHKERRQ(ierr);
-
-      /* correct eigenvalue: lambda = lambda - (u'*T*u)/(u'*Tp*u) */
-      ierr = NEPApplyFunction(nep,lambda,u,delta,r,T,T);CHKERRQ(ierr);
-      ierr = VecDot(u,r,&a1);CHKERRQ(ierr);
-      ierr = NEPApplyJacobian(nep,lambda,u,delta,r,Tp);CHKERRQ(ierr);
-      ierr = VecDot(u,r,&a2);CHKERRQ(ierr);
-      lambda = lambda - a1/a2;
     }
-    if (nep->its >= nep->max_it) nep->reason = NEP_DIVERGED_MAX_IT;
   }
   ierr = MatDestroy(&Tsigma);CHKERRQ(ierr);
   ierr = BVRestoreColumn(nep->V,0,&u);CHKERRQ(ierr);
@@ -164,12 +178,446 @@ PetscErrorCode NEPSolve_RII(NEP nep)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "NEPSetFromOptions_RII"
+PetscErrorCode NEPSetFromOptions_RII(PetscOptionItems *PetscOptionsObject,NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_RII        *ctx = (NEP_RII*)nep->data;
+  PetscBool      flg;
+  PetscInt       i;
+
+  PetscFunctionBegin;
+  if (!ctx->ksp) { ierr = NEPRIIGetKSP(nep,&ctx->ksp);CHKERRQ(ierr); }
+  ierr = KSPSetOperators(ctx->ksp,nep->function,nep->function_pre);CHKERRQ(ierr);
+  ierr = KSPSetFromOptions(ctx->ksp);CHKERRQ(ierr);
+  ierr = PetscOptionsHead(PetscOptionsObject,"NEP RII Options");CHKERRQ(ierr);
+    ierr = PetscOptionsInt("-nep_rii_max_it","Maximum number of Newton iterations for updating Rayleigh functional","NEPRIISetMaximumIterations",ctx->max_inner_it,&ctx->max_inner_it,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsBool("-nep_rii_const_correction_tol","Constant correction tolerance for the linear solver","NEPRIISetConstCorrectionTol",ctx->cctol,&ctx->cctol,NULL);CHKERRQ(ierr);
+    i = 0;
+    ierr = PetscOptionsInt("-nep_rii_lag_preconditioner","Interval to rebuild preconditioner","NEPRIISetLagPreconditioner",ctx->lag,&i,&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPRIISetLagPreconditioner(nep,i);CHKERRQ(ierr); }
+  ierr = PetscOptionsTail();CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetMaximumIterations_RII"
+static PetscErrorCode NEPRIISetMaximumIterations_RII(NEP nep,PetscInt its)
+{
+  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  ctx->max_inner_it = its;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetMaximumIterations"
+/*@
+   NEPRIISetMaximumIterations - Sets the maximum number of inner iterations to be
+   used in the RII solver. These are the Newton iterations related to the computation
+   of the nonlinear Rayleigh functional.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep - nonlinear eigenvalue solver
+-  its - maximum inner iterations
+
+   Level: advanced
+
+.seealso: NEPRIIGetMaximumIterations()
+@*/
+PetscErrorCode NEPRIISetMaximumIterations(NEP nep,PetscInt its)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveInt(nep,its,2);
+  ierr = PetscTryMethod(nep,"NEPRIISetMaximumIterations_C",(NEP,PetscInt),(nep,its));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetMaximumIterations_RII"
+static PetscErrorCode NEPRIIGetMaximumIterations_RII(NEP nep,PetscInt *its)
+{
+  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  *its = ctx->max_inner_it;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetMaximumIterations"
+/*@
+   NEPRIIGetMaximumIterations - Gets the maximum number of inner iterations of RII.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - nonlinear eigenvalue solver
+
+   Output Parameter:
+.  its - maximum inner iterations
+
+   Level: advanced
+
+.seealso: NEPRIISetMaximumIterations()
+@*/
+PetscErrorCode NEPRIIGetMaximumIterations(NEP nep,PetscInt *its)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(its,2);
+  ierr = PetscUseMethod(nep,"NEPRIIGetMaximumIterations_C",(NEP,PetscInt*),(nep,its));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetLagPreconditioner_RII"
+static PetscErrorCode NEPRIISetLagPreconditioner_RII(NEP nep,PetscInt lag)
+{
+  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  if (lag<0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Lag must be non-negative");
+  ctx->lag = lag;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetLagPreconditioner"
+/*@
+   NEPRIISetLagPreconditioner - Determines when the preconditioner is rebuilt in the
+   nonlinear solve.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep - nonlinear eigenvalue solver
+-   lag - 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is
+          computed within the nonlinear iteration, 2 means every second time
+          the Jacobian is built, etc.
+
+   Options Database Keys:
+.  -nep_rii_lag_preconditioner <lag>
+
+   Notes:
+   The default is 1.
+   The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.
+
+   Level: intermediate
+
+.seealso: NEPRIIGetLagPreconditioner()
+@*/
+PetscErrorCode NEPRIISetLagPreconditioner(NEP nep,PetscInt lag)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveInt(nep,lag,2);
+  ierr = PetscTryMethod(nep,"NEPRIISetLagPreconditioner_C",(NEP,PetscInt),(nep,lag));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetLagPreconditioner_RII"
+static PetscErrorCode NEPRIIGetLagPreconditioner_RII(NEP nep,PetscInt *lag)
+{
+  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  *lag = ctx->lag;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetLagPreconditioner"
+/*@
+   NEPRIIGetLagPreconditioner - Indicates how often the preconditioner is rebuilt.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - nonlinear eigenvalue solver
+
+   Output Parameter:
+.  lag - the lag parameter
+
+   Level: intermediate
+
+.seealso: NEPRIISetLagPreconditioner()
+@*/
+PetscErrorCode NEPRIIGetLagPreconditioner(NEP nep,PetscInt *lag)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(lag,2);
+  ierr = PetscUseMethod(nep,"NEPRIIGetLagPreconditioner_C",(NEP,PetscInt*),(nep,lag));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetConstCorrectionTol_RII"
+static PetscErrorCode NEPRIISetConstCorrectionTol_RII(NEP nep,PetscBool cct)
+{
+  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  ctx->cctol = cct;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetConstCorrectionTol"
+/*@
+   NEPRIISetConstCorrectionTol - Sets a flag to keep the tolerance used
+   in the linear solver constant.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep - nonlinear eigenvalue solver
+-  cct - a boolean value
+
+   Options Database Keys:
+.  -nep_rii_const_correction_tol <bool> - set the boolean flag
+
+   Notes:
+   By default, an exponentially decreasing tolerance is set in the KSP used
+   within the nonlinear iteration, so that each Newton iteration requests
+   better accuracy than the previous one. The constant correction tolerance
+   flag stops this behaviour.
+
+   Level: intermediate
+
+.seealso: NEPRIIGetConstCorrectionTol()
+@*/
+PetscErrorCode NEPRIISetConstCorrectionTol(NEP nep,PetscBool cct)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveInt(nep,cct,2);
+  ierr = PetscTryMethod(nep,"NEPRIISetConstCorrectionTol_C",(NEP,PetscBool),(nep,cct));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetConstCorrectionTol_RII"
+static PetscErrorCode NEPRIIGetConstCorrectionTol_RII(NEP nep,PetscBool *cct)
+{
+  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  *cct = ctx->cctol;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetConstCorrectionTol"
+/*@
+   NEPRIIGetConstCorrectionTol - Returns the constant tolerance flag.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - nonlinear eigenvalue solver
+
+   Output Parameter:
+.  cct - the value of the constant tolerance flag
+
+   Level: intermediate
+
+.seealso: NEPRIISetConstCorrectionTol()
+@*/
+PetscErrorCode NEPRIIGetConstCorrectionTol(NEP nep,PetscBool *cct)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(cct,2);
+  ierr = PetscUseMethod(nep,"NEPRIIGetConstCorrectionTol_C",(NEP,PetscBool*),(nep,cct));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetKSP_RII"
+static PetscErrorCode NEPRIISetKSP_RII(NEP nep,KSP ksp)
+{
+  PetscErrorCode ierr;
+  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectReference((PetscObject)ksp);CHKERRQ(ierr);
+  ierr = KSPDestroy(&ctx->ksp);CHKERRQ(ierr);
+  ctx->ksp = ksp;
+  ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);CHKERRQ(ierr);
+  nep->state = NEP_STATE_INITIAL;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIISetKSP"
+/*@
+   NEPRIISetKSP - Associate a linear solver object (KSP) to the nonlinear
+   eigenvalue solver.
+
+   Collective on NEP
+
+   Input Parameters:
++  nep - eigenvalue solver
+-  ksp - the linear solver object
+
+   Level: advanced
+
+.seealso: NEPRIIGetKSP()
+@*/
+PetscErrorCode NEPRIISetKSP(NEP nep,KSP ksp)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidHeaderSpecific(ksp,KSP_CLASSID,2);
+  PetscCheckSameComm(nep,1,ksp,2);
+  ierr = PetscTryMethod(nep,"NEPRIISetKSP_C",(NEP,KSP),(nep,ksp));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetKSP_RII"
+static PetscErrorCode NEPRIIGetKSP_RII(NEP nep,KSP *ksp)
+{
+  PetscErrorCode ierr;
+  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  if (!ctx->ksp) {
+    ierr = KSPCreate(PetscObjectComm((PetscObject)nep),&ctx->ksp);CHKERRQ(ierr);
+    ierr = KSPSetOptionsPrefix(ctx->ksp,((PetscObject)nep)->prefix);CHKERRQ(ierr);
+    ierr = KSPAppendOptionsPrefix(ctx->ksp,"nep_rii_");CHKERRQ(ierr);
+    ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->ksp,(PetscObject)nep,1);CHKERRQ(ierr);
+    ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);CHKERRQ(ierr);
+    ierr = KSPSetErrorIfNotConverged(ctx->ksp,PETSC_TRUE);CHKERRQ(ierr);
+  }
+  *ksp = ctx->ksp;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPRIIGetKSP"
+/*@
+   NEPRIIGetKSP - Retrieve the linear solver object (KSP) associated with
+   the nonlinear eigenvalue solver.
+
+   Not Collective
+
+   Input Parameter:
+.  nep - nonlinear eigenvalue solver
+
+   Output Parameter:
+.  ksp - the linear solver object
+
+   Level: advanced
+
+.seealso: NEPRIISetKSP()
+@*/
+PetscErrorCode NEPRIIGetKSP(NEP nep,KSP *ksp)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(ksp,2);
+  ierr = PetscUseMethod(nep,"NEPRIIGetKSP_C",(NEP,KSP*),(nep,ksp));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPView_RII"
+PetscErrorCode NEPView_RII(NEP nep,PetscViewer viewer)
+{
+  PetscErrorCode ierr;
+  NEP_RII        *ctx = (NEP_RII*)nep->data;
+  PetscBool      isascii;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!ctx->ksp) { ierr = NEPRIIGetKSP(nep,&ctx->ksp);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPrintf(viewer,"  RII: maximum number of inner iterations: %D\n",ctx->max_inner_it);CHKERRQ(ierr);
+    if (ctx->cctol) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  RII: using a constant tolerance for the linear solver\n");CHKERRQ(ierr);
+    }
+    if (ctx->lag) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  RII: updating the preconditioner every %D iterations\n",ctx->lag);CHKERRQ(ierr);
+    }
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = KSPView(ctx->ksp,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPDestroy_RII"
+PetscErrorCode NEPDestroy_RII(NEP nep)
+{
+  PetscErrorCode ierr;
+  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+  PetscFunctionBegin;
+  ierr = KSPDestroy(&ctx->ksp);CHKERRQ(ierr);
+  ierr = PetscFree(nep->data);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetMaximumIterations_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetMaximumIterations_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetLagPreconditioner_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetLagPreconditioner_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetConstCorrectionTol_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetConstCorrectionTol_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetKSP_C",NULL);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetKSP_C",NULL);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "NEPCreate_RII"
 PETSC_EXTERN PetscErrorCode NEPCreate_RII(NEP nep)
 {
+  PetscErrorCode ierr;
+  NEP_RII        *ctx;
+
   PetscFunctionBegin;
-  nep->ops->solve        = NEPSolve_RII;
-  nep->ops->setup        = NEPSetUp_RII;
+  ierr = PetscNewLog(nep,&ctx);CHKERRQ(ierr);
+  ctx->max_inner_it = 10;
+  ctx->lag          = 1;
+  ctx->cctol        = PETSC_FALSE;
+  nep->data = (void*)ctx;
+
+  nep->ops->solve          = NEPSolve_RII;
+  nep->ops->setup          = NEPSetUp_RII;
+  nep->ops->setfromoptions = NEPSetFromOptions_RII;
+  nep->ops->destroy        = NEPDestroy_RII;
+  nep->ops->view           = NEPView_RII;
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetMaximumIterations_C",NEPRIISetMaximumIterations_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetMaximumIterations_C",NEPRIIGetMaximumIterations_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetLagPreconditioner_C",NEPRIISetLagPreconditioner_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetLagPreconditioner_C",NEPRIIGetLagPreconditioner_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetConstCorrectionTol_C",NEPRIISetConstCorrectionTol_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetConstCorrectionTol_C",NEPRIIGetConstCorrectionTol_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIISetKSP_C",NEPRIISetKSP_RII);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)nep,"NEPRIIGetKSP_C",NEPRIIGetKSP_RII);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/nep/impls/rii/rii.c.html b/src/nep/impls/rii/rii.c.html
index e309c20..1374de7 100644
--- a/src/nep/impls/rii/rii.c.html
+++ b/src/nep/impls/rii/rii.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/rii/rii.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:20+00:00">
+<meta name="date" content="2016-05-16T10:34:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/rii/rii.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/rii/rii.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc nonlinear eigensolver: "rii"</font>
@@ -27,7 +27,7 @@
 
 <a name="line16"> 16: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line17"> 17: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line20"> 20: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,135 +45,491 @@
 <a name="line33"> 33: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line34"> 34: </a><font color="#B22222">*/</font>
 
-<a name="line36"> 36: </a><font color="#A020F0">#include <slepc/private/nepimpl.h></font>
-
-<a name="line40"> 40: </a><strong><font color="#4169E1"><a name="NEPSetUp_RII"></a>PetscErrorCode NEPSetUp_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line41"> 41: </a>{
-<a name="line43"> 43: </a>  PetscBool      istrivial;
-
-<a name="line46"> 46: </a>  <font color="#4169E1">if</font> (nep->ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line47"> 47: </a>    <font color="#4169E1">if</font> (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line48"> 48: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line49"> 49: </a>    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line50"> 50: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
-<a name="line51"> 51: </a>    <font color="#4169E1">if</font> (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-<a name="line52"> 52: </a>    <font color="#4169E1">else</font> {
-<a name="line53"> 53: </a>      nep->mpd = 500;
-<a name="line54"> 54: </a>      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line55"> 55: </a>    }
-<a name="line56"> 56: </a>  }
-<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (!nep->mpd) nep->mpd = nep->ncv;
-<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
-<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (nep->nev>1) { PetscInfo(nep,<font color="#666666">"Warning: requested more than one eigenpair but RII can only compute one\n"</font>); }
-<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (!nep->max_funcs) nep->max_funcs = nep->max_it;
-
-<a name="line63"> 63: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
-<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
-<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,2);
-<a name="line68"> 68: </a>  <font color="#4169E1">return</font>(0);
-<a name="line69"> 69: </a>}
-
-<a name="line73"> 73: </a><strong><font color="#4169E1"><a name="NEPSolve_RII"></a>PetscErrorCode NEPSolve_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line74"> 74: </a>{
-<a name="line75"> 75: </a>  PetscErrorCode     ierr;
-<a name="line76"> 76: </a>  Mat                T=nep->function,Tp=nep->jacobian,Tsigma;
-<a name="line77"> 77: </a>  Vec                u,r=nep->work[0],delta=nep->work[1];
-<a name="line78"> 78: </a>  PetscScalar        lambda,a1,a2;
-<a name="line79"> 79: </a>  PetscReal          relerr;
-<a name="line80"> 80: </a>  PetscBool          hascopy;
-<a name="line81"> 81: </a>  KSPConvergedReason kspreason;
-
-<a name="line84"> 84: </a>  <font color="#B22222">/* get initial approximation of eigenvalue and eigenvector */</font>
-<a name="line85"> 85: </a>  NEPGetDefaultShift(nep,&lambda);
-<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (!nep->nini) {
-<a name="line87"> 87: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,0,nep->rand);
-<a name="line88"> 88: </a>  }
-<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&u);
-
-<a name="line91"> 91: </a>  <font color="#B22222">/* correct eigenvalue approximation: lambda = lambda - (u'*T*u)/(u'*Tp*u) */</font>
-<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
-<a name="line93"> 93: </a>  MatMult(T,u,r);
-<a name="line94"> 94: </a>  VecDot(u,r,&a1);
-<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(nep,lambda,u,delta,r,Tp);
-<a name="line96"> 96: </a>  VecDot(u,r,&a2);
-<a name="line97"> 97: </a>  lambda = lambda - a1/a2;
-
-<a name="line99"> 99: </a>  <font color="#B22222">/* prepare linear solver */</font>
-<a name="line100">100: </a>  MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);
-<a name="line101">101: </a>  KSPSetOperators(nep->ksp,Tsigma,Tsigma);
-
-<a name="line103">103: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line104">104: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
-<a name="line105">105: </a>    nep->its++;
-
-<a name="line107">107: </a>    <font color="#B22222">/* update preconditioner and set adaptive tolerance */</font>
-<a name="line108">108: </a>    <font color="#4169E1">if</font> (nep->lag && !(nep->its%nep->lag) && nep->its>2*nep->lag && relerr<1e-2) {
-<a name="line109">109: </a>      MatHasOperation(T,MATOP_COPY,&hascopy);
-<a name="line110">110: </a>      <font color="#4169E1">if</font> (hascopy) {
-<a name="line111">111: </a>        MatCopy(T,Tsigma,DIFFERENT_NONZERO_PATTERN);
-<a name="line112">112: </a>      } <font color="#4169E1">else</font> {
-<a name="line113">113: </a>        MatDestroy(&Tsigma);
-<a name="line114">114: </a>        MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);
-<a name="line115">115: </a>      }
-<a name="line116">116: </a>      KSPSetOperators(nep->ksp,Tsigma,Tsigma);
-<a name="line117">117: </a>    }
-<a name="line118">118: </a>    <font color="#4169E1">if</font> (!nep->cctol) {
-<a name="line119">119: </a>      nep->ktol = PetscMax(nep->ktol/2.0,PETSC_MACHINE_EPSILON*10.0);
-<a name="line120">120: </a>      KSPSetTolerances(nep->ksp,nep->ktol,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
-<a name="line121">121: </a>    }
-
-<a name="line123">123: </a>    <font color="#B22222">/* form residual,  r = T(lambda)*u */</font>
-<a name="line124">124: </a>    <a href="../../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,u,delta,r,T,T);
-
-<a name="line126">126: </a>    <font color="#B22222">/* convergence test */</font>
-<a name="line127">127: </a>    VecNorm(r,NORM_2,&relerr);
-<a name="line128">128: </a>    nep->errest[nep->nconv] = relerr;
-<a name="line129">129: </a>    nep->eigr[nep->nconv] = lambda;
-<a name="line130">130: </a>    <font color="#4169E1">if</font> (relerr<=nep->rtol) {
-<a name="line131">131: </a>      nep->nconv = nep->nconv + 1;
-<a name="line132">132: </a>      nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
-<a name="line133">133: </a>    }
-<a name="line134">134: </a>    NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,1);
-
-<a name="line136">136: </a>    <font color="#4169E1">if</font> (!nep->nconv) {
-<a name="line137">137: </a>      <font color="#B22222">/* eigenvector correction: delta = T(sigma)\r */</font>
-<a name="line138">138: </a>      NEP_KSPSolve(nep,r,delta);
-<a name="line139">139: </a>      KSPGetConvergedReason(nep->ksp,&kspreason);
-<a name="line140">140: </a>      <font color="#4169E1">if</font> (kspreason<0) {
-<a name="line141">141: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, linear solve failed, stopping solve\n"</font>,nep->its);
-<a name="line142">142: </a>        nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
-<a name="line143">143: </a>        <font color="#4169E1">break</font>;
-<a name="line144">144: </a>      }
-
-<a name="line146">146: </a>      <font color="#B22222">/* update eigenvector: u = u - delta */</font>
-<a name="line147">147: </a>      VecAXPY(u,-1.0,delta);
-
-<a name="line149">149: </a>      <font color="#B22222">/* normalize eigenvector */</font>
-<a name="line150">150: </a>      VecNormalize(u,NULL);
-
-<a name="line152">152: </a>      <font color="#B22222">/* correct eigenvalue: lambda = lambda - (u'*T*u)/(u'*Tp*u) */</font>
-<a name="line153">153: </a>      <a href="../../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,u,delta,r,T,T);
-<a name="line154">154: </a>      VecDot(u,r,&a1);
-<a name="line155">155: </a>      <a href="../../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(nep,lambda,u,delta,r,Tp);
-<a name="line156">156: </a>      VecDot(u,r,&a2);
-<a name="line157">157: </a>      lambda = lambda - a1/a2;
-<a name="line158">158: </a>    }
-<a name="line159">159: </a>    <font color="#4169E1">if</font> (nep->its >= nep->max_it) nep->reason = NEP_DIVERGED_MAX_IT;
-<a name="line160">160: </a>  }
-<a name="line161">161: </a>  MatDestroy(&Tsigma);
-<a name="line162">162: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&u);
-<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
-<a name="line164">164: </a>}
-
-<a name="line168">168: </a><strong><font color="#4169E1"><a name="NEPCreate_RII"></a>PETSC_EXTERN PetscErrorCode NEPCreate_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line169">169: </a>{
-<a name="line171">171: </a>  nep->ops->solve        = NEPSolve_RII;
-<a name="line172">172: </a>  nep->ops->setup        = NEPSetUp_RII;
-<a name="line173">173: </a>  <font color="#4169E1">return</font>(0);
-<a name="line174">174: </a>}
+<a name="line36"> 36: </a><font color="#A020F0">#include <slepc/private/nepimpl.h>         </font><font color="#B22222">/*I "slepcnep.h" I*/</font><font color="#A020F0"></font>
+
+<a name="line38"> 38: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line39"> 39: </a>  PetscInt  max_inner_it;     <font color="#B22222">/* maximum number of Newton iterations */</font>
+<a name="line40"> 40: </a>  PetscInt  lag;              <font color="#B22222">/* interval to rebuild preconditioner */</font>
+<a name="line41"> 41: </a>  PetscBool cctol;            <font color="#B22222">/* constant correction tolerance */</font>
+<a name="line42"> 42: </a>  KSP       ksp;              <font color="#B22222">/* linear solver object */</font>
+<a name="line43"> 43: </a>} NEP_RII;
+
+<a name="line47"> 47: </a><strong><font color="#4169E1"><a name="NEPRII_KSPSolve"></a>PETSC_STATIC_INLINE PetscErrorCode NEPRII_KSPSolve(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Vec b,Vec x)</font></strong>
+<a name="line48"> 48: </a>{
+<a name="line50"> 50: </a>  PetscInt       lits;
+<a name="line51"> 51: </a>  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+<a name="line54"> 54: </a>  KSPSolve(ctx->ksp,b,x);
+<a name="line55"> 55: </a>  KSPGetIterationNumber(ctx->ksp,&lits);
+<a name="line56"> 56: </a>  PetscInfo2(nep,<font color="#666666">"iter=%D, linear solve iterations=%D\n"</font>,nep->its,lits);
+<a name="line57"> 57: </a>  <font color="#4169E1">return</font>(0);
+<a name="line58"> 58: </a>}
+
+<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="NEPSetUp_RII"></a>PetscErrorCode NEPSetUp_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line63"> 63: </a>{
+<a name="line65"> 65: </a>  PetscBool      istrivial;
+
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (nep->nev>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Requested several eigenpairs but this solver can compute only one"</font>);
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (nep->ncv) { PetscInfo(nep,<font color="#666666">"Setting ncv = 1, ignoring user-provided value\n"</font>); }
+<a name="line70"> 70: </a>  nep->ncv = 1;
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (nep->mpd) { PetscInfo(nep,<font color="#666666">"Setting mpd = 1, ignoring user-provided value\n"</font>); }
+<a name="line72"> 72: </a>  nep->mpd = 1;
+<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
+<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (nep->which && nep->which!=NEP_TARGET_MAGNITUDE) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Wrong value of which"</font>);
+
+<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
+<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,2);
+<a name="line81"> 81: </a>  <font color="#4169E1">return</font>(0);
+<a name="line82"> 82: </a>}
+
+<a name="line86"> 86: </a><strong><font color="#4169E1"><a name="NEPSolve_RII"></a>PetscErrorCode NEPSolve_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line87"> 87: </a>{
+<a name="line88"> 88: </a>  PetscErrorCode     ierr;
+<a name="line89"> 89: </a>  NEP_RII            *ctx = (NEP_RII*)nep->data;
+<a name="line90"> 90: </a>  Mat                T=nep->function,Tp=nep->jacobian,Tsigma;
+<a name="line91"> 91: </a>  Vec                u,r=nep->work[0],delta=nep->work[1];
+<a name="line92"> 92: </a>  PetscScalar        lambda,a1,a2,corr;
+<a name="line93"> 93: </a>  PetscReal          resnorm=1.0,ktol=0.1;
+<a name="line94"> 94: </a>  PetscBool          hascopy;
+<a name="line95"> 95: </a>  PetscInt           inner_its;
+<a name="line96"> 96: </a>  KSPConvergedReason kspreason;
+
+<a name="line99"> 99: </a>  <font color="#B22222">/* get initial approximation of eigenvalue and eigenvector */</font>
+<a name="line100">100: </a>  NEPGetDefaultShift(nep,&lambda);
+<a name="line101">101: </a>  <font color="#4169E1">if</font> (!nep->nini) {
+<a name="line102">102: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,0);
+<a name="line103">103: </a>  }
+<a name="line104">104: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&u);
+<a name="line105">105: </a>  <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
+
+<a name="line107">107: </a>  <font color="#B22222">/* prepare linear solver */</font>
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>(nep,&ctx->ksp); }
+<a name="line109">109: </a>  MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);
+<a name="line110">110: </a>  KSPSetOperators(ctx->ksp,Tsigma,Tsigma);
+
+<a name="line112">112: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line113">113: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line114">114: </a>    nep->its++;
+
+<a name="line116">116: </a>    <font color="#B22222">/* Use Newton's method to compute nonlinear Rayleigh functional. Current eigenvalue </font>
+<a name="line117">117: </a><font color="#B22222">       estimate as starting value. */</font>
+<a name="line118">118: </a>    inner_its=0;
+<a name="line119">119: </a>    <font color="#4169E1">do</font> {
+<a name="line120">120: </a>      <a href="../../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,u,delta,r,T,T);
+<a name="line121">121: </a>      VecDot(r,u,&a1);
+<a name="line122">122: </a>      <a href="../../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(nep,lambda,u,delta,r,Tp);
+<a name="line123">123: </a>      VecDot(r,u,&a2);
+<a name="line124">124: </a>      corr = a1/a2;
+<a name="line125">125: </a>      lambda = lambda - corr;
+<a name="line126">126: </a>      inner_its++;
+<a name="line127">127: </a>    } <font color="#4169E1">while</font> (PetscAbsScalar(corr)>PETSC_SQRT_MACHINE_EPSILON && inner_its<ctx->max_inner_it);
+
+<a name="line129">129: </a>    <font color="#B22222">/* update preconditioner and set adaptive tolerance */</font>
+<a name="line130">130: </a>    <font color="#4169E1">if</font> (ctx->lag && !(nep->its%ctx->lag) && nep->its>2*ctx->lag && resnorm<1e-2) {
+<a name="line131">131: </a>      MatHasOperation(T,MATOP_COPY,&hascopy);
+<a name="line132">132: </a>      <font color="#4169E1">if</font> (hascopy) {
+<a name="line133">133: </a>        MatCopy(T,Tsigma,DIFFERENT_NONZERO_PATTERN);
+<a name="line134">134: </a>      } <font color="#4169E1">else</font> {
+<a name="line135">135: </a>        MatDestroy(&Tsigma);
+<a name="line136">136: </a>        MatDuplicate(T,MAT_COPY_VALUES,&Tsigma);
+<a name="line137">137: </a>      }
+<a name="line138">138: </a>      KSPSetOperators(ctx->ksp,Tsigma,Tsigma);
+<a name="line139">139: </a>    }
+<a name="line140">140: </a>    <font color="#4169E1">if</font> (!ctx->cctol) {
+<a name="line141">141: </a>      ktol = PetscMax(ktol/2.0,PETSC_MACHINE_EPSILON*10.0);
+<a name="line142">142: </a>      KSPSetTolerances(ctx->ksp,ktol,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line143">143: </a>    }
+
+<a name="line145">145: </a>    <font color="#B22222">/* form residual,  r = T(lambda)*u */</font>
+<a name="line146">146: </a>    <a href="../../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,u,delta,r,T,T);
+
+<a name="line148">148: </a>    <font color="#B22222">/* convergence test */</font>
+<a name="line149">149: </a>    VecNorm(r,NORM_2,&resnorm);
+<a name="line150">150: </a>    (*nep->converged)(nep,lambda,0,resnorm,&nep->errest[nep->nconv],nep->convergedctx);
+<a name="line151">151: </a>    nep->eigr[nep->nconv] = lambda;
+<a name="line152">152: </a>    <font color="#4169E1">if</font> (nep->errest[nep->nconv]<=nep->tol) {
+<a name="line153">153: </a>      nep->nconv = nep->nconv + 1;
+<a name="line154">154: </a>    }
+<a name="line155">155: </a>    (*nep->stopping)(nep,nep->its,nep->max_it,nep->nconv,nep->nev,&nep->reason,nep->stoppingctx);
+<a name="line156">156: </a>    NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->eigi,nep->errest,1);
+
+<a name="line158">158: </a>    <font color="#4169E1">if</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line159">159: </a>      <font color="#B22222">/* eigenvector correction: delta = T(sigma)\r */</font>
+<a name="line160">160: </a>      NEPRII_KSPSolve(nep,r,delta);
+<a name="line161">161: </a>      KSPGetConvergedReason(ctx->ksp,&kspreason);
+<a name="line162">162: </a>      <font color="#4169E1">if</font> (kspreason<0) {
+<a name="line163">163: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, linear solve failed, stopping solve\n"</font>,nep->its);
+<a name="line164">164: </a>        nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
+<a name="line165">165: </a>        <font color="#4169E1">break</font>;
+<a name="line166">166: </a>      }
+
+<a name="line168">168: </a>      <font color="#B22222">/* update eigenvector: u = u - delta */</font>
+<a name="line169">169: </a>      VecAXPY(u,-1.0,delta);
+
+<a name="line171">171: </a>      <font color="#B22222">/* normalize eigenvector */</font>
+<a name="line172">172: </a>      VecNormalize(u,NULL);
+<a name="line173">173: </a>    }
+<a name="line174">174: </a>  }
+<a name="line175">175: </a>  MatDestroy(&Tsigma);
+<a name="line176">176: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&u);
+<a name="line177">177: </a>  <font color="#4169E1">return</font>(0);
+<a name="line178">178: </a>}
+
+<a name="line182">182: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_RII"></a>PetscErrorCode NEPSetFromOptions_RII(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line183">183: </a>{
+<a name="line185">185: </a>  NEP_RII        *ctx = (NEP_RII*)nep->data;
+<a name="line186">186: </a>  PetscBool      flg;
+<a name="line187">187: </a>  PetscInt       i;
+
+<a name="line190">190: </a>  <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>(nep,&ctx->ksp); }
+<a name="line191">191: </a>  KSPSetOperators(ctx->ksp,nep->function,nep->function_pre);
+<a name="line192">192: </a>  KSPSetFromOptions(ctx->ksp);
+<a name="line193">193: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> RII Options"</font>);
+<a name="line194">194: </a>    PetscOptionsInt(<font color="#666666">"-nep_rii_max_it"</font>,<font color="#666666">"Maximum number of Newton iterations for updating Rayleigh functional"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPRIISetMaximumIterations.html#NEPRIISetMaximumIterations">NEPRIISetMaximumIterations</a>"</font>,ctx->max_inner_it,&ctx->max_inner_it,NULL);
+<a name="line195">195: </a>    PetscOptionsBool(<font color="#666666">"-nep_rii_const_correction_tol"</font>,<font color="#666666">"Constant correction tolerance for the linear solver"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html#NEPRIISetConstCorrectionTol">NEPRIISetConstCorrectionTol</a>"</font>,ctx->cctol,&ctx->cctol,NULL);
+<a name="line196">196: </a>    i = 0;
+<a name="line197">197: </a>    PetscOptionsInt(<font color="#666666">"-nep_rii_lag_preconditioner"</font>,<font color="#666666">"Interval to rebuild preconditioner"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>"</font>,ctx->lag,&i,&flg);
+<a name="line198">198: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>(nep,i); }
+<a name="line199">199: </a>  PetscOptionsTail();
+<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
+<a name="line201">201: </a>}
+
+<a name="line205">205: </a><strong><font color="#4169E1"><a name="NEPRIISetMaximumIterations_RII"></a>static PetscErrorCode NEPRIISetMaximumIterations_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its)</font></strong>
+<a name="line206">206: </a>{
+<a name="line207">207: </a>  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+<a name="line210">210: </a>  ctx->max_inner_it = its;
+<a name="line211">211: </a>  <font color="#4169E1">return</font>(0);
+<a name="line212">212: </a>}
+
+<a name="line216">216: </a><font color="#B22222">/*@</font>
+<a name="line217">217: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIISetMaximumIterations.html#NEPRIISetMaximumIterations">NEPRIISetMaximumIterations</a> - Sets the maximum number of inner iterations to be</font>
+<a name="line218">218: </a><font color="#B22222">   used in the RII solver. These are the Newton iterations related to the computation</font>
+<a name="line219">219: </a><font color="#B22222">   of the nonlinear Rayleigh functional.</font>
+
+<a name="line221">221: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line223">223: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line224">224: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
+<a name="line225">225: </a><font color="#B22222">-  its - maximum inner iterations</font>
+
+<a name="line227">227: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line229">229: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIIGetMaximumIterations.html#NEPRIIGetMaximumIterations">NEPRIIGetMaximumIterations</a>()</font>
+<a name="line230">230: </a><font color="#B22222">@*/</font>
+<a name="line231">231: </a><strong><font color="#4169E1"><a name="NEPRIISetMaximumIterations"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIISetMaximumIterations.html#NEPRIISetMaximumIterations">NEPRIISetMaximumIterations</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its)</font></strong>
+<a name="line232">232: </a>{
+
+<a name="line238">238: </a>  PetscTryMethod(nep,<font color="#666666">"NEPRIISetMaximumIterations_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt),(nep,its));
+<a name="line239">239: </a>  <font color="#4169E1">return</font>(0);
+<a name="line240">240: </a>}
+
+<a name="line244">244: </a><strong><font color="#4169E1"><a name="NEPRIIGetMaximumIterations_RII"></a>static PetscErrorCode NEPRIIGetMaximumIterations_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *its)</font></strong>
+<a name="line245">245: </a>{
+<a name="line246">246: </a>  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+<a name="line249">249: </a>  *its = ctx->max_inner_it;
+<a name="line250">250: </a>  <font color="#4169E1">return</font>(0);
+<a name="line251">251: </a>}
+
+<a name="line255">255: </a><font color="#B22222">/*@</font>
+<a name="line256">256: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIIGetMaximumIterations.html#NEPRIIGetMaximumIterations">NEPRIIGetMaximumIterations</a> - Gets the maximum number of inner iterations of RII.</font>
+
+<a name="line258">258: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line260">260: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line261">261: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line263">263: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line264">264: </a><font color="#B22222">.  its - maximum inner iterations</font>
+
+<a name="line266">266: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line268">268: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIISetMaximumIterations.html#NEPRIISetMaximumIterations">NEPRIISetMaximumIterations</a>()</font>
+<a name="line269">269: </a><font color="#B22222">@*/</font>
+<a name="line270">270: </a><strong><font color="#4169E1"><a name="NEPRIIGetMaximumIterations"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIIGetMaximumIterations.html#NEPRIIGetMaximumIterations">NEPRIIGetMaximumIterations</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *its)</font></strong>
+<a name="line271">271: </a>{
+
+<a name="line277">277: </a>  PetscUseMethod(nep,<font color="#666666">"NEPRIIGetMaximumIterations_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*),(nep,its));
+<a name="line278">278: </a>  <font color="#4169E1">return</font>(0);
+<a name="line279">279: </a>}
+
+<a name="line283">283: </a><strong><font color="#4169E1"><a name="NEPRIISetLagPreconditioner_RII"></a>static PetscErrorCode NEPRIISetLagPreconditioner_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt lag)</font></strong>
+<a name="line284">284: </a>{
+<a name="line285">285: </a>  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+<a name="line288">288: </a>  <font color="#4169E1">if</font> (lag<0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Lag must be non-negative"</font>);
+<a name="line289">289: </a>  ctx->lag = lag;
+<a name="line290">290: </a>  <font color="#4169E1">return</font>(0);
+<a name="line291">291: </a>}
+
+<a name="line295">295: </a><font color="#B22222">/*@</font>
+<a name="line296">296: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a> - Determines when the preconditioner is rebuilt in the</font>
+<a name="line297">297: </a><font color="#B22222">   nonlinear solve.</font>
+
+<a name="line299">299: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line301">301: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line302">302: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
+<a name="line303">303: </a><font color="#B22222">-   lag - 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is</font>
+<a name="line304">304: </a><font color="#B22222">          computed within the nonlinear iteration, 2 means every second time</font>
+<a name="line305">305: </a><font color="#B22222">          the Jacobian is built, etc.</font>
+
+<a name="line307">307: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line308">308: </a><font color="#B22222">.  -nep_rii_lag_preconditioner <lag></font>
+
+<a name="line310">310: </a><font color="#B22222">   Notes:</font>
+<a name="line311">311: </a><font color="#B22222">   The default is 1.</font>
+<a name="line312">312: </a><font color="#B22222">   The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.</font>
+
+<a name="line314">314: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line316">316: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html#NEPRIIGetLagPreconditioner">NEPRIIGetLagPreconditioner</a>()</font>
+<a name="line317">317: </a><font color="#B22222">@*/</font>
+<a name="line318">318: </a><strong><font color="#4169E1"><a name="NEPRIISetLagPreconditioner"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt lag)</font></strong>
+<a name="line319">319: </a>{
+
+<a name="line325">325: </a>  PetscTryMethod(nep,<font color="#666666">"NEPRIISetLagPreconditioner_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt),(nep,lag));
+<a name="line326">326: </a>  <font color="#4169E1">return</font>(0);
+<a name="line327">327: </a>}
+
+<a name="line331">331: </a><strong><font color="#4169E1"><a name="NEPRIIGetLagPreconditioner_RII"></a>static PetscErrorCode NEPRIIGetLagPreconditioner_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *lag)</font></strong>
+<a name="line332">332: </a>{
+<a name="line333">333: </a>  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+<a name="line336">336: </a>  *lag = ctx->lag;
+<a name="line337">337: </a>  <font color="#4169E1">return</font>(0);
+<a name="line338">338: </a>}
+
+<a name="line342">342: </a><font color="#B22222">/*@</font>
+<a name="line343">343: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html#NEPRIIGetLagPreconditioner">NEPRIIGetLagPreconditioner</a> - Indicates how often the preconditioner is rebuilt.</font>
+
+<a name="line345">345: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line347">347: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line348">348: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line350">350: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line351">351: </a><font color="#B22222">.  lag - the lag parameter</font>
+
+<a name="line353">353: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line355">355: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIISetLagPreconditioner.html#NEPRIISetLagPreconditioner">NEPRIISetLagPreconditioner</a>()</font>
+<a name="line356">356: </a><font color="#B22222">@*/</font>
+<a name="line357">357: </a><strong><font color="#4169E1"><a name="NEPRIIGetLagPreconditioner"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIIGetLagPreconditioner.html#NEPRIIGetLagPreconditioner">NEPRIIGetLagPreconditioner</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *lag)</font></strong>
+<a name="line358">358: </a>{
+
+<a name="line364">364: </a>  PetscUseMethod(nep,<font color="#666666">"NEPRIIGetLagPreconditioner_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt*),(nep,lag));
+<a name="line365">365: </a>  <font color="#4169E1">return</font>(0);
+<a name="line366">366: </a>}
+
+<a name="line370">370: </a><strong><font color="#4169E1"><a name="NEPRIISetConstCorrectionTol_RII"></a>static PetscErrorCode NEPRIISetConstCorrectionTol_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool cct)</font></strong>
+<a name="line371">371: </a>{
+<a name="line372">372: </a>  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+<a name="line375">375: </a>  ctx->cctol = cct;
+<a name="line376">376: </a>  <font color="#4169E1">return</font>(0);
+<a name="line377">377: </a>}
+
+<a name="line381">381: </a><font color="#B22222">/*@</font>
+<a name="line382">382: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html#NEPRIISetConstCorrectionTol">NEPRIISetConstCorrectionTol</a> - Sets a flag to keep the tolerance used</font>
+<a name="line383">383: </a><font color="#B22222">   in the linear solver constant.</font>
+
+<a name="line385">385: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line387">387: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line388">388: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
+<a name="line389">389: </a><font color="#B22222">-  cct - a boolean value</font>
+
+<a name="line391">391: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line392">392: </a><font color="#B22222">.  -nep_rii_const_correction_tol <bool> - set the boolean flag</font>
+
+<a name="line394">394: </a><font color="#B22222">   Notes:</font>
+<a name="line395">395: </a><font color="#B22222">   By default, an exponentially decreasing tolerance is set in the KSP used</font>
+<a name="line396">396: </a><font color="#B22222">   within the nonlinear iteration, so that each Newton iteration requests</font>
+<a name="line397">397: </a><font color="#B22222">   better accuracy than the previous one. The constant correction tolerance</font>
+<a name="line398">398: </a><font color="#B22222">   flag stops this behaviour.</font>
+
+<a name="line400">400: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line402">402: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html#NEPRIIGetConstCorrectionTol">NEPRIIGetConstCorrectionTol</a>()</font>
+<a name="line403">403: </a><font color="#B22222">@*/</font>
+<a name="line404">404: </a><strong><font color="#4169E1"><a name="NEPRIISetConstCorrectionTol"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html#NEPRIISetConstCorrectionTol">NEPRIISetConstCorrectionTol</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool cct)</font></strong>
+<a name="line405">405: </a>{
+
+<a name="line411">411: </a>  PetscTryMethod(nep,<font color="#666666">"NEPRIISetConstCorrectionTol_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool),(nep,cct));
+<a name="line412">412: </a>  <font color="#4169E1">return</font>(0);
+<a name="line413">413: </a>}
+
+<a name="line417">417: </a><strong><font color="#4169E1"><a name="NEPRIIGetConstCorrectionTol_RII"></a>static PetscErrorCode NEPRIIGetConstCorrectionTol_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *cct)</font></strong>
+<a name="line418">418: </a>{
+<a name="line419">419: </a>  NEP_RII *ctx = (NEP_RII*)nep->data;
+
+<a name="line422">422: </a>  *cct = ctx->cctol;
+<a name="line423">423: </a>  <font color="#4169E1">return</font>(0);
+<a name="line424">424: </a>}
+
+<a name="line428">428: </a><font color="#B22222">/*@</font>
+<a name="line429">429: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html#NEPRIIGetConstCorrectionTol">NEPRIIGetConstCorrectionTol</a> - Returns the constant tolerance flag.</font>
+
+<a name="line431">431: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line433">433: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line434">434: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line436">436: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line437">437: </a><font color="#B22222">.  cct - the value of the constant tolerance flag</font>
+
+<a name="line439">439: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line441">441: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIISetConstCorrectionTol.html#NEPRIISetConstCorrectionTol">NEPRIISetConstCorrectionTol</a>()</font>
+<a name="line442">442: </a><font color="#B22222">@*/</font>
+<a name="line443">443: </a><strong><font color="#4169E1"><a name="NEPRIIGetConstCorrectionTol"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIIGetConstCorrectionTol.html#NEPRIIGetConstCorrectionTol">NEPRIIGetConstCorrectionTol</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *cct)</font></strong>
+<a name="line444">444: </a>{
+
+<a name="line450">450: </a>  PetscUseMethod(nep,<font color="#666666">"NEPRIIGetConstCorrectionTol_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscBool*),(nep,cct));
+<a name="line451">451: </a>  <font color="#4169E1">return</font>(0);
+<a name="line452">452: </a>}
+
+<a name="line456">456: </a><strong><font color="#4169E1"><a name="NEPRIISetKSP_RII"></a>static PetscErrorCode NEPRIISetKSP_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP ksp)</font></strong>
+<a name="line457">457: </a>{
+<a name="line459">459: </a>  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+<a name="line462">462: </a>  PetscObjectReference((PetscObject)ksp);
+<a name="line463">463: </a>  KSPDestroy(&ctx->ksp);
+<a name="line464">464: </a>  ctx->ksp = ksp;
+<a name="line465">465: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);
+<a name="line466">466: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line467">467: </a>  <font color="#4169E1">return</font>(0);
+<a name="line468">468: </a>}
+
+<a name="line472">472: </a><font color="#B22222">/*@</font>
+<a name="line473">473: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIISetKSP.html#NEPRIISetKSP">NEPRIISetKSP</a> - Associate a linear solver object (KSP) to the nonlinear</font>
+<a name="line474">474: </a><font color="#B22222">   eigenvalue solver.</font>
+
+<a name="line476">476: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line478">478: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line479">479: </a><font color="#B22222">+  nep - eigenvalue solver</font>
+<a name="line480">480: </a><font color="#B22222">-  ksp - the linear solver object</font>
+
+<a name="line482">482: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line484">484: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>()</font>
+<a name="line485">485: </a><font color="#B22222">@*/</font>
+<a name="line486">486: </a><strong><font color="#4169E1"><a name="NEPRIISetKSP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIISetKSP.html#NEPRIISetKSP">NEPRIISetKSP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP ksp)</font></strong>
+<a name="line487">487: </a>{
+
+<a name="line494">494: </a>  PetscTryMethod(nep,<font color="#666666">"NEPRIISetKSP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP),(nep,ksp));
+<a name="line495">495: </a>  <font color="#4169E1">return</font>(0);
+<a name="line496">496: </a>}
+
+<a name="line500">500: </a><strong><font color="#4169E1"><a name="NEPRIIGetKSP_RII"></a>static PetscErrorCode NEPRIIGetKSP_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP *ksp)</font></strong>
+<a name="line501">501: </a>{
+<a name="line503">503: </a>  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+<a name="line506">506: </a>  <font color="#4169E1">if</font> (!ctx->ksp) {
+<a name="line507">507: </a>    KSPCreate(PetscObjectComm((PetscObject)nep),&ctx->ksp);
+<a name="line508">508: </a>    KSPSetOptionsPrefix(ctx->ksp,((PetscObject)nep)->prefix);
+<a name="line509">509: </a>    KSPAppendOptionsPrefix(ctx->ksp,<font color="#666666">"nep_rii_"</font>);
+<a name="line510">510: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->ksp,(PetscObject)nep,1);
+<a name="line511">511: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->ksp);
+<a name="line512">512: </a>    KSPSetErrorIfNotConverged(ctx->ksp,PETSC_TRUE);
+<a name="line513">513: </a>  }
+<a name="line514">514: </a>  *ksp = ctx->ksp;
+<a name="line515">515: </a>  <font color="#4169E1">return</font>(0);
+<a name="line516">516: </a>}
+
+<a name="line520">520: </a><font color="#B22222">/*@</font>
+<a name="line521">521: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a> - Retrieve the linear solver object (KSP) associated with</font>
+<a name="line522">522: </a><font color="#B22222">   the nonlinear eigenvalue solver.</font>
+
+<a name="line524">524: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line526">526: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line527">527: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line529">529: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line530">530: </a><font color="#B22222">.  ksp - the linear solver object</font>
+
+<a name="line532">532: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line534">534: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPRIISetKSP.html#NEPRIISetKSP">NEPRIISetKSP</a>()</font>
+<a name="line535">535: </a><font color="#B22222">@*/</font>
+<a name="line536">536: </a><strong><font color="#4169E1"><a name="NEPRIIGetKSP"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP *ksp)</font></strong>
+<a name="line537">537: </a>{
+
+<a name="line543">543: </a>  PetscUseMethod(nep,<font color="#666666">"NEPRIIGetKSP_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,KSP*),(nep,ksp));
+<a name="line544">544: </a>  <font color="#4169E1">return</font>(0);
+<a name="line545">545: </a>}
+
+<a name="line549">549: </a><strong><font color="#4169E1"><a name="NEPView_RII"></a>PetscErrorCode NEPView_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line550">550: </a>{
+<a name="line552">552: </a>  NEP_RII        *ctx = (NEP_RII*)nep->data;
+<a name="line553">553: </a>  PetscBool      isascii;
+
+<a name="line556">556: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line557">557: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line558">558: </a>    <font color="#4169E1">if</font> (!ctx->ksp) { <a href="../../../../docs/manualpages/NEP/NEPRIIGetKSP.html#NEPRIIGetKSP">NEPRIIGetKSP</a>(nep,&ctx->ksp); }
+<a name="line559">559: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  RII: maximum number of inner iterations: %D\n"</font>,ctx->max_inner_it);
+<a name="line560">560: </a>    <font color="#4169E1">if</font> (ctx->cctol) {
+<a name="line561">561: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  RII: using a constant tolerance for the linear solver\n"</font>);
+<a name="line562">562: </a>    }
+<a name="line563">563: </a>    <font color="#4169E1">if</font> (ctx->lag) {
+<a name="line564">564: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  RII: updating the preconditioner every %D iterations\n"</font>,ctx->lag);
+<a name="line565">565: </a>    }
+<a name="line566">566: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line567">567: </a>    KSPView(ctx->ksp,viewer);
+<a name="line568">568: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line569">569: </a>  }
+<a name="line570">570: </a>  <font color="#4169E1">return</font>(0);
+<a name="line571">571: </a>}
+
+<a name="line575">575: </a><strong><font color="#4169E1"><a name="NEPDestroy_RII"></a>PetscErrorCode NEPDestroy_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line576">576: </a>{
+<a name="line578">578: </a>  NEP_RII        *ctx = (NEP_RII*)nep->data;
+
+<a name="line581">581: </a>  KSPDestroy(&ctx->ksp);
+<a name="line582">582: </a>  PetscFree(nep->data);
+<a name="line583">583: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetMaximumIterations_C"</font>,NULL);
+<a name="line584">584: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetMaximumIterations_C"</font>,NULL);
+<a name="line585">585: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetLagPreconditioner_C"</font>,NULL);
+<a name="line586">586: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetLagPreconditioner_C"</font>,NULL);
+<a name="line587">587: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetConstCorrectionTol_C"</font>,NULL);
+<a name="line588">588: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetConstCorrectionTol_C"</font>,NULL);
+<a name="line589">589: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetKSP_C"</font>,NULL);
+<a name="line590">590: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetKSP_C"</font>,NULL);
+<a name="line591">591: </a>  <font color="#4169E1">return</font>(0);
+<a name="line592">592: </a>}
+
+<a name="line596">596: </a><strong><font color="#4169E1"><a name="NEPCreate_RII"></a>PETSC_EXTERN PetscErrorCode NEPCreate_RII(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line597">597: </a>{
+<a name="line599">599: </a>  NEP_RII        *ctx;
+
+<a name="line602">602: </a>  PetscNewLog(nep,&ctx);
+<a name="line603">603: </a>  ctx->max_inner_it = 10;
+<a name="line604">604: </a>  ctx->lag          = 1;
+<a name="line605">605: </a>  ctx->cctol        = PETSC_FALSE;
+<a name="line606">606: </a>  nep->data = (void*)ctx;
+
+<a name="line608">608: </a>  nep->ops->solve          = NEPSolve_RII;
+<a name="line609">609: </a>  nep->ops->setup          = NEPSetUp_RII;
+<a name="line610">610: </a>  nep->ops->setfromoptions = NEPSetFromOptions_RII;
+<a name="line611">611: </a>  nep->ops->destroy        = NEPDestroy_RII;
+<a name="line612">612: </a>  nep->ops->view           = NEPView_RII;
+<a name="line613">613: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetMaximumIterations_C"</font>,NEPRIISetMaximumIterations_RII);
+<a name="line614">614: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetMaximumIterations_C"</font>,NEPRIIGetMaximumIterations_RII);
+<a name="line615">615: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetLagPreconditioner_C"</font>,NEPRIISetLagPreconditioner_RII);
+<a name="line616">616: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetLagPreconditioner_C"</font>,NEPRIIGetLagPreconditioner_RII);
+<a name="line617">617: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetConstCorrectionTol_C"</font>,NEPRIISetConstCorrectionTol_RII);
+<a name="line618">618: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetConstCorrectionTol_C"</font>,NEPRIIGetConstCorrectionTol_RII);
+<a name="line619">619: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIISetKSP_C"</font>,NEPRIISetKSP_RII);
+<a name="line620">620: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPRIIGetKSP_C"</font>,NEPRIIGetKSP_RII);
+<a name="line621">621: </a>  <font color="#4169E1">return</font>(0);
+<a name="line622">622: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/impls/slp/index.html b/src/nep/impls/slp/index.html
index 37572d8..9db57d4 100644
--- a/src/nep/impls/slp/index.html
+++ b/src/nep/impls/slp/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/slp/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/slp/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/impls/slp/makefile b/src/nep/impls/slp/makefile
index 56a2312..98955ad 100644
--- a/src/nep/impls/slp/makefile
+++ b/src/nep/impls/slp/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/impls/slp/makefile.html b/src/nep/impls/slp/makefile.html
index c979954..1edbddd 100644
--- a/src/nep/impls/slp/makefile.html
+++ b/src/nep/impls/slp/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/slp/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:21+00:00">
+<meta name="date" content="2016-05-16T10:34:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/slp/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/slp/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/impls/slp/slp.c b/src/nep/impls/slp/slp.c
index 83054f5..c0de619 100644
--- a/src/nep/impls/slp/slp.c
+++ b/src/nep/impls/slp/slp.c
@@ -15,7 +15,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -49,22 +49,14 @@ PetscErrorCode NEPSetUp_SLP(NEP nep)
   PetscBool      istrivial;
 
   PetscFunctionBegin;
-  if (nep->ncv) { /* ncv set */
-    if (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must be at least nev");
-  } else if (nep->mpd) { /* mpd set */
-    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-  } else { /* neither set: defaults depend on nev being small or large */
-    if (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-    else {
-      nep->mpd = 500;
-      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-    }
-  }
-  if (!nep->mpd) nep->mpd = nep->ncv;
+  if (nep->nev>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Requested several eigenpairs but this solver can compute only one");
+  if (nep->ncv) { ierr = PetscInfo(nep,"Setting ncv = 1, ignoring user-provided value\n");CHKERRQ(ierr); }
+  nep->ncv = 1;
+  if (nep->mpd) { ierr = PetscInfo(nep,"Setting mpd = 1, ignoring user-provided value\n");CHKERRQ(ierr); }
+  nep->mpd = 1;
   if (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must not be larger than nev+mpd");
-  if (nep->nev>1) { ierr = PetscInfo(nep,"Warning: requested more than one eigenpair but SLP can only compute one\n");CHKERRQ(ierr); }
   if (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-  if (!nep->max_funcs) nep->max_funcs = nep->max_it;
+  if (nep->which && nep->which!=NEP_TARGET_MAGNITUDE) SETERRQ(PetscObjectComm((PetscObject)nep),1,"Wrong value of which");
 
   ierr = RGIsTrivial(nep->rg,&istrivial);CHKERRQ(ierr);
   if (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"This solver does not support region filtering");
@@ -74,8 +66,7 @@ PetscErrorCode NEPSetUp_SLP(NEP nep)
   ierr = EPSSetTarget(ctx->eps,0.0);CHKERRQ(ierr);
   ierr = EPSGetST(ctx->eps,&st);CHKERRQ(ierr);
   ierr = STSetType(st,STSINVERT);CHKERRQ(ierr);
-  ierr = EPSSetDimensions(ctx->eps,1,nep->ncv?nep->ncv:PETSC_DEFAULT,nep->mpd?nep->mpd:PETSC_DEFAULT);CHKERRQ(ierr);
-  ierr = EPSSetTolerances(ctx->eps,nep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:nep->rtol/10.0,nep->max_it?nep->max_it:PETSC_DEFAULT);CHKERRQ(ierr);
+  ierr = EPSSetTolerances(ctx->eps,nep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:nep->tol/10.0,nep->max_it?nep->max_it:PETSC_DEFAULT);CHKERRQ(ierr);
 
   ierr = NEPAllocateSolution(nep,0);CHKERRQ(ierr);
   ierr = NEPSetWorkVecs(nep,1);CHKERRQ(ierr);
@@ -91,14 +82,14 @@ PetscErrorCode NEPSolve_SLP(NEP nep)
   Mat            T=nep->function,Tp=nep->jacobian;
   Vec            u,r=nep->work[0];
   PetscScalar    lambda,mu,im;
-  PetscReal      relerr;
+  PetscReal      resnorm;
   PetscInt       nconv;
 
   PetscFunctionBegin;
   /* get initial approximation of eigenvalue and eigenvector */
   ierr = NEPGetDefaultShift(nep,&lambda);CHKERRQ(ierr);
   if (!nep->nini) {
-    ierr = BVSetRandomColumn(nep->V,0,nep->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(nep->V,0);CHKERRQ(ierr);
   }
   ierr = BVGetColumn(nep->V,0,&u);CHKERRQ(ierr);
 
@@ -114,16 +105,16 @@ PetscErrorCode NEPSolve_SLP(NEP nep)
     ierr = MatMult(T,u,r);CHKERRQ(ierr);
 
     /* convergence test */
-    ierr = VecNorm(r,NORM_2,&relerr);CHKERRQ(ierr);
-    nep->errest[nep->nconv] = relerr;
+    ierr = VecNorm(r,NORM_2,&resnorm);CHKERRQ(ierr);
+    ierr = (*nep->converged)(nep,lambda,0,resnorm,&nep->errest[nep->nconv],nep->convergedctx);CHKERRQ(ierr);
     nep->eigr[nep->nconv] = lambda;
-    if (relerr<=nep->rtol) {
+    if (nep->errest[nep->nconv]<=nep->tol) {
       nep->nconv = nep->nconv + 1;
-      nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
     }
-    ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,1);CHKERRQ(ierr);
+    ierr = (*nep->stopping)(nep,nep->its,nep->max_it,nep->nconv,nep->nev,&nep->reason,nep->stoppingctx);CHKERRQ(ierr);
+    ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->eigi,nep->errest,1);CHKERRQ(ierr);
 
-    if (!nep->nconv) {
+    if (nep->reason == NEP_CONVERGED_ITERATING) {
       /* compute eigenvalue correction mu and eigenvector approximation u */
       ierr = EPSSetOperators(ctx->eps,T,Tp);CHKERRQ(ierr);
       ierr = EPSSetInitialSpace(ctx->eps,1,&u);CHKERRQ(ierr);
@@ -140,7 +131,6 @@ PetscErrorCode NEPSolve_SLP(NEP nep)
       /* correct eigenvalue */
       lambda = lambda - mu;
     }
-    if (nep->its >= nep->max_it) nep->reason = NEP_DIVERGED_MAX_IT;
   }
   ierr = BVRestoreColumn(nep->V,0,&u);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -148,7 +138,7 @@ PetscErrorCode NEPSolve_SLP(NEP nep)
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSetFromOptions_SLP"
-PetscErrorCode NEPSetFromOptions_SLP(PetscOptions *PetscOptionsObject,NEP nep)
+PetscErrorCode NEPSetFromOptions_SLP(PetscOptionItems *PetscOptionsObject,NEP nep)
 {
   PetscErrorCode ierr;
   NEP_SLP        *ctx = (NEP_SLP*)nep->data;
@@ -217,7 +207,7 @@ static PetscErrorCode NEPSLPGetEPS_SLP(NEP nep,EPS *eps)
   if (!ctx->eps) {
     ierr = EPSCreate(PetscObjectComm((PetscObject)nep),&ctx->eps);CHKERRQ(ierr);
     ierr = EPSSetOptionsPrefix(ctx->eps,((PetscObject)nep)->prefix);CHKERRQ(ierr);
-    ierr = EPSAppendOptionsPrefix(ctx->eps,"nep_");CHKERRQ(ierr);
+    ierr = EPSAppendOptionsPrefix(ctx->eps,"nep_slp_");CHKERRQ(ierr);
     ierr = EPSGetST(ctx->eps,&st);CHKERRQ(ierr);
     ierr = STSetOptionsPrefix(st,((PetscObject)ctx->eps)->prefix);CHKERRQ(ierr);
     ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->eps,(PetscObject)nep,1);CHKERRQ(ierr);
@@ -252,7 +242,7 @@ PetscErrorCode NEPSLPGetEPS(NEP nep,EPS *eps)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidPointer(eps,2);
-  ierr = PetscTryMethod(nep,"NEPSLPGetEPS_C",(NEP,EPS*),(nep,eps));CHKERRQ(ierr);
+  ierr = PetscUseMethod(nep,"NEPSLPGetEPS_C",(NEP,EPS*),(nep,eps));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -262,12 +252,16 @@ PetscErrorCode NEPView_SLP(NEP nep,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  if (!ctx->eps) { ierr = NEPSLPGetEPS(nep,&ctx->eps);CHKERRQ(ierr); }
-  ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-  ierr = EPSView(ctx->eps,viewer);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!ctx->eps) { ierr = NEPSLPGetEPS(nep,&ctx->eps);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = EPSView(ctx->eps,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/nep/impls/slp/slp.c.html b/src/nep/impls/slp/slp.c.html
index 3fe3624..e0a42e9 100644
--- a/src/nep/impls/slp/slp.c.html
+++ b/src/nep/impls/slp/slp.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/impls/slp/slp.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:20+00:00">
+<meta name="date" content="2016-05-16T10:34:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/impls/slp/slp.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/impls/slp/slp.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc nonlinear eigensolver: "slp"</font>
@@ -27,7 +27,7 @@
 
 <a name="line16"> 16: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line17"> 17: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line18"> 18: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line20"> 20: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -57,231 +57,225 @@
 <a name="line48"> 48: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
 <a name="line49"> 49: </a>  PetscBool      istrivial;
 
-<a name="line52"> 52: </a>  <font color="#4169E1">if</font> (nep->ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line53"> 53: </a>    <font color="#4169E1">if</font> (nep->ncv<nep->nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line54"> 54: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line55"> 55: </a>    nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line56"> 56: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
-<a name="line57"> 57: </a>    <font color="#4169E1">if</font> (nep->nev<500) nep->ncv = PetscMin(nep->n,PetscMax(2*nep->nev,nep->nev+15));
-<a name="line58"> 58: </a>    <font color="#4169E1">else</font> {
-<a name="line59"> 59: </a>      nep->mpd = 500;
-<a name="line60"> 60: </a>      nep->ncv = PetscMin(nep->n,nep->nev+nep->mpd);
-<a name="line61"> 61: </a>    }
-<a name="line62"> 62: </a>  }
-<a name="line63"> 63: </a>  <font color="#4169E1">if</font> (!nep->mpd) nep->mpd = nep->ncv;
-<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
-<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (nep->nev>1) { PetscInfo(nep,<font color="#666666">"Warning: requested more than one eigenpair but SLP can only compute one\n"</font>); }
-<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
-<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (!nep->max_funcs) nep->max_funcs = nep->max_it;
-
-<a name="line69"> 69: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
-<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
-
-<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(nep,&ctx->eps); }
-<a name="line73"> 73: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(ctx->eps,EPS_TARGET_MAGNITUDE);
-<a name="line74"> 74: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,0.0);
-<a name="line75"> 75: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
-<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT);
-<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(ctx->eps,1,nep->ncv?nep->ncv:PETSC_DEFAULT,nep->mpd?nep->mpd:PETSC_DEFAULT);
-<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(ctx->eps,nep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:nep->rtol/10.0,nep->max_it?nep->max_it:PETSC_DEFAULT);
-
-<a name="line80"> 80: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
-<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,1);
-<a name="line82"> 82: </a>  <font color="#4169E1">return</font>(0);
-<a name="line83"> 83: </a>}
-
-<a name="line87"> 87: </a><strong><font color="#4169E1"><a name="NEPSolve_SLP"></a>PetscErrorCode NEPSolve_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line88"> 88: </a>{
-<a name="line90"> 90: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-<a name="line91"> 91: </a>  Mat            T=nep->function,Tp=nep->jacobian;
-<a name="line92"> 92: </a>  Vec            u,r=nep->work[0];
-<a name="line93"> 93: </a>  PetscScalar    lambda,mu,im;
-<a name="line94"> 94: </a>  PetscReal      relerr;
-<a name="line95"> 95: </a>  PetscInt       nconv;
-
-<a name="line98"> 98: </a>  <font color="#B22222">/* get initial approximation of eigenvalue and eigenvector */</font>
-<a name="line99"> 99: </a>  NEPGetDefaultShift(nep,&lambda);
-<a name="line100">100: </a>  <font color="#4169E1">if</font> (!nep->nini) {
-<a name="line101">101: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,0,nep->rand);
-<a name="line102">102: </a>  }
-<a name="line103">103: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&u);
-
-<a name="line105">105: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line106">106: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
-<a name="line107">107: </a>    nep->its++;
-
-<a name="line109">109: </a>    <font color="#B22222">/* evaluate T(lambda) and T'(lambda) */</font>
-<a name="line110">110: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
-<a name="line111">111: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(nep,lambda,Tp);
-
-<a name="line113">113: </a>    <font color="#B22222">/* form residual,  r = T(lambda)*u (used in convergence test only) */</font>
-<a name="line114">114: </a>    MatMult(T,u,r);
-
-<a name="line116">116: </a>    <font color="#B22222">/* convergence test */</font>
-<a name="line117">117: </a>    VecNorm(r,NORM_2,&relerr);
-<a name="line118">118: </a>    nep->errest[nep->nconv] = relerr;
-<a name="line119">119: </a>    nep->eigr[nep->nconv] = lambda;
-<a name="line120">120: </a>    <font color="#4169E1">if</font> (relerr<=nep->rtol) {
-<a name="line121">121: </a>      nep->nconv = nep->nconv + 1;
-<a name="line122">122: </a>      nep->reason = NEP_CONVERGED_FNORM_RELATIVE;
-<a name="line123">123: </a>    }
-<a name="line124">124: </a>    NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,1);
-
-<a name="line126">126: </a>    <font color="#4169E1">if</font> (!nep->nconv) {
-<a name="line127">127: </a>      <font color="#B22222">/* compute eigenvalue correction mu and eigenvector approximation u */</font>
-<a name="line128">128: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,T,Tp);
-<a name="line129">129: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(ctx->eps,1,&u);
-<a name="line130">130: </a>      <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(ctx->eps);
-<a name="line131">131: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(ctx->eps,&nconv);
-<a name="line132">132: </a>      <font color="#4169E1">if</font> (!nconv) {
-<a name="line133">133: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, inner iteration failed, stopping solve\n"</font>,nep->its);
-<a name="line134">134: </a>        nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
-<a name="line135">135: </a>        <font color="#4169E1">break</font>;
-<a name="line136">136: </a>      }
-<a name="line137">137: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(ctx->eps,0,&mu,&im,u,NULL);
-<a name="line138">138: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(im)>PETSC_MACHINE_EPSILON) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Complex eigenvalue approximation - not implemented in real scalars"</font>);
-
-<a name="line140">140: </a>      <font color="#B22222">/* correct eigenvalue */</font>
-<a name="line141">141: </a>      lambda = lambda - mu;
-<a name="line142">142: </a>    }
-<a name="line143">143: </a>    <font color="#4169E1">if</font> (nep->its >= nep->max_it) nep->reason = NEP_DIVERGED_MAX_IT;
-<a name="line144">144: </a>  }
-<a name="line145">145: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&u);
-<a name="line146">146: </a>  <font color="#4169E1">return</font>(0);
-<a name="line147">147: </a>}
-
-<a name="line151">151: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_SLP"></a>PetscErrorCode NEPSetFromOptions_SLP(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line152">152: </a>{
-<a name="line154">154: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-
-<a name="line157">157: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> SLP Options"</font>);
-<a name="line158">158: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(nep,&ctx->eps); }
-<a name="line159">159: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(ctx->eps);
-<a name="line160">160: </a>  PetscOptionsTail();
-<a name="line161">161: </a>  <font color="#4169E1">return</font>(0);
-<a name="line162">162: </a>}
-
-<a name="line166">166: </a><strong><font color="#4169E1"><a name="NEPSLPSetEPS_SLP"></a>static PetscErrorCode NEPSLPSetEPS_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line167">167: </a>{
-<a name="line169">169: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-
-<a name="line172">172: </a>  PetscObjectReference((PetscObject)eps);
-<a name="line173">173: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
-<a name="line174">174: </a>  ctx->eps = eps;
-<a name="line175">175: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->eps);
-<a name="line176">176: </a>  nep->state = NEP_STATE_INITIAL;
-<a name="line177">177: </a>  <font color="#4169E1">return</font>(0);
-<a name="line178">178: </a>}
-
-<a name="line182">182: </a><font color="#B22222">/*@</font>
-<a name="line183">183: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a> - Associate a linear eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
-<a name="line184">184: </a><font color="#B22222">   nonlinear eigenvalue solver.</font>
-
-<a name="line186">186: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line188">188: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line189">189: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
-<a name="line190">190: </a><font color="#B22222">-  eps - the eigensolver object</font>
-
-<a name="line192">192: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line194">194: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>()</font>
-<a name="line195">195: </a><font color="#B22222">@*/</font>
-<a name="line196">196: </a><strong><font color="#4169E1"><a name="NEPSLPSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line197">197: </a>{
-
-<a name="line204">204: </a>  PetscTryMethod(nep,<font color="#666666">"NEPSLPSetEPS_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(nep,eps));
-<a name="line205">205: </a>  <font color="#4169E1">return</font>(0);
-<a name="line206">206: </a>}
-
-<a name="line210">210: </a><strong><font color="#4169E1"><a name="NEPSLPGetEPS_SLP"></a>static PetscErrorCode NEPSLPGetEPS_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line211">211: </a>{
-<a name="line213">213: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-<a name="line214">214: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-
-<a name="line217">217: </a>  <font color="#4169E1">if</font> (!ctx->eps) {
-<a name="line218">218: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)nep),&ctx->eps);
-<a name="line219">219: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(ctx->eps,((PetscObject)nep)->prefix);
-<a name="line220">220: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(ctx->eps,<font color="#666666">"nep_"</font>);
-<a name="line221">221: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
-<a name="line222">222: </a>    <a href="../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(st,((PetscObject)ctx->eps)->prefix);
-<a name="line223">223: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->eps,(PetscObject)nep,1);
-<a name="line224">224: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->eps);
-<a name="line225">225: </a>  }
-<a name="line226">226: </a>  *eps = ctx->eps;
-<a name="line227">227: </a>  <font color="#4169E1">return</font>(0);
-<a name="line228">228: </a>}
-
-<a name="line232">232: </a><font color="#B22222">/*@</font>
-<a name="line233">233: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a> - Retrieve the linear eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
-<a name="line234">234: </a><font color="#B22222">   to the nonlinear eigenvalue solver.</font>
-
-<a name="line236">236: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line238">238: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line239">239: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
-
-<a name="line241">241: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line242">242: </a><font color="#B22222">.  eps - the eigensolver object</font>
-
-<a name="line244">244: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line246">246: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a>()</font>
-<a name="line247">247: </a><font color="#B22222">@*/</font>
-<a name="line248">248: </a><strong><font color="#4169E1"><a name="NEPSLPGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line249">249: </a>{
-
-<a name="line255">255: </a>  PetscTryMethod(nep,<font color="#666666">"NEPSLPGetEPS_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(nep,eps));
-<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
-<a name="line257">257: </a>}
-
-<a name="line261">261: </a><strong><font color="#4169E1"><a name="NEPView_SLP"></a>PetscErrorCode NEPView_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line262">262: </a>{
-<a name="line264">264: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-
-<a name="line267">267: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(nep,&ctx->eps); }
-<a name="line268">268: </a>  PetscViewerASCIIPushTab(viewer);
-<a name="line269">269: </a>  <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(ctx->eps,viewer);
-<a name="line270">270: </a>  PetscViewerASCIIPopTab(viewer);
-<a name="line271">271: </a>  <font color="#4169E1">return</font>(0);
-<a name="line272">272: </a>}
-
-<a name="line276">276: </a><strong><font color="#4169E1"><a name="NEPReset_SLP"></a>PetscErrorCode NEPReset_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line277">277: </a>{
-<a name="line279">279: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-
-<a name="line282">282: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(ctx->eps); }
-<a name="line283">283: </a>  <font color="#4169E1">return</font>(0);
-<a name="line284">284: </a>}
-
-<a name="line288">288: </a><strong><font color="#4169E1"><a name="NEPDestroy_SLP"></a>PetscErrorCode NEPDestroy_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line289">289: </a>{
-<a name="line291">291: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
-
-<a name="line294">294: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
-<a name="line295">295: </a>  PetscFree(nep->data);
-<a name="line296">296: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPSetEPS_C"</font>,NULL);
-<a name="line297">297: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPGetEPS_C"</font>,NULL);
-<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
-<a name="line299">299: </a>}
-
-<a name="line303">303: </a><strong><font color="#4169E1"><a name="NEPCreate_SLP"></a>PETSC_EXTERN PetscErrorCode NEPCreate_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line304">304: </a>{
-<a name="line306">306: </a>  NEP_SLP        *ctx;
-
-<a name="line309">309: </a>  PetscNewLog(nep,&ctx);
-<a name="line310">310: </a>  nep->data = (void*)ctx;
-
-<a name="line312">312: </a>  nep->ops->solve          = NEPSolve_SLP;
-<a name="line313">313: </a>  nep->ops->setup          = NEPSetUp_SLP;
-<a name="line314">314: </a>  nep->ops->setfromoptions = NEPSetFromOptions_SLP;
-<a name="line315">315: </a>  nep->ops->reset          = NEPReset_SLP;
-<a name="line316">316: </a>  nep->ops->destroy        = NEPDestroy_SLP;
-<a name="line317">317: </a>  nep->ops->view           = NEPView_SLP;
-<a name="line318">318: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPSetEPS_C"</font>,NEPSLPSetEPS_SLP);
-<a name="line319">319: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPGetEPS_C"</font>,NEPSLPGetEPS_SLP);
-<a name="line320">320: </a>  <font color="#4169E1">return</font>(0);
-<a name="line321">321: </a>}
+<a name="line52"> 52: </a>  <font color="#4169E1">if</font> (nep->nev>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Requested several eigenpairs but this solver can compute only one"</font>);
+<a name="line53"> 53: </a>  <font color="#4169E1">if</font> (nep->ncv) { PetscInfo(nep,<font color="#666666">"Setting ncv = 1, ignoring user-provided value\n"</font>); }
+<a name="line54"> 54: </a>  nep->ncv = 1;
+<a name="line55"> 55: </a>  <font color="#4169E1">if</font> (nep->mpd) { PetscInfo(nep,<font color="#666666">"Setting mpd = 1, ignoring user-provided value\n"</font>); }
+<a name="line56"> 56: </a>  nep->mpd = 1;
+<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (nep->ncv>nep->nev+nep->mpd) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (!nep->max_it) nep->max_it = PetscMax(5000,2*nep->n/nep->ncv);
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (nep->which && nep->which!=NEP_TARGET_MAGNITUDE) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Wrong value of which"</font>);
+
+<a name="line61"> 61: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line62"> 62: </a>  <font color="#4169E1">if</font> (!istrivial) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"This solver does not support region filtering"</font>);
+
+<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(nep,&ctx->eps); }
+<a name="line65"> 65: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(ctx->eps,EPS_TARGET_MAGNITUDE);
+<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,0.0);
+<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT);
+<a name="line69"> 69: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(ctx->eps,nep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:nep->tol/10.0,nep->max_it?nep->max_it:PETSC_DEFAULT);
+
+<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(nep,0);
+<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,1);
+<a name="line73"> 73: </a>  <font color="#4169E1">return</font>(0);
+<a name="line74"> 74: </a>}
+
+<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="NEPSolve_SLP"></a>PetscErrorCode NEPSolve_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line79"> 79: </a>{
+<a name="line81"> 81: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+<a name="line82"> 82: </a>  Mat            T=nep->function,Tp=nep->jacobian;
+<a name="line83"> 83: </a>  Vec            u,r=nep->work[0];
+<a name="line84"> 84: </a>  PetscScalar    lambda,mu,im;
+<a name="line85"> 85: </a>  PetscReal      resnorm;
+<a name="line86"> 86: </a>  PetscInt       nconv;
+
+<a name="line89"> 89: </a>  <font color="#B22222">/* get initial approximation of eigenvalue and eigenvector */</font>
+<a name="line90"> 90: </a>  NEPGetDefaultShift(nep,&lambda);
+<a name="line91"> 91: </a>  <font color="#4169E1">if</font> (!nep->nini) {
+<a name="line92"> 92: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(nep->V,0);
+<a name="line93"> 93: </a>  }
+<a name="line94"> 94: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&u);
+
+<a name="line96"> 96: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line97"> 97: </a>  <font color="#4169E1">while</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line98"> 98: </a>    nep->its++;
+
+<a name="line100">100: </a>    <font color="#B22222">/* evaluate T(lambda) and T'(lambda) */</font>
+<a name="line101">101: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
+<a name="line102">102: </a>    <a href="../../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(nep,lambda,Tp);
+
+<a name="line104">104: </a>    <font color="#B22222">/* form residual,  r = T(lambda)*u (used in convergence test only) */</font>
+<a name="line105">105: </a>    MatMult(T,u,r);
+
+<a name="line107">107: </a>    <font color="#B22222">/* convergence test */</font>
+<a name="line108">108: </a>    VecNorm(r,NORM_2,&resnorm);
+<a name="line109">109: </a>    (*nep->converged)(nep,lambda,0,resnorm,&nep->errest[nep->nconv],nep->convergedctx);
+<a name="line110">110: </a>    nep->eigr[nep->nconv] = lambda;
+<a name="line111">111: </a>    <font color="#4169E1">if</font> (nep->errest[nep->nconv]<=nep->tol) {
+<a name="line112">112: </a>      nep->nconv = nep->nconv + 1;
+<a name="line113">113: </a>    }
+<a name="line114">114: </a>    (*nep->stopping)(nep,nep->its,nep->max_it,nep->nconv,nep->nev,&nep->reason,nep->stoppingctx);
+<a name="line115">115: </a>    NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->eigi,nep->errest,1);
+
+<a name="line117">117: </a>    <font color="#4169E1">if</font> (nep->reason == NEP_CONVERGED_ITERATING) {
+<a name="line118">118: </a>      <font color="#B22222">/* compute eigenvalue correction mu and eigenvector approximation u */</font>
+<a name="line119">119: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,T,Tp);
+<a name="line120">120: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(ctx->eps,1,&u);
+<a name="line121">121: </a>      <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(ctx->eps);
+<a name="line122">122: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(ctx->eps,&nconv);
+<a name="line123">123: </a>      <font color="#4169E1">if</font> (!nconv) {
+<a name="line124">124: </a>        PetscInfo1(nep,<font color="#666666">"iter=%D, inner iteration failed, stopping solve\n"</font>,nep->its);
+<a name="line125">125: </a>        nep->reason = NEP_DIVERGED_LINEAR_SOLVE;
+<a name="line126">126: </a>        <font color="#4169E1">break</font>;
+<a name="line127">127: </a>      }
+<a name="line128">128: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(ctx->eps,0,&mu,&im,u,NULL);
+<a name="line129">129: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(im)>PETSC_MACHINE_EPSILON) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Complex eigenvalue approximation - not implemented in real scalars"</font>);
+
+<a name="line131">131: </a>      <font color="#B22222">/* correct eigenvalue */</font>
+<a name="line132">132: </a>      lambda = lambda - mu;
+<a name="line133">133: </a>    }
+<a name="line134">134: </a>  }
+<a name="line135">135: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&u);
+<a name="line136">136: </a>  <font color="#4169E1">return</font>(0);
+<a name="line137">137: </a>}
+
+<a name="line141">141: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions_SLP"></a>PetscErrorCode NEPSetFromOptions_SLP(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line142">142: </a>{
+<a name="line144">144: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+
+<a name="line147">147: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> SLP Options"</font>);
+<a name="line148">148: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(nep,&ctx->eps); }
+<a name="line149">149: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(ctx->eps);
+<a name="line150">150: </a>  PetscOptionsTail();
+<a name="line151">151: </a>  <font color="#4169E1">return</font>(0);
+<a name="line152">152: </a>}
+
+<a name="line156">156: </a><strong><font color="#4169E1"><a name="NEPSLPSetEPS_SLP"></a>static PetscErrorCode NEPSLPSetEPS_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line157">157: </a>{
+<a name="line159">159: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+
+<a name="line162">162: </a>  PetscObjectReference((PetscObject)eps);
+<a name="line163">163: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
+<a name="line164">164: </a>  ctx->eps = eps;
+<a name="line165">165: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->eps);
+<a name="line166">166: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
+<a name="line168">168: </a>}
+
+<a name="line172">172: </a><font color="#B22222">/*@</font>
+<a name="line173">173: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a> - Associate a linear eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
+<a name="line174">174: </a><font color="#B22222">   nonlinear eigenvalue solver.</font>
+
+<a name="line176">176: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line178">178: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line179">179: </a><font color="#B22222">+  nep - nonlinear eigenvalue solver</font>
+<a name="line180">180: </a><font color="#B22222">-  eps - the eigensolver object</font>
+
+<a name="line182">182: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line184">184: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>()</font>
+<a name="line185">185: </a><font color="#B22222">@*/</font>
+<a name="line186">186: </a><strong><font color="#4169E1"><a name="NEPSLPSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line187">187: </a>{
+
+<a name="line194">194: </a>  PetscTryMethod(nep,<font color="#666666">"NEPSLPSetEPS_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(nep,eps));
+<a name="line195">195: </a>  <font color="#4169E1">return</font>(0);
+<a name="line196">196: </a>}
+
+<a name="line200">200: </a><strong><font color="#4169E1"><a name="NEPSLPGetEPS_SLP"></a>static PetscErrorCode NEPSLPGetEPS_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line201">201: </a>{
+<a name="line203">203: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+<a name="line204">204: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line207">207: </a>  <font color="#4169E1">if</font> (!ctx->eps) {
+<a name="line208">208: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)nep),&ctx->eps);
+<a name="line209">209: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(ctx->eps,((PetscObject)nep)->prefix);
+<a name="line210">210: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(ctx->eps,<font color="#666666">"nep_slp_"</font>);
+<a name="line211">211: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
+<a name="line212">212: </a>    <a href="../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(st,((PetscObject)ctx->eps)->prefix);
+<a name="line213">213: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->eps,(PetscObject)nep,1);
+<a name="line214">214: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)ctx->eps);
+<a name="line215">215: </a>  }
+<a name="line216">216: </a>  *eps = ctx->eps;
+<a name="line217">217: </a>  <font color="#4169E1">return</font>(0);
+<a name="line218">218: </a>}
+
+<a name="line222">222: </a><font color="#B22222">/*@</font>
+<a name="line223">223: </a><font color="#B22222">   <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a> - Retrieve the linear eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
+<a name="line224">224: </a><font color="#B22222">   to the nonlinear eigenvalue solver.</font>
+
+<a name="line226">226: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line228">228: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line229">229: </a><font color="#B22222">.  nep - nonlinear eigenvalue solver</font>
+
+<a name="line231">231: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line232">232: </a><font color="#B22222">.  eps - the eigensolver object</font>
+
+<a name="line234">234: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line236">236: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/NEP/NEPSLPSetEPS.html#NEPSLPSetEPS">NEPSLPSetEPS</a>()</font>
+<a name="line237">237: </a><font color="#B22222">@*/</font>
+<a name="line238">238: </a><strong><font color="#4169E1"><a name="NEPSLPGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line239">239: </a>{
+
+<a name="line245">245: </a>  PetscUseMethod(nep,<font color="#666666">"NEPSLPGetEPS_C"</font>,(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(nep,eps));
+<a name="line246">246: </a>  <font color="#4169E1">return</font>(0);
+<a name="line247">247: </a>}
+
+<a name="line251">251: </a><strong><font color="#4169E1"><a name="NEPView_SLP"></a>PetscErrorCode NEPView_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line252">252: </a>{
+<a name="line254">254: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+<a name="line255">255: </a>  PetscBool      isascii;
+
+<a name="line258">258: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line259">259: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line260">260: </a>    <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/NEP/NEPSLPGetEPS.html#NEPSLPGetEPS">NEPSLPGetEPS</a>(nep,&ctx->eps); }
+<a name="line261">261: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line262">262: </a>    <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(ctx->eps,viewer);
+<a name="line263">263: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line264">264: </a>  }
+<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
+<a name="line266">266: </a>}
+
+<a name="line270">270: </a><strong><font color="#4169E1"><a name="NEPReset_SLP"></a>PetscErrorCode NEPReset_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line271">271: </a>{
+<a name="line273">273: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+
+<a name="line276">276: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(ctx->eps); }
+<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="NEPDestroy_SLP"></a>PetscErrorCode NEPDestroy_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line283">283: </a>{
+<a name="line285">285: </a>  NEP_SLP        *ctx = (NEP_SLP*)nep->data;
+
+<a name="line288">288: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
+<a name="line289">289: </a>  PetscFree(nep->data);
+<a name="line290">290: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPSetEPS_C"</font>,NULL);
+<a name="line291">291: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPGetEPS_C"</font>,NULL);
+<a name="line292">292: </a>  <font color="#4169E1">return</font>(0);
+<a name="line293">293: </a>}
+
+<a name="line297">297: </a><strong><font color="#4169E1"><a name="NEPCreate_SLP"></a>PETSC_EXTERN PetscErrorCode NEPCreate_SLP(<a href="../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line298">298: </a>{
+<a name="line300">300: </a>  NEP_SLP        *ctx;
+
+<a name="line303">303: </a>  PetscNewLog(nep,&ctx);
+<a name="line304">304: </a>  nep->data = (void*)ctx;
+
+<a name="line306">306: </a>  nep->ops->solve          = NEPSolve_SLP;
+<a name="line307">307: </a>  nep->ops->setup          = NEPSetUp_SLP;
+<a name="line308">308: </a>  nep->ops->setfromoptions = NEPSetFromOptions_SLP;
+<a name="line309">309: </a>  nep->ops->reset          = NEPReset_SLP;
+<a name="line310">310: </a>  nep->ops->destroy        = NEPDestroy_SLP;
+<a name="line311">311: </a>  nep->ops->view           = NEPView_SLP;
+<a name="line312">312: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPSetEPS_C"</font>,NEPSLPSetEPS_SLP);
+<a name="line313">313: </a>  PetscObjectComposeFunction((PetscObject)nep,<font color="#666666">"NEPSLPGetEPS_C"</font>,NEPSLPGetEPS_SLP);
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/index.html b/src/nep/index.html
index 82e5a8c..7225bba 100644
--- a/src/nep/index.html
+++ b/src/nep/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/interface/dlregisnep.c b/src/nep/interface/dlregisnep.c
index 05c21c6..fc8fd4e 100644
--- a/src/nep/interface/dlregisnep.c
+++ b/src/nep/interface/dlregisnep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -25,8 +25,9 @@ static PetscBool NEPPackageInitialized = PETSC_FALSE;
 
 const char *NEPErrorTypes[] = {"ABSOLUTE","RELATIVE","NEPErrorType","NEP_ERROR_",0};
 const char *NEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","NEPRefine","NEP_REFINE_",0};
-const char *const NEPConvergedReasons_Shifted[] = {"DIVERGED_FNORM_NAN","DIVERGED_BREAKDOWN","DIVERGED_MAX_IT","DIVERGED_FUNCTION_COUNT","DIVERGED_LINEAR_SOLVE","CONVERGED_ITERATING","","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE","CONVERGED_SNORM_RELATIVE","NEPConvergedReason","NEP_",0};
-const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 5;
+const char *NEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","NEPRefineScheme","NEP_REFINE_SCHEME_",0};
+const char *const NEPConvergedReasons_Shifted[] = {"DIVERGED_LINEAR_SOLVE","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","NEPConvergedReason","NEP_",0};
+const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 4;
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPFinalizePackage"
@@ -80,8 +81,9 @@ PetscErrorCode NEPInitializePackage(void)
   ierr = PetscLogEventRegister("NEPRefine",NEP_CLASSID,&NEP_Refine);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("NEPFunctionEval",NEP_CLASSID,&NEP_FunctionEval);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("NEPJacobianEval",NEP_CLASSID,&NEP_JacobianEval);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("NEPDerivativesEval",NEP_CLASSID,&NEP_DerivativesEval);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"nep",&className);CHKERRQ(ierr);
     if (className) {
@@ -89,7 +91,7 @@ PetscErrorCode NEPInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"nep",&className);CHKERRQ(ierr);
     if (className) {
diff --git a/src/nep/interface/dlregisnep.c.html b/src/nep/interface/dlregisnep.c.html
index dcaf414..6b703bf 100644
--- a/src/nep/interface/dlregisnep.c.html
+++ b/src/nep/interface/dlregisnep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/dlregisnep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:20+00:00">
+<meta name="date" content="2016-05-16T10:34:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/dlregisnep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/dlregisnep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -37,89 +37,91 @@
 
 <a name="line26"> 26: </a>const char *NEPErrorTypes[] = {<font color="#666666">"ABSOLUTE"</font>,<font color="#666666">"RELATIVE"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>"</font>,<font color="#666666">"NEP_ERROR_"</font>,0};
 <a name="line27"> 27: </a>const char *NEPRefineTypes[] = {<font color="#666666">"NONE"</font>,<font color="#666666">"SIMPLE"</font>,<font color="#666666">"MULTIPLE"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>"</font>,<font color="#666666">"NEP_REFINE_"</font>,0};
-<a name="line28"> 28: </a>const char *const NEPConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_FNORM_NAN"</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_MAX_IT"</font>,<font color="#666666">"DIVERGED_FUNCTION_COUNT"</font>,<font color="#666666">"DIVERGED_LINEAR_SOLVE"</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_FNORM_ABS"</font>,<font color="#666666">"CON [...]
-<a name="line29"> 29: </a>const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 5;
-
-<a name="line33"> 33: </a><font color="#B22222">/*@C</font>
-<a name="line34"> 34: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</a> - This function destroys everything in the Slepc interface</font>
-<a name="line35"> 35: </a><font color="#B22222">   to the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package. It is called from <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
-
-<a name="line37"> 37: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line39"> 39: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
-<a name="line40"> 40: </a><font color="#B22222">@*/</font>
-<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="NEPFinalizePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</a>(void)</font></strong>
-<a name="line42"> 42: </a>{
-
-<a name="line46"> 46: </a>  PetscFunctionListDestroy(&NEPList);
-<a name="line47"> 47: </a>  NEPPackageInitialized = PETSC_FALSE;
-<a name="line48"> 48: </a>  NEPRegisterAllCalled  = PETSC_FALSE;
-<a name="line49"> 49: </a>  <font color="#4169E1">return</font>(0);
-<a name="line50"> 50: </a>}
-
-<a name="line54"> 54: </a><font color="#B22222">/*@C</font>
-<a name="line55"> 55: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</a> - This function initializes everything in the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package.</font>
-<a name="line56"> 56: </a><font color="#B22222">   It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
-<a name="line57"> 57: </a><font color="#B22222">   on the first call to <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>() when using static libraries.</font>
-
-<a name="line59"> 59: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line61"> 61: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
-<a name="line62"> 62: </a><font color="#B22222">@*/</font>
-<a name="line63"> 63: </a><strong><font color="#4169E1"><a name="NEPInitializePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</a>(void)</font></strong>
-<a name="line64"> 64: </a>{
-<a name="line65"> 65: </a>  char           logList[256];
-<a name="line66"> 66: </a>  char           *className;
-<a name="line67"> 67: </a>  PetscBool      opt;
-
-<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (NEPPackageInitialized) <font color="#4169E1">return</font>(0);
-<a name="line72"> 72: </a>  NEPPackageInitialized = PETSC_TRUE;
-<a name="line73"> 73: </a>  <font color="#B22222">/* Register Classes */</font>
-<a name="line74"> 74: </a>  PetscClassIdRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> Solver"</font>,&NEP_CLASSID);
-<a name="line75"> 75: </a>  <font color="#B22222">/* Register Constructors */</font>
-<a name="line76"> 76: </a>  <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>();
-<a name="line77"> 77: </a>  <font color="#B22222">/* Register Events */</font>
-<a name="line78"> 78: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>"</font>,NEP_CLASSID,&NEP_SetUp);
-<a name="line79"> 79: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>"</font>,NEP_CLASSID,&NEP_Solve);
-<a name="line80"> 80: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>"</font>,NEP_CLASSID,&NEP_Refine);
-<a name="line81"> 81: </a>  PetscLogEventRegister(<font color="#666666">"NEPFunctionEval"</font>,NEP_CLASSID,&NEP_FunctionEval);
-<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"NEPJacobianEval"</font>,NEP_CLASSID,&NEP_JacobianEval);
-<a name="line83"> 83: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line84"> 84: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line86"> 86: </a>    PetscStrstr(logList,<font color="#666666">"nep"</font>,&className);
-<a name="line87"> 87: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line88"> 88: </a>      PetscInfoDeactivateClass(NEP_CLASSID);
-<a name="line89"> 89: </a>    }
-<a name="line90"> 90: </a>  }
-<a name="line91"> 91: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line92"> 92: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
-<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line94"> 94: </a>    PetscStrstr(logList,<font color="#666666">"nep"</font>,&className);
-<a name="line95"> 95: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line96"> 96: </a>      PetscLogEventDeactivateClass(NEP_CLASSID);
-<a name="line97"> 97: </a>    }
-<a name="line98"> 98: </a>  }
-<a name="line99"> 99: </a>  PetscRegisterFinalize(<a href="../../../docs/manualpages/NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</a>);
-<a name="line100">100: </a>  <font color="#4169E1">return</font>(0);
-<a name="line101">101: </a>}
-
-<a name="line103">103: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
-
-<a name="line107">107: </a><font color="#B22222">/*</font>
-<a name="line108">108: </a><font color="#B22222">  PetscDLLibraryRegister - This function is called when the dynamic library</font>
-<a name="line109">109: </a><font color="#B22222">  it is in is opened.</font>
-
-<a name="line111">111: </a><font color="#B22222">  This one registers all the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> methods that are in the basic SLEPc libslepcnep</font>
-<a name="line112">112: </a><font color="#B22222">  library.</font>
-<a name="line113">113: </a><font color="#B22222"> */</font>
-<a name="line114">114: </a><strong><font color="#4169E1"><a name="PetscDLLibraryRegister_slepcnep"></a>PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcnep()</font></strong>
-<a name="line115">115: </a>{
-
-<a name="line119">119: </a>  <a href="../../../docs/manualpages/NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</a>();
-<a name="line120">120: </a>  <font color="#4169E1">return</font>(0);
-<a name="line121">121: </a>}
-<a name="line122">122: </a><font color="#A020F0">#endif </font><font color="#B22222">/* PETSC_HAVE_DYNAMIC_LIBRARIES */</font><font color="#A020F0"></font>
+<a name="line28"> 28: </a>const char *NEPRefineSchemes[] = {<font color="#666666">""</font>,<font color="#666666">"SCHUR"</font>,<font color="#666666">"MBE"</font>,<font color="#666666">"EXPLICIT"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a>"</font>,<font color="#666666">"NEP_REFINE_SCHEME_"</font>,0};
+<a name="line29"> 29: </a>const char *const NEPConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_LINEAR_SOLVE"</font>,<font color="#666666">""</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"CONVERGED_USER"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConve [...]
+<a name="line30"> 30: </a>const char *const*NEPConvergedReasons = NEPConvergedReasons_Shifted + 4;
+
+<a name="line34"> 34: </a><font color="#B22222">/*@C</font>
+<a name="line35"> 35: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</a> - This function destroys everything in the Slepc interface</font>
+<a name="line36"> 36: </a><font color="#B22222">   to the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package. It is called from <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
+
+<a name="line38"> 38: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line40"> 40: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
+<a name="line41"> 41: </a><font color="#B22222">@*/</font>
+<a name="line42"> 42: </a><strong><font color="#4169E1"><a name="NEPFinalizePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</a>(void)</font></strong>
+<a name="line43"> 43: </a>{
+
+<a name="line47"> 47: </a>  PetscFunctionListDestroy(&NEPList);
+<a name="line48"> 48: </a>  NEPPackageInitialized = PETSC_FALSE;
+<a name="line49"> 49: </a>  NEPRegisterAllCalled  = PETSC_FALSE;
+<a name="line50"> 50: </a>  <font color="#4169E1">return</font>(0);
+<a name="line51"> 51: </a>}
+
+<a name="line55"> 55: </a><font color="#B22222">/*@C</font>
+<a name="line56"> 56: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</a> - This function initializes everything in the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package.</font>
+<a name="line57"> 57: </a><font color="#B22222">   It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
+<a name="line58"> 58: </a><font color="#B22222">   on the first call to <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>() when using static libraries.</font>
+
+<a name="line60"> 60: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line62"> 62: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
+<a name="line63"> 63: </a><font color="#B22222">@*/</font>
+<a name="line64"> 64: </a><strong><font color="#4169E1"><a name="NEPInitializePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</a>(void)</font></strong>
+<a name="line65"> 65: </a>{
+<a name="line66"> 66: </a>  char           logList[256];
+<a name="line67"> 67: </a>  char           *className;
+<a name="line68"> 68: </a>  PetscBool      opt;
+
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (NEPPackageInitialized) <font color="#4169E1">return</font>(0);
+<a name="line73"> 73: </a>  NEPPackageInitialized = PETSC_TRUE;
+<a name="line74"> 74: </a>  <font color="#B22222">/* Register Classes */</font>
+<a name="line75"> 75: </a>  PetscClassIdRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> Solver"</font>,&NEP_CLASSID);
+<a name="line76"> 76: </a>  <font color="#B22222">/* Register Constructors */</font>
+<a name="line77"> 77: </a>  <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>();
+<a name="line78"> 78: </a>  <font color="#B22222">/* Register Events */</font>
+<a name="line79"> 79: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>"</font>,NEP_CLASSID,&NEP_SetUp);
+<a name="line80"> 80: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>"</font>,NEP_CLASSID,&NEP_Solve);
+<a name="line81"> 81: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a>"</font>,NEP_CLASSID,&NEP_Refine);
+<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"NEPFunctionEval"</font>,NEP_CLASSID,&NEP_FunctionEval);
+<a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"NEPJacobianEval"</font>,NEP_CLASSID,&NEP_JacobianEval);
+<a name="line84"> 84: </a>  PetscLogEventRegister(<font color="#666666">"NEPDerivativesEval"</font>,NEP_CLASSID,&NEP_DerivativesEval);
+<a name="line85"> 85: </a>  <font color="#B22222">/* Process info exclusions */</font>
+<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line88"> 88: </a>    PetscStrstr(logList,<font color="#666666">"nep"</font>,&className);
+<a name="line89"> 89: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line90"> 90: </a>      PetscInfoDeactivateClass(NEP_CLASSID);
+<a name="line91"> 91: </a>    }
+<a name="line92"> 92: </a>  }
+<a name="line93"> 93: </a>  <font color="#B22222">/* Process summary exclusions */</font>
+<a name="line94"> 94: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line96"> 96: </a>    PetscStrstr(logList,<font color="#666666">"nep"</font>,&className);
+<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line98"> 98: </a>      PetscLogEventDeactivateClass(NEP_CLASSID);
+<a name="line99"> 99: </a>    }
+<a name="line100">100: </a>  }
+<a name="line101">101: </a>  PetscRegisterFinalize(<a href="../../../docs/manualpages/NEP/NEPFinalizePackage.html#NEPFinalizePackage">NEPFinalizePackage</a>);
+<a name="line102">102: </a>  <font color="#4169E1">return</font>(0);
+<a name="line103">103: </a>}
+
+<a name="line105">105: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
+
+<a name="line109">109: </a><font color="#B22222">/*</font>
+<a name="line110">110: </a><font color="#B22222">  PetscDLLibraryRegister - This function is called when the dynamic library</font>
+<a name="line111">111: </a><font color="#B22222">  it is in is opened.</font>
+
+<a name="line113">113: </a><font color="#B22222">  This one registers all the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> methods that are in the basic SLEPc libslepcnep</font>
+<a name="line114">114: </a><font color="#B22222">  library.</font>
+<a name="line115">115: </a><font color="#B22222"> */</font>
+<a name="line116">116: </a><strong><font color="#4169E1"><a name="PetscDLLibraryRegister_slepcnep"></a>PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcnep()</font></strong>
+<a name="line117">117: </a>{
+
+<a name="line121">121: </a>  <a href="../../../docs/manualpages/NEP/NEPInitializePackage.html#NEPInitializePackage">NEPInitializePackage</a>();
+<a name="line122">122: </a>  <font color="#4169E1">return</font>(0);
+<a name="line123">123: </a>}
+<a name="line124">124: </a><font color="#A020F0">#endif </font><font color="#B22222">/* PETSC_HAVE_DYNAMIC_LIBRARIES */</font><font color="#A020F0"></font>
 
 </pre>
 </body>
diff --git a/src/nep/interface/ftn-auto/nepbasicf.c b/src/nep/interface/ftn-auto/nepbasicf.c
index d385f73..48255a9 100644
--- a/src/nep/interface/ftn-auto/nepbasicf.c
+++ b/src/nep/interface/ftn-auto/nepbasicf.c
@@ -74,14 +74,9 @@ extern void PetscRmPointer(void*);
 #define nepgetds_ nepgetds
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
-#define nepsetksp_ NEPSETKSP
+#define neprefinegetksp_ NEPREFINEGETKSP
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define nepsetksp_ nepsetksp
-#endif
-#ifdef PETSC_HAVE_FORTRAN_CAPS
-#define nepgetksp_ NEPGETKSP
-#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define nepgetksp_ nepgetksp
+#define neprefinegetksp_ neprefinegetksp
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
 #define nepsettarget_ NEPSETTARGET
@@ -152,13 +147,8 @@ PETSC_EXTERN void PETSC_STDCALL  nepgetds_(NEP nep,DS *ds, int *__ierr ){
 *__ierr = NEPGetDS(
 	(NEP)PetscToPointer((nep) ),ds);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepsetksp_(NEP nep,KSP ksp, int *__ierr ){
-*__ierr = NEPSetKSP(
-	(NEP)PetscToPointer((nep) ),
-	(KSP)PetscToPointer((ksp) ));
-}
-PETSC_EXTERN void PETSC_STDCALL  nepgetksp_(NEP nep,KSP *ksp, int *__ierr ){
-*__ierr = NEPGetKSP(
+PETSC_EXTERN void PETSC_STDCALL  neprefinegetksp_(NEP nep,KSP *ksp, int *__ierr ){
+*__ierr = NEPRefineGetKSP(
 	(NEP)PetscToPointer((nep) ),ksp);
 }
 PETSC_EXTERN void PETSC_STDCALL  nepsettarget_(NEP nep,PetscScalar *target, int *__ierr ){
diff --git a/src/nep/interface/ftn-auto/nepoptsf.c b/src/nep/interface/ftn-auto/nepoptsf.c
index 21f96bd..6419ff9 100644
--- a/src/nep/interface/ftn-auto/nepoptsf.c
+++ b/src/nep/interface/ftn-auto/nepoptsf.c
@@ -64,24 +64,24 @@ extern void PetscRmPointer(void*);
 #define nepgetwhicheigenpairs_ nepgetwhicheigenpairs
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
-#define nepsetlagpreconditioner_ NEPSETLAGPRECONDITIONER
+#define nepsetconvergencetest_ NEPSETCONVERGENCETEST
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define nepsetlagpreconditioner_ nepsetlagpreconditioner
+#define nepsetconvergencetest_ nepsetconvergencetest
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
-#define nepgetlagpreconditioner_ NEPGETLAGPRECONDITIONER
+#define nepgetconvergencetest_ NEPGETCONVERGENCETEST
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define nepgetlagpreconditioner_ nepgetlagpreconditioner
+#define nepgetconvergencetest_ nepgetconvergencetest
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
-#define nepsetconstcorrectiontol_ NEPSETCONSTCORRECTIONTOL
+#define nepsetstoppingtest_ NEPSETSTOPPINGTEST
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define nepsetconstcorrectiontol_ nepsetconstcorrectiontol
+#define nepsetstoppingtest_ nepsetstoppingtest
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
-#define nepgetconstcorrectiontol_ NEPGETCONSTCORRECTIONTOL
+#define nepgetstoppingtest_ NEPGETSTOPPINGTEST
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define nepgetconstcorrectiontol_ nepgetconstcorrectiontol
+#define nepgetstoppingtest_ nepgetstoppingtest
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
 #define nepsettrackall_ NEPSETTRACKALL
@@ -113,13 +113,13 @@ PETSC_EXTERN void PETSC_STDCALL  nepsetfromoptions_(NEP nep, int *__ierr ){
 *__ierr = NEPSetFromOptions(
 	(NEP)PetscToPointer((nep) ));
 }
-PETSC_EXTERN void PETSC_STDCALL  nepgettolerances_(NEP nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepgettolerances_(NEP nep,PetscReal *tol,PetscInt *maxits, int *__ierr ){
 *__ierr = NEPGetTolerances(
-	(NEP)PetscToPointer((nep) ),abstol,rtol,stol,maxit,maxf);
+	(NEP)PetscToPointer((nep) ),tol,maxits);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepsettolerances_(NEP nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepsettolerances_(NEP nep,PetscReal *tol,PetscInt *maxits, int *__ierr ){
 *__ierr = NEPSetTolerances(
-	(NEP)PetscToPointer((nep) ),*abstol,*rtol,*stol,*maxit,*maxf);
+	(NEP)PetscToPointer((nep) ),*tol,*maxits);
 }
 PETSC_EXTERN void PETSC_STDCALL  nepgetdimensions_(NEP nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd, int *__ierr ){
 *__ierr = NEPGetDimensions(
@@ -137,21 +137,21 @@ PETSC_EXTERN void PETSC_STDCALL  nepgetwhicheigenpairs_(NEP nep,NEPWhich *which,
 *__ierr = NEPGetWhichEigenpairs(
 	(NEP)PetscToPointer((nep) ),which);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepsetlagpreconditioner_(NEP nep,PetscInt *lag, int *__ierr ){
-*__ierr = NEPSetLagPreconditioner(
-	(NEP)PetscToPointer((nep) ),*lag);
+PETSC_EXTERN void PETSC_STDCALL  nepsetconvergencetest_(NEP nep,NEPConv *conv, int *__ierr ){
+*__ierr = NEPSetConvergenceTest(
+	(NEP)PetscToPointer((nep) ),*conv);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepgetlagpreconditioner_(NEP nep,PetscInt *lag, int *__ierr ){
-*__ierr = NEPGetLagPreconditioner(
-	(NEP)PetscToPointer((nep) ),lag);
+PETSC_EXTERN void PETSC_STDCALL  nepgetconvergencetest_(NEP nep,NEPConv *conv, int *__ierr ){
+*__ierr = NEPGetConvergenceTest(
+	(NEP)PetscToPointer((nep) ),conv);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepsetconstcorrectiontol_(NEP nep,PetscBool *cct, int *__ierr ){
-*__ierr = NEPSetConstCorrectionTol(
-	(NEP)PetscToPointer((nep) ),*cct);
+PETSC_EXTERN void PETSC_STDCALL  nepsetstoppingtest_(NEP nep,NEPStop *stop, int *__ierr ){
+*__ierr = NEPSetStoppingTest(
+	(NEP)PetscToPointer((nep) ),*stop);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepgetconstcorrectiontol_(NEP nep,PetscBool *cct, int *__ierr ){
-*__ierr = NEPGetConstCorrectionTol(
-	(NEP)PetscToPointer((nep) ),cct);
+PETSC_EXTERN void PETSC_STDCALL  nepgetstoppingtest_(NEP nep,NEPStop *stop, int *__ierr ){
+*__ierr = NEPGetStoppingTest(
+	(NEP)PetscToPointer((nep) ),stop);
 }
 PETSC_EXTERN void PETSC_STDCALL  nepsettrackall_(NEP nep,PetscBool *trackall, int *__ierr ){
 *__ierr = NEPSetTrackAll(
@@ -161,13 +161,13 @@ PETSC_EXTERN void PETSC_STDCALL  nepgettrackall_(NEP nep,PetscBool *trackall, in
 *__ierr = NEPGetTrackAll(
 	(NEP)PetscToPointer((nep) ),trackall);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepsetrefine_(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepsetrefine_(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,NEPRefineScheme *scheme, int *__ierr ){
 *__ierr = NEPSetRefine(
-	(NEP)PetscToPointer((nep) ),*refine,*npart,*tol,*its);
+	(NEP)PetscToPointer((nep) ),*refine,*npart,*tol,*its,*scheme);
 }
-PETSC_EXTERN void PETSC_STDCALL  nepgetrefine_(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  nepgetrefine_(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,NEPRefineScheme *scheme, int *__ierr ){
 *__ierr = NEPGetRefine(
-	(NEP)PetscToPointer((nep) ),refine,npart,tol,its);
+	(NEP)PetscToPointer((nep) ),refine,npart,tol,its,scheme);
 }
 #if defined(__cplusplus)
 }
diff --git a/src/nep/interface/ftn-custom/makefile b/src/nep/interface/ftn-custom/makefile
index 57a75a7..ec71b37 100644
--- a/src/nep/interface/ftn-custom/makefile
+++ b/src/nep/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/interface/ftn-custom/znepf.c b/src/nep/interface/ftn-custom/znepf.c
index 46ac35f..23e218d 100644
--- a/src/nep/interface/ftn-custom/znepf.c
+++ b/src/nep/interface/ftn-custom/znepf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,6 +40,11 @@
 #define nepmonitorset_              NEPMONITORSET
 #define nepmonitorconverged_        NEPMONITORCONVERGED
 #define nepmonitorfirst_            NEPMONITORFIRST
+#define nepconvergedabsolute_       NEPCONVERGEDABSOLUTE
+#define nepconvergedrelative_       NEPCONVERGEDRELATIVE
+#define nepsetconvergencetestfunction_ NEPSETCONVERGENCETESTFUNCTION
+#define nepsetstoppingtestfunction_ NEPSETSTOPPINGTESTFUNCTION
+#define nepseteigenvaluecomparison_ NEPSETEIGENVALUECOMPARISON
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
 #define nepview_                    nepview
 #define neperrorview_               neperrorview
@@ -57,48 +62,58 @@
 #define nepmonitorset_              nepmonitorset
 #define nepmonitorconverged_        nepmonitorconverged
 #define nepmonitorfirst_            nepmonitorfirst
+#define nepconvergedabsolute_       nepconvergedabsolute
+#define nepconvergedrelative_       nepconvergedrelative
+#define nepsetconvergencetestfunction_ nepsetconvergencetestfunction
+#define nepsetstoppingtestfunction_ nepsetstoppingtestfunction
+#define nepseteigenvaluecomparison_ nepseteigenvaluecomparison
 #endif
 
 /*
    These are not usually called from Fortran but allow Fortran users
    to transparently set these monitors from .F code, hence no STDCALL
 */
-PETSC_EXTERN void nepmonitorall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void nepmonitorall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = NEPMonitorAll(*nep,*it,*nconv,eig,errest,*nest,ctx);
+  *ierr = NEPMonitorAll(*nep,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void nepmonitorlg_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void nepmonitorconverged_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)
 {
-  *ierr = NEPMonitorLG(*nep,*it,*nconv,eig,errest,*nest,ctx);
+  *ierr = NEPMonitorConverged(*nep,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void nepmonitorlgall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void nepmonitorfirst_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = NEPMonitorLGAll(*nep,*it,*nconv,eig,errest,*nest,ctx);
+  *ierr = NEPMonitorFirst(*nep,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void nepmonitorconverged_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void nepmonitorlg_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = NEPMonitorConverged(*nep,*it,*nconv,eig,errest,*nest,ctx);
+  *ierr = NEPMonitorLG(*nep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
 }
 
-PETSC_EXTERN void nepmonitorfirst_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eig,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void nepmonitorlgall_(NEP *nep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = NEPMonitorFirst(*nep,*it,*nconv,eig,errest,*nest,ctx);
+  *ierr = NEPMonitorLGAll(*nep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
 }
 
 static struct {
   PetscFortranCallbackId monitor;
   PetscFortranCallbackId monitordestroy;
+  PetscFortranCallbackId convergence;
+  PetscFortranCallbackId convdestroy;
+  PetscFortranCallbackId stopping;
+  PetscFortranCallbackId stopdestroy;
+  PetscFortranCallbackId comparison;
 } _cb;
 
 /* These are not extern C because they are passed into non-extern C user level functions */
 #undef __FUNCT__
 #define __FUNCT__ "ourmonitor"
-static PetscErrorCode ourmonitor(NEP nep,PetscInt i,PetscInt nc,PetscScalar *eig,PetscReal *d,PetscInt l,void* ctx)
+static PetscErrorCode ourmonitor(NEP nep,PetscInt i,PetscInt nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,PetscInt l,void* ctx)
 {
-  PetscObjectUseFortranCallback(nep,_cb.monitor,(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),(&nep,&i,&nc,eig,d,&l,_ctx,&ierr));
+  PetscObjectUseFortranCallback(nep,_cb.monitor,(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),(&nep,&i,&nc,er,ei,d,&l,_ctx,&ierr));
 }
 
 #undef __FUNCT__
@@ -109,6 +124,44 @@ static PetscErrorCode ourdestroy(void** ctx)
   PetscObjectUseFortranCallback(nep,_cb.monitordestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
 }
 
+#undef __FUNCT__
+#define __FUNCT__ "ourconvergence"
+static PetscErrorCode ourconvergence(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+{
+  PetscObjectUseFortranCallback(nep,_cb.convergence,(NEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),(&nep,&eigr,&eigi,&res,errest,_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourconvdestroy"
+static PetscErrorCode ourconvdestroy(void *ctx)
+{
+  NEP nep = (NEP)ctx;
+  PetscObjectUseFortranCallback(nep,_cb.convdestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourstopping"
+static PetscErrorCode ourstopping(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)
+{
+  PetscObjectUseFortranCallback(nep,_cb.stopping,(NEP*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,NEPConvergedReason*,void*,PetscErrorCode*),(&nep,&its,&max_it,&nconv,&nev,reason,_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourstopdestroy"
+static PetscErrorCode ourstopdestroy(void *ctx)
+{
+  NEP nep = (NEP)ctx;
+  PetscObjectUseFortranCallback(nep,_cb.stopdestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "oureigenvaluecomparison"
+static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)
+{
+  NEP eps = (NEP)ctx;
+  PetscObjectUseFortranCallback(eps,_cb.comparison,(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*,PetscErrorCode*),(&ar,&ai,&br,&bi,r,_ctx,&ierr));
+}
+
 PETSC_EXTERN void PETSC_STDCALL nepview_(NEP *nep,PetscViewer *viewer,PetscErrorCode *ierr)
 {
   PetscViewer v;
@@ -188,30 +241,20 @@ PETSC_EXTERN void PETSC_STDCALL nepgetoptionsprefix_(NEP *nep,CHAR prefix PETSC_
   *ierr = PetscStrncpy(prefix,tname,len);
 }
 
-PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *monitor)(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)
+PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *monitor)(NEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)
 {
-  SlepcConvMonitor ctx;
-
   CHKFORTRANNULLOBJECT(mctx);
   CHKFORTRANNULLFUNCTION(monitordestroy);
   if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorall_) {
-    *ierr = NEPMonitorSet(*nep,NEPMonitorAll,0,0);
+    *ierr = NEPMonitorSet(*nep,(PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))NEPMonitorAll,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorconverged_) {
+    *ierr = NEPMonitorSet(*nep,(PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))NEPMonitorConverged,*(SlepcConvMonitor*)mctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorfirst_) {
+    *ierr = NEPMonitorSet(*nep,(PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))NEPMonitorFirst,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorlg_) {
     *ierr = NEPMonitorSet(*nep,NEPMonitorLG,0,0);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorlgall_) {
     *ierr = NEPMonitorSet(*nep,NEPMonitorLGAll,0,0);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorconverged_) {
-    if (mctx) {
-      PetscError(PetscObjectComm((PetscObject)*nep),__LINE__,"nepmonitorset_",__FILE__,PETSC_ERR_ARG_WRONG,PETSC_ERROR_INITIAL,"Must provide PETSC_NULL_OBJECT as a context in the Fortran interface to NEPMonitorSet");
-      *ierr = 1;
-      return;
-    }
-    *ierr = PetscNew(&ctx);
-    if (*ierr) return;
-    ctx->viewer = NULL;
-    *ierr = NEPMonitorSet(*nep,NEPMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)nepmonitorfirst_) {
-    *ierr = NEPMonitorSet(*nep,NEPMonitorFirst,0,0);
   } else {
     *ierr = PetscObjectSetFortranCallback((PetscObject)*nep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.monitor,(PetscVoidFunction)monitor,mctx); if (*ierr) return;
     if (!monitordestroy) {
@@ -223,3 +266,61 @@ PETSC_EXTERN void PETSC_STDCALL nepmonitorset_(NEP *nep,void (PETSC_STDCALL *mon
   }
 }
 
+PETSC_EXTERN void PETSC_STDCALL nepconvergedabsolute_(NEP *nep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = NEPConvergedAbsolute(*nep,*eigr,*eigi,*res,errest,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL nepconvergedrelative_(NEP *nep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = NEPConvergedRelative(*nep,*eigr,*eigi,*res,errest,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL nepsetconvergencetestfunction_(NEP *nep,void (PETSC_STDCALL *func)(NEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  CHKFORTRANNULLFUNCTION(destroy);
+  if ((PetscVoidFunction)func == (PetscVoidFunction)nepconvergedabsolute_) {
+    *ierr = NEPSetConvergenceTest(*nep,NEP_CONV_ABS);
+  } else if ((PetscVoidFunction)func == (PetscVoidFunction)nepconvergedrelative_) {
+    *ierr = NEPSetConvergenceTest(*nep,NEP_CONV_REL);
+  } else {
+    *ierr = PetscObjectSetFortranCallback((PetscObject)*nep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.convergence,(PetscVoidFunction)func,ctx); if (*ierr) return;
+    if (!destroy) {
+      *ierr = NEPSetConvergenceTestFunction(*nep,ourconvergence,*nep,NULL);
+    } else {
+      *ierr = PetscObjectSetFortranCallback((PetscObject)*nep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.convdestroy,(PetscVoidFunction)destroy,ctx); if (*ierr) return;
+      *ierr = NEPSetConvergenceTestFunction(*nep,ourconvergence,*nep,ourconvdestroy);
+    }
+  }
+}
+
+PETSC_EXTERN void PETSC_STDCALL nepstoppingbasic_(NEP *nep,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,NEPConvergedReason *reason,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = NEPStoppingBasic(*nep,*its,*max_it,*nconv,*nev,reason,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL nepsetstoppingtestfunction_(NEP *nep,void (PETSC_STDCALL *func)(NEP*,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  CHKFORTRANNULLFUNCTION(destroy);
+  if ((PetscVoidFunction)func == (PetscVoidFunction)nepstoppingbasic_) {
+    *ierr = NEPSetStoppingTest(*nep,NEP_STOP_BASIC);
+  } else {
+    *ierr = PetscObjectSetFortranCallback((PetscObject)*nep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopping,(PetscVoidFunction)func,ctx); if (*ierr) return;
+    if (!destroy) {
+      *ierr = NEPSetStoppingTestFunction(*nep,ourstopping,*nep,NULL);
+    } else {
+      *ierr = PetscObjectSetFortranCallback((PetscObject)*nep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopdestroy,(PetscVoidFunction)destroy,ctx); if (*ierr) return;
+      *ierr = NEPSetStoppingTestFunction(*nep,ourstopping,*nep,ourstopdestroy);
+    }
+  }
+}
+
+PETSC_EXTERN void PETSC_STDCALL nepseteigenvaluecomparison_(NEP *nep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  *ierr = PetscObjectSetFortranCallback((PetscObject)*nep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.comparison,(PetscVoidFunction)func,ctx); if (*ierr) return;
+  *ierr = NEPSetEigenvalueComparison(*nep,oureigenvaluecomparison,*nep);
+}
+
diff --git a/src/nep/interface/index.html b/src/nep/interface/index.html
index 9988705..bbd6d95 100644
--- a/src/nep/interface/index.html
+++ b/src/nep/interface/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Nonlinear Eigenvalue Problem Solvers - NEP: <a href="../../../src/nep/examples/tutorials/index.html">Examples</a> <a href="../../../src/nep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Nonlinear Eigenvalue Problem (NEP) solver is the object provided by SLEPc for specifying an eigenvalue problem that is nonlinear with respect to the eigenvalue (not the eigenvector). This is intended for general nonlinear problems (rather than polynomial eigenproblems) described as <i>T(λ)x=0</i>.
diff --git a/src/nep/interface/makefile b/src/nep/interface/makefile
index 29b3126..b008596 100644
--- a/src/nep/interface/makefile
+++ b/src/nep/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/interface/makefile.html b/src/nep/interface/makefile.html
index 6153b54..4a2a965 100644
--- a/src/nep/interface/makefile.html
+++ b/src/nep/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:20+00:00">
+<meta name="date" content="2016-05-16T10:34:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/nep/interface/nepbasic.c b/src/nep/interface/nepbasic.c
index fceee60..a4ce8b4 100644
--- a/src/nep/interface/nepbasic.c
+++ b/src/nep/interface/nepbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -26,7 +26,7 @@
 PetscFunctionList NEPList = 0;
 PetscBool         NEPRegisterAllCalled = PETSC_FALSE;
 PetscClassId      NEP_CLASSID = 0;
-PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;
+PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPCreate"
@@ -57,43 +57,43 @@ PetscErrorCode NEPCreate(MPI_Comm comm,NEP *outnep)
   ierr = SlepcHeaderCreate(nep,NEP_CLASSID,"NEP","Nonlinear Eigenvalue Problem","NEP",comm,NEPDestroy,NEPView);CHKERRQ(ierr);
 
   nep->max_it          = 0;
-  nep->max_funcs       = 0;
   nep->nev             = 1;
   nep->ncv             = 0;
   nep->mpd             = 0;
-  nep->lag             = 1;
   nep->nini            = 0;
   nep->target          = 0.0;
-  nep->abstol          = PETSC_DEFAULT;
-  nep->rtol            = PETSC_DEFAULT;
-  nep->stol            = PETSC_DEFAULT;
-  nep->ktol            = 0.1;
-  nep->cctol           = PETSC_FALSE;
-  nep->ttol            = 0.0;
+  nep->tol             = PETSC_DEFAULT;
+  nep->conv            = NEP_CONV_REL;
+  nep->stop            = NEP_STOP_BASIC;
   nep->which           = (NEPWhich)0;
   nep->refine          = NEP_REFINE_NONE;
   nep->npart           = 1;
-  nep->reftol          = PETSC_DEFAULT;
+  nep->rtol            = PETSC_DEFAULT;
   nep->rits            = PETSC_DEFAULT;
+  nep->scheme          = (NEPRefineScheme)0;
   nep->trackall        = PETSC_FALSE;
 
   nep->computefunction = NULL;
   nep->computejacobian = NULL;
   nep->functionctx     = NULL;
   nep->jacobianctx     = NULL;
-  nep->converged       = NEPConvergedDefault;
+  nep->computederivatives = NULL;
+  nep->derivativesctx  = NULL;
+  nep->converged       = NEPConvergedRelative;
   nep->convergeddestroy= NULL;
+  nep->stopping        = NEPStoppingBasic;
+  nep->stoppingdestroy = NULL;
   nep->convergedctx    = NULL;
+  nep->stoppingctx     = NULL;
   nep->numbermonitors  = 0;
 
   nep->ds              = NULL;
   nep->V               = NULL;
   nep->rg              = NULL;
-  nep->rand            = NULL;
-  nep->ksp             = NULL;
   nep->function        = NULL;
   nep->function_pre    = NULL;
   nep->jacobian        = NULL;
+  nep->derivatives     = NULL;
   nep->A               = NULL;
   nep->f               = NULL;
   nep->nt              = 0;
@@ -112,14 +112,11 @@ PetscErrorCode NEPCreate(MPI_Comm comm,NEP *outnep)
   nep->its             = 0;
   nep->n               = 0;
   nep->nloc            = 0;
-  nep->nfuncs          = 0;
-  nep->split           = PETSC_FALSE;
+  nep->nrma            = NULL;
+  nep->fui             = (NEPUserInterface)0;
   nep->reason          = NEP_CONVERGED_ITERATING;
 
   ierr = PetscNewLog(nep,&nep->sc);CHKERRQ(ierr);
-  ierr = PetscRandomCreate(comm,&nep->rand);CHKERRQ(ierr);
-  ierr = PetscRandomSetSeed(nep->rand,0x12345678);CHKERRQ(ierr);
-  ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->rand);CHKERRQ(ierr);
   *outnep = nep;
   PetscFunctionReturn(0);
 }
@@ -242,6 +239,32 @@ PetscErrorCode NEPRegister(const char *name,PetscErrorCode (*function)(NEP))
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "NEPReset_Problem"
+/*
+   NEPReset_Problem - Destroys the problem matrices.
+@*/
+PetscErrorCode NEPReset_Problem(NEP nep)
+{
+  PetscErrorCode ierr;
+  PetscInt       i;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  ierr = MatDestroy(&nep->function);CHKERRQ(ierr);
+  ierr = MatDestroy(&nep->function_pre);CHKERRQ(ierr);
+  ierr = MatDestroy(&nep->jacobian);CHKERRQ(ierr);
+  ierr = MatDestroy(&nep->derivatives);CHKERRQ(ierr);
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+    ierr = MatDestroyMatrices(nep->nt,&nep->A);CHKERRQ(ierr);
+    for (i=0;i<nep->nt;i++) {
+      ierr = FNDestroy(&nep->f[i]);CHKERRQ(ierr);
+    }
+    ierr = PetscFree(nep->f);CHKERRQ(ierr);
+    ierr = PetscFree(nep->nrma);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+#undef __FUNCT__
 #define __FUNCT__ "NEPReset"
 /*@
    NEPReset - Resets the NEP context to the initial state and removes any
@@ -259,31 +282,23 @@ PetscErrorCode NEPRegister(const char *name,PetscErrorCode (*function)(NEP))
 PetscErrorCode NEPReset(NEP nep)
 {
   PetscErrorCode ierr;
-  PetscInt       i,ncols;
+  PetscInt       ncols;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   if (nep->ops->reset) { ierr = (nep->ops->reset)(nep);CHKERRQ(ierr); }
   if (nep->ds) { ierr = DSReset(nep->ds);CHKERRQ(ierr); }
-  ierr = MatDestroy(&nep->function);CHKERRQ(ierr);
-  ierr = MatDestroy(&nep->function_pre);CHKERRQ(ierr);
-  ierr = MatDestroy(&nep->jacobian);CHKERRQ(ierr);
-  if (nep->split) {
-    ierr = MatDestroyMatrices(nep->nt,&nep->A);CHKERRQ(ierr);
-    for (i=0;i<nep->nt;i++) {
-      ierr = FNDestroy(&nep->f[i]);CHKERRQ(ierr);
-    }
-    ierr = PetscFree(nep->f);CHKERRQ(ierr);
-  }
+  ierr = NEPReset_Problem(nep);CHKERRQ(ierr);
   ierr = BVGetSizes(nep->V,NULL,NULL,&ncols);CHKERRQ(ierr);
   if (ncols) {
     ierr = PetscFree4(nep->eigr,nep->eigi,nep->errest,nep->perm);CHKERRQ(ierr);
   }
   ierr = BVDestroy(&nep->V);CHKERRQ(ierr);
   ierr = VecDestroyVecs(nep->nwork,&nep->work);CHKERRQ(ierr);
-  nep->nwork  = 0;
-  nep->nfuncs = 0;
-  nep->state  = NEP_STATE_INITIAL;
+  ierr = KSPDestroy(&nep->refineksp);CHKERRQ(ierr);
+  ierr = PetscSubcommDestroy(&nep->refinesubc);CHKERRQ(ierr);
+  nep->nwork = 0;
+  nep->state = NEP_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
@@ -311,10 +326,8 @@ PetscErrorCode NEPDestroy(NEP *nep)
   if (--((PetscObject)(*nep))->refct > 0) { *nep = 0; PetscFunctionReturn(0); }
   ierr = NEPReset(*nep);CHKERRQ(ierr);
   if ((*nep)->ops->destroy) { ierr = (*(*nep)->ops->destroy)(*nep);CHKERRQ(ierr); }
-  ierr = KSPDestroy(&(*nep)->ksp);CHKERRQ(ierr);
   ierr = RGDestroy(&(*nep)->rg);CHKERRQ(ierr);
   ierr = DSDestroy(&(*nep)->ds);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&(*nep)->rand);CHKERRQ(ierr);
   ierr = PetscFree((*nep)->sc);CHKERRQ(ierr);
   /* just in case the initial vectors have not been used */
   ierr = SlepcBasisDestroy_Private(&(*nep)->nini,&(*nep)->IS);CHKERRQ(ierr);
@@ -528,44 +541,10 @@ PetscErrorCode NEPGetDS(NEP nep,DS *ds)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPSetKSP"
-/*@
-   NEPSetKSP - Associates a linear solver object to the nonlinear eigensolver.
-
-   Collective on NEP
-
-   Input Parameters:
-+  nep - eigensolver context obtained from NEPCreate()
--  ksp - the linear solver object
-
-   Note:
-   Use NEPGetKSP() to retrieve the linear solver context (for example,
-   to free it at the end of the computations).
-
-   Level: advanced
-
-.seealso: NEPGetKSP()
-@*/
-PetscErrorCode NEPSetKSP(NEP nep,KSP ksp)
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidHeaderSpecific(ksp,KSP_CLASSID,2);
-  PetscCheckSameComm(nep,1,ksp,2);
-  ierr = PetscObjectReference((PetscObject)ksp);CHKERRQ(ierr);
-  ierr = KSPDestroy(&nep->ksp);CHKERRQ(ierr);
-  nep->ksp = ksp;
-  ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ksp);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "NEPGetKSP"
+#define __FUNCT__ "NEPRefineGetKSP"
 /*@
-   NEPGetKSP - Obtain the linear solver (KSP) object associated
-   to the eigensolver object.
+   NEPRefineGetKSP - Obtain the ksp object used by the eigensolver
+   object in the refinement phase.
 
    Not Collective
 
@@ -573,28 +552,34 @@ PetscErrorCode NEPSetKSP(NEP nep,KSP ksp)
 .  nep - eigensolver context obtained from NEPCreate()
 
    Output Parameter:
-.  ksp - linear solver context
+.  ksp - ksp context
 
    Level: advanced
 
-.seealso: NEPSetKSP()
+.seealso: NEPSetRefine()
 @*/
-PetscErrorCode NEPGetKSP(NEP nep,KSP *ksp)
+PetscErrorCode NEPRefineGetKSP(NEP nep,KSP *ksp)
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidPointer(ksp,2);
-  if (!nep->ksp) {
-    ierr = KSPCreate(PetscObjectComm((PetscObject)nep),&nep->ksp);CHKERRQ(ierr);
-    ierr = KSPSetOptionsPrefix(nep->ksp,((PetscObject)nep)->prefix);CHKERRQ(ierr);
-    ierr = KSPAppendOptionsPrefix(nep->ksp,"nep_");CHKERRQ(ierr);
-    ierr = PetscObjectIncrementTabLevel((PetscObject)nep->ksp,(PetscObject)nep,1);CHKERRQ(ierr);
-    ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ksp);CHKERRQ(ierr);
-    ierr = KSPSetErrorIfNotConverged(nep->ksp,PETSC_TRUE);CHKERRQ(ierr);
+  if (!nep->refineksp) {
+    if (nep->npart>1) {
+      /* Split in subcomunicators */
+      ierr = PetscSubcommCreate(PetscObjectComm((PetscObject)nep),&nep->refinesubc);CHKERRQ(ierr);
+      ierr = PetscSubcommSetNumber(nep->refinesubc,nep->npart);CHKERRQ(ierr);CHKERRQ(ierr);
+      ierr = PetscSubcommSetType(nep->refinesubc,PETSC_SUBCOMM_CONTIGUOUS);CHKERRQ(ierr);
+      ierr = PetscLogObjectMemory((PetscObject)nep,sizeof(PetscSubcomm));CHKERRQ(ierr);
+    }
+    ierr = KSPCreate((nep->npart==1)?PetscObjectComm((PetscObject)nep):PetscSubcommChild(nep->refinesubc),&nep->refineksp);CHKERRQ(ierr);
+    ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->refineksp);CHKERRQ(ierr);
+    ierr = KSPSetOptionsPrefix(*ksp,((PetscObject)nep)->prefix);CHKERRQ(ierr);
+    ierr = KSPAppendOptionsPrefix(*ksp,"nep_refine_");CHKERRQ(ierr);
+    ierr = KSPSetErrorIfNotConverged(*ksp,PETSC_TRUE);CHKERRQ(ierr);
   }
-  *ksp = nep->ksp;
+  *ksp = nep->refineksp;
   PetscFunctionReturn(0);
 }
 
@@ -694,6 +679,11 @@ PetscErrorCode NEPSetFunction(NEP nep,Mat A,Mat B,PetscErrorCode (*fun)(NEP,Pets
   if (B) PetscValidHeaderSpecific(B,MAT_CLASSID,3);
   if (A) PetscCheckSameComm(nep,1,A,2);
   if (B) PetscCheckSameComm(nep,1,B,3);
+
+  if (nep->fui && nep->fui!=NEP_USER_INTERFACE_CALLBACK) {  /* clean previous user info */
+    ierr = NEPReset_Problem(nep);CHKERRQ(ierr);
+  }
+
   if (fun) nep->computefunction = fun;
   if (ctx) nep->functionctx     = ctx;
   if (A) {
@@ -706,7 +696,7 @@ PetscErrorCode NEPSetFunction(NEP nep,Mat A,Mat B,PetscErrorCode (*fun)(NEP,Pets
     ierr = MatDestroy(&nep->function_pre);CHKERRQ(ierr);
     nep->function_pre = B;
   }
-  nep->split = PETSC_FALSE;
+  nep->fui = NEP_USER_INTERFACE_CALLBACK;
   PetscFunctionReturn(0);
 }
 
@@ -735,6 +725,7 @@ PetscErrorCode NEPGetFunction(NEP nep,Mat *A,Mat *B,PetscErrorCode (**fun)(NEP,P
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  NEPCheckCallback(nep,1);
   if (A)   *A   = nep->function;
   if (B)   *B   = nep->function_pre;
   if (fun) *fun = nep->computefunction;
@@ -771,6 +762,11 @@ PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScala
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   if (A) PetscValidHeaderSpecific(A,MAT_CLASSID,2);
   if (A) PetscCheckSameComm(nep,1,A,2);
+
+  if (nep->fui && nep->fui!=NEP_USER_INTERFACE_CALLBACK) {  /* clean previous user info */
+    ierr = NEPReset_Problem(nep);CHKERRQ(ierr);
+  }
+
   if (jac) nep->computejacobian = jac;
   if (ctx) nep->jacobianctx     = ctx;
   if (A) {
@@ -778,7 +774,7 @@ PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScala
     ierr = MatDestroy(&nep->jacobian);CHKERRQ(ierr);
     nep->jacobian = A;
   }
-  nep->split = PETSC_FALSE;
+  nep->fui = NEP_USER_INTERFACE_CALLBACK;
   PetscFunctionReturn(0);
 }
 
@@ -786,7 +782,7 @@ PetscErrorCode NEPSetJacobian(NEP nep,Mat A,PetscErrorCode (*jac)(NEP,PetscScala
 #define __FUNCT__ "NEPGetJacobian"
 /*@C
    NEPGetJacobian - Returns the Jacobian matrix and optionally the user
-   provided context for evaluating the Jacobian.
+   provided routine and context for evaluating the Jacobian.
 
    Not Collective, but Mat object will be parallel if NEP object is
 
@@ -806,6 +802,7 @@ PetscErrorCode NEPGetJacobian(NEP nep,Mat *A,PetscErrorCode (**jac)(NEP,PetscSca
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  NEPCheckCallback(nep,1);
   if (A)   *A   = nep->jacobian;
   if (jac) *jac = nep->computejacobian;
   if (ctx) *ctx = nep->jacobianctx;
@@ -860,16 +857,7 @@ PetscErrorCode NEPSetSplitOperator(NEP nep,PetscInt n,Mat A[],FN f[],MatStructur
   PetscCheckSameComm(nep,1,*f,4);
   if (nep->state) { ierr = NEPReset(nep);CHKERRQ(ierr); }
   /* clean previously stored information */
-  ierr = MatDestroy(&nep->function);CHKERRQ(ierr);
-  ierr = MatDestroy(&nep->function_pre);CHKERRQ(ierr);
-  ierr = MatDestroy(&nep->jacobian);CHKERRQ(ierr);
-  if (nep->split) {
-    ierr = MatDestroyMatrices(nep->nt,&nep->A);CHKERRQ(ierr);
-    for (i=0;i<nep->nt;i++) {
-      ierr = FNDestroy(&nep->f[i]);CHKERRQ(ierr);
-    }
-    ierr = PetscFree(nep->f);CHKERRQ(ierr);
-  }
+  ierr = NEPReset_Problem(nep);CHKERRQ(ierr);
   /* allocate space and copy matrices and functions */
   ierr = PetscMalloc1(n,&nep->A);CHKERRQ(ierr);
   ierr = PetscLogObjectMemory((PetscObject)nep,n*sizeof(Mat));CHKERRQ(ierr);
@@ -885,9 +873,11 @@ PetscErrorCode NEPSetSplitOperator(NEP nep,PetscInt n,Mat A[],FN f[],MatStructur
     ierr = PetscObjectReference((PetscObject)f[i]);CHKERRQ(ierr);
     nep->f[i] = f[i];
   }
-  nep->nt    = n;
-  nep->mstr  = str;
-  nep->split = PETSC_TRUE;
+  ierr = PetscCalloc1(n,&nep->nrma);CHKERRQ(ierr);
+  ierr = PetscLogObjectMemory((PetscObject)nep,n*sizeof(PetscReal));CHKERRQ(ierr);
+  nep->nt   = n;
+  nep->mstr = str;
+  nep->fui  = NEP_USER_INTERFACE_SPLIT;
   PetscFunctionReturn(0);
 }
 
@@ -915,7 +905,8 @@ PetscErrorCode NEPGetSplitOperatorTerm(NEP nep,PetscInt k,Mat *A,FN *f)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  if (k<0 || k>=nep->nt) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",nep->nt-1);
+  NEPCheckSplit(nep,1);
+  if (k<0 || k>=nep->nt) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",nep->nt-1);
   if (A) *A = nep->A[k];
   if (f) *f = nep->f[k];
   PetscFunctionReturn(0);
@@ -944,8 +935,85 @@ PetscErrorCode NEPGetSplitOperatorInfo(NEP nep,PetscInt *n,MatStructure *str)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  if (n) *n = nep->nt;
+  NEPCheckSplit(nep,1);
+  if (n)   *n = nep->nt;
   if (str) *str = nep->mstr;
   PetscFunctionReturn(0);
 }
 
+#undef __FUNCT__
+#define __FUNCT__ "NEPSetDerivatives"
+/*@C
+   NEPSetDerivatives - Sets the function to compute the k-th derivative T^(k)(lambda)
+   for any value of k (including 0), as well as the location to store the matrix.
+
+   Logically Collective on NEP and Mat
+
+   Input Parameters:
++  nep - the NEP context
+.  A   - the matrix to store the computed derivative
+.  der - routing to evaluate the k-th derivative (if NULL then NEP retains any
+         previously set value)
+-  ctx - [optional] user-defined context for private data for the derivatives
+         evaluation routine (may be NULL) (if NULL then NEP retains any
+         previously set value)
+
+   Level: beginner
+
+.seealso: NEPSetFunction(), NEPGetDerivatives()
+@*/
+PetscErrorCode NEPSetDerivatives(NEP nep,Mat A,PetscErrorCode (*der)(NEP,PetscScalar,PetscInt,Mat,void*),void *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  if (A) PetscValidHeaderSpecific(A,MAT_CLASSID,2);
+  if (A) PetscCheckSameComm(nep,1,A,2);
+
+  if (nep->fui && nep->fui!=NEP_USER_INTERFACE_DERIVATIVES) {  /* clean previous user info */
+    ierr = NEPReset_Problem(nep);CHKERRQ(ierr);
+  }
+
+  if (der) nep->computederivatives = der;
+  if (ctx) nep->derivativesctx     = ctx;
+  if (A) {
+    ierr = PetscObjectReference((PetscObject)A);CHKERRQ(ierr);
+    ierr = MatDestroy(&nep->derivatives);CHKERRQ(ierr);
+    nep->derivatives = A;
+  }
+  nep->fui = NEP_USER_INTERFACE_DERIVATIVES;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPGetDerivatives"
+/*@C
+   NEPGetDerivatives - Returns the derivatives matrix and optionally the user
+   provided routine and context for evaluating the derivatives.
+
+   Not Collective, but Mat object will be parallel if NEP object is
+
+   Input Parameter:
+.  nep - the nonlinear eigensolver context
+
+   Output Parameters:
++  A   - location to stash the derivatives matrix (or NULL)
+.  der - location to put derivatives function (or NULL)
+-  ctx - location to stash derivatives context (or NULL)
+
+   Level: advanced
+
+.seealso: NEPSetDerivatives()
+@*/
+PetscErrorCode NEPGetDerivatives(NEP nep,Mat *A,PetscErrorCode (**der)(NEP,PetscScalar,PetscInt,Mat,void*),void **ctx)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  NEPCheckDerivatives(nep,1);
+  if (A)   *A   = nep->derivatives;
+  if (der) *der = nep->computederivatives;
+  if (ctx) *ctx = nep->derivativesctx;
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/nep/interface/nepbasic.c.html b/src/nep/interface/nepbasic.c.html
index 9edf601..fd0de45 100644
--- a/src/nep/interface/nepbasic.c.html
+++ b/src/nep/interface/nepbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:12+00:00">
+<meta name="date" content="2016-05-16T10:34:13+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Basic <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> routines, Create, View, etc.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -38,7 +38,7 @@
 <a name="line26"> 26: </a>PetscFunctionList NEPList = 0;
 <a name="line27"> 27: </a>PetscBool         NEPRegisterAllCalled = PETSC_FALSE;
 <a name="line28"> 28: </a>PetscClassId      NEP_CLASSID = 0;
-<a name="line29"> 29: </a>PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0;
+<a name="line29"> 29: </a>PetscLogEvent     NEP_SetUp = 0,NEP_Solve = 0,NEP_Refine = 0,NEP_FunctionEval = 0,NEP_JacobianEval = 0,NEP_DerivativesEval = 0;
 
 <a name="line33"> 33: </a><font color="#B22222">/*@</font>
 <a name="line34"> 34: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a> - Creates the default <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context.</font>
@@ -64,43 +64,43 @@
 <a name="line57"> 57: </a>  SlepcHeaderCreate(nep,NEP_CLASSID,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>"</font>,<font color="#666666">"Nonlinear Eigenvalue Problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>"</font>,comm,<a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>,<a href="../../../docs/manualpages/NEP/NEPView.html#NEPView">NEPView</a>);
 
 <a name="line59"> 59: </a>  nep->max_it          = 0;
-<a name="line60"> 60: </a>  nep->max_funcs       = 0;
-<a name="line61"> 61: </a>  nep->nev             = 1;
-<a name="line62"> 62: </a>  nep->ncv             = 0;
-<a name="line63"> 63: </a>  nep->mpd             = 0;
-<a name="line64"> 64: </a>  nep->lag             = 1;
-<a name="line65"> 65: </a>  nep->nini            = 0;
-<a name="line66"> 66: </a>  nep->target          = 0.0;
-<a name="line67"> 67: </a>  nep->abstol          = PETSC_DEFAULT;
-<a name="line68"> 68: </a>  nep->rtol            = PETSC_DEFAULT;
-<a name="line69"> 69: </a>  nep->stol            = PETSC_DEFAULT;
-<a name="line70"> 70: </a>  nep->ktol            = 0.1;
-<a name="line71"> 71: </a>  nep->cctol           = PETSC_FALSE;
-<a name="line72"> 72: </a>  nep->ttol            = 0.0;
-<a name="line73"> 73: </a>  nep->which           = (<a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>)0;
-<a name="line74"> 74: </a>  nep->refine          = NEP_REFINE_NONE;
-<a name="line75"> 75: </a>  nep->npart           = 1;
-<a name="line76"> 76: </a>  nep->reftol          = PETSC_DEFAULT;
-<a name="line77"> 77: </a>  nep->rits            = PETSC_DEFAULT;
-<a name="line78"> 78: </a>  nep->trackall        = PETSC_FALSE;
-
-<a name="line80"> 80: </a>  nep->computefunction = NULL;
-<a name="line81"> 81: </a>  nep->computejacobian = NULL;
-<a name="line82"> 82: </a>  nep->functionctx     = NULL;
-<a name="line83"> 83: </a>  nep->jacobianctx     = NULL;
-<a name="line84"> 84: </a>  nep->converged       = NEPConvergedDefault;
-<a name="line85"> 85: </a>  nep->convergeddestroy= NULL;
+<a name="line60"> 60: </a>  nep->nev             = 1;
+<a name="line61"> 61: </a>  nep->ncv             = 0;
+<a name="line62"> 62: </a>  nep->mpd             = 0;
+<a name="line63"> 63: </a>  nep->nini            = 0;
+<a name="line64"> 64: </a>  nep->target          = 0.0;
+<a name="line65"> 65: </a>  nep->tol             = PETSC_DEFAULT;
+<a name="line66"> 66: </a>  nep->conv            = NEP_CONV_REL;
+<a name="line67"> 67: </a>  nep->stop            = NEP_STOP_BASIC;
+<a name="line68"> 68: </a>  nep->which           = (<a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a>)0;
+<a name="line69"> 69: </a>  nep->refine          = NEP_REFINE_NONE;
+<a name="line70"> 70: </a>  nep->npart           = 1;
+<a name="line71"> 71: </a>  nep->rtol            = PETSC_DEFAULT;
+<a name="line72"> 72: </a>  nep->rits            = PETSC_DEFAULT;
+<a name="line73"> 73: </a>  nep->scheme          = (<a href="../../../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a>)0;
+<a name="line74"> 74: </a>  nep->trackall        = PETSC_FALSE;
+
+<a name="line76"> 76: </a>  nep->computefunction = NULL;
+<a name="line77"> 77: </a>  nep->computejacobian = NULL;
+<a name="line78"> 78: </a>  nep->functionctx     = NULL;
+<a name="line79"> 79: </a>  nep->jacobianctx     = NULL;
+<a name="line80"> 80: </a>  nep->computederivatives = NULL;
+<a name="line81"> 81: </a>  nep->derivativesctx  = NULL;
+<a name="line82"> 82: </a>  nep->converged       = NEPConvergedRelative;
+<a name="line83"> 83: </a>  nep->convergeddestroy= NULL;
+<a name="line84"> 84: </a>  nep->stopping        = <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>;
+<a name="line85"> 85: </a>  nep->stoppingdestroy = NULL;
 <a name="line86"> 86: </a>  nep->convergedctx    = NULL;
-<a name="line87"> 87: </a>  nep->numbermonitors  = 0;
-
-<a name="line89"> 89: </a>  nep->ds              = NULL;
-<a name="line90"> 90: </a>  nep->V               = NULL;
-<a name="line91"> 91: </a>  nep->rg              = NULL;
-<a name="line92"> 92: </a>  nep->rand            = NULL;
-<a name="line93"> 93: </a>  nep->ksp             = NULL;
-<a name="line94"> 94: </a>  nep->function        = NULL;
-<a name="line95"> 95: </a>  nep->function_pre    = NULL;
-<a name="line96"> 96: </a>  nep->jacobian        = NULL;
+<a name="line87"> 87: </a>  nep->stoppingctx     = NULL;
+<a name="line88"> 88: </a>  nep->numbermonitors  = 0;
+
+<a name="line90"> 90: </a>  nep->ds              = NULL;
+<a name="line91"> 91: </a>  nep->V               = NULL;
+<a name="line92"> 92: </a>  nep->rg              = NULL;
+<a name="line93"> 93: </a>  nep->function        = NULL;
+<a name="line94"> 94: </a>  nep->function_pre    = NULL;
+<a name="line95"> 95: </a>  nep->jacobian        = NULL;
+<a name="line96"> 96: </a>  nep->derivatives     = NULL;
 <a name="line97"> 97: </a>  nep->A               = NULL;
 <a name="line98"> 98: </a>  nep->f               = NULL;
 <a name="line99"> 99: </a>  nep->nt              = 0;
@@ -119,712 +119,771 @@
 <a name="line112">112: </a>  nep->its             = 0;
 <a name="line113">113: </a>  nep->n               = 0;
 <a name="line114">114: </a>  nep->nloc            = 0;
-<a name="line115">115: </a>  nep->nfuncs          = 0;
-<a name="line116">116: </a>  nep->split           = PETSC_FALSE;
+<a name="line115">115: </a>  nep->nrma            = NULL;
+<a name="line116">116: </a>  nep->fui             = (NEPUserInterface)0;
 <a name="line117">117: </a>  nep->reason          = NEP_CONVERGED_ITERATING;
 
 <a name="line119">119: </a>  PetscNewLog(nep,&nep->sc);
-<a name="line120">120: </a>  PetscRandomCreate(comm,&nep->rand);
-<a name="line121">121: </a>  PetscRandomSetSeed(nep->rand,0x12345678);
-<a name="line122">122: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->rand);
-<a name="line123">123: </a>  *outnep = nep;
-<a name="line124">124: </a>  <font color="#4169E1">return</font>(0);
-<a name="line125">125: </a>}
+<a name="line120">120: </a>  *outnep = nep;
+<a name="line121">121: </a>  <font color="#4169E1">return</font>(0);
+<a name="line122">122: </a>}
 
-<a name="line129">129: </a><font color="#B22222">/*@C</font>
-<a name="line130">130: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a> - Selects the particular solver to be used in the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object.</font>
+<a name="line126">126: </a><font color="#B22222">/*@C</font>
+<a name="line127">127: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a> - Selects the particular solver to be used in the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object.</font>
 
-<a name="line132">132: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+<a name="line129">129: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
 
-<a name="line134">134: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line135">135: </a><font color="#B22222">+  nep      - the nonlinear eigensolver context</font>
-<a name="line136">136: </a><font color="#B22222">-  type     - a known method</font>
+<a name="line131">131: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line132">132: </a><font color="#B22222">+  nep      - the nonlinear eigensolver context</font>
+<a name="line133">133: </a><font color="#B22222">-  type     - a known method</font>
 
-<a name="line138">138: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line139">139: </a><font color="#B22222">.  -nep_type <method> - Sets the method; use -help for a list</font>
-<a name="line140">140: </a><font color="#B22222">    of available methods</font>
+<a name="line135">135: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line136">136: </a><font color="#B22222">.  -nep_type <method> - Sets the method; use -help for a list</font>
+<a name="line137">137: </a><font color="#B22222">    of available methods</font>
 
-<a name="line142">142: </a><font color="#B22222">   Notes:</font>
-<a name="line143">143: </a><font color="#B22222">   See "slepc/include/slepcnep.h" for available methods.</font>
+<a name="line139">139: </a><font color="#B22222">   Notes:</font>
+<a name="line140">140: </a><font color="#B22222">   See "slepc/include/slepcnep.h" for available methods.</font>
 
-<a name="line145">145: </a><font color="#B22222">   Normally, it is best to use the <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>() command and</font>
-<a name="line146">146: </a><font color="#B22222">   then set the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> type from the options database rather than by using</font>
-<a name="line147">147: </a><font color="#B22222">   this routine.  Using the options database provides the user with</font>
-<a name="line148">148: </a><font color="#B22222">   maximum flexibility in evaluating the different available methods.</font>
-<a name="line149">149: </a><font color="#B22222">   The <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>() routine is provided for those situations where it</font>
-<a name="line150">150: </a><font color="#B22222">   is necessary to set the iterative solver independently of the command</font>
-<a name="line151">151: </a><font color="#B22222">   line or options database.</font>
+<a name="line142">142: </a><font color="#B22222">   Normally, it is best to use the <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>() command and</font>
+<a name="line143">143: </a><font color="#B22222">   then set the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> type from the options database rather than by using</font>
+<a name="line144">144: </a><font color="#B22222">   this routine.  Using the options database provides the user with</font>
+<a name="line145">145: </a><font color="#B22222">   maximum flexibility in evaluating the different available methods.</font>
+<a name="line146">146: </a><font color="#B22222">   The <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>() routine is provided for those situations where it</font>
+<a name="line147">147: </a><font color="#B22222">   is necessary to set the iterative solver independently of the command</font>
+<a name="line148">148: </a><font color="#B22222">   line or options database.</font>
+
+<a name="line150">150: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line152">152: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a></font>
+<a name="line153">153: </a><font color="#B22222">@*/</font>
+<a name="line154">154: </a><strong><font color="#4169E1"><a name="NEPSetType"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a> type)</font></strong>
+<a name="line155">155: </a>{
+<a name="line156">156: </a>  PetscErrorCode ierr,(*r)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
+<a name="line157">157: </a>  PetscBool      match;
+
+
+<a name="line163">163: </a>  PetscObjectTypeCompare((PetscObject)nep,type,&match);
+<a name="line164">164: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
+
+<a name="line166">166: </a>  PetscFunctionListFind(NEPList,type,&r);
+<a name="line167">167: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unknown <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> type given: %s"</font>,type);
+
+<a name="line169">169: </a>  <font color="#4169E1">if</font> (nep->ops->destroy) { (*nep->ops->destroy)(nep); }
+<a name="line170">170: </a>  PetscMemzero(nep->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _NEPOps</font>));
+
+<a name="line172">172: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line173">173: </a>  PetscObjectChangeTypeName((PetscObject)nep,type);
+<a name="line174">174: </a>  (*r)(nep);
+<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
+<a name="line176">176: </a>}
+
+<a name="line180">180: </a><font color="#B22222">/*@C</font>
+<a name="line181">181: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a> - Gets the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> type as a string from the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object.</font>
+
+<a name="line183">183: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line185">185: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line186">186: </a><font color="#B22222">.  nep - the eigensolver context</font>
+
+<a name="line188">188: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line189">189: </a><font color="#B22222">.  name - name of <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> method</font>
+
+<a name="line191">191: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line193">193: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>()</font>
+<a name="line194">194: </a><font color="#B22222">@*/</font>
+<a name="line195">195: </a><strong><font color="#4169E1"><a name="NEPGetType"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a> *type)</font></strong>
+<a name="line196">196: </a>{
+<a name="line200">200: </a>  *type = ((PetscObject)nep)->type_name;
+<a name="line201">201: </a>  <font color="#4169E1">return</font>(0);
+<a name="line202">202: </a>}
+
+<a name="line206">206: </a><font color="#B22222">/*@C</font>
+<a name="line207">207: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a> - Adds a method to the nonlinear eigenproblem solver package.</font>
+
+<a name="line209">209: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line211">211: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line212">212: </a><font color="#B22222">+  name - name of a new user-defined solver</font>
+<a name="line213">213: </a><font color="#B22222">-  function - routine to create the solver context</font>
+
+<a name="line215">215: </a><font color="#B22222">   Notes:</font>
+<a name="line216">216: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>() may be called multiple times to add several user-defined solvers.</font>
+
+<a name="line218">218: </a><font color="#B22222">   Sample usage:</font>
+<a name="line219">219: </a><font color="#B22222">.vb</font>
+<a name="line220">220: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>("my_solver",MySolverCreate);</font>
+<a name="line221">221: </a><font color="#B22222">.ve</font>
+
+<a name="line223">223: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
+<a name="line224">224: </a><font color="#B22222">$     <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,"my_solver")</font>
+<a name="line225">225: </a><font color="#B22222">   or at runtime via the option</font>
+<a name="line226">226: </a><font color="#B22222">$     -nep_type my_solver</font>
+
+<a name="line228">228: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line230">230: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>()</font>
+<a name="line231">231: </a><font color="#B22222">@*/</font>
+<a name="line232">232: </a><strong><font color="#4169E1"><a name="NEPRegister"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>))</font></strong>
+<a name="line233">233: </a>{
+
+<a name="line237">237: </a>  PetscFunctionListAdd(&NEPList,name,function);
+<a name="line238">238: </a>  <font color="#4169E1">return</font>(0);
+<a name="line239">239: </a>}
+
+<a name="line243">243: </a><font color="#B22222">/*</font>
+<a name="line244">244: </a><font color="#B22222">   NEPReset_Problem - Destroys the problem matrices.</font>
+<a name="line245">245: </a><font color="#B22222">@*/</font>
+<a name="line246">246: </a><strong><font color="#4169E1"><a name="NEPReset_Problem"></a>PetscErrorCode NEPReset_Problem(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line247">247: </a>{
+<a name="line249">249: </a>  PetscInt       i;
+
+<a name="line253">253: </a>  MatDestroy(&nep->function);
+<a name="line254">254: </a>  MatDestroy(&nep->function_pre);
+<a name="line255">255: </a>  MatDestroy(&nep->jacobian);
+<a name="line256">256: </a>  MatDestroy(&nep->derivatives);
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line258">258: </a>    MatDestroyMatrices(nep->nt,&nep->A);
+<a name="line259">259: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line260">260: </a>      <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&nep->f[i]);
+<a name="line261">261: </a>    }
+<a name="line262">262: </a>    PetscFree(nep->f);
+<a name="line263">263: </a>    PetscFree(nep->nrma);
+<a name="line264">264: </a>  }
+<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
+<a name="line266">266: </a>}
+<a name="line269">269: </a><font color="#B22222">/*@</font>
+<a name="line270">270: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a> - Resets the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context to the initial state and removes any</font>
+<a name="line271">271: </a><font color="#B22222">   allocated objects.</font>
+
+<a name="line273">273: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line275">275: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line276">276: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line278">278: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line280">280: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>()</font>
+<a name="line281">281: </a><font color="#B22222">@*/</font>
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="NEPReset"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line283">283: </a>{
+<a name="line285">285: </a>  PetscInt       ncols;
+
+<a name="line289">289: </a>  <font color="#4169E1">if</font> (nep->ops->reset) { (nep->ops->reset)(nep); }
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (nep->ds) { <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(nep->ds); }
+<a name="line291">291: </a>  NEPReset_Problem(nep);
+<a name="line292">292: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(nep->V,NULL,NULL,&ncols);
+<a name="line293">293: </a>  <font color="#4169E1">if</font> (ncols) {
+<a name="line294">294: </a>    PetscFree4(nep->eigr,nep->eigi,nep->errest,nep->perm);
+<a name="line295">295: </a>  }
+<a name="line296">296: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&nep->V);
+<a name="line297">297: </a>  VecDestroyVecs(nep->nwork,&nep->work);
+<a name="line298">298: </a>  KSPDestroy(&nep->refineksp);
+<a name="line299">299: </a>  PetscSubcommDestroy(&nep->refinesubc);
+<a name="line300">300: </a>  nep->nwork = 0;
+<a name="line301">301: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
+<a name="line303">303: </a>}
+
+<a name="line307">307: </a><font color="#B22222">/*@</font>
+<a name="line308">308: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a> - Destroys the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context.</font>
+
+<a name="line310">310: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line312">312: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line313">313: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line315">315: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line317">317: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>(), <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(), <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>()</font>
+<a name="line318">318: </a><font color="#B22222">@*/</font>
+<a name="line319">319: </a><strong><font color="#4169E1"><a name="NEPDestroy"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> *nep)</font></strong>
+<a name="line320">320: </a>{
+
+<a name="line324">324: </a>  <font color="#4169E1">if</font> (!*nep) <font color="#4169E1">return</font>(0);
+<a name="line326">326: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*nep))->refct > 0) { *nep = 0; <font color="#4169E1">return</font>(0); }
+<a name="line327">327: </a>  <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(*nep);
+<a name="line328">328: </a>  <font color="#4169E1">if</font> ((*nep)->ops->destroy) { (*(*nep)->ops->destroy)(*nep); }
+<a name="line329">329: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&(*nep)->rg);
+<a name="line330">330: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&(*nep)->ds);
+<a name="line331">331: </a>  PetscFree((*nep)->sc);
+<a name="line332">332: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
+<a name="line333">333: </a>  SlepcBasisDestroy_Private(&(*nep)->nini,&(*nep)->IS);
+<a name="line334">334: </a>  <font color="#4169E1">if</font> ((*nep)->convergeddestroy) {
+<a name="line335">335: </a>    (*(*nep)->convergeddestroy)((*nep)->convergedctx);
+<a name="line336">336: </a>  }
+<a name="line337">337: </a>  <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(*nep);
+<a name="line338">338: </a>  PetscHeaderDestroy(nep);
+<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>}
+
+<a name="line344">344: </a><font color="#B22222">/*@</font>
+<a name="line345">345: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a> - Associates a basis vectors object to the nonlinear eigensolver.</font>
+
+<a name="line347">347: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line349">349: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line350">350: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line351">351: </a><font color="#B22222">-  bv  - the basis vectors object</font>
+
+<a name="line353">353: </a><font color="#B22222">   Note:</font>
+<a name="line354">354: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>() to retrieve the basis vectors context (for example,</font>
+<a name="line355">355: </a><font color="#B22222">   to free it at the end of the computations).</font>
+
+<a name="line357">357: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line359">359: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>()</font>
+<a name="line360">360: </a><font color="#B22222">@*/</font>
+<a name="line361">361: </a><strong><font color="#4169E1"><a name="NEPSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line362">362: </a>{
+
+<a name="line369">369: </a>  PetscObjectReference((PetscObject)bv);
+<a name="line370">370: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&nep->V);
+<a name="line371">371: </a>  nep->V = bv;
+<a name="line372">372: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->V);
+<a name="line373">373: </a>  <font color="#4169E1">return</font>(0);
+<a name="line374">374: </a>}
+
+<a name="line378">378: </a><font color="#B22222">/*@</font>
+<a name="line379">379: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a> - Obtain the basis vectors object associated to the nonlinear</font>
+<a name="line380">380: </a><font color="#B22222">   eigensolver object.</font>
+
+<a name="line382">382: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line384">384: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line385">385: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line387">387: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line388">388: </a><font color="#B22222">.  bv - basis vectors context</font>
+
+<a name="line390">390: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line392">392: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a>()</font>
+<a name="line393">393: </a><font color="#B22222">@*/</font>
+<a name="line394">394: </a><strong><font color="#4169E1"><a name="NEPGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
+<a name="line395">395: </a>{
+
+<a name="line401">401: </a>  <font color="#4169E1">if</font> (!nep->V) {
+<a name="line402">402: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)nep),&nep->V);
+<a name="line403">403: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->V);
+<a name="line404">404: </a>  }
+<a name="line405">405: </a>  *bv = nep->V;
+<a name="line406">406: </a>  <font color="#4169E1">return</font>(0);
+<a name="line407">407: </a>}
+
+<a name="line411">411: </a><font color="#B22222">/*@</font>
+<a name="line412">412: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a> - Associates a region object to the nonlinear eigensolver.</font>
+
+<a name="line414">414: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line416">416: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line417">417: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line418">418: </a><font color="#B22222">-  rg  - the region object</font>
+
+<a name="line420">420: </a><font color="#B22222">   Note:</font>
+<a name="line421">421: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>() to retrieve the region context (for example,</font>
+<a name="line422">422: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line153">153: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line424">424: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line155">155: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a></font>
-<a name="line156">156: </a><font color="#B22222">@*/</font>
-<a name="line157">157: </a><strong><font color="#4169E1"><a name="NEPSetType"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a> type)</font></strong>
-<a name="line158">158: </a>{
-<a name="line159">159: </a>  PetscErrorCode ierr,(*r)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>);
-<a name="line160">160: </a>  PetscBool      match;
-
-
-<a name="line166">166: </a>  PetscObjectTypeCompare((PetscObject)nep,type,&match);
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
-
-<a name="line169">169: </a>  PetscFunctionListFind(NEPList,type,&r);
-<a name="line170">170: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unknown <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> type given: %s"</font>,type);
-
-<a name="line172">172: </a>  <font color="#4169E1">if</font> (nep->ops->destroy) { (*nep->ops->destroy)(nep); }
-<a name="line173">173: </a>  PetscMemzero(nep->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _NEPOps</font>));
-
-<a name="line175">175: </a>  nep->state = NEP_STATE_INITIAL;
-<a name="line176">176: </a>  PetscObjectChangeTypeName((PetscObject)nep,type);
-<a name="line177">177: </a>  (*r)(nep);
-<a name="line178">178: </a>  <font color="#4169E1">return</font>(0);
-<a name="line179">179: </a>}
-
-<a name="line183">183: </a><font color="#B22222">/*@C</font>
-<a name="line184">184: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a> - Gets the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> type as a string from the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object.</font>
-
-<a name="line186">186: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line188">188: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line189">189: </a><font color="#B22222">.  nep - the eigensolver context</font>
-
-<a name="line191">191: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line192">192: </a><font color="#B22222">.  name - name of <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> method</font>
-
-<a name="line194">194: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line196">196: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>()</font>
-<a name="line197">197: </a><font color="#B22222">@*/</font>
-<a name="line198">198: </a><strong><font color="#4169E1"><a name="NEPGetType"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetType.html#NEPGetType">NEPGetType</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPType.html#NEPType">NEPType</a> *type)</font></strong>
-<a name="line199">199: </a>{
-<a name="line203">203: </a>  *type = ((PetscObject)nep)->type_name;
-<a name="line204">204: </a>  <font color="#4169E1">return</font>(0);
-<a name="line205">205: </a>}
-
-<a name="line209">209: </a><font color="#B22222">/*@C</font>
-<a name="line210">210: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a> - Adds a method to the nonlinear eigenproblem solver package.</font>
-
-<a name="line212">212: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line214">214: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line215">215: </a><font color="#B22222">+  name - name of a new user-defined solver</font>
-<a name="line216">216: </a><font color="#B22222">-  function - routine to create the solver context</font>
-
-<a name="line218">218: </a><font color="#B22222">   Notes:</font>
-<a name="line219">219: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>() may be called multiple times to add several user-defined solvers.</font>
-
-<a name="line221">221: </a><font color="#B22222">   Sample usage:</font>
-<a name="line222">222: </a><font color="#B22222">.vb</font>
-<a name="line223">223: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>("my_solver",MySolverCreate);</font>
-<a name="line224">224: </a><font color="#B22222">.ve</font>
-
-<a name="line226">226: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
-<a name="line227">227: </a><font color="#B22222">$     <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,"my_solver")</font>
-<a name="line228">228: </a><font color="#B22222">   or at runtime via the option</font>
-<a name="line229">229: </a><font color="#B22222">$     -nep_type my_solver</font>
-
-<a name="line231">231: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line233">233: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>()</font>
-<a name="line234">234: </a><font color="#B22222">@*/</font>
-<a name="line235">235: </a><strong><font color="#4169E1"><a name="NEPRegister"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>))</font></strong>
-<a name="line236">236: </a>{
-
-<a name="line240">240: </a>  PetscFunctionListAdd(&NEPList,name,function);
-<a name="line241">241: </a>  <font color="#4169E1">return</font>(0);
-<a name="line242">242: </a>}
-
-<a name="line246">246: </a><font color="#B22222">/*@</font>
-<a name="line247">247: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a> - Resets the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context to the initial state and removes any</font>
-<a name="line248">248: </a><font color="#B22222">   allocated objects.</font>
-
-<a name="line250">250: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line252">252: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line253">253: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line255">255: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line257">257: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>()</font>
-<a name="line258">258: </a><font color="#B22222">@*/</font>
-<a name="line259">259: </a><strong><font color="#4169E1"><a name="NEPReset"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line260">260: </a>{
-<a name="line262">262: </a>  PetscInt       i,ncols;
-
-<a name="line266">266: </a>  <font color="#4169E1">if</font> (nep->ops->reset) { (nep->ops->reset)(nep); }
-<a name="line267">267: </a>  <font color="#4169E1">if</font> (nep->ds) { <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(nep->ds); }
-<a name="line268">268: </a>  MatDestroy(&nep->function);
-<a name="line269">269: </a>  MatDestroy(&nep->function_pre);
-<a name="line270">270: </a>  MatDestroy(&nep->jacobian);
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (nep->split) {
-<a name="line272">272: </a>    MatDestroyMatrices(nep->nt,&nep->A);
-<a name="line273">273: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line274">274: </a>      <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&nep->f[i]);
-<a name="line275">275: </a>    }
-<a name="line276">276: </a>    PetscFree(nep->f);
-<a name="line277">277: </a>  }
-<a name="line278">278: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(nep->V,NULL,NULL,&ncols);
-<a name="line279">279: </a>  <font color="#4169E1">if</font> (ncols) {
-<a name="line280">280: </a>    PetscFree4(nep->eigr,nep->eigi,nep->errest,nep->perm);
-<a name="line281">281: </a>  }
-<a name="line282">282: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&nep->V);
-<a name="line283">283: </a>  VecDestroyVecs(nep->nwork,&nep->work);
-<a name="line284">284: </a>  nep->nwork  = 0;
-<a name="line285">285: </a>  nep->nfuncs = 0;
-<a name="line286">286: </a>  nep->state  = NEP_STATE_INITIAL;
-<a name="line287">287: </a>  <font color="#4169E1">return</font>(0);
-<a name="line288">288: </a>}
-
-<a name="line292">292: </a><font color="#B22222">/*@</font>
-<a name="line293">293: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a> - Destroys the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context.</font>
-
-<a name="line295">295: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line297">297: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line298">298: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line300">300: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line302">302: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>(), <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(), <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>()</font>
-<a name="line303">303: </a><font color="#B22222">@*/</font>
-<a name="line304">304: </a><strong><font color="#4169E1"><a name="NEPDestroy"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPDestroy.html#NEPDestroy">NEPDestroy</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> *nep)</font></strong>
-<a name="line305">305: </a>{
-
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (!*nep) <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*nep))->refct > 0) { *nep = 0; <font color="#4169E1">return</font>(0); }
-<a name="line312">312: </a>  <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(*nep);
-<a name="line313">313: </a>  <font color="#4169E1">if</font> ((*nep)->ops->destroy) { (*(*nep)->ops->destroy)(*nep); }
-<a name="line314">314: </a>  KSPDestroy(&(*nep)->ksp);
-<a name="line315">315: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&(*nep)->rg);
-<a name="line316">316: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&(*nep)->ds);
-<a name="line317">317: </a>  PetscRandomDestroy(&(*nep)->rand);
-<a name="line318">318: </a>  PetscFree((*nep)->sc);
-<a name="line319">319: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
-<a name="line320">320: </a>  SlepcBasisDestroy_Private(&(*nep)->nini,&(*nep)->IS);
-<a name="line321">321: </a>  <font color="#4169E1">if</font> ((*nep)->convergeddestroy) {
-<a name="line322">322: </a>    (*(*nep)->convergeddestroy)((*nep)->convergedctx);
-<a name="line323">323: </a>  }
-<a name="line324">324: </a>  <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(*nep);
-<a name="line325">325: </a>  PetscHeaderDestroy(nep);
-<a name="line326">326: </a>  <font color="#4169E1">return</font>(0);
-<a name="line327">327: </a>}
-
-<a name="line331">331: </a><font color="#B22222">/*@</font>
-<a name="line332">332: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a> - Associates a basis vectors object to the nonlinear eigensolver.</font>
-
-<a name="line334">334: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line336">336: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line337">337: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-<a name="line338">338: </a><font color="#B22222">-  bv  - the basis vectors object</font>
-
-<a name="line340">340: </a><font color="#B22222">   Note:</font>
-<a name="line341">341: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>() to retrieve the basis vectors context (for example,</font>
-<a name="line342">342: </a><font color="#B22222">   to free it at the end of the computations).</font>
-
-<a name="line344">344: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line346">346: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>()</font>
-<a name="line347">347: </a><font color="#B22222">@*/</font>
-<a name="line348">348: </a><strong><font color="#4169E1"><a name="NEPSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line349">349: </a>{
-
-<a name="line356">356: </a>  PetscObjectReference((PetscObject)bv);
-<a name="line357">357: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&nep->V);
-<a name="line358">358: </a>  nep->V = bv;
-<a name="line359">359: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->V);
-<a name="line360">360: </a>  <font color="#4169E1">return</font>(0);
-<a name="line361">361: </a>}
-
-<a name="line365">365: </a><font color="#B22222">/*@</font>
-<a name="line366">366: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a> - Obtain the basis vectors object associated to the nonlinear</font>
-<a name="line367">367: </a><font color="#B22222">   eigensolver object.</font>
-
-<a name="line369">369: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line371">371: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line372">372: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line374">374: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line375">375: </a><font color="#B22222">.  bv - basis vectors context</font>
-
-<a name="line377">377: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line379">379: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetBV.html#NEPSetBV">NEPSetBV</a>()</font>
-<a name="line380">380: </a><font color="#B22222">@*/</font>
-<a name="line381">381: </a><strong><font color="#4169E1"><a name="NEPGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
-<a name="line382">382: </a>{
-
-<a name="line388">388: </a>  <font color="#4169E1">if</font> (!nep->V) {
-<a name="line389">389: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)nep),&nep->V);
-<a name="line390">390: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->V);
-<a name="line391">391: </a>  }
-<a name="line392">392: </a>  *bv = nep->V;
-<a name="line393">393: </a>  <font color="#4169E1">return</font>(0);
-<a name="line394">394: </a>}
-
-<a name="line398">398: </a><font color="#B22222">/*@</font>
-<a name="line399">399: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a> - Associates a region object to the nonlinear eigensolver.</font>
-
-<a name="line401">401: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line403">403: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line404">404: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-<a name="line405">405: </a><font color="#B22222">-  rg  - the region object</font>
-
-<a name="line407">407: </a><font color="#B22222">   Note:</font>
-<a name="line408">408: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>() to retrieve the region context (for example,</font>
-<a name="line409">409: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line426">426: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>()</font>
+<a name="line427">427: </a><font color="#B22222">@*/</font>
+<a name="line428">428: </a><strong><font color="#4169E1"><a name="NEPSetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line429">429: </a>{
 
-<a name="line411">411: </a><font color="#B22222">   Level: advanced</font>
+<a name="line436">436: </a>  PetscObjectReference((PetscObject)rg);
+<a name="line437">437: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&nep->rg);
+<a name="line438">438: </a>  nep->rg = rg;
+<a name="line439">439: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->rg);
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
 
-<a name="line413">413: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>()</font>
-<a name="line414">414: </a><font color="#B22222">@*/</font>
-<a name="line415">415: </a><strong><font color="#4169E1"><a name="NEPSetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line416">416: </a>{
-
-<a name="line423">423: </a>  PetscObjectReference((PetscObject)rg);
-<a name="line424">424: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&nep->rg);
-<a name="line425">425: </a>  nep->rg = rg;
-<a name="line426">426: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->rg);
-<a name="line427">427: </a>  <font color="#4169E1">return</font>(0);
-<a name="line428">428: </a>}
-
-<a name="line432">432: </a><font color="#B22222">/*@</font>
-<a name="line433">433: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a> - Obtain the region object associated to the</font>
-<a name="line434">434: </a><font color="#B22222">   nonlinear eigensolver object.</font>
-
-<a name="line436">436: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line438">438: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line439">439: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line445">445: </a><font color="#B22222">/*@</font>
+<a name="line446">446: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a> - Obtain the region object associated to the</font>
+<a name="line447">447: </a><font color="#B22222">   nonlinear eigensolver object.</font>
+
+<a name="line449">449: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line451">451: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line452">452: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line454">454: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line455">455: </a><font color="#B22222">.  rg - region context</font>
+
+<a name="line457">457: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line459">459: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a>()</font>
+<a name="line460">460: </a><font color="#B22222">@*/</font>
+<a name="line461">461: </a><strong><font color="#4169E1"><a name="NEPGetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
+<a name="line462">462: </a>{
 
-<a name="line441">441: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line442">442: </a><font color="#B22222">.  rg - region context</font>
+<a name="line468">468: </a>  <font color="#4169E1">if</font> (!nep->rg) {
+<a name="line469">469: </a>    <a href="../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>(PetscObjectComm((PetscObject)nep),&nep->rg);
+<a name="line470">470: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->rg);
+<a name="line471">471: </a>  }
+<a name="line472">472: </a>  *rg = nep->rg;
+<a name="line473">473: </a>  <font color="#4169E1">return</font>(0);
+<a name="line474">474: </a>}
 
-<a name="line444">444: </a><font color="#B22222">   Level: advanced</font>
+<a name="line478">478: </a><font color="#B22222">/*@</font>
+<a name="line479">479: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a> - Associates a direct solver object to the nonlinear eigensolver.</font>
 
-<a name="line446">446: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetRG.html#NEPSetRG">NEPSetRG</a>()</font>
-<a name="line447">447: </a><font color="#B22222">@*/</font>
-<a name="line448">448: </a><strong><font color="#4169E1"><a name="NEPGetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
-<a name="line449">449: </a>{
+<a name="line481">481: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
 
-<a name="line455">455: </a>  <font color="#4169E1">if</font> (!nep->rg) {
-<a name="line456">456: </a>    <a href="../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>(PetscObjectComm((PetscObject)nep),&nep->rg);
-<a name="line457">457: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->rg);
-<a name="line458">458: </a>  }
-<a name="line459">459: </a>  *rg = nep->rg;
-<a name="line460">460: </a>  <font color="#4169E1">return</font>(0);
-<a name="line461">461: </a>}
+<a name="line483">483: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line484">484: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line485">485: </a><font color="#B22222">-  ds  - the direct solver object</font>
+
+<a name="line487">487: </a><font color="#B22222">   Note:</font>
+<a name="line488">488: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>() to retrieve the direct solver context (for example,</font>
+<a name="line489">489: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line465">465: </a><font color="#B22222">/*@</font>
-<a name="line466">466: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a> - Associates a direct solver object to the nonlinear eigensolver.</font>
+<a name="line491">491: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line468">468: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+<a name="line493">493: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>()</font>
+<a name="line494">494: </a><font color="#B22222">@*/</font>
+<a name="line495">495: </a><strong><font color="#4169E1"><a name="NEPSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line496">496: </a>{
+
+<a name="line503">503: </a>  PetscObjectReference((PetscObject)ds);
+<a name="line504">504: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&nep->ds);
+<a name="line505">505: </a>  nep->ds = ds;
+<a name="line506">506: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ds);
+<a name="line507">507: </a>  <font color="#4169E1">return</font>(0);
+<a name="line508">508: </a>}
 
-<a name="line470">470: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line471">471: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-<a name="line472">472: </a><font color="#B22222">-  ds  - the direct solver object</font>
+<a name="line512">512: </a><font color="#B22222">/*@</font>
+<a name="line513">513: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a> - Obtain the direct solver object associated to the</font>
+<a name="line514">514: </a><font color="#B22222">   nonlinear eigensolver object.</font>
 
-<a name="line474">474: </a><font color="#B22222">   Note:</font>
-<a name="line475">475: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>() to retrieve the direct solver context (for example,</font>
-<a name="line476">476: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line516">516: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line478">478: </a><font color="#B22222">   Level: advanced</font>
+<a name="line518">518: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line519">519: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
 
-<a name="line480">480: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>()</font>
-<a name="line481">481: </a><font color="#B22222">@*/</font>
-<a name="line482">482: </a><strong><font color="#4169E1"><a name="NEPSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line483">483: </a>{
+<a name="line521">521: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line522">522: </a><font color="#B22222">.  ds - direct solver context</font>
 
-<a name="line490">490: </a>  PetscObjectReference((PetscObject)ds);
-<a name="line491">491: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&nep->ds);
-<a name="line492">492: </a>  nep->ds = ds;
-<a name="line493">493: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ds);
-<a name="line494">494: </a>  <font color="#4169E1">return</font>(0);
-<a name="line495">495: </a>}
+<a name="line524">524: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line499">499: </a><font color="#B22222">/*@</font>
-<a name="line500">500: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a> - Obtain the direct solver object associated to the</font>
-<a name="line501">501: </a><font color="#B22222">   nonlinear eigensolver object.</font>
+<a name="line526">526: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a>()</font>
+<a name="line527">527: </a><font color="#B22222">@*/</font>
+<a name="line528">528: </a><strong><font color="#4169E1"><a name="NEPGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
+<a name="line529">529: </a>{
 
-<a name="line503">503: </a><font color="#B22222">   Not Collective</font>
+<a name="line535">535: </a>  <font color="#4169E1">if</font> (!nep->ds) {
+<a name="line536">536: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)nep),&nep->ds);
+<a name="line537">537: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ds);
+<a name="line538">538: </a>  }
+<a name="line539">539: </a>  *ds = nep->ds;
+<a name="line540">540: </a>  <font color="#4169E1">return</font>(0);
+<a name="line541">541: </a>}
 
-<a name="line505">505: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line506">506: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line545">545: </a><font color="#B22222">/*@</font>
+<a name="line546">546: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a> - Obtain the ksp object used by the eigensolver</font>
+<a name="line547">547: </a><font color="#B22222">   object in the refinement phase.</font>
+
+<a name="line549">549: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line551">551: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line552">552: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line554">554: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line555">555: </a><font color="#B22222">.  ksp - ksp context</font>
+
+<a name="line557">557: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line559">559: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>()</font>
+<a name="line560">560: </a><font color="#B22222">@*/</font>
+<a name="line561">561: </a><strong><font color="#4169E1"><a name="NEPRefineGetKSP"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP *ksp)</font></strong>
+<a name="line562">562: </a>{
 
-<a name="line508">508: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line509">509: </a><font color="#B22222">.  ds - direct solver context</font>
-
-<a name="line511">511: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line513">513: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDS.html#NEPSetDS">NEPSetDS</a>()</font>
-<a name="line514">514: </a><font color="#B22222">@*/</font>
-<a name="line515">515: </a><strong><font color="#4169E1"><a name="NEPGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
-<a name="line516">516: </a>{
-
-<a name="line522">522: </a>  <font color="#4169E1">if</font> (!nep->ds) {
-<a name="line523">523: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)nep),&nep->ds);
-<a name="line524">524: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ds);
-<a name="line525">525: </a>  }
-<a name="line526">526: </a>  *ds = nep->ds;
-<a name="line527">527: </a>  <font color="#4169E1">return</font>(0);
-<a name="line528">528: </a>}
-
-<a name="line532">532: </a><font color="#B22222">/*@</font>
-<a name="line533">533: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetKSP.html#NEPSetKSP">NEPSetKSP</a> - Associates a linear solver object to the nonlinear eigensolver.</font>
-
-<a name="line535">535: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line537">537: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line538">538: </a><font color="#B22222">+  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-<a name="line539">539: </a><font color="#B22222">-  ksp - the linear solver object</font>
-
-<a name="line541">541: </a><font color="#B22222">   Note:</font>
-<a name="line542">542: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>() to retrieve the linear solver context (for example,</font>
-<a name="line543">543: </a><font color="#B22222">   to free it at the end of the computations).</font>
-
-<a name="line545">545: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line547">547: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>()</font>
-<a name="line548">548: </a><font color="#B22222">@*/</font>
-<a name="line549">549: </a><strong><font color="#4169E1"><a name="NEPSetKSP"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetKSP.html#NEPSetKSP">NEPSetKSP</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP ksp)</font></strong>
-<a name="line550">550: </a>{
-
-<a name="line557">557: </a>  PetscObjectReference((PetscObject)ksp);
-<a name="line558">558: </a>  KSPDestroy(&nep->ksp);
-<a name="line559">559: </a>  nep->ksp = ksp;
-<a name="line560">560: </a>  PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ksp);
-<a name="line561">561: </a>  <font color="#4169E1">return</font>(0);
-<a name="line562">562: </a>}
-
-<a name="line566">566: </a><font color="#B22222">/*@</font>
-<a name="line567">567: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a> - Obtain the linear solver (KSP) object associated</font>
-<a name="line568">568: </a><font color="#B22222">   to the eigensolver object.</font>
-
-<a name="line570">570: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line572">572: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line573">573: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line575">575: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line576">576: </a><font color="#B22222">.  ksp - linear solver context</font>
-
-<a name="line578">578: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line580">580: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetKSP.html#NEPSetKSP">NEPSetKSP</a>()</font>
-<a name="line581">581: </a><font color="#B22222">@*/</font>
-<a name="line582">582: </a><strong><font color="#4169E1"><a name="NEPGetKSP"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,KSP *ksp)</font></strong>
-<a name="line583">583: </a>{
-
-<a name="line589">589: </a>  <font color="#4169E1">if</font> (!nep->ksp) {
-<a name="line590">590: </a>    KSPCreate(PetscObjectComm((PetscObject)nep),&nep->ksp);
-<a name="line591">591: </a>    KSPSetOptionsPrefix(nep->ksp,((PetscObject)nep)->prefix);
-<a name="line592">592: </a>    KSPAppendOptionsPrefix(nep->ksp,<font color="#666666">"nep_"</font>);
-<a name="line593">593: </a>    PetscObjectIncrementTabLevel((PetscObject)nep->ksp,(PetscObject)nep,1);
-<a name="line594">594: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->ksp);
-<a name="line595">595: </a>    KSPSetErrorIfNotConverged(nep->ksp,PETSC_TRUE);
-<a name="line596">596: </a>  }
-<a name="line597">597: </a>  *ksp = nep->ksp;
-<a name="line598">598: </a>  <font color="#4169E1">return</font>(0);
-<a name="line599">599: </a>}
-
-<a name="line603">603: </a><font color="#B22222">/*@</font>
-<a name="line604">604: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a> - Sets the value of the target.</font>
-
-<a name="line606">606: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line608">608: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line609">609: </a><font color="#B22222">+  nep    - eigensolver context</font>
-<a name="line610">610: </a><font color="#B22222">-  target - the value of the target</font>
-
-<a name="line612">612: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line613">613: </a><font color="#B22222">.  -nep_target <scalar> - the value of the target</font>
-
-<a name="line615">615: </a><font color="#B22222">   Notes:</font>
-<a name="line616">616: </a><font color="#B22222">   The target is a scalar value used to determine the portion of the spectrum</font>
-<a name="line617">617: </a><font color="#B22222">   of interest. It is used in combination with <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>().</font>
-
-<a name="line619">619: </a><font color="#B22222">   In the case of complex scalars, a complex value can be provided in the</font>
-<a name="line620">620: </a><font color="#B22222">   command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
-<a name="line621">621: </a><font color="#B22222">   -nep_target 1.0+2.0i</font>
-
-<a name="line623">623: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line625">625: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a>(), <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>()</font>
-<a name="line626">626: </a><font color="#B22222">@*/</font>
-<a name="line627">627: </a><strong><font color="#4169E1"><a name="NEPSetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar target)</font></strong>
-<a name="line628">628: </a>{
-<a name="line632">632: </a>  nep->target = target;
-<a name="line633">633: </a>  <font color="#4169E1">return</font>(0);
-<a name="line634">634: </a>}
-
-<a name="line638">638: </a><font color="#B22222">/*@</font>
-<a name="line639">639: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a> - Gets the value of the target.</font>
-
-<a name="line641">641: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line643">643: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line644">644: </a><font color="#B22222">.  nep - eigensolver context</font>
-
-<a name="line646">646: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line647">647: </a><font color="#B22222">.  target - the value of the target</font>
-
-<a name="line649">649: </a><font color="#B22222">   Note:</font>
-<a name="line650">650: </a><font color="#B22222">   If the target was not set by the user, then zero is returned.</font>
-
-<a name="line652">652: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line654">654: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>()</font>
-<a name="line655">655: </a><font color="#B22222">@*/</font>
-<a name="line656">656: </a><strong><font color="#4169E1"><a name="NEPGetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar* target)</font></strong>
-<a name="line657">657: </a>{
-<a name="line661">661: </a>  *target = nep->target;
-<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
-<a name="line663">663: </a>}
-
-<a name="line667">667: </a><font color="#B22222">/*@C</font>
-<a name="line668">668: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a> - Sets the function to compute the nonlinear Function T(lambda)</font>
-<a name="line669">669: </a><font color="#B22222">   as well as the location to store the matrix.</font>
-
-<a name="line671">671: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
-
-<a name="line673">673: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line674">674: </a><font color="#B22222">+  nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line675">675: </a><font color="#B22222">.  A   - Function matrix</font>
-<a name="line676">676: </a><font color="#B22222">.  B   - preconditioner matrix (usually same as the Function)</font>
-<a name="line677">677: </a><font color="#B22222">.  fun - Function evaluation routine (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
-<a name="line678">678: </a><font color="#B22222">         previously set value)</font>
-<a name="line679">679: </a><font color="#B22222">-  ctx - [optional] user-defined context for private data for the Function</font>
-<a name="line680">680: </a><font color="#B22222">         evaluation routine (may be NULL) (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
-<a name="line681">681: </a><font color="#B22222">         previously set value)</font>
-
-<a name="line683">683: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line685">685: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
-<a name="line686">686: </a><font color="#B22222">@*/</font>
-<a name="line687">687: </a><strong><font color="#4169E1"><a name="NEPSetFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat A,Mat B,PetscErrorCode (*fun)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void *ctx)</font></strong>
-<a name="line688">688: </a>{
-
-<a name="line697">697: </a>  <font color="#4169E1">if</font> (fun) nep->computefunction = fun;
-<a name="line698">698: </a>  <font color="#4169E1">if</font> (ctx) nep->functionctx     = ctx;
-<a name="line699">699: </a>  <font color="#4169E1">if</font> (A) {
-<a name="line700">700: </a>    PetscObjectReference((PetscObject)A);
-<a name="line701">701: </a>    MatDestroy(&nep->function);
-<a name="line702">702: </a>    nep->function = A;
-<a name="line703">703: </a>  }
-<a name="line704">704: </a>  <font color="#4169E1">if</font> (B) {
-<a name="line705">705: </a>    PetscObjectReference((PetscObject)B);
-<a name="line706">706: </a>    MatDestroy(&nep->function_pre);
-<a name="line707">707: </a>    nep->function_pre = B;
-<a name="line708">708: </a>  }
-<a name="line709">709: </a>  nep->split = PETSC_FALSE;
-<a name="line710">710: </a>  <font color="#4169E1">return</font>(0);
-<a name="line711">711: </a>}
-
-<a name="line715">715: </a><font color="#B22222">/*@C</font>
-<a name="line716">716: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a> - Returns the Function matrix and optionally the user</font>
-<a name="line717">717: </a><font color="#B22222">   provided context for evaluating the Function.</font>
-
-<a name="line719">719: </a><font color="#B22222">   Not Collective, but Mat object will be parallel if <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is</font>
-
-<a name="line721">721: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line722">722: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line724">724: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line725">725: </a><font color="#B22222">+  A   - location to stash Function matrix (or NULL)</font>
-<a name="line726">726: </a><font color="#B22222">.  B   - location to stash preconditioner matrix (or NULL)</font>
-<a name="line727">727: </a><font color="#B22222">.  fun - location to put Function function (or NULL)</font>
-<a name="line728">728: </a><font color="#B22222">-  ctx - location to stash Function context (or NULL)</font>
-
-<a name="line730">730: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line732">732: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>()</font>
-<a name="line733">733: </a><font color="#B22222">@*/</font>
-<a name="line734">734: </a><strong><font color="#4169E1"><a name="NEPGetFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat *A,Mat *B,PetscErrorCode (**fun)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void **ctx)</font></strong>
-<a name="line735">735: </a>{
-<a name="line738">738: </a>  <font color="#4169E1">if</font> (A)   *A   = nep->function;
-<a name="line739">739: </a>  <font color="#4169E1">if</font> (B)   *B   = nep->function_pre;
-<a name="line740">740: </a>  <font color="#4169E1">if</font> (fun) *fun = nep->computefunction;
-<a name="line741">741: </a>  <font color="#4169E1">if</font> (ctx) *ctx = nep->functionctx;
-<a name="line742">742: </a>  <font color="#4169E1">return</font>(0);
-<a name="line743">743: </a>}
-
-<a name="line747">747: </a><font color="#B22222">/*@C</font>
-<a name="line748">748: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a> - Sets the function to compute Jacobian T'(lambda) as well</font>
-<a name="line749">749: </a><font color="#B22222">   as the location to store the matrix.</font>
-
-<a name="line751">751: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
-
-<a name="line753">753: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line754">754: </a><font color="#B22222">+  nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line755">755: </a><font color="#B22222">.  A   - Jacobian matrix</font>
-<a name="line756">756: </a><font color="#B22222">.  jac - Jacobian evaluation routine (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
-<a name="line757">757: </a><font color="#B22222">         previously set value)</font>
-<a name="line758">758: </a><font color="#B22222">-  ctx - [optional] user-defined context for private data for the Jacobian</font>
-<a name="line759">759: </a><font color="#B22222">         evaluation routine (may be NULL) (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
-<a name="line760">760: </a><font color="#B22222">         previously set value)</font>
-
-<a name="line762">762: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line764">764: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>()</font>
-<a name="line765">765: </a><font color="#B22222">@*/</font>
-<a name="line766">766: </a><strong><font color="#4169E1"><a name="NEPSetJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat A,PetscErrorCode (*jac)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void *ctx)</font></strong>
-<a name="line767">767: </a>{
-
-<a name="line774">774: </a>  <font color="#4169E1">if</font> (jac) nep->computejacobian = jac;
-<a name="line775">775: </a>  <font color="#4169E1">if</font> (ctx) nep->jacobianctx     = ctx;
-<a name="line776">776: </a>  <font color="#4169E1">if</font> (A) {
-<a name="line777">777: </a>    PetscObjectReference((PetscObject)A);
-<a name="line778">778: </a>    MatDestroy(&nep->jacobian);
-<a name="line779">779: </a>    nep->jacobian = A;
-<a name="line780">780: </a>  }
-<a name="line781">781: </a>  nep->split = PETSC_FALSE;
-<a name="line782">782: </a>  <font color="#4169E1">return</font>(0);
-<a name="line783">783: </a>}
-
-<a name="line787">787: </a><font color="#B22222">/*@C</font>
-<a name="line788">788: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a> - Returns the Jacobian matrix and optionally the user</font>
-<a name="line789">789: </a><font color="#B22222">   provided context for evaluating the Jacobian.</font>
-
-<a name="line791">791: </a><font color="#B22222">   Not Collective, but Mat object will be parallel if <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is</font>
-
-<a name="line793">793: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line794">794: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line796">796: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line797">797: </a><font color="#B22222">+  A   - location to stash Jacobian matrix (or NULL)</font>
-<a name="line798">798: </a><font color="#B22222">.  jac - location to put Jacobian function (or NULL)</font>
-<a name="line799">799: </a><font color="#B22222">-  ctx - location to stash Jacobian context (or NULL)</font>
-
-<a name="line801">801: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line803">803: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
-<a name="line804">804: </a><font color="#B22222">@*/</font>
-<a name="line805">805: </a><strong><font color="#4169E1"><a name="NEPGetJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat *A,PetscErrorCode (**jac)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void **ctx)</font></strong>
-<a name="line806">806: </a>{
-<a name="line809">809: </a>  <font color="#4169E1">if</font> (A)   *A   = nep->jacobian;
-<a name="line810">810: </a>  <font color="#4169E1">if</font> (jac) *jac = nep->computejacobian;
-<a name="line811">811: </a>  <font color="#4169E1">if</font> (ctx) *ctx = nep->jacobianctx;
-<a name="line812">812: </a>  <font color="#4169E1">return</font>(0);
-<a name="line813">813: </a>}
-
-<a name="line817">817: </a><font color="#B22222">/*@</font>
-<a name="line818">818: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a> - Sets the operator of the nonlinear eigenvalue problem</font>
-<a name="line819">819: </a><font color="#B22222">   in split form.</font>
-
-<a name="line821">821: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>, Mat and <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line823">823: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line824">824: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line825">825: </a><font color="#B22222">.  n   - number of terms in the split form</font>
-<a name="line826">826: </a><font color="#B22222">.  A   - array of matrices</font>
-<a name="line827">827: </a><font color="#B22222">.  f   - array of functions</font>
-<a name="line828">828: </a><font color="#B22222">-  str - structure flag for matrices</font>
-
-<a name="line830">830: </a><font color="#B22222">   Notes:</font>
-<a name="line831">831: </a><font color="#B22222">   The nonlinear operator is written as T(lambda) = sum_i A_i*f_i(lambda),</font>
-<a name="line832">832: </a><font color="#B22222">   for i=1,...,n. The derivative T'(lambda) can be obtained using the</font>
-<a name="line833">833: </a><font color="#B22222">   derivatives of f_i.</font>
-
-<a name="line835">835: </a><font color="#B22222">   The structure flag provides information about A_i's nonzero pattern</font>
-<a name="line836">836: </a><font color="#B22222">   (see MatStructure enum). If all matrices have the same pattern, then</font>
-<a name="line837">837: </a><font color="#B22222">   use SAME_NONZERO_PATTERN. If the patterns are different but contained</font>
-<a name="line838">838: </a><font color="#B22222">   in the pattern of the first one, then use SUBSET_NONZERO_PATTERN.</font>
-<a name="line839">839: </a><font color="#B22222">   Otherwise use DIFFERENT_NONZERO_PATTERN.</font>
-
-<a name="line841">841: </a><font color="#B22222">   This function must be called before <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(). If it is called again</font>
-<a name="line842">842: </a><font color="#B22222">   after <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>() then the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is reset.</font>
-
-<a name="line844">844: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line846">846: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>(), <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>()</font>
-<a name="line847">847: </a><font color="#B22222"> @*/</font>
-<a name="line848">848: </a><strong><font color="#4169E1"><a name="NEPSetSplitOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt n,Mat A[],<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> f[],MatStructure str)</font></strong>
-<a name="line849">849: </a>{
-<a name="line850">850: </a>  PetscInt       i;
-
-<a name="line856">856: </a>  <font color="#4169E1">if</font> (n <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Must have one or more terms, you have %D"</font>,n);
-<a name="line861">861: </a>  <font color="#4169E1">if</font> (nep->state) { <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(nep); }
-<a name="line862">862: </a>  <font color="#B22222">/* clean previously stored information */</font>
-<a name="line863">863: </a>  MatDestroy(&nep->function);
-<a name="line864">864: </a>  MatDestroy(&nep->function_pre);
-<a name="line865">865: </a>  MatDestroy(&nep->jacobian);
-<a name="line866">866: </a>  <font color="#4169E1">if</font> (nep->split) {
-<a name="line867">867: </a>    MatDestroyMatrices(nep->nt,&nep->A);
-<a name="line868">868: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line869">869: </a>      <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&nep->f[i]);
-<a name="line870">870: </a>    }
-<a name="line871">871: </a>    PetscFree(nep->f);
-<a name="line872">872: </a>  }
-<a name="line873">873: </a>  <font color="#B22222">/* allocate space and copy matrices and functions */</font>
-<a name="line874">874: </a>  PetscMalloc1(n,&nep->A);
-<a name="line875">875: </a>  PetscLogObjectMemory((PetscObject)nep,n*<font color="#4169E1">sizeof</font>(Mat));
-<a name="line876">876: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line878">878: </a>    PetscObjectReference((PetscObject)A[i]);
-<a name="line879">879: </a>    nep->A[i] = A[i];
-<a name="line880">880: </a>  }
-<a name="line881">881: </a>  PetscMalloc1(n,&nep->f);
-<a name="line882">882: </a>  PetscLogObjectMemory((PetscObject)nep,n*<font color="#4169E1">sizeof</font>(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>));
-<a name="line883">883: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line885">885: </a>    PetscObjectReference((PetscObject)f[i]);
-<a name="line886">886: </a>    nep->f[i] = f[i];
-<a name="line887">887: </a>  }
-<a name="line888">888: </a>  nep->nt    = n;
-<a name="line889">889: </a>  nep->mstr  = str;
-<a name="line890">890: </a>  nep->split = PETSC_TRUE;
-<a name="line891">891: </a>  <font color="#4169E1">return</font>(0);
-<a name="line892">892: </a>}
-
-<a name="line896">896: </a><font color="#B22222">/*@</font>
-<a name="line897">897: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a> - Gets the matrices and functions associated with</font>
-<a name="line898">898: </a><font color="#B22222">   the nonlinear operator in split form.</font>
-
-<a name="line900">900: </a><font color="#B22222">   Not collective, though parallel Mats and FNs are returned if the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> is parallel</font>
-
-<a name="line902">902: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line903">903: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line904">904: </a><font color="#B22222">-  k   - the index of the requested term (starting in 0)</font>
-
-<a name="line906">906: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line907">907: </a><font color="#B22222">+  A - the matrix of the requested term</font>
-<a name="line908">908: </a><font color="#B22222">-  f - the function of the requested term</font>
-
-<a name="line910">910: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line912">912: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(), <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>()</font>
-<a name="line913">913: </a><font color="#B22222">@*/</font>
-<a name="line914">914: </a><strong><font color="#4169E1"><a name="NEPGetSplitOperatorTerm"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt k,Mat *A,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> *f)</font></strong>
-<a name="line915">915: </a>{
-<a name="line918">918: </a>  <font color="#4169E1">if</font> (k<0 || k>=nep->nt) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,nep->nt-1);
-<a name="line919">919: </a>  <font color="#4169E1">if</font> (A) *A = nep->A[k];
-<a name="line920">920: </a>  <font color="#4169E1">if</font> (f) *f = nep->f[k];
-<a name="line921">921: </a>  <font color="#4169E1">return</font>(0);
-<a name="line922">922: </a>}
-
-<a name="line926">926: </a><font color="#B22222">/*@</font>
-<a name="line927">927: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a> - Returns the number of terms of the split form of</font>
-<a name="line928">928: </a><font color="#B22222">   the nonlinear operator, as well as the structure flag for matrices.</font>
-
-<a name="line930">930: </a><font color="#B22222">   Not collective</font>
-
-<a name="line932">932: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line933">933: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line935">935: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line936">936: </a><font color="#B22222">+  n   - the number of terms passed in <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>()</font>
-<a name="line937">937: </a><font color="#B22222">-  str - the matrix structure flag passed in <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>()</font>
-
-<a name="line939">939: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line941">941: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(), <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>()</font>
-<a name="line942">942: </a><font color="#B22222">@*/</font>
-<a name="line943">943: </a><strong><font color="#4169E1"><a name="NEPGetSplitOperatorInfo"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *n,MatStructure *str)</font></strong>
-<a name="line944">944: </a>{
-<a name="line947">947: </a>  <font color="#4169E1">if</font> (n) *n = nep->nt;
-<a name="line948">948: </a>  <font color="#4169E1">if</font> (str) *str = nep->mstr;
-<a name="line949">949: </a>  <font color="#4169E1">return</font>(0);
-<a name="line950">950: </a>}
+<a name="line568">568: </a>  <font color="#4169E1">if</font> (!nep->refineksp) {
+<a name="line569">569: </a>    <font color="#4169E1">if</font> (nep->npart>1) {
+<a name="line570">570: </a>      <font color="#B22222">/* Split in subcomunicators */</font>
+<a name="line571">571: </a>      PetscSubcommCreate(PetscObjectComm((PetscObject)nep),&nep->refinesubc);
+<a name="line572">572: </a>      PetscSubcommSetNumber(nep->refinesubc,nep->npart);
+<a name="line573">573: </a>      PetscSubcommSetType(nep->refinesubc,PETSC_SUBCOMM_CONTIGUOUS);
+<a name="line574">574: </a>      PetscLogObjectMemory((PetscObject)nep,<font color="#4169E1">sizeof</font>(PetscSubcomm));
+<a name="line575">575: </a>    }
+<a name="line576">576: </a>    KSPCreate((nep->npart==1)?PetscObjectComm((PetscObject)nep):PetscSubcommChild(nep->refinesubc),&nep->refineksp);
+<a name="line577">577: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->refineksp);
+<a name="line578">578: </a>    KSPSetOptionsPrefix(*ksp,((PetscObject)nep)->prefix);
+<a name="line579">579: </a>    KSPAppendOptionsPrefix(*ksp,<font color="#666666">"nep_refine_"</font>);
+<a name="line580">580: </a>    KSPSetErrorIfNotConverged(*ksp,PETSC_TRUE);
+<a name="line581">581: </a>  }
+<a name="line582">582: </a>  *ksp = nep->refineksp;
+<a name="line583">583: </a>  <font color="#4169E1">return</font>(0);
+<a name="line584">584: </a>}
+
+<a name="line588">588: </a><font color="#B22222">/*@</font>
+<a name="line589">589: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a> - Sets the value of the target.</font>
+
+<a name="line591">591: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line593">593: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line594">594: </a><font color="#B22222">+  nep    - eigensolver context</font>
+<a name="line595">595: </a><font color="#B22222">-  target - the value of the target</font>
+
+<a name="line597">597: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line598">598: </a><font color="#B22222">.  -nep_target <scalar> - the value of the target</font>
+
+<a name="line600">600: </a><font color="#B22222">   Notes:</font>
+<a name="line601">601: </a><font color="#B22222">   The target is a scalar value used to determine the portion of the spectrum</font>
+<a name="line602">602: </a><font color="#B22222">   of interest. It is used in combination with <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>().</font>
+
+<a name="line604">604: </a><font color="#B22222">   In the case of complex scalars, a complex value can be provided in the</font>
+<a name="line605">605: </a><font color="#B22222">   command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
+<a name="line606">606: </a><font color="#B22222">   -nep_target 1.0+2.0i</font>
+
+<a name="line608">608: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line610">610: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a>(), <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>()</font>
+<a name="line611">611: </a><font color="#B22222">@*/</font>
+<a name="line612">612: </a><strong><font color="#4169E1"><a name="NEPSetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar target)</font></strong>
+<a name="line613">613: </a>{
+<a name="line617">617: </a>  nep->target = target;
+<a name="line618">618: </a>  <font color="#4169E1">return</font>(0);
+<a name="line619">619: </a>}
+
+<a name="line623">623: </a><font color="#B22222">/*@</font>
+<a name="line624">624: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a> - Gets the value of the target.</font>
+
+<a name="line626">626: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line628">628: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line629">629: </a><font color="#B22222">.  nep - eigensolver context</font>
+
+<a name="line631">631: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line632">632: </a><font color="#B22222">.  target - the value of the target</font>
+
+<a name="line634">634: </a><font color="#B22222">   Note:</font>
+<a name="line635">635: </a><font color="#B22222">   If the target was not set by the user, then zero is returned.</font>
+
+<a name="line637">637: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line639">639: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>()</font>
+<a name="line640">640: </a><font color="#B22222">@*/</font>
+<a name="line641">641: </a><strong><font color="#4169E1"><a name="NEPGetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetTarget.html#NEPGetTarget">NEPGetTarget</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar* target)</font></strong>
+<a name="line642">642: </a>{
+<a name="line646">646: </a>  *target = nep->target;
+<a name="line647">647: </a>  <font color="#4169E1">return</font>(0);
+<a name="line648">648: </a>}
+
+<a name="line652">652: </a><font color="#B22222">/*@C</font>
+<a name="line653">653: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a> - Sets the function to compute the nonlinear Function T(lambda)</font>
+<a name="line654">654: </a><font color="#B22222">   as well as the location to store the matrix.</font>
+
+<a name="line656">656: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
+
+<a name="line658">658: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line659">659: </a><font color="#B22222">+  nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line660">660: </a><font color="#B22222">.  A   - Function matrix</font>
+<a name="line661">661: </a><font color="#B22222">.  B   - preconditioner matrix (usually same as the Function)</font>
+<a name="line662">662: </a><font color="#B22222">.  fun - Function evaluation routine (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
+<a name="line663">663: </a><font color="#B22222">         previously set value)</font>
+<a name="line664">664: </a><font color="#B22222">-  ctx - [optional] user-defined context for private data for the Function</font>
+<a name="line665">665: </a><font color="#B22222">         evaluation routine (may be NULL) (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
+<a name="line666">666: </a><font color="#B22222">         previously set value)</font>
+
+<a name="line668">668: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line670">670: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
+<a name="line671">671: </a><font color="#B22222">@*/</font>
+<a name="line672">672: </a><strong><font color="#4169E1"><a name="NEPSetFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat A,Mat B,PetscErrorCode (*fun)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void *ctx)</font></strong>
+<a name="line673">673: </a>{
+
+
+<a name="line683">683: </a>  <font color="#4169E1">if</font> (nep->fui && nep->fui!=NEP_USER_INTERFACE_CALLBACK) {  <font color="#B22222">/* clean previous user info */</font>
+<a name="line684">684: </a>    NEPReset_Problem(nep);
+<a name="line685">685: </a>  }
+
+<a name="line687">687: </a>  <font color="#4169E1">if</font> (fun) nep->computefunction = fun;
+<a name="line688">688: </a>  <font color="#4169E1">if</font> (ctx) nep->functionctx     = ctx;
+<a name="line689">689: </a>  <font color="#4169E1">if</font> (A) {
+<a name="line690">690: </a>    PetscObjectReference((PetscObject)A);
+<a name="line691">691: </a>    MatDestroy(&nep->function);
+<a name="line692">692: </a>    nep->function = A;
+<a name="line693">693: </a>  }
+<a name="line694">694: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line695">695: </a>    PetscObjectReference((PetscObject)B);
+<a name="line696">696: </a>    MatDestroy(&nep->function_pre);
+<a name="line697">697: </a>    nep->function_pre = B;
+<a name="line698">698: </a>  }
+<a name="line699">699: </a>  nep->fui = NEP_USER_INTERFACE_CALLBACK;
+<a name="line700">700: </a>  <font color="#4169E1">return</font>(0);
+<a name="line701">701: </a>}
+
+<a name="line705">705: </a><font color="#B22222">/*@C</font>
+<a name="line706">706: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a> - Returns the Function matrix and optionally the user</font>
+<a name="line707">707: </a><font color="#B22222">   provided context for evaluating the Function.</font>
+
+<a name="line709">709: </a><font color="#B22222">   Not Collective, but Mat object will be parallel if <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is</font>
+
+<a name="line711">711: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line712">712: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line714">714: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line715">715: </a><font color="#B22222">+  A   - location to stash Function matrix (or NULL)</font>
+<a name="line716">716: </a><font color="#B22222">.  B   - location to stash preconditioner matrix (or NULL)</font>
+<a name="line717">717: </a><font color="#B22222">.  fun - location to put Function function (or NULL)</font>
+<a name="line718">718: </a><font color="#B22222">-  ctx - location to stash Function context (or NULL)</font>
+
+<a name="line720">720: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line722">722: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>()</font>
+<a name="line723">723: </a><font color="#B22222">@*/</font>
+<a name="line724">724: </a><strong><font color="#4169E1"><a name="NEPGetFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat *A,Mat *B,PetscErrorCode (**fun)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,Mat,void*),void **ctx)</font></strong>
+<a name="line725">725: </a>{
+<a name="line728">728: </a>  NEPCheckCallback(nep,1);
+<a name="line729">729: </a>  <font color="#4169E1">if</font> (A)   *A   = nep->function;
+<a name="line730">730: </a>  <font color="#4169E1">if</font> (B)   *B   = nep->function_pre;
+<a name="line731">731: </a>  <font color="#4169E1">if</font> (fun) *fun = nep->computefunction;
+<a name="line732">732: </a>  <font color="#4169E1">if</font> (ctx) *ctx = nep->functionctx;
+<a name="line733">733: </a>  <font color="#4169E1">return</font>(0);
+<a name="line734">734: </a>}
+
+<a name="line738">738: </a><font color="#B22222">/*@C</font>
+<a name="line739">739: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a> - Sets the function to compute Jacobian T'(lambda) as well</font>
+<a name="line740">740: </a><font color="#B22222">   as the location to store the matrix.</font>
+
+<a name="line742">742: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
+
+<a name="line744">744: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line745">745: </a><font color="#B22222">+  nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line746">746: </a><font color="#B22222">.  A   - Jacobian matrix</font>
+<a name="line747">747: </a><font color="#B22222">.  jac - Jacobian evaluation routine (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
+<a name="line748">748: </a><font color="#B22222">         previously set value)</font>
+<a name="line749">749: </a><font color="#B22222">-  ctx - [optional] user-defined context for private data for the Jacobian</font>
+<a name="line750">750: </a><font color="#B22222">         evaluation routine (may be NULL) (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
+<a name="line751">751: </a><font color="#B22222">         previously set value)</font>
+
+<a name="line753">753: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line755">755: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>()</font>
+<a name="line756">756: </a><font color="#B22222">@*/</font>
+<a name="line757">757: </a><strong><font color="#4169E1"><a name="NEPSetJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat A,PetscErrorCode (*jac)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void *ctx)</font></strong>
+<a name="line758">758: </a>{
+
+
+<a name="line766">766: </a>  <font color="#4169E1">if</font> (nep->fui && nep->fui!=NEP_USER_INTERFACE_CALLBACK) {  <font color="#B22222">/* clean previous user info */</font>
+<a name="line767">767: </a>    NEPReset_Problem(nep);
+<a name="line768">768: </a>  }
+
+<a name="line770">770: </a>  <font color="#4169E1">if</font> (jac) nep->computejacobian = jac;
+<a name="line771">771: </a>  <font color="#4169E1">if</font> (ctx) nep->jacobianctx     = ctx;
+<a name="line772">772: </a>  <font color="#4169E1">if</font> (A) {
+<a name="line773">773: </a>    PetscObjectReference((PetscObject)A);
+<a name="line774">774: </a>    MatDestroy(&nep->jacobian);
+<a name="line775">775: </a>    nep->jacobian = A;
+<a name="line776">776: </a>  }
+<a name="line777">777: </a>  nep->fui = NEP_USER_INTERFACE_CALLBACK;
+<a name="line778">778: </a>  <font color="#4169E1">return</font>(0);
+<a name="line779">779: </a>}
+
+<a name="line783">783: </a><font color="#B22222">/*@C</font>
+<a name="line784">784: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a> - Returns the Jacobian matrix and optionally the user</font>
+<a name="line785">785: </a><font color="#B22222">   provided routine and context for evaluating the Jacobian.</font>
+
+<a name="line787">787: </a><font color="#B22222">   Not Collective, but Mat object will be parallel if <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is</font>
+
+<a name="line789">789: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line790">790: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line792">792: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line793">793: </a><font color="#B22222">+  A   - location to stash Jacobian matrix (or NULL)</font>
+<a name="line794">794: </a><font color="#B22222">.  jac - location to put Jacobian function (or NULL)</font>
+<a name="line795">795: </a><font color="#B22222">-  ctx - location to stash Jacobian context (or NULL)</font>
+
+<a name="line797">797: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line799">799: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>()</font>
+<a name="line800">800: </a><font color="#B22222">@*/</font>
+<a name="line801">801: </a><strong><font color="#4169E1"><a name="NEPGetJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat *A,PetscErrorCode (**jac)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,Mat,void*),void **ctx)</font></strong>
+<a name="line802">802: </a>{
+<a name="line805">805: </a>  NEPCheckCallback(nep,1);
+<a name="line806">806: </a>  <font color="#4169E1">if</font> (A)   *A   = nep->jacobian;
+<a name="line807">807: </a>  <font color="#4169E1">if</font> (jac) *jac = nep->computejacobian;
+<a name="line808">808: </a>  <font color="#4169E1">if</font> (ctx) *ctx = nep->jacobianctx;
+<a name="line809">809: </a>  <font color="#4169E1">return</font>(0);
+<a name="line810">810: </a>}
+
+<a name="line814">814: </a><font color="#B22222">/*@</font>
+<a name="line815">815: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a> - Sets the operator of the nonlinear eigenvalue problem</font>
+<a name="line816">816: </a><font color="#B22222">   in split form.</font>
+
+<a name="line818">818: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>, Mat and <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line820">820: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line821">821: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line822">822: </a><font color="#B22222">.  n   - number of terms in the split form</font>
+<a name="line823">823: </a><font color="#B22222">.  A   - array of matrices</font>
+<a name="line824">824: </a><font color="#B22222">.  f   - array of functions</font>
+<a name="line825">825: </a><font color="#B22222">-  str - structure flag for matrices</font>
+
+<a name="line827">827: </a><font color="#B22222">   Notes:</font>
+<a name="line828">828: </a><font color="#B22222">   The nonlinear operator is written as T(lambda) = sum_i A_i*f_i(lambda),</font>
+<a name="line829">829: </a><font color="#B22222">   for i=1,...,n. The derivative T'(lambda) can be obtained using the</font>
+<a name="line830">830: </a><font color="#B22222">   derivatives of f_i.</font>
+
+<a name="line832">832: </a><font color="#B22222">   The structure flag provides information about A_i's nonzero pattern</font>
+<a name="line833">833: </a><font color="#B22222">   (see MatStructure enum). If all matrices have the same pattern, then</font>
+<a name="line834">834: </a><font color="#B22222">   use SAME_NONZERO_PATTERN. If the patterns are different but contained</font>
+<a name="line835">835: </a><font color="#B22222">   in the pattern of the first one, then use SUBSET_NONZERO_PATTERN.</font>
+<a name="line836">836: </a><font color="#B22222">   Otherwise use DIFFERENT_NONZERO_PATTERN.</font>
+
+<a name="line838">838: </a><font color="#B22222">   This function must be called before <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(). If it is called again</font>
+<a name="line839">839: </a><font color="#B22222">   after <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>() then the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is reset.</font>
+
+<a name="line841">841: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line843">843: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>(), <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>()</font>
+<a name="line844">844: </a><font color="#B22222"> @*/</font>
+<a name="line845">845: </a><strong><font color="#4169E1"><a name="NEPSetSplitOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt n,Mat A[],<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> f[],MatStructure str)</font></strong>
+<a name="line846">846: </a>{
+<a name="line847">847: </a>  PetscInt       i;
+
+<a name="line853">853: </a>  <font color="#4169E1">if</font> (n <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Must have one or more terms, you have %D"</font>,n);
+<a name="line858">858: </a>  <font color="#4169E1">if</font> (nep->state) { <a href="../../../docs/manualpages/NEP/NEPReset.html#NEPReset">NEPReset</a>(nep); }
+<a name="line859">859: </a>  <font color="#B22222">/* clean previously stored information */</font>
+<a name="line860">860: </a>  NEPReset_Problem(nep);
+<a name="line861">861: </a>  <font color="#B22222">/* allocate space and copy matrices and functions */</font>
+<a name="line862">862: </a>  PetscMalloc1(n,&nep->A);
+<a name="line863">863: </a>  PetscLogObjectMemory((PetscObject)nep,n*<font color="#4169E1">sizeof</font>(Mat));
+<a name="line864">864: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line866">866: </a>    PetscObjectReference((PetscObject)A[i]);
+<a name="line867">867: </a>    nep->A[i] = A[i];
+<a name="line868">868: </a>  }
+<a name="line869">869: </a>  PetscMalloc1(n,&nep->f);
+<a name="line870">870: </a>  PetscLogObjectMemory((PetscObject)nep,n*<font color="#4169E1">sizeof</font>(<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>));
+<a name="line871">871: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line873">873: </a>    PetscObjectReference((PetscObject)f[i]);
+<a name="line874">874: </a>    nep->f[i] = f[i];
+<a name="line875">875: </a>  }
+<a name="line876">876: </a>  PetscCalloc1(n,&nep->nrma);
+<a name="line877">877: </a>  PetscLogObjectMemory((PetscObject)nep,n*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line878">878: </a>  nep->nt   = n;
+<a name="line879">879: </a>  nep->mstr = str;
+<a name="line880">880: </a>  nep->fui  = NEP_USER_INTERFACE_SPLIT;
+<a name="line881">881: </a>  <font color="#4169E1">return</font>(0);
+<a name="line882">882: </a>}
+
+<a name="line886">886: </a><font color="#B22222">/*@</font>
+<a name="line887">887: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a> - Gets the matrices and functions associated with</font>
+<a name="line888">888: </a><font color="#B22222">   the nonlinear operator in split form.</font>
+
+<a name="line890">890: </a><font color="#B22222">   Not collective, though parallel Mats and FNs are returned if the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> is parallel</font>
+
+<a name="line892">892: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line893">893: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line894">894: </a><font color="#B22222">-  k   - the index of the requested term (starting in 0)</font>
+
+<a name="line896">896: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line897">897: </a><font color="#B22222">+  A - the matrix of the requested term</font>
+<a name="line898">898: </a><font color="#B22222">-  f - the function of the requested term</font>
+
+<a name="line900">900: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line902">902: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(), <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>()</font>
+<a name="line903">903: </a><font color="#B22222">@*/</font>
+<a name="line904">904: </a><strong><font color="#4169E1"><a name="NEPGetSplitOperatorTerm"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt k,Mat *A,<a href="../../../docs/manualpages/FN/FN.html#FN">FN</a> *f)</font></strong>
+<a name="line905">905: </a>{
+<a name="line908">908: </a>  NEPCheckSplit(nep,1);
+<a name="line909">909: </a>  <font color="#4169E1">if</font> (k<0 || k>=nep->nt) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,nep->nt-1);
+<a name="line910">910: </a>  <font color="#4169E1">if</font> (A) *A = nep->A[k];
+<a name="line911">911: </a>  <font color="#4169E1">if</font> (f) *f = nep->f[k];
+<a name="line912">912: </a>  <font color="#4169E1">return</font>(0);
+<a name="line913">913: </a>}
+
+<a name="line917">917: </a><font color="#B22222">/*@</font>
+<a name="line918">918: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a> - Returns the number of terms of the split form of</font>
+<a name="line919">919: </a><font color="#B22222">   the nonlinear operator, as well as the structure flag for matrices.</font>
+
+<a name="line921">921: </a><font color="#B22222">   Not collective</font>
+
+<a name="line923">923: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line924">924: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line926">926: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line927">927: </a><font color="#B22222">+  n   - the number of terms passed in <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>()</font>
+<a name="line928">928: </a><font color="#B22222">-  str - the matrix structure flag passed in <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>()</font>
+
+<a name="line930">930: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line932">932: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(), <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorTerm.html#NEPGetSplitOperatorTerm">NEPGetSplitOperatorTerm</a>()</font>
+<a name="line933">933: </a><font color="#B22222">@*/</font>
+<a name="line934">934: </a><strong><font color="#4169E1"><a name="NEPGetSplitOperatorInfo"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetSplitOperatorInfo.html#NEPGetSplitOperatorInfo">NEPGetSplitOperatorInfo</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *n,MatStructure *str)</font></strong>
+<a name="line935">935: </a>{
+<a name="line938">938: </a>  NEPCheckSplit(nep,1);
+<a name="line939">939: </a>  <font color="#4169E1">if</font> (n)   *n = nep->nt;
+<a name="line940">940: </a>  <font color="#4169E1">if</font> (str) *str = nep->mstr;
+<a name="line941">941: </a>  <font color="#4169E1">return</font>(0);
+<a name="line942">942: </a>}
+
+<a name="line946">946: </a><font color="#B22222">/*@C</font>
+<a name="line947">947: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetDerivatives.html#NEPSetDerivatives">NEPSetDerivatives</a> - Sets the function to compute the k-th derivative T^(k)(lambda)</font>
+<a name="line948">948: </a><font color="#B22222">   for any value of k (including 0), as well as the location to store the matrix.</font>
+
+<a name="line950">950: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
+
+<a name="line952">952: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line953">953: </a><font color="#B22222">+  nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line954">954: </a><font color="#B22222">.  A   - the matrix to store the computed derivative</font>
+<a name="line955">955: </a><font color="#B22222">.  der - routing to evaluate the k-th derivative (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
+<a name="line956">956: </a><font color="#B22222">         previously set value)</font>
+<a name="line957">957: </a><font color="#B22222">-  ctx - [optional] user-defined context for private data for the derivatives</font>
+<a name="line958">958: </a><font color="#B22222">         evaluation routine (may be NULL) (if NULL then <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> retains any</font>
+<a name="line959">959: </a><font color="#B22222">         previously set value)</font>
+
+<a name="line961">961: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line963">963: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPGetDerivatives.html#NEPGetDerivatives">NEPGetDerivatives</a>()</font>
+<a name="line964">964: </a><font color="#B22222">@*/</font>
+<a name="line965">965: </a><strong><font color="#4169E1"><a name="NEPSetDerivatives"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetDerivatives.html#NEPSetDerivatives">NEPSetDerivatives</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat A,PetscErrorCode (*der)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscInt,Mat,void*),void *ctx)</font></strong>
+<a name="line966">966: </a>{
+
+
+<a name="line974">974: </a>  <font color="#4169E1">if</font> (nep->fui && nep->fui!=NEP_USER_INTERFACE_DERIVATIVES) {  <font color="#B22222">/* clean previous user info */</font>
+<a name="line975">975: </a>    NEPReset_Problem(nep);
+<a name="line976">976: </a>  }
+
+<a name="line978">978: </a>  <font color="#4169E1">if</font> (der) nep->computederivatives = der;
+<a name="line979">979: </a>  <font color="#4169E1">if</font> (ctx) nep->derivativesctx     = ctx;
+<a name="line980">980: </a>  <font color="#4169E1">if</font> (A) {
+<a name="line981">981: </a>    PetscObjectReference((PetscObject)A);
+<a name="line982">982: </a>    MatDestroy(&nep->derivatives);
+<a name="line983">983: </a>    nep->derivatives = A;
+<a name="line984">984: </a>  }
+<a name="line985">985: </a>  nep->fui = NEP_USER_INTERFACE_DERIVATIVES;
+<a name="line986">986: </a>  <font color="#4169E1">return</font>(0);
+<a name="line987">987: </a>}
+
+<a name="line991">991: </a><font color="#B22222">/*@C</font>
+<a name="line992">992: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetDerivatives.html#NEPGetDerivatives">NEPGetDerivatives</a> - Returns the derivatives matrix and optionally the user</font>
+<a name="line993">993: </a><font color="#B22222">   provided routine and context for evaluating the derivatives.</font>
+
+<a name="line995">995: </a><font color="#B22222">   Not Collective, but Mat object will be parallel if <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object is</font>
+
+<a name="line997">997: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line998">998: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1000">1000: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1001">1001: </a><font color="#B22222">+  A   - location to stash the derivatives matrix (or NULL)</font>
+<a name="line1002">1002: </a><font color="#B22222">.  der - location to put derivatives function (or NULL)</font>
+<a name="line1003">1003: </a><font color="#B22222">-  ctx - location to stash derivatives context (or NULL)</font>
+
+<a name="line1005">1005: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1007">1007: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDerivatives.html#NEPSetDerivatives">NEPSetDerivatives</a>()</font>
+<a name="line1008">1008: </a><font color="#B22222">@*/</font>
+<a name="line1009">1009: </a><strong><font color="#4169E1"><a name="NEPGetDerivatives"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetDerivatives.html#NEPGetDerivatives">NEPGetDerivatives</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,Mat *A,PetscErrorCode (**der)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscInt,Mat,void*),void **ctx)</font></strong>
+<a name="line1010">1010: </a>{
+<a name="line1013">1013: </a>  NEPCheckDerivatives(nep,1);
+<a name="line1014">1014: </a>  <font color="#4169E1">if</font> (A)   *A   = nep->derivatives;
+<a name="line1015">1015: </a>  <font color="#4169E1">if</font> (der) *der = nep->computederivatives;
+<a name="line1016">1016: </a>  <font color="#4169E1">if</font> (ctx) *ctx = nep->derivativesctx;
+<a name="line1017">1017: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1018">1018: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/nepdefault.c b/src/nep/interface/nepdefault.c
index 284e805..ec14a85 100644
--- a/src/nep/interface/nepdefault.c
+++ b/src/nep/interface/nepdefault.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -69,6 +69,8 @@ PetscErrorCode NEPGetDefaultShift(NEP nep,PetscScalar *sigma)
   switch (nep->which) {
     case NEP_LARGEST_MAGNITUDE:
     case NEP_LARGEST_IMAGINARY:
+    case NEP_ALL:
+    case NEP_WHICH_USER:
       *sigma = 1.0;   /* arbitrary value */
       break;
     case NEP_SMALLEST_MAGNITUDE:
@@ -91,43 +93,135 @@ PetscErrorCode NEPGetDefaultShift(NEP nep,PetscScalar *sigma)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPConvergedDefault"
+#define __FUNCT__ "NEPConvergedRelative"
 /*
-  NEPConvergedDefault - Checks convergence of the nonlinear eigensolver.
+  NEPConvergedRelative - Checks convergence relative to the eigenvalue.
 */
-PetscErrorCode NEPConvergedDefault(NEP nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,NEPConvergedReason *reason,void *ctx)
+PetscErrorCode NEPConvergedRelative(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
 {
-  PetscErrorCode ierr;
+  PetscReal w;
 
   PetscFunctionBegin;
-  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidPointer(reason,6);
+  w = SlepcAbsEigenvalue(eigr,eigi);
+  *errest = res/w;
+  PetscFunctionReturn(0);
+}
 
-  *reason = NEP_CONVERGED_ITERATING;
+#undef __FUNCT__
+#define __FUNCT__ "NEPConvergedAbsolute"
+/*
+  NEPConvergedAbsolute - Checks convergence absolutely.
+*/
+PetscErrorCode NEPConvergedAbsolute(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+{
+  PetscFunctionBegin;
+  *errest = res;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPConvergedNorm"
+/*
+  NEPConvergedNorm - Checks convergence relative to the matrix norms.
+*/
+PetscErrorCode NEPConvergedNorm(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+{
+  PetscScalar    s;
+  PetscReal      w=0.0;
+  PetscInt       j;
+  PetscBool      flg;
+  PetscErrorCode ierr;
 
-  if (!it) {
-    /* set parameter for default relative tolerance convergence test */
-    nep->ttol = fnorm*nep->rtol;
+  PetscFunctionBegin;
+  if (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Backward error only available in split form");
+  /* initialization of matrix norms */
+  if (!nep->nrma[0]) {
+    for (j=0;j<nep->nt;j++) {
+      ierr = MatHasOperation(nep->A[j],MATOP_NORM,&flg);CHKERRQ(ierr);
+      if (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,"The convergence test related to the matrix norms requires a matrix norm operation");
+      ierr = MatNorm(nep->A[j],NORM_INFINITY,&nep->nrma[j]);CHKERRQ(ierr);
+    }
   }
-  if (PetscIsInfOrNanReal(fnorm)) {
-    ierr    = PetscInfo(nep,"Failed to converged, function norm is NaN\n");CHKERRQ(ierr);
-    *reason = NEP_DIVERGED_FNORM_NAN;
-  } else if (fnorm < nep->abstol) {
-    ierr    = PetscInfo2(nep,"Converged due to function norm %14.12e < %14.12e\n",(double)fnorm,(double)nep->abstol);CHKERRQ(ierr);
-    *reason = NEP_CONVERGED_FNORM_ABS;
-  } else if (nep->nfuncs >= nep->max_funcs) {
-    ierr    = PetscInfo2(nep,"Exceeded maximum number of function evaluations: %D > %D\n",nep->nfuncs,nep->max_funcs);CHKERRQ(ierr);
-    *reason = NEP_DIVERGED_FUNCTION_COUNT;
+  for (j=0;j<nep->nt;j++) {
+    ierr = FNEvaluateFunction(nep->f[j],eigr,&s);CHKERRQ(ierr);
+    w = w + nep->nrma[j]*PetscAbsScalar(s);
   }
+  *errest = res/w;
+  PetscFunctionReturn(0);
+}
 
-  if (it && !*reason) {
-    if (fnorm <= nep->ttol) {
-      ierr    = PetscInfo2(nep,"Converged due to function norm %14.12e < %14.12e (relative tolerance)\n",(double)fnorm,(double)nep->ttol);CHKERRQ(ierr);
-      *reason = NEP_CONVERGED_FNORM_RELATIVE;
-    } else if (snorm < nep->stol*xnorm) {
-      ierr    = PetscInfo3(nep,"Converged due to small update length: %14.12e < %14.12e * %14.12e\n",(double)snorm,(double)nep->stol,(double)xnorm);CHKERRQ(ierr);
-      *reason = NEP_CONVERGED_SNORM_RELATIVE;
-    }
+#undef __FUNCT__
+#define __FUNCT__ "NEPStoppingBasic"
+/*@C
+   NEPStoppingBasic - Default routine to determine whether the outer eigensolver
+   iteration must be stopped.
+
+   Collective on NEP
+
+   Input Parameters:
++  nep    - nonlinear eigensolver context obtained from NEPCreate()
+.  its    - current number of iterations
+.  max_it - maximum number of iterations
+.  nconv  - number of currently converged eigenpairs
+.  nev    - number of requested eigenpairs
+-  ctx    - context (not used here)
+
+   Output Parameter:
+.  reason - result of the stopping test
+
+   Notes:
+   A positive value of reason indicates that the iteration has finished successfully
+   (converged), and a negative value indicates an error condition (diverged). If
+   the iteration needs to be continued, reason must be set to NEP_CONVERGED_ITERATING
+   (zero).
+
+   NEPStoppingBasic() will stop if all requested eigenvalues are converged, or if
+   the maximum number of iterations has been reached.
+
+   Use NEPSetStoppingTest() to provide your own test instead of using this one.
+
+   Level: advanced
+
+.seealso: NEPSetStoppingTest(), NEPConvergedReason, NEPGetConvergedReason()
+@*/
+PetscErrorCode NEPStoppingBasic(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  *reason = NEP_CONVERGED_ITERATING;
+  if (nconv >= nev) {
+    ierr = PetscInfo2(nep,"Nonlinear eigensolver finished successfully: %D eigenpairs converged at iteration %D\n",nconv,its);CHKERRQ(ierr);
+    *reason = NEP_CONVERGED_TOL;
+  } else if (its >= max_it) {
+    *reason = NEP_DIVERGED_ITS;
+    ierr = PetscInfo1(nep,"Nonlinear eigensolver iteration reached maximum number of iterations (%D)\n",its);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPComputeVectors_Schur"
+PetscErrorCode NEPComputeVectors_Schur(NEP nep)
+{
+  PetscErrorCode ierr;
+  PetscInt       n,i;
+  Mat            Z;
+  Vec            v;
+
+  PetscFunctionBegin;
+  ierr = DSGetDimensions(nep->ds,&n,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+  ierr = DSVectors(nep->ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);
+  ierr = DSGetMat(nep->ds,DS_MAT_X,&Z);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(nep->V,0,n);CHKERRQ(ierr);
+  ierr = BVMultInPlace(nep->V,Z,0,n);CHKERRQ(ierr);
+  ierr = MatDestroy(&Z);CHKERRQ(ierr);
+
+  /* normalization */
+  for (i=0;i<n;i++) {
+    ierr = BVGetColumn(nep->V,i,&v);CHKERRQ(ierr);
+    ierr = VecNormalize(v,NULL);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(nep->V,i,&v);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
diff --git a/src/nep/interface/nepdefault.c.html b/src/nep/interface/nepdefault.c.html
index 62deda4..6d95997 100644
--- a/src/nep/interface/nepdefault.c.html
+++ b/src/nep/interface/nepdefault.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepdefault.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:15+00:00">
+<meta name="date" content="2016-05-16T10:34:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepdefault.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepdefault.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     This file contains some simple default routines for common <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> operations.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -73,62 +73,144 @@
 <a name="line69"> 69: </a>  <font color="#4169E1">switch</font> (nep->which) {
 <a name="line70"> 70: </a>    <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
 <a name="line71"> 71: </a>    <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
-<a name="line72"> 72: </a>      *sigma = 1.0;   <font color="#B22222">/* arbitrary value */</font>
-<a name="line73"> 73: </a>      <font color="#4169E1">break</font>;
-<a name="line74"> 74: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
-<a name="line75"> 75: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
-<a name="line76"> 76: </a>      *sigma = 0.0;
-<a name="line77"> 77: </a>      <font color="#4169E1">break</font>;
-<a name="line78"> 78: </a>    <font color="#4169E1">case</font> NEP_LARGEST_REAL:
-<a name="line79"> 79: </a>      *sigma = PETSC_MAX_REAL;
-<a name="line80"> 80: </a>      <font color="#4169E1">break</font>;
-<a name="line81"> 81: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
-<a name="line82"> 82: </a>      *sigma = PETSC_MIN_REAL;
-<a name="line83"> 83: </a>      <font color="#4169E1">break</font>;
-<a name="line84"> 84: </a>    <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
-<a name="line85"> 85: </a>    <font color="#4169E1">case</font> NEP_TARGET_REAL:
-<a name="line86"> 86: </a>    <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
-<a name="line87"> 87: </a>      *sigma = nep->target;
-<a name="line88"> 88: </a>      <font color="#4169E1">break</font>;
-<a name="line89"> 89: </a>  }
-<a name="line90"> 90: </a>  <font color="#4169E1">return</font>(0);
-<a name="line91"> 91: </a>}
-
-<a name="line95"> 95: </a><font color="#B22222">/*</font>
-<a name="line96"> 96: </a><font color="#B22222">  NEPConvergedDefault - Checks convergence of the nonlinear eigensolver.</font>
-<a name="line97"> 97: </a><font color="#B22222">*/</font>
-<a name="line98"> 98: </a><strong><font color="#4169E1"><a name="NEPConvergedDefault"></a>PetscErrorCode NEPConvergedDefault(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *reason,void *ctx)</font></strong>
-<a name="line99"> 99: </a>{
-
-
-<a name="line106">106: </a>  *reason = NEP_CONVERGED_ITERATING;
-
-<a name="line108">108: </a>  <font color="#4169E1">if</font> (!it) {
-<a name="line109">109: </a>    <font color="#B22222">/* set parameter for default relative tolerance convergence test */</font>
-<a name="line110">110: </a>    nep->ttol = fnorm*nep->rtol;
-<a name="line111">111: </a>  }
-<a name="line112">112: </a>  <font color="#4169E1">if</font> (PetscIsInfOrNanReal(fnorm)) {
-<a name="line113">113: </a>    PetscInfo(nep,<font color="#666666">"Failed to converged, function norm is NaN\n"</font>);
-<a name="line114">114: </a>    *reason = NEP_DIVERGED_FNORM_NAN;
-<a name="line115">115: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (fnorm < nep->abstol) {
-<a name="line116">116: </a>    PetscInfo2(nep,<font color="#666666">"Converged due to function norm %14.12e < %14.12e\n"</font>,(double)fnorm,(double)nep->abstol);
-<a name="line117">117: </a>    *reason = NEP_CONVERGED_FNORM_ABS;
-<a name="line118">118: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->nfuncs >= nep->max_funcs) {
-<a name="line119">119: </a>    PetscInfo2(nep,<font color="#666666">"Exceeded maximum number of function evaluations: %D > %D\n"</font>,nep->nfuncs,nep->max_funcs);
-<a name="line120">120: </a>    *reason = NEP_DIVERGED_FUNCTION_COUNT;
-<a name="line121">121: </a>  }
-
-<a name="line123">123: </a>  <font color="#4169E1">if</font> (it && !*reason) {
-<a name="line124">124: </a>    <font color="#4169E1">if</font> (fnorm <= nep->ttol) {
-<a name="line125">125: </a>      PetscInfo2(nep,<font color="#666666">"Converged due to function norm %14.12e < %14.12e (relative tolerance)\n"</font>,(double)fnorm,(double)nep->ttol);
-<a name="line126">126: </a>      *reason = NEP_CONVERGED_FNORM_RELATIVE;
-<a name="line127">127: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (snorm < nep->stol*xnorm) {
-<a name="line128">128: </a>      PetscInfo3(nep,<font color="#666666">"Converged due to small update length: %14.12e < %14.12e * %14.12e\n"</font>,(double)snorm,(double)nep->stol,(double)xnorm);
-<a name="line129">129: </a>      *reason = NEP_CONVERGED_SNORM_RELATIVE;
-<a name="line130">130: </a>    }
-<a name="line131">131: </a>  }
-<a name="line132">132: </a>  <font color="#4169E1">return</font>(0);
-<a name="line133">133: </a>}
+<a name="line72"> 72: </a>    <font color="#4169E1">case</font> NEP_ALL:
+<a name="line73"> 73: </a>    <font color="#4169E1">case</font> NEP_WHICH_USER:
+<a name="line74"> 74: </a>      *sigma = 1.0;   <font color="#B22222">/* arbitrary value */</font>
+<a name="line75"> 75: </a>      <font color="#4169E1">break</font>;
+<a name="line76"> 76: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
+<a name="line77"> 77: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
+<a name="line78"> 78: </a>      *sigma = 0.0;
+<a name="line79"> 79: </a>      <font color="#4169E1">break</font>;
+<a name="line80"> 80: </a>    <font color="#4169E1">case</font> NEP_LARGEST_REAL:
+<a name="line81"> 81: </a>      *sigma = PETSC_MAX_REAL;
+<a name="line82"> 82: </a>      <font color="#4169E1">break</font>;
+<a name="line83"> 83: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
+<a name="line84"> 84: </a>      *sigma = PETSC_MIN_REAL;
+<a name="line85"> 85: </a>      <font color="#4169E1">break</font>;
+<a name="line86"> 86: </a>    <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
+<a name="line87"> 87: </a>    <font color="#4169E1">case</font> NEP_TARGET_REAL:
+<a name="line88"> 88: </a>    <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
+<a name="line89"> 89: </a>      *sigma = nep->target;
+<a name="line90"> 90: </a>      <font color="#4169E1">break</font>;
+<a name="line91"> 91: </a>  }
+<a name="line92"> 92: </a>  <font color="#4169E1">return</font>(0);
+<a name="line93"> 93: </a>}
+
+<a name="line97"> 97: </a><font color="#B22222">/*</font>
+<a name="line98"> 98: </a><font color="#B22222">  NEPConvergedRelative - Checks convergence relative to the eigenvalue.</font>
+<a name="line99"> 99: </a><font color="#B22222">*/</font>
+<a name="line100">100: </a><strong><font color="#4169E1"><a name="NEPConvergedRelative"></a>PetscErrorCode NEPConvergedRelative(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line101">101: </a>{
+<a name="line102">102: </a>  PetscReal w;
+
+<a name="line105">105: </a>  w = SlepcAbsEigenvalue(eigr,eigi);
+<a name="line106">106: </a>  *errest = res/w;
+<a name="line107">107: </a>  <font color="#4169E1">return</font>(0);
+<a name="line108">108: </a>}
+
+<a name="line112">112: </a><font color="#B22222">/*</font>
+<a name="line113">113: </a><font color="#B22222">  NEPConvergedAbsolute - Checks convergence absolutely.</font>
+<a name="line114">114: </a><font color="#B22222">*/</font>
+<a name="line115">115: </a><strong><font color="#4169E1"><a name="NEPConvergedAbsolute"></a>PetscErrorCode NEPConvergedAbsolute(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line116">116: </a>{
+<a name="line118">118: </a>  *errest = res;
+<a name="line119">119: </a>  <font color="#4169E1">return</font>(0);
+<a name="line120">120: </a>}
+
+<a name="line124">124: </a><font color="#B22222">/*</font>
+<a name="line125">125: </a><font color="#B22222">  NEPConvergedNorm - Checks convergence relative to the matrix norms.</font>
+<a name="line126">126: </a><font color="#B22222">*/</font>
+<a name="line127">127: </a><strong><font color="#4169E1"><a name="NEPConvergedNorm"></a>PetscErrorCode NEPConvergedNorm(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line128">128: </a>{
+<a name="line129">129: </a>  PetscScalar    s;
+<a name="line130">130: </a>  PetscReal      w=0.0;
+<a name="line131">131: </a>  PetscInt       j;
+<a name="line132">132: </a>  PetscBool      flg;
+
+<a name="line136">136: </a>  <font color="#4169E1">if</font> (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Backward error only available in split form"</font>);
+<a name="line137">137: </a>  <font color="#B22222">/* initialization of matrix norms */</font>
+<a name="line138">138: </a>  <font color="#4169E1">if</font> (!nep->nrma[0]) {
+<a name="line139">139: </a>    <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
+<a name="line140">140: </a>      MatHasOperation(nep->A[j],MATOP_NORM,&flg);
+<a name="line141">141: </a>      <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,<font color="#666666">"The convergence test related to the matrix norms requires a matrix norm operation"</font>);
+<a name="line142">142: </a>      MatNorm(nep->A[j],NORM_INFINITY,&nep->nrma[j]);
+<a name="line143">143: </a>    }
+<a name="line144">144: </a>  }
+<a name="line145">145: </a>  <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
+<a name="line146">146: </a>    <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[j],eigr,&s);
+<a name="line147">147: </a>    w = w + nep->nrma[j]*PetscAbsScalar(s);
+<a name="line148">148: </a>  }
+<a name="line149">149: </a>  *errest = res/w;
+<a name="line150">150: </a>  <font color="#4169E1">return</font>(0);
+<a name="line151">151: </a>}
+
+<a name="line155">155: </a><font color="#B22222">/*@C</font>
+<a name="line156">156: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a> - Default routine to determine whether the outer eigensolver</font>
+<a name="line157">157: </a><font color="#B22222">   iteration must be stopped.</font>
+
+<a name="line159">159: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line161">161: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line162">162: </a><font color="#B22222">+  nep    - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line163">163: </a><font color="#B22222">.  its    - current number of iterations</font>
+<a name="line164">164: </a><font color="#B22222">.  max_it - maximum number of iterations</font>
+<a name="line165">165: </a><font color="#B22222">.  nconv  - number of currently converged eigenpairs</font>
+<a name="line166">166: </a><font color="#B22222">.  nev    - number of requested eigenpairs</font>
+<a name="line167">167: </a><font color="#B22222">-  ctx    - context (not used here)</font>
+
+<a name="line169">169: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line170">170: </a><font color="#B22222">.  reason - result of the stopping test</font>
+
+<a name="line172">172: </a><font color="#B22222">   Notes:</font>
+<a name="line173">173: </a><font color="#B22222">   A positive value of reason indicates that the iteration has finished successfully</font>
+<a name="line174">174: </a><font color="#B22222">   (converged), and a negative value indicates an error condition (diverged). If</font>
+<a name="line175">175: </a><font color="#B22222">   the iteration needs to be continued, reason must be set to NEP_CONVERGED_ITERATING</font>
+<a name="line176">176: </a><font color="#B22222">   (zero).</font>
+
+<a name="line178">178: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>() will stop if all requested eigenvalues are converged, or if</font>
+<a name="line179">179: </a><font color="#B22222">   the maximum number of iterations has been reached.</font>
+
+<a name="line181">181: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>() to provide your own test instead of using this one.</font>
+
+<a name="line183">183: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line185">185: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a>, <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>()</font>
+<a name="line186">186: </a><font color="#B22222">@*/</font>
+<a name="line187">187: </a><strong><font color="#4169E1"><a name="NEPStoppingBasic"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *reason,void *ctx)</font></strong>
+<a name="line188">188: </a>{
+
+<a name="line192">192: </a>  *reason = NEP_CONVERGED_ITERATING;
+<a name="line193">193: </a>  <font color="#4169E1">if</font> (nconv >= nev) {
+<a name="line194">194: </a>    PetscInfo2(nep,<font color="#666666">"Nonlinear eigensolver finished successfully: %D eigenpairs converged at iteration %D\n"</font>,nconv,its);
+<a name="line195">195: </a>    *reason = NEP_CONVERGED_TOL;
+<a name="line196">196: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (its >= max_it) {
+<a name="line197">197: </a>    *reason = NEP_DIVERGED_ITS;
+<a name="line198">198: </a>    PetscInfo1(nep,<font color="#666666">"Nonlinear eigensolver iteration reached maximum number of iterations (%D)\n"</font>,its);
+<a name="line199">199: </a>  }
+<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
+<a name="line201">201: </a>}
+
+<a name="line205">205: </a><strong><font color="#4169E1"><a name="NEPComputeVectors_Schur"></a>PetscErrorCode NEPComputeVectors_Schur(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line206">206: </a>{
+<a name="line208">208: </a>  PetscInt       n,i;
+<a name="line209">209: </a>  Mat            Z;
+<a name="line210">210: </a>  Vec            v;
+
+<a name="line213">213: </a>  <a href="../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(nep->ds,&n,NULL,NULL,NULL,NULL);
+<a name="line214">214: </a>  <a href="../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(nep->ds,DS_MAT_X,NULL,NULL);
+<a name="line215">215: </a>  <a href="../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(nep->ds,DS_MAT_X,&Z);
+<a name="line216">216: </a>  <a href="../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,0,n);
+<a name="line217">217: </a>  <a href="../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(nep->V,Z,0,n);
+<a name="line218">218: </a>  MatDestroy(&Z);
+
+<a name="line220">220: </a>  <font color="#B22222">/* normalization */</font>
+<a name="line221">221: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line222">222: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,i,&v);
+<a name="line223">223: </a>    VecNormalize(v,NULL);
+<a name="line224">224: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,i,&v);
+<a name="line225">225: </a>  }
+<a name="line226">226: </a>  <font color="#4169E1">return</font>(0);
+<a name="line227">227: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/nepmon.c b/src/nep/interface/nepmon.c
index ff41443..205fe19 100644
--- a/src/nep/interface/nepmon.c
+++ b/src/nep/interface/nepmon.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -29,14 +29,14 @@
 /*
    Runs the user provided monitor routines, if any.
 */
-PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest)
+PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest)
 {
   PetscErrorCode ierr;
   PetscInt       i,n = nep->numbermonitors;
 
   PetscFunctionBegin;
   for (i=0;i<n;i++) {
-    ierr = (*nep->monitor[i])(nep,it,nconv,eig,errest,nest,nep->monitorcontext[i]);CHKERRQ(ierr);
+    ierr = (*nep->monitor[i])(nep,it,nconv,eigr,eigi,errest,nest,nep->monitorcontext[i]);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -58,12 +58,13 @@ PetscErrorCode NEPMonitor(NEP nep,PetscInt it,PetscInt nconv,PetscScalar *eig,Pe
              (may be NULL)
 
    Calling Sequence of monitor:
-$     monitor (NEP nep, int its, int nconv, PetscScalar *eig, PetscReal* errest, int nest, void *mctx)
+$     monitor (NEP nep, int its, int nconv, PetscScalar *eigr, PetscScalar *eigi, PetscReal* errest, int nest, void *mctx)
 
 +  nep    - nonlinear eigensolver context obtained from NEPCreate()
 .  its    - iteration number
 .  nconv  - number of converged eigenpairs
-.  eig    - eigenvalues
+.  eigr   - real part of the eigenvalues
+.  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates for each eigenpair
 .  nest   - number of error estimates
 -  mctx   - optional monitoring context, as set by NEPMonitorSet()
@@ -90,7 +91,7 @@ $     monitor (NEP nep, int its, int nconv, PetscScalar *eig, PetscReal* errest,
 
 .seealso: NEPMonitorFirst(), NEPMonitorAll(), NEPMonitorCancel()
 @*/
-PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
+PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
@@ -174,36 +175,47 @@ PetscErrorCode NEPGetMonitorContext(NEP nep,void **ctx)
 +  nep    - nonlinear eigensolver context
 .  its    - iteration number
 .  nconv  - number of converged eigenpairs so far
-.  eig    - eigenvalues
+.  eigr   - real part of the eigenvalues
+.  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: NEPMonitorSet(), NEPMonitorFirst(), NEPMonitorConverged()
 @*/
-PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
   PetscInt       i;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its) {
-    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"%3D NEP nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
-    for (i=0;i<nest;i++) {
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(vf,8);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
+  if (its==1 && ((PetscObject)nep)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Eigenvalue approximations and residual norms for %s solve.\n",((PetscObject)nep)->prefix);CHKERRQ(ierr);
+  }
+  ierr = PetscViewerASCIIPrintf(viewer,"%3D NEP nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+  for (i=0;i<nest;i++) {
 #if defined(PETSC_USE_COMPLEX)
-      ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(eig[i]),(double)PetscImaginaryPart(eig[i]));CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(eigr[i]),(double)PetscImaginaryPart(eigr[i]));CHKERRQ(ierr);
 #else
-      ierr = PetscViewerASCIIPrintf(viewer," %g",(double)eig[i]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," %g",(double)eigr[i]);CHKERRQ(ierr);
+    if (eigi[i]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)eigi[i]);CHKERRQ(ierr); }
 #endif
-      ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)",(double)errest[i]);CHKERRQ(ierr);
-    }
-    ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
-    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)",(double)errest[i]);CHKERRQ(ierr);
   }
+  ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
+  ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -219,31 +231,44 @@ PetscErrorCode NEPMonitorAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *ei
 +  nep    - nonlinear eigensolver context
 .  its    - iteration number
 .  nconv  - number of converged eigenpairs so far
-.  eig    - eigenvalues
+.  eigr   - real part of the eigenvalues
+.  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: NEPMonitorSet(), NEPMonitorAll(), NEPMonitorConverged()
 @*/
-PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its && nconv<nest) {
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(vf,8);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  if (its==1 && ((PetscObject)nep)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Eigenvalue approximations and residual norms for %s solve.\n",((PetscObject)nep)->prefix);CHKERRQ(ierr);
+  }
+  if (nconv<nest) {
+    ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"%3D NEP nconv=%D first unconverged value (error)",its,nconv);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
-    ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(eig[nconv]),(double)PetscImaginaryPart(eig[nconv]));CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(eigr[nconv]),(double)PetscImaginaryPart(eigr[nconv]));CHKERRQ(ierr);
 #else
-    ierr = PetscViewerASCIIPrintf(viewer," %g",(double)eig[nconv]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," %g",(double)eigr[nconv]);CHKERRQ(ierr);
+    if (eigi[nconv]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)eigi[nconv]);CHKERRQ(ierr); }
 #endif
     ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)\n",(double)errest[nconv]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -260,101 +285,141 @@ PetscErrorCode NEPMonitorFirst(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *
 +  nep    - nonlinear eigensolver context
 .  its    - iteration number
 .  nconv  - number of converged eigenpairs so far
-.  eig    - eigenvalues
+.  eigr   - real part of the eigenvalues
+.  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context
+-  ctx    - monitor context
 
    Level: intermediate
 
-   Note:
-   The monitor context must contain a struct with a PetscViewer and a
-   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
-
 .seealso: NEPMonitorSet(), NEPMonitorFirst(), NEPMonitorAll()
 @*/
-PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorConverged(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 {
-  PetscErrorCode   ierr;
-  PetscInt         i;
-  PetscViewer      viewer;
-  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
+  PetscErrorCode ierr;
+  PetscInt       i;
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (!monctx) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,"Must provide a context for NEPMonitorConverged");
-  if (!its) {
-    ctx->oldnconv = 0;
-  } else {
-    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(ctx,8);
+  viewer = ctx->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  if (its==1 && ((PetscObject)nep)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Convergence history for %s solve.\n",((PetscObject)nep)->prefix);CHKERRQ(ierr);
+  }
+  if (its==1) ctx->oldnconv = 0;
+  if (ctx->oldnconv!=nconv) {
+    ierr = PetscViewerPushFormat(viewer,ctx->format);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
     for (i=ctx->oldnconv;i<nconv;i++) {
-      ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%3D NEP converged value (error) #%D",its,i);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
-      ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(eig[i]),(double)PetscImaginaryPart(eig[i]));CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(eigr[i]),(double)PetscImaginaryPart(eigr[i]));CHKERRQ(ierr);
 #else
-      ierr = PetscViewerASCIIPrintf(viewer," %g",(double)eig[i]);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer," %g",(double)eigr[i]);CHKERRQ(ierr);
+      if (eigi[i]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)eigi[i]);CHKERRQ(ierr); }
 #endif
       ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)\n",(double)errest[i]);CHKERRQ(ierr);
-      ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     }
+    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
     ctx->oldnconv = nconv;
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPMonitorLG"
-PetscErrorCode NEPMonitorLG(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+#define __FUNCT__ "NEPMonitorLGCreate"
+/*@C
+   NEPMonitorLGCreate - Creates a line graph context for use with
+   NEP to monitor convergence.
+
+   Collective on MPI_Comm
+
+   Input Parameters:
++  comm - communicator context
+.  host - the X display to open, or null for the local machine
+.  label - the title to put in the title bar
+.  x, y - the screen coordinates of the upper left coordinate of
+          the window
+-  m, n - the screen width and height in pixels
+
+   Output Parameter:
+.  lgctx - the drawing context
+
+   Options Database Keys:
++  -nep_monitor_lg - Sets line graph monitor for the first residual
+-  -nep_monitor_lg_all - Sets line graph monitor for all residuals
+
+   Notes:
+   Use PetscDrawLGDestroy() to destroy this line graph.
+
+   Level: intermediate
+
+.seealso: NEPMonitorSet()
+@*/
+PetscErrorCode NEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
   PetscDraw      draw;
   PetscDrawLG    lg;
   PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscDrawCreate(comm,host,label,x,y,m,n,&draw);CHKERRQ(ierr);
+  ierr = PetscDrawSetFromOptions(draw);CHKERRQ(ierr);
+  ierr = PetscDrawLGCreate(draw,1,&lg);CHKERRQ(ierr);
+  ierr = PetscDrawLGSetFromOptions(lg);CHKERRQ(ierr);
+  ierr = PetscDrawDestroy(&draw);CHKERRQ(ierr);
+  *lgctx = lg;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPMonitorLG"
+PetscErrorCode NEPMonitorLG(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
+{
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscReal      x,y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)nep));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(nep->rtol)-2,0.0);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(nep->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   x = (PetscReal)its;
-  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]); else y = 0.0;
+  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+  else y = 0.0;
   ierr = PetscDrawLGAddPoint(lg,&x,&y);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || nep->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPMonitorLGAll"
-PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
-  PetscDraw      draw;
-  PetscDrawLG    lg;
-  PetscErrorCode ierr;
-  PetscReal      *x,*y;
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscInt       i,n = PetscMin(nep->nev,255);
+  PetscReal      *x,*y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)nep));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(nep->rtol)-2,0.0);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(nep->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   ierr = PetscMalloc2(n,&x,n,&y);CHKERRQ(ierr);
   for (i=0;i<n;i++) {
     x[i] = (PetscReal)its;
@@ -362,8 +427,10 @@ PetscErrorCode NEPMonitorLGAll(NEP nep,PetscInt its,PetscInt nconv,PetscScalar *
     else y[i] = 0.0;
   }
   ierr = PetscDrawLGAddPoint(lg,x,y);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || nep->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   ierr = PetscFree2(x,y);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
diff --git a/src/nep/interface/nepmon.c.html b/src/nep/interface/nepmon.c.html
index ee790ed..75a30a7 100644
--- a/src/nep/interface/nepmon.c.html
+++ b/src/nep/interface/nepmon.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepmon.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:11+00:00">
+<meta name="date" content="2016-05-16T10:34:13+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepmon.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepmon.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> routines related to monitors.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,12 +39,12 @@
 <a name="line29"> 29: </a><font color="#B22222">/*</font>
 <a name="line30"> 30: </a><font color="#B22222">   Runs the user provided monitor routines, if any.</font>
 <a name="line31"> 31: </a><font color="#B22222">*/</font>
-<a name="line32"> 32: </a><strong><font color="#4169E1"><a name="NEPMonitor"></a>PetscErrorCode NEPMonitor(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt it,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest)</font></strong>
+<a name="line32"> 32: </a><strong><font color="#4169E1"><a name="NEPMonitor"></a>PetscErrorCode NEPMonitor(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt it,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest)</font></strong>
 <a name="line33"> 33: </a>{
 <a name="line35"> 35: </a>  PetscInt       i,n = nep->numbermonitors;
 
 <a name="line38"> 38: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line39"> 39: </a>    (*nep->monitor[i])(nep,it,nconv,eig,errest,nest,nep->monitorcontext[i]);
+<a name="line39"> 39: </a>    (*nep->monitor[i])(nep,it,nconv,eigr,eigi,errest,nest,nep->monitorcontext[i]);
 <a name="line40"> 40: </a>  }
 <a name="line41"> 41: </a>  <font color="#4169E1">return</font>(0);
 <a name="line42"> 42: </a>}
@@ -64,285 +64,336 @@
 <a name="line58"> 58: </a><font color="#B22222">             (may be NULL)</font>
 
 <a name="line60"> 60: </a><font color="#B22222">   Calling Sequence of monitor:</font>
-<a name="line61"> 61: </a><font color="#B22222">$     monitor (<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep, int its, int nconv, PetscScalar *eig, PetscReal* errest, int nest, void *mctx)</font>
+<a name="line61"> 61: </a><font color="#B22222">$     monitor (<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep, int its, int nconv, PetscScalar *eigr, PetscScalar *eigi, PetscReal* errest, int nest, void *mctx)</font>
 
 <a name="line63"> 63: </a><font color="#B22222">+  nep    - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
 <a name="line64"> 64: </a><font color="#B22222">.  its    - iteration number</font>
 <a name="line65"> 65: </a><font color="#B22222">.  nconv  - number of converged eigenpairs</font>
-<a name="line66"> 66: </a><font color="#B22222">.  eig    - eigenvalues</font>
-<a name="line67"> 67: </a><font color="#B22222">.  errest - error estimates for each eigenpair</font>
-<a name="line68"> 68: </a><font color="#B22222">.  nest   - number of error estimates</font>
-<a name="line69"> 69: </a><font color="#B22222">-  mctx   - optional monitoring context, as set by <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()</font>
-
-<a name="line71"> 71: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line72"> 72: </a><font color="#B22222">+    -nep_monitor        - print only the first error estimate</font>
-<a name="line73"> 73: </a><font color="#B22222">.    -nep_monitor_all    - print error estimates at each iteration</font>
-<a name="line74"> 74: </a><font color="#B22222">.    -nep_monitor_conv   - print the eigenvalue approximations only when</font>
-<a name="line75"> 75: </a><font color="#B22222">      convergence has been reached</font>
-<a name="line76"> 76: </a><font color="#B22222">.    -nep_monitor_lg     - sets line graph monitor for the first unconverged</font>
-<a name="line77"> 77: </a><font color="#B22222">      approximate eigenvalue</font>
-<a name="line78"> 78: </a><font color="#B22222">.    -nep_monitor_lg_all - sets line graph monitor for all unconverged</font>
-<a name="line79"> 79: </a><font color="#B22222">      approximate eigenvalues</font>
-<a name="line80"> 80: </a><font color="#B22222">-    -nep_monitor_cancel - cancels all monitors that have been hardwired into</font>
-<a name="line81"> 81: </a><font color="#B22222">      a code by calls to <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), but does not cancel those set via</font>
-<a name="line82"> 82: </a><font color="#B22222">      the options database.</font>
-
-<a name="line84"> 84: </a><font color="#B22222">   Notes:</font>
-<a name="line85"> 85: </a><font color="#B22222">   Several different monitoring routines may be set by calling</font>
-<a name="line86"> 86: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>() multiple times; all will be called in the</font>
-<a name="line87"> 87: </a><font color="#B22222">   order in which they were set.</font>
-
-<a name="line89"> 89: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line91"> 91: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>()</font>
-<a name="line92"> 92: </a><font color="#B22222">@*/</font>
-<a name="line93"> 93: </a><strong><font color="#4169E1"><a name="NEPMonitorSet"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))</font></strong>
-<a name="line94"> 94: </a>{
-<a name="line97"> 97: </a>  <font color="#4169E1">if</font> (nep->numbermonitors >= MAXNEPMONITORS) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Too many <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> monitors set"</font>);
-<a name="line98"> 98: </a>  nep->monitor[nep->numbermonitors]           = monitor;
-<a name="line99"> 99: </a>  nep->monitorcontext[nep->numbermonitors]    = (void*)mctx;
-<a name="line100">100: </a>  nep->monitordestroy[nep->numbermonitors++]  = monitordestroy;
-<a name="line101">101: </a>  <font color="#4169E1">return</font>(0);
-<a name="line102">102: </a>}
-
-<a name="line106">106: </a><font color="#B22222">/*@</font>
-<a name="line107">107: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a> - Clears all monitors for a <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object.</font>
-
-<a name="line109">109: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line111">111: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line112">112: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line114">114: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line115">115: </a><font color="#B22222">.    -nep_monitor_cancel - Cancels all monitors that have been hardwired</font>
-<a name="line116">116: </a><font color="#B22222">      into a code by calls to <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(),</font>
-<a name="line117">117: </a><font color="#B22222">      but does not cancel those set via the options database.</font>
-
-<a name="line119">119: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line121">121: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()</font>
-<a name="line122">122: </a><font color="#B22222">@*/</font>
-<a name="line123">123: </a><strong><font color="#4169E1"><a name="NEPMonitorCancel"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line124">124: </a>{
-<a name="line126">126: </a>  PetscInt       i;
-
-<a name="line130">130: </a>  <font color="#4169E1">for</font> (i=0; i<nep->numbermonitors; i++) {
-<a name="line131">131: </a>    <font color="#4169E1">if</font> (nep->monitordestroy[i]) {
-<a name="line132">132: </a>      (*nep->monitordestroy[i])(&nep->monitorcontext[i]);
-<a name="line133">133: </a>    }
-<a name="line134">134: </a>  }
-<a name="line135">135: </a>  nep->numbermonitors = 0;
-<a name="line136">136: </a>  <font color="#4169E1">return</font>(0);
-<a name="line137">137: </a>}
-
-<a name="line141">141: </a><font color="#B22222">/*@C</font>
-<a name="line142">142: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</a> - Gets the monitor context, as set by</font>
-<a name="line143">143: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>() for the FIRST monitor only.</font>
-
-<a name="line145">145: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line147">147: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line148">148: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line150">150: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line151">151: </a><font color="#B22222">.  ctx - monitor context</font>
-
-<a name="line153">153: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line155">155: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), NEPDefaultMonitor()</font>
-<a name="line156">156: </a><font color="#B22222">@*/</font>
-<a name="line157">157: </a><strong><font color="#4169E1"><a name="NEPGetMonitorContext"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,void **ctx)</font></strong>
-<a name="line158">158: </a>{
-<a name="line161">161: </a>  *ctx = nep->monitorcontext[0];
-<a name="line162">162: </a>  <font color="#4169E1">return</font>(0);
-<a name="line163">163: </a>}
-
-<a name="line167">167: </a><font color="#B22222">/*@C</font>
-<a name="line168">168: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a> - Print the current approximate values and</font>
-<a name="line169">169: </a><font color="#B22222">   error estimates at each iteration of the nonlinear eigensolver.</font>
-
-<a name="line171">171: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line173">173: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line174">174: </a><font color="#B22222">+  nep    - nonlinear eigensolver context</font>
-<a name="line175">175: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line176">176: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line177">177: </a><font color="#B22222">.  eig    - eigenvalues</font>
-<a name="line178">178: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line179">179: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line180">180: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
-
-<a name="line182">182: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line184">184: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>()</font>
-<a name="line185">185: </a><font color="#B22222">@*/</font>
-<a name="line186">186: </a><strong><font color="#4169E1"><a name="NEPMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line187">187: </a>{
-<a name="line189">189: </a>  PetscInt       i;
-<a name="line190">190: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-
-<a name="line193">193: </a>  <font color="#4169E1">if</font> (its) {
-<a name="line194">194: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line195">195: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nconv=%D Values (Errors)"</font>,its,nconv);
-<a name="line196">196: </a>    <font color="#4169E1">for</font> (i=0;i<nest;i++) {
-<a name="line197">197: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line198">198: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(eig[i]),(double)PetscImaginaryPart(eig[i]));
-<a name="line199">199: </a><font color="#A020F0">#else</font>
-<a name="line200">200: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)eig[i]);
-<a name="line201">201: </a><font color="#A020F0">#endif</font>
-<a name="line202">202: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)"</font>,(double)errest[i]);
-<a name="line203">203: </a>    }
-<a name="line204">204: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line205">205: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line206">206: </a>  }
-<a name="line207">207: </a>  <font color="#4169E1">return</font>(0);
-<a name="line208">208: </a>}
-
-<a name="line212">212: </a><font color="#B22222">/*@C</font>
-<a name="line213">213: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a> - Print the first unconverged approximate value and</font>
-<a name="line214">214: </a><font color="#B22222">   error estimate at each iteration of the nonlinear eigensolver.</font>
-
-<a name="line216">216: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line218">218: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line219">219: </a><font color="#B22222">+  nep    - nonlinear eigensolver context</font>
-<a name="line220">220: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line221">221: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line222">222: </a><font color="#B22222">.  eig    - eigenvalues</font>
-<a name="line223">223: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line224">224: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line225">225: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
-
-<a name="line227">227: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line229">229: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>()</font>
-<a name="line230">230: </a><font color="#B22222">@*/</font>
-<a name="line231">231: </a><strong><font color="#4169E1"><a name="NEPMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line232">232: </a>{
-<a name="line234">234: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-
-<a name="line237">237: </a>  <font color="#4169E1">if</font> (its && nconv<nest) {
-<a name="line238">238: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line239">239: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
-<a name="line240">240: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line241">241: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(eig[nconv]),(double)PetscImaginaryPart(eig[nconv]));
-<a name="line242">242: </a><font color="#A020F0">#else</font>
-<a name="line243">243: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)eig[nconv]);
-<a name="line244">244: </a><font color="#A020F0">#endif</font>
-<a name="line245">245: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[nconv]);
-<a name="line246">246: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line247">247: </a>  }
-<a name="line248">248: </a>  <font color="#4169E1">return</font>(0);
-<a name="line249">249: </a>}
-
-<a name="line253">253: </a><font color="#B22222">/*@C</font>
-<a name="line254">254: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a> - Print the approximate values and</font>
-<a name="line255">255: </a><font color="#B22222">   error estimates as they converge.</font>
-
-<a name="line257">257: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line259">259: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line260">260: </a><font color="#B22222">+  nep    - nonlinear eigensolver context</font>
-<a name="line261">261: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line262">262: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line263">263: </a><font color="#B22222">.  eig    - eigenvalues</font>
-<a name="line264">264: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line265">265: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line266">266: </a><font color="#B22222">-  monctx - monitor context</font>
-
-<a name="line268">268: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line270">270: </a><font color="#B22222">   Note:</font>
-<a name="line271">271: </a><font color="#B22222">   The monitor context must contain a struct with a PetscViewer and a</font>
-<a name="line272">272: </a><font color="#B22222">   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.</font>
-
-<a name="line274">274: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>()</font>
-<a name="line275">275: </a><font color="#B22222">@*/</font>
-<a name="line276">276: </a><strong><font color="#4169E1"><a name="NEPMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line277">277: </a>{
-<a name="line278">278: </a>  PetscErrorCode   ierr;
-<a name="line279">279: </a>  PetscInt         i;
-<a name="line280">280: </a>  PetscViewer      viewer;
-<a name="line281">281: </a>  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
-
-<a name="line284">284: </a>  <font color="#4169E1">if</font> (!monctx) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,<font color="#666666">"Must provide a context for <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>"</font>);
-<a name="line285">285: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line286">286: </a>    ctx->oldnconv = 0;
-<a name="line287">287: </a>  } <font color="#4169E1">else</font> {
-<a name="line288">288: </a>    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-<a name="line289">289: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
-<a name="line290">290: </a>      PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line291">291: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> converged value (error) #%D"</font>,its,i);
-<a name="line292">292: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line293">293: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(eig[i]),(double)PetscImaginaryPart(eig[i]));
-<a name="line294">294: </a><font color="#A020F0">#else</font>
-<a name="line295">295: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)eig[i]);
-<a name="line296">296: </a><font color="#A020F0">#endif</font>
-<a name="line297">297: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[i]);
-<a name="line298">298: </a>      PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line299">299: </a>    }
-<a name="line300">300: </a>    ctx->oldnconv = nconv;
-<a name="line301">301: </a>  }
-<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
-<a name="line303">303: </a>}
-
-<a name="line307">307: </a><strong><font color="#4169E1"><a name="NEPMonitorLG"></a>PetscErrorCode NEPMonitorLG(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line308">308: </a>{
-<a name="line309">309: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line310">310: </a>  PetscDraw      draw;
-<a name="line311">311: </a>  PetscDrawLG    lg;
-<a name="line313">313: </a>  PetscReal      x,y;
-
-<a name="line316">316: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)nep));
-<a name="line317">317: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line318">318: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line319">319: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line320">320: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line321">321: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line322">322: </a>    PetscDrawLGSetDimension(lg,1);
-<a name="line323">323: </a>    PetscDrawLGReset(lg);
-<a name="line324">324: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(nep->rtol)-2,0.0);
-<a name="line325">325: </a>  }
-
-<a name="line327">327: </a>  x = (PetscReal)its;
-<a name="line328">328: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]); <font color="#4169E1">else</font> y = 0.0;
-<a name="line329">329: </a>  PetscDrawLGAddPoint(lg,&x,&y);
-
-<a name="line331">331: </a>  PetscDrawLGDraw(lg);
+<a name="line66"> 66: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line67"> 67: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line68"> 68: </a><font color="#B22222">.  errest - error estimates for each eigenpair</font>
+<a name="line69"> 69: </a><font color="#B22222">.  nest   - number of error estimates</font>
+<a name="line70"> 70: </a><font color="#B22222">-  mctx   - optional monitoring context, as set by <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()</font>
+
+<a name="line72"> 72: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line73"> 73: </a><font color="#B22222">+    -nep_monitor        - print only the first error estimate</font>
+<a name="line74"> 74: </a><font color="#B22222">.    -nep_monitor_all    - print error estimates at each iteration</font>
+<a name="line75"> 75: </a><font color="#B22222">.    -nep_monitor_conv   - print the eigenvalue approximations only when</font>
+<a name="line76"> 76: </a><font color="#B22222">      convergence has been reached</font>
+<a name="line77"> 77: </a><font color="#B22222">.    -nep_monitor_lg     - sets line graph monitor for the first unconverged</font>
+<a name="line78"> 78: </a><font color="#B22222">      approximate eigenvalue</font>
+<a name="line79"> 79: </a><font color="#B22222">.    -nep_monitor_lg_all - sets line graph monitor for all unconverged</font>
+<a name="line80"> 80: </a><font color="#B22222">      approximate eigenvalues</font>
+<a name="line81"> 81: </a><font color="#B22222">-    -nep_monitor_cancel - cancels all monitors that have been hardwired into</font>
+<a name="line82"> 82: </a><font color="#B22222">      a code by calls to <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), but does not cancel those set via</font>
+<a name="line83"> 83: </a><font color="#B22222">      the options database.</font>
+
+<a name="line85"> 85: </a><font color="#B22222">   Notes:</font>
+<a name="line86"> 86: </a><font color="#B22222">   Several different monitoring routines may be set by calling</font>
+<a name="line87"> 87: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>() multiple times; all will be called in the</font>
+<a name="line88"> 88: </a><font color="#B22222">   order in which they were set.</font>
+
+<a name="line90"> 90: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line92"> 92: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>()</font>
+<a name="line93"> 93: </a><font color="#B22222">@*/</font>
+<a name="line94"> 94: </a><strong><font color="#4169E1"><a name="NEPMonitorSet"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))</font></strong>
+<a name="line95"> 95: </a>{
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (nep->numbermonitors >= MAXNEPMONITORS) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Too many <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> monitors set"</font>);
+<a name="line99"> 99: </a>  nep->monitor[nep->numbermonitors]           = monitor;
+<a name="line100">100: </a>  nep->monitorcontext[nep->numbermonitors]    = (void*)mctx;
+<a name="line101">101: </a>  nep->monitordestroy[nep->numbermonitors++]  = monitordestroy;
+<a name="line102">102: </a>  <font color="#4169E1">return</font>(0);
+<a name="line103">103: </a>}
+
+<a name="line107">107: </a><font color="#B22222">/*@</font>
+<a name="line108">108: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a> - Clears all monitors for a <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object.</font>
+
+<a name="line110">110: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line112">112: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line113">113: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line115">115: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line116">116: </a><font color="#B22222">.    -nep_monitor_cancel - Cancels all monitors that have been hardwired</font>
+<a name="line117">117: </a><font color="#B22222">      into a code by calls to <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(),</font>
+<a name="line118">118: </a><font color="#B22222">      but does not cancel those set via the options database.</font>
+
+<a name="line120">120: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line122">122: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()</font>
+<a name="line123">123: </a><font color="#B22222">@*/</font>
+<a name="line124">124: </a><strong><font color="#4169E1"><a name="NEPMonitorCancel"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line125">125: </a>{
+<a name="line127">127: </a>  PetscInt       i;
+
+<a name="line131">131: </a>  <font color="#4169E1">for</font> (i=0; i<nep->numbermonitors; i++) {
+<a name="line132">132: </a>    <font color="#4169E1">if</font> (nep->monitordestroy[i]) {
+<a name="line133">133: </a>      (*nep->monitordestroy[i])(&nep->monitorcontext[i]);
+<a name="line134">134: </a>    }
+<a name="line135">135: </a>  }
+<a name="line136">136: </a>  nep->numbermonitors = 0;
+<a name="line137">137: </a>  <font color="#4169E1">return</font>(0);
+<a name="line138">138: </a>}
+
+<a name="line142">142: </a><font color="#B22222">/*@C</font>
+<a name="line143">143: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</a> - Gets the monitor context, as set by</font>
+<a name="line144">144: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>() for the FIRST monitor only.</font>
+
+<a name="line146">146: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line148">148: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line149">149: </a><font color="#B22222">.  nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line151">151: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line152">152: </a><font color="#B22222">.  ctx - monitor context</font>
+
+<a name="line154">154: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line156">156: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), NEPDefaultMonitor()</font>
+<a name="line157">157: </a><font color="#B22222">@*/</font>
+<a name="line158">158: </a><strong><font color="#4169E1"><a name="NEPGetMonitorContext"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetMonitorContext.html#NEPGetMonitorContext">NEPGetMonitorContext</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,void **ctx)</font></strong>
+<a name="line159">159: </a>{
+<a name="line162">162: </a>  *ctx = nep->monitorcontext[0];
+<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
+<a name="line164">164: </a>}
+
+<a name="line168">168: </a><font color="#B22222">/*@C</font>
+<a name="line169">169: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a> - Print the current approximate values and</font>
+<a name="line170">170: </a><font color="#B22222">   error estimates at each iteration of the nonlinear eigensolver.</font>
+
+<a name="line172">172: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line174">174: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line175">175: </a><font color="#B22222">+  nep    - nonlinear eigensolver context</font>
+<a name="line176">176: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line177">177: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line178">178: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line179">179: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line180">180: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line181">181: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line182">182: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
+
+<a name="line184">184: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line186">186: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>()</font>
+<a name="line187">187: </a><font color="#B22222">@*/</font>
+<a name="line188">188: </a><strong><font color="#4169E1"><a name="NEPMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
+<a name="line189">189: </a>{
+<a name="line191">191: </a>  PetscInt       i;
+<a name="line192">192: </a>  PetscViewer    viewer;
+
+<a name="line197">197: </a>  viewer = vf->viewer;
+<a name="line199">199: </a>  PetscViewerPushFormat(viewer,vf->format);
+<a name="line200">200: </a>  PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line201">201: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)nep)->prefix) {
+<a name="line202">202: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Eigenvalue approximations and residual norms for %s solve.\n"</font>,((PetscObject)nep)->prefix);
+<a name="line203">203: </a>  }
+<a name="line204">204: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nconv=%D Values (Errors)"</font>,its,nconv);
+<a name="line205">205: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line206">206: </a>  <font color="#4169E1">for</font> (i=0;i<nest;i++) {
+<a name="line207">207: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line208">208: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(eigr[i]),(double)PetscImaginaryPart(eigr[i]));
+<a name="line209">209: </a><font color="#A020F0">#else</font>
+<a name="line210">210: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)eigr[i]);
+<a name="line211">211: </a>    <font color="#4169E1">if</font> (eigi[i]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)eigi[i]); }
+<a name="line212">212: </a><font color="#A020F0">#endif</font>
+<a name="line213">213: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)"</font>,(double)errest[i]);
+<a name="line214">214: </a>  }
+<a name="line215">215: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line216">216: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line217">217: </a>  PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line218">218: </a>  PetscViewerPopFormat(viewer);
+<a name="line219">219: </a>  <font color="#4169E1">return</font>(0);
+<a name="line220">220: </a>}
+
+<a name="line224">224: </a><font color="#B22222">/*@C</font>
+<a name="line225">225: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a> - Print the first unconverged approximate value and</font>
+<a name="line226">226: </a><font color="#B22222">   error estimate at each iteration of the nonlinear eigensolver.</font>
+
+<a name="line228">228: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line230">230: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line231">231: </a><font color="#B22222">+  nep    - nonlinear eigensolver context</font>
+<a name="line232">232: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line233">233: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line234">234: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line235">235: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line236">236: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line237">237: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line238">238: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
+
+<a name="line240">240: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line242">242: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>()</font>
+<a name="line243">243: </a><font color="#B22222">@*/</font>
+<a name="line244">244: </a><strong><font color="#4169E1"><a name="NEPMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
+<a name="line245">245: </a>{
+<a name="line247">247: </a>  PetscViewer    viewer;
+
+<a name="line252">252: </a>  viewer = vf->viewer;
+<a name="line254">254: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)nep)->prefix) {
+<a name="line255">255: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Eigenvalue approximations and residual norms for %s solve.\n"</font>,((PetscObject)nep)->prefix);
+<a name="line256">256: </a>  }
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (nconv<nest) {
+<a name="line258">258: </a>    PetscViewerPushFormat(viewer,vf->format);
+<a name="line259">259: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line260">260: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
+<a name="line261">261: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line262">262: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line263">263: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(eigr[nconv]),(double)PetscImaginaryPart(eigr[nconv]));
+<a name="line264">264: </a><font color="#A020F0">#else</font>
+<a name="line265">265: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)eigr[nconv]);
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (eigi[nconv]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)eigi[nconv]); }
+<a name="line267">267: </a><font color="#A020F0">#endif</font>
+<a name="line268">268: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[nconv]);
+<a name="line269">269: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line270">270: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line271">271: </a>    PetscViewerPopFormat(viewer);
+<a name="line272">272: </a>  }
+<a name="line273">273: </a>  <font color="#4169E1">return</font>(0);
+<a name="line274">274: </a>}
+
+<a name="line278">278: </a><font color="#B22222">/*@C</font>
+<a name="line279">279: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a> - Print the approximate values and</font>
+<a name="line280">280: </a><font color="#B22222">   error estimates as they converge.</font>
+
+<a name="line282">282: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line284">284: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line285">285: </a><font color="#B22222">+  nep    - nonlinear eigensolver context</font>
+<a name="line286">286: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line287">287: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line288">288: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line289">289: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line290">290: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line291">291: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line292">292: </a><font color="#B22222">-  ctx    - monitor context</font>
+
+<a name="line294">294: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line296">296: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>()</font>
+<a name="line297">297: </a><font color="#B22222">@*/</font>
+<a name="line298">298: </a><strong><font color="#4169E1"><a name="NEPMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)</font></strong>
+<a name="line299">299: </a>{
+<a name="line301">301: </a>  PetscInt       i;
+<a name="line302">302: </a>  PetscViewer    viewer;
+
+<a name="line307">307: </a>  viewer = ctx->viewer;
+<a name="line309">309: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)nep)->prefix) {
+<a name="line310">310: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Convergence history for %s solve.\n"</font>,((PetscObject)nep)->prefix);
+<a name="line311">311: </a>  }
+<a name="line312">312: </a>  <font color="#4169E1">if</font> (its==1) ctx->oldnconv = 0;
+<a name="line313">313: </a>  <font color="#4169E1">if</font> (ctx->oldnconv!=nconv) {
+<a name="line314">314: </a>    PetscViewerPushFormat(viewer,ctx->format);
+<a name="line315">315: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line316">316: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
+<a name="line317">317: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> converged value (error) #%D"</font>,its,i);
+<a name="line318">318: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line319">319: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line320">320: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(eigr[i]),(double)PetscImaginaryPart(eigr[i]));
+<a name="line321">321: </a><font color="#A020F0">#else</font>
+<a name="line322">322: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)eigr[i]);
+<a name="line323">323: </a>      <font color="#4169E1">if</font> (eigi[i]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)eigi[i]); }
+<a name="line324">324: </a><font color="#A020F0">#endif</font>
+<a name="line325">325: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[i]);
+<a name="line326">326: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line327">327: </a>    }
+<a name="line328">328: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line329">329: </a>    PetscViewerPopFormat(viewer);
+<a name="line330">330: </a>    ctx->oldnconv = nconv;
+<a name="line331">331: </a>  }
 <a name="line332">332: </a>  <font color="#4169E1">return</font>(0);
 <a name="line333">333: </a>}
 
-<a name="line337">337: </a><strong><font color="#4169E1"><a name="NEPMonitorLGAll"></a>PetscErrorCode NEPMonitorLGAll(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eig,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line338">338: </a>{
-<a name="line339">339: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line340">340: </a>  PetscDraw      draw;
-<a name="line341">341: </a>  PetscDrawLG    lg;
-<a name="line343">343: </a>  PetscReal      *x,*y;
-<a name="line344">344: </a>  PetscInt       i,n = PetscMin(nep->nev,255);
-
-<a name="line347">347: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)nep));
-<a name="line348">348: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line349">349: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line350">350: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line351">351: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line352">352: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line353">353: </a>    PetscDrawLGSetDimension(lg,n);
-<a name="line354">354: </a>    PetscDrawLGReset(lg);
-<a name="line355">355: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(nep->rtol)-2,0.0);
-<a name="line356">356: </a>  }
-
-<a name="line358">358: </a>  PetscMalloc2(n,&x,n,&y);
-<a name="line359">359: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line360">360: </a>    x[i] = (PetscReal)its;
-<a name="line361">361: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
-<a name="line362">362: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
-<a name="line363">363: </a>  }
-<a name="line364">364: </a>  PetscDrawLGAddPoint(lg,x,y);
-
-<a name="line366">366: </a>  PetscDrawLGDraw(lg);
-<a name="line367">367: </a>  PetscFree2(x,y);
-<a name="line368">368: </a>  <font color="#4169E1">return</font>(0);
-<a name="line369">369: </a>}
+<a name="line337">337: </a><font color="#B22222">/*@C</font>
+<a name="line338">338: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorLGCreate.html#NEPMonitorLGCreate">NEPMonitorLGCreate</a> - Creates a line graph context for use with</font>
+<a name="line339">339: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> to monitor convergence.</font>
+
+<a name="line341">341: </a><font color="#B22222">   Collective on MPI_Comm</font>
+
+<a name="line343">343: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line344">344: </a><font color="#B22222">+  comm - communicator context</font>
+<a name="line345">345: </a><font color="#B22222">.  host - the X display to open, or null for the local machine</font>
+<a name="line346">346: </a><font color="#B22222">.  label - the title to put in the title bar</font>
+<a name="line347">347: </a><font color="#B22222">.  x, y - the screen coordinates of the upper left coordinate of</font>
+<a name="line348">348: </a><font color="#B22222">          the window</font>
+<a name="line349">349: </a><font color="#B22222">-  m, n - the screen width and height in pixels</font>
+
+<a name="line351">351: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line352">352: </a><font color="#B22222">.  lgctx - the drawing context</font>
+
+<a name="line354">354: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line355">355: </a><font color="#B22222">+  -nep_monitor_lg - Sets line graph monitor for the first residual</font>
+<a name="line356">356: </a><font color="#B22222">-  -nep_monitor_lg_all - Sets line graph monitor for all residuals</font>
+
+<a name="line358">358: </a><font color="#B22222">   Notes:</font>
+<a name="line359">359: </a><font color="#B22222">   Use PetscDrawLGDestroy() to destroy this line graph.</font>
+
+<a name="line361">361: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line363">363: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>()</font>
+<a name="line364">364: </a><font color="#B22222">@*/</font>
+<a name="line365">365: </a><strong><font color="#4169E1"><a name="NEPMonitorLGCreate"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorLGCreate.html#NEPMonitorLGCreate">NEPMonitorLGCreate</a>(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)</font></strong>
+<a name="line366">366: </a>{
+<a name="line367">367: </a>  PetscDraw      draw;
+<a name="line368">368: </a>  PetscDrawLG    lg;
+
+<a name="line372">372: </a>  PetscDrawCreate(comm,host,label,x,y,m,n,&draw);
+<a name="line373">373: </a>  PetscDrawSetFromOptions(draw);
+<a name="line374">374: </a>  PetscDrawLGCreate(draw,1,&lg);
+<a name="line375">375: </a>  PetscDrawLGSetFromOptions(lg);
+<a name="line376">376: </a>  PetscDrawDestroy(&draw);
+<a name="line377">377: </a>  *lgctx = lg;
+<a name="line378">378: </a>  <font color="#4169E1">return</font>(0);
+<a name="line379">379: </a>}
+
+<a name="line383">383: </a><strong><font color="#4169E1"><a name="NEPMonitorLG"></a>PetscErrorCode NEPMonitorLG(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line384">384: </a>{
+<a name="line385">385: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line386">386: </a>  PetscReal      x,y;
+
+<a name="line391">391: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line392">392: </a>    PetscDrawLGReset(lg);
+<a name="line393">393: </a>    PetscDrawLGSetDimension(lg,1);
+<a name="line394">394: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(nep->tol)-2,0.0);
+<a name="line395">395: </a>  }
+<a name="line396">396: </a>  x = (PetscReal)its;
+<a name="line397">397: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+<a name="line398">398: </a>  <font color="#4169E1">else</font> y = 0.0;
+<a name="line399">399: </a>  PetscDrawLGAddPoint(lg,&x,&y);
+<a name="line400">400: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || nep->reason) {
+<a name="line401">401: </a>    PetscDrawLGDraw(lg);
+<a name="line402">402: </a>    PetscDrawLGSave(lg);
+<a name="line403">403: </a>  }
+<a name="line404">404: </a>  <font color="#4169E1">return</font>(0);
+<a name="line405">405: </a>}
+
+<a name="line409">409: </a><strong><font color="#4169E1"><a name="NEPMonitorLGAll"></a>PetscErrorCode NEPMonitorLGAll(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line410">410: </a>{
+<a name="line411">411: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line412">412: </a>  PetscInt       i,n = PetscMin(nep->nev,255);
+<a name="line413">413: </a>  PetscReal      *x,*y;
+
+<a name="line418">418: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line419">419: </a>    PetscDrawLGReset(lg);
+<a name="line420">420: </a>    PetscDrawLGSetDimension(lg,n);
+<a name="line421">421: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(nep->tol)-2,0.0);
+<a name="line422">422: </a>  }
+<a name="line423">423: </a>  PetscMalloc2(n,&x,n,&y);
+<a name="line424">424: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line425">425: </a>    x[i] = (PetscReal)its;
+<a name="line426">426: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
+<a name="line427">427: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
+<a name="line428">428: </a>  }
+<a name="line429">429: </a>  PetscDrawLGAddPoint(lg,x,y);
+<a name="line430">430: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || nep->reason) {
+<a name="line431">431: </a>    PetscDrawLGDraw(lg);
+<a name="line432">432: </a>    PetscDrawLGSave(lg);
+<a name="line433">433: </a>  }
+<a name="line434">434: </a>  PetscFree2(x,y);
+<a name="line435">435: </a>  <font color="#4169E1">return</font>(0);
+<a name="line436">436: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/nepopts.c b/src/nep/interface/nepopts.c
index aa9d0dd..17b0b09 100644
--- a/src/nep/interface/nepopts.c
+++ b/src/nep/interface/nepopts.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -23,6 +23,85 @@
 */
 
 #include <slepc/private/nepimpl.h>       /*I "slepcnep.h" I*/
+#include <petscdraw.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPMonitorSetFromOptions"
+/*@C
+   NEPMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user.
+
+   Collective on NEP
+
+   Input Parameters:
++  nep      - the nonlinear eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+.  monitor  - the monitor function, whose context is a PetscViewerAndFormat
+-  trackall - whether this monitor tracks all eigenvalues or not
+
+   Level: developer
+
+.seealso: NEPMonitorSet(), NEPSetTrackAll(), NEPConvMonitorSetFromOptions()
+@*/
+PetscErrorCode NEPMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+{
+  PetscErrorCode       ierr;
+  PetscBool            flg;
+  PetscViewer          viewer;
+  PetscViewerFormat    format;
+  PetscViewerAndFormat *vf;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = PetscViewerAndFormatCreate(viewer,format,&vf);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = NEPMonitorSet(nep,(PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
+    if (trackall) {
+      ierr = NEPSetTrackAll(nep,PETSC_TRUE);CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPConvMonitorSetFromOptions"
+/*@C
+   NEPConvMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user (for monitors that only show iteration numbers of convergence).
+
+   Collective on NEP
+
+   Input Parameters:
++  nep      - the nonlinear eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+-  monitor  - the monitor function, whose context is a SlepcConvMonitor
+
+   Level: developer
+
+.seealso: NEPMonitorSet(), NEPMonitorSetFromOptions()
+@*/
+PetscErrorCode NEPConvMonitorSetFromOptions(NEP nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))
+{
+  PetscErrorCode    ierr;
+  PetscBool         flg;
+  PetscViewer       viewer;
+  PetscViewerFormat format;
+  SlepcConvMonitor  ctx;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = SlepcConvMonitorCreate(viewer,format,&ctx);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = NEPMonitorSet(nep,(PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSetFromOptions"
@@ -43,14 +122,13 @@
 @*/
 PetscErrorCode NEPSetFromOptions(NEP nep)
 {
-  PetscErrorCode   ierr;
-  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-  PetscBool        flg,flg1,flg2,flg3,flg4,flg5;
-  PetscReal        r1,r2,r3;
-  PetscScalar      s;
-  PetscInt         i,j,k;
-  PetscViewer      monviewer;
-  SlepcConvMonitor ctx;
+  PetscErrorCode ierr;
+  char           type[256];
+  PetscBool      set,flg,flg1,flg2,flg3;
+  PetscReal      r;
+  PetscScalar    s;
+  PetscInt       i,j,k;
+  PetscDrawLG    lg;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
@@ -67,33 +145,37 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
 
     i = nep->npart;
     ierr = PetscOptionsInt("-nep_refine_partitions","Number of partitions of the communicator for iterative refinement","NEPSetRefine",nep->npart,&i,&flg1);CHKERRQ(ierr);
-    r1 = nep->reftol;
-    ierr = PetscOptionsReal("-nep_refine_tol","Tolerance for iterative refinement","NEPSetRefine",nep->reftol,&r1,&flg2);CHKERRQ(ierr);
+    r = nep->rtol;
+    ierr = PetscOptionsReal("-nep_refine_tol","Tolerance for iterative refinement","NEPSetRefine",nep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/1000:nep->rtol,&r,&flg2);CHKERRQ(ierr);
     j = nep->rits;
     ierr = PetscOptionsInt("-nep_refine_its","Maximum number of iterations for iterative refinement","NEPSetRefine",nep->rits,&j,&flg3);CHKERRQ(ierr);
     if (flg1 || flg2 || flg3) {
-      ierr = NEPSetRefine(nep,nep->refine,i,r1,j);CHKERRQ(ierr);
+      ierr = NEPSetRefine(nep,nep->refine,i,r,j,nep->scheme);CHKERRQ(ierr);
     }
 
+    ierr = PetscOptionsEnum("-nep_refine_scheme","Scheme used for linear systems within iterative refinement","NEPSetRefine",NEPRefineSchemes,(PetscEnum)nep->scheme,(PetscEnum*)&nep->scheme,NULL);CHKERRQ(ierr);
+
     i = nep->max_it? nep->max_it: PETSC_DEFAULT;
     ierr = PetscOptionsInt("-nep_max_it","Maximum number of iterations","NEPSetTolerances",nep->max_it,&i,&flg1);CHKERRQ(ierr);
-    j = nep->max_funcs? nep->max_funcs: PETSC_DEFAULT;
-    ierr = PetscOptionsInt("-nep_max_funcs","Maximum number of function evaluations","NEPSetTolerances",nep->max_funcs,&j,&flg2);CHKERRQ(ierr);
-    r1 = nep->abstol;
-    ierr = PetscOptionsReal("-nep_atol","Absolute tolerance for residual norm","NEPSetTolerances",nep->abstol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->abstol,&r1,&flg3);CHKERRQ(ierr);
-    r2 = nep->rtol;
-    ierr = PetscOptionsReal("-nep_rtol","Relative tolerance for residual norm","NEPSetTolerances",nep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->rtol,&r2,&flg4);CHKERRQ(ierr);
-    r3 = nep->stol;
-    ierr = PetscOptionsReal("-nep_stol","Relative tolerance for step length","NEPSetTolerances",nep->stol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->stol,&r3,&flg5);CHKERRQ(ierr);
-    if (flg1 || flg2 || flg3 || flg4 || flg5) {
-      ierr = NEPSetTolerances(nep,r1,r2,r3,i,j);CHKERRQ(ierr);
+    r = nep->tol;
+    ierr = PetscOptionsReal("-nep_tol","Tolerance","NEPSetTolerances",nep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->tol,&r,&flg2);CHKERRQ(ierr);
+    if (flg1 || flg2) {
+      ierr = NEPSetTolerances(nep,r,i);CHKERRQ(ierr);
     }
 
-    flg  = PETSC_FALSE;
-    ierr = PetscOptionsBool("-nep_convergence_default","Default (relative error) convergence test","NEPSetConvergenceTest",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = NEPSetConvergenceTest(nep,NEPConvergedDefault,NULL,NULL);CHKERRQ(ierr);
-    }
+    ierr = PetscOptionsBoolGroupBegin("-nep_conv_rel","Relative error convergence test","NEPSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetConvergenceTest(nep,NEP_CONV_REL);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroup("-nep_conv_norm","Convergence test relative to the matrix norms","NEPSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetConvergenceTest(nep,NEP_CONV_NORM);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroup("-nep_conv_abs","Absolute error convergence test","NEPSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetConvergenceTest(nep,NEP_CONV_ABS);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-nep_conv_user","User-defined convergence test","NEPSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetConvergenceTest(nep,NEP_CONV_USER);CHKERRQ(ierr); }
+
+    ierr = PetscOptionsBoolGroupBegin("-nep_stop_basic","Stop iteration if all eigenvalues converged or max_it reached","NEPSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetStoppingTest(nep,NEP_STOP_BASIC);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-nep_stop_user","User-defined stopping test","NEPSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetStoppingTest(nep,NEP_STOP_USER);CHKERRQ(ierr); }
 
     i = nep->nev;
     ierr = PetscOptionsInt("-nep_nev","Number of eigenvalues to compute","NEPSetDimensions",nep->nev,&i,&flg1);CHKERRQ(ierr);
@@ -105,12 +187,6 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
       ierr = NEPSetDimensions(nep,i,j,k);CHKERRQ(ierr);
     }
 
-    i = 0;
-    ierr = PetscOptionsInt("-nep_lag_preconditioner","Interval to rebuild preconditioner","NEPSetLagPreconditioner",nep->lag,&i,&flg);CHKERRQ(ierr);
-    if (flg) { ierr = NEPSetLagPreconditioner(nep,i);CHKERRQ(ierr); }
-
-    ierr = PetscOptionsBool("-nep_const_correction_tol","Constant correction tolerance for the linear solver","NEPSetConstCorrectionTol",nep->cctol,&nep->cctol,NULL);CHKERRQ(ierr);
-
     ierr = PetscOptionsScalar("-nep_target","Value of the target","NEPSetTarget",nep->target,&s,&flg);CHKERRQ(ierr);
     if (flg) {
       ierr = NEPSetWhichEigenpairs(nep,NEP_TARGET_MAGNITUDE);CHKERRQ(ierr);
@@ -121,40 +197,28 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
     /*
       Cancels all monitors hardwired into code before call to NEPSetFromOptions()
     */
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-nep_monitor_cancel","Remove any hardwired monitor routines","NEPMonitorCancel",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
+    ierr = PetscOptionsBool("-nep_monitor_cancel","Remove any hardwired monitor routines","NEPMonitorCancel",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
       ierr = NEPMonitorCancel(nep);CHKERRQ(ierr);
     }
     /*
-      Prints approximate eigenvalues and error estimates at each iteration
+      Text monitors
     */
-    ierr = PetscOptionsString("-nep_monitor","Monitor first unconverged approximate eigenvalue and error estimate","NEPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)nep),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = NEPMonitorSet(nep,NEPMonitorFirst,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-nep_monitor_conv","Monitor approximate eigenvalues and error estimates as they converge","NEPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscNew(&ctx);CHKERRQ(ierr);
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)nep),monfilename,&ctx->viewer);CHKERRQ(ierr);
-      ierr = NEPMonitorSet(nep,NEPMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-nep_monitor_all","Monitor approximate eigenvalues and error estimates","NEPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)nep),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = NEPMonitorSet(nep,NEPMonitorAll,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-      ierr = NEPSetTrackAll(nep,PETSC_TRUE);CHKERRQ(ierr);
-    }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-nep_monitor_lg","Monitor first unconverged approximate error estimate graphically","NEPMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = NEPMonitorSet(nep,NEPMonitorLG,NULL,NULL);CHKERRQ(ierr);
+    ierr = NEPMonitorSetFromOptions(nep,"-nep_monitor","Monitor first unconverged approximate eigenvalue and error estimate","NEPMonitorFirst",NEPMonitorFirst,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = NEPConvMonitorSetFromOptions(nep,"-nep_monitor_conv","Monitor approximate eigenvalues and error estimates as they converge","NEPMonitorConverged",NEPMonitorConverged);CHKERRQ(ierr);
+    ierr = NEPMonitorSetFromOptions(nep,"-nep_monitor_all","Monitor approximate eigenvalues and error estimates","NEPMonitorAll",NEPMonitorAll,PETSC_TRUE);CHKERRQ(ierr);
+    /*
+      Line graph monitors
+    */
+    ierr = PetscOptionsBool("-nep_monitor_lg","Monitor first unconverged approximate error estimate graphically","NEPMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = NEPMonitorLGCreate(PetscObjectComm((PetscObject)nep),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = NEPMonitorSet(nep,NEPMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
     }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-nep_monitor_lg_all","Monitor error estimates graphically","NEPMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = NEPMonitorSet(nep,NEPMonitorLGAll,NULL,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsBool("-nep_monitor_lg_all","Monitor error estimates graphically","NEPMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = NEPMonitorLGCreate(PetscObjectComm((PetscObject)nep),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = NEPMonitorSet(nep,NEPMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
       ierr = NEPSetTrackAll(nep,PETSC_TRUE);CHKERRQ(ierr);
     }
   /* -----------------------------------------------------------------------*/
@@ -175,20 +239,22 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
     if (flg) { ierr = NEPSetWhichEigenpairs(nep,NEP_TARGET_MAGNITUDE);CHKERRQ(ierr); }
     ierr = PetscOptionsBoolGroup("-nep_target_real","compute eigenvalues with real parts close to target","NEPSetWhichEigenpairs",&flg);CHKERRQ(ierr);
     if (flg) { ierr = NEPSetWhichEigenpairs(nep,NEP_TARGET_REAL);CHKERRQ(ierr); }
-    ierr = PetscOptionsBoolGroupEnd("-nep_target_imaginary","compute eigenvalues with imaginary parts close to target","NEPSetWhichEigenpairs",&flg);CHKERRQ(ierr);
+    ierr = PetscOptionsBoolGroup("-nep_target_imaginary","compute eigenvalues with imaginary parts close to target","NEPSetWhichEigenpairs",&flg);CHKERRQ(ierr);
     if (flg) { ierr = NEPSetWhichEigenpairs(nep,NEP_TARGET_IMAGINARY);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-nep_all","compute all eigenvalues in a region","NEPSetWhichEigenpairs",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = NEPSetWhichEigenpairs(nep,NEP_ALL);CHKERRQ(ierr); }
 
-    ierr = PetscOptionsName("-nep_view","Print detailed information on solver used","NEPView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-nep_view_vectors","View computed eigenvectors","NEPVectorsView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-nep_view_values","View computed eigenvalues","NEPValuesView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-nep_converged_reason","Print reason for convergence, and number of iterations","NEPReasonView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-nep_error_absolute","Print absolute errors of each eigenpair","NEPErrorView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-nep_error_relative","Print relative errors of each eigenpair","NEPErrorView",0);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-nep_view","Print detailed information on solver used","NEPView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-nep_view_vectors","View computed eigenvectors","NEPVectorsView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-nep_view_values","View computed eigenvalues","NEPValuesView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-nep_converged_reason","Print reason for convergence, and number of iterations","NEPReasonView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-nep_error_absolute","Print absolute errors of each eigenpair","NEPErrorView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-nep_error_relative","Print relative errors of each eigenpair","NEPErrorView",NULL);CHKERRQ(ierr);
 
     if (nep->ops->setfromoptions) {
       ierr = (*nep->ops->setfromoptions)(PetscOptionsObject,nep);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)nep);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)nep);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
 
   if (!nep->V) { ierr = NEPGetBV(nep,&nep->V);CHKERRQ(ierr); }
@@ -197,10 +263,8 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
   ierr = RGSetFromOptions(nep->rg);CHKERRQ(ierr);
   if (!nep->ds) { ierr = NEPGetDS(nep,&nep->ds);CHKERRQ(ierr); }
   ierr = DSSetFromOptions(nep->ds);CHKERRQ(ierr);
-  if (!nep->ksp) { ierr = NEPGetKSP(nep,&nep->ksp);CHKERRQ(ierr); }
-  ierr = KSPSetOperators(nep->ksp,nep->function,nep->function_pre);CHKERRQ(ierr);
-  ierr = KSPSetFromOptions(nep->ksp);CHKERRQ(ierr);
-  ierr = PetscRandomSetFromOptions(nep->rand);CHKERRQ(ierr);
+  if (!nep->refineksp) { ierr = NEPRefineGetKSP(nep,&nep->refineksp);CHKERRQ(ierr); }
+  ierr = KSPSetFromOptions(nep->refineksp);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -216,12 +280,8 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
 .  nep - the nonlinear eigensolver context
 
    Output Parameters:
-+  abstol - absolute convergence tolerance
-.  rtol   - relative convergence tolerance
-.  stol   - convergence tolerance in terms of the norm of the change in the
-           solution between steps, || delta x || < stol*|| x ||
-.  maxit  - maximum number of iterations
--  maxf   - maximum number of function evaluations
++  tol - the convergence tolerance
+-  maxits - maximum number of iterations
 
    Notes:
    The user can specify NULL for any parameter that is not needed.
@@ -230,40 +290,31 @@ PetscErrorCode NEPSetFromOptions(NEP nep)
 
 .seealso: NEPSetTolerances()
 @*/
-PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf)
+PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *tol,PetscInt *maxits)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  if (abstol) *abstol = nep->abstol;
-  if (rtol)   *rtol   = nep->rtol;
-  if (stol)   *stol   = nep->stol;
-  if (maxit)  *maxit  = nep->max_it;
-  if (maxf)   *maxf   = nep->max_funcs;
+  if (tol)    *tol    = nep->tol;
+  if (maxits) *maxits = nep->max_it;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSetTolerances"
 /*@
-   NEPSetTolerances - Sets various parameters used in convergence tests.
+   NEPSetTolerances - Sets the tolerance and maximum iteration count used
+   by the NEP convergence tests.
 
    Logically Collective on NEP
 
    Input Parameters:
 +  nep    - the nonlinear eigensolver context
-.  abstol - absolute convergence tolerance
-.  rtol   - relative convergence tolerance
-.  stol   - convergence tolerance in terms of the norm of the change in the
-            solution between steps, || delta x || < stol*|| x ||
-.  maxit  - maximum number of iterations
--  maxf   - maximum number of function evaluations
+.  tol    - the convergence tolerance
+-  maxits - maximum number of iterations to use
 
    Options Database Keys:
-+    -nep_atol <abstol> - Sets abstol
-.    -nep_rtol <rtol> - Sets rtol
-.    -nep_stol <stol> - Sets stol
-.    -nep_max_it <maxit> - Sets maxit
--    -nep_max_funcs <maxf> - Sets maxf
++  -nep_tol <tol> - Sets the convergence tolerance
+-  -nep_max_it <maxits> - Sets the maximum number of iterations allowed
 
    Notes:
    Use PETSC_DEFAULT for either argument to assign a reasonably good value.
@@ -272,46 +323,25 @@ PetscErrorCode NEPGetTolerances(NEP nep,PetscReal *abstol,PetscReal *rtol,PetscR
 
 .seealso: NEPGetTolerances()
 @*/
-PetscErrorCode NEPSetTolerances(NEP nep,PetscReal abstol,PetscReal rtol,PetscReal stol,PetscInt maxit,PetscInt maxf)
+PetscErrorCode NEPSetTolerances(NEP nep,PetscReal tol,PetscInt maxits)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidLogicalCollectiveReal(nep,abstol,2);
-  PetscValidLogicalCollectiveReal(nep,rtol,3);
-  PetscValidLogicalCollectiveReal(nep,stol,4);
-  PetscValidLogicalCollectiveInt(nep,maxit,5);
-  PetscValidLogicalCollectiveInt(nep,maxf,6);
-  if (abstol == PETSC_DEFAULT) {
-    nep->abstol = PETSC_DEFAULT;
-  } else {
-    if (abstol < 0.0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Absolute tolerance %g must be non-negative",(double)abstol);
-    nep->abstol = abstol;
-  }
-  if (rtol == PETSC_DEFAULT) {
-    nep->rtol = PETSC_DEFAULT;
-  } else {
-    if (rtol < 0.0 || 1.0 <= rtol) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Relative tolerance %g must be non-negative and less than 1.0",(double)rtol);
-    nep->rtol = rtol;
-  }
-  if (stol == PETSC_DEFAULT) {
-    nep->stol = PETSC_DEFAULT;
-  } else {
-    if (stol < 0.0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Step tolerance %g must be non-negative",(double)stol);
-    nep->stol = stol;
-  }
-  if (maxit == PETSC_DEFAULT || maxit == PETSC_DECIDE) {
-    nep->max_it = 0;
+  PetscValidLogicalCollectiveReal(nep,tol,2);
+  PetscValidLogicalCollectiveInt(nep,maxits,3);
+  if (tol == PETSC_DEFAULT) {
+    nep->tol   = PETSC_DEFAULT;
     nep->state = NEP_STATE_INITIAL;
   } else {
-    if (maxit < 0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Maximum number of iterations %D must be non-negative",maxit);
-    nep->max_it = maxit;
+    if (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of tol. Must be > 0");
+    nep->tol = tol;
   }
-  if (maxf == PETSC_DEFAULT || maxf == PETSC_DECIDE) {
+  if (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
     nep->max_it = 0;
-    nep->state = NEP_STATE_INITIAL;
+    nep->state  = NEP_STATE_INITIAL;
   } else {
-    if (maxf < 0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Maximum number of function evaluations %D must be non-negative",maxf);
-    nep->max_funcs = maxf;
+    if (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of maxits. Must be > 0");
+    nep->max_it = maxits;
   }
   PetscFunctionReturn(0);
 }
@@ -433,7 +463,9 @@ PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)
 .     NEP_SMALLEST_IMAGINARY - smallest imaginary parts
 .     NEP_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)
 .     NEP_TARGET_REAL - eigenvalues with real part closest to target
--     NEP_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target
+.     NEP_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target
+.     NEP_ALL - all eigenvalues contained in a given region
+-     NEP_WHICH_USER - user defined ordering set with NEPSetEigenvalueComparison()
 
     Options Database Keys:
 +   -nep_largest_magnitude - Sets largest eigenvalues in magnitude
@@ -444,7 +476,8 @@ PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)
 .   -nep_smallest_imaginary - Sets smallest imaginary parts
 .   -nep_target_magnitude - Sets eigenvalues closest to target
 .   -nep_target_real - Sets real parts closest to target
--   -nep_target_imaginary - Sets imaginary parts closest to target
+.   -nep_target_imaginary - Sets imaginary parts closest to target
+-   -nep_all - Sets all eigenvalues in a region
 
     Notes:
     Not all eigensolvers implemented in NEP account for all the possible values
@@ -452,9 +485,14 @@ PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)
     and NEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part
     for eigenvalue selection.
 
+    The target is a scalar value provided with NEPSetTarget().
+
+    NEP_ALL is intended for use in the context of the CISS solver for
+    computing all eigenvalues in a region.
+
     Level: intermediate
 
-.seealso: NEPGetWhichEigenpairs(), NEPWhich
+.seealso: NEPGetWhichEigenpairs(), NEPSetTarget(), NEPSetEigenvalueComparison(), NEPWhich
 @*/
 PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)
 {
@@ -473,6 +511,8 @@ PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)
 #if defined(PETSC_USE_COMPLEX)
     case NEP_TARGET_IMAGINARY:
 #endif
+    case EPS_ALL:
+    case NEP_WHICH_USER:
       if (nep->which != which) {
         nep->state = NEP_STATE_INITIAL;
         nep->which = which;
@@ -515,169 +555,287 @@ PetscErrorCode NEPGetWhichEigenpairs(NEP nep,NEPWhich *which)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPSetLagPreconditioner"
-/*@
-    NEPSetLagPreconditioner - Determines when the preconditioner is rebuilt in the
-    nonlinear solve.
+#define __FUNCT__ "NEPSetEigenvalueComparison"
+/*@C
+   NEPSetEigenvalueComparison - Specifies the eigenvalue comparison function
+   when NEPSetWhichEigenpairs() is set to NEP_WHICH_USER.
 
-    Logically Collective on NEP
+   Logically Collective on NEP
 
-    Input Parameters:
-+   nep - the NEP context
--   lag - 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is
-          computed within the nonlinear iteration, 2 means every second time
-          the Jacobian is built, etc.
+   Input Parameters:
++  pep  - eigensolver context obtained from NEPCreate()
+.  func - a pointer to the comparison function
+-  ctx  - a context pointer (the last parameter to the comparison function)
 
-    Options Database Keys:
-.   -nep_lag_preconditioner <lag>
+   Calling Sequence of func:
+$   func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)
 
-    Notes:
-    The default is 1.
-    The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.
++   ar     - real part of the 1st eigenvalue
+.   ai     - imaginary part of the 1st eigenvalue
+.   br     - real part of the 2nd eigenvalue
+.   bi     - imaginary part of the 2nd eigenvalue
+.   res    - result of comparison
+-   ctx    - optional context, as set by NEPSetEigenvalueComparison()
 
-    Level: intermediate
+   Note:
+   The returning parameter 'res' can be:
++  negative - if the 1st eigenvalue is preferred to the 2st one
+.  zero     - if both eigenvalues are equally preferred
+-  positive - if the 2st eigenvalue is preferred to the 1st one
+
+   Level: advanced
 
-.seealso: NEPGetLagPreconditioner()
+.seealso: NEPSetWhichEigenpairs(), NEPWhich
 @*/
-PetscErrorCode NEPSetLagPreconditioner(NEP nep,PetscInt lag)
+PetscErrorCode NEPSetEigenvalueComparison(NEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
 {
   PetscFunctionBegin;
-  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidLogicalCollectiveInt(nep,lag,2);
-  if (lag<0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Lag must be non-negative");
-  nep->lag = lag;
+  PetscValidHeaderSpecific(pep,NEP_CLASSID,1);
+  pep->sc->comparison    = func;
+  pep->sc->comparisonctx = ctx;
+  pep->which             = NEP_WHICH_USER;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPGetLagPreconditioner"
-/*@
-    NEPGetLagPreconditioner - Indicates how often the preconditioner is rebuilt.
+#define __FUNCT__ "NEPSetConvergenceTestFunction"
+/*@C
+   NEPSetConvergenceTestFunction - Sets a function to compute the error estimate
+   used in the convergence test.
 
-    Not Collective
+   Logically Collective on NEP
 
-    Input Parameter:
-.   nep - the NEP context
+   Input Parameters:
++  nep     - nonlinear eigensolver context obtained from NEPCreate()
+.  func    - a pointer to the convergence test function
+.  ctx     - context for private data for the convergence routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
 
-    Output Parameter:
-.   lag - the lag parameter
+   Calling Sequence of func:
+$   func(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
 
-    Level: intermediate
++   nep    - nonlinear eigensolver context obtained from NEPCreate()
+.   eigr   - real part of the eigenvalue
+.   eigi   - imaginary part of the eigenvalue
+.   res    - residual norm associated to the eigenpair
+.   errest - (output) computed error estimate
+-   ctx    - optional context, as set by NEPSetConvergenceTestFunction()
+
+   Note:
+   If the error estimate returned by the convergence test function is less than
+   the tolerance, then the eigenvalue is accepted as converged.
+
+   Level: advanced
 
-.seealso: NEPSetLagPreconditioner()
+.seealso: NEPSetConvergenceTest(), NEPSetTolerances()
 @*/
-PetscErrorCode NEPGetLagPreconditioner(NEP nep,PetscInt *lag)
+PetscErrorCode NEPSetConvergenceTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
 {
+  PetscErrorCode ierr;
+
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidPointer(lag,2);
-  *lag = nep->lag;
+  if (nep->convergeddestroy) {
+    ierr = (*nep->convergeddestroy)(nep->convergedctx);CHKERRQ(ierr);
+  }
+  nep->converged        = func;
+  nep->convergeddestroy = destroy;
+  nep->convergedctx     = ctx;
+  if (func == NEPConvergedRelative) nep->conv = NEP_CONV_REL;
+  else if (func == NEPConvergedNorm) nep->conv = NEP_CONV_NORM;
+  else if (func == NEPConvergedAbsolute) nep->conv = NEP_CONV_ABS;
+  else nep->conv = NEP_CONV_USER;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPSetConstCorrectionTol"
+#define __FUNCT__ "NEPSetConvergenceTest"
 /*@
-    NEPSetConstCorrectionTol - Sets a flag to keep the tolerance used
-    in the linear solver constant.
+   NEPSetConvergenceTest - Specifies how to compute the error estimate
+   used in the convergence test.
 
-    Logically Collective on NEP
+   Logically Collective on NEP
 
-    Input Parameters:
-+   nep - the NEP context
--   cct - a boolean value
+   Input Parameters:
++  nep  - nonlinear eigensolver context obtained from NEPCreate()
+-  conv - the type of convergence test
 
-    Options Database Keys:
-.   -nep_const_correction_tol <cct>
+   Options Database Keys:
++  -nep_conv_abs  - Sets the absolute convergence test
+.  -nep_conv_rel  - Sets the convergence test relative to the eigenvalue
+-  -nep_conv_user - Selects the user-defined convergence test
 
-    Notes:
-    By default, an exponentially decreasing tolerance is set in the KSP used
-    within the nonlinear iteration, so that each Newton iteration requests
-    better accuracy than the previous one. The constant correction tolerance
-    flag stops this behaviour.
+   Note:
+   The parameter 'conv' can have one of these values
++     NEP_CONV_ABS  - absolute error ||r||
+.     NEP_CONV_REL  - error relative to the eigenvalue l, ||r||/|l|
+.     NEP_CONV_NORM - error relative matrix norms, ||r||/sum_i(|f_i(l)|*||A_i||)
+-     NEP_CONV_USER - function set by NEPSetConvergenceTestFunction()
 
-    Level: intermediate
+   Level: intermediate
 
-.seealso: NEPGetConstCorrectionTol()
+.seealso: NEPGetConvergenceTest(), NEPSetConvergenceTestFunction(), NEPSetStoppingTest(), NEPConv
 @*/
-PetscErrorCode NEPSetConstCorrectionTol(NEP nep,PetscBool cct)
+PetscErrorCode NEPSetConvergenceTest(NEP nep,NEPConv conv)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidLogicalCollectiveBool(nep,cct,2);
-  nep->cctol = cct;
+  PetscValidLogicalCollectiveEnum(nep,conv,2);
+  switch (conv) {
+    case NEP_CONV_ABS:  nep->converged = NEPConvergedAbsolute; break;
+    case NEP_CONV_REL:  nep->converged = NEPConvergedRelative; break;
+    case NEP_CONV_NORM: nep->converged = NEPConvergedNorm; break;
+    case NEP_CONV_USER: break;
+    default:
+      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'conv' value");
+  }
+  nep->conv = conv;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPGetConstCorrectionTol"
+#define __FUNCT__ "NEPGetConvergenceTest"
 /*@
-    NEPGetConstCorrectionTol - Returns the constant tolerance flag.
+   NEPGetConvergenceTest - Gets the method used to compute the error estimate
+   used in the convergence test.
 
-    Not Collective
+   Not Collective
 
-    Input Parameter:
-.   nep - the NEP context
+   Input Parameters:
+.  nep   - nonlinear eigensolver context obtained from NEPCreate()
 
-    Output Parameter:
-.   cct - the value of the constant tolerance flag
+   Output Parameters:
+.  conv  - the type of convergence test
 
-    Level: intermediate
+   Level: intermediate
 
-.seealso: NEPSetConstCorrectionTol()
+.seealso: NEPSetConvergenceTest(), NEPConv
 @*/
-PetscErrorCode NEPGetConstCorrectionTol(NEP nep,PetscBool *cct)
+PetscErrorCode NEPGetConvergenceTest(NEP nep,NEPConv *conv)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  PetscValidPointer(cct,2);
-  *cct = nep->cctol;
+  PetscValidPointer(conv,2);
+  *conv = nep->conv;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NEPSetConvergenceTest"
+#define __FUNCT__ "NEPSetStoppingTestFunction"
 /*@C
-    NEPSetConvergenceTest - Sets the function to be used to test convergence
-    of the nonlinear iterative solution.
+   NEPSetStoppingTestFunction - Sets a function to decide when to stop the outer
+   iteration of the eigensolver.
 
-    Logically Collective on NEP
+   Logically Collective on NEP
 
-    Input Parameters:
-+   nep     - the NEP context
-.   func    - a pointer to the convergence test function
-.   ctx     - [optional] context for private data for the convergence routine
-              (may be NULL)
--   destroy - [optional] destructor for the context (may be NULL;
-              PETSC_NULL_FUNCTION in Fortran)
-
-    Calling Sequence of func:
-$   func(NEP nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,NEPConvergedReason reason*,void *fctx)
-
-+   nep    - the NEP context
-.   it     - iteration number
-.   xnorm  - norm of the current solution
-.   snorm  - norm of the step (difference between two consecutive solutions)
-.   fnorm  - norm of the function (residual)
-.   reason - (output) result of the convergence test
--   fctx   - optional context, as set by NEPSetConvergenceTest()
-
-    Level: advanced
+   Input Parameters:
++  nep     - nonlinear eigensolver context obtained from NEPCreate()
+.  func    - pointer to the stopping test function
+.  ctx     - context for private data for the stopping routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
+
+   Calling Sequence of func:
+$   func(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx)
+
++   nep    - nonlinear eigensolver context obtained from NEPCreate()
+.   its    - current number of iterations
+.   max_it - maximum number of iterations
+.   nconv  - number of currently converged eigenpairs
+.   nev    - number of requested eigenpairs
+.   reason - (output) result of the stopping test
+-   ctx    - optional context, as set by NEPSetStoppingTestFunction()
 
-.seealso: NEPSetTolerances()
+   Note:
+   Normal usage is to first call the default routine NEPStoppingBasic() and then
+   set reason to NEP_CONVERGED_USER if some user-defined conditions have been
+   met. To let the eigensolver continue iterating, the result must be left as
+   NEP_CONVERGED_ITERATING.
+
+   Level: advanced
+
+.seealso: NEPSetStoppingTest(), NEPStoppingBasic()
 @*/
-PetscErrorCode NEPSetConvergenceTest(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+PetscErrorCode NEPSetStoppingTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
 {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-  if (nep->convergeddestroy) {
-    ierr = (*nep->convergeddestroy)(nep->convergedctx);CHKERRQ(ierr);
+  if (nep->stoppingdestroy) {
+    ierr = (*nep->stoppingdestroy)(nep->stoppingctx);CHKERRQ(ierr);
   }
-  nep->converged        = func;
-  nep->convergeddestroy = destroy;
-  nep->convergedctx     = ctx;
+  nep->stopping        = func;
+  nep->stoppingdestroy = destroy;
+  nep->stoppingctx     = ctx;
+  if (func == NEPStoppingBasic) nep->stop = NEP_STOP_BASIC;
+  else nep->stop = NEP_STOP_USER;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPSetStoppingTest"
+/*@
+   NEPSetStoppingTest - Specifies how to decide the termination of the outer
+   loop of the eigensolver.
+
+   Logically Collective on NEP
+
+   Input Parameters:
++  nep  - nonlinear eigensolver context obtained from NEPCreate()
+-  stop - the type of stopping test
+
+   Options Database Keys:
++  -nep_stop_basic - Sets the default stopping test
+-  -nep_stop_user  - Selects the user-defined stopping test
+
+   Note:
+   The parameter 'stop' can have one of these values
++     NEP_STOP_BASIC - default stopping test
+-     NEP_STOP_USER  - function set by NEPSetStoppingTestFunction()
+
+   Level: advanced
+
+.seealso: NEPGetStoppingTest(), NEPSetStoppingTestFunction(), NEPSetConvergenceTest(), NEPStop
+@*/
+PetscErrorCode NEPSetStoppingTest(NEP nep,NEPStop stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(nep,stop,2);
+  switch (stop) {
+    case NEP_STOP_BASIC: nep->stopping = NEPStoppingBasic; break;
+    case NEP_STOP_USER:  break;
+    default:
+      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'stop' value");
+  }
+  nep->stop = stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NEPGetStoppingTest"
+/*@
+   NEPGetStoppingTest - Gets the method used to decide the termination of the outer
+   loop of the eigensolver.
+
+   Not Collective
+
+   Input Parameters:
+.  nep   - nonlinear eigensolver context obtained from NEPCreate()
+
+   Output Parameters:
+.  stop  - the type of stopping test
+
+   Level: advanced
+
+.seealso: NEPSetStoppingTest(), NEPStop
+@*/
+PetscErrorCode NEPGetStoppingTest(NEP nep,NEPStop *stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  PetscValidPointer(stop,2);
+  *stop = nep->stop;
   PetscFunctionReturn(0);
 }
 
@@ -754,13 +912,15 @@ PetscErrorCode NEPGetTrackAll(NEP nep,PetscBool *trackall)
 .  refine - refinement type
 .  npart  - number of partitions of the communicator
 .  tol    - the convergence tolerance
--  its    - maximum number of refinement iterations
+.  its    - maximum number of refinement iterations
+-  scheme - which scheme to be used for solving the involved linear systems
 
    Options Database Keys:
 +  -nep_refine <type> - refinement type, one of <none,simple,multiple>
 .  -nep_refine_partitions <n> - the number of partitions
 .  -nep_refine_tol <tol> - the tolerance
--  -nep_refine_its <its> - number of iterations
+.  -nep_refine_its <its> - number of iterations
+-  -nep_refine_scheme - to set the scheme for the linear solves
 
    Notes:
    By default, iterative refinement is disabled, since it may be very
@@ -781,11 +941,15 @@ PetscErrorCode NEPGetTrackAll(NEP nep,PetscBool *trackall)
    different value). In contrast, the multiple method simply performs its
    refinement iterations (just one by default).
 
+   The scheme argument is used to change the way in which linear systems are
+   solved. Possible choices are: explicit, mixed block elimination (MBE), 
+   and Schur complement.
+
    Level: intermediate
 
 .seealso: NEPGetRefine()
 @*/
-PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its)
+PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,NEPRefineScheme scheme)
 {
   PetscErrorCode ierr;
   PetscMPIInt    size;
@@ -796,6 +960,7 @@ PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal to
   PetscValidLogicalCollectiveInt(nep,npart,3);
   PetscValidLogicalCollectiveReal(nep,tol,4);
   PetscValidLogicalCollectiveInt(nep,its,5);
+  PetscValidLogicalCollectiveEnum(nep,scheme,6);
   nep->refine = refine;
   if (refine) {  /* process parameters only if not REFINE_NONE */
     if (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
@@ -806,10 +971,10 @@ PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal to
       nep->npart = npart;
     }
     if (tol == PETSC_DEFAULT || tol == PETSC_DECIDE) {
-      nep->reftol = nep->rtol;
+      nep->rtol = PetscMax(nep->tol/1000,PETSC_MACHINE_EPSILON);
     } else {
       if (tol<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of tol. Must be > 0");
-      nep->reftol = tol;
+      nep->rtol = tol;
     }
     if (its==PETSC_DECIDE || its==PETSC_DEFAULT) {
       nep->rits = PETSC_DEFAULT;
@@ -817,6 +982,7 @@ PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal to
       if (its<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of its. Must be >= 0");
       nep->rits = its;
     }
+    nep->scheme = scheme;
   }
   nep->state = NEP_STATE_INITIAL;
   PetscFunctionReturn(0);
@@ -838,6 +1004,7 @@ PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal to
 .  npart  - number of partitions of the communicator
 .  tol    - the convergence tolerance
 -  its    - maximum number of refinement iterations
+-  scheme - the scheme used for solving linear systems
 
    Level: intermediate
 
@@ -846,14 +1013,15 @@ PetscErrorCode NEPSetRefine(NEP nep,NEPRefine refine,PetscInt npart,PetscReal to
 
 .seealso: NEPSetRefine()
 @*/
-PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its)
+PetscErrorCode NEPGetRefine(NEP nep,NEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,NEPRefineScheme *scheme)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   if (refine) *refine = nep->refine;
   if (npart)  *npart  = nep->npart;
-  if (tol)    *tol    = nep->reftol;
+  if (tol)    *tol    = nep->rtol;
   if (its)    *its    = nep->rits;
+  if (scheme) *scheme = nep->scheme;
   PetscFunctionReturn(0);
 }
 
@@ -897,9 +1065,6 @@ PetscErrorCode NEPSetOptionsPrefix(NEP nep,const char *prefix)
   ierr = DSSetOptionsPrefix(nep->ds,prefix);CHKERRQ(ierr);
   if (!nep->rg) { ierr = NEPGetRG(nep,&nep->rg);CHKERRQ(ierr); }
   ierr = RGSetOptionsPrefix(nep->rg,prefix);CHKERRQ(ierr);
-  if (!nep->ksp) { ierr = NEPGetKSP(nep,&nep->ksp);CHKERRQ(ierr); }
-  ierr = KSPSetOptionsPrefix(nep->ksp,prefix);CHKERRQ(ierr);
-  ierr = KSPAppendOptionsPrefix(nep->ksp,"nep_");CHKERRQ(ierr);
   ierr = PetscObjectSetOptionsPrefix((PetscObject)nep,prefix);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -936,9 +1101,6 @@ PetscErrorCode NEPAppendOptionsPrefix(NEP nep,const char *prefix)
   ierr = DSSetOptionsPrefix(nep->ds,prefix);CHKERRQ(ierr);
   if (!nep->rg) { ierr = NEPGetRG(nep,&nep->rg);CHKERRQ(ierr); }
   ierr = RGSetOptionsPrefix(nep->rg,prefix);CHKERRQ(ierr);
-  if (!nep->ksp) { ierr = NEPGetKSP(nep,&nep->ksp);CHKERRQ(ierr); }
-  ierr = KSPSetOptionsPrefix(nep->ksp,prefix);CHKERRQ(ierr);
-  ierr = KSPAppendOptionsPrefix(nep->ksp,"nep_");CHKERRQ(ierr);
   ierr = PetscObjectAppendOptionsPrefix((PetscObject)nep,prefix);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -957,7 +1119,8 @@ PetscErrorCode NEPAppendOptionsPrefix(NEP nep,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
diff --git a/src/nep/interface/nepopts.c.html b/src/nep/interface/nepopts.c.html
index 4ada89a..55a65af 100644
--- a/src/nep/interface/nepopts.c.html
+++ b/src/nep/interface/nepopts.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepopts.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:15+00:00">
+<meta name="date" content="2016-05-16T10:34:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepopts.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepopts.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> routines related to options that can be set via the command-line</font>
 <a name="line3">  3: </a><font color="#B22222">      or procedurally.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,855 +35,1004 @@
 <a name="line23"> 23: </a><font color="#B22222">*/</font>
 
 <a name="line25"> 25: </a><font color="#A020F0">#include <slepc/private/nepimpl.h>       </font><font color="#B22222">/*I "slepcnep.h" I*/</font><font color="#A020F0"></font>
+<a name="line26"> 26: </a><font color="#A020F0">#include <petscdraw.h></font>
 
-<a name="line29"> 29: </a><font color="#B22222">/*@</font>
-<a name="line30"> 30: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a> - Sets <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options from the options database.</font>
-<a name="line31"> 31: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>() if the user is to be</font>
-<a name="line32"> 32: </a><font color="#B22222">   allowed to set the solver type.</font>
+<a name="line30"> 30: </a><font color="#B22222">/*@C</font>
+<a name="line31"> 31: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line32"> 32: </a><font color="#B22222">   indicated by the user.</font>
 
 <a name="line34"> 34: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
 
 <a name="line36"> 36: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line37"> 37: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line39"> 39: </a><font color="#B22222">   Notes:</font>
-<a name="line40"> 40: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line42"> 42: </a><font color="#B22222">   Level: beginner</font>
-<a name="line43"> 43: </a><font color="#B22222">@*/</font>
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line45"> 45: </a>{
-<a name="line46"> 46: </a>  PetscErrorCode   ierr;
-<a name="line47"> 47: </a>  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-<a name="line48"> 48: </a>  PetscBool        flg,flg1,flg2,flg3,flg4,flg5;
-<a name="line49"> 49: </a>  PetscReal        r1,r2,r3;
-<a name="line50"> 50: </a>  PetscScalar      s;
-<a name="line51"> 51: </a>  PetscInt         i,j,k;
-<a name="line52"> 52: </a>  PetscViewer      monviewer;
-<a name="line53"> 53: </a>  SlepcConvMonitor ctx;
-
-<a name="line57"> 57: </a>  <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>();
-<a name="line58"> 58: </a>  PetscObjectOptionsBegin((PetscObject)nep);
-<a name="line59"> 59: </a>    PetscOptionsFList(<font color="#666666">"-nep_type"</font>,<font color="#666666">"Nonlinear Eigenvalue Problem method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>"</font>,NEPList,(char*)(((PetscObject)nep)->type_name?((PetscObject)nep)->type_name:NEPRII),type,256,&flg);
-<a name="line60"> 60: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line61"> 61: </a>      <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,type);
-<a name="line62"> 62: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!((PetscObject)nep)->type_name) {
-<a name="line63"> 63: </a>      <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,NEPRII);
+<a name="line37"> 37: </a><font color="#B22222">+  nep      - the nonlinear eigensolver context</font>
+<a name="line38"> 38: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line39"> 39: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line40"> 40: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line41"> 41: </a><font color="#B22222">.  monitor  - the monitor function, whose context is a PetscViewerAndFormat</font>
+<a name="line42"> 42: </a><font color="#B22222">-  trackall - whether this monitor tracks all eigenvalues or not</font>
+
+<a name="line44"> 44: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line46"> 46: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(), <a href="../../../docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html#NEPConvMonitorSetFromOptions">NEPConvMonitorSetFromOptions</a>()</font>
+<a name="line47"> 47: </a><font color="#B22222">@*/</font>
+<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="NEPMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscR [...]
+<a name="line49"> 49: </a>{
+<a name="line50"> 50: </a>  PetscErrorCode       ierr;
+<a name="line51"> 51: </a>  PetscBool            flg;
+<a name="line52"> 52: </a>  PetscViewer          viewer;
+<a name="line53"> 53: </a>  PetscViewerFormat    format;
+<a name="line54"> 54: </a>  PetscViewerAndFormat *vf;
+
+<a name="line57"> 57: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,name,&viewer,&format,&flg);
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line59"> 59: </a>    PetscViewerAndFormatCreate(viewer,format,&vf);
+<a name="line60"> 60: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line61"> 61: </a>    <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,(PetscErrorCode (*)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line62"> 62: </a>    <font color="#4169E1">if</font> (trackall) {
+<a name="line63"> 63: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(nep,PETSC_TRUE);
 <a name="line64"> 64: </a>    }
-
-<a name="line66"> 66: </a>    PetscOptionsEnum(<font color="#666666">"-nep_refine"</font>,<font color="#666666">"Iterative refinement method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,NEPRefineTypes,(PetscEnum)nep->refine,(PetscEnum*)&nep->refine,NULL);
-
-<a name="line68"> 68: </a>    i = nep->npart;
-<a name="line69"> 69: </a>    PetscOptionsInt(<font color="#666666">"-nep_refine_partitions"</font>,<font color="#666666">"Number of partitions of the communicator for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,nep->npart,&i,&flg1);
-<a name="line70"> 70: </a>    r1 = nep->reftol;
-<a name="line71"> 71: </a>    PetscOptionsReal(<font color="#666666">"-nep_refine_tol"</font>,<font color="#666666">"Tolerance for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,nep->reftol,&r1,&flg2);
-<a name="line72"> 72: </a>    j = nep->rits;
-<a name="line73"> 73: </a>    PetscOptionsInt(<font color="#666666">"-nep_refine_its"</font>,<font color="#666666">"Maximum number of iterations for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,nep->rits,&j,&flg3);
-<a name="line74"> 74: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line75"> 75: </a>      <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>(nep,nep->refine,i,r1,j);
-<a name="line76"> 76: </a>    }
-
-<a name="line78"> 78: </a>    i = nep->max_it? nep->max_it: PETSC_DEFAULT;
-<a name="line79"> 79: </a>    PetscOptionsInt(<font color="#666666">"-nep_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->max_it,&i,&flg1);
-<a name="line80"> 80: </a>    j = nep->max_funcs? nep->max_funcs: PETSC_DEFAULT;
-<a name="line81"> 81: </a>    PetscOptionsInt(<font color="#666666">"-nep_max_funcs"</font>,<font color="#666666">"Maximum number of function evaluations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->max_funcs,&j,&flg2);
-<a name="line82"> 82: </a>    r1 = nep->abstol;
-<a name="line83"> 83: </a>    PetscOptionsReal(<font color="#666666">"-nep_atol"</font>,<font color="#666666">"Absolute tolerance for residual norm"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->abstol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->abstol,&r1,&flg3);
-<a name="line84"> 84: </a>    r2 = nep->rtol;
-<a name="line85"> 85: </a>    PetscOptionsReal(<font color="#666666">"-nep_rtol"</font>,<font color="#666666">"Relative tolerance for residual norm"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->rtol,&r2,&flg4);
-<a name="line86"> 86: </a>    r3 = nep->stol;
-<a name="line87"> 87: </a>    PetscOptionsReal(<font color="#666666">"-nep_stol"</font>,<font color="#666666">"Relative tolerance for step length"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->stol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->stol,&r3,&flg5);
-<a name="line88"> 88: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3 || flg4 || flg5) {
-<a name="line89"> 89: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(nep,r1,r2,r3,i,j);
-<a name="line90"> 90: </a>    }
-
-<a name="line92"> 92: </a>    flg  = PETSC_FALSE;
-<a name="line93"> 93: </a>    PetscOptionsBool(<font color="#666666">"-nep_convergence_default"</font>,<font color="#666666">"Default (relative error) convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>"</font>,flg,&flg,NULL);
-<a name="line94"> 94: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line95"> 95: </a>      <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(nep,NEPConvergedDefault,NULL,NULL);
-<a name="line96"> 96: </a>    }
-
-<a name="line98"> 98: </a>    i = nep->nev;
-<a name="line99"> 99: </a>    PetscOptionsInt(<font color="#666666">"-nep_nev"</font>,<font color="#666666">"Number of eigenvalues to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>"</font>,nep->nev,&i,&flg1);
-<a name="line100">100: </a>    j = nep->ncv? nep->ncv: PETSC_DEFAULT;
-<a name="line101">101: </a>    PetscOptionsInt(<font color="#666666">"-nep_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>"</font>,nep->ncv,&j,&flg2);
-<a name="line102">102: </a>    k = nep->mpd? nep->mpd: PETSC_DEFAULT;
-<a name="line103">103: </a>    PetscOptionsInt(<font color="#666666">"-nep_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>"</font>,nep->mpd,&k,&flg3);
-<a name="line104">104: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line105">105: </a>      <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(nep,i,j,k);
-<a name="line106">106: </a>    }
-
-<a name="line108">108: </a>    i = 0;
-<a name="line109">109: </a>    PetscOptionsInt(<font color="#666666">"-nep_lag_preconditioner"</font>,<font color="#666666">"Interval to rebuild preconditioner"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>"</font>,nep->lag,&i,&flg);
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>(nep,i); }
-
-<a name="line112">112: </a>    PetscOptionsBool(<font color="#666666">"-nep_const_correction_tol"</font>,<font color="#666666">"Constant correction tolerance for the linear solver"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</a>"</font>,nep->cctol,&nep->cctol,NULL);
-
-<a name="line114">114: </a>    PetscOptionsScalar(<font color="#666666">"-nep_target"</font>,<font color="#666666">"Value of the target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>"</font>,nep->target,&s,&flg);
-<a name="line115">115: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line116">116: </a>      <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_MAGNITUDE);
-<a name="line117">117: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(nep,s);
-<a name="line118">118: </a>    }
-
-<a name="line120">120: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-<a name="line121">121: </a>    <font color="#B22222">/*</font>
-<a name="line122">122: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>()</font>
-<a name="line123">123: </a><font color="#B22222">    */</font>
-<a name="line124">124: </a>    flg = PETSC_FALSE;
-<a name="line125">125: </a>    PetscOptionsBool(<font color="#666666">"-nep_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>"</font>,flg,&flg,NULL);
-<a name="line126">126: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line127">127: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(nep);
-<a name="line128">128: </a>    }
-<a name="line129">129: </a>    <font color="#B22222">/*</font>
-<a name="line130">130: </a><font color="#B22222">      Prints approximate eigenvalues and error estimates at each iteration</font>
-<a name="line131">131: </a><font color="#B22222">    */</font>
-<a name="line132">132: </a>    PetscOptionsString(<font color="#666666">"-nep_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line133">133: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line134">134: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)nep),monfilename,&monviewer);
-<a name="line135">135: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,<a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line136">136: </a>    }
-<a name="line137">137: </a>    PetscOptionsString(<font color="#666666">"-nep_monitor_conv"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line65"> 65: </a>  }
+<a name="line66"> 66: </a>  <font color="#4169E1">return</font>(0);
+<a name="line67"> 67: </a>}
+
+<a name="line71"> 71: </a><font color="#B22222">/*@C</font>
+<a name="line72"> 72: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html#NEPConvMonitorSetFromOptions">NEPConvMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line73"> 73: </a><font color="#B22222">   indicated by the user (for monitors that only show iteration numbers of convergence).</font>
+
+<a name="line75"> 75: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line77"> 77: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line78"> 78: </a><font color="#B22222">+  nep      - the nonlinear eigensolver context</font>
+<a name="line79"> 79: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line80"> 80: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line81"> 81: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line82"> 82: </a><font color="#B22222">-  monitor  - the monitor function, whose context is a SlepcConvMonitor</font>
+
+<a name="line84"> 84: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line86"> 86: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(), <a href="../../../docs/manualpages/NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</a>()</font>
+<a name="line87"> 87: </a><font color="#B22222">@*/</font>
+<a name="line88"> 88: </a><strong><font color="#4169E1"><a name="NEPConvMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html#NEPConvMonitorSetFromOptions">NEPConvMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,Pet [...]
+<a name="line89"> 89: </a>{
+<a name="line90"> 90: </a>  PetscErrorCode    ierr;
+<a name="line91"> 91: </a>  PetscBool         flg;
+<a name="line92"> 92: </a>  PetscViewer       viewer;
+<a name="line93"> 93: </a>  PetscViewerFormat format;
+<a name="line94"> 94: </a>  SlepcConvMonitor  ctx;
+
+<a name="line97"> 97: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,name,&viewer,&format,&flg);
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line99"> 99: </a>    <a href="../../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(viewer,format,&ctx);
+<a name="line100">100: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line101">101: </a>    <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,(PetscErrorCode (*)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))<a href="../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>);
+<a name="line102">102: </a>  }
+<a name="line103">103: </a>  <font color="#4169E1">return</font>(0);
+<a name="line104">104: </a>}
+
+<a name="line108">108: </a><font color="#B22222">/*@</font>
+<a name="line109">109: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a> - Sets <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options from the options database.</font>
+<a name="line110">110: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>() if the user is to be</font>
+<a name="line111">111: </a><font color="#B22222">   allowed to set the solver type.</font>
+
+<a name="line113">113: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line115">115: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line116">116: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line118">118: </a><font color="#B22222">   Notes:</font>
+<a name="line119">119: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line121">121: </a><font color="#B22222">   Level: beginner</font>
+<a name="line122">122: </a><font color="#B22222">@*/</font>
+<a name="line123">123: </a><strong><font color="#4169E1"><a name="NEPSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line124">124: </a>{
+<a name="line126">126: </a>  char           type[256];
+<a name="line127">127: </a>  PetscBool      set,flg,flg1,flg2,flg3;
+<a name="line128">128: </a>  PetscReal      r;
+<a name="line129">129: </a>  PetscScalar    s;
+<a name="line130">130: </a>  PetscInt       i,j,k;
+<a name="line131">131: </a>  PetscDrawLG    lg;
+
+<a name="line135">135: </a>  <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>();
+<a name="line136">136: </a>  PetscObjectOptionsBegin((PetscObject)nep);
+<a name="line137">137: </a>    PetscOptionsFList(<font color="#666666">"-nep_type"</font>,<font color="#666666">"Nonlinear Eigenvalue Problem method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>"</font>,NEPList,(char*)(((PetscObject)nep)->type_name?((PetscObject)nep)->type_name:NEPRII),type,256,&flg);
 <a name="line138">138: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line139">139: </a>      PetscNew(&ctx);
-<a name="line140">140: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)nep),monfilename,&ctx->viewer);
-<a name="line141">141: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,<a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
+<a name="line139">139: </a>      <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,type);
+<a name="line140">140: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!((PetscObject)nep)->type_name) {
+<a name="line141">141: </a>      <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,NEPRII);
 <a name="line142">142: </a>    }
-<a name="line143">143: </a>    PetscOptionsString(<font color="#666666">"-nep_monitor_all"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line144">144: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line145">145: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)nep),monfilename,&monviewer);
-<a name="line146">146: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,<a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line147">147: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(nep,PETSC_TRUE);
-<a name="line148">148: </a>    }
-<a name="line149">149: </a>    flg = PETSC_FALSE;
-<a name="line150">150: </a>    PetscOptionsBool(<font color="#666666">"-nep_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line151">151: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line152">152: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,NEPMonitorLG,NULL,NULL);
-<a name="line153">153: </a>    }
-<a name="line154">154: </a>    flg = PETSC_FALSE;
-<a name="line155">155: </a>    PetscOptionsBool(<font color="#666666">"-nep_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line156">156: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line157">157: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,NEPMonitorLGAll,NULL,NULL);
-<a name="line158">158: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(nep,PETSC_TRUE);
-<a name="line159">159: </a>    }
-<a name="line160">160: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-
-<a name="line162">162: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-nep_largest_magnitude"</font>,<font color="#666666">"compute largest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line163">163: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_LARGEST_MAGNITUDE); }
-<a name="line164">164: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_smallest_magnitude"</font>,<font color="#666666">"compute smallest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line165">165: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_SMALLEST_MAGNITUDE); }
-<a name="line166">166: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_largest_real"</font>,<font color="#666666">"compute largest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line167">167: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_LARGEST_REAL); }
-<a name="line168">168: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_smallest_real"</font>,<font color="#666666">"compute smallest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line169">169: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_SMALLEST_REAL); }
-<a name="line170">170: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_largest_imaginary"</font>,<font color="#666666">"compute largest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line171">171: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_LARGEST_IMAGINARY); }
-<a name="line172">172: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_smallest_imaginary"</font>,<font color="#666666">"compute smallest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line173">173: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_SMALLEST_IMAGINARY); }
-<a name="line174">174: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_target_magnitude"</font>,<font color="#666666">"compute nearest eigenvalues to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line175">175: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_MAGNITUDE); }
-<a name="line176">176: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_target_real"</font>,<font color="#666666">"compute eigenvalues with real parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line177">177: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_REAL); }
-<a name="line178">178: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-nep_target_imaginary"</font>,<font color="#666666">"compute eigenvalues with imaginary parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line179">179: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_IMAGINARY); }
-
-<a name="line181">181: </a>    PetscOptionsName(<font color="#666666">"-nep_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPView.html#NEPView">NEPView</a>"</font>,0);
-<a name="line182">182: </a>    PetscOptionsName(<font color="#666666">"-nep_view_vectors"</font>,<font color="#666666">"View computed eigenvectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>"</font>,0);
-<a name="line183">183: </a>    PetscOptionsName(<font color="#666666">"-nep_view_values"</font>,<font color="#666666">"View computed eigenvalues"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>"</font>,0);
-<a name="line184">184: </a>    PetscOptionsName(<font color="#666666">"-nep_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>"</font>,0);
-<a name="line185">185: </a>    PetscOptionsName(<font color="#666666">"-nep_error_absolute"</font>,<font color="#666666">"Print absolute errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>"</font>,0);
-<a name="line186">186: </a>    PetscOptionsName(<font color="#666666">"-nep_error_relative"</font>,<font color="#666666">"Print relative errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>"</font>,0);
-
-<a name="line188">188: </a>    <font color="#4169E1">if</font> (nep->ops->setfromoptions) {
-<a name="line189">189: </a>      (*nep->ops->setfromoptions)(PetscOptionsObject,nep);
-<a name="line190">190: </a>    }
-<a name="line191">191: </a>    PetscObjectProcessOptionsHandlers((PetscObject)nep);
-<a name="line192">192: </a>  PetscOptionsEnd();
-
-<a name="line194">194: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
-<a name="line195">195: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(nep->V);
-<a name="line196">196: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
-<a name="line197">197: </a>  <a href="../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(nep->rg);
-<a name="line198">198: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
-<a name="line199">199: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(nep->ds);
-<a name="line200">200: </a>  <font color="#4169E1">if</font> (!nep->ksp) { <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(nep,&nep->ksp); }
-<a name="line201">201: </a>  KSPSetOperators(nep->ksp,nep->function,nep->function_pre);
-<a name="line202">202: </a>  KSPSetFromOptions(nep->ksp);
-<a name="line203">203: </a>  PetscRandomSetFromOptions(nep->rand);
-<a name="line204">204: </a>  <font color="#4169E1">return</font>(0);
-<a name="line205">205: </a>}
-
-<a name="line209">209: </a><font color="#B22222">/*@</font>
-<a name="line210">210: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
-<a name="line211">211: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> convergence tests.</font>
-
-<a name="line213">213: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line215">215: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line216">216: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line218">218: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line219">219: </a><font color="#B22222">+  abstol - absolute convergence tolerance</font>
-<a name="line220">220: </a><font color="#B22222">.  rtol   - relative convergence tolerance</font>
-<a name="line221">221: </a><font color="#B22222">.  stol   - convergence tolerance in terms of the norm of the change in the</font>
-<a name="line222">222: </a><font color="#B22222">           solution between steps, || delta x || < stol*|| x ||</font>
-<a name="line223">223: </a><font color="#B22222">.  maxit  - maximum number of iterations</font>
-<a name="line224">224: </a><font color="#B22222">-  maxf   - maximum number of function evaluations</font>
-
-<a name="line226">226: </a><font color="#B22222">   Notes:</font>
-<a name="line227">227: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line229">229: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line231">231: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
-<a name="line232">232: </a><font color="#B22222">@*/</font>
-<a name="line233">233: </a><strong><font color="#4169E1"><a name="NEPGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *abstol,PetscReal *rtol,PetscReal *stol,PetscInt *maxit,PetscInt *maxf)</font></strong>
-<a name="line234">234: </a>{
-<a name="line237">237: </a>  <font color="#4169E1">if</font> (abstol) *abstol = nep->abstol;
-<a name="line238">238: </a>  <font color="#4169E1">if</font> (rtol)   *rtol   = nep->rtol;
-<a name="line239">239: </a>  <font color="#4169E1">if</font> (stol)   *stol   = nep->stol;
-<a name="line240">240: </a>  <font color="#4169E1">if</font> (maxit)  *maxit  = nep->max_it;
-<a name="line241">241: </a>  <font color="#4169E1">if</font> (maxf)   *maxf   = nep->max_funcs;
-<a name="line242">242: </a>  <font color="#4169E1">return</font>(0);
-<a name="line243">243: </a>}
-
-<a name="line247">247: </a><font color="#B22222">/*@</font>
-<a name="line248">248: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a> - Sets various parameters used in convergence tests.</font>
-
-<a name="line250">250: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line252">252: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line253">253: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
-<a name="line254">254: </a><font color="#B22222">.  abstol - absolute convergence tolerance</font>
-<a name="line255">255: </a><font color="#B22222">.  rtol   - relative convergence tolerance</font>
-<a name="line256">256: </a><font color="#B22222">.  stol   - convergence tolerance in terms of the norm of the change in the</font>
-<a name="line257">257: </a><font color="#B22222">            solution between steps, || delta x || < stol*|| x ||</font>
-<a name="line258">258: </a><font color="#B22222">.  maxit  - maximum number of iterations</font>
-<a name="line259">259: </a><font color="#B22222">-  maxf   - maximum number of function evaluations</font>
-
-<a name="line261">261: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line262">262: </a><font color="#B22222">+    -nep_atol <abstol> - Sets abstol</font>
-<a name="line263">263: </a><font color="#B22222">.    -nep_rtol <rtol> - Sets rtol</font>
-<a name="line264">264: </a><font color="#B22222">.    -nep_stol <stol> - Sets stol</font>
-<a name="line265">265: </a><font color="#B22222">.    -nep_max_it <maxit> - Sets maxit</font>
-<a name="line266">266: </a><font color="#B22222">-    -nep_max_funcs <maxf> - Sets maxf</font>
-
-<a name="line268">268: </a><font color="#B22222">   Notes:</font>
-<a name="line269">269: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
-
-<a name="line271">271: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line273">273: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>()</font>
-<a name="line274">274: </a><font color="#B22222">@*/</font>
-<a name="line275">275: </a><strong><font color="#4169E1"><a name="NEPSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal abstol,PetscReal rtol,PetscReal stol,PetscInt maxit,PetscInt maxf)</font></strong>
-<a name="line276">276: </a>{
-<a name="line284">284: </a>  <font color="#4169E1">if</font> (abstol == PETSC_DEFAULT) {
-<a name="line285">285: </a>    nep->abstol = PETSC_DEFAULT;
-<a name="line286">286: </a>  } <font color="#4169E1">else</font> {
-<a name="line287">287: </a>    <font color="#4169E1">if</font> (abstol < 0.0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Absolute tolerance %g must be non-negative"</font>,(double)abstol);
-<a name="line288">288: </a>    nep->abstol = abstol;
-<a name="line289">289: </a>  }
-<a name="line290">290: </a>  <font color="#4169E1">if</font> (rtol == PETSC_DEFAULT) {
-<a name="line291">291: </a>    nep->rtol = PETSC_DEFAULT;
-<a name="line292">292: </a>  } <font color="#4169E1">else</font> {
-<a name="line293">293: </a>    <font color="#4169E1">if</font> (rtol < 0.0 || 1.0 <= rtol) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Relative tolerance %g must be non-negative and less than 1.0"</font>,(double)rtol);
-<a name="line294">294: </a>    nep->rtol = rtol;
-<a name="line295">295: </a>  }
-<a name="line296">296: </a>  <font color="#4169E1">if</font> (stol == PETSC_DEFAULT) {
-<a name="line297">297: </a>    nep->stol = PETSC_DEFAULT;
-<a name="line298">298: </a>  } <font color="#4169E1">else</font> {
-<a name="line299">299: </a>    <font color="#4169E1">if</font> (stol < 0.0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Step tolerance %g must be non-negative"</font>,(double)stol);
-<a name="line300">300: </a>    nep->stol = stol;
-<a name="line301">301: </a>  }
-<a name="line302">302: </a>  <font color="#4169E1">if</font> (maxit == PETSC_DEFAULT || maxit == PETSC_DECIDE) {
-<a name="line303">303: </a>    nep->max_it = 0;
-<a name="line304">304: </a>    nep->state = NEP_STATE_INITIAL;
-<a name="line305">305: </a>  } <font color="#4169E1">else</font> {
-<a name="line306">306: </a>    <font color="#4169E1">if</font> (maxit < 0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Maximum number of iterations %D must be non-negative"</font>,maxit);
-<a name="line307">307: </a>    nep->max_it = maxit;
-<a name="line308">308: </a>  }
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (maxf == PETSC_DEFAULT || maxf == PETSC_DECIDE) {
-<a name="line310">310: </a>    nep->max_it = 0;
-<a name="line311">311: </a>    nep->state = NEP_STATE_INITIAL;
-<a name="line312">312: </a>  } <font color="#4169E1">else</font> {
-<a name="line313">313: </a>    <font color="#4169E1">if</font> (maxf < 0) SETERRQ1(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Maximum number of function evaluations %D must be non-negative"</font>,maxf);
-<a name="line314">314: </a>    nep->max_funcs = maxf;
-<a name="line315">315: </a>  }
-<a name="line316">316: </a>  <font color="#4169E1">return</font>(0);
-<a name="line317">317: </a>}
-
-<a name="line321">321: </a><font color="#B22222">/*@</font>
-<a name="line322">322: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a> - Gets the number of eigenvalues to compute</font>
-<a name="line323">323: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line325">325: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line327">327: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line328">328: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line330">330: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line331">331: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
-<a name="line332">332: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line333">333: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line335">335: </a><font color="#B22222">   Notes:</font>
-<a name="line336">336: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line338">338: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line340">340: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>()</font>
-<a name="line341">341: </a><font color="#B22222">@*/</font>
-<a name="line342">342: </a><strong><font color="#4169E1"><a name="NEPGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line343">343: </a>{
-<a name="line346">346: </a>  <font color="#4169E1">if</font> (nev) *nev = nep->nev;
-<a name="line347">347: </a>  <font color="#4169E1">if</font> (ncv) *ncv = nep->ncv;
-<a name="line348">348: </a>  <font color="#4169E1">if</font> (mpd) *mpd = nep->mpd;
-<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
-<a name="line350">350: </a>}
-
-<a name="line354">354: </a><font color="#B22222">/*@</font>
-<a name="line355">355: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a> - Sets the number of eigenvalues to compute</font>
-<a name="line356">356: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line358">358: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line360">360: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line361">361: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line362">362: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
-<a name="line363">363: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line364">364: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line366">366: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line367">367: </a><font color="#B22222">+  -nep_nev <nev> - Sets the number of eigenvalues</font>
-<a name="line368">368: </a><font color="#B22222">.  -nep_ncv <ncv> - Sets the dimension of the subspace</font>
-<a name="line369">369: </a><font color="#B22222">-  -nep_mpd <mpd> - Sets the maximum projected dimension</font>
-
-<a name="line371">371: </a><font color="#B22222">   Notes:</font>
-<a name="line372">372: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
-<a name="line373">373: </a><font color="#B22222">   dependent on the solution method.</font>
-
-<a name="line375">375: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
-<a name="line376">376: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
-<a name="line377">377: </a><font color="#B22222">   (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and</font>
-<a name="line378">378: </a><font color="#B22222">   (b) in cases where nev is large, the user sets mpd.</font>
-
-<a name="line380">380: </a><font color="#B22222">   The value of ncv should always be between nev and (nev+mpd), typically</font>
-<a name="line381">381: </a><font color="#B22222">   ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise</font>
-<a name="line382">382: </a><font color="#B22222">   a smaller value should be used.</font>
-
-<a name="line384">384: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line386">386: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>()</font>
-<a name="line387">387: </a><font color="#B22222">@*/</font>
-<a name="line388">388: </a><strong><font color="#4169E1"><a name="NEPSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
-<a name="line389">389: </a>{
-<a name="line395">395: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
-<a name="line396">396: </a>  nep->nev = nev;
-<a name="line397">397: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
-<a name="line398">398: </a>    nep->ncv = 0;
-<a name="line399">399: </a>  } <font color="#4169E1">else</font> {
-<a name="line400">400: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
-<a name="line401">401: </a>    nep->ncv = ncv;
-<a name="line402">402: </a>  }
-<a name="line403">403: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
-<a name="line404">404: </a>    nep->mpd = 0;
-<a name="line405">405: </a>  } <font color="#4169E1">else</font> {
-<a name="line406">406: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
-<a name="line407">407: </a>    nep->mpd = mpd;
-<a name="line408">408: </a>  }
-<a name="line409">409: </a>  nep->state = NEP_STATE_INITIAL;
-<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
-<a name="line411">411: </a>}
-
-<a name="line415">415: </a><font color="#B22222">/*@</font>
-<a name="line416">416: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a> - Specifies which portion of the spectrum is</font>
-<a name="line417">417: </a><font color="#B22222">    to be sought.</font>
-
-<a name="line419">419: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line421">421: </a><font color="#B22222">    Input Parameters:</font>
-<a name="line422">422: </a><font color="#B22222">+   nep   - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-<a name="line423">423: </a><font color="#B22222">-   which - the portion of the spectrum to be sought</font>
-
-<a name="line425">425: </a><font color="#B22222">    Possible values:</font>
-<a name="line426">426: </a><font color="#B22222">    The parameter 'which' can have one of these values</font>
-
-<a name="line428">428: </a><font color="#B22222">+     NEP_LARGEST_MAGNITUDE - largest eigenvalues in magnitude (default)</font>
-<a name="line429">429: </a><font color="#B22222">.     NEP_SMALLEST_MAGNITUDE - smallest eigenvalues in magnitude</font>
-<a name="line430">430: </a><font color="#B22222">.     NEP_LARGEST_REAL - largest real parts</font>
-<a name="line431">431: </a><font color="#B22222">.     NEP_SMALLEST_REAL - smallest real parts</font>
-<a name="line432">432: </a><font color="#B22222">.     NEP_LARGEST_IMAGINARY - largest imaginary parts</font>
-<a name="line433">433: </a><font color="#B22222">.     NEP_SMALLEST_IMAGINARY - smallest imaginary parts</font>
-<a name="line434">434: </a><font color="#B22222">.     NEP_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)</font>
-<a name="line435">435: </a><font color="#B22222">.     NEP_TARGET_REAL - eigenvalues with real part closest to target</font>
-<a name="line436">436: </a><font color="#B22222">-     NEP_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target</font>
-
-<a name="line438">438: </a><font color="#B22222">    Options Database Keys:</font>
-<a name="line439">439: </a><font color="#B22222">+   -nep_largest_magnitude - Sets largest eigenvalues in magnitude</font>
-<a name="line440">440: </a><font color="#B22222">.   -nep_smallest_magnitude - Sets smallest eigenvalues in magnitude</font>
-<a name="line441">441: </a><font color="#B22222">.   -nep_largest_real - Sets largest real parts</font>
-<a name="line442">442: </a><font color="#B22222">.   -nep_smallest_real - Sets smallest real parts</font>
-<a name="line443">443: </a><font color="#B22222">.   -nep_largest_imaginary - Sets largest imaginary parts</font>
-<a name="line444">444: </a><font color="#B22222">.   -nep_smallest_imaginary - Sets smallest imaginary parts</font>
-<a name="line445">445: </a><font color="#B22222">.   -nep_target_magnitude - Sets eigenvalues closest to target</font>
-<a name="line446">446: </a><font color="#B22222">.   -nep_target_real - Sets real parts closest to target</font>
-<a name="line447">447: </a><font color="#B22222">-   -nep_target_imaginary - Sets imaginary parts closest to target</font>
-
-<a name="line449">449: </a><font color="#B22222">    Notes:</font>
-<a name="line450">450: </a><font color="#B22222">    Not all eigensolvers implemented in <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> account for all the possible values</font>
-<a name="line451">451: </a><font color="#B22222">    stated above. If SLEPc is compiled for real numbers NEP_LARGEST_IMAGINARY</font>
-<a name="line452">452: </a><font color="#B22222">    and NEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part</font>
-<a name="line453">453: </a><font color="#B22222">    for eigenvalue selection.</font>
-
-<a name="line455">455: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line457">457: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a></font>
-<a name="line458">458: </a><font color="#B22222">@*/</font>
-<a name="line459">459: </a><strong><font color="#4169E1"><a name="NEPSetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a> which)</font></strong>
-<a name="line460">460: </a>{
-<a name="line464">464: </a>  <font color="#4169E1">switch</font> (which) {
-<a name="line465">465: </a>    <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
-<a name="line466">466: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
-<a name="line467">467: </a>    <font color="#4169E1">case</font> NEP_LARGEST_REAL:
-<a name="line468">468: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
-<a name="line469">469: </a>    <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
-<a name="line470">470: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
-<a name="line471">471: </a>    <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
-<a name="line472">472: </a>    <font color="#4169E1">case</font> NEP_TARGET_REAL:
-<a name="line473">473: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line474">474: </a>    <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
-<a name="line475">475: </a><font color="#A020F0">#endif</font>
-<a name="line476">476: </a>      <font color="#4169E1">if</font> (nep->which != which) {
-<a name="line477">477: </a>        nep->state = NEP_STATE_INITIAL;
-<a name="line478">478: </a>        nep->which = which;
-<a name="line479">479: </a>      }
-<a name="line480">480: </a>      <font color="#4169E1">break</font>;
-<a name="line481">481: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line482">482: </a>      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' value"</font>);
-<a name="line483">483: </a>  }
-<a name="line484">484: </a>  <font color="#4169E1">return</font>(0);
-<a name="line485">485: </a>}
-
-<a name="line489">489: </a><font color="#B22222">/*@</font>
-<a name="line490">490: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a> - Returns which portion of the spectrum is to be</font>
-<a name="line491">491: </a><font color="#B22222">    sought.</font>
-
-<a name="line493">493: </a><font color="#B22222">    Not Collective</font>
-
-<a name="line495">495: </a><font color="#B22222">    Input Parameter:</font>
-<a name="line496">496: </a><font color="#B22222">.   nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
-
-<a name="line498">498: </a><font color="#B22222">    Output Parameter:</font>
-<a name="line499">499: </a><font color="#B22222">.   which - the portion of the spectrum to be sought</font>
-
-<a name="line501">501: </a><font color="#B22222">    Notes:</font>
-<a name="line502">502: </a><font color="#B22222">    See <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>() for possible values of 'which'.</font>
-
-<a name="line504">504: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line506">506: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a></font>
-<a name="line507">507: </a><font color="#B22222">@*/</font>
-<a name="line508">508: </a><strong><font color="#4169E1"><a name="NEPGetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a> *which)</font></strong>
-<a name="line509">509: </a>{
-<a name="line513">513: </a>  *which = nep->which;
-<a name="line514">514: </a>  <font color="#4169E1">return</font>(0);
-<a name="line515">515: </a>}
-
-<a name="line519">519: </a><font color="#B22222">/*@</font>
-<a name="line520">520: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a> - Determines when the preconditioner is rebuilt in the</font>
-<a name="line521">521: </a><font color="#B22222">    nonlinear solve.</font>
-
-<a name="line523">523: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line525">525: </a><font color="#B22222">    Input Parameters:</font>
-<a name="line526">526: </a><font color="#B22222">+   nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line527">527: </a><font color="#B22222">-   lag - 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is</font>
-<a name="line528">528: </a><font color="#B22222">          computed within the nonlinear iteration, 2 means every second time</font>
-<a name="line529">529: </a><font color="#B22222">          the Jacobian is built, etc.</font>
-
-<a name="line531">531: </a><font color="#B22222">    Options Database Keys:</font>
-<a name="line532">532: </a><font color="#B22222">.   -nep_lag_preconditioner <lag></font>
-
-<a name="line534">534: </a><font color="#B22222">    Notes:</font>
-<a name="line535">535: </a><font color="#B22222">    The default is 1.</font>
-<a name="line536">536: </a><font color="#B22222">    The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.</font>
-
-<a name="line538">538: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line540">540: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetLagPreconditioner.html#NEPGetLagPreconditioner">NEPGetLagPreconditioner</a>()</font>
-<a name="line541">541: </a><font color="#B22222">@*/</font>
-<a name="line542">542: </a><strong><font color="#4169E1"><a name="NEPSetLagPreconditioner"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt lag)</font></strong>
-<a name="line543">543: </a>{
-<a name="line547">547: </a>  <font color="#4169E1">if</font> (lag<0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Lag must be non-negative"</font>);
-<a name="line548">548: </a>  nep->lag = lag;
-<a name="line549">549: </a>  <font color="#4169E1">return</font>(0);
-<a name="line550">550: </a>}
-
-<a name="line554">554: </a><font color="#B22222">/*@</font>
-<a name="line555">555: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPGetLagPreconditioner.html#NEPGetLagPreconditioner">NEPGetLagPreconditioner</a> - Indicates how often the preconditioner is rebuilt.</font>
-
-<a name="line557">557: </a><font color="#B22222">    Not Collective</font>
-
-<a name="line559">559: </a><font color="#B22222">    Input Parameter:</font>
-<a name="line560">560: </a><font color="#B22222">.   nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-
-<a name="line562">562: </a><font color="#B22222">    Output Parameter:</font>
-<a name="line563">563: </a><font color="#B22222">.   lag - the lag parameter</font>
-
-<a name="line565">565: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line567">567: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetLagPreconditioner.html#NEPSetLagPreconditioner">NEPSetLagPreconditioner</a>()</font>
-<a name="line568">568: </a><font color="#B22222">@*/</font>
-<a name="line569">569: </a><strong><font color="#4169E1"><a name="NEPGetLagPreconditioner"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetLagPreconditioner.html#NEPGetLagPreconditioner">NEPGetLagPreconditioner</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *lag)</font></strong>
-<a name="line570">570: </a>{
-<a name="line574">574: </a>  *lag = nep->lag;
-<a name="line575">575: </a>  <font color="#4169E1">return</font>(0);
-<a name="line576">576: </a>}
-
-<a name="line580">580: </a><font color="#B22222">/*@</font>
-<a name="line581">581: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</a> - Sets a flag to keep the tolerance used</font>
-<a name="line582">582: </a><font color="#B22222">    in the linear solver constant.</font>
-
-<a name="line584">584: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line586">586: </a><font color="#B22222">    Input Parameters:</font>
-<a name="line587">587: </a><font color="#B22222">+   nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line588">588: </a><font color="#B22222">-   cct - a boolean value</font>
-
-<a name="line590">590: </a><font color="#B22222">    Options Database Keys:</font>
-<a name="line591">591: </a><font color="#B22222">.   -nep_const_correction_tol <cct></font>
-
-<a name="line593">593: </a><font color="#B22222">    Notes:</font>
-<a name="line594">594: </a><font color="#B22222">    By default, an exponentially decreasing tolerance is set in the KSP used</font>
-<a name="line595">595: </a><font color="#B22222">    within the nonlinear iteration, so that each Newton iteration requests</font>
-<a name="line596">596: </a><font color="#B22222">    better accuracy than the previous one. The constant correction tolerance</font>
-<a name="line597">597: </a><font color="#B22222">    flag stops this behaviour.</font>
-
-<a name="line599">599: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line601">601: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetConstCorrectionTol.html#NEPGetConstCorrectionTol">NEPGetConstCorrectionTol</a>()</font>
-<a name="line602">602: </a><font color="#B22222">@*/</font>
-<a name="line603">603: </a><strong><font color="#4169E1"><a name="NEPSetConstCorrectionTol"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool cct)</font></strong>
-<a name="line604">604: </a>{
-<a name="line608">608: </a>  nep->cctol = cct;
-<a name="line609">609: </a>  <font color="#4169E1">return</font>(0);
-<a name="line610">610: </a>}
-
-<a name="line614">614: </a><font color="#B22222">/*@</font>
-<a name="line615">615: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPGetConstCorrectionTol.html#NEPGetConstCorrectionTol">NEPGetConstCorrectionTol</a> - Returns the constant tolerance flag.</font>
-
-<a name="line617">617: </a><font color="#B22222">    Not Collective</font>
-
-<a name="line619">619: </a><font color="#B22222">    Input Parameter:</font>
-<a name="line620">620: </a><font color="#B22222">.   nep - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-
-<a name="line622">622: </a><font color="#B22222">    Output Parameter:</font>
-<a name="line623">623: </a><font color="#B22222">.   cct - the value of the constant tolerance flag</font>
-
-<a name="line625">625: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line627">627: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetConstCorrectionTol.html#NEPSetConstCorrectionTol">NEPSetConstCorrectionTol</a>()</font>
-<a name="line628">628: </a><font color="#B22222">@*/</font>
-<a name="line629">629: </a><strong><font color="#4169E1"><a name="NEPGetConstCorrectionTol"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetConstCorrectionTol.html#NEPGetConstCorrectionTol">NEPGetConstCorrectionTol</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *cct)</font></strong>
-<a name="line630">630: </a>{
-<a name="line634">634: </a>  *cct = nep->cctol;
-<a name="line635">635: </a>  <font color="#4169E1">return</font>(0);
-<a name="line636">636: </a>}
-
-<a name="line640">640: </a><font color="#B22222">/*@C</font>
-<a name="line641">641: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a> - Sets the function to be used to test convergence</font>
-<a name="line642">642: </a><font color="#B22222">    of the nonlinear iterative solution.</font>
-
-<a name="line644">644: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line646">646: </a><font color="#B22222">    Input Parameters:</font>
-<a name="line647">647: </a><font color="#B22222">+   nep     - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line648">648: </a><font color="#B22222">.   func    - a pointer to the convergence test function</font>
-<a name="line649">649: </a><font color="#B22222">.   ctx     - [optional] context for private data for the convergence routine</font>
-<a name="line650">650: </a><font color="#B22222">              (may be NULL)</font>
-<a name="line651">651: </a><font color="#B22222">-   destroy - [optional] destructor for the context (may be NULL;</font>
-<a name="line652">652: </a><font color="#B22222">              PETSC_NULL_FUNCTION in Fortran)</font>
-
-<a name="line654">654: </a><font color="#B22222">    Calling Sequence of func:</font>
-<a name="line655">655: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> reason*,void *fctx)</font>
-
-<a name="line657">657: </a><font color="#B22222">+   nep    - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line658">658: </a><font color="#B22222">.   it     - iteration number</font>
-<a name="line659">659: </a><font color="#B22222">.   xnorm  - norm of the current solution</font>
-<a name="line660">660: </a><font color="#B22222">.   snorm  - norm of the step (difference between two consecutive solutions)</font>
-<a name="line661">661: </a><font color="#B22222">.   fnorm  - norm of the function (residual)</font>
-<a name="line662">662: </a><font color="#B22222">.   reason - (output) result of the convergence test</font>
-<a name="line663">663: </a><font color="#B22222">-   fctx   - optional context, as set by <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>()</font>
-
-<a name="line665">665: </a><font color="#B22222">    Level: advanced</font>
-
-<a name="line667">667: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
-<a name="line668">668: </a><font color="#B22222">@*/</font>
-<a name="line669">669: </a><strong><font color="#4169E1"><a name="NEPSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*func)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscReal,PetscReal,PetscReal,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason [...]
-<a name="line670">670: </a>{
-
-<a name="line675">675: </a>  <font color="#4169E1">if</font> (nep->convergeddestroy) {
-<a name="line676">676: </a>    (*nep->convergeddestroy)(nep->convergedctx);
-<a name="line677">677: </a>  }
-<a name="line678">678: </a>  nep->converged        = func;
-<a name="line679">679: </a>  nep->convergeddestroy = destroy;
-<a name="line680">680: </a>  nep->convergedctx     = ctx;
-<a name="line681">681: </a>  <font color="#4169E1">return</font>(0);
-<a name="line682">682: </a>}
-
-<a name="line686">686: </a><font color="#B22222">/*@</font>
-<a name="line687">687: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a> - Specifies if the solver must compute the residual of all</font>
-<a name="line688">688: </a><font color="#B22222">   approximate eigenpairs or not.</font>
-
-<a name="line690">690: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line692">692: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line693">693: </a><font color="#B22222">+  nep      - the eigensolver context</font>
-<a name="line694">694: </a><font color="#B22222">-  trackall - whether compute all residuals or not</font>
-
-<a name="line696">696: </a><font color="#B22222">   Notes:</font>
-<a name="line697">697: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver explicitly computes</font>
-<a name="line698">698: </a><font color="#B22222">   the residual for each eigenpair approximation. Computing the residual is</font>
-<a name="line699">699: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute the associated</font>
-<a name="line700">700: </a><font color="#B22222">   residual to the first unconverged eigenpair.</font>
-<a name="line701">701: </a><font color="#B22222">   The options '-nep_monitor_all' and '-nep_monitor_lg_all' automatically</font>
-<a name="line702">702: </a><font color="#B22222">   activate this option.</font>
-
-<a name="line704">704: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line706">706: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>()</font>
-<a name="line707">707: </a><font color="#B22222">@*/</font>
-<a name="line708">708: </a><strong><font color="#4169E1"><a name="NEPSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool trackall)</font></strong>
-<a name="line709">709: </a>{
-<a name="line713">713: </a>  nep->trackall = trackall;
-<a name="line714">714: </a>  <font color="#4169E1">return</font>(0);
-<a name="line715">715: </a>}
-
-<a name="line719">719: </a><font color="#B22222">/*@</font>
-<a name="line720">720: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
-<a name="line721">721: </a><font color="#B22222">   be computed or not.</font>
-
-<a name="line723">723: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line725">725: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line726">726: </a><font color="#B22222">.  nep - the eigensolver context</font>
-
-<a name="line728">728: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line729">729: </a><font color="#B22222">.  trackall - the returned flag</font>
-
-<a name="line731">731: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line733">733: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>()</font>
-<a name="line734">734: </a><font color="#B22222">@*/</font>
-<a name="line735">735: </a><strong><font color="#4169E1"><a name="NEPGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *trackall)</font></strong>
-<a name="line736">736: </a>{
-<a name="line740">740: </a>  *trackall = nep->trackall;
-<a name="line741">741: </a>  <font color="#4169E1">return</font>(0);
-<a name="line742">742: </a>}
-
-<a name="line746">746: </a><font color="#B22222">/*@</font>
-<a name="line747">747: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a> - Specifies the refinement type (and options) to be used</font>
-<a name="line748">748: </a><font color="#B22222">   after the solve.</font>
-
-<a name="line750">750: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line752">752: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line753">753: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
-<a name="line754">754: </a><font color="#B22222">.  refine - refinement type</font>
-<a name="line755">755: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
-<a name="line756">756: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
-<a name="line757">757: </a><font color="#B22222">-  its    - maximum number of refinement iterations</font>
-
-<a name="line759">759: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line760">760: </a><font color="#B22222">+  -nep_refine <type> - refinement type, one of <none,simple,multiple></font>
-<a name="line761">761: </a><font color="#B22222">.  -nep_refine_partitions <n> - the number of partitions</font>
-<a name="line762">762: </a><font color="#B22222">.  -nep_refine_tol <tol> - the tolerance</font>
-<a name="line763">763: </a><font color="#B22222">-  -nep_refine_its <its> - number of iterations</font>
-
-<a name="line765">765: </a><font color="#B22222">   Notes:</font>
-<a name="line766">766: </a><font color="#B22222">   By default, iterative refinement is disabled, since it may be very</font>
-<a name="line767">767: </a><font color="#B22222">   costly. There are two possible refinement strategies: simple and multiple.</font>
-<a name="line768">768: </a><font color="#B22222">   The simple approach performs iterative refinement on each of the</font>
-<a name="line769">769: </a><font color="#B22222">   converged eigenpairs individually, whereas the multiple strategy works</font>
-<a name="line770">770: </a><font color="#B22222">   with the invariant pair as a whole, refining all eigenpairs simultaneously.</font>
-<a name="line771">771: </a><font color="#B22222">   The latter may be required for the case of multiple eigenvalues.</font>
-
-<a name="line773">773: </a><font color="#B22222">   In some cases, especially when using direct solvers within the</font>
-<a name="line774">774: </a><font color="#B22222">   iterative refinement method, it may be helpful for improved scalability</font>
-<a name="line775">775: </a><font color="#B22222">   to split the communicator in several partitions. The npart parameter</font>
-<a name="line776">776: </a><font color="#B22222">   indicates how many partitions to use (defaults to 1).</font>
-
-<a name="line778">778: </a><font color="#B22222">   The tol and its parameters specify the stopping criterion. In the simple</font>
-<a name="line779">779: </a><font color="#B22222">   method, refinement continues until the residual of each eigenpair is</font>
-<a name="line780">780: </a><font color="#B22222">   below the tolerance (tol defaults to the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> tol, but may be set to a</font>
-<a name="line781">781: </a><font color="#B22222">   different value). In contrast, the multiple method simply performs its</font>
-<a name="line782">782: </a><font color="#B22222">   refinement iterations (just one by default).</font>
-
-<a name="line784">784: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line786">786: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a>()</font>
-<a name="line787">787: </a><font color="#B22222">@*/</font>
-<a name="line788">788: </a><strong><font color="#4169E1"><a name="NEPSetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a> refine,PetscInt npart,PetscReal tol,PetscInt its)</font></strong>
-<a name="line789">789: </a>{
-<a name="line791">791: </a>  PetscMPIInt    size;
-
-<a name="line799">799: </a>  nep->refine = refine;
-<a name="line800">800: </a>  <font color="#4169E1">if</font> (refine) {  <font color="#B22222">/* process parameters only if not REFINE_NONE */</font>
-<a name="line801">801: </a>    <font color="#4169E1">if</font> (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
-<a name="line802">802: </a>      nep->npart = 1;
-<a name="line803">803: </a>    } <font color="#4169E1">else</font> {
-<a name="line804">804: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)nep),&size);
-<a name="line805">805: </a>      <font color="#4169E1">if</font> (npart<1 || npart>size) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of npart"</font>);
-<a name="line806">806: </a>      nep->npart = npart;
-<a name="line807">807: </a>    }
-<a name="line808">808: </a>    <font color="#4169E1">if</font> (tol == PETSC_DEFAULT || tol == PETSC_DECIDE) {
-<a name="line809">809: </a>      nep->reftol = nep->rtol;
-<a name="line810">810: </a>    } <font color="#4169E1">else</font> {
-<a name="line811">811: </a>      <font color="#4169E1">if</font> (tol<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
-<a name="line812">812: </a>      nep->reftol = tol;
-<a name="line813">813: </a>    }
-<a name="line814">814: </a>    <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) {
-<a name="line815">815: </a>      nep->rits = PETSC_DEFAULT;
-<a name="line816">816: </a>    } <font color="#4169E1">else</font> {
-<a name="line817">817: </a>      <font color="#4169E1">if</font> (its<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of its. Must be >= 0"</font>);
-<a name="line818">818: </a>      nep->rits = its;
-<a name="line819">819: </a>    }
-<a name="line820">820: </a>  }
-<a name="line821">821: </a>  nep->state = NEP_STATE_INITIAL;
-<a name="line822">822: </a>  <font color="#4169E1">return</font>(0);
-<a name="line823">823: </a>}
-
-<a name="line827">827: </a><font color="#B22222">/*@</font>
-<a name="line828">828: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a> - Gets the refinement strategy used by the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object, and the</font>
-<a name="line829">829: </a><font color="#B22222">   associated parameters.</font>
-
-<a name="line831">831: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line833">833: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line834">834: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line836">836: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line837">837: </a><font color="#B22222">+  refine - refinement type</font>
-<a name="line838">838: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
-<a name="line839">839: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
-<a name="line840">840: </a><font color="#B22222">-  its    - maximum number of refinement iterations</font>
-
-<a name="line842">842: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line844">844: </a><font color="#B22222">   Note:</font>
-<a name="line845">845: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line847">847: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>()</font>
-<a name="line848">848: </a><font color="#B22222">@*/</font>
-<a name="line849">849: </a><strong><font color="#4169E1"><a name="NEPGetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a> *refine,PetscInt *npart,PetscReal *tol,PetscInt *its)</font></strong>
-<a name="line850">850: </a>{
-<a name="line853">853: </a>  <font color="#4169E1">if</font> (refine) *refine = nep->refine;
-<a name="line854">854: </a>  <font color="#4169E1">if</font> (npart)  *npart  = nep->npart;
-<a name="line855">855: </a>  <font color="#4169E1">if</font> (tol)    *tol    = nep->reftol;
-<a name="line856">856: </a>  <font color="#4169E1">if</font> (its)    *its    = nep->rits;
-<a name="line857">857: </a>  <font color="#4169E1">return</font>(0);
-<a name="line858">858: </a>}
-
-<a name="line862">862: </a><font color="#B22222">/*@C</font>
-<a name="line863">863: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line864">864: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options in the database.</font>
-
-<a name="line866">866: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line868">868: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line869">869: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line870">870: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> option requests</font>
-
-<a name="line872">872: </a><font color="#B22222">   Notes:</font>
-<a name="line873">873: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line874">874: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line875">875: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line877">877: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
-<a name="line878">878: </a><font color="#B22222">   different <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> contexts, one could call</font>
-<a name="line879">879: </a><font color="#B22222">.vb</font>
-<a name="line880">880: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(nep1,"neig1_")</font>
-<a name="line881">881: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(nep2,"neig2_")</font>
-<a name="line882">882: </a><font color="#B22222">.ve</font>
-
-<a name="line884">884: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line886">886: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>()</font>
-<a name="line887">887: </a><font color="#B22222">@*/</font>
-<a name="line888">888: </a><strong><font color="#4169E1"><a name="NEPSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char *prefix)</font></strong>
-<a name="line889">889: </a>{
-
-<a name="line894">894: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
-<a name="line895">895: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(nep->V,prefix);
-<a name="line896">896: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
-<a name="line897">897: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(nep->ds,prefix);
-<a name="line898">898: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
-<a name="line899">899: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(nep->rg,prefix);
-<a name="line900">900: </a>  <font color="#4169E1">if</font> (!nep->ksp) { <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(nep,&nep->ksp); }
-<a name="line901">901: </a>  KSPSetOptionsPrefix(nep->ksp,prefix);
-<a name="line902">902: </a>  KSPAppendOptionsPrefix(nep->ksp,<font color="#666666">"nep_"</font>);
-<a name="line903">903: </a>  PetscObjectSetOptionsPrefix((PetscObject)nep,prefix);
-<a name="line904">904: </a>  <font color="#4169E1">return</font>(0);
-<a name="line905">905: </a>}
-
-<a name="line909">909: </a><font color="#B22222">/*@C</font>
-<a name="line910">910: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line911">911: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options in the database.</font>
-
-<a name="line913">913: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line915">915: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line916">916: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line917">917: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> option requests</font>
-
-<a name="line919">919: </a><font color="#B22222">   Notes:</font>
-<a name="line920">920: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line921">921: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
-
-<a name="line923">923: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line925">925: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>()</font>
-<a name="line926">926: </a><font color="#B22222">@*/</font>
-<a name="line927">927: </a><strong><font color="#4169E1"><a name="NEPAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char *prefix)</font></strong>
-<a name="line928">928: </a>{
-
-<a name="line933">933: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
-<a name="line934">934: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(nep->V,prefix);
-<a name="line935">935: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
-<a name="line936">936: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(nep->ds,prefix);
-<a name="line937">937: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
-<a name="line938">938: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(nep->rg,prefix);
-<a name="line939">939: </a>  <font color="#4169E1">if</font> (!nep->ksp) { <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(nep,&nep->ksp); }
-<a name="line940">940: </a>  KSPSetOptionsPrefix(nep->ksp,prefix);
-<a name="line941">941: </a>  KSPAppendOptionsPrefix(nep->ksp,<font color="#666666">"nep_"</font>);
-<a name="line942">942: </a>  PetscObjectAppendOptionsPrefix((PetscObject)nep,prefix);
-<a name="line943">943: </a>  <font color="#4169E1">return</font>(0);
-<a name="line944">944: </a>}
-
-<a name="line948">948: </a><font color="#B22222">/*@C</font>
-<a name="line949">949: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line950">950: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options in the database.</font>
-
-<a name="line952">952: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line954">954: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line955">955: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line957">957: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line958">958: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
-
-<a name="line960">960: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line961">961: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
-
-<a name="line963">963: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line965">965: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>()</font>
-<a name="line966">966: </a><font color="#B22222">@*/</font>
-<a name="line967">967: </a><strong><font color="#4169E1"><a name="NEPGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char *prefix[])</font></strong>
-<a name="line968">968: </a>{
-
-<a name="line974">974: </a>  PetscObjectGetOptionsPrefix((PetscObject)nep,prefix);
-<a name="line975">975: </a>  <font color="#4169E1">return</font>(0);
-<a name="line976">976: </a>}
+
+<a name="line144">144: </a>    PetscOptionsEnum(<font color="#666666">"-nep_refine"</font>,<font color="#666666">"Iterative refinement method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,NEPRefineTypes,(PetscEnum)nep->refine,(PetscEnum*)&nep->refine,NULL);
+
+<a name="line146">146: </a>    i = nep->npart;
+<a name="line147">147: </a>    PetscOptionsInt(<font color="#666666">"-nep_refine_partitions"</font>,<font color="#666666">"Number of partitions of the communicator for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,nep->npart,&i,&flg1);
+<a name="line148">148: </a>    r = nep->rtol;
+<a name="line149">149: </a>    PetscOptionsReal(<font color="#666666">"-nep_refine_tol"</font>,<font color="#666666">"Tolerance for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,nep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/1000:nep->rtol,&r,&flg2);
+<a name="line150">150: </a>    j = nep->rits;
+<a name="line151">151: </a>    PetscOptionsInt(<font color="#666666">"-nep_refine_its"</font>,<font color="#666666">"Maximum number of iterations for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,nep->rits,&j,&flg3);
+<a name="line152">152: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line153">153: </a>      <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>(nep,nep->refine,i,r,j,nep->scheme);
+<a name="line154">154: </a>    }
+
+<a name="line156">156: </a>    PetscOptionsEnum(<font color="#666666">"-nep_refine_scheme"</font>,<font color="#666666">"Scheme used for linear systems within iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>"</font>,NEPRefineSchemes,(PetscEnum)nep->scheme,(PetscEnum*)&nep->scheme,NULL);
+
+<a name="line158">158: </a>    i = nep->max_it? nep->max_it: PETSC_DEFAULT;
+<a name="line159">159: </a>    PetscOptionsInt(<font color="#666666">"-nep_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->max_it,&i,&flg1);
+<a name="line160">160: </a>    r = nep->tol;
+<a name="line161">161: </a>    PetscOptionsReal(<font color="#666666">"-nep_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>"</font>,nep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:nep->tol,&r,&flg2);
+<a name="line162">162: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line163">163: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(nep,r,i);
+<a name="line164">164: </a>    }
+
+<a name="line166">166: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-nep_conv_rel"</font>,<font color="#666666">"Relative error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line167">167: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(nep,NEP_CONV_REL); }
+<a name="line168">168: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_conv_norm"</font>,<font color="#666666">"Convergence test relative to the matrix norms"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line169">169: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(nep,NEP_CONV_NORM); }
+<a name="line170">170: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_conv_abs"</font>,<font color="#666666">"Absolute error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line171">171: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(nep,NEP_CONV_ABS); }
+<a name="line172">172: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-nep_conv_user"</font>,<font color="#666666">"User-defined convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line173">173: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(nep,NEP_CONV_USER); }
+
+<a name="line175">175: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-nep_stop_basic"</font>,<font color="#666666">"Stop iteration if all eigenvalues converged or max_it reached"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>"</font>,&flg);
+<a name="line176">176: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(nep,NEP_STOP_BASIC); }
+<a name="line177">177: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-nep_stop_user"</font>,<font color="#666666">"User-defined stopping test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>"</font>,&flg);
+<a name="line178">178: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(nep,NEP_STOP_USER); }
+
+<a name="line180">180: </a>    i = nep->nev;
+<a name="line181">181: </a>    PetscOptionsInt(<font color="#666666">"-nep_nev"</font>,<font color="#666666">"Number of eigenvalues to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>"</font>,nep->nev,&i,&flg1);
+<a name="line182">182: </a>    j = nep->ncv? nep->ncv: PETSC_DEFAULT;
+<a name="line183">183: </a>    PetscOptionsInt(<font color="#666666">"-nep_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>"</font>,nep->ncv,&j,&flg2);
+<a name="line184">184: </a>    k = nep->mpd? nep->mpd: PETSC_DEFAULT;
+<a name="line185">185: </a>    PetscOptionsInt(<font color="#666666">"-nep_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>"</font>,nep->mpd,&k,&flg3);
+<a name="line186">186: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line187">187: </a>      <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(nep,i,j,k);
+<a name="line188">188: </a>    }
+
+<a name="line190">190: </a>    PetscOptionsScalar(<font color="#666666">"-nep_target"</font>,<font color="#666666">"Value of the target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>"</font>,nep->target,&s,&flg);
+<a name="line191">191: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line192">192: </a>      <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_MAGNITUDE);
+<a name="line193">193: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(nep,s);
+<a name="line194">194: </a>    }
+
+<a name="line196">196: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+<a name="line197">197: </a>    <font color="#B22222">/*</font>
+<a name="line198">198: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a>()</font>
+<a name="line199">199: </a><font color="#B22222">    */</font>
+<a name="line200">200: </a>    PetscOptionsBool(<font color="#666666">"-nep_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line201">201: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line202">202: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorCancel.html#NEPMonitorCancel">NEPMonitorCancel</a>(nep);
+<a name="line203">203: </a>    }
+<a name="line204">204: </a>    <font color="#B22222">/*</font>
+<a name="line205">205: </a><font color="#B22222">      Text monitors</font>
+<a name="line206">206: </a><font color="#B22222">    */</font>
+<a name="line207">207: </a>    <a href="../../../docs/manualpages/NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</a>(nep,<font color="#666666">"-nep_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NEPMonitorFirst">NEPMonitorFirst</a>"</font>,<a href="../../../docs/manualpages/NEP/NEPMonitorFirst.html#NE [...]
+<a name="line208">208: </a>    <a href="../../../docs/manualpages/NEP/NEPConvMonitorSetFromOptions.html#NEPConvMonitorSetFromOptions">NEPConvMonitorSetFromOptions</a>(nep,<font color="#666666">"-nep_monitor_conv"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorConverged.html#NEPMonitorConverged">NEPMonitorConverged</a>"</font>,<a href="../../../docs/manualpag [...]
+<a name="line209">209: </a>    <a href="../../../docs/manualpages/NEP/NEPMonitorSetFromOptions.html#NEPMonitorSetFromOptions">NEPMonitorSetFromOptions</a>(nep,<font color="#666666">"-nep_monitor_all"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMonitorAll</a>"</font>,<a href="../../../docs/manualpages/NEP/NEPMonitorAll.html#NEPMonitorAll">NEPMoni [...]
+<a name="line210">210: </a>    <font color="#B22222">/*</font>
+<a name="line211">211: </a><font color="#B22222">      Line graph monitors</font>
+<a name="line212">212: </a><font color="#B22222">    */</font>
+<a name="line213">213: </a>    PetscOptionsBool(<font color="#666666">"-nep_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line214">214: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line215">215: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorLGCreate.html#NEPMonitorLGCreate">NEPMonitorLGCreate</a>(PetscObjectComm((PetscObject)nep),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line216">216: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,NEPMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line217">217: </a>    }
+<a name="line218">218: </a>    PetscOptionsBool(<font color="#666666">"-nep_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line219">219: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line220">220: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorLGCreate.html#NEPMonitorLGCreate">NEPMonitorLGCreate</a>(PetscObjectComm((PetscObject)nep),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line221">221: </a>      <a href="../../../docs/manualpages/NEP/NEPMonitorSet.html#NEPMonitorSet">NEPMonitorSet</a>(nep,NEPMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line222">222: </a>      <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(nep,PETSC_TRUE);
+<a name="line223">223: </a>    }
+<a name="line224">224: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+
+<a name="line226">226: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-nep_largest_magnitude"</font>,<font color="#666666">"compute largest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line227">227: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_LARGEST_MAGNITUDE); }
+<a name="line228">228: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_smallest_magnitude"</font>,<font color="#666666">"compute smallest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line229">229: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_SMALLEST_MAGNITUDE); }
+<a name="line230">230: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_largest_real"</font>,<font color="#666666">"compute largest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line231">231: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_LARGEST_REAL); }
+<a name="line232">232: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_smallest_real"</font>,<font color="#666666">"compute smallest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line233">233: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_SMALLEST_REAL); }
+<a name="line234">234: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_largest_imaginary"</font>,<font color="#666666">"compute largest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line235">235: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_LARGEST_IMAGINARY); }
+<a name="line236">236: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_smallest_imaginary"</font>,<font color="#666666">"compute smallest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line237">237: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_SMALLEST_IMAGINARY); }
+<a name="line238">238: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_target_magnitude"</font>,<font color="#666666">"compute nearest eigenvalues to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line239">239: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_MAGNITUDE); }
+<a name="line240">240: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_target_real"</font>,<font color="#666666">"compute eigenvalues with real parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line241">241: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_REAL); }
+<a name="line242">242: </a>    PetscOptionsBoolGroup(<font color="#666666">"-nep_target_imaginary"</font>,<font color="#666666">"compute eigenvalues with imaginary parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line243">243: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_TARGET_IMAGINARY); }
+<a name="line244">244: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-nep_all"</font>,<font color="#666666">"compute all eigenvalues in a region"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line245">245: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(nep,NEP_ALL); }
+
+<a name="line247">247: </a>    PetscOptionsName(<font color="#666666">"-nep_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPView.html#NEPView">NEPView</a>"</font>,NULL);
+<a name="line248">248: </a>    PetscOptionsName(<font color="#666666">"-nep_view_vectors"</font>,<font color="#666666">"View computed eigenvectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>"</font>,NULL);
+<a name="line249">249: </a>    PetscOptionsName(<font color="#666666">"-nep_view_values"</font>,<font color="#666666">"View computed eigenvalues"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>"</font>,NULL);
+<a name="line250">250: </a>    PetscOptionsName(<font color="#666666">"-nep_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>"</font>,NULL);
+<a name="line251">251: </a>    PetscOptionsName(<font color="#666666">"-nep_error_absolute"</font>,<font color="#666666">"Print absolute errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>"</font>,NULL);
+<a name="line252">252: </a>    PetscOptionsName(<font color="#666666">"-nep_error_relative"</font>,<font color="#666666">"Print relative errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>"</font>,NULL);
+
+<a name="line254">254: </a>    <font color="#4169E1">if</font> (nep->ops->setfromoptions) {
+<a name="line255">255: </a>      (*nep->ops->setfromoptions)(PetscOptionsObject,nep);
+<a name="line256">256: </a>    }
+<a name="line257">257: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)nep);
+<a name="line258">258: </a>  PetscOptionsEnd();
+
+<a name="line260">260: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
+<a name="line261">261: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(nep->V);
+<a name="line262">262: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
+<a name="line263">263: </a>  <a href="../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(nep->rg);
+<a name="line264">264: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
+<a name="line265">265: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(nep->ds);
+<a name="line266">266: </a>  <font color="#4169E1">if</font> (!nep->refineksp) { <a href="../../../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a>(nep,&nep->refineksp); }
+<a name="line267">267: </a>  KSPSetFromOptions(nep->refineksp);
+<a name="line268">268: </a>  <font color="#4169E1">return</font>(0);
+<a name="line269">269: </a>}
+
+<a name="line273">273: </a><font color="#B22222">/*@</font>
+<a name="line274">274: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
+<a name="line275">275: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> convergence tests.</font>
+
+<a name="line277">277: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line279">279: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line280">280: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line282">282: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line283">283: </a><font color="#B22222">+  tol - the convergence tolerance</font>
+<a name="line284">284: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
+
+<a name="line286">286: </a><font color="#B22222">   Notes:</font>
+<a name="line287">287: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line289">289: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line291">291: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
+<a name="line292">292: </a><font color="#B22222">@*/</font>
+<a name="line293">293: </a><strong><font color="#4169E1"><a name="NEPGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line294">294: </a>{
+<a name="line297">297: </a>  <font color="#4169E1">if</font> (tol)    *tol    = nep->tol;
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (maxits) *maxits = nep->max_it;
+<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
+<a name="line300">300: </a>}
+
+<a name="line304">304: </a><font color="#B22222">/*@</font>
+<a name="line305">305: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
+<a name="line306">306: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> convergence tests.</font>
+
+<a name="line308">308: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line310">310: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line311">311: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line312">312: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
+<a name="line313">313: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
+
+<a name="line315">315: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line316">316: </a><font color="#B22222">+  -nep_tol <tol> - Sets the convergence tolerance</font>
+<a name="line317">317: </a><font color="#B22222">-  -nep_max_it <maxits> - Sets the maximum number of iterations allowed</font>
+
+<a name="line319">319: </a><font color="#B22222">   Notes:</font>
+<a name="line320">320: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
+
+<a name="line322">322: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line324">324: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetTolerances.html#NEPGetTolerances">NEPGetTolerances</a>()</font>
+<a name="line325">325: </a><font color="#B22222">@*/</font>
+<a name="line326">326: </a><strong><font color="#4169E1"><a name="NEPSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line327">327: </a>{
+<a name="line332">332: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
+<a name="line333">333: </a>    nep->tol   = PETSC_DEFAULT;
+<a name="line334">334: </a>    nep->state = NEP_STATE_INITIAL;
+<a name="line335">335: </a>  } <font color="#4169E1">else</font> {
+<a name="line336">336: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line337">337: </a>    nep->tol = tol;
+<a name="line338">338: </a>  }
+<a name="line339">339: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+<a name="line340">340: </a>    nep->max_it = 0;
+<a name="line341">341: </a>    nep->state  = NEP_STATE_INITIAL;
+<a name="line342">342: </a>  } <font color="#4169E1">else</font> {
+<a name="line343">343: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
+<a name="line344">344: </a>    nep->max_it = maxits;
+<a name="line345">345: </a>  }
+<a name="line346">346: </a>  <font color="#4169E1">return</font>(0);
+<a name="line347">347: </a>}
+
+<a name="line351">351: </a><font color="#B22222">/*@</font>
+<a name="line352">352: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a> - Gets the number of eigenvalues to compute</font>
+<a name="line353">353: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line355">355: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line357">357: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line358">358: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line360">360: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line361">361: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
+<a name="line362">362: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line363">363: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line365">365: </a><font color="#B22222">   Notes:</font>
+<a name="line366">366: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line368">368: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line370">370: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>()</font>
+<a name="line371">371: </a><font color="#B22222">@*/</font>
+<a name="line372">372: </a><strong><font color="#4169E1"><a name="NEPGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line373">373: </a>{
+<a name="line376">376: </a>  <font color="#4169E1">if</font> (nev) *nev = nep->nev;
+<a name="line377">377: </a>  <font color="#4169E1">if</font> (ncv) *ncv = nep->ncv;
+<a name="line378">378: </a>  <font color="#4169E1">if</font> (mpd) *mpd = nep->mpd;
+<a name="line379">379: </a>  <font color="#4169E1">return</font>(0);
+<a name="line380">380: </a>}
+
+<a name="line384">384: </a><font color="#B22222">/*@</font>
+<a name="line385">385: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a> - Sets the number of eigenvalues to compute</font>
+<a name="line386">386: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line388">388: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line390">390: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line391">391: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line392">392: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
+<a name="line393">393: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line394">394: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line396">396: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line397">397: </a><font color="#B22222">+  -nep_nev <nev> - Sets the number of eigenvalues</font>
+<a name="line398">398: </a><font color="#B22222">.  -nep_ncv <ncv> - Sets the dimension of the subspace</font>
+<a name="line399">399: </a><font color="#B22222">-  -nep_mpd <mpd> - Sets the maximum projected dimension</font>
+
+<a name="line401">401: </a><font color="#B22222">   Notes:</font>
+<a name="line402">402: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
+<a name="line403">403: </a><font color="#B22222">   dependent on the solution method.</font>
+
+<a name="line405">405: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
+<a name="line406">406: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
+<a name="line407">407: </a><font color="#B22222">   (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and</font>
+<a name="line408">408: </a><font color="#B22222">   (b) in cases where nev is large, the user sets mpd.</font>
+
+<a name="line410">410: </a><font color="#B22222">   The value of ncv should always be between nev and (nev+mpd), typically</font>
+<a name="line411">411: </a><font color="#B22222">   ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise</font>
+<a name="line412">412: </a><font color="#B22222">   a smaller value should be used.</font>
+
+<a name="line414">414: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line416">416: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetDimensions.html#NEPGetDimensions">NEPGetDimensions</a>()</font>
+<a name="line417">417: </a><font color="#B22222">@*/</font>
+<a name="line418">418: </a><strong><font color="#4169E1"><a name="NEPSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
+<a name="line419">419: </a>{
+<a name="line425">425: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
+<a name="line426">426: </a>  nep->nev = nev;
+<a name="line427">427: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
+<a name="line428">428: </a>    nep->ncv = 0;
+<a name="line429">429: </a>  } <font color="#4169E1">else</font> {
+<a name="line430">430: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
+<a name="line431">431: </a>    nep->ncv = ncv;
+<a name="line432">432: </a>  }
+<a name="line433">433: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
+<a name="line434">434: </a>    nep->mpd = 0;
+<a name="line435">435: </a>  } <font color="#4169E1">else</font> {
+<a name="line436">436: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
+<a name="line437">437: </a>    nep->mpd = mpd;
+<a name="line438">438: </a>  }
+<a name="line439">439: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
+
+<a name="line445">445: </a><font color="#B22222">/*@</font>
+<a name="line446">446: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a> - Specifies which portion of the spectrum is</font>
+<a name="line447">447: </a><font color="#B22222">    to be sought.</font>
+
+<a name="line449">449: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line451">451: </a><font color="#B22222">    Input Parameters:</font>
+<a name="line452">452: </a><font color="#B22222">+   nep   - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line453">453: </a><font color="#B22222">-   which - the portion of the spectrum to be sought</font>
+
+<a name="line455">455: </a><font color="#B22222">    Possible values:</font>
+<a name="line456">456: </a><font color="#B22222">    The parameter 'which' can have one of these values</font>
+
+<a name="line458">458: </a><font color="#B22222">+     NEP_LARGEST_MAGNITUDE - largest eigenvalues in magnitude (default)</font>
+<a name="line459">459: </a><font color="#B22222">.     NEP_SMALLEST_MAGNITUDE - smallest eigenvalues in magnitude</font>
+<a name="line460">460: </a><font color="#B22222">.     NEP_LARGEST_REAL - largest real parts</font>
+<a name="line461">461: </a><font color="#B22222">.     NEP_SMALLEST_REAL - smallest real parts</font>
+<a name="line462">462: </a><font color="#B22222">.     NEP_LARGEST_IMAGINARY - largest imaginary parts</font>
+<a name="line463">463: </a><font color="#B22222">.     NEP_SMALLEST_IMAGINARY - smallest imaginary parts</font>
+<a name="line464">464: </a><font color="#B22222">.     NEP_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)</font>
+<a name="line465">465: </a><font color="#B22222">.     NEP_TARGET_REAL - eigenvalues with real part closest to target</font>
+<a name="line466">466: </a><font color="#B22222">.     NEP_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target</font>
+<a name="line467">467: </a><font color="#B22222">.     NEP_ALL - all eigenvalues contained in a given region</font>
+<a name="line468">468: </a><font color="#B22222">-     NEP_WHICH_USER - user defined ordering set with <a href="../../../docs/manualpages/NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</a>()</font>
+
+<a name="line470">470: </a><font color="#B22222">    Options Database Keys:</font>
+<a name="line471">471: </a><font color="#B22222">+   -nep_largest_magnitude - Sets largest eigenvalues in magnitude</font>
+<a name="line472">472: </a><font color="#B22222">.   -nep_smallest_magnitude - Sets smallest eigenvalues in magnitude</font>
+<a name="line473">473: </a><font color="#B22222">.   -nep_largest_real - Sets largest real parts</font>
+<a name="line474">474: </a><font color="#B22222">.   -nep_smallest_real - Sets smallest real parts</font>
+<a name="line475">475: </a><font color="#B22222">.   -nep_largest_imaginary - Sets largest imaginary parts</font>
+<a name="line476">476: </a><font color="#B22222">.   -nep_smallest_imaginary - Sets smallest imaginary parts</font>
+<a name="line477">477: </a><font color="#B22222">.   -nep_target_magnitude - Sets eigenvalues closest to target</font>
+<a name="line478">478: </a><font color="#B22222">.   -nep_target_real - Sets real parts closest to target</font>
+<a name="line479">479: </a><font color="#B22222">.   -nep_target_imaginary - Sets imaginary parts closest to target</font>
+<a name="line480">480: </a><font color="#B22222">-   -nep_all - Sets all eigenvalues in a region</font>
+
+<a name="line482">482: </a><font color="#B22222">    Notes:</font>
+<a name="line483">483: </a><font color="#B22222">    Not all eigensolvers implemented in <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> account for all the possible values</font>
+<a name="line484">484: </a><font color="#B22222">    stated above. If SLEPc is compiled for real numbers NEP_LARGEST_IMAGINARY</font>
+<a name="line485">485: </a><font color="#B22222">    and NEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part</font>
+<a name="line486">486: </a><font color="#B22222">    for eigenvalue selection.</font>
+
+<a name="line488">488: </a><font color="#B22222">    The target is a scalar value provided with <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>().</font>
+
+<a name="line490">490: </a><font color="#B22222">    NEP_ALL is intended for use in the context of the CISS solver for</font>
+<a name="line491">491: </a><font color="#B22222">    computing all eigenvalues in a region.</font>
+
+<a name="line493">493: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line495">495: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTarget.html#NEPSetTarget">NEPSetTarget</a>(), <a href="../../../docs/manualpages/NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</a>(), <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a></font>
+<a name="line496">496: </a><font color="#B22222">@*/</font>
+<a name="line497">497: </a><strong><font color="#4169E1"><a name="NEPSetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a> which)</font></strong>
+<a name="line498">498: </a>{
+<a name="line502">502: </a>  <font color="#4169E1">switch</font> (which) {
+<a name="line503">503: </a>    <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
+<a name="line504">504: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
+<a name="line505">505: </a>    <font color="#4169E1">case</font> NEP_LARGEST_REAL:
+<a name="line506">506: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
+<a name="line507">507: </a>    <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
+<a name="line508">508: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
+<a name="line509">509: </a>    <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
+<a name="line510">510: </a>    <font color="#4169E1">case</font> NEP_TARGET_REAL:
+<a name="line511">511: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line512">512: </a>    <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
+<a name="line513">513: </a><font color="#A020F0">#endif</font>
+<a name="line514">514: </a>    <font color="#4169E1">case</font> EPS_ALL:
+<a name="line515">515: </a>    <font color="#4169E1">case</font> NEP_WHICH_USER:
+<a name="line516">516: </a>      <font color="#4169E1">if</font> (nep->which != which) {
+<a name="line517">517: </a>        nep->state = NEP_STATE_INITIAL;
+<a name="line518">518: </a>        nep->which = which;
+<a name="line519">519: </a>      }
+<a name="line520">520: </a>      <font color="#4169E1">break</font>;
+<a name="line521">521: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line522">522: </a>      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' value"</font>);
+<a name="line523">523: </a>  }
+<a name="line524">524: </a>  <font color="#4169E1">return</font>(0);
+<a name="line525">525: </a>}
+
+<a name="line529">529: </a><font color="#B22222">/*@</font>
+<a name="line530">530: </a><font color="#B22222">    <a href="../../../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a> - Returns which portion of the spectrum is to be</font>
+<a name="line531">531: </a><font color="#B22222">    sought.</font>
+
+<a name="line533">533: </a><font color="#B22222">    Not Collective</font>
+
+<a name="line535">535: </a><font color="#B22222">    Input Parameter:</font>
+<a name="line536">536: </a><font color="#B22222">.   nep - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line538">538: </a><font color="#B22222">    Output Parameter:</font>
+<a name="line539">539: </a><font color="#B22222">.   which - the portion of the spectrum to be sought</font>
+
+<a name="line541">541: </a><font color="#B22222">    Notes:</font>
+<a name="line542">542: </a><font color="#B22222">    See <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>() for possible values of 'which'.</font>
+
+<a name="line544">544: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line546">546: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a></font>
+<a name="line547">547: </a><font color="#B22222">@*/</font>
+<a name="line548">548: </a><strong><font color="#4169E1"><a name="NEPGetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetWhichEigenpairs.html#NEPGetWhichEigenpairs">NEPGetWhichEigenpairs</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a> *which)</font></strong>
+<a name="line549">549: </a>{
+<a name="line553">553: </a>  *which = nep->which;
+<a name="line554">554: </a>  <font color="#4169E1">return</font>(0);
+<a name="line555">555: </a>}
+
+<a name="line559">559: </a><font color="#B22222">/*@C</font>
+<a name="line560">560: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</a> - Specifies the eigenvalue comparison function</font>
+<a name="line561">561: </a><font color="#B22222">   when <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>() is set to NEP_WHICH_USER.</font>
+
+<a name="line563">563: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line565">565: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line566">566: </a><font color="#B22222">+  pep  - eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line567">567: </a><font color="#B22222">.  func - a pointer to the comparison function</font>
+<a name="line568">568: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the comparison function)</font>
+
+<a name="line570">570: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line571">571: </a><font color="#B22222">$   func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)</font>
+
+<a name="line573">573: </a><font color="#B22222">+   ar     - real part of the 1st eigenvalue</font>
+<a name="line574">574: </a><font color="#B22222">.   ai     - imaginary part of the 1st eigenvalue</font>
+<a name="line575">575: </a><font color="#B22222">.   br     - real part of the 2nd eigenvalue</font>
+<a name="line576">576: </a><font color="#B22222">.   bi     - imaginary part of the 2nd eigenvalue</font>
+<a name="line577">577: </a><font color="#B22222">.   res    - result of comparison</font>
+<a name="line578">578: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</a>()</font>
+
+<a name="line580">580: </a><font color="#B22222">   Note:</font>
+<a name="line581">581: </a><font color="#B22222">   The returning parameter 'res' can be:</font>
+<a name="line582">582: </a><font color="#B22222">+  negative - if the 1st eigenvalue is preferred to the 2st one</font>
+<a name="line583">583: </a><font color="#B22222">.  zero     - if both eigenvalues are equally preferred</font>
+<a name="line584">584: </a><font color="#B22222">-  positive - if the 2st eigenvalue is preferred to the 1st one</font>
+
+<a name="line586">586: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line588">588: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/NEP/NEPWhich.html#NEPWhich">NEPWhich</a></font>
+<a name="line589">589: </a><font color="#B22222">@*/</font>
+<a name="line590">590: </a><strong><font color="#4169E1"><a name="NEPSetEigenvalueComparison"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetEigenvalueComparison.html#NEPSetEigenvalueComparison">NEPSetEigenvalueComparison</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)</font></strong>
+<a name="line591">591: </a>{
+<a name="line594">594: </a>  pep->sc->comparison    = func;
+<a name="line595">595: </a>  pep->sc->comparisonctx = ctx;
+<a name="line596">596: </a>  pep->which             = NEP_WHICH_USER;
+<a name="line597">597: </a>  <font color="#4169E1">return</font>(0);
+<a name="line598">598: </a>}
+
+<a name="line602">602: </a><font color="#B22222">/*@C</font>
+<a name="line603">603: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a> - Sets a function to compute the error estimate</font>
+<a name="line604">604: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line606">606: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line608">608: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line609">609: </a><font color="#B22222">+  nep     - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line610">610: </a><font color="#B22222">.  func    - a pointer to the convergence test function</font>
+<a name="line611">611: </a><font color="#B22222">.  ctx     - context for private data for the convergence routine (may be null)</font>
+<a name="line612">612: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line614">614: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line615">615: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font>
+
+<a name="line617">617: </a><font color="#B22222">+   nep    - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line618">618: </a><font color="#B22222">.   eigr   - real part of the eigenvalue</font>
+<a name="line619">619: </a><font color="#B22222">.   eigi   - imaginary part of the eigenvalue</font>
+<a name="line620">620: </a><font color="#B22222">.   res    - residual norm associated to the eigenpair</font>
+<a name="line621">621: </a><font color="#B22222">.   errest - (output) computed error estimate</font>
+<a name="line622">622: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a>()</font>
+
+<a name="line624">624: </a><font color="#B22222">   Note:</font>
+<a name="line625">625: </a><font color="#B22222">   If the error estimate returned by the convergence test function is less than</font>
+<a name="line626">626: </a><font color="#B22222">   the tolerance, then the eigenvalue is accepted as converged.</font>
+
+<a name="line628">628: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line630">630: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
+<a name="line631">631: </a><font color="#B22222">@*/</font>
+<a name="line632">632: </a><strong><font color="#4169E1"><a name="NEPSetConvergenceTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*func)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)( [...]
+<a name="line633">633: </a>{
+
+<a name="line638">638: </a>  <font color="#4169E1">if</font> (nep->convergeddestroy) {
+<a name="line639">639: </a>    (*nep->convergeddestroy)(nep->convergedctx);
+<a name="line640">640: </a>  }
+<a name="line641">641: </a>  nep->converged        = func;
+<a name="line642">642: </a>  nep->convergeddestroy = destroy;
+<a name="line643">643: </a>  nep->convergedctx     = ctx;
+<a name="line644">644: </a>  <font color="#4169E1">if</font> (func == NEPConvergedRelative) nep->conv = NEP_CONV_REL;
+<a name="line645">645: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == NEPConvergedNorm) nep->conv = NEP_CONV_NORM;
+<a name="line646">646: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == NEPConvergedAbsolute) nep->conv = NEP_CONV_ABS;
+<a name="line647">647: </a>  <font color="#4169E1">else</font> nep->conv = NEP_CONV_USER;
+<a name="line648">648: </a>  <font color="#4169E1">return</font>(0);
+<a name="line649">649: </a>}
+
+<a name="line653">653: </a><font color="#B22222">/*@</font>
+<a name="line654">654: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a> - Specifies how to compute the error estimate</font>
+<a name="line655">655: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line657">657: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line659">659: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line660">660: </a><font color="#B22222">+  nep  - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line661">661: </a><font color="#B22222">-  conv - the type of convergence test</font>
+
+<a name="line663">663: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line664">664: </a><font color="#B22222">+  -nep_conv_abs  - Sets the absolute convergence test</font>
+<a name="line665">665: </a><font color="#B22222">.  -nep_conv_rel  - Sets the convergence test relative to the eigenvalue</font>
+<a name="line666">666: </a><font color="#B22222">-  -nep_conv_user - Selects the user-defined convergence test</font>
+
+<a name="line668">668: </a><font color="#B22222">   Note:</font>
+<a name="line669">669: </a><font color="#B22222">   The parameter 'conv' can have one of these values</font>
+<a name="line670">670: </a><font color="#B22222">+     NEP_CONV_ABS  - absolute error ||r||</font>
+<a name="line671">671: </a><font color="#B22222">.     NEP_CONV_REL  - error relative to the eigenvalue l, ||r||/|l|</font>
+<a name="line672">672: </a><font color="#B22222">.     NEP_CONV_NORM - error relative matrix norms, ||r||/sum_i(|f_i(l)|*||A_i||)</font>
+<a name="line673">673: </a><font color="#B22222">-     NEP_CONV_USER - function set by <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a>()</font>
+
+<a name="line675">675: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line677">677: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetConvergenceTest.html#NEPGetConvergenceTest">NEPGetConvergenceTest</a>(), <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTestFunction.html#NEPSetConvergenceTestFunction">NEPSetConvergenceTestFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/NEP/NEPConv.html#NEPConv">NEP [...]
+<a name="line678">678: </a><font color="#B22222">@*/</font>
+<a name="line679">679: </a><strong><font color="#4169E1"><a name="NEPSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a> conv)</font></strong>
+<a name="line680">680: </a>{
+<a name="line684">684: </a>  <font color="#4169E1">switch</font> (conv) {
+<a name="line685">685: </a>    <font color="#4169E1">case</font> NEP_CONV_ABS:  nep->converged = NEPConvergedAbsolute; <font color="#4169E1">break</font>;
+<a name="line686">686: </a>    <font color="#4169E1">case</font> NEP_CONV_REL:  nep->converged = NEPConvergedRelative; <font color="#4169E1">break</font>;
+<a name="line687">687: </a>    <font color="#4169E1">case</font> NEP_CONV_NORM: nep->converged = NEPConvergedNorm; <font color="#4169E1">break</font>;
+<a name="line688">688: </a>    <font color="#4169E1">case</font> NEP_CONV_USER: <font color="#4169E1">break</font>;
+<a name="line689">689: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line690">690: </a>      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'conv' value"</font>);
+<a name="line691">691: </a>  }
+<a name="line692">692: </a>  nep->conv = conv;
+<a name="line693">693: </a>  <font color="#4169E1">return</font>(0);
+<a name="line694">694: </a>}
+
+<a name="line698">698: </a><font color="#B22222">/*@</font>
+<a name="line699">699: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetConvergenceTest.html#NEPGetConvergenceTest">NEPGetConvergenceTest</a> - Gets the method used to compute the error estimate</font>
+<a name="line700">700: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line702">702: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line704">704: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line705">705: </a><font color="#B22222">.  nep   - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line707">707: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line708">708: </a><font color="#B22222">.  conv  - the type of convergence test</font>
+
+<a name="line710">710: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line712">712: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a></font>
+<a name="line713">713: </a><font color="#B22222">@*/</font>
+<a name="line714">714: </a><strong><font color="#4169E1"><a name="NEPGetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetConvergenceTest.html#NEPGetConvergenceTest">NEPGetConvergenceTest</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPConv.html#NEPConv">NEPConv</a> *conv)</font></strong>
+<a name="line715">715: </a>{
+<a name="line719">719: </a>  *conv = nep->conv;
+<a name="line720">720: </a>  <font color="#4169E1">return</font>(0);
+<a name="line721">721: </a>}
+
+<a name="line725">725: </a><font color="#B22222">/*@C</font>
+<a name="line726">726: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a> - Sets a function to decide when to stop the outer</font>
+<a name="line727">727: </a><font color="#B22222">   iteration of the eigensolver.</font>
+
+<a name="line729">729: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line731">731: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line732">732: </a><font color="#B22222">+  nep     - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line733">733: </a><font color="#B22222">.  func    - pointer to the stopping test function</font>
+<a name="line734">734: </a><font color="#B22222">.  ctx     - context for private data for the stopping routine (may be null)</font>
+<a name="line735">735: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line737">737: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line738">738: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *reason,void *ctx)</font>
+
+<a name="line740">740: </a><font color="#B22222">+   nep    - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line741">741: </a><font color="#B22222">.   its    - current number of iterations</font>
+<a name="line742">742: </a><font color="#B22222">.   max_it - maximum number of iterations</font>
+<a name="line743">743: </a><font color="#B22222">.   nconv  - number of currently converged eigenpairs</font>
+<a name="line744">744: </a><font color="#B22222">.   nev    - number of requested eigenpairs</font>
+<a name="line745">745: </a><font color="#B22222">.   reason - (output) result of the stopping test</font>
+<a name="line746">746: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a>()</font>
+
+<a name="line748">748: </a><font color="#B22222">   Note:</font>
+<a name="line749">749: </a><font color="#B22222">   Normal usage is to first call the default routine <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>() and then</font>
+<a name="line750">750: </a><font color="#B22222">   set reason to NEP_CONVERGED_USER if some user-defined conditions have been</font>
+<a name="line751">751: </a><font color="#B22222">   met. To let the eigensolver continue iterating, the result must be left as</font>
+<a name="line752">752: </a><font color="#B22222">   NEP_CONVERGED_ITERATING.</font>
+
+<a name="line754">754: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line756">756: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>()</font>
+<a name="line757">757: </a><font color="#B22222">@*/</font>
+<a name="line758">758: </a><strong><font color="#4169E1"><a name="NEPSetStoppingTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscErrorCode (*func)(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#N [...]
+<a name="line759">759: </a>{
+
+<a name="line764">764: </a>  <font color="#4169E1">if</font> (nep->stoppingdestroy) {
+<a name="line765">765: </a>    (*nep->stoppingdestroy)(nep->stoppingctx);
+<a name="line766">766: </a>  }
+<a name="line767">767: </a>  nep->stopping        = func;
+<a name="line768">768: </a>  nep->stoppingdestroy = destroy;
+<a name="line769">769: </a>  nep->stoppingctx     = ctx;
+<a name="line770">770: </a>  <font color="#4169E1">if</font> (func == <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>) nep->stop = NEP_STOP_BASIC;
+<a name="line771">771: </a>  <font color="#4169E1">else</font> nep->stop = NEP_STOP_USER;
+<a name="line772">772: </a>  <font color="#4169E1">return</font>(0);
+<a name="line773">773: </a>}
+
+<a name="line777">777: </a><font color="#B22222">/*@</font>
+<a name="line778">778: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a> - Specifies how to decide the termination of the outer</font>
+<a name="line779">779: </a><font color="#B22222">   loop of the eigensolver.</font>
+
+<a name="line781">781: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line783">783: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line784">784: </a><font color="#B22222">+  nep  - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+<a name="line785">785: </a><font color="#B22222">-  stop - the type of stopping test</font>
+
+<a name="line787">787: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line788">788: </a><font color="#B22222">+  -nep_stop_basic - Sets the default stopping test</font>
+<a name="line789">789: </a><font color="#B22222">-  -nep_stop_user  - Selects the user-defined stopping test</font>
+
+<a name="line791">791: </a><font color="#B22222">   Note:</font>
+<a name="line792">792: </a><font color="#B22222">   The parameter 'stop' can have one of these values</font>
+<a name="line793">793: </a><font color="#B22222">+     NEP_STOP_BASIC - default stopping test</font>
+<a name="line794">794: </a><font color="#B22222">-     NEP_STOP_USER  - function set by <a href="../../../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a>()</font>
+
+<a name="line796">796: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line798">798: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetStoppingTest.html#NEPGetStoppingTest">NEPGetStoppingTest</a>(), <a href="../../../docs/manualpages/NEP/NEPSetStoppingTestFunction.html#NEPSetStoppingTestFunction">NEPSetStoppingTestFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a></font>
+<a name="line799">799: </a><font color="#B22222">@*/</font>
+<a name="line800">800: </a><strong><font color="#4169E1"><a name="NEPSetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a> stop)</font></strong>
+<a name="line801">801: </a>{
+<a name="line805">805: </a>  <font color="#4169E1">switch</font> (stop) {
+<a name="line806">806: </a>    <font color="#4169E1">case</font> NEP_STOP_BASIC: nep->stopping = <a href="../../../docs/manualpages/NEP/NEPStoppingBasic.html#NEPStoppingBasic">NEPStoppingBasic</a>; <font color="#4169E1">break</font>;
+<a name="line807">807: </a>    <font color="#4169E1">case</font> NEP_STOP_USER:  <font color="#4169E1">break</font>;
+<a name="line808">808: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line809">809: </a>      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'stop' value"</font>);
+<a name="line810">810: </a>  }
+<a name="line811">811: </a>  nep->stop = stop;
+<a name="line812">812: </a>  <font color="#4169E1">return</font>(0);
+<a name="line813">813: </a>}
+
+<a name="line817">817: </a><font color="#B22222">/*@</font>
+<a name="line818">818: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetStoppingTest.html#NEPGetStoppingTest">NEPGetStoppingTest</a> - Gets the method used to decide the termination of the outer</font>
+<a name="line819">819: </a><font color="#B22222">   loop of the eigensolver.</font>
+
+<a name="line821">821: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line823">823: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line824">824: </a><font color="#B22222">.  nep   - nonlinear eigensolver context obtained from <a href="../../../docs/manualpages/NEP/NEPCreate.html#NEPCreate">NEPCreate</a>()</font>
+
+<a name="line826">826: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line827">827: </a><font color="#B22222">.  stop  - the type of stopping test</font>
+
+<a name="line829">829: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line831">831: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetStoppingTest.html#NEPSetStoppingTest">NEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a></font>
+<a name="line832">832: </a><font color="#B22222">@*/</font>
+<a name="line833">833: </a><strong><font color="#4169E1"><a name="NEPGetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetStoppingTest.html#NEPGetStoppingTest">NEPGetStoppingTest</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPStop.html#NEPStop">NEPStop</a> *stop)</font></strong>
+<a name="line834">834: </a>{
+<a name="line838">838: </a>  *stop = nep->stop;
+<a name="line839">839: </a>  <font color="#4169E1">return</font>(0);
+<a name="line840">840: </a>}
+
+<a name="line844">844: </a><font color="#B22222">/*@</font>
+<a name="line845">845: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a> - Specifies if the solver must compute the residual of all</font>
+<a name="line846">846: </a><font color="#B22222">   approximate eigenpairs or not.</font>
+
+<a name="line848">848: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line850">850: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line851">851: </a><font color="#B22222">+  nep      - the eigensolver context</font>
+<a name="line852">852: </a><font color="#B22222">-  trackall - whether compute all residuals or not</font>
+
+<a name="line854">854: </a><font color="#B22222">   Notes:</font>
+<a name="line855">855: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver explicitly computes</font>
+<a name="line856">856: </a><font color="#B22222">   the residual for each eigenpair approximation. Computing the residual is</font>
+<a name="line857">857: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute the associated</font>
+<a name="line858">858: </a><font color="#B22222">   residual to the first unconverged eigenpair.</font>
+<a name="line859">859: </a><font color="#B22222">   The options '-nep_monitor_all' and '-nep_monitor_lg_all' automatically</font>
+<a name="line860">860: </a><font color="#B22222">   activate this option.</font>
+
+<a name="line862">862: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line864">864: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>()</font>
+<a name="line865">865: </a><font color="#B22222">@*/</font>
+<a name="line866">866: </a><strong><font color="#4169E1"><a name="NEPSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool trackall)</font></strong>
+<a name="line867">867: </a>{
+<a name="line871">871: </a>  nep->trackall = trackall;
+<a name="line872">872: </a>  <font color="#4169E1">return</font>(0);
+<a name="line873">873: </a>}
+
+<a name="line877">877: </a><font color="#B22222">/*@</font>
+<a name="line878">878: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
+<a name="line879">879: </a><font color="#B22222">   be computed or not.</font>
+
+<a name="line881">881: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line883">883: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line884">884: </a><font color="#B22222">.  nep - the eigensolver context</font>
+
+<a name="line886">886: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line887">887: </a><font color="#B22222">.  trackall - the returned flag</font>
+
+<a name="line889">889: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line891">891: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTrackAll.html#NEPSetTrackAll">NEPSetTrackAll</a>()</font>
+<a name="line892">892: </a><font color="#B22222">@*/</font>
+<a name="line893">893: </a><strong><font color="#4169E1"><a name="NEPGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetTrackAll.html#NEPGetTrackAll">NEPGetTrackAll</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscBool *trackall)</font></strong>
+<a name="line894">894: </a>{
+<a name="line898">898: </a>  *trackall = nep->trackall;
+<a name="line899">899: </a>  <font color="#4169E1">return</font>(0);
+<a name="line900">900: </a>}
+
+<a name="line904">904: </a><font color="#B22222">/*@</font>
+<a name="line905">905: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a> - Specifies the refinement type (and options) to be used</font>
+<a name="line906">906: </a><font color="#B22222">   after the solve.</font>
+
+<a name="line908">908: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line910">910: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line911">911: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line912">912: </a><font color="#B22222">.  refine - refinement type</font>
+<a name="line913">913: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
+<a name="line914">914: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
+<a name="line915">915: </a><font color="#B22222">.  its    - maximum number of refinement iterations</font>
+<a name="line916">916: </a><font color="#B22222">-  scheme - which scheme to be used for solving the involved linear systems</font>
+
+<a name="line918">918: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line919">919: </a><font color="#B22222">+  -nep_refine <type> - refinement type, one of <none,simple,multiple></font>
+<a name="line920">920: </a><font color="#B22222">.  -nep_refine_partitions <n> - the number of partitions</font>
+<a name="line921">921: </a><font color="#B22222">.  -nep_refine_tol <tol> - the tolerance</font>
+<a name="line922">922: </a><font color="#B22222">.  -nep_refine_its <its> - number of iterations</font>
+<a name="line923">923: </a><font color="#B22222">-  -nep_refine_scheme - to set the scheme for the linear solves</font>
+
+<a name="line925">925: </a><font color="#B22222">   Notes:</font>
+<a name="line926">926: </a><font color="#B22222">   By default, iterative refinement is disabled, since it may be very</font>
+<a name="line927">927: </a><font color="#B22222">   costly. There are two possible refinement strategies: simple and multiple.</font>
+<a name="line928">928: </a><font color="#B22222">   The simple approach performs iterative refinement on each of the</font>
+<a name="line929">929: </a><font color="#B22222">   converged eigenpairs individually, whereas the multiple strategy works</font>
+<a name="line930">930: </a><font color="#B22222">   with the invariant pair as a whole, refining all eigenpairs simultaneously.</font>
+<a name="line931">931: </a><font color="#B22222">   The latter may be required for the case of multiple eigenvalues.</font>
+
+<a name="line933">933: </a><font color="#B22222">   In some cases, especially when using direct solvers within the</font>
+<a name="line934">934: </a><font color="#B22222">   iterative refinement method, it may be helpful for improved scalability</font>
+<a name="line935">935: </a><font color="#B22222">   to split the communicator in several partitions. The npart parameter</font>
+<a name="line936">936: </a><font color="#B22222">   indicates how many partitions to use (defaults to 1).</font>
+
+<a name="line938">938: </a><font color="#B22222">   The tol and its parameters specify the stopping criterion. In the simple</font>
+<a name="line939">939: </a><font color="#B22222">   method, refinement continues until the residual of each eigenpair is</font>
+<a name="line940">940: </a><font color="#B22222">   below the tolerance (tol defaults to the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> tol, but may be set to a</font>
+<a name="line941">941: </a><font color="#B22222">   different value). In contrast, the multiple method simply performs its</font>
+<a name="line942">942: </a><font color="#B22222">   refinement iterations (just one by default).</font>
+
+<a name="line944">944: </a><font color="#B22222">   The scheme argument is used to change the way in which linear systems are</font>
+<a name="line945">945: </a><font color="#B22222">   solved. Possible choices are: explicit, mixed block elimination (MBE), </font>
+<a name="line946">946: </a><font color="#B22222">   and Schur complement.</font>
+
+<a name="line948">948: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line950">950: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a>()</font>
+<a name="line951">951: </a><font color="#B22222">@*/</font>
+<a name="line952">952: </a><strong><font color="#4169E1"><a name="NEPSetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a> refine,PetscInt npart,PetscReal tol,PetscInt its,<a href="../../../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a> scheme)</font>< [...]
+<a name="line953">953: </a>{
+<a name="line955">955: </a>  PetscMPIInt    size;
+
+<a name="line964">964: </a>  nep->refine = refine;
+<a name="line965">965: </a>  <font color="#4169E1">if</font> (refine) {  <font color="#B22222">/* process parameters only if not REFINE_NONE */</font>
+<a name="line966">966: </a>    <font color="#4169E1">if</font> (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
+<a name="line967">967: </a>      nep->npart = 1;
+<a name="line968">968: </a>    } <font color="#4169E1">else</font> {
+<a name="line969">969: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)nep),&size);
+<a name="line970">970: </a>      <font color="#4169E1">if</font> (npart<1 || npart>size) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of npart"</font>);
+<a name="line971">971: </a>      nep->npart = npart;
+<a name="line972">972: </a>    }
+<a name="line973">973: </a>    <font color="#4169E1">if</font> (tol == PETSC_DEFAULT || tol == PETSC_DECIDE) {
+<a name="line974">974: </a>      nep->rtol = PetscMax(nep->tol/1000,PETSC_MACHINE_EPSILON);
+<a name="line975">975: </a>    } <font color="#4169E1">else</font> {
+<a name="line976">976: </a>      <font color="#4169E1">if</font> (tol<=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line977">977: </a>      nep->rtol = tol;
+<a name="line978">978: </a>    }
+<a name="line979">979: </a>    <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) {
+<a name="line980">980: </a>      nep->rits = PETSC_DEFAULT;
+<a name="line981">981: </a>    } <font color="#4169E1">else</font> {
+<a name="line982">982: </a>      <font color="#4169E1">if</font> (its<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of its. Must be >= 0"</font>);
+<a name="line983">983: </a>      nep->rits = its;
+<a name="line984">984: </a>    }
+<a name="line985">985: </a>    nep->scheme = scheme;
+<a name="line986">986: </a>  }
+<a name="line987">987: </a>  nep->state = NEP_STATE_INITIAL;
+<a name="line988">988: </a>  <font color="#4169E1">return</font>(0);
+<a name="line989">989: </a>}
+
+<a name="line993">993: </a><font color="#B22222">/*@</font>
+<a name="line994">994: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a> - Gets the refinement strategy used by the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> object, and the</font>
+<a name="line995">995: </a><font color="#B22222">   associated parameters.</font>
+
+<a name="line997">997: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line999">999: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1000">1000: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1002">1002: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1003">1003: </a><font color="#B22222">+  refine - refinement type</font>
+<a name="line1004">1004: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
+<a name="line1005">1005: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
+<a name="line1006">1006: </a><font color="#B22222">-  its    - maximum number of refinement iterations</font>
+<a name="line1007">1007: </a><font color="#B22222">-  scheme - the scheme used for solving linear systems</font>
+
+<a name="line1009">1009: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1011">1011: </a><font color="#B22222">   Note:</font>
+<a name="line1012">1012: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line1014">1014: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetRefine.html#NEPSetRefine">NEPSetRefine</a>()</font>
+<a name="line1015">1015: </a><font color="#B22222">@*/</font>
+<a name="line1016">1016: </a><strong><font color="#4169E1"><a name="NEPGetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetRefine.html#NEPGetRefine">NEPGetRefine</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPRefine.html#NEPRefine">NEPRefine</a> *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,<a href="../../../docs/manualpages/NEP/NEPRefineScheme.html#NEPRefineScheme">NEPRefineScheme</a> *scheme)< [...]
+<a name="line1017">1017: </a>{
+<a name="line1020">1020: </a>  <font color="#4169E1">if</font> (refine) *refine = nep->refine;
+<a name="line1021">1021: </a>  <font color="#4169E1">if</font> (npart)  *npart  = nep->npart;
+<a name="line1022">1022: </a>  <font color="#4169E1">if</font> (tol)    *tol    = nep->rtol;
+<a name="line1023">1023: </a>  <font color="#4169E1">if</font> (its)    *its    = nep->rits;
+<a name="line1024">1024: </a>  <font color="#4169E1">if</font> (scheme) *scheme = nep->scheme;
+<a name="line1025">1025: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1026">1026: </a>}
+
+<a name="line1030">1030: </a><font color="#B22222">/*@C</font>
+<a name="line1031">1031: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line1032">1032: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options in the database.</font>
+
+<a name="line1034">1034: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1036">1036: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1037">1037: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line1038">1038: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> option requests</font>
+
+<a name="line1040">1040: </a><font color="#B22222">   Notes:</font>
+<a name="line1041">1041: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line1042">1042: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line1043">1043: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line1045">1045: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
+<a name="line1046">1046: </a><font color="#B22222">   different <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> contexts, one could call</font>
+<a name="line1047">1047: </a><font color="#B22222">.vb</font>
+<a name="line1048">1048: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(nep1,"neig1_")</font>
+<a name="line1049">1049: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(nep2,"neig2_")</font>
+<a name="line1050">1050: </a><font color="#B22222">.ve</font>
+
+<a name="line1052">1052: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1054">1054: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>()</font>
+<a name="line1055">1055: </a><font color="#B22222">@*/</font>
+<a name="line1056">1056: </a><strong><font color="#4169E1"><a name="NEPSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char *prefix)</font></strong>
+<a name="line1057">1057: </a>{
+
+<a name="line1062">1062: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
+<a name="line1063">1063: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(nep->V,prefix);
+<a name="line1064">1064: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
+<a name="line1065">1065: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(nep->ds,prefix);
+<a name="line1066">1066: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
+<a name="line1067">1067: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(nep->rg,prefix);
+<a name="line1068">1068: </a>  PetscObjectSetOptionsPrefix((PetscObject)nep,prefix);
+<a name="line1069">1069: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1070">1070: </a>}
+
+<a name="line1074">1074: </a><font color="#B22222">/*@C</font>
+<a name="line1075">1075: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line1076">1076: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options in the database.</font>
+
+<a name="line1078">1078: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line1080">1080: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1081">1081: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line1082">1082: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> option requests</font>
+
+<a name="line1084">1084: </a><font color="#B22222">   Notes:</font>
+<a name="line1085">1085: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line1086">1086: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+
+<a name="line1088">1088: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1090">1090: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>()</font>
+<a name="line1091">1091: </a><font color="#B22222">@*/</font>
+<a name="line1092">1092: </a><strong><font color="#4169E1"><a name="NEPAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char *prefix)</font></strong>
+<a name="line1093">1093: </a>{
+
+<a name="line1098">1098: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
+<a name="line1099">1099: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(nep->V,prefix);
+<a name="line1100">1100: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
+<a name="line1101">1101: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(nep->ds,prefix);
+<a name="line1102">1102: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
+<a name="line1103">1103: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(nep->rg,prefix);
+<a name="line1104">1104: </a>  PetscObjectAppendOptionsPrefix((PetscObject)nep,prefix);
+<a name="line1105">1105: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1106">1106: </a>}
+
+<a name="line1110">1110: </a><font color="#B22222">/*@C</font>
+<a name="line1111">1111: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line1112">1112: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> options in the database.</font>
+
+<a name="line1114">1114: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1116">1116: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1117">1117: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line1119">1119: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1120">1120: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+
+<a name="line1122">1122: </a><font color="#B22222">   Note:</font>
+<a name="line1123">1123: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line1124">1124: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+
+<a name="line1126">1126: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1128">1128: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetOptionsPrefix.html#NEPSetOptionsPrefix">NEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/NEP/NEPAppendOptionsPrefix.html#NEPAppendOptionsPrefix">NEPAppendOptionsPrefix</a>()</font>
+<a name="line1129">1129: </a><font color="#B22222">@*/</font>
+<a name="line1130">1130: </a><strong><font color="#4169E1"><a name="NEPGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetOptionsPrefix.html#NEPGetOptionsPrefix">NEPGetOptionsPrefix</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,const char *prefix[])</font></strong>
+<a name="line1131">1131: </a>{
+
+<a name="line1137">1137: </a>  PetscObjectGetOptionsPrefix((PetscObject)nep,prefix);
+<a name="line1138">1138: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1139">1139: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/neprefine.c b/src/nep/interface/neprefine.c
index e3ea6f7..7da1e64 100644
--- a/src/nep/interface/neprefine.c
+++ b/src/nep/interface/neprefine.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -28,21 +28,45 @@
 
 typedef struct {
   PetscSubcomm  subc;
-  VecScatter    *scatter_id;
+  VecScatter    *scatter_id,nst;
   Mat           *A;
-  Vec           vg,v;
+  Vec           nv,vg,v,w;
   FN            *fn;
 } NEPSimpNRefctx;
 
+typedef struct {
+  Mat          M1;
+  Vec          M2,M3;
+  PetscScalar  M4,m3;
+} FSubctx;
+
+#undef __FUNCT__
+#define __FUNCT__ "MatFSMult"
+static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)
+{
+  PetscErrorCode ierr;
+  FSubctx        *ctx;
+  PetscScalar    t;
+  
+  PetscFunctionBegin;
+  ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
+  ierr = VecDot(x,ctx->M3,&t);CHKERRQ(ierr);
+  t *= ctx->m3/ctx->M4;
+  ierr = MatMult(ctx->M1,x,y);CHKERRQ(ierr);
+  ierr = VecAXPY(y,-t,ctx->M2);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
 #undef __FUNCT__
 #define __FUNCT__ "NEPSimpleNRefSetUp"
 static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)
 {
   PetscErrorCode ierr;
-  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2;
+  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2,ne;
   IS             is1,is2;
   NEPSimpNRefctx *ctx;
   Vec            v;
+  PetscMPIInt    rank,size;
 
   PetscFunctionBegin;
   ierr = PetscMalloc1(1,ctx_);CHKERRQ(ierr);
@@ -55,12 +79,6 @@ static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)
   } else {
     ierr = PetscMalloc2(nep->nt,&ctx->A,nep->npart,&ctx->scatter_id);CHKERRQ(ierr);
 
-    /* Split in subcomunicators */
-    ierr = PetscSubcommCreate(PetscObjectComm((PetscObject)nep),&ctx->subc);CHKERRQ(ierr);
-    ierr = PetscSubcommSetNumber(ctx->subc,nep->npart);CHKERRQ(ierr);CHKERRQ(ierr);
-    ierr = PetscSubcommSetType(ctx->subc,PETSC_SUBCOMM_CONTIGUOUS);CHKERRQ(ierr);
-    ierr = PetscLogObjectMemory((PetscObject)nep,sizeof(PetscSubcomm));CHKERRQ(ierr);
-
     /* Duplicate matrices */
     for (i=0;i<nep->nt;i++) {
       ierr = MatCreateRedundantMatrix(nep->A[i],0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&ctx->A[i]);CHKERRQ(ierr);
@@ -96,7 +114,29 @@ static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)
     }
     ierr = PetscFree2(idx1,idx2);CHKERRQ(ierr);
   }
-  PetscFunctionReturn(0);  
+  if (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT) {
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)ctx->A[0]),&rank);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)ctx->A[0]),&size);CHKERRQ(ierr);
+    if (size>1) {
+      if (nep->npart==1) {
+        ierr = BVGetColumn(nep->V,0,&v);CHKERRQ(ierr);
+      } else {v = ctx->v;}
+      ierr = VecGetOwnershipRange(v,&n0,&m0);CHKERRQ(ierr);
+      ne = (rank == size-1)?nep->n:0;
+      ierr = VecCreateMPI(PetscObjectComm((PetscObject)ctx->A[0]),ne,PETSC_DECIDE,&ctx->nv);CHKERRQ(ierr);
+      ierr = PetscMalloc1(m0-n0,&idx1);CHKERRQ(ierr);
+      for (i=n0;i<m0;i++) {
+        idx1[i-n0] = i;
+      }
+      ierr = ISCreateGeneral(PetscObjectComm((PetscObject)nep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);CHKERRQ(ierr);
+      ierr = VecScatterCreate(v,is1,ctx->nv,is1,&ctx->nst);CHKERRQ(ierr);
+      if (nep->npart==1) {
+        ierr = BVRestoreColumn(nep->V,0,&v);CHKERRQ(ierr);
+      }
+      ierr = PetscFree(idx1);CHKERRQ(ierr);
+      ierr = ISDestroy(&is1);CHKERRQ(ierr);
+    }
+  }  PetscFunctionReturn(0);  
 }
 
 /*
@@ -104,7 +144,7 @@ static PetscErrorCode NEPSimpleNRefSetUp(NEP nep,NEPSimpNRefctx **ctx_)
 */
 #undef __FUNCT__
 #define __FUNCT__ "NEPSimpleNRefGatherEigenpair"
-PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)
+static PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)
 {
   PetscErrorCode ierr;
   PetscMPIInt    nproc,p;
@@ -113,33 +153,41 @@ PetscErrorCode NEPSimpleNRefGatherEigenpair(NEP nep,NEPSimpNRefctx *ctx,PetscInt
   PetscScalar    *array;
 
   PetscFunctionBegin;
-  /* The eigenvalue information is in the last process of the 
-     subcommunicator sc. p is its mapping in the general comm */
-  ierr = MPI_Comm_size(comm,&nproc);CHKERRQ(ierr);
-  p = (nproc/nep->npart)*(sc+1)+PetscMin(nproc%nep->npart,sc+1)-1;
-  ierr = MPI_Bcast(&nep->eigr[idx],1,MPIU_SCALAR,p,comm);CHKERRQ(ierr);
-
   if (nep->npart>1) {
-    /* Gather nep->V[idx] from the subcommuniator sc */
-    ierr = BVGetColumn(nep->V,idx,&v);CHKERRQ(ierr);
-    if (ctx->subc->color==sc) {
-      ierr = VecGetArray(ctx->v,&array);CHKERRQ(ierr);
-      ierr = VecPlaceArray(ctx->vg,array);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(comm,&nproc);CHKERRQ(ierr);
+    p = (nproc/nep->npart)*sc+PetscMin(sc,nproc%nep->npart);
+    /* Communicate convergence successful */
+    ierr = MPI_Bcast(fail,1,MPIU_INT,p,comm);CHKERRQ(ierr);
+    if (!(*fail)) {
+      /* Process 0 of subcommunicator sc broadcasts the eigenvalue */ 
+      ierr = MPI_Bcast(&nep->eigr[idx],1,MPIU_SCALAR,p,comm);CHKERRQ(ierr);
+      /* Gather nep->V[idx] from the subcommuniator sc */
+      ierr = BVGetColumn(nep->V,idx,&v);CHKERRQ(ierr);
+      if (ctx->subc->color==sc) {
+        ierr = VecGetArray(ctx->v,&array);CHKERRQ(ierr);
+        ierr = VecPlaceArray(ctx->vg,array);CHKERRQ(ierr);
+      }
+      ierr = VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
+      ierr = VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
+      if (ctx->subc->color==sc) {
+        ierr = VecResetArray(ctx->vg);CHKERRQ(ierr);
+        ierr = VecRestoreArray(ctx->v,&array);CHKERRQ(ierr);
+      }
+      ierr = BVRestoreColumn(nep->V,idx,&v);CHKERRQ(ierr);
     }
-    ierr = VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-    ierr = VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-    if (ctx->subc->color==sc) {
-      ierr = VecResetArray(ctx->vg);CHKERRQ(ierr);
-      ierr = VecRestoreArray(ctx->v,&array);CHKERRQ(ierr);
+  } else {
+    if (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT && !(*fail)) {
+      ierr = MPI_Comm_size(comm,&nproc);CHKERRQ(ierr);
+      p = (nproc/nep->npart)*sc+PetscMin(sc,nproc%nep->npart);
+      ierr = MPI_Bcast(&nep->eigr[idx],1,MPIU_SCALAR,p,comm);CHKERRQ(ierr);
     }
-    ierr = BVRestoreColumn(nep->V,idx,&v);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSimpleNRefScatterEigenvector"
-PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)
+static PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)
 {
   PetscErrorCode ierr;
   Vec            v;
@@ -165,138 +213,209 @@ PetscErrorCode NEPSimpleNRefScatterEigenvector(NEP nep,NEPSimpNRefctx *ctx,Petsc
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPSimpleNRefSetUpSystem"
-static PetscErrorCode NEPSimpleNRefSetUpSystem(NEP nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)
+static PetscErrorCode NEPSimpleNRefSetUpSystem(NEP nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)
 {
   PetscErrorCode    ierr;
-  PetscInt          i,st,ml,m0,m1,mg;
+  PetscInt          i,st,ml,m0,n0,m1,mg;
   PetscInt          *dnz,*onz,ncols,*cols2,*nnz,nt=nep->nt;
-  PetscScalar       zero=0.0,*coeffs;
+  PetscScalar       zero=0.0,*coeffs,*coeffs2;
   PetscMPIInt       rank,size;
   MPI_Comm          comm;
   const PetscInt    *cols;
   const PetscScalar *vals,*array;
-  Vec               w=t[1],q=t[0];
+  FSubctx           *fctx;
+  Vec               w=ctx->w;
+  Mat               M;
 
   PetscFunctionBegin;
-  comm = PetscObjectComm((PetscObject)A[0]);
-  ierr = PetscMalloc1(nt,&coeffs);CHKERRQ(ierr);
-  ierr = MPI_Comm_rank(comm,&rank);CHKERRQ(ierr);
-  ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
+  ierr = PetscMalloc2(nt,&coeffs,nt,&coeffs2);CHKERRQ(ierr);
+  switch (nep->scheme) {
+  case NEP_REFINE_SCHEME_SCHUR:
+    if (ini) {
+      ierr = PetscCalloc1(1,&fctx);CHKERRQ(ierr);
+      ierr = MatGetSize(A[0],&m0,&n0);CHKERRQ(ierr);
+      ierr = MatCreateShell(PetscObjectComm((PetscObject)A[0]),PETSC_DECIDE,PETSC_DECIDE,m0,n0,fctx,T);CHKERRQ(ierr);
+      ierr = MatShellSetOperation(*T,MATOP_MULT,(void(*)(void))MatFSMult);CHKERRQ(ierr);
+    } else {
+      ierr = MatShellGetContext(*T,&fctx);CHKERRQ(ierr);
+    }    
+    M=fctx->M1;
+    break;
+  case NEP_REFINE_SCHEME_MBE:
+    M=*T;
+    break;
+  case NEP_REFINE_SCHEME_EXPLICIT:
+    M=*Mt;
+    break;
+  }
   if (ini) {
-    ierr = MatDuplicate(A[0],MAT_COPY_VALUES,T);CHKERRQ(ierr);
+    ierr = MatDuplicate(A[0],MAT_COPY_VALUES,&M);CHKERRQ(ierr);
   } else {
-    ierr = MatCopy(A[0],*T,SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatCopy(A[0],M,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
   }
   for (i=0;i<nt;i++) {
     ierr = FNEvaluateFunction(ctx->fn[i],nep->eigr[idx],coeffs+i);CHKERRQ(ierr);
   }
   if (coeffs[0]!=1.0) {
-    ierr = MatScale(*T,coeffs[0]);CHKERRQ(ierr);
+    ierr = MatScale(M,coeffs[0]);CHKERRQ(ierr);
   }
   for (i=1;i<nt;i++) {
-    ierr = MatAXPY(*T,coeffs[i],A[i],(ini)?DIFFERENT_NONZERO_PATTERN:SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
-  }
-  ierr = MatGetSize(*T,&mg,NULL);CHKERRQ(ierr);
-  ierr = MatGetOwnershipRange(*T,&m0,&m1);CHKERRQ(ierr);
-  if (ini) {
-    ierr = MatCreate(comm,M);CHKERRQ(ierr);
-    ierr = MatGetLocalSize(*T,&ml,NULL);CHKERRQ(ierr);
-    if (rank==size-1) ml++;
-    ierr = MatSetSizes(*M,ml,ml,mg+1,mg+1);CHKERRQ(ierr);
-    ierr = MatSetFromOptions(*M);CHKERRQ(ierr);
-    ierr = MatSetUp(*M);CHKERRQ(ierr);
-    /* Preallocate M */
-    if (size>1) {
-      ierr = MatPreallocateInitialize(comm,ml,ml,dnz,onz);CHKERRQ(ierr);
-      for (i=m0;i<m1;i++) {
-        ierr = MatGetRow(*T,i,&ncols,&cols,NULL);CHKERRQ(ierr);
-        ierr = MatPreallocateSet(i,ncols,cols,dnz,onz);CHKERRQ(ierr);
-        ierr = MatPreallocateSet(i,1,&mg,dnz,onz);CHKERRQ(ierr);
-        ierr = MatRestoreRow(*T,i,&ncols,&cols,NULL);CHKERRQ(ierr);
-      }
-      if (rank==size-1) {
-        ierr = PetscCalloc1(mg+1,&cols2);CHKERRQ(ierr);
-        for (i=0;i<mg+1;i++) cols2[i]=i;
-        ierr = MatPreallocateSet(m1,mg+1,cols2,dnz,onz);CHKERRQ(ierr);
-        ierr = PetscFree(cols2);CHKERRQ(ierr);
-      }
-      ierr = MatMPIAIJSetPreallocation(*M,0,dnz,0,onz);CHKERRQ(ierr);
-      ierr = MatPreallocateFinalize(dnz,onz);CHKERRQ(ierr);
-    } else {
-      ierr = PetscCalloc1(mg+1,&nnz);CHKERRQ(ierr);
-      for (i=0;i<mg;i++) {
-        ierr = MatGetRow(*T,i,&ncols,NULL,NULL);CHKERRQ(ierr);
-        nnz[i] = ncols+1;
-        ierr = MatRestoreRow(*T,i,&ncols,NULL,NULL);CHKERRQ(ierr);
-      }
-      nnz[mg] = mg+1;
-      ierr = MatSeqAIJSetPreallocation(*M,0,nnz);CHKERRQ(ierr);
-      ierr = PetscFree(nnz);CHKERRQ(ierr);
-    }
+    ierr = MatAXPY(M,coeffs[i],A[i],(ini)?nep->mstr:SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
   }
   for (i=0;i<nt;i++) {
-    ierr = FNEvaluateDerivative(ctx->fn[i],nep->eigr[idx],coeffs+i);CHKERRQ(ierr);
+    ierr = FNEvaluateDerivative(ctx->fn[i],nep->eigr[idx],coeffs2+i);CHKERRQ(ierr);
   }
   st = 0;
-  for (i=0;i<nt && PetscAbsScalar(coeffs[i])==0.0;i++) st++;
+  for (i=0;i<nt && PetscAbsScalar(coeffs2[i])==0.0;i++) st++;
   ierr = MatMult(A[st],v,w);CHKERRQ(ierr);
-  if (coeffs[st]!=1.0) {
-    ierr = VecScale(w,coeffs[st]);CHKERRQ(ierr);
+  if (coeffs2[st]!=1.0) {
+    ierr = VecScale(w,coeffs2[st]);CHKERRQ(ierr);
   }
   for (i=st+1;i<nt;i++) {
-    ierr = MatMult(A[i],v,q);CHKERRQ(ierr);
-    ierr = VecAXPY(w,coeffs[i],q);CHKERRQ(ierr);
+    ierr = MatMult(A[i],v,t);CHKERRQ(ierr);
+    ierr = VecAXPY(w,coeffs2[i],t);CHKERRQ(ierr);
   }
-  /* Set values */
-  ierr = PetscMalloc1(m1-m0,&cols2);CHKERRQ(ierr);
-  for (i=0;i<m1-m0;i++) cols2[i]=m0+i;
-  ierr = VecGetArrayRead(w,&array);CHKERRQ(ierr);
-  for (i=m0;i<m1;i++) {
-    ierr = MatGetRow(*T,i,&ncols,&cols,&vals);CHKERRQ(ierr);
-    ierr = MatSetValues(*M,1,&i,ncols,cols,vals,INSERT_VALUES);CHKERRQ(ierr);
-    ierr = MatRestoreRow(*T,i,&ncols,&cols,&vals);CHKERRQ(ierr);
-    ierr = MatSetValues(*M,1,&i,1,&mg,array+i-m0,INSERT_VALUES);CHKERRQ(ierr);
+
+  switch (nep->scheme) {
+  case NEP_REFINE_SCHEME_EXPLICIT:
+    comm = PetscObjectComm((PetscObject)A[0]);
+    ierr = MPI_Comm_rank(comm,&rank);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
+    ierr = MatGetSize(M,&mg,NULL);CHKERRQ(ierr);
+    ierr = MatGetOwnershipRange(M,&m0,&m1);CHKERRQ(ierr);
+    if (ini) {
+      ierr = MatCreate(comm,T);CHKERRQ(ierr);
+      ierr = MatGetLocalSize(M,&ml,NULL);CHKERRQ(ierr);
+      if (rank==size-1) ml++;
+      ierr = MatSetSizes(*T,ml,ml,mg+1,mg+1);CHKERRQ(ierr);
+      ierr = MatSetFromOptions(*T);CHKERRQ(ierr);
+      ierr = MatSetUp(*T);CHKERRQ(ierr);
+      /* Preallocate M */
+      if (size>1) {
+        ierr = MatPreallocateInitialize(comm,ml,ml,dnz,onz);CHKERRQ(ierr);
+        for (i=m0;i<m1;i++) {
+          ierr = MatGetRow(M,i,&ncols,&cols,NULL);CHKERRQ(ierr);
+          ierr = MatPreallocateSet(i,ncols,cols,dnz,onz);CHKERRQ(ierr);
+          ierr = MatPreallocateSet(i,1,&mg,dnz,onz);CHKERRQ(ierr);
+          ierr = MatRestoreRow(M,i,&ncols,&cols,NULL);CHKERRQ(ierr);
+        }
+        if (rank==size-1) {
+          ierr = PetscCalloc1(mg+1,&cols2);CHKERRQ(ierr);
+          for (i=0;i<mg+1;i++) cols2[i]=i;
+          ierr = MatPreallocateSet(m1,mg+1,cols2,dnz,onz);CHKERRQ(ierr);
+          ierr = PetscFree(cols2);CHKERRQ(ierr);
+        }
+        ierr = MatMPIAIJSetPreallocation(*T,0,dnz,0,onz);CHKERRQ(ierr);
+        ierr = MatPreallocateFinalize(dnz,onz);CHKERRQ(ierr);
+      } else {
+        ierr = PetscCalloc1(mg+1,&nnz);CHKERRQ(ierr);
+        for (i=0;i<mg;i++) {
+          ierr = MatGetRow(M,i,&ncols,NULL,NULL);CHKERRQ(ierr);
+          nnz[i] = ncols+1;
+          ierr = MatRestoreRow(M,i,&ncols,NULL,NULL);CHKERRQ(ierr);
+        }
+        nnz[mg] = mg+1;
+        ierr = MatSeqAIJSetPreallocation(*T,0,nnz);CHKERRQ(ierr);
+        ierr = PetscFree(nnz);CHKERRQ(ierr);
+      }
+      *Mt = M;
+      *P  = *T;
+    }
+  
+    /* Set values */
+    ierr = VecGetArrayRead(w,&array);CHKERRQ(ierr);
+    for (i=m0;i<m1;i++) {
+      ierr = MatGetRow(M,i,&ncols,&cols,&vals);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&i,ncols,cols,vals,INSERT_VALUES);CHKERRQ(ierr);
+      ierr = MatRestoreRow(M,i,&ncols,&cols,&vals);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&i,1,&mg,array+i-m0,INSERT_VALUES);CHKERRQ(ierr);
+    }
+    ierr = VecRestoreArrayRead(w,&array);CHKERRQ(ierr);
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)A[0]),&size);CHKERRQ(ierr);
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)A[0]),&rank);CHKERRQ(ierr);
+    if (size>1) {
+      if (rank==size-1) {
+        ierr = PetscMalloc1(nep->n,&cols2);CHKERRQ(ierr);
+        for (i=0;i<nep->n;i++) cols2[i]=i;
+      }
+      ierr = VecScatterBegin(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecScatterEnd(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecGetArrayRead(ctx->nv,&array);CHKERRQ(ierr);
+      if (rank==size-1) {
+        ierr = MatSetValues(*T,1,&mg,nep->n,cols2,array,INSERT_VALUES);CHKERRQ(ierr);
+        ierr = MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);CHKERRQ(ierr);
+      }
+      ierr = VecRestoreArrayRead(ctx->nv,&array);CHKERRQ(ierr);
+    } else {  
+      ierr = PetscMalloc1(m1-m0,&cols2);CHKERRQ(ierr);
+      for (i=0;i<m1-m0;i++) cols2[i]=m0+i;
+      ierr = VecGetArrayRead(v,&array);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&mg,m1-m0,cols2,array,INSERT_VALUES);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);CHKERRQ(ierr);
+      ierr = VecRestoreArrayRead(v,&array);CHKERRQ(ierr);
+    }
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = MatAssemblyBegin(*T,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+    ierr = MatAssemblyEnd(*T,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);  
+    ierr = PetscFree(cols2);CHKERRQ(ierr);
+    break; 
+  case NEP_REFINE_SCHEME_SCHUR:
+    fctx->M2 = ctx->w;
+    fctx->M3 = v;
+    fctx->m3 = 0.0;
+    for (i=1;i<nt-1;i++) fctx->m3 += PetscConj(coeffs[i])*coeffs[i];
+    fctx->M4 = 0.0;
+    for (i=1;i<nt-1;i++) fctx->M4 += PetscConj(coeffs[i])*coeffs2[i];
+    fctx->M1 = M;
+    if (ini) {
+      ierr = MatDuplicate(M,MAT_COPY_VALUES,P);CHKERRQ(ierr);
+    } else {
+      ierr = MatCopy(M,*P,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    }
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = VecPointwiseMult(t,v,w);CHKERRQ(ierr);
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = VecScale(t,-fctx->m3/fctx->M4);CHKERRQ(ierr);
+    ierr = MatDiagonalSet(*P,t,ADD_VALUES);CHKERRQ(ierr);
+    break;
+  case NEP_REFINE_SCHEME_MBE:
+    *T = M;
+    *P = M;
+    break;
   }
-  ierr = VecRestoreArrayRead(w,&array);CHKERRQ(ierr);
-  ierr = VecConjugate(v);CHKERRQ(ierr);
-  ierr = VecGetArrayRead(v,&array);CHKERRQ(ierr);
-  ierr = MatSetValues(*M,1,&mg,m1-m0,cols2,array,INSERT_VALUES);CHKERRQ(ierr);
-  ierr = MatSetValues(*M,1,&mg,1,&mg,&zero,INSERT_VALUES);CHKERRQ(ierr);
-  ierr = VecRestoreArrayRead(v,&array);CHKERRQ(ierr);
-  ierr = VecConjugate(v);CHKERRQ(ierr);
-  ierr = MatAssemblyBegin(*M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
-  ierr = MatAssemblyEnd(*M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);  
-  ierr = PetscFree(cols2);CHKERRQ(ierr);
-  ierr = PetscFree(coeffs);CHKERRQ(ierr);
+  ierr = PetscFree2(coeffs,coeffs2);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPNewtonRefinementSimple"
-PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol,PetscInt k)
+PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal tol,PetscInt k)
 {
   PetscErrorCode    ierr;
-  PetscInt          i,n,its,idx=0,*idx_sc,*its_sc,color;
+  PetscInt          i,n,its,idx=0,*idx_sc,*its_sc,color,*fail_sc;
   PetscMPIInt       rank,size;
-  KSP               ksp;
-  Mat               M=NULL,T=NULL;
+  Mat               Mt=NULL,T=NULL,P=NULL;
   MPI_Comm          comm;
   Vec               r,v,dv,rr=NULL,dvv=NULL,t[2];
   const PetscScalar *array;
-  PetscScalar       *array2;
+  PetscScalar       *array2,deig=0.0,tt[2],ttt;
   PetscReal         norm,error;
   PetscBool         ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
   NEPSimpNRefctx    *ctx;
+  FSubctx            *fctx=NULL;
+  KSPConvergedReason reason;
 
   PetscFunctionBegin;
   ierr = PetscLogEventBegin(NEP_Refine,nep,0,0,0);CHKERRQ(ierr);
   ierr = NEPSimpleNRefSetUp(nep,&ctx);CHKERRQ(ierr);
   its = (maxits)?*maxits:NREF_MAXIT;
   comm = (nep->npart==1)?PetscObjectComm((PetscObject)nep):PetscSubcommChild(ctx->subc);
-  ierr = KSPCreate(comm,&ksp);
+  if (!nep->refineksp) { ierr = NEPRefineGetKSP(nep,&nep->refineksp);CHKERRQ(ierr); }
   if (nep->npart==1) {
     ierr = BVGetColumn(nep->V,0,&v);CHKERRQ(ierr);
   } else v = ctx->v;
+  ierr = VecDuplicate(v,&ctx->w);CHKERRQ(ierr);
   ierr = VecDuplicate(v,&r);CHKERRQ(ierr);
   ierr = VecDuplicate(v,&dv);CHKERRQ(ierr);
   ierr = VecDuplicate(v,&t[0]);CHKERRQ(ierr);
@@ -305,7 +424,8 @@ PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol
   ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
   ierr = MPI_Comm_rank(comm,&rank);CHKERRQ(ierr);
   ierr = VecGetLocalSize(r,&n);CHKERRQ(ierr);
-  ierr = PetscMalloc2(nep->npart,&idx_sc,nep->npart,&its_sc);CHKERRQ(ierr);
+  ierr = PetscMalloc3(nep->npart,&idx_sc,nep->npart,&its_sc,nep->npart,&fail_sc);CHKERRQ(ierr);
+  for (i=0;i<nep->npart;i++) fail_sc[i] = 0;
   for (i=0;i<nep->npart;i++) its_sc[i] = 0;
   color = (nep->npart==1)?0:ctx->subc->color;
    
@@ -321,13 +441,13 @@ PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol
           ierr = NEPSimpleNRefScatterEigenvector(nep,ctx,i,idx_sc[i]);CHKERRQ(ierr);
         }
       }  else { /* Gather Eigenpair from subcommunicator i */
-        ierr = NEPSimpleNRefGatherEigenpair(nep,ctx,i,idx_sc[i]);CHKERRQ(ierr);
+        ierr = NEPSimpleNRefGatherEigenpair(nep,ctx,i,idx_sc[i],&fail_sc[i]);CHKERRQ(ierr);
       }
       while (sc_pend) {
-        if (tol) {
+        if (!fail_sc[i]) {
           ierr = NEPComputeError(nep,idx_sc[i],NEP_ERROR_RELATIVE,&error);CHKERRQ(ierr);
         }
-        if (error<=*tol || its_sc[i]>=its) {
+        if (error<=tol || its_sc[i]>=its || fail_sc[i]) {
           idx_sc[i] = idx++;
           its_sc[i] = 0;
           if (idx_sc[i]<k) { ierr = NEPSimpleNRefScatterEigenvector(nep,ctx,i,idx_sc[i]);CHKERRQ(ierr); }
@@ -339,7 +459,7 @@ PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol
       }
     }
     solved = PETSC_TRUE;
-    for (i=0;i<nep->npart&&solved;i++) solved = (idx_sc[i]<k)?PETSC_FALSE:PETSC_TRUE;
+    for (i=0;i<nep->npart&&solved;i++) solved = PetscNot(idx_sc[i]<k);
     if (idx_sc[color]<k) {
 #if !defined(PETSC_USE_COMPLEX)
       if (nep->eigi[idx_sc[color]]!=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),1,"Simple Refinement not implemented in real scalar for complex eigenvalues");
@@ -347,54 +467,110 @@ PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol
       if (nep->npart==1) {
         ierr = BVGetColumn(nep->V,idx_sc[color],&v);CHKERRQ(ierr);
       } else v = ctx->v; 
-      ierr = NEPSimpleNRefSetUpSystem(nep,ctx,ctx->A,idx_sc[color],&M,&T,ini,t,v);CHKERRQ(ierr);
-      ierr = KSPSetOperators(ksp,M,M);CHKERRQ(ierr);
+      ierr = NEPSimpleNRefSetUpSystem(nep,ctx,ctx->A,idx_sc[color],&Mt,&T,&P,ini,t[0],v);CHKERRQ(ierr);
+      ierr = KSPSetOperators(nep->refineksp,T,P);CHKERRQ(ierr);
       if (ini) {
-        ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr);
-        ierr = MatCreateVecs(M,&dvv,NULL);CHKERRQ(ierr);
-        ierr = VecDuplicate(dvv,&rr);CHKERRQ(ierr);
+        ierr = KSPSetFromOptions(nep->refineksp);CHKERRQ(ierr);
+        if (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT) {
+          ierr = MatCreateVecs(T,&dvv,NULL);CHKERRQ(ierr);
+          ierr = VecDuplicate(dvv,&rr);CHKERRQ(ierr);
+        }
         ini = PETSC_FALSE;
       }
-      ierr = MatMult(T,v,r);CHKERRQ(ierr);
-      ierr = VecGetArrayRead(r,&array);CHKERRQ(ierr);
-      if (rank==size-1) {
-        ierr = VecGetArray(rr,&array2);
-        ierr = PetscMemcpy(array2,array,n*sizeof(PetscScalar));CHKERRQ(ierr);
-        array2[n] = 0.0;
-        ierr = VecRestoreArray(rr,&array2);
-      } else {
-        ierr = VecPlaceArray(rr,array);CHKERRQ(ierr);
-      }
-      ierr = KSPSolve(ksp,rr,dvv);CHKERRQ(ierr);
-      if (rank != size-1) {
-        ierr = VecResetArray(rr);CHKERRQ(ierr);
+      switch (nep->scheme) {
+      case NEP_REFINE_SCHEME_EXPLICIT:
+        ierr = MatMult(Mt,v,r);CHKERRQ(ierr);
+        ierr = VecGetArrayRead(r,&array);CHKERRQ(ierr);
+        if (rank==size-1) {
+          ierr = VecGetArray(rr,&array2);CHKERRQ(ierr);
+          ierr = PetscMemcpy(array2,array,n*sizeof(PetscScalar));CHKERRQ(ierr);
+          array2[n] = 0.0;
+          ierr = VecRestoreArray(rr,&array2);CHKERRQ(ierr);
+        } else {
+          ierr = VecPlaceArray(rr,array);CHKERRQ(ierr);
+        }
+        ierr = KSPSolve(nep->refineksp,rr,dvv);CHKERRQ(ierr);
+        ierr = KSPGetConvergedReason(nep->refineksp,&reason);CHKERRQ(ierr);
+        if (reason>0) {
+          if (rank != size-1) {
+            ierr = VecResetArray(rr);CHKERRQ(ierr);
+          }
+          ierr = VecRestoreArrayRead(r,&array);CHKERRQ(ierr);
+          ierr = VecGetArrayRead(dvv,&array);CHKERRQ(ierr);
+          ierr = VecPlaceArray(dv,array);CHKERRQ(ierr);
+          ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
+          ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+          ierr = VecResetArray(dv);CHKERRQ(ierr);
+          if (rank==size-1) nep->eigr[idx_sc[color]] -= array[n];
+          ierr = VecRestoreArrayRead(dvv,&array);CHKERRQ(ierr);
+        } else fail_sc[color] = 1;
+        break;
+      case NEP_REFINE_SCHEME_MBE:
+        ierr = MatMult(T,v,r);CHKERRQ(ierr);
+        /* Mixed block elimination */
+        ierr = VecConjugate(v);CHKERRQ(ierr);
+        ierr = KSPSolveTranspose(nep->refineksp,v,t[0]);CHKERRQ(ierr);
+        ierr = KSPGetConvergedReason(nep->refineksp,&reason);CHKERRQ(ierr);
+        if (reason>0) {
+          ierr = VecConjugate(t[0]);CHKERRQ(ierr);
+          ierr = VecDot(ctx->w,t[0],&tt[0]);CHKERRQ(ierr);
+          ierr = KSPSolve(nep->refineksp,ctx->w,t[1]);CHKERRQ(ierr);
+          ierr = KSPGetConvergedReason(nep->refineksp,&reason);CHKERRQ(ierr);
+          if (reason>0) {
+            ierr = VecDot(t[1],v,&tt[1]);CHKERRQ(ierr);
+            ierr = VecDot(r,t[0],&ttt);CHKERRQ(ierr);
+            tt[0] = ttt/tt[0];
+            ierr = VecAXPY(r,-tt[0],ctx->w);CHKERRQ(ierr);
+            ierr = KSPSolve(nep->refineksp,r,dv);CHKERRQ(ierr);
+            ierr = KSPGetConvergedReason(nep->refineksp,&reason);CHKERRQ(ierr);
+            if (reason>0) {
+              ierr = VecDot(dv,v,&ttt);CHKERRQ(ierr);
+              tt[1] = ttt/tt[1];
+              ierr = VecAXPY(dv,-tt[1],t[1]);CHKERRQ(ierr);
+              deig = tt[0]+tt[1];
+            }
+          }
+          ierr = VecConjugate(v);CHKERRQ(ierr);
+          ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
+          ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+          nep->eigr[idx_sc[color]] -= deig;
+          fail_sc[color] = 0;
+        } else {
+          ierr = VecConjugate(v);CHKERRQ(ierr);
+          fail_sc[color] = 1;
+        }
+        break;
+      case NEP_REFINE_SCHEME_SCHUR:
+        ierr = MatShellGetContext(T,&fctx);CHKERRQ(ierr);
+        ierr = MatMult(fctx->M1,v,r);CHKERRQ(ierr);
+        ierr = KSPSolve(nep->refineksp,r,dv);CHKERRQ(ierr);
+        ierr = KSPGetConvergedReason(nep->refineksp,&reason);CHKERRQ(ierr);
+        if (reason>0) {
+          ierr = VecDot(dv,v,&deig);CHKERRQ(ierr);
+          deig *= -fctx->m3/fctx->M4;
+          ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
+          ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+          nep->eigr[idx_sc[color]] -= deig;
+          fail_sc[color] = 0;
+        } else fail_sc[color] = 1;
+        break;
       }
-      ierr = VecRestoreArrayRead(r,&array);CHKERRQ(ierr);
-      ierr = VecGetArrayRead(dvv,&array);CHKERRQ(ierr);
-      ierr = VecPlaceArray(dv,array);CHKERRQ(ierr);
-      ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
-      ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
-      ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
-      ierr = VecResetArray(dv);CHKERRQ(ierr);
-      if (rank==size-1) nep->eigr[idx_sc[color]] -= array[n];
-      ierr = VecRestoreArrayRead(dvv,&array);CHKERRQ(ierr);
-      if (nep->npart==1) { ierr = BVRestoreColumn(nep->V,idx_sc[color],&v);CHKERRQ(ierr); } 
+      if (nep->npart==1) { ierr = BVRestoreColumn(nep->V,idx_sc[color],&v);CHKERRQ(ierr); }
     }
   }
-  ierr = KSPDestroy(&ksp);CHKERRQ(ierr);
-  ierr = MatDestroy(&M);CHKERRQ(ierr);
-  ierr = MatDestroy(&T);CHKERRQ(ierr);
   ierr = VecDestroy(&t[0]);CHKERRQ(ierr);
   ierr = VecDestroy(&t[1]);CHKERRQ(ierr);
   ierr = VecDestroy(&dv);CHKERRQ(ierr);
-  ierr = VecDestroy(&dvv);CHKERRQ(ierr);
+  ierr = VecDestroy(&ctx->w);CHKERRQ(ierr);
   ierr = VecDestroy(&r);CHKERRQ(ierr);
-  ierr = VecDestroy(&rr);CHKERRQ(ierr);
-  ierr = PetscFree2(idx_sc,its_sc);CHKERRQ(ierr);
+  ierr = PetscFree3(idx_sc,its_sc,fail_sc);CHKERRQ(ierr);
+  ierr = VecScatterDestroy(&ctx->nst);CHKERRQ(ierr);
   if (nep->npart>1) {
     ierr = VecDestroy(&ctx->vg);CHKERRQ(ierr);
     ierr = VecDestroy(&ctx->v);CHKERRQ(ierr);
-    ierr = PetscSubcommDestroy(&ctx->subc);CHKERRQ(ierr);
     for (i=0;i<nep->nt;i++) {
       ierr = MatDestroy(&ctx->A[i]);CHKERRQ(ierr);
     }
@@ -402,10 +578,25 @@ PetscErrorCode NEPNewtonRefinementSimple(NEP nep,PetscInt *maxits,PetscReal *tol
       ierr = VecScatterDestroy(&ctx->scatter_id[i]);CHKERRQ(ierr);
     }
     ierr = PetscFree2(ctx->A,ctx->scatter_id);CHKERRQ(ierr);
-    for (i=0;i<nep->nt;i++) { ierr = FNDestroy(&ctx->fn[i]);CHKERRQ(ierr); }
-    ierr = PetscFree(ctx->fn);CHKERRQ(ierr);
   }
+  if (fctx && nep->scheme==NEP_REFINE_SCHEME_SCHUR) {
+    ierr = MatDestroy(&P);CHKERRQ(ierr);
+    ierr = MatDestroy(&fctx->M1);CHKERRQ(ierr);
+    ierr = PetscFree(fctx);CHKERRQ(ierr);
+  }
+  if (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT) {
+    ierr = MatDestroy(&Mt);CHKERRQ(ierr);
+    ierr = VecDestroy(&dvv);CHKERRQ(ierr);
+    ierr = VecDestroy(&rr);CHKERRQ(ierr);
+    ierr = VecDestroy(&ctx->nv);CHKERRQ(ierr);
+    if (nep->npart>1) {
+      for (i=0;i<nep->nt;i++) { ierr = FNDestroy(&ctx->fn[i]);CHKERRQ(ierr); }
+      ierr = PetscFree(ctx->fn);CHKERRQ(ierr);
+    }
+  }
+  ierr = MatDestroy(&T);CHKERRQ(ierr);
   ierr = PetscFree(ctx);CHKERRQ(ierr);
   ierr = PetscLogEventEnd(NEP_Refine,nep,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
+
diff --git a/src/nep/interface/neprefine.c.html b/src/nep/interface/neprefine.c.html
index 290e6b5..e16585c 100644
--- a/src/nep/interface/neprefine.c.html
+++ b/src/nep/interface/neprefine.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/neprefine.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:19+00:00">
+<meta name="date" content="2016-05-16T10:34:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/neprefine.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/neprefine.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Newton refinement for <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>, simple version.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -40,369 +40,556 @@
 
 <a name="line29"> 29: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
 <a name="line30"> 30: </a>  PetscSubcomm  subc;
-<a name="line31"> 31: </a>  VecScatter    *scatter_id;
+<a name="line31"> 31: </a>  VecScatter    *scatter_id,nst;
 <a name="line32"> 32: </a>  Mat           *A;
-<a name="line33"> 33: </a>  Vec           vg,v;
+<a name="line33"> 33: </a>  Vec           nv,vg,v,w;
 <a name="line34"> 34: </a>  <a href="../../../docs/manualpages/FN/FN.html#FN">FN</a>            *fn;
 <a name="line35"> 35: </a>} NEPSimpNRefctx;
 
-<a name="line39"> 39: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefSetUp"></a>static PetscErrorCode NEPSimpleNRefSetUp(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx **ctx_)</font></strong>
-<a name="line40"> 40: </a>{
-<a name="line42"> 42: </a>  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2;
-<a name="line43"> 43: </a>  IS             is1,is2;
-<a name="line44"> 44: </a>  NEPSimpNRefctx *ctx;
-<a name="line45"> 45: </a>  Vec            v;
+<a name="line37"> 37: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line38"> 38: </a>  Mat          M1;
+<a name="line39"> 39: </a>  Vec          M2,M3;
+<a name="line40"> 40: </a>  PetscScalar  M4,m3;
+<a name="line41"> 41: </a>} FSubctx;
 
-<a name="line48"> 48: </a>  PetscMalloc1(1,ctx_);
-<a name="line49"> 49: </a>  ctx = *ctx_;
-<a name="line50"> 50: </a>  <font color="#4169E1">if</font> (nep->npart==1) {
-<a name="line51"> 51: </a>    ctx->subc = NULL;
-<a name="line52"> 52: </a>    ctx->scatter_id = NULL;
-<a name="line53"> 53: </a>    ctx->A = nep->A;
-<a name="line54"> 54: </a>    ctx->fn = nep->f;
-<a name="line55"> 55: </a>  } <font color="#4169E1">else</font> {
-<a name="line56"> 56: </a>    PetscMalloc2(nep->nt,&ctx->A,nep->npart,&ctx->scatter_id);
+<a name="line45"> 45: </a><strong><font color="#4169E1"><a name="MatFSMult"></a>static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)</font></strong>
+<a name="line46"> 46: </a>{
+<a name="line48"> 48: </a>  FSubctx        *ctx;
+<a name="line49"> 49: </a>  PetscScalar    t;
+<a name="line50"> 50: </a>  
+<a name="line52"> 52: </a>  MatShellGetContext(M,&ctx);
+<a name="line53"> 53: </a>  VecDot(x,ctx->M3,&t);
+<a name="line54"> 54: </a>  t *= ctx->m3/ctx->M4;
+<a name="line55"> 55: </a>  MatMult(ctx->M1,x,y);
+<a name="line56"> 56: </a>  VecAXPY(y,-t,ctx->M2);
+<a name="line57"> 57: </a>  <font color="#4169E1">return</font>(0);
+<a name="line58"> 58: </a>}
 
-<a name="line58"> 58: </a>    <font color="#B22222">/* Split in subcomunicators */</font>
-<a name="line59"> 59: </a>    PetscSubcommCreate(PetscObjectComm((PetscObject)nep),&ctx->subc);
-<a name="line60"> 60: </a>    PetscSubcommSetNumber(ctx->subc,nep->npart);
-<a name="line61"> 61: </a>    PetscSubcommSetType(ctx->subc,PETSC_SUBCOMM_CONTIGUOUS);
-<a name="line62"> 62: </a>    PetscLogObjectMemory((PetscObject)nep,<font color="#4169E1">sizeof</font>(PetscSubcomm));
+<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefSetUp"></a>static PetscErrorCode NEPSimpleNRefSetUp(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx **ctx_)</font></strong>
+<a name="line63"> 63: </a>{
+<a name="line65"> 65: </a>  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2,ne;
+<a name="line66"> 66: </a>  IS             is1,is2;
+<a name="line67"> 67: </a>  NEPSimpNRefctx *ctx;
+<a name="line68"> 68: </a>  Vec            v;
+<a name="line69"> 69: </a>  PetscMPIInt    rank,size;
 
-<a name="line64"> 64: </a>    <font color="#B22222">/* Duplicate matrices */</font>
-<a name="line65"> 65: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line66"> 66: </a>      MatCreateRedundantMatrix(nep->A[i],0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&ctx->A[i]);
-<a name="line67"> 67: </a>    }
-<a name="line68"> 68: </a>    MatCreateVecs(ctx->A[0],&ctx->v,NULL);
+<a name="line72"> 72: </a>  PetscMalloc1(1,ctx_);
+<a name="line73"> 73: </a>  ctx = *ctx_;
+<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (nep->npart==1) {
+<a name="line75"> 75: </a>    ctx->subc = NULL;
+<a name="line76"> 76: </a>    ctx->scatter_id = NULL;
+<a name="line77"> 77: </a>    ctx->A = nep->A;
+<a name="line78"> 78: </a>    ctx->fn = nep->f;
+<a name="line79"> 79: </a>  } <font color="#4169E1">else</font> {
+<a name="line80"> 80: </a>    PetscMalloc2(nep->nt,&ctx->A,nep->npart,&ctx->scatter_id);
 
-<a name="line70"> 70: </a>    <font color="#B22222">/* Duplicate FNs */</font>
-<a name="line71"> 71: </a>    PetscMalloc1(nep->nt,&ctx->fn);
-<a name="line72"> 72: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line73"> 73: </a>      <a href="../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(nep->f[i],PetscSubcommChild(ctx->subc),&ctx->fn[i]);
-<a name="line74"> 74: </a>    }
+<a name="line82"> 82: </a>    <font color="#B22222">/* Duplicate matrices */</font>
+<a name="line83"> 83: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line84"> 84: </a>      MatCreateRedundantMatrix(nep->A[i],0,PetscSubcommChild(ctx->subc),MAT_INITIAL_MATRIX,&ctx->A[i]);
+<a name="line85"> 85: </a>    }
+<a name="line86"> 86: </a>    MatCreateVecs(ctx->A[0],&ctx->v,NULL);
 
-<a name="line76"> 76: </a>    <font color="#B22222">/* Create scatters for sending vectors to each subcommucator */</font>
-<a name="line77"> 77: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
-<a name="line78"> 78: </a>    VecGetOwnershipRange(v,&n0,&m0);
-<a name="line79"> 79: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v);
-<a name="line80"> 80: </a>    VecGetLocalSize(ctx->v,&nloc);
-<a name="line81"> 81: </a>    PetscMalloc2(m0-n0,&idx1,m0-n0,&idx2);
-<a name="line82"> 82: </a>    VecCreateMPI(PetscObjectComm((PetscObject)nep),nloc,PETSC_DECIDE,&ctx->vg);
-<a name="line83"> 83: </a>    <font color="#4169E1">for</font> (si=0;si<nep->npart;si++) {
-<a name="line84"> 84: </a>      j = 0;
-<a name="line85"> 85: </a>      <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
-<a name="line86"> 86: </a>        idx1[j]   = i;
-<a name="line87"> 87: </a>        idx2[j++] = i+nep->n*si;
-<a name="line88"> 88: </a>      }
-<a name="line89"> 89: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)nep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
-<a name="line90"> 90: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)nep),(m0-n0),idx2,PETSC_COPY_VALUES,&is2);
-<a name="line91"> 91: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
-<a name="line92"> 92: </a>      VecScatterCreate(v,is1,ctx->vg,is2,&ctx->scatter_id[si]);
-<a name="line93"> 93: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v);
-<a name="line94"> 94: </a>      ISDestroy(&is1);
-<a name="line95"> 95: </a>      ISDestroy(&is2);
-<a name="line96"> 96: </a>    }
-<a name="line97"> 97: </a>    PetscFree2(idx1,idx2);
-<a name="line98"> 98: </a>  }
-<a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);  
-<a name="line100">100: </a>}
+<a name="line88"> 88: </a>    <font color="#B22222">/* Duplicate FNs */</font>
+<a name="line89"> 89: </a>    PetscMalloc1(nep->nt,&ctx->fn);
+<a name="line90"> 90: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line91"> 91: </a>      <a href="../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(nep->f[i],PetscSubcommChild(ctx->subc),&ctx->fn[i]);
+<a name="line92"> 92: </a>    }
 
-<a name="line102">102: </a><font color="#B22222">/*</font>
-<a name="line103">103: </a><font color="#B22222">  Gather Eigenpair idx from subcommunicator with color sc</font>
-<a name="line104">104: </a><font color="#B22222">*/</font>
-<a name="line107">107: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefGatherEigenpair"></a>PetscErrorCode NEPSimpleNRefGatherEigenpair(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)</font></strong>
-<a name="line108">108: </a>{
-<a name="line110">110: </a>  PetscMPIInt    nproc,p;
-<a name="line111">111: </a>  MPI_Comm       comm=((PetscObject)nep)->comm;
-<a name="line112">112: </a>  Vec            v;
-<a name="line113">113: </a>  PetscScalar    *array;
+<a name="line94"> 94: </a>    <font color="#B22222">/* Create scatters for sending vectors to each subcommucator */</font>
+<a name="line95"> 95: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
+<a name="line96"> 96: </a>    VecGetOwnershipRange(v,&n0,&m0);
+<a name="line97"> 97: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v);
+<a name="line98"> 98: </a>    VecGetLocalSize(ctx->v,&nloc);
+<a name="line99"> 99: </a>    PetscMalloc2(m0-n0,&idx1,m0-n0,&idx2);
+<a name="line100">100: </a>    VecCreateMPI(PetscObjectComm((PetscObject)nep),nloc,PETSC_DECIDE,&ctx->vg);
+<a name="line101">101: </a>    <font color="#4169E1">for</font> (si=0;si<nep->npart;si++) {
+<a name="line102">102: </a>      j = 0;
+<a name="line103">103: </a>      <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line104">104: </a>        idx1[j]   = i;
+<a name="line105">105: </a>        idx2[j++] = i+nep->n*si;
+<a name="line106">106: </a>      }
+<a name="line107">107: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)nep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
+<a name="line108">108: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)nep),(m0-n0),idx2,PETSC_COPY_VALUES,&is2);
+<a name="line109">109: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
+<a name="line110">110: </a>      VecScatterCreate(v,is1,ctx->vg,is2,&ctx->scatter_id[si]);
+<a name="line111">111: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v);
+<a name="line112">112: </a>      ISDestroy(&is1);
+<a name="line113">113: </a>      ISDestroy(&is2);
+<a name="line114">114: </a>    }
+<a name="line115">115: </a>    PetscFree2(idx1,idx2);
+<a name="line116">116: </a>  }
+<a name="line117">117: </a>  <font color="#4169E1">if</font> (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line118">118: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)ctx->A[0]),&rank);
+<a name="line119">119: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)ctx->A[0]),&size);
+<a name="line120">120: </a>    <font color="#4169E1">if</font> (size>1) {
+<a name="line121">121: </a>      <font color="#4169E1">if</font> (nep->npart==1) {
+<a name="line122">122: </a>        <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
+<a name="line123">123: </a>      } <font color="#4169E1">else</font> {v = ctx->v;}
+<a name="line124">124: </a>      VecGetOwnershipRange(v,&n0,&m0);
+<a name="line125">125: </a>      ne = (rank == size-1)?nep->n:0;
+<a name="line126">126: </a>      VecCreateMPI(PetscObjectComm((PetscObject)ctx->A[0]),ne,PETSC_DECIDE,&ctx->nv);
+<a name="line127">127: </a>      PetscMalloc1(m0-n0,&idx1);
+<a name="line128">128: </a>      <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line129">129: </a>        idx1[i-n0] = i;
+<a name="line130">130: </a>      }
+<a name="line131">131: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)nep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
+<a name="line132">132: </a>      VecScatterCreate(v,is1,ctx->nv,is1,&ctx->nst);
+<a name="line133">133: </a>      <font color="#4169E1">if</font> (nep->npart==1) {
+<a name="line134">134: </a>        <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v);
+<a name="line135">135: </a>      }
+<a name="line136">136: </a>      PetscFree(idx1);
+<a name="line137">137: </a>      ISDestroy(&is1);
+<a name="line138">138: </a>    }
+<a name="line139">139: </a>  }  <font color="#4169E1">return</font>(0);  
+<a name="line140">140: </a>}
 
-<a name="line116">116: </a>  <font color="#B22222">/* The eigenvalue information is in the last process of the </font>
-<a name="line117">117: </a><font color="#B22222">     subcommunicator sc. p is its mapping in the general comm */</font>
-<a name="line118">118: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&nproc);
-<a name="line119">119: </a>  p = (nproc/nep->npart)*(sc+1)+PetscMin(nproc%nep->npart,sc+1)-1;
-<a name="line120">120: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&nep->eigr[idx],1,MPIU_SCALAR,p,comm);
+<a name="line142">142: </a><font color="#B22222">/*</font>
+<a name="line143">143: </a><font color="#B22222">  Gather Eigenpair idx from subcommunicator with color sc</font>
+<a name="line144">144: </a><font color="#B22222">*/</font>
+<a name="line147">147: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefGatherEigenpair"></a>static PetscErrorCode NEPSimpleNRefGatherEigenpair(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)</font></strong>
+<a name="line148">148: </a>{
+<a name="line150">150: </a>  PetscMPIInt    nproc,p;
+<a name="line151">151: </a>  MPI_Comm       comm=((PetscObject)nep)->comm;
+<a name="line152">152: </a>  Vec            v;
+<a name="line153">153: </a>  PetscScalar    *array;
 
-<a name="line122">122: </a>  <font color="#4169E1">if</font> (nep->npart>1) {
-<a name="line123">123: </a>    <font color="#B22222">/* Gather nep->V[idx] from the subcommuniator sc */</font>
-<a name="line124">124: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,idx,&v);
-<a name="line125">125: </a>    <font color="#4169E1">if</font> (ctx->subc->color==sc) {
-<a name="line126">126: </a>      VecGetArray(ctx->v,&array);
-<a name="line127">127: </a>      VecPlaceArray(ctx->vg,array);
-<a name="line128">128: </a>    }
-<a name="line129">129: </a>    VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line130">130: </a>    VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line131">131: </a>    <font color="#4169E1">if</font> (ctx->subc->color==sc) {
-<a name="line132">132: </a>      VecResetArray(ctx->vg);
-<a name="line133">133: </a>      VecRestoreArray(ctx->v,&array);
-<a name="line134">134: </a>    }
-<a name="line135">135: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,idx,&v);
-<a name="line136">136: </a>  }
-<a name="line137">137: </a>  <font color="#4169E1">return</font>(0);
-<a name="line138">138: </a>}
+<a name="line156">156: </a>  <font color="#4169E1">if</font> (nep->npart>1) {
+<a name="line157">157: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&nproc);
+<a name="line158">158: </a>    p = (nproc/nep->npart)*sc+PetscMin(sc,nproc%nep->npart);
+<a name="line159">159: </a>    <font color="#B22222">/* Communicate convergence successful */</font>
+<a name="line160">160: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(fail,1,MPIU_INT,p,comm);
+<a name="line161">161: </a>    <font color="#4169E1">if</font> (!(*fail)) {
+<a name="line162">162: </a>      <font color="#B22222">/* Process 0 of subcommunicator sc broadcasts the eigenvalue */</font> 
+<a name="line163">163: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&nep->eigr[idx],1,MPIU_SCALAR,p,comm);
+<a name="line164">164: </a>      <font color="#B22222">/* Gather nep->V[idx] from the subcommuniator sc */</font>
+<a name="line165">165: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,idx,&v);
+<a name="line166">166: </a>      <font color="#4169E1">if</font> (ctx->subc->color==sc) {
+<a name="line167">167: </a>        VecGetArray(ctx->v,&array);
+<a name="line168">168: </a>        VecPlaceArray(ctx->vg,array);
+<a name="line169">169: </a>      }
+<a name="line170">170: </a>      VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line171">171: </a>      VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line172">172: </a>      <font color="#4169E1">if</font> (ctx->subc->color==sc) {
+<a name="line173">173: </a>        VecResetArray(ctx->vg);
+<a name="line174">174: </a>        VecRestoreArray(ctx->v,&array);
+<a name="line175">175: </a>      }
+<a name="line176">176: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,idx,&v);
+<a name="line177">177: </a>    }
+<a name="line178">178: </a>  } <font color="#4169E1">else</font> {
+<a name="line179">179: </a>    <font color="#4169E1">if</font> (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT && !(*fail)) {
+<a name="line180">180: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&nproc);
+<a name="line181">181: </a>      p = (nproc/nep->npart)*sc+PetscMin(sc,nproc%nep->npart);
+<a name="line182">182: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&nep->eigr[idx],1,MPIU_SCALAR,p,comm);
+<a name="line183">183: </a>    }
+<a name="line184">184: </a>  }
+<a name="line185">185: </a>  <font color="#4169E1">return</font>(0);
+<a name="line186">186: </a>}
 
-<a name="line142">142: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefScatterEigenvector"></a>PetscErrorCode NEPSimpleNRefScatterEigenvector(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)</font></strong>
-<a name="line143">143: </a>{
-<a name="line145">145: </a>  Vec            v;
-<a name="line146">146: </a>  PetscScalar    *array;
-<a name="line147">147: </a>  
-<a name="line149">149: </a>  <font color="#4169E1">if</font> (nep->npart>1) {
-<a name="line150">150: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,idx,&v);
-<a name="line151">151: </a>    <font color="#4169E1">if</font> (ctx->subc->color==sc) {
-<a name="line152">152: </a>      VecGetArray(ctx->v,&array);
-<a name="line153">153: </a>      VecPlaceArray(ctx->vg,array);
-<a name="line154">154: </a>    }
-<a name="line155">155: </a>    VecScatterBegin(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line156">156: </a>    VecScatterEnd(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line157">157: </a>    <font color="#4169E1">if</font> (ctx->subc->color==sc) {
-<a name="line158">158: </a>      VecResetArray(ctx->vg);
-<a name="line159">159: </a>      VecRestoreArray(ctx->v,&array);
-<a name="line160">160: </a>    }
-<a name="line161">161: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,idx,&v);
-<a name="line162">162: </a>  }
-<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
-<a name="line164">164: </a>}
+<a name="line190">190: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefScatterEigenvector"></a>static PetscErrorCode NEPSimpleNRefScatterEigenvector(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)</font></strong>
+<a name="line191">191: </a>{
+<a name="line193">193: </a>  Vec            v;
+<a name="line194">194: </a>  PetscScalar    *array;
+<a name="line195">195: </a>  
+<a name="line197">197: </a>  <font color="#4169E1">if</font> (nep->npart>1) {
+<a name="line198">198: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,idx,&v);
+<a name="line199">199: </a>    <font color="#4169E1">if</font> (ctx->subc->color==sc) {
+<a name="line200">200: </a>      VecGetArray(ctx->v,&array);
+<a name="line201">201: </a>      VecPlaceArray(ctx->vg,array);
+<a name="line202">202: </a>    }
+<a name="line203">203: </a>    VecScatterBegin(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line204">204: </a>    VecScatterEnd(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line205">205: </a>    <font color="#4169E1">if</font> (ctx->subc->color==sc) {
+<a name="line206">206: </a>      VecResetArray(ctx->vg);
+<a name="line207">207: </a>      VecRestoreArray(ctx->v,&array);
+<a name="line208">208: </a>    }
+<a name="line209">209: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,idx,&v);
+<a name="line210">210: </a>  }
+<a name="line211">211: </a>  <font color="#4169E1">return</font>(0);
+<a name="line212">212: </a>}
 
-<a name="line168">168: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefSetUpSystem"></a>static PetscErrorCode NEPSimpleNRefSetUpSystem(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)</font></strong>
-<a name="line169">169: </a>{
-<a name="line170">170: </a>  PetscErrorCode    ierr;
-<a name="line171">171: </a>  PetscInt          i,st,ml,m0,m1,mg;
-<a name="line172">172: </a>  PetscInt          *dnz,*onz,ncols,*cols2,*nnz,nt=nep->nt;
-<a name="line173">173: </a>  PetscScalar       zero=0.0,*coeffs;
-<a name="line174">174: </a>  PetscMPIInt       rank,size;
-<a name="line175">175: </a>  MPI_Comm          comm;
-<a name="line176">176: </a>  const PetscInt    *cols;
-<a name="line177">177: </a>  const PetscScalar *vals,*array;
-<a name="line178">178: </a>  Vec               w=t[1],q=t[0];
+<a name="line216">216: </a><strong><font color="#4169E1"><a name="NEPSimpleNRefSetUpSystem"></a>static PetscErrorCode NEPSimpleNRefSetUpSystem(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,NEPSimpNRefctx *ctx,Mat *A,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)</font></strong>
+<a name="line217">217: </a>{
+<a name="line218">218: </a>  PetscErrorCode    ierr;
+<a name="line219">219: </a>  PetscInt          i,st,ml,m0,n0,m1,mg;
+<a name="line220">220: </a>  PetscInt          *dnz,*onz,ncols,*cols2,*nnz,nt=nep->nt;
+<a name="line221">221: </a>  PetscScalar       zero=0.0,*coeffs,*coeffs2;
+<a name="line222">222: </a>  PetscMPIInt       rank,size;
+<a name="line223">223: </a>  MPI_Comm          comm;
+<a name="line224">224: </a>  const PetscInt    *cols;
+<a name="line225">225: </a>  const PetscScalar *vals,*array;
+<a name="line226">226: </a>  FSubctx           *fctx;
+<a name="line227">227: </a>  Vec               w=ctx->w;
+<a name="line228">228: </a>  Mat               M;
 
-<a name="line181">181: </a>  comm = PetscObjectComm((PetscObject)A[0]);
-<a name="line182">182: </a>  PetscMalloc1(nt,&coeffs);
-<a name="line183">183: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
-<a name="line184">184: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
-<a name="line185">185: </a>  <font color="#4169E1">if</font> (ini) {
-<a name="line186">186: </a>    MatDuplicate(A[0],MAT_COPY_VALUES,T);
-<a name="line187">187: </a>  } <font color="#4169E1">else</font> {
-<a name="line188">188: </a>    MatCopy(A[0],*T,SUBSET_NONZERO_PATTERN);
-<a name="line189">189: </a>  }
-<a name="line190">190: </a>  <font color="#4169E1">for</font> (i=0;i<nt;i++) {
-<a name="line191">191: </a>    <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->fn[i],nep->eigr[idx],coeffs+i);
-<a name="line192">192: </a>  }
-<a name="line193">193: </a>  <font color="#4169E1">if</font> (coeffs[0]!=1.0) {
-<a name="line194">194: </a>    MatScale(*T,coeffs[0]);
-<a name="line195">195: </a>  }
-<a name="line196">196: </a>  <font color="#4169E1">for</font> (i=1;i<nt;i++) {
-<a name="line197">197: </a>    MatAXPY(*T,coeffs[i],A[i],(ini)?DIFFERENT_NONZERO_PATTERN:SUBSET_NONZERO_PATTERN);
-<a name="line198">198: </a>  }
-<a name="line199">199: </a>  MatGetSize(*T,&mg,NULL);
-<a name="line200">200: </a>  MatGetOwnershipRange(*T,&m0,&m1);
-<a name="line201">201: </a>  <font color="#4169E1">if</font> (ini) {
-<a name="line202">202: </a>    MatCreate(comm,M);
-<a name="line203">203: </a>    MatGetLocalSize(*T,&ml,NULL);
-<a name="line204">204: </a>    <font color="#4169E1">if</font> (rank==size-1) ml++;
-<a name="line205">205: </a>    MatSetSizes(*M,ml,ml,mg+1,mg+1);
-<a name="line206">206: </a>    MatSetFromOptions(*M);
-<a name="line207">207: </a>    MatSetUp(*M);
-<a name="line208">208: </a>    <font color="#B22222">/* Preallocate M */</font>
-<a name="line209">209: </a>    <font color="#4169E1">if</font> (size>1) {
-<a name="line210">210: </a>      MatPreallocateInitialize(comm,ml,ml,dnz,onz);
-<a name="line211">211: </a>      <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
-<a name="line212">212: </a>        MatGetRow(*T,i,&ncols,&cols,NULL);
-<a name="line213">213: </a>        MatPreallocateSet(i,ncols,cols,dnz,onz);
-<a name="line214">214: </a>        MatPreallocateSet(i,1,&mg,dnz,onz);
-<a name="line215">215: </a>        MatRestoreRow(*T,i,&ncols,&cols,NULL);
-<a name="line216">216: </a>      }
-<a name="line217">217: </a>      <font color="#4169E1">if</font> (rank==size-1) {
-<a name="line218">218: </a>        PetscCalloc1(mg+1,&cols2);
-<a name="line219">219: </a>        <font color="#4169E1">for</font> (i=0;i<mg+1;i++) cols2[i]=i;
-<a name="line220">220: </a>        MatPreallocateSet(m1,mg+1,cols2,dnz,onz);
-<a name="line221">221: </a>        PetscFree(cols2);
-<a name="line222">222: </a>      }
-<a name="line223">223: </a>      MatMPIAIJSetPreallocation(*M,0,dnz,0,onz);
-<a name="line224">224: </a>      MatPreallocateFinalize(dnz,onz);
-<a name="line225">225: </a>    } <font color="#4169E1">else</font> {
-<a name="line226">226: </a>      PetscCalloc1(mg+1,&nnz);
-<a name="line227">227: </a>      <font color="#4169E1">for</font> (i=0;i<mg;i++) {
-<a name="line228">228: </a>        MatGetRow(*T,i,&ncols,NULL,NULL);
-<a name="line229">229: </a>        nnz[i] = ncols+1;
-<a name="line230">230: </a>        MatRestoreRow(*T,i,&ncols,NULL,NULL);
-<a name="line231">231: </a>      }
-<a name="line232">232: </a>      nnz[mg] = mg+1;
-<a name="line233">233: </a>      MatSeqAIJSetPreallocation(*M,0,nnz);
-<a name="line234">234: </a>      PetscFree(nnz);
-<a name="line235">235: </a>    }
-<a name="line236">236: </a>  }
-<a name="line237">237: </a>  <font color="#4169E1">for</font> (i=0;i<nt;i++) {
-<a name="line238">238: </a>    <a href="../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->fn[i],nep->eigr[idx],coeffs+i);
-<a name="line239">239: </a>  }
-<a name="line240">240: </a>  st = 0;
-<a name="line241">241: </a>  <font color="#4169E1">for</font> (i=0;i<nt && PetscAbsScalar(coeffs[i])==0.0;i++) st++;
-<a name="line242">242: </a>  MatMult(A[st],v,w);
-<a name="line243">243: </a>  <font color="#4169E1">if</font> (coeffs[st]!=1.0) {
-<a name="line244">244: </a>    VecScale(w,coeffs[st]);
-<a name="line245">245: </a>  }
-<a name="line246">246: </a>  <font color="#4169E1">for</font> (i=st+1;i<nt;i++) {
-<a name="line247">247: </a>    MatMult(A[i],v,q);
-<a name="line248">248: </a>    VecAXPY(w,coeffs[i],q);
-<a name="line249">249: </a>  }
-<a name="line250">250: </a>  <font color="#B22222">/* Set values */</font>
-<a name="line251">251: </a>  PetscMalloc1(m1-m0,&cols2);
-<a name="line252">252: </a>  <font color="#4169E1">for</font> (i=0;i<m1-m0;i++) cols2[i]=m0+i;
-<a name="line253">253: </a>  VecGetArrayRead(w,&array);
-<a name="line254">254: </a>  <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
-<a name="line255">255: </a>    MatGetRow(*T,i,&ncols,&cols,&vals);
-<a name="line256">256: </a>    MatSetValues(*M,1,&i,ncols,cols,vals,INSERT_VALUES);
-<a name="line257">257: </a>    MatRestoreRow(*T,i,&ncols,&cols,&vals);
-<a name="line258">258: </a>    MatSetValues(*M,1,&i,1,&mg,array+i-m0,INSERT_VALUES);
-<a name="line259">259: </a>  }
-<a name="line260">260: </a>  VecRestoreArrayRead(w,&array);
-<a name="line261">261: </a>  VecConjugate(v);
-<a name="line262">262: </a>  VecGetArrayRead(v,&array);
-<a name="line263">263: </a>  MatSetValues(*M,1,&mg,m1-m0,cols2,array,INSERT_VALUES);
-<a name="line264">264: </a>  MatSetValues(*M,1,&mg,1,&mg,&zero,INSERT_VALUES);
-<a name="line265">265: </a>  VecRestoreArrayRead(v,&array);
-<a name="line266">266: </a>  VecConjugate(v);
-<a name="line267">267: </a>  MatAssemblyBegin(*M,MAT_FINAL_ASSEMBLY);
-<a name="line268">268: </a>  MatAssemblyEnd(*M,MAT_FINAL_ASSEMBLY);  
-<a name="line269">269: </a>  PetscFree(cols2);
-<a name="line270">270: </a>  PetscFree(coeffs);
-<a name="line271">271: </a>  <font color="#4169E1">return</font>(0);
-<a name="line272">272: </a>}
+<a name="line231">231: </a>  PetscMalloc2(nt,&coeffs,nt,&coeffs2);
+<a name="line232">232: </a>  <font color="#4169E1">switch</font> (nep->scheme) {
+<a name="line233">233: </a>  <font color="#4169E1">case</font> NEP_REFINE_SCHEME_SCHUR:
+<a name="line234">234: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line235">235: </a>      PetscCalloc1(1,&fctx);
+<a name="line236">236: </a>      MatGetSize(A[0],&m0,&n0);
+<a name="line237">237: </a>      MatCreateShell(PetscObjectComm((PetscObject)A[0]),PETSC_DECIDE,PETSC_DECIDE,m0,n0,fctx,T);
+<a name="line238">238: </a>      MatShellSetOperation(*T,MATOP_MULT,(void(*)(void))MatFSMult);
+<a name="line239">239: </a>    } <font color="#4169E1">else</font> {
+<a name="line240">240: </a>      MatShellGetContext(*T,&fctx);
+<a name="line241">241: </a>    }    
+<a name="line242">242: </a>    M=fctx->M1;
+<a name="line243">243: </a>    <font color="#4169E1">break</font>;
+<a name="line244">244: </a>  <font color="#4169E1">case</font> NEP_REFINE_SCHEME_MBE:
+<a name="line245">245: </a>    M=*T;
+<a name="line246">246: </a>    <font color="#4169E1">break</font>;
+<a name="line247">247: </a>  <font color="#4169E1">case</font> NEP_REFINE_SCHEME_EXPLICIT:
+<a name="line248">248: </a>    M=*Mt;
+<a name="line249">249: </a>    <font color="#4169E1">break</font>;
+<a name="line250">250: </a>  }
+<a name="line251">251: </a>  <font color="#4169E1">if</font> (ini) {
+<a name="line252">252: </a>    MatDuplicate(A[0],MAT_COPY_VALUES,&M);
+<a name="line253">253: </a>  } <font color="#4169E1">else</font> {
+<a name="line254">254: </a>    MatCopy(A[0],M,DIFFERENT_NONZERO_PATTERN);
+<a name="line255">255: </a>  }
+<a name="line256">256: </a>  <font color="#4169E1">for</font> (i=0;i<nt;i++) {
+<a name="line257">257: </a>    <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->fn[i],nep->eigr[idx],coeffs+i);
+<a name="line258">258: </a>  }
+<a name="line259">259: </a>  <font color="#4169E1">if</font> (coeffs[0]!=1.0) {
+<a name="line260">260: </a>    MatScale(M,coeffs[0]);
+<a name="line261">261: </a>  }
+<a name="line262">262: </a>  <font color="#4169E1">for</font> (i=1;i<nt;i++) {
+<a name="line263">263: </a>    MatAXPY(M,coeffs[i],A[i],(ini)?nep->mstr:SUBSET_NONZERO_PATTERN);
+<a name="line264">264: </a>  }
+<a name="line265">265: </a>  <font color="#4169E1">for</font> (i=0;i<nt;i++) {
+<a name="line266">266: </a>    <a href="../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->fn[i],nep->eigr[idx],coeffs2+i);
+<a name="line267">267: </a>  }
+<a name="line268">268: </a>  st = 0;
+<a name="line269">269: </a>  <font color="#4169E1">for</font> (i=0;i<nt && PetscAbsScalar(coeffs2[i])==0.0;i++) st++;
+<a name="line270">270: </a>  MatMult(A[st],v,w);
+<a name="line271">271: </a>  <font color="#4169E1">if</font> (coeffs2[st]!=1.0) {
+<a name="line272">272: </a>    VecScale(w,coeffs2[st]);
+<a name="line273">273: </a>  }
+<a name="line274">274: </a>  <font color="#4169E1">for</font> (i=st+1;i<nt;i++) {
+<a name="line275">275: </a>    MatMult(A[i],v,t);
+<a name="line276">276: </a>    VecAXPY(w,coeffs2[i],t);
+<a name="line277">277: </a>  }
 
-<a name="line276">276: </a><strong><font color="#4169E1"><a name="NEPNewtonRefinementSimple"></a>PetscErrorCode NEPNewtonRefinementSimple(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *maxits,PetscReal *tol,PetscInt k)</font></strong>
-<a name="line277">277: </a>{
-<a name="line278">278: </a>  PetscErrorCode    ierr;
-<a name="line279">279: </a>  PetscInt          i,n,its,idx=0,*idx_sc,*its_sc,color;
-<a name="line280">280: </a>  PetscMPIInt       rank,size;
-<a name="line281">281: </a>  KSP               ksp;
-<a name="line282">282: </a>  Mat               M=NULL,T=NULL;
-<a name="line283">283: </a>  MPI_Comm          comm;
-<a name="line284">284: </a>  Vec               r,v,dv,rr=NULL,dvv=NULL,t[2];
-<a name="line285">285: </a>  const PetscScalar *array;
-<a name="line286">286: </a>  PetscScalar       *array2;
-<a name="line287">287: </a>  PetscReal         norm,error;
-<a name="line288">288: </a>  PetscBool         ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
-<a name="line289">289: </a>  NEPSimpNRefctx    *ctx;
+<a name="line279">279: </a>  <font color="#4169E1">switch</font> (nep->scheme) {
+<a name="line280">280: </a>  <font color="#4169E1">case</font> NEP_REFINE_SCHEME_EXPLICIT:
+<a name="line281">281: </a>    comm = PetscObjectComm((PetscObject)A[0]);
+<a name="line282">282: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
+<a name="line283">283: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
+<a name="line284">284: </a>    MatGetSize(M,&mg,NULL);
+<a name="line285">285: </a>    MatGetOwnershipRange(M,&m0,&m1);
+<a name="line286">286: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line287">287: </a>      MatCreate(comm,T);
+<a name="line288">288: </a>      MatGetLocalSize(M,&ml,NULL);
+<a name="line289">289: </a>      <font color="#4169E1">if</font> (rank==size-1) ml++;
+<a name="line290">290: </a>      MatSetSizes(*T,ml,ml,mg+1,mg+1);
+<a name="line291">291: </a>      MatSetFromOptions(*T);
+<a name="line292">292: </a>      MatSetUp(*T);
+<a name="line293">293: </a>      <font color="#B22222">/* Preallocate M */</font>
+<a name="line294">294: </a>      <font color="#4169E1">if</font> (size>1) {
+<a name="line295">295: </a>        MatPreallocateInitialize(comm,ml,ml,dnz,onz);
+<a name="line296">296: </a>        <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
+<a name="line297">297: </a>          MatGetRow(M,i,&ncols,&cols,NULL);
+<a name="line298">298: </a>          MatPreallocateSet(i,ncols,cols,dnz,onz);
+<a name="line299">299: </a>          MatPreallocateSet(i,1,&mg,dnz,onz);
+<a name="line300">300: </a>          MatRestoreRow(M,i,&ncols,&cols,NULL);
+<a name="line301">301: </a>        }
+<a name="line302">302: </a>        <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line303">303: </a>          PetscCalloc1(mg+1,&cols2);
+<a name="line304">304: </a>          <font color="#4169E1">for</font> (i=0;i<mg+1;i++) cols2[i]=i;
+<a name="line305">305: </a>          MatPreallocateSet(m1,mg+1,cols2,dnz,onz);
+<a name="line306">306: </a>          PetscFree(cols2);
+<a name="line307">307: </a>        }
+<a name="line308">308: </a>        MatMPIAIJSetPreallocation(*T,0,dnz,0,onz);
+<a name="line309">309: </a>        MatPreallocateFinalize(dnz,onz);
+<a name="line310">310: </a>      } <font color="#4169E1">else</font> {
+<a name="line311">311: </a>        PetscCalloc1(mg+1,&nnz);
+<a name="line312">312: </a>        <font color="#4169E1">for</font> (i=0;i<mg;i++) {
+<a name="line313">313: </a>          MatGetRow(M,i,&ncols,NULL,NULL);
+<a name="line314">314: </a>          nnz[i] = ncols+1;
+<a name="line315">315: </a>          MatRestoreRow(M,i,&ncols,NULL,NULL);
+<a name="line316">316: </a>        }
+<a name="line317">317: </a>        nnz[mg] = mg+1;
+<a name="line318">318: </a>        MatSeqAIJSetPreallocation(*T,0,nnz);
+<a name="line319">319: </a>        PetscFree(nnz);
+<a name="line320">320: </a>      }
+<a name="line321">321: </a>      *Mt = M;
+<a name="line322">322: </a>      *P  = *T;
+<a name="line323">323: </a>    }
+<a name="line324">324: </a>  
+<a name="line325">325: </a>    <font color="#B22222">/* Set values */</font>
+<a name="line326">326: </a>    VecGetArrayRead(w,&array);
+<a name="line327">327: </a>    <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
+<a name="line328">328: </a>      MatGetRow(M,i,&ncols,&cols,&vals);
+<a name="line329">329: </a>      MatSetValues(*T,1,&i,ncols,cols,vals,INSERT_VALUES);
+<a name="line330">330: </a>      MatRestoreRow(M,i,&ncols,&cols,&vals);
+<a name="line331">331: </a>      MatSetValues(*T,1,&i,1,&mg,array+i-m0,INSERT_VALUES);
+<a name="line332">332: </a>    }
+<a name="line333">333: </a>    VecRestoreArrayRead(w,&array);
+<a name="line334">334: </a>    VecConjugate(v);
+<a name="line335">335: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)A[0]),&size);
+<a name="line336">336: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)A[0]),&rank);
+<a name="line337">337: </a>    <font color="#4169E1">if</font> (size>1) {
+<a name="line338">338: </a>      <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line339">339: </a>        PetscMalloc1(nep->n,&cols2);
+<a name="line340">340: </a>        <font color="#4169E1">for</font> (i=0;i<nep->n;i++) cols2[i]=i;
+<a name="line341">341: </a>      }
+<a name="line342">342: </a>      VecScatterBegin(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line343">343: </a>      VecScatterEnd(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line344">344: </a>      VecGetArrayRead(ctx->nv,&array);
+<a name="line345">345: </a>      <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line346">346: </a>        MatSetValues(*T,1,&mg,nep->n,cols2,array,INSERT_VALUES);
+<a name="line347">347: </a>        MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);
+<a name="line348">348: </a>      }
+<a name="line349">349: </a>      VecRestoreArrayRead(ctx->nv,&array);
+<a name="line350">350: </a>    } <font color="#4169E1">else</font> {  
+<a name="line351">351: </a>      PetscMalloc1(m1-m0,&cols2);
+<a name="line352">352: </a>      <font color="#4169E1">for</font> (i=0;i<m1-m0;i++) cols2[i]=m0+i;
+<a name="line353">353: </a>      VecGetArrayRead(v,&array);
+<a name="line354">354: </a>      MatSetValues(*T,1,&mg,m1-m0,cols2,array,INSERT_VALUES);
+<a name="line355">355: </a>      MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);
+<a name="line356">356: </a>      VecRestoreArrayRead(v,&array);
+<a name="line357">357: </a>    }
+<a name="line358">358: </a>    VecConjugate(v);
+<a name="line359">359: </a>    MatAssemblyBegin(*T,MAT_FINAL_ASSEMBLY);
+<a name="line360">360: </a>    MatAssemblyEnd(*T,MAT_FINAL_ASSEMBLY);  
+<a name="line361">361: </a>    PetscFree(cols2);
+<a name="line362">362: </a>    <font color="#4169E1">break</font>; 
+<a name="line363">363: </a>  <font color="#4169E1">case</font> NEP_REFINE_SCHEME_SCHUR:
+<a name="line364">364: </a>    fctx->M2 = ctx->w;
+<a name="line365">365: </a>    fctx->M3 = v;
+<a name="line366">366: </a>    fctx->m3 = 0.0;
+<a name="line367">367: </a>    <font color="#4169E1">for</font> (i=1;i<nt-1;i++) fctx->m3 += PetscConj(coeffs[i])*coeffs[i];
+<a name="line368">368: </a>    fctx->M4 = 0.0;
+<a name="line369">369: </a>    <font color="#4169E1">for</font> (i=1;i<nt-1;i++) fctx->M4 += PetscConj(coeffs[i])*coeffs2[i];
+<a name="line370">370: </a>    fctx->M1 = M;
+<a name="line371">371: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line372">372: </a>      MatDuplicate(M,MAT_COPY_VALUES,P);
+<a name="line373">373: </a>    } <font color="#4169E1">else</font> {
+<a name="line374">374: </a>      MatCopy(M,*P,SAME_NONZERO_PATTERN);
+<a name="line375">375: </a>    }
+<a name="line376">376: </a>    VecConjugate(v);
+<a name="line377">377: </a>    VecPointwiseMult(t,v,w);
+<a name="line378">378: </a>    VecConjugate(v);
+<a name="line379">379: </a>    VecScale(t,-fctx->m3/fctx->M4);
+<a name="line380">380: </a>    MatDiagonalSet(*P,t,ADD_VALUES);
+<a name="line381">381: </a>    <font color="#4169E1">break</font>;
+<a name="line382">382: </a>  <font color="#4169E1">case</font> NEP_REFINE_SCHEME_MBE:
+<a name="line383">383: </a>    *T = M;
+<a name="line384">384: </a>    *P = M;
+<a name="line385">385: </a>    <font color="#4169E1">break</font>;
+<a name="line386">386: </a>  }
+<a name="line387">387: </a>  PetscFree2(coeffs,coeffs2);
+<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
+<a name="line389">389: </a>}
+
+<a name="line393">393: </a><strong><font color="#4169E1"><a name="NEPNewtonRefinementSimple"></a>PetscErrorCode NEPNewtonRefinementSimple(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *maxits,PetscReal tol,PetscInt k)</font></strong>
+<a name="line394">394: </a>{
+<a name="line395">395: </a>  PetscErrorCode    ierr;
+<a name="line396">396: </a>  PetscInt          i,n,its,idx=0,*idx_sc,*its_sc,color,*fail_sc;
+<a name="line397">397: </a>  PetscMPIInt       rank,size;
+<a name="line398">398: </a>  Mat               Mt=NULL,T=NULL,P=NULL;
+<a name="line399">399: </a>  MPI_Comm          comm;
+<a name="line400">400: </a>  Vec               r,v,dv,rr=NULL,dvv=NULL,t[2];
+<a name="line401">401: </a>  const PetscScalar *array;
+<a name="line402">402: </a>  PetscScalar       *array2,deig=0.0,tt[2],ttt;
+<a name="line403">403: </a>  PetscReal         norm,error;
+<a name="line404">404: </a>  PetscBool         ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
+<a name="line405">405: </a>  NEPSimpNRefctx    *ctx;
+<a name="line406">406: </a>  FSubctx            *fctx=NULL;
+<a name="line407">407: </a>  KSPConvergedReason reason;
+
+<a name="line410">410: </a>  PetscLogEventBegin(NEP_Refine,nep,0,0,0);
+<a name="line411">411: </a>  NEPSimpleNRefSetUp(nep,&ctx);
+<a name="line412">412: </a>  its = (maxits)?*maxits:NREF_MAXIT;
+<a name="line413">413: </a>  comm = (nep->npart==1)?PetscObjectComm((PetscObject)nep):PetscSubcommChild(ctx->subc);
+<a name="line414">414: </a>  <font color="#4169E1">if</font> (!nep->refineksp) { <a href="../../../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a>(nep,&nep->refineksp); }
+<a name="line415">415: </a>  <font color="#4169E1">if</font> (nep->npart==1) {
+<a name="line416">416: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
+<a name="line417">417: </a>  } <font color="#4169E1">else</font> v = ctx->v;
+<a name="line418">418: </a>  VecDuplicate(v,&ctx->w);
+<a name="line419">419: </a>  VecDuplicate(v,&r);
+<a name="line420">420: </a>  VecDuplicate(v,&dv);
+<a name="line421">421: </a>  VecDuplicate(v,&t[0]);
+<a name="line422">422: </a>  VecDuplicate(v,&t[1]);
+<a name="line423">423: </a>  <font color="#4169E1">if</font> (nep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v); }
+<a name="line424">424: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
+<a name="line425">425: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
+<a name="line426">426: </a>  VecGetLocalSize(r,&n);
+<a name="line427">427: </a>  PetscMalloc3(nep->npart,&idx_sc,nep->npart,&its_sc,nep->npart,&fail_sc);
+<a name="line428">428: </a>  <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) fail_sc[i] = 0;
+<a name="line429">429: </a>  <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) its_sc[i] = 0;
+<a name="line430">430: </a>  color = (nep->npart==1)?0:ctx->subc->color;
+<a name="line431">431: </a>   
+<a name="line432">432: </a>  <font color="#B22222">/* Loop performing iterative refinements */</font>
+<a name="line433">433: </a>  <font color="#4169E1">while</font> (!solved) {
+<a name="line434">434: </a>    <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) {
+<a name="line435">435: </a>      sc_pend = PETSC_TRUE;
+<a name="line436">436: </a>      <font color="#4169E1">if</font> (its_sc[i]==0) {
+<a name="line437">437: </a>        idx_sc[i] = idx++;
+<a name="line438">438: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) {
+<a name="line439">439: </a>          sc_pend = PETSC_FALSE;
+<a name="line440">440: </a>        } <font color="#4169E1">else</font> {
+<a name="line441">441: </a>          NEPSimpleNRefScatterEigenvector(nep,ctx,i,idx_sc[i]);
+<a name="line442">442: </a>        }
+<a name="line443">443: </a>      }  <font color="#4169E1">else</font> { <font color="#B22222">/* Gather Eigenpair from subcommunicator i */</font>
+<a name="line444">444: </a>        NEPSimpleNRefGatherEigenpair(nep,ctx,i,idx_sc[i],&fail_sc[i]);
+<a name="line445">445: </a>      }
+<a name="line446">446: </a>      <font color="#4169E1">while</font> (sc_pend) {
+<a name="line447">447: </a>        <font color="#4169E1">if</font> (!fail_sc[i]) {
+<a name="line448">448: </a>          <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,idx_sc[i],NEP_ERROR_RELATIVE,&error);
+<a name="line449">449: </a>        }
+<a name="line450">450: </a>        <font color="#4169E1">if</font> (error<=tol || its_sc[i]>=its || fail_sc[i]) {
+<a name="line451">451: </a>          idx_sc[i] = idx++;
+<a name="line452">452: </a>          its_sc[i] = 0;
+<a name="line453">453: </a>          <font color="#4169E1">if</font> (idx_sc[i]<k) { NEPSimpleNRefScatterEigenvector(nep,ctx,i,idx_sc[i]); }
+<a name="line454">454: </a>        } <font color="#4169E1">else</font> {
+<a name="line455">455: </a>          sc_pend = PETSC_FALSE;
+<a name="line456">456: </a>          its_sc[i]++;
+<a name="line457">457: </a>        }
+<a name="line458">458: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) sc_pend = PETSC_FALSE;
+<a name="line459">459: </a>      }
+<a name="line460">460: </a>    }
+<a name="line461">461: </a>    solved = PETSC_TRUE;
+<a name="line462">462: </a>    <font color="#4169E1">for</font> (i=0;i<nep->npart&&solved;i++) solved = PetscNot(idx_sc[i]<k);
+<a name="line463">463: </a>    <font color="#4169E1">if</font> (idx_sc[color]<k) {
+<a name="line464">464: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line465">465: </a>      <font color="#4169E1">if</font> (nep->eigi[idx_sc[color]]!=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Simple Refinement not implemented in real scalar for complex eigenvalues"</font>);
+<a name="line466">466: </a><font color="#A020F0">#endif</font>
+<a name="line467">467: </a>      <font color="#4169E1">if</font> (nep->npart==1) {
+<a name="line468">468: </a>        <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,idx_sc[color],&v);
+<a name="line469">469: </a>      } <font color="#4169E1">else</font> v = ctx->v; 
+<a name="line470">470: </a>      NEPSimpleNRefSetUpSystem(nep,ctx,ctx->A,idx_sc[color],&Mt,&T,&P,ini,t[0],v);
+<a name="line471">471: </a>      KSPSetOperators(nep->refineksp,T,P);
+<a name="line472">472: </a>      <font color="#4169E1">if</font> (ini) {
+<a name="line473">473: </a>        KSPSetFromOptions(nep->refineksp);
+<a name="line474">474: </a>        <font color="#4169E1">if</font> (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line475">475: </a>          MatCreateVecs(T,&dvv,NULL);
+<a name="line476">476: </a>          VecDuplicate(dvv,&rr);
+<a name="line477">477: </a>        }
+<a name="line478">478: </a>        ini = PETSC_FALSE;
+<a name="line479">479: </a>      }
+<a name="line480">480: </a>      <font color="#4169E1">switch</font> (nep->scheme) {
+<a name="line481">481: </a>      <font color="#4169E1">case</font> NEP_REFINE_SCHEME_EXPLICIT:
+<a name="line482">482: </a>        MatMult(Mt,v,r);
+<a name="line483">483: </a>        VecGetArrayRead(r,&array);
+<a name="line484">484: </a>        <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line485">485: </a>          VecGetArray(rr,&array2);
+<a name="line486">486: </a>          PetscMemcpy(array2,array,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line487">487: </a>          array2[n] = 0.0;
+<a name="line488">488: </a>          VecRestoreArray(rr,&array2);
+<a name="line489">489: </a>        } <font color="#4169E1">else</font> {
+<a name="line490">490: </a>          VecPlaceArray(rr,array);
+<a name="line491">491: </a>        }
+<a name="line492">492: </a>        KSPSolve(nep->refineksp,rr,dvv);
+<a name="line493">493: </a>        KSPGetConvergedReason(nep->refineksp,&reason);
+<a name="line494">494: </a>        <font color="#4169E1">if</font> (reason>0) {
+<a name="line495">495: </a>          <font color="#4169E1">if</font> (rank != size-1) {
+<a name="line496">496: </a>            VecResetArray(rr);
+<a name="line497">497: </a>          }
+<a name="line498">498: </a>          VecRestoreArrayRead(r,&array);
+<a name="line499">499: </a>          VecGetArrayRead(dvv,&array);
+<a name="line500">500: </a>          VecPlaceArray(dv,array);
+<a name="line501">501: </a>          VecAXPY(v,-1.0,dv);
+<a name="line502">502: </a>          VecNorm(v,NORM_2,&norm);
+<a name="line503">503: </a>          VecScale(v,1.0/norm);
+<a name="line504">504: </a>          VecResetArray(dv);
+<a name="line505">505: </a>          <font color="#4169E1">if</font> (rank==size-1) nep->eigr[idx_sc[color]] -= array[n];
+<a name="line506">506: </a>          VecRestoreArrayRead(dvv,&array);
+<a name="line507">507: </a>        } <font color="#4169E1">else</font> fail_sc[color] = 1;
+<a name="line508">508: </a>        <font color="#4169E1">break</font>;
+<a name="line509">509: </a>      <font color="#4169E1">case</font> NEP_REFINE_SCHEME_MBE:
+<a name="line510">510: </a>        MatMult(T,v,r);
+<a name="line511">511: </a>        <font color="#B22222">/* Mixed block elimination */</font>
+<a name="line512">512: </a>        VecConjugate(v);
+<a name="line513">513: </a>        KSPSolveTranspose(nep->refineksp,v,t[0]);
+<a name="line514">514: </a>        KSPGetConvergedReason(nep->refineksp,&reason);
+<a name="line515">515: </a>        <font color="#4169E1">if</font> (reason>0) {
+<a name="line516">516: </a>          VecConjugate(t[0]);
+<a name="line517">517: </a>          VecDot(ctx->w,t[0],&tt[0]);
+<a name="line518">518: </a>          KSPSolve(nep->refineksp,ctx->w,t[1]);
+<a name="line519">519: </a>          KSPGetConvergedReason(nep->refineksp,&reason);
+<a name="line520">520: </a>          <font color="#4169E1">if</font> (reason>0) {
+<a name="line521">521: </a>            VecDot(t[1],v,&tt[1]);
+<a name="line522">522: </a>            VecDot(r,t[0],&ttt);
+<a name="line523">523: </a>            tt[0] = ttt/tt[0];
+<a name="line524">524: </a>            VecAXPY(r,-tt[0],ctx->w);
+<a name="line525">525: </a>            KSPSolve(nep->refineksp,r,dv);
+<a name="line526">526: </a>            KSPGetConvergedReason(nep->refineksp,&reason);
+<a name="line527">527: </a>            <font color="#4169E1">if</font> (reason>0) {
+<a name="line528">528: </a>              VecDot(dv,v,&ttt);
+<a name="line529">529: </a>              tt[1] = ttt/tt[1];
+<a name="line530">530: </a>              VecAXPY(dv,-tt[1],t[1]);
+<a name="line531">531: </a>              deig = tt[0]+tt[1];
+<a name="line532">532: </a>            }
+<a name="line533">533: </a>          }
+<a name="line534">534: </a>          VecConjugate(v);
+<a name="line535">535: </a>          VecAXPY(v,-1.0,dv);
+<a name="line536">536: </a>          VecNorm(v,NORM_2,&norm);
+<a name="line537">537: </a>          VecScale(v,1.0/norm);
+<a name="line538">538: </a>          nep->eigr[idx_sc[color]] -= deig;
+<a name="line539">539: </a>          fail_sc[color] = 0;
+<a name="line540">540: </a>        } <font color="#4169E1">else</font> {
+<a name="line541">541: </a>          VecConjugate(v);
+<a name="line542">542: </a>          fail_sc[color] = 1;
+<a name="line543">543: </a>        }
+<a name="line544">544: </a>        <font color="#4169E1">break</font>;
+<a name="line545">545: </a>      <font color="#4169E1">case</font> NEP_REFINE_SCHEME_SCHUR:
+<a name="line546">546: </a>        MatShellGetContext(T,&fctx);
+<a name="line547">547: </a>        MatMult(fctx->M1,v,r);
+<a name="line548">548: </a>        KSPSolve(nep->refineksp,r,dv);
+<a name="line549">549: </a>        KSPGetConvergedReason(nep->refineksp,&reason);
+<a name="line550">550: </a>        <font color="#4169E1">if</font> (reason>0) {
+<a name="line551">551: </a>          VecDot(dv,v,&deig);
+<a name="line552">552: </a>          deig *= -fctx->m3/fctx->M4;
+<a name="line553">553: </a>          VecAXPY(v,-1.0,dv);
+<a name="line554">554: </a>          VecNorm(v,NORM_2,&norm);
+<a name="line555">555: </a>          VecScale(v,1.0/norm);
+<a name="line556">556: </a>          nep->eigr[idx_sc[color]] -= deig;
+<a name="line557">557: </a>          fail_sc[color] = 0;
+<a name="line558">558: </a>        } <font color="#4169E1">else</font> fail_sc[color] = 1;
+<a name="line559">559: </a>        <font color="#4169E1">break</font>;
+<a name="line560">560: </a>      }
+<a name="line561">561: </a>      <font color="#4169E1">if</font> (nep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,idx_sc[color],&v); }
+<a name="line562">562: </a>    }
+<a name="line563">563: </a>  }
+<a name="line564">564: </a>  VecDestroy(&t[0]);
+<a name="line565">565: </a>  VecDestroy(&t[1]);
+<a name="line566">566: </a>  VecDestroy(&dv);
+<a name="line567">567: </a>  VecDestroy(&ctx->w);
+<a name="line568">568: </a>  VecDestroy(&r);
+<a name="line569">569: </a>  PetscFree3(idx_sc,its_sc,fail_sc);
+<a name="line570">570: </a>  VecScatterDestroy(&ctx->nst);
+<a name="line571">571: </a>  <font color="#4169E1">if</font> (nep->npart>1) {
+<a name="line572">572: </a>    VecDestroy(&ctx->vg);
+<a name="line573">573: </a>    VecDestroy(&ctx->v);
+<a name="line574">574: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line575">575: </a>      MatDestroy(&ctx->A[i]);
+<a name="line576">576: </a>    }
+<a name="line577">577: </a>    <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) {
+<a name="line578">578: </a>      VecScatterDestroy(&ctx->scatter_id[i]);
+<a name="line579">579: </a>    }
+<a name="line580">580: </a>    PetscFree2(ctx->A,ctx->scatter_id);
+<a name="line581">581: </a>  }
+<a name="line582">582: </a>  <font color="#4169E1">if</font> (fctx && nep->scheme==NEP_REFINE_SCHEME_SCHUR) {
+<a name="line583">583: </a>    MatDestroy(&P);
+<a name="line584">584: </a>    MatDestroy(&fctx->M1);
+<a name="line585">585: </a>    PetscFree(fctx);
+<a name="line586">586: </a>  }
+<a name="line587">587: </a>  <font color="#4169E1">if</font> (nep->scheme==NEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line588">588: </a>    MatDestroy(&Mt);
+<a name="line589">589: </a>    VecDestroy(&dvv);
+<a name="line590">590: </a>    VecDestroy(&rr);
+<a name="line591">591: </a>    VecDestroy(&ctx->nv);
+<a name="line592">592: </a>    <font color="#4169E1">if</font> (nep->npart>1) {
+<a name="line593">593: </a>      <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) { <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->fn[i]); }
+<a name="line594">594: </a>      PetscFree(ctx->fn);
+<a name="line595">595: </a>    }
+<a name="line596">596: </a>  }
+<a name="line597">597: </a>  MatDestroy(&T);
+<a name="line598">598: </a>  PetscFree(ctx);
+<a name="line599">599: </a>  PetscLogEventEnd(NEP_Refine,nep,0,0,0);
+<a name="line600">600: </a>  <font color="#4169E1">return</font>(0);
+<a name="line601">601: </a>}
 
-<a name="line292">292: </a>  PetscLogEventBegin(NEP_Refine,nep,0,0,0);
-<a name="line293">293: </a>  NEPSimpleNRefSetUp(nep,&ctx);
-<a name="line294">294: </a>  its = (maxits)?*maxits:NREF_MAXIT;
-<a name="line295">295: </a>  comm = (nep->npart==1)?PetscObjectComm((PetscObject)nep):PetscSubcommChild(ctx->subc);
-<a name="line296">296: </a>  KSPCreate(comm,&ksp);
-<a name="line297">297: </a>  <font color="#4169E1">if</font> (nep->npart==1) {
-<a name="line298">298: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,0,&v);
-<a name="line299">299: </a>  } <font color="#4169E1">else</font> v = ctx->v;
-<a name="line300">300: </a>  VecDuplicate(v,&r);
-<a name="line301">301: </a>  VecDuplicate(v,&dv);
-<a name="line302">302: </a>  VecDuplicate(v,&t[0]);
-<a name="line303">303: </a>  VecDuplicate(v,&t[1]);
-<a name="line304">304: </a>  <font color="#4169E1">if</font> (nep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,0,&v); }
-<a name="line305">305: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
-<a name="line306">306: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
-<a name="line307">307: </a>  VecGetLocalSize(r,&n);
-<a name="line308">308: </a>  PetscMalloc2(nep->npart,&idx_sc,nep->npart,&its_sc);
-<a name="line309">309: </a>  <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) its_sc[i] = 0;
-<a name="line310">310: </a>  color = (nep->npart==1)?0:ctx->subc->color;
-<a name="line311">311: </a>   
-<a name="line312">312: </a>  <font color="#B22222">/* Loop performing iterative refinements */</font>
-<a name="line313">313: </a>  <font color="#4169E1">while</font> (!solved) {
-<a name="line314">314: </a>    <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) {
-<a name="line315">315: </a>      sc_pend = PETSC_TRUE;
-<a name="line316">316: </a>      <font color="#4169E1">if</font> (its_sc[i]==0) {
-<a name="line317">317: </a>        idx_sc[i] = idx++;
-<a name="line318">318: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) {
-<a name="line319">319: </a>          sc_pend = PETSC_FALSE;
-<a name="line320">320: </a>        } <font color="#4169E1">else</font> {
-<a name="line321">321: </a>          NEPSimpleNRefScatterEigenvector(nep,ctx,i,idx_sc[i]);
-<a name="line322">322: </a>        }
-<a name="line323">323: </a>      }  <font color="#4169E1">else</font> { <font color="#B22222">/* Gather Eigenpair from subcommunicator i */</font>
-<a name="line324">324: </a>        NEPSimpleNRefGatherEigenpair(nep,ctx,i,idx_sc[i]);
-<a name="line325">325: </a>      }
-<a name="line326">326: </a>      <font color="#4169E1">while</font> (sc_pend) {
-<a name="line327">327: </a>        <font color="#4169E1">if</font> (tol) {
-<a name="line328">328: </a>          <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,idx_sc[i],NEP_ERROR_RELATIVE,&error);
-<a name="line329">329: </a>        }
-<a name="line330">330: </a>        <font color="#4169E1">if</font> (error<=*tol || its_sc[i]>=its) {
-<a name="line331">331: </a>          idx_sc[i] = idx++;
-<a name="line332">332: </a>          its_sc[i] = 0;
-<a name="line333">333: </a>          <font color="#4169E1">if</font> (idx_sc[i]<k) { NEPSimpleNRefScatterEigenvector(nep,ctx,i,idx_sc[i]); }
-<a name="line334">334: </a>        } <font color="#4169E1">else</font> {
-<a name="line335">335: </a>          sc_pend = PETSC_FALSE;
-<a name="line336">336: </a>          its_sc[i]++;
-<a name="line337">337: </a>        }
-<a name="line338">338: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) sc_pend = PETSC_FALSE;
-<a name="line339">339: </a>      }
-<a name="line340">340: </a>    }
-<a name="line341">341: </a>    solved = PETSC_TRUE;
-<a name="line342">342: </a>    <font color="#4169E1">for</font> (i=0;i<nep->npart&&solved;i++) solved = (idx_sc[i]<k)?PETSC_FALSE:PETSC_TRUE;
-<a name="line343">343: </a>    <font color="#4169E1">if</font> (idx_sc[color]<k) {
-<a name="line344">344: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line345">345: </a>      <font color="#4169E1">if</font> (nep->eigi[idx_sc[color]]!=0.0) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Simple Refinement not implemented in real scalar for complex eigenvalues"</font>);
-<a name="line346">346: </a><font color="#A020F0">#endif</font>
-<a name="line347">347: </a>      <font color="#4169E1">if</font> (nep->npart==1) {
-<a name="line348">348: </a>        <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,idx_sc[color],&v);
-<a name="line349">349: </a>      } <font color="#4169E1">else</font> v = ctx->v; 
-<a name="line350">350: </a>      NEPSimpleNRefSetUpSystem(nep,ctx,ctx->A,idx_sc[color],&M,&T,ini,t,v);
-<a name="line351">351: </a>      KSPSetOperators(ksp,M,M);
-<a name="line352">352: </a>      <font color="#4169E1">if</font> (ini) {
-<a name="line353">353: </a>        KSPSetFromOptions(ksp);
-<a name="line354">354: </a>        MatCreateVecs(M,&dvv,NULL);
-<a name="line355">355: </a>        VecDuplicate(dvv,&rr);
-<a name="line356">356: </a>        ini = PETSC_FALSE;
-<a name="line357">357: </a>      }
-<a name="line358">358: </a>      MatMult(T,v,r);
-<a name="line359">359: </a>      VecGetArrayRead(r,&array);
-<a name="line360">360: </a>      <font color="#4169E1">if</font> (rank==size-1) {
-<a name="line361">361: </a>        VecGetArray(rr,&array2);
-<a name="line362">362: </a>        PetscMemcpy(array2,array,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line363">363: </a>        array2[n] = 0.0;
-<a name="line364">364: </a>        VecRestoreArray(rr,&array2);
-<a name="line365">365: </a>      } <font color="#4169E1">else</font> {
-<a name="line366">366: </a>        VecPlaceArray(rr,array);
-<a name="line367">367: </a>      }
-<a name="line368">368: </a>      KSPSolve(ksp,rr,dvv);
-<a name="line369">369: </a>      <font color="#4169E1">if</font> (rank != size-1) {
-<a name="line370">370: </a>        VecResetArray(rr);
-<a name="line371">371: </a>      }
-<a name="line372">372: </a>      VecRestoreArrayRead(r,&array);
-<a name="line373">373: </a>      VecGetArrayRead(dvv,&array);
-<a name="line374">374: </a>      VecPlaceArray(dv,array);
-<a name="line375">375: </a>      VecAXPY(v,-1.0,dv);
-<a name="line376">376: </a>      VecNorm(v,NORM_2,&norm);
-<a name="line377">377: </a>      VecScale(v,1.0/norm);
-<a name="line378">378: </a>      VecResetArray(dv);
-<a name="line379">379: </a>      <font color="#4169E1">if</font> (rank==size-1) nep->eigr[idx_sc[color]] -= array[n];
-<a name="line380">380: </a>      VecRestoreArrayRead(dvv,&array);
-<a name="line381">381: </a>      <font color="#4169E1">if</font> (nep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,idx_sc[color],&v); } 
-<a name="line382">382: </a>    }
-<a name="line383">383: </a>  }
-<a name="line384">384: </a>  KSPDestroy(&ksp);
-<a name="line385">385: </a>  MatDestroy(&M);
-<a name="line386">386: </a>  MatDestroy(&T);
-<a name="line387">387: </a>  VecDestroy(&t[0]);
-<a name="line388">388: </a>  VecDestroy(&t[1]);
-<a name="line389">389: </a>  VecDestroy(&dv);
-<a name="line390">390: </a>  VecDestroy(&dvv);
-<a name="line391">391: </a>  VecDestroy(&r);
-<a name="line392">392: </a>  VecDestroy(&rr);
-<a name="line393">393: </a>  PetscFree2(idx_sc,its_sc);
-<a name="line394">394: </a>  <font color="#4169E1">if</font> (nep->npart>1) {
-<a name="line395">395: </a>    VecDestroy(&ctx->vg);
-<a name="line396">396: </a>    VecDestroy(&ctx->v);
-<a name="line397">397: </a>    PetscSubcommDestroy(&ctx->subc);
-<a name="line398">398: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line399">399: </a>      MatDestroy(&ctx->A[i]);
-<a name="line400">400: </a>    }
-<a name="line401">401: </a>    <font color="#4169E1">for</font> (i=0;i<nep->npart;i++) {
-<a name="line402">402: </a>      VecScatterDestroy(&ctx->scatter_id[i]);
-<a name="line403">403: </a>    }
-<a name="line404">404: </a>    PetscFree2(ctx->A,ctx->scatter_id);
-<a name="line405">405: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) { <a href="../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->fn[i]); }
-<a name="line406">406: </a>    PetscFree(ctx->fn);
-<a name="line407">407: </a>  }
-<a name="line408">408: </a>  PetscFree(ctx);
-<a name="line409">409: </a>  PetscLogEventEnd(NEP_Refine,nep,0,0,0);
-<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
-<a name="line411">411: </a>}
 </pre>
 </body>
 
diff --git a/src/nep/interface/nepregis.c b/src/nep/interface/nepregis.c
index 5bc79a2..dc5fade 100644
--- a/src/nep/interface/nepregis.c
+++ b/src/nep/interface/nepregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -26,6 +26,7 @@ PETSC_EXTERN PetscErrorCode NEPCreate_SLP(NEP);
 PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(NEP);
 PETSC_EXTERN PetscErrorCode NEPCreate_CISS(NEP);
 PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(NEP);
+PETSC_EXTERN PetscErrorCode NEPCreate_NLEIGS(NEP);
 
 #undef __FUNCT__
 #define __FUNCT__ "NEPRegisterAll"
@@ -52,6 +53,7 @@ PetscErrorCode NEPRegisterAll(void)
 #if defined(PETSC_USE_COMPLEX)
   ierr = NEPRegister(NEPCISS,NEPCreate_CISS);CHKERRQ(ierr);
 #endif
+  ierr = NEPRegister(NEPNLEIGS,NEPCreate_NLEIGS);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/nep/interface/nepregis.c.html b/src/nep/interface/nepregis.c.html
index a298ca6..729037f 100644
--- a/src/nep/interface/nepregis.c.html
+++ b/src/nep/interface/nepregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:15+00:00">
+<meta name="date" content="2016-05-16T10:34:17+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -38,30 +38,32 @@
 <a name="line26"> 26: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPCreate_NArnoldi(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
 <a name="line27"> 27: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPCreate_CISS(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
 <a name="line28"> 28: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPCreate_Interpol(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
+<a name="line29"> 29: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode NEPCreate_NLEIGS(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a>)</font></strong>;
 
-<a name="line32"> 32: </a><font color="#B22222">/*@C</font>
-<a name="line33"> 33: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a> - Registers all the solvers in the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package.</font>
+<a name="line33"> 33: </a><font color="#B22222">/*@C</font>
+<a name="line34"> 34: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a> - Registers all the solvers in the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> package.</font>
 
-<a name="line35"> 35: </a><font color="#B22222">   Not Collective</font>
+<a name="line36"> 36: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line37"> 37: </a><font color="#B22222">   Level: advanced</font>
+<a name="line38"> 38: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line39"> 39: </a><font color="#B22222">.seealso:  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>()</font>
-<a name="line40"> 40: </a><font color="#B22222">@*/</font>
-<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="NEPRegisterAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>(void)</font></strong>
-<a name="line42"> 42: </a>{
+<a name="line40"> 40: </a><font color="#B22222">.seealso:  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>()</font>
+<a name="line41"> 41: </a><font color="#B22222">@*/</font>
+<a name="line42"> 42: </a><strong><font color="#4169E1"><a name="NEPRegisterAll"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPRegisterAll.html#NEPRegisterAll">NEPRegisterAll</a>(void)</font></strong>
+<a name="line43"> 43: </a>{
 
-<a name="line46"> 46: </a>  <font color="#4169E1">if</font> (NEPRegisterAllCalled) <font color="#4169E1">return</font>(0);
-<a name="line47"> 47: </a>  NEPRegisterAllCalled = PETSC_TRUE;
-<a name="line48"> 48: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPRII,NEPCreate_RII);
-<a name="line49"> 49: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPSLP,NEPCreate_SLP);
-<a name="line50"> 50: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPNARNOLDI,NEPCreate_NArnoldi);
-<a name="line51"> 51: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPINTERPOL,NEPCreate_Interpol);
-<a name="line52"> 52: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line53"> 53: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPCISS,NEPCreate_CISS);
-<a name="line54"> 54: </a><font color="#A020F0">#endif</font>
-<a name="line55"> 55: </a>  <font color="#4169E1">return</font>(0);
-<a name="line56"> 56: </a>}
+<a name="line47"> 47: </a>  <font color="#4169E1">if</font> (NEPRegisterAllCalled) <font color="#4169E1">return</font>(0);
+<a name="line48"> 48: </a>  NEPRegisterAllCalled = PETSC_TRUE;
+<a name="line49"> 49: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPRII,NEPCreate_RII);
+<a name="line50"> 50: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPSLP,NEPCreate_SLP);
+<a name="line51"> 51: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPNARNOLDI,NEPCreate_NArnoldi);
+<a name="line52"> 52: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPINTERPOL,NEPCreate_Interpol);
+<a name="line53"> 53: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line54"> 54: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPCISS,NEPCreate_CISS);
+<a name="line55"> 55: </a><font color="#A020F0">#endif</font>
+<a name="line56"> 56: </a>  <a href="../../../docs/manualpages/NEP/NEPRegister.html#NEPRegister">NEPRegister</a>(NEPNLEIGS,NEPCreate_NLEIGS);
+<a name="line57"> 57: </a>  <font color="#4169E1">return</font>(0);
+<a name="line58"> 58: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/nepsetup.c b/src/nep/interface/nepsetup.c
index 0417544..bfb7f27 100644
--- a/src/nep/interface/nepsetup.c
+++ b/src/nep/interface/nepsetup.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -49,9 +49,15 @@ PetscErrorCode NEPSetUp(NEP nep)
   PetscInt       k;
   SlepcSC        sc;
   Mat            T;
+  PetscBool      flg;
+  KSP            ksp;
+  PC             pc;
+  PetscMPIInt    size;
+  const MatSolverPackage stype;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  NEPCheckProblem(nep,1);
   if (nep->state) PetscFunctionReturn(0);
   ierr = PetscLogEventBegin(NEP_SetUp,nep,0,0,0);CHKERRQ(ierr);
 
@@ -68,42 +74,72 @@ PetscErrorCode NEPSetUp(NEP nep)
   if (!((PetscObject)nep->rg)->type_name) {
     ierr = RGSetType(nep->rg,RGINTERVAL);CHKERRQ(ierr);
   }
-  if (!((PetscObject)nep->rand)->type_name) {
-    ierr = PetscRandomSetFromOptions(nep->rand);CHKERRQ(ierr);
-  }
-  if (!nep->ksp) {
-    ierr = NEPGetKSP(nep,&nep->ksp);CHKERRQ(ierr);
-  }
-
-  /* by default, compute eigenvalues close to target */
-  /* nep->target should contain the initial guess for the eigenvalue */
-  if (!nep->which) nep->which = NEP_TARGET_MAGNITUDE;
 
   /* set problem dimensions */
-  if (nep->split) {
+  switch (nep->fui) {
+  case NEP_USER_INTERFACE_CALLBACK:
+    ierr = NEPGetFunction(nep,&T,NULL,NULL,NULL);CHKERRQ(ierr);
+    ierr = MatGetSize(T,&nep->n,NULL);CHKERRQ(ierr);
+    ierr = MatGetLocalSize(T,&nep->nloc,NULL);CHKERRQ(ierr);
+    break;
+  case NEP_USER_INTERFACE_SPLIT:
     ierr = MatDuplicate(nep->A[0],MAT_DO_NOT_COPY_VALUES,&nep->function);CHKERRQ(ierr);
     ierr = MatDuplicate(nep->A[0],MAT_DO_NOT_COPY_VALUES,&nep->jacobian);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->function);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->jacobian);CHKERRQ(ierr);
     ierr = MatGetSize(nep->A[0],&nep->n,NULL);CHKERRQ(ierr);
     ierr = MatGetLocalSize(nep->A[0],&nep->nloc,NULL);CHKERRQ(ierr);
-  } else {
-    ierr = NEPGetFunction(nep,&T,NULL,NULL,NULL);CHKERRQ(ierr);
+    break;
+  case NEP_USER_INTERFACE_DERIVATIVES:
+    ierr = NEPGetDerivatives(nep,&T,NULL,NULL);CHKERRQ(ierr);
     ierr = MatGetSize(T,&nep->n,NULL);CHKERRQ(ierr);
     ierr = MatGetLocalSize(T,&nep->nloc,NULL);CHKERRQ(ierr);
+    break;
   }
 
+  /* check consistency of refinement options */
+  if (nep->refine) {
+    if (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Iterative refinement only implemented in split form");
+    if (!nep->scheme) {  /* set default scheme */
+      ierr = NEPRefineGetKSP(nep,&ksp);CHKERRQ(ierr);
+      ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
+      ierr = PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);CHKERRQ(ierr);
+      if (flg) {
+        ierr = PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,"");CHKERRQ(ierr);
+      }
+      nep->scheme = flg? NEP_REFINE_SCHEME_MBE: NEP_REFINE_SCHEME_SCHUR;
+    }
+    if (nep->scheme==NEP_REFINE_SCHEME_MBE) {
+      ierr = NEPRefineGetKSP(nep,&ksp);CHKERRQ(ierr);
+      ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
+      ierr = PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);CHKERRQ(ierr);
+      if (flg) {
+        ierr = PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,"");CHKERRQ(ierr);
+      }
+      if (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"The MBE scheme for refinement requires a direct solver in KSP");
+      ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pc),&size);CHKERRQ(ierr);
+      if (size>1) {   /* currently selected PC is a factorization */
+        ierr = PCFactorGetMatSolverPackage(pc,&stype);CHKERRQ(ierr);
+        ierr = PetscStrcmp(stype,MATSOLVERPETSC,&flg);CHKERRQ(ierr);
+        if (flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"For Newton refinement, you chose to solve linear systems with a factorization, but in parallel runs you need to select an external package");
+      }
+    }
+    if (nep->scheme==NEP_REFINE_SCHEME_SCHUR) {
+      if (nep->nt<=2) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"The Schur scheme for refinement is only available for problems defined with more than 2 matrices");
+      if (nep->npart>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"The Schur scheme for refinement does not support subcommunicators"); 
+    }
+  }
   /* call specific solver setup */
   ierr = (*nep->ops->setup)(nep);CHKERRQ(ierr);
 
-  /* set tolerances if not yet set */
-  if (nep->abstol==PETSC_DEFAULT) nep->abstol = 1e-50;
-  if (nep->rtol==PETSC_DEFAULT) nep->rtol = 100*SLEPC_DEFAULT_TOL;
-  if (nep->stol==PETSC_DEFAULT) nep->stol = SLEPC_DEFAULT_TOL;
-  nep->ktol   = 0.1;
-  nep->nfuncs = 0;
+  /* by default, compute eigenvalues close to target */
+  /* nep->target should contain the initial guess for the eigenvalue */
+  if (!nep->which) nep->which = NEP_TARGET_MAGNITUDE;
+
+  /* set tolerance if not yet set */
+  if (nep->tol==PETSC_DEFAULT) nep->tol = SLEPC_DEFAULT_TOL;
   if (nep->refine) {
-    if (nep->reftol==PETSC_DEFAULT) nep->reftol = SLEPC_DEFAULT_TOL;
+    if (nep->rtol==PETSC_DEFAULT) nep->rtol = PetscMax(nep->tol/1000,PETSC_MACHINE_EPSILON);
     if (nep->rits==PETSC_DEFAULT) nep->rits = (nep->refine==NEP_REFINE_SIMPLE)? 10: 1;
   }
 
@@ -145,6 +181,12 @@ PetscErrorCode NEPSetUp(NEP nep)
       nep->sc->comparison    = SlepcCompareTargetImaginary;
       nep->sc->comparisonctx = &nep->target;
       break;
+    case NEP_ALL:
+      nep->sc->comparison    = SlepcCompareSmallestReal;
+      nep->sc->comparisonctx = NULL;
+      break;
+    case NEP_WHICH_USER:
+      break;
   }
 
   nep->sc->map    = NULL;
@@ -154,9 +196,11 @@ PetscErrorCode NEPSetUp(NEP nep)
   ierr = DSGetSlepcSC(nep->ds,&sc);CHKERRQ(ierr);
   sc->comparison    = nep->sc->comparison;
   sc->comparisonctx = nep->sc->comparisonctx;
-  sc->map           = NULL;
-  sc->mapobj        = NULL;
-
+  ierr = PetscObjectTypeCompare((PetscObject)nep,NEPNLEIGS,&flg);CHKERRQ(ierr);
+  if (!flg) {
+    sc->map    = NULL;
+    sc->mapobj = NULL;
+  }
   if (nep->ncv > nep->n) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"ncv must be the problem size at most");
   if (nep->nev > nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"nev bigger than ncv");
 
@@ -215,6 +259,30 @@ PetscErrorCode NEPSetInitialSpace(NEP nep,PetscInt n,Vec *is)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "NEPSetDimensions_Default"
+/*
+  NEPSetDimensions_Default - Set reasonable values for ncv, mpd if not set
+  by the user. This is called at setup.
+ */
+PetscErrorCode NEPSetDimensions_Default(NEP nep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)
+{
+  PetscFunctionBegin;
+  if (*ncv) { /* ncv set */
+    if (*ncv<nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,"The value of ncv must be at least nev");
+  } else if (*mpd) { /* mpd set */
+    *ncv = PetscMin(nep->n,nev+(*mpd));
+  } else { /* neither set: defaults depend on nev being small or large */
+    if (nev<500) *ncv = PetscMin(nep->n,PetscMax(2*nev,nev+15));
+    else {
+      *mpd = 500;
+      *ncv = PetscMin(nep->n,nev+(*mpd));
+    }
+  }
+  if (!*mpd) *mpd = *ncv;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "NEPAllocateSolution"
 /*@
    NEPAllocateSolution - Allocate memory storage for common variables such
@@ -264,7 +332,7 @@ PetscErrorCode NEPAllocateSolution(NEP nep,PetscInt extra)
     if (!((PetscObject)(nep->V))->type_name) {
       ierr = BVSetType(nep->V,BVSVEC);CHKERRQ(ierr);
     }
-    if (nep->split) T = nep->A[0];
+    if (nep->fui==NEP_USER_INTERFACE_SPLIT) T = nep->A[0];
     else {
       ierr = NEPGetFunction(nep,&T,NULL,NULL,NULL);CHKERRQ(ierr);
     }
diff --git a/src/nep/interface/nepsetup.c.html b/src/nep/interface/nepsetup.c.html
index f7e863d..6b41825 100644
--- a/src/nep/interface/nepsetup.c.html
+++ b/src/nep/interface/nepsetup.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepsetup.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:17+00:00">
+<meta name="date" content="2016-05-16T10:34:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepsetup.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepsetup.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> routines related to problem setup.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -58,221 +58,286 @@
 <a name="line49"> 49: </a>  PetscInt       k;
 <a name="line50"> 50: </a>  SlepcSC        sc;
 <a name="line51"> 51: </a>  Mat            T;
-
-<a name="line55"> 55: </a>  <font color="#4169E1">if</font> (nep->state) <font color="#4169E1">return</font>(0);
-<a name="line56"> 56: </a>  PetscLogEventBegin(NEP_SetUp,nep,0,0,0);
-
-<a name="line58"> 58: </a>  <font color="#B22222">/* reset the convergence flag from the previous solves */</font>
-<a name="line59"> 59: </a>  nep->reason = NEP_CONVERGED_ITERATING;
-
-<a name="line61"> 61: </a>  <font color="#B22222">/* set default solver type (<a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a> was not called) */</font>
-<a name="line62"> 62: </a>  <font color="#4169E1">if</font> (!((PetscObject)nep)->type_name) {
-<a name="line63"> 63: </a>    <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,NEPRII);
-<a name="line64"> 64: </a>  }
-<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
-<a name="line66"> 66: </a>  <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(nep->ds);
-<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
-<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!((PetscObject)nep->rg)->type_name) {
-<a name="line69"> 69: </a>    <a href="../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(nep->rg,RGINTERVAL);
+<a name="line52"> 52: </a>  PetscBool      flg;
+<a name="line53"> 53: </a>  KSP            ksp;
+<a name="line54"> 54: </a>  PC             pc;
+<a name="line55"> 55: </a>  PetscMPIInt    size;
+<a name="line56"> 56: </a>  const MatSolverPackage stype;
+
+<a name="line60"> 60: </a>  NEPCheckProblem(nep,1);
+<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (nep->state) <font color="#4169E1">return</font>(0);
+<a name="line62"> 62: </a>  PetscLogEventBegin(NEP_SetUp,nep,0,0,0);
+
+<a name="line64"> 64: </a>  <font color="#B22222">/* reset the convergence flag from the previous solves */</font>
+<a name="line65"> 65: </a>  nep->reason = NEP_CONVERGED_ITERATING;
+
+<a name="line67"> 67: </a>  <font color="#B22222">/* set default solver type (<a href="../../../docs/manualpages/NEP/NEPSetFromOptions.html#NEPSetFromOptions">NEPSetFromOptions</a> was not called) */</font>
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!((PetscObject)nep)->type_name) {
+<a name="line69"> 69: </a>    <a href="../../../docs/manualpages/NEP/NEPSetType.html#NEPSetType">NEPSetType</a>(nep,NEPRII);
 <a name="line70"> 70: </a>  }
-<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (!((PetscObject)nep->rand)->type_name) {
-<a name="line72"> 72: </a>    PetscRandomSetFromOptions(nep->rand);
-<a name="line73"> 73: </a>  }
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!nep->ksp) {
-<a name="line75"> 75: </a>    <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(nep,&nep->ksp);
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
+<a name="line72"> 72: </a>  <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(nep->ds);
+<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
+<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!((PetscObject)nep->rg)->type_name) {
+<a name="line75"> 75: </a>    <a href="../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(nep->rg,RGINTERVAL);
 <a name="line76"> 76: </a>  }
 
-<a name="line78"> 78: </a>  <font color="#B22222">/* by default, compute eigenvalues close to target */</font>
-<a name="line79"> 79: </a>  <font color="#B22222">/* nep->target should contain the initial guess for the eigenvalue */</font>
-<a name="line80"> 80: </a>  <font color="#4169E1">if</font> (!nep->which) nep->which = NEP_TARGET_MAGNITUDE;
-
-<a name="line82"> 82: </a>  <font color="#B22222">/* set problem dimensions */</font>
-<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (nep->split) {
-<a name="line84"> 84: </a>    MatDuplicate(nep->A[0],MAT_DO_NOT_COPY_VALUES,&nep->function);
-<a name="line85"> 85: </a>    MatDuplicate(nep->A[0],MAT_DO_NOT_COPY_VALUES,&nep->jacobian);
-<a name="line86"> 86: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->function);
-<a name="line87"> 87: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->jacobian);
-<a name="line88"> 88: </a>    MatGetSize(nep->A[0],&nep->n,NULL);
-<a name="line89"> 89: </a>    MatGetLocalSize(nep->A[0],&nep->nloc,NULL);
-<a name="line90"> 90: </a>  } <font color="#4169E1">else</font> {
-<a name="line91"> 91: </a>    <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(nep,&T,NULL,NULL,NULL);
-<a name="line92"> 92: </a>    MatGetSize(T,&nep->n,NULL);
-<a name="line93"> 93: </a>    MatGetLocalSize(T,&nep->nloc,NULL);
-<a name="line94"> 94: </a>  }
-
-<a name="line96"> 96: </a>  <font color="#B22222">/* call specific solver setup */</font>
-<a name="line97"> 97: </a>  (*nep->ops->setup)(nep);
-
-<a name="line99"> 99: </a>  <font color="#B22222">/* set tolerances if not yet set */</font>
-<a name="line100">100: </a>  <font color="#4169E1">if</font> (nep->abstol==PETSC_DEFAULT) nep->abstol = 1e-50;
-<a name="line101">101: </a>  <font color="#4169E1">if</font> (nep->rtol==PETSC_DEFAULT) nep->rtol = 100*SLEPC_DEFAULT_TOL;
-<a name="line102">102: </a>  <font color="#4169E1">if</font> (nep->stol==PETSC_DEFAULT) nep->stol = SLEPC_DEFAULT_TOL;
-<a name="line103">103: </a>  nep->ktol   = 0.1;
-<a name="line104">104: </a>  nep->nfuncs = 0;
-<a name="line105">105: </a>  <font color="#4169E1">if</font> (nep->refine) {
-<a name="line106">106: </a>    <font color="#4169E1">if</font> (nep->reftol==PETSC_DEFAULT) nep->reftol = SLEPC_DEFAULT_TOL;
-<a name="line107">107: </a>    <font color="#4169E1">if</font> (nep->rits==PETSC_DEFAULT) nep->rits = (nep->refine==NEP_REFINE_SIMPLE)? 10: 1;
-<a name="line108">108: </a>  }
-
-<a name="line110">110: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
-<a name="line111">111: </a>  <font color="#4169E1">switch</font> (nep->which) {
-<a name="line112">112: </a>    <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
-<a name="line113">113: </a>      nep->sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line114">114: </a>      nep->sc->comparisonctx = NULL;
-<a name="line115">115: </a>      <font color="#4169E1">break</font>;
-<a name="line116">116: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
-<a name="line117">117: </a>      nep->sc->comparison    = SlepcCompareSmallestMagnitude;
-<a name="line118">118: </a>      nep->sc->comparisonctx = NULL;
-<a name="line119">119: </a>      <font color="#4169E1">break</font>;
-<a name="line120">120: </a>    <font color="#4169E1">case</font> NEP_LARGEST_REAL:
-<a name="line121">121: </a>      nep->sc->comparison    = SlepcCompareLargestReal;
-<a name="line122">122: </a>      nep->sc->comparisonctx = NULL;
-<a name="line123">123: </a>      <font color="#4169E1">break</font>;
-<a name="line124">124: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
-<a name="line125">125: </a>      nep->sc->comparison    = SlepcCompareSmallestReal;
-<a name="line126">126: </a>      nep->sc->comparisonctx = NULL;
-<a name="line127">127: </a>      <font color="#4169E1">break</font>;
-<a name="line128">128: </a>    <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
-<a name="line129">129: </a>      nep->sc->comparison    = SlepcCompareLargestImaginary;
-<a name="line130">130: </a>      nep->sc->comparisonctx = NULL;
-<a name="line131">131: </a>      <font color="#4169E1">break</font>;
-<a name="line132">132: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
-<a name="line133">133: </a>      nep->sc->comparison    = SlepcCompareSmallestImaginary;
-<a name="line134">134: </a>      nep->sc->comparisonctx = NULL;
-<a name="line135">135: </a>      <font color="#4169E1">break</font>;
-<a name="line136">136: </a>    <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
-<a name="line137">137: </a>      nep->sc->comparison    = SlepcCompareTargetMagnitude;
-<a name="line138">138: </a>      nep->sc->comparisonctx = &nep->target;
-<a name="line139">139: </a>      <font color="#4169E1">break</font>;
-<a name="line140">140: </a>    <font color="#4169E1">case</font> NEP_TARGET_REAL:
-<a name="line141">141: </a>      nep->sc->comparison    = SlepcCompareTargetReal;
-<a name="line142">142: </a>      nep->sc->comparisonctx = &nep->target;
-<a name="line143">143: </a>      <font color="#4169E1">break</font>;
-<a name="line144">144: </a>    <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
-<a name="line145">145: </a>      nep->sc->comparison    = SlepcCompareTargetImaginary;
-<a name="line146">146: </a>      nep->sc->comparisonctx = &nep->target;
-<a name="line147">147: </a>      <font color="#4169E1">break</font>;
-<a name="line148">148: </a>  }
-
-<a name="line150">150: </a>  nep->sc->map    = NULL;
-<a name="line151">151: </a>  nep->sc->mapobj = NULL;
-
-<a name="line153">153: </a>  <font color="#B22222">/* fill sorting criterion for <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
-<a name="line154">154: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(nep->ds,&sc);
-<a name="line155">155: </a>  sc->comparison    = nep->sc->comparison;
-<a name="line156">156: </a>  sc->comparisonctx = nep->sc->comparisonctx;
-<a name="line157">157: </a>  sc->map           = NULL;
-<a name="line158">158: </a>  sc->mapobj        = NULL;
-
-<a name="line160">160: </a>  <font color="#4169E1">if</font> (nep->ncv > nep->n) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"ncv must be the problem size at most"</font>);
-<a name="line161">161: </a>  <font color="#4169E1">if</font> (nep->nev > nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"nev bigger than ncv"</font>);
-
-<a name="line163">163: </a>  <font color="#B22222">/* process initial vectors */</font>
-<a name="line164">164: </a>  <font color="#4169E1">if</font> (nep->nini<0) {
-<a name="line165">165: </a>    k = -nep->nini;
-<a name="line166">166: </a>    <font color="#4169E1">if</font> (k>nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
-<a name="line167">167: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(nep->V,0,&k,nep->IS,PETSC_TRUE);
-<a name="line168">168: </a>    SlepcBasisDestroy_Private(&nep->nini,&nep->IS);
-<a name="line169">169: </a>    nep->nini = k;
-<a name="line170">170: </a>  }
-<a name="line171">171: </a>  PetscLogEventEnd(NEP_SetUp,nep,0,0,0);
-<a name="line172">172: </a>  nep->state = NEP_STATE_SETUP;
-<a name="line173">173: </a>  <font color="#4169E1">return</font>(0);
-<a name="line174">174: </a>}
-
-<a name="line178">178: </a><font color="#B22222">/*@</font>
-<a name="line179">179: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
-<a name="line180">180: </a><font color="#B22222">   space, that is, the subspace from which the solver starts to iterate.</font>
-
-<a name="line182">182: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Vec</font>
-
-<a name="line184">184: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line185">185: </a><font color="#B22222">+  nep   - the nonlinear eigensolver context</font>
-<a name="line186">186: </a><font color="#B22222">.  n     - number of vectors</font>
-<a name="line187">187: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
-
-<a name="line189">189: </a><font color="#B22222">   Notes:</font>
-<a name="line190">190: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
-<a name="line191">191: </a><font color="#B22222">   the other vectors are ignored.</font>
-
-<a name="line193">193: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() call to the other, so the</font>
-<a name="line194">194: </a><font color="#B22222">   initial space should be set every time.</font>
-
-<a name="line196">196: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
-<a name="line197">197: </a><font color="#B22222">   orthonormalized internally.</font>
-
-<a name="line199">199: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
-<a name="line200">200: </a><font color="#B22222">   of the wanted eigenspace. Then, convergence may be faster.</font>
-
-<a name="line202">202: </a><font color="#B22222">   Level: intermediate</font>
-<a name="line203">203: </a><font color="#B22222">@*/</font>
-<a name="line204">204: </a><strong><font color="#4169E1"><a name="NEPSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt n,Vec *is)</font></strong>
-<a name="line205">205: </a>{
-
-<a name="line211">211: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
-<a name="line212">212: </a>  SlepcBasisReference_Private(n,is,&nep->nini,&nep->IS);
-<a name="line213">213: </a>  <font color="#4169E1">if</font> (n>0) nep->state = NEP_STATE_INITIAL;
-<a name="line214">214: </a>  <font color="#4169E1">return</font>(0);
-<a name="line215">215: </a>}
-
-<a name="line219">219: </a><font color="#B22222">/*@</font>
-<a name="line220">220: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a> - Allocate memory storage for common variables such</font>
-<a name="line221">221: </a><font color="#B22222">   as eigenvalues and eigenvectors.</font>
-
-<a name="line223">223: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line225">225: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line226">226: </a><font color="#B22222">+  nep   - eigensolver context</font>
-<a name="line227">227: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
-<a name="line228">228: </a><font color="#B22222">           working basis slightly larger than ncv</font>
-
-<a name="line230">230: </a><font color="#B22222">   Developers Note:</font>
-<a name="line231">231: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-<a name="line232">232: </a><font color="#B22222">   implementations.</font>
-
-<a name="line234">234: </a><font color="#B22222">   Level: developer</font>
-<a name="line235">235: </a><font color="#B22222">@*/</font>
-<a name="line236">236: </a><strong><font color="#4169E1"><a name="NEPAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt extra)</font></strong>
-<a name="line237">237: </a>{
-<a name="line239">239: </a>  PetscInt       oldsize,newc,requested;
-<a name="line240">240: </a>  PetscLogDouble cnt;
-<a name="line241">241: </a>  Mat            T;
-<a name="line242">242: </a>  Vec            t;
-
-<a name="line245">245: </a>  requested = nep->ncv + extra;
-
-<a name="line247">247: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
-<a name="line248">248: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(nep->V,NULL,NULL,&oldsize);
-<a name="line249">249: </a>  newc = PetscMax(0,requested-oldsize);
-
-<a name="line251">251: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
-<a name="line252">252: </a>  <font color="#4169E1">if</font> (requested != oldsize || !nep->eigr) {
-<a name="line253">253: </a>    <font color="#4169E1">if</font> (oldsize) {
-<a name="line254">254: </a>      PetscFree4(nep->eigr,nep->eigi,nep->errest,nep->perm);
-<a name="line255">255: </a>    }
-<a name="line256">256: </a>    PetscMalloc4(requested,&nep->eigr,requested,&nep->eigi,requested,&nep->errest,requested,&nep->perm);
-<a name="line257">257: </a>    cnt = newc*<font color="#4169E1">sizeof</font>(PetscScalar) + newc*<font color="#4169E1">sizeof</font>(PetscReal) + newc*<font color="#4169E1">sizeof</font>(PetscInt);
-<a name="line258">258: </a>    PetscLogObjectMemory((PetscObject)nep,cnt);
-<a name="line259">259: </a>  }
-
-<a name="line261">261: </a>  <font color="#B22222">/* allocate V */</font>
-<a name="line262">262: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
-<a name="line263">263: </a>  <font color="#4169E1">if</font> (!oldsize) {
-<a name="line264">264: </a>    <font color="#4169E1">if</font> (!((PetscObject)(nep->V))->type_name) {
-<a name="line265">265: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(nep->V,BVSVEC);
-<a name="line266">266: </a>    }
-<a name="line267">267: </a>    <font color="#4169E1">if</font> (nep->split) T = nep->A[0];
-<a name="line268">268: </a>    <font color="#4169E1">else</font> {
-<a name="line269">269: </a>      <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(nep,&T,NULL,NULL,NULL);
-<a name="line270">270: </a>    }
-<a name="line271">271: </a>    MatCreateVecs(T,&t,NULL);
-<a name="line272">272: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(nep->V,t,requested);
-<a name="line273">273: </a>    VecDestroy(&t);
-<a name="line274">274: </a>  } <font color="#4169E1">else</font> {
-<a name="line275">275: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(nep->V,requested,PETSC_FALSE);
-<a name="line276">276: </a>  }
-<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
-<a name="line278">278: </a>}
+<a name="line78"> 78: </a>  <font color="#B22222">/* set problem dimensions */</font>
+<a name="line79"> 79: </a>  <font color="#4169E1">switch</font> (nep->fui) {
+<a name="line80"> 80: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_CALLBACK:
+<a name="line81"> 81: </a>    <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(nep,&T,NULL,NULL,NULL);
+<a name="line82"> 82: </a>    MatGetSize(T,&nep->n,NULL);
+<a name="line83"> 83: </a>    MatGetLocalSize(T,&nep->nloc,NULL);
+<a name="line84"> 84: </a>    <font color="#4169E1">break</font>;
+<a name="line85"> 85: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_SPLIT:
+<a name="line86"> 86: </a>    MatDuplicate(nep->A[0],MAT_DO_NOT_COPY_VALUES,&nep->function);
+<a name="line87"> 87: </a>    MatDuplicate(nep->A[0],MAT_DO_NOT_COPY_VALUES,&nep->jacobian);
+<a name="line88"> 88: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->function);
+<a name="line89"> 89: </a>    PetscLogObjectParent((PetscObject)nep,(PetscObject)nep->jacobian);
+<a name="line90"> 90: </a>    MatGetSize(nep->A[0],&nep->n,NULL);
+<a name="line91"> 91: </a>    MatGetLocalSize(nep->A[0],&nep->nloc,NULL);
+<a name="line92"> 92: </a>    <font color="#4169E1">break</font>;
+<a name="line93"> 93: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_DERIVATIVES:
+<a name="line94"> 94: </a>    <a href="../../../docs/manualpages/NEP/NEPGetDerivatives.html#NEPGetDerivatives">NEPGetDerivatives</a>(nep,&T,NULL,NULL);
+<a name="line95"> 95: </a>    MatGetSize(T,&nep->n,NULL);
+<a name="line96"> 96: </a>    MatGetLocalSize(T,&nep->nloc,NULL);
+<a name="line97"> 97: </a>    <font color="#4169E1">break</font>;
+<a name="line98"> 98: </a>  }
+
+<a name="line100">100: </a>  <font color="#B22222">/* check consistency of refinement options */</font>
+<a name="line101">101: </a>  <font color="#4169E1">if</font> (nep->refine) {
+<a name="line102">102: </a>    <font color="#4169E1">if</font> (nep->fui!=NEP_USER_INTERFACE_SPLIT) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"Iterative refinement only implemented in split form"</font>);
+<a name="line103">103: </a>    <font color="#4169E1">if</font> (!nep->scheme) {  <font color="#B22222">/* set default scheme */</font>
+<a name="line104">104: </a>      <a href="../../../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a>(nep,&ksp);
+<a name="line105">105: </a>      KSPGetPC(ksp,&pc);
+<a name="line106">106: </a>      PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);
+<a name="line107">107: </a>      <font color="#4169E1">if</font> (flg) {
+<a name="line108">108: </a>        PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,<font color="#666666">""</font>);
+<a name="line109">109: </a>      }
+<a name="line110">110: </a>      nep->scheme = flg? NEP_REFINE_SCHEME_MBE: NEP_REFINE_SCHEME_SCHUR;
+<a name="line111">111: </a>    }
+<a name="line112">112: </a>    <font color="#4169E1">if</font> (nep->scheme==NEP_REFINE_SCHEME_MBE) {
+<a name="line113">113: </a>      <a href="../../../docs/manualpages/NEP/NEPRefineGetKSP.html#NEPRefineGetKSP">NEPRefineGetKSP</a>(nep,&ksp);
+<a name="line114">114: </a>      KSPGetPC(ksp,&pc);
+<a name="line115">115: </a>      PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);
+<a name="line116">116: </a>      <font color="#4169E1">if</font> (flg) {
+<a name="line117">117: </a>        PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,<font color="#666666">""</font>);
+<a name="line118">118: </a>      }
+<a name="line119">119: </a>      <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"The MBE scheme for refinement requires a direct solver in KSP"</font>);
+<a name="line120">120: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pc),&size);
+<a name="line121">121: </a>      <font color="#4169E1">if</font> (size>1) {   <font color="#B22222">/* currently selected PC is a factorization */</font>
+<a name="line122">122: </a>        PCFactorGetMatSolverPackage(pc,&stype);
+<a name="line123">123: </a>        PetscStrcmp(stype,MATSOLVERPETSC,&flg);
+<a name="line124">124: </a>        <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"For Newton refinement, you chose to solve linear systems with a factorization, but in parallel runs you need to select an external package"</font>);
+<a name="line125">125: </a>      }
+<a name="line126">126: </a>    }
+<a name="line127">127: </a>    <font color="#4169E1">if</font> (nep->scheme==NEP_REFINE_SCHEME_SCHUR) {
+<a name="line128">128: </a>      <font color="#4169E1">if</font> (nep->nt<=2) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"The Schur scheme for refinement is only available for problems defined with more than 2 matrices"</font>);
+<a name="line129">129: </a>      <font color="#4169E1">if</font> (nep->npart>1) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,<font color="#666666">"The Schur scheme for refinement does not support subcommunicators"</font>); 
+<a name="line130">130: </a>    }
+<a name="line131">131: </a>  }
+<a name="line132">132: </a>  <font color="#B22222">/* call specific solver setup */</font>
+<a name="line133">133: </a>  (*nep->ops->setup)(nep);
+
+<a name="line135">135: </a>  <font color="#B22222">/* by default, compute eigenvalues close to target */</font>
+<a name="line136">136: </a>  <font color="#B22222">/* nep->target should contain the initial guess for the eigenvalue */</font>
+<a name="line137">137: </a>  <font color="#4169E1">if</font> (!nep->which) nep->which = NEP_TARGET_MAGNITUDE;
+
+<a name="line139">139: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
+<a name="line140">140: </a>  <font color="#4169E1">if</font> (nep->tol==PETSC_DEFAULT) nep->tol = SLEPC_DEFAULT_TOL;
+<a name="line141">141: </a>  <font color="#4169E1">if</font> (nep->refine) {
+<a name="line142">142: </a>    <font color="#4169E1">if</font> (nep->rtol==PETSC_DEFAULT) nep->rtol = PetscMax(nep->tol/1000,PETSC_MACHINE_EPSILON);
+<a name="line143">143: </a>    <font color="#4169E1">if</font> (nep->rits==PETSC_DEFAULT) nep->rits = (nep->refine==NEP_REFINE_SIMPLE)? 10: 1;
+<a name="line144">144: </a>  }
+
+<a name="line146">146: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
+<a name="line147">147: </a>  <font color="#4169E1">switch</font> (nep->which) {
+<a name="line148">148: </a>    <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
+<a name="line149">149: </a>      nep->sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line150">150: </a>      nep->sc->comparisonctx = NULL;
+<a name="line151">151: </a>      <font color="#4169E1">break</font>;
+<a name="line152">152: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
+<a name="line153">153: </a>      nep->sc->comparison    = SlepcCompareSmallestMagnitude;
+<a name="line154">154: </a>      nep->sc->comparisonctx = NULL;
+<a name="line155">155: </a>      <font color="#4169E1">break</font>;
+<a name="line156">156: </a>    <font color="#4169E1">case</font> NEP_LARGEST_REAL:
+<a name="line157">157: </a>      nep->sc->comparison    = SlepcCompareLargestReal;
+<a name="line158">158: </a>      nep->sc->comparisonctx = NULL;
+<a name="line159">159: </a>      <font color="#4169E1">break</font>;
+<a name="line160">160: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
+<a name="line161">161: </a>      nep->sc->comparison    = SlepcCompareSmallestReal;
+<a name="line162">162: </a>      nep->sc->comparisonctx = NULL;
+<a name="line163">163: </a>      <font color="#4169E1">break</font>;
+<a name="line164">164: </a>    <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
+<a name="line165">165: </a>      nep->sc->comparison    = SlepcCompareLargestImaginary;
+<a name="line166">166: </a>      nep->sc->comparisonctx = NULL;
+<a name="line167">167: </a>      <font color="#4169E1">break</font>;
+<a name="line168">168: </a>    <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
+<a name="line169">169: </a>      nep->sc->comparison    = SlepcCompareSmallestImaginary;
+<a name="line170">170: </a>      nep->sc->comparisonctx = NULL;
+<a name="line171">171: </a>      <font color="#4169E1">break</font>;
+<a name="line172">172: </a>    <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
+<a name="line173">173: </a>      nep->sc->comparison    = SlepcCompareTargetMagnitude;
+<a name="line174">174: </a>      nep->sc->comparisonctx = &nep->target;
+<a name="line175">175: </a>      <font color="#4169E1">break</font>;
+<a name="line176">176: </a>    <font color="#4169E1">case</font> NEP_TARGET_REAL:
+<a name="line177">177: </a>      nep->sc->comparison    = SlepcCompareTargetReal;
+<a name="line178">178: </a>      nep->sc->comparisonctx = &nep->target;
+<a name="line179">179: </a>      <font color="#4169E1">break</font>;
+<a name="line180">180: </a>    <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
+<a name="line181">181: </a>      nep->sc->comparison    = SlepcCompareTargetImaginary;
+<a name="line182">182: </a>      nep->sc->comparisonctx = &nep->target;
+<a name="line183">183: </a>      <font color="#4169E1">break</font>;
+<a name="line184">184: </a>    <font color="#4169E1">case</font> NEP_ALL:
+<a name="line185">185: </a>      nep->sc->comparison    = SlepcCompareSmallestReal;
+<a name="line186">186: </a>      nep->sc->comparisonctx = NULL;
+<a name="line187">187: </a>      <font color="#4169E1">break</font>;
+<a name="line188">188: </a>    <font color="#4169E1">case</font> NEP_WHICH_USER:
+<a name="line189">189: </a>      <font color="#4169E1">break</font>;
+<a name="line190">190: </a>  }
+
+<a name="line192">192: </a>  nep->sc->map    = NULL;
+<a name="line193">193: </a>  nep->sc->mapobj = NULL;
+
+<a name="line195">195: </a>  <font color="#B22222">/* fill sorting criterion for <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
+<a name="line196">196: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(nep->ds,&sc);
+<a name="line197">197: </a>  sc->comparison    = nep->sc->comparison;
+<a name="line198">198: </a>  sc->comparisonctx = nep->sc->comparisonctx;
+<a name="line199">199: </a>  PetscObjectTypeCompare((PetscObject)nep,NEPNLEIGS,&flg);
+<a name="line200">200: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line201">201: </a>    sc->map    = NULL;
+<a name="line202">202: </a>    sc->mapobj = NULL;
+<a name="line203">203: </a>  }
+<a name="line204">204: </a>  <font color="#4169E1">if</font> (nep->ncv > nep->n) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"ncv must be the problem size at most"</font>);
+<a name="line205">205: </a>  <font color="#4169E1">if</font> (nep->nev > nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"nev bigger than ncv"</font>);
+
+<a name="line207">207: </a>  <font color="#B22222">/* process initial vectors */</font>
+<a name="line208">208: </a>  <font color="#4169E1">if</font> (nep->nini<0) {
+<a name="line209">209: </a>    k = -nep->nini;
+<a name="line210">210: </a>    <font color="#4169E1">if</font> (k>nep->ncv) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
+<a name="line211">211: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(nep->V,0,&k,nep->IS,PETSC_TRUE);
+<a name="line212">212: </a>    SlepcBasisDestroy_Private(&nep->nini,&nep->IS);
+<a name="line213">213: </a>    nep->nini = k;
+<a name="line214">214: </a>  }
+<a name="line215">215: </a>  PetscLogEventEnd(NEP_SetUp,nep,0,0,0);
+<a name="line216">216: </a>  nep->state = NEP_STATE_SETUP;
+<a name="line217">217: </a>  <font color="#4169E1">return</font>(0);
+<a name="line218">218: </a>}
+
+<a name="line222">222: </a><font color="#B22222">/*@</font>
+<a name="line223">223: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
+<a name="line224">224: </a><font color="#B22222">   space, that is, the subspace from which the solver starts to iterate.</font>
+
+<a name="line226">226: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Vec</font>
+
+<a name="line228">228: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line229">229: </a><font color="#B22222">+  nep   - the nonlinear eigensolver context</font>
+<a name="line230">230: </a><font color="#B22222">.  n     - number of vectors</font>
+<a name="line231">231: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
+
+<a name="line233">233: </a><font color="#B22222">   Notes:</font>
+<a name="line234">234: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
+<a name="line235">235: </a><font color="#B22222">   the other vectors are ignored.</font>
+
+<a name="line237">237: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() call to the other, so the</font>
+<a name="line238">238: </a><font color="#B22222">   initial space should be set every time.</font>
+
+<a name="line240">240: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
+<a name="line241">241: </a><font color="#B22222">   orthonormalized internally.</font>
+
+<a name="line243">243: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
+<a name="line244">244: </a><font color="#B22222">   of the wanted eigenspace. Then, convergence may be faster.</font>
+
+<a name="line246">246: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line247">247: </a><font color="#B22222">@*/</font>
+<a name="line248">248: </a><strong><font color="#4169E1"><a name="NEPSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPSetInitialSpace.html#NEPSetInitialSpace">NEPSetInitialSpace</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt n,Vec *is)</font></strong>
+<a name="line249">249: </a>{
+
+<a name="line255">255: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
+<a name="line256">256: </a>  SlepcBasisReference_Private(n,is,&nep->nini,&nep->IS);
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (n>0) nep->state = NEP_STATE_INITIAL;
+<a name="line258">258: </a>  <font color="#4169E1">return</font>(0);
+<a name="line259">259: </a>}
+
+<a name="line263">263: </a><font color="#B22222">/*</font>
+<a name="line264">264: </a><font color="#B22222">  NEPSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
+<a name="line265">265: </a><font color="#B22222">  by the user. This is called at setup.</font>
+<a name="line266">266: </a><font color="#B22222"> */</font>
+<a name="line267">267: </a><strong><font color="#4169E1"><a name="NEPSetDimensions_Default"></a>PetscErrorCode NEPSetDimensions_Default(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line268">268: </a>{
+<a name="line270">270: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
+<a name="line271">271: </a>    <font color="#4169E1">if</font> (*ncv<nev) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
+<a name="line272">272: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (*mpd) { <font color="#B22222">/* mpd set */</font>
+<a name="line273">273: </a>    *ncv = PetscMin(nep->n,nev+(*mpd));
+<a name="line274">274: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
+<a name="line275">275: </a>    <font color="#4169E1">if</font> (nev<500) *ncv = PetscMin(nep->n,PetscMax(2*nev,nev+15));
+<a name="line276">276: </a>    <font color="#4169E1">else</font> {
+<a name="line277">277: </a>      *mpd = 500;
+<a name="line278">278: </a>      *ncv = PetscMin(nep->n,nev+(*mpd));
+<a name="line279">279: </a>    }
+<a name="line280">280: </a>  }
+<a name="line281">281: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
+<a name="line282">282: </a>  <font color="#4169E1">return</font>(0);
+<a name="line283">283: </a>}
+
+<a name="line287">287: </a><font color="#B22222">/*@</font>
+<a name="line288">288: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a> - Allocate memory storage for common variables such</font>
+<a name="line289">289: </a><font color="#B22222">   as eigenvalues and eigenvectors.</font>
+
+<a name="line291">291: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line293">293: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line294">294: </a><font color="#B22222">+  nep   - eigensolver context</font>
+<a name="line295">295: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
+<a name="line296">296: </a><font color="#B22222">           working basis slightly larger than ncv</font>
+
+<a name="line298">298: </a><font color="#B22222">   Developers Note:</font>
+<a name="line299">299: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+<a name="line300">300: </a><font color="#B22222">   implementations.</font>
+
+<a name="line302">302: </a><font color="#B22222">   Level: developer</font>
+<a name="line303">303: </a><font color="#B22222">@*/</font>
+<a name="line304">304: </a><strong><font color="#4169E1"><a name="NEPAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPAllocateSolution.html#NEPAllocateSolution">NEPAllocateSolution</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt extra)</font></strong>
+<a name="line305">305: </a>{
+<a name="line307">307: </a>  PetscInt       oldsize,newc,requested;
+<a name="line308">308: </a>  PetscLogDouble cnt;
+<a name="line309">309: </a>  Mat            T;
+<a name="line310">310: </a>  Vec            t;
+
+<a name="line313">313: </a>  requested = nep->ncv + extra;
+
+<a name="line315">315: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
+<a name="line316">316: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(nep->V,NULL,NULL,&oldsize);
+<a name="line317">317: </a>  newc = PetscMax(0,requested-oldsize);
+
+<a name="line319">319: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
+<a name="line320">320: </a>  <font color="#4169E1">if</font> (requested != oldsize || !nep->eigr) {
+<a name="line321">321: </a>    <font color="#4169E1">if</font> (oldsize) {
+<a name="line322">322: </a>      PetscFree4(nep->eigr,nep->eigi,nep->errest,nep->perm);
+<a name="line323">323: </a>    }
+<a name="line324">324: </a>    PetscMalloc4(requested,&nep->eigr,requested,&nep->eigi,requested,&nep->errest,requested,&nep->perm);
+<a name="line325">325: </a>    cnt = newc*<font color="#4169E1">sizeof</font>(PetscScalar) + newc*<font color="#4169E1">sizeof</font>(PetscReal) + newc*<font color="#4169E1">sizeof</font>(PetscInt);
+<a name="line326">326: </a>    PetscLogObjectMemory((PetscObject)nep,cnt);
+<a name="line327">327: </a>  }
+
+<a name="line329">329: </a>  <font color="#B22222">/* allocate V */</font>
+<a name="line330">330: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
+<a name="line331">331: </a>  <font color="#4169E1">if</font> (!oldsize) {
+<a name="line332">332: </a>    <font color="#4169E1">if</font> (!((PetscObject)(nep->V))->type_name) {
+<a name="line333">333: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(nep->V,BVSVEC);
+<a name="line334">334: </a>    }
+<a name="line335">335: </a>    <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) T = nep->A[0];
+<a name="line336">336: </a>    <font color="#4169E1">else</font> {
+<a name="line337">337: </a>      <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>(nep,&T,NULL,NULL,NULL);
+<a name="line338">338: </a>    }
+<a name="line339">339: </a>    MatCreateVecs(T,&t,NULL);
+<a name="line340">340: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(nep->V,t,requested);
+<a name="line341">341: </a>    VecDestroy(&t);
+<a name="line342">342: </a>  } <font color="#4169E1">else</font> {
+<a name="line343">343: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(nep->V,requested,PETSC_FALSE);
+<a name="line344">344: </a>  }
+<a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
+<a name="line346">346: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/nepsolve.c b/src/nep/interface/nepsolve.c
index c8824b0..ee1dc9d 100644
--- a/src/nep/interface/nepsolve.c
+++ b/src/nep/interface/nepsolve.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -74,6 +74,7 @@ PetscErrorCode NEPSolve(NEP nep)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
+  if (nep->state>=NEP_STATE_SOLVED) PetscFunctionReturn(0);
   ierr = PetscLogEventBegin(NEP_Solve,nep,0,0,0);CHKERRQ(ierr);
 
   /* call setup */
@@ -86,8 +87,6 @@ PetscErrorCode NEPSolve(NEP nep)
     nep->errest[i] = 0.0;
     nep->perm[i]   = i;
   }
-  nep->ktol = 0.1;
-  ierr = NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,nep->ncv);CHKERRQ(ierr);
   ierr = NEPViewFromOptions(nep,NULL,"-nep_view_pre");CHKERRQ(ierr);
 
   ierr = (*nep->ops->solve)(nep);CHKERRQ(ierr);
@@ -95,9 +94,9 @@ PetscErrorCode NEPSolve(NEP nep)
 
   if (!nep->reason) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_PLIB,"Internal error, solver returned without setting converged reason");
 
-  if (nep->refine==NEP_REFINE_SIMPLE && nep->rits>0) {
+  if (nep->refine==NEP_REFINE_SIMPLE && nep->rits>0 && nep->nconv>0) {
     ierr = NEPComputeVectors(nep);CHKERRQ(ierr);
-    ierr = NEPNewtonRefinementSimple(nep,&nep->rits,&nep->reftol,nep->nconv);CHKERRQ(ierr);
+    ierr = NEPNewtonRefinementSimple(nep,&nep->rits,nep->rtol,nep->nconv);CHKERRQ(ierr);
     nep->state = NEP_STATE_EIGENVECTORS;
   }
 
@@ -153,7 +152,8 @@ PetscErrorCode NEPProjectOperator(NEP nep,PetscInt j0,PetscInt j1)
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidLogicalCollectiveInt(nep,j0,2);
   PetscValidLogicalCollectiveInt(nep,j1,3);
-  if (!nep->split) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONGSTATE,"This solver requires a split operator");
+  NEPCheckProblem(nep,1);
+  NEPCheckSplit(nep,1);
   ierr = BVSetActiveColumns(nep->V,j0,j1);CHKERRQ(ierr);
   for (k=0;k<nep->nt;k++) {
     ierr = DSGetMat(nep->ds,DSMatExtra[k],&G);CHKERRQ(ierr);
@@ -174,7 +174,7 @@ PetscErrorCode NEPProjectOperator(NEP nep,PetscInt j0,PetscInt j1)
 +  nep    - the nonlinear eigensolver context
 .  lambda - scalar argument
 .  x      - vector to be multiplied against
--  v      - workspace vector
+-  v      - workspace vector (used only in the case of split form)
 
    Output Parameters:
 +  y   - result vector
@@ -202,9 +202,12 @@ PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidLogicalCollectiveScalar(nep,lambda,2);
   PetscValidHeaderSpecific(x,VEC_CLASSID,3);
-  PetscValidHeaderSpecific(y,VEC_CLASSID,4);
+  if (v) PetscValidHeaderSpecific(v,VEC_CLASSID,4);
   PetscValidHeaderSpecific(y,VEC_CLASSID,5);
-  if (nep->split) {
+  if (A) PetscValidHeaderSpecific(A,MAT_CLASSID,6);
+  if (B) PetscValidHeaderSpecific(B,MAT_CLASSID,7);
+
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
     ierr = VecSet(y,0.0);CHKERRQ(ierr);
     for (i=0;i<nep->nt;i++) {
       ierr = FNEvaluateFunction(nep->f[i],lambda,&alpha);CHKERRQ(ierr);
@@ -229,7 +232,7 @@ PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat
 +  nep    - the nonlinear eigensolver context
 .  lambda - scalar argument
 .  x      - vector to be multiplied against
--  v      - workspace vector
+-  v      - workspace vector (used only in the case of split form)
 
    Output Parameters:
 +  y   - result vector
@@ -256,9 +259,11 @@ PetscErrorCode NEPApplyJacobian(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
   PetscValidLogicalCollectiveScalar(nep,lambda,2);
   PetscValidHeaderSpecific(x,VEC_CLASSID,3);
-  PetscValidHeaderSpecific(y,VEC_CLASSID,4);
+  if (v) PetscValidHeaderSpecific(v,VEC_CLASSID,4);
   PetscValidHeaderSpecific(y,VEC_CLASSID,5);
-  if (nep->split) {
+  if (A) PetscValidHeaderSpecific(A,MAT_CLASSID,6);
+
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
     ierr = VecSet(y,0.0);CHKERRQ(ierr);
     for (i=0;i<nep->nt;i++) {
       ierr = FNEvaluateDerivative(nep->f[i],lambda,&alpha);CHKERRQ(ierr);
@@ -352,14 +357,11 @@ PetscErrorCode NEPGetConverged(NEP nep,PetscInt *nconv)
 .  reason - negative value indicates diverged, positive value converged
 
    Possible values for reason:
-+  NEP_CONVERGED_FNORM_ABS - function norm satisfied absolute tolerance
-.  NEP_CONVERGED_FNORM_RELATIVE - function norm satisfied relative tolerance
-.  NEP_CONVERGED_SNORM_RELATIVE - step norm satisfied relative tolerance
-.  NEP_DIVERGED_LINEAR_SOLVE - inner linear solve failed
-.  NEP_DIVERGED_FUNCTION_COUNT - reached maximum allowed function evaluations
-.  NEP_DIVERGED_MAX_IT - required more than its to reach convergence
++  NEP_CONVERGED_TOL - converged up to tolerance
+.  NEP_CONVERGED_USER - converged due to a user-defined condition
+.  NEP_DIVERGED_ITS - required more than max_it iterations to reach convergence
 .  NEP_DIVERGED_BREAKDOWN - generic breakdown in method
--  NEP_DIVERGED_FNORM_NAN - Inf or NaN detected in function evaluation
+-  NEP_DIVERGED_LINEAR_SOLVE - inner linear solve failed
 
    Note:
    Can only be called after the call to NEPSolve() is complete.
@@ -504,17 +506,18 @@ PetscErrorCode NEPGetErrorEstimate(NEP nep,PetscInt i,PetscReal *errest)
    Input Parameters:
      lambda - eigenvalue
      x      - eigenvector
-     w      - array of work vectors (only one vector)
+     w      - array of work vectors (two vectors in split form, one vector otherwise)
 */
 PetscErrorCode NEPComputeResidualNorm_Private(NEP nep,PetscScalar lambda,Vec x,Vec *w,PetscReal *norm)
 {
   PetscErrorCode ierr;
-  Mat            T=nep->function;
+  Vec            y,z=NULL;
 
   PetscFunctionBegin;
-  ierr = NEPComputeFunction(nep,lambda,T,T);CHKERRQ(ierr);
-  ierr = MatMult(T,x,*w);CHKERRQ(ierr);
-  ierr = VecNorm(*w,NORM_2,norm);CHKERRQ(ierr);
+  y = w[0];
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) z = w[1];
+  ierr = NEPApplyFunction(nep,lambda,x,z,y,nep->function,nep->function_pre);CHKERRQ(ierr);
+  ierr = VecNorm(y,NORM_2,norm);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -546,9 +549,11 @@ PetscErrorCode NEPComputeResidualNorm_Private(NEP nep,PetscScalar lambda,Vec x,V
 PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *error)
 {
   PetscErrorCode ierr;
-  Vec            xr,xi=NULL,w;
-  PetscScalar    kr,ki;
-  PetscReal      er;
+  Vec            xr,xi=NULL;
+  PetscInt       j,nwork,issplit=0;
+  PetscScalar    kr,ki,s;
+  PetscReal      er,z=0.0;
+  PetscBool      flg;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
@@ -559,20 +564,26 @@ PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *e
 
   /* allocate work vectors */
 #if defined(PETSC_USE_COMPLEX)
-  ierr = NEPSetWorkVecs(nep,2);CHKERRQ(ierr);
+  nwork = 2;
 #else
-  ierr = NEPSetWorkVecs(nep,3);CHKERRQ(ierr);
-  xi = nep->work[2];
+  nwork = 3;
+#endif
+  if (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+    issplit = 1;
+    nwork++;  /* need an extra work vector for NEPComputeResidualNorm_Private */
+  }
+  ierr = NEPSetWorkVecs(nep,nwork);CHKERRQ(ierr);
+  xr = nep->work[issplit+1];
+#if !defined(PETSC_USE_COMPLEX)
+  xi = nep->work[issplit+2];
 #endif
-  xr = nep->work[0];
-  w  = nep->work[1];
 
   /* compute residual norms */
   ierr = NEPGetEigenpair(nep,i,&kr,&ki,xr,xi);CHKERRQ(ierr);
 #if !defined(PETSC_USE_COMPLEX)
   if (ki) SETERRQ(PETSC_COMM_SELF,1,"Not implemented for complex eigenvalues with real scalars");
 #endif
-  ierr = NEPComputeResidualNorm_Private(nep,kr,xr,&w,error);CHKERRQ(ierr);
+  ierr = NEPComputeResidualNorm_Private(nep,kr,xr,nep->work,error);CHKERRQ(ierr);
   ierr = VecNorm(xr,NORM_2,&er);CHKERRQ(ierr);
 
   /* compute error */
@@ -582,6 +593,26 @@ PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *e
     case NEP_ERROR_RELATIVE:
       *error /= PetscAbsScalar(kr)*er;
       break;
+    case NEP_ERROR_BACKWARD:
+      if (nep->fui!=NEP_USER_INTERFACE_SPLIT) {
+        *error = 0.0;
+        ierr = PetscInfo(nep,"Backward error only available in split form\n");CHKERRQ(ierr);
+        break;
+      }
+      /* initialization of matrix norms */
+      if (!nep->nrma[0]) {
+        for (j=0;j<nep->nt;j++) {
+          ierr = MatHasOperation(nep->A[j],MATOP_NORM,&flg);CHKERRQ(ierr);
+          if (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,"The computation of backward errors requires a matrix norm operation");
+          ierr = MatNorm(nep->A[j],NORM_INFINITY,&nep->nrma[j]);CHKERRQ(ierr);
+        }
+      }
+      for (j=0;j<nep->nt;j++) {
+        ierr = FNEvaluateFunction(nep->f[j],kr,&s);CHKERRQ(ierr);
+        z = z + nep->nrma[j]*PetscAbsScalar(s);
+      }
+      *error /= z;
+      break;
     default:
       SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,"Invalid error type");
   }
@@ -621,29 +652,31 @@ PetscErrorCode NEPComputeFunction(NEP nep,PetscScalar lambda,Mat A,Mat B)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-
-  if (nep->split) {
-
+  NEPCheckProblem(nep,1);
+  switch (nep->fui) {
+  case NEP_USER_INTERFACE_CALLBACK:
+    if (!nep->computefunction) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,"Must call NEPSetFunction() first");
+    ierr = PetscLogEventBegin(NEP_FunctionEval,nep,A,B,0);CHKERRQ(ierr);
+    PetscStackPush("NEP user Function function");
+    ierr = (*nep->computefunction)(nep,lambda,A,B,nep->functionctx);CHKERRQ(ierr);
+    PetscStackPop;
+    ierr = PetscLogEventEnd(NEP_FunctionEval,nep,A,B,0);CHKERRQ(ierr);
+    break;
+  case NEP_USER_INTERFACE_SPLIT:
     ierr = MatZeroEntries(A);CHKERRQ(ierr);
     for (i=0;i<nep->nt;i++) {
       ierr = FNEvaluateFunction(nep->f[i],lambda,&alpha);CHKERRQ(ierr);
       ierr = MatAXPY(A,alpha,nep->A[i],nep->mstr);CHKERRQ(ierr);
     }
     if (A != B) SETERRQ(PetscObjectComm((PetscObject)nep),1,"Not implemented");
-
-  } else {
-
-    if (!nep->computefunction) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,"Must call NEPSetFunction() first");
-
-    ierr = PetscLogEventBegin(NEP_FunctionEval,nep,A,B,0);CHKERRQ(ierr);
-
-    PetscStackPush("NEP user Function function");
-    ierr = (*nep->computefunction)(nep,lambda,A,B,nep->functionctx);CHKERRQ(ierr);
+    break;
+  case NEP_USER_INTERFACE_DERIVATIVES:
+    ierr = PetscLogEventBegin(NEP_DerivativesEval,nep,A,B,0);CHKERRQ(ierr);
+    PetscStackPush("NEP user Derivatives function");
+    ierr = (*nep->computederivatives)(nep,lambda,0,A,nep->derivativesctx);CHKERRQ(ierr);
     PetscStackPop;
-
-    ierr = PetscLogEventEnd(NEP_FunctionEval,nep,A,B,0);CHKERRQ(ierr);
-    nep->nfuncs++;
-
+    ierr = PetscLogEventEnd(NEP_DerivativesEval,nep,A,B,0);CHKERRQ(ierr);
+    break;
   }
   PetscFunctionReturn(0);
 }
@@ -679,27 +712,30 @@ PetscErrorCode NEPComputeJacobian(NEP nep,PetscScalar lambda,Mat A)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
-
-  if (nep->split) {
-
-    ierr = MatZeroEntries(A);CHKERRQ(ierr);
-    for (i=0;i<nep->nt;i++) {
-      ierr = FNEvaluateDerivative(nep->f[i],lambda,&alpha);CHKERRQ(ierr);
-      ierr = MatAXPY(A,alpha,nep->A[i],nep->mstr);CHKERRQ(ierr);
-    }
-
-  } else {
-
+  NEPCheckProblem(nep,1);
+  switch (nep->fui) {
+  case NEP_USER_INTERFACE_CALLBACK:
     if (!nep->computejacobian) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,"Must call NEPSetJacobian() first");
-
     ierr = PetscLogEventBegin(NEP_JacobianEval,nep,A,0,0);CHKERRQ(ierr);
-
     PetscStackPush("NEP user Jacobian function");
     ierr = (*nep->computejacobian)(nep,lambda,A,nep->jacobianctx);CHKERRQ(ierr);
     PetscStackPop;
-
     ierr = PetscLogEventEnd(NEP_JacobianEval,nep,A,0,0);CHKERRQ(ierr);
-
+    break;
+  case NEP_USER_INTERFACE_SPLIT:
+    ierr = MatZeroEntries(A);CHKERRQ(ierr);
+    for (i=0;i<nep->nt;i++) {
+      ierr = FNEvaluateDerivative(nep->f[i],lambda,&alpha);CHKERRQ(ierr);
+      ierr = MatAXPY(A,alpha,nep->A[i],nep->mstr);CHKERRQ(ierr);
+    }
+    break;
+  case NEP_USER_INTERFACE_DERIVATIVES:
+    ierr = PetscLogEventBegin(NEP_DerivativesEval,nep,A,0,0);CHKERRQ(ierr);
+    PetscStackPush("NEP user Derivatives function");
+    ierr = (*nep->computederivatives)(nep,lambda,1,A,nep->derivativesctx);CHKERRQ(ierr);
+    PetscStackPop;
+    ierr = PetscLogEventEnd(NEP_DerivativesEval,nep,A,0,0);CHKERRQ(ierr);
+    break;
   }
   PetscFunctionReturn(0);
 }
diff --git a/src/nep/interface/nepsolve.c.html b/src/nep/interface/nepsolve.c.html
index ba4cd5f..10bfbe7 100644
--- a/src/nep/interface/nepsolve.c.html
+++ b/src/nep/interface/nepsolve.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepsolve.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:18+00:00">
+<meta name="date" content="2016-05-16T10:34:20+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepsolve.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepsolve.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> routines related to the solution process.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -77,79 +77,79 @@
 <a name="line71"> 71: </a>{
 <a name="line73"> 73: </a>  PetscInt       i;
 
-<a name="line77"> 77: </a>  PetscLogEventBegin(NEP_Solve,nep,0,0,0);
-
-<a name="line79"> 79: </a>  <font color="#B22222">/* call setup */</font>
-<a name="line80"> 80: </a>  <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(nep);
-<a name="line81"> 81: </a>  nep->nconv = 0;
-<a name="line82"> 82: </a>  nep->its = 0;
-<a name="line83"> 83: </a>  <font color="#4169E1">for</font> (i=0;i<nep->ncv;i++) {
-<a name="line84"> 84: </a>    nep->eigr[i]   = 0.0;
-<a name="line85"> 85: </a>    nep->eigi[i]   = 0.0;
-<a name="line86"> 86: </a>    nep->errest[i] = 0.0;
-<a name="line87"> 87: </a>    nep->perm[i]   = i;
-<a name="line88"> 88: </a>  }
-<a name="line89"> 89: </a>  nep->ktol = 0.1;
-<a name="line90"> 90: </a>  NEPMonitor(nep,nep->its,nep->nconv,nep->eigr,nep->errest,nep->ncv);
-<a name="line91"> 91: </a>  NEPViewFromOptions(nep,NULL,<font color="#666666">"-nep_view_pre"</font>);
-
-<a name="line93"> 93: </a>  (*nep->ops->solve)(nep);
-<a name="line94"> 94: </a>  nep->state = NEP_STATE_SOLVED;
-
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (!nep->reason) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_PLIB,<font color="#666666">"Internal error, solver returned without setting converged reason"</font>);
-
-<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (nep->refine==NEP_REFINE_SIMPLE && nep->rits>0) {
-<a name="line99"> 99: </a>    NEPComputeVectors(nep);
-<a name="line100">100: </a>    NEPNewtonRefinementSimple(nep,&nep->rits,&nep->reftol,nep->nconv);
-<a name="line101">101: </a>    nep->state = NEP_STATE_EIGENVECTORS;
-<a name="line102">102: </a>  }
-
-<a name="line104">104: </a>  <font color="#B22222">/* sort eigenvalues according to nep->which parameter */</font>
-<a name="line105">105: </a>  <a href="../../../docs/manualpages/sys/SlepcSortEigenvalues.html#SlepcSortEigenvalues">SlepcSortEigenvalues</a>(nep->sc,nep->nconv,nep->eigr,nep->eigi,nep->perm);
-<a name="line106">106: </a>  PetscLogEventEnd(NEP_Solve,nep,0,0,0);
-
-<a name="line108">108: </a>  <font color="#B22222">/* various viewers */</font>
-<a name="line109">109: </a>  NEPViewFromOptions(nep,NULL,<font color="#666666">"-nep_view"</font>);
-<a name="line110">110: </a>  <a href="../../../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a>(nep);
-<a name="line111">111: </a>  <a href="../../../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a>(nep);
-<a name="line112">112: </a>  <a href="../../../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a>(nep);
-<a name="line113">113: </a>  <a href="../../../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a>(nep);
-
-<a name="line115">115: </a>  <font color="#B22222">/* Remove the initial subspace */</font>
-<a name="line116">116: </a>  nep->nini = 0;
-<a name="line117">117: </a>  <font color="#4169E1">return</font>(0);
-<a name="line118">118: </a>}
-
-<a name="line122">122: </a><font color="#B22222">/*@</font>
-<a name="line123">123: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a> - Computes the projection of the nonlinear operator.</font>
-
-<a name="line125">125: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line127">127: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line128">128: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line129">129: </a><font color="#B22222">.  j0  - initial index</font>
-<a name="line130">130: </a><font color="#B22222">-  j1  - final index</font>
-
-<a name="line132">132: </a><font color="#B22222">   Notes:</font>
-<a name="line133">133: </a><font color="#B22222">   This is available for split operator only.</font>
-
-<a name="line135">135: </a><font color="#B22222">   The nonlinear operator T(lambda) is projected onto span(V), where V is</font>
-<a name="line136">136: </a><font color="#B22222">   an orthonormal basis built internally by the solver. The projected</font>
-<a name="line137">137: </a><font color="#B22222">   operator is equal to sum_i V'*A_i*V*f_i(lambda), so this function</font>
-<a name="line138">138: </a><font color="#B22222">   computes all matrices Ei = V'*A_i*V, and stores them in the extra</font>
-<a name="line139">139: </a><font color="#B22222">   matrices inside <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>. Only rows/columns in the range [j0,j1-1] are computed,</font>
-<a name="line140">140: </a><font color="#B22222">   the previous ones are assumed to be available already.</font>
-
-<a name="line142">142: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line144">144: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>()</font>
-<a name="line145">145: </a><font color="#B22222">@*/</font>
-<a name="line146">146: </a><strong><font color="#4169E1"><a name="NEPProjectOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt j0,PetscInt j1)</font></strong>
-<a name="line147">147: </a>{
-<a name="line149">149: </a>  PetscInt       k;
-<a name="line150">150: </a>  Mat            G;
-
-<a name="line156">156: </a>  <font color="#4169E1">if</font> (!nep->split) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"This solver requires a split operator"</font>);
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (nep->state>=NEP_STATE_SOLVED) <font color="#4169E1">return</font>(0);
+<a name="line78"> 78: </a>  PetscLogEventBegin(NEP_Solve,nep,0,0,0);
+
+<a name="line80"> 80: </a>  <font color="#B22222">/* call setup */</font>
+<a name="line81"> 81: </a>  <a href="../../../docs/manualpages/NEP/NEPSetUp.html#NEPSetUp">NEPSetUp</a>(nep);
+<a name="line82"> 82: </a>  nep->nconv = 0;
+<a name="line83"> 83: </a>  nep->its = 0;
+<a name="line84"> 84: </a>  <font color="#4169E1">for</font> (i=0;i<nep->ncv;i++) {
+<a name="line85"> 85: </a>    nep->eigr[i]   = 0.0;
+<a name="line86"> 86: </a>    nep->eigi[i]   = 0.0;
+<a name="line87"> 87: </a>    nep->errest[i] = 0.0;
+<a name="line88"> 88: </a>    nep->perm[i]   = i;
+<a name="line89"> 89: </a>  }
+<a name="line90"> 90: </a>  NEPViewFromOptions(nep,NULL,<font color="#666666">"-nep_view_pre"</font>);
+
+<a name="line92"> 92: </a>  (*nep->ops->solve)(nep);
+<a name="line93"> 93: </a>  nep->state = NEP_STATE_SOLVED;
+
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (!nep->reason) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_PLIB,<font color="#666666">"Internal error, solver returned without setting converged reason"</font>);
+
+<a name="line97"> 97: </a>  <font color="#4169E1">if</font> (nep->refine==NEP_REFINE_SIMPLE && nep->rits>0 && nep->nconv>0) {
+<a name="line98"> 98: </a>    NEPComputeVectors(nep);
+<a name="line99"> 99: </a>    NEPNewtonRefinementSimple(nep,&nep->rits,nep->rtol,nep->nconv);
+<a name="line100">100: </a>    nep->state = NEP_STATE_EIGENVECTORS;
+<a name="line101">101: </a>  }
+
+<a name="line103">103: </a>  <font color="#B22222">/* sort eigenvalues according to nep->which parameter */</font>
+<a name="line104">104: </a>  <a href="../../../docs/manualpages/sys/SlepcSortEigenvalues.html#SlepcSortEigenvalues">SlepcSortEigenvalues</a>(nep->sc,nep->nconv,nep->eigr,nep->eigi,nep->perm);
+<a name="line105">105: </a>  PetscLogEventEnd(NEP_Solve,nep,0,0,0);
+
+<a name="line107">107: </a>  <font color="#B22222">/* various viewers */</font>
+<a name="line108">108: </a>  NEPViewFromOptions(nep,NULL,<font color="#666666">"-nep_view"</font>);
+<a name="line109">109: </a>  <a href="../../../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a>(nep);
+<a name="line110">110: </a>  <a href="../../../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a>(nep);
+<a name="line111">111: </a>  <a href="../../../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a>(nep);
+<a name="line112">112: </a>  <a href="../../../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a>(nep);
+
+<a name="line114">114: </a>  <font color="#B22222">/* Remove the initial subspace */</font>
+<a name="line115">115: </a>  nep->nini = 0;
+<a name="line116">116: </a>  <font color="#4169E1">return</font>(0);
+<a name="line117">117: </a>}
+
+<a name="line121">121: </a><font color="#B22222">/*@</font>
+<a name="line122">122: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a> - Computes the projection of the nonlinear operator.</font>
+
+<a name="line124">124: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line126">126: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line127">127: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line128">128: </a><font color="#B22222">.  j0  - initial index</font>
+<a name="line129">129: </a><font color="#B22222">-  j1  - final index</font>
+
+<a name="line131">131: </a><font color="#B22222">   Notes:</font>
+<a name="line132">132: </a><font color="#B22222">   This is available for split operator only.</font>
+
+<a name="line134">134: </a><font color="#B22222">   The nonlinear operator T(lambda) is projected onto span(V), where V is</font>
+<a name="line135">135: </a><font color="#B22222">   an orthonormal basis built internally by the solver. The projected</font>
+<a name="line136">136: </a><font color="#B22222">   operator is equal to sum_i V'*A_i*V*f_i(lambda), so this function</font>
+<a name="line137">137: </a><font color="#B22222">   computes all matrices Ei = V'*A_i*V, and stores them in the extra</font>
+<a name="line138">138: </a><font color="#B22222">   matrices inside <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a>. Only rows/columns in the range [j0,j1-1] are computed,</font>
+<a name="line139">139: </a><font color="#B22222">   the previous ones are assumed to be available already.</font>
+
+<a name="line141">141: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line143">143: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>()</font>
+<a name="line144">144: </a><font color="#B22222">@*/</font>
+<a name="line145">145: </a><strong><font color="#4169E1"><a name="NEPProjectOperator"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPProjectOperator.html#NEPProjectOperator">NEPProjectOperator</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt j0,PetscInt j1)</font></strong>
+<a name="line146">146: </a>{
+<a name="line148">148: </a>  PetscInt       k;
+<a name="line149">149: </a>  Mat            G;
+
+<a name="line155">155: </a>  NEPCheckProblem(nep,1);
+<a name="line156">156: </a>  NEPCheckSplit(nep,1);
 <a name="line157">157: </a>  <a href="../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(nep->V,j0,j1);
 <a name="line158">158: </a>  <font color="#4169E1">for</font> (k=0;k<nep->nt;k++) {
 <a name="line159">159: </a>    <a href="../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(nep->ds,DSMatExtra[k],&G);
@@ -168,7 +168,7 @@
 <a name="line174">174: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
 <a name="line175">175: </a><font color="#B22222">.  lambda - scalar argument</font>
 <a name="line176">176: </a><font color="#B22222">.  x      - vector to be multiplied against</font>
-<a name="line177">177: </a><font color="#B22222">-  v      - workspace vector</font>
+<a name="line177">177: </a><font color="#B22222">-  v      - workspace vector (used only in the case of split form)</font>
 
 <a name="line179">179: </a><font color="#B22222">   Output Parameters:</font>
 <a name="line180">180: </a><font color="#B22222">+  y   - result vector</font>
@@ -191,446 +191,479 @@
 <a name="line198">198: </a>  PetscInt       i;
 <a name="line199">199: </a>  PetscScalar    alpha;
 
-<a name="line207">207: </a>  <font color="#4169E1">if</font> (nep->split) {
-<a name="line208">208: </a>    VecSet(y,0.0);
-<a name="line209">209: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line210">210: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[i],lambda,&alpha);
-<a name="line211">211: </a>      MatMult(nep->A[i],x,v);
-<a name="line212">212: </a>      VecAXPY(y,alpha,v);
-<a name="line213">213: </a>    }
-<a name="line214">214: </a>  } <font color="#4169E1">else</font> {
-<a name="line215">215: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,A,B);
-<a name="line216">216: </a>    MatMult(A,x,y);
-<a name="line217">217: </a>  }
-<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
-<a name="line219">219: </a>}
-
-<a name="line223">223: </a><font color="#B22222">/*@</font>
-<a name="line224">224: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a> - Applies the nonlinear Jacobian T'(lambda) to a given vector.</font>
-
-<a name="line226">226: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line228">228: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line229">229: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
-<a name="line230">230: </a><font color="#B22222">.  lambda - scalar argument</font>
-<a name="line231">231: </a><font color="#B22222">.  x      - vector to be multiplied against</font>
-<a name="line232">232: </a><font color="#B22222">-  v      - workspace vector</font>
-
-<a name="line234">234: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line235">235: </a><font color="#B22222">+  y   - result vector</font>
-<a name="line236">236: </a><font color="#B22222">-  A   - Jacobian matrix</font>
-
-<a name="line238">238: </a><font color="#B22222">   Note:</font>
-<a name="line239">239: </a><font color="#B22222">   If the nonlinear operator is represented in split form, the result </font>
-<a name="line240">240: </a><font color="#B22222">   y = T'(lambda)*x is computed without building T'(lambda) explicitly. In</font>
-<a name="line241">241: </a><font color="#B22222">   that case, parameter A is not used. Otherwise, the matrix</font>
-<a name="line242">242: </a><font color="#B22222">   T'(lambda) is built and the effect is the same as a call to</font>
-<a name="line243">243: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>() followed by a MatMult().</font>
-
-<a name="line245">245: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line247">247: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(), <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>()</font>
-<a name="line248">248: </a><font color="#B22222">@*/</font>
-<a name="line249">249: </a><strong><font color="#4169E1"><a name="NEPApplyJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)</font></strong>
-<a name="line250">250: </a>{
-<a name="line252">252: </a>  PetscInt       i;
-<a name="line253">253: </a>  PetscScalar    alpha;
-
-<a name="line261">261: </a>  <font color="#4169E1">if</font> (nep->split) {
-<a name="line262">262: </a>    VecSet(y,0.0);
-<a name="line263">263: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line264">264: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(nep->f[i],lambda,&alpha);
-<a name="line265">265: </a>      MatMult(nep->A[i],x,v);
-<a name="line266">266: </a>      VecAXPY(y,alpha,v);
-<a name="line267">267: </a>    }
-<a name="line268">268: </a>  } <font color="#4169E1">else</font> {
-<a name="line269">269: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(nep,lambda,A);
-<a name="line270">270: </a>    MatMult(A,x,y);
-<a name="line271">271: </a>  }
-<a name="line272">272: </a>  <font color="#4169E1">return</font>(0);
-<a name="line273">273: </a>}
-
-<a name="line277">277: </a><font color="#B22222">/*@</font>
-<a name="line278">278: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a> - Gets the current iteration number. If the</font>
-<a name="line279">279: </a><font color="#B22222">   call to <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() is complete, then it returns the number of iterations</font>
-<a name="line280">280: </a><font color="#B22222">   carried out by the solution method.</font>
-
-<a name="line282">282: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line284">284: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line285">285: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line287">287: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line288">288: </a><font color="#B22222">.  its - number of iterations</font>
-
-<a name="line290">290: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line292">292: </a><font color="#B22222">   Note:</font>
-<a name="line293">293: </a><font color="#B22222">   During the i-th iteration this call returns i-1. If <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() is</font>
-<a name="line294">294: </a><font color="#B22222">   complete, then parameter "its" contains either the iteration number at</font>
-<a name="line295">295: </a><font color="#B22222">   which convergence was successfully reached, or failure was detected.</font>
-<a name="line296">296: </a><font color="#B22222">   Call <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>() to determine if the solver converged or</font>
-<a name="line297">297: </a><font color="#B22222">   failed and why.</font>
-
-<a name="line299">299: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
-<a name="line300">300: </a><font color="#B22222">@*/</font>
-<a name="line301">301: </a><strong><font color="#4169E1"><a name="NEPGetIterationNumber"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *its)</font></strong>
-<a name="line302">302: </a>{
-<a name="line306">306: </a>  *its = nep->its;
-<a name="line307">307: </a>  <font color="#4169E1">return</font>(0);
-<a name="line308">308: </a>}
-
-<a name="line312">312: </a><font color="#B22222">/*@</font>
-<a name="line313">313: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a> - Gets the number of converged eigenpairs.</font>
-
-<a name="line315">315: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line317">317: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line318">318: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line320">320: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line321">321: </a><font color="#B22222">.  nconv - number of converged eigenpairs</font>
-
-<a name="line323">323: </a><font color="#B22222">   Note:</font>
-<a name="line324">324: </a><font color="#B22222">   This function should be called after <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() has finished.</font>
-
-<a name="line326">326: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line328">328: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(), <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>()</font>
-<a name="line329">329: </a><font color="#B22222">@*/</font>
-<a name="line330">330: </a><strong><font color="#4169E1"><a name="NEPGetConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *nconv)</font></strong>
-<a name="line331">331: </a>{
-<a name="line335">335: </a>  NEPCheckSolved(nep,1);
-<a name="line336">336: </a>  *nconv = nep->nconv;
-<a name="line337">337: </a>  <font color="#4169E1">return</font>(0);
-<a name="line338">338: </a>}
-
-<a name="line342">342: </a><font color="#B22222">/*@</font>
-<a name="line343">343: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a> - Gets the reason why the <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() iteration was</font>
-<a name="line344">344: </a><font color="#B22222">   stopped.</font>
-
-<a name="line346">346: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line348">348: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line349">349: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line351">351: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line352">352: </a><font color="#B22222">.  reason - negative value indicates diverged, positive value converged</font>
-
-<a name="line354">354: </a><font color="#B22222">   Possible values for reason:</font>
-<a name="line355">355: </a><font color="#B22222">+  NEP_CONVERGED_FNORM_ABS - function norm satisfied absolute tolerance</font>
-<a name="line356">356: </a><font color="#B22222">.  NEP_CONVERGED_FNORM_RELATIVE - function norm satisfied relative tolerance</font>
-<a name="line357">357: </a><font color="#B22222">.  NEP_CONVERGED_SNORM_RELATIVE - step norm satisfied relative tolerance</font>
-<a name="line358">358: </a><font color="#B22222">.  NEP_DIVERGED_LINEAR_SOLVE - inner linear solve failed</font>
-<a name="line359">359: </a><font color="#B22222">.  NEP_DIVERGED_FUNCTION_COUNT - reached maximum allowed function evaluations</font>
-<a name="line360">360: </a><font color="#B22222">.  NEP_DIVERGED_MAX_IT - required more than its to reach convergence</font>
-<a name="line361">361: </a><font color="#B22222">.  NEP_DIVERGED_BREAKDOWN - generic breakdown in method</font>
-<a name="line362">362: </a><font color="#B22222">-  NEP_DIVERGED_FNORM_NAN - Inf or NaN detected in function evaluation</font>
-
-<a name="line364">364: </a><font color="#B22222">   Note:</font>
-<a name="line365">365: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() is complete.</font>
-
-<a name="line367">367: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line369">369: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(), <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a></font>
-<a name="line370">370: </a><font color="#B22222">@*/</font>
-<a name="line371">371: </a><strong><font color="#4169E1"><a name="NEPGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *reason)</font></strong>
-<a name="line372">372: </a>{
-<a name="line376">376: </a>  NEPCheckSolved(nep,1);
-<a name="line377">377: </a>  *reason = nep->reason;
-<a name="line378">378: </a>  <font color="#4169E1">return</font>(0);
-<a name="line379">379: </a>}
-
-<a name="line383">383: </a><font color="#B22222">/*@</font>
-<a name="line384">384: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a> - Gets the i-th solution of the eigenproblem as computed by</font>
-<a name="line385">385: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(). The solution consists in both the eigenvalue and the eigenvector.</font>
-
-<a name="line387">387: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line389">389: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line390">390: </a><font color="#B22222">+  nep - nonlinear eigensolver context</font>
-<a name="line391">391: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line393">393: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line394">394: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
-<a name="line395">395: </a><font color="#B22222">.  eigi - imaginary part of eigenvalue</font>
-<a name="line396">396: </a><font color="#B22222">.  Vr   - real part of eigenvector</font>
-<a name="line397">397: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
-
-<a name="line399">399: </a><font color="#B22222">   Notes:</font>
-<a name="line400">400: </a><font color="#B22222">   It is allowed to pass NULL for Vr and Vi, if the eigenvector is not</font>
-<a name="line401">401: </a><font color="#B22222">   required. Otherwise, the caller must provide valid Vec objects, i.e.,</font>
-<a name="line402">402: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
-
-<a name="line404">404: </a><font color="#B22222">   If the eigenvalue is real, then eigi and Vi are set to zero. If PETSc is</font>
-<a name="line405">405: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
-<a name="line406">406: </a><font color="#B22222">   directly in eigr (eigi is set to zero) and the eigenvector in Vr (Vi is</font>
-<a name="line407">407: </a><font color="#B22222">   set to zero). In both cases, the user can pass NULL in eigi and Vi.</font>
-
-<a name="line409">409: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>()).</font>
-<a name="line410">410: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
-<a name="line411">411: </a><font color="#B22222">   with <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>().</font>
-
-<a name="line413">413: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line415">415: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(), <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>()</font>
-<a name="line416">416: </a><font color="#B22222">@*/</font>
-<a name="line417">417: </a><strong><font color="#4169E1"><a name="NEPGetEigenpair"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)</font></strong>
-<a name="line418">418: </a>{
-<a name="line419">419: </a>  PetscInt       k;
-
-<a name="line427">427: </a>  NEPCheckSolved(nep,1);
-<a name="line428">428: </a>  <font color="#4169E1">if</font> (i<0 || i>=nep->nconv) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-
-<a name="line430">430: </a>  NEPComputeVectors(nep);
-<a name="line431">431: </a>  k = nep->perm[i];
-
-<a name="line433">433: </a>  <font color="#B22222">/* eigenvalue */</font>
-<a name="line434">434: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line435">435: </a>  <font color="#4169E1">if</font> (eigr) *eigr = nep->eigr[k];
-<a name="line436">436: </a>  <font color="#4169E1">if</font> (eigi) *eigi = 0;
-<a name="line437">437: </a><font color="#A020F0">#else</font>
-<a name="line438">438: </a>  <font color="#4169E1">if</font> (eigr) *eigr = nep->eigr[k];
-<a name="line439">439: </a>  <font color="#4169E1">if</font> (eigi) *eigi = nep->eigi[k];
-<a name="line440">440: </a><font color="#A020F0">#endif</font>
-
-<a name="line442">442: </a>  <font color="#B22222">/* eigenvector */</font>
-<a name="line443">443: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line444">444: </a>  <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vr); }
-<a name="line445">445: </a>  <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
-<a name="line446">446: </a><font color="#A020F0">#else</font>
-<a name="line447">447: </a>  <font color="#4169E1">if</font> (nep->eigi[k]>0) { <font color="#B22222">/* first value of conjugate pair */</font>
-<a name="line448">448: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vr); }
-<a name="line449">449: </a>    <font color="#4169E1">if</font> (Vi) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k+1,Vi); }
-<a name="line450">450: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->eigi[k]<0) { <font color="#B22222">/* second value of conjugate pair */</font>
-<a name="line451">451: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k-1,Vr); }
-<a name="line452">452: </a>    <font color="#4169E1">if</font> (Vi) {
-<a name="line453">453: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vi);
-<a name="line454">454: </a>      VecScale(Vi,-1.0);
-<a name="line455">455: </a>    }
-<a name="line456">456: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* real eigenvalue */</font>
-<a name="line457">457: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vr); }
-<a name="line458">458: </a>    <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
-<a name="line459">459: </a>  }
-<a name="line460">460: </a><font color="#A020F0">#endif</font>
-<a name="line461">461: </a>  <font color="#4169E1">return</font>(0);
-<a name="line462">462: </a>}
-
-<a name="line466">466: </a><font color="#B22222">/*@</font>
-<a name="line467">467: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a> - Returns the error estimate associated to the i-th</font>
-<a name="line468">468: </a><font color="#B22222">   computed eigenpair.</font>
-
-<a name="line470">470: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line472">472: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line473">473: </a><font color="#B22222">+  nep - nonlinear eigensolver context</font>
-<a name="line474">474: </a><font color="#B22222">-  i   - index of eigenpair</font>
-
-<a name="line476">476: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line477">477: </a><font color="#B22222">.  errest - the error estimate</font>
-
-<a name="line479">479: </a><font color="#B22222">   Notes:</font>
-<a name="line480">480: </a><font color="#B22222">   This is the error estimate used internally by the eigensolver. The actual</font>
-<a name="line481">481: </a><font color="#B22222">   error bound can be computed with NEPComputeRelativeError().</font>
-
-<a name="line483">483: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line485">485: </a><font color="#B22222">.seealso: NEPComputeRelativeError()</font>
-<a name="line486">486: </a><font color="#B22222">@*/</font>
-<a name="line487">487: </a><strong><font color="#4169E1"><a name="NEPGetErrorEstimate"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscReal *errest)</font></strong>
-<a name="line488">488: </a>{
-<a name="line492">492: </a>  NEPCheckSolved(nep,1);
-<a name="line493">493: </a>  <font color="#4169E1">if</font> (i<0 || i>=nep->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line494">494: </a>  <font color="#4169E1">if</font> (errest) *errest = nep->errest[nep->perm[i]];
-<a name="line495">495: </a>  <font color="#4169E1">return</font>(0);
-<a name="line496">496: </a>}
-
-<a name="line500">500: </a><font color="#B22222">/*</font>
-<a name="line501">501: </a><font color="#B22222">   NEPComputeResidualNorm_Private - Computes the norm of the residual vector</font>
-<a name="line502">502: </a><font color="#B22222">   associated with an eigenpair.</font>
-
-<a name="line504">504: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line505">505: </a><font color="#B22222">     lambda - eigenvalue</font>
-<a name="line506">506: </a><font color="#B22222">     x      - eigenvector</font>
-<a name="line507">507: </a><font color="#B22222">     w      - array of work vectors (only one vector)</font>
-<a name="line508">508: </a><font color="#B22222">*/</font>
-<a name="line509">509: </a><strong><font color="#4169E1"><a name="NEPComputeResidualNorm_Private"></a>PetscErrorCode NEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Vec x,Vec *w,PetscReal *norm)</font></strong>
-<a name="line510">510: </a>{
-<a name="line512">512: </a>  Mat            T=nep->function;
-
-<a name="line515">515: </a>  <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,T,T);
-<a name="line516">516: </a>  MatMult(T,x,*w);
-<a name="line517">517: </a>  VecNorm(*w,NORM_2,norm);
-<a name="line518">518: </a>  <font color="#4169E1">return</font>(0);
-<a name="line519">519: </a>}
-
-<a name="line523">523: </a><font color="#B22222">/*@</font>
-<a name="line524">524: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a> - Computes the error (based on the residual norm) associated</font>
-<a name="line525">525: </a><font color="#B22222">   with the i-th computed eigenpair.</font>
-
-<a name="line527">527: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line529">529: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line530">530: </a><font color="#B22222">+  nep  - the nonlinear eigensolver context</font>
-<a name="line531">531: </a><font color="#B22222">.  i    - the solution index</font>
-<a name="line532">532: </a><font color="#B22222">-  type - the type of error to compute</font>
-
-<a name="line534">534: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line535">535: </a><font color="#B22222">.  error - the error</font>
-
-<a name="line537">537: </a><font color="#B22222">   Notes:</font>
-<a name="line538">538: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
-<a name="line539">539: </a><font color="#B22222">   norm computed as ||T(lambda)x||_2 where lambda is the eigenvalue and x is the</font>
-<a name="line540">540: </a><font color="#B22222">   eigenvector.</font>
-
-<a name="line542">542: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line544">544: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>, <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a>()</font>
-<a name="line545">545: </a><font color="#B22222">@*/</font>
-<a name="line546">546: </a><strong><font color="#4169E1"><a name="NEPComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> type,PetscReal *error)</font></strong>
-<a name="line547">547: </a>{
-<a name="line549">549: </a>  Vec            xr,xi=NULL,w;
-<a name="line550">550: </a>  PetscScalar    kr,ki;
-<a name="line551">551: </a>  PetscReal      er;
-
-<a name="line558">558: </a>  NEPCheckSolved(nep,1);
-
-<a name="line560">560: </a>  <font color="#B22222">/* allocate work vectors */</font>
-<a name="line561">561: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line562">562: </a>  <a href="../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,2);
-<a name="line563">563: </a><font color="#A020F0">#else</font>
-<a name="line564">564: </a>  <a href="../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,3);
-<a name="line565">565: </a>  xi = nep->work[2];
-<a name="line566">566: </a><font color="#A020F0">#endif</font>
-<a name="line567">567: </a>  xr = nep->work[0];
-<a name="line568">568: </a>  w  = nep->work[1];
-
-<a name="line570">570: </a>  <font color="#B22222">/* compute residual norms */</font>
-<a name="line571">571: </a>  <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,i,&kr,&ki,xr,xi);
-<a name="line572">572: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line573">573: </a>  <font color="#4169E1">if</font> (ki) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Not implemented for complex eigenvalues with real scalars"</font>);
-<a name="line574">574: </a><font color="#A020F0">#endif</font>
-<a name="line575">575: </a>  NEPComputeResidualNorm_Private(nep,kr,xr,&w,error);
-<a name="line576">576: </a>  VecNorm(xr,NORM_2,&er);
-
-<a name="line578">578: </a>  <font color="#B22222">/* compute error */</font>
-<a name="line579">579: </a>  <font color="#4169E1">switch</font> (type) {
-<a name="line580">580: </a>    <font color="#4169E1">case</font> NEP_ERROR_ABSOLUTE:
-<a name="line581">581: </a>      <font color="#4169E1">break</font>;
-<a name="line582">582: </a>    <font color="#4169E1">case</font> NEP_ERROR_RELATIVE:
-<a name="line583">583: </a>      *error /= PetscAbsScalar(kr)*er;
-<a name="line584">584: </a>      <font color="#4169E1">break</font>;
-<a name="line585">585: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line586">586: </a>      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
-<a name="line587">587: </a>  }
-<a name="line588">588: </a>  <font color="#4169E1">return</font>(0);
-<a name="line589">589: </a>}
-
-<a name="line593">593: </a><font color="#B22222">/*@</font>
-<a name="line594">594: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a> - Computes the function matrix T(lambda) that has been</font>
-<a name="line595">595: </a><font color="#B22222">   set with <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>().</font>
-
-<a name="line597">597: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
-
-<a name="line599">599: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line600">600: </a><font color="#B22222">+  nep    - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line601">601: </a><font color="#B22222">-  lambda - the scalar argument</font>
-
-<a name="line603">603: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line604">604: </a><font color="#B22222">+  A   - Function matrix</font>
-<a name="line605">605: </a><font color="#B22222">-  B   - optional preconditioning matrix</font>
-
-<a name="line607">607: </a><font color="#B22222">   Notes:</font>
-<a name="line608">608: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>() is typically used within nonlinear eigensolvers</font>
-<a name="line609">609: </a><font color="#B22222">   implementations, so most users would not generally call this routine</font>
-<a name="line610">610: </a><font color="#B22222">   themselves.</font>
 
-<a name="line612">612: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line614">614: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>()</font>
-<a name="line615">615: </a><font color="#B22222">@*/</font>
-<a name="line616">616: </a><strong><font color="#4169E1"><a name="NEPComputeFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat A,Mat B)</font></strong>
-<a name="line617">617: </a>{
-<a name="line619">619: </a>  PetscInt       i;
-<a name="line620">620: </a>  PetscScalar    alpha;
-
-
-<a name="line625">625: </a>  <font color="#4169E1">if</font> (nep->split) {
-
-<a name="line627">627: </a>    MatZeroEntries(A);
-<a name="line628">628: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line629">629: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[i],lambda,&alpha);
-<a name="line630">630: </a>      MatAXPY(A,alpha,nep->A[i],nep->mstr);
-<a name="line631">631: </a>    }
-<a name="line632">632: </a>    <font color="#4169E1">if</font> (A != B) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Not implemented"</font>);
-
-<a name="line634">634: </a>  } <font color="#4169E1">else</font> {
-
-<a name="line636">636: </a>    <font color="#4169E1">if</font> (!nep->computefunction) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,<font color="#666666">"Must call <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>() first"</font>);
-
-<a name="line638">638: </a>    PetscLogEventBegin(NEP_FunctionEval,nep,A,B,0);
-
-<a name="line640">640: </a>    PetscStackPush(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> user Function function"</font>);
-<a name="line641">641: </a>    (*nep->computefunction)(nep,lambda,A,B,nep->functionctx);
-<a name="line642">642: </a>    PetscStackPop;
-
-<a name="line644">644: </a>    PetscLogEventEnd(NEP_FunctionEval,nep,A,B,0);
-<a name="line645">645: </a>    nep->nfuncs++;
-
-<a name="line647">647: </a>  }
-<a name="line648">648: </a>  <font color="#4169E1">return</font>(0);
-<a name="line649">649: </a>}
-
-<a name="line653">653: </a><font color="#B22222">/*@</font>
-<a name="line654">654: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a> - Computes the Jacobian matrix T'(lambda) that has been</font>
-<a name="line655">655: </a><font color="#B22222">   set with <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>().</font>
-
-<a name="line657">657: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
-
-<a name="line659">659: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line660">660: </a><font color="#B22222">+  nep    - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
-<a name="line661">661: </a><font color="#B22222">-  lambda - the scalar argument</font>
-
-<a name="line663">663: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line664">664: </a><font color="#B22222">.  A   - Jacobian matrix</font>
-
-<a name="line666">666: </a><font color="#B22222">   Notes:</font>
-<a name="line667">667: </a><font color="#B22222">   Most users should not need to explicitly call this routine, as it</font>
-<a name="line668">668: </a><font color="#B22222">   is used internally within the nonlinear eigensolvers.</font>
-
-<a name="line670">670: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line672">672: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>(), <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>()</font>
-<a name="line673">673: </a><font color="#B22222">@*/</font>
-<a name="line674">674: </a><strong><font color="#4169E1"><a name="NEPComputeJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat A)</font></strong>
-<a name="line675">675: </a>{
-<a name="line677">677: </a>  PetscInt       i;
-<a name="line678">678: </a>  PetscScalar    alpha;
-
-
-<a name="line683">683: </a>  <font color="#4169E1">if</font> (nep->split) {
-
-<a name="line685">685: </a>    MatZeroEntries(A);
-<a name="line686">686: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
-<a name="line687">687: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(nep->f[i],lambda,&alpha);
-<a name="line688">688: </a>      MatAXPY(A,alpha,nep->A[i],nep->mstr);
-<a name="line689">689: </a>    }
-
-<a name="line691">691: </a>  } <font color="#4169E1">else</font> {
-
-<a name="line693">693: </a>    <font color="#4169E1">if</font> (!nep->computejacobian) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,<font color="#666666">"Must call <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>() first"</font>);
-
-<a name="line695">695: </a>    PetscLogEventBegin(NEP_JacobianEval,nep,A,0,0);
-
-<a name="line697">697: </a>    PetscStackPush(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> user Jacobian function"</font>);
-<a name="line698">698: </a>    (*nep->computejacobian)(nep,lambda,A,nep->jacobianctx);
-<a name="line699">699: </a>    PetscStackPop;
-
-<a name="line701">701: </a>    PetscLogEventEnd(NEP_JacobianEval,nep,A,0,0);
-
-<a name="line703">703: </a>  }
-<a name="line704">704: </a>  <font color="#4169E1">return</font>(0);
-<a name="line705">705: </a>}
+<a name="line210">210: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line211">211: </a>    VecSet(y,0.0);
+<a name="line212">212: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line213">213: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[i],lambda,&alpha);
+<a name="line214">214: </a>      MatMult(nep->A[i],x,v);
+<a name="line215">215: </a>      VecAXPY(y,alpha,v);
+<a name="line216">216: </a>    }
+<a name="line217">217: </a>  } <font color="#4169E1">else</font> {
+<a name="line218">218: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(nep,lambda,A,B);
+<a name="line219">219: </a>    MatMult(A,x,y);
+<a name="line220">220: </a>  }
+<a name="line221">221: </a>  <font color="#4169E1">return</font>(0);
+<a name="line222">222: </a>}
+
+<a name="line226">226: </a><font color="#B22222">/*@</font>
+<a name="line227">227: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a> - Applies the nonlinear Jacobian T'(lambda) to a given vector.</font>
+
+<a name="line229">229: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line231">231: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line232">232: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line233">233: </a><font color="#B22222">.  lambda - scalar argument</font>
+<a name="line234">234: </a><font color="#B22222">.  x      - vector to be multiplied against</font>
+<a name="line235">235: </a><font color="#B22222">-  v      - workspace vector (used only in the case of split form)</font>
+
+<a name="line237">237: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line238">238: </a><font color="#B22222">+  y   - result vector</font>
+<a name="line239">239: </a><font color="#B22222">-  A   - Jacobian matrix</font>
+
+<a name="line241">241: </a><font color="#B22222">   Note:</font>
+<a name="line242">242: </a><font color="#B22222">   If the nonlinear operator is represented in split form, the result </font>
+<a name="line243">243: </a><font color="#B22222">   y = T'(lambda)*x is computed without building T'(lambda) explicitly. In</font>
+<a name="line244">244: </a><font color="#B22222">   that case, parameter A is not used. Otherwise, the matrix</font>
+<a name="line245">245: </a><font color="#B22222">   T'(lambda) is built and the effect is the same as a call to</font>
+<a name="line246">246: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>() followed by a MatMult().</font>
+
+<a name="line248">248: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line250">250: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetSplitOperator.html#NEPSetSplitOperator">NEPSetSplitOperator</a>(), <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>()</font>
+<a name="line251">251: </a><font color="#B22222">@*/</font>
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="NEPApplyJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPApplyJacobian.html#NEPApplyJacobian">NEPApplyJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat A)</font></strong>
+<a name="line253">253: </a>{
+<a name="line255">255: </a>  PetscInt       i;
+<a name="line256">256: </a>  PetscScalar    alpha;
+
+
+<a name="line266">266: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line267">267: </a>    VecSet(y,0.0);
+<a name="line268">268: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line269">269: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(nep->f[i],lambda,&alpha);
+<a name="line270">270: </a>      MatMult(nep->A[i],x,v);
+<a name="line271">271: </a>      VecAXPY(y,alpha,v);
+<a name="line272">272: </a>    }
+<a name="line273">273: </a>  } <font color="#4169E1">else</font> {
+<a name="line274">274: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(nep,lambda,A);
+<a name="line275">275: </a>    MatMult(A,x,y);
+<a name="line276">276: </a>  }
+<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><font color="#B22222">/*@</font>
+<a name="line283">283: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a> - Gets the current iteration number. If the</font>
+<a name="line284">284: </a><font color="#B22222">   call to <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() is complete, then it returns the number of iterations</font>
+<a name="line285">285: </a><font color="#B22222">   carried out by the solution method.</font>
+
+<a name="line287">287: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line289">289: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line290">290: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line292">292: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line293">293: </a><font color="#B22222">.  its - number of iterations</font>
+
+<a name="line295">295: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line297">297: </a><font color="#B22222">   Note:</font>
+<a name="line298">298: </a><font color="#B22222">   During the i-th iteration this call returns i-1. If <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() is</font>
+<a name="line299">299: </a><font color="#B22222">   complete, then parameter "its" contains either the iteration number at</font>
+<a name="line300">300: </a><font color="#B22222">   which convergence was successfully reached, or failure was detected.</font>
+<a name="line301">301: </a><font color="#B22222">   Call <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>() to determine if the solver converged or</font>
+<a name="line302">302: </a><font color="#B22222">   failed and why.</font>
+
+<a name="line304">304: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>()</font>
+<a name="line305">305: </a><font color="#B22222">@*/</font>
+<a name="line306">306: </a><strong><font color="#4169E1"><a name="NEPGetIterationNumber"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *its)</font></strong>
+<a name="line307">307: </a>{
+<a name="line311">311: </a>  *its = nep->its;
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
+
+<a name="line317">317: </a><font color="#B22222">/*@</font>
+<a name="line318">318: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a> - Gets the number of converged eigenpairs.</font>
+
+<a name="line320">320: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line322">322: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line323">323: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line325">325: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line326">326: </a><font color="#B22222">.  nconv - number of converged eigenpairs</font>
+
+<a name="line328">328: </a><font color="#B22222">   Note:</font>
+<a name="line329">329: </a><font color="#B22222">   This function should be called after <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() has finished.</font>
+
+<a name="line331">331: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line333">333: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetDimensions.html#NEPSetDimensions">NEPSetDimensions</a>(), <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>()</font>
+<a name="line334">334: </a><font color="#B22222">@*/</font>
+<a name="line335">335: </a><strong><font color="#4169E1"><a name="NEPGetConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt *nconv)</font></strong>
+<a name="line336">336: </a>{
+<a name="line340">340: </a>  NEPCheckSolved(nep,1);
+<a name="line341">341: </a>  *nconv = nep->nconv;
+<a name="line342">342: </a>  <font color="#4169E1">return</font>(0);
+<a name="line343">343: </a>}
+
+<a name="line347">347: </a><font color="#B22222">/*@</font>
+<a name="line348">348: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a> - Gets the reason why the <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() iteration was</font>
+<a name="line349">349: </a><font color="#B22222">   stopped.</font>
+
+<a name="line351">351: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line353">353: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line354">354: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line356">356: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line357">357: </a><font color="#B22222">.  reason - negative value indicates diverged, positive value converged</font>
+
+<a name="line359">359: </a><font color="#B22222">   Possible values for reason:</font>
+<a name="line360">360: </a><font color="#B22222">+  NEP_CONVERGED_TOL - converged up to tolerance</font>
+<a name="line361">361: </a><font color="#B22222">.  NEP_CONVERGED_USER - converged due to a user-defined condition</font>
+<a name="line362">362: </a><font color="#B22222">.  NEP_DIVERGED_ITS - required more than max_it iterations to reach convergence</font>
+<a name="line363">363: </a><font color="#B22222">.  NEP_DIVERGED_BREAKDOWN - generic breakdown in method</font>
+<a name="line364">364: </a><font color="#B22222">-  NEP_DIVERGED_LINEAR_SOLVE - inner linear solve failed</font>
+
+<a name="line366">366: </a><font color="#B22222">   Note:</font>
+<a name="line367">367: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>() is complete.</font>
+
+<a name="line369">369: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line371">371: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(), <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a></font>
+<a name="line372">372: </a><font color="#B22222">@*/</font>
+<a name="line373">373: </a><strong><font color="#4169E1"><a name="NEPGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetConvergedReason.html#NEPGetConvergedReason">NEPGetConvergedReason</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPConvergedReason.html#NEPConvergedReason">NEPConvergedReason</a> *reason)</font></strong>
+<a name="line374">374: </a>{
+<a name="line378">378: </a>  NEPCheckSolved(nep,1);
+<a name="line379">379: </a>  *reason = nep->reason;
+<a name="line380">380: </a>  <font color="#4169E1">return</font>(0);
+<a name="line381">381: </a>}
+
+<a name="line385">385: </a><font color="#B22222">/*@</font>
+<a name="line386">386: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a> - Gets the i-th solution of the eigenproblem as computed by</font>
+<a name="line387">387: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(). The solution consists in both the eigenvalue and the eigenvector.</font>
+
+<a name="line389">389: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line391">391: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line392">392: </a><font color="#B22222">+  nep - nonlinear eigensolver context</font>
+<a name="line393">393: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line395">395: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line396">396: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
+<a name="line397">397: </a><font color="#B22222">.  eigi - imaginary part of eigenvalue</font>
+<a name="line398">398: </a><font color="#B22222">.  Vr   - real part of eigenvector</font>
+<a name="line399">399: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
+
+<a name="line401">401: </a><font color="#B22222">   Notes:</font>
+<a name="line402">402: </a><font color="#B22222">   It is allowed to pass NULL for Vr and Vi, if the eigenvector is not</font>
+<a name="line403">403: </a><font color="#B22222">   required. Otherwise, the caller must provide valid Vec objects, i.e.,</font>
+<a name="line404">404: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
+
+<a name="line406">406: </a><font color="#B22222">   If the eigenvalue is real, then eigi and Vi are set to zero. If PETSc is</font>
+<a name="line407">407: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
+<a name="line408">408: </a><font color="#B22222">   directly in eigr (eigi is set to zero) and the eigenvector in Vr (Vi is</font>
+<a name="line409">409: </a><font color="#B22222">   set to zero). In both cases, the user can pass NULL in eigi and Vi.</font>
+
+<a name="line411">411: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>()).</font>
+<a name="line412">412: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
+<a name="line413">413: </a><font color="#B22222">   with <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>().</font>
+
+<a name="line415">415: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line417">417: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPGetConverged.html#NEPGetConverged">NEPGetConverged</a>(), <a href="../../../docs/manualpages/NEP/NEPSetWhichEigenpairs.html#NEPSetWhichEigenpairs">NEPSetWhichEigenpairs</a>()</font>
+<a name="line418">418: </a><font color="#B22222">@*/</font>
+<a name="line419">419: </a><strong><font color="#4169E1"><a name="NEPGetEigenpair"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)</font></strong>
+<a name="line420">420: </a>{
+<a name="line421">421: </a>  PetscInt       k;
+
+<a name="line429">429: </a>  NEPCheckSolved(nep,1);
+<a name="line430">430: </a>  <font color="#4169E1">if</font> (i<0 || i>=nep->nconv) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+
+<a name="line432">432: </a>  NEPComputeVectors(nep);
+<a name="line433">433: </a>  k = nep->perm[i];
+
+<a name="line435">435: </a>  <font color="#B22222">/* eigenvalue */</font>
+<a name="line436">436: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line437">437: </a>  <font color="#4169E1">if</font> (eigr) *eigr = nep->eigr[k];
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (eigi) *eigi = 0;
+<a name="line439">439: </a><font color="#A020F0">#else</font>
+<a name="line440">440: </a>  <font color="#4169E1">if</font> (eigr) *eigr = nep->eigr[k];
+<a name="line441">441: </a>  <font color="#4169E1">if</font> (eigi) *eigi = nep->eigi[k];
+<a name="line442">442: </a><font color="#A020F0">#endif</font>
+
+<a name="line444">444: </a>  <font color="#B22222">/* eigenvector */</font>
+<a name="line445">445: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line446">446: </a>  <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vr); }
+<a name="line447">447: </a>  <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
+<a name="line448">448: </a><font color="#A020F0">#else</font>
+<a name="line449">449: </a>  <font color="#4169E1">if</font> (nep->eigi[k]>0) { <font color="#B22222">/* first value of conjugate pair */</font>
+<a name="line450">450: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vr); }
+<a name="line451">451: </a>    <font color="#4169E1">if</font> (Vi) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k+1,Vi); }
+<a name="line452">452: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nep->eigi[k]<0) { <font color="#B22222">/* second value of conjugate pair */</font>
+<a name="line453">453: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k-1,Vr); }
+<a name="line454">454: </a>    <font color="#4169E1">if</font> (Vi) {
+<a name="line455">455: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vi);
+<a name="line456">456: </a>      VecScale(Vi,-1.0);
+<a name="line457">457: </a>    }
+<a name="line458">458: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* real eigenvalue */</font>
+<a name="line459">459: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(nep->V,k,Vr); }
+<a name="line460">460: </a>    <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
+<a name="line461">461: </a>  }
+<a name="line462">462: </a><font color="#A020F0">#endif</font>
+<a name="line463">463: </a>  <font color="#4169E1">return</font>(0);
+<a name="line464">464: </a>}
+
+<a name="line468">468: </a><font color="#B22222">/*@</font>
+<a name="line469">469: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a> - Returns the error estimate associated to the i-th</font>
+<a name="line470">470: </a><font color="#B22222">   computed eigenpair.</font>
+
+<a name="line472">472: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line474">474: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line475">475: </a><font color="#B22222">+  nep - nonlinear eigensolver context</font>
+<a name="line476">476: </a><font color="#B22222">-  i   - index of eigenpair</font>
+
+<a name="line478">478: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line479">479: </a><font color="#B22222">.  errest - the error estimate</font>
+
+<a name="line481">481: </a><font color="#B22222">   Notes:</font>
+<a name="line482">482: </a><font color="#B22222">   This is the error estimate used internally by the eigensolver. The actual</font>
+<a name="line483">483: </a><font color="#B22222">   error bound can be computed with NEPComputeRelativeError().</font>
+
+<a name="line485">485: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line487">487: </a><font color="#B22222">.seealso: NEPComputeRelativeError()</font>
+<a name="line488">488: </a><font color="#B22222">@*/</font>
+<a name="line489">489: </a><strong><font color="#4169E1"><a name="NEPGetErrorEstimate"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,PetscReal *errest)</font></strong>
+<a name="line490">490: </a>{
+<a name="line494">494: </a>  NEPCheckSolved(nep,1);
+<a name="line495">495: </a>  <font color="#4169E1">if</font> (i<0 || i>=nep->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line496">496: </a>  <font color="#4169E1">if</font> (errest) *errest = nep->errest[nep->perm[i]];
+<a name="line497">497: </a>  <font color="#4169E1">return</font>(0);
+<a name="line498">498: </a>}
+
+<a name="line502">502: </a><font color="#B22222">/*</font>
+<a name="line503">503: </a><font color="#B22222">   NEPComputeResidualNorm_Private - Computes the norm of the residual vector</font>
+<a name="line504">504: </a><font color="#B22222">   associated with an eigenpair.</font>
+
+<a name="line506">506: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line507">507: </a><font color="#B22222">     lambda - eigenvalue</font>
+<a name="line508">508: </a><font color="#B22222">     x      - eigenvector</font>
+<a name="line509">509: </a><font color="#B22222">     w      - array of work vectors (two vectors in split form, one vector otherwise)</font>
+<a name="line510">510: </a><font color="#B22222">*/</font>
+<a name="line511">511: </a><strong><font color="#4169E1"><a name="NEPComputeResidualNorm_Private"></a>PetscErrorCode NEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Vec x,Vec *w,PetscReal *norm)</font></strong>
+<a name="line512">512: </a>{
+<a name="line514">514: </a>  Vec            y,z=NULL;
+
+<a name="line517">517: </a>  y = w[0];
+<a name="line518">518: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) z = w[1];
+<a name="line519">519: </a>  <a href="../../../docs/manualpages/NEP/NEPApplyFunction.html#NEPApplyFunction">NEPApplyFunction</a>(nep,lambda,x,z,y,nep->function,nep->function_pre);
+<a name="line520">520: </a>  VecNorm(y,NORM_2,norm);
+<a name="line521">521: </a>  <font color="#4169E1">return</font>(0);
+<a name="line522">522: </a>}
+
+<a name="line526">526: </a><font color="#B22222">/*@</font>
+<a name="line527">527: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a> - Computes the error (based on the residual norm) associated</font>
+<a name="line528">528: </a><font color="#B22222">   with the i-th computed eigenpair.</font>
+
+<a name="line530">530: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line532">532: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line533">533: </a><font color="#B22222">+  nep  - the nonlinear eigensolver context</font>
+<a name="line534">534: </a><font color="#B22222">.  i    - the solution index</font>
+<a name="line535">535: </a><font color="#B22222">-  type - the type of error to compute</font>
+
+<a name="line537">537: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line538">538: </a><font color="#B22222">.  error - the error</font>
+
+<a name="line540">540: </a><font color="#B22222">   Notes:</font>
+<a name="line541">541: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
+<a name="line542">542: </a><font color="#B22222">   norm computed as ||T(lambda)x||_2 where lambda is the eigenvalue and x is the</font>
+<a name="line543">543: </a><font color="#B22222">   eigenvector.</font>
+
+<a name="line545">545: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line547">547: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a>, <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPGetErrorEstimate.html#NEPGetErrorEstimate">NEPGetErrorEstimate</a>()</font>
+<a name="line548">548: </a><font color="#B22222">@*/</font>
+<a name="line549">549: </a><strong><font color="#4169E1"><a name="NEPComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscInt i,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> type,PetscReal *error)</font></strong>
+<a name="line550">550: </a>{
+<a name="line552">552: </a>  Vec            xr,xi=NULL;
+<a name="line553">553: </a>  PetscInt       j,nwork,issplit=0;
+<a name="line554">554: </a>  PetscScalar    kr,ki,s;
+<a name="line555">555: </a>  PetscReal      er,z=0.0;
+<a name="line556">556: </a>  PetscBool      flg;
+
+<a name="line563">563: </a>  NEPCheckSolved(nep,1);
+
+<a name="line565">565: </a>  <font color="#B22222">/* allocate work vectors */</font>
+<a name="line566">566: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line567">567: </a>  nwork = 2;
+<a name="line568">568: </a><font color="#A020F0">#else</font>
+<a name="line569">569: </a>  nwork = 3;
+<a name="line570">570: </a><font color="#A020F0">#endif</font>
+<a name="line571">571: </a>  <font color="#4169E1">if</font> (nep->fui==NEP_USER_INTERFACE_SPLIT) {
+<a name="line572">572: </a>    issplit = 1;
+<a name="line573">573: </a>    nwork++;  <font color="#B22222">/* need an extra work vector for NEPComputeResidualNorm_Private */</font>
+<a name="line574">574: </a>  }
+<a name="line575">575: </a>  <a href="../../../docs/manualpages/NEP/NEPSetWorkVecs.html#NEPSetWorkVecs">NEPSetWorkVecs</a>(nep,nwork);
+<a name="line576">576: </a>  xr = nep->work[issplit+1];
+<a name="line577">577: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line578">578: </a>  xi = nep->work[issplit+2];
+<a name="line579">579: </a><font color="#A020F0">#endif</font>
+
+<a name="line581">581: </a>  <font color="#B22222">/* compute residual norms */</font>
+<a name="line582">582: </a>  <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,i,&kr,&ki,xr,xi);
+<a name="line583">583: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line584">584: </a>  <font color="#4169E1">if</font> (ki) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Not implemented for complex eigenvalues with real scalars"</font>);
+<a name="line585">585: </a><font color="#A020F0">#endif</font>
+<a name="line586">586: </a>  NEPComputeResidualNorm_Private(nep,kr,xr,nep->work,error);
+<a name="line587">587: </a>  VecNorm(xr,NORM_2,&er);
+
+<a name="line589">589: </a>  <font color="#B22222">/* compute error */</font>
+<a name="line590">590: </a>  <font color="#4169E1">switch</font> (type) {
+<a name="line591">591: </a>    <font color="#4169E1">case</font> NEP_ERROR_ABSOLUTE:
+<a name="line592">592: </a>      <font color="#4169E1">break</font>;
+<a name="line593">593: </a>    <font color="#4169E1">case</font> NEP_ERROR_RELATIVE:
+<a name="line594">594: </a>      *error /= PetscAbsScalar(kr)*er;
+<a name="line595">595: </a>      <font color="#4169E1">break</font>;
+<a name="line596">596: </a>    <font color="#4169E1">case</font> NEP_ERROR_BACKWARD:
+<a name="line597">597: </a>      <font color="#4169E1">if</font> (nep->fui!=NEP_USER_INTERFACE_SPLIT) {
+<a name="line598">598: </a>        *error = 0.0;
+<a name="line599">599: </a>        PetscInfo(nep,<font color="#666666">"Backward error only available in split form\n"</font>);
+<a name="line600">600: </a>        <font color="#4169E1">break</font>;
+<a name="line601">601: </a>      }
+<a name="line602">602: </a>      <font color="#B22222">/* initialization of matrix norms */</font>
+<a name="line603">603: </a>      <font color="#4169E1">if</font> (!nep->nrma[0]) {
+<a name="line604">604: </a>        <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
+<a name="line605">605: </a>          MatHasOperation(nep->A[j],MATOP_NORM,&flg);
+<a name="line606">606: </a>          <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
+<a name="line607">607: </a>          MatNorm(nep->A[j],NORM_INFINITY,&nep->nrma[j]);
+<a name="line608">608: </a>        }
+<a name="line609">609: </a>      }
+<a name="line610">610: </a>      <font color="#4169E1">for</font> (j=0;j<nep->nt;j++) {
+<a name="line611">611: </a>        <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[j],kr,&s);
+<a name="line612">612: </a>        z = z + nep->nrma[j]*PetscAbsScalar(s);
+<a name="line613">613: </a>      }
+<a name="line614">614: </a>      *error /= z;
+<a name="line615">615: </a>      <font color="#4169E1">break</font>;
+<a name="line616">616: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line617">617: </a>      SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
+<a name="line618">618: </a>  }
+<a name="line619">619: </a>  <font color="#4169E1">return</font>(0);
+<a name="line620">620: </a>}
+
+<a name="line624">624: </a><font color="#B22222">/*@</font>
+<a name="line625">625: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a> - Computes the function matrix T(lambda) that has been</font>
+<a name="line626">626: </a><font color="#B22222">   set with <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>().</font>
+
+<a name="line628">628: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
+
+<a name="line630">630: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line631">631: </a><font color="#B22222">+  nep    - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line632">632: </a><font color="#B22222">-  lambda - the scalar argument</font>
+
+<a name="line634">634: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line635">635: </a><font color="#B22222">+  A   - Function matrix</font>
+<a name="line636">636: </a><font color="#B22222">-  B   - optional preconditioning matrix</font>
+
+<a name="line638">638: </a><font color="#B22222">   Notes:</font>
+<a name="line639">639: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>() is typically used within nonlinear eigensolvers</font>
+<a name="line640">640: </a><font color="#B22222">   implementations, so most users would not generally call this routine</font>
+<a name="line641">641: </a><font color="#B22222">   themselves.</font>
+
+<a name="line643">643: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line645">645: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>(), <a href="../../../docs/manualpages/NEP/NEPGetFunction.html#NEPGetFunction">NEPGetFunction</a>()</font>
+<a name="line646">646: </a><font color="#B22222">@*/</font>
+<a name="line647">647: </a><strong><font color="#4169E1"><a name="NEPComputeFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPComputeFunction.html#NEPComputeFunction">NEPComputeFunction</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat A,Mat B)</font></strong>
+<a name="line648">648: </a>{
+<a name="line650">650: </a>  PetscInt       i;
+<a name="line651">651: </a>  PetscScalar    alpha;
+
+<a name="line655">655: </a>  NEPCheckProblem(nep,1);
+<a name="line656">656: </a>  <font color="#4169E1">switch</font> (nep->fui) {
+<a name="line657">657: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_CALLBACK:
+<a name="line658">658: </a>    <font color="#4169E1">if</font> (!nep->computefunction) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,<font color="#666666">"Must call <a href="../../../docs/manualpages/NEP/NEPSetFunction.html#NEPSetFunction">NEPSetFunction</a>() first"</font>);
+<a name="line659">659: </a>    PetscLogEventBegin(NEP_FunctionEval,nep,A,B,0);
+<a name="line660">660: </a>    PetscStackPush(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> user Function function"</font>);
+<a name="line661">661: </a>    (*nep->computefunction)(nep,lambda,A,B,nep->functionctx);
+<a name="line662">662: </a>    PetscStackPop;
+<a name="line663">663: </a>    PetscLogEventEnd(NEP_FunctionEval,nep,A,B,0);
+<a name="line664">664: </a>    <font color="#4169E1">break</font>;
+<a name="line665">665: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_SPLIT:
+<a name="line666">666: </a>    MatZeroEntries(A);
+<a name="line667">667: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line668">668: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(nep->f[i],lambda,&alpha);
+<a name="line669">669: </a>      MatAXPY(A,alpha,nep->A[i],nep->mstr);
+<a name="line670">670: </a>    }
+<a name="line671">671: </a>    <font color="#4169E1">if</font> (A != B) SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Not implemented"</font>);
+<a name="line672">672: </a>    <font color="#4169E1">break</font>;
+<a name="line673">673: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_DERIVATIVES:
+<a name="line674">674: </a>    PetscLogEventBegin(NEP_DerivativesEval,nep,A,B,0);
+<a name="line675">675: </a>    PetscStackPush(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> user Derivatives function"</font>);
+<a name="line676">676: </a>    (*nep->computederivatives)(nep,lambda,0,A,nep->derivativesctx);
+<a name="line677">677: </a>    PetscStackPop;
+<a name="line678">678: </a>    PetscLogEventEnd(NEP_DerivativesEval,nep,A,B,0);
+<a name="line679">679: </a>    <font color="#4169E1">break</font>;
+<a name="line680">680: </a>  }
+<a name="line681">681: </a>  <font color="#4169E1">return</font>(0);
+<a name="line682">682: </a>}
+
+<a name="line686">686: </a><font color="#B22222">/*@</font>
+<a name="line687">687: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a> - Computes the Jacobian matrix T'(lambda) that has been</font>
+<a name="line688">688: </a><font color="#B22222">   set with <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>().</font>
+
+<a name="line690">690: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> and Mat</font>
+
+<a name="line692">692: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line693">693: </a><font color="#B22222">+  nep    - the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> context</font>
+<a name="line694">694: </a><font color="#B22222">-  lambda - the scalar argument</font>
+
+<a name="line696">696: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line697">697: </a><font color="#B22222">.  A   - Jacobian matrix</font>
+
+<a name="line699">699: </a><font color="#B22222">   Notes:</font>
+<a name="line700">700: </a><font color="#B22222">   Most users should not need to explicitly call this routine, as it</font>
+<a name="line701">701: </a><font color="#B22222">   is used internally within the nonlinear eigensolvers.</font>
+
+<a name="line703">703: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line705">705: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>(), <a href="../../../docs/manualpages/NEP/NEPGetJacobian.html#NEPGetJacobian">NEPGetJacobian</a>()</font>
+<a name="line706">706: </a><font color="#B22222">@*/</font>
+<a name="line707">707: </a><strong><font color="#4169E1"><a name="NEPComputeJacobian"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPComputeJacobian.html#NEPComputeJacobian">NEPComputeJacobian</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscScalar lambda,Mat A)</font></strong>
+<a name="line708">708: </a>{
+<a name="line710">710: </a>  PetscInt       i;
+<a name="line711">711: </a>  PetscScalar    alpha;
+
+<a name="line715">715: </a>  NEPCheckProblem(nep,1);
+<a name="line716">716: </a>  <font color="#4169E1">switch</font> (nep->fui) {
+<a name="line717">717: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_CALLBACK:
+<a name="line718">718: </a>    <font color="#4169E1">if</font> (!nep->computejacobian) SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_USER,<font color="#666666">"Must call <a href="../../../docs/manualpages/NEP/NEPSetJacobian.html#NEPSetJacobian">NEPSetJacobian</a>() first"</font>);
+<a name="line719">719: </a>    PetscLogEventBegin(NEP_JacobianEval,nep,A,0,0);
+<a name="line720">720: </a>    PetscStackPush(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> user Jacobian function"</font>);
+<a name="line721">721: </a>    (*nep->computejacobian)(nep,lambda,A,nep->jacobianctx);
+<a name="line722">722: </a>    PetscStackPop;
+<a name="line723">723: </a>    PetscLogEventEnd(NEP_JacobianEval,nep,A,0,0);
+<a name="line724">724: </a>    <font color="#4169E1">break</font>;
+<a name="line725">725: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_SPLIT:
+<a name="line726">726: </a>    MatZeroEntries(A);
+<a name="line727">727: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nt;i++) {
+<a name="line728">728: </a>      <a href="../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(nep->f[i],lambda,&alpha);
+<a name="line729">729: </a>      MatAXPY(A,alpha,nep->A[i],nep->mstr);
+<a name="line730">730: </a>    }
+<a name="line731">731: </a>    <font color="#4169E1">break</font>;
+<a name="line732">732: </a>  <font color="#4169E1">case</font> NEP_USER_INTERFACE_DERIVATIVES:
+<a name="line733">733: </a>    PetscLogEventBegin(NEP_DerivativesEval,nep,A,0,0);
+<a name="line734">734: </a>    PetscStackPush(<font color="#666666">"<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> user Derivatives function"</font>);
+<a name="line735">735: </a>    (*nep->computederivatives)(nep,lambda,1,A,nep->derivativesctx);
+<a name="line736">736: </a>    PetscStackPop;
+<a name="line737">737: </a>    PetscLogEventEnd(NEP_DerivativesEval,nep,A,0,0);
+<a name="line738">738: </a>    <font color="#4169E1">break</font>;
+<a name="line739">739: </a>  }
+<a name="line740">740: </a>  <font color="#4169E1">return</font>(0);
+<a name="line741">741: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/interface/nepview.c b/src/nep/interface/nepview.c
index f401de0..adcaf75 100644
--- a/src/nep/interface/nepview.c
+++ b/src/nep/interface/nepview.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -57,7 +57,8 @@ PetscErrorCode NEPView(NEP nep,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   char           str[50];
-  PetscBool      isascii,isslp,istrivial,nods;
+  PetscInt       i;
+  PetscBool      isascii,istrivial,nods;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(nep,NEP_CLASSID,1);
@@ -73,23 +74,30 @@ PetscErrorCode NEPView(NEP nep,PetscViewer viewer)
       ierr = (*nep->ops->view)(nep,viewer);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
     }
-    if (nep->split) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  nonlinear operator in split form\n");CHKERRQ(ierr);
+    if (nep->fui) {
+      switch (nep->fui) {
+      case NEP_USER_INTERFACE_CALLBACK:
+        ierr = PetscViewerASCIIPrintf(viewer,"  nonlinear operator from user callbacks\n");CHKERRQ(ierr);
+        break;
+      case NEP_USER_INTERFACE_SPLIT:
+        ierr = PetscViewerASCIIPrintf(viewer,"  nonlinear operator in split form\n");CHKERRQ(ierr);
+        break;
+      case NEP_USER_INTERFACE_DERIVATIVES:
+        ierr = PetscViewerASCIIPrintf(viewer,"  nonlinear operator from user callbacks for the successive derivatives\n");CHKERRQ(ierr);
+        break;
+      }
     } else {
-      ierr = PetscViewerASCIIPrintf(viewer,"  nonlinear operator from user callbacks\n");CHKERRQ(ierr);
-    }
-    ierr = PetscViewerASCIIPrintf(viewer,"  iterative refinement: %s\n",NEPRefineTypes[nep->refine]);CHKERRQ(ierr);
-    if (nep->refine) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  refinement stopping criterion: tol=%g, its=%D\n",(double)nep->reftol,nep->rits);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"  nonlinear operator not specified yet\n");CHKERRQ(ierr);
     }
-      if (nep->npart>1) {
-        ierr = PetscViewerASCIIPrintf(viewer,"  splitting communicator in %D partitions for refinement\n",nep->npart);CHKERRQ(ierr);
-      }
     ierr = PetscViewerASCIIPrintf(viewer,"  selected portion of the spectrum: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     ierr = SlepcSNPrintfScalar(str,50,nep->target,PETSC_FALSE);CHKERRQ(ierr);
     if (!nep->which) {
       ierr = PetscViewerASCIIPrintf(viewer,"not yet set\n");CHKERRQ(ierr);
     } else switch (nep->which) {
+      case NEP_WHICH_USER:
+        ierr = PetscViewerASCIIPrintf(viewer,"user defined\n");CHKERRQ(ierr);
+        break;
       case NEP_TARGET_MAGNITUDE:
         ierr = PetscViewerASCIIPrintf(viewer,"closest to target: %s (in magnitude)\n",str);CHKERRQ(ierr);
         break;
@@ -117,19 +125,44 @@ PetscErrorCode NEPView(NEP nep,PetscViewer viewer)
       case NEP_SMALLEST_IMAGINARY:
         ierr = PetscViewerASCIIPrintf(viewer,"smallest imaginary parts\n");CHKERRQ(ierr);
         break;
+      case NEP_ALL:
+        ierr = PetscViewerASCIIPrintf(viewer,"all eigenvalues in the region\n");CHKERRQ(ierr);
+        break;
       default: SETERRQ(PetscObjectComm((PetscObject)nep),1,"Wrong value of nep->which");
     }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  number of eigenvalues (nev): %D\n",nep->nev);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  number of column vectors (ncv): %D\n",nep->ncv);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum dimension of projected problem (mpd): %D\n",nep->mpd);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum number of iterations: %D\n",nep->max_it);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  maximum number of function evaluations: %D\n",nep->max_funcs);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  tolerances: relative=%g, absolute=%g, solution=%g\n",(double)nep->rtol,(double)nep->abstol,(double)nep->stol);CHKERRQ(ierr);
-    if (nep->lag) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  updating the preconditioner every %D iterations\n",nep->lag);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  tolerance: %g\n",(double)nep->tol);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  convergence test: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+    switch (nep->conv) {
+    case NEP_CONV_ABS:
+      ierr = PetscViewerASCIIPrintf(viewer,"absolute\n");CHKERRQ(ierr);break;
+    case NEP_CONV_REL:
+      ierr = PetscViewerASCIIPrintf(viewer,"relative to the eigenvalue\n");CHKERRQ(ierr);break;
+    case NEP_CONV_NORM:
+      ierr = PetscViewerASCIIPrintf(viewer,"relative to the matrix norms\n");CHKERRQ(ierr);
+      if (nep->nrma) {
+        ierr = PetscViewerASCIIPrintf(viewer,"  computed matrix norms: %g",(double)nep->nrma[0]);CHKERRQ(ierr);
+        for (i=1;i<nep->nt;i++) {
+          ierr = PetscViewerASCIIPrintf(viewer,", %g",(double)nep->nrma[i]);CHKERRQ(ierr);
+        }
+        ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+      }
+      break;
+    case NEP_CONV_USER:
+      ierr = PetscViewerASCIIPrintf(viewer,"user-defined\n");CHKERRQ(ierr);break;
     }
-    if (nep->cctol) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  using a constant tolerance for the linear solver\n");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+    if (nep->refine) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  iterative refinement: %s, with %s scheme\n",NEPRefineTypes[nep->refine],NEPRefineSchemes[nep->scheme]);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"  refinement stopping criterion: tol=%g, its=%D\n",(double)nep->rtol,nep->rits);CHKERRQ(ierr);
+      if (nep->npart>1) {
+        ierr = PetscViewerASCIIPrintf(viewer,"  splitting communicator in %D partitions for refinement\n",nep->npart);CHKERRQ(ierr);
+      }
     }
     if (nep->nini) {
       ierr = PetscViewerASCIIPrintf(viewer,"  dimension of user-provided initial space: %D\n",PetscAbs(nep->nini));CHKERRQ(ierr);
@@ -151,11 +184,6 @@ PetscErrorCode NEPView(NEP nep,PetscViewer viewer)
     ierr = DSView(nep->ds,viewer);CHKERRQ(ierr);
   }
   ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
-  ierr = PetscObjectTypeCompare((PetscObject)nep,NEPSLP,&isslp);CHKERRQ(ierr);
-  if (!isslp) {
-    if (!nep->ksp) { ierr = NEPGetKSP(nep,&nep->ksp);CHKERRQ(ierr); }
-    ierr = KSPView(nep->ksp,viewer);CHKERRQ(ierr);
-  }
   PetscFunctionReturn(0);
 }
 
@@ -187,7 +215,7 @@ PetscErrorCode NEPReasonView(NEP nep,PetscViewer viewer)
   if (isAscii) {
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);CHKERRQ(ierr);
     if (nep->reason > 0) {
-      ierr = PetscViewerASCIIPrintf(viewer,"%s Nonlinear eigensolve converged (%d eigenpair%s) due to %s; iterations %D\n",((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:"",nep->nconv,(nep->nconv>1)?"s":"",NEPConvergedReasons[nep->reason],nep->its);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"%s Nonlinear eigensolve converged (%D eigenpair%s) due to %s; iterations %D\n",((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:"",nep->nconv,(nep->nconv>1)?"s":"",NEPConvergedReasons[nep->reason],nep->its);CHKERRQ(ierr);
     } else {
       ierr = PetscViewerASCIIPrintf(viewer,"%s Nonlinear eigensolve did not converge due to %s; iterations %D\n",((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:"",NEPConvergedReasons[nep->reason],nep->its);CHKERRQ(ierr);
     }
@@ -238,27 +266,32 @@ static PetscErrorCode NEPErrorView_ASCII(NEP nep,NEPErrorType etype,PetscViewer
   PetscBool      errok;
   PetscReal      error,re,im;
   PetscScalar    kr,ki;
-  PetscInt       i,j;
+  PetscInt       i,j,nvals;
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (nep->nconv<nep->nev) {
+  if (nep->which!=NEP_ALL && nep->nconv<nep->nev) {
     ierr = PetscViewerASCIIPrintf(viewer," Problem: less than %D eigenvalues converged\n\n",nep->nev);CHKERRQ(ierr);
     PetscFunctionReturn(0);
   }
   errok = PETSC_TRUE;
-  for (i=0;i<nep->nev;i++) {
+  nvals = (nep->which==NEP_ALL)? nep->nconv: nep->nev;
+  for (i=0;i<nvals;i++) {
     ierr = NEPComputeError(nep,i,etype,&error);CHKERRQ(ierr);
-    errok = (errok && error<5.0*nep->rtol)? PETSC_TRUE: PETSC_FALSE;
+    errok = (errok && error<5.0*nep->tol)? PETSC_TRUE: PETSC_FALSE;
   }
   if (!errok) {
-    ierr = PetscViewerASCIIPrintf(viewer," Problem: some of the first %D relative errors are higher than the tolerance\n\n",nep->nev);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," Problem: some of the first %D relative errors are higher than the tolerance\n\n",nvals);CHKERRQ(ierr);
     PetscFunctionReturn(0);
   }
-  ierr = PetscViewerASCIIPrintf(viewer," All requested eigenvalues computed up to the required tolerance:");CHKERRQ(ierr);
-  for (i=0;i<=(nep->nev-1)/8;i++) {
+  if (nep->which==NEP_ALL) {
+    ierr = PetscViewerASCIIPrintf(viewer," Found %D eigenvalues, all of them computed up to the required tolerance:",nvals);CHKERRQ(ierr);
+  } else {
+    ierr = PetscViewerASCIIPrintf(viewer," All requested eigenvalues computed up to the required tolerance:");CHKERRQ(ierr);
+  }
+  for (i=0;i<=(nvals-1)/8;i++) {
     ierr = PetscViewerASCIIPrintf(viewer,"\n     ");CHKERRQ(ierr);
-    for (j=0;j<PetscMin(8,nep->nev-8*i);j++) {
+    for (j=0;j<PetscMin(8,nvals-8*i);j++) {
       ierr = NEPGetEigenpair(nep,8*i+j,&kr,&ki,NULL,NULL);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
       re = PetscRealPart(kr);
@@ -274,7 +307,7 @@ static PetscErrorCode NEPErrorView_ASCII(NEP nep,NEPErrorType etype,PetscViewer
       } else {
         ierr = PetscViewerASCIIPrintf(viewer,"%.5f",(double)re);CHKERRQ(ierr);
       }
-      if (8*i+j+1<nep->nev) { ierr = PetscViewerASCIIPrintf(viewer,", ");CHKERRQ(ierr); }
+      if (8*i+j+1<nvals) { ierr = PetscViewerASCIIPrintf(viewer,", ");CHKERRQ(ierr); }
     }
   }
   ierr = PetscViewerASCIIPrintf(viewer,"\n\n");CHKERRQ(ierr);
@@ -301,6 +334,9 @@ static PetscErrorCode NEPErrorView_DETAIL(NEP nep,NEPErrorType etype,PetscViewer
     case NEP_ERROR_RELATIVE:
       ierr = PetscSNPrintf(ex,EXLEN," ||T(k)x||/||kx||");CHKERRQ(ierr);
       break;
+    case NEP_ERROR_BACKWARD:
+      ierr = PetscSNPrintf(ex,EXLEN,"    eta(x,k)");CHKERRQ(ierr);
+      break;
   }
   ierr = PetscViewerASCIIPrintf(viewer,"%s            k             %s\n%s",sep,ex,sep);CHKERRQ(ierr);
   for (i=0;i<nep->nconv;i++) {
@@ -358,7 +394,8 @@ static PetscErrorCode NEPErrorView_MATLAB(NEP nep,NEPErrorType etype,PetscViewer
 
    Options Database Key:
 +  -nep_error_absolute - print absolute errors of each eigenpair
--  -nep_error_relative - print relative errors of each eigenpair
+.  -nep_error_relative - print relative errors of each eigenpair
+-  -nep_error_backward - print backward errors of each eigenpair
 
    Notes:
    By default, this function checks the error of all eigenpairs and prints
@@ -441,6 +478,13 @@ PetscErrorCode NEPErrorViewFromOptions(NEP nep)
     ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
     ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
   }
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,"-nep_error_backward",&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = PetscViewerPushFormat(viewer,format);CHKERRQ(ierr);
+    ierr = NEPErrorView(nep,NEP_ERROR_BACKWARD,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
+    ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
+  }
   incall = PETSC_FALSE;
   PetscFunctionReturn(0);
 }
@@ -472,6 +516,7 @@ static PetscErrorCode NEPValuesView_DRAW(NEP nep,PetscViewer viewer)
     ierr = PetscDrawSPAddPoint(drawsp,&re,&im);CHKERRQ(ierr);
   }
   ierr = PetscDrawSPDraw(drawsp,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscDrawSPSave(drawsp);CHKERRQ(ierr);
   ierr = PetscDrawSPDestroy(&drawsp);CHKERRQ(ierr);
   ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -669,7 +714,7 @@ PetscErrorCode NEPVectorsView(NEP nep,PetscViewer viewer)
     ierr = NEPComputeVectors(nep);CHKERRQ(ierr);
     for (i=0;i<nep->nconv;i++) {
       k = nep->perm[i];
-      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",i,ename);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",(int)i,ename);CHKERRQ(ierr);
       ierr = BVGetColumn(nep->V,k,&x);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)x,vname);CHKERRQ(ierr);
       ierr = VecView(x,viewer);CHKERRQ(ierr);
diff --git a/src/nep/interface/nepview.c.html b/src/nep/interface/nepview.c.html
index 335eea8..18770a2 100644
--- a/src/nep/interface/nepview.c.html
+++ b/src/nep/interface/nepview.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/interface/nepview.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:14+00:00">
+<meta name="date" content="2016-05-16T10:34:15+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/interface/nepview.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/interface/nepview.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> routines related to various viewers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -66,599 +66,644 @@
 <a name="line56"> 56: </a><strong><font color="#4169E1"><a name="NEPView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPView.html#NEPView">NEPView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
 <a name="line57"> 57: </a>{
 <a name="line59"> 59: </a>  char           str[50];
-<a name="line60"> 60: </a>  PetscBool      isascii,isslp,istrivial,nods;
-
-<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-
-<a name="line68"> 68: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line70"> 70: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)nep,viewer);
-<a name="line71"> 71: </a>    <font color="#4169E1">if</font> (nep->ops->view) {
-<a name="line72"> 72: </a>      PetscViewerASCIIPushTab(viewer);
-<a name="line73"> 73: </a>      (*nep->ops->view)(nep,viewer);
-<a name="line74"> 74: </a>      PetscViewerASCIIPopTab(viewer);
-<a name="line75"> 75: </a>    }
-<a name="line76"> 76: </a>    <font color="#4169E1">if</font> (nep->split) {
-<a name="line77"> 77: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  nonlinear operator in split form\n"</font>);
-<a name="line78"> 78: </a>    } <font color="#4169E1">else</font> {
-<a name="line79"> 79: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  nonlinear operator from user callbacks\n"</font>);
-<a name="line80"> 80: </a>    }
-<a name="line81"> 81: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  iterative refinement: %s\n"</font>,NEPRefineTypes[nep->refine]);
-<a name="line82"> 82: </a>    <font color="#4169E1">if</font> (nep->refine) {
-<a name="line83"> 83: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  refinement stopping criterion: tol=%g, its=%D\n"</font>,(double)nep->reftol,nep->rits);
-<a name="line84"> 84: </a>    }
-<a name="line85"> 85: </a>      <font color="#4169E1">if</font> (nep->npart>1) {
-<a name="line86"> 86: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  splitting communicator in %D partitions for refinement\n"</font>,nep->npart);
-<a name="line87"> 87: </a>      }
-<a name="line88"> 88: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected portion of the spectrum: "</font>);
-<a name="line89"> 89: </a>    <a href="../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,nep->target,PETSC_FALSE);
-<a name="line90"> 90: </a>    <font color="#4169E1">if</font> (!nep->which) {
-<a name="line91"> 91: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"not yet set\n"</font>);
-<a name="line92"> 92: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">switch</font> (nep->which) {
-<a name="line93"> 93: </a>      <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
-<a name="line94"> 94: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (in magnitude)\n"</font>,str);
-<a name="line95"> 95: </a>        <font color="#4169E1">break</font>;
-<a name="line96"> 96: </a>      <font color="#4169E1">case</font> NEP_TARGET_REAL:
-<a name="line97"> 97: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the real axis)\n"</font>,str);
-<a name="line98"> 98: </a>        <font color="#4169E1">break</font>;
-<a name="line99"> 99: </a>      <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
-<a name="line100">100: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the imaginary axis)\n"</font>,str);
-<a name="line101">101: </a>        <font color="#4169E1">break</font>;
-<a name="line102">102: </a>      <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
-<a name="line103">103: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest eigenvalues in magnitude\n"</font>);
-<a name="line104">104: </a>        <font color="#4169E1">break</font>;
-<a name="line105">105: </a>      <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
-<a name="line106">106: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest eigenvalues in magnitude\n"</font>);
-<a name="line107">107: </a>        <font color="#4169E1">break</font>;
-<a name="line108">108: </a>      <font color="#4169E1">case</font> NEP_LARGEST_REAL:
-<a name="line109">109: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest real parts\n"</font>);
-<a name="line110">110: </a>        <font color="#4169E1">break</font>;
-<a name="line111">111: </a>      <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
-<a name="line112">112: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest real parts\n"</font>);
-<a name="line113">113: </a>        <font color="#4169E1">break</font>;
-<a name="line114">114: </a>      <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
-<a name="line115">115: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest imaginary parts\n"</font>);
-<a name="line116">116: </a>        <font color="#4169E1">break</font>;
-<a name="line117">117: </a>      <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
-<a name="line118">118: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest imaginary parts\n"</font>);
-<a name="line119">119: </a>        <font color="#4169E1">break</font>;
-<a name="line120">120: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Wrong value of nep->which"</font>);
-<a name="line121">121: </a>    }
-<a name="line122">122: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of eigenvalues (nev): %D\n"</font>,nep->nev);
-<a name="line123">123: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of column vectors (ncv): %D\n"</font>,nep->ncv);
-<a name="line124">124: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,nep->mpd);
-<a name="line125">125: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,nep->max_it);
-<a name="line126">126: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of function evaluations: %D\n"</font>,nep->max_funcs);
-<a name="line127">127: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerances: relative=%g, absolute=%g, solution=%g\n"</font>,(double)nep->rtol,(double)nep->abstol,(double)nep->stol);
-<a name="line128">128: </a>    <font color="#4169E1">if</font> (nep->lag) {
-<a name="line129">129: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  updating the preconditioner every %D iterations\n"</font>,nep->lag);
-<a name="line130">130: </a>    }
-<a name="line131">131: </a>    <font color="#4169E1">if</font> (nep->cctol) {
-<a name="line132">132: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  using a constant tolerance for the linear solver\n"</font>);
-<a name="line133">133: </a>    }
-<a name="line134">134: </a>    <font color="#4169E1">if</font> (nep->nini) {
-<a name="line135">135: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(nep->nini));
-<a name="line136">136: </a>    }
-<a name="line137">137: </a>  } <font color="#4169E1">else</font> {
-<a name="line138">138: </a>    <font color="#4169E1">if</font> (nep->ops->view) {
-<a name="line139">139: </a>      (*nep->ops->view)(nep,viewer);
-<a name="line140">140: </a>    }
-<a name="line141">141: </a>  }
-<a name="line142">142: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
-<a name="line143">143: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
-<a name="line144">144: </a>  <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(nep->V,viewer);
-<a name="line145">145: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
-<a name="line146">146: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
-<a name="line147">147: </a>  <font color="#4169E1">if</font> (!istrivial) { <a href="../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(nep->rg,viewer); }
-<a name="line148">148: </a>  PetscObjectTypeCompareAny((PetscObject)nep,&nods,NEPRII,NEPSLP,NEPINTERPOL,<font color="#666666">""</font>);
-<a name="line149">149: </a>  <font color="#4169E1">if</font> (!nods) {
-<a name="line150">150: </a>    <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
-<a name="line151">151: </a>    <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(nep->ds,viewer);
-<a name="line152">152: </a>  }
-<a name="line153">153: </a>  PetscViewerPopFormat(viewer);
-<a name="line154">154: </a>  PetscObjectTypeCompare((PetscObject)nep,NEPSLP,&isslp);
-<a name="line155">155: </a>  <font color="#4169E1">if</font> (!isslp) {
-<a name="line156">156: </a>    <font color="#4169E1">if</font> (!nep->ksp) { <a href="../../../docs/manualpages/NEP/NEPGetKSP.html#NEPGetKSP">NEPGetKSP</a>(nep,&nep->ksp); }
-<a name="line157">157: </a>    KSPView(nep->ksp,viewer);
-<a name="line158">158: </a>  }
-<a name="line159">159: </a>  <font color="#4169E1">return</font>(0);
-<a name="line160">160: </a>}
-
-<a name="line164">164: </a><font color="#B22222">/*@C</font>
-<a name="line165">165: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a> - Displays the reason a <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> solve converged or diverged.</font>
-
-<a name="line167">167: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line169">169: </a><font color="#B22222">   Parameter:</font>
-<a name="line170">170: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
-<a name="line171">171: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
-
-<a name="line173">173: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line174">174: </a><font color="#B22222">.  -nep_converged_reason - print reason for convergence, and number of iterations</font>
-
-<a name="line176">176: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line178">178: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(), <a href="../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>()</font>
-<a name="line179">179: </a><font color="#B22222">@*/</font>
-<a name="line180">180: </a><strong><font color="#4169E1"><a name="NEPReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line181">181: </a>{
-<a name="line183">183: </a>  PetscBool      isAscii;
-
-<a name="line186">186: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
-<a name="line187">187: </a>  <font color="#4169E1">if</font> (isAscii) {
-<a name="line188">188: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line189">189: </a>    <font color="#4169E1">if</font> (nep->reason > 0) {
-<a name="line190">190: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Nonlinear eigensolve converged (%d eigenpair%s) due to %s; iterations %D\n"</font>,((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:<font color="#666666">""</font>,nep->nconv,(nep->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,NEPConvergedReasons[nep->reason],nep->its);
-<a name="line191">191: </a>    } <font color="#4169E1">else</font> {
-<a name="line192">192: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Nonlinear eigensolve did not converge due to %s; iterations %D\n"</font>,((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:<font color="#666666">""</font>,NEPConvergedReasons[nep->reason],nep->its);
-<a name="line193">193: </a>    }
-<a name="line194">194: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
-<a name="line195">195: </a>  }
-<a name="line196">196: </a>  <font color="#4169E1">return</font>(0);
-<a name="line197">197: </a>}
-
-<a name="line201">201: </a><font color="#B22222">/*@</font>
-<a name="line202">202: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line203">203: </a><font color="#B22222">   the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> converged reason is to be viewed. </font>
-
-<a name="line205">205: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line207">207: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line208">208: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line210">210: </a><font color="#B22222">   Level: developer</font>
-<a name="line211">211: </a><font color="#B22222">@*/</font>
-<a name="line212">212: </a><strong><font color="#4169E1"><a name="NEPReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line213">213: </a>{
-<a name="line214">214: </a>  PetscErrorCode    ierr;
-<a name="line215">215: </a>  PetscViewer       viewer;
-<a name="line216">216: </a>  PetscBool         flg;
-<a name="line217">217: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line218">218: </a>  PetscViewerFormat format;
-
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line222">222: </a>  incall = PETSC_TRUE;
-<a name="line223">223: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_converged_reason"</font>,&viewer,&format,&flg);
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line225">225: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line226">226: </a>    <a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,viewer);
-<a name="line227">227: </a>    PetscViewerPopFormat(viewer);
-<a name="line228">228: </a>    PetscViewerDestroy(&viewer);
-<a name="line229">229: </a>  }
-<a name="line230">230: </a>  incall = PETSC_FALSE;
-<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
-<a name="line232">232: </a>}
-
-<a name="line236">236: </a><strong><font color="#4169E1"><a name="NEPErrorView_ASCII"></a>static PetscErrorCode NEPErrorView_ASCII(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line237">237: </a>{
-<a name="line238">238: </a>  PetscBool      errok;
-<a name="line239">239: </a>  PetscReal      error,re,im;
-<a name="line240">240: </a>  PetscScalar    kr,ki;
-<a name="line241">241: </a>  PetscInt       i,j;
-
-<a name="line245">245: </a>  <font color="#4169E1">if</font> (nep->nconv<nep->nev) {
-<a name="line246">246: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D eigenvalues converged\n\n"</font>,nep->nev);
-<a name="line247">247: </a>    <font color="#4169E1">return</font>(0);
-<a name="line248">248: </a>  }
-<a name="line249">249: </a>  errok = PETSC_TRUE;
-<a name="line250">250: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nev;i++) {
-<a name="line251">251: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,etype,&error);
-<a name="line252">252: </a>    errok = (errok && error<5.0*nep->rtol)? PETSC_TRUE: PETSC_FALSE;
-<a name="line253">253: </a>  }
-<a name="line254">254: </a>  <font color="#4169E1">if</font> (!errok) {
-<a name="line255">255: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,nep->nev);
-<a name="line256">256: </a>    <font color="#4169E1">return</font>(0);
+<a name="line60"> 60: </a>  PetscInt       i;
+<a name="line61"> 61: </a>  PetscBool      isascii,istrivial,nods;
+
+<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+
+<a name="line69"> 69: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line71"> 71: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)nep,viewer);
+<a name="line72"> 72: </a>    <font color="#4169E1">if</font> (nep->ops->view) {
+<a name="line73"> 73: </a>      PetscViewerASCIIPushTab(viewer);
+<a name="line74"> 74: </a>      (*nep->ops->view)(nep,viewer);
+<a name="line75"> 75: </a>      PetscViewerASCIIPopTab(viewer);
+<a name="line76"> 76: </a>    }
+<a name="line77"> 77: </a>    <font color="#4169E1">if</font> (nep->fui) {
+<a name="line78"> 78: </a>      <font color="#4169E1">switch</font> (nep->fui) {
+<a name="line79"> 79: </a>      <font color="#4169E1">case</font> NEP_USER_INTERFACE_CALLBACK:
+<a name="line80"> 80: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  nonlinear operator from user callbacks\n"</font>);
+<a name="line81"> 81: </a>        <font color="#4169E1">break</font>;
+<a name="line82"> 82: </a>      <font color="#4169E1">case</font> NEP_USER_INTERFACE_SPLIT:
+<a name="line83"> 83: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  nonlinear operator in split form\n"</font>);
+<a name="line84"> 84: </a>        <font color="#4169E1">break</font>;
+<a name="line85"> 85: </a>      <font color="#4169E1">case</font> NEP_USER_INTERFACE_DERIVATIVES:
+<a name="line86"> 86: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  nonlinear operator from user callbacks for the successive derivatives\n"</font>);
+<a name="line87"> 87: </a>        <font color="#4169E1">break</font>;
+<a name="line88"> 88: </a>      }
+<a name="line89"> 89: </a>    } <font color="#4169E1">else</font> {
+<a name="line90"> 90: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  nonlinear operator not specified yet\n"</font>);
+<a name="line91"> 91: </a>    }
+<a name="line92"> 92: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected portion of the spectrum: "</font>);
+<a name="line93"> 93: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line94"> 94: </a>    <a href="../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,nep->target,PETSC_FALSE);
+<a name="line95"> 95: </a>    <font color="#4169E1">if</font> (!nep->which) {
+<a name="line96"> 96: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"not yet set\n"</font>);
+<a name="line97"> 97: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">switch</font> (nep->which) {
+<a name="line98"> 98: </a>      <font color="#4169E1">case</font> NEP_WHICH_USER:
+<a name="line99"> 99: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"user defined\n"</font>);
+<a name="line100">100: </a>        <font color="#4169E1">break</font>;
+<a name="line101">101: </a>      <font color="#4169E1">case</font> NEP_TARGET_MAGNITUDE:
+<a name="line102">102: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (in magnitude)\n"</font>,str);
+<a name="line103">103: </a>        <font color="#4169E1">break</font>;
+<a name="line104">104: </a>      <font color="#4169E1">case</font> NEP_TARGET_REAL:
+<a name="line105">105: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the real axis)\n"</font>,str);
+<a name="line106">106: </a>        <font color="#4169E1">break</font>;
+<a name="line107">107: </a>      <font color="#4169E1">case</font> NEP_TARGET_IMAGINARY:
+<a name="line108">108: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the imaginary axis)\n"</font>,str);
+<a name="line109">109: </a>        <font color="#4169E1">break</font>;
+<a name="line110">110: </a>      <font color="#4169E1">case</font> NEP_LARGEST_MAGNITUDE:
+<a name="line111">111: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest eigenvalues in magnitude\n"</font>);
+<a name="line112">112: </a>        <font color="#4169E1">break</font>;
+<a name="line113">113: </a>      <font color="#4169E1">case</font> NEP_SMALLEST_MAGNITUDE:
+<a name="line114">114: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest eigenvalues in magnitude\n"</font>);
+<a name="line115">115: </a>        <font color="#4169E1">break</font>;
+<a name="line116">116: </a>      <font color="#4169E1">case</font> NEP_LARGEST_REAL:
+<a name="line117">117: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest real parts\n"</font>);
+<a name="line118">118: </a>        <font color="#4169E1">break</font>;
+<a name="line119">119: </a>      <font color="#4169E1">case</font> NEP_SMALLEST_REAL:
+<a name="line120">120: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest real parts\n"</font>);
+<a name="line121">121: </a>        <font color="#4169E1">break</font>;
+<a name="line122">122: </a>      <font color="#4169E1">case</font> NEP_LARGEST_IMAGINARY:
+<a name="line123">123: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest imaginary parts\n"</font>);
+<a name="line124">124: </a>        <font color="#4169E1">break</font>;
+<a name="line125">125: </a>      <font color="#4169E1">case</font> NEP_SMALLEST_IMAGINARY:
+<a name="line126">126: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest imaginary parts\n"</font>);
+<a name="line127">127: </a>        <font color="#4169E1">break</font>;
+<a name="line128">128: </a>      <font color="#4169E1">case</font> NEP_ALL:
+<a name="line129">129: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"all eigenvalues in the region\n"</font>);
+<a name="line130">130: </a>        <font color="#4169E1">break</font>;
+<a name="line131">131: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)nep),1,<font color="#666666">"Wrong value of nep->which"</font>);
+<a name="line132">132: </a>    }
+<a name="line133">133: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line134">134: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of eigenvalues (nev): %D\n"</font>,nep->nev);
+<a name="line135">135: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of column vectors (ncv): %D\n"</font>,nep->ncv);
+<a name="line136">136: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,nep->mpd);
+<a name="line137">137: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,nep->max_it);
+<a name="line138">138: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerance: %g\n"</font>,(double)nep->tol);
+<a name="line139">139: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  convergence test: "</font>);
+<a name="line140">140: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line141">141: </a>    <font color="#4169E1">switch</font> (nep->conv) {
+<a name="line142">142: </a>    <font color="#4169E1">case</font> NEP_CONV_ABS:
+<a name="line143">143: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"absolute\n"</font>);<font color="#4169E1">break</font>;
+<a name="line144">144: </a>    <font color="#4169E1">case</font> NEP_CONV_REL:
+<a name="line145">145: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue\n"</font>);<font color="#4169E1">break</font>;
+<a name="line146">146: </a>    <font color="#4169E1">case</font> NEP_CONV_NORM:
+<a name="line147">147: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the matrix norms\n"</font>);
+<a name="line148">148: </a>      <font color="#4169E1">if</font> (nep->nrma) {
+<a name="line149">149: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computed matrix norms: %g"</font>,(double)nep->nrma[0]);
+<a name="line150">150: </a>        <font color="#4169E1">for</font> (i=1;i<nep->nt;i++) {
+<a name="line151">151: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">", %g"</font>,(double)nep->nrma[i]);
+<a name="line152">152: </a>        }
+<a name="line153">153: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line154">154: </a>      }
+<a name="line155">155: </a>      <font color="#4169E1">break</font>;
+<a name="line156">156: </a>    <font color="#4169E1">case</font> NEP_CONV_USER:
+<a name="line157">157: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"user-defined\n"</font>);<font color="#4169E1">break</font>;
+<a name="line158">158: </a>    }
+<a name="line159">159: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line160">160: </a>    <font color="#4169E1">if</font> (nep->refine) {
+<a name="line161">161: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  iterative refinement: %s, with %s scheme\n"</font>,NEPRefineTypes[nep->refine],NEPRefineSchemes[nep->scheme]);
+<a name="line162">162: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  refinement stopping criterion: tol=%g, its=%D\n"</font>,(double)nep->rtol,nep->rits);
+<a name="line163">163: </a>      <font color="#4169E1">if</font> (nep->npart>1) {
+<a name="line164">164: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  splitting communicator in %D partitions for refinement\n"</font>,nep->npart);
+<a name="line165">165: </a>      }
+<a name="line166">166: </a>    }
+<a name="line167">167: </a>    <font color="#4169E1">if</font> (nep->nini) {
+<a name="line168">168: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(nep->nini));
+<a name="line169">169: </a>    }
+<a name="line170">170: </a>  } <font color="#4169E1">else</font> {
+<a name="line171">171: </a>    <font color="#4169E1">if</font> (nep->ops->view) {
+<a name="line172">172: </a>      (*nep->ops->view)(nep,viewer);
+<a name="line173">173: </a>    }
+<a name="line174">174: </a>  }
+<a name="line175">175: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
+<a name="line176">176: </a>  <font color="#4169E1">if</font> (!nep->V) { <a href="../../../docs/manualpages/NEP/NEPGetBV.html#NEPGetBV">NEPGetBV</a>(nep,&nep->V); }
+<a name="line177">177: </a>  <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(nep->V,viewer);
+<a name="line178">178: </a>  <font color="#4169E1">if</font> (!nep->rg) { <a href="../../../docs/manualpages/NEP/NEPGetRG.html#NEPGetRG">NEPGetRG</a>(nep,&nep->rg); }
+<a name="line179">179: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(nep->rg,&istrivial);
+<a name="line180">180: </a>  <font color="#4169E1">if</font> (!istrivial) { <a href="../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(nep->rg,viewer); }
+<a name="line181">181: </a>  PetscObjectTypeCompareAny((PetscObject)nep,&nods,NEPRII,NEPSLP,NEPINTERPOL,<font color="#666666">""</font>);
+<a name="line182">182: </a>  <font color="#4169E1">if</font> (!nods) {
+<a name="line183">183: </a>    <font color="#4169E1">if</font> (!nep->ds) { <a href="../../../docs/manualpages/NEP/NEPGetDS.html#NEPGetDS">NEPGetDS</a>(nep,&nep->ds); }
+<a name="line184">184: </a>    <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(nep->ds,viewer);
+<a name="line185">185: </a>  }
+<a name="line186">186: </a>  PetscViewerPopFormat(viewer);
+<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
+<a name="line188">188: </a>}
+
+<a name="line192">192: </a><font color="#B22222">/*@C</font>
+<a name="line193">193: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a> - Displays the reason a <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> solve converged or diverged.</font>
+
+<a name="line195">195: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line197">197: </a><font color="#B22222">   Parameter:</font>
+<a name="line198">198: </a><font color="#B22222">+  nep - the nonlinear eigensolver context</font>
+<a name="line199">199: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
+
+<a name="line201">201: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line202">202: </a><font color="#B22222">.  -nep_converged_reason - print reason for convergence, and number of iterations</font>
+
+<a name="line204">204: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line206">206: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSetConvergenceTest.html#NEPSetConvergenceTest">NEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/NEP/NEPSetTolerances.html#NEPSetTolerances">NEPSetTolerances</a>(), <a href="../../../docs/manualpages/NEP/NEPGetIterationNumber.html#NEPGetIterationNumber">NEPGetIterationNumber</a>()</font>
+<a name="line207">207: </a><font color="#B22222">@*/</font>
+<a name="line208">208: </a><strong><font color="#4169E1"><a name="NEPReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line209">209: </a>{
+<a name="line211">211: </a>  PetscBool      isAscii;
+
+<a name="line214">214: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
+<a name="line215">215: </a>  <font color="#4169E1">if</font> (isAscii) {
+<a name="line216">216: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line217">217: </a>    <font color="#4169E1">if</font> (nep->reason > 0) {
+<a name="line218">218: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Nonlinear eigensolve converged (%D eigenpair%s) due to %s; iterations %D\n"</font>,((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:<font color="#666666">""</font>,nep->nconv,(nep->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,NEPConvergedReasons[nep->reason],nep->its);
+<a name="line219">219: </a>    } <font color="#4169E1">else</font> {
+<a name="line220">220: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Nonlinear eigensolve did not converge due to %s; iterations %D\n"</font>,((PetscObject)nep)->prefix?((PetscObject)nep)->prefix:<font color="#666666">""</font>,NEPConvergedReasons[nep->reason],nep->its);
+<a name="line221">221: </a>    }
+<a name="line222">222: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)nep)->tablevel);
+<a name="line223">223: </a>  }
+<a name="line224">224: </a>  <font color="#4169E1">return</font>(0);
+<a name="line225">225: </a>}
+
+<a name="line229">229: </a><font color="#B22222">/*@</font>
+<a name="line230">230: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line231">231: </a><font color="#B22222">   the <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> converged reason is to be viewed. </font>
+
+<a name="line233">233: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line235">235: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line236">236: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line238">238: </a><font color="#B22222">   Level: developer</font>
+<a name="line239">239: </a><font color="#B22222">@*/</font>
+<a name="line240">240: </a><strong><font color="#4169E1"><a name="NEPReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPReasonViewFromOptions.html#NEPReasonViewFromOptions">NEPReasonViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line241">241: </a>{
+<a name="line242">242: </a>  PetscErrorCode    ierr;
+<a name="line243">243: </a>  PetscViewer       viewer;
+<a name="line244">244: </a>  PetscBool         flg;
+<a name="line245">245: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line246">246: </a>  PetscViewerFormat format;
+
+<a name="line249">249: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line250">250: </a>  incall = PETSC_TRUE;
+<a name="line251">251: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_converged_reason"</font>,&viewer,&format,&flg);
+<a name="line252">252: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line253">253: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line254">254: </a>    <a href="../../../docs/manualpages/NEP/NEPReasonView.html#NEPReasonView">NEPReasonView</a>(nep,viewer);
+<a name="line255">255: </a>    PetscViewerPopFormat(viewer);
+<a name="line256">256: </a>    PetscViewerDestroy(&viewer);
 <a name="line257">257: </a>  }
-<a name="line258">258: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested eigenvalues computed up to the required tolerance:"</font>);
-<a name="line259">259: </a>  <font color="#4169E1">for</font> (i=0;i<=(nep->nev-1)/8;i++) {
-<a name="line260">260: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
-<a name="line261">261: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,nep->nev-8*i);j++) {
-<a name="line262">262: </a>      <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,8*i+j,&kr,&ki,NULL,NULL);
-<a name="line263">263: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line264">264: </a>      re = PetscRealPart(kr);
-<a name="line265">265: </a>      im = PetscImaginaryPart(kr);
-<a name="line266">266: </a><font color="#A020F0">#else</font>
-<a name="line267">267: </a>      re = kr;
-<a name="line268">268: </a>      im = ki;
-<a name="line269">269: </a><font color="#A020F0">#endif</font>
-<a name="line270">270: </a>      <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
-<a name="line271">271: </a>      <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
-<a name="line272">272: </a>      <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line273">273: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f%+.5fi"</font>,(double)re,(double)im);
-<a name="line274">274: </a>      } <font color="#4169E1">else</font> {
-<a name="line275">275: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)re);
-<a name="line276">276: </a>      }
-<a name="line277">277: </a>      <font color="#4169E1">if</font> (8*i+j+1<nep->nev) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
-<a name="line278">278: </a>    }
-<a name="line279">279: </a>  }
-<a name="line280">280: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
-<a name="line281">281: </a>  <font color="#4169E1">return</font>(0);
-<a name="line282">282: </a>}
-
-<a name="line286">286: </a><strong><font color="#4169E1"><a name="NEPErrorView_DETAIL"></a>static PetscErrorCode NEPErrorView_DETAIL(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line287">287: </a>{
-<a name="line289">289: </a>  PetscReal      error,re,im;
-<a name="line290">290: </a>  PetscScalar    kr,ki;
-<a name="line291">291: </a>  PetscInt       i;
-<a name="line292">292: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
-<a name="line293">293: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
-
-<a name="line296">296: </a>  <font color="#4169E1">if</font> (!nep->nconv) <font color="#4169E1">return</font>(0);
-<a name="line297">297: </a>  <font color="#4169E1">switch</font> (etype) {
-<a name="line298">298: </a>    <font color="#4169E1">case</font> NEP_ERROR_ABSOLUTE:
-<a name="line299">299: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    ||T(k)x||"</font>);
-<a name="line300">300: </a>      <font color="#4169E1">break</font>;
-<a name="line301">301: </a>    <font color="#4169E1">case</font> NEP_ERROR_RELATIVE:
-<a name="line302">302: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">" ||T(k)x||/||kx||"</font>);
-<a name="line303">303: </a>      <font color="#4169E1">break</font>;
-<a name="line304">304: </a>  }
-<a name="line305">305: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s            k             %s\n%s"</font>,sep,ex,sep);
-<a name="line306">306: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line307">307: </a>    <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,i,&kr,&ki,NULL,NULL);
-<a name="line308">308: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,etype,&error);
-<a name="line309">309: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line310">310: </a>    re = PetscRealPart(kr);
-<a name="line311">311: </a>    im = PetscImaginaryPart(kr);
-<a name="line312">312: </a><font color="#A020F0">#else</font>
-<a name="line313">313: </a>    re = kr;
-<a name="line314">314: </a>    im = ki;
-<a name="line315">315: </a><font color="#A020F0">#endif</font>
-<a name="line316">316: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line317">317: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  % 9f%+9fi      %12g\n"</font>,(double)re,(double)im,(double)error);
-<a name="line318">318: </a>    } <font color="#4169E1">else</font> {
-<a name="line319">319: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"    % 12f           %12g\n"</font>,(double)re,(double)error);
-<a name="line320">320: </a>    }
-<a name="line321">321: </a>  }
-<a name="line322">322: </a>  PetscViewerASCIIPrintf(viewer,sep);
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a>}
-
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="NEPErrorView_MATLAB"></a>static PetscErrorCode NEPErrorView_MATLAB(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line329">329: </a>{
-<a name="line331">331: </a>  PetscReal      error;
-<a name="line332">332: </a>  PetscInt       i;
-<a name="line333">333: </a>  const char     *name;
-
-<a name="line336">336: </a>  PetscObjectGetName((PetscObject)nep,&name);
-<a name="line337">337: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
-<a name="line338">338: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line339">339: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,etype,&error);
-<a name="line340">340: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
-<a name="line341">341: </a>  }
-<a name="line342">342: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line343">343: </a>  <font color="#4169E1">return</font>(0);
-<a name="line344">344: </a>}
-
-<a name="line348">348: </a><font color="#B22222">/*@C</font>
-<a name="line349">349: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a> - Displays the errors associated with the computed solution</font>
-<a name="line350">350: </a><font color="#B22222">   (as well as the eigenvalues).</font>
-
-<a name="line352">352: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line354">354: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line355">355: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
-<a name="line356">356: </a><font color="#B22222">.  etype  - error type</font>
-<a name="line357">357: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line359">359: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line360">360: </a><font color="#B22222">+  -nep_error_absolute - print absolute errors of each eigenpair</font>
-<a name="line361">361: </a><font color="#B22222">-  -nep_error_relative - print relative errors of each eigenpair</font>
-
-<a name="line363">363: </a><font color="#B22222">   Notes:</font>
-<a name="line364">364: </a><font color="#B22222">   By default, this function checks the error of all eigenpairs and prints</font>
-<a name="line365">365: </a><font color="#B22222">   the eigenvalues if all of them are below the requested tolerance.</font>
-<a name="line366">366: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
-<a name="line367">367: </a><font color="#B22222">   eigenvalues and corresponding errors is printed.</font>
-
-<a name="line369">369: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line371">371: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(), <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>()</font>
-<a name="line372">372: </a><font color="#B22222">@*/</font>
-<a name="line373">373: </a><strong><font color="#4169E1"><a name="NEPErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line374">374: </a>{
-<a name="line375">375: </a>  PetscBool         isascii;
-<a name="line376">376: </a>  PetscViewerFormat format;
-<a name="line377">377: </a>  PetscErrorCode    ierr;
-
-<a name="line381">381: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-<a name="line384">384: </a>  NEPCheckSolved(nep,1);
-<a name="line385">385: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line386">386: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
-
-<a name="line388">388: </a>  PetscViewerGetFormat(viewer,&format);
-<a name="line389">389: </a>  <font color="#4169E1">switch</font> (format) {
-<a name="line390">390: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line391">391: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line392">392: </a>      NEPErrorView_ASCII(nep,etype,viewer);
-<a name="line393">393: </a>      <font color="#4169E1">break</font>;
-<a name="line394">394: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line395">395: </a>      NEPErrorView_DETAIL(nep,etype,viewer);
-<a name="line396">396: </a>      <font color="#4169E1">break</font>;
-<a name="line397">397: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line398">398: </a>      NEPErrorView_MATLAB(nep,etype,viewer);
-<a name="line399">399: </a>      <font color="#4169E1">break</font>;
-<a name="line400">400: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line401">401: </a>      PetscInfo1(nep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line402">402: </a>  }
-<a name="line403">403: </a>  <font color="#4169E1">return</font>(0);
-<a name="line404">404: </a>}
-
-<a name="line408">408: </a><font color="#B22222">/*@</font>
-<a name="line409">409: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line410">410: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
-
-<a name="line412">412: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line414">414: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line415">415: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line417">417: </a><font color="#B22222">   Level: developer</font>
-<a name="line418">418: </a><font color="#B22222">@*/</font>
-<a name="line419">419: </a><strong><font color="#4169E1"><a name="NEPErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line420">420: </a>{
-<a name="line421">421: </a>  PetscErrorCode    ierr;
-<a name="line422">422: </a>  PetscViewer       viewer;
-<a name="line423">423: </a>  PetscBool         flg;
-<a name="line424">424: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line425">425: </a>  PetscViewerFormat format;
-
-<a name="line428">428: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line429">429: </a>  incall = PETSC_TRUE;
-<a name="line430">430: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_error_absolute"</font>,&viewer,&format,&flg);
-<a name="line431">431: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line432">432: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line433">433: </a>    <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_ABSOLUTE,viewer);
-<a name="line434">434: </a>    PetscViewerPopFormat(viewer);
-<a name="line435">435: </a>    PetscViewerDestroy(&viewer);
-<a name="line436">436: </a>  }
-<a name="line437">437: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_error_relative"</font>,&viewer,&format,&flg);
-<a name="line438">438: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line439">439: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line440">440: </a>    <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,viewer);
-<a name="line441">441: </a>    PetscViewerPopFormat(viewer);
-<a name="line442">442: </a>    PetscViewerDestroy(&viewer);
-<a name="line443">443: </a>  }
-<a name="line444">444: </a>  incall = PETSC_FALSE;
-<a name="line445">445: </a>  <font color="#4169E1">return</font>(0);
-<a name="line446">446: </a>}
-
-<a name="line450">450: </a><strong><font color="#4169E1"><a name="NEPValuesView_DRAW"></a>static PetscErrorCode NEPValuesView_DRAW(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line451">451: </a>{
-<a name="line453">453: </a>  PetscDraw      draw;
-<a name="line454">454: </a>  PetscDrawSP    drawsp;
-<a name="line455">455: </a>  PetscReal      re,im;
-<a name="line456">456: </a>  PetscInt       i,k;
-
-<a name="line459">459: </a>  <font color="#4169E1">if</font> (!nep->nconv) <font color="#4169E1">return</font>(0);
-<a name="line460">460: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed Eigenvalues"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
-<a name="line461">461: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line462">462: </a>  PetscDrawSPCreate(draw,1,&drawsp);
-<a name="line463">463: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line464">464: </a>    k = nep->perm[i];
-<a name="line465">465: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line466">466: </a>    re = PetscRealPart(nep->eigr[k]);
-<a name="line467">467: </a>    im = PetscImaginaryPart(nep->eigr[k]);
-<a name="line468">468: </a><font color="#A020F0">#else</font>
-<a name="line469">469: </a>    re = nep->eigr[k];
-<a name="line470">470: </a>    im = nep->eigi[k];
-<a name="line471">471: </a><font color="#A020F0">#endif</font>
-<a name="line472">472: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
+<a name="line258">258: </a>  incall = PETSC_FALSE;
+<a name="line259">259: </a>  <font color="#4169E1">return</font>(0);
+<a name="line260">260: </a>}
+
+<a name="line264">264: </a><strong><font color="#4169E1"><a name="NEPErrorView_ASCII"></a>static PetscErrorCode NEPErrorView_ASCII(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line265">265: </a>{
+<a name="line266">266: </a>  PetscBool      errok;
+<a name="line267">267: </a>  PetscReal      error,re,im;
+<a name="line268">268: </a>  PetscScalar    kr,ki;
+<a name="line269">269: </a>  PetscInt       i,j,nvals;
+
+<a name="line273">273: </a>  <font color="#4169E1">if</font> (nep->which!=NEP_ALL && nep->nconv<nep->nev) {
+<a name="line274">274: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D eigenvalues converged\n\n"</font>,nep->nev);
+<a name="line275">275: </a>    <font color="#4169E1">return</font>(0);
+<a name="line276">276: </a>  }
+<a name="line277">277: </a>  errok = PETSC_TRUE;
+<a name="line278">278: </a>  nvals = (nep->which==NEP_ALL)? nep->nconv: nep->nev;
+<a name="line279">279: </a>  <font color="#4169E1">for</font> (i=0;i<nvals;i++) {
+<a name="line280">280: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,etype,&error);
+<a name="line281">281: </a>    errok = (errok && error<5.0*nep->tol)? PETSC_TRUE: PETSC_FALSE;
+<a name="line282">282: </a>  }
+<a name="line283">283: </a>  <font color="#4169E1">if</font> (!errok) {
+<a name="line284">284: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,nvals);
+<a name="line285">285: </a>    <font color="#4169E1">return</font>(0);
+<a name="line286">286: </a>  }
+<a name="line287">287: </a>  <font color="#4169E1">if</font> (nep->which==NEP_ALL) {
+<a name="line288">288: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Found %D eigenvalues, all of them computed up to the required tolerance:"</font>,nvals);
+<a name="line289">289: </a>  } <font color="#4169E1">else</font> {
+<a name="line290">290: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested eigenvalues computed up to the required tolerance:"</font>);
+<a name="line291">291: </a>  }
+<a name="line292">292: </a>  <font color="#4169E1">for</font> (i=0;i<=(nvals-1)/8;i++) {
+<a name="line293">293: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
+<a name="line294">294: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,nvals-8*i);j++) {
+<a name="line295">295: </a>      <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,8*i+j,&kr,&ki,NULL,NULL);
+<a name="line296">296: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line297">297: </a>      re = PetscRealPart(kr);
+<a name="line298">298: </a>      im = PetscImaginaryPart(kr);
+<a name="line299">299: </a><font color="#A020F0">#else</font>
+<a name="line300">300: </a>      re = kr;
+<a name="line301">301: </a>      im = ki;
+<a name="line302">302: </a><font color="#A020F0">#endif</font>
+<a name="line303">303: </a>      <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
+<a name="line304">304: </a>      <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
+<a name="line305">305: </a>      <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line306">306: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f%+.5fi"</font>,(double)re,(double)im);
+<a name="line307">307: </a>      } <font color="#4169E1">else</font> {
+<a name="line308">308: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)re);
+<a name="line309">309: </a>      }
+<a name="line310">310: </a>      <font color="#4169E1">if</font> (8*i+j+1<nvals) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
+<a name="line311">311: </a>    }
+<a name="line312">312: </a>  }
+<a name="line313">313: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
+
+<a name="line319">319: </a><strong><font color="#4169E1"><a name="NEPErrorView_DETAIL"></a>static PetscErrorCode NEPErrorView_DETAIL(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line320">320: </a>{
+<a name="line322">322: </a>  PetscReal      error,re,im;
+<a name="line323">323: </a>  PetscScalar    kr,ki;
+<a name="line324">324: </a>  PetscInt       i;
+<a name="line325">325: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
+<a name="line326">326: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
+
+<a name="line329">329: </a>  <font color="#4169E1">if</font> (!nep->nconv) <font color="#4169E1">return</font>(0);
+<a name="line330">330: </a>  <font color="#4169E1">switch</font> (etype) {
+<a name="line331">331: </a>    <font color="#4169E1">case</font> NEP_ERROR_ABSOLUTE:
+<a name="line332">332: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    ||T(k)x||"</font>);
+<a name="line333">333: </a>      <font color="#4169E1">break</font>;
+<a name="line334">334: </a>    <font color="#4169E1">case</font> NEP_ERROR_RELATIVE:
+<a name="line335">335: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">" ||T(k)x||/||kx||"</font>);
+<a name="line336">336: </a>      <font color="#4169E1">break</font>;
+<a name="line337">337: </a>    <font color="#4169E1">case</font> NEP_ERROR_BACKWARD:
+<a name="line338">338: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    eta(x,k)"</font>);
+<a name="line339">339: </a>      <font color="#4169E1">break</font>;
+<a name="line340">340: </a>  }
+<a name="line341">341: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s            k             %s\n%s"</font>,sep,ex,sep);
+<a name="line342">342: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line343">343: </a>    <a href="../../../docs/manualpages/NEP/NEPGetEigenpair.html#NEPGetEigenpair">NEPGetEigenpair</a>(nep,i,&kr,&ki,NULL,NULL);
+<a name="line344">344: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,etype,&error);
+<a name="line345">345: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line346">346: </a>    re = PetscRealPart(kr);
+<a name="line347">347: </a>    im = PetscImaginaryPart(kr);
+<a name="line348">348: </a><font color="#A020F0">#else</font>
+<a name="line349">349: </a>    re = kr;
+<a name="line350">350: </a>    im = ki;
+<a name="line351">351: </a><font color="#A020F0">#endif</font>
+<a name="line352">352: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line353">353: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  % 9f%+9fi      %12g\n"</font>,(double)re,(double)im,(double)error);
+<a name="line354">354: </a>    } <font color="#4169E1">else</font> {
+<a name="line355">355: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"    % 12f           %12g\n"</font>,(double)re,(double)error);
+<a name="line356">356: </a>    }
+<a name="line357">357: </a>  }
+<a name="line358">358: </a>  PetscViewerASCIIPrintf(viewer,sep);
+<a name="line359">359: </a>  <font color="#4169E1">return</font>(0);
+<a name="line360">360: </a>}
+
+<a name="line364">364: </a><strong><font color="#4169E1"><a name="NEPErrorView_MATLAB"></a>static PetscErrorCode NEPErrorView_MATLAB(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line365">365: </a>{
+<a name="line367">367: </a>  PetscReal      error;
+<a name="line368">368: </a>  PetscInt       i;
+<a name="line369">369: </a>  const char     *name;
+
+<a name="line372">372: </a>  PetscObjectGetName((PetscObject)nep,&name);
+<a name="line373">373: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
+<a name="line374">374: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line375">375: </a>    <a href="../../../docs/manualpages/NEP/NEPComputeError.html#NEPComputeError">NEPComputeError</a>(nep,i,etype,&error);
+<a name="line376">376: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
+<a name="line377">377: </a>  }
+<a name="line378">378: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line379">379: </a>  <font color="#4169E1">return</font>(0);
+<a name="line380">380: </a>}
+
+<a name="line384">384: </a><font color="#B22222">/*@C</font>
+<a name="line385">385: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a> - Displays the errors associated with the computed solution</font>
+<a name="line386">386: </a><font color="#B22222">   (as well as the eigenvalues).</font>
+
+<a name="line388">388: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line390">390: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line391">391: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line392">392: </a><font color="#B22222">.  etype  - error type</font>
+<a name="line393">393: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line395">395: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line396">396: </a><font color="#B22222">+  -nep_error_absolute - print absolute errors of each eigenpair</font>
+<a name="line397">397: </a><font color="#B22222">.  -nep_error_relative - print relative errors of each eigenpair</font>
+<a name="line398">398: </a><font color="#B22222">-  -nep_error_backward - print backward errors of each eigenpair</font>
+
+<a name="line400">400: </a><font color="#B22222">   Notes:</font>
+<a name="line401">401: </a><font color="#B22222">   By default, this function checks the error of all eigenpairs and prints</font>
+<a name="line402">402: </a><font color="#B22222">   the eigenvalues if all of them are below the requested tolerance.</font>
+<a name="line403">403: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
+<a name="line404">404: </a><font color="#B22222">   eigenvalues and corresponding errors is printed.</font>
+
+<a name="line406">406: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line408">408: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(), <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>()</font>
+<a name="line409">409: </a><font color="#B22222">@*/</font>
+<a name="line410">410: </a><strong><font color="#4169E1"><a name="NEPErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,<a href="../../../docs/manualpages/NEP/NEPErrorType.html#NEPErrorType">NEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line411">411: </a>{
+<a name="line412">412: </a>  PetscBool         isascii;
+<a name="line413">413: </a>  PetscViewerFormat format;
+<a name="line414">414: </a>  PetscErrorCode    ierr;
+
+<a name="line418">418: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+<a name="line421">421: </a>  NEPCheckSolved(nep,1);
+<a name="line422">422: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line423">423: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
+
+<a name="line425">425: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line426">426: </a>  <font color="#4169E1">switch</font> (format) {
+<a name="line427">427: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line428">428: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line429">429: </a>      NEPErrorView_ASCII(nep,etype,viewer);
+<a name="line430">430: </a>      <font color="#4169E1">break</font>;
+<a name="line431">431: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line432">432: </a>      NEPErrorView_DETAIL(nep,etype,viewer);
+<a name="line433">433: </a>      <font color="#4169E1">break</font>;
+<a name="line434">434: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line435">435: </a>      NEPErrorView_MATLAB(nep,etype,viewer);
+<a name="line436">436: </a>      <font color="#4169E1">break</font>;
+<a name="line437">437: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line438">438: </a>      PetscInfo1(nep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line439">439: </a>  }
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
+
+<a name="line445">445: </a><font color="#B22222">/*@</font>
+<a name="line446">446: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line447">447: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
+
+<a name="line449">449: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line451">451: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line452">452: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line454">454: </a><font color="#B22222">   Level: developer</font>
+<a name="line455">455: </a><font color="#B22222">@*/</font>
+<a name="line456">456: </a><strong><font color="#4169E1"><a name="NEPErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPErrorViewFromOptions.html#NEPErrorViewFromOptions">NEPErrorViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line457">457: </a>{
+<a name="line458">458: </a>  PetscErrorCode    ierr;
+<a name="line459">459: </a>  PetscViewer       viewer;
+<a name="line460">460: </a>  PetscBool         flg;
+<a name="line461">461: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line462">462: </a>  PetscViewerFormat format;
+
+<a name="line465">465: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line466">466: </a>  incall = PETSC_TRUE;
+<a name="line467">467: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_error_absolute"</font>,&viewer,&format,&flg);
+<a name="line468">468: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line469">469: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line470">470: </a>    <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_ABSOLUTE,viewer);
+<a name="line471">471: </a>    PetscViewerPopFormat(viewer);
+<a name="line472">472: </a>    PetscViewerDestroy(&viewer);
 <a name="line473">473: </a>  }
-<a name="line474">474: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
-<a name="line475">475: </a>  PetscDrawSPDestroy(&drawsp);
-<a name="line476">476: </a>  PetscViewerDestroy(&viewer);
-<a name="line477">477: </a>  <font color="#4169E1">return</font>(0);
-<a name="line478">478: </a>}
-
-<a name="line482">482: </a><strong><font color="#4169E1"><a name="NEPValuesView_ASCII"></a>static PetscErrorCode NEPValuesView_ASCII(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line483">483: </a>{
-<a name="line484">484: </a>  PetscReal      re,im;
-<a name="line485">485: </a>  PetscInt       i,k;
-
-<a name="line489">489: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigenvalues = \n"</font>);
-<a name="line490">490: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line491">491: </a>    k = nep->perm[i];
-<a name="line492">492: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line493">493: </a>    re = PetscRealPart(nep->eigr[k]);
-<a name="line494">494: </a>    im = PetscImaginaryPart(nep->eigr[k]);
-<a name="line495">495: </a><font color="#A020F0">#else</font>
-<a name="line496">496: </a>    re = nep->eigr[k];
-<a name="line497">497: </a>    im = nep->eigi[k];
-<a name="line498">498: </a><font color="#A020F0">#endif</font>
-<a name="line499">499: </a>    <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
-<a name="line500">500: </a>    <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
-<a name="line501">501: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line502">502: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f%+.5fi\n"</font>,(double)re,(double)im);
-<a name="line503">503: </a>    } <font color="#4169E1">else</font> {
-<a name="line504">504: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)re);
-<a name="line505">505: </a>    }
-<a name="line506">506: </a>  }
-<a name="line507">507: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line508">508: </a>  <font color="#4169E1">return</font>(0);
-<a name="line509">509: </a>}
-
-<a name="line513">513: </a><strong><font color="#4169E1"><a name="NEPValuesView_MATLAB"></a>static PetscErrorCode NEPValuesView_MATLAB(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line514">514: </a>{
-<a name="line516">516: </a>  PetscInt       i,k;
-<a name="line517">517: </a>  PetscReal      re,im;
-<a name="line518">518: </a>  const char     *name;
-
-<a name="line521">521: </a>  PetscObjectGetName((PetscObject)nep,&name);
-<a name="line522">522: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Lambda_%s = [\n"</font>,name);
-<a name="line523">523: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line524">524: </a>    k = nep->perm[i];
-<a name="line525">525: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line526">526: </a>    re = PetscRealPart(nep->eigr[k]);
-<a name="line527">527: </a>    im = PetscImaginaryPart(nep->eigr[k]);
-<a name="line528">528: </a><font color="#A020F0">#else</font>
-<a name="line529">529: </a>    re = nep->eigr[k];
-<a name="line530">530: </a>    im = nep->eigi[k];
-<a name="line531">531: </a><font color="#A020F0">#endif</font>
-<a name="line532">532: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line533">533: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei\n"</font>,(double)re,(double)im);
-<a name="line534">534: </a>    } <font color="#4169E1">else</font> {
-<a name="line535">535: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)re);
-<a name="line536">536: </a>    }
-<a name="line537">537: </a>  }
-<a name="line538">538: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line539">539: </a>  <font color="#4169E1">return</font>(0);
-<a name="line540">540: </a>}
-
-<a name="line544">544: </a><font color="#B22222">/*@C</font>
-<a name="line545">545: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a> - Displays the computed eigenvalues in a viewer.</font>
-
-<a name="line547">547: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line549">549: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line550">550: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
-<a name="line551">551: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line553">553: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line554">554: </a><font color="#B22222">.  -nep_view_values - print computed eigenvalues</font>
-
-<a name="line556">556: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line558">558: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(), <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>()</font>
-<a name="line559">559: </a><font color="#B22222">@*/</font>
-<a name="line560">560: </a><strong><font color="#4169E1"><a name="NEPValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
-<a name="line561">561: </a>{
-<a name="line562">562: </a>  PetscBool         isascii,isdraw;
-<a name="line563">563: </a>  PetscViewerFormat format;
-<a name="line564">564: </a>  PetscErrorCode    ierr;
-
-<a name="line568">568: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-<a name="line571">571: </a>  NEPCheckSolved(nep,1);
-<a name="line572">572: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
-<a name="line573">573: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line574">574: </a>  <font color="#4169E1">if</font> (isdraw) {
-<a name="line575">575: </a>    NEPValuesView_DRAW(nep,viewer);
-<a name="line576">576: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
-<a name="line577">577: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line578">578: </a>    <font color="#4169E1">switch</font> (format) {
-<a name="line579">579: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line580">580: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line581">581: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line582">582: </a>        NEPValuesView_ASCII(nep,viewer);
-<a name="line583">583: </a>        <font color="#4169E1">break</font>;
-<a name="line584">584: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line585">585: </a>        NEPValuesView_MATLAB(nep,viewer);
-<a name="line586">586: </a>        <font color="#4169E1">break</font>;
-<a name="line587">587: </a><strong><font color="#FF0000">      default:</font></strong>
-<a name="line588">588: </a>        PetscInfo1(nep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line589">589: </a>    }
-<a name="line590">590: </a>  }
-<a name="line591">591: </a>  <font color="#4169E1">return</font>(0);
-<a name="line592">592: </a>}
-
-<a name="line596">596: </a><font color="#B22222">/*@</font>
-<a name="line597">597: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line598">598: </a><font color="#B22222">   the computed eigenvalues are to be viewed. </font>
-
-<a name="line600">600: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line602">602: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line603">603: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line605">605: </a><font color="#B22222">   Level: developer</font>
-<a name="line606">606: </a><font color="#B22222">@*/</font>
-<a name="line607">607: </a><strong><font color="#4169E1"><a name="NEPValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line608">608: </a>{
+<a name="line474">474: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_error_relative"</font>,&viewer,&format,&flg);
+<a name="line475">475: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line476">476: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line477">477: </a>    <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_RELATIVE,viewer);
+<a name="line478">478: </a>    PetscViewerPopFormat(viewer);
+<a name="line479">479: </a>    PetscViewerDestroy(&viewer);
+<a name="line480">480: </a>  }
+<a name="line481">481: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_error_backward"</font>,&viewer,&format,&flg);
+<a name="line482">482: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line483">483: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line484">484: </a>    <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>(nep,NEP_ERROR_BACKWARD,viewer);
+<a name="line485">485: </a>    PetscViewerPopFormat(viewer);
+<a name="line486">486: </a>    PetscViewerDestroy(&viewer);
+<a name="line487">487: </a>  }
+<a name="line488">488: </a>  incall = PETSC_FALSE;
+<a name="line489">489: </a>  <font color="#4169E1">return</font>(0);
+<a name="line490">490: </a>}
+
+<a name="line494">494: </a><strong><font color="#4169E1"><a name="NEPValuesView_DRAW"></a>static PetscErrorCode NEPValuesView_DRAW(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line495">495: </a>{
+<a name="line497">497: </a>  PetscDraw      draw;
+<a name="line498">498: </a>  PetscDrawSP    drawsp;
+<a name="line499">499: </a>  PetscReal      re,im;
+<a name="line500">500: </a>  PetscInt       i,k;
+
+<a name="line503">503: </a>  <font color="#4169E1">if</font> (!nep->nconv) <font color="#4169E1">return</font>(0);
+<a name="line504">504: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed Eigenvalues"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
+<a name="line505">505: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
+<a name="line506">506: </a>  PetscDrawSPCreate(draw,1,&drawsp);
+<a name="line507">507: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line508">508: </a>    k = nep->perm[i];
+<a name="line509">509: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line510">510: </a>    re = PetscRealPart(nep->eigr[k]);
+<a name="line511">511: </a>    im = PetscImaginaryPart(nep->eigr[k]);
+<a name="line512">512: </a><font color="#A020F0">#else</font>
+<a name="line513">513: </a>    re = nep->eigr[k];
+<a name="line514">514: </a>    im = nep->eigi[k];
+<a name="line515">515: </a><font color="#A020F0">#endif</font>
+<a name="line516">516: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
+<a name="line517">517: </a>  }
+<a name="line518">518: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
+<a name="line519">519: </a>  PetscDrawSPSave(drawsp);
+<a name="line520">520: </a>  PetscDrawSPDestroy(&drawsp);
+<a name="line521">521: </a>  PetscViewerDestroy(&viewer);
+<a name="line522">522: </a>  <font color="#4169E1">return</font>(0);
+<a name="line523">523: </a>}
+
+<a name="line527">527: </a><strong><font color="#4169E1"><a name="NEPValuesView_ASCII"></a>static PetscErrorCode NEPValuesView_ASCII(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line528">528: </a>{
+<a name="line529">529: </a>  PetscReal      re,im;
+<a name="line530">530: </a>  PetscInt       i,k;
+
+<a name="line534">534: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigenvalues = \n"</font>);
+<a name="line535">535: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line536">536: </a>    k = nep->perm[i];
+<a name="line537">537: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line538">538: </a>    re = PetscRealPart(nep->eigr[k]);
+<a name="line539">539: </a>    im = PetscImaginaryPart(nep->eigr[k]);
+<a name="line540">540: </a><font color="#A020F0">#else</font>
+<a name="line541">541: </a>    re = nep->eigr[k];
+<a name="line542">542: </a>    im = nep->eigi[k];
+<a name="line543">543: </a><font color="#A020F0">#endif</font>
+<a name="line544">544: </a>    <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
+<a name="line545">545: </a>    <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
+<a name="line546">546: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line547">547: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f%+.5fi\n"</font>,(double)re,(double)im);
+<a name="line548">548: </a>    } <font color="#4169E1">else</font> {
+<a name="line549">549: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)re);
+<a name="line550">550: </a>    }
+<a name="line551">551: </a>  }
+<a name="line552">552: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line553">553: </a>  <font color="#4169E1">return</font>(0);
+<a name="line554">554: </a>}
+
+<a name="line558">558: </a><strong><font color="#4169E1"><a name="NEPValuesView_MATLAB"></a>static PetscErrorCode NEPValuesView_MATLAB(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line559">559: </a>{
+<a name="line561">561: </a>  PetscInt       i,k;
+<a name="line562">562: </a>  PetscReal      re,im;
+<a name="line563">563: </a>  const char     *name;
+
+<a name="line566">566: </a>  PetscObjectGetName((PetscObject)nep,&name);
+<a name="line567">567: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Lambda_%s = [\n"</font>,name);
+<a name="line568">568: </a>  <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line569">569: </a>    k = nep->perm[i];
+<a name="line570">570: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line571">571: </a>    re = PetscRealPart(nep->eigr[k]);
+<a name="line572">572: </a>    im = PetscImaginaryPart(nep->eigr[k]);
+<a name="line573">573: </a><font color="#A020F0">#else</font>
+<a name="line574">574: </a>    re = nep->eigr[k];
+<a name="line575">575: </a>    im = nep->eigi[k];
+<a name="line576">576: </a><font color="#A020F0">#endif</font>
+<a name="line577">577: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line578">578: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei\n"</font>,(double)re,(double)im);
+<a name="line579">579: </a>    } <font color="#4169E1">else</font> {
+<a name="line580">580: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)re);
+<a name="line581">581: </a>    }
+<a name="line582">582: </a>  }
+<a name="line583">583: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line584">584: </a>  <font color="#4169E1">return</font>(0);
+<a name="line585">585: </a>}
+
+<a name="line589">589: </a><font color="#B22222">/*@C</font>
+<a name="line590">590: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a> - Displays the computed eigenvalues in a viewer.</font>
+
+<a name="line592">592: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line594">594: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line595">595: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line596">596: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line598">598: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line599">599: </a><font color="#B22222">.  -nep_view_values - print computed eigenvalues</font>
+
+<a name="line601">601: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line603">603: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(), <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>()</font>
+<a name="line604">604: </a><font color="#B22222">@*/</font>
+<a name="line605">605: </a><strong><font color="#4169E1"><a name="NEPValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line606">606: </a>{
+<a name="line607">607: </a>  PetscBool         isascii,isdraw;
+<a name="line608">608: </a>  PetscViewerFormat format;
 <a name="line609">609: </a>  PetscErrorCode    ierr;
-<a name="line610">610: </a>  PetscViewer       viewer;
-<a name="line611">611: </a>  PetscBool         flg;
-<a name="line612">612: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line613">613: </a>  PetscViewerFormat format;
-
-<a name="line616">616: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line617">617: </a>  incall = PETSC_TRUE;
-<a name="line618">618: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_view_values"</font>,&viewer,&format,&flg);
-<a name="line619">619: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line620">620: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line621">621: </a>    <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(nep,viewer);
-<a name="line622">622: </a>    PetscViewerPopFormat(viewer);
-<a name="line623">623: </a>    PetscViewerDestroy(&viewer);
-<a name="line624">624: </a>  }
-<a name="line625">625: </a>  incall = PETSC_FALSE;
-<a name="line626">626: </a>  <font color="#4169E1">return</font>(0);
-<a name="line627">627: </a>}
-
-<a name="line631">631: </a><font color="#B22222">/*@C</font>
-<a name="line632">632: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a> - Outputs computed eigenvectors to a viewer.</font>
-
-<a name="line634">634: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line636">636: </a><font color="#B22222">   Parameter:</font>
-<a name="line637">637: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
-<a name="line638">638: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line640">640: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line641">641: </a><font color="#B22222">.  -nep_view_vectors - output eigenvectors.</font>
-
-<a name="line643">643: </a><font color="#B22222">   Note:</font>
-<a name="line644">644: </a><font color="#B22222">   If PETSc was configured with real scalars, complex conjugate eigenvectors</font>
-<a name="line645">645: </a><font color="#B22222">   will be viewed as two separate real vectors, one containing the real part</font>
-<a name="line646">646: </a><font color="#B22222">   and another one containing the imaginary part.</font>
-
-<a name="line648">648: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line650">650: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(), <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>()</font>
+
+<a name="line613">613: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+<a name="line616">616: </a>  NEPCheckSolved(nep,1);
+<a name="line617">617: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
+<a name="line618">618: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line619">619: </a>  <font color="#4169E1">if</font> (isdraw) {
+<a name="line620">620: </a>    NEPValuesView_DRAW(nep,viewer);
+<a name="line621">621: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
+<a name="line622">622: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line623">623: </a>    <font color="#4169E1">switch</font> (format) {
+<a name="line624">624: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line625">625: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line626">626: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line627">627: </a>        NEPValuesView_ASCII(nep,viewer);
+<a name="line628">628: </a>        <font color="#4169E1">break</font>;
+<a name="line629">629: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line630">630: </a>        NEPValuesView_MATLAB(nep,viewer);
+<a name="line631">631: </a>        <font color="#4169E1">break</font>;
+<a name="line632">632: </a><strong><font color="#FF0000">      default:</font></strong>
+<a name="line633">633: </a>        PetscInfo1(nep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line634">634: </a>    }
+<a name="line635">635: </a>  }
+<a name="line636">636: </a>  <font color="#4169E1">return</font>(0);
+<a name="line637">637: </a>}
+
+<a name="line641">641: </a><font color="#B22222">/*@</font>
+<a name="line642">642: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line643">643: </a><font color="#B22222">   the computed eigenvalues are to be viewed. </font>
+
+<a name="line645">645: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line647">647: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line648">648: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line650">650: </a><font color="#B22222">   Level: developer</font>
 <a name="line651">651: </a><font color="#B22222">@*/</font>
-<a name="line652">652: </a><strong><font color="#4169E1"><a name="NEPVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line652">652: </a><strong><font color="#4169E1"><a name="NEPValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPValuesViewFromOptions.html#NEPValuesViewFromOptions">NEPValuesViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
 <a name="line653">653: </a>{
-<a name="line655">655: </a>  PetscInt       i,k;
-<a name="line656">656: </a>  Vec            x;
-<a name="line657">657: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
-<a name="line658">658: </a>  char           vname[NMLEN];
-<a name="line659">659: </a>  const char     *ename;
-
-<a name="line663">663: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
-<a name="line666">666: </a>  NEPCheckSolved(nep,1);
-<a name="line667">667: </a>  <font color="#4169E1">if</font> (nep->nconv) {
-<a name="line668">668: </a>    PetscObjectGetName((PetscObject)nep,&ename);
-<a name="line669">669: </a>    NEPComputeVectors(nep);
-<a name="line670">670: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
-<a name="line671">671: </a>      k = nep->perm[i];
-<a name="line672">672: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,i,ename);
-<a name="line673">673: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,k,&x);
-<a name="line674">674: </a>      PetscObjectSetName((PetscObject)x,vname);
-<a name="line675">675: </a>      VecView(x,viewer);
-<a name="line676">676: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,k,&x);
-<a name="line677">677: </a>    }
-<a name="line678">678: </a>  }
-<a name="line679">679: </a>  <font color="#4169E1">return</font>(0);
-<a name="line680">680: </a>}
-
-<a name="line684">684: </a><font color="#B22222">/*@</font>
-<a name="line685">685: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line686">686: </a><font color="#B22222">   the computed eigenvectors are to be viewed. </font>
-
-<a name="line688">688: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
-
-<a name="line690">690: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line691">691: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
-
-<a name="line693">693: </a><font color="#B22222">   Level: developer</font>
-<a name="line694">694: </a><font color="#B22222">@*/</font>
-<a name="line695">695: </a><strong><font color="#4169E1"><a name="NEPVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
-<a name="line696">696: </a>{
-<a name="line697">697: </a>  PetscErrorCode    ierr;
-<a name="line698">698: </a>  PetscViewer       viewer;
-<a name="line699">699: </a>  PetscBool         flg = PETSC_FALSE;
-<a name="line700">700: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line701">701: </a>  PetscViewerFormat format;
-
-<a name="line704">704: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line705">705: </a>  incall = PETSC_TRUE;
-<a name="line706">706: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_view_vectors"</font>,&viewer,&format,&flg);
-<a name="line707">707: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line708">708: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line709">709: </a>    <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(nep,viewer);
-<a name="line710">710: </a>    PetscViewerPopFormat(viewer);
-<a name="line711">711: </a>    PetscViewerDestroy(&viewer);
-<a name="line712">712: </a>  }
-<a name="line713">713: </a>  incall = PETSC_FALSE;
-<a name="line714">714: </a>  <font color="#4169E1">return</font>(0);
-<a name="line715">715: </a>}
+<a name="line654">654: </a>  PetscErrorCode    ierr;
+<a name="line655">655: </a>  PetscViewer       viewer;
+<a name="line656">656: </a>  PetscBool         flg;
+<a name="line657">657: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line658">658: </a>  PetscViewerFormat format;
+
+<a name="line661">661: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line662">662: </a>  incall = PETSC_TRUE;
+<a name="line663">663: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_view_values"</font>,&viewer,&format,&flg);
+<a name="line664">664: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line665">665: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line666">666: </a>    <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(nep,viewer);
+<a name="line667">667: </a>    PetscViewerPopFormat(viewer);
+<a name="line668">668: </a>    PetscViewerDestroy(&viewer);
+<a name="line669">669: </a>  }
+<a name="line670">670: </a>  incall = PETSC_FALSE;
+<a name="line671">671: </a>  <font color="#4169E1">return</font>(0);
+<a name="line672">672: </a>}
+
+<a name="line676">676: </a><font color="#B22222">/*@C</font>
+<a name="line677">677: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a> - Outputs computed eigenvectors to a viewer.</font>
+
+<a name="line679">679: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line681">681: </a><font color="#B22222">   Parameter:</font>
+<a name="line682">682: </a><font color="#B22222">+  nep    - the nonlinear eigensolver context</font>
+<a name="line683">683: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line685">685: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line686">686: </a><font color="#B22222">.  -nep_view_vectors - output eigenvectors.</font>
+
+<a name="line688">688: </a><font color="#B22222">   Note:</font>
+<a name="line689">689: </a><font color="#B22222">   If PETSc was configured with real scalars, complex conjugate eigenvectors</font>
+<a name="line690">690: </a><font color="#B22222">   will be viewed as two separate real vectors, one containing the real part</font>
+<a name="line691">691: </a><font color="#B22222">   and another one containing the imaginary part.</font>
+
+<a name="line693">693: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line695">695: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/NEP/NEPSolve.html#NEPSolve">NEPSolve</a>(), <a href="../../../docs/manualpages/NEP/NEPValuesView.html#NEPValuesView">NEPValuesView</a>(), <a href="../../../docs/manualpages/NEP/NEPErrorView.html#NEPErrorView">NEPErrorView</a>()</font>
+<a name="line696">696: </a><font color="#B22222">@*/</font>
+<a name="line697">697: </a><strong><font color="#4169E1"><a name="NEPVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep,PetscViewer viewer)</font></strong>
+<a name="line698">698: </a>{
+<a name="line700">700: </a>  PetscInt       i,k;
+<a name="line701">701: </a>  Vec            x;
+<a name="line702">702: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
+<a name="line703">703: </a>  char           vname[NMLEN];
+<a name="line704">704: </a>  const char     *ename;
+
+<a name="line708">708: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)nep));
+<a name="line711">711: </a>  NEPCheckSolved(nep,1);
+<a name="line712">712: </a>  <font color="#4169E1">if</font> (nep->nconv) {
+<a name="line713">713: </a>    PetscObjectGetName((PetscObject)nep,&ename);
+<a name="line714">714: </a>    NEPComputeVectors(nep);
+<a name="line715">715: </a>    <font color="#4169E1">for</font> (i=0;i<nep->nconv;i++) {
+<a name="line716">716: </a>      k = nep->perm[i];
+<a name="line717">717: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,(int)i,ename);
+<a name="line718">718: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(nep->V,k,&x);
+<a name="line719">719: </a>      PetscObjectSetName((PetscObject)x,vname);
+<a name="line720">720: </a>      VecView(x,viewer);
+<a name="line721">721: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(nep->V,k,&x);
+<a name="line722">722: </a>    }
+<a name="line723">723: </a>  }
+<a name="line724">724: </a>  <font color="#4169E1">return</font>(0);
+<a name="line725">725: </a>}
+
+<a name="line729">729: </a><font color="#B22222">/*@</font>
+<a name="line730">730: </a><font color="#B22222">   <a href="../../../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line731">731: </a><font color="#B22222">   the computed eigenvectors are to be viewed. </font>
+
+<a name="line733">733: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a></font>
+
+<a name="line735">735: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line736">736: </a><font color="#B22222">.  nep - the nonlinear eigensolver context</font>
+
+<a name="line738">738: </a><font color="#B22222">   Level: developer</font>
+<a name="line739">739: </a><font color="#B22222">@*/</font>
+<a name="line740">740: </a><strong><font color="#4169E1"><a name="NEPVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/NEP/NEPVectorsViewFromOptions.html#NEPVectorsViewFromOptions">NEPVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> nep)</font></strong>
+<a name="line741">741: </a>{
+<a name="line742">742: </a>  PetscErrorCode    ierr;
+<a name="line743">743: </a>  PetscViewer       viewer;
+<a name="line744">744: </a>  PetscBool         flg = PETSC_FALSE;
+<a name="line745">745: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line746">746: </a>  PetscViewerFormat format;
+
+<a name="line749">749: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line750">750: </a>  incall = PETSC_TRUE;
+<a name="line751">751: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)nep),((PetscObject)nep)->prefix,<font color="#666666">"-nep_view_vectors"</font>,&viewer,&format,&flg);
+<a name="line752">752: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line753">753: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line754">754: </a>    <a href="../../../docs/manualpages/NEP/NEPVectorsView.html#NEPVectorsView">NEPVectorsView</a>(nep,viewer);
+<a name="line755">755: </a>    PetscViewerPopFormat(viewer);
+<a name="line756">756: </a>    PetscViewerDestroy(&viewer);
+<a name="line757">757: </a>  }
+<a name="line758">758: </a>  incall = PETSC_FALSE;
+<a name="line759">759: </a>  <font color="#4169E1">return</font>(0);
+<a name="line760">760: </a>}
 
 </pre>
 </body>
diff --git a/src/nep/makefile b/src/nep/makefile
index 850f268..75f3bcf 100644
--- a/src/nep/makefile
+++ b/src/nep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/nep/makefile.html b/src/nep/makefile.html
index 9b08b50..c0d3d7a 100644
--- a/src/nep/makefile.html
+++ b/src/nep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/nep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:11+00:00">
+<meta name="date" content="2016-05-16T10:34:13+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/nep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/nep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/examples/index.html b/src/pep/examples/index.html
index 219dbf3..3bcb74d 100644
--- a/src/pep/examples/index.html
+++ b/src/pep/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
 <a href="tutorials/">tutorials/</a><br>
diff --git a/src/pep/examples/makefile b/src/pep/examples/makefile
index 8da93b8..a8f36b5 100644
--- a/src/pep/examples/makefile
+++ b/src/pep/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/examples/makefile.html b/src/pep/examples/makefile.html
index b69337f..86acbe4 100644
--- a/src/pep/examples/makefile.html
+++ b/src/pep/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/examples/nlevp/acoustic_wave_1d.c b/src/pep/examples/nlevp/acoustic_wave_1d.c
index dd619c8..6fbe433 100644
--- a/src/pep/examples/nlevp/acoustic_wave_1d.c
+++ b/src/pep/examples/nlevp/acoustic_wave_1d.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -32,7 +32,7 @@
    back.
 */
 
-static char help[] = "NLEVP problem: acoustic_wave_1d.\n\n"
+static char help[] = "Quadratic eigenproblem from an acoustics application (1-D).\n\n"
   "The command line options are:\n"
   "  -n <n>, where <n> = dimension of the matrices.\n"
   "  -z <z>, where <z> = impedance (default 1.0).\n\n";
@@ -53,8 +53,8 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-z",&z,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-z",&z,NULL);CHKERRQ(ierr);
   ierr = SlepcSNPrintfScalar(str,50,z,PETSC_FALSE);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nAcoustic wave 1-D, n=%D z=%s\n\n",n,str);CHKERRQ(ierr);
 
@@ -129,7 +129,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -142,6 +142,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/acoustic_wave_1d.c.html b/src/pep/examples/nlevp/acoustic_wave_1d.c.html
index 7c74eb2..558fedb 100644
--- a/src/pep/examples/nlevp/acoustic_wave_1d.c.html
+++ b/src/pep/examples/nlevp/acoustic_wave_1d.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/acoustic_wave_1d.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:08+00:00">
+<meta name="date" content="2016-05-16T10:34:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/acoustic_wave_1d.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/acoustic_wave_1d.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -44,7 +44,7 @@
 <a name="line32"> 32: </a><font color="#B22222">   back.</font>
 <a name="line33"> 33: </a><font color="#B22222">*/</font>
 
-<a name="line35"> 35: </a>static char help[] = <font color="#666666">"NLEVP problem: acoustic_wave_1d.\n\n"</font>
+<a name="line35"> 35: </a>static char help[] = <font color="#666666">"Quadratic eigenproblem from an acoustics application (1-D).\n\n"</font>
 <a name="line36"> 36: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line37"> 37: </a>  <font color="#666666">"  -n <n>, where <n> = dimension of the matrices.\n"</font>
 <a name="line38"> 38: </a>  <font color="#666666">"  -z <z>, where <z> = impedance (default 1.0).\n\n"</font>;
@@ -62,8 +62,8 @@
 
 <a name="line54"> 54: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line56"> 56: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-z"</font>,&z,NULL);
+<a name="line56"> 56: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-z"</font>,&z,NULL);
 <a name="line58"> 58: </a>  <a href="../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,z,PETSC_FALSE);
 <a name="line59"> 59: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nAcoustic wave 1-D, n=%D z=%s\n\n"</font>,n,str);
 
@@ -138,7 +138,7 @@
 <a name="line129">129: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line130">130: </a>  
 <a name="line131">131: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line132">132: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line132">132: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line133">133: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line134">134: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line135">135: </a>  } <font color="#4169E1">else</font> {
@@ -152,7 +152,7 @@
 <a name="line143">143: </a>  MatDestroy(&C);
 <a name="line144">144: </a>  MatDestroy(&K);
 <a name="line145">145: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line146">146: </a>  <font color="#4169E1">return</font> 0;
+<a name="line146">146: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line147">147: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/acoustic_wave_2d.c b/src/pep/examples/nlevp/acoustic_wave_2d.c
index 6c88e29..2122b6e 100644
--- a/src/pep/examples/nlevp/acoustic_wave_2d.c
+++ b/src/pep/examples/nlevp/acoustic_wave_2d.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,7 +30,7 @@
    scaled for real arithmetic.
 */
 
-static char help[] = "NLEVP problem: acoustic_wave_2d.\n\n"
+static char help[] = "Quadratic eigenproblem from an acoustics application (2-D).\n\n"
   "The command line options are:\n"
   "  -m <m>, where <m> = grid size, the matrices have dimension m*(m-1).\n"
   "  -z <z>, where <z> = impedance (default 1.0).\n\n";
@@ -52,9 +52,9 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   if (m<2) SETERRQ(PETSC_COMM_SELF,1,"m must be at least 2");
-  ierr = PetscOptionsGetScalar(NULL,"-z",&z,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-z",&z,NULL);CHKERRQ(ierr);
   h = 1.0/m;
   n = m*(m-1);
   ierr = SlepcSNPrintfScalar(str,50,z,PETSC_FALSE);CHKERRQ(ierr);
@@ -130,7 +130,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -143,6 +143,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/acoustic_wave_2d.c.html b/src/pep/examples/nlevp/acoustic_wave_2d.c.html
index c836a0d..6ea6ae9 100644
--- a/src/pep/examples/nlevp/acoustic_wave_2d.c.html
+++ b/src/pep/examples/nlevp/acoustic_wave_2d.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/acoustic_wave_2d.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:08+00:00">
+<meta name="date" content="2016-05-16T10:34:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/acoustic_wave_2d.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/acoustic_wave_2d.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -42,7 +42,7 @@
 <a name="line30"> 30: </a><font color="#B22222">   scaled for real arithmetic.</font>
 <a name="line31"> 31: </a><font color="#B22222">*/</font>
 
-<a name="line33"> 33: </a>static char help[] = <font color="#666666">"NLEVP problem: acoustic_wave_2d.\n\n"</font>
+<a name="line33"> 33: </a>static char help[] = <font color="#666666">"Quadratic eigenproblem from an acoustics application (2-D).\n\n"</font>
 <a name="line34"> 34: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"  -m <m>, where <m> = grid size, the matrices have dimension m*(m-1).\n"</font>
 <a name="line36"> 36: </a>  <font color="#666666">"  -z <z>, where <z> = impedance (default 1.0).\n\n"</font>;
@@ -61,9 +61,9 @@
 
 <a name="line53"> 53: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line56"> 56: </a>  <font color="#4169E1">if</font> (m<2) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"m must be at least 2"</font>);
-<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-z"</font>,&z,NULL);
+<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-z"</font>,&z,NULL);
 <a name="line58"> 58: </a>  h = 1.0/m;
 <a name="line59"> 59: </a>  n = m*(m-1);
 <a name="line60"> 60: </a>  <a href="../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,z,PETSC_FALSE);
@@ -139,7 +139,7 @@
 <a name="line130">130: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line131">131: </a>  
 <a name="line132">132: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line133">133: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line133">133: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line134">134: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line135">135: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line136">136: </a>  } <font color="#4169E1">else</font> {
@@ -153,7 +153,7 @@
 <a name="line144">144: </a>  MatDestroy(&C);
 <a name="line145">145: </a>  MatDestroy(&K);
 <a name="line146">146: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line147">147: </a>  <font color="#4169E1">return</font> 0;
+<a name="line147">147: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line148">148: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/butterfly.c b/src/pep/examples/nlevp/butterfly.c
index cfe571c..04f5059 100644
--- a/src/pep/examples/nlevp/butterfly.c
+++ b/src/pep/examples/nlevp/butterfly.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -29,7 +29,7 @@
    The butterfly problem is a quartic PEP with T-even structure.
 */
 
-static char help[] = "NLEVP problem: butterfly.\n\n"
+static char help[] = "Quartic polynomial eigenproblem with T-even structure.\n\n"
   "The command line options are:\n"
   "  -m <m>, grid size, the dimension of the matrices is n=m*m.\n"
   "  -c <array>, problem parameters, must be 10 comma-separated real values.\n\n";
@@ -52,10 +52,10 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   n = m*m;
   k = 10;
-  ierr = PetscOptionsGetRealArray(NULL,"-c",c,&k,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetRealArray(NULL,NULL,"-c",c,&k,&flg);CHKERRQ(ierr);
   if (flg && k!=10) SETERRQ1(PETSC_COMM_WORLD,1,"The number of parameters -c should be 10, you provided %D",k); 
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nButterfly problem, n=%D (m=%D)\n\n",n,m);CHKERRQ(ierr);
 
@@ -142,7 +142,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -155,6 +155,6 @@ int main(int argc,char **argv)
   for (i=0;i<NMAT;i++) {
     ierr = MatDestroy(&A[i]);CHKERRQ(ierr);
   }
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/butterfly.c.html b/src/pep/examples/nlevp/butterfly.c.html
index e895344..2d98f48 100644
--- a/src/pep/examples/nlevp/butterfly.c.html
+++ b/src/pep/examples/nlevp/butterfly.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/butterfly.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:08+00:00">
+<meta name="date" content="2016-05-16T10:34:10+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/butterfly.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/butterfly.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -41,7 +41,7 @@
 <a name="line29"> 29: </a><font color="#B22222">   The butterfly problem is a quartic <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> with T-even structure.</font>
 <a name="line30"> 30: </a><font color="#B22222">*/</font>
 
-<a name="line32"> 32: </a>static char help[] = <font color="#666666">"NLEVP problem: butterfly.\n\n"</font>
+<a name="line32"> 32: </a>static char help[] = <font color="#666666">"Quartic polynomial eigenproblem with T-even structure.\n\n"</font>
 <a name="line33"> 33: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line34"> 34: </a>  <font color="#666666">"  -m <m>, grid size, the dimension of the matrices is n=m*m.\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"  -c <array>, problem parameters, must be 10 comma-separated real values.\n\n"</font>;
@@ -61,10 +61,10 @@
 
 <a name="line53"> 53: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line56"> 56: </a>  n = m*m;
 <a name="line57"> 57: </a>  k = 10;
-<a name="line58"> 58: </a>  PetscOptionsGetRealArray(NULL,<font color="#666666">"-c"</font>,c,&k,&flg);
+<a name="line58"> 58: </a>  PetscOptionsGetRealArray(NULL,NULL,<font color="#666666">"-c"</font>,c,&k,&flg);
 <a name="line59"> 59: </a>  <font color="#4169E1">if</font> (flg && k!=10) SETERRQ1(PETSC_COMM_WORLD,1,<font color="#666666">"The number of parameters -c should be 10, you provided %D"</font>,k); 
 <a name="line60"> 60: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nButterfly problem, n=%D (m=%D)\n\n"</font>,n,m);
 
@@ -151,7 +151,7 @@
 <a name="line142">142: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line143">143: </a>  
 <a name="line144">144: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line145">145: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line145">145: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line146">146: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line147">147: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line148">148: </a>  } <font color="#4169E1">else</font> {
@@ -165,7 +165,7 @@
 <a name="line156">156: </a>    MatDestroy(&A[i]);
 <a name="line157">157: </a>  }
 <a name="line158">158: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line159">159: </a>  <font color="#4169E1">return</font> 0;
+<a name="line159">159: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line160">160: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/damped_beam.c b/src/pep/examples/nlevp/damped_beam.c
index 02b4757..d6369db 100644
--- a/src/pep/examples/nlevp/damped_beam.c
+++ b/src/pep/examples/nlevp/damped_beam.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,7 +30,7 @@
    simply supported at both ends and damped in the middle.
 */
 
-static char help[] = "NLEVP problem: damped_beam.\n\n"
+static char help[] = "Quadratic eigenproblem from the vibrarion analysis of a beam.\n\n"
   "The command line options are:\n"
   "  -n <n> ... dimension of the matrices.\n\n";
 
@@ -51,7 +51,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   nele = n/2;
   n    = 2*nele;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSimply supported beam damped in the middle, n=%D (nele=%D)\n\n",n,nele);CHKERRQ(ierr);
@@ -159,7 +159,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -177,6 +177,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&K);CHKERRQ(ierr);
   ierr = MatDestroy(&Ko);CHKERRQ(ierr);
   ierr = MatDestroy(&Mo);CHKERRQ(ierr);
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/damped_beam.c.html b/src/pep/examples/nlevp/damped_beam.c.html
index 2af9760..30d61b4 100644
--- a/src/pep/examples/nlevp/damped_beam.c.html
+++ b/src/pep/examples/nlevp/damped_beam.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/damped_beam.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:09+00:00">
+<meta name="date" content="2016-05-16T10:34:10+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/damped_beam.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/damped_beam.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -42,7 +42,7 @@
 <a name="line30"> 30: </a><font color="#B22222">   simply supported at both ends and damped in the middle.</font>
 <a name="line31"> 31: </a><font color="#B22222">*/</font>
 
-<a name="line33"> 33: </a>static char help[] = <font color="#666666">"NLEVP problem: damped_beam.\n\n"</font>
+<a name="line33"> 33: </a>static char help[] = <font color="#666666">"Quadratic eigenproblem from the vibrarion analysis of a beam.\n\n"</font>
 <a name="line34"> 34: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"  -n <n> ... dimension of the matrices.\n\n"</font>;
 
@@ -60,7 +60,7 @@
 
 <a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line55"> 55: </a>  nele = n/2;
 <a name="line56"> 56: </a>  n    = 2*nele;
 <a name="line57"> 57: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSimply supported beam damped in the middle, n=%D (nele=%D)\n\n"</font>,n,nele);
@@ -168,7 +168,7 @@
 <a name="line159">159: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line160">160: </a>  
 <a name="line161">161: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line162">162: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line162">162: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line163">163: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line164">164: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line165">165: </a>  } <font color="#4169E1">else</font> {
@@ -187,7 +187,7 @@
 <a name="line178">178: </a>  MatDestroy(&Ko);
 <a name="line179">179: </a>  MatDestroy(&Mo);
 <a name="line180">180: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line181">181: </a>  <font color="#4169E1">return</font> 0;
+<a name="line181">181: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line182">182: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/index.html b/src/pep/examples/nlevp/index.html
index f3e9591..22dc622 100644
--- a/src/pep/examples/nlevp/index.html
+++ b/src/pep/examples/nlevp/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
@@ -19,13 +19,13 @@ Options can also be set directly in application codes by calling the correspondi
 </p>
 
 <p>
-<a href="acoustic_wave_1d.c.html">acoustic_wave_1d.c: NLEVP problem: acoustic_wave_1d</a><br>
-<a href="acoustic_wave_2d.c.html">acoustic_wave_2d.c: NLEVP problem: acoustic_wave_2d</a><br>
-<a href="butterfly.c.html">butterfly.c: NLEVP problem: butterfly</a><br>
-<a href="damped_beam.c.html">damped_beam.c: NLEVP problem: damped_beam</a><br>
-<a href="pdde_stability.c.html">pdde_stability.c: NLEVP problem: pdde_stability</a><br>
-<a href="planar_waveguide.c.html">planar_waveguide.c: NLEVP problem: planar_waveguide</a><br>
-<a href="sleeper.c.html">sleeper.c: NLEVP problem: sleeper</a><br>
-<a href="spring.c.html">spring.c: NLEVP problem: spring</a><br>
+<a href="acoustic_wave_1d.c.html">acoustic_wave_1d.c: Quadratic eigenproblem from an acoustics application (1-D)</a><br>
+<a href="acoustic_wave_2d.c.html">acoustic_wave_2d.c: Quadratic eigenproblem from an acoustics application (2-D)</a><br>
+<a href="butterfly.c.html">butterfly.c: Quartic polynomial eigenproblem with T-even structure</a><br>
+<a href="damped_beam.c.html">damped_beam.c: Quadratic eigenproblem from the vibrarion analysis of a beam</a><br>
+<a href="pdde_stability.c.html">pdde_stability.c: Stability analysis of a discretized partial delay-differential equation</a><br>
+<a href="planar_waveguide.c.html">planar_waveguide.c: FEM solution of the propagation constants in a six-layer planar waveguide</a><br>
+<a href="sleeper.c.html">sleeper.c: Oscillations of a rail track resting on sleepers</a><br>
+<a href="spring.c.html">spring.c: FEM model of a damped mass-spring system</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/pep/examples/nlevp/makefile b/src/pep/examples/nlevp/makefile
index c2983d5..5db69f3 100644
--- a/src/pep/examples/nlevp/makefile
+++ b/src/pep/examples/nlevp/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -75,52 +75,50 @@ spring: spring.o chkopts
 	${RM} spring.o
 
 #------------------------------------------------------------------------------------
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
-
 runacoustic_wave_1d_1:
-	-@${MPIEXEC} -np 1 ./acoustic_wave_1d -pep_nev 4 -pep_tol 1e-7 -n 24 -st_type sinvert -terse > acoustic_wave_1d_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./acoustic_wave_1d -pep_nev 4 -pep_tol 1e-7 -n 24 -st_type sinvert -terse > acoustic_wave_1d_1.tmp 2>&1; \
 	   if (${DIFF} output/acoustic_wave_1d_1.out acoustic_wave_1d_1.tmp) then true; \
 	   else echo "Possible problem with acoustic_wave_1d_1, diffs above"; fi; \
 	   ${RM} -f acoustic_wave_1d_1.tmp
 
 runacoustic_wave_2d_1:
-	-@${MPIEXEC} -np 1 ./acoustic_wave_2d -pep_nev 2 -terse > acoustic_wave_2d_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./acoustic_wave_2d -pep_nev 2 -terse > acoustic_wave_2d_1.tmp 2>&1; \
 	   if (${DIFF} output/acoustic_wave_2d_1.out acoustic_wave_2d_1.tmp) then true; \
 	   else echo "Possible problem with acoustic_wave_2d_1, diffs above"; fi; \
 	   ${RM} -f acoustic_wave_2d_1.tmp
 
 runbutterfly:
-	-@${MPIEXEC} -np 1 ./butterfly -pep_nev 4 -st_type sinvert -pep_target 0.01 -terse > butterfly_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./butterfly -pep_nev 4 -st_type sinvert -pep_target 0.01 -terse > butterfly_1.tmp 2>&1; \
 	   if (${DIFF} output/butterfly_1.out butterfly_1.tmp) then true; \
 	   else echo "Possible problem with butterfly_1, diffs above"; fi; \
 	   ${RM} -f butterfly_1.tmp
 
 rundamped_beam:
-	-@${MPIEXEC} -np 1 ./damped_beam -pep_nev 2 -pep_ncv 12 -st_type sinvert -pep_target -7 -terse > damped_beam_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./damped_beam -pep_nev 2 -pep_ncv 12 -st_type sinvert -pep_target -7 -terse > damped_beam_1.tmp 2>&1; \
 	   if (${DIFF} output/damped_beam_1.out damped_beam_1.tmp) then true; \
 	   else echo "Possible problem with damped_beam_1, diffs above"; fi; \
 	   ${RM} -f damped_beam_1.tmp
 
 runpdde_stability:
-	-@${MPIEXEC} -np 1 ./pdde_stability -terse > pdde_stability_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./pdde_stability -terse > pdde_stability_1.tmp 2>&1; \
 	   if (${DIFF} output/pdde_stability_1.out pdde_stability_1.tmp) then true; \
 	   else echo "Possible problem with pdde_stability_1, diffs above"; fi; \
 	   ${RM} -f pdde_stability_1.tmp
 
 runplanar_waveguide:
-	-@${MPIEXEC} -np 1 ./planar_waveguide -pep_nev 4 -st_type sinvert -terse > planar_waveguide_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./planar_waveguide -pep_nev 4 -st_type sinvert -terse > planar_waveguide_1.tmp 2>&1; \
 	   if (${DIFF} output/planar_waveguide_1.out planar_waveguide_1.tmp) then true; \
 	   else echo "Possible problem with planar_waveguide_1, diffs above"; fi; \
 	   ${RM} -f planar_waveguide_1.tmp
 
 runsleeper:
-	-@${MPIEXEC} -np 1 ./sleeper -pep_nev 4 -pep_ncv 24 -st_type sinvert -n 100 -terse > sleeper_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./sleeper -pep_nev 4 -pep_ncv 24 -st_type sinvert -n 100 -terse > sleeper_1.tmp 2>&1; \
 	   if (${DIFF} output/sleeper_1.out sleeper_1.tmp) then true; \
 	   else echo "Possible problem with sleeper_1, diffs above"; fi; \
 	   ${RM} -f sleeper_1.tmp
 
 runspring:
-	-@${MPIEXEC} -np 1 ./spring -pep_nev 4 -n 24 -st_type sinvert -terse > spring_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./spring -pep_nev 4 -n 24 -st_type sinvert -pep_ncv 18 -terse > spring_1.tmp 2>&1; \
 	   if (${DIFF} output/spring_1.out spring_1.tmp) then true; \
 	   else echo "Possible problem with spring_1, diffs above"; fi; \
 	   ${RM} -f spring_1.tmp
diff --git a/src/pep/examples/nlevp/makefile.html b/src/pep/examples/nlevp/makefile.html
index dab8630..ab2d9c4 100644
--- a/src/pep/examples/nlevp/makefile.html
+++ b/src/pep/examples/nlevp/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:10+00:00">
+<meta name="date" content="2016-05-16T10:34:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -86,52 +86,50 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	${RM} spring.o
 
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
-DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
-
 <strong><font color="#FF0000">runacoustic_wave_1d_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./acoustic_wave_1d -pep_nev 4 -pep_tol 1e-7 -n 24 -st_type sinvert -terse > acoustic_wave_1d_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./acoustic_wave_1d -pep_nev 4 -pep_tol 1e-7 -n 24 -st_type sinvert -terse > acoustic_wave_1d_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/acoustic_wave_1d_1.out acoustic_wave_1d_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with acoustic_wave_1d_1, diffs above"</font>; fi; \
 	   ${RM} -f acoustic_wave_1d_1.tmp
 
 <strong><font color="#FF0000">runacoustic_wave_2d_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./acoustic_wave_2d -pep_nev 2 -terse > acoustic_wave_2d_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./acoustic_wave_2d -pep_nev 2 -terse > acoustic_wave_2d_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/acoustic_wave_2d_1.out acoustic_wave_2d_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with acoustic_wave_2d_1, diffs above"</font>; fi; \
 	   ${RM} -f acoustic_wave_2d_1.tmp
 
 <strong><font color="#FF0000">runbutterfly:</font></strong>
-	-@${MPIEXEC} -np 1 ./butterfly -pep_nev 4 -st_type sinvert -pep_target 0.01 -terse > butterfly_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./butterfly -pep_nev 4 -st_type sinvert -pep_target 0.01 -terse > butterfly_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/butterfly_1.out butterfly_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with butterfly_1, diffs above"</font>; fi; \
 	   ${RM} -f butterfly_1.tmp
 
 <strong><font color="#FF0000">rundamped_beam:</font></strong>
-	-@${MPIEXEC} -np 1 ./damped_beam -pep_nev 2 -pep_ncv 12 -st_type sinvert -pep_target -7 -terse > damped_beam_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./damped_beam -pep_nev 2 -pep_ncv 12 -st_type sinvert -pep_target -7 -terse > damped_beam_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/damped_beam_1.out damped_beam_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with damped_beam_1, diffs above"</font>; fi; \
 	   ${RM} -f damped_beam_1.tmp
 
 <strong><font color="#FF0000">runpdde_stability:</font></strong>
-	-@${MPIEXEC} -np 1 ./pdde_stability -terse > pdde_stability_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./pdde_stability -terse > pdde_stability_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/pdde_stability_1.out pdde_stability_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with pdde_stability_1, diffs above"</font>; fi; \
 	   ${RM} -f pdde_stability_1.tmp
 
 <strong><font color="#FF0000">runplanar_waveguide:</font></strong>
-	-@${MPIEXEC} -np 1 ./planar_waveguide -pep_nev 4 -st_type sinvert -terse > planar_waveguide_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./planar_waveguide -pep_nev 4 -st_type sinvert -terse > planar_waveguide_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/planar_waveguide_1.out planar_waveguide_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with planar_waveguide_1, diffs above"</font>; fi; \
 	   ${RM} -f planar_waveguide_1.tmp
 
 <strong><font color="#FF0000">runsleeper:</font></strong>
-	-@${MPIEXEC} -np 1 ./sleeper -pep_nev 4 -pep_ncv 24 -st_type sinvert -n 100 -terse > sleeper_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./sleeper -pep_nev 4 -pep_ncv 24 -st_type sinvert -n 100 -terse > sleeper_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/sleeper_1.out sleeper_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with sleeper_1, diffs above"</font>; fi; \
 	   ${RM} -f sleeper_1.tmp
 
 <strong><font color="#FF0000">runspring:</font></strong>
-	-@${MPIEXEC} -np 1 ./spring -pep_nev 4 -n 24 -st_type sinvert -terse > spring_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./spring -pep_nev 4 -n 24 -st_type sinvert -pep_ncv 18 -terse > spring_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/spring_1.out spring_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with spring_1, diffs above"</font>; fi; \
 	   ${RM} -f spring_1.tmp
diff --git a/src/pep/examples/nlevp/output/acoustic_wave_1d_1.out b/src/pep/examples/nlevp/output/acoustic_wave_1d_1.out
index 590d042..def495b 100644
--- a/src/pep/examples/nlevp/output/acoustic_wave_1d_1.out
+++ b/src/pep/examples/nlevp/output/acoustic_wave_1d_1.out
@@ -1,5 +1,5 @@
 
-Acoustic wave 1-D, n=24 z=1
+Acoustic wave 1-D, n=24 z=1.
 
  All requested eigenvalues computed up to the required tolerance:
      0.52633+0.19430i, 0.52633-0.19430i, 0.47425+0.60655i, 0.47425-0.60655i
diff --git a/src/pep/examples/nlevp/output/acoustic_wave_2d_1.out b/src/pep/examples/nlevp/output/acoustic_wave_2d_1.out
index 410cbaf..0ac2289 100644
--- a/src/pep/examples/nlevp/output/acoustic_wave_2d_1.out
+++ b/src/pep/examples/nlevp/output/acoustic_wave_2d_1.out
@@ -1,5 +1,5 @@
 
-Acoustic wave 2-D, n=30 (m=6), z=1
+Acoustic wave 2-D, n=30 (m=6), z=1.
 
  All requested eigenvalues computed up to the required tolerance:
      0.00536+2.60937i, 0.00536-2.60937i
diff --git a/src/pep/examples/nlevp/output/spring_1.out b/src/pep/examples/nlevp/output/spring_1.out
index e12eb4b..2cf0a51 100644
--- a/src/pep/examples/nlevp/output/spring_1.out
+++ b/src/pep/examples/nlevp/output/spring_1.out
@@ -1,5 +1,5 @@
 
-Damped mass-spring system, n=24 mu=1 tau=10 kappa=5
+Damped mass-spring system, n=24 mu=1. tau=10. kappa=5.
 
  All requested eigenvalues computed up to the required tolerance:
      -0.50512, -0.50517, -0.50525, -0.50537
diff --git a/src/pep/examples/nlevp/pdde_stability.c b/src/pep/examples/nlevp/pdde_stability.c
index e7a7661..f29bda2 100644
--- a/src/pep/examples/nlevp/pdde_stability.c
+++ b/src/pep/examples/nlevp/pdde_stability.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -31,7 +31,7 @@
    complex scalars.
 */
 
-static char help[] = "NLEVP problem: pdde_stability.\n\n"
+static char help[] = "Stability analysis of a discretized partial delay-differential equation.\n\n"
   "The command line options are:\n"
   "  -m <m>, grid size, the matrices have dimension n=m*m.\n"
   "  -c <a0,b0,a1,b1,a2,b2,phi1>, comma-separated list of 7 real parameters.\n\n";
@@ -77,13 +77,13 @@ int main(int argc,char **argv)
   SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_SUP, "This example requires complex scalars");
 #endif
 
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   n = m*m;
   h = PETSC_PI/(m+1);
   gamma = PetscExpScalar(PETSC_i*c[6]);
   gamma = gamma/PetscAbsScalar(gamma);
   k = 7;
-  ierr = PetscOptionsGetRealArray(NULL,"-c",c,&k,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetRealArray(NULL,NULL,"-c",c,&k,&flg);CHKERRQ(ierr);
   if (flg && k!=7) SETERRQ1(PETSC_COMM_WORLD,1,"The number of parameters -c should be 7, you provided %D",k); 
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nPDDE stability, n=%D (m=%D)\n\n",n,m);CHKERRQ(ierr);
 
@@ -147,7 +147,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -160,6 +160,6 @@ int main(int argc,char **argv)
   for (i=0;i<NMAT;i++) {
     ierr = MatDestroy(&A[i]);CHKERRQ(ierr);
   }
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/pdde_stability.c.html b/src/pep/examples/nlevp/pdde_stability.c.html
index fedc7ae..f5c97ac 100644
--- a/src/pep/examples/nlevp/pdde_stability.c.html
+++ b/src/pep/examples/nlevp/pdde_stability.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/pdde_stability.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:09+00:00">
+<meta name="date" content="2016-05-16T10:34:10+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/pdde_stability.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/pdde_stability.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -43,7 +43,7 @@
 <a name="line31"> 31: </a><font color="#B22222">   complex scalars.</font>
 <a name="line32"> 32: </a><font color="#B22222">*/</font>
 
-<a name="line34"> 34: </a>static char help[] = <font color="#666666">"NLEVP problem: pdde_stability.\n\n"</font>
+<a name="line34"> 34: </a>static char help[] = <font color="#666666">"Stability analysis of a discretized partial delay-differential equation.\n\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line36"> 36: </a>  <font color="#666666">"  -m <m>, grid size, the matrices have dimension n=m*m.\n"</font>
 <a name="line37"> 37: </a>  <font color="#666666">"  -c <a0,b0,a1,b1,a2,b2,phi1>, comma-separated list of 7 real parameters.\n\n"</font>;
@@ -83,13 +83,13 @@
 <a name="line77"> 77: </a>  SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_SUP, <font color="#666666">"This example requires complex scalars"</font>);
 <a name="line78"> 78: </a><font color="#A020F0">#endif</font>
 
-<a name="line80"> 80: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line80"> 80: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line81"> 81: </a>  n = m*m;
 <a name="line82"> 82: </a>  h = PETSC_PI/(m+1);
 <a name="line83"> 83: </a>  gamma = PetscExpScalar(PETSC_i*c[6]);
 <a name="line84"> 84: </a>  gamma = gamma/PetscAbsScalar(gamma);
 <a name="line85"> 85: </a>  k = 7;
-<a name="line86"> 86: </a>  PetscOptionsGetRealArray(NULL,<font color="#666666">"-c"</font>,c,&k,&flg);
+<a name="line86"> 86: </a>  PetscOptionsGetRealArray(NULL,NULL,<font color="#666666">"-c"</font>,c,&k,&flg);
 <a name="line87"> 87: </a>  <font color="#4169E1">if</font> (flg && k!=7) SETERRQ1(PETSC_COMM_WORLD,1,<font color="#666666">"The number of parameters -c should be 7, you provided %D"</font>,k); 
 <a name="line88"> 88: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nPDDE stability, n=%D (m=%D)\n\n"</font>,n,m);
 
@@ -153,7 +153,7 @@
 <a name="line147">147: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line148">148: </a>  
 <a name="line149">149: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line150">150: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line150">150: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line151">151: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line152">152: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line153">153: </a>  } <font color="#4169E1">else</font> {
@@ -167,7 +167,7 @@
 <a name="line161">161: </a>    MatDestroy(&A[i]);
 <a name="line162">162: </a>  }
 <a name="line163">163: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line164">164: </a>  <font color="#4169E1">return</font> 0;
+<a name="line164">164: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line165">165: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/planar_waveguide.c b/src/pep/examples/nlevp/planar_waveguide.c
index bb87d31..34b7108 100644
--- a/src/pep/examples/nlevp/planar_waveguide.c
+++ b/src/pep/examples/nlevp/planar_waveguide.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -31,7 +31,7 @@
    six-layer planar waveguide.
 */
 
-static char help[] = "NLEVP problem: planar_waveguide.\n\n"
+static char help[] = "FEM solution of the propagation constants in a six-layer planar waveguide.\n\n"
   "The command line options are:\n"
   "  -n <n>, the dimension of the matrices.\n\n";
 
@@ -55,7 +55,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   n = (n/4)*4;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nPlanar waveguide, n=%D\n\n",n+1);CHKERRQ(ierr);
   h = (b-a)/n;
@@ -186,7 +186,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -199,6 +199,6 @@ int main(int argc,char **argv)
   for (i=0;i<NMAT;i++) {
     ierr = MatDestroy(&A[i]);CHKERRQ(ierr);
   }
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/planar_waveguide.c.html b/src/pep/examples/nlevp/planar_waveguide.c.html
index 3cdec7a..ac838c8 100644
--- a/src/pep/examples/nlevp/planar_waveguide.c.html
+++ b/src/pep/examples/nlevp/planar_waveguide.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/planar_waveguide.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:09+00:00">
+<meta name="date" content="2016-05-16T10:34:11+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/planar_waveguide.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/planar_waveguide.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -43,7 +43,7 @@
 <a name="line31"> 31: </a><font color="#B22222">   six-layer planar waveguide.</font>
 <a name="line32"> 32: </a><font color="#B22222">*/</font>
 
-<a name="line34"> 34: </a>static char help[] = <font color="#666666">"NLEVP problem: planar_waveguide.\n\n"</font>
+<a name="line34"> 34: </a>static char help[] = <font color="#666666">"FEM solution of the propagation constants in a six-layer planar waveguide.\n\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line36"> 36: </a>  <font color="#666666">"  -n <n>, the dimension of the matrices.\n\n"</font>;
 
@@ -64,7 +64,7 @@
 
 <a name="line56"> 56: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line59"> 59: </a>  n = (n/4)*4;
 <a name="line60"> 60: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nPlanar waveguide, n=%D\n\n"</font>,n+1);
 <a name="line61"> 61: </a>  h = (b-a)/n;
@@ -195,7 +195,7 @@
 <a name="line186">186: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line187">187: </a>  
 <a name="line188">188: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line189">189: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line189">189: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line190">190: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line191">191: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line192">192: </a>  } <font color="#4169E1">else</font> {
@@ -209,7 +209,7 @@
 <a name="line200">200: </a>    MatDestroy(&A[i]);
 <a name="line201">201: </a>  }
 <a name="line202">202: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line203">203: </a>  <font color="#4169E1">return</font> 0;
+<a name="line203">203: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line204">204: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/sleeper.c b/src/pep/examples/nlevp/sleeper.c
index e66f97a..17d007e 100644
--- a/src/pep/examples/nlevp/sleeper.c
+++ b/src/pep/examples/nlevp/sleeper.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,7 +30,7 @@
    oscillations of a rail track resting on sleepers.
 */
 
-static char help[] = "NLEVP problem: sleeper.\n\n"
+static char help[] = "Oscillations of a rail track resting on sleepers.\n\n"
   "The command line options are:\n"
   "  -n <n>, where <n> = dimension of the matrices.\n\n";
 
@@ -48,7 +48,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nRailtrack resting on sleepers, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
@@ -138,7 +138,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -151,6 +151,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/sleeper.c.html b/src/pep/examples/nlevp/sleeper.c.html
index e9f59c5..f697b49 100644
--- a/src/pep/examples/nlevp/sleeper.c.html
+++ b/src/pep/examples/nlevp/sleeper.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/sleeper.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:10+00:00">
+<meta name="date" content="2016-05-16T10:34:11+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/sleeper.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/sleeper.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -42,7 +42,7 @@
 <a name="line30"> 30: </a><font color="#B22222">   oscillations of a rail track resting on sleepers.</font>
 <a name="line31"> 31: </a><font color="#B22222">*/</font>
 
-<a name="line33"> 33: </a>static char help[] = <font color="#666666">"NLEVP problem: sleeper.\n\n"</font>
+<a name="line33"> 33: </a>static char help[] = <font color="#666666">"Oscillations of a rail track resting on sleepers.\n\n"</font>
 <a name="line34"> 34: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"  -n <n>, where <n> = dimension of the matrices.\n\n"</font>;
 
@@ -57,7 +57,7 @@
 
 <a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line51"> 51: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line52"> 52: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nRailtrack resting on sleepers, n=%D\n\n"</font>,n);
 
 <a name="line54"> 54: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
@@ -147,7 +147,7 @@
 <a name="line138">138: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line139">139: </a>  
 <a name="line140">140: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line141">141: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line141">141: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line142">142: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line143">143: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line144">144: </a>  } <font color="#4169E1">else</font> {
@@ -161,7 +161,7 @@
 <a name="line152">152: </a>  MatDestroy(&C);
 <a name="line153">153: </a>  MatDestroy(&K);
 <a name="line154">154: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line155">155: </a>  <font color="#4169E1">return</font> 0;
+<a name="line155">155: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line156">156: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/nlevp/spring.c b/src/pep/examples/nlevp/spring.c
index ec0277e..8e2faec 100644
--- a/src/pep/examples/nlevp/spring.c
+++ b/src/pep/examples/nlevp/spring.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -33,7 +33,7 @@
    for dampers and springs connecting adjacent masses or masses to the ground.
 */
 
-static char help[] = "NLEVP problem: spring.\n\n"
+static char help[] = "FEM model of a damped mass-spring system.\n\n"
   "The command line options are:\n"
   "  -n <n> ... dimension of the matrices.\n"
   "  -mu <value> ... mass (default 1).\n"
@@ -55,10 +55,10 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-mu",&mu,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-kappa",&kappa,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-mu",&mu,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-kappa",&kappa,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nDamped mass-spring system, n=%D mu=%g tau=%g kappa=%g\n\n",n,(double)mu,(double)tau,(double)kappa);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
@@ -132,7 +132,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
   
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -145,6 +145,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
-  ierr = SlepcFinalize();CHKERRQ(ierr);
-  return 0;
+  ierr = SlepcFinalize();
+  return ierr;
 }
diff --git a/src/pep/examples/nlevp/spring.c.html b/src/pep/examples/nlevp/spring.c.html
index e86d904..6f0230b 100644
--- a/src/pep/examples/nlevp/spring.c.html
+++ b/src/pep/examples/nlevp/spring.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/nlevp/spring.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:10+00:00">
+<meta name="date" content="2016-05-16T10:34:11+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/nlevp/spring.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/nlevp/spring.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,7 +45,7 @@
 <a name="line33"> 33: </a><font color="#B22222">   for dampers and springs connecting adjacent masses or masses to the ground.</font>
 <a name="line34"> 34: </a><font color="#B22222">*/</font>
 
-<a name="line36"> 36: </a>static char help[] = <font color="#666666">"NLEVP problem: spring.\n\n"</font>
+<a name="line36"> 36: </a>static char help[] = <font color="#666666">"FEM model of a damped mass-spring system.\n\n"</font>
 <a name="line37"> 37: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line38"> 38: </a>  <font color="#666666">"  -n <n> ... dimension of the matrices.\n"</font>
 <a name="line39"> 39: </a>  <font color="#666666">"  -mu <value> ... mass (default 1).\n"</font>
@@ -64,10 +64,10 @@
 
 <a name="line56"> 56: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line59"> 59: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-mu"</font>,&mu,NULL);
-<a name="line60"> 60: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
-<a name="line61"> 61: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-kappa"</font>,&kappa,NULL);
+<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line59"> 59: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-mu"</font>,&mu,NULL);
+<a name="line60"> 60: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line61"> 61: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-kappa"</font>,&kappa,NULL);
 <a name="line62"> 62: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nDamped mass-spring system, n=%D mu=%g tau=%g kappa=%g\n\n"</font>,n,(double)mu,(double)tau,(double)kappa);
 
 <a name="line64"> 64: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </font>
@@ -141,7 +141,7 @@
 <a name="line132">132: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 <a name="line133">133: </a>  
 <a name="line134">134: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line135">135: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line135">135: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line136">136: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line137">137: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line138">138: </a>  } <font color="#4169E1">else</font> {
@@ -155,7 +155,7 @@
 <a name="line146">146: </a>  MatDestroy(&C);
 <a name="line147">147: </a>  MatDestroy(&K);
 <a name="line148">148: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line149">149: </a>  <font color="#4169E1">return</font> 0;
+<a name="line149">149: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line150">150: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/tests/index.html b/src/pep/examples/tests/index.html
index 0a98c52..8edb7fb 100644
--- a/src/pep/examples/tests/index.html
+++ b/src/pep/examples/tests/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
@@ -21,5 +21,6 @@ Options can also be set directly in application codes by calling the correspondi
 <p>
 <a href="test1.c.html">test1.c: Test the solution of a PEP without calling PEPSetFromOptions (based on ex16</a><br>
 <a href="test2.c.html">test2.c: Test the solution of a PEP from a finite element model of </a><br>
+<a href="test3.c.html">test3.c: Test PEP interface functions</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/pep/examples/tests/makefile b/src/pep/examples/tests/makefile
index 345bef3..0068694 100644
--- a/src/pep/examples/tests/makefile
+++ b/src/pep/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,13 +24,15 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/pep/examples/tests/
-EXAMPLESC  = test1.c test2.c
-EXAMPLESF  =
+EXAMPLESC  = test1.c test2.c test3.c
+EXAMPLESF  = test3f.F
 MANSEC     = PEP
-TESTS      = test1 test2
+TESTS      = test1 test2 test3 test3f
 
 TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \
-                       test2.PETSc runtest2_1 runtest2_2 test2.rm
+                       test2.PETSc runtest2_1 runtest2_2 runtest2_3 runtest2_4 test2.rm \
+                       test3.PETSc runtest3_1 test3.rm
+TESTEXAMPLES_FORTRAN = test3f.PETSc runtest3f_1 test3f.rm \
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -42,6 +44,14 @@ test2: test2.o chkopts
 	-${CLINKER} -o test2 test2.o ${SLEPC_PEP_LIB}
 	${RM} test2.o
 
+test3: test3.o chkopts
+	-${CLINKER} -o test3 test3.o ${SLEPC_PEP_LIB}
+	${RM} test3.o
+
+test3f: test3f.o chkopts
+	-${FLINKER} -o test3f test3f.o ${SLEPC_PEP_LIB}
+	${RM} test3f.o
+
 #------------------------------------------------------------------------------------
 PEP = toar qarnoldi
 EPS = krylovschur gd
@@ -56,11 +66,11 @@ runtest1_1:
 	- at test=test1_1; \
 	for pep in ${PEP}; do \
 	   echo "pep type $$pep"; \
-	   ${MPIEXEC} -np 1 ./test1 -type $$pep -m 11 2>&1; \
+	   ${MPIEXEC} -n 1 ./test1 -type $$pep -m 11 2>&1; \
 	done > $${test}.tmp; \
 	for eps in ${EPS}; do \
 	    echo "pep type linear, eps type $$eps"; \
-	    ${MPIEXEC} -np 1 ./test1 -type linear -epstype $$eps -m 11 2>&1; \
+	    ${MPIEXEC} -n 1 ./test1 -type linear -epstype $$eps -m 11 2>&1; \
 	done >> $${test}.tmp; \
 	${TESTCODE}
 
@@ -69,25 +79,59 @@ runtest2_1:
 	for pep in ${PEP}; do \
 	   echo "pep type $$pep"; \
 	   if [ $$pep = qarnoldi ]; then EXTRA="-st_transform"; else EXTRA=""; fi; \
-	   ${MPIEXEC} -np 1 ./test2 -pep_type $$pep -pep_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test2 -pep_type $$pep -pep_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp; \
 	for eps in ${EPS}; do \
 	   echo "pep type linear, eps type $$eps"; \
-	   ${MPIEXEC} -np 1 ./test2 -pep_type linear -pep_eps_type $$eps -pep_nev 4 -pep_linear_explicitmatrix 2>&1; \
+	   ${MPIEXEC} -n 1 ./test2 -pep_type linear -pep_linear_eps_type $$eps -pep_nev 4 -pep_linear_explicitmatrix 2>&1; \
 	done >> $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_2:
 	- at test=test2_2; \
 	echo "toar with shift-and-invert" > $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 2>&1 >> $${test}.tmp; \
 	echo "toar with shift-and-invert (with scale=both)" >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_scale both 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_scale both 2>&1 >> $${test}.tmp; \
 	echo "toar with shift-and-invert (transform)" >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
 	echo "qarnoldi with shift-and-invert (transform)" >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type qarnoldi -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type qarnoldi -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
 	echo "linear with shift-and-invert" >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type linear -pep_target -0.4 -pep_nev 4 -st_type sinvert 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type linear -pep_target -0.4 -pep_nev 4 -st_type sinvert 2>&1 >> $${test}.tmp; \
+	${TESTCODE}
+
+runtest2_3:
+	- at test=test2_3; \
+	echo "no extraction" > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract none 2>&1 >> $${test}.tmp; \
+	echo "norm extraction" >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract norm 2>&1 >> $${test}.tmp; \
+	echo "residual extraction" >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract residual 2>&1 >> $${test}.tmp; \
+	echo "structured extraction" >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract structured 2>&1 >> $${test}.tmp; \
+	${TESTCODE}
+
+runtest2_4:
+	- at test=test2_4; \
+	echo "simple refinement schur" > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine simple -pep_refine_scheme schur 2>&1 >> $${test}.tmp; \
+	echo "simple refinement mbe" >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine simple -pep_refine_scheme mbe -pep_refine_ksp_type preonly -pep_refine_pc_type lu >> $${test}.tmp; \
+	echo "simple refinement explicit" >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine simple -pep_refine_scheme explicit >> $${test}.tmp; \
+	echo "multiple refinement" >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine multiple 2>&1 >> $${test}.tmp; \
+	${TESTCODE}
+
+runtest3_1:
+	- at test=test3_1; \
+	${MPIEXEC} -n 1 ./test3 -pep_tol 1e-7 2>&1 > $${test}.tmp; \
+	${TESTCODE}
+
+runtest3f_1:
+	- at test=test3f_1; \
+	${MPIEXEC} -n 1 ./test3f -pep_tol 1e-7 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
diff --git a/src/pep/examples/tests/makefile.html b/src/pep/examples/tests/makefile.html
index 6b3c324..08793bf 100644
--- a/src/pep/examples/tests/makefile.html
+++ b/src/pep/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,13 +35,15 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/pep/examples/tests/
-EXAMPLESC  = test1.c test2.c
-EXAMPLESF  =
+EXAMPLESC  = test1.c test2.c test3.c
+EXAMPLESF  = test3f.F
 MANSEC     = <a href="ROOT/docs/manualpages/PEP/PEP.html#PEP">PEP</a>
-TESTS      = test1 test2
+TESTS      = test1 test2 test3 test3f
 
 TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \
-                       test2.PETSc runtest2_1 runtest2_2 test2.rm
+                       test2.PETSc runtest2_1 runtest2_2 runtest2_3 runtest2_4 test2.rm \
+                       test3.PETSc runtest3_1 test3.rm
+TESTEXAMPLES_FORTRAN = test3f.PETSc runtest3f_1 test3f.rm \
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -53,6 +55,14 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o test2 test2.o ${SLEPC_PEP_LIB}
 	${RM} test2.o
 
+<strong><font color="#FF0000">test3:</font></strong> test3.o chkopts
+	-${CLINKER} -o test3 test3.o ${SLEPC_PEP_LIB}
+	${RM} test3.o
+
+<strong><font color="#FF0000">test3f:</font></strong> test3f.o chkopts
+	-${FLINKER} -o test3f test3f.o ${SLEPC_PEP_LIB}
+	${RM} test3f.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 <a href="ROOT/docs/manualpages/PEP/PEP.html#PEP">PEP</a> = toar qarnoldi
 <a href="ROOT/docs/manualpages/EPS/EPS.html#EPS">EPS</a> = krylovschur gd
@@ -67,11 +77,11 @@ TESTCODE = \
 	- at test=test1_1; \
 	<font color="#4169E1">for</font> pep in ${<a href="ROOT/docs/manualpages/PEP/PEP.html#PEP">PEP</a>}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"pep type $$pep"</font>; \
-	   ${MPIEXEC} -np 1 ./test1 -type $$pep -m 11 2>&1; \
+	   ${MPIEXEC} -n 1 ./test1 -type $$pep -m 11 2>&1; \
 	done > $${test}.tmp; \
 	<font color="#4169E1">for</font> eps in ${<a href="ROOT/docs/manualpages/EPS/EPS.html#EPS">EPS</a>}; <font color="#4169E1">do</font> \
 	    echo <font color="#666666">"pep type linear, eps type $$eps"</font>; \
-	    ${MPIEXEC} -np 1 ./test1 -type linear -epstype $$eps -m 11 2>&1; \
+	    ${MPIEXEC} -n 1 ./test1 -type linear -epstype $$eps -m 11 2>&1; \
 	done >> $${test}.tmp; \
 	${TESTCODE}
 
@@ -80,26 +90,60 @@ TESTCODE = \
 	<font color="#4169E1">for</font> pep in ${<a href="ROOT/docs/manualpages/PEP/PEP.html#PEP">PEP</a>}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"pep type $$pep"</font>; \
 	   <font color="#4169E1">if</font> [ $$pep = qarnoldi ]; then EXTRA=<font color="#666666">"-st_transform"</font>; <font color="#4169E1">else</font> EXTRA=<font color="#666666">""</font>; fi; \
-	   ${MPIEXEC} -np 1 ./test2 -pep_type $$pep -pep_nev 4 $$EXTRA 2>&1; \
+	   ${MPIEXEC} -n 1 ./test2 -pep_type $$pep -pep_nev 4 $$EXTRA 2>&1; \
 	done > $${test}.tmp; \
 	<font color="#4169E1">for</font> eps in ${<a href="ROOT/docs/manualpages/EPS/EPS.html#EPS">EPS</a>}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"pep type linear, eps type $$eps"</font>; \
-	   ${MPIEXEC} -np 1 ./test2 -pep_type linear -pep_eps_type $$eps -pep_nev 4 -pep_linear_explicitmatrix 2>&1; \
+	   ${MPIEXEC} -n 1 ./test2 -pep_type linear -pep_linear_eps_type $$eps -pep_nev 4 -pep_linear_explicitmatrix 2>&1; \
 	done >> $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_2:</font></strong>
 	- at test=test2_2; \
 	echo <font color="#666666">"toar with shift-and-invert"</font> > $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 2>&1 >> $${test}.tmp; \
 	echo <font color="#666666">"toar with shift-and-invert (with scale=both)"</font> >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_scale both 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_scale both 2>&1 >> $${test}.tmp; \
 	echo <font color="#666666">"toar with shift-and-invert (transform)"</font> >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type toar -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
 	echo <font color="#666666">"qarnoldi with shift-and-invert (transform)"</font> >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type qarnoldi -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type qarnoldi -st_type sinvert -pep_target -0.4 -pep_nev 4 -st_transform 2>&1 >> $${test}.tmp; \
 	echo <font color="#666666">"linear with shift-and-invert"</font> >> $${test}.tmp; \
-	${MPIEXEC} -np 1 ./test2 -pep_type linear -pep_target -0.4 -pep_nev 4 -st_type sinvert 2>&1 >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_type linear -pep_target -0.4 -pep_nev 4 -st_type sinvert 2>&1 >> $${test}.tmp; \
+	${TESTCODE}
+
+<strong><font color="#FF0000">runtest2_3:</font></strong>
+	- at test=test2_3; \
+	echo <font color="#666666">"no extraction"</font> > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract none 2>&1 >> $${test}.tmp; \
+	echo <font color="#666666">"norm extraction"</font> >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract norm 2>&1 >> $${test}.tmp; \
+	echo <font color="#666666">"residual extraction"</font> >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract residual 2>&1 >> $${test}.tmp; \
+	echo <font color="#666666">"structured extraction"</font> >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -pep_nev 12 -pep_extract structured 2>&1 >> $${test}.tmp; \
+	${TESTCODE}
+
+<strong><font color="#FF0000">runtest2_4:</font></strong>
+	- at test=test2_4; \
+	echo <font color="#666666">"simple refinement schur"</font> > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine simple -pep_refine_scheme schur 2>&1 >> $${test}.tmp; \
+	echo <font color="#666666">"simple refinement mbe"</font> >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine simple -pep_refine_scheme mbe -pep_refine_ksp_type preonly -pep_refine_pc_type lu >> $${test}.tmp; \
+	echo <font color="#666666">"simple refinement explicit"</font> >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine simple -pep_refine_scheme explicit >> $${test}.tmp; \
+	echo <font color="#666666">"multiple refinement"</font> >> $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_type sinvert -pep_target -0.4 -pep_nev 4 -pep_refine multiple 2>&1 >> $${test}.tmp; \
+	${TESTCODE}
+
+<strong><font color="#FF0000">runtest3_1:</font></strong>
+	- at test=test3_1; \
+	${MPIEXEC} -n 1 ./test3 -pep_tol 1e-7 2>&1 > $${test}.tmp; \
+	${TESTCODE}
+
+<strong><font color="#FF0000">runtest3f_1:</font></strong>
+	- at test=test3f_1; \
+	${MPIEXEC} -n 1 ./test3f -pep_tol 1e-7 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 </pre>
diff --git a/src/pep/examples/tests/output/test1_1.out b/src/pep/examples/tests/output/test1_1.out
index efa82e4..c606290 100644
--- a/src/pep/examples/tests/output/test1_1.out
+++ b/src/pep/examples/tests/output/test1_1.out
@@ -8,7 +8,7 @@ PEP type: toar
  Number of requested eigenvalues: 4
  Stopping condition: maxit=100
  All requested eigenvalues computed up to the required tolerance:
-     0.00000+2.80193i, 0.00000-2.80193i, 0.00000+2.76605i, 0.00000-2.76605i
+     -1.16404+1.65363i, -1.16404-1.65363i, -0.51784+1.31039i, -0.51784-1.31039i
 
 pep type qarnoldi
 
@@ -20,7 +20,7 @@ PEP type: qarnoldi
  Number of requested eigenvalues: 4
  Stopping condition: maxit=100
  All requested eigenvalues computed up to the required tolerance:
-     0.00000+2.80193i, 0.00000-2.80193i, 0.00000+2.76605i, 0.00000-2.76605i
+     -1.16404+1.65363i, -1.16404-1.65363i, -0.51784+1.31039i, -0.51784-1.31039i
 
 pep type linear, eps type krylovschur
 
@@ -33,7 +33,7 @@ EPS type: krylovschur
  Number of requested eigenvalues: 4
  Stopping condition: maxit=100
  All requested eigenvalues computed up to the required tolerance:
-     0.00000+2.80193i, 0.00000-2.80193i, 0.00000+2.76605i, 0.00000-2.76605i
+     -1.16404+1.65363i, -1.16404-1.65363i, -0.51784+1.31039i, -0.51784-1.31039i
 
 pep type linear, eps type gd
 
@@ -46,5 +46,5 @@ EPS type: gd
  Number of requested eigenvalues: 4
  Stopping condition: maxit=2000
  All requested eigenvalues computed up to the required tolerance:
-     0.00000+2.80193i, 0.00000-2.80193i, 0.00000+2.76605i, 0.00000-2.76605i
+     -1.16404+1.65363i, -1.16404-1.65363i, -0.51784+1.31039i, -0.51784-1.31039i
 
diff --git a/src/pep/examples/tests/output/test2_3.out b/src/pep/examples/tests/output/test2_3.out
new file mode 100644
index 0000000..c8dcee5
--- /dev/null
+++ b/src/pep/examples/tests/output/test2_3.out
@@ -0,0 +1,36 @@
+no extraction
+ Solution method: toar
+
+ Number of requested eigenvalues: 12
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -49.39227, -49.08545, -48.57759, -47.87388, -46.98155, -45.90976, -44.66950, -43.27349, 
+     -41.73606, -40.07296, -38.30127, -36.43915
+
+norm extraction
+ Solution method: toar
+
+ Number of requested eigenvalues: 12
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -49.39227, -49.08545, -48.57759, -47.87388, -46.98155, -45.90976, -44.66950, -43.27349, 
+     -41.73606, -40.07296, -38.30127, -36.43915
+
+residual extraction
+ Solution method: toar
+
+ Number of requested eigenvalues: 12
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -49.39227, -49.08545, -48.57759, -47.87388, -46.98155, -45.90976, -44.66950, -43.27349, 
+     -41.73606, -40.07296, -38.30127, -36.43915
+
+structured extraction
+ Solution method: toar
+
+ Number of requested eigenvalues: 12
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -49.39227, -49.08545, -48.57759, -47.87388, -46.98155, -45.90976, -44.66950, -43.27349, 
+     -41.73606, -40.07296, -38.30127, -36.43915
+
diff --git a/src/pep/examples/tests/output/test2_4.out b/src/pep/examples/tests/output/test2_4.out
new file mode 100644
index 0000000..07094c9
--- /dev/null
+++ b/src/pep/examples/tests/output/test2_4.out
@@ -0,0 +1,32 @@
+simple refinement schur
+ Solution method: toar
+
+ Number of requested eigenvalues: 4
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -0.50511, -0.50515, -0.50520, -0.50528
+
+simple refinement mbe
+ Solution method: toar
+
+ Number of requested eigenvalues: 4
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -0.50511, -0.50515, -0.50520, -0.50528
+
+simple refinement explicit
+ Solution method: toar
+
+ Number of requested eigenvalues: 4
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -0.50511, -0.50515, -0.50520, -0.50528
+
+multiple refinement
+ Solution method: toar
+
+ Number of requested eigenvalues: 4
+ Stopping condition: maxit=100
+ All requested eigenvalues computed up to the required tolerance:
+     -0.50511, -0.50515, -0.50520, -0.50528
+
diff --git a/src/pep/examples/tests/output/test3_1.out b/src/pep/examples/tests/output/test3_1.out
new file mode 100644
index 0000000..3134453
--- /dev/null
+++ b/src/pep/examples/tests/output/test3_1.out
@@ -0,0 +1,55 @@
+
+Diagonal Quadratic Eigenproblem, n=20
+
+ Polynomial of degree 2
+Mat Object: 1 MPI processes
+  type: seqaij
+row 0: (0, 1.) 
+row 1: (1, 2.) 
+row 2: (2, 3.) 
+row 3: (3, 4.) 
+row 4: (4, 5.) 
+row 5: (5, 6.) 
+row 6: (6, 7.) 
+row 7: (7, 8.) 
+row 8: (8, 9.) 
+row 9: (9, 10.) 
+row 10: (10, 11.) 
+row 11: (11, 12.) 
+row 12: (12, 13.) 
+row 13: (13, 14.) 
+row 14: (14, 15.) 
+row 15: (15, 16.) 
+row 16: (16, 17.) 
+row 17: (17, 18.) 
+row 18: (18, 19.) 
+row 19: (19, 20.) 
+ Type set to toar
+ Problem type before changing = 0 ... changed to 2.
+ Extraction before changing = 0 ... changed to 4
+ Scaling: SCALAR, alpha=0.1, its=5
+ Polynomial basis: CHEBYSHEV1
+ Refinement: SIMPLE, tol=1e-09, its=2, scheme=SCHUR
+ Which = 7, target = 4.8
+ Dimensions: nev=4, ncv=0, mpd=0
+ Tolerance = 0.00022, max_its = 200
+ Convergence test = 0, stopping test = 0
+ST Object: 1 MPI processes
+  type not yet set
+  shift: 0.
+  number of matrices: 0
+  KSP Object:  (st_)   1 MPI processes
+    type not yet set
+    maximum iterations=10000, initial guess is zero
+    tolerances:  relative=1e-08, absolute=1e-50, divergence=10000.
+    left preconditioning
+    using DEFAULT norm type for convergence test
+  PC Object:  (st_)   1 MPI processes
+    type not yet set
+    PC has not been set up so information may be incomplete
+DS Object: 1 MPI processes
+  type not yet set
+ Finished - converged reason = 1, its=17
+ All requested eigenvalues computed up to the required tolerance:
+     0.67682, 0.60795, 0.48824, 0.27016
+
diff --git a/src/pep/examples/tests/output/test3f_1.out b/src/pep/examples/tests/output/test3f_1.out
new file mode 100644
index 0000000..9be07be
--- /dev/null
+++ b/src/pep/examples/tests/output/test3f_1.out
@@ -0,0 +1,56 @@
+
+Diagonal Quadratic Eigenproblem, n = 20 (Fortran)
+ Polynomial of degree  2
+Mat Object: 1 MPI processes
+  type: seqaij
+row 0: (0, 1.) 
+row 1: (1, 2.) 
+row 2: (2, 3.) 
+row 3: (3, 4.) 
+row 4: (4, 5.) 
+row 5: (5, 6.) 
+row 6: (6, 7.) 
+row 7: (7, 8.) 
+row 8: (8, 9.) 
+row 9: (9, 10.) 
+row 10: (10, 11.) 
+row 11: (11, 12.) 
+row 12: (12, 13.) 
+row 13: (13, 14.) 
+row 14: (14, 15.) 
+row 15: (15, 16.) 
+row 16: (16, 17.) 
+row 17: (17, 18.) 
+row 18: (18, 19.) 
+row 19: (19, 20.) 
+ Type set to toar                                                                            
+ Problem type before changing =  0
+ ... changed to  2
+ Extraction before changing =  0
+ ... changed to  4
+ Scaling:  1, alpha=0.1000, its= 5
+ Polynomial basis:  1
+ Refinement:  1, tol=0.0000, its= 2, schem= 1
+ Which =  7, target = 4.8
+ Dimensions: nev= 4, ncv= 0, mpd= 0
+ Tolerance =0.00022, max_its = 200
+ Convergence test = 0, stopping test = 0
+ST Object: 1 MPI processes
+  type not yet set
+  shift: 0.
+  number of matrices: 0
+  KSP Object:  (st_)   1 MPI processes
+    type not yet set
+    maximum iterations=10000, initial guess is zero
+    tolerances:  relative=1e-08, absolute=1e-35, divergence=10000.
+    left preconditioning
+    using DEFAULT norm type for convergence test
+  PC Object:  (st_)   1 MPI processes
+    type not yet set
+    PC has not been set up so information may be incomplete
+DS Object: 1 MPI processes
+  type not yet set
+ Finished - converged reason = 1, its=  17
+ All requested eigenvalues computed up to the required tolerance:
+     0.67682, 0.60795, 0.48824, 0.27016
+
diff --git a/src/pep/examples/tests/test1.c b/src/pep/examples/tests/test1.c
index ebc0f5a..3cdac51 100644
--- a/src/pep/examples/tests/test1.c
+++ b/src/pep/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -46,12 +46,12 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
-  ierr = PetscOptionsGetString(NULL,"-type",peptype,30,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-epstype",epstype,30,&epsgiven);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-type",peptype,30,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-epstype",epstype,30,&epsgiven);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nQuadratic Eigenproblem, N=%D (%Dx%D grid)",N,n,m);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nPEP type: %s",peptype);CHKERRQ(ierr);
   if (epsgiven) {
@@ -68,7 +68,6 @@ int main(int argc,char **argv)
   ierr = MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
   ierr = MatSetFromOptions(K);CHKERRQ(ierr);
   ierr = MatSetUp(K);CHKERRQ(ierr);
-
   ierr = MatGetOwnershipRange(K,&Istart,&Iend);CHKERRQ(ierr);
   for (II=Istart;II<Iend;II++) {
     i = II/n; j = II-i*n;
@@ -78,26 +77,32 @@ int main(int argc,char **argv)
     if (j<n-1) { ierr = MatSetValue(K,II,II+1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
     ierr = MatSetValue(K,II,II,4.0,INSERT_VALUES);CHKERRQ(ierr);
   }
-
   ierr = MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
   ierr = MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
 
-  /* C is the zero matrix */
+  /* C is the 1-D Laplacian on horizontal lines */
   ierr = MatCreate(PETSC_COMM_WORLD,&C);CHKERRQ(ierr);
   ierr = MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
   ierr = MatSetFromOptions(C);CHKERRQ(ierr);
   ierr = MatSetUp(C);CHKERRQ(ierr);
+  ierr = MatGetOwnershipRange(C,&Istart,&Iend);CHKERRQ(ierr);
+  for (II=Istart;II<Iend;II++) {
+    i = II/n; j = II-i*n;
+    if (j>0) { ierr = MatSetValue(C,II,II-1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    if (j<n-1) { ierr = MatSetValue(C,II,II+1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    ierr = MatSetValue(C,II,II,2.0,INSERT_VALUES);CHKERRQ(ierr);
+  }
   ierr = MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
   ierr = MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
 
-  /* M is the identity matrix */
+  /* M is a diagonal matrix */
   ierr = MatCreate(PETSC_COMM_WORLD,&M);CHKERRQ(ierr);
   ierr = MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
   ierr = MatSetFromOptions(M);CHKERRQ(ierr);
   ierr = MatSetUp(M);CHKERRQ(ierr);
   ierr = MatGetOwnershipRange(M,&Istart,&Iend);CHKERRQ(ierr);
-  for (i=Istart;i<Iend;i++) {
-    ierr = MatSetValue(M,i,i,1.0,INSERT_VALUES);CHKERRQ(ierr);
+  for (II=Istart;II<Iend;II++) {
+    ierr = MatSetValue(M,II,II,(PetscReal)(II+1),INSERT_VALUES);CHKERRQ(ierr);
   }
   ierr = MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
   ierr = MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
@@ -106,14 +111,7 @@ int main(int argc,char **argv)
                 Create the eigensolver and set various options
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  /*
-     Create eigensolver context
-  */
   ierr = PEPCreate(PETSC_COMM_WORLD,&pep);CHKERRQ(ierr);
-
-  /*
-     Set matrices and problem type
-  */
   A[0] = K; A[1] = C; A[2] = M;
   ierr = PEPSetOperators(pep,3,A);CHKERRQ(ierr);
   ierr = PEPSetProblemType(pep,PEP_GENERAL);CHKERRQ(ierr);
@@ -175,6 +173,6 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/pep/examples/tests/test1.c.html b/src/pep/examples/tests/test1.c.html
index d774a8e..4acfabb 100644
--- a/src/pep/examples/tests/test1.c.html
+++ b/src/pep/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -55,12 +55,12 @@
 
 <a name="line47"> 47: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line49"> 49: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line50"> 50: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line49"> 49: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line50"> 50: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
 <a name="line51"> 51: </a>  <font color="#4169E1">if</font> (!flag) m=n;
 <a name="line52"> 52: </a>  N = n*m;
-<a name="line53"> 53: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-type"</font>,peptype,30,NULL);
-<a name="line54"> 54: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-epstype"</font>,epstype,30,&epsgiven);
+<a name="line53"> 53: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-type"</font>,peptype,30,NULL);
+<a name="line54"> 54: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-epstype"</font>,epstype,30,&epsgiven);
 <a name="line55"> 55: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nQuadratic Eigenproblem, N=%D (%Dx%D grid)"</font>,N,n,m);
 <a name="line56"> 56: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nPEP type: %s"</font>,peptype);
 <a name="line57"> 57: </a>  <font color="#4169E1">if</font> (epsgiven) {
@@ -77,115 +77,113 @@
 <a name="line68"> 68: </a>  MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N);
 <a name="line69"> 69: </a>  MatSetFromOptions(K);
 <a name="line70"> 70: </a>  MatSetUp(K);
-
-<a name="line72"> 72: </a>  MatGetOwnershipRange(K,&Istart,&Iend);
-<a name="line73"> 73: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
-<a name="line74"> 74: </a>    i = II/n; j = II-i*n;
-<a name="line75"> 75: </a>    <font color="#4169E1">if</font> (i>0) { MatSetValue(K,II,II-n,-1.0,INSERT_VALUES); }
-<a name="line76"> 76: </a>    <font color="#4169E1">if</font> (i<m-1) { MatSetValue(K,II,II+n,-1.0,INSERT_VALUES); }
-<a name="line77"> 77: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(K,II,II-1,-1.0,INSERT_VALUES); }
-<a name="line78"> 78: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(K,II,II+1,-1.0,INSERT_VALUES); }
-<a name="line79"> 79: </a>    MatSetValue(K,II,II,4.0,INSERT_VALUES);
-<a name="line80"> 80: </a>  }
-
-<a name="line82"> 82: </a>  MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY);
-<a name="line83"> 83: </a>  MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY);
-
-<a name="line85"> 85: </a>  <font color="#B22222">/* C is the zero matrix */</font>
-<a name="line86"> 86: </a>  MatCreate(PETSC_COMM_WORLD,&C);
-<a name="line87"> 87: </a>  MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line88"> 88: </a>  MatSetFromOptions(C);
-<a name="line89"> 89: </a>  MatSetUp(C);
-<a name="line90"> 90: </a>  MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);
-<a name="line91"> 91: </a>  MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);
-
-<a name="line93"> 93: </a>  <font color="#B22222">/* M is the identity matrix */</font>
-<a name="line94"> 94: </a>  MatCreate(PETSC_COMM_WORLD,&M);
-<a name="line95"> 95: </a>  MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line96"> 96: </a>  MatSetFromOptions(M);
-<a name="line97"> 97: </a>  MatSetUp(M);
-<a name="line98"> 98: </a>  MatGetOwnershipRange(M,&Istart,&Iend);
-<a name="line99"> 99: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
-<a name="line100">100: </a>    MatSetValue(M,i,i,1.0,INSERT_VALUES);
-<a name="line101">101: </a>  }
-<a name="line102">102: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
-<a name="line103">103: </a>  MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);
-
-<a name="line105">105: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line106">106: </a><font color="#B22222">                Create the eigensolver and set various options</font>
-<a name="line107">107: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line109">109: </a>  <font color="#B22222">/*</font>
-<a name="line110">110: </a><font color="#B22222">     Create eigensolver context</font>
-<a name="line111">111: </a><font color="#B22222">  */</font>
-<a name="line112">112: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
-
-<a name="line114">114: </a>  <font color="#B22222">/*</font>
-<a name="line115">115: </a><font color="#B22222">     Set matrices and problem type</font>
-<a name="line116">116: </a><font color="#B22222">  */</font>
-<a name="line117">117: </a>  A[0] = K; A[1] = C; A[2] = M;
-<a name="line118">118: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
-<a name="line119">119: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL);
-<a name="line120">120: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(pep,4,20,PETSC_DEFAULT);
-<a name="line121">121: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,PETSC_SMALL,PETSC_DEFAULT);
-
-<a name="line123">123: </a>  <font color="#B22222">/*</font>
-<a name="line124">124: </a><font color="#B22222">     Set solver type at runtime</font>
-<a name="line125">125: </a><font color="#B22222">  */</font>
-<a name="line126">126: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,peptype);
-<a name="line127">127: </a>  <font color="#4169E1">if</font> (epsgiven) {
-<a name="line128">128: </a>    PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&flag);
-<a name="line129">129: </a>    <font color="#4169E1">if</font> (flag) {
-<a name="line130">130: </a>      <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&eps);
-<a name="line131">131: </a>      PetscStrcmp(epstype,<font color="#666666">"gd2"</font>,&isgd2);
-<a name="line132">132: </a>      <font color="#4169E1">if</font> (isgd2) {
-<a name="line133">133: </a>        <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSGD);
-<a name="line134">134: </a>        <a href="../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>(eps,PETSC_TRUE);
-<a name="line135">135: </a>      } <font color="#4169E1">else</font> {
-<a name="line136">136: </a>        <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,epstype);
-<a name="line137">137: </a>      }
-<a name="line138">138: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
-<a name="line139">139: </a>      <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&ksp);
-<a name="line140">140: </a>      KSPGetPC(ksp,&pc);
-<a name="line141">141: </a>      PCSetType(pc,PCJACOBI);
-<a name="line142">142: </a>      PetscObjectTypeCompare((PetscObject)eps,EPSGD,&flag);
-<a name="line143">143: </a>    }
-<a name="line144">144: </a>    <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(pep,PETSC_TRUE);
-<a name="line145">145: </a>  }
-<a name="line146">146: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPQARNOLDI,&flag);
-<a name="line147">147: </a>  <font color="#4169E1">if</font> (flag) {
-<a name="line148">148: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&st);
-<a name="line149">149: </a>    <a href="../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>(st,PETSC_TRUE);
-<a name="line150">150: </a>  }
-
-<a name="line152">152: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line153">153: </a><font color="#B22222">                      Solve the eigensystem</font>
-<a name="line154">154: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line156">156: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
-
-<a name="line158">158: </a>  <font color="#B22222">/*</font>
-<a name="line159">159: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line160">160: </a><font color="#B22222">  */</font>
-<a name="line161">161: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
-<a name="line162">162: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
-<a name="line163">163: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
-<a name="line164">164: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-<a name="line165">165: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(pep,NULL,&maxit);
-<a name="line166">166: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: maxit=%D\n"</font>,maxit);
-
-<a name="line168">168: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line169">169: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line170">170: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line172">172: </a>  <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
-<a name="line173">173: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
-<a name="line174">174: </a>  MatDestroy(&M);
-<a name="line175">175: </a>  MatDestroy(&C);
-<a name="line176">176: </a>  MatDestroy(&K);
-<a name="line177">177: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line178">178: </a>  <font color="#4169E1">return</font> 0;
-<a name="line179">179: </a>}
+<a name="line71"> 71: </a>  MatGetOwnershipRange(K,&Istart,&Iend);
+<a name="line72"> 72: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line73"> 73: </a>    i = II/n; j = II-i*n;
+<a name="line74"> 74: </a>    <font color="#4169E1">if</font> (i>0) { MatSetValue(K,II,II-n,-1.0,INSERT_VALUES); }
+<a name="line75"> 75: </a>    <font color="#4169E1">if</font> (i<m-1) { MatSetValue(K,II,II+n,-1.0,INSERT_VALUES); }
+<a name="line76"> 76: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(K,II,II-1,-1.0,INSERT_VALUES); }
+<a name="line77"> 77: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(K,II,II+1,-1.0,INSERT_VALUES); }
+<a name="line78"> 78: </a>    MatSetValue(K,II,II,4.0,INSERT_VALUES);
+<a name="line79"> 79: </a>  }
+<a name="line80"> 80: </a>  MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY);
+<a name="line81"> 81: </a>  MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY);
+
+<a name="line83"> 83: </a>  <font color="#B22222">/* C is the 1-D Laplacian on horizontal lines */</font>
+<a name="line84"> 84: </a>  MatCreate(PETSC_COMM_WORLD,&C);
+<a name="line85"> 85: </a>  MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line86"> 86: </a>  MatSetFromOptions(C);
+<a name="line87"> 87: </a>  MatSetUp(C);
+<a name="line88"> 88: </a>  MatGetOwnershipRange(C,&Istart,&Iend);
+<a name="line89"> 89: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line90"> 90: </a>    i = II/n; j = II-i*n;
+<a name="line91"> 91: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(C,II,II-1,-1.0,INSERT_VALUES); }
+<a name="line92"> 92: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(C,II,II+1,-1.0,INSERT_VALUES); }
+<a name="line93"> 93: </a>    MatSetValue(C,II,II,2.0,INSERT_VALUES);
+<a name="line94"> 94: </a>  }
+<a name="line95"> 95: </a>  MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);
+<a name="line96"> 96: </a>  MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);
+
+<a name="line98"> 98: </a>  <font color="#B22222">/* M is a diagonal matrix */</font>
+<a name="line99"> 99: </a>  MatCreate(PETSC_COMM_WORLD,&M);
+<a name="line100">100: </a>  MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line101">101: </a>  MatSetFromOptions(M);
+<a name="line102">102: </a>  MatSetUp(M);
+<a name="line103">103: </a>  MatGetOwnershipRange(M,&Istart,&Iend);
+<a name="line104">104: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line105">105: </a>    MatSetValue(M,II,II,(PetscReal)(II+1),INSERT_VALUES);
+<a name="line106">106: </a>  }
+<a name="line107">107: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
+<a name="line108">108: </a>  MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);
+
+<a name="line110">110: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line111">111: </a><font color="#B22222">                Create the eigensolver and set various options</font>
+<a name="line112">112: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line114">114: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
+<a name="line115">115: </a>  A[0] = K; A[1] = C; A[2] = M;
+<a name="line116">116: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
+<a name="line117">117: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL);
+<a name="line118">118: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(pep,4,20,PETSC_DEFAULT);
+<a name="line119">119: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,PETSC_SMALL,PETSC_DEFAULT);
+
+<a name="line121">121: </a>  <font color="#B22222">/*</font>
+<a name="line122">122: </a><font color="#B22222">     Set solver type at runtime</font>
+<a name="line123">123: </a><font color="#B22222">  */</font>
+<a name="line124">124: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,peptype);
+<a name="line125">125: </a>  <font color="#4169E1">if</font> (epsgiven) {
+<a name="line126">126: </a>    PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&flag);
+<a name="line127">127: </a>    <font color="#4169E1">if</font> (flag) {
+<a name="line128">128: </a>      <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&eps);
+<a name="line129">129: </a>      PetscStrcmp(epstype,<font color="#666666">"gd2"</font>,&isgd2);
+<a name="line130">130: </a>      <font color="#4169E1">if</font> (isgd2) {
+<a name="line131">131: </a>        <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,EPSGD);
+<a name="line132">132: </a>        <a href="../../../../docs/manualpages/EPS/EPSGDSetDoubleExpansion.html#EPSGDSetDoubleExpansion">EPSGDSetDoubleExpansion</a>(eps,PETSC_TRUE);
+<a name="line133">133: </a>      } <font color="#4169E1">else</font> {
+<a name="line134">134: </a>        <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(eps,epstype);
+<a name="line135">135: </a>      }
+<a name="line136">136: </a>      <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
+<a name="line137">137: </a>      <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&ksp);
+<a name="line138">138: </a>      KSPGetPC(ksp,&pc);
+<a name="line139">139: </a>      PCSetType(pc,PCJACOBI);
+<a name="line140">140: </a>      PetscObjectTypeCompare((PetscObject)eps,EPSGD,&flag);
+<a name="line141">141: </a>    }
+<a name="line142">142: </a>    <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(pep,PETSC_TRUE);
+<a name="line143">143: </a>  }
+<a name="line144">144: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPQARNOLDI,&flag);
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (flag) {
+<a name="line146">146: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&st);
+<a name="line147">147: </a>    <a href="../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>(st,PETSC_TRUE);
+<a name="line148">148: </a>  }
+
+<a name="line150">150: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line151">151: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line152">152: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line154">154: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
+
+<a name="line156">156: </a>  <font color="#B22222">/*</font>
+<a name="line157">157: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line158">158: </a><font color="#B22222">  */</font>
+<a name="line159">159: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
+<a name="line160">160: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
+<a name="line161">161: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
+<a name="line162">162: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+<a name="line163">163: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(pep,NULL,&maxit);
+<a name="line164">164: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: maxit=%D\n"</font>,maxit);
+
+<a name="line166">166: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line167">167: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line168">168: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line170">170: </a>  <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
+<a name="line171">171: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
+<a name="line172">172: </a>  MatDestroy(&M);
+<a name="line173">173: </a>  MatDestroy(&C);
+<a name="line174">174: </a>  MatDestroy(&K);
+<a name="line175">175: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line176">176: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line177">177: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/examples/tests/test2.c b/src/pep/examples/tests/test2.c
index d802fe7..b6de30b 100644
--- a/src/pep/examples/tests/test2.c
+++ b/src/pep/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,7 +34,7 @@ static char help[] = "Test the solution of a PEP from a finite element model of
   "The command line options are:\n"
   "  -n <n>, where <n> = number of grid subdivisions.\n"
   "  -tau <tau>, where <tau> = tau parameter.\n"
-  "  -kappa <kappa>, where <kappa> = kappa paramter.\n\n";
+  "  -kappa <kappa>, where <kappa> = kappa parameter.\n\n";
 
 #include <slepcpep.h>
 
@@ -51,10 +51,10 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-mu",&mu,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-kappa",&kappa,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-mu",&mu,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-kappa",&kappa,NULL);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0
@@ -67,7 +67,7 @@ int main(int argc,char **argv)
   ierr = MatSetUp(K);CHKERRQ(ierr);
 
   ierr = MatGetOwnershipRange(K,&Istart,&Iend);CHKERRQ(ierr);
-  for (i=Istart; i<Iend; i++) {
+  for (i=Istart;i<Iend;i++) {
     if (i>0) {
       ierr = MatSetValue(K,i,i-1,-kappa,INSERT_VALUES);CHKERRQ(ierr);
     }
@@ -87,7 +87,7 @@ int main(int argc,char **argv)
   ierr = MatSetUp(C);CHKERRQ(ierr);
 
   ierr = MatGetOwnershipRange(C,&Istart,&Iend);CHKERRQ(ierr);
-  for (i=Istart; i<Iend; i++) {
+  for (i=Istart;i<Iend;i++) {
     if (i>0) {
       ierr = MatSetValue(C,i,i-1,-tau,INSERT_VALUES);CHKERRQ(ierr);
     }
@@ -106,7 +106,7 @@ int main(int argc,char **argv)
   ierr = MatSetFromOptions(M);CHKERRQ(ierr);
   ierr = MatSetUp(M);CHKERRQ(ierr);
   ierr = MatGetOwnershipRange(M,&Istart,&Iend);CHKERRQ(ierr);
-  for (i=Istart; i<Iend; i++) {
+  for (i=Istart;i<Iend;i++) {
     ierr = MatSetValue(M,i,i,mu,INSERT_VALUES);CHKERRQ(ierr);
   }
   ierr = MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
@@ -116,14 +116,7 @@ int main(int argc,char **argv)
                 Create the eigensolver and set various options
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  /*
-     Create eigensolver context
-  */
   ierr = PEPCreate(PETSC_COMM_WORLD,&pep);CHKERRQ(ierr);
-
-  /*
-     Set matrices, the problem type and other settings
-  */
   A[0] = K; A[1] = C; A[2] = M;
   ierr = PEPSetOperators(pep,3,A);CHKERRQ(ierr);
   ierr = PEPSetProblemType(pep,PEP_GENERAL);CHKERRQ(ierr);
@@ -156,5 +149,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/pep/examples/tests/test2.c.html b/src/pep/examples/tests/test2.c.html
index a6820cf..4826a72 100644
--- a/src/pep/examples/tests/test2.c.html
+++ b/src/pep/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line34"> 34: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line35"> 35: </a>  <font color="#666666">"  -n <n>, where <n> = number of grid subdivisions.\n"</font>
 <a name="line36"> 36: </a>  <font color="#666666">"  -tau <tau>, where <tau> = tau parameter.\n"</font>
-<a name="line37"> 37: </a>  <font color="#666666">"  -kappa <kappa>, where <kappa> = kappa paramter.\n\n"</font>;
+<a name="line37"> 37: </a>  <font color="#666666">"  -kappa <kappa>, where <kappa> = kappa parameter.\n\n"</font>;
 
 <a name="line39"> 39: </a><font color="#A020F0">#include <slepcpep.h></font>
 
@@ -60,10 +60,10 @@
 
 <a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line55"> 55: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-mu"</font>,&mu,NULL);
-<a name="line56"> 56: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
-<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-kappa"</font>,&kappa,NULL);
+<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line55"> 55: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-mu"</font>,&mu,NULL);
+<a name="line56"> 56: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line57"> 57: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-kappa"</font>,&kappa,NULL);
 
 <a name="line59"> 59: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line60"> 60: </a><font color="#B22222">     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0</font>
@@ -76,7 +76,7 @@
 <a name="line67"> 67: </a>  MatSetUp(K);
 
 <a name="line69"> 69: </a>  MatGetOwnershipRange(K,&Istart,&Iend);
-<a name="line70"> 70: </a>  <font color="#4169E1">for</font> (i=Istart; i<Iend; i++) {
+<a name="line70"> 70: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
 <a name="line71"> 71: </a>    <font color="#4169E1">if</font> (i>0) {
 <a name="line72"> 72: </a>      MatSetValue(K,i,i-1,-kappa,INSERT_VALUES);
 <a name="line73"> 73: </a>    }
@@ -96,7 +96,7 @@
 <a name="line87"> 87: </a>  MatSetUp(C);
 
 <a name="line89"> 89: </a>  MatGetOwnershipRange(C,&Istart,&Iend);
-<a name="line90"> 90: </a>  <font color="#4169E1">for</font> (i=Istart; i<Iend; i++) {
+<a name="line90"> 90: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
 <a name="line91"> 91: </a>    <font color="#4169E1">if</font> (i>0) {
 <a name="line92"> 92: </a>      MatSetValue(C,i,i-1,-tau,INSERT_VALUES);
 <a name="line93"> 93: </a>    }
@@ -115,7 +115,7 @@
 <a name="line106">106: </a>  MatSetFromOptions(M);
 <a name="line107">107: </a>  MatSetUp(M);
 <a name="line108">108: </a>  MatGetOwnershipRange(M,&Istart,&Iend);
-<a name="line109">109: </a>  <font color="#4169E1">for</font> (i=Istart; i<Iend; i++) {
+<a name="line109">109: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
 <a name="line110">110: </a>    MatSetValue(M,i,i,mu,INSERT_VALUES);
 <a name="line111">111: </a>  }
 <a name="line112">112: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
@@ -125,48 +125,41 @@
 <a name="line116">116: </a><font color="#B22222">                Create the eigensolver and set various options</font>
 <a name="line117">117: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
-<a name="line119">119: </a>  <font color="#B22222">/*</font>
-<a name="line120">120: </a><font color="#B22222">     Create eigensolver context</font>
-<a name="line121">121: </a><font color="#B22222">  */</font>
-<a name="line122">122: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
-
-<a name="line124">124: </a>  <font color="#B22222">/*</font>
-<a name="line125">125: </a><font color="#B22222">     Set matrices, the problem type and other settings</font>
-<a name="line126">126: </a><font color="#B22222">  */</font>
-<a name="line127">127: </a>  A[0] = K; A[1] = C; A[2] = M;
-<a name="line128">128: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
-<a name="line129">129: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL);
-<a name="line130">130: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,PETSC_SMALL,PETSC_DEFAULT);
-<a name="line131">131: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep);
-
-<a name="line133">133: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line134">134: </a><font color="#B22222">                      Solve the eigensystem</font>
-<a name="line135">135: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line137">137: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
-
-<a name="line139">139: </a>  <font color="#B22222">/*</font>
-<a name="line140">140: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line141">141: </a><font color="#B22222">  */</font>
-<a name="line142">142: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
-<a name="line143">143: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
-<a name="line144">144: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
-<a name="line145">145: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-<a name="line146">146: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(pep,NULL,&maxit);
-<a name="line147">147: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: maxit=%D\n"</font>,maxit);
-
-<a name="line149">149: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line150">150: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line151">151: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line153">153: </a>  <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
-<a name="line154">154: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
-<a name="line155">155: </a>  MatDestroy(&M);
-<a name="line156">156: </a>  MatDestroy(&C);
-<a name="line157">157: </a>  MatDestroy(&K);
-<a name="line158">158: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line159">159: </a>  <font color="#4169E1">return</font> 0;
-<a name="line160">160: </a>}
+<a name="line119">119: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
+<a name="line120">120: </a>  A[0] = K; A[1] = C; A[2] = M;
+<a name="line121">121: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
+<a name="line122">122: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL);
+<a name="line123">123: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,PETSC_SMALL,PETSC_DEFAULT);
+<a name="line124">124: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep);
+
+<a name="line126">126: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line127">127: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line128">128: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line130">130: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
+
+<a name="line132">132: </a>  <font color="#B22222">/*</font>
+<a name="line133">133: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line134">134: </a><font color="#B22222">  */</font>
+<a name="line135">135: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
+<a name="line136">136: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
+<a name="line137">137: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
+<a name="line138">138: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+<a name="line139">139: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(pep,NULL,&maxit);
+<a name="line140">140: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Stopping condition: maxit=%D\n"</font>,maxit);
+
+<a name="line142">142: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line143">143: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line144">144: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line146">146: </a>  <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
+<a name="line147">147: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
+<a name="line148">148: </a>  MatDestroy(&M);
+<a name="line149">149: </a>  MatDestroy(&C);
+<a name="line150">150: </a>  MatDestroy(&K);
+<a name="line151">151: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line152">152: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line153">153: </a>}
 </pre>
 </body>
 
diff --git a/src/pep/examples/tests/test3.c b/src/pep/examples/tests/test3.c
new file mode 100644
index 0000000..5e9efad
--- /dev/null
+++ b/src/pep/examples/tests/test3.c
@@ -0,0 +1,173 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Test PEP interface functions.\n\n";
+
+#include <slepcpep.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  Mat                A[3],B;      /* problem matrices */
+  PEP                pep;         /* eigenproblem solver context */
+  ST                 st;
+  KSP                ksp;
+  DS                 ds;
+  PetscReal          tol,alpha;
+  PetscScalar        target;
+  PetscInt           n=20,i,its,nev,ncv,mpd,Istart,Iend,nmat;
+  PEPWhich           which;
+  PEPConvergedReason reason;
+  PEPType            type;
+  PEPExtract         extr;
+  PEPBasis           basis;
+  PEPScale           scale;
+  PEPRefine          refine;
+  PEPRefineScheme    rscheme;
+  PEPConv            conv;
+  PEPStop            stop;
+  PEPProblemType     ptype;
+  PetscErrorCode     ierr;
+  PetscViewerAndFormat *vf;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nDiagonal Quadratic Eigenproblem, n=%D\n\n",n);CHKERRQ(ierr);
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&A[0]);CHKERRQ(ierr);
+  ierr = MatSetSizes(A[0],PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(A[0]);CHKERRQ(ierr);
+  ierr = MatSetUp(A[0]);CHKERRQ(ierr);
+  ierr = MatGetOwnershipRange(A[0],&Istart,&Iend);CHKERRQ(ierr);
+  for (i=Istart;i<Iend;i++) {
+    ierr = MatSetValue(A[0],i,i,i+1,INSERT_VALUES);CHKERRQ(ierr);
+  }
+  ierr = MatAssemblyBegin(A[0],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(A[0],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&A[1]);CHKERRQ(ierr);
+  ierr = MatSetSizes(A[1],PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(A[1]);CHKERRQ(ierr);
+  ierr = MatSetUp(A[1]);CHKERRQ(ierr);
+  ierr = MatGetOwnershipRange(A[1],&Istart,&Iend);CHKERRQ(ierr);
+  for (i=Istart;i<Iend;i++) {
+    ierr = MatSetValue(A[1],i,i,1.0,INSERT_VALUES);CHKERRQ(ierr);
+  }
+  ierr = MatAssemblyBegin(A[1],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(A[1],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+
+  ierr = MatCreate(PETSC_COMM_WORLD,&A[2]);CHKERRQ(ierr);
+  ierr = MatSetSizes(A[2],PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(A[2]);CHKERRQ(ierr);
+  ierr = MatSetUp(A[2]);CHKERRQ(ierr);
+  ierr = MatGetOwnershipRange(A[1],&Istart,&Iend);CHKERRQ(ierr);
+  for (i=Istart;i<Iend;i++) {
+    ierr = MatSetValue(A[2],i,i,n/(PetscReal)(i+1),INSERT_VALUES);CHKERRQ(ierr);
+  }
+  ierr = MatAssemblyBegin(A[2],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+  ierr = MatAssemblyEnd(A[2],MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+             Create eigensolver and test interface functions
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  ierr = PEPCreate(PETSC_COMM_WORLD,&pep);CHKERRQ(ierr);
+  ierr = PEPSetOperators(pep,3,A);CHKERRQ(ierr);
+  ierr = PEPGetNumMatrices(pep,&nmat);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Polynomial of degree %d\n",(int)nmat-1);CHKERRQ(ierr);
+  ierr = PEPGetOperators(pep,0,&B);CHKERRQ(ierr);
+  ierr = MatView(B,NULL);CHKERRQ(ierr);
+
+  ierr = PEPSetType(pep,PEPTOAR);CHKERRQ(ierr);
+  ierr = PEPGetType(pep,&type);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Type set to %s\n",type);CHKERRQ(ierr);
+
+  ierr = PEPGetProblemType(pep,&ptype);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Problem type before changing = %d",(int)ptype);CHKERRQ(ierr);
+  ierr = PEPSetProblemType(pep,PEP_HERMITIAN);CHKERRQ(ierr);
+  ierr = PEPGetProblemType(pep,&ptype);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," ... changed to %d.",(int)ptype);CHKERRQ(ierr);
+
+  ierr = PEPGetExtract(pep,&extr);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\n Extraction before changing = %d",(int)extr);CHKERRQ(ierr);
+  ierr = PEPSetExtract(pep,PEP_EXTRACT_STRUCTURED);CHKERRQ(ierr);
+  ierr = PEPGetExtract(pep,&extr);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," ... changed to %d\n",(int)extr);CHKERRQ(ierr);
+
+  ierr = PEPSetScale(pep,PEP_SCALE_SCALAR,.1,NULL,NULL,5,1.0);CHKERRQ(ierr);
+  ierr = PEPGetScale(pep,&scale,&alpha,NULL,NULL,&its,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Scaling: %s, alpha=%g, its=%D\n",PEPScaleTypes[scale],(double)alpha,its);CHKERRQ(ierr);
+
+  ierr = PEPSetBasis(pep,PEP_BASIS_CHEBYSHEV1);CHKERRQ(ierr);
+  ierr = PEPGetBasis(pep,&basis);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Polynomial basis: %s\n",PEPBasisTypes[basis]);CHKERRQ(ierr);
+
+  ierr = PEPSetRefine(pep,PEP_REFINE_SIMPLE,1,1e-9,2,PEP_REFINE_SCHEME_SCHUR);CHKERRQ(ierr);
+  ierr = PEPGetRefine(pep,&refine,NULL,&tol,&its,&rscheme);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Refinement: %s, tol=%g, its=%D, scheme=%s\n",PEPRefineTypes[refine],(double)tol,its,PEPRefineSchemes[rscheme]);CHKERRQ(ierr);
+
+  ierr = PEPSetTarget(pep,4.8);CHKERRQ(ierr);
+  ierr = PEPGetTarget(pep,&target);CHKERRQ(ierr);
+  ierr = PEPSetWhichEigenpairs(pep,PEP_TARGET_MAGNITUDE);CHKERRQ(ierr);
+  ierr = PEPGetWhichEigenpairs(pep,&which);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Which = %d, target = %g\n",(int)which,(double)PetscRealPart(target));CHKERRQ(ierr);
+
+  ierr = PEPSetDimensions(pep,4,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
+  ierr = PEPGetDimensions(pep,&nev,&ncv,&mpd);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Dimensions: nev=%D, ncv=%D, mpd=%D\n",nev,ncv,mpd);CHKERRQ(ierr);
+
+  ierr = PEPSetTolerances(pep,2.2e-4,200);CHKERRQ(ierr);
+  ierr = PEPGetTolerances(pep,&tol,&its);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Tolerance = %.5f, max_its = %D\n",(double)tol,its);CHKERRQ(ierr);
+
+  ierr = PEPSetConvergenceTest(pep,PEP_CONV_ABS);CHKERRQ(ierr);
+  ierr = PEPGetConvergenceTest(pep,&conv);CHKERRQ(ierr);
+  ierr = PEPSetStoppingTest(pep,PEP_STOP_BASIC);CHKERRQ(ierr);
+  ierr = PEPGetStoppingTest(pep,&stop);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Convergence test = %d, stopping test = %d\n",(int)conv,(int)stop);CHKERRQ(ierr);
+
+  ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
+  ierr = PEPMonitorSet(pep,(PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))PEPMonitorFirst,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
+  ierr = PEPMonitorCancel(pep);CHKERRQ(ierr);
+
+  ierr = PEPGetST(pep,&st);CHKERRQ(ierr);
+  ierr = STGetKSP(st,&ksp);CHKERRQ(ierr);
+  ierr = KSPSetTolerances(ksp,1e-8,1e-50,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
+  ierr = STView(st,NULL);CHKERRQ(ierr);
+  ierr = PEPGetDS(pep,&ds);CHKERRQ(ierr);
+  ierr = DSView(ds,NULL);CHKERRQ(ierr);
+
+  ierr = PEPSetFromOptions(pep);CHKERRQ(ierr);
+  ierr = PEPSolve(pep);CHKERRQ(ierr);
+  ierr = PEPGetConvergedReason(pep,&reason);CHKERRQ(ierr);
+  ierr = PEPGetIterationNumber(pep,&its);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Finished - converged reason = %d, its=%D\n",(int)reason,its);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                    Display solution and clean up
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+  ierr = PEPErrorView(pep,PEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
+  ierr = PEPDestroy(&pep);CHKERRQ(ierr);
+  ierr = MatDestroy(&A[0]);CHKERRQ(ierr);
+  ierr = MatDestroy(&A[1]);CHKERRQ(ierr);
+  ierr = MatDestroy(&A[2]);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
diff --git a/src/pep/examples/tests/test3.c.html b/src/pep/examples/tests/test3.c.html
new file mode 100644
index 0000000..a2e4655
--- /dev/null
+++ b/src/pep/examples/tests/test3.c.html
@@ -0,0 +1,187 @@
+<center><a href="test3.c">Actual source code: test3.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tests/test3.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:07+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Test <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> interface functions.\n\n"</font>;
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepcpep.h></font>
+
+<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line29"> 29: </a>{
+<a name="line30"> 30: </a>  Mat                A[3],B;      <font color="#B22222">/* problem matrices */</font>
+<a name="line31"> 31: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>                pep;         <font color="#B22222">/* eigenproblem solver context */</font>
+<a name="line32"> 32: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>                 st;
+<a name="line33"> 33: </a>  KSP                ksp;
+<a name="line34"> 34: </a>  <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a>                 ds;
+<a name="line35"> 35: </a>  PetscReal          tol,alpha;
+<a name="line36"> 36: </a>  PetscScalar        target;
+<a name="line37"> 37: </a>  PetscInt           n=20,i,its,nev,ncv,mpd,Istart,Iend,nmat;
+<a name="line38"> 38: </a>  <a href="../../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>           which;
+<a name="line39"> 39: </a>  <a href="../../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> reason;
+<a name="line40"> 40: </a>  <a href="../../../../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>            type;
+<a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>         extr;
+<a name="line42"> 42: </a>  <a href="../../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>           basis;
+<a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>           scale;
+<a name="line44"> 44: </a>  <a href="../../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>          refine;
+<a name="line45"> 45: </a>  <a href="../../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>    rscheme;
+<a name="line46"> 46: </a>  <a href="../../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>            conv;
+<a name="line47"> 47: </a>  <a href="../../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>            stop;
+<a name="line48"> 48: </a>  <a href="../../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>     ptype;
+<a name="line49"> 49: </a>  PetscErrorCode     ierr;
+<a name="line50"> 50: </a>  PetscViewerAndFormat *vf;
+
+<a name="line52"> 52: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line53"> 53: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nDiagonal Quadratic Eigenproblem, n=%D\n\n"</font>,n);
+
+<a name="line55"> 55: </a>  MatCreate(PETSC_COMM_WORLD,&A[0]);
+<a name="line56"> 56: </a>  MatSetSizes(A[0],PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line57"> 57: </a>  MatSetFromOptions(A[0]);
+<a name="line58"> 58: </a>  MatSetUp(A[0]);
+<a name="line59"> 59: </a>  MatGetOwnershipRange(A[0],&Istart,&Iend);
+<a name="line60"> 60: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line61"> 61: </a>    MatSetValue(A[0],i,i,i+1,INSERT_VALUES);
+<a name="line62"> 62: </a>  }
+<a name="line63"> 63: </a>  MatAssemblyBegin(A[0],MAT_FINAL_ASSEMBLY);
+<a name="line64"> 64: </a>  MatAssemblyEnd(A[0],MAT_FINAL_ASSEMBLY);
+
+<a name="line66"> 66: </a>  MatCreate(PETSC_COMM_WORLD,&A[1]);
+<a name="line67"> 67: </a>  MatSetSizes(A[1],PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line68"> 68: </a>  MatSetFromOptions(A[1]);
+<a name="line69"> 69: </a>  MatSetUp(A[1]);
+<a name="line70"> 70: </a>  MatGetOwnershipRange(A[1],&Istart,&Iend);
+<a name="line71"> 71: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line72"> 72: </a>    MatSetValue(A[1],i,i,1.0,INSERT_VALUES);
+<a name="line73"> 73: </a>  }
+<a name="line74"> 74: </a>  MatAssemblyBegin(A[1],MAT_FINAL_ASSEMBLY);
+<a name="line75"> 75: </a>  MatAssemblyEnd(A[1],MAT_FINAL_ASSEMBLY);
+
+<a name="line77"> 77: </a>  MatCreate(PETSC_COMM_WORLD,&A[2]);
+<a name="line78"> 78: </a>  MatSetSizes(A[2],PETSC_DECIDE,PETSC_DECIDE,n,n);
+<a name="line79"> 79: </a>  MatSetFromOptions(A[2]);
+<a name="line80"> 80: </a>  MatSetUp(A[2]);
+<a name="line81"> 81: </a>  MatGetOwnershipRange(A[1],&Istart,&Iend);
+<a name="line82"> 82: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line83"> 83: </a>    MatSetValue(A[2],i,i,n/(PetscReal)(i+1),INSERT_VALUES);
+<a name="line84"> 84: </a>  }
+<a name="line85"> 85: </a>  MatAssemblyBegin(A[2],MAT_FINAL_ASSEMBLY);
+<a name="line86"> 86: </a>  MatAssemblyEnd(A[2],MAT_FINAL_ASSEMBLY);
+
+<a name="line88"> 88: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line89"> 89: </a><font color="#B22222">             Create eigensolver and test interface functions</font>
+<a name="line90"> 90: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line91"> 91: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
+<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
+<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(pep,&nmat);
+<a name="line94"> 94: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Polynomial of degree %d\n"</font>,(int)nmat-1);
+<a name="line95"> 95: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(pep,0,&B);
+<a name="line96"> 96: </a>  MatView(B,NULL);
+
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,PEPTOAR);
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
+<a name="line100">100: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Type set to %s\n"</font>,type);
+
+<a name="line102">102: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(pep,&ptype);
+<a name="line103">103: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Problem type before changing = %d"</font>,(int)ptype);
+<a name="line104">104: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_HERMITIAN);
+<a name="line105">105: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(pep,&ptype);
+<a name="line106">106: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" ... changed to %d."</font>,(int)ptype);
+
+<a name="line108">108: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(pep,&extr);
+<a name="line109">109: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n Extraction before changing = %d"</font>,(int)extr);
+<a name="line110">110: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>(pep,PEP_EXTRACT_STRUCTURED);
+<a name="line111">111: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(pep,&extr);
+<a name="line112">112: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" ... changed to %d\n"</font>,(int)extr);
+
+<a name="line114">114: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(pep,PEP_SCALE_SCALAR,.1,NULL,NULL,5,1.0);
+<a name="line115">115: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>(pep,&scale,&alpha,NULL,NULL,&its,NULL);
+<a name="line116">116: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Scaling: %s, alpha=%g, its=%D\n"</font>,PEPScaleTypes[scale],(double)alpha,its);
+
+<a name="line118">118: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(pep,PEP_BASIS_CHEBYSHEV1);
+<a name="line119">119: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(pep,&basis);
+<a name="line120">120: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Polynomial basis: %s\n"</font>,PEPBasisTypes[basis]);
+
+<a name="line122">122: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(pep,PEP_REFINE_SIMPLE,1,1e-9,2,PEP_REFINE_SCHEME_SCHUR);
+<a name="line123">123: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>(pep,&refine,NULL,&tol,&its,&rscheme);
+<a name="line124">124: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Refinement: %s, tol=%g, its=%D, scheme=%s\n"</font>,PEPRefineTypes[refine],(double)tol,its,PEPRefineSchemes[rscheme]);
+
+<a name="line126">126: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(pep,4.8);
+<a name="line127">127: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(pep,&target);
+<a name="line128">128: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_MAGNITUDE);
+<a name="line129">129: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(pep,&which);
+<a name="line130">130: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Which = %d, target = %g\n"</font>,(int)which,(double)PetscRealPart(target));
+
+<a name="line132">132: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(pep,4,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line133">133: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,&ncv,&mpd);
+<a name="line134">134: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Dimensions: nev=%D, ncv=%D, mpd=%D\n"</font>,nev,ncv,mpd);
+
+<a name="line136">136: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,2.2e-4,200);
+<a name="line137">137: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(pep,&tol,&its);
+<a name="line138">138: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Tolerance = %.5f, max_its = %D\n"</font>,(double)tol,its);
+
+<a name="line140">140: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_ABS);
+<a name="line141">141: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(pep,&conv);
+<a name="line142">142: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(pep,PEP_STOP_BASIC);
+<a name="line143">143: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</a>(pep,&stop);
+<a name="line144">144: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Convergence test = %d, stopping test = %d\n"</font>,(int)conv,(int)stop);
+
+<a name="line146">146: </a>  PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);
+<a name="line147">147: </a>  <a href="../../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,(PetscErrorCode (*)(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))<a href="../../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line148">148: </a>  <a href="../../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(pep);
+
+<a name="line150">150: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&st);
+<a name="line151">151: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&ksp);
+<a name="line152">152: </a>  KSPSetTolerances(ksp,1e-8,1e-50,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line153">153: </a>  <a href="../../../../docs/manualpages/ST/STView.html#STView">STView</a>(st,NULL);
+<a name="line154">154: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&ds);
+<a name="line155">155: </a>  <a href="../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,NULL);
+
+<a name="line157">157: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep);
+<a name="line158">158: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
+<a name="line159">159: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(pep,&reason);
+<a name="line160">160: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>(pep,&its);
+<a name="line161">161: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Finished - converged reason = %d, its=%D\n"</font>,(int)reason,its);
+
+<a name="line163">163: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line164">164: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line165">165: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+<a name="line166">166: </a>  <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_RELATIVE,NULL);
+<a name="line167">167: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
+<a name="line168">168: </a>  MatDestroy(&A[0]);
+<a name="line169">169: </a>  MatDestroy(&A[1]);
+<a name="line170">170: </a>  MatDestroy(&A[2]);
+<a name="line171">171: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line172">172: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line173">173: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/pep/examples/tests/test3f.F b/src/pep/examples/tests/test3f.F
new file mode 100644
index 0000000..2e79086
--- /dev/null
+++ b/src/pep/examples/tests/test3f.F
@@ -0,0 +1,266 @@
+!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+!  SLEPc - Scalable Library for Eigenvalue Problem Computations
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+!
+!  This file is part of SLEPc.
+!     
+!  SLEPc is free software: you can redistribute it and/or modify it under  the
+!  terms of version 3 of the GNU Lesser General Public License as published by
+!  the Free Software Foundation.
+!
+!  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY 
+!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS 
+!  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for 
+!  more details.
+!
+!  You  should have received a copy of the GNU Lesser General  Public  License
+!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+!
+!  Description: Simple example to test the PEP Fortran interface.
+!
+! ---------------------------------------------------------------------- 
+!
+      program main
+      implicit none
+
+#include <petsc/finclude/petscsys.h>
+#include <petsc/finclude/petscvec.h>
+#include <petsc/finclude/petscmat.h>
+#include <petsc/finclude/petscviewer.h>
+#include <slepc/finclude/slepcsys.h>
+#include <slepc/finclude/slepcpep.h>
+
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+!     Declarations
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+      Mat                A(3),B
+      PEP                pep
+      ST                 st
+      KSP                ksp
+      DS                 ds
+      PetscReal          tol,tolabs,alpha,lambda
+      PetscScalar        tget,val
+      PetscInt           n,i,its,Istart,Iend
+      PetscInt           nev,ncv,mpd,nmat,np
+      PEPWhich           which
+      PEPConvergedReason reason
+      PEPType            tname
+      PEPExtract         extr
+      PEPBasis           basis
+      PEPScale           scal
+      PEPRefine          refine
+      PEPRefineScheme    rscheme
+      PEPConv            conv
+      PEPStop            stp
+      PEPProblemType     ptype
+      PetscMPIInt        rank
+      PetscErrorCode     ierr
+      SlepcConvMonitor   ctx
+      PetscViewerAndFormat vf
+
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+!     Beginning of program
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+      call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
+      call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
+      n = 20
+      if (rank .eq. 0) then
+        write(*,100) n
+      endif
+ 100  format (/'Diagonal Quadratic Eigenproblem, n =',I3,' (Fortran)')
+
+      call MatCreate(PETSC_COMM_WORLD,A(1),ierr)
+      call MatSetSizes(A(1),PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+      call MatSetFromOptions(A(1),ierr)
+      call MatSetUp(A(1),ierr)
+      call MatGetOwnershipRange(A(1),Istart,Iend,ierr)
+      do i=Istart,Iend-1
+        val = i+1.
+        call MatSetValue(A(1),i,i,val,INSERT_VALUES,ierr)
+      enddo
+      call MatAssemblyBegin(A(1),MAT_FINAL_ASSEMBLY,ierr)
+      call MatAssemblyEnd(A(1),MAT_FINAL_ASSEMBLY,ierr)
+
+      call MatCreate(PETSC_COMM_WORLD,A(2),ierr)
+      call MatSetSizes(A(2),PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+      call MatSetFromOptions(A(2),ierr)
+      call MatSetUp(A(2),ierr)
+      call MatGetOwnershipRange(A(2),Istart,Iend,ierr)
+      do i=Istart,Iend-1
+        val = 1
+        call MatSetValue(A(2),i,i,val,INSERT_VALUES,ierr)
+      enddo
+      call MatAssemblyBegin(A(2),MAT_FINAL_ASSEMBLY,ierr)
+      call MatAssemblyEnd(A(2),MAT_FINAL_ASSEMBLY,ierr)
+
+      call MatCreate(PETSC_COMM_WORLD,A(3),ierr)
+      call MatSetSizes(A(3),PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+      call MatSetFromOptions(A(3),ierr)
+      call MatSetUp(A(3),ierr)
+      call MatGetOwnershipRange(A(3),Istart,Iend,ierr)
+      do i=Istart,Iend-1
+        val = n/(i+1.)
+        call MatSetValue(A(3),i,i,val,INSERT_VALUES,ierr)
+      enddo
+      call MatAssemblyBegin(A(3),MAT_FINAL_ASSEMBLY,ierr)
+      call MatAssemblyEnd(A(3),MAT_FINAL_ASSEMBLY,ierr)
+
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+!     Create eigensolver and test interface functions
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+      call PEPCreate(PETSC_COMM_WORLD,pep,ierr)
+      nmat = 3
+      call PEPSetOperators(pep,nmat,A,ierr)
+      call PEPGetNumMatrices(pep,nmat,ierr)
+      if (rank .eq. 0) then
+        write(*,110) nmat-1
+      endif
+ 110  format (' Polynomial of degree ',I2)
+      i = 0
+      call PEPGetOperators(pep,i,B,ierr)
+      call MatView(B,PETSC_NULL_OBJECT,ierr)
+
+      call PEPSetType(pep,PEPTOAR,ierr)
+      call PEPGetType(pep,tname,ierr)
+      if (rank .eq. 0) then
+        write(*,120) tname
+      endif
+ 120  format (' Type set to ',A)
+
+      call PEPGetProblemType(pep,ptype,ierr)
+      if (rank .eq. 0) then
+        write(*,130) ptype
+      endif
+ 130  format (' Problem type before changing = ',I2)
+      call PEPSetProblemType(pep,PEP_HERMITIAN,ierr)
+      call PEPGetProblemType(pep,ptype,ierr)
+      if (rank .eq. 0) then
+        write(*,140) ptype
+      endif
+ 140  format (' ... changed to ',I2)
+
+      call PEPGetExtract(pep,extr,ierr)
+      if (rank .eq. 0) then
+        write(*,150) extr
+      endif
+ 150  format (' Extraction before changing = ',I2)
+      call PEPSetExtract(pep,PEP_EXTRACT_STRUCTURED,ierr)
+      call PEPGetExtract(pep,extr,ierr)
+      if (rank .eq. 0) then
+        write(*,160) extr
+      endif
+ 160  format (' ... changed to ',I2)
+
+      alpha = .1
+      its = 5
+      lambda = 1.
+      scal = PEP_SCALE_SCALAR
+      call PEPSetScale(pep,scal,alpha,PETSC_NULL_OBJECT,                &
+     &                 PETSC_NULL_OBJECT,its,lambda,ierr)
+      call PEPGetScale(pep,scal,alpha,PETSC_NULL_OBJECT,                &
+     &                 PETSC_NULL_OBJECT,its,lambda,ierr)
+      if (rank .eq. 0) then
+        write(*,170) scal,alpha,its
+      endif
+ 170  format (' Scaling: ',I2,', alpha=',F6.4,', its=',I2)
+
+      basis = PEP_BASIS_CHEBYSHEV1
+      call PEPSetBasis(pep,basis,ierr)
+      call PEPGetBasis(pep,basis,ierr)
+      if (rank .eq. 0) then
+        write(*,180) basis
+      endif
+ 180  format (' Polynomial basis: ',I2)
+ 
+      np = 1
+      tol = 1e-9
+      its = 2
+      refine = PEP_REFINE_SIMPLE
+      rscheme = PEP_REFINE_SCHEME_SCHUR
+      call PEPSetRefine(pep,refine,np,tol,its,rscheme,ierr)
+      call PEPGetRefine(pep,refine,np,tol,its,rscheme,ierr)
+      if (rank .eq. 0) then
+        write(*,190) refine,tol,its,rscheme
+      endif
+ 190  format (' Refinement: ',I2,', tol=',F6.4,', its=',I2', schem=',I2)
+
+      tget = 4.8
+      call PEPSetTarget(pep,tget,ierr)
+      call PEPGetTarget(pep,tget,ierr)
+      call PEPSetWhichEigenpairs(pep,PEP_TARGET_MAGNITUDE,ierr)
+      call PEPGetWhichEigenpairs(pep,which,ierr)
+      if (rank .eq. 0) then
+        write(*,200) which,PetscRealPart(tget)
+      endif
+ 200  format (' Which = ',I2,', target = ',F3.1)
+
+      nev = 4
+      call PEPSetDimensions(pep,nev,PETSC_DEFAULT_INTEGER,              &
+     &                      PETSC_DEFAULT_INTEGER,ierr)
+      call PEPGetDimensions(pep,nev,ncv,mpd,ierr)
+      if (rank .eq. 0) then
+        write(*,210) nev,ncv,mpd
+      endif
+ 210  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)
+
+      tol = 2.2e-4
+      its = 200
+      call PEPSetTolerances(pep,tol,its,ierr)
+      call PEPGetTolerances(pep,tol,its,ierr)
+      if (rank .eq. 0) then
+        write(*,220) tol,its
+      endif
+ 220  format (' Tolerance =',F7.5,', max_its =',I4)
+
+      call PEPSetConvergenceTest(pep,PEP_CONV_ABS,ierr)
+      call PEPGetConvergenceTest(pep,conv,ierr)
+      call PEPSetStoppingTest(pep,PEP_STOP_BASIC,ierr)
+      call PEPGetStoppingTest(pep,stp,ierr)
+      if (rank .eq. 0) then
+        write(*,230) conv,stp
+      endif
+ 230  format (' Convergence test =',I2,', stopping test =',I2)
+
+      call PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,        &
+     &                   PETSC_VIEWER_DEFAULT,vf,ierr)
+      call PEPMonitorSet(pep,PEPMONITORFIRST,vf,                        &
+     &                   PetscViewerAndFormatDestroy,ierr)
+      call SlepcConvMonitorCreate(PETSC_VIEWER_STDOUT_WORLD,            &
+     &                   PETSC_VIEWER_DEFAULT,ctx,ierr)
+      call PEPMonitorSet(pep,PEPMONITORCONVERGED,ctx,                   &
+     &                   SlepcConvMonitorDestroy,ierr)
+      call PEPMonitorCancel(pep,ierr)
+
+      call PEPGetST(pep,st,ierr) 
+      call STGetKSP(st,ksp,ierr) 
+      tol = 1.e-8
+      tolabs = 1.e-35
+      call KSPSetTolerances(ksp,tol,tolabs,PETSC_DEFAULT_REAL,          &
+     &                      PETSC_DEFAULT_INTEGER,ierr)
+      call STView(st,PETSC_NULL_OBJECT,ierr) 
+      call PEPGetDS(pep,ds,ierr) 
+      call DSView(ds,PETSC_NULL_OBJECT,ierr) 
+
+      call PEPSetFromOptions(pep,ierr)
+      call PEPSolve(pep,ierr) 
+      call PEPGetConvergedReason(pep,reason,ierr)
+      call PEPGetIterationNumber(pep,its,ierr)
+      if (rank .eq. 0) then
+        write(*,240) reason,its
+      endif
+ 240  format (' Finished - converged reason =',I2,', its=',I4)
+
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+!     Display solution and clean up
+! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+      call PEPErrorView(pep,PEP_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+      call PEPDestroy(pep,ierr)
+      call MatDestroy(A(1),ierr)
+      call MatDestroy(A(2),ierr)
+      call MatDestroy(A(3),ierr)
+
+      call SlepcFinalize(ierr)
+      end
diff --git a/src/pep/examples/tests/test3f.F.html b/src/pep/examples/tests/test3f.F.html
new file mode 100644
index 0000000..f38b275
--- /dev/null
+++ b/src/pep/examples/tests/test3f.F.html
@@ -0,0 +1,282 @@
+<center><a href="test3f.F">Actual source code: test3f.F</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tests/test3f.F.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:08+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tests/test3f.F.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+<a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+<a name="line4">  4: </a>!
+<a name="line5">  5: </a>!  This file is part of SLEPc.
+<a name="line6">  6: </a>!     
+<a name="line7">  7: </a>!  SLEPc is free software: you can redistribute it and/or modify it under  the
+<a name="line8">  8: </a>!  terms of version 3 of the GNU Lesser General Public License as published by
+<a name="line9">  9: </a>!  the Free Software Foundation.
+<a name="line10"> 10: </a>!
+<a name="line11"> 11: </a>!  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY 
+<a name="line12"> 12: </a>!  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS 
+<a name="line13"> 13: </a>!  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  <font color="#4169E1">for</font> 
+<a name="line14"> 14: </a>!  more details.
+<a name="line15"> 15: </a>!
+<a name="line16"> 16: </a>!  You  should have received a copy of the GNU Lesser General  Public  License
+<a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+<a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+<a name="line19"> 19: </a>!
+<a name="line20"> 20: </a>!  Description: Simple example to test the <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Fortran interface.
+<a name="line21"> 21: </a>!
+<a name="line22"> 22: </a>! ---------------------------------------------------------------------- 
+<a name="line23"> 23: </a>!
+<a name="line24"> 24: </a>      program main
+<a name="line25"> 25: </a>      implicit none
+
+<a name="line27"> 27: </a><font color="#A020F0">#include <petsc/finclude/petscsys.h></font>
+<a name="line28"> 28: </a><font color="#A020F0">#include <petsc/finclude/petscvec.h></font>
+<a name="line29"> 29: </a><font color="#A020F0">#include <petsc/finclude/petscmat.h></font>
+<a name="line30"> 30: </a><font color="#A020F0">#include <petsc/finclude/petscviewer.h></font>
+<a name="line31"> 31: </a><font color="#A020F0">#include <slepc/finclude/slepcsys.h></font>
+<a name="line32"> 32: </a><font color="#A020F0">#include <slepc/finclude/slepcpep.h></font>
+
+<a name="line34"> 34: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line35"> 35: </a>!     Declarations
+<a name="line36"> 36: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line37"> 37: </a>      Mat                A(3),B
+<a name="line38"> 38: </a>      <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>                pep
+<a name="line39"> 39: </a>      <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>                 st
+<a name="line40"> 40: </a>      KSP                ksp
+<a name="line41"> 41: </a>      <a href="../../../../docs/manualpages/DS/DS.html#DS">DS</a>                 ds
+<a name="line42"> 42: </a>      PetscReal          tol,tolabs,alpha,lambda
+<a name="line43"> 43: </a>      PetscScalar        tget,val
+<a name="line44"> 44: </a>      PetscInt           n,i,its,Istart,Iend
+<a name="line45"> 45: </a>      PetscInt           nev,ncv,mpd,nmat,np
+<a name="line46"> 46: </a>      <a href="../../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>           which
+<a name="line47"> 47: </a>      <a href="../../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> reason
+<a name="line48"> 48: </a>      <a href="../../../../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>            tname
+<a name="line49"> 49: </a>      <a href="../../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>         extr
+<a name="line50"> 50: </a>      <a href="../../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>           basis
+<a name="line51"> 51: </a>      <a href="../../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>           scal
+<a name="line52"> 52: </a>      <a href="../../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>          refine
+<a name="line53"> 53: </a>      <a href="../../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>    rscheme
+<a name="line54"> 54: </a>      <a href="../../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a>            conv
+<a name="line55"> 55: </a>      <a href="../../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a>            stp
+<a name="line56"> 56: </a>      <a href="../../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>     ptype
+<a name="line57"> 57: </a>      PetscMPIInt        rank
+<a name="line58"> 58: </a>      PetscErrorCode     ierr
+<a name="line59"> 59: </a>      SlepcConvMonitor   ctx
+<a name="line60"> 60: </a>      PetscViewerAndFormat vf
+
+<a name="line62"> 62: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+<a name="line63"> 63: </a>!     Beginning of program
+<a name="line64"> 64: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line66"> 66: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
+<a name="line67"> 67: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
+<a name="line68"> 68: </a>      n = 20
+<a name="line69"> 69: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line70"> 70: </a>        write(*,100) n
+<a name="line71"> 71: </a>      endif
+<a name="line72"> 72: </a> 100  format (/'Diagonal Quadratic Eigenproblem, n =',I3,' (Fortran)')
+
+<a name="line74"> 74: </a>      call MatCreate(PETSC_COMM_WORLD,A(1),ierr)
+<a name="line75"> 75: </a>      call MatSetSizes(A(1),PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line76"> 76: </a>      call MatSetFromOptions(A(1),ierr)
+<a name="line77"> 77: </a>      call MatSetUp(A(1),ierr)
+<a name="line78"> 78: </a>      call MatGetOwnershipRange(A(1),Istart,Iend,ierr)
+<a name="line79"> 79: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line80"> 80: </a>        val = i+1.
+<a name="line81"> 81: </a>        call MatSetValue(A(1),i,i,val,INSERT_VALUES,ierr)
+<a name="line82"> 82: </a>      enddo
+<a name="line83"> 83: </a>      call MatAssemblyBegin(A(1),MAT_FINAL_ASSEMBLY,ierr)
+<a name="line84"> 84: </a>      call MatAssemblyEnd(A(1),MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line86"> 86: </a>      call MatCreate(PETSC_COMM_WORLD,A(2),ierr)
+<a name="line87"> 87: </a>      call MatSetSizes(A(2),PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line88"> 88: </a>      call MatSetFromOptions(A(2),ierr)
+<a name="line89"> 89: </a>      call MatSetUp(A(2),ierr)
+<a name="line90"> 90: </a>      call MatGetOwnershipRange(A(2),Istart,Iend,ierr)
+<a name="line91"> 91: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line92"> 92: </a>        val = 1
+<a name="line93"> 93: </a>        call MatSetValue(A(2),i,i,val,INSERT_VALUES,ierr)
+<a name="line94"> 94: </a>      enddo
+<a name="line95"> 95: </a>      call MatAssemblyBegin(A(2),MAT_FINAL_ASSEMBLY,ierr)
+<a name="line96"> 96: </a>      call MatAssemblyEnd(A(2),MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line98"> 98: </a>      call MatCreate(PETSC_COMM_WORLD,A(3),ierr)
+<a name="line99"> 99: </a>      call MatSetSizes(A(3),PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
+<a name="line100">100: </a>      call MatSetFromOptions(A(3),ierr)
+<a name="line101">101: </a>      call MatSetUp(A(3),ierr)
+<a name="line102">102: </a>      call MatGetOwnershipRange(A(3),Istart,Iend,ierr)
+<a name="line103">103: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line104">104: </a>        val = n/(i+1.)
+<a name="line105">105: </a>        call MatSetValue(A(3),i,i,val,INSERT_VALUES,ierr)
+<a name="line106">106: </a>      enddo
+<a name="line107">107: </a>      call MatAssemblyBegin(A(3),MAT_FINAL_ASSEMBLY,ierr)
+<a name="line108">108: </a>      call MatAssemblyEnd(A(3),MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line110">110: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line111">111: </a>!     Create eigensolver and test interface functions
+<a name="line112">112: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line114">114: </a>      call <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,pep,ierr)
+<a name="line115">115: </a>      nmat = 3
+<a name="line116">116: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,nmat,A,ierr)
+<a name="line117">117: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(pep,nmat,ierr)
+<a name="line118">118: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line119">119: </a>        write(*,110) nmat-1
+<a name="line120">120: </a>      endif
+<a name="line121">121: </a> 110  format (' Polynomial of degree ',I2)
+<a name="line122">122: </a>      i = 0
+<a name="line123">123: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(pep,i,B,ierr)
+<a name="line124">124: </a>      call MatView(B,PETSC_NULL_OBJECT,ierr)
+
+<a name="line126">126: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,PEPTOAR,ierr)
+<a name="line127">127: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,tname,ierr)
+<a name="line128">128: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line129">129: </a>        write(*,120) tname
+<a name="line130">130: </a>      endif
+<a name="line131">131: </a> 120  format (' Type set to ',A)
+
+<a name="line133">133: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(pep,ptype,ierr)
+<a name="line134">134: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line135">135: </a>        write(*,130) ptype
+<a name="line136">136: </a>      endif
+<a name="line137">137: </a> 130  format (' Problem type before changing = ',I2)
+<a name="line138">138: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_HERMITIAN,ierr)
+<a name="line139">139: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(pep,ptype,ierr)
+<a name="line140">140: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line141">141: </a>        write(*,140) ptype
+<a name="line142">142: </a>      endif
+<a name="line143">143: </a> 140  format (' ... changed to ',I2)
+
+<a name="line145">145: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(pep,extr,ierr)
+<a name="line146">146: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line147">147: </a>        write(*,150) extr
+<a name="line148">148: </a>      endif
+<a name="line149">149: </a> 150  format (' Extraction before changing = ',I2)
+<a name="line150">150: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>(pep,PEP_EXTRACT_STRUCTURED,ierr)
+<a name="line151">151: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(pep,extr,ierr)
+<a name="line152">152: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line153">153: </a>        write(*,160) extr
+<a name="line154">154: </a>      endif
+<a name="line155">155: </a> 160  format (' ... changed to ',I2)
+
+<a name="line157">157: </a>      alpha = .1
+<a name="line158">158: </a>      its = 5
+<a name="line159">159: </a>      lambda = 1.
+<a name="line160">160: </a>      scal = PEP_SCALE_SCALAR
+<a name="line161">161: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(pep,scal,alpha,PETSC_NULL_OBJECT,                &
+<a name="line162">162: </a>     &                 PETSC_NULL_OBJECT,its,lambda,ierr)
+<a name="line163">163: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>(pep,scal,alpha,PETSC_NULL_OBJECT,                &
+<a name="line164">164: </a>     &                 PETSC_NULL_OBJECT,its,lambda,ierr)
+<a name="line165">165: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line166">166: </a>        write(*,170) scal,alpha,its
+<a name="line167">167: </a>      endif
+<a name="line168">168: </a> 170  format (' Scaling: ',I2,', alpha=',F6.4,', its=',I2)
+
+<a name="line170">170: </a>      basis = PEP_BASIS_CHEBYSHEV1
+<a name="line171">171: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(pep,basis,ierr)
+<a name="line172">172: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(pep,basis,ierr)
+<a name="line173">173: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line174">174: </a>        write(*,180) basis
+<a name="line175">175: </a>      endif
+<a name="line176">176: </a> 180  format (' Polynomial basis: ',I2)
+<a name="line177">177: </a> 
+<a name="line178">178: </a>      np = 1
+<a name="line179">179: </a>      tol = 1e-9
+<a name="line180">180: </a>      its = 2
+<a name="line181">181: </a>      refine = PEP_REFINE_SIMPLE
+<a name="line182">182: </a>      rscheme = PEP_REFINE_SCHEME_SCHUR
+<a name="line183">183: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(pep,refine,np,tol,its,rscheme,ierr)
+<a name="line184">184: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>(pep,refine,np,tol,its,rscheme,ierr)
+<a name="line185">185: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line186">186: </a>        write(*,190) refine,tol,its,rscheme
+<a name="line187">187: </a>      endif
+<a name="line188">188: </a> 190  format (' Refinement: ',I2,', tol=',F6.4,', its=',I2', schem=',I2)
+
+<a name="line190">190: </a>      tget = 4.8
+<a name="line191">191: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(pep,tget,ierr)
+<a name="line192">192: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(pep,tget,ierr)
+<a name="line193">193: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_MAGNITUDE,ierr)
+<a name="line194">194: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(pep,which,ierr)
+<a name="line195">195: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line196">196: </a>        write(*,200) which,PetscRealPart(tget)
+<a name="line197">197: </a>      endif
+<a name="line198">198: </a> 200  format (' Which = ',I2,', target = ',F3.1)
+
+<a name="line200">200: </a>      nev = 4
+<a name="line201">201: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(pep,nev,PETSC_DEFAULT_INTEGER,              &
+<a name="line202">202: </a>     &                      PETSC_DEFAULT_INTEGER,ierr)
+<a name="line203">203: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,nev,ncv,mpd,ierr)
+<a name="line204">204: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line205">205: </a>        write(*,210) nev,ncv,mpd
+<a name="line206">206: </a>      endif
+<a name="line207">207: </a> 210  format (' Dimensions: nev=',I2,', ncv=',I2,', mpd=',I2)
+
+<a name="line209">209: </a>      tol = 2.2e-4
+<a name="line210">210: </a>      its = 200
+<a name="line211">211: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,tol,its,ierr)
+<a name="line212">212: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(pep,tol,its,ierr)
+<a name="line213">213: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line214">214: </a>        write(*,220) tol,its
+<a name="line215">215: </a>      endif
+<a name="line216">216: </a> 220  format (' Tolerance =',F7.5,', max_its =',I4)
+
+<a name="line218">218: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_ABS,ierr)
+<a name="line219">219: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(pep,conv,ierr)
+<a name="line220">220: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(pep,PEP_STOP_BASIC,ierr)
+<a name="line221">221: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</a>(pep,stp,ierr)
+<a name="line222">222: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line223">223: </a>        write(*,230) conv,stp
+<a name="line224">224: </a>      endif
+<a name="line225">225: </a> 230  format (' Convergence test =',I2,', stopping test =',I2)
+
+<a name="line227">227: </a>      call PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,        &
+<a name="line228">228: </a>     &                   PETSC_VIEWER_DEFAULT,vf,ierr)
+<a name="line229">229: </a>      call <a href="../../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,PEPMONITORFIRST,vf,                        &
+<a name="line230">230: </a>     &                   PetscViewerAndFormatDestroy,ierr)
+<a name="line231">231: </a>      call <a href="../../../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(PETSC_VIEWER_STDOUT_WORLD,            &
+<a name="line232">232: </a>     &                   PETSC_VIEWER_DEFAULT,ctx,ierr)
+<a name="line233">233: </a>      call <a href="../../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,PEPMONITORCONVERGED,ctx,                   &
+<a name="line234">234: </a>     &                   <a href="../../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>,ierr)
+<a name="line235">235: </a>      call <a href="../../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(pep,ierr)
+
+<a name="line237">237: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,st,ierr) 
+<a name="line238">238: </a>      call <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,ksp,ierr) 
+<a name="line239">239: </a>      tol = 1.e-8
+<a name="line240">240: </a>      tolabs = 1.e-35
+<a name="line241">241: </a>      call KSPSetTolerances(ksp,tol,tolabs,PETSC_DEFAULT_REAL,          &
+<a name="line242">242: </a>     &                      PETSC_DEFAULT_INTEGER,ierr)
+<a name="line243">243: </a>      call <a href="../../../../docs/manualpages/ST/STView.html#STView">STView</a>(st,PETSC_NULL_OBJECT,ierr) 
+<a name="line244">244: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,ds,ierr) 
+<a name="line245">245: </a>      call <a href="../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,PETSC_NULL_OBJECT,ierr) 
+
+<a name="line247">247: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep,ierr)
+<a name="line248">248: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep,ierr) 
+<a name="line249">249: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(pep,reason,ierr)
+<a name="line250">250: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>(pep,its,ierr)
+<a name="line251">251: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line252">252: </a>        write(*,240) reason,its
+<a name="line253">253: </a>      endif
+<a name="line254">254: </a> 240  format (' Finished - converged reason =',I2,', its=',I4)
+
+<a name="line256">256: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line257">257: </a>!     Display solution and clean up
+<a name="line258">258: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line259">259: </a>      call <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_RELATIVE,PETSC_NULL_OBJECT,ierr)
+<a name="line260">260: </a>      call <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(pep,ierr)
+<a name="line261">261: </a>      call MatDestroy(A(1),ierr)
+<a name="line262">262: </a>      call MatDestroy(A(2),ierr)
+<a name="line263">263: </a>      call MatDestroy(A(3),ierr)
+
+<a name="line265">265: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line266">266: </a>      end
+</pre>
+</body>
+
+</html>
diff --git a/src/pep/examples/tutorials/ex16.c b/src/pep/examples/tutorials/ex16.c
index 812a65d..5aef9e5 100644
--- a/src/pep/examples/tutorials/ex16.c
+++ b/src/pep/examples/tutorials/ex16.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -19,7 +19,7 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 */
 
-static char help[] = "Quadratic eigenproblem for testing the PEP object.\n\n"
+static char help[] = "Simple quadratic eigenvalue problem.\n\n"
   "The command line options are:\n"
   "  -n <n>, where <n> = number of grid subdivisions in x dimension.\n"
   "  -m <m>, where <m> = number of grid subdivisions in y dimension.\n\n";
@@ -33,14 +33,17 @@ int main(int argc,char **argv)
   Mat            M,C,K,A[3];      /* problem matrices */
   PEP            pep;             /* polynomial eigenproblem solver context */
   PEPType        type;
-  PetscInt       N,n=10,m,Istart,Iend,II,nev,i,j;
+  PetscInt       N,n=10,m,Istart,Iend,II,nev,i,j,nconv;
   PetscBool      flag,terse;
+  PetscReal      error,re,im;
+  PetscScalar    kr,ki;
+  Vec            xr,xi;
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,&flag);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,&flag);CHKERRQ(ierr);
   if (!flag) m=n;
   N = n*m;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nQuadratic Eigenproblem, N=%D (%Dx%D grid)\n\n",N,n,m);CHKERRQ(ierr);
@@ -54,7 +57,6 @@ int main(int argc,char **argv)
   ierr = MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
   ierr = MatSetFromOptions(K);CHKERRQ(ierr);
   ierr = MatSetUp(K);CHKERRQ(ierr);
-
   ierr = MatGetOwnershipRange(K,&Istart,&Iend);CHKERRQ(ierr);
   for (II=Istart;II<Iend;II++) {
     i = II/n; j = II-i*n;
@@ -64,26 +66,32 @@ int main(int argc,char **argv)
     if (j<n-1) { ierr = MatSetValue(K,II,II+1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
     ierr = MatSetValue(K,II,II,4.0,INSERT_VALUES);CHKERRQ(ierr);
   }
-
   ierr = MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
   ierr = MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
 
-  /* C is the zero matrix */
+  /* C is the 1-D Laplacian on horizontal lines */
   ierr = MatCreate(PETSC_COMM_WORLD,&C);CHKERRQ(ierr);
   ierr = MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
   ierr = MatSetFromOptions(C);CHKERRQ(ierr);
   ierr = MatSetUp(C);CHKERRQ(ierr);
+  ierr = MatGetOwnershipRange(C,&Istart,&Iend);CHKERRQ(ierr);
+  for (II=Istart;II<Iend;II++) {
+    i = II/n; j = II-i*n;
+    if (j>0) { ierr = MatSetValue(C,II,II-1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    if (j<n-1) { ierr = MatSetValue(C,II,II+1,-1.0,INSERT_VALUES);CHKERRQ(ierr); }
+    ierr = MatSetValue(C,II,II,2.0,INSERT_VALUES);CHKERRQ(ierr);
+  }
   ierr = MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
   ierr = MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
 
-  /* M is the identity matrix */
+  /* M is a diagonal matrix */
   ierr = MatCreate(PETSC_COMM_WORLD,&M);CHKERRQ(ierr);
   ierr = MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N);CHKERRQ(ierr);
   ierr = MatSetFromOptions(M);CHKERRQ(ierr);
   ierr = MatSetUp(M);CHKERRQ(ierr);
   ierr = MatGetOwnershipRange(M,&Istart,&Iend);CHKERRQ(ierr);
-  for (i=Istart;i<Iend;i++) {
-    ierr = MatSetValue(M,i,i,1.0,INSERT_VALUES);CHKERRQ(ierr);
+  for (II=Istart;II<Iend;II++) {
+    ierr = MatSetValue(M,II,II,(PetscReal)(II+1),INSERT_VALUES);CHKERRQ(ierr);
   }
   ierr = MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
   ierr = MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
@@ -128,20 +136,45 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
-    ierr = PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);CHKERRQ(ierr);
-    ierr = PEPReasonView(pep,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
-    ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
-    ierr = PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = PEPGetConverged(pep,&nconv);CHKERRQ(ierr);
+    if (nconv>0) {
+      ierr = MatCreateVecs(M,&xr,&xi);CHKERRQ(ierr);
+      /* display eigenvalues and relative errors */
+      ierr = PetscPrintf(PETSC_COMM_WORLD,
+           "\n           k          ||P(k)x||/||kx||\n"
+           "   ----------------- ------------------\n");CHKERRQ(ierr);
+      for (i=0;i<nconv;i++) {
+        /* get converged eigenpairs */
+        ierr = PEPGetEigenpair(pep,i,&kr,&ki,xr,xi);CHKERRQ(ierr);
+        /* compute the relative error associated to each eigenpair */
+        ierr = PEPComputeError(pep,i,PEP_ERROR_RELATIVE,&error);CHKERRQ(ierr);
+#if defined(PETSC_USE_COMPLEX)
+        re = PetscRealPart(kr);
+        im = PetscImaginaryPart(kr);
+#else
+        re = kr;
+        im = ki;
+#endif
+        if (im!=0.0) {
+          ierr = PetscPrintf(PETSC_COMM_WORLD," %9f%+9fi   %12g\n",(double)re,(double)im,(double)error);CHKERRQ(ierr);
+        } else {
+          ierr = PetscPrintf(PETSC_COMM_WORLD,"   %12f       %12g\n",(double)re,(double)error);CHKERRQ(ierr);
+        }
+      }
+      ierr = PetscPrintf(PETSC_COMM_WORLD,"\n");CHKERRQ(ierr);
+      ierr = VecDestroy(&xr);CHKERRQ(ierr);
+      ierr = VecDestroy(&xi);CHKERRQ(ierr);
+    }
   }
   ierr = PEPDestroy(&pep);CHKERRQ(ierr);
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = MatDestroy(&C);CHKERRQ(ierr);
   ierr = MatDestroy(&K);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/pep/examples/tutorials/ex16.c.html b/src/pep/examples/tutorials/ex16.c.html
index 76e5e7a..b2005a0 100644
--- a/src/pep/examples/tutorials/ex16.c.html
+++ b/src/pep/examples/tutorials/ex16.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tutorials/ex16.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tutorials/ex16.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tutorials/ex16.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -31,7 +31,7 @@
 <a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line20"> 20: </a><font color="#B22222">*/</font>
 
-<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Quadratic eigenproblem for testing the <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.\n\n"</font>
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Simple quadratic eigenvalue problem.\n\n"</font>
 <a name="line23"> 23: </a>  <font color="#666666">"The command line options are:\n"</font>
 <a name="line24"> 24: </a>  <font color="#666666">"  -n <n>, where <n> = number of grid subdivisions in x dimension.\n"</font>
 <a name="line25"> 25: </a>  <font color="#666666">"  -m <m>, where <m> = number of grid subdivisions in y dimension.\n\n"</font>;
@@ -43,116 +43,149 @@
 <a name="line33"> 33: </a>  Mat            M,C,K,A[3];      <font color="#B22222">/* problem matrices */</font>
 <a name="line34"> 34: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>            pep;             <font color="#B22222">/* polynomial eigenproblem solver context */</font>
 <a name="line35"> 35: </a>  <a href="../../../../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>        type;
-<a name="line36"> 36: </a>  PetscInt       N,n=10,m,Istart,Iend,II,nev,i,j;
+<a name="line36"> 36: </a>  PetscInt       N,n=10,m,Istart,Iend,II,nev,i,j,nconv;
 <a name="line37"> 37: </a>  PetscBool      flag,terse;
-
-<a name="line40"> 40: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,&flag);
-<a name="line44"> 44: </a>  <font color="#4169E1">if</font> (!flag) m=n;
-<a name="line45"> 45: </a>  N = n*m;
-<a name="line46"> 46: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nQuadratic Eigenproblem, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
-
-<a name="line48"> 48: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line49"> 49: </a><font color="#B22222">     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0</font>
-<a name="line50"> 50: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line52"> 52: </a>  <font color="#B22222">/* K is the 2-D Laplacian */</font>
-<a name="line53"> 53: </a>  MatCreate(PETSC_COMM_WORLD,&K);
-<a name="line54"> 54: </a>  MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line55"> 55: </a>  MatSetFromOptions(K);
-<a name="line56"> 56: </a>  MatSetUp(K);
-
-<a name="line58"> 58: </a>  MatGetOwnershipRange(K,&Istart,&Iend);
-<a name="line59"> 59: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
-<a name="line60"> 60: </a>    i = II/n; j = II-i*n;
-<a name="line61"> 61: </a>    <font color="#4169E1">if</font> (i>0) { MatSetValue(K,II,II-n,-1.0,INSERT_VALUES); }
-<a name="line62"> 62: </a>    <font color="#4169E1">if</font> (i<m-1) { MatSetValue(K,II,II+n,-1.0,INSERT_VALUES); }
-<a name="line63"> 63: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(K,II,II-1,-1.0,INSERT_VALUES); }
-<a name="line64"> 64: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(K,II,II+1,-1.0,INSERT_VALUES); }
-<a name="line65"> 65: </a>    MatSetValue(K,II,II,4.0,INSERT_VALUES);
-<a name="line66"> 66: </a>  }
-
-<a name="line68"> 68: </a>  MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY);
-<a name="line69"> 69: </a>  MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY);
-
-<a name="line71"> 71: </a>  <font color="#B22222">/* C is the zero matrix */</font>
-<a name="line72"> 72: </a>  MatCreate(PETSC_COMM_WORLD,&C);
-<a name="line73"> 73: </a>  MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line74"> 74: </a>  MatSetFromOptions(C);
-<a name="line75"> 75: </a>  MatSetUp(C);
-<a name="line76"> 76: </a>  MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);
-<a name="line77"> 77: </a>  MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);
-
-<a name="line79"> 79: </a>  <font color="#B22222">/* M is the identity matrix */</font>
-<a name="line80"> 80: </a>  MatCreate(PETSC_COMM_WORLD,&M);
-<a name="line81"> 81: </a>  MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N);
-<a name="line82"> 82: </a>  MatSetFromOptions(M);
-<a name="line83"> 83: </a>  MatSetUp(M);
-<a name="line84"> 84: </a>  MatGetOwnershipRange(M,&Istart,&Iend);
-<a name="line85"> 85: </a>  <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
-<a name="line86"> 86: </a>    MatSetValue(M,i,i,1.0,INSERT_VALUES);
-<a name="line87"> 87: </a>  }
-<a name="line88"> 88: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
-<a name="line89"> 89: </a>  MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);
-
-<a name="line91"> 91: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line92"> 92: </a><font color="#B22222">                Create the eigensolver and set various options</font>
-<a name="line93"> 93: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line95"> 95: </a>  <font color="#B22222">/*</font>
-<a name="line96"> 96: </a><font color="#B22222">     Create eigensolver context</font>
-<a name="line97"> 97: </a><font color="#B22222">  */</font>
-<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
-
-<a name="line100">100: </a>  <font color="#B22222">/*</font>
-<a name="line101">101: </a><font color="#B22222">     Set matrices and problem type</font>
-<a name="line102">102: </a><font color="#B22222">  */</font>
-<a name="line103">103: </a>  A[0] = K; A[1] = C; A[2] = M;
-<a name="line104">104: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
-<a name="line105">105: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_HERMITIAN);
-
-<a name="line107">107: </a>  <font color="#B22222">/*</font>
-<a name="line108">108: </a><font color="#B22222">     Set solver parameters at runtime</font>
-<a name="line109">109: </a><font color="#B22222">  */</font>
-<a name="line110">110: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep);
-
-<a name="line112">112: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line113">113: </a><font color="#B22222">                      Solve the eigensystem</font>
-<a name="line114">114: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line116">116: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
-
-<a name="line118">118: </a>  <font color="#B22222">/*</font>
-<a name="line119">119: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
-<a name="line120">120: </a><font color="#B22222">  */</font>
-<a name="line121">121: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
-<a name="line122">122: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
-<a name="line123">123: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
-<a name="line124">124: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
-
-<a name="line126">126: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line127">127: </a><font color="#B22222">                    Display solution and clean up</font>
-<a name="line128">128: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
-
-<a name="line130">130: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line131">131: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
-<a name="line132">132: </a>  <font color="#4169E1">if</font> (terse) {
-<a name="line133">133: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
-<a name="line134">134: </a>  } <font color="#4169E1">else</font> {
-<a name="line135">135: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
-<a name="line136">136: </a>    <a href="../../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(pep,PETSC_VIEWER_STDOUT_WORLD);
-<a name="line137">137: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,PETSC_VIEWER_STDOUT_WORLD);
-<a name="line138">138: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
-<a name="line139">139: </a>  }
-<a name="line140">140: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
-<a name="line141">141: </a>  MatDestroy(&M);
-<a name="line142">142: </a>  MatDestroy(&C);
-<a name="line143">143: </a>  MatDestroy(&K);
-<a name="line144">144: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line145">145: </a>  <font color="#4169E1">return</font> 0;
-<a name="line146">146: </a>}
+<a name="line38"> 38: </a>  PetscReal      error,re,im;
+<a name="line39"> 39: </a>  PetscScalar    kr,ki;
+<a name="line40"> 40: </a>  Vec            xr,xi;
+
+<a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line46"> 46: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,&flag);
+<a name="line47"> 47: </a>  <font color="#4169E1">if</font> (!flag) m=n;
+<a name="line48"> 48: </a>  N = n*m;
+<a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nQuadratic Eigenproblem, N=%D (%Dx%D grid)\n\n"</font>,N,n,m);
+
+<a name="line51"> 51: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line52"> 52: </a><font color="#B22222">     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0</font>
+<a name="line53"> 53: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line55"> 55: </a>  <font color="#B22222">/* K is the 2-D Laplacian */</font>
+<a name="line56"> 56: </a>  MatCreate(PETSC_COMM_WORLD,&K);
+<a name="line57"> 57: </a>  MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line58"> 58: </a>  MatSetFromOptions(K);
+<a name="line59"> 59: </a>  MatSetUp(K);
+<a name="line60"> 60: </a>  MatGetOwnershipRange(K,&Istart,&Iend);
+<a name="line61"> 61: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line62"> 62: </a>    i = II/n; j = II-i*n;
+<a name="line63"> 63: </a>    <font color="#4169E1">if</font> (i>0) { MatSetValue(K,II,II-n,-1.0,INSERT_VALUES); }
+<a name="line64"> 64: </a>    <font color="#4169E1">if</font> (i<m-1) { MatSetValue(K,II,II+n,-1.0,INSERT_VALUES); }
+<a name="line65"> 65: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(K,II,II-1,-1.0,INSERT_VALUES); }
+<a name="line66"> 66: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(K,II,II+1,-1.0,INSERT_VALUES); }
+<a name="line67"> 67: </a>    MatSetValue(K,II,II,4.0,INSERT_VALUES);
+<a name="line68"> 68: </a>  }
+<a name="line69"> 69: </a>  MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY);
+<a name="line70"> 70: </a>  MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY);
+
+<a name="line72"> 72: </a>  <font color="#B22222">/* C is the 1-D Laplacian on horizontal lines */</font>
+<a name="line73"> 73: </a>  MatCreate(PETSC_COMM_WORLD,&C);
+<a name="line74"> 74: </a>  MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line75"> 75: </a>  MatSetFromOptions(C);
+<a name="line76"> 76: </a>  MatSetUp(C);
+<a name="line77"> 77: </a>  MatGetOwnershipRange(C,&Istart,&Iend);
+<a name="line78"> 78: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line79"> 79: </a>    i = II/n; j = II-i*n;
+<a name="line80"> 80: </a>    <font color="#4169E1">if</font> (j>0) { MatSetValue(C,II,II-1,-1.0,INSERT_VALUES); }
+<a name="line81"> 81: </a>    <font color="#4169E1">if</font> (j<n-1) { MatSetValue(C,II,II+1,-1.0,INSERT_VALUES); }
+<a name="line82"> 82: </a>    MatSetValue(C,II,II,2.0,INSERT_VALUES);
+<a name="line83"> 83: </a>  }
+<a name="line84"> 84: </a>  MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);
+<a name="line85"> 85: </a>  MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);
+
+<a name="line87"> 87: </a>  <font color="#B22222">/* M is a diagonal matrix */</font>
+<a name="line88"> 88: </a>  MatCreate(PETSC_COMM_WORLD,&M);
+<a name="line89"> 89: </a>  MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N);
+<a name="line90"> 90: </a>  MatSetFromOptions(M);
+<a name="line91"> 91: </a>  MatSetUp(M);
+<a name="line92"> 92: </a>  MatGetOwnershipRange(M,&Istart,&Iend);
+<a name="line93"> 93: </a>  <font color="#4169E1">for</font> (II=Istart;II<Iend;II++) {
+<a name="line94"> 94: </a>    MatSetValue(M,II,II,(PetscReal)(II+1),INSERT_VALUES);
+<a name="line95"> 95: </a>  }
+<a name="line96"> 96: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
+<a name="line97"> 97: </a>  MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);
+
+<a name="line99"> 99: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line100">100: </a><font color="#B22222">                Create the eigensolver and set various options</font>
+<a name="line101">101: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line103">103: </a>  <font color="#B22222">/*</font>
+<a name="line104">104: </a><font color="#B22222">     Create eigensolver context</font>
+<a name="line105">105: </a><font color="#B22222">  */</font>
+<a name="line106">106: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
+
+<a name="line108">108: </a>  <font color="#B22222">/*</font>
+<a name="line109">109: </a><font color="#B22222">     Set matrices and problem type</font>
+<a name="line110">110: </a><font color="#B22222">  */</font>
+<a name="line111">111: </a>  A[0] = K; A[1] = C; A[2] = M;
+<a name="line112">112: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
+<a name="line113">113: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_HERMITIAN);
+
+<a name="line115">115: </a>  <font color="#B22222">/*</font>
+<a name="line116">116: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line117">117: </a><font color="#B22222">  */</font>
+<a name="line118">118: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep);
+
+<a name="line120">120: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line121">121: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line122">122: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line124">124: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
+
+<a name="line126">126: </a>  <font color="#B22222">/*</font>
+<a name="line127">127: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line128">128: </a><font color="#B22222">  */</font>
+<a name="line129">129: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
+<a name="line130">130: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
+<a name="line131">131: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
+<a name="line132">132: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line134">134: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line135">135: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line136">136: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line138">138: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line139">139: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line140">140: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line141">141: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
+<a name="line142">142: </a>  } <font color="#4169E1">else</font> {
+<a name="line143">143: </a>    <a href="../../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(pep,&nconv);
+<a name="line144">144: </a>    <font color="#4169E1">if</font> (nconv>0) {
+<a name="line145">145: </a>      MatCreateVecs(M,&xr,&xi);
+<a name="line146">146: </a>      <font color="#B22222">/* display eigenvalues and relative errors */</font>
+<a name="line147">147: </a>      PetscPrintf(PETSC_COMM_WORLD,
+<a name="line148">148: </a>           <font color="#666666">"\n           k          ||P(k)x||/||kx||\n"</font>
+<a name="line149">149: </a>           <font color="#666666">"   ----------------- ------------------\n"</font>);
+<a name="line150">150: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) {
+<a name="line151">151: </a>        <font color="#B22222">/* get converged eigenpairs */</font>
+<a name="line152">152: </a>        <a href="../../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,i,&kr,&ki,xr,xi);
+<a name="line153">153: </a>        <font color="#B22222">/* compute the relative error associated to each eigenpair */</font>
+<a name="line154">154: </a>        <a href="../../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,PEP_ERROR_RELATIVE,&error);
+<a name="line155">155: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line156">156: </a>        re = PetscRealPart(kr);
+<a name="line157">157: </a>        im = PetscImaginaryPart(kr);
+<a name="line158">158: </a><font color="#A020F0">#else</font>
+<a name="line159">159: </a>        re = kr;
+<a name="line160">160: </a>        im = ki;
+<a name="line161">161: </a><font color="#A020F0">#endif</font>
+<a name="line162">162: </a>        <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line163">163: </a>          PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" %9f%+9fi   %12g\n"</font>,(double)re,(double)im,(double)error);
+<a name="line164">164: </a>        } <font color="#4169E1">else</font> {
+<a name="line165">165: </a>          PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"   %12f       %12g\n"</font>,(double)re,(double)error);
+<a name="line166">166: </a>        }
+<a name="line167">167: </a>      }
+<a name="line168">168: </a>      PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n"</font>);
+<a name="line169">169: </a>      VecDestroy(&xr);
+<a name="line170">170: </a>      VecDestroy(&xi);
+<a name="line171">171: </a>    }
+<a name="line172">172: </a>  }
+<a name="line173">173: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
+<a name="line174">174: </a>  MatDestroy(&M);
+<a name="line175">175: </a>  MatDestroy(&C);
+<a name="line176">176: </a>  MatDestroy(&K);
+<a name="line177">177: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line178">178: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line179">179: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/examples/tutorials/ex16f90.F90 b/src/pep/examples/tutorials/ex16f90.F90
index 13299b6..d882524 100644
--- a/src/pep/examples/tutorials/ex16f90.F90
+++ b/src/pep/examples/tutorials/ex16f90.F90
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n ex16f90 [-help] [-n <n>] [-m <m>] [SLEPc opts] 
+!  Program usage: mpiexec -n <np> ./ex16f90 [-help] [-n <n>] [-m <m>] [SLEPc opts] 
 !
 !  Description: Simple example that solves a quadratic eigensystem with the
 !  PEP object. This is the Fortran90 equivalent to ex16.c
@@ -62,7 +62,7 @@
       PetscMPIInt    rank
       PetscErrorCode ierr
       PetscBool      flg, terse
-      PetscScalar    one, mone, four
+      PetscScalar    mone, two, four, val
 
 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !     Beginning of program
@@ -71,8 +71,10 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       nx = 10
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',nx,flg,ierr)
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-m',ny,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',nx,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-m',ny,flg,ierr)
       if (.not. flg) then
         ny = nx
       endif
@@ -114,23 +116,36 @@
       call MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY,ierr)
       call MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY,ierr)
 
-!     ** C is the zero matrix
+!     ** C is the 1-D Laplacian on horizontal lines
       call MatCreate(PETSC_COMM_WORLD,C,ierr)
       call MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
       call MatSetFromOptions(C,ierr)
       call MatSetUp(C,ierr)
+      call MatGetOwnershipRange(C,Istart,Iend,ierr)
+      two = 2.0
+      do II=Istart,Iend-1
+        i = II/nx
+        j = II-i*nx
+        if (j .gt. 0) then 
+          call MatSetValue(C,II,II-1,mone,INSERT_VALUES,ierr)
+        endif
+        if (j .lt. nx-1) then 
+          call MatSetValue(C,II,II+1,mone,INSERT_VALUES,ierr)
+        endif
+        call MatSetValue(C,II,II,two,INSERT_VALUES,ierr)
+      end do
       call MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY,ierr)
       call MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY,ierr)
 
-!     ** M is the identity matrix
+!     ** M is a diagonal matrix
       call MatCreate(PETSC_COMM_WORLD,M,ierr)
       call MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
       call MatSetFromOptions(M,ierr)
       call MatSetUp(M,ierr)
       call MatGetOwnershipRange(M,Istart,Iend,ierr)
-      one = 1.0
       do II=Istart,Iend-1
-        call MatSetValue(M,II,II,one,INSERT_VALUES,ierr)
+        val = II+1
+        call MatSetValue(M,II,II,val,INSERT_VALUES,ierr)
       end do
       call MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY,ierr)
       call MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY,ierr)
@@ -177,7 +192,8 @@
 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 !     ** show detailed info unless -terse option is given by user
-      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-terse',terse,ierr)
+      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+     &                        '-terse',terse,ierr)
       if (terse) then
         call PEPErrorView(pep,PEP_ERROR_BACKWARD,PETSC_NULL_OBJECT,ierr)
       else
diff --git a/src/pep/examples/tutorials/ex16f90.F90.html b/src/pep/examples/tutorials/ex16f90.F90.html
index d583f16..3bf56dd 100644
--- a/src/pep/examples/tutorials/ex16f90.F90.html
+++ b/src/pep/examples/tutorials/ex16f90.F90.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tutorials/ex16f90.F90.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:08+00:00">
+<meta name="date" content="2016-05-16T10:34:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tutorials/ex16f90.F90.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tutorials/ex16f90.F90.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n ex16f90 [-help] [-n <n>] [-m <m>] [SLEPc opts] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./ex16f90 [-help] [-n <n>] [-m <m>] [SLEPc opts] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Simple example that solves a quadratic eigensystem with the
 <a name="line23"> 23: </a>!  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object. This is the Fortran90 equivalent to ex16.c
@@ -74,7 +74,7 @@
 <a name="line62"> 62: </a>      PetscMPIInt    rank
 <a name="line63"> 63: </a>      PetscErrorCode ierr
 <a name="line64"> 64: </a>      PetscBool      flg, terse
-<a name="line65"> 65: </a>      PetscScalar    one, mone, four
+<a name="line65"> 65: </a>      PetscScalar    mone, two, four, val
 
 <a name="line67"> 67: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line68"> 68: </a>!     Beginning of program
@@ -83,129 +83,145 @@
 <a name="line71"> 71: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line72"> 72: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line73"> 73: </a>      nx = 10
-<a name="line74"> 74: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',nx,flg,ierr)
-<a name="line75"> 75: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-m',ny,flg,ierr)
-<a name="line76"> 76: </a>      <font color="#4169E1">if</font> (.not. flg) then
-<a name="line77"> 77: </a>        ny = nx
-<a name="line78"> 78: </a>      endif
-<a name="line79"> 79: </a>      N = nx*ny
-<a name="line80"> 80: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line81"> 81: </a>        write(*,100) N, nx, ny
-<a name="line82"> 82: </a>      endif
-<a name="line83"> 83: </a> 100  format (/'Quadratic Eigenproblem, N=',I6,' (',I4,'x',I4,' grid)')
-
-<a name="line85"> 85: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line86"> 86: </a>!     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0
-<a name="line87"> 87: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line74"> 74: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line75"> 75: </a>     &                        '-n',nx,flg,ierr)
+<a name="line76"> 76: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line77"> 77: </a>     &                        '-m',ny,flg,ierr)
+<a name="line78"> 78: </a>      <font color="#4169E1">if</font> (.not. flg) then
+<a name="line79"> 79: </a>        ny = nx
+<a name="line80"> 80: </a>      endif
+<a name="line81"> 81: </a>      N = nx*ny
+<a name="line82"> 82: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line83"> 83: </a>        write(*,100) N, nx, ny
+<a name="line84"> 84: </a>      endif
+<a name="line85"> 85: </a> 100  format (/'Quadratic Eigenproblem, N=',I6,' (',I4,'x',I4,' grid)')
 
-<a name="line89"> 89: </a>!     ** K is the 2-D Laplacian
-<a name="line90"> 90: </a>      call MatCreate(PETSC_COMM_WORLD,K,ierr)
-<a name="line91"> 91: </a>      call MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
-<a name="line92"> 92: </a>      call MatSetFromOptions(K,ierr)
-<a name="line93"> 93: </a>      call MatSetUp(K,ierr)
-<a name="line94"> 94: </a>      call MatGetOwnershipRange(K,Istart,Iend,ierr)
-<a name="line95"> 95: </a>      mone = -1.0
-<a name="line96"> 96: </a>      four = 4.0
-<a name="line97"> 97: </a>      <font color="#4169E1">do</font> II=Istart,Iend-1
-<a name="line98"> 98: </a>        i = II/nx
-<a name="line99"> 99: </a>        j = II-i*nx
-<a name="line100">100: </a>        <font color="#4169E1">if</font> (i .gt. 0) then 
-<a name="line101">101: </a>          call MatSetValue(K,II,II-nx,mone,INSERT_VALUES,ierr)
-<a name="line102">102: </a>        endif
-<a name="line103">103: </a>        <font color="#4169E1">if</font> (i .lt. ny-1) then 
-<a name="line104">104: </a>          call MatSetValue(K,II,II+nx,mone,INSERT_VALUES,ierr)
-<a name="line105">105: </a>        endif
-<a name="line106">106: </a>        <font color="#4169E1">if</font> (j .gt. 0) then 
-<a name="line107">107: </a>          call MatSetValue(K,II,II-1,mone,INSERT_VALUES,ierr)
-<a name="line108">108: </a>        endif
-<a name="line109">109: </a>        <font color="#4169E1">if</font> (j .lt. nx-1) then 
-<a name="line110">110: </a>          call MatSetValue(K,II,II+1,mone,INSERT_VALUES,ierr)
-<a name="line111">111: </a>        endif
-<a name="line112">112: </a>        call MatSetValue(K,II,II,four,INSERT_VALUES,ierr)
-<a name="line113">113: </a>      end <font color="#4169E1">do</font>
-<a name="line114">114: </a>      call MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line115">115: </a>      call MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line117">117: </a>!     ** C is the zero matrix
-<a name="line118">118: </a>      call MatCreate(PETSC_COMM_WORLD,C,ierr)
-<a name="line119">119: </a>      call MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
-<a name="line120">120: </a>      call MatSetFromOptions(C,ierr)
-<a name="line121">121: </a>      call MatSetUp(C,ierr)
-<a name="line122">122: </a>      call MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line123">123: </a>      call MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line125">125: </a>!     ** M is the identity matrix
-<a name="line126">126: </a>      call MatCreate(PETSC_COMM_WORLD,M,ierr)
-<a name="line127">127: </a>      call MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
-<a name="line128">128: </a>      call MatSetFromOptions(M,ierr)
-<a name="line129">129: </a>      call MatSetUp(M,ierr)
-<a name="line130">130: </a>      call MatGetOwnershipRange(M,Istart,Iend,ierr)
-<a name="line131">131: </a>      one = 1.0
-<a name="line132">132: </a>      <font color="#4169E1">do</font> II=Istart,Iend-1
-<a name="line133">133: </a>        call MatSetValue(M,II,II,one,INSERT_VALUES,ierr)
-<a name="line134">134: </a>      end <font color="#4169E1">do</font>
-<a name="line135">135: </a>      call MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line136">136: </a>      call MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line138">138: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line139">139: </a>!     Create the eigensolver and set various options
-<a name="line140">140: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line142">142: </a>!     ** Create eigensolver context
-<a name="line143">143: </a>      call <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,pep,ierr)
-
-<a name="line145">145: </a>!     ** Set matrices and problem type
-<a name="line146">146: </a>      A(1) = K
-<a name="line147">147: </a>      A(2) = C
-<a name="line148">148: </a>      A(3) = M
-<a name="line149">149: </a>      ithree = 3
-<a name="line150">150: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,ithree,A,ierr)
-<a name="line151">151: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL,ierr)
-
-<a name="line153">153: </a>!     ** Set solver parameters at runtime
-<a name="line154">154: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep,ierr)
-
-<a name="line156">156: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line157">157: </a>!     Solve the eigensystem
-<a name="line158">158: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line160">160: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep,ierr) 
-
-<a name="line162">162: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line163">163: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,tname,ierr)
-<a name="line164">164: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line165">165: </a>        write(*,120) tname
-<a name="line166">166: </a>      endif
-<a name="line167">167: </a> 120  format (' Solution method: ',A)
-<a name="line168">168: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,nev,PETSC_NULL_INTEGER,                 &
-<a name="line169">169: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line170">170: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line171">171: </a>        write(*,130) nev
-<a name="line172">172: </a>      endif
-<a name="line173">173: </a> 130  format (' Number of requested eigenvalues:',I4)
-
-<a name="line175">175: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line176">176: </a>!     Display solution and clean up
-<a name="line177">177: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line179">179: </a>!     ** show detailed info unless -terse option is given by user
-<a name="line180">180: </a>      call PetscOptionsHasName(PETSC_NULL_CHARACTER,'-terse',terse,ierr)
-<a name="line181">181: </a>      <font color="#4169E1">if</font> (terse) then
-<a name="line182">182: </a>        call <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,PETSC_NULL_OBJECT,ierr)
-<a name="line183">183: </a>      <font color="#4169E1">else</font>
-<a name="line184">184: </a>        call PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,           &
-<a name="line185">185: </a>     &                   PETSC_VIEWER_ASCII_INFO_DETAIL,ierr)
-<a name="line186">186: </a>        call <a href="../../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(pep,PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line187">187: </a>        call <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,                       &
-<a name="line188">188: </a>     &                   PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line189">189: </a>        call PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD,ierr)
-<a name="line190">190: </a>      endif
-<a name="line191">191: </a>      call <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(pep,ierr)
-<a name="line192">192: </a>      call MatDestroy(K,ierr)
-<a name="line193">193: </a>      call MatDestroy(C,ierr)
-<a name="line194">194: </a>      call MatDestroy(M,ierr)
-<a name="line195">195: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line196">196: </a>      end
+<a name="line87"> 87: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line88"> 88: </a>!     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0
+<a name="line89"> 89: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line91"> 91: </a>!     ** K is the 2-D Laplacian
+<a name="line92"> 92: </a>      call MatCreate(PETSC_COMM_WORLD,K,ierr)
+<a name="line93"> 93: </a>      call MatSetSizes(K,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
+<a name="line94"> 94: </a>      call MatSetFromOptions(K,ierr)
+<a name="line95"> 95: </a>      call MatSetUp(K,ierr)
+<a name="line96"> 96: </a>      call MatGetOwnershipRange(K,Istart,Iend,ierr)
+<a name="line97"> 97: </a>      mone = -1.0
+<a name="line98"> 98: </a>      four = 4.0
+<a name="line99"> 99: </a>      <font color="#4169E1">do</font> II=Istart,Iend-1
+<a name="line100">100: </a>        i = II/nx
+<a name="line101">101: </a>        j = II-i*nx
+<a name="line102">102: </a>        <font color="#4169E1">if</font> (i .gt. 0) then 
+<a name="line103">103: </a>          call MatSetValue(K,II,II-nx,mone,INSERT_VALUES,ierr)
+<a name="line104">104: </a>        endif
+<a name="line105">105: </a>        <font color="#4169E1">if</font> (i .lt. ny-1) then 
+<a name="line106">106: </a>          call MatSetValue(K,II,II+nx,mone,INSERT_VALUES,ierr)
+<a name="line107">107: </a>        endif
+<a name="line108">108: </a>        <font color="#4169E1">if</font> (j .gt. 0) then 
+<a name="line109">109: </a>          call MatSetValue(K,II,II-1,mone,INSERT_VALUES,ierr)
+<a name="line110">110: </a>        endif
+<a name="line111">111: </a>        <font color="#4169E1">if</font> (j .lt. nx-1) then 
+<a name="line112">112: </a>          call MatSetValue(K,II,II+1,mone,INSERT_VALUES,ierr)
+<a name="line113">113: </a>        endif
+<a name="line114">114: </a>        call MatSetValue(K,II,II,four,INSERT_VALUES,ierr)
+<a name="line115">115: </a>      end <font color="#4169E1">do</font>
+<a name="line116">116: </a>      call MatAssemblyBegin(K,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line117">117: </a>      call MatAssemblyEnd(K,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line119">119: </a>!     ** C is the 1-D Laplacian on horizontal lines
+<a name="line120">120: </a>      call MatCreate(PETSC_COMM_WORLD,C,ierr)
+<a name="line121">121: </a>      call MatSetSizes(C,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
+<a name="line122">122: </a>      call MatSetFromOptions(C,ierr)
+<a name="line123">123: </a>      call MatSetUp(C,ierr)
+<a name="line124">124: </a>      call MatGetOwnershipRange(C,Istart,Iend,ierr)
+<a name="line125">125: </a>      two = 2.0
+<a name="line126">126: </a>      <font color="#4169E1">do</font> II=Istart,Iend-1
+<a name="line127">127: </a>        i = II/nx
+<a name="line128">128: </a>        j = II-i*nx
+<a name="line129">129: </a>        <font color="#4169E1">if</font> (j .gt. 0) then 
+<a name="line130">130: </a>          call MatSetValue(C,II,II-1,mone,INSERT_VALUES,ierr)
+<a name="line131">131: </a>        endif
+<a name="line132">132: </a>        <font color="#4169E1">if</font> (j .lt. nx-1) then 
+<a name="line133">133: </a>          call MatSetValue(C,II,II+1,mone,INSERT_VALUES,ierr)
+<a name="line134">134: </a>        endif
+<a name="line135">135: </a>        call MatSetValue(C,II,II,two,INSERT_VALUES,ierr)
+<a name="line136">136: </a>      end <font color="#4169E1">do</font>
+<a name="line137">137: </a>      call MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line138">138: </a>      call MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line140">140: </a>!     ** M is a diagonal matrix
+<a name="line141">141: </a>      call MatCreate(PETSC_COMM_WORLD,M,ierr)
+<a name="line142">142: </a>      call MatSetSizes(M,PETSC_DECIDE,PETSC_DECIDE,N,N,ierr)
+<a name="line143">143: </a>      call MatSetFromOptions(M,ierr)
+<a name="line144">144: </a>      call MatSetUp(M,ierr)
+<a name="line145">145: </a>      call MatGetOwnershipRange(M,Istart,Iend,ierr)
+<a name="line146">146: </a>      <font color="#4169E1">do</font> II=Istart,Iend-1
+<a name="line147">147: </a>        val = II+1
+<a name="line148">148: </a>        call MatSetValue(M,II,II,val,INSERT_VALUES,ierr)
+<a name="line149">149: </a>      end <font color="#4169E1">do</font>
+<a name="line150">150: </a>      call MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line151">151: </a>      call MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY,ierr)
+
+<a name="line153">153: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line154">154: </a>!     Create the eigensolver and set various options
+<a name="line155">155: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line157">157: </a>!     ** Create eigensolver context
+<a name="line158">158: </a>      call <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,pep,ierr)
+
+<a name="line160">160: </a>!     ** Set matrices and problem type
+<a name="line161">161: </a>      A(1) = K
+<a name="line162">162: </a>      A(2) = C
+<a name="line163">163: </a>      A(3) = M
+<a name="line164">164: </a>      ithree = 3
+<a name="line165">165: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,ithree,A,ierr)
+<a name="line166">166: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL,ierr)
+
+<a name="line168">168: </a>!     ** Set solver parameters at runtime
+<a name="line169">169: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep,ierr)
+
+<a name="line171">171: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line172">172: </a>!     Solve the eigensystem
+<a name="line173">173: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line175">175: </a>      call <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep,ierr) 
+
+<a name="line177">177: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line178">178: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,tname,ierr)
+<a name="line179">179: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line180">180: </a>        write(*,120) tname
+<a name="line181">181: </a>      endif
+<a name="line182">182: </a> 120  format (' Solution method: ',A)
+<a name="line183">183: </a>      call <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,nev,PETSC_NULL_INTEGER,                 &
+<a name="line184">184: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line185">185: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line186">186: </a>        write(*,130) nev
+<a name="line187">187: </a>      endif
+<a name="line188">188: </a> 130  format (' Number of requested eigenvalues:',I4)
+
+<a name="line190">190: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line191">191: </a>!     Display solution and clean up
+<a name="line192">192: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line194">194: </a>!     ** show detailed info unless -terse option is given by user
+<a name="line195">195: </a>      call PetscOptionsHasName(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,  &
+<a name="line196">196: </a>     &                        '-terse',terse,ierr)
+<a name="line197">197: </a>      <font color="#4169E1">if</font> (terse) then
+<a name="line198">198: </a>        call <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,PETSC_NULL_OBJECT,ierr)
+<a name="line199">199: </a>      <font color="#4169E1">else</font>
+<a name="line200">200: </a>        call PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,           &
+<a name="line201">201: </a>     &                   PETSC_VIEWER_ASCII_INFO_DETAIL,ierr)
+<a name="line202">202: </a>        call <a href="../../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(pep,PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line203">203: </a>        call <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,                       &
+<a name="line204">204: </a>     &                   PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line205">205: </a>        call PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD,ierr)
+<a name="line206">206: </a>      endif
+<a name="line207">207: </a>      call <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(pep,ierr)
+<a name="line208">208: </a>      call MatDestroy(K,ierr)
+<a name="line209">209: </a>      call MatDestroy(C,ierr)
+<a name="line210">210: </a>      call MatDestroy(M,ierr)
+<a name="line211">211: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line212">212: </a>      end
 
 </pre>
 </body>
diff --git a/src/pep/examples/tutorials/ex17.c b/src/pep/examples/tutorials/ex17.c
index 2706313..304f87b 100644
--- a/src/pep/examples/tutorials/ex17.c
+++ b/src/pep/examples/tutorials/ex17.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -53,7 +53,7 @@ int main(int argc,char **argv)
 #else
   ierr = PetscPrintf(PETSC_COMM_WORLD," Reading REAL matrices from binary files...\n");CHKERRQ(ierr);
 #endif
-  ierr = PetscOptionsGetStringArray(NULL,"-A",filenames,&nmat,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetStringArray(NULL,NULL,"-A",filenames,&nmat,&flg);CHKERRQ(ierr);
   if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must indicate a comma-separated list of file names with the -A option");
   for (i=0;i<nmat;i++) { 
     ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,filenames[i],FILE_MODE_READ,&viewer);CHKERRQ(ierr);
@@ -103,7 +103,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = PEPErrorView(pep,PEP_ERROR_BACKWARD,NULL);CHKERRQ(ierr);
   } else {
@@ -118,5 +118,5 @@ int main(int argc,char **argv)
     ierr = PetscFree(filenames[i]);CHKERRQ(ierr);
   }
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/pep/examples/tutorials/ex17.c.html b/src/pep/examples/tutorials/ex17.c.html
index ae757d9..43302e6 100644
--- a/src/pep/examples/tutorials/ex17.c.html
+++ b/src/pep/examples/tutorials/ex17.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tutorials/ex17.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tutorials/ex17.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tutorials/ex17.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -62,7 +62,7 @@
 <a name="line53"> 53: </a><font color="#A020F0">#else</font>
 <a name="line54"> 54: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Reading REAL matrices from binary files...\n"</font>);
 <a name="line55"> 55: </a><font color="#A020F0">#endif</font>
-<a name="line56"> 56: </a>  PetscOptionsGetStringArray(NULL,<font color="#666666">"-A"</font>,filenames,&nmat,&flg);
+<a name="line56"> 56: </a>  PetscOptionsGetStringArray(NULL,NULL,<font color="#666666">"-A"</font>,filenames,&nmat,&flg);
 <a name="line57"> 57: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must indicate a comma-separated list of file names with the -A option"</font>);
 <a name="line58"> 58: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) { 
 <a name="line59"> 59: </a>    PetscViewerBinaryOpen(PETSC_COMM_WORLD,filenames[i],FILE_MODE_READ,&viewer);
@@ -112,7 +112,7 @@
 <a name="line103">103: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line105">105: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line106">106: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line106">106: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line107">107: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line108">108: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,NULL);
 <a name="line109">109: </a>  } <font color="#4169E1">else</font> {
@@ -127,7 +127,7 @@
 <a name="line118">118: </a>    PetscFree(filenames[i]);
 <a name="line119">119: </a>  }
 <a name="line120">120: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line121">121: </a>  <font color="#4169E1">return</font> 0;
+<a name="line121">121: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line122">122: </a>}
 </pre>
 </body>
diff --git a/src/pep/examples/tutorials/ex28.c b/src/pep/examples/tutorials/ex28.c
new file mode 100644
index 0000000..f3aca80
--- /dev/null
+++ b/src/pep/examples/tutorials/ex28.c
@@ -0,0 +1,272 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "A quadratic eigenproblem defined using shell matrices.\n\n"
+  "The command line options are:\n"
+  "  -n <n>, where <n> = number of grid subdivisions in x and y dimensions.\n\n";
+
+#include <slepcpep.h>
+
+/*
+   User-defined routines
+*/
+PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y);
+PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag);
+PetscErrorCode MatMult_Zero(Mat A,Vec x,Vec y);
+PetscErrorCode MatGetDiagonal_Zero(Mat A,Vec diag);
+PetscErrorCode MatMult_Identity(Mat A,Vec x,Vec y);
+PetscErrorCode MatGetDiagonal_Identity(Mat A,Vec diag);
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  Mat            M,C,K,A[3];      /* problem matrices */
+  PEP            pep;             /* polynomial eigenproblem solver context */
+  PEPType        type;
+  PetscInt       N,n=10,nev;
+  PetscMPIInt    size;
+  PetscBool      terse;
+  PetscErrorCode ierr;
+  ST             st;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+  ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr);
+  if (size != 1) SETERRQ(PETSC_COMM_WORLD,1,"This is a uniprocessor example only");
+
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  N = n*n;
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"\nQuadratic Eigenproblem with shell matrices, N=%D (%Dx%D grid)\n\n",N,n,n);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /* K is the 2-D Laplacian */
+  ierr = MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,&n,&K);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(K);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(K,MATOP_MULT,(void(*)())MatMult_Laplacian2D);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(K,MATOP_MULT_TRANSPOSE,(void(*)())MatMult_Laplacian2D);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(K,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Laplacian2D);CHKERRQ(ierr);
+
+  /* C is the zero matrix */
+  ierr = MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,NULL,&C);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(C);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(C,MATOP_MULT,(void(*)())MatMult_Zero);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(C,MATOP_MULT_TRANSPOSE,(void(*)())MatMult_Zero);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(C,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Zero);CHKERRQ(ierr);
+
+  /* M is the identity matrix */
+  ierr = MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,NULL,&M);CHKERRQ(ierr);
+  ierr = MatSetFromOptions(M);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(M,MATOP_MULT,(void(*)())MatMult_Identity);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(M,MATOP_MULT_TRANSPOSE,(void(*)())MatMult_Identity);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(M,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Identity);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                Create the eigensolver and set various options
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /*
+     Create eigensolver context
+  */
+  ierr = PEPCreate(PETSC_COMM_WORLD,&pep);CHKERRQ(ierr);
+
+  /*
+     Set matrices and problem type
+  */
+  A[0] = K; A[1] = C; A[2] = M;
+  ierr = PEPSetOperators(pep,3,A);CHKERRQ(ierr);
+  ierr = PEPGetST(pep,&st);CHKERRQ(ierr);
+  ierr = STSetMatMode(st,ST_MATMODE_SHELL);CHKERRQ(ierr);
+
+  /*
+     Set solver parameters at runtime
+  */
+  ierr = PEPSetFromOptions(pep);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                      Solve the eigensystem
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  ierr = PEPSolve(pep);CHKERRQ(ierr);
+
+  /*
+     Optional: Get some information from the solver and display it
+  */
+  ierr = PEPGetType(pep,&type);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Solution method: %s\n\n",type);CHKERRQ(ierr);
+  ierr = PEPGetDimensions(pep,&nev,NULL,NULL);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD," Number of requested eigenvalues: %D\n",nev);CHKERRQ(ierr);
+
+  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+                    Display solution and clean up
+     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+  /* show detailed info unless -terse option is given by user */
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
+  if (terse) {
+    ierr = PEPErrorView(pep,PEP_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);CHKERRQ(ierr);
+    ierr = PEPReasonView(pep,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = PEPErrorView(pep,PEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
+  }
+  ierr = PEPDestroy(&pep);CHKERRQ(ierr);
+  ierr = MatDestroy(&M);CHKERRQ(ierr);
+  ierr = MatDestroy(&C);CHKERRQ(ierr);
+  ierr = MatDestroy(&K);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
+
+/*
+    Compute the matrix vector multiplication y<---T*x where T is a nx by nx
+    tridiagonal matrix with DD on the diagonal, DL on the subdiagonal, and
+    DU on the superdiagonal.
+ */
+static void tv(int nx,const PetscScalar *x,PetscScalar *y)
+{
+  PetscScalar dd,dl,du;
+  int         j;
+
+  dd  = 4.0;
+  dl  = -1.0;
+  du  = -1.0;
+
+  y[0] =  dd*x[0] + du*x[1];
+  for (j=1;j<nx-1;j++)
+    y[j] = dl*x[j-1] + dd*x[j] + du*x[j+1];
+  y[nx-1] = dl*x[nx-2] + dd*x[nx-1];
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMult_Laplacian2D"
+/*
+    Matrix-vector product subroutine for the 2D Laplacian.
+
+    The matrix used is the 2 dimensional discrete Laplacian on unit square with
+    zero Dirichlet boundary condition.
+
+    Computes y <-- A*x, where A is the block tridiagonal matrix
+
+                 | T -I          |
+                 |-I  T -I       |
+             A = |   -I  T       |
+                 |        ...  -I|
+                 |           -I T|
+
+    The subroutine TV is called to compute y<--T*x.
+ */
+PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)
+{
+  void              *ctx;
+  int               nx,lo,i,j;
+  const PetscScalar *px;
+  PetscScalar       *py;
+  PetscErrorCode    ierr;
+
+  PetscFunctionBeginUser;
+  ierr = MatShellGetContext(A,&ctx);CHKERRQ(ierr);
+  nx = *(int*)ctx;
+  ierr = VecGetArrayRead(x,&px);CHKERRQ(ierr);
+  ierr = VecGetArray(y,&py);CHKERRQ(ierr);
+
+  tv(nx,&px[0],&py[0]);
+  for (i=0;i<nx;i++) py[i] -= px[nx+i];
+
+  for (j=2;j<nx;j++) {
+    lo = (j-1)*nx;
+    tv(nx,&px[lo],&py[lo]);
+    for (i=0;i<nx;i++) py[lo+i] -= px[lo-nx+i] + px[lo+nx+i];
+  }
+
+  lo = (nx-1)*nx;
+  tv(nx,&px[lo],&py[lo]);
+  for (i=0;i<nx;i++) py[lo+i] -= px[lo-nx+i];
+
+  ierr = VecRestoreArrayRead(x,&px);CHKERRQ(ierr);
+  ierr = VecRestoreArray(y,&py);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatGetDiagonal_Laplacian2D"
+PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = VecSet(diag,4.0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMult_Zero"
+/*
+    Matrix-vector product subroutine for the Null matrix.
+ */
+PetscErrorCode MatMult_Zero(Mat A,Vec x,Vec y)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = VecSet(y,0.0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatGetDiagonal_Zero"
+PetscErrorCode MatGetDiagonal_Zero(Mat A,Vec diag)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = VecSet(diag,0.0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatMult_Identity"
+/*
+    Matrix-vector product subroutine for the Identity matrix.
+ */
+PetscErrorCode MatMult_Identity(Mat A,Vec x,Vec y)
+{
+  PetscErrorCode    ierr;
+
+  PetscFunctionBeginUser;
+  ierr = VecCopy(x,y);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "MatGetDiagonal_Identity"
+PetscErrorCode MatGetDiagonal_Identity(Mat A,Vec diag)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBeginUser;
+  ierr = VecSet(diag,1.0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/pep/examples/tutorials/ex28.c.html b/src/pep/examples/tutorials/ex28.c.html
new file mode 100644
index 0000000..1a29cc7
--- /dev/null
+++ b/src/pep/examples/tutorials/ex28.c.html
@@ -0,0 +1,263 @@
+<center><a href="ex28.c">Actual source code: ex28.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tutorials/ex28.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:34:08+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tutorials/ex28.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"A quadratic eigenproblem defined using shell matrices.\n\n"</font>
+<a name="line23"> 23: </a>  <font color="#666666">"The command line options are:\n"</font>
+<a name="line24"> 24: </a>  <font color="#666666">"  -n <n>, where <n> = number of grid subdivisions in x and y dimensions.\n\n"</font>;
+
+<a name="line26"> 26: </a><font color="#A020F0">#include <slepcpep.h></font>
+
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">   User-defined routines</font>
+<a name="line30"> 30: </a><font color="#B22222">*/</font>
+<a name="line31"> 31: </a><strong><font color="#4169E1">PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)</font></strong>;
+<a name="line32"> 32: </a><strong><font color="#4169E1">PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)</font></strong>;
+<a name="line33"> 33: </a><strong><font color="#4169E1">PetscErrorCode MatMult_Zero(Mat A,Vec x,Vec y)</font></strong>;
+<a name="line34"> 34: </a><strong><font color="#4169E1">PetscErrorCode MatGetDiagonal_Zero(Mat A,Vec diag)</font></strong>;
+<a name="line35"> 35: </a><strong><font color="#4169E1">PetscErrorCode MatMult_Identity(Mat A,Vec x,Vec y)</font></strong>;
+<a name="line36"> 36: </a><strong><font color="#4169E1">PetscErrorCode MatGetDiagonal_Identity(Mat A,Vec diag)</font></strong>;
+
+<a name="line40"> 40: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line41"> 41: </a>{
+<a name="line42"> 42: </a>  Mat            M,C,K,A[3];      <font color="#B22222">/* problem matrices */</font>
+<a name="line43"> 43: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>            pep;             <font color="#B22222">/* polynomial eigenproblem solver context */</font>
+<a name="line44"> 44: </a>  <a href="../../../../docs/manualpages/PEP/PEPType.html#PEPType">PEPType</a>        type;
+<a name="line45"> 45: </a>  PetscInt       N,n=10,nev;
+<a name="line46"> 46: </a>  PetscMPIInt    size;
+<a name="line47"> 47: </a>  PetscBool      terse;
+<a name="line49"> 49: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line51"> 51: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line52"> 52: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PETSC_COMM_WORLD,&size);
+<a name="line53"> 53: </a>  <font color="#4169E1">if</font> (size != 1) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"This is a uniprocessor example only"</font>);
+
+<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line56"> 56: </a>  N = n*n;
+<a name="line57"> 57: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nQuadratic Eigenproblem with shell matrices, N=%D (%Dx%D grid)\n\n"</font>,N,n,n);
+
+<a name="line59"> 59: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line60"> 60: </a><font color="#B22222">     Compute the matrices that define the eigensystem, (k^2*M+k*C+K)x=0</font>
+<a name="line61"> 61: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line63"> 63: </a>  <font color="#B22222">/* K is the 2-D Laplacian */</font>
+<a name="line64"> 64: </a>  MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,&n,&K);
+<a name="line65"> 65: </a>  MatSetFromOptions(K);
+<a name="line66"> 66: </a>  MatShellSetOperation(K,MATOP_MULT,(void(*)())MatMult_Laplacian2D);
+<a name="line67"> 67: </a>  MatShellSetOperation(K,MATOP_MULT_TRANSPOSE,(void(*)())MatMult_Laplacian2D);
+<a name="line68"> 68: </a>  MatShellSetOperation(K,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Laplacian2D);
+
+<a name="line70"> 70: </a>  <font color="#B22222">/* C is the zero matrix */</font>
+<a name="line71"> 71: </a>  MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,NULL,&C);
+<a name="line72"> 72: </a>  MatSetFromOptions(C);
+<a name="line73"> 73: </a>  MatShellSetOperation(C,MATOP_MULT,(void(*)())MatMult_Zero);
+<a name="line74"> 74: </a>  MatShellSetOperation(C,MATOP_MULT_TRANSPOSE,(void(*)())MatMult_Zero);
+<a name="line75"> 75: </a>  MatShellSetOperation(C,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Zero);
+
+<a name="line77"> 77: </a>  <font color="#B22222">/* M is the identity matrix */</font>
+<a name="line78"> 78: </a>  MatCreateShell(PETSC_COMM_WORLD,N,N,N,N,NULL,&M);
+<a name="line79"> 79: </a>  MatSetFromOptions(M);
+<a name="line80"> 80: </a>  MatShellSetOperation(M,MATOP_MULT,(void(*)())MatMult_Identity);
+<a name="line81"> 81: </a>  MatShellSetOperation(M,MATOP_MULT_TRANSPOSE,(void(*)())MatMult_Identity);
+<a name="line82"> 82: </a>  MatShellSetOperation(M,MATOP_GET_DIAGONAL,(void(*)())MatGetDiagonal_Identity);
+
+<a name="line84"> 84: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line85"> 85: </a><font color="#B22222">                Create the eigensolver and set various options</font>
+<a name="line86"> 86: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line88"> 88: </a>  <font color="#B22222">/*</font>
+<a name="line89"> 89: </a><font color="#B22222">     Create eigensolver context</font>
+<a name="line90"> 90: </a><font color="#B22222">  */</font>
+<a name="line91"> 91: </a>  <a href="../../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>(PETSC_COMM_WORLD,&pep);
+
+<a name="line93"> 93: </a>  <font color="#B22222">/*</font>
+<a name="line94"> 94: </a><font color="#B22222">     Set matrices and problem type</font>
+<a name="line95"> 95: </a><font color="#B22222">  */</font>
+<a name="line96"> 96: </a>  A[0] = K; A[1] = C; A[2] = M;
+<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(pep,3,A);
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&st);
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/ST/STSetMatMode.html#STSetMatMode">STSetMatMode</a>(st,ST_MATMODE_SHELL);
+
+<a name="line101">101: </a>  <font color="#B22222">/*</font>
+<a name="line102">102: </a><font color="#B22222">     Set solver parameters at runtime</font>
+<a name="line103">103: </a><font color="#B22222">  */</font>
+<a name="line104">104: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(pep);
+
+<a name="line106">106: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line107">107: </a><font color="#B22222">                      Solve the eigensystem</font>
+<a name="line108">108: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line110">110: </a>  <a href="../../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(pep);
+
+<a name="line112">112: </a>  <font color="#B22222">/*</font>
+<a name="line113">113: </a><font color="#B22222">     Optional: Get some information from the solver and display it</font>
+<a name="line114">114: </a><font color="#B22222">  */</font>
+<a name="line115">115: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetType.html#PEPGetType">PEPGetType</a>(pep,&type);
+<a name="line116">116: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Solution method: %s\n\n"</font>,type);
+<a name="line117">117: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(pep,&nev,NULL,NULL);
+<a name="line118">118: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">" Number of requested eigenvalues: %D\n"</font>,nev);
+
+<a name="line120">120: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line121">121: </a><font color="#B22222">                    Display solution and clean up</font>
+<a name="line122">122: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
+
+<a name="line124">124: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
+<a name="line125">125: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line126">126: </a>  <font color="#4169E1">if</font> (terse) {
+<a name="line127">127: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_RELATIVE,NULL);
+<a name="line128">128: </a>  } <font color="#4169E1">else</font> {
+<a name="line129">129: </a>    PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line130">130: </a>    <a href="../../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(pep,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line131">131: </a>    <a href="../../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_RELATIVE,PETSC_VIEWER_STDOUT_WORLD);
+<a name="line132">132: </a>    PetscViewerPopFormat(PETSC_VIEWER_STDOUT_WORLD);
+<a name="line133">133: </a>  }
+<a name="line134">134: </a>  <a href="../../../../docs/manualpages/PEP/PEPDestroy.html#PEPDestroy">PEPDestroy</a>(&pep);
+<a name="line135">135: </a>  MatDestroy(&M);
+<a name="line136">136: </a>  MatDestroy(&C);
+<a name="line137">137: </a>  MatDestroy(&K);
+<a name="line138">138: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line139">139: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line140">140: </a>}
+
+<a name="line142">142: </a><font color="#B22222">/*</font>
+<a name="line143">143: </a><font color="#B22222">    Compute the matrix vector multiplication y<---T*x where T is a nx by nx</font>
+<a name="line144">144: </a><font color="#B22222">    tridiagonal matrix with DD on the diagonal, DL on the subdiagonal, and</font>
+<a name="line145">145: </a><font color="#B22222">    DU on the superdiagonal.</font>
+<a name="line146">146: </a><font color="#B22222"> */</font>
+<a name="line147">147: </a><strong><font color="#4169E1"><a name="tv"></a>static void tv(int nx,const PetscScalar *x,PetscScalar *y)</font></strong>
+<a name="line148">148: </a>{
+<a name="line149">149: </a>  PetscScalar dd,dl,du;
+<a name="line150">150: </a>  int         j;
+
+<a name="line152">152: </a>  dd  = 4.0;
+<a name="line153">153: </a>  dl  = -1.0;
+<a name="line154">154: </a>  du  = -1.0;
+
+<a name="line156">156: </a>  y[0] =  dd*x[0] + du*x[1];
+<a name="line157">157: </a>  <font color="#4169E1">for</font> (j=1;j<nx-1;j++)
+<a name="line158">158: </a>    y[j] = dl*x[j-1] + dd*x[j] + du*x[j+1];
+<a name="line159">159: </a>  y[nx-1] = dl*x[nx-2] + dd*x[nx-1];
+<a name="line160">160: </a>}
+
+<a name="line164">164: </a><font color="#B22222">/*</font>
+<a name="line165">165: </a><font color="#B22222">    Matrix-vector product subroutine for the 2D Laplacian.</font>
+
+<a name="line167">167: </a><font color="#B22222">    The matrix used is the 2 dimensional discrete Laplacian on unit square with</font>
+<a name="line168">168: </a><font color="#B22222">    zero Dirichlet boundary condition.</font>
+
+<a name="line170">170: </a><font color="#B22222">    Computes y <-- A*x, where A is the block tridiagonal matrix</font>
+
+<a name="line172">172: </a><font color="#B22222">                 | T -I          |</font>
+<a name="line173">173: </a><font color="#B22222">                 |-I  T -I       |</font>
+<a name="line174">174: </a><font color="#B22222">             A = |   -I  T       |</font>
+<a name="line175">175: </a><font color="#B22222">                 |        ...  -I|</font>
+<a name="line176">176: </a><font color="#B22222">                 |           -I T|</font>
+
+<a name="line178">178: </a><font color="#B22222">    The subroutine TV is called to compute y<--T*x.</font>
+<a name="line179">179: </a><font color="#B22222"> */</font>
+<a name="line180">180: </a><strong><font color="#4169E1"><a name="MatMult_Laplacian2D"></a>PetscErrorCode MatMult_Laplacian2D(Mat A,Vec x,Vec y)</font></strong>
+<a name="line181">181: </a>{
+<a name="line182">182: </a>  void              *ctx;
+<a name="line183">183: </a>  int               nx,lo,i,j;
+<a name="line184">184: </a>  const PetscScalar *px;
+<a name="line185">185: </a>  PetscScalar       *py;
+<a name="line186">186: </a>  PetscErrorCode    ierr;
+
+<a name="line189">189: </a>  MatShellGetContext(A,&ctx);
+<a name="line190">190: </a>  nx = *(int*)ctx;
+<a name="line191">191: </a>  VecGetArrayRead(x,&px);
+<a name="line192">192: </a>  VecGetArray(y,&py);
+
+<a name="line194">194: </a>  tv(nx,&px[0],&py[0]);
+<a name="line195">195: </a>  <font color="#4169E1">for</font> (i=0;i<nx;i++) py[i] -= px[nx+i];
+
+<a name="line197">197: </a>  <font color="#4169E1">for</font> (j=2;j<nx;j++) {
+<a name="line198">198: </a>    lo = (j-1)*nx;
+<a name="line199">199: </a>    tv(nx,&px[lo],&py[lo]);
+<a name="line200">200: </a>    <font color="#4169E1">for</font> (i=0;i<nx;i++) py[lo+i] -= px[lo-nx+i] + px[lo+nx+i];
+<a name="line201">201: </a>  }
+
+<a name="line203">203: </a>  lo = (nx-1)*nx;
+<a name="line204">204: </a>  tv(nx,&px[lo],&py[lo]);
+<a name="line205">205: </a>  <font color="#4169E1">for</font> (i=0;i<nx;i++) py[lo+i] -= px[lo-nx+i];
+
+<a name="line207">207: </a>  VecRestoreArrayRead(x,&px);
+<a name="line208">208: </a>  VecRestoreArray(y,&py);
+<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
+<a name="line210">210: </a>}
+
+<a name="line214">214: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Laplacian2D"></a>PetscErrorCode MatGetDiagonal_Laplacian2D(Mat A,Vec diag)</font></strong>
+<a name="line215">215: </a>{
+
+<a name="line219">219: </a>  VecSet(diag,4.0);
+<a name="line220">220: </a>  <font color="#4169E1">return</font>(0);
+<a name="line221">221: </a>}
+
+<a name="line225">225: </a><font color="#B22222">/*</font>
+<a name="line226">226: </a><font color="#B22222">    Matrix-vector product subroutine for the Null matrix.</font>
+<a name="line227">227: </a><font color="#B22222"> */</font>
+<a name="line228">228: </a><strong><font color="#4169E1"><a name="MatMult_Zero"></a>PetscErrorCode MatMult_Zero(Mat A,Vec x,Vec y)</font></strong>
+<a name="line229">229: </a>{
+
+<a name="line233">233: </a>  VecSet(y,0.0);
+<a name="line234">234: </a>  <font color="#4169E1">return</font>(0);
+<a name="line235">235: </a>}
+
+<a name="line239">239: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Zero"></a>PetscErrorCode MatGetDiagonal_Zero(Mat A,Vec diag)</font></strong>
+<a name="line240">240: </a>{
+
+<a name="line244">244: </a>  VecSet(diag,0.0);
+<a name="line245">245: </a>  <font color="#4169E1">return</font>(0);
+<a name="line246">246: </a>}
+
+<a name="line250">250: </a><font color="#B22222">/*</font>
+<a name="line251">251: </a><font color="#B22222">    Matrix-vector product subroutine for the Identity matrix.</font>
+<a name="line252">252: </a><font color="#B22222"> */</font>
+<a name="line253">253: </a><strong><font color="#4169E1"><a name="MatMult_Identity"></a>PetscErrorCode MatMult_Identity(Mat A,Vec x,Vec y)</font></strong>
+<a name="line254">254: </a>{
+<a name="line255">255: </a>  PetscErrorCode    ierr;
+
+<a name="line258">258: </a>  VecCopy(x,y);
+<a name="line259">259: </a>  <font color="#4169E1">return</font>(0);
+<a name="line260">260: </a>}
+
+<a name="line264">264: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Identity"></a>PetscErrorCode MatGetDiagonal_Identity(Mat A,Vec diag)</font></strong>
+<a name="line265">265: </a>{
+
+<a name="line269">269: </a>  VecSet(diag,1.0);
+<a name="line270">270: </a>  <font color="#4169E1">return</font>(0);
+<a name="line271">271: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/pep/examples/tutorials/index.html b/src/pep/examples/tutorials/index.html
index e0d963f..03b1921 100644
--- a/src/pep/examples/tutorials/index.html
+++ b/src/pep/examples/tutorials/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
@@ -19,7 +19,8 @@ Options can also be set directly in application codes by calling the correspondi
 </p>
 
 <p>
-<a href="ex16.c.html">ex16.c: Quadratic eigenproblem for testing the PEP object</a><br>
+<a href="ex16.c.html">ex16.c: Simple quadratic eigenvalue problem</a><br>
 <a href="ex17.c.html">ex17.c: Solves a polynomial eigenproblem P(l)x = 0 with matrices loaded from a file</a><br>
+<a href="ex28.c.html">ex28.c: A quadratic eigenproblem defined using shell matrices</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/pep/examples/tutorials/makefile b/src/pep/examples/tutorials/makefile
index 7e7bbd4..4787a6e 100644
--- a/src/pep/examples/tutorials/makefile
+++ b/src/pep/examples/tutorials/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,11 +24,12 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/pep/examples/tutorials/
-EXAMPLESC  = ex16.c ex17.c
+EXAMPLESC  = ex16.c ex17.c ex28.c
 EXAMPLESF  = ex16f90.F90
 MANSEC     = PEP
 
-TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm
+TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm \
+                           ex28.PETSc runex28_1 ex28.rm
 TESTEXAMPLES_C_NOCOMPLEX = ex17.PETSc runex17_1 ex17.rm
 TESTEXAMPLES_F90         = ex16f90.PETSc runex16f90_1 ex16f90.rm
 
@@ -46,17 +47,21 @@ ex17: ex17.o chkopts
 	-${CLINKER} -o ex17 ex17.o ${SLEPC_PEP_LIB}
 	${RM} ex17.o
 
+ex28: ex28.o chkopts
+	-${CLINKER} -o ex28 ex28.o ${SLEPC_PEP_LIB}
+	${RM} ex28.o
+
 #------------------------------------------------------------------------------------
 DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 
 runex16_1:
-	-@${MPIEXEC} -np 1 ./ex16 -pep_nev 4 -terse > ex16_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex16 -pep_nev 4 -terse > ex16_1.tmp 2>&1; \
 	   if (${DIFF} output/ex16_1.out ex16_1.tmp) then true; \
 	   else echo "Possible problem with ex16_1, diffs above"; fi; \
 	   ${RM} -f ex16_1.tmp
 
 runex16f90_1:
-	-@${MPIEXEC} -np 1 ./ex16f90 -pep_nev 4 -terse > ex16f90_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex16f90 -pep_nev 4 -terse > ex16f90_1.tmp 2>&1; \
 	   if (${DIFF} output/ex16f90_1.out ex16f90_1.tmp) then true; \
 	   else echo "Possible problem with ex16f90_1, diffs above"; fi; \
 	   ${RM} -f ex16f90_1.tmp
@@ -65,9 +70,15 @@ runex17_1:
 	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
            echo "Skipping ex17 test"; \
          else \
-	   ${MPIEXEC} -np 1 ./ex17 -A ${DATAPATH}/speaker107k.petsc,${DATAPATH}/speaker107c.petsc,${DATAPATH}/speaker107m.petsc -pep_nev 4 -pep_ncv 20 -pep_tol 1e-14 -pep_scale both -terse > ex17_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./ex17 -A ${DATAPATH}/speaker107k.petsc,${DATAPATH}/speaker107c.petsc,${DATAPATH}/speaker107m.petsc -pep_nev 4 -pep_ncv 20 -pep_tol 1e-14 -pep_scale both -terse > ex17_1.tmp 2>&1; \
 	   if (${DIFF} output/ex17_1.out ex17_1.tmp) then true; \
 	   else echo "Possible problem with ex17_1, diffs above"; fi; \
 	   ${RM} -f ex17_1.tmp; \
          fi
 
+runex28_1:
+	-@${MPIEXEC} -n 1 ./ex28 -pep_nev 4 -terse > ex28_1.tmp 2>&1; \
+	   if (${DIFF} output/ex28_1.out ex28_1.tmp) then true; \
+	   else echo "Possible problem with ex28_1, diffs above"; fi; \
+	   ${RM} -f ex28_1.tmp
+
diff --git a/src/pep/examples/tutorials/makefile.html b/src/pep/examples/tutorials/makefile.html
index 288f755..dad5c6c 100644
--- a/src/pep/examples/tutorials/makefile.html
+++ b/src/pep/examples/tutorials/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/examples/tutorials/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:08+00:00">
+<meta name="date" content="2016-05-16T10:34:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,11 +35,12 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/pep/examples/tutorials/
-EXAMPLESC  = ex16.c ex17.c
+EXAMPLESC  = ex16.c ex17.c ex28.c
 EXAMPLESF  = ex16f90.F90
 MANSEC     = <a href="ROOT/docs/manualpages/PEP/PEP.html#PEP">PEP</a>
 
-TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm
+TESTEXAMPLES_C           = ex16.PETSc runex16_1 ex16.rm \
+                           ex28.PETSc runex28_1 ex28.rm
 TESTEXAMPLES_C_NOCOMPLEX = ex17.PETSc runex17_1 ex17.rm
 TESTEXAMPLES_F90         = ex16f90.PETSc runex16f90_1 ex16f90.rm
 
@@ -57,17 +58,21 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o ex17 ex17.o ${SLEPC_PEP_LIB}
 	${RM} ex17.o
 
+<strong><font color="#FF0000">ex28:</font></strong> ex28.o chkopts
+	-${CLINKER} -o ex28 ex28.o ${SLEPC_PEP_LIB}
+	${RM} ex28.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 
 <strong><font color="#FF0000">runex16_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex16 -pep_nev 4 -terse > ex16_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex16 -pep_nev 4 -terse > ex16_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex16_1.out ex16_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex16_1, diffs above"</font>; fi; \
 	   ${RM} -f ex16_1.tmp
 
 <strong><font color="#FF0000">runex16f90_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex16f90 -pep_nev 4 -terse > ex16f90_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex16f90 -pep_nev 4 -terse > ex16f90_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex16f90_1.out ex16f90_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex16f90_1, diffs above"</font>; fi; \
 	   ${RM} -f ex16f90_1.tmp
@@ -76,12 +81,18 @@ DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
            echo <font color="#666666">"Skipping ex17 test"</font>; \
          <font color="#4169E1">else</font> \
-	   ${MPIEXEC} -np 1 ./ex17 -A ${DATAPATH}/speaker107k.petsc,${DATAPATH}/speaker107c.petsc,${DATAPATH}/speaker107m.petsc -pep_nev 4 -pep_ncv 20 -pep_tol 1e-14 -pep_scale both -terse > ex17_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./ex17 -A ${DATAPATH}/speaker107k.petsc,${DATAPATH}/speaker107c.petsc,${DATAPATH}/speaker107m.petsc -pep_nev 4 -pep_ncv 20 -pep_tol 1e-14 -pep_scale both -terse > ex17_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex17_1.out ex17_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex17_1, diffs above"</font>; fi; \
 	   ${RM} -f ex17_1.tmp; \
          fi
 
+<strong><font color="#FF0000">runex28_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./ex28 -pep_nev 4 -terse > ex28_1.tmp 2>&1; \
+	   <font color="#4169E1">if</font> (${DIFF} output/ex28_1.out ex28_1.tmp) then true; \
+	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex28_1, diffs above"</font>; fi; \
+	   ${RM} -f ex28_1.tmp
+
 </pre>
 </body>
 
diff --git a/src/pep/examples/tutorials/output/ex16_1.out b/src/pep/examples/tutorials/output/ex16_1.out
index ecc5b56..aa9c28c 100644
--- a/src/pep/examples/tutorials/output/ex16_1.out
+++ b/src/pep/examples/tutorials/output/ex16_1.out
@@ -5,5 +5,5 @@ Quadratic Eigenproblem, N=100 (10x10 grid)
 
  Number of requested eigenvalues: 4
  All requested eigenvalues computed up to the required tolerance:
-     0.00000+2.79964i, 0.00000-2.79964i, 0.00000+2.75708i, 0.00000-2.75708i
+     -1.16404+1.65363i, -1.16404-1.65363i, -0.51784+1.31039i, -0.51784-1.31039i
 
diff --git a/src/pep/examples/tutorials/output/ex16f90_1.out b/src/pep/examples/tutorials/output/ex16f90_1.out
index d83d6b4..c229d76 100644
--- a/src/pep/examples/tutorials/output/ex16f90_1.out
+++ b/src/pep/examples/tutorials/output/ex16f90_1.out
@@ -3,5 +3,5 @@ Quadratic Eigenproblem, N=   100 (  10x  10 grid)
  Solution method: toar                                                                          
  Number of requested eigenvalues:   4
  All requested eigenvalues computed up to the required tolerance:
-     0.00000+2.79964i, 0.00000-2.79964i, 0.00000+2.75708i, 0.00000-2.75708i
+     -1.16404+1.65363i, -1.16404-1.65363i, -0.51784+1.31039i, -0.51784-1.31039i
 
diff --git a/src/pep/examples/tutorials/output/ex28_1.out b/src/pep/examples/tutorials/output/ex28_1.out
new file mode 100644
index 0000000..b6f42ca
--- /dev/null
+++ b/src/pep/examples/tutorials/output/ex28_1.out
@@ -0,0 +1,9 @@
+
+Quadratic Eigenproblem with shell matrices, N=100 (10x10 grid)
+
+ Solution method: toar
+
+ Number of requested eigenvalues: 4
+ All requested eigenvalues computed up to the required tolerance:
+     0.00000+2.79964i, 0.00000-2.79964i, 0.00000+2.75708i, 0.00000-2.75708i
+
diff --git a/src/pep/f90-mod/index.html b/src/pep/f90-mod/index.html
index 2b4894a..e4d0aeb 100644
--- a/src/pep/f90-mod/index.html
+++ b/src/pep/f90-mod/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/f90-mod/makefile b/src/pep/f90-mod/makefile
index 0f9ad14..352f7f1 100644
--- a/src/pep/f90-mod/makefile
+++ b/src/pep/f90-mod/makefile
@@ -1,7 +1,7 @@
 
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/f90-mod/makefile.html b/src/pep/f90-mod/makefile.html
index cf10e6c..c034ce0 100644
--- a/src/pep/f90-mod/makefile.html
+++ b/src/pep/f90-mod/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/f90-mod/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:10+00:00">
+<meta name="date" content="2016-05-16T10:34:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80">
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/f90-mod/slepcpepmod.F b/src/pep/f90-mod/slepcpepmod.F
index 420c0d6..0215c7f 100644
--- a/src/pep/f90-mod/slepcpepmod.F
+++ b/src/pep/f90-mod/slepcpepmod.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
diff --git a/src/pep/f90-mod/slepcpepmod.F.html b/src/pep/f90-mod/slepcpepmod.F.html
index 7cfe256..c49a612 100644
--- a/src/pep/f90-mod/slepcpepmod.F.html
+++ b/src/pep/f90-mod/slepcpepmod.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/f90-mod/slepcpepmod.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:10+00:00">
+<meta name="date" content="2016-05-16T10:34:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/f90-mod/slepcpepmod.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/f90-mod/slepcpepmod.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
diff --git a/src/pep/impls/index.html b/src/pep/impls/index.html
index acc4802..3dd812b 100644
--- a/src/pep/impls/index.html
+++ b/src/pep/impls/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/jd/ftn-auto/pjdoptf.c b/src/pep/impls/jd/ftn-auto/pjdoptf.c
index 64c1ac9..ae845a4 100644
--- a/src/pep/impls/jd/ftn-auto/pjdoptf.c
+++ b/src/pep/impls/jd/ftn-auto/pjdoptf.c
@@ -29,16 +29,6 @@ extern void PetscRmPointer(void*);
 
 #include "slepcpep.h"
 #ifdef PETSC_HAVE_FORTRAN_CAPS
-#define pepjdsettolerances_ PEPJDSETTOLERANCES
-#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define pepjdsettolerances_ pepjdsettolerances
-#endif
-#ifdef PETSC_HAVE_FORTRAN_CAPS
-#define pepjdgettolerances_ PEPJDGETTOLERANCES
-#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
-#define pepjdgettolerances_ pepjdgettolerances
-#endif
-#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define pepjdsetrestart_ PEPJDSETRESTART
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define pepjdsetrestart_ pepjdsetrestart
@@ -54,14 +44,6 @@ extern void PetscRmPointer(void*);
 #if defined(__cplusplus)
 extern "C" {
 #endif
-PETSC_EXTERN void PETSC_STDCALL  pepjdsettolerances_(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol, int *__ierr ){
-*__ierr = PEPJDSetTolerances(
-	(PEP)PetscToPointer((pep) ),*mtol,*htol,*stol);
-}
-PETSC_EXTERN void PETSC_STDCALL  pepjdgettolerances_(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol, int *__ierr ){
-*__ierr = PEPJDGetTolerances(
-	(PEP)PetscToPointer((pep) ),mtol,htol,stol);
-}
 PETSC_EXTERN void PETSC_STDCALL  pepjdsetrestart_(PEP pep,PetscReal *keep, int *__ierr ){
 *__ierr = PEPJDSetRestart(
 	(PEP)PetscToPointer((pep) ),*keep);
diff --git a/src/pep/impls/jd/index.html b/src/pep/impls/jd/index.html
index 7db0c2f..8d160d5 100644
--- a/src/pep/impls/jd/index.html
+++ b/src/pep/impls/jd/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/jd/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/jd/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/jd/makefile b/src/pep/impls/jd/makefile
index 90d6114..d96344c 100644
--- a/src/pep/impls/jd/makefile
+++ b/src/pep/impls/jd/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/jd/makefile.html b/src/pep/impls/jd/makefile.html
index 0fa3674..77a4af1 100644
--- a/src/pep/impls/jd/makefile.html
+++ b/src/pep/impls/jd/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/jd/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:07+00:00">
+<meta name="date" content="2016-05-16T10:34:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/jd/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/jd/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/impls/jd/pjd.c b/src/pep/impls/jd/pjd.c
index a3bacda..9ffaf27 100644
--- a/src/pep/impls/jd/pjd.c
+++ b/src/pep/impls/jd/pjd.c
@@ -22,7 +22,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -41,8 +41,43 @@
 */
 
 #include <slepc/private/pepimpl.h>    /*I "slepcpep.h" I*/
-#include <slepc/private/dsimpl.h>
 #include "pjdp.h"
+#include <slepcblaslapack.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDDuplicateBasis"
+/*
+   Duplicate and resize auxiliary basis
+*/
+static PetscErrorCode PEPJDDuplicateBasis(PEP pep,BV *basis)
+{
+  PetscErrorCode     ierr;
+  PetscInt           nloc,m;
+  PetscMPIInt        rank,nproc;
+  BVType             type;
+  BVOrthogType       otype;
+  BVOrthogRefineType oref;
+  PetscReal          oeta;
+  BVOrthogBlockType  oblock;
+
+  PetscFunctionBegin;
+  if (pep->nev>1) {
+    ierr = BVCreate(PetscObjectComm((PetscObject)pep),basis);CHKERRQ(ierr);
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)pep),&rank);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pep),&nproc);CHKERRQ(ierr);
+    ierr = BVGetSizes(pep->V,&nloc,NULL,&m);CHKERRQ(ierr);
+    if (rank==nproc-1) nloc += pep->nev-1;
+    ierr = BVSetSizes(*basis,nloc,PETSC_DECIDE,m);CHKERRQ(ierr);
+    ierr = BVGetType(pep->V,&type);CHKERRQ(ierr);
+    ierr = BVSetType(*basis,type);CHKERRQ(ierr);
+    ierr = BVGetOrthogonalization(pep->V,&otype,&oref,&oeta,&oblock);CHKERRQ(ierr);
+    ierr = BVSetOrthogonalization(*basis,otype,oref,oeta,oblock);CHKERRQ(ierr);
+    ierr = PetscObjectStateIncrease((PetscObject)*basis);CHKERRQ(ierr);
+  } else {
+    ierr = BVDuplicate(pep->V,basis);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetUp_JD"
@@ -58,7 +93,6 @@ PetscErrorCode PEPSetUp_JD(PEP pep)
   ierr = PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);CHKERRQ(ierr);
   if (!pep->max_it) pep->max_it = PetscMax(100,2*pep->n/pep->ncv);
   if (!pep->which) pep->which = PEP_LARGEST_MAGNITUDE;
-  if (pep->nev>1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Polynomial JD does not support nev>1 yet");
 
   /* Set STSHIFT as the default ST */
   if (!((PetscObject)pep->st)->type_name) {
@@ -74,11 +108,20 @@ PetscErrorCode PEPSetUp_JD(PEP pep)
   if (!pjd->keep) pjd->keep = 0.5;
 
   ierr = PEPAllocateSolution(pep,0);CHKERRQ(ierr);
-  ierr = PEPSetWorkVecs(pep,4);CHKERRQ(ierr);
-  ierr = PetscMalloc1(pep->nmat,&pjd->W);CHKERRQ(ierr);
+  ierr = PEPSetWorkVecs(pep,5);CHKERRQ(ierr);
+  ierr = PetscMalloc2(pep->nmat,&pjd->TV,pep->nmat,&pjd->AX);CHKERRQ(ierr);
   for (i=0;i<pep->nmat;i++) {
-    ierr = BVDuplicate(pep->V,pjd->W+i);CHKERRQ(ierr);
+    ierr = PEPJDDuplicateBasis(pep,pjd->TV+i);CHKERRQ(ierr);
   }
+  ierr = PEPJDDuplicateBasis(pep,&pjd->W);CHKERRQ(ierr);
+  if (pep->nev>1) {
+    ierr = PEPJDDuplicateBasis(pep,&pjd->V);CHKERRQ(ierr);
+    for (i=0;i<pep->nmat;i++) {
+      ierr = BVDuplicateResize(pep->V,pep->nev-1,pjd->AX+i);CHKERRQ(ierr);
+    }
+    ierr = BVDuplicateResize(pep->V,pep->nev,&pjd->X);CHKERRQ(ierr);
+    ierr = PetscCalloc3((pep->nev)*(pep->nev),&pjd->XpX,pep->nev*pep->nev,&pjd->T,pep->nev*pep->nev*pep->nmat,&pjd->Tj);CHKERRQ(ierr);
+  } else pjd->V = pep->V;
   ierr = DSSetType(pep->ds,DSPEP);CHKERRQ(ierr);
   ierr = DSPEPSetDegree(pep->ds,pep->nmat-1);CHKERRQ(ierr);
   ierr = DSAllocate(pep->ds,pep->ncv);CHKERRQ(ierr);
@@ -86,46 +129,194 @@ PetscErrorCode PEPSetUp_JD(PEP pep)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPJDPurgeDuplicates"
+#define __FUNCT__ "PEPJDUpdateTV"
 /*
-   Check for multiple eigenvalues.
+   Updates columns (low to (high-1)) of TV[i]
 */
-static PetscErrorCode PEPJDPurgeDuplicates(PEP pep)
+static PetscErrorCode PEPJDUpdateTV(PEP pep,PetscInt low,PetscInt high,Vec *w)
 {
-  PEP_JD   *pjd = (PEP_JD*)pep->data;
-  PetscInt i,k;
+  PetscErrorCode ierr;
+  PEP_JD         *pjd = (PEP_JD*)pep->data;
+  PetscInt       pp,col,i,j,nloc,nconv,deg=pep->nmat-1;
+  Vec            v1,v2,t1,t2;
+  PetscScalar    *array1,*array2,*x2,*tt,*xx,*y2,zero=0.0,sone=1.0;
+  PetscMPIInt    rk,np,count;
+  PetscBLASInt   n,ld,one=1;
 
   PetscFunctionBegin;
-  k = pep->nconv;  /* TODO: should have a while loop here */
-  for (i=0;i<pep->nconv;i++) {
-    if (SlepcAbsEigenvalue(pep->eigr[i]-pep->eigr[k],pep->eigi[i]-pep->eigi[k])<pjd->mtol) {
-      pep->eigr[k] = PETSC_INFINITY;
-      pep->eigi[k] = PETSC_INFINITY;
-      break;
+  nconv = pjd->nconv;
+  ierr = PetscMalloc3(nconv,&tt,nconv,&x2,nconv,&xx);CHKERRQ(ierr);
+  ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)pep),&rk);CHKERRQ(ierr);
+  ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pep),&np);CHKERRQ(ierr);
+  ierr = BVGetSizes(pep->V,&nloc,NULL,NULL);CHKERRQ(ierr); 
+  t1 = w[0];
+  t2 = w[1];
+  for (col=low;col<high;col++) {
+    ierr = BVGetColumn(pjd->V,col,&v1);CHKERRQ(ierr);
+    ierr = VecGetArray(v1,&array1);CHKERRQ(ierr);
+    if (nconv>0) {
+      if (rk==np-1) { for (i=0;i<nconv;i++) x2[i] = array1[nloc+i]; }
+      ierr = PetscMPIIntCast(nconv,&count);CHKERRQ(ierr);
+      ierr = MPI_Bcast(x2,nconv,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pep));CHKERRQ(ierr);
+    }
+    ierr = VecPlaceArray(t1,array1);CHKERRQ(ierr);
+    for (pp=0;pp<pep->nmat;pp++) {
+      ierr = BVGetColumn(pjd->TV[pp],col,&v2);CHKERRQ(ierr);
+      ierr = VecGetArray(v2,&array2);CHKERRQ(ierr);
+      ierr = VecPlaceArray(t2,array2);CHKERRQ(ierr);
+      ierr = MatMult(pep->A[pp],t1,t2);CHKERRQ(ierr);
+      if (nconv) {
+        ierr = PetscBLASIntCast(pjd->nconv,&n);CHKERRQ(ierr);
+        ierr = PetscBLASIntCast(pep->nev,&ld);CHKERRQ(ierr);
+        for (j=0;j<nconv;j++) tt[j] = x2[j];
+        for (i=pp+1;i<pep->nmat;i++) {
+          ierr = BVMultVec(pjd->AX[i],1.0,1.0,t2,tt);CHKERRQ(ierr);
+          if (i!=pep->nmat-1) PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n,pjd->T,&ld,tt,&one));
+        }
+        ierr = BVDotVec(pjd->X,t1,xx);CHKERRQ(ierr);
+        if (rk==np-1 && pp<deg) {
+          y2 = array2+nloc;
+          for (j=0;j<nconv;j++) { y2[j] = xx[j]; xx[j] = x2[j]; }
+          PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","C","N",&n,pjd->Tj+ld*ld*pp,&ld,y2,&one));
+          for (i=pp+1;i<pep->nmat-1;i++) {
+            PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&n,&n,&sone,pjd->XpX,&ld,xx,&one,&zero,tt,&one));
+            PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","C","N",&n,pjd->Tj+ld*ld*i,&ld,tt,&one));
+            for (j=0;j<nconv;j++) y2[j] += tt[j];
+            if (i<pep->nmat-2) PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n,pjd->T,&ld,xx,&one));
+          }
+        }
+      }
+      ierr = VecResetArray(t2);CHKERRQ(ierr);
+      ierr = VecRestoreArray(v2,&array2);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(pjd->TV[pp],col,&v2);CHKERRQ(ierr);        
     }
+    ierr = VecResetArray(t1);CHKERRQ(ierr);
+    ierr = VecRestoreArray(v1,&array1);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->V,col,&v1);CHKERRQ(ierr);
   }
+  ierr = PetscFree3(tt,x2,xx);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPJDDiffMatMult"
+#define __FUNCT__ "PEPJDOrthogonalize"
 /*
-   Multiplication of derivative of P, i.e.
-      P'(\lambda) x = \sum_{i=1}^{n} (i*\lambda^{i-1} A_i)x 
+   RRQR of X. Xin*P=Xou*R. Rank of R is rk
 */
-static PetscErrorCode PEPJDDiffMatMult(PEP pep,PetscScalar theta,Vec x,Vec y,Vec w)
+static PetscErrorCode PEPJDOrthogonalize(PetscInt row,PetscInt col,PetscScalar *X,PetscInt ldx,PetscInt *rk,PetscInt *P,PetscScalar *R,PetscInt ldr)
 {
+#if defined(SLEPC_MISSING_LAPACK_GEQP3)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQP3 - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
-  PetscScalar    fact=1.0;
-  PetscInt       i;
+  PetscInt       i,j,n,r;
+  PetscBLASInt   row_,col_,ldx_,*p,lwork,info,n_;
+  PetscScalar    *tau,*work;
+  PetscReal      tol,*rwork;
 
   PetscFunctionBegin;
-  ierr = VecSet(y,0.0);CHKERRQ(ierr);
-  for (i=1;i<pep->nmat;i++) {
-    ierr = MatMult(pep->A[i],x,w);CHKERRQ(ierr);
-    ierr = VecAXPY(y,fact*(PetscReal)i,w);CHKERRQ(ierr);
-    fact *= theta;
+  ierr = PetscBLASIntCast(row,&row_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(col,&col_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(ldx,&ldx_);CHKERRQ(ierr);
+  n = PetscMin(row,col);
+  ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+  lwork = 3*col_+1;
+  ierr = PetscMalloc4(col,&p,n,&tau,lwork,&work,2*col,&rwork);CHKERRQ(ierr);
+  for (i=1;i<col;i++) p[i] = 0;
+  p[0] = 1;
+
+  /* rank revealing QR */
+#if defined(PETSC_USE_COMPLEX)
+  PetscStackCallBLAS("LAPACKgeqp3",LAPACKgeqp3_(&row_,&col_,X,&ldx_,p,tau,work,&lwork,rwork,&info));
+#else
+  PetscStackCallBLAS("LAPACKgeqp3",LAPACKgeqp3_(&row_,&col_,X,&ldx_,p,tau,work,&lwork,&info));
+#endif
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEQP3 %d",info);
+  if (P) for (i=0;i<col;i++) P[i] = p[i];
+
+  /* rank computation */
+  tol = PetscMax(row,col)*PETSC_MACHINE_EPSILON*PetscAbsScalar(X[0]);
+  r = 1;
+  for (i=1;i<n;i++) { 
+    if (PetscAbsScalar(X[i+ldx*i])>tol) r++;
+    else break;
+  }
+  if (rk) *rk=r;
+
+  /* copy upper triangular matrix if requested */
+  if (R) {
+     for (i=0;i<r;i++) {
+       ierr = PetscMemzero(R+i*ldr,r*sizeof(PetscScalar));CHKERRQ(ierr);
+       for (j=0;j<=i;j++) R[i*ldr+j] = X[i*ldx+j];
+     }
+  }
+  PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&row_,&n_,&n_,X,&ldx_,tau,work,&lwork,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
+  ierr = PetscFree4(p,tau,work,rwork);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDExtendedPCApply"
+/*
+   Application of extended preconditioner
+*/
+static PetscErrorCode PEPJDExtendedPCApply(PC pc,Vec x,Vec y)
+{
+  PetscInt          i,j,nloc,n,ld;
+  PetscMPIInt       rk,np,count;
+  Vec               tx,ty;
+  PEP_JD_PCSHELL    *ctx;
+  PetscErrorCode    ierr;
+  const PetscScalar *array1;
+  PetscScalar       *x2=NULL,*t=NULL,*ps,*array2;
+  PetscBLASInt      one=1.0,ld_,n_;
+
+  PetscFunctionBegin;
+  ierr = PCShellGetContext(pc,(void**)&ctx);CHKERRQ(ierr);
+  n  = ctx->n;
+  ps = ctx->ps;
+  ld = ctx->ld;
+  if (n) {
+    ierr = PetscMalloc2(n,&x2,n,&t);CHKERRQ(ierr);
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)pc),&rk);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pc),&np);CHKERRQ(ierr);
+    if (rk==np-1) {
+      ierr = VecGetSize(ctx->work[0],&nloc);CHKERRQ(ierr); 
+      ierr = VecGetArrayRead(x,&array1);CHKERRQ(ierr);
+      for (i=0;i<n;i++) x2[i] = array1[nloc+i];
+      ierr = VecRestoreArrayRead(x,&array1);CHKERRQ(ierr);
+    }
+    ierr = PetscMPIIntCast(n,&count);CHKERRQ(ierr);
+    ierr = MPI_Bcast(x2,count,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pc));CHKERRQ(ierr);
+  }
+
+  /* y = B\x apply PC */
+  tx = ctx->work[0];
+  ty = ctx->work[1];
+  ierr = VecGetArrayRead(x,&array1);CHKERRQ(ierr);
+  ierr = VecPlaceArray(tx,array1);CHKERRQ(ierr);
+  ierr = VecGetArray(y,&array2);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ty,array2);CHKERRQ(ierr);
+  ierr = PCApply(ctx->pc,tx,ty);CHKERRQ(ierr);
+  if (n) {
+    for (j=0;j<n;j++) {
+      t[j] = 0.0;
+      for (i=0;i<n;i++) t[j] += ctx->M[i+j*ld]*x2[i];
+    }
+    if (rk==np-1) for (i=0;i<n;i++) array2[nloc+i] = t[i];
+    ierr = PetscBLASIntCast(ld,&ld_);CHKERRQ(ierr);
+    ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+    PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n_,ps,&ld_,t,&one));
+    ierr = BVMultVec(ctx->X,-1.0,1.0,ty,t);CHKERRQ(ierr);
+    ierr = PetscFree2(x2,t);CHKERRQ(ierr);
   }
+  ierr = VecResetArray(tx);CHKERRQ(ierr);
+  ierr = VecResetArray(ty);CHKERRQ(ierr);
+  ierr = VecRestoreArrayRead(x,&array1);CHKERRQ(ierr);
+  ierr = VecRestoreArray(y,&array2);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -139,106 +330,605 @@ static PetscErrorCode PCShellApply_PEPJD(PC pc,Vec x,Vec y)
 {
   PetscErrorCode ierr;
   PetscScalar    eta;
-  PEP_JD_PCSHELL *pcctx;
+  PEP_JD_PCSHELL *ctx;
 
   PetscFunctionBegin;
-  ierr = PCShellGetContext(pc,(void**)&pcctx);CHKERRQ(ierr);
+  ierr = PCShellGetContext(pc,(void**)&ctx);CHKERRQ(ierr);
 
-  /* y = B\x */
-  ierr = PCApply(pcctx->pc,x,y);CHKERRQ(ierr);
+  /* y = B\x apply extended PC */
+  ierr = PEPJDExtendedPCApply(pc,x,y);CHKERRQ(ierr);
 
   /* Compute eta = u'*y / u'*Bp */
-  ierr = VecDot(y,pcctx->u,&eta);CHKERRQ(ierr);
-  eta /= pcctx->gamma;
+  ierr = VecDot(y,ctx->u,&eta);CHKERRQ(ierr);
+  eta /= ctx->gamma;
   
   /* y = y - eta*Bp */
-  ierr = VecAXPY(y,-eta,pcctx->Bp);CHKERRQ(ierr); 
+  ierr = VecAXPY(y,-eta,ctx->Bp);CHKERRQ(ierr); 
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPSolve_JD"
-PetscErrorCode PEPSolve_JD(PEP pep)
+#define __FUNCT__ "PEPJDCopyToExtendedVec"
+static PetscErrorCode PEPJDCopyToExtendedVec(PEP pep,Vec v,PetscScalar *a,PetscInt na,PetscInt off,Vec vex,PetscBool back)
+{
+  PetscErrorCode ierr;
+  PetscMPIInt    np,rk,count;
+  PetscScalar    *array1,*array2;
+  PetscInt       nloc;
+
+  PetscFunctionBegin;
+  ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)pep),&rk);CHKERRQ(ierr);
+  ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pep),&np);CHKERRQ(ierr);
+  ierr = BVGetSizes(pep->V,&nloc,NULL,NULL);CHKERRQ(ierr);
+  if (v) {
+    ierr = VecGetArray(v,&array1);CHKERRQ(ierr);
+    ierr = VecGetArray(vex,&array2);CHKERRQ(ierr);
+    if (back) {
+      ierr = PetscMemcpy(array1,array2,nloc*sizeof(PetscScalar));CHKERRQ(ierr);
+    } else {
+      ierr = PetscMemcpy(array2,array1,nloc*sizeof(PetscScalar));CHKERRQ(ierr);
+    }
+    ierr = VecRestoreArray(v,&array1);CHKERRQ(ierr);
+    ierr = VecRestoreArray(vex,&array2);CHKERRQ(ierr);
+  }
+  if (a) {
+    if (rk==np-1) {
+      ierr = VecGetArray(vex,&array2);CHKERRQ(ierr);
+      if (back) {
+        ierr = PetscMemcpy(a,array2+nloc+off,na*sizeof(PetscScalar));CHKERRQ(ierr);
+      } else {
+        ierr = PetscMemcpy(array2+nloc+off,a,na*sizeof(PetscScalar));CHKERRQ(ierr);
+      }
+      ierr = VecRestoreArray(vex,&array2);CHKERRQ(ierr);
+    }
+    if (back) {
+      ierr = PetscMPIIntCast(na,&count);CHKERRQ(ierr);
+      ierr = MPI_Bcast(a,count,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pep));CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDComputePResidual"
+static PetscErrorCode PEPJDComputePResidual(PEP pep,Vec u,PetscScalar theta,Vec p,Vec *work)
 {
+  PEP_JD         *pjd = (PEP_JD*)pep->data;
   PetscErrorCode ierr;
+  PetscMPIInt    rk,np,count;
+  Vec            tu,tp,w;
+  PetscScalar    *array1,*array2,*x2=NULL,*y2,fact=1.0,*q=NULL,*tt=NULL,*xx=NULL,sone=1.0,zero=0.0;
+  PetscInt       i,j,nconv=pjd->nconv,nloc,deg=pep->nmat-1;
+  PetscBLASInt   n,ld,one=1;
+
+  PetscFunctionBegin;
+  if (nconv>0) {
+    ierr = PetscMalloc4(nconv,&xx,nconv,&tt,nconv,&x2,nconv,&q);CHKERRQ(ierr);
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)pep),&rk);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pep),&np);CHKERRQ(ierr);
+    if (rk==np-1) {
+      ierr = BVGetSizes(pep->V,&nloc,NULL,NULL);CHKERRQ(ierr); 
+      ierr = VecGetArray(u,&array1);CHKERRQ(ierr);
+      for (i=0;i<nconv;i++) x2[i] = array1[nloc+i];
+      ierr = VecRestoreArray(u,&array1);CHKERRQ(ierr);
+    }
+    ierr = PetscMPIIntCast(nconv,&count);CHKERRQ(ierr);
+    ierr = MPI_Bcast(x2,count,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pep));CHKERRQ(ierr);
+  }
+  tu = work[0];
+  tp = work[1];
+  w  = work[2];
+  ierr = VecGetArray(u,&array1);CHKERRQ(ierr);
+  ierr = VecPlaceArray(tu,array1);CHKERRQ(ierr);
+  ierr = VecGetArray(p,&array2);CHKERRQ(ierr);
+  ierr = VecPlaceArray(tp,array2);CHKERRQ(ierr);
+  ierr = VecSet(tp,0.0);CHKERRQ(ierr);
+  for (i=1;i<pep->nmat;i++) {
+    ierr = MatMult(pep->A[i],tu,w);CHKERRQ(ierr);
+    ierr = VecAXPY(tp,fact*(PetscReal)i,w);CHKERRQ(ierr);
+    fact *= theta;
+  }
+  if (nconv) {
+    ierr = PetscBLASIntCast(nconv,&n);CHKERRQ(ierr);
+    ierr = PetscBLASIntCast(pep->nev,&ld);CHKERRQ(ierr);
+    for (j=0;j<nconv;j++) q[j] = x2[j];
+    fact = theta;
+    for (i=2;i<pep->nmat;i++) {
+      ierr = BVMultVec(pjd->AX[i],1.0,1.0,tp,q);CHKERRQ(ierr);
+      PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n,pjd->T,&ld,q,&one));
+      for (j=0;j<nconv;j++) q[j] += (PetscReal)i*fact*x2[j];
+      fact *= theta;
+    }
+    ierr = BVSetActiveColumns(pjd->X,0,nconv);CHKERRQ(ierr);
+    ierr = BVDotVec(pjd->X,tu,xx);CHKERRQ(ierr);
+    if (rk==np-1) {
+      y2 = array2+nloc;
+      for (i=0;i<nconv;i++) { q[i] = x2[i]; y2[i] = xx[i]; }
+      PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","C","N",&n,pjd->Tj+ld*ld,&ld,y2,&one));
+      fact = theta;
+      for (j=2;j<deg;j++) {
+        PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&n,&n,&sone,pjd->XpX,&ld,q,&one,&zero,tt,&one));
+        for (i=0;i<nconv;i++) tt[i] += (PetscReal)j*fact*xx[i];
+        PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","C","N",&n,pjd->Tj+ld*ld*j,&ld,tt,&one));
+        for (i=0;i<nconv;i++) y2[i] += tt[i];
+        PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n,pjd->T,&ld,q,&one));
+        for (i=0;i<nconv;i++) q[i] += (PetscReal)j*fact*x2[i];
+        fact *= theta;
+      }
+    }
+    ierr = PetscFree4(xx,x2,q,tt);CHKERRQ(ierr);
+  }
+  ierr = VecResetArray(tu);CHKERRQ(ierr);
+  ierr = VecRestoreArray(u,&array1);CHKERRQ(ierr);
+  ierr = VecResetArray(tp);CHKERRQ(ierr);
+  ierr = VecRestoreArray(p,&array2);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDProcessInitialSpace"
+static PetscErrorCode PEPJDProcessInitialSpace(PEP pep,Vec *w)
+{
   PEP_JD         *pjd = (PEP_JD*)pep->data;
-  PEP_JD_PCSHELL *pcctx;
-  PetscInt       k,nv,ld,minv,low,high;
-  PetscScalar    theta,*pX;
+  PetscErrorCode ierr;
+  PetscScalar    *tt;
+  Vec            vg,wg;
+  PetscInt       i;
   PetscReal      norm;
-  PetscBool      lindep;
-  Vec            t,u=pep->work[0],p=pep->work[1],r=pep->work[2],w=pep->work[3];
-  Mat            G,X,Ptheta;
-  KSP            ksp;
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc1(pep->nev-1,&tt);CHKERRQ(ierr);
+  if (pep->nini==0) {
+    ierr = BVSetRandomColumn(pjd->V,0);CHKERRQ(ierr);
+    for (i=0;i<pep->nev-1;i++) tt[i] = 0.0;
+    ierr = BVGetColumn(pjd->V,0,&vg);CHKERRQ(ierr);
+    ierr = PEPJDCopyToExtendedVec(pep,NULL,tt,pep->nev-1,0,vg,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->V,0,&vg);CHKERRQ(ierr);
+    ierr = BVNormColumn(pjd->V,0,NORM_2,&norm);CHKERRQ(ierr);
+    ierr = BVScaleColumn(pjd->V,0,1.0/norm);CHKERRQ(ierr);
+    ierr = BVGetColumn(pjd->V,0,&vg);CHKERRQ(ierr);
+    ierr = BVGetColumn(pjd->W,0,&wg);CHKERRQ(ierr);
+    ierr = VecSet(wg,0.0);CHKERRQ(ierr);
+    ierr = PEPJDComputePResidual(pep,vg,pep->target,wg,w);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->W,0,&wg);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->V,0,&vg);CHKERRQ(ierr);
+    ierr = BVNormColumn(pjd->W,0,NORM_2,&norm);CHKERRQ(ierr);
+    ierr = BVScaleColumn(pjd->W,0,1.0/norm);CHKERRQ(ierr);
+  } else {
+   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TO DO");
+  }
+  ierr = PetscFree(tt);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDShellMatMult"
+static PetscErrorCode PEPJDShellMatMult(Mat P,Vec x,Vec y)
+{
+  PetscErrorCode    ierr;
+  PEP_JD_MATSHELL   *matctx;
+  PEP_JD            *pjd;
+  PetscMPIInt       rk,np,count;
+  PetscInt          i,j,nconv,nloc,nmat,ldt,deg;
+  Vec               tx,ty;
+  PetscScalar       *array2,*x2=NULL,*y2,fact=1.0,*q=NULL,*tt=NULL,*xx=NULL,theta,*yy=NULL,sone=1.0,zero=0.0;
+  PetscBLASInt      n,ld,one=1;
+  const PetscScalar *array1;
+
+  PetscFunctionBegin;
+  ierr  = MatShellGetContext(P,(void**)&matctx);CHKERRQ(ierr);
+  pjd   = (PEP_JD*)(matctx->pep->data);
+  nconv = pjd->nconv;
+  theta = matctx->theta;
+  nmat  = matctx->pep->nmat;
+  deg   = nmat-1;
+  ldt   = matctx->pep->nev;
+  if (nconv>0) {
+    ierr = PetscMalloc5(nconv,&tt,nconv,&x2,nconv,&q,nconv,&xx,nconv,&yy);CHKERRQ(ierr);
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)P),&rk);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)P),&np);CHKERRQ(ierr);
+    if (rk==np-1) {
+      ierr = BVGetSizes(matctx->pep->V,&nloc,NULL,NULL);CHKERRQ(ierr); 
+      ierr = VecGetArrayRead(x,&array1);CHKERRQ(ierr);
+      for (i=0;i<nconv;i++) x2[i] = array1[nloc+i];
+      ierr = VecRestoreArrayRead(x,&array1);CHKERRQ(ierr);
+    }
+    ierr = PetscMPIIntCast(nconv,&count);CHKERRQ(ierr);
+    ierr = MPI_Bcast(x2,nconv,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)P));CHKERRQ(ierr);
+  }
+  tx = matctx->work[0];
+  ty = matctx->work[1];
+  ierr = VecGetArrayRead(x,&array1);CHKERRQ(ierr);
+  ierr = VecPlaceArray(tx,array1);CHKERRQ(ierr);
+  ierr = VecGetArray(y,&array2);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ty,array2);CHKERRQ(ierr);
+  ierr = VecSet(ty,0.0);CHKERRQ(ierr);
+  ierr = MatMult(matctx->P,tx,ty);CHKERRQ(ierr);
+  if (nconv) {
+    ierr = PetscBLASIntCast(pjd->nconv,&n);CHKERRQ(ierr);
+    ierr = PetscBLASIntCast(ldt,&ld);CHKERRQ(ierr);
+    for (j=0;j<nconv;j++) q[j] = x2[j];
+    fact = theta;
+    for (i=1;i<nmat;i++) {
+      ierr = BVMultVec(pjd->AX[i],1.0,1.0,ty,q);CHKERRQ(ierr);
+      PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n,pjd->T,&ld,q,&one));
+      for (j=0;j<nconv;j++) q[j] += fact*x2[j];
+      fact *= theta;
+    }
+    ierr = BVSetActiveColumns(pjd->X,0,nconv);CHKERRQ(ierr);    
+    ierr = BVDotVec(pjd->X,tx,xx);CHKERRQ(ierr);
+    if (rk==np-1) {
+      y2 = array2+nloc;
+      for (i=0;i<nconv;i++) { q[i] = x2[i]; y2[i] = xx[i]; }
+      fact = theta;
+      for (j=1;j<deg;j++) {
+        PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&n,&n,&sone,pjd->XpX,&ld,q,&one,&zero,tt,&one));
+        for (i=0;i<nconv;i++) tt[i] += fact*xx[i];
+        PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","C","N",&n,pjd->Tj+ld*ld*j,&ld,tt,&one));
+        for (i=0;i<nconv;i++) y2[i] += tt[i];
+        PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","N","N",&n,pjd->T,&ld,q,&one));
+        for (i=0;i<nconv;i++) q[i] += fact*x2[i];
+        fact *= theta;
+      }
+    }
+    ierr = PetscFree5(tt,x2,q,xx,yy);CHKERRQ(ierr);
+  }
+  ierr = VecResetArray(tx);CHKERRQ(ierr);
+  ierr = VecRestoreArrayRead(x,&array1);CHKERRQ(ierr);
+  ierr = VecResetArray(ty);CHKERRQ(ierr);
+  ierr = VecRestoreArray(y,&array2);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDCreateShellPC"
+static PetscErrorCode PEPJDCreateShellPC(PEP pep)
+{
+  PEP_JD          *pjd = (PEP_JD*)pep->data;
+  PEP_JD_PCSHELL  *pcctx;
+  PEP_JD_MATSHELL *matctx;
+  KSP             ksp;
+  PetscInt        nloc,mloc;
+  PetscMPIInt     np,rk;
+  PetscErrorCode  ierr;
+
+  PetscFunctionBegin;
+  ierr = PCCreate(PetscObjectComm((PetscObject)pep),&pjd->pcshell);CHKERRQ(ierr);
+  ierr = PCSetType(pjd->pcshell,PCSHELL);CHKERRQ(ierr);
+  ierr = PCShellSetName(pjd->pcshell,"PCPEPJD");CHKERRQ(ierr);
+  ierr = PCShellSetApply(pjd->pcshell,PCShellApply_PEPJD);CHKERRQ(ierr);
+  ierr = PetscNew(&pcctx);CHKERRQ(ierr);
+  ierr = PCShellSetContext(pjd->pcshell,pcctx);CHKERRQ(ierr);
+  ierr = STGetKSP(pep->st,&ksp);CHKERRQ(ierr);
+  ierr = BVCreateVec(pjd->V,&pcctx->Bp);CHKERRQ(ierr);
+  ierr = KSPGetPC(ksp,&pcctx->pc);CHKERRQ(ierr);
+  ierr = PetscObjectReference((PetscObject)pcctx->pc);CHKERRQ(ierr);
+  ierr = MatGetLocalSize(pep->A[0],&mloc,&nloc);CHKERRQ(ierr);
+  if (pep->nev>1) {
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)pep),&rk);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pep),&np);CHKERRQ(ierr);
+    if (rk==np-1) { nloc += pep->nev-1; mloc += pep->nev-1; }
+  }
+  ierr = PetscNew(&matctx);CHKERRQ(ierr);
+  ierr = MatCreateShell(PetscObjectComm((PetscObject)pep),nloc,mloc,PETSC_DETERMINE,PETSC_DETERMINE,matctx,&pjd->Pshell);CHKERRQ(ierr);
+  ierr = MatShellSetOperation(pjd->Pshell,MATOP_MULT,(void(*)())PEPJDShellMatMult);CHKERRQ(ierr);
+  matctx->pep = pep;
+  ierr = MatDuplicate(pep->A[0],MAT_DO_NOT_COPY_VALUES,&matctx->P);CHKERRQ(ierr);
+  ierr = PCSetOperators(pcctx->pc,matctx->P,matctx->P);CHKERRQ(ierr);
+  ierr = KSPSetPC(ksp,pjd->pcshell);CHKERRQ(ierr);
+  ierr = KSPSetOperators(ksp,pjd->Pshell,pjd->Pshell);CHKERRQ(ierr);
+  if (pep->nev>1) {
+    ierr = PetscMalloc2(pep->nev*pep->nev,&pcctx->M,pep->nev*pep->nev,&pcctx->ps);CHKERRQ(ierr);
+    pcctx->X  = pjd->X;
+    pcctx->ld = pep->nev;
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDUpdateExtendedPC"
+static PetscErrorCode PEPJDUpdateExtendedPC(PEP pep,PetscScalar theta)
+{
+  PetscErrorCode ierr;
+  PEP_JD         *pjd = (PEP_JD*)pep->data;
+  PEP_JD_PCSHELL *pcctx;  
+  PetscInt       i,j,k,n=pjd->nconv,ld=pep->nev,deg=pep->nmat-1;
+  PetscScalar    fact,*M,*ps,*work,*U,*V,*S,sone=1.0,zero=0.0;
+  PetscReal      tol,maxeig=0.0,*sg,*rwork;
+  PetscBLASInt   n_,info,ld_,*p,lw_,rk=0;
+
+  PetscFunctionBegin;
+#if defined(PETSC_MISSING_LAPACK_GESVD) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(PETSC_MISSING_LAPACK_GETRF)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD/GETRI/GETRF - Lapack routine is unavailable");
+#else
+  if (n) { 
+    ierr = PCShellGetContext(pjd->pcshell,(void**)&pcctx);CHKERRQ(ierr);
+    pcctx->n = n;
+    M  = pcctx->M;
+    ps = pcctx->ps;
+                      /* h, and q are vectors containing diagonal matrices */
+    ierr = PetscCalloc7(n*n,&U,n*n,&V,n*n,&S,n,&sg,10*n,&work,5*n,&rwork,n,&p);CHKERRQ(ierr);
+    /* pseudo-inverse */
+    for (j=0;j<n;j++) {
+      for (i=0;i<j;i++) S[n*j+i] = -pjd->T[pep->nev*j+i];
+      S[n*i+i] = theta-pjd->T[pep->nev*i+i];
+    }
+    ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
+    ierr = PetscBLASIntCast(ld,&ld_);CHKERRQ(ierr);
+    lw_ = 10*n_;
+#if !defined (PETSC_USE_COMPLEX)
+    PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&n_,&n_,S,&n_,sg,U,&n_,V,&n_,work,&lw_,&info));
+#else
+    PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&n_,&n_,S,&n_,sg,U,&n_,V,&n_,work,&lw_,rwork,&info));
+#endif
+    for (i=0;i<n;i++) maxeig = PetscMax(maxeig,sg[i]);
+    tol = 10*PETSC_MACHINE_EPSILON*n*maxeig;
+    for (j=0;j<n;j++) {
+      if (sg[j]>tol) {
+        for (i=0;i<n;i++) U[j*n+i] /= sg[j];
+        rk++;
+      } else break;
+    }
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n_,&n_,&rk,&sone,U,&n_,V,&n_,&zero,ps,&ld_));
+
+    /* compute M */
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n_,&n_,&n_,&sone,pjd->XpX,&ld_,ps,&ld_,&zero,M,&ld_));
+    fact = theta;
+    ierr = PetscMemzero(S,n*n*sizeof(PetscScalar));CHKERRQ(ierr);
+    for (j=0;j<n;j++) S[j*(n+1)] = 1.0; /* q=S */
+    for (k=0;k<deg;k++) {
+      for (j=0;j<n;j++) for (i=0;i<n;i++) V[j*n+i] = S[j*n+i] + M[j*ld+i]*fact;
+      PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n_,&n_,&n_,&sone,pjd->XpX,&ld_,V,&n_,&zero,U,&n_));
+      PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&n_,&n_,&n_,&sone,pjd->Tj+k*ld*ld,&ld_,U,&n_,&sone,M,&ld_));
+      PetscStackCallBLAS("BLAStrmm",BLAStrmm_("L","U","N","N",&n_,&n_,&sone,pjd->T,&ld_,S,&n_));
+      for (j=0;j<n;j++) S[j*(n+1)] += fact;
+      fact *=theta;
+    }
+    /* inverse */
+    PetscStackCallBLAS("LAPACKgetrf",LAPACKgetrf_(&n_,&n_,M,&ld_,p,&info));
+    PetscStackCallBLAS("LAPACKgetri",LAPACKgetri_(&n_,M,&ld_,p,work,&n_,&info));
+    ierr = PetscFree7(U,V,S,sg,work,rwork,p);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDPCMatSetUp"
+static PetscErrorCode PEPJDPCMatSetUp(PEP pep,PetscScalar theta)
+{
+  PetscErrorCode  ierr;
+  PEP_JD          *pjd = (PEP_JD*)pep->data;
+  PEP_JD_MATSHELL *matctx;
+  PEP_JD_PCSHELL  *pcctx;  
+  MatStructure    str;
+  PetscScalar     t;
+  PetscInt        i;
+
+  PetscFunctionBegin;
+  ierr = MatShellGetContext(pjd->Pshell,(void**)&matctx);CHKERRQ(ierr);
+  ierr = PCShellGetContext(pjd->pcshell,(void**)&pcctx);CHKERRQ(ierr);
+  ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
+  ierr = MatCopy(pep->A[0],matctx->P,str);CHKERRQ(ierr);
+  t = theta;
+  for (i=1;i<pep->nmat;i++) {
+    if (t!=0.0) { ierr = MatAXPY(matctx->P,t,pep->A[i],str);CHKERRQ(ierr); }
+    t *= theta;
+  }
+  ierr = PCSetOperators(pcctx->pc,matctx->P,matctx->P);CHKERRQ(ierr);
+  ierr = PCSetUp(pcctx->pc);CHKERRQ(ierr);
+  matctx->theta = theta;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDEigenvectors"
+static PetscErrorCode PEPJDEigenvectors(PEP pep)
+{
+  PetscErrorCode ierr;
+  PEP_JD         *pjd = (PEP_JD*)pep->data;
+  PetscBLASInt   ld,nconv,info,nc;
+  PetscScalar    *Z,*w;
+  PetscReal      *wr,norm;
+  PetscInt       i;
+  Mat            U;
+ 
+  PetscFunctionBegin;
+#if defined(SLEPC_MISSING_LAPACK_TREVC)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TREVC - Lapack routine is unavailable");
+#else
+  ierr = PetscMalloc3(pjd->nconv*pjd->nconv,&Z,3*pep->nev,&wr,2*pep->nev,&w);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(pep->nev,&ld);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(pjd->nconv,&nconv);CHKERRQ(ierr);
+#if !defined(PETSC_USE_COMPLEX)
+  PetscStackCallBLAS("LAPACKtrevc",LAPACKtrevc_("R","A",NULL,&nconv,pjd->T,&ld,NULL,&nconv,Z,&nconv,&nconv,&nc,wr,&info));
+#else
+  PetscStackCallBLAS("LAPACKtrevc",LAPACKtrevc_("R","A",NULL,&nconv,pjd->T,&ld,NULL,&nconv,Z,&nconv,&nconv,&nc,w,wr,&info));
+#endif
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,nconv,nconv,Z,&U);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(pjd->X,0,pjd->nconv);CHKERRQ(ierr);
+  ierr = BVMultInPlace(pjd->X,U,0,pjd->nconv);CHKERRQ(ierr);
+  for (i=0;i<pjd->nconv;i++) {
+    ierr = BVNormColumn(pjd->X,i,NORM_2,&norm);CHKERRQ(ierr);
+    ierr = BVScaleColumn(pjd->X,i,1.0/norm);CHKERRQ(ierr);  
+  }
+  ierr = MatDestroy(&U);CHKERRQ(ierr);
+  ierr = PetscFree3(Z,wr,w);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPJDLockConverged"
+PetscErrorCode PEPJDLockConverged(PEP pep,PetscInt *nv,Vec u,Vec *ww)
+{
+  PetscErrorCode    ierr;
+  PEP_JD            *pjd = (PEP_JD*)pep->data;
+  PetscInt          j,i,ldds,rk,*P,nvv=*nv;
+  Vec               v;
+  PetscBLASInt      n,ld,rk_,nv_,info,one=1;
+  PetscScalar       sone=1.0,*Tj,*R,*r,*tt,*pX;
+  Mat               X;
+  const PetscScalar *array;
+
+  PetscFunctionBegin;
+#if defined(SLEPC_MISSING_LAPACK_TRTRI)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TRTRI - Lapack routine is unavailable");
+#else
+  /* update AX and XpX */
+  ierr = VecGetArrayRead(u,&array);CHKERRQ(ierr);
+  ierr = VecPlaceArray(ww[0],array);CHKERRQ(ierr);
+  for (j=0;j<pep->nmat;j++) {
+    ierr = BVGetColumn(pjd->AX[j],pjd->nconv-1,&v);CHKERRQ(ierr);
+    ierr = MatMult(pep->A[j],ww[0],v);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->AX[j],pjd->nconv-1,&v);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(pjd->AX[j],0,pjd->nconv);CHKERRQ(ierr);
+  }
+  ierr = BVDotVec(pjd->X,ww[0],pjd->XpX+(pjd->nconv-1)*(pep->nev));CHKERRQ(ierr);
+  for (j=0;j<pjd->nconv-1;j++) pjd->XpX[j*(pep->nev)+pjd->nconv-1] = PetscConj(pjd->XpX[(pjd->nconv-1)*(pep->nev)+j]);
+  ierr = VecResetArray(ww[0]);CHKERRQ(ierr);
+  ierr = VecRestoreArrayRead(u,&array);CHKERRQ(ierr);
+  
+  /* Compute powers of T */
+  ierr = PetscBLASIntCast(pjd->nconv,&n);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(pep->nev,&ld);CHKERRQ(ierr);
+  ierr = PetscMemzero(pjd->Tj,pep->nev*pep->nev*pep->nmat*sizeof(PetscScalar));CHKERRQ(ierr);
+  Tj = pjd->Tj;
+  for (j=0;j<pep->nmat;j++) Tj[(pep->nev+1)*j] = 1.0;
+  Tj = pjd->Tj+pep->nev*pep->nev;
+  ierr = PetscMemcpy(Tj,pjd->T,pep->nev*pjd->nconv*sizeof(PetscScalar));CHKERRQ(ierr);
+  for (j=2;j<pep->nmat;j++) {
+    ierr = PetscMemcpy(Tj+pep->nev*pep->nev,Tj,pep->nev*pjd->nconv*sizeof(PetscScalar));CHKERRQ(ierr);
+    Tj += pep->nev*pep->nev;
+    PetscStackCallBLAS("BLAStrmm",BLAStrmm_("L","U","N","N",&n,&n,&sone,pjd->T,&ld,Tj,&ld));
+  }
+
+  /* Extend search space */
+  ierr = PetscCalloc4(nvv,&P,nvv*nvv,&R,nvv,&r,pep->nev-1,&tt);CHKERRQ(ierr);
+  ierr = DSGetLeadingDimension(pep->ds,&ldds);CHKERRQ(ierr);
+  ierr = DSGetArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
+  ierr = PEPJDOrthogonalize(nvv,nvv,pX,ldds,&rk,P,R,nvv);CHKERRQ(ierr);
+  for (i=0;i<rk-1;i++) r[i] = PetscConj(R[nvv*i]*pep->eigr[P[i+1]]); /* first row scaled with permuted diagonal */
+  ierr = PetscBLASIntCast(rk,&rk_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(nvv,&nv_);CHKERRQ(ierr);
+  PetscStackCallBLAS("LAPACKtrtri",LAPACKtrtri_("U","N",&rk_,R,&nv_,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,1,"Error in xTRTRI, info=%D",(PetscInt)info);
+  PetscStackCallBLAS("BLAStrmv",BLAStrmv_("U","C","N",&rk_,R,&nv_,r,&one));
+  for (i=0;i<rk;i++) r[i] = PetscConj(r[i]); /* revert */
+  ierr = BVSetActiveColumns(pjd->V,0,nvv);CHKERRQ(ierr);
+  for (j=0;j<rk-1;j++) {
+    ierr = PetscMemcpy(R+j*nvv,pX+(j+1)*ldds,nvv*sizeof(PetscScalar));CHKERRQ(ierr);
+  } 
+  ierr = DSRestoreArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,nvv,rk-1,R,&X);CHKERRQ(ierr);
+  ierr = BVMultInPlace(pjd->V,X,0,rk-1);CHKERRQ(ierr);
+  ierr = MatDestroy(&X);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(pjd->V,0,rk-1);CHKERRQ(ierr);
+  for (j=0;j<rk-1;j++) {
+    ierr = BVGetColumn(pjd->V,j,&v);CHKERRQ(ierr);
+    ierr = PEPJDCopyToExtendedVec(pep,NULL,r+j,1,pjd->nconv-1,v,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->V,j,&v);CHKERRQ(ierr);
+  }
+  ierr = BVOrthogonalize(pjd->V,NULL);CHKERRQ(ierr); 
+  for (j=0;j<rk-1;j++) {
+    ierr = BVGetColumn(pjd->W,j,&v);CHKERRQ(ierr);
+    ierr = PEPJDCopyToExtendedVec(pep,NULL,tt,pep->nev-1,0,v,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(pjd->W,j,&v);CHKERRQ(ierr);
+  }
+  *nv = rk-1;
+  ierr = PetscFree4(P,R,r,tt);CHKERRQ(ierr);
+#endif
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPSolve_JD"
+PetscErrorCode PEPSolve_JD(PEP pep)
+{
+  PetscErrorCode  ierr;
+  PEP_JD          *pjd = (PEP_JD*)pep->data;
+  PetscInt        k,nv,ld,minv,low,high,*P,dim;
+  PetscScalar     theta=0.0,*pX,*stt,*exu,*exr,*exp,*R,*eig;
+  PetscReal       norm,*res;
+  PetscBool       lindep,initial=PETSC_FALSE,flglk=PETSC_FALSE,flgre=PETSC_FALSE;
+  Vec             t,u,p,r,*ww=pep->work,v;
+  Mat             G,X,Y;
+  KSP             ksp;
+  PEP_JD_PCSHELL  *pcctx;
+  PEP_JD_MATSHELL *matctx;
 
   PetscFunctionBegin;
   ierr = DSGetLeadingDimension(pep->ds,&ld);CHKERRQ(ierr);
-  if (pep->nini==0) {  
+  ierr = PetscMalloc5(ld,&P,ld,&stt,pep->nev-1,&exu,pep->nev-1,&exr,pep->nev-1,&exp);CHKERRQ(ierr);
+  ierr = PetscMalloc3(ld*ld,&R,pep->ncv,&eig,pep->ncv,&res);CHKERRQ(ierr);
+  ierr = BVCreateVec(pjd->V,&u);CHKERRQ(ierr);
+  ierr = VecDuplicate(u,&p);CHKERRQ(ierr);
+  ierr = VecDuplicate(u,&r);CHKERRQ(ierr);
+  ierr = STGetKSP(pep->st,&ksp);CHKERRQ(ierr);
+
+  if (pep->nini) {
+    nv = pep->nini; initial = PETSC_TRUE;
+  } else {
+    theta = pep->target;
     nv = 1;
-    ierr = BVSetRandomColumn(pep->V,0,pep->rand);CHKERRQ(ierr);
-    ierr = BVNormColumn(pep->V,0,NORM_2,&norm);CHKERRQ(ierr);
-    ierr = BVScaleColumn(pep->V,0,1.0/norm);CHKERRQ(ierr);
-  } else nv = pep->nini;
+  }
+  ierr = PEPJDProcessInitialSpace(pep,ww);CHKERRQ(ierr);
+  ierr = BVCopyVec(pjd->V,0,u);CHKERRQ(ierr);
 
   /* Restart loop */
   while (pep->reason == PEP_CONVERGED_ITERATING) {
     pep->its++;
 
-    low = (pjd->flglk || pjd->flgre)? 0: nv-1;
+    low = (flglk || flgre)? 0: nv-1;
     high = nv;
     ierr = DSSetDimensions(pep->ds,nv,0,0,0);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(pep->V,low,high);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(pjd->V,low,high);CHKERRQ(ierr);
+    ierr = PEPJDUpdateTV(pep,low,high,ww);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(pjd->W,low,high);CHKERRQ(ierr);
     for (k=0;k<pep->nmat;k++) {
-      ierr = BVSetActiveColumns(pjd->W[k],low,high);CHKERRQ(ierr);
-      ierr = BVMatMult(pep->V,pep->A[k],pjd->W[k]);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(pjd->TV[k],low,high);CHKERRQ(ierr);
       ierr = DSGetMat(pep->ds,DSMatExtra[k],&G);CHKERRQ(ierr);
-      ierr = BVMatProject(pjd->W[k],NULL,pep->V,G);CHKERRQ(ierr);
+      ierr = BVMatProject(pjd->TV[k],NULL,pjd->W,G);CHKERRQ(ierr);
       ierr = DSRestoreMat(pep->ds,DSMatExtra[k],&G);CHKERRQ(ierr);
     }
-    ierr = BVSetActiveColumns(pep->V,0,nv);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(pjd->V,0,nv);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(pjd->W,0,nv);CHKERRQ(ierr);
 
     /* Solve projected problem */
-    ierr = DSSetState(pep->ds,DS_STATE_RAW);CHKERRQ(ierr);
-    ierr = DSSolve(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv);CHKERRQ(ierr);
-    ierr = DSSort(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);CHKERRQ(ierr);
-    ierr = PEPJDPurgeDuplicates(pep);CHKERRQ(ierr);
-    ierr = DSSort(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);CHKERRQ(ierr);
-    theta = pep->eigr[pep->nconv];
+    if (nv>1 || initial ) {
+      ierr = DSSetState(pep->ds,DS_STATE_RAW);CHKERRQ(ierr);
+      ierr = DSSolve(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv);CHKERRQ(ierr);
+      ierr = DSSort(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);CHKERRQ(ierr);
+      ierr = DSSort(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);CHKERRQ(ierr);
+      theta = pep->eigr[0];
 #if !defined(PETSC_USE_COMPLEX)
-    if (PetscAbsScalar(pep->eigi[pep->nconv])!=0.0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"PJD solver not implemented for complex Ritz values in real arithmetic");
+      if (PetscAbsScalar(pep->eigi[pep->nconv])!=0.0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"PJD solver not implemented for complex Ritz values in real arithmetic");
 #endif
 
-    /* Compute Ritz vector u=V*X(:,1) */
-    ierr = DSGetArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
-    ierr = BVSetActiveColumns(pep->V,0,nv);CHKERRQ(ierr);
-    ierr = BVMultVec(pep->V,1.0,0.0,u,pX);CHKERRQ(ierr);
-    ierr = DSRestoreArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
-
-    /* Compute p=P'(theta)*u  */
-    ierr = PEPJDDiffMatMult(pep,theta,u,p,w);CHKERRQ(ierr);
-
-    /* Form matrix P(theta) and compute residual r=P(theta)*u */
-    ierr = STMatSetUp(pep->st,theta,NULL);CHKERRQ(ierr);
-    ierr = STGetKSP(pep->st,&ksp);CHKERRQ(ierr);
-    ierr = KSPGetOperators(ksp,&Ptheta,NULL);CHKERRQ(ierr);
-    ierr = MatMult(Ptheta,u,r);CHKERRQ(ierr);
+      /* Compute Ritz vector u=V*X(:,1) */
+      ierr = DSGetArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
+      ierr = BVSetActiveColumns(pjd->V,0,nv);CHKERRQ(ierr);
+      ierr = BVMultVec(pjd->V,1.0,0.0,u,pX);CHKERRQ(ierr);
+      ierr = DSRestoreArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
+    }
+    ierr = PEPJDUpdateExtendedPC(pep,theta);CHKERRQ(ierr);
 
     /* Replace preconditioner with one containing projectors */
     if (!pjd->pcshell) {
-      ierr = PCCreate(PetscObjectComm((PetscObject)ksp),&pjd->pcshell);CHKERRQ(ierr);
-      ierr = PCSetType(pjd->pcshell,PCSHELL);CHKERRQ(ierr);
-      ierr = PCShellSetName(pjd->pcshell,"PCPEPJD");
-      ierr = PCShellSetApply(pjd->pcshell,PCShellApply_PEPJD);CHKERRQ(ierr);
-      ierr = PetscNew(&pcctx);CHKERRQ(ierr);
-      ierr = PCShellSetContext(pjd->pcshell,pcctx);CHKERRQ(ierr);
-      ierr = PCSetOperators(pjd->pcshell,Ptheta,Ptheta);CHKERRQ(ierr);
-      ierr = VecDuplicate(u,&pcctx->Bp);CHKERRQ(ierr);
-      ierr = KSPGetPC(ksp,&pcctx->pc);CHKERRQ(ierr);
-      ierr = PetscObjectReference((PetscObject)pcctx->pc);CHKERRQ(ierr);
-    } else {
-      ierr = KSPGetPC(ksp,&pcctx->pc);CHKERRQ(ierr);
+      ierr = PEPJDCreateShellPC(pep);CHKERRQ(ierr);
+      ierr = PCShellGetContext(pjd->pcshell,(void**)&pcctx);CHKERRQ(ierr);
+      ierr = MatShellGetContext(pjd->Pshell,(void**)&matctx);CHKERRQ(ierr);
+      matctx->work = ww;
+      pcctx->work  = ww;
     }
-    ierr = KSPSetPC(ksp,pjd->pcshell);CHKERRQ(ierr);
+    ierr = PEPJDPCMatSetUp(pep,theta);CHKERRQ(ierr);
+    
+    /* Compute r and r' */
+    ierr = MatMult(pjd->Pshell,u,r);CHKERRQ(ierr);
+    ierr = PEPJDComputePResidual(pep,u,theta,p,ww);CHKERRQ(ierr);
     pcctx->u = u;
 
     /* Check convergence */
@@ -249,87 +939,95 @@ PetscErrorCode PEPSolve_JD(PEP pep)
     if (pep->errest[pep->nconv]<pep->tol) {
 
       /* Ritz pair converged */
-      minv = PetscMin(nv,(PetscInt)pjd->keep*pep->ncv);
-      ierr = DSOrthogonalize(pep->ds,DS_MAT_X,nv,NULL);CHKERRQ(ierr);
-      ierr = DSGetMat(pep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
-      ierr = BVMultInPlace(pep->V,X,pep->nconv,minv);CHKERRQ(ierr);
-      ierr = DSRestoreMat(pep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
-      pep->nconv++;
-      if (pep->nconv >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
-      else nv = minv + pep->nconv;
-      pjd->flglk = PETSC_TRUE;
+      minv = PetscMin(nv,(PetscInt)(pjd->keep*pep->ncv));
+      if (pep->nev>1) {
+        ierr = BVGetColumn(pjd->X,pjd->nconv,&v);CHKERRQ(ierr);
+        ierr = PEPJDCopyToExtendedVec(pep,v,pjd->T+pep->nev*pjd->nconv,pep->nev-1,0,u,PETSC_TRUE);CHKERRQ(ierr);
+        ierr = BVRestoreColumn(pjd->X,pjd->nconv,&v);CHKERRQ(ierr);
+        ierr = BVSetActiveColumns(pjd->X,0,pjd->nconv+1);CHKERRQ(ierr);
+        ierr = BVNormColumn(pjd->X,pjd->nconv,NORM_2,&norm);CHKERRQ(ierr);
+        ierr = BVScaleColumn(pjd->X,pjd->nconv,1.0/norm);CHKERRQ(ierr);
+        for (k=0;k<pjd->nconv;k++) pjd->T[pep->nev*pjd->nconv+k] /= norm;
+        pjd->T[(pep->nev+1)*pjd->nconv] = pep->eigr[0];
+      } else {
+        ierr = BVInsertVec(pep->V,pep->nconv,u);CHKERRQ(ierr);
+      }
+      pjd->nconv++;
+      if (pjd->nconv >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
 
+      if (pep->reason==PEP_CONVERGED_ITERATING) {
+        ierr = PEPJDLockConverged(pep,&nv,u,ww);CHKERRQ(ierr);
+        ierr = BVCopyVec(pjd->V,nv,u);CHKERRQ(ierr);
+        if (nv==1) theta = pep->target;
+      }
+      flglk = PETSC_TRUE;
     } else if (nv==pep->ncv-1) {
 
       /* Basis full, force restart */
-      minv = PetscMin(nv,(PetscInt)pjd->keep*pep->ncv);
-      ierr = DSOrthogonalize(pep->ds,DS_MAT_X,nv,NULL);CHKERRQ(ierr);
+      minv = PetscMin(nv,(PetscInt)(pjd->keep*pep->ncv));
+      ierr = DSGetDimensions(pep->ds,&dim,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+      ierr = DSGetArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
+      ierr = PEPJDOrthogonalize(dim,minv,pX,ld,&minv,NULL,NULL,ld);CHKERRQ(ierr);
+      ierr = DSRestoreArray(pep->ds,DS_MAT_X,&pX);CHKERRQ(ierr);
+      ierr = DSGetArray(pep->ds,DS_MAT_Y,&pX);CHKERRQ(ierr);
+      ierr = PEPJDOrthogonalize(dim,minv,pX,ld,&minv,NULL,NULL,ld);CHKERRQ(ierr);
+      ierr = DSRestoreArray(pep->ds,DS_MAT_Y,&pX);CHKERRQ(ierr);
       ierr = DSGetMat(pep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
-      ierr = BVMultInPlace(pep->V,X,pep->nconv,minv);CHKERRQ(ierr);
+      ierr = BVMultInPlace(pjd->V,X,pep->nconv,minv);CHKERRQ(ierr);
       ierr = DSRestoreMat(pep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
-      nv = minv + pep->nconv;
-      pjd->flgre = PETSC_TRUE;
-
+      ierr = DSGetMat(pep->ds,DS_MAT_Y,&Y);CHKERRQ(ierr);
+      ierr = BVMultInPlace(pjd->W,Y,pep->nconv,minv);CHKERRQ(ierr);
+      ierr = DSRestoreMat(pep->ds,DS_MAT_Y,&Y);CHKERRQ(ierr);
+      nv = minv;
+      flgre = PETSC_TRUE;
     } else {
-
       /* Solve correction equation to expand basis */
-      ierr = PCApply(pcctx->pc,p,pcctx->Bp);CHKERRQ(ierr);
-      ierr = VecScale(r,-1.0);CHKERRQ(ierr);
+      ierr = PEPJDExtendedPCApply(pjd->pcshell,p,pcctx->Bp);CHKERRQ(ierr);
       ierr = VecDot(pcctx->Bp,u,&pcctx->gamma);CHKERRQ(ierr);
-      ierr = BVGetColumn(pep->V,nv,&t);CHKERRQ(ierr);
+      ierr = BVGetColumn(pjd->V,nv,&t);CHKERRQ(ierr);
       ierr = KSPSolve(ksp,r,t);CHKERRQ(ierr);
-      ierr = BVRestoreColumn(pep->V,nv,&t);CHKERRQ(ierr);
-      ierr = BVOrthogonalizeColumn(pep->V,nv,NULL,&norm,&lindep);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(pjd->V,nv,&t);CHKERRQ(ierr);
+      ierr = BVOrthogonalizeColumn(pjd->V,nv,NULL,&norm,&lindep);CHKERRQ(ierr);
       if (lindep) SETERRQ(PETSC_COMM_SELF,1,"Linearly dependent continuation vector");
-      ierr = BVScaleColumn(pep->V,nv,1.0/norm);CHKERRQ(ierr);
+      ierr = BVScaleColumn(pjd->V,nv,1.0/norm);CHKERRQ(ierr);
+      ierr = BVInsertVec(pjd->W,nv,r);CHKERRQ(ierr);
+      ierr = BVOrthogonalizeColumn(pjd->W,nv,NULL,&norm,&lindep);CHKERRQ(ierr);
+      if (lindep) SETERRQ(PETSC_COMM_SELF,1,"Linearly dependent continuation vector");
+      ierr = BVScaleColumn(pjd->W,nv,1.0/norm);CHKERRQ(ierr);
       nv++;
-      pjd->flglk = PETSC_FALSE;
-      pjd->flgre = PETSC_FALSE;
+      flglk = PETSC_FALSE;
+      flgre = PETSC_FALSE;
     }
-
-    /* Restore preconditioner */
-    ierr = KSPGetPC(ksp,&pjd->pcshell);CHKERRQ(ierr);
-    ierr = KSPSetPC(ksp,pcctx->pc);CHKERRQ(ierr);
-
-    ierr = PEPMonitor(pep,pep->its,pep->nconv,pep->eigr,pep->eigi,pep->errest,nv);CHKERRQ(ierr);
+    for (k=pjd->nconv;k<nv;k++) {
+      eig[k] = pep->eigr[k-pjd->nconv];
+      res[k] = pep->errest[k-pjd->nconv];
+    }
+    ierr = PEPMonitor(pep,pep->its,pjd->nconv,eig,pep->eigi,res,nv);CHKERRQ(ierr);
   }
-
+  if (pep->nev>1) {
+    ierr = PEPJDEigenvectors(pep);CHKERRQ(ierr);
+    for (k=0;k<pjd->nconv;k++) {
+      ierr = BVGetColumn(pjd->X,k,&v);CHKERRQ(ierr);
+      ierr = BVInsertVec(pep->V,k,v);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(pjd->X,k,&v);CHKERRQ(ierr);
+      pep->eigr[k] = pjd->T[(pep->nev+1)*k]; 
+    }
+    ierr = PetscFree2(pcctx->M,pcctx->ps);CHKERRQ(ierr); 
+  }
+  pep->nconv = pjd->nconv; 
+  ierr = KSPSetPC(ksp,pcctx->pc);CHKERRQ(ierr);
+  ierr = MatDestroy(&matctx->P);CHKERRQ(ierr);
   ierr = VecDestroy(&pcctx->Bp);CHKERRQ(ierr);
+  ierr = MatDestroy(&pjd->Pshell);CHKERRQ(ierr);
   ierr = PCDestroy(&pcctx->pc);CHKERRQ(ierr);
   ierr = PetscFree(pcctx);CHKERRQ(ierr);
+  ierr = PetscFree(matctx);CHKERRQ(ierr);
   ierr = PCDestroy(&pjd->pcshell);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "PEPComputeVectors_JD"
-PetscErrorCode PEPComputeVectors_JD(PEP pep)
-{
-  PetscErrorCode ierr;
-  PetscInt       k;
-  PEP_JD         *pjd = (PEP_JD*)pep->data;
-  Mat            G,X;
-
-  PetscFunctionBegin;
-  ierr = DSSetDimensions(pep->ds,pep->nconv,0,0,0);CHKERRQ(ierr);
-  ierr = BVSetActiveColumns(pep->V,0,pep->nconv);CHKERRQ(ierr);
-  for (k=0;k<pep->nmat;k++) {
-    ierr = BVSetActiveColumns(pjd->W[k],0,pep->nconv);CHKERRQ(ierr);
-    ierr = BVMatMult(pep->V,pep->A[k],pjd->W[k]);CHKERRQ(ierr);
-    ierr = DSGetMat(pep->ds,DSMatExtra[k],&G);CHKERRQ(ierr);
-    ierr = BVMatProject(pjd->W[k],NULL,pep->V,G);CHKERRQ(ierr);
-    ierr = DSRestoreMat(pep->ds,DSMatExtra[k],&G);CHKERRQ(ierr);
-  }
-
-  /* Solve projected problem */
-  ierr = DSSetState(pep->ds,DS_STATE_RAW);CHKERRQ(ierr);
-  ierr = DSSolve(pep->ds,pep->eigr,pep->eigi);CHKERRQ(ierr);
-  ierr = DSSort(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);CHKERRQ(ierr);
-
-  /* Compute Ritz vectors */
-  ierr = DSGetMat(pep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
-  ierr = BVMultInPlace(pep->V,X,0,pep->nconv);CHKERRQ(ierr);
-  ierr = DSRestoreMat(pep->ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  ierr = PetscFree5(P,stt,exu,exr,exp);CHKERRQ(ierr);
+  ierr = PetscFree3(R,eig,res);CHKERRQ(ierr);
+  ierr = VecDestroy(&u);CHKERRQ(ierr);
+  ierr = VecDestroy(&r);CHKERRQ(ierr);
+  ierr = VecDestroy(&p);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -343,9 +1041,18 @@ PetscErrorCode PEPReset_JD(PEP pep)
 
   PetscFunctionBegin;
   for (i=0;i<pep->nmat;i++) {
-    ierr = BVDestroy(pjd->W+i);CHKERRQ(ierr);
+    ierr = BVDestroy(pjd->TV+i);CHKERRQ(ierr);
+  }
+  ierr = BVDestroy(&pjd->W);CHKERRQ(ierr);
+  if (pep->nev>1) {
+    ierr = BVDestroy(&pjd->V);CHKERRQ(ierr);
+    for (i=0;i<pep->nmat;i++) {
+      ierr = BVDestroy(pjd->AX+i);CHKERRQ(ierr);
+    }
+    ierr = BVDestroy(&pjd->X);CHKERRQ(ierr);
+    ierr = PetscFree3(pjd->XpX,pjd->T,pjd->Tj);CHKERRQ(ierr);
   }
-  ierr = PetscFree(pjd->W);CHKERRQ(ierr);
+  ierr = PetscFree2(pjd->TV,pjd->AX);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -359,8 +1066,6 @@ PetscErrorCode PEPDestroy_JD(PEP pep)
   ierr = PetscFree(pep->data);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDSetRestart_C",NULL);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDGetRestart_C",NULL);CHKERRQ(ierr);
-  ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDSetTolerances_C",NULL);CHKERRQ(ierr);
-  ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDGetTolerances_C",NULL);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -376,21 +1081,13 @@ PETSC_EXTERN PetscErrorCode PEPCreate_JD(PEP pep)
   pep->data = (void*)pjd;
 
   pjd->keep = 0;
-  pjd->mtol = 1e-5;
-  pjd->htol = 1e-2;
-  pjd->stol = 1e-2;
-
   pep->ops->solve          = PEPSolve_JD;
   pep->ops->setup          = PEPSetUp_JD;
   pep->ops->setfromoptions = PEPSetFromOptions_JD;
   pep->ops->reset          = PEPReset_JD;
   pep->ops->destroy        = PEPDestroy_JD;
   pep->ops->view           = PEPView_JD;
-  pep->ops->computevectors = PEPComputeVectors_JD;
   ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDSetRestart_C",PEPJDSetRestart_JD);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDGetRestart_C",PEPJDGetRestart_JD);CHKERRQ(ierr);
-  ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDSetTolerances_C",PEPJDSetTolerances_JD);CHKERRQ(ierr);
-  ierr = PetscObjectComposeFunction((PetscObject)pep,"PEPJDGetTolerances_C",PEPJDGetTolerances_JD);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
-
diff --git a/src/pep/impls/jd/pjd.c.html b/src/pep/impls/jd/pjd.c.html
index 005c473..874e66f 100644
--- a/src/pep/impls/jd/pjd.c.html
+++ b/src/pep/impls/jd/pjd.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/jd/pjd.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:05+00:00">
+<meta name="date" content="2016-05-16T10:34:04+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/jd/pjd.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/jd/pjd.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc polynomial eigensolver: "jd"</font>
@@ -34,7 +34,7 @@
 
 <a name="line23"> 23: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line24"> 24: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line25"> 25: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line25"> 25: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line27"> 27: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,324 +53,983 @@
 <a name="line41"> 41: </a><font color="#B22222">*/</font>
 
 <a name="line43"> 43: </a><font color="#A020F0">#include <slepc/private/pepimpl.h>    </font><font color="#B22222">/*I "slepcpep.h" I*/</font><font color="#A020F0"></font>
-<a name="line44"> 44: </a><font color="#A020F0">#include <slepc/private/dsimpl.h></font>
-<a name="line45"> 45: </a> #include <A href="pjdp.h.html">pjdp.h</A>
-
-<a name="line49"> 49: </a><strong><font color="#4169E1"><a name="PEPSetUp_JD"></a>PetscErrorCode PEPSetUp_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line50"> 50: </a>{
-<a name="line52"> 52: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
-<a name="line53"> 53: </a>  PetscBool      isshift,flg;
-<a name="line54"> 54: </a>  PetscInt       i;
-
-<a name="line57"> 57: </a>  pep->lineariz = PETSC_FALSE;
-<a name="line58"> 58: </a>  PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);
-<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (!pep->max_it) pep->max_it = PetscMax(100,2*pep->n/pep->ncv);
-<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (!pep->which) pep->which = PEP_LARGEST_MAGNITUDE;
-<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (pep->nev>1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Polynomial JD does not support nev>1 yet"</font>);
-
-<a name="line63"> 63: </a>  <font color="#B22222">/* Set STSHIFT as the default <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->st)->type_name) {
-<a name="line65"> 65: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(pep->st,STSHIFT);
-<a name="line66"> 66: </a>  }
-<a name="line67"> 67: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSHIFT,&isshift);
-<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (!isshift) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"JD only works with shift spectral transformation"</font>);
-
-<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver not implemented for non-monomial bases"</font>);
-<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver requires the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> transformation flag unset, see <a href="../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>()"</font>);
-
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!pjd->keep) pjd->keep = 0.5;
-
-<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,0);
-<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,4);
-<a name="line78"> 78: </a>  PetscMalloc1(pep->nmat,&pjd->W);
-<a name="line79"> 79: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line80"> 80: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(pep->V,pjd->W+i);
-<a name="line81"> 81: </a>  }
-<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(pep->ds,DSPEP);
-<a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>(pep->ds,pep->nmat-1);
-<a name="line84"> 84: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(pep->ds,pep->ncv);
-<a name="line85"> 85: </a>  <font color="#4169E1">return</font>(0);
-<a name="line86"> 86: </a>}
-
-<a name="line90"> 90: </a><font color="#B22222">/*</font>
-<a name="line91"> 91: </a><font color="#B22222">   Check for multiple eigenvalues.</font>
-<a name="line92"> 92: </a><font color="#B22222">*/</font>
-<a name="line93"> 93: </a><strong><font color="#4169E1"><a name="PEPJDPurgeDuplicates"></a>static PetscErrorCode PEPJDPurgeDuplicates(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line94"> 94: </a>{
-<a name="line95"> 95: </a>  PEP_JD   *pjd = (PEP_JD*)pep->data;
-<a name="line96"> 96: </a>  PetscInt i,k;
-
-<a name="line99"> 99: </a>  k = pep->nconv;  <font color="#B22222">/* TODO: should have a while loop here */</font>
-<a name="line100">100: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line101">101: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(pep->eigr[i]-pep->eigr[k],pep->eigi[i]-pep->eigi[k])<pjd->mtol) {
-<a name="line102">102: </a>      pep->eigr[k] = PETSC_INFINITY;
-<a name="line103">103: </a>      pep->eigi[k] = PETSC_INFINITY;
-<a name="line104">104: </a>      <font color="#4169E1">break</font>;
-<a name="line105">105: </a>    }
-<a name="line106">106: </a>  }
-<a name="line107">107: </a>  <font color="#4169E1">return</font>(0);
-<a name="line108">108: </a>}
-
-<a name="line112">112: </a><font color="#B22222">/*</font>
-<a name="line113">113: </a><font color="#B22222">   Multiplication of derivative of P, i.e.</font>
-<a name="line114">114: </a><font color="#B22222">      P'(\lambda) x = \sum_{i=1}^{n} (i*\lambda^{i-1} A_i)x </font>
-<a name="line115">115: </a><font color="#B22222">*/</font>
-<a name="line116">116: </a><strong><font color="#4169E1"><a name="PEPJDDiffMatMult"></a>static PetscErrorCode PEPJDDiffMatMult(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar theta,Vec x,Vec y,Vec w)</font></strong>
-<a name="line117">117: </a>{
-<a name="line119">119: </a>  PetscScalar    fact=1.0;
-<a name="line120">120: </a>  PetscInt       i;
-
-<a name="line123">123: </a>  VecSet(y,0.0);
-<a name="line124">124: </a>  <font color="#4169E1">for</font> (i=1;i<pep->nmat;i++) {
-<a name="line125">125: </a>    MatMult(pep->A[i],x,w);
-<a name="line126">126: </a>    VecAXPY(y,fact*(PetscReal)i,w);
-<a name="line127">127: </a>    fact *= theta;
-<a name="line128">128: </a>  }
-<a name="line129">129: </a>  <font color="#4169E1">return</font>(0);
-<a name="line130">130: </a>}
-
-<a name="line134">134: </a><font color="#B22222">/*</font>
-<a name="line135">135: </a><font color="#B22222">   Application of shell preconditioner:</font>
-<a name="line136">136: </a><font color="#B22222">      y = B\x - eta*B\p,  with eta = (u'*B\x)/(u'*B\p)</font>
-<a name="line137">137: </a><font color="#B22222">*/</font>
-<a name="line138">138: </a><strong><font color="#4169E1"><a name="PCShellApply_PEPJD"></a>static PetscErrorCode PCShellApply_PEPJD(PC pc,Vec x,Vec y)</font></strong>
-<a name="line139">139: </a>{
-<a name="line141">141: </a>  PetscScalar    eta;
-<a name="line142">142: </a>  PEP_JD_PCSHELL *pcctx;
-
-<a name="line145">145: </a>  PCShellGetContext(pc,(void**)&pcctx);
-
-<a name="line147">147: </a>  <font color="#B22222">/* y = B\x */</font>
-<a name="line148">148: </a>  PCApply(pcctx->pc,x,y);
-
-<a name="line150">150: </a>  <font color="#B22222">/* Compute eta = u'*y / u'*Bp */</font>
-<a name="line151">151: </a>  VecDot(y,pcctx->u,&eta);
-<a name="line152">152: </a>  eta /= pcctx->gamma;
-<a name="line153">153: </a>  
-<a name="line154">154: </a>  <font color="#B22222">/* y = y - eta*Bp */</font>
-<a name="line155">155: </a>  VecAXPY(y,-eta,pcctx->Bp); 
-<a name="line156">156: </a>  <font color="#4169E1">return</font>(0);
-<a name="line157">157: </a>}
-
-<a name="line161">161: </a><strong><font color="#4169E1"><a name="PEPSolve_JD"></a>PetscErrorCode PEPSolve_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line162">162: </a>{
-<a name="line164">164: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
-<a name="line165">165: </a>  PEP_JD_PCSHELL *pcctx;
-<a name="line166">166: </a>  PetscInt       k,nv,ld,minv,low,high;
-<a name="line167">167: </a>  PetscScalar    theta,*pX;
-<a name="line168">168: </a>  PetscReal      norm;
-<a name="line169">169: </a>  PetscBool      lindep;
-<a name="line170">170: </a>  Vec            t,u=pep->work[0],p=pep->work[1],r=pep->work[2],w=pep->work[3];
-<a name="line171">171: </a>  Mat            G,X,Ptheta;
-<a name="line172">172: </a>  KSP            ksp;
-
-<a name="line175">175: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ld);
-<a name="line176">176: </a>  <font color="#4169E1">if</font> (pep->nini==0) {  
-<a name="line177">177: </a>    nv = 1;
-<a name="line178">178: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,0,pep->rand);
-<a name="line179">179: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(pep->V,0,NORM_2,&norm);
-<a name="line180">180: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,0,1.0/norm);
-<a name="line181">181: </a>  } <font color="#4169E1">else</font> nv = pep->nini;
-
-<a name="line183">183: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line184">184: </a>  <font color="#4169E1">while</font> (pep->reason == PEP_CONVERGED_ITERATING) {
-<a name="line185">185: </a>    pep->its++;
-
-<a name="line187">187: </a>    low = (pjd->flglk || pjd->flgre)? 0: nv-1;
-<a name="line188">188: </a>    high = nv;
-<a name="line189">189: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,nv,0,0,0);
-<a name="line190">190: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,low,high);
-<a name="line191">191: </a>    <font color="#4169E1">for</font> (k=0;k<pep->nmat;k++) {
-<a name="line192">192: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->W[k],low,high);
-<a name="line193">193: </a>      <a href="../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(pep->V,pep->A[k],pjd->W[k]);
-<a name="line194">194: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DSMatExtra[k],&G);
-<a name="line195">195: </a>      <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(pjd->W[k],NULL,pep->V,G);
-<a name="line196">196: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DSMatExtra[k],&G);
-<a name="line197">197: </a>    }
-<a name="line198">198: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,nv);
-
-<a name="line200">200: </a>    <font color="#B22222">/* Solve projected problem */</font>
-<a name="line201">201: </a>    <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line202">202: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv);
-<a name="line203">203: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);
-<a name="line204">204: </a>    PEPJDPurgeDuplicates(pep);
-<a name="line205">205: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);
-<a name="line206">206: </a>    theta = pep->eigr[pep->nconv];
-<a name="line207">207: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line208">208: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(pep->eigi[pep->nconv])!=0.0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"PJD solver not implemented for complex Ritz values in real arithmetic"</font>);
-<a name="line209">209: </a><font color="#A020F0">#endif</font>
-
-<a name="line211">211: </a>    <font color="#B22222">/* Compute Ritz vector u=V*X(:,1) */</font>
-<a name="line212">212: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_X,&pX);
-<a name="line213">213: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,nv);
-<a name="line214">214: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,u,pX);
-<a name="line215">215: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_X,&pX);
-
-<a name="line217">217: </a>    <font color="#B22222">/* Compute p=P'(theta)*u  */</font>
-<a name="line218">218: </a>    PEPJDDiffMatMult(pep,theta,u,p,w);
-
-<a name="line220">220: </a>    <font color="#B22222">/* Form matrix P(theta) and compute residual r=P(theta)*u */</font>
-<a name="line221">221: </a>    <a href="../../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a>(pep->st,theta,NULL);
-<a name="line222">222: </a>    <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(pep->st,&ksp);
-<a name="line223">223: </a>    KSPGetOperators(ksp,&Ptheta,NULL);
-<a name="line224">224: </a>    MatMult(Ptheta,u,r);
-
-<a name="line226">226: </a>    <font color="#B22222">/* Replace preconditioner with one containing projectors */</font>
-<a name="line227">227: </a>    <font color="#4169E1">if</font> (!pjd->pcshell) {
-<a name="line228">228: </a>      PCCreate(PetscObjectComm((PetscObject)ksp),&pjd->pcshell);
-<a name="line229">229: </a>      PCSetType(pjd->pcshell,PCSHELL);
-<a name="line230">230: </a>      PCShellSetName(pjd->pcshell,<font color="#666666">"PCPEPJD"</font>);
-<a name="line231">231: </a>      PCShellSetApply(pjd->pcshell,PCShellApply_PEPJD);
-<a name="line232">232: </a>      PetscNew(&pcctx);
-<a name="line233">233: </a>      PCShellSetContext(pjd->pcshell,pcctx);
-<a name="line234">234: </a>      PCSetOperators(pjd->pcshell,Ptheta,Ptheta);
-<a name="line235">235: </a>      VecDuplicate(u,&pcctx->Bp);
-<a name="line236">236: </a>      KSPGetPC(ksp,&pcctx->pc);
-<a name="line237">237: </a>      PetscObjectReference((PetscObject)pcctx->pc);
-<a name="line238">238: </a>    } <font color="#4169E1">else</font> {
-<a name="line239">239: </a>      KSPGetPC(ksp,&pcctx->pc);
-<a name="line240">240: </a>    }
-<a name="line241">241: </a>    KSPSetPC(ksp,pjd->pcshell);
-<a name="line242">242: </a>    pcctx->u = u;
-
-<a name="line244">244: </a>    <font color="#B22222">/* Check convergence */</font>
-<a name="line245">245: </a>    VecNorm(r,NORM_2,&norm);
-<a name="line246">246: </a>    (*pep->converged)(pep,theta,0,norm,&pep->errest[pep->nconv],pep->convergedctx);
-<a name="line247">247: </a>    <font color="#4169E1">if</font> (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-
-<a name="line249">249: </a>    <font color="#4169E1">if</font> (pep->errest[pep->nconv]<pep->tol) {
-
-<a name="line251">251: </a>      <font color="#B22222">/* Ritz pair converged */</font>
-<a name="line252">252: </a>      minv = PetscMin(nv,(PetscInt)pjd->keep*pep->ncv);
-<a name="line253">253: </a>      DSOrthogonalize(pep->ds,DS_MAT_X,nv,NULL);
-<a name="line254">254: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_X,&X);
-<a name="line255">255: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,X,pep->nconv,minv);
-<a name="line256">256: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DS_MAT_X,&X);
-<a name="line257">257: </a>      pep->nconv++;
-<a name="line258">258: </a>      <font color="#4169E1">if</font> (pep->nconv >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
-<a name="line259">259: </a>      <font color="#4169E1">else</font> nv = minv + pep->nconv;
-<a name="line260">260: </a>      pjd->flglk = PETSC_TRUE;
-
-<a name="line262">262: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nv==pep->ncv-1) {
-
-<a name="line264">264: </a>      <font color="#B22222">/* Basis full, force restart */</font>
-<a name="line265">265: </a>      minv = PetscMin(nv,(PetscInt)pjd->keep*pep->ncv);
-<a name="line266">266: </a>      DSOrthogonalize(pep->ds,DS_MAT_X,nv,NULL);
-<a name="line267">267: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_X,&X);
-<a name="line268">268: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,X,pep->nconv,minv);
-<a name="line269">269: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DS_MAT_X,&X);
-<a name="line270">270: </a>      nv = minv + pep->nconv;
-<a name="line271">271: </a>      pjd->flgre = PETSC_TRUE;
-
-<a name="line273">273: </a>    } <font color="#4169E1">else</font> {
-
-<a name="line275">275: </a>      <font color="#B22222">/* Solve correction equation to expand basis */</font>
-<a name="line276">276: </a>      PCApply(pcctx->pc,p,pcctx->Bp);
-<a name="line277">277: </a>      VecScale(r,-1.0);
-<a name="line278">278: </a>      VecDot(pcctx->Bp,u,&pcctx->gamma);
-<a name="line279">279: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,nv,&t);
-<a name="line280">280: </a>      KSPSolve(ksp,r,t);
-<a name="line281">281: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,nv,&t);
-<a name="line282">282: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,nv,NULL,&norm,&lindep);
-<a name="line283">283: </a>      <font color="#4169E1">if</font> (lindep) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Linearly dependent continuation vector"</font>);
-<a name="line284">284: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,nv,1.0/norm);
-<a name="line285">285: </a>      nv++;
-<a name="line286">286: </a>      pjd->flglk = PETSC_FALSE;
-<a name="line287">287: </a>      pjd->flgre = PETSC_FALSE;
-<a name="line288">288: </a>    }
-
-<a name="line290">290: </a>    <font color="#B22222">/* Restore preconditioner */</font>
-<a name="line291">291: </a>    KSPGetPC(ksp,&pjd->pcshell);
-<a name="line292">292: </a>    KSPSetPC(ksp,pcctx->pc);
-
-<a name="line294">294: </a>    PEPMonitor(pep,pep->its,pep->nconv,pep->eigr,pep->eigi,pep->errest,nv);
-<a name="line295">295: </a>  }
-
-<a name="line297">297: </a>  VecDestroy(&pcctx->Bp);
-<a name="line298">298: </a>  PCDestroy(&pcctx->pc);
-<a name="line299">299: </a>  PetscFree(pcctx);
-<a name="line300">300: </a>  PCDestroy(&pjd->pcshell);
-<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
-<a name="line302">302: </a>}
-
-<a name="line306">306: </a><strong><font color="#4169E1"><a name="PEPComputeVectors_JD"></a>PetscErrorCode PEPComputeVectors_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line307">307: </a>{
-<a name="line309">309: </a>  PetscInt       k;
-<a name="line310">310: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
-<a name="line311">311: </a>  Mat            G,X;
-
-<a name="line314">314: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line315">315: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,pep->nconv);
-<a name="line316">316: </a>  <font color="#4169E1">for</font> (k=0;k<pep->nmat;k++) {
-<a name="line317">317: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->W[k],0,pep->nconv);
-<a name="line318">318: </a>    <a href="../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(pep->V,pep->A[k],pjd->W[k]);
-<a name="line319">319: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DSMatExtra[k],&G);
-<a name="line320">320: </a>    <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(pjd->W[k],NULL,pep->V,G);
-<a name="line321">321: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DSMatExtra[k],&G);
-<a name="line322">322: </a>  }
-
-<a name="line324">324: </a>  <font color="#B22222">/* Solve projected problem */</font>
-<a name="line325">325: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line326">326: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
-<a name="line327">327: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
-
-<a name="line329">329: </a>  <font color="#B22222">/* Compute Ritz vectors */</font>
-<a name="line330">330: </a>  <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_X,&X);
-<a name="line331">331: </a>  <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,X,0,pep->nconv);
-<a name="line332">332: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DS_MAT_X,&X);
-<a name="line333">333: </a>  <font color="#4169E1">return</font>(0);
-<a name="line334">334: </a>}
-
-<a name="line338">338: </a><strong><font color="#4169E1"><a name="PEPReset_JD"></a>PetscErrorCode PEPReset_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line339">339: </a>{
-<a name="line341">341: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
-<a name="line342">342: </a>  PetscInt       i;
-
-<a name="line345">345: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line346">346: </a>    <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(pjd->W+i);
-<a name="line347">347: </a>  }
-<a name="line348">348: </a>  PetscFree(pjd->W);
-<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
-<a name="line350">350: </a>}
-
-<a name="line354">354: </a><strong><font color="#4169E1"><a name="PEPDestroy_JD"></a>PetscErrorCode PEPDestroy_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line355">355: </a>{
-
-<a name="line359">359: </a>  PetscFree(pep->data);
-<a name="line360">360: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDSetRestart_C"</font>,NULL);
-<a name="line361">361: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDGetRestart_C"</font>,NULL);
-<a name="line362">362: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDSetTolerances_C"</font>,NULL);
-<a name="line363">363: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDGetTolerances_C"</font>,NULL);
-<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
-<a name="line365">365: </a>}
-
-<a name="line369">369: </a><strong><font color="#4169E1"><a name="PEPCreate_JD"></a>PETSC_EXTERN PetscErrorCode PEPCreate_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line370">370: </a>{
-<a name="line371">371: </a>  PEP_JD         *pjd;
-
-<a name="line375">375: </a>  PetscNewLog(pep,&pjd);
-<a name="line376">376: </a>  pep->data = (void*)pjd;
-
-<a name="line378">378: </a>  pjd->keep = 0;
-<a name="line379">379: </a>  pjd->mtol = 1e-5;
-<a name="line380">380: </a>  pjd->htol = 1e-2;
-<a name="line381">381: </a>  pjd->stol = 1e-2;
-
-<a name="line383">383: </a>  pep->ops->solve          = PEPSolve_JD;
-<a name="line384">384: </a>  pep->ops->setup          = PEPSetUp_JD;
-<a name="line385">385: </a>  pep->ops->setfromoptions = PEPSetFromOptions_JD;
-<a name="line386">386: </a>  pep->ops->reset          = PEPReset_JD;
-<a name="line387">387: </a>  pep->ops->destroy        = PEPDestroy_JD;
-<a name="line388">388: </a>  pep->ops->view           = PEPView_JD;
-<a name="line389">389: </a>  pep->ops->computevectors = PEPComputeVectors_JD;
-<a name="line390">390: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDSetRestart_C"</font>,PEPJDSetRestart_JD);
-<a name="line391">391: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDGetRestart_C"</font>,PEPJDGetRestart_JD);
-<a name="line392">392: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDSetTolerances_C"</font>,PEPJDSetTolerances_JD);
-<a name="line393">393: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDGetTolerances_C"</font>,PEPJDGetTolerances_JD);
-<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
-<a name="line395">395: </a>}
+<a name="line44"> 44: </a> #include <A href="pjdp.h.html">pjdp.h</A>
+<a name="line45"> 45: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
 
+<a name="line49"> 49: </a><font color="#B22222">/*</font>
+<a name="line50"> 50: </a><font color="#B22222">   Duplicate and resize auxiliary basis</font>
+<a name="line51"> 51: </a><font color="#B22222">*/</font>
+<a name="line52"> 52: </a><strong><font color="#4169E1"><a name="PEPJDDuplicateBasis"></a>static PetscErrorCode PEPJDDuplicateBasis(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> *basis)</font></strong>
+<a name="line53"> 53: </a>{
+<a name="line54"> 54: </a>  PetscErrorCode     ierr;
+<a name="line55"> 55: </a>  PetscInt           nloc,m;
+<a name="line56"> 56: </a>  PetscMPIInt        rank,nproc;
+<a name="line57"> 57: </a>  <a href="../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>             type;
+<a name="line58"> 58: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>       otype;
+<a name="line59"> 59: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> oref;
+<a name="line60"> 60: </a>  PetscReal          oeta;
+<a name="line61"> 61: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>  oblock;
+
+<a name="line64"> 64: </a>  <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line65"> 65: </a>    <a href="../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)pep),basis);
+<a name="line66"> 66: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)pep),&rank);
+<a name="line67"> 67: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&nproc);
+<a name="line68"> 68: </a>    <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(pep->V,&nloc,NULL,&m);
+<a name="line69"> 69: </a>    <font color="#4169E1">if</font> (rank==nproc-1) nloc += pep->nev-1;
+<a name="line70"> 70: </a>    <a href="../../../../docs/manualpages/BV/BVSetSizes.html#BVSetSizes">BVSetSizes</a>(*basis,nloc,PETSC_DECIDE,m);
+<a name="line71"> 71: </a>    <a href="../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(pep->V,&type);
+<a name="line72"> 72: </a>    <a href="../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(*basis,type);
+<a name="line73"> 73: </a>    <a href="../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(pep->V,&otype,&oref,&oeta,&oblock);
+<a name="line74"> 74: </a>    <a href="../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(*basis,otype,oref,oeta,oblock);
+<a name="line75"> 75: </a>    PetscObjectStateIncrease((PetscObject)*basis);
+<a name="line76"> 76: </a>  } <font color="#4169E1">else</font> {
+<a name="line77"> 77: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(pep->V,basis);
+<a name="line78"> 78: </a>  }
+<a name="line79"> 79: </a>  <font color="#4169E1">return</font>(0);
+<a name="line80"> 80: </a>}
+
+<a name="line84"> 84: </a><strong><font color="#4169E1"><a name="PEPSetUp_JD"></a>PetscErrorCode PEPSetUp_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line85"> 85: </a>{
+<a name="line87"> 87: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line88"> 88: </a>  PetscBool      isshift,flg;
+<a name="line89"> 89: </a>  PetscInt       i;
+
+<a name="line92"> 92: </a>  pep->lineariz = PETSC_FALSE;
+<a name="line93"> 93: </a>  PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);
+<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (!pep->max_it) pep->max_it = PetscMax(100,2*pep->n/pep->ncv);
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (!pep->which) pep->which = PEP_LARGEST_MAGNITUDE;
+
+<a name="line97"> 97: </a>  <font color="#B22222">/* Set STSHIFT as the default <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->st)->type_name) {
+<a name="line99"> 99: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(pep->st,STSHIFT);
+<a name="line100">100: </a>  }
+<a name="line101">101: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSHIFT,&isshift);
+<a name="line102">102: </a>  <font color="#4169E1">if</font> (!isshift) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"JD only works with shift spectral transformation"</font>);
+
+<a name="line104">104: </a>  <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver not implemented for non-monomial bases"</font>);
+<a name="line105">105: </a>  <a href="../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line106">106: </a>  <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver requires the <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> transformation flag unset, see <a href="../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>()"</font>);
+
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (!pjd->keep) pjd->keep = 0.5;
+
+<a name="line110">110: </a>  <a href="../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,0);
+<a name="line111">111: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,5);
+<a name="line112">112: </a>  PetscMalloc2(pep->nmat,&pjd->TV,pep->nmat,&pjd->AX);
+<a name="line113">113: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line114">114: </a>    PEPJDDuplicateBasis(pep,pjd->TV+i);
+<a name="line115">115: </a>  }
+<a name="line116">116: </a>  PEPJDDuplicateBasis(pep,&pjd->W);
+<a name="line117">117: </a>  <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line118">118: </a>    PEPJDDuplicateBasis(pep,&pjd->V);
+<a name="line119">119: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line120">120: </a>      <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,pep->nev-1,pjd->AX+i);
+<a name="line121">121: </a>    }
+<a name="line122">122: </a>    <a href="../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,pep->nev,&pjd->X);
+<a name="line123">123: </a>    PetscCalloc3((pep->nev)*(pep->nev),&pjd->XpX,pep->nev*pep->nev,&pjd->T,pep->nev*pep->nev*pep->nmat,&pjd->Tj);
+<a name="line124">124: </a>  } <font color="#4169E1">else</font> pjd->V = pep->V;
+<a name="line125">125: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(pep->ds,DSPEP);
+<a name="line126">126: </a>  <a href="../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>(pep->ds,pep->nmat-1);
+<a name="line127">127: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(pep->ds,pep->ncv);
+<a name="line128">128: </a>  <font color="#4169E1">return</font>(0);
+<a name="line129">129: </a>}
+
+<a name="line133">133: </a><font color="#B22222">/*</font>
+<a name="line134">134: </a><font color="#B22222">   Updates columns (low to (high-1)) of TV[i]</font>
+<a name="line135">135: </a><font color="#B22222">*/</font>
+<a name="line136">136: </a><strong><font color="#4169E1"><a name="PEPJDUpdateTV"></a>static PetscErrorCode PEPJDUpdateTV(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt low,PetscInt high,Vec *w)</font></strong>
+<a name="line137">137: </a>{
+<a name="line139">139: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line140">140: </a>  PetscInt       pp,col,i,j,nloc,nconv,deg=pep->nmat-1;
+<a name="line141">141: </a>  Vec            v1,v2,t1,t2;
+<a name="line142">142: </a>  PetscScalar    *array1,*array2,*x2,*tt,*xx,*y2,zero=0.0,sone=1.0;
+<a name="line143">143: </a>  PetscMPIInt    rk,np,count;
+<a name="line144">144: </a>  PetscBLASInt   n,ld,one=1;
+
+<a name="line147">147: </a>  nconv = pjd->nconv;
+<a name="line148">148: </a>  PetscMalloc3(nconv,&tt,nconv,&x2,nconv,&xx);
+<a name="line149">149: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)pep),&rk);
+<a name="line150">150: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&np);
+<a name="line151">151: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(pep->V,&nloc,NULL,NULL); 
+<a name="line152">152: </a>  t1 = w[0];
+<a name="line153">153: </a>  t2 = w[1];
+<a name="line154">154: </a>  <font color="#4169E1">for</font> (col=low;col<high;col++) {
+<a name="line155">155: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->V,col,&v1);
+<a name="line156">156: </a>    VecGetArray(v1,&array1);
+<a name="line157">157: </a>    <font color="#4169E1">if</font> (nconv>0) {
+<a name="line158">158: </a>      <font color="#4169E1">if</font> (rk==np-1) { <font color="#4169E1">for</font> (i=0;i<nconv;i++) x2[i] = array1[nloc+i]; }
+<a name="line159">159: </a>      PetscMPIIntCast(nconv,&count);
+<a name="line160">160: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(x2,nconv,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pep));
+<a name="line161">161: </a>    }
+<a name="line162">162: </a>    VecPlaceArray(t1,array1);
+<a name="line163">163: </a>    <font color="#4169E1">for</font> (pp=0;pp<pep->nmat;pp++) {
+<a name="line164">164: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->TV[pp],col,&v2);
+<a name="line165">165: </a>      VecGetArray(v2,&array2);
+<a name="line166">166: </a>      VecPlaceArray(t2,array2);
+<a name="line167">167: </a>      MatMult(pep->A[pp],t1,t2);
+<a name="line168">168: </a>      <font color="#4169E1">if</font> (nconv) {
+<a name="line169">169: </a>        PetscBLASIntCast(pjd->nconv,&n);
+<a name="line170">170: </a>        PetscBLASIntCast(pep->nev,&ld);
+<a name="line171">171: </a>        <font color="#4169E1">for</font> (j=0;j<nconv;j++) tt[j] = x2[j];
+<a name="line172">172: </a>        <font color="#4169E1">for</font> (i=pp+1;i<pep->nmat;i++) {
+<a name="line173">173: </a>          <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pjd->AX[i],1.0,1.0,t2,tt);
+<a name="line174">174: </a>          <font color="#4169E1">if</font> (i!=pep->nmat-1) PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,pjd->T,&ld,tt,&one));
+<a name="line175">175: </a>        }
+<a name="line176">176: </a>        <a href="../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(pjd->X,t1,xx);
+<a name="line177">177: </a>        <font color="#4169E1">if</font> (rk==np-1 && pp<deg) {
+<a name="line178">178: </a>          y2 = array2+nloc;
+<a name="line179">179: </a>          <font color="#4169E1">for</font> (j=0;j<nconv;j++) { y2[j] = xx[j]; xx[j] = x2[j]; }
+<a name="line180">180: </a>          PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&n,pjd->Tj+ld*ld*pp,&ld,y2,&one));
+<a name="line181">181: </a>          <font color="#4169E1">for</font> (i=pp+1;i<pep->nmat-1;i++) {
+<a name="line182">182: </a>            PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&sone,pjd->XpX,&ld,xx,&one,&zero,tt,&one));
+<a name="line183">183: </a>            PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&n,pjd->Tj+ld*ld*i,&ld,tt,&one));
+<a name="line184">184: </a>            <font color="#4169E1">for</font> (j=0;j<nconv;j++) y2[j] += tt[j];
+<a name="line185">185: </a>            <font color="#4169E1">if</font> (i<pep->nmat-2) PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,pjd->T,&ld,xx,&one));
+<a name="line186">186: </a>          }
+<a name="line187">187: </a>        }
+<a name="line188">188: </a>      }
+<a name="line189">189: </a>      VecResetArray(t2);
+<a name="line190">190: </a>      VecRestoreArray(v2,&array2);
+<a name="line191">191: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->TV[pp],col,&v2);        
+<a name="line192">192: </a>    }
+<a name="line193">193: </a>    VecResetArray(t1);
+<a name="line194">194: </a>    VecRestoreArray(v1,&array1);
+<a name="line195">195: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->V,col,&v1);
+<a name="line196">196: </a>  }
+<a name="line197">197: </a>  PetscFree3(tt,x2,xx);
+<a name="line198">198: </a>  <font color="#4169E1">return</font>(0);
+<a name="line199">199: </a>}
+
+<a name="line203">203: </a><font color="#B22222">/*</font>
+<a name="line204">204: </a><font color="#B22222">   RRQR of X. Xin*P=Xou*R. Rank of R is rk</font>
+<a name="line205">205: </a><font color="#B22222">*/</font>
+<a name="line206">206: </a><strong><font color="#4169E1"><a name="PEPJDOrthogonalize"></a>static PetscErrorCode PEPJDOrthogonalize(PetscInt row,PetscInt col,PetscScalar *X,PetscInt ldx,PetscInt *rk,PetscInt *P,PetscScalar *R,PetscInt ldr)</font></strong>
+<a name="line207">207: </a>{
+<a name="line208">208: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GEQP3)</font>
+<a name="line210">210: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQP3 - Lapack routine is unavailable"</font>);
+<a name="line211">211: </a><font color="#A020F0">#else</font>
+<a name="line213">213: </a>  PetscInt       i,j,n,r;
+<a name="line214">214: </a>  PetscBLASInt   row_,col_,ldx_,*p,lwork,info,n_;
+<a name="line215">215: </a>  PetscScalar    *tau,*work;
+<a name="line216">216: </a>  PetscReal      tol,*rwork;
+
+<a name="line219">219: </a>  PetscBLASIntCast(row,&row_);
+<a name="line220">220: </a>  PetscBLASIntCast(col,&col_);
+<a name="line221">221: </a>  PetscBLASIntCast(ldx,&ldx_);
+<a name="line222">222: </a>  n = PetscMin(row,col);
+<a name="line223">223: </a>  PetscBLASIntCast(n,&n_);
+<a name="line224">224: </a>  lwork = 3*col_+1;
+<a name="line225">225: </a>  PetscMalloc4(col,&p,n,&tau,lwork,&work,2*col,&rwork);
+<a name="line226">226: </a>  <font color="#4169E1">for</font> (i=1;i<col;i++) p[i] = 0;
+<a name="line227">227: </a>  p[0] = 1;
+
+<a name="line229">229: </a>  <font color="#B22222">/* rank revealing QR */</font>
+<a name="line230">230: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line231">231: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqp3"</font>,LAPACKgeqp3_(&row_,&col_,X,&ldx_,p,tau,work,&lwork,rwork,&info));
+<a name="line232">232: </a><font color="#A020F0">#else</font>
+<a name="line233">233: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqp3"</font>,LAPACKgeqp3_(&row_,&col_,X,&ldx_,p,tau,work,&lwork,&info));
+<a name="line234">234: </a><font color="#A020F0">#endif</font>
+<a name="line235">235: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQP3 %d"</font>,info);
+<a name="line236">236: </a>  <font color="#4169E1">if</font> (P) <font color="#4169E1">for</font> (i=0;i<col;i++) P[i] = p[i];
+
+<a name="line238">238: </a>  <font color="#B22222">/* rank computation */</font>
+<a name="line239">239: </a>  tol = PetscMax(row,col)*PETSC_MACHINE_EPSILON*PetscAbsScalar(X[0]);
+<a name="line240">240: </a>  r = 1;
+<a name="line241">241: </a>  <font color="#4169E1">for</font> (i=1;i<n;i++) { 
+<a name="line242">242: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(X[i+ldx*i])>tol) r++;
+<a name="line243">243: </a>    <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line244">244: </a>  }
+<a name="line245">245: </a>  <font color="#4169E1">if</font> (rk) *rk=r;
+
+<a name="line247">247: </a>  <font color="#B22222">/* copy upper triangular matrix if requested */</font>
+<a name="line248">248: </a>  <font color="#4169E1">if</font> (R) {
+<a name="line249">249: </a>     <font color="#4169E1">for</font> (i=0;i<r;i++) {
+<a name="line250">250: </a>       PetscMemzero(R+i*ldr,r*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line251">251: </a>       <font color="#4169E1">for</font> (j=0;j<=i;j++) R[i*ldr+j] = X[i*ldx+j];
+<a name="line252">252: </a>     }
+<a name="line253">253: </a>  }
+<a name="line254">254: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&row_,&n_,&n_,X,&ldx_,tau,work,&lwork,&info));
+<a name="line255">255: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+<a name="line256">256: </a>  PetscFree4(p,tau,work,rwork);
+<a name="line257">257: </a>  <font color="#4169E1">return</font>(0);
+<a name="line258">258: </a><font color="#A020F0">#endif</font>
+<a name="line259">259: </a>}
+
+<a name="line263">263: </a><font color="#B22222">/*</font>
+<a name="line264">264: </a><font color="#B22222">   Application of extended preconditioner</font>
+<a name="line265">265: </a><font color="#B22222">*/</font>
+<a name="line266">266: </a><strong><font color="#4169E1"><a name="PEPJDExtendedPCApply"></a>static PetscErrorCode PEPJDExtendedPCApply(PC pc,Vec x,Vec y)</font></strong>
+<a name="line267">267: </a>{
+<a name="line268">268: </a>  PetscInt          i,j,nloc,n,ld;
+<a name="line269">269: </a>  PetscMPIInt       rk,np,count;
+<a name="line270">270: </a>  Vec               tx,ty;
+<a name="line271">271: </a>  PEP_JD_PCSHELL    *ctx;
+<a name="line272">272: </a>  PetscErrorCode    ierr;
+<a name="line273">273: </a>  const PetscScalar *array1;
+<a name="line274">274: </a>  PetscScalar       *x2=NULL,*t=NULL,*ps,*array2;
+<a name="line275">275: </a>  PetscBLASInt      one=1.0,ld_,n_;
+
+<a name="line278">278: </a>  PCShellGetContext(pc,(void**)&ctx);
+<a name="line279">279: </a>  n  = ctx->n;
+<a name="line280">280: </a>  ps = ctx->ps;
+<a name="line281">281: </a>  ld = ctx->ld;
+<a name="line282">282: </a>  <font color="#4169E1">if</font> (n) {
+<a name="line283">283: </a>    PetscMalloc2(n,&x2,n,&t);
+<a name="line284">284: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)pc),&rk);
+<a name="line285">285: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pc),&np);
+<a name="line286">286: </a>    <font color="#4169E1">if</font> (rk==np-1) {
+<a name="line287">287: </a>      VecGetSize(ctx->work[0],&nloc); 
+<a name="line288">288: </a>      VecGetArrayRead(x,&array1);
+<a name="line289">289: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) x2[i] = array1[nloc+i];
+<a name="line290">290: </a>      VecRestoreArrayRead(x,&array1);
+<a name="line291">291: </a>    }
+<a name="line292">292: </a>    PetscMPIIntCast(n,&count);
+<a name="line293">293: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(x2,count,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pc));
+<a name="line294">294: </a>  }
+
+<a name="line296">296: </a>  <font color="#B22222">/* y = B\x apply PC */</font>
+<a name="line297">297: </a>  tx = ctx->work[0];
+<a name="line298">298: </a>  ty = ctx->work[1];
+<a name="line299">299: </a>  VecGetArrayRead(x,&array1);
+<a name="line300">300: </a>  VecPlaceArray(tx,array1);
+<a name="line301">301: </a>  VecGetArray(y,&array2);
+<a name="line302">302: </a>  VecPlaceArray(ty,array2);
+<a name="line303">303: </a>  PCApply(ctx->pc,tx,ty);
+<a name="line304">304: </a>  <font color="#4169E1">if</font> (n) {
+<a name="line305">305: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line306">306: </a>      t[j] = 0.0;
+<a name="line307">307: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) t[j] += ctx->M[i+j*ld]*x2[i];
+<a name="line308">308: </a>    }
+<a name="line309">309: </a>    <font color="#4169E1">if</font> (rk==np-1) <font color="#4169E1">for</font> (i=0;i<n;i++) array2[nloc+i] = t[i];
+<a name="line310">310: </a>    PetscBLASIntCast(ld,&ld_);
+<a name="line311">311: </a>    PetscBLASIntCast(n,&n_);
+<a name="line312">312: </a>    PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,ps,&ld_,t,&one));
+<a name="line313">313: </a>    <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->X,-1.0,1.0,ty,t);
+<a name="line314">314: </a>    PetscFree2(x2,t);
+<a name="line315">315: </a>  }
+<a name="line316">316: </a>  VecResetArray(tx);
+<a name="line317">317: </a>  VecResetArray(ty);
+<a name="line318">318: </a>  VecRestoreArrayRead(x,&array1);
+<a name="line319">319: </a>  VecRestoreArray(y,&array2);
+<a name="line320">320: </a>  <font color="#4169E1">return</font>(0);
+<a name="line321">321: </a>}
+
+<a name="line325">325: </a><font color="#B22222">/*</font>
+<a name="line326">326: </a><font color="#B22222">   Application of shell preconditioner:</font>
+<a name="line327">327: </a><font color="#B22222">      y = B\x - eta*B\p,  with eta = (u'*B\x)/(u'*B\p)</font>
+<a name="line328">328: </a><font color="#B22222">*/</font>
+<a name="line329">329: </a><strong><font color="#4169E1"><a name="PCShellApply_PEPJD"></a>static PetscErrorCode PCShellApply_PEPJD(PC pc,Vec x,Vec y)</font></strong>
+<a name="line330">330: </a>{
+<a name="line332">332: </a>  PetscScalar    eta;
+<a name="line333">333: </a>  PEP_JD_PCSHELL *ctx;
+
+<a name="line336">336: </a>  PCShellGetContext(pc,(void**)&ctx);
+
+<a name="line338">338: </a>  <font color="#B22222">/* y = B\x apply extended PC */</font>
+<a name="line339">339: </a>  PEPJDExtendedPCApply(pc,x,y);
+
+<a name="line341">341: </a>  <font color="#B22222">/* Compute eta = u'*y / u'*Bp */</font>
+<a name="line342">342: </a>  VecDot(y,ctx->u,&eta);
+<a name="line343">343: </a>  eta /= ctx->gamma;
+<a name="line344">344: </a>  
+<a name="line345">345: </a>  <font color="#B22222">/* y = y - eta*Bp */</font>
+<a name="line346">346: </a>  VecAXPY(y,-eta,ctx->Bp); 
+<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
+<a name="line348">348: </a>}
+
+<a name="line352">352: </a><strong><font color="#4169E1"><a name="PEPJDCopyToExtendedVec"></a>static PetscErrorCode PEPJDCopyToExtendedVec(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,Vec v,PetscScalar *a,PetscInt na,PetscInt off,Vec vex,PetscBool back)</font></strong>
+<a name="line353">353: </a>{
+<a name="line355">355: </a>  PetscMPIInt    np,rk,count;
+<a name="line356">356: </a>  PetscScalar    *array1,*array2;
+<a name="line357">357: </a>  PetscInt       nloc;
+
+<a name="line360">360: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)pep),&rk);
+<a name="line361">361: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&np);
+<a name="line362">362: </a>  <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(pep->V,&nloc,NULL,NULL);
+<a name="line363">363: </a>  <font color="#4169E1">if</font> (v) {
+<a name="line364">364: </a>    VecGetArray(v,&array1);
+<a name="line365">365: </a>    VecGetArray(vex,&array2);
+<a name="line366">366: </a>    <font color="#4169E1">if</font> (back) {
+<a name="line367">367: </a>      PetscMemcpy(array1,array2,nloc*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line368">368: </a>    } <font color="#4169E1">else</font> {
+<a name="line369">369: </a>      PetscMemcpy(array2,array1,nloc*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line370">370: </a>    }
+<a name="line371">371: </a>    VecRestoreArray(v,&array1);
+<a name="line372">372: </a>    VecRestoreArray(vex,&array2);
+<a name="line373">373: </a>  }
+<a name="line374">374: </a>  <font color="#4169E1">if</font> (a) {
+<a name="line375">375: </a>    <font color="#4169E1">if</font> (rk==np-1) {
+<a name="line376">376: </a>      VecGetArray(vex,&array2);
+<a name="line377">377: </a>      <font color="#4169E1">if</font> (back) {
+<a name="line378">378: </a>        PetscMemcpy(a,array2+nloc+off,na*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line379">379: </a>      } <font color="#4169E1">else</font> {
+<a name="line380">380: </a>        PetscMemcpy(array2+nloc+off,a,na*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line381">381: </a>      }
+<a name="line382">382: </a>      VecRestoreArray(vex,&array2);
+<a name="line383">383: </a>    }
+<a name="line384">384: </a>    <font color="#4169E1">if</font> (back) {
+<a name="line385">385: </a>      PetscMPIIntCast(na,&count);
+<a name="line386">386: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(a,count,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pep));
+<a name="line387">387: </a>    }
+<a name="line388">388: </a>  }
+<a name="line389">389: </a>  <font color="#4169E1">return</font>(0);
+<a name="line390">390: </a>}
+
+<a name="line394">394: </a><strong><font color="#4169E1"><a name="PEPJDComputePResidual"></a>static PetscErrorCode PEPJDComputePResidual(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,Vec u,PetscScalar theta,Vec p,Vec *work)</font></strong>
+<a name="line395">395: </a>{
+<a name="line396">396: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line398">398: </a>  PetscMPIInt    rk,np,count;
+<a name="line399">399: </a>  Vec            tu,tp,w;
+<a name="line400">400: </a>  PetscScalar    *array1,*array2,*x2=NULL,*y2,fact=1.0,*q=NULL,*tt=NULL,*xx=NULL,sone=1.0,zero=0.0;
+<a name="line401">401: </a>  PetscInt       i,j,nconv=pjd->nconv,nloc,deg=pep->nmat-1;
+<a name="line402">402: </a>  PetscBLASInt   n,ld,one=1;
+
+<a name="line405">405: </a>  <font color="#4169E1">if</font> (nconv>0) {
+<a name="line406">406: </a>    PetscMalloc4(nconv,&xx,nconv,&tt,nconv,&x2,nconv,&q);
+<a name="line407">407: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)pep),&rk);
+<a name="line408">408: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&np);
+<a name="line409">409: </a>    <font color="#4169E1">if</font> (rk==np-1) {
+<a name="line410">410: </a>      <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(pep->V,&nloc,NULL,NULL); 
+<a name="line411">411: </a>      VecGetArray(u,&array1);
+<a name="line412">412: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) x2[i] = array1[nloc+i];
+<a name="line413">413: </a>      VecRestoreArray(u,&array1);
+<a name="line414">414: </a>    }
+<a name="line415">415: </a>    PetscMPIIntCast(nconv,&count);
+<a name="line416">416: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(x2,count,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)pep));
+<a name="line417">417: </a>  }
+<a name="line418">418: </a>  tu = work[0];
+<a name="line419">419: </a>  tp = work[1];
+<a name="line420">420: </a>  w  = work[2];
+<a name="line421">421: </a>  VecGetArray(u,&array1);
+<a name="line422">422: </a>  VecPlaceArray(tu,array1);
+<a name="line423">423: </a>  VecGetArray(p,&array2);
+<a name="line424">424: </a>  VecPlaceArray(tp,array2);
+<a name="line425">425: </a>  VecSet(tp,0.0);
+<a name="line426">426: </a>  <font color="#4169E1">for</font> (i=1;i<pep->nmat;i++) {
+<a name="line427">427: </a>    MatMult(pep->A[i],tu,w);
+<a name="line428">428: </a>    VecAXPY(tp,fact*(PetscReal)i,w);
+<a name="line429">429: </a>    fact *= theta;
+<a name="line430">430: </a>  }
+<a name="line431">431: </a>  <font color="#4169E1">if</font> (nconv) {
+<a name="line432">432: </a>    PetscBLASIntCast(nconv,&n);
+<a name="line433">433: </a>    PetscBLASIntCast(pep->nev,&ld);
+<a name="line434">434: </a>    <font color="#4169E1">for</font> (j=0;j<nconv;j++) q[j] = x2[j];
+<a name="line435">435: </a>    fact = theta;
+<a name="line436">436: </a>    <font color="#4169E1">for</font> (i=2;i<pep->nmat;i++) {
+<a name="line437">437: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pjd->AX[i],1.0,1.0,tp,q);
+<a name="line438">438: </a>      PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,pjd->T,&ld,q,&one));
+<a name="line439">439: </a>      <font color="#4169E1">for</font> (j=0;j<nconv;j++) q[j] += (PetscReal)i*fact*x2[j];
+<a name="line440">440: </a>      fact *= theta;
+<a name="line441">441: </a>    }
+<a name="line442">442: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->X,0,nconv);
+<a name="line443">443: </a>    <a href="../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(pjd->X,tu,xx);
+<a name="line444">444: </a>    <font color="#4169E1">if</font> (rk==np-1) {
+<a name="line445">445: </a>      y2 = array2+nloc;
+<a name="line446">446: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) { q[i] = x2[i]; y2[i] = xx[i]; }
+<a name="line447">447: </a>      PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&n,pjd->Tj+ld*ld,&ld,y2,&one));
+<a name="line448">448: </a>      fact = theta;
+<a name="line449">449: </a>      <font color="#4169E1">for</font> (j=2;j<deg;j++) {
+<a name="line450">450: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&sone,pjd->XpX,&ld,q,&one,&zero,tt,&one));
+<a name="line451">451: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) tt[i] += (PetscReal)j*fact*xx[i];
+<a name="line452">452: </a>        PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&n,pjd->Tj+ld*ld*j,&ld,tt,&one));
+<a name="line453">453: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) y2[i] += tt[i];
+<a name="line454">454: </a>        PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,pjd->T,&ld,q,&one));
+<a name="line455">455: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) q[i] += (PetscReal)j*fact*x2[i];
+<a name="line456">456: </a>        fact *= theta;
+<a name="line457">457: </a>      }
+<a name="line458">458: </a>    }
+<a name="line459">459: </a>    PetscFree4(xx,x2,q,tt);
+<a name="line460">460: </a>  }
+<a name="line461">461: </a>  VecResetArray(tu);
+<a name="line462">462: </a>  VecRestoreArray(u,&array1);
+<a name="line463">463: </a>  VecResetArray(tp);
+<a name="line464">464: </a>  VecRestoreArray(p,&array2);
+<a name="line465">465: </a>  <font color="#4169E1">return</font>(0);
+<a name="line466">466: </a>}
+
+<a name="line470">470: </a><strong><font color="#4169E1"><a name="PEPJDProcessInitialSpace"></a>static PetscErrorCode PEPJDProcessInitialSpace(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,Vec *w)</font></strong>
+<a name="line471">471: </a>{
+<a name="line472">472: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line474">474: </a>  PetscScalar    *tt;
+<a name="line475">475: </a>  Vec            vg,wg;
+<a name="line476">476: </a>  PetscInt       i;
+<a name="line477">477: </a>  PetscReal      norm;
+
+<a name="line480">480: </a>  PetscMalloc1(pep->nev-1,&tt);
+<a name="line481">481: </a>  <font color="#4169E1">if</font> (pep->nini==0) {
+<a name="line482">482: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pjd->V,0);
+<a name="line483">483: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nev-1;i++) tt[i] = 0.0;
+<a name="line484">484: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->V,0,&vg);
+<a name="line485">485: </a>    PEPJDCopyToExtendedVec(pep,NULL,tt,pep->nev-1,0,vg,PETSC_FALSE);
+<a name="line486">486: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->V,0,&vg);
+<a name="line487">487: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(pjd->V,0,NORM_2,&norm);
+<a name="line488">488: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pjd->V,0,1.0/norm);
+<a name="line489">489: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->V,0,&vg);
+<a name="line490">490: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->W,0,&wg);
+<a name="line491">491: </a>    VecSet(wg,0.0);
+<a name="line492">492: </a>    PEPJDComputePResidual(pep,vg,pep->target,wg,w);
+<a name="line493">493: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->W,0,&wg);
+<a name="line494">494: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->V,0,&vg);
+<a name="line495">495: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(pjd->W,0,NORM_2,&norm);
+<a name="line496">496: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pjd->W,0,1.0/norm);
+<a name="line497">497: </a>  } <font color="#4169E1">else</font> {
+<a name="line498">498: </a>   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TO DO"</font>);
+<a name="line499">499: </a>  }
+<a name="line500">500: </a>  PetscFree(tt);
+<a name="line501">501: </a>  <font color="#4169E1">return</font>(0);
+<a name="line502">502: </a>}
+
+<a name="line506">506: </a><strong><font color="#4169E1"><a name="PEPJDShellMatMult"></a>static PetscErrorCode PEPJDShellMatMult(Mat P,Vec x,Vec y)</font></strong>
+<a name="line507">507: </a>{
+<a name="line508">508: </a>  PetscErrorCode    ierr;
+<a name="line509">509: </a>  PEP_JD_MATSHELL   *matctx;
+<a name="line510">510: </a>  PEP_JD            *pjd;
+<a name="line511">511: </a>  PetscMPIInt       rk,np,count;
+<a name="line512">512: </a>  PetscInt          i,j,nconv,nloc,nmat,ldt,deg;
+<a name="line513">513: </a>  Vec               tx,ty;
+<a name="line514">514: </a>  PetscScalar       *array2,*x2=NULL,*y2,fact=1.0,*q=NULL,*tt=NULL,*xx=NULL,theta,*yy=NULL,sone=1.0,zero=0.0;
+<a name="line515">515: </a>  PetscBLASInt      n,ld,one=1;
+<a name="line516">516: </a>  const PetscScalar *array1;
+
+<a name="line519">519: </a>  MatShellGetContext(P,(void**)&matctx);
+<a name="line520">520: </a>  pjd   = (PEP_JD*)(matctx->pep->data);
+<a name="line521">521: </a>  nconv = pjd->nconv;
+<a name="line522">522: </a>  theta = matctx->theta;
+<a name="line523">523: </a>  nmat  = matctx->pep->nmat;
+<a name="line524">524: </a>  deg   = nmat-1;
+<a name="line525">525: </a>  ldt   = matctx->pep->nev;
+<a name="line526">526: </a>  <font color="#4169E1">if</font> (nconv>0) {
+<a name="line527">527: </a>    PetscMalloc5(nconv,&tt,nconv,&x2,nconv,&q,nconv,&xx,nconv,&yy);
+<a name="line528">528: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)P),&rk);
+<a name="line529">529: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)P),&np);
+<a name="line530">530: </a>    <font color="#4169E1">if</font> (rk==np-1) {
+<a name="line531">531: </a>      <a href="../../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(matctx->pep->V,&nloc,NULL,NULL); 
+<a name="line532">532: </a>      VecGetArrayRead(x,&array1);
+<a name="line533">533: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) x2[i] = array1[nloc+i];
+<a name="line534">534: </a>      VecRestoreArrayRead(x,&array1);
+<a name="line535">535: </a>    }
+<a name="line536">536: </a>    PetscMPIIntCast(nconv,&count);
+<a name="line537">537: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(x2,nconv,MPIU_SCALAR,np-1,PetscObjectComm((PetscObject)P));
+<a name="line538">538: </a>  }
+<a name="line539">539: </a>  tx = matctx->work[0];
+<a name="line540">540: </a>  ty = matctx->work[1];
+<a name="line541">541: </a>  VecGetArrayRead(x,&array1);
+<a name="line542">542: </a>  VecPlaceArray(tx,array1);
+<a name="line543">543: </a>  VecGetArray(y,&array2);
+<a name="line544">544: </a>  VecPlaceArray(ty,array2);
+<a name="line545">545: </a>  VecSet(ty,0.0);
+<a name="line546">546: </a>  MatMult(matctx->P,tx,ty);
+<a name="line547">547: </a>  <font color="#4169E1">if</font> (nconv) {
+<a name="line548">548: </a>    PetscBLASIntCast(pjd->nconv,&n);
+<a name="line549">549: </a>    PetscBLASIntCast(ldt,&ld);
+<a name="line550">550: </a>    <font color="#4169E1">for</font> (j=0;j<nconv;j++) q[j] = x2[j];
+<a name="line551">551: </a>    fact = theta;
+<a name="line552">552: </a>    <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line553">553: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pjd->AX[i],1.0,1.0,ty,q);
+<a name="line554">554: </a>      PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,pjd->T,&ld,q,&one));
+<a name="line555">555: </a>      <font color="#4169E1">for</font> (j=0;j<nconv;j++) q[j] += fact*x2[j];
+<a name="line556">556: </a>      fact *= theta;
+<a name="line557">557: </a>    }
+<a name="line558">558: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->X,0,nconv);    
+<a name="line559">559: </a>    <a href="../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(pjd->X,tx,xx);
+<a name="line560">560: </a>    <font color="#4169E1">if</font> (rk==np-1) {
+<a name="line561">561: </a>      y2 = array2+nloc;
+<a name="line562">562: </a>      <font color="#4169E1">for</font> (i=0;i<nconv;i++) { q[i] = x2[i]; y2[i] = xx[i]; }
+<a name="line563">563: </a>      fact = theta;
+<a name="line564">564: </a>      <font color="#4169E1">for</font> (j=1;j<deg;j++) {
+<a name="line565">565: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&sone,pjd->XpX,&ld,q,&one,&zero,tt,&one));
+<a name="line566">566: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) tt[i] += fact*xx[i];
+<a name="line567">567: </a>        PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&n,pjd->Tj+ld*ld*j,&ld,tt,&one));
+<a name="line568">568: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) y2[i] += tt[i];
+<a name="line569">569: </a>        PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,pjd->T,&ld,q,&one));
+<a name="line570">570: </a>        <font color="#4169E1">for</font> (i=0;i<nconv;i++) q[i] += fact*x2[i];
+<a name="line571">571: </a>        fact *= theta;
+<a name="line572">572: </a>      }
+<a name="line573">573: </a>    }
+<a name="line574">574: </a>    PetscFree5(tt,x2,q,xx,yy);
+<a name="line575">575: </a>  }
+<a name="line576">576: </a>  VecResetArray(tx);
+<a name="line577">577: </a>  VecRestoreArrayRead(x,&array1);
+<a name="line578">578: </a>  VecResetArray(ty);
+<a name="line579">579: </a>  VecRestoreArray(y,&array2);
+<a name="line580">580: </a>  <font color="#4169E1">return</font>(0);
+<a name="line581">581: </a>}
+
+<a name="line585">585: </a><strong><font color="#4169E1"><a name="PEPJDCreateShellPC"></a>static PetscErrorCode PEPJDCreateShellPC(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line586">586: </a>{
+<a name="line587">587: </a>  PEP_JD          *pjd = (PEP_JD*)pep->data;
+<a name="line588">588: </a>  PEP_JD_PCSHELL  *pcctx;
+<a name="line589">589: </a>  PEP_JD_MATSHELL *matctx;
+<a name="line590">590: </a>  KSP             ksp;
+<a name="line591">591: </a>  PetscInt        nloc,mloc;
+<a name="line592">592: </a>  PetscMPIInt     np,rk;
+<a name="line593">593: </a>  PetscErrorCode  ierr;
+
+<a name="line596">596: </a>  PCCreate(PetscObjectComm((PetscObject)pep),&pjd->pcshell);
+<a name="line597">597: </a>  PCSetType(pjd->pcshell,PCSHELL);
+<a name="line598">598: </a>  PCShellSetName(pjd->pcshell,<font color="#666666">"PCPEPJD"</font>);
+<a name="line599">599: </a>  PCShellSetApply(pjd->pcshell,PCShellApply_PEPJD);
+<a name="line600">600: </a>  PetscNew(&pcctx);
+<a name="line601">601: </a>  PCShellSetContext(pjd->pcshell,pcctx);
+<a name="line602">602: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(pep->st,&ksp);
+<a name="line603">603: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pjd->V,&pcctx->Bp);
+<a name="line604">604: </a>  KSPGetPC(ksp,&pcctx->pc);
+<a name="line605">605: </a>  PetscObjectReference((PetscObject)pcctx->pc);
+<a name="line606">606: </a>  MatGetLocalSize(pep->A[0],&mloc,&nloc);
+<a name="line607">607: </a>  <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line608">608: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)pep),&rk);
+<a name="line609">609: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&np);
+<a name="line610">610: </a>    <font color="#4169E1">if</font> (rk==np-1) { nloc += pep->nev-1; mloc += pep->nev-1; }
+<a name="line611">611: </a>  }
+<a name="line612">612: </a>  PetscNew(&matctx);
+<a name="line613">613: </a>  MatCreateShell(PetscObjectComm((PetscObject)pep),nloc,mloc,PETSC_DETERMINE,PETSC_DETERMINE,matctx,&pjd->Pshell);
+<a name="line614">614: </a>  MatShellSetOperation(pjd->Pshell,MATOP_MULT,(void(*)())PEPJDShellMatMult);
+<a name="line615">615: </a>  matctx->pep = pep;
+<a name="line616">616: </a>  MatDuplicate(pep->A[0],MAT_DO_NOT_COPY_VALUES,&matctx->P);
+<a name="line617">617: </a>  PCSetOperators(pcctx->pc,matctx->P,matctx->P);
+<a name="line618">618: </a>  KSPSetPC(ksp,pjd->pcshell);
+<a name="line619">619: </a>  KSPSetOperators(ksp,pjd->Pshell,pjd->Pshell);
+<a name="line620">620: </a>  <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line621">621: </a>    PetscMalloc2(pep->nev*pep->nev,&pcctx->M,pep->nev*pep->nev,&pcctx->ps);
+<a name="line622">622: </a>    pcctx->X  = pjd->X;
+<a name="line623">623: </a>    pcctx->ld = pep->nev;
+<a name="line624">624: </a>  }
+<a name="line625">625: </a>  <font color="#4169E1">return</font>(0);
+<a name="line626">626: </a>}
+
+<a name="line630">630: </a><strong><font color="#4169E1"><a name="PEPJDUpdateExtendedPC"></a>static PetscErrorCode PEPJDUpdateExtendedPC(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar theta)</font></strong>
+<a name="line631">631: </a>{
+<a name="line633">633: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line634">634: </a>  PEP_JD_PCSHELL *pcctx;  
+<a name="line635">635: </a>  PetscInt       i,j,k,n=pjd->nconv,ld=pep->nev,deg=pep->nmat-1;
+<a name="line636">636: </a>  PetscScalar    fact,*M,*ps,*work,*U,*V,*S,sone=1.0,zero=0.0;
+<a name="line637">637: </a>  PetscReal      tol,maxeig=0.0,*sg,*rwork;
+<a name="line638">638: </a>  PetscBLASInt   n_,info,ld_,*p,lw_,rk=0;
+
+<a name="line641">641: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(PETSC_MISSING_LAPACK_GETRF)</font>
+<a name="line643">643: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD/GETRI/GETRF - Lapack routine is unavailable"</font>);
+<a name="line644">644: </a><font color="#A020F0">#else</font>
+<a name="line645">645: </a>  <font color="#4169E1">if</font> (n) { 
+<a name="line646">646: </a>    PCShellGetContext(pjd->pcshell,(void**)&pcctx);
+<a name="line647">647: </a>    pcctx->n = n;
+<a name="line648">648: </a>    M  = pcctx->M;
+<a name="line649">649: </a>    ps = pcctx->ps;
+<a name="line650">650: </a>                      <font color="#B22222">/* h, and q are vectors containing diagonal matrices */</font>
+<a name="line651">651: </a>    PetscCalloc7(n*n,&U,n*n,&V,n*n,&S,n,&sg,10*n,&work,5*n,&rwork,n,&p);
+<a name="line652">652: </a>    <font color="#B22222">/* pseudo-inverse */</font>
+<a name="line653">653: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line654">654: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++) S[n*j+i] = -pjd->T[pep->nev*j+i];
+<a name="line655">655: </a>      S[n*i+i] = theta-pjd->T[pep->nev*i+i];
+<a name="line656">656: </a>    }
+<a name="line657">657: </a>    PetscBLASIntCast(n,&n_);
+<a name="line658">658: </a>    PetscBLASIntCast(ld,&ld_);
+<a name="line659">659: </a>    lw_ = 10*n_;
+<a name="line660">660: </a><font color="#A020F0">#if !defined (PETSC_USE_COMPLEX)</font>
+<a name="line661">661: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&n_,&n_,S,&n_,sg,U,&n_,V,&n_,work,&lw_,&info));
+<a name="line662">662: </a><font color="#A020F0">#else</font>
+<a name="line663">663: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&n_,&n_,S,&n_,sg,U,&n_,V,&n_,work,&lw_,rwork,&info));
+<a name="line664">664: </a><font color="#A020F0">#endif</font>
+<a name="line665">665: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) maxeig = PetscMax(maxeig,sg[i]);
+<a name="line666">666: </a>    tol = 10*PETSC_MACHINE_EPSILON*n*maxeig;
+<a name="line667">667: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line668">668: </a>      <font color="#4169E1">if</font> (sg[j]>tol) {
+<a name="line669">669: </a>        <font color="#4169E1">for</font> (i=0;i<n;i++) U[j*n+i] /= sg[j];
+<a name="line670">670: </a>        rk++;
+<a name="line671">671: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line672">672: </a>    }
+<a name="line673">673: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&n_,&rk,&sone,U,&n_,V,&n_,&zero,ps,&ld_));
+
+<a name="line675">675: </a>    <font color="#B22222">/* compute M */</font>
+<a name="line676">676: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&n_,&n_,&sone,pjd->XpX,&ld_,ps,&ld_,&zero,M,&ld_));
+<a name="line677">677: </a>    fact = theta;
+<a name="line678">678: </a>    PetscMemzero(S,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line679">679: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) S[j*(n+1)] = 1.0; <font color="#B22222">/* q=S */</font>
+<a name="line680">680: </a>    <font color="#4169E1">for</font> (k=0;k<deg;k++) {
+<a name="line681">681: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++) <font color="#4169E1">for</font> (i=0;i<n;i++) V[j*n+i] = S[j*n+i] + M[j*ld+i]*fact;
+<a name="line682">682: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&n_,&n_,&sone,pjd->XpX,&ld_,V,&n_,&zero,U,&n_));
+<a name="line683">683: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&n_,&n_,&n_,&sone,pjd->Tj+k*ld*ld,&ld_,U,&n_,&sone,M,&ld_));
+<a name="line684">684: </a>      PetscStackCallBLAS(<font color="#666666">"BLAStrmm"</font>,BLAStrmm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&n_,&sone,pjd->T,&ld_,S,&n_));
+<a name="line685">685: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++) S[j*(n+1)] += fact;
+<a name="line686">686: </a>      fact *=theta;
+<a name="line687">687: </a>    }
+<a name="line688">688: </a>    <font color="#B22222">/* inverse */</font>
+<a name="line689">689: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&n_,&n_,M,&ld_,p,&info));
+<a name="line690">690: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&n_,M,&ld_,p,work,&n_,&info));
+<a name="line691">691: </a>    PetscFree7(U,V,S,sg,work,rwork,p);
+<a name="line692">692: </a>  }
+<a name="line693">693: </a>  <font color="#4169E1">return</font>(0);
+<a name="line694">694: </a><font color="#A020F0">#endif</font>
+<a name="line695">695: </a>}
+
+<a name="line699">699: </a><strong><font color="#4169E1"><a name="PEPJDPCMatSetUp"></a>static PetscErrorCode PEPJDPCMatSetUp(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar theta)</font></strong>
+<a name="line700">700: </a>{
+<a name="line701">701: </a>  PetscErrorCode  ierr;
+<a name="line702">702: </a>  PEP_JD          *pjd = (PEP_JD*)pep->data;
+<a name="line703">703: </a>  PEP_JD_MATSHELL *matctx;
+<a name="line704">704: </a>  PEP_JD_PCSHELL  *pcctx;  
+<a name="line705">705: </a>  MatStructure    str;
+<a name="line706">706: </a>  PetscScalar     t;
+<a name="line707">707: </a>  PetscInt        i;
+
+<a name="line710">710: </a>  MatShellGetContext(pjd->Pshell,(void**)&matctx);
+<a name="line711">711: </a>  PCShellGetContext(pjd->pcshell,(void**)&pcctx);
+<a name="line712">712: </a>  <a href="../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line713">713: </a>  MatCopy(pep->A[0],matctx->P,str);
+<a name="line714">714: </a>  t = theta;
+<a name="line715">715: </a>  <font color="#4169E1">for</font> (i=1;i<pep->nmat;i++) {
+<a name="line716">716: </a>    <font color="#4169E1">if</font> (t!=0.0) { MatAXPY(matctx->P,t,pep->A[i],str); }
+<a name="line717">717: </a>    t *= theta;
+<a name="line718">718: </a>  }
+<a name="line719">719: </a>  PCSetOperators(pcctx->pc,matctx->P,matctx->P);
+<a name="line720">720: </a>  PCSetUp(pcctx->pc);
+<a name="line721">721: </a>  matctx->theta = theta;
+<a name="line722">722: </a>  <font color="#4169E1">return</font>(0);
+<a name="line723">723: </a>}
+
+<a name="line727">727: </a><strong><font color="#4169E1"><a name="PEPJDEigenvectors"></a>static PetscErrorCode PEPJDEigenvectors(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line728">728: </a>{
+<a name="line730">730: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line731">731: </a>  PetscBLASInt   ld,nconv,info,nc;
+<a name="line732">732: </a>  PetscScalar    *Z,*w;
+<a name="line733">733: </a>  PetscReal      *wr,norm;
+<a name="line734">734: </a>  PetscInt       i;
+<a name="line735">735: </a>  Mat            U;
+<a name="line736">736: </a> 
+<a name="line738">738: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TREVC)</font>
+<a name="line740">740: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TREVC - Lapack routine is unavailable"</font>);
+<a name="line741">741: </a><font color="#A020F0">#else</font>
+<a name="line742">742: </a>  PetscMalloc3(pjd->nconv*pjd->nconv,&Z,3*pep->nev,&wr,2*pep->nev,&w);
+<a name="line743">743: </a>  PetscBLASIntCast(pep->nev,&ld);
+<a name="line744">744: </a>  PetscBLASIntCast(pjd->nconv,&nconv);
+<a name="line745">745: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line746">746: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(<font color="#666666">"R"</font>,<font color="#666666">"A"</font>,NULL,&nconv,pjd->T,&ld,NULL,&nconv,Z,&nconv,&nconv,&nc,wr,&info));
+<a name="line747">747: </a><font color="#A020F0">#else</font>
+<a name="line748">748: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(<font color="#666666">"R"</font>,<font color="#666666">"A"</font>,NULL,&nconv,pjd->T,&ld,NULL,&nconv,Z,&nconv,&nconv,&nc,w,wr,&info));
+<a name="line749">749: </a><font color="#A020F0">#endif</font>
+<a name="line750">750: </a>  MatCreateSeqDense(PETSC_COMM_SELF,nconv,nconv,Z,&U);
+<a name="line751">751: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->X,0,pjd->nconv);
+<a name="line752">752: </a>  <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pjd->X,U,0,pjd->nconv);
+<a name="line753">753: </a>  <font color="#4169E1">for</font> (i=0;i<pjd->nconv;i++) {
+<a name="line754">754: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(pjd->X,i,NORM_2,&norm);
+<a name="line755">755: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pjd->X,i,1.0/norm);  
+<a name="line756">756: </a>  }
+<a name="line757">757: </a>  MatDestroy(&U);
+<a name="line758">758: </a>  PetscFree3(Z,wr,w);
+<a name="line759">759: </a>  <font color="#4169E1">return</font>(0);
+<a name="line760">760: </a><font color="#A020F0">#endif</font>
+<a name="line761">761: </a>}
+
+<a name="line765">765: </a><strong><font color="#4169E1"><a name="PEPJDLockConverged"></a>PetscErrorCode PEPJDLockConverged(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *nv,Vec u,Vec *ww)</font></strong>
+<a name="line766">766: </a>{
+<a name="line767">767: </a>  PetscErrorCode    ierr;
+<a name="line768">768: </a>  PEP_JD            *pjd = (PEP_JD*)pep->data;
+<a name="line769">769: </a>  PetscInt          j,i,ldds,rk,*P,nvv=*nv;
+<a name="line770">770: </a>  Vec               v;
+<a name="line771">771: </a>  PetscBLASInt      n,ld,rk_,nv_,info,one=1;
+<a name="line772">772: </a>  PetscScalar       sone=1.0,*Tj,*R,*r,*tt,*pX;
+<a name="line773">773: </a>  Mat               X;
+<a name="line774">774: </a>  const PetscScalar *array;
+
+<a name="line777">777: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TRTRI)</font>
+<a name="line779">779: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TRTRI - Lapack routine is unavailable"</font>);
+<a name="line780">780: </a><font color="#A020F0">#else</font>
+<a name="line781">781: </a>  <font color="#B22222">/* update AX and XpX */</font>
+<a name="line782">782: </a>  VecGetArrayRead(u,&array);
+<a name="line783">783: </a>  VecPlaceArray(ww[0],array);
+<a name="line784">784: </a>  <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
+<a name="line785">785: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->AX[j],pjd->nconv-1,&v);
+<a name="line786">786: </a>    MatMult(pep->A[j],ww[0],v);
+<a name="line787">787: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->AX[j],pjd->nconv-1,&v);
+<a name="line788">788: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->AX[j],0,pjd->nconv);
+<a name="line789">789: </a>  }
+<a name="line790">790: </a>  <a href="../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(pjd->X,ww[0],pjd->XpX+(pjd->nconv-1)*(pep->nev));
+<a name="line791">791: </a>  <font color="#4169E1">for</font> (j=0;j<pjd->nconv-1;j++) pjd->XpX[j*(pep->nev)+pjd->nconv-1] = PetscConj(pjd->XpX[(pjd->nconv-1)*(pep->nev)+j]);
+<a name="line792">792: </a>  VecResetArray(ww[0]);
+<a name="line793">793: </a>  VecRestoreArrayRead(u,&array);
+<a name="line794">794: </a>  
+<a name="line795">795: </a>  <font color="#B22222">/* Compute powers of T */</font>
+<a name="line796">796: </a>  PetscBLASIntCast(pjd->nconv,&n);
+<a name="line797">797: </a>  PetscBLASIntCast(pep->nev,&ld);
+<a name="line798">798: </a>  PetscMemzero(pjd->Tj,pep->nev*pep->nev*pep->nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line799">799: </a>  Tj = pjd->Tj;
+<a name="line800">800: </a>  <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) Tj[(pep->nev+1)*j] = 1.0;
+<a name="line801">801: </a>  Tj = pjd->Tj+pep->nev*pep->nev;
+<a name="line802">802: </a>  PetscMemcpy(Tj,pjd->T,pep->nev*pjd->nconv*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line803">803: </a>  <font color="#4169E1">for</font> (j=2;j<pep->nmat;j++) {
+<a name="line804">804: </a>    PetscMemcpy(Tj+pep->nev*pep->nev,Tj,pep->nev*pjd->nconv*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line805">805: </a>    Tj += pep->nev*pep->nev;
+<a name="line806">806: </a>    PetscStackCallBLAS(<font color="#666666">"BLAStrmm"</font>,BLAStrmm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&sone,pjd->T,&ld,Tj,&ld));
+<a name="line807">807: </a>  }
+
+<a name="line809">809: </a>  <font color="#B22222">/* Extend search space */</font>
+<a name="line810">810: </a>  PetscCalloc4(nvv,&P,nvv*nvv,&R,nvv,&r,pep->nev-1,&tt);
+<a name="line811">811: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldds);
+<a name="line812">812: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_X,&pX);
+<a name="line813">813: </a>  PEPJDOrthogonalize(nvv,nvv,pX,ldds,&rk,P,R,nvv);
+<a name="line814">814: </a>  <font color="#4169E1">for</font> (i=0;i<rk-1;i++) r[i] = PetscConj(R[nvv*i]*pep->eigr[P[i+1]]); <font color="#B22222">/* first row scaled with permuted diagonal */</font>
+<a name="line815">815: </a>  PetscBLASIntCast(rk,&rk_);
+<a name="line816">816: </a>  PetscBLASIntCast(nvv,&nv_);
+<a name="line817">817: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrtri"</font>,LAPACKtrtri_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,&rk_,R,&nv_,&info));
+<a name="line818">818: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,1,<font color="#666666">"Error in xTRTRI, info=%D"</font>,(PetscInt)info);
+<a name="line819">819: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrmv"</font>,BLAStrmv_(<font color="#666666">"U"</font>,<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&rk_,R,&nv_,r,&one));
+<a name="line820">820: </a>  <font color="#4169E1">for</font> (i=0;i<rk;i++) r[i] = PetscConj(r[i]); <font color="#B22222">/* revert */</font>
+<a name="line821">821: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->V,0,nvv);
+<a name="line822">822: </a>  <font color="#4169E1">for</font> (j=0;j<rk-1;j++) {
+<a name="line823">823: </a>    PetscMemcpy(R+j*nvv,pX+(j+1)*ldds,nvv*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line824">824: </a>  } 
+<a name="line825">825: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_X,&pX);
+<a name="line826">826: </a>  MatCreateSeqDense(PETSC_COMM_SELF,nvv,rk-1,R,&X);
+<a name="line827">827: </a>  <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pjd->V,X,0,rk-1);
+<a name="line828">828: </a>  MatDestroy(&X);
+<a name="line829">829: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->V,0,rk-1);
+<a name="line830">830: </a>  <font color="#4169E1">for</font> (j=0;j<rk-1;j++) {
+<a name="line831">831: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->V,j,&v);
+<a name="line832">832: </a>    PEPJDCopyToExtendedVec(pep,NULL,r+j,1,pjd->nconv-1,v,PETSC_FALSE);
+<a name="line833">833: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->V,j,&v);
+<a name="line834">834: </a>  }
+<a name="line835">835: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(pjd->V,NULL); 
+<a name="line836">836: </a>  <font color="#4169E1">for</font> (j=0;j<rk-1;j++) {
+<a name="line837">837: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->W,j,&v);
+<a name="line838">838: </a>    PEPJDCopyToExtendedVec(pep,NULL,tt,pep->nev-1,0,v,PETSC_FALSE);
+<a name="line839">839: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->W,j,&v);
+<a name="line840">840: </a>  }
+<a name="line841">841: </a>  *nv = rk-1;
+<a name="line842">842: </a>  PetscFree4(P,R,r,tt);
+<a name="line843">843: </a><font color="#A020F0">#endif</font>
+<a name="line844">844: </a>  <font color="#4169E1">return</font>(0);
+<a name="line845">845: </a>}
+
+<a name="line849">849: </a><strong><font color="#4169E1"><a name="PEPSolve_JD"></a>PetscErrorCode PEPSolve_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line850">850: </a>{
+<a name="line851">851: </a>  PetscErrorCode  ierr;
+<a name="line852">852: </a>  PEP_JD          *pjd = (PEP_JD*)pep->data;
+<a name="line853">853: </a>  PetscInt        k,nv,ld,minv,low,high,*P,dim;
+<a name="line854">854: </a>  PetscScalar     theta=0.0,*pX,*stt,*exu,*exr,*exp,*R,*eig;
+<a name="line855">855: </a>  PetscReal       norm,*res;
+<a name="line856">856: </a>  PetscBool       lindep,initial=PETSC_FALSE,flglk=PETSC_FALSE,flgre=PETSC_FALSE;
+<a name="line857">857: </a>  Vec             t,u,p,r,*ww=pep->work,v;
+<a name="line858">858: </a>  Mat             G,X,Y;
+<a name="line859">859: </a>  KSP             ksp;
+<a name="line860">860: </a>  PEP_JD_PCSHELL  *pcctx;
+<a name="line861">861: </a>  PEP_JD_MATSHELL *matctx;
+
+<a name="line864">864: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ld);
+<a name="line865">865: </a>  PetscMalloc5(ld,&P,ld,&stt,pep->nev-1,&exu,pep->nev-1,&exr,pep->nev-1,&exp);
+<a name="line866">866: </a>  PetscMalloc3(ld*ld,&R,pep->ncv,&eig,pep->ncv,&res);
+<a name="line867">867: </a>  <a href="../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pjd->V,&u);
+<a name="line868">868: </a>  VecDuplicate(u,&p);
+<a name="line869">869: </a>  VecDuplicate(u,&r);
+<a name="line870">870: </a>  <a href="../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(pep->st,&ksp);
+
+<a name="line872">872: </a>  <font color="#4169E1">if</font> (pep->nini) {
+<a name="line873">873: </a>    nv = pep->nini; initial = PETSC_TRUE;
+<a name="line874">874: </a>  } <font color="#4169E1">else</font> {
+<a name="line875">875: </a>    theta = pep->target;
+<a name="line876">876: </a>    nv = 1;
+<a name="line877">877: </a>  }
+<a name="line878">878: </a>  PEPJDProcessInitialSpace(pep,ww);
+<a name="line879">879: </a>  <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pjd->V,0,u);
+
+<a name="line881">881: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line882">882: </a>  <font color="#4169E1">while</font> (pep->reason == PEP_CONVERGED_ITERATING) {
+<a name="line883">883: </a>    pep->its++;
+
+<a name="line885">885: </a>    low = (flglk || flgre)? 0: nv-1;
+<a name="line886">886: </a>    high = nv;
+<a name="line887">887: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,nv,0,0,0);
+<a name="line888">888: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->V,low,high);
+<a name="line889">889: </a>    PEPJDUpdateTV(pep,low,high,ww);
+<a name="line890">890: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->W,low,high);
+<a name="line891">891: </a>    <font color="#4169E1">for</font> (k=0;k<pep->nmat;k++) {
+<a name="line892">892: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->TV[k],low,high);
+<a name="line893">893: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DSMatExtra[k],&G);
+<a name="line894">894: </a>      <a href="../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(pjd->TV[k],NULL,pjd->W,G);
+<a name="line895">895: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DSMatExtra[k],&G);
+<a name="line896">896: </a>    }
+<a name="line897">897: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->V,0,nv);
+<a name="line898">898: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->W,0,nv);
+
+<a name="line900">900: </a>    <font color="#B22222">/* Solve projected problem */</font>
+<a name="line901">901: </a>    <font color="#4169E1">if</font> (nv>1 || initial ) {
+<a name="line902">902: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line903">903: </a>      <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv);
+<a name="line904">904: </a>      <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);
+<a name="line905">905: </a>      <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr+pep->nconv,pep->eigi+pep->nconv,NULL,NULL,NULL);
+<a name="line906">906: </a>      theta = pep->eigr[0];
+<a name="line907">907: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line908">908: </a>      <font color="#4169E1">if</font> (PetscAbsScalar(pep->eigi[pep->nconv])!=0.0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"PJD solver not implemented for complex Ritz values in real arithmetic"</font>);
+<a name="line909">909: </a><font color="#A020F0">#endif</font>
+
+<a name="line911">911: </a>      <font color="#B22222">/* Compute Ritz vector u=V*X(:,1) */</font>
+<a name="line912">912: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_X,&pX);
+<a name="line913">913: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->V,0,nv);
+<a name="line914">914: </a>      <a href="../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pjd->V,1.0,0.0,u,pX);
+<a name="line915">915: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_X,&pX);
+<a name="line916">916: </a>    }
+<a name="line917">917: </a>    PEPJDUpdateExtendedPC(pep,theta);
+
+<a name="line919">919: </a>    <font color="#B22222">/* Replace preconditioner with one containing projectors */</font>
+<a name="line920">920: </a>    <font color="#4169E1">if</font> (!pjd->pcshell) {
+<a name="line921">921: </a>      PEPJDCreateShellPC(pep);
+<a name="line922">922: </a>      PCShellGetContext(pjd->pcshell,(void**)&pcctx);
+<a name="line923">923: </a>      MatShellGetContext(pjd->Pshell,(void**)&matctx);
+<a name="line924">924: </a>      matctx->work = ww;
+<a name="line925">925: </a>      pcctx->work  = ww;
+<a name="line926">926: </a>    }
+<a name="line927">927: </a>    PEPJDPCMatSetUp(pep,theta);
+<a name="line928">928: </a>    
+<a name="line929">929: </a>    <font color="#B22222">/* Compute r and r' */</font>
+<a name="line930">930: </a>    MatMult(pjd->Pshell,u,r);
+<a name="line931">931: </a>    PEPJDComputePResidual(pep,u,theta,p,ww);
+<a name="line932">932: </a>    pcctx->u = u;
+
+<a name="line934">934: </a>    <font color="#B22222">/* Check convergence */</font>
+<a name="line935">935: </a>    VecNorm(r,NORM_2,&norm);
+<a name="line936">936: </a>    (*pep->converged)(pep,theta,0,norm,&pep->errest[pep->nconv],pep->convergedctx);
+<a name="line937">937: </a>    <font color="#4169E1">if</font> (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
+
+<a name="line939">939: </a>    <font color="#4169E1">if</font> (pep->errest[pep->nconv]<pep->tol) {
+
+<a name="line941">941: </a>      <font color="#B22222">/* Ritz pair converged */</font>
+<a name="line942">942: </a>      minv = PetscMin(nv,(PetscInt)(pjd->keep*pep->ncv));
+<a name="line943">943: </a>      <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line944">944: </a>        <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->X,pjd->nconv,&v);
+<a name="line945">945: </a>        PEPJDCopyToExtendedVec(pep,v,pjd->T+pep->nev*pjd->nconv,pep->nev-1,0,u,PETSC_TRUE);
+<a name="line946">946: </a>        <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->X,pjd->nconv,&v);
+<a name="line947">947: </a>        <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pjd->X,0,pjd->nconv+1);
+<a name="line948">948: </a>        <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(pjd->X,pjd->nconv,NORM_2,&norm);
+<a name="line949">949: </a>        <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pjd->X,pjd->nconv,1.0/norm);
+<a name="line950">950: </a>        <font color="#4169E1">for</font> (k=0;k<pjd->nconv;k++) pjd->T[pep->nev*pjd->nconv+k] /= norm;
+<a name="line951">951: </a>        pjd->T[(pep->nev+1)*pjd->nconv] = pep->eigr[0];
+<a name="line952">952: </a>      } <font color="#4169E1">else</font> {
+<a name="line953">953: </a>        <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,pep->nconv,u);
+<a name="line954">954: </a>      }
+<a name="line955">955: </a>      pjd->nconv++;
+<a name="line956">956: </a>      <font color="#4169E1">if</font> (pjd->nconv >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
+
+<a name="line958">958: </a>      <font color="#4169E1">if</font> (pep->reason==PEP_CONVERGED_ITERATING) {
+<a name="line959">959: </a>        PEPJDLockConverged(pep,&nv,u,ww);
+<a name="line960">960: </a>        <a href="../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pjd->V,nv,u);
+<a name="line961">961: </a>        <font color="#4169E1">if</font> (nv==1) theta = pep->target;
+<a name="line962">962: </a>      }
+<a name="line963">963: </a>      flglk = PETSC_TRUE;
+<a name="line964">964: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (nv==pep->ncv-1) {
+
+<a name="line966">966: </a>      <font color="#B22222">/* Basis full, force restart */</font>
+<a name="line967">967: </a>      minv = PetscMin(nv,(PetscInt)(pjd->keep*pep->ncv));
+<a name="line968">968: </a>      <a href="../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,&dim,NULL,NULL,NULL,NULL);
+<a name="line969">969: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_X,&pX);
+<a name="line970">970: </a>      PEPJDOrthogonalize(dim,minv,pX,ld,&minv,NULL,NULL,ld);
+<a name="line971">971: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_X,&pX);
+<a name="line972">972: </a>      <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Y,&pX);
+<a name="line973">973: </a>      PEPJDOrthogonalize(dim,minv,pX,ld,&minv,NULL,NULL,ld);
+<a name="line974">974: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Y,&pX);
+<a name="line975">975: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_X,&X);
+<a name="line976">976: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pjd->V,X,pep->nconv,minv);
+<a name="line977">977: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DS_MAT_X,&X);
+<a name="line978">978: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_Y,&Y);
+<a name="line979">979: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pjd->W,Y,pep->nconv,minv);
+<a name="line980">980: </a>      <a href="../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(pep->ds,DS_MAT_Y,&Y);
+<a name="line981">981: </a>      nv = minv;
+<a name="line982">982: </a>      flgre = PETSC_TRUE;
+<a name="line983">983: </a>    } <font color="#4169E1">else</font> {
+<a name="line984">984: </a>      <font color="#B22222">/* Solve correction equation to expand basis */</font>
+<a name="line985">985: </a>      PEPJDExtendedPCApply(pjd->pcshell,p,pcctx->Bp);
+<a name="line986">986: </a>      VecDot(pcctx->Bp,u,&pcctx->gamma);
+<a name="line987">987: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->V,nv,&t);
+<a name="line988">988: </a>      KSPSolve(ksp,r,t);
+<a name="line989">989: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->V,nv,&t);
+<a name="line990">990: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pjd->V,nv,NULL,&norm,&lindep);
+<a name="line991">991: </a>      <font color="#4169E1">if</font> (lindep) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Linearly dependent continuation vector"</font>);
+<a name="line992">992: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pjd->V,nv,1.0/norm);
+<a name="line993">993: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pjd->W,nv,r);
+<a name="line994">994: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pjd->W,nv,NULL,&norm,&lindep);
+<a name="line995">995: </a>      <font color="#4169E1">if</font> (lindep) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Linearly dependent continuation vector"</font>);
+<a name="line996">996: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pjd->W,nv,1.0/norm);
+<a name="line997">997: </a>      nv++;
+<a name="line998">998: </a>      flglk = PETSC_FALSE;
+<a name="line999">999: </a>      flgre = PETSC_FALSE;
+<a name="line1000">1000: </a>    }
+<a name="line1001">1001: </a>    <font color="#4169E1">for</font> (k=pjd->nconv;k<nv;k++) {
+<a name="line1002">1002: </a>      eig[k] = pep->eigr[k-pjd->nconv];
+<a name="line1003">1003: </a>      res[k] = pep->errest[k-pjd->nconv];
+<a name="line1004">1004: </a>    }
+<a name="line1005">1005: </a>    PEPMonitor(pep,pep->its,pjd->nconv,eig,pep->eigi,res,nv);
+<a name="line1006">1006: </a>  }
+<a name="line1007">1007: </a>  <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line1008">1008: </a>    PEPJDEigenvectors(pep);
+<a name="line1009">1009: </a>    <font color="#4169E1">for</font> (k=0;k<pjd->nconv;k++) {
+<a name="line1010">1010: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pjd->X,k,&v);
+<a name="line1011">1011: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,k,v);
+<a name="line1012">1012: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pjd->X,k,&v);
+<a name="line1013">1013: </a>      pep->eigr[k] = pjd->T[(pep->nev+1)*k]; 
+<a name="line1014">1014: </a>    }
+<a name="line1015">1015: </a>    PetscFree2(pcctx->M,pcctx->ps); 
+<a name="line1016">1016: </a>  }
+<a name="line1017">1017: </a>  pep->nconv = pjd->nconv; 
+<a name="line1018">1018: </a>  KSPSetPC(ksp,pcctx->pc);
+<a name="line1019">1019: </a>  MatDestroy(&matctx->P);
+<a name="line1020">1020: </a>  VecDestroy(&pcctx->Bp);
+<a name="line1021">1021: </a>  MatDestroy(&pjd->Pshell);
+<a name="line1022">1022: </a>  PCDestroy(&pcctx->pc);
+<a name="line1023">1023: </a>  PetscFree(pcctx);
+<a name="line1024">1024: </a>  PetscFree(matctx);
+<a name="line1025">1025: </a>  PCDestroy(&pjd->pcshell);
+<a name="line1026">1026: </a>  PetscFree5(P,stt,exu,exr,exp);
+<a name="line1027">1027: </a>  PetscFree3(R,eig,res);
+<a name="line1028">1028: </a>  VecDestroy(&u);
+<a name="line1029">1029: </a>  VecDestroy(&r);
+<a name="line1030">1030: </a>  VecDestroy(&p);
+<a name="line1031">1031: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1032">1032: </a>}
+
+<a name="line1036">1036: </a><strong><font color="#4169E1"><a name="PEPReset_JD"></a>PetscErrorCode PEPReset_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1037">1037: </a>{
+<a name="line1039">1039: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line1040">1040: </a>  PetscInt       i;
+
+<a name="line1043">1043: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line1044">1044: </a>    <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(pjd->TV+i);
+<a name="line1045">1045: </a>  }
+<a name="line1046">1046: </a>  <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&pjd->W);
+<a name="line1047">1047: </a>  <font color="#4169E1">if</font> (pep->nev>1) {
+<a name="line1048">1048: </a>    <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&pjd->V);
+<a name="line1049">1049: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line1050">1050: </a>      <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(pjd->AX+i);
+<a name="line1051">1051: </a>    }
+<a name="line1052">1052: </a>    <a href="../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&pjd->X);
+<a name="line1053">1053: </a>    PetscFree3(pjd->XpX,pjd->T,pjd->Tj);
+<a name="line1054">1054: </a>  }
+<a name="line1055">1055: </a>  PetscFree2(pjd->TV,pjd->AX);
+<a name="line1056">1056: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1057">1057: </a>}
+
+<a name="line1061">1061: </a><strong><font color="#4169E1"><a name="PEPDestroy_JD"></a>PetscErrorCode PEPDestroy_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1062">1062: </a>{
+
+<a name="line1066">1066: </a>  PetscFree(pep->data);
+<a name="line1067">1067: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDSetRestart_C"</font>,NULL);
+<a name="line1068">1068: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDGetRestart_C"</font>,NULL);
+<a name="line1069">1069: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1070">1070: </a>}
+
+<a name="line1074">1074: </a><strong><font color="#4169E1"><a name="PEPCreate_JD"></a>PETSC_EXTERN PetscErrorCode PEPCreate_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1075">1075: </a>{
+<a name="line1076">1076: </a>  PEP_JD         *pjd;
+
+<a name="line1080">1080: </a>  PetscNewLog(pep,&pjd);
+<a name="line1081">1081: </a>  pep->data = (void*)pjd;
+
+<a name="line1083">1083: </a>  pjd->keep = 0;
+<a name="line1084">1084: </a>  pep->ops->solve          = PEPSolve_JD;
+<a name="line1085">1085: </a>  pep->ops->setup          = PEPSetUp_JD;
+<a name="line1086">1086: </a>  pep->ops->setfromoptions = PEPSetFromOptions_JD;
+<a name="line1087">1087: </a>  pep->ops->reset          = PEPReset_JD;
+<a name="line1088">1088: </a>  pep->ops->destroy        = PEPDestroy_JD;
+<a name="line1089">1089: </a>  pep->ops->view           = PEPView_JD;
+<a name="line1090">1090: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDSetRestart_C"</font>,PEPJDSetRestart_JD);
+<a name="line1091">1091: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPJDGetRestart_C"</font>,PEPJDGetRestart_JD);
+<a name="line1092">1092: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1093">1093: </a>}
 </pre>
 </body>
 
diff --git a/src/pep/impls/jd/pjdopt.c b/src/pep/impls/jd/pjdopt.c
index ee1e999..e2cf524 100644
--- a/src/pep/impls/jd/pjdopt.c
+++ b/src/pep/impls/jd/pjdopt.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -25,112 +25,6 @@
 #include "pjdp.h"
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPJDSetTolerances_JD"
-PetscErrorCode PEPJDSetTolerances_JD(PEP pep,PetscReal mtol,PetscReal htol,PetscReal stol)
-{
-  PEP_JD *pjd = (PEP_JD*)pep->data;
-
-  PetscFunctionBegin;
-  if (mtol==PETSC_DEFAULT) pjd->mtol = 1e-5;
-  else {
-    if (mtol<0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of mtol. Must be > 0");
-    pjd->mtol = mtol;
-  }
-  if (htol==PETSC_DEFAULT) pjd->htol = 1e-2;
-  else {
-    if (htol<0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of htol. Must be > 0");
-    pjd->htol = htol;
-  }
-  if (stol==PETSC_DEFAULT) pjd->stol = 1e-2;
-  else {
-    if (stol<0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of stol. Must be > 0");
-    pjd->stol = stol;
-  }
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "PEPJDSetTolerances"
-/*@
-   PEPJDSetTolerances - Sets various tolerance parameters for the Jacobi-Davidson
-   method.
-
-   Logically Collective on PEP
-
-   Input Parameters:
-+  pep  - the eigenproblem solver context
-.  mtol - the multiplicity tolerance
-.  htol - the tolerance for harmonic extraction
--  stol - the tolerance for harmonic shift
-
-   Options Database Key:
-+  -pep_jd_mtol - Sets the multiplicity tolerance
-.  -pep_jd_htol - Sets the harmonic tolerance
--  -pep_jd_stol - Sets the shift tolerance
-
-   Level: advanced
-
-.seealso: PEPJDGetTolerances()
-@*/
-PetscErrorCode PEPJDSetTolerances(PEP pep,PetscReal mtol,PetscReal htol,PetscReal stol)
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
-  PetscValidLogicalCollectiveReal(pep,mtol,2);
-  PetscValidLogicalCollectiveReal(pep,htol,3);
-  PetscValidLogicalCollectiveReal(pep,stol,4);
-  ierr = PetscTryMethod(pep,"PEPJDSetTolerances_C",(PEP,PetscReal,PetscReal,PetscReal),(pep,mtol,htol,stol));CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "PEPJDGetTolerances_JD"
-PetscErrorCode PEPJDGetTolerances_JD(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)
-{
-  PEP_JD *pjd = (PEP_JD*)pep->data;
-
-  PetscFunctionBegin;
-  *mtol = pjd->mtol;
-  *htol = pjd->htol;
-  *stol = pjd->stol;
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "PEPJDGetTolerances"
-/*@
-   PEPJDGetTolerances - Gets various tolerances in the Jacobi-Davidson method.
-
-   Not Collective
-
-   Input Parameter:
-.  pep - the eigenproblem solver context
-
-   Output Parameter:
-+  mtol - the multiplicity tolerance
-.  htol - the harmonic tolerance
--  stol - the shift tolerance
-
-   Level: advanced
-
-.seealso: PEPJDSetTolerances()
-@*/
-PetscErrorCode PEPJDGetTolerances(PEP pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
-  PetscValidPointer(mtol,2);
-  PetscValidPointer(htol,3);
-  PetscValidPointer(stol,4);
-  ierr = PetscTryMethod(pep,"PEPJDGetTolerances_C",(PEP,PetscReal*,PetscReal*,PetscReal*),(pep,mtol,htol,stol));CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "PEPJDSetRestart_JD"
 PetscErrorCode PEPJDSetRestart_JD(PEP pep,PetscReal keep)
 {
@@ -214,18 +108,17 @@ PetscErrorCode PEPJDGetRestart(PEP pep,PetscReal *keep)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(keep,2);
-  ierr = PetscTryMethod(pep,"PEPJDGetRestart_C",(PEP,PetscReal*),(pep,keep));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPJDGetRestart_C",(PEP,PetscReal*),(pep,keep));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetFromOptions_JD"
-PetscErrorCode PEPSetFromOptions_JD(PetscOptions *PetscOptionsObject,PEP pep)
+PetscErrorCode PEPSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,PEP pep)
 {
   PetscErrorCode ierr;
-  PEP_JD         *pjd = (PEP_JD*)pep->data;
-  PetscBool      flg,flg1,flg2,flg3;
-  PetscReal      r1,r2,r3;
+  PetscBool      flg;
+  PetscReal      r1;
 
   PetscFunctionBegin;
   ierr = PetscOptionsHead(PetscOptionsObject,"PEP JD Options");CHKERRQ(ierr);
@@ -233,16 +126,6 @@ PetscErrorCode PEPSetFromOptions_JD(PetscOptions *PetscOptionsObject,PEP pep)
   if (flg) {
     ierr = PEPJDSetRestart(pep,r1);CHKERRQ(ierr);
   }
-
-  r1 = pjd->mtol;
-  ierr = PetscOptionsReal("-pep_jd_mtol","Multiplicity tolerance","PEPJDSetTolerances",pjd->mtol,&r1,&flg1);CHKERRQ(ierr);
-  r2 = pjd->htol;
-  ierr = PetscOptionsReal("-pep_jd_htol","Harmonic tolerance","PEPJDSetTolerances",pjd->htol,&r2,&flg2);CHKERRQ(ierr);
-  r3 = pjd->stol;
-  ierr = PetscOptionsReal("-pep_jd_stol","Shift tolerance","PEPJDSetTolerances",pjd->stol,&r3,&flg3);CHKERRQ(ierr);
-  if (flg1 || flg2 || flg3) {
-    ierr = PEPJDSetTolerances(pep,r1,r2,r3);CHKERRQ(ierr);
-  }
   ierr = PetscOptionsTail();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -259,9 +142,6 @@ PetscErrorCode PEPView_JD(PEP pep,PetscViewer viewer)
   ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
   if (isascii) {
     ierr = PetscViewerASCIIPrintf(viewer,"  JD: %d%% of basis vectors kept after restart\n",(int)(100*pjd->keep));CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  JD: multiplicity tolerance = %g\n",(double)pjd->mtol);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  JD: harmonic tolerance = %g\n",(double)pjd->htol);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  JD: shift tolerance = %g\n",(double)pjd->stol);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
diff --git a/src/pep/impls/jd/pjdopt.c.html b/src/pep/impls/jd/pjdopt.c.html
index 88069aa..1e833a1 100644
--- a/src/pep/impls/jd/pjdopt.c.html
+++ b/src/pep/impls/jd/pjdopt.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/jd/pjdopt.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:06+00:00">
+<meta name="date" content="2016-05-16T10:34:06+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/jd/pjdopt.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/jd/pjdopt.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Options of polynomial JD solver.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -36,199 +36,101 @@
 <a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/pepimpl.h>    </font><font color="#B22222">/*I "slepcpep.h" I*/</font><font color="#A020F0"></font>
 <a name="line25"> 25: </a> #include <A href="pjdp.h.html">pjdp.h</A>
 
-<a name="line29"> 29: </a><strong><font color="#4169E1"><a name="PEPJDSetTolerances_JD"></a>PetscErrorCode PEPJDSetTolerances_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal mtol,PetscReal htol,PetscReal stol)</font></strong>
+<a name="line29"> 29: </a><strong><font color="#4169E1"><a name="PEPJDSetRestart_JD"></a>PetscErrorCode PEPJDSetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
 <a name="line30"> 30: </a>{
 <a name="line31"> 31: </a>  PEP_JD *pjd = (PEP_JD*)pep->data;
 
-<a name="line34"> 34: </a>  <font color="#4169E1">if</font> (mtol==PETSC_DEFAULT) pjd->mtol = 1e-5;
+<a name="line34"> 34: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) pjd->keep = 0.5;
 <a name="line35"> 35: </a>  <font color="#4169E1">else</font> {
-<a name="line36"> 36: </a>    <font color="#4169E1">if</font> (mtol<0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mtol. Must be > 0"</font>);
-<a name="line37"> 37: </a>    pjd->mtol = mtol;
+<a name="line36"> 36: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
+<a name="line37"> 37: </a>    pjd->keep = keep;
 <a name="line38"> 38: </a>  }
-<a name="line39"> 39: </a>  <font color="#4169E1">if</font> (htol==PETSC_DEFAULT) pjd->htol = 1e-2;
-<a name="line40"> 40: </a>  <font color="#4169E1">else</font> {
-<a name="line41"> 41: </a>    <font color="#4169E1">if</font> (htol<0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of htol. Must be > 0"</font>);
-<a name="line42"> 42: </a>    pjd->htol = htol;
-<a name="line43"> 43: </a>  }
-<a name="line44"> 44: </a>  <font color="#4169E1">if</font> (stol==PETSC_DEFAULT) pjd->stol = 1e-2;
-<a name="line45"> 45: </a>  <font color="#4169E1">else</font> {
-<a name="line46"> 46: </a>    <font color="#4169E1">if</font> (stol<0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of stol. Must be > 0"</font>);
-<a name="line47"> 47: </a>    pjd->stol = stol;
-<a name="line48"> 48: </a>  }
-<a name="line49"> 49: </a>  <font color="#4169E1">return</font>(0);
-<a name="line50"> 50: </a>}
-
-<a name="line54"> 54: </a><font color="#B22222">/*@</font>
-<a name="line55"> 55: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a> - Sets various tolerance parameters for the Jacobi-Davidson</font>
-<a name="line56"> 56: </a><font color="#B22222">   method.</font>
-
-<a name="line58"> 58: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line60"> 60: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line61"> 61: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line62"> 62: </a><font color="#B22222">.  mtol - the multiplicity tolerance</font>
-<a name="line63"> 63: </a><font color="#B22222">.  htol - the tolerance for harmonic extraction</font>
-<a name="line64"> 64: </a><font color="#B22222">-  stol - the tolerance for harmonic shift</font>
-
-<a name="line66"> 66: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line67"> 67: </a><font color="#B22222">+  -pep_jd_mtol - Sets the multiplicity tolerance</font>
-<a name="line68"> 68: </a><font color="#B22222">.  -pep_jd_htol - Sets the harmonic tolerance</font>
-<a name="line69"> 69: </a><font color="#B22222">-  -pep_jd_stol - Sets the shift tolerance</font>
-
-<a name="line71"> 71: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line73"> 73: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPJDGetTolerances.html#PEPJDGetTolerances">PEPJDGetTolerances</a>()</font>
-<a name="line74"> 74: </a><font color="#B22222">@*/</font>
-<a name="line75"> 75: </a><strong><font color="#4169E1"><a name="PEPJDSetTolerances"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal mtol,PetscReal htol,PetscReal stol)</font></strong>
-<a name="line76"> 76: </a>{
-
-<a name="line84"> 84: </a>  PetscTryMethod(pep,<font color="#666666">"PEPJDSetTolerances_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal,PetscReal,PetscReal),(pep,mtol,htol,stol));
-<a name="line85"> 85: </a>  <font color="#4169E1">return</font>(0);
-<a name="line86"> 86: </a>}
-
-<a name="line90"> 90: </a><strong><font color="#4169E1"><a name="PEPJDGetTolerances_JD"></a>PetscErrorCode PEPJDGetTolerances_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)</font></strong>
-<a name="line91"> 91: </a>{
-<a name="line92"> 92: </a>  PEP_JD *pjd = (PEP_JD*)pep->data;
-
-<a name="line95"> 95: </a>  *mtol = pjd->mtol;
-<a name="line96"> 96: </a>  *htol = pjd->htol;
-<a name="line97"> 97: </a>  *stol = pjd->stol;
-<a name="line98"> 98: </a>  <font color="#4169E1">return</font>(0);
-<a name="line99"> 99: </a>}
-
-<a name="line103">103: </a><font color="#B22222">/*@</font>
-<a name="line104">104: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPJDGetTolerances.html#PEPJDGetTolerances">PEPJDGetTolerances</a> - Gets various tolerances in the Jacobi-Davidson method.</font>
-
-<a name="line106">106: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line108">108: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line109">109: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line111">111: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line112">112: </a><font color="#B22222">+  mtol - the multiplicity tolerance</font>
-<a name="line113">113: </a><font color="#B22222">.  htol - the harmonic tolerance</font>
-<a name="line114">114: </a><font color="#B22222">-  stol - the shift tolerance</font>
-
-<a name="line116">116: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line118">118: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>()</font>
-<a name="line119">119: </a><font color="#B22222">@*/</font>
-<a name="line120">120: </a><strong><font color="#4169E1"><a name="PEPJDGetTolerances"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPJDGetTolerances.html#PEPJDGetTolerances">PEPJDGetTolerances</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *mtol,PetscReal *htol,PetscReal *stol)</font></strong>
-<a name="line121">121: </a>{
-
-<a name="line129">129: </a>  PetscTryMethod(pep,<font color="#666666">"PEPJDGetTolerances_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*,PetscReal*,PetscReal*),(pep,mtol,htol,stol));
+<a name="line39"> 39: </a>  <font color="#4169E1">return</font>(0);
+<a name="line40"> 40: </a>}
+
+<a name="line44"> 44: </a><font color="#B22222">/*@</font>
+<a name="line45"> 45: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a> - Sets the restart parameter for the Jacobi-Davidson</font>
+<a name="line46"> 46: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
+<a name="line47"> 47: </a><font color="#B22222">   after restart.</font>
+
+<a name="line49"> 49: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line51"> 51: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line52"> 52: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line53"> 53: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
+
+<a name="line55"> 55: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line56"> 56: </a><font color="#B22222">.  -pep_jd_restart - Sets the restart parameter</font>
+
+<a name="line58"> 58: </a><font color="#B22222">   Notes:</font>
+<a name="line59"> 59: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
+
+<a name="line61"> 61: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line63"> 63: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a>()</font>
+<a name="line64"> 64: </a><font color="#B22222">@*/</font>
+<a name="line65"> 65: </a><strong><font color="#4169E1"><a name="PEPJDSetRestart"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
+<a name="line66"> 66: </a>{
+
+<a name="line72"> 72: </a>  PetscTryMethod(pep,<font color="#666666">"PEPJDSetRestart_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal),(pep,keep));
+<a name="line73"> 73: </a>  <font color="#4169E1">return</font>(0);
+<a name="line74"> 74: </a>}
+
+<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="PEPJDGetRestart_JD"></a>PetscErrorCode PEPJDGetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
+<a name="line79"> 79: </a>{
+<a name="line80"> 80: </a>  PEP_JD *pjd = (PEP_JD*)pep->data;
+
+<a name="line83"> 83: </a>  *keep = pjd->keep;
+<a name="line84"> 84: </a>  <font color="#4169E1">return</font>(0);
+<a name="line85"> 85: </a>}
+
+<a name="line89"> 89: </a><font color="#B22222">/*@</font>
+<a name="line90"> 90: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a> - Gets the restart parameter used in the Jacobi-Davidson method.</font>
+
+<a name="line92"> 92: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line94"> 94: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line95"> 95: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
+
+<a name="line97"> 97: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line98"> 98: </a><font color="#B22222">.  keep - the restart parameter</font>
+
+<a name="line100">100: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line102">102: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>()</font>
+<a name="line103">103: </a><font color="#B22222">@*/</font>
+<a name="line104">104: </a><strong><font color="#4169E1"><a name="PEPJDGetRestart"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
+<a name="line105">105: </a>{
+
+<a name="line111">111: </a>  PetscUseMethod(pep,<font color="#666666">"PEPJDGetRestart_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*),(pep,keep));
+<a name="line112">112: </a>  <font color="#4169E1">return</font>(0);
+<a name="line113">113: </a>}
+
+<a name="line117">117: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_JD"></a>PetscErrorCode PEPSetFromOptions_JD(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line118">118: </a>{
+<a name="line120">120: </a>  PetscBool      flg;
+<a name="line121">121: </a>  PetscReal      r1;
+
+<a name="line124">124: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> JD Options"</font>);
+<a name="line125">125: </a>  PetscOptionsReal(<font color="#666666">"-pep_jd_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>"</font>,0.5,&r1,&flg);
+<a name="line126">126: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line127">127: </a>    <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>(pep,r1);
+<a name="line128">128: </a>  }
+<a name="line129">129: </a>  PetscOptionsTail();
 <a name="line130">130: </a>  <font color="#4169E1">return</font>(0);
 <a name="line131">131: </a>}
 
-<a name="line135">135: </a><strong><font color="#4169E1"><a name="PEPJDSetRestart_JD"></a>PetscErrorCode PEPJDSetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
+<a name="line135">135: </a><strong><font color="#4169E1"><a name="PEPView_JD"></a>PetscErrorCode PEPView_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
 <a name="line136">136: </a>{
-<a name="line137">137: </a>  PEP_JD *pjd = (PEP_JD*)pep->data;
-
-<a name="line140">140: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) pjd->keep = 0.5;
-<a name="line141">141: </a>  <font color="#4169E1">else</font> {
-<a name="line142">142: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
-<a name="line143">143: </a>    pjd->keep = keep;
-<a name="line144">144: </a>  }
-<a name="line145">145: </a>  <font color="#4169E1">return</font>(0);
-<a name="line146">146: </a>}
-
-<a name="line150">150: </a><font color="#B22222">/*@</font>
-<a name="line151">151: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a> - Sets the restart parameter for the Jacobi-Davidson</font>
-<a name="line152">152: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
-<a name="line153">153: </a><font color="#B22222">   after restart.</font>
-
-<a name="line155">155: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line157">157: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line158">158: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line159">159: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
-
-<a name="line161">161: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line162">162: </a><font color="#B22222">.  -pep_jd_restart - Sets the restart parameter</font>
-
-<a name="line164">164: </a><font color="#B22222">   Notes:</font>
-<a name="line165">165: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
-
-<a name="line167">167: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line169">169: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a>()</font>
-<a name="line170">170: </a><font color="#B22222">@*/</font>
-<a name="line171">171: </a><strong><font color="#4169E1"><a name="PEPJDSetRestart"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
-<a name="line172">172: </a>{
-
-<a name="line178">178: </a>  PetscTryMethod(pep,<font color="#666666">"PEPJDSetRestart_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal),(pep,keep));
-<a name="line179">179: </a>  <font color="#4169E1">return</font>(0);
-<a name="line180">180: </a>}
-
-<a name="line184">184: </a><strong><font color="#4169E1"><a name="PEPJDGetRestart_JD"></a>PetscErrorCode PEPJDGetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
-<a name="line185">185: </a>{
-<a name="line186">186: </a>  PEP_JD *pjd = (PEP_JD*)pep->data;
-
-<a name="line189">189: </a>  *keep = pjd->keep;
-<a name="line190">190: </a>  <font color="#4169E1">return</font>(0);
-<a name="line191">191: </a>}
-
-<a name="line195">195: </a><font color="#B22222">/*@</font>
-<a name="line196">196: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a> - Gets the restart parameter used in the Jacobi-Davidson method.</font>
-
-<a name="line198">198: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line200">200: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line201">201: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line203">203: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line204">204: </a><font color="#B22222">.  keep - the restart parameter</font>
-
-<a name="line206">206: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line208">208: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>()</font>
-<a name="line209">209: </a><font color="#B22222">@*/</font>
-<a name="line210">210: </a><strong><font color="#4169E1"><a name="PEPJDGetRestart"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPJDGetRestart.html#PEPJDGetRestart">PEPJDGetRestart</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
-<a name="line211">211: </a>{
-
-<a name="line217">217: </a>  PetscTryMethod(pep,<font color="#666666">"PEPJDGetRestart_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*),(pep,keep));
-<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
-<a name="line219">219: </a>}
-
-<a name="line223">223: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_JD"></a>PetscErrorCode PEPSetFromOptions_JD(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line224">224: </a>{
-<a name="line226">226: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
-<a name="line227">227: </a>  PetscBool      flg,flg1,flg2,flg3;
-<a name="line228">228: </a>  PetscReal      r1,r2,r3;
-
-<a name="line231">231: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> JD Options"</font>);
-<a name="line232">232: </a>  PetscOptionsReal(<font color="#666666">"-pep_jd_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>"</font>,0.5,&r1,&flg);
-<a name="line233">233: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line234">234: </a>    <a href="../../../../docs/manualpages/PEP/PEPJDSetRestart.html#PEPJDSetRestart">PEPJDSetRestart</a>(pep,r1);
-<a name="line235">235: </a>  }
-
-<a name="line237">237: </a>  r1 = pjd->mtol;
-<a name="line238">238: </a>  PetscOptionsReal(<font color="#666666">"-pep_jd_mtol"</font>,<font color="#666666">"Multiplicity tolerance"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>"</font>,pjd->mtol,&r1,&flg1);
-<a name="line239">239: </a>  r2 = pjd->htol;
-<a name="line240">240: </a>  PetscOptionsReal(<font color="#666666">"-pep_jd_htol"</font>,<font color="#666666">"Harmonic tolerance"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>"</font>,pjd->htol,&r2,&flg2);
-<a name="line241">241: </a>  r3 = pjd->stol;
-<a name="line242">242: </a>  PetscOptionsReal(<font color="#666666">"-pep_jd_stol"</font>,<font color="#666666">"Shift tolerance"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>"</font>,pjd->stol,&r3,&flg3);
-<a name="line243">243: </a>  <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line244">244: </a>    <a href="../../../../docs/manualpages/PEP/PEPJDSetTolerances.html#PEPJDSetTolerances">PEPJDSetTolerances</a>(pep,r1,r2,r3);
-<a name="line245">245: </a>  }
-<a name="line246">246: </a>  PetscOptionsTail();
-<a name="line247">247: </a>  <font color="#4169E1">return</font>(0);
-<a name="line248">248: </a>}
-
-<a name="line252">252: </a><strong><font color="#4169E1"><a name="PEPView_JD"></a>PetscErrorCode PEPView_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line253">253: </a>{
-<a name="line255">255: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
-<a name="line256">256: </a>  PetscBool      isascii;
-
-<a name="line259">259: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line260">260: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line261">261: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: %d%% of basis vectors kept after restart\n"</font>,(int)(100*pjd->keep));
-<a name="line262">262: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: multiplicity tolerance = %g\n"</font>,(double)pjd->mtol);
-<a name="line263">263: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: harmonic tolerance = %g\n"</font>,(double)pjd->htol);
-<a name="line264">264: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: shift tolerance = %g\n"</font>,(double)pjd->stol);
-<a name="line265">265: </a>  }
-<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
-<a name="line267">267: </a>}
+<a name="line138">138: </a>  PEP_JD         *pjd = (PEP_JD*)pep->data;
+<a name="line139">139: </a>  PetscBool      isascii;
+
+<a name="line142">142: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line143">143: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line144">144: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  JD: %d%% of basis vectors kept after restart\n"</font>,(int)(100*pjd->keep));
+<a name="line145">145: </a>  }
+<a name="line146">146: </a>  <font color="#4169E1">return</font>(0);
+<a name="line147">147: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/impls/jd/pjdp.h b/src/pep/impls/jd/pjdp.h
index c2c4814..38abd22 100644
--- a/src/pep/impls/jd/pjdp.h
+++ b/src/pep/impls/jd/pjdp.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -26,16 +26,17 @@
 
 typedef struct {
   PetscReal   keep;          /* restart parameter */
-  PetscReal   mtol;          /* tolerance for eigenvalue multiplicity */
-  PetscReal   htol;          /* tolerance for harmonic JD */
-  PetscReal   stol;          /* tolerance for harmonic shift */
-  PetscInt    fnini;         /* first initial search space */
-  PetscBool   randini;       /* use random initial search space */
-  PetscBool   custpc;        /* use custom correction equation preconditioner */
-  PetscBool   flglk;         /* whether in locking step */
-  PetscBool   flgre;         /* whether in restarting step */
-  BV          *W;            /* work basis vectors to store A_i*V */
+  BV          V;             /* work basis vectors to store the search space */
+  BV          W;             /* work basis vectors to store the test space */
+  BV          *TV;           /* work basis vectors to store T*V (each TV[i] is the coefficient for \lambda^i of T*V for the extended T) */
+  BV          *AX;           /* work basis vectors to store A_i*X for locked eigenvectors */
+  BV          X;             /* locked eigenvectors */
+  PetscScalar *T;            /* matrix of the invariant pair */
+  PetscScalar *Tj;           /* matrix containing the powers of the invariant pair matrix */
+  PetscScalar *XpX;          /* X^H*X */
   PC          pcshell;       /* preconditioner including basic precond+projector */
+  Mat         Pshell;        /* auxiliary shell matrix */
+  PetscInt    nconv;         /* number of locked vectors in the invariant pair */
 } PEP_JD;
 
 typedef struct {
@@ -43,13 +44,24 @@ typedef struct {
   Vec         Bp;            /* preconditioned residual of derivative polynomial, B\p */
   Vec         u;             /* Ritz vector */
   PetscScalar gamma;         /* precomputed scalar u'*B\p */
+  PetscScalar *M;
+  PetscScalar *ps;
+  PetscInt    ld;
+  Vec         *work;
+  BV          X;
+  PetscInt    n;
 } PEP_JD_PCSHELL;
 
+typedef struct {
+  Mat         P;             /*  */
+  PEP         pep;
+  Vec         *work;
+  PetscScalar theta;
+} PEP_JD_MATSHELL;
+
 PETSC_INTERN PetscErrorCode PEPView_JD(PEP,PetscViewer);
-PETSC_INTERN PetscErrorCode PEPSetFromOptions_JD(PetscOptions*,PEP);
+PETSC_INTERN PetscErrorCode PEPSetFromOptions_JD(PetscOptionItems*,PEP);
 PETSC_INTERN PetscErrorCode PEPJDSetRestart_JD(PEP,PetscReal);
 PETSC_INTERN PetscErrorCode PEPJDGetRestart_JD(PEP,PetscReal*);
-PETSC_INTERN PetscErrorCode PEPJDSetTolerances_JD(PEP,PetscReal,PetscReal,PetscReal);
-PETSC_INTERN PetscErrorCode PEPJDGetTolerances_JD(PEP,PetscReal*,PetscReal*,PetscReal*);
 
 #endif
diff --git a/src/pep/impls/jd/pjdp.h.html b/src/pep/impls/jd/pjdp.h.html
index 60abe78..efd1d08 100644
--- a/src/pep/impls/jd/pjdp.h.html
+++ b/src/pep/impls/jd/pjdp.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/jd/pjdp.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:06+00:00">
+<meta name="date" content="2016-05-16T10:34:06+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/jd/pjdp.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/jd/pjdp.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private header for PEPJD.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -36,33 +36,45 @@
 
 <a name="line27"> 27: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
 <a name="line28"> 28: </a>  PetscReal   keep;          <font color="#B22222">/* restart parameter */</font>
-<a name="line29"> 29: </a>  PetscReal   mtol;          <font color="#B22222">/* tolerance for eigenvalue multiplicity */</font>
-<a name="line30"> 30: </a>  PetscReal   htol;          <font color="#B22222">/* tolerance for harmonic JD */</font>
-<a name="line31"> 31: </a>  PetscReal   stol;          <font color="#B22222">/* tolerance for harmonic shift */</font>
-<a name="line32"> 32: </a>  PetscInt    fnini;         <font color="#B22222">/* first initial search space */</font>
-<a name="line33"> 33: </a>  PetscBool   randini;       <font color="#B22222">/* use random initial search space */</font>
-<a name="line34"> 34: </a>  PetscBool   custpc;        <font color="#B22222">/* use custom correction equation preconditioner */</font>
-<a name="line35"> 35: </a>  PetscBool   flglk;         <font color="#B22222">/* whether in locking step */</font>
-<a name="line36"> 36: </a>  PetscBool   flgre;         <font color="#B22222">/* whether in restarting step */</font>
-<a name="line37"> 37: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          *W;            <font color="#B22222">/* work basis vectors to store A_i*V */</font>
-<a name="line38"> 38: </a>  PC          pcshell;       <font color="#B22222">/* preconditioner including basic precond+projector */</font>
-<a name="line39"> 39: </a>} PEP_JD;
+<a name="line29"> 29: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          V;             <font color="#B22222">/* work basis vectors to store the search space */</font>
+<a name="line30"> 30: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          W;             <font color="#B22222">/* work basis vectors to store the test space */</font>
+<a name="line31"> 31: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          *TV;           <font color="#B22222">/* work basis vectors to store T*V (each TV[i] is the coefficient for \lambda^i of T*V for the extended T) */</font>
+<a name="line32"> 32: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          *AX;           <font color="#B22222">/* work basis vectors to store A_i*X for locked eigenvectors */</font>
+<a name="line33"> 33: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          X;             <font color="#B22222">/* locked eigenvectors */</font>
+<a name="line34"> 34: </a>  PetscScalar *T;            <font color="#B22222">/* matrix of the invariant pair */</font>
+<a name="line35"> 35: </a>  PetscScalar *Tj;           <font color="#B22222">/* matrix containing the powers of the invariant pair matrix */</font>
+<a name="line36"> 36: </a>  PetscScalar *XpX;          <font color="#B22222">/* X^H*X */</font>
+<a name="line37"> 37: </a>  PC          pcshell;       <font color="#B22222">/* preconditioner including basic precond+projector */</font>
+<a name="line38"> 38: </a>  Mat         Pshell;        <font color="#B22222">/* auxiliary shell matrix */</font>
+<a name="line39"> 39: </a>  PetscInt    nconv;         <font color="#B22222">/* number of locked vectors in the invariant pair */</font>
+<a name="line40"> 40: </a>} PEP_JD;
 
-<a name="line41"> 41: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line42"> 42: </a>  PC          pc;            <font color="#B22222">/* basic preconditioner */</font>
-<a name="line43"> 43: </a>  Vec         Bp;            <font color="#B22222">/* preconditioned residual of derivative polynomial, B\p */</font>
-<a name="line44"> 44: </a>  Vec         u;             <font color="#B22222">/* Ritz vector */</font>
-<a name="line45"> 45: </a>  PetscScalar gamma;         <font color="#B22222">/* precomputed scalar u'*B\p */</font>
-<a name="line46"> 46: </a>} PEP_JD_PCSHELL;
+<a name="line42"> 42: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line43"> 43: </a>  PC          pc;            <font color="#B22222">/* basic preconditioner */</font>
+<a name="line44"> 44: </a>  Vec         Bp;            <font color="#B22222">/* preconditioned residual of derivative polynomial, B\p */</font>
+<a name="line45"> 45: </a>  Vec         u;             <font color="#B22222">/* Ritz vector */</font>
+<a name="line46"> 46: </a>  PetscScalar gamma;         <font color="#B22222">/* precomputed scalar u'*B\p */</font>
+<a name="line47"> 47: </a>  PetscScalar *M;
+<a name="line48"> 48: </a>  PetscScalar *ps;
+<a name="line49"> 49: </a>  PetscInt    ld;
+<a name="line50"> 50: </a>  Vec         *work;
+<a name="line51"> 51: </a>  <a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a>          X;
+<a name="line52"> 52: </a>  PetscInt    n;
+<a name="line53"> 53: </a>} PEP_JD_PCSHELL;
 
-<a name="line48"> 48: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPView_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
-<a name="line49"> 49: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPSetFromOptions_JD(PetscOptions*,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
-<a name="line50"> 50: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPJDSetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
-<a name="line51"> 51: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPJDGetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
-<a name="line52"> 52: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPJDSetTolerances_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal,PetscReal,PetscReal)</font></strong>;
-<a name="line53"> 53: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPJDGetTolerances_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*,PetscReal*,PetscReal*)</font></strong>;
+<a name="line55"> 55: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line56"> 56: </a>  Mat         P;             <font color="#B22222">/*  */</font>
+<a name="line57"> 57: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>         pep;
+<a name="line58"> 58: </a>  Vec         *work;
+<a name="line59"> 59: </a>  PetscScalar theta;
+<a name="line60"> 60: </a>} PEP_JD_MATSHELL;
 
-<a name="line55"> 55: </a><font color="#A020F0">#endif</font>
+<a name="line62"> 62: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPView_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscViewer)</font></strong>;
+<a name="line63"> 63: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPSetFromOptions_JD(PetscOptionItems*,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)</font></strong>;
+<a name="line64"> 64: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPJDSetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal)</font></strong>;
+<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_INTERN PetscErrorCode PEPJDGetRestart_JD(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*)</font></strong>;
+
+<a name="line67"> 67: </a><font color="#A020F0">#endif</font>
 </pre>
 </body>
 
diff --git a/src/pep/impls/krylov/index.html b/src/pep/impls/krylov/index.html
index f94126c..95d44df 100644
--- a/src/pep/impls/krylov/index.html
+++ b/src/pep/impls/krylov/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/krylov/makefile b/src/pep/impls/krylov/makefile
index 28c7d64..a018dc0 100644
--- a/src/pep/impls/krylov/makefile
+++ b/src/pep/impls/krylov/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/krylov/makefile.html b/src/pep/impls/krylov/makefile.html
index b47bf68..3df81ea 100644
--- a/src/pep/impls/krylov/makefile.html
+++ b/src/pep/impls/krylov/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:59+00:00">
+<meta name="date" content="2016-05-16T10:33:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/impls/krylov/pepkrylov.c b/src/pep/impls/krylov/pepkrylov.c
index e7f2efb..6bc87f4 100644
--- a/src/pep/impls/krylov/pepkrylov.c
+++ b/src/pep/impls/krylov/pepkrylov.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/pep/impls/krylov/pepkrylov.c.html b/src/pep/impls/krylov/pepkrylov.c.html
index e79c90e..0101e7d 100644
--- a/src/pep/impls/krylov/pepkrylov.c.html
+++ b/src/pep/impls/krylov/pepkrylov.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/pepkrylov.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:58+00:00">
+<meta name="date" content="2016-05-16T10:33:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/pepkrylov.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/pepkrylov.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Common subroutines for all Krylov-type <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> solvers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/pep/impls/krylov/pepkrylov.h b/src/pep/impls/krylov/pepkrylov.h
index e52d7fa..ac66c38 100644
--- a/src/pep/impls/krylov/pepkrylov.h
+++ b/src/pep/impls/krylov/pepkrylov.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/pep/impls/krylov/pepkrylov.h.html b/src/pep/impls/krylov/pepkrylov.h.html
index 2ca09e9..b0488d5 100644
--- a/src/pep/impls/krylov/pepkrylov.h.html
+++ b/src/pep/impls/krylov/pepkrylov.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/pepkrylov.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:58+00:00">
+<meta name="date" content="2016-05-16T10:33:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/pepkrylov.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/pepkrylov.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private header for TOAR and STOAR.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/pep/impls/krylov/qarnoldi/index.html b/src/pep/impls/krylov/qarnoldi/index.html
index 1ec93ae..a3790cd 100644
--- a/src/pep/impls/krylov/qarnoldi/index.html
+++ b/src/pep/impls/krylov/qarnoldi/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/qarnoldi/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/qarnoldi/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/krylov/qarnoldi/makefile b/src/pep/impls/krylov/qarnoldi/makefile
index a1640bd..7c9aaa2 100644
--- a/src/pep/impls/krylov/qarnoldi/makefile
+++ b/src/pep/impls/krylov/qarnoldi/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/krylov/qarnoldi/makefile.html b/src/pep/impls/krylov/qarnoldi/makefile.html
index e80f789..9acf9c3 100644
--- a/src/pep/impls/krylov/qarnoldi/makefile.html
+++ b/src/pep/impls/krylov/qarnoldi/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/qarnoldi/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:00+00:00">
+<meta name="date" content="2016-05-16T10:33:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/qarnoldi/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/qarnoldi/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/impls/krylov/qarnoldi/qarnoldi.c b/src/pep/impls/krylov/qarnoldi/qarnoldi.c
index ddcc9b0..e0ba16e 100644
--- a/src/pep/impls/krylov/qarnoldi/qarnoldi.c
+++ b/src/pep/impls/krylov/qarnoldi/qarnoldi.c
@@ -16,7 +16,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -83,8 +83,8 @@ PetscErrorCode PEPSetUp_QArnoldi(PEP pep)
 
   /* process starting vector */
   if (pep->nini>-2) {
-    ierr = BVSetRandomColumn(pep->V,0,pep->rand);CHKERRQ(ierr);
-    ierr = BVSetRandomColumn(pep->V,1,pep->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(pep->V,0);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(pep->V,1);CHKERRQ(ierr);
   } else {
     ierr = BVInsertVec(pep->V,0,pep->IS[0]);CHKERRQ(ierr);
     ierr = BVInsertVec(pep->V,1,pep->IS[1]);CHKERRQ(ierr);
@@ -181,7 +181,7 @@ static PetscErrorCode PEPQArnoldi(PEP pep,PetscScalar *H,PetscInt ldh,PetscInt k
   PetscInt           i,j,l,m = *M;
   Vec                t = pep->work[2],u = pep->work[3];
   BVOrthogRefineType refinement;
-  PetscReal          norm,onorm,eta;
+  PetscReal          norm=0.0,onorm,eta;
   PetscScalar        *c = work + m;
 
   PetscFunctionBegin;
@@ -266,7 +266,7 @@ PetscErrorCode PEPSolve_QArnoldi(PEP pep)
   lwork = 7*pep->ncv;
   ierr = PetscMalloc1(lwork,&work);CHKERRQ(ierr);
   ierr = PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);CHKERRQ(ierr);
-  ierr = RGSetScale(pep->rg,sinv?1.0/pep->sfactor:pep->sfactor);CHKERRQ(ierr);
+  ierr = RGPushScale(pep->rg,sinv?pep->sfactor:1.0/pep->sfactor);CHKERRQ(ierr);
   ierr = STScaleShift(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);CHKERRQ(ierr);
 
   /* Get the starting Arnoldi vector */
@@ -303,8 +303,7 @@ PetscErrorCode PEPSolve_QArnoldi(PEP pep)
 
     /* Check convergence */
     ierr = PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,nv-pep->nconv,beta,&k);CHKERRQ(ierr);
-    if (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-    if (k >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
+    ierr = (*pep->stopping)(pep,pep->its,pep->max_it,k,pep->nev,&pep->reason,pep->stoppingctx);CHKERRQ(ierr);
     nconv = k;
 
     /* Update l */
@@ -339,7 +338,7 @@ PetscErrorCode PEPSolve_QArnoldi(PEP pep)
   }
 
   ierr = STScaleShift(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);CHKERRQ(ierr);
-  ierr = RGSetScale(pep->rg,1.0);CHKERRQ(ierr);
+  ierr = RGPopScale(pep->rg);CHKERRQ(ierr);
 
   /* truncate Schur decomposition and change the state to raw so that
      DSVectors() computes eigenvectors from scratch */
@@ -433,7 +432,7 @@ PetscErrorCode PEPQArnoldiGetRestart(PEP pep,PetscReal *keep)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(keep,2);
-  ierr = PetscTryMethod(pep,"PEPQArnoldiGetRestart_C",(PEP,PetscReal*),(pep,keep));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPQArnoldiGetRestart_C",(PEP,PetscReal*),(pep,keep));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -521,13 +520,13 @@ PetscErrorCode PEPQArnoldiGetLocking(PEP pep,PetscBool *lock)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(lock,2);
-  ierr = PetscTryMethod(pep,"PEPQArnoldiGetLocking_C",(PEP,PetscBool*),(pep,lock));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPQArnoldiGetLocking_C",(PEP,PetscBool*),(pep,lock));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetFromOptions_QArnoldi"
-PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptions *PetscOptionsObject,PEP pep)
+PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptionItems *PetscOptionsObject,PEP pep)
 {
   PetscErrorCode ierr;
   PetscBool      flg,lock;
diff --git a/src/pep/impls/krylov/qarnoldi/qarnoldi.c.html b/src/pep/impls/krylov/qarnoldi/qarnoldi.c.html
index 62e7c44..c65767d 100644
--- a/src/pep/impls/krylov/qarnoldi/qarnoldi.c.html
+++ b/src/pep/impls/krylov/qarnoldi/qarnoldi.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/qarnoldi/qarnoldi.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:59+00:00">
+<meta name="date" content="2016-05-16T10:33:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/qarnoldi/qarnoldi.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/qarnoldi/qarnoldi.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc quadratic eigensolver: "qarnoldi"</font>
@@ -28,7 +28,7 @@
 
 <a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -91,8 +91,8 @@
 
 <a name="line84"> 84: </a>  <font color="#B22222">/* process starting vector */</font>
 <a name="line85"> 85: </a>  <font color="#4169E1">if</font> (pep->nini>-2) {
-<a name="line86"> 86: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,0,pep->rand);
-<a name="line87"> 87: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,1,pep->rand);
+<a name="line86"> 86: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,0);
+<a name="line87"> 87: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,1);
 <a name="line88"> 88: </a>  } <font color="#4169E1">else</font> {
 <a name="line89"> 89: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,0,pep->IS[0]);
 <a name="line90"> 90: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,1,pep->IS[1]);
@@ -179,7 +179,7 @@
 <a name="line181">181: </a>  PetscInt           i,j,l,m = *M;
 <a name="line182">182: </a>  Vec                t = pep->work[2],u = pep->work[3];
 <a name="line183">183: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> refinement;
-<a name="line184">184: </a>  PetscReal          norm,onorm,eta;
+<a name="line184">184: </a>  PetscReal          norm=0.0,onorm,eta;
 <a name="line185">185: </a>  PetscScalar        *c = work + m;
 
 <a name="line188">188: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(pep->V,NULL,&refinement,&eta,NULL);
@@ -259,7 +259,7 @@
 <a name="line266">266: </a>  lwork = 7*pep->ncv;
 <a name="line267">267: </a>  PetscMalloc1(lwork,&work);
 <a name="line268">268: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line269">269: </a>  <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,sinv?1.0/pep->sfactor:pep->sfactor);
+<a name="line269">269: </a>  <a href="../../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(pep->rg,sinv?pep->sfactor:1.0/pep->sfactor);
 <a name="line270">270: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);
 
 <a name="line272">272: </a>  <font color="#B22222">/* Get the starting Arnoldi vector */</font>
@@ -296,256 +296,255 @@
 
 <a name="line304">304: </a>    <font color="#B22222">/* Check convergence */</font>
 <a name="line305">305: </a>    PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,nv-pep->nconv,beta,&k);
-<a name="line306">306: </a>    <font color="#4169E1">if</font> (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-<a name="line307">307: </a>    <font color="#4169E1">if</font> (k >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
-<a name="line308">308: </a>    nconv = k;
-
-<a name="line310">310: </a>    <font color="#B22222">/* Update l */</font>
-<a name="line311">311: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
-<a name="line312">312: </a>    <font color="#4169E1">else</font> l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
-<a name="line313">313: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-
-<a name="line315">315: </a>    <font color="#4169E1">if</font> (pep->reason == PEP_CONVERGED_ITERATING) {
-<a name="line316">316: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line317">317: </a>        <font color="#B22222">/* Stop if breakdown */</font>
-<a name="line318">318: </a>        PetscInfo2(pep,<font color="#666666">"Breakdown Quadratic Arnoldi method (it=%D norm=%g)\n"</font>,pep->its,(double)beta);
-<a name="line319">319: </a>        pep->reason = PEP_DIVERGED_BREAKDOWN;
-<a name="line320">320: </a>      } <font color="#4169E1">else</font> {
-<a name="line321">321: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
-<a name="line322">322: </a>        <a href="../../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(pep->ds,k+l);
-<a name="line323">323: </a>        <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,&newn,NULL,NULL,NULL,NULL);
-<a name="line324">324: </a>        l = newn-k;
-<a name="line325">325: </a>      }
-<a name="line326">326: </a>    }
-<a name="line327">327: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line328">328: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line329">329: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,Q,pep->nconv,k+l);
-<a name="line330">330: </a>    MatDestroy(&Q);
-
-<a name="line332">332: </a>    pep->nconv = k;
-<a name="line333">333: </a>    PEPMonitor(pep,pep->its,nconv,pep->eigr,pep->eigi,pep->errest,nv);
-<a name="line334">334: </a>  }
-
-<a name="line336">336: </a>  <font color="#4169E1">for</font> (j=0;j<pep->nconv;j++) {
-<a name="line337">337: </a>    pep->eigr[j] *= pep->sfactor;
-<a name="line338">338: </a>    pep->eigi[j] *= pep->sfactor;
-<a name="line339">339: </a>  }
-
-<a name="line341">341: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);
-<a name="line342">342: </a>  <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,1.0);
-
-<a name="line344">344: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
-<a name="line345">345: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
-<a name="line346">346: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line347">347: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line348">348: </a>  PetscFree(work);
-<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
-<a name="line350">350: </a>}
-
-<a name="line354">354: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetRestart_QArnoldi"></a>static PetscErrorCode PEPQArnoldiSetRestart_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
-<a name="line355">355: </a>{
-<a name="line356">356: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
-
-<a name="line359">359: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
-<a name="line360">360: </a>  <font color="#4169E1">else</font> {
-<a name="line361">361: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
-<a name="line362">362: </a>    ctx->keep = keep;
-<a name="line363">363: </a>  }
-<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
-<a name="line365">365: </a>}
-
-<a name="line369">369: </a><font color="#B22222">/*@</font>
-<a name="line370">370: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a> - Sets the restart parameter for the Q-Arnoldi</font>
-<a name="line371">371: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
-<a name="line372">372: </a><font color="#B22222">   after restart.</font>
-
-<a name="line374">374: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line376">376: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line377">377: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line378">378: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
-
-<a name="line380">380: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line381">381: </a><font color="#B22222">.  -pep_qarnoldi_restart - Sets the restart parameter</font>
-
-<a name="line383">383: </a><font color="#B22222">   Notes:</font>
-<a name="line384">384: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
+<a name="line306">306: </a>    (*pep->stopping)(pep,pep->its,pep->max_it,k,pep->nev,&pep->reason,pep->stoppingctx);
+<a name="line307">307: </a>    nconv = k;
+
+<a name="line309">309: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line310">310: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line311">311: </a>    <font color="#4169E1">else</font> l = PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line312">312: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+
+<a name="line314">314: </a>    <font color="#4169E1">if</font> (pep->reason == PEP_CONVERGED_ITERATING) {
+<a name="line315">315: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line316">316: </a>        <font color="#B22222">/* Stop if breakdown */</font>
+<a name="line317">317: </a>        PetscInfo2(pep,<font color="#666666">"Breakdown Quadratic Arnoldi method (it=%D norm=%g)\n"</font>,pep->its,(double)beta);
+<a name="line318">318: </a>        pep->reason = PEP_DIVERGED_BREAKDOWN;
+<a name="line319">319: </a>      } <font color="#4169E1">else</font> {
+<a name="line320">320: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line321">321: </a>        <a href="../../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(pep->ds,k+l);
+<a name="line322">322: </a>        <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,&newn,NULL,NULL,NULL,NULL);
+<a name="line323">323: </a>        l = newn-k;
+<a name="line324">324: </a>      }
+<a name="line325">325: </a>    }
+<a name="line326">326: </a>    <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line327">327: </a>    <a href="../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line328">328: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,Q,pep->nconv,k+l);
+<a name="line329">329: </a>    MatDestroy(&Q);
+
+<a name="line331">331: </a>    pep->nconv = k;
+<a name="line332">332: </a>    PEPMonitor(pep,pep->its,nconv,pep->eigr,pep->eigi,pep->errest,nv);
+<a name="line333">333: </a>  }
+
+<a name="line335">335: </a>  <font color="#4169E1">for</font> (j=0;j<pep->nconv;j++) {
+<a name="line336">336: </a>    pep->eigr[j] *= pep->sfactor;
+<a name="line337">337: </a>    pep->eigi[j] *= pep->sfactor;
+<a name="line338">338: </a>  }
+
+<a name="line340">340: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);
+<a name="line341">341: </a>  <a href="../../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(pep->rg);
+
+<a name="line343">343: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
+<a name="line344">344: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line345">345: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
+<a name="line346">346: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line347">347: </a>  PetscFree(work);
+<a name="line348">348: </a>  <font color="#4169E1">return</font>(0);
+<a name="line349">349: </a>}
+
+<a name="line353">353: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetRestart_QArnoldi"></a>static PetscErrorCode PEPQArnoldiSetRestart_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
+<a name="line354">354: </a>{
+<a name="line355">355: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
+
+<a name="line358">358: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
+<a name="line359">359: </a>  <font color="#4169E1">else</font> {
+<a name="line360">360: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
+<a name="line361">361: </a>    ctx->keep = keep;
+<a name="line362">362: </a>  }
+<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
+<a name="line364">364: </a>}
+
+<a name="line368">368: </a><font color="#B22222">/*@</font>
+<a name="line369">369: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a> - Sets the restart parameter for the Q-Arnoldi</font>
+<a name="line370">370: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
+<a name="line371">371: </a><font color="#B22222">   after restart.</font>
+
+<a name="line373">373: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line375">375: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line376">376: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line377">377: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
+
+<a name="line379">379: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line380">380: </a><font color="#B22222">.  -pep_qarnoldi_restart - Sets the restart parameter</font>
 
-<a name="line386">386: </a><font color="#B22222">   Level: advanced</font>
+<a name="line382">382: </a><font color="#B22222">   Notes:</font>
+<a name="line383">383: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
 
-<a name="line388">388: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a>()</font>
-<a name="line389">389: </a><font color="#B22222">@*/</font>
-<a name="line390">390: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
-<a name="line391">391: </a>{
+<a name="line385">385: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line397">397: </a>  PetscTryMethod(pep,<font color="#666666">"PEPQArnoldiSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal),(pep,keep));
-<a name="line398">398: </a>  <font color="#4169E1">return</font>(0);
-<a name="line399">399: </a>}
+<a name="line387">387: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a>()</font>
+<a name="line388">388: </a><font color="#B22222">@*/</font>
+<a name="line389">389: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
+<a name="line390">390: </a>{
 
-<a name="line403">403: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetRestart_QArnoldi"></a>static PetscErrorCode PEPQArnoldiGetRestart_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
-<a name="line404">404: </a>{
-<a name="line405">405: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
-
-<a name="line408">408: </a>  *keep = ctx->keep;
-<a name="line409">409: </a>  <font color="#4169E1">return</font>(0);
-<a name="line410">410: </a>}
-
-<a name="line414">414: </a><font color="#B22222">/*@</font>
-<a name="line415">415: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a> - Gets the restart parameter used in the Q-Arnoldi method.</font>
-
-<a name="line417">417: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line419">419: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line420">420: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line422">422: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line423">423: </a><font color="#B22222">.  keep - the restart parameter</font>
-
-<a name="line425">425: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line427">427: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>()</font>
-<a name="line428">428: </a><font color="#B22222">@*/</font>
-<a name="line429">429: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
-<a name="line430">430: </a>{
-
-<a name="line436">436: </a>  PetscTryMethod(pep,<font color="#666666">"PEPQArnoldiGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*),(pep,keep));
-<a name="line437">437: </a>  <font color="#4169E1">return</font>(0);
-<a name="line438">438: </a>}
-
-<a name="line442">442: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetLocking_QArnoldi"></a>static PetscErrorCode PEPQArnoldiSetLocking_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
-<a name="line443">443: </a>{
-<a name="line444">444: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
-
-<a name="line447">447: </a>  ctx->lock = lock;
-<a name="line448">448: </a>  <font color="#4169E1">return</font>(0);
-<a name="line449">449: </a>}
-
-<a name="line453">453: </a><font color="#B22222">/*@</font>
-<a name="line454">454: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a> - Choose between locking and non-locking variants of</font>
-<a name="line455">455: </a><font color="#B22222">   the Q-Arnoldi method.</font>
-
-<a name="line457">457: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line459">459: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line460">460: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line461">461: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
-
-<a name="line463">463: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line464">464: </a><font color="#B22222">.  -pep_qarnoldi_locking - Sets the locking flag</font>
-
-<a name="line466">466: </a><font color="#B22222">   Notes:</font>
-<a name="line467">467: </a><font color="#B22222">   The default is to keep all directions in the working subspace even if</font>
-<a name="line468">468: </a><font color="#B22222">   already converged to working accuracy (the non-locking variant).</font>
-<a name="line469">469: </a><font color="#B22222">   This behaviour can be changed so that converged eigenpairs are locked</font>
-<a name="line470">470: </a><font color="#B22222">   when the method restarts.</font>
-
-<a name="line472">472: </a><font color="#B22222">   Note that the default behaviour is the opposite to Krylov solvers in <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>.</font>
-
-<a name="line474">474: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line476">476: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a>()</font>
-<a name="line477">477: </a><font color="#B22222">@*/</font>
-<a name="line478">478: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
-<a name="line479">479: </a>{
-
-<a name="line485">485: </a>  PetscTryMethod(pep,<font color="#666666">"PEPQArnoldiSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,lock));
-<a name="line486">486: </a>  <font color="#4169E1">return</font>(0);
-<a name="line487">487: </a>}
-
-<a name="line491">491: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetLocking_QArnoldi"></a>static PetscErrorCode PEPQArnoldiGetLocking_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
-<a name="line492">492: </a>{
-<a name="line493">493: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
-
-<a name="line496">496: </a>  *lock = ctx->lock;
-<a name="line497">497: </a>  <font color="#4169E1">return</font>(0);
-<a name="line498">498: </a>}
-
-<a name="line502">502: </a><font color="#B22222">/*@</font>
-<a name="line503">503: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a> - Gets the locking flag used in the Q-Arnoldi method.</font>
-
-<a name="line505">505: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line507">507: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line508">508: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line510">510: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line511">511: </a><font color="#B22222">.  lock - the locking flag</font>
-
-<a name="line513">513: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line515">515: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>()</font>
-<a name="line516">516: </a><font color="#B22222">@*/</font>
-<a name="line517">517: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
-<a name="line518">518: </a>{
-
-<a name="line524">524: </a>  PetscTryMethod(pep,<font color="#666666">"PEPQArnoldiGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,lock));
-<a name="line525">525: </a>  <font color="#4169E1">return</font>(0);
-<a name="line526">526: </a>}
-
-<a name="line530">530: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_QArnoldi"></a>PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line531">531: </a>{
-<a name="line533">533: </a>  PetscBool      flg,lock;
-<a name="line534">534: </a>  PetscReal      keep;
-
-<a name="line537">537: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Q-Arnoldi Options"</font>);
-<a name="line538">538: </a>  PetscOptionsReal(<font color="#666666">"-pep_qarnoldi_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>"</font>,0.5,&keep,&flg);
-<a name="line539">539: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line540">540: </a>    <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>(pep,keep);
-<a name="line541">541: </a>  }
-<a name="line542">542: </a>  PetscOptionsBool(<font color="#666666">"-pep_qarnoldi_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>"</font>,PETSC_FALSE,&lock,&flg);
-<a name="line543">543: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line544">544: </a>    <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>(pep,lock);
-<a name="line545">545: </a>  }
-<a name="line546">546: </a>  PetscOptionsTail();
-<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
-<a name="line548">548: </a>}
-
-<a name="line552">552: </a><strong><font color="#4169E1"><a name="PEPView_QArnoldi"></a>PetscErrorCode PEPView_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line553">553: </a>{
-<a name="line555">555: </a>  PEP_QARNOLDI   *ctx = (PEP_QARNOLDI*)pep->data;
-<a name="line556">556: </a>  PetscBool      isascii;
-
-<a name="line559">559: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line560">560: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line561">561: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Q-Arnoldi: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
-<a name="line562">562: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Q-Arnoldi: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
-<a name="line563">563: </a>  }
-<a name="line564">564: </a>  <font color="#4169E1">return</font>(0);
-<a name="line565">565: </a>}
-
-<a name="line569">569: </a><strong><font color="#4169E1"><a name="PEPDestroy_QArnoldi"></a>PetscErrorCode PEPDestroy_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line570">570: </a>{
-
-<a name="line574">574: </a>  PetscFree(pep->data);
-<a name="line575">575: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetRestart_C"</font>,NULL);
-<a name="line576">576: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetRestart_C"</font>,NULL);
-<a name="line577">577: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetLocking_C"</font>,NULL);
-<a name="line578">578: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetLocking_C"</font>,NULL);
-<a name="line579">579: </a>  <font color="#4169E1">return</font>(0);
-<a name="line580">580: </a>}
-
-<a name="line584">584: </a><strong><font color="#4169E1"><a name="PEPCreate_QArnoldi"></a>PETSC_EXTERN PetscErrorCode PEPCreate_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line585">585: </a>{
-<a name="line586">586: </a>  PEP_QARNOLDI   *ctx;
-
-<a name="line590">590: </a>  PetscNewLog(pep,&ctx);
-<a name="line591">591: </a>  pep->data = (void*)ctx;
-<a name="line592">592: </a>  ctx->lock = PETSC_TRUE;
-
-<a name="line594">594: </a>  pep->ops->solve          = PEPSolve_QArnoldi;
-<a name="line595">595: </a>  pep->ops->setup          = PEPSetUp_QArnoldi;
-<a name="line596">596: </a>  pep->ops->setfromoptions = PEPSetFromOptions_QArnoldi;
-<a name="line597">597: </a>  pep->ops->destroy        = PEPDestroy_QArnoldi;
-<a name="line598">598: </a>  pep->ops->view           = PEPView_QArnoldi;
-<a name="line599">599: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
-<a name="line600">600: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
-<a name="line601">601: </a>  pep->ops->computevectors = PEPExtractVectors_QArnoldi;
-<a name="line602">602: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetRestart_C"</font>,PEPQArnoldiSetRestart_QArnoldi);
-<a name="line603">603: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetRestart_C"</font>,PEPQArnoldiGetRestart_QArnoldi);
-<a name="line604">604: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetLocking_C"</font>,PEPQArnoldiSetLocking_QArnoldi);
-<a name="line605">605: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetLocking_C"</font>,PEPQArnoldiGetLocking_QArnoldi);
-<a name="line606">606: </a>  <font color="#4169E1">return</font>(0);
-<a name="line607">607: </a>}
+<a name="line396">396: </a>  PetscTryMethod(pep,<font color="#666666">"PEPQArnoldiSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal),(pep,keep));
+<a name="line397">397: </a>  <font color="#4169E1">return</font>(0);
+<a name="line398">398: </a>}
+
+<a name="line402">402: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetRestart_QArnoldi"></a>static PetscErrorCode PEPQArnoldiGetRestart_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
+<a name="line403">403: </a>{
+<a name="line404">404: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
+
+<a name="line407">407: </a>  *keep = ctx->keep;
+<a name="line408">408: </a>  <font color="#4169E1">return</font>(0);
+<a name="line409">409: </a>}
+
+<a name="line413">413: </a><font color="#B22222">/*@</font>
+<a name="line414">414: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a> - Gets the restart parameter used in the Q-Arnoldi method.</font>
+
+<a name="line416">416: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line418">418: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line419">419: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
+
+<a name="line421">421: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line422">422: </a><font color="#B22222">.  keep - the restart parameter</font>
+
+<a name="line424">424: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line426">426: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>()</font>
+<a name="line427">427: </a><font color="#B22222">@*/</font>
+<a name="line428">428: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetRestart.html#PEPQArnoldiGetRestart">PEPQArnoldiGetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
+<a name="line429">429: </a>{
+
+<a name="line435">435: </a>  PetscUseMethod(pep,<font color="#666666">"PEPQArnoldiGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*),(pep,keep));
+<a name="line436">436: </a>  <font color="#4169E1">return</font>(0);
+<a name="line437">437: </a>}
+
+<a name="line441">441: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetLocking_QArnoldi"></a>static PetscErrorCode PEPQArnoldiSetLocking_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
+<a name="line442">442: </a>{
+<a name="line443">443: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
+
+<a name="line446">446: </a>  ctx->lock = lock;
+<a name="line447">447: </a>  <font color="#4169E1">return</font>(0);
+<a name="line448">448: </a>}
+
+<a name="line452">452: </a><font color="#B22222">/*@</font>
+<a name="line453">453: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a> - Choose between locking and non-locking variants of</font>
+<a name="line454">454: </a><font color="#B22222">   the Q-Arnoldi method.</font>
+
+<a name="line456">456: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line458">458: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line459">459: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line460">460: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
+
+<a name="line462">462: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line463">463: </a><font color="#B22222">.  -pep_qarnoldi_locking - Sets the locking flag</font>
+
+<a name="line465">465: </a><font color="#B22222">   Notes:</font>
+<a name="line466">466: </a><font color="#B22222">   The default is to keep all directions in the working subspace even if</font>
+<a name="line467">467: </a><font color="#B22222">   already converged to working accuracy (the non-locking variant).</font>
+<a name="line468">468: </a><font color="#B22222">   This behaviour can be changed so that converged eigenpairs are locked</font>
+<a name="line469">469: </a><font color="#B22222">   when the method restarts.</font>
+
+<a name="line471">471: </a><font color="#B22222">   Note that the default behaviour is the opposite to Krylov solvers in <a href="../../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>.</font>
+
+<a name="line473">473: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line475">475: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a>()</font>
+<a name="line476">476: </a><font color="#B22222">@*/</font>
+<a name="line477">477: </a><strong><font color="#4169E1"><a name="PEPQArnoldiSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
+<a name="line478">478: </a>{
+
+<a name="line484">484: </a>  PetscTryMethod(pep,<font color="#666666">"PEPQArnoldiSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,lock));
+<a name="line485">485: </a>  <font color="#4169E1">return</font>(0);
+<a name="line486">486: </a>}
+
+<a name="line490">490: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetLocking_QArnoldi"></a>static PetscErrorCode PEPQArnoldiGetLocking_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
+<a name="line491">491: </a>{
+<a name="line492">492: </a>  PEP_QARNOLDI *ctx = (PEP_QARNOLDI*)pep->data;
+
+<a name="line495">495: </a>  *lock = ctx->lock;
+<a name="line496">496: </a>  <font color="#4169E1">return</font>(0);
+<a name="line497">497: </a>}
+
+<a name="line501">501: </a><font color="#B22222">/*@</font>
+<a name="line502">502: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a> - Gets the locking flag used in the Q-Arnoldi method.</font>
+
+<a name="line504">504: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line506">506: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line507">507: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
+
+<a name="line509">509: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line510">510: </a><font color="#B22222">.  lock - the locking flag</font>
+
+<a name="line512">512: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line514">514: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>()</font>
+<a name="line515">515: </a><font color="#B22222">@*/</font>
+<a name="line516">516: </a><strong><font color="#4169E1"><a name="PEPQArnoldiGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiGetLocking.html#PEPQArnoldiGetLocking">PEPQArnoldiGetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
+<a name="line517">517: </a>{
+
+<a name="line523">523: </a>  PetscUseMethod(pep,<font color="#666666">"PEPQArnoldiGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,lock));
+<a name="line524">524: </a>  <font color="#4169E1">return</font>(0);
+<a name="line525">525: </a>}
+
+<a name="line529">529: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_QArnoldi"></a>PetscErrorCode PEPSetFromOptions_QArnoldi(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line530">530: </a>{
+<a name="line532">532: </a>  PetscBool      flg,lock;
+<a name="line533">533: </a>  PetscReal      keep;
+
+<a name="line536">536: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Q-Arnoldi Options"</font>);
+<a name="line537">537: </a>  PetscOptionsReal(<font color="#666666">"-pep_qarnoldi_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>"</font>,0.5,&keep,&flg);
+<a name="line538">538: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line539">539: </a>    <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetRestart.html#PEPQArnoldiSetRestart">PEPQArnoldiSetRestart</a>(pep,keep);
+<a name="line540">540: </a>  }
+<a name="line541">541: </a>  PetscOptionsBool(<font color="#666666">"-pep_qarnoldi_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>"</font>,PETSC_FALSE,&lock,&flg);
+<a name="line542">542: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line543">543: </a>    <a href="../../../../../docs/manualpages/PEP/PEPQArnoldiSetLocking.html#PEPQArnoldiSetLocking">PEPQArnoldiSetLocking</a>(pep,lock);
+<a name="line544">544: </a>  }
+<a name="line545">545: </a>  PetscOptionsTail();
+<a name="line546">546: </a>  <font color="#4169E1">return</font>(0);
+<a name="line547">547: </a>}
+
+<a name="line551">551: </a><strong><font color="#4169E1"><a name="PEPView_QArnoldi"></a>PetscErrorCode PEPView_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line552">552: </a>{
+<a name="line554">554: </a>  PEP_QARNOLDI   *ctx = (PEP_QARNOLDI*)pep->data;
+<a name="line555">555: </a>  PetscBool      isascii;
+
+<a name="line558">558: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line559">559: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line560">560: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Q-Arnoldi: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
+<a name="line561">561: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Q-Arnoldi: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
+<a name="line562">562: </a>  }
+<a name="line563">563: </a>  <font color="#4169E1">return</font>(0);
+<a name="line564">564: </a>}
+
+<a name="line568">568: </a><strong><font color="#4169E1"><a name="PEPDestroy_QArnoldi"></a>PetscErrorCode PEPDestroy_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line569">569: </a>{
+
+<a name="line573">573: </a>  PetscFree(pep->data);
+<a name="line574">574: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetRestart_C"</font>,NULL);
+<a name="line575">575: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetRestart_C"</font>,NULL);
+<a name="line576">576: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetLocking_C"</font>,NULL);
+<a name="line577">577: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetLocking_C"</font>,NULL);
+<a name="line578">578: </a>  <font color="#4169E1">return</font>(0);
+<a name="line579">579: </a>}
+
+<a name="line583">583: </a><strong><font color="#4169E1"><a name="PEPCreate_QArnoldi"></a>PETSC_EXTERN PetscErrorCode PEPCreate_QArnoldi(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line584">584: </a>{
+<a name="line585">585: </a>  PEP_QARNOLDI   *ctx;
+
+<a name="line589">589: </a>  PetscNewLog(pep,&ctx);
+<a name="line590">590: </a>  pep->data = (void*)ctx;
+<a name="line591">591: </a>  ctx->lock = PETSC_TRUE;
+
+<a name="line593">593: </a>  pep->ops->solve          = PEPSolve_QArnoldi;
+<a name="line594">594: </a>  pep->ops->setup          = PEPSetUp_QArnoldi;
+<a name="line595">595: </a>  pep->ops->setfromoptions = PEPSetFromOptions_QArnoldi;
+<a name="line596">596: </a>  pep->ops->destroy        = PEPDestroy_QArnoldi;
+<a name="line597">597: </a>  pep->ops->view           = PEPView_QArnoldi;
+<a name="line598">598: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
+<a name="line599">599: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
+<a name="line600">600: </a>  pep->ops->computevectors = PEPExtractVectors_QArnoldi;
+<a name="line601">601: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetRestart_C"</font>,PEPQArnoldiSetRestart_QArnoldi);
+<a name="line602">602: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetRestart_C"</font>,PEPQArnoldiGetRestart_QArnoldi);
+<a name="line603">603: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiSetLocking_C"</font>,PEPQArnoldiSetLocking_QArnoldi);
+<a name="line604">604: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPQArnoldiGetLocking_C"</font>,PEPQArnoldiGetLocking_QArnoldi);
+<a name="line605">605: </a>  <font color="#4169E1">return</font>(0);
+<a name="line606">606: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/impls/krylov/stoar/index.html b/src/pep/impls/krylov/stoar/index.html
index 744afaf..4f91657 100644
--- a/src/pep/impls/krylov/stoar/index.html
+++ b/src/pep/impls/krylov/stoar/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/stoar/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/stoar/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/krylov/stoar/makefile b/src/pep/impls/krylov/stoar/makefile
index 057e8c7..5581914 100644
--- a/src/pep/impls/krylov/stoar/makefile
+++ b/src/pep/impls/krylov/stoar/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/krylov/stoar/makefile.html b/src/pep/impls/krylov/stoar/makefile.html
index a6e915f..eff5602 100644
--- a/src/pep/impls/krylov/stoar/makefile.html
+++ b/src/pep/impls/krylov/stoar/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/stoar/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:05+00:00">
+<meta name="date" content="2016-05-16T10:34:04+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/stoar/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/stoar/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/impls/krylov/stoar/stoar.c b/src/pep/impls/krylov/stoar/stoar.c
index ebddb9a..bd232f8 100644
--- a/src/pep/impls/krylov/stoar/stoar.c
+++ b/src/pep/impls/krylov/stoar/stoar.c
@@ -10,13 +10,13 @@
 
    References:
 
-       [1] C. Campos and J.E. Roman, " Restarted Q-Arnoldi-type methods
-           exploiting symmetry in quadratic eigenvalue problems",
-           submitted, 2015.
+       [1] C. Campos and J.E. Roman, "Restarted Q-Arnoldi-type methods
+           exploiting symmetry in quadratic eigenvalue problems", BIT
+           Numer. Math. (in press), 2016.
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,15 +38,28 @@
 #include "../src/pep/impls/krylov/pepkrylov.h"
 #include <slepcblaslapack.h>
 
+static PetscBool  cited = PETSC_FALSE;
+static const char citation[] =
+  "@Article{slepc-stoar,\n"
+  "   author = \"C. Campos and J. E. Roman\",\n"
+  "   title = \"Restarted {Q-Arnoldi-type} methods exploiting symmetry in quadratic eigenvalue problems\",\n"
+  "   journal = \"{BIT} Numer. Math.\",\n"
+  "   volume = \"to appear\",\n"
+  "   number = \"\",\n"
+  "   pages = \"\",\n"
+  "   year = \"2016,\"\n"
+  "   doi = \"http://dx.doi.org/10.1007/s10543-016-0601-5\"\n"
+  "}\n";
+
 #undef __FUNCT__
 #define __FUNCT__ "PEPSTOARNorm"
 /*
-  Compute B-norm of v=[v1;v2] whith  B=diag(-pep->T[0],pep->T[2]) 
+  Compute B-norm of v=[v1;v2] whith  B=diag(-pep->T[0],pep->T[2])
 */
 static PetscErrorCode PEPSTOARNorm(PEP pep,PetscInt j,PetscReal *norm)
 {
   PetscErrorCode ierr;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
   PetscBLASInt   n_,one=1,ld_;
   PetscScalar    sone=1.0,szero=0.0,*sp,*sq,*w1,*w2,*qK,*qM;
   PetscInt       n,i,lds=ctx->d*ctx->ld;
@@ -71,10 +84,10 @@ static PetscErrorCode PEPSTOARNorm(PEP pep,PetscInt j,PetscReal *norm)
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSTOARqKqMupdates"
-static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv,PetscInt nwv)
+static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv)
 {
   PetscErrorCode ierr;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
   PetscInt       i,ld=ctx->ld;
   PetscScalar    *qK,*qM;
   Vec            vj,v1,v2;
@@ -82,10 +95,6 @@ static PetscErrorCode PEPSTOARqKqMupdates(PEP pep,PetscInt j,Vec *wv,PetscInt nw
   PetscFunctionBegin;
   qK = ctx->qB;
   qM = ctx->qB+ctx->ld*ctx->ld;
-  if (!wv||nwv<2) {
-    if (!wv) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",3);
-    else SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",4);
-  }
   v1 = wv[0];
   v2 = wv[1];
   ierr = BVGetColumn(pep->V,j,&vj);CHKERRQ(ierr);
@@ -115,7 +124,7 @@ PetscErrorCode PEPSetUp_STOAR(PEP pep)
 {
   PetscErrorCode ierr;
   PetscBool      sinv,flg,lindep;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
   PetscInt       ld,i;
   PetscReal      norm,*omega;
 
@@ -148,9 +157,9 @@ PetscErrorCode PEPSetUp_STOAR(PEP pep)
   ierr = PetscCalloc1(2*ld*ld,&ctx->qB);CHKERRQ(ierr);
 
   /* process starting vector */
-  if (pep->nini>-2) {  
-    ierr = BVSetRandomColumn(pep->V,0,pep->rand);CHKERRQ(ierr);
-    ierr = BVSetRandomColumn(pep->V,1,pep->rand);CHKERRQ(ierr);
+  if (pep->nini>-2) {
+    ierr = BVSetRandomColumn(pep->V,0);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(pep->V,1);CHKERRQ(ierr);
   } else {
     ierr = BVInsertVec(pep->V,0,pep->IS[0]);CHKERRQ(ierr);
     ierr = BVInsertVec(pep->V,1,pep->IS[1]);CHKERRQ(ierr);
@@ -159,18 +168,14 @@ PetscErrorCode PEPSetUp_STOAR(PEP pep)
   if (!lindep) {
     ierr = BVScaleColumn(pep->V,0,1.0/norm);CHKERRQ(ierr);
     ctx->S[0] = norm;
-    ierr = PEPSTOARqKqMupdates(pep,0,pep->work,2);CHKERRQ(ierr);
-  } else {
-    SETERRQ(PetscObjectComm((PetscObject)pep),1,"Problem with initial vector");
-  }
+    ierr = PEPSTOARqKqMupdates(pep,0,pep->work);CHKERRQ(ierr);
+  } else SETERRQ(PetscObjectComm((PetscObject)pep),1,"Problem with initial vector");
   ierr = BVOrthogonalizeColumn(pep->V,1,ctx->S+ld,&norm,&lindep);CHKERRQ(ierr);
   if (!lindep) {
     ierr = BVScaleColumn(pep->V,1,1.0/norm);CHKERRQ(ierr);
     ctx->S[1] = norm;
-    ierr = PEPSTOARqKqMupdates(pep,1,pep->work,2);CHKERRQ(ierr);
-  } else {
-    SETERRQ(PetscObjectComm((PetscObject)pep),1,"Problem with initial vector");
-  }
+    ierr = PEPSTOARqKqMupdates(pep,1,pep->work);CHKERRQ(ierr);
+  } else SETERRQ(PetscObjectComm((PetscObject)pep),1,"Problem with initial vector");
 
   ierr = PEPSTOARNorm(pep,0,&norm);CHKERRQ(ierr);
   for (i=0;i<2;i++) { ctx->S[i+ld] /= norm; ctx->S[i] /= norm; }
@@ -193,11 +198,11 @@ PetscErrorCode PEPSetUp_STOAR(PEP pep)
 static PetscErrorCode PEPSTOAROrth2(PEP pep,PetscInt k,PetscReal *Omega,PetscScalar *y)
 {
   PetscErrorCode ierr;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
   PetscBLASInt   n_,lds_,k_,one=1,ld_;
   PetscScalar    *S=ctx->S,sonem=-1.0,sone=1.0,szero=0.0,*tp,*tq,*xp,*xq,*c,*qK,*qM;
   PetscInt       i,lds=ctx->d*ctx->ld,n,j;
-  
+
   PetscFunctionBegin;
   qK = ctx->qB;
   qM = ctx->qB+ctx->ld*ctx->ld;
@@ -234,13 +239,13 @@ static PetscErrorCode PEPSTOAROrth2(PEP pep,PetscInt k,PetscReal *Omega,PetscSca
 #undef __FUNCT__
 #define __FUNCT__ "PEPSTOARrun"
 /*
-  Compute a run of Lanczos iterations
+  Compute a run of Lanczos iterations. dim(work)=(ctx->ld)*4
 */
-static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)
+static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,Vec *t_)
 {
   PetscErrorCode ierr;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-  PetscInt       i,j,m=*M,nwu=0,lwa,l;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+  PetscInt       i,j,m=*M,l;
   PetscInt       lds=ctx->d*ctx->ld,offq=ctx->ld;
   Vec            v=t_[0],t=t_[1],q=t_[2];
   PetscReal      norm,sym=0.0,fro=0.0,*f;
@@ -250,12 +255,8 @@ static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *o
 
   PetscFunctionBegin;
   *breakdown = PETSC_FALSE; /* ----- */
-  if (!t_||nwv<3) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",12);
-  lwa = (ctx->ld)*4;
-  if (!work||nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",10);
   ierr = DSGetDimensions(pep->ds,NULL,NULL,&l,NULL,NULL);CHKERRQ(ierr);
   y = work;
-  nwu += ctx->ld;
   for (j=k;j<m;j++) {
     /* apply operator */
     ierr = BVSetActiveColumns(pep->V,0,j+2);CHKERRQ(ierr);
@@ -274,9 +275,9 @@ static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *o
     ierr = VecScale(q,1.0/norm);CHKERRQ(ierr);
     ierr = BVInsertVec(pep->V,j+2,q);CHKERRQ(ierr);
     for (i=0;i<=j+1;i++) *(S+(j+1)*lds+i) = *(S+offq+j*lds+i);
-   
+
     /* update qK and qM */
-    ierr = PEPSTOARqKqMupdates(pep,j+2,t_,2);CHKERRQ(ierr);
+    ierr = PEPSTOARqKqMupdates(pep,j+2,t_);CHKERRQ(ierr);
 
     /* level-2 orthogonalization */
     ierr = PEPSTOAROrth2(pep,j+1,omega,y);CHKERRQ(ierr);
@@ -312,12 +313,16 @@ static PetscErrorCode PEPSTOARrun(PEP pep,PetscReal *a,PetscReal *b,PetscReal *o
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSTOARTrunc"
-static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)
+static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscReal *rwork)
 {
+#if defined(PETSC_MISSING_LAPACK_GESVD)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
   Mat            G;
-  PetscInt       lwa,nwu=0,lrwa,nrwu=0;
+  PetscInt       lwa,nwu=0,nrwu=0;
   PetscInt       i,n,lds=2*ctx->ld;
   PetscScalar    *M,*V,*U,*S=ctx->S,sone=1.0,zero=0.0,t,*qK,*qM;
   PetscReal      *sg;
@@ -328,15 +333,6 @@ static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScala
   qM = ctx->qB+ctx->ld*ctx->ld;
   n = (rs1>2*cs1)?2*cs1:rs1;
   lwa = cs1*rs1*4+n*(rs1+2*cs1)+(cs1+1)*(cs1+2);
-  lrwa = n+cs1+1+5*n;
-  if (!work||nw<lwa) {
-    if (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",6);
-    if (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",5);
-  }
-  if (!rwork||nrw<lrwa) {
-    if (nrw<lrwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",8);
-    if (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",7);
-  }
   M = work+nwu;
   nwu += rs1*cs1*2;
   U = work+nwu;
@@ -346,8 +342,8 @@ static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScala
   sg = rwork+nrwu;
   nrwu += n;
   for (i=0;i<cs1;i++) {
-    ierr = PetscMemcpy(M+i*rs1,S+i*lds,rs1*sizeof(PetscScalar));CHKERRQ(ierr);  
-    ierr = PetscMemcpy(M+(i+cs1)*rs1,S+i*lds+ctx->ld,rs1*sizeof(PetscScalar));CHKERRQ(ierr);  
+    ierr = PetscMemcpy(M+i*rs1,S+i*lds,rs1*sizeof(PetscScalar));CHKERRQ(ierr);
+    ierr = PetscMemcpy(M+(i+cs1)*rs1,S+i*lds+ctx->ld,rs1*sizeof(PetscScalar));CHKERRQ(ierr);
   }
   ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(cs1,&cs1_);CHKERRQ(ierr);
@@ -360,7 +356,7 @@ static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScala
 #if !defined(PETSC_USE_COMPLEX)
   PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,&info));
 #else
-  PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
+  PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));
 #endif
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESVD %d",info);
 
@@ -369,7 +365,7 @@ static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScala
   ierr = BVSetActiveColumns(pep->V,0,rs1);CHKERRQ(ierr);
   ierr = BVMultInPlace(pep->V,G,0,cs1+1);CHKERRQ(ierr);
   ierr = MatDestroy(&G);CHKERRQ(ierr);
-  
+
   /* Update S */
   ierr = PetscMemzero(S,lds*ctx->ld*sizeof(PetscScalar));CHKERRQ(ierr);
 
@@ -388,29 +384,26 @@ static PetscErrorCode PEPSTOARTrunc(PEP pep,PetscInt rs1,PetscInt cs1,PetscScala
   PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&rs1_,&cs1p1,&rs1_,&sone,qM,&ld_,U,&rs1_,&zero,work+nwu,&rs1_));
   PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&cs1p1,&cs1p1,&rs1_,&sone,U,&rs1_,work+nwu,&rs1_,&zero,qM,&ld_));
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSTOARSupdate"
 /*
-  S <- S*Q 
+  S <- S*Q
   columns s-s+ncu of S
   rows 0-sr of S
   size(Q) qr x ncu
+  dim(work)=sr*ncu;
 */
-static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)
+static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)
 {
   PetscErrorCode ierr;
   PetscScalar    a=1.0,b=0.0;
   PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
-  PetscInt       lwa,j,lds=2*ld;
+  PetscInt       j,lds=2*ld;
 
   PetscFunctionBegin;
-  lwa = sr*ncu;
-  if (!work||nw<lwa) {
-    if (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",10);
-    if (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",9);
-  }
   ierr = PetscBLASIntCast(sr,&sr_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(qr,&qr_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ncu,&ncu_);CHKERRQ(ierr);
@@ -451,7 +444,7 @@ static PetscErrorCode PEPSTOARpreKConvergence(PEP pep,PetscInt nv,PetscReal *nor
   ierr = BVMultVec(pep->V,1.0,0.0,w[1],S+ctx->ld+nv*lds);CHKERRQ(ierr);
   ierr = STMatMult(pep->st,2,w[1],w[2]);CHKERRQ(ierr);
   ierr = VecNorm(w[2],NORM_2,&t2);CHKERRQ(ierr);
-  t2 *= pep->sfactor*pep->sfactor; 
+  t2 *= pep->sfactor*pep->sfactor;
   *norm = PetscMax(*norm,SlepcAbs(t1,t2));
   PetscFunctionReturn(0);
 }
@@ -462,7 +455,7 @@ static PetscErrorCode PEPSTOARpreKConvergence(PEP pep,PetscInt nv,PetscReal *nor
 PetscErrorCode PEPSolve_STOAR(PEP pep)
 {
   PetscErrorCode ierr;
-  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
   PetscInt       j,k,l,nv=0,ld=ctx->ld,lds=ctx->d*ctx->ld,off,ldds,t;
   PetscInt       lwa,lrwa,nwu=0,nrwu=0,nconv=0;
   PetscScalar    *S=ctx->S,*Q,*work;
@@ -470,12 +463,13 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
   PetscBool      breakdown,symmlost=PETSC_FALSE,sinv;
 
   PetscFunctionBegin;
+  ierr = PetscCitationsRegister(citation,&cited);CHKERRQ(ierr);
   ierr = BVSetMatrix(pep->V,NULL,PETSC_FALSE);CHKERRQ(ierr);
   lwa = 9*ld*ld+5*ld;
   lrwa = 8*ld;
   ierr = PetscMalloc2(lwa,&work,lrwa,&rwork);CHKERRQ(ierr); /* REVIEW */
   ierr = PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);CHKERRQ(ierr);
-  ierr = RGSetScale(pep->rg,sinv?1.0/pep->sfactor:pep->sfactor);CHKERRQ(ierr);
+  ierr = RGPushScale(pep->rg,sinv?pep->sfactor:1.0/pep->sfactor);CHKERRQ(ierr);
   ierr = STScaleShift(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);CHKERRQ(ierr);
 
   /* Restart loop */
@@ -485,12 +479,11 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
     pep->its++;
     ierr = DSGetArrayReal(pep->ds,DS_MAT_T,&a);CHKERRQ(ierr);
     b = a+ldds;
-    r = b+ldds;
     ierr = DSGetArrayReal(pep->ds,DS_MAT_D,&omega);CHKERRQ(ierr);
-    
+
     /* Compute an nv-step Lanczos factorization */
     nv = PetscMin(pep->nconv+pep->mpd,pep->ncv);
-    ierr = PEPSTOARrun(pep,a,b,omega,pep->nconv+l,&nv,&breakdown,&symmlost,work+nwu,lwa-nwu,pep->work,3);CHKERRQ(ierr);
+    ierr = PEPSTOARrun(pep,a,b,omega,pep->nconv+l,&nv,&breakdown,&symmlost,work+nwu,pep->work);CHKERRQ(ierr);
     beta = b[nv-1];
     if (symmlost) {
       pep->reason = PEP_DIVERGED_SYMMETRY_LOST;
@@ -512,15 +505,14 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
     /* Check convergence */
     /* ierr = PEPSTOARpreKConvergence(pep,nv,&norm,pep->work);CHKERRQ(ierr);*/
     norm = 1.0;
-    ierr = DSGetDimensions(pep->ds,NULL,NULL,NULL,NULL,&t);CHKERRQ(ierr);    
+    ierr = DSGetDimensions(pep->ds,NULL,NULL,NULL,NULL,&t);CHKERRQ(ierr);
     ierr = PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,t-pep->nconv,PetscAbsReal(beta)*norm,&k);CHKERRQ(ierr);
     nconv = k;
-    if (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-    if (k >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
+    ierr = (*pep->stopping)(pep,pep->its,pep->max_it,k,pep->nev,&pep->reason,pep->stoppingctx);CHKERRQ(ierr);
 
     /* Update l */
     if (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
-    else { 
+    else {
       l = PetscMax(1,(PetscInt)((nv-k)/2));
       l = PetscMin(l,t);
       ierr = DSGetArrayReal(pep->ds,DS_MAT_T,&a);CHKERRQ(ierr);
@@ -535,7 +527,7 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
     /* Update S */
     off = pep->nconv*ldds;
     ierr = DSGetArray(pep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
-    ierr = PEPSTOARSupdate(S,ld,nv+2,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu,lwa-nwu);CHKERRQ(ierr);
+    ierr = PEPSTOARSupdate(S,ld,nv+2,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu);CHKERRQ(ierr);
     ierr = DSRestoreArray(pep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
 
     /* Copy last column of S */
@@ -563,7 +555,7 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
         ierr = DSRestoreArrayReal(pep->ds,DS_MAT_D,&omega);CHKERRQ(ierr);
         /* Truncate S */
         ierr = DSGetArrayReal(pep->ds,DS_MAT_D,&omega);CHKERRQ(ierr);
-        ierr = PEPSTOARTrunc(pep,nv+2,k+l+1,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);CHKERRQ(ierr);
+        ierr = PEPSTOARTrunc(pep,nv+2,k+l+1,work+nwu,rwork+nrwu);CHKERRQ(ierr);
         ierr = DSRestoreArrayReal(pep->ds,DS_MAT_D,&omega);CHKERRQ(ierr);
       }
     }
@@ -576,20 +568,20 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
   if (pep->nconv>0) {
     /* Truncate S */
     ierr = DSGetArrayReal(pep->ds,DS_MAT_D,&omega);CHKERRQ(ierr);
-    ierr = PEPSTOARTrunc(pep,nv+2,pep->nconv,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);CHKERRQ(ierr);
+    ierr = PEPSTOARTrunc(pep,nv+2,pep->nconv,work+nwu,rwork+nrwu);CHKERRQ(ierr);
     ierr = DSRestoreArrayReal(pep->ds,DS_MAT_D,&omega);CHKERRQ(ierr);
-  
+
     /* Extraction */
     ierr = DSSetDimensions(pep->ds,pep->nconv,0,0,0);CHKERRQ(ierr);
     ierr = DSSetState(pep->ds,DS_STATE_RAW);CHKERRQ(ierr);
-  
+
     for (j=0;j<pep->nconv;j++) {
       pep->eigr[j] *= pep->sfactor;
       pep->eigi[j] *= pep->sfactor;
     }
   }
   ierr = STScaleShift(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);CHKERRQ(ierr);
-  ierr = RGSetScale(pep->rg,1.0);CHKERRQ(ierr);
+  ierr = RGPopScale(pep->rg);CHKERRQ(ierr);
 
   /* truncate Schur decomposition and change the state to raw so that
      DSVectors() computes eigenvectors from scratch */
@@ -601,7 +593,7 @@ PetscErrorCode PEPSolve_STOAR(PEP pep)
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetFromOptions_STOAR"
-PetscErrorCode PEPSetFromOptions_STOAR(PetscOptions *PetscOptionsObject,PEP pep)
+PetscErrorCode PEPSetFromOptions_STOAR(PetscOptionItems *PetscOptionsObject,PEP pep)
 {
   PetscErrorCode ierr;
   PetscBool      flg,lock;
@@ -698,7 +690,7 @@ PetscErrorCode PEPSTOARGetLocking(PEP pep,PetscBool *lock)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(lock,2);
-  ierr = PetscTryMethod(pep,"PEPSTOARGetLocking_C",(PEP,PetscBool*),(pep,lock));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPSTOARGetLocking_C",(PEP,PetscBool*),(pep,lock));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/pep/impls/krylov/stoar/stoar.c.html b/src/pep/impls/krylov/stoar/stoar.c.html
index 82345d0..5316372 100644
--- a/src/pep/impls/krylov/stoar/stoar.c.html
+++ b/src/pep/impls/krylov/stoar/stoar.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/stoar/stoar.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:04+00:00">
+<meta name="date" content="2016-05-16T10:34:03+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/stoar/stoar.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/stoar/stoar.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc polynomial eigensolver: "stoar"</font>
@@ -22,13 +22,13 @@
 
 <a name="line11"> 11: </a><font color="#B22222">   References:</font>
 
-<a name="line13"> 13: </a><font color="#B22222">       [1] C. Campos and J.E. Roman, " Restarted Q-Arnoldi-type methods</font>
-<a name="line14"> 14: </a><font color="#B22222">           exploiting symmetry in quadratic eigenvalue problems",</font>
-<a name="line15"> 15: </a><font color="#B22222">           submitted, 2015.</font>
+<a name="line13"> 13: </a><font color="#B22222">       [1] C. Campos and J.E. Roman, "Restarted Q-Arnoldi-type methods</font>
+<a name="line14"> 14: </a><font color="#B22222">           exploiting symmetry in quadratic eigenvalue problems", BIT</font>
+<a name="line15"> 15: </a><font color="#B22222">           Numer. Math. (in press), 2016.</font>
 
 <a name="line17"> 17: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line18"> 18: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line19"> 19: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line21"> 21: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -50,654 +50,645 @@
 <a name="line38"> 38: </a> #include <A href="../../../../../include/../src/pep/impls/krylov/pepkrylov.h.html">../src/pep/impls/krylov/pepkrylov.h</A>
 <a name="line39"> 39: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
 
-<a name="line43"> 43: </a><font color="#B22222">/*</font>
-<a name="line44"> 44: </a><font color="#B22222">  Compute B-norm of v=[v1;v2] whith  B=diag(-pep->T[0],pep->T[2]) </font>
-<a name="line45"> 45: </a><font color="#B22222">*/</font>
-<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="PEPSTOARNorm"></a>static PetscErrorCode PEPSTOARNorm(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt j,PetscReal *norm)</font></strong>
-<a name="line47"> 47: </a>{
-<a name="line49"> 49: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line50"> 50: </a>  PetscBLASInt   n_,one=1,ld_;
-<a name="line51"> 51: </a>  PetscScalar    sone=1.0,szero=0.0,*sp,*sq,*w1,*w2,*qK,*qM;
-<a name="line52"> 52: </a>  PetscInt       n,i,lds=ctx->d*ctx->ld;
-
-<a name="line55"> 55: </a>  qK = ctx->qB;
-<a name="line56"> 56: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
-<a name="line57"> 57: </a>  n = j+2;
-<a name="line58"> 58: </a>  PetscMalloc2(n,&w1,n,&w2);
-<a name="line59"> 59: </a>  sp = ctx->S+lds*j;
-<a name="line60"> 60: </a>  sq = sp+ctx->ld;
-<a name="line61"> 61: </a>  PetscBLASIntCast(n,&n_);
-<a name="line62"> 62: </a>  PetscBLASIntCast(ctx->ld,&ld_);
-<a name="line63"> 63: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qK,&ld_,sp,&one,&szero,w1,&one));
-<a name="line64"> 64: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qM,&ld_,sq,&one,&szero,w2,&one));
-<a name="line65"> 65: </a>  *norm = 0.0;
-<a name="line66"> 66: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) *norm += PetscRealPart(w1[i]*PetscConj(sp[i])+w2[i]*PetscConj(sq[i]));
-<a name="line67"> 67: </a>  *norm = (*norm>0.0)?PetscSqrtReal(*norm):-PetscSqrtReal(-*norm);
-<a name="line68"> 68: </a>  PetscFree2(w1,w2);
-<a name="line69"> 69: </a>  <font color="#4169E1">return</font>(0);
-<a name="line70"> 70: </a>}
-
-<a name="line74"> 74: </a><strong><font color="#4169E1"><a name="PEPSTOARqKqMupdates"></a>static PetscErrorCode PEPSTOARqKqMupdates(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt j,Vec *wv,PetscInt nwv)</font></strong>
-<a name="line75"> 75: </a>{
-<a name="line77"> 77: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line78"> 78: </a>  PetscInt       i,ld=ctx->ld;
-<a name="line79"> 79: </a>  PetscScalar    *qK,*qM;
-<a name="line80"> 80: </a>  Vec            vj,v1,v2;
-
-<a name="line83"> 83: </a>  qK = ctx->qB;
-<a name="line84"> 84: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (!wv||nwv<2) {
-<a name="line86"> 86: </a>    <font color="#4169E1">if</font> (!wv) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,3);
-<a name="line87"> 87: </a>    <font color="#4169E1">else</font> SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,4);
-<a name="line88"> 88: </a>  }
-<a name="line89"> 89: </a>  v1 = wv[0];
-<a name="line90"> 90: </a>  v2 = wv[1];
-<a name="line91"> 91: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,j,&vj);
-<a name="line92"> 92: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,0,vj,v1);
-<a name="line93"> 93: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,2,vj,v2);
-<a name="line94"> 94: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,j,&vj);
-<a name="line95"> 95: </a>  <font color="#4169E1">for</font> (i=0;i<=j;i++) {
-<a name="line96"> 96: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&vj);
-<a name="line97"> 97: </a>    VecDot(v1,vj,qK+j*ld+i);
-<a name="line98"> 98: </a>    VecDot(v2,vj,qM+j*ld+i);
-<a name="line99"> 99: </a>    *(qM+j*ld+i) *= pep->sfactor*pep->sfactor;
-<a name="line100">100: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&vj);
-<a name="line101">101: </a>  }
-<a name="line102">102: </a>  <font color="#4169E1">for</font> (i=0;i<j;i++) {
-<a name="line103">103: </a>    qK[i+j*ld] = -qK[i+ld*j];
-<a name="line104">104: </a>    qK[j+i*ld] = PetscConj(qK[i+j*ld]);
-<a name="line105">105: </a>    qM[j+i*ld] = PetscConj(qM[i+j*ld]);
-<a name="line106">106: </a>  }
-<a name="line107">107: </a>  qK[j+j*ld] = -PetscRealPart(qK[j+ld*j]);
-<a name="line108">108: </a>  qM[j+j*ld] = PetscRealPart(qM[j+ld*j]);
-<a name="line109">109: </a>  <font color="#4169E1">return</font>(0);
-<a name="line110">110: </a>}
-
-<a name="line114">114: </a><strong><font color="#4169E1"><a name="PEPSetUp_STOAR"></a>PetscErrorCode PEPSetUp_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line115">115: </a>{
-<a name="line117">117: </a>  PetscBool      sinv,flg,lindep;
-<a name="line118">118: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line119">119: </a>  PetscInt       ld,i;
-<a name="line120">120: </a>  PetscReal      norm,*omega;
-
-<a name="line123">123: </a>  PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);
-<a name="line124">124: </a>  <font color="#4169E1">if</font> (!ctx->lock && pep->mpd<pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Should not use mpd parameter in non-locking variant"</font>);
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (!pep->max_it) pep->max_it = PetscMax(100,2*pep->n/pep->ncv);
-<a name="line126">126: </a>  <font color="#4169E1">if</font> (!pep->which) {
-<a name="line127">127: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line128">128: </a>    <font color="#4169E1">if</font> (sinv) pep->which = PEP_TARGET_MAGNITUDE;
-<a name="line129">129: </a>    <font color="#4169E1">else</font> pep->which = PEP_LARGEST_MAGNITUDE;
-<a name="line130">130: </a>  }
-<a name="line131">131: </a>  <font color="#4169E1">if</font> (pep->problem_type!=PEP_HERMITIAN) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Requested method is only available for Hermitian problems"</font>);
-
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (pep->nmat!=3) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver only available for quadratic problems"</font>);
-<a name="line134">134: </a>  <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver not implemented for non-monomial bases"</font>);
-<a name="line135">135: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line136">136: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver requires the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> transformation flag set, see <a href="../../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>()"</font>);
-
-<a name="line138">138: </a>  <a href="../../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,2);
-<a name="line139">139: </a>  <a href="../../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,4);
-<a name="line140">140: </a>  ld = pep->ncv+2;
-<a name="line141">141: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(pep->ds,DSGHIEP);
-<a name="line142">142: </a>  <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(pep->ds,PETSC_TRUE);
-<a name="line143">143: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(pep->ds,ld);
-<a name="line144">144: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(pep->st,&ctx->d);
-<a name="line145">145: </a>  ctx->d--;
-<a name="line146">146: </a>  ctx->ld = ld;
-<a name="line147">147: </a>  PetscCalloc1(ctx->d*ld*ld,&ctx->S);
-<a name="line148">148: </a>  PetscCalloc1(2*ld*ld,&ctx->qB);
-
-<a name="line150">150: </a>  <font color="#B22222">/* process starting vector */</font>
-<a name="line151">151: </a>  <font color="#4169E1">if</font> (pep->nini>-2) {  
-<a name="line152">152: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,0,pep->rand);
-<a name="line153">153: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,1,pep->rand);
-<a name="line154">154: </a>  } <font color="#4169E1">else</font> {
-<a name="line155">155: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,0,pep->IS[0]);
-<a name="line156">156: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,1,pep->IS[1]);
-<a name="line157">157: </a>  }
-<a name="line158">158: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,0,NULL,&norm,&lindep);
-<a name="line159">159: </a>  <font color="#4169E1">if</font> (!lindep) {
-<a name="line160">160: </a>    <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,0,1.0/norm);
-<a name="line161">161: </a>    ctx->S[0] = norm;
-<a name="line162">162: </a>    PEPSTOARqKqMupdates(pep,0,pep->work,2);
+<a name="line41"> 41: </a>static PetscBool  cited = PETSC_FALSE;
+<a name="line42"> 42: </a>static const char citation[] =
+<a name="line43"> 43: </a>  <font color="#666666">"@Article{slepc-stoar,\n"</font>
+<a name="line44"> 44: </a>  <font color="#666666">"   author = \"C. Campos and J. E. Roman\",\n"</font>
+<a name="line45"> 45: </a>  <font color="#666666">"   title = \"Restarted {Q-Arnoldi-type} methods exploiting symmetry in quadratic eigenvalue problems\",\n"</font>
+<a name="line46"> 46: </a>  <font color="#666666">"   journal = \"{BIT} Numer. Math.\",\n"</font>
+<a name="line47"> 47: </a>  <font color="#666666">"   volume = \"to appear\",\n"</font>
+<a name="line48"> 48: </a>  <font color="#666666">"   number = \"\",\n"</font>
+<a name="line49"> 49: </a>  <font color="#666666">"   pages = \"\",\n"</font>
+<a name="line50"> 50: </a>  <font color="#666666">"   year = \"2016,\"\n"</font>
+<a name="line51"> 51: </a>  <font color="#666666">"   doi = \"http://dx.doi.org/10.1007/s10543-016-0601-5\"\n"</font>
+<a name="line52"> 52: </a>  <font color="#666666">"}\n"</font>;
+
+<a name="line56"> 56: </a><font color="#B22222">/*</font>
+<a name="line57"> 57: </a><font color="#B22222">  Compute B-norm of v=[v1;v2] whith  B=diag(-pep->T[0],pep->T[2])</font>
+<a name="line58"> 58: </a><font color="#B22222">*/</font>
+<a name="line59"> 59: </a><strong><font color="#4169E1"><a name="PEPSTOARNorm"></a>static PetscErrorCode PEPSTOARNorm(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt j,PetscReal *norm)</font></strong>
+<a name="line60"> 60: </a>{
+<a name="line62"> 62: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line63"> 63: </a>  PetscBLASInt   n_,one=1,ld_;
+<a name="line64"> 64: </a>  PetscScalar    sone=1.0,szero=0.0,*sp,*sq,*w1,*w2,*qK,*qM;
+<a name="line65"> 65: </a>  PetscInt       n,i,lds=ctx->d*ctx->ld;
+
+<a name="line68"> 68: </a>  qK = ctx->qB;
+<a name="line69"> 69: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
+<a name="line70"> 70: </a>  n = j+2;
+<a name="line71"> 71: </a>  PetscMalloc2(n,&w1,n,&w2);
+<a name="line72"> 72: </a>  sp = ctx->S+lds*j;
+<a name="line73"> 73: </a>  sq = sp+ctx->ld;
+<a name="line74"> 74: </a>  PetscBLASIntCast(n,&n_);
+<a name="line75"> 75: </a>  PetscBLASIntCast(ctx->ld,&ld_);
+<a name="line76"> 76: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qK,&ld_,sp,&one,&szero,w1,&one));
+<a name="line77"> 77: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qM,&ld_,sq,&one,&szero,w2,&one));
+<a name="line78"> 78: </a>  *norm = 0.0;
+<a name="line79"> 79: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) *norm += PetscRealPart(w1[i]*PetscConj(sp[i])+w2[i]*PetscConj(sq[i]));
+<a name="line80"> 80: </a>  *norm = (*norm>0.0)?PetscSqrtReal(*norm):-PetscSqrtReal(-*norm);
+<a name="line81"> 81: </a>  PetscFree2(w1,w2);
+<a name="line82"> 82: </a>  <font color="#4169E1">return</font>(0);
+<a name="line83"> 83: </a>}
+
+<a name="line87"> 87: </a><strong><font color="#4169E1"><a name="PEPSTOARqKqMupdates"></a>static PetscErrorCode PEPSTOARqKqMupdates(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt j,Vec *wv)</font></strong>
+<a name="line88"> 88: </a>{
+<a name="line90"> 90: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line91"> 91: </a>  PetscInt       i,ld=ctx->ld;
+<a name="line92"> 92: </a>  PetscScalar    *qK,*qM;
+<a name="line93"> 93: </a>  Vec            vj,v1,v2;
+
+<a name="line96"> 96: </a>  qK = ctx->qB;
+<a name="line97"> 97: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
+<a name="line98"> 98: </a>  v1 = wv[0];
+<a name="line99"> 99: </a>  v2 = wv[1];
+<a name="line100">100: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,j,&vj);
+<a name="line101">101: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,0,vj,v1);
+<a name="line102">102: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,2,vj,v2);
+<a name="line103">103: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,j,&vj);
+<a name="line104">104: </a>  <font color="#4169E1">for</font> (i=0;i<=j;i++) {
+<a name="line105">105: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&vj);
+<a name="line106">106: </a>    VecDot(v1,vj,qK+j*ld+i);
+<a name="line107">107: </a>    VecDot(v2,vj,qM+j*ld+i);
+<a name="line108">108: </a>    *(qM+j*ld+i) *= pep->sfactor*pep->sfactor;
+<a name="line109">109: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&vj);
+<a name="line110">110: </a>  }
+<a name="line111">111: </a>  <font color="#4169E1">for</font> (i=0;i<j;i++) {
+<a name="line112">112: </a>    qK[i+j*ld] = -qK[i+ld*j];
+<a name="line113">113: </a>    qK[j+i*ld] = PetscConj(qK[i+j*ld]);
+<a name="line114">114: </a>    qM[j+i*ld] = PetscConj(qM[i+j*ld]);
+<a name="line115">115: </a>  }
+<a name="line116">116: </a>  qK[j+j*ld] = -PetscRealPart(qK[j+ld*j]);
+<a name="line117">117: </a>  qM[j+j*ld] = PetscRealPart(qM[j+ld*j]);
+<a name="line118">118: </a>  <font color="#4169E1">return</font>(0);
+<a name="line119">119: </a>}
+
+<a name="line123">123: </a><strong><font color="#4169E1"><a name="PEPSetUp_STOAR"></a>PetscErrorCode PEPSetUp_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line124">124: </a>{
+<a name="line126">126: </a>  PetscBool      sinv,flg,lindep;
+<a name="line127">127: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line128">128: </a>  PetscInt       ld,i;
+<a name="line129">129: </a>  PetscReal      norm,*omega;
+
+<a name="line132">132: </a>  PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);
+<a name="line133">133: </a>  <font color="#4169E1">if</font> (!ctx->lock && pep->mpd<pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Should not use mpd parameter in non-locking variant"</font>);
+<a name="line134">134: </a>  <font color="#4169E1">if</font> (!pep->max_it) pep->max_it = PetscMax(100,2*pep->n/pep->ncv);
+<a name="line135">135: </a>  <font color="#4169E1">if</font> (!pep->which) {
+<a name="line136">136: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line137">137: </a>    <font color="#4169E1">if</font> (sinv) pep->which = PEP_TARGET_MAGNITUDE;
+<a name="line138">138: </a>    <font color="#4169E1">else</font> pep->which = PEP_LARGEST_MAGNITUDE;
+<a name="line139">139: </a>  }
+<a name="line140">140: </a>  <font color="#4169E1">if</font> (pep->problem_type!=PEP_HERMITIAN) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Requested method is only available for Hermitian problems"</font>);
+
+<a name="line142">142: </a>  <font color="#4169E1">if</font> (pep->nmat!=3) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver only available for quadratic problems"</font>);
+<a name="line143">143: </a>  <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver not implemented for non-monomial bases"</font>);
+<a name="line144">144: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Solver requires the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> transformation flag set, see <a href="../../../../../docs/manualpages/ST/STSetTransform.html#STSetTransform">STSetTransform</a>()"</font>);
+
+<a name="line147">147: </a>  <a href="../../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,2);
+<a name="line148">148: </a>  <a href="../../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,4);
+<a name="line149">149: </a>  ld = pep->ncv+2;
+<a name="line150">150: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(pep->ds,DSGHIEP);
+<a name="line151">151: </a>  <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(pep->ds,PETSC_TRUE);
+<a name="line152">152: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(pep->ds,ld);
+<a name="line153">153: </a>  <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(pep->st,&ctx->d);
+<a name="line154">154: </a>  ctx->d--;
+<a name="line155">155: </a>  ctx->ld = ld;
+<a name="line156">156: </a>  PetscCalloc1(ctx->d*ld*ld,&ctx->S);
+<a name="line157">157: </a>  PetscCalloc1(2*ld*ld,&ctx->qB);
+
+<a name="line159">159: </a>  <font color="#B22222">/* process starting vector */</font>
+<a name="line160">160: </a>  <font color="#4169E1">if</font> (pep->nini>-2) {
+<a name="line161">161: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,0);
+<a name="line162">162: </a>    <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,1);
 <a name="line163">163: </a>  } <font color="#4169E1">else</font> {
-<a name="line164">164: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Problem with initial vector"</font>);
-<a name="line165">165: </a>  }
-<a name="line166">166: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,1,ctx->S+ld,&norm,&lindep);
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (!lindep) {
-<a name="line168">168: </a>    <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,1,1.0/norm);
-<a name="line169">169: </a>    ctx->S[1] = norm;
-<a name="line170">170: </a>    PEPSTOARqKqMupdates(pep,1,pep->work,2);
-<a name="line171">171: </a>  } <font color="#4169E1">else</font> {
-<a name="line172">172: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Problem with initial vector"</font>);
-<a name="line173">173: </a>  }
-
-<a name="line175">175: </a>  PEPSTOARNorm(pep,0,&norm);
-<a name="line176">176: </a>  <font color="#4169E1">for</font> (i=0;i<2;i++) { ctx->S[i+ld] /= norm; ctx->S[i] /= norm; }
-<a name="line177">177: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line178">178: </a>  omega[0] = (norm>0)?1.0:-1.0;
-<a name="line179">179: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line180">180: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
-<a name="line181">181: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
-<a name="line182">182: </a>  }
-<a name="line183">183: </a>  <font color="#4169E1">return</font>(0);
-<a name="line184">184: </a>}
-
-<a name="line188">188: </a><font color="#B22222">/*</font>
-<a name="line189">189: </a><font color="#B22222">  Computes GS orthogonalization  x = [z;x] - [Sp;Sq]*y,</font>
-<a name="line190">190: </a><font color="#B22222">  where y = Omega\([Sp;Sq]'*[qK zeros(size(qK,1)) ;zeros(size(qK,1)) qM]*[z;x]).</font>
-<a name="line191">191: </a><font color="#B22222">  n: Column from S to be orthogonalized against previous columns.</font>
-<a name="line192">192: </a><font color="#B22222">*/</font>
-<a name="line193">193: </a><strong><font color="#4169E1"><a name="PEPSTOAROrth2"></a>static PetscErrorCode PEPSTOAROrth2(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscReal *Omega,PetscScalar *y)</font></strong>
-<a name="line194">194: </a>{
-<a name="line196">196: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line197">197: </a>  PetscBLASInt   n_,lds_,k_,one=1,ld_;
-<a name="line198">198: </a>  PetscScalar    *S=ctx->S,sonem=-1.0,sone=1.0,szero=0.0,*tp,*tq,*xp,*xq,*c,*qK,*qM;
-<a name="line199">199: </a>  PetscInt       i,lds=ctx->d*ctx->ld,n,j;
-<a name="line200">200: </a>  
-<a name="line202">202: </a>  qK = ctx->qB;
-<a name="line203">203: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
-<a name="line204">204: </a>  n = k+2;
-<a name="line205">205: </a>  PetscMalloc3(n,&tp,n,&tq,k,&c);
-<a name="line206">206: </a>  PetscBLASIntCast(n,&n_); <font color="#B22222">/* Size of qK and qM */</font>
-<a name="line207">207: </a>  PetscBLASIntCast(ctx->ld,&ld_);
-<a name="line208">208: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line209">209: </a>  PetscBLASIntCast(k,&k_); <font color="#B22222">/* Number of vectors to orthogonalize against */</font>
-<a name="line210">210: </a>  xp = S+k*lds;
-<a name="line211">211: </a>  xq = S+ctx->ld+k*lds;
-<a name="line212">212: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qK,&ld_,xp,&one,&szero,tp,&one));
-<a name="line213">213: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qM,&ld_,xq,&one,&szero,tq,&one));
-<a name="line214">214: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,ctx->S,&lds_,tp,&one,&szero,y,&one));
-<a name="line215">215: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+ctx->ld,&lds_,tq,&one,&sone,y,&one));
-<a name="line216">216: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] /= Omega[i];
-<a name="line217">217: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S,&lds_,y,&one,&sone,xp,&one));
-<a name="line218">218: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+ctx->ld,&lds_,y,&one,&sone,xq,&one));
-<a name="line219">219: </a>  <font color="#B22222">/* three times */</font>
-<a name="line220">220: </a>  <font color="#4169E1">for</font> (j=0;j<2;j++) {
-<a name="line221">221: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qK,&ld_,xp,&one,&szero,tp,&one));
-<a name="line222">222: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qM,&ld_,xq,&one,&szero,tq,&one));
-<a name="line223">223: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,ctx->S,&lds_,tp,&one,&szero,c,&one));
-<a name="line224">224: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+ctx->ld,&lds_,tq,&one,&sone,c,&one));
-<a name="line225">225: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) c[i] /= Omega[i];
-<a name="line226">226: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S,&lds_,c,&one,&sone,xp,&one));
-<a name="line227">227: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+ctx->ld,&lds_,c,&one,&sone,xq,&one));
-<a name="line228">228: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] += c[i];
-<a name="line229">229: </a>  }
-<a name="line230">230: </a>  PetscFree3(tp,tq,c);
-<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
-<a name="line232">232: </a>}
-
-<a name="line236">236: </a><font color="#B22222">/*</font>
-<a name="line237">237: </a><font color="#B22222">  Compute a run of Lanczos iterations</font>
-<a name="line238">238: </a><font color="#B22222">*/</font>
-<a name="line239">239: </a><strong><font color="#4169E1"><a name="PEPSTOARrun"></a>static PetscErrorCode PEPSTOARrun(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)</font></strong>
-<a name="line240">240: </a>{
-<a name="line242">242: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line243">243: </a>  PetscInt       i,j,m=*M,nwu=0,lwa,l;
-<a name="line244">244: </a>  PetscInt       lds=ctx->d*ctx->ld,offq=ctx->ld;
-<a name="line245">245: </a>  Vec            v=t_[0],t=t_[1],q=t_[2];
-<a name="line246">246: </a>  PetscReal      norm,sym=0.0,fro=0.0,*f;
-<a name="line247">247: </a>  PetscScalar    *y,*S=ctx->S;
-<a name="line248">248: </a>  PetscBLASInt   j_,one=1;
-<a name="line249">249: </a>  PetscBool      lindep;
-
-<a name="line252">252: </a>  *breakdown = PETSC_FALSE; <font color="#B22222">/* ----- */</font>
-<a name="line253">253: </a>  <font color="#4169E1">if</font> (!t_||nwv<3) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,12);
-<a name="line254">254: </a>  lwa = (ctx->ld)*4;
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,10);
-<a name="line256">256: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,NULL,NULL,&l,NULL,NULL);
-<a name="line257">257: </a>  y = work;
-<a name="line258">258: </a>  nwu += ctx->ld;
-<a name="line259">259: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
-<a name="line260">260: </a>    <font color="#B22222">/* apply operator */</font>
-<a name="line261">261: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,j+2);
-<a name="line262">262: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,v,S+j*lds);
-<a name="line263">263: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,0,v,t);
-<a name="line264">264: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,v,S+offq+j*lds);
-<a name="line265">265: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,1,v,q);
-<a name="line266">266: </a>    VecAXPY(t,pep->sfactor,q);
-<a name="line267">267: </a>    <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(pep->st,t,q);
-<a name="line268">268: </a>    VecScale(q,-1.0/(pep->sfactor*pep->sfactor));
-
-<a name="line270">270: </a>    <font color="#B22222">/* orthogonalize */</font>
-<a name="line271">271: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(pep->V,q,S+offq+(j+1)*lds,&norm,&lindep);
-<a name="line272">272: </a>    <font color="#4169E1">if</font> (lindep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"STOAR does not support detection of linearly dependent TOAR vectors"</font>);
-<a name="line273">273: </a>    *(S+offq+(j+1)*lds+j+2) = norm;
-<a name="line274">274: </a>    VecScale(q,1.0/norm);
-<a name="line275">275: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,j+2,q);
-<a name="line276">276: </a>    <font color="#4169E1">for</font> (i=0;i<=j+1;i++) *(S+(j+1)*lds+i) = *(S+offq+j*lds+i);
-<a name="line277">277: </a>   
-<a name="line278">278: </a>    <font color="#B22222">/* update qK and qM */</font>
-<a name="line279">279: </a>    PEPSTOARqKqMupdates(pep,j+2,t_,2);
-
-<a name="line281">281: </a>    <font color="#B22222">/* level-2 orthogonalization */</font>
-<a name="line282">282: </a>    PEPSTOAROrth2(pep,j+1,omega,y);
-<a name="line283">283: </a>    a[j] = PetscRealPart(y[j])/omega[j];
-<a name="line284">284: </a>    PEPSTOARNorm(pep,j+1,&norm);
-<a name="line285">285: </a>    omega[j+1] = (norm > 0)?1.0:-1.0;
-<a name="line286">286: </a>    <font color="#4169E1">for</font> (i=0;i<=j+2;i++) {
-<a name="line287">287: </a>      S[i+(j+1)*lds] /= norm;
-<a name="line288">288: </a>      S[i+offq+(j+1)*lds] /= norm;
-<a name="line289">289: </a>    }
-<a name="line290">290: </a>    b[j] = PetscAbsReal(norm);
-
-<a name="line292">292: </a>    <font color="#B22222">/* check symmetry */</font>
-<a name="line293">293: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&f);
-<a name="line294">294: </a>    <font color="#4169E1">if</font> (j==k) {
-<a name="line295">295: </a>      <font color="#4169E1">for</font> (i=l;i<j-1;i++) y[i] = PetscAbsScalar(y[i])-PetscAbsReal(f[2*ctx->ld+i]);
-<a name="line296">296: </a>      <font color="#4169E1">for</font> (i=0;i<l;i++) y[i] = 0.0;
-<a name="line297">297: </a>    }
-<a name="line298">298: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&f);
-<a name="line299">299: </a>    <font color="#4169E1">if</font> (j>0) y[j-1] = PetscAbsScalar(y[j-1])-PetscAbsReal(b[j-1]);
-<a name="line300">300: </a>    PetscBLASIntCast(j,&j_);
-<a name="line301">301: </a>    sym = SlepcAbs(BLASnrm2_(&j_,y,&one),sym);
-<a name="line302">302: </a>    fro = SlepcAbs(fro,SlepcAbs(a[j],b[j]));
-<a name="line303">303: </a>    <font color="#4169E1">if</font> (j>0) fro = SlepcAbs(fro,b[j-1]);
-<a name="line304">304: </a>    <font color="#4169E1">if</font> (sym/fro>PetscMax(PETSC_SQRT_MACHINE_EPSILON,10*pep->tol)) {
-<a name="line305">305: </a>      *symmlost = PETSC_TRUE;
-<a name="line306">306: </a>      *M=j+1;
-<a name="line307">307: </a>      <font color="#4169E1">break</font>;
-<a name="line308">308: </a>    }
-<a name="line309">309: </a>  }
-<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>}
-
-<a name="line315">315: </a><strong><font color="#4169E1"><a name="PEPSTOARTrunc"></a>static PetscErrorCode PEPSTOARTrunc(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)</font></strong>
-<a name="line316">316: </a>{
-<a name="line318">318: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line319">319: </a>  Mat            G;
-<a name="line320">320: </a>  PetscInt       lwa,nwu=0,lrwa,nrwu=0;
-<a name="line321">321: </a>  PetscInt       i,n,lds=2*ctx->ld;
-<a name="line322">322: </a>  PetscScalar    *M,*V,*U,*S=ctx->S,sone=1.0,zero=0.0,t,*qK,*qM;
-<a name="line323">323: </a>  PetscReal      *sg;
-<a name="line324">324: </a>  PetscBLASInt   cs1_,rs1_,cs1t2,cs1p1,n_,info,lw_,lds_,ld_;
-
-<a name="line327">327: </a>  qK = ctx->qB;
-<a name="line328">328: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
-<a name="line329">329: </a>  n = (rs1>2*cs1)?2*cs1:rs1;
-<a name="line330">330: </a>  lwa = cs1*rs1*4+n*(rs1+2*cs1)+(cs1+1)*(cs1+2);
-<a name="line331">331: </a>  lrwa = n+cs1+1+5*n;
-<a name="line332">332: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) {
-<a name="line333">333: </a>    <font color="#4169E1">if</font> (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,6);
-<a name="line334">334: </a>    <font color="#4169E1">if</font> (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,5);
-<a name="line335">335: </a>  }
-<a name="line336">336: </a>  <font color="#4169E1">if</font> (!rwork||nrw<lrwa) {
-<a name="line337">337: </a>    <font color="#4169E1">if</font> (nrw<lrwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,8);
-<a name="line338">338: </a>    <font color="#4169E1">if</font> (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,7);
-<a name="line339">339: </a>  }
-<a name="line340">340: </a>  M = work+nwu;
-<a name="line341">341: </a>  nwu += rs1*cs1*2;
-<a name="line342">342: </a>  U = work+nwu;
-<a name="line343">343: </a>  nwu += rs1*n;
-<a name="line344">344: </a>  V = work+nwu;
-<a name="line345">345: </a>  nwu += 2*cs1*n;
-<a name="line346">346: </a>  sg = rwork+nrwu;
-<a name="line347">347: </a>  nrwu += n;
-<a name="line348">348: </a>  <font color="#4169E1">for</font> (i=0;i<cs1;i++) {
-<a name="line349">349: </a>    PetscMemcpy(M+i*rs1,S+i*lds,rs1*<font color="#4169E1">sizeof</font>(PetscScalar));  
-<a name="line350">350: </a>    PetscMemcpy(M+(i+cs1)*rs1,S+i*lds+ctx->ld,rs1*<font color="#4169E1">sizeof</font>(PetscScalar));  
-<a name="line351">351: </a>  }
-<a name="line352">352: </a>  PetscBLASIntCast(n,&n_);
-<a name="line353">353: </a>  PetscBLASIntCast(cs1,&cs1_);
-<a name="line354">354: </a>  PetscBLASIntCast(rs1,&rs1_);
-<a name="line355">355: </a>  PetscBLASIntCast(cs1*2,&cs1t2);
-<a name="line356">356: </a>  PetscBLASIntCast(cs1+1,&cs1p1);
-<a name="line357">357: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line358">358: </a>  PetscBLASIntCast(ctx->ld,&ld_);
-<a name="line359">359: </a>  PetscBLASIntCast(lwa-nwu,&lw_);
-<a name="line360">360: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line361">361: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,&info));
-<a name="line362">362: </a><font color="#A020F0">#else</font>
-<a name="line363">363: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
-<a name="line364">364: </a><font color="#A020F0">#endif</font>
-<a name="line365">365: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-
-<a name="line367">367: </a>  <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line368">368: </a>  MatCreateSeqDense(PETSC_COMM_SELF,rs1,2*cs1,U,&G);
-<a name="line369">369: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,rs1);
-<a name="line370">370: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,G,0,cs1+1);
-<a name="line371">371: </a>  MatDestroy(&G);
-<a name="line372">372: </a>  
-<a name="line373">373: </a>  <font color="#B22222">/* Update S */</font>
-<a name="line374">374: </a>  PetscMemzero(S,lds*ctx->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-
-<a name="line376">376: </a>  <font color="#4169E1">for</font> (i=0;i<cs1+1;i++) {
-<a name="line377">377: </a>    t = sg[i];
-<a name="line378">378: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&cs1t2,&t,V+i,&n_));
+<a name="line164">164: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,0,pep->IS[0]);
+<a name="line165">165: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,1,pep->IS[1]);
+<a name="line166">166: </a>  }
+<a name="line167">167: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,0,NULL,&norm,&lindep);
+<a name="line168">168: </a>  <font color="#4169E1">if</font> (!lindep) {
+<a name="line169">169: </a>    <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,0,1.0/norm);
+<a name="line170">170: </a>    ctx->S[0] = norm;
+<a name="line171">171: </a>    PEPSTOARqKqMupdates(pep,0,pep->work);
+<a name="line172">172: </a>  } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Problem with initial vector"</font>);
+<a name="line173">173: </a>  <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,1,ctx->S+ld,&norm,&lindep);
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (!lindep) {
+<a name="line175">175: </a>    <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,1,1.0/norm);
+<a name="line176">176: </a>    ctx->S[1] = norm;
+<a name="line177">177: </a>    PEPSTOARqKqMupdates(pep,1,pep->work);
+<a name="line178">178: </a>  } <font color="#4169E1">else</font> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Problem with initial vector"</font>);
+
+<a name="line180">180: </a>  PEPSTOARNorm(pep,0,&norm);
+<a name="line181">181: </a>  <font color="#4169E1">for</font> (i=0;i<2;i++) { ctx->S[i+ld] /= norm; ctx->S[i] /= norm; }
+<a name="line182">182: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line183">183: </a>  omega[0] = (norm>0)?1.0:-1.0;
+<a name="line184">184: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line185">185: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
+<a name="line186">186: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
+<a name="line189">189: </a>}
+
+<a name="line193">193: </a><font color="#B22222">/*</font>
+<a name="line194">194: </a><font color="#B22222">  Computes GS orthogonalization  x = [z;x] - [Sp;Sq]*y,</font>
+<a name="line195">195: </a><font color="#B22222">  where y = Omega\([Sp;Sq]'*[qK zeros(size(qK,1)) ;zeros(size(qK,1)) qM]*[z;x]).</font>
+<a name="line196">196: </a><font color="#B22222">  n: Column from S to be orthogonalized against previous columns.</font>
+<a name="line197">197: </a><font color="#B22222">*/</font>
+<a name="line198">198: </a><strong><font color="#4169E1"><a name="PEPSTOAROrth2"></a>static PetscErrorCode PEPSTOAROrth2(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscReal *Omega,PetscScalar *y)</font></strong>
+<a name="line199">199: </a>{
+<a name="line201">201: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line202">202: </a>  PetscBLASInt   n_,lds_,k_,one=1,ld_;
+<a name="line203">203: </a>  PetscScalar    *S=ctx->S,sonem=-1.0,sone=1.0,szero=0.0,*tp,*tq,*xp,*xq,*c,*qK,*qM;
+<a name="line204">204: </a>  PetscInt       i,lds=ctx->d*ctx->ld,n,j;
+
+<a name="line207">207: </a>  qK = ctx->qB;
+<a name="line208">208: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
+<a name="line209">209: </a>  n = k+2;
+<a name="line210">210: </a>  PetscMalloc3(n,&tp,n,&tq,k,&c);
+<a name="line211">211: </a>  PetscBLASIntCast(n,&n_); <font color="#B22222">/* Size of qK and qM */</font>
+<a name="line212">212: </a>  PetscBLASIntCast(ctx->ld,&ld_);
+<a name="line213">213: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line214">214: </a>  PetscBLASIntCast(k,&k_); <font color="#B22222">/* Number of vectors to orthogonalize against */</font>
+<a name="line215">215: </a>  xp = S+k*lds;
+<a name="line216">216: </a>  xq = S+ctx->ld+k*lds;
+<a name="line217">217: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qK,&ld_,xp,&one,&szero,tp,&one));
+<a name="line218">218: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qM,&ld_,xq,&one,&szero,tq,&one));
+<a name="line219">219: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,ctx->S,&lds_,tp,&one,&szero,y,&one));
+<a name="line220">220: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+ctx->ld,&lds_,tq,&one,&sone,y,&one));
+<a name="line221">221: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] /= Omega[i];
+<a name="line222">222: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S,&lds_,y,&one,&sone,xp,&one));
+<a name="line223">223: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+ctx->ld,&lds_,y,&one,&sone,xq,&one));
+<a name="line224">224: </a>  <font color="#B22222">/* three times */</font>
+<a name="line225">225: </a>  <font color="#4169E1">for</font> (j=0;j<2;j++) {
+<a name="line226">226: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qK,&ld_,xp,&one,&szero,tp,&one));
+<a name="line227">227: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&n_,&sone,qM,&ld_,xq,&one,&szero,tq,&one));
+<a name="line228">228: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,ctx->S,&lds_,tp,&one,&szero,c,&one));
+<a name="line229">229: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+ctx->ld,&lds_,tq,&one,&sone,c,&one));
+<a name="line230">230: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) c[i] /= Omega[i];
+<a name="line231">231: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S,&lds_,c,&one,&sone,xp,&one));
+<a name="line232">232: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+ctx->ld,&lds_,c,&one,&sone,xq,&one));
+<a name="line233">233: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] += c[i];
+<a name="line234">234: </a>  }
+<a name="line235">235: </a>  PetscFree3(tp,tq,c);
+<a name="line236">236: </a>  <font color="#4169E1">return</font>(0);
+<a name="line237">237: </a>}
+
+<a name="line241">241: </a><font color="#B22222">/*</font>
+<a name="line242">242: </a><font color="#B22222">  Compute a run of Lanczos iterations. dim(work)=(ctx->ld)*4</font>
+<a name="line243">243: </a><font color="#B22222">*/</font>
+<a name="line244">244: </a><strong><font color="#4169E1"><a name="PEPSTOARrun"></a>static PetscErrorCode PEPSTOARrun(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *a,PetscReal *b,PetscReal *omega,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscBool *symmlost,PetscScalar *work,Vec *t_)</font></strong>
+<a name="line245">245: </a>{
+<a name="line247">247: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line248">248: </a>  PetscInt       i,j,m=*M,l;
+<a name="line249">249: </a>  PetscInt       lds=ctx->d*ctx->ld,offq=ctx->ld;
+<a name="line250">250: </a>  Vec            v=t_[0],t=t_[1],q=t_[2];
+<a name="line251">251: </a>  PetscReal      norm,sym=0.0,fro=0.0,*f;
+<a name="line252">252: </a>  PetscScalar    *y,*S=ctx->S;
+<a name="line253">253: </a>  PetscBLASInt   j_,one=1;
+<a name="line254">254: </a>  PetscBool      lindep;
+
+<a name="line257">257: </a>  *breakdown = PETSC_FALSE; <font color="#B22222">/* ----- */</font>
+<a name="line258">258: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,NULL,NULL,&l,NULL,NULL);
+<a name="line259">259: </a>  y = work;
+<a name="line260">260: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line261">261: </a>    <font color="#B22222">/* apply operator */</font>
+<a name="line262">262: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,j+2);
+<a name="line263">263: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,v,S+j*lds);
+<a name="line264">264: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,0,v,t);
+<a name="line265">265: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,v,S+offq+j*lds);
+<a name="line266">266: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,1,v,q);
+<a name="line267">267: </a>    VecAXPY(t,pep->sfactor,q);
+<a name="line268">268: </a>    <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(pep->st,t,q);
+<a name="line269">269: </a>    VecScale(q,-1.0/(pep->sfactor*pep->sfactor));
+
+<a name="line271">271: </a>    <font color="#B22222">/* orthogonalize */</font>
+<a name="line272">272: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(pep->V,q,S+offq+(j+1)*lds,&norm,&lindep);
+<a name="line273">273: </a>    <font color="#4169E1">if</font> (lindep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"STOAR does not support detection of linearly dependent TOAR vectors"</font>);
+<a name="line274">274: </a>    *(S+offq+(j+1)*lds+j+2) = norm;
+<a name="line275">275: </a>    VecScale(q,1.0/norm);
+<a name="line276">276: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,j+2,q);
+<a name="line277">277: </a>    <font color="#4169E1">for</font> (i=0;i<=j+1;i++) *(S+(j+1)*lds+i) = *(S+offq+j*lds+i);
+
+<a name="line279">279: </a>    <font color="#B22222">/* update qK and qM */</font>
+<a name="line280">280: </a>    PEPSTOARqKqMupdates(pep,j+2,t_);
+
+<a name="line282">282: </a>    <font color="#B22222">/* level-2 orthogonalization */</font>
+<a name="line283">283: </a>    PEPSTOAROrth2(pep,j+1,omega,y);
+<a name="line284">284: </a>    a[j] = PetscRealPart(y[j])/omega[j];
+<a name="line285">285: </a>    PEPSTOARNorm(pep,j+1,&norm);
+<a name="line286">286: </a>    omega[j+1] = (norm > 0)?1.0:-1.0;
+<a name="line287">287: </a>    <font color="#4169E1">for</font> (i=0;i<=j+2;i++) {
+<a name="line288">288: </a>      S[i+(j+1)*lds] /= norm;
+<a name="line289">289: </a>      S[i+offq+(j+1)*lds] /= norm;
+<a name="line290">290: </a>    }
+<a name="line291">291: </a>    b[j] = PetscAbsReal(norm);
+
+<a name="line293">293: </a>    <font color="#B22222">/* check symmetry */</font>
+<a name="line294">294: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&f);
+<a name="line295">295: </a>    <font color="#4169E1">if</font> (j==k) {
+<a name="line296">296: </a>      <font color="#4169E1">for</font> (i=l;i<j-1;i++) y[i] = PetscAbsScalar(y[i])-PetscAbsReal(f[2*ctx->ld+i]);
+<a name="line297">297: </a>      <font color="#4169E1">for</font> (i=0;i<l;i++) y[i] = 0.0;
+<a name="line298">298: </a>    }
+<a name="line299">299: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&f);
+<a name="line300">300: </a>    <font color="#4169E1">if</font> (j>0) y[j-1] = PetscAbsScalar(y[j-1])-PetscAbsReal(b[j-1]);
+<a name="line301">301: </a>    PetscBLASIntCast(j,&j_);
+<a name="line302">302: </a>    sym = SlepcAbs(BLASnrm2_(&j_,y,&one),sym);
+<a name="line303">303: </a>    fro = SlepcAbs(fro,SlepcAbs(a[j],b[j]));
+<a name="line304">304: </a>    <font color="#4169E1">if</font> (j>0) fro = SlepcAbs(fro,b[j-1]);
+<a name="line305">305: </a>    <font color="#4169E1">if</font> (sym/fro>PetscMax(PETSC_SQRT_MACHINE_EPSILON,10*pep->tol)) {
+<a name="line306">306: </a>      *symmlost = PETSC_TRUE;
+<a name="line307">307: </a>      *M=j+1;
+<a name="line308">308: </a>      <font color="#4169E1">break</font>;
+<a name="line309">309: </a>    }
+<a name="line310">310: </a>  }
+<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
+<a name="line312">312: </a>}
+
+<a name="line316">316: </a><strong><font color="#4169E1"><a name="PEPSTOARTrunc"></a>static PetscErrorCode PEPSTOARTrunc(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt rs1,PetscInt cs1,PetscScalar *work,PetscReal *rwork)</font></strong>
+<a name="line317">317: </a>{
+<a name="line318">318: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD)</font>
+<a name="line320">320: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
+<a name="line321">321: </a><font color="#A020F0">#else</font>
+<a name="line323">323: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line324">324: </a>  Mat            G;
+<a name="line325">325: </a>  PetscInt       lwa,nwu=0,nrwu=0;
+<a name="line326">326: </a>  PetscInt       i,n,lds=2*ctx->ld;
+<a name="line327">327: </a>  PetscScalar    *M,*V,*U,*S=ctx->S,sone=1.0,zero=0.0,t,*qK,*qM;
+<a name="line328">328: </a>  PetscReal      *sg;
+<a name="line329">329: </a>  PetscBLASInt   cs1_,rs1_,cs1t2,cs1p1,n_,info,lw_,lds_,ld_;
+
+<a name="line332">332: </a>  qK = ctx->qB;
+<a name="line333">333: </a>  qM = ctx->qB+ctx->ld*ctx->ld;
+<a name="line334">334: </a>  n = (rs1>2*cs1)?2*cs1:rs1;
+<a name="line335">335: </a>  lwa = cs1*rs1*4+n*(rs1+2*cs1)+(cs1+1)*(cs1+2);
+<a name="line336">336: </a>  M = work+nwu;
+<a name="line337">337: </a>  nwu += rs1*cs1*2;
+<a name="line338">338: </a>  U = work+nwu;
+<a name="line339">339: </a>  nwu += rs1*n;
+<a name="line340">340: </a>  V = work+nwu;
+<a name="line341">341: </a>  nwu += 2*cs1*n;
+<a name="line342">342: </a>  sg = rwork+nrwu;
+<a name="line343">343: </a>  nrwu += n;
+<a name="line344">344: </a>  <font color="#4169E1">for</font> (i=0;i<cs1;i++) {
+<a name="line345">345: </a>    PetscMemcpy(M+i*rs1,S+i*lds,rs1*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line346">346: </a>    PetscMemcpy(M+(i+cs1)*rs1,S+i*lds+ctx->ld,rs1*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line347">347: </a>  }
+<a name="line348">348: </a>  PetscBLASIntCast(n,&n_);
+<a name="line349">349: </a>  PetscBLASIntCast(cs1,&cs1_);
+<a name="line350">350: </a>  PetscBLASIntCast(rs1,&rs1_);
+<a name="line351">351: </a>  PetscBLASIntCast(cs1*2,&cs1t2);
+<a name="line352">352: </a>  PetscBLASIntCast(cs1+1,&cs1p1);
+<a name="line353">353: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line354">354: </a>  PetscBLASIntCast(ctx->ld,&ld_);
+<a name="line355">355: </a>  PetscBLASIntCast(lwa-nwu,&lw_);
+<a name="line356">356: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line357">357: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,&info));
+<a name="line358">358: </a><font color="#A020F0">#else</font>
+<a name="line359">359: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&rs1_,&cs1t2,M,&rs1_,sg,U,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));
+<a name="line360">360: </a><font color="#A020F0">#endif</font>
+<a name="line361">361: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+
+<a name="line363">363: </a>  <font color="#B22222">/* Update the corresponding vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line364">364: </a>  MatCreateSeqDense(PETSC_COMM_SELF,rs1,2*cs1,U,&G);
+<a name="line365">365: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,rs1);
+<a name="line366">366: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,G,0,cs1+1);
+<a name="line367">367: </a>  MatDestroy(&G);
+
+<a name="line369">369: </a>  <font color="#B22222">/* Update S */</font>
+<a name="line370">370: </a>  PetscMemzero(S,lds*ctx->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+
+<a name="line372">372: </a>  <font color="#4169E1">for</font> (i=0;i<cs1+1;i++) {
+<a name="line373">373: </a>    t = sg[i];
+<a name="line374">374: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&cs1t2,&t,V+i,&n_));
+<a name="line375">375: </a>  }
+<a name="line376">376: </a>  <font color="#4169E1">for</font> (i=0;i<cs1;i++) {
+<a name="line377">377: </a>    PetscMemcpy(S+i*lds,V+i*n,(cs1+1)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line378">378: </a>    PetscMemcpy(S+ctx->ld+i*lds,V+(cs1+i)*n,(cs1+1)*<font color="#4169E1">sizeof</font>(PetscScalar));
 <a name="line379">379: </a>  }
-<a name="line380">380: </a>  <font color="#4169E1">for</font> (i=0;i<cs1;i++) {
-<a name="line381">381: </a>    PetscMemcpy(S+i*lds,V+i*n,(cs1+1)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line382">382: </a>    PetscMemcpy(S+ctx->ld+i*lds,V+(cs1+i)*n,(cs1+1)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line383">383: </a>  }
-
-<a name="line385">385: </a>  <font color="#B22222">/* Update qM and qK */</font>
-<a name="line386">386: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&rs1_,&cs1p1,&rs1_,&sone,qK,&ld_,U,&rs1_,&zero,work+nwu,&rs1_));
-<a name="line387">387: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&cs1p1,&cs1p1,&rs1_,&sone,U,&rs1_,work+nwu,&rs1_,&zero,qK,&ld_));
-<a name="line388">388: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&rs1_,&cs1p1,&rs1_,&sone,qM,&ld_,U,&rs1_,&zero,work+nwu,&rs1_));
-<a name="line389">389: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&cs1p1,&cs1p1,&rs1_,&sone,U,&rs1_,work+nwu,&rs1_,&zero,qM,&ld_));
-<a name="line390">390: </a>  <font color="#4169E1">return</font>(0);
-<a name="line391">391: </a>}
-
-<a name="line395">395: </a><font color="#B22222">/*</font>
-<a name="line396">396: </a><font color="#B22222">  S <- S*Q </font>
-<a name="line397">397: </a><font color="#B22222">  columns s-s+ncu of S</font>
-<a name="line398">398: </a><font color="#B22222">  rows 0-sr of S</font>
-<a name="line399">399: </a><font color="#B22222">  size(Q) qr x ncu</font>
-<a name="line400">400: </a><font color="#B22222">*/</font>
-<a name="line401">401: </a><strong><font color="#4169E1"><a name="PEPSTOARSupdate"></a>static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)</font></strong>
-<a name="line402">402: </a>{
-<a name="line404">404: </a>  PetscScalar    a=1.0,b=0.0;
-<a name="line405">405: </a>  PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
-<a name="line406">406: </a>  PetscInt       lwa,j,lds=2*ld;
-
-<a name="line409">409: </a>  lwa = sr*ncu;
-<a name="line410">410: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) {
-<a name="line411">411: </a>    <font color="#4169E1">if</font> (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,10);
-<a name="line412">412: </a>    <font color="#4169E1">if</font> (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,9);
-<a name="line413">413: </a>  }
-<a name="line414">414: </a>  PetscBLASIntCast(sr,&sr_);
-<a name="line415">415: </a>  PetscBLASIntCast(qr,&qr_);
-<a name="line416">416: </a>  PetscBLASIntCast(ncu,&ncu_);
-<a name="line417">417: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line418">418: </a>  PetscBLASIntCast(ldq,&ldq_);
-<a name="line419">419: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S,&lds_,Q,&ldq_,&b,work,&sr_));
-<a name="line420">420: </a>  <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
-<a name="line421">421: </a>    PetscMemcpy(S+lds*(s+j),work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line422">422: </a>  }
-<a name="line423">423: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S+ld,&lds_,Q,&ldq_,&b,work,&sr_));
-<a name="line424">424: </a>  <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
-<a name="line425">425: </a>    PetscMemcpy(S+lds*(s+j)+ld,work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line426">426: </a>  }
-<a name="line427">427: </a>  <font color="#4169E1">return</font>(0);
-<a name="line428">428: </a>}
-
-<a name="line430">430: </a><font color="#A020F0">#if 0</font>
-<a name="line433">433: </a><strong><font color="#4169E1"><a name="PEPSTOARpreKConvergence"></a>static PetscErrorCode PEPSTOARpreKConvergence(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nv,PetscReal *norm,Vec *w)</font></strong>
-<a name="line434">434: </a>{
-<a name="line436">436: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line437">437: </a>  PetscBLASInt   n_,one=1;
-<a name="line438">438: </a>  PetscInt       lds=2*ctx->ld;
-<a name="line439">439: </a>  PetscReal      t1,t2;
-<a name="line440">440: </a>  PetscScalar    *S=ctx->S;
-
-<a name="line443">443: </a>  PetscBLASIntCast(nv+2,&n_);
-<a name="line444">444: </a>  t1 = BLASnrm2_(&n_,S+nv*2*ctx->ld,&one);
-<a name="line445">445: </a>  t2 = BLASnrm2_(&n_,S+(nv*2+1)*ctx->ld,&one);
-<a name="line446">446: </a>  *norm = SlepcAbs(t1,t2);
-<a name="line447">447: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,nv+2);
-<a name="line448">448: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,w[1],S+nv*lds);
-<a name="line449">449: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,0,w[1],w[2]);
-<a name="line450">450: </a>  VecNorm(w[2],NORM_2,&t1);
-<a name="line451">451: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,w[1],S+ctx->ld+nv*lds);
-<a name="line452">452: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,2,w[1],w[2]);
-<a name="line453">453: </a>  VecNorm(w[2],NORM_2,&t2);
-<a name="line454">454: </a>  t2 *= pep->sfactor*pep->sfactor; 
-<a name="line455">455: </a>  *norm = PetscMax(*norm,SlepcAbs(t1,t2));
-<a name="line456">456: </a>  <font color="#4169E1">return</font>(0);
-<a name="line457">457: </a>}
-<a name="line458">458: </a><font color="#A020F0">#endif</font>
-
-<a name="line462">462: </a><strong><font color="#4169E1"><a name="PEPSolve_STOAR"></a>PetscErrorCode PEPSolve_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line463">463: </a>{
-<a name="line465">465: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line466">466: </a>  PetscInt       j,k,l,nv=0,ld=ctx->ld,lds=ctx->d*ctx->ld,off,ldds,t;
-<a name="line467">467: </a>  PetscInt       lwa,lrwa,nwu=0,nrwu=0,nconv=0;
-<a name="line468">468: </a>  PetscScalar    *S=ctx->S,*Q,*work;
-<a name="line469">469: </a>  PetscReal      beta,norm=1.0,*omega,*a,*b,*r,*rwork;
-<a name="line470">470: </a>  PetscBool      breakdown,symmlost=PETSC_FALSE,sinv;
-
-<a name="line473">473: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(pep->V,NULL,PETSC_FALSE);
-<a name="line474">474: </a>  lwa = 9*ld*ld+5*ld;
-<a name="line475">475: </a>  lrwa = 8*ld;
-<a name="line476">476: </a>  PetscMalloc2(lwa,&work,lrwa,&rwork); <font color="#B22222">/* REVIEW */</font>
-<a name="line477">477: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line478">478: </a>  <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,sinv?1.0/pep->sfactor:pep->sfactor);
-<a name="line479">479: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);
-
-<a name="line481">481: </a>  <font color="#B22222">/* Restart loop */</font>
-<a name="line482">482: </a>  l = 0;
-<a name="line483">483: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldds);
-<a name="line484">484: </a>  <font color="#4169E1">while</font> (pep->reason == PEP_CONVERGED_ITERATING) {
-<a name="line485">485: </a>    pep->its++;
-<a name="line486">486: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&a);
-<a name="line487">487: </a>    b = a+ldds;
-<a name="line488">488: </a>    r = b+ldds;
-<a name="line489">489: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line490">490: </a>    
-<a name="line491">491: </a>    <font color="#B22222">/* Compute an nv-step Lanczos factorization */</font>
-<a name="line492">492: </a>    nv = PetscMin(pep->nconv+pep->mpd,pep->ncv);
-<a name="line493">493: </a>    PEPSTOARrun(pep,a,b,omega,pep->nconv+l,&nv,&breakdown,&symmlost,work+nwu,lwa-nwu,pep->work,3);
-<a name="line494">494: </a>    beta = b[nv-1];
-<a name="line495">495: </a>    <font color="#4169E1">if</font> (symmlost) {
-<a name="line496">496: </a>      pep->reason = PEP_DIVERGED_SYMMETRY_LOST;
-<a name="line497">497: </a>      <font color="#4169E1">if</font> (nv==pep->nconv+l+1) { pep->nconv = nconv; <font color="#4169E1">break</font>; }
-<a name="line498">498: </a>    }
-<a name="line499">499: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&a);
-<a name="line500">500: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line501">501: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,nv,0,pep->nconv,pep->nconv+l);
-<a name="line502">502: </a>    <font color="#4169E1">if</font> (l==0) {
-<a name="line503">503: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_INTERMEDIATE);
-<a name="line504">504: </a>    } <font color="#4169E1">else</font> {
-<a name="line505">505: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line506">506: </a>    }
-
-<a name="line508">508: </a>    <font color="#B22222">/* Solve projected problem */</font>
-<a name="line509">509: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
-<a name="line510">510: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
-
-<a name="line512">512: </a>    <font color="#B22222">/* Check convergence */</font>
-<a name="line513">513: </a>    <font color="#B22222">/* PEPSTOARpreKConvergence(pep,nv,&norm,pep->work);*/</font>
-<a name="line514">514: </a>    norm = 1.0;
-<a name="line515">515: </a>    <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,NULL,NULL,NULL,NULL,&t);    
-<a name="line516">516: </a>    PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,t-pep->nconv,PetscAbsReal(beta)*norm,&k);
-<a name="line517">517: </a>    nconv = k;
-<a name="line518">518: </a>    <font color="#4169E1">if</font> (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-<a name="line519">519: </a>    <font color="#4169E1">if</font> (k >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
-
-<a name="line521">521: </a>    <font color="#B22222">/* Update l */</font>
-<a name="line522">522: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
-<a name="line523">523: </a>    <font color="#4169E1">else</font> { 
-<a name="line524">524: </a>      l = PetscMax(1,(PetscInt)((nv-k)/2));
-<a name="line525">525: </a>      l = PetscMin(l,t);
-<a name="line526">526: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&a);
-<a name="line527">527: </a>      <font color="#4169E1">if</font> (*(a+ldds+k+l-1)!=0) {
-<a name="line528">528: </a>        <font color="#4169E1">if</font> (k+l<nv-1) l = l+1;
-<a name="line529">529: </a>        <font color="#4169E1">else</font> l = l-1;
-<a name="line530">530: </a>      }
-<a name="line531">531: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&a);
-<a name="line532">532: </a>    }
-<a name="line533">533: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-
-<a name="line535">535: </a>    <font color="#B22222">/* Update S */</font>
-<a name="line536">536: </a>    off = pep->nconv*ldds;
-<a name="line537">537: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line538">538: </a>    PEPSTOARSupdate(S,ld,nv+2,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu,lwa-nwu);
-<a name="line539">539: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
-
-<a name="line541">541: </a>    <font color="#B22222">/* Copy last column of S */</font>
-<a name="line542">542: </a>    PetscMemcpy(S+lds*(k+l),S+lds*nv,lds*<font color="#4169E1">sizeof</font>(PetscScalar));
-
-<a name="line544">544: </a>    <font color="#4169E1">if</font> (pep->reason == PEP_CONVERGED_ITERATING) {
-<a name="line545">545: </a>      <font color="#4169E1">if</font> (breakdown) {
-<a name="line546">546: </a>        <font color="#B22222">/* Stop if breakdown */</font>
-<a name="line547">547: </a>        PetscInfo2(pep,<font color="#666666">"Breakdown STOAR method (it=%D norm=%g)\n"</font>,pep->its,(double)beta);
-<a name="line548">548: </a>        pep->reason = PEP_DIVERGED_BREAKDOWN;
-<a name="line549">549: </a>      } <font color="#4169E1">else</font> {
-<a name="line550">550: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
-<a name="line551">551: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line552">552: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&a);
-<a name="line553">553: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line554">554: </a>        r = a + 2*ldds;
-<a name="line555">555: </a>        <font color="#4169E1">for</font> (j=k;j<k+l;j++) {
-<a name="line556">556: </a>          r[j] = PetscRealPart(Q[nv-1+j*ldds]*beta);
-<a name="line557">557: </a>        }
-<a name="line558">558: </a>        b = a+ldds;
-<a name="line559">559: </a>        b[k+l-1] = r[k+l-1];
-<a name="line560">560: </a>        omega[k+l] = omega[nv];
-<a name="line561">561: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line562">562: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&a);
-<a name="line563">563: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line564">564: </a>        <font color="#B22222">/* Truncate S */</font>
-<a name="line565">565: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line566">566: </a>        PEPSTOARTrunc(pep,nv+2,k+l+1,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);
-<a name="line567">567: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line568">568: </a>      }
-<a name="line569">569: </a>    }
-
-
-<a name="line572">572: </a>    pep->nconv = k;
-<a name="line573">573: </a>    PEPMonitor(pep,pep->its,pep->nconv,pep->eigr,pep->eigi,pep->errest,nv);
-<a name="line574">574: </a>  }
-
-<a name="line576">576: </a>  <font color="#4169E1">if</font> (pep->nconv>0) {
-<a name="line577">577: </a>    <font color="#B22222">/* Truncate S */</font>
-<a name="line578">578: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line579">579: </a>    PEPSTOARTrunc(pep,nv+2,pep->nconv,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);
-<a name="line580">580: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
-<a name="line581">581: </a>  
-<a name="line582">582: </a>    <font color="#B22222">/* Extraction */</font>
-<a name="line583">583: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line584">584: </a>    <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line585">585: </a>  
-<a name="line586">586: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nconv;j++) {
-<a name="line587">587: </a>      pep->eigr[j] *= pep->sfactor;
-<a name="line588">588: </a>      pep->eigi[j] *= pep->sfactor;
-<a name="line589">589: </a>    }
-<a name="line590">590: </a>  }
-<a name="line591">591: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);
-<a name="line592">592: </a>  <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,1.0);
-
-<a name="line594">594: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
-<a name="line595">595: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
-<a name="line596">596: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line597">597: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line598">598: </a>  PetscFree2(work,rwork);
-<a name="line599">599: </a>  <font color="#4169E1">return</font>(0);
-<a name="line600">600: </a>}
-
-<a name="line604">604: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_STOAR"></a>PetscErrorCode PEPSetFromOptions_STOAR(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line605">605: </a>{
-<a name="line607">607: </a>  PetscBool      flg,lock;
-
-<a name="line610">610: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> STOAR Options"</font>);
-<a name="line611">611: </a>  PetscOptionsBool(<font color="#666666">"-pep_stoar_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>"</font>,PETSC_FALSE,&lock,&flg);
-<a name="line612">612: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line613">613: </a>    <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>(pep,lock);
-<a name="line614">614: </a>  }
-<a name="line615">615: </a>  PetscOptionsTail();
-<a name="line616">616: </a>  <font color="#4169E1">return</font>(0);
-<a name="line617">617: </a>}
-
-<a name="line621">621: </a><strong><font color="#4169E1"><a name="PEPSTOARSetLocking_STOAR"></a>static PetscErrorCode PEPSTOARSetLocking_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
-<a name="line622">622: </a>{
-<a name="line623">623: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
-
-<a name="line626">626: </a>  ctx->lock = lock;
-<a name="line627">627: </a>  <font color="#4169E1">return</font>(0);
-<a name="line628">628: </a>}
-
-<a name="line632">632: </a><font color="#B22222">/*@</font>
-<a name="line633">633: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a> - Choose between locking and non-locking variants of</font>
-<a name="line634">634: </a><font color="#B22222">   the STOAR method.</font>
-
-<a name="line636">636: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line638">638: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line639">639: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line640">640: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
-
-<a name="line642">642: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line643">643: </a><font color="#B22222">.  -pep_stoar_locking - Sets the locking flag</font>
-
-<a name="line645">645: </a><font color="#B22222">   Notes:</font>
-<a name="line646">646: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
-<a name="line647">647: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
-<a name="line648">648: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
-<a name="line649">649: </a><font color="#B22222">   non-locking variant).</font>
-
-<a name="line651">651: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line653">653: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a>()</font>
-<a name="line654">654: </a><font color="#B22222">@*/</font>
-<a name="line655">655: </a><strong><font color="#4169E1"><a name="PEPSTOARSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
-<a name="line656">656: </a>{
-
-<a name="line662">662: </a>  PetscTryMethod(pep,<font color="#666666">"PEPSTOARSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,lock));
-<a name="line663">663: </a>  <font color="#4169E1">return</font>(0);
-<a name="line664">664: </a>}
-
-<a name="line668">668: </a><strong><font color="#4169E1"><a name="PEPSTOARGetLocking_STOAR"></a>static PetscErrorCode PEPSTOARGetLocking_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
-<a name="line669">669: </a>{
-<a name="line670">670: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
-
-<a name="line673">673: </a>  *lock = ctx->lock;
-<a name="line674">674: </a>  <font color="#4169E1">return</font>(0);
-<a name="line675">675: </a>}
-
-<a name="line679">679: </a><font color="#B22222">/*@</font>
-<a name="line680">680: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a> - Gets the locking flag used in the STOAR method.</font>
-
-<a name="line682">682: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line684">684: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line685">685: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line687">687: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line688">688: </a><font color="#B22222">.  lock - the locking flag</font>
-
-<a name="line690">690: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line692">692: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>()</font>
-<a name="line693">693: </a><font color="#B22222">@*/</font>
-<a name="line694">694: </a><strong><font color="#4169E1"><a name="PEPSTOARGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
-<a name="line695">695: </a>{
-
-<a name="line701">701: </a>  PetscTryMethod(pep,<font color="#666666">"PEPSTOARGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,lock));
-<a name="line702">702: </a>  <font color="#4169E1">return</font>(0);
-<a name="line703">703: </a>}
-
-<a name="line707">707: </a><strong><font color="#4169E1"><a name="PEPView_STOAR"></a>PetscErrorCode PEPView_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line708">708: </a>{
-<a name="line710">710: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
-<a name="line711">711: </a>  PetscBool      isascii;
-
-<a name="line714">714: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line715">715: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line716">716: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  STOAR: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
-<a name="line717">717: </a>  }
-<a name="line718">718: </a>  <font color="#4169E1">return</font>(0);
-<a name="line719">719: </a>}
-
-<a name="line723">723: </a><strong><font color="#4169E1"><a name="PEPDestroy_STOAR"></a>PetscErrorCode PEPDestroy_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line724">724: </a>{
-
-<a name="line728">728: </a>  PetscFree(pep->data);
-<a name="line729">729: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARSetLocking_C"</font>,NULL);
-<a name="line730">730: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARGetLocking_C"</font>,NULL);
-<a name="line731">731: </a>  <font color="#4169E1">return</font>(0);
-<a name="line732">732: </a>}
-
-<a name="line736">736: </a><strong><font color="#4169E1"><a name="PEPCreate_STOAR"></a>PETSC_EXTERN PetscErrorCode PEPCreate_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line737">737: </a>{
-<a name="line739">739: </a>  PEP_TOAR      *ctx;
-
-<a name="line742">742: </a>  PetscNewLog(pep,&ctx);
-<a name="line743">743: </a>  pep->data = (void*)ctx;
-<a name="line744">744: </a>  ctx->lock = PETSC_TRUE;
-
-<a name="line746">746: </a>  pep->ops->solve          = PEPSolve_STOAR;
-<a name="line747">747: </a>  pep->ops->setup          = PEPSetUp_STOAR;
-<a name="line748">748: </a>  pep->ops->setfromoptions = PEPSetFromOptions_STOAR;
-<a name="line749">749: </a>  pep->ops->view           = PEPView_STOAR;
-<a name="line750">750: </a>  pep->ops->destroy        = PEPDestroy_STOAR;
-<a name="line751">751: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
-<a name="line752">752: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
-<a name="line753">753: </a>  pep->ops->extractvectors = PEPExtractVectors_TOAR;
-<a name="line754">754: </a>  pep->ops->reset          = PEPReset_TOAR;
-<a name="line755">755: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARSetLocking_C"</font>,PEPSTOARSetLocking_STOAR);
-<a name="line756">756: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARGetLocking_C"</font>,PEPSTOARGetLocking_STOAR);
-<a name="line757">757: </a>  <font color="#4169E1">return</font>(0);
-<a name="line758">758: </a>}
+
+<a name="line381">381: </a>  <font color="#B22222">/* Update qM and qK */</font>
+<a name="line382">382: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&rs1_,&cs1p1,&rs1_,&sone,qK,&ld_,U,&rs1_,&zero,work+nwu,&rs1_));
+<a name="line383">383: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&cs1p1,&cs1p1,&rs1_,&sone,U,&rs1_,work+nwu,&rs1_,&zero,qK,&ld_));
+<a name="line384">384: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&rs1_,&cs1p1,&rs1_,&sone,qM,&ld_,U,&rs1_,&zero,work+nwu,&rs1_));
+<a name="line385">385: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&cs1p1,&cs1p1,&rs1_,&sone,U,&rs1_,work+nwu,&rs1_,&zero,qM,&ld_));
+<a name="line386">386: </a>  <font color="#4169E1">return</font>(0);
+<a name="line387">387: </a><font color="#A020F0">#endif</font>
+<a name="line388">388: </a>}
+
+<a name="line392">392: </a><font color="#B22222">/*</font>
+<a name="line393">393: </a><font color="#B22222">  S <- S*Q</font>
+<a name="line394">394: </a><font color="#B22222">  columns s-s+ncu of S</font>
+<a name="line395">395: </a><font color="#B22222">  rows 0-sr of S</font>
+<a name="line396">396: </a><font color="#B22222">  size(Q) qr x ncu</font>
+<a name="line397">397: </a><font color="#B22222">  dim(work)=sr*ncu;</font>
+<a name="line398">398: </a><font color="#B22222">*/</font>
+<a name="line399">399: </a><strong><font color="#4169E1"><a name="PEPSTOARSupdate"></a>static PetscErrorCode PEPSTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)</font></strong>
+<a name="line400">400: </a>{
+<a name="line402">402: </a>  PetscScalar    a=1.0,b=0.0;
+<a name="line403">403: </a>  PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
+<a name="line404">404: </a>  PetscInt       j,lds=2*ld;
+
+<a name="line407">407: </a>  PetscBLASIntCast(sr,&sr_);
+<a name="line408">408: </a>  PetscBLASIntCast(qr,&qr_);
+<a name="line409">409: </a>  PetscBLASIntCast(ncu,&ncu_);
+<a name="line410">410: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line411">411: </a>  PetscBLASIntCast(ldq,&ldq_);
+<a name="line412">412: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S,&lds_,Q,&ldq_,&b,work,&sr_));
+<a name="line413">413: </a>  <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
+<a name="line414">414: </a>    PetscMemcpy(S+lds*(s+j),work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line415">415: </a>  }
+<a name="line416">416: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S+ld,&lds_,Q,&ldq_,&b,work,&sr_));
+<a name="line417">417: </a>  <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
+<a name="line418">418: </a>    PetscMemcpy(S+lds*(s+j)+ld,work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line419">419: </a>  }
+<a name="line420">420: </a>  <font color="#4169E1">return</font>(0);
+<a name="line421">421: </a>}
+
+<a name="line423">423: </a><font color="#A020F0">#if 0</font>
+<a name="line426">426: </a><strong><font color="#4169E1"><a name="PEPSTOARpreKConvergence"></a>static PetscErrorCode PEPSTOARpreKConvergence(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nv,PetscReal *norm,Vec *w)</font></strong>
+<a name="line427">427: </a>{
+<a name="line429">429: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+<a name="line430">430: </a>  PetscBLASInt   n_,one=1;
+<a name="line431">431: </a>  PetscInt       lds=2*ctx->ld;
+<a name="line432">432: </a>  PetscReal      t1,t2;
+<a name="line433">433: </a>  PetscScalar    *S=ctx->S;
+
+<a name="line436">436: </a>  PetscBLASIntCast(nv+2,&n_);
+<a name="line437">437: </a>  t1 = BLASnrm2_(&n_,S+nv*2*ctx->ld,&one);
+<a name="line438">438: </a>  t2 = BLASnrm2_(&n_,S+(nv*2+1)*ctx->ld,&one);
+<a name="line439">439: </a>  *norm = SlepcAbs(t1,t2);
+<a name="line440">440: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,nv+2);
+<a name="line441">441: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,w[1],S+nv*lds);
+<a name="line442">442: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,0,w[1],w[2]);
+<a name="line443">443: </a>  VecNorm(w[2],NORM_2,&t1);
+<a name="line444">444: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(pep->V,1.0,0.0,w[1],S+ctx->ld+nv*lds);
+<a name="line445">445: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,2,w[1],w[2]);
+<a name="line446">446: </a>  VecNorm(w[2],NORM_2,&t2);
+<a name="line447">447: </a>  t2 *= pep->sfactor*pep->sfactor;
+<a name="line448">448: </a>  *norm = PetscMax(*norm,SlepcAbs(t1,t2));
+<a name="line449">449: </a>  <font color="#4169E1">return</font>(0);
+<a name="line450">450: </a>}
+<a name="line451">451: </a><font color="#A020F0">#endif</font>
+
+<a name="line455">455: </a><strong><font color="#4169E1"><a name="PEPSolve_STOAR"></a>PetscErrorCode PEPSolve_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line456">456: </a>{
+<a name="line458">458: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line459">459: </a>  PetscInt       j,k,l,nv=0,ld=ctx->ld,lds=ctx->d*ctx->ld,off,ldds,t;
+<a name="line460">460: </a>  PetscInt       lwa,lrwa,nwu=0,nrwu=0,nconv=0;
+<a name="line461">461: </a>  PetscScalar    *S=ctx->S,*Q,*work;
+<a name="line462">462: </a>  PetscReal      beta,norm=1.0,*omega,*a,*b,*r,*rwork;
+<a name="line463">463: </a>  PetscBool      breakdown,symmlost=PETSC_FALSE,sinv;
+
+<a name="line466">466: </a>  PetscCitationsRegister(citation,&cited);
+<a name="line467">467: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(pep->V,NULL,PETSC_FALSE);
+<a name="line468">468: </a>  lwa = 9*ld*ld+5*ld;
+<a name="line469">469: </a>  lrwa = 8*ld;
+<a name="line470">470: </a>  PetscMalloc2(lwa,&work,lrwa,&rwork); <font color="#B22222">/* REVIEW */</font>
+<a name="line471">471: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line472">472: </a>  <a href="../../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(pep->rg,sinv?pep->sfactor:1.0/pep->sfactor);
+<a name="line473">473: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);
+
+<a name="line475">475: </a>  <font color="#B22222">/* Restart loop */</font>
+<a name="line476">476: </a>  l = 0;
+<a name="line477">477: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldds);
+<a name="line478">478: </a>  <font color="#4169E1">while</font> (pep->reason == PEP_CONVERGED_ITERATING) {
+<a name="line479">479: </a>    pep->its++;
+<a name="line480">480: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&a);
+<a name="line481">481: </a>    b = a+ldds;
+<a name="line482">482: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+
+<a name="line484">484: </a>    <font color="#B22222">/* Compute an nv-step Lanczos factorization */</font>
+<a name="line485">485: </a>    nv = PetscMin(pep->nconv+pep->mpd,pep->ncv);
+<a name="line486">486: </a>    PEPSTOARrun(pep,a,b,omega,pep->nconv+l,&nv,&breakdown,&symmlost,work+nwu,pep->work);
+<a name="line487">487: </a>    beta = b[nv-1];
+<a name="line488">488: </a>    <font color="#4169E1">if</font> (symmlost) {
+<a name="line489">489: </a>      pep->reason = PEP_DIVERGED_SYMMETRY_LOST;
+<a name="line490">490: </a>      <font color="#4169E1">if</font> (nv==pep->nconv+l+1) { pep->nconv = nconv; <font color="#4169E1">break</font>; }
+<a name="line491">491: </a>    }
+<a name="line492">492: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&a);
+<a name="line493">493: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line494">494: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,nv,0,pep->nconv,pep->nconv+l);
+<a name="line495">495: </a>    <font color="#4169E1">if</font> (l==0) {
+<a name="line496">496: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_INTERMEDIATE);
+<a name="line497">497: </a>    } <font color="#4169E1">else</font> {
+<a name="line498">498: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line499">499: </a>    }
+
+<a name="line501">501: </a>    <font color="#B22222">/* Solve projected problem */</font>
+<a name="line502">502: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
+<a name="line503">503: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
+
+<a name="line505">505: </a>    <font color="#B22222">/* Check convergence */</font>
+<a name="line506">506: </a>    <font color="#B22222">/* PEPSTOARpreKConvergence(pep,nv,&norm,pep->work);*/</font>
+<a name="line507">507: </a>    norm = 1.0;
+<a name="line508">508: </a>    <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,NULL,NULL,NULL,NULL,&t);
+<a name="line509">509: </a>    PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,t-pep->nconv,PetscAbsReal(beta)*norm,&k);
+<a name="line510">510: </a>    nconv = k;
+<a name="line511">511: </a>    (*pep->stopping)(pep,pep->its,pep->max_it,k,pep->nev,&pep->reason,pep->stoppingctx);
+
+<a name="line513">513: </a>    <font color="#B22222">/* Update l */</font>
+<a name="line514">514: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line515">515: </a>    <font color="#4169E1">else</font> {
+<a name="line516">516: </a>      l = PetscMax(1,(PetscInt)((nv-k)/2));
+<a name="line517">517: </a>      l = PetscMin(l,t);
+<a name="line518">518: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&a);
+<a name="line519">519: </a>      <font color="#4169E1">if</font> (*(a+ldds+k+l-1)!=0) {
+<a name="line520">520: </a>        <font color="#4169E1">if</font> (k+l<nv-1) l = l+1;
+<a name="line521">521: </a>        <font color="#4169E1">else</font> l = l-1;
+<a name="line522">522: </a>      }
+<a name="line523">523: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&a);
+<a name="line524">524: </a>    }
+<a name="line525">525: </a>    <font color="#4169E1">if</font> (!ctx->lock && l>0) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+
+<a name="line527">527: </a>    <font color="#B22222">/* Update S */</font>
+<a name="line528">528: </a>    off = pep->nconv*ldds;
+<a name="line529">529: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line530">530: </a>    PEPSTOARSupdate(S,ld,nv+2,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu);
+<a name="line531">531: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
+
+<a name="line533">533: </a>    <font color="#B22222">/* Copy last column of S */</font>
+<a name="line534">534: </a>    PetscMemcpy(S+lds*(k+l),S+lds*nv,lds*<font color="#4169E1">sizeof</font>(PetscScalar));
+
+<a name="line536">536: </a>    <font color="#4169E1">if</font> (pep->reason == PEP_CONVERGED_ITERATING) {
+<a name="line537">537: </a>      <font color="#4169E1">if</font> (breakdown) {
+<a name="line538">538: </a>        <font color="#B22222">/* Stop if breakdown */</font>
+<a name="line539">539: </a>        PetscInfo2(pep,<font color="#666666">"Breakdown STOAR method (it=%D norm=%g)\n"</font>,pep->its,(double)beta);
+<a name="line540">540: </a>        pep->reason = PEP_DIVERGED_BREAKDOWN;
+<a name="line541">541: </a>      } <font color="#4169E1">else</font> {
+<a name="line542">542: </a>        <font color="#B22222">/* Prepare the Rayleigh quotient for restart */</font>
+<a name="line543">543: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line544">544: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_T,&a);
+<a name="line545">545: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line546">546: </a>        r = a + 2*ldds;
+<a name="line547">547: </a>        <font color="#4169E1">for</font> (j=k;j<k+l;j++) {
+<a name="line548">548: </a>          r[j] = PetscRealPart(Q[nv-1+j*ldds]*beta);
+<a name="line549">549: </a>        }
+<a name="line550">550: </a>        b = a+ldds;
+<a name="line551">551: </a>        b[k+l-1] = r[k+l-1];
+<a name="line552">552: </a>        omega[k+l] = omega[nv];
+<a name="line553">553: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line554">554: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_T,&a);
+<a name="line555">555: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line556">556: </a>        <font color="#B22222">/* Truncate S */</font>
+<a name="line557">557: </a>        <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line558">558: </a>        PEPSTOARTrunc(pep,nv+2,k+l+1,work+nwu,rwork+nrwu);
+<a name="line559">559: </a>        <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line560">560: </a>      }
+<a name="line561">561: </a>    }
+
+
+<a name="line564">564: </a>    pep->nconv = k;
+<a name="line565">565: </a>    PEPMonitor(pep,pep->its,pep->nconv,pep->eigr,pep->eigi,pep->errest,nv);
+<a name="line566">566: </a>  }
+
+<a name="line568">568: </a>  <font color="#4169E1">if</font> (pep->nconv>0) {
+<a name="line569">569: </a>    <font color="#B22222">/* Truncate S */</font>
+<a name="line570">570: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+<a name="line571">571: </a>    PEPSTOARTrunc(pep,nv+2,pep->nconv,work+nwu,rwork+nrwu);
+<a name="line572">572: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(pep->ds,DS_MAT_D,&omega);
+
+<a name="line574">574: </a>    <font color="#B22222">/* Extraction */</font>
+<a name="line575">575: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
+<a name="line576">576: </a>    <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+
+<a name="line578">578: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nconv;j++) {
+<a name="line579">579: </a>      pep->eigr[j] *= pep->sfactor;
+<a name="line580">580: </a>      pep->eigi[j] *= pep->sfactor;
+<a name="line581">581: </a>    }
+<a name="line582">582: </a>  }
+<a name="line583">583: </a>  <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);
+<a name="line584">584: </a>  <a href="../../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(pep->rg);
+
+<a name="line586">586: </a>  <font color="#B22222">/* truncate Schur decomposition and change the state to raw so that</font>
+<a name="line587">587: </a><font color="#B22222">     <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line588">588: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
+<a name="line589">589: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line590">590: </a>  PetscFree2(work,rwork);
+<a name="line591">591: </a>  <font color="#4169E1">return</font>(0);
+<a name="line592">592: </a>}
+
+<a name="line596">596: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_STOAR"></a>PetscErrorCode PEPSetFromOptions_STOAR(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line597">597: </a>{
+<a name="line599">599: </a>  PetscBool      flg,lock;
+
+<a name="line602">602: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> STOAR Options"</font>);
+<a name="line603">603: </a>  PetscOptionsBool(<font color="#666666">"-pep_stoar_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>"</font>,PETSC_FALSE,&lock,&flg);
+<a name="line604">604: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line605">605: </a>    <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>(pep,lock);
+<a name="line606">606: </a>  }
+<a name="line607">607: </a>  PetscOptionsTail();
+<a name="line608">608: </a>  <font color="#4169E1">return</font>(0);
+<a name="line609">609: </a>}
+
+<a name="line613">613: </a><strong><font color="#4169E1"><a name="PEPSTOARSetLocking_STOAR"></a>static PetscErrorCode PEPSTOARSetLocking_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
+<a name="line614">614: </a>{
+<a name="line615">615: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
+
+<a name="line618">618: </a>  ctx->lock = lock;
+<a name="line619">619: </a>  <font color="#4169E1">return</font>(0);
+<a name="line620">620: </a>}
+
+<a name="line624">624: </a><font color="#B22222">/*@</font>
+<a name="line625">625: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a> - Choose between locking and non-locking variants of</font>
+<a name="line626">626: </a><font color="#B22222">   the STOAR method.</font>
+
+<a name="line628">628: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line630">630: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line631">631: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line632">632: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
+
+<a name="line634">634: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line635">635: </a><font color="#B22222">.  -pep_stoar_locking - Sets the locking flag</font>
+
+<a name="line637">637: </a><font color="#B22222">   Notes:</font>
+<a name="line638">638: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
+<a name="line639">639: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
+<a name="line640">640: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
+<a name="line641">641: </a><font color="#B22222">   non-locking variant).</font>
+
+<a name="line643">643: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line645">645: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a>()</font>
+<a name="line646">646: </a><font color="#B22222">@*/</font>
+<a name="line647">647: </a><strong><font color="#4169E1"><a name="PEPSTOARSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
+<a name="line648">648: </a>{
+
+<a name="line654">654: </a>  PetscTryMethod(pep,<font color="#666666">"PEPSTOARSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,lock));
+<a name="line655">655: </a>  <font color="#4169E1">return</font>(0);
+<a name="line656">656: </a>}
+
+<a name="line660">660: </a><strong><font color="#4169E1"><a name="PEPSTOARGetLocking_STOAR"></a>static PetscErrorCode PEPSTOARGetLocking_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
+<a name="line661">661: </a>{
+<a name="line662">662: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
+
+<a name="line665">665: </a>  *lock = ctx->lock;
+<a name="line666">666: </a>  <font color="#4169E1">return</font>(0);
+<a name="line667">667: </a>}
+
+<a name="line671">671: </a><font color="#B22222">/*@</font>
+<a name="line672">672: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a> - Gets the locking flag used in the STOAR method.</font>
+
+<a name="line674">674: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line676">676: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line677">677: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
+
+<a name="line679">679: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line680">680: </a><font color="#B22222">.  lock - the locking flag</font>
+
+<a name="line682">682: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line684">684: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPSTOARSetLocking.html#PEPSTOARSetLocking">PEPSTOARSetLocking</a>()</font>
+<a name="line685">685: </a><font color="#B22222">@*/</font>
+<a name="line686">686: </a><strong><font color="#4169E1"><a name="PEPSTOARGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPSTOARGetLocking.html#PEPSTOARGetLocking">PEPSTOARGetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
+<a name="line687">687: </a>{
+
+<a name="line693">693: </a>  PetscUseMethod(pep,<font color="#666666">"PEPSTOARGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,lock));
+<a name="line694">694: </a>  <font color="#4169E1">return</font>(0);
+<a name="line695">695: </a>}
+
+<a name="line699">699: </a><strong><font color="#4169E1"><a name="PEPView_STOAR"></a>PetscErrorCode PEPView_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line700">700: </a>{
+<a name="line702">702: </a>  PEP_TOAR      *ctx = (PEP_TOAR*)pep->data;
+<a name="line703">703: </a>  PetscBool      isascii;
+
+<a name="line706">706: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line707">707: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line708">708: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  STOAR: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
+<a name="line709">709: </a>  }
+<a name="line710">710: </a>  <font color="#4169E1">return</font>(0);
+<a name="line711">711: </a>}
+
+<a name="line715">715: </a><strong><font color="#4169E1"><a name="PEPDestroy_STOAR"></a>PetscErrorCode PEPDestroy_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line716">716: </a>{
+
+<a name="line720">720: </a>  PetscFree(pep->data);
+<a name="line721">721: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARSetLocking_C"</font>,NULL);
+<a name="line722">722: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARGetLocking_C"</font>,NULL);
+<a name="line723">723: </a>  <font color="#4169E1">return</font>(0);
+<a name="line724">724: </a>}
+
+<a name="line728">728: </a><strong><font color="#4169E1"><a name="PEPCreate_STOAR"></a>PETSC_EXTERN PetscErrorCode PEPCreate_STOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line729">729: </a>{
+<a name="line731">731: </a>  PEP_TOAR      *ctx;
+
+<a name="line734">734: </a>  PetscNewLog(pep,&ctx);
+<a name="line735">735: </a>  pep->data = (void*)ctx;
+<a name="line736">736: </a>  ctx->lock = PETSC_TRUE;
+
+<a name="line738">738: </a>  pep->ops->solve          = PEPSolve_STOAR;
+<a name="line739">739: </a>  pep->ops->setup          = PEPSetUp_STOAR;
+<a name="line740">740: </a>  pep->ops->setfromoptions = PEPSetFromOptions_STOAR;
+<a name="line741">741: </a>  pep->ops->view           = PEPView_STOAR;
+<a name="line742">742: </a>  pep->ops->destroy        = PEPDestroy_STOAR;
+<a name="line743">743: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
+<a name="line744">744: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
+<a name="line745">745: </a>  pep->ops->extractvectors = PEPExtractVectors_TOAR;
+<a name="line746">746: </a>  pep->ops->reset          = PEPReset_TOAR;
+<a name="line747">747: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARSetLocking_C"</font>,PEPSTOARSetLocking_STOAR);
+<a name="line748">748: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPSTOARGetLocking_C"</font>,PEPSTOARGetLocking_STOAR);
+<a name="line749">749: </a>  <font color="#4169E1">return</font>(0);
+<a name="line750">750: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/impls/krylov/toar/index.html b/src/pep/impls/krylov/toar/index.html
index 36d496e..cf54f0b 100644
--- a/src/pep/impls/krylov/toar/index.html
+++ b/src/pep/impls/krylov/toar/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/toar/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/toar/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/krylov/toar/makefile b/src/pep/impls/krylov/toar/makefile
index b1a6019..62ddef2 100644
--- a/src/pep/impls/krylov/toar/makefile
+++ b/src/pep/impls/krylov/toar/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/krylov/toar/makefile.html b/src/pep/impls/krylov/toar/makefile.html
index b891db8..e5d4bd5 100644
--- a/src/pep/impls/krylov/toar/makefile.html
+++ b/src/pep/impls/krylov/toar/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/toar/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:04+00:00">
+<meta name="date" content="2016-05-16T10:34:03+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/toar/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/toar/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/impls/krylov/toar/nrefine.c b/src/pep/impls/krylov/toar/nrefine.c
index 0b53f8d..52e8c87 100644
--- a/src/pep/impls/krylov/toar/nrefine.c
+++ b/src/pep/impls/krylov/toar/nrefine.c
@@ -1,9 +1,18 @@
 /*
-   Newton refinement for nonlinear eigenproblem.
+   Newton refinement for polynomial eigenproblems.
+
+   References:
+
+       [1] T. Betcke and D. Kressner, "Perturbation, extraction and refinement
+           of invariant pairs for matrix polynomials", Linear Algebra Appl.
+           435(3):514-536, 2011.
+
+       [2] C. Campos and J.E. Roman, "Parallel iterative refinement in
+           polynomial eigenvalue problems", submitted, 2015.
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -25,61 +34,59 @@
 #include <slepcblaslapack.h>
 
 typedef struct {
-  Mat          *A;
-  BV           V;
+  Mat          *A,M1;
+  BV           V,M2,M3,W;
   PetscInt     k,nmat;
-  PetscScalar  *Mm;
-  PetscScalar  *fih;
-  PetscScalar  *work;
-  Vec           w1,w2;
+  PetscScalar  *fih,*work,*M4;
+  PetscBLASInt *pM4;
+  PetscBool    compM1;
+  Vec          t;
 } FSubctx;
 
 typedef struct {
-  Mat          E[2];
+  Mat          E[2],M1;
   Vec          tN,ttN,t1,vseq;
   VecScatter   scatterctx;
-  PetscBool    computedt11;
+  PetscBool    compM1;
   PetscInt     *map0,*map1,*idxg,*idxp;
   PetscSubcomm subc;
   VecScatter   scatter_sub;
   VecScatter   *scatter_id,*scatterp_id;
   Mat          *A;
-  BV           V,W;
+  BV           V,W,M2,M3,Wt;
+  PetscScalar  *M4,*w,*wt,*d,*dt;
   Vec          t,tg,Rv,Vi,tp,tpg;
-  PetscInt     idx;
+  PetscInt     idx,*cols;
 } MatExplicitCtx;
 
 #undef __FUNCT__
 #define __FUNCT__ "MatFSMult"
 static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)
 {
+#if defined(PETSC_MISSING_LAPACK_GETRS)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GETRS - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
   FSubctx        *ctx;
-  PetscInt       i,k,nmat;
-  PetscScalar    *fih,*c,*vals,sone=1.0,zero=0.0;
-  Mat            *A;
-  PetscBLASInt   k_,lda_,one=1;
-  
+  PetscInt       k,i;
+  PetscScalar    *c;
+  PetscBLASInt   k_,one=1,info;
+
   PetscFunctionBegin;
   ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
-  fih  = ctx->fih;
+  ierr = VecCopy(x,ctx->t);CHKERRQ(ierr);
   k    = ctx->k;
-  nmat = ctx->nmat;
-  A    = ctx->A;
   c    = ctx->work;
-  vals = ctx->work+k;
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
-  ierr = PetscBLASIntCast(nmat*k,&lda_);CHKERRQ(ierr);
-  ierr = BVDotVec(ctx->V,x,c);CHKERRQ(ierr);
-  ierr = MatMult(A[0],x,y);CHKERRQ(ierr);
-  for (i=1;i<nmat;i++) {
-    PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&k_,&k_,&sone,ctx->Mm+i*k,&lda_,c,&one,&zero,vals,&one));
-    ierr = VecCopy(x,ctx->w1);CHKERRQ(ierr);
-    ierr = BVMultVec(ctx->V,-1.0,fih[i],ctx->w1,vals);CHKERRQ(ierr);
-    ierr = MatMult(A[i],ctx->w1,ctx->w2);CHKERRQ(ierr);
-    ierr = VecAXPY(y,1.0,ctx->w2);CHKERRQ(ierr);
-  }
+  ierr = MatMult(ctx->M1,x,y);CHKERRQ(ierr);
+  ierr = VecConjugate(ctx->t);CHKERRQ(ierr);
+  ierr = BVDotVec(ctx->M3,ctx->t,c);CHKERRQ(ierr);
+  for (i=0;i<k;i++) c[i] = PetscConj(c[i]);
+  PetscStackCallBLAS("LAPACKgetrs",LAPACKgetrs_("N",&k_,&one,ctx->M4,&k_,ctx->pM4,c,&k_,&info));
+  ierr = BVMultVec(ctx->M2,-1.0,1.0,y,c);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -95,7 +102,7 @@ static PetscErrorCode PEPEvaluateBasisforMatrix(PEP pep,PetscInt nm,PetscInt k,P
   PetscReal      *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat,t;
   PetscScalar    corr=0.0,alpha,beta;
   PetscBLASInt   k_,ldh_,ldfh_;
-  
+
   PetscFunctionBegin;
   ierr = PetscBLASIntCast(ldh,&ldh_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
@@ -134,18 +141,28 @@ static PetscErrorCode PEPEvaluateBasisforMatrix(PEP pep,PetscInt nm,PetscInt k,P
 
 #undef __FUNCT__
 #define __FUNCT__ "NRefSysSetup_shell"
-static PetscErrorCode NRefSysSetup_shell(PetscInt nmat,PetscReal *pcf,PetscInt k,PetscInt deg,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,PetscScalar *Mm,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12)
+static PetscErrorCode NRefSysSetup_shell(PEP pep,PetscInt k,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,FSubctx *ctx)
 {
-  PetscErrorCode ierr;
-  PetscScalar    *DHii,*Tr,*Ts,s,sone=1.0,zero=0.0;
-  PetscInt       i,d,j,lda=nmat*k;
-  PetscReal      *a=pcf,*b=pcf+nmat,*g=pcf+2*nmat;
-  PetscBLASInt   k_,lda_,lds_,info;
-  
+#if defined(PETSC_MISSING_LAPACK_GESV)
   PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESV - Lapack routine is unavailable");
+#else
+  PetscErrorCode    ierr;
+  PetscScalar       *DHii,*T12,*Tr,*Ts,*array,s,ss,sone=1.0,zero=0.0,*M4=ctx->M4,t,*v,*T;
+  const PetscScalar *m3,*m2;
+  PetscInt          i,d,j,nmat=pep->nmat,lda=nmat*k,deg=nmat-1,nloc;
+  PetscReal         *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
+  PetscBLASInt      k_,lda_,lds_,nloc_,one=1,info;
+  Mat               *A=ctx->A,Mk,M1=ctx->M1,P;
+  BV                V=ctx->V,M2=ctx->M2,M3=ctx->M3,W=ctx->W;
+  MatStructure      str;
+  Vec               vc;
+
+  PetscFunctionBegin;
+  ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
+  ierr = PetscMalloc3(nmat*k*k,&T12,k*k,&Tr,PetscMax(k*k,nmat),&Ts);CHKERRQ(ierr);
   DHii = T12;
   ierr = PetscMemzero(DHii,k*k*nmat*sizeof(PetscScalar));CHKERRQ(ierr);
-  ierr = PetscMalloc2(k*k,&Tr,k*k,&Ts);CHKERRQ(ierr);
   for (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
   for (d=2;d<nmat;d++) {
     for (j=0;j<k;j++) {
@@ -154,6 +171,15 @@ static PetscErrorCode NRefSysSetup_shell(PetscInt nmat,PetscReal *pcf,PetscInt k
       }
     }
   }
+  /* T11 */
+  if (!ctx->compM1) {
+    ierr = MatCopy(A[0],M1,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = PEPEvaluateBasis(pep,h,0,Ts,NULL);CHKERRQ(ierr);
+    for (j=1;j<nmat;j++) {
+      ierr = MatAXPY(M1,Ts[j],A[j],str);CHKERRQ(ierr);
+    }
+  }
+
   /* T22 */
   ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
@@ -161,69 +187,102 @@ static PetscErrorCode NRefSysSetup_shell(PetscInt nmat,PetscReal *pcf,PetscInt k
   PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
   for (i=1;i<deg;i++) {
     PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
-    s = (i==1)?0.0:1.0; 
-    PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,T22,&k_));
+    s = (i==1)?0.0:1.0;
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,M4,&k_));
+  }
+  for (i=0;i<k;i++) for (j=0;j<i;j++) { t=M4[i+j*k];M4[i+j*k]=M4[j+i*k];M4[j+i*k]=t; }
+
+  /* T12 */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&Mk);CHKERRQ(ierr);
+  for (i=1;i<nmat;i++) {
+    ierr = MatDenseGetArray(Mk,&array);CHKERRQ(ierr);
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,array,&k_));
+    ierr = MatDenseRestoreArray(Mk,&array);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(W,0,k);CHKERRQ(ierr);
+    ierr = BVMult(W,1.0,0.0,V,Mk);CHKERRQ(ierr);
+    if (i==1) {
+      ierr = BVMatMult(W,A[i],M2);CHKERRQ(ierr);
+    } else {
+      ierr = BVMatMult(W,A[i],M3);CHKERRQ(ierr); /* using M3 as work space */
+      ierr = BVMult(M2,1.0,1.0,M3,NULL);CHKERRQ(ierr);
+    }
   }
 
   /* T21 */
+  ierr = MatDenseGetArray(Mk,&array);CHKERRQ(ierr);
   for (i=1;i<deg;i++) {
-    s = (i==1)?0.0:1.0; 
-    PetscStackCallBLAS("BLASgemm",BLASgemm_("C","C",&k_,&k_,&k_,fh+i,fH+i*k,&lda_,S,&lds_,&s,T21,&k_));
-  }
-  /* Mm */
-  ierr = PetscMemcpy(Tr,T21,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
-  PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&k_,&k_,T22,&k_,p22,Tr,&k_,&info));
-  
-  s = 0.0;
-  for (i=1;i<nmat;i++) {
-    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,Ts,&k_));    
-    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,Ts,&k_,Tr,&k_,&s,Mm+i*k,&lda_));
-    for (j=0;j<k;j++) {
-      ierr = PetscMemcpy(T12+i*k+j*lda,Ts+j*k,k*sizeof(PetscScalar));CHKERRQ(ierr);
-    }  
+    s = (i==1)?0.0:1.0;
+    ss = PetscConj(fh[i]);
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&ss,S,&lds_,fH+i*k,&lda_,&s,array,&k_));
   }
-  ierr = PetscFree2(Tr,Ts);CHKERRQ(ierr);
-  PetscFunctionReturn(0); 
+  ierr = MatDenseRestoreArray(Mk,&array);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(M3,0,k);CHKERRQ(ierr);
+  ierr = BVMult(M3,1.0,0.0,V,Mk);CHKERRQ(ierr);
+  for (i=0;i<k;i++) {
+    ierr = BVGetColumn(M3,i,&vc);CHKERRQ(ierr);
+    ierr = VecConjugate(vc);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(M3,i,&vc);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&Mk);CHKERRQ(ierr);
+  ierr = PetscFree3(T12,Tr,Ts);CHKERRQ(ierr);
+
+  ierr = VecGetLocalSize(ctx->t,&nloc);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(nloc,&nloc_);CHKERRQ(ierr);
+  ierr = PetscMalloc1(nloc*k,&T);CHKERRQ(ierr);
+  ierr = KSPGetOperators(pep->refineksp,NULL,&P);CHKERRQ(ierr);
+  if (!ctx->compM1) { ierr = MatCopy(ctx->M1,P,SAME_NONZERO_PATTERN);CHKERRQ(ierr); }
+  ierr = BVGetArrayRead(ctx->M2,&m2);CHKERRQ(ierr);
+  ierr = BVGetArrayRead(ctx->M3,&m3);CHKERRQ(ierr);
+  ierr = VecGetArray(ctx->t,&v);CHKERRQ(ierr);
+  for (i=0;i<nloc;i++) for (j=0;j<k;j++) T[j+i*k] = m3[i+j*nloc];
+  PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&k_,&nloc_,ctx->M4,&k_,ctx->pM4,T,&k_,&info));
+  for (i=0;i<nloc;i++) v[i] = BLASdot_(&k_,m2+i,&nloc_,T+i*k,&one);
+  ierr = VecRestoreArray(ctx->t,&v);CHKERRQ(ierr);
+  ierr = BVRestoreArrayRead(ctx->M2,&m2);CHKERRQ(ierr);
+  ierr = BVRestoreArrayRead(ctx->M3,&m3);CHKERRQ(ierr);
+  ierr = MatDiagonalSet(P,ctx->t,ADD_VALUES);CHKERRQ(ierr);
+  ierr = PetscFree(T);CHKERRQ(ierr);
+  ierr = KSPSetUp(pep->refineksp);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NRefSysSolve_shell"
-static PetscErrorCode NRefSysSolve_shell(Mat *A,KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12,BV V,Vec dVi,PetscScalar *dHi,BV W,Vec t,PetscScalar *work,PetscInt lw)
+static PetscErrorCode NRefSysSolve_shell(KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,Vec dVi,PetscScalar *dHi)
 {
-  PetscErrorCode ierr;
-  PetscScalar    *t0,*t1,zero=0.0,none=-1.0,sone=1.0;
-  PetscBLASInt   k_,one=1,info,lda_;
-  PetscInt       i,lda=nmat*k,nwu=0;
-  Vec            w;
+#if defined(PETSC_MISSING_LAPACK_GETRS)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GETRS - Lapack routine is unavailable");
+#else
+  PetscErrorCode     ierr;
+  PetscScalar        *t0;
+  PetscBLASInt       k_,one=1,info,lda_;
+  PetscInt           i,lda=nmat*k;
+  Mat                M;
+  FSubctx            *ctx;
   KSPConvergedReason reason;
 
   PetscFunctionBegin;
-  t0 = work+nwu;
-  nwu += k;
-  t1 = work+nwu;
-  nwu += k;
+  ierr = KSPGetOperators(ksp,&M,NULL);CHKERRQ(ierr);
+  ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
+  ierr = PetscCalloc1(k,&t0);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(lda,&lda_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
   for (i=0;i<k;i++) t0[i] = Rh[i];
-  PetscStackCallBLAS("LAPACKgetrs",LAPACKgetrs_("N",&k_,&one,T22,&k_,p22,t0,&k_,&info));
-  for (i=1;i<nmat;i++) {
-    PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&k_,&k_,&sone,T12+i*k,&lda_,t0,&one,&zero,t1,&one));
-    ierr = BVMultVec(V,1.0,0.0,t,t1);CHKERRQ(ierr);
-    ierr = BVGetColumn(W,i,&w);CHKERRQ(ierr);
-    ierr = MatMult(A[i],t,w);CHKERRQ(ierr);
-    ierr = BVRestoreColumn(W,i,&w);CHKERRQ(ierr);
-  }
-  for (i=0;i<nmat-1;i++) t1[i]=-1.0;
-  ierr = BVSetActiveColumns(W,1,nmat);CHKERRQ(ierr);
-  ierr = BVMultVec(W,1.0,1.0,Rv,t1);CHKERRQ(ierr);
+  PetscStackCallBLAS("LAPACKgetrs",LAPACKgetrs_("N",&k_,&one,ctx->M4,&k_,ctx->pM4,t0,&k_,&info));
+  ierr = BVMultVec(ctx->M2,-1.0,1.0,Rv,t0);CHKERRQ(ierr);
   ierr = KSPSolve(ksp,Rv,dVi);CHKERRQ(ierr);
   ierr = KSPGetConvergedReason(ksp,&reason);CHKERRQ(ierr);
   if (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,"KSP did not converge (reason=%s)",KSPConvergedReasons[reason]);
-  ierr = BVDotVec(V,dVi,t1);CHKERRQ(ierr);
-  PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&k_,&k_,&none,T21,&k_,t1,&one,&zero,dHi,&one));
-  for (i=0;i<k;i++) dHi[i] += Rh[i];
-  PetscStackCallBLAS("LAPACKgetrs",LAPACKgetrs_("N",&k_,&one,T22,&k_,p22,dHi,&k_,&info));
+  ierr = VecConjugate(dVi);CHKERRQ(ierr);
+  ierr = BVDotVec(ctx->M3,dVi,dHi);CHKERRQ(ierr);
+  ierr = VecConjugate(dVi);CHKERRQ(ierr);
+  for (i=0;i<k;i++) dHi[i] = Rh[i]-PetscConj(dHi[i]);
+  PetscStackCallBLAS("LAPACKgetrs",LAPACKgetrs_("N",&k_,&one,ctx->M4,&k_,ctx->pM4,dHi,&k_,&info));
+  ierr = PetscFree(t0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -231,19 +290,18 @@ static PetscErrorCode NRefSysSolve_shell(Mat *A,KSP ksp,PetscInt nmat,Vec Rv,Pet
 /*
    Computes the residual P(H,V*S)*e_j for the polynomial
 */
-static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,BV V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,BV dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,BV W,Vec t,PetscScalar *work,PetscInt lw)
+static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,BV V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,BV dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,BV W,Vec t)
 {
   PetscErrorCode ierr;
   PetscScalar    *DS0,*DS1,*F,beta=0.0,sone=1.0,none=-1.0,tt=0.0,*h,zero=0.0,*Z,*c0;
   PetscReal      *a=pcf,*b=pcf+nmat,*g=b+nmat;
-  PetscInt       i,ii,jj,nwu=0,lda;
+  PetscInt       i,ii,jj,lda;
   PetscBLASInt   lda_,k_,ldh_,lds_,nmat_,k2_,krds_,j_,one=1;
   Mat            M0;
   Vec            w;
-  
+
   PetscFunctionBegin;
-  h = work+nwu;
-  nwu += k*nmat;
+  ierr = PetscMalloc4(k*nmat,&h,k*k,&DS0,k*k,&DS1,k*k,&Z);CHKERRQ(ierr);
   lda = k*nmat;
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
@@ -262,19 +320,13 @@ static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt
     ierr = BVGetColumn(W,i,&w);CHKERRQ(ierr);
     ierr = MatMult(A[i],w,t);CHKERRQ(ierr);
     ierr = BVRestoreColumn(W,i,&w);CHKERRQ(ierr);
-    ierr = VecAXPY(Rv,1.0,t);
+    ierr = VecAXPY(Rv,1.0,t);CHKERRQ(ierr);
   }
   /* Update right-hand side */
   if (j) {
-    DS0 = work+nwu;
-    nwu += k*k;
-    DS1 = work+nwu;
-    nwu += k*k;
-    ierr = PetscBLASIntCast(ldh,&ldh_);CHKERRQ(ierr); 
-    Z = work+nwu;
-    nwu += k*k;
-    ierr = PetscMemzero(Z,k*k*sizeof(PetscScalar));
-    ierr = PetscMemzero(DS0,k*k*sizeof(PetscScalar));
+    ierr = PetscBLASIntCast(ldh,&ldh_);CHKERRQ(ierr);
+    ierr = PetscMemzero(Z,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
+    ierr = PetscMemzero(DS0,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
     ierr = PetscMemcpy(Z+(j-1)*k,dH+(j-1)*k,k*sizeof(PetscScalar));CHKERRQ(ierr);
     /* Update DfH */
     for (i=1;i<nmat;i++) {
@@ -290,18 +342,18 @@ static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt
       } else {
         ierr = PetscMemzero(DS1,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
         for (ii=0;ii<k;ii++) DS1[ii+(j-1)*k] = Z[ii+(j-1)*k]/a[0];
-      } 
+      }
       for (jj=j;jj<k;jj++) {
         for (ii=0;ii<k;ii++) DfH[k*i+ii+jj*lda] += DS1[ii+jj*k];
       }
     }
     for (ii=0;ii<k;ii++) H[ii+ii*ldh] += tt;
     /* Update right-hand side */
-    ierr = PetscBLASIntCast(2*k,&k2_);CHKERRQ(ierr); 
+    ierr = PetscBLASIntCast(2*k,&k2_);CHKERRQ(ierr);
     ierr = PetscBLASIntCast(j,&j_);CHKERRQ(ierr);
     ierr = PetscBLASIntCast(k+rds,&krds_);CHKERRQ(ierr);
     c0 = DS0;
-    ierr = PetscMemzero(Rh,k*sizeof(PetscScalar));
+    ierr = PetscMemzero(Rh,k*sizeof(PetscScalar));CHKERRQ(ierr);
     for (i=0;i<nmat;i++) {
       PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&krds_,&j_,&sone,dVS,&k2_,fH+j*lda+i*k,&one,&zero,h,&one));
       PetscStackCallBLAS("BLASgemv",BLASgemv_("N",&k_,&k_,&sone,S,&lds_,DfH+i*k+j*lda,&one,&sone,h,&one));
@@ -316,59 +368,221 @@ static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt
         PetscStackCallBLAS("BLASgemv",BLASgemv_("C",&k_,&k_,&none,fH+i*k,&lda_,c0,&one,&sone,Rh,&one));
       }
     }
-     
+
     for (i=0;i<nmat;i++) h[i] = -1.0;
     ierr = BVMultVec(W,1.0,1.0,Rv,h);CHKERRQ(ierr);
   }
+  ierr = PetscFree4(h,DS0,DS1,Z);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NRefSysIter_shell"
-static PetscErrorCode NRefSysIter_shell(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,BV W,Vec t,PetscScalar *work,PetscInt lwork)
+#define __FUNCT__ "NRefSysSolve_mbe"
+static PetscErrorCode NRefSysSolve_mbe(PetscInt k,PetscInt sz,BV W,PetscScalar *w,BV Wt,PetscScalar *wt,PetscScalar *d,PetscScalar *dt,KSP ksp,BV T2,BV T3 ,PetscScalar *T4,PetscBool trans,Vec x1,PetscScalar *x2,Vec sol1,PetscScalar *sol2,Vec vw)
+{
+  PetscErrorCode     ierr;
+  PetscInt           i,j,incf,incc;
+  PetscScalar        *y,*g,*xx2,*ww,y2,*dd;
+  Vec                v,t,xx1;
+  BV                 WW,T;
+  KSPConvergedReason reason;
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc3(sz,&y,sz,&g,k,&xx2);CHKERRQ(ierr);
+  if (trans) {
+    WW = W; ww = w; dd = d; T = T3; incf = 0; incc = 1;
+  } else {
+    WW = Wt; ww = wt; dd = dt; T = T2; incf = 1; incc = 0;
+  }
+  xx1 = vw;
+  ierr = VecCopy(x1,xx1);CHKERRQ(ierr);
+  ierr = PetscMemcpy(xx2,x2,sz*sizeof(PetscScalar));CHKERRQ(ierr);
+  ierr = PetscMemzero(sol2,k*sizeof(PetscScalar));CHKERRQ(ierr);
+  for (i=sz-1;i>=0;i--) {
+    ierr = BVGetColumn(WW,i,&v);CHKERRQ(ierr);
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = VecDot(xx1,v,y+i);CHKERRQ(ierr);
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(WW,i,&v);CHKERRQ(ierr);
+    for (j=0;j<i;j++) y[i] += ww[j+i*k]*xx2[j];
+    y[i] = -(y[i]-xx2[i])/dd[i];
+    ierr = BVGetColumn(T,i,&t);CHKERRQ(ierr);
+    ierr = VecAXPY(xx1,-y[i],t);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(T,i,&t);CHKERRQ(ierr);
+    for(j=0;j<=i;j++) xx2[j] -= y[i]*T4[j*incf+incc*i+(i*incf+incc*j)*k];
+    g[i] = xx2[i];
+  }
+  if (trans) {
+    ierr = KSPSolveTranspose(ksp,xx1,sol1);CHKERRQ(ierr);
+    ierr = KSPGetConvergedReason(ksp,&reason);CHKERRQ(ierr);
+    if (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,"KSP did not converge (reason=%s)",KSPConvergedReasons[reason]);
+  } else {
+    ierr = KSPSolve(ksp,xx1,sol1);CHKERRQ(ierr);
+    ierr = KSPGetConvergedReason(ksp,&reason);CHKERRQ(ierr);
+    if (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,"KSP did not converge (reason=%s)",KSPConvergedReasons[reason]);
+  }
+  if (trans) {
+    WW = Wt; ww = wt; dd = dt; T = T2; incf = 1; incc = 0;
+  } else {
+    WW = W; ww = w; dd = d; T = T3; incf = 0; incc = 1;
+  }
+  for (i=0;i<sz;i++) {
+    ierr = BVGetColumn(T,i,&t);CHKERRQ(ierr);
+    ierr = VecConjugate(t);CHKERRQ(ierr);
+    ierr = VecDot(sol1,t,&y2);CHKERRQ(ierr);
+    ierr = VecConjugate(t);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(T,i,&t);CHKERRQ(ierr);
+    for (j=0;j<i;j++) y2 += sol2[j]*T4[j*incf+incc*i+(i*incf+incc*j)*k];
+    y2 = (g[i]-y2)/dd[i];
+    ierr = BVGetColumn(WW,i,&v);CHKERRQ(ierr);
+    ierr = VecAXPY(sol1,-y2,v);CHKERRQ(ierr);
+    for (j=0;j<i;j++) sol2[j] -= ww[j+i*k]*y2;
+    sol2[i] = y[i]+y2;
+    ierr = BVRestoreColumn(WW,i,&v);CHKERRQ(ierr);
+  }
+  ierr = PetscFree3(y,g,xx2);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "NRefSysSetup_mbe"
+static PetscErrorCode NRefSysSetup_mbe(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx)
 {
   PetscErrorCode ierr;
-  PetscInt       nwu=0,nmat=pep->nmat,deg=nmat-1,i;
-  PetscScalar    *T22,*T21,*T12;
-  PetscBLASInt   *p22;
-  FSubctx        *ctx;
-  Mat            M,*A;
+  PetscInt       i,j,l,nmat=pep->nmat,lda=nmat*k,deg=nmat-1;
+  Mat            M1=matctx->M1,*A,*At,Mk;
+  PetscReal      *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
+  PetscScalar    s,ss,*DHii,*T12,*array,*Ts,*Tr,*M4=matctx->M4,sone=1.0,zero=0.0;
+  PetscScalar    *w=matctx->w,*wt=matctx->wt,*d=matctx->d,*dt=matctx->dt;
+  PetscBLASInt   lds_,lda_,k_;
+  MatStructure   str;
   PetscBool      flg;
+  BV             M2=matctx->M2,M3=matctx->M3,W=matctx->W,Wt=matctx->Wt;
+  Vec            vc,vc2;
 
   PetscFunctionBegin;
+  ierr = PetscMalloc3(nmat*k*k,&T12,k*k,&Tr,PetscMax(k*k,nmat),&Ts);CHKERRQ(ierr);
+  ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
   ierr = STGetTransform(pep->st,&flg);CHKERRQ(ierr);
   if (flg) {
-    ierr = PetscMalloc1(pep->nmat,&A);CHKERRQ(ierr);
+    ierr = PetscMalloc1(pep->nmat,&At);CHKERRQ(ierr);
     for (i=0;i<pep->nmat;i++) {
-      ierr = STGetTOperators(pep->st,i,&A[i]);CHKERRQ(ierr);
+      ierr = STGetTOperators(pep->st,i,&At[i]);CHKERRQ(ierr);
     }
-  } else A = pep->A; 
-  ierr = PetscMalloc1(k,&p22);CHKERRQ(ierr);
-  T22 = work+nwu;
-  nwu += k*k;
-  T21 = work+nwu;
-  nwu += k*k;
-  T12 = work+nwu;
-  nwu += nmat*k*k;
-  ierr = KSPGetOperators(ksp,&M,NULL);CHKERRQ(ierr);
-  ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
-  /* Update the matrix for the system */
-  ierr = NRefSysSetup_shell(nmat,pep->pbc,k,deg,fH,S,lds,fh,h,ctx->Mm,T22,p22,T21,T12);CHKERRQ(ierr);
-  /* Solve system */
-  ierr = NRefSysSolve_shell(A,ksp,nmat,Rv,Rh,k,T22,p22,T21,T12,V,dVi,dHi,W,t,work+nwu,lwork-nwu);CHKERRQ(ierr);
-  ierr = PetscFree(p22);CHKERRQ(ierr);
+  } else At = pep->A;
+  if (matctx->subc) A = matctx->A;
+  else A = At;
+  /* Form the explicit system matrix */
+  DHii = T12;
+  ierr = PetscMemzero(DHii,k*k*nmat*sizeof(PetscScalar));CHKERRQ(ierr);
+  for (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
+  for (l=2;l<nmat;l++) {
+    for (j=0;j<k;j++) {
+      for (i=0;i<k;i++) {
+        DHii[l*k+i+j*lda] = ((h-b[l-1])*DHii[(l-1)*k+i+j*lda]+fH[(l-1)*k+i+j*lda]-g[l-1]*DHii[(l-2)*k+i+j*lda])/a[l-1];
+      }
+    }
+  }
+
+  /* T11 */
+  if (!matctx->compM1) {
+    ierr = MatCopy(A[0],M1,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = PEPEvaluateBasis(pep,h,0,Ts,NULL);CHKERRQ(ierr);
+    for (j=1;j<nmat;j++) {
+      ierr = MatAXPY(M1,Ts[j],A[j],str);CHKERRQ(ierr);
+    }
+  }
+
+  /* T22 */
+  ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(lda,&lda_);CHKERRQ(ierr);
+  PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
+  for (i=1;i<deg;i++) {
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
+    s = (i==1)?0.0:1.0;
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,M4,&k_));
+  }
+
+  /* T12 */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&Mk);CHKERRQ(ierr);
+  for (i=1;i<nmat;i++) {
+    ierr = MatDenseGetArray(Mk,&array);CHKERRQ(ierr);
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,array,&k_));
+    ierr = MatDenseRestoreArray(Mk,&array);CHKERRQ(ierr);
+    ierr = BVSetActiveColumns(W,0,k);CHKERRQ(ierr);
+    ierr = BVMult(W,1.0,0.0,V,Mk);CHKERRQ(ierr);
+    if (i==1) {
+      ierr = BVMatMult(W,A[i],M2);CHKERRQ(ierr);
+    } else {
+      ierr = BVMatMult(W,A[i],M3);CHKERRQ(ierr); /* using M3 as work space */
+      ierr = BVMult(M2,1.0,1.0,M3,NULL);CHKERRQ(ierr);
+    }
+  }
+
+  /* T21 */
+  ierr = MatDenseGetArray(Mk,&array);CHKERRQ(ierr);
+  for (i=1;i<deg;i++) {
+    s = (i==1)?0.0:1.0;
+    ss = PetscConj(fh[i]);
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&ss,S,&lds_,fH+i*k,&lda_,&s,array,&k_));
+  }
+  ierr = MatDenseRestoreArray(Mk,&array);CHKERRQ(ierr);
+  ierr = BVSetActiveColumns(M3,0,k);CHKERRQ(ierr);
+  ierr = BVMult(M3,1.0,0.0,V,Mk);CHKERRQ(ierr);
+  for (i=0;i<k;i++) {
+    ierr = BVGetColumn(M3,i,&vc);CHKERRQ(ierr);
+    ierr = VecConjugate(vc);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(M3,i,&vc);CHKERRQ(ierr);
+  }
+
+  ierr = KSPSetOperators(ksp,M1,M1);CHKERRQ(ierr);
+  ierr = KSPSetUp(ksp);CHKERRQ(ierr);
+  ierr = MatDestroy(&Mk);CHKERRQ(ierr);
+
+  /* Set up for BEMW */
+  for (i=0;i<k;i++) {
+    ierr = BVGetColumn(M2,i,&vc);CHKERRQ(ierr);
+    ierr = BVGetColumn(W,i,&vc2);CHKERRQ(ierr);
+    ierr = NRefSysSolve_mbe(k,i,W,w,Wt,wt,d,dt,ksp,M2,M3,M4,PETSC_FALSE,vc,M4+i*k,vc2,w+i*k,matctx->t);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(M2,i,&vc);CHKERRQ(ierr);
+    ierr = BVGetColumn(M3,i,&vc);CHKERRQ(ierr);
+    ierr = VecConjugate(vc);CHKERRQ(ierr);
+    ierr = VecDot(vc2,vc,&d[i]);CHKERRQ(ierr);
+    ierr = VecConjugate(vc);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(M3,i,&vc);CHKERRQ(ierr);
+    for (j=0;j<i;j++) d[i] += M4[i+j*k]*w[j+i*k];
+    d[i] = M4[i+i*k]-d[i];
+    ierr = BVRestoreColumn(W,i,&vc2);CHKERRQ(ierr);
+
+    ierr = BVGetColumn(M3,i,&vc);CHKERRQ(ierr);
+    ierr = BVGetColumn(Wt,i,&vc2);CHKERRQ(ierr);
+    for (j=0;j<=i;j++) Ts[j] = M4[i+j*k];
+    ierr = NRefSysSolve_mbe(k,i,W,w,Wt,wt,d,dt,ksp,M2,M3,M4,PETSC_TRUE,vc,Ts,vc2,wt+i*k,matctx->t);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(M3,i,&vc);CHKERRQ(ierr);
+    ierr = BVGetColumn(M2,i,&vc);CHKERRQ(ierr);
+    ierr = VecConjugate(vc2);CHKERRQ(ierr);
+    ierr = VecDot(vc,vc2,&dt[i]);CHKERRQ(ierr);
+    ierr = VecConjugate(vc2);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(M2,i,&vc);CHKERRQ(ierr);
+    for (j=0;j<i;j++) dt[i] += M4[j+i*k]*wt[j+i*k];
+    dt[i] = M4[i+i*k]-dt[i];
+    ierr = BVRestoreColumn(Wt,i,&vc2);CHKERRQ(ierr);
+  }
+
   if (flg) {
-    ierr = PetscFree(A);CHKERRQ(ierr);
+    ierr = PetscFree(At);CHKERRQ(ierr);
   }
+  ierr = PetscFree3(T12,Tr,Ts);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NRefSysSetup_explicit"
-static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx,BV W,PetscScalar *work,PetscInt lwork)
+static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,BV V,MatExplicitCtx *matctx,BV W)
 {
   PetscErrorCode    ierr;
-  PetscInt          nwu=0,i,j,d,n,n0,m0,n1,m1,nmat=pep->nmat,lda=nmat*k,deg=nmat-1;
+  PetscInt          i,j,d,n,n0,m0,n1,m1,nmat=pep->nmat,lda=nmat*k,deg=nmat-1;
   PetscInt          *idxg=matctx->idxg,*idxp=matctx->idxp,idx,ncols;
   Mat               M,*E=matctx->E,*A,*At,Mk,Md;
   PetscReal         *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
@@ -379,18 +593,9 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
   MatStructure      str;
   Vec               vc,vc0;
   PetscBool         flg;
-  
+
   PetscFunctionBegin;
-  T22 = work+nwu;
-  nwu += k*k;
-  T21 = work+nwu;
-  nwu += k*k;
-  T12 = work+nwu;
-  nwu += nmat*k*k;
-  Tr = work+nwu;
-  nwu += k*k;
-  Ts = work+nwu;
-  nwu += k*k;
+  ierr = PetscMalloc5(k*k,&T22,k*k,&T21,nmat*k*k,&T12,k*k,&Tr,k*k,&Ts);CHKERRQ(ierr);
   ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
   ierr = KSPGetOperators(ksp,&M,NULL);CHKERRQ(ierr);
   ierr = MatGetOwnershipRange(E[1],&n1,&m1);CHKERRQ(ierr);
@@ -403,12 +608,12 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
     for (i=0;i<pep->nmat;i++) {
       ierr = STGetTOperators(pep->st,i,&At[i]);CHKERRQ(ierr);
     }
-  } else At = pep->A; 
+  } else At = pep->A;
   if (matctx->subc) A = matctx->A;
   else A = At;
   /* Form the explicit system matrix */
   DHii = T12;
-  ierr = PetscMemzero(DHii,k*k*nmat*sizeof(PetscScalar));CHKERRQ(ierr);  
+  ierr = PetscMemzero(DHii,k*k*nmat*sizeof(PetscScalar));CHKERRQ(ierr);
   for (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
   for (d=2;d<nmat;d++) {
     for (j=0;j<k;j++) {
@@ -419,7 +624,7 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
   }
 
   /* T11 */
-  if (!matctx->computedt11) {
+  if (!matctx->compM1) {
     ierr = MatCopy(A[0],E[0],DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
     ierr = PEPEvaluateBasis(pep,h,0,Ts,NULL);CHKERRQ(ierr);
     for (j=1;j<nmat;j++) {
@@ -443,7 +648,7 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
   PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
   for (i=1;i<deg;i++) {
     PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
-    s = (i==1)?0.0:1.0; 
+    s = (i==1)?0.0:1.0;
     PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,T22,&k_));
   }
   for (j=0;j<k;j++) idxp[j] = matctx->map1[j];
@@ -467,19 +672,19 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
   for (i=0;i<k;i++) {
     ierr = BVGetColumn(W,i,&vc);CHKERRQ(ierr);
     ierr = VecConjugate(vc);CHKERRQ(ierr);
-    ierr = VecGetArrayRead(vc,&carray);
+    ierr = VecGetArrayRead(vc,&carray);CHKERRQ(ierr);
     idx = matctx->map1[i];
     ierr = MatSetValues(M,1,&idx,m0-n0,matctx->map0+n0,carray,INSERT_VALUES);CHKERRQ(ierr);
     ierr = VecRestoreArrayRead(vc,&carray);CHKERRQ(ierr);
     ierr = BVRestoreColumn(W,i,&vc);CHKERRQ(ierr);
   }
 
-  /* T12 */  
+  /* T12 */
   for (i=1;i<nmat;i++) {
-    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,Ts,&k_));    
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,Ts,&k_));
     for (j=0;j<k;j++) {
       ierr = PetscMemcpy(T12+i*k+j*lda,Ts+j*k,k*sizeof(PetscScalar));CHKERRQ(ierr);
-    }  
+    }
   }
   ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,nmat-1,NULL,&Md);CHKERRQ(ierr);
   for (i=0;i<nmat;i++) ts[i] = 1.0;
@@ -501,7 +706,7 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
     ierr = BVMultVec(W,1.0,0.0,vc0,ts);CHKERRQ(ierr);
     ierr = VecGetArrayRead(vc0,&carray);CHKERRQ(ierr);
     idx = matctx->map1[j];
-    ierr = MatSetValues(M,m0-n0,matctx->map0+n0,1,&idx,carray,INSERT_VALUES);CHKERRQ(ierr);   
+    ierr = MatSetValues(M,m0-n0,matctx->map0+n0,1,&idx,carray,INSERT_VALUES);CHKERRQ(ierr);
     ierr = VecRestoreArrayRead(vc0,&carray);CHKERRQ(ierr);
     ierr = BVRestoreColumn(W,0,&vc0);CHKERRQ(ierr);
   }
@@ -515,23 +720,25 @@ static PetscErrorCode NRefSysSetup_explicit(PEP pep,PetscInt k,KSP ksp,PetscScal
   if (flg) {
     ierr = PetscFree(At);CHKERRQ(ierr);
   }
+  ierr = PetscFree5(T22,T21,T12,Tr,Ts);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
- 
+
 #undef __FUNCT__
 #define __FUNCT__ "NRefSysSolve_explicit"
 static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScalar *Rh,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx)
 {
-  PetscErrorCode    ierr;
-  PetscInt          n0,m0,n1,m1,i;
-  PetscScalar       *arrayV;
-  const PetscScalar *array;
+  PetscErrorCode     ierr;
+  PetscInt           n0,m0,n1,m1,i;
+  PetscScalar        *arrayV;
+  const PetscScalar  *array;
   KSPConvergedReason reason;
 
   PetscFunctionBegin;
   ierr = MatGetOwnershipRange(matctx->E[1],&n1,&m1);CHKERRQ(ierr);
   ierr = MatGetOwnershipRange(matctx->E[0],&n0,&m0);CHKERRQ(ierr);
-  /* Right side */  
+
+  /* Right side */
   ierr = VecGetArrayRead(Rv,&array);CHKERRQ(ierr);
   ierr = VecSetValues(matctx->tN,m0-n0,matctx->map0+n0,array,INSERT_VALUES);CHKERRQ(ierr);
   ierr = VecRestoreArrayRead(Rv,&array);CHKERRQ(ierr);
@@ -543,8 +750,8 @@ static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScala
   ierr = KSPSolve(ksp,matctx->tN,matctx->ttN);CHKERRQ(ierr);
   ierr = KSPGetConvergedReason(ksp,&reason);CHKERRQ(ierr);
   if (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,"KSP did not converge (reason=%s)",KSPConvergedReasons[reason]);
- 
- /* Retrieve solution */
+
+  /* Retrieve solution */
   ierr = VecGetArray(dVi,&arrayV);CHKERRQ(ierr);
   ierr = VecGetArrayRead(matctx->ttN,&array);CHKERRQ(ierr);
   ierr = PetscMemcpy(arrayV,array,(m0-n0)*sizeof(PetscScalar));CHKERRQ(ierr);
@@ -564,29 +771,58 @@ static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScala
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "NRefSysIter_explicit"
-static PetscErrorCode NRefSysIter_explicit(PetscInt i,PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,BV W,PetscScalar *work,PetscInt lwork)
+#define __FUNCT__ "NRefSysIter"
+static PetscErrorCode NRefSysIter(PetscInt i,PEP pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,BV V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,BV W)
 {
   PetscErrorCode    ierr;
   PetscInt          j,m,lda=pep->nmat*k,n0,m0,idx;
+  PetscMPIInt       root,len;
   PetscScalar       *array2,h;
   const PetscScalar *array;
   Vec               R,Vi;
- 
+  FSubctx           *ctx;
+  Mat               M;
+
   PetscFunctionBegin;
-  if (!matctx->subc) {
+  if (!matctx || !matctx->subc) {
     for (j=0;j<pep->nmat;j++) fh[j] = fH[j*k+i+i*lda];
     h   = H[i+i*ldh];
     idx = i;
     R   = Rv;
     Vi  = dVi;
-    ierr = NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,V,matctx,W,work,lwork);CHKERRQ(ierr);
+    switch (pep->scheme) {
+    case PEP_REFINE_SCHEME_EXPLICIT:
+      ierr = NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,V,matctx,W);CHKERRQ(ierr);
+      matctx->compM1 = PETSC_FALSE;
+      break;
+    case PEP_REFINE_SCHEME_MBE:
+      ierr = NRefSysSetup_mbe(pep,k,ksp,fH,S,lds,fh,h,V,matctx);CHKERRQ(ierr);
+      matctx->compM1 = PETSC_FALSE;
+      break;
+    case PEP_REFINE_SCHEME_SCHUR:
+      ierr = KSPGetOperators(ksp,&M,NULL);CHKERRQ(ierr);
+      ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
+      ierr = NRefSysSetup_shell(pep,k,fH,S,lds,fh,h,ctx);CHKERRQ(ierr);
+      ctx->compM1 = PETSC_FALSE;
+      break;
+    }
   } else {
     if (i%matctx->subc->n==0 && (idx=i+matctx->subc->color)<k) {
       for (j=0;j<pep->nmat;j++) fh[j] = fH[j*k+idx+idx*lda];
       h = H[idx+idx*ldh];
       matctx->idx = idx;
-      ierr = NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,matctx->V,matctx,matctx->W,work,lwork);CHKERRQ(ierr);
+      switch (pep->scheme) {
+      case PEP_REFINE_SCHEME_EXPLICIT:
+        ierr = NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,matctx->V,matctx,matctx->W);CHKERRQ(ierr);
+        matctx->compM1 = PETSC_FALSE;
+        break;
+      case PEP_REFINE_SCHEME_MBE:
+        ierr = NRefSysSetup_mbe(pep,k,ksp,fH,S,lds,fh,h,matctx->V,matctx);CHKERRQ(ierr);
+        matctx->compM1 = PETSC_FALSE;
+        break;
+      case PEP_REFINE_SCHEME_SCHUR:
+        break;
+      }
     } else idx = matctx->idx;
     ierr = VecScatterBegin(matctx->scatter_id[i%matctx->subc->n],Rv,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
     ierr = VecScatterEnd(matctx->scatter_id[i%matctx->subc->n],Rv,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
@@ -599,9 +835,19 @@ static PetscErrorCode NRefSysIter_explicit(PetscInt i,PEP pep,PetscInt k,KSP ksp
     Vi = matctx->Vi;
   }
   if (idx==i && idx<k) {
-    ierr = NRefSysSolve_explicit(k,ksp,R,Rh,Vi,dHi,matctx);CHKERRQ(ierr);
+    switch (pep->scheme) {
+      case PEP_REFINE_SCHEME_EXPLICIT:
+        ierr = NRefSysSolve_explicit(k,ksp,R,Rh,Vi,dHi,matctx);CHKERRQ(ierr);
+        break;
+      case PEP_REFINE_SCHEME_MBE:
+        ierr = NRefSysSolve_mbe(k,k,matctx->W,matctx->w,matctx->Wt,matctx->wt,matctx->d,matctx->dt,ksp,matctx->M2,matctx->M3 ,matctx->M4,PETSC_FALSE,R,Rh,Vi,dHi,matctx->t);CHKERRQ(ierr);
+        break;
+      case PEP_REFINE_SCHEME_SCHUR:
+        ierr = NRefSysSolve_shell(ksp,pep->nmat,R,Rh,k,Vi,dHi);CHKERRQ(ierr);
+        break;
+    }
   }
-  if (matctx->subc) {
+  if (matctx && matctx->subc) {
     ierr = VecGetLocalSize(Vi,&m);CHKERRQ(ierr);
     ierr = VecGetArrayRead(Vi,&array);CHKERRQ(ierr);
     ierr = VecGetArray(matctx->tg,&array2);CHKERRQ(ierr);
@@ -610,27 +856,39 @@ static PetscErrorCode NRefSysIter_explicit(PetscInt i,PEP pep,PetscInt k,KSP ksp
     ierr = VecRestoreArrayRead(Vi,&array);CHKERRQ(ierr);
     ierr = VecScatterBegin(matctx->scatter_id[i%matctx->subc->n],matctx->tg,dVi,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
     ierr = VecScatterEnd(matctx->scatter_id[i%matctx->subc->n],matctx->tg,dVi,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-    ierr = MatGetOwnershipRange(matctx->E[0],&n0,&m0);CHKERRQ(ierr);
-    ierr = VecGetArrayRead(matctx->ttN,&array);CHKERRQ(ierr);
-    ierr = VecPlaceArray(matctx->tp,array+m0-n0);CHKERRQ(ierr);
-    ierr = VecScatterBegin(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);  
-    ierr = VecScatterEnd(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);  
-    ierr = VecResetArray(matctx->tp);CHKERRQ(ierr);
-    ierr = VecRestoreArrayRead(matctx->ttN,&array);CHKERRQ(ierr);
-    ierr = VecGetArrayRead(matctx->tpg,&array);CHKERRQ(ierr);
-    for (j=0;j<k;j++) dHi[j] = array[j];
-    ierr = VecRestoreArrayRead(matctx->tpg,&array);CHKERRQ(ierr);
+    switch (pep->scheme) {
+    case PEP_REFINE_SCHEME_EXPLICIT:
+      ierr = MatGetOwnershipRange(matctx->E[0],&n0,&m0);CHKERRQ(ierr);
+      ierr = VecGetArrayRead(matctx->ttN,&array);CHKERRQ(ierr);
+      ierr = VecPlaceArray(matctx->tp,array+m0-n0);CHKERRQ(ierr);
+      ierr = VecScatterBegin(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecScatterEnd(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecResetArray(matctx->tp);CHKERRQ(ierr);
+      ierr = VecRestoreArrayRead(matctx->ttN,&array);CHKERRQ(ierr);
+      ierr = VecGetArrayRead(matctx->tpg,&array);CHKERRQ(ierr);
+      for (j=0;j<k;j++) dHi[j] = array[j];
+      ierr = VecRestoreArrayRead(matctx->tpg,&array);CHKERRQ(ierr);
+      break;
+     case PEP_REFINE_SCHEME_MBE:
+      root = 0;
+      for (j=0;j<i%matctx->subc->n;j++) root += matctx->subc->subsize[j];
+      ierr = PetscMPIIntCast(k,&len);CHKERRQ(ierr);
+      ierr = MPI_Bcast(dHi,len,MPIU_SCALAR,root,matctx->subc->dupparent);CHKERRQ(ierr);
+      break;
+    case PEP_REFINE_SCHEME_SCHUR:
+      break;
+    }
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPNRefForwardSubstitution"
-static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,BV dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,PetscScalar *work,PetscInt lw,MatExplicitCtx *matctx)
+static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,BV dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,MatExplicitCtx *matctx)
 {
   PetscErrorCode ierr;
-  PetscInt       i,j,nmat=pep->nmat,nwu=0,lda=nmat*k;
-  PetscScalar    h,*fh,*Rh,*DfH;
+  PetscInt       i,nmat=pep->nmat,lda=nmat*k;
+  PetscScalar    *fh,*Rh,*DfH;
   PetscReal      norm;
   BV             W;
   Vec            Rv,t,dvi;
@@ -639,22 +897,39 @@ static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar
   PetscBool      flg,lindep;
 
   PetscFunctionBegin;
+  ierr = PetscMalloc2(nmat*k*k,&DfH,k,&Rh);CHKERRQ(ierr);
   *rds = 0;
-  DfH = work+nwu;
-  nwu += nmat*k*k;
-  Rh = work+nwu;
-  nwu += k;
-  ierr = BVCreateVec(pep->V,&t);CHKERRQ(ierr);
   ierr = BVCreateVec(pep->V,&Rv);CHKERRQ(ierr);
-  ierr = KSPGetOperators(ksp,&M,NULL);CHKERRQ(ierr);
-  if (matctx) {
-    fh = work+nwu;
-    nwu += nmat;
-  } else {
+  switch (pep->scheme) {
+  case PEP_REFINE_SCHEME_EXPLICIT:
+    ierr = BVCreateVec(pep->V,&t);CHKERRQ(ierr);
+    ierr = BVDuplicateResize(pep->V,PetscMax(k,nmat),&W);CHKERRQ(ierr);
+    ierr = PetscMalloc1(nmat,&fh);CHKERRQ(ierr);
+    break;
+  case PEP_REFINE_SCHEME_MBE:
+    if (matctx->subc) {
+      ierr = BVCreateVec(pep->V,&t);CHKERRQ(ierr);
+      ierr = BVDuplicateResize(pep->V,PetscMax(k,nmat),&W);CHKERRQ(ierr);
+    } else {
+      W = matctx->W;
+      ierr = PetscObjectReference((PetscObject)W);CHKERRQ(ierr);
+      t = matctx->t;
+      ierr = PetscObjectReference((PetscObject)t);CHKERRQ(ierr);
+    }
+    ierr = BVScale(matctx->W,0.0);CHKERRQ(ierr);
+    ierr = BVScale(matctx->Wt,0.0);CHKERRQ(ierr);
+    ierr = BVScale(matctx->M2,0.0);CHKERRQ(ierr);
+    ierr = BVScale(matctx->M3,0.0);CHKERRQ(ierr);
+    ierr = PetscMalloc1(nmat,&fh);CHKERRQ(ierr);
+    break;
+  case PEP_REFINE_SCHEME_SCHUR:
+    ierr = KSPGetOperators(ksp,&M,NULL);CHKERRQ(ierr);
     ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
+    ierr = BVCreateVec(pep->V,&t);CHKERRQ(ierr);
+    ierr = BVDuplicateResize(pep->V,PetscMax(k,nmat),&W);CHKERRQ(ierr);
     fh = ctx->fih;
+    break;
   }
-  ierr = BVDuplicateResize(pep->V,PetscMax(k,nmat),&W);CHKERRQ(ierr);
   ierr = PetscMemzero(dVS,2*k*k*sizeof(PetscScalar));CHKERRQ(ierr);
   ierr = PetscMemzero(DfH,lda*k*sizeof(PetscScalar));CHKERRQ(ierr);
   ierr = STGetTransform(pep->st,&flg);CHKERRQ(ierr);
@@ -663,25 +938,17 @@ static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar
     for (i=0;i<pep->nmat;i++) {
       ierr = STGetTOperators(pep->st,i,&At[i]);CHKERRQ(ierr);
     }
-  } else At = pep->A; 
+  } else At = pep->A;
 
   /* Main loop for computing the ith columns of dX and dS */
   for (i=0;i<k;i++) {
-    h = H[i+i*ldh];
-
     /* Compute and update i-th column of the right hand side */
     ierr = PetscMemzero(Rh,k*sizeof(PetscScalar));CHKERRQ(ierr);
-    ierr = NRefRightSide(nmat,pep->pbc,At,k,pep->V,S,lds,i,H,ldh,fH,DfH,dH,dV,dVS,*rds,Rv,Rh,W,t,work+nwu,lw-nwu);CHKERRQ(ierr);
+    ierr = NRefRightSide(nmat,pep->pbc,At,k,pep->V,S,lds,i,H,ldh,fH,DfH,dH,dV,dVS,*rds,Rv,Rh,W,t);CHKERRQ(ierr);
 
     /* Update and solve system */
     ierr = BVGetColumn(dV,i,&dvi);CHKERRQ(ierr);
-    if (matctx) {
-      ierr = NRefSysIter_explicit(i,pep,k,ksp,fH,S,lds,fh,H,ldh,Rv,Rh,pep->V,dvi,dH+i*k,matctx,W,work+nwu,lw-nwu);CHKERRQ(ierr);
-      if (i==0) matctx->computedt11 = PETSC_FALSE;
-    } else {
-      for (j=0;j<nmat;j++) fh[j] = fH[j*k+i+i*lda];
-      ierr = NRefSysIter_shell(pep,k,ksp,fH,S,lds,fh,h,Rv,Rh,pep->V,dvi,dH+i*k,W,t,work+nwu,lw-nwu);
-    }
+    ierr = NRefSysIter(i,pep,k,ksp,fH,S,lds,fh,H,ldh,Rv,Rh,pep->V,dvi,dH+i*k,matctx,W);CHKERRQ(ierr);
     /* Orthogonalize computed solution */
     ierr = BVOrthogonalizeVec(pep->V,dvi,dVS+i*2*k,&norm,&lindep);CHKERRQ(ierr);
     ierr = BVRestoreColumn(dV,i,&dvi);CHKERRQ(ierr);
@@ -701,39 +968,41 @@ static PetscErrorCode PEPNRefForwardSubstitution(PEP pep,PetscInt k,PetscScalar
   if (flg) {
     ierr = PetscFree(At);CHKERRQ(ierr);
   }
+  ierr = PetscFree2(DfH,Rh);CHKERRQ(ierr);
+  if (pep->scheme!=PEP_REFINE_SCHEME_SCHUR) { ierr = PetscFree(fh);CHKERRQ(ierr); }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "NRefOrthogStep"
-static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs,PetscScalar *work,PetscInt lwork)
+static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs)
 {
+#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQRF/ORGQR - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
-  PetscInt       i,j,nmat=pep->nmat,deg=nmat-1,lda=nmat*k,nwu=0,rs=*prs,ldg;
-  PetscScalar    *T,*G,*tau,*array,sone=1.0,zero=0.0;
-  PetscBLASInt   rs_,lds_,k_,ldh_,lw_,info,ldg_,lda_;
+  PetscInt       i,j,nmat=pep->nmat,deg=nmat-1,lda=nmat*k,rs=*prs,ldg;
+  PetscScalar    *T,*G,*tau,*array,sone=1.0,zero=0.0,*work;
+  PetscBLASInt   rs_,lds_,k_,ldh_,info,ldg_,lda_;
   Mat            M0;
 
   PetscFunctionBegin;
-  T = work+nwu;
-  nwu += rs*k;
-  tau = work+nwu;
-  nwu += k;
+  ierr = PetscMalloc4(rs*k,&T,k,&tau,k,&work,deg*k*k,&G);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(lda,&lda_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
-  ierr = PetscBLASIntCast(lwork-nwu,&lw_);CHKERRQ(ierr);
   if (rs>k) { /* Truncate S to have k columns*/
     for (j=0;j<k;j++) {
       ierr = PetscMemcpy(T+j*rs,S+j*lds,rs*sizeof(PetscScalar));CHKERRQ(ierr);
     }
     ierr = PetscBLASIntCast(rs,&rs_);CHKERRQ(ierr);
-    PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&rs_,&k_,T,&rs_,tau,work+nwu,&lw_,&info));
+    PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&rs_,&k_,T,&rs_,tau,work,&k_,&info));
     if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEQRF %d",info);
     /* Copy triangular matrix in S */
     ierr = PetscMemzero(S,lds*k*sizeof(PetscScalar));CHKERRQ(ierr);
     for (j=0;j<k;j++) for (i=0;i<=j;i++) S[j*lds+i] = T[j*rs+i];
-    PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&rs_,&k_,&k_,T,&rs_,tau,work+nwu,&lw_,&info));
+    PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&rs_,&k_,&k_,T,&rs_,tau,work,&k_,&info));
     if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
     ierr = MatCreateSeqDense(PETSC_COMM_SELF,rs,k,NULL,&M0);CHKERRQ(ierr);
     ierr = MatDenseGetArray(M0,&array);CHKERRQ(ierr);
@@ -748,40 +1017,42 @@ static PetscErrorCode NRefOrthogStep(PEP pep,PetscInt k,PetscScalar *H,PetscInt
     *prs = rs = k;
   }
   /* Form auxiliary matrix for the orthogonalization step */
-  G = work+nwu;
   ldg = deg*k;
-  nwu += ldg*k;
   ierr = PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ldg,&ldg_);CHKERRQ(ierr);
-  ierr = PetscBLASIntCast(lwork-nwu,&lw_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ldh,&ldh_);CHKERRQ(ierr);
   for (j=0;j<deg;j++) {
     PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&sone,S,&lds_,fH+j*k,&lda_,&zero,G+j*k,&ldg_));
   }
   /* Orthogonalize and update S */
-  PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&ldg_,&k_,G,&ldg_,tau,work+nwu,&lw_,&info));
+  PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&ldg_,&k_,G,&ldg_,tau,work,&k_,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEQRF %d",info);
   PetscStackCallBLAS("BLAStrsm",BLAStrsm_("R","U","N","N",&k_,&k_,&sone,G,&ldg_,S,&lds_));
 
   /* Update H */
   PetscStackCallBLAS("BLAStrmm",BLAStrmm_("L","U","N","N",&k_,&k_,&sone,G,&ldg_,H,&ldh_));
   PetscStackCallBLAS("BLAStrsm",BLAStrsm_("R","U","N","N",&k_,&k_,&sone,G,&ldg_,H,&ldh_));
+  ierr = PetscFree4(T,tau,work,G);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPNRefUpdateInvPair"
-static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,BV dV,PetscScalar *dVS,PetscInt rds,PetscScalar *work,PetscInt lwork)
+static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,BV dV,PetscScalar *dVS,PetscInt rds)
 {
+#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQRF/ORGQR - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
-  PetscInt       i,j,nmat=pep->nmat,lda=nmat*k,nwu=0;
-  PetscScalar    *tau,*array;
-  PetscBLASInt   lds_,k_,lda_,ldh_,kdrs_,lw_,info,k2_;
+  PetscInt       i,j,nmat=pep->nmat,lda=nmat*k;
+  PetscScalar    *tau,*array,*work;
+  PetscBLASInt   lds_,k_,lda_,ldh_,kdrs_,info,k2_;
   Mat            M0;
 
   PetscFunctionBegin;
-  tau = work+nwu;
-  nwu += k;
+  ierr = PetscMalloc2(k,&tau,k,&work);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(lds,&lds_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(lda,&lda_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ldh,&ldh_);CHKERRQ(ierr);
@@ -797,15 +1068,14 @@ static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,Pet
     for (i=0;i<k;i++) dVS[i+j*2*k] = -dVS[i+j*2*k]+S[i+j*lds];
     for (i=k;i<2*k;i++) dVS[i+j*2*k] = -dVS[i+j*2*k];
   }
-  ierr = PetscBLASIntCast(lwork-nwu,&lw_);CHKERRQ(ierr);
-  PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&kdrs_,&k_,dVS,&k2_,tau,work+nwu,&lw_,&info));
+  PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&kdrs_,&k_,dVS,&k2_,tau,work,&k_,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEQRF %d",info);
   /* Copy triangular matrix in S */
   for (j=0;j<k;j++) {
     for (i=0;i<=j;i++) S[i+j*lds] = dVS[i+j*2*k];
     for (i=j+1;i<k;i++) S[i+j*lds] = 0.0;
   }
-  PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&k2_,&k_,&k_,dVS,&k2_,tau,work+nwu,&lw_,&info));
+  PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&k2_,&k_,&k_,dVS,&k2_,tau,work,&k_,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
   ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&M0);CHKERRQ(ierr);
   ierr = MatDenseGetArray(M0,&array);CHKERRQ(ierr);
@@ -821,21 +1091,23 @@ static PetscErrorCode PEPNRefUpdateInvPair(PEP pep,PetscInt k,PetscScalar *H,Pet
     }
     ierr = MatDenseRestoreArray(M0,&array);CHKERRQ(ierr);
     ierr = BVMultInPlace(dV,M0,0,k);CHKERRQ(ierr);
-    ierr = BVAXPY(pep->V,1.0,dV);CHKERRQ(ierr);
+    ierr = BVMult(pep->V,1.0,1.0,dV,NULL);CHKERRQ(ierr);
   }
   ierr = MatDestroy(&M0);CHKERRQ(ierr);
-  ierr = NRefOrthogStep(pep,k,H,ldh,fH,S,lds,&k,work,lwork);CHKERRQ(ierr);
+  ierr = NRefOrthogStep(pep,k,H,ldh,fH,S,lds,&k);CHKERRQ(ierr);
+  ierr = PetscFree2(tau,work);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPNRefSetUpMatrices"
-static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,Mat *M,Mat *P,MatExplicitCtx *matctx,PetscBool ini)
+#define __FUNCT__ "PEPNRefSetUp"
+static PetscErrorCode PEPNRefSetUp(PEP pep,PetscInt k,PetscScalar *H,PetscInt ldh,MatExplicitCtx *matctx,PetscBool ini)
 {
   PetscErrorCode    ierr;
   FSubctx           *ctx;
   PetscScalar       t,*coef;
-  const PetscScalar *array; 
+  const PetscScalar *array;
   MatStructure      str;
   PetscInt          j,nmat=pep->nmat,n0,m0,n1,m1,n0_,m0_,n1_,m1_,N0,N1,p,*idx1,*idx2,count,si,i,l0;
   MPI_Comm          comm;
@@ -845,6 +1117,7 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
   IS                is1,is2;
   Vec               v;
   PetscBool         flg;
+  Mat               M,P;
 
   PetscFunctionBegin;
   ierr = PetscMalloc1(nmat,&coef);CHKERRQ(ierr);
@@ -855,7 +1128,8 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
       ierr = STGetTOperators(pep->st,i,&At[i]);CHKERRQ(ierr);
     }
   } else At = pep->A;
-  if (matctx) {
+  switch (pep->scheme) {
+  case PEP_REFINE_SCHEME_EXPLICIT:
     if (ini) {
       if (matctx->subc) {
         A = matctx->A;
@@ -888,14 +1162,13 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
       ierr = MatCreateDense(comm,m1-n1,m0_-n0_,PETSC_DECIDE,PETSC_DECIDE,NULL,&C);CHKERRQ(ierr);
       ierr = MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
       ierr = MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
-      ierr = SlepcMatTile(1.0,E[0],1.0,B,1.0,C,1.0,E[1],M);CHKERRQ(ierr);
-      *P = *M;
+      ierr = SlepcMatTile(1.0,E[0],1.0,B,1.0,C,1.0,E[1],&M);CHKERRQ(ierr);
       ierr = MatDestroy(&B);CHKERRQ(ierr);
       ierr = MatDestroy(&C);CHKERRQ(ierr);
-      matctx->computedt11 = PETSC_TRUE;
+      matctx->compM1 = PETSC_TRUE;
       ierr = MatGetSize(E[0],NULL,&N0);CHKERRQ(ierr);
       ierr = MatGetSize(E[1],NULL,&N1);CHKERRQ(ierr);
-      ierr = MPI_Comm_size(PetscObjectComm((PetscObject)*M),&np);CHKERRQ(ierr);
+      ierr = MPI_Comm_size(PetscObjectComm((PetscObject)M),&np);CHKERRQ(ierr);
       ierr = MatGetOwnershipRanges(E[0],&rgs0);CHKERRQ(ierr);
       ierr = MatGetOwnershipRanges(E[1],&rgs1);CHKERRQ(ierr);
       ierr = PetscMalloc4(PetscMax(k,N1),&matctx->idxp,N0,&matctx->idxg,N0,&matctx->map0,N1,&matctx->map1);CHKERRQ(ierr);
@@ -904,7 +1177,7 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
         for (j=rgs0[p];j<rgs0[p+1];j++) matctx->map0[j] = j+rgs1[p];
         for (j=rgs1[p];j<rgs1[p+1];j++) matctx->map1[j] = j+rgs0[p+1];
       }
-      ierr = MatCreateVecs(*M,NULL,&matctx->tN);CHKERRQ(ierr);
+      ierr = MatCreateVecs(M,NULL,&matctx->tN);CHKERRQ(ierr);
       ierr = MatCreateVecs(matctx->E[1],NULL,&matctx->t1);CHKERRQ(ierr);
       ierr = VecDuplicate(matctx->tN,&matctx->ttN);CHKERRQ(ierr);
       if (matctx->subc) {
@@ -937,6 +1210,7 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
       } else {
         ierr = VecScatterCreateToAll(matctx->t1,&matctx->scatterctx,&matctx->vseq);CHKERRQ(ierr);
       }
+      P = M;
     } else {
       if (matctx->subc) {
         /* Scatter vectors pep->V */
@@ -953,7 +1227,36 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
         }
       }
     }
-  } else {
+    break;
+  case PEP_REFINE_SCHEME_MBE:
+    if (ini) {
+      if (matctx->subc) {
+        A = matctx->A;
+        comm = PetscSubcommChild(matctx->subc);
+      } else {
+        matctx->V = pep->V;
+        A = At;
+        ierr = PetscObjectGetComm((PetscObject)pep,&comm);CHKERRQ(ierr);
+        ierr = MatCreateVecs(pep->A[0],&matctx->t,NULL);CHKERRQ(ierr);
+      }
+      ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
+      ierr = MatDuplicate(A[0],MAT_COPY_VALUES,&matctx->M1);CHKERRQ(ierr);
+      j = (matctx->subc)?matctx->subc->color:0;
+      ierr = PEPEvaluateBasis(pep,H[j+j*ldh],0,coef,NULL);CHKERRQ(ierr);
+      for (j=1;j<nmat;j++) {
+        ierr = MatAXPY(matctx->M1,coef[j],A[j],str);CHKERRQ(ierr);
+      }
+      ierr = BVDuplicateResize(matctx->V,PetscMax(k,pep->nmat),&matctx->W);CHKERRQ(ierr);
+      ierr = BVDuplicateResize(matctx->V,k,&matctx->M2);CHKERRQ(ierr);
+      ierr = BVDuplicate(matctx->M2,&matctx->M3);CHKERRQ(ierr);
+      ierr = BVDuplicate(matctx->M2,&matctx->Wt);CHKERRQ(ierr);
+      ierr = PetscMalloc5(k*k,&matctx->M4,k*k,&matctx->w,k*k,&matctx->wt,k,&matctx->d,k,&matctx->dt);CHKERRQ(ierr);
+      matctx->compM1 = PETSC_TRUE;
+      M = matctx->M1;
+      P = M;
+    }
+    break;
+  case PEP_REFINE_SCHEME_SCHUR:
     if (ini) {
       ierr = PetscObjectGetComm((PetscObject)pep,&comm);CHKERRQ(ierr);
       ierr = MatGetSize(At[0],&m0,&n0);CHKERRQ(ierr);
@@ -963,27 +1266,50 @@ static PetscErrorCode PEPNRefSetUpMatrices(PEP pep,PetscInt k,PetscScalar *H,Pet
       ctx->A = At;
       ctx->V = pep->V;
       ctx->k = k; ctx->nmat = nmat;
-      ierr = PetscMalloc3(k*k*nmat,&ctx->Mm,2*k*k,&ctx->work,nmat,&ctx->fih);CHKERRQ(ierr);
-      ierr = PetscMemzero(ctx->Mm,k*k*nmat*sizeof(PetscScalar));CHKERRQ(ierr);
-      ierr = BVCreateVec(pep->V,&ctx->w1);CHKERRQ(ierr);
-      ierr = BVCreateVec(pep->V,&ctx->w2);CHKERRQ(ierr);
-      ierr = MatCreateShell(comm,PETSC_DECIDE,PETSC_DECIDE,m0,n0,ctx,M);CHKERRQ(ierr);
-      ierr = MatShellSetOperation(*M,MATOP_MULT,(void(*)(void))MatFSMult);CHKERRQ(ierr);
-    }
-    /* Compute a precond matrix for the system */
-    t = 0.0;
-    for (j=0;j<k;j++) t += H[j+j*ldh];
-    t /= k;
-    if (ini) {
-      ierr = MatDuplicate(At[0],MAT_COPY_VALUES,P);CHKERRQ(ierr);
-    } else {
-      ierr = MatCopy(At[0],*P,str);CHKERRQ(ierr);
-    }
-    ierr = PEPEvaluateBasis(pep,t,0,coef,NULL);CHKERRQ(ierr);
-    for (j=1;j<nmat;j++) {
-      ierr = MatAXPY(*P,coef[j],At[j],str);CHKERRQ(ierr);
+      ierr = PetscMalloc4(k*k,&ctx->M4,k,&ctx->pM4,2*k*k,&ctx->work,nmat,&ctx->fih);CHKERRQ(ierr);
+      ierr = PetscMemzero(ctx->M4,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
+      ierr = MatCreateShell(comm,PETSC_DECIDE,PETSC_DECIDE,m0,n0,ctx,&M);CHKERRQ(ierr);
+      ierr = MatShellSetOperation(M,MATOP_MULT,(void(*)(void))MatFSMult);CHKERRQ(ierr);
+      ierr = BVDuplicateResize(ctx->V,PetscMax(k,pep->nmat),&ctx->W);CHKERRQ(ierr);
+      ierr = BVDuplicateResize(ctx->V,k,&ctx->M2);CHKERRQ(ierr);
+      ierr = BVDuplicate(ctx->M2,&ctx->M3);CHKERRQ(ierr);
+      ierr = BVCreateVec(pep->V,&ctx->t);CHKERRQ(ierr);
+      ierr = MatDuplicate(At[0],MAT_COPY_VALUES,&ctx->M1);CHKERRQ(ierr);
+      ierr = PEPEvaluateBasis(pep,H[0],0,coef,NULL);CHKERRQ(ierr);
+      for (j=1;j<nmat;j++) {
+        ierr = MatAXPY(ctx->M1,coef[j],At[j],str);CHKERRQ(ierr);
+      }
+      ierr = MatDuplicate(At[0],MAT_COPY_VALUES,&P);CHKERRQ(ierr);
+      /* Compute a precond matrix for the system */
+      t = H[0];
+      ierr = PEPEvaluateBasis(pep,t,0,coef,NULL);CHKERRQ(ierr);
+      for (j=1;j<nmat;j++) {
+        ierr = MatAXPY(P,coef[j],At[j],str);CHKERRQ(ierr);
+      }
+      ctx->compM1 = PETSC_TRUE;
     }
+    break;
+  }
+  if (ini) {
+    ierr = PEPRefineGetKSP(pep,&pep->refineksp);CHKERRQ(ierr);
+    ierr = KSPSetOperators(pep->refineksp,M,P);CHKERRQ(ierr);
+    ierr = KSPSetFromOptions(pep->refineksp);CHKERRQ(ierr);
   }
+
+  if (!ini && matctx && matctx->subc) {
+     /* Scatter vectors pep->V */
+    for (i=0;i<k;i++) {
+      ierr = BVGetColumn(pep->V,i,&v);CHKERRQ(ierr);
+      ierr = VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecScatterEnd(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = BVRestoreColumn(pep->V,i,&v);CHKERRQ(ierr);
+      ierr = VecGetArrayRead(matctx->tg,&array);CHKERRQ(ierr);
+      ierr = VecPlaceArray(matctx->t,(const PetscScalar*)array);CHKERRQ(ierr);
+      ierr = BVInsertVec(matctx->V,i,matctx->t);CHKERRQ(ierr);
+      ierr = VecResetArray(matctx->t);CHKERRQ(ierr);
+      ierr = VecRestoreArrayRead(matctx->tg,&array);CHKERRQ(ierr);
+    }
+   }
   ierr = PetscFree(coef);CHKERRQ(ierr);
   if (flg) {
     ierr = PetscFree(At);CHKERRQ(ierr);
@@ -1012,11 +1338,11 @@ static PetscErrorCode NRefSubcommSetup(PEP pep,PetscInt k,MatExplicitCtx *matctx
       ierr = STGetTOperators(pep->st,i,&A[i]);CHKERRQ(ierr);
     }
   } else A = pep->A;
-  
+
   /* Duplicate pep matrices */
   ierr = PetscMalloc3(pep->nmat,&matctx->A,nsubc,&matctx->scatter_id,nsubc,&matctx->scatterp_id);CHKERRQ(ierr);
   for (i=0;i<pep->nmat;i++) {
-    ierr = MatCreateRedundantMatrix(A[i],0,PetscSubcommChild(matctx->subc),MAT_INITIAL_MATRIX,&matctx->A[i]);CHKERRQ(ierr);    
+    ierr = MatCreateRedundantMatrix(A[i],0,PetscSubcommChild(matctx->subc),MAT_INITIAL_MATRIX,&matctx->A[i]);CHKERRQ(ierr);
   }
 
   /* Create Scatter */
@@ -1059,7 +1385,9 @@ static PetscErrorCode NRefSubcommSetup(PEP pep,PetscInt k,MatExplicitCtx *matctx
   ierr = BVCreate(PetscSubcommChild(matctx->subc),&matctx->V);CHKERRQ(ierr);
   ierr = BVSetType(matctx->V,type);CHKERRQ(ierr);
   ierr = BVSetSizesFromVec(matctx->V,matctx->t,k);CHKERRQ(ierr);
-  ierr = BVDuplicateResize(matctx->V,PetscMax(k,pep->nmat),&matctx->W);CHKERRQ(ierr);
+  if (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+    ierr = BVDuplicateResize(matctx->V,PetscMax(k,pep->nmat),&matctx->W);CHKERRQ(ierr);
+  }
   for (i=0;i<k;i++) {
     ierr = BVGetColumn(pep->V,i,&v);CHKERRQ(ierr);
     ierr = VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
@@ -1091,18 +1419,22 @@ static PetscErrorCode NRefSubcommDestroy(PEP pep,MatExplicitCtx *matctx)
   ierr = VecScatterDestroy(&matctx->scatter_sub);CHKERRQ(ierr);
   for (i=0;i<matctx->subc->n;i++) {
     ierr = VecScatterDestroy(&matctx->scatter_id[i]);CHKERRQ(ierr);
-    ierr = VecScatterDestroy(&matctx->scatterp_id[i]);CHKERRQ(ierr);
   }
   for (i=0;i<pep->nmat;i++) {
     ierr = MatDestroy(&matctx->A[i]);CHKERRQ(ierr);
   }
+  if (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+    for (i=0;i<matctx->subc->n;i++) {
+      ierr = VecScatterDestroy(&matctx->scatterp_id[i]);CHKERRQ(ierr);
+    }
+    ierr = VecDestroy(&matctx->tp);CHKERRQ(ierr);
+    ierr = VecDestroy(&matctx->tpg);CHKERRQ(ierr);
+    ierr = BVDestroy(&matctx->W);CHKERRQ(ierr);
+  }
   ierr = PetscFree3(matctx->A,matctx->scatter_id,matctx->scatterp_id);CHKERRQ(ierr);
   ierr = BVDestroy(&matctx->V);CHKERRQ(ierr);
-  ierr = BVDestroy(&matctx->W);CHKERRQ(ierr);
   ierr = VecDestroy(&matctx->t);CHKERRQ(ierr);
   ierr = VecDestroy(&matctx->tg);CHKERRQ(ierr);
-  ierr = VecDestroy(&matctx->tp);CHKERRQ(ierr);
-  ierr = VecDestroy(&matctx->tpg);CHKERRQ(ierr);
   ierr = VecDestroy(&matctx->Rv);CHKERRQ(ierr);
   ierr = VecDestroy(&matctx->Vi);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -1112,26 +1444,27 @@ static PetscErrorCode NRefSubcommDestroy(PEP pep,MatExplicitCtx *matctx)
 #define __FUNCT__ "PEPNewtonRefinement_TOAR"
 PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxits,PetscReal *tol,PetscInt k,PetscScalar *S,PetscInt lds,PetscInt *prs)
 {
+#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRI)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GETRF/GETRI - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
   PetscScalar    *H,*work,*dH,*fH,*dVS;
-  PetscInt       ldh,i,j,its=1,nmat=pep->nmat,nwu=0,lwa=0,nsubc=pep->npart,rds;
-  PetscLogDouble cnt;
-  PetscBLASInt   k_,ld_,*p,info,lwork=0;
+  PetscInt       ldh,i,j,its=1,nmat=pep->nmat,nsubc=pep->npart,rds;
+  PetscBLASInt   k_,ld_,*p,info;
   BV             dV;
   PetscBool      sinvert,flg;
-  Mat            P,M;
-  FSubctx        *ctx;
-  KSP            ksp;
   MatExplicitCtx *matctx=NULL;
   Vec            v;
+  Mat            M,P;
+  FSubctx        *ctx;
 
   PetscFunctionBegin;
   ierr = PetscLogEventBegin(PEP_Refine,pep,0,0,0);CHKERRQ(ierr);
   if (k > pep->n) SETERRQ1(PetscObjectComm((PetscObject)pep),1,"Multiple Refinement available only for invariant pairs of dimension smaller than n=%D",pep->n);
   /* the input tolerance is not being taken into account (by the moment) */
   its = *maxits;
-  lwa = (5+3*nmat)*k*k+2*k;
-  ierr = PetscMalloc3(k*k,&dH,nmat*k*k,&fH,lwa,&work);CHKERRQ(ierr);
+  ierr = PetscMalloc3(k*k,&dH,nmat*k*k,&fH,k,&work);CHKERRQ(ierr);
   ierr = DSGetLeadingDimension(pep->ds,&ldh);CHKERRQ(ierr);
   ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
   ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
@@ -1141,18 +1474,17 @@ PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxi
     ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
     ierr = PetscBLASIntCast(ldh,&ld_);CHKERRQ(ierr);
     ierr = PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinvert);CHKERRQ(ierr);
-    if (sinvert){
+    if (sinvert) {
       ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
-      ierr = PetscBLASIntCast(lwa-nwu,&lwork);CHKERRQ(ierr);
       ierr = PetscMalloc1(k,&p);CHKERRQ(ierr);
       PetscStackCallBLAS("LAPACKgetrf",LAPACKgetrf_(&k_,&k_,H,&ld_,p,&info));
-      PetscStackCallBLAS("LAPACKgetri",LAPACKgetri_(&k_,H,&ld_,p,work,&lwork,&info));
+      PetscStackCallBLAS("LAPACKgetri",LAPACKgetri_(&k_,H,&ld_,p,work,&k_,&info));
       ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
       pep->ops->backtransform = NULL;
     }
     if (sigma!=0.0) {
       ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
-      for (i=0;i<k;i++) H[i+ldh*i] += sigma; 
+      for (i=0;i<k;i++) H[i+ldh*i] += sigma;
       ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
       pep->ops->backtransform = NULL;
     }
@@ -1180,26 +1512,22 @@ PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxi
   }
   ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
 
-  ierr = NRefOrthogStep(pep,k,H,ldh,fH,S,lds,prs,work,lwa);CHKERRQ(ierr);
+  ierr = NRefOrthogStep(pep,k,H,ldh,fH,S,lds,prs);CHKERRQ(ierr);
   /* check if H is in Schur form */
   for (i=0;i<k-1;i++) {
     if (H[i+1+i*ldh]!=0.0) {
 #if !defined(PETSC_USES_COMPLEX)
-      SETERRQ(PetscObjectComm((PetscObject)pep),1,"Iterative Refinement require the complex Schur form of the projected matrix");
+      SETERRQ(PetscObjectComm((PetscObject)pep),1,"Iterative Refinement requires the complex Schur form of the projected matrix");
 #else
       SETERRQ(PetscObjectComm((PetscObject)pep),1,"Iterative Refinement requires an upper triangular projected matrix");
 #endif
     }
   }
-  if (pep->schur && nsubc>1) SETERRQ(PetscObjectComm((PetscObject)pep),1,"Split communicator only allowed for the explicit matrix option");
-  if (!pep->schur && nsubc>k) SETERRQ(PetscObjectComm((PetscObject)pep),1,"Amount of subcommunicators should not be larger than the invariant pair's dimension");
-  cnt = k*sizeof(PetscBLASInt)+(lwork+k*k*(nmat+3)+nmat+k)*sizeof(PetscScalar);
-  ierr = PetscLogObjectMemory((PetscObject)pep,cnt);CHKERRQ(ierr);
+  if (nsubc>k) SETERRQ(PetscObjectComm((PetscObject)pep),1,"Amount of subcommunicators should not be larger than the invariant pair dimension");
   ierr = BVSetActiveColumns(pep->V,0,k);CHKERRQ(ierr);
   ierr = BVDuplicateResize(pep->V,k,&dV);CHKERRQ(ierr);
-  ierr = PetscLogObjectParent((PetscObject)pep,(PetscObject)dV);CHKERRQ(ierr);  
-  ierr = PEPRefineGetKSP(pep,&ksp);CHKERRQ(ierr);
-  if (!pep->schur) {
+  ierr = PetscLogObjectParent((PetscObject)pep,(PetscObject)dV);CHKERRQ(ierr);
+  if (pep->scheme!=PEP_REFINE_SCHEME_SCHUR) {
     ierr = PetscMalloc1(1,&matctx);CHKERRQ(ierr);
     if (nsubc>1) { /* spliting in subcommunicators */
       matctx->subc = pep->refinesubc;
@@ -1210,25 +1538,22 @@ PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxi
   /* Loop performing iterative refinements */
   for (i=0;i<its;i++) {
     /* Pre-compute the polynomial basis evaluated in H */
-    ierr = PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);
-    ierr = PEPNRefSetUpMatrices(pep,k,H,ldh,&M,&P,matctx,(i==0)?PETSC_TRUE:PETSC_FALSE);CHKERRQ(ierr);
-    ierr = KSPSetOperators(ksp,M,P);CHKERRQ(ierr);
-    if (i==0) {
-      ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr);
-    }
+    ierr = PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);CHKERRQ(ierr);
+    ierr = PEPNRefSetUp(pep,k,H,ldh,matctx,PetscNot(i));CHKERRQ(ierr);
     /* Solve the linear system */
-    ierr = PEPNRefForwardSubstitution(pep,k,S,lds,H,ldh,fH,dV,dVS,&rds,dH,k,ksp,work+nwu,lwa-nwu,matctx);CHKERRQ(ierr);
+    ierr = PEPNRefForwardSubstitution(pep,k,S,lds,H,ldh,fH,dV,dVS,&rds,dH,k,pep->refineksp,matctx);CHKERRQ(ierr);
     /* Update X (=V*S) and H, and orthogonalize [X;X*fH1;...;XfH(deg-1)] */
-    ierr = PEPNRefUpdateInvPair(pep,k,H,ldh,fH,dH,S,lds,dV,dVS,rds,work+nwu,lwa-nwu);CHKERRQ(ierr);    
+    ierr = PEPNRefUpdateInvPair(pep,k,H,ldh,fH,dH,S,lds,dV,dVS,rds);CHKERRQ(ierr);
   }
-  ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);  
+  ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
   if (!flg && sinvert) {
     ierr = PetscFree(p);CHKERRQ(ierr);
   }
   ierr = PetscFree3(dH,fH,work);CHKERRQ(ierr);
   ierr = PetscFree(dVS);CHKERRQ(ierr);
   ierr = BVDestroy(&dV);CHKERRQ(ierr);
-  if (!pep->schur) {
+  switch (pep->scheme) {
+  case PEP_REFINE_SCHEME_EXPLICIT:
     for (i=0;i<2;i++) {
       ierr = MatDestroy(&matctx->E[i]);CHKERRQ(ierr);
     }
@@ -1243,16 +1568,38 @@ PetscErrorCode PEPNewtonRefinement_TOAR(PEP pep,PetscScalar sigma,PetscInt *maxi
       ierr = VecScatterDestroy(&matctx->scatterctx);CHKERRQ(ierr);
     }
     ierr = PetscFree(matctx);CHKERRQ(ierr);
-  } else {
+    ierr = KSPGetOperators(pep->refineksp,&M,NULL);CHKERRQ(ierr);
+    ierr = MatDestroy(&M);CHKERRQ(ierr);
+    break;
+  case PEP_REFINE_SCHEME_MBE:
+    ierr = BVDestroy(&matctx->W);CHKERRQ(ierr);
+    ierr = BVDestroy(&matctx->Wt);CHKERRQ(ierr);
+    ierr = BVDestroy(&matctx->M2);CHKERRQ(ierr);
+    ierr = BVDestroy(&matctx->M3);CHKERRQ(ierr);
+    ierr = MatDestroy(&matctx->M1);CHKERRQ(ierr);
+    ierr = VecDestroy(&matctx->t);CHKERRQ(ierr);
+    ierr = PetscFree5(matctx->M4,matctx->w,matctx->wt,matctx->d,matctx->dt);CHKERRQ(ierr);
+    if (nsubc>1) {
+      ierr = NRefSubcommDestroy(pep,matctx);CHKERRQ(ierr);
+    }
+    ierr = PetscFree(matctx);CHKERRQ(ierr);
+    break;
+  case PEP_REFINE_SCHEME_SCHUR:
+    ierr = KSPGetOperators(pep->refineksp,&M,&P);CHKERRQ(ierr);
     ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
-    ierr = PetscFree3(ctx->Mm,ctx->work,ctx->fih);CHKERRQ(ierr);
-    ierr = VecDestroy(&ctx->w1);CHKERRQ(ierr);  
-    ierr = VecDestroy(&ctx->w2);CHKERRQ(ierr);  
+    ierr = PetscFree4(ctx->M4,ctx->pM4,ctx->work,ctx->fih);CHKERRQ(ierr);
+    ierr = MatDestroy(&ctx->M1);CHKERRQ(ierr);
+    ierr = BVDestroy(&ctx->M2);CHKERRQ(ierr);
+    ierr = BVDestroy(&ctx->M3);CHKERRQ(ierr);
+    ierr = BVDestroy(&ctx->W);CHKERRQ(ierr);
+    ierr = VecDestroy(&ctx->t);CHKERRQ(ierr);
     ierr = PetscFree(ctx);CHKERRQ(ierr);
+    ierr = MatDestroy(&M);CHKERRQ(ierr);
     ierr = MatDestroy(&P);CHKERRQ(ierr);
+    break;
   }
-  ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = PetscLogEventEnd(PEP_Refine,pep,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
diff --git a/src/pep/impls/krylov/toar/nrefine.c.html b/src/pep/impls/krylov/toar/nrefine.c.html
index 7099153..d8fee16 100644
--- a/src/pep/impls/krylov/toar/nrefine.c.html
+++ b/src/pep/impls/krylov/toar/nrefine.c.html
@@ -4,1210 +4,1550 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/toar/nrefine.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:02+00:00">
+<meta name="date" content="2016-05-16T10:34:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/toar/nrefine.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/toar/nrefine.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
-<a name="line2">  2: </a><font color="#B22222">   Newton refinement for nonlinear eigenproblem.</font>
-
-<a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
-
-<a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
-
-<a name="line10"> 10: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
-<a name="line11"> 11: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
-<a name="line12"> 12: </a><font color="#B22222">   the Free Software Foundation.</font>
-
-<a name="line14"> 14: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
-<a name="line15"> 15: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
-<a name="line16"> 16: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
-<a name="line17"> 17: </a><font color="#B22222">   more details.</font>
-
-<a name="line19"> 19: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
-<a name="line20"> 20: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
-<a name="line21"> 21: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line22"> 22: </a><font color="#B22222">*/</font>
-
-<a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/pepimpl.h></font>
-<a name="line25"> 25: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
-
-<a name="line27"> 27: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line28"> 28: </a>  Mat          *A;
-<a name="line29"> 29: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V;
-<a name="line30"> 30: </a>  PetscInt     k,nmat;
-<a name="line31"> 31: </a>  PetscScalar  *Mm;
-<a name="line32"> 32: </a>  PetscScalar  *fih;
-<a name="line33"> 33: </a>  PetscScalar  *work;
-<a name="line34"> 34: </a>  Vec           w1,w2;
-<a name="line35"> 35: </a>} FSubctx;
-
-<a name="line37"> 37: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line38"> 38: </a>  Mat          E[2];
-<a name="line39"> 39: </a>  Vec          tN,ttN,t1,vseq;
-<a name="line40"> 40: </a>  VecScatter   scatterctx;
-<a name="line41"> 41: </a>  PetscBool    computedt11;
-<a name="line42"> 42: </a>  PetscInt     *map0,*map1,*idxg,*idxp;
-<a name="line43"> 43: </a>  PetscSubcomm subc;
-<a name="line44"> 44: </a>  VecScatter   scatter_sub;
-<a name="line45"> 45: </a>  VecScatter   *scatter_id,*scatterp_id;
-<a name="line46"> 46: </a>  Mat          *A;
-<a name="line47"> 47: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V,W;
-<a name="line48"> 48: </a>  Vec          t,tg,Rv,Vi,tp,tpg;
-<a name="line49"> 49: </a>  PetscInt     idx;
-<a name="line50"> 50: </a>} MatExplicitCtx;
-
-<a name="line54"> 54: </a><strong><font color="#4169E1"><a name="MatFSMult"></a>static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)</font></strong>
-<a name="line55"> 55: </a>{
-<a name="line57"> 57: </a>  FSubctx        *ctx;
-<a name="line58"> 58: </a>  PetscInt       i,k,nmat;
-<a name="line59"> 59: </a>  PetscScalar    *fih,*c,*vals,sone=1.0,zero=0.0;
-<a name="line60"> 60: </a>  Mat            *A;
-<a name="line61"> 61: </a>  PetscBLASInt   k_,lda_,one=1;
-<a name="line62"> 62: </a>  
-<a name="line64"> 64: </a>  MatShellGetContext(M,&ctx);
-<a name="line65"> 65: </a>  fih  = ctx->fih;
-<a name="line66"> 66: </a>  k    = ctx->k;
-<a name="line67"> 67: </a>  nmat = ctx->nmat;
-<a name="line68"> 68: </a>  A    = ctx->A;
-<a name="line69"> 69: </a>  c    = ctx->work;
-<a name="line70"> 70: </a>  vals = ctx->work+k;
-<a name="line71"> 71: </a>  PetscBLASIntCast(k,&k_);
-<a name="line72"> 72: </a>  PetscBLASIntCast(nmat*k,&lda_);
-<a name="line73"> 73: </a>  <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(ctx->V,x,c);
-<a name="line74"> 74: </a>  MatMult(A[0],x,y);
-<a name="line75"> 75: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line76"> 76: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&k_,&k_,&sone,ctx->Mm+i*k,&lda_,c,&one,&zero,vals,&one));
-<a name="line77"> 77: </a>    VecCopy(x,ctx->w1);
-<a name="line78"> 78: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->V,-1.0,fih[i],ctx->w1,vals);
-<a name="line79"> 79: </a>    MatMult(A[i],ctx->w1,ctx->w2);
-<a name="line80"> 80: </a>    VecAXPY(y,1.0,ctx->w2);
-<a name="line81"> 81: </a>  }
-<a name="line82"> 82: </a>  <font color="#4169E1">return</font>(0);
-<a name="line83"> 83: </a>}
-
-<a name="line87"> 87: </a><font color="#B22222">/*</font>
-<a name="line88"> 88: </a><font color="#B22222">  Evaluates the first d elements of the polynomial basis</font>
-<a name="line89"> 89: </a><font color="#B22222">  on a given matrix H which is considered to be triangular</font>
-<a name="line90"> 90: </a><font color="#B22222">*/</font>
-<a name="line91"> 91: </a><strong><font color="#4169E1"><a name="PEPEvaluateBasisforMatrix"></a>static PetscErrorCode PEPEvaluateBasisforMatrix(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nm,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH)</font></strong>
-<a name="line92"> 92: </a>{
-<a name="line94"> 94: </a>  PetscInt       i,j,ldfh=nm*k,off,nmat=pep->nmat;
-<a name="line95"> 95: </a>  PetscReal      *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat,t;
-<a name="line96"> 96: </a>  PetscScalar    corr=0.0,alpha,beta;
-<a name="line97"> 97: </a>  PetscBLASInt   k_,ldh_,ldfh_;
-<a name="line98"> 98: </a>  
-<a name="line100">100: </a>  PetscBLASIntCast(ldh,&ldh_);
-<a name="line101">101: </a>  PetscBLASIntCast(k,&k_);
-<a name="line102">102: </a>  PetscBLASIntCast(ldfh,&ldfh_);
-<a name="line103">103: </a>  PetscMemzero(fH,nm*k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line104">104: </a>  <font color="#4169E1">if</font> (nm>0) <font color="#4169E1">for</font> (j=0;j<k;j++) fH[j+j*ldfh] = 1.0;
-<a name="line105">105: </a>  <font color="#4169E1">if</font> (nm>1) {
-<a name="line106">106: </a>    t = b[0]/a[0];
-<a name="line107">107: </a>    off = k;
-<a name="line108">108: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line109">109: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) fH[off+i+j*ldfh] = H[i+j*ldh]/a[0];
-<a name="line110">110: </a>      fH[j+j*ldfh] -= t;
-<a name="line111">111: </a>    }
-<a name="line112">112: </a>  }
-<a name="line113">113: </a>  <font color="#4169E1">for</font> (i=2;i<nm;i++) {
-<a name="line114">114: </a>    off = i*k;
-<a name="line115">115: </a>    <font color="#4169E1">if</font> (i==2) {
-<a name="line116">116: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line117">117: </a>        fH[off+j+j*ldfh] = 1.0;
-<a name="line118">118: </a>        H[j+j*ldh] -= b[1];
-<a name="line119">119: </a>      }
-<a name="line120">120: </a>    } <font color="#4169E1">else</font> {
-<a name="line121">121: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line122">122: </a>        PetscMemcpy(fH+off+j*ldfh,fH+(i-2)*k+j*ldfh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line123">123: </a>        H[j+j*ldh] += corr-b[i-1];
-<a name="line124">124: </a>      }
-<a name="line125">125: </a>    }
-<a name="line126">126: </a>    corr  = b[i-1];
-<a name="line127">127: </a>    beta  = -g[i-1]/a[i-1];
-<a name="line128">128: </a>    alpha = 1/a[i-1];
-<a name="line129">129: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&alpha,H,&ldh_,fH+(i-1)*k,&ldfh_,&beta,fH+off,&ldfh_));
-<a name="line130">130: </a>  }
-<a name="line131">131: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) H[j+j*ldh] += corr;
-<a name="line132">132: </a>  <font color="#4169E1">return</font>(0);
-<a name="line133">133: </a>}
-
-<a name="line137">137: </a><strong><font color="#4169E1"><a name="NRefSysSetup_shell"></a>static PetscErrorCode NRefSysSetup_shell(PetscInt nmat,PetscReal *pcf,PetscInt k,PetscInt deg,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,PetscScalar *Mm,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12)</font></strong>
-<a name="line138">138: </a>{
-<a name="line140">140: </a>  PetscScalar    *DHii,*Tr,*Ts,s,sone=1.0,zero=0.0;
-<a name="line141">141: </a>  PetscInt       i,d,j,lda=nmat*k;
-<a name="line142">142: </a>  PetscReal      *a=pcf,*b=pcf+nmat,*g=pcf+2*nmat;
-<a name="line143">143: </a>  PetscBLASInt   k_,lda_,lds_,info;
-<a name="line144">144: </a>  
-<a name="line146">146: </a>  DHii = T12;
-<a name="line147">147: </a>  PetscMemzero(DHii,k*k*nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line148">148: </a>  PetscMalloc2(k*k,&Tr,k*k,&Ts);
-<a name="line149">149: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
-<a name="line150">150: </a>  <font color="#4169E1">for</font> (d=2;d<nmat;d++) {
-<a name="line151">151: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line152">152: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line153">153: </a>        DHii[d*k+i+j*lda] = ((h-b[d-1])*DHii[(d-1)*k+i+j*lda]+fH[(d-1)*k+i+j*lda]-g[d-1]*DHii[(d-2)*k+i+j*lda])/(a[d-1]);
-<a name="line154">154: </a>      }
-<a name="line155">155: </a>    }
-<a name="line156">156: </a>  }
-<a name="line157">157: </a>  <font color="#B22222">/* T22 */</font>
-<a name="line158">158: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line159">159: </a>  PetscBLASIntCast(k,&k_);
-<a name="line160">160: </a>  PetscBLASIntCast(lda,&lda_);
-<a name="line161">161: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
-<a name="line162">162: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line163">163: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
-<a name="line164">164: </a>    s = (i==1)?0.0:1.0; 
-<a name="line165">165: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,T22,&k_));
-<a name="line166">166: </a>  }
-
-<a name="line168">168: </a>  <font color="#B22222">/* T21 */</font>
-<a name="line169">169: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line170">170: </a>    s = (i==1)?0.0:1.0; 
-<a name="line171">171: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"C"</font>,&k_,&k_,&k_,fh+i,fH+i*k,&lda_,S,&lds_,&s,T21,&k_));
-<a name="line172">172: </a>  }
-<a name="line173">173: </a>  <font color="#B22222">/* Mm */</font>
-<a name="line174">174: </a>  PetscMemcpy(Tr,T21,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line175">175: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&k_,&k_,T22,&k_,p22,Tr,&k_,&info));
-<a name="line176">176: </a>  
-<a name="line177">177: </a>  s = 0.0;
-<a name="line178">178: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line179">179: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,Ts,&k_));    
-<a name="line180">180: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,Ts,&k_,Tr,&k_,&s,Mm+i*k,&lda_));
-<a name="line181">181: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line182">182: </a>      PetscMemcpy(T12+i*k+j*lda,Ts+j*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line183">183: </a>    }  
-<a name="line184">184: </a>  }
-<a name="line185">185: </a>  PetscFree2(Tr,Ts);
-<a name="line186">186: </a>  <font color="#4169E1">return</font>(0); 
-<a name="line187">187: </a>}
-
-<a name="line191">191: </a><strong><font color="#4169E1"><a name="NRefSysSolve_shell"></a>static PetscErrorCode NRefSysSolve_shell(Mat *A,KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,PetscScalar *T22,PetscBLASInt *p22,PetscScalar *T21,PetscScalar *T12,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec dVi,PetscScalar *dHi,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W,Vec t,PetscScalar *work,PetscInt lw)</font></strong>
-<a name="line192">192: </a>{
-<a name="line194">194: </a>  PetscScalar    *t0,*t1,zero=0.0,none=-1.0,sone=1.0;
-<a name="line195">195: </a>  PetscBLASInt   k_,one=1,info,lda_;
-<a name="line196">196: </a>  PetscInt       i,lda=nmat*k,nwu=0;
-<a name="line197">197: </a>  Vec            w;
-<a name="line198">198: </a>  KSPConvergedReason reason;
-
-<a name="line201">201: </a>  t0 = work+nwu;
-<a name="line202">202: </a>  nwu += k;
-<a name="line203">203: </a>  t1 = work+nwu;
-<a name="line204">204: </a>  nwu += k;
-<a name="line205">205: </a>  PetscBLASIntCast(lda,&lda_);
-<a name="line206">206: </a>  PetscBLASIntCast(k,&k_);
-<a name="line207">207: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) t0[i] = Rh[i];
-<a name="line208">208: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"N"</font>,&k_,&one,T22,&k_,p22,t0,&k_,&info));
-<a name="line209">209: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line210">210: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&k_,&k_,&sone,T12+i*k,&lda_,t0,&one,&zero,t1,&one));
-<a name="line211">211: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,t,t1);
-<a name="line212">212: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&w);
-<a name="line213">213: </a>    MatMult(A[i],t,w);
-<a name="line214">214: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&w);
-<a name="line215">215: </a>  }
-<a name="line216">216: </a>  <font color="#4169E1">for</font> (i=0;i<nmat-1;i++) t1[i]=-1.0;
-<a name="line217">217: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,1,nmat);
-<a name="line218">218: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(W,1.0,1.0,Rv,t1);
-<a name="line219">219: </a>  KSPSolve(ksp,Rv,dVi);
-<a name="line220">220: </a>  KSPGetConvergedReason(ksp,&reason);
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
-<a name="line222">222: </a>  <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(V,dVi,t1);
-<a name="line223">223: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&k_,&k_,&none,T21,&k_,t1,&one,&zero,dHi,&one));
-<a name="line224">224: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) dHi[i] += Rh[i];
-<a name="line225">225: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"N"</font>,&k_,&one,T22,&k_,p22,dHi,&k_,&info));
-<a name="line226">226: </a>  <font color="#4169E1">return</font>(0);
-<a name="line227">227: </a>}
-
-<a name="line231">231: </a><font color="#B22222">/*</font>
-<a name="line232">232: </a><font color="#B22222">   Computes the residual P(H,V*S)*e_j for the polynomial</font>
-<a name="line233">233: </a><font color="#B22222">*/</font>
-<a name="line234">234: </a><strong><font color="#4169E1"><a name="NRefRightSide"></a>static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,<a href="../../../../../ [...]
-<a name="line235">235: </a>{
-<a name="line237">237: </a>  PetscScalar    *DS0,*DS1,*F,beta=0.0,sone=1.0,none=-1.0,tt=0.0,*h,zero=0.0,*Z,*c0;
-<a name="line238">238: </a>  PetscReal      *a=pcf,*b=pcf+nmat,*g=b+nmat;
-<a name="line239">239: </a>  PetscInt       i,ii,jj,nwu=0,lda;
-<a name="line240">240: </a>  PetscBLASInt   lda_,k_,ldh_,lds_,nmat_,k2_,krds_,j_,one=1;
-<a name="line241">241: </a>  Mat            M0;
-<a name="line242">242: </a>  Vec            w;
-<a name="line243">243: </a>  
-<a name="line245">245: </a>  h = work+nwu;
-<a name="line246">246: </a>  nwu += k*nmat;
-<a name="line247">247: </a>  lda = k*nmat;
-<a name="line248">248: </a>  PetscBLASIntCast(k,&k_);
-<a name="line249">249: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line250">250: </a>  PetscBLASIntCast(lda,&lda_);
-<a name="line251">251: </a>  PetscBLASIntCast(nmat,&nmat_);
-<a name="line252">252: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&nmat_,&k_,&sone,S,&lds_,fH+j*lda,&k_,&zero,h,&k_));
-<a name="line253">253: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,nmat,h,&M0);
-<a name="line254">254: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,nmat);
-<a name="line255">255: </a>  <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,M0);
-<a name="line256">256: </a>  MatDestroy(&M0);
-
-<a name="line258">258: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,0,&w);
-<a name="line259">259: </a>  MatMult(A[0],w,Rv);
-<a name="line260">260: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,0,&w);
-<a name="line261">261: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line262">262: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&w);
-<a name="line263">263: </a>    MatMult(A[i],w,t);
-<a name="line264">264: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&w);
-<a name="line265">265: </a>    VecAXPY(Rv,1.0,t);
-<a name="line266">266: </a>  }
-<a name="line267">267: </a>  <font color="#B22222">/* Update right-hand side */</font>
-<a name="line268">268: </a>  <font color="#4169E1">if</font> (j) {
-<a name="line269">269: </a>    DS0 = work+nwu;
-<a name="line270">270: </a>    nwu += k*k;
-<a name="line271">271: </a>    DS1 = work+nwu;
-<a name="line272">272: </a>    nwu += k*k;
-<a name="line273">273: </a>    PetscBLASIntCast(ldh,&ldh_); 
-<a name="line274">274: </a>    Z = work+nwu;
-<a name="line275">275: </a>    nwu += k*k;
-<a name="line276">276: </a>    PetscMemzero(Z,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line277">277: </a>    PetscMemzero(DS0,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line278">278: </a>    PetscMemcpy(Z+(j-1)*k,dH+(j-1)*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line279">279: </a>    <font color="#B22222">/* Update DfH */</font>
-<a name="line280">280: </a>    <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line281">281: </a>      <font color="#4169E1">if</font> (i>1) {
-<a name="line282">282: </a>        beta = -g[i-1];
-<a name="line283">283: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+(i-1)*k,&lda_,Z,&k_,&beta,DS0,&k_));
-<a name="line284">284: </a>        tt += -b[i-1];
-<a name="line285">285: </a>        <font color="#4169E1">for</font> (ii=0;ii<k;ii++) H[ii+ii*ldh] += tt;
-<a name="line286">286: </a>        tt = b[i-1];
-<a name="line287">287: </a>        beta = 1.0/a[i-1];
-<a name="line288">288: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&beta,DS1,&k_,H,&ldh_,&beta,DS0,&k_));
-<a name="line289">289: </a>        F = DS0; DS0 = DS1; DS1 = F;
-<a name="line290">290: </a>      } <font color="#4169E1">else</font> {
-<a name="line291">291: </a>        PetscMemzero(DS1,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line292">292: </a>        <font color="#4169E1">for</font> (ii=0;ii<k;ii++) DS1[ii+(j-1)*k] = Z[ii+(j-1)*k]/a[0];
-<a name="line293">293: </a>      } 
-<a name="line294">294: </a>      <font color="#4169E1">for</font> (jj=j;jj<k;jj++) {
-<a name="line295">295: </a>        <font color="#4169E1">for</font> (ii=0;ii<k;ii++) DfH[k*i+ii+jj*lda] += DS1[ii+jj*k];
-<a name="line296">296: </a>      }
-<a name="line297">297: </a>    }
-<a name="line298">298: </a>    <font color="#4169E1">for</font> (ii=0;ii<k;ii++) H[ii+ii*ldh] += tt;
-<a name="line299">299: </a>    <font color="#B22222">/* Update right-hand side */</font>
-<a name="line300">300: </a>    PetscBLASIntCast(2*k,&k2_); 
-<a name="line301">301: </a>    PetscBLASIntCast(j,&j_);
-<a name="line302">302: </a>    PetscBLASIntCast(k+rds,&krds_);
-<a name="line303">303: </a>    c0 = DS0;
-<a name="line304">304: </a>    PetscMemzero(Rh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line305">305: </a>    <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
-<a name="line306">306: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&krds_,&j_,&sone,dVS,&k2_,fH+j*lda+i*k,&one,&zero,h,&one));
-<a name="line307">307: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&k_,&k_,&sone,S,&lds_,DfH+i*k+j*lda,&one,&sone,h,&one));
-<a name="line308">308: </a>      <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,t,h);
-<a name="line309">309: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(dV,0,rds);
-<a name="line310">310: </a>      <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(dV,1.0,1.0,t,h+k);
-<a name="line311">311: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&w);
-<a name="line312">312: </a>      MatMult(A[i],t,w);
-<a name="line313">313: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&w);
-<a name="line314">314: </a>      <font color="#4169E1">if</font> (i>0 && i<nmat-1) {
-<a name="line315">315: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&k_,&k_,&sone,S,&lds_,h,&one,&zero,c0,&one));
-<a name="line316">316: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&k_,&k_,&none,fH+i*k,&lda_,c0,&one,&sone,Rh,&one));
-<a name="line317">317: </a>      }
-<a name="line318">318: </a>    }
-<a name="line319">319: </a>     
-<a name="line320">320: </a>    <font color="#4169E1">for</font> (i=0;i<nmat;i++) h[i] = -1.0;
-<a name="line321">321: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(W,1.0,1.0,Rv,h);
-<a name="line322">322: </a>  }
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a>}
-
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="NRefSysIter_shell"></a>static PetscErrorCode NRefSysIter_shell(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,Vec Rv,PetscScalar *Rh,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec dVi,PetscScalar *dHi,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W,Vec t,PetscScalar *wo [...]
-<a name="line329">329: </a>{
-<a name="line331">331: </a>  PetscInt       nwu=0,nmat=pep->nmat,deg=nmat-1,i;
-<a name="line332">332: </a>  PetscScalar    *T22,*T21,*T12;
-<a name="line333">333: </a>  PetscBLASInt   *p22;
-<a name="line334">334: </a>  FSubctx        *ctx;
-<a name="line335">335: </a>  Mat            M,*A;
-<a name="line336">336: </a>  PetscBool      flg;
-
-<a name="line339">339: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line340">340: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line341">341: </a>    PetscMalloc1(pep->nmat,&A);
-<a name="line342">342: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line343">343: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&A[i]);
-<a name="line344">344: </a>    }
-<a name="line345">345: </a>  } <font color="#4169E1">else</font> A = pep->A; 
-<a name="line346">346: </a>  PetscMalloc1(k,&p22);
-<a name="line347">347: </a>  T22 = work+nwu;
-<a name="line348">348: </a>  nwu += k*k;
-<a name="line349">349: </a>  T21 = work+nwu;
-<a name="line350">350: </a>  nwu += k*k;
-<a name="line351">351: </a>  T12 = work+nwu;
-<a name="line352">352: </a>  nwu += nmat*k*k;
-<a name="line353">353: </a>  KSPGetOperators(ksp,&M,NULL);
-<a name="line354">354: </a>  MatShellGetContext(M,&ctx);
-<a name="line355">355: </a>  <font color="#B22222">/* Update the matrix for the system */</font>
-<a name="line356">356: </a>  NRefSysSetup_shell(nmat,pep->pbc,k,deg,fH,S,lds,fh,h,ctx->Mm,T22,p22,T21,T12);
-<a name="line357">357: </a>  <font color="#B22222">/* Solve system */</font>
-<a name="line358">358: </a>  NRefSysSolve_shell(A,ksp,nmat,Rv,Rh,k,T22,p22,T21,T12,V,dVi,dHi,W,t,work+nwu,lwork-nwu);
-<a name="line359">359: </a>  PetscFree(p22);
-<a name="line360">360: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line361">361: </a>    PetscFree(A);
-<a name="line362">362: </a>  }
-<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
-<a name="line364">364: </a>}
-
-<a name="line368">368: </a><strong><font color="#4169E1"><a name="NRefSysSetup_explicit"></a>static PetscErrorCode NRefSysSetup_explicit(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,MatExplicitCtx *matctx,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W,PetscScalar *work,PetscInt lwork)</fon [...]
-<a name="line369">369: </a>{
-<a name="line370">370: </a>  PetscErrorCode    ierr;
-<a name="line371">371: </a>  PetscInt          nwu=0,i,j,d,n,n0,m0,n1,m1,nmat=pep->nmat,lda=nmat*k,deg=nmat-1;
-<a name="line372">372: </a>  PetscInt          *idxg=matctx->idxg,*idxp=matctx->idxp,idx,ncols;
-<a name="line373">373: </a>  Mat               M,*E=matctx->E,*A,*At,Mk,Md;
-<a name="line374">374: </a>  PetscReal         *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
-<a name="line375">375: </a>  PetscScalar       s,ss,*DHii,*T22,*T21,*T12,*Ts,*Tr,*array,*ts,sone=1.0,zero=0.0;
-<a name="line376">376: </a>  PetscBLASInt      lds_,lda_,k_;
-<a name="line377">377: </a>  const PetscInt    *idxmc;
-<a name="line378">378: </a>  const PetscScalar *valsc,*carray;
-<a name="line379">379: </a>  MatStructure      str;
-<a name="line380">380: </a>  Vec               vc,vc0;
-<a name="line381">381: </a>  PetscBool         flg;
-<a name="line382">382: </a>  
-<a name="line384">384: </a>  T22 = work+nwu;
-<a name="line385">385: </a>  nwu += k*k;
-<a name="line386">386: </a>  T21 = work+nwu;
-<a name="line387">387: </a>  nwu += k*k;
-<a name="line388">388: </a>  T12 = work+nwu;
-<a name="line389">389: </a>  nwu += nmat*k*k;
-<a name="line390">390: </a>  Tr = work+nwu;
-<a name="line391">391: </a>  nwu += k*k;
-<a name="line392">392: </a>  Ts = work+nwu;
-<a name="line393">393: </a>  nwu += k*k;
-<a name="line394">394: </a>  <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
-<a name="line395">395: </a>  KSPGetOperators(ksp,&M,NULL);
-<a name="line396">396: </a>  MatGetOwnershipRange(E[1],&n1,&m1);
-<a name="line397">397: </a>  MatGetOwnershipRange(E[0],&n0,&m0);
-<a name="line398">398: </a>  MatGetOwnershipRange(M,&n,NULL);
-<a name="line399">399: </a>  PetscMalloc1(nmat,&ts);
-<a name="line400">400: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line401">401: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line402">402: </a>    PetscMalloc1(pep->nmat,&At);
-<a name="line403">403: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line404">404: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
-<a name="line405">405: </a>    }
-<a name="line406">406: </a>  } <font color="#4169E1">else</font> At = pep->A; 
-<a name="line407">407: </a>  <font color="#4169E1">if</font> (matctx->subc) A = matctx->A;
-<a name="line408">408: </a>  <font color="#4169E1">else</font> A = At;
-<a name="line409">409: </a>  <font color="#B22222">/* Form the explicit system matrix */</font>
-<a name="line410">410: </a>  DHii = T12;
-<a name="line411">411: </a>  PetscMemzero(DHii,k*k*nmat*<font color="#4169E1">sizeof</font>(PetscScalar));  
-<a name="line412">412: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
-<a name="line413">413: </a>  <font color="#4169E1">for</font> (d=2;d<nmat;d++) {
-<a name="line414">414: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line415">415: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line416">416: </a>        DHii[d*k+i+j*lda] = ((h-b[d-1])*DHii[(d-1)*k+i+j*lda]+fH[(d-1)*k+i+j*lda]-g[d-1]*DHii[(d-2)*k+i+j*lda])/a[d-1];
-<a name="line417">417: </a>      }
-<a name="line418">418: </a>    }
-<a name="line419">419: </a>  }
-
-<a name="line421">421: </a>  <font color="#B22222">/* T11 */</font>
-<a name="line422">422: </a>  <font color="#4169E1">if</font> (!matctx->computedt11) {
-<a name="line423">423: </a>    MatCopy(A[0],E[0],DIFFERENT_NONZERO_PATTERN);
-<a name="line424">424: </a>    PEPEvaluateBasis(pep,h,0,Ts,NULL);
-<a name="line425">425: </a>    <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
-<a name="line426">426: </a>      MatAXPY(E[0],Ts[j],A[j],str);
-<a name="line427">427: </a>    }
+<a name="line2">  2: </a><font color="#B22222">   Newton refinement for polynomial eigenproblems.</font>
+
+<a name="line4">  4: </a><font color="#B22222">   References:</font>
+
+<a name="line6">  6: </a><font color="#B22222">       [1] T. Betcke and D. Kressner, "Perturbation, extraction and refinement</font>
+<a name="line7">  7: </a><font color="#B22222">           of invariant pairs for matrix polynomials", Linear Algebra Appl.</font>
+<a name="line8">  8: </a><font color="#B22222">           435(3):514-536, 2011.</font>
+
+<a name="line10"> 10: </a><font color="#B22222">       [2] C. Campos and J.E. Roman, "Parallel iterative refinement in</font>
+<a name="line11"> 11: </a><font color="#B22222">           polynomial eigenvalue problems", submitted, 2015.</font>
+
+<a name="line13"> 13: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line14"> 14: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line15"> 15: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line19"> 19: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line20"> 20: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line21"> 21: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line23"> 23: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line24"> 24: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line25"> 25: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line26"> 26: </a><font color="#B22222">   more details.</font>
+
+<a name="line28"> 28: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line29"> 29: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line30"> 30: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line31"> 31: </a><font color="#B22222">*/</font>
+
+<a name="line33"> 33: </a><font color="#A020F0">#include <slepc/private/pepimpl.h></font>
+<a name="line34"> 34: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line36"> 36: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line37"> 37: </a>  Mat          *A,M1;
+<a name="line38"> 38: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V,M2,M3,W;
+<a name="line39"> 39: </a>  PetscInt     k,nmat;
+<a name="line40"> 40: </a>  PetscScalar  *fih,*work,*M4;
+<a name="line41"> 41: </a>  PetscBLASInt *pM4;
+<a name="line42"> 42: </a>  PetscBool    compM1;
+<a name="line43"> 43: </a>  Vec          t;
+<a name="line44"> 44: </a>} FSubctx;
+
+<a name="line46"> 46: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line47"> 47: </a>  Mat          E[2],M1;
+<a name="line48"> 48: </a>  Vec          tN,ttN,t1,vseq;
+<a name="line49"> 49: </a>  VecScatter   scatterctx;
+<a name="line50"> 50: </a>  PetscBool    compM1;
+<a name="line51"> 51: </a>  PetscInt     *map0,*map1,*idxg,*idxp;
+<a name="line52"> 52: </a>  PetscSubcomm subc;
+<a name="line53"> 53: </a>  VecScatter   scatter_sub;
+<a name="line54"> 54: </a>  VecScatter   *scatter_id,*scatterp_id;
+<a name="line55"> 55: </a>  Mat          *A;
+<a name="line56"> 56: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>           V,W,M2,M3,Wt;
+<a name="line57"> 57: </a>  PetscScalar  *M4,*w,*wt,*d,*dt;
+<a name="line58"> 58: </a>  Vec          t,tg,Rv,Vi,tp,tpg;
+<a name="line59"> 59: </a>  PetscInt     idx,*cols;
+<a name="line60"> 60: </a>} MatExplicitCtx;
+
+<a name="line64"> 64: </a><strong><font color="#4169E1"><a name="MatFSMult"></a>static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)</font></strong>
+<a name="line65"> 65: </a>{
+<a name="line66"> 66: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRS)</font>
+<a name="line68"> 68: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRS - Lapack routine is unavailable"</font>);
+<a name="line69"> 69: </a><font color="#A020F0">#else</font>
+<a name="line71"> 71: </a>  FSubctx        *ctx;
+<a name="line72"> 72: </a>  PetscInt       k,i;
+<a name="line73"> 73: </a>  PetscScalar    *c;
+<a name="line74"> 74: </a>  PetscBLASInt   k_,one=1,info;
+
+<a name="line77"> 77: </a>  MatShellGetContext(M,&ctx);
+<a name="line78"> 78: </a>  VecCopy(x,ctx->t);
+<a name="line79"> 79: </a>  k    = ctx->k;
+<a name="line80"> 80: </a>  c    = ctx->work;
+<a name="line81"> 81: </a>  PetscBLASIntCast(k,&k_);
+<a name="line82"> 82: </a>  MatMult(ctx->M1,x,y);
+<a name="line83"> 83: </a>  VecConjugate(ctx->t);
+<a name="line84"> 84: </a>  <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(ctx->M3,ctx->t,c);
+<a name="line85"> 85: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) c[i] = PetscConj(c[i]);
+<a name="line86"> 86: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"N"</font>,&k_,&one,ctx->M4,&k_,ctx->pM4,c,&k_,&info));
+<a name="line87"> 87: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->M2,-1.0,1.0,y,c);
+<a name="line88"> 88: </a>  <font color="#4169E1">return</font>(0);
+<a name="line89"> 89: </a><font color="#A020F0">#endif</font>
+<a name="line90"> 90: </a>}
+
+<a name="line94"> 94: </a><font color="#B22222">/*</font>
+<a name="line95"> 95: </a><font color="#B22222">  Evaluates the first d elements of the polynomial basis</font>
+<a name="line96"> 96: </a><font color="#B22222">  on a given matrix H which is considered to be triangular</font>
+<a name="line97"> 97: </a><font color="#B22222">*/</font>
+<a name="line98"> 98: </a><strong><font color="#4169E1"><a name="PEPEvaluateBasisforMatrix"></a>static PetscErrorCode PEPEvaluateBasisforMatrix(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nm,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH)</font></strong>
+<a name="line99"> 99: </a>{
+<a name="line101">101: </a>  PetscInt       i,j,ldfh=nm*k,off,nmat=pep->nmat;
+<a name="line102">102: </a>  PetscReal      *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat,t;
+<a name="line103">103: </a>  PetscScalar    corr=0.0,alpha,beta;
+<a name="line104">104: </a>  PetscBLASInt   k_,ldh_,ldfh_;
+
+<a name="line107">107: </a>  PetscBLASIntCast(ldh,&ldh_);
+<a name="line108">108: </a>  PetscBLASIntCast(k,&k_);
+<a name="line109">109: </a>  PetscBLASIntCast(ldfh,&ldfh_);
+<a name="line110">110: </a>  PetscMemzero(fH,nm*k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line111">111: </a>  <font color="#4169E1">if</font> (nm>0) <font color="#4169E1">for</font> (j=0;j<k;j++) fH[j+j*ldfh] = 1.0;
+<a name="line112">112: </a>  <font color="#4169E1">if</font> (nm>1) {
+<a name="line113">113: </a>    t = b[0]/a[0];
+<a name="line114">114: </a>    off = k;
+<a name="line115">115: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line116">116: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) fH[off+i+j*ldfh] = H[i+j*ldh]/a[0];
+<a name="line117">117: </a>      fH[j+j*ldfh] -= t;
+<a name="line118">118: </a>    }
+<a name="line119">119: </a>  }
+<a name="line120">120: </a>  <font color="#4169E1">for</font> (i=2;i<nm;i++) {
+<a name="line121">121: </a>    off = i*k;
+<a name="line122">122: </a>    <font color="#4169E1">if</font> (i==2) {
+<a name="line123">123: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line124">124: </a>        fH[off+j+j*ldfh] = 1.0;
+<a name="line125">125: </a>        H[j+j*ldh] -= b[1];
+<a name="line126">126: </a>      }
+<a name="line127">127: </a>    } <font color="#4169E1">else</font> {
+<a name="line128">128: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line129">129: </a>        PetscMemcpy(fH+off+j*ldfh,fH+(i-2)*k+j*ldfh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line130">130: </a>        H[j+j*ldh] += corr-b[i-1];
+<a name="line131">131: </a>      }
+<a name="line132">132: </a>    }
+<a name="line133">133: </a>    corr  = b[i-1];
+<a name="line134">134: </a>    beta  = -g[i-1]/a[i-1];
+<a name="line135">135: </a>    alpha = 1/a[i-1];
+<a name="line136">136: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&alpha,H,&ldh_,fH+(i-1)*k,&ldfh_,&beta,fH+off,&ldfh_));
+<a name="line137">137: </a>  }
+<a name="line138">138: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) H[j+j*ldh] += corr;
+<a name="line139">139: </a>  <font color="#4169E1">return</font>(0);
+<a name="line140">140: </a>}
+
+<a name="line144">144: </a><strong><font color="#4169E1"><a name="NRefSysSetup_shell"></a>static PetscErrorCode NRefSysSetup_shell(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,FSubctx *ctx)</font></strong>
+<a name="line145">145: </a>{
+<a name="line146">146: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV)</font>
+<a name="line148">148: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV - Lapack routine is unavailable"</font>);
+<a name="line149">149: </a><font color="#A020F0">#else</font>
+<a name="line150">150: </a>  PetscErrorCode    ierr;
+<a name="line151">151: </a>  PetscScalar       *DHii,*T12,*Tr,*Ts,*array,s,ss,sone=1.0,zero=0.0,*M4=ctx->M4,t,*v,*T;
+<a name="line152">152: </a>  const PetscScalar *m3,*m2;
+<a name="line153">153: </a>  PetscInt          i,d,j,nmat=pep->nmat,lda=nmat*k,deg=nmat-1,nloc;
+<a name="line154">154: </a>  PetscReal         *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
+<a name="line155">155: </a>  PetscBLASInt      k_,lda_,lds_,nloc_,one=1,info;
+<a name="line156">156: </a>  Mat               *A=ctx->A,Mk,M1=ctx->M1,P;
+<a name="line157">157: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>                V=ctx->V,M2=ctx->M2,M3=ctx->M3,W=ctx->W;
+<a name="line158">158: </a>  MatStructure      str;
+<a name="line159">159: </a>  Vec               vc;
+
+<a name="line162">162: </a>  <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line163">163: </a>  PetscMalloc3(nmat*k*k,&T12,k*k,&Tr,PetscMax(k*k,nmat),&Ts);
+<a name="line164">164: </a>  DHii = T12;
+<a name="line165">165: </a>  PetscMemzero(DHii,k*k*nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line166">166: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
+<a name="line167">167: </a>  <font color="#4169E1">for</font> (d=2;d<nmat;d++) {
+<a name="line168">168: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line169">169: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line170">170: </a>        DHii[d*k+i+j*lda] = ((h-b[d-1])*DHii[(d-1)*k+i+j*lda]+fH[(d-1)*k+i+j*lda]-g[d-1]*DHii[(d-2)*k+i+j*lda])/(a[d-1]);
+<a name="line171">171: </a>      }
+<a name="line172">172: </a>    }
+<a name="line173">173: </a>  }
+<a name="line174">174: </a>  <font color="#B22222">/* T11 */</font>
+<a name="line175">175: </a>  <font color="#4169E1">if</font> (!ctx->compM1) {
+<a name="line176">176: </a>    MatCopy(A[0],M1,DIFFERENT_NONZERO_PATTERN);
+<a name="line177">177: </a>    PEPEvaluateBasis(pep,h,0,Ts,NULL);
+<a name="line178">178: </a>    <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line179">179: </a>      MatAXPY(M1,Ts[j],A[j],str);
+<a name="line180">180: </a>    }
+<a name="line181">181: </a>  }
+
+<a name="line183">183: </a>  <font color="#B22222">/* T22 */</font>
+<a name="line184">184: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line185">185: </a>  PetscBLASIntCast(k,&k_);
+<a name="line186">186: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line187">187: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
+<a name="line188">188: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line189">189: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
+<a name="line190">190: </a>    s = (i==1)?0.0:1.0;
+<a name="line191">191: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,M4,&k_));
+<a name="line192">192: </a>  }
+<a name="line193">193: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) <font color="#4169E1">for</font> (j=0;j<i;j++) { t=M4[i+j*k];M4[i+j*k]=M4[j+i*k];M4[j+i*k]=t; }
+
+<a name="line195">195: </a>  <font color="#B22222">/* T12 */</font>
+<a name="line196">196: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&Mk);
+<a name="line197">197: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line198">198: </a>    MatDenseGetArray(Mk,&array);
+<a name="line199">199: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,array,&k_));
+<a name="line200">200: </a>    MatDenseRestoreArray(Mk,&array);
+<a name="line201">201: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,k);
+<a name="line202">202: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,Mk);
+<a name="line203">203: </a>    <font color="#4169E1">if</font> (i==1) {
+<a name="line204">204: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(W,A[i],M2);
+<a name="line205">205: </a>    } <font color="#4169E1">else</font> {
+<a name="line206">206: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(W,A[i],M3); <font color="#B22222">/* using M3 as work space */</font>
+<a name="line207">207: </a>      <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(M2,1.0,1.0,M3,NULL);
+<a name="line208">208: </a>    }
+<a name="line209">209: </a>  }
+
+<a name="line211">211: </a>  <font color="#B22222">/* T21 */</font>
+<a name="line212">212: </a>  MatDenseGetArray(Mk,&array);
+<a name="line213">213: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line214">214: </a>    s = (i==1)?0.0:1.0;
+<a name="line215">215: </a>    ss = PetscConj(fh[i]);
+<a name="line216">216: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&ss,S,&lds_,fH+i*k,&lda_,&s,array,&k_));
+<a name="line217">217: </a>  }
+<a name="line218">218: </a>  MatDenseRestoreArray(Mk,&array);
+<a name="line219">219: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(M3,0,k);
+<a name="line220">220: </a>  <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(M3,1.0,0.0,V,Mk);
+<a name="line221">221: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line222">222: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(M3,i,&vc);
+<a name="line223">223: </a>    VecConjugate(vc);
+<a name="line224">224: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(M3,i,&vc);
+<a name="line225">225: </a>  }
+<a name="line226">226: </a>  MatDestroy(&Mk);
+<a name="line227">227: </a>  PetscFree3(T12,Tr,Ts);
+
+<a name="line229">229: </a>  VecGetLocalSize(ctx->t,&nloc);
+<a name="line230">230: </a>  PetscBLASIntCast(nloc,&nloc_);
+<a name="line231">231: </a>  PetscMalloc1(nloc*k,&T);
+<a name="line232">232: </a>  KSPGetOperators(pep->refineksp,NULL,&P);
+<a name="line233">233: </a>  <font color="#4169E1">if</font> (!ctx->compM1) { MatCopy(ctx->M1,P,SAME_NONZERO_PATTERN); }
+<a name="line234">234: </a>  <a href="../../../../../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a>(ctx->M2,&m2);
+<a name="line235">235: </a>  <a href="../../../../../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a>(ctx->M3,&m3);
+<a name="line236">236: </a>  VecGetArray(ctx->t,&v);
+<a name="line237">237: </a>  <font color="#4169E1">for</font> (i=0;i<nloc;i++) <font color="#4169E1">for</font> (j=0;j<k;j++) T[j+i*k] = m3[i+j*nloc];
+<a name="line238">238: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&k_,&nloc_,ctx->M4,&k_,ctx->pM4,T,&k_,&info));
+<a name="line239">239: </a>  <font color="#4169E1">for</font> (i=0;i<nloc;i++) v[i] = BLASdot_(&k_,m2+i,&nloc_,T+i*k,&one);
+<a name="line240">240: </a>  VecRestoreArray(ctx->t,&v);
+<a name="line241">241: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</a>(ctx->M2,&m2);
+<a name="line242">242: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</a>(ctx->M3,&m3);
+<a name="line243">243: </a>  MatDiagonalSet(P,ctx->t,ADD_VALUES);
+<a name="line244">244: </a>  PetscFree(T);
+<a name="line245">245: </a>  KSPSetUp(pep->refineksp);
+<a name="line246">246: </a>  <font color="#4169E1">return</font>(0);
+<a name="line247">247: </a><font color="#A020F0">#endif</font>
+<a name="line248">248: </a>}
+
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="NRefSysSolve_shell"></a>static PetscErrorCode NRefSysSolve_shell(KSP ksp,PetscInt nmat,Vec Rv,PetscScalar *Rh,PetscInt k,Vec dVi,PetscScalar *dHi)</font></strong>
+<a name="line253">253: </a>{
+<a name="line254">254: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRS)</font>
+<a name="line256">256: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRS - Lapack routine is unavailable"</font>);
+<a name="line257">257: </a><font color="#A020F0">#else</font>
+<a name="line258">258: </a>  PetscErrorCode     ierr;
+<a name="line259">259: </a>  PetscScalar        *t0;
+<a name="line260">260: </a>  PetscBLASInt       k_,one=1,info,lda_;
+<a name="line261">261: </a>  PetscInt           i,lda=nmat*k;
+<a name="line262">262: </a>  Mat                M;
+<a name="line263">263: </a>  FSubctx            *ctx;
+<a name="line264">264: </a>  KSPConvergedReason reason;
+
+<a name="line267">267: </a>  KSPGetOperators(ksp,&M,NULL);
+<a name="line268">268: </a>  MatShellGetContext(M,&ctx);
+<a name="line269">269: </a>  PetscCalloc1(k,&t0);
+<a name="line270">270: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line271">271: </a>  PetscBLASIntCast(k,&k_);
+<a name="line272">272: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) t0[i] = Rh[i];
+<a name="line273">273: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"N"</font>,&k_,&one,ctx->M4,&k_,ctx->pM4,t0,&k_,&info));
+<a name="line274">274: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(ctx->M2,-1.0,1.0,Rv,t0);
+<a name="line275">275: </a>  KSPSolve(ksp,Rv,dVi);
+<a name="line276">276: </a>  KSPGetConvergedReason(ksp,&reason);
+<a name="line277">277: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
+<a name="line278">278: </a>  VecConjugate(dVi);
+<a name="line279">279: </a>  <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(ctx->M3,dVi,dHi);
+<a name="line280">280: </a>  VecConjugate(dVi);
+<a name="line281">281: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) dHi[i] = Rh[i]-PetscConj(dHi[i]);
+<a name="line282">282: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"N"</font>,&k_,&one,ctx->M4,&k_,ctx->pM4,dHi,&k_,&info));
+<a name="line283">283: </a>  PetscFree(t0);
+<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
+<a name="line285">285: </a><font color="#A020F0">#endif</font>
+<a name="line286">286: </a>}
+
+<a name="line290">290: </a><font color="#B22222">/*</font>
+<a name="line291">291: </a><font color="#B22222">   Computes the residual P(H,V*S)*e_j for the polynomial</font>
+<a name="line292">292: </a><font color="#B22222">*/</font>
+<a name="line293">293: </a><strong><font color="#4169E1"><a name="NRefRightSide"></a>static PetscErrorCode NRefRightSide(PetscInt nmat,PetscReal *pcf,Mat *A,PetscInt k,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscScalar *S,PetscInt lds,PetscInt j,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *DfH,PetscScalar *dH,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> dV,PetscScalar *dVS,PetscInt rds,Vec Rv,PetscScalar *Rh,<a href="../../../../../ [...]
+<a name="line294">294: </a>{
+<a name="line296">296: </a>  PetscScalar    *DS0,*DS1,*F,beta=0.0,sone=1.0,none=-1.0,tt=0.0,*h,zero=0.0,*Z,*c0;
+<a name="line297">297: </a>  PetscReal      *a=pcf,*b=pcf+nmat,*g=b+nmat;
+<a name="line298">298: </a>  PetscInt       i,ii,jj,lda;
+<a name="line299">299: </a>  PetscBLASInt   lda_,k_,ldh_,lds_,nmat_,k2_,krds_,j_,one=1;
+<a name="line300">300: </a>  Mat            M0;
+<a name="line301">301: </a>  Vec            w;
+
+<a name="line304">304: </a>  PetscMalloc4(k*nmat,&h,k*k,&DS0,k*k,&DS1,k*k,&Z);
+<a name="line305">305: </a>  lda = k*nmat;
+<a name="line306">306: </a>  PetscBLASIntCast(k,&k_);
+<a name="line307">307: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line308">308: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line309">309: </a>  PetscBLASIntCast(nmat,&nmat_);
+<a name="line310">310: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&nmat_,&k_,&sone,S,&lds_,fH+j*lda,&k_,&zero,h,&k_));
+<a name="line311">311: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,nmat,h,&M0);
+<a name="line312">312: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,nmat);
+<a name="line313">313: </a>  <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,M0);
+<a name="line314">314: </a>  MatDestroy(&M0);
+
+<a name="line316">316: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,0,&w);
+<a name="line317">317: </a>  MatMult(A[0],w,Rv);
+<a name="line318">318: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,0,&w);
+<a name="line319">319: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line320">320: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&w);
+<a name="line321">321: </a>    MatMult(A[i],w,t);
+<a name="line322">322: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&w);
+<a name="line323">323: </a>    VecAXPY(Rv,1.0,t);
+<a name="line324">324: </a>  }
+<a name="line325">325: </a>  <font color="#B22222">/* Update right-hand side */</font>
+<a name="line326">326: </a>  <font color="#4169E1">if</font> (j) {
+<a name="line327">327: </a>    PetscBLASIntCast(ldh,&ldh_);
+<a name="line328">328: </a>    PetscMemzero(Z,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line329">329: </a>    PetscMemzero(DS0,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line330">330: </a>    PetscMemcpy(Z+(j-1)*k,dH+(j-1)*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line331">331: </a>    <font color="#B22222">/* Update DfH */</font>
+<a name="line332">332: </a>    <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line333">333: </a>      <font color="#4169E1">if</font> (i>1) {
+<a name="line334">334: </a>        beta = -g[i-1];
+<a name="line335">335: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+(i-1)*k,&lda_,Z,&k_,&beta,DS0,&k_));
+<a name="line336">336: </a>        tt += -b[i-1];
+<a name="line337">337: </a>        <font color="#4169E1">for</font> (ii=0;ii<k;ii++) H[ii+ii*ldh] += tt;
+<a name="line338">338: </a>        tt = b[i-1];
+<a name="line339">339: </a>        beta = 1.0/a[i-1];
+<a name="line340">340: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&beta,DS1,&k_,H,&ldh_,&beta,DS0,&k_));
+<a name="line341">341: </a>        F = DS0; DS0 = DS1; DS1 = F;
+<a name="line342">342: </a>      } <font color="#4169E1">else</font> {
+<a name="line343">343: </a>        PetscMemzero(DS1,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line344">344: </a>        <font color="#4169E1">for</font> (ii=0;ii<k;ii++) DS1[ii+(j-1)*k] = Z[ii+(j-1)*k]/a[0];
+<a name="line345">345: </a>      }
+<a name="line346">346: </a>      <font color="#4169E1">for</font> (jj=j;jj<k;jj++) {
+<a name="line347">347: </a>        <font color="#4169E1">for</font> (ii=0;ii<k;ii++) DfH[k*i+ii+jj*lda] += DS1[ii+jj*k];
+<a name="line348">348: </a>      }
+<a name="line349">349: </a>    }
+<a name="line350">350: </a>    <font color="#4169E1">for</font> (ii=0;ii<k;ii++) H[ii+ii*ldh] += tt;
+<a name="line351">351: </a>    <font color="#B22222">/* Update right-hand side */</font>
+<a name="line352">352: </a>    PetscBLASIntCast(2*k,&k2_);
+<a name="line353">353: </a>    PetscBLASIntCast(j,&j_);
+<a name="line354">354: </a>    PetscBLASIntCast(k+rds,&krds_);
+<a name="line355">355: </a>    c0 = DS0;
+<a name="line356">356: </a>    PetscMemzero(Rh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line357">357: </a>    <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
+<a name="line358">358: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&krds_,&j_,&sone,dVS,&k2_,fH+j*lda+i*k,&one,&zero,h,&one));
+<a name="line359">359: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&k_,&k_,&sone,S,&lds_,DfH+i*k+j*lda,&one,&sone,h,&one));
+<a name="line360">360: </a>      <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,t,h);
+<a name="line361">361: </a>      <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(dV,0,rds);
+<a name="line362">362: </a>      <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(dV,1.0,1.0,t,h+k);
+<a name="line363">363: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&w);
+<a name="line364">364: </a>      MatMult(A[i],t,w);
+<a name="line365">365: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&w);
+<a name="line366">366: </a>      <font color="#4169E1">if</font> (i>0 && i<nmat-1) {
+<a name="line367">367: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&k_,&k_,&sone,S,&lds_,h,&one,&zero,c0,&one));
+<a name="line368">368: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&k_,&k_,&none,fH+i*k,&lda_,c0,&one,&sone,Rh,&one));
+<a name="line369">369: </a>      }
+<a name="line370">370: </a>    }
+
+<a name="line372">372: </a>    <font color="#4169E1">for</font> (i=0;i<nmat;i++) h[i] = -1.0;
+<a name="line373">373: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(W,1.0,1.0,Rv,h);
+<a name="line374">374: </a>  }
+<a name="line375">375: </a>  PetscFree4(h,DS0,DS1,Z);
+<a name="line376">376: </a>  <font color="#4169E1">return</font>(0);
+<a name="line377">377: </a>}
+
+<a name="line381">381: </a><strong><font color="#4169E1"><a name="NRefSysSolve_mbe"></a>static PetscErrorCode NRefSysSolve_mbe(PetscInt k,PetscInt sz,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W,PetscScalar *w,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Wt,PetscScalar *wt,PetscScalar *d,PetscScalar *dt,KSP ksp,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> T2,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> T3 ,PetscSca [...]
+<a name="line382">382: </a>{
+<a name="line383">383: </a>  PetscErrorCode     ierr;
+<a name="line384">384: </a>  PetscInt           i,j,incf,incc;
+<a name="line385">385: </a>  PetscScalar        *y,*g,*xx2,*ww,y2,*dd;
+<a name="line386">386: </a>  Vec                v,t,xx1;
+<a name="line387">387: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>                 WW,T;
+<a name="line388">388: </a>  KSPConvergedReason reason;
+
+<a name="line391">391: </a>  PetscMalloc3(sz,&y,sz,&g,k,&xx2);
+<a name="line392">392: </a>  <font color="#4169E1">if</font> (trans) {
+<a name="line393">393: </a>    WW = W; ww = w; dd = d; T = T3; incf = 0; incc = 1;
+<a name="line394">394: </a>  } <font color="#4169E1">else</font> {
+<a name="line395">395: </a>    WW = Wt; ww = wt; dd = dt; T = T2; incf = 1; incc = 0;
+<a name="line396">396: </a>  }
+<a name="line397">397: </a>  xx1 = vw;
+<a name="line398">398: </a>  VecCopy(x1,xx1);
+<a name="line399">399: </a>  PetscMemcpy(xx2,x2,sz*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line400">400: </a>  PetscMemzero(sol2,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line401">401: </a>  <font color="#4169E1">for</font> (i=sz-1;i>=0;i--) {
+<a name="line402">402: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(WW,i,&v);
+<a name="line403">403: </a>    VecConjugate(v);
+<a name="line404">404: </a>    VecDot(xx1,v,y+i);
+<a name="line405">405: </a>    VecConjugate(v);
+<a name="line406">406: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(WW,i,&v);
+<a name="line407">407: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) y[i] += ww[j+i*k]*xx2[j];
+<a name="line408">408: </a>    y[i] = -(y[i]-xx2[i])/dd[i];
+<a name="line409">409: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(T,i,&t);
+<a name="line410">410: </a>    VecAXPY(xx1,-y[i],t);
+<a name="line411">411: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(T,i,&t);
+<a name="line412">412: </a>    <font color="#4169E1">for</font>(j=0;j<=i;j++) xx2[j] -= y[i]*T4[j*incf+incc*i+(i*incf+incc*j)*k];
+<a name="line413">413: </a>    g[i] = xx2[i];
+<a name="line414">414: </a>  }
+<a name="line415">415: </a>  <font color="#4169E1">if</font> (trans) {
+<a name="line416">416: </a>    KSPSolveTranspose(ksp,xx1,sol1);
+<a name="line417">417: </a>    KSPGetConvergedReason(ksp,&reason);
+<a name="line418">418: </a>    <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
+<a name="line419">419: </a>  } <font color="#4169E1">else</font> {
+<a name="line420">420: </a>    KSPSolve(ksp,xx1,sol1);
+<a name="line421">421: </a>    KSPGetConvergedReason(ksp,&reason);
+<a name="line422">422: </a>    <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
+<a name="line423">423: </a>  }
+<a name="line424">424: </a>  <font color="#4169E1">if</font> (trans) {
+<a name="line425">425: </a>    WW = Wt; ww = wt; dd = dt; T = T2; incf = 1; incc = 0;
+<a name="line426">426: </a>  } <font color="#4169E1">else</font> {
+<a name="line427">427: </a>    WW = W; ww = w; dd = d; T = T3; incf = 0; incc = 1;
 <a name="line428">428: </a>  }
-<a name="line429">429: </a>  <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
-<a name="line430">430: </a>    MatGetRow(E[0],i,&ncols,&idxmc,&valsc);
-<a name="line431">431: </a>    idx = n+i-n0;
-<a name="line432">432: </a>    <font color="#4169E1">for</font> (j=0;j<ncols;j++) {
-<a name="line433">433: </a>      idxg[j] = matctx->map0[idxmc[j]];
-<a name="line434">434: </a>    }
-<a name="line435">435: </a>    MatSetValues(M,1,&idx,ncols,idxg,valsc,INSERT_VALUES);
-<a name="line436">436: </a>    MatRestoreRow(E[0],i,&ncols,&idxmc,&valsc);
-<a name="line437">437: </a>  }
-
-<a name="line439">439: </a>  <font color="#B22222">/* T22 */</font>
-<a name="line440">440: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line441">441: </a>  PetscBLASIntCast(k,&k_);
-<a name="line442">442: </a>  PetscBLASIntCast(lda,&lda_);
-<a name="line443">443: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
-<a name="line444">444: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line445">445: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
-<a name="line446">446: </a>    s = (i==1)?0.0:1.0; 
-<a name="line447">447: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,T22,&k_));
-<a name="line448">448: </a>  }
-<a name="line449">449: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) idxp[j] = matctx->map1[j];
-<a name="line450">450: </a>  <font color="#4169E1">for</font> (i=0;i<m1-n1;i++) {
-<a name="line451">451: </a>    idx = n+m0-n0+i;
-<a name="line452">452: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line453">453: </a>      Tr[j] = T22[n1+i+j*k];
-<a name="line454">454: </a>    }
-<a name="line455">455: </a>    MatSetValues(M,1,&idx,k,idxp,Tr,INSERT_VALUES);
-<a name="line456">456: </a>  }
-
-<a name="line458">458: </a>  <font color="#B22222">/* T21 */</font>
-<a name="line459">459: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line460">460: </a>    s = (i==1)?0.0:1.0;
-<a name="line461">461: </a>    ss = PetscConj(fh[i]);
-<a name="line462">462: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&ss,S,&lds_,fH+i*k,&lda_,&s,T21,&k_));
-<a name="line463">463: </a>  }
-<a name="line464">464: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,k);
-<a name="line465">465: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,T21,&Mk);
-<a name="line466">466: </a>  <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,Mk);
-<a name="line467">467: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line468">468: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&vc);
-<a name="line469">469: </a>    VecConjugate(vc);
-<a name="line470">470: </a>    VecGetArrayRead(vc,&carray);
-<a name="line471">471: </a>    idx = matctx->map1[i];
-<a name="line472">472: </a>    MatSetValues(M,1,&idx,m0-n0,matctx->map0+n0,carray,INSERT_VALUES);
-<a name="line473">473: </a>    VecRestoreArrayRead(vc,&carray);
-<a name="line474">474: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&vc);
-<a name="line475">475: </a>  }
-
-<a name="line477">477: </a>  <font color="#B22222">/* T12 */</font>  
-<a name="line478">478: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line479">479: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,Ts,&k_));    
+<a name="line429">429: </a>  <font color="#4169E1">for</font> (i=0;i<sz;i++) {
+<a name="line430">430: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(T,i,&t);
+<a name="line431">431: </a>    VecConjugate(t);
+<a name="line432">432: </a>    VecDot(sol1,t,&y2);
+<a name="line433">433: </a>    VecConjugate(t);
+<a name="line434">434: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(T,i,&t);
+<a name="line435">435: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) y2 += sol2[j]*T4[j*incf+incc*i+(i*incf+incc*j)*k];
+<a name="line436">436: </a>    y2 = (g[i]-y2)/dd[i];
+<a name="line437">437: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(WW,i,&v);
+<a name="line438">438: </a>    VecAXPY(sol1,-y2,v);
+<a name="line439">439: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) sol2[j] -= ww[j+i*k]*y2;
+<a name="line440">440: </a>    sol2[i] = y[i]+y2;
+<a name="line441">441: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(WW,i,&v);
+<a name="line442">442: </a>  }
+<a name="line443">443: </a>  PetscFree3(y,g,xx2);
+<a name="line444">444: </a>  <font color="#4169E1">return</font>(0);
+<a name="line445">445: </a>}
+
+<a name="line449">449: </a><strong><font color="#4169E1"><a name="NRefSysSetup_mbe"></a>static PetscErrorCode NRefSysSetup_mbe(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,MatExplicitCtx *matctx)</font></strong>
+<a name="line450">450: </a>{
+<a name="line452">452: </a>  PetscInt       i,j,l,nmat=pep->nmat,lda=nmat*k,deg=nmat-1;
+<a name="line453">453: </a>  Mat            M1=matctx->M1,*A,*At,Mk;
+<a name="line454">454: </a>  PetscReal      *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
+<a name="line455">455: </a>  PetscScalar    s,ss,*DHii,*T12,*array,*Ts,*Tr,*M4=matctx->M4,sone=1.0,zero=0.0;
+<a name="line456">456: </a>  PetscScalar    *w=matctx->w,*wt=matctx->wt,*d=matctx->d,*dt=matctx->dt;
+<a name="line457">457: </a>  PetscBLASInt   lds_,lda_,k_;
+<a name="line458">458: </a>  MatStructure   str;
+<a name="line459">459: </a>  PetscBool      flg;
+<a name="line460">460: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             M2=matctx->M2,M3=matctx->M3,W=matctx->W,Wt=matctx->Wt;
+<a name="line461">461: </a>  Vec            vc,vc2;
+
+<a name="line464">464: </a>  PetscMalloc3(nmat*k*k,&T12,k*k,&Tr,PetscMax(k*k,nmat),&Ts);
+<a name="line465">465: </a>  <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line466">466: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line467">467: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line468">468: </a>    PetscMalloc1(pep->nmat,&At);
+<a name="line469">469: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line470">470: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
+<a name="line471">471: </a>    }
+<a name="line472">472: </a>  } <font color="#4169E1">else</font> At = pep->A;
+<a name="line473">473: </a>  <font color="#4169E1">if</font> (matctx->subc) A = matctx->A;
+<a name="line474">474: </a>  <font color="#4169E1">else</font> A = At;
+<a name="line475">475: </a>  <font color="#B22222">/* Form the explicit system matrix */</font>
+<a name="line476">476: </a>  DHii = T12;
+<a name="line477">477: </a>  PetscMemzero(DHii,k*k*nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line478">478: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
+<a name="line479">479: </a>  <font color="#4169E1">for</font> (l=2;l<nmat;l++) {
 <a name="line480">480: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line481">481: </a>      PetscMemcpy(T12+i*k+j*lda,Ts+j*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line482">482: </a>    }  
-<a name="line483">483: </a>  }
-<a name="line484">484: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,nmat-1,NULL,&Md);
-<a name="line485">485: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) ts[i] = 1.0;
-<a name="line486">486: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line487">487: </a>    MatDenseGetArray(Md,&array);
-<a name="line488">488: </a>    PetscMemcpy(array,T12+k+j*lda,(nmat-1)*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line489">489: </a>    MatDenseRestoreArray(Md,&array);
-<a name="line490">490: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,nmat-1);
-<a name="line491">491: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,Md);
-<a name="line492">492: </a>    <font color="#4169E1">for</font> (i=nmat-1;i>0;i--) {
-<a name="line493">493: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i-1,&vc0);
-<a name="line494">494: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&vc);
-<a name="line495">495: </a>      MatMult(A[i],vc0,vc);
-<a name="line496">496: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i-1,&vc0);
-<a name="line497">497: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&vc);
-<a name="line498">498: </a>    }
-<a name="line499">499: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,1,nmat);
-<a name="line500">500: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,0,&vc0);
-<a name="line501">501: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(W,1.0,0.0,vc0,ts);
-<a name="line502">502: </a>    VecGetArrayRead(vc0,&carray);
-<a name="line503">503: </a>    idx = matctx->map1[j];
-<a name="line504">504: </a>    MatSetValues(M,m0-n0,matctx->map0+n0,1,&idx,carray,INSERT_VALUES);   
-<a name="line505">505: </a>    VecRestoreArrayRead(vc0,&carray);
-<a name="line506">506: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,0,&vc0);
-<a name="line507">507: </a>  }
-<a name="line508">508: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
-<a name="line509">509: </a>  MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);
-<a name="line510">510: </a>  KSPSetOperators(ksp,M,M);
-<a name="line511">511: </a>  KSPSetUp(ksp);
-<a name="line512">512: </a>  PetscFree(ts);
-<a name="line513">513: </a>  MatDestroy(&Mk);
-<a name="line514">514: </a>  MatDestroy(&Md);
-<a name="line515">515: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line516">516: </a>    PetscFree(At);
-<a name="line517">517: </a>  }
-<a name="line518">518: </a>  <font color="#4169E1">return</font>(0);
-<a name="line519">519: </a>}
-<a name="line520">520: </a> 
-<a name="line523">523: </a><strong><font color="#4169E1"><a name="NRefSysSolve_explicit"></a>static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScalar *Rh,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx)</font></strong>
-<a name="line524">524: </a>{
-<a name="line525">525: </a>  PetscErrorCode    ierr;
-<a name="line526">526: </a>  PetscInt          n0,m0,n1,m1,i;
-<a name="line527">527: </a>  PetscScalar       *arrayV;
-<a name="line528">528: </a>  const PetscScalar *array;
-<a name="line529">529: </a>  KSPConvergedReason reason;
-
-<a name="line532">532: </a>  MatGetOwnershipRange(matctx->E[1],&n1,&m1);
-<a name="line533">533: </a>  MatGetOwnershipRange(matctx->E[0],&n0,&m0);
-<a name="line534">534: </a>  <font color="#B22222">/* Right side */</font>  
-<a name="line535">535: </a>  VecGetArrayRead(Rv,&array);
-<a name="line536">536: </a>  VecSetValues(matctx->tN,m0-n0,matctx->map0+n0,array,INSERT_VALUES);
-<a name="line537">537: </a>  VecRestoreArrayRead(Rv,&array);
-<a name="line538">538: </a>  VecSetValues(matctx->tN,m1-n1,matctx->map1+n1,Rh+n1,INSERT_VALUES);
-<a name="line539">539: </a>  VecAssemblyBegin(matctx->tN);
-<a name="line540">540: </a>  VecAssemblyEnd(matctx->tN);
-
-<a name="line542">542: </a>  <font color="#B22222">/* Solve */</font>
-<a name="line543">543: </a>  KSPSolve(ksp,matctx->tN,matctx->ttN);
-<a name="line544">544: </a>  KSPGetConvergedReason(ksp,&reason);
-<a name="line545">545: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
-<a name="line546">546: </a> 
-<a name="line547">547: </a> <font color="#B22222">/* Retrieve solution */</font>
-<a name="line548">548: </a>  VecGetArray(dVi,&arrayV);
-<a name="line549">549: </a>  VecGetArrayRead(matctx->ttN,&array);
-<a name="line550">550: </a>  PetscMemcpy(arrayV,array,(m0-n0)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line551">551: </a>  VecRestoreArray(dVi,&arrayV);
-<a name="line552">552: </a>  <font color="#4169E1">if</font> (!matctx->subc) {
-<a name="line553">553: </a>    VecGetArray(matctx->t1,&arrayV);
-<a name="line554">554: </a>    <font color="#4169E1">for</font> (i=0;i<m1-n1;i++) arrayV[i] =  array[m0-n0+i];
-<a name="line555">555: </a>    VecRestoreArray(matctx->t1,&arrayV);
-<a name="line556">556: </a>    VecRestoreArrayRead(matctx->ttN,&array);
-<a name="line557">557: </a>    VecScatterBegin(matctx->scatterctx,matctx->t1,matctx->vseq,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line558">558: </a>    VecScatterEnd(matctx->scatterctx,matctx->t1,matctx->vseq,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line559">559: </a>    VecGetArrayRead(matctx->vseq,&array);
-<a name="line560">560: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) dHi[i] = array[i];
-<a name="line561">561: </a>    VecRestoreArrayRead(matctx->vseq,&array);
-<a name="line562">562: </a>  }
-<a name="line563">563: </a>  <font color="#4169E1">return</font>(0);
-<a name="line564">564: </a>}
-
-<a name="line568">568: </a><strong><font color="#4169E1"><a name="NRefSysIter_explicit"></a>static PetscErrorCode NRefSysIter_explicit(PetscInt i,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,<a href="../../../../../docs/man [...]
-<a name="line569">569: </a>{
-<a name="line570">570: </a>  PetscErrorCode    ierr;
-<a name="line571">571: </a>  PetscInt          j,m,lda=pep->nmat*k,n0,m0,idx;
-<a name="line572">572: </a>  PetscScalar       *array2,h;
-<a name="line573">573: </a>  const PetscScalar *array;
-<a name="line574">574: </a>  Vec               R,Vi;
-<a name="line575">575: </a> 
-<a name="line577">577: </a>  <font color="#4169E1">if</font> (!matctx->subc) {
-<a name="line578">578: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) fh[j] = fH[j*k+i+i*lda];
-<a name="line579">579: </a>    h   = H[i+i*ldh];
-<a name="line580">580: </a>    idx = i;
-<a name="line581">581: </a>    R   = Rv;
-<a name="line582">582: </a>    Vi  = dVi;
-<a name="line583">583: </a>    NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,V,matctx,W,work,lwork);
-<a name="line584">584: </a>  } <font color="#4169E1">else</font> {
-<a name="line585">585: </a>    <font color="#4169E1">if</font> (i%matctx->subc->n==0 && (idx=i+matctx->subc->color)<k) {
-<a name="line586">586: </a>      <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) fh[j] = fH[j*k+idx+idx*lda];
-<a name="line587">587: </a>      h = H[idx+idx*ldh];
-<a name="line588">588: </a>      matctx->idx = idx;
-<a name="line589">589: </a>      NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,matctx->V,matctx,matctx->W,work,lwork);
-<a name="line590">590: </a>    } <font color="#4169E1">else</font> idx = matctx->idx;
-<a name="line591">591: </a>    VecScatterBegin(matctx->scatter_id[i%matctx->subc->n],Rv,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line592">592: </a>    VecScatterEnd(matctx->scatter_id[i%matctx->subc->n],Rv,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line593">593: </a>    VecGetArrayRead(matctx->tg,&array);
-<a name="line594">594: </a>    VecPlaceArray(matctx->t,array);
-<a name="line595">595: </a>    VecCopy(matctx->t,matctx->Rv);
-<a name="line596">596: </a>    VecResetArray(matctx->t);
-<a name="line597">597: </a>    VecRestoreArrayRead(matctx->tg,&array);
-<a name="line598">598: </a>    R  = matctx->Rv;
-<a name="line599">599: </a>    Vi = matctx->Vi;
-<a name="line600">600: </a>  }
-<a name="line601">601: </a>  <font color="#4169E1">if</font> (idx==i && idx<k) {
-<a name="line602">602: </a>    NRefSysSolve_explicit(k,ksp,R,Rh,Vi,dHi,matctx);
-<a name="line603">603: </a>  }
-<a name="line604">604: </a>  <font color="#4169E1">if</font> (matctx->subc) {
-<a name="line605">605: </a>    VecGetLocalSize(Vi,&m);
-<a name="line606">606: </a>    VecGetArrayRead(Vi,&array);
-<a name="line607">607: </a>    VecGetArray(matctx->tg,&array2);
-<a name="line608">608: </a>    PetscMemcpy(array2,array,m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line609">609: </a>    VecRestoreArray(matctx->tg,&array2);
-<a name="line610">610: </a>    VecRestoreArrayRead(Vi,&array);
-<a name="line611">611: </a>    VecScatterBegin(matctx->scatter_id[i%matctx->subc->n],matctx->tg,dVi,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line612">612: </a>    VecScatterEnd(matctx->scatter_id[i%matctx->subc->n],matctx->tg,dVi,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line613">613: </a>    MatGetOwnershipRange(matctx->E[0],&n0,&m0);
-<a name="line614">614: </a>    VecGetArrayRead(matctx->ttN,&array);
-<a name="line615">615: </a>    VecPlaceArray(matctx->tp,array+m0-n0);
-<a name="line616">616: </a>    VecScatterBegin(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);  
-<a name="line617">617: </a>    VecScatterEnd(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);  
-<a name="line618">618: </a>    VecResetArray(matctx->tp);
-<a name="line619">619: </a>    VecRestoreArrayRead(matctx->ttN,&array);
-<a name="line620">620: </a>    VecGetArrayRead(matctx->tpg,&array);
-<a name="line621">621: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) dHi[j] = array[j];
-<a name="line622">622: </a>    VecRestoreArrayRead(matctx->tpg,&array);
-<a name="line623">623: </a>  }
-<a name="line624">624: </a>  <font color="#4169E1">return</font>(0);
-<a name="line625">625: </a>}
-
-<a name="line629">629: </a><strong><font color="#4169E1"><a name="PEPNRefForwardSubstitution"></a>static PetscErrorCode PEPNRefForwardSubstitution(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,PetscScalar *work,PetscInt lw,MatExplicitCtx *matctx)</f [...]
-<a name="line630">630: </a>{
-<a name="line632">632: </a>  PetscInt       i,j,nmat=pep->nmat,nwu=0,lda=nmat*k;
-<a name="line633">633: </a>  PetscScalar    h,*fh,*Rh,*DfH;
-<a name="line634">634: </a>  PetscReal      norm;
-<a name="line635">635: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;
-<a name="line636">636: </a>  Vec            Rv,t,dvi;
-<a name="line637">637: </a>  FSubctx        *ctx;
-<a name="line638">638: </a>  Mat            M,*At;
-<a name="line639">639: </a>  PetscBool      flg,lindep;
-
-<a name="line642">642: </a>  *rds = 0;
-<a name="line643">643: </a>  DfH = work+nwu;
-<a name="line644">644: </a>  nwu += nmat*k*k;
-<a name="line645">645: </a>  Rh = work+nwu;
-<a name="line646">646: </a>  nwu += k;
-<a name="line647">647: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&t);
-<a name="line648">648: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&Rv);
-<a name="line649">649: </a>  KSPGetOperators(ksp,&M,NULL);
-<a name="line650">650: </a>  <font color="#4169E1">if</font> (matctx) {
-<a name="line651">651: </a>    fh = work+nwu;
-<a name="line652">652: </a>    nwu += nmat;
-<a name="line653">653: </a>  } <font color="#4169E1">else</font> {
-<a name="line654">654: </a>    MatShellGetContext(M,&ctx);
-<a name="line655">655: </a>    fh = ctx->fih;
-<a name="line656">656: </a>  }
-<a name="line657">657: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,PetscMax(k,nmat),&W);
-<a name="line658">658: </a>  PetscMemzero(dVS,2*k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line659">659: </a>  PetscMemzero(DfH,lda*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line660">660: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line661">661: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line662">662: </a>    PetscMalloc1(pep->nmat,&At);
-<a name="line663">663: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line664">664: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
-<a name="line665">665: </a>    }
-<a name="line666">666: </a>  } <font color="#4169E1">else</font> At = pep->A; 
-
-<a name="line668">668: </a>  <font color="#B22222">/* Main loop for computing the ith columns of dX and dS */</font>
-<a name="line669">669: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line670">670: </a>    h = H[i+i*ldh];
-
-<a name="line672">672: </a>    <font color="#B22222">/* Compute and update i-th column of the right hand side */</font>
-<a name="line673">673: </a>    PetscMemzero(Rh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line674">674: </a>    NRefRightSide(nmat,pep->pbc,At,k,pep->V,S,lds,i,H,ldh,fH,DfH,dH,dV,dVS,*rds,Rv,Rh,W,t,work+nwu,lw-nwu);
-
-<a name="line676">676: </a>    <font color="#B22222">/* Update and solve system */</font>
-<a name="line677">677: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(dV,i,&dvi);
-<a name="line678">678: </a>    <font color="#4169E1">if</font> (matctx) {
-<a name="line679">679: </a>      NRefSysIter_explicit(i,pep,k,ksp,fH,S,lds,fh,H,ldh,Rv,Rh,pep->V,dvi,dH+i*k,matctx,W,work+nwu,lw-nwu);
-<a name="line680">680: </a>      <font color="#4169E1">if</font> (i==0) matctx->computedt11 = PETSC_FALSE;
-<a name="line681">681: </a>    } <font color="#4169E1">else</font> {
-<a name="line682">682: </a>      <font color="#4169E1">for</font> (j=0;j<nmat;j++) fh[j] = fH[j*k+i+i*lda];
-<a name="line683">683: </a>      NRefSysIter_shell(pep,k,ksp,fH,S,lds,fh,h,Rv,Rh,pep->V,dvi,dH+i*k,W,t,work+nwu,lw-nwu);
-<a name="line684">684: </a>    }
-<a name="line685">685: </a>    <font color="#B22222">/* Orthogonalize computed solution */</font>
-<a name="line686">686: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(pep->V,dvi,dVS+i*2*k,&norm,&lindep);
-<a name="line687">687: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(dV,i,&dvi);
-<a name="line688">688: </a>    <font color="#4169E1">if</font> (!lindep) {
-<a name="line689">689: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(dV,i,dVS+k+i*2*k,&norm,&lindep);
-<a name="line690">690: </a>      <font color="#4169E1">if</font> (!lindep) {
-<a name="line691">691: </a>        dVS[k+i+i*2*k] = norm;
-<a name="line692">692: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(dV,i,1.0/norm);
-<a name="line693">693: </a>        (*rds)++;
-<a name="line694">694: </a>      }
-<a name="line695">695: </a>    }
-<a name="line696">696: </a>  }
-<a name="line697">697: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(dV,0,*rds);
-<a name="line698">698: </a>  VecDestroy(&t);
-<a name="line699">699: </a>  VecDestroy(&Rv);
-<a name="line700">700: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&W);
-<a name="line701">701: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line702">702: </a>    PetscFree(At);
-<a name="line703">703: </a>  }
-<a name="line704">704: </a>  <font color="#4169E1">return</font>(0);
-<a name="line705">705: </a>}
-
-<a name="line709">709: </a><strong><font color="#4169E1"><a name="NRefOrthogStep"></a>static PetscErrorCode NRefOrthogStep(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs,PetscScalar *work,PetscInt lwork)</font></strong>
-<a name="line710">710: </a>{
-<a name="line712">712: </a>  PetscInt       i,j,nmat=pep->nmat,deg=nmat-1,lda=nmat*k,nwu=0,rs=*prs,ldg;
-<a name="line713">713: </a>  PetscScalar    *T,*G,*tau,*array,sone=1.0,zero=0.0;
-<a name="line714">714: </a>  PetscBLASInt   rs_,lds_,k_,ldh_,lw_,info,ldg_,lda_;
-<a name="line715">715: </a>  Mat            M0;
-
-<a name="line718">718: </a>  T = work+nwu;
-<a name="line719">719: </a>  nwu += rs*k;
-<a name="line720">720: </a>  tau = work+nwu;
-<a name="line721">721: </a>  nwu += k;
-<a name="line722">722: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line723">723: </a>  PetscBLASIntCast(lda,&lda_);
-<a name="line724">724: </a>  PetscBLASIntCast(k,&k_);
-<a name="line725">725: </a>  PetscBLASIntCast(lwork-nwu,&lw_);
-<a name="line726">726: </a>  <font color="#4169E1">if</font> (rs>k) { <font color="#B22222">/* Truncate S to have k columns*/</font>
-<a name="line727">727: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line728">728: </a>      PetscMemcpy(T+j*rs,S+j*lds,rs*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line729">729: </a>    }
-<a name="line730">730: </a>    PetscBLASIntCast(rs,&rs_);
-<a name="line731">731: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&rs_,&k_,T,&rs_,tau,work+nwu,&lw_,&info));
-<a name="line732">732: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-<a name="line733">733: </a>    <font color="#B22222">/* Copy triangular matrix in S */</font>
-<a name="line734">734: </a>    PetscMemzero(S,lds*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line735">735: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) <font color="#4169E1">for</font> (i=0;i<=j;i++) S[j*lds+i] = T[j*rs+i];
-<a name="line736">736: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKorgqr"</font>,LAPACKorgqr_(&rs_,&k_,&k_,T,&rs_,tau,work+nwu,&lw_,&info));
-<a name="line737">737: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
-<a name="line738">738: </a>    MatCreateSeqDense(PETSC_COMM_SELF,rs,k,NULL,&M0);
-<a name="line739">739: </a>    MatDenseGetArray(M0,&array);
-<a name="line740">740: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line741">741: </a>      PetscMemcpy(array+j*rs,T+j*rs,rs*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line742">742: </a>    }
-<a name="line743">743: </a>    MatDenseRestoreArray(M0,&array);
-<a name="line744">744: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,rs);
-<a name="line745">745: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,M0,0,k);
-<a name="line746">746: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,k);
-<a name="line747">747: </a>    MatDestroy(&M0);
-<a name="line748">748: </a>    *prs = rs = k;
-<a name="line749">749: </a>  }
-<a name="line750">750: </a>  <font color="#B22222">/* Form auxiliary matrix for the orthogonalization step */</font>
-<a name="line751">751: </a>  G = work+nwu;
-<a name="line752">752: </a>  ldg = deg*k;
-<a name="line753">753: </a>  nwu += ldg*k;
-<a name="line754">754: </a>  PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);
-<a name="line755">755: </a>  PetscBLASIntCast(ldg,&ldg_);
-<a name="line756">756: </a>  PetscBLASIntCast(lwork-nwu,&lw_);
-<a name="line757">757: </a>  PetscBLASIntCast(ldh,&ldh_);
-<a name="line758">758: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
-<a name="line759">759: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,fH+j*k,&lda_,&zero,G+j*k,&ldg_));
-<a name="line760">760: </a>  }
-<a name="line761">761: </a>  <font color="#B22222">/* Orthogonalize and update S */</font>
-<a name="line762">762: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&ldg_,&k_,G,&ldg_,tau,work+nwu,&lw_,&info));
-<a name="line763">763: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-<a name="line764">764: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrsm"</font>,BLAStrsm_(<font color="#666666">"R"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&sone,G,&ldg_,S,&lds_));
-
-<a name="line766">766: </a>  <font color="#B22222">/* Update H */</font>
-<a name="line767">767: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrmm"</font>,BLAStrmm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&sone,G,&ldg_,H,&ldh_));
-<a name="line768">768: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrsm"</font>,BLAStrsm_(<font color="#666666">"R"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&sone,G,&ldg_,H,&ldh_));
-<a name="line769">769: </a>  <font color="#4169E1">return</font>(0);
-<a name="line770">770: </a>}
-
-<a name="line774">774: </a><strong><font color="#4169E1"><a name="PEPNRefUpdateInvPair"></a>static PetscErrorCode PEPNRefUpdateInvPair(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> dV,PetscScalar *dVS,PetscInt rds,PetscScalar *work,PetscInt lwork)</font></strong>
-<a name="line775">775: </a>{
-<a name="line777">777: </a>  PetscInt       i,j,nmat=pep->nmat,lda=nmat*k,nwu=0;
-<a name="line778">778: </a>  PetscScalar    *tau,*array;
-<a name="line779">779: </a>  PetscBLASInt   lds_,k_,lda_,ldh_,kdrs_,lw_,info,k2_;
-<a name="line780">780: </a>  Mat            M0;
-
-<a name="line783">783: </a>  tau = work+nwu;
-<a name="line784">784: </a>  nwu += k;
-<a name="line785">785: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line786">786: </a>  PetscBLASIntCast(lda,&lda_);
-<a name="line787">787: </a>  PetscBLASIntCast(ldh,&ldh_);
-<a name="line788">788: </a>  PetscBLASIntCast(k,&k_);
-<a name="line789">789: </a>  PetscBLASIntCast(2*k,&k2_);
-<a name="line790">790: </a>  PetscBLASIntCast((k+rds),&kdrs_);
-<a name="line791">791: </a>  <font color="#B22222">/* Update H */</font>
-<a name="line792">792: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line793">793: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) H[i+j*ldh] -= dH[i+j*k];
-<a name="line794">794: </a>  }
-<a name="line795">795: </a>  <font color="#B22222">/* Update V */</font>
-<a name="line796">796: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line797">797: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) dVS[i+j*2*k] = -dVS[i+j*2*k]+S[i+j*lds];
-<a name="line798">798: </a>    <font color="#4169E1">for</font> (i=k;i<2*k;i++) dVS[i+j*2*k] = -dVS[i+j*2*k];
-<a name="line799">799: </a>  }
-<a name="line800">800: </a>  PetscBLASIntCast(lwork-nwu,&lw_);
-<a name="line801">801: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&kdrs_,&k_,dVS,&k2_,tau,work+nwu,&lw_,&info));
-<a name="line802">802: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-<a name="line803">803: </a>  <font color="#B22222">/* Copy triangular matrix in S */</font>
-<a name="line804">804: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line805">805: </a>    <font color="#4169E1">for</font> (i=0;i<=j;i++) S[i+j*lds] = dVS[i+j*2*k];
-<a name="line806">806: </a>    <font color="#4169E1">for</font> (i=j+1;i<k;i++) S[i+j*lds] = 0.0;
-<a name="line807">807: </a>  }
-<a name="line808">808: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKorgqr"</font>,LAPACKorgqr_(&k2_,&k_,&k_,dVS,&k2_,tau,work+nwu,&lw_,&info));
-<a name="line809">809: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
-<a name="line810">810: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&M0);
-<a name="line811">811: </a>  MatDenseGetArray(M0,&array);
-<a name="line812">812: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line813">813: </a>    PetscMemcpy(array+j*k,dVS+j*2*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line814">814: </a>  }
-<a name="line815">815: </a>  MatDenseRestoreArray(M0,&array);
-<a name="line816">816: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,M0,0,k);
-<a name="line817">817: </a>  <font color="#4169E1">if</font> (rds) {
-<a name="line818">818: </a>    MatDenseGetArray(M0,&array);
-<a name="line819">819: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line820">820: </a>      PetscMemcpy(array+j*k,dVS+k+j*2*k,rds*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line821">821: </a>    }
-<a name="line822">822: </a>    MatDenseRestoreArray(M0,&array);
-<a name="line823">823: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(dV,M0,0,k);
-<a name="line824">824: </a>    <a href="../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(pep->V,1.0,dV);
-<a name="line825">825: </a>  }
-<a name="line826">826: </a>  MatDestroy(&M0);
-<a name="line827">827: </a>  NRefOrthogStep(pep,k,H,ldh,fH,S,lds,&k,work,lwork);
-<a name="line828">828: </a>  <font color="#4169E1">return</font>(0);
-<a name="line829">829: </a>}
-
-<a name="line833">833: </a><strong><font color="#4169E1"><a name="PEPNRefSetUpMatrices"></a>static PetscErrorCode PEPNRefSetUpMatrices(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *H,PetscInt ldh,Mat *M,Mat *P,MatExplicitCtx *matctx,PetscBool ini)</font></strong>
-<a name="line834">834: </a>{
-<a name="line835">835: </a>  PetscErrorCode    ierr;
-<a name="line836">836: </a>  FSubctx           *ctx;
-<a name="line837">837: </a>  PetscScalar       t,*coef;
-<a name="line838">838: </a>  const PetscScalar *array; 
-<a name="line839">839: </a>  MatStructure      str;
-<a name="line840">840: </a>  PetscInt          j,nmat=pep->nmat,n0,m0,n1,m1,n0_,m0_,n1_,m1_,N0,N1,p,*idx1,*idx2,count,si,i,l0;
-<a name="line841">841: </a>  MPI_Comm          comm;
-<a name="line842">842: </a>  PetscMPIInt       np;
-<a name="line843">843: </a>  const PetscInt    *rgs0,*rgs1;
-<a name="line844">844: </a>  Mat               B,C,*E,*A,*At;
-<a name="line845">845: </a>  IS                is1,is2;
-<a name="line846">846: </a>  Vec               v;
-<a name="line847">847: </a>  PetscBool         flg;
-
-<a name="line850">850: </a>  PetscMalloc1(nmat,&coef);
-<a name="line851">851: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line852">852: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line853">853: </a>    PetscMalloc1(pep->nmat,&At);
-<a name="line854">854: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line855">855: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
-<a name="line856">856: </a>    }
-<a name="line857">857: </a>  } <font color="#4169E1">else</font> At = pep->A;
-<a name="line858">858: </a>  <font color="#4169E1">if</font> (matctx) {
-<a name="line859">859: </a>    <font color="#4169E1">if</font> (ini) {
-<a name="line860">860: </a>      <font color="#4169E1">if</font> (matctx->subc) {
-<a name="line861">861: </a>        A = matctx->A;
-<a name="line862">862: </a>        comm = PetscSubcommChild(matctx->subc);
-<a name="line863">863: </a>      } <font color="#4169E1">else</font> {
-<a name="line864">864: </a>        A = At;
-<a name="line865">865: </a>        PetscObjectGetComm((PetscObject)pep,&comm);
-<a name="line866">866: </a>      }
-<a name="line867">867: </a>      E = matctx->E;
-<a name="line868">868: </a>      <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
-<a name="line869">869: </a>      MatDuplicate(A[0],MAT_COPY_VALUES,&E[0]);
-<a name="line870">870: </a>      j = (matctx->subc)?matctx->subc->color:0;
-<a name="line871">871: </a>      PEPEvaluateBasis(pep,H[j+j*ldh],0,coef,NULL);
-<a name="line872">872: </a>      <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
-<a name="line873">873: </a>        MatAXPY(E[0],coef[j],A[j],str);
-<a name="line874">874: </a>      }
-<a name="line875">875: </a>      MatCreateDense(comm,PETSC_DECIDE,PETSC_DECIDE,k,k,NULL,&E[1]);
-<a name="line876">876: </a>      MatAssemblyBegin(E[1],MAT_FINAL_ASSEMBLY);
-<a name="line877">877: </a>      MatAssemblyEnd(E[1],MAT_FINAL_ASSEMBLY);
-<a name="line878">878: </a>      MatGetOwnershipRange(E[0],&n0,&m0);
-<a name="line879">879: </a>      MatGetOwnershipRange(E[1],&n1,&m1);
-<a name="line880">880: </a>      MatGetOwnershipRangeColumn(E[0],&n0_,&m0_);
-<a name="line881">881: </a>      MatGetOwnershipRangeColumn(E[1],&n1_,&m1_);
-<a name="line882">882: </a>      <font color="#B22222">/* T12 and T21 are computed from V and V*, so,</font>
-<a name="line883">883: </a><font color="#B22222">         they must have the same column and row ranges */</font>
-<a name="line884">884: </a>      <font color="#4169E1">if</font> (m0_-n0_ != m0-n0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Inconsistent dimensions"</font>);
-<a name="line885">885: </a>      MatCreateDense(comm,m0-n0,m1_-n1_,PETSC_DECIDE,PETSC_DECIDE,NULL,&B);
-<a name="line886">886: </a>      MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY);
-<a name="line887">887: </a>      MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY);
-<a name="line888">888: </a>      MatCreateDense(comm,m1-n1,m0_-n0_,PETSC_DECIDE,PETSC_DECIDE,NULL,&C);
-<a name="line889">889: </a>      MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);
-<a name="line890">890: </a>      MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);
-<a name="line891">891: </a>      <a href="../../../../../docs/manualpages/sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</a>(1.0,E[0],1.0,B,1.0,C,1.0,E[1],M);
-<a name="line892">892: </a>      *P = *M;
-<a name="line893">893: </a>      MatDestroy(&B);
-<a name="line894">894: </a>      MatDestroy(&C);
-<a name="line895">895: </a>      matctx->computedt11 = PETSC_TRUE;
-<a name="line896">896: </a>      MatGetSize(E[0],NULL,&N0);
-<a name="line897">897: </a>      MatGetSize(E[1],NULL,&N1);
-<a name="line898">898: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)*M),&np);
-<a name="line899">899: </a>      MatGetOwnershipRanges(E[0],&rgs0);
-<a name="line900">900: </a>      MatGetOwnershipRanges(E[1],&rgs1);
-<a name="line901">901: </a>      PetscMalloc4(PetscMax(k,N1),&matctx->idxp,N0,&matctx->idxg,N0,&matctx->map0,N1,&matctx->map1);
-<a name="line902">902: </a>      <font color="#B22222">/* Create column (and row) mapping */</font>
-<a name="line903">903: </a>      <font color="#4169E1">for</font> (p=0;p<np;p++) {
-<a name="line904">904: </a>        <font color="#4169E1">for</font> (j=rgs0[p];j<rgs0[p+1];j++) matctx->map0[j] = j+rgs1[p];
-<a name="line905">905: </a>        <font color="#4169E1">for</font> (j=rgs1[p];j<rgs1[p+1];j++) matctx->map1[j] = j+rgs0[p+1];
-<a name="line906">906: </a>      }
-<a name="line907">907: </a>      MatCreateVecs(*M,NULL,&matctx->tN);
-<a name="line908">908: </a>      MatCreateVecs(matctx->E[1],NULL,&matctx->t1);
-<a name="line909">909: </a>      VecDuplicate(matctx->tN,&matctx->ttN);
-<a name="line910">910: </a>      <font color="#4169E1">if</font> (matctx->subc) {
-<a name="line911">911: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&np);
-<a name="line912">912: </a>        count = np*k;
-<a name="line913">913: </a>        PetscMalloc2(count,&idx1,count,&idx2);
-<a name="line914">914: </a>        VecCreateMPI(PetscObjectComm((PetscObject)pep),m1-n1,PETSC_DECIDE,&matctx->tp);
-<a name="line915">915: </a>        VecGetOwnershipRange(matctx->tp,&l0,NULL);
-<a name="line916">916: </a>        VecCreateMPI(PetscObjectComm((PetscObject)pep),k,PETSC_DECIDE,&matctx->tpg);
-<a name="line917">917: </a>        <font color="#4169E1">for</font> (si=0;si<matctx->subc->n;si++) {
-<a name="line918">918: </a>          <font color="#4169E1">if</font> (matctx->subc->color==si) {
-<a name="line919">919: </a>            j=0;
-<a name="line920">920: </a>            <font color="#4169E1">if</font> (matctx->subc->color==si) {
-<a name="line921">921: </a>              <font color="#4169E1">for</font> (p=0;p<np;p++) {
-<a name="line922">922: </a>                <font color="#4169E1">for</font> (i=n1;i<m1;i++) {
-<a name="line923">923: </a>                  idx1[j] = l0+i-n1;
-<a name="line924">924: </a>                  idx2[j++] =p*k+i;
-<a name="line925">925: </a>                }
-<a name="line926">926: </a>              }
-<a name="line927">927: </a>            }
-<a name="line928">928: </a>            count = np*(m1-n1);
-<a name="line929">929: </a>          } <font color="#4169E1">else</font> count =0;
-<a name="line930">930: </a>          ISCreateGeneral(PetscObjectComm((PetscObject)pep),count,idx1,PETSC_COPY_VALUES,&is1);
-<a name="line931">931: </a>          ISCreateGeneral(PetscObjectComm((PetscObject)pep),count,idx2,PETSC_COPY_VALUES,&is2);
-<a name="line932">932: </a>          VecScatterCreate(matctx->tp,is1,matctx->tpg,is2,&matctx->scatterp_id[si]);
-<a name="line933">933: </a>          ISDestroy(&is1);
-<a name="line934">934: </a>          ISDestroy(&is2);
-<a name="line935">935: </a>        }
-<a name="line936">936: </a>        PetscFree2(idx1,idx2);
-<a name="line937">937: </a>      } <font color="#4169E1">else</font> {
-<a name="line938">938: </a>        VecScatterCreateToAll(matctx->t1,&matctx->scatterctx,&matctx->vseq);
-<a name="line939">939: </a>      }
-<a name="line940">940: </a>    } <font color="#4169E1">else</font> {
-<a name="line941">941: </a>      <font color="#4169E1">if</font> (matctx->subc) {
-<a name="line942">942: </a>        <font color="#B22222">/* Scatter vectors pep->V */</font>
-<a name="line943">943: </a>        <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line944">944: </a>          <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
-<a name="line945">945: </a>          VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line946">946: </a>          VecScatterEnd(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line947">947: </a>          <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
-<a name="line948">948: </a>          VecGetArrayRead(matctx->tg,&array);
-<a name="line949">949: </a>          VecPlaceArray(matctx->t,(const PetscScalar*)array);
-<a name="line950">950: </a>          <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(matctx->V,i,matctx->t);
-<a name="line951">951: </a>          VecResetArray(matctx->t);
-<a name="line952">952: </a>          VecRestoreArrayRead(matctx->tg,&array);
-<a name="line953">953: </a>        }
-<a name="line954">954: </a>      }
-<a name="line955">955: </a>    }
-<a name="line956">956: </a>  } <font color="#4169E1">else</font> {
-<a name="line957">957: </a>    <font color="#4169E1">if</font> (ini) {
-<a name="line958">958: </a>      PetscObjectGetComm((PetscObject)pep,&comm);
-<a name="line959">959: </a>      MatGetSize(At[0],&m0,&n0);
-<a name="line960">960: </a>      PetscMalloc1(1,&ctx);
-<a name="line961">961: </a>      <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
-<a name="line962">962: </a>      <font color="#B22222">/* Create a shell matrix to solve the linear system */</font>
-<a name="line963">963: </a>      ctx->A = At;
-<a name="line964">964: </a>      ctx->V = pep->V;
-<a name="line965">965: </a>      ctx->k = k; ctx->nmat = nmat;
-<a name="line966">966: </a>      PetscMalloc3(k*k*nmat,&ctx->Mm,2*k*k,&ctx->work,nmat,&ctx->fih);
-<a name="line967">967: </a>      PetscMemzero(ctx->Mm,k*k*nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line968">968: </a>      <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&ctx->w1);
-<a name="line969">969: </a>      <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&ctx->w2);
-<a name="line970">970: </a>      MatCreateShell(comm,PETSC_DECIDE,PETSC_DECIDE,m0,n0,ctx,M);
-<a name="line971">971: </a>      MatShellSetOperation(*M,MATOP_MULT,(void(*)(void))MatFSMult);
-<a name="line972">972: </a>    }
-<a name="line973">973: </a>    <font color="#B22222">/* Compute a precond matrix for the system */</font>
-<a name="line974">974: </a>    t = 0.0;
-<a name="line975">975: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) t += H[j+j*ldh];
-<a name="line976">976: </a>    t /= k;
-<a name="line977">977: </a>    <font color="#4169E1">if</font> (ini) {
-<a name="line978">978: </a>      MatDuplicate(At[0],MAT_COPY_VALUES,P);
-<a name="line979">979: </a>    } <font color="#4169E1">else</font> {
-<a name="line980">980: </a>      MatCopy(At[0],*P,str);
-<a name="line981">981: </a>    }
-<a name="line982">982: </a>    PEPEvaluateBasis(pep,t,0,coef,NULL);
-<a name="line983">983: </a>    <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
-<a name="line984">984: </a>      MatAXPY(*P,coef[j],At[j],str);
-<a name="line985">985: </a>    }
-<a name="line986">986: </a>  }
-<a name="line987">987: </a>  PetscFree(coef);
-<a name="line988">988: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line989">989: </a>    PetscFree(At);
-<a name="line990">990: </a>  }
-<a name="line991">991: </a>  <font color="#4169E1">return</font>(0);
-<a name="line992">992: </a>}
-
-<a name="line996">996: </a><strong><font color="#4169E1"><a name="NRefSubcommSetup"></a>static PetscErrorCode NRefSubcommSetup(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,MatExplicitCtx *matctx,PetscInt nsubc)</font></strong>
-<a name="line997">997: </a>{
-<a name="line998">998: </a>  PetscErrorCode    ierr;
-<a name="line999">999: </a>  PetscInt          i,si,j,m0,n0,nloc0,nloc_sub,*idx1,*idx2;
-<a name="line1000">1000: </a>  IS                is1,is2;
-<a name="line1001">1001: </a>  <a href="../../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>            type;
-<a name="line1002">1002: </a>  Vec               v;
-<a name="line1003">1003: </a>  const PetscScalar *array;
-<a name="line1004">1004: </a>  Mat               *A;
-<a name="line1005">1005: </a>  PetscBool         flg;
-
-<a name="line1008">1008: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line1009">1009: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1010">1010: </a>    PetscMalloc1(pep->nmat,&A);
-<a name="line1011">1011: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line1012">1012: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&A[i]);
-<a name="line1013">1013: </a>    }
-<a name="line1014">1014: </a>  } <font color="#4169E1">else</font> A = pep->A;
-<a name="line1015">1015: </a>  
-<a name="line1016">1016: </a>  <font color="#B22222">/* Duplicate pep matrices */</font>
-<a name="line1017">1017: </a>  PetscMalloc3(pep->nmat,&matctx->A,nsubc,&matctx->scatter_id,nsubc,&matctx->scatterp_id);
-<a name="line1018">1018: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line1019">1019: </a>    MatCreateRedundantMatrix(A[i],0,PetscSubcommChild(matctx->subc),MAT_INITIAL_MATRIX,&matctx->A[i]);    
-<a name="line1020">1020: </a>  }
-
-<a name="line1022">1022: </a>  <font color="#B22222">/* Create Scatter */</font>
-<a name="line1023">1023: </a>  MatCreateVecs(matctx->A[0],&matctx->t,NULL);
-<a name="line1024">1024: </a>  MatGetLocalSize(matctx->A[0],&nloc_sub,NULL);
-<a name="line1025">1025: </a>  VecCreateMPI(PetscSubcommContiguousParent(matctx->subc),nloc_sub,PETSC_DECIDE,&matctx->tg);
-<a name="line1026">1026: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
-<a name="line1027">1027: </a>  VecGetOwnershipRange(v,&n0,&m0);
-<a name="line1028">1028: </a>  nloc0 = m0-n0;
-<a name="line1029">1029: </a>  PetscMalloc2(matctx->subc->n*nloc0,&idx1,matctx->subc->n*nloc0,&idx2);
-<a name="line1030">1030: </a>  j = 0;
-<a name="line1031">1031: </a>  <font color="#4169E1">for</font> (si=0;si<matctx->subc->n;si++) {
-<a name="line1032">1032: </a>    <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
-<a name="line1033">1033: </a>      idx1[j]   = i;
-<a name="line1034">1034: </a>      idx2[j++] = i+pep->n*si;
-<a name="line1035">1035: </a>    }
-<a name="line1036">1036: </a>  }
-<a name="line1037">1037: </a>  ISCreateGeneral(PetscObjectComm((PetscObject)pep),matctx->subc->n*nloc0,idx1,PETSC_COPY_VALUES,&is1);
-<a name="line1038">1038: </a>  ISCreateGeneral(PetscObjectComm((PetscObject)pep),matctx->subc->n*nloc0,idx2,PETSC_COPY_VALUES,&is2);
-<a name="line1039">1039: </a>  VecScatterCreate(v,is1,matctx->tg,is2,&matctx->scatter_sub);
-<a name="line1040">1040: </a>  ISDestroy(&is1);
-<a name="line1041">1041: </a>  ISDestroy(&is2);
-<a name="line1042">1042: </a>  <font color="#4169E1">for</font> (si=0;si<matctx->subc->n;si++) {
-<a name="line1043">1043: </a>    j=0;
-<a name="line1044">1044: </a>    <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
-<a name="line1045">1045: </a>      idx1[j] = i;
-<a name="line1046">1046: </a>      idx2[j++] = i+pep->n*si;
-<a name="line1047">1047: </a>    }
-<a name="line1048">1048: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)pep),nloc0,idx1,PETSC_COPY_VALUES,&is1);
-<a name="line1049">1049: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)pep),nloc0,idx2,PETSC_COPY_VALUES,&is2);
-<a name="line1050">1050: </a>    VecScatterCreate(v,is1,matctx->tg,is2,&matctx->scatter_id[si]);
-<a name="line1051">1051: </a>    ISDestroy(&is1);
-<a name="line1052">1052: </a>    ISDestroy(&is2);
-<a name="line1053">1053: </a>  }
-<a name="line1054">1054: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
-<a name="line1055">1055: </a>  PetscFree2(idx1,idx2);
-
-<a name="line1057">1057: </a>  <font color="#B22222">/* Duplicate pep->V vecs */</font>
-<a name="line1058">1058: </a>  <a href="../../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(pep->V,&type);
-<a name="line1059">1059: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscSubcommChild(matctx->subc),&matctx->V);
-<a name="line1060">1060: </a>  <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(matctx->V,type);
-<a name="line1061">1061: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(matctx->V,matctx->t,k);
-<a name="line1062">1062: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(matctx->V,PetscMax(k,pep->nmat),&matctx->W);
-<a name="line1063">1063: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line1064">1064: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
-<a name="line1065">1065: </a>    VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line1066">1066: </a>    VecScatterEnd(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line1067">1067: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
-<a name="line1068">1068: </a>    VecGetArrayRead(matctx->tg,&array);
-<a name="line1069">1069: </a>    VecPlaceArray(matctx->t,(const PetscScalar*)array);
-<a name="line1070">1070: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(matctx->V,i,matctx->t);
-<a name="line1071">1071: </a>    VecResetArray(matctx->t);
-<a name="line1072">1072: </a>    VecRestoreArrayRead(matctx->tg,&array);
-<a name="line1073">1073: </a>  }
-
-<a name="line1075">1075: </a>  VecDuplicate(matctx->t,&matctx->Rv);
-<a name="line1076">1076: </a>  VecDuplicate(matctx->t,&matctx->Vi);
-<a name="line1077">1077: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1078">1078: </a>    PetscFree(A);
-<a name="line1079">1079: </a>  }
-<a name="line1080">1080: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1081">1081: </a>}
-
-<a name="line1085">1085: </a><strong><font color="#4169E1"><a name="NRefSubcommDestroy"></a>static PetscErrorCode NRefSubcommDestroy(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,MatExplicitCtx *matctx)</font></strong>
-<a name="line1086">1086: </a>{
-<a name="line1088">1088: </a>  PetscInt       i;
-
-<a name="line1091">1091: </a>  VecScatterDestroy(&matctx->scatter_sub);
-<a name="line1092">1092: </a>  <font color="#4169E1">for</font> (i=0;i<matctx->subc->n;i++) {
-<a name="line1093">1093: </a>    VecScatterDestroy(&matctx->scatter_id[i]);
-<a name="line1094">1094: </a>    VecScatterDestroy(&matctx->scatterp_id[i]);
+<a name="line481">481: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line482">482: </a>        DHii[l*k+i+j*lda] = ((h-b[l-1])*DHii[(l-1)*k+i+j*lda]+fH[(l-1)*k+i+j*lda]-g[l-1]*DHii[(l-2)*k+i+j*lda])/a[l-1];
+<a name="line483">483: </a>      }
+<a name="line484">484: </a>    }
+<a name="line485">485: </a>  }
+
+<a name="line487">487: </a>  <font color="#B22222">/* T11 */</font>
+<a name="line488">488: </a>  <font color="#4169E1">if</font> (!matctx->compM1) {
+<a name="line489">489: </a>    MatCopy(A[0],M1,DIFFERENT_NONZERO_PATTERN);
+<a name="line490">490: </a>    PEPEvaluateBasis(pep,h,0,Ts,NULL);
+<a name="line491">491: </a>    <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line492">492: </a>      MatAXPY(M1,Ts[j],A[j],str);
+<a name="line493">493: </a>    }
+<a name="line494">494: </a>  }
+
+<a name="line496">496: </a>  <font color="#B22222">/* T22 */</font>
+<a name="line497">497: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line498">498: </a>  PetscBLASIntCast(k,&k_);
+<a name="line499">499: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line500">500: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
+<a name="line501">501: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line502">502: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
+<a name="line503">503: </a>    s = (i==1)?0.0:1.0;
+<a name="line504">504: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,M4,&k_));
+<a name="line505">505: </a>  }
+
+<a name="line507">507: </a>  <font color="#B22222">/* T12 */</font>
+<a name="line508">508: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&Mk);
+<a name="line509">509: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line510">510: </a>    MatDenseGetArray(Mk,&array);
+<a name="line511">511: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,array,&k_));
+<a name="line512">512: </a>    MatDenseRestoreArray(Mk,&array);
+<a name="line513">513: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,k);
+<a name="line514">514: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,Mk);
+<a name="line515">515: </a>    <font color="#4169E1">if</font> (i==1) {
+<a name="line516">516: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(W,A[i],M2);
+<a name="line517">517: </a>    } <font color="#4169E1">else</font> {
+<a name="line518">518: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(W,A[i],M3); <font color="#B22222">/* using M3 as work space */</font>
+<a name="line519">519: </a>      <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(M2,1.0,1.0,M3,NULL);
+<a name="line520">520: </a>    }
+<a name="line521">521: </a>  }
+
+<a name="line523">523: </a>  <font color="#B22222">/* T21 */</font>
+<a name="line524">524: </a>  MatDenseGetArray(Mk,&array);
+<a name="line525">525: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line526">526: </a>    s = (i==1)?0.0:1.0;
+<a name="line527">527: </a>    ss = PetscConj(fh[i]);
+<a name="line528">528: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&ss,S,&lds_,fH+i*k,&lda_,&s,array,&k_));
+<a name="line529">529: </a>  }
+<a name="line530">530: </a>  MatDenseRestoreArray(Mk,&array);
+<a name="line531">531: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(M3,0,k);
+<a name="line532">532: </a>  <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(M3,1.0,0.0,V,Mk);
+<a name="line533">533: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line534">534: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(M3,i,&vc);
+<a name="line535">535: </a>    VecConjugate(vc);
+<a name="line536">536: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(M3,i,&vc);
+<a name="line537">537: </a>  }
+
+<a name="line539">539: </a>  KSPSetOperators(ksp,M1,M1);
+<a name="line540">540: </a>  KSPSetUp(ksp);
+<a name="line541">541: </a>  MatDestroy(&Mk);
+
+<a name="line543">543: </a>  <font color="#B22222">/* Set up for BEMW */</font>
+<a name="line544">544: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line545">545: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(M2,i,&vc);
+<a name="line546">546: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&vc2);
+<a name="line547">547: </a>    NRefSysSolve_mbe(k,i,W,w,Wt,wt,d,dt,ksp,M2,M3,M4,PETSC_FALSE,vc,M4+i*k,vc2,w+i*k,matctx->t);
+<a name="line548">548: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(M2,i,&vc);
+<a name="line549">549: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(M3,i,&vc);
+<a name="line550">550: </a>    VecConjugate(vc);
+<a name="line551">551: </a>    VecDot(vc2,vc,&d[i]);
+<a name="line552">552: </a>    VecConjugate(vc);
+<a name="line553">553: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(M3,i,&vc);
+<a name="line554">554: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) d[i] += M4[i+j*k]*w[j+i*k];
+<a name="line555">555: </a>    d[i] = M4[i+i*k]-d[i];
+<a name="line556">556: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&vc2);
+
+<a name="line558">558: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(M3,i,&vc);
+<a name="line559">559: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Wt,i,&vc2);
+<a name="line560">560: </a>    <font color="#4169E1">for</font> (j=0;j<=i;j++) Ts[j] = M4[i+j*k];
+<a name="line561">561: </a>    NRefSysSolve_mbe(k,i,W,w,Wt,wt,d,dt,ksp,M2,M3,M4,PETSC_TRUE,vc,Ts,vc2,wt+i*k,matctx->t);
+<a name="line562">562: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(M3,i,&vc);
+<a name="line563">563: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(M2,i,&vc);
+<a name="line564">564: </a>    VecConjugate(vc2);
+<a name="line565">565: </a>    VecDot(vc,vc2,&dt[i]);
+<a name="line566">566: </a>    VecConjugate(vc2);
+<a name="line567">567: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(M2,i,&vc);
+<a name="line568">568: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) dt[i] += M4[j+i*k]*wt[j+i*k];
+<a name="line569">569: </a>    dt[i] = M4[i+i*k]-dt[i];
+<a name="line570">570: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Wt,i,&vc2);
+<a name="line571">571: </a>  }
+
+<a name="line573">573: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line574">574: </a>    PetscFree(At);
+<a name="line575">575: </a>  }
+<a name="line576">576: </a>  PetscFree3(T12,Tr,Ts);
+<a name="line577">577: </a>  <font color="#4169E1">return</font>(0);
+<a name="line578">578: </a>}
+
+<a name="line582">582: </a><strong><font color="#4169E1"><a name="NRefSysSetup_explicit"></a>static PetscErrorCode NRefSysSetup_explicit(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar h,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,MatExplicitCtx *matctx,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line583">583: </a>{
+<a name="line584">584: </a>  PetscErrorCode    ierr;
+<a name="line585">585: </a>  PetscInt          i,j,d,n,n0,m0,n1,m1,nmat=pep->nmat,lda=nmat*k,deg=nmat-1;
+<a name="line586">586: </a>  PetscInt          *idxg=matctx->idxg,*idxp=matctx->idxp,idx,ncols;
+<a name="line587">587: </a>  Mat               M,*E=matctx->E,*A,*At,Mk,Md;
+<a name="line588">588: </a>  PetscReal         *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
+<a name="line589">589: </a>  PetscScalar       s,ss,*DHii,*T22,*T21,*T12,*Ts,*Tr,*array,*ts,sone=1.0,zero=0.0;
+<a name="line590">590: </a>  PetscBLASInt      lds_,lda_,k_;
+<a name="line591">591: </a>  const PetscInt    *idxmc;
+<a name="line592">592: </a>  const PetscScalar *valsc,*carray;
+<a name="line593">593: </a>  MatStructure      str;
+<a name="line594">594: </a>  Vec               vc,vc0;
+<a name="line595">595: </a>  PetscBool         flg;
+
+<a name="line598">598: </a>  PetscMalloc5(k*k,&T22,k*k,&T21,nmat*k*k,&T12,k*k,&Tr,k*k,&Ts);
+<a name="line599">599: </a>  <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line600">600: </a>  KSPGetOperators(ksp,&M,NULL);
+<a name="line601">601: </a>  MatGetOwnershipRange(E[1],&n1,&m1);
+<a name="line602">602: </a>  MatGetOwnershipRange(E[0],&n0,&m0);
+<a name="line603">603: </a>  MatGetOwnershipRange(M,&n,NULL);
+<a name="line604">604: </a>  PetscMalloc1(nmat,&ts);
+<a name="line605">605: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line606">606: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line607">607: </a>    PetscMalloc1(pep->nmat,&At);
+<a name="line608">608: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line609">609: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
+<a name="line610">610: </a>    }
+<a name="line611">611: </a>  } <font color="#4169E1">else</font> At = pep->A;
+<a name="line612">612: </a>  <font color="#4169E1">if</font> (matctx->subc) A = matctx->A;
+<a name="line613">613: </a>  <font color="#4169E1">else</font> A = At;
+<a name="line614">614: </a>  <font color="#B22222">/* Form the explicit system matrix */</font>
+<a name="line615">615: </a>  DHii = T12;
+<a name="line616">616: </a>  PetscMemzero(DHii,k*k*nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line617">617: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) DHii[k+i+i*lda] = 1.0/a[0];
+<a name="line618">618: </a>  <font color="#4169E1">for</font> (d=2;d<nmat;d++) {
+<a name="line619">619: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line620">620: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line621">621: </a>        DHii[d*k+i+j*lda] = ((h-b[d-1])*DHii[(d-1)*k+i+j*lda]+fH[(d-1)*k+i+j*lda]-g[d-1]*DHii[(d-2)*k+i+j*lda])/a[d-1];
+<a name="line622">622: </a>      }
+<a name="line623">623: </a>    }
+<a name="line624">624: </a>  }
+
+<a name="line626">626: </a>  <font color="#B22222">/* T11 */</font>
+<a name="line627">627: </a>  <font color="#4169E1">if</font> (!matctx->compM1) {
+<a name="line628">628: </a>    MatCopy(A[0],E[0],DIFFERENT_NONZERO_PATTERN);
+<a name="line629">629: </a>    PEPEvaluateBasis(pep,h,0,Ts,NULL);
+<a name="line630">630: </a>    <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line631">631: </a>      MatAXPY(E[0],Ts[j],A[j],str);
+<a name="line632">632: </a>    }
+<a name="line633">633: </a>  }
+<a name="line634">634: </a>  <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line635">635: </a>    MatGetRow(E[0],i,&ncols,&idxmc,&valsc);
+<a name="line636">636: </a>    idx = n+i-n0;
+<a name="line637">637: </a>    <font color="#4169E1">for</font> (j=0;j<ncols;j++) {
+<a name="line638">638: </a>      idxg[j] = matctx->map0[idxmc[j]];
+<a name="line639">639: </a>    }
+<a name="line640">640: </a>    MatSetValues(M,1,&idx,ncols,idxg,valsc,INSERT_VALUES);
+<a name="line641">641: </a>    MatRestoreRow(E[0],i,&ncols,&idxmc,&valsc);
+<a name="line642">642: </a>  }
+
+<a name="line644">644: </a>  <font color="#B22222">/* T22 */</font>
+<a name="line645">645: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line646">646: </a>  PetscBLASIntCast(k,&k_);
+<a name="line647">647: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line648">648: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,S,&lds_,&zero,Tr,&k_));
+<a name="line649">649: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line650">650: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,Tr,&k_,DHii+i*k,&lda_,&zero,Ts,&k_));
+<a name="line651">651: </a>    s = (i==1)?0.0:1.0;
+<a name="line652">652: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,fH+i*k,&lda_,Ts,&k_,&s,T22,&k_));
+<a name="line653">653: </a>  }
+<a name="line654">654: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) idxp[j] = matctx->map1[j];
+<a name="line655">655: </a>  <font color="#4169E1">for</font> (i=0;i<m1-n1;i++) {
+<a name="line656">656: </a>    idx = n+m0-n0+i;
+<a name="line657">657: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line658">658: </a>      Tr[j] = T22[n1+i+j*k];
+<a name="line659">659: </a>    }
+<a name="line660">660: </a>    MatSetValues(M,1,&idx,k,idxp,Tr,INSERT_VALUES);
+<a name="line661">661: </a>  }
+
+<a name="line663">663: </a>  <font color="#B22222">/* T21 */</font>
+<a name="line664">664: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line665">665: </a>    s = (i==1)?0.0:1.0;
+<a name="line666">666: </a>    ss = PetscConj(fh[i]);
+<a name="line667">667: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&ss,S,&lds_,fH+i*k,&lda_,&s,T21,&k_));
+<a name="line668">668: </a>  }
+<a name="line669">669: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,k);
+<a name="line670">670: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,T21,&Mk);
+<a name="line671">671: </a>  <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,Mk);
+<a name="line672">672: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line673">673: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&vc);
+<a name="line674">674: </a>    VecConjugate(vc);
+<a name="line675">675: </a>    VecGetArrayRead(vc,&carray);
+<a name="line676">676: </a>    idx = matctx->map1[i];
+<a name="line677">677: </a>    MatSetValues(M,1,&idx,m0-n0,matctx->map0+n0,carray,INSERT_VALUES);
+<a name="line678">678: </a>    VecRestoreArrayRead(vc,&carray);
+<a name="line679">679: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&vc);
+<a name="line680">680: </a>  }
+
+<a name="line682">682: </a>  <font color="#B22222">/* T12 */</font>
+<a name="line683">683: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line684">684: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,DHii+i*k,&lda_,&zero,Ts,&k_));
+<a name="line685">685: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line686">686: </a>      PetscMemcpy(T12+i*k+j*lda,Ts+j*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line687">687: </a>    }
+<a name="line688">688: </a>  }
+<a name="line689">689: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,nmat-1,NULL,&Md);
+<a name="line690">690: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) ts[i] = 1.0;
+<a name="line691">691: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line692">692: </a>    MatDenseGetArray(Md,&array);
+<a name="line693">693: </a>    PetscMemcpy(array,T12+k+j*lda,(nmat-1)*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line694">694: </a>    MatDenseRestoreArray(Md,&array);
+<a name="line695">695: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,0,nmat-1);
+<a name="line696">696: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(W,1.0,0.0,V,Md);
+<a name="line697">697: </a>    <font color="#4169E1">for</font> (i=nmat-1;i>0;i--) {
+<a name="line698">698: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i-1,&vc0);
+<a name="line699">699: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,i,&vc);
+<a name="line700">700: </a>      MatMult(A[i],vc0,vc);
+<a name="line701">701: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i-1,&vc0);
+<a name="line702">702: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,i,&vc);
+<a name="line703">703: </a>    }
+<a name="line704">704: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(W,1,nmat);
+<a name="line705">705: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(W,0,&vc0);
+<a name="line706">706: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(W,1.0,0.0,vc0,ts);
+<a name="line707">707: </a>    VecGetArrayRead(vc0,&carray);
+<a name="line708">708: </a>    idx = matctx->map1[j];
+<a name="line709">709: </a>    MatSetValues(M,m0-n0,matctx->map0+n0,1,&idx,carray,INSERT_VALUES);
+<a name="line710">710: </a>    VecRestoreArrayRead(vc0,&carray);
+<a name="line711">711: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(W,0,&vc0);
+<a name="line712">712: </a>  }
+<a name="line713">713: </a>  MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY);
+<a name="line714">714: </a>  MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY);
+<a name="line715">715: </a>  KSPSetOperators(ksp,M,M);
+<a name="line716">716: </a>  KSPSetUp(ksp);
+<a name="line717">717: </a>  PetscFree(ts);
+<a name="line718">718: </a>  MatDestroy(&Mk);
+<a name="line719">719: </a>  MatDestroy(&Md);
+<a name="line720">720: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line721">721: </a>    PetscFree(At);
+<a name="line722">722: </a>  }
+<a name="line723">723: </a>  PetscFree5(T22,T21,T12,Tr,Ts);
+<a name="line724">724: </a>  <font color="#4169E1">return</font>(0);
+<a name="line725">725: </a>}
+
+<a name="line729">729: </a><strong><font color="#4169E1"><a name="NRefSysSolve_explicit"></a>static PetscErrorCode NRefSysSolve_explicit(PetscInt k,KSP ksp,Vec Rv,PetscScalar *Rh,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx)</font></strong>
+<a name="line730">730: </a>{
+<a name="line731">731: </a>  PetscErrorCode     ierr;
+<a name="line732">732: </a>  PetscInt           n0,m0,n1,m1,i;
+<a name="line733">733: </a>  PetscScalar        *arrayV;
+<a name="line734">734: </a>  const PetscScalar  *array;
+<a name="line735">735: </a>  KSPConvergedReason reason;
+
+<a name="line738">738: </a>  MatGetOwnershipRange(matctx->E[1],&n1,&m1);
+<a name="line739">739: </a>  MatGetOwnershipRange(matctx->E[0],&n0,&m0);
+
+<a name="line741">741: </a>  <font color="#B22222">/* Right side */</font>
+<a name="line742">742: </a>  VecGetArrayRead(Rv,&array);
+<a name="line743">743: </a>  VecSetValues(matctx->tN,m0-n0,matctx->map0+n0,array,INSERT_VALUES);
+<a name="line744">744: </a>  VecRestoreArrayRead(Rv,&array);
+<a name="line745">745: </a>  VecSetValues(matctx->tN,m1-n1,matctx->map1+n1,Rh+n1,INSERT_VALUES);
+<a name="line746">746: </a>  VecAssemblyBegin(matctx->tN);
+<a name="line747">747: </a>  VecAssemblyEnd(matctx->tN);
+
+<a name="line749">749: </a>  <font color="#B22222">/* Solve */</font>
+<a name="line750">750: </a>  KSPSolve(ksp,matctx->tN,matctx->ttN);
+<a name="line751">751: </a>  KSPGetConvergedReason(ksp,&reason);
+<a name="line752">752: </a>  <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
+
+<a name="line754">754: </a>  <font color="#B22222">/* Retrieve solution */</font>
+<a name="line755">755: </a>  VecGetArray(dVi,&arrayV);
+<a name="line756">756: </a>  VecGetArrayRead(matctx->ttN,&array);
+<a name="line757">757: </a>  PetscMemcpy(arrayV,array,(m0-n0)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line758">758: </a>  VecRestoreArray(dVi,&arrayV);
+<a name="line759">759: </a>  <font color="#4169E1">if</font> (!matctx->subc) {
+<a name="line760">760: </a>    VecGetArray(matctx->t1,&arrayV);
+<a name="line761">761: </a>    <font color="#4169E1">for</font> (i=0;i<m1-n1;i++) arrayV[i] =  array[m0-n0+i];
+<a name="line762">762: </a>    VecRestoreArray(matctx->t1,&arrayV);
+<a name="line763">763: </a>    VecRestoreArrayRead(matctx->ttN,&array);
+<a name="line764">764: </a>    VecScatterBegin(matctx->scatterctx,matctx->t1,matctx->vseq,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line765">765: </a>    VecScatterEnd(matctx->scatterctx,matctx->t1,matctx->vseq,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line766">766: </a>    VecGetArrayRead(matctx->vseq,&array);
+<a name="line767">767: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) dHi[i] = array[i];
+<a name="line768">768: </a>    VecRestoreArrayRead(matctx->vseq,&array);
+<a name="line769">769: </a>  }
+<a name="line770">770: </a>  <font color="#4169E1">return</font>(0);
+<a name="line771">771: </a>}
+
+<a name="line775">775: </a><strong><font color="#4169E1"><a name="NRefSysIter"></a>static PetscErrorCode NRefSysIter(PetscInt i,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,KSP ksp,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscScalar *fh,PetscScalar *H,PetscInt ldh,Vec Rv,PetscScalar *Rh,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec dVi,PetscScalar *dHi,MatExplicitCtx *matctx,<a href="../../../../../docs/manualpages/BV/BV.htm [...]
+<a name="line776">776: </a>{
+<a name="line777">777: </a>  PetscErrorCode    ierr;
+<a name="line778">778: </a>  PetscInt          j,m,lda=pep->nmat*k,n0,m0,idx;
+<a name="line779">779: </a>  PetscMPIInt       root,len;
+<a name="line780">780: </a>  PetscScalar       *array2,h;
+<a name="line781">781: </a>  const PetscScalar *array;
+<a name="line782">782: </a>  Vec               R,Vi;
+<a name="line783">783: </a>  FSubctx           *ctx;
+<a name="line784">784: </a>  Mat               M;
+
+<a name="line787">787: </a>  <font color="#4169E1">if</font> (!matctx || !matctx->subc) {
+<a name="line788">788: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) fh[j] = fH[j*k+i+i*lda];
+<a name="line789">789: </a>    h   = H[i+i*ldh];
+<a name="line790">790: </a>    idx = i;
+<a name="line791">791: </a>    R   = Rv;
+<a name="line792">792: </a>    Vi  = dVi;
+<a name="line793">793: </a>    <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line794">794: </a>    <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line795">795: </a>      NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,V,matctx,W);
+<a name="line796">796: </a>      matctx->compM1 = PETSC_FALSE;
+<a name="line797">797: </a>      <font color="#4169E1">break</font>;
+<a name="line798">798: </a>    <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line799">799: </a>      NRefSysSetup_mbe(pep,k,ksp,fH,S,lds,fh,h,V,matctx);
+<a name="line800">800: </a>      matctx->compM1 = PETSC_FALSE;
+<a name="line801">801: </a>      <font color="#4169E1">break</font>;
+<a name="line802">802: </a>    <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line803">803: </a>      KSPGetOperators(ksp,&M,NULL);
+<a name="line804">804: </a>      MatShellGetContext(M,&ctx);
+<a name="line805">805: </a>      NRefSysSetup_shell(pep,k,fH,S,lds,fh,h,ctx);
+<a name="line806">806: </a>      ctx->compM1 = PETSC_FALSE;
+<a name="line807">807: </a>      <font color="#4169E1">break</font>;
+<a name="line808">808: </a>    }
+<a name="line809">809: </a>  } <font color="#4169E1">else</font> {
+<a name="line810">810: </a>    <font color="#4169E1">if</font> (i%matctx->subc->n==0 && (idx=i+matctx->subc->color)<k) {
+<a name="line811">811: </a>      <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) fh[j] = fH[j*k+idx+idx*lda];
+<a name="line812">812: </a>      h = H[idx+idx*ldh];
+<a name="line813">813: </a>      matctx->idx = idx;
+<a name="line814">814: </a>      <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line815">815: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line816">816: </a>        NRefSysSetup_explicit(pep,k,ksp,fH,S,lds,fh,h,matctx->V,matctx,matctx->W);
+<a name="line817">817: </a>        matctx->compM1 = PETSC_FALSE;
+<a name="line818">818: </a>        <font color="#4169E1">break</font>;
+<a name="line819">819: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line820">820: </a>        NRefSysSetup_mbe(pep,k,ksp,fH,S,lds,fh,h,matctx->V,matctx);
+<a name="line821">821: </a>        matctx->compM1 = PETSC_FALSE;
+<a name="line822">822: </a>        <font color="#4169E1">break</font>;
+<a name="line823">823: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line824">824: </a>        <font color="#4169E1">break</font>;
+<a name="line825">825: </a>      }
+<a name="line826">826: </a>    } <font color="#4169E1">else</font> idx = matctx->idx;
+<a name="line827">827: </a>    VecScatterBegin(matctx->scatter_id[i%matctx->subc->n],Rv,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line828">828: </a>    VecScatterEnd(matctx->scatter_id[i%matctx->subc->n],Rv,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line829">829: </a>    VecGetArrayRead(matctx->tg,&array);
+<a name="line830">830: </a>    VecPlaceArray(matctx->t,array);
+<a name="line831">831: </a>    VecCopy(matctx->t,matctx->Rv);
+<a name="line832">832: </a>    VecResetArray(matctx->t);
+<a name="line833">833: </a>    VecRestoreArrayRead(matctx->tg,&array);
+<a name="line834">834: </a>    R  = matctx->Rv;
+<a name="line835">835: </a>    Vi = matctx->Vi;
+<a name="line836">836: </a>  }
+<a name="line837">837: </a>  <font color="#4169E1">if</font> (idx==i && idx<k) {
+<a name="line838">838: </a>    <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line839">839: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line840">840: </a>        NRefSysSolve_explicit(k,ksp,R,Rh,Vi,dHi,matctx);
+<a name="line841">841: </a>        <font color="#4169E1">break</font>;
+<a name="line842">842: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line843">843: </a>        NRefSysSolve_mbe(k,k,matctx->W,matctx->w,matctx->Wt,matctx->wt,matctx->d,matctx->dt,ksp,matctx->M2,matctx->M3 ,matctx->M4,PETSC_FALSE,R,Rh,Vi,dHi,matctx->t);
+<a name="line844">844: </a>        <font color="#4169E1">break</font>;
+<a name="line845">845: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line846">846: </a>        NRefSysSolve_shell(ksp,pep->nmat,R,Rh,k,Vi,dHi);
+<a name="line847">847: </a>        <font color="#4169E1">break</font>;
+<a name="line848">848: </a>    }
+<a name="line849">849: </a>  }
+<a name="line850">850: </a>  <font color="#4169E1">if</font> (matctx && matctx->subc) {
+<a name="line851">851: </a>    VecGetLocalSize(Vi,&m);
+<a name="line852">852: </a>    VecGetArrayRead(Vi,&array);
+<a name="line853">853: </a>    VecGetArray(matctx->tg,&array2);
+<a name="line854">854: </a>    PetscMemcpy(array2,array,m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line855">855: </a>    VecRestoreArray(matctx->tg,&array2);
+<a name="line856">856: </a>    VecRestoreArrayRead(Vi,&array);
+<a name="line857">857: </a>    VecScatterBegin(matctx->scatter_id[i%matctx->subc->n],matctx->tg,dVi,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line858">858: </a>    VecScatterEnd(matctx->scatter_id[i%matctx->subc->n],matctx->tg,dVi,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line859">859: </a>    <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line860">860: </a>    <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line861">861: </a>      MatGetOwnershipRange(matctx->E[0],&n0,&m0);
+<a name="line862">862: </a>      VecGetArrayRead(matctx->ttN,&array);
+<a name="line863">863: </a>      VecPlaceArray(matctx->tp,array+m0-n0);
+<a name="line864">864: </a>      VecScatterBegin(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line865">865: </a>      VecScatterEnd(matctx->scatterp_id[i%matctx->subc->n],matctx->tp,matctx->tpg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line866">866: </a>      VecResetArray(matctx->tp);
+<a name="line867">867: </a>      VecRestoreArrayRead(matctx->ttN,&array);
+<a name="line868">868: </a>      VecGetArrayRead(matctx->tpg,&array);
+<a name="line869">869: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) dHi[j] = array[j];
+<a name="line870">870: </a>      VecRestoreArrayRead(matctx->tpg,&array);
+<a name="line871">871: </a>      <font color="#4169E1">break</font>;
+<a name="line872">872: </a>     <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line873">873: </a>      root = 0;
+<a name="line874">874: </a>      <font color="#4169E1">for</font> (j=0;j<i%matctx->subc->n;j++) root += matctx->subc->subsize[j];
+<a name="line875">875: </a>      PetscMPIIntCast(k,&len);
+<a name="line876">876: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(dHi,len,MPIU_SCALAR,root,matctx->subc->dupparent);
+<a name="line877">877: </a>      <font color="#4169E1">break</font>;
+<a name="line878">878: </a>    <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line879">879: </a>      <font color="#4169E1">break</font>;
+<a name="line880">880: </a>    }
+<a name="line881">881: </a>  }
+<a name="line882">882: </a>  <font color="#4169E1">return</font>(0);
+<a name="line883">883: </a>}
+
+<a name="line887">887: </a><strong><font color="#4169E1"><a name="PEPNRefForwardSubstitution"></a>static PetscErrorCode PEPNRefForwardSubstitution(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *S,PetscInt lds,PetscScalar *H,PetscInt ldh,PetscScalar *fH,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> dV,PetscScalar *dVS,PetscInt *rds,PetscScalar *dH,PetscInt lddh,KSP ksp,MatExplicitCtx *matctx)</font></strong>
+<a name="line888">888: </a>{
+<a name="line890">890: </a>  PetscInt       i,nmat=pep->nmat,lda=nmat*k;
+<a name="line891">891: </a>  PetscScalar    *fh,*Rh,*DfH;
+<a name="line892">892: </a>  PetscReal      norm;
+<a name="line893">893: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;
+<a name="line894">894: </a>  Vec            Rv,t,dvi;
+<a name="line895">895: </a>  FSubctx        *ctx;
+<a name="line896">896: </a>  Mat            M,*At;
+<a name="line897">897: </a>  PetscBool      flg,lindep;
+
+<a name="line900">900: </a>  PetscMalloc2(nmat*k*k,&DfH,k,&Rh);
+<a name="line901">901: </a>  *rds = 0;
+<a name="line902">902: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&Rv);
+<a name="line903">903: </a>  <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line904">904: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line905">905: </a>    <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&t);
+<a name="line906">906: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,PetscMax(k,nmat),&W);
+<a name="line907">907: </a>    PetscMalloc1(nmat,&fh);
+<a name="line908">908: </a>    <font color="#4169E1">break</font>;
+<a name="line909">909: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line910">910: </a>    <font color="#4169E1">if</font> (matctx->subc) {
+<a name="line911">911: </a>      <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&t);
+<a name="line912">912: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,PetscMax(k,nmat),&W);
+<a name="line913">913: </a>    } <font color="#4169E1">else</font> {
+<a name="line914">914: </a>      W = matctx->W;
+<a name="line915">915: </a>      PetscObjectReference((PetscObject)W);
+<a name="line916">916: </a>      t = matctx->t;
+<a name="line917">917: </a>      PetscObjectReference((PetscObject)t);
+<a name="line918">918: </a>    }
+<a name="line919">919: </a>    <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(matctx->W,0.0);
+<a name="line920">920: </a>    <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(matctx->Wt,0.0);
+<a name="line921">921: </a>    <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(matctx->M2,0.0);
+<a name="line922">922: </a>    <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(matctx->M3,0.0);
+<a name="line923">923: </a>    PetscMalloc1(nmat,&fh);
+<a name="line924">924: </a>    <font color="#4169E1">break</font>;
+<a name="line925">925: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line926">926: </a>    KSPGetOperators(ksp,&M,NULL);
+<a name="line927">927: </a>    MatShellGetContext(M,&ctx);
+<a name="line928">928: </a>    <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&t);
+<a name="line929">929: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,PetscMax(k,nmat),&W);
+<a name="line930">930: </a>    fh = ctx->fih;
+<a name="line931">931: </a>    <font color="#4169E1">break</font>;
+<a name="line932">932: </a>  }
+<a name="line933">933: </a>  PetscMemzero(dVS,2*k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line934">934: </a>  PetscMemzero(DfH,lda*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line935">935: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line936">936: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line937">937: </a>    PetscMalloc1(pep->nmat,&At);
+<a name="line938">938: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line939">939: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
+<a name="line940">940: </a>    }
+<a name="line941">941: </a>  } <font color="#4169E1">else</font> At = pep->A;
+
+<a name="line943">943: </a>  <font color="#B22222">/* Main loop for computing the ith columns of dX and dS */</font>
+<a name="line944">944: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line945">945: </a>    <font color="#B22222">/* Compute and update i-th column of the right hand side */</font>
+<a name="line946">946: </a>    PetscMemzero(Rh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line947">947: </a>    NRefRightSide(nmat,pep->pbc,At,k,pep->V,S,lds,i,H,ldh,fH,DfH,dH,dV,dVS,*rds,Rv,Rh,W,t);
+
+<a name="line949">949: </a>    <font color="#B22222">/* Update and solve system */</font>
+<a name="line950">950: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(dV,i,&dvi);
+<a name="line951">951: </a>    NRefSysIter(i,pep,k,ksp,fH,S,lds,fh,H,ldh,Rv,Rh,pep->V,dvi,dH+i*k,matctx,W);
+<a name="line952">952: </a>    <font color="#B22222">/* Orthogonalize computed solution */</font>
+<a name="line953">953: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(pep->V,dvi,dVS+i*2*k,&norm,&lindep);
+<a name="line954">954: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(dV,i,&dvi);
+<a name="line955">955: </a>    <font color="#4169E1">if</font> (!lindep) {
+<a name="line956">956: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(dV,i,dVS+k+i*2*k,&norm,&lindep);
+<a name="line957">957: </a>      <font color="#4169E1">if</font> (!lindep) {
+<a name="line958">958: </a>        dVS[k+i+i*2*k] = norm;
+<a name="line959">959: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(dV,i,1.0/norm);
+<a name="line960">960: </a>        (*rds)++;
+<a name="line961">961: </a>      }
+<a name="line962">962: </a>    }
+<a name="line963">963: </a>  }
+<a name="line964">964: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(dV,0,*rds);
+<a name="line965">965: </a>  VecDestroy(&t);
+<a name="line966">966: </a>  VecDestroy(&Rv);
+<a name="line967">967: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&W);
+<a name="line968">968: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line969">969: </a>    PetscFree(At);
+<a name="line970">970: </a>  }
+<a name="line971">971: </a>  PetscFree2(DfH,Rh);
+<a name="line972">972: </a>  <font color="#4169E1">if</font> (pep->scheme!=PEP_REFINE_SCHEME_SCHUR) { PetscFree(fh); }
+<a name="line973">973: </a>  <font color="#4169E1">return</font>(0);
+<a name="line974">974: </a>}
+
+<a name="line978">978: </a><strong><font color="#4169E1"><a name="NRefOrthogStep"></a>static PetscErrorCode NRefOrthogStep(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *S,PetscInt lds,PetscInt *prs)</font></strong>
+<a name="line979">979: </a>{
+<a name="line980">980: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)</font>
+<a name="line982">982: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routine is unavailable"</font>);
+<a name="line983">983: </a><font color="#A020F0">#else</font>
+<a name="line985">985: </a>  PetscInt       i,j,nmat=pep->nmat,deg=nmat-1,lda=nmat*k,rs=*prs,ldg;
+<a name="line986">986: </a>  PetscScalar    *T,*G,*tau,*array,sone=1.0,zero=0.0,*work;
+<a name="line987">987: </a>  PetscBLASInt   rs_,lds_,k_,ldh_,info,ldg_,lda_;
+<a name="line988">988: </a>  Mat            M0;
+
+<a name="line991">991: </a>  PetscMalloc4(rs*k,&T,k,&tau,k,&work,deg*k*k,&G);
+<a name="line992">992: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line993">993: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line994">994: </a>  PetscBLASIntCast(k,&k_);
+<a name="line995">995: </a>  <font color="#4169E1">if</font> (rs>k) { <font color="#B22222">/* Truncate S to have k columns*/</font>
+<a name="line996">996: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line997">997: </a>      PetscMemcpy(T+j*rs,S+j*lds,rs*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line998">998: </a>    }
+<a name="line999">999: </a>    PetscBLASIntCast(rs,&rs_);
+<a name="line1000">1000: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&rs_,&k_,T,&rs_,tau,work,&k_,&info));
+<a name="line1001">1001: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line1002">1002: </a>    <font color="#B22222">/* Copy triangular matrix in S */</font>
+<a name="line1003">1003: </a>    PetscMemzero(S,lds*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1004">1004: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) <font color="#4169E1">for</font> (i=0;i<=j;i++) S[j*lds+i] = T[j*rs+i];
+<a name="line1005">1005: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&rs_,&k_,&k_,T,&rs_,tau,work,&k_,&info));
+<a name="line1006">1006: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+<a name="line1007">1007: </a>    MatCreateSeqDense(PETSC_COMM_SELF,rs,k,NULL,&M0);
+<a name="line1008">1008: </a>    MatDenseGetArray(M0,&array);
+<a name="line1009">1009: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1010">1010: </a>      PetscMemcpy(array+j*rs,T+j*rs,rs*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1011">1011: </a>    }
+<a name="line1012">1012: </a>    MatDenseRestoreArray(M0,&array);
+<a name="line1013">1013: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,rs);
+<a name="line1014">1014: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,M0,0,k);
+<a name="line1015">1015: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,k);
+<a name="line1016">1016: </a>    MatDestroy(&M0);
+<a name="line1017">1017: </a>    *prs = rs = k;
+<a name="line1018">1018: </a>  }
+<a name="line1019">1019: </a>  <font color="#B22222">/* Form auxiliary matrix for the orthogonalization step */</font>
+<a name="line1020">1020: </a>  ldg = deg*k;
+<a name="line1021">1021: </a>  PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);
+<a name="line1022">1022: </a>  PetscBLASIntCast(ldg,&ldg_);
+<a name="line1023">1023: </a>  PetscBLASIntCast(ldh,&ldh_);
+<a name="line1024">1024: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
+<a name="line1025">1025: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&sone,S,&lds_,fH+j*k,&lda_,&zero,G+j*k,&ldg_));
+<a name="line1026">1026: </a>  }
+<a name="line1027">1027: </a>  <font color="#B22222">/* Orthogonalize and update S */</font>
+<a name="line1028">1028: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&ldg_,&k_,G,&ldg_,tau,work,&k_,&info));
+<a name="line1029">1029: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line1030">1030: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrsm"</font>,BLAStrsm_(<font color="#666666">"R"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&sone,G,&ldg_,S,&lds_));
+
+<a name="line1032">1032: </a>  <font color="#B22222">/* Update H */</font>
+<a name="line1033">1033: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrmm"</font>,BLAStrmm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&sone,G,&ldg_,H,&ldh_));
+<a name="line1034">1034: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrsm"</font>,BLAStrsm_(<font color="#666666">"R"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&sone,G,&ldg_,H,&ldh_));
+<a name="line1035">1035: </a>  PetscFree4(T,tau,work,G);
+<a name="line1036">1036: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1037">1037: </a><font color="#A020F0">#endif</font>
+<a name="line1038">1038: </a>}
+
+<a name="line1042">1042: </a><strong><font color="#4169E1"><a name="PEPNRefUpdateInvPair"></a>static PetscErrorCode PEPNRefUpdateInvPair(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *H,PetscInt ldh,PetscScalar *fH,PetscScalar *dH,PetscScalar *S,PetscInt lds,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> dV,PetscScalar *dVS,PetscInt rds)</font></strong>
+<a name="line1043">1043: </a>{
+<a name="line1044">1044: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)</font>
+<a name="line1046">1046: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routine is unavailable"</font>);
+<a name="line1047">1047: </a><font color="#A020F0">#else</font>
+<a name="line1049">1049: </a>  PetscInt       i,j,nmat=pep->nmat,lda=nmat*k;
+<a name="line1050">1050: </a>  PetscScalar    *tau,*array,*work;
+<a name="line1051">1051: </a>  PetscBLASInt   lds_,k_,lda_,ldh_,kdrs_,info,k2_;
+<a name="line1052">1052: </a>  Mat            M0;
+
+<a name="line1055">1055: </a>  PetscMalloc2(k,&tau,k,&work);
+<a name="line1056">1056: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line1057">1057: </a>  PetscBLASIntCast(lda,&lda_);
+<a name="line1058">1058: </a>  PetscBLASIntCast(ldh,&ldh_);
+<a name="line1059">1059: </a>  PetscBLASIntCast(k,&k_);
+<a name="line1060">1060: </a>  PetscBLASIntCast(2*k,&k2_);
+<a name="line1061">1061: </a>  PetscBLASIntCast((k+rds),&kdrs_);
+<a name="line1062">1062: </a>  <font color="#B22222">/* Update H */</font>
+<a name="line1063">1063: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1064">1064: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) H[i+j*ldh] -= dH[i+j*k];
+<a name="line1065">1065: </a>  }
+<a name="line1066">1066: </a>  <font color="#B22222">/* Update V */</font>
+<a name="line1067">1067: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1068">1068: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) dVS[i+j*2*k] = -dVS[i+j*2*k]+S[i+j*lds];
+<a name="line1069">1069: </a>    <font color="#4169E1">for</font> (i=k;i<2*k;i++) dVS[i+j*2*k] = -dVS[i+j*2*k];
+<a name="line1070">1070: </a>  }
+<a name="line1071">1071: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&kdrs_,&k_,dVS,&k2_,tau,work,&k_,&info));
+<a name="line1072">1072: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line1073">1073: </a>  <font color="#B22222">/* Copy triangular matrix in S */</font>
+<a name="line1074">1074: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1075">1075: </a>    <font color="#4169E1">for</font> (i=0;i<=j;i++) S[i+j*lds] = dVS[i+j*2*k];
+<a name="line1076">1076: </a>    <font color="#4169E1">for</font> (i=j+1;i<k;i++) S[i+j*lds] = 0.0;
+<a name="line1077">1077: </a>  }
+<a name="line1078">1078: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&k2_,&k_,&k_,dVS,&k2_,tau,work,&k_,&info));
+<a name="line1079">1079: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+<a name="line1080">1080: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&M0);
+<a name="line1081">1081: </a>  MatDenseGetArray(M0,&array);
+<a name="line1082">1082: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1083">1083: </a>    PetscMemcpy(array+j*k,dVS+j*2*k,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1084">1084: </a>  }
+<a name="line1085">1085: </a>  MatDenseRestoreArray(M0,&array);
+<a name="line1086">1086: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,M0,0,k);
+<a name="line1087">1087: </a>  <font color="#4169E1">if</font> (rds) {
+<a name="line1088">1088: </a>    MatDenseGetArray(M0,&array);
+<a name="line1089">1089: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1090">1090: </a>      PetscMemcpy(array+j*k,dVS+k+j*2*k,rds*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1091">1091: </a>    }
+<a name="line1092">1092: </a>    MatDenseRestoreArray(M0,&array);
+<a name="line1093">1093: </a>    <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(dV,M0,0,k);
+<a name="line1094">1094: </a>    <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(pep->V,1.0,1.0,dV,NULL);
 <a name="line1095">1095: </a>  }
-<a name="line1096">1096: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line1097">1097: </a>    MatDestroy(&matctx->A[i]);
-<a name="line1098">1098: </a>  }
-<a name="line1099">1099: </a>  PetscFree3(matctx->A,matctx->scatter_id,matctx->scatterp_id);
-<a name="line1100">1100: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->V);
-<a name="line1101">1101: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->W);
-<a name="line1102">1102: </a>  VecDestroy(&matctx->t);
-<a name="line1103">1103: </a>  VecDestroy(&matctx->tg);
-<a name="line1104">1104: </a>  VecDestroy(&matctx->tp);
-<a name="line1105">1105: </a>  VecDestroy(&matctx->tpg);
-<a name="line1106">1106: </a>  VecDestroy(&matctx->Rv);
-<a name="line1107">1107: </a>  VecDestroy(&matctx->Vi);
-<a name="line1108">1108: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1109">1109: </a>}
-
-<a name="line1113">1113: </a><strong><font color="#4169E1"><a name="PEPNewtonRefinement_TOAR"></a>PetscErrorCode PEPNewtonRefinement_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscInt *maxits,PetscReal *tol,PetscInt k,PetscScalar *S,PetscInt lds,PetscInt *prs)</font></strong>
-<a name="line1114">1114: </a>{
-<a name="line1116">1116: </a>  PetscScalar    *H,*work,*dH,*fH,*dVS;
-<a name="line1117">1117: </a>  PetscInt       ldh,i,j,its=1,nmat=pep->nmat,nwu=0,lwa=0,nsubc=pep->npart,rds;
-<a name="line1118">1118: </a>  PetscLogDouble cnt;
-<a name="line1119">1119: </a>  PetscBLASInt   k_,ld_,*p,info,lwork=0;
-<a name="line1120">1120: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             dV;
-<a name="line1121">1121: </a>  PetscBool      sinvert,flg;
-<a name="line1122">1122: </a>  Mat            P,M;
-<a name="line1123">1123: </a>  FSubctx        *ctx;
-<a name="line1124">1124: </a>  KSP            ksp;
-<a name="line1125">1125: </a>  MatExplicitCtx *matctx=NULL;
-<a name="line1126">1126: </a>  Vec            v;
-
-<a name="line1129">1129: </a>  PetscLogEventBegin(PEP_Refine,pep,0,0,0);
-<a name="line1130">1130: </a>  <font color="#4169E1">if</font> (k > pep->n) SETERRQ1(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Multiple Refinement available only for invariant pairs of dimension smaller than n=%D"</font>,pep->n);
-<a name="line1131">1131: </a>  <font color="#B22222">/* the input tolerance is not being taken into account (by the moment) */</font>
-<a name="line1132">1132: </a>  its = *maxits;
-<a name="line1133">1133: </a>  lwa = (5+3*nmat)*k*k+2*k;
-<a name="line1134">1134: </a>  PetscMalloc3(k*k,&dH,nmat*k*k,&fH,lwa,&work);
-<a name="line1135">1135: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldh);
-<a name="line1136">1136: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1137">1137: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1138">1138: </a>  PetscMalloc1(2*k*k,&dVS);
-<a name="line1139">1139: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line1140">1140: </a>  <font color="#4169E1">if</font> (!flg && pep->st && pep->ops->backtransform) { <font color="#B22222">/* BackTransform */</font>
-<a name="line1141">1141: </a>    PetscBLASIntCast(k,&k_);
-<a name="line1142">1142: </a>    PetscBLASIntCast(ldh,&ld_);
-<a name="line1143">1143: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinvert);
-<a name="line1144">1144: </a>    <font color="#4169E1">if</font> (sinvert){
-<a name="line1145">1145: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1146">1146: </a>      PetscBLASIntCast(lwa-nwu,&lwork);
-<a name="line1147">1147: </a>      PetscMalloc1(k,&p);
-<a name="line1148">1148: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&k_,&k_,H,&ld_,p,&info));
-<a name="line1149">1149: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&k_,H,&ld_,p,work,&lwork,&info));
-<a name="line1150">1150: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1151">1151: </a>      pep->ops->backtransform = NULL;
-<a name="line1152">1152: </a>    }
-<a name="line1153">1153: </a>    <font color="#4169E1">if</font> (sigma!=0.0) {
-<a name="line1154">1154: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1155">1155: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) H[i+ldh*i] += sigma; 
-<a name="line1156">1156: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1157">1157: </a>      pep->ops->backtransform = NULL;
-<a name="line1158">1158: </a>    }
-<a name="line1159">1159: </a>  }
-<a name="line1160">1160: </a>  <font color="#4169E1">if</font> ((pep->scale==PEP_SCALE_BOTH || pep->scale==PEP_SCALE_SCALAR) && pep->sfactor!=1.0) {
-<a name="line1161">1161: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1162">1162: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line1163">1163: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) H[i+j*ldh] *= pep->sfactor;
-<a name="line1164">1164: </a>    }
-<a name="line1165">1165: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line1166">1166: </a>    <font color="#4169E1">if</font> (!flg) {
-<a name="line1167">1167: </a>      <font color="#B22222">/* Restore original values */</font>
-<a name="line1168">1168: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++){
-<a name="line1169">1169: </a>        pep->pbc[pep->nmat+i] *= pep->sfactor;
-<a name="line1170">1170: </a>        pep->pbc[2*pep->nmat+i] *= pep->sfactor*pep->sfactor;
-<a name="line1171">1171: </a>      }
-<a name="line1172">1172: </a>    }
-<a name="line1173">1173: </a>  }
-<a name="line1174">1174: </a>  <font color="#4169E1">if</font> ((pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) && pep->Dr) {
-<a name="line1175">1175: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line1176">1176: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
-<a name="line1177">1177: </a>      VecPointwiseMult(v,v,pep->Dr);
-<a name="line1178">1178: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
-<a name="line1179">1179: </a>    }
-<a name="line1180">1180: </a>  }
-<a name="line1181">1181: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-
-<a name="line1183">1183: </a>  NRefOrthogStep(pep,k,H,ldh,fH,S,lds,prs,work,lwa);
-<a name="line1184">1184: </a>  <font color="#B22222">/* check if H is in Schur form */</font>
-<a name="line1185">1185: </a>  <font color="#4169E1">for</font> (i=0;i<k-1;i++) {
-<a name="line1186">1186: </a>    <font color="#4169E1">if</font> (H[i+1+i*ldh]!=0.0) {
-<a name="line1187">1187: </a><font color="#A020F0">#if !defined(PETSC_USES_COMPLEX)</font>
-<a name="line1188">1188: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Iterative Refinement require the complex Schur form of the projected matrix"</font>);
-<a name="line1189">1189: </a><font color="#A020F0">#else</font>
-<a name="line1190">1190: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Iterative Refinement requires an upper triangular projected matrix"</font>);
-<a name="line1191">1191: </a><font color="#A020F0">#endif</font>
-<a name="line1192">1192: </a>    }
-<a name="line1193">1193: </a>  }
-<a name="line1194">1194: </a>  <font color="#4169E1">if</font> (pep->schur && nsubc>1) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Split communicator only allowed for the explicit matrix option"</font>);
-<a name="line1195">1195: </a>  <font color="#4169E1">if</font> (!pep->schur && nsubc>k) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Amount of subcommunicators should not be larger than the invariant pair's dimension"</font>);
-<a name="line1196">1196: </a>  cnt = k*<font color="#4169E1">sizeof</font>(PetscBLASInt)+(lwork+k*k*(nmat+3)+nmat+k)*<font color="#4169E1">sizeof</font>(PetscScalar);
-<a name="line1197">1197: </a>  PetscLogObjectMemory((PetscObject)pep,cnt);
-<a name="line1198">1198: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,k);
-<a name="line1199">1199: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,k,&dV);
-<a name="line1200">1200: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)dV);  
-<a name="line1201">1201: </a>  <a href="../../../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&ksp);
-<a name="line1202">1202: </a>  <font color="#4169E1">if</font> (!pep->schur) {
-<a name="line1203">1203: </a>    PetscMalloc1(1,&matctx);
-<a name="line1204">1204: </a>    <font color="#4169E1">if</font> (nsubc>1) { <font color="#B22222">/* spliting in subcommunicators */</font>
-<a name="line1205">1205: </a>      matctx->subc = pep->refinesubc;
-<a name="line1206">1206: </a>      NRefSubcommSetup(pep,k,matctx,nsubc);
-<a name="line1207">1207: </a>    } <font color="#4169E1">else</font> matctx->subc=NULL;
-<a name="line1208">1208: </a>  }
-
-<a name="line1210">1210: </a>  <font color="#B22222">/* Loop performing iterative refinements */</font>
-<a name="line1211">1211: </a>  <font color="#4169E1">for</font> (i=0;i<its;i++) {
-<a name="line1212">1212: </a>    <font color="#B22222">/* Pre-compute the polynomial basis evaluated in H */</font>
-<a name="line1213">1213: </a>    PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);
-<a name="line1214">1214: </a>    PEPNRefSetUpMatrices(pep,k,H,ldh,&M,&P,matctx,(i==0)?PETSC_TRUE:PETSC_FALSE);
-<a name="line1215">1215: </a>    KSPSetOperators(ksp,M,P);
-<a name="line1216">1216: </a>    <font color="#4169E1">if</font> (i==0) {
-<a name="line1217">1217: </a>      KSPSetFromOptions(ksp);
-<a name="line1218">1218: </a>    }
-<a name="line1219">1219: </a>    <font color="#B22222">/* Solve the linear system */</font>
-<a name="line1220">1220: </a>    PEPNRefForwardSubstitution(pep,k,S,lds,H,ldh,fH,dV,dVS,&rds,dH,k,ksp,work+nwu,lwa-nwu,matctx);
-<a name="line1221">1221: </a>    <font color="#B22222">/* Update X (=V*S) and H, and orthogonalize [X;X*fH1;...;XfH(deg-1)] */</font>
-<a name="line1222">1222: </a>    PEPNRefUpdateInvPair(pep,k,H,ldh,fH,dH,S,lds,dV,dVS,rds,work+nwu,lwa-nwu);    
-<a name="line1223">1223: </a>  }
-<a name="line1224">1224: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);  
-<a name="line1225">1225: </a>  <font color="#4169E1">if</font> (!flg && sinvert) {
-<a name="line1226">1226: </a>    PetscFree(p);
-<a name="line1227">1227: </a>  }
-<a name="line1228">1228: </a>  PetscFree3(dH,fH,work);
-<a name="line1229">1229: </a>  PetscFree(dVS);
-<a name="line1230">1230: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&dV);
-<a name="line1231">1231: </a>  <font color="#4169E1">if</font> (!pep->schur) {
-<a name="line1232">1232: </a>    <font color="#4169E1">for</font> (i=0;i<2;i++) {
-<a name="line1233">1233: </a>      MatDestroy(&matctx->E[i]);
-<a name="line1234">1234: </a>    }
-<a name="line1235">1235: </a>    PetscFree4(matctx->idxp,matctx->idxg,matctx->map0,matctx->map1);
-<a name="line1236">1236: </a>    VecDestroy(&matctx->tN);
-<a name="line1237">1237: </a>    VecDestroy(&matctx->ttN);
-<a name="line1238">1238: </a>    VecDestroy(&matctx->t1);
-<a name="line1239">1239: </a>    <font color="#4169E1">if</font> (nsubc>1) {
-<a name="line1240">1240: </a>      NRefSubcommDestroy(pep,matctx);
-<a name="line1241">1241: </a>    } <font color="#4169E1">else</font> {
-<a name="line1242">1242: </a>      VecDestroy(&matctx->vseq);
-<a name="line1243">1243: </a>      VecScatterDestroy(&matctx->scatterctx);
-<a name="line1244">1244: </a>    }
-<a name="line1245">1245: </a>    PetscFree(matctx);
-<a name="line1246">1246: </a>  } <font color="#4169E1">else</font> {
-<a name="line1247">1247: </a>    MatShellGetContext(M,&ctx);
-<a name="line1248">1248: </a>    PetscFree3(ctx->Mm,ctx->work,ctx->fih);
-<a name="line1249">1249: </a>    VecDestroy(&ctx->w1);  
-<a name="line1250">1250: </a>    VecDestroy(&ctx->w2);  
-<a name="line1251">1251: </a>    PetscFree(ctx);
-<a name="line1252">1252: </a>    MatDestroy(&P);
-<a name="line1253">1253: </a>  }
-<a name="line1254">1254: </a>  MatDestroy(&M);
-<a name="line1255">1255: </a>  PetscLogEventEnd(PEP_Refine,pep,0,0,0);
-<a name="line1256">1256: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1257">1257: </a>}
+<a name="line1096">1096: </a>  MatDestroy(&M0);
+<a name="line1097">1097: </a>  NRefOrthogStep(pep,k,H,ldh,fH,S,lds,&k);
+<a name="line1098">1098: </a>  PetscFree2(tau,work);
+<a name="line1099">1099: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1100">1100: </a><font color="#A020F0">#endif</font>
+<a name="line1101">1101: </a>}
+
+<a name="line1105">1105: </a><strong><font color="#4169E1"><a name="PEPNRefSetUp"></a>static PetscErrorCode PEPNRefSetUp(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *H,PetscInt ldh,MatExplicitCtx *matctx,PetscBool ini)</font></strong>
+<a name="line1106">1106: </a>{
+<a name="line1107">1107: </a>  PetscErrorCode    ierr;
+<a name="line1108">1108: </a>  FSubctx           *ctx;
+<a name="line1109">1109: </a>  PetscScalar       t,*coef;
+<a name="line1110">1110: </a>  const PetscScalar *array;
+<a name="line1111">1111: </a>  MatStructure      str;
+<a name="line1112">1112: </a>  PetscInt          j,nmat=pep->nmat,n0,m0,n1,m1,n0_,m0_,n1_,m1_,N0,N1,p,*idx1,*idx2,count,si,i,l0;
+<a name="line1113">1113: </a>  MPI_Comm          comm;
+<a name="line1114">1114: </a>  PetscMPIInt       np;
+<a name="line1115">1115: </a>  const PetscInt    *rgs0,*rgs1;
+<a name="line1116">1116: </a>  Mat               B,C,*E,*A,*At;
+<a name="line1117">1117: </a>  IS                is1,is2;
+<a name="line1118">1118: </a>  Vec               v;
+<a name="line1119">1119: </a>  PetscBool         flg;
+<a name="line1120">1120: </a>  Mat               M,P;
+
+<a name="line1123">1123: </a>  PetscMalloc1(nmat,&coef);
+<a name="line1124">1124: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line1125">1125: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1126">1126: </a>    PetscMalloc1(pep->nmat,&At);
+<a name="line1127">1127: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line1128">1128: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&At[i]);
+<a name="line1129">1129: </a>    }
+<a name="line1130">1130: </a>  } <font color="#4169E1">else</font> At = pep->A;
+<a name="line1131">1131: </a>  <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line1132">1132: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line1133">1133: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line1134">1134: </a>      <font color="#4169E1">if</font> (matctx->subc) {
+<a name="line1135">1135: </a>        A = matctx->A;
+<a name="line1136">1136: </a>        comm = PetscSubcommChild(matctx->subc);
+<a name="line1137">1137: </a>      } <font color="#4169E1">else</font> {
+<a name="line1138">1138: </a>        A = At;
+<a name="line1139">1139: </a>        PetscObjectGetComm((PetscObject)pep,&comm);
+<a name="line1140">1140: </a>      }
+<a name="line1141">1141: </a>      E = matctx->E;
+<a name="line1142">1142: </a>      <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line1143">1143: </a>      MatDuplicate(A[0],MAT_COPY_VALUES,&E[0]);
+<a name="line1144">1144: </a>      j = (matctx->subc)?matctx->subc->color:0;
+<a name="line1145">1145: </a>      PEPEvaluateBasis(pep,H[j+j*ldh],0,coef,NULL);
+<a name="line1146">1146: </a>      <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line1147">1147: </a>        MatAXPY(E[0],coef[j],A[j],str);
+<a name="line1148">1148: </a>      }
+<a name="line1149">1149: </a>      MatCreateDense(comm,PETSC_DECIDE,PETSC_DECIDE,k,k,NULL,&E[1]);
+<a name="line1150">1150: </a>      MatAssemblyBegin(E[1],MAT_FINAL_ASSEMBLY);
+<a name="line1151">1151: </a>      MatAssemblyEnd(E[1],MAT_FINAL_ASSEMBLY);
+<a name="line1152">1152: </a>      MatGetOwnershipRange(E[0],&n0,&m0);
+<a name="line1153">1153: </a>      MatGetOwnershipRange(E[1],&n1,&m1);
+<a name="line1154">1154: </a>      MatGetOwnershipRangeColumn(E[0],&n0_,&m0_);
+<a name="line1155">1155: </a>      MatGetOwnershipRangeColumn(E[1],&n1_,&m1_);
+<a name="line1156">1156: </a>      <font color="#B22222">/* T12 and T21 are computed from V and V*, so,</font>
+<a name="line1157">1157: </a><font color="#B22222">         they must have the same column and row ranges */</font>
+<a name="line1158">1158: </a>      <font color="#4169E1">if</font> (m0_-n0_ != m0-n0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Inconsistent dimensions"</font>);
+<a name="line1159">1159: </a>      MatCreateDense(comm,m0-n0,m1_-n1_,PETSC_DECIDE,PETSC_DECIDE,NULL,&B);
+<a name="line1160">1160: </a>      MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY);
+<a name="line1161">1161: </a>      MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY);
+<a name="line1162">1162: </a>      MatCreateDense(comm,m1-n1,m0_-n0_,PETSC_DECIDE,PETSC_DECIDE,NULL,&C);
+<a name="line1163">1163: </a>      MatAssemblyBegin(C,MAT_FINAL_ASSEMBLY);
+<a name="line1164">1164: </a>      MatAssemblyEnd(C,MAT_FINAL_ASSEMBLY);
+<a name="line1165">1165: </a>      <a href="../../../../../docs/manualpages/sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</a>(1.0,E[0],1.0,B,1.0,C,1.0,E[1],&M);
+<a name="line1166">1166: </a>      MatDestroy(&B);
+<a name="line1167">1167: </a>      MatDestroy(&C);
+<a name="line1168">1168: </a>      matctx->compM1 = PETSC_TRUE;
+<a name="line1169">1169: </a>      MatGetSize(E[0],NULL,&N0);
+<a name="line1170">1170: </a>      MatGetSize(E[1],NULL,&N1);
+<a name="line1171">1171: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)M),&np);
+<a name="line1172">1172: </a>      MatGetOwnershipRanges(E[0],&rgs0);
+<a name="line1173">1173: </a>      MatGetOwnershipRanges(E[1],&rgs1);
+<a name="line1174">1174: </a>      PetscMalloc4(PetscMax(k,N1),&matctx->idxp,N0,&matctx->idxg,N0,&matctx->map0,N1,&matctx->map1);
+<a name="line1175">1175: </a>      <font color="#B22222">/* Create column (and row) mapping */</font>
+<a name="line1176">1176: </a>      <font color="#4169E1">for</font> (p=0;p<np;p++) {
+<a name="line1177">1177: </a>        <font color="#4169E1">for</font> (j=rgs0[p];j<rgs0[p+1];j++) matctx->map0[j] = j+rgs1[p];
+<a name="line1178">1178: </a>        <font color="#4169E1">for</font> (j=rgs1[p];j<rgs1[p+1];j++) matctx->map1[j] = j+rgs0[p+1];
+<a name="line1179">1179: </a>      }
+<a name="line1180">1180: </a>      MatCreateVecs(M,NULL,&matctx->tN);
+<a name="line1181">1181: </a>      MatCreateVecs(matctx->E[1],NULL,&matctx->t1);
+<a name="line1182">1182: </a>      VecDuplicate(matctx->tN,&matctx->ttN);
+<a name="line1183">1183: </a>      <font color="#4169E1">if</font> (matctx->subc) {
+<a name="line1184">1184: </a>        <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&np);
+<a name="line1185">1185: </a>        count = np*k;
+<a name="line1186">1186: </a>        PetscMalloc2(count,&idx1,count,&idx2);
+<a name="line1187">1187: </a>        VecCreateMPI(PetscObjectComm((PetscObject)pep),m1-n1,PETSC_DECIDE,&matctx->tp);
+<a name="line1188">1188: </a>        VecGetOwnershipRange(matctx->tp,&l0,NULL);
+<a name="line1189">1189: </a>        VecCreateMPI(PetscObjectComm((PetscObject)pep),k,PETSC_DECIDE,&matctx->tpg);
+<a name="line1190">1190: </a>        <font color="#4169E1">for</font> (si=0;si<matctx->subc->n;si++) {
+<a name="line1191">1191: </a>          <font color="#4169E1">if</font> (matctx->subc->color==si) {
+<a name="line1192">1192: </a>            j=0;
+<a name="line1193">1193: </a>            <font color="#4169E1">if</font> (matctx->subc->color==si) {
+<a name="line1194">1194: </a>              <font color="#4169E1">for</font> (p=0;p<np;p++) {
+<a name="line1195">1195: </a>                <font color="#4169E1">for</font> (i=n1;i<m1;i++) {
+<a name="line1196">1196: </a>                  idx1[j] = l0+i-n1;
+<a name="line1197">1197: </a>                  idx2[j++] =p*k+i;
+<a name="line1198">1198: </a>                }
+<a name="line1199">1199: </a>              }
+<a name="line1200">1200: </a>            }
+<a name="line1201">1201: </a>            count = np*(m1-n1);
+<a name="line1202">1202: </a>          } <font color="#4169E1">else</font> count =0;
+<a name="line1203">1203: </a>          ISCreateGeneral(PetscObjectComm((PetscObject)pep),count,idx1,PETSC_COPY_VALUES,&is1);
+<a name="line1204">1204: </a>          ISCreateGeneral(PetscObjectComm((PetscObject)pep),count,idx2,PETSC_COPY_VALUES,&is2);
+<a name="line1205">1205: </a>          VecScatterCreate(matctx->tp,is1,matctx->tpg,is2,&matctx->scatterp_id[si]);
+<a name="line1206">1206: </a>          ISDestroy(&is1);
+<a name="line1207">1207: </a>          ISDestroy(&is2);
+<a name="line1208">1208: </a>        }
+<a name="line1209">1209: </a>        PetscFree2(idx1,idx2);
+<a name="line1210">1210: </a>      } <font color="#4169E1">else</font> {
+<a name="line1211">1211: </a>        VecScatterCreateToAll(matctx->t1,&matctx->scatterctx,&matctx->vseq);
+<a name="line1212">1212: </a>      }
+<a name="line1213">1213: </a>      P = M;
+<a name="line1214">1214: </a>    } <font color="#4169E1">else</font> {
+<a name="line1215">1215: </a>      <font color="#4169E1">if</font> (matctx->subc) {
+<a name="line1216">1216: </a>        <font color="#B22222">/* Scatter vectors pep->V */</font>
+<a name="line1217">1217: </a>        <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1218">1218: </a>          <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line1219">1219: </a>          VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line1220">1220: </a>          VecScatterEnd(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line1221">1221: </a>          <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line1222">1222: </a>          VecGetArrayRead(matctx->tg,&array);
+<a name="line1223">1223: </a>          VecPlaceArray(matctx->t,(const PetscScalar*)array);
+<a name="line1224">1224: </a>          <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(matctx->V,i,matctx->t);
+<a name="line1225">1225: </a>          VecResetArray(matctx->t);
+<a name="line1226">1226: </a>          VecRestoreArrayRead(matctx->tg,&array);
+<a name="line1227">1227: </a>        }
+<a name="line1228">1228: </a>      }
+<a name="line1229">1229: </a>    }
+<a name="line1230">1230: </a>    <font color="#4169E1">break</font>;
+<a name="line1231">1231: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line1232">1232: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line1233">1233: </a>      <font color="#4169E1">if</font> (matctx->subc) {
+<a name="line1234">1234: </a>        A = matctx->A;
+<a name="line1235">1235: </a>        comm = PetscSubcommChild(matctx->subc);
+<a name="line1236">1236: </a>      } <font color="#4169E1">else</font> {
+<a name="line1237">1237: </a>        matctx->V = pep->V;
+<a name="line1238">1238: </a>        A = At;
+<a name="line1239">1239: </a>        PetscObjectGetComm((PetscObject)pep,&comm);
+<a name="line1240">1240: </a>        MatCreateVecs(pep->A[0],&matctx->t,NULL);
+<a name="line1241">1241: </a>      }
+<a name="line1242">1242: </a>      <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line1243">1243: </a>      MatDuplicate(A[0],MAT_COPY_VALUES,&matctx->M1);
+<a name="line1244">1244: </a>      j = (matctx->subc)?matctx->subc->color:0;
+<a name="line1245">1245: </a>      PEPEvaluateBasis(pep,H[j+j*ldh],0,coef,NULL);
+<a name="line1246">1246: </a>      <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line1247">1247: </a>        MatAXPY(matctx->M1,coef[j],A[j],str);
+<a name="line1248">1248: </a>      }
+<a name="line1249">1249: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(matctx->V,PetscMax(k,pep->nmat),&matctx->W);
+<a name="line1250">1250: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(matctx->V,k,&matctx->M2);
+<a name="line1251">1251: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(matctx->M2,&matctx->M3);
+<a name="line1252">1252: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(matctx->M2,&matctx->Wt);
+<a name="line1253">1253: </a>      PetscMalloc5(k*k,&matctx->M4,k*k,&matctx->w,k*k,&matctx->wt,k,&matctx->d,k,&matctx->dt);
+<a name="line1254">1254: </a>      matctx->compM1 = PETSC_TRUE;
+<a name="line1255">1255: </a>      M = matctx->M1;
+<a name="line1256">1256: </a>      P = M;
+<a name="line1257">1257: </a>    }
+<a name="line1258">1258: </a>    <font color="#4169E1">break</font>;
+<a name="line1259">1259: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line1260">1260: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line1261">1261: </a>      PetscObjectGetComm((PetscObject)pep,&comm);
+<a name="line1262">1262: </a>      MatGetSize(At[0],&m0,&n0);
+<a name="line1263">1263: </a>      PetscMalloc1(1,&ctx);
+<a name="line1264">1264: </a>      <a href="../../../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line1265">1265: </a>      <font color="#B22222">/* Create a shell matrix to solve the linear system */</font>
+<a name="line1266">1266: </a>      ctx->A = At;
+<a name="line1267">1267: </a>      ctx->V = pep->V;
+<a name="line1268">1268: </a>      ctx->k = k; ctx->nmat = nmat;
+<a name="line1269">1269: </a>      PetscMalloc4(k*k,&ctx->M4,k,&ctx->pM4,2*k*k,&ctx->work,nmat,&ctx->fih);
+<a name="line1270">1270: </a>      PetscMemzero(ctx->M4,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1271">1271: </a>      MatCreateShell(comm,PETSC_DECIDE,PETSC_DECIDE,m0,n0,ctx,&M);
+<a name="line1272">1272: </a>      MatShellSetOperation(M,MATOP_MULT,(void(*)(void))MatFSMult);
+<a name="line1273">1273: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(ctx->V,PetscMax(k,pep->nmat),&ctx->W);
+<a name="line1274">1274: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(ctx->V,k,&ctx->M2);
+<a name="line1275">1275: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(ctx->M2,&ctx->M3);
+<a name="line1276">1276: </a>      <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&ctx->t);
+<a name="line1277">1277: </a>      MatDuplicate(At[0],MAT_COPY_VALUES,&ctx->M1);
+<a name="line1278">1278: </a>      PEPEvaluateBasis(pep,H[0],0,coef,NULL);
+<a name="line1279">1279: </a>      <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line1280">1280: </a>        MatAXPY(ctx->M1,coef[j],At[j],str);
+<a name="line1281">1281: </a>      }
+<a name="line1282">1282: </a>      MatDuplicate(At[0],MAT_COPY_VALUES,&P);
+<a name="line1283">1283: </a>      <font color="#B22222">/* Compute a precond matrix for the system */</font>
+<a name="line1284">1284: </a>      t = H[0];
+<a name="line1285">1285: </a>      PEPEvaluateBasis(pep,t,0,coef,NULL);
+<a name="line1286">1286: </a>      <font color="#4169E1">for</font> (j=1;j<nmat;j++) {
+<a name="line1287">1287: </a>        MatAXPY(P,coef[j],At[j],str);
+<a name="line1288">1288: </a>      }
+<a name="line1289">1289: </a>      ctx->compM1 = PETSC_TRUE;
+<a name="line1290">1290: </a>    }
+<a name="line1291">1291: </a>    <font color="#4169E1">break</font>;
+<a name="line1292">1292: </a>  }
+<a name="line1293">1293: </a>  <font color="#4169E1">if</font> (ini) {
+<a name="line1294">1294: </a>    <a href="../../../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&pep->refineksp);
+<a name="line1295">1295: </a>    KSPSetOperators(pep->refineksp,M,P);
+<a name="line1296">1296: </a>    KSPSetFromOptions(pep->refineksp);
+<a name="line1297">1297: </a>  }
+
+<a name="line1299">1299: </a>  <font color="#4169E1">if</font> (!ini && matctx && matctx->subc) {
+<a name="line1300">1300: </a>     <font color="#B22222">/* Scatter vectors pep->V */</font>
+<a name="line1301">1301: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1302">1302: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line1303">1303: </a>      VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line1304">1304: </a>      VecScatterEnd(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line1305">1305: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line1306">1306: </a>      VecGetArrayRead(matctx->tg,&array);
+<a name="line1307">1307: </a>      VecPlaceArray(matctx->t,(const PetscScalar*)array);
+<a name="line1308">1308: </a>      <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(matctx->V,i,matctx->t);
+<a name="line1309">1309: </a>      VecResetArray(matctx->t);
+<a name="line1310">1310: </a>      VecRestoreArrayRead(matctx->tg,&array);
+<a name="line1311">1311: </a>    }
+<a name="line1312">1312: </a>   }
+<a name="line1313">1313: </a>  PetscFree(coef);
+<a name="line1314">1314: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1315">1315: </a>    PetscFree(At);
+<a name="line1316">1316: </a>  }
+<a name="line1317">1317: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1318">1318: </a>}
+
+<a name="line1322">1322: </a><strong><font color="#4169E1"><a name="NRefSubcommSetup"></a>static PetscErrorCode NRefSubcommSetup(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,MatExplicitCtx *matctx,PetscInt nsubc)</font></strong>
+<a name="line1323">1323: </a>{
+<a name="line1324">1324: </a>  PetscErrorCode    ierr;
+<a name="line1325">1325: </a>  PetscInt          i,si,j,m0,n0,nloc0,nloc_sub,*idx1,*idx2;
+<a name="line1326">1326: </a>  IS                is1,is2;
+<a name="line1327">1327: </a>  <a href="../../../../../docs/manualpages/BV/BVType.html#BVType">BVType</a>            type;
+<a name="line1328">1328: </a>  Vec               v;
+<a name="line1329">1329: </a>  const PetscScalar *array;
+<a name="line1330">1330: </a>  Mat               *A;
+<a name="line1331">1331: </a>  PetscBool         flg;
+
+<a name="line1334">1334: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line1335">1335: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1336">1336: </a>    PetscMalloc1(pep->nmat,&A);
+<a name="line1337">1337: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line1338">1338: </a>      <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&A[i]);
+<a name="line1339">1339: </a>    }
+<a name="line1340">1340: </a>  } <font color="#4169E1">else</font> A = pep->A;
+
+<a name="line1342">1342: </a>  <font color="#B22222">/* Duplicate pep matrices */</font>
+<a name="line1343">1343: </a>  PetscMalloc3(pep->nmat,&matctx->A,nsubc,&matctx->scatter_id,nsubc,&matctx->scatterp_id);
+<a name="line1344">1344: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line1345">1345: </a>    MatCreateRedundantMatrix(A[i],0,PetscSubcommChild(matctx->subc),MAT_INITIAL_MATRIX,&matctx->A[i]);
+<a name="line1346">1346: </a>  }
+
+<a name="line1348">1348: </a>  <font color="#B22222">/* Create Scatter */</font>
+<a name="line1349">1349: </a>  MatCreateVecs(matctx->A[0],&matctx->t,NULL);
+<a name="line1350">1350: </a>  MatGetLocalSize(matctx->A[0],&nloc_sub,NULL);
+<a name="line1351">1351: </a>  VecCreateMPI(PetscSubcommContiguousParent(matctx->subc),nloc_sub,PETSC_DECIDE,&matctx->tg);
+<a name="line1352">1352: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
+<a name="line1353">1353: </a>  VecGetOwnershipRange(v,&n0,&m0);
+<a name="line1354">1354: </a>  nloc0 = m0-n0;
+<a name="line1355">1355: </a>  PetscMalloc2(matctx->subc->n*nloc0,&idx1,matctx->subc->n*nloc0,&idx2);
+<a name="line1356">1356: </a>  j = 0;
+<a name="line1357">1357: </a>  <font color="#4169E1">for</font> (si=0;si<matctx->subc->n;si++) {
+<a name="line1358">1358: </a>    <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line1359">1359: </a>      idx1[j]   = i;
+<a name="line1360">1360: </a>      idx2[j++] = i+pep->n*si;
+<a name="line1361">1361: </a>    }
+<a name="line1362">1362: </a>  }
+<a name="line1363">1363: </a>  ISCreateGeneral(PetscObjectComm((PetscObject)pep),matctx->subc->n*nloc0,idx1,PETSC_COPY_VALUES,&is1);
+<a name="line1364">1364: </a>  ISCreateGeneral(PetscObjectComm((PetscObject)pep),matctx->subc->n*nloc0,idx2,PETSC_COPY_VALUES,&is2);
+<a name="line1365">1365: </a>  VecScatterCreate(v,is1,matctx->tg,is2,&matctx->scatter_sub);
+<a name="line1366">1366: </a>  ISDestroy(&is1);
+<a name="line1367">1367: </a>  ISDestroy(&is2);
+<a name="line1368">1368: </a>  <font color="#4169E1">for</font> (si=0;si<matctx->subc->n;si++) {
+<a name="line1369">1369: </a>    j=0;
+<a name="line1370">1370: </a>    <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line1371">1371: </a>      idx1[j] = i;
+<a name="line1372">1372: </a>      idx2[j++] = i+pep->n*si;
+<a name="line1373">1373: </a>    }
+<a name="line1374">1374: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)pep),nloc0,idx1,PETSC_COPY_VALUES,&is1);
+<a name="line1375">1375: </a>    ISCreateGeneral(PetscObjectComm((PetscObject)pep),nloc0,idx2,PETSC_COPY_VALUES,&is2);
+<a name="line1376">1376: </a>    VecScatterCreate(v,is1,matctx->tg,is2,&matctx->scatter_id[si]);
+<a name="line1377">1377: </a>    ISDestroy(&is1);
+<a name="line1378">1378: </a>    ISDestroy(&is2);
+<a name="line1379">1379: </a>  }
+<a name="line1380">1380: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
+<a name="line1381">1381: </a>  PetscFree2(idx1,idx2);
+
+<a name="line1383">1383: </a>  <font color="#B22222">/* Duplicate pep->V vecs */</font>
+<a name="line1384">1384: </a>  <a href="../../../../../docs/manualpages/BV/BVGetType.html#BVGetType">BVGetType</a>(pep->V,&type);
+<a name="line1385">1385: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscSubcommChild(matctx->subc),&matctx->V);
+<a name="line1386">1386: </a>  <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(matctx->V,type);
+<a name="line1387">1387: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(matctx->V,matctx->t,k);
+<a name="line1388">1388: </a>  <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line1389">1389: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(matctx->V,PetscMax(k,pep->nmat),&matctx->W);
+<a name="line1390">1390: </a>  }
+<a name="line1391">1391: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1392">1392: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line1393">1393: </a>    VecScatterBegin(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line1394">1394: </a>    VecScatterEnd(matctx->scatter_sub,v,matctx->tg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line1395">1395: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line1396">1396: </a>    VecGetArrayRead(matctx->tg,&array);
+<a name="line1397">1397: </a>    VecPlaceArray(matctx->t,(const PetscScalar*)array);
+<a name="line1398">1398: </a>    <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(matctx->V,i,matctx->t);
+<a name="line1399">1399: </a>    VecResetArray(matctx->t);
+<a name="line1400">1400: </a>    VecRestoreArrayRead(matctx->tg,&array);
+<a name="line1401">1401: </a>  }
+
+<a name="line1403">1403: </a>  VecDuplicate(matctx->t,&matctx->Rv);
+<a name="line1404">1404: </a>  VecDuplicate(matctx->t,&matctx->Vi);
+<a name="line1405">1405: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1406">1406: </a>    PetscFree(A);
+<a name="line1407">1407: </a>  }
+<a name="line1408">1408: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1409">1409: </a>}
+
+<a name="line1413">1413: </a><strong><font color="#4169E1"><a name="NRefSubcommDestroy"></a>static PetscErrorCode NRefSubcommDestroy(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,MatExplicitCtx *matctx)</font></strong>
+<a name="line1414">1414: </a>{
+<a name="line1416">1416: </a>  PetscInt       i;
+
+<a name="line1419">1419: </a>  VecScatterDestroy(&matctx->scatter_sub);
+<a name="line1420">1420: </a>  <font color="#4169E1">for</font> (i=0;i<matctx->subc->n;i++) {
+<a name="line1421">1421: </a>    VecScatterDestroy(&matctx->scatter_id[i]);
+<a name="line1422">1422: </a>  }
+<a name="line1423">1423: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line1424">1424: </a>    MatDestroy(&matctx->A[i]);
+<a name="line1425">1425: </a>  }
+<a name="line1426">1426: </a>  <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line1427">1427: </a>    <font color="#4169E1">for</font> (i=0;i<matctx->subc->n;i++) {
+<a name="line1428">1428: </a>      VecScatterDestroy(&matctx->scatterp_id[i]);
+<a name="line1429">1429: </a>    }
+<a name="line1430">1430: </a>    VecDestroy(&matctx->tp);
+<a name="line1431">1431: </a>    VecDestroy(&matctx->tpg);
+<a name="line1432">1432: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->W);
+<a name="line1433">1433: </a>  }
+<a name="line1434">1434: </a>  PetscFree3(matctx->A,matctx->scatter_id,matctx->scatterp_id);
+<a name="line1435">1435: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->V);
+<a name="line1436">1436: </a>  VecDestroy(&matctx->t);
+<a name="line1437">1437: </a>  VecDestroy(&matctx->tg);
+<a name="line1438">1438: </a>  VecDestroy(&matctx->Rv);
+<a name="line1439">1439: </a>  VecDestroy(&matctx->Vi);
+<a name="line1440">1440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1441">1441: </a>}
+
+<a name="line1445">1445: </a><strong><font color="#4169E1"><a name="PEPNewtonRefinement_TOAR"></a>PetscErrorCode PEPNewtonRefinement_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscInt *maxits,PetscReal *tol,PetscInt k,PetscScalar *S,PetscInt lds,PetscInt *prs)</font></strong>
+<a name="line1446">1446: </a>{
+<a name="line1447">1447: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRI)</font>
+<a name="line1449">1449: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRF/GETRI - Lapack routine is unavailable"</font>);
+<a name="line1450">1450: </a><font color="#A020F0">#else</font>
+<a name="line1452">1452: </a>  PetscScalar    *H,*work,*dH,*fH,*dVS;
+<a name="line1453">1453: </a>  PetscInt       ldh,i,j,its=1,nmat=pep->nmat,nsubc=pep->npart,rds;
+<a name="line1454">1454: </a>  PetscBLASInt   k_,ld_,*p,info;
+<a name="line1455">1455: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             dV;
+<a name="line1456">1456: </a>  PetscBool      sinvert,flg;
+<a name="line1457">1457: </a>  MatExplicitCtx *matctx=NULL;
+<a name="line1458">1458: </a>  Vec            v;
+<a name="line1459">1459: </a>  Mat            M,P;
+<a name="line1460">1460: </a>  FSubctx        *ctx;
+
+<a name="line1463">1463: </a>  PetscLogEventBegin(PEP_Refine,pep,0,0,0);
+<a name="line1464">1464: </a>  <font color="#4169E1">if</font> (k > pep->n) SETERRQ1(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Multiple Refinement available only for invariant pairs of dimension smaller than n=%D"</font>,pep->n);
+<a name="line1465">1465: </a>  <font color="#B22222">/* the input tolerance is not being taken into account (by the moment) */</font>
+<a name="line1466">1466: </a>  its = *maxits;
+<a name="line1467">1467: </a>  PetscMalloc3(k*k,&dH,nmat*k*k,&fH,k,&work);
+<a name="line1468">1468: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldh);
+<a name="line1469">1469: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1470">1470: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1471">1471: </a>  PetscMalloc1(2*k*k,&dVS);
+<a name="line1472">1472: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line1473">1473: </a>  <font color="#4169E1">if</font> (!flg && pep->st && pep->ops->backtransform) { <font color="#B22222">/* BackTransform */</font>
+<a name="line1474">1474: </a>    PetscBLASIntCast(k,&k_);
+<a name="line1475">1475: </a>    PetscBLASIntCast(ldh,&ld_);
+<a name="line1476">1476: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinvert);
+<a name="line1477">1477: </a>    <font color="#4169E1">if</font> (sinvert) {
+<a name="line1478">1478: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1479">1479: </a>      PetscMalloc1(k,&p);
+<a name="line1480">1480: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&k_,&k_,H,&ld_,p,&info));
+<a name="line1481">1481: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&k_,H,&ld_,p,work,&k_,&info));
+<a name="line1482">1482: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1483">1483: </a>      pep->ops->backtransform = NULL;
+<a name="line1484">1484: </a>    }
+<a name="line1485">1485: </a>    <font color="#4169E1">if</font> (sigma!=0.0) {
+<a name="line1486">1486: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1487">1487: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) H[i+ldh*i] += sigma;
+<a name="line1488">1488: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1489">1489: </a>      pep->ops->backtransform = NULL;
+<a name="line1490">1490: </a>    }
+<a name="line1491">1491: </a>  }
+<a name="line1492">1492: </a>  <font color="#4169E1">if</font> ((pep->scale==PEP_SCALE_BOTH || pep->scale==PEP_SCALE_SCALAR) && pep->sfactor!=1.0) {
+<a name="line1493">1493: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1494">1494: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line1495">1495: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) H[i+j*ldh] *= pep->sfactor;
+<a name="line1496">1496: </a>    }
+<a name="line1497">1497: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1498">1498: </a>    <font color="#4169E1">if</font> (!flg) {
+<a name="line1499">1499: </a>      <font color="#B22222">/* Restore original values */</font>
+<a name="line1500">1500: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++){
+<a name="line1501">1501: </a>        pep->pbc[pep->nmat+i] *= pep->sfactor;
+<a name="line1502">1502: </a>        pep->pbc[2*pep->nmat+i] *= pep->sfactor*pep->sfactor;
+<a name="line1503">1503: </a>      }
+<a name="line1504">1504: </a>    }
+<a name="line1505">1505: </a>  }
+<a name="line1506">1506: </a>  <font color="#4169E1">if</font> ((pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) && pep->Dr) {
+<a name="line1507">1507: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line1508">1508: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line1509">1509: </a>      VecPointwiseMult(v,v,pep->Dr);
+<a name="line1510">1510: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line1511">1511: </a>    }
+<a name="line1512">1512: </a>  }
+<a name="line1513">1513: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+
+<a name="line1515">1515: </a>  NRefOrthogStep(pep,k,H,ldh,fH,S,lds,prs);
+<a name="line1516">1516: </a>  <font color="#B22222">/* check if H is in Schur form */</font>
+<a name="line1517">1517: </a>  <font color="#4169E1">for</font> (i=0;i<k-1;i++) {
+<a name="line1518">1518: </a>    <font color="#4169E1">if</font> (H[i+1+i*ldh]!=0.0) {
+<a name="line1519">1519: </a><font color="#A020F0">#if !defined(PETSC_USES_COMPLEX)</font>
+<a name="line1520">1520: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Iterative Refinement requires the complex Schur form of the projected matrix"</font>);
+<a name="line1521">1521: </a><font color="#A020F0">#else</font>
+<a name="line1522">1522: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Iterative Refinement requires an upper triangular projected matrix"</font>);
+<a name="line1523">1523: </a><font color="#A020F0">#endif</font>
+<a name="line1524">1524: </a>    }
+<a name="line1525">1525: </a>  }
+<a name="line1526">1526: </a>  <font color="#4169E1">if</font> (nsubc>k) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Amount of subcommunicators should not be larger than the invariant pair dimension"</font>);
+<a name="line1527">1527: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,k);
+<a name="line1528">1528: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,k,&dV);
+<a name="line1529">1529: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)dV);
+<a name="line1530">1530: </a>  <font color="#4169E1">if</font> (pep->scheme!=PEP_REFINE_SCHEME_SCHUR) {
+<a name="line1531">1531: </a>    PetscMalloc1(1,&matctx);
+<a name="line1532">1532: </a>    <font color="#4169E1">if</font> (nsubc>1) { <font color="#B22222">/* spliting in subcommunicators */</font>
+<a name="line1533">1533: </a>      matctx->subc = pep->refinesubc;
+<a name="line1534">1534: </a>      NRefSubcommSetup(pep,k,matctx,nsubc);
+<a name="line1535">1535: </a>    } <font color="#4169E1">else</font> matctx->subc=NULL;
+<a name="line1536">1536: </a>  }
+
+<a name="line1538">1538: </a>  <font color="#B22222">/* Loop performing iterative refinements */</font>
+<a name="line1539">1539: </a>  <font color="#4169E1">for</font> (i=0;i<its;i++) {
+<a name="line1540">1540: </a>    <font color="#B22222">/* Pre-compute the polynomial basis evaluated in H */</font>
+<a name="line1541">1541: </a>    PEPEvaluateBasisforMatrix(pep,nmat,k,H,ldh,fH);
+<a name="line1542">1542: </a>    PEPNRefSetUp(pep,k,H,ldh,matctx,PetscNot(i));
+<a name="line1543">1543: </a>    <font color="#B22222">/* Solve the linear system */</font>
+<a name="line1544">1544: </a>    PEPNRefForwardSubstitution(pep,k,S,lds,H,ldh,fH,dV,dVS,&rds,dH,k,pep->refineksp,matctx);
+<a name="line1545">1545: </a>    <font color="#B22222">/* Update X (=V*S) and H, and orthogonalize [X;X*fH1;...;XfH(deg-1)] */</font>
+<a name="line1546">1546: </a>    PEPNRefUpdateInvPair(pep,k,H,ldh,fH,dH,S,lds,dV,dVS,rds);
+<a name="line1547">1547: </a>  }
+<a name="line1548">1548: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line1549">1549: </a>  <font color="#4169E1">if</font> (!flg && sinvert) {
+<a name="line1550">1550: </a>    PetscFree(p);
+<a name="line1551">1551: </a>  }
+<a name="line1552">1552: </a>  PetscFree3(dH,fH,work);
+<a name="line1553">1553: </a>  PetscFree(dVS);
+<a name="line1554">1554: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&dV);
+<a name="line1555">1555: </a>  <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line1556">1556: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line1557">1557: </a>    <font color="#4169E1">for</font> (i=0;i<2;i++) {
+<a name="line1558">1558: </a>      MatDestroy(&matctx->E[i]);
+<a name="line1559">1559: </a>    }
+<a name="line1560">1560: </a>    PetscFree4(matctx->idxp,matctx->idxg,matctx->map0,matctx->map1);
+<a name="line1561">1561: </a>    VecDestroy(&matctx->tN);
+<a name="line1562">1562: </a>    VecDestroy(&matctx->ttN);
+<a name="line1563">1563: </a>    VecDestroy(&matctx->t1);
+<a name="line1564">1564: </a>    <font color="#4169E1">if</font> (nsubc>1) {
+<a name="line1565">1565: </a>      NRefSubcommDestroy(pep,matctx);
+<a name="line1566">1566: </a>    } <font color="#4169E1">else</font> {
+<a name="line1567">1567: </a>      VecDestroy(&matctx->vseq);
+<a name="line1568">1568: </a>      VecScatterDestroy(&matctx->scatterctx);
+<a name="line1569">1569: </a>    }
+<a name="line1570">1570: </a>    PetscFree(matctx);
+<a name="line1571">1571: </a>    KSPGetOperators(pep->refineksp,&M,NULL);
+<a name="line1572">1572: </a>    MatDestroy(&M);
+<a name="line1573">1573: </a>    <font color="#4169E1">break</font>;
+<a name="line1574">1574: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line1575">1575: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->W);
+<a name="line1576">1576: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->Wt);
+<a name="line1577">1577: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->M2);
+<a name="line1578">1578: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&matctx->M3);
+<a name="line1579">1579: </a>    MatDestroy(&matctx->M1);
+<a name="line1580">1580: </a>    VecDestroy(&matctx->t);
+<a name="line1581">1581: </a>    PetscFree5(matctx->M4,matctx->w,matctx->wt,matctx->d,matctx->dt);
+<a name="line1582">1582: </a>    <font color="#4169E1">if</font> (nsubc>1) {
+<a name="line1583">1583: </a>      NRefSubcommDestroy(pep,matctx);
+<a name="line1584">1584: </a>    }
+<a name="line1585">1585: </a>    PetscFree(matctx);
+<a name="line1586">1586: </a>    <font color="#4169E1">break</font>;
+<a name="line1587">1587: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line1588">1588: </a>    KSPGetOperators(pep->refineksp,&M,&P);
+<a name="line1589">1589: </a>    MatShellGetContext(M,&ctx);
+<a name="line1590">1590: </a>    PetscFree4(ctx->M4,ctx->pM4,ctx->work,ctx->fih);
+<a name="line1591">1591: </a>    MatDestroy(&ctx->M1);
+<a name="line1592">1592: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->M2);
+<a name="line1593">1593: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->M3);
+<a name="line1594">1594: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&ctx->W);
+<a name="line1595">1595: </a>    VecDestroy(&ctx->t);
+<a name="line1596">1596: </a>    PetscFree(ctx);
+<a name="line1597">1597: </a>    MatDestroy(&M);
+<a name="line1598">1598: </a>    MatDestroy(&P);
+<a name="line1599">1599: </a>    <font color="#4169E1">break</font>;
+<a name="line1600">1600: </a>  }
+<a name="line1601">1601: </a>  PetscLogEventEnd(PEP_Refine,pep,0,0,0);
+<a name="line1602">1602: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1603">1603: </a><font color="#A020F0">#endif</font>
+<a name="line1604">1604: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/impls/krylov/toar/ptoar.c b/src/pep/impls/krylov/toar/ptoar.c
index 2127611..6ac2cea 100644
--- a/src/pep/impls/krylov/toar/ptoar.c
+++ b/src/pep/impls/krylov/toar/ptoar.c
@@ -14,11 +14,12 @@
            polynomial eigenvalue problems", talk presented at RANMEP 2008.
 
        [2] C. Campos and J.E. Roman, "Parallel Krylov solvers for the
-           polynomial eigenvalue problem in SLEPc", submitted, 2015.
+           polynomial eigenvalue problem in SLEPc", SIAM J. Sci. Comput.
+           to appear, 2016.
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,10 +41,23 @@
 #include "../src/pep/impls/krylov/pepkrylov.h"
 #include <slepcblaslapack.h>
 
+static PetscBool  cited = PETSC_FALSE;
+static const char citation[] =
+  "@Article{slepc-pep,\n"
+  "   author = \"C. Campos and J. E. Roman\",\n"
+  "   title = \"Parallel {Krylov} solvers for the polynomial eigenvalue problem in {SLEPc}\",\n"
+  "   journal = \"{SIAM} J. Sci. Comput.\",\n"
+  "   volume = \"to appear\",\n"
+  "   number = \"\",\n"
+  "   pages = \"\",\n"
+  "   year = \"2016,\"\n"
+  "   doi = \"http://dx.doi.org/10.xxxx/yyyy\"\n"
+  "}\n";
+
 #undef __FUNCT__
 #define __FUNCT__ "PEPTOARSNorm2"
 /*
-  Norm of [sp;sq] 
+  Norm of [sp;sq]
 */
 static PetscErrorCode PEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)
 {
@@ -70,7 +84,7 @@ PetscErrorCode PEPSetUp_TOAR(PEP pep)
   pep->lineariz = PETSC_TRUE;
   ierr = PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);CHKERRQ(ierr);
   if (!ctx->lock && pep->mpd<pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Should not use mpd parameter in non-locking variant");
-  if (!pep->max_it) pep->max_it = PetscMax(100,2*(pep->nmat-1)*pep->n/pep->ncv); 
+  if (!pep->max_it) pep->max_it = PetscMax(100,2*(pep->nmat-1)*pep->n/pep->ncv);
   if (!pep->which) {
     ierr = PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);CHKERRQ(ierr);
     if (sinv) pep->which = PEP_TARGET_MAGNITUDE;
@@ -107,8 +121,8 @@ PetscErrorCode PEPSetUp_TOAR(PEP pep)
   /* process starting vector */
   ctx->nq = 0;
   for (i=0;i<deg;i++) {
-    if (pep->nini>-deg) {  
-      ierr = BVSetRandomColumn(pep->V,ctx->nq,pep->rand);CHKERRQ(ierr);
+    if (pep->nini>-deg) {
+      ierr = BVSetRandomColumn(pep->V,ctx->nq);CHKERRQ(ierr);
     } else {
       ierr = BVInsertVec(pep->V,ctx->nq,pep->IS[i]);CHKERRQ(ierr);
     }
@@ -137,25 +151,23 @@ PetscErrorCode PEPSetUp_TOAR(PEP pep)
  where y = ([Sp;Sq]'*[z;x]).
    k: Column from S to be orthogonalized against previous columns.
    Sq = Sp+ld
+   dim(work)>=k
 */
-static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work,PetscInt nw)
+static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)
 {
   PetscErrorCode ierr;
   PetscBLASInt   n_,lds_,k_,one=1;
   PetscScalar    sonem=-1.0,sone=1.0,szero=0.0,*x0,*x,*c;
-  PetscInt       lwa,nwu=0,i,lds=deg*ld,n;
+  PetscInt       i,lds=deg*ld,n;
   PetscReal      eta,onorm;
-  
+
   PetscFunctionBegin;
   ierr = BVGetOrthogonalization(pep->V,NULL,NULL,&eta,NULL);CHKERRQ(ierr);
   n = k+deg-1;
   ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(deg*ld,&lds_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr); /* number of vectors to orthogonalize against them */
-  lwa = k;
-  if (!work||nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",6);
-  c = work+nwu;
-  nwu += k;
+  c = work;
   x0 = S+k*lds;
   PetscStackCallBLAS("BLASgemv",BLASgemv_("C",&n_,&k_,&sone,S,&lds_,x0,&one,&szero,y,&one));
   for (i=1;i<deg;i++) {
@@ -180,9 +192,7 @@ static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
   for (i=0;i<k;i++) y[i] += c[i];
   if (norm) {
     ierr = PEPTOARSNorm2(lds,S+k*lds,norm);CHKERRQ(ierr);
-  }
-  if (lindep) {
-    *lindep = (*norm < eta * onorm)?PETSC_TRUE:PETSC_FALSE;
+    if (lindep) *lindep = (*norm < eta * onorm)?PETSC_TRUE:PETSC_FALSE;
   }
   PetscFunctionReturn(0);
 }
@@ -201,7 +211,7 @@ static PetscErrorCode PEPTOAROrth2(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
          for the new Arnoldi vector
   Workspace: t_ (two vectors)
 */
-static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_,PetscInt nwv)
+static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,BV V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)
 {
   PetscErrorCode ierr;
   PetscInt       nmat=pep->nmat,deg=nmat-1,k,j,off=0,lss;
@@ -211,7 +221,6 @@ static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar s
   PetscBool      flg;
 
   PetscFunctionBegin;
-  if (!t_||nwv<3) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",12);
   ierr = BVSetActiveColumns(pep->V,0,nv);CHKERRQ(ierr);
   ierr = STGetTransform(pep->st,&flg);CHKERRQ(ierr);
   if (sinvert) {
@@ -258,15 +267,15 @@ static PetscErrorCode PEPTOARExtendBasis(PEP pep,PetscBool sinvert,PetscScalar s
     }
     a *= pep->sfactor;
     ierr = STMatMult(pep->st,deg-1,ve,t);CHKERRQ(ierr);
-    ierr = VecAXPY(q,a,t);CHKERRQ(ierr);    
+    ierr = VecAXPY(q,a,t);CHKERRQ(ierr);
     a *= pep->sfactor;
   }
   if (flg || !sinvert) alpha /= a;
   ierr = STMatSolve(pep->st,q,t);CHKERRQ(ierr);
   ierr = VecScale(t,alpha);CHKERRQ(ierr);
   if (!sinvert) {
-    if (cg[deg-1]!=0) {ierr = VecAXPY(t,cg[deg-1],v);CHKERRQ(ierr);}    
-    if (cb[deg-1]!=0) {ierr = VecAXPY(t,cb[deg-1],ve);CHKERRQ(ierr);}    
+    if (cg[deg-1]!=0) { ierr = VecAXPY(t,cg[deg-1],v);CHKERRQ(ierr); }
+    if (cb[deg-1]!=0) { ierr = VecAXPY(t,cb[deg-1],ve);CHKERRQ(ierr); }
   }
   if (pep->Dr) {
     ierr = VecPointwiseDivide(t,t,pep->Dr);CHKERRQ(ierr);
@@ -306,12 +315,12 @@ static PetscErrorCode PEPTOARCoefficients(PEP pep,PetscBool sinvert,PetscScalar
 #undef __FUNCT__
 #define __FUNCT__ "PEPTOARrun"
 /*
-  Compute a run of Arnoldi iterations
+  Compute a run of Arnoldi iterations dim(work)=ld
 */
-static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)
+static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,Vec *t_)
 {
   PetscErrorCode ierr;
-  PetscInt       i,j,p,m=*M,nwu=0,lwa,deg=pep->nmat-1;
+  PetscInt       i,j,p,m=*M,nwu=0,deg=pep->nmat-1;
   PetscInt       lds=ld*deg,nqt=*nq;
   Vec            t;
   PetscReal      norm;
@@ -319,9 +328,6 @@ static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscSca
   PetscScalar    *x;
 
   PetscFunctionBegin;
-  if (!t_||nwv<3) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",12);
-  lwa = ld;
-  if (!work||nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",10);
   ierr = STGetTransform(pep->st,&flg);CHKERRQ(ierr);
   if (!flg) {
     /* spectral transformation handled by the solver */
@@ -332,7 +338,7 @@ static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscSca
   for (j=k;j<m;j++) {
     /* apply operator */
     ierr = BVGetColumn(pep->V,nqt,&t);CHKERRQ(ierr);
-    ierr = PEPTOARExtendBasis(pep,sinvert,sigma,S+j*lds,ld,nqt,pep->V,t,S+(j+1)*lds,ld,t_,3);CHKERRQ(ierr);
+    ierr = PEPTOARExtendBasis(pep,sinvert,sigma,S+j*lds,ld,nqt,pep->V,t,S+(j+1)*lds,ld,t_);CHKERRQ(ierr);
     ierr = BVRestoreColumn(pep->V,nqt,&t);CHKERRQ(ierr);
 
     /* orthogonalize */
@@ -347,31 +353,35 @@ static PetscErrorCode PEPTOARrun(PEP pep,PetscScalar sigma,PetscInt *nq,PetscSca
 
     ierr = PEPTOARCoefficients(pep,sinvert,sigma,nqt-1,S+j*lds,ld,S+(j+1)*lds,ld,x);CHKERRQ(ierr);
     /* level-2 orthogonalization */
-    ierr = PEPTOAROrth2(pep,S,ld,deg,j+1,H+j*ldh,&norm,breakdown,work+nwu,lwa-nwu);CHKERRQ(ierr);
-    if (!*breakdown) {
-      for (p=0;p<deg;p++) {
-        for (i=0;i<=j+deg;i++) {
-          S[i+p*ld+(j+1)*lds] /= norm;
-        }
-      }
-      H[j+1+ldh*j] = norm;
-    } else {
-      H[j+1+ldh*j] = norm;
+    ierr = PEPTOAROrth2(pep,S,ld,deg,j+1,H+j*ldh,&norm,breakdown,work+nwu);CHKERRQ(ierr);
+    H[j+1+ldh*j] = norm;
+    *nq = nqt;
+    if (*breakdown) {
       *M = j+1;
-      *nq = nqt;
-      PetscFunctionReturn(0);
+      break;
+    }
+    for (p=0;p<deg;p++) {
+      for (i=0;i<=j+deg;i++) {
+        S[i+p*ld+(j+1)*lds] /= norm;
+      }
     }
-    *nq = nqt;
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPTOARTrunc"
-static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)
+/*
+  dim(rwork)=6*n; dim(work)=6*ld*lds+2*cs1
+*/
+static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscReal *rwork)
 {
+#if defined(PETSC_MISSING_LAPACK_GESVD) || defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD/GEQRF/ORGQR - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
-  PetscInt       lwa,nwu=0,lrwa,nrwu=0,nnc,nrow;
+  PetscInt       nwu=0,nrwu=0,nnc,nrow,lwa;
   PetscInt       j,i,k,n,lds=deg*ld,rs1=*rs1a,rk=0,offu;
   PetscScalar    *M,*V,*pU,*SS,*SS2,t,sone=1.0,zero=0.0,mone=-1.0,*p,*tau;
   PetscReal      *sg,tol;
@@ -380,17 +390,8 @@ static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
 
   PetscFunctionBegin;
   if (cs1==0) PetscFunctionReturn(0);
-  n = (rs1>deg*cs1)?deg*cs1:rs1;
   lwa = 6*ld*lds+2*cs1;
-  lrwa = 6*n;
-  if (!work||nw<lwa) {
-    if (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",6);
-    if (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",5);
-  }
-  if (!rwork||nrw<lrwa) {
-    if (nrw<lrwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",8);
-    if (!rwork) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",7);
-  }
+  n = (rs1>deg*cs1)?deg*cs1:rs1;
   nnc = cs1-lock-newc;
   nrow = rs1-lock;
   ierr = PetscMalloc4(deg*newc*nnc,&SS,newc*nnc,&SS2,(rs1+lock+newc)*n,&pU,deg*rs1,&tau);CHKERRQ(ierr);
@@ -418,12 +419,12 @@ static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
     for (j=0;j<deg;j++) {
       for (i=lock;i<lock+newc;i++) {
         ierr = PetscMemcpy(M+(i-lock+j*newc)*nrow,S+i*lds+j*ld+lock,nrow*sizeof(PetscScalar));CHKERRQ(ierr);
-      } 
+      }
     }
 #if !defined (PETSC_USE_COMPLEX)
     PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,&info));
 #else
-    PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
+    PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));
 #endif
     if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESVD %d",info);
     /* SVD has rank min(newc,nrow) */
@@ -455,12 +456,12 @@ static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
   for (j=0;j<deg;j++) {
     for (i=lock+newc;i<cs1;i++) {
       ierr = PetscMemcpy(M+(i-lock-newc+j*nnc)*nrow,S+i*lds+j*ld+lock,nrow*sizeof(PetscScalar));CHKERRQ(ierr);
-    } 
+    }
   }
 #if !defined (PETSC_USE_COMPLEX)
   PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,&info));
 #else
-  PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
+  PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("S","S",&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));
 #endif
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESVD %d",info);
   tol = PetscMax(rs1,deg*cs1)*PETSC_MACHINE_EPSILON*sg[0];
@@ -496,8 +497,8 @@ static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
   PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&nrow_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
   for (i=0;i<deg;i++) {
     PetscStackCallBLAS("BLAStrmm",BLAStrmm_("L","U","N","N",&rk_,&nnc_,&sone,pU+offu,&rs1_,S+lock*lds+lock+i*ld,&lds_));
-  }  
-  PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&nrow_,&rk_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
+  }
+  PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&nrow_,&rk_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
 
   /* update vectors V(:,idx) = V*Q(:,idx) */
   rk = rk+lock;
@@ -506,35 +507,32 @@ static PetscErrorCode PEPTOARTrunc(PEP pep,PetscScalar *S,PetscInt ld,PetscInt d
   ierr = BVSetActiveColumns(pep->V,lock,rs1);CHKERRQ(ierr);
   ierr = BVMultInPlace(pep->V,U,lock,rk);CHKERRQ(ierr);
   ierr = BVSetActiveColumns(pep->V,0,rk);CHKERRQ(ierr);
-  ierr = MatDestroy(&U);CHKERRQ(ierr);  
+  ierr = MatDestroy(&U);CHKERRQ(ierr);
   *rs1a = rk;
 
   /* free work space */
   ierr = PetscFree4(SS,SS2,pU,tau);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPTOARSupdate"
 /*
-  S <- S*Q 
+  S <- S*Q
   columns s-s+ncu of S
   rows 0-sr of S
   size(Q) qr x ncu
+  dim(work)=sr*ncu
 */
-static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)
+static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)
 {
   PetscErrorCode ierr;
   PetscScalar    a=1.0,b=0.0;
   PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
-  PetscInt       lwa,j,lds=deg*ld,i;
+  PetscInt       j,lds=deg*ld,i;
 
   PetscFunctionBegin;
-  lwa = sr*ncu;
-  if (!work||nw<lwa) {
-    if (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",10);
-    if (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",9);
-  }
   ierr = PetscBLASIntCast(sr,&sr_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(qr,&qr_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ncu,&ncu_);CHKERRQ(ierr);
@@ -568,9 +566,7 @@ static PetscErrorCode PEPEvaluateBasisM(PEP pep,PetscInt k,PetscScalar *T,PetscI
   if (idx==0) {
     ierr = PetscMemzero(*Tj,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
     ierr = PetscMemzero(*Tp,k*k*sizeof(PetscScalar));CHKERRQ(ierr);
-    for (i=0;i<k;i++) {
-      (*Tj)[i+i*k] = 1.0;
-    }
+    for (i=0;i<k;i++) (*Tj)[i+i*k] = 1.0;
   } else {
     ierr = PetscBLASIntCast(ldt,&ldt_);CHKERRQ(ierr);
     ierr = PetscBLASIntCast(k,&k_);CHKERRQ(ierr);
@@ -578,7 +574,7 @@ static PetscErrorCode PEPEvaluateBasisM(PEP pep,PetscInt k,PetscScalar *T,PetscI
     for (i=0;i<k;i++) T[i*ldt+i] -= cb[idx-1];
     a = 1/ca[idx-1];
     g = (idx==1)?0.0:-cg[idx-1]/ca[idx-1];
-    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&a,T,&ldt_,*Tj,&k_,&g,*Tp,&k_));    
+    PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&k_,&k_,&k_,&a,T,&ldt_,*Tj,&k_,&g,*Tp,&k_));
     pt = *Tj; *Tj = *Tp; *Tp = pt;
     for (i=0;i<k;i++) T[i*ldt+i] += cb[idx-1];
   }
@@ -587,10 +583,15 @@ static PetscErrorCode PEPEvaluateBasisM(PEP pep,PetscInt k,PetscScalar *T,PetscI
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPExtractInvariantPair"
-static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work,PetscInt nw)
+/* dim(work)=6*sr*k;*/
+static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work)
 {
+#if defined(PETSC_MISSING_LAPACK_GESV) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(PETSC_MISSING_LAPACK_GETRF)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESV/GETRI/GETRF - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
-  PetscInt       i,j,jj,nwu=0,lwa,lds,ldt,d=pep->nmat-1,idxcpy=0;
+  PetscInt       nw,i,j,jj,nwu=0,lds,ldt,d=pep->nmat-1,idxcpy=0;
   PetscScalar    *At,*Bt,*Hj,*Hp,*T,sone=1.0,g,a,*pM;
   PetscBLASInt   k_,sr_,lds_,ldh_,info,*p,lwork,ldt_;
   PetscBool      transf=PETSC_FALSE,flg;
@@ -601,11 +602,7 @@ static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt
 
   PetscFunctionBegin;
   if (k==0) PetscFunctionReturn(0);
-  lwa = 6*sr*k;
-  if (!work||nw<lwa) {
-    if (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",10);
-    if (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",9);
-  }
+  nw = 6*sr*k;
   lds = deg*ld;
   At = work+nwu;
   nwu += sr*k;
@@ -637,7 +634,7 @@ static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt
     if (flg) {
       PetscStackCallBLAS("LAPACKgetrf",LAPACKgetrf_(&k_,&k_,T,&k_,p,&info));
       ierr = PetscBLASIntCast(nw-nwu,&lwork);CHKERRQ(ierr);
-      PetscStackCallBLAS("LAPACKgetri",LAPACKgetri_(&k_,T,&k_,p,work+nwu,&lwork,&info));  
+      PetscStackCallBLAS("LAPACKgetri",LAPACKgetri_(&k_,T,&k_,p,work+nwu,&lwork,&info));
     }
     if (sigma!=0.0) for (i=0;i<k;i++) T[i+k*i] += sigma;
   } else {
@@ -692,7 +689,7 @@ static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt
     g = 0.0; a = 1.0;
     ierr = BVSetActiveColumns(pep->V,0,sr);CHKERRQ(ierr);
     for (j=0;j<pep->nmat;j++) {
-      ierr = BVMatMult(pep->V,A[j],Y);CHKERRQ(ierr);    
+      ierr = BVMatMult(pep->V,A[j],Y);CHKERRQ(ierr);
       ierr = PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);CHKERRQ(ierr);
       for (i=0;i<pep->nmat-1;i++) {
         PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&sr_,&k_,&k_,&a,S+i*ld,&lds_,Hj,&k_,&g,At,&sr_));
@@ -704,14 +701,14 @@ static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt
         ierr = BVMult(R[i],1.0,(i==0)?0.0:1.0,Y,M);CHKERRQ(ierr);
       }
     }
-    
+
     /* frobenius norm */
     maxnrm = 0.0;
     for (i=0;i<pep->nmat-1;i++) {
       norm = 0.0;
       for (j=0;j<k;j++) {
         ierr = BVGetColumn(R[i],j,&v);CHKERRQ(ierr);
-        ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr); 
+        ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr);
         ierr = BVRestoreColumn(R[i],j,&v);CHKERRQ(ierr);
         norm += nrm*nrm;
       }
@@ -750,49 +747,14 @@ static PetscErrorCode PEPExtractInvariantPair(PEP pep,PetscScalar sigma,PetscInt
     if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESV %d",info);
     for (j=0;j<sr;j++) {
       for (i=0;i<k;i++) S[i*lds+j] = PetscConj(At[j*k+i]);
-    } 
+    }
     break;
   default:
     SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Extraction not implemented in this solver");
   }
   ierr = PetscFree(p);CHKERRQ(ierr);
   PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "PEPLookfordeflation"
-static PetscErrorCode PEPLookfordeflation(PEP pep,PetscInt *nl)
-{
-  PetscErrorCode ierr;
-  PetscInt       i,l,n,ld;
-  PetscReal      norm;
-  PetscBool      cplx;
-  PetscScalar    *H;
-
-  PetscFunctionBegin;
-  *nl = 0;
-  ierr = DSGetDimensions(pep->ds,&n,NULL,&l,NULL,NULL);CHKERRQ(ierr);
-  ierr = DSGetLeadingDimension(pep->ds,&ld);CHKERRQ(ierr);
-  ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
-  for (i=l;i<n;i++) {
-#if defined(PETSC_USE_COMPLEX)
-    cplx = PetscImaginaryPart(pep->eigr[i])?PETSC_TRUE:PETSC_FALSE;
-    norm = PetscAbsScalar(pep->eigr[i]);
-#else
-    cplx = pep->eigi[i]?PETSC_TRUE:PETSC_FALSE;
-    norm = SlepcAbsEigenvalue(pep->eigr[i],pep->eigi[i]);
 #endif
-    if (PetscAbsScalar(H[n+i*ld])/norm < pep->tol){
-      if (cplx) {
-        if (PetscAbsScalar(H[n+(i+1)*ld])/norm < pep->tol) (*nl)++;
-        else break;
-        i++;
-      }
-      (*nl)++;
-    } else break;
-  }
-  ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
@@ -801,16 +763,16 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
 {
   PetscErrorCode ierr;
   PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
-  PetscInt       i,j,k,l,nv=0,ld,lds,off,ldds,newn,nq=ctx->nq,nl,nconv=0,locked=0,newc;
+  PetscInt       i,j,k,l,nv=0,ld,lds,off,ldds,newn,nq=ctx->nq,nconv=0,locked=0,newc;
   PetscInt       lwa,lrwa,nwu=0,nrwu=0,nmat=pep->nmat,deg=nmat-1;
   PetscScalar    *S,*Q,*work,*H,sigma;
   PetscReal      beta,*rwork;
-  PetscBool      breakdown=PETSC_FALSE,flg,falselock=PETSC_FALSE,def=PETSC_FALSE,sinv;
+  PetscBool      breakdown=PETSC_FALSE,flg,falselock=PETSC_FALSE,sinv=PETSC_FALSE;
 
   PetscFunctionBegin;
+  ierr = PetscCitationsRegister(citation,&cited);CHKERRQ(ierr);
   if (ctx->lock) {
-    ierr = PetscOptionsGetBool(NULL,"-pep_toar_falselocking",&falselock,NULL);CHKERRQ(ierr);
-    ierr = PetscOptionsGetBool(NULL,"-pep_toar_lockdeflated",&def,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsGetBool(NULL,NULL,"-pep_toar_falselocking",&falselock,NULL);CHKERRQ(ierr);
   }
   ld = ctx->ld;
   S = ctx->S;
@@ -818,7 +780,7 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
   lwa = (deg+6)*ld*lds;
   lrwa = 7*lds;
   ierr = PetscMalloc2(lwa,&work,lrwa,&rwork);CHKERRQ(ierr);
-  ierr = DSGetLeadingDimension(pep->ds,&ldds);CHKERRQ(ierr); 
+  ierr = DSGetLeadingDimension(pep->ds,&ldds);CHKERRQ(ierr);
   ierr = STGetShift(pep->st,&sigma);CHKERRQ(ierr);
 
   /* update polynomial basis coefficients */
@@ -826,16 +788,16 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
   if (pep->sfactor!=1.0) {
     for (i=0;i<nmat;i++) {
       pep->pbc[nmat+i] /= pep->sfactor;
-      pep->pbc[2*nmat+i] /= pep->sfactor*pep->sfactor; 
+      pep->pbc[2*nmat+i] /= pep->sfactor*pep->sfactor;
     }
     if (!flg) {
       pep->target /= pep->sfactor;
-      ierr = RGSetScale(pep->rg,pep->sfactor);CHKERRQ(ierr);
+      ierr = RGPushScale(pep->rg,1.0/pep->sfactor);CHKERRQ(ierr);
       ierr = STScaleShift(pep->st,1.0/pep->sfactor);CHKERRQ(ierr);
       sigma /= pep->sfactor;
     } else {
       ierr = PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);CHKERRQ(ierr);
-      ierr = RGSetScale(pep->rg,sinv?1.0/pep->sfactor:pep->sfactor);CHKERRQ(ierr);
+      ierr = RGPushScale(pep->rg,sinv?pep->sfactor:1.0/pep->sfactor);CHKERRQ(ierr);
       ierr = STScaleShift(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);CHKERRQ(ierr);
     }
   }
@@ -846,11 +808,11 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
   l = 0;
   while (pep->reason == PEP_CONVERGED_ITERATING) {
     pep->its++;
-    
+
     /* compute an nv-step Lanczos factorization */
     nv = PetscMax(PetscMin(nconv+pep->mpd,pep->ncv),nv);
     ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
-    ierr = PEPTOARrun(pep,sigma,&nq,S,ld,H,ldds,pep->nconv+l,&nv,&breakdown,work+nwu,lwa-nwu,pep->work,4);CHKERRQ(ierr);
+    ierr = PEPTOARrun(pep,sigma,&nq,S,ld,H,ldds,pep->nconv+l,&nv,&breakdown,work+nwu,pep->work);CHKERRQ(ierr);
     beta = PetscAbsScalar(H[(nv-1)*ldds+nv]);
     ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
     ierr = DSSetDimensions(pep->ds,nv,0,pep->nconv,pep->nconv+l);CHKERRQ(ierr);
@@ -867,8 +829,7 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
 
     /* check convergence */
     ierr = PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,nv-pep->nconv,beta,&k);CHKERRQ(ierr);
-    if (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-    if (k >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
+    ierr = (*pep->stopping)(pep,pep->its,pep->max_it,k,pep->nev,&pep->reason,pep->stoppingctx);CHKERRQ(ierr);
 
     /* update l */
     if (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
@@ -882,21 +843,12 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
       }
     }
     nconv = k;
-    /* decide on deflating Krylov vectors */
-    if (def) {
-      ierr = PEPLookfordeflation(pep,&nl);CHKERRQ(ierr);
-      nl = PetscMin(nl,k-pep->nconv);
-      if (ctx->lock && pep->reason == PEP_CONVERGED_ITERATING && !breakdown) { 
-        k = pep->nconv+nl; l = newn-k;
-      }
-    } else nl = k-pep->nconv;
-
     if (!ctx->lock && pep->reason == PEP_CONVERGED_ITERATING && !breakdown) { l += k; k = 0; } /* non-locking variant: reset no. of converged pairs */
 
     /* update S */
     off = pep->nconv*ldds;
     ierr = DSGetArray(pep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
-    ierr = PEPTOARSupdate(S,ld,deg,nq,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu,lwa-nwu);CHKERRQ(ierr);
+    ierr = PEPTOARSupdate(S,ld,deg,nq,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu);CHKERRQ(ierr);
     ierr = DSRestoreArray(pep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
 
     /* copy last column of S */
@@ -912,11 +864,11 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
     /* truncate S */
     if (k+l+deg<nq) {
       if (!falselock && ctx->lock) {
-        newc = flg?k-pep->nconv:nl;
-        ierr = PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,locked,newc,flg,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);CHKERRQ(ierr);
+        newc = k-pep->nconv;
+        ierr = PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,locked,newc,flg,work+nwu,rwork+nrwu);CHKERRQ(ierr);
         locked += newc;
       } else {
-        ierr = PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,0,0,flg,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);CHKERRQ(ierr);
+        ierr = PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,0,0,flg,work+nwu,rwork+nrwu);CHKERRQ(ierr);
       }
     }
     pep->nconv = k;
@@ -930,7 +882,7 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
     if (pep->refine==PEP_REFINE_MULTIPLE && pep->rits>0) {
       /* extract invariant pair */
       ierr = DSGetArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
-      ierr = PEPExtractInvariantPair(pep,sigma,nq,pep->nconv,S,ld,deg,H,ldds,work+nwu,lwa-nwu);CHKERRQ(ierr);
+      ierr = PEPExtractInvariantPair(pep,sigma,nq,pep->nconv,S,ld,deg,H,ldds,work+nwu);CHKERRQ(ierr);
       ierr = DSRestoreArray(pep->ds,DS_MAT_A,&H);CHKERRQ(ierr);
       ierr = DSSetDimensions(pep->ds,pep->nconv,0,0,0);CHKERRQ(ierr);
       ierr = DSSetState(pep->ds,DS_STATE_RAW);CHKERRQ(ierr);
@@ -938,7 +890,7 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
       ierr = DSSolve(pep->ds,pep->eigr,pep->eigi);CHKERRQ(ierr);
       ierr = DSSort(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);CHKERRQ(ierr);
       ierr = DSGetArray(pep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
-      ierr = PEPTOARSupdate(S,ld,deg,nq,0,pep->nconv,pep->nconv,Q,ldds,work+nwu,lwa-nwu);CHKERRQ(ierr);
+      ierr = PEPTOARSupdate(S,ld,deg,nq,0,pep->nconv,pep->nconv,Q,ldds,work+nwu);CHKERRQ(ierr);
       ierr = DSRestoreArray(pep->ds,DS_MAT_Q,&Q);CHKERRQ(ierr);
     } else {
       ierr = DSSetDimensions(pep->ds,pep->nconv,0,0,0);CHKERRQ(ierr);
@@ -957,7 +909,6 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
     } else {
       ierr = STScaleShift(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);CHKERRQ(ierr);
     }
-    ierr = RGSetScale(pep->rg,1.0);CHKERRQ(ierr);
     if (pep->sfactor!=1.0) {
       for (j=0;j<pep->nconv;j++) {
         pep->eigr[j] *= pep->sfactor;
@@ -970,6 +921,7 @@ PetscErrorCode PEPSolve_TOAR(PEP pep)
       }
     }
   }
+  if (pep->sfactor!=1.0) { ierr = RGPopScale(pep->rg);CHKERRQ(ierr); }
 
   /* change the state to raw so that DSVectors() computes eigenvectors from scratch */
   ierr = DSSetDimensions(pep->ds,pep->nconv,0,0,0);CHKERRQ(ierr);
@@ -1063,7 +1015,7 @@ PetscErrorCode PEPTOARGetRestart(PEP pep,PetscReal *keep)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(keep,2);
-  ierr = PetscTryMethod(pep,"PEPTOARGetRestart_C",(PEP,PetscReal*),(pep,keep));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPTOARGetRestart_C",(PEP,PetscReal*),(pep,keep));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1149,13 +1101,13 @@ PetscErrorCode PEPTOARGetLocking(PEP pep,PetscBool *lock)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(lock,2);
-  ierr = PetscTryMethod(pep,"PEPTOARGetLocking_C",(PEP,PetscBool*),(pep,lock));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPTOARGetLocking_C",(PEP,PetscBool*),(pep,lock));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetFromOptions_TOAR"
-PetscErrorCode PEPSetFromOptions_TOAR(PetscOptions *PetscOptionsObject,PEP pep)
+PetscErrorCode PEPSetFromOptions_TOAR(PetscOptionItems *PetscOptionsObject,PEP pep)
 {
   PetscErrorCode ierr;
   PetscBool      flg,lock;
diff --git a/src/pep/impls/krylov/toar/ptoar.c.html b/src/pep/impls/krylov/toar/ptoar.c.html
index f7e2d60..9e90853 100644
--- a/src/pep/impls/krylov/toar/ptoar.c.html
+++ b/src/pep/impls/krylov/toar/ptoar.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/krylov/toar/ptoar.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:59:00+00:00">
+<meta name="date" content="2016-05-16T10:33:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/krylov/toar/ptoar.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/krylov/toar/ptoar.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc polynomial eigensolver: "toar"</font>
@@ -26,1127 +26,1081 @@
 <a name="line14"> 14: </a><font color="#B22222">           polynomial eigenvalue problems", talk presented at RANMEP 2008.</font>
 
 <a name="line16"> 16: </a><font color="#B22222">       [2] C. Campos and J.E. Roman, "Parallel Krylov solvers for the</font>
-<a name="line17"> 17: </a><font color="#B22222">           polynomial eigenvalue problem in SLEPc", submitted, 2015.</font>
-
-<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line20"> 20: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line21"> 21: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
-
-<a name="line23"> 23: </a><font color="#B22222">   This file is part of SLEPc.</font>
-
-<a name="line25"> 25: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
-<a name="line26"> 26: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
-<a name="line27"> 27: </a><font color="#B22222">   the Free Software Foundation.</font>
-
-<a name="line29"> 29: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
-<a name="line30"> 30: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
-<a name="line31"> 31: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
-<a name="line32"> 32: </a><font color="#B22222">   more details.</font>
-
-<a name="line34"> 34: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
-<a name="line35"> 35: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
-<a name="line36"> 36: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
-<a name="line37"> 37: </a><font color="#B22222">*/</font>
-
-<a name="line39"> 39: </a><font color="#A020F0">#include <slepc/private/pepimpl.h>    </font><font color="#B22222">/*I "slepcpep.h" I*/</font><font color="#A020F0"></font>
-<a name="line40"> 40: </a> #include <A href="../../../../../include/../src/pep/impls/krylov/pepkrylov.h.html">../src/pep/impls/krylov/pepkrylov.h</A>
-<a name="line41"> 41: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
-
-<a name="line45"> 45: </a><font color="#B22222">/*</font>
-<a name="line46"> 46: </a><font color="#B22222">  Norm of [sp;sq] </font>
-<a name="line47"> 47: </a><font color="#B22222">*/</font>
-<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="PEPTOARSNorm2"></a>static PetscErrorCode PEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)</font></strong>
-<a name="line49"> 49: </a>{
-<a name="line51"> 51: </a>  PetscBLASInt   n_,one=1;
-
-<a name="line54"> 54: </a>  PetscBLASIntCast(n,&n_);
-<a name="line55"> 55: </a>  *norm = BLASnrm2_(&n_,S,&one);
-<a name="line56"> 56: </a>  <font color="#4169E1">return</font>(0);
-<a name="line57"> 57: </a>}
-
-<a name="line61"> 61: </a><strong><font color="#4169E1"><a name="PEPSetUp_TOAR"></a>PetscErrorCode PEPSetUp_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line62"> 62: </a>{
-<a name="line64"> 64: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
-<a name="line65"> 65: </a>  PetscBool      sinv,flg,lindep;
-<a name="line66"> 66: </a>  PetscInt       i,lds,deg=pep->nmat-1,j;
-<a name="line67"> 67: </a>  PetscReal      norm;
-
-<a name="line70"> 70: </a>  pep->lineariz = PETSC_TRUE;
-<a name="line71"> 71: </a>  PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);
-<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (!ctx->lock && pep->mpd<pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Should not use mpd parameter in non-locking variant"</font>);
-<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (!pep->max_it) pep->max_it = PetscMax(100,2*(pep->nmat-1)*pep->n/pep->ncv); 
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!pep->which) {
-<a name="line75"> 75: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line76"> 76: </a>    <font color="#4169E1">if</font> (sinv) pep->which = PEP_TARGET_MAGNITUDE;
-<a name="line77"> 77: </a>    <font color="#4169E1">else</font> pep->which = PEP_LARGEST_MAGNITUDE;
-<a name="line78"> 78: </a>  }
-<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (pep->problem_type!=PEP_GENERAL) {
-<a name="line80"> 80: </a>    PetscInfo(pep,<font color="#666666">"Problem type ignored, performing a non-symmetric linearization\n"</font>);
-<a name="line81"> 81: </a>  }
-
-<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (!ctx->keep) ctx->keep = 0.5;
-
-<a name="line85"> 85: </a>  <a href="../../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,pep->nmat-1);
-<a name="line86"> 86: </a>  <a href="../../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,3);
-<a name="line87"> 87: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(pep->ds,DSNHEP);
-<a name="line88"> 88: </a>  <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(pep->ds,PETSC_TRUE);
-<a name="line89"> 89: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(pep->ds,pep->ncv+1);
-
-<a name="line91"> 91: </a>  PEPBasisCoefficients(pep,pep->pbc);
-<a name="line92"> 92: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line94"> 94: </a>    PetscMalloc1(pep->nmat,&pep->solvematcoeffs);
-<a name="line95"> 95: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line96"> 96: </a>    <font color="#4169E1">if</font> (sinv) {
-<a name="line97"> 97: </a>      PEPEvaluateBasis(pep,pep->target,0,pep->solvematcoeffs,NULL);
-<a name="line98"> 98: </a>    } <font color="#4169E1">else</font> {
-<a name="line99"> 99: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) pep->solvematcoeffs[i] = 0.0;
-<a name="line100">100: </a>      pep->solvematcoeffs[pep->nmat-1] = 1.0;
-<a name="line101">101: </a>    }
-<a name="line102">102: </a>  }
-<a name="line103">103: </a>  ctx->ld = pep->ncv+(pep->nmat-1);   <font color="#B22222">/* number of rows of each fragment of S */</font>
-<a name="line104">104: </a>  lds = (pep->nmat-1)*ctx->ld;
-<a name="line105">105: </a>  PetscCalloc1(lds*ctx->ld,&ctx->S);
-
-<a name="line107">107: </a>  <font color="#B22222">/* process starting vector */</font>
-<a name="line108">108: </a>  ctx->nq = 0;
-<a name="line109">109: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (pep->nini>-deg) {  
-<a name="line111">111: </a>      <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,ctx->nq,pep->rand);
+<a name="line17"> 17: </a><font color="#B22222">           polynomial eigenvalue problem in SLEPc", SIAM J. Sci. Comput.</font>
+<a name="line18"> 18: </a><font color="#B22222">           to appear, 2016.</font>
+
+<a name="line20"> 20: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line21"> 21: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line22"> 22: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line24"> 24: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line26"> 26: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line27"> 27: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line28"> 28: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line30"> 30: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line31"> 31: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line32"> 32: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line33"> 33: </a><font color="#B22222">   more details.</font>
+
+<a name="line35"> 35: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line36"> 36: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line37"> 37: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line38"> 38: </a><font color="#B22222">*/</font>
+
+<a name="line40"> 40: </a><font color="#A020F0">#include <slepc/private/pepimpl.h>    </font><font color="#B22222">/*I "slepcpep.h" I*/</font><font color="#A020F0"></font>
+<a name="line41"> 41: </a> #include <A href="../../../../../include/../src/pep/impls/krylov/pepkrylov.h.html">../src/pep/impls/krylov/pepkrylov.h</A>
+<a name="line42"> 42: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line44"> 44: </a>static PetscBool  cited = PETSC_FALSE;
+<a name="line45"> 45: </a>static const char citation[] =
+<a name="line46"> 46: </a>  <font color="#666666">"@Article{slepc-pep,\n"</font>
+<a name="line47"> 47: </a>  <font color="#666666">"   author = \"C. Campos and J. E. Roman\",\n"</font>
+<a name="line48"> 48: </a>  <font color="#666666">"   title = \"Parallel {Krylov} solvers for the polynomial eigenvalue problem in {SLEPc}\",\n"</font>
+<a name="line49"> 49: </a>  <font color="#666666">"   journal = \"{SIAM} J. Sci. Comput.\",\n"</font>
+<a name="line50"> 50: </a>  <font color="#666666">"   volume = \"to appear\",\n"</font>
+<a name="line51"> 51: </a>  <font color="#666666">"   number = \"\",\n"</font>
+<a name="line52"> 52: </a>  <font color="#666666">"   pages = \"\",\n"</font>
+<a name="line53"> 53: </a>  <font color="#666666">"   year = \"2016,\"\n"</font>
+<a name="line54"> 54: </a>  <font color="#666666">"   doi = \"http://dx.doi.org/10.xxxx/yyyy\"\n"</font>
+<a name="line55"> 55: </a>  <font color="#666666">"}\n"</font>;
+
+<a name="line59"> 59: </a><font color="#B22222">/*</font>
+<a name="line60"> 60: </a><font color="#B22222">  Norm of [sp;sq]</font>
+<a name="line61"> 61: </a><font color="#B22222">*/</font>
+<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="PEPTOARSNorm2"></a>static PetscErrorCode PEPTOARSNorm2(PetscInt n,PetscScalar *S,PetscReal *norm)</font></strong>
+<a name="line63"> 63: </a>{
+<a name="line65"> 65: </a>  PetscBLASInt   n_,one=1;
+
+<a name="line68"> 68: </a>  PetscBLASIntCast(n,&n_);
+<a name="line69"> 69: </a>  *norm = BLASnrm2_(&n_,S,&one);
+<a name="line70"> 70: </a>  <font color="#4169E1">return</font>(0);
+<a name="line71"> 71: </a>}
+
+<a name="line75"> 75: </a><strong><font color="#4169E1"><a name="PEPSetUp_TOAR"></a>PetscErrorCode PEPSetUp_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line76"> 76: </a>{
+<a name="line78"> 78: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line79"> 79: </a>  PetscBool      sinv,flg,lindep;
+<a name="line80"> 80: </a>  PetscInt       i,lds,deg=pep->nmat-1,j;
+<a name="line81"> 81: </a>  PetscReal      norm;
+
+<a name="line84"> 84: </a>  pep->lineariz = PETSC_TRUE;
+<a name="line85"> 85: </a>  PEPSetDimensions_Default(pep,pep->nev,&pep->ncv,&pep->mpd);
+<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (!ctx->lock && pep->mpd<pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Should not use mpd parameter in non-locking variant"</font>);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (!pep->max_it) pep->max_it = PetscMax(100,2*(pep->nmat-1)*pep->n/pep->ncv);
+<a name="line88"> 88: </a>  <font color="#4169E1">if</font> (!pep->which) {
+<a name="line89"> 89: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line90"> 90: </a>    <font color="#4169E1">if</font> (sinv) pep->which = PEP_TARGET_MAGNITUDE;
+<a name="line91"> 91: </a>    <font color="#4169E1">else</font> pep->which = PEP_LARGEST_MAGNITUDE;
+<a name="line92"> 92: </a>  }
+<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (pep->problem_type!=PEP_GENERAL) {
+<a name="line94"> 94: </a>    PetscInfo(pep,<font color="#666666">"Problem type ignored, performing a non-symmetric linearization\n"</font>);
+<a name="line95"> 95: </a>  }
+
+<a name="line97"> 97: </a>  <font color="#4169E1">if</font> (!ctx->keep) ctx->keep = 0.5;
+
+<a name="line99"> 99: </a>  <a href="../../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,pep->nmat-1);
+<a name="line100">100: </a>  <a href="../../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,3);
+<a name="line101">101: </a>  <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(pep->ds,DSNHEP);
+<a name="line102">102: </a>  <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(pep->ds,PETSC_TRUE);
+<a name="line103">103: </a>  <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(pep->ds,pep->ncv+1);
+
+<a name="line105">105: </a>  PEPBasisCoefficients(pep,pep->pbc);
+<a name="line106">106: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line107">107: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line108">108: </a>    PetscMalloc1(pep->nmat,&pep->solvematcoeffs);
+<a name="line109">109: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line110">110: </a>    <font color="#4169E1">if</font> (sinv) {
+<a name="line111">111: </a>      PEPEvaluateBasis(pep,pep->target,0,pep->solvematcoeffs,NULL);
 <a name="line112">112: </a>    } <font color="#4169E1">else</font> {
-<a name="line113">113: </a>      <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,ctx->nq,pep->IS[i]);
-<a name="line114">114: </a>    }
-<a name="line115">115: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,ctx->nq,ctx->S+i*ctx->ld,&norm,&lindep);
-<a name="line116">116: </a>    <font color="#4169E1">if</font> (!lindep) {
-<a name="line117">117: </a>      <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,ctx->nq,1.0/norm);
-<a name="line118">118: </a>      ctx->S[ctx->nq+i*ctx->ld] = norm;
-<a name="line119">119: </a>      ctx->nq++;
-<a name="line120">120: </a>    }
-<a name="line121">121: </a>  }
-<a name="line122">122: </a>  <font color="#4169E1">if</font> (ctx->nq==0) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>: Problem with initial vector"</font>);
-<a name="line123">123: </a>  PEPTOARSNorm2(lds,ctx->S,&norm);
-<a name="line124">124: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
-<a name="line125">125: </a>    <font color="#4169E1">for</font> (i=0;i<=j;i++) ctx->S[i+j*ctx->ld] /= norm;
-<a name="line126">126: </a>  }
-<a name="line127">127: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
-<a name="line128">128: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
-<a name="line129">129: </a>  }
-<a name="line130">130: </a>  <font color="#4169E1">return</font>(0);
-<a name="line131">131: </a>}
-
-<a name="line135">135: </a><font color="#B22222">/*</font>
-<a name="line136">136: </a><font color="#B22222"> Computes GS orthogonalization   [z;x] - [Sp;Sq]*y,</font>
-<a name="line137">137: </a><font color="#B22222"> where y = ([Sp;Sq]'*[z;x]).</font>
-<a name="line138">138: </a><font color="#B22222">   k: Column from S to be orthogonalized against previous columns.</font>
-<a name="line139">139: </a><font color="#B22222">   Sq = Sp+ld</font>
-<a name="line140">140: </a><font color="#B22222">*/</font>
-<a name="line141">141: </a><strong><font color="#4169E1"><a name="PEPTOAROrth2"></a>static PetscErrorCode PEPTOAROrth2(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work,PetscInt nw)</font></strong>
-<a name="line142">142: </a>{
-<a name="line144">144: </a>  PetscBLASInt   n_,lds_,k_,one=1;
-<a name="line145">145: </a>  PetscScalar    sonem=-1.0,sone=1.0,szero=0.0,*x0,*x,*c;
-<a name="line146">146: </a>  PetscInt       lwa,nwu=0,i,lds=deg*ld,n;
-<a name="line147">147: </a>  PetscReal      eta,onorm;
-<a name="line148">148: </a>  
-<a name="line150">150: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(pep->V,NULL,NULL,&eta,NULL);
-<a name="line151">151: </a>  n = k+deg-1;
-<a name="line152">152: </a>  PetscBLASIntCast(n,&n_);
-<a name="line153">153: </a>  PetscBLASIntCast(deg*ld,&lds_);
-<a name="line154">154: </a>  PetscBLASIntCast(k,&k_); <font color="#B22222">/* number of vectors to orthogonalize against them */</font>
-<a name="line155">155: </a>  lwa = k;
-<a name="line156">156: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,6);
-<a name="line157">157: </a>  c = work+nwu;
-<a name="line158">158: </a>  nwu += k;
-<a name="line159">159: </a>  x0 = S+k*lds;
-<a name="line160">160: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S,&lds_,x0,&one,&szero,y,&one));
-<a name="line161">161: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line162">162: </a>    x = S+i*ld+k*lds;
-<a name="line163">163: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,y,&one));
-<a name="line164">164: </a>  }
-<a name="line165">165: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line166">166: </a>    x= S+i*ld+k*lds;
-<a name="line167">167: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+i*ld,&lds_,y,&one,&sone,x,&one));
-<a name="line168">168: </a>  }
-<a name="line169">169: </a>  PEPTOARSNorm2(lds,S+k*lds,&onorm);
-<a name="line170">170: </a>  <font color="#B22222">/* twice */</font>
-<a name="line171">171: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S,&lds_,x0,&one,&szero,c,&one));
-<a name="line172">172: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line173">173: </a>    x = S+i*ld+k*lds;
-<a name="line174">174: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,c,&one));
-<a name="line175">175: </a>  }
-<a name="line176">176: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line177">177: </a>    x= S+i*ld+k*lds;
-<a name="line178">178: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+i*ld,&lds_,c,&one,&sone,x,&one));
-<a name="line179">179: </a>  }
-<a name="line180">180: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] += c[i];
-<a name="line181">181: </a>  <font color="#4169E1">if</font> (norm) {
-<a name="line182">182: </a>    PEPTOARSNorm2(lds,S+k*lds,norm);
-<a name="line183">183: </a>  }
-<a name="line184">184: </a>  <font color="#4169E1">if</font> (lindep) {
-<a name="line185">185: </a>    *lindep = (*norm < eta * onorm)?PETSC_TRUE:PETSC_FALSE;
-<a name="line186">186: </a>  }
-<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
-<a name="line188">188: </a>}
-
-<a name="line192">192: </a><font color="#B22222">/*</font>
-<a name="line193">193: </a><font color="#B22222">  Extend the TOAR basis by applying the the matrix operator</font>
-<a name="line194">194: </a><font color="#B22222">  over a vector which is decomposed in the TOAR way</font>
-<a name="line195">195: </a><font color="#B22222">  Input:</font>
-<a name="line196">196: </a><font color="#B22222">    - pbc: array containing the polynomial basis coefficients</font>
-<a name="line197">197: </a><font color="#B22222">    - S,V: define the latest Arnoldi vector (nv vectors in V)</font>
-<a name="line198">198: </a><font color="#B22222">  Output:</font>
-<a name="line199">199: </a><font color="#B22222">    - t: new vector extending the TOAR basis</font>
-<a name="line200">200: </a><font color="#B22222">    - r: temporary coefficients to compute the TOAR coefficients</font>
-<a name="line201">201: </a><font color="#B22222">         for the new Arnoldi vector</font>
-<a name="line202">202: </a><font color="#B22222">  Workspace: t_ (two vectors)</font>
-<a name="line203">203: </a><font color="#B22222">*/</font>
-<a name="line204">204: </a><strong><font color="#4169E1"><a name="PEPTOARExtendBasis"></a>static PetscErrorCode PEPTOARExtendBasis(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_,PetscInt nwv)</font></strong>
-<a name="line205">205: </a>{
-<a name="line207">207: </a>  PetscInt       nmat=pep->nmat,deg=nmat-1,k,j,off=0,lss;
-<a name="line208">208: </a>  Vec            v=t_[0],ve=t_[1],q=t_[2];
-<a name="line209">209: </a>  PetscScalar    alpha=1.0,*ss,a;
-<a name="line210">210: </a>  PetscReal      *ca=pep->pbc,*cb=pep->pbc+nmat,*cg=pep->pbc+2*nmat;
-<a name="line211">211: </a>  PetscBool      flg;
-
-<a name="line214">214: </a>  <font color="#4169E1">if</font> (!t_||nwv<3) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,12);
-<a name="line215">215: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,nv);
-<a name="line216">216: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line217">217: </a>  <font color="#4169E1">if</font> (sinvert) {
-<a name="line218">218: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) {
-<a name="line219">219: </a>      <font color="#4169E1">if</font> (deg>1) r[lr+j] = S[j]/ca[0];
-<a name="line220">220: </a>      <font color="#4169E1">if</font> (deg>2) r[2*lr+j] = (S[ls+j]+(sigma-cb[1])*r[lr+j])/ca[1];
-<a name="line221">221: </a>    }
-<a name="line222">222: </a>    <font color="#4169E1">for</font> (k=2;k<deg-1;k++) {
-<a name="line223">223: </a>      <font color="#4169E1">for</font> (j=0;j<nv;j++) r[(k+1)*lr+j] = (S[k*ls+j]+(sigma-cb[k])*r[k*lr+j]-cg[k]*r[(k-1)*lr+j])/ca[k];
-<a name="line224">224: </a>    }
-<a name="line225">225: </a>    k = deg-1;
-<a name="line226">226: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) r[j] = (S[k*ls+j]+(sigma-cb[k])*r[k*lr+j]-cg[k]*r[(k-1)*lr+j])/ca[k];
-<a name="line227">227: </a>    ss = r; lss = lr; off = 1; alpha = -1.0; a = pep->sfactor;
-<a name="line228">228: </a>  } <font color="#4169E1">else</font> {
-<a name="line229">229: </a>    ss = S; lss = ls; off = 0; alpha = -ca[deg-1]; a = 1.0;
-<a name="line230">230: </a>  }
-<a name="line231">231: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,v,ss+off*lss);
-<a name="line232">232: </a>  <font color="#4169E1">if</font> (pep->Dr) { <font color="#B22222">/* balancing */</font>
-<a name="line233">233: </a>    VecPointwiseMult(v,v,pep->Dr);
-<a name="line234">234: </a>  }
-<a name="line235">235: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,off,v,q);
-<a name="line236">236: </a>  VecScale(q,a);
-<a name="line237">237: </a>  <font color="#4169E1">for</font> (j=1+off;j<deg+off-1;j++) {
-<a name="line238">238: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,v,ss+j*lss);
-<a name="line239">239: </a>    <font color="#4169E1">if</font> (pep->Dr) {
-<a name="line240">240: </a>      VecPointwiseMult(v,v,pep->Dr);
-<a name="line241">241: </a>    }
-<a name="line242">242: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,j,v,t);
-<a name="line243">243: </a>    a *= pep->sfactor;
-<a name="line244">244: </a>    VecAXPY(q,a,t);
-<a name="line245">245: </a>  }
-<a name="line246">246: </a>  <font color="#4169E1">if</font> (sinvert) {
-<a name="line247">247: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,v,ss);
+<a name="line113">113: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) pep->solvematcoeffs[i] = 0.0;
+<a name="line114">114: </a>      pep->solvematcoeffs[pep->nmat-1] = 1.0;
+<a name="line115">115: </a>    }
+<a name="line116">116: </a>  }
+<a name="line117">117: </a>  ctx->ld = pep->ncv+(pep->nmat-1);   <font color="#B22222">/* number of rows of each fragment of S */</font>
+<a name="line118">118: </a>  lds = (pep->nmat-1)*ctx->ld;
+<a name="line119">119: </a>  PetscCalloc1(lds*ctx->ld,&ctx->S);
+
+<a name="line121">121: </a>  <font color="#B22222">/* process starting vector */</font>
+<a name="line122">122: </a>  ctx->nq = 0;
+<a name="line123">123: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line124">124: </a>    <font color="#4169E1">if</font> (pep->nini>-deg) {
+<a name="line125">125: </a>      <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(pep->V,ctx->nq);
+<a name="line126">126: </a>    } <font color="#4169E1">else</font> {
+<a name="line127">127: </a>      <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,ctx->nq,pep->IS[i]);
+<a name="line128">128: </a>    }
+<a name="line129">129: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,ctx->nq,ctx->S+i*ctx->ld,&norm,&lindep);
+<a name="line130">130: </a>    <font color="#4169E1">if</font> (!lindep) {
+<a name="line131">131: </a>      <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,ctx->nq,1.0/norm);
+<a name="line132">132: </a>      ctx->S[ctx->nq+i*ctx->ld] = norm;
+<a name="line133">133: </a>      ctx->nq++;
+<a name="line134">134: </a>    }
+<a name="line135">135: </a>  }
+<a name="line136">136: </a>  <font color="#4169E1">if</font> (ctx->nq==0) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>: Problem with initial vector"</font>);
+<a name="line137">137: </a>  PEPTOARSNorm2(lds,ctx->S,&norm);
+<a name="line138">138: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
+<a name="line139">139: </a>    <font color="#4169E1">for</font> (i=0;i<=j;i++) ctx->S[i+j*ctx->ld] /= norm;
+<a name="line140">140: </a>  }
+<a name="line141">141: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
+<a name="line142">142: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
+<a name="line143">143: </a>  }
+<a name="line144">144: </a>  <font color="#4169E1">return</font>(0);
+<a name="line145">145: </a>}
+
+<a name="line149">149: </a><font color="#B22222">/*</font>
+<a name="line150">150: </a><font color="#B22222"> Computes GS orthogonalization   [z;x] - [Sp;Sq]*y,</font>
+<a name="line151">151: </a><font color="#B22222"> where y = ([Sp;Sq]'*[z;x]).</font>
+<a name="line152">152: </a><font color="#B22222">   k: Column from S to be orthogonalized against previous columns.</font>
+<a name="line153">153: </a><font color="#B22222">   Sq = Sp+ld</font>
+<a name="line154">154: </a><font color="#B22222">   dim(work)>=k</font>
+<a name="line155">155: </a><font color="#B22222">*/</font>
+<a name="line156">156: </a><strong><font color="#4169E1"><a name="PEPTOAROrth2"></a>static PetscErrorCode PEPTOAROrth2(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt k,PetscScalar *y,PetscReal *norm,PetscBool *lindep,PetscScalar *work)</font></strong>
+<a name="line157">157: </a>{
+<a name="line159">159: </a>  PetscBLASInt   n_,lds_,k_,one=1;
+<a name="line160">160: </a>  PetscScalar    sonem=-1.0,sone=1.0,szero=0.0,*x0,*x,*c;
+<a name="line161">161: </a>  PetscInt       i,lds=deg*ld,n;
+<a name="line162">162: </a>  PetscReal      eta,onorm;
+
+<a name="line165">165: </a>  <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(pep->V,NULL,NULL,&eta,NULL);
+<a name="line166">166: </a>  n = k+deg-1;
+<a name="line167">167: </a>  PetscBLASIntCast(n,&n_);
+<a name="line168">168: </a>  PetscBLASIntCast(deg*ld,&lds_);
+<a name="line169">169: </a>  PetscBLASIntCast(k,&k_); <font color="#B22222">/* number of vectors to orthogonalize against them */</font>
+<a name="line170">170: </a>  c = work;
+<a name="line171">171: </a>  x0 = S+k*lds;
+<a name="line172">172: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S,&lds_,x0,&one,&szero,y,&one));
+<a name="line173">173: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line174">174: </a>    x = S+i*ld+k*lds;
+<a name="line175">175: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,y,&one));
+<a name="line176">176: </a>  }
+<a name="line177">177: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line178">178: </a>    x= S+i*ld+k*lds;
+<a name="line179">179: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+i*ld,&lds_,y,&one,&sone,x,&one));
+<a name="line180">180: </a>  }
+<a name="line181">181: </a>  PEPTOARSNorm2(lds,S+k*lds,&onorm);
+<a name="line182">182: </a>  <font color="#B22222">/* twice */</font>
+<a name="line183">183: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S,&lds_,x0,&one,&szero,c,&one));
+<a name="line184">184: </a>  <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line185">185: </a>    x = S+i*ld+k*lds;
+<a name="line186">186: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n_,&k_,&sone,S+i*ld,&lds_,x,&one,&sone,c,&one));
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line189">189: </a>    x= S+i*ld+k*lds;
+<a name="line190">190: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&k_,&sonem,S+i*ld,&lds_,c,&one,&sone,x,&one));
+<a name="line191">191: </a>  }
+<a name="line192">192: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) y[i] += c[i];
+<a name="line193">193: </a>  <font color="#4169E1">if</font> (norm) {
+<a name="line194">194: </a>    PEPTOARSNorm2(lds,S+k*lds,norm);
+<a name="line195">195: </a>    <font color="#4169E1">if</font> (lindep) *lindep = (*norm < eta * onorm)?PETSC_TRUE:PETSC_FALSE;
+<a name="line196">196: </a>  }
+<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
+<a name="line198">198: </a>}
+
+<a name="line202">202: </a><font color="#B22222">/*</font>
+<a name="line203">203: </a><font color="#B22222">  Extend the TOAR basis by applying the the matrix operator</font>
+<a name="line204">204: </a><font color="#B22222">  over a vector which is decomposed in the TOAR way</font>
+<a name="line205">205: </a><font color="#B22222">  Input:</font>
+<a name="line206">206: </a><font color="#B22222">    - pbc: array containing the polynomial basis coefficients</font>
+<a name="line207">207: </a><font color="#B22222">    - S,V: define the latest Arnoldi vector (nv vectors in V)</font>
+<a name="line208">208: </a><font color="#B22222">  Output:</font>
+<a name="line209">209: </a><font color="#B22222">    - t: new vector extending the TOAR basis</font>
+<a name="line210">210: </a><font color="#B22222">    - r: temporary coefficients to compute the TOAR coefficients</font>
+<a name="line211">211: </a><font color="#B22222">         for the new Arnoldi vector</font>
+<a name="line212">212: </a><font color="#B22222">  Workspace: t_ (two vectors)</font>
+<a name="line213">213: </a><font color="#B22222">*/</font>
+<a name="line214">214: </a><strong><font color="#4169E1"><a name="PEPTOARExtendBasis"></a>static PetscErrorCode PEPTOARExtendBasis(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool sinvert,PetscScalar sigma,PetscScalar *S,PetscInt ls,PetscInt nv,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Vec t,PetscScalar *r,PetscInt lr,Vec *t_)</font></strong>
+<a name="line215">215: </a>{
+<a name="line217">217: </a>  PetscInt       nmat=pep->nmat,deg=nmat-1,k,j,off=0,lss;
+<a name="line218">218: </a>  Vec            v=t_[0],ve=t_[1],q=t_[2];
+<a name="line219">219: </a>  PetscScalar    alpha=1.0,*ss,a;
+<a name="line220">220: </a>  PetscReal      *ca=pep->pbc,*cb=pep->pbc+nmat,*cg=pep->pbc+2*nmat;
+<a name="line221">221: </a>  PetscBool      flg;
+
+<a name="line224">224: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,nv);
+<a name="line225">225: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line226">226: </a>  <font color="#4169E1">if</font> (sinvert) {
+<a name="line227">227: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) {
+<a name="line228">228: </a>      <font color="#4169E1">if</font> (deg>1) r[lr+j] = S[j]/ca[0];
+<a name="line229">229: </a>      <font color="#4169E1">if</font> (deg>2) r[2*lr+j] = (S[ls+j]+(sigma-cb[1])*r[lr+j])/ca[1];
+<a name="line230">230: </a>    }
+<a name="line231">231: </a>    <font color="#4169E1">for</font> (k=2;k<deg-1;k++) {
+<a name="line232">232: </a>      <font color="#4169E1">for</font> (j=0;j<nv;j++) r[(k+1)*lr+j] = (S[k*ls+j]+(sigma-cb[k])*r[k*lr+j]-cg[k]*r[(k-1)*lr+j])/ca[k];
+<a name="line233">233: </a>    }
+<a name="line234">234: </a>    k = deg-1;
+<a name="line235">235: </a>    <font color="#4169E1">for</font> (j=0;j<nv;j++) r[j] = (S[k*ls+j]+(sigma-cb[k])*r[k*lr+j]-cg[k]*r[(k-1)*lr+j])/ca[k];
+<a name="line236">236: </a>    ss = r; lss = lr; off = 1; alpha = -1.0; a = pep->sfactor;
+<a name="line237">237: </a>  } <font color="#4169E1">else</font> {
+<a name="line238">238: </a>    ss = S; lss = ls; off = 0; alpha = -ca[deg-1]; a = 1.0;
+<a name="line239">239: </a>  }
+<a name="line240">240: </a>  <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,v,ss+off*lss);
+<a name="line241">241: </a>  <font color="#4169E1">if</font> (pep->Dr) { <font color="#B22222">/* balancing */</font>
+<a name="line242">242: </a>    VecPointwiseMult(v,v,pep->Dr);
+<a name="line243">243: </a>  }
+<a name="line244">244: </a>  <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,off,v,q);
+<a name="line245">245: </a>  VecScale(q,a);
+<a name="line246">246: </a>  <font color="#4169E1">for</font> (j=1+off;j<deg+off-1;j++) {
+<a name="line247">247: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,v,ss+j*lss);
 <a name="line248">248: </a>    <font color="#4169E1">if</font> (pep->Dr) {
 <a name="line249">249: </a>      VecPointwiseMult(v,v,pep->Dr);
 <a name="line250">250: </a>    }
-<a name="line251">251: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,deg,v,t);
+<a name="line251">251: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,j,v,t);
 <a name="line252">252: </a>    a *= pep->sfactor;
 <a name="line253">253: </a>    VecAXPY(q,a,t);
-<a name="line254">254: </a>  } <font color="#4169E1">else</font> {
-<a name="line255">255: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,ve,ss+(deg-1)*lss);
-<a name="line256">256: </a>    <font color="#4169E1">if</font> (pep->Dr) {
-<a name="line257">257: </a>      VecPointwiseMult(ve,ve,pep->Dr);
-<a name="line258">258: </a>    }
-<a name="line259">259: </a>    a *= pep->sfactor;
-<a name="line260">260: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,deg-1,ve,t);
-<a name="line261">261: </a>    VecAXPY(q,a,t);    
-<a name="line262">262: </a>    a *= pep->sfactor;
-<a name="line263">263: </a>  }
-<a name="line264">264: </a>  <font color="#4169E1">if</font> (flg || !sinvert) alpha /= a;
-<a name="line265">265: </a>  <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(pep->st,q,t);
-<a name="line266">266: </a>  VecScale(t,alpha);
-<a name="line267">267: </a>  <font color="#4169E1">if</font> (!sinvert) {
-<a name="line268">268: </a>    <font color="#4169E1">if</font> (cg[deg-1]!=0) {VecAXPY(t,cg[deg-1],v);}    
-<a name="line269">269: </a>    <font color="#4169E1">if</font> (cb[deg-1]!=0) {VecAXPY(t,cb[deg-1],ve);}    
-<a name="line270">270: </a>  }
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (pep->Dr) {
-<a name="line272">272: </a>    VecPointwiseDivide(t,t,pep->Dr);
-<a name="line273">273: </a>  }
-<a name="line274">274: </a>  <font color="#4169E1">return</font>(0);
-<a name="line275">275: </a>}
-
-<a name="line279">279: </a><font color="#B22222">/*</font>
-<a name="line280">280: </a><font color="#B22222">  Compute TOAR coefficients of the blocks of the new Arnoldi vector computed</font>
-<a name="line281">281: </a><font color="#B22222">*/</font>
-<a name="line282">282: </a><strong><font color="#4169E1"><a name="PEPTOARCoefficients"></a>static PetscErrorCode PEPTOARCoefficients(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool sinvert,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x)</font></strong>
-<a name="line283">283: </a>{
-<a name="line284">284: </a>  PetscInt    k,j,nmat=pep->nmat,d=nmat-1;
-<a name="line285">285: </a>  PetscReal   *ca=pep->pbc,*cb=pep->pbc+nmat,*cg=pep->pbc+2*nmat;
-<a name="line286">286: </a>  PetscScalar t=1.0,tp=0.0,tt;
-
-<a name="line289">289: </a>  <font color="#4169E1">if</font> (sinvert) {
-<a name="line290">290: </a>    <font color="#4169E1">for</font> (k=1;k<d;k++) {
-<a name="line291">291: </a>      tt = t;
-<a name="line292">292: </a>      t = ((sigma-cb[k-1])*t-cg[k-1]*tp)/ca[k-1]; <font color="#B22222">/* k-th basis polynomial */</font>
-<a name="line293">293: </a>      tp = tt;
-<a name="line294">294: </a>      <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[k*lr+j] += t*x[j];
-<a name="line295">295: </a>    }
-<a name="line296">296: </a>  } <font color="#4169E1">else</font> {
-<a name="line297">297: </a>    <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[j] = (cb[0]-sigma)*S[j]+ca[0]*S[ls+j];
-<a name="line298">298: </a>    <font color="#4169E1">for</font> (k=1;k<d-1;k++) {
-<a name="line299">299: </a>      <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[k*lr+j] = (cb[k]-sigma)*S[k*ls+j]+ca[k]*S[(k+1)*ls+j]+cg[k]*S[(k-1)*ls+j];
-<a name="line300">300: </a>    }
-<a name="line301">301: </a>    <font color="#4169E1">if</font> (sigma!=0.0) <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[(d-1)*lr+j] -= sigma*S[(d-1)*ls+j];
-<a name="line302">302: </a>  }
-<a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
-<a name="line304">304: </a>}
-
-<a name="line308">308: </a><font color="#B22222">/*</font>
-<a name="line309">309: </a><font color="#B22222">  Compute a run of Arnoldi iterations</font>
-<a name="line310">310: </a><font color="#B22222">*/</font>
-<a name="line311">311: </a><strong><font color="#4169E1"><a name="PEPTOARrun"></a>static PetscErrorCode PEPTOARrun(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,PetscInt nw,Vec *t_,PetscInt nwv)</font></strong>
-<a name="line312">312: </a>{
-<a name="line314">314: </a>  PetscInt       i,j,p,m=*M,nwu=0,lwa,deg=pep->nmat-1;
-<a name="line315">315: </a>  PetscInt       lds=ld*deg,nqt=*nq;
-<a name="line316">316: </a>  Vec            t;
-<a name="line317">317: </a>  PetscReal      norm;
-<a name="line318">318: </a>  PetscBool      flg,sinvert=PETSC_FALSE,lindep;
-<a name="line319">319: </a>  PetscScalar    *x;
-
-<a name="line322">322: </a>  <font color="#4169E1">if</font> (!t_||nwv<3) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,12);
-<a name="line323">323: </a>  lwa = ld;
-<a name="line324">324: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,10);
-<a name="line325">325: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line326">326: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line327">327: </a>    <font color="#B22222">/* spectral transformation handled by the solver */</font>
-<a name="line328">328: </a>    PetscObjectTypeCompareAny((PetscObject)pep->st,&flg,STSINVERT,STSHIFT,<font color="#666666">""</font>);
-<a name="line329">329: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"STtype not supported fr TOAR without transforming matrices"</font>);
-<a name="line330">330: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinvert);
-<a name="line331">331: </a>  }
-<a name="line332">332: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
-<a name="line333">333: </a>    <font color="#B22222">/* apply operator */</font>
-<a name="line334">334: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,nqt,&t);
-<a name="line335">335: </a>    PEPTOARExtendBasis(pep,sinvert,sigma,S+j*lds,ld,nqt,pep->V,t,S+(j+1)*lds,ld,t_,3);
-<a name="line336">336: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,nqt,&t);
-
-<a name="line338">338: </a>    <font color="#B22222">/* orthogonalize */</font>
-<a name="line339">339: </a>    <font color="#4169E1">if</font> (sinvert) x = S+(j+1)*lds;
-<a name="line340">340: </a>    <font color="#4169E1">else</font> x = S+(deg-1)*ld+(j+1)*lds;
-<a name="line341">341: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,nqt,x,&norm,&lindep);
-<a name="line342">342: </a>    <font color="#4169E1">if</font> (!lindep) {
-<a name="line343">343: </a>      x[nqt] = norm;
-<a name="line344">344: </a>      <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,nqt,1.0/norm);
-<a name="line345">345: </a>      nqt++;
-<a name="line346">346: </a>    }
-
-<a name="line348">348: </a>    PEPTOARCoefficients(pep,sinvert,sigma,nqt-1,S+j*lds,ld,S+(j+1)*lds,ld,x);
-<a name="line349">349: </a>    <font color="#B22222">/* level-2 orthogonalization */</font>
-<a name="line350">350: </a>    PEPTOAROrth2(pep,S,ld,deg,j+1,H+j*ldh,&norm,breakdown,work+nwu,lwa-nwu);
-<a name="line351">351: </a>    <font color="#4169E1">if</font> (!*breakdown) {
-<a name="line352">352: </a>      <font color="#4169E1">for</font> (p=0;p<deg;p++) {
-<a name="line353">353: </a>        <font color="#4169E1">for</font> (i=0;i<=j+deg;i++) {
-<a name="line354">354: </a>          S[i+p*ld+(j+1)*lds] /= norm;
-<a name="line355">355: </a>        }
-<a name="line356">356: </a>      }
-<a name="line357">357: </a>      H[j+1+ldh*j] = norm;
-<a name="line358">358: </a>    } <font color="#4169E1">else</font> {
-<a name="line359">359: </a>      H[j+1+ldh*j] = norm;
+<a name="line254">254: </a>  }
+<a name="line255">255: </a>  <font color="#4169E1">if</font> (sinvert) {
+<a name="line256">256: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,v,ss);
+<a name="line257">257: </a>    <font color="#4169E1">if</font> (pep->Dr) {
+<a name="line258">258: </a>      VecPointwiseMult(v,v,pep->Dr);
+<a name="line259">259: </a>    }
+<a name="line260">260: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,deg,v,t);
+<a name="line261">261: </a>    a *= pep->sfactor;
+<a name="line262">262: </a>    VecAXPY(q,a,t);
+<a name="line263">263: </a>  } <font color="#4169E1">else</font> {
+<a name="line264">264: </a>    <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(V,1.0,0.0,ve,ss+(deg-1)*lss);
+<a name="line265">265: </a>    <font color="#4169E1">if</font> (pep->Dr) {
+<a name="line266">266: </a>      VecPointwiseMult(ve,ve,pep->Dr);
+<a name="line267">267: </a>    }
+<a name="line268">268: </a>    a *= pep->sfactor;
+<a name="line269">269: </a>    <a href="../../../../../docs/manualpages/ST/STMatMult.html#STMatMult">STMatMult</a>(pep->st,deg-1,ve,t);
+<a name="line270">270: </a>    VecAXPY(q,a,t);
+<a name="line271">271: </a>    a *= pep->sfactor;
+<a name="line272">272: </a>  }
+<a name="line273">273: </a>  <font color="#4169E1">if</font> (flg || !sinvert) alpha /= a;
+<a name="line274">274: </a>  <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>(pep->st,q,t);
+<a name="line275">275: </a>  VecScale(t,alpha);
+<a name="line276">276: </a>  <font color="#4169E1">if</font> (!sinvert) {
+<a name="line277">277: </a>    <font color="#4169E1">if</font> (cg[deg-1]!=0) { VecAXPY(t,cg[deg-1],v); }
+<a name="line278">278: </a>    <font color="#4169E1">if</font> (cb[deg-1]!=0) { VecAXPY(t,cb[deg-1],ve); }
+<a name="line279">279: </a>  }
+<a name="line280">280: </a>  <font color="#4169E1">if</font> (pep->Dr) {
+<a name="line281">281: </a>    VecPointwiseDivide(t,t,pep->Dr);
+<a name="line282">282: </a>  }
+<a name="line283">283: </a>  <font color="#4169E1">return</font>(0);
+<a name="line284">284: </a>}
+
+<a name="line288">288: </a><font color="#B22222">/*</font>
+<a name="line289">289: </a><font color="#B22222">  Compute TOAR coefficients of the blocks of the new Arnoldi vector computed</font>
+<a name="line290">290: </a><font color="#B22222">*/</font>
+<a name="line291">291: </a><strong><font color="#4169E1"><a name="PEPTOARCoefficients"></a>static PetscErrorCode PEPTOARCoefficients(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool sinvert,PetscScalar sigma,PetscInt nv,PetscScalar *S,PetscInt ls,PetscScalar *r,PetscInt lr,PetscScalar *x)</font></strong>
+<a name="line292">292: </a>{
+<a name="line293">293: </a>  PetscInt    k,j,nmat=pep->nmat,d=nmat-1;
+<a name="line294">294: </a>  PetscReal   *ca=pep->pbc,*cb=pep->pbc+nmat,*cg=pep->pbc+2*nmat;
+<a name="line295">295: </a>  PetscScalar t=1.0,tp=0.0,tt;
+
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (sinvert) {
+<a name="line299">299: </a>    <font color="#4169E1">for</font> (k=1;k<d;k++) {
+<a name="line300">300: </a>      tt = t;
+<a name="line301">301: </a>      t = ((sigma-cb[k-1])*t-cg[k-1]*tp)/ca[k-1]; <font color="#B22222">/* k-th basis polynomial */</font>
+<a name="line302">302: </a>      tp = tt;
+<a name="line303">303: </a>      <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[k*lr+j] += t*x[j];
+<a name="line304">304: </a>    }
+<a name="line305">305: </a>  } <font color="#4169E1">else</font> {
+<a name="line306">306: </a>    <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[j] = (cb[0]-sigma)*S[j]+ca[0]*S[ls+j];
+<a name="line307">307: </a>    <font color="#4169E1">for</font> (k=1;k<d-1;k++) {
+<a name="line308">308: </a>      <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[k*lr+j] = (cb[k]-sigma)*S[k*ls+j]+ca[k]*S[(k+1)*ls+j]+cg[k]*S[(k-1)*ls+j];
+<a name="line309">309: </a>    }
+<a name="line310">310: </a>    <font color="#4169E1">if</font> (sigma!=0.0) <font color="#4169E1">for</font> (j=0;j<=nv;j++) r[(d-1)*lr+j] -= sigma*S[(d-1)*ls+j];
+<a name="line311">311: </a>  }
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
+
+<a name="line317">317: </a><font color="#B22222">/*</font>
+<a name="line318">318: </a><font color="#B22222">  Compute a run of Arnoldi iterations dim(work)=ld</font>
+<a name="line319">319: </a><font color="#B22222">*/</font>
+<a name="line320">320: </a><strong><font color="#4169E1"><a name="PEPTOARrun"></a>static PetscErrorCode PEPTOARrun(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscInt *nq,PetscScalar *S,PetscInt ld,PetscScalar *H,PetscInt ldh,PetscInt k,PetscInt *M,PetscBool *breakdown,PetscScalar *work,Vec *t_)</font></strong>
+<a name="line321">321: </a>{
+<a name="line323">323: </a>  PetscInt       i,j,p,m=*M,nwu=0,deg=pep->nmat-1;
+<a name="line324">324: </a>  PetscInt       lds=ld*deg,nqt=*nq;
+<a name="line325">325: </a>  Vec            t;
+<a name="line326">326: </a>  PetscReal      norm;
+<a name="line327">327: </a>  PetscBool      flg,sinvert=PETSC_FALSE,lindep;
+<a name="line328">328: </a>  PetscScalar    *x;
+
+<a name="line331">331: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line332">332: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line333">333: </a>    <font color="#B22222">/* spectral transformation handled by the solver */</font>
+<a name="line334">334: </a>    PetscObjectTypeCompareAny((PetscObject)pep->st,&flg,STSINVERT,STSHIFT,<font color="#666666">""</font>);
+<a name="line335">335: </a>    <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"STtype not supported fr TOAR without transforming matrices"</font>);
+<a name="line336">336: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinvert);
+<a name="line337">337: </a>  }
+<a name="line338">338: </a>  <font color="#4169E1">for</font> (j=k;j<m;j++) {
+<a name="line339">339: </a>    <font color="#B22222">/* apply operator */</font>
+<a name="line340">340: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,nqt,&t);
+<a name="line341">341: </a>    PEPTOARExtendBasis(pep,sinvert,sigma,S+j*lds,ld,nqt,pep->V,t,S+(j+1)*lds,ld,t_);
+<a name="line342">342: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,nqt,&t);
+
+<a name="line344">344: </a>    <font color="#B22222">/* orthogonalize */</font>
+<a name="line345">345: </a>    <font color="#4169E1">if</font> (sinvert) x = S+(j+1)*lds;
+<a name="line346">346: </a>    <font color="#4169E1">else</font> x = S+(deg-1)*ld+(j+1)*lds;
+<a name="line347">347: </a>    <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(pep->V,nqt,x,&norm,&lindep);
+<a name="line348">348: </a>    <font color="#4169E1">if</font> (!lindep) {
+<a name="line349">349: </a>      x[nqt] = norm;
+<a name="line350">350: </a>      <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(pep->V,nqt,1.0/norm);
+<a name="line351">351: </a>      nqt++;
+<a name="line352">352: </a>    }
+
+<a name="line354">354: </a>    PEPTOARCoefficients(pep,sinvert,sigma,nqt-1,S+j*lds,ld,S+(j+1)*lds,ld,x);
+<a name="line355">355: </a>    <font color="#B22222">/* level-2 orthogonalization */</font>
+<a name="line356">356: </a>    PEPTOAROrth2(pep,S,ld,deg,j+1,H+j*ldh,&norm,breakdown,work+nwu);
+<a name="line357">357: </a>    H[j+1+ldh*j] = norm;
+<a name="line358">358: </a>    *nq = nqt;
+<a name="line359">359: </a>    <font color="#4169E1">if</font> (*breakdown) {
 <a name="line360">360: </a>      *M = j+1;
-<a name="line361">361: </a>      *nq = nqt;
-<a name="line362">362: </a>      <font color="#4169E1">return</font>(0);
-<a name="line363">363: </a>    }
-<a name="line364">364: </a>    *nq = nqt;
-<a name="line365">365: </a>  }
-<a name="line366">366: </a>  <font color="#4169E1">return</font>(0);
-<a name="line367">367: </a>}
-
-<a name="line371">371: </a><strong><font color="#4169E1"><a name="PEPTOARTrunc"></a>static PetscErrorCode PEPTOARTrunc(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nrw)</font></strong>
-<a name="line372">372: </a>{
-<a name="line374">374: </a>  PetscInt       lwa,nwu=0,lrwa,nrwu=0,nnc,nrow;
-<a name="line375">375: </a>  PetscInt       j,i,k,n,lds=deg*ld,rs1=*rs1a,rk=0,offu;
-<a name="line376">376: </a>  PetscScalar    *M,*V,*pU,*SS,*SS2,t,sone=1.0,zero=0.0,mone=-1.0,*p,*tau;
-<a name="line377">377: </a>  PetscReal      *sg,tol;
-<a name="line378">378: </a>  PetscBLASInt   cs1_,rs1_,cs1tdeg,n_,info,lw_,newc_,newctdeg,nnc_,nrow_,nnctdeg,lds_,rk_;
-<a name="line379">379: </a>  Mat            U;
-
-<a name="line382">382: </a>  <font color="#4169E1">if</font> (cs1==0) <font color="#4169E1">return</font>(0);
-<a name="line383">383: </a>  n = (rs1>deg*cs1)?deg*cs1:rs1;
-<a name="line384">384: </a>  lwa = 6*ld*lds+2*cs1;
-<a name="line385">385: </a>  lrwa = 6*n;
-<a name="line386">386: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) {
-<a name="line387">387: </a>    <font color="#4169E1">if</font> (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,6);
-<a name="line388">388: </a>    <font color="#4169E1">if</font> (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,5);
-<a name="line389">389: </a>  }
-<a name="line390">390: </a>  <font color="#4169E1">if</font> (!rwork||nrw<lrwa) {
-<a name="line391">391: </a>    <font color="#4169E1">if</font> (nrw<lrwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,8);
-<a name="line392">392: </a>    <font color="#4169E1">if</font> (!rwork) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,7);
-<a name="line393">393: </a>  }
-<a name="line394">394: </a>  nnc = cs1-lock-newc;
-<a name="line395">395: </a>  nrow = rs1-lock;
-<a name="line396">396: </a>  PetscMalloc4(deg*newc*nnc,&SS,newc*nnc,&SS2,(rs1+lock+newc)*n,&pU,deg*rs1,&tau);
-<a name="line397">397: </a>  offu = lock*(rs1+1);
-<a name="line398">398: </a>  M = work+nwu;
-<a name="line399">399: </a>  nwu += rs1*cs1*deg;
-<a name="line400">400: </a>  sg = rwork+nrwu;
-<a name="line401">401: </a>  nrwu += n;
-<a name="line402">402: </a>  PetscMemzero(pU,rs1*n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line403">403: </a>  V = work+nwu;
-<a name="line404">404: </a>  nwu += deg*cs1*n;
-<a name="line405">405: </a>  PetscBLASIntCast(n,&n_);
-<a name="line406">406: </a>  PetscBLASIntCast(nnc,&nnc_);
-<a name="line407">407: </a>  PetscBLASIntCast(cs1,&cs1_);
-<a name="line408">408: </a>  PetscBLASIntCast(rs1,&rs1_);
-<a name="line409">409: </a>  PetscBLASIntCast(newc,&newc_);
-<a name="line410">410: </a>  PetscBLASIntCast(newc*deg,&newctdeg);
-<a name="line411">411: </a>  PetscBLASIntCast(nnc*deg,&nnctdeg);
-<a name="line412">412: </a>  PetscBLASIntCast(cs1*deg,&cs1tdeg);
-<a name="line413">413: </a>  PetscBLASIntCast(lwa-nwu,&lw_);
-<a name="line414">414: </a>  PetscBLASIntCast(nrow,&nrow_);
-<a name="line415">415: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line416">416: </a>  <font color="#4169E1">if</font> (newc>0) {
-<a name="line417">417: </a>  <font color="#B22222">/* truncate columns associated with new converged eigenpairs */</font>
-<a name="line418">418: </a>    <font color="#4169E1">for</font> (j=0;j<deg;j++) {
-<a name="line419">419: </a>      <font color="#4169E1">for</font> (i=lock;i<lock+newc;i++) {
-<a name="line420">420: </a>        PetscMemcpy(M+(i-lock+j*newc)*nrow,S+i*lds+j*ld+lock,nrow*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line421">421: </a>      } 
-<a name="line422">422: </a>    }
-<a name="line423">423: </a><font color="#A020F0">#if !defined (PETSC_USE_COMPLEX)</font>
-<a name="line424">424: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,&info));
-<a name="line425">425: </a><font color="#A020F0">#else</font>
-<a name="line426">426: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
-<a name="line427">427: </a><font color="#A020F0">#endif</font>
-<a name="line428">428: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-<a name="line429">429: </a>    <font color="#B22222">/* <a href="../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> has rank min(newc,nrow) */</font>
-<a name="line430">430: </a>    rk = PetscMin(newc,nrow);
-<a name="line431">431: </a>    <font color="#4169E1">for</font> (i=0;i<rk;i++) {
-<a name="line432">432: </a>      t = sg[i];
-<a name="line433">433: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&newctdeg,&t,V+i,&n_));
-<a name="line434">434: </a>    }
-<a name="line435">435: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line436">436: </a>      <font color="#4169E1">for</font> (j=lock;j<lock+newc;j++) {
-<a name="line437">437: </a>        PetscMemcpy(S+j*lds+i*ld+lock,V+(newc*i+j-lock)*n,rk*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line438">438: </a>        PetscMemzero(S+j*lds+i*ld+lock+rk,(ld-lock-rk)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line439">439: </a>      }
-<a name="line440">440: </a>    }
-<a name="line441">441: </a>    <font color="#B22222">/*</font>
-<a name="line442">442: </a><font color="#B22222">      update columns associated with non-converged vectors, orthogonalize</font>
-<a name="line443">443: </a><font color="#B22222">       against pU so that next M has rank nnc+d-1 insted of nrow+d-1</font>
-<a name="line444">444: </a><font color="#B22222">    */</font>
-<a name="line445">445: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line446">446: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&newc_,&nnc_,&nrow_,&sone,pU+offu,&rs1_,S+(lock+newc)*lds+i*ld+lock,&lds_,&zero,SS+i*newc*nnc,&newc_));
-<a name="line447">447: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&nrow_,&nnc_,&newc_,&mone,pU+offu,&rs1_,SS+i*newc*nnc,&newc_,&sone,S+(lock+newc)*lds+i*ld+lock,&lds_));
-<a name="line448">448: </a>      <font color="#B22222">/* repeat orthogonalization step */</font>
-<a name="line449">449: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&newc_,&nnc_,&nrow_,&sone,pU+offu,&rs1_,S+(lock+newc)*lds+i*ld+lock,&lds_,&zero,SS2,&newc_));
-<a name="line450">450: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&nrow_,&nnc_,&newc_,&mone,pU+offu,&rs1_,SS2,&newc_,&sone,S+(lock+newc)*lds+i*ld+lock,&lds_));
-<a name="line451">451: </a>      <font color="#4169E1">for</font> (j=0;j<newc*nnc;j++) *(SS+i*newc*nnc+j) += SS2[j];
-<a name="line452">452: </a>    }
-<a name="line453">453: </a>  }
-<a name="line454">454: </a>  <font color="#B22222">/* truncate columns associated with non-converged eigenpairs */</font>
-<a name="line455">455: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
-<a name="line456">456: </a>    <font color="#4169E1">for</font> (i=lock+newc;i<cs1;i++) {
-<a name="line457">457: </a>      PetscMemcpy(M+(i-lock-newc+j*nnc)*nrow,S+i*lds+j*ld+lock,nrow*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line458">458: </a>    } 
-<a name="line459">459: </a>  }
-<a name="line460">460: </a><font color="#A020F0">#if !defined (PETSC_USE_COMPLEX)</font>
-<a name="line461">461: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,&info));
-<a name="line462">462: </a><font color="#A020F0">#else</font>
-<a name="line463">463: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));  
-<a name="line464">464: </a><font color="#A020F0">#endif</font>
-<a name="line465">465: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
-<a name="line466">466: </a>  tol = PetscMax(rs1,deg*cs1)*PETSC_MACHINE_EPSILON*sg[0];
-<a name="line467">467: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(n_,nnctdeg);i++) <font color="#4169E1">if</font> (sg[i]>tol) rk++;
-<a name="line468">468: </a>  rk = PetscMin(nnc+deg-1,rk);
-<a name="line469">469: </a>  <font color="#B22222">/* the <a href="../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> has rank (atmost) nnc+deg-1 */</font>
-<a name="line470">470: </a>  <font color="#4169E1">for</font> (i=0;i<rk;i++) {
-<a name="line471">471: </a>    t = sg[i];
-<a name="line472">472: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&nnctdeg,&t,V+i,&n_));
-<a name="line473">473: </a>  }
-<a name="line474">474: </a>  <font color="#B22222">/* update S */</font>
-<a name="line475">475: </a>  PetscMemzero(S+cs1*lds,(ld-cs1)*lds*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line476">476: </a>  k = ld-lock-newc-rk;
-<a name="line477">477: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line478">478: </a>    <font color="#4169E1">for</font> (j=lock+newc;j<cs1;j++) {
-<a name="line479">479: </a>      PetscMemcpy(S+j*lds+i*ld+lock+newc,V+(nnc*i+j-lock-newc)*n,rk*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line480">480: </a>      PetscMemzero(S+j*lds+i*ld+lock+newc+rk,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line481">481: </a>    }
-<a name="line482">482: </a>  }
-<a name="line483">483: </a>  <font color="#4169E1">if</font> (newc>0) {
-<a name="line484">484: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line485">485: </a>      p = SS+nnc*newc*i;
-<a name="line486">486: </a>      <font color="#4169E1">for</font> (j=lock+newc;j<cs1;j++) {
-<a name="line487">487: </a>        <font color="#4169E1">for</font> (k=0;k<newc;k++) S[j*lds+i*ld+lock+k] = *(p++);
-<a name="line488">488: </a>      }
-<a name="line489">489: </a>    }
-<a name="line490">490: </a>  }
-
-<a name="line492">492: </a>  <font color="#B22222">/* orthogonalize pU */</font>
-<a name="line493">493: </a>  rk = rk+newc;
-<a name="line494">494: </a>  PetscBLASIntCast(rk,&rk_);
-<a name="line495">495: </a>  PetscBLASIntCast(cs1-lock,&nnc_);
-<a name="line496">496: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&nrow_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
-<a name="line497">497: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line498">498: </a>    PetscStackCallBLAS(<font color="#666666">"BLAStrmm"</font>,BLAStrmm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&rk_,&nnc_,&sone,pU+offu,&rs1_,S+lock*lds+lock+i*ld,&lds_));
-<a name="line499">499: </a>  }  
-<a name="line500">500: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKorgqr"</font>,LAPACKorgqr_(&nrow_,&rk_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
-
-<a name="line502">502: </a>  <font color="#B22222">/* update vectors V(:,idx) = V*Q(:,idx) */</font>
-<a name="line503">503: </a>  rk = rk+lock;
-<a name="line504">504: </a>  <font color="#4169E1">for</font> (i=0;i<lock;i++) pU[(i+1)*rs1] = 1.0;
-<a name="line505">505: </a>  MatCreateSeqDense(PETSC_COMM_SELF,rs1,rk,pU,&U);
-<a name="line506">506: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,lock,rs1);
-<a name="line507">507: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,U,lock,rk);
-<a name="line508">508: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,rk);
-<a name="line509">509: </a>  MatDestroy(&U);  
-<a name="line510">510: </a>  *rs1a = rk;
-
-<a name="line512">512: </a>  <font color="#B22222">/* free work space */</font>
-<a name="line513">513: </a>  PetscFree4(SS,SS2,pU,tau);
-<a name="line514">514: </a>  <font color="#4169E1">return</font>(0);
-<a name="line515">515: </a>}
-
-<a name="line519">519: </a><font color="#B22222">/*</font>
-<a name="line520">520: </a><font color="#B22222">  S <- S*Q </font>
-<a name="line521">521: </a><font color="#B22222">  columns s-s+ncu of S</font>
-<a name="line522">522: </a><font color="#B22222">  rows 0-sr of S</font>
-<a name="line523">523: </a><font color="#B22222">  size(Q) qr x ncu</font>
-<a name="line524">524: </a><font color="#B22222">*/</font>
-<a name="line525">525: </a><strong><font color="#4169E1"><a name="PEPTOARSupdate"></a>static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work,PetscInt nw)</font></strong>
-<a name="line526">526: </a>{
-<a name="line528">528: </a>  PetscScalar    a=1.0,b=0.0;
-<a name="line529">529: </a>  PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
-<a name="line530">530: </a>  PetscInt       lwa,j,lds=deg*ld,i;
-
-<a name="line533">533: </a>  lwa = sr*ncu;
-<a name="line534">534: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) {
-<a name="line535">535: </a>    <font color="#4169E1">if</font> (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,10);
-<a name="line536">536: </a>    <font color="#4169E1">if</font> (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,9);
-<a name="line537">537: </a>  }
-<a name="line538">538: </a>  PetscBLASIntCast(sr,&sr_);
-<a name="line539">539: </a>  PetscBLASIntCast(qr,&qr_);
-<a name="line540">540: </a>  PetscBLASIntCast(ncu,&ncu_);
-<a name="line541">541: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line542">542: </a>  PetscBLASIntCast(ldq,&ldq_);
-<a name="line543">543: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line544">544: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S+i*ld,&lds_,Q,&ldq_,&b,work,&sr_));
-<a name="line545">545: </a>    <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
-<a name="line546">546: </a>      PetscMemcpy(S+lds*(s+j)+i*ld,work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line547">547: </a>    }
-<a name="line548">548: </a>  }
-<a name="line549">549: </a>  <font color="#4169E1">return</font>(0);
-<a name="line550">550: </a>}
-
-<a name="line554">554: </a><font color="#B22222">/*</font>
-<a name="line555">555: </a><font color="#B22222">  Computes T_j = phi_idx(T). In T_j and T_p are phi_{idx-1}(T)</font>
-<a name="line556">556: </a><font color="#B22222">   and phi_{idx-2}(T) respectively or null if idx=0,1.</font>
-<a name="line557">557: </a><font color="#B22222">   Tp and Tj are input/output arguments</font>
-<a name="line558">558: </a><font color="#B22222">*/</font>
-<a name="line559">559: </a><strong><font color="#4169E1"><a name="PEPEvaluateBasisM"></a>static PetscErrorCode PEPEvaluateBasisM(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *T,PetscInt ldt,PetscInt idx,PetscScalar **Tp,PetscScalar **Tj)</font></strong>
-<a name="line560">560: </a>{
-<a name="line562">562: </a>  PetscInt       i;
-<a name="line563">563: </a>  PetscReal      *ca,*cb,*cg;
-<a name="line564">564: </a>  PetscScalar    *pt,g,a;
-<a name="line565">565: </a>  PetscBLASInt   k_,ldt_;
-
-<a name="line568">568: </a>  <font color="#4169E1">if</font> (idx==0) {
-<a name="line569">569: </a>    PetscMemzero(*Tj,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line570">570: </a>    PetscMemzero(*Tp,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line571">571: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line572">572: </a>      (*Tj)[i+i*k] = 1.0;
-<a name="line573">573: </a>    }
-<a name="line574">574: </a>  } <font color="#4169E1">else</font> {
-<a name="line575">575: </a>    PetscBLASIntCast(ldt,&ldt_);
-<a name="line576">576: </a>    PetscBLASIntCast(k,&k_);
-<a name="line577">577: </a>    ca = pep->pbc; cb = pep->pbc+pep->nmat; cg = pep->pbc+2*pep->nmat;
-<a name="line578">578: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) T[i*ldt+i] -= cb[idx-1];
-<a name="line579">579: </a>    a = 1/ca[idx-1];
-<a name="line580">580: </a>    g = (idx==1)?0.0:-cg[idx-1]/ca[idx-1];
-<a name="line581">581: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&a,T,&ldt_,*Tj,&k_,&g,*Tp,&k_));    
-<a name="line582">582: </a>    pt = *Tj; *Tj = *Tp; *Tp = pt;
-<a name="line583">583: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) T[i*ldt+i] += cb[idx-1];
-<a name="line584">584: </a>  }
-<a name="line585">585: </a>  <font color="#4169E1">return</font>(0);
-<a name="line586">586: </a>}
-
-<a name="line590">590: </a><strong><font color="#4169E1"><a name="PEPExtractInvariantPair"></a>static PetscErrorCode PEPExtractInvariantPair(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work,PetscInt nw)</font></strong>
-<a name="line591">591: </a>{
-<a name="line593">593: </a>  PetscInt       i,j,jj,nwu=0,lwa,lds,ldt,d=pep->nmat-1,idxcpy=0;
-<a name="line594">594: </a>  PetscScalar    *At,*Bt,*Hj,*Hp,*T,sone=1.0,g,a,*pM;
-<a name="line595">595: </a>  PetscBLASInt   k_,sr_,lds_,ldh_,info,*p,lwork,ldt_;
-<a name="line596">596: </a>  PetscBool      transf=PETSC_FALSE,flg;
-<a name="line597">597: </a>  PetscReal      nrm,norm,maxnrm,*rwork;
-<a name="line598">598: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             *R,Y;
-<a name="line599">599: </a>  Mat            M,*A;
-<a name="line600">600: </a>  Vec            v;
-
-<a name="line603">603: </a>  <font color="#4169E1">if</font> (k==0) <font color="#4169E1">return</font>(0);
-<a name="line604">604: </a>  lwa = 6*sr*k;
-<a name="line605">605: </a>  <font color="#4169E1">if</font> (!work||nw<lwa) {
-<a name="line606">606: </a>    <font color="#4169E1">if</font> (nw<lwa) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,10);
-<a name="line607">607: </a>    <font color="#4169E1">if</font> (!work) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,9);
-<a name="line608">608: </a>  }
-<a name="line609">609: </a>  lds = deg*ld;
-<a name="line610">610: </a>  At = work+nwu;
-<a name="line611">611: </a>  nwu += sr*k;
-<a name="line612">612: </a>  Bt = work+nwu;
+<a name="line361">361: </a>      <font color="#4169E1">break</font>;
+<a name="line362">362: </a>    }
+<a name="line363">363: </a>    <font color="#4169E1">for</font> (p=0;p<deg;p++) {
+<a name="line364">364: </a>      <font color="#4169E1">for</font> (i=0;i<=j+deg;i++) {
+<a name="line365">365: </a>        S[i+p*ld+(j+1)*lds] /= norm;
+<a name="line366">366: </a>      }
+<a name="line367">367: </a>    }
+<a name="line368">368: </a>  }
+<a name="line369">369: </a>  <font color="#4169E1">return</font>(0);
+<a name="line370">370: </a>}
+
+<a name="line374">374: </a><font color="#B22222">/*</font>
+<a name="line375">375: </a><font color="#B22222">  dim(rwork)=6*n; dim(work)=6*ld*lds+2*cs1</font>
+<a name="line376">376: </a><font color="#B22222">*/</font>
+<a name="line377">377: </a><strong><font color="#4169E1"><a name="PEPTOARTrunc"></a>static PetscErrorCode PEPTOARTrunc(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt *rs1a,PetscInt cs1,PetscInt lock,PetscInt newc,PetscBool final,PetscScalar *work,PetscReal *rwork)</font></strong>
+<a name="line378">378: </a>{
+<a name="line379">379: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD) || defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)</font>
+<a name="line381">381: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD/GEQRF/ORGQR - Lapack routine is unavailable"</font>);
+<a name="line382">382: </a><font color="#A020F0">#else</font>
+<a name="line384">384: </a>  PetscInt       nwu=0,nrwu=0,nnc,nrow,lwa;
+<a name="line385">385: </a>  PetscInt       j,i,k,n,lds=deg*ld,rs1=*rs1a,rk=0,offu;
+<a name="line386">386: </a>  PetscScalar    *M,*V,*pU,*SS,*SS2,t,sone=1.0,zero=0.0,mone=-1.0,*p,*tau;
+<a name="line387">387: </a>  PetscReal      *sg,tol;
+<a name="line388">388: </a>  PetscBLASInt   cs1_,rs1_,cs1tdeg,n_,info,lw_,newc_,newctdeg,nnc_,nrow_,nnctdeg,lds_,rk_;
+<a name="line389">389: </a>  Mat            U;
+
+<a name="line392">392: </a>  <font color="#4169E1">if</font> (cs1==0) <font color="#4169E1">return</font>(0);
+<a name="line393">393: </a>  lwa = 6*ld*lds+2*cs1;
+<a name="line394">394: </a>  n = (rs1>deg*cs1)?deg*cs1:rs1;
+<a name="line395">395: </a>  nnc = cs1-lock-newc;
+<a name="line396">396: </a>  nrow = rs1-lock;
+<a name="line397">397: </a>  PetscMalloc4(deg*newc*nnc,&SS,newc*nnc,&SS2,(rs1+lock+newc)*n,&pU,deg*rs1,&tau);
+<a name="line398">398: </a>  offu = lock*(rs1+1);
+<a name="line399">399: </a>  M = work+nwu;
+<a name="line400">400: </a>  nwu += rs1*cs1*deg;
+<a name="line401">401: </a>  sg = rwork+nrwu;
+<a name="line402">402: </a>  nrwu += n;
+<a name="line403">403: </a>  PetscMemzero(pU,rs1*n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line404">404: </a>  V = work+nwu;
+<a name="line405">405: </a>  nwu += deg*cs1*n;
+<a name="line406">406: </a>  PetscBLASIntCast(n,&n_);
+<a name="line407">407: </a>  PetscBLASIntCast(nnc,&nnc_);
+<a name="line408">408: </a>  PetscBLASIntCast(cs1,&cs1_);
+<a name="line409">409: </a>  PetscBLASIntCast(rs1,&rs1_);
+<a name="line410">410: </a>  PetscBLASIntCast(newc,&newc_);
+<a name="line411">411: </a>  PetscBLASIntCast(newc*deg,&newctdeg);
+<a name="line412">412: </a>  PetscBLASIntCast(nnc*deg,&nnctdeg);
+<a name="line413">413: </a>  PetscBLASIntCast(cs1*deg,&cs1tdeg);
+<a name="line414">414: </a>  PetscBLASIntCast(lwa-nwu,&lw_);
+<a name="line415">415: </a>  PetscBLASIntCast(nrow,&nrow_);
+<a name="line416">416: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line417">417: </a>  <font color="#4169E1">if</font> (newc>0) {
+<a name="line418">418: </a>  <font color="#B22222">/* truncate columns associated with new converged eigenpairs */</font>
+<a name="line419">419: </a>    <font color="#4169E1">for</font> (j=0;j<deg;j++) {
+<a name="line420">420: </a>      <font color="#4169E1">for</font> (i=lock;i<lock+newc;i++) {
+<a name="line421">421: </a>        PetscMemcpy(M+(i-lock+j*newc)*nrow,S+i*lds+j*ld+lock,nrow*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line422">422: </a>      }
+<a name="line423">423: </a>    }
+<a name="line424">424: </a><font color="#A020F0">#if !defined (PETSC_USE_COMPLEX)</font>
+<a name="line425">425: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,&info));
+<a name="line426">426: </a><font color="#A020F0">#else</font>
+<a name="line427">427: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&newctdeg,M,&nrow_,sg,pU+offu,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));
+<a name="line428">428: </a><font color="#A020F0">#endif</font>
+<a name="line429">429: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+<a name="line430">430: </a>    <font color="#B22222">/* <a href="../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> has rank min(newc,nrow) */</font>
+<a name="line431">431: </a>    rk = PetscMin(newc,nrow);
+<a name="line432">432: </a>    <font color="#4169E1">for</font> (i=0;i<rk;i++) {
+<a name="line433">433: </a>      t = sg[i];
+<a name="line434">434: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&newctdeg,&t,V+i,&n_));
+<a name="line435">435: </a>    }
+<a name="line436">436: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line437">437: </a>      <font color="#4169E1">for</font> (j=lock;j<lock+newc;j++) {
+<a name="line438">438: </a>        PetscMemcpy(S+j*lds+i*ld+lock,V+(newc*i+j-lock)*n,rk*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line439">439: </a>        PetscMemzero(S+j*lds+i*ld+lock+rk,(ld-lock-rk)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line440">440: </a>      }
+<a name="line441">441: </a>    }
+<a name="line442">442: </a>    <font color="#B22222">/*</font>
+<a name="line443">443: </a><font color="#B22222">      update columns associated with non-converged vectors, orthogonalize</font>
+<a name="line444">444: </a><font color="#B22222">       against pU so that next M has rank nnc+d-1 insted of nrow+d-1</font>
+<a name="line445">445: </a><font color="#B22222">    */</font>
+<a name="line446">446: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line447">447: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&newc_,&nnc_,&nrow_,&sone,pU+offu,&rs1_,S+(lock+newc)*lds+i*ld+lock,&lds_,&zero,SS+i*newc*nnc,&newc_));
+<a name="line448">448: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&nrow_,&nnc_,&newc_,&mone,pU+offu,&rs1_,SS+i*newc*nnc,&newc_,&sone,S+(lock+newc)*lds+i*ld+lock,&lds_));
+<a name="line449">449: </a>      <font color="#B22222">/* repeat orthogonalization step */</font>
+<a name="line450">450: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&newc_,&nnc_,&nrow_,&sone,pU+offu,&rs1_,S+(lock+newc)*lds+i*ld+lock,&lds_,&zero,SS2,&newc_));
+<a name="line451">451: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&nrow_,&nnc_,&newc_,&mone,pU+offu,&rs1_,SS2,&newc_,&sone,S+(lock+newc)*lds+i*ld+lock,&lds_));
+<a name="line452">452: </a>      <font color="#4169E1">for</font> (j=0;j<newc*nnc;j++) *(SS+i*newc*nnc+j) += SS2[j];
+<a name="line453">453: </a>    }
+<a name="line454">454: </a>  }
+<a name="line455">455: </a>  <font color="#B22222">/* truncate columns associated with non-converged eigenpairs */</font>
+<a name="line456">456: </a>  <font color="#4169E1">for</font> (j=0;j<deg;j++) {
+<a name="line457">457: </a>    <font color="#4169E1">for</font> (i=lock+newc;i<cs1;i++) {
+<a name="line458">458: </a>      PetscMemcpy(M+(i-lock-newc+j*nnc)*nrow,S+i*lds+j*ld+lock,nrow*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line459">459: </a>    }
+<a name="line460">460: </a>  }
+<a name="line461">461: </a><font color="#A020F0">#if !defined (PETSC_USE_COMPLEX)</font>
+<a name="line462">462: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,&info));
+<a name="line463">463: </a><font color="#A020F0">#else</font>
+<a name="line464">464: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesvd"</font>,LAPACKgesvd_(<font color="#666666">"S"</font>,<font color="#666666">"S"</font>,&nrow_,&nnctdeg,M,&nrow_,sg,pU+offu+newc*rs1,&rs1_,V,&n_,work+nwu,&lw_,rwork+nrwu,&info));
+<a name="line465">465: </a><font color="#A020F0">#endif</font>
+<a name="line466">466: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESVD %d"</font>,info);
+<a name="line467">467: </a>  tol = PetscMax(rs1,deg*cs1)*PETSC_MACHINE_EPSILON*sg[0];
+<a name="line468">468: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(n_,nnctdeg);i++) <font color="#4169E1">if</font> (sg[i]>tol) rk++;
+<a name="line469">469: </a>  rk = PetscMin(nnc+deg-1,rk);
+<a name="line470">470: </a>  <font color="#B22222">/* the <a href="../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> has rank (atmost) nnc+deg-1 */</font>
+<a name="line471">471: </a>  <font color="#4169E1">for</font> (i=0;i<rk;i++) {
+<a name="line472">472: </a>    t = sg[i];
+<a name="line473">473: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&nnctdeg,&t,V+i,&n_));
+<a name="line474">474: </a>  }
+<a name="line475">475: </a>  <font color="#B22222">/* update S */</font>
+<a name="line476">476: </a>  PetscMemzero(S+cs1*lds,(ld-cs1)*lds*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line477">477: </a>  k = ld-lock-newc-rk;
+<a name="line478">478: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line479">479: </a>    <font color="#4169E1">for</font> (j=lock+newc;j<cs1;j++) {
+<a name="line480">480: </a>      PetscMemcpy(S+j*lds+i*ld+lock+newc,V+(nnc*i+j-lock-newc)*n,rk*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line481">481: </a>      PetscMemzero(S+j*lds+i*ld+lock+newc+rk,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line482">482: </a>    }
+<a name="line483">483: </a>  }
+<a name="line484">484: </a>  <font color="#4169E1">if</font> (newc>0) {
+<a name="line485">485: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line486">486: </a>      p = SS+nnc*newc*i;
+<a name="line487">487: </a>      <font color="#4169E1">for</font> (j=lock+newc;j<cs1;j++) {
+<a name="line488">488: </a>        <font color="#4169E1">for</font> (k=0;k<newc;k++) S[j*lds+i*ld+lock+k] = *(p++);
+<a name="line489">489: </a>      }
+<a name="line490">490: </a>    }
+<a name="line491">491: </a>  }
+
+<a name="line493">493: </a>  <font color="#B22222">/* orthogonalize pU */</font>
+<a name="line494">494: </a>  rk = rk+newc;
+<a name="line495">495: </a>  PetscBLASIntCast(rk,&rk_);
+<a name="line496">496: </a>  PetscBLASIntCast(cs1-lock,&nnc_);
+<a name="line497">497: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&nrow_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
+<a name="line498">498: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line499">499: </a>    PetscStackCallBLAS(<font color="#666666">"BLAStrmm"</font>,BLAStrmm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&rk_,&nnc_,&sone,pU+offu,&rs1_,S+lock*lds+lock+i*ld,&lds_));
+<a name="line500">500: </a>  }
+<a name="line501">501: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&nrow_,&rk_,&rk_,pU+offu,&rs1_,tau,work+nwu,&lw_,&info));
+
+<a name="line503">503: </a>  <font color="#B22222">/* update vectors V(:,idx) = V*Q(:,idx) */</font>
+<a name="line504">504: </a>  rk = rk+lock;
+<a name="line505">505: </a>  <font color="#4169E1">for</font> (i=0;i<lock;i++) pU[(i+1)*rs1] = 1.0;
+<a name="line506">506: </a>  MatCreateSeqDense(PETSC_COMM_SELF,rs1,rk,pU,&U);
+<a name="line507">507: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,lock,rs1);
+<a name="line508">508: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(pep->V,U,lock,rk);
+<a name="line509">509: </a>  <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,rk);
+<a name="line510">510: </a>  MatDestroy(&U);
+<a name="line511">511: </a>  *rs1a = rk;
+
+<a name="line513">513: </a>  <font color="#B22222">/* free work space */</font>
+<a name="line514">514: </a>  PetscFree4(SS,SS2,pU,tau);
+<a name="line515">515: </a>  <font color="#4169E1">return</font>(0);
+<a name="line516">516: </a><font color="#A020F0">#endif</font>
+<a name="line517">517: </a>}
+
+<a name="line521">521: </a><font color="#B22222">/*</font>
+<a name="line522">522: </a><font color="#B22222">  S <- S*Q</font>
+<a name="line523">523: </a><font color="#B22222">  columns s-s+ncu of S</font>
+<a name="line524">524: </a><font color="#B22222">  rows 0-sr of S</font>
+<a name="line525">525: </a><font color="#B22222">  size(Q) qr x ncu</font>
+<a name="line526">526: </a><font color="#B22222">  dim(work)=sr*ncu</font>
+<a name="line527">527: </a><font color="#B22222">*/</font>
+<a name="line528">528: </a><strong><font color="#4169E1"><a name="PEPTOARSupdate"></a>static PetscErrorCode PEPTOARSupdate(PetscScalar *S,PetscInt ld,PetscInt deg,PetscInt sr,PetscInt s,PetscInt ncu,PetscInt qr,PetscScalar *Q,PetscInt ldq,PetscScalar *work)</font></strong>
+<a name="line529">529: </a>{
+<a name="line531">531: </a>  PetscScalar    a=1.0,b=0.0;
+<a name="line532">532: </a>  PetscBLASInt   sr_,ncu_,ldq_,lds_,qr_;
+<a name="line533">533: </a>  PetscInt       j,lds=deg*ld,i;
+
+<a name="line536">536: </a>  PetscBLASIntCast(sr,&sr_);
+<a name="line537">537: </a>  PetscBLASIntCast(qr,&qr_);
+<a name="line538">538: </a>  PetscBLASIntCast(ncu,&ncu_);
+<a name="line539">539: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line540">540: </a>  PetscBLASIntCast(ldq,&ldq_);
+<a name="line541">541: </a>  <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line542">542: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&ncu_,&qr_,&a,S+i*ld,&lds_,Q,&ldq_,&b,work,&sr_));
+<a name="line543">543: </a>    <font color="#4169E1">for</font> (j=0;j<ncu;j++) {
+<a name="line544">544: </a>      PetscMemcpy(S+lds*(s+j)+i*ld,work+j*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line545">545: </a>    }
+<a name="line546">546: </a>  }
+<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
+<a name="line548">548: </a>}
+
+<a name="line552">552: </a><font color="#B22222">/*</font>
+<a name="line553">553: </a><font color="#B22222">  Computes T_j = phi_idx(T). In T_j and T_p are phi_{idx-1}(T)</font>
+<a name="line554">554: </a><font color="#B22222">   and phi_{idx-2}(T) respectively or null if idx=0,1.</font>
+<a name="line555">555: </a><font color="#B22222">   Tp and Tj are input/output arguments</font>
+<a name="line556">556: </a><font color="#B22222">*/</font>
+<a name="line557">557: </a><strong><font color="#4169E1"><a name="PEPEvaluateBasisM"></a>static PetscErrorCode PEPEvaluateBasisM(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,PetscScalar *T,PetscInt ldt,PetscInt idx,PetscScalar **Tp,PetscScalar **Tj)</font></strong>
+<a name="line558">558: </a>{
+<a name="line560">560: </a>  PetscInt       i;
+<a name="line561">561: </a>  PetscReal      *ca,*cb,*cg;
+<a name="line562">562: </a>  PetscScalar    *pt,g,a;
+<a name="line563">563: </a>  PetscBLASInt   k_,ldt_;
+
+<a name="line566">566: </a>  <font color="#4169E1">if</font> (idx==0) {
+<a name="line567">567: </a>    PetscMemzero(*Tj,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line568">568: </a>    PetscMemzero(*Tp,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line569">569: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) (*Tj)[i+i*k] = 1.0;
+<a name="line570">570: </a>  } <font color="#4169E1">else</font> {
+<a name="line571">571: </a>    PetscBLASIntCast(ldt,&ldt_);
+<a name="line572">572: </a>    PetscBLASIntCast(k,&k_);
+<a name="line573">573: </a>    ca = pep->pbc; cb = pep->pbc+pep->nmat; cg = pep->pbc+2*pep->nmat;
+<a name="line574">574: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) T[i*ldt+i] -= cb[idx-1];
+<a name="line575">575: </a>    a = 1/ca[idx-1];
+<a name="line576">576: </a>    g = (idx==1)?0.0:-cg[idx-1]/ca[idx-1];
+<a name="line577">577: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&k_,&k_,&k_,&a,T,&ldt_,*Tj,&k_,&g,*Tp,&k_));
+<a name="line578">578: </a>    pt = *Tj; *Tj = *Tp; *Tp = pt;
+<a name="line579">579: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) T[i*ldt+i] += cb[idx-1];
+<a name="line580">580: </a>  }
+<a name="line581">581: </a>  <font color="#4169E1">return</font>(0);
+<a name="line582">582: </a>}
+
+<a name="line586">586: </a><font color="#B22222">/* dim(work)=6*sr*k;*/</font>
+<a name="line587">587: </a><strong><font color="#4169E1"><a name="PEPExtractInvariantPair"></a>static PetscErrorCode PEPExtractInvariantPair(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscInt sr,PetscInt k,PetscScalar *S,PetscInt ld,PetscInt deg,PetscScalar *H,PetscInt ldh,PetscScalar *work)</font></strong>
+<a name="line588">588: </a>{
+<a name="line589">589: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(PETSC_MISSING_LAPACK_GETRF)</font>
+<a name="line591">591: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV/GETRI/GETRF - Lapack routine is unavailable"</font>);
+<a name="line592">592: </a><font color="#A020F0">#else</font>
+<a name="line594">594: </a>  PetscInt       nw,i,j,jj,nwu=0,lds,ldt,d=pep->nmat-1,idxcpy=0;
+<a name="line595">595: </a>  PetscScalar    *At,*Bt,*Hj,*Hp,*T,sone=1.0,g,a,*pM;
+<a name="line596">596: </a>  PetscBLASInt   k_,sr_,lds_,ldh_,info,*p,lwork,ldt_;
+<a name="line597">597: </a>  PetscBool      transf=PETSC_FALSE,flg;
+<a name="line598">598: </a>  PetscReal      nrm,norm,maxnrm,*rwork;
+<a name="line599">599: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             *R,Y;
+<a name="line600">600: </a>  Mat            M,*A;
+<a name="line601">601: </a>  Vec            v;
+
+<a name="line604">604: </a>  <font color="#4169E1">if</font> (k==0) <font color="#4169E1">return</font>(0);
+<a name="line605">605: </a>  nw = 6*sr*k;
+<a name="line606">606: </a>  lds = deg*ld;
+<a name="line607">607: </a>  At = work+nwu;
+<a name="line608">608: </a>  nwu += sr*k;
+<a name="line609">609: </a>  Bt = work+nwu;
+<a name="line610">610: </a>  nwu += k*k;
+<a name="line611">611: </a>  PetscMemzero(Bt,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line612">612: </a>  Hj = work+nwu;
 <a name="line613">613: </a>  nwu += k*k;
-<a name="line614">614: </a>  PetscMemzero(Bt,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line615">615: </a>  Hj = work+nwu;
-<a name="line616">616: </a>  nwu += k*k;
-<a name="line617">617: </a>  Hp = work+nwu;
-<a name="line618">618: </a>  nwu += k*k;
-<a name="line619">619: </a>  PetscMemzero(Hp,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line620">620: </a>  PetscMalloc1(k,&p);
-<a name="line621">621: </a>  PetscBLASIntCast(sr,&sr_);
-<a name="line622">622: </a>  PetscBLASIntCast(k,&k_);
-<a name="line623">623: </a>  PetscBLASIntCast(lds,&lds_);
-<a name="line624">624: </a>  PetscBLASIntCast(ldh,&ldh_);
-<a name="line625">625: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line626">626: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line627">627: </a>     PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&flg);
-<a name="line628">628: </a>    <font color="#4169E1">if</font> (flg || sigma!=0.0) transf=PETSC_TRUE;
-<a name="line629">629: </a>  }
-<a name="line630">630: </a>  <font color="#4169E1">if</font> (transf) {
-<a name="line631">631: </a>    ldt = k;
-<a name="line632">632: </a>    T = work+nwu;
-<a name="line633">633: </a>    nwu += k*k;
-<a name="line634">634: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line635">635: </a>      PetscMemcpy(T+k*i,H+i*ldh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line636">636: </a>    }
-<a name="line637">637: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line638">638: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&k_,&k_,T,&k_,p,&info));
-<a name="line639">639: </a>      PetscBLASIntCast(nw-nwu,&lwork);
-<a name="line640">640: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&k_,T,&k_,p,work+nwu,&lwork,&info));  
-<a name="line641">641: </a>    }
-<a name="line642">642: </a>    <font color="#4169E1">if</font> (sigma!=0.0) <font color="#4169E1">for</font> (i=0;i<k;i++) T[i+k*i] += sigma;
-<a name="line643">643: </a>  } <font color="#4169E1">else</font> {
-<a name="line644">644: </a>    T = H; ldt = ldh;
-<a name="line645">645: </a>  }
-<a name="line646">646: </a>  PetscBLASIntCast(ldt,&ldt_);
-<a name="line647">647: </a>  <font color="#4169E1">switch</font> (pep->extract) {
-<a name="line648">648: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NONE:
-<a name="line649">649: </a>    <font color="#4169E1">break</font>;
-<a name="line650">650: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NORM:
-<a name="line651">651: </a>    <font color="#4169E1">if</font> (pep->basis == PEP_BASIS_MONOMIAL) {
-<a name="line652">652: </a>      PetscBLASIntCast(ldt,&ldt_);
-<a name="line653">653: </a>      PetscMalloc1(k,&rwork);
-<a name="line654">654: </a>      norm = LAPACKlange_(<font color="#666666">"F"</font>,&k_,&k_,T,&ldt_,rwork);
-<a name="line655">655: </a>      PetscFree(rwork);
-<a name="line656">656: </a>      <font color="#4169E1">if</font> (norm>1.0) idxcpy = d-1;
-<a name="line657">657: </a>    } <font color="#4169E1">else</font> {
-<a name="line658">658: </a>      PetscBLASIntCast(ldt,&ldt_);
-<a name="line659">659: </a>      PetscMalloc1(k,&rwork);
-<a name="line660">660: </a>      maxnrm = 0.0;
-<a name="line661">661: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
-<a name="line662">662: </a>        PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);
-<a name="line663">663: </a>        norm = LAPACKlange_(<font color="#666666">"F"</font>,&k_,&k_,Hj,&k_,rwork);
-<a name="line664">664: </a>        <font color="#4169E1">if</font> (norm > maxnrm) {
-<a name="line665">665: </a>          idxcpy = i;
-<a name="line666">666: </a>          maxnrm = norm;
-<a name="line667">667: </a>        }
-<a name="line668">668: </a>      }
-<a name="line669">669: </a>      PetscFree(rwork);
-<a name="line670">670: </a>    }
-<a name="line671">671: </a>    <font color="#4169E1">if</font> (idxcpy>0) {
-<a name="line672">672: </a>      <font color="#B22222">/* copy block idxcpy of S to the first one */</font>
-<a name="line673">673: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line674">674: </a>        PetscMemcpy(S+j*lds,S+idxcpy*ld+j*lds,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line675">675: </a>      }
-<a name="line676">676: </a>    }
-<a name="line677">677: </a>    <font color="#4169E1">break</font>;
-<a name="line678">678: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_RESIDUAL:
-<a name="line679">679: </a>    <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line680">680: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line681">681: </a>      PetscMalloc1(pep->nmat,&A);
-<a name="line682">682: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line683">683: </a>        <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,A+i);
-<a name="line684">684: </a>      }
-<a name="line685">685: </a>    } <font color="#4169E1">else</font> A = pep->A;
-<a name="line686">686: </a>    PetscMalloc1(pep->nmat-1,&R);
-<a name="line687">687: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
-<a name="line688">688: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,k,R+i);
-<a name="line689">689: </a>    }
-<a name="line690">690: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,sr,&Y);
-<a name="line691">691: </a>    MatCreateSeqDense(PETSC_COMM_SELF,sr,k,NULL,&M);
-<a name="line692">692: </a>    g = 0.0; a = 1.0;
-<a name="line693">693: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,sr);
-<a name="line694">694: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
-<a name="line695">695: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(pep->V,A[j],Y);    
-<a name="line696">696: </a>      PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);
-<a name="line697">697: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
-<a name="line698">698: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&k_,&k_,&a,S+i*ld,&lds_,Hj,&k_,&g,At,&sr_));
-<a name="line699">699: </a>        MatDenseGetArray(M,&pM);
-<a name="line700">700: </a>        <font color="#4169E1">for</font> (jj=0;jj<k;jj++) {
-<a name="line701">701: </a>          PetscMemcpy(pM+jj*sr,At+jj*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line702">702: </a>        }
-<a name="line703">703: </a>        MatDenseRestoreArray(M,&pM);
-<a name="line704">704: </a>        <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R[i],1.0,(i==0)?0.0:1.0,Y,M);
-<a name="line705">705: </a>      }
-<a name="line706">706: </a>    }
-<a name="line707">707: </a>    
-<a name="line708">708: </a>    <font color="#B22222">/* frobenius norm */</font>
-<a name="line709">709: </a>    maxnrm = 0.0;
-<a name="line710">710: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
-<a name="line711">711: </a>      norm = 0.0;
-<a name="line712">712: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line713">713: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(R[i],j,&v);
-<a name="line714">714: </a>        VecNorm(v,NORM_2,&nrm); 
-<a name="line715">715: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(R[i],j,&v);
-<a name="line716">716: </a>        norm += nrm*nrm;
-<a name="line717">717: </a>      }
-<a name="line718">718: </a>      norm = PetscSqrtReal(norm);
-<a name="line719">719: </a>      <font color="#4169E1">if</font> (maxnrm > norm) {
-<a name="line720">720: </a>        maxnrm = norm;
-<a name="line721">721: </a>        idxcpy = i;
-<a name="line722">722: </a>      }
-<a name="line723">723: </a>    }
-<a name="line724">724: </a>    <font color="#4169E1">if</font> (idxcpy>0) {
-<a name="line725">725: </a>      <font color="#B22222">/* copy block idxcpy of S to the first one */</font>
-<a name="line726">726: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
-<a name="line727">727: </a>        PetscMemcpy(S+j*lds,S+idxcpy*ld+j*lds,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line728">728: </a>      }
-<a name="line729">729: </a>    }
-<a name="line730">730: </a>    <font color="#4169E1">if</font> (flg) PetscFree(A);
-<a name="line731">731: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
-<a name="line732">732: </a>      <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&R[i]);
-<a name="line733">733: </a>    }
-<a name="line734">734: </a>    PetscFree(R);
-<a name="line735">735: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Y);
-<a name="line736">736: </a>    MatDestroy(&M);
-<a name="line737">737: </a>    <font color="#4169E1">break</font>;
-<a name="line738">738: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_STRUCTURED:
-<a name="line739">739: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) Bt[j+j*k] = 1.0;
-<a name="line740">740: </a>    <font color="#4169E1">for</font> (j=0;j<sr;j++) {
-<a name="line741">741: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) At[j*k+i] = PetscConj(S[i*lds+j]);
-<a name="line742">742: </a>    }
-<a name="line743">743: </a>    PEPEvaluateBasisM(pep,k,T,ldt,0,&Hp,&Hj);
-<a name="line744">744: </a>    <font color="#4169E1">for</font> (i=1;i<deg;i++) {
-<a name="line745">745: </a>      PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);
-<a name="line746">746: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"C"</font>,&k_,&sr_,&k_,&sone,Hj,&k_,S+i*ld,&lds_,&sone,At,&k_));
-<a name="line747">747: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"C"</font>,&k_,&k_,&k_,&sone,Hj,&k_,Hj,&k_,&sone,Bt,&k_));
-<a name="line748">748: </a>    }
-<a name="line749">749: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&k_,&sr_,Bt,&k_,p,At,&k_,&info));
-<a name="line750">750: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
-<a name="line751">751: </a>    <font color="#4169E1">for</font> (j=0;j<sr;j++) {
-<a name="line752">752: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) S[i*lds+j] = PetscConj(At[j*k+i]);
-<a name="line753">753: </a>    } 
-<a name="line754">754: </a>    <font color="#4169E1">break</font>;
-<a name="line755">755: </a><strong><font color="#FF0000">  default:</font></strong>
-<a name="line756">756: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Extraction not implemented in this solver"</font>);
-<a name="line757">757: </a>  }
-<a name="line758">758: </a>  PetscFree(p);
-<a name="line759">759: </a>  <font color="#4169E1">return</font>(0);
-<a name="line760">760: </a>}
-
-<a name="line764">764: </a><strong><font color="#4169E1"><a name="PEPLookfordeflation"></a>static PetscErrorCode PEPLookfordeflation(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *nl)</font></strong>
-<a name="line765">765: </a>{
-<a name="line767">767: </a>  PetscInt       i,l,n,ld;
-<a name="line768">768: </a>  PetscReal      norm;
-<a name="line769">769: </a>  PetscBool      cplx;
-<a name="line770">770: </a>  PetscScalar    *H;
-
-<a name="line773">773: </a>  *nl = 0;
-<a name="line774">774: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,&n,NULL,&l,NULL,NULL);
-<a name="line775">775: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ld);
-<a name="line776">776: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line777">777: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
-<a name="line778">778: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line779">779: </a>    cplx = PetscImaginaryPart(pep->eigr[i])?PETSC_TRUE:PETSC_FALSE;
-<a name="line780">780: </a>    norm = PetscAbsScalar(pep->eigr[i]);
-<a name="line781">781: </a><font color="#A020F0">#else</font>
-<a name="line782">782: </a>    cplx = pep->eigi[i]?PETSC_TRUE:PETSC_FALSE;
-<a name="line783">783: </a>    norm = SlepcAbsEigenvalue(pep->eigr[i],pep->eigi[i]);
-<a name="line784">784: </a><font color="#A020F0">#endif</font>
-<a name="line785">785: </a>    <font color="#4169E1">if</font> (PetscAbsScalar(H[n+i*ld])/norm < pep->tol){
-<a name="line786">786: </a>      <font color="#4169E1">if</font> (cplx) {
-<a name="line787">787: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(H[n+(i+1)*ld])/norm < pep->tol) (*nl)++;
-<a name="line788">788: </a>        <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line789">789: </a>        i++;
-<a name="line790">790: </a>      }
-<a name="line791">791: </a>      (*nl)++;
-<a name="line792">792: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line793">793: </a>  }
-<a name="line794">794: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line795">795: </a>  <font color="#4169E1">return</font>(0);
-<a name="line796">796: </a>}
-
-<a name="line800">800: </a><strong><font color="#4169E1"><a name="PEPSolve_TOAR"></a>PetscErrorCode PEPSolve_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line801">801: </a>{
-<a name="line803">803: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
-<a name="line804">804: </a>  PetscInt       i,j,k,l,nv=0,ld,lds,off,ldds,newn,nq=ctx->nq,nl,nconv=0,locked=0,newc;
-<a name="line805">805: </a>  PetscInt       lwa,lrwa,nwu=0,nrwu=0,nmat=pep->nmat,deg=nmat-1;
-<a name="line806">806: </a>  PetscScalar    *S,*Q,*work,*H,sigma;
-<a name="line807">807: </a>  PetscReal      beta,*rwork;
-<a name="line808">808: </a>  PetscBool      breakdown=PETSC_FALSE,flg,falselock=PETSC_FALSE,def=PETSC_FALSE,sinv;
-
-<a name="line811">811: </a>  <font color="#4169E1">if</font> (ctx->lock) {
-<a name="line812">812: </a>    PetscOptionsGetBool(NULL,<font color="#666666">"-pep_toar_falselocking"</font>,&falselock,NULL);
-<a name="line813">813: </a>    PetscOptionsGetBool(NULL,<font color="#666666">"-pep_toar_lockdeflated"</font>,&def,NULL);
-<a name="line814">814: </a>  }
-<a name="line815">815: </a>  ld = ctx->ld;
-<a name="line816">816: </a>  S = ctx->S;
-<a name="line817">817: </a>  lds = deg*ld;        <font color="#B22222">/* leading dimension of S */</font>
-<a name="line818">818: </a>  lwa = (deg+6)*ld*lds;
-<a name="line819">819: </a>  lrwa = 7*lds;
-<a name="line820">820: </a>  PetscMalloc2(lwa,&work,lrwa,&rwork);
-<a name="line821">821: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldds); 
-<a name="line822">822: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(pep->st,&sigma);
-
-<a name="line824">824: </a>  <font color="#B22222">/* update polynomial basis coefficients */</font>
-<a name="line825">825: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line826">826: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
-<a name="line827">827: </a>    <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
-<a name="line828">828: </a>      pep->pbc[nmat+i] /= pep->sfactor;
-<a name="line829">829: </a>      pep->pbc[2*nmat+i] /= pep->sfactor*pep->sfactor; 
-<a name="line830">830: </a>    }
-<a name="line831">831: </a>    <font color="#4169E1">if</font> (!flg) {
-<a name="line832">832: </a>      pep->target /= pep->sfactor;
-<a name="line833">833: </a>      <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,pep->sfactor);
-<a name="line834">834: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,1.0/pep->sfactor);
-<a name="line835">835: </a>      sigma /= pep->sfactor;
-<a name="line836">836: </a>    } <font color="#4169E1">else</font> {
-<a name="line837">837: </a>      PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line838">838: </a>      <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,sinv?1.0/pep->sfactor:pep->sfactor);
-<a name="line839">839: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);
-<a name="line840">840: </a>    }
-<a name="line841">841: </a>  }
-
-<a name="line843">843: </a>  <font color="#4169E1">if</font> (flg) sigma = 0.0;
-
-<a name="line845">845: </a>  <font color="#B22222">/* restart loop */</font>
-<a name="line846">846: </a>  l = 0;
-<a name="line847">847: </a>  <font color="#4169E1">while</font> (pep->reason == PEP_CONVERGED_ITERATING) {
-<a name="line848">848: </a>    pep->its++;
-<a name="line849">849: </a>    
-<a name="line850">850: </a>    <font color="#B22222">/* compute an nv-step Lanczos factorization */</font>
-<a name="line851">851: </a>    nv = PetscMax(PetscMin(nconv+pep->mpd,pep->ncv),nv);
-<a name="line852">852: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line853">853: </a>    PEPTOARrun(pep,sigma,&nq,S,ld,H,ldds,pep->nconv+l,&nv,&breakdown,work+nwu,lwa-nwu,pep->work,4);
-<a name="line854">854: </a>    beta = PetscAbsScalar(H[(nv-1)*ldds+nv]);
-<a name="line855">855: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line856">856: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,nv,0,pep->nconv,pep->nconv+l);
-<a name="line857">857: </a>    <font color="#4169E1">if</font> (l==0) {
-<a name="line858">858: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_INTERMEDIATE);
-<a name="line859">859: </a>    } <font color="#4169E1">else</font> {
-<a name="line860">860: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line614">614: </a>  Hp = work+nwu;
+<a name="line615">615: </a>  nwu += k*k;
+<a name="line616">616: </a>  PetscMemzero(Hp,k*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line617">617: </a>  PetscMalloc1(k,&p);
+<a name="line618">618: </a>  PetscBLASIntCast(sr,&sr_);
+<a name="line619">619: </a>  PetscBLASIntCast(k,&k_);
+<a name="line620">620: </a>  PetscBLASIntCast(lds,&lds_);
+<a name="line621">621: </a>  PetscBLASIntCast(ldh,&ldh_);
+<a name="line622">622: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line623">623: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line624">624: </a>     PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&flg);
+<a name="line625">625: </a>    <font color="#4169E1">if</font> (flg || sigma!=0.0) transf=PETSC_TRUE;
+<a name="line626">626: </a>  }
+<a name="line627">627: </a>  <font color="#4169E1">if</font> (transf) {
+<a name="line628">628: </a>    ldt = k;
+<a name="line629">629: </a>    T = work+nwu;
+<a name="line630">630: </a>    nwu += k*k;
+<a name="line631">631: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line632">632: </a>      PetscMemcpy(T+k*i,H+i*ldh,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line633">633: </a>    }
+<a name="line634">634: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line635">635: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&k_,&k_,T,&k_,p,&info));
+<a name="line636">636: </a>      PetscBLASIntCast(nw-nwu,&lwork);
+<a name="line637">637: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&k_,T,&k_,p,work+nwu,&lwork,&info));
+<a name="line638">638: </a>    }
+<a name="line639">639: </a>    <font color="#4169E1">if</font> (sigma!=0.0) <font color="#4169E1">for</font> (i=0;i<k;i++) T[i+k*i] += sigma;
+<a name="line640">640: </a>  } <font color="#4169E1">else</font> {
+<a name="line641">641: </a>    T = H; ldt = ldh;
+<a name="line642">642: </a>  }
+<a name="line643">643: </a>  PetscBLASIntCast(ldt,&ldt_);
+<a name="line644">644: </a>  <font color="#4169E1">switch</font> (pep->extract) {
+<a name="line645">645: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NONE:
+<a name="line646">646: </a>    <font color="#4169E1">break</font>;
+<a name="line647">647: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NORM:
+<a name="line648">648: </a>    <font color="#4169E1">if</font> (pep->basis == PEP_BASIS_MONOMIAL) {
+<a name="line649">649: </a>      PetscBLASIntCast(ldt,&ldt_);
+<a name="line650">650: </a>      PetscMalloc1(k,&rwork);
+<a name="line651">651: </a>      norm = LAPACKlange_(<font color="#666666">"F"</font>,&k_,&k_,T,&ldt_,rwork);
+<a name="line652">652: </a>      PetscFree(rwork);
+<a name="line653">653: </a>      <font color="#4169E1">if</font> (norm>1.0) idxcpy = d-1;
+<a name="line654">654: </a>    } <font color="#4169E1">else</font> {
+<a name="line655">655: </a>      PetscBLASIntCast(ldt,&ldt_);
+<a name="line656">656: </a>      PetscMalloc1(k,&rwork);
+<a name="line657">657: </a>      maxnrm = 0.0;
+<a name="line658">658: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
+<a name="line659">659: </a>        PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);
+<a name="line660">660: </a>        norm = LAPACKlange_(<font color="#666666">"F"</font>,&k_,&k_,Hj,&k_,rwork);
+<a name="line661">661: </a>        <font color="#4169E1">if</font> (norm > maxnrm) {
+<a name="line662">662: </a>          idxcpy = i;
+<a name="line663">663: </a>          maxnrm = norm;
+<a name="line664">664: </a>        }
+<a name="line665">665: </a>      }
+<a name="line666">666: </a>      PetscFree(rwork);
+<a name="line667">667: </a>    }
+<a name="line668">668: </a>    <font color="#4169E1">if</font> (idxcpy>0) {
+<a name="line669">669: </a>      <font color="#B22222">/* copy block idxcpy of S to the first one */</font>
+<a name="line670">670: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line671">671: </a>        PetscMemcpy(S+j*lds,S+idxcpy*ld+j*lds,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line672">672: </a>      }
+<a name="line673">673: </a>    }
+<a name="line674">674: </a>    <font color="#4169E1">break</font>;
+<a name="line675">675: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_RESIDUAL:
+<a name="line676">676: </a>    <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line677">677: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line678">678: </a>      PetscMalloc1(pep->nmat,&A);
+<a name="line679">679: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line680">680: </a>        <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,A+i);
+<a name="line681">681: </a>      }
+<a name="line682">682: </a>    } <font color="#4169E1">else</font> A = pep->A;
+<a name="line683">683: </a>    PetscMalloc1(pep->nmat-1,&R);
+<a name="line684">684: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
+<a name="line685">685: </a>      <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,k,R+i);
+<a name="line686">686: </a>    }
+<a name="line687">687: </a>    <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(pep->V,sr,&Y);
+<a name="line688">688: </a>    MatCreateSeqDense(PETSC_COMM_SELF,sr,k,NULL,&M);
+<a name="line689">689: </a>    g = 0.0; a = 1.0;
+<a name="line690">690: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(pep->V,0,sr);
+<a name="line691">691: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
+<a name="line692">692: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(pep->V,A[j],Y);
+<a name="line693">693: </a>      PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);
+<a name="line694">694: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
+<a name="line695">695: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&sr_,&k_,&k_,&a,S+i*ld,&lds_,Hj,&k_,&g,At,&sr_));
+<a name="line696">696: </a>        MatDenseGetArray(M,&pM);
+<a name="line697">697: </a>        <font color="#4169E1">for</font> (jj=0;jj<k;jj++) {
+<a name="line698">698: </a>          PetscMemcpy(pM+jj*sr,At+jj*sr,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line699">699: </a>        }
+<a name="line700">700: </a>        MatDenseRestoreArray(M,&pM);
+<a name="line701">701: </a>        <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(R[i],1.0,(i==0)?0.0:1.0,Y,M);
+<a name="line702">702: </a>      }
+<a name="line703">703: </a>    }
+
+<a name="line705">705: </a>    <font color="#B22222">/* frobenius norm */</font>
+<a name="line706">706: </a>    maxnrm = 0.0;
+<a name="line707">707: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
+<a name="line708">708: </a>      norm = 0.0;
+<a name="line709">709: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line710">710: </a>        <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(R[i],j,&v);
+<a name="line711">711: </a>        VecNorm(v,NORM_2,&nrm);
+<a name="line712">712: </a>        <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(R[i],j,&v);
+<a name="line713">713: </a>        norm += nrm*nrm;
+<a name="line714">714: </a>      }
+<a name="line715">715: </a>      norm = PetscSqrtReal(norm);
+<a name="line716">716: </a>      <font color="#4169E1">if</font> (maxnrm > norm) {
+<a name="line717">717: </a>        maxnrm = norm;
+<a name="line718">718: </a>        idxcpy = i;
+<a name="line719">719: </a>      }
+<a name="line720">720: </a>    }
+<a name="line721">721: </a>    <font color="#4169E1">if</font> (idxcpy>0) {
+<a name="line722">722: </a>      <font color="#B22222">/* copy block idxcpy of S to the first one */</font>
+<a name="line723">723: </a>      <font color="#4169E1">for</font> (j=0;j<k;j++) {
+<a name="line724">724: </a>        PetscMemcpy(S+j*lds,S+idxcpy*ld+j*lds,sr*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line725">725: </a>      }
+<a name="line726">726: </a>    }
+<a name="line727">727: </a>    <font color="#4169E1">if</font> (flg) PetscFree(A);
+<a name="line728">728: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat-1;i++) {
+<a name="line729">729: </a>      <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&R[i]);
+<a name="line730">730: </a>    }
+<a name="line731">731: </a>    PetscFree(R);
+<a name="line732">732: </a>    <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Y);
+<a name="line733">733: </a>    MatDestroy(&M);
+<a name="line734">734: </a>    <font color="#4169E1">break</font>;
+<a name="line735">735: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_STRUCTURED:
+<a name="line736">736: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) Bt[j+j*k] = 1.0;
+<a name="line737">737: </a>    <font color="#4169E1">for</font> (j=0;j<sr;j++) {
+<a name="line738">738: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) At[j*k+i] = PetscConj(S[i*lds+j]);
+<a name="line739">739: </a>    }
+<a name="line740">740: </a>    PEPEvaluateBasisM(pep,k,T,ldt,0,&Hp,&Hj);
+<a name="line741">741: </a>    <font color="#4169E1">for</font> (i=1;i<deg;i++) {
+<a name="line742">742: </a>      PEPEvaluateBasisM(pep,k,T,ldt,i,&Hp,&Hj);
+<a name="line743">743: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"C"</font>,&k_,&sr_,&k_,&sone,Hj,&k_,S+i*ld,&lds_,&sone,At,&k_));
+<a name="line744">744: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"C"</font>,&k_,&k_,&k_,&sone,Hj,&k_,Hj,&k_,&sone,Bt,&k_));
+<a name="line745">745: </a>    }
+<a name="line746">746: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&k_,&sr_,Bt,&k_,p,At,&k_,&info));
+<a name="line747">747: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
+<a name="line748">748: </a>    <font color="#4169E1">for</font> (j=0;j<sr;j++) {
+<a name="line749">749: </a>      <font color="#4169E1">for</font> (i=0;i<k;i++) S[i*lds+j] = PetscConj(At[j*k+i]);
+<a name="line750">750: </a>    }
+<a name="line751">751: </a>    <font color="#4169E1">break</font>;
+<a name="line752">752: </a><strong><font color="#FF0000">  default:</font></strong>
+<a name="line753">753: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Extraction not implemented in this solver"</font>);
+<a name="line754">754: </a>  }
+<a name="line755">755: </a>  PetscFree(p);
+<a name="line756">756: </a>  <font color="#4169E1">return</font>(0);
+<a name="line757">757: </a><font color="#A020F0">#endif</font>
+<a name="line758">758: </a>}
+
+<a name="line762">762: </a><strong><font color="#4169E1"><a name="PEPSolve_TOAR"></a>PetscErrorCode PEPSolve_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line763">763: </a>{
+<a name="line765">765: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line766">766: </a>  PetscInt       i,j,k,l,nv=0,ld,lds,off,ldds,newn,nq=ctx->nq,nconv=0,locked=0,newc;
+<a name="line767">767: </a>  PetscInt       lwa,lrwa,nwu=0,nrwu=0,nmat=pep->nmat,deg=nmat-1;
+<a name="line768">768: </a>  PetscScalar    *S,*Q,*work,*H,sigma;
+<a name="line769">769: </a>  PetscReal      beta,*rwork;
+<a name="line770">770: </a>  PetscBool      breakdown=PETSC_FALSE,flg,falselock=PETSC_FALSE,sinv=PETSC_FALSE;
+
+<a name="line773">773: </a>  PetscCitationsRegister(citation,&cited);
+<a name="line774">774: </a>  <font color="#4169E1">if</font> (ctx->lock) {
+<a name="line775">775: </a>    PetscOptionsGetBool(NULL,NULL,<font color="#666666">"-pep_toar_falselocking"</font>,&falselock,NULL);
+<a name="line776">776: </a>  }
+<a name="line777">777: </a>  ld = ctx->ld;
+<a name="line778">778: </a>  S = ctx->S;
+<a name="line779">779: </a>  lds = deg*ld;        <font color="#B22222">/* leading dimension of S */</font>
+<a name="line780">780: </a>  lwa = (deg+6)*ld*lds;
+<a name="line781">781: </a>  lrwa = 7*lds;
+<a name="line782">782: </a>  PetscMalloc2(lwa,&work,lrwa,&rwork);
+<a name="line783">783: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ldds);
+<a name="line784">784: </a>  <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(pep->st,&sigma);
+
+<a name="line786">786: </a>  <font color="#B22222">/* update polynomial basis coefficients */</font>
+<a name="line787">787: </a>  <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line788">788: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
+<a name="line789">789: </a>    <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
+<a name="line790">790: </a>      pep->pbc[nmat+i] /= pep->sfactor;
+<a name="line791">791: </a>      pep->pbc[2*nmat+i] /= pep->sfactor*pep->sfactor;
+<a name="line792">792: </a>    }
+<a name="line793">793: </a>    <font color="#4169E1">if</font> (!flg) {
+<a name="line794">794: </a>      pep->target /= pep->sfactor;
+<a name="line795">795: </a>      <a href="../../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(pep->rg,1.0/pep->sfactor);
+<a name="line796">796: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,1.0/pep->sfactor);
+<a name="line797">797: </a>      sigma /= pep->sfactor;
+<a name="line798">798: </a>    } <font color="#4169E1">else</font> {
+<a name="line799">799: </a>      PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line800">800: </a>      <a href="../../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(pep->rg,sinv?pep->sfactor:1.0/pep->sfactor);
+<a name="line801">801: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?pep->sfactor:1.0/pep->sfactor);
+<a name="line802">802: </a>    }
+<a name="line803">803: </a>  }
+
+<a name="line805">805: </a>  <font color="#4169E1">if</font> (flg) sigma = 0.0;
+
+<a name="line807">807: </a>  <font color="#B22222">/* restart loop */</font>
+<a name="line808">808: </a>  l = 0;
+<a name="line809">809: </a>  <font color="#4169E1">while</font> (pep->reason == PEP_CONVERGED_ITERATING) {
+<a name="line810">810: </a>    pep->its++;
+
+<a name="line812">812: </a>    <font color="#B22222">/* compute an nv-step Lanczos factorization */</font>
+<a name="line813">813: </a>    nv = PetscMax(PetscMin(nconv+pep->mpd,pep->ncv),nv);
+<a name="line814">814: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line815">815: </a>    PEPTOARrun(pep,sigma,&nq,S,ld,H,ldds,pep->nconv+l,&nv,&breakdown,work+nwu,pep->work);
+<a name="line816">816: </a>    beta = PetscAbsScalar(H[(nv-1)*ldds+nv]);
+<a name="line817">817: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line818">818: </a>    <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,nv,0,pep->nconv,pep->nconv+l);
+<a name="line819">819: </a>    <font color="#4169E1">if</font> (l==0) {
+<a name="line820">820: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_INTERMEDIATE);
+<a name="line821">821: </a>    } <font color="#4169E1">else</font> {
+<a name="line822">822: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line823">823: </a>    }
+
+<a name="line825">825: </a>    <font color="#B22222">/* solve projected problem */</font>
+<a name="line826">826: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
+<a name="line827">827: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
+<a name="line828">828: </a>    <a href="../../../../../docs/manualpages/DS/DSUpdateExtraRow.html#DSUpdateExtraRow">DSUpdateExtraRow</a>(pep->ds);
+
+<a name="line830">830: </a>    <font color="#B22222">/* check convergence */</font>
+<a name="line831">831: </a>    PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,nv-pep->nconv,beta,&k);
+<a name="line832">832: </a>    (*pep->stopping)(pep,pep->its,pep->max_it,k,pep->nev,&pep->reason,pep->stoppingctx);
+
+<a name="line834">834: </a>    <font color="#B22222">/* update l */</font>
+<a name="line835">835: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
+<a name="line836">836: </a>    <font color="#4169E1">else</font> {
+<a name="line837">837: </a>      l = (nv==k)?0:PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
+<a name="line838">838: </a>      <font color="#4169E1">if</font> (!breakdown) {
+<a name="line839">839: </a>        <font color="#B22222">/* prepare the Rayleigh quotient for restart */</font>
+<a name="line840">840: </a>        <a href="../../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(pep->ds,k+l);
+<a name="line841">841: </a>        <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,&newn,NULL,NULL,NULL,NULL);
+<a name="line842">842: </a>        l = newn-k;
+<a name="line843">843: </a>      }
+<a name="line844">844: </a>    }
+<a name="line845">845: </a>    nconv = k;
+<a name="line846">846: </a>    <font color="#4169E1">if</font> (!ctx->lock && pep->reason == PEP_CONVERGED_ITERATING && !breakdown) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
+
+<a name="line848">848: </a>    <font color="#B22222">/* update S */</font>
+<a name="line849">849: </a>    off = pep->nconv*ldds;
+<a name="line850">850: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line851">851: </a>    PEPTOARSupdate(S,ld,deg,nq,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu);
+<a name="line852">852: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
+
+<a name="line854">854: </a>    <font color="#B22222">/* copy last column of S */</font>
+<a name="line855">855: </a>    PetscMemcpy(S+lds*(k+l),S+lds*nv,lds*<font color="#4169E1">sizeof</font>(PetscScalar));
+
+<a name="line857">857: </a>    <font color="#4169E1">if</font> (breakdown) {
+<a name="line858">858: </a>      <font color="#B22222">/* stop if breakdown */</font>
+<a name="line859">859: </a>      PetscInfo2(pep,<font color="#666666">"Breakdown TOAR method (it=%D norm=%g)\n"</font>,pep->its,(double)beta);
+<a name="line860">860: </a>      pep->reason = PEP_DIVERGED_BREAKDOWN;
 <a name="line861">861: </a>    }
-
-<a name="line863">863: </a>    <font color="#B22222">/* solve projected problem */</font>
-<a name="line864">864: </a>    <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
-<a name="line865">865: </a>    <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
-<a name="line866">866: </a>    <a href="../../../../../docs/manualpages/DS/DSUpdateExtraRow.html#DSUpdateExtraRow">DSUpdateExtraRow</a>(pep->ds);
-
-<a name="line868">868: </a>    <font color="#B22222">/* check convergence */</font>
-<a name="line869">869: </a>    PEPKrylovConvergence(pep,PETSC_FALSE,pep->nconv,nv-pep->nconv,beta,&k);
-<a name="line870">870: </a>    <font color="#4169E1">if</font> (pep->its >= pep->max_it) pep->reason = PEP_DIVERGED_ITS;
-<a name="line871">871: </a>    <font color="#4169E1">if</font> (k >= pep->nev) pep->reason = PEP_CONVERGED_TOL;
-
-<a name="line873">873: </a>    <font color="#B22222">/* update l */</font>
-<a name="line874">874: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING || breakdown) l = 0;
-<a name="line875">875: </a>    <font color="#4169E1">else</font> {
-<a name="line876">876: </a>      l = (nv==k)?0:PetscMax(1,(PetscInt)((nv-k)*ctx->keep));
-<a name="line877">877: </a>      <font color="#4169E1">if</font> (!breakdown) {
-<a name="line878">878: </a>        <font color="#B22222">/* prepare the Rayleigh quotient for restart */</font>
-<a name="line879">879: </a>        <a href="../../../../../docs/manualpages/DS/DSTruncate.html#DSTruncate">DSTruncate</a>(pep->ds,k+l);
-<a name="line880">880: </a>        <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(pep->ds,&newn,NULL,NULL,NULL,NULL);
-<a name="line881">881: </a>        l = newn-k;
-<a name="line882">882: </a>      }
-<a name="line883">883: </a>    }
-<a name="line884">884: </a>    nconv = k;
-<a name="line885">885: </a>    <font color="#B22222">/* decide on deflating Krylov vectors */</font>
-<a name="line886">886: </a>    <font color="#4169E1">if</font> (def) {
-<a name="line887">887: </a>      PEPLookfordeflation(pep,&nl);
-<a name="line888">888: </a>      nl = PetscMin(nl,k-pep->nconv);
-<a name="line889">889: </a>      <font color="#4169E1">if</font> (ctx->lock && pep->reason == PEP_CONVERGED_ITERATING && !breakdown) { 
-<a name="line890">890: </a>        k = pep->nconv+nl; l = newn-k;
-<a name="line891">891: </a>      }
-<a name="line892">892: </a>    } <font color="#4169E1">else</font> nl = k-pep->nconv;
-
-<a name="line894">894: </a>    <font color="#4169E1">if</font> (!ctx->lock && pep->reason == PEP_CONVERGED_ITERATING && !breakdown) { l += k; k = 0; } <font color="#B22222">/* non-locking variant: reset no. of converged pairs */</font>
-
-<a name="line896">896: </a>    <font color="#B22222">/* update S */</font>
-<a name="line897">897: </a>    off = pep->nconv*ldds;
-<a name="line898">898: </a>    <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line899">899: </a>    PEPTOARSupdate(S,ld,deg,nq,pep->nconv,k+l-pep->nconv,nv,Q+off,ldds,work+nwu,lwa-nwu);
-<a name="line900">900: </a>    <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
-
-<a name="line902">902: </a>    <font color="#B22222">/* copy last column of S */</font>
-<a name="line903">903: </a>    PetscMemcpy(S+lds*(k+l),S+lds*nv,lds*<font color="#4169E1">sizeof</font>(PetscScalar));
-
-<a name="line905">905: </a>    <font color="#4169E1">if</font> (breakdown) {
-<a name="line906">906: </a>      <font color="#B22222">/* stop if breakdown */</font>
-<a name="line907">907: </a>      PetscInfo2(pep,<font color="#666666">"Breakdown TOAR method (it=%D norm=%g)\n"</font>,pep->its,(double)beta);
-<a name="line908">908: </a>      pep->reason = PEP_DIVERGED_BREAKDOWN;
-<a name="line909">909: </a>    }
-<a name="line910">910: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING) {l--; flg = PETSC_TRUE;}
-<a name="line911">911: </a>    <font color="#4169E1">else</font> flg = PETSC_FALSE;
-<a name="line912">912: </a>    <font color="#B22222">/* truncate S */</font>
-<a name="line913">913: </a>    <font color="#4169E1">if</font> (k+l+deg<nq) {
-<a name="line914">914: </a>      <font color="#4169E1">if</font> (!falselock && ctx->lock) {
-<a name="line915">915: </a>        newc = flg?k-pep->nconv:nl;
-<a name="line916">916: </a>        PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,locked,newc,flg,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);
-<a name="line917">917: </a>        locked += newc;
-<a name="line918">918: </a>      } <font color="#4169E1">else</font> {
-<a name="line919">919: </a>        PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,0,0,flg,work+nwu,lwa-nwu,rwork+nrwu,lrwa-nrwu);
-<a name="line920">920: </a>      }
-<a name="line921">921: </a>    }
-<a name="line922">922: </a>    pep->nconv = k;
-<a name="line923">923: </a>    PEPMonitor(pep,pep->its,nconv,pep->eigr,pep->eigi,pep->errest,nv);
-<a name="line924">924: </a>  }
-<a name="line925">925: </a>  <font color="#4169E1">if</font> (pep->nconv>0) {
-<a name="line926">926: </a>    <font color="#B22222">/* {V*S_nconv^i}_{i=0}^{d-1} has rank nconv instead of nconv+d-1. Force zeros in each S_nconv^i block */</font>
-<a name="line927">927: </a>    nq = pep->nconv;
-
-<a name="line929">929: </a>    <font color="#B22222">/* perform Newton refinement if required */</font>
-<a name="line930">930: </a>    <font color="#4169E1">if</font> (pep->refine==PEP_REFINE_MULTIPLE && pep->rits>0) {
-<a name="line931">931: </a>      <font color="#B22222">/* extract invariant pair */</font>
-<a name="line932">932: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line933">933: </a>      PEPExtractInvariantPair(pep,sigma,nq,pep->nconv,S,ld,deg,H,ldds,work+nwu,lwa-nwu);
-<a name="line934">934: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
-<a name="line935">935: </a>      <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line936">936: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line937">937: </a>      PEPNewtonRefinement_TOAR(pep,sigma,&pep->rits,NULL,pep->nconv,S,lds,&nq);
-<a name="line938">938: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
-<a name="line939">939: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
-<a name="line940">940: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line941">941: </a>      PEPTOARSupdate(S,ld,deg,nq,0,pep->nconv,pep->nconv,Q,ldds,work+nwu,lwa-nwu);
-<a name="line942">942: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
-<a name="line943">943: </a>    } <font color="#4169E1">else</font> {
-<a name="line944">944: </a>      <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line945">945: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-<a name="line946">946: </a>    }
-<a name="line947">947: </a>  }
-<a name="line948">948: </a>  <font color="#4169E1">if</font> (pep->refine!=PEP_REFINE_MULTIPLE || pep->rits==0) {
-<a name="line949">949: </a>    <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line950">950: </a>    <font color="#4169E1">if</font> (!flg) {
-<a name="line951">951: </a>      <font color="#4169E1">if</font> (pep->ops->backtransform) {
-<a name="line952">952: </a>        (*pep->ops->backtransform)(pep);
-<a name="line953">953: </a>      }
-<a name="line954">954: </a>      <font color="#B22222">/* restore original values */</font>
-<a name="line955">955: </a>      pep->target *= pep->sfactor;
-<a name="line956">956: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,pep->sfactor);
-<a name="line957">957: </a>    } <font color="#4169E1">else</font> {
-<a name="line958">958: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);
-<a name="line959">959: </a>    }
-<a name="line960">960: </a>    <a href="../../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,1.0);
-<a name="line961">961: </a>    <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
-<a name="line962">962: </a>      <font color="#4169E1">for</font> (j=0;j<pep->nconv;j++) {
-<a name="line963">963: </a>        pep->eigr[j] *= pep->sfactor;
-<a name="line964">964: </a>        pep->eigi[j] *= pep->sfactor;
-<a name="line965">965: </a>      }
-<a name="line966">966: </a>      <font color="#B22222">/* restore original values */</font>
-<a name="line967">967: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++){
-<a name="line968">968: </a>        pep->pbc[pep->nmat+i] *= pep->sfactor;
-<a name="line969">969: </a>        pep->pbc[2*pep->nmat+i] *= pep->sfactor*pep->sfactor;
-<a name="line970">970: </a>      }
-<a name="line971">971: </a>    }
-<a name="line972">972: </a>  }
-
-<a name="line974">974: </a>  <font color="#B22222">/* change the state to raw so that <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
-<a name="line975">975: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
-<a name="line976">976: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
-
-<a name="line978">978: </a>  PetscFree2(work,rwork);
-<a name="line979">979: </a>  <font color="#4169E1">return</font>(0);
-<a name="line980">980: </a>}
-
-<a name="line984">984: </a><strong><font color="#4169E1"><a name="PEPTOARSetRestart_TOAR"></a>static PetscErrorCode PEPTOARSetRestart_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
-<a name="line985">985: </a>{
-<a name="line986">986: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
-
-<a name="line989">989: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
-<a name="line990">990: </a>  <font color="#4169E1">else</font> {
-<a name="line991">991: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
-<a name="line992">992: </a>    ctx->keep = keep;
-<a name="line993">993: </a>  }
-<a name="line994">994: </a>  <font color="#4169E1">return</font>(0);
-<a name="line995">995: </a>}
-
-<a name="line999">999: </a><font color="#B22222">/*@</font>
-<a name="line1000">1000: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a> - Sets the restart parameter for the TOAR</font>
-<a name="line1001">1001: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
-<a name="line1002">1002: </a><font color="#B22222">   after restart.</font>
-
-<a name="line1004">1004: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line1006">1006: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1007">1007: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line1008">1008: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
-
-<a name="line1010">1010: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line1011">1011: </a><font color="#B22222">.  -pep_toar_restart - Sets the restart parameter</font>
-
-<a name="line1013">1013: </a><font color="#B22222">   Notes:</font>
-<a name="line1014">1014: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
-
-<a name="line1016">1016: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1018">1018: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a>()</font>
-<a name="line1019">1019: </a><font color="#B22222">@*/</font>
-<a name="line1020">1020: </a><strong><font color="#4169E1"><a name="PEPTOARSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
-<a name="line1021">1021: </a>{
-
-<a name="line1027">1027: </a>  PetscTryMethod(pep,<font color="#666666">"PEPTOARSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal),(pep,keep));
-<a name="line1028">1028: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1029">1029: </a>}
-
-<a name="line1033">1033: </a><strong><font color="#4169E1"><a name="PEPTOARGetRestart_TOAR"></a>static PetscErrorCode PEPTOARGetRestart_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
-<a name="line1034">1034: </a>{
-<a name="line1035">1035: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
-
-<a name="line1038">1038: </a>  *keep = ctx->keep;
-<a name="line1039">1039: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1040">1040: </a>}
-
-<a name="line1044">1044: </a><font color="#B22222">/*@</font>
-<a name="line1045">1045: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a> - Gets the restart parameter used in the TOAR method.</font>
-
-<a name="line1047">1047: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1049">1049: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1050">1050: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line1052">1052: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1053">1053: </a><font color="#B22222">.  keep - the restart parameter</font>
-
-<a name="line1055">1055: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1057">1057: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>()</font>
-<a name="line1058">1058: </a><font color="#B22222">@*/</font>
-<a name="line1059">1059: </a><strong><font color="#4169E1"><a name="PEPTOARGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
-<a name="line1060">1060: </a>{
-
-<a name="line1066">1066: </a>  PetscTryMethod(pep,<font color="#666666">"PEPTOARGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*),(pep,keep));
-<a name="line1067">1067: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1068">1068: </a>}
-
-<a name="line1072">1072: </a><strong><font color="#4169E1"><a name="PEPTOARSetLocking_TOAR"></a>static PetscErrorCode PEPTOARSetLocking_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
-<a name="line1073">1073: </a>{
-<a name="line1074">1074: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
-
-<a name="line1077">1077: </a>  ctx->lock = lock;
-<a name="line1078">1078: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1079">1079: </a>}
-
-<a name="line1083">1083: </a><font color="#B22222">/*@</font>
-<a name="line1084">1084: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a> - Choose between locking and non-locking variants of</font>
-<a name="line1085">1085: </a><font color="#B22222">   the TOAR method.</font>
-
-<a name="line1087">1087: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line1089">1089: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1090">1090: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line1091">1091: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
-
-<a name="line1093">1093: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line1094">1094: </a><font color="#B22222">.  -pep_toar_locking - Sets the locking flag</font>
-
-<a name="line1096">1096: </a><font color="#B22222">   Notes:</font>
-<a name="line1097">1097: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
-<a name="line1098">1098: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
-<a name="line1099">1099: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
-<a name="line1100">1100: </a><font color="#B22222">   non-locking variant).</font>
-
-<a name="line1102">1102: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1104">1104: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a>()</font>
-<a name="line1105">1105: </a><font color="#B22222">@*/</font>
-<a name="line1106">1106: </a><strong><font color="#4169E1"><a name="PEPTOARSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
-<a name="line1107">1107: </a>{
-
-<a name="line1113">1113: </a>  PetscTryMethod(pep,<font color="#666666">"PEPTOARSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,lock));
-<a name="line1114">1114: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1115">1115: </a>}
-
-<a name="line1119">1119: </a><strong><font color="#4169E1"><a name="PEPTOARGetLocking_TOAR"></a>static PetscErrorCode PEPTOARGetLocking_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
-<a name="line1120">1120: </a>{
-<a name="line1121">1121: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
-
-<a name="line1124">1124: </a>  *lock = ctx->lock;
-<a name="line1125">1125: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1126">1126: </a>}
-
-<a name="line1130">1130: </a><font color="#B22222">/*@</font>
-<a name="line1131">1131: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a> - Gets the locking flag used in the TOAR method.</font>
-
-<a name="line1133">1133: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1135">1135: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1136">1136: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
-
-<a name="line1138">1138: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1139">1139: </a><font color="#B22222">.  lock - the locking flag</font>
-
-<a name="line1141">1141: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1143">1143: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>()</font>
-<a name="line1144">1144: </a><font color="#B22222">@*/</font>
-<a name="line1145">1145: </a><strong><font color="#4169E1"><a name="PEPTOARGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
-<a name="line1146">1146: </a>{
-
-<a name="line1152">1152: </a>  PetscTryMethod(pep,<font color="#666666">"PEPTOARGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,lock));
-<a name="line1153">1153: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1154">1154: </a>}
-
-<a name="line1158">1158: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_TOAR"></a>PetscErrorCode PEPSetFromOptions_TOAR(PetscOptions *PetscOptionsObject,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line1159">1159: </a>{
-<a name="line1161">1161: </a>  PetscBool      flg,lock;
-<a name="line1162">1162: </a>  PetscReal      keep;
-
-<a name="line1165">1165: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> TOAR Options"</font>);
-<a name="line1166">1166: </a>  PetscOptionsReal(<font color="#666666">"-pep_toar_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>"</font>,0.5,&keep,&flg);
-<a name="line1167">1167: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1168">1168: </a>    <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>(pep,keep);
-<a name="line1169">1169: </a>  }
-<a name="line1170">1170: </a>  PetscOptionsBool(<font color="#666666">"-pep_toar_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>"</font>,PETSC_FALSE,&lock,&flg);
-<a name="line1171">1171: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1172">1172: </a>    <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>(pep,lock);
-<a name="line1173">1173: </a>  }
-<a name="line1174">1174: </a>  PetscOptionsTail();
-<a name="line1175">1175: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1176">1176: </a>}
-
-<a name="line1180">1180: </a><strong><font color="#4169E1"><a name="PEPView_TOAR"></a>PetscErrorCode PEPView_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line1181">1181: </a>{
-<a name="line1183">1183: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
-<a name="line1184">1184: </a>  PetscBool      isascii;
-
-<a name="line1187">1187: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line1188">1188: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line1189">1189: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  TOAR: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
-<a name="line1190">1190: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  TOAR: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
-<a name="line1191">1191: </a>  }
-<a name="line1192">1192: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1193">1193: </a>}
-
-<a name="line1197">1197: </a><strong><font color="#4169E1"><a name="PEPDestroy_TOAR"></a>PetscErrorCode PEPDestroy_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line1198">1198: </a>{
-
-<a name="line1202">1202: </a>  PetscFree(pep->data);
-<a name="line1203">1203: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetRestart_C"</font>,NULL);
-<a name="line1204">1204: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetRestart_C"</font>,NULL);
-<a name="line1205">1205: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetLocking_C"</font>,NULL);
-<a name="line1206">1206: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetLocking_C"</font>,NULL);
-<a name="line1207">1207: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1208">1208: </a>}
-
-<a name="line1212">1212: </a><strong><font color="#4169E1"><a name="PEPCreate_TOAR"></a>PETSC_EXTERN PetscErrorCode PEPCreate_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line1213">1213: </a>{
-<a name="line1214">1214: </a>  PEP_TOAR       *ctx;
-
-<a name="line1218">1218: </a>  PetscNewLog(pep,&ctx);
-<a name="line1219">1219: </a>  pep->data = (void*)ctx;
-<a name="line1220">1220: </a>  ctx->lock = PETSC_TRUE;
-
-<a name="line1222">1222: </a>  pep->ops->solve          = PEPSolve_TOAR;
-<a name="line1223">1223: </a>  pep->ops->setup          = PEPSetUp_TOAR;
-<a name="line1224">1224: </a>  pep->ops->setfromoptions = PEPSetFromOptions_TOAR;
-<a name="line1225">1225: </a>  pep->ops->destroy        = PEPDestroy_TOAR;
-<a name="line1226">1226: </a>  pep->ops->view           = PEPView_TOAR;
-<a name="line1227">1227: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
-<a name="line1228">1228: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
-<a name="line1229">1229: </a>  pep->ops->extractvectors = PEPExtractVectors_TOAR;
-<a name="line1230">1230: </a>  pep->ops->reset          = PEPReset_TOAR;
-<a name="line1231">1231: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetRestart_C"</font>,PEPTOARSetRestart_TOAR);
-<a name="line1232">1232: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetRestart_C"</font>,PEPTOARGetRestart_TOAR);
-<a name="line1233">1233: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetLocking_C"</font>,PEPTOARSetLocking_TOAR);
-<a name="line1234">1234: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetLocking_C"</font>,PEPTOARGetLocking_TOAR);
-<a name="line1235">1235: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1236">1236: </a>}
+<a name="line862">862: </a>    <font color="#4169E1">if</font> (pep->reason != PEP_CONVERGED_ITERATING) {l--; flg = PETSC_TRUE;}
+<a name="line863">863: </a>    <font color="#4169E1">else</font> flg = PETSC_FALSE;
+<a name="line864">864: </a>    <font color="#B22222">/* truncate S */</font>
+<a name="line865">865: </a>    <font color="#4169E1">if</font> (k+l+deg<nq) {
+<a name="line866">866: </a>      <font color="#4169E1">if</font> (!falselock && ctx->lock) {
+<a name="line867">867: </a>        newc = k-pep->nconv;
+<a name="line868">868: </a>        PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,locked,newc,flg,work+nwu,rwork+nrwu);
+<a name="line869">869: </a>        locked += newc;
+<a name="line870">870: </a>      } <font color="#4169E1">else</font> {
+<a name="line871">871: </a>        PEPTOARTrunc(pep,S,ld,deg,&nq,k+l+1,0,0,flg,work+nwu,rwork+nrwu);
+<a name="line872">872: </a>      }
+<a name="line873">873: </a>    }
+<a name="line874">874: </a>    pep->nconv = k;
+<a name="line875">875: </a>    PEPMonitor(pep,pep->its,nconv,pep->eigr,pep->eigi,pep->errest,nv);
+<a name="line876">876: </a>  }
+<a name="line877">877: </a>  <font color="#4169E1">if</font> (pep->nconv>0) {
+<a name="line878">878: </a>    <font color="#B22222">/* {V*S_nconv^i}_{i=0}^{d-1} has rank nconv instead of nconv+d-1. Force zeros in each S_nconv^i block */</font>
+<a name="line879">879: </a>    nq = pep->nconv;
+
+<a name="line881">881: </a>    <font color="#B22222">/* perform Newton refinement if required */</font>
+<a name="line882">882: </a>    <font color="#4169E1">if</font> (pep->refine==PEP_REFINE_MULTIPLE && pep->rits>0) {
+<a name="line883">883: </a>      <font color="#B22222">/* extract invariant pair */</font>
+<a name="line884">884: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line885">885: </a>      PEPExtractInvariantPair(pep,sigma,nq,pep->nconv,S,ld,deg,H,ldds,work+nwu);
+<a name="line886">886: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_A,&H);
+<a name="line887">887: </a>      <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
+<a name="line888">888: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line889">889: </a>      PEPNewtonRefinement_TOAR(pep,sigma,&pep->rits,NULL,pep->nconv,S,lds,&nq);
+<a name="line890">890: </a>      <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(pep->ds,pep->eigr,pep->eigi);
+<a name="line891">891: </a>      <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(pep->ds,pep->eigr,pep->eigi,NULL,NULL,NULL);
+<a name="line892">892: </a>      <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line893">893: </a>      PEPTOARSupdate(S,ld,deg,nq,0,pep->nconv,pep->nconv,Q,ldds,work+nwu);
+<a name="line894">894: </a>      <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(pep->ds,DS_MAT_Q,&Q);
+<a name="line895">895: </a>    } <font color="#4169E1">else</font> {
+<a name="line896">896: </a>      <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
+<a name="line897">897: </a>      <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+<a name="line898">898: </a>    }
+<a name="line899">899: </a>  }
+<a name="line900">900: </a>  <font color="#4169E1">if</font> (pep->refine!=PEP_REFINE_MULTIPLE || pep->rits==0) {
+<a name="line901">901: </a>    <a href="../../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line902">902: </a>    <font color="#4169E1">if</font> (!flg) {
+<a name="line903">903: </a>      <font color="#4169E1">if</font> (pep->ops->backtransform) {
+<a name="line904">904: </a>        (*pep->ops->backtransform)(pep);
+<a name="line905">905: </a>      }
+<a name="line906">906: </a>      <font color="#B22222">/* restore original values */</font>
+<a name="line907">907: </a>      pep->target *= pep->sfactor;
+<a name="line908">908: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,pep->sfactor);
+<a name="line909">909: </a>    } <font color="#4169E1">else</font> {
+<a name="line910">910: </a>      <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,sinv?1.0/pep->sfactor:pep->sfactor);
+<a name="line911">911: </a>    }
+<a name="line912">912: </a>    <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
+<a name="line913">913: </a>      <font color="#4169E1">for</font> (j=0;j<pep->nconv;j++) {
+<a name="line914">914: </a>        pep->eigr[j] *= pep->sfactor;
+<a name="line915">915: </a>        pep->eigi[j] *= pep->sfactor;
+<a name="line916">916: </a>      }
+<a name="line917">917: </a>      <font color="#B22222">/* restore original values */</font>
+<a name="line918">918: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++){
+<a name="line919">919: </a>        pep->pbc[pep->nmat+i] *= pep->sfactor;
+<a name="line920">920: </a>        pep->pbc[2*pep->nmat+i] *= pep->sfactor*pep->sfactor;
+<a name="line921">921: </a>      }
+<a name="line922">922: </a>    }
+<a name="line923">923: </a>  }
+<a name="line924">924: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) { <a href="../../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(pep->rg); }
+
+<a name="line926">926: </a>  <font color="#B22222">/* change the state to raw so that <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() computes eigenvectors from scratch */</font>
+<a name="line927">927: </a>  <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(pep->ds,pep->nconv,0,0,0);
+<a name="line928">928: </a>  <a href="../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(pep->ds,DS_STATE_RAW);
+
+<a name="line930">930: </a>  PetscFree2(work,rwork);
+<a name="line931">931: </a>  <font color="#4169E1">return</font>(0);
+<a name="line932">932: </a>}
+
+<a name="line936">936: </a><strong><font color="#4169E1"><a name="PEPTOARSetRestart_TOAR"></a>static PetscErrorCode PEPTOARSetRestart_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
+<a name="line937">937: </a>{
+<a name="line938">938: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
+
+<a name="line941">941: </a>  <font color="#4169E1">if</font> (keep==PETSC_DEFAULT) ctx->keep = 0.5;
+<a name="line942">942: </a>  <font color="#4169E1">else</font> {
+<a name="line943">943: </a>    <font color="#4169E1">if</font> (keep<0.1 || keep>0.9) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The keep argument must be in the range [0.1,0.9]"</font>);
+<a name="line944">944: </a>    ctx->keep = keep;
+<a name="line945">945: </a>  }
+<a name="line946">946: </a>  <font color="#4169E1">return</font>(0);
+<a name="line947">947: </a>}
+
+<a name="line951">951: </a><font color="#B22222">/*@</font>
+<a name="line952">952: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a> - Sets the restart parameter for the TOAR</font>
+<a name="line953">953: </a><font color="#B22222">   method, in particular the proportion of basis vectors that must be kept</font>
+<a name="line954">954: </a><font color="#B22222">   after restart.</font>
+
+<a name="line956">956: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line958">958: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line959">959: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line960">960: </a><font color="#B22222">-  keep - the number of vectors to be kept at restart</font>
+
+<a name="line962">962: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line963">963: </a><font color="#B22222">.  -pep_toar_restart - Sets the restart parameter</font>
+
+<a name="line965">965: </a><font color="#B22222">   Notes:</font>
+<a name="line966">966: </a><font color="#B22222">   Allowed values are in the range [0.1,0.9]. The default is 0.5.</font>
+
+<a name="line968">968: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line970">970: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a>()</font>
+<a name="line971">971: </a><font color="#B22222">@*/</font>
+<a name="line972">972: </a><strong><font color="#4169E1"><a name="PEPTOARSetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal keep)</font></strong>
+<a name="line973">973: </a>{
+
+<a name="line979">979: </a>  PetscTryMethod(pep,<font color="#666666">"PEPTOARSetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal),(pep,keep));
+<a name="line980">980: </a>  <font color="#4169E1">return</font>(0);
+<a name="line981">981: </a>}
+
+<a name="line985">985: </a><strong><font color="#4169E1"><a name="PEPTOARGetRestart_TOAR"></a>static PetscErrorCode PEPTOARGetRestart_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
+<a name="line986">986: </a>{
+<a name="line987">987: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
+
+<a name="line990">990: </a>  *keep = ctx->keep;
+<a name="line991">991: </a>  <font color="#4169E1">return</font>(0);
+<a name="line992">992: </a>}
+
+<a name="line996">996: </a><font color="#B22222">/*@</font>
+<a name="line997">997: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a> - Gets the restart parameter used in the TOAR method.</font>
+
+<a name="line999">999: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1001">1001: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1002">1002: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
+
+<a name="line1004">1004: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1005">1005: </a><font color="#B22222">.  keep - the restart parameter</font>
+
+<a name="line1007">1007: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1009">1009: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>()</font>
+<a name="line1010">1010: </a><font color="#B22222">@*/</font>
+<a name="line1011">1011: </a><strong><font color="#4169E1"><a name="PEPTOARGetRestart"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARGetRestart.html#PEPTOARGetRestart">PEPTOARGetRestart</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *keep)</font></strong>
+<a name="line1012">1012: </a>{
+
+<a name="line1018">1018: </a>  PetscUseMethod(pep,<font color="#666666">"PEPTOARGetRestart_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscReal*),(pep,keep));
+<a name="line1019">1019: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1020">1020: </a>}
+
+<a name="line1024">1024: </a><strong><font color="#4169E1"><a name="PEPTOARSetLocking_TOAR"></a>static PetscErrorCode PEPTOARSetLocking_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
+<a name="line1025">1025: </a>{
+<a name="line1026">1026: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
+
+<a name="line1029">1029: </a>  ctx->lock = lock;
+<a name="line1030">1030: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1031">1031: </a>}
+
+<a name="line1035">1035: </a><font color="#B22222">/*@</font>
+<a name="line1036">1036: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a> - Choose between locking and non-locking variants of</font>
+<a name="line1037">1037: </a><font color="#B22222">   the TOAR method.</font>
+
+<a name="line1039">1039: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line1041">1041: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1042">1042: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line1043">1043: </a><font color="#B22222">-  lock - true if the locking variant must be selected</font>
+
+<a name="line1045">1045: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line1046">1046: </a><font color="#B22222">.  -pep_toar_locking - Sets the locking flag</font>
+
+<a name="line1048">1048: </a><font color="#B22222">   Notes:</font>
+<a name="line1049">1049: </a><font color="#B22222">   The default is to lock converged eigenpairs when the method restarts.</font>
+<a name="line1050">1050: </a><font color="#B22222">   This behaviour can be changed so that all directions are kept in the</font>
+<a name="line1051">1051: </a><font color="#B22222">   working subspace even if already converged to working accuracy (the</font>
+<a name="line1052">1052: </a><font color="#B22222">   non-locking variant).</font>
+
+<a name="line1054">1054: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1056">1056: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a>()</font>
+<a name="line1057">1057: </a><font color="#B22222">@*/</font>
+<a name="line1058">1058: </a><strong><font color="#4169E1"><a name="PEPTOARSetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool lock)</font></strong>
+<a name="line1059">1059: </a>{
+
+<a name="line1065">1065: </a>  PetscTryMethod(pep,<font color="#666666">"PEPTOARSetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,lock));
+<a name="line1066">1066: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1067">1067: </a>}
+
+<a name="line1071">1071: </a><strong><font color="#4169E1"><a name="PEPTOARGetLocking_TOAR"></a>static PetscErrorCode PEPTOARGetLocking_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
+<a name="line1072">1072: </a>{
+<a name="line1073">1073: </a>  PEP_TOAR *ctx = (PEP_TOAR*)pep->data;
+
+<a name="line1076">1076: </a>  *lock = ctx->lock;
+<a name="line1077">1077: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1078">1078: </a>}
+
+<a name="line1082">1082: </a><font color="#B22222">/*@</font>
+<a name="line1083">1083: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a> - Gets the locking flag used in the TOAR method.</font>
+
+<a name="line1085">1085: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1087">1087: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1088">1088: </a><font color="#B22222">.  pep - the eigenproblem solver context</font>
+
+<a name="line1090">1090: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1091">1091: </a><font color="#B22222">.  lock - the locking flag</font>
+
+<a name="line1093">1093: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1095">1095: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>()</font>
+<a name="line1096">1096: </a><font color="#B22222">@*/</font>
+<a name="line1097">1097: </a><strong><font color="#4169E1"><a name="PEPTOARGetLocking"></a>PetscErrorCode <a href="../../../../../docs/manualpages/PEP/PEPTOARGetLocking.html#PEPTOARGetLocking">PEPTOARGetLocking</a>(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *lock)</font></strong>
+<a name="line1098">1098: </a>{
+
+<a name="line1104">1104: </a>  PetscUseMethod(pep,<font color="#666666">"PEPTOARGetLocking_C"</font>,(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,lock));
+<a name="line1105">1105: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1106">1106: </a>}
+
+<a name="line1110">1110: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_TOAR"></a>PetscErrorCode PEPSetFromOptions_TOAR(PetscOptionItems *PetscOptionsObject,<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1111">1111: </a>{
+<a name="line1113">1113: </a>  PetscBool      flg,lock;
+<a name="line1114">1114: </a>  PetscReal      keep;
+
+<a name="line1117">1117: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> TOAR Options"</font>);
+<a name="line1118">1118: </a>  PetscOptionsReal(<font color="#666666">"-pep_toar_restart"</font>,<font color="#666666">"Proportion of vectors kept after restart"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>"</font>,0.5,&keep,&flg);
+<a name="line1119">1119: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1120">1120: </a>    <a href="../../../../../docs/manualpages/PEP/PEPTOARSetRestart.html#PEPTOARSetRestart">PEPTOARSetRestart</a>(pep,keep);
+<a name="line1121">1121: </a>  }
+<a name="line1122">1122: </a>  PetscOptionsBool(<font color="#666666">"-pep_toar_locking"</font>,<font color="#666666">"Choose between locking and non-locking variants"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>"</font>,PETSC_FALSE,&lock,&flg);
+<a name="line1123">1123: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1124">1124: </a>    <a href="../../../../../docs/manualpages/PEP/PEPTOARSetLocking.html#PEPTOARSetLocking">PEPTOARSetLocking</a>(pep,lock);
+<a name="line1125">1125: </a>  }
+<a name="line1126">1126: </a>  PetscOptionsTail();
+<a name="line1127">1127: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1128">1128: </a>}
+
+<a name="line1132">1132: </a><strong><font color="#4169E1"><a name="PEPView_TOAR"></a>PetscErrorCode PEPView_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line1133">1133: </a>{
+<a name="line1135">1135: </a>  PEP_TOAR       *ctx = (PEP_TOAR*)pep->data;
+<a name="line1136">1136: </a>  PetscBool      isascii;
+
+<a name="line1139">1139: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line1140">1140: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line1141">1141: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  TOAR: %d%% of basis vectors kept after restart\n"</font>,(int)(100*ctx->keep));
+<a name="line1142">1142: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  TOAR: using the %slocking variant\n"</font>,ctx->lock?<font color="#666666">""</font>:<font color="#666666">"non-"</font>);
+<a name="line1143">1143: </a>  }
+<a name="line1144">1144: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1145">1145: </a>}
+
+<a name="line1149">1149: </a><strong><font color="#4169E1"><a name="PEPDestroy_TOAR"></a>PetscErrorCode PEPDestroy_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1150">1150: </a>{
+
+<a name="line1154">1154: </a>  PetscFree(pep->data);
+<a name="line1155">1155: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetRestart_C"</font>,NULL);
+<a name="line1156">1156: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetRestart_C"</font>,NULL);
+<a name="line1157">1157: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetLocking_C"</font>,NULL);
+<a name="line1158">1158: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetLocking_C"</font>,NULL);
+<a name="line1159">1159: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1160">1160: </a>}
+
+<a name="line1164">1164: </a><strong><font color="#4169E1"><a name="PEPCreate_TOAR"></a>PETSC_EXTERN PetscErrorCode PEPCreate_TOAR(<a href="../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1165">1165: </a>{
+<a name="line1166">1166: </a>  PEP_TOAR       *ctx;
+
+<a name="line1170">1170: </a>  PetscNewLog(pep,&ctx);
+<a name="line1171">1171: </a>  pep->data = (void*)ctx;
+<a name="line1172">1172: </a>  ctx->lock = PETSC_TRUE;
+
+<a name="line1174">1174: </a>  pep->ops->solve          = PEPSolve_TOAR;
+<a name="line1175">1175: </a>  pep->ops->setup          = PEPSetUp_TOAR;
+<a name="line1176">1176: </a>  pep->ops->setfromoptions = PEPSetFromOptions_TOAR;
+<a name="line1177">1177: </a>  pep->ops->destroy        = PEPDestroy_TOAR;
+<a name="line1178">1178: </a>  pep->ops->view           = PEPView_TOAR;
+<a name="line1179">1179: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
+<a name="line1180">1180: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
+<a name="line1181">1181: </a>  pep->ops->extractvectors = PEPExtractVectors_TOAR;
+<a name="line1182">1182: </a>  pep->ops->reset          = PEPReset_TOAR;
+<a name="line1183">1183: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetRestart_C"</font>,PEPTOARSetRestart_TOAR);
+<a name="line1184">1184: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetRestart_C"</font>,PEPTOARGetRestart_TOAR);
+<a name="line1185">1185: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARSetLocking_C"</font>,PEPTOARSetLocking_TOAR);
+<a name="line1186">1186: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPTOARGetLocking_C"</font>,PEPTOARGetLocking_TOAR);
+<a name="line1187">1187: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1188">1188: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/impls/linear/index.html b/src/pep/impls/linear/index.html
index 88ead23..1283999 100644
--- a/src/pep/impls/linear/index.html
+++ b/src/pep/impls/linear/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/linear/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/linear/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/impls/linear/linear.c b/src/pep/impls/linear/linear.c
index 6344ca2..33de387 100644
--- a/src/pep/impls/linear/linear.c
+++ b/src/pep/impls/linear/linear.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -276,6 +276,7 @@ PetscErrorCode PEPSetUp_Linear(PEP pep)
   };
 
   PetscFunctionBegin;
+  if (pep->stopping!=PEPStoppingBasic) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"User-defined stopping test not supported");
   pep->lineariz = PETSC_TRUE;
   if (!ctx->cform) ctx->cform = 1;
   ierr = STGetTransform(pep->st,&transf);CHKERRQ(ierr);
@@ -293,12 +294,12 @@ PetscErrorCode PEPSetUp_Linear(PEP pep)
   ierr = PEPComputeScaleFactor(pep);CHKERRQ(ierr);
 
   if (ctx->explicitmatrix) {
-    if (transf) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Explicit matrix option is not implemented with st-tranform flag active");
+    if (transf) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Explicit matrix option is not implemented with st-transform flag active");
     if (pep->nmat!=3) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Explicit matrix option only available for quadratic problems");
     if (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Explicit matrix option not implemented for non-monomial bases");
     if (pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Diagonal scaling not allowed in PEPLINEAR with explicit matrices");
     if (sinv && !transf) { ierr = STSetType(st,STSINVERT);CHKERRQ(ierr); }
-    ierr = RGSetScale(pep->rg,pep->sfactor);CHKERRQ(ierr);
+    ierr = RGPushScale(pep->rg,1.0/pep->sfactor);CHKERRQ(ierr);
     ierr = STGetTOperators(pep->st,0,&ctx->K);CHKERRQ(ierr);
     ierr = STGetTOperators(pep->st,1,&ctx->C);CHKERRQ(ierr);
     ierr = STGetTOperators(pep->st,2,&ctx->M);CHKERRQ(ierr);
@@ -326,7 +327,7 @@ PetscErrorCode PEPSetUp_Linear(PEP pep)
     ierr = PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->B);CHKERRQ(ierr);
 
   } else {   /* implicit matrix */
-    if (pep->problem_type!=PEP_GENERAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Must use the explicit matrix option");
+    if (pep->problem_type!=PEP_GENERAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"Must use the explicit matrix option if problem type is not general");
     if (!((PetscObject)(ctx->eps))->type_name) {
       ierr = EPSSetType(ctx->eps,EPSKRYLOVSCHUR);CHKERRQ(ierr);
     } else {
@@ -365,7 +366,7 @@ PetscErrorCode PEPSetUp_Linear(PEP pep)
         pep->solvematcoeffs[deg] = 1.0;
       }
       ierr = STScaleShift(pep->st,1.0/pep->sfactor);CHKERRQ(ierr);
-      ierr = RGSetScale(pep->rg,pep->sfactor);CHKERRQ(ierr);
+      ierr = RGPushScale(pep->rg,1.0/pep->sfactor);CHKERRQ(ierr);
     }
     if (pep->sfactor!=1.0) {
       for (i=0;i<pep->nmat;i++) {
@@ -728,8 +729,8 @@ PetscErrorCode PEPSolve_Linear(PEP pep)
     if (!flg && !ctx->explicitmatrix) {
       ierr = STScaleShift(pep->st,pep->sfactor);CHKERRQ(ierr);
     } 
-    ierr = RGSetScale(pep->rg,1.0);CHKERRQ(ierr);
   }
+  ierr = RGPopScale(pep->rg);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -756,7 +757,7 @@ static PetscErrorCode EPSMonitor_Linear(EPS eps,PetscInt its,PetscInt nconv,Pets
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetFromOptions_Linear"
-PetscErrorCode PEPSetFromOptions_Linear(PetscOptions *PetscOptionsObject,PEP pep)
+PetscErrorCode PEPSetFromOptions_Linear(PetscOptionItems *PetscOptionsObject,PEP pep)
 {
   PetscErrorCode ierr;
   PetscBool      set,val;
@@ -861,7 +862,7 @@ PetscErrorCode PEPLinearGetCompanionForm(PEP pep,PetscInt *cform)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidIntPointer(cform,2);
-  ierr = PetscTryMethod(pep,"PEPLinearGetCompanionForm_C",(PEP,PetscInt*),(pep,cform));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPLinearGetCompanionForm_C",(PEP,PetscInt*),(pep,cform));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -942,7 +943,7 @@ PetscErrorCode PEPLinearGetExplicitMatrix(PEP pep,PetscBool *explicitmatrix)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(explicitmatrix,2);
-  ierr = PetscTryMethod(pep,"PEPLinearGetExplicitMatrix_C",(PEP,PetscBool*),(pep,explicitmatrix));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPLinearGetExplicitMatrix_C",(PEP,PetscBool*),(pep,explicitmatrix));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1002,7 +1003,7 @@ static PetscErrorCode PEPLinearGetEPS_Linear(PEP pep,EPS *eps)
   if (!ctx->eps) {
     ierr = EPSCreate(PetscObjectComm((PetscObject)pep),&ctx->eps);CHKERRQ(ierr);
     ierr = EPSSetOptionsPrefix(ctx->eps,((PetscObject)pep)->prefix);CHKERRQ(ierr);
-    ierr = EPSAppendOptionsPrefix(ctx->eps,"pep_");CHKERRQ(ierr);
+    ierr = EPSAppendOptionsPrefix(ctx->eps,"pep_linear_");CHKERRQ(ierr);
     ierr = EPSGetST(ctx->eps,&st);CHKERRQ(ierr);
     ierr = STSetOptionsPrefix(st,((PetscObject)ctx->eps)->prefix);CHKERRQ(ierr);
     ierr = PetscObjectIncrementTabLevel((PetscObject)ctx->eps,(PetscObject)pep,1);CHKERRQ(ierr);
@@ -1038,7 +1039,7 @@ PetscErrorCode PEPLinearGetEPS(PEP pep,EPS *eps)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(eps,2);
-  ierr = PetscTryMethod(pep,"PEPLinearGetEPS_C",(PEP,EPS*),(pep,eps));CHKERRQ(ierr);
+  ierr = PetscUseMethod(pep,"PEPLinearGetEPS_C",(PEP,EPS*),(pep,eps));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1048,14 +1049,18 @@ PetscErrorCode PEPView_Linear(PEP pep,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  if (!ctx->eps) { ierr = PEPLinearGetEPS(pep,&ctx->eps);CHKERRQ(ierr); }
-  ierr = PetscViewerASCIIPrintf(viewer,"  Linear: %s matrices\n",ctx->explicitmatrix? "explicit": "implicit");CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPrintf(viewer,"  Linear: %s companion form\n",ctx->cform==1? "1st": "2nd");CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-  ierr = EPSView(ctx->eps,viewer);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!ctx->eps) { ierr = PEPLinearGetEPS(pep,&ctx->eps);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPrintf(viewer,"  Linear: %s matrices\n",ctx->explicitmatrix? "explicit": "implicit");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  Linear: %s companion form\n",ctx->cform==1? "1st": "2nd");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = EPSView(ctx->eps,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/pep/impls/linear/linear.c.html b/src/pep/impls/linear/linear.c.html
index 6bc52ec..6257459 100644
--- a/src/pep/impls/linear/linear.c.html
+++ b/src/pep/impls/linear/linear.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/linear/linear.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:56+00:00">
+<meta name="date" content="2016-05-16T10:33:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/linear/linear.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/linear/linear.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Explicit linearization for polynomial eigenproblems.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -270,759 +270,764 @@
 <a name="line275">275: </a>    { MatCreateExplicit_Linear_H2A, MatCreateExplicit_Linear_H2B }    <font color="#B22222">/* H2 */</font>
 <a name="line276">276: </a>  };
 
-<a name="line279">279: </a>  pep->lineariz = PETSC_TRUE;
-<a name="line280">280: </a>  <font color="#4169E1">if</font> (!ctx->cform) ctx->cform = 1;
-<a name="line281">281: </a>  <a href="../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&transf);
-<a name="line282">282: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line283">283: </a>  <font color="#4169E1">if</font> (!pep->which) {
-<a name="line284">284: </a>    <font color="#4169E1">if</font> (sinv) pep->which = PEP_TARGET_MAGNITUDE;
-<a name="line285">285: </a>    <font color="#4169E1">else</font> pep->which = PEP_LARGEST_MAGNITUDE;
-<a name="line286">286: </a>  }
-<a name="line287">287: </a>  <a href="../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(pep->st);
-<a name="line288">288: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&ctx->eps); }
-<a name="line289">289: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
-<a name="line290">290: </a>  <font color="#4169E1">if</font> (!transf) { <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,pep->target); }
-<a name="line291">291: </a>  <font color="#4169E1">if</font> (sinv && !transf) { <a href="../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(st,pep->target); }
-<a name="line292">292: </a>  <font color="#B22222">/* compute scale factor if not set by user */</font>
-<a name="line293">293: </a>  PEPComputeScaleFactor(pep);
-
-<a name="line295">295: </a>  <font color="#4169E1">if</font> (ctx->explicitmatrix) {
-<a name="line296">296: </a>    <font color="#4169E1">if</font> (transf) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Explicit matrix option is not implemented with st-tranform flag active"</font>);
-<a name="line297">297: </a>    <font color="#4169E1">if</font> (pep->nmat!=3) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Explicit matrix option only available for quadratic problems"</font>);
-<a name="line298">298: </a>    <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Explicit matrix option not implemented for non-monomial bases"</font>);
-<a name="line299">299: </a>    <font color="#4169E1">if</font> (pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Diagonal scaling not allowed in PEPLINEAR with explicit matrices"</font>);
-<a name="line300">300: </a>    <font color="#4169E1">if</font> (sinv && !transf) { <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT); }
-<a name="line301">301: </a>    <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,pep->sfactor);
-<a name="line302">302: </a>    <a href="../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,0,&ctx->K);
-<a name="line303">303: </a>    <a href="../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,1,&ctx->C);
-<a name="line304">304: </a>    <a href="../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,2,&ctx->M);
-<a name="line305">305: </a>    ctx->sfactor = pep->sfactor;
-<a name="line306">306: </a>    ctx->dsfactor = pep->dsfactor;
-<a name="line307">307: </a>  
-<a name="line308">308: </a>    MatDestroy(&ctx->A);
-<a name="line309">309: </a>    MatDestroy(&ctx->B);
-<a name="line310">310: </a>    VecDestroy(&ctx->w[0]);
-<a name="line311">311: </a>    VecDestroy(&ctx->w[1]);
-<a name="line312">312: </a>    VecDestroy(&ctx->w[2]);
-<a name="line313">313: </a>    VecDestroy(&ctx->w[3]);
-<a name="line314">314: </a>  
-<a name="line315">315: </a>    <font color="#4169E1">switch</font> (pep->problem_type) {
-<a name="line316">316: </a>      <font color="#4169E1">case</font> PEP_GENERAL:    i = 0; <font color="#4169E1">break</font>;
-<a name="line317">317: </a>      <font color="#4169E1">case</font> PEP_HERMITIAN:  i = 2; <font color="#4169E1">break</font>;
-<a name="line318">318: </a>      <font color="#4169E1">case</font> PEP_GYROSCOPIC: i = 4; <font color="#4169E1">break</font>;
-<a name="line319">319: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Wrong value of pep->problem_type"</font>);
-<a name="line320">320: </a>    }
-<a name="line321">321: </a>    i += ctx->cform-1;
-
-<a name="line323">323: </a>    (*fcreate[i][0])(PetscObjectComm((PetscObject)pep),ctx,&ctx->A);
-<a name="line324">324: </a>    (*fcreate[i][1])(PetscObjectComm((PetscObject)pep),ctx,&ctx->B);
-<a name="line325">325: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->A);
-<a name="line326">326: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->B);
-
-<a name="line328">328: </a>  } <font color="#4169E1">else</font> {   <font color="#B22222">/* implicit matrix */</font>
-<a name="line329">329: </a>    <font color="#4169E1">if</font> (pep->problem_type!=PEP_GENERAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Must use the explicit matrix option"</font>);
-<a name="line330">330: </a>    <font color="#4169E1">if</font> (!((PetscObject)(ctx->eps))->type_name) {
-<a name="line331">331: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(ctx->eps,EPSKRYLOVSCHUR);
-<a name="line332">332: </a>    } <font color="#4169E1">else</font> {
-<a name="line333">333: </a>      PetscObjectTypeCompare((PetscObject)ctx->eps,EPSKRYLOVSCHUR,&ks);
-<a name="line334">334: </a>      <font color="#4169E1">if</font> (!ks) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Implicit matrix option only implemented for Krylov-Schur"</font>);
-<a name="line335">335: </a>    }
-<a name="line336">336: </a>    <font color="#4169E1">if</font> (ctx->cform!=1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Implicit matrix option not available for 2nd companion form"</font>);
-<a name="line337">337: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,<a href="../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>);
-<a name="line338">338: </a>    <a href="../../../../docs/manualpages/ST/STShellSetContext.html#STShellSetContext">STShellSetContext</a>(st,(PetscObject)ctx);
-<a name="line339">339: </a>    <font color="#4169E1">if</font> (!transf) { <a href="../../../../docs/manualpages/ST/STShellSetBackTransform.html#STShellSetBackTransform">STShellSetBackTransform</a>(st,BackTransform_Linear); }
-<a name="line340">340: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[0]);
-<a name="line341">341: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[1]);
-<a name="line342">342: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[2]);
-<a name="line343">343: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[3]);
-<a name="line344">344: </a>    MatCreateVecs(pep->A[0],&ctx->w[4],NULL);
-<a name="line345">345: </a>    MatCreateVecs(pep->A[0],&ctx->w[5],NULL);
-<a name="line346">346: </a>    PetscLogObjectParents(pep,6,ctx->w);
-<a name="line347">347: </a>    MatCreateShell(PetscObjectComm((PetscObject)pep),deg*pep->nloc,deg*pep->nloc,deg*pep->n,deg*pep->n,ctx,&ctx->A);
-<a name="line348">348: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
-<a name="line349">349: </a>    <font color="#4169E1">if</font> (sinv && !transf) {
-<a name="line350">350: </a>      MatShellSetOperation(ctx->A,MATOP_MULT,(void(*)(void))MatMult_Linear_Sinvert);
-<a name="line351">351: </a>    } <font color="#4169E1">else</font> {
-<a name="line352">352: </a>      MatShellSetOperation(ctx->A,MATOP_MULT,(void(*)(void))MatMult_Linear_Shift);
-<a name="line353">353: </a>    }
-<a name="line354">354: </a>    <a href="../../../../docs/manualpages/ST/STShellSetApply.html#STShellSetApply">STShellSetApply</a>(st,Apply_Linear);
-<a name="line355">355: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->A);
-<a name="line356">356: </a>    ctx->pep = pep;
-
-<a name="line358">358: </a>    PEPBasisCoefficients(pep,pep->pbc);
-<a name="line359">359: </a>    <font color="#4169E1">if</font> (!transf) {
-<a name="line360">360: </a>      PetscMalloc1(pep->nmat,&pep->solvematcoeffs);
-<a name="line361">361: </a>      <font color="#4169E1">if</font> (sinv) {
-<a name="line362">362: </a>        PEPEvaluateBasis(pep,pep->target,0,pep->solvematcoeffs,NULL);
-<a name="line363">363: </a>      } <font color="#4169E1">else</font> {
-<a name="line364">364: </a>        <font color="#4169E1">for</font> (i=0;i<deg;i++) pep->solvematcoeffs[i] = 0.0;
-<a name="line365">365: </a>        pep->solvematcoeffs[deg] = 1.0;
-<a name="line366">366: </a>      }
-<a name="line367">367: </a>      <a href="../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,1.0/pep->sfactor);
-<a name="line368">368: </a>      <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,pep->sfactor);
-<a name="line369">369: </a>    }
-<a name="line370">370: </a>    <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
-<a name="line371">371: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line372">372: </a>        pep->pbc[pep->nmat+i] /= pep->sfactor;
-<a name="line373">373: </a>        pep->pbc[2*pep->nmat+i] /= pep->sfactor*pep->sfactor; 
-<a name="line374">374: </a>      }
-<a name="line375">375: </a>    }
-<a name="line376">376: </a>  }
-
-<a name="line378">378: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,ctx->A,ctx->B);
-<a name="line379">379: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(ctx->eps,&ptype);
-<a name="line380">380: </a>  <font color="#4169E1">if</font> (!ptype) {
-<a name="line381">381: </a>    <font color="#4169E1">if</font> (ctx->explicitmatrix) {
-<a name="line382">382: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(ctx->eps,EPS_GNHEP);
-<a name="line383">383: </a>    } <font color="#4169E1">else</font> {
-<a name="line384">384: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(ctx->eps,EPS_NHEP);
-<a name="line385">385: </a>    }
-<a name="line386">386: </a>  }
-<a name="line387">387: </a>  <font color="#4169E1">if</font> (transf) which = EPS_LARGEST_MAGNITUDE;
-<a name="line388">388: </a>  <font color="#4169E1">else</font> {
-<a name="line389">389: </a>    <font color="#4169E1">switch</font> (pep->which) {
-<a name="line390">390: </a>        <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:  which = EPS_LARGEST_MAGNITUDE; <font color="#4169E1">break</font>;
-<a name="line391">391: </a>        <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE: which = EPS_SMALLEST_MAGNITUDE; <font color="#4169E1">break</font>;
-<a name="line392">392: </a>        <font color="#4169E1">case</font> PEP_LARGEST_REAL:       which = EPS_LARGEST_REAL; <font color="#4169E1">break</font>;
-<a name="line393">393: </a>        <font color="#4169E1">case</font> PEP_SMALLEST_REAL:      which = EPS_SMALLEST_REAL; <font color="#4169E1">break</font>;
-<a name="line394">394: </a>        <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:  which = EPS_LARGEST_IMAGINARY; <font color="#4169E1">break</font>;
-<a name="line395">395: </a>        <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY: which = EPS_SMALLEST_IMAGINARY; <font color="#4169E1">break</font>;
-<a name="line396">396: </a>        <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:   which = EPS_TARGET_MAGNITUDE; <font color="#4169E1">break</font>;
-<a name="line397">397: </a>        <font color="#4169E1">case</font> PEP_TARGET_REAL:        which = EPS_TARGET_REAL; <font color="#4169E1">break</font>;
-<a name="line398">398: </a>        <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:   which = EPS_TARGET_IMAGINARY; <font color="#4169E1">break</font>;
-<a name="line399">399: </a>        <font color="#4169E1">case</font> PEP_WHICH_USER:         which = EPS_WHICH_USER;
-<a name="line400">400: </a>          <a href="../../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(ctx->eps,pep->sc->comparison,pep->sc->comparisonctx);
-<a name="line401">401: </a>          <font color="#4169E1">break</font>;
-<a name="line402">402: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Wrong value of which"</font>);
-<a name="line403">403: </a>    }
-<a name="line404">404: </a>  }
-<a name="line405">405: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(ctx->eps,which);
-
-<a name="line407">407: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(ctx->eps,pep->nev,pep->ncv?pep->ncv:PETSC_DEFAULT,pep->mpd?pep->mpd:PETSC_DEFAULT);
-<a name="line408">408: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(ctx->eps,pep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:pep->tol,pep->max_it?pep->max_it:PETSC_DEFAULT);
-<a name="line409">409: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
-<a name="line410">410: </a>  <font color="#4169E1">if</font> (!istrivial) {
-<a name="line411">411: </a>    <font color="#4169E1">if</font> (transf) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"PEPLINEAR does not support a nontrivial region with st-transform"</font>);
-<a name="line412">412: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>(ctx->eps,pep->rg);
-<a name="line413">413: </a>  }
-<a name="line414">414: </a>  <font color="#B22222">/* Transfer the trackall option from pep to eps */</font>
-<a name="line415">415: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>(pep,&trackall);
-<a name="line416">416: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(ctx->eps,trackall);
-
-<a name="line418">418: </a>  <font color="#B22222">/* temporary change of target */</font>
-<a name="line419">419: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
-<a name="line420">420: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(ctx->eps,&sigma);
-<a name="line421">421: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,sigma/pep->sfactor);
-<a name="line422">422: </a>  }
-
-<a name="line424">424: </a>  <font color="#B22222">/* process initial vector */</font>
-<a name="line425">425: </a>  <font color="#4169E1">if</font> (pep->nini<=-deg) {
-<a name="line426">426: </a>    VecCreateMPI(PetscObjectComm((PetscObject)ctx->eps),deg*pep->nloc,deg*pep->n,&veps);
-<a name="line427">427: </a>    VecGetArray(veps,&epsarray);
-<a name="line428">428: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
-<a name="line429">429: </a>      VecGetArray(pep->IS[i],&peparray);
-<a name="line430">430: </a>      PetscMemcpy(epsarray+i*pep->nloc,peparray,pep->nloc*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line431">431: </a>      VecRestoreArray(pep->IS[i],&peparray);
-<a name="line432">432: </a>    }
-<a name="line433">433: </a>    VecRestoreArray(veps,&epsarray);
-<a name="line434">434: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(ctx->eps,1,&veps);
-<a name="line435">435: </a>    VecDestroy(&veps);
-<a name="line436">436: </a>  }
-<a name="line437">437: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
-<a name="line438">438: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
-<a name="line439">439: </a>  }
-
-<a name="line441">441: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(ctx->eps);
-<a name="line442">442: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(ctx->eps,NULL,&pep->ncv,&pep->mpd);
-<a name="line443">443: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(ctx->eps,NULL,&pep->max_it);
-<a name="line444">444: </a>  <font color="#4169E1">if</font> (pep->nini>0) { PetscInfo(pep,<font color="#666666">"Ignoring initial vectors\n"</font>); }
-<a name="line445">445: </a>  <a href="../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,0);
-<a name="line446">446: </a>  <font color="#4169E1">return</font>(0);
-<a name="line447">447: </a>}
-
-<a name="line451">451: </a><font color="#B22222">/*</font>
-<a name="line452">452: </a><font color="#B22222">   PEPLinearExtract_Residual - Auxiliary routine that copies the solution of the</font>
-<a name="line453">453: </a><font color="#B22222">   linear eigenproblem to the <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object. The eigenvector of the generalized</font>
-<a name="line454">454: </a><font color="#B22222">   problem is supposed to be</font>
-<a name="line455">455: </a><font color="#B22222">                               z = [  x  ]</font>
-<a name="line456">456: </a><font color="#B22222">                                   [ l*x ]</font>
-<a name="line457">457: </a><font color="#B22222">   The eigenvector is taken from z(1:n) or z(n+1:2*n) depending on the explicitly</font>
-<a name="line458">458: </a><font color="#B22222">   computed residual norm.</font>
-<a name="line459">459: </a><font color="#B22222">   Finally, x is normalized so that ||x||_2 = 1.</font>
-<a name="line460">460: </a><font color="#B22222">*/</font>
-<a name="line461">461: </a><strong><font color="#4169E1"><a name="PEPLinearExtract_Residual"></a>static PetscErrorCode PEPLinearExtract_Residual(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line462">462: </a>{
-<a name="line463">463: </a>  PetscErrorCode    ierr;
-<a name="line464">464: </a>  PetscInt          i,k;
-<a name="line465">465: </a>  const PetscScalar *px;
-<a name="line466">466: </a>  PetscScalar       *er=pep->eigr,*ei=pep->eigi;
-<a name="line467">467: </a>  PetscReal         rn1,rn2;
-<a name="line468">468: </a>  Vec               xr,xi=NULL,wr;
-<a name="line469">469: </a>  Mat               A;
-<a name="line470">470: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line471">471: </a>  Vec               wi;
-<a name="line472">472: </a>  const PetscScalar *py;
-<a name="line473">473: </a><font color="#A020F0">#endif</font>
-
-<a name="line476">476: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line477">477: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,2);
-<a name="line478">478: </a><font color="#A020F0">#else</font>
-<a name="line479">479: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,4);
-<a name="line480">480: </a><font color="#A020F0">#endif</font>
-<a name="line481">481: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,NULL);
-<a name="line482">482: </a>  MatCreateVecs(A,&xr,NULL);
-<a name="line483">483: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&wr);
-<a name="line484">484: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line485">485: </a>  VecDuplicate(xr,&xi);
-<a name="line486">486: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&wi);
-<a name="line487">487: </a><font color="#A020F0">#endif</font>
-<a name="line488">488: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line489">489: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,xr,xi);
-<a name="line490">490: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line491">491: </a>    <font color="#4169E1">if</font> (ei[i]!=0.0) {   <font color="#B22222">/* complex conjugate pair */</font>
-<a name="line492">492: </a>      VecGetArrayRead(xr,&px);
-<a name="line493">493: </a>      VecGetArrayRead(xi,&py);
-<a name="line494">494: </a>      VecPlaceArray(wr,px);
-<a name="line495">495: </a>      VecPlaceArray(wi,py);
-<a name="line496">496: </a>      <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,wi,PETSC_TRUE,NULL);
-<a name="line497">497: </a>      PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,wi,pep->work,&rn1);
-<a name="line498">498: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
-<a name="line499">499: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,wi);
-<a name="line500">500: </a>      <font color="#4169E1">for</font> (k=1;k<pep->nmat-1;k++) {
-<a name="line501">501: </a>        VecResetArray(wr);
-<a name="line502">502: </a>        VecResetArray(wi);
-<a name="line503">503: </a>        VecPlaceArray(wr,px+k*pep->nloc);
-<a name="line504">504: </a>        VecPlaceArray(wi,py+k*pep->nloc);
-<a name="line505">505: </a>        <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,wi,PETSC_TRUE,NULL);
-<a name="line506">506: </a>        PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,wi,pep->work,&rn2);
-<a name="line507">507: </a>        <font color="#4169E1">if</font> (rn1>rn2) {
-<a name="line508">508: </a>          <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
-<a name="line509">509: </a>          <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,wi);
-<a name="line510">510: </a>          rn1 = rn2;
-<a name="line511">511: </a>        }
-<a name="line512">512: </a>      }
-<a name="line513">513: </a>      VecResetArray(wr);
-<a name="line514">514: </a>      VecResetArray(wi);
-<a name="line515">515: </a>      VecRestoreArrayRead(xr,&px);
-<a name="line516">516: </a>      VecRestoreArrayRead(xi,&py);
-<a name="line517">517: </a>      i++;
-<a name="line518">518: </a>    } <font color="#4169E1">else</font>   <font color="#B22222">/* real eigenvalue */</font>
-<a name="line519">519: </a><font color="#A020F0">#endif</font>
-<a name="line520">520: </a>    {
-<a name="line521">521: </a>      VecGetArrayRead(xr,&px);
-<a name="line522">522: </a>      VecPlaceArray(wr,px);
-<a name="line523">523: </a>      <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,NULL,PETSC_FALSE,NULL);
-<a name="line524">524: </a>      PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,NULL,pep->work,&rn1);
-<a name="line525">525: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
-<a name="line526">526: </a>      <font color="#4169E1">for</font> (k=1;k<pep->nmat-1;k++) {
-<a name="line527">527: </a>        VecResetArray(wr);
-<a name="line528">528: </a>        VecPlaceArray(wr,px+k*pep->nloc);
-<a name="line529">529: </a>        <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,NULL,PETSC_FALSE,NULL);
-<a name="line530">530: </a>        PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,NULL,pep->work,&rn2);
-<a name="line531">531: </a>        <font color="#4169E1">if</font> (rn1>rn2) {
-<a name="line532">532: </a>          <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
-<a name="line533">533: </a>          rn1 = rn2;
-<a name="line534">534: </a>        }
-<a name="line535">535: </a>      }
-<a name="line536">536: </a>      VecResetArray(wr);
-<a name="line537">537: </a>      VecRestoreArrayRead(xr,&px);
-<a name="line538">538: </a>    }
-<a name="line539">539: </a>  }
-<a name="line540">540: </a>  VecDestroy(&wr);
-<a name="line541">541: </a>  VecDestroy(&xr);
-<a name="line542">542: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line543">543: </a>  VecDestroy(&wi);
-<a name="line544">544: </a>  VecDestroy(&xi);
-<a name="line545">545: </a><font color="#A020F0">#endif</font>
-<a name="line546">546: </a>  <font color="#4169E1">return</font>(0);
-<a name="line547">547: </a>}
-
-<a name="line551">551: </a><font color="#B22222">/*</font>
-<a name="line552">552: </a><font color="#B22222">   PEPLinearExtract_None - Same as PEPLinearExtract_Norm but always takes</font>
-<a name="line553">553: </a><font color="#B22222">   the first block.</font>
-<a name="line554">554: </a><font color="#B22222">*/</font>
-<a name="line555">555: </a><strong><font color="#4169E1"><a name="PEPLinearExtract_None"></a>static PetscErrorCode PEPLinearExtract_None(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line556">556: </a>{
-<a name="line557">557: </a>  PetscErrorCode    ierr;
-<a name="line558">558: </a>  PetscInt          i;
-<a name="line559">559: </a>  const PetscScalar *px;
-<a name="line560">560: </a>  Mat               A;
-<a name="line561">561: </a>  Vec               xr,xi,w;
-<a name="line562">562: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line563">563: </a>  PetscScalar       *ei=pep->eigi;
-<a name="line564">564: </a><font color="#A020F0">#endif</font>
-
-<a name="line567">567: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,NULL);
-<a name="line568">568: </a>  MatCreateVecs(A,&xr,NULL);
-<a name="line569">569: </a>  VecDuplicate(xr,&xi);
-<a name="line570">570: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&w);
-<a name="line571">571: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line572">572: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,xr,xi);
-<a name="line573">573: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line574">574: </a>    <font color="#4169E1">if</font> (ei[i]!=0.0) {   <font color="#B22222">/* complex conjugate pair */</font>
-<a name="line575">575: </a>      VecGetArrayRead(xr,&px);
-<a name="line576">576: </a>      VecPlaceArray(w,px);
-<a name="line577">577: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
-<a name="line578">578: </a>      VecResetArray(w);
-<a name="line579">579: </a>      VecRestoreArrayRead(xr,&px);
-<a name="line580">580: </a>      VecGetArrayRead(xi,&px);
-<a name="line581">581: </a>      VecPlaceArray(w,px);
-<a name="line582">582: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,w);
-<a name="line583">583: </a>      VecResetArray(w);
-<a name="line584">584: </a>      VecRestoreArrayRead(xi,&px);
-<a name="line585">585: </a>      i++;
-<a name="line586">586: </a>    } <font color="#4169E1">else</font>   <font color="#B22222">/* real eigenvalue */</font>
-<a name="line587">587: </a><font color="#A020F0">#endif</font>
-<a name="line588">588: </a>    {
-<a name="line589">589: </a>      VecGetArrayRead(xr,&px);
-<a name="line590">590: </a>      VecPlaceArray(w,px);
-<a name="line591">591: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
-<a name="line592">592: </a>      VecResetArray(w);
-<a name="line593">593: </a>      VecRestoreArrayRead(xr,&px);
-<a name="line594">594: </a>    }
-<a name="line595">595: </a>  }
-<a name="line596">596: </a>  VecDestroy(&w);
-<a name="line597">597: </a>  VecDestroy(&xr);
-<a name="line598">598: </a>  VecDestroy(&xi);
-<a name="line599">599: </a>  <font color="#4169E1">return</font>(0);
-<a name="line600">600: </a>}
-
-<a name="line604">604: </a><font color="#B22222">/*</font>
-<a name="line605">605: </a><font color="#B22222">   PEPLinearExtract_Norm - Auxiliary routine that copies the solution of the</font>
-<a name="line606">606: </a><font color="#B22222">   linear eigenproblem to the <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object. The eigenvector of the generalized</font>
-<a name="line607">607: </a><font color="#B22222">   problem is supposed to be</font>
-<a name="line608">608: </a><font color="#B22222">                               z = [  x  ]</font>
-<a name="line609">609: </a><font color="#B22222">                                   [ l*x ]</font>
-<a name="line610">610: </a><font color="#B22222">   If |l|<1.0, the eigenvector is taken from z(1:n), otherwise from z(n+1:2*n).</font>
-<a name="line611">611: </a><font color="#B22222">   Finally, x is normalized so that ||x||_2 = 1.</font>
-<a name="line612">612: </a><font color="#B22222">*/</font>
-<a name="line613">613: </a><strong><font color="#4169E1"><a name="PEPLinearExtract_Norm"></a>static PetscErrorCode PEPLinearExtract_Norm(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line614">614: </a>{
-<a name="line615">615: </a>  PetscErrorCode    ierr;
-<a name="line616">616: </a>  PetscInt          i,offset;
-<a name="line617">617: </a>  const PetscScalar *px;
-<a name="line618">618: </a>  PetscScalar       *er=pep->eigr;
-<a name="line619">619: </a>  Mat               A;
-<a name="line620">620: </a>  Vec               xr,xi=NULL,w;
-<a name="line621">621: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line622">622: </a>  PetscScalar       *ei=pep->eigi;
-<a name="line623">623: </a><font color="#A020F0">#endif</font>
-
-<a name="line626">626: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,NULL);
-<a name="line627">627: </a>  MatCreateVecs(A,&xr,NULL);
-<a name="line628">628: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line629">629: </a>  VecDuplicate(xr,&xi);
-<a name="line630">630: </a><font color="#A020F0">#endif</font>
-<a name="line631">631: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&w);
-<a name="line632">632: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line633">633: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,xr,xi);
-<a name="line634">634: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(er[i],ei[i])>1.0) offset = (pep->nmat-2)*pep->nloc;
-<a name="line635">635: </a>    <font color="#4169E1">else</font> offset = 0;
-<a name="line636">636: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line637">637: </a>    <font color="#4169E1">if</font> (ei[i]!=0.0) {   <font color="#B22222">/* complex conjugate pair */</font>
-<a name="line638">638: </a>      VecGetArrayRead(xr,&px);
-<a name="line639">639: </a>      VecPlaceArray(w,px+offset);
-<a name="line640">640: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
-<a name="line641">641: </a>      VecResetArray(w);
-<a name="line642">642: </a>      VecRestoreArrayRead(xr,&px);
-<a name="line643">643: </a>      VecGetArrayRead(xi,&px);
-<a name="line644">644: </a>      VecPlaceArray(w,px+offset);
-<a name="line645">645: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,w);
-<a name="line646">646: </a>      VecResetArray(w);
-<a name="line647">647: </a>      VecRestoreArrayRead(xi,&px);
-<a name="line648">648: </a>      i++;
-<a name="line649">649: </a>    } <font color="#4169E1">else</font> <font color="#B22222">/* real eigenvalue */</font>
-<a name="line650">650: </a><font color="#A020F0">#endif</font>
-<a name="line651">651: </a>    {
-<a name="line652">652: </a>      VecGetArrayRead(xr,&px);
-<a name="line653">653: </a>      VecPlaceArray(w,px+offset);
-<a name="line654">654: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
-<a name="line655">655: </a>      VecResetArray(w);
-<a name="line656">656: </a>      VecRestoreArrayRead(xr,&px);
-<a name="line657">657: </a>    }
-<a name="line658">658: </a>  }
-<a name="line659">659: </a>  VecDestroy(&w);
-<a name="line660">660: </a>  VecDestroy(&xr);
-<a name="line661">661: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line662">662: </a>  VecDestroy(&xi);
-<a name="line663">663: </a><font color="#A020F0">#endif</font>
-<a name="line664">664: </a>  <font color="#4169E1">return</font>(0);
-<a name="line665">665: </a>}
-
-<a name="line669">669: </a><strong><font color="#4169E1"><a name="PEPExtractVectors_Linear"></a>PetscErrorCode PEPExtractVectors_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line670">670: </a>{
-<a name="line672">672: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-<a name="line673">673: </a>  
-<a name="line675">675: </a>  <font color="#4169E1">switch</font> (pep->extract) {
-<a name="line676">676: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NONE:
-<a name="line677">677: </a>    PEPLinearExtract_None(pep,ctx->eps);
-<a name="line678">678: </a>    <font color="#4169E1">break</font>;
-<a name="line679">679: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NORM:
-<a name="line680">680: </a>    PEPLinearExtract_Norm(pep,ctx->eps);
-<a name="line681">681: </a>    <font color="#4169E1">break</font>;
-<a name="line682">682: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_RESIDUAL:
-<a name="line683">683: </a>    PEPLinearExtract_Residual(pep,ctx->eps);
-<a name="line684">684: </a>    <font color="#4169E1">break</font>;
-<a name="line685">685: </a><strong><font color="#FF0000">  default:</font></strong>
-<a name="line686">686: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Extraction not implemented in this solver"</font>);
-<a name="line687">687: </a>  }
-<a name="line688">688: </a>  <font color="#4169E1">return</font>(0);
-<a name="line689">689: </a>}
-
-<a name="line693">693: </a><strong><font color="#4169E1"><a name="PEPSolve_Linear"></a>PetscErrorCode PEPSolve_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line694">694: </a>{
-<a name="line696">696: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-<a name="line697">697: </a>  PetscScalar    sigma;
-<a name="line698">698: </a>  PetscBool      flg;
-<a name="line699">699: </a>  PetscInt       i;
-
-<a name="line702">702: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(ctx->eps);
-<a name="line703">703: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(ctx->eps,&pep->nconv);
-<a name="line704">704: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(ctx->eps,&pep->its);
-<a name="line705">705: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(ctx->eps,(<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)&pep->reason);
-
-<a name="line707">707: </a>  <font color="#B22222">/* recover eigenvalues */</font>
-<a name="line708">708: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line709">709: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(ctx->eps,i,&pep->eigr[i],&pep->eigi[i],NULL,NULL);
-<a name="line710">710: </a>    pep->eigr[i] *= pep->sfactor;
-<a name="line711">711: </a>    pep->eigi[i] *= pep->sfactor;
-<a name="line712">712: </a>  }
-
-<a name="line714">714: </a>  <font color="#B22222">/* restore target */</font>
-<a name="line715">715: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(ctx->eps,&sigma);
-<a name="line716">716: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,sigma*pep->sfactor);
-
-<a name="line718">718: </a>  <a href="../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line719">719: </a>  <font color="#4169E1">if</font> (flg && pep->ops->backtransform) {
-<a name="line720">720: </a>    (*pep->ops->backtransform)(pep);
-<a name="line721">721: </a>  }
-<a name="line722">722: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
-<a name="line723">723: </a>    <font color="#B22222">/* Restore original values */</font>
-<a name="line724">724: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++){
-<a name="line725">725: </a>      pep->pbc[pep->nmat+i] *= pep->sfactor;
-<a name="line726">726: </a>      pep->pbc[2*pep->nmat+i] *= pep->sfactor*pep->sfactor;
-<a name="line727">727: </a>    }
-<a name="line728">728: </a>    <font color="#4169E1">if</font> (!flg && !ctx->explicitmatrix) {
-<a name="line729">729: </a>      <a href="../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,pep->sfactor);
-<a name="line730">730: </a>    } 
-<a name="line731">731: </a>    <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(pep->rg,1.0);
+<a name="line279">279: </a>  <font color="#4169E1">if</font> (pep->stopping!=<a href="../../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"User-defined stopping test not supported"</font>);
+<a name="line280">280: </a>  pep->lineariz = PETSC_TRUE;
+<a name="line281">281: </a>  <font color="#4169E1">if</font> (!ctx->cform) ctx->cform = 1;
+<a name="line282">282: </a>  <a href="../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&transf);
+<a name="line283">283: </a>  PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line284">284: </a>  <font color="#4169E1">if</font> (!pep->which) {
+<a name="line285">285: </a>    <font color="#4169E1">if</font> (sinv) pep->which = PEP_TARGET_MAGNITUDE;
+<a name="line286">286: </a>    <font color="#4169E1">else</font> pep->which = PEP_LARGEST_MAGNITUDE;
+<a name="line287">287: </a>  }
+<a name="line288">288: </a>  <a href="../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(pep->st);
+<a name="line289">289: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&ctx->eps); }
+<a name="line290">290: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
+<a name="line291">291: </a>  <font color="#4169E1">if</font> (!transf) { <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,pep->target); }
+<a name="line292">292: </a>  <font color="#4169E1">if</font> (sinv && !transf) { <a href="../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(st,pep->target); }
+<a name="line293">293: </a>  <font color="#B22222">/* compute scale factor if not set by user */</font>
+<a name="line294">294: </a>  PEPComputeScaleFactor(pep);
+
+<a name="line296">296: </a>  <font color="#4169E1">if</font> (ctx->explicitmatrix) {
+<a name="line297">297: </a>    <font color="#4169E1">if</font> (transf) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Explicit matrix option is not implemented with st-transform flag active"</font>);
+<a name="line298">298: </a>    <font color="#4169E1">if</font> (pep->nmat!=3) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Explicit matrix option only available for quadratic problems"</font>);
+<a name="line299">299: </a>    <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Explicit matrix option not implemented for non-monomial bases"</font>);
+<a name="line300">300: </a>    <font color="#4169E1">if</font> (pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Diagonal scaling not allowed in PEPLINEAR with explicit matrices"</font>);
+<a name="line301">301: </a>    <font color="#4169E1">if</font> (sinv && !transf) { <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,STSINVERT); }
+<a name="line302">302: </a>    <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(pep->rg,1.0/pep->sfactor);
+<a name="line303">303: </a>    <a href="../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,0,&ctx->K);
+<a name="line304">304: </a>    <a href="../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,1,&ctx->C);
+<a name="line305">305: </a>    <a href="../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,2,&ctx->M);
+<a name="line306">306: </a>    ctx->sfactor = pep->sfactor;
+<a name="line307">307: </a>    ctx->dsfactor = pep->dsfactor;
+<a name="line308">308: </a>  
+<a name="line309">309: </a>    MatDestroy(&ctx->A);
+<a name="line310">310: </a>    MatDestroy(&ctx->B);
+<a name="line311">311: </a>    VecDestroy(&ctx->w[0]);
+<a name="line312">312: </a>    VecDestroy(&ctx->w[1]);
+<a name="line313">313: </a>    VecDestroy(&ctx->w[2]);
+<a name="line314">314: </a>    VecDestroy(&ctx->w[3]);
+<a name="line315">315: </a>  
+<a name="line316">316: </a>    <font color="#4169E1">switch</font> (pep->problem_type) {
+<a name="line317">317: </a>      <font color="#4169E1">case</font> PEP_GENERAL:    i = 0; <font color="#4169E1">break</font>;
+<a name="line318">318: </a>      <font color="#4169E1">case</font> PEP_HERMITIAN:  i = 2; <font color="#4169E1">break</font>;
+<a name="line319">319: </a>      <font color="#4169E1">case</font> PEP_GYROSCOPIC: i = 4; <font color="#4169E1">break</font>;
+<a name="line320">320: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Wrong value of pep->problem_type"</font>);
+<a name="line321">321: </a>    }
+<a name="line322">322: </a>    i += ctx->cform-1;
+
+<a name="line324">324: </a>    (*fcreate[i][0])(PetscObjectComm((PetscObject)pep),ctx,&ctx->A);
+<a name="line325">325: </a>    (*fcreate[i][1])(PetscObjectComm((PetscObject)pep),ctx,&ctx->B);
+<a name="line326">326: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->A);
+<a name="line327">327: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->B);
+
+<a name="line329">329: </a>  } <font color="#4169E1">else</font> {   <font color="#B22222">/* implicit matrix */</font>
+<a name="line330">330: </a>    <font color="#4169E1">if</font> (pep->problem_type!=PEP_GENERAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Must use the explicit matrix option if problem type is not general"</font>);
+<a name="line331">331: </a>    <font color="#4169E1">if</font> (!((PetscObject)(ctx->eps))->type_name) {
+<a name="line332">332: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetType.html#EPSSetType">EPSSetType</a>(ctx->eps,EPSKRYLOVSCHUR);
+<a name="line333">333: </a>    } <font color="#4169E1">else</font> {
+<a name="line334">334: </a>      PetscObjectTypeCompare((PetscObject)ctx->eps,EPSKRYLOVSCHUR,&ks);
+<a name="line335">335: </a>      <font color="#4169E1">if</font> (!ks) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Implicit matrix option only implemented for Krylov-Schur"</font>);
+<a name="line336">336: </a>    }
+<a name="line337">337: </a>    <font color="#4169E1">if</font> (ctx->cform!=1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Implicit matrix option not available for 2nd companion form"</font>);
+<a name="line338">338: </a>    <a href="../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,<a href="../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>);
+<a name="line339">339: </a>    <a href="../../../../docs/manualpages/ST/STShellSetContext.html#STShellSetContext">STShellSetContext</a>(st,(PetscObject)ctx);
+<a name="line340">340: </a>    <font color="#4169E1">if</font> (!transf) { <a href="../../../../docs/manualpages/ST/STShellSetBackTransform.html#STShellSetBackTransform">STShellSetBackTransform</a>(st,BackTransform_Linear); }
+<a name="line341">341: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[0]);
+<a name="line342">342: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[1]);
+<a name="line343">343: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[2]);
+<a name="line344">344: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&ctx->w[3]);
+<a name="line345">345: </a>    MatCreateVecs(pep->A[0],&ctx->w[4],NULL);
+<a name="line346">346: </a>    MatCreateVecs(pep->A[0],&ctx->w[5],NULL);
+<a name="line347">347: </a>    PetscLogObjectParents(pep,6,ctx->w);
+<a name="line348">348: </a>    MatCreateShell(PetscObjectComm((PetscObject)pep),deg*pep->nloc,deg*pep->nloc,deg*pep->n,deg*pep->n,ctx,&ctx->A);
+<a name="line349">349: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&sinv);
+<a name="line350">350: </a>    <font color="#4169E1">if</font> (sinv && !transf) {
+<a name="line351">351: </a>      MatShellSetOperation(ctx->A,MATOP_MULT,(void(*)(void))MatMult_Linear_Sinvert);
+<a name="line352">352: </a>    } <font color="#4169E1">else</font> {
+<a name="line353">353: </a>      MatShellSetOperation(ctx->A,MATOP_MULT,(void(*)(void))MatMult_Linear_Shift);
+<a name="line354">354: </a>    }
+<a name="line355">355: </a>    <a href="../../../../docs/manualpages/ST/STShellSetApply.html#STShellSetApply">STShellSetApply</a>(st,Apply_Linear);
+<a name="line356">356: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->A);
+<a name="line357">357: </a>    ctx->pep = pep;
+
+<a name="line359">359: </a>    PEPBasisCoefficients(pep,pep->pbc);
+<a name="line360">360: </a>    <font color="#4169E1">if</font> (!transf) {
+<a name="line361">361: </a>      PetscMalloc1(pep->nmat,&pep->solvematcoeffs);
+<a name="line362">362: </a>      <font color="#4169E1">if</font> (sinv) {
+<a name="line363">363: </a>        PEPEvaluateBasis(pep,pep->target,0,pep->solvematcoeffs,NULL);
+<a name="line364">364: </a>      } <font color="#4169E1">else</font> {
+<a name="line365">365: </a>        <font color="#4169E1">for</font> (i=0;i<deg;i++) pep->solvematcoeffs[i] = 0.0;
+<a name="line366">366: </a>        pep->solvematcoeffs[deg] = 1.0;
+<a name="line367">367: </a>      }
+<a name="line368">368: </a>      <a href="../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,1.0/pep->sfactor);
+<a name="line369">369: </a>      <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(pep->rg,1.0/pep->sfactor);
+<a name="line370">370: </a>    }
+<a name="line371">371: </a>    <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
+<a name="line372">372: </a>      <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line373">373: </a>        pep->pbc[pep->nmat+i] /= pep->sfactor;
+<a name="line374">374: </a>        pep->pbc[2*pep->nmat+i] /= pep->sfactor*pep->sfactor; 
+<a name="line375">375: </a>      }
+<a name="line376">376: </a>    }
+<a name="line377">377: </a>  }
+
+<a name="line379">379: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(ctx->eps,ctx->A,ctx->B);
+<a name="line380">380: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetProblemType.html#EPSGetProblemType">EPSGetProblemType</a>(ctx->eps,&ptype);
+<a name="line381">381: </a>  <font color="#4169E1">if</font> (!ptype) {
+<a name="line382">382: </a>    <font color="#4169E1">if</font> (ctx->explicitmatrix) {
+<a name="line383">383: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(ctx->eps,EPS_GNHEP);
+<a name="line384">384: </a>    } <font color="#4169E1">else</font> {
+<a name="line385">385: </a>      <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(ctx->eps,EPS_NHEP);
+<a name="line386">386: </a>    }
+<a name="line387">387: </a>  }
+<a name="line388">388: </a>  <font color="#4169E1">if</font> (transf) which = EPS_LARGEST_MAGNITUDE;
+<a name="line389">389: </a>  <font color="#4169E1">else</font> {
+<a name="line390">390: </a>    <font color="#4169E1">switch</font> (pep->which) {
+<a name="line391">391: </a>        <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:  which = EPS_LARGEST_MAGNITUDE; <font color="#4169E1">break</font>;
+<a name="line392">392: </a>        <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE: which = EPS_SMALLEST_MAGNITUDE; <font color="#4169E1">break</font>;
+<a name="line393">393: </a>        <font color="#4169E1">case</font> PEP_LARGEST_REAL:       which = EPS_LARGEST_REAL; <font color="#4169E1">break</font>;
+<a name="line394">394: </a>        <font color="#4169E1">case</font> PEP_SMALLEST_REAL:      which = EPS_SMALLEST_REAL; <font color="#4169E1">break</font>;
+<a name="line395">395: </a>        <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:  which = EPS_LARGEST_IMAGINARY; <font color="#4169E1">break</font>;
+<a name="line396">396: </a>        <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY: which = EPS_SMALLEST_IMAGINARY; <font color="#4169E1">break</font>;
+<a name="line397">397: </a>        <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:   which = EPS_TARGET_MAGNITUDE; <font color="#4169E1">break</font>;
+<a name="line398">398: </a>        <font color="#4169E1">case</font> PEP_TARGET_REAL:        which = EPS_TARGET_REAL; <font color="#4169E1">break</font>;
+<a name="line399">399: </a>        <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:   which = EPS_TARGET_IMAGINARY; <font color="#4169E1">break</font>;
+<a name="line400">400: </a>        <font color="#4169E1">case</font> PEP_WHICH_USER:         which = EPS_WHICH_USER;
+<a name="line401">401: </a>          <a href="../../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(ctx->eps,pep->sc->comparison,pep->sc->comparisonctx);
+<a name="line402">402: </a>          <font color="#4169E1">break</font>;
+<a name="line403">403: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Wrong value of which"</font>);
+<a name="line404">404: </a>    }
+<a name="line405">405: </a>  }
+<a name="line406">406: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(ctx->eps,which);
+
+<a name="line408">408: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(ctx->eps,pep->nev,pep->ncv?pep->ncv:PETSC_DEFAULT,pep->mpd?pep->mpd:PETSC_DEFAULT);
+<a name="line409">409: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(ctx->eps,pep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:pep->tol,pep->max_it?pep->max_it:PETSC_DEFAULT);
+<a name="line410">410: </a>  <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
+<a name="line411">411: </a>  <font color="#4169E1">if</font> (!istrivial) {
+<a name="line412">412: </a>    <font color="#4169E1">if</font> (transf) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"PEPLINEAR does not support a nontrivial region with st-transform"</font>);
+<a name="line413">413: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetRG.html#EPSSetRG">EPSSetRG</a>(ctx->eps,pep->rg);
+<a name="line414">414: </a>  }
+<a name="line415">415: </a>  <font color="#B22222">/* Transfer the trackall option from pep to eps */</font>
+<a name="line416">416: </a>  <a href="../../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>(pep,&trackall);
+<a name="line417">417: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(ctx->eps,trackall);
+
+<a name="line419">419: </a>  <font color="#B22222">/* temporary change of target */</font>
+<a name="line420">420: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
+<a name="line421">421: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(ctx->eps,&sigma);
+<a name="line422">422: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,sigma/pep->sfactor);
+<a name="line423">423: </a>  }
+
+<a name="line425">425: </a>  <font color="#B22222">/* process initial vector */</font>
+<a name="line426">426: </a>  <font color="#4169E1">if</font> (pep->nini<=-deg) {
+<a name="line427">427: </a>    VecCreateMPI(PetscObjectComm((PetscObject)ctx->eps),deg*pep->nloc,deg*pep->n,&veps);
+<a name="line428">428: </a>    VecGetArray(veps,&epsarray);
+<a name="line429">429: </a>    <font color="#4169E1">for</font> (i=0;i<deg;i++) {
+<a name="line430">430: </a>      VecGetArray(pep->IS[i],&peparray);
+<a name="line431">431: </a>      PetscMemcpy(epsarray+i*pep->nloc,peparray,pep->nloc*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line432">432: </a>      VecRestoreArray(pep->IS[i],&peparray);
+<a name="line433">433: </a>    }
+<a name="line434">434: </a>    VecRestoreArray(veps,&epsarray);
+<a name="line435">435: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(ctx->eps,1,&veps);
+<a name="line436">436: </a>    VecDestroy(&veps);
+<a name="line437">437: </a>  }
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
+<a name="line439">439: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
+<a name="line440">440: </a>  }
+
+<a name="line442">442: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(ctx->eps);
+<a name="line443">443: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(ctx->eps,NULL,&pep->ncv,&pep->mpd);
+<a name="line444">444: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(ctx->eps,NULL,&pep->max_it);
+<a name="line445">445: </a>  <font color="#4169E1">if</font> (pep->nini>0) { PetscInfo(pep,<font color="#666666">"Ignoring initial vectors\n"</font>); }
+<a name="line446">446: </a>  <a href="../../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(pep,0);
+<a name="line447">447: </a>  <font color="#4169E1">return</font>(0);
+<a name="line448">448: </a>}
+
+<a name="line452">452: </a><font color="#B22222">/*</font>
+<a name="line453">453: </a><font color="#B22222">   PEPLinearExtract_Residual - Auxiliary routine that copies the solution of the</font>
+<a name="line454">454: </a><font color="#B22222">   linear eigenproblem to the <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object. The eigenvector of the generalized</font>
+<a name="line455">455: </a><font color="#B22222">   problem is supposed to be</font>
+<a name="line456">456: </a><font color="#B22222">                               z = [  x  ]</font>
+<a name="line457">457: </a><font color="#B22222">                                   [ l*x ]</font>
+<a name="line458">458: </a><font color="#B22222">   The eigenvector is taken from z(1:n) or z(n+1:2*n) depending on the explicitly</font>
+<a name="line459">459: </a><font color="#B22222">   computed residual norm.</font>
+<a name="line460">460: </a><font color="#B22222">   Finally, x is normalized so that ||x||_2 = 1.</font>
+<a name="line461">461: </a><font color="#B22222">*/</font>
+<a name="line462">462: </a><strong><font color="#4169E1"><a name="PEPLinearExtract_Residual"></a>static PetscErrorCode PEPLinearExtract_Residual(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line463">463: </a>{
+<a name="line464">464: </a>  PetscErrorCode    ierr;
+<a name="line465">465: </a>  PetscInt          i,k;
+<a name="line466">466: </a>  const PetscScalar *px;
+<a name="line467">467: </a>  PetscScalar       *er=pep->eigr,*ei=pep->eigi;
+<a name="line468">468: </a>  PetscReal         rn1,rn2;
+<a name="line469">469: </a>  Vec               xr,xi=NULL,wr;
+<a name="line470">470: </a>  Mat               A;
+<a name="line471">471: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line472">472: </a>  Vec               wi;
+<a name="line473">473: </a>  const PetscScalar *py;
+<a name="line474">474: </a><font color="#A020F0">#endif</font>
+
+<a name="line477">477: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line478">478: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,2);
+<a name="line479">479: </a><font color="#A020F0">#else</font>
+<a name="line480">480: </a>  <a href="../../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,4);
+<a name="line481">481: </a><font color="#A020F0">#endif</font>
+<a name="line482">482: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,NULL);
+<a name="line483">483: </a>  MatCreateVecs(A,&xr,NULL);
+<a name="line484">484: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&wr);
+<a name="line485">485: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line486">486: </a>  VecDuplicate(xr,&xi);
+<a name="line487">487: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&wi);
+<a name="line488">488: </a><font color="#A020F0">#endif</font>
+<a name="line489">489: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line490">490: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,xr,xi);
+<a name="line491">491: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line492">492: </a>    <font color="#4169E1">if</font> (ei[i]!=0.0) {   <font color="#B22222">/* complex conjugate pair */</font>
+<a name="line493">493: </a>      VecGetArrayRead(xr,&px);
+<a name="line494">494: </a>      VecGetArrayRead(xi,&py);
+<a name="line495">495: </a>      VecPlaceArray(wr,px);
+<a name="line496">496: </a>      VecPlaceArray(wi,py);
+<a name="line497">497: </a>      <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,wi,PETSC_TRUE,NULL);
+<a name="line498">498: </a>      PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,wi,pep->work,&rn1);
+<a name="line499">499: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
+<a name="line500">500: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,wi);
+<a name="line501">501: </a>      <font color="#4169E1">for</font> (k=1;k<pep->nmat-1;k++) {
+<a name="line502">502: </a>        VecResetArray(wr);
+<a name="line503">503: </a>        VecResetArray(wi);
+<a name="line504">504: </a>        VecPlaceArray(wr,px+k*pep->nloc);
+<a name="line505">505: </a>        VecPlaceArray(wi,py+k*pep->nloc);
+<a name="line506">506: </a>        <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,wi,PETSC_TRUE,NULL);
+<a name="line507">507: </a>        PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,wi,pep->work,&rn2);
+<a name="line508">508: </a>        <font color="#4169E1">if</font> (rn1>rn2) {
+<a name="line509">509: </a>          <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
+<a name="line510">510: </a>          <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,wi);
+<a name="line511">511: </a>          rn1 = rn2;
+<a name="line512">512: </a>        }
+<a name="line513">513: </a>      }
+<a name="line514">514: </a>      VecResetArray(wr);
+<a name="line515">515: </a>      VecResetArray(wi);
+<a name="line516">516: </a>      VecRestoreArrayRead(xr,&px);
+<a name="line517">517: </a>      VecRestoreArrayRead(xi,&py);
+<a name="line518">518: </a>      i++;
+<a name="line519">519: </a>    } <font color="#4169E1">else</font>   <font color="#B22222">/* real eigenvalue */</font>
+<a name="line520">520: </a><font color="#A020F0">#endif</font>
+<a name="line521">521: </a>    {
+<a name="line522">522: </a>      VecGetArrayRead(xr,&px);
+<a name="line523">523: </a>      VecPlaceArray(wr,px);
+<a name="line524">524: </a>      <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,NULL,PETSC_FALSE,NULL);
+<a name="line525">525: </a>      PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,NULL,pep->work,&rn1);
+<a name="line526">526: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
+<a name="line527">527: </a>      <font color="#4169E1">for</font> (k=1;k<pep->nmat-1;k++) {
+<a name="line528">528: </a>        VecResetArray(wr);
+<a name="line529">529: </a>        VecPlaceArray(wr,px+k*pep->nloc);
+<a name="line530">530: </a>        <a href="../../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(wr,NULL,PETSC_FALSE,NULL);
+<a name="line531">531: </a>        PEPComputeResidualNorm_Private(pep,er[i],ei[i],wr,NULL,pep->work,&rn2);
+<a name="line532">532: </a>        <font color="#4169E1">if</font> (rn1>rn2) {
+<a name="line533">533: </a>          <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,wr);
+<a name="line534">534: </a>          rn1 = rn2;
+<a name="line535">535: </a>        }
+<a name="line536">536: </a>      }
+<a name="line537">537: </a>      VecResetArray(wr);
+<a name="line538">538: </a>      VecRestoreArrayRead(xr,&px);
+<a name="line539">539: </a>    }
+<a name="line540">540: </a>  }
+<a name="line541">541: </a>  VecDestroy(&wr);
+<a name="line542">542: </a>  VecDestroy(&xr);
+<a name="line543">543: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line544">544: </a>  VecDestroy(&wi);
+<a name="line545">545: </a>  VecDestroy(&xi);
+<a name="line546">546: </a><font color="#A020F0">#endif</font>
+<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
+<a name="line548">548: </a>}
+
+<a name="line552">552: </a><font color="#B22222">/*</font>
+<a name="line553">553: </a><font color="#B22222">   PEPLinearExtract_None - Same as PEPLinearExtract_Norm but always takes</font>
+<a name="line554">554: </a><font color="#B22222">   the first block.</font>
+<a name="line555">555: </a><font color="#B22222">*/</font>
+<a name="line556">556: </a><strong><font color="#4169E1"><a name="PEPLinearExtract_None"></a>static PetscErrorCode PEPLinearExtract_None(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line557">557: </a>{
+<a name="line558">558: </a>  PetscErrorCode    ierr;
+<a name="line559">559: </a>  PetscInt          i;
+<a name="line560">560: </a>  const PetscScalar *px;
+<a name="line561">561: </a>  Mat               A;
+<a name="line562">562: </a>  Vec               xr,xi,w;
+<a name="line563">563: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line564">564: </a>  PetscScalar       *ei=pep->eigi;
+<a name="line565">565: </a><font color="#A020F0">#endif</font>
+
+<a name="line568">568: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,NULL);
+<a name="line569">569: </a>  MatCreateVecs(A,&xr,NULL);
+<a name="line570">570: </a>  VecDuplicate(xr,&xi);
+<a name="line571">571: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&w);
+<a name="line572">572: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line573">573: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,xr,xi);
+<a name="line574">574: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line575">575: </a>    <font color="#4169E1">if</font> (ei[i]!=0.0) {   <font color="#B22222">/* complex conjugate pair */</font>
+<a name="line576">576: </a>      VecGetArrayRead(xr,&px);
+<a name="line577">577: </a>      VecPlaceArray(w,px);
+<a name="line578">578: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
+<a name="line579">579: </a>      VecResetArray(w);
+<a name="line580">580: </a>      VecRestoreArrayRead(xr,&px);
+<a name="line581">581: </a>      VecGetArrayRead(xi,&px);
+<a name="line582">582: </a>      VecPlaceArray(w,px);
+<a name="line583">583: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,w);
+<a name="line584">584: </a>      VecResetArray(w);
+<a name="line585">585: </a>      VecRestoreArrayRead(xi,&px);
+<a name="line586">586: </a>      i++;
+<a name="line587">587: </a>    } <font color="#4169E1">else</font>   <font color="#B22222">/* real eigenvalue */</font>
+<a name="line588">588: </a><font color="#A020F0">#endif</font>
+<a name="line589">589: </a>    {
+<a name="line590">590: </a>      VecGetArrayRead(xr,&px);
+<a name="line591">591: </a>      VecPlaceArray(w,px);
+<a name="line592">592: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
+<a name="line593">593: </a>      VecResetArray(w);
+<a name="line594">594: </a>      VecRestoreArrayRead(xr,&px);
+<a name="line595">595: </a>    }
+<a name="line596">596: </a>  }
+<a name="line597">597: </a>  VecDestroy(&w);
+<a name="line598">598: </a>  VecDestroy(&xr);
+<a name="line599">599: </a>  VecDestroy(&xi);
+<a name="line600">600: </a>  <font color="#4169E1">return</font>(0);
+<a name="line601">601: </a>}
+
+<a name="line605">605: </a><font color="#B22222">/*</font>
+<a name="line606">606: </a><font color="#B22222">   PEPLinearExtract_Norm - Auxiliary routine that copies the solution of the</font>
+<a name="line607">607: </a><font color="#B22222">   linear eigenproblem to the <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object. The eigenvector of the generalized</font>
+<a name="line608">608: </a><font color="#B22222">   problem is supposed to be</font>
+<a name="line609">609: </a><font color="#B22222">                               z = [  x  ]</font>
+<a name="line610">610: </a><font color="#B22222">                                   [ l*x ]</font>
+<a name="line611">611: </a><font color="#B22222">   If |l|<1.0, the eigenvector is taken from z(1:n), otherwise from z(n+1:2*n).</font>
+<a name="line612">612: </a><font color="#B22222">   Finally, x is normalized so that ||x||_2 = 1.</font>
+<a name="line613">613: </a><font color="#B22222">*/</font>
+<a name="line614">614: </a><strong><font color="#4169E1"><a name="PEPLinearExtract_Norm"></a>static PetscErrorCode PEPLinearExtract_Norm(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line615">615: </a>{
+<a name="line616">616: </a>  PetscErrorCode    ierr;
+<a name="line617">617: </a>  PetscInt          i,offset;
+<a name="line618">618: </a>  const PetscScalar *px;
+<a name="line619">619: </a>  PetscScalar       *er=pep->eigr;
+<a name="line620">620: </a>  Mat               A;
+<a name="line621">621: </a>  Vec               xr,xi=NULL,w;
+<a name="line622">622: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line623">623: </a>  PetscScalar       *ei=pep->eigi;
+<a name="line624">624: </a><font color="#A020F0">#endif</font>
+
+<a name="line627">627: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetOperators.html#EPSGetOperators">EPSGetOperators</a>(eps,&A,NULL);
+<a name="line628">628: </a>  MatCreateVecs(A,&xr,NULL);
+<a name="line629">629: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line630">630: </a>  VecDuplicate(xr,&xi);
+<a name="line631">631: </a><font color="#A020F0">#endif</font>
+<a name="line632">632: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)pep),1,pep->nloc,pep->n,NULL,&w);
+<a name="line633">633: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line634">634: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(eps,i,NULL,NULL,xr,xi);
+<a name="line635">635: </a>    <font color="#4169E1">if</font> (SlepcAbsEigenvalue(er[i],ei[i])>1.0) offset = (pep->nmat-2)*pep->nloc;
+<a name="line636">636: </a>    <font color="#4169E1">else</font> offset = 0;
+<a name="line637">637: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line638">638: </a>    <font color="#4169E1">if</font> (ei[i]!=0.0) {   <font color="#B22222">/* complex conjugate pair */</font>
+<a name="line639">639: </a>      VecGetArrayRead(xr,&px);
+<a name="line640">640: </a>      VecPlaceArray(w,px+offset);
+<a name="line641">641: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
+<a name="line642">642: </a>      VecResetArray(w);
+<a name="line643">643: </a>      VecRestoreArrayRead(xr,&px);
+<a name="line644">644: </a>      VecGetArrayRead(xi,&px);
+<a name="line645">645: </a>      VecPlaceArray(w,px+offset);
+<a name="line646">646: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i+1,w);
+<a name="line647">647: </a>      VecResetArray(w);
+<a name="line648">648: </a>      VecRestoreArrayRead(xi,&px);
+<a name="line649">649: </a>      i++;
+<a name="line650">650: </a>    } <font color="#4169E1">else</font> <font color="#B22222">/* real eigenvalue */</font>
+<a name="line651">651: </a><font color="#A020F0">#endif</font>
+<a name="line652">652: </a>    {
+<a name="line653">653: </a>      VecGetArrayRead(xr,&px);
+<a name="line654">654: </a>      VecPlaceArray(w,px+offset);
+<a name="line655">655: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(pep->V,i,w);
+<a name="line656">656: </a>      VecResetArray(w);
+<a name="line657">657: </a>      VecRestoreArrayRead(xr,&px);
+<a name="line658">658: </a>    }
+<a name="line659">659: </a>  }
+<a name="line660">660: </a>  VecDestroy(&w);
+<a name="line661">661: </a>  VecDestroy(&xr);
+<a name="line662">662: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line663">663: </a>  VecDestroy(&xi);
+<a name="line664">664: </a><font color="#A020F0">#endif</font>
+<a name="line665">665: </a>  <font color="#4169E1">return</font>(0);
+<a name="line666">666: </a>}
+
+<a name="line670">670: </a><strong><font color="#4169E1"><a name="PEPExtractVectors_Linear"></a>PetscErrorCode PEPExtractVectors_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line671">671: </a>{
+<a name="line673">673: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+<a name="line674">674: </a>  
+<a name="line676">676: </a>  <font color="#4169E1">switch</font> (pep->extract) {
+<a name="line677">677: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NONE:
+<a name="line678">678: </a>    PEPLinearExtract_None(pep,ctx->eps);
+<a name="line679">679: </a>    <font color="#4169E1">break</font>;
+<a name="line680">680: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_NORM:
+<a name="line681">681: </a>    PEPLinearExtract_Norm(pep,ctx->eps);
+<a name="line682">682: </a>    <font color="#4169E1">break</font>;
+<a name="line683">683: </a>  <font color="#4169E1">case</font> PEP_EXTRACT_RESIDUAL:
+<a name="line684">684: </a>    PEPLinearExtract_Residual(pep,ctx->eps);
+<a name="line685">685: </a>    <font color="#4169E1">break</font>;
+<a name="line686">686: </a><strong><font color="#FF0000">  default:</font></strong>
+<a name="line687">687: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Extraction not implemented in this solver"</font>);
+<a name="line688">688: </a>  }
+<a name="line689">689: </a>  <font color="#4169E1">return</font>(0);
+<a name="line690">690: </a>}
+
+<a name="line694">694: </a><strong><font color="#4169E1"><a name="PEPSolve_Linear"></a>PetscErrorCode PEPSolve_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line695">695: </a>{
+<a name="line697">697: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+<a name="line698">698: </a>  PetscScalar    sigma;
+<a name="line699">699: </a>  PetscBool      flg;
+<a name="line700">700: </a>  PetscInt       i;
+
+<a name="line703">703: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(ctx->eps);
+<a name="line704">704: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(ctx->eps,&pep->nconv);
+<a name="line705">705: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(ctx->eps,&pep->its);
+<a name="line706">706: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(ctx->eps,(<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)&pep->reason);
+
+<a name="line708">708: </a>  <font color="#B22222">/* recover eigenvalues */</font>
+<a name="line709">709: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line710">710: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(ctx->eps,i,&pep->eigr[i],&pep->eigi[i],NULL,NULL);
+<a name="line711">711: </a>    pep->eigr[i] *= pep->sfactor;
+<a name="line712">712: </a>    pep->eigi[i] *= pep->sfactor;
+<a name="line713">713: </a>  }
+
+<a name="line715">715: </a>  <font color="#B22222">/* restore target */</font>
+<a name="line716">716: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTarget.html#EPSGetTarget">EPSGetTarget</a>(ctx->eps,&sigma);
+<a name="line717">717: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(ctx->eps,sigma*pep->sfactor);
+
+<a name="line719">719: </a>  <a href="../../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line720">720: </a>  <font color="#4169E1">if</font> (flg && pep->ops->backtransform) {
+<a name="line721">721: </a>    (*pep->ops->backtransform)(pep);
+<a name="line722">722: </a>  }
+<a name="line723">723: </a>  <font color="#4169E1">if</font> (pep->sfactor!=1.0) {
+<a name="line724">724: </a>    <font color="#B22222">/* Restore original values */</font>
+<a name="line725">725: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++){
+<a name="line726">726: </a>      pep->pbc[pep->nmat+i] *= pep->sfactor;
+<a name="line727">727: </a>      pep->pbc[2*pep->nmat+i] *= pep->sfactor*pep->sfactor;
+<a name="line728">728: </a>    }
+<a name="line729">729: </a>    <font color="#4169E1">if</font> (!flg && !ctx->explicitmatrix) {
+<a name="line730">730: </a>      <a href="../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(pep->st,pep->sfactor);
+<a name="line731">731: </a>    } 
 <a name="line732">732: </a>  }
-<a name="line733">733: </a>  <font color="#4169E1">return</font>(0);
-<a name="line734">734: </a>}
-
-<a name="line738">738: </a><strong><font color="#4169E1"><a name="EPSMonitor_Linear"></a>static PetscErrorCode EPSMonitor_Linear(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
-<a name="line739">739: </a>{
-<a name="line740">740: </a>  PetscInt       i;
-<a name="line741">741: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>            pep = (<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)ctx;
-<a name="line742">742: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-
-<a name="line746">746: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(nest,pep->ncv);i++) {
-<a name="line747">747: </a>    pep->eigr[i] = eigr[i];
-<a name="line748">748: </a>    pep->eigi[i] = eigi[i];
-<a name="line749">749: </a>    pep->errest[i] = errest[i];
-<a name="line750">750: </a>  }
-<a name="line751">751: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
-<a name="line752">752: </a>  <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(st,nest,pep->eigr,pep->eigi);
-<a name="line753">753: </a>  PEPMonitor(pep,its,nconv,pep->eigr,pep->eigi,pep->errest,nest);
-<a name="line754">754: </a>  <font color="#4169E1">return</font>(0);
-<a name="line755">755: </a>}
-
-<a name="line759">759: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_Linear"></a>PetscErrorCode PEPSetFromOptions_Linear(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line760">760: </a>{
-<a name="line762">762: </a>  PetscBool      set,val;
-<a name="line763">763: </a>  PetscInt       i;
-<a name="line764">764: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line767">767: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Linear Options"</font>);
-<a name="line768">768: </a>  PetscOptionsInt(<font color="#666666">"-pep_linear_cform"</font>,<font color="#666666">"Number of the companion form"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>"</font>,ctx->cform,&i,&set);
-<a name="line769">769: </a>  <font color="#4169E1">if</font> (set) {
-<a name="line770">770: </a>    <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>(pep,i);
-<a name="line771">771: </a>  }
-<a name="line772">772: </a>  PetscOptionsBool(<font color="#666666">"-pep_linear_explicitmatrix"</font>,<font color="#666666">"Use explicit matrix in linearization"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>"</font>,ctx->explicitmatrix,&val,&set);
-<a name="line773">773: </a>  <font color="#4169E1">if</font> (set) {
-<a name="line774">774: </a>    <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(pep,val);
-<a name="line775">775: </a>  }
-<a name="line776">776: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&ctx->eps); }
-<a name="line777">777: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(ctx->eps);
-<a name="line778">778: </a>  PetscOptionsTail();
-<a name="line779">779: </a>  <font color="#4169E1">return</font>(0);
-<a name="line780">780: </a>}
-
-<a name="line784">784: </a><strong><font color="#4169E1"><a name="PEPLinearSetCompanionForm_Linear"></a>static PetscErrorCode PEPLinearSetCompanionForm_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt cform)</font></strong>
-<a name="line785">785: </a>{
-<a name="line786">786: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line789">789: </a>  <font color="#4169E1">if</font> (!cform) <font color="#4169E1">return</font>(0);
-<a name="line790">790: </a>  <font color="#4169E1">if</font> (cform==PETSC_DECIDE || cform==PETSC_DEFAULT) ctx->cform = 1;
-<a name="line791">791: </a>  <font color="#4169E1">else</font> {
-<a name="line792">792: </a>    <font color="#4169E1">if</font> (cform!=1 && cform!=2) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid value of argument 'cform'"</font>);
-<a name="line793">793: </a>    ctx->cform = cform;
-<a name="line794">794: </a>  }
-<a name="line795">795: </a>  <font color="#4169E1">return</font>(0);
-<a name="line796">796: </a>}
-
-<a name="line800">800: </a><font color="#B22222">/*@</font>
-<a name="line801">801: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a> - Choose between the two companion forms available</font>
-<a name="line802">802: </a><font color="#B22222">   for the linearization of a quadratic eigenproblem.</font>
-
-<a name="line804">804: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line806">806: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line807">807: </a><font color="#B22222">+  pep   - polynomial eigenvalue solver</font>
-<a name="line808">808: </a><font color="#B22222">-  cform - 1 or 2 (first or second companion form)</font>
-
-<a name="line810">810: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line811">811: </a><font color="#B22222">.  -pep_linear_cform <int> - Choose the companion form</font>
-
-<a name="line813">813: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line815">815: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a>()</font>
-<a name="line816">816: </a><font color="#B22222">@*/</font>
-<a name="line817">817: </a><strong><font color="#4169E1"><a name="PEPLinearSetCompanionForm"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt cform)</font></strong>
-<a name="line818">818: </a>{
-
-<a name="line824">824: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearSetCompanionForm_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt),(pep,cform));
-<a name="line825">825: </a>  <font color="#4169E1">return</font>(0);
-<a name="line826">826: </a>}
-
-<a name="line830">830: </a><strong><font color="#4169E1"><a name="PEPLinearGetCompanionForm_Linear"></a>static PetscErrorCode PEPLinearGetCompanionForm_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *cform)</font></strong>
-<a name="line831">831: </a>{
-<a name="line832">832: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line835">835: </a>  *cform = ctx->cform;
-<a name="line836">836: </a>  <font color="#4169E1">return</font>(0);
-<a name="line837">837: </a>}
-
-<a name="line841">841: </a><font color="#B22222">/*@</font>
-<a name="line842">842: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a> - Returns the number of the companion form that</font>
-<a name="line843">843: </a><font color="#B22222">   will be used for the linearization of a quadratic eigenproblem.</font>
-
-<a name="line845">845: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line847">847: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line848">848: </a><font color="#B22222">.  pep  - polynomial eigenvalue solver</font>
-
-<a name="line850">850: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line851">851: </a><font color="#B22222">.  cform - the companion form number (1 or 2)</font>
-
-<a name="line853">853: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line855">855: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>()</font>
-<a name="line856">856: </a><font color="#B22222">@*/</font>
-<a name="line857">857: </a><strong><font color="#4169E1"><a name="PEPLinearGetCompanionForm"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *cform)</font></strong>
-<a name="line858">858: </a>{
-
-<a name="line864">864: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearGetCompanionForm_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*),(pep,cform));
-<a name="line865">865: </a>  <font color="#4169E1">return</font>(0);
-<a name="line866">866: </a>}
-
-<a name="line870">870: </a><strong><font color="#4169E1"><a name="PEPLinearSetExplicitMatrix_Linear"></a>static PetscErrorCode PEPLinearSetExplicitMatrix_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool explicitmatrix)</font></strong>
-<a name="line871">871: </a>{
-<a name="line872">872: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line875">875: </a>  ctx->explicitmatrix = explicitmatrix;
-<a name="line876">876: </a>  <font color="#4169E1">return</font>(0);
-<a name="line877">877: </a>}
-
-<a name="line881">881: </a><font color="#B22222">/*@</font>
-<a name="line882">882: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a> - Indicate if the matrices A and B for the</font>
-<a name="line883">883: </a><font color="#B22222">   linearization of the problem must be built explicitly.</font>
-
-<a name="line885">885: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line887">887: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line888">888: </a><font color="#B22222">+  pep      - polynomial eigenvalue solver</font>
-<a name="line889">889: </a><font color="#B22222">-  explicit - boolean flag indicating if the matrices are built explicitly</font>
-
-<a name="line891">891: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line892">892: </a><font color="#B22222">.  -pep_linear_explicitmatrix <boolean> - Indicates the boolean flag</font>
-
-<a name="line894">894: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line896">896: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a>()</font>
-<a name="line897">897: </a><font color="#B22222">@*/</font>
-<a name="line898">898: </a><strong><font color="#4169E1"><a name="PEPLinearSetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool explicitmatrix)</font></strong>
-<a name="line899">899: </a>{
+<a name="line733">733: </a>  <a href="../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(pep->rg);
+<a name="line734">734: </a>  <font color="#4169E1">return</font>(0);
+<a name="line735">735: </a>}
+
+<a name="line739">739: </a><strong><font color="#4169E1"><a name="EPSMonitor_Linear"></a>static PetscErrorCode EPSMonitor_Linear(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line740">740: </a>{
+<a name="line741">741: </a>  PetscInt       i;
+<a name="line742">742: </a>  <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>            pep = (<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>)ctx;
+<a name="line743">743: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line747">747: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(nest,pep->ncv);i++) {
+<a name="line748">748: </a>    pep->eigr[i] = eigr[i];
+<a name="line749">749: </a>    pep->eigi[i] = eigi[i];
+<a name="line750">750: </a>    pep->errest[i] = errest[i];
+<a name="line751">751: </a>  }
+<a name="line752">752: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(eps,&st);
+<a name="line753">753: </a>  <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(st,nest,pep->eigr,pep->eigi);
+<a name="line754">754: </a>  PEPMonitor(pep,its,nconv,pep->eigr,pep->eigi,pep->errest,nest);
+<a name="line755">755: </a>  <font color="#4169E1">return</font>(0);
+<a name="line756">756: </a>}
+
+<a name="line760">760: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions_Linear"></a>PetscErrorCode PEPSetFromOptions_Linear(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line761">761: </a>{
+<a name="line763">763: </a>  PetscBool      set,val;
+<a name="line764">764: </a>  PetscInt       i;
+<a name="line765">765: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line768">768: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Linear Options"</font>);
+<a name="line769">769: </a>  PetscOptionsInt(<font color="#666666">"-pep_linear_cform"</font>,<font color="#666666">"Number of the companion form"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>"</font>,ctx->cform,&i,&set);
+<a name="line770">770: </a>  <font color="#4169E1">if</font> (set) {
+<a name="line771">771: </a>    <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>(pep,i);
+<a name="line772">772: </a>  }
+<a name="line773">773: </a>  PetscOptionsBool(<font color="#666666">"-pep_linear_explicitmatrix"</font>,<font color="#666666">"Use explicit matrix in linearization"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>"</font>,ctx->explicitmatrix,&val,&set);
+<a name="line774">774: </a>  <font color="#4169E1">if</font> (set) {
+<a name="line775">775: </a>    <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(pep,val);
+<a name="line776">776: </a>  }
+<a name="line777">777: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&ctx->eps); }
+<a name="line778">778: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(ctx->eps);
+<a name="line779">779: </a>  PetscOptionsTail();
+<a name="line780">780: </a>  <font color="#4169E1">return</font>(0);
+<a name="line781">781: </a>}
+
+<a name="line785">785: </a><strong><font color="#4169E1"><a name="PEPLinearSetCompanionForm_Linear"></a>static PetscErrorCode PEPLinearSetCompanionForm_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt cform)</font></strong>
+<a name="line786">786: </a>{
+<a name="line787">787: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line790">790: </a>  <font color="#4169E1">if</font> (!cform) <font color="#4169E1">return</font>(0);
+<a name="line791">791: </a>  <font color="#4169E1">if</font> (cform==PETSC_DECIDE || cform==PETSC_DEFAULT) ctx->cform = 1;
+<a name="line792">792: </a>  <font color="#4169E1">else</font> {
+<a name="line793">793: </a>    <font color="#4169E1">if</font> (cform!=1 && cform!=2) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid value of argument 'cform'"</font>);
+<a name="line794">794: </a>    ctx->cform = cform;
+<a name="line795">795: </a>  }
+<a name="line796">796: </a>  <font color="#4169E1">return</font>(0);
+<a name="line797">797: </a>}
+
+<a name="line801">801: </a><font color="#B22222">/*@</font>
+<a name="line802">802: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a> - Choose between the two companion forms available</font>
+<a name="line803">803: </a><font color="#B22222">   for the linearization of a quadratic eigenproblem.</font>
+
+<a name="line805">805: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line807">807: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line808">808: </a><font color="#B22222">+  pep   - polynomial eigenvalue solver</font>
+<a name="line809">809: </a><font color="#B22222">-  cform - 1 or 2 (first or second companion form)</font>
+
+<a name="line811">811: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line812">812: </a><font color="#B22222">.  -pep_linear_cform <int> - Choose the companion form</font>
+
+<a name="line814">814: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line816">816: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a>()</font>
+<a name="line817">817: </a><font color="#B22222">@*/</font>
+<a name="line818">818: </a><strong><font color="#4169E1"><a name="PEPLinearSetCompanionForm"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt cform)</font></strong>
+<a name="line819">819: </a>{
+
+<a name="line825">825: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearSetCompanionForm_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt),(pep,cform));
+<a name="line826">826: </a>  <font color="#4169E1">return</font>(0);
+<a name="line827">827: </a>}
+
+<a name="line831">831: </a><strong><font color="#4169E1"><a name="PEPLinearGetCompanionForm_Linear"></a>static PetscErrorCode PEPLinearGetCompanionForm_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *cform)</font></strong>
+<a name="line832">832: </a>{
+<a name="line833">833: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line836">836: </a>  *cform = ctx->cform;
+<a name="line837">837: </a>  <font color="#4169E1">return</font>(0);
+<a name="line838">838: </a>}
+
+<a name="line842">842: </a><font color="#B22222">/*@</font>
+<a name="line843">843: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a> - Returns the number of the companion form that</font>
+<a name="line844">844: </a><font color="#B22222">   will be used for the linearization of a quadratic eigenproblem.</font>
+
+<a name="line846">846: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line848">848: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line849">849: </a><font color="#B22222">.  pep  - polynomial eigenvalue solver</font>
+
+<a name="line851">851: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line852">852: </a><font color="#B22222">.  cform - the companion form number (1 or 2)</font>
+
+<a name="line854">854: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line856">856: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearSetCompanionForm.html#PEPLinearSetCompanionForm">PEPLinearSetCompanionForm</a>()</font>
+<a name="line857">857: </a><font color="#B22222">@*/</font>
+<a name="line858">858: </a><strong><font color="#4169E1"><a name="PEPLinearGetCompanionForm"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearGetCompanionForm.html#PEPLinearGetCompanionForm">PEPLinearGetCompanionForm</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *cform)</font></strong>
+<a name="line859">859: </a>{
+
+<a name="line865">865: </a>  PetscUseMethod(pep,<font color="#666666">"PEPLinearGetCompanionForm_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt*),(pep,cform));
+<a name="line866">866: </a>  <font color="#4169E1">return</font>(0);
+<a name="line867">867: </a>}
+
+<a name="line871">871: </a><strong><font color="#4169E1"><a name="PEPLinearSetExplicitMatrix_Linear"></a>static PetscErrorCode PEPLinearSetExplicitMatrix_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool explicitmatrix)</font></strong>
+<a name="line872">872: </a>{
+<a name="line873">873: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line876">876: </a>  ctx->explicitmatrix = explicitmatrix;
+<a name="line877">877: </a>  <font color="#4169E1">return</font>(0);
+<a name="line878">878: </a>}
+
+<a name="line882">882: </a><font color="#B22222">/*@</font>
+<a name="line883">883: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a> - Indicate if the matrices A and B for the</font>
+<a name="line884">884: </a><font color="#B22222">   linearization of the problem must be built explicitly.</font>
+
+<a name="line886">886: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line888">888: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line889">889: </a><font color="#B22222">+  pep      - polynomial eigenvalue solver</font>
+<a name="line890">890: </a><font color="#B22222">-  explicit - boolean flag indicating if the matrices are built explicitly</font>
+
+<a name="line892">892: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line893">893: </a><font color="#B22222">.  -pep_linear_explicitmatrix <boolean> - Indicates the boolean flag</font>
+
+<a name="line895">895: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line897">897: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a>()</font>
+<a name="line898">898: </a><font color="#B22222">@*/</font>
+<a name="line899">899: </a><strong><font color="#4169E1"><a name="PEPLinearSetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool explicitmatrix)</font></strong>
+<a name="line900">900: </a>{
 
-<a name="line905">905: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearSetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,explicitmatrix));
-<a name="line906">906: </a>  <font color="#4169E1">return</font>(0);
-<a name="line907">907: </a>}
+<a name="line906">906: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearSetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool),(pep,explicitmatrix));
+<a name="line907">907: </a>  <font color="#4169E1">return</font>(0);
+<a name="line908">908: </a>}
 
-<a name="line911">911: </a><strong><font color="#4169E1"><a name="PEPLinearGetExplicitMatrix_Linear"></a>static PetscErrorCode PEPLinearGetExplicitMatrix_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *explicitmatrix)</font></strong>
-<a name="line912">912: </a>{
-<a name="line913">913: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
+<a name="line912">912: </a><strong><font color="#4169E1"><a name="PEPLinearGetExplicitMatrix_Linear"></a>static PetscErrorCode PEPLinearGetExplicitMatrix_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *explicitmatrix)</font></strong>
+<a name="line913">913: </a>{
+<a name="line914">914: </a>  PEP_LINEAR *ctx = (PEP_LINEAR*)pep->data;
 
-<a name="line916">916: </a>  *explicitmatrix = ctx->explicitmatrix;
-<a name="line917">917: </a>  <font color="#4169E1">return</font>(0);
-<a name="line918">918: </a>}
+<a name="line917">917: </a>  *explicitmatrix = ctx->explicitmatrix;
+<a name="line918">918: </a>  <font color="#4169E1">return</font>(0);
+<a name="line919">919: </a>}
 
-<a name="line922">922: </a><font color="#B22222">/*@</font>
-<a name="line923">923: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a> - Returns the flag indicating if the matrices</font>
-<a name="line924">924: </a><font color="#B22222">   A and B for the linearization are built explicitly.</font>
+<a name="line923">923: </a><font color="#B22222">/*@</font>
+<a name="line924">924: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a> - Returns the flag indicating if the matrices</font>
+<a name="line925">925: </a><font color="#B22222">   A and B for the linearization are built explicitly.</font>
 
-<a name="line926">926: </a><font color="#B22222">   Not Collective</font>
+<a name="line927">927: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line928">928: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line929">929: </a><font color="#B22222">.  pep  - polynomial eigenvalue solver</font>
+<a name="line929">929: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line930">930: </a><font color="#B22222">.  pep  - polynomial eigenvalue solver</font>
 
-<a name="line931">931: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line932">932: </a><font color="#B22222">.  explicitmatrix - the mode flag</font>
+<a name="line932">932: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line933">933: </a><font color="#B22222">.  explicitmatrix - the mode flag</font>
 
-<a name="line934">934: </a><font color="#B22222">   Level: advanced</font>
+<a name="line935">935: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line936">936: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>()</font>
-<a name="line937">937: </a><font color="#B22222">@*/</font>
-<a name="line938">938: </a><strong><font color="#4169E1"><a name="PEPLinearGetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *explicitmatrix)</font></strong>
-<a name="line939">939: </a>{
+<a name="line937">937: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearSetExplicitMatrix.html#PEPLinearSetExplicitMatrix">PEPLinearSetExplicitMatrix</a>()</font>
+<a name="line938">938: </a><font color="#B22222">@*/</font>
+<a name="line939">939: </a><strong><font color="#4169E1"><a name="PEPLinearGetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearGetExplicitMatrix.html#PEPLinearGetExplicitMatrix">PEPLinearGetExplicitMatrix</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *explicitmatrix)</font></strong>
+<a name="line940">940: </a>{
 
-<a name="line945">945: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearGetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,explicitmatrix));
-<a name="line946">946: </a>  <font color="#4169E1">return</font>(0);
-<a name="line947">947: </a>}
-
-<a name="line951">951: </a><strong><font color="#4169E1"><a name="PEPLinearSetEPS_Linear"></a>static PetscErrorCode PEPLinearSetEPS_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line952">952: </a>{
-<a name="line954">954: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line957">957: </a>  PetscObjectReference((PetscObject)eps);
-<a name="line958">958: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
-<a name="line959">959: </a>  ctx->eps = eps;
-<a name="line960">960: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->eps);
-<a name="line961">961: </a>  pep->state = PEP_STATE_INITIAL;
-<a name="line962">962: </a>  <font color="#4169E1">return</font>(0);
-<a name="line963">963: </a>}
-
-<a name="line967">967: </a><font color="#B22222">/*@</font>
-<a name="line968">968: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a> - Associate an eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
-<a name="line969">969: </a><font color="#B22222">   polynomial eigenvalue solver.</font>
-
-<a name="line971">971: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line973">973: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line974">974: </a><font color="#B22222">+  pep - polynomial eigenvalue solver</font>
-<a name="line975">975: </a><font color="#B22222">-  eps - the eigensolver object</font>
-
-<a name="line977">977: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line979">979: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>()</font>
-<a name="line980">980: </a><font color="#B22222">@*/</font>
-<a name="line981">981: </a><strong><font color="#4169E1"><a name="PEPLinearSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line982">982: </a>{
-
-<a name="line989">989: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearSetEPS_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(pep,eps));
-<a name="line990">990: </a>  <font color="#4169E1">return</font>(0);
-<a name="line991">991: </a>}
-
-<a name="line995">995: </a><strong><font color="#4169E1"><a name="PEPLinearGetEPS_Linear"></a>static PetscErrorCode PEPLinearGetEPS_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line996">996: </a>{
-<a name="line998">998: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-<a name="line999">999: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-
-<a name="line1002">1002: </a>  <font color="#4169E1">if</font> (!ctx->eps) {
-<a name="line1003">1003: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)pep),&ctx->eps);
-<a name="line1004">1004: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(ctx->eps,((PetscObject)pep)->prefix);
-<a name="line1005">1005: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(ctx->eps,<font color="#666666">"pep_"</font>);
-<a name="line1006">1006: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
-<a name="line1007">1007: </a>    <a href="../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(st,((PetscObject)ctx->eps)->prefix);
-<a name="line1008">1008: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->eps,(PetscObject)pep,1);
-<a name="line1009">1009: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->eps);
-<a name="line1010">1010: </a>    <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(ctx->eps,EPSMonitor_Linear,pep,NULL);
-<a name="line1011">1011: </a>  }
-<a name="line1012">1012: </a>  *eps = ctx->eps;
-<a name="line1013">1013: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1014">1014: </a>}
-
-<a name="line1018">1018: </a><font color="#B22222">/*@</font>
-<a name="line1019">1019: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a> - Retrieve the eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
-<a name="line1020">1020: </a><font color="#B22222">   to the polynomial eigenvalue solver.</font>
-
-<a name="line1022">1022: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1024">1024: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1025">1025: </a><font color="#B22222">.  pep - polynomial eigenvalue solver</font>
-
-<a name="line1027">1027: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1028">1028: </a><font color="#B22222">.  eps - the eigensolver object</font>
-
-<a name="line1030">1030: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1032">1032: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a>()</font>
-<a name="line1033">1033: </a><font color="#B22222">@*/</font>
-<a name="line1034">1034: </a><strong><font color="#4169E1"><a name="PEPLinearGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line1035">1035: </a>{
-
-<a name="line1041">1041: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearGetEPS_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(pep,eps));
-<a name="line1042">1042: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1043">1043: </a>}
-
-<a name="line1047">1047: </a><strong><font color="#4169E1"><a name="PEPView_Linear"></a>PetscErrorCode PEPView_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line1048">1048: </a>{
-<a name="line1050">1050: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line1053">1053: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&ctx->eps); }
-<a name="line1054">1054: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Linear: %s matrices\n"</font>,ctx->explicitmatrix? <font color="#666666">"explicit"</font>: <font color="#666666">"implicit"</font>);
-<a name="line1055">1055: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Linear: %s companion form\n"</font>,ctx->cform==1? <font color="#666666">"1st"</font>: <font color="#666666">"2nd"</font>);
-<a name="line1056">1056: </a>  PetscViewerASCIIPushTab(viewer);
-<a name="line1057">1057: </a>  <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(ctx->eps,viewer);
-<a name="line1058">1058: </a>  PetscViewerASCIIPopTab(viewer);
-<a name="line1059">1059: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1060">1060: </a>}
-
-<a name="line1064">1064: </a><strong><font color="#4169E1"><a name="PEPReset_Linear"></a>PetscErrorCode PEPReset_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line1065">1065: </a>{
-<a name="line1067">1067: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line1070">1070: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(ctx->eps); }
-<a name="line1071">1071: </a>  MatDestroy(&ctx->A);
-<a name="line1072">1072: </a>  MatDestroy(&ctx->B);
-<a name="line1073">1073: </a>  VecDestroy(&ctx->w[0]);
-<a name="line1074">1074: </a>  VecDestroy(&ctx->w[1]);
-<a name="line1075">1075: </a>  VecDestroy(&ctx->w[2]);
-<a name="line1076">1076: </a>  VecDestroy(&ctx->w[3]);
-<a name="line1077">1077: </a>  VecDestroy(&ctx->w[4]);
-<a name="line1078">1078: </a>  VecDestroy(&ctx->w[5]);
-<a name="line1079">1079: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1080">1080: </a>}
-
-<a name="line1084">1084: </a><strong><font color="#4169E1"><a name="PEPDestroy_Linear"></a>PetscErrorCode PEPDestroy_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line1085">1085: </a>{
-<a name="line1087">1087: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
-
-<a name="line1090">1090: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
-<a name="line1091">1091: </a>  PetscFree(pep->data);
-<a name="line1092">1092: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetCompanionForm_C"</font>,NULL);
-<a name="line1093">1093: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetCompanionForm_C"</font>,NULL);
-<a name="line1094">1094: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetEPS_C"</font>,NULL);
-<a name="line1095">1095: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetEPS_C"</font>,NULL);
-<a name="line1096">1096: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetExplicitMatrix_C"</font>,NULL);
-<a name="line1097">1097: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetExplicitMatrix_C"</font>,NULL);
-<a name="line1098">1098: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1099">1099: </a>}
-
-<a name="line1103">1103: </a><strong><font color="#4169E1"><a name="PEPCreate_Linear"></a>PETSC_EXTERN PetscErrorCode PEPCreate_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line1104">1104: </a>{
-<a name="line1106">1106: </a>  PEP_LINEAR     *ctx;
-
-<a name="line1109">1109: </a>  PetscNewLog(pep,&ctx);
-<a name="line1110">1110: </a>  ctx->explicitmatrix = PETSC_FALSE;
-<a name="line1111">1111: </a>  pep->data = (void*)ctx;
-
-<a name="line1113">1113: </a>  pep->ops->solve          = PEPSolve_Linear;
-<a name="line1114">1114: </a>  pep->ops->setup          = PEPSetUp_Linear;
-<a name="line1115">1115: </a>  pep->ops->setfromoptions = PEPSetFromOptions_Linear;
-<a name="line1116">1116: </a>  pep->ops->destroy        = PEPDestroy_Linear;
-<a name="line1117">1117: </a>  pep->ops->reset          = PEPReset_Linear;
-<a name="line1118">1118: </a>  pep->ops->view           = PEPView_Linear;
-<a name="line1119">1119: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
-<a name="line1120">1120: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
-<a name="line1121">1121: </a>  pep->ops->extractvectors = PEPExtractVectors_Linear;
-<a name="line1122">1122: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetCompanionForm_C"</font>,PEPLinearSetCompanionForm_Linear);
-<a name="line1123">1123: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetCompanionForm_C"</font>,PEPLinearGetCompanionForm_Linear);
-<a name="line1124">1124: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetEPS_C"</font>,PEPLinearSetEPS_Linear);
-<a name="line1125">1125: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetEPS_C"</font>,PEPLinearGetEPS_Linear);
-<a name="line1126">1126: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetExplicitMatrix_C"</font>,PEPLinearSetExplicitMatrix_Linear);
-<a name="line1127">1127: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetExplicitMatrix_C"</font>,PEPLinearGetExplicitMatrix_Linear);
-<a name="line1128">1128: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1129">1129: </a>}
+<a name="line946">946: </a>  PetscUseMethod(pep,<font color="#666666">"PEPLinearGetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscBool*),(pep,explicitmatrix));
+<a name="line947">947: </a>  <font color="#4169E1">return</font>(0);
+<a name="line948">948: </a>}
+
+<a name="line952">952: </a><strong><font color="#4169E1"><a name="PEPLinearSetEPS_Linear"></a>static PetscErrorCode PEPLinearSetEPS_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line953">953: </a>{
+<a name="line955">955: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line958">958: </a>  PetscObjectReference((PetscObject)eps);
+<a name="line959">959: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
+<a name="line960">960: </a>  ctx->eps = eps;
+<a name="line961">961: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->eps);
+<a name="line962">962: </a>  pep->state = PEP_STATE_INITIAL;
+<a name="line963">963: </a>  <font color="#4169E1">return</font>(0);
+<a name="line964">964: </a>}
+
+<a name="line968">968: </a><font color="#B22222">/*@</font>
+<a name="line969">969: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a> - Associate an eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
+<a name="line970">970: </a><font color="#B22222">   polynomial eigenvalue solver.</font>
+
+<a name="line972">972: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line974">974: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line975">975: </a><font color="#B22222">+  pep - polynomial eigenvalue solver</font>
+<a name="line976">976: </a><font color="#B22222">-  eps - the eigensolver object</font>
+
+<a name="line978">978: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line980">980: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>()</font>
+<a name="line981">981: </a><font color="#B22222">@*/</font>
+<a name="line982">982: </a><strong><font color="#4169E1"><a name="PEPLinearSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line983">983: </a>{
+
+<a name="line990">990: </a>  PetscTryMethod(pep,<font color="#666666">"PEPLinearSetEPS_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(pep,eps));
+<a name="line991">991: </a>  <font color="#4169E1">return</font>(0);
+<a name="line992">992: </a>}
+
+<a name="line996">996: </a><strong><font color="#4169E1"><a name="PEPLinearGetEPS_Linear"></a>static PetscErrorCode PEPLinearGetEPS_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line997">997: </a>{
+<a name="line999">999: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+<a name="line1000">1000: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line1003">1003: </a>  <font color="#4169E1">if</font> (!ctx->eps) {
+<a name="line1004">1004: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)pep),&ctx->eps);
+<a name="line1005">1005: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(ctx->eps,((PetscObject)pep)->prefix);
+<a name="line1006">1006: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(ctx->eps,<font color="#666666">"pep_linear_"</font>);
+<a name="line1007">1007: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(ctx->eps,&st);
+<a name="line1008">1008: </a>    <a href="../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(st,((PetscObject)ctx->eps)->prefix);
+<a name="line1009">1009: </a>    PetscObjectIncrementTabLevel((PetscObject)ctx->eps,(PetscObject)pep,1);
+<a name="line1010">1010: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)ctx->eps);
+<a name="line1011">1011: </a>    <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(ctx->eps,EPSMonitor_Linear,pep,NULL);
+<a name="line1012">1012: </a>  }
+<a name="line1013">1013: </a>  *eps = ctx->eps;
+<a name="line1014">1014: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1015">1015: </a>}
+
+<a name="line1019">1019: </a><font color="#B22222">/*@</font>
+<a name="line1020">1020: </a><font color="#B22222">   <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a> - Retrieve the eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
+<a name="line1021">1021: </a><font color="#B22222">   to the polynomial eigenvalue solver.</font>
+
+<a name="line1023">1023: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1025">1025: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1026">1026: </a><font color="#B22222">.  pep - polynomial eigenvalue solver</font>
+
+<a name="line1028">1028: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1029">1029: </a><font color="#B22222">.  eps - the eigensolver object</font>
+
+<a name="line1031">1031: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1033">1033: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/PEP/PEPLinearSetEPS.html#PEPLinearSetEPS">PEPLinearSetEPS</a>()</font>
+<a name="line1034">1034: </a><font color="#B22222">@*/</font>
+<a name="line1035">1035: </a><strong><font color="#4169E1"><a name="PEPLinearGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line1036">1036: </a>{
+
+<a name="line1042">1042: </a>  PetscUseMethod(pep,<font color="#666666">"PEPLinearGetEPS_C"</font>,(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(pep,eps));
+<a name="line1043">1043: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1044">1044: </a>}
+
+<a name="line1048">1048: </a><strong><font color="#4169E1"><a name="PEPView_Linear"></a>PetscErrorCode PEPView_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line1049">1049: </a>{
+<a name="line1051">1051: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+<a name="line1052">1052: </a>  PetscBool      isascii;
+
+<a name="line1055">1055: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line1056">1056: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line1057">1057: </a>    <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&ctx->eps); }
+<a name="line1058">1058: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Linear: %s matrices\n"</font>,ctx->explicitmatrix? <font color="#666666">"explicit"</font>: <font color="#666666">"implicit"</font>);
+<a name="line1059">1059: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Linear: %s companion form\n"</font>,ctx->cform==1? <font color="#666666">"1st"</font>: <font color="#666666">"2nd"</font>);
+<a name="line1060">1060: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line1061">1061: </a>    <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(ctx->eps,viewer);
+<a name="line1062">1062: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line1063">1063: </a>  }
+<a name="line1064">1064: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1065">1065: </a>}
+
+<a name="line1069">1069: </a><strong><font color="#4169E1"><a name="PEPReset_Linear"></a>PetscErrorCode PEPReset_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1070">1070: </a>{
+<a name="line1072">1072: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line1075">1075: </a>  <font color="#4169E1">if</font> (!ctx->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(ctx->eps); }
+<a name="line1076">1076: </a>  MatDestroy(&ctx->A);
+<a name="line1077">1077: </a>  MatDestroy(&ctx->B);
+<a name="line1078">1078: </a>  VecDestroy(&ctx->w[0]);
+<a name="line1079">1079: </a>  VecDestroy(&ctx->w[1]);
+<a name="line1080">1080: </a>  VecDestroy(&ctx->w[2]);
+<a name="line1081">1081: </a>  VecDestroy(&ctx->w[3]);
+<a name="line1082">1082: </a>  VecDestroy(&ctx->w[4]);
+<a name="line1083">1083: </a>  VecDestroy(&ctx->w[5]);
+<a name="line1084">1084: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1085">1085: </a>}
+
+<a name="line1089">1089: </a><strong><font color="#4169E1"><a name="PEPDestroy_Linear"></a>PetscErrorCode PEPDestroy_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1090">1090: </a>{
+<a name="line1092">1092: </a>  PEP_LINEAR     *ctx = (PEP_LINEAR*)pep->data;
+
+<a name="line1095">1095: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&ctx->eps);
+<a name="line1096">1096: </a>  PetscFree(pep->data);
+<a name="line1097">1097: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetCompanionForm_C"</font>,NULL);
+<a name="line1098">1098: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetCompanionForm_C"</font>,NULL);
+<a name="line1099">1099: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetEPS_C"</font>,NULL);
+<a name="line1100">1100: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetEPS_C"</font>,NULL);
+<a name="line1101">1101: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetExplicitMatrix_C"</font>,NULL);
+<a name="line1102">1102: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetExplicitMatrix_C"</font>,NULL);
+<a name="line1103">1103: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1104">1104: </a>}
+
+<a name="line1108">1108: </a><strong><font color="#4169E1"><a name="PEPCreate_Linear"></a>PETSC_EXTERN PetscErrorCode PEPCreate_Linear(<a href="../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line1109">1109: </a>{
+<a name="line1111">1111: </a>  PEP_LINEAR     *ctx;
+
+<a name="line1114">1114: </a>  PetscNewLog(pep,&ctx);
+<a name="line1115">1115: </a>  ctx->explicitmatrix = PETSC_FALSE;
+<a name="line1116">1116: </a>  pep->data = (void*)ctx;
+
+<a name="line1118">1118: </a>  pep->ops->solve          = PEPSolve_Linear;
+<a name="line1119">1119: </a>  pep->ops->setup          = PEPSetUp_Linear;
+<a name="line1120">1120: </a>  pep->ops->setfromoptions = PEPSetFromOptions_Linear;
+<a name="line1121">1121: </a>  pep->ops->destroy        = PEPDestroy_Linear;
+<a name="line1122">1122: </a>  pep->ops->reset          = PEPReset_Linear;
+<a name="line1123">1123: </a>  pep->ops->view           = PEPView_Linear;
+<a name="line1124">1124: </a>  pep->ops->backtransform  = PEPBackTransform_Default;
+<a name="line1125">1125: </a>  pep->ops->computevectors = PEPComputeVectors_Default;
+<a name="line1126">1126: </a>  pep->ops->extractvectors = PEPExtractVectors_Linear;
+<a name="line1127">1127: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetCompanionForm_C"</font>,PEPLinearSetCompanionForm_Linear);
+<a name="line1128">1128: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetCompanionForm_C"</font>,PEPLinearGetCompanionForm_Linear);
+<a name="line1129">1129: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetEPS_C"</font>,PEPLinearSetEPS_Linear);
+<a name="line1130">1130: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetEPS_C"</font>,PEPLinearGetEPS_Linear);
+<a name="line1131">1131: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearSetExplicitMatrix_C"</font>,PEPLinearSetExplicitMatrix_Linear);
+<a name="line1132">1132: </a>  PetscObjectComposeFunction((PetscObject)pep,<font color="#666666">"PEPLinearGetExplicitMatrix_C"</font>,PEPLinearGetExplicitMatrix_Linear);
+<a name="line1133">1133: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1134">1134: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/impls/linear/linearp.h b/src/pep/impls/linear/linearp.h
index ae1545b..d4b43ed 100644
--- a/src/pep/impls/linear/linearp.h
+++ b/src/pep/impls/linear/linearp.h
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/pep/impls/linear/linearp.h.html b/src/pep/impls/linear/linearp.h.html
index a564d9b..cc18b9c 100644
--- a/src/pep/impls/linear/linearp.h.html
+++ b/src/pep/impls/linear/linearp.h.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/linear/linearp.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:58+00:00">
+<meta name="date" content="2016-05-16T10:33:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/linear/linearp.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/linear/linearp.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private header for PEPLINEAR.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/pep/impls/linear/makefile b/src/pep/impls/linear/makefile
index 3dc6299..df90754 100644
--- a/src/pep/impls/linear/makefile
+++ b/src/pep/impls/linear/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/linear/makefile.html b/src/pep/impls/linear/makefile.html
index bd51226..6f7a3d5 100644
--- a/src/pep/impls/linear/makefile.html
+++ b/src/pep/impls/linear/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/linear/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:58+00:00">
+<meta name="date" content="2016-05-16T10:33:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/linear/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/linear/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/impls/linear/qeplin.c b/src/pep/impls/linear/qeplin.c
index 11b45c3..31236ec 100644
--- a/src/pep/impls/linear/qeplin.c
+++ b/src/pep/impls/linear/qeplin.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/pep/impls/linear/qeplin.c.html b/src/pep/impls/linear/qeplin.c.html
index a8cdf20..8f46695 100644
--- a/src/pep/impls/linear/qeplin.c.html
+++ b/src/pep/impls/linear/qeplin.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/linear/qeplin.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:57+00:00">
+<meta name="date" content="2016-05-16T10:33:56+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/linear/qeplin.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/linear/qeplin.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   Various types of linearization for quadratic eigenvalue problem.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/pep/impls/makefile b/src/pep/impls/makefile
index 59bf5cd..02fb461 100644
--- a/src/pep/impls/makefile
+++ b/src/pep/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/impls/makefile.html b/src/pep/impls/makefile.html
index 69af220..bbec87b 100644
--- a/src/pep/impls/makefile.html
+++ b/src/pep/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:56+00:00">
+<meta name="date" content="2016-05-16T10:33:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/index.html b/src/pep/index.html
index 35b4f49..fd30cb8 100644
--- a/src/pep/index.html
+++ b/src/pep/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/interface/dlregispep.c b/src/pep/interface/dlregispep.c
index 39e7426..7785a83 100644
--- a/src/pep/interface/dlregispep.c
+++ b/src/pep/interface/dlregispep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -26,10 +26,11 @@ static PetscBool PEPPackageInitialized = PETSC_FALSE;
 const char *PEPBasisTypes[] = {"MONOMIAL","CHEBYSHEV1","CHEBYSHEV2","LEGENDRE","LAGUERRE","HERMITE","PEPBasis","PEP_BASIS_",0};
 const char *PEPScaleTypes[] = {"NONE","SCALAR","DIAGONAL","BOTH","PEPScale","PEP_SCALE_",0};
 const char *PEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","PEPRefine","PEP_REFINE_",0};
+const char *PEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","PEPRefineScheme","PEP_REFINE_SCHEME_",0};
 const char *PEPExtractTypes[] = {"","NONE","NORM","RESIDUAL","STRUCTURED","PEPExtract","PEP_EXTRACT_",0};
 const char *PEPErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","PEPErrorType","PEP_ERROR_",0};
-const char *const PEPConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","PEPConvergedReason","PEP_",0};
-const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 5;
+const char *const PEPConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","PEPConvergedReason","PEP_",0};
+const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 4;
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPFinalizePackage"
@@ -82,7 +83,7 @@ PetscErrorCode PEPInitializePackage(void)
   ierr = PetscLogEventRegister("PEPSolve",PEP_CLASSID,&PEP_Solve);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("PEPRefine",PEP_CLASSID,&PEP_Refine);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"pep",&className);CHKERRQ(ierr);
     if (className) {
@@ -90,7 +91,7 @@ PetscErrorCode PEPInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"pep",&className);CHKERRQ(ierr);
     if (className) {
diff --git a/src/pep/interface/dlregispep.c.html b/src/pep/interface/dlregispep.c.html
index e419c53..ded828a 100644
--- a/src/pep/interface/dlregispep.c.html
+++ b/src/pep/interface/dlregispep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/dlregispep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:55+00:00">
+<meta name="date" content="2016-05-16T10:33:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/dlregispep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/dlregispep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -38,89 +38,90 @@
 <a name="line26"> 26: </a>const char *PEPBasisTypes[] = {<font color="#666666">"MONOMIAL"</font>,<font color="#666666">"CHEBYSHEV1"</font>,<font color="#666666">"CHEBYSHEV2"</font>,<font color="#666666">"LEGENDRE"</font>,<font color="#666666">"LAGUERRE"</font>,<font color="#666666">"HERMITE"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>"</font>,<font color="#666666">"PEP_BASIS_"</font>,0};
 <a name="line27"> 27: </a>const char *PEPScaleTypes[] = {<font color="#666666">"NONE"</font>,<font color="#666666">"SCALAR"</font>,<font color="#666666">"DIAGONAL"</font>,<font color="#666666">"BOTH"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a>"</font>,<font color="#666666">"PEP_SCALE_"</font>,0};
 <a name="line28"> 28: </a>const char *PEPRefineTypes[] = {<font color="#666666">"NONE"</font>,<font color="#666666">"SIMPLE"</font>,<font color="#666666">"MULTIPLE"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>"</font>,<font color="#666666">"PEP_REFINE_"</font>,0};
-<a name="line29"> 29: </a>const char *PEPExtractTypes[] = {<font color="#666666">""</font>,<font color="#666666">"NONE"</font>,<font color="#666666">"NORM"</font>,<font color="#666666">"RESIDUAL"</font>,<font color="#666666">"STRUCTURED"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>"</font>,<font color="#666666">"PEP_EXTRACT_"</font>,0};
-<a name="line30"> 30: </a>const char *PEPErrorTypes[] = {<font color="#666666">"ABSOLUTE"</font>,<font color="#666666">"RELATIVE"</font>,<font color="#666666">"BACKWARD"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>"</font>,<font color="#666666">"PEP_ERROR_"</font>,0};
-<a name="line31"> 31: </a>const char *const PEPConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_SYMMETRY_LOST"</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">""</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPConvergedR [...]
-<a name="line32"> 32: </a>const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 5;
-
-<a name="line36"> 36: </a><font color="#B22222">/*@C</font>
-<a name="line37"> 37: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</a> - This function destroys everything in the Slepc interface</font>
-<a name="line38"> 38: </a><font color="#B22222">   to the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> package. It is called from <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
-
-<a name="line40"> 40: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line42"> 42: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
-<a name="line43"> 43: </a><font color="#B22222">@*/</font>
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="PEPFinalizePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</a>(void)</font></strong>
-<a name="line45"> 45: </a>{
-
-<a name="line49"> 49: </a>  PetscFunctionListDestroy(&PEPList);
-<a name="line50"> 50: </a>  PEPPackageInitialized = PETSC_FALSE;
-<a name="line51"> 51: </a>  PEPRegisterAllCalled  = PETSC_FALSE;
-<a name="line52"> 52: </a>  <font color="#4169E1">return</font>(0);
-<a name="line53"> 53: </a>}
-
-<a name="line57"> 57: </a><font color="#B22222">/*@C</font>
-<a name="line58"> 58: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</a> - This function initializes everything in the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> package.</font>
-<a name="line59"> 59: </a><font color="#B22222">   It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
-<a name="line60"> 60: </a><font color="#B22222">   on the first call to <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>() when using static libraries.</font>
-
-<a name="line62"> 62: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line64"> 64: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
-<a name="line65"> 65: </a><font color="#B22222">@*/</font>
-<a name="line66"> 66: </a><strong><font color="#4169E1"><a name="PEPInitializePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</a>(void)</font></strong>
-<a name="line67"> 67: </a>{
-<a name="line68"> 68: </a>  char           logList[256];
-<a name="line69"> 69: </a>  char           *className;
-<a name="line70"> 70: </a>  PetscBool      opt;
-
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (PEPPackageInitialized) <font color="#4169E1">return</font>(0);
-<a name="line75"> 75: </a>  PEPPackageInitialized = PETSC_TRUE;
-<a name="line76"> 76: </a>  <font color="#B22222">/* Register Classes */</font>
-<a name="line77"> 77: </a>  PetscClassIdRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Solver"</font>,&PEP_CLASSID);
-<a name="line78"> 78: </a>  <font color="#B22222">/* Register Constructors */</font>
-<a name="line79"> 79: </a>  <a href="../../../docs/manualpages/PEP/PEPRegisterAll.html#PEPRegisterAll">PEPRegisterAll</a>();
-<a name="line80"> 80: </a>  <font color="#B22222">/* Register Events */</font>
-<a name="line81"> 81: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>"</font>,PEP_CLASSID,&PEP_SetUp);
-<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>"</font>,PEP_CLASSID,&PEP_Solve);
-<a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>"</font>,PEP_CLASSID,&PEP_Refine);
-<a name="line84"> 84: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line85"> 85: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
-<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line87"> 87: </a>    PetscStrstr(logList,<font color="#666666">"pep"</font>,&className);
-<a name="line88"> 88: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line89"> 89: </a>      PetscInfoDeactivateClass(PEP_CLASSID);
-<a name="line90"> 90: </a>    }
-<a name="line91"> 91: </a>  }
-<a name="line92"> 92: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line93"> 93: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
-<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line95"> 95: </a>    PetscStrstr(logList,<font color="#666666">"pep"</font>,&className);
-<a name="line96"> 96: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line97"> 97: </a>      PetscLogEventDeactivateClass(PEP_CLASSID);
-<a name="line98"> 98: </a>    }
-<a name="line99"> 99: </a>  }
-<a name="line100">100: </a>  PetscRegisterFinalize(<a href="../../../docs/manualpages/PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</a>);
-<a name="line101">101: </a>  <font color="#4169E1">return</font>(0);
-<a name="line102">102: </a>}
-
-<a name="line104">104: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
-
-<a name="line108">108: </a><font color="#B22222">/*</font>
-<a name="line109">109: </a><font color="#B22222">  PetscDLLibraryRegister - This function is called when the dynamic library</font>
-<a name="line110">110: </a><font color="#B22222">  it is in is opened.</font>
-
-<a name="line112">112: </a><font color="#B22222">  This one registers all the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> methods that are in the basic SLEPc libslepcpep</font>
-<a name="line113">113: </a><font color="#B22222">  library.</font>
-<a name="line114">114: </a><font color="#B22222"> */</font>
-<a name="line115">115: </a><strong><font color="#4169E1"><a name="PetscDLLibraryRegister_slepcpep"></a>PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcpep()</font></strong>
-<a name="line116">116: </a>{
-
-<a name="line120">120: </a>  <a href="../../../docs/manualpages/PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</a>();
-<a name="line121">121: </a>  <font color="#4169E1">return</font>(0);
-<a name="line122">122: </a>}
-<a name="line123">123: </a><font color="#A020F0">#endif </font><font color="#B22222">/* PETSC_HAVE_DYNAMIC_LIBRARIES */</font><font color="#A020F0"></font>
+<a name="line29"> 29: </a>const char *PEPRefineSchemes[] = {<font color="#666666">""</font>,<font color="#666666">"SCHUR"</font>,<font color="#666666">"MBE"</font>,<font color="#666666">"EXPLICIT"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>"</font>,<font color="#666666">"PEP_REFINE_SCHEME_"</font>,0};
+<a name="line30"> 30: </a>const char *PEPExtractTypes[] = {<font color="#666666">""</font>,<font color="#666666">"NONE"</font>,<font color="#666666">"NORM"</font>,<font color="#666666">"RESIDUAL"</font>,<font color="#666666">"STRUCTURED"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>"</font>,<font color="#666666">"PEP_EXTRACT_"</font>,0};
+<a name="line31"> 31: </a>const char *PEPErrorTypes[] = {<font color="#666666">"ABSOLUTE"</font>,<font color="#666666">"RELATIVE"</font>,<font color="#666666">"BACKWARD"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>"</font>,<font color="#666666">"PEP_ERROR_"</font>,0};
+<a name="line32"> 32: </a>const char *const PEPConvergedReasons_Shifted[] = {<font color="#666666">""</font>,<font color="#666666">"DIVERGED_SYMMETRY_LOST"</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"CONVERGED_USER"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConv [...]
+<a name="line33"> 33: </a>const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 4;
+
+<a name="line37"> 37: </a><font color="#B22222">/*@C</font>
+<a name="line38"> 38: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</a> - This function destroys everything in the Slepc interface</font>
+<a name="line39"> 39: </a><font color="#B22222">   to the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> package. It is called from <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
+
+<a name="line41"> 41: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line43"> 43: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
+<a name="line44"> 44: </a><font color="#B22222">@*/</font>
+<a name="line45"> 45: </a><strong><font color="#4169E1"><a name="PEPFinalizePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</a>(void)</font></strong>
+<a name="line46"> 46: </a>{
+
+<a name="line50"> 50: </a>  PetscFunctionListDestroy(&PEPList);
+<a name="line51"> 51: </a>  PEPPackageInitialized = PETSC_FALSE;
+<a name="line52"> 52: </a>  PEPRegisterAllCalled  = PETSC_FALSE;
+<a name="line53"> 53: </a>  <font color="#4169E1">return</font>(0);
+<a name="line54"> 54: </a>}
+
+<a name="line58"> 58: </a><font color="#B22222">/*@C</font>
+<a name="line59"> 59: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</a> - This function initializes everything in the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> package.</font>
+<a name="line60"> 60: </a><font color="#B22222">   It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
+<a name="line61"> 61: </a><font color="#B22222">   on the first call to <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>() when using static libraries.</font>
+
+<a name="line63"> 63: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line65"> 65: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
+<a name="line66"> 66: </a><font color="#B22222">@*/</font>
+<a name="line67"> 67: </a><strong><font color="#4169E1"><a name="PEPInitializePackage"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</a>(void)</font></strong>
+<a name="line68"> 68: </a>{
+<a name="line69"> 69: </a>  char           logList[256];
+<a name="line70"> 70: </a>  char           *className;
+<a name="line71"> 71: </a>  PetscBool      opt;
+
+<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (PEPPackageInitialized) <font color="#4169E1">return</font>(0);
+<a name="line76"> 76: </a>  PEPPackageInitialized = PETSC_TRUE;
+<a name="line77"> 77: </a>  <font color="#B22222">/* Register Classes */</font>
+<a name="line78"> 78: </a>  PetscClassIdRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> Solver"</font>,&PEP_CLASSID);
+<a name="line79"> 79: </a>  <font color="#B22222">/* Register Constructors */</font>
+<a name="line80"> 80: </a>  <a href="../../../docs/manualpages/PEP/PEPRegisterAll.html#PEPRegisterAll">PEPRegisterAll</a>();
+<a name="line81"> 81: </a>  <font color="#B22222">/* Register Events */</font>
+<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>"</font>,PEP_CLASSID,&PEP_SetUp);
+<a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>"</font>,PEP_CLASSID,&PEP_Solve);
+<a name="line84"> 84: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a>"</font>,PEP_CLASSID,&PEP_Refine);
+<a name="line85"> 85: </a>  <font color="#B22222">/* Process info exclusions */</font>
+<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line88"> 88: </a>    PetscStrstr(logList,<font color="#666666">"pep"</font>,&className);
+<a name="line89"> 89: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line90"> 90: </a>      PetscInfoDeactivateClass(PEP_CLASSID);
+<a name="line91"> 91: </a>    }
+<a name="line92"> 92: </a>  }
+<a name="line93"> 93: </a>  <font color="#B22222">/* Process summary exclusions */</font>
+<a name="line94"> 94: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line96"> 96: </a>    PetscStrstr(logList,<font color="#666666">"pep"</font>,&className);
+<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line98"> 98: </a>      PetscLogEventDeactivateClass(PEP_CLASSID);
+<a name="line99"> 99: </a>    }
+<a name="line100">100: </a>  }
+<a name="line101">101: </a>  PetscRegisterFinalize(<a href="../../../docs/manualpages/PEP/PEPFinalizePackage.html#PEPFinalizePackage">PEPFinalizePackage</a>);
+<a name="line102">102: </a>  <font color="#4169E1">return</font>(0);
+<a name="line103">103: </a>}
+
+<a name="line105">105: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
+
+<a name="line109">109: </a><font color="#B22222">/*</font>
+<a name="line110">110: </a><font color="#B22222">  PetscDLLibraryRegister - This function is called when the dynamic library</font>
+<a name="line111">111: </a><font color="#B22222">  it is in is opened.</font>
+
+<a name="line113">113: </a><font color="#B22222">  This one registers all the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> methods that are in the basic SLEPc libslepcpep</font>
+<a name="line114">114: </a><font color="#B22222">  library.</font>
+<a name="line115">115: </a><font color="#B22222"> */</font>
+<a name="line116">116: </a><strong><font color="#4169E1"><a name="PetscDLLibraryRegister_slepcpep"></a>PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcpep()</font></strong>
+<a name="line117">117: </a>{
+
+<a name="line121">121: </a>  <a href="../../../docs/manualpages/PEP/PEPInitializePackage.html#PEPInitializePackage">PEPInitializePackage</a>();
+<a name="line122">122: </a>  <font color="#4169E1">return</font>(0);
+<a name="line123">123: </a>}
+<a name="line124">124: </a><font color="#A020F0">#endif </font><font color="#B22222">/* PETSC_HAVE_DYNAMIC_LIBRARIES */</font><font color="#A020F0"></font>
 
 </pre>
 </body>
diff --git a/src/pep/interface/ftn-auto/pepoptsf.c b/src/pep/interface/ftn-auto/pepoptsf.c
index 78993af..f7c2ace 100644
--- a/src/pep/interface/ftn-auto/pepoptsf.c
+++ b/src/pep/interface/ftn-auto/pepoptsf.c
@@ -104,6 +104,16 @@ extern void PetscRmPointer(void*);
 #define pepgetconvergencetest_ pepgetconvergencetest
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define pepsetstoppingtest_ PEPSETSTOPPINGTEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define pepsetstoppingtest_ pepsetstoppingtest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define pepgetstoppingtest_ PEPGETSTOPPINGTEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define pepgetstoppingtest_ pepgetstoppingtest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define pepsetscale_ PEPSETSCALE
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define pepsetscale_ pepsetscale
@@ -199,6 +209,14 @@ PETSC_EXTERN void PETSC_STDCALL  pepgetconvergencetest_(PEP pep,PEPConv *conv, i
 *__ierr = PEPGetConvergenceTest(
 	(PEP)PetscToPointer((pep) ),conv);
 }
+PETSC_EXTERN void PETSC_STDCALL  pepsetstoppingtest_(PEP pep,PEPStop *stop, int *__ierr ){
+*__ierr = PEPSetStoppingTest(
+	(PEP)PetscToPointer((pep) ),*stop);
+}
+PETSC_EXTERN void PETSC_STDCALL  pepgetstoppingtest_(PEP pep,PEPStop *stop, int *__ierr ){
+*__ierr = PEPGetStoppingTest(
+	(PEP)PetscToPointer((pep) ),stop);
+}
 PETSC_EXTERN void PETSC_STDCALL  pepsetscale_(PEP pep,PEPScale *scale,PetscReal *alpha,Vec Dl,Vec Dr,PetscInt *its,PetscReal *lambda, int *__ierr ){
 *__ierr = PEPSetScale(
 	(PEP)PetscToPointer((pep) ),*scale,*alpha,
@@ -217,13 +235,13 @@ PETSC_EXTERN void PETSC_STDCALL  pepgetextract_(PEP pep,PEPExtract *extract, int
 *__ierr = PEPGetExtract(
 	(PEP)PetscToPointer((pep) ),extract);
 }
-PETSC_EXTERN void PETSC_STDCALL  pepsetrefine_(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  pepsetrefine_(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PEPRefineScheme *scheme, int *__ierr ){
 *__ierr = PEPSetRefine(
-	(PEP)PetscToPointer((pep) ),*refine,*npart,*tol,*its,*schur);
+	(PEP)PetscToPointer((pep) ),*refine,*npart,*tol,*its,*scheme);
 }
-PETSC_EXTERN void PETSC_STDCALL  pepgetrefine_(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  pepgetrefine_(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PEPRefineScheme *scheme, int *__ierr ){
 *__ierr = PEPGetRefine(
-	(PEP)PetscToPointer((pep) ),refine,npart,tol,its,schur);
+	(PEP)PetscToPointer((pep) ),refine,npart,tol,its,scheme);
 }
 #if defined(__cplusplus)
 }
diff --git a/src/pep/interface/ftn-custom/makefile b/src/pep/interface/ftn-custom/makefile
index 1b6cfe8..5e72b1b 100644
--- a/src/pep/interface/ftn-custom/makefile
+++ b/src/pep/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/interface/ftn-custom/zpepf.c b/src/pep/interface/ftn-custom/zpepf.c
index dc78907..9179be1 100644
--- a/src/pep/interface/ftn-custom/zpepf.c
+++ b/src/pep/interface/ftn-custom/zpepf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -41,9 +41,9 @@
 #define pepmonitorconverged_        PEPMONITORCONVERGED
 #define pepmonitorfirst_            PEPMONITORFIRST
 #define pepconvergedabsolute_       PEPCONVERGEDABSOLUTE
-#define pepconvergedeigrelative_    PEPCONVERGEDEIGRELATIVE
-#define pepconvergedlinear_         PEPCONVERGEDLINEAR
+#define pepconvergedrelative_       PEPCONVERGEDRELATIVE
 #define pepsetconvergencetestfunction_ PEPSETCONVERGENCETESTFUNCTION
+#define pepsetstoppingtestfunction_ PEPSETSTOPPINGTESTFUNCTION
 #define pepseteigenvaluecomparison_ PEPSETEIGENVALUECOMPARISON
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
 #define pepview_                    pepview
@@ -63,9 +63,9 @@
 #define pepmonitorconverged_        pepmonitorconverged
 #define pepmonitorfirst_            pepmonitorfirst
 #define pepconvergedabsolute_       pepconvergedabsolute
-#define pepconvergedeigrelative_    pepconvergedeigrelative
-#define pepconvergedlinear_	    pepconvergedlinear
+#define pepconvergedrelative_       pepconvergedrelative
 #define pepsetconvergencetestfunction_ pepsetconvergencetestfunction
+#define pepsetstoppingtestfunction_ pepsetstoppingtestfunction
 #define pepseteigenvaluecomparison_ pepseteigenvaluecomparison
 #endif
 
@@ -73,29 +73,29 @@
    These are not usually called from Fortran but allow Fortran users
    to transparently set these monitors from .F code, hence no STDCALL
 */
-PETSC_EXTERN void pepmonitorall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void pepmonitorall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = PEPMonitorAll(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = PEPMonitorAll(*pep,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void pepmonitorlg_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void pepmonitorconverged_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)
 {
-  *ierr = PEPMonitorLG(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = PEPMonitorConverged(*pep,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void pepmonitorlgall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void pepmonitorfirst_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = PEPMonitorLGAll(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = PEPMonitorFirst(*pep,*it,*nconv,eigr,eigi,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void pepmonitorconverged_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void pepmonitorlg_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = PEPMonitorConverged(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = PEPMonitorLG(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
 }
 
-PETSC_EXTERN void pepmonitorfirst_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void pepmonitorlgall_(PEP *pep,PetscInt *it,PetscInt *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = PEPMonitorFirst(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
+  *ierr = PEPMonitorLGAll(*pep,*it,*nconv,eigr,eigi,errest,*nest,ctx);
 }
 
 static struct {
@@ -103,6 +103,8 @@ static struct {
   PetscFortranCallbackId monitordestroy;
   PetscFortranCallbackId convergence;
   PetscFortranCallbackId convdestroy;
+  PetscFortranCallbackId stopping;
+  PetscFortranCallbackId stopdestroy;
   PetscFortranCallbackId comparison;
 } _cb;
 
@@ -138,6 +140,21 @@ static PetscErrorCode ourconvdestroy(void *ctx)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "ourstopping"
+static PetscErrorCode ourstopping(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)
+{
+  PetscObjectUseFortranCallback(pep,_cb.stopping,(PEP*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PEPConvergedReason*,void*,PetscErrorCode*),(&pep,&its,&max_it,&nconv,&nev,reason,_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourstopdestroy"
+static PetscErrorCode ourstopdestroy(void *ctx)
+{
+  PEP pep = (PEP)ctx;
+  PetscObjectUseFortranCallback(pep,_cb.stopdestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "oureigenvaluecomparison"
 static PetscErrorCode oureigenvaluecomparison(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *r,void *ctx)
 {
@@ -226,28 +243,18 @@ PETSC_EXTERN void PETSC_STDCALL pepgetoptionsprefix_(PEP *pep,CHAR prefix PETSC_
 
 PETSC_EXTERN void PETSC_STDCALL pepmonitorset_(PEP *pep,void (PETSC_STDCALL *monitor)(PEP*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)
 {
-  SlepcConvMonitor ctx;
-
   CHKFORTRANNULLOBJECT(mctx);
   CHKFORTRANNULLFUNCTION(monitordestroy);
   if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorall_) {
-    *ierr = PEPMonitorSet(*pep,PEPMonitorAll,0,0);
+    *ierr = PEPMonitorSet(*pep,(PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))PEPMonitorAll,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorconverged_) {
+    *ierr = PEPMonitorSet(*pep,(PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))PEPMonitorConverged,*(SlepcConvMonitor*)mctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorfirst_) {
+    *ierr = PEPMonitorSet(*pep,(PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))PEPMonitorFirst,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorlg_) {
     *ierr = PEPMonitorSet(*pep,PEPMonitorLG,0,0);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorlgall_) {
     *ierr = PEPMonitorSet(*pep,PEPMonitorLGAll,0,0);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorconverged_) {
-    if (mctx) {
-      PetscError(PetscObjectComm((PetscObject)*pep),__LINE__,"pepmonitorset_",__FILE__,PETSC_ERR_ARG_WRONG,PETSC_ERROR_INITIAL,"Must provide PETSC_NULL_OBJECT as a context in the Fortran interface to PEPMonitorSet");
-      *ierr = 1;
-      return;
-    }
-    *ierr = PetscNew(&ctx);
-    if (*ierr) return;
-    ctx->viewer = NULL;
-    *ierr = PEPMonitorSet(*pep,PEPMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)pepmonitorfirst_) {
-    *ierr = PEPMonitorSet(*pep,PEPMonitorFirst,0,0);
   } else {
     *ierr = PetscObjectSetFortranCallback((PetscObject)*pep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.monitor,(PetscVoidFunction)monitor,mctx); if (*ierr) return;
     if (!monitordestroy) {
@@ -264,14 +271,9 @@ PETSC_EXTERN void PETSC_STDCALL pepconvergedabsolute_(PEP *pep,PetscScalar *eigr
   *ierr = PEPConvergedAbsolute(*pep,*eigr,*eigi,*res,errest,ctx);
 }
 
-PETSC_EXTERN void PETSC_STDCALL pepconvergedeigrelative_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
-{
-  *ierr = PEPConvergedEigRelative(*pep,*eigr,*eigi,*res,errest,ctx);
-}
-
-PETSC_EXTERN void PETSC_STDCALL pepconvergedlinear_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void PETSC_STDCALL pepconvergedrelative_(PEP *pep,PetscScalar *eigr,PetscScalar *eigi,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = PEPConvergedLinear(*pep,*eigr,*eigi,*res,errest,ctx);
+  *ierr = PEPConvergedRelative(*pep,*eigr,*eigi,*res,errest,ctx);
 }
 
 PETSC_EXTERN void PETSC_STDCALL pepsetconvergencetestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
@@ -280,10 +282,8 @@ PETSC_EXTERN void PETSC_STDCALL pepsetconvergencetestfunction_(PEP *pep,void (PE
   CHKFORTRANNULLFUNCTION(destroy);
   if ((PetscVoidFunction)func == (PetscVoidFunction)pepconvergedabsolute_) {
     *ierr = PEPSetConvergenceTest(*pep,PEP_CONV_ABS);
-  } else if ((PetscVoidFunction)func == (PetscVoidFunction)pepconvergedeigrelative_) {
-    *ierr = PEPSetConvergenceTest(*pep,PEP_CONV_EIG);
-  } else if ((PetscVoidFunction)func == (PetscVoidFunction)pepconvergedlinear_) {
-    *ierr = PEPSetConvergenceTest(*pep,PEP_CONV_LINEAR);
+  } else if ((PetscVoidFunction)func == (PetscVoidFunction)pepconvergedrelative_) {
+    *ierr = PEPSetConvergenceTest(*pep,PEP_CONV_REL);
   } else {
     *ierr = PetscObjectSetFortranCallback((PetscObject)*pep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.convergence,(PetscVoidFunction)func,ctx); if (*ierr) return;
     if (!destroy) {
@@ -295,6 +295,28 @@ PETSC_EXTERN void PETSC_STDCALL pepsetconvergencetestfunction_(PEP *pep,void (PE
   }
 }
 
+PETSC_EXTERN void PETSC_STDCALL pepstoppingbasic_(PEP *pep,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nev,PEPConvergedReason *reason,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = PEPStoppingBasic(*pep,*its,*max_it,*nconv,*nev,reason,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL pepsetstoppingtestfunction_(PEP *pep,void (PETSC_STDCALL *func)(PEP*,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  CHKFORTRANNULLFUNCTION(destroy);
+  if ((PetscVoidFunction)func == (PetscVoidFunction)pepstoppingbasic_) {
+    *ierr = PEPSetStoppingTest(*pep,PEP_STOP_BASIC);
+  } else {
+    *ierr = PetscObjectSetFortranCallback((PetscObject)*pep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopping,(PetscVoidFunction)func,ctx); if (*ierr) return;
+    if (!destroy) {
+      *ierr = PEPSetStoppingTestFunction(*pep,ourstopping,*pep,NULL);
+    } else {
+      *ierr = PetscObjectSetFortranCallback((PetscObject)*pep,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopdestroy,(PetscVoidFunction)destroy,ctx); if (*ierr) return;
+      *ierr = PEPSetStoppingTestFunction(*pep,ourstopping,*pep,ourstopdestroy);
+    }
+  }
+}
+
 PETSC_EXTERN void PETSC_STDCALL pepseteigenvaluecomparison_(PEP *pep,void (PETSC_STDCALL *func)(PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*,void*),void* ctx,PetscErrorCode *ierr)
 {
   CHKFORTRANNULLOBJECT(ctx);
diff --git a/src/pep/interface/index.html b/src/pep/interface/index.html
index d84aa74..a152474 100644
--- a/src/pep/interface/index.html
+++ b/src/pep/interface/index.html
@@ -5,10 +5,10 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
-<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a></h2>
+<h2>Polynomial Eigenvalue Problem Solvers - PEP: <a href="../../../src/pep/examples/tutorials/index.html">Examples</a> <a href="../../../src/pep/examples/nlevp/index.html">NLEVP</a></h2>
 
 <p>
 The Polynomial Eigenvalue Problem (PEP) solver is the object provided by SLEPc for specifying a polynomial eigenvalue problem. Apart from the specific solvers for this type of problems, there is an EPS-based solver, i.e., it uses a solver from EPS to solve a generalized eigenproblem obtained after linearization.
diff --git a/src/pep/interface/makefile b/src/pep/interface/makefile
index 0f29a48..55d4529 100644
--- a/src/pep/interface/makefile
+++ b/src/pep/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/interface/makefile.html b/src/pep/interface/makefile.html
index eefcc49..b5474fc 100644
--- a/src/pep/interface/makefile.html
+++ b/src/pep/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:56+00:00">
+<meta name="date" content="2016-05-16T10:33:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/pep/interface/pepbasic.c b/src/pep/interface/pepbasic.c
index 47616ee..22f0a88 100644
--- a/src/pep/interface/pepbasic.c
+++ b/src/pep/interface/pepbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -66,7 +66,8 @@ PetscErrorCode PEPCreate(MPI_Comm comm,PEP *outpep)
   pep->nini            = 0;
   pep->target          = 0.0;
   pep->tol             = PETSC_DEFAULT;
-  pep->conv            = PEP_CONV_EIG;
+  pep->conv            = PEP_CONV_REL;
+  pep->stop            = PEP_STOP_BASIC;
   pep->which           = (PEPWhich)0;
   pep->basis           = PEP_BASIS_MONOMIAL;
   pep->problem_type    = (PEPProblemType)0;
@@ -79,20 +80,22 @@ PetscErrorCode PEPCreate(MPI_Comm comm,PEP *outpep)
   pep->npart           = 1;
   pep->rtol            = PETSC_DEFAULT;
   pep->rits            = PETSC_DEFAULT;
-  pep->schur           = PETSC_FALSE;
+  pep->scheme          = (PEPRefineScheme)0;
   pep->extract         = (PEPExtract)0;
   pep->trackall        = PETSC_FALSE;
 
-  pep->converged       = PEPConvergedEigRelative;
+  pep->converged       = PEPConvergedRelative;
   pep->convergeddestroy= NULL;
+  pep->stopping        = PEPStoppingBasic;
+  pep->stoppingdestroy = NULL;
   pep->convergedctx    = NULL;
+  pep->stoppingctx     = NULL;
   pep->numbermonitors  = 0;
 
   pep->st              = NULL;
   pep->ds              = NULL;
   pep->V               = NULL;
   pep->rg              = NULL;
-  pep->rand            = NULL;
   pep->A               = NULL;
   pep->nmat            = 0;
   pep->Dl              = NULL;
@@ -121,9 +124,6 @@ PetscErrorCode PEPCreate(MPI_Comm comm,PEP *outpep)
   pep->reason          = PEP_CONVERGED_ITERATING;
 
   ierr = PetscNewLog(pep,&pep->sc);CHKERRQ(ierr);
-  ierr = PetscRandomCreate(comm,&pep->rand);CHKERRQ(ierr);
-  ierr = PetscRandomSetSeed(pep->rand,0x12345678);CHKERRQ(ierr);
-  ierr = PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->rand);CHKERRQ(ierr);
   *outpep = pep;
   PetscFunctionReturn(0);
 }
@@ -319,7 +319,6 @@ PetscErrorCode PEPDestroy(PEP *pep)
   ierr = STDestroy(&(*pep)->st);CHKERRQ(ierr);
   ierr = RGDestroy(&(*pep)->rg);CHKERRQ(ierr);
   ierr = DSDestroy(&(*pep)->ds);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&(*pep)->rand);CHKERRQ(ierr);
   ierr = PetscFree((*pep)->sc);CHKERRQ(ierr);
   /* just in case the initial vectors have not been used */
   ierr = SlepcBasisDestroy_Private(&(*pep)->nini,&(*pep)->IS);CHKERRQ(ierr);
diff --git a/src/pep/interface/pepbasic.c.html b/src/pep/interface/pepbasic.c.html
index e67553f..ad7a04c 100644
--- a/src/pep/interface/pepbasic.c.html
+++ b/src/pep/interface/pepbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:46+00:00">
+<meta name="date" content="2016-05-16T10:33:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The basic <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> routines, Create, Destroy, etc. are here.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -73,64 +73,64 @@
 <a name="line66"> 66: </a>  pep->nini            = 0;
 <a name="line67"> 67: </a>  pep->target          = 0.0;
 <a name="line68"> 68: </a>  pep->tol             = PETSC_DEFAULT;
-<a name="line69"> 69: </a>  pep->conv            = PEP_CONV_EIG;
-<a name="line70"> 70: </a>  pep->which           = (<a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>)0;
-<a name="line71"> 71: </a>  pep->basis           = PEP_BASIS_MONOMIAL;
-<a name="line72"> 72: </a>  pep->problem_type    = (<a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>)0;
-<a name="line73"> 73: </a>  pep->scale           = PEP_SCALE_NONE;
-<a name="line74"> 74: </a>  pep->sfactor         = 1.0;
-<a name="line75"> 75: </a>  pep->dsfactor        = 1.0;
-<a name="line76"> 76: </a>  pep->sits            = 5;
-<a name="line77"> 77: </a>  pep->slambda         = 1.0;
-<a name="line78"> 78: </a>  pep->refine          = PEP_REFINE_NONE;
-<a name="line79"> 79: </a>  pep->npart           = 1;
-<a name="line80"> 80: </a>  pep->rtol            = PETSC_DEFAULT;
-<a name="line81"> 81: </a>  pep->rits            = PETSC_DEFAULT;
-<a name="line82"> 82: </a>  pep->schur           = PETSC_FALSE;
-<a name="line83"> 83: </a>  pep->extract         = (<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>)0;
-<a name="line84"> 84: </a>  pep->trackall        = PETSC_FALSE;
-
-<a name="line86"> 86: </a>  pep->converged       = PEPConvergedEigRelative;
-<a name="line87"> 87: </a>  pep->convergeddestroy= NULL;
-<a name="line88"> 88: </a>  pep->convergedctx    = NULL;
-<a name="line89"> 89: </a>  pep->numbermonitors  = 0;
-
-<a name="line91"> 91: </a>  pep->st              = NULL;
-<a name="line92"> 92: </a>  pep->ds              = NULL;
-<a name="line93"> 93: </a>  pep->V               = NULL;
-<a name="line94"> 94: </a>  pep->rg              = NULL;
-<a name="line95"> 95: </a>  pep->rand            = NULL;
-<a name="line96"> 96: </a>  pep->A               = NULL;
-<a name="line97"> 97: </a>  pep->nmat            = 0;
-<a name="line98"> 98: </a>  pep->Dl              = NULL;
-<a name="line99"> 99: </a>  pep->Dr              = NULL;
-<a name="line100">100: </a>  pep->IS              = NULL;
-<a name="line101">101: </a>  pep->eigr            = NULL;
-<a name="line102">102: </a>  pep->eigi            = NULL;
-<a name="line103">103: </a>  pep->errest          = NULL;
-<a name="line104">104: </a>  pep->perm            = NULL;
-<a name="line105">105: </a>  pep->pbc             = NULL;
-<a name="line106">106: </a>  pep->solvematcoeffs  = NULL;
-<a name="line107">107: </a>  pep->nwork           = 0;
-<a name="line108">108: </a>  pep->work            = NULL;
-<a name="line109">109: </a>  pep->refineksp       = NULL;
-<a name="line110">110: </a>  pep->refinesubc      = NULL;
-<a name="line111">111: </a>  pep->data            = NULL;
-
-<a name="line113">113: </a>  pep->state           = PEP_STATE_INITIAL;
-<a name="line114">114: </a>  pep->nconv           = 0;
-<a name="line115">115: </a>  pep->its             = 0;
-<a name="line116">116: </a>  pep->n               = 0;
-<a name="line117">117: </a>  pep->nloc            = 0;
-<a name="line118">118: </a>  pep->nrma            = NULL;
-<a name="line119">119: </a>  pep->sfactor_set     = PETSC_FALSE;
-<a name="line120">120: </a>  pep->lineariz        = PETSC_FALSE;
-<a name="line121">121: </a>  pep->reason          = PEP_CONVERGED_ITERATING;
-
-<a name="line123">123: </a>  PetscNewLog(pep,&pep->sc);
-<a name="line124">124: </a>  PetscRandomCreate(comm,&pep->rand);
-<a name="line125">125: </a>  PetscRandomSetSeed(pep->rand,0x12345678);
-<a name="line126">126: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->rand);
+<a name="line69"> 69: </a>  pep->conv            = PEP_CONV_REL;
+<a name="line70"> 70: </a>  pep->stop            = PEP_STOP_BASIC;
+<a name="line71"> 71: </a>  pep->which           = (<a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a>)0;
+<a name="line72"> 72: </a>  pep->basis           = PEP_BASIS_MONOMIAL;
+<a name="line73"> 73: </a>  pep->problem_type    = (<a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a>)0;
+<a name="line74"> 74: </a>  pep->scale           = PEP_SCALE_NONE;
+<a name="line75"> 75: </a>  pep->sfactor         = 1.0;
+<a name="line76"> 76: </a>  pep->dsfactor        = 1.0;
+<a name="line77"> 77: </a>  pep->sits            = 5;
+<a name="line78"> 78: </a>  pep->slambda         = 1.0;
+<a name="line79"> 79: </a>  pep->refine          = PEP_REFINE_NONE;
+<a name="line80"> 80: </a>  pep->npart           = 1;
+<a name="line81"> 81: </a>  pep->rtol            = PETSC_DEFAULT;
+<a name="line82"> 82: </a>  pep->rits            = PETSC_DEFAULT;
+<a name="line83"> 83: </a>  pep->scheme          = (<a href="../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a>)0;
+<a name="line84"> 84: </a>  pep->extract         = (<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a>)0;
+<a name="line85"> 85: </a>  pep->trackall        = PETSC_FALSE;
+
+<a name="line87"> 87: </a>  pep->converged       = PEPConvergedRelative;
+<a name="line88"> 88: </a>  pep->convergeddestroy= NULL;
+<a name="line89"> 89: </a>  pep->stopping        = <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>;
+<a name="line90"> 90: </a>  pep->stoppingdestroy = NULL;
+<a name="line91"> 91: </a>  pep->convergedctx    = NULL;
+<a name="line92"> 92: </a>  pep->stoppingctx     = NULL;
+<a name="line93"> 93: </a>  pep->numbermonitors  = 0;
+
+<a name="line95"> 95: </a>  pep->st              = NULL;
+<a name="line96"> 96: </a>  pep->ds              = NULL;
+<a name="line97"> 97: </a>  pep->V               = NULL;
+<a name="line98"> 98: </a>  pep->rg              = NULL;
+<a name="line99"> 99: </a>  pep->A               = NULL;
+<a name="line100">100: </a>  pep->nmat            = 0;
+<a name="line101">101: </a>  pep->Dl              = NULL;
+<a name="line102">102: </a>  pep->Dr              = NULL;
+<a name="line103">103: </a>  pep->IS              = NULL;
+<a name="line104">104: </a>  pep->eigr            = NULL;
+<a name="line105">105: </a>  pep->eigi            = NULL;
+<a name="line106">106: </a>  pep->errest          = NULL;
+<a name="line107">107: </a>  pep->perm            = NULL;
+<a name="line108">108: </a>  pep->pbc             = NULL;
+<a name="line109">109: </a>  pep->solvematcoeffs  = NULL;
+<a name="line110">110: </a>  pep->nwork           = 0;
+<a name="line111">111: </a>  pep->work            = NULL;
+<a name="line112">112: </a>  pep->refineksp       = NULL;
+<a name="line113">113: </a>  pep->refinesubc      = NULL;
+<a name="line114">114: </a>  pep->data            = NULL;
+
+<a name="line116">116: </a>  pep->state           = PEP_STATE_INITIAL;
+<a name="line117">117: </a>  pep->nconv           = 0;
+<a name="line118">118: </a>  pep->its             = 0;
+<a name="line119">119: </a>  pep->n               = 0;
+<a name="line120">120: </a>  pep->nloc            = 0;
+<a name="line121">121: </a>  pep->nrma            = NULL;
+<a name="line122">122: </a>  pep->sfactor_set     = PETSC_FALSE;
+<a name="line123">123: </a>  pep->lineariz        = PETSC_FALSE;
+<a name="line124">124: </a>  pep->reason          = PEP_CONVERGED_ITERATING;
+
+<a name="line126">126: </a>  PetscNewLog(pep,&pep->sc);
 <a name="line127">127: </a>  *outpep = pep;
 <a name="line128">128: </a>  <font color="#4169E1">return</font>(0);
 <a name="line129">129: </a>}
@@ -302,327 +302,326 @@
 <a name="line319">319: </a>  <a href="../../../docs/manualpages/ST/STDestroy.html#STDestroy">STDestroy</a>(&(*pep)->st);
 <a name="line320">320: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&(*pep)->rg);
 <a name="line321">321: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&(*pep)->ds);
-<a name="line322">322: </a>  PetscRandomDestroy(&(*pep)->rand);
-<a name="line323">323: </a>  PetscFree((*pep)->sc);
-<a name="line324">324: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
-<a name="line325">325: </a>  SlepcBasisDestroy_Private(&(*pep)->nini,&(*pep)->IS);
-<a name="line326">326: </a>  <font color="#4169E1">if</font> ((*pep)->convergeddestroy) {
-<a name="line327">327: </a>    (*(*pep)->convergeddestroy)((*pep)->convergedctx);
-<a name="line328">328: </a>  }
-<a name="line329">329: </a>  <a href="../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(*pep);
-<a name="line330">330: </a>  PetscHeaderDestroy(pep);
-<a name="line331">331: </a>  <font color="#4169E1">return</font>(0);
-<a name="line332">332: </a>}
+<a name="line322">322: </a>  PetscFree((*pep)->sc);
+<a name="line323">323: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
+<a name="line324">324: </a>  SlepcBasisDestroy_Private(&(*pep)->nini,&(*pep)->IS);
+<a name="line325">325: </a>  <font color="#4169E1">if</font> ((*pep)->convergeddestroy) {
+<a name="line326">326: </a>    (*(*pep)->convergeddestroy)((*pep)->convergedctx);
+<a name="line327">327: </a>  }
+<a name="line328">328: </a>  <a href="../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(*pep);
+<a name="line329">329: </a>  PetscHeaderDestroy(pep);
+<a name="line330">330: </a>  <font color="#4169E1">return</font>(0);
+<a name="line331">331: </a>}
 
-<a name="line336">336: </a><font color="#B22222">/*@</font>
-<a name="line337">337: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a> - Associates a basis vectors object to the polynomial eigensolver.</font>
+<a name="line335">335: </a><font color="#B22222">/*@</font>
+<a name="line336">336: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a> - Associates a basis vectors object to the polynomial eigensolver.</font>
 
-<a name="line339">339: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line341">341: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line342">342: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line343">343: </a><font color="#B22222">-  bv  - the basis vectors object</font>
-
-<a name="line345">345: </a><font color="#B22222">   Note:</font>
-<a name="line346">346: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>() to retrieve the basis vectors context (for example,</font>
-<a name="line347">347: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line338">338: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line340">340: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line341">341: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line342">342: </a><font color="#B22222">-  bv  - the basis vectors object</font>
+
+<a name="line344">344: </a><font color="#B22222">   Note:</font>
+<a name="line345">345: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>() to retrieve the basis vectors context (for example,</font>
+<a name="line346">346: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line349">349: </a><font color="#B22222">   Level: advanced</font>
+<a name="line348">348: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line351">351: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>()</font>
-<a name="line352">352: </a><font color="#B22222">@*/</font>
-<a name="line353">353: </a><strong><font color="#4169E1"><a name="PEPSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line354">354: </a>{
-
-<a name="line361">361: </a>  PetscObjectReference((PetscObject)bv);
-<a name="line362">362: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&pep->V);
-<a name="line363">363: </a>  pep->V = bv;
-<a name="line364">364: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->V);
-<a name="line365">365: </a>  <font color="#4169E1">return</font>(0);
-<a name="line366">366: </a>}
+<a name="line350">350: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>()</font>
+<a name="line351">351: </a><font color="#B22222">@*/</font>
+<a name="line352">352: </a><strong><font color="#4169E1"><a name="PEPSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line353">353: </a>{
 
-<a name="line370">370: </a><font color="#B22222">/*@</font>
-<a name="line371">371: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a> - Obtain the basis vectors object associated to the polynomial</font>
-<a name="line372">372: </a><font color="#B22222">   eigensolver object.</font>
+<a name="line360">360: </a>  PetscObjectReference((PetscObject)bv);
+<a name="line361">361: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&pep->V);
+<a name="line362">362: </a>  pep->V = bv;
+<a name="line363">363: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->V);
+<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
+<a name="line365">365: </a>}
 
-<a name="line374">374: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line376">376: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line377">377: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-
-<a name="line379">379: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line380">380: </a><font color="#B22222">.  bv - basis vectors context</font>
+<a name="line369">369: </a><font color="#B22222">/*@</font>
+<a name="line370">370: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a> - Obtain the basis vectors object associated to the polynomial</font>
+<a name="line371">371: </a><font color="#B22222">   eigensolver object.</font>
 
-<a name="line382">382: </a><font color="#B22222">   Level: advanced</font>
+<a name="line373">373: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line375">375: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line376">376: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
 
-<a name="line384">384: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>()</font>
-<a name="line385">385: </a><font color="#B22222">@*/</font>
-<a name="line386">386: </a><strong><font color="#4169E1"><a name="PEPGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
-<a name="line387">387: </a>{
+<a name="line378">378: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line379">379: </a><font color="#B22222">.  bv - basis vectors context</font>
 
-<a name="line393">393: </a>  <font color="#4169E1">if</font> (!pep->V) {
-<a name="line394">394: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)pep),&pep->V);
-<a name="line395">395: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->V);
-<a name="line396">396: </a>  }
-<a name="line397">397: </a>  *bv = pep->V;
-<a name="line398">398: </a>  <font color="#4169E1">return</font>(0);
-<a name="line399">399: </a>}
+<a name="line381">381: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line403">403: </a><font color="#B22222">/*@</font>
-<a name="line404">404: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a> - Associates a region object to the polynomial eigensolver.</font>
+<a name="line383">383: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetBV.html#PEPSetBV">PEPSetBV</a>()</font>
+<a name="line384">384: </a><font color="#B22222">@*/</font>
+<a name="line385">385: </a><strong><font color="#4169E1"><a name="PEPGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
+<a name="line386">386: </a>{
 
-<a name="line406">406: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+<a name="line392">392: </a>  <font color="#4169E1">if</font> (!pep->V) {
+<a name="line393">393: </a>    <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)pep),&pep->V);
+<a name="line394">394: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->V);
+<a name="line395">395: </a>  }
+<a name="line396">396: </a>  *bv = pep->V;
+<a name="line397">397: </a>  <font color="#4169E1">return</font>(0);
+<a name="line398">398: </a>}
 
-<a name="line408">408: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line409">409: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line410">410: </a><font color="#B22222">-  rg  - the region object</font>
+<a name="line402">402: </a><font color="#B22222">/*@</font>
+<a name="line403">403: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a> - Associates a region object to the polynomial eigensolver.</font>
 
-<a name="line412">412: </a><font color="#B22222">   Note:</font>
-<a name="line413">413: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>() to retrieve the region context (for example,</font>
-<a name="line414">414: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line405">405: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
 
-<a name="line416">416: </a><font color="#B22222">   Level: advanced</font>
+<a name="line407">407: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line408">408: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line409">409: </a><font color="#B22222">-  rg  - the region object</font>
 
-<a name="line418">418: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>()</font>
-<a name="line419">419: </a><font color="#B22222">@*/</font>
-<a name="line420">420: </a><strong><font color="#4169E1"><a name="PEPSetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line421">421: </a>{
+<a name="line411">411: </a><font color="#B22222">   Note:</font>
+<a name="line412">412: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>() to retrieve the region context (for example,</font>
+<a name="line413">413: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line428">428: </a>  PetscObjectReference((PetscObject)rg);
-<a name="line429">429: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&pep->rg);
-<a name="line430">430: </a>  pep->rg = rg;
-<a name="line431">431: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->rg);
-<a name="line432">432: </a>  <font color="#4169E1">return</font>(0);
-<a name="line433">433: </a>}
+<a name="line415">415: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line437">437: </a><font color="#B22222">/*@</font>
-<a name="line438">438: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a> - Obtain the region object associated to the</font>
-<a name="line439">439: </a><font color="#B22222">   polynomial eigensolver object.</font>
+<a name="line417">417: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>()</font>
+<a name="line418">418: </a><font color="#B22222">@*/</font>
+<a name="line419">419: </a><strong><font color="#4169E1"><a name="PEPSetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line420">420: </a>{
 
-<a name="line441">441: </a><font color="#B22222">   Not Collective</font>
+<a name="line427">427: </a>  PetscObjectReference((PetscObject)rg);
+<a name="line428">428: </a>  <a href="../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&pep->rg);
+<a name="line429">429: </a>  pep->rg = rg;
+<a name="line430">430: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->rg);
+<a name="line431">431: </a>  <font color="#4169E1">return</font>(0);
+<a name="line432">432: </a>}
 
-<a name="line443">443: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line444">444: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line436">436: </a><font color="#B22222">/*@</font>
+<a name="line437">437: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a> - Obtain the region object associated to the</font>
+<a name="line438">438: </a><font color="#B22222">   polynomial eigensolver object.</font>
 
-<a name="line446">446: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line447">447: </a><font color="#B22222">.  rg - region context</font>
+<a name="line440">440: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line449">449: </a><font color="#B22222">   Level: advanced</font>
+<a name="line442">442: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line443">443: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
 
-<a name="line451">451: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a>()</font>
-<a name="line452">452: </a><font color="#B22222">@*/</font>
-<a name="line453">453: </a><strong><font color="#4169E1"><a name="PEPGetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
-<a name="line454">454: </a>{
+<a name="line445">445: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line446">446: </a><font color="#B22222">.  rg - region context</font>
 
-<a name="line460">460: </a>  <font color="#4169E1">if</font> (!pep->rg) {
-<a name="line461">461: </a>    <a href="../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>(PetscObjectComm((PetscObject)pep),&pep->rg);
-<a name="line462">462: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->rg);
-<a name="line463">463: </a>  }
-<a name="line464">464: </a>  *rg = pep->rg;
-<a name="line465">465: </a>  <font color="#4169E1">return</font>(0);
-<a name="line466">466: </a>}
+<a name="line448">448: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line470">470: </a><font color="#B22222">/*@</font>
-<a name="line471">471: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a> - Associates a direct solver object to the polynomial eigensolver.</font>
+<a name="line450">450: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetRG.html#PEPSetRG">PEPSetRG</a>()</font>
+<a name="line451">451: </a><font color="#B22222">@*/</font>
+<a name="line452">452: </a><strong><font color="#4169E1"><a name="PEPGetRG"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
+<a name="line453">453: </a>{
 
-<a name="line473">473: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+<a name="line459">459: </a>  <font color="#4169E1">if</font> (!pep->rg) {
+<a name="line460">460: </a>    <a href="../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>(PetscObjectComm((PetscObject)pep),&pep->rg);
+<a name="line461">461: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->rg);
+<a name="line462">462: </a>  }
+<a name="line463">463: </a>  *rg = pep->rg;
+<a name="line464">464: </a>  <font color="#4169E1">return</font>(0);
+<a name="line465">465: </a>}
 
-<a name="line475">475: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line476">476: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line477">477: </a><font color="#B22222">-  ds  - the direct solver object</font>
+<a name="line469">469: </a><font color="#B22222">/*@</font>
+<a name="line470">470: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a> - Associates a direct solver object to the polynomial eigensolver.</font>
 
-<a name="line479">479: </a><font color="#B22222">   Note:</font>
-<a name="line480">480: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>() to retrieve the direct solver context (for example,</font>
-<a name="line481">481: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line472">472: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
 
-<a name="line483">483: </a><font color="#B22222">   Level: advanced</font>
+<a name="line474">474: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line475">475: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line476">476: </a><font color="#B22222">-  ds  - the direct solver object</font>
 
-<a name="line485">485: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>()</font>
-<a name="line486">486: </a><font color="#B22222">@*/</font>
-<a name="line487">487: </a><strong><font color="#4169E1"><a name="PEPSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line488">488: </a>{
+<a name="line478">478: </a><font color="#B22222">   Note:</font>
+<a name="line479">479: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>() to retrieve the direct solver context (for example,</font>
+<a name="line480">480: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line495">495: </a>  PetscObjectReference((PetscObject)ds);
-<a name="line496">496: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&pep->ds);
-<a name="line497">497: </a>  pep->ds = ds;
-<a name="line498">498: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->ds);
-<a name="line499">499: </a>  <font color="#4169E1">return</font>(0);
-<a name="line500">500: </a>}
+<a name="line482">482: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line504">504: </a><font color="#B22222">/*@</font>
-<a name="line505">505: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a> - Obtain the direct solver object associated to the</font>
-<a name="line506">506: </a><font color="#B22222">   polynomial eigensolver object.</font>
+<a name="line484">484: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>()</font>
+<a name="line485">485: </a><font color="#B22222">@*/</font>
+<a name="line486">486: </a><strong><font color="#4169E1"><a name="PEPSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line487">487: </a>{
 
-<a name="line508">508: </a><font color="#B22222">   Not Collective</font>
+<a name="line494">494: </a>  PetscObjectReference((PetscObject)ds);
+<a name="line495">495: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&pep->ds);
+<a name="line496">496: </a>  pep->ds = ds;
+<a name="line497">497: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->ds);
+<a name="line498">498: </a>  <font color="#4169E1">return</font>(0);
+<a name="line499">499: </a>}
 
-<a name="line510">510: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line511">511: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line503">503: </a><font color="#B22222">/*@</font>
+<a name="line504">504: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a> - Obtain the direct solver object associated to the</font>
+<a name="line505">505: </a><font color="#B22222">   polynomial eigensolver object.</font>
 
-<a name="line513">513: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line514">514: </a><font color="#B22222">.  ds - direct solver context</font>
-
-<a name="line516">516: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line518">518: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a>()</font>
-<a name="line519">519: </a><font color="#B22222">@*/</font>
-<a name="line520">520: </a><strong><font color="#4169E1"><a name="PEPGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
-<a name="line521">521: </a>{
+<a name="line507">507: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line527">527: </a>  <font color="#4169E1">if</font> (!pep->ds) {
-<a name="line528">528: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)pep),&pep->ds);
-<a name="line529">529: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->ds);
-<a name="line530">530: </a>  }
-<a name="line531">531: </a>  *ds = pep->ds;
-<a name="line532">532: </a>  <font color="#4169E1">return</font>(0);
-<a name="line533">533: </a>}
+<a name="line509">509: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line510">510: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
 
-<a name="line537">537: </a><font color="#B22222">/*@</font>
-<a name="line538">538: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a> - Associates a spectral transformation object to the eigensolver.</font>
+<a name="line512">512: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line513">513: </a><font color="#B22222">.  ds - direct solver context</font>
+
+<a name="line515">515: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line517">517: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetDS.html#PEPSetDS">PEPSetDS</a>()</font>
+<a name="line518">518: </a><font color="#B22222">@*/</font>
+<a name="line519">519: </a><strong><font color="#4169E1"><a name="PEPGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
+<a name="line520">520: </a>{
 
-<a name="line540">540: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+<a name="line526">526: </a>  <font color="#4169E1">if</font> (!pep->ds) {
+<a name="line527">527: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)pep),&pep->ds);
+<a name="line528">528: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->ds);
+<a name="line529">529: </a>  }
+<a name="line530">530: </a>  *ds = pep->ds;
+<a name="line531">531: </a>  <font color="#4169E1">return</font>(0);
+<a name="line532">532: </a>}
 
-<a name="line542">542: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line543">543: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line544">544: </a><font color="#B22222">-  st   - the spectral transformation object</font>
-
-<a name="line546">546: </a><font color="#B22222">   Note:</font>
-<a name="line547">547: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>() to retrieve the spectral transformation context (for example,</font>
-<a name="line548">548: </a><font color="#B22222">   to free it at the end of the computations).</font>
+<a name="line536">536: </a><font color="#B22222">/*@</font>
+<a name="line537">537: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a> - Associates a spectral transformation object to the eigensolver.</font>
 
-<a name="line550">550: </a><font color="#B22222">   Level: advanced</font>
+<a name="line539">539: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
 
-<a name="line552">552: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>()</font>
-<a name="line553">553: </a><font color="#B22222">@*/</font>
-<a name="line554">554: </a><strong><font color="#4169E1"><a name="PEPSetST"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line555">555: </a>{
+<a name="line541">541: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line542">542: </a><font color="#B22222">+  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line543">543: </a><font color="#B22222">-  st   - the spectral transformation object</font>
+
+<a name="line545">545: </a><font color="#B22222">   Note:</font>
+<a name="line546">546: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>() to retrieve the spectral transformation context (for example,</font>
+<a name="line547">547: </a><font color="#B22222">   to free it at the end of the computations).</font>
 
-<a name="line562">562: </a>  PetscObjectReference((PetscObject)st);
-<a name="line563">563: </a>  <a href="../../../docs/manualpages/ST/STDestroy.html#STDestroy">STDestroy</a>(&pep->st);
-<a name="line564">564: </a>  pep->st = st;
-<a name="line565">565: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->st);
-<a name="line566">566: </a>  <font color="#4169E1">return</font>(0);
-<a name="line567">567: </a>}
+<a name="line549">549: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line571">571: </a><font color="#B22222">/*@</font>
-<a name="line572">572: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a> - Obtain the spectral transformation (<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>) object associated</font>
-<a name="line573">573: </a><font color="#B22222">   to the eigensolver object.</font>
+<a name="line551">551: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>()</font>
+<a name="line552">552: </a><font color="#B22222">@*/</font>
+<a name="line553">553: </a><strong><font color="#4169E1"><a name="PEPSetST"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line554">554: </a>{
 
-<a name="line575">575: </a><font color="#B22222">   Not Collective</font>
+<a name="line561">561: </a>  PetscObjectReference((PetscObject)st);
+<a name="line562">562: </a>  <a href="../../../docs/manualpages/ST/STDestroy.html#STDestroy">STDestroy</a>(&pep->st);
+<a name="line563">563: </a>  pep->st = st;
+<a name="line564">564: </a>  PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->st);
+<a name="line565">565: </a>  <font color="#4169E1">return</font>(0);
+<a name="line566">566: </a>}
 
-<a name="line577">577: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line578">578: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line570">570: </a><font color="#B22222">/*@</font>
+<a name="line571">571: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a> - Obtain the spectral transformation (<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>) object associated</font>
+<a name="line572">572: </a><font color="#B22222">   to the eigensolver object.</font>
 
-<a name="line580">580: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line581">581: </a><font color="#B22222">.  st - spectral transformation context</font>
+<a name="line574">574: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line583">583: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line576">576: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line577">577: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
 
-<a name="line585">585: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a>()</font>
-<a name="line586">586: </a><font color="#B22222">@*/</font>
-<a name="line587">587: </a><strong><font color="#4169E1"><a name="PEPGetST"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> *st)</font></strong>
-<a name="line588">588: </a>{
+<a name="line579">579: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line580">580: </a><font color="#B22222">.  st - spectral transformation context</font>
 
-<a name="line594">594: </a>  <font color="#4169E1">if</font> (!pep->st) {
-<a name="line595">595: </a>    <a href="../../../docs/manualpages/ST/STCreate.html#STCreate">STCreate</a>(PetscObjectComm((PetscObject)pep),&pep->st);
-<a name="line596">596: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->st);
-<a name="line597">597: </a>  }
-<a name="line598">598: </a>  *st = pep->st;
-<a name="line599">599: </a>  <font color="#4169E1">return</font>(0);
-<a name="line600">600: </a>}
+<a name="line582">582: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line604">604: </a><font color="#B22222">/*@</font>
-<a name="line605">605: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a> - Obtain the ksp object used by the eigensolver</font>
-<a name="line606">606: </a><font color="#B22222">   object in the refinement phase.</font>
+<a name="line584">584: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetST.html#PEPSetST">PEPSetST</a>()</font>
+<a name="line585">585: </a><font color="#B22222">@*/</font>
+<a name="line586">586: </a><strong><font color="#4169E1"><a name="PEPGetST"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> *st)</font></strong>
+<a name="line587">587: </a>{
 
-<a name="line608">608: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line610">610: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line611">611: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-
-<a name="line613">613: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line614">614: </a><font color="#B22222">.  ksp - ksp context</font>
+<a name="line593">593: </a>  <font color="#4169E1">if</font> (!pep->st) {
+<a name="line594">594: </a>    <a href="../../../docs/manualpages/ST/STCreate.html#STCreate">STCreate</a>(PetscObjectComm((PetscObject)pep),&pep->st);
+<a name="line595">595: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->st);
+<a name="line596">596: </a>  }
+<a name="line597">597: </a>  *st = pep->st;
+<a name="line598">598: </a>  <font color="#4169E1">return</font>(0);
+<a name="line599">599: </a>}
 
-<a name="line616">616: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line618">618: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>()</font>
-<a name="line619">619: </a><font color="#B22222">@*/</font>
-<a name="line620">620: </a><strong><font color="#4169E1"><a name="PEPRefineGetKSP"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,KSP *ksp)</font></strong>
-<a name="line621">621: </a>{
+<a name="line603">603: </a><font color="#B22222">/*@</font>
+<a name="line604">604: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a> - Obtain the ksp object used by the eigensolver</font>
+<a name="line605">605: </a><font color="#B22222">   object in the refinement phase.</font>
 
-<a name="line627">627: </a>  <font color="#4169E1">if</font> (!pep->refineksp) {
-<a name="line628">628: </a>    <font color="#4169E1">if</font> (pep->npart>1) {
-<a name="line629">629: </a>      <font color="#B22222">/* Split in subcomunicators */</font>
-<a name="line630">630: </a>      PetscSubcommCreate(PetscObjectComm((PetscObject)pep),&pep->refinesubc);
-<a name="line631">631: </a>      PetscSubcommSetNumber(pep->refinesubc,pep->npart);
-<a name="line632">632: </a>      PetscSubcommSetType(pep->refinesubc,PETSC_SUBCOMM_CONTIGUOUS);
-<a name="line633">633: </a>      PetscLogObjectMemory((PetscObject)pep,<font color="#4169E1">sizeof</font>(PetscSubcomm));
-<a name="line634">634: </a>    }
-<a name="line635">635: </a>    KSPCreate((pep->npart==1)?PetscObjectComm((PetscObject)pep):PetscSubcommChild(pep->refinesubc),&pep->refineksp);
-<a name="line636">636: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->refineksp);
-<a name="line637">637: </a>    KSPSetOptionsPrefix(*ksp,((PetscObject)pep)->prefix);
-<a name="line638">638: </a>    KSPAppendOptionsPrefix(*ksp,<font color="#666666">"pep_refine_"</font>);
-<a name="line639">639: </a>    KSPSetErrorIfNotConverged(*ksp,PETSC_TRUE);
-<a name="line640">640: </a>  }
-<a name="line641">641: </a>  *ksp = pep->refineksp;
-<a name="line642">642: </a>  <font color="#4169E1">return</font>(0);
-<a name="line643">643: </a>}
-
-<a name="line647">647: </a><font color="#B22222">/*@</font>
-<a name="line648">648: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a> - Sets the value of the target.</font>
-
-<a name="line650">650: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line652">652: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line653">653: </a><font color="#B22222">+  pep    - eigensolver context</font>
-<a name="line654">654: </a><font color="#B22222">-  target - the value of the target</font>
+<a name="line607">607: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line609">609: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line610">610: </a><font color="#B22222">.  pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+
+<a name="line612">612: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line613">613: </a><font color="#B22222">.  ksp - ksp context</font>
 
-<a name="line656">656: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line657">657: </a><font color="#B22222">.  -pep_target <scalar> - the value of the target</font>
+<a name="line615">615: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line617">617: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>()</font>
+<a name="line618">618: </a><font color="#B22222">@*/</font>
+<a name="line619">619: </a><strong><font color="#4169E1"><a name="PEPRefineGetKSP"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,KSP *ksp)</font></strong>
+<a name="line620">620: </a>{
 
-<a name="line659">659: </a><font color="#B22222">   Notes:</font>
-<a name="line660">660: </a><font color="#B22222">   The target is a scalar value used to determine the portion of the spectrum</font>
-<a name="line661">661: </a><font color="#B22222">   of interest. It is used in combination with <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>().</font>
-
-<a name="line663">663: </a><font color="#B22222">   In the case of complex scalars, a complex value can be provided in the</font>
-<a name="line664">664: </a><font color="#B22222">   command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
-<a name="line665">665: </a><font color="#B22222">   -pep_target 1.0+2.0i</font>
-
-<a name="line667">667: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line626">626: </a>  <font color="#4169E1">if</font> (!pep->refineksp) {
+<a name="line627">627: </a>    <font color="#4169E1">if</font> (pep->npart>1) {
+<a name="line628">628: </a>      <font color="#B22222">/* Split in subcomunicators */</font>
+<a name="line629">629: </a>      PetscSubcommCreate(PetscObjectComm((PetscObject)pep),&pep->refinesubc);
+<a name="line630">630: </a>      PetscSubcommSetNumber(pep->refinesubc,pep->npart);
+<a name="line631">631: </a>      PetscSubcommSetType(pep->refinesubc,PETSC_SUBCOMM_CONTIGUOUS);
+<a name="line632">632: </a>      PetscLogObjectMemory((PetscObject)pep,<font color="#4169E1">sizeof</font>(PetscSubcomm));
+<a name="line633">633: </a>    }
+<a name="line634">634: </a>    KSPCreate((pep->npart==1)?PetscObjectComm((PetscObject)pep):PetscSubcommChild(pep->refinesubc),&pep->refineksp);
+<a name="line635">635: </a>    PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->refineksp);
+<a name="line636">636: </a>    KSPSetOptionsPrefix(*ksp,((PetscObject)pep)->prefix);
+<a name="line637">637: </a>    KSPAppendOptionsPrefix(*ksp,<font color="#666666">"pep_refine_"</font>);
+<a name="line638">638: </a>    KSPSetErrorIfNotConverged(*ksp,PETSC_TRUE);
+<a name="line639">639: </a>  }
+<a name="line640">640: </a>  *ksp = pep->refineksp;
+<a name="line641">641: </a>  <font color="#4169E1">return</font>(0);
+<a name="line642">642: </a>}
+
+<a name="line646">646: </a><font color="#B22222">/*@</font>
+<a name="line647">647: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a> - Sets the value of the target.</font>
+
+<a name="line649">649: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line651">651: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line652">652: </a><font color="#B22222">+  pep    - eigensolver context</font>
+<a name="line653">653: </a><font color="#B22222">-  target - the value of the target</font>
 
-<a name="line669">669: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(), <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>()</font>
-<a name="line670">670: </a><font color="#B22222">@*/</font>
-<a name="line671">671: </a><strong><font color="#4169E1"><a name="PEPSetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar target)</font></strong>
-<a name="line672">672: </a>{
-
-<a name="line678">678: </a>  pep->target = target;
-<a name="line679">679: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
-<a name="line680">680: </a>  <a href="../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(pep->st,target);
-<a name="line681">681: </a>  <font color="#4169E1">return</font>(0);
-<a name="line682">682: </a>}
-
-<a name="line686">686: </a><font color="#B22222">/*@</font>
-<a name="line687">687: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a> - Gets the value of the target.</font>
+<a name="line655">655: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line656">656: </a><font color="#B22222">.  -pep_target <scalar> - the value of the target</font>
 
-<a name="line689">689: </a><font color="#B22222">   Not Collective</font>
+<a name="line658">658: </a><font color="#B22222">   Notes:</font>
+<a name="line659">659: </a><font color="#B22222">   The target is a scalar value used to determine the portion of the spectrum</font>
+<a name="line660">660: </a><font color="#B22222">   of interest. It is used in combination with <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>().</font>
+
+<a name="line662">662: </a><font color="#B22222">   In the case of complex scalars, a complex value can be provided in the</font>
+<a name="line663">663: </a><font color="#B22222">   command line with [+/-][realnumber][+/-]realnumberi with no spaces, e.g.</font>
+<a name="line664">664: </a><font color="#B22222">   -pep_target 1.0+2.0i</font>
+
+<a name="line666">666: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line691">691: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line692">692: </a><font color="#B22222">.  pep - eigensolver context</font>
-
-<a name="line694">694: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line695">695: </a><font color="#B22222">.  target - the value of the target</font>
-
-<a name="line697">697: </a><font color="#B22222">   Note:</font>
-<a name="line698">698: </a><font color="#B22222">   If the target was not set by the user, then zero is returned.</font>
-
-<a name="line700">700: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line702">702: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>()</font>
-<a name="line703">703: </a><font color="#B22222">@*/</font>
-<a name="line704">704: </a><strong><font color="#4169E1"><a name="PEPGetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar* target)</font></strong>
-<a name="line705">705: </a>{
-<a name="line709">709: </a>  *target = pep->target;
-<a name="line710">710: </a>  <font color="#4169E1">return</font>(0);
-<a name="line711">711: </a>}
+<a name="line668">668: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(), <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>()</font>
+<a name="line669">669: </a><font color="#B22222">@*/</font>
+<a name="line670">670: </a><strong><font color="#4169E1"><a name="PEPSetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar target)</font></strong>
+<a name="line671">671: </a>{
+
+<a name="line677">677: </a>  pep->target = target;
+<a name="line678">678: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
+<a name="line679">679: </a>  <a href="../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(pep->st,target);
+<a name="line680">680: </a>  <font color="#4169E1">return</font>(0);
+<a name="line681">681: </a>}
+
+<a name="line685">685: </a><font color="#B22222">/*@</font>
+<a name="line686">686: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a> - Gets the value of the target.</font>
+
+<a name="line688">688: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line690">690: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line691">691: </a><font color="#B22222">.  pep - eigensolver context</font>
+
+<a name="line693">693: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line694">694: </a><font color="#B22222">.  target - the value of the target</font>
+
+<a name="line696">696: </a><font color="#B22222">   Note:</font>
+<a name="line697">697: </a><font color="#B22222">   If the target was not set by the user, then zero is returned.</font>
+
+<a name="line699">699: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line701">701: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>()</font>
+<a name="line702">702: </a><font color="#B22222">@*/</font>
+<a name="line703">703: </a><strong><font color="#4169E1"><a name="PEPGetTarget"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetTarget.html#PEPGetTarget">PEPGetTarget</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar* target)</font></strong>
+<a name="line704">704: </a>{
+<a name="line708">708: </a>  *target = pep->target;
+<a name="line709">709: </a>  <font color="#4169E1">return</font>(0);
+<a name="line710">710: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/interface/pepdefault.c b/src/pep/interface/pepdefault.c
index e6a9662..fdd8b97 100644
--- a/src/pep/interface/pepdefault.c
+++ b/src/pep/interface/pepdefault.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -58,11 +58,11 @@ PetscErrorCode PEPSetWorkVecs(PEP pep,PetscInt nw)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPConvergedEigRelative"
+#define __FUNCT__ "PEPConvergedRelative"
 /*
-  PEPConvergedEigRelative - Checks convergence relative to the eigenvalue.
+  PEPConvergedRelative - Checks convergence relative to the eigenvalue.
 */
-PetscErrorCode PEPConvergedEigRelative(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
+PetscErrorCode PEPConvergedRelative(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
 {
   PetscReal w;
 
@@ -73,28 +73,6 @@ PetscErrorCode PEPConvergedEigRelative(PEP pep,PetscScalar eigr,PetscScalar eigi
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPConvergedLinear"
-/*
-  PEPConvergedLinear - Checks convergence related to the linearized eigenproblem.
-*/
-PetscErrorCode PEPConvergedLinear(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
-{
-  PetscErrorCode ierr;
-  PetscScalar    er,ei;
-  PetscBool      flg;
-  PetscFunctionBegin;
-  ierr = STGetTransform(pep->st,&flg);CHKERRQ(ierr);
-  if (!flg) {
-    ierr = PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&flg);CHKERRQ(ierr);
-  } else flg = PETSC_FALSE;
-  er = eigr; ei = eigi;
-  ierr = STBackTransform(pep->st,1,&er,&ei);CHKERRQ(ierr);
-  if (flg) *errest = res*((pep->nrml[0]+PetscAbsScalar(pep->target)*pep->nrml[1])/SlepcAbsEigenvalue(eigr,eigi))/(pep->nrml[0]+SlepcAbsEigenvalue(er,ei)*pep->nrml[1]);
-  else *errest = res*pep->nrml[1]/(pep->nrml[0]+SlepcAbsEigenvalue(er,ei)*pep->nrml[1]);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "PEPConvergedNorm"
 /*
   PEPConvergedNorm - Checks convergence relative to the matrix norms.
@@ -136,6 +114,56 @@ PetscErrorCode PEPConvergedAbsolute(PEP pep,PetscScalar eigr,PetscScalar eigi,Pe
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "PEPStoppingBasic"
+/*@C
+   PEPStoppingBasic - Default routine to determine whether the outer eigensolver
+   iteration must be stopped.
+
+   Collective on PEP
+
+   Input Parameters:
++  pep    - eigensolver context obtained from PEPCreate()
+.  its    - current number of iterations
+.  max_it - maximum number of iterations
+.  nconv  - number of currently converged eigenpairs
+.  nev    - number of requested eigenpairs
+-  ctx    - context (not used here)
+
+   Output Parameter:
+.  reason - result of the stopping test
+
+   Notes:
+   A positive value of reason indicates that the iteration has finished successfully
+   (converged), and a negative value indicates an error condition (diverged). If
+   the iteration needs to be continued, reason must be set to PEP_CONVERGED_ITERATING
+   (zero).
+
+   PEPStoppingBasic() will stop if all requested eigenvalues are converged, or if
+   the maximum number of iterations has been reached.
+
+   Use PEPSetStoppingTest() to provide your own test instead of using this one.
+
+   Level: advanced
+
+.seealso: PEPSetStoppingTest(), PEPConvergedReason, PEPGetConvergedReason()
+@*/
+PetscErrorCode PEPStoppingBasic(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  *reason = PEP_CONVERGED_ITERATING;
+  if (nconv >= nev) {
+    ierr = PetscInfo2(pep,"Polynomial eigensolver finished successfully: %D eigenpairs converged at iteration %D\n",nconv,its);CHKERRQ(ierr);
+    *reason = PEP_CONVERGED_TOL;
+  } else if (its >= max_it) {
+    *reason = PEP_DIVERGED_ITS;
+    ierr = PetscInfo1(pep,"Polynomial eigensolver iteration reached maximum number of iterations (%D)\n",its);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "PEPBackTransform_Default"
 PetscErrorCode PEPBackTransform_Default(PEP pep)
 {
@@ -205,14 +233,13 @@ PetscErrorCode PEPComputeVectors_Default(PEP pep)
 PetscErrorCode PEPKrylovConvergence(PEP pep,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscInt *kout)
 {
   PetscErrorCode ierr;
-  PetscInt       k,newk,marker,ld,inside;
+  PetscInt       k,newk,marker,inside;
   PetscScalar    re,im;
   PetscReal      resnorm;
   PetscBool      istrivial;
 
   PetscFunctionBegin;
   ierr = RGIsTrivial(pep->rg,&istrivial);CHKERRQ(ierr);
-  ierr = DSGetLeadingDimension(pep->ds,&ld);CHKERRQ(ierr);
   marker = -1;
   if (pep->trackall) getall = PETSC_TRUE;
   for (k=kini;k<kini+nits;k++) {
@@ -222,7 +249,7 @@ PetscErrorCode PEPKrylovConvergence(PEP pep,PetscBool getall,PetscInt kini,Petsc
     if (!istrivial) {
       ierr = STBackTransform(pep->st,1,&re,&im);CHKERRQ(ierr);
       ierr = RGCheckInside(pep->rg,1,&re,&im,&inside);CHKERRQ(ierr);
-      if (marker==-1 && inside<=0) marker = k;
+      if (marker==-1 && inside<0) marker = k;
       re = pep->eigr[k];
       im = pep->eigi[k];
     }
@@ -265,7 +292,7 @@ PetscErrorCode PEPBuildDiagonalScaling(PEP pep)
   PetscFunctionBegin;
   l2 = 2*PetscLogReal(2.0);
   nmat = pep->nmat;
-  ierr = PetscMPIIntCast(pep->n,&n);
+  ierr = PetscMPIIntCast(pep->n,&n);CHKERRQ(ierr);
   ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
   ierr = PetscMalloc1(nmat,&T);CHKERRQ(ierr);
   for (k=0;k<nmat;k++) {
@@ -340,7 +367,7 @@ PetscErrorCode PEPBuildDiagonalScaling(PEP pep)
       for (j=0;j<nz;j++) aux[cidx[j]] += PetscAbsScalar(array[j]);
       ierr = MatSeqAIJRestoreArray(M,&array);CHKERRQ(ierr); 
     }
-    ierr = MPI_Allreduce(aux,csum,n,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)pep->Dr));
+    ierr = MPI_Allreduce(aux,csum,n,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)pep->Dr));CHKERRQ(ierr);
     /* Update Dr */
     for (j=lst;j<lend;j++) {
       d = PetscLogReal(csum[j])/l2;
@@ -382,8 +409,8 @@ PetscErrorCode PEPBuildDiagonalScaling(PEP pep)
     }
     ierr = MatSeqAIJRestoreArray(M,&array);CHKERRQ(ierr);  
     /* Compute global max and min */
-    ierr = MPI_Allreduce(&emaxl,&emax,1,MPIU_INT,MPI_MAX,PetscObjectComm((PetscObject)pep->Dl));
-    ierr = MPI_Allreduce(&eminl,&emin,1,MPIU_INT,MPI_MIN,PetscObjectComm((PetscObject)pep->Dl));
+    ierr = MPI_Allreduce(&emaxl,&emax,1,MPIU_INT,MPI_MAX,PetscObjectComm((PetscObject)pep->Dl));CHKERRQ(ierr);
+    ierr = MPI_Allreduce(&eminl,&emin,1,MPIU_INT,MPI_MIN,PetscObjectComm((PetscObject)pep->Dl));CHKERRQ(ierr);
     if (emax<=emin+2) cont = PETSC_FALSE;
   }
   ierr = VecRestoreArray(pep->Dr,&Dr);CHKERRQ(ierr);
@@ -455,57 +482,6 @@ PetscErrorCode PEPComputeScaleFactor(PEP pep)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPComputeLinearNorms"
-/*
-   PEPComputeLinearNorms - compute norm for the linearized problem.
-*/
-PetscErrorCode PEPComputeLinearNorms(PEP pep)
-{
-  PetscErrorCode    ierr;
-  PetscReal         out=0.0,nrmd=0.0,max=0.0,summ,summrow,summd=0.0;
-  PetscReal         *pbc,*a,*b,*g,t;
-  PetscInt          i,m0,m1,ncols,j,k;
-  const PetscScalar *vals;
-  Mat               *T;
-
-  PetscFunctionBegin;
-  ierr = PetscMalloc2(3*pep->nmat,&pbc,pep->nmat,&T);CHKERRQ(ierr);
-  for (i=0;i<pep->nmat;i++) {
-    ierr = STGetTOperators(pep->st,i,&T[i]);CHKERRQ(ierr);
-  }
-  a=pbc; b=pbc+pep->nmat; g = b+pep->nmat;
-  ierr = PEPBasisCoefficients(pep,pbc);CHKERRQ(ierr);
-  out = b[0]+a[0];
-  for (i=1;i<pep->nmat-2;i++) out = PetscMax(out,a[i]+b[i]+g[i]);
-  ierr = MatGetOwnershipRange(T[0],&m0,&m1);CHKERRQ(ierr);
-  for (i=m0;i<m1;i++) {
-    summrow = 0.0;
-    t = 1.0;
-    for (j=0;j<pep->nmat;j++) {
-      summ = 0.0;
-      ierr = MatGetRow(T[j],i,&ncols,NULL,&vals);CHKERRQ(ierr);
-      for (k=0;k<ncols;k++) summ += PetscAbsScalar(vals[k]);
-      ierr = MatRestoreRow(T[j],i,&ncols,NULL,&vals);CHKERRQ(ierr);
-      summ *= t;
-      if (j==pep->nmat-1) {
-        summd = summ;
-        summ *= (b[pep->nmat-2]+g[pep->nmat-2])/a[pep->nmat-2];
-      } else summ *= a[pep->nmat-2];
-      summrow += summ;
-      t *= pep->sfactor;
-    }
-    nrmd = PetscMax(nrmd,summd);
-    max = PetscMax(max,summrow);
-  }
-  max = PetscMax(max*pep->dsfactor,out);
-  ierr = MPI_Allreduce(&max,&pep->nrml[0],1,MPIU_REAL,MPIU_MAX,PetscObjectComm((PetscObject)pep));CHKERRQ(ierr);
-  ierr = MPI_Allreduce(&nrmd,&pep->nrml[1],1,MPIU_REAL,MPIU_MAX,PetscObjectComm((PetscObject)pep));CHKERRQ(ierr);
-  pep->nrml[1] = PetscMax(1.0,pep->nrml[1]*pep->dsfactor);
-  ierr = PetscFree2(pbc,T);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "PEPBasisCoefficients"
 /*
    PEPBasisCoefficients - compute polynomial basis coefficients
diff --git a/src/pep/interface/pepdefault.c.html b/src/pep/interface/pepdefault.c.html
index d24ef53..ceaa23b 100644
--- a/src/pep/interface/pepdefault.c.html
+++ b/src/pep/interface/pepdefault.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepdefault.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:49+00:00">
+<meta name="date" content="2016-05-16T10:33:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepdefault.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepdefault.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     This file contains some simple default routines for common <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> operations.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -66,9 +66,9 @@
 <a name="line58"> 58: </a>}
 
 <a name="line62"> 62: </a><font color="#B22222">/*</font>
-<a name="line63"> 63: </a><font color="#B22222">  PEPConvergedEigRelative - Checks convergence relative to the eigenvalue.</font>
+<a name="line63"> 63: </a><font color="#B22222">  PEPConvergedRelative - Checks convergence relative to the eigenvalue.</font>
 <a name="line64"> 64: </a><font color="#B22222">*/</font>
-<a name="line65"> 65: </a><strong><font color="#4169E1"><a name="PEPConvergedEigRelative"></a>PetscErrorCode PEPConvergedEigRelative(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line65"> 65: </a><strong><font color="#4169E1"><a name="PEPConvergedRelative"></a>PetscErrorCode PEPConvergedRelative(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
 <a name="line66"> 66: </a>{
 <a name="line67"> 67: </a>  PetscReal w;
 
@@ -78,480 +78,459 @@
 <a name="line73"> 73: </a>}
 
 <a name="line77"> 77: </a><font color="#B22222">/*</font>
-<a name="line78"> 78: </a><font color="#B22222">  PEPConvergedLinear - Checks convergence related to the linearized eigenproblem.</font>
+<a name="line78"> 78: </a><font color="#B22222">  PEPConvergedNorm - Checks convergence relative to the matrix norms.</font>
 <a name="line79"> 79: </a><font color="#B22222">*/</font>
-<a name="line80"> 80: </a><strong><font color="#4169E1"><a name="PEPConvergedLinear"></a>PetscErrorCode PEPConvergedLinear(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line80"> 80: </a><strong><font color="#4169E1"><a name="PEPConvergedNorm"></a>PetscErrorCode PEPConvergedNorm(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
 <a name="line81"> 81: </a>{
-<a name="line83"> 83: </a>  PetscScalar    er,ei;
+<a name="line82"> 82: </a>  PetscReal      w=0.0,t;
+<a name="line83"> 83: </a>  PetscInt       j;
 <a name="line84"> 84: </a>  PetscBool      flg;
-<a name="line86"> 86: </a>  <a href="../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line88"> 88: </a>    PetscObjectTypeCompare((PetscObject)pep->st,STSINVERT,&flg);
-<a name="line89"> 89: </a>  } <font color="#4169E1">else</font> flg = PETSC_FALSE;
-<a name="line90"> 90: </a>  er = eigr; ei = eigi;
-<a name="line91"> 91: </a>  <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(pep->st,1,&er,&ei);
-<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (flg) *errest = res*((pep->nrml[0]+PetscAbsScalar(pep->target)*pep->nrml[1])/SlepcAbsEigenvalue(eigr,eigi))/(pep->nrml[0]+SlepcAbsEigenvalue(er,ei)*pep->nrml[1]);
-<a name="line93"> 93: </a>  <font color="#4169E1">else</font> *errest = res*pep->nrml[1]/(pep->nrml[0]+SlepcAbsEigenvalue(er,ei)*pep->nrml[1]);
-<a name="line94"> 94: </a>  <font color="#4169E1">return</font>(0);
-<a name="line95"> 95: </a>}
-
-<a name="line99"> 99: </a><font color="#B22222">/*</font>
-<a name="line100">100: </a><font color="#B22222">  PEPConvergedNorm - Checks convergence relative to the matrix norms.</font>
-<a name="line101">101: </a><font color="#B22222">*/</font>
-<a name="line102">102: </a><strong><font color="#4169E1"><a name="PEPConvergedNorm"></a>PetscErrorCode PEPConvergedNorm(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
-<a name="line103">103: </a>{
-<a name="line104">104: </a>  PetscReal      w=0.0,t;
-<a name="line105">105: </a>  PetscInt       j;
-<a name="line106">106: </a>  PetscBool      flg;
-
-<a name="line110">110: </a>  <font color="#B22222">/* initialization of matrix norms */</font>
-<a name="line111">111: </a>  <font color="#4169E1">if</font> (!pep->nrma[pep->nmat-1]) {
-<a name="line112">112: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
-<a name="line113">113: </a>      MatHasOperation(pep->A[j],MATOP_NORM,&flg);
-<a name="line114">114: </a>      <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"The convergence test related to the matrix norms requires a matrix norm operation"</font>);
-<a name="line115">115: </a>      MatNorm(pep->A[j],NORM_INFINITY,&pep->nrma[j]);
-<a name="line116">116: </a>    }
-<a name="line117">117: </a>  }
-<a name="line118">118: </a>  t = SlepcAbsEigenvalue(eigr,eigi);
-<a name="line119">119: </a>  <font color="#4169E1">for</font> (j=pep->nmat-1;j>=0;j--) {
-<a name="line120">120: </a>    w = w*t+pep->nrma[j];
-<a name="line121">121: </a>  }
-<a name="line122">122: </a>  *errest = res/w;
-<a name="line123">123: </a>  <font color="#4169E1">return</font>(0);
-<a name="line124">124: </a>}
-
-<a name="line128">128: </a><font color="#B22222">/*</font>
-<a name="line129">129: </a><font color="#B22222">  PEPConvergedAbsolute - Checks convergence absolutely.</font>
-<a name="line130">130: </a><font color="#B22222">*/</font>
-<a name="line131">131: </a><strong><font color="#4169E1"><a name="PEPConvergedAbsolute"></a>PetscErrorCode PEPConvergedAbsolute(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
-<a name="line132">132: </a>{
-<a name="line134">134: </a>  *errest = res;
-<a name="line135">135: </a>  <font color="#4169E1">return</font>(0);
-<a name="line136">136: </a>}
-
-<a name="line140">140: </a><strong><font color="#4169E1"><a name="PEPBackTransform_Default"></a>PetscErrorCode PEPBackTransform_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line141">141: </a>{
-
-<a name="line145">145: </a>  <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(pep->st,pep->nconv,pep->eigr,pep->eigi);
-<a name="line146">146: </a>  <font color="#4169E1">return</font>(0);
-<a name="line147">147: </a>}
-
-<a name="line151">151: </a><strong><font color="#4169E1"><a name="PEPComputeVectors_Default"></a>PetscErrorCode PEPComputeVectors_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line152">152: </a>{
-<a name="line154">154: </a>  PetscInt       i;
-<a name="line155">155: </a>  Vec            v;
-<a name="line156">156: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line157">157: </a>  Vec            v1;
-<a name="line158">158: </a><font color="#A020F0">#endif</font>
-
-<a name="line161">161: </a>  PEPExtractVectors(pep);
-
-<a name="line163">163: </a>  <font color="#B22222">/* Fix eigenvectors if balancing was used */</font>
-<a name="line164">164: </a>  <font color="#4169E1">if</font> ((pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) && pep->Dr && (pep->refine!=PEP_REFINE_MULTIPLE)) {
-<a name="line165">165: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line166">166: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
-<a name="line167">167: </a>      VecPointwiseMult(v,v,pep->Dr);
-<a name="line168">168: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
-<a name="line169">169: </a>    }
-<a name="line170">170: </a>  }
-
-<a name="line172">172: </a>  <font color="#B22222">/* normalization */</font>
-<a name="line173">173: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line174">174: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line175">175: </a>    <font color="#4169E1">if</font> (pep->eigi[i]!=0.0) {   <font color="#B22222">/* first eigenvalue of a complex conjugate pair */</font>
-<a name="line176">176: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
-<a name="line177">177: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i+1,&v1);
-<a name="line178">178: </a>      <a href="../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(v,v1,PETSC_TRUE,NULL);
-<a name="line179">179: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
-<a name="line180">180: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i+1,&v1);
-<a name="line181">181: </a>      i++;
-<a name="line182">182: </a>    } <font color="#4169E1">else</font>   <font color="#B22222">/* real eigenvalue */</font>
-<a name="line183">183: </a><font color="#A020F0">#endif</font>
-<a name="line184">184: </a>    {
-<a name="line185">185: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
-<a name="line186">186: </a>      <a href="../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(v,NULL,PETSC_FALSE,NULL);
-<a name="line187">187: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
-<a name="line188">188: </a>    }
-<a name="line189">189: </a>  }
-<a name="line190">190: </a>  <font color="#4169E1">return</font>(0);
-<a name="line191">191: </a>}
-
-<a name="line195">195: </a><font color="#B22222">/*</font>
-<a name="line196">196: </a><font color="#B22222">   PEPKrylovConvergence - This is the analogue to EPSKrylovConvergence, but</font>
-<a name="line197">197: </a><font color="#B22222">   for polynomial Krylov methods.</font>
-
-<a name="line199">199: </a><font color="#B22222">   Differences:</font>
-<a name="line200">200: </a><font color="#B22222">   - Always non-symmetric</font>
-<a name="line201">201: </a><font color="#B22222">   - Does not check for STSHIFT</font>
-<a name="line202">202: </a><font color="#B22222">   - No correction factor</font>
-<a name="line203">203: </a><font color="#B22222">   - No support for true residual</font>
-<a name="line204">204: </a><font color="#B22222">*/</font>
-<a name="line205">205: </a><strong><font color="#4169E1"><a name="PEPKrylovConvergence"></a>PetscErrorCode PEPKrylovConvergence(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscInt *kout)</font></strong>
-<a name="line206">206: </a>{
-<a name="line208">208: </a>  PetscInt       k,newk,marker,ld,inside;
-<a name="line209">209: </a>  PetscScalar    re,im;
-<a name="line210">210: </a>  PetscReal      resnorm;
-<a name="line211">211: </a>  PetscBool      istrivial;
-
-<a name="line214">214: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
-<a name="line215">215: </a>  <a href="../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(pep->ds,&ld);
-<a name="line216">216: </a>  marker = -1;
-<a name="line217">217: </a>  <font color="#4169E1">if</font> (pep->trackall) getall = PETSC_TRUE;
-<a name="line218">218: </a>  <font color="#4169E1">for</font> (k=kini;k<kini+nits;k++) {
-<a name="line219">219: </a>    <font color="#B22222">/* eigenvalue */</font>
-<a name="line220">220: </a>    re = pep->eigr[k];
-<a name="line221">221: </a>    im = pep->eigi[k];
-<a name="line222">222: </a>    <font color="#4169E1">if</font> (!istrivial) {
-<a name="line223">223: </a>      <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(pep->st,1,&re,&im);
-<a name="line224">224: </a>      <a href="../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(pep->rg,1,&re,&im,&inside);
-<a name="line225">225: </a>      <font color="#4169E1">if</font> (marker==-1 && inside<=0) marker = k;
-<a name="line226">226: </a>      re = pep->eigr[k];
-<a name="line227">227: </a>      im = pep->eigi[k];
-<a name="line228">228: </a>    }
-<a name="line229">229: </a>    newk = k;
-<a name="line230">230: </a>    <a href="../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(pep->ds,DS_MAT_X,&newk,&resnorm);
-<a name="line231">231: </a>    resnorm *= beta;
-<a name="line232">232: </a>    <font color="#B22222">/* error estimate */</font>
-<a name="line233">233: </a>    (*pep->converged)(pep,re,im,resnorm,&pep->errest[k],pep->convergedctx);
-<a name="line234">234: </a>    <font color="#4169E1">if</font> (marker==-1 && pep->errest[k] >= pep->tol) marker = k;
-<a name="line235">235: </a>    <font color="#4169E1">if</font> (newk==k+1) {
-<a name="line236">236: </a>      pep->errest[k+1] = pep->errest[k];
-<a name="line237">237: </a>      k++;
-<a name="line238">238: </a>    }
-<a name="line239">239: </a>    <font color="#4169E1">if</font> (marker!=-1 && !getall) <font color="#4169E1">break</font>;
-<a name="line240">240: </a>  }
-<a name="line241">241: </a>  <font color="#4169E1">if</font> (marker!=-1) k = marker;
-<a name="line242">242: </a>  *kout = k;
-<a name="line243">243: </a>  <font color="#4169E1">return</font>(0);
-<a name="line244">244: </a>}
-
-<a name="line248">248: </a><font color="#B22222">/*</font>
-<a name="line249">249: </a><font color="#B22222">  PEPBuildDiagonalScaling - compute two diagonal matrices to be applied for balancing </font>
-<a name="line250">250: </a><font color="#B22222">  in polynomial eigenproblems.</font>
-<a name="line251">251: </a><font color="#B22222">*/</font>
-<a name="line252">252: </a><strong><font color="#4169E1"><a name="PEPBuildDiagonalScaling"></a>PetscErrorCode PEPBuildDiagonalScaling(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line253">253: </a>{
-<a name="line255">255: </a>  PetscInt       it,i,j,k,nmat,nr,e,nz,lst,lend,nc=0,*cols,emax,emin,emaxl,eminl;
-<a name="line256">256: </a>  const PetscInt *cidx,*ridx;
-<a name="line257">257: </a>  Mat            M,*T,A;
-<a name="line258">258: </a>  PetscMPIInt    n;
-<a name="line259">259: </a>  PetscBool      cont=PETSC_TRUE,flg=PETSC_FALSE;
-<a name="line260">260: </a>  PetscScalar    *array,*Dr,*Dl,t;
-<a name="line261">261: </a>  PetscReal      l2,d,*rsum,*aux,*csum,w=1.0;
-<a name="line262">262: </a>  MatStructure   str;
-<a name="line263">263: </a>  MatInfo        info;
-
-<a name="line266">266: </a>  l2 = 2*PetscLogReal(2.0);
-<a name="line267">267: </a>  nmat = pep->nmat;
-<a name="line268">268: </a>  PetscMPIIntCast(pep->n,&n);
-<a name="line269">269: </a>  <a href="../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
-<a name="line270">270: </a>  PetscMalloc1(nmat,&T);
-<a name="line271">271: </a>  <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
-<a name="line272">272: </a>    <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,k,&T[k]);
-<a name="line273">273: </a>  }
-<a name="line274">274: </a>  <font color="#B22222">/* Form local auxiliar matrix M */</font>
-<a name="line275">275: </a>  PetscObjectTypeCompareAny((PetscObject)T[0],&cont,MATMPIAIJ,MATSEQAIJ,<font color="#666666">""</font>);
-<a name="line276">276: </a>  <font color="#4169E1">if</font> (!cont) SETERRQ(PetscObjectComm((PetscObject)T[0]),PETSC_ERR_SUP,<font color="#666666">"Only for MPIAIJ or SEQAIJ matrix types"</font>);
-<a name="line277">277: </a>  PetscObjectTypeCompare((PetscObject)T[0],MATMPIAIJ,&cont);
-<a name="line278">278: </a>  <font color="#4169E1">if</font> (cont) {
-<a name="line279">279: </a>    MatMPIAIJGetLocalMat(T[0],MAT_INITIAL_MATRIX,&M);
-<a name="line280">280: </a>    flg = PETSC_TRUE; 
-<a name="line281">281: </a>  } <font color="#4169E1">else</font> {
-<a name="line282">282: </a>    MatDuplicate(T[0],MAT_COPY_VALUES,&M);
-<a name="line283">283: </a>  }
-<a name="line284">284: </a>  MatGetInfo(M,MAT_LOCAL,&info);
-<a name="line285">285: </a>  nz = (PetscInt)info.nz_used;
-<a name="line286">286: </a>  MatSeqAIJGetArray(M,&array);
-<a name="line287">287: </a>  <font color="#4169E1">for</font> (i=0;i<nz;i++) {
-<a name="line288">288: </a>    t = PetscAbsScalar(array[i]);
-<a name="line289">289: </a>    array[i] = t*t;
-<a name="line290">290: </a>  }
-<a name="line291">291: </a>  MatSeqAIJRestoreArray(M,&array);
-<a name="line292">292: </a>  <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line293">293: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line294">294: </a>      MatMPIAIJGetLocalMat(T[k],MAT_INITIAL_MATRIX,&A);
-<a name="line295">295: </a>    } <font color="#4169E1">else</font> {
-<a name="line296">296: </a>      <font color="#4169E1">if</font> (str==SAME_NONZERO_PATTERN) {
-<a name="line297">297: </a>        MatCopy(T[k],A,SAME_NONZERO_PATTERN);
-<a name="line298">298: </a>      } <font color="#4169E1">else</font> {
-<a name="line299">299: </a>        MatDuplicate(T[k],MAT_COPY_VALUES,&A);
-<a name="line300">300: </a>      }
-<a name="line301">301: </a>    }
-<a name="line302">302: </a>    MatGetInfo(A,MAT_LOCAL,&info);
-<a name="line303">303: </a>    nz = (PetscInt)info.nz_used;
-<a name="line304">304: </a>    MatSeqAIJGetArray(A,&array);
-<a name="line305">305: </a>    <font color="#4169E1">for</font> (i=0;i<nz;i++) {
-<a name="line306">306: </a>      t = PetscAbsScalar(array[i]);
-<a name="line307">307: </a>      array[i] = t*t;
-<a name="line308">308: </a>    }
-<a name="line309">309: </a>    MatSeqAIJRestoreArray(A,&array);
-<a name="line310">310: </a>    w *= pep->slambda*pep->slambda*pep->sfactor;
-<a name="line311">311: </a>    MatAXPY(M,w,A,str);
-<a name="line312">312: </a>    <font color="#4169E1">if</font> (flg || str!=SAME_NONZERO_PATTERN || k==nmat-2) {
-<a name="line313">313: </a>      MatDestroy(&A);
-<a name="line314">314: </a>    } 
-<a name="line315">315: </a>  }
-<a name="line316">316: </a>  MatGetRowIJ(M,0,PETSC_FALSE,PETSC_FALSE,&nr,&ridx,&cidx,&cont);
-<a name="line317">317: </a>  <font color="#4169E1">if</font> (!cont) SETERRQ(PetscObjectComm((PetscObject)T[0]), PETSC_ERR_SUP,<font color="#666666">"It is not possible to compute scaling diagonals for these <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> matrices"</font>);
-<a name="line318">318: </a>  MatGetInfo(M,MAT_LOCAL,&info);
-<a name="line319">319: </a>  nz = (PetscInt)info.nz_used;
-<a name="line320">320: </a>  VecGetOwnershipRange(pep->Dl,&lst,&lend);
-<a name="line321">321: </a>  PetscMalloc4(nr,&rsum,pep->n,&csum,pep->n,&aux,PetscMin(pep->n-lend+lst,nz),&cols);
-<a name="line322">322: </a>  VecSet(pep->Dr,1.0);
-<a name="line323">323: </a>  VecSet(pep->Dl,1.0);
-<a name="line324">324: </a>  VecGetArray(pep->Dl,&Dl);
-<a name="line325">325: </a>  VecGetArray(pep->Dr,&Dr);
-<a name="line326">326: </a>  MatSeqAIJGetArray(M,&array);
-<a name="line327">327: </a>  PetscMemzero(aux,pep->n*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line328">328: </a>  <font color="#4169E1">for</font> (j=0;j<nz;j++) {
-<a name="line329">329: </a>    <font color="#B22222">/* Search non-zero columns outsize lst-lend */</font>
-<a name="line330">330: </a>    <font color="#4169E1">if</font> (aux[cidx[j]]==0 && (cidx[j]<lst || lend<=cidx[j])) cols[nc++] = cidx[j];
-<a name="line331">331: </a>    <font color="#B22222">/* Local column sums */</font>
-<a name="line332">332: </a>    aux[cidx[j]] += PetscAbsScalar(array[j]);
-<a name="line333">333: </a>  }
-<a name="line334">334: </a>  <font color="#4169E1">for</font> (it=0;it<pep->sits && cont;it++) {
-<a name="line335">335: </a>    emaxl = 0; eminl = 0;
-<a name="line336">336: </a>    <font color="#B22222">/* Column sum  */</font>    
-<a name="line337">337: </a>    <font color="#4169E1">if</font> (it>0) { <font color="#B22222">/* it=0 has been already done*/</font>
-<a name="line338">338: </a>      MatSeqAIJGetArray(M,&array);
-<a name="line339">339: </a>      PetscMemzero(aux,pep->n*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line340">340: </a>      <font color="#4169E1">for</font> (j=0;j<nz;j++) aux[cidx[j]] += PetscAbsScalar(array[j]);
-<a name="line341">341: </a>      MatSeqAIJRestoreArray(M,&array); 
-<a name="line342">342: </a>    }
-<a name="line343">343: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(aux,csum,n,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)pep->Dr));
-<a name="line344">344: </a>    <font color="#B22222">/* Update Dr */</font>
-<a name="line345">345: </a>    <font color="#4169E1">for</font> (j=lst;j<lend;j++) {
-<a name="line346">346: </a>      d = PetscLogReal(csum[j])/l2;
-<a name="line347">347: </a>      e = -(PetscInt)((d < 0)?(d-0.5):(d+0.5));
-<a name="line348">348: </a>      d = PetscPowReal(2.0,e);
-<a name="line349">349: </a>      Dr[j-lst] *= d;
-<a name="line350">350: </a>      aux[j] = d*d;
-<a name="line351">351: </a>      emaxl = PetscMax(emaxl,e);
-<a name="line352">352: </a>      eminl = PetscMin(eminl,e);
-<a name="line353">353: </a>    }
-<a name="line354">354: </a>    <font color="#4169E1">for</font> (j=0;j<nc;j++) {
-<a name="line355">355: </a>      d = PetscLogReal(csum[cols[j]])/l2;
-<a name="line356">356: </a>      e = -(PetscInt)((d < 0)?(d-0.5):(d+0.5));
-<a name="line357">357: </a>      d = PetscPowReal(2.0,e);
-<a name="line358">358: </a>      aux[cols[j]] = d*d;
-<a name="line359">359: </a>      emaxl = PetscMax(emaxl,e);
-<a name="line360">360: </a>      eminl = PetscMin(eminl,e);
-<a name="line361">361: </a>    }
-<a name="line362">362: </a>    <font color="#B22222">/* Scale M */</font>
-<a name="line363">363: </a>    MatSeqAIJGetArray(M,&array);
-<a name="line364">364: </a>    <font color="#4169E1">for</font> (j=0;j<nz;j++) {
-<a name="line365">365: </a>      array[j] *= aux[cidx[j]];
-<a name="line366">366: </a>    }
-<a name="line367">367: </a>    MatSeqAIJRestoreArray(M,&array);
-<a name="line368">368: </a>    <font color="#B22222">/* Row sum */</font>    
-<a name="line369">369: </a>    PetscMemzero(rsum,nr*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line370">370: </a>    MatSeqAIJGetArray(M,&array);
-<a name="line371">371: </a>    <font color="#4169E1">for</font> (i=0;i<nr;i++) {
-<a name="line372">372: </a>      <font color="#4169E1">for</font> (j=ridx[i];j<ridx[i+1];j++) rsum[i] += PetscAbsScalar(array[j]);
-<a name="line373">373: </a>      <font color="#B22222">/* Update Dl */</font>
-<a name="line374">374: </a>      d = PetscLogReal(rsum[i])/l2;
-<a name="line375">375: </a>      e = -(PetscInt)((d < 0)?(d-0.5):(d+0.5));
-<a name="line376">376: </a>      d = PetscPowReal(2.0,e);
-<a name="line377">377: </a>      Dl[i] *= d;
-<a name="line378">378: </a>      <font color="#B22222">/* Scale M */</font>
-<a name="line379">379: </a>      <font color="#4169E1">for</font> (j=ridx[i];j<ridx[i+1];j++) array[j] *= d*d;
-<a name="line380">380: </a>      emaxl = PetscMax(emaxl,e);
-<a name="line381">381: </a>      eminl = PetscMin(eminl,e);      
-<a name="line382">382: </a>    }
-<a name="line383">383: </a>    MatSeqAIJRestoreArray(M,&array);  
-<a name="line384">384: </a>    <font color="#B22222">/* Compute global max and min */</font>
-<a name="line385">385: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&emaxl,&emax,1,MPIU_INT,MPI_MAX,PetscObjectComm((PetscObject)pep->Dl));
-<a name="line386">386: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&eminl,&emin,1,MPIU_INT,MPI_MIN,PetscObjectComm((PetscObject)pep->Dl));
-<a name="line387">387: </a>    <font color="#4169E1">if</font> (emax<=emin+2) cont = PETSC_FALSE;
-<a name="line388">388: </a>  }
-<a name="line389">389: </a>  VecRestoreArray(pep->Dr,&Dr);
-<a name="line390">390: </a>  VecRestoreArray(pep->Dl,&Dl);
-<a name="line391">391: </a>  <font color="#B22222">/* Free memory*/</font>
-<a name="line392">392: </a>  MatDestroy(&M);
-<a name="line393">393: </a>  PetscFree4(rsum,csum,aux,cols);
-<a name="line394">394: </a>  PetscFree(T);
-<a name="line395">395: </a>  <font color="#4169E1">return</font>(0);
-<a name="line396">396: </a>}
-
-<a name="line400">400: </a><font color="#B22222">/*</font>
-<a name="line401">401: </a><font color="#B22222">   PEPComputeScaleFactor - compute sfactor as described in [Betcke 2008].</font>
-<a name="line402">402: </a><font color="#B22222">*/</font>
-<a name="line403">403: </a><strong><font color="#4169E1"><a name="PEPComputeScaleFactor"></a>PetscErrorCode PEPComputeScaleFactor(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line404">404: </a>{
-<a name="line406">406: </a>  PetscBool      has0,has1,flg;
-<a name="line407">407: </a>  PetscReal      norm0,norm1;
-<a name="line408">408: </a>  Mat            T[2];
-<a name="line409">409: </a>  <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>       basis;
-<a name="line410">410: </a>  PetscInt       i;
-
-<a name="line413">413: </a>  <font color="#4169E1">if</font> (pep->scale==PEP_SCALE_NONE || pep->scale==PEP_SCALE_DIAGONAL) {  <font color="#B22222">/* no scalar scaling */</font>
-<a name="line414">414: </a>    pep->sfactor = 1.0;
-<a name="line415">415: </a>    pep->dsfactor = 1.0;
-<a name="line416">416: </a>    <font color="#4169E1">return</font>(0);
-<a name="line417">417: </a>  }
-<a name="line418">418: </a>  <font color="#4169E1">if</font> (pep->sfactor_set) <font color="#4169E1">return</font>(0);  <font color="#B22222">/* user provided value */</font>
-<a name="line419">419: </a>  pep->sfactor = 1.0;
-<a name="line420">420: </a>  pep->dsfactor = 1.0;
-<a name="line421">421: </a>  <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(pep,&basis);
-<a name="line422">422: </a>  <font color="#4169E1">if</font> (basis==PEP_BASIS_MONOMIAL) {
-<a name="line423">423: </a>    <a href="../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line424">424: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line425">425: </a>      <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,0,&T[0]);
-<a name="line426">426: </a>      <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,pep->nmat-1,&T[1]);
-<a name="line427">427: </a>    } <font color="#4169E1">else</font> {
-<a name="line428">428: </a>      T[0] = pep->A[0];
-<a name="line429">429: </a>      T[1] = pep->A[pep->nmat-1];
-<a name="line430">430: </a>    }
-<a name="line431">431: </a>    <font color="#4169E1">if</font> (pep->nmat>2) {
-<a name="line432">432: </a>      MatHasOperation(T[0],MATOP_NORM,&has0);
-<a name="line433">433: </a>      MatHasOperation(T[1],MATOP_NORM,&has1);
-<a name="line434">434: </a>      <font color="#4169E1">if</font> (has0 && has1) {
-<a name="line435">435: </a>        MatNorm(T[0],NORM_INFINITY,&norm0);
-<a name="line436">436: </a>        MatNorm(T[1],NORM_INFINITY,&norm1);
-<a name="line437">437: </a>        pep->sfactor = PetscPowReal(norm0/norm1,1.0/(pep->nmat-1));
-<a name="line438">438: </a>        pep->dsfactor = norm1;
-<a name="line439">439: </a>        <font color="#4169E1">for</font> (i=pep->nmat-2;i>0;i--) {
-<a name="line440">440: </a>          <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&T[1]);
-<a name="line441">441: </a>          MatHasOperation(T[1],MATOP_NORM,&has1);
-<a name="line442">442: </a>          <font color="#4169E1">if</font> (has1) {
-<a name="line443">443: </a>            MatNorm(T[1],NORM_INFINITY,&norm1);
-<a name="line444">444: </a>            pep->dsfactor = pep->dsfactor*pep->sfactor+norm1;
-<a name="line445">445: </a>          } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
-<a name="line446">446: </a>        }
-<a name="line447">447: </a>        <font color="#4169E1">if</font> (has1) {
-<a name="line448">448: </a>          pep->dsfactor = pep->dsfactor*pep->sfactor+norm0;
-<a name="line449">449: </a>          pep->dsfactor = pep->nmat/pep->dsfactor;
-<a name="line450">450: </a>        } <font color="#4169E1">else</font> pep->dsfactor = 1.0;
-<a name="line451">451: </a>      } 
-<a name="line452">452: </a>    }
-<a name="line453">453: </a>  } 
-<a name="line454">454: </a>  <font color="#4169E1">return</font>(0);
-<a name="line455">455: </a>}
-
-<a name="line459">459: </a><font color="#B22222">/*</font>
-<a name="line460">460: </a><font color="#B22222">   PEPComputeLinearNorms - compute norm for the linearized problem.</font>
-<a name="line461">461: </a><font color="#B22222">*/</font>
-<a name="line462">462: </a><strong><font color="#4169E1"><a name="PEPComputeLinearNorms"></a>PetscErrorCode PEPComputeLinearNorms(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line463">463: </a>{
-<a name="line464">464: </a>  PetscErrorCode    ierr;
-<a name="line465">465: </a>  PetscReal         out=0.0,nrmd=0.0,max=0.0,summ,summrow,summd=0.0;
-<a name="line466">466: </a>  PetscReal         *pbc,*a,*b,*g,t;
-<a name="line467">467: </a>  PetscInt          i,m0,m1,ncols,j,k;
-<a name="line468">468: </a>  const PetscScalar *vals;
-<a name="line469">469: </a>  Mat               *T;
-
-<a name="line472">472: </a>  PetscMalloc2(3*pep->nmat,&pbc,pep->nmat,&T);
-<a name="line473">473: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line474">474: </a>    <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&T[i]);
-<a name="line475">475: </a>  }
-<a name="line476">476: </a>  a=pbc; b=pbc+pep->nmat; g = b+pep->nmat;
-<a name="line477">477: </a>  PEPBasisCoefficients(pep,pbc);
-<a name="line478">478: </a>  out = b[0]+a[0];
-<a name="line479">479: </a>  <font color="#4169E1">for</font> (i=1;i<pep->nmat-2;i++) out = PetscMax(out,a[i]+b[i]+g[i]);
-<a name="line480">480: </a>  MatGetOwnershipRange(T[0],&m0,&m1);
-<a name="line481">481: </a>  <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
-<a name="line482">482: </a>    summrow = 0.0;
-<a name="line483">483: </a>    t = 1.0;
-<a name="line484">484: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
-<a name="line485">485: </a>      summ = 0.0;
-<a name="line486">486: </a>      MatGetRow(T[j],i,&ncols,NULL,&vals);
-<a name="line487">487: </a>      <font color="#4169E1">for</font> (k=0;k<ncols;k++) summ += PetscAbsScalar(vals[k]);
-<a name="line488">488: </a>      MatRestoreRow(T[j],i,&ncols,NULL,&vals);
-<a name="line489">489: </a>      summ *= t;
-<a name="line490">490: </a>      <font color="#4169E1">if</font> (j==pep->nmat-1) {
-<a name="line491">491: </a>        summd = summ;
-<a name="line492">492: </a>        summ *= (b[pep->nmat-2]+g[pep->nmat-2])/a[pep->nmat-2];
-<a name="line493">493: </a>      } <font color="#4169E1">else</font> summ *= a[pep->nmat-2];
-<a name="line494">494: </a>      summrow += summ;
-<a name="line495">495: </a>      t *= pep->sfactor;
-<a name="line496">496: </a>    }
-<a name="line497">497: </a>    nrmd = PetscMax(nrmd,summd);
-<a name="line498">498: </a>    max = PetscMax(max,summrow);
-<a name="line499">499: </a>  }
-<a name="line500">500: </a>  max = PetscMax(max*pep->dsfactor,out);
-<a name="line501">501: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&max,&pep->nrml[0],1,MPIU_REAL,MPIU_MAX,PetscObjectComm((PetscObject)pep));
-<a name="line502">502: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&nrmd,&pep->nrml[1],1,MPIU_REAL,MPIU_MAX,PetscObjectComm((PetscObject)pep));
-<a name="line503">503: </a>  pep->nrml[1] = PetscMax(1.0,pep->nrml[1]*pep->dsfactor);
-<a name="line504">504: </a>  PetscFree2(pbc,T);
-<a name="line505">505: </a>  <font color="#4169E1">return</font>(0);
-<a name="line506">506: </a>}
-
-<a name="line510">510: </a><font color="#B22222">/*</font>
-<a name="line511">511: </a><font color="#B22222">   PEPBasisCoefficients - compute polynomial basis coefficients</font>
-<a name="line512">512: </a><font color="#B22222">*/</font>
-<a name="line513">513: </a><strong><font color="#4169E1"><a name="PEPBasisCoefficients"></a>PetscErrorCode PEPBasisCoefficients(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *pbc)</font></strong>
-<a name="line514">514: </a>{
-<a name="line515">515: </a>  PetscReal *ca,*cb,*cg;
-<a name="line516">516: </a>  PetscInt  k,nmat=pep->nmat;
-<a name="line517">517: </a>  
-<a name="line519">519: </a>  ca = pbc;
-<a name="line520">520: </a>  cb = pbc+nmat;
-<a name="line521">521: </a>  cg = pbc+2*nmat;
-<a name="line522">522: </a>  <font color="#4169E1">switch</font> (pep->basis) {
-<a name="line523">523: </a>  <font color="#4169E1">case</font> PEP_BASIS_MONOMIAL:
-<a name="line524">524: </a>    <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
-<a name="line525">525: </a>      ca[k] = 1.0; cb[k] = 0.0; cg[k] = 0.0;
+
+<a name="line88"> 88: </a>  <font color="#B22222">/* initialization of matrix norms */</font>
+<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (!pep->nrma[pep->nmat-1]) {
+<a name="line90"> 90: </a>    <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
+<a name="line91"> 91: </a>      MatHasOperation(pep->A[j],MATOP_NORM,&flg);
+<a name="line92"> 92: </a>      <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"The convergence test related to the matrix norms requires a matrix norm operation"</font>);
+<a name="line93"> 93: </a>      MatNorm(pep->A[j],NORM_INFINITY,&pep->nrma[j]);
+<a name="line94"> 94: </a>    }
+<a name="line95"> 95: </a>  }
+<a name="line96"> 96: </a>  t = SlepcAbsEigenvalue(eigr,eigi);
+<a name="line97"> 97: </a>  <font color="#4169E1">for</font> (j=pep->nmat-1;j>=0;j--) {
+<a name="line98"> 98: </a>    w = w*t+pep->nrma[j];
+<a name="line99"> 99: </a>  }
+<a name="line100">100: </a>  *errest = res/w;
+<a name="line101">101: </a>  <font color="#4169E1">return</font>(0);
+<a name="line102">102: </a>}
+
+<a name="line106">106: </a><font color="#B22222">/*</font>
+<a name="line107">107: </a><font color="#B22222">  PEPConvergedAbsolute - Checks convergence absolutely.</font>
+<a name="line108">108: </a><font color="#B22222">*/</font>
+<a name="line109">109: </a><strong><font color="#4169E1"><a name="PEPConvergedAbsolute"></a>PetscErrorCode PEPConvergedAbsolute(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line110">110: </a>{
+<a name="line112">112: </a>  *errest = res;
+<a name="line113">113: </a>  <font color="#4169E1">return</font>(0);
+<a name="line114">114: </a>}
+
+<a name="line118">118: </a><font color="#B22222">/*@C</font>
+<a name="line119">119: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a> - Default routine to determine whether the outer eigensolver</font>
+<a name="line120">120: </a><font color="#B22222">   iteration must be stopped.</font>
+
+<a name="line122">122: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line124">124: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line125">125: </a><font color="#B22222">+  pep    - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line126">126: </a><font color="#B22222">.  its    - current number of iterations</font>
+<a name="line127">127: </a><font color="#B22222">.  max_it - maximum number of iterations</font>
+<a name="line128">128: </a><font color="#B22222">.  nconv  - number of currently converged eigenpairs</font>
+<a name="line129">129: </a><font color="#B22222">.  nev    - number of requested eigenpairs</font>
+<a name="line130">130: </a><font color="#B22222">-  ctx    - context (not used here)</font>
+
+<a name="line132">132: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line133">133: </a><font color="#B22222">.  reason - result of the stopping test</font>
+
+<a name="line135">135: </a><font color="#B22222">   Notes:</font>
+<a name="line136">136: </a><font color="#B22222">   A positive value of reason indicates that the iteration has finished successfully</font>
+<a name="line137">137: </a><font color="#B22222">   (converged), and a negative value indicates an error condition (diverged). If</font>
+<a name="line138">138: </a><font color="#B22222">   the iteration needs to be continued, reason must be set to PEP_CONVERGED_ITERATING</font>
+<a name="line139">139: </a><font color="#B22222">   (zero).</font>
+
+<a name="line141">141: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>() will stop if all requested eigenvalues are converged, or if</font>
+<a name="line142">142: </a><font color="#B22222">   the maximum number of iterations has been reached.</font>
+
+<a name="line144">144: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>() to provide your own test instead of using this one.</font>
+
+<a name="line146">146: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line148">148: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a>, <a href="../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>()</font>
+<a name="line149">149: </a><font color="#B22222">@*/</font>
+<a name="line150">150: </a><strong><font color="#4169E1"><a name="PEPStoppingBasic"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> *reason,void *ctx)</font></strong>
+<a name="line151">151: </a>{
+
+<a name="line155">155: </a>  *reason = PEP_CONVERGED_ITERATING;
+<a name="line156">156: </a>  <font color="#4169E1">if</font> (nconv >= nev) {
+<a name="line157">157: </a>    PetscInfo2(pep,<font color="#666666">"Polynomial eigensolver finished successfully: %D eigenpairs converged at iteration %D\n"</font>,nconv,its);
+<a name="line158">158: </a>    *reason = PEP_CONVERGED_TOL;
+<a name="line159">159: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (its >= max_it) {
+<a name="line160">160: </a>    *reason = PEP_DIVERGED_ITS;
+<a name="line161">161: </a>    PetscInfo1(pep,<font color="#666666">"Polynomial eigensolver iteration reached maximum number of iterations (%D)\n"</font>,its);
+<a name="line162">162: </a>  }
+<a name="line163">163: </a>  <font color="#4169E1">return</font>(0);
+<a name="line164">164: </a>}
+
+<a name="line168">168: </a><strong><font color="#4169E1"><a name="PEPBackTransform_Default"></a>PetscErrorCode PEPBackTransform_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line169">169: </a>{
+
+<a name="line173">173: </a>  <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(pep->st,pep->nconv,pep->eigr,pep->eigi);
+<a name="line174">174: </a>  <font color="#4169E1">return</font>(0);
+<a name="line175">175: </a>}
+
+<a name="line179">179: </a><strong><font color="#4169E1"><a name="PEPComputeVectors_Default"></a>PetscErrorCode PEPComputeVectors_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line180">180: </a>{
+<a name="line182">182: </a>  PetscInt       i;
+<a name="line183">183: </a>  Vec            v;
+<a name="line184">184: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line185">185: </a>  Vec            v1;
+<a name="line186">186: </a><font color="#A020F0">#endif</font>
+
+<a name="line189">189: </a>  PEPExtractVectors(pep);
+
+<a name="line191">191: </a>  <font color="#B22222">/* Fix eigenvectors if balancing was used */</font>
+<a name="line192">192: </a>  <font color="#4169E1">if</font> ((pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) && pep->Dr && (pep->refine!=PEP_REFINE_MULTIPLE)) {
+<a name="line193">193: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line194">194: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line195">195: </a>      VecPointwiseMult(v,v,pep->Dr);
+<a name="line196">196: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line197">197: </a>    }
+<a name="line198">198: </a>  }
+
+<a name="line200">200: </a>  <font color="#B22222">/* normalization */</font>
+<a name="line201">201: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line202">202: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line203">203: </a>    <font color="#4169E1">if</font> (pep->eigi[i]!=0.0) {   <font color="#B22222">/* first eigenvalue of a complex conjugate pair */</font>
+<a name="line204">204: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line205">205: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i+1,&v1);
+<a name="line206">206: </a>      <a href="../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(v,v1,PETSC_TRUE,NULL);
+<a name="line207">207: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line208">208: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i+1,&v1);
+<a name="line209">209: </a>      i++;
+<a name="line210">210: </a>    } <font color="#4169E1">else</font>   <font color="#B22222">/* real eigenvalue */</font>
+<a name="line211">211: </a><font color="#A020F0">#endif</font>
+<a name="line212">212: </a>    {
+<a name="line213">213: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,i,&v);
+<a name="line214">214: </a>      <a href="../../../docs/manualpages/sys/SlepcVecNormalize.html#SlepcVecNormalize">SlepcVecNormalize</a>(v,NULL,PETSC_FALSE,NULL);
+<a name="line215">215: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,i,&v);
+<a name="line216">216: </a>    }
+<a name="line217">217: </a>  }
+<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
+<a name="line219">219: </a>}
+
+<a name="line223">223: </a><font color="#B22222">/*</font>
+<a name="line224">224: </a><font color="#B22222">   PEPKrylovConvergence - This is the analogue to EPSKrylovConvergence, but</font>
+<a name="line225">225: </a><font color="#B22222">   for polynomial Krylov methods.</font>
+
+<a name="line227">227: </a><font color="#B22222">   Differences:</font>
+<a name="line228">228: </a><font color="#B22222">   - Always non-symmetric</font>
+<a name="line229">229: </a><font color="#B22222">   - Does not check for STSHIFT</font>
+<a name="line230">230: </a><font color="#B22222">   - No correction factor</font>
+<a name="line231">231: </a><font color="#B22222">   - No support for true residual</font>
+<a name="line232">232: </a><font color="#B22222">*/</font>
+<a name="line233">233: </a><strong><font color="#4169E1"><a name="PEPKrylovConvergence"></a>PetscErrorCode PEPKrylovConvergence(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool getall,PetscInt kini,PetscInt nits,PetscReal beta,PetscInt *kout)</font></strong>
+<a name="line234">234: </a>{
+<a name="line236">236: </a>  PetscInt       k,newk,marker,inside;
+<a name="line237">237: </a>  PetscScalar    re,im;
+<a name="line238">238: </a>  PetscReal      resnorm;
+<a name="line239">239: </a>  PetscBool      istrivial;
+
+<a name="line242">242: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
+<a name="line243">243: </a>  marker = -1;
+<a name="line244">244: </a>  <font color="#4169E1">if</font> (pep->trackall) getall = PETSC_TRUE;
+<a name="line245">245: </a>  <font color="#4169E1">for</font> (k=kini;k<kini+nits;k++) {
+<a name="line246">246: </a>    <font color="#B22222">/* eigenvalue */</font>
+<a name="line247">247: </a>    re = pep->eigr[k];
+<a name="line248">248: </a>    im = pep->eigi[k];
+<a name="line249">249: </a>    <font color="#4169E1">if</font> (!istrivial) {
+<a name="line250">250: </a>      <a href="../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(pep->st,1,&re,&im);
+<a name="line251">251: </a>      <a href="../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(pep->rg,1,&re,&im,&inside);
+<a name="line252">252: </a>      <font color="#4169E1">if</font> (marker==-1 && inside<0) marker = k;
+<a name="line253">253: </a>      re = pep->eigr[k];
+<a name="line254">254: </a>      im = pep->eigi[k];
+<a name="line255">255: </a>    }
+<a name="line256">256: </a>    newk = k;
+<a name="line257">257: </a>    <a href="../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(pep->ds,DS_MAT_X,&newk,&resnorm);
+<a name="line258">258: </a>    resnorm *= beta;
+<a name="line259">259: </a>    <font color="#B22222">/* error estimate */</font>
+<a name="line260">260: </a>    (*pep->converged)(pep,re,im,resnorm,&pep->errest[k],pep->convergedctx);
+<a name="line261">261: </a>    <font color="#4169E1">if</font> (marker==-1 && pep->errest[k] >= pep->tol) marker = k;
+<a name="line262">262: </a>    <font color="#4169E1">if</font> (newk==k+1) {
+<a name="line263">263: </a>      pep->errest[k+1] = pep->errest[k];
+<a name="line264">264: </a>      k++;
+<a name="line265">265: </a>    }
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (marker!=-1 && !getall) <font color="#4169E1">break</font>;
+<a name="line267">267: </a>  }
+<a name="line268">268: </a>  <font color="#4169E1">if</font> (marker!=-1) k = marker;
+<a name="line269">269: </a>  *kout = k;
+<a name="line270">270: </a>  <font color="#4169E1">return</font>(0);
+<a name="line271">271: </a>}
+
+<a name="line275">275: </a><font color="#B22222">/*</font>
+<a name="line276">276: </a><font color="#B22222">  PEPBuildDiagonalScaling - compute two diagonal matrices to be applied for balancing </font>
+<a name="line277">277: </a><font color="#B22222">  in polynomial eigenproblems.</font>
+<a name="line278">278: </a><font color="#B22222">*/</font>
+<a name="line279">279: </a><strong><font color="#4169E1"><a name="PEPBuildDiagonalScaling"></a>PetscErrorCode PEPBuildDiagonalScaling(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line280">280: </a>{
+<a name="line282">282: </a>  PetscInt       it,i,j,k,nmat,nr,e,nz,lst,lend,nc=0,*cols,emax,emin,emaxl,eminl;
+<a name="line283">283: </a>  const PetscInt *cidx,*ridx;
+<a name="line284">284: </a>  Mat            M,*T,A;
+<a name="line285">285: </a>  PetscMPIInt    n;
+<a name="line286">286: </a>  PetscBool      cont=PETSC_TRUE,flg=PETSC_FALSE;
+<a name="line287">287: </a>  PetscScalar    *array,*Dr,*Dl,t;
+<a name="line288">288: </a>  PetscReal      l2,d,*rsum,*aux,*csum,w=1.0;
+<a name="line289">289: </a>  MatStructure   str;
+<a name="line290">290: </a>  MatInfo        info;
+
+<a name="line293">293: </a>  l2 = 2*PetscLogReal(2.0);
+<a name="line294">294: </a>  nmat = pep->nmat;
+<a name="line295">295: </a>  PetscMPIIntCast(pep->n,&n);
+<a name="line296">296: </a>  <a href="../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line297">297: </a>  PetscMalloc1(nmat,&T);
+<a name="line298">298: </a>  <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
+<a name="line299">299: </a>    <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,k,&T[k]);
+<a name="line300">300: </a>  }
+<a name="line301">301: </a>  <font color="#B22222">/* Form local auxiliar matrix M */</font>
+<a name="line302">302: </a>  PetscObjectTypeCompareAny((PetscObject)T[0],&cont,MATMPIAIJ,MATSEQAIJ,<font color="#666666">""</font>);
+<a name="line303">303: </a>  <font color="#4169E1">if</font> (!cont) SETERRQ(PetscObjectComm((PetscObject)T[0]),PETSC_ERR_SUP,<font color="#666666">"Only for MPIAIJ or SEQAIJ matrix types"</font>);
+<a name="line304">304: </a>  PetscObjectTypeCompare((PetscObject)T[0],MATMPIAIJ,&cont);
+<a name="line305">305: </a>  <font color="#4169E1">if</font> (cont) {
+<a name="line306">306: </a>    MatMPIAIJGetLocalMat(T[0],MAT_INITIAL_MATRIX,&M);
+<a name="line307">307: </a>    flg = PETSC_TRUE; 
+<a name="line308">308: </a>  } <font color="#4169E1">else</font> {
+<a name="line309">309: </a>    MatDuplicate(T[0],MAT_COPY_VALUES,&M);
+<a name="line310">310: </a>  }
+<a name="line311">311: </a>  MatGetInfo(M,MAT_LOCAL,&info);
+<a name="line312">312: </a>  nz = (PetscInt)info.nz_used;
+<a name="line313">313: </a>  MatSeqAIJGetArray(M,&array);
+<a name="line314">314: </a>  <font color="#4169E1">for</font> (i=0;i<nz;i++) {
+<a name="line315">315: </a>    t = PetscAbsScalar(array[i]);
+<a name="line316">316: </a>    array[i] = t*t;
+<a name="line317">317: </a>  }
+<a name="line318">318: </a>  MatSeqAIJRestoreArray(M,&array);
+<a name="line319">319: </a>  <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line320">320: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line321">321: </a>      MatMPIAIJGetLocalMat(T[k],MAT_INITIAL_MATRIX,&A);
+<a name="line322">322: </a>    } <font color="#4169E1">else</font> {
+<a name="line323">323: </a>      <font color="#4169E1">if</font> (str==SAME_NONZERO_PATTERN) {
+<a name="line324">324: </a>        MatCopy(T[k],A,SAME_NONZERO_PATTERN);
+<a name="line325">325: </a>      } <font color="#4169E1">else</font> {
+<a name="line326">326: </a>        MatDuplicate(T[k],MAT_COPY_VALUES,&A);
+<a name="line327">327: </a>      }
+<a name="line328">328: </a>    }
+<a name="line329">329: </a>    MatGetInfo(A,MAT_LOCAL,&info);
+<a name="line330">330: </a>    nz = (PetscInt)info.nz_used;
+<a name="line331">331: </a>    MatSeqAIJGetArray(A,&array);
+<a name="line332">332: </a>    <font color="#4169E1">for</font> (i=0;i<nz;i++) {
+<a name="line333">333: </a>      t = PetscAbsScalar(array[i]);
+<a name="line334">334: </a>      array[i] = t*t;
+<a name="line335">335: </a>    }
+<a name="line336">336: </a>    MatSeqAIJRestoreArray(A,&array);
+<a name="line337">337: </a>    w *= pep->slambda*pep->slambda*pep->sfactor;
+<a name="line338">338: </a>    MatAXPY(M,w,A,str);
+<a name="line339">339: </a>    <font color="#4169E1">if</font> (flg || str!=SAME_NONZERO_PATTERN || k==nmat-2) {
+<a name="line340">340: </a>      MatDestroy(&A);
+<a name="line341">341: </a>    } 
+<a name="line342">342: </a>  }
+<a name="line343">343: </a>  MatGetRowIJ(M,0,PETSC_FALSE,PETSC_FALSE,&nr,&ridx,&cidx,&cont);
+<a name="line344">344: </a>  <font color="#4169E1">if</font> (!cont) SETERRQ(PetscObjectComm((PetscObject)T[0]), PETSC_ERR_SUP,<font color="#666666">"It is not possible to compute scaling diagonals for these <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> matrices"</font>);
+<a name="line345">345: </a>  MatGetInfo(M,MAT_LOCAL,&info);
+<a name="line346">346: </a>  nz = (PetscInt)info.nz_used;
+<a name="line347">347: </a>  VecGetOwnershipRange(pep->Dl,&lst,&lend);
+<a name="line348">348: </a>  PetscMalloc4(nr,&rsum,pep->n,&csum,pep->n,&aux,PetscMin(pep->n-lend+lst,nz),&cols);
+<a name="line349">349: </a>  VecSet(pep->Dr,1.0);
+<a name="line350">350: </a>  VecSet(pep->Dl,1.0);
+<a name="line351">351: </a>  VecGetArray(pep->Dl,&Dl);
+<a name="line352">352: </a>  VecGetArray(pep->Dr,&Dr);
+<a name="line353">353: </a>  MatSeqAIJGetArray(M,&array);
+<a name="line354">354: </a>  PetscMemzero(aux,pep->n*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line355">355: </a>  <font color="#4169E1">for</font> (j=0;j<nz;j++) {
+<a name="line356">356: </a>    <font color="#B22222">/* Search non-zero columns outsize lst-lend */</font>
+<a name="line357">357: </a>    <font color="#4169E1">if</font> (aux[cidx[j]]==0 && (cidx[j]<lst || lend<=cidx[j])) cols[nc++] = cidx[j];
+<a name="line358">358: </a>    <font color="#B22222">/* Local column sums */</font>
+<a name="line359">359: </a>    aux[cidx[j]] += PetscAbsScalar(array[j]);
+<a name="line360">360: </a>  }
+<a name="line361">361: </a>  <font color="#4169E1">for</font> (it=0;it<pep->sits && cont;it++) {
+<a name="line362">362: </a>    emaxl = 0; eminl = 0;
+<a name="line363">363: </a>    <font color="#B22222">/* Column sum  */</font>    
+<a name="line364">364: </a>    <font color="#4169E1">if</font> (it>0) { <font color="#B22222">/* it=0 has been already done*/</font>
+<a name="line365">365: </a>      MatSeqAIJGetArray(M,&array);
+<a name="line366">366: </a>      PetscMemzero(aux,pep->n*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line367">367: </a>      <font color="#4169E1">for</font> (j=0;j<nz;j++) aux[cidx[j]] += PetscAbsScalar(array[j]);
+<a name="line368">368: </a>      MatSeqAIJRestoreArray(M,&array); 
+<a name="line369">369: </a>    }
+<a name="line370">370: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(aux,csum,n,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)pep->Dr));
+<a name="line371">371: </a>    <font color="#B22222">/* Update Dr */</font>
+<a name="line372">372: </a>    <font color="#4169E1">for</font> (j=lst;j<lend;j++) {
+<a name="line373">373: </a>      d = PetscLogReal(csum[j])/l2;
+<a name="line374">374: </a>      e = -(PetscInt)((d < 0)?(d-0.5):(d+0.5));
+<a name="line375">375: </a>      d = PetscPowReal(2.0,e);
+<a name="line376">376: </a>      Dr[j-lst] *= d;
+<a name="line377">377: </a>      aux[j] = d*d;
+<a name="line378">378: </a>      emaxl = PetscMax(emaxl,e);
+<a name="line379">379: </a>      eminl = PetscMin(eminl,e);
+<a name="line380">380: </a>    }
+<a name="line381">381: </a>    <font color="#4169E1">for</font> (j=0;j<nc;j++) {
+<a name="line382">382: </a>      d = PetscLogReal(csum[cols[j]])/l2;
+<a name="line383">383: </a>      e = -(PetscInt)((d < 0)?(d-0.5):(d+0.5));
+<a name="line384">384: </a>      d = PetscPowReal(2.0,e);
+<a name="line385">385: </a>      aux[cols[j]] = d*d;
+<a name="line386">386: </a>      emaxl = PetscMax(emaxl,e);
+<a name="line387">387: </a>      eminl = PetscMin(eminl,e);
+<a name="line388">388: </a>    }
+<a name="line389">389: </a>    <font color="#B22222">/* Scale M */</font>
+<a name="line390">390: </a>    MatSeqAIJGetArray(M,&array);
+<a name="line391">391: </a>    <font color="#4169E1">for</font> (j=0;j<nz;j++) {
+<a name="line392">392: </a>      array[j] *= aux[cidx[j]];
+<a name="line393">393: </a>    }
+<a name="line394">394: </a>    MatSeqAIJRestoreArray(M,&array);
+<a name="line395">395: </a>    <font color="#B22222">/* Row sum */</font>    
+<a name="line396">396: </a>    PetscMemzero(rsum,nr*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line397">397: </a>    MatSeqAIJGetArray(M,&array);
+<a name="line398">398: </a>    <font color="#4169E1">for</font> (i=0;i<nr;i++) {
+<a name="line399">399: </a>      <font color="#4169E1">for</font> (j=ridx[i];j<ridx[i+1];j++) rsum[i] += PetscAbsScalar(array[j]);
+<a name="line400">400: </a>      <font color="#B22222">/* Update Dl */</font>
+<a name="line401">401: </a>      d = PetscLogReal(rsum[i])/l2;
+<a name="line402">402: </a>      e = -(PetscInt)((d < 0)?(d-0.5):(d+0.5));
+<a name="line403">403: </a>      d = PetscPowReal(2.0,e);
+<a name="line404">404: </a>      Dl[i] *= d;
+<a name="line405">405: </a>      <font color="#B22222">/* Scale M */</font>
+<a name="line406">406: </a>      <font color="#4169E1">for</font> (j=ridx[i];j<ridx[i+1];j++) array[j] *= d*d;
+<a name="line407">407: </a>      emaxl = PetscMax(emaxl,e);
+<a name="line408">408: </a>      eminl = PetscMin(eminl,e);      
+<a name="line409">409: </a>    }
+<a name="line410">410: </a>    MatSeqAIJRestoreArray(M,&array);  
+<a name="line411">411: </a>    <font color="#B22222">/* Compute global max and min */</font>
+<a name="line412">412: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&emaxl,&emax,1,MPIU_INT,MPI_MAX,PetscObjectComm((PetscObject)pep->Dl));
+<a name="line413">413: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&eminl,&emin,1,MPIU_INT,MPI_MIN,PetscObjectComm((PetscObject)pep->Dl));
+<a name="line414">414: </a>    <font color="#4169E1">if</font> (emax<=emin+2) cont = PETSC_FALSE;
+<a name="line415">415: </a>  }
+<a name="line416">416: </a>  VecRestoreArray(pep->Dr,&Dr);
+<a name="line417">417: </a>  VecRestoreArray(pep->Dl,&Dl);
+<a name="line418">418: </a>  <font color="#B22222">/* Free memory*/</font>
+<a name="line419">419: </a>  MatDestroy(&M);
+<a name="line420">420: </a>  PetscFree4(rsum,csum,aux,cols);
+<a name="line421">421: </a>  PetscFree(T);
+<a name="line422">422: </a>  <font color="#4169E1">return</font>(0);
+<a name="line423">423: </a>}
+
+<a name="line427">427: </a><font color="#B22222">/*</font>
+<a name="line428">428: </a><font color="#B22222">   PEPComputeScaleFactor - compute sfactor as described in [Betcke 2008].</font>
+<a name="line429">429: </a><font color="#B22222">*/</font>
+<a name="line430">430: </a><strong><font color="#4169E1"><a name="PEPComputeScaleFactor"></a>PetscErrorCode PEPComputeScaleFactor(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line431">431: </a>{
+<a name="line433">433: </a>  PetscBool      has0,has1,flg;
+<a name="line434">434: </a>  PetscReal      norm0,norm1;
+<a name="line435">435: </a>  Mat            T[2];
+<a name="line436">436: </a>  <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a>       basis;
+<a name="line437">437: </a>  PetscInt       i;
+
+<a name="line440">440: </a>  <font color="#4169E1">if</font> (pep->scale==PEP_SCALE_NONE || pep->scale==PEP_SCALE_DIAGONAL) {  <font color="#B22222">/* no scalar scaling */</font>
+<a name="line441">441: </a>    pep->sfactor = 1.0;
+<a name="line442">442: </a>    pep->dsfactor = 1.0;
+<a name="line443">443: </a>    <font color="#4169E1">return</font>(0);
+<a name="line444">444: </a>  }
+<a name="line445">445: </a>  <font color="#4169E1">if</font> (pep->sfactor_set) <font color="#4169E1">return</font>(0);  <font color="#B22222">/* user provided value */</font>
+<a name="line446">446: </a>  pep->sfactor = 1.0;
+<a name="line447">447: </a>  pep->dsfactor = 1.0;
+<a name="line448">448: </a>  <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(pep,&basis);
+<a name="line449">449: </a>  <font color="#4169E1">if</font> (basis==PEP_BASIS_MONOMIAL) {
+<a name="line450">450: </a>    <a href="../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line451">451: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line452">452: </a>      <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,0,&T[0]);
+<a name="line453">453: </a>      <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,pep->nmat-1,&T[1]);
+<a name="line454">454: </a>    } <font color="#4169E1">else</font> {
+<a name="line455">455: </a>      T[0] = pep->A[0];
+<a name="line456">456: </a>      T[1] = pep->A[pep->nmat-1];
+<a name="line457">457: </a>    }
+<a name="line458">458: </a>    <font color="#4169E1">if</font> (pep->nmat>2) {
+<a name="line459">459: </a>      MatHasOperation(T[0],MATOP_NORM,&has0);
+<a name="line460">460: </a>      MatHasOperation(T[1],MATOP_NORM,&has1);
+<a name="line461">461: </a>      <font color="#4169E1">if</font> (has0 && has1) {
+<a name="line462">462: </a>        MatNorm(T[0],NORM_INFINITY,&norm0);
+<a name="line463">463: </a>        MatNorm(T[1],NORM_INFINITY,&norm1);
+<a name="line464">464: </a>        pep->sfactor = PetscPowReal(norm0/norm1,1.0/(pep->nmat-1));
+<a name="line465">465: </a>        pep->dsfactor = norm1;
+<a name="line466">466: </a>        <font color="#4169E1">for</font> (i=pep->nmat-2;i>0;i--) {
+<a name="line467">467: </a>          <a href="../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(pep->st,i,&T[1]);
+<a name="line468">468: </a>          MatHasOperation(T[1],MATOP_NORM,&has1);
+<a name="line469">469: </a>          <font color="#4169E1">if</font> (has1) {
+<a name="line470">470: </a>            MatNorm(T[1],NORM_INFINITY,&norm1);
+<a name="line471">471: </a>            pep->dsfactor = pep->dsfactor*pep->sfactor+norm1;
+<a name="line472">472: </a>          } <font color="#4169E1">else</font> <font color="#4169E1">break</font>;
+<a name="line473">473: </a>        }
+<a name="line474">474: </a>        <font color="#4169E1">if</font> (has1) {
+<a name="line475">475: </a>          pep->dsfactor = pep->dsfactor*pep->sfactor+norm0;
+<a name="line476">476: </a>          pep->dsfactor = pep->nmat/pep->dsfactor;
+<a name="line477">477: </a>        } <font color="#4169E1">else</font> pep->dsfactor = 1.0;
+<a name="line478">478: </a>      } 
+<a name="line479">479: </a>    }
+<a name="line480">480: </a>  } 
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><font color="#B22222">/*</font>
+<a name="line487">487: </a><font color="#B22222">   PEPBasisCoefficients - compute polynomial basis coefficients</font>
+<a name="line488">488: </a><font color="#B22222">*/</font>
+<a name="line489">489: </a><strong><font color="#4169E1"><a name="PEPBasisCoefficients"></a>PetscErrorCode PEPBasisCoefficients(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *pbc)</font></strong>
+<a name="line490">490: </a>{
+<a name="line491">491: </a>  PetscReal *ca,*cb,*cg;
+<a name="line492">492: </a>  PetscInt  k,nmat=pep->nmat;
+<a name="line493">493: </a>  
+<a name="line495">495: </a>  ca = pbc;
+<a name="line496">496: </a>  cb = pbc+nmat;
+<a name="line497">497: </a>  cg = pbc+2*nmat;
+<a name="line498">498: </a>  <font color="#4169E1">switch</font> (pep->basis) {
+<a name="line499">499: </a>  <font color="#4169E1">case</font> PEP_BASIS_MONOMIAL:
+<a name="line500">500: </a>    <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
+<a name="line501">501: </a>      ca[k] = 1.0; cb[k] = 0.0; cg[k] = 0.0;
+<a name="line502">502: </a>    }
+<a name="line503">503: </a>    <font color="#4169E1">break</font>;
+<a name="line504">504: </a>  <font color="#4169E1">case</font> PEP_BASIS_CHEBYSHEV1:
+<a name="line505">505: </a>    ca[0] = 1.0; cb[0] = 0.0; cg[0] = 0.0;
+<a name="line506">506: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line507">507: </a>      ca[k] = .5; cb[k] = 0.0; cg[k] = .5;
+<a name="line508">508: </a>    }
+<a name="line509">509: </a>    <font color="#4169E1">break</font>;
+<a name="line510">510: </a>  <font color="#4169E1">case</font> PEP_BASIS_CHEBYSHEV2:
+<a name="line511">511: </a>    ca[0] = .5; cb[0] = 0.0; cg[0] = 0.0;
+<a name="line512">512: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line513">513: </a>      ca[k] = .5; cb[k] = 0.0; cg[k] = .5;
+<a name="line514">514: </a>    }    
+<a name="line515">515: </a>    <font color="#4169E1">break</font>;
+<a name="line516">516: </a>  <font color="#4169E1">case</font> PEP_BASIS_LEGENDRE:
+<a name="line517">517: </a>    ca[0] = 1.0; cb[0] = 0.0; cg[0] = 0.0;
+<a name="line518">518: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line519">519: </a>      ca[k] = k+1; cb[k] = -2*k; cg[k] = k;
+<a name="line520">520: </a>    }
+<a name="line521">521: </a>    <font color="#4169E1">break</font>;
+<a name="line522">522: </a>  <font color="#4169E1">case</font> PEP_BASIS_LAGUERRE:
+<a name="line523">523: </a>    ca[0] = -1.0; cb[0] = 0.0; cg[0] = 0.0;
+<a name="line524">524: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line525">525: </a>      ca[k] = -(k+1); cb[k] = 2*k+1; cg[k] = -k;
 <a name="line526">526: </a>    }
 <a name="line527">527: </a>    <font color="#4169E1">break</font>;
-<a name="line528">528: </a>  <font color="#4169E1">case</font> PEP_BASIS_CHEBYSHEV1:
-<a name="line529">529: </a>    ca[0] = 1.0; cb[0] = 0.0; cg[0] = 0.0;
+<a name="line528">528: </a>  <font color="#4169E1">case</font> PEP_BASIS_HERMITE:
+<a name="line529">529: </a>    ca[0] = .5; cb[0] = 0.0; cg[0] = 0.0;
 <a name="line530">530: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line531">531: </a>      ca[k] = .5; cb[k] = 0.0; cg[k] = .5;
+<a name="line531">531: </a>      ca[k] = .5; cb[k] = 0.0; cg[k] = -k;
 <a name="line532">532: </a>    }
 <a name="line533">533: </a>    <font color="#4169E1">break</font>;
-<a name="line534">534: </a>  <font color="#4169E1">case</font> PEP_BASIS_CHEBYSHEV2:
-<a name="line535">535: </a>    ca[0] = .5; cb[0] = 0.0; cg[0] = 0.0;
-<a name="line536">536: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line537">537: </a>      ca[k] = .5; cb[k] = 0.0; cg[k] = .5;
-<a name="line538">538: </a>    }    
-<a name="line539">539: </a>    <font color="#4169E1">break</font>;
-<a name="line540">540: </a>  <font color="#4169E1">case</font> PEP_BASIS_LEGENDRE:
-<a name="line541">541: </a>    ca[0] = 1.0; cb[0] = 0.0; cg[0] = 0.0;
-<a name="line542">542: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line543">543: </a>      ca[k] = k+1; cb[k] = -2*k; cg[k] = k;
-<a name="line544">544: </a>    }
-<a name="line545">545: </a>    <font color="#4169E1">break</font>;
-<a name="line546">546: </a>  <font color="#4169E1">case</font> PEP_BASIS_LAGUERRE:
-<a name="line547">547: </a>    ca[0] = -1.0; cb[0] = 0.0; cg[0] = 0.0;
-<a name="line548">548: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line549">549: </a>      ca[k] = -(k+1); cb[k] = 2*k+1; cg[k] = -k;
-<a name="line550">550: </a>    }
-<a name="line551">551: </a>    <font color="#4169E1">break</font>;
-<a name="line552">552: </a>  <font color="#4169E1">case</font> PEP_BASIS_HERMITE:
-<a name="line553">553: </a>    ca[0] = .5; cb[0] = 0.0; cg[0] = 0.0;
-<a name="line554">554: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line555">555: </a>      ca[k] = .5; cb[k] = 0.0; cg[k] = -k;
-<a name="line556">556: </a>    }
-<a name="line557">557: </a>    <font color="#4169E1">break</font>;
-<a name="line558">558: </a><strong><font color="#FF0000">  default:</font></strong>
-<a name="line559">559: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'basis' value"</font>);
-<a name="line560">560: </a>  }
-<a name="line561">561: </a>  <font color="#4169E1">return</font>(0);
-<a name="line562">562: </a>}
-
-<a name="line566">566: </a><font color="#B22222">/*</font>
-<a name="line567">567: </a><font color="#B22222">   PEPEvaluateBasis - evaluate the polynomial basis on a given parameter sigma</font>
-<a name="line568">568: </a><font color="#B22222">*/</font>
-<a name="line569">569: </a><strong><font color="#4169E1"><a name="PEPEvaluateBasis"></a>PetscErrorCode PEPEvaluateBasis(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscScalar isigma,PetscScalar *vals,PetscScalar *ivals)</font></strong>
-<a name="line570">570: </a>{
-<a name="line571">571: </a>  PetscInt   nmat=pep->nmat,k;
-<a name="line572">572: </a>  PetscReal  *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
-<a name="line573">573: </a>  
-<a name="line575">575: </a>  <font color="#4169E1">if</font> (ivals) <font color="#4169E1">for</font> (k=0;k<nmat;k++) ivals[k] = 0.0;
-<a name="line576">576: </a>  vals[0] = 1.0;
-<a name="line577">577: </a>  vals[1] = (sigma-b[0])/a[0];
-<a name="line578">578: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line579">579: </a>  <font color="#4169E1">if</font> (ivals) ivals[1] = isigma/a[0];
-<a name="line580">580: </a><font color="#A020F0">#endif</font>
-<a name="line581">581: </a>  <font color="#4169E1">for</font> (k=2;k<nmat;k++) {
-<a name="line582">582: </a>    vals[k] = ((sigma-b[k-1])*vals[k-1]-g[k-1]*vals[k-2])/a[k-1];
-<a name="line583">583: </a>    <font color="#4169E1">if</font> (ivals) vals[k] -= isigma*ivals[k-1]/a[k-1];
-<a name="line584">584: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line585">585: </a>    <font color="#4169E1">if</font> (ivals) ivals[k] = ((sigma-b[k-1])*ivals[k-1]+isigma*vals[k-1]-g[k-1]*ivals[k-2])/a[k-1];
-<a name="line586">586: </a><font color="#A020F0">#endif</font>
-<a name="line587">587: </a>  }
-<a name="line588">588: </a>  <font color="#4169E1">return</font>(0);
-<a name="line589">589: </a>}
+<a name="line534">534: </a><strong><font color="#FF0000">  default:</font></strong>
+<a name="line535">535: </a>    SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'basis' value"</font>);
+<a name="line536">536: </a>  }
+<a name="line537">537: </a>  <font color="#4169E1">return</font>(0);
+<a name="line538">538: </a>}
+
+<a name="line542">542: </a><font color="#B22222">/*</font>
+<a name="line543">543: </a><font color="#B22222">   PEPEvaluateBasis - evaluate the polynomial basis on a given parameter sigma</font>
+<a name="line544">544: </a><font color="#B22222">*/</font>
+<a name="line545">545: </a><strong><font color="#4169E1"><a name="PEPEvaluateBasis"></a>PetscErrorCode PEPEvaluateBasis(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar sigma,PetscScalar isigma,PetscScalar *vals,PetscScalar *ivals)</font></strong>
+<a name="line546">546: </a>{
+<a name="line547">547: </a>  PetscInt   nmat=pep->nmat,k;
+<a name="line548">548: </a>  PetscReal  *a=pep->pbc,*b=pep->pbc+nmat,*g=pep->pbc+2*nmat;
+<a name="line549">549: </a>  
+<a name="line551">551: </a>  <font color="#4169E1">if</font> (ivals) <font color="#4169E1">for</font> (k=0;k<nmat;k++) ivals[k] = 0.0;
+<a name="line552">552: </a>  vals[0] = 1.0;
+<a name="line553">553: </a>  vals[1] = (sigma-b[0])/a[0];
+<a name="line554">554: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line555">555: </a>  <font color="#4169E1">if</font> (ivals) ivals[1] = isigma/a[0];
+<a name="line556">556: </a><font color="#A020F0">#endif</font>
+<a name="line557">557: </a>  <font color="#4169E1">for</font> (k=2;k<nmat;k++) {
+<a name="line558">558: </a>    vals[k] = ((sigma-b[k-1])*vals[k-1]-g[k-1]*vals[k-2])/a[k-1];
+<a name="line559">559: </a>    <font color="#4169E1">if</font> (ivals) vals[k] -= isigma*ivals[k-1]/a[k-1];
+<a name="line560">560: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line561">561: </a>    <font color="#4169E1">if</font> (ivals) ivals[k] = ((sigma-b[k-1])*ivals[k-1]+isigma*vals[k-1]-g[k-1]*ivals[k-2])/a[k-1];
+<a name="line562">562: </a><font color="#A020F0">#endif</font>
+<a name="line563">563: </a>  }
+<a name="line564">564: </a>  <font color="#4169E1">return</font>(0);
+<a name="line565">565: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/interface/pepmon.c b/src/pep/interface/pepmon.c
index 9b62418..f322aa0 100644
--- a/src/pep/interface/pepmon.c
+++ b/src/pep/interface/pepmon.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -200,37 +200,46 @@ static PetscErrorCode PEPMonitorGetTrueEig(PEP pep,PetscScalar *er,PetscScalar *
 .  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: PEPMonitorSet(), PEPMonitorFirst(), PEPMonitorConverged()
 @*/
-PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
   PetscInt       i;
   PetscScalar    er,ei;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its) {
-    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"%3D PEP nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
-    for (i=0;i<nest;i++) {
-      er = eigr[i]; ei = eigi[i];
-      ierr = PEPMonitorGetTrueEig(pep,&er,&ei);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  PetscValidPointer(vf,8);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
+  if (its==1 && ((PetscObject)pep)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Eigenvalue approximations and residual norms for %s solve.\n",((PetscObject)pep)->prefix);CHKERRQ(ierr);
+  }
+  ierr = PetscViewerASCIIPrintf(viewer,"%3D PEP nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+  for (i=0;i<nest;i++) {
+    er = eigr[i]; ei = eigi[i];
+    ierr = PEPMonitorGetTrueEig(pep,&er,&ei);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
-      ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(er),(double)PetscImaginaryPart(er));CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," %g%+gi",(double)PetscRealPart(er),(double)PetscImaginaryPart(er));CHKERRQ(ierr);
 #else
-      ierr = PetscViewerASCIIPrintf(viewer," %g",(double)er);CHKERRQ(ierr);
-      if (eigi[i]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPrintf(viewer," %g",(double)er);CHKERRQ(ierr);
+    if (eigi[i]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
 #endif
-      ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)",(double)errest[i]);CHKERRQ(ierr);
-    }
-    ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
-    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)",(double)errest[i]);CHKERRQ(ierr);
   }
+  ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
+  ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -250,22 +259,31 @@ PetscErrorCode PEPMonitorAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *ei
 .  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: PEPMonitorSet(), PEPMonitorAll(), PEPMonitorConverged()
 @*/
-PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
   PetscScalar    er,ei;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its && nconv<nest) {
+  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  PetscValidPointer(vf,8);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  if (its==1 && ((PetscObject)pep)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Eigenvalue approximations and residual norms for %s solve.\n",((PetscObject)pep)->prefix);CHKERRQ(ierr);
+  }
+  if (nconv<nest) {
+    ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"%3D PEP nconv=%D first unconverged value (error)",its,nconv);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     er = eigr[nconv]; ei = eigi[nconv];
     ierr = PEPMonitorGetTrueEig(pep,&er,&ei);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
@@ -275,7 +293,9 @@ PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *
     if (eigi[nconv]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
 #endif
     ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)\n",(double)errest[nconv]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -296,33 +316,34 @@ PetscErrorCode PEPMonitorFirst(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *
 .  eigi   - imaginary part of the eigenvalues
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context
+-  ctx    - monitor context
 
    Level: intermediate
 
-   Note:
-   The monitor context must contain a struct with a PetscViewer and a
-   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
-
 .seealso: PEPMonitorSet(), PEPMonitorFirst(), PEPMonitorAll()
 @*/
-PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 {
-  PetscErrorCode   ierr;
-  PetscInt         i;
-  PetscScalar      er,ei;
-  PetscViewer      viewer;
-  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
+  PetscErrorCode ierr;
+  PetscInt       i;
+  PetscScalar    er,ei;
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (!monctx) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,"Must provide a context for PEPMonitorConverged");
-  if (!its) {
-    ctx->oldnconv = 0;
-  } else {
-    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
+  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  PetscValidPointer(ctx,8);
+  viewer = ctx->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,8);
+  if (its==1 && ((PetscObject)pep)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Convergence history for %s solve.\n",((PetscObject)pep)->prefix);CHKERRQ(ierr);
+  }
+  if (its==1) ctx->oldnconv = 0;
+  if (ctx->oldnconv!=nconv) {
+    ierr = PetscViewerPushFormat(viewer,ctx->format);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
     for (i=ctx->oldnconv;i<nconv;i++) {
-      ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%3D PEP converged value (error) #%D",its,i);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       er = eigr[i]; ei = eigi[i];
       ierr = PEPMonitorGetTrueEig(pep,&er,&ei);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
@@ -332,75 +353,114 @@ PetscErrorCode PEPMonitorConverged(PEP pep,PetscInt its,PetscInt nconv,PetscScal
       if (eigi[i]!=0.0) { ierr = PetscViewerASCIIPrintf(viewer,"%+gi",(double)ei);CHKERRQ(ierr); }
 #endif
       ierr = PetscViewerASCIIPrintf(viewer," (%10.8e)\n",(double)errest[i]);CHKERRQ(ierr);
-      ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     }
+    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
     ctx->oldnconv = nconv;
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "PEPMonitorLG"
-PetscErrorCode PEPMonitorLG(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+#define __FUNCT__ "PEPMonitorLGCreate"
+/*@C
+   PEPMonitorLGCreate - Creates a line graph context for use with
+   PEP to monitor convergence.
+
+   Collective on MPI_Comm
+
+   Input Parameters:
++  comm - communicator context
+.  host - the X display to open, or null for the local machine
+.  label - the title to put in the title bar
+.  x, y - the screen coordinates of the upper left coordinate of
+          the window
+-  m, n - the screen width and height in pixels
+
+   Output Parameter:
+.  lgctx - the drawing context
+
+   Options Database Keys:
++  -pep_monitor_lg - Sets line graph monitor for the first residual
+-  -pep_monitor_lg_all - Sets line graph monitor for all residuals
+
+   Notes:
+   Use PetscDrawLGDestroy() to destroy this line graph.
+
+   Level: intermediate
+
+.seealso: PEPMonitorSet()
+@*/
+PetscErrorCode PEPMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
   PetscDraw      draw;
   PetscDrawLG    lg;
   PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscDrawCreate(comm,host,label,x,y,m,n,&draw);CHKERRQ(ierr);
+  ierr = PetscDrawSetFromOptions(draw);CHKERRQ(ierr);
+  ierr = PetscDrawLGCreate(draw,1,&lg);CHKERRQ(ierr);
+  ierr = PetscDrawLGSetFromOptions(lg);CHKERRQ(ierr);
+  ierr = PetscDrawDestroy(&draw);CHKERRQ(ierr);
+  *lgctx = lg;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPMonitorLG"
+PetscErrorCode PEPMonitorLG(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
+{
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscReal      x,y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)pep));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,log10(pep->tol)-2,0.0);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(pep->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   x = (PetscReal)its;
-  if (errest[nconv] > 0.0) y = log10(errest[nconv]); else y = 0.0;
+  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+  else y = 0.0;
   ierr = PetscDrawLGAddPoint(lg,&x,&y);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || pep->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPMonitorLGAll"
-PetscErrorCode PEPMonitorLGAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode PEPMonitorLGAll(PEP pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
-  PetscDraw      draw;
-  PetscDrawLG    lg;
-  PetscErrorCode ierr;
-  PetscReal      *x,*y;
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscInt       i,n = PetscMin(pep->nev,255);
+  PetscReal      *x,*y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)pep));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,log10(pep->tol)-2,0.0);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(pep->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   ierr = PetscMalloc2(n,&x,n,&y);CHKERRQ(ierr);
   for (i=0;i<n;i++) {
     x[i] = (PetscReal)its;
-    if (i < nest && errest[i] > 0.0) y[i] = log10(errest[i]);
+    if (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
     else y[i] = 0.0;
   }
   ierr = PetscDrawLGAddPoint(lg,x,y);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || pep->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   ierr = PetscFree2(x,y);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
diff --git a/src/pep/interface/pepmon.c.html b/src/pep/interface/pepmon.c.html
index 001922e..a0f54bf 100644
--- a/src/pep/interface/pepmon.c.html
+++ b/src/pep/interface/pepmon.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepmon.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:45+00:00">
+<meta name="date" content="2016-05-16T10:33:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepmon.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepmon.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> routines related to monitors.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -189,193 +189,237 @@
 <a name="line200">200: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
 <a name="line201">201: </a><font color="#B22222">.  errest - error estimates</font>
 <a name="line202">202: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line203">203: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
+<a name="line203">203: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
 
 <a name="line205">205: </a><font color="#B22222">   Level: intermediate</font>
 
 <a name="line207">207: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>()</font>
 <a name="line208">208: </a><font color="#B22222">@*/</font>
-<a name="line209">209: </a><strong><font color="#4169E1"><a name="PEPMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
+<a name="line209">209: </a><strong><font color="#4169E1"><a name="PEPMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
 <a name="line210">210: </a>{
 <a name="line212">212: </a>  PetscInt       i;
 <a name="line213">213: </a>  PetscScalar    er,ei;
-<a name="line214">214: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
-
-<a name="line217">217: </a>  <font color="#4169E1">if</font> (its) {
-<a name="line218">218: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line219">219: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> nconv=%D Values (Errors)"</font>,its,nconv);
-<a name="line220">220: </a>    <font color="#4169E1">for</font> (i=0;i<nest;i++) {
-<a name="line221">221: </a>      er = eigr[i]; ei = eigi[i];
-<a name="line222">222: </a>      PEPMonitorGetTrueEig(pep,&er,&ei);
-<a name="line223">223: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line224">224: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
-<a name="line225">225: </a><font color="#A020F0">#else</font>
-<a name="line226">226: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
-<a name="line227">227: </a>      <font color="#4169E1">if</font> (eigi[i]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
-<a name="line228">228: </a><font color="#A020F0">#endif</font>
-<a name="line229">229: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)"</font>,(double)errest[i]);
-<a name="line230">230: </a>    }
-<a name="line231">231: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line232">232: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line233">233: </a>  }
-<a name="line234">234: </a>  <font color="#4169E1">return</font>(0);
-<a name="line235">235: </a>}
-
-<a name="line239">239: </a><font color="#B22222">/*@C</font>
-<a name="line240">240: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a> - Print the first unconverged approximate value and</font>
-<a name="line241">241: </a><font color="#B22222">   error estimate at each iteration of the polynomial eigensolver.</font>
-
-<a name="line243">243: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line245">245: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line246">246: </a><font color="#B22222">+  pep    - polynomial eigensolver context</font>
-<a name="line247">247: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line248">248: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line249">249: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
-<a name="line250">250: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
-<a name="line251">251: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line252">252: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line253">253: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
-
-<a name="line255">255: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line257">257: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>()</font>
-<a name="line258">258: </a><font color="#B22222">@*/</font>
-<a name="line259">259: </a><strong><font color="#4169E1"><a name="PEPMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line260">260: </a>{
-<a name="line262">262: </a>  PetscScalar    er,ei;
-<a name="line263">263: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
-
-<a name="line266">266: </a>  <font color="#4169E1">if</font> (its && nconv<nest) {
-<a name="line267">267: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line268">268: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
-<a name="line269">269: </a>    er = eigr[nconv]; ei = eigi[nconv];
-<a name="line270">270: </a>    PEPMonitorGetTrueEig(pep,&er,&ei);
-<a name="line271">271: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line272">272: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
-<a name="line273">273: </a><font color="#A020F0">#else</font>
-<a name="line274">274: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
-<a name="line275">275: </a>    <font color="#4169E1">if</font> (eigi[nconv]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
-<a name="line276">276: </a><font color="#A020F0">#endif</font>
-<a name="line277">277: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[nconv]);
-<a name="line278">278: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line279">279: </a>  }
-<a name="line280">280: </a>  <font color="#4169E1">return</font>(0);
-<a name="line281">281: </a>}
-
-<a name="line285">285: </a><font color="#B22222">/*@C</font>
-<a name="line286">286: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a> - Print the approximate values and</font>
-<a name="line287">287: </a><font color="#B22222">   error estimates as they converge.</font>
-
-<a name="line289">289: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line291">291: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line292">292: </a><font color="#B22222">+  pep    - polynomial eigensolver context</font>
-<a name="line293">293: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line294">294: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
-<a name="line295">295: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
-<a name="line296">296: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
-<a name="line297">297: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line298">298: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line299">299: </a><font color="#B22222">-  monctx - monitor context</font>
-
-<a name="line301">301: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line303">303: </a><font color="#B22222">   Note:</font>
-<a name="line304">304: </a><font color="#B22222">   The monitor context must contain a struct with a PetscViewer and a</font>
-<a name="line305">305: </a><font color="#B22222">   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.</font>
-
-<a name="line307">307: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>()</font>
-<a name="line308">308: </a><font color="#B22222">@*/</font>
-<a name="line309">309: </a><strong><font color="#4169E1"><a name="PEPMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line310">310: </a>{
-<a name="line311">311: </a>  PetscErrorCode   ierr;
-<a name="line312">312: </a>  PetscInt         i;
-<a name="line313">313: </a>  PetscScalar      er,ei;
-<a name="line314">314: </a>  PetscViewer      viewer;
-<a name="line315">315: </a>  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
-
-<a name="line318">318: </a>  <font color="#4169E1">if</font> (!monctx) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"Must provide a context for <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>"</font>);
-<a name="line319">319: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line320">320: </a>    ctx->oldnconv = 0;
-<a name="line321">321: </a>  } <font color="#4169E1">else</font> {
-<a name="line322">322: </a>    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
-<a name="line323">323: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
-<a name="line324">324: </a>      PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line325">325: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> converged value (error) #%D"</font>,its,i);
-<a name="line326">326: </a>      er = eigr[i]; ei = eigi[i];
-<a name="line327">327: </a>      PEPMonitorGetTrueEig(pep,&er,&ei);
-<a name="line328">328: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line329">329: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
-<a name="line330">330: </a><font color="#A020F0">#else</font>
-<a name="line331">331: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
-<a name="line332">332: </a>      <font color="#4169E1">if</font> (eigi[i]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
-<a name="line333">333: </a><font color="#A020F0">#endif</font>
-<a name="line334">334: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[i]);
-<a name="line335">335: </a>      PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line336">336: </a>    }
-<a name="line337">337: </a>    ctx->oldnconv = nconv;
-<a name="line338">338: </a>  }
-<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
-<a name="line340">340: </a>}
-
-<a name="line344">344: </a><strong><font color="#4169E1"><a name="PEPMonitorLG"></a>PetscErrorCode PEPMonitorLG(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line345">345: </a>{
-<a name="line346">346: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line347">347: </a>  PetscDraw      draw;
-<a name="line348">348: </a>  PetscDrawLG    lg;
-<a name="line350">350: </a>  PetscReal      x,y;
-
-<a name="line353">353: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)pep));
-<a name="line354">354: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line355">355: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line356">356: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line357">357: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line358">358: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line359">359: </a>    PetscDrawLGSetDimension(lg,1);
-<a name="line360">360: </a>    PetscDrawLGReset(lg);
-<a name="line361">361: </a>    PetscDrawLGSetLimits(lg,0,1.0,log10(pep->tol)-2,0.0);
-<a name="line362">362: </a>  }
-
-<a name="line364">364: </a>  x = (PetscReal)its;
-<a name="line365">365: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = log10(errest[nconv]); <font color="#4169E1">else</font> y = 0.0;
-<a name="line366">366: </a>  PetscDrawLGAddPoint(lg,&x,&y);
-
-<a name="line368">368: </a>  PetscDrawLGDraw(lg);
-<a name="line369">369: </a>  <font color="#4169E1">return</font>(0);
-<a name="line370">370: </a>}
-
-<a name="line374">374: </a><strong><font color="#4169E1"><a name="PEPMonitorLGAll"></a>PetscErrorCode PEPMonitorLGAll(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line375">375: </a>{
-<a name="line376">376: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line377">377: </a>  PetscDraw      draw;
-<a name="line378">378: </a>  PetscDrawLG    lg;
-<a name="line380">380: </a>  PetscReal      *x,*y;
-<a name="line381">381: </a>  PetscInt       i,n = PetscMin(pep->nev,255);
-
-<a name="line384">384: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)pep));
-<a name="line385">385: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line386">386: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line387">387: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line388">388: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line389">389: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line390">390: </a>    PetscDrawLGSetDimension(lg,n);
-<a name="line391">391: </a>    PetscDrawLGReset(lg);
-<a name="line392">392: </a>    PetscDrawLGSetLimits(lg,0,1.0,log10(pep->tol)-2,0.0);
-<a name="line393">393: </a>  }
-
-<a name="line395">395: </a>  PetscMalloc2(n,&x,n,&y);
-<a name="line396">396: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line397">397: </a>    x[i] = (PetscReal)its;
-<a name="line398">398: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = log10(errest[i]);
-<a name="line399">399: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
-<a name="line400">400: </a>  }
-<a name="line401">401: </a>  PetscDrawLGAddPoint(lg,x,y);
-
-<a name="line403">403: </a>  PetscDrawLGDraw(lg);
-<a name="line404">404: </a>  PetscFree2(x,y);
-<a name="line405">405: </a>  <font color="#4169E1">return</font>(0);
-<a name="line406">406: </a>}
+<a name="line214">214: </a>  PetscViewer    viewer;
+
+<a name="line219">219: </a>  viewer = vf->viewer;
+<a name="line221">221: </a>  PetscViewerPushFormat(viewer,vf->format);
+<a name="line222">222: </a>  PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line223">223: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)pep)->prefix) {
+<a name="line224">224: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Eigenvalue approximations and residual norms for %s solve.\n"</font>,((PetscObject)pep)->prefix);
+<a name="line225">225: </a>  }
+<a name="line226">226: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> nconv=%D Values (Errors)"</font>,its,nconv);
+<a name="line227">227: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line228">228: </a>  <font color="#4169E1">for</font> (i=0;i<nest;i++) {
+<a name="line229">229: </a>    er = eigr[i]; ei = eigi[i];
+<a name="line230">230: </a>    PEPMonitorGetTrueEig(pep,&er,&ei);
+<a name="line231">231: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line232">232: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
+<a name="line233">233: </a><font color="#A020F0">#else</font>
+<a name="line234">234: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
+<a name="line235">235: </a>    <font color="#4169E1">if</font> (eigi[i]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
+<a name="line236">236: </a><font color="#A020F0">#endif</font>
+<a name="line237">237: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)"</font>,(double)errest[i]);
+<a name="line238">238: </a>  }
+<a name="line239">239: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line240">240: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line241">241: </a>  PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line242">242: </a>  PetscViewerPopFormat(viewer);
+<a name="line243">243: </a>  <font color="#4169E1">return</font>(0);
+<a name="line244">244: </a>}
+
+<a name="line248">248: </a><font color="#B22222">/*@C</font>
+<a name="line249">249: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a> - Print the first unconverged approximate value and</font>
+<a name="line250">250: </a><font color="#B22222">   error estimate at each iteration of the polynomial eigensolver.</font>
+
+<a name="line252">252: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line254">254: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line255">255: </a><font color="#B22222">+  pep    - polynomial eigensolver context</font>
+<a name="line256">256: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line257">257: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line258">258: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line259">259: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line260">260: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line261">261: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line262">262: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
+
+<a name="line264">264: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line266">266: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>()</font>
+<a name="line267">267: </a><font color="#B22222">@*/</font>
+<a name="line268">268: </a><strong><font color="#4169E1"><a name="PEPMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
+<a name="line269">269: </a>{
+<a name="line271">271: </a>  PetscScalar    er,ei;
+<a name="line272">272: </a>  PetscViewer    viewer;
+
+<a name="line277">277: </a>  viewer = vf->viewer;
+<a name="line279">279: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)pep)->prefix) {
+<a name="line280">280: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Eigenvalue approximations and residual norms for %s solve.\n"</font>,((PetscObject)pep)->prefix);
+<a name="line281">281: </a>  }
+<a name="line282">282: </a>  <font color="#4169E1">if</font> (nconv<nest) {
+<a name="line283">283: </a>    PetscViewerPushFormat(viewer,vf->format);
+<a name="line284">284: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line285">285: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
+<a name="line286">286: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line287">287: </a>    er = eigr[nconv]; ei = eigi[nconv];
+<a name="line288">288: </a>    PEPMonitorGetTrueEig(pep,&er,&ei);
+<a name="line289">289: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line290">290: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
+<a name="line291">291: </a><font color="#A020F0">#else</font>
+<a name="line292">292: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
+<a name="line293">293: </a>    <font color="#4169E1">if</font> (eigi[nconv]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
+<a name="line294">294: </a><font color="#A020F0">#endif</font>
+<a name="line295">295: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[nconv]);
+<a name="line296">296: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line297">297: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line298">298: </a>    PetscViewerPopFormat(viewer);
+<a name="line299">299: </a>  }
+<a name="line300">300: </a>  <font color="#4169E1">return</font>(0);
+<a name="line301">301: </a>}
+
+<a name="line305">305: </a><font color="#B22222">/*@C</font>
+<a name="line306">306: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a> - Print the approximate values and</font>
+<a name="line307">307: </a><font color="#B22222">   error estimates as they converge.</font>
+
+<a name="line309">309: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line311">311: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line312">312: </a><font color="#B22222">+  pep    - polynomial eigensolver context</font>
+<a name="line313">313: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line314">314: </a><font color="#B22222">.  nconv  - number of converged eigenpairs so far</font>
+<a name="line315">315: </a><font color="#B22222">.  eigr   - real part of the eigenvalues</font>
+<a name="line316">316: </a><font color="#B22222">.  eigi   - imaginary part of the eigenvalues</font>
+<a name="line317">317: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line318">318: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line319">319: </a><font color="#B22222">-  ctx    - monitor context</font>
+
+<a name="line321">321: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line323">323: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>()</font>
+<a name="line324">324: </a><font color="#B22222">@*/</font>
+<a name="line325">325: </a><strong><font color="#4169E1"><a name="PEPMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)</font></strong>
+<a name="line326">326: </a>{
+<a name="line328">328: </a>  PetscInt       i;
+<a name="line329">329: </a>  PetscScalar    er,ei;
+<a name="line330">330: </a>  PetscViewer    viewer;
+
+<a name="line335">335: </a>  viewer = ctx->viewer;
+<a name="line337">337: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)pep)->prefix) {
+<a name="line338">338: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Convergence history for %s solve.\n"</font>,((PetscObject)pep)->prefix);
+<a name="line339">339: </a>  }
+<a name="line340">340: </a>  <font color="#4169E1">if</font> (its==1) ctx->oldnconv = 0;
+<a name="line341">341: </a>  <font color="#4169E1">if</font> (ctx->oldnconv!=nconv) {
+<a name="line342">342: </a>    PetscViewerPushFormat(viewer,ctx->format);
+<a name="line343">343: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line344">344: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
+<a name="line345">345: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> converged value (error) #%D"</font>,its,i);
+<a name="line346">346: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line347">347: </a>      er = eigr[i]; ei = eigi[i];
+<a name="line348">348: </a>      PEPMonitorGetTrueEig(pep,&er,&ei);
+<a name="line349">349: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line350">350: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g%+gi"</font>,(double)PetscRealPart(er),(double)PetscImaginaryPart(er));
+<a name="line351">351: </a><font color="#A020F0">#else</font>
+<a name="line352">352: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g"</font>,(double)er);
+<a name="line353">353: </a>      <font color="#4169E1">if</font> (eigi[i]!=0.0) { PetscViewerASCIIPrintf(viewer,<font color="#666666">"%+gi"</font>,(double)ei); }
+<a name="line354">354: </a><font color="#A020F0">#endif</font>
+<a name="line355">355: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" (%10.8e)\n"</font>,(double)errest[i]);
+<a name="line356">356: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line357">357: </a>    }
+<a name="line358">358: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line359">359: </a>    PetscViewerPopFormat(viewer);
+<a name="line360">360: </a>    ctx->oldnconv = nconv;
+<a name="line361">361: </a>  }
+<a name="line362">362: </a>  <font color="#4169E1">return</font>(0);
+<a name="line363">363: </a>}
+
+<a name="line367">367: </a><font color="#B22222">/*@C</font>
+<a name="line368">368: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPMonitorLGCreate.html#PEPMonitorLGCreate">PEPMonitorLGCreate</a> - Creates a line graph context for use with</font>
+<a name="line369">369: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> to monitor convergence.</font>
+
+<a name="line371">371: </a><font color="#B22222">   Collective on MPI_Comm</font>
+
+<a name="line373">373: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line374">374: </a><font color="#B22222">+  comm - communicator context</font>
+<a name="line375">375: </a><font color="#B22222">.  host - the X display to open, or null for the local machine</font>
+<a name="line376">376: </a><font color="#B22222">.  label - the title to put in the title bar</font>
+<a name="line377">377: </a><font color="#B22222">.  x, y - the screen coordinates of the upper left coordinate of</font>
+<a name="line378">378: </a><font color="#B22222">          the window</font>
+<a name="line379">379: </a><font color="#B22222">-  m, n - the screen width and height in pixels</font>
+
+<a name="line381">381: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line382">382: </a><font color="#B22222">.  lgctx - the drawing context</font>
+
+<a name="line384">384: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line385">385: </a><font color="#B22222">+  -pep_monitor_lg - Sets line graph monitor for the first residual</font>
+<a name="line386">386: </a><font color="#B22222">-  -pep_monitor_lg_all - Sets line graph monitor for all residuals</font>
+
+<a name="line388">388: </a><font color="#B22222">   Notes:</font>
+<a name="line389">389: </a><font color="#B22222">   Use PetscDrawLGDestroy() to destroy this line graph.</font>
+
+<a name="line391">391: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line393">393: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>()</font>
+<a name="line394">394: </a><font color="#B22222">@*/</font>
+<a name="line395">395: </a><strong><font color="#4169E1"><a name="PEPMonitorLGCreate"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorLGCreate.html#PEPMonitorLGCreate">PEPMonitorLGCreate</a>(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)</font></strong>
+<a name="line396">396: </a>{
+<a name="line397">397: </a>  PetscDraw      draw;
+<a name="line398">398: </a>  PetscDrawLG    lg;
+
+<a name="line402">402: </a>  PetscDrawCreate(comm,host,label,x,y,m,n,&draw);
+<a name="line403">403: </a>  PetscDrawSetFromOptions(draw);
+<a name="line404">404: </a>  PetscDrawLGCreate(draw,1,&lg);
+<a name="line405">405: </a>  PetscDrawLGSetFromOptions(lg);
+<a name="line406">406: </a>  PetscDrawDestroy(&draw);
+<a name="line407">407: </a>  *lgctx = lg;
+<a name="line408">408: </a>  <font color="#4169E1">return</font>(0);
+<a name="line409">409: </a>}
+
+<a name="line413">413: </a><strong><font color="#4169E1"><a name="PEPMonitorLG"></a>PetscErrorCode PEPMonitorLG(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line414">414: </a>{
+<a name="line415">415: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line416">416: </a>  PetscReal      x,y;
+
+<a name="line421">421: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line422">422: </a>    PetscDrawLGReset(lg);
+<a name="line423">423: </a>    PetscDrawLGSetDimension(lg,1);
+<a name="line424">424: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(pep->tol)-2,0.0);
+<a name="line425">425: </a>  }
+<a name="line426">426: </a>  x = (PetscReal)its;
+<a name="line427">427: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+<a name="line428">428: </a>  <font color="#4169E1">else</font> y = 0.0;
+<a name="line429">429: </a>  PetscDrawLGAddPoint(lg,&x,&y);
+<a name="line430">430: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || pep->reason) {
+<a name="line431">431: </a>    PetscDrawLGDraw(lg);
+<a name="line432">432: </a>    PetscDrawLGSave(lg);
+<a name="line433">433: </a>  }
+<a name="line434">434: </a>  <font color="#4169E1">return</font>(0);
+<a name="line435">435: </a>}
+
+<a name="line439">439: </a><strong><font color="#4169E1"><a name="PEPMonitorLGAll"></a>PetscErrorCode PEPMonitorLGAll(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line440">440: </a>{
+<a name="line441">441: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line442">442: </a>  PetscInt       i,n = PetscMin(pep->nev,255);
+<a name="line443">443: </a>  PetscReal      *x,*y;
+
+<a name="line448">448: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line449">449: </a>    PetscDrawLGReset(lg);
+<a name="line450">450: </a>    PetscDrawLGSetDimension(lg,n);
+<a name="line451">451: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(pep->tol)-2,0.0);
+<a name="line452">452: </a>  }
+<a name="line453">453: </a>  PetscMalloc2(n,&x,n,&y);
+<a name="line454">454: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line455">455: </a>    x[i] = (PetscReal)its;
+<a name="line456">456: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
+<a name="line457">457: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
+<a name="line458">458: </a>  }
+<a name="line459">459: </a>  PetscDrawLGAddPoint(lg,x,y);
+<a name="line460">460: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || pep->reason) {
+<a name="line461">461: </a>    PetscDrawLGDraw(lg);
+<a name="line462">462: </a>    PetscDrawLGSave(lg);
+<a name="line463">463: </a>  }
+<a name="line464">464: </a>  PetscFree2(x,y);
+<a name="line465">465: </a>  <font color="#4169E1">return</font>(0);
+<a name="line466">466: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/interface/pepopts.c b/src/pep/interface/pepopts.c
index 7efb132..4ad20d1 100644
--- a/src/pep/interface/pepopts.c
+++ b/src/pep/interface/pepopts.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -23,6 +23,85 @@
 */
 
 #include <slepc/private/pepimpl.h>       /*I "slepcpep.h" I*/
+#include <petscdraw.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPMonitorSetFromOptions"
+/*@C
+   PEPMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user.
+
+   Collective on PEP
+
+   Input Parameters:
++  pep      - the polynomial eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+.  monitor  - the monitor function, whose context is a PetscViewerAndFormat
+-  trackall - whether this monitor tracks all eigenvalues or not
+
+   Level: developer
+
+.seealso: PEPMonitorSet(), PEPSetTrackAll(), PEPConvMonitorSetFromOptions()
+@*/
+PetscErrorCode PEPMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+{
+  PetscErrorCode       ierr;
+  PetscBool            flg;
+  PetscViewer          viewer;
+  PetscViewerFormat    format;
+  PetscViewerAndFormat *vf;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = PetscViewerAndFormatCreate(viewer,format,&vf);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = PEPMonitorSet(pep,(PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
+    if (trackall) {
+      ierr = PEPSetTrackAll(pep,PETSC_TRUE);CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPConvMonitorSetFromOptions"
+/*@C
+   PEPConvMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user (for monitors that only show iteration numbers of convergence).
+
+   Collective on PEP
+
+   Input Parameters:
++  pep      - the polynomial eigensolver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+-  monitor  - the monitor function, whose context is a SlepcConvMonitor
+
+   Level: developer
+
+.seealso: PEPMonitorSet(), PEPMonitorSetFromOptions()
+@*/
+PetscErrorCode PEPConvMonitorSetFromOptions(PEP pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,SlepcConvMonitor))
+{
+  PetscErrorCode    ierr;
+  PetscBool         flg;
+  PetscViewer       viewer;
+  PetscViewerFormat format;
+  SlepcConvMonitor  ctx;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = SlepcConvMonitorCreate(viewer,format,&ctx);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = PEPMonitorSet(pep,(PetscErrorCode (*)(PEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSetFromOptions"
@@ -43,14 +122,13 @@
 @*/
 PetscErrorCode PEPSetFromOptions(PEP pep)
 {
-  PetscErrorCode   ierr;
-  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-  PetscBool        flg,flg1,flg2,flg3,flg4;
-  PetscReal        r,t;
-  PetscScalar      s;
-  PetscInt         i,j,k;
-  PetscViewer      monviewer;
-  SlepcConvMonitor ctx;
+  PetscErrorCode ierr;
+  char           type[256];
+  PetscBool      set,flg,flg1,flg2,flg3;
+  PetscReal      r,t;
+  PetscScalar    s;
+  PetscInt       i,j,k;
+  PetscDrawLG    lg;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
@@ -89,15 +167,15 @@ PetscErrorCode PEPSetFromOptions(PEP pep)
     i = pep->npart;
     ierr = PetscOptionsInt("-pep_refine_partitions","Number of partitions of the communicator for iterative refinement","PEPSetRefine",pep->npart,&i,&flg1);CHKERRQ(ierr);
     r = pep->rtol;
-    ierr = PetscOptionsReal("-pep_refine_tol","Tolerance for iterative refinement","PEPSetRefine",pep->rtol,&r,&flg2);CHKERRQ(ierr);
+    ierr = PetscOptionsReal("-pep_refine_tol","Tolerance for iterative refinement","PEPSetRefine",pep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/1000:pep->rtol,&r,&flg2);CHKERRQ(ierr);
     j = pep->rits;
     ierr = PetscOptionsInt("-pep_refine_its","Maximum number of iterations for iterative refinement","PEPSetRefine",pep->rits,&j,&flg3);CHKERRQ(ierr);
-    flg = pep->schur;
-    ierr = PetscOptionsBool("-pep_refine_schur","Use Schur complement for iterative refinement","PEPSetRefine",pep->schur,&flg,&flg4);CHKERRQ(ierr);
-    if (flg1 || flg2 || flg3 || flg4) {
-      ierr = PEPSetRefine(pep,pep->refine,i,r,j,flg);CHKERRQ(ierr);
+    if (flg1 || flg2 || flg3) {
+      ierr = PEPSetRefine(pep,pep->refine,i,r,j,pep->scheme);CHKERRQ(ierr);
     }
 
+    ierr = PetscOptionsEnum("-pep_refine_scheme","Scheme used for linear systems within iterative refinement","PEPSetRefine",PEPRefineSchemes,(PetscEnum)pep->scheme,(PetscEnum*)&pep->scheme,NULL);CHKERRQ(ierr);
+
     i = pep->max_it? pep->max_it: PETSC_DEFAULT;
     ierr = PetscOptionsInt("-pep_max_it","Maximum number of iterations","PEPSetTolerances",pep->max_it,&i,&flg1);CHKERRQ(ierr);
     r = pep->tol;
@@ -106,17 +184,20 @@ PetscErrorCode PEPSetFromOptions(PEP pep)
       ierr = PEPSetTolerances(pep,r,i);CHKERRQ(ierr);
     }
 
-    ierr = PetscOptionsBoolGroupBegin("-pep_conv_eig","Relative error convergence test","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
-    if (flg) { ierr = PEPSetConvergenceTest(pep,PEP_CONV_EIG);CHKERRQ(ierr); }
-    ierr = PetscOptionsBoolGroup("-pep_conv_linear","Convergence test related to the linearized eigenproblem","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
-    if (flg) { ierr = PEPSetConvergenceTest(pep,PEP_CONV_LINEAR);CHKERRQ(ierr); }
-    ierr = PetscOptionsBoolGroupBegin("-pep_conv_norm","Convergence test related to the matrix norms","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
+    ierr = PetscOptionsBoolGroupBegin("-pep_conv_rel","Relative error convergence test","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = PEPSetConvergenceTest(pep,PEP_CONV_REL);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupBegin("-pep_conv_norm","Convergence test relative to the matrix norms","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
     if (flg) { ierr = PEPSetConvergenceTest(pep,PEP_CONV_NORM);CHKERRQ(ierr); }
     ierr = PetscOptionsBoolGroup("-pep_conv_abs","Absolute error convergence test","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
     if (flg) { ierr = PEPSetConvergenceTest(pep,PEP_CONV_ABS);CHKERRQ(ierr); }
     ierr = PetscOptionsBoolGroupEnd("-pep_conv_user","User-defined convergence test","PEPSetConvergenceTest",&flg);CHKERRQ(ierr);
     if (flg) { ierr = PEPSetConvergenceTest(pep,PEP_CONV_USER);CHKERRQ(ierr); }
 
+    ierr = PetscOptionsBoolGroupBegin("-pep_stop_basic","Stop iteration if all eigenvalues converged or max_it reached","PEPSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = PEPSetStoppingTest(pep,PEP_STOP_BASIC);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-pep_stop_user","User-defined stopping test","PEPSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = PEPSetStoppingTest(pep,PEP_STOP_USER);CHKERRQ(ierr); }
+
     i = pep->nev;
     ierr = PetscOptionsInt("-pep_nev","Number of eigenvalues to compute","PEPSetDimensions",pep->nev,&i,&flg1);CHKERRQ(ierr);
     j = pep->ncv? pep->ncv: PETSC_DEFAULT;
@@ -139,40 +220,28 @@ PetscErrorCode PEPSetFromOptions(PEP pep)
     /*
       Cancels all monitors hardwired into code before call to PEPSetFromOptions()
     */
-    flg  = PETSC_FALSE;
-    ierr = PetscOptionsBool("-pep_monitor_cancel","Remove any hardwired monitor routines","PEPMonitorCancel",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
+    ierr = PetscOptionsBool("-pep_monitor_cancel","Remove any hardwired monitor routines","PEPMonitorCancel",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
       ierr = PEPMonitorCancel(pep);CHKERRQ(ierr);
     }
     /*
-      Prints approximate eigenvalues and error estimates at each iteration
+      Text monitors
     */
-    ierr = PetscOptionsString("-pep_monitor","Monitor first unconverged approximate eigenvalue and error estimate","PEPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)pep),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = PEPMonitorSet(pep,PEPMonitorFirst,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-pep_monitor_conv","Monitor approximate eigenvalues and error estimates as they converge","PEPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscNew(&ctx);CHKERRQ(ierr);
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)pep),monfilename,&ctx->viewer);CHKERRQ(ierr);
-      ierr = PEPMonitorSet(pep,PEPMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-pep_monitor_all","Monitor approximate eigenvalues and error estimates","PEPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)pep),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = PEPMonitorSet(pep,PEPMonitorAll,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-      ierr = PEPSetTrackAll(pep,PETSC_TRUE);CHKERRQ(ierr);
-    }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-pep_monitor_lg","Monitor first unconverged approximate error estimate graphically","PEPMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PEPMonitorSet(pep,PEPMonitorLG,NULL,NULL);CHKERRQ(ierr);
+    ierr = PEPMonitorSetFromOptions(pep,"-pep_monitor","Monitor first unconverged approximate eigenvalue and error estimate","PEPMonitorFirst",PEPMonitorFirst,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = PEPConvMonitorSetFromOptions(pep,"-pep_monitor_conv","Monitor approximate eigenvalues and error estimates as they converge","PEPMonitorConverged",PEPMonitorConverged);CHKERRQ(ierr);
+    ierr = PEPMonitorSetFromOptions(pep,"-pep_monitor_all","Monitor approximate eigenvalues and error estimates","PEPMonitorAll",PEPMonitorAll,PETSC_TRUE);CHKERRQ(ierr);
+    /*
+      Line graph monitors
+    */
+    ierr = PetscOptionsBool("-pep_monitor_lg","Monitor first unconverged approximate error estimate graphically","PEPMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = PEPMonitorLGCreate(PetscObjectComm((PetscObject)pep),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = PEPMonitorSet(pep,PEPMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
     }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-pep_monitor_lg_all","Monitor error estimates graphically","PEPMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PEPMonitorSet(pep,PEPMonitorLGAll,NULL,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsBool("-pep_monitor_lg_all","Monitor error estimates graphically","PEPMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = PEPMonitorLGCreate(PetscObjectComm((PetscObject)pep),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = PEPMonitorSet(pep,PEPMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
       ierr = PEPSetTrackAll(pep,PETSC_TRUE);CHKERRQ(ierr);
     }
   /* -----------------------------------------------------------------------*/
@@ -196,18 +265,18 @@ PetscErrorCode PEPSetFromOptions(PEP pep)
     ierr = PetscOptionsBoolGroupEnd("-pep_target_imaginary","compute eigenvalues with imaginary parts close to target","PEPSetWhichEigenpairs",&flg);CHKERRQ(ierr);
     if (flg) { ierr = PEPSetWhichEigenpairs(pep,PEP_TARGET_IMAGINARY);CHKERRQ(ierr); }
 
-    ierr = PetscOptionsName("-pep_view","Print detailed information on solver used","PEPView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-pep_view_vectors","View computed eigenvectors","PEPVectorsView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-pep_view_values","View computed eigenvalues","PEPValuesView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-pep_converged_reason","Print reason for convergence, and number of iterations","PEPReasonView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-pep_error_absolute","Print absolute errors of each eigenpair","PEPErrorView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-pep_error_relative","Print relative errors of each eigenpair","PEPErrorView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-pep_error_backward","Print backward errors of each eigenpair","PEPErrorView",0);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_view","Print detailed information on solver used","PEPView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_view_vectors","View computed eigenvectors","PEPVectorsView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_view_values","View computed eigenvalues","PEPValuesView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_converged_reason","Print reason for convergence, and number of iterations","PEPReasonView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_error_absolute","Print absolute errors of each eigenpair","PEPErrorView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_error_relative","Print relative errors of each eigenpair","PEPErrorView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-pep_error_backward","Print backward errors of each eigenpair","PEPErrorView",NULL);CHKERRQ(ierr);
 
     if (pep->ops->setfromoptions) {
       ierr = (*pep->ops->setfromoptions)(PetscOptionsObject,pep);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)pep);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)pep);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
 
   if (!pep->V) { ierr = PEPGetBV(pep,&pep->V);CHKERRQ(ierr); }
@@ -220,7 +289,6 @@ PetscErrorCode PEPSetFromOptions(PEP pep)
   ierr = STSetFromOptions(pep->st);CHKERRQ(ierr);
   if (!pep->refineksp) { ierr = PEPRefineGetKSP(pep,&pep->refineksp);CHKERRQ(ierr); }
   ierr = KSPSetFromOptions(pep->refineksp);CHKERRQ(ierr);
-  ierr = PetscRandomSetFromOptions(pep->rand);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -587,7 +655,10 @@ PetscErrorCode PEPSetProblemType(PEP pep,PEPProblemType type)
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidLogicalCollectiveEnum(pep,type,2);
   if (type!=PEP_GENERAL && type!=PEP_HERMITIAN && type!=PEP_GYROSCOPIC) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,"Unknown eigenvalue problem type");
-  pep->problem_type = type;
+  if (type != pep->problem_type) {
+    pep->problem_type = type;
+    pep->state = PEP_STATE_INITIAL;
+  }
   PetscFunctionReturn(0);
 }
 
@@ -749,9 +820,8 @@ PetscErrorCode PEPGetTrackAll(PEP pep,PetscBool *trackall)
    Input Parameters:
 +  pep     - eigensolver context obtained from PEPCreate()
 .  func    - a pointer to the convergence test function
-.  ctx     - [optional] context for private data for the convergence routine
--  destroy - [optional] destructor for the context (may be NULL;
-             PETSC_NULL_FUNCTION in Fortran)
+.  ctx     - context for private data for the convergence routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
 
    Calling Sequence of func:
 $   func(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)
@@ -761,7 +831,7 @@ $   func(PEP pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *erre
 .   eigi   - imaginary part of the eigenvalue
 .   res    - residual norm associated to the eigenpair
 .   errest - (output) computed error estimate
--   ctx    - optional context, as set by PEPSetConvergenceTest()
+-   ctx    - optional context, as set by PEPSetConvergenceTestFunction()
 
    Note:
    If the error estimate returned by the convergence test function is less than
@@ -783,8 +853,7 @@ PetscErrorCode PEPSetConvergenceTestFunction(PEP pep,PetscErrorCode (*func)(PEP,
   pep->converged        = func;
   pep->convergeddestroy = destroy;
   pep->convergedctx     = ctx;
-  if (func == PEPConvergedEigRelative) pep->conv = PEP_CONV_EIG;
-  else if (func == PEPConvergedLinear) pep->conv = PEP_CONV_LINEAR;
+  if (func == PEPConvergedRelative) pep->conv = PEP_CONV_REL;
   else if (func == PEPConvergedNorm) pep->conv = PEP_CONV_NORM;
   else if (func == PEPConvergedAbsolute) pep->conv = PEP_CONV_ABS;
   else pep->conv = PEP_CONV_USER;
@@ -805,21 +874,20 @@ PetscErrorCode PEPSetConvergenceTestFunction(PEP pep,PetscErrorCode (*func)(PEP,
 
    Options Database Keys:
 +  -pep_conv_abs    - Sets the absolute convergence test
-.  -pep_conv_eig    - Sets the convergence test relative to the eigenvalue
-.  -pep_conv_linear - Sets the convergence test related to the linearized eigenproblem
+.  -pep_conv_rel    - Sets the convergence test relative to the eigenvalue
+.  -pep_conv_norm   - Sets the convergence test relative to the matrix norms
 -  -pep_conv_user   - Selects the user-defined convergence test
 
    Note:
    The parameter 'conv' can have one of these values
 +     PEP_CONV_ABS    - absolute error ||r||
-.     PEP_CONV_EIG    - error relative to the eigenvalue l, ||r||/|l|
-.     PEP_CONV_LINEAR - error related to the linearized eigenproblem
+.     PEP_CONV_REL    - error relative to the eigenvalue l, ||r||/|l|
 .     PEP_CONV_NORM   - error relative matrix norms, ||r||/sum_i(l^i*||A_i||)
 -     PEP_CONV_USER   - function set by PEPSetConvergenceTestFunction()
 
    Level: intermediate
 
-.seealso: PEPGetConvergenceTest(), PEPSetConvergenceTestFunction(), PEPConv
+.seealso: PEPGetConvergenceTest(), PEPSetConvergenceTestFunction(), PEPSetStoppingTest(), PEPConv
 @*/
 PetscErrorCode PEPSetConvergenceTest(PEP pep,PEPConv conv)
 {
@@ -828,8 +896,7 @@ PetscErrorCode PEPSetConvergenceTest(PEP pep,PEPConv conv)
   PetscValidLogicalCollectiveEnum(pep,conv,2);
   switch (conv) {
     case PEP_CONV_ABS:    pep->converged = PEPConvergedAbsolute; break;
-    case PEP_CONV_EIG:    pep->converged = PEPConvergedEigRelative; break;
-    case PEP_CONV_LINEAR: pep->converged = PEPConvergedLinear; break;
+    case PEP_CONV_REL:    pep->converged = PEPConvergedRelative; break;
     case PEP_CONV_NORM:   pep->converged = PEPConvergedNorm; break;
     case PEP_CONV_USER: break;
     default:
@@ -867,6 +934,125 @@ PetscErrorCode PEPGetConvergenceTest(PEP pep,PEPConv *conv)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "PEPSetStoppingTestFunction"
+/*@C
+   PEPSetStoppingTestFunction - Sets a function to decide when to stop the outer
+   iteration of the eigensolver.
+
+   Logically Collective on PEP
+
+   Input Parameters:
++  pep     - eigensolver context obtained from PEPCreate()
+.  func    - pointer to the stopping test function
+.  ctx     - context for private data for the stopping routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
+
+   Calling Sequence of func:
+$   func(PEP pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,PEPConvergedReason *reason,void *ctx)
+
++   pep    - eigensolver context obtained from PEPCreate()
+.   its    - current number of iterations
+.   max_it - maximum number of iterations
+.   nconv  - number of currently converged eigenpairs
+.   nev    - number of requested eigenpairs
+.   reason - (output) result of the stopping test
+-   ctx    - optional context, as set by PEPSetStoppingTestFunction()
+
+   Note:
+   Normal usage is to first call the default routine PEPStoppingBasic() and then
+   set reason to PEP_CONVERGED_USER if some user-defined conditions have been
+   met. To let the eigensolver continue iterating, the result must be left as
+   PEP_CONVERGED_ITERATING.
+
+   Level: advanced
+
+.seealso: PEPSetStoppingTest(), PEPStoppingBasic()
+@*/
+PetscErrorCode PEPSetStoppingTestFunction(PEP pep,PetscErrorCode (*func)(PEP,PetscInt,PetscInt,PetscInt,PetscInt,PEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  if (pep->stoppingdestroy) {
+    ierr = (*pep->stoppingdestroy)(pep->stoppingctx);CHKERRQ(ierr);
+  }
+  pep->stopping        = func;
+  pep->stoppingdestroy = destroy;
+  pep->stoppingctx     = ctx;
+  if (func == PEPStoppingBasic) pep->stop = PEP_STOP_BASIC;
+  else pep->stop = PEP_STOP_USER;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPSetStoppingTest"
+/*@
+   PEPSetStoppingTest - Specifies how to decide the termination of the outer
+   loop of the eigensolver.
+
+   Logically Collective on PEP
+
+   Input Parameters:
++  pep  - eigensolver context obtained from PEPCreate()
+-  stop - the type of stopping test
+
+   Options Database Keys:
++  -pep_stop_basic - Sets the default stopping test
+-  -pep_stop_user  - Selects the user-defined stopping test
+
+   Note:
+   The parameter 'stop' can have one of these values
++     PEP_STOP_BASIC - default stopping test
+-     PEP_STOP_USER  - function set by PEPSetStoppingTestFunction()
+
+   Level: advanced
+
+.seealso: PEPGetStoppingTest(), PEPSetStoppingTestFunction(), PEPSetConvergenceTest(), PEPStop
+@*/
+PetscErrorCode PEPSetStoppingTest(PEP pep,PEPStop stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(pep,stop,2);
+  switch (stop) {
+    case PEP_STOP_BASIC: pep->stopping = PEPStoppingBasic; break;
+    case PEP_STOP_USER:  break;
+    default:
+      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'stop' value");
+  }
+  pep->stop = stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "PEPGetStoppingTest"
+/*@
+   PEPGetStoppingTest - Gets the method used to decide the termination of the outer
+   loop of the eigensolver.
+
+   Not Collective
+
+   Input Parameters:
+.  pep   - eigensolver context obtained from PEPCreate()
+
+   Output Parameters:
+.  stop  - the type of stopping test
+
+   Level: advanced
+
+.seealso: PEPSetStoppingTest(), PEPStop
+@*/
+PetscErrorCode PEPGetStoppingTest(PEP pep,PEPStop *stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  PetscValidPointer(stop,2);
+  *stop = pep->stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "PEPSetScale"
 /*@
    PEPSetScale - Specifies the scaling strategy to be used.
@@ -1065,14 +1251,14 @@ PetscErrorCode PEPGetExtract(PEP pep,PEPExtract *extract)
 .  npart  - number of partitions of the communicator
 .  tol    - the convergence tolerance
 .  its    - maximum number of refinement iterations
--  schur  - boolean flag to activate the Schur complement approach
+-  scheme - which scheme to be used for solving the involved linear systems
 
    Options Database Keys:
 +  -pep_refine <type> - refinement type, one of <none,simple,multiple>
 .  -pep_refine_partitions <n> - the number of partitions
 .  -pep_refine_tol <tol> - the tolerance
 .  -pep_refine_its <its> - number of iterations
--  -pep_refine_schur - to set the Schur complement approach
+-  -pep_refine_scheme - to set the scheme for the linear solves
 
    Notes:
    By default, iterative refinement is disabled, since it may be very
@@ -1093,15 +1279,15 @@ PetscErrorCode PEPGetExtract(PEP pep,PEPExtract *extract)
    different value). In contrast, the multiple method simply performs its
    refinement iterations (just one by default).
 
-   The schur flag is used to change the way in which linear systems are
-   solved, so that a Schur complement approach is used instead of explicitly
-   building the coefficient matrix.
+   The scheme argument is used to change the way in which linear systems are
+   solved. Possible choices are: explicit, mixed block elimination (MBE), 
+   and Schur complement.
 
    Level: intermediate
 
 .seealso: PEPGetRefine()
 @*/
-PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PetscBool schur)
+PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal tol,PetscInt its,PEPRefineScheme scheme)
 {
   PetscErrorCode ierr;
   PetscMPIInt    size;
@@ -1112,7 +1298,7 @@ PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal to
   PetscValidLogicalCollectiveInt(pep,npart,3);
   PetscValidLogicalCollectiveReal(pep,tol,4);
   PetscValidLogicalCollectiveInt(pep,its,5);
-  PetscValidLogicalCollectiveBool(pep,schur,6);
+  PetscValidLogicalCollectiveEnum(pep,scheme,6);
   pep->refine = refine;
   if (refine) {  /* process parameters only if not REFINE_NONE */
     if (npart!=pep->npart) {
@@ -1127,7 +1313,7 @@ PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal to
       pep->npart = npart;
     }
     if (tol == PETSC_DEFAULT || tol == PETSC_DECIDE) {
-      pep->rtol = pep->tol;
+      pep->rtol = PetscMax(pep->tol/1000,PETSC_MACHINE_EPSILON);
     } else {
       if (tol<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of tol. Must be > 0");
       pep->rtol = tol;
@@ -1138,7 +1324,7 @@ PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal to
       if (its<0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of its. Must be >= 0");
       pep->rits = its;
     }
-    pep->schur = schur;
+    pep->scheme = scheme;
   }
   pep->state = PEP_STATE_INITIAL;
   PetscFunctionReturn(0);
@@ -1160,7 +1346,7 @@ PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal to
 .  npart  - number of partitions of the communicator
 .  tol    - the convergence tolerance
 .  its    - maximum number of refinement iterations
--  schur  - whether the Schur complement approach is being used
+-  scheme - the scheme used for solving linear systems
 
    Level: intermediate
 
@@ -1169,7 +1355,7 @@ PetscErrorCode PEPSetRefine(PEP pep,PEPRefine refine,PetscInt npart,PetscReal to
 
 .seealso: PEPSetRefine()
 @*/
-PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur)
+PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PEPRefineScheme *scheme)
 {
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
@@ -1177,7 +1363,7 @@ PetscErrorCode PEPGetRefine(PEP pep,PEPRefine *refine,PetscInt *npart,PetscReal
   if (npart)  *npart  = pep->npart;
   if (tol)    *tol    = pep->rtol;
   if (its)    *its    = pep->rits;
-  if (schur)  *schur  = pep->schur;
+  if (scheme) *scheme = pep->scheme;
   PetscFunctionReturn(0);
 }
 
@@ -1287,7 +1473,8 @@ PetscErrorCode PEPAppendOptionsPrefix(PEP pep,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
diff --git a/src/pep/interface/pepopts.c.html b/src/pep/interface/pepopts.c.html
index 06baccf..16cd6d1 100644
--- a/src/pep/interface/pepopts.c.html
+++ b/src/pep/interface/pepopts.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepopts.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:50+00:00">
+<meta name="date" content="2016-05-16T10:33:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepopts.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepopts.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> routines related to options that can be set via the command-line</font>
 <a name="line3">  3: </a><font color="#B22222">      or procedurally.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,1147 +35,1312 @@
 <a name="line23"> 23: </a><font color="#B22222">*/</font>
 
 <a name="line25"> 25: </a><font color="#A020F0">#include <slepc/private/pepimpl.h>       </font><font color="#B22222">/*I "slepcpep.h" I*/</font><font color="#A020F0"></font>
+<a name="line26"> 26: </a><font color="#A020F0">#include <petscdraw.h></font>
 
-<a name="line29"> 29: </a><font color="#B22222">/*@</font>
-<a name="line30"> 30: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a> - Sets <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options from the options database.</font>
-<a name="line31"> 31: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>() if the user is to be</font>
-<a name="line32"> 32: </a><font color="#B22222">   allowed to set the solver type.</font>
+<a name="line30"> 30: </a><font color="#B22222">/*@C</font>
+<a name="line31"> 31: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line32"> 32: </a><font color="#B22222">   indicated by the user.</font>
 
 <a name="line34"> 34: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
 
 <a name="line36"> 36: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line37"> 37: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line39"> 39: </a><font color="#B22222">   Notes:</font>
-<a name="line40"> 40: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line42"> 42: </a><font color="#B22222">   Level: beginner</font>
-<a name="line43"> 43: </a><font color="#B22222">@*/</font>
-<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line45"> 45: </a>{
-<a name="line46"> 46: </a>  PetscErrorCode   ierr;
-<a name="line47"> 47: </a>  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-<a name="line48"> 48: </a>  PetscBool        flg,flg1,flg2,flg3,flg4;
-<a name="line49"> 49: </a>  PetscReal        r,t;
-<a name="line50"> 50: </a>  PetscScalar      s;
-<a name="line51"> 51: </a>  PetscInt         i,j,k;
-<a name="line52"> 52: </a>  PetscViewer      monviewer;
-<a name="line53"> 53: </a>  SlepcConvMonitor ctx;
-
-<a name="line57"> 57: </a>  <a href="../../../docs/manualpages/PEP/PEPRegisterAll.html#PEPRegisterAll">PEPRegisterAll</a>();
-<a name="line58"> 58: </a>  PetscObjectOptionsBegin((PetscObject)pep);
-<a name="line59"> 59: </a>    PetscOptionsFList(<font color="#666666">"-pep_type"</font>,<font color="#666666">"Polynomial Eigenvalue Problem method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>"</font>,PEPList,(char*)(((PetscObject)pep)->type_name?((PetscObject)pep)->type_name:PEPTOAR),type,256,&flg);
-<a name="line60"> 60: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line61"> 61: </a>      <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,type);
-<a name="line62"> 62: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!((PetscObject)pep)->type_name) {
-<a name="line63"> 63: </a>      <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,PEPTOAR);
+<a name="line37"> 37: </a><font color="#B22222">+  pep      - the polynomial eigensolver context</font>
+<a name="line38"> 38: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line39"> 39: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line40"> 40: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line41"> 41: </a><font color="#B22222">.  monitor  - the monitor function, whose context is a PetscViewerAndFormat</font>
+<a name="line42"> 42: </a><font color="#B22222">-  trackall - whether this monitor tracks all eigenvalues or not</font>
+
+<a name="line44"> 44: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line46"> 46: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(), <a href="../../../docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html#PEPConvMonitorSetFromOptions">PEPConvMonitorSetFromOptions</a>()</font>
+<a name="line47"> 47: </a><font color="#B22222">@*/</font>
+<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="PEPMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscR [...]
+<a name="line49"> 49: </a>{
+<a name="line50"> 50: </a>  PetscErrorCode       ierr;
+<a name="line51"> 51: </a>  PetscBool            flg;
+<a name="line52"> 52: </a>  PetscViewer          viewer;
+<a name="line53"> 53: </a>  PetscViewerFormat    format;
+<a name="line54"> 54: </a>  PetscViewerAndFormat *vf;
+
+<a name="line57"> 57: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,name,&viewer,&format,&flg);
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line59"> 59: </a>    PetscViewerAndFormatCreate(viewer,format,&vf);
+<a name="line60"> 60: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line61"> 61: </a>    <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,(PetscErrorCode (*)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line62"> 62: </a>    <font color="#4169E1">if</font> (trackall) {
+<a name="line63"> 63: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(pep,PETSC_TRUE);
 <a name="line64"> 64: </a>    }
-
-<a name="line66"> 66: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_general"</font>,<font color="#666666">"general polynomial eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>"</font>,&flg);
-<a name="line67"> 67: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL); }
-<a name="line68"> 68: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_hermitian"</font>,<font color="#666666">"hermitian polynomial eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>"</font>,&flg);
-<a name="line69"> 69: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_HERMITIAN); }
-<a name="line70"> 70: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_gyroscopic"</font>,<font color="#666666">"gyroscopic polynomial eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>"</font>,&flg);
-<a name="line71"> 71: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GYROSCOPIC); }
-
-<a name="line73"> 73: </a>    PetscOptionsEnum(<font color="#666666">"-pep_scale"</font>,<font color="#666666">"Scaling strategy"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,PEPScaleTypes,(PetscEnum)pep->scale,(PetscEnum*)&pep->scale,NULL);
-
-<a name="line75"> 75: </a>    r = pep->sfactor;
-<a name="line76"> 76: </a>    PetscOptionsReal(<font color="#666666">"-pep_scale_factor"</font>,<font color="#666666">"Scale factor"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,pep->sfactor,&r,&flg1);
-<a name="line77"> 77: </a>    j = pep->sits;
-<a name="line78"> 78: </a>    PetscOptionsInt(<font color="#666666">"-pep_scale_its"</font>,<font color="#666666">"Number of iterations in diagonal scaling"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,pep->sits,&j,&flg2);
-<a name="line79"> 79: </a>    t = pep->slambda;
-<a name="line80"> 80: </a>    PetscOptionsReal(<font color="#666666">"-pep_scale_lambda"</font>,<font color="#666666">"Estimate of eigenvalue (modulus) for diagonal scaling"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,pep->slambda,&t,&flg3);
-<a name="line81"> 81: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line82"> 82: </a>      <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(pep,pep->scale,r,NULL,NULL,j,t);
-<a name="line83"> 83: </a>    }
-
-<a name="line85"> 85: </a>    PetscOptionsEnum(<font color="#666666">"-pep_extract"</font>,<font color="#666666">"Extraction method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>"</font>,PEPExtractTypes,(PetscEnum)pep->extract,(PetscEnum*)&pep->extract,NULL);
-
-<a name="line87"> 87: </a>    PetscOptionsEnum(<font color="#666666">"-pep_refine"</font>,<font color="#666666">"Iterative refinement method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,PEPRefineTypes,(PetscEnum)pep->refine,(PetscEnum*)&pep->refine,NULL);
-
-<a name="line89"> 89: </a>    i = pep->npart;
-<a name="line90"> 90: </a>    PetscOptionsInt(<font color="#666666">"-pep_refine_partitions"</font>,<font color="#666666">"Number of partitions of the communicator for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->npart,&i,&flg1);
-<a name="line91"> 91: </a>    r = pep->rtol;
-<a name="line92"> 92: </a>    PetscOptionsReal(<font color="#666666">"-pep_refine_tol"</font>,<font color="#666666">"Tolerance for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->rtol,&r,&flg2);
-<a name="line93"> 93: </a>    j = pep->rits;
-<a name="line94"> 94: </a>    PetscOptionsInt(<font color="#666666">"-pep_refine_its"</font>,<font color="#666666">"Maximum number of iterations for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->rits,&j,&flg3);
-<a name="line95"> 95: </a>    flg = pep->schur;
-<a name="line96"> 96: </a>    PetscOptionsBool(<font color="#666666">"-pep_refine_schur"</font>,<font color="#666666">"Use Schur complement for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->schur,&flg,&flg4);
-<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3 || flg4) {
-<a name="line98"> 98: </a>      <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(pep,pep->refine,i,r,j,flg);
-<a name="line99"> 99: </a>    }
-
-<a name="line101">101: </a>    i = pep->max_it? pep->max_it: PETSC_DEFAULT;
-<a name="line102">102: </a>    PetscOptionsInt(<font color="#666666">"-pep_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>"</font>,pep->max_it,&i,&flg1);
-<a name="line103">103: </a>    r = pep->tol;
-<a name="line104">104: </a>    PetscOptionsReal(<font color="#666666">"-pep_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>"</font>,pep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:pep->tol,&r,&flg2);
-<a name="line105">105: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line106">106: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,r,i);
-<a name="line107">107: </a>    }
-
-<a name="line109">109: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_conv_eig"</font>,<font color="#666666">"Relative error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_EIG); }
-<a name="line111">111: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_conv_linear"</font>,<font color="#666666">"Convergence test related to the linearized eigenproblem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
-<a name="line112">112: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_LINEAR); }
-<a name="line113">113: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_conv_norm"</font>,<font color="#666666">"Convergence test related to the matrix norms"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
-<a name="line114">114: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_NORM); }
-<a name="line115">115: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_conv_abs"</font>,<font color="#666666">"Absolute error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
-<a name="line116">116: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_ABS); }
-<a name="line117">117: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_conv_user"</font>,<font color="#666666">"User-defined convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
-<a name="line118">118: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_USER); }
-
-<a name="line120">120: </a>    i = pep->nev;
-<a name="line121">121: </a>    PetscOptionsInt(<font color="#666666">"-pep_nev"</font>,<font color="#666666">"Number of eigenvalues to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>"</font>,pep->nev,&i,&flg1);
-<a name="line122">122: </a>    j = pep->ncv? pep->ncv: PETSC_DEFAULT;
-<a name="line123">123: </a>    PetscOptionsInt(<font color="#666666">"-pep_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>"</font>,pep->ncv,&j,&flg2);
-<a name="line124">124: </a>    k = pep->mpd? pep->mpd: PETSC_DEFAULT;
-<a name="line125">125: </a>    PetscOptionsInt(<font color="#666666">"-pep_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>"</font>,pep->mpd,&k,&flg3);
-<a name="line126">126: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line127">127: </a>      <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(pep,i,j,k);
-<a name="line128">128: </a>    }
-
-<a name="line130">130: </a>    PetscOptionsScalar(<font color="#666666">"-pep_target"</font>,<font color="#666666">"Value of the target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>"</font>,pep->target,&s,&flg);
-<a name="line131">131: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line132">132: </a>      <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_MAGNITUDE);
-<a name="line133">133: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(pep,s);
-<a name="line134">134: </a>    }
-
-<a name="line136">136: </a>    PetscOptionsEnum(<font color="#666666">"-pep_basis"</font>,<font color="#666666">"Polynomial basis"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>"</font>,PEPBasisTypes,(PetscEnum)pep->basis,(PetscEnum*)&pep->basis,NULL);
-
-<a name="line138">138: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-<a name="line139">139: </a>    <font color="#B22222">/*</font>
-<a name="line140">140: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>()</font>
-<a name="line141">141: </a><font color="#B22222">    */</font>
-<a name="line142">142: </a>    flg  = PETSC_FALSE;
-<a name="line143">143: </a>    PetscOptionsBool(<font color="#666666">"-pep_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>"</font>,flg,&flg,NULL);
-<a name="line144">144: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line145">145: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(pep);
-<a name="line146">146: </a>    }
-<a name="line147">147: </a>    <font color="#B22222">/*</font>
-<a name="line148">148: </a><font color="#B22222">      Prints approximate eigenvalues and error estimates at each iteration</font>
-<a name="line149">149: </a><font color="#B22222">    */</font>
-<a name="line150">150: </a>    PetscOptionsString(<font color="#666666">"-pep_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line151">151: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line152">152: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)pep),monfilename,&monviewer);
-<a name="line153">153: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,<a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line154">154: </a>    }
-<a name="line155">155: </a>    PetscOptionsString(<font color="#666666">"-pep_monitor_conv"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line156">156: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line157">157: </a>      PetscNew(&ctx);
-<a name="line158">158: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)pep),monfilename,&ctx->viewer);
-<a name="line159">159: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,<a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-<a name="line160">160: </a>    }
-<a name="line161">161: </a>    PetscOptionsString(<font color="#666666">"-pep_monitor_all"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line162">162: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line163">163: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)pep),monfilename,&monviewer);
-<a name="line164">164: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,<a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line165">165: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(pep,PETSC_TRUE);
-<a name="line166">166: </a>    }
-<a name="line167">167: </a>    flg = PETSC_FALSE;
-<a name="line168">168: </a>    PetscOptionsBool(<font color="#666666">"-pep_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line169">169: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line170">170: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,PEPMonitorLG,NULL,NULL);
-<a name="line171">171: </a>    }
-<a name="line172">172: </a>    flg = PETSC_FALSE;
-<a name="line173">173: </a>    PetscOptionsBool(<font color="#666666">"-pep_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line174">174: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line175">175: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,PEPMonitorLGAll,NULL,NULL);
-<a name="line176">176: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(pep,PETSC_TRUE);
-<a name="line177">177: </a>    }
-<a name="line178">178: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-
-<a name="line180">180: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_largest_magnitude"</font>,<font color="#666666">"compute largest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line181">181: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_LARGEST_MAGNITUDE); }
-<a name="line182">182: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_smallest_magnitude"</font>,<font color="#666666">"compute smallest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line183">183: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_SMALLEST_MAGNITUDE); }
-<a name="line184">184: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_largest_real"</font>,<font color="#666666">"compute largest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_LARGEST_REAL); }
-<a name="line186">186: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_smallest_real"</font>,<font color="#666666">"compute smallest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line187">187: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_SMALLEST_REAL); }
-<a name="line188">188: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_largest_imaginary"</font>,<font color="#666666">"compute largest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line189">189: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_LARGEST_IMAGINARY); }
-<a name="line190">190: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_smallest_imaginary"</font>,<font color="#666666">"compute smallest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line191">191: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_SMALLEST_IMAGINARY); }
-<a name="line192">192: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_target_magnitude"</font>,<font color="#666666">"compute nearest eigenvalues to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line193">193: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_MAGNITUDE); }
-<a name="line194">194: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_target_real"</font>,<font color="#666666">"compute eigenvalues with real parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line195">195: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_REAL); }
-<a name="line196">196: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_target_imaginary"</font>,<font color="#666666">"compute eigenvalues with imaginary parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
-<a name="line197">197: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_IMAGINARY); }
-
-<a name="line199">199: </a>    PetscOptionsName(<font color="#666666">"-pep_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPView.html#PEPView">PEPView</a>"</font>,0);
-<a name="line200">200: </a>    PetscOptionsName(<font color="#666666">"-pep_view_vectors"</font>,<font color="#666666">"View computed eigenvectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>"</font>,0);
-<a name="line201">201: </a>    PetscOptionsName(<font color="#666666">"-pep_view_values"</font>,<font color="#666666">"View computed eigenvalues"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>"</font>,0);
-<a name="line202">202: </a>    PetscOptionsName(<font color="#666666">"-pep_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>"</font>,0);
-<a name="line203">203: </a>    PetscOptionsName(<font color="#666666">"-pep_error_absolute"</font>,<font color="#666666">"Print absolute errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>"</font>,0);
-<a name="line204">204: </a>    PetscOptionsName(<font color="#666666">"-pep_error_relative"</font>,<font color="#666666">"Print relative errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>"</font>,0);
-<a name="line205">205: </a>    PetscOptionsName(<font color="#666666">"-pep_error_backward"</font>,<font color="#666666">"Print backward errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>"</font>,0);
-
-<a name="line207">207: </a>    <font color="#4169E1">if</font> (pep->ops->setfromoptions) {
-<a name="line208">208: </a>      (*pep->ops->setfromoptions)(PetscOptionsObject,pep);
+<a name="line65"> 65: </a>  }
+<a name="line66"> 66: </a>  <font color="#4169E1">return</font>(0);
+<a name="line67"> 67: </a>}
+
+<a name="line71"> 71: </a><font color="#B22222">/*@C</font>
+<a name="line72"> 72: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html#PEPConvMonitorSetFromOptions">PEPConvMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line73"> 73: </a><font color="#B22222">   indicated by the user (for monitors that only show iteration numbers of convergence).</font>
+
+<a name="line75"> 75: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line77"> 77: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line78"> 78: </a><font color="#B22222">+  pep      - the polynomial eigensolver context</font>
+<a name="line79"> 79: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line80"> 80: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line81"> 81: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line82"> 82: </a><font color="#B22222">-  monitor  - the monitor function, whose context is a SlepcConvMonitor</font>
+
+<a name="line84"> 84: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line86"> 86: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(), <a href="../../../docs/manualpages/PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</a>()</font>
+<a name="line87"> 87: </a><font color="#B22222">@*/</font>
+<a name="line88"> 88: </a><strong><font color="#4169E1"><a name="PEPConvMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html#PEPConvMonitorSetFromOptions">PEPConvMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,Pet [...]
+<a name="line89"> 89: </a>{
+<a name="line90"> 90: </a>  PetscErrorCode    ierr;
+<a name="line91"> 91: </a>  PetscBool         flg;
+<a name="line92"> 92: </a>  PetscViewer       viewer;
+<a name="line93"> 93: </a>  PetscViewerFormat format;
+<a name="line94"> 94: </a>  SlepcConvMonitor  ctx;
+
+<a name="line97"> 97: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,name,&viewer,&format,&flg);
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line99"> 99: </a>    <a href="../../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(viewer,format,&ctx);
+<a name="line100">100: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line101">101: </a>    <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,(PetscErrorCode (*)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))<a href="../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>);
+<a name="line102">102: </a>  }
+<a name="line103">103: </a>  <font color="#4169E1">return</font>(0);
+<a name="line104">104: </a>}
+
+<a name="line108">108: </a><font color="#B22222">/*@</font>
+<a name="line109">109: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a> - Sets <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options from the options database.</font>
+<a name="line110">110: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>() if the user is to be</font>
+<a name="line111">111: </a><font color="#B22222">   allowed to set the solver type.</font>
+
+<a name="line113">113: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line115">115: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line116">116: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line118">118: </a><font color="#B22222">   Notes:</font>
+<a name="line119">119: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line121">121: </a><font color="#B22222">   Level: beginner</font>
+<a name="line122">122: </a><font color="#B22222">@*/</font>
+<a name="line123">123: </a><strong><font color="#4169E1"><a name="PEPSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line124">124: </a>{
+<a name="line126">126: </a>  char           type[256];
+<a name="line127">127: </a>  PetscBool      set,flg,flg1,flg2,flg3;
+<a name="line128">128: </a>  PetscReal      r,t;
+<a name="line129">129: </a>  PetscScalar    s;
+<a name="line130">130: </a>  PetscInt       i,j,k;
+<a name="line131">131: </a>  PetscDrawLG    lg;
+
+<a name="line135">135: </a>  <a href="../../../docs/manualpages/PEP/PEPRegisterAll.html#PEPRegisterAll">PEPRegisterAll</a>();
+<a name="line136">136: </a>  PetscObjectOptionsBegin((PetscObject)pep);
+<a name="line137">137: </a>    PetscOptionsFList(<font color="#666666">"-pep_type"</font>,<font color="#666666">"Polynomial Eigenvalue Problem method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>"</font>,PEPList,(char*)(((PetscObject)pep)->type_name?((PetscObject)pep)->type_name:PEPTOAR),type,256,&flg);
+<a name="line138">138: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line139">139: </a>      <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,type);
+<a name="line140">140: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!((PetscObject)pep)->type_name) {
+<a name="line141">141: </a>      <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,PEPTOAR);
+<a name="line142">142: </a>    }
+
+<a name="line144">144: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_general"</font>,<font color="#666666">"general polynomial eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>"</font>,&flg);
+<a name="line145">145: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL); }
+<a name="line146">146: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_hermitian"</font>,<font color="#666666">"hermitian polynomial eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>"</font>,&flg);
+<a name="line147">147: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_HERMITIAN); }
+<a name="line148">148: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_gyroscopic"</font>,<font color="#666666">"gyroscopic polynomial eigenvalue problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>"</font>,&flg);
+<a name="line149">149: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GYROSCOPIC); }
+
+<a name="line151">151: </a>    PetscOptionsEnum(<font color="#666666">"-pep_scale"</font>,<font color="#666666">"Scaling strategy"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,PEPScaleTypes,(PetscEnum)pep->scale,(PetscEnum*)&pep->scale,NULL);
+
+<a name="line153">153: </a>    r = pep->sfactor;
+<a name="line154">154: </a>    PetscOptionsReal(<font color="#666666">"-pep_scale_factor"</font>,<font color="#666666">"Scale factor"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,pep->sfactor,&r,&flg1);
+<a name="line155">155: </a>    j = pep->sits;
+<a name="line156">156: </a>    PetscOptionsInt(<font color="#666666">"-pep_scale_its"</font>,<font color="#666666">"Number of iterations in diagonal scaling"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,pep->sits,&j,&flg2);
+<a name="line157">157: </a>    t = pep->slambda;
+<a name="line158">158: </a>    PetscOptionsReal(<font color="#666666">"-pep_scale_lambda"</font>,<font color="#666666">"Estimate of eigenvalue (modulus) for diagonal scaling"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>"</font>,pep->slambda,&t,&flg3);
+<a name="line159">159: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line160">160: </a>      <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(pep,pep->scale,r,NULL,NULL,j,t);
+<a name="line161">161: </a>    }
+
+<a name="line163">163: </a>    PetscOptionsEnum(<font color="#666666">"-pep_extract"</font>,<font color="#666666">"Extraction method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>"</font>,PEPExtractTypes,(PetscEnum)pep->extract,(PetscEnum*)&pep->extract,NULL);
+
+<a name="line165">165: </a>    PetscOptionsEnum(<font color="#666666">"-pep_refine"</font>,<font color="#666666">"Iterative refinement method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,PEPRefineTypes,(PetscEnum)pep->refine,(PetscEnum*)&pep->refine,NULL);
+
+<a name="line167">167: </a>    i = pep->npart;
+<a name="line168">168: </a>    PetscOptionsInt(<font color="#666666">"-pep_refine_partitions"</font>,<font color="#666666">"Number of partitions of the communicator for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->npart,&i,&flg1);
+<a name="line169">169: </a>    r = pep->rtol;
+<a name="line170">170: </a>    PetscOptionsReal(<font color="#666666">"-pep_refine_tol"</font>,<font color="#666666">"Tolerance for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->rtol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/1000:pep->rtol,&r,&flg2);
+<a name="line171">171: </a>    j = pep->rits;
+<a name="line172">172: </a>    PetscOptionsInt(<font color="#666666">"-pep_refine_its"</font>,<font color="#666666">"Maximum number of iterations for iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,pep->rits,&j,&flg3);
+<a name="line173">173: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line174">174: </a>      <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(pep,pep->refine,i,r,j,pep->scheme);
+<a name="line175">175: </a>    }
+
+<a name="line177">177: </a>    PetscOptionsEnum(<font color="#666666">"-pep_refine_scheme"</font>,<font color="#666666">"Scheme used for linear systems within iterative refinement"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>"</font>,PEPRefineSchemes,(PetscEnum)pep->scheme,(PetscEnum*)&pep->scheme,NULL);
+
+<a name="line179">179: </a>    i = pep->max_it? pep->max_it: PETSC_DEFAULT;
+<a name="line180">180: </a>    PetscOptionsInt(<font color="#666666">"-pep_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>"</font>,pep->max_it,&i,&flg1);
+<a name="line181">181: </a>    r = pep->tol;
+<a name="line182">182: </a>    PetscOptionsReal(<font color="#666666">"-pep_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>"</font>,pep->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:pep->tol,&r,&flg2);
+<a name="line183">183: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line184">184: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(pep,r,i);
+<a name="line185">185: </a>    }
+
+<a name="line187">187: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_conv_rel"</font>,<font color="#666666">"Relative error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line188">188: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_REL); }
+<a name="line189">189: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_conv_norm"</font>,<font color="#666666">"Convergence test relative to the matrix norms"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line190">190: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_NORM); }
+<a name="line191">191: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_conv_abs"</font>,<font color="#666666">"Absolute error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line192">192: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_ABS); }
+<a name="line193">193: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_conv_user"</font>,<font color="#666666">"User-defined convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>"</font>,&flg);
+<a name="line194">194: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(pep,PEP_CONV_USER); }
+
+<a name="line196">196: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_stop_basic"</font>,<font color="#666666">"Stop iteration if all eigenvalues converged or max_it reached"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>"</font>,&flg);
+<a name="line197">197: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(pep,PEP_STOP_BASIC); }
+<a name="line198">198: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_stop_user"</font>,<font color="#666666">"User-defined stopping test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>"</font>,&flg);
+<a name="line199">199: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(pep,PEP_STOP_USER); }
+
+<a name="line201">201: </a>    i = pep->nev;
+<a name="line202">202: </a>    PetscOptionsInt(<font color="#666666">"-pep_nev"</font>,<font color="#666666">"Number of eigenvalues to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>"</font>,pep->nev,&i,&flg1);
+<a name="line203">203: </a>    j = pep->ncv? pep->ncv: PETSC_DEFAULT;
+<a name="line204">204: </a>    PetscOptionsInt(<font color="#666666">"-pep_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>"</font>,pep->ncv,&j,&flg2);
+<a name="line205">205: </a>    k = pep->mpd? pep->mpd: PETSC_DEFAULT;
+<a name="line206">206: </a>    PetscOptionsInt(<font color="#666666">"-pep_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>"</font>,pep->mpd,&k,&flg3);
+<a name="line207">207: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line208">208: </a>      <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(pep,i,j,k);
 <a name="line209">209: </a>    }
-<a name="line210">210: </a>    PetscObjectProcessOptionsHandlers((PetscObject)pep);
-<a name="line211">211: </a>  PetscOptionsEnd();
-
-<a name="line213">213: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
-<a name="line214">214: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(pep->V);
-<a name="line215">215: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
-<a name="line216">216: </a>  <a href="../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(pep->rg);
-<a name="line217">217: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
-<a name="line218">218: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(pep->ds);
-<a name="line219">219: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
-<a name="line220">220: </a>  <a href="../../../docs/manualpages/ST/STSetFromOptions.html#STSetFromOptions">STSetFromOptions</a>(pep->st);
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (!pep->refineksp) { <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&pep->refineksp); }
-<a name="line222">222: </a>  KSPSetFromOptions(pep->refineksp);
-<a name="line223">223: </a>  PetscRandomSetFromOptions(pep->rand);
-<a name="line224">224: </a>  <font color="#4169E1">return</font>(0);
-<a name="line225">225: </a>}
-
-<a name="line229">229: </a><font color="#B22222">/*@</font>
-<a name="line230">230: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
-<a name="line231">231: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> convergence tests.</font>
-
-<a name="line233">233: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line235">235: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line236">236: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line238">238: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line239">239: </a><font color="#B22222">+  tol - the convergence tolerance</font>
-<a name="line240">240: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
-
-<a name="line242">242: </a><font color="#B22222">   Notes:</font>
-<a name="line243">243: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line245">245: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line247">247: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>()</font>
-<a name="line248">248: </a><font color="#B22222">@*/</font>
-<a name="line249">249: </a><strong><font color="#4169E1"><a name="PEPGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *tol,PetscInt *maxits)</font></strong>
-<a name="line250">250: </a>{
-<a name="line253">253: </a>  <font color="#4169E1">if</font> (tol)    *tol    = pep->tol;
-<a name="line254">254: </a>  <font color="#4169E1">if</font> (maxits) *maxits = pep->max_it;
-<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
-<a name="line256">256: </a>}
-
-<a name="line260">260: </a><font color="#B22222">/*@</font>
-<a name="line261">261: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
-<a name="line262">262: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> convergence tests.</font>
-
-<a name="line264">264: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line266">266: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line267">267: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
-<a name="line268">268: </a><font color="#B22222">.  tol - the convergence tolerance</font>
-<a name="line269">269: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
-
-<a name="line271">271: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line272">272: </a><font color="#B22222">+  -pep_tol <tol> - Sets the convergence tolerance</font>
-<a name="line273">273: </a><font color="#B22222">-  -pep_max_it <maxits> - Sets the maximum number of iterations allowed</font>
-
-<a name="line275">275: </a><font color="#B22222">   Notes:</font>
-<a name="line276">276: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
-
-<a name="line278">278: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line280">280: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>()</font>
-<a name="line281">281: </a><font color="#B22222">@*/</font>
-<a name="line282">282: </a><strong><font color="#4169E1"><a name="PEPSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal tol,PetscInt maxits)</font></strong>
-<a name="line283">283: </a>{
-<a name="line288">288: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
-<a name="line289">289: </a>    pep->tol   = PETSC_DEFAULT;
-<a name="line290">290: </a>    pep->state = PEP_STATE_INITIAL;
-<a name="line291">291: </a>  } <font color="#4169E1">else</font> {
-<a name="line292">292: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
-<a name="line293">293: </a>    pep->tol = tol;
-<a name="line294">294: </a>  }
-<a name="line295">295: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
-<a name="line296">296: </a>    pep->max_it = 0;
-<a name="line297">297: </a>    pep->state  = PEP_STATE_INITIAL;
-<a name="line298">298: </a>  } <font color="#4169E1">else</font> {
-<a name="line299">299: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
-<a name="line300">300: </a>    pep->max_it = maxits;
-<a name="line301">301: </a>  }
-<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
-<a name="line303">303: </a>}
-
-<a name="line307">307: </a><font color="#B22222">/*@</font>
-<a name="line308">308: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a> - Gets the number of eigenvalues to compute</font>
-<a name="line309">309: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line311">311: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line313">313: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line314">314: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line316">316: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line317">317: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
-<a name="line318">318: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line319">319: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line321">321: </a><font color="#B22222">   Notes:</font>
-<a name="line322">322: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line324">324: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line326">326: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>()</font>
-<a name="line327">327: </a><font color="#B22222">@*/</font>
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="PEPGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line329">329: </a>{
-<a name="line332">332: </a>  <font color="#4169E1">if</font> (nev) *nev = pep->nev;
-<a name="line333">333: </a>  <font color="#4169E1">if</font> (ncv) *ncv = pep->ncv;
-<a name="line334">334: </a>  <font color="#4169E1">if</font> (mpd) *mpd = pep->mpd;
-<a name="line335">335: </a>  <font color="#4169E1">return</font>(0);
-<a name="line336">336: </a>}
-
-<a name="line340">340: </a><font color="#B22222">/*@</font>
-<a name="line341">341: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a> - Sets the number of eigenvalues to compute</font>
-<a name="line342">342: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line344">344: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line346">346: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line347">347: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
-<a name="line348">348: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
-<a name="line349">349: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line350">350: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line352">352: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line353">353: </a><font color="#B22222">+  -pep_nev <nev> - Sets the number of eigenvalues</font>
-<a name="line354">354: </a><font color="#B22222">.  -pep_ncv <ncv> - Sets the dimension of the subspace</font>
-<a name="line355">355: </a><font color="#B22222">-  -pep_mpd <mpd> - Sets the maximum projected dimension</font>
-
-<a name="line357">357: </a><font color="#B22222">   Notes:</font>
-<a name="line358">358: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
-<a name="line359">359: </a><font color="#B22222">   dependent on the solution method.</font>
-
-<a name="line361">361: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
-<a name="line362">362: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
-<a name="line363">363: </a><font color="#B22222">   (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and</font>
-<a name="line364">364: </a><font color="#B22222">   (b) in cases where nev is large, the user sets mpd.</font>
-
-<a name="line366">366: </a><font color="#B22222">   The value of ncv should always be between nev and (nev+mpd), typically</font>
-<a name="line367">367: </a><font color="#B22222">   ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise</font>
-<a name="line368">368: </a><font color="#B22222">   a smaller value should be used.</font>
-
-<a name="line370">370: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line372">372: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>()</font>
-<a name="line373">373: </a><font color="#B22222">@*/</font>
-<a name="line374">374: </a><strong><font color="#4169E1"><a name="PEPSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
-<a name="line375">375: </a>{
-<a name="line381">381: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
-<a name="line382">382: </a>  pep->nev = nev;
-<a name="line383">383: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
-<a name="line384">384: </a>    pep->ncv = 0;
-<a name="line385">385: </a>  } <font color="#4169E1">else</font> {
-<a name="line386">386: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
-<a name="line387">387: </a>    pep->ncv = ncv;
-<a name="line388">388: </a>  }
-<a name="line389">389: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
-<a name="line390">390: </a>    pep->mpd = 0;
-<a name="line391">391: </a>  } <font color="#4169E1">else</font> {
-<a name="line392">392: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
-<a name="line393">393: </a>    pep->mpd = mpd;
-<a name="line394">394: </a>  }
-<a name="line395">395: </a>  pep->state = PEP_STATE_INITIAL;
-<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
-<a name="line397">397: </a>}
-
-<a name="line401">401: </a><font color="#B22222">/*@</font>
-<a name="line402">402: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a> - Specifies which portion of the spectrum is</font>
-<a name="line403">403: </a><font color="#B22222">   to be sought.</font>
-
-<a name="line405">405: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line407">407: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line408">408: </a><font color="#B22222">+  pep   - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line409">409: </a><font color="#B22222">-  which - the portion of the spectrum to be sought</font>
-
-<a name="line411">411: </a><font color="#B22222">   Possible values:</font>
-<a name="line412">412: </a><font color="#B22222">   The parameter 'which' can have one of these values</font>
-
-<a name="line414">414: </a><font color="#B22222">+     PEP_LARGEST_MAGNITUDE - largest eigenvalues in magnitude (default)</font>
-<a name="line415">415: </a><font color="#B22222">.     PEP_SMALLEST_MAGNITUDE - smallest eigenvalues in magnitude</font>
-<a name="line416">416: </a><font color="#B22222">.     PEP_LARGEST_REAL - largest real parts</font>
-<a name="line417">417: </a><font color="#B22222">.     PEP_SMALLEST_REAL - smallest real parts</font>
-<a name="line418">418: </a><font color="#B22222">.     PEP_LARGEST_IMAGINARY - largest imaginary parts</font>
-<a name="line419">419: </a><font color="#B22222">.     PEP_SMALLEST_IMAGINARY - smallest imaginary parts</font>
-<a name="line420">420: </a><font color="#B22222">.     PEP_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)</font>
-<a name="line421">421: </a><font color="#B22222">.     PEP_TARGET_REAL - eigenvalues with real part closest to target</font>
-<a name="line422">422: </a><font color="#B22222">.     PEP_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target</font>
-<a name="line423">423: </a><font color="#B22222">-     PEP_WHICH_USER - user defined ordering set with <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>()</font>
-
-<a name="line425">425: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line426">426: </a><font color="#B22222">+   -pep_largest_magnitude - Sets largest eigenvalues in magnitude</font>
-<a name="line427">427: </a><font color="#B22222">.   -pep_smallest_magnitude - Sets smallest eigenvalues in magnitude</font>
-<a name="line428">428: </a><font color="#B22222">.   -pep_largest_real - Sets largest real parts</font>
-<a name="line429">429: </a><font color="#B22222">.   -pep_smallest_real - Sets smallest real parts</font>
-<a name="line430">430: </a><font color="#B22222">.   -pep_largest_imaginary - Sets largest imaginary parts</font>
-<a name="line431">431: </a><font color="#B22222">.   -pep_smallest_imaginary - Sets smallest imaginary parts</font>
-<a name="line432">432: </a><font color="#B22222">.   -pep_target_magnitude - Sets eigenvalues closest to target</font>
-<a name="line433">433: </a><font color="#B22222">.   -pep_target_real - Sets real parts closest to target</font>
-<a name="line434">434: </a><font color="#B22222">-   -pep_target_imaginary - Sets imaginary parts closest to target</font>
-
-<a name="line436">436: </a><font color="#B22222">   Notes:</font>
-<a name="line437">437: </a><font color="#B22222">   Not all eigensolvers implemented in <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> account for all the possible values</font>
-<a name="line438">438: </a><font color="#B22222">   stated above. If SLEPc is compiled for real numbers PEP_LARGEST_IMAGINARY</font>
-<a name="line439">439: </a><font color="#B22222">   and PEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part</font>
-<a name="line440">440: </a><font color="#B22222">   for eigenvalue selection.</font>
-
-<a name="line442">442: </a><font color="#B22222">   The target is a scalar value provided with <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>().</font>
-
-<a name="line444">444: </a><font color="#B22222">   The criterion PEP_TARGET_IMAGINARY is available only in case PETSc and</font>
-<a name="line445">445: </a><font color="#B22222">   SLEPc have been built with complex scalars.</font>
-
-<a name="line447">447: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line449">449: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(), <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>(), <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a></font>
-<a name="line450">450: </a><font color="#B22222">@*/</font>
-<a name="line451">451: </a><strong><font color="#4169E1"><a name="PEPSetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a> which)</font></strong>
-<a name="line452">452: </a>{
-<a name="line456">456: </a>  <font color="#4169E1">switch</font> (which) {
-<a name="line457">457: </a>    <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:
-<a name="line458">458: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE:
-<a name="line459">459: </a>    <font color="#4169E1">case</font> PEP_LARGEST_REAL:
-<a name="line460">460: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_REAL:
-<a name="line461">461: </a>    <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:
-<a name="line462">462: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY:
-<a name="line463">463: </a>    <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:
-<a name="line464">464: </a>    <font color="#4169E1">case</font> PEP_TARGET_REAL:
-<a name="line465">465: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line466">466: </a>    <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:
-<a name="line467">467: </a><font color="#A020F0">#endif</font>
-<a name="line468">468: </a>    <font color="#4169E1">case</font> PEP_WHICH_USER:
-<a name="line469">469: </a>      <font color="#4169E1">if</font> (pep->which != which) {
-<a name="line470">470: </a>        pep->state = PEP_STATE_INITIAL;
-<a name="line471">471: </a>        pep->which = which;
-<a name="line472">472: </a>      }
-<a name="line473">473: </a>      <font color="#4169E1">break</font>;
-<a name="line474">474: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line475">475: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' value"</font>);
-<a name="line476">476: </a>  }
-<a name="line477">477: </a>  <font color="#4169E1">return</font>(0);
-<a name="line478">478: </a>}
-
-<a name="line482">482: </a><font color="#B22222">/*@</font>
-<a name="line483">483: </a><font color="#B22222">    <a href="../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a> - Returns which portion of the spectrum is to be</font>
-<a name="line484">484: </a><font color="#B22222">    sought.</font>
-
-<a name="line486">486: </a><font color="#B22222">    Not Collective</font>
-
-<a name="line488">488: </a><font color="#B22222">    Input Parameter:</font>
-<a name="line489">489: </a><font color="#B22222">.   pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-
-<a name="line491">491: </a><font color="#B22222">    Output Parameter:</font>
-<a name="line492">492: </a><font color="#B22222">.   which - the portion of the spectrum to be sought</font>
-
-<a name="line494">494: </a><font color="#B22222">    Notes:</font>
-<a name="line495">495: </a><font color="#B22222">    See <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>() for possible values of 'which'.</font>
-
-<a name="line497">497: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line499">499: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a></font>
-<a name="line500">500: </a><font color="#B22222">@*/</font>
-<a name="line501">501: </a><strong><font color="#4169E1"><a name="PEPGetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a> *which)</font></strong>
-<a name="line502">502: </a>{
-<a name="line506">506: </a>  *which = pep->which;
-<a name="line507">507: </a>  <font color="#4169E1">return</font>(0);
-<a name="line508">508: </a>}
-
-<a name="line512">512: </a><font color="#B22222">/*@C</font>
-<a name="line513">513: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a> - Specifies the eigenvalue comparison function</font>
-<a name="line514">514: </a><font color="#B22222">   when <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>() is set to PEP_WHICH_USER.</font>
-
-<a name="line516">516: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line518">518: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line519">519: </a><font color="#B22222">+  pep  - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line520">520: </a><font color="#B22222">.  func - a pointer to the comparison function</font>
-<a name="line521">521: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the comparison function)</font>
-
-<a name="line523">523: </a><font color="#B22222">   Calling Sequence of func:</font>
-<a name="line524">524: </a><font color="#B22222">$   func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)</font>
-
-<a name="line526">526: </a><font color="#B22222">+   ar     - real part of the 1st eigenvalue</font>
-<a name="line527">527: </a><font color="#B22222">.   ai     - imaginary part of the 1st eigenvalue</font>
-<a name="line528">528: </a><font color="#B22222">.   br     - real part of the 2nd eigenvalue</font>
-<a name="line529">529: </a><font color="#B22222">.   bi     - imaginary part of the 2nd eigenvalue</font>
-<a name="line530">530: </a><font color="#B22222">.   res    - result of comparison</font>
-<a name="line531">531: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>()</font>
-
-<a name="line533">533: </a><font color="#B22222">   Note:</font>
-<a name="line534">534: </a><font color="#B22222">   The returning parameter 'res' can be:</font>
-<a name="line535">535: </a><font color="#B22222">+  negative - if the 1st eigenvalue is preferred to the 2st one</font>
-<a name="line536">536: </a><font color="#B22222">.  zero     - if both eigenvalues are equally preferred</font>
-<a name="line537">537: </a><font color="#B22222">-  positive - if the 2st eigenvalue is preferred to the 1st one</font>
-
-<a name="line539">539: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line541">541: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a></font>
-<a name="line542">542: </a><font color="#B22222">@*/</font>
-<a name="line543">543: </a><strong><font color="#4169E1"><a name="PEPSetEigenvalueComparison"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)</font></strong>
-<a name="line544">544: </a>{
-<a name="line547">547: </a>  pep->sc->comparison    = func;
-<a name="line548">548: </a>  pep->sc->comparisonctx = ctx;
-<a name="line549">549: </a>  pep->which             = PEP_WHICH_USER;
-<a name="line550">550: </a>  <font color="#4169E1">return</font>(0);
-<a name="line551">551: </a>}
-
-<a name="line555">555: </a><font color="#B22222">/*@</font>
-<a name="line556">556: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a> - Specifies the type of the polynomial eigenvalue problem.</font>
-
-<a name="line558">558: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line560">560: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line561">561: </a><font color="#B22222">+  pep  - the polynomial eigensolver context</font>
-<a name="line562">562: </a><font color="#B22222">-  type - a known type of polynomial eigenvalue problem</font>
-
-<a name="line564">564: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line565">565: </a><font color="#B22222">+  -pep_general - general problem with no particular structure</font>
-<a name="line566">566: </a><font color="#B22222">.  -pep_hermitian - problem whose coefficient matrices are Hermitian</font>
-<a name="line567">567: </a><font color="#B22222">-  -pep_gyroscopic - problem with Hamiltonian structure</font>
-
-<a name="line569">569: </a><font color="#B22222">   Notes:</font>
-<a name="line570">570: </a><font color="#B22222">   Allowed values for the problem type are: general (PEP_GENERAL), Hermitian</font>
-<a name="line571">571: </a><font color="#B22222">   (PEP_HERMITIAN), and gyroscopic (PEP_GYROSCOPIC).</font>
-
-<a name="line573">573: </a><font color="#B22222">   This function is used to instruct SLEPc to exploit certain structure in</font>
-<a name="line574">574: </a><font color="#B22222">   the polynomial eigenproblem. By default, no particular structure is assumed.</font>
-
-<a name="line576">576: </a><font color="#B22222">   If the problem matrices are Hermitian (symmetric in the real case) or</font>
-<a name="line577">577: </a><font color="#B22222">   Hermitian/skew-Hermitian then the solver can exploit this fact to perform</font>
-<a name="line578">578: </a><font color="#B22222">   less operations or provide better stability.</font>
-
-<a name="line580">580: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line582">582: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(), <a href="../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(), <a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a></font>
-<a name="line583">583: </a><font color="#B22222">@*/</font>
-<a name="line584">584: </a><strong><font color="#4169E1"><a name="PEPSetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a> type)</font></strong>
-<a name="line585">585: </a>{
-<a name="line589">589: </a>  <font color="#4169E1">if</font> (type!=PEP_GENERAL && type!=PEP_HERMITIAN && type!=PEP_GYROSCOPIC) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown eigenvalue problem type"</font>);
-<a name="line590">590: </a>  pep->problem_type = type;
-<a name="line591">591: </a>  <font color="#4169E1">return</font>(0);
-<a name="line592">592: </a>}
-
-<a name="line596">596: </a><font color="#B22222">/*@</font>
-<a name="line597">597: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a> - Gets the problem type from the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.</font>
-
-<a name="line599">599: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line601">601: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line602">602: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line604">604: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line605">605: </a><font color="#B22222">.  type - name of <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> problem type</font>
 
-<a name="line607">607: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line609">609: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(), <a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a></font>
+<a name="line211">211: </a>    PetscOptionsScalar(<font color="#666666">"-pep_target"</font>,<font color="#666666">"Value of the target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>"</font>,pep->target,&s,&flg);
+<a name="line212">212: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line213">213: </a>      <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_MAGNITUDE);
+<a name="line214">214: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(pep,s);
+<a name="line215">215: </a>    }
+
+<a name="line217">217: </a>    PetscOptionsEnum(<font color="#666666">"-pep_basis"</font>,<font color="#666666">"Polynomial basis"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>"</font>,PEPBasisTypes,(PetscEnum)pep->basis,(PetscEnum*)&pep->basis,NULL);
+
+<a name="line219">219: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+<a name="line220">220: </a>    <font color="#B22222">/*</font>
+<a name="line221">221: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a>()</font>
+<a name="line222">222: </a><font color="#B22222">    */</font>
+<a name="line223">223: </a>    PetscOptionsBool(<font color="#666666">"-pep_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line224">224: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line225">225: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorCancel.html#PEPMonitorCancel">PEPMonitorCancel</a>(pep);
+<a name="line226">226: </a>    }
+<a name="line227">227: </a>    <font color="#B22222">/*</font>
+<a name="line228">228: </a><font color="#B22222">      Text monitors</font>
+<a name="line229">229: </a><font color="#B22222">    */</font>
+<a name="line230">230: </a>    <a href="../../../docs/manualpages/PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</a>(pep,<font color="#666666">"-pep_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate eigenvalue and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PEPMonitorFirst">PEPMonitorFirst</a>"</font>,<a href="../../../docs/manualpages/PEP/PEPMonitorFirst.html#PE [...]
+<a name="line231">231: </a>    <a href="../../../docs/manualpages/PEP/PEPConvMonitorSetFromOptions.html#PEPConvMonitorSetFromOptions">PEPConvMonitorSetFromOptions</a>(pep,<font color="#666666">"-pep_monitor_conv"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorConverged.html#PEPMonitorConverged">PEPMonitorConverged</a>"</font>,<a href="../../../docs/manualpag [...]
+<a name="line232">232: </a>    <a href="../../../docs/manualpages/PEP/PEPMonitorSetFromOptions.html#PEPMonitorSetFromOptions">PEPMonitorSetFromOptions</a>(pep,<font color="#666666">"-pep_monitor_all"</font>,<font color="#666666">"Monitor approximate eigenvalues and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMonitorAll</a>"</font>,<a href="../../../docs/manualpages/PEP/PEPMonitorAll.html#PEPMonitorAll">PEPMoni [...]
+<a name="line233">233: </a>    <font color="#B22222">/*</font>
+<a name="line234">234: </a><font color="#B22222">      Line graph monitors</font>
+<a name="line235">235: </a><font color="#B22222">    */</font>
+<a name="line236">236: </a>    PetscOptionsBool(<font color="#666666">"-pep_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line237">237: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line238">238: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorLGCreate.html#PEPMonitorLGCreate">PEPMonitorLGCreate</a>(PetscObjectComm((PetscObject)pep),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line239">239: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,PEPMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line240">240: </a>    }
+<a name="line241">241: </a>    PetscOptionsBool(<font color="#666666">"-pep_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line242">242: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line243">243: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorLGCreate.html#PEPMonitorLGCreate">PEPMonitorLGCreate</a>(PetscObjectComm((PetscObject)pep),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line244">244: </a>      <a href="../../../docs/manualpages/PEP/PEPMonitorSet.html#PEPMonitorSet">PEPMonitorSet</a>(pep,PEPMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line245">245: </a>      <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(pep,PETSC_TRUE);
+<a name="line246">246: </a>    }
+<a name="line247">247: </a>  <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+
+<a name="line249">249: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-pep_largest_magnitude"</font>,<font color="#666666">"compute largest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line250">250: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_LARGEST_MAGNITUDE); }
+<a name="line251">251: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_smallest_magnitude"</font>,<font color="#666666">"compute smallest eigenvalues in magnitude"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line252">252: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_SMALLEST_MAGNITUDE); }
+<a name="line253">253: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_largest_real"</font>,<font color="#666666">"compute largest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line254">254: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_LARGEST_REAL); }
+<a name="line255">255: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_smallest_real"</font>,<font color="#666666">"compute smallest real parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line256">256: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_SMALLEST_REAL); }
+<a name="line257">257: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_largest_imaginary"</font>,<font color="#666666">"compute largest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line258">258: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_LARGEST_IMAGINARY); }
+<a name="line259">259: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_smallest_imaginary"</font>,<font color="#666666">"compute smallest imaginary parts"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line260">260: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_SMALLEST_IMAGINARY); }
+<a name="line261">261: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_target_magnitude"</font>,<font color="#666666">"compute nearest eigenvalues to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line262">262: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_MAGNITUDE); }
+<a name="line263">263: </a>    PetscOptionsBoolGroup(<font color="#666666">"-pep_target_real"</font>,<font color="#666666">"compute eigenvalues with real parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line264">264: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_REAL); }
+<a name="line265">265: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-pep_target_imaginary"</font>,<font color="#666666">"compute eigenvalues with imaginary parts close to target"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>"</font>,&flg);
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(pep,PEP_TARGET_IMAGINARY); }
+
+<a name="line268">268: </a>    PetscOptionsName(<font color="#666666">"-pep_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPView.html#PEPView">PEPView</a>"</font>,NULL);
+<a name="line269">269: </a>    PetscOptionsName(<font color="#666666">"-pep_view_vectors"</font>,<font color="#666666">"View computed eigenvectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>"</font>,NULL);
+<a name="line270">270: </a>    PetscOptionsName(<font color="#666666">"-pep_view_values"</font>,<font color="#666666">"View computed eigenvalues"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>"</font>,NULL);
+<a name="line271">271: </a>    PetscOptionsName(<font color="#666666">"-pep_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>"</font>,NULL);
+<a name="line272">272: </a>    PetscOptionsName(<font color="#666666">"-pep_error_absolute"</font>,<font color="#666666">"Print absolute errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>"</font>,NULL);
+<a name="line273">273: </a>    PetscOptionsName(<font color="#666666">"-pep_error_relative"</font>,<font color="#666666">"Print relative errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>"</font>,NULL);
+<a name="line274">274: </a>    PetscOptionsName(<font color="#666666">"-pep_error_backward"</font>,<font color="#666666">"Print backward errors of each eigenpair"</font>,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>"</font>,NULL);
+
+<a name="line276">276: </a>    <font color="#4169E1">if</font> (pep->ops->setfromoptions) {
+<a name="line277">277: </a>      (*pep->ops->setfromoptions)(PetscOptionsObject,pep);
+<a name="line278">278: </a>    }
+<a name="line279">279: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)pep);
+<a name="line280">280: </a>  PetscOptionsEnd();
+
+<a name="line282">282: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
+<a name="line283">283: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(pep->V);
+<a name="line284">284: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
+<a name="line285">285: </a>  <a href="../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(pep->rg);
+<a name="line286">286: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
+<a name="line287">287: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(pep->ds);
+<a name="line288">288: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
+<a name="line289">289: </a>  <a href="../../../docs/manualpages/ST/STSetFromOptions.html#STSetFromOptions">STSetFromOptions</a>(pep->st);
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (!pep->refineksp) { <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&pep->refineksp); }
+<a name="line291">291: </a>  KSPSetFromOptions(pep->refineksp);
+<a name="line292">292: </a>  <font color="#4169E1">return</font>(0);
+<a name="line293">293: </a>}
+
+<a name="line297">297: </a><font color="#B22222">/*@</font>
+<a name="line298">298: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a> - Gets the tolerance and maximum iteration count used</font>
+<a name="line299">299: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> convergence tests.</font>
+
+<a name="line301">301: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line303">303: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line304">304: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line306">306: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line307">307: </a><font color="#B22222">+  tol - the convergence tolerance</font>
+<a name="line308">308: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
+
+<a name="line310">310: </a><font color="#B22222">   Notes:</font>
+<a name="line311">311: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line313">313: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line315">315: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>()</font>
+<a name="line316">316: </a><font color="#B22222">@*/</font>
+<a name="line317">317: </a><strong><font color="#4169E1"><a name="PEPGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line318">318: </a>{
+<a name="line321">321: </a>  <font color="#4169E1">if</font> (tol)    *tol    = pep->tol;
+<a name="line322">322: </a>  <font color="#4169E1">if</font> (maxits) *maxits = pep->max_it;
+<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
+<a name="line324">324: </a>}
+
+<a name="line328">328: </a><font color="#B22222">/*@</font>
+<a name="line329">329: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a> - Sets the tolerance and maximum iteration count used</font>
+<a name="line330">330: </a><font color="#B22222">   by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> convergence tests.</font>
+
+<a name="line332">332: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line334">334: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line335">335: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
+<a name="line336">336: </a><font color="#B22222">.  tol - the convergence tolerance</font>
+<a name="line337">337: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
+
+<a name="line339">339: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line340">340: </a><font color="#B22222">+  -pep_tol <tol> - Sets the convergence tolerance</font>
+<a name="line341">341: </a><font color="#B22222">-  -pep_max_it <maxits> - Sets the maximum number of iterations allowed</font>
+
+<a name="line343">343: </a><font color="#B22222">   Notes:</font>
+<a name="line344">344: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
+
+<a name="line346">346: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line348">348: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetTolerances.html#PEPGetTolerances">PEPGetTolerances</a>()</font>
+<a name="line349">349: </a><font color="#B22222">@*/</font>
+<a name="line350">350: </a><strong><font color="#4169E1"><a name="PEPSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line351">351: </a>{
+<a name="line356">356: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
+<a name="line357">357: </a>    pep->tol   = PETSC_DEFAULT;
+<a name="line358">358: </a>    pep->state = PEP_STATE_INITIAL;
+<a name="line359">359: </a>  } <font color="#4169E1">else</font> {
+<a name="line360">360: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line361">361: </a>    pep->tol = tol;
+<a name="line362">362: </a>  }
+<a name="line363">363: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+<a name="line364">364: </a>    pep->max_it = 0;
+<a name="line365">365: </a>    pep->state  = PEP_STATE_INITIAL;
+<a name="line366">366: </a>  } <font color="#4169E1">else</font> {
+<a name="line367">367: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
+<a name="line368">368: </a>    pep->max_it = maxits;
+<a name="line369">369: </a>  }
+<a name="line370">370: </a>  <font color="#4169E1">return</font>(0);
+<a name="line371">371: </a>}
+
+<a name="line375">375: </a><font color="#B22222">/*@</font>
+<a name="line376">376: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a> - Gets the number of eigenvalues to compute</font>
+<a name="line377">377: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line379">379: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line381">381: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line382">382: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line384">384: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line385">385: </a><font color="#B22222">+  nev - number of eigenvalues to compute</font>
+<a name="line386">386: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line387">387: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line389">389: </a><font color="#B22222">   Notes:</font>
+<a name="line390">390: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line392">392: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line394">394: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>()</font>
+<a name="line395">395: </a><font color="#B22222">@*/</font>
+<a name="line396">396: </a><strong><font color="#4169E1"><a name="PEPGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line397">397: </a>{
+<a name="line400">400: </a>  <font color="#4169E1">if</font> (nev) *nev = pep->nev;
+<a name="line401">401: </a>  <font color="#4169E1">if</font> (ncv) *ncv = pep->ncv;
+<a name="line402">402: </a>  <font color="#4169E1">if</font> (mpd) *mpd = pep->mpd;
+<a name="line403">403: </a>  <font color="#4169E1">return</font>(0);
+<a name="line404">404: </a>}
+
+<a name="line408">408: </a><font color="#B22222">/*@</font>
+<a name="line409">409: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a> - Sets the number of eigenvalues to compute</font>
+<a name="line410">410: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line412">412: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line414">414: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line415">415: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
+<a name="line416">416: </a><font color="#B22222">.  nev - number of eigenvalues to compute</font>
+<a name="line417">417: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line418">418: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line420">420: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line421">421: </a><font color="#B22222">+  -pep_nev <nev> - Sets the number of eigenvalues</font>
+<a name="line422">422: </a><font color="#B22222">.  -pep_ncv <ncv> - Sets the dimension of the subspace</font>
+<a name="line423">423: </a><font color="#B22222">-  -pep_mpd <mpd> - Sets the maximum projected dimension</font>
+
+<a name="line425">425: </a><font color="#B22222">   Notes:</font>
+<a name="line426">426: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
+<a name="line427">427: </a><font color="#B22222">   dependent on the solution method.</font>
+
+<a name="line429">429: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
+<a name="line430">430: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
+<a name="line431">431: </a><font color="#B22222">   (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and</font>
+<a name="line432">432: </a><font color="#B22222">   (b) in cases where nev is large, the user sets mpd.</font>
+
+<a name="line434">434: </a><font color="#B22222">   The value of ncv should always be between nev and (nev+mpd), typically</font>
+<a name="line435">435: </a><font color="#B22222">   ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise</font>
+<a name="line436">436: </a><font color="#B22222">   a smaller value should be used.</font>
+
+<a name="line438">438: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line440">440: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetDimensions.html#PEPGetDimensions">PEPGetDimensions</a>()</font>
+<a name="line441">441: </a><font color="#B22222">@*/</font>
+<a name="line442">442: </a><strong><font color="#4169E1"><a name="PEPSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetDimensions.html#PEPSetDimensions">PEPSetDimensions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nev,PetscInt ncv,PetscInt mpd)</font></strong>
+<a name="line443">443: </a>{
+<a name="line449">449: </a>  <font color="#4169E1">if</font> (nev<1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nev. Must be > 0"</font>);
+<a name="line450">450: </a>  pep->nev = nev;
+<a name="line451">451: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DECIDE || ncv == PETSC_DEFAULT) {
+<a name="line452">452: </a>    pep->ncv = 0;
+<a name="line453">453: </a>  } <font color="#4169E1">else</font> {
+<a name="line454">454: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
+<a name="line455">455: </a>    pep->ncv = ncv;
+<a name="line456">456: </a>  }
+<a name="line457">457: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
+<a name="line458">458: </a>    pep->mpd = 0;
+<a name="line459">459: </a>  } <font color="#4169E1">else</font> {
+<a name="line460">460: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
+<a name="line461">461: </a>    pep->mpd = mpd;
+<a name="line462">462: </a>  }
+<a name="line463">463: </a>  pep->state = PEP_STATE_INITIAL;
+<a name="line464">464: </a>  <font color="#4169E1">return</font>(0);
+<a name="line465">465: </a>}
+
+<a name="line469">469: </a><font color="#B22222">/*@</font>
+<a name="line470">470: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a> - Specifies which portion of the spectrum is</font>
+<a name="line471">471: </a><font color="#B22222">   to be sought.</font>
+
+<a name="line473">473: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line475">475: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line476">476: </a><font color="#B22222">+  pep   - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line477">477: </a><font color="#B22222">-  which - the portion of the spectrum to be sought</font>
+
+<a name="line479">479: </a><font color="#B22222">   Possible values:</font>
+<a name="line480">480: </a><font color="#B22222">   The parameter 'which' can have one of these values</font>
+
+<a name="line482">482: </a><font color="#B22222">+     PEP_LARGEST_MAGNITUDE - largest eigenvalues in magnitude (default)</font>
+<a name="line483">483: </a><font color="#B22222">.     PEP_SMALLEST_MAGNITUDE - smallest eigenvalues in magnitude</font>
+<a name="line484">484: </a><font color="#B22222">.     PEP_LARGEST_REAL - largest real parts</font>
+<a name="line485">485: </a><font color="#B22222">.     PEP_SMALLEST_REAL - smallest real parts</font>
+<a name="line486">486: </a><font color="#B22222">.     PEP_LARGEST_IMAGINARY - largest imaginary parts</font>
+<a name="line487">487: </a><font color="#B22222">.     PEP_SMALLEST_IMAGINARY - smallest imaginary parts</font>
+<a name="line488">488: </a><font color="#B22222">.     PEP_TARGET_MAGNITUDE - eigenvalues closest to the target (in magnitude)</font>
+<a name="line489">489: </a><font color="#B22222">.     PEP_TARGET_REAL - eigenvalues with real part closest to target</font>
+<a name="line490">490: </a><font color="#B22222">.     PEP_TARGET_IMAGINARY - eigenvalues with imaginary part closest to target</font>
+<a name="line491">491: </a><font color="#B22222">-     PEP_WHICH_USER - user defined ordering set with <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>()</font>
+
+<a name="line493">493: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line494">494: </a><font color="#B22222">+   -pep_largest_magnitude - Sets largest eigenvalues in magnitude</font>
+<a name="line495">495: </a><font color="#B22222">.   -pep_smallest_magnitude - Sets smallest eigenvalues in magnitude</font>
+<a name="line496">496: </a><font color="#B22222">.   -pep_largest_real - Sets largest real parts</font>
+<a name="line497">497: </a><font color="#B22222">.   -pep_smallest_real - Sets smallest real parts</font>
+<a name="line498">498: </a><font color="#B22222">.   -pep_largest_imaginary - Sets largest imaginary parts</font>
+<a name="line499">499: </a><font color="#B22222">.   -pep_smallest_imaginary - Sets smallest imaginary parts</font>
+<a name="line500">500: </a><font color="#B22222">.   -pep_target_magnitude - Sets eigenvalues closest to target</font>
+<a name="line501">501: </a><font color="#B22222">.   -pep_target_real - Sets real parts closest to target</font>
+<a name="line502">502: </a><font color="#B22222">-   -pep_target_imaginary - Sets imaginary parts closest to target</font>
+
+<a name="line504">504: </a><font color="#B22222">   Notes:</font>
+<a name="line505">505: </a><font color="#B22222">   Not all eigensolvers implemented in <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> account for all the possible values</font>
+<a name="line506">506: </a><font color="#B22222">   stated above. If SLEPc is compiled for real numbers PEP_LARGEST_IMAGINARY</font>
+<a name="line507">507: </a><font color="#B22222">   and PEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part</font>
+<a name="line508">508: </a><font color="#B22222">   for eigenvalue selection.</font>
+
+<a name="line510">510: </a><font color="#B22222">   The target is a scalar value provided with <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>().</font>
+
+<a name="line512">512: </a><font color="#B22222">   The criterion PEP_TARGET_IMAGINARY is available only in case PETSc and</font>
+<a name="line513">513: </a><font color="#B22222">   SLEPc have been built with complex scalars.</font>
+
+<a name="line515">515: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line517">517: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTarget.html#PEPSetTarget">PEPSetTarget</a>(), <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>(), <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a></font>
+<a name="line518">518: </a><font color="#B22222">@*/</font>
+<a name="line519">519: </a><strong><font color="#4169E1"><a name="PEPSetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a> which)</font></strong>
+<a name="line520">520: </a>{
+<a name="line524">524: </a>  <font color="#4169E1">switch</font> (which) {
+<a name="line525">525: </a>    <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:
+<a name="line526">526: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE:
+<a name="line527">527: </a>    <font color="#4169E1">case</font> PEP_LARGEST_REAL:
+<a name="line528">528: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_REAL:
+<a name="line529">529: </a>    <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:
+<a name="line530">530: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY:
+<a name="line531">531: </a>    <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:
+<a name="line532">532: </a>    <font color="#4169E1">case</font> PEP_TARGET_REAL:
+<a name="line533">533: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line534">534: </a>    <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:
+<a name="line535">535: </a><font color="#A020F0">#endif</font>
+<a name="line536">536: </a>    <font color="#4169E1">case</font> PEP_WHICH_USER:
+<a name="line537">537: </a>      <font color="#4169E1">if</font> (pep->which != which) {
+<a name="line538">538: </a>        pep->state = PEP_STATE_INITIAL;
+<a name="line539">539: </a>        pep->which = which;
+<a name="line540">540: </a>      }
+<a name="line541">541: </a>      <font color="#4169E1">break</font>;
+<a name="line542">542: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line543">543: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' value"</font>);
+<a name="line544">544: </a>  }
+<a name="line545">545: </a>  <font color="#4169E1">return</font>(0);
+<a name="line546">546: </a>}
+
+<a name="line550">550: </a><font color="#B22222">/*@</font>
+<a name="line551">551: </a><font color="#B22222">    <a href="../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a> - Returns which portion of the spectrum is to be</font>
+<a name="line552">552: </a><font color="#B22222">    sought.</font>
+
+<a name="line554">554: </a><font color="#B22222">    Not Collective</font>
+
+<a name="line556">556: </a><font color="#B22222">    Input Parameter:</font>
+<a name="line557">557: </a><font color="#B22222">.   pep - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+
+<a name="line559">559: </a><font color="#B22222">    Output Parameter:</font>
+<a name="line560">560: </a><font color="#B22222">.   which - the portion of the spectrum to be sought</font>
+
+<a name="line562">562: </a><font color="#B22222">    Notes:</font>
+<a name="line563">563: </a><font color="#B22222">    See <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>() for possible values of 'which'.</font>
+
+<a name="line565">565: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line567">567: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a></font>
+<a name="line568">568: </a><font color="#B22222">@*/</font>
+<a name="line569">569: </a><strong><font color="#4169E1"><a name="PEPGetWhichEigenpairs"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetWhichEigenpairs.html#PEPGetWhichEigenpairs">PEPGetWhichEigenpairs</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a> *which)</font></strong>
+<a name="line570">570: </a>{
+<a name="line574">574: </a>  *which = pep->which;
+<a name="line575">575: </a>  <font color="#4169E1">return</font>(0);
+<a name="line576">576: </a>}
+
+<a name="line580">580: </a><font color="#B22222">/*@C</font>
+<a name="line581">581: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a> - Specifies the eigenvalue comparison function</font>
+<a name="line582">582: </a><font color="#B22222">   when <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>() is set to PEP_WHICH_USER.</font>
+
+<a name="line584">584: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line586">586: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line587">587: </a><font color="#B22222">+  pep  - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line588">588: </a><font color="#B22222">.  func - a pointer to the comparison function</font>
+<a name="line589">589: </a><font color="#B22222">-  ctx  - a context pointer (the last parameter to the comparison function)</font>
+
+<a name="line591">591: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line592">592: </a><font color="#B22222">$   func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)</font>
+
+<a name="line594">594: </a><font color="#B22222">+   ar     - real part of the 1st eigenvalue</font>
+<a name="line595">595: </a><font color="#B22222">.   ai     - imaginary part of the 1st eigenvalue</font>
+<a name="line596">596: </a><font color="#B22222">.   br     - real part of the 2nd eigenvalue</font>
+<a name="line597">597: </a><font color="#B22222">.   bi     - imaginary part of the 2nd eigenvalue</font>
+<a name="line598">598: </a><font color="#B22222">.   res    - result of comparison</font>
+<a name="line599">599: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>()</font>
+
+<a name="line601">601: </a><font color="#B22222">   Note:</font>
+<a name="line602">602: </a><font color="#B22222">   The returning parameter 'res' can be:</font>
+<a name="line603">603: </a><font color="#B22222">+  negative - if the 1st eigenvalue is preferred to the 2st one</font>
+<a name="line604">604: </a><font color="#B22222">.  zero     - if both eigenvalues are equally preferred</font>
+<a name="line605">605: </a><font color="#B22222">-  positive - if the 2st eigenvalue is preferred to the 1st one</font>
+
+<a name="line607">607: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line609">609: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>(), <a href="../../../docs/manualpages/PEP/PEPWhich.html#PEPWhich">PEPWhich</a></font>
 <a name="line610">610: </a><font color="#B22222">@*/</font>
-<a name="line611">611: </a><strong><font color="#4169E1"><a name="PEPGetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a> *type)</font></strong>
+<a name="line611">611: </a><strong><font color="#4169E1"><a name="PEPSetEigenvalueComparison"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetEigenvalueComparison.html#PEPSetEigenvalueComparison">PEPSetEigenvalueComparison</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)</font></strong>
 <a name="line612">612: </a>{
-<a name="line616">616: </a>  *type = pep->problem_type;
-<a name="line617">617: </a>  <font color="#4169E1">return</font>(0);
-<a name="line618">618: </a>}
+<a name="line615">615: </a>  pep->sc->comparison    = func;
+<a name="line616">616: </a>  pep->sc->comparisonctx = ctx;
+<a name="line617">617: </a>  pep->which             = PEP_WHICH_USER;
+<a name="line618">618: </a>  <font color="#4169E1">return</font>(0);
+<a name="line619">619: </a>}
 
-<a name="line622">622: </a><font color="#B22222">/*@</font>
-<a name="line623">623: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a> - Specifies the type of polynomial basis used to describe the</font>
-<a name="line624">624: </a><font color="#B22222">   polynomial eigenvalue problem.</font>
+<a name="line623">623: </a><font color="#B22222">/*@</font>
+<a name="line624">624: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a> - Specifies the type of the polynomial eigenvalue problem.</font>
 
 <a name="line626">626: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
 
 <a name="line628">628: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line629">629: </a><font color="#B22222">+  pep   - the polynomial eigensolver context</font>
-<a name="line630">630: </a><font color="#B22222">-  basis - the type of polynomial basis</font>
+<a name="line629">629: </a><font color="#B22222">+  pep  - the polynomial eigensolver context</font>
+<a name="line630">630: </a><font color="#B22222">-  type - a known type of polynomial eigenvalue problem</font>
+
+<a name="line632">632: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line633">633: </a><font color="#B22222">+  -pep_general - general problem with no particular structure</font>
+<a name="line634">634: </a><font color="#B22222">.  -pep_hermitian - problem whose coefficient matrices are Hermitian</font>
+<a name="line635">635: </a><font color="#B22222">-  -pep_gyroscopic - problem with Hamiltonian structure</font>
+
+<a name="line637">637: </a><font color="#B22222">   Notes:</font>
+<a name="line638">638: </a><font color="#B22222">   Allowed values for the problem type are: general (PEP_GENERAL), Hermitian</font>
+<a name="line639">639: </a><font color="#B22222">   (PEP_HERMITIAN), and gyroscopic (PEP_GYROSCOPIC).</font>
+
+<a name="line641">641: </a><font color="#B22222">   This function is used to instruct SLEPc to exploit certain structure in</font>
+<a name="line642">642: </a><font color="#B22222">   the polynomial eigenproblem. By default, no particular structure is assumed.</font>
+
+<a name="line644">644: </a><font color="#B22222">   If the problem matrices are Hermitian (symmetric in the real case) or</font>
+<a name="line645">645: </a><font color="#B22222">   Hermitian/skew-Hermitian then the solver can exploit this fact to perform</font>
+<a name="line646">646: </a><font color="#B22222">   less operations or provide better stability.</font>
+
+<a name="line648">648: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line650">650: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(), <a href="../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(), <a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a></font>
+<a name="line651">651: </a><font color="#B22222">@*/</font>
+<a name="line652">652: </a><strong><font color="#4169E1"><a name="PEPSetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a> type)</font></strong>
+<a name="line653">653: </a>{
+<a name="line657">657: </a>  <font color="#4169E1">if</font> (type!=PEP_GENERAL && type!=PEP_HERMITIAN && type!=PEP_GYROSCOPIC) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown eigenvalue problem type"</font>);
+<a name="line658">658: </a>  <font color="#4169E1">if</font> (type != pep->problem_type) {
+<a name="line659">659: </a>    pep->problem_type = type;
+<a name="line660">660: </a>    pep->state = PEP_STATE_INITIAL;
+<a name="line661">661: </a>  }
+<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
+<a name="line663">663: </a>}
+
+<a name="line667">667: </a><font color="#B22222">/*@</font>
+<a name="line668">668: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a> - Gets the problem type from the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.</font>
+
+<a name="line670">670: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line672">672: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line673">673: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line675">675: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line676">676: </a><font color="#B22222">.  type - name of <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> problem type</font>
+
+<a name="line678">678: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line632">632: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line633">633: </a><font color="#B22222">.  -pep_basis <basis> - Select the basis type</font>
-
-<a name="line635">635: </a><font color="#B22222">   Notes:</font>
-<a name="line636">636: </a><font color="#B22222">   By default, the coefficient matrices passed via <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>() are</font>
-<a name="line637">637: </a><font color="#B22222">   expressed in the monomial basis, i.e. </font>
-<a name="line638">638: </a><font color="#B22222">   P(lambda) = A_0 + lambda*A_1 + lambda^2*A_2 + ... + lambda^d*A_d.</font>
-<a name="line639">639: </a><font color="#B22222">   Other polynomial bases may have better numerical behaviour, but the user</font>
-<a name="line640">640: </a><font color="#B22222">   must then pass the coefficient matrices accordingly.</font>
-
-<a name="line642">642: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line644">644: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(), <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a></font>
-<a name="line645">645: </a><font color="#B22222">@*/</font>
-<a name="line646">646: </a><strong><font color="#4169E1"><a name="PEPSetBasis"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a> basis)</font></strong>
-<a name="line647">647: </a>{
-<a name="line651">651: </a>  pep->basis = basis;
-<a name="line652">652: </a>  <font color="#4169E1">return</font>(0);
-<a name="line653">653: </a>}
+<a name="line680">680: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(), <a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a></font>
+<a name="line681">681: </a><font color="#B22222">@*/</font>
+<a name="line682">682: </a><strong><font color="#4169E1"><a name="PEPGetProblemType"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetProblemType.html#PEPGetProblemType">PEPGetProblemType</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPProblemType.html#PEPProblemType">PEPProblemType</a> *type)</font></strong>
+<a name="line683">683: </a>{
+<a name="line687">687: </a>  *type = pep->problem_type;
+<a name="line688">688: </a>  <font color="#4169E1">return</font>(0);
+<a name="line689">689: </a>}
+
+<a name="line693">693: </a><font color="#B22222">/*@</font>
+<a name="line694">694: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a> - Specifies the type of polynomial basis used to describe the</font>
+<a name="line695">695: </a><font color="#B22222">   polynomial eigenvalue problem.</font>
+
+<a name="line697">697: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line699">699: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line700">700: </a><font color="#B22222">+  pep   - the polynomial eigensolver context</font>
+<a name="line701">701: </a><font color="#B22222">-  basis - the type of polynomial basis</font>
+
+<a name="line703">703: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line704">704: </a><font color="#B22222">.  -pep_basis <basis> - Select the basis type</font>
 
-<a name="line657">657: </a><font color="#B22222">/*@</font>
-<a name="line658">658: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a> - Gets the type of polynomial basis from the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.</font>
-
-<a name="line660">660: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line662">662: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line663">663: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line665">665: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line666">666: </a><font color="#B22222">.  basis - the polynomial basis</font>
-
-<a name="line668">668: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line670">670: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(), <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a></font>
-<a name="line671">671: </a><font color="#B22222">@*/</font>
-<a name="line672">672: </a><strong><font color="#4169E1"><a name="PEPGetBasis"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a> *basis)</font></strong>
-<a name="line673">673: </a>{
-<a name="line677">677: </a>  *basis = pep->basis;
-<a name="line678">678: </a>  <font color="#4169E1">return</font>(0);
-<a name="line679">679: </a>}
-
-<a name="line683">683: </a><font color="#B22222">/*@</font>
-<a name="line684">684: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a> - Specifies if the solver must compute the residual of all</font>
-<a name="line685">685: </a><font color="#B22222">   approximate eigenpairs or not.</font>
-
-<a name="line687">687: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line689">689: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line690">690: </a><font color="#B22222">+  pep      - the eigensolver context</font>
-<a name="line691">691: </a><font color="#B22222">-  trackall - whether compute all residuals or not</font>
-
-<a name="line693">693: </a><font color="#B22222">   Notes:</font>
-<a name="line694">694: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver explicitly computes</font>
-<a name="line695">695: </a><font color="#B22222">   the residual for each eigenpair approximation. Computing the residual is</font>
-<a name="line696">696: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute the associated</font>
-<a name="line697">697: </a><font color="#B22222">   residual to the first unconverged eigenpair.</font>
-<a name="line698">698: </a><font color="#B22222">   The options '-pep_monitor_all' and '-pep_monitor_lg_all' automatically</font>
-<a name="line699">699: </a><font color="#B22222">   activate this option.</font>
-
-<a name="line701">701: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line703">703: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>()</font>
-<a name="line704">704: </a><font color="#B22222">@*/</font>
-<a name="line705">705: </a><strong><font color="#4169E1"><a name="PEPSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool trackall)</font></strong>
-<a name="line706">706: </a>{
-<a name="line710">710: </a>  pep->trackall = trackall;
-<a name="line711">711: </a>  <font color="#4169E1">return</font>(0);
-<a name="line712">712: </a>}
-
-<a name="line716">716: </a><font color="#B22222">/*@</font>
-<a name="line717">717: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
-<a name="line718">718: </a><font color="#B22222">   be computed or not.</font>
-
-<a name="line720">720: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line722">722: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line723">723: </a><font color="#B22222">.  pep - the eigensolver context</font>
-
-<a name="line725">725: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line726">726: </a><font color="#B22222">.  trackall - the returned flag</font>
-
-<a name="line728">728: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line730">730: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>()</font>
-<a name="line731">731: </a><font color="#B22222">@*/</font>
-<a name="line732">732: </a><strong><font color="#4169E1"><a name="PEPGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *trackall)</font></strong>
-<a name="line733">733: </a>{
-<a name="line737">737: </a>  *trackall = pep->trackall;
-<a name="line738">738: </a>  <font color="#4169E1">return</font>(0);
-<a name="line739">739: </a>}
-
-<a name="line743">743: </a><font color="#B22222">/*@C</font>
-<a name="line744">744: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a> - Sets a function to compute the error estimate</font>
-<a name="line745">745: </a><font color="#B22222">   used in the convergence test.</font>
-
-<a name="line747">747: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line749">749: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line750">750: </a><font color="#B22222">+  pep     - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line751">751: </a><font color="#B22222">.  func    - a pointer to the convergence test function</font>
-<a name="line752">752: </a><font color="#B22222">.  ctx     - [optional] context for private data for the convergence routine</font>
-<a name="line753">753: </a><font color="#B22222">-  destroy - [optional] destructor for the context (may be NULL;</font>
-<a name="line754">754: </a><font color="#B22222">             PETSC_NULL_FUNCTION in Fortran)</font>
-
-<a name="line756">756: </a><font color="#B22222">   Calling Sequence of func:</font>
-<a name="line757">757: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font>
-
-<a name="line759">759: </a><font color="#B22222">+   pep    - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line760">760: </a><font color="#B22222">.   eigr   - real part of the eigenvalue</font>
-<a name="line761">761: </a><font color="#B22222">.   eigi   - imaginary part of the eigenvalue</font>
-<a name="line762">762: </a><font color="#B22222">.   res    - residual norm associated to the eigenpair</font>
-<a name="line763">763: </a><font color="#B22222">.   errest - (output) computed error estimate</font>
-<a name="line764">764: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>()</font>
-
-<a name="line766">766: </a><font color="#B22222">   Note:</font>
-<a name="line767">767: </a><font color="#B22222">   If the error estimate returned by the convergence test function is less than</font>
-<a name="line768">768: </a><font color="#B22222">   the tolerance, then the eigenvalue is accepted as converged.</font>
-
-<a name="line770">770: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line772">772: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>()</font>
-<a name="line773">773: </a><font color="#B22222">@*/</font>
-<a name="line774">774: </a><strong><font color="#4169E1"><a name="PEPSetConvergenceTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscErrorCode (*func)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)( [...]
-<a name="line775">775: </a>{
-
-<a name="line780">780: </a>  <font color="#4169E1">if</font> (pep->convergeddestroy) {
-<a name="line781">781: </a>    (*pep->convergeddestroy)(pep->convergedctx);
-<a name="line782">782: </a>  }
-<a name="line783">783: </a>  pep->converged        = func;
-<a name="line784">784: </a>  pep->convergeddestroy = destroy;
-<a name="line785">785: </a>  pep->convergedctx     = ctx;
-<a name="line786">786: </a>  <font color="#4169E1">if</font> (func == PEPConvergedEigRelative) pep->conv = PEP_CONV_EIG;
-<a name="line787">787: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == PEPConvergedLinear) pep->conv = PEP_CONV_LINEAR;
-<a name="line788">788: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == PEPConvergedNorm) pep->conv = PEP_CONV_NORM;
-<a name="line789">789: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == PEPConvergedAbsolute) pep->conv = PEP_CONV_ABS;
-<a name="line790">790: </a>  <font color="#4169E1">else</font> pep->conv = PEP_CONV_USER;
-<a name="line791">791: </a>  <font color="#4169E1">return</font>(0);
-<a name="line792">792: </a>}
-
-<a name="line796">796: </a><font color="#B22222">/*@</font>
-<a name="line797">797: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a> - Specifies how to compute the error estimate</font>
-<a name="line798">798: </a><font color="#B22222">   used in the convergence test.</font>
-
-<a name="line800">800: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line802">802: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line803">803: </a><font color="#B22222">+  pep  - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-<a name="line804">804: </a><font color="#B22222">-  conv - the type of convergence test</font>
-
-<a name="line806">806: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line807">807: </a><font color="#B22222">+  -pep_conv_abs    - Sets the absolute convergence test</font>
-<a name="line808">808: </a><font color="#B22222">.  -pep_conv_eig    - Sets the convergence test relative to the eigenvalue</font>
-<a name="line809">809: </a><font color="#B22222">.  -pep_conv_linear - Sets the convergence test related to the linearized eigenproblem</font>
-<a name="line810">810: </a><font color="#B22222">-  -pep_conv_user   - Selects the user-defined convergence test</font>
-
-<a name="line812">812: </a><font color="#B22222">   Note:</font>
-<a name="line813">813: </a><font color="#B22222">   The parameter 'conv' can have one of these values</font>
-<a name="line814">814: </a><font color="#B22222">+     PEP_CONV_ABS    - absolute error ||r||</font>
-<a name="line815">815: </a><font color="#B22222">.     PEP_CONV_EIG    - error relative to the eigenvalue l, ||r||/|l|</font>
-<a name="line816">816: </a><font color="#B22222">.     PEP_CONV_LINEAR - error related to the linearized eigenproblem</font>
-<a name="line817">817: </a><font color="#B22222">.     PEP_CONV_NORM   - error relative matrix norms, ||r||/sum_i(l^i*||A_i||)</font>
-<a name="line818">818: </a><font color="#B22222">-     PEP_CONV_USER   - function set by <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>()</font>
-
-<a name="line820">820: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line822">822: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>(), <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a></font>
-<a name="line823">823: </a><font color="#B22222">@*/</font>
-<a name="line824">824: </a><strong><font color="#4169E1"><a name="PEPSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a> conv)</font></strong>
-<a name="line825">825: </a>{
-<a name="line829">829: </a>  <font color="#4169E1">switch</font> (conv) {
-<a name="line830">830: </a>    <font color="#4169E1">case</font> PEP_CONV_ABS:    pep->converged = PEPConvergedAbsolute; <font color="#4169E1">break</font>;
-<a name="line831">831: </a>    <font color="#4169E1">case</font> PEP_CONV_EIG:    pep->converged = PEPConvergedEigRelative; <font color="#4169E1">break</font>;
-<a name="line832">832: </a>    <font color="#4169E1">case</font> PEP_CONV_LINEAR: pep->converged = PEPConvergedLinear; <font color="#4169E1">break</font>;
-<a name="line833">833: </a>    <font color="#4169E1">case</font> PEP_CONV_NORM:   pep->converged = PEPConvergedNorm; <font color="#4169E1">break</font>;
-<a name="line834">834: </a>    <font color="#4169E1">case</font> PEP_CONV_USER: <font color="#4169E1">break</font>;
-<a name="line835">835: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line836">836: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'conv' value"</font>);
-<a name="line837">837: </a>  }
-<a name="line838">838: </a>  pep->conv = conv;
-<a name="line839">839: </a>  <font color="#4169E1">return</font>(0);
-<a name="line840">840: </a>}
-
-<a name="line844">844: </a><font color="#B22222">/*@</font>
-<a name="line845">845: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a> - Gets the method used to compute the error estimate</font>
-<a name="line846">846: </a><font color="#B22222">   used in the convergence test.</font>
-
-<a name="line848">848: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line850">850: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line851">851: </a><font color="#B22222">.  pep   - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
-
-<a name="line853">853: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line854">854: </a><font color="#B22222">.  conv  - the type of convergence test</font>
-
-<a name="line856">856: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line858">858: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a></font>
-<a name="line859">859: </a><font color="#B22222">@*/</font>
-<a name="line860">860: </a><strong><font color="#4169E1"><a name="PEPGetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a> *conv)</font></strong>
-<a name="line861">861: </a>{
-<a name="line865">865: </a>  *conv = pep->conv;
-<a name="line866">866: </a>  <font color="#4169E1">return</font>(0);
-<a name="line867">867: </a>}
-
-<a name="line871">871: </a><font color="#B22222">/*@</font>
-<a name="line872">872: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a> - Specifies the scaling strategy to be used.</font>
-
-<a name="line874">874: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line876">876: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line877">877: </a><font color="#B22222">+  pep    - the eigensolver context</font>
-<a name="line878">878: </a><font color="#B22222">.  scale  - scaling strategy</font>
-<a name="line879">879: </a><font color="#B22222">.  alpha  - the scaling factor used in the scalar strategy</font>
-<a name="line880">880: </a><font color="#B22222">.  Dl     - the left diagonal matrix of the diagonal scaling algorithm</font>
-<a name="line881">881: </a><font color="#B22222">.  Dr     - the right diagonal matrix of the diagonal scaling algorithm</font>
-<a name="line882">882: </a><font color="#B22222">.  its    - number of iterations of the diagonal scaling algorithm</font>
-<a name="line883">883: </a><font color="#B22222">-  lambda - approximation to wanted eigenvalues (modulus)</font>
-
-<a name="line885">885: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line886">886: </a><font color="#B22222">+  -pep_scale <type> - scaling type, one of <none,scalar,diagonal,both></font>
-<a name="line887">887: </a><font color="#B22222">.  -pep_scale_factor <alpha> - the scaling factor</font>
-<a name="line888">888: </a><font color="#B22222">.  -pep_scale_its <its> - number of iterations</font>
-<a name="line889">889: </a><font color="#B22222">-  -pep_scale_lambda <lambda> - approximation to eigenvalues</font>
-
-<a name="line891">891: </a><font color="#B22222">   Notes:</font>
-<a name="line892">892: </a><font color="#B22222">   There are two non-exclusive scaling strategies: scalar and diagonal.</font>
-
-<a name="line894">894: </a><font color="#B22222">   In the scalar strategy, scaling is applied to the eigenvalue, that is,</font>
-<a name="line895">895: </a><font color="#B22222">   mu = lambda/alpha is the new eigenvalue and all matrices are scaled</font>
-<a name="line896">896: </a><font color="#B22222">   accordingly. After solving the scaled problem, the original lambda is</font>
-<a name="line897">897: </a><font color="#B22222">   recovered. Parameter 'alpha' must be positive. Use PETSC_DECIDE to let</font>
-<a name="line898">898: </a><font color="#B22222">   the solver compute a reasonable scaling factor.</font>
-
-<a name="line900">900: </a><font color="#B22222">   In the diagonal strategy, the solver works implicitly with matrix Dl*A*Dr,</font>
-<a name="line901">901: </a><font color="#B22222">   where Dl and Dr are appropriate diagonal matrices. This improves the accuracy</font>
-<a name="line902">902: </a><font color="#B22222">   of the computed results in some cases. The user may provide the Dr and Dl</font>
-<a name="line903">903: </a><font color="#B22222">   matrices represented as Vec objects storing diagonal elements. If not</font>
-<a name="line904">904: </a><font color="#B22222">   provided, these matrices are computed internally. This option requires</font>
-<a name="line905">905: </a><font color="#B22222">   that the polynomial coefficient matrices are of MATAIJ type.</font>
-<a name="line906">906: </a><font color="#B22222">   The parameter 'its' is the number of iterations performed by the method.</font>
-<a name="line907">907: </a><font color="#B22222">   Parameter 'lambda' must be positive. Use PETSC_DECIDE or set lambda = 1.0 if</font>
-<a name="line908">908: </a><font color="#B22222">   no information about eigenvalues is available.</font>
-
-<a name="line910">910: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line912">912: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>()</font>
-<a name="line913">913: </a><font color="#B22222">@*/</font>
-<a name="line914">914: </a><strong><font color="#4169E1"><a name="PEPSetScale"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a> scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)</font></strong>
-<a name="line915">915: </a>{
-
-<a name="line921">921: </a>  pep->scale = scale;
-<a name="line922">922: </a>  <font color="#4169E1">if</font> (scale==PEP_SCALE_SCALAR || scale==PEP_SCALE_BOTH) {
-<a name="line924">924: </a>    <font color="#4169E1">if</font> (alpha == PETSC_DEFAULT || alpha == PETSC_DECIDE) {
-<a name="line925">925: </a>      pep->sfactor = 0.0;
-<a name="line926">926: </a>      pep->sfactor_set = PETSC_FALSE;
-<a name="line927">927: </a>    } <font color="#4169E1">else</font> {
-<a name="line928">928: </a>      <font color="#4169E1">if</font> (alpha<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of alpha. Must be > 0"</font>);
-<a name="line929">929: </a>      pep->sfactor = alpha;
-<a name="line930">930: </a>      pep->sfactor_set = PETSC_TRUE;
-<a name="line931">931: </a>    }
-<a name="line932">932: </a>  }
-<a name="line933">933: </a>  <font color="#4169E1">if</font> (scale==PEP_SCALE_DIAGONAL || scale==PEP_SCALE_BOTH) {
-<a name="line934">934: </a>    <font color="#4169E1">if</font> (Dl) {
-<a name="line937">937: </a>      PetscObjectReference((PetscObject)Dl);
-<a name="line938">938: </a>      VecDestroy(&pep->Dl);
-<a name="line939">939: </a>      pep->Dl = Dl;
-<a name="line940">940: </a>    }
-<a name="line941">941: </a>    <font color="#4169E1">if</font> (Dr) {
-<a name="line944">944: </a>      PetscObjectReference((PetscObject)Dr);
-<a name="line945">945: </a>      VecDestroy(&pep->Dr);
-<a name="line946">946: </a>      pep->Dr = Dr;
-<a name="line947">947: </a>    }
-<a name="line950">950: </a>    <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) pep->sits = 5;
-<a name="line951">951: </a>    <font color="#4169E1">else</font> pep->sits = its;
-<a name="line952">952: </a>    <font color="#4169E1">if</font> (lambda==PETSC_DECIDE || lambda==PETSC_DEFAULT) pep->slambda = 1.0;
-<a name="line953">953: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (lambda<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of lambda. Must be > 0"</font>);
-<a name="line954">954: </a>    <font color="#4169E1">else</font> pep->slambda = lambda;
-<a name="line955">955: </a>  }
-<a name="line956">956: </a>  pep->state = PEP_STATE_INITIAL;
-<a name="line957">957: </a>  <font color="#4169E1">return</font>(0);
-<a name="line958">958: </a>}
-
-<a name="line962">962: </a><font color="#B22222">/*@</font>
-<a name="line963">963: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a> - Gets the scaling strategy used by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object, and the</font>
-<a name="line964">964: </a><font color="#B22222">   associated parameters.</font>
-
-<a name="line966">966: </a><font color="#B22222">   Not Collectiv, but vectors are shared by all processors that share the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line968">968: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line969">969: </a><font color="#B22222">.  pep - the eigensolver context</font>
-
-<a name="line971">971: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line972">972: </a><font color="#B22222">+  scale  - scaling strategy</font>
-<a name="line973">973: </a><font color="#B22222">.  alpha  - the scaling factor used in the scalar strategy</font>
-<a name="line974">974: </a><font color="#B22222">.  Dl     - the left diagonal matrix of the diagonal scaling algorithm</font>
-<a name="line975">975: </a><font color="#B22222">.  Dr     - the right diagonal matrix of the diagonal scaling algorithm</font>
-<a name="line976">976: </a><font color="#B22222">.  its    - number of iterations of the diagonal scaling algorithm</font>
-<a name="line977">977: </a><font color="#B22222">-  lambda - approximation to wanted eigenvalues (modulus)</font>
-
-<a name="line979">979: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line981">981: </a><font color="#B22222">   Note:</font>
-<a name="line982">982: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line984">984: </a><font color="#B22222">   If Dl or Dr were not set by the user, then the ones computed internally are</font>
-<a name="line985">985: </a><font color="#B22222">   returned (or a null pointer if called before <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>).</font>
-
-<a name="line987">987: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(), <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>()</font>
-<a name="line988">988: </a><font color="#B22222">@*/</font>
-<a name="line989">989: </a><strong><font color="#4169E1"><a name="PEPGetScale"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a> *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)</font></strong>
-<a name="line990">990: </a>{
-<a name="line993">993: </a>  <font color="#4169E1">if</font> (scale)  *scale  = pep->scale;
-<a name="line994">994: </a>  <font color="#4169E1">if</font> (alpha)  *alpha  = pep->sfactor;
-<a name="line995">995: </a>  <font color="#4169E1">if</font> (Dl)     *Dl     = pep->Dl;
-<a name="line996">996: </a>  <font color="#4169E1">if</font> (Dr)     *Dr     = pep->Dr;
-<a name="line997">997: </a>  <font color="#4169E1">if</font> (its)    *its    = pep->sits;
-<a name="line998">998: </a>  <font color="#4169E1">if</font> (lambda) *lambda = pep->slambda;
-<a name="line999">999: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1000">1000: </a>}
-
-<a name="line1004">1004: </a><font color="#B22222">/*@</font>
-<a name="line1005">1005: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a> - Specifies the extraction strategy to be used.</font>
-
-<a name="line1007">1007: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line1009">1009: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1010">1010: </a><font color="#B22222">+  pep     - the eigensolver context</font>
-<a name="line1011">1011: </a><font color="#B22222">-  extract - extraction strategy</font>
-
-<a name="line1013">1013: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1014">1014: </a><font color="#B22222">.  -pep_extract <type> - extraction type, one of <none,norm,residual,structured></font>
-
-<a name="line1016">1016: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1018">1018: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>()</font>
-<a name="line1019">1019: </a><font color="#B22222">@*/</font>
-<a name="line1020">1020: </a><strong><font color="#4169E1"><a name="PEPSetExtract"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a> extract)</font></strong>
-<a name="line1021">1021: </a>{
-<a name="line1025">1025: </a>  pep->extract = extract;
-<a name="line1026">1026: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1027">1027: </a>}
-
-<a name="line1031">1031: </a><font color="#B22222">/*@</font>
-<a name="line1032">1032: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a> - Gets the extraction strategy used by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.</font>
+<a name="line706">706: </a><font color="#B22222">   Notes:</font>
+<a name="line707">707: </a><font color="#B22222">   By default, the coefficient matrices passed via <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>() are</font>
+<a name="line708">708: </a><font color="#B22222">   expressed in the monomial basis, i.e. </font>
+<a name="line709">709: </a><font color="#B22222">   P(lambda) = A_0 + lambda*A_1 + lambda^2*A_2 + ... + lambda^d*A_d.</font>
+<a name="line710">710: </a><font color="#B22222">   Other polynomial bases may have better numerical behaviour, but the user</font>
+<a name="line711">711: </a><font color="#B22222">   must then pass the coefficient matrices accordingly.</font>
+
+<a name="line713">713: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line715">715: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(), <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a></font>
+<a name="line716">716: </a><font color="#B22222">@*/</font>
+<a name="line717">717: </a><strong><font color="#4169E1"><a name="PEPSetBasis"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a> basis)</font></strong>
+<a name="line718">718: </a>{
+<a name="line722">722: </a>  pep->basis = basis;
+<a name="line723">723: </a>  <font color="#4169E1">return</font>(0);
+<a name="line724">724: </a>}
+
+<a name="line728">728: </a><font color="#B22222">/*@</font>
+<a name="line729">729: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a> - Gets the type of polynomial basis from the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.</font>
+
+<a name="line731">731: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line733">733: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line734">734: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line736">736: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line737">737: </a><font color="#B22222">.  basis - the polynomial basis</font>
+
+<a name="line739">739: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line741">741: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>(), <a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a></font>
+<a name="line742">742: </a><font color="#B22222">@*/</font>
+<a name="line743">743: </a><strong><font color="#4169E1"><a name="PEPGetBasis"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetBasis.html#PEPGetBasis">PEPGetBasis</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPBasis.html#PEPBasis">PEPBasis</a> *basis)</font></strong>
+<a name="line744">744: </a>{
+<a name="line748">748: </a>  *basis = pep->basis;
+<a name="line749">749: </a>  <font color="#4169E1">return</font>(0);
+<a name="line750">750: </a>}
+
+<a name="line754">754: </a><font color="#B22222">/*@</font>
+<a name="line755">755: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a> - Specifies if the solver must compute the residual of all</font>
+<a name="line756">756: </a><font color="#B22222">   approximate eigenpairs or not.</font>
+
+<a name="line758">758: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line760">760: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line761">761: </a><font color="#B22222">+  pep      - the eigensolver context</font>
+<a name="line762">762: </a><font color="#B22222">-  trackall - whether compute all residuals or not</font>
+
+<a name="line764">764: </a><font color="#B22222">   Notes:</font>
+<a name="line765">765: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver explicitly computes</font>
+<a name="line766">766: </a><font color="#B22222">   the residual for each eigenpair approximation. Computing the residual is</font>
+<a name="line767">767: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute the associated</font>
+<a name="line768">768: </a><font color="#B22222">   residual to the first unconverged eigenpair.</font>
+<a name="line769">769: </a><font color="#B22222">   The options '-pep_monitor_all' and '-pep_monitor_lg_all' automatically</font>
+<a name="line770">770: </a><font color="#B22222">   activate this option.</font>
+
+<a name="line772">772: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line774">774: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>()</font>
+<a name="line775">775: </a><font color="#B22222">@*/</font>
+<a name="line776">776: </a><strong><font color="#4169E1"><a name="PEPSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool trackall)</font></strong>
+<a name="line777">777: </a>{
+<a name="line781">781: </a>  pep->trackall = trackall;
+<a name="line782">782: </a>  <font color="#4169E1">return</font>(0);
+<a name="line783">783: </a>}
+
+<a name="line787">787: </a><font color="#B22222">/*@</font>
+<a name="line788">788: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
+<a name="line789">789: </a><font color="#B22222">   be computed or not.</font>
+
+<a name="line791">791: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line793">793: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line794">794: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line796">796: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line797">797: </a><font color="#B22222">.  trackall - the returned flag</font>
+
+<a name="line799">799: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line801">801: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTrackAll.html#PEPSetTrackAll">PEPSetTrackAll</a>()</font>
+<a name="line802">802: </a><font color="#B22222">@*/</font>
+<a name="line803">803: </a><strong><font color="#4169E1"><a name="PEPGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetTrackAll.html#PEPGetTrackAll">PEPGetTrackAll</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscBool *trackall)</font></strong>
+<a name="line804">804: </a>{
+<a name="line808">808: </a>  *trackall = pep->trackall;
+<a name="line809">809: </a>  <font color="#4169E1">return</font>(0);
+<a name="line810">810: </a>}
+
+<a name="line814">814: </a><font color="#B22222">/*@C</font>
+<a name="line815">815: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a> - Sets a function to compute the error estimate</font>
+<a name="line816">816: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line818">818: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line820">820: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line821">821: </a><font color="#B22222">+  pep     - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line822">822: </a><font color="#B22222">.  func    - a pointer to the convergence test function</font>
+<a name="line823">823: </a><font color="#B22222">.  ctx     - context for private data for the convergence routine (may be null)</font>
+<a name="line824">824: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line826">826: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line827">827: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)</font>
+
+<a name="line829">829: </a><font color="#B22222">+   pep    - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line830">830: </a><font color="#B22222">.   eigr   - real part of the eigenvalue</font>
+<a name="line831">831: </a><font color="#B22222">.   eigi   - imaginary part of the eigenvalue</font>
+<a name="line832">832: </a><font color="#B22222">.   res    - residual norm associated to the eigenpair</font>
+<a name="line833">833: </a><font color="#B22222">.   errest - (output) computed error estimate</font>
+<a name="line834">834: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>()</font>
+
+<a name="line836">836: </a><font color="#B22222">   Note:</font>
+<a name="line837">837: </a><font color="#B22222">   If the error estimate returned by the convergence test function is less than</font>
+<a name="line838">838: </a><font color="#B22222">   the tolerance, then the eigenvalue is accepted as converged.</font>
+
+<a name="line840">840: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line842">842: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>()</font>
+<a name="line843">843: </a><font color="#B22222">@*/</font>
+<a name="line844">844: </a><strong><font color="#4169E1"><a name="PEPSetConvergenceTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscErrorCode (*func)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)( [...]
+<a name="line845">845: </a>{
+
+<a name="line850">850: </a>  <font color="#4169E1">if</font> (pep->convergeddestroy) {
+<a name="line851">851: </a>    (*pep->convergeddestroy)(pep->convergedctx);
+<a name="line852">852: </a>  }
+<a name="line853">853: </a>  pep->converged        = func;
+<a name="line854">854: </a>  pep->convergeddestroy = destroy;
+<a name="line855">855: </a>  pep->convergedctx     = ctx;
+<a name="line856">856: </a>  <font color="#4169E1">if</font> (func == PEPConvergedRelative) pep->conv = PEP_CONV_REL;
+<a name="line857">857: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == PEPConvergedNorm) pep->conv = PEP_CONV_NORM;
+<a name="line858">858: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == PEPConvergedAbsolute) pep->conv = PEP_CONV_ABS;
+<a name="line859">859: </a>  <font color="#4169E1">else</font> pep->conv = PEP_CONV_USER;
+<a name="line860">860: </a>  <font color="#4169E1">return</font>(0);
+<a name="line861">861: </a>}
+
+<a name="line865">865: </a><font color="#B22222">/*@</font>
+<a name="line866">866: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a> - Specifies how to compute the error estimate</font>
+<a name="line867">867: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line869">869: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line871">871: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line872">872: </a><font color="#B22222">+  pep  - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line873">873: </a><font color="#B22222">-  conv - the type of convergence test</font>
+
+<a name="line875">875: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line876">876: </a><font color="#B22222">+  -pep_conv_abs    - Sets the absolute convergence test</font>
+<a name="line877">877: </a><font color="#B22222">.  -pep_conv_rel    - Sets the convergence test relative to the eigenvalue</font>
+<a name="line878">878: </a><font color="#B22222">.  -pep_conv_norm   - Sets the convergence test relative to the matrix norms</font>
+<a name="line879">879: </a><font color="#B22222">-  -pep_conv_user   - Selects the user-defined convergence test</font>
+
+<a name="line881">881: </a><font color="#B22222">   Note:</font>
+<a name="line882">882: </a><font color="#B22222">   The parameter 'conv' can have one of these values</font>
+<a name="line883">883: </a><font color="#B22222">+     PEP_CONV_ABS    - absolute error ||r||</font>
+<a name="line884">884: </a><font color="#B22222">.     PEP_CONV_REL    - error relative to the eigenvalue l, ||r||/|l|</font>
+<a name="line885">885: </a><font color="#B22222">.     PEP_CONV_NORM   - error relative matrix norms, ||r||/sum_i(l^i*||A_i||)</font>
+<a name="line886">886: </a><font color="#B22222">-     PEP_CONV_USER   - function set by <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>()</font>
+
+<a name="line888">888: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line890">890: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTestFunction.html#PEPSetConvergenceTestFunction">PEPSetConvergenceTestFunction</a>(), <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEP [...]
+<a name="line891">891: </a><font color="#B22222">@*/</font>
+<a name="line892">892: </a><strong><font color="#4169E1"><a name="PEPSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a> conv)</font></strong>
+<a name="line893">893: </a>{
+<a name="line897">897: </a>  <font color="#4169E1">switch</font> (conv) {
+<a name="line898">898: </a>    <font color="#4169E1">case</font> PEP_CONV_ABS:    pep->converged = PEPConvergedAbsolute; <font color="#4169E1">break</font>;
+<a name="line899">899: </a>    <font color="#4169E1">case</font> PEP_CONV_REL:    pep->converged = PEPConvergedRelative; <font color="#4169E1">break</font>;
+<a name="line900">900: </a>    <font color="#4169E1">case</font> PEP_CONV_NORM:   pep->converged = PEPConvergedNorm; <font color="#4169E1">break</font>;
+<a name="line901">901: </a>    <font color="#4169E1">case</font> PEP_CONV_USER: <font color="#4169E1">break</font>;
+<a name="line902">902: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line903">903: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'conv' value"</font>);
+<a name="line904">904: </a>  }
+<a name="line905">905: </a>  pep->conv = conv;
+<a name="line906">906: </a>  <font color="#4169E1">return</font>(0);
+<a name="line907">907: </a>}
+
+<a name="line911">911: </a><font color="#B22222">/*@</font>
+<a name="line912">912: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a> - Gets the method used to compute the error estimate</font>
+<a name="line913">913: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line915">915: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line917">917: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line918">918: </a><font color="#B22222">.  pep   - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+
+<a name="line920">920: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line921">921: </a><font color="#B22222">.  conv  - the type of convergence test</font>
+
+<a name="line923">923: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line925">925: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a></font>
+<a name="line926">926: </a><font color="#B22222">@*/</font>
+<a name="line927">927: </a><strong><font color="#4169E1"><a name="PEPGetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetConvergenceTest.html#PEPGetConvergenceTest">PEPGetConvergenceTest</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPConv.html#PEPConv">PEPConv</a> *conv)</font></strong>
+<a name="line928">928: </a>{
+<a name="line932">932: </a>  *conv = pep->conv;
+<a name="line933">933: </a>  <font color="#4169E1">return</font>(0);
+<a name="line934">934: </a>}
+
+<a name="line938">938: </a><font color="#B22222">/*@C</font>
+<a name="line939">939: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a> - Sets a function to decide when to stop the outer</font>
+<a name="line940">940: </a><font color="#B22222">   iteration of the eigensolver.</font>
+
+<a name="line942">942: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line944">944: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line945">945: </a><font color="#B22222">+  pep     - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line946">946: </a><font color="#B22222">.  func    - pointer to the stopping test function</font>
+<a name="line947">947: </a><font color="#B22222">.  ctx     - context for private data for the stopping routine (may be null)</font>
+<a name="line948">948: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line950">950: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line951">951: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> *reason,void *ctx)</font>
+
+<a name="line953">953: </a><font color="#B22222">+   pep    - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line954">954: </a><font color="#B22222">.   its    - current number of iterations</font>
+<a name="line955">955: </a><font color="#B22222">.   max_it - maximum number of iterations</font>
+<a name="line956">956: </a><font color="#B22222">.   nconv  - number of currently converged eigenpairs</font>
+<a name="line957">957: </a><font color="#B22222">.   nev    - number of requested eigenpairs</font>
+<a name="line958">958: </a><font color="#B22222">.   reason - (output) result of the stopping test</font>
+<a name="line959">959: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a>()</font>
+
+<a name="line961">961: </a><font color="#B22222">   Note:</font>
+<a name="line962">962: </a><font color="#B22222">   Normal usage is to first call the default routine <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>() and then</font>
+<a name="line963">963: </a><font color="#B22222">   set reason to PEP_CONVERGED_USER if some user-defined conditions have been</font>
+<a name="line964">964: </a><font color="#B22222">   met. To let the eigensolver continue iterating, the result must be left as</font>
+<a name="line965">965: </a><font color="#B22222">   PEP_CONVERGED_ITERATING.</font>
+
+<a name="line967">967: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line969">969: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>()</font>
+<a name="line970">970: </a><font color="#B22222">@*/</font>
+<a name="line971">971: </a><strong><font color="#4169E1"><a name="PEPSetStoppingTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscErrorCode (*func)(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#P [...]
+<a name="line972">972: </a>{
+
+<a name="line977">977: </a>  <font color="#4169E1">if</font> (pep->stoppingdestroy) {
+<a name="line978">978: </a>    (*pep->stoppingdestroy)(pep->stoppingctx);
+<a name="line979">979: </a>  }
+<a name="line980">980: </a>  pep->stopping        = func;
+<a name="line981">981: </a>  pep->stoppingdestroy = destroy;
+<a name="line982">982: </a>  pep->stoppingctx     = ctx;
+<a name="line983">983: </a>  <font color="#4169E1">if</font> (func == <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>) pep->stop = PEP_STOP_BASIC;
+<a name="line984">984: </a>  <font color="#4169E1">else</font> pep->stop = PEP_STOP_USER;
+<a name="line985">985: </a>  <font color="#4169E1">return</font>(0);
+<a name="line986">986: </a>}
+
+<a name="line990">990: </a><font color="#B22222">/*@</font>
+<a name="line991">991: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a> - Specifies how to decide the termination of the outer</font>
+<a name="line992">992: </a><font color="#B22222">   loop of the eigensolver.</font>
+
+<a name="line994">994: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line996">996: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line997">997: </a><font color="#B22222">+  pep  - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
+<a name="line998">998: </a><font color="#B22222">-  stop - the type of stopping test</font>
+
+<a name="line1000">1000: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1001">1001: </a><font color="#B22222">+  -pep_stop_basic - Sets the default stopping test</font>
+<a name="line1002">1002: </a><font color="#B22222">-  -pep_stop_user  - Selects the user-defined stopping test</font>
+
+<a name="line1004">1004: </a><font color="#B22222">   Note:</font>
+<a name="line1005">1005: </a><font color="#B22222">   The parameter 'stop' can have one of these values</font>
+<a name="line1006">1006: </a><font color="#B22222">+     PEP_STOP_BASIC - default stopping test</font>
+<a name="line1007">1007: </a><font color="#B22222">-     PEP_STOP_USER  - function set by <a href="../../../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a>()</font>
+
+<a name="line1009">1009: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1011">1011: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetStoppingTestFunction.html#PEPSetStoppingTestFunction">PEPSetStoppingTestFunction</a>(), <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a [...]
+<a name="line1012">1012: </a><font color="#B22222">@*/</font>
+<a name="line1013">1013: </a><strong><font color="#4169E1"><a name="PEPSetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a> stop)</font></strong>
+<a name="line1014">1014: </a>{
+<a name="line1018">1018: </a>  <font color="#4169E1">switch</font> (stop) {
+<a name="line1019">1019: </a>    <font color="#4169E1">case</font> PEP_STOP_BASIC: pep->stopping = <a href="../../../docs/manualpages/PEP/PEPStoppingBasic.html#PEPStoppingBasic">PEPStoppingBasic</a>; <font color="#4169E1">break</font>;
+<a name="line1020">1020: </a>    <font color="#4169E1">case</font> PEP_STOP_USER:  <font color="#4169E1">break</font>;
+<a name="line1021">1021: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line1022">1022: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'stop' value"</font>);
+<a name="line1023">1023: </a>  }
+<a name="line1024">1024: </a>  pep->stop = stop;
+<a name="line1025">1025: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1026">1026: </a>}
+
+<a name="line1030">1030: </a><font color="#B22222">/*@</font>
+<a name="line1031">1031: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</a> - Gets the method used to decide the termination of the outer</font>
+<a name="line1032">1032: </a><font color="#B22222">   loop of the eigensolver.</font>
 
 <a name="line1034">1034: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line1036">1036: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1037">1037: </a><font color="#B22222">.  pep - the eigensolver context</font>
+<a name="line1036">1036: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1037">1037: </a><font color="#B22222">.  pep   - eigensolver context obtained from <a href="../../../docs/manualpages/PEP/PEPCreate.html#PEPCreate">PEPCreate</a>()</font>
 
-<a name="line1039">1039: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1040">1040: </a><font color="#B22222">.  extract - extraction strategy</font>
+<a name="line1039">1039: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1040">1040: </a><font color="#B22222">.  stop  - the type of stopping test</font>
 
-<a name="line1042">1042: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line1042">1042: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line1044">1044: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>()</font>
+<a name="line1044">1044: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetStoppingTest.html#PEPSetStoppingTest">PEPSetStoppingTest</a>(), <a href="../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a></font>
 <a name="line1045">1045: </a><font color="#B22222">@*/</font>
-<a name="line1046">1046: </a><strong><font color="#4169E1"><a name="PEPGetExtract"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a> *extract)</font></strong>
+<a name="line1046">1046: </a><strong><font color="#4169E1"><a name="PEPGetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetStoppingTest.html#PEPGetStoppingTest">PEPGetStoppingTest</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPStop.html#PEPStop">PEPStop</a> *stop)</font></strong>
 <a name="line1047">1047: </a>{
-<a name="line1050">1050: </a>  <font color="#4169E1">if</font> (extract) *extract = pep->extract;
-<a name="line1051">1051: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1052">1052: </a>}
+<a name="line1051">1051: </a>  *stop = pep->stop;
+<a name="line1052">1052: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1053">1053: </a>}
 
-<a name="line1056">1056: </a><font color="#B22222">/*@</font>
-<a name="line1057">1057: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a> - Specifies the refinement type (and options) to be used</font>
-<a name="line1058">1058: </a><font color="#B22222">   after the solve.</font>
+<a name="line1057">1057: </a><font color="#B22222">/*@</font>
+<a name="line1058">1058: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a> - Specifies the scaling strategy to be used.</font>
 
 <a name="line1060">1060: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
 
 <a name="line1062">1062: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1063">1063: </a><font color="#B22222">+  pep    - the polynomial eigensolver context</font>
-<a name="line1064">1064: </a><font color="#B22222">.  refine - refinement type</font>
-<a name="line1065">1065: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
-<a name="line1066">1066: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
-<a name="line1067">1067: </a><font color="#B22222">.  its    - maximum number of refinement iterations</font>
-<a name="line1068">1068: </a><font color="#B22222">-  schur  - boolean flag to activate the Schur complement approach</font>
-
-<a name="line1070">1070: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line1071">1071: </a><font color="#B22222">+  -pep_refine <type> - refinement type, one of <none,simple,multiple></font>
-<a name="line1072">1072: </a><font color="#B22222">.  -pep_refine_partitions <n> - the number of partitions</font>
-<a name="line1073">1073: </a><font color="#B22222">.  -pep_refine_tol <tol> - the tolerance</font>
-<a name="line1074">1074: </a><font color="#B22222">.  -pep_refine_its <its> - number of iterations</font>
-<a name="line1075">1075: </a><font color="#B22222">-  -pep_refine_schur - to set the Schur complement approach</font>
+<a name="line1063">1063: </a><font color="#B22222">+  pep    - the eigensolver context</font>
+<a name="line1064">1064: </a><font color="#B22222">.  scale  - scaling strategy</font>
+<a name="line1065">1065: </a><font color="#B22222">.  alpha  - the scaling factor used in the scalar strategy</font>
+<a name="line1066">1066: </a><font color="#B22222">.  Dl     - the left diagonal matrix of the diagonal scaling algorithm</font>
+<a name="line1067">1067: </a><font color="#B22222">.  Dr     - the right diagonal matrix of the diagonal scaling algorithm</font>
+<a name="line1068">1068: </a><font color="#B22222">.  its    - number of iterations of the diagonal scaling algorithm</font>
+<a name="line1069">1069: </a><font color="#B22222">-  lambda - approximation to wanted eigenvalues (modulus)</font>
+
+<a name="line1071">1071: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1072">1072: </a><font color="#B22222">+  -pep_scale <type> - scaling type, one of <none,scalar,diagonal,both></font>
+<a name="line1073">1073: </a><font color="#B22222">.  -pep_scale_factor <alpha> - the scaling factor</font>
+<a name="line1074">1074: </a><font color="#B22222">.  -pep_scale_its <its> - number of iterations</font>
+<a name="line1075">1075: </a><font color="#B22222">-  -pep_scale_lambda <lambda> - approximation to eigenvalues</font>
 
 <a name="line1077">1077: </a><font color="#B22222">   Notes:</font>
-<a name="line1078">1078: </a><font color="#B22222">   By default, iterative refinement is disabled, since it may be very</font>
-<a name="line1079">1079: </a><font color="#B22222">   costly. There are two possible refinement strategies: simple and multiple.</font>
-<a name="line1080">1080: </a><font color="#B22222">   The simple approach performs iterative refinement on each of the</font>
-<a name="line1081">1081: </a><font color="#B22222">   converged eigenpairs individually, whereas the multiple strategy works</font>
-<a name="line1082">1082: </a><font color="#B22222">   with the invariant pair as a whole, refining all eigenpairs simultaneously.</font>
-<a name="line1083">1083: </a><font color="#B22222">   The latter may be required for the case of multiple eigenvalues.</font>
-
-<a name="line1085">1085: </a><font color="#B22222">   In some cases, especially when using direct solvers within the</font>
-<a name="line1086">1086: </a><font color="#B22222">   iterative refinement method, it may be helpful for improved scalability</font>
-<a name="line1087">1087: </a><font color="#B22222">   to split the communicator in several partitions. The npart parameter</font>
-<a name="line1088">1088: </a><font color="#B22222">   indicates how many partitions to use (defaults to 1).</font>
-
-<a name="line1090">1090: </a><font color="#B22222">   The tol and its parameters specify the stopping criterion. In the simple</font>
-<a name="line1091">1091: </a><font color="#B22222">   method, refinement continues until the residual of each eigenpair is</font>
-<a name="line1092">1092: </a><font color="#B22222">   below the tolerance (tol defaults to the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> tol, but may be set to a</font>
-<a name="line1093">1093: </a><font color="#B22222">   different value). In contrast, the multiple method simply performs its</font>
-<a name="line1094">1094: </a><font color="#B22222">   refinement iterations (just one by default).</font>
-
-<a name="line1096">1096: </a><font color="#B22222">   The schur flag is used to change the way in which linear systems are</font>
-<a name="line1097">1097: </a><font color="#B22222">   solved, so that a Schur complement approach is used instead of explicitly</font>
-<a name="line1098">1098: </a><font color="#B22222">   building the coefficient matrix.</font>
-
-<a name="line1100">1100: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1102">1102: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>()</font>
-<a name="line1103">1103: </a><font color="#B22222">@*/</font>
-<a name="line1104">1104: </a><strong><font color="#4169E1"><a name="PEPSetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a> refine,PetscInt npart,PetscReal tol,PetscInt its,PetscBool schur)</font></strong>
-<a name="line1105">1105: </a>{
-<a name="line1107">1107: </a>  PetscMPIInt    size;
-
-<a name="line1116">1116: </a>  pep->refine = refine;
-<a name="line1117">1117: </a>  <font color="#4169E1">if</font> (refine) {  <font color="#B22222">/* process parameters only if not REFINE_NONE */</font>
-<a name="line1118">1118: </a>    <font color="#4169E1">if</font> (npart!=pep->npart) {
-<a name="line1119">1119: </a>      PetscSubcommDestroy(&pep->refinesubc);
-<a name="line1120">1120: </a>      KSPDestroy(&pep->refineksp);
-<a name="line1121">1121: </a>    }
-<a name="line1122">1122: </a>    <font color="#4169E1">if</font> (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
-<a name="line1123">1123: </a>      pep->npart = 1;
-<a name="line1124">1124: </a>    } <font color="#4169E1">else</font> {
-<a name="line1125">1125: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&size);
-<a name="line1126">1126: </a>      <font color="#4169E1">if</font> (npart<1 || npart>size) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of npart"</font>);
-<a name="line1127">1127: </a>      pep->npart = npart;
-<a name="line1128">1128: </a>    }
-<a name="line1129">1129: </a>    <font color="#4169E1">if</font> (tol == PETSC_DEFAULT || tol == PETSC_DECIDE) {
-<a name="line1130">1130: </a>      pep->rtol = pep->tol;
-<a name="line1131">1131: </a>    } <font color="#4169E1">else</font> {
-<a name="line1132">1132: </a>      <font color="#4169E1">if</font> (tol<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
-<a name="line1133">1133: </a>      pep->rtol = tol;
-<a name="line1134">1134: </a>    }
-<a name="line1135">1135: </a>    <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) {
-<a name="line1136">1136: </a>      pep->rits = PETSC_DEFAULT;
-<a name="line1137">1137: </a>    } <font color="#4169E1">else</font> {
-<a name="line1138">1138: </a>      <font color="#4169E1">if</font> (its<0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of its. Must be >= 0"</font>);
-<a name="line1139">1139: </a>      pep->rits = its;
-<a name="line1140">1140: </a>    }
-<a name="line1141">1141: </a>    pep->schur = schur;
-<a name="line1142">1142: </a>  }
-<a name="line1143">1143: </a>  pep->state = PEP_STATE_INITIAL;
-<a name="line1144">1144: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1145">1145: </a>}
-
-<a name="line1149">1149: </a><font color="#B22222">/*@</font>
-<a name="line1150">1150: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a> - Gets the refinement strategy used by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object, and the</font>
-<a name="line1151">1151: </a><font color="#B22222">   associated parameters.</font>
-
-<a name="line1153">1153: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1155">1155: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1156">1156: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line1158">1158: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1159">1159: </a><font color="#B22222">+  refine - refinement type</font>
-<a name="line1160">1160: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
-<a name="line1161">1161: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
-<a name="line1162">1162: </a><font color="#B22222">.  its    - maximum number of refinement iterations</font>
-<a name="line1163">1163: </a><font color="#B22222">-  schur  - whether the Schur complement approach is being used</font>
+<a name="line1078">1078: </a><font color="#B22222">   There are two non-exclusive scaling strategies: scalar and diagonal.</font>
+
+<a name="line1080">1080: </a><font color="#B22222">   In the scalar strategy, scaling is applied to the eigenvalue, that is,</font>
+<a name="line1081">1081: </a><font color="#B22222">   mu = lambda/alpha is the new eigenvalue and all matrices are scaled</font>
+<a name="line1082">1082: </a><font color="#B22222">   accordingly. After solving the scaled problem, the original lambda is</font>
+<a name="line1083">1083: </a><font color="#B22222">   recovered. Parameter 'alpha' must be positive. Use PETSC_DECIDE to let</font>
+<a name="line1084">1084: </a><font color="#B22222">   the solver compute a reasonable scaling factor.</font>
+
+<a name="line1086">1086: </a><font color="#B22222">   In the diagonal strategy, the solver works implicitly with matrix Dl*A*Dr,</font>
+<a name="line1087">1087: </a><font color="#B22222">   where Dl and Dr are appropriate diagonal matrices. This improves the accuracy</font>
+<a name="line1088">1088: </a><font color="#B22222">   of the computed results in some cases. The user may provide the Dr and Dl</font>
+<a name="line1089">1089: </a><font color="#B22222">   matrices represented as Vec objects storing diagonal elements. If not</font>
+<a name="line1090">1090: </a><font color="#B22222">   provided, these matrices are computed internally. This option requires</font>
+<a name="line1091">1091: </a><font color="#B22222">   that the polynomial coefficient matrices are of MATAIJ type.</font>
+<a name="line1092">1092: </a><font color="#B22222">   The parameter 'its' is the number of iterations performed by the method.</font>
+<a name="line1093">1093: </a><font color="#B22222">   Parameter 'lambda' must be positive. Use PETSC_DECIDE or set lambda = 1.0 if</font>
+<a name="line1094">1094: </a><font color="#B22222">   no information about eigenvalues is available.</font>
+
+<a name="line1096">1096: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1098">1098: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>()</font>
+<a name="line1099">1099: </a><font color="#B22222">@*/</font>
+<a name="line1100">1100: </a><strong><font color="#4169E1"><a name="PEPSetScale"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a> scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)</font></strong>
+<a name="line1101">1101: </a>{
+
+<a name="line1107">1107: </a>  pep->scale = scale;
+<a name="line1108">1108: </a>  <font color="#4169E1">if</font> (scale==PEP_SCALE_SCALAR || scale==PEP_SCALE_BOTH) {
+<a name="line1110">1110: </a>    <font color="#4169E1">if</font> (alpha == PETSC_DEFAULT || alpha == PETSC_DECIDE) {
+<a name="line1111">1111: </a>      pep->sfactor = 0.0;
+<a name="line1112">1112: </a>      pep->sfactor_set = PETSC_FALSE;
+<a name="line1113">1113: </a>    } <font color="#4169E1">else</font> {
+<a name="line1114">1114: </a>      <font color="#4169E1">if</font> (alpha<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of alpha. Must be > 0"</font>);
+<a name="line1115">1115: </a>      pep->sfactor = alpha;
+<a name="line1116">1116: </a>      pep->sfactor_set = PETSC_TRUE;
+<a name="line1117">1117: </a>    }
+<a name="line1118">1118: </a>  }
+<a name="line1119">1119: </a>  <font color="#4169E1">if</font> (scale==PEP_SCALE_DIAGONAL || scale==PEP_SCALE_BOTH) {
+<a name="line1120">1120: </a>    <font color="#4169E1">if</font> (Dl) {
+<a name="line1123">1123: </a>      PetscObjectReference((PetscObject)Dl);
+<a name="line1124">1124: </a>      VecDestroy(&pep->Dl);
+<a name="line1125">1125: </a>      pep->Dl = Dl;
+<a name="line1126">1126: </a>    }
+<a name="line1127">1127: </a>    <font color="#4169E1">if</font> (Dr) {
+<a name="line1130">1130: </a>      PetscObjectReference((PetscObject)Dr);
+<a name="line1131">1131: </a>      VecDestroy(&pep->Dr);
+<a name="line1132">1132: </a>      pep->Dr = Dr;
+<a name="line1133">1133: </a>    }
+<a name="line1136">1136: </a>    <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) pep->sits = 5;
+<a name="line1137">1137: </a>    <font color="#4169E1">else</font> pep->sits = its;
+<a name="line1138">1138: </a>    <font color="#4169E1">if</font> (lambda==PETSC_DECIDE || lambda==PETSC_DEFAULT) pep->slambda = 1.0;
+<a name="line1139">1139: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (lambda<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of lambda. Must be > 0"</font>);
+<a name="line1140">1140: </a>    <font color="#4169E1">else</font> pep->slambda = lambda;
+<a name="line1141">1141: </a>  }
+<a name="line1142">1142: </a>  pep->state = PEP_STATE_INITIAL;
+<a name="line1143">1143: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1144">1144: </a>}
+
+<a name="line1148">1148: </a><font color="#B22222">/*@</font>
+<a name="line1149">1149: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a> - Gets the scaling strategy used by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object, and the</font>
+<a name="line1150">1150: </a><font color="#B22222">   associated parameters.</font>
+
+<a name="line1152">1152: </a><font color="#B22222">   Not Collectiv, but vectors are shared by all processors that share the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line1154">1154: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1155">1155: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line1157">1157: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1158">1158: </a><font color="#B22222">+  scale  - scaling strategy</font>
+<a name="line1159">1159: </a><font color="#B22222">.  alpha  - the scaling factor used in the scalar strategy</font>
+<a name="line1160">1160: </a><font color="#B22222">.  Dl     - the left diagonal matrix of the diagonal scaling algorithm</font>
+<a name="line1161">1161: </a><font color="#B22222">.  Dr     - the right diagonal matrix of the diagonal scaling algorithm</font>
+<a name="line1162">1162: </a><font color="#B22222">.  its    - number of iterations of the diagonal scaling algorithm</font>
+<a name="line1163">1163: </a><font color="#B22222">-  lambda - approximation to wanted eigenvalues (modulus)</font>
 
 <a name="line1165">1165: </a><font color="#B22222">   Level: intermediate</font>
 
 <a name="line1167">1167: </a><font color="#B22222">   Note:</font>
 <a name="line1168">1168: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
 
-<a name="line1170">1170: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>()</font>
-<a name="line1171">1171: </a><font color="#B22222">@*/</font>
-<a name="line1172">1172: </a><strong><font color="#4169E1"><a name="PEPGetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a> *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,PetscBool *schur)</font></strong>
-<a name="line1173">1173: </a>{
-<a name="line1176">1176: </a>  <font color="#4169E1">if</font> (refine) *refine = pep->refine;
-<a name="line1177">1177: </a>  <font color="#4169E1">if</font> (npart)  *npart  = pep->npart;
-<a name="line1178">1178: </a>  <font color="#4169E1">if</font> (tol)    *tol    = pep->rtol;
-<a name="line1179">1179: </a>  <font color="#4169E1">if</font> (its)    *its    = pep->rits;
-<a name="line1180">1180: </a>  <font color="#4169E1">if</font> (schur)  *schur  = pep->schur;
-<a name="line1181">1181: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1182">1182: </a>}
-
-<a name="line1186">1186: </a><font color="#B22222">/*@C</font>
-<a name="line1187">1187: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line1188">1188: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options in the database.</font>
-
-<a name="line1190">1190: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line1192">1192: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1193">1193: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
-<a name="line1194">1194: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> option requests</font>
-
-<a name="line1196">1196: </a><font color="#B22222">   Notes:</font>
-<a name="line1197">1197: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line1198">1198: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line1199">1199: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line1201">1201: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
-<a name="line1202">1202: </a><font color="#B22222">   different <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> contexts, one could call</font>
-<a name="line1203">1203: </a><font color="#B22222">.vb</font>
-<a name="line1204">1204: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(pep1,"qeig1_")</font>
-<a name="line1205">1205: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(pep2,"qeig2_")</font>
-<a name="line1206">1206: </a><font color="#B22222">.ve</font>
-
-<a name="line1208">1208: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1210">1210: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>()</font>
-<a name="line1211">1211: </a><font color="#B22222">@*/</font>
-<a name="line1212">1212: </a><strong><font color="#4169E1"><a name="PEPSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char *prefix)</font></strong>
-<a name="line1213">1213: </a>{
-
-<a name="line1218">1218: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
-<a name="line1219">1219: </a>  <a href="../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(pep->st,prefix);
-<a name="line1220">1220: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
-<a name="line1221">1221: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(pep->V,prefix);
-<a name="line1222">1222: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
-<a name="line1223">1223: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(pep->ds,prefix);
-<a name="line1224">1224: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
-<a name="line1225">1225: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(pep->rg,prefix);
-<a name="line1226">1226: </a>  PetscObjectSetOptionsPrefix((PetscObject)pep,prefix);
-<a name="line1227">1227: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1228">1228: </a>}
-
-<a name="line1232">1232: </a><font color="#B22222">/*@C</font>
-<a name="line1233">1233: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line1234">1234: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options in the database.</font>
-
-<a name="line1236">1236: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line1238">1238: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1239">1239: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
-<a name="line1240">1240: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> option requests</font>
-
-<a name="line1242">1242: </a><font color="#B22222">   Notes:</font>
-<a name="line1243">1243: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line1244">1244: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
-
-<a name="line1246">1246: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1248">1248: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>()</font>
-<a name="line1249">1249: </a><font color="#B22222">@*/</font>
-<a name="line1250">1250: </a><strong><font color="#4169E1"><a name="PEPAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char *prefix)</font></strong>
-<a name="line1251">1251: </a>{
-<a name="line1253">1253: </a>  PetscBool      flg;
-<a name="line1254">1254: </a>  <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
-
-<a name="line1258">1258: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
-<a name="line1259">1259: </a>  <a href="../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(pep->st,prefix);
-<a name="line1260">1260: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
-<a name="line1261">1261: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(pep->V,prefix);
-<a name="line1262">1262: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
-<a name="line1263">1263: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(pep->ds,prefix);
-<a name="line1264">1264: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
-<a name="line1265">1265: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(pep->rg,prefix);
-<a name="line1266">1266: </a>  PetscObjectAppendOptionsPrefix((PetscObject)pep,prefix);
-<a name="line1267">1267: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&flg);
-<a name="line1268">1268: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line1269">1269: </a>    <a href="../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&eps);
-<a name="line1270">1270: </a>    <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps,((PetscObject)pep)->prefix);
-<a name="line1271">1271: </a>    <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(eps,<font color="#666666">"pep_"</font>);
-<a name="line1272">1272: </a>  }
-<a name="line1273">1273: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1274">1274: </a>}
-
-<a name="line1278">1278: </a><font color="#B22222">/*@C</font>
-<a name="line1279">1279: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line1280">1280: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options in the database.</font>
-
-<a name="line1282">1282: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line1284">1284: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1285">1285: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
-
-<a name="line1287">1287: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line1288">1288: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
-
-<a name="line1290">1290: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line1291">1291: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
-
-<a name="line1293">1293: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1295">1295: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>()</font>
-<a name="line1296">1296: </a><font color="#B22222">@*/</font>
-<a name="line1297">1297: </a><strong><font color="#4169E1"><a name="PEPGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char *prefix[])</font></strong>
-<a name="line1298">1298: </a>{
-
-<a name="line1304">1304: </a>  PetscObjectGetOptionsPrefix((PetscObject)pep,prefix);
-<a name="line1305">1305: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1306">1306: </a>}
+<a name="line1170">1170: </a><font color="#B22222">   If Dl or Dr were not set by the user, then the ones computed internally are</font>
+<a name="line1171">1171: </a><font color="#B22222">   returned (or a null pointer if called before <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>).</font>
+
+<a name="line1173">1173: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetScale.html#PEPSetScale">PEPSetScale</a>(), <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>()</font>
+<a name="line1174">1174: </a><font color="#B22222">@*/</font>
+<a name="line1175">1175: </a><strong><font color="#4169E1"><a name="PEPGetScale"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetScale.html#PEPGetScale">PEPGetScale</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPScale.html#PEPScale">PEPScale</a> *scale,PetscReal *alpha,Vec *Dl,Vec *Dr,PetscInt *its,PetscReal *lambda)</font></strong>
+<a name="line1176">1176: </a>{
+<a name="line1179">1179: </a>  <font color="#4169E1">if</font> (scale)  *scale  = pep->scale;
+<a name="line1180">1180: </a>  <font color="#4169E1">if</font> (alpha)  *alpha  = pep->sfactor;
+<a name="line1181">1181: </a>  <font color="#4169E1">if</font> (Dl)     *Dl     = pep->Dl;
+<a name="line1182">1182: </a>  <font color="#4169E1">if</font> (Dr)     *Dr     = pep->Dr;
+<a name="line1183">1183: </a>  <font color="#4169E1">if</font> (its)    *its    = pep->sits;
+<a name="line1184">1184: </a>  <font color="#4169E1">if</font> (lambda) *lambda = pep->slambda;
+<a name="line1185">1185: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1186">1186: </a>}
+
+<a name="line1190">1190: </a><font color="#B22222">/*@</font>
+<a name="line1191">1191: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a> - Specifies the extraction strategy to be used.</font>
+
+<a name="line1193">1193: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line1195">1195: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1196">1196: </a><font color="#B22222">+  pep     - the eigensolver context</font>
+<a name="line1197">1197: </a><font color="#B22222">-  extract - extraction strategy</font>
+
+<a name="line1199">1199: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1200">1200: </a><font color="#B22222">.  -pep_extract <type> - extraction type, one of <none,norm,residual,structured></font>
+
+<a name="line1202">1202: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1204">1204: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>()</font>
+<a name="line1205">1205: </a><font color="#B22222">@*/</font>
+<a name="line1206">1206: </a><strong><font color="#4169E1"><a name="PEPSetExtract"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a> extract)</font></strong>
+<a name="line1207">1207: </a>{
+<a name="line1211">1211: </a>  pep->extract = extract;
+<a name="line1212">1212: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1213">1213: </a>}
+
+<a name="line1217">1217: </a><font color="#B22222">/*@</font>
+<a name="line1218">1218: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a> - Gets the extraction strategy used by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object.</font>
+
+<a name="line1220">1220: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1222">1222: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1223">1223: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line1225">1225: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1226">1226: </a><font color="#B22222">.  extract - extraction strategy</font>
+
+<a name="line1228">1228: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1230">1230: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetExtract.html#PEPSetExtract">PEPSetExtract</a>()</font>
+<a name="line1231">1231: </a><font color="#B22222">@*/</font>
+<a name="line1232">1232: </a><strong><font color="#4169E1"><a name="PEPGetExtract"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetExtract.html#PEPGetExtract">PEPGetExtract</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPExtract.html#PEPExtract">PEPExtract</a> *extract)</font></strong>
+<a name="line1233">1233: </a>{
+<a name="line1236">1236: </a>  <font color="#4169E1">if</font> (extract) *extract = pep->extract;
+<a name="line1237">1237: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1238">1238: </a>}
+
+<a name="line1242">1242: </a><font color="#B22222">/*@</font>
+<a name="line1243">1243: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a> - Specifies the refinement type (and options) to be used</font>
+<a name="line1244">1244: </a><font color="#B22222">   after the solve.</font>
+
+<a name="line1246">1246: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line1248">1248: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1249">1249: </a><font color="#B22222">+  pep    - the polynomial eigensolver context</font>
+<a name="line1250">1250: </a><font color="#B22222">.  refine - refinement type</font>
+<a name="line1251">1251: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
+<a name="line1252">1252: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
+<a name="line1253">1253: </a><font color="#B22222">.  its    - maximum number of refinement iterations</font>
+<a name="line1254">1254: </a><font color="#B22222">-  scheme - which scheme to be used for solving the involved linear systems</font>
+
+<a name="line1256">1256: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1257">1257: </a><font color="#B22222">+  -pep_refine <type> - refinement type, one of <none,simple,multiple></font>
+<a name="line1258">1258: </a><font color="#B22222">.  -pep_refine_partitions <n> - the number of partitions</font>
+<a name="line1259">1259: </a><font color="#B22222">.  -pep_refine_tol <tol> - the tolerance</font>
+<a name="line1260">1260: </a><font color="#B22222">.  -pep_refine_its <its> - number of iterations</font>
+<a name="line1261">1261: </a><font color="#B22222">-  -pep_refine_scheme - to set the scheme for the linear solves</font>
+
+<a name="line1263">1263: </a><font color="#B22222">   Notes:</font>
+<a name="line1264">1264: </a><font color="#B22222">   By default, iterative refinement is disabled, since it may be very</font>
+<a name="line1265">1265: </a><font color="#B22222">   costly. There are two possible refinement strategies: simple and multiple.</font>
+<a name="line1266">1266: </a><font color="#B22222">   The simple approach performs iterative refinement on each of the</font>
+<a name="line1267">1267: </a><font color="#B22222">   converged eigenpairs individually, whereas the multiple strategy works</font>
+<a name="line1268">1268: </a><font color="#B22222">   with the invariant pair as a whole, refining all eigenpairs simultaneously.</font>
+<a name="line1269">1269: </a><font color="#B22222">   The latter may be required for the case of multiple eigenvalues.</font>
+
+<a name="line1271">1271: </a><font color="#B22222">   In some cases, especially when using direct solvers within the</font>
+<a name="line1272">1272: </a><font color="#B22222">   iterative refinement method, it may be helpful for improved scalability</font>
+<a name="line1273">1273: </a><font color="#B22222">   to split the communicator in several partitions. The npart parameter</font>
+<a name="line1274">1274: </a><font color="#B22222">   indicates how many partitions to use (defaults to 1).</font>
+
+<a name="line1276">1276: </a><font color="#B22222">   The tol and its parameters specify the stopping criterion. In the simple</font>
+<a name="line1277">1277: </a><font color="#B22222">   method, refinement continues until the residual of each eigenpair is</font>
+<a name="line1278">1278: </a><font color="#B22222">   below the tolerance (tol defaults to the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> tol, but may be set to a</font>
+<a name="line1279">1279: </a><font color="#B22222">   different value). In contrast, the multiple method simply performs its</font>
+<a name="line1280">1280: </a><font color="#B22222">   refinement iterations (just one by default).</font>
+
+<a name="line1282">1282: </a><font color="#B22222">   The scheme argument is used to change the way in which linear systems are</font>
+<a name="line1283">1283: </a><font color="#B22222">   solved. Possible choices are: explicit, mixed block elimination (MBE), </font>
+<a name="line1284">1284: </a><font color="#B22222">   and Schur complement.</font>
+
+<a name="line1286">1286: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1288">1288: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>()</font>
+<a name="line1289">1289: </a><font color="#B22222">@*/</font>
+<a name="line1290">1290: </a><strong><font color="#4169E1"><a name="PEPSetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a> refine,PetscInt npart,PetscReal tol,PetscInt its,<a href="../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a> scheme)</font [...]
+<a name="line1291">1291: </a>{
+<a name="line1293">1293: </a>  PetscMPIInt    size;
+
+<a name="line1302">1302: </a>  pep->refine = refine;
+<a name="line1303">1303: </a>  <font color="#4169E1">if</font> (refine) {  <font color="#B22222">/* process parameters only if not REFINE_NONE */</font>
+<a name="line1304">1304: </a>    <font color="#4169E1">if</font> (npart!=pep->npart) {
+<a name="line1305">1305: </a>      PetscSubcommDestroy(&pep->refinesubc);
+<a name="line1306">1306: </a>      KSPDestroy(&pep->refineksp);
+<a name="line1307">1307: </a>    }
+<a name="line1308">1308: </a>    <font color="#4169E1">if</font> (npart == PETSC_DEFAULT || npart == PETSC_DECIDE) {
+<a name="line1309">1309: </a>      pep->npart = 1;
+<a name="line1310">1310: </a>    } <font color="#4169E1">else</font> {
+<a name="line1311">1311: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pep),&size);
+<a name="line1312">1312: </a>      <font color="#4169E1">if</font> (npart<1 || npart>size) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of npart"</font>);
+<a name="line1313">1313: </a>      pep->npart = npart;
+<a name="line1314">1314: </a>    }
+<a name="line1315">1315: </a>    <font color="#4169E1">if</font> (tol == PETSC_DEFAULT || tol == PETSC_DECIDE) {
+<a name="line1316">1316: </a>      pep->rtol = PetscMax(pep->tol/1000,PETSC_MACHINE_EPSILON);
+<a name="line1317">1317: </a>    } <font color="#4169E1">else</font> {
+<a name="line1318">1318: </a>      <font color="#4169E1">if</font> (tol<=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line1319">1319: </a>      pep->rtol = tol;
+<a name="line1320">1320: </a>    }
+<a name="line1321">1321: </a>    <font color="#4169E1">if</font> (its==PETSC_DECIDE || its==PETSC_DEFAULT) {
+<a name="line1322">1322: </a>      pep->rits = PETSC_DEFAULT;
+<a name="line1323">1323: </a>    } <font color="#4169E1">else</font> {
+<a name="line1324">1324: </a>      <font color="#4169E1">if</font> (its<0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of its. Must be >= 0"</font>);
+<a name="line1325">1325: </a>      pep->rits = its;
+<a name="line1326">1326: </a>    }
+<a name="line1327">1327: </a>    pep->scheme = scheme;
+<a name="line1328">1328: </a>  }
+<a name="line1329">1329: </a>  pep->state = PEP_STATE_INITIAL;
+<a name="line1330">1330: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1331">1331: </a>}
+
+<a name="line1335">1335: </a><font color="#B22222">/*@</font>
+<a name="line1336">1336: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a> - Gets the refinement strategy used by the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> object, and the</font>
+<a name="line1337">1337: </a><font color="#B22222">   associated parameters.</font>
+
+<a name="line1339">1339: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1341">1341: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1342">1342: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line1344">1344: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1345">1345: </a><font color="#B22222">+  refine - refinement type</font>
+<a name="line1346">1346: </a><font color="#B22222">.  npart  - number of partitions of the communicator</font>
+<a name="line1347">1347: </a><font color="#B22222">.  tol    - the convergence tolerance</font>
+<a name="line1348">1348: </a><font color="#B22222">.  its    - maximum number of refinement iterations</font>
+<a name="line1349">1349: </a><font color="#B22222">-  scheme - the scheme used for solving linear systems</font>
+
+<a name="line1351">1351: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1353">1353: </a><font color="#B22222">   Note:</font>
+<a name="line1354">1354: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line1356">1356: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetRefine.html#PEPSetRefine">PEPSetRefine</a>()</font>
+<a name="line1357">1357: </a><font color="#B22222">@*/</font>
+<a name="line1358">1358: </a><strong><font color="#4169E1"><a name="PEPGetRefine"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetRefine.html#PEPGetRefine">PEPGetRefine</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPRefine.html#PEPRefine">PEPRefine</a> *refine,PetscInt *npart,PetscReal *tol,PetscInt *its,<a href="../../../docs/manualpages/PEP/PEPRefineScheme.html#PEPRefineScheme">PEPRefineScheme</a> *scheme)< [...]
+<a name="line1359">1359: </a>{
+<a name="line1362">1362: </a>  <font color="#4169E1">if</font> (refine) *refine = pep->refine;
+<a name="line1363">1363: </a>  <font color="#4169E1">if</font> (npart)  *npart  = pep->npart;
+<a name="line1364">1364: </a>  <font color="#4169E1">if</font> (tol)    *tol    = pep->rtol;
+<a name="line1365">1365: </a>  <font color="#4169E1">if</font> (its)    *its    = pep->rits;
+<a name="line1366">1366: </a>  <font color="#4169E1">if</font> (scheme) *scheme = pep->scheme;
+<a name="line1367">1367: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1368">1368: </a>}
+
+<a name="line1372">1372: </a><font color="#B22222">/*@C</font>
+<a name="line1373">1373: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line1374">1374: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options in the database.</font>
+
+<a name="line1376">1376: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line1378">1378: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1379">1379: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
+<a name="line1380">1380: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> option requests</font>
+
+<a name="line1382">1382: </a><font color="#B22222">   Notes:</font>
+<a name="line1383">1383: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line1384">1384: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line1385">1385: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line1387">1387: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
+<a name="line1388">1388: </a><font color="#B22222">   different <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> contexts, one could call</font>
+<a name="line1389">1389: </a><font color="#B22222">.vb</font>
+<a name="line1390">1390: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(pep1,"qeig1_")</font>
+<a name="line1391">1391: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(pep2,"qeig2_")</font>
+<a name="line1392">1392: </a><font color="#B22222">.ve</font>
+
+<a name="line1394">1394: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1396">1396: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>()</font>
+<a name="line1397">1397: </a><font color="#B22222">@*/</font>
+<a name="line1398">1398: </a><strong><font color="#4169E1"><a name="PEPSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char *prefix)</font></strong>
+<a name="line1399">1399: </a>{
+
+<a name="line1404">1404: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
+<a name="line1405">1405: </a>  <a href="../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(pep->st,prefix);
+<a name="line1406">1406: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
+<a name="line1407">1407: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(pep->V,prefix);
+<a name="line1408">1408: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
+<a name="line1409">1409: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(pep->ds,prefix);
+<a name="line1410">1410: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
+<a name="line1411">1411: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(pep->rg,prefix);
+<a name="line1412">1412: </a>  PetscObjectSetOptionsPrefix((PetscObject)pep,prefix);
+<a name="line1413">1413: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1414">1414: </a>}
+
+<a name="line1418">1418: </a><font color="#B22222">/*@C</font>
+<a name="line1419">1419: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line1420">1420: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options in the database.</font>
+
+<a name="line1422">1422: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line1424">1424: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1425">1425: </a><font color="#B22222">+  pep - the polynomial eigensolver context</font>
+<a name="line1426">1426: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> option requests</font>
+
+<a name="line1428">1428: </a><font color="#B22222">   Notes:</font>
+<a name="line1429">1429: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line1430">1430: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+
+<a name="line1432">1432: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1434">1434: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>()</font>
+<a name="line1435">1435: </a><font color="#B22222">@*/</font>
+<a name="line1436">1436: </a><strong><font color="#4169E1"><a name="PEPAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char *prefix)</font></strong>
+<a name="line1437">1437: </a>{
+<a name="line1439">1439: </a>  PetscBool      flg;
+<a name="line1440">1440: </a>  <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
+
+<a name="line1444">1444: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
+<a name="line1445">1445: </a>  <a href="../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(pep->st,prefix);
+<a name="line1446">1446: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
+<a name="line1447">1447: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(pep->V,prefix);
+<a name="line1448">1448: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
+<a name="line1449">1449: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(pep->ds,prefix);
+<a name="line1450">1450: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
+<a name="line1451">1451: </a>  <a href="../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(pep->rg,prefix);
+<a name="line1452">1452: </a>  PetscObjectAppendOptionsPrefix((PetscObject)pep,prefix);
+<a name="line1453">1453: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&flg);
+<a name="line1454">1454: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line1455">1455: </a>    <a href="../../../docs/manualpages/PEP/PEPLinearGetEPS.html#PEPLinearGetEPS">PEPLinearGetEPS</a>(pep,&eps);
+<a name="line1456">1456: </a>    <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps,((PetscObject)pep)->prefix);
+<a name="line1457">1457: </a>    <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(eps,<font color="#666666">"pep_"</font>);
+<a name="line1458">1458: </a>  }
+<a name="line1459">1459: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1460">1460: </a>}
+
+<a name="line1464">1464: </a><font color="#B22222">/*@C</font>
+<a name="line1465">1465: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line1466">1466: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> options in the database.</font>
+
+<a name="line1468">1468: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1470">1470: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1471">1471: </a><font color="#B22222">.  pep - the polynomial eigensolver context</font>
+
+<a name="line1473">1473: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line1474">1474: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+
+<a name="line1476">1476: </a><font color="#B22222">   Note:</font>
+<a name="line1477">1477: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line1478">1478: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+
+<a name="line1480">1480: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1482">1482: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOptionsPrefix.html#PEPSetOptionsPrefix">PEPSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/PEP/PEPAppendOptionsPrefix.html#PEPAppendOptionsPrefix">PEPAppendOptionsPrefix</a>()</font>
+<a name="line1483">1483: </a><font color="#B22222">@*/</font>
+<a name="line1484">1484: </a><strong><font color="#4169E1"><a name="PEPGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetOptionsPrefix.html#PEPGetOptionsPrefix">PEPGetOptionsPrefix</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,const char *prefix[])</font></strong>
+<a name="line1485">1485: </a>{
+
+<a name="line1491">1491: </a>  PetscObjectGetOptionsPrefix((PetscObject)pep,prefix);
+<a name="line1492">1492: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1493">1493: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/interface/peprefine.c b/src/pep/interface/peprefine.c
index 9ba0441..5032c2e 100644
--- a/src/pep/interface/peprefine.c
+++ b/src/pep/interface/peprefine.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -27,23 +27,47 @@
 #define NREF_MAXIT 10
 
 typedef struct {
-  VecScatter    *scatter_id;
-  Mat           *A;
-  Vec           vg,v;
+  VecScatter *scatter_id,nst;
+  Mat        *A;
+  Vec        nv,vg,v,w;
 } PEPSimpNRefctx;
 
+typedef struct {
+  Mat          M1;
+  Vec          M2,M3;
+  PetscScalar  M4,m3;
+} FSubctx;
+
+#undef __FUNCT__
+#define __FUNCT__ "MatFSMult"
+static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)
+{
+  PetscErrorCode ierr;
+  FSubctx        *ctx;
+  PetscScalar    t;
+  
+  PetscFunctionBegin;
+  ierr = MatShellGetContext(M,&ctx);CHKERRQ(ierr);
+  ierr = VecDot(x,ctx->M3,&t);CHKERRQ(ierr);
+  t *= ctx->m3/ctx->M4;
+  ierr = MatMult(ctx->M1,x,y);CHKERRQ(ierr);
+  ierr = VecAXPY(y,-t,ctx->M2);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
 #undef __FUNCT__
 #define __FUNCT__ "PEPSimpleNRefSetUp"
 static PetscErrorCode PEPSimpleNRefSetUp(PEP pep,PEPSimpNRefctx **ctx_)
 {
   PetscErrorCode ierr;
-  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2;
+  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2,ne;
   IS             is1,is2;
   PEPSimpNRefctx *ctx;
   Vec            v;
+  PetscMPIInt    rank,size;
 
   PetscFunctionBegin;
-  ierr = PetscMalloc1(1,ctx_);CHKERRQ(ierr);
+  ierr = PetscCalloc1(1,ctx_);CHKERRQ(ierr);
   ctx = *ctx_;
   if (pep->npart==1) {
     pep->refinesubc = NULL;
@@ -81,6 +105,27 @@ static PetscErrorCode PEPSimpleNRefSetUp(PEP pep,PEPSimpNRefctx **ctx_)
     }
     ierr = PetscFree2(idx1,idx2);CHKERRQ(ierr);
   }
+  if (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT){
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)ctx->A[0]),&rank);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)ctx->A[0]),&size);CHKERRQ(ierr);
+    if (size>1) {
+      if (pep->npart==1) {
+        ierr = BVGetColumn(pep->V,0,&v);CHKERRQ(ierr);
+      } else v = ctx->v;
+      ierr = VecGetOwnershipRange(v,&n0,&m0);CHKERRQ(ierr);
+      ne = (rank == size-1)?pep->n:0;
+      ierr = VecCreateMPI(PetscObjectComm((PetscObject)ctx->A[0]),ne,PETSC_DECIDE,&ctx->nv);CHKERRQ(ierr);
+      ierr = PetscMalloc1(m0-n0,&idx1);CHKERRQ(ierr);
+      for (i=n0;i<m0;i++) idx1[i-n0] = i;
+      ierr = ISCreateGeneral(PetscObjectComm((PetscObject)pep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);CHKERRQ(ierr);
+      ierr = VecScatterCreate(v,is1,ctx->nv,is1,&ctx->nst);CHKERRQ(ierr);
+      if (pep->npart==1) {
+        ierr = BVRestoreColumn(pep->V,0,&v);CHKERRQ(ierr);
+      }
+      ierr = PetscFree(idx1);CHKERRQ(ierr);
+      ierr = ISDestroy(&is1);CHKERRQ(ierr);
+    }
+  } 
   PetscFunctionReturn(0);  
 }
 
@@ -89,7 +134,7 @@ static PetscErrorCode PEPSimpleNRefSetUp(PEP pep,PEPSimpNRefctx **ctx_)
 */
 #undef __FUNCT__
 #define __FUNCT__ "PEPSimpleNRefGatherEigenpair"
-static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)
+static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)
 {
   PetscErrorCode    ierr;
   PetscMPIInt       nproc,p;
@@ -98,26 +143,34 @@ static PetscErrorCode PEPSimpleNRefGatherEigenpair(PEP pep,PEPSimpNRefctx *ctx,P
   const PetscScalar *array;
 
   PetscFunctionBegin;
-  /* The eigenvalue information is in the last process of the 
-     subcommunicator sc. p is its mapping in the general comm */
-  ierr = MPI_Comm_size(comm,&nproc);CHKERRQ(ierr);
-  p = (nproc/pep->npart)*(sc+1)+PetscMin(nproc%pep->npart,sc+1)-1;
-  ierr = MPI_Bcast(&pep->eigr[idx],1,MPIU_SCALAR,p,comm);CHKERRQ(ierr);
-
   if (pep->npart>1) {
-    /* Gather pep->V[idx] from the subcommuniator sc */
-    ierr = BVGetColumn(pep->V,idx,&v);CHKERRQ(ierr);
-    if (pep->refinesubc->color==sc) {
-      ierr = VecGetArrayRead(ctx->v,&array);CHKERRQ(ierr);
-      ierr = VecPlaceArray(ctx->vg,array);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(comm,&nproc);CHKERRQ(ierr);
+    p = (nproc/pep->npart)*sc+PetscMin(sc,nproc%pep->npart);
+    /* Communicate convergence successful */
+    ierr = MPI_Bcast(fail,1,MPIU_INT,p,comm);CHKERRQ(ierr);
+    if (!(*fail)) {
+      /* Process 0 of subcommunicator sc broadcasts the eigenvalue */ 
+      ierr = MPI_Bcast(&pep->eigr[idx],1,MPIU_SCALAR,p,comm);CHKERRQ(ierr);
+      /* Gather pep->V[idx] from the subcommuniator sc */
+      ierr = BVGetColumn(pep->V,idx,&v);CHKERRQ(ierr);
+      if (pep->refinesubc->color==sc) {
+        ierr = VecGetArrayRead(ctx->v,&array);CHKERRQ(ierr);
+        ierr = VecPlaceArray(ctx->vg,array);CHKERRQ(ierr);
+      }
+      ierr = VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
+      ierr = VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
+      if (pep->refinesubc->color==sc) {
+        ierr = VecResetArray(ctx->vg);CHKERRQ(ierr);
+        ierr = VecRestoreArrayRead(ctx->v,&array);CHKERRQ(ierr);
+      }
+      ierr = BVRestoreColumn(pep->V,idx,&v);CHKERRQ(ierr);
     }
-    ierr = VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-    ierr = VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);CHKERRQ(ierr);
-    if (pep->refinesubc->color==sc) {
-      ierr = VecResetArray(ctx->vg);CHKERRQ(ierr);
-      ierr = VecRestoreArrayRead(ctx->v,&array);CHKERRQ(ierr);
+  } else {
+    if (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT && !(*fail)) {
+      ierr = MPI_Comm_size(comm,&nproc);CHKERRQ(ierr);
+      p = (nproc/pep->npart)*sc+PetscMin(sc,nproc%pep->npart);
+      ierr = MPI_Bcast(&pep->eigr[idx],1,MPIU_SCALAR,p,comm);CHKERRQ(ierr);
     }
-    ierr = BVRestoreColumn(pep->V,idx,&v);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -171,135 +224,203 @@ static PetscErrorCode PEPEvaluateFunctionDerivatives(PEP pep,PetscScalar alpha,P
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPSimpleNRefSetUpSystem"
-static PetscErrorCode PEPSimpleNRefSetUpSystem(PEP pep,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)
+static PetscErrorCode PEPSimpleNRefSetUpSystem(PEP pep,Mat *A,PEPSimpNRefctx *ctx,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)
 {
   PetscErrorCode    ierr;
-  PetscInt          i,nmat=pep->nmat,ml,m0,m1,mg;
-  PetscInt          *dnz,*onz,ncols,*cols2,*nnz;
-  PetscScalar       zero=0.0,*coeffs;
+  PetscInt          i,nmat=pep->nmat,ml,m0,n0,m1,mg;
+  PetscInt          *dnz,*onz,ncols,*cols2=NULL,*nnz;
+  PetscScalar       zero=0.0,*coeffs,*coeffs2;
   PetscMPIInt       rank,size;
   MPI_Comm          comm;
   const PetscInt    *cols;
   const PetscScalar *vals,*array;
   MatStructure      str;
-  Vec               w=t[1],q=t[0];
+  FSubctx           *fctx;
+  Vec               w=ctx->w;
+  Mat               M;
 
   PetscFunctionBegin;
-  comm = PetscObjectComm((PetscObject)A[0]);
   ierr = STGetMatStructure(pep->st,&str);CHKERRQ(ierr);
-  ierr = PetscMalloc1(nmat,&coeffs);CHKERRQ(ierr);
-  ierr = MPI_Comm_rank(comm,&rank);CHKERRQ(ierr);
-  ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
+  ierr = PetscMalloc2(nmat,&coeffs,nmat,&coeffs2);CHKERRQ(ierr);
+  switch (pep->scheme) {
+  case PEP_REFINE_SCHEME_SCHUR:
+    if (ini) {
+      ierr = PetscCalloc1(1,&fctx);CHKERRQ(ierr);
+      ierr = MatGetSize(A[0],&m0,&n0);CHKERRQ(ierr);
+      ierr = MatCreateShell(PetscObjectComm((PetscObject)A[0]),PETSC_DECIDE,PETSC_DECIDE,m0,n0,fctx,T);CHKERRQ(ierr);
+      ierr = MatShellSetOperation(*T,MATOP_MULT,(void(*)(void))MatFSMult);CHKERRQ(ierr);
+    } else {
+      ierr = MatShellGetContext(*T,&fctx);CHKERRQ(ierr);
+    }    
+    M=fctx->M1;
+    break;
+  case PEP_REFINE_SCHEME_MBE:
+    M=*T;
+    break;
+  case PEP_REFINE_SCHEME_EXPLICIT:
+    M=*Mt;
+    break;
+  }
   if (ini) {
-    ierr = MatDuplicate(A[0],MAT_COPY_VALUES,T);CHKERRQ(ierr);
+    ierr = MatDuplicate(A[0],MAT_COPY_VALUES,&M);CHKERRQ(ierr);
   } else {
-    ierr = MatCopy(A[0],*T,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatCopy(A[0],M,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
   }
   ierr = PEPEvaluateBasis(pep,pep->eigr[idx],0,coeffs,NULL);CHKERRQ(ierr);
-  ierr = MatScale(*T,coeffs[0]);CHKERRQ(ierr);
+  ierr = MatScale(M,coeffs[0]);CHKERRQ(ierr);
   for (i=1;i<nmat;i++) {
-    ierr = MatAXPY(*T,coeffs[i],A[i],(ini)?str:SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatAXPY(M,coeffs[i],A[i],(ini)?str:SUBSET_NONZERO_PATTERN);CHKERRQ(ierr);
   }
-  ierr = MatGetSize(*T,&mg,NULL);CHKERRQ(ierr);
-  ierr = MatGetOwnershipRange(*T,&m0,&m1);CHKERRQ(ierr);
-  if (ini) {
-    ierr = MatCreate(comm,M);CHKERRQ(ierr);
-    ierr = MatGetLocalSize(*T,&ml,NULL);CHKERRQ(ierr);
-    if (rank==size-1) ml++;
-    ierr = MatSetSizes(*M,ml,ml,mg+1,mg+1);CHKERRQ(ierr);
-    ierr = MatSetFromOptions(*M);CHKERRQ(ierr);
-    ierr = MatSetUp(*M);CHKERRQ(ierr);
-    /* Preallocate M */
+  ierr = PEPEvaluateFunctionDerivatives(pep,pep->eigr[idx],coeffs2);CHKERRQ(ierr);
+  for (i=0;i<nmat && PetscAbsScalar(coeffs2[i])==0.0;i++);
+  ierr = MatMult(A[i],v,w);CHKERRQ(ierr);
+  if (coeffs2[i]!=1.0) {
+    ierr = VecScale(w,coeffs2[i]);CHKERRQ(ierr);
+  }
+  for (i++;i<nmat;i++) {
+    ierr = MatMult(A[i],v,t);CHKERRQ(ierr);
+    ierr = VecAXPY(w,coeffs2[i],t);CHKERRQ(ierr);
+  }
+  switch (pep->scheme) {
+  case PEP_REFINE_SCHEME_EXPLICIT:
+    comm = PetscObjectComm((PetscObject)A[0]);
+    ierr = MPI_Comm_rank(comm,&rank);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
+    ierr = MatGetSize(M,&mg,NULL);CHKERRQ(ierr);
+    ierr = MatGetOwnershipRange(M,&m0,&m1);CHKERRQ(ierr);
+    if (ini) {
+      ierr = MatCreate(comm,T);CHKERRQ(ierr);
+      ierr = MatGetLocalSize(M,&ml,NULL);CHKERRQ(ierr);
+      if (rank==size-1) ml++;
+      ierr = MatSetSizes(*T,ml,ml,mg+1,mg+1);CHKERRQ(ierr);
+      ierr = MatSetFromOptions(*T);CHKERRQ(ierr);
+      ierr = MatSetUp(*T);CHKERRQ(ierr);
+      /* Preallocate M */
+      if (size>1) {
+        ierr = MatPreallocateInitialize(comm,ml,ml,dnz,onz);CHKERRQ(ierr);
+        for (i=m0;i<m1;i++) {
+          ierr = MatGetRow(M,i,&ncols,&cols,NULL);CHKERRQ(ierr);
+          ierr = MatPreallocateSet(i,ncols,cols,dnz,onz);CHKERRQ(ierr);
+          ierr = MatPreallocateSet(i,1,&mg,dnz,onz);CHKERRQ(ierr);
+          ierr = MatRestoreRow(M,i,&ncols,&cols,NULL);CHKERRQ(ierr);
+        }
+        if (rank==size-1) {
+          ierr = PetscCalloc1(mg+1,&cols2);CHKERRQ(ierr);
+          for (i=0;i<mg+1;i++) cols2[i]=i;
+          ierr = MatPreallocateSet(m1,mg+1,cols2,dnz,onz);CHKERRQ(ierr);
+          ierr = PetscFree(cols2);CHKERRQ(ierr);
+        }
+        ierr = MatMPIAIJSetPreallocation(*T,0,dnz,0,onz);CHKERRQ(ierr);
+        ierr = MatPreallocateFinalize(dnz,onz);CHKERRQ(ierr);
+      } else {
+        ierr = PetscCalloc1(mg+1,&nnz);CHKERRQ(ierr);
+        for (i=0;i<mg;i++) {
+          ierr = MatGetRow(M,i,&ncols,NULL,NULL);CHKERRQ(ierr);
+          nnz[i] = ncols+1;
+          ierr = MatRestoreRow(M,i,&ncols,NULL,NULL);CHKERRQ(ierr);
+        }
+        nnz[mg] = mg+1;
+        ierr = MatSeqAIJSetPreallocation(*T,0,nnz);CHKERRQ(ierr);
+        ierr = PetscFree(nnz);CHKERRQ(ierr);
+      }
+      *Mt = M;
+      *P  = *T;
+    }
+  
+    /* Set values */
+    ierr = VecGetArrayRead(w,&array);CHKERRQ(ierr);
+    for (i=m0;i<m1;i++) {
+      ierr = MatGetRow(M,i,&ncols,&cols,&vals);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&i,ncols,cols,vals,INSERT_VALUES);CHKERRQ(ierr);
+      ierr = MatRestoreRow(M,i,&ncols,&cols,&vals);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&i,1,&mg,array+i-m0,INSERT_VALUES);CHKERRQ(ierr);
+    }
+    ierr = VecRestoreArrayRead(w,&array);CHKERRQ(ierr);
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = MPI_Comm_size(PetscObjectComm((PetscObject)A[0]),&size);CHKERRQ(ierr);
+    ierr = MPI_Comm_rank(PetscObjectComm((PetscObject)A[0]),&rank);CHKERRQ(ierr);
     if (size>1) {
-      ierr = MatPreallocateInitialize(comm,ml,ml,dnz,onz);CHKERRQ(ierr);
-      for (i=m0;i<m1;i++) {
-        ierr = MatGetRow(*T,i,&ncols,&cols,NULL);CHKERRQ(ierr);
-        ierr = MatPreallocateSet(i,ncols,cols,dnz,onz);CHKERRQ(ierr);
-        ierr = MatPreallocateSet(i,1,&mg,dnz,onz);CHKERRQ(ierr);
-        ierr = MatRestoreRow(*T,i,&ncols,&cols,NULL);CHKERRQ(ierr);
+      if (rank==size-1) {
+        ierr = PetscMalloc1(pep->n,&cols2);CHKERRQ(ierr);
+        for (i=0;i<pep->n;i++) cols2[i]=i;
       }
+      ierr = VecScatterBegin(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecScatterEnd(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);CHKERRQ(ierr);
+      ierr = VecGetArrayRead(ctx->nv,&array);CHKERRQ(ierr);
       if (rank==size-1) {
-        ierr = PetscCalloc1(mg+1,&cols2);CHKERRQ(ierr);
-        for (i=0;i<mg+1;i++) cols2[i]=i;
-        ierr = MatPreallocateSet(m1,mg+1,cols2,dnz,onz);CHKERRQ(ierr);
-        ierr = PetscFree(cols2);CHKERRQ(ierr);
+        ierr = MatSetValues(*T,1,&mg,pep->n,cols2,array,INSERT_VALUES);CHKERRQ(ierr);
+        ierr = MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);CHKERRQ(ierr);
       }
-      ierr = MatMPIAIJSetPreallocation(*M,0,dnz,0,onz);CHKERRQ(ierr);
-      ierr = MatPreallocateFinalize(dnz,onz);CHKERRQ(ierr);
+        ierr = VecRestoreArrayRead(ctx->nv,&array);CHKERRQ(ierr);
     } else {
-      ierr = PetscCalloc1(mg+1,&nnz);CHKERRQ(ierr);
-      for (i=0;i<mg;i++) {
-        ierr = MatGetRow(*T,i,&ncols,NULL,NULL);CHKERRQ(ierr);
-        nnz[i] = ncols+1;
-        ierr = MatRestoreRow(*T,i,&ncols,NULL,NULL);CHKERRQ(ierr);
-      }
-      nnz[mg] = mg+1;
-      ierr = MatSeqAIJSetPreallocation(*M,0,nnz);CHKERRQ(ierr);
-      ierr = PetscFree(nnz);CHKERRQ(ierr);
+      ierr = PetscMalloc1(m1-m0,&cols2);CHKERRQ(ierr);
+      for (i=0;i<m1-m0;i++) cols2[i]=m0+i;
+      ierr = VecGetArrayRead(v,&array);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&mg,m1-m0,cols2,array,INSERT_VALUES);CHKERRQ(ierr);
+      ierr = MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);CHKERRQ(ierr);
+      ierr = VecRestoreArrayRead(v,&array);CHKERRQ(ierr);
     }
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = MatAssemblyBegin(*T,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
+    ierr = MatAssemblyEnd(*T,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); 
+    ierr = PetscFree(cols2);CHKERRQ(ierr);
+    break; 
+  case PEP_REFINE_SCHEME_SCHUR:
+    fctx->M2 = ctx->w;
+    fctx->M3 = v;
+    fctx->m3 = 0.0;
+    for (i=1;i<nmat-1;i++) fctx->m3 += PetscConj(coeffs[i])*coeffs[i];
+    fctx->M4 = 0.0;
+    for (i=1;i<nmat-1;i++) fctx->M4 += PetscConj(coeffs[i])*coeffs2[i];
+    fctx->M1 = M;
+    if (ini) {
+      ierr = MatDuplicate(M,MAT_COPY_VALUES,P);CHKERRQ(ierr);
+    } else {
+      ierr = MatCopy(M,*P,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    }
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = VecPointwiseMult(t,v,w);CHKERRQ(ierr);
+    ierr = VecConjugate(v);CHKERRQ(ierr);
+    ierr = VecScale(t,-fctx->m3/fctx->M4);CHKERRQ(ierr);
+    ierr = MatDiagonalSet(*P,t,ADD_VALUES);CHKERRQ(ierr);
+    break;
+  case PEP_REFINE_SCHEME_MBE:
+    *T = M;
+    *P = M;
+    break;
   }
-  ierr = PEPEvaluateFunctionDerivatives(pep,pep->eigr[idx],coeffs);CHKERRQ(ierr);
-  for (i=0;i<nmat && PetscAbsScalar(coeffs[i])==0.0;i++);
-  ierr = MatMult(A[i],v,w);CHKERRQ(ierr);
-  if (coeffs[i]!=1.0) {
-    ierr = VecScale(w,coeffs[i]);CHKERRQ(ierr);
-  }
-  for (i++;i<nmat;i++) {
-    ierr = MatMult(A[i],v,q);CHKERRQ(ierr);
-    ierr = VecAXPY(w,coeffs[i],q);CHKERRQ(ierr);
-  }
-  
-  /* Set values */
-  ierr = PetscMalloc1(m1-m0,&cols2);CHKERRQ(ierr);
-  for (i=0;i<m1-m0;i++) cols2[i]=m0+i;
-  ierr = VecGetArrayRead(w,&array);CHKERRQ(ierr);
-  for (i=m0;i<m1;i++) {
-    ierr = MatGetRow(*T,i,&ncols,&cols,&vals);CHKERRQ(ierr);
-    ierr = MatSetValues(*M,1,&i,ncols,cols,vals,INSERT_VALUES);CHKERRQ(ierr);
-    ierr = MatRestoreRow(*T,i,&ncols,&cols,&vals);CHKERRQ(ierr);
-    ierr = MatSetValues(*M,1,&i,1,&mg,array+i-m0,INSERT_VALUES);CHKERRQ(ierr);
-  }
-  ierr = VecRestoreArrayRead(w,&array);CHKERRQ(ierr);
-  ierr = VecConjugate(v);CHKERRQ(ierr);
-  ierr = VecGetArrayRead(v,&array);CHKERRQ(ierr);
-  ierr = MatSetValues(*M,1,&mg,m1-m0,cols2,array,INSERT_VALUES);CHKERRQ(ierr);
-  ierr = MatSetValues(*M,1,&mg,1,&mg,&zero,INSERT_VALUES);CHKERRQ(ierr);
-  ierr = VecRestoreArrayRead(v,&array);CHKERRQ(ierr);
-  ierr = VecConjugate(v);CHKERRQ(ierr);
-  ierr = MatAssemblyBegin(*M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);
-  ierr = MatAssemblyEnd(*M,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr);  
-  ierr = PetscFree(cols2);CHKERRQ(ierr);
-  ierr = PetscFree(coeffs);CHKERRQ(ierr);
+  ierr = PetscFree2(coeffs,coeffs2);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "PEPNewtonRefinementSimple"
-PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol,PetscInt k)
+PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal tol,PetscInt k)
 {
-  PetscErrorCode    ierr;
-  PetscInt          i,n,its,idx=0,*idx_sc,*its_sc,color;
-  PetscMPIInt       rank,size;
-  KSP               ksp;
-  Mat               M=NULL,T=NULL;
-  MPI_Comm          comm;
-  Vec               r,v,dv,rr=NULL,dvv=NULL,t[2];
-  PetscScalar       *array2;
-  const PetscScalar *array;
-  PetscReal         norm,error;
-  PetscBool         ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
-  PEPSimpNRefctx    *ctx;
+  PetscErrorCode     ierr;
+  PetscInt           i,n,its,idx=0,*idx_sc,*its_sc,color,*fail_sc;
+  PetscMPIInt        rank,size;
+  Mat                Mt=NULL,T=NULL,P=NULL;
+  MPI_Comm           comm;
+  Vec                r,v,dv,rr=NULL,dvv=NULL,t[2];
+  PetscScalar        *array2,deig=0.0,tt[2],ttt;
+  const PetscScalar  *array;
+  PetscReal          norm,error;
+  PetscBool          ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
+  PEPSimpNRefctx     *ctx;
+  FSubctx            *fctx=NULL;
   KSPConvergedReason reason;
 
   PetscFunctionBegin;
   ierr = PetscLogEventBegin(PEP_Refine,pep,0,0,0);CHKERRQ(ierr);
   ierr = PEPSimpleNRefSetUp(pep,&ctx);CHKERRQ(ierr);
   its = (maxits)?*maxits:NREF_MAXIT;
+  if (!pep->refineksp) { ierr = PEPRefineGetKSP(pep,&pep->refineksp);CHKERRQ(ierr); }
   comm = (pep->npart==1)?PetscObjectComm((PetscObject)pep):PetscSubcommChild(pep->refinesubc);
-  ierr = PEPRefineGetKSP(pep,&ksp);CHKERRQ(ierr);
   if (pep->npart==1) {
     ierr = BVGetColumn(pep->V,0,&v);CHKERRQ(ierr);
   } else v = ctx->v;
+  ierr = VecDuplicate(v,&ctx->w);CHKERRQ(ierr);
   ierr = VecDuplicate(v,&r);CHKERRQ(ierr);
   ierr = VecDuplicate(v,&dv);CHKERRQ(ierr);
   ierr = VecDuplicate(v,&t[0]);CHKERRQ(ierr);
@@ -308,7 +429,8 @@ PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol
   ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
   ierr = MPI_Comm_rank(comm,&rank);CHKERRQ(ierr);
   ierr = VecGetLocalSize(r,&n);CHKERRQ(ierr);
-  ierr = PetscMalloc2(pep->npart,&idx_sc,pep->npart,&its_sc);CHKERRQ(ierr);
+  ierr = PetscMalloc3(pep->npart,&idx_sc,pep->npart,&its_sc,pep->npart,&fail_sc);CHKERRQ(ierr);
+  for (i=0;i<pep->npart;i++) fail_sc[i] = 0;
   for (i=0;i<pep->npart;i++) its_sc[i] = 0;
   color = (pep->npart==1)?0:pep->refinesubc->color;
    
@@ -324,13 +446,13 @@ PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol
           ierr = PEPSimpleNRefScatterEigenvector(pep,ctx,i,idx_sc[i]);CHKERRQ(ierr);
         }
       }  else { /* Gather Eigenpair from subcommunicator i */
-        ierr = PEPSimpleNRefGatherEigenpair(pep,ctx,i,idx_sc[i]);CHKERRQ(ierr);
+        ierr = PEPSimpleNRefGatherEigenpair(pep,ctx,i,idx_sc[i],&fail_sc[i]);CHKERRQ(ierr);
       }
       while (sc_pend) {
-        if (tol) {
+        if (!fail_sc[i]) {
           ierr = PEPComputeError(pep,idx_sc[i],PEP_ERROR_BACKWARD,&error);CHKERRQ(ierr);
         }
-        if (error<=*tol || its_sc[i]>=its) {
+        if (error<=tol || its_sc[i]>=its || fail_sc[i]) {
           idx_sc[i] = idx++;
           its_sc[i] = 0;
           if (idx_sc[i]<k) { ierr = PEPSimpleNRefScatterEigenvector(pep,ctx,i,idx_sc[i]);CHKERRQ(ierr); }
@@ -342,7 +464,7 @@ PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol
       }
     }
     solved = PETSC_TRUE;
-    for (i=0;i<pep->npart&&solved;i++) solved = (idx_sc[i]<k)?PETSC_FALSE:PETSC_TRUE;
+    for (i=0;i<pep->npart&&solved;i++) solved = PetscNot(idx_sc[i]<k);
     if (idx_sc[color]<k) {
 #if !defined(PETSC_USE_COMPLEX)
       if (pep->eigi[idx_sc[color]]!=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),1,"Simple Refinement not implemented in real scalars for complex eigenvalues");
@@ -350,51 +472,108 @@ PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol
       if (pep->npart==1) {
         ierr = BVGetColumn(pep->V,idx_sc[color],&v);CHKERRQ(ierr);
       } else v = ctx->v; 
-      ierr = PEPSimpleNRefSetUpSystem(pep,ctx->A,idx_sc[color],&M,&T,ini,t,v);CHKERRQ(ierr);
-      ierr = KSPSetOperators(ksp,M,M);CHKERRQ(ierr);
+      ierr = PEPSimpleNRefSetUpSystem(pep,ctx->A,ctx,idx_sc[color],&Mt,&T,&P,ini,t[0],v);CHKERRQ(ierr);
+      ierr = KSPSetOperators(pep->refineksp,T,P);CHKERRQ(ierr);
       if (ini) {
-        ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr);
-        ierr = MatCreateVecs(M,&dvv,NULL);CHKERRQ(ierr);
-        ierr = VecDuplicate(dvv,&rr);CHKERRQ(ierr);
+        ierr = KSPSetFromOptions(pep->refineksp);CHKERRQ(ierr);
+        if (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+          ierr = MatCreateVecs(T,&dvv,NULL);CHKERRQ(ierr);
+          ierr = VecDuplicate(dvv,&rr);CHKERRQ(ierr);
+        }
         ini = PETSC_FALSE;
       }
-      ierr = MatMult(T,v,r);CHKERRQ(ierr);
-      ierr = VecGetArrayRead(r,&array);CHKERRQ(ierr);
-      if (rank==size-1) {
-        ierr = VecGetArray(rr,&array2);
-        ierr = PetscMemcpy(array2,array,n*sizeof(PetscScalar));CHKERRQ(ierr);
-        array2[n] = 0.0;
-        ierr = VecRestoreArray(rr,&array2);
-      } else {
-        ierr = VecPlaceArray(rr,array);CHKERRQ(ierr);
-      }
-      ierr = KSPSolve(ksp,rr,dvv);CHKERRQ(ierr);
-      ierr = KSPGetConvergedReason(ksp,&reason);CHKERRQ(ierr);
-      if (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,"KSP did not converge (reason=%s)",KSPConvergedReasons[reason]);
-      if (rank != size-1) {
-        ierr = VecResetArray(rr);CHKERRQ(ierr);
+
+      switch (pep->scheme) {
+      case PEP_REFINE_SCHEME_EXPLICIT: 
+        ierr = MatMult(Mt,v,r);CHKERRQ(ierr);
+        ierr = VecGetArrayRead(r,&array);CHKERRQ(ierr);
+        if (rank==size-1) {
+          ierr = VecGetArray(rr,&array2);CHKERRQ(ierr);
+          ierr = PetscMemcpy(array2,array,n*sizeof(PetscScalar));CHKERRQ(ierr);
+          array2[n] = 0.0;
+          ierr = VecRestoreArray(rr,&array2);CHKERRQ(ierr);
+        } else {
+          ierr = VecPlaceArray(rr,array);CHKERRQ(ierr);
+        }
+        ierr = KSPSolve(pep->refineksp,rr,dvv);CHKERRQ(ierr);
+        ierr = KSPGetConvergedReason(pep->refineksp,&reason);CHKERRQ(ierr);
+        if (reason>0) {
+          if (rank != size-1) {
+            ierr = VecResetArray(rr);CHKERRQ(ierr);
+          }
+          ierr = VecRestoreArrayRead(r,&array);CHKERRQ(ierr);
+          ierr = VecGetArrayRead(dvv,&array);CHKERRQ(ierr);
+          ierr = VecPlaceArray(dv,array);CHKERRQ(ierr);
+          ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
+          ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+          ierr = VecResetArray(dv);CHKERRQ(ierr);
+          if (rank==size-1) pep->eigr[idx_sc[color]] -= array[n];
+          ierr = VecRestoreArrayRead(dvv,&array);CHKERRQ(ierr);
+        } else fail_sc[color] = 1;
+        break;
+      case PEP_REFINE_SCHEME_MBE:
+        ierr = MatMult(T,v,r);CHKERRQ(ierr);
+        /* Mixed block elimination */
+        ierr = VecConjugate(v);CHKERRQ(ierr);
+        ierr = KSPSolveTranspose(pep->refineksp,v,t[0]);CHKERRQ(ierr);
+        ierr = KSPGetConvergedReason(pep->refineksp,&reason);CHKERRQ(ierr);
+        if (reason>0) {
+          ierr = VecConjugate(t[0]);CHKERRQ(ierr);
+          ierr = VecDot(ctx->w,t[0],&tt[0]);CHKERRQ(ierr);
+          ierr = KSPSolve(pep->refineksp,ctx->w,t[1]);CHKERRQ(ierr);
+          ierr = KSPGetConvergedReason(pep->refineksp,&reason);CHKERRQ(ierr);
+          if (reason>0) {
+            ierr = VecDot(t[1],v,&tt[1]);CHKERRQ(ierr);
+            ierr = VecDot(r,t[0],&ttt);CHKERRQ(ierr);
+            tt[0] = ttt/tt[0];
+            ierr = VecAXPY(r,-tt[0],ctx->w);CHKERRQ(ierr);
+            ierr = KSPSolve(pep->refineksp,r,dv);CHKERRQ(ierr);
+            ierr = KSPGetConvergedReason(pep->refineksp,&reason);CHKERRQ(ierr);
+            if (reason>0) {
+              ierr = VecDot(dv,v,&ttt);CHKERRQ(ierr);
+              tt[1] = ttt/tt[1];
+              ierr = VecAXPY(dv,-tt[1],t[1]);CHKERRQ(ierr);
+              deig = tt[0]+tt[1];
+            }
+          }
+          ierr = VecConjugate(v);CHKERRQ(ierr);
+          ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
+          ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+          pep->eigr[idx_sc[color]] -= deig;
+          fail_sc[color] = 0;
+        } else {
+          ierr = VecConjugate(v);CHKERRQ(ierr);
+          fail_sc[color] = 1;
+        }
+        break;
+      case PEP_REFINE_SCHEME_SCHUR:
+        ierr = MatShellGetContext(T,&fctx);CHKERRQ(ierr);
+        ierr = MatMult(fctx->M1,v,r);CHKERRQ(ierr);
+        ierr = KSPSolve(pep->refineksp,r,dv);CHKERRQ(ierr);
+        ierr = KSPGetConvergedReason(pep->refineksp,&reason);CHKERRQ(ierr);
+        if (reason>0) {
+          ierr = VecDot(dv,v,&deig);CHKERRQ(ierr);
+          deig *= -fctx->m3/fctx->M4;
+          ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
+          ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
+          ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
+          pep->eigr[idx_sc[color]] -= deig;
+          fail_sc[color] = 0;
+        } else fail_sc[color] = 1;
+        break;
       }
-      ierr = VecRestoreArrayRead(r,&array);CHKERRQ(ierr);
-      ierr = VecGetArrayRead(dvv,&array);CHKERRQ(ierr);
-      ierr = VecPlaceArray(dv,array);CHKERRQ(ierr);
-      ierr = VecAXPY(v,-1.0,dv);CHKERRQ(ierr);
-      ierr = VecNorm(v,NORM_2,&norm);CHKERRQ(ierr);
-      ierr = VecScale(v,1.0/norm);CHKERRQ(ierr);
-      ierr = VecResetArray(dv);CHKERRQ(ierr);
-      if (rank==size-1) pep->eigr[idx_sc[color]] -= array[n];
-      ierr = VecRestoreArrayRead(dvv,&array);CHKERRQ(ierr);
       if (pep->npart==1) { ierr = BVRestoreColumn(pep->V,idx_sc[color],&v);CHKERRQ(ierr); } 
     }
   }
-  ierr = MatDestroy(&M);CHKERRQ(ierr);
-  ierr = MatDestroy(&T);CHKERRQ(ierr);
   ierr = VecDestroy(&t[0]);CHKERRQ(ierr);
   ierr = VecDestroy(&t[1]);CHKERRQ(ierr);
   ierr = VecDestroy(&dv);CHKERRQ(ierr);
-  ierr = VecDestroy(&dvv);CHKERRQ(ierr);
+  ierr = VecDestroy(&ctx->w);CHKERRQ(ierr);
   ierr = VecDestroy(&r);CHKERRQ(ierr);
-  ierr = VecDestroy(&rr);CHKERRQ(ierr);
-  ierr = PetscFree2(idx_sc,its_sc);CHKERRQ(ierr);
+  ierr = PetscFree3(idx_sc,its_sc,fail_sc);CHKERRQ(ierr);
+  ierr = VecScatterDestroy(&ctx->nst);CHKERRQ(ierr);
   if (pep->npart>1) {
     ierr = VecDestroy(&ctx->vg);CHKERRQ(ierr);
     ierr = VecDestroy(&ctx->v);CHKERRQ(ierr);
@@ -406,7 +585,20 @@ PetscErrorCode PEPNewtonRefinementSimple(PEP pep,PetscInt *maxits,PetscReal *tol
     }
     ierr = PetscFree2(ctx->A,ctx->scatter_id);CHKERRQ(ierr);
   }
+  if (fctx && pep->scheme==PEP_REFINE_SCHEME_SCHUR) {
+    ierr = MatDestroy(&P);CHKERRQ(ierr);
+    ierr = MatDestroy(&fctx->M1);CHKERRQ(ierr);
+    ierr = PetscFree(fctx);CHKERRQ(ierr);
+  }
+  if (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+    ierr = MatDestroy(&Mt);CHKERRQ(ierr);
+    ierr = VecDestroy(&dvv);CHKERRQ(ierr);
+    ierr = VecDestroy(&rr);CHKERRQ(ierr);
+    ierr = VecDestroy(&ctx->nv);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&T);CHKERRQ(ierr);
   ierr = PetscFree(ctx);CHKERRQ(ierr);
   ierr = PetscLogEventEnd(PEP_Refine,pep,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
+
diff --git a/src/pep/interface/peprefine.c.html b/src/pep/interface/peprefine.c.html
index f15ec1e..a1fd9ed 100644
--- a/src/pep/interface/peprefine.c.html
+++ b/src/pep/interface/peprefine.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/peprefine.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:54+00:00">
+<meta name="date" content="2016-05-16T10:33:53+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/peprefine.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/peprefine.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Newton refinement for <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>, simple version.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,370 +39,558 @@
 <a name="line27"> 27: </a><strong><font color="#228B22">#define NREF_MAXIT 10</font></strong>
 
 <a name="line29"> 29: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line30"> 30: </a>  VecScatter    *scatter_id;
-<a name="line31"> 31: </a>  Mat           *A;
-<a name="line32"> 32: </a>  Vec           vg,v;
+<a name="line30"> 30: </a>  VecScatter *scatter_id,nst;
+<a name="line31"> 31: </a>  Mat        *A;
+<a name="line32"> 32: </a>  Vec        nv,vg,v,w;
 <a name="line33"> 33: </a>} PEPSimpNRefctx;
 
-<a name="line37"> 37: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefSetUp"></a>static PetscErrorCode PEPSimpleNRefSetUp(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PEPSimpNRefctx **ctx_)</font></strong>
-<a name="line38"> 38: </a>{
-<a name="line40"> 40: </a>  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2;
-<a name="line41"> 41: </a>  IS             is1,is2;
-<a name="line42"> 42: </a>  PEPSimpNRefctx *ctx;
-<a name="line43"> 43: </a>  Vec            v;
+<a name="line35"> 35: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line36"> 36: </a>  Mat          M1;
+<a name="line37"> 37: </a>  Vec          M2,M3;
+<a name="line38"> 38: </a>  PetscScalar  M4,m3;
+<a name="line39"> 39: </a>} FSubctx;
 
-<a name="line46"> 46: </a>  PetscMalloc1(1,ctx_);
-<a name="line47"> 47: </a>  ctx = *ctx_;
-<a name="line48"> 48: </a>  <font color="#4169E1">if</font> (pep->npart==1) {
-<a name="line49"> 49: </a>    pep->refinesubc = NULL;
-<a name="line50"> 50: </a>    ctx->scatter_id = NULL;
-<a name="line51"> 51: </a>    ctx->A = pep->A;
-<a name="line52"> 52: </a>  } <font color="#4169E1">else</font> {
-<a name="line53"> 53: </a>    PetscMalloc2(pep->nmat,&ctx->A,pep->npart,&ctx->scatter_id);
+<a name="line43"> 43: </a><strong><font color="#4169E1"><a name="MatFSMult"></a>static PetscErrorCode MatFSMult(Mat M ,Vec x,Vec y)</font></strong>
+<a name="line44"> 44: </a>{
+<a name="line46"> 46: </a>  FSubctx        *ctx;
+<a name="line47"> 47: </a>  PetscScalar    t;
+<a name="line48"> 48: </a>  
+<a name="line50"> 50: </a>  MatShellGetContext(M,&ctx);
+<a name="line51"> 51: </a>  VecDot(x,ctx->M3,&t);
+<a name="line52"> 52: </a>  t *= ctx->m3/ctx->M4;
+<a name="line53"> 53: </a>  MatMult(ctx->M1,x,y);
+<a name="line54"> 54: </a>  VecAXPY(y,-t,ctx->M2);
+<a name="line55"> 55: </a>  <font color="#4169E1">return</font>(0);
+<a name="line56"> 56: </a>}
 
-<a name="line55"> 55: </a>    <font color="#B22222">/* Duplicate matrices */</font>
-<a name="line56"> 56: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line57"> 57: </a>      MatCreateRedundantMatrix(pep->A[i],0,PetscSubcommChild(pep->refinesubc),MAT_INITIAL_MATRIX,&ctx->A[i]);
-<a name="line58"> 58: </a>    }
-<a name="line59"> 59: </a>    MatCreateVecs(ctx->A[0],&ctx->v,NULL);
+<a name="line60"> 60: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefSetUp"></a>static PetscErrorCode PEPSimpleNRefSetUp(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PEPSimpNRefctx **ctx_)</font></strong>
+<a name="line61"> 61: </a>{
+<a name="line63"> 63: </a>  PetscInt       i,si,j,n0,m0,nloc,*idx1,*idx2,ne;
+<a name="line64"> 64: </a>  IS             is1,is2;
+<a name="line65"> 65: </a>  PEPSimpNRefctx *ctx;
+<a name="line66"> 66: </a>  Vec            v;
+<a name="line67"> 67: </a>  PetscMPIInt    rank,size;
 
-<a name="line61"> 61: </a>    <font color="#B22222">/* Create scatters for sending vectors to each subcommucator */</font>
-<a name="line62"> 62: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
-<a name="line63"> 63: </a>    VecGetOwnershipRange(v,&n0,&m0);
-<a name="line64"> 64: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
-<a name="line65"> 65: </a>    VecGetLocalSize(ctx->v,&nloc);
-<a name="line66"> 66: </a>    PetscMalloc2(m0-n0,&idx1,m0-n0,&idx2);
-<a name="line67"> 67: </a>    VecCreateMPI(PetscObjectComm((PetscObject)pep),nloc,PETSC_DECIDE,&ctx->vg);
-<a name="line68"> 68: </a>    <font color="#4169E1">for</font> (si=0;si<pep->npart;si++) {
-<a name="line69"> 69: </a>      j = 0;
-<a name="line70"> 70: </a>      <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
-<a name="line71"> 71: </a>        idx1[j]   = i;
-<a name="line72"> 72: </a>        idx2[j++] = i+pep->n*si;
-<a name="line73"> 73: </a>      }
-<a name="line74"> 74: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)pep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
-<a name="line75"> 75: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)pep),(m0-n0),idx2,PETSC_COPY_VALUES,&is2);
-<a name="line76"> 76: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
-<a name="line77"> 77: </a>      VecScatterCreate(v,is1,ctx->vg,is2,&ctx->scatter_id[si]);
-<a name="line78"> 78: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
-<a name="line79"> 79: </a>      ISDestroy(&is1);
-<a name="line80"> 80: </a>      ISDestroy(&is2);
-<a name="line81"> 81: </a>    }
-<a name="line82"> 82: </a>    PetscFree2(idx1,idx2);
-<a name="line83"> 83: </a>  }
-<a name="line84"> 84: </a>  <font color="#4169E1">return</font>(0);  
-<a name="line85"> 85: </a>}
+<a name="line70"> 70: </a>  PetscCalloc1(1,ctx_);
+<a name="line71"> 71: </a>  ctx = *ctx_;
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (pep->npart==1) {
+<a name="line73"> 73: </a>    pep->refinesubc = NULL;
+<a name="line74"> 74: </a>    ctx->scatter_id = NULL;
+<a name="line75"> 75: </a>    ctx->A = pep->A;
+<a name="line76"> 76: </a>  } <font color="#4169E1">else</font> {
+<a name="line77"> 77: </a>    PetscMalloc2(pep->nmat,&ctx->A,pep->npart,&ctx->scatter_id);
 
-<a name="line87"> 87: </a><font color="#B22222">/*</font>
-<a name="line88"> 88: </a><font color="#B22222">  Gather Eigenpair idx from subcommunicator with color sc</font>
-<a name="line89"> 89: </a><font color="#B22222">*/</font>
-<a name="line92"> 92: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefGatherEigenpair"></a>static PetscErrorCode PEPSimpleNRefGatherEigenpair(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)</font></strong>
-<a name="line93"> 93: </a>{
-<a name="line94"> 94: </a>  PetscErrorCode    ierr;
-<a name="line95"> 95: </a>  PetscMPIInt       nproc,p;
-<a name="line96"> 96: </a>  MPI_Comm          comm=((PetscObject)pep)->comm;
-<a name="line97"> 97: </a>  Vec               v;
-<a name="line98"> 98: </a>  const PetscScalar *array;
+<a name="line79"> 79: </a>    <font color="#B22222">/* Duplicate matrices */</font>
+<a name="line80"> 80: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line81"> 81: </a>      MatCreateRedundantMatrix(pep->A[i],0,PetscSubcommChild(pep->refinesubc),MAT_INITIAL_MATRIX,&ctx->A[i]);
+<a name="line82"> 82: </a>    }
+<a name="line83"> 83: </a>    MatCreateVecs(ctx->A[0],&ctx->v,NULL);
 
-<a name="line101">101: </a>  <font color="#B22222">/* The eigenvalue information is in the last process of the </font>
-<a name="line102">102: </a><font color="#B22222">     subcommunicator sc. p is its mapping in the general comm */</font>
-<a name="line103">103: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&nproc);
-<a name="line104">104: </a>  p = (nproc/pep->npart)*(sc+1)+PetscMin(nproc%pep->npart,sc+1)-1;
-<a name="line105">105: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&pep->eigr[idx],1,MPIU_SCALAR,p,comm);
+<a name="line85"> 85: </a>    <font color="#B22222">/* Create scatters for sending vectors to each subcommucator */</font>
+<a name="line86"> 86: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
+<a name="line87"> 87: </a>    VecGetOwnershipRange(v,&n0,&m0);
+<a name="line88"> 88: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
+<a name="line89"> 89: </a>    VecGetLocalSize(ctx->v,&nloc);
+<a name="line90"> 90: </a>    PetscMalloc2(m0-n0,&idx1,m0-n0,&idx2);
+<a name="line91"> 91: </a>    VecCreateMPI(PetscObjectComm((PetscObject)pep),nloc,PETSC_DECIDE,&ctx->vg);
+<a name="line92"> 92: </a>    <font color="#4169E1">for</font> (si=0;si<pep->npart;si++) {
+<a name="line93"> 93: </a>      j = 0;
+<a name="line94"> 94: </a>      <font color="#4169E1">for</font> (i=n0;i<m0;i++) {
+<a name="line95"> 95: </a>        idx1[j]   = i;
+<a name="line96"> 96: </a>        idx2[j++] = i+pep->n*si;
+<a name="line97"> 97: </a>      }
+<a name="line98"> 98: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)pep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
+<a name="line99"> 99: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)pep),(m0-n0),idx2,PETSC_COPY_VALUES,&is2);
+<a name="line100">100: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
+<a name="line101">101: </a>      VecScatterCreate(v,is1,ctx->vg,is2,&ctx->scatter_id[si]);
+<a name="line102">102: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
+<a name="line103">103: </a>      ISDestroy(&is1);
+<a name="line104">104: </a>      ISDestroy(&is2);
+<a name="line105">105: </a>    }
+<a name="line106">106: </a>    PetscFree2(idx1,idx2);
+<a name="line107">107: </a>  }
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT){
+<a name="line109">109: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)ctx->A[0]),&rank);
+<a name="line110">110: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)ctx->A[0]),&size);
+<a name="line111">111: </a>    <font color="#4169E1">if</font> (size>1) {
+<a name="line112">112: </a>      <font color="#4169E1">if</font> (pep->npart==1) {
+<a name="line113">113: </a>        <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
+<a name="line114">114: </a>      } <font color="#4169E1">else</font> v = ctx->v;
+<a name="line115">115: </a>      VecGetOwnershipRange(v,&n0,&m0);
+<a name="line116">116: </a>      ne = (rank == size-1)?pep->n:0;
+<a name="line117">117: </a>      VecCreateMPI(PetscObjectComm((PetscObject)ctx->A[0]),ne,PETSC_DECIDE,&ctx->nv);
+<a name="line118">118: </a>      PetscMalloc1(m0-n0,&idx1);
+<a name="line119">119: </a>      <font color="#4169E1">for</font> (i=n0;i<m0;i++) idx1[i-n0] = i;
+<a name="line120">120: </a>      ISCreateGeneral(PetscObjectComm((PetscObject)pep),(m0-n0),idx1,PETSC_COPY_VALUES,&is1);
+<a name="line121">121: </a>      VecScatterCreate(v,is1,ctx->nv,is1,&ctx->nst);
+<a name="line122">122: </a>      <font color="#4169E1">if</font> (pep->npart==1) {
+<a name="line123">123: </a>        <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v);
+<a name="line124">124: </a>      }
+<a name="line125">125: </a>      PetscFree(idx1);
+<a name="line126">126: </a>      ISDestroy(&is1);
+<a name="line127">127: </a>    }
+<a name="line128">128: </a>  } 
+<a name="line129">129: </a>  <font color="#4169E1">return</font>(0);  
+<a name="line130">130: </a>}
 
-<a name="line107">107: </a>  <font color="#4169E1">if</font> (pep->npart>1) {
-<a name="line108">108: </a>    <font color="#B22222">/* Gather pep->V[idx] from the subcommuniator sc */</font>
-<a name="line109">109: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,idx,&v);
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
-<a name="line111">111: </a>      VecGetArrayRead(ctx->v,&array);
-<a name="line112">112: </a>      VecPlaceArray(ctx->vg,array);
-<a name="line113">113: </a>    }
-<a name="line114">114: </a>    VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line115">115: </a>    VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
-<a name="line116">116: </a>    <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
-<a name="line117">117: </a>      VecResetArray(ctx->vg);
-<a name="line118">118: </a>      VecRestoreArrayRead(ctx->v,&array);
-<a name="line119">119: </a>    }
-<a name="line120">120: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,idx,&v);
-<a name="line121">121: </a>  }
-<a name="line122">122: </a>  <font color="#4169E1">return</font>(0);
-<a name="line123">123: </a>}
+<a name="line132">132: </a><font color="#B22222">/*</font>
+<a name="line133">133: </a><font color="#B22222">  Gather Eigenpair idx from subcommunicator with color sc</font>
+<a name="line134">134: </a><font color="#B22222">*/</font>
+<a name="line137">137: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefGatherEigenpair"></a>static PetscErrorCode PEPSimpleNRefGatherEigenpair(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx,PetscInt *fail)</font></strong>
+<a name="line138">138: </a>{
+<a name="line139">139: </a>  PetscErrorCode    ierr;
+<a name="line140">140: </a>  PetscMPIInt       nproc,p;
+<a name="line141">141: </a>  MPI_Comm          comm=((PetscObject)pep)->comm;
+<a name="line142">142: </a>  Vec               v;
+<a name="line143">143: </a>  const PetscScalar *array;
 
-<a name="line127">127: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefScatterEigenvector"></a>static PetscErrorCode PEPSimpleNRefScatterEigenvector(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)</font></strong>
-<a name="line128">128: </a>{
-<a name="line129">129: </a>  PetscErrorCode    ierr;
-<a name="line130">130: </a>  Vec               v;
-<a name="line131">131: </a>  const PetscScalar *array;
-<a name="line132">132: </a>  
-<a name="line134">134: </a>  <font color="#4169E1">if</font> (pep->npart>1) {
-<a name="line135">135: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,idx,&v);
-<a name="line136">136: </a>    <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
-<a name="line137">137: </a>      VecGetArrayRead(ctx->v,&array);
-<a name="line138">138: </a>      VecPlaceArray(ctx->vg,array);
-<a name="line139">139: </a>    }
-<a name="line140">140: </a>    VecScatterBegin(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line141">141: </a>    VecScatterEnd(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
-<a name="line142">142: </a>    <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
-<a name="line143">143: </a>      VecResetArray(ctx->vg);
-<a name="line144">144: </a>      VecRestoreArrayRead(ctx->v,&array);
-<a name="line145">145: </a>    }
-<a name="line146">146: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,idx,&v);
-<a name="line147">147: </a>  }
-<a name="line148">148: </a>  <font color="#4169E1">return</font>(0);
-<a name="line149">149: </a>}
+<a name="line146">146: </a>  <font color="#4169E1">if</font> (pep->npart>1) {
+<a name="line147">147: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&nproc);
+<a name="line148">148: </a>    p = (nproc/pep->npart)*sc+PetscMin(sc,nproc%pep->npart);
+<a name="line149">149: </a>    <font color="#B22222">/* Communicate convergence successful */</font>
+<a name="line150">150: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(fail,1,MPIU_INT,p,comm);
+<a name="line151">151: </a>    <font color="#4169E1">if</font> (!(*fail)) {
+<a name="line152">152: </a>      <font color="#B22222">/* Process 0 of subcommunicator sc broadcasts the eigenvalue */</font> 
+<a name="line153">153: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&pep->eigr[idx],1,MPIU_SCALAR,p,comm);
+<a name="line154">154: </a>      <font color="#B22222">/* Gather pep->V[idx] from the subcommuniator sc */</font>
+<a name="line155">155: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,idx,&v);
+<a name="line156">156: </a>      <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
+<a name="line157">157: </a>        VecGetArrayRead(ctx->v,&array);
+<a name="line158">158: </a>        VecPlaceArray(ctx->vg,array);
+<a name="line159">159: </a>      }
+<a name="line160">160: </a>      VecScatterBegin(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line161">161: </a>      VecScatterEnd(ctx->scatter_id[sc],ctx->vg,v,INSERT_VALUES,SCATTER_REVERSE);
+<a name="line162">162: </a>      <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
+<a name="line163">163: </a>        VecResetArray(ctx->vg);
+<a name="line164">164: </a>        VecRestoreArrayRead(ctx->v,&array);
+<a name="line165">165: </a>      }
+<a name="line166">166: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,idx,&v);
+<a name="line167">167: </a>    }
+<a name="line168">168: </a>  } <font color="#4169E1">else</font> {
+<a name="line169">169: </a>    <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT && !(*fail)) {
+<a name="line170">170: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&nproc);
+<a name="line171">171: </a>      p = (nproc/pep->npart)*sc+PetscMin(sc,nproc%pep->npart);
+<a name="line172">172: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Bcast.html#MPI_Bcast">MPI_Bcast</a>(&pep->eigr[idx],1,MPIU_SCALAR,p,comm);
+<a name="line173">173: </a>    }
+<a name="line174">174: </a>  }
+<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
+<a name="line176">176: </a>}
 
-<a name="line153">153: </a><strong><font color="#4169E1"><a name="PEPEvaluateFunctionDerivatives"></a>static PetscErrorCode PEPEvaluateFunctionDerivatives(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar alpha,PetscScalar *vals)</font></strong>
-<a name="line154">154: </a>{
-<a name="line155">155: </a>  PetscInt    i,nmat=pep->nmat;
-<a name="line156">156: </a>  PetscScalar a0,a1,a2;
-<a name="line157">157: </a>  PetscReal   *a=pep->pbc,*b=a+nmat,*g=b+nmat;
+<a name="line180">180: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefScatterEigenvector"></a>static PetscErrorCode PEPSimpleNRefScatterEigenvector(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PEPSimpNRefctx *ctx,PetscInt sc,PetscInt idx)</font></strong>
+<a name="line181">181: </a>{
+<a name="line182">182: </a>  PetscErrorCode    ierr;
+<a name="line183">183: </a>  Vec               v;
+<a name="line184">184: </a>  const PetscScalar *array;
+<a name="line185">185: </a>  
+<a name="line187">187: </a>  <font color="#4169E1">if</font> (pep->npart>1) {
+<a name="line188">188: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,idx,&v);
+<a name="line189">189: </a>    <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
+<a name="line190">190: </a>      VecGetArrayRead(ctx->v,&array);
+<a name="line191">191: </a>      VecPlaceArray(ctx->vg,array);
+<a name="line192">192: </a>    }
+<a name="line193">193: </a>    VecScatterBegin(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line194">194: </a>    VecScatterEnd(ctx->scatter_id[sc],v,ctx->vg,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line195">195: </a>    <font color="#4169E1">if</font> (pep->refinesubc->color==sc) {
+<a name="line196">196: </a>      VecResetArray(ctx->vg);
+<a name="line197">197: </a>      VecRestoreArrayRead(ctx->v,&array);
+<a name="line198">198: </a>    }
+<a name="line199">199: </a>    <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,idx,&v);
+<a name="line200">200: </a>  }
+<a name="line201">201: </a>  <font color="#4169E1">return</font>(0);
+<a name="line202">202: </a>}
 
-<a name="line160">160: </a>  a0 = 0.0;
-<a name="line161">161: </a>  a1 = 1.0;
-<a name="line162">162: </a>  vals[0] = 0.0;
-<a name="line163">163: </a>  <font color="#4169E1">if</font> (nmat>1) vals[1] = 1/a[0];
-<a name="line164">164: </a>  <font color="#4169E1">for</font> (i=2;i<nmat;i++) {
-<a name="line165">165: </a>    a2 = ((alpha-b[i-2])*a1-g[i-2]*a0)/a[i-2];
-<a name="line166">166: </a>    vals[i] = (a2+(alpha-b[i-1])*vals[i-1]-g[i-1]*vals[i-2])/a[i-1];
-<a name="line167">167: </a>    a0 = a1; a1 = a2;
-<a name="line168">168: </a>  }
-<a name="line169">169: </a>  <font color="#4169E1">return</font>(0);
-<a name="line170">170: </a>}
+<a name="line206">206: </a><strong><font color="#4169E1"><a name="PEPEvaluateFunctionDerivatives"></a>static PetscErrorCode PEPEvaluateFunctionDerivatives(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar alpha,PetscScalar *vals)</font></strong>
+<a name="line207">207: </a>{
+<a name="line208">208: </a>  PetscInt    i,nmat=pep->nmat;
+<a name="line209">209: </a>  PetscScalar a0,a1,a2;
+<a name="line210">210: </a>  PetscReal   *a=pep->pbc,*b=a+nmat,*g=b+nmat;
 
-<a name="line174">174: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefSetUpSystem"></a>static PetscErrorCode PEPSimpleNRefSetUpSystem(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,Mat *A,PetscInt idx,Mat *M,Mat *T,PetscBool ini,Vec *t,Vec v)</font></strong>
-<a name="line175">175: </a>{
-<a name="line176">176: </a>  PetscErrorCode    ierr;
-<a name="line177">177: </a>  PetscInt          i,nmat=pep->nmat,ml,m0,m1,mg;
-<a name="line178">178: </a>  PetscInt          *dnz,*onz,ncols,*cols2,*nnz;
-<a name="line179">179: </a>  PetscScalar       zero=0.0,*coeffs;
-<a name="line180">180: </a>  PetscMPIInt       rank,size;
-<a name="line181">181: </a>  MPI_Comm          comm;
-<a name="line182">182: </a>  const PetscInt    *cols;
-<a name="line183">183: </a>  const PetscScalar *vals,*array;
-<a name="line184">184: </a>  MatStructure      str;
-<a name="line185">185: </a>  Vec               w=t[1],q=t[0];
+<a name="line213">213: </a>  a0 = 0.0;
+<a name="line214">214: </a>  a1 = 1.0;
+<a name="line215">215: </a>  vals[0] = 0.0;
+<a name="line216">216: </a>  <font color="#4169E1">if</font> (nmat>1) vals[1] = 1/a[0];
+<a name="line217">217: </a>  <font color="#4169E1">for</font> (i=2;i<nmat;i++) {
+<a name="line218">218: </a>    a2 = ((alpha-b[i-2])*a1-g[i-2]*a0)/a[i-2];
+<a name="line219">219: </a>    vals[i] = (a2+(alpha-b[i-1])*vals[i-1]-g[i-1]*vals[i-2])/a[i-1];
+<a name="line220">220: </a>    a0 = a1; a1 = a2;
+<a name="line221">221: </a>  }
+<a name="line222">222: </a>  <font color="#4169E1">return</font>(0);
+<a name="line223">223: </a>}
 
-<a name="line188">188: </a>  comm = PetscObjectComm((PetscObject)A[0]);
-<a name="line189">189: </a>  <a href="../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
-<a name="line190">190: </a>  PetscMalloc1(nmat,&coeffs);
-<a name="line191">191: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
-<a name="line192">192: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
-<a name="line193">193: </a>  <font color="#4169E1">if</font> (ini) {
-<a name="line194">194: </a>    MatDuplicate(A[0],MAT_COPY_VALUES,T);
-<a name="line195">195: </a>  } <font color="#4169E1">else</font> {
-<a name="line196">196: </a>    MatCopy(A[0],*T,DIFFERENT_NONZERO_PATTERN);
-<a name="line197">197: </a>  }
-<a name="line198">198: </a>  PEPEvaluateBasis(pep,pep->eigr[idx],0,coeffs,NULL);
-<a name="line199">199: </a>  MatScale(*T,coeffs[0]);
-<a name="line200">200: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
-<a name="line201">201: </a>    MatAXPY(*T,coeffs[i],A[i],(ini)?str:SUBSET_NONZERO_PATTERN);
-<a name="line202">202: </a>  }
-<a name="line203">203: </a>  MatGetSize(*T,&mg,NULL);
-<a name="line204">204: </a>  MatGetOwnershipRange(*T,&m0,&m1);
-<a name="line205">205: </a>  <font color="#4169E1">if</font> (ini) {
-<a name="line206">206: </a>    MatCreate(comm,M);
-<a name="line207">207: </a>    MatGetLocalSize(*T,&ml,NULL);
-<a name="line208">208: </a>    <font color="#4169E1">if</font> (rank==size-1) ml++;
-<a name="line209">209: </a>    MatSetSizes(*M,ml,ml,mg+1,mg+1);
-<a name="line210">210: </a>    MatSetFromOptions(*M);
-<a name="line211">211: </a>    MatSetUp(*M);
-<a name="line212">212: </a>    <font color="#B22222">/* Preallocate M */</font>
-<a name="line213">213: </a>    <font color="#4169E1">if</font> (size>1) {
-<a name="line214">214: </a>      MatPreallocateInitialize(comm,ml,ml,dnz,onz);
-<a name="line215">215: </a>      <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
-<a name="line216">216: </a>        MatGetRow(*T,i,&ncols,&cols,NULL);
-<a name="line217">217: </a>        MatPreallocateSet(i,ncols,cols,dnz,onz);
-<a name="line218">218: </a>        MatPreallocateSet(i,1,&mg,dnz,onz);
-<a name="line219">219: </a>        MatRestoreRow(*T,i,&ncols,&cols,NULL);
-<a name="line220">220: </a>      }
-<a name="line221">221: </a>      <font color="#4169E1">if</font> (rank==size-1) {
-<a name="line222">222: </a>        PetscCalloc1(mg+1,&cols2);
-<a name="line223">223: </a>        <font color="#4169E1">for</font> (i=0;i<mg+1;i++) cols2[i]=i;
-<a name="line224">224: </a>        MatPreallocateSet(m1,mg+1,cols2,dnz,onz);
-<a name="line225">225: </a>        PetscFree(cols2);
-<a name="line226">226: </a>      }
-<a name="line227">227: </a>      MatMPIAIJSetPreallocation(*M,0,dnz,0,onz);
-<a name="line228">228: </a>      MatPreallocateFinalize(dnz,onz);
-<a name="line229">229: </a>    } <font color="#4169E1">else</font> {
-<a name="line230">230: </a>      PetscCalloc1(mg+1,&nnz);
-<a name="line231">231: </a>      <font color="#4169E1">for</font> (i=0;i<mg;i++) {
-<a name="line232">232: </a>        MatGetRow(*T,i,&ncols,NULL,NULL);
-<a name="line233">233: </a>        nnz[i] = ncols+1;
-<a name="line234">234: </a>        MatRestoreRow(*T,i,&ncols,NULL,NULL);
-<a name="line235">235: </a>      }
-<a name="line236">236: </a>      nnz[mg] = mg+1;
-<a name="line237">237: </a>      MatSeqAIJSetPreallocation(*M,0,nnz);
-<a name="line238">238: </a>      PetscFree(nnz);
-<a name="line239">239: </a>    }
-<a name="line240">240: </a>  }
-<a name="line241">241: </a>  PEPEvaluateFunctionDerivatives(pep,pep->eigr[idx],coeffs);
-<a name="line242">242: </a>  <font color="#4169E1">for</font> (i=0;i<nmat && PetscAbsScalar(coeffs[i])==0.0;i++);
-<a name="line243">243: </a>  MatMult(A[i],v,w);
-<a name="line244">244: </a>  <font color="#4169E1">if</font> (coeffs[i]!=1.0) {
-<a name="line245">245: </a>    VecScale(w,coeffs[i]);
-<a name="line246">246: </a>  }
-<a name="line247">247: </a>  <font color="#4169E1">for</font> (i++;i<nmat;i++) {
-<a name="line248">248: </a>    MatMult(A[i],v,q);
-<a name="line249">249: </a>    VecAXPY(w,coeffs[i],q);
-<a name="line250">250: </a>  }
-<a name="line251">251: </a>  
-<a name="line252">252: </a>  <font color="#B22222">/* Set values */</font>
-<a name="line253">253: </a>  PetscMalloc1(m1-m0,&cols2);
-<a name="line254">254: </a>  <font color="#4169E1">for</font> (i=0;i<m1-m0;i++) cols2[i]=m0+i;
-<a name="line255">255: </a>  VecGetArrayRead(w,&array);
-<a name="line256">256: </a>  <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
-<a name="line257">257: </a>    MatGetRow(*T,i,&ncols,&cols,&vals);
-<a name="line258">258: </a>    MatSetValues(*M,1,&i,ncols,cols,vals,INSERT_VALUES);
-<a name="line259">259: </a>    MatRestoreRow(*T,i,&ncols,&cols,&vals);
-<a name="line260">260: </a>    MatSetValues(*M,1,&i,1,&mg,array+i-m0,INSERT_VALUES);
-<a name="line261">261: </a>  }
-<a name="line262">262: </a>  VecRestoreArrayRead(w,&array);
-<a name="line263">263: </a>  VecConjugate(v);
-<a name="line264">264: </a>  VecGetArrayRead(v,&array);
-<a name="line265">265: </a>  MatSetValues(*M,1,&mg,m1-m0,cols2,array,INSERT_VALUES);
-<a name="line266">266: </a>  MatSetValues(*M,1,&mg,1,&mg,&zero,INSERT_VALUES);
-<a name="line267">267: </a>  VecRestoreArrayRead(v,&array);
-<a name="line268">268: </a>  VecConjugate(v);
-<a name="line269">269: </a>  MatAssemblyBegin(*M,MAT_FINAL_ASSEMBLY);
-<a name="line270">270: </a>  MatAssemblyEnd(*M,MAT_FINAL_ASSEMBLY);  
-<a name="line271">271: </a>  PetscFree(cols2);
-<a name="line272">272: </a>  PetscFree(coeffs);
-<a name="line273">273: </a>  <font color="#4169E1">return</font>(0);
-<a name="line274">274: </a>}
+<a name="line227">227: </a><strong><font color="#4169E1"><a name="PEPSimpleNRefSetUpSystem"></a>static PetscErrorCode PEPSimpleNRefSetUpSystem(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,Mat *A,PEPSimpNRefctx *ctx,PetscInt idx,Mat *Mt,Mat *T,Mat *P,PetscBool ini,Vec t,Vec v)</font></strong>
+<a name="line228">228: </a>{
+<a name="line229">229: </a>  PetscErrorCode    ierr;
+<a name="line230">230: </a>  PetscInt          i,nmat=pep->nmat,ml,m0,n0,m1,mg;
+<a name="line231">231: </a>  PetscInt          *dnz,*onz,ncols,*cols2=NULL,*nnz;
+<a name="line232">232: </a>  PetscScalar       zero=0.0,*coeffs,*coeffs2;
+<a name="line233">233: </a>  PetscMPIInt       rank,size;
+<a name="line234">234: </a>  MPI_Comm          comm;
+<a name="line235">235: </a>  const PetscInt    *cols;
+<a name="line236">236: </a>  const PetscScalar *vals,*array;
+<a name="line237">237: </a>  MatStructure      str;
+<a name="line238">238: </a>  FSubctx           *fctx;
+<a name="line239">239: </a>  Vec               w=ctx->w;
+<a name="line240">240: </a>  Mat               M;
 
-<a name="line278">278: </a><strong><font color="#4169E1"><a name="PEPNewtonRefinementSimple"></a>PetscErrorCode PEPNewtonRefinementSimple(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *maxits,PetscReal *tol,PetscInt k)</font></strong>
-<a name="line279">279: </a>{
-<a name="line280">280: </a>  PetscErrorCode    ierr;
-<a name="line281">281: </a>  PetscInt          i,n,its,idx=0,*idx_sc,*its_sc,color;
-<a name="line282">282: </a>  PetscMPIInt       rank,size;
-<a name="line283">283: </a>  KSP               ksp;
-<a name="line284">284: </a>  Mat               M=NULL,T=NULL;
-<a name="line285">285: </a>  MPI_Comm          comm;
-<a name="line286">286: </a>  Vec               r,v,dv,rr=NULL,dvv=NULL,t[2];
-<a name="line287">287: </a>  PetscScalar       *array2;
-<a name="line288">288: </a>  const PetscScalar *array;
-<a name="line289">289: </a>  PetscReal         norm,error;
-<a name="line290">290: </a>  PetscBool         ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
-<a name="line291">291: </a>  PEPSimpNRefctx    *ctx;
-<a name="line292">292: </a>  KSPConvergedReason reason;
+<a name="line243">243: </a>  <a href="../../../docs/manualpages/ST/STGetMatStructure.html#STGetMatStructure">STGetMatStructure</a>(pep->st,&str);
+<a name="line244">244: </a>  PetscMalloc2(nmat,&coeffs,nmat,&coeffs2);
+<a name="line245">245: </a>  <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line246">246: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line247">247: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line248">248: </a>      PetscCalloc1(1,&fctx);
+<a name="line249">249: </a>      MatGetSize(A[0],&m0,&n0);
+<a name="line250">250: </a>      MatCreateShell(PetscObjectComm((PetscObject)A[0]),PETSC_DECIDE,PETSC_DECIDE,m0,n0,fctx,T);
+<a name="line251">251: </a>      MatShellSetOperation(*T,MATOP_MULT,(void(*)(void))MatFSMult);
+<a name="line252">252: </a>    } <font color="#4169E1">else</font> {
+<a name="line253">253: </a>      MatShellGetContext(*T,&fctx);
+<a name="line254">254: </a>    }    
+<a name="line255">255: </a>    M=fctx->M1;
+<a name="line256">256: </a>    <font color="#4169E1">break</font>;
+<a name="line257">257: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line258">258: </a>    M=*T;
+<a name="line259">259: </a>    <font color="#4169E1">break</font>;
+<a name="line260">260: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line261">261: </a>    M=*Mt;
+<a name="line262">262: </a>    <font color="#4169E1">break</font>;
+<a name="line263">263: </a>  }
+<a name="line264">264: </a>  <font color="#4169E1">if</font> (ini) {
+<a name="line265">265: </a>    MatDuplicate(A[0],MAT_COPY_VALUES,&M);
+<a name="line266">266: </a>  } <font color="#4169E1">else</font> {
+<a name="line267">267: </a>    MatCopy(A[0],M,DIFFERENT_NONZERO_PATTERN);
+<a name="line268">268: </a>  }
+<a name="line269">269: </a>  PEPEvaluateBasis(pep,pep->eigr[idx],0,coeffs,NULL);
+<a name="line270">270: </a>  MatScale(M,coeffs[0]);
+<a name="line271">271: </a>  <font color="#4169E1">for</font> (i=1;i<nmat;i++) {
+<a name="line272">272: </a>    MatAXPY(M,coeffs[i],A[i],(ini)?str:SUBSET_NONZERO_PATTERN);
+<a name="line273">273: </a>  }
+<a name="line274">274: </a>  PEPEvaluateFunctionDerivatives(pep,pep->eigr[idx],coeffs2);
+<a name="line275">275: </a>  <font color="#4169E1">for</font> (i=0;i<nmat && PetscAbsScalar(coeffs2[i])==0.0;i++);
+<a name="line276">276: </a>  MatMult(A[i],v,w);
+<a name="line277">277: </a>  <font color="#4169E1">if</font> (coeffs2[i]!=1.0) {
+<a name="line278">278: </a>    VecScale(w,coeffs2[i]);
+<a name="line279">279: </a>  }
+<a name="line280">280: </a>  <font color="#4169E1">for</font> (i++;i<nmat;i++) {
+<a name="line281">281: </a>    MatMult(A[i],v,t);
+<a name="line282">282: </a>    VecAXPY(w,coeffs2[i],t);
+<a name="line283">283: </a>  }
+<a name="line284">284: </a>  <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line285">285: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT:
+<a name="line286">286: </a>    comm = PetscObjectComm((PetscObject)A[0]);
+<a name="line287">287: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
+<a name="line288">288: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
+<a name="line289">289: </a>    MatGetSize(M,&mg,NULL);
+<a name="line290">290: </a>    MatGetOwnershipRange(M,&m0,&m1);
+<a name="line291">291: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line292">292: </a>      MatCreate(comm,T);
+<a name="line293">293: </a>      MatGetLocalSize(M,&ml,NULL);
+<a name="line294">294: </a>      <font color="#4169E1">if</font> (rank==size-1) ml++;
+<a name="line295">295: </a>      MatSetSizes(*T,ml,ml,mg+1,mg+1);
+<a name="line296">296: </a>      MatSetFromOptions(*T);
+<a name="line297">297: </a>      MatSetUp(*T);
+<a name="line298">298: </a>      <font color="#B22222">/* Preallocate M */</font>
+<a name="line299">299: </a>      <font color="#4169E1">if</font> (size>1) {
+<a name="line300">300: </a>        MatPreallocateInitialize(comm,ml,ml,dnz,onz);
+<a name="line301">301: </a>        <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
+<a name="line302">302: </a>          MatGetRow(M,i,&ncols,&cols,NULL);
+<a name="line303">303: </a>          MatPreallocateSet(i,ncols,cols,dnz,onz);
+<a name="line304">304: </a>          MatPreallocateSet(i,1,&mg,dnz,onz);
+<a name="line305">305: </a>          MatRestoreRow(M,i,&ncols,&cols,NULL);
+<a name="line306">306: </a>        }
+<a name="line307">307: </a>        <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line308">308: </a>          PetscCalloc1(mg+1,&cols2);
+<a name="line309">309: </a>          <font color="#4169E1">for</font> (i=0;i<mg+1;i++) cols2[i]=i;
+<a name="line310">310: </a>          MatPreallocateSet(m1,mg+1,cols2,dnz,onz);
+<a name="line311">311: </a>          PetscFree(cols2);
+<a name="line312">312: </a>        }
+<a name="line313">313: </a>        MatMPIAIJSetPreallocation(*T,0,dnz,0,onz);
+<a name="line314">314: </a>        MatPreallocateFinalize(dnz,onz);
+<a name="line315">315: </a>      } <font color="#4169E1">else</font> {
+<a name="line316">316: </a>        PetscCalloc1(mg+1,&nnz);
+<a name="line317">317: </a>        <font color="#4169E1">for</font> (i=0;i<mg;i++) {
+<a name="line318">318: </a>          MatGetRow(M,i,&ncols,NULL,NULL);
+<a name="line319">319: </a>          nnz[i] = ncols+1;
+<a name="line320">320: </a>          MatRestoreRow(M,i,&ncols,NULL,NULL);
+<a name="line321">321: </a>        }
+<a name="line322">322: </a>        nnz[mg] = mg+1;
+<a name="line323">323: </a>        MatSeqAIJSetPreallocation(*T,0,nnz);
+<a name="line324">324: </a>        PetscFree(nnz);
+<a name="line325">325: </a>      }
+<a name="line326">326: </a>      *Mt = M;
+<a name="line327">327: </a>      *P  = *T;
+<a name="line328">328: </a>    }
+<a name="line329">329: </a>  
+<a name="line330">330: </a>    <font color="#B22222">/* Set values */</font>
+<a name="line331">331: </a>    VecGetArrayRead(w,&array);
+<a name="line332">332: </a>    <font color="#4169E1">for</font> (i=m0;i<m1;i++) {
+<a name="line333">333: </a>      MatGetRow(M,i,&ncols,&cols,&vals);
+<a name="line334">334: </a>      MatSetValues(*T,1,&i,ncols,cols,vals,INSERT_VALUES);
+<a name="line335">335: </a>      MatRestoreRow(M,i,&ncols,&cols,&vals);
+<a name="line336">336: </a>      MatSetValues(*T,1,&i,1,&mg,array+i-m0,INSERT_VALUES);
+<a name="line337">337: </a>    }
+<a name="line338">338: </a>    VecRestoreArrayRead(w,&array);
+<a name="line339">339: </a>    VecConjugate(v);
+<a name="line340">340: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)A[0]),&size);
+<a name="line341">341: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)A[0]),&rank);
+<a name="line342">342: </a>    <font color="#4169E1">if</font> (size>1) {
+<a name="line343">343: </a>      <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line344">344: </a>        PetscMalloc1(pep->n,&cols2);
+<a name="line345">345: </a>        <font color="#4169E1">for</font> (i=0;i<pep->n;i++) cols2[i]=i;
+<a name="line346">346: </a>      }
+<a name="line347">347: </a>      VecScatterBegin(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line348">348: </a>      VecScatterEnd(ctx->nst,v,ctx->nv,INSERT_VALUES,SCATTER_FORWARD);
+<a name="line349">349: </a>      VecGetArrayRead(ctx->nv,&array);
+<a name="line350">350: </a>      <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line351">351: </a>        MatSetValues(*T,1,&mg,pep->n,cols2,array,INSERT_VALUES);
+<a name="line352">352: </a>        MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);
+<a name="line353">353: </a>      }
+<a name="line354">354: </a>        VecRestoreArrayRead(ctx->nv,&array);
+<a name="line355">355: </a>    } <font color="#4169E1">else</font> {
+<a name="line356">356: </a>      PetscMalloc1(m1-m0,&cols2);
+<a name="line357">357: </a>      <font color="#4169E1">for</font> (i=0;i<m1-m0;i++) cols2[i]=m0+i;
+<a name="line358">358: </a>      VecGetArrayRead(v,&array);
+<a name="line359">359: </a>      MatSetValues(*T,1,&mg,m1-m0,cols2,array,INSERT_VALUES);
+<a name="line360">360: </a>      MatSetValues(*T,1,&mg,1,&mg,&zero,INSERT_VALUES);
+<a name="line361">361: </a>      VecRestoreArrayRead(v,&array);
+<a name="line362">362: </a>    }
+<a name="line363">363: </a>    VecConjugate(v);
+<a name="line364">364: </a>    MatAssemblyBegin(*T,MAT_FINAL_ASSEMBLY);
+<a name="line365">365: </a>    MatAssemblyEnd(*T,MAT_FINAL_ASSEMBLY); 
+<a name="line366">366: </a>    PetscFree(cols2);
+<a name="line367">367: </a>    <font color="#4169E1">break</font>; 
+<a name="line368">368: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line369">369: </a>    fctx->M2 = ctx->w;
+<a name="line370">370: </a>    fctx->M3 = v;
+<a name="line371">371: </a>    fctx->m3 = 0.0;
+<a name="line372">372: </a>    <font color="#4169E1">for</font> (i=1;i<nmat-1;i++) fctx->m3 += PetscConj(coeffs[i])*coeffs[i];
+<a name="line373">373: </a>    fctx->M4 = 0.0;
+<a name="line374">374: </a>    <font color="#4169E1">for</font> (i=1;i<nmat-1;i++) fctx->M4 += PetscConj(coeffs[i])*coeffs2[i];
+<a name="line375">375: </a>    fctx->M1 = M;
+<a name="line376">376: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line377">377: </a>      MatDuplicate(M,MAT_COPY_VALUES,P);
+<a name="line378">378: </a>    } <font color="#4169E1">else</font> {
+<a name="line379">379: </a>      MatCopy(M,*P,SAME_NONZERO_PATTERN);
+<a name="line380">380: </a>    }
+<a name="line381">381: </a>    VecConjugate(v);
+<a name="line382">382: </a>    VecPointwiseMult(t,v,w);
+<a name="line383">383: </a>    VecConjugate(v);
+<a name="line384">384: </a>    VecScale(t,-fctx->m3/fctx->M4);
+<a name="line385">385: </a>    MatDiagonalSet(*P,t,ADD_VALUES);
+<a name="line386">386: </a>    <font color="#4169E1">break</font>;
+<a name="line387">387: </a>  <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line388">388: </a>    *T = M;
+<a name="line389">389: </a>    *P = M;
+<a name="line390">390: </a>    <font color="#4169E1">break</font>;
+<a name="line391">391: </a>  }
+<a name="line392">392: </a>  PetscFree2(coeffs,coeffs2);
+<a name="line393">393: </a>  <font color="#4169E1">return</font>(0);
+<a name="line394">394: </a>}
+
+<a name="line398">398: </a><strong><font color="#4169E1"><a name="PEPNewtonRefinementSimple"></a>PetscErrorCode PEPNewtonRefinementSimple(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *maxits,PetscReal tol,PetscInt k)</font></strong>
+<a name="line399">399: </a>{
+<a name="line400">400: </a>  PetscErrorCode     ierr;
+<a name="line401">401: </a>  PetscInt           i,n,its,idx=0,*idx_sc,*its_sc,color,*fail_sc;
+<a name="line402">402: </a>  PetscMPIInt        rank,size;
+<a name="line403">403: </a>  Mat                Mt=NULL,T=NULL,P=NULL;
+<a name="line404">404: </a>  MPI_Comm           comm;
+<a name="line405">405: </a>  Vec                r,v,dv,rr=NULL,dvv=NULL,t[2];
+<a name="line406">406: </a>  PetscScalar        *array2,deig=0.0,tt[2],ttt;
+<a name="line407">407: </a>  const PetscScalar  *array;
+<a name="line408">408: </a>  PetscReal          norm,error;
+<a name="line409">409: </a>  PetscBool          ini=PETSC_TRUE,sc_pend,solved=PETSC_FALSE;
+<a name="line410">410: </a>  PEPSimpNRefctx     *ctx;
+<a name="line411">411: </a>  FSubctx            *fctx=NULL;
+<a name="line412">412: </a>  KSPConvergedReason reason;
+
+<a name="line415">415: </a>  PetscLogEventBegin(PEP_Refine,pep,0,0,0);
+<a name="line416">416: </a>  PEPSimpleNRefSetUp(pep,&ctx);
+<a name="line417">417: </a>  its = (maxits)?*maxits:NREF_MAXIT;
+<a name="line418">418: </a>  <font color="#4169E1">if</font> (!pep->refineksp) { <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&pep->refineksp); }
+<a name="line419">419: </a>  comm = (pep->npart==1)?PetscObjectComm((PetscObject)pep):PetscSubcommChild(pep->refinesubc);
+<a name="line420">420: </a>  <font color="#4169E1">if</font> (pep->npart==1) {
+<a name="line421">421: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
+<a name="line422">422: </a>  } <font color="#4169E1">else</font> v = ctx->v;
+<a name="line423">423: </a>  VecDuplicate(v,&ctx->w);
+<a name="line424">424: </a>  VecDuplicate(v,&r);
+<a name="line425">425: </a>  VecDuplicate(v,&dv);
+<a name="line426">426: </a>  VecDuplicate(v,&t[0]);
+<a name="line427">427: </a>  VecDuplicate(v,&t[1]);
+<a name="line428">428: </a>  <font color="#4169E1">if</font> (pep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v); }
+<a name="line429">429: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
+<a name="line430">430: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
+<a name="line431">431: </a>  VecGetLocalSize(r,&n);
+<a name="line432">432: </a>  PetscMalloc3(pep->npart,&idx_sc,pep->npart,&its_sc,pep->npart,&fail_sc);
+<a name="line433">433: </a>  <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) fail_sc[i] = 0;
+<a name="line434">434: </a>  <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) its_sc[i] = 0;
+<a name="line435">435: </a>  color = (pep->npart==1)?0:pep->refinesubc->color;
+<a name="line436">436: </a>   
+<a name="line437">437: </a>  <font color="#B22222">/* Loop performing iterative refinements */</font>
+<a name="line438">438: </a>  <font color="#4169E1">while</font> (!solved) {
+<a name="line439">439: </a>    <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) {
+<a name="line440">440: </a>      sc_pend = PETSC_TRUE;
+<a name="line441">441: </a>      <font color="#4169E1">if</font> (its_sc[i]==0) {
+<a name="line442">442: </a>        idx_sc[i] = idx++;
+<a name="line443">443: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) {
+<a name="line444">444: </a>          sc_pend = PETSC_FALSE;
+<a name="line445">445: </a>        } <font color="#4169E1">else</font> {
+<a name="line446">446: </a>          PEPSimpleNRefScatterEigenvector(pep,ctx,i,idx_sc[i]);
+<a name="line447">447: </a>        }
+<a name="line448">448: </a>      }  <font color="#4169E1">else</font> { <font color="#B22222">/* Gather Eigenpair from subcommunicator i */</font>
+<a name="line449">449: </a>        PEPSimpleNRefGatherEigenpair(pep,ctx,i,idx_sc[i],&fail_sc[i]);
+<a name="line450">450: </a>      }
+<a name="line451">451: </a>      <font color="#4169E1">while</font> (sc_pend) {
+<a name="line452">452: </a>        <font color="#4169E1">if</font> (!fail_sc[i]) {
+<a name="line453">453: </a>          <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,idx_sc[i],PEP_ERROR_BACKWARD,&error);
+<a name="line454">454: </a>        }
+<a name="line455">455: </a>        <font color="#4169E1">if</font> (error<=tol || its_sc[i]>=its || fail_sc[i]) {
+<a name="line456">456: </a>          idx_sc[i] = idx++;
+<a name="line457">457: </a>          its_sc[i] = 0;
+<a name="line458">458: </a>          <font color="#4169E1">if</font> (idx_sc[i]<k) { PEPSimpleNRefScatterEigenvector(pep,ctx,i,idx_sc[i]); }
+<a name="line459">459: </a>        } <font color="#4169E1">else</font> {
+<a name="line460">460: </a>          sc_pend = PETSC_FALSE;
+<a name="line461">461: </a>          its_sc[i]++;
+<a name="line462">462: </a>        }
+<a name="line463">463: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) sc_pend = PETSC_FALSE;
+<a name="line464">464: </a>      }
+<a name="line465">465: </a>    }
+<a name="line466">466: </a>    solved = PETSC_TRUE;
+<a name="line467">467: </a>    <font color="#4169E1">for</font> (i=0;i<pep->npart&&solved;i++) solved = PetscNot(idx_sc[i]<k);
+<a name="line468">468: </a>    <font color="#4169E1">if</font> (idx_sc[color]<k) {
+<a name="line469">469: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line470">470: </a>      <font color="#4169E1">if</font> (pep->eigi[idx_sc[color]]!=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Simple Refinement not implemented in real scalars for complex eigenvalues"</font>);
+<a name="line471">471: </a><font color="#A020F0">#endif</font>
+<a name="line472">472: </a>      <font color="#4169E1">if</font> (pep->npart==1) {
+<a name="line473">473: </a>        <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,idx_sc[color],&v);
+<a name="line474">474: </a>      } <font color="#4169E1">else</font> v = ctx->v; 
+<a name="line475">475: </a>      PEPSimpleNRefSetUpSystem(pep,ctx->A,ctx,idx_sc[color],&Mt,&T,&P,ini,t[0],v);
+<a name="line476">476: </a>      KSPSetOperators(pep->refineksp,T,P);
+<a name="line477">477: </a>      <font color="#4169E1">if</font> (ini) {
+<a name="line478">478: </a>        KSPSetFromOptions(pep->refineksp);
+<a name="line479">479: </a>        <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line480">480: </a>          MatCreateVecs(T,&dvv,NULL);
+<a name="line481">481: </a>          VecDuplicate(dvv,&rr);
+<a name="line482">482: </a>        }
+<a name="line483">483: </a>        ini = PETSC_FALSE;
+<a name="line484">484: </a>      }
+
+<a name="line486">486: </a>      <font color="#4169E1">switch</font> (pep->scheme) {
+<a name="line487">487: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_EXPLICIT: 
+<a name="line488">488: </a>        MatMult(Mt,v,r);
+<a name="line489">489: </a>        VecGetArrayRead(r,&array);
+<a name="line490">490: </a>        <font color="#4169E1">if</font> (rank==size-1) {
+<a name="line491">491: </a>          VecGetArray(rr,&array2);
+<a name="line492">492: </a>          PetscMemcpy(array2,array,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line493">493: </a>          array2[n] = 0.0;
+<a name="line494">494: </a>          VecRestoreArray(rr,&array2);
+<a name="line495">495: </a>        } <font color="#4169E1">else</font> {
+<a name="line496">496: </a>          VecPlaceArray(rr,array);
+<a name="line497">497: </a>        }
+<a name="line498">498: </a>        KSPSolve(pep->refineksp,rr,dvv);
+<a name="line499">499: </a>        KSPGetConvergedReason(pep->refineksp,&reason);
+<a name="line500">500: </a>        <font color="#4169E1">if</font> (reason>0) {
+<a name="line501">501: </a>          <font color="#4169E1">if</font> (rank != size-1) {
+<a name="line502">502: </a>            VecResetArray(rr);
+<a name="line503">503: </a>          }
+<a name="line504">504: </a>          VecRestoreArrayRead(r,&array);
+<a name="line505">505: </a>          VecGetArrayRead(dvv,&array);
+<a name="line506">506: </a>          VecPlaceArray(dv,array);
+<a name="line507">507: </a>          VecAXPY(v,-1.0,dv);
+<a name="line508">508: </a>          VecNorm(v,NORM_2,&norm);
+<a name="line509">509: </a>          VecScale(v,1.0/norm);
+<a name="line510">510: </a>          VecResetArray(dv);
+<a name="line511">511: </a>          <font color="#4169E1">if</font> (rank==size-1) pep->eigr[idx_sc[color]] -= array[n];
+<a name="line512">512: </a>          VecRestoreArrayRead(dvv,&array);
+<a name="line513">513: </a>        } <font color="#4169E1">else</font> fail_sc[color] = 1;
+<a name="line514">514: </a>        <font color="#4169E1">break</font>;
+<a name="line515">515: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_MBE:
+<a name="line516">516: </a>        MatMult(T,v,r);
+<a name="line517">517: </a>        <font color="#B22222">/* Mixed block elimination */</font>
+<a name="line518">518: </a>        VecConjugate(v);
+<a name="line519">519: </a>        KSPSolveTranspose(pep->refineksp,v,t[0]);
+<a name="line520">520: </a>        KSPGetConvergedReason(pep->refineksp,&reason);
+<a name="line521">521: </a>        <font color="#4169E1">if</font> (reason>0) {
+<a name="line522">522: </a>          VecConjugate(t[0]);
+<a name="line523">523: </a>          VecDot(ctx->w,t[0],&tt[0]);
+<a name="line524">524: </a>          KSPSolve(pep->refineksp,ctx->w,t[1]);
+<a name="line525">525: </a>          KSPGetConvergedReason(pep->refineksp,&reason);
+<a name="line526">526: </a>          <font color="#4169E1">if</font> (reason>0) {
+<a name="line527">527: </a>            VecDot(t[1],v,&tt[1]);
+<a name="line528">528: </a>            VecDot(r,t[0],&ttt);
+<a name="line529">529: </a>            tt[0] = ttt/tt[0];
+<a name="line530">530: </a>            VecAXPY(r,-tt[0],ctx->w);
+<a name="line531">531: </a>            KSPSolve(pep->refineksp,r,dv);
+<a name="line532">532: </a>            KSPGetConvergedReason(pep->refineksp,&reason);
+<a name="line533">533: </a>            <font color="#4169E1">if</font> (reason>0) {
+<a name="line534">534: </a>              VecDot(dv,v,&ttt);
+<a name="line535">535: </a>              tt[1] = ttt/tt[1];
+<a name="line536">536: </a>              VecAXPY(dv,-tt[1],t[1]);
+<a name="line537">537: </a>              deig = tt[0]+tt[1];
+<a name="line538">538: </a>            }
+<a name="line539">539: </a>          }
+<a name="line540">540: </a>          VecConjugate(v);
+<a name="line541">541: </a>          VecAXPY(v,-1.0,dv);
+<a name="line542">542: </a>          VecNorm(v,NORM_2,&norm);
+<a name="line543">543: </a>          VecScale(v,1.0/norm);
+<a name="line544">544: </a>          pep->eigr[idx_sc[color]] -= deig;
+<a name="line545">545: </a>          fail_sc[color] = 0;
+<a name="line546">546: </a>        } <font color="#4169E1">else</font> {
+<a name="line547">547: </a>          VecConjugate(v);
+<a name="line548">548: </a>          fail_sc[color] = 1;
+<a name="line549">549: </a>        }
+<a name="line550">550: </a>        <font color="#4169E1">break</font>;
+<a name="line551">551: </a>      <font color="#4169E1">case</font> PEP_REFINE_SCHEME_SCHUR:
+<a name="line552">552: </a>        MatShellGetContext(T,&fctx);
+<a name="line553">553: </a>        MatMult(fctx->M1,v,r);
+<a name="line554">554: </a>        KSPSolve(pep->refineksp,r,dv);
+<a name="line555">555: </a>        KSPGetConvergedReason(pep->refineksp,&reason);
+<a name="line556">556: </a>        <font color="#4169E1">if</font> (reason>0) {
+<a name="line557">557: </a>          VecDot(dv,v,&deig);
+<a name="line558">558: </a>          deig *= -fctx->m3/fctx->M4;
+<a name="line559">559: </a>          VecAXPY(v,-1.0,dv);
+<a name="line560">560: </a>          VecNorm(v,NORM_2,&norm);
+<a name="line561">561: </a>          VecScale(v,1.0/norm);
+<a name="line562">562: </a>          pep->eigr[idx_sc[color]] -= deig;
+<a name="line563">563: </a>          fail_sc[color] = 0;
+<a name="line564">564: </a>        } <font color="#4169E1">else</font> fail_sc[color] = 1;
+<a name="line565">565: </a>        <font color="#4169E1">break</font>;
+<a name="line566">566: </a>      }
+<a name="line567">567: </a>      <font color="#4169E1">if</font> (pep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,idx_sc[color],&v); } 
+<a name="line568">568: </a>    }
+<a name="line569">569: </a>  }
+<a name="line570">570: </a>  VecDestroy(&t[0]);
+<a name="line571">571: </a>  VecDestroy(&t[1]);
+<a name="line572">572: </a>  VecDestroy(&dv);
+<a name="line573">573: </a>  VecDestroy(&ctx->w);
+<a name="line574">574: </a>  VecDestroy(&r);
+<a name="line575">575: </a>  PetscFree3(idx_sc,its_sc,fail_sc);
+<a name="line576">576: </a>  VecScatterDestroy(&ctx->nst);
+<a name="line577">577: </a>  <font color="#4169E1">if</font> (pep->npart>1) {
+<a name="line578">578: </a>    VecDestroy(&ctx->vg);
+<a name="line579">579: </a>    VecDestroy(&ctx->v);
+<a name="line580">580: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
+<a name="line581">581: </a>      MatDestroy(&ctx->A[i]);
+<a name="line582">582: </a>    }
+<a name="line583">583: </a>    <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) {
+<a name="line584">584: </a>      VecScatterDestroy(&ctx->scatter_id[i]);
+<a name="line585">585: </a>    }
+<a name="line586">586: </a>    PetscFree2(ctx->A,ctx->scatter_id);
+<a name="line587">587: </a>  }
+<a name="line588">588: </a>  <font color="#4169E1">if</font> (fctx && pep->scheme==PEP_REFINE_SCHEME_SCHUR) {
+<a name="line589">589: </a>    MatDestroy(&P);
+<a name="line590">590: </a>    MatDestroy(&fctx->M1);
+<a name="line591">591: </a>    PetscFree(fctx);
+<a name="line592">592: </a>  }
+<a name="line593">593: </a>  <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_EXPLICIT) {
+<a name="line594">594: </a>    MatDestroy(&Mt);
+<a name="line595">595: </a>    VecDestroy(&dvv);
+<a name="line596">596: </a>    VecDestroy(&rr);
+<a name="line597">597: </a>    VecDestroy(&ctx->nv);
+<a name="line598">598: </a>  }
+<a name="line599">599: </a>  MatDestroy(&T);
+<a name="line600">600: </a>  PetscFree(ctx);
+<a name="line601">601: </a>  PetscLogEventEnd(PEP_Refine,pep,0,0,0);
+<a name="line602">602: </a>  <font color="#4169E1">return</font>(0);
+<a name="line603">603: </a>}
 
-<a name="line295">295: </a>  PetscLogEventBegin(PEP_Refine,pep,0,0,0);
-<a name="line296">296: </a>  PEPSimpleNRefSetUp(pep,&ctx);
-<a name="line297">297: </a>  its = (maxits)?*maxits:NREF_MAXIT;
-<a name="line298">298: </a>  comm = (pep->npart==1)?PetscObjectComm((PetscObject)pep):PetscSubcommChild(pep->refinesubc);
-<a name="line299">299: </a>  <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&ksp);
-<a name="line300">300: </a>  <font color="#4169E1">if</font> (pep->npart==1) {
-<a name="line301">301: </a>    <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,0,&v);
-<a name="line302">302: </a>  } <font color="#4169E1">else</font> v = ctx->v;
-<a name="line303">303: </a>  VecDuplicate(v,&r);
-<a name="line304">304: </a>  VecDuplicate(v,&dv);
-<a name="line305">305: </a>  VecDuplicate(v,&t[0]);
-<a name="line306">306: </a>  VecDuplicate(v,&t[1]);
-<a name="line307">307: </a>  <font color="#4169E1">if</font> (pep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,0,&v); }
-<a name="line308">308: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(comm,&size);
-<a name="line309">309: </a>  <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(comm,&rank);
-<a name="line310">310: </a>  VecGetLocalSize(r,&n);
-<a name="line311">311: </a>  PetscMalloc2(pep->npart,&idx_sc,pep->npart,&its_sc);
-<a name="line312">312: </a>  <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) its_sc[i] = 0;
-<a name="line313">313: </a>  color = (pep->npart==1)?0:pep->refinesubc->color;
-<a name="line314">314: </a>   
-<a name="line315">315: </a>  <font color="#B22222">/* Loop performing iterative refinements */</font>
-<a name="line316">316: </a>  <font color="#4169E1">while</font> (!solved) {
-<a name="line317">317: </a>    <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) {
-<a name="line318">318: </a>      sc_pend = PETSC_TRUE;
-<a name="line319">319: </a>      <font color="#4169E1">if</font> (its_sc[i]==0) {
-<a name="line320">320: </a>        idx_sc[i] = idx++;
-<a name="line321">321: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) {
-<a name="line322">322: </a>          sc_pend = PETSC_FALSE;
-<a name="line323">323: </a>        } <font color="#4169E1">else</font> {
-<a name="line324">324: </a>          PEPSimpleNRefScatterEigenvector(pep,ctx,i,idx_sc[i]);
-<a name="line325">325: </a>        }
-<a name="line326">326: </a>      }  <font color="#4169E1">else</font> { <font color="#B22222">/* Gather Eigenpair from subcommunicator i */</font>
-<a name="line327">327: </a>        PEPSimpleNRefGatherEigenpair(pep,ctx,i,idx_sc[i]);
-<a name="line328">328: </a>      }
-<a name="line329">329: </a>      <font color="#4169E1">while</font> (sc_pend) {
-<a name="line330">330: </a>        <font color="#4169E1">if</font> (tol) {
-<a name="line331">331: </a>          <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,idx_sc[i],PEP_ERROR_BACKWARD,&error);
-<a name="line332">332: </a>        }
-<a name="line333">333: </a>        <font color="#4169E1">if</font> (error<=*tol || its_sc[i]>=its) {
-<a name="line334">334: </a>          idx_sc[i] = idx++;
-<a name="line335">335: </a>          its_sc[i] = 0;
-<a name="line336">336: </a>          <font color="#4169E1">if</font> (idx_sc[i]<k) { PEPSimpleNRefScatterEigenvector(pep,ctx,i,idx_sc[i]); }
-<a name="line337">337: </a>        } <font color="#4169E1">else</font> {
-<a name="line338">338: </a>          sc_pend = PETSC_FALSE;
-<a name="line339">339: </a>          its_sc[i]++;
-<a name="line340">340: </a>        }
-<a name="line341">341: </a>        <font color="#4169E1">if</font> (idx_sc[i]>=k) sc_pend = PETSC_FALSE;
-<a name="line342">342: </a>      }
-<a name="line343">343: </a>    }
-<a name="line344">344: </a>    solved = PETSC_TRUE;
-<a name="line345">345: </a>    <font color="#4169E1">for</font> (i=0;i<pep->npart&&solved;i++) solved = (idx_sc[i]<k)?PETSC_FALSE:PETSC_TRUE;
-<a name="line346">346: </a>    <font color="#4169E1">if</font> (idx_sc[color]<k) {
-<a name="line347">347: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line348">348: </a>      <font color="#4169E1">if</font> (pep->eigi[idx_sc[color]]!=0.0) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Simple Refinement not implemented in real scalars for complex eigenvalues"</font>);
-<a name="line349">349: </a><font color="#A020F0">#endif</font>
-<a name="line350">350: </a>      <font color="#4169E1">if</font> (pep->npart==1) {
-<a name="line351">351: </a>        <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,idx_sc[color],&v);
-<a name="line352">352: </a>      } <font color="#4169E1">else</font> v = ctx->v; 
-<a name="line353">353: </a>      PEPSimpleNRefSetUpSystem(pep,ctx->A,idx_sc[color],&M,&T,ini,t,v);
-<a name="line354">354: </a>      KSPSetOperators(ksp,M,M);
-<a name="line355">355: </a>      <font color="#4169E1">if</font> (ini) {
-<a name="line356">356: </a>        KSPSetFromOptions(ksp);
-<a name="line357">357: </a>        MatCreateVecs(M,&dvv,NULL);
-<a name="line358">358: </a>        VecDuplicate(dvv,&rr);
-<a name="line359">359: </a>        ini = PETSC_FALSE;
-<a name="line360">360: </a>      }
-<a name="line361">361: </a>      MatMult(T,v,r);
-<a name="line362">362: </a>      VecGetArrayRead(r,&array);
-<a name="line363">363: </a>      <font color="#4169E1">if</font> (rank==size-1) {
-<a name="line364">364: </a>        VecGetArray(rr,&array2);
-<a name="line365">365: </a>        PetscMemcpy(array2,array,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line366">366: </a>        array2[n] = 0.0;
-<a name="line367">367: </a>        VecRestoreArray(rr,&array2);
-<a name="line368">368: </a>      } <font color="#4169E1">else</font> {
-<a name="line369">369: </a>        VecPlaceArray(rr,array);
-<a name="line370">370: </a>      }
-<a name="line371">371: </a>      KSPSolve(ksp,rr,dvv);
-<a name="line372">372: </a>      KSPGetConvergedReason(ksp,&reason);
-<a name="line373">373: </a>      <font color="#4169E1">if</font> (reason<0) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_NOT_CONVERGED,<font color="#666666">"KSP did not converge (reason=%s)"</font>,KSPConvergedReasons[reason]);
-<a name="line374">374: </a>      <font color="#4169E1">if</font> (rank != size-1) {
-<a name="line375">375: </a>        VecResetArray(rr);
-<a name="line376">376: </a>      }
-<a name="line377">377: </a>      VecRestoreArrayRead(r,&array);
-<a name="line378">378: </a>      VecGetArrayRead(dvv,&array);
-<a name="line379">379: </a>      VecPlaceArray(dv,array);
-<a name="line380">380: </a>      VecAXPY(v,-1.0,dv);
-<a name="line381">381: </a>      VecNorm(v,NORM_2,&norm);
-<a name="line382">382: </a>      VecScale(v,1.0/norm);
-<a name="line383">383: </a>      VecResetArray(dv);
-<a name="line384">384: </a>      <font color="#4169E1">if</font> (rank==size-1) pep->eigr[idx_sc[color]] -= array[n];
-<a name="line385">385: </a>      VecRestoreArrayRead(dvv,&array);
-<a name="line386">386: </a>      <font color="#4169E1">if</font> (pep->npart==1) { <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,idx_sc[color],&v); } 
-<a name="line387">387: </a>    }
-<a name="line388">388: </a>  }
-<a name="line389">389: </a>  MatDestroy(&M);
-<a name="line390">390: </a>  MatDestroy(&T);
-<a name="line391">391: </a>  VecDestroy(&t[0]);
-<a name="line392">392: </a>  VecDestroy(&t[1]);
-<a name="line393">393: </a>  VecDestroy(&dv);
-<a name="line394">394: </a>  VecDestroy(&dvv);
-<a name="line395">395: </a>  VecDestroy(&r);
-<a name="line396">396: </a>  VecDestroy(&rr);
-<a name="line397">397: </a>  PetscFree2(idx_sc,its_sc);
-<a name="line398">398: </a>  <font color="#4169E1">if</font> (pep->npart>1) {
-<a name="line399">399: </a>    VecDestroy(&ctx->vg);
-<a name="line400">400: </a>    VecDestroy(&ctx->v);
-<a name="line401">401: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nmat;i++) {
-<a name="line402">402: </a>      MatDestroy(&ctx->A[i]);
-<a name="line403">403: </a>    }
-<a name="line404">404: </a>    <font color="#4169E1">for</font> (i=0;i<pep->npart;i++) {
-<a name="line405">405: </a>      VecScatterDestroy(&ctx->scatter_id[i]);
-<a name="line406">406: </a>    }
-<a name="line407">407: </a>    PetscFree2(ctx->A,ctx->scatter_id);
-<a name="line408">408: </a>  }
-<a name="line409">409: </a>  PetscFree(ctx);
-<a name="line410">410: </a>  PetscLogEventEnd(PEP_Refine,pep,0,0,0);
-<a name="line411">411: </a>  <font color="#4169E1">return</font>(0);
-<a name="line412">412: </a>}
 </pre>
 </body>
 
diff --git a/src/pep/interface/pepregis.c b/src/pep/interface/pepregis.c
index f86c893..068d5f2 100644
--- a/src/pep/interface/pepregis.c
+++ b/src/pep/interface/pepregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/pep/interface/pepregis.c.html b/src/pep/interface/pepregis.c.html
index ec71acf..5a690d4 100644
--- a/src/pep/interface/pepregis.c.html
+++ b/src/pep/interface/pepregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:50+00:00">
+<meta name="date" content="2016-05-16T10:33:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/pep/interface/pepsetup.c b/src/pep/interface/pepsetup.c
index 36fceab..b7507d4 100644
--- a/src/pep/interface/pepsetup.c
+++ b/src/pep/interface/pepsetup.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -49,6 +49,10 @@ PetscErrorCode PEPSetUp(PEP pep)
   SlepcSC        sc;
   PetscBool      islinear,istrivial,flg;
   PetscInt       k;
+  KSP            ksp;
+  PC             pc;
+  PetscMPIInt    size;
+  const MatSolverPackage stype;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
@@ -73,9 +77,6 @@ PetscErrorCode PEPSetUp(PEP pep)
   if (!((PetscObject)pep->rg)->type_name) {
     ierr = RGSetType(pep->rg,RGINTERVAL);CHKERRQ(ierr);
   }
-  if (!((PetscObject)pep->rand)->type_name) {
-    ierr = PetscRandomSetFromOptions(pep->rand);CHKERRQ(ierr);
-  }
 
   /* check matrices, transfer them to ST */
   if (!pep->A) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONGSTATE,"PEPSetOperators must be called first");
@@ -90,13 +91,43 @@ PetscErrorCode PEPSetUp(PEP pep)
     ierr = PEPSetProblemType(pep,PEP_GENERAL);CHKERRQ(ierr);
   }
 
+  /* check consistency of refinement options */
+  if (pep->refine) {
+    if (!pep->scheme) {  /* set default scheme */
+      ierr = PEPRefineGetKSP(pep,&ksp);CHKERRQ(ierr);
+      ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
+      ierr = PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);CHKERRQ(ierr);
+      if (flg) {
+        ierr = PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,"");CHKERRQ(ierr);
+      }
+      pep->scheme = flg? PEP_REFINE_SCHEME_MBE: PEP_REFINE_SCHEME_SCHUR;
+    }
+    if (pep->scheme==PEP_REFINE_SCHEME_MBE) {
+      ierr = PEPRefineGetKSP(pep,&ksp);CHKERRQ(ierr);
+      ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
+      ierr = PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);CHKERRQ(ierr);
+      if (flg) {
+        ierr = PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,"");CHKERRQ(ierr);
+      }
+      if (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"The MBE scheme for refinement requires a direct solver in KSP");
+      ierr = MPI_Comm_size(PetscObjectComm((PetscObject)pc),&size);CHKERRQ(ierr);
+      if (size>1) {   /* currently selected PC is a factorization */
+        ierr = PCFactorGetMatSolverPackage(pc,&stype);CHKERRQ(ierr);
+        ierr = PetscStrcmp(stype,MATSOLVERPETSC,&flg);CHKERRQ(ierr);
+        if (flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"For Newton refinement, you chose to solve linear systems with a factorization, but in parallel runs you need to select an external package");
+      }
+    }
+    if (pep->scheme==PEP_REFINE_SCHEME_SCHUR) {
+      if (pep->npart>1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"The Schur scheme for refinement does not support subcommunicators"); 
+    }
+  }
   /* call specific solver setup */
   ierr = (*pep->ops->setup)(pep);CHKERRQ(ierr);
 
   /* set tolerance if not yet set */
   if (pep->tol==PETSC_DEFAULT) pep->tol = SLEPC_DEFAULT_TOL;
   if (pep->refine) {
-    if (pep->rtol==PETSC_DEFAULT) pep->rtol = pep->tol;
+    if (pep->rtol==PETSC_DEFAULT) pep->rtol = PetscMax(pep->tol/1000,PETSC_MACHINE_EPSILON);
     if (pep->rits==PETSC_DEFAULT) pep->rits = (pep->refine==PEP_REFINE_SIMPLE)? 10: 1;
   }
 
@@ -186,10 +217,6 @@ PetscErrorCode PEPSetUp(PEP pep)
     ierr = PEPBuildDiagonalScaling(pep);CHKERRQ(ierr);
   }
 
-  if (pep->conv==PEP_CONV_LINEAR) {
-    ierr = PEPComputeLinearNorms(pep);CHKERRQ(ierr);
-  }
-
   /* process initial vectors */
   if (pep->nini<0) {
     k = -pep->nini;
@@ -280,7 +307,7 @@ PetscErrorCode PEPGetOperators(PEP pep,PetscInt k,Mat *A)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
   PetscValidPointer(A,3);
-  if (k<0 || k>=pep->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",pep->nmat-1);
+  if (k<0 || k>=pep->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",pep->nmat-1);
   *A = pep->A[k];
   PetscFunctionReturn(0);
 }
diff --git a/src/pep/interface/pepsetup.c.html b/src/pep/interface/pepsetup.c.html
index 737ac7e..38b73b2 100644
--- a/src/pep/interface/pepsetup.c.html
+++ b/src/pep/interface/pepsetup.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepsetup.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:53+00:00">
+<meta name="date" content="2016-05-16T10:33:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepsetup.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepsetup.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> routines related to problem setup.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -58,366 +58,393 @@
 <a name="line49"> 49: </a>  SlepcSC        sc;
 <a name="line50"> 50: </a>  PetscBool      islinear,istrivial,flg;
 <a name="line51"> 51: </a>  PetscInt       k;
-
-<a name="line55"> 55: </a>  <font color="#4169E1">if</font> (pep->state) <font color="#4169E1">return</font>(0);
-<a name="line56"> 56: </a>  PetscLogEventBegin(PEP_SetUp,pep,0,0,0);
-
-<a name="line58"> 58: </a>  <font color="#B22222">/* reset the convergence flag from the previous solves */</font>
-<a name="line59"> 59: </a>  pep->reason = PEP_CONVERGED_ITERATING;
-
-<a name="line61"> 61: </a>  <font color="#B22222">/* set default solver type (<a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a> was not called) */</font>
-<a name="line62"> 62: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep)->type_name) {
-<a name="line63"> 63: </a>    <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,PEPTOAR);
-<a name="line64"> 64: </a>  }
-<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
-<a name="line66"> 66: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&islinear);
-<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->st)->type_name) {
-<a name="line68"> 68: </a>    <a href="../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(pep->st,STSHIFT);
-<a name="line69"> 69: </a>  }
-<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
-<a name="line71"> 71: </a>  <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(pep->ds);
-<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
-<a name="line73"> 73: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->rg)->type_name) {
-<a name="line74"> 74: </a>    <a href="../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(pep->rg,RGINTERVAL);
-<a name="line75"> 75: </a>  }
-<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->rand)->type_name) {
-<a name="line77"> 77: </a>    PetscRandomSetFromOptions(pep->rand);
-<a name="line78"> 78: </a>  }
-
-<a name="line80"> 80: </a>  <font color="#B22222">/* check matrices, transfer them to <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line81"> 81: </a>  <font color="#4169E1">if</font> (!pep->A) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a> must be called first"</font>);
-<a name="line82"> 82: </a>  <a href="../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(pep->st,pep->nmat,pep->A);
-
-<a name="line84"> 84: </a>  <font color="#B22222">/* set problem dimensions */</font>
-<a name="line85"> 85: </a>  MatGetSize(pep->A[0],&pep->n,NULL);
-<a name="line86"> 86: </a>  MatGetLocalSize(pep->A[0],&pep->nloc,NULL);
-
-<a name="line88"> 88: </a>  <font color="#B22222">/* set default problem type */</font>
-<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (!pep->problem_type) {
-<a name="line90"> 90: </a>    <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL);
-<a name="line91"> 91: </a>  }
-
-<a name="line93"> 93: </a>  <font color="#B22222">/* call specific solver setup */</font>
-<a name="line94"> 94: </a>  (*pep->ops->setup)(pep);
-
-<a name="line96"> 96: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
-<a name="line97"> 97: </a>  <font color="#4169E1">if</font> (pep->tol==PETSC_DEFAULT) pep->tol = SLEPC_DEFAULT_TOL;
-<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (pep->refine) {
-<a name="line99"> 99: </a>    <font color="#4169E1">if</font> (pep->rtol==PETSC_DEFAULT) pep->rtol = pep->tol;
-<a name="line100">100: </a>    <font color="#4169E1">if</font> (pep->rits==PETSC_DEFAULT) pep->rits = (pep->refine==PEP_REFINE_SIMPLE)? 10: 1;
-<a name="line101">101: </a>  }
-
-<a name="line103">103: </a>  <font color="#B22222">/* set default extraction */</font>
-<a name="line104">104: </a>  <font color="#4169E1">if</font> (!pep->extract) {
-<a name="line105">105: </a>    pep->extract = (pep->basis==PEP_BASIS_MONOMIAL)? PEP_EXTRACT_NORM: PEP_EXTRACT_NONE;
-<a name="line106">106: </a>  }
-
-<a name="line108">108: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
-<a name="line109">109: </a>  <font color="#4169E1">switch</font> (pep->which) {
-<a name="line110">110: </a>    <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:
-<a name="line111">111: </a>      pep->sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line112">112: </a>      pep->sc->comparisonctx = NULL;
-<a name="line113">113: </a>      <font color="#4169E1">break</font>;
-<a name="line114">114: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE:
-<a name="line115">115: </a>      pep->sc->comparison    = SlepcCompareSmallestMagnitude;
-<a name="line116">116: </a>      pep->sc->comparisonctx = NULL;
-<a name="line117">117: </a>      <font color="#4169E1">break</font>;
-<a name="line118">118: </a>    <font color="#4169E1">case</font> PEP_LARGEST_REAL:
-<a name="line119">119: </a>      pep->sc->comparison    = SlepcCompareLargestReal;
-<a name="line120">120: </a>      pep->sc->comparisonctx = NULL;
-<a name="line121">121: </a>      <font color="#4169E1">break</font>;
-<a name="line122">122: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_REAL:
-<a name="line123">123: </a>      pep->sc->comparison    = SlepcCompareSmallestReal;
-<a name="line124">124: </a>      pep->sc->comparisonctx = NULL;
-<a name="line125">125: </a>      <font color="#4169E1">break</font>;
-<a name="line126">126: </a>    <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:
-<a name="line127">127: </a>      pep->sc->comparison    = SlepcCompareLargestImaginary;
-<a name="line128">128: </a>      pep->sc->comparisonctx = NULL;
-<a name="line129">129: </a>      <font color="#4169E1">break</font>;
-<a name="line130">130: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY:
-<a name="line131">131: </a>      pep->sc->comparison    = SlepcCompareSmallestImaginary;
-<a name="line132">132: </a>      pep->sc->comparisonctx = NULL;
-<a name="line133">133: </a>      <font color="#4169E1">break</font>;
-<a name="line134">134: </a>    <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:
-<a name="line135">135: </a>      pep->sc->comparison    = SlepcCompareTargetMagnitude;
-<a name="line136">136: </a>      pep->sc->comparisonctx = &pep->target;
-<a name="line137">137: </a>      <font color="#4169E1">break</font>;
-<a name="line138">138: </a>    <font color="#4169E1">case</font> PEP_TARGET_REAL:
-<a name="line139">139: </a>      pep->sc->comparison    = SlepcCompareTargetReal;
-<a name="line140">140: </a>      pep->sc->comparisonctx = &pep->target;
-<a name="line141">141: </a>      <font color="#4169E1">break</font>;
-<a name="line142">142: </a>    <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:
-<a name="line143">143: </a>      pep->sc->comparison    = SlepcCompareTargetImaginary;
-<a name="line144">144: </a>      pep->sc->comparisonctx = &pep->target;
-<a name="line145">145: </a>      <font color="#4169E1">break</font>;
-<a name="line146">146: </a>    <font color="#4169E1">case</font> PEP_WHICH_USER:
-<a name="line147">147: </a>      <font color="#4169E1">break</font>;
-<a name="line148">148: </a>  }
-<a name="line149">149: </a>  pep->sc->map    = NULL;
-<a name="line150">150: </a>  pep->sc->mapobj = NULL;
-
-<a name="line152">152: </a>  <font color="#B22222">/* fill sorting criterion for <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
-<a name="line153">153: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(pep->ds,&sc);
-<a name="line154">154: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
-<a name="line155">155: </a>  sc->rg            = istrivial? NULL: pep->rg;
-<a name="line156">156: </a>  sc->comparison    = pep->sc->comparison;
-<a name="line157">157: </a>  sc->comparisonctx = pep->sc->comparisonctx;
-<a name="line158">158: </a>  sc->map           = SlepcMap_ST;
-<a name="line159">159: </a>  sc->mapobj        = (PetscObject)pep->st;
-
-<a name="line161">161: </a>  <font color="#B22222">/* setup <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
-<a name="line162">162: </a>  PetscObjectTypeCompareAny((PetscObject)pep->st,&flg,STSHIFT,STSINVERT,<font color="#666666">""</font>);
-<a name="line163">163: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Only STSHIFT and STSINVERT spectral transformations can be used in <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>"</font>);
-<a name="line164">164: </a>  <a href="../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(pep->st);
-<a name="line165">165: </a>  <font color="#B22222">/* compute matrix coefficients */</font>
-<a name="line166">166: </a>  <a href="../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
-<a name="line167">167: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line168">168: </a>    <font color="#4169E1">if</font> (pep->solvematcoeffs) { <a href="../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a>(pep->st,1.0,pep->solvematcoeffs); }
-<a name="line169">169: </a>  } <font color="#4169E1">else</font> {
-<a name="line170">170: </a>    <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Cannot use <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>-transform with non-monomial basis in <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>"</font>);
-<a name="line171">171: </a>  }
-
-<a name="line173">173: </a>  <font color="#B22222">/* compute scale factor if no set by user */</font>
-<a name="line174">174: </a>  PEPComputeScaleFactor(pep);
-
-<a name="line176">176: </a>  <font color="#B22222">/* build balancing matrix if required */</font>
-<a name="line177">177: </a>  <font color="#4169E1">if</font> (pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) {
-<a name="line178">178: </a>    <font color="#4169E1">if</font> (!pep->Dl) {
-<a name="line179">179: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&pep->Dl);
-<a name="line180">180: </a>      PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->Dl);
-<a name="line181">181: </a>    }
-<a name="line182">182: </a>    <font color="#4169E1">if</font> (!pep->Dr) {
-<a name="line183">183: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&pep->Dr);
-<a name="line184">184: </a>      PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->Dr);
-<a name="line185">185: </a>    }
-<a name="line186">186: </a>    PEPBuildDiagonalScaling(pep);
-<a name="line187">187: </a>  }
-
-<a name="line189">189: </a>  <font color="#4169E1">if</font> (pep->conv==PEP_CONV_LINEAR) {
-<a name="line190">190: </a>    PEPComputeLinearNorms(pep);
-<a name="line191">191: </a>  }
-
-<a name="line193">193: </a>  <font color="#B22222">/* process initial vectors */</font>
-<a name="line194">194: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
-<a name="line195">195: </a>    k = -pep->nini;
-<a name="line196">196: </a>    <font color="#4169E1">if</font> (k>pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
-<a name="line197">197: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(pep->V,0,&k,pep->IS,PETSC_TRUE);
-<a name="line198">198: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
-<a name="line199">199: </a>    pep->nini = k;
-<a name="line200">200: </a>  }
-<a name="line201">201: </a>  PetscLogEventEnd(PEP_SetUp,pep,0,0,0);
-<a name="line202">202: </a>  pep->state = PEP_STATE_SETUP;
-<a name="line203">203: </a>  <font color="#4169E1">return</font>(0);
-<a name="line204">204: </a>}
-
-<a name="line208">208: </a><font color="#B22222">/*@</font>
-<a name="line209">209: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a> - Sets the coefficient matrices associated with the polynomial</font>
-<a name="line210">210: </a><font color="#B22222">   eigenvalue problem.</font>
-
-<a name="line212">212: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> and Mat</font>
-
-<a name="line214">214: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line215">215: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
-<a name="line216">216: </a><font color="#B22222">.  nmat - number of matrices in array A</font>
-<a name="line217">217: </a><font color="#B22222">-  A    - the array of matrices associated with the eigenproblem</font>
-
-<a name="line219">219: </a><font color="#B22222">   Notes:</font>
-<a name="line220">220: </a><font color="#B22222">   The polynomial eigenproblem is defined as P(l)*x=0, where l is</font>
-<a name="line221">221: </a><font color="#B22222">   the eigenvalue, x is the eigenvector, and P(l) is defined as</font>
-<a name="line222">222: </a><font color="#B22222">   P(l) = A_0 + l*A_1 + ... + l^d*A_d, with d=nmat-1 (the degree of P).</font>
-<a name="line223">223: </a><font color="#B22222">   For non-monomial bases, this expression is different.</font>
-
-<a name="line225">225: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line227">227: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(), <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>()</font>
-<a name="line228">228: </a><font color="#B22222">@*/</font>
-<a name="line229">229: </a><strong><font color="#4169E1"><a name="PEPSetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nmat,Mat A[])</font></strong>
-<a name="line230">230: </a>{
-<a name="line232">232: </a>  PetscInt       i,n,m,m0=0;
-
-<a name="line237">237: </a>  <font color="#4169E1">if</font> (nmat <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Non-positive value of nmat: %D"</font>,nmat);
-<a name="line238">238: </a>  <font color="#4169E1">if</font> (nmat <= 2) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Cannot solve linear eigenproblems with <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>; use <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> instead"</font>);
-
-<a name="line241">241: </a>  <font color="#4169E1">if</font> (pep->state) { <a href="../../../docs/manualpages/PEP/PEPReset.html#PEPReset">PEPReset</a>(pep); }
-<a name="line242">242: </a>  PetscMalloc1(nmat,&pep->A);
-<a name="line243">243: </a>  PetscCalloc2(3*nmat,&pep->pbc,nmat,&pep->nrma);
-<a name="line244">244: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) pep->pbc[i] = 1.0;  <font color="#B22222">/* default to monomial basis */</font>
-<a name="line245">245: </a>  PetscLogObjectMemory((PetscObject)pep,nmat*<font color="#4169E1">sizeof</font>(Mat)+4*nmat*<font color="#4169E1">sizeof</font>(PetscReal)+nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line246">246: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
-<a name="line249">249: </a>    MatGetSize(A[i],&m,&n);
-<a name="line250">250: </a>    <font color="#4169E1">if</font> (m!=n) SETERRQ1(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"A[%D] is a non-square matrix"</font>,i);
-<a name="line251">251: </a>    <font color="#4169E1">if</font> (!i) m0 = m;
-<a name="line252">252: </a>    <font color="#4169E1">if</font> (m!=m0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Dimensions of matrices do not match with each other"</font>);
-<a name="line253">253: </a>    PetscObjectReference((PetscObject)A[i]);
-<a name="line254">254: </a>    pep->A[i] = A[i];
-<a name="line255">255: </a>  }
-<a name="line256">256: </a>  pep->nmat = nmat;
-<a name="line257">257: </a>  <font color="#4169E1">return</font>(0);
-<a name="line258">258: </a>}
-
-<a name="line262">262: </a><font color="#B22222">/*@</font>
-<a name="line263">263: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a> - Gets the matrices associated with the polynomial eigensystem.</font>
-
-<a name="line265">265: </a><font color="#B22222">   Not collective, though parallel Mats are returned if the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> is parallel</font>
-
-<a name="line267">267: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line268">268: </a><font color="#B22222">+  pep - the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> context</font>
-<a name="line269">269: </a><font color="#B22222">-  k   - the index of the requested matrix (starting in 0)</font>
-
-<a name="line271">271: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line272">272: </a><font color="#B22222">.  A - the requested matrix</font>
-
-<a name="line274">274: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line276">276: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>()</font>
-<a name="line277">277: </a><font color="#B22222">@*/</font>
-<a name="line278">278: </a><strong><font color="#4169E1"><a name="PEPGetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,Mat *A)</font></strong>
-<a name="line279">279: </a>{
-<a name="line283">283: </a>  <font color="#4169E1">if</font> (k<0 || k>=pep->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,pep->nmat-1);
-<a name="line284">284: </a>  *A = pep->A[k];
-<a name="line285">285: </a>  <font color="#4169E1">return</font>(0);
-<a name="line286">286: </a>}
-
-<a name="line290">290: </a><font color="#B22222">/*@</font>
-<a name="line291">291: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a> - Returns the number of matrices stored in the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>.</font>
-
-<a name="line293">293: </a><font color="#B22222">   Not collective</font>
-
-<a name="line295">295: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line296">296: </a><font color="#B22222">.  pep - the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> context</font>
-
-<a name="line298">298: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line299">299: </a><font color="#B22222">.  nmat - the number of matrices passed in <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>()</font>
+<a name="line52"> 52: </a>  KSP            ksp;
+<a name="line53"> 53: </a>  PC             pc;
+<a name="line54"> 54: </a>  PetscMPIInt    size;
+<a name="line55"> 55: </a>  const MatSolverPackage stype;
+
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (pep->state) <font color="#4169E1">return</font>(0);
+<a name="line60"> 60: </a>  PetscLogEventBegin(PEP_SetUp,pep,0,0,0);
+
+<a name="line62"> 62: </a>  <font color="#B22222">/* reset the convergence flag from the previous solves */</font>
+<a name="line63"> 63: </a>  pep->reason = PEP_CONVERGED_ITERATING;
+
+<a name="line65"> 65: </a>  <font color="#B22222">/* set default solver type (<a href="../../../docs/manualpages/PEP/PEPSetFromOptions.html#PEPSetFromOptions">PEPSetFromOptions</a> was not called) */</font>
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep)->type_name) {
+<a name="line67"> 67: </a>    <a href="../../../docs/manualpages/PEP/PEPSetType.html#PEPSetType">PEPSetType</a>(pep,PEPTOAR);
+<a name="line68"> 68: </a>  }
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
+<a name="line70"> 70: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&islinear);
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->st)->type_name) {
+<a name="line72"> 72: </a>    <a href="../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(pep->st,STSHIFT);
+<a name="line73"> 73: </a>  }
+<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
+<a name="line75"> 75: </a>  <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(pep->ds);
+<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (!((PetscObject)pep->rg)->type_name) {
+<a name="line78"> 78: </a>    <a href="../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(pep->rg,RGINTERVAL);
+<a name="line79"> 79: </a>  }
+
+<a name="line81"> 81: </a>  <font color="#B22222">/* check matrices, transfer them to <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (!pep->A) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a> must be called first"</font>);
+<a name="line83"> 83: </a>  <a href="../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(pep->st,pep->nmat,pep->A);
+
+<a name="line85"> 85: </a>  <font color="#B22222">/* set problem dimensions */</font>
+<a name="line86"> 86: </a>  MatGetSize(pep->A[0],&pep->n,NULL);
+<a name="line87"> 87: </a>  MatGetLocalSize(pep->A[0],&pep->nloc,NULL);
+
+<a name="line89"> 89: </a>  <font color="#B22222">/* set default problem type */</font>
+<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (!pep->problem_type) {
+<a name="line91"> 91: </a>    <a href="../../../docs/manualpages/PEP/PEPSetProblemType.html#PEPSetProblemType">PEPSetProblemType</a>(pep,PEP_GENERAL);
+<a name="line92"> 92: </a>  }
+
+<a name="line94"> 94: </a>  <font color="#B22222">/* check consistency of refinement options */</font>
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (pep->refine) {
+<a name="line96"> 96: </a>    <font color="#4169E1">if</font> (!pep->scheme) {  <font color="#B22222">/* set default scheme */</font>
+<a name="line97"> 97: </a>      <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&ksp);
+<a name="line98"> 98: </a>      KSPGetPC(ksp,&pc);
+<a name="line99"> 99: </a>      PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);
+<a name="line100">100: </a>      <font color="#4169E1">if</font> (flg) {
+<a name="line101">101: </a>        PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,<font color="#666666">""</font>);
+<a name="line102">102: </a>      }
+<a name="line103">103: </a>      pep->scheme = flg? PEP_REFINE_SCHEME_MBE: PEP_REFINE_SCHEME_SCHUR;
+<a name="line104">104: </a>    }
+<a name="line105">105: </a>    <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_MBE) {
+<a name="line106">106: </a>      <a href="../../../docs/manualpages/PEP/PEPRefineGetKSP.html#PEPRefineGetKSP">PEPRefineGetKSP</a>(pep,&ksp);
+<a name="line107">107: </a>      KSPGetPC(ksp,&pc);
+<a name="line108">108: </a>      PetscObjectTypeCompare((PetscObject)ksp,KSPPREONLY,&flg);
+<a name="line109">109: </a>      <font color="#4169E1">if</font> (flg) {
+<a name="line110">110: </a>        PetscObjectTypeCompareAny((PetscObject)pc,&flg,PCLU,PCCHOLESKY,<font color="#666666">""</font>);
+<a name="line111">111: </a>      }
+<a name="line112">112: </a>      <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"The MBE scheme for refinement requires a direct solver in KSP"</font>);
+<a name="line113">113: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)pc),&size);
+<a name="line114">114: </a>      <font color="#4169E1">if</font> (size>1) {   <font color="#B22222">/* currently selected PC is a factorization */</font>
+<a name="line115">115: </a>        PCFactorGetMatSolverPackage(pc,&stype);
+<a name="line116">116: </a>        PetscStrcmp(stype,MATSOLVERPETSC,&flg);
+<a name="line117">117: </a>        <font color="#4169E1">if</font> (flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"For Newton refinement, you chose to solve linear systems with a factorization, but in parallel runs you need to select an external package"</font>);
+<a name="line118">118: </a>      }
+<a name="line119">119: </a>    }
+<a name="line120">120: </a>    <font color="#4169E1">if</font> (pep->scheme==PEP_REFINE_SCHEME_SCHUR) {
+<a name="line121">121: </a>      <font color="#4169E1">if</font> (pep->npart>1) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"The Schur scheme for refinement does not support subcommunicators"</font>); 
+<a name="line122">122: </a>    }
+<a name="line123">123: </a>  }
+<a name="line124">124: </a>  <font color="#B22222">/* call specific solver setup */</font>
+<a name="line125">125: </a>  (*pep->ops->setup)(pep);
+
+<a name="line127">127: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
+<a name="line128">128: </a>  <font color="#4169E1">if</font> (pep->tol==PETSC_DEFAULT) pep->tol = SLEPC_DEFAULT_TOL;
+<a name="line129">129: </a>  <font color="#4169E1">if</font> (pep->refine) {
+<a name="line130">130: </a>    <font color="#4169E1">if</font> (pep->rtol==PETSC_DEFAULT) pep->rtol = PetscMax(pep->tol/1000,PETSC_MACHINE_EPSILON);
+<a name="line131">131: </a>    <font color="#4169E1">if</font> (pep->rits==PETSC_DEFAULT) pep->rits = (pep->refine==PEP_REFINE_SIMPLE)? 10: 1;
+<a name="line132">132: </a>  }
+
+<a name="line134">134: </a>  <font color="#B22222">/* set default extraction */</font>
+<a name="line135">135: </a>  <font color="#4169E1">if</font> (!pep->extract) {
+<a name="line136">136: </a>    pep->extract = (pep->basis==PEP_BASIS_MONOMIAL)? PEP_EXTRACT_NORM: PEP_EXTRACT_NONE;
+<a name="line137">137: </a>  }
+
+<a name="line139">139: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
+<a name="line140">140: </a>  <font color="#4169E1">switch</font> (pep->which) {
+<a name="line141">141: </a>    <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:
+<a name="line142">142: </a>      pep->sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line143">143: </a>      pep->sc->comparisonctx = NULL;
+<a name="line144">144: </a>      <font color="#4169E1">break</font>;
+<a name="line145">145: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE:
+<a name="line146">146: </a>      pep->sc->comparison    = SlepcCompareSmallestMagnitude;
+<a name="line147">147: </a>      pep->sc->comparisonctx = NULL;
+<a name="line148">148: </a>      <font color="#4169E1">break</font>;
+<a name="line149">149: </a>    <font color="#4169E1">case</font> PEP_LARGEST_REAL:
+<a name="line150">150: </a>      pep->sc->comparison    = SlepcCompareLargestReal;
+<a name="line151">151: </a>      pep->sc->comparisonctx = NULL;
+<a name="line152">152: </a>      <font color="#4169E1">break</font>;
+<a name="line153">153: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_REAL:
+<a name="line154">154: </a>      pep->sc->comparison    = SlepcCompareSmallestReal;
+<a name="line155">155: </a>      pep->sc->comparisonctx = NULL;
+<a name="line156">156: </a>      <font color="#4169E1">break</font>;
+<a name="line157">157: </a>    <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:
+<a name="line158">158: </a>      pep->sc->comparison    = SlepcCompareLargestImaginary;
+<a name="line159">159: </a>      pep->sc->comparisonctx = NULL;
+<a name="line160">160: </a>      <font color="#4169E1">break</font>;
+<a name="line161">161: </a>    <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY:
+<a name="line162">162: </a>      pep->sc->comparison    = SlepcCompareSmallestImaginary;
+<a name="line163">163: </a>      pep->sc->comparisonctx = NULL;
+<a name="line164">164: </a>      <font color="#4169E1">break</font>;
+<a name="line165">165: </a>    <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:
+<a name="line166">166: </a>      pep->sc->comparison    = SlepcCompareTargetMagnitude;
+<a name="line167">167: </a>      pep->sc->comparisonctx = &pep->target;
+<a name="line168">168: </a>      <font color="#4169E1">break</font>;
+<a name="line169">169: </a>    <font color="#4169E1">case</font> PEP_TARGET_REAL:
+<a name="line170">170: </a>      pep->sc->comparison    = SlepcCompareTargetReal;
+<a name="line171">171: </a>      pep->sc->comparisonctx = &pep->target;
+<a name="line172">172: </a>      <font color="#4169E1">break</font>;
+<a name="line173">173: </a>    <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:
+<a name="line174">174: </a>      pep->sc->comparison    = SlepcCompareTargetImaginary;
+<a name="line175">175: </a>      pep->sc->comparisonctx = &pep->target;
+<a name="line176">176: </a>      <font color="#4169E1">break</font>;
+<a name="line177">177: </a>    <font color="#4169E1">case</font> PEP_WHICH_USER:
+<a name="line178">178: </a>      <font color="#4169E1">break</font>;
+<a name="line179">179: </a>  }
+<a name="line180">180: </a>  pep->sc->map    = NULL;
+<a name="line181">181: </a>  pep->sc->mapobj = NULL;
+
+<a name="line183">183: </a>  <font color="#B22222">/* fill sorting criterion for <a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> */</font>
+<a name="line184">184: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(pep->ds,&sc);
+<a name="line185">185: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
+<a name="line186">186: </a>  sc->rg            = istrivial? NULL: pep->rg;
+<a name="line187">187: </a>  sc->comparison    = pep->sc->comparison;
+<a name="line188">188: </a>  sc->comparisonctx = pep->sc->comparisonctx;
+<a name="line189">189: </a>  sc->map           = SlepcMap_ST;
+<a name="line190">190: </a>  sc->mapobj        = (PetscObject)pep->st;
+
+<a name="line192">192: </a>  <font color="#B22222">/* setup <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a> */</font>
+<a name="line193">193: </a>  PetscObjectTypeCompareAny((PetscObject)pep->st,&flg,STSHIFT,STSINVERT,<font color="#666666">""</font>);
+<a name="line194">194: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Only STSHIFT and STSINVERT spectral transformations can be used in <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>"</font>);
+<a name="line195">195: </a>  <a href="../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(pep->st);
+<a name="line196">196: </a>  <font color="#B22222">/* compute matrix coefficients */</font>
+<a name="line197">197: </a>  <a href="../../../docs/manualpages/ST/STGetTransform.html#STGetTransform">STGetTransform</a>(pep->st,&flg);
+<a name="line198">198: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line199">199: </a>    <font color="#4169E1">if</font> (pep->solvematcoeffs) { <a href="../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a>(pep->st,1.0,pep->solvematcoeffs); }
+<a name="line200">200: </a>  } <font color="#4169E1">else</font> {
+<a name="line201">201: </a>    <font color="#4169E1">if</font> (pep->basis!=PEP_BASIS_MONOMIAL) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,<font color="#666666">"Cannot use <a href="../../../docs/manualpages/ST/ST.html#ST">ST</a>-transform with non-monomial basis in <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>"</font>);
+<a name="line202">202: </a>  }
+
+<a name="line204">204: </a>  <font color="#B22222">/* compute scale factor if no set by user */</font>
+<a name="line205">205: </a>  PEPComputeScaleFactor(pep);
+
+<a name="line207">207: </a>  <font color="#B22222">/* build balancing matrix if required */</font>
+<a name="line208">208: </a>  <font color="#4169E1">if</font> (pep->scale==PEP_SCALE_DIAGONAL || pep->scale==PEP_SCALE_BOTH) {
+<a name="line209">209: </a>    <font color="#4169E1">if</font> (!pep->Dl) {
+<a name="line210">210: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&pep->Dl);
+<a name="line211">211: </a>      PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->Dl);
+<a name="line212">212: </a>    }
+<a name="line213">213: </a>    <font color="#4169E1">if</font> (!pep->Dr) {
+<a name="line214">214: </a>      <a href="../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(pep->V,&pep->Dr);
+<a name="line215">215: </a>      PetscLogObjectParent((PetscObject)pep,(PetscObject)pep->Dr);
+<a name="line216">216: </a>    }
+<a name="line217">217: </a>    PEPBuildDiagonalScaling(pep);
+<a name="line218">218: </a>  }
+
+<a name="line220">220: </a>  <font color="#B22222">/* process initial vectors */</font>
+<a name="line221">221: </a>  <font color="#4169E1">if</font> (pep->nini<0) {
+<a name="line222">222: </a>    k = -pep->nini;
+<a name="line223">223: </a>    <font color="#4169E1">if</font> (k>pep->ncv) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
+<a name="line224">224: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(pep->V,0,&k,pep->IS,PETSC_TRUE);
+<a name="line225">225: </a>    SlepcBasisDestroy_Private(&pep->nini,&pep->IS);
+<a name="line226">226: </a>    pep->nini = k;
+<a name="line227">227: </a>  }
+<a name="line228">228: </a>  PetscLogEventEnd(PEP_SetUp,pep,0,0,0);
+<a name="line229">229: </a>  pep->state = PEP_STATE_SETUP;
+<a name="line230">230: </a>  <font color="#4169E1">return</font>(0);
+<a name="line231">231: </a>}
+
+<a name="line235">235: </a><font color="#B22222">/*@</font>
+<a name="line236">236: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a> - Sets the coefficient matrices associated with the polynomial</font>
+<a name="line237">237: </a><font color="#B22222">   eigenvalue problem.</font>
+
+<a name="line239">239: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> and Mat</font>
+
+<a name="line241">241: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line242">242: </a><font color="#B22222">+  pep  - the eigenproblem solver context</font>
+<a name="line243">243: </a><font color="#B22222">.  nmat - number of matrices in array A</font>
+<a name="line244">244: </a><font color="#B22222">-  A    - the array of matrices associated with the eigenproblem</font>
+
+<a name="line246">246: </a><font color="#B22222">   Notes:</font>
+<a name="line247">247: </a><font color="#B22222">   The polynomial eigenproblem is defined as P(l)*x=0, where l is</font>
+<a name="line248">248: </a><font color="#B22222">   the eigenvalue, x is the eigenvector, and P(l) is defined as</font>
+<a name="line249">249: </a><font color="#B22222">   P(l) = A_0 + l*A_1 + ... + l^d*A_d, with d=nmat-1 (the degree of P).</font>
+<a name="line250">250: </a><font color="#B22222">   For non-monomial bases, this expression is different.</font>
+
+<a name="line252">252: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line254">254: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(), <a href="../../../docs/manualpages/PEP/PEPSetBasis.html#PEPSetBasis">PEPSetBasis</a>()</font>
+<a name="line255">255: </a><font color="#B22222">@*/</font>
+<a name="line256">256: </a><strong><font color="#4169E1"><a name="PEPSetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nmat,Mat A[])</font></strong>
+<a name="line257">257: </a>{
+<a name="line259">259: </a>  PetscInt       i,n,m,m0=0;
+
+<a name="line264">264: </a>  <font color="#4169E1">if</font> (nmat <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Non-positive value of nmat: %D"</font>,nmat);
+<a name="line265">265: </a>  <font color="#4169E1">if</font> (nmat <= 2) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Cannot solve linear eigenproblems with <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>; use <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> instead"</font>);
+
+<a name="line268">268: </a>  <font color="#4169E1">if</font> (pep->state) { <a href="../../../docs/manualpages/PEP/PEPReset.html#PEPReset">PEPReset</a>(pep); }
+<a name="line269">269: </a>  PetscMalloc1(nmat,&pep->A);
+<a name="line270">270: </a>  PetscCalloc2(3*nmat,&pep->pbc,nmat,&pep->nrma);
+<a name="line271">271: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) pep->pbc[i] = 1.0;  <font color="#B22222">/* default to monomial basis */</font>
+<a name="line272">272: </a>  PetscLogObjectMemory((PetscObject)pep,nmat*<font color="#4169E1">sizeof</font>(Mat)+4*nmat*<font color="#4169E1">sizeof</font>(PetscReal)+nmat*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line273">273: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
+<a name="line276">276: </a>    MatGetSize(A[i],&m,&n);
+<a name="line277">277: </a>    <font color="#4169E1">if</font> (m!=n) SETERRQ1(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"A[%D] is a non-square matrix"</font>,i);
+<a name="line278">278: </a>    <font color="#4169E1">if</font> (!i) m0 = m;
+<a name="line279">279: </a>    <font color="#4169E1">if</font> (m!=m0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Dimensions of matrices do not match with each other"</font>);
+<a name="line280">280: </a>    PetscObjectReference((PetscObject)A[i]);
+<a name="line281">281: </a>    pep->A[i] = A[i];
+<a name="line282">282: </a>  }
+<a name="line283">283: </a>  pep->nmat = nmat;
+<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
+<a name="line285">285: </a>}
+
+<a name="line289">289: </a><font color="#B22222">/*@</font>
+<a name="line290">290: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a> - Gets the matrices associated with the polynomial eigensystem.</font>
+
+<a name="line292">292: </a><font color="#B22222">   Not collective, though parallel Mats are returned if the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> is parallel</font>
+
+<a name="line294">294: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line295">295: </a><font color="#B22222">+  pep - the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> context</font>
+<a name="line296">296: </a><font color="#B22222">-  k   - the index of the requested matrix (starting in 0)</font>
+
+<a name="line298">298: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line299">299: </a><font color="#B22222">.  A - the requested matrix</font>
 
 <a name="line301">301: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line303">303: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>()</font>
+<a name="line303">303: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>(), <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>()</font>
 <a name="line304">304: </a><font color="#B22222">@*/</font>
-<a name="line305">305: </a><strong><font color="#4169E1"><a name="PEPGetNumMatrices"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *nmat)</font></strong>
+<a name="line305">305: </a><strong><font color="#4169E1"><a name="PEPGetOperators"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetOperators.html#PEPGetOperators">PEPGetOperators</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt k,Mat *A)</font></strong>
 <a name="line306">306: </a>{
-<a name="line310">310: </a>  *nmat = pep->nmat;
-<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
-<a name="line312">312: </a>}
+<a name="line310">310: </a>  <font color="#4169E1">if</font> (k<0 || k>=pep->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,pep->nmat-1);
+<a name="line311">311: </a>  *A = pep->A[k];
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
 
-<a name="line316">316: </a><font color="#B22222">/*@</font>
-<a name="line317">317: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
-<a name="line318">318: </a><font color="#B22222">   space, that is, the subspace from which the solver starts to iterate.</font>
+<a name="line317">317: </a><font color="#B22222">/*@</font>
+<a name="line318">318: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a> - Returns the number of matrices stored in the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>.</font>
 
-<a name="line320">320: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> and Vec</font>
+<a name="line320">320: </a><font color="#B22222">   Not collective</font>
 
 <a name="line322">322: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line323">323: </a><font color="#B22222">+  pep   - the polynomial eigensolver context</font>
-<a name="line324">324: </a><font color="#B22222">.  n     - number of vectors</font>
-<a name="line325">325: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
-
-<a name="line327">327: </a><font color="#B22222">   Notes:</font>
-<a name="line328">328: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
-<a name="line329">329: </a><font color="#B22222">   the other vectors are ignored.</font>
-
-<a name="line331">331: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>() call to the other, so the</font>
-<a name="line332">332: </a><font color="#B22222">   initial space should be set every time.</font>
-
-<a name="line334">334: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
-<a name="line335">335: </a><font color="#B22222">   orthonormalized internally.</font>
-
-<a name="line337">337: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
-<a name="line338">338: </a><font color="#B22222">   of the wanted eigenspace. Then, convergence may be faster.</font>
-
-<a name="line340">340: </a><font color="#B22222">   Level: intermediate</font>
-<a name="line341">341: </a><font color="#B22222">@*/</font>
-<a name="line342">342: </a><strong><font color="#4169E1"><a name="PEPSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt n,Vec *is)</font></strong>
-<a name="line343">343: </a>{
-
-<a name="line349">349: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
-<a name="line350">350: </a>  SlepcBasisReference_Private(n,is,&pep->nini,&pep->IS);
-<a name="line351">351: </a>  <font color="#4169E1">if</font> (n>0) pep->state = PEP_STATE_INITIAL;
-<a name="line352">352: </a>  <font color="#4169E1">return</font>(0);
-<a name="line353">353: </a>}
-
-<a name="line357">357: </a><font color="#B22222">/*</font>
-<a name="line358">358: </a><font color="#B22222">  PEPSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
-<a name="line359">359: </a><font color="#B22222">  by the user. This is called at setup.</font>
-<a name="line360">360: </a><font color="#B22222"> */</font>
-<a name="line361">361: </a><strong><font color="#4169E1"><a name="PEPSetDimensions_Default"></a>PetscErrorCode PEPSetDimensions_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line362">362: </a>{
-<a name="line364">364: </a>  PetscBool      krylov;
-<a name="line365">365: </a>  PetscInt       dim;
-
-<a name="line368">368: </a>  PetscObjectTypeCompareAny((PetscObject)pep,&krylov,PEPTOAR,PEPQARNOLDI,<font color="#666666">""</font>);
-<a name="line369">369: </a>  dim = krylov?(pep->nmat-1)*pep->n:pep->n;
-<a name="line370">370: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line371">371: </a>    <font color="#4169E1">if</font> (krylov) {
-<a name="line372">372: </a>      <font color="#4169E1">if</font> (*ncv<nev+1 && !(*ncv==nev && *ncv==dim)) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"The value of ncv must be at least nev+1"</font>);
-<a name="line373">373: </a>    } <font color="#4169E1">else</font> {
-<a name="line374">374: </a>      <font color="#4169E1">if</font> (*ncv<nev) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
-<a name="line375">375: </a>    }
-<a name="line376">376: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (*mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line377">377: </a>    *ncv = PetscMin(dim,nev+(*mpd));
-<a name="line378">378: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
-<a name="line379">379: </a>    <font color="#4169E1">if</font> (nev<500) *ncv = PetscMin(dim,PetscMax(2*nev,nev+15));
-<a name="line380">380: </a>    <font color="#4169E1">else</font> {
-<a name="line381">381: </a>      *mpd = 500;
-<a name="line382">382: </a>      *ncv = PetscMin(dim,nev+(*mpd));
-<a name="line383">383: </a>    }
-<a name="line384">384: </a>  }
-<a name="line385">385: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
-<a name="line386">386: </a>  <font color="#4169E1">return</font>(0);
-<a name="line387">387: </a>}
-
-<a name="line391">391: </a><font color="#B22222">/*@</font>
-<a name="line392">392: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a> - Allocate memory storage for common variables such</font>
-<a name="line393">393: </a><font color="#B22222">   as eigenvalues and eigenvectors.</font>
-
-<a name="line395">395: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line397">397: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line398">398: </a><font color="#B22222">+  pep   - eigensolver context</font>
-<a name="line399">399: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
-<a name="line400">400: </a><font color="#B22222">           working basis slightly larger than ncv</font>
-
-<a name="line402">402: </a><font color="#B22222">   Developers Note:</font>
-<a name="line403">403: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-<a name="line404">404: </a><font color="#B22222">   implementations.</font>
-
-<a name="line406">406: </a><font color="#B22222">   Level: developer</font>
-<a name="line407">407: </a><font color="#B22222">@*/</font>
-<a name="line408">408: </a><strong><font color="#4169E1"><a name="PEPAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt extra)</font></strong>
-<a name="line409">409: </a>{
-<a name="line411">411: </a>  PetscInt       oldsize,newc,requested,requestedbv;
-<a name="line412">412: </a>  PetscLogDouble cnt;
-<a name="line413">413: </a>  Vec            t;
-
-<a name="line416">416: </a>  requested = (pep->lineariz? pep->ncv: pep->ncv*(pep->nmat-1)) + extra;
-<a name="line417">417: </a>  requestedbv = pep->ncv + extra;
-
-<a name="line419">419: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
-<a name="line420">420: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(pep->V,NULL,NULL,&oldsize);
-
-<a name="line422">422: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
-<a name="line423">423: </a>  <font color="#4169E1">if</font> (requested != oldsize || !pep->eigr) {
-<a name="line424">424: </a>    <font color="#4169E1">if</font> (oldsize) {
-<a name="line425">425: </a>      PetscFree4(pep->eigr,pep->eigi,pep->errest,pep->perm);
-<a name="line426">426: </a>    }
-<a name="line427">427: </a>    PetscMalloc4(requested,&pep->eigr,requested,&pep->eigi,requested,&pep->errest,requested,&pep->perm);
-<a name="line428">428: </a>    newc = PetscMax(0,requested-oldsize);
-<a name="line429">429: </a>    cnt = 2*newc*<font color="#4169E1">sizeof</font>(PetscScalar) + newc*<font color="#4169E1">sizeof</font>(PetscReal) + newc*<font color="#4169E1">sizeof</font>(PetscInt);
-<a name="line430">430: </a>    PetscLogObjectMemory((PetscObject)pep,cnt);
-<a name="line431">431: </a>  }
-
-<a name="line433">433: </a>  <font color="#B22222">/* allocate V */</font>
-<a name="line434">434: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
-<a name="line435">435: </a>  <font color="#4169E1">if</font> (!oldsize) {
-<a name="line436">436: </a>    <font color="#4169E1">if</font> (!((PetscObject)(pep->V))->type_name) {
-<a name="line437">437: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(pep->V,BVSVEC);
-<a name="line438">438: </a>    }
-<a name="line439">439: </a>    <a href="../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(pep->st,&t,NULL);
-<a name="line440">440: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(pep->V,t,requestedbv);
-<a name="line441">441: </a>    VecDestroy(&t);
-<a name="line442">442: </a>  } <font color="#4169E1">else</font> {
-<a name="line443">443: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(pep->V,requestedbv,PETSC_FALSE);
-<a name="line444">444: </a>  }
-<a name="line445">445: </a>  <font color="#4169E1">return</font>(0);
-<a name="line446">446: </a>}
+<a name="line323">323: </a><font color="#B22222">.  pep - the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> context</font>
+
+<a name="line325">325: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line326">326: </a><font color="#B22222">.  nmat - the number of matrices passed in <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>()</font>
+
+<a name="line328">328: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line330">330: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetOperators.html#PEPSetOperators">PEPSetOperators</a>()</font>
+<a name="line331">331: </a><font color="#B22222">@*/</font>
+<a name="line332">332: </a><strong><font color="#4169E1"><a name="PEPGetNumMatrices"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetNumMatrices.html#PEPGetNumMatrices">PEPGetNumMatrices</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt *nmat)</font></strong>
+<a name="line333">333: </a>{
+<a name="line337">337: </a>  *nmat = pep->nmat;
+<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
+<a name="line339">339: </a>}
+
+<a name="line343">343: </a><font color="#B22222">/*@</font>
+<a name="line344">344: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
+<a name="line345">345: </a><font color="#B22222">   space, that is, the subspace from which the solver starts to iterate.</font>
+
+<a name="line347">347: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> and Vec</font>
+
+<a name="line349">349: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line350">350: </a><font color="#B22222">+  pep   - the polynomial eigensolver context</font>
+<a name="line351">351: </a><font color="#B22222">.  n     - number of vectors</font>
+<a name="line352">352: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
+
+<a name="line354">354: </a><font color="#B22222">   Notes:</font>
+<a name="line355">355: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
+<a name="line356">356: </a><font color="#B22222">   the other vectors are ignored.</font>
+
+<a name="line358">358: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>() call to the other, so the</font>
+<a name="line359">359: </a><font color="#B22222">   initial space should be set every time.</font>
+
+<a name="line361">361: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
+<a name="line362">362: </a><font color="#B22222">   orthonormalized internally.</font>
+
+<a name="line364">364: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
+<a name="line365">365: </a><font color="#B22222">   of the wanted eigenspace. Then, convergence may be faster.</font>
+
+<a name="line367">367: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line368">368: </a><font color="#B22222">@*/</font>
+<a name="line369">369: </a><strong><font color="#4169E1"><a name="PEPSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPSetInitialSpace.html#PEPSetInitialSpace">PEPSetInitialSpace</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt n,Vec *is)</font></strong>
+<a name="line370">370: </a>{
+
+<a name="line376">376: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
+<a name="line377">377: </a>  SlepcBasisReference_Private(n,is,&pep->nini,&pep->IS);
+<a name="line378">378: </a>  <font color="#4169E1">if</font> (n>0) pep->state = PEP_STATE_INITIAL;
+<a name="line379">379: </a>  <font color="#4169E1">return</font>(0);
+<a name="line380">380: </a>}
+
+<a name="line384">384: </a><font color="#B22222">/*</font>
+<a name="line385">385: </a><font color="#B22222">  PEPSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
+<a name="line386">386: </a><font color="#B22222">  by the user. This is called at setup.</font>
+<a name="line387">387: </a><font color="#B22222"> */</font>
+<a name="line388">388: </a><strong><font color="#4169E1"><a name="PEPSetDimensions_Default"></a>PetscErrorCode PEPSetDimensions_Default(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt nev,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line389">389: </a>{
+<a name="line391">391: </a>  PetscBool      krylov;
+<a name="line392">392: </a>  PetscInt       dim;
+
+<a name="line395">395: </a>  PetscObjectTypeCompareAny((PetscObject)pep,&krylov,PEPTOAR,PEPQARNOLDI,<font color="#666666">""</font>);
+<a name="line396">396: </a>  dim = krylov?(pep->nmat-1)*pep->n:pep->n;
+<a name="line397">397: </a>  <font color="#4169E1">if</font> (*ncv) { <font color="#B22222">/* ncv set */</font>
+<a name="line398">398: </a>    <font color="#4169E1">if</font> (krylov) {
+<a name="line399">399: </a>      <font color="#4169E1">if</font> (*ncv<nev+1 && !(*ncv==nev && *ncv==dim)) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"The value of ncv must be at least nev+1"</font>);
+<a name="line400">400: </a>    } <font color="#4169E1">else</font> {
+<a name="line401">401: </a>      <font color="#4169E1">if</font> (*ncv<nev) SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"The value of ncv must be at least nev"</font>);
+<a name="line402">402: </a>    }
+<a name="line403">403: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (*mpd) { <font color="#B22222">/* mpd set */</font>
+<a name="line404">404: </a>    *ncv = PetscMin(dim,nev+(*mpd));
+<a name="line405">405: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nev being small or large */</font>
+<a name="line406">406: </a>    <font color="#4169E1">if</font> (nev<500) *ncv = PetscMin(dim,PetscMax(2*nev,nev+15));
+<a name="line407">407: </a>    <font color="#4169E1">else</font> {
+<a name="line408">408: </a>      *mpd = 500;
+<a name="line409">409: </a>      *ncv = PetscMin(dim,nev+(*mpd));
+<a name="line410">410: </a>    }
+<a name="line411">411: </a>  }
+<a name="line412">412: </a>  <font color="#4169E1">if</font> (!*mpd) *mpd = *ncv;
+<a name="line413">413: </a>  <font color="#4169E1">return</font>(0);
+<a name="line414">414: </a>}
+
+<a name="line418">418: </a><font color="#B22222">/*@</font>
+<a name="line419">419: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a> - Allocate memory storage for common variables such</font>
+<a name="line420">420: </a><font color="#B22222">   as eigenvalues and eigenvectors.</font>
+
+<a name="line422">422: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line424">424: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line425">425: </a><font color="#B22222">+  pep   - eigensolver context</font>
+<a name="line426">426: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
+<a name="line427">427: </a><font color="#B22222">           working basis slightly larger than ncv</font>
+
+<a name="line429">429: </a><font color="#B22222">   Developers Note:</font>
+<a name="line430">430: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+<a name="line431">431: </a><font color="#B22222">   implementations.</font>
+
+<a name="line433">433: </a><font color="#B22222">   Level: developer</font>
+<a name="line434">434: </a><font color="#B22222">@*/</font>
+<a name="line435">435: </a><strong><font color="#4169E1"><a name="PEPAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPAllocateSolution.html#PEPAllocateSolution">PEPAllocateSolution</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt extra)</font></strong>
+<a name="line436">436: </a>{
+<a name="line438">438: </a>  PetscInt       oldsize,newc,requested,requestedbv;
+<a name="line439">439: </a>  PetscLogDouble cnt;
+<a name="line440">440: </a>  Vec            t;
+
+<a name="line443">443: </a>  requested = (pep->lineariz? pep->ncv: pep->ncv*(pep->nmat-1)) + extra;
+<a name="line444">444: </a>  requestedbv = pep->ncv + extra;
+
+<a name="line446">446: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
+<a name="line447">447: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(pep->V,NULL,NULL,&oldsize);
+
+<a name="line449">449: </a>  <font color="#B22222">/* allocate space for eigenvalues and friends */</font>
+<a name="line450">450: </a>  <font color="#4169E1">if</font> (requested != oldsize || !pep->eigr) {
+<a name="line451">451: </a>    <font color="#4169E1">if</font> (oldsize) {
+<a name="line452">452: </a>      PetscFree4(pep->eigr,pep->eigi,pep->errest,pep->perm);
+<a name="line453">453: </a>    }
+<a name="line454">454: </a>    PetscMalloc4(requested,&pep->eigr,requested,&pep->eigi,requested,&pep->errest,requested,&pep->perm);
+<a name="line455">455: </a>    newc = PetscMax(0,requested-oldsize);
+<a name="line456">456: </a>    cnt = 2*newc*<font color="#4169E1">sizeof</font>(PetscScalar) + newc*<font color="#4169E1">sizeof</font>(PetscReal) + newc*<font color="#4169E1">sizeof</font>(PetscInt);
+<a name="line457">457: </a>    PetscLogObjectMemory((PetscObject)pep,cnt);
+<a name="line458">458: </a>  }
+
+<a name="line460">460: </a>  <font color="#B22222">/* allocate V */</font>
+<a name="line461">461: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
+<a name="line462">462: </a>  <font color="#4169E1">if</font> (!oldsize) {
+<a name="line463">463: </a>    <font color="#4169E1">if</font> (!((PetscObject)(pep->V))->type_name) {
+<a name="line464">464: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(pep->V,BVSVEC);
+<a name="line465">465: </a>    }
+<a name="line466">466: </a>    <a href="../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(pep->st,&t,NULL);
+<a name="line467">467: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(pep->V,t,requestedbv);
+<a name="line468">468: </a>    VecDestroy(&t);
+<a name="line469">469: </a>  } <font color="#4169E1">else</font> {
+<a name="line470">470: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(pep->V,requestedbv,PETSC_FALSE);
+<a name="line471">471: </a>  }
+<a name="line472">472: </a>  <font color="#4169E1">return</font>(0);
+<a name="line473">473: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/interface/pepsolve.c b/src/pep/interface/pepsolve.c
index 9589ce0..459f390 100644
--- a/src/pep/interface/pepsolve.c
+++ b/src/pep/interface/pepsolve.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -100,6 +100,7 @@ PetscErrorCode PEPSolve(PEP pep)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(pep,PEP_CLASSID,1);
+  if (pep->state>=PEP_STATE_SOLVED) PetscFunctionReturn(0);
   ierr = PetscLogEventBegin(PEP_Solve,pep,0,0,0);CHKERRQ(ierr);
 
   /* call setup */
@@ -113,7 +114,6 @@ PetscErrorCode PEPSolve(PEP pep)
     pep->errest[i] = 0.0;
     pep->perm[i]   = i;
   }
-  ierr = PEPMonitor(pep,pep->its,pep->nconv,pep->eigr,pep->eigi,pep->errest,k);CHKERRQ(ierr);
   ierr = PEPViewFromOptions(pep,NULL,"-pep_view_pre");CHKERRQ(ierr);
 
   ierr = (*pep->ops->solve)(pep);CHKERRQ(ierr);
@@ -148,9 +148,9 @@ PetscErrorCode PEPSolve(PEP pep)
   }
 #endif
 
-  if (pep->refine==PEP_REFINE_SIMPLE && pep->rits>0) {
+  if (pep->refine==PEP_REFINE_SIMPLE && pep->rits>0 && pep->nconv>0) {
     ierr = PEPComputeVectors(pep);CHKERRQ(ierr);
-    ierr = PEPNewtonRefinementSimple(pep,&pep->rits,&pep->rtol,pep->nconv);CHKERRQ(ierr);
+    ierr = PEPNewtonRefinementSimple(pep,&pep->rits,pep->rtol,pep->nconv);CHKERRQ(ierr);
   }
 
   /* sort eigenvalues according to pep->which parameter */
@@ -254,7 +254,8 @@ PetscErrorCode PEPGetConverged(PEP pep,PetscInt *nconv)
 
    Possible values for reason:
 +  PEP_CONVERGED_TOL - converged up to tolerance
-.  PEP_DIVERGED_ITS - required more than its to reach convergence
+.  PEP_CONVERGED_USER - converged due to a user-defined condition
+.  PEP_DIVERGED_ITS - required more than max_it iterations to reach convergence
 .  PEP_DIVERGED_BREAKDOWN - generic breakdown in method
 -  PEP_DIVERGED_SYMMETRY_LOST - pseudo-Lanczos was not able to keep symmetry
 
diff --git a/src/pep/interface/pepsolve.c.html b/src/pep/interface/pepsolve.c.html
index a916cc1..02f234e 100644
--- a/src/pep/interface/pepsolve.c.html
+++ b/src/pep/interface/pepsolve.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepsolve.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:53+00:00">
+<meta name="date" content="2016-05-16T10:33:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepsolve.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepsolve.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> routines related to the solution process.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -99,20 +99,20 @@
 <a name="line98"> 98: </a><strong><font color="#228B22">#define OPTLEN 16</font></strong>
 <a name="line99"> 99: </a>  char           str[OPTLEN];
 
-<a name="line103">103: </a>  PetscLogEventBegin(PEP_Solve,pep,0,0,0);
-
-<a name="line105">105: </a>  <font color="#B22222">/* call setup */</font>
-<a name="line106">106: </a>  <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>(pep);
-<a name="line107">107: </a>  pep->nconv = 0;
-<a name="line108">108: </a>  pep->its   = 0;
-<a name="line109">109: </a>  k = pep->lineariz? pep->ncv: pep->ncv*(pep->nmat-1);
-<a name="line110">110: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
-<a name="line111">111: </a>    pep->eigr[i]   = 0.0;
-<a name="line112">112: </a>    pep->eigi[i]   = 0.0;
-<a name="line113">113: </a>    pep->errest[i] = 0.0;
-<a name="line114">114: </a>    pep->perm[i]   = i;
-<a name="line115">115: </a>  }
-<a name="line116">116: </a>  PEPMonitor(pep,pep->its,pep->nconv,pep->eigr,pep->eigi,pep->errest,k);
+<a name="line103">103: </a>  <font color="#4169E1">if</font> (pep->state>=PEP_STATE_SOLVED) <font color="#4169E1">return</font>(0);
+<a name="line104">104: </a>  PetscLogEventBegin(PEP_Solve,pep,0,0,0);
+
+<a name="line106">106: </a>  <font color="#B22222">/* call setup */</font>
+<a name="line107">107: </a>  <a href="../../../docs/manualpages/PEP/PEPSetUp.html#PEPSetUp">PEPSetUp</a>(pep);
+<a name="line108">108: </a>  pep->nconv = 0;
+<a name="line109">109: </a>  pep->its   = 0;
+<a name="line110">110: </a>  k = pep->lineariz? pep->ncv: pep->ncv*(pep->nmat-1);
+<a name="line111">111: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line112">112: </a>    pep->eigr[i]   = 0.0;
+<a name="line113">113: </a>    pep->eigi[i]   = 0.0;
+<a name="line114">114: </a>    pep->errest[i] = 0.0;
+<a name="line115">115: </a>    pep->perm[i]   = i;
+<a name="line116">116: </a>  }
 <a name="line117">117: </a>  PEPViewFromOptions(pep,NULL,<font color="#666666">"-pep_view_pre"</font>);
 
 <a name="line119">119: </a>  (*pep->ops->solve)(pep);
@@ -147,9 +147,9 @@
 <a name="line148">148: </a>  }
 <a name="line149">149: </a><font color="#A020F0">#endif</font>
 
-<a name="line151">151: </a>  <font color="#4169E1">if</font> (pep->refine==PEP_REFINE_SIMPLE && pep->rits>0) {
+<a name="line151">151: </a>  <font color="#4169E1">if</font> (pep->refine==PEP_REFINE_SIMPLE && pep->rits>0 && pep->nconv>0) {
 <a name="line152">152: </a>    PEPComputeVectors(pep);
-<a name="line153">153: </a>    PEPNewtonRefinementSimple(pep,&pep->rits,&pep->rtol,pep->nconv);
+<a name="line153">153: </a>    PEPNewtonRefinementSimple(pep,&pep->rits,pep->rtol,pep->nconv);
 <a name="line154">154: </a>  }
 
 <a name="line156">156: </a>  <font color="#B22222">/* sort eigenvalues according to pep->which parameter */</font>
@@ -241,291 +241,292 @@
 
 <a name="line255">255: </a><font color="#B22222">   Possible values for reason:</font>
 <a name="line256">256: </a><font color="#B22222">+  PEP_CONVERGED_TOL - converged up to tolerance</font>
-<a name="line257">257: </a><font color="#B22222">.  PEP_DIVERGED_ITS - required more than its to reach convergence</font>
-<a name="line258">258: </a><font color="#B22222">.  PEP_DIVERGED_BREAKDOWN - generic breakdown in method</font>
-<a name="line259">259: </a><font color="#B22222">-  PEP_DIVERGED_SYMMETRY_LOST - pseudo-Lanczos was not able to keep symmetry</font>
-
-<a name="line261">261: </a><font color="#B22222">   Note:</font>
-<a name="line262">262: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>() is complete.</font>
-
-<a name="line264">264: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line266">266: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(), <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a></font>
-<a name="line267">267: </a><font color="#B22222">@*/</font>
-<a name="line268">268: </a><strong><font color="#4169E1"><a name="PEPGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> *reason)</font></strong>
-<a name="line269">269: </a>{
-<a name="line273">273: </a>  PEPCheckSolved(pep,1);
-<a name="line274">274: </a>  *reason = pep->reason;
-<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
-<a name="line276">276: </a>}
-
-<a name="line280">280: </a><font color="#B22222">/*@</font>
-<a name="line281">281: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a> - Gets the i-th solution of the eigenproblem as computed by</font>
-<a name="line282">282: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(). The solution consists in both the eigenvalue and the eigenvector.</font>
-
-<a name="line284">284: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
-
-<a name="line286">286: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line287">287: </a><font color="#B22222">+  pep - polynomial eigensolver context</font>
-<a name="line288">288: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line290">290: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line291">291: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
-<a name="line292">292: </a><font color="#B22222">.  eigi - imaginary part of eigenvalue</font>
-<a name="line293">293: </a><font color="#B22222">.  Vr   - real part of eigenvector</font>
-<a name="line294">294: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
-
-<a name="line296">296: </a><font color="#B22222">   Notes:</font>
-<a name="line297">297: </a><font color="#B22222">   It is allowed to pass NULL for Vr and Vi, if the eigenvector is not</font>
-<a name="line298">298: </a><font color="#B22222">   required. Otherwise, the caller must provide valid Vec objects, i.e.,</font>
-<a name="line299">299: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
-
-<a name="line301">301: </a><font color="#B22222">   If the eigenvalue is real, then eigi and Vi are set to zero. If PETSc is</font>
-<a name="line302">302: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
-<a name="line303">303: </a><font color="#B22222">   directly in eigr (eigi is set to zero) and the eigenvector in Vr (Vi is</font>
-<a name="line304">304: </a><font color="#B22222">   set to zero). In both cases, the user can pass NULL in eigi and Vi.</font>
-
-<a name="line306">306: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>()).</font>
-<a name="line307">307: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
-<a name="line308">308: </a><font color="#B22222">   with <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>().</font>
-
-<a name="line310">310: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line312">312: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(), <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>()</font>
-<a name="line313">313: </a><font color="#B22222">@*/</font>
-<a name="line314">314: </a><strong><font color="#4169E1"><a name="PEPGetEigenpair"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)</font></strong>
-<a name="line315">315: </a>{
-<a name="line316">316: </a>  PetscInt       k;
-
-<a name="line324">324: </a>  PEPCheckSolved(pep,1);
-<a name="line325">325: </a>  <font color="#4169E1">if</font> (i<0 || i>=pep->nconv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-
-<a name="line327">327: </a>  PEPComputeVectors(pep);
-<a name="line328">328: </a>  k = pep->perm[i];
-
-<a name="line330">330: </a>  <font color="#B22222">/* eigenvalue */</font>
-<a name="line331">331: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line332">332: </a>  <font color="#4169E1">if</font> (eigr) *eigr = pep->eigr[k];
-<a name="line333">333: </a>  <font color="#4169E1">if</font> (eigi) *eigi = 0;
-<a name="line334">334: </a><font color="#A020F0">#else</font>
-<a name="line335">335: </a>  <font color="#4169E1">if</font> (eigr) *eigr = pep->eigr[k];
-<a name="line336">336: </a>  <font color="#4169E1">if</font> (eigi) *eigi = pep->eigi[k];
-<a name="line337">337: </a><font color="#A020F0">#endif</font>
-
-<a name="line339">339: </a>  <font color="#B22222">/* eigenvector */</font>
-<a name="line340">340: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line341">341: </a>  <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vr); }
-<a name="line342">342: </a>  <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
-<a name="line343">343: </a><font color="#A020F0">#else</font>
-<a name="line344">344: </a>  <font color="#4169E1">if</font> (pep->eigi[k]>0) { <font color="#B22222">/* first value of conjugate pair */</font>
-<a name="line345">345: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vr); }
-<a name="line346">346: </a>    <font color="#4169E1">if</font> (Vi) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k+1,Vi); }
-<a name="line347">347: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (pep->eigi[k]<0) { <font color="#B22222">/* second value of conjugate pair */</font>
-<a name="line348">348: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k-1,Vr); }
-<a name="line349">349: </a>    <font color="#4169E1">if</font> (Vi) {
-<a name="line350">350: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vi);
-<a name="line351">351: </a>      VecScale(Vi,-1.0);
-<a name="line352">352: </a>    }
-<a name="line353">353: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* real eigenvalue */</font>
-<a name="line354">354: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vr); }
-<a name="line355">355: </a>    <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
-<a name="line356">356: </a>  }
-<a name="line357">357: </a><font color="#A020F0">#endif</font>
-<a name="line358">358: </a>  <font color="#4169E1">return</font>(0);
-<a name="line359">359: </a>}
-
-<a name="line363">363: </a><font color="#B22222">/*@</font>
-<a name="line364">364: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a> - Returns the error estimate associated to the i-th</font>
-<a name="line365">365: </a><font color="#B22222">   computed eigenpair.</font>
-
-<a name="line367">367: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line369">369: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line370">370: </a><font color="#B22222">+  pep - polynomial eigensolver context</font>
-<a name="line371">371: </a><font color="#B22222">-  i   - index of eigenpair</font>
-
-<a name="line373">373: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line374">374: </a><font color="#B22222">.  errest - the error estimate</font>
-
-<a name="line376">376: </a><font color="#B22222">   Notes:</font>
-<a name="line377">377: </a><font color="#B22222">   This is the error estimate used internally by the eigensolver. The actual</font>
-<a name="line378">378: </a><font color="#B22222">   error bound can be computed with <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(). See also the users</font>
-<a name="line379">379: </a><font color="#B22222">   manual for details.</font>
-
-<a name="line381">381: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line383">383: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>()</font>
-<a name="line384">384: </a><font color="#B22222">@*/</font>
-<a name="line385">385: </a><strong><font color="#4169E1"><a name="PEPGetErrorEstimate"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscReal *errest)</font></strong>
-<a name="line386">386: </a>{
-<a name="line390">390: </a>  PEPCheckSolved(pep,1);
-<a name="line391">391: </a>  <font color="#4169E1">if</font> (i<0 || i>=pep->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line392">392: </a>  <font color="#4169E1">if</font> (errest) *errest = pep->errest[pep->perm[i]];
-<a name="line393">393: </a>  <font color="#4169E1">return</font>(0);
-<a name="line394">394: </a>}
-
-<a name="line398">398: </a><font color="#B22222">/*</font>
-<a name="line399">399: </a><font color="#B22222">   PEPComputeResidualNorm_Private - Computes the norm of the residual vector</font>
-<a name="line400">400: </a><font color="#B22222">   associated with an eigenpair.</font>
-
-<a name="line402">402: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line403">403: </a><font color="#B22222">     kr,ki - eigenvalue</font>
-<a name="line404">404: </a><font color="#B22222">     xr,xi - eigenvector</font>
-<a name="line405">405: </a><font color="#B22222">     z     - array of 4 work vectors (z[2],z[3] not referenced in complex scalars)</font>
-<a name="line406">406: </a><font color="#B22222">*/</font>
-<a name="line407">407: </a><strong><font color="#4169E1"><a name="PEPComputeResidualNorm_Private"></a>PetscErrorCode PEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)</font></strong>
-<a name="line408">408: </a>{
-<a name="line410">410: </a>  Mat            *A=pep->A;
-<a name="line411">411: </a>  PetscInt       i,nmat=pep->nmat;
-<a name="line412">412: </a>  PetscScalar    t[20],*vals=t,*ivals=NULL;
-<a name="line413">413: </a>  Vec            u,w;
-<a name="line414">414: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line415">415: </a>  Vec            ui,wi;
-<a name="line416">416: </a>  PetscReal      ni;
-<a name="line417">417: </a>  PetscBool      imag;
-<a name="line418">418: </a>  PetscScalar    it[20];
-<a name="line419">419: </a><font color="#A020F0">#endif</font>
-
-<a name="line422">422: </a>  u = z[0]; w = z[1];
-<a name="line423">423: </a>  VecSet(u,0.0);
-<a name="line424">424: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line425">425: </a>  ui = z[2]; wi = z[3];
-<a name="line426">426: </a>  ivals = it; 
-<a name="line427">427: </a><font color="#A020F0">#endif</font>
-<a name="line428">428: </a>  <font color="#4169E1">if</font> (nmat>20) {
-<a name="line429">429: </a>    PetscMalloc(nmat*<font color="#4169E1">sizeof</font>(PetscScalar),&vals);
-<a name="line430">430: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line431">431: </a>    PetscMalloc(nmat*<font color="#4169E1">sizeof</font>(PetscScalar),&ivals);
-<a name="line432">432: </a><font color="#A020F0">#endif</font>
-<a name="line433">433: </a>  }
-<a name="line434">434: </a>  PEPEvaluateBasis(pep,kr,ki,vals,ivals);
-<a name="line435">435: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line436">436: </a>  <font color="#4169E1">if</font> (ki == 0 || PetscAbsScalar(ki) < PetscAbsScalar(kr*PETSC_MACHINE_EPSILON))
-<a name="line437">437: </a>    imag = PETSC_FALSE;
-<a name="line438">438: </a>  <font color="#4169E1">else</font> {
-<a name="line439">439: </a>    imag = PETSC_TRUE;
-<a name="line440">440: </a>    VecSet(ui,0.0);
-<a name="line441">441: </a>  }
-<a name="line442">442: </a><font color="#A020F0">#endif</font>
-<a name="line443">443: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
-<a name="line444">444: </a>    <font color="#4169E1">if</font> (vals[i]!=0.0) {
-<a name="line445">445: </a>      MatMult(A[i],xr,w);
-<a name="line446">446: </a>      VecAXPY(u,vals[i],w);
-<a name="line447">447: </a>    }
-<a name="line448">448: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line449">449: </a>    <font color="#4169E1">if</font> (imag) {
-<a name="line450">450: </a>      <font color="#4169E1">if</font> (ivals[i]!=0 || vals[i]!=0) {
-<a name="line451">451: </a>        MatMult(A[i],xi,wi);
-<a name="line452">452: </a>        <font color="#4169E1">if</font> (vals[i]==0) {
-<a name="line453">453: </a>          MatMult(A[i],xr,w);
-<a name="line454">454: </a>        }
-<a name="line455">455: </a>      }
-<a name="line456">456: </a>      <font color="#4169E1">if</font> (ivals[i]!=0){
-<a name="line457">457: </a>        VecAXPY(u,-ivals[i],wi);
-<a name="line458">458: </a>        VecAXPY(ui,ivals[i],w);
-<a name="line459">459: </a>      }
-<a name="line460">460: </a>      <font color="#4169E1">if</font> (vals[i]!=0) {
-<a name="line461">461: </a>        VecAXPY(ui,vals[i],wi);
-<a name="line462">462: </a>      }
-<a name="line463">463: </a>    }
-<a name="line464">464: </a><font color="#A020F0">#endif</font>
-<a name="line465">465: </a>  }
-<a name="line466">466: </a>  VecNorm(u,NORM_2,norm);
-<a name="line467">467: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line468">468: </a>  <font color="#4169E1">if</font> (imag) {
-<a name="line469">469: </a>    VecNorm(ui,NORM_2,&ni);
-<a name="line470">470: </a>    *norm = SlepcAbsEigenvalue(*norm,ni);
-<a name="line471">471: </a>  }
-<a name="line472">472: </a><font color="#A020F0">#endif</font>
-<a name="line473">473: </a>  <font color="#4169E1">if</font> (nmat>20) {
-<a name="line474">474: </a>    PetscFree(vals);
-<a name="line475">475: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line476">476: </a>    PetscFree(ivals);
-<a name="line477">477: </a><font color="#A020F0">#endif</font>
-<a name="line478">478: </a>  }
-<a name="line479">479: </a>  <font color="#4169E1">return</font>(0);
-<a name="line480">480: </a>}
-
-<a name="line484">484: </a><font color="#B22222">/*@</font>
-<a name="line485">485: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a> - Computes the error (based on the residual norm) associated</font>
-<a name="line486">486: </a><font color="#B22222">   with the i-th computed eigenpair.</font>
-
-<a name="line488">488: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line490">490: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line491">491: </a><font color="#B22222">+  pep  - the polynomial eigensolver context</font>
-<a name="line492">492: </a><font color="#B22222">.  i    - the solution index</font>
-<a name="line493">493: </a><font color="#B22222">-  type - the type of error to compute</font>
-
-<a name="line495">495: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line496">496: </a><font color="#B22222">.  error - the error</font>
-
-<a name="line498">498: </a><font color="#B22222">   Notes:</font>
-<a name="line499">499: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
-<a name="line500">500: </a><font color="#B22222">   norm ||P(l)x||_2 where l is the eigenvalue and x is the eigenvector.</font>
-<a name="line501">501: </a><font color="#B22222">   See the users guide for additional details.</font>
-
-<a name="line503">503: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line505">505: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>, <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a>()</font>
-<a name="line506">506: </a><font color="#B22222">@*/</font>
-<a name="line507">507: </a><strong><font color="#4169E1"><a name="PEPComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> type,PetscReal *error)</font></strong>
-<a name="line508">508: </a>{
-<a name="line510">510: </a>  Vec            xr,xi,w[4];
-<a name="line511">511: </a>  PetscScalar    kr,ki;
-<a name="line512">512: </a>  PetscReal      t,z=0.0;
-<a name="line513">513: </a>  PetscInt       j;
-<a name="line514">514: </a>  PetscBool      flg;
-
-<a name="line521">521: </a>  PEPCheckSolved(pep,1);
-
-<a name="line523">523: </a>  <font color="#B22222">/* allocate work vectors */</font>
-<a name="line524">524: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line525">525: </a>  <a href="../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,3);
-<a name="line526">526: </a>  xi   = NULL;
-<a name="line527">527: </a>  w[2] = NULL;
-<a name="line528">528: </a>  w[3] = NULL;
-<a name="line529">529: </a><font color="#A020F0">#else</font>
-<a name="line530">530: </a>  <a href="../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,6);
-<a name="line531">531: </a>  xi   = pep->work[3];
-<a name="line532">532: </a>  w[2] = pep->work[4];
-<a name="line533">533: </a>  w[3] = pep->work[5];
-<a name="line534">534: </a><font color="#A020F0">#endif</font>
-<a name="line535">535: </a>  xr   = pep->work[0];
-<a name="line536">536: </a>  w[0] = pep->work[1];
-<a name="line537">537: </a>  w[1] = pep->work[2];
-
-<a name="line539">539: </a>  <font color="#B22222">/* compute residual norms */</font>
-<a name="line540">540: </a>  <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,i,&kr,&ki,xr,xi);
-<a name="line541">541: </a>  PEPComputeResidualNorm_Private(pep,kr,ki,xr,xi,w,error);
-
-<a name="line543">543: </a>  <font color="#B22222">/* compute error */</font>
-<a name="line544">544: </a>  <font color="#4169E1">switch</font> (type) {
-<a name="line545">545: </a>    <font color="#4169E1">case</font> PEP_ERROR_ABSOLUTE:
-<a name="line546">546: </a>      <font color="#4169E1">break</font>;
-<a name="line547">547: </a>    <font color="#4169E1">case</font> PEP_ERROR_RELATIVE:
-<a name="line548">548: </a>      *error /= SlepcAbsEigenvalue(kr,ki);
-<a name="line549">549: </a>      <font color="#4169E1">break</font>;
-<a name="line550">550: </a>    <font color="#4169E1">case</font> PEP_ERROR_BACKWARD:
-<a name="line551">551: </a>      <font color="#B22222">/* initialization of matrix norms */</font>
-<a name="line552">552: </a>      <font color="#4169E1">if</font> (!pep->nrma[pep->nmat-1]) {
-<a name="line553">553: </a>        <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
-<a name="line554">554: </a>          MatHasOperation(pep->A[j],MATOP_NORM,&flg);
-<a name="line555">555: </a>          <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
-<a name="line556">556: </a>          MatNorm(pep->A[j],NORM_INFINITY,&pep->nrma[j]);
-<a name="line557">557: </a>        }
-<a name="line558">558: </a>      }
-<a name="line559">559: </a>      t = SlepcAbsEigenvalue(kr,ki);
-<a name="line560">560: </a>      <font color="#4169E1">for</font> (j=pep->nmat-1;j>=0;j--) {
-<a name="line561">561: </a>        z = z*t+pep->nrma[j];
-<a name="line562">562: </a>      }
-<a name="line563">563: </a>      *error /= z;
-<a name="line564">564: </a>      <font color="#4169E1">break</font>;
-<a name="line565">565: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line566">566: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
-<a name="line567">567: </a>  }
-<a name="line568">568: </a>  <font color="#4169E1">return</font>(0);
-<a name="line569">569: </a>}
+<a name="line257">257: </a><font color="#B22222">.  PEP_CONVERGED_USER - converged due to a user-defined condition</font>
+<a name="line258">258: </a><font color="#B22222">.  PEP_DIVERGED_ITS - required more than max_it iterations to reach convergence</font>
+<a name="line259">259: </a><font color="#B22222">.  PEP_DIVERGED_BREAKDOWN - generic breakdown in method</font>
+<a name="line260">260: </a><font color="#B22222">-  PEP_DIVERGED_SYMMETRY_LOST - pseudo-Lanczos was not able to keep symmetry</font>
+
+<a name="line262">262: </a><font color="#B22222">   Note:</font>
+<a name="line263">263: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>() is complete.</font>
+
+<a name="line265">265: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line267">267: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(), <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a></font>
+<a name="line268">268: </a><font color="#B22222">@*/</font>
+<a name="line269">269: </a><strong><font color="#4169E1"><a name="PEPGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetConvergedReason.html#PEPGetConvergedReason">PEPGetConvergedReason</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPConvergedReason.html#PEPConvergedReason">PEPConvergedReason</a> *reason)</font></strong>
+<a name="line270">270: </a>{
+<a name="line274">274: </a>  PEPCheckSolved(pep,1);
+<a name="line275">275: </a>  *reason = pep->reason;
+<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
+<a name="line277">277: </a>}
+
+<a name="line281">281: </a><font color="#B22222">/*@</font>
+<a name="line282">282: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a> - Gets the i-th solution of the eigenproblem as computed by</font>
+<a name="line283">283: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(). The solution consists in both the eigenvalue and the eigenvector.</font>
+
+<a name="line285">285: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a></font>
+
+<a name="line287">287: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line288">288: </a><font color="#B22222">+  pep - polynomial eigensolver context</font>
+<a name="line289">289: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line291">291: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line292">292: </a><font color="#B22222">+  eigr - real part of eigenvalue</font>
+<a name="line293">293: </a><font color="#B22222">.  eigi - imaginary part of eigenvalue</font>
+<a name="line294">294: </a><font color="#B22222">.  Vr   - real part of eigenvector</font>
+<a name="line295">295: </a><font color="#B22222">-  Vi   - imaginary part of eigenvector</font>
+
+<a name="line297">297: </a><font color="#B22222">   Notes:</font>
+<a name="line298">298: </a><font color="#B22222">   It is allowed to pass NULL for Vr and Vi, if the eigenvector is not</font>
+<a name="line299">299: </a><font color="#B22222">   required. Otherwise, the caller must provide valid Vec objects, i.e.,</font>
+<a name="line300">300: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
+
+<a name="line302">302: </a><font color="#B22222">   If the eigenvalue is real, then eigi and Vi are set to zero. If PETSc is</font>
+<a name="line303">303: </a><font color="#B22222">   configured with complex scalars the eigenvalue is stored</font>
+<a name="line304">304: </a><font color="#B22222">   directly in eigr (eigi is set to zero) and the eigenvector in Vr (Vi is</font>
+<a name="line305">305: </a><font color="#B22222">   set to zero). In both cases, the user can pass NULL in eigi and Vi.</font>
+
+<a name="line307">307: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>()).</font>
+<a name="line308">308: </a><font color="#B22222">   Eigenpairs are indexed according to the ordering criterion established</font>
+<a name="line309">309: </a><font color="#B22222">   with <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>().</font>
+
+<a name="line311">311: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line313">313: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPGetConverged.html#PEPGetConverged">PEPGetConverged</a>(), <a href="../../../docs/manualpages/PEP/PEPSetWhichEigenpairs.html#PEPSetWhichEigenpairs">PEPSetWhichEigenpairs</a>()</font>
+<a name="line314">314: </a><font color="#B22222">@*/</font>
+<a name="line315">315: </a><strong><font color="#4169E1"><a name="PEPGetEigenpair"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscScalar *eigr,PetscScalar *eigi,Vec Vr,Vec Vi)</font></strong>
+<a name="line316">316: </a>{
+<a name="line317">317: </a>  PetscInt       k;
+
+<a name="line325">325: </a>  PEPCheckSolved(pep,1);
+<a name="line326">326: </a>  <font color="#4169E1">if</font> (i<0 || i>=pep->nconv) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+
+<a name="line328">328: </a>  PEPComputeVectors(pep);
+<a name="line329">329: </a>  k = pep->perm[i];
+
+<a name="line331">331: </a>  <font color="#B22222">/* eigenvalue */</font>
+<a name="line332">332: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line333">333: </a>  <font color="#4169E1">if</font> (eigr) *eigr = pep->eigr[k];
+<a name="line334">334: </a>  <font color="#4169E1">if</font> (eigi) *eigi = 0;
+<a name="line335">335: </a><font color="#A020F0">#else</font>
+<a name="line336">336: </a>  <font color="#4169E1">if</font> (eigr) *eigr = pep->eigr[k];
+<a name="line337">337: </a>  <font color="#4169E1">if</font> (eigi) *eigi = pep->eigi[k];
+<a name="line338">338: </a><font color="#A020F0">#endif</font>
+
+<a name="line340">340: </a>  <font color="#B22222">/* eigenvector */</font>
+<a name="line341">341: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line342">342: </a>  <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vr); }
+<a name="line343">343: </a>  <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
+<a name="line344">344: </a><font color="#A020F0">#else</font>
+<a name="line345">345: </a>  <font color="#4169E1">if</font> (pep->eigi[k]>0) { <font color="#B22222">/* first value of conjugate pair */</font>
+<a name="line346">346: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vr); }
+<a name="line347">347: </a>    <font color="#4169E1">if</font> (Vi) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k+1,Vi); }
+<a name="line348">348: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (pep->eigi[k]<0) { <font color="#B22222">/* second value of conjugate pair */</font>
+<a name="line349">349: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k-1,Vr); }
+<a name="line350">350: </a>    <font color="#4169E1">if</font> (Vi) {
+<a name="line351">351: </a>      <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vi);
+<a name="line352">352: </a>      VecScale(Vi,-1.0);
+<a name="line353">353: </a>    }
+<a name="line354">354: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* real eigenvalue */</font>
+<a name="line355">355: </a>    <font color="#4169E1">if</font> (Vr) { <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(pep->V,k,Vr); }
+<a name="line356">356: </a>    <font color="#4169E1">if</font> (Vi) { VecSet(Vi,0.0); }
+<a name="line357">357: </a>  }
+<a name="line358">358: </a><font color="#A020F0">#endif</font>
+<a name="line359">359: </a>  <font color="#4169E1">return</font>(0);
+<a name="line360">360: </a>}
+
+<a name="line364">364: </a><font color="#B22222">/*@</font>
+<a name="line365">365: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a> - Returns the error estimate associated to the i-th</font>
+<a name="line366">366: </a><font color="#B22222">   computed eigenpair.</font>
+
+<a name="line368">368: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line370">370: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line371">371: </a><font color="#B22222">+  pep - polynomial eigensolver context</font>
+<a name="line372">372: </a><font color="#B22222">-  i   - index of eigenpair</font>
+
+<a name="line374">374: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line375">375: </a><font color="#B22222">.  errest - the error estimate</font>
+
+<a name="line377">377: </a><font color="#B22222">   Notes:</font>
+<a name="line378">378: </a><font color="#B22222">   This is the error estimate used internally by the eigensolver. The actual</font>
+<a name="line379">379: </a><font color="#B22222">   error bound can be computed with <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(). See also the users</font>
+<a name="line380">380: </a><font color="#B22222">   manual for details.</font>
+
+<a name="line382">382: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line384">384: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>()</font>
+<a name="line385">385: </a><font color="#B22222">@*/</font>
+<a name="line386">386: </a><strong><font color="#4169E1"><a name="PEPGetErrorEstimate"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,PetscReal *errest)</font></strong>
+<a name="line387">387: </a>{
+<a name="line391">391: </a>  PEPCheckSolved(pep,1);
+<a name="line392">392: </a>  <font color="#4169E1">if</font> (i<0 || i>=pep->nconv) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line393">393: </a>  <font color="#4169E1">if</font> (errest) *errest = pep->errest[pep->perm[i]];
+<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
+<a name="line395">395: </a>}
+
+<a name="line399">399: </a><font color="#B22222">/*</font>
+<a name="line400">400: </a><font color="#B22222">   PEPComputeResidualNorm_Private - Computes the norm of the residual vector</font>
+<a name="line401">401: </a><font color="#B22222">   associated with an eigenpair.</font>
+
+<a name="line403">403: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line404">404: </a><font color="#B22222">     kr,ki - eigenvalue</font>
+<a name="line405">405: </a><font color="#B22222">     xr,xi - eigenvector</font>
+<a name="line406">406: </a><font color="#B22222">     z     - array of 4 work vectors (z[2],z[3] not referenced in complex scalars)</font>
+<a name="line407">407: </a><font color="#B22222">*/</font>
+<a name="line408">408: </a><strong><font color="#4169E1"><a name="PEPComputeResidualNorm_Private"></a>PetscErrorCode PEPComputeResidualNorm_Private(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscScalar kr,PetscScalar ki,Vec xr,Vec xi,Vec *z,PetscReal *norm)</font></strong>
+<a name="line409">409: </a>{
+<a name="line411">411: </a>  Mat            *A=pep->A;
+<a name="line412">412: </a>  PetscInt       i,nmat=pep->nmat;
+<a name="line413">413: </a>  PetscScalar    t[20],*vals=t,*ivals=NULL;
+<a name="line414">414: </a>  Vec            u,w;
+<a name="line415">415: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line416">416: </a>  Vec            ui,wi;
+<a name="line417">417: </a>  PetscReal      ni;
+<a name="line418">418: </a>  PetscBool      imag;
+<a name="line419">419: </a>  PetscScalar    it[20];
+<a name="line420">420: </a><font color="#A020F0">#endif</font>
+
+<a name="line423">423: </a>  u = z[0]; w = z[1];
+<a name="line424">424: </a>  VecSet(u,0.0);
+<a name="line425">425: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line426">426: </a>  ui = z[2]; wi = z[3];
+<a name="line427">427: </a>  ivals = it; 
+<a name="line428">428: </a><font color="#A020F0">#endif</font>
+<a name="line429">429: </a>  <font color="#4169E1">if</font> (nmat>20) {
+<a name="line430">430: </a>    PetscMalloc(nmat*<font color="#4169E1">sizeof</font>(PetscScalar),&vals);
+<a name="line431">431: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line432">432: </a>    PetscMalloc(nmat*<font color="#4169E1">sizeof</font>(PetscScalar),&ivals);
+<a name="line433">433: </a><font color="#A020F0">#endif</font>
+<a name="line434">434: </a>  }
+<a name="line435">435: </a>  PEPEvaluateBasis(pep,kr,ki,vals,ivals);
+<a name="line436">436: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line437">437: </a>  <font color="#4169E1">if</font> (ki == 0 || PetscAbsScalar(ki) < PetscAbsScalar(kr*PETSC_MACHINE_EPSILON))
+<a name="line438">438: </a>    imag = PETSC_FALSE;
+<a name="line439">439: </a>  <font color="#4169E1">else</font> {
+<a name="line440">440: </a>    imag = PETSC_TRUE;
+<a name="line441">441: </a>    VecSet(ui,0.0);
+<a name="line442">442: </a>  }
+<a name="line443">443: </a><font color="#A020F0">#endif</font>
+<a name="line444">444: </a>  <font color="#4169E1">for</font> (i=0;i<nmat;i++) {
+<a name="line445">445: </a>    <font color="#4169E1">if</font> (vals[i]!=0.0) {
+<a name="line446">446: </a>      MatMult(A[i],xr,w);
+<a name="line447">447: </a>      VecAXPY(u,vals[i],w);
+<a name="line448">448: </a>    }
+<a name="line449">449: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line450">450: </a>    <font color="#4169E1">if</font> (imag) {
+<a name="line451">451: </a>      <font color="#4169E1">if</font> (ivals[i]!=0 || vals[i]!=0) {
+<a name="line452">452: </a>        MatMult(A[i],xi,wi);
+<a name="line453">453: </a>        <font color="#4169E1">if</font> (vals[i]==0) {
+<a name="line454">454: </a>          MatMult(A[i],xr,w);
+<a name="line455">455: </a>        }
+<a name="line456">456: </a>      }
+<a name="line457">457: </a>      <font color="#4169E1">if</font> (ivals[i]!=0){
+<a name="line458">458: </a>        VecAXPY(u,-ivals[i],wi);
+<a name="line459">459: </a>        VecAXPY(ui,ivals[i],w);
+<a name="line460">460: </a>      }
+<a name="line461">461: </a>      <font color="#4169E1">if</font> (vals[i]!=0) {
+<a name="line462">462: </a>        VecAXPY(ui,vals[i],wi);
+<a name="line463">463: </a>      }
+<a name="line464">464: </a>    }
+<a name="line465">465: </a><font color="#A020F0">#endif</font>
+<a name="line466">466: </a>  }
+<a name="line467">467: </a>  VecNorm(u,NORM_2,norm);
+<a name="line468">468: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line469">469: </a>  <font color="#4169E1">if</font> (imag) {
+<a name="line470">470: </a>    VecNorm(ui,NORM_2,&ni);
+<a name="line471">471: </a>    *norm = SlepcAbsEigenvalue(*norm,ni);
+<a name="line472">472: </a>  }
+<a name="line473">473: </a><font color="#A020F0">#endif</font>
+<a name="line474">474: </a>  <font color="#4169E1">if</font> (nmat>20) {
+<a name="line475">475: </a>    PetscFree(vals);
+<a name="line476">476: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line477">477: </a>    PetscFree(ivals);
+<a name="line478">478: </a><font color="#A020F0">#endif</font>
+<a name="line479">479: </a>  }
+<a name="line480">480: </a>  <font color="#4169E1">return</font>(0);
+<a name="line481">481: </a>}
+
+<a name="line485">485: </a><font color="#B22222">/*@</font>
+<a name="line486">486: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a> - Computes the error (based on the residual norm) associated</font>
+<a name="line487">487: </a><font color="#B22222">   with the i-th computed eigenpair.</font>
+
+<a name="line489">489: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line491">491: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line492">492: </a><font color="#B22222">+  pep  - the polynomial eigensolver context</font>
+<a name="line493">493: </a><font color="#B22222">.  i    - the solution index</font>
+<a name="line494">494: </a><font color="#B22222">-  type - the type of error to compute</font>
+
+<a name="line496">496: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line497">497: </a><font color="#B22222">.  error - the error</font>
+
+<a name="line499">499: </a><font color="#B22222">   Notes:</font>
+<a name="line500">500: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
+<a name="line501">501: </a><font color="#B22222">   norm ||P(l)x||_2 where l is the eigenvalue and x is the eigenvector.</font>
+<a name="line502">502: </a><font color="#B22222">   See the users guide for additional details.</font>
+
+<a name="line504">504: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line506">506: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a>, <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPGetErrorEstimate.html#PEPGetErrorEstimate">PEPGetErrorEstimate</a>()</font>
+<a name="line507">507: </a><font color="#B22222">@*/</font>
+<a name="line508">508: </a><strong><font color="#4169E1"><a name="PEPComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscInt i,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> type,PetscReal *error)</font></strong>
+<a name="line509">509: </a>{
+<a name="line511">511: </a>  Vec            xr,xi,w[4];
+<a name="line512">512: </a>  PetscScalar    kr,ki;
+<a name="line513">513: </a>  PetscReal      t,z=0.0;
+<a name="line514">514: </a>  PetscInt       j;
+<a name="line515">515: </a>  PetscBool      flg;
+
+<a name="line522">522: </a>  PEPCheckSolved(pep,1);
+
+<a name="line524">524: </a>  <font color="#B22222">/* allocate work vectors */</font>
+<a name="line525">525: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line526">526: </a>  <a href="../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,3);
+<a name="line527">527: </a>  xi   = NULL;
+<a name="line528">528: </a>  w[2] = NULL;
+<a name="line529">529: </a>  w[3] = NULL;
+<a name="line530">530: </a><font color="#A020F0">#else</font>
+<a name="line531">531: </a>  <a href="../../../docs/manualpages/PEP/PEPSetWorkVecs.html#PEPSetWorkVecs">PEPSetWorkVecs</a>(pep,6);
+<a name="line532">532: </a>  xi   = pep->work[3];
+<a name="line533">533: </a>  w[2] = pep->work[4];
+<a name="line534">534: </a>  w[3] = pep->work[5];
+<a name="line535">535: </a><font color="#A020F0">#endif</font>
+<a name="line536">536: </a>  xr   = pep->work[0];
+<a name="line537">537: </a>  w[0] = pep->work[1];
+<a name="line538">538: </a>  w[1] = pep->work[2];
+
+<a name="line540">540: </a>  <font color="#B22222">/* compute residual norms */</font>
+<a name="line541">541: </a>  <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,i,&kr,&ki,xr,xi);
+<a name="line542">542: </a>  PEPComputeResidualNorm_Private(pep,kr,ki,xr,xi,w,error);
+
+<a name="line544">544: </a>  <font color="#B22222">/* compute error */</font>
+<a name="line545">545: </a>  <font color="#4169E1">switch</font> (type) {
+<a name="line546">546: </a>    <font color="#4169E1">case</font> PEP_ERROR_ABSOLUTE:
+<a name="line547">547: </a>      <font color="#4169E1">break</font>;
+<a name="line548">548: </a>    <font color="#4169E1">case</font> PEP_ERROR_RELATIVE:
+<a name="line549">549: </a>      *error /= SlepcAbsEigenvalue(kr,ki);
+<a name="line550">550: </a>      <font color="#4169E1">break</font>;
+<a name="line551">551: </a>    <font color="#4169E1">case</font> PEP_ERROR_BACKWARD:
+<a name="line552">552: </a>      <font color="#B22222">/* initialization of matrix norms */</font>
+<a name="line553">553: </a>      <font color="#4169E1">if</font> (!pep->nrma[pep->nmat-1]) {
+<a name="line554">554: </a>        <font color="#4169E1">for</font> (j=0;j<pep->nmat;j++) {
+<a name="line555">555: </a>          MatHasOperation(pep->A[j],MATOP_NORM,&flg);
+<a name="line556">556: </a>          <font color="#4169E1">if</font> (!flg) SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_WRONG,<font color="#666666">"The computation of backward errors requires a matrix norm operation"</font>);
+<a name="line557">557: </a>          MatNorm(pep->A[j],NORM_INFINITY,&pep->nrma[j]);
+<a name="line558">558: </a>        }
+<a name="line559">559: </a>      }
+<a name="line560">560: </a>      t = SlepcAbsEigenvalue(kr,ki);
+<a name="line561">561: </a>      <font color="#4169E1">for</font> (j=pep->nmat-1;j>=0;j--) {
+<a name="line562">562: </a>        z = z*t+pep->nrma[j];
+<a name="line563">563: </a>      }
+<a name="line564">564: </a>      *error /= z;
+<a name="line565">565: </a>      <font color="#4169E1">break</font>;
+<a name="line566">566: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line567">567: </a>      SETERRQ(PetscObjectComm((PetscObject)pep),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
+<a name="line568">568: </a>  }
+<a name="line569">569: </a>  <font color="#4169E1">return</font>(0);
+<a name="line570">570: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/interface/pepview.c b/src/pep/interface/pepview.c
index 68dc4d7..35c6fd3 100644
--- a/src/pep/interface/pepview.c
+++ b/src/pep/interface/pepview.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -95,24 +95,17 @@ PetscErrorCode PEPView(PEP pep,PetscViewer viewer)
       case PEP_SCALE_NONE:
         break;
       case PEP_SCALE_SCALAR:
-        ierr = PetscViewerASCIIPrintf(viewer,"  scalar balancing enabled, with scaling factor=%g\n",(double)pep->sfactor);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIPrintf(viewer,"  parameter scaling enabled, with scaling factor=%g\n",(double)pep->sfactor);CHKERRQ(ierr);
         break;
       case PEP_SCALE_DIAGONAL:
         ierr = PetscViewerASCIIPrintf(viewer,"  diagonal balancing enabled, with its=%D and lambda=%g\n",pep->sits,(double)pep->slambda);CHKERRQ(ierr);
         break;
       case PEP_SCALE_BOTH:
-        ierr = PetscViewerASCIIPrintf(viewer,"  scalar & diagonal balancing enabled, with scaling factor=%g, its=%D and lambda=%g\n",(double)pep->sfactor,pep->sits,(double)pep->slambda);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIPrintf(viewer,"  parameter scaling & diagonal balancing enabled, with scaling factor=%g, its=%D and lambda=%g\n",(double)pep->sfactor,pep->sits,(double)pep->slambda);CHKERRQ(ierr);
         break;
     }
-    ierr = PetscViewerASCIIPrintf(viewer,"  extraction type: %s\n",PEPExtractTypes[pep->extract]);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"  iterative refinement: %s%s\n",PEPRefineTypes[pep->refine],pep->schur?", with a Schur complement approach":"");CHKERRQ(ierr);
-    if (pep->refine) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  refinement stopping criterion: tol=%g, its=%D\n",(double)pep->rtol,pep->rits);CHKERRQ(ierr);
-      if (pep->npart>1) {
-        ierr = PetscViewerASCIIPrintf(viewer,"  splitting communicator in %D partitions for refinement\n",pep->npart);CHKERRQ(ierr);
-      }
-    }
     ierr = PetscViewerASCIIPrintf(viewer,"  selected portion of the spectrum: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     ierr = SlepcSNPrintfScalar(str,50,pep->target,PETSC_FALSE);CHKERRQ(ierr);
     if (!pep->which) {
       ierr = PetscViewerASCIIPrintf(viewer,"not yet set\n");CHKERRQ(ierr);
@@ -149,29 +142,21 @@ PetscErrorCode PEPView(PEP pep,PetscViewer viewer)
         break;
       default: SETERRQ(PetscObjectComm((PetscObject)pep),1,"Wrong value of pep->which");
     }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  number of eigenvalues (nev): %D\n",pep->nev);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  number of column vectors (ncv): %D\n",pep->ncv);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum dimension of projected problem (mpd): %D\n",pep->mpd);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum number of iterations: %D\n",pep->max_it);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  tolerance: %g\n",(double)pep->tol);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  convergence test: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     switch (pep->conv) {
     case PEP_CONV_ABS:
       ierr = PetscViewerASCIIPrintf(viewer,"absolute\n");CHKERRQ(ierr);break;
-    case PEP_CONV_EIG:
+    case PEP_CONV_REL:
       ierr = PetscViewerASCIIPrintf(viewer,"relative to the eigenvalue\n");CHKERRQ(ierr);break;
-    case PEP_CONV_LINEAR:
-      ierr = PetscViewerASCIIPrintf(viewer,"related to the linearized eigenproblem\n");CHKERRQ(ierr);
-      if (pep->nrma) {
-        ierr = PetscViewerASCIIPrintf(viewer,"  computed matrix norms: %g",(double)pep->nrma[0]);CHKERRQ(ierr);
-        for (i=1;i<pep->nmat;i++) {
-          ierr = PetscViewerASCIIPrintf(viewer,", %g",(double)pep->nrma[i]);CHKERRQ(ierr);
-        }
-        ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
-      }
-      break;
     case PEP_CONV_NORM:
-      ierr = PetscViewerASCIIPrintf(viewer,"related to the matrix norms\n");CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"relative to the matrix norms\n");CHKERRQ(ierr);
       if (pep->nrma) {
         ierr = PetscViewerASCIIPrintf(viewer,"  computed matrix norms: %g",(double)pep->nrma[0]);CHKERRQ(ierr);
         for (i=1;i<pep->nmat;i++) {
@@ -183,6 +168,15 @@ PetscErrorCode PEPView(PEP pep,PetscViewer viewer)
     case PEP_CONV_USER:
       ierr = PetscViewerASCIIPrintf(viewer,"user-defined\n");CHKERRQ(ierr);break;
     }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  extraction type: %s\n",PEPExtractTypes[pep->extract]);CHKERRQ(ierr);
+    if (pep->refine) {
+      ierr = PetscViewerASCIIPrintf(viewer,"  iterative refinement: %s, with %s scheme\n",PEPRefineTypes[pep->refine],PEPRefineSchemes[pep->scheme]);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"  refinement stopping criterion: tol=%g, its=%D\n",(double)pep->rtol,pep->rits);CHKERRQ(ierr);
+      if (pep->npart>1) {
+        ierr = PetscViewerASCIIPrintf(viewer,"  splitting communicator in %D partitions for refinement\n",pep->npart);CHKERRQ(ierr);
+      }
+    }
     if (pep->nini) {
       ierr = PetscViewerASCIIPrintf(viewer,"  dimension of user-provided initial space: %D\n",PetscAbs(pep->nini));CHKERRQ(ierr);
     }
@@ -246,7 +240,7 @@ PetscErrorCode PEPReasonView(PEP pep,PetscViewer viewer)
   if (isAscii) {
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);CHKERRQ(ierr);
     if (pep->reason > 0) {
-      ierr = PetscViewerASCIIPrintf(viewer,"%s Polynomial eigensolve converged (%d eigenpair%s) due to %s; iterations %D\n",((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:"",pep->nconv,(pep->nconv>1)?"s":"",PEPConvergedReasons[pep->reason],pep->its);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"%s Polynomial eigensolve converged (%D eigenpair%s) due to %s; iterations %D\n",((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:"",pep->nconv,(pep->nconv>1)?"s":"",PEPConvergedReasons[pep->reason],pep->its);CHKERRQ(ierr);
     } else {
       ierr = PetscViewerASCIIPrintf(viewer,"%s Polynomial eigensolve did not converge due to %s; iterations %D\n",((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:"",PEPConvergedReasons[pep->reason],pep->its);CHKERRQ(ierr);
     }
@@ -542,6 +536,7 @@ static PetscErrorCode PEPValuesView_DRAW(PEP pep,PetscViewer viewer)
     ierr = PetscDrawSPAddPoint(drawsp,&re,&im);CHKERRQ(ierr);
   }
   ierr = PetscDrawSPDraw(drawsp,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscDrawSPSave(drawsp);CHKERRQ(ierr);
   ierr = PetscDrawSPDestroy(&drawsp);CHKERRQ(ierr);
   ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -739,7 +734,7 @@ PetscErrorCode PEPVectorsView(PEP pep,PetscViewer viewer)
     ierr = PEPComputeVectors(pep);CHKERRQ(ierr);
     for (i=0;i<pep->nconv;i++) {
       k = pep->perm[i];
-      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",i,ename);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",(int)i,ename);CHKERRQ(ierr);
       ierr = BVGetColumn(pep->V,k,&x);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)x,vname);CHKERRQ(ierr);
       ierr = VecView(x,viewer);CHKERRQ(ierr);
diff --git a/src/pep/interface/pepview.c.html b/src/pep/interface/pepview.c.html
index 13a7a5b..85e1768 100644
--- a/src/pep/interface/pepview.c.html
+++ b/src/pep/interface/pepview.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/interface/pepview.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:47+00:00">
+<meta name="date" content="2016-05-16T10:33:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/interface/pepview.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/interface/pepview.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> routines related to various viewers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -100,635 +100,630 @@
 <a name="line95"> 95: </a>      <font color="#4169E1">case</font> PEP_SCALE_NONE:
 <a name="line96"> 96: </a>        <font color="#4169E1">break</font>;
 <a name="line97"> 97: </a>      <font color="#4169E1">case</font> PEP_SCALE_SCALAR:
-<a name="line98"> 98: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  scalar balancing enabled, with scaling factor=%g\n"</font>,(double)pep->sfactor);
+<a name="line98"> 98: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  parameter scaling enabled, with scaling factor=%g\n"</font>,(double)pep->sfactor);
 <a name="line99"> 99: </a>        <font color="#4169E1">break</font>;
 <a name="line100">100: </a>      <font color="#4169E1">case</font> PEP_SCALE_DIAGONAL:
 <a name="line101">101: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  diagonal balancing enabled, with its=%D and lambda=%g\n"</font>,pep->sits,(double)pep->slambda);
 <a name="line102">102: </a>        <font color="#4169E1">break</font>;
 <a name="line103">103: </a>      <font color="#4169E1">case</font> PEP_SCALE_BOTH:
-<a name="line104">104: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  scalar & diagonal balancing enabled, with scaling factor=%g, its=%D and lambda=%g\n"</font>,(double)pep->sfactor,pep->sits,(double)pep->slambda);
+<a name="line104">104: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  parameter scaling & diagonal balancing enabled, with scaling factor=%g, its=%D and lambda=%g\n"</font>,(double)pep->sfactor,pep->sits,(double)pep->slambda);
 <a name="line105">105: </a>        <font color="#4169E1">break</font>;
 <a name="line106">106: </a>    }
-<a name="line107">107: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  extraction type: %s\n"</font>,PEPExtractTypes[pep->extract]);
-<a name="line108">108: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  iterative refinement: %s%s\n"</font>,PEPRefineTypes[pep->refine],pep->schur?<font color="#666666">", with a Schur complement approach"</font>:<font color="#666666">""</font>);
-<a name="line109">109: </a>    <font color="#4169E1">if</font> (pep->refine) {
-<a name="line110">110: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  refinement stopping criterion: tol=%g, its=%D\n"</font>,(double)pep->rtol,pep->rits);
-<a name="line111">111: </a>      <font color="#4169E1">if</font> (pep->npart>1) {
-<a name="line112">112: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  splitting communicator in %D partitions for refinement\n"</font>,pep->npart);
-<a name="line113">113: </a>      }
-<a name="line114">114: </a>    }
-<a name="line115">115: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected portion of the spectrum: "</font>);
-<a name="line116">116: </a>    <a href="../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,pep->target,PETSC_FALSE);
-<a name="line117">117: </a>    <font color="#4169E1">if</font> (!pep->which) {
-<a name="line118">118: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"not yet set\n"</font>);
-<a name="line119">119: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">switch</font> (pep->which) {
-<a name="line120">120: </a>      <font color="#4169E1">case</font> PEP_WHICH_USER:
-<a name="line121">121: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"user defined\n"</font>);
-<a name="line122">122: </a>        <font color="#4169E1">break</font>;
-<a name="line123">123: </a>      <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:
-<a name="line124">124: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (in magnitude)\n"</font>,str);
-<a name="line125">125: </a>        <font color="#4169E1">break</font>;
-<a name="line126">126: </a>      <font color="#4169E1">case</font> PEP_TARGET_REAL:
-<a name="line127">127: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the real axis)\n"</font>,str);
-<a name="line128">128: </a>        <font color="#4169E1">break</font>;
-<a name="line129">129: </a>      <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:
-<a name="line130">130: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the imaginary axis)\n"</font>,str);
-<a name="line131">131: </a>        <font color="#4169E1">break</font>;
-<a name="line132">132: </a>      <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:
-<a name="line133">133: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest eigenvalues in magnitude\n"</font>);
-<a name="line134">134: </a>        <font color="#4169E1">break</font>;
-<a name="line135">135: </a>      <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE:
-<a name="line136">136: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest eigenvalues in magnitude\n"</font>);
-<a name="line137">137: </a>        <font color="#4169E1">break</font>;
-<a name="line138">138: </a>      <font color="#4169E1">case</font> PEP_LARGEST_REAL:
-<a name="line139">139: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest real parts\n"</font>);
-<a name="line140">140: </a>        <font color="#4169E1">break</font>;
-<a name="line141">141: </a>      <font color="#4169E1">case</font> PEP_SMALLEST_REAL:
-<a name="line142">142: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest real parts\n"</font>);
-<a name="line143">143: </a>        <font color="#4169E1">break</font>;
-<a name="line144">144: </a>      <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:
-<a name="line145">145: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest imaginary parts\n"</font>);
-<a name="line146">146: </a>        <font color="#4169E1">break</font>;
-<a name="line147">147: </a>      <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY:
-<a name="line148">148: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest imaginary parts\n"</font>);
-<a name="line149">149: </a>        <font color="#4169E1">break</font>;
-<a name="line150">150: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Wrong value of pep->which"</font>);
-<a name="line151">151: </a>    }
-<a name="line152">152: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of eigenvalues (nev): %D\n"</font>,pep->nev);
-<a name="line153">153: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of column vectors (ncv): %D\n"</font>,pep->ncv);
-<a name="line154">154: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,pep->mpd);
-<a name="line155">155: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,pep->max_it);
-<a name="line156">156: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerance: %g\n"</font>,(double)pep->tol);
-<a name="line157">157: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  convergence test: "</font>);
-<a name="line158">158: </a>    <font color="#4169E1">switch</font> (pep->conv) {
-<a name="line159">159: </a>    <font color="#4169E1">case</font> PEP_CONV_ABS:
-<a name="line160">160: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"absolute\n"</font>);<font color="#4169E1">break</font>;
-<a name="line161">161: </a>    <font color="#4169E1">case</font> PEP_CONV_EIG:
-<a name="line162">162: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue\n"</font>);<font color="#4169E1">break</font>;
-<a name="line163">163: </a>    <font color="#4169E1">case</font> PEP_CONV_LINEAR:
-<a name="line164">164: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"related to the linearized eigenproblem\n"</font>);
-<a name="line165">165: </a>      <font color="#4169E1">if</font> (pep->nrma) {
-<a name="line166">166: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computed matrix norms: %g"</font>,(double)pep->nrma[0]);
-<a name="line167">167: </a>        <font color="#4169E1">for</font> (i=1;i<pep->nmat;i++) {
-<a name="line168">168: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">", %g"</font>,(double)pep->nrma[i]);
-<a name="line169">169: </a>        }
-<a name="line170">170: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line171">171: </a>      }
-<a name="line172">172: </a>      <font color="#4169E1">break</font>;
-<a name="line173">173: </a>    <font color="#4169E1">case</font> PEP_CONV_NORM:
-<a name="line174">174: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"related to the matrix norms\n"</font>);
-<a name="line175">175: </a>      <font color="#4169E1">if</font> (pep->nrma) {
-<a name="line176">176: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computed matrix norms: %g"</font>,(double)pep->nrma[0]);
-<a name="line177">177: </a>        <font color="#4169E1">for</font> (i=1;i<pep->nmat;i++) {
-<a name="line178">178: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">", %g"</font>,(double)pep->nrma[i]);
-<a name="line179">179: </a>        }
-<a name="line180">180: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line181">181: </a>      }
-<a name="line182">182: </a>      <font color="#4169E1">break</font>;
-<a name="line183">183: </a>    <font color="#4169E1">case</font> PEP_CONV_USER:
-<a name="line184">184: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"user-defined\n"</font>);<font color="#4169E1">break</font>;
-<a name="line185">185: </a>    }
-<a name="line186">186: </a>    <font color="#4169E1">if</font> (pep->nini) {
-<a name="line187">187: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(pep->nini));
-<a name="line188">188: </a>    }
-<a name="line189">189: </a>  } <font color="#4169E1">else</font> {
-<a name="line190">190: </a>    <font color="#4169E1">if</font> (pep->ops->view) {
-<a name="line191">191: </a>      (*pep->ops->view)(pep,viewer);
-<a name="line192">192: </a>    }
-<a name="line193">193: </a>  }
-<a name="line194">194: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
-<a name="line195">195: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
-<a name="line196">196: </a>  <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(pep->V,viewer);
-<a name="line197">197: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
-<a name="line198">198: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (!istrivial) { <a href="../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(pep->rg,viewer); }
-<a name="line200">200: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&islinear);
-<a name="line201">201: </a>  <font color="#4169E1">if</font> (!islinear) {
-<a name="line202">202: </a>    <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
-<a name="line203">203: </a>    <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(pep->ds,viewer);
-<a name="line204">204: </a>  }
-<a name="line205">205: </a>  PetscViewerPopFormat(viewer);
-<a name="line206">206: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
-<a name="line207">207: </a>  <a href="../../../docs/manualpages/ST/STView.html#STView">STView</a>(pep->st,viewer);
-<a name="line208">208: </a>  <font color="#4169E1">if</font> (pep->refine!=PEP_REFINE_NONE) {
-<a name="line209">209: </a>    <font color="#4169E1">if</font> (pep->npart>1) {
-<a name="line210">210: </a>      <font color="#4169E1">if</font> (pep->refinesubc->color==0) {
-<a name="line211">211: </a>        PetscViewerASCIIGetStdout(PetscSubcommChild(pep->refinesubc),&sviewer);
-<a name="line212">212: </a>        KSPView(pep->refineksp,sviewer);
-<a name="line213">213: </a>      }
-<a name="line214">214: </a>    } <font color="#4169E1">else</font> {
-<a name="line215">215: </a>      KSPView(pep->refineksp,viewer);
-<a name="line216">216: </a>    }
-<a name="line217">217: </a>  } 
-<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
-<a name="line219">219: </a>}
-
-<a name="line223">223: </a><font color="#B22222">/*@C</font>
-<a name="line224">224: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a> - Displays the reason a <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> solve converged or diverged.</font>
-
-<a name="line226">226: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line228">228: </a><font color="#B22222">   Parameter:</font>
-<a name="line229">229: </a><font color="#B22222">+  pep - the eigensolver context</font>
-<a name="line230">230: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
-
-<a name="line232">232: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line233">233: </a><font color="#B22222">.  -pep_converged_reason - print reason for convergence, and number of iterations</font>
-
-<a name="line235">235: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line237">237: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(), <a href="../../../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>()</font>
-<a name="line238">238: </a><font color="#B22222">@*/</font>
-<a name="line239">239: </a><strong><font color="#4169E1"><a name="PEPReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line240">240: </a>{
-<a name="line242">242: </a>  PetscBool      isAscii;
-
-<a name="line245">245: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
-<a name="line246">246: </a>  <font color="#4169E1">if</font> (isAscii) {
-<a name="line247">247: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line248">248: </a>    <font color="#4169E1">if</font> (pep->reason > 0) {
-<a name="line249">249: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Polynomial eigensolve converged (%d eigenpair%s) due to %s; iterations %D\n"</font>,((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:<font color="#666666">""</font>,pep->nconv,(pep->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,PEPConvergedReasons[pep->reason],pep->its);
-<a name="line250">250: </a>    } <font color="#4169E1">else</font> {
-<a name="line251">251: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Polynomial eigensolve did not converge due to %s; iterations %D\n"</font>,((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:<font color="#666666">""</font>,PEPConvergedReasons[pep->reason],pep->its);
-<a name="line252">252: </a>    }
-<a name="line253">253: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
-<a name="line254">254: </a>  }
-<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
-<a name="line256">256: </a>}
-
-<a name="line260">260: </a><font color="#B22222">/*@</font>
-<a name="line261">261: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line262">262: </a><font color="#B22222">   the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> converged reason is to be viewed. </font>
-
-<a name="line264">264: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line266">266: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line267">267: </a><font color="#B22222">.  pep - the eigensolver context</font>
-
-<a name="line269">269: </a><font color="#B22222">   Level: developer</font>
-<a name="line270">270: </a><font color="#B22222">@*/</font>
-<a name="line271">271: </a><strong><font color="#4169E1"><a name="PEPReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line272">272: </a>{
-<a name="line273">273: </a>  PetscErrorCode    ierr;
-<a name="line274">274: </a>  PetscViewer       viewer;
-<a name="line275">275: </a>  PetscBool         flg;
-<a name="line276">276: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line277">277: </a>  PetscViewerFormat format;
-
-<a name="line280">280: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line281">281: </a>  incall = PETSC_TRUE;
-<a name="line282">282: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_converged_reason"</font>,&viewer,&format,&flg);
-<a name="line283">283: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line284">284: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line285">285: </a>    <a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(pep,viewer);
-<a name="line286">286: </a>    PetscViewerPopFormat(viewer);
-<a name="line287">287: </a>    PetscViewerDestroy(&viewer);
-<a name="line288">288: </a>  }
-<a name="line289">289: </a>  incall = PETSC_FALSE;
-<a name="line290">290: </a>  <font color="#4169E1">return</font>(0);
-<a name="line291">291: </a>}
-
-<a name="line295">295: </a><strong><font color="#4169E1"><a name="PEPErrorView_ASCII"></a>static PetscErrorCode PEPErrorView_ASCII(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line296">296: </a>{
-<a name="line297">297: </a>  PetscBool      errok;
-<a name="line298">298: </a>  PetscReal      error,re,im;
-<a name="line299">299: </a>  PetscScalar    kr,ki;
-<a name="line300">300: </a>  PetscInt       i,j;
-
-<a name="line304">304: </a>  <font color="#4169E1">if</font> (pep->nconv<pep->nev) {
-<a name="line305">305: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D eigenvalues converged\n\n"</font>,pep->nev);
-<a name="line306">306: </a>    <font color="#4169E1">return</font>(0);
-<a name="line307">307: </a>  }
-<a name="line308">308: </a>  errok = PETSC_TRUE;
-<a name="line309">309: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nev;i++) {
-<a name="line310">310: </a>    <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,etype,&error);
-<a name="line311">311: </a>    errok = (errok && error<5.0*pep->tol)? PETSC_TRUE: PETSC_FALSE;
-<a name="line312">312: </a>  }
-<a name="line313">313: </a>  <font color="#4169E1">if</font> (!errok) {
-<a name="line314">314: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,pep->nev);
-<a name="line315">315: </a>    <font color="#4169E1">return</font>(0);
-<a name="line316">316: </a>  }
-<a name="line317">317: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested eigenvalues computed up to the required tolerance:"</font>);
-<a name="line318">318: </a>  <font color="#4169E1">for</font> (i=0;i<=(pep->nev-1)/8;i++) {
-<a name="line319">319: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
-<a name="line320">320: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,pep->nev-8*i);j++) {
-<a name="line321">321: </a>      <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,8*i+j,&kr,&ki,NULL,NULL);
-<a name="line322">322: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line323">323: </a>      re = PetscRealPart(kr);
-<a name="line324">324: </a>      im = PetscImaginaryPart(kr);
-<a name="line325">325: </a><font color="#A020F0">#else</font>
-<a name="line326">326: </a>      re = kr;
-<a name="line327">327: </a>      im = ki;
-<a name="line328">328: </a><font color="#A020F0">#endif</font>
-<a name="line329">329: </a>      <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
-<a name="line330">330: </a>      <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
-<a name="line331">331: </a>      <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line332">332: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f%+.5fi"</font>,(double)re,(double)im);
-<a name="line333">333: </a>      } <font color="#4169E1">else</font> {
-<a name="line334">334: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)re);
-<a name="line335">335: </a>      }
-<a name="line336">336: </a>      <font color="#4169E1">if</font> (8*i+j+1<pep->nev) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
-<a name="line337">337: </a>    }
-<a name="line338">338: </a>  }
-<a name="line339">339: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
-<a name="line340">340: </a>  <font color="#4169E1">return</font>(0);
-<a name="line341">341: </a>}
-
-<a name="line345">345: </a><strong><font color="#4169E1"><a name="PEPErrorView_DETAIL"></a>static PetscErrorCode PEPErrorView_DETAIL(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line346">346: </a>{
-<a name="line348">348: </a>  PetscReal      error,re,im;
-<a name="line349">349: </a>  PetscScalar    kr,ki;
-<a name="line350">350: </a>  PetscInt       i;
-<a name="line351">351: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
-<a name="line352">352: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
-
-<a name="line355">355: </a>  <font color="#4169E1">if</font> (!pep->nconv) <font color="#4169E1">return</font>(0);
-<a name="line356">356: </a>  <font color="#4169E1">switch</font> (etype) {
-<a name="line357">357: </a>    <font color="#4169E1">case</font> PEP_ERROR_ABSOLUTE:
-<a name="line358">358: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"   ||P(k)x||"</font>);
+<a name="line107">107: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected portion of the spectrum: "</font>);
+<a name="line108">108: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line109">109: </a>    <a href="../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,pep->target,PETSC_FALSE);
+<a name="line110">110: </a>    <font color="#4169E1">if</font> (!pep->which) {
+<a name="line111">111: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"not yet set\n"</font>);
+<a name="line112">112: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">switch</font> (pep->which) {
+<a name="line113">113: </a>      <font color="#4169E1">case</font> PEP_WHICH_USER:
+<a name="line114">114: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"user defined\n"</font>);
+<a name="line115">115: </a>        <font color="#4169E1">break</font>;
+<a name="line116">116: </a>      <font color="#4169E1">case</font> PEP_TARGET_MAGNITUDE:
+<a name="line117">117: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (in magnitude)\n"</font>,str);
+<a name="line118">118: </a>        <font color="#4169E1">break</font>;
+<a name="line119">119: </a>      <font color="#4169E1">case</font> PEP_TARGET_REAL:
+<a name="line120">120: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the real axis)\n"</font>,str);
+<a name="line121">121: </a>        <font color="#4169E1">break</font>;
+<a name="line122">122: </a>      <font color="#4169E1">case</font> PEP_TARGET_IMAGINARY:
+<a name="line123">123: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"closest to target: %s (along the imaginary axis)\n"</font>,str);
+<a name="line124">124: </a>        <font color="#4169E1">break</font>;
+<a name="line125">125: </a>      <font color="#4169E1">case</font> PEP_LARGEST_MAGNITUDE:
+<a name="line126">126: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest eigenvalues in magnitude\n"</font>);
+<a name="line127">127: </a>        <font color="#4169E1">break</font>;
+<a name="line128">128: </a>      <font color="#4169E1">case</font> PEP_SMALLEST_MAGNITUDE:
+<a name="line129">129: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest eigenvalues in magnitude\n"</font>);
+<a name="line130">130: </a>        <font color="#4169E1">break</font>;
+<a name="line131">131: </a>      <font color="#4169E1">case</font> PEP_LARGEST_REAL:
+<a name="line132">132: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest real parts\n"</font>);
+<a name="line133">133: </a>        <font color="#4169E1">break</font>;
+<a name="line134">134: </a>      <font color="#4169E1">case</font> PEP_SMALLEST_REAL:
+<a name="line135">135: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest real parts\n"</font>);
+<a name="line136">136: </a>        <font color="#4169E1">break</font>;
+<a name="line137">137: </a>      <font color="#4169E1">case</font> PEP_LARGEST_IMAGINARY:
+<a name="line138">138: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"largest imaginary parts\n"</font>);
+<a name="line139">139: </a>        <font color="#4169E1">break</font>;
+<a name="line140">140: </a>      <font color="#4169E1">case</font> PEP_SMALLEST_IMAGINARY:
+<a name="line141">141: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"smallest imaginary parts\n"</font>);
+<a name="line142">142: </a>        <font color="#4169E1">break</font>;
+<a name="line143">143: </a><strong><font color="#FF0000">      default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)pep),1,<font color="#666666">"Wrong value of pep->which"</font>);
+<a name="line144">144: </a>    }
+<a name="line145">145: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line146">146: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of eigenvalues (nev): %D\n"</font>,pep->nev);
+<a name="line147">147: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of column vectors (ncv): %D\n"</font>,pep->ncv);
+<a name="line148">148: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,pep->mpd);
+<a name="line149">149: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,pep->max_it);
+<a name="line150">150: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerance: %g\n"</font>,(double)pep->tol);
+<a name="line151">151: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  convergence test: "</font>);
+<a name="line152">152: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line153">153: </a>    <font color="#4169E1">switch</font> (pep->conv) {
+<a name="line154">154: </a>    <font color="#4169E1">case</font> PEP_CONV_ABS:
+<a name="line155">155: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"absolute\n"</font>);<font color="#4169E1">break</font>;
+<a name="line156">156: </a>    <font color="#4169E1">case</font> PEP_CONV_REL:
+<a name="line157">157: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the eigenvalue\n"</font>);<font color="#4169E1">break</font>;
+<a name="line158">158: </a>    <font color="#4169E1">case</font> PEP_CONV_NORM:
+<a name="line159">159: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the matrix norms\n"</font>);
+<a name="line160">160: </a>      <font color="#4169E1">if</font> (pep->nrma) {
+<a name="line161">161: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computed matrix norms: %g"</font>,(double)pep->nrma[0]);
+<a name="line162">162: </a>        <font color="#4169E1">for</font> (i=1;i<pep->nmat;i++) {
+<a name="line163">163: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">", %g"</font>,(double)pep->nrma[i]);
+<a name="line164">164: </a>        }
+<a name="line165">165: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line166">166: </a>      }
+<a name="line167">167: </a>      <font color="#4169E1">break</font>;
+<a name="line168">168: </a>    <font color="#4169E1">case</font> PEP_CONV_USER:
+<a name="line169">169: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"user-defined\n"</font>);<font color="#4169E1">break</font>;
+<a name="line170">170: </a>    }
+<a name="line171">171: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line172">172: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  extraction type: %s\n"</font>,PEPExtractTypes[pep->extract]);
+<a name="line173">173: </a>    <font color="#4169E1">if</font> (pep->refine) {
+<a name="line174">174: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  iterative refinement: %s, with %s scheme\n"</font>,PEPRefineTypes[pep->refine],PEPRefineSchemes[pep->scheme]);
+<a name="line175">175: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  refinement stopping criterion: tol=%g, its=%D\n"</font>,(double)pep->rtol,pep->rits);
+<a name="line176">176: </a>      <font color="#4169E1">if</font> (pep->npart>1) {
+<a name="line177">177: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  splitting communicator in %D partitions for refinement\n"</font>,pep->npart);
+<a name="line178">178: </a>      }
+<a name="line179">179: </a>    }
+<a name="line180">180: </a>    <font color="#4169E1">if</font> (pep->nini) {
+<a name="line181">181: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(pep->nini));
+<a name="line182">182: </a>    }
+<a name="line183">183: </a>  } <font color="#4169E1">else</font> {
+<a name="line184">184: </a>    <font color="#4169E1">if</font> (pep->ops->view) {
+<a name="line185">185: </a>      (*pep->ops->view)(pep,viewer);
+<a name="line186">186: </a>    }
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (!pep->V) { <a href="../../../docs/manualpages/PEP/PEPGetBV.html#PEPGetBV">PEPGetBV</a>(pep,&pep->V); }
+<a name="line190">190: </a>  <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(pep->V,viewer);
+<a name="line191">191: </a>  <font color="#4169E1">if</font> (!pep->rg) { <a href="../../../docs/manualpages/PEP/PEPGetRG.html#PEPGetRG">PEPGetRG</a>(pep,&pep->rg); }
+<a name="line192">192: </a>  <a href="../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(pep->rg,&istrivial);
+<a name="line193">193: </a>  <font color="#4169E1">if</font> (!istrivial) { <a href="../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(pep->rg,viewer); }
+<a name="line194">194: </a>  PetscObjectTypeCompare((PetscObject)pep,PEPLINEAR,&islinear);
+<a name="line195">195: </a>  <font color="#4169E1">if</font> (!islinear) {
+<a name="line196">196: </a>    <font color="#4169E1">if</font> (!pep->ds) { <a href="../../../docs/manualpages/PEP/PEPGetDS.html#PEPGetDS">PEPGetDS</a>(pep,&pep->ds); }
+<a name="line197">197: </a>    <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(pep->ds,viewer);
+<a name="line198">198: </a>  }
+<a name="line199">199: </a>  PetscViewerPopFormat(viewer);
+<a name="line200">200: </a>  <font color="#4169E1">if</font> (!pep->st) { <a href="../../../docs/manualpages/PEP/PEPGetST.html#PEPGetST">PEPGetST</a>(pep,&pep->st); }
+<a name="line201">201: </a>  <a href="../../../docs/manualpages/ST/STView.html#STView">STView</a>(pep->st,viewer);
+<a name="line202">202: </a>  <font color="#4169E1">if</font> (pep->refine!=PEP_REFINE_NONE) {
+<a name="line203">203: </a>    <font color="#4169E1">if</font> (pep->npart>1) {
+<a name="line204">204: </a>      <font color="#4169E1">if</font> (pep->refinesubc->color==0) {
+<a name="line205">205: </a>        PetscViewerASCIIGetStdout(PetscSubcommChild(pep->refinesubc),&sviewer);
+<a name="line206">206: </a>        KSPView(pep->refineksp,sviewer);
+<a name="line207">207: </a>      }
+<a name="line208">208: </a>    } <font color="#4169E1">else</font> {
+<a name="line209">209: </a>      KSPView(pep->refineksp,viewer);
+<a name="line210">210: </a>    }
+<a name="line211">211: </a>  } 
+<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
+<a name="line213">213: </a>}
+
+<a name="line217">217: </a><font color="#B22222">/*@C</font>
+<a name="line218">218: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a> - Displays the reason a <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> solve converged or diverged.</font>
+
+<a name="line220">220: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line222">222: </a><font color="#B22222">   Parameter:</font>
+<a name="line223">223: </a><font color="#B22222">+  pep - the eigensolver context</font>
+<a name="line224">224: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
+
+<a name="line226">226: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line227">227: </a><font color="#B22222">.  -pep_converged_reason - print reason for convergence, and number of iterations</font>
+
+<a name="line229">229: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line231">231: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSetConvergenceTest.html#PEPSetConvergenceTest">PEPSetConvergenceTest</a>(), <a href="../../../docs/manualpages/PEP/PEPSetTolerances.html#PEPSetTolerances">PEPSetTolerances</a>(), <a href="../../../docs/manualpages/PEP/PEPGetIterationNumber.html#PEPGetIterationNumber">PEPGetIterationNumber</a>()</font>
+<a name="line232">232: </a><font color="#B22222">@*/</font>
+<a name="line233">233: </a><strong><font color="#4169E1"><a name="PEPReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line234">234: </a>{
+<a name="line236">236: </a>  PetscBool      isAscii;
+
+<a name="line239">239: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
+<a name="line240">240: </a>  <font color="#4169E1">if</font> (isAscii) {
+<a name="line241">241: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line242">242: </a>    <font color="#4169E1">if</font> (pep->reason > 0) {
+<a name="line243">243: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Polynomial eigensolve converged (%D eigenpair%s) due to %s; iterations %D\n"</font>,((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:<font color="#666666">""</font>,pep->nconv,(pep->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,PEPConvergedReasons[pep->reason],pep->its);
+<a name="line244">244: </a>    } <font color="#4169E1">else</font> {
+<a name="line245">245: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s Polynomial eigensolve did not converge due to %s; iterations %D\n"</font>,((PetscObject)pep)->prefix?((PetscObject)pep)->prefix:<font color="#666666">""</font>,PEPConvergedReasons[pep->reason],pep->its);
+<a name="line246">246: </a>    }
+<a name="line247">247: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)pep)->tablevel);
+<a name="line248">248: </a>  }
+<a name="line249">249: </a>  <font color="#4169E1">return</font>(0);
+<a name="line250">250: </a>}
+
+<a name="line254">254: </a><font color="#B22222">/*@</font>
+<a name="line255">255: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line256">256: </a><font color="#B22222">   the <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> converged reason is to be viewed. </font>
+
+<a name="line258">258: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line260">260: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line261">261: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line263">263: </a><font color="#B22222">   Level: developer</font>
+<a name="line264">264: </a><font color="#B22222">@*/</font>
+<a name="line265">265: </a><strong><font color="#4169E1"><a name="PEPReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPReasonViewFromOptions.html#PEPReasonViewFromOptions">PEPReasonViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line266">266: </a>{
+<a name="line267">267: </a>  PetscErrorCode    ierr;
+<a name="line268">268: </a>  PetscViewer       viewer;
+<a name="line269">269: </a>  PetscBool         flg;
+<a name="line270">270: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line271">271: </a>  PetscViewerFormat format;
+
+<a name="line274">274: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line275">275: </a>  incall = PETSC_TRUE;
+<a name="line276">276: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_converged_reason"</font>,&viewer,&format,&flg);
+<a name="line277">277: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line278">278: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line279">279: </a>    <a href="../../../docs/manualpages/PEP/PEPReasonView.html#PEPReasonView">PEPReasonView</a>(pep,viewer);
+<a name="line280">280: </a>    PetscViewerPopFormat(viewer);
+<a name="line281">281: </a>    PetscViewerDestroy(&viewer);
+<a name="line282">282: </a>  }
+<a name="line283">283: </a>  incall = PETSC_FALSE;
+<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
+<a name="line285">285: </a>}
+
+<a name="line289">289: </a><strong><font color="#4169E1"><a name="PEPErrorView_ASCII"></a>static PetscErrorCode PEPErrorView_ASCII(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line290">290: </a>{
+<a name="line291">291: </a>  PetscBool      errok;
+<a name="line292">292: </a>  PetscReal      error,re,im;
+<a name="line293">293: </a>  PetscScalar    kr,ki;
+<a name="line294">294: </a>  PetscInt       i,j;
+
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (pep->nconv<pep->nev) {
+<a name="line299">299: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D eigenvalues converged\n\n"</font>,pep->nev);
+<a name="line300">300: </a>    <font color="#4169E1">return</font>(0);
+<a name="line301">301: </a>  }
+<a name="line302">302: </a>  errok = PETSC_TRUE;
+<a name="line303">303: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nev;i++) {
+<a name="line304">304: </a>    <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,etype,&error);
+<a name="line305">305: </a>    errok = (errok && error<5.0*pep->tol)? PETSC_TRUE: PETSC_FALSE;
+<a name="line306">306: </a>  }
+<a name="line307">307: </a>  <font color="#4169E1">if</font> (!errok) {
+<a name="line308">308: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,pep->nev);
+<a name="line309">309: </a>    <font color="#4169E1">return</font>(0);
+<a name="line310">310: </a>  }
+<a name="line311">311: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested eigenvalues computed up to the required tolerance:"</font>);
+<a name="line312">312: </a>  <font color="#4169E1">for</font> (i=0;i<=(pep->nev-1)/8;i++) {
+<a name="line313">313: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
+<a name="line314">314: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,pep->nev-8*i);j++) {
+<a name="line315">315: </a>      <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,8*i+j,&kr,&ki,NULL,NULL);
+<a name="line316">316: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line317">317: </a>      re = PetscRealPart(kr);
+<a name="line318">318: </a>      im = PetscImaginaryPart(kr);
+<a name="line319">319: </a><font color="#A020F0">#else</font>
+<a name="line320">320: </a>      re = kr;
+<a name="line321">321: </a>      im = ki;
+<a name="line322">322: </a><font color="#A020F0">#endif</font>
+<a name="line323">323: </a>      <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
+<a name="line324">324: </a>      <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
+<a name="line325">325: </a>      <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line326">326: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f%+.5fi"</font>,(double)re,(double)im);
+<a name="line327">327: </a>      } <font color="#4169E1">else</font> {
+<a name="line328">328: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)re);
+<a name="line329">329: </a>      }
+<a name="line330">330: </a>      <font color="#4169E1">if</font> (8*i+j+1<pep->nev) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
+<a name="line331">331: </a>    }
+<a name="line332">332: </a>  }
+<a name="line333">333: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
+<a name="line334">334: </a>  <font color="#4169E1">return</font>(0);
+<a name="line335">335: </a>}
+
+<a name="line339">339: </a><strong><font color="#4169E1"><a name="PEPErrorView_DETAIL"></a>static PetscErrorCode PEPErrorView_DETAIL(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line340">340: </a>{
+<a name="line342">342: </a>  PetscReal      error,re,im;
+<a name="line343">343: </a>  PetscScalar    kr,ki;
+<a name="line344">344: </a>  PetscInt       i;
+<a name="line345">345: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
+<a name="line346">346: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
+
+<a name="line349">349: </a>  <font color="#4169E1">if</font> (!pep->nconv) <font color="#4169E1">return</font>(0);
+<a name="line350">350: </a>  <font color="#4169E1">switch</font> (etype) {
+<a name="line351">351: </a>    <font color="#4169E1">case</font> PEP_ERROR_ABSOLUTE:
+<a name="line352">352: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"   ||P(k)x||"</font>);
+<a name="line353">353: </a>      <font color="#4169E1">break</font>;
+<a name="line354">354: </a>    <font color="#4169E1">case</font> PEP_ERROR_RELATIVE:
+<a name="line355">355: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"||P(k)x||/||kx||"</font>);
+<a name="line356">356: </a>      <font color="#4169E1">break</font>;
+<a name="line357">357: </a>    <font color="#4169E1">case</font> PEP_ERROR_BACKWARD:
+<a name="line358">358: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    eta(x,k)"</font>);
 <a name="line359">359: </a>      <font color="#4169E1">break</font>;
-<a name="line360">360: </a>    <font color="#4169E1">case</font> PEP_ERROR_RELATIVE:
-<a name="line361">361: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"||P(k)x||/||kx||"</font>);
-<a name="line362">362: </a>      <font color="#4169E1">break</font>;
-<a name="line363">363: </a>    <font color="#4169E1">case</font> PEP_ERROR_BACKWARD:
-<a name="line364">364: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">"    eta(x,k)"</font>);
-<a name="line365">365: </a>      <font color="#4169E1">break</font>;
-<a name="line366">366: </a>  }
-<a name="line367">367: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s            k             %s\n%s"</font>,sep,ex,sep);
-<a name="line368">368: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line369">369: </a>    <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,i,&kr,&ki,NULL,NULL);
-<a name="line370">370: </a>    <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,etype,&error);
-<a name="line371">371: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line372">372: </a>    re = PetscRealPart(kr);
-<a name="line373">373: </a>    im = PetscImaginaryPart(kr);
-<a name="line374">374: </a><font color="#A020F0">#else</font>
-<a name="line375">375: </a>    re = kr;
-<a name="line376">376: </a>    im = ki;
-<a name="line377">377: </a><font color="#A020F0">#endif</font>
-<a name="line378">378: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line379">379: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  % 9f%+9fi      %12g\n"</font>,(double)re,(double)im,(double)error);
-<a name="line380">380: </a>    } <font color="#4169E1">else</font> {
-<a name="line381">381: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"    % 12f           %12g\n"</font>,(double)re,(double)error);
-<a name="line382">382: </a>    }
-<a name="line383">383: </a>  }
-<a name="line384">384: </a>  PetscViewerASCIIPrintf(viewer,sep);
-<a name="line385">385: </a>  <font color="#4169E1">return</font>(0);
-<a name="line386">386: </a>}
-
-<a name="line390">390: </a><strong><font color="#4169E1"><a name="PEPErrorView_MATLAB"></a>static PetscErrorCode PEPErrorView_MATLAB(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line391">391: </a>{
-<a name="line393">393: </a>  PetscReal      error;
-<a name="line394">394: </a>  PetscInt       i;
-<a name="line395">395: </a>  const char     *name;
-
-<a name="line398">398: </a>  PetscObjectGetName((PetscObject)pep,&name);
-<a name="line399">399: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
-<a name="line400">400: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line401">401: </a>    <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,etype,&error);
-<a name="line402">402: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
-<a name="line403">403: </a>  }
-<a name="line404">404: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line405">405: </a>  <font color="#4169E1">return</font>(0);
-<a name="line406">406: </a>}
-
-<a name="line410">410: </a><font color="#B22222">/*@C</font>
-<a name="line411">411: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a> - Displays the errors associated with the computed solution</font>
-<a name="line412">412: </a><font color="#B22222">   (as well as the eigenvalues).</font>
-
-<a name="line414">414: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line416">416: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line417">417: </a><font color="#B22222">+  pep    - the eigensolver context</font>
-<a name="line418">418: </a><font color="#B22222">.  etype  - error type</font>
-<a name="line419">419: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line421">421: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line422">422: </a><font color="#B22222">+  -pep_error_absolute - print absolute errors of each eigenpair</font>
-<a name="line423">423: </a><font color="#B22222">.  -pep_error_relative - print relative errors of each eigenpair</font>
-<a name="line424">424: </a><font color="#B22222">-  -pep_error_backward - print backward errors of each eigenpair</font>
-
-<a name="line426">426: </a><font color="#B22222">   Notes:</font>
-<a name="line427">427: </a><font color="#B22222">   By default, this function checks the error of all eigenpairs and prints</font>
-<a name="line428">428: </a><font color="#B22222">   the eigenvalues if all of them are below the requested tolerance.</font>
-<a name="line429">429: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
-<a name="line430">430: </a><font color="#B22222">   eigenvalues and corresponding errors is printed.</font>
-
-<a name="line432">432: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line434">434: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(), <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>()</font>
-<a name="line435">435: </a><font color="#B22222">@*/</font>
-<a name="line436">436: </a><strong><font color="#4169E1"><a name="PEPErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line437">437: </a>{
-<a name="line438">438: </a>  PetscBool         isascii;
-<a name="line439">439: </a>  PetscViewerFormat format;
-<a name="line440">440: </a>  PetscErrorCode    ierr;
-
-<a name="line444">444: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
-<a name="line447">447: </a>  PEPCheckSolved(pep,1);
-<a name="line448">448: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line449">449: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
-
-<a name="line451">451: </a>  PetscViewerGetFormat(viewer,&format);
-<a name="line452">452: </a>  <font color="#4169E1">switch</font> (format) {
-<a name="line453">453: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line454">454: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line455">455: </a>      PEPErrorView_ASCII(pep,etype,viewer);
+<a name="line360">360: </a>  }
+<a name="line361">361: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s            k             %s\n%s"</font>,sep,ex,sep);
+<a name="line362">362: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line363">363: </a>    <a href="../../../docs/manualpages/PEP/PEPGetEigenpair.html#PEPGetEigenpair">PEPGetEigenpair</a>(pep,i,&kr,&ki,NULL,NULL);
+<a name="line364">364: </a>    <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,etype,&error);
+<a name="line365">365: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line366">366: </a>    re = PetscRealPart(kr);
+<a name="line367">367: </a>    im = PetscImaginaryPart(kr);
+<a name="line368">368: </a><font color="#A020F0">#else</font>
+<a name="line369">369: </a>    re = kr;
+<a name="line370">370: </a>    im = ki;
+<a name="line371">371: </a><font color="#A020F0">#endif</font>
+<a name="line372">372: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line373">373: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  % 9f%+9fi      %12g\n"</font>,(double)re,(double)im,(double)error);
+<a name="line374">374: </a>    } <font color="#4169E1">else</font> {
+<a name="line375">375: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"    % 12f           %12g\n"</font>,(double)re,(double)error);
+<a name="line376">376: </a>    }
+<a name="line377">377: </a>  }
+<a name="line378">378: </a>  PetscViewerASCIIPrintf(viewer,sep);
+<a name="line379">379: </a>  <font color="#4169E1">return</font>(0);
+<a name="line380">380: </a>}
+
+<a name="line384">384: </a><strong><font color="#4169E1"><a name="PEPErrorView_MATLAB"></a>static PetscErrorCode PEPErrorView_MATLAB(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line385">385: </a>{
+<a name="line387">387: </a>  PetscReal      error;
+<a name="line388">388: </a>  PetscInt       i;
+<a name="line389">389: </a>  const char     *name;
+
+<a name="line392">392: </a>  PetscObjectGetName((PetscObject)pep,&name);
+<a name="line393">393: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
+<a name="line394">394: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line395">395: </a>    <a href="../../../docs/manualpages/PEP/PEPComputeError.html#PEPComputeError">PEPComputeError</a>(pep,i,etype,&error);
+<a name="line396">396: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
+<a name="line397">397: </a>  }
+<a name="line398">398: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line399">399: </a>  <font color="#4169E1">return</font>(0);
+<a name="line400">400: </a>}
+
+<a name="line404">404: </a><font color="#B22222">/*@C</font>
+<a name="line405">405: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a> - Displays the errors associated with the computed solution</font>
+<a name="line406">406: </a><font color="#B22222">   (as well as the eigenvalues).</font>
+
+<a name="line408">408: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line410">410: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line411">411: </a><font color="#B22222">+  pep    - the eigensolver context</font>
+<a name="line412">412: </a><font color="#B22222">.  etype  - error type</font>
+<a name="line413">413: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line415">415: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line416">416: </a><font color="#B22222">+  -pep_error_absolute - print absolute errors of each eigenpair</font>
+<a name="line417">417: </a><font color="#B22222">.  -pep_error_relative - print relative errors of each eigenpair</font>
+<a name="line418">418: </a><font color="#B22222">-  -pep_error_backward - print backward errors of each eigenpair</font>
+
+<a name="line420">420: </a><font color="#B22222">   Notes:</font>
+<a name="line421">421: </a><font color="#B22222">   By default, this function checks the error of all eigenpairs and prints</font>
+<a name="line422">422: </a><font color="#B22222">   the eigenvalues if all of them are below the requested tolerance.</font>
+<a name="line423">423: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
+<a name="line424">424: </a><font color="#B22222">   eigenvalues and corresponding errors is printed.</font>
+
+<a name="line426">426: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line428">428: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(), <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>()</font>
+<a name="line429">429: </a><font color="#B22222">@*/</font>
+<a name="line430">430: </a><strong><font color="#4169E1"><a name="PEPErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,<a href="../../../docs/manualpages/PEP/PEPErrorType.html#PEPErrorType">PEPErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line431">431: </a>{
+<a name="line432">432: </a>  PetscBool         isascii;
+<a name="line433">433: </a>  PetscViewerFormat format;
+<a name="line434">434: </a>  PetscErrorCode    ierr;
+
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
+<a name="line441">441: </a>  PEPCheckSolved(pep,1);
+<a name="line442">442: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line443">443: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
+
+<a name="line445">445: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line446">446: </a>  <font color="#4169E1">switch</font> (format) {
+<a name="line447">447: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line448">448: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line449">449: </a>      PEPErrorView_ASCII(pep,etype,viewer);
+<a name="line450">450: </a>      <font color="#4169E1">break</font>;
+<a name="line451">451: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line452">452: </a>      PEPErrorView_DETAIL(pep,etype,viewer);
+<a name="line453">453: </a>      <font color="#4169E1">break</font>;
+<a name="line454">454: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line455">455: </a>      PEPErrorView_MATLAB(pep,etype,viewer);
 <a name="line456">456: </a>      <font color="#4169E1">break</font>;
-<a name="line457">457: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line458">458: </a>      PEPErrorView_DETAIL(pep,etype,viewer);
-<a name="line459">459: </a>      <font color="#4169E1">break</font>;
-<a name="line460">460: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line461">461: </a>      PEPErrorView_MATLAB(pep,etype,viewer);
-<a name="line462">462: </a>      <font color="#4169E1">break</font>;
-<a name="line463">463: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line464">464: </a>      PetscInfo1(pep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line465">465: </a>  }
-<a name="line466">466: </a>  <font color="#4169E1">return</font>(0);
-<a name="line467">467: </a>}
-
-<a name="line471">471: </a><font color="#B22222">/*@</font>
-<a name="line472">472: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line473">473: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
-
-<a name="line475">475: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line477">477: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line478">478: </a><font color="#B22222">.  pep - the eigensolver context</font>
-
-<a name="line480">480: </a><font color="#B22222">   Level: developer</font>
-<a name="line481">481: </a><font color="#B22222">@*/</font>
-<a name="line482">482: </a><strong><font color="#4169E1"><a name="PEPErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line483">483: </a>{
-<a name="line484">484: </a>  PetscErrorCode    ierr;
-<a name="line485">485: </a>  PetscViewer       viewer;
-<a name="line486">486: </a>  PetscBool         flg;
-<a name="line487">487: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line488">488: </a>  PetscViewerFormat format;
-
-<a name="line491">491: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line492">492: </a>  incall = PETSC_TRUE;
-<a name="line493">493: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_error_absolute"</font>,&viewer,&format,&flg);
-<a name="line494">494: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line495">495: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line496">496: </a>    <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_ABSOLUTE,viewer);
-<a name="line497">497: </a>    PetscViewerPopFormat(viewer);
-<a name="line498">498: </a>    PetscViewerDestroy(&viewer);
-<a name="line499">499: </a>  }
-<a name="line500">500: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_error_relative"</font>,&viewer,&format,&flg);
-<a name="line501">501: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line502">502: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line503">503: </a>    <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_RELATIVE,viewer);
-<a name="line504">504: </a>    PetscViewerPopFormat(viewer);
-<a name="line505">505: </a>    PetscViewerDestroy(&viewer);
-<a name="line506">506: </a>  }
-<a name="line507">507: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_error_backward"</font>,&viewer,&format,&flg);
-<a name="line508">508: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line509">509: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line510">510: </a>    <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,viewer);
-<a name="line511">511: </a>    PetscViewerPopFormat(viewer);
-<a name="line512">512: </a>    PetscViewerDestroy(&viewer);
-<a name="line513">513: </a>  }
-<a name="line514">514: </a>  incall = PETSC_FALSE;
-<a name="line515">515: </a>  <font color="#4169E1">return</font>(0);
-<a name="line516">516: </a>}
-
-<a name="line520">520: </a><strong><font color="#4169E1"><a name="PEPValuesView_DRAW"></a>static PetscErrorCode PEPValuesView_DRAW(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line521">521: </a>{
-<a name="line523">523: </a>  PetscDraw      draw;
-<a name="line524">524: </a>  PetscDrawSP    drawsp;
-<a name="line525">525: </a>  PetscReal      re,im;
-<a name="line526">526: </a>  PetscInt       i,k;
-
-<a name="line529">529: </a>  <font color="#4169E1">if</font> (!pep->nconv) <font color="#4169E1">return</font>(0);
-<a name="line530">530: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed Eigenvalues"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
-<a name="line531">531: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line532">532: </a>  PetscDrawSPCreate(draw,1,&drawsp);
-<a name="line533">533: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line534">534: </a>    k = pep->perm[i];
-<a name="line535">535: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line536">536: </a>    re = PetscRealPart(pep->eigr[k]);
-<a name="line537">537: </a>    im = PetscImaginaryPart(pep->eigr[k]);
-<a name="line538">538: </a><font color="#A020F0">#else</font>
-<a name="line539">539: </a>    re = pep->eigr[k];
-<a name="line540">540: </a>    im = pep->eigi[k];
-<a name="line541">541: </a><font color="#A020F0">#endif</font>
-<a name="line542">542: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
-<a name="line543">543: </a>  }
-<a name="line544">544: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
-<a name="line545">545: </a>  PetscDrawSPDestroy(&drawsp);
-<a name="line546">546: </a>  PetscViewerDestroy(&viewer);
-<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
-<a name="line548">548: </a>}
-
-<a name="line552">552: </a><strong><font color="#4169E1"><a name="PEPValuesView_ASCII"></a>static PetscErrorCode PEPValuesView_ASCII(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line553">553: </a>{
-<a name="line554">554: </a>  PetscReal      re,im;
-<a name="line555">555: </a>  PetscInt       i,k;
-
-<a name="line559">559: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigenvalues = \n"</font>);
-<a name="line560">560: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line561">561: </a>    k = pep->perm[i];
-<a name="line562">562: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line563">563: </a>    re = PetscRealPart(pep->eigr[k]);
-<a name="line564">564: </a>    im = PetscImaginaryPart(pep->eigr[k]);
-<a name="line565">565: </a><font color="#A020F0">#else</font>
-<a name="line566">566: </a>    re = pep->eigr[k];
-<a name="line567">567: </a>    im = pep->eigi[k];
-<a name="line568">568: </a><font color="#A020F0">#endif</font>
-<a name="line569">569: </a>    <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
-<a name="line570">570: </a>    <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
-<a name="line571">571: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line572">572: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f%+.5fi\n"</font>,(double)re,(double)im);
-<a name="line573">573: </a>    } <font color="#4169E1">else</font> {
-<a name="line574">574: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)re);
-<a name="line575">575: </a>    }
-<a name="line576">576: </a>  }
-<a name="line577">577: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line578">578: </a>  <font color="#4169E1">return</font>(0);
-<a name="line579">579: </a>}
-
-<a name="line583">583: </a><strong><font color="#4169E1"><a name="PEPValuesView_MATLAB"></a>static PetscErrorCode PEPValuesView_MATLAB(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line584">584: </a>{
-<a name="line586">586: </a>  PetscInt       i,k;
-<a name="line587">587: </a>  PetscReal      re,im;
-<a name="line588">588: </a>  const char     *name;
-
-<a name="line591">591: </a>  PetscObjectGetName((PetscObject)pep,&name);
-<a name="line592">592: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Lambda_%s = [\n"</font>,name);
-<a name="line593">593: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line594">594: </a>    k = pep->perm[i];
-<a name="line595">595: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line596">596: </a>    re = PetscRealPart(pep->eigr[k]);
-<a name="line597">597: </a>    im = PetscImaginaryPart(pep->eigr[k]);
-<a name="line598">598: </a><font color="#A020F0">#else</font>
-<a name="line599">599: </a>    re = pep->eigr[k];
-<a name="line600">600: </a>    im = pep->eigi[k];
-<a name="line601">601: </a><font color="#A020F0">#endif</font>
-<a name="line602">602: </a>    <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line603">603: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei\n"</font>,(double)re,(double)im);
-<a name="line604">604: </a>    } <font color="#4169E1">else</font> {
-<a name="line605">605: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)re);
-<a name="line606">606: </a>    }
-<a name="line607">607: </a>  }
-<a name="line608">608: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line609">609: </a>  <font color="#4169E1">return</font>(0);
-<a name="line610">610: </a>}
-
-<a name="line614">614: </a><font color="#B22222">/*@C</font>
-<a name="line615">615: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a> - Displays the computed eigenvalues in a viewer.</font>
-
-<a name="line617">617: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line619">619: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line620">620: </a><font color="#B22222">+  pep    - the eigensolver context</font>
-<a name="line621">621: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line623">623: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line624">624: </a><font color="#B22222">.  -pep_view_values - print computed eigenvalues</font>
-
-<a name="line626">626: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line628">628: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(), <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>()</font>
-<a name="line629">629: </a><font color="#B22222">@*/</font>
-<a name="line630">630: </a><strong><font color="#4169E1"><a name="PEPValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line631">631: </a>{
-<a name="line632">632: </a>  PetscBool         isascii,isdraw;
-<a name="line633">633: </a>  PetscViewerFormat format;
-<a name="line634">634: </a>  PetscErrorCode    ierr;
-
-<a name="line638">638: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
-<a name="line641">641: </a>  PEPCheckSolved(pep,1);
-<a name="line642">642: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
-<a name="line643">643: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line644">644: </a>  <font color="#4169E1">if</font> (isdraw) {
-<a name="line645">645: </a>    PEPValuesView_DRAW(pep,viewer);
-<a name="line646">646: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
-<a name="line647">647: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line648">648: </a>    <font color="#4169E1">switch</font> (format) {
-<a name="line649">649: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line650">650: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line651">651: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line652">652: </a>        PEPValuesView_ASCII(pep,viewer);
-<a name="line653">653: </a>        <font color="#4169E1">break</font>;
-<a name="line654">654: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line655">655: </a>        PEPValuesView_MATLAB(pep,viewer);
-<a name="line656">656: </a>        <font color="#4169E1">break</font>;
-<a name="line657">657: </a><strong><font color="#FF0000">      default:</font></strong>
-<a name="line658">658: </a>        PetscInfo1(pep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line659">659: </a>    }
-<a name="line660">660: </a>  }
-<a name="line661">661: </a>  <font color="#4169E1">return</font>(0);
-<a name="line662">662: </a>}
-
-<a name="line666">666: </a><font color="#B22222">/*@</font>
-<a name="line667">667: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line668">668: </a><font color="#B22222">   the computed eigenvalues are to be viewed. </font>
-
-<a name="line670">670: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line672">672: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line673">673: </a><font color="#B22222">.  pep - the eigensolver context</font>
-
-<a name="line675">675: </a><font color="#B22222">   Level: developer</font>
-<a name="line676">676: </a><font color="#B22222">@*/</font>
-<a name="line677">677: </a><strong><font color="#4169E1"><a name="PEPValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line678">678: </a>{
-<a name="line679">679: </a>  PetscErrorCode    ierr;
-<a name="line680">680: </a>  PetscViewer       viewer;
-<a name="line681">681: </a>  PetscBool         flg;
-<a name="line682">682: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line683">683: </a>  PetscViewerFormat format;
-
-<a name="line686">686: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line687">687: </a>  incall = PETSC_TRUE;
-<a name="line688">688: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_view_values"</font>,&viewer,&format,&flg);
-<a name="line689">689: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line690">690: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line691">691: </a>    <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(pep,viewer);
-<a name="line692">692: </a>    PetscViewerPopFormat(viewer);
-<a name="line693">693: </a>    PetscViewerDestroy(&viewer);
-<a name="line694">694: </a>  }
-<a name="line695">695: </a>  incall = PETSC_FALSE;
-<a name="line696">696: </a>  <font color="#4169E1">return</font>(0);
-<a name="line697">697: </a>}
-
-<a name="line701">701: </a><font color="#B22222">/*@C</font>
-<a name="line702">702: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a> - Outputs computed eigenvectors to a viewer.</font>
-
-<a name="line704">704: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line706">706: </a><font color="#B22222">   Parameter:</font>
-<a name="line707">707: </a><font color="#B22222">+  pep    - the eigensolver context</font>
-<a name="line708">708: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line710">710: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line711">711: </a><font color="#B22222">.  -pep_view_vectors - output eigenvectors.</font>
-
-<a name="line713">713: </a><font color="#B22222">   Note:</font>
-<a name="line714">714: </a><font color="#B22222">   If PETSc was configured with real scalars, complex conjugate eigenvectors</font>
-<a name="line715">715: </a><font color="#B22222">   will be viewed as two separate real vectors, one containing the real part</font>
-<a name="line716">716: </a><font color="#B22222">   and another one containing the imaginary part.</font>
-
-<a name="line718">718: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line720">720: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(), <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>()</font>
-<a name="line721">721: </a><font color="#B22222">@*/</font>
-<a name="line722">722: </a><strong><font color="#4169E1"><a name="PEPVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
-<a name="line723">723: </a>{
-<a name="line725">725: </a>  PetscInt       i,k;
-<a name="line726">726: </a>  Vec            x;
-<a name="line727">727: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
-<a name="line728">728: </a>  char           vname[NMLEN];
-<a name="line729">729: </a>  const char     *ename;
-
-<a name="line733">733: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
-<a name="line736">736: </a>  PEPCheckSolved(pep,1);
-<a name="line737">737: </a>  <font color="#4169E1">if</font> (pep->nconv) {
-<a name="line738">738: </a>    PetscObjectGetName((PetscObject)pep,&ename);
-<a name="line739">739: </a>    PEPComputeVectors(pep);
-<a name="line740">740: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
-<a name="line741">741: </a>      k = pep->perm[i];
-<a name="line742">742: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,i,ename);
-<a name="line743">743: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,k,&x);
-<a name="line744">744: </a>      PetscObjectSetName((PetscObject)x,vname);
-<a name="line745">745: </a>      VecView(x,viewer);
-<a name="line746">746: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,k,&x);
-<a name="line747">747: </a>    }
-<a name="line748">748: </a>  }
-<a name="line749">749: </a>  <font color="#4169E1">return</font>(0);
-<a name="line750">750: </a>}
-
-<a name="line754">754: </a><font color="#B22222">/*@</font>
-<a name="line755">755: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line756">756: </a><font color="#B22222">   the computed eigenvectors are to be viewed. </font>
-
-<a name="line758">758: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-
-<a name="line760">760: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line761">761: </a><font color="#B22222">.  pep - the eigensolver context</font>
-
-<a name="line763">763: </a><font color="#B22222">   Level: developer</font>
-<a name="line764">764: </a><font color="#B22222">@*/</font>
-<a name="line765">765: </a><strong><font color="#4169E1"><a name="PEPVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
-<a name="line766">766: </a>{
-<a name="line767">767: </a>  PetscErrorCode    ierr;
-<a name="line768">768: </a>  PetscViewer       viewer;
-<a name="line769">769: </a>  PetscBool         flg = PETSC_FALSE;
-<a name="line770">770: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line771">771: </a>  PetscViewerFormat format;
-
-<a name="line774">774: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line775">775: </a>  incall = PETSC_TRUE;
-<a name="line776">776: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_view_vectors"</font>,&viewer,&format,&flg);
-<a name="line777">777: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line778">778: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line779">779: </a>    <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(pep,viewer);
-<a name="line780">780: </a>    PetscViewerPopFormat(viewer);
-<a name="line781">781: </a>    PetscViewerDestroy(&viewer);
-<a name="line782">782: </a>  }
-<a name="line783">783: </a>  incall = PETSC_FALSE;
-<a name="line784">784: </a>  <font color="#4169E1">return</font>(0);
-<a name="line785">785: </a>}
+<a name="line457">457: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line458">458: </a>      PetscInfo1(pep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line459">459: </a>  }
+<a name="line460">460: </a>  <font color="#4169E1">return</font>(0);
+<a name="line461">461: </a>}
+
+<a name="line465">465: </a><font color="#B22222">/*@</font>
+<a name="line466">466: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line467">467: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
+
+<a name="line469">469: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line471">471: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line472">472: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line474">474: </a><font color="#B22222">   Level: developer</font>
+<a name="line475">475: </a><font color="#B22222">@*/</font>
+<a name="line476">476: </a><strong><font color="#4169E1"><a name="PEPErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPErrorViewFromOptions.html#PEPErrorViewFromOptions">PEPErrorViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line477">477: </a>{
+<a name="line478">478: </a>  PetscErrorCode    ierr;
+<a name="line479">479: </a>  PetscViewer       viewer;
+<a name="line480">480: </a>  PetscBool         flg;
+<a name="line481">481: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line482">482: </a>  PetscViewerFormat format;
+
+<a name="line485">485: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line486">486: </a>  incall = PETSC_TRUE;
+<a name="line487">487: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_error_absolute"</font>,&viewer,&format,&flg);
+<a name="line488">488: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line489">489: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line490">490: </a>    <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_ABSOLUTE,viewer);
+<a name="line491">491: </a>    PetscViewerPopFormat(viewer);
+<a name="line492">492: </a>    PetscViewerDestroy(&viewer);
+<a name="line493">493: </a>  }
+<a name="line494">494: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_error_relative"</font>,&viewer,&format,&flg);
+<a name="line495">495: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line496">496: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line497">497: </a>    <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_RELATIVE,viewer);
+<a name="line498">498: </a>    PetscViewerPopFormat(viewer);
+<a name="line499">499: </a>    PetscViewerDestroy(&viewer);
+<a name="line500">500: </a>  }
+<a name="line501">501: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_error_backward"</font>,&viewer,&format,&flg);
+<a name="line502">502: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line503">503: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line504">504: </a>    <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>(pep,PEP_ERROR_BACKWARD,viewer);
+<a name="line505">505: </a>    PetscViewerPopFormat(viewer);
+<a name="line506">506: </a>    PetscViewerDestroy(&viewer);
+<a name="line507">507: </a>  }
+<a name="line508">508: </a>  incall = PETSC_FALSE;
+<a name="line509">509: </a>  <font color="#4169E1">return</font>(0);
+<a name="line510">510: </a>}
+
+<a name="line514">514: </a><strong><font color="#4169E1"><a name="PEPValuesView_DRAW"></a>static PetscErrorCode PEPValuesView_DRAW(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line515">515: </a>{
+<a name="line517">517: </a>  PetscDraw      draw;
+<a name="line518">518: </a>  PetscDrawSP    drawsp;
+<a name="line519">519: </a>  PetscReal      re,im;
+<a name="line520">520: </a>  PetscInt       i,k;
+
+<a name="line523">523: </a>  <font color="#4169E1">if</font> (!pep->nconv) <font color="#4169E1">return</font>(0);
+<a name="line524">524: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed Eigenvalues"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
+<a name="line525">525: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
+<a name="line526">526: </a>  PetscDrawSPCreate(draw,1,&drawsp);
+<a name="line527">527: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line528">528: </a>    k = pep->perm[i];
+<a name="line529">529: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line530">530: </a>    re = PetscRealPart(pep->eigr[k]);
+<a name="line531">531: </a>    im = PetscImaginaryPart(pep->eigr[k]);
+<a name="line532">532: </a><font color="#A020F0">#else</font>
+<a name="line533">533: </a>    re = pep->eigr[k];
+<a name="line534">534: </a>    im = pep->eigi[k];
+<a name="line535">535: </a><font color="#A020F0">#endif</font>
+<a name="line536">536: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
+<a name="line537">537: </a>  }
+<a name="line538">538: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
+<a name="line539">539: </a>  PetscDrawSPSave(drawsp);
+<a name="line540">540: </a>  PetscDrawSPDestroy(&drawsp);
+<a name="line541">541: </a>  PetscViewerDestroy(&viewer);
+<a name="line542">542: </a>  <font color="#4169E1">return</font>(0);
+<a name="line543">543: </a>}
+
+<a name="line547">547: </a><strong><font color="#4169E1"><a name="PEPValuesView_ASCII"></a>static PetscErrorCode PEPValuesView_ASCII(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line548">548: </a>{
+<a name="line549">549: </a>  PetscReal      re,im;
+<a name="line550">550: </a>  PetscInt       i,k;
+
+<a name="line554">554: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Eigenvalues = \n"</font>);
+<a name="line555">555: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line556">556: </a>    k = pep->perm[i];
+<a name="line557">557: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line558">558: </a>    re = PetscRealPart(pep->eigr[k]);
+<a name="line559">559: </a>    im = PetscImaginaryPart(pep->eigr[k]);
+<a name="line560">560: </a><font color="#A020F0">#else</font>
+<a name="line561">561: </a>    re = pep->eigr[k];
+<a name="line562">562: </a>    im = pep->eigi[k];
+<a name="line563">563: </a><font color="#A020F0">#endif</font>
+<a name="line564">564: </a>    <font color="#4169E1">if</font> (PetscAbs(re)/PetscAbs(im)<PETSC_SMALL) re = 0.0;
+<a name="line565">565: </a>    <font color="#4169E1">if</font> (PetscAbs(im)/PetscAbs(re)<PETSC_SMALL) im = 0.0;
+<a name="line566">566: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line567">567: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f%+.5fi\n"</font>,(double)re,(double)im);
+<a name="line568">568: </a>    } <font color="#4169E1">else</font> {
+<a name="line569">569: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)re);
+<a name="line570">570: </a>    }
+<a name="line571">571: </a>  }
+<a name="line572">572: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line573">573: </a>  <font color="#4169E1">return</font>(0);
+<a name="line574">574: </a>}
+
+<a name="line578">578: </a><strong><font color="#4169E1"><a name="PEPValuesView_MATLAB"></a>static PetscErrorCode PEPValuesView_MATLAB(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line579">579: </a>{
+<a name="line581">581: </a>  PetscInt       i,k;
+<a name="line582">582: </a>  PetscReal      re,im;
+<a name="line583">583: </a>  const char     *name;
+
+<a name="line586">586: </a>  PetscObjectGetName((PetscObject)pep,&name);
+<a name="line587">587: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Lambda_%s = [\n"</font>,name);
+<a name="line588">588: </a>  <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line589">589: </a>    k = pep->perm[i];
+<a name="line590">590: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line591">591: </a>    re = PetscRealPart(pep->eigr[k]);
+<a name="line592">592: </a>    im = PetscImaginaryPart(pep->eigr[k]);
+<a name="line593">593: </a><font color="#A020F0">#else</font>
+<a name="line594">594: </a>    re = pep->eigr[k];
+<a name="line595">595: </a>    im = pep->eigi[k];
+<a name="line596">596: </a><font color="#A020F0">#endif</font>
+<a name="line597">597: </a>    <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line598">598: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei\n"</font>,(double)re,(double)im);
+<a name="line599">599: </a>    } <font color="#4169E1">else</font> {
+<a name="line600">600: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)re);
+<a name="line601">601: </a>    }
+<a name="line602">602: </a>  }
+<a name="line603">603: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line604">604: </a>  <font color="#4169E1">return</font>(0);
+<a name="line605">605: </a>}
+
+<a name="line609">609: </a><font color="#B22222">/*@C</font>
+<a name="line610">610: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a> - Displays the computed eigenvalues in a viewer.</font>
+
+<a name="line612">612: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line614">614: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line615">615: </a><font color="#B22222">+  pep    - the eigensolver context</font>
+<a name="line616">616: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line618">618: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line619">619: </a><font color="#B22222">.  -pep_view_values - print computed eigenvalues</font>
+
+<a name="line621">621: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line623">623: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(), <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>()</font>
+<a name="line624">624: </a><font color="#B22222">@*/</font>
+<a name="line625">625: </a><strong><font color="#4169E1"><a name="PEPValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line626">626: </a>{
+<a name="line627">627: </a>  PetscBool         isascii,isdraw;
+<a name="line628">628: </a>  PetscViewerFormat format;
+<a name="line629">629: </a>  PetscErrorCode    ierr;
+
+<a name="line633">633: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
+<a name="line636">636: </a>  PEPCheckSolved(pep,1);
+<a name="line637">637: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
+<a name="line638">638: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line639">639: </a>  <font color="#4169E1">if</font> (isdraw) {
+<a name="line640">640: </a>    PEPValuesView_DRAW(pep,viewer);
+<a name="line641">641: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
+<a name="line642">642: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line643">643: </a>    <font color="#4169E1">switch</font> (format) {
+<a name="line644">644: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line645">645: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line646">646: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line647">647: </a>        PEPValuesView_ASCII(pep,viewer);
+<a name="line648">648: </a>        <font color="#4169E1">break</font>;
+<a name="line649">649: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line650">650: </a>        PEPValuesView_MATLAB(pep,viewer);
+<a name="line651">651: </a>        <font color="#4169E1">break</font>;
+<a name="line652">652: </a><strong><font color="#FF0000">      default:</font></strong>
+<a name="line653">653: </a>        PetscInfo1(pep,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line654">654: </a>    }
+<a name="line655">655: </a>  }
+<a name="line656">656: </a>  <font color="#4169E1">return</font>(0);
+<a name="line657">657: </a>}
+
+<a name="line661">661: </a><font color="#B22222">/*@</font>
+<a name="line662">662: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line663">663: </a><font color="#B22222">   the computed eigenvalues are to be viewed. </font>
+
+<a name="line665">665: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line667">667: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line668">668: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line670">670: </a><font color="#B22222">   Level: developer</font>
+<a name="line671">671: </a><font color="#B22222">@*/</font>
+<a name="line672">672: </a><strong><font color="#4169E1"><a name="PEPValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPValuesViewFromOptions.html#PEPValuesViewFromOptions">PEPValuesViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line673">673: </a>{
+<a name="line674">674: </a>  PetscErrorCode    ierr;
+<a name="line675">675: </a>  PetscViewer       viewer;
+<a name="line676">676: </a>  PetscBool         flg;
+<a name="line677">677: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line678">678: </a>  PetscViewerFormat format;
+
+<a name="line681">681: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line682">682: </a>  incall = PETSC_TRUE;
+<a name="line683">683: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_view_values"</font>,&viewer,&format,&flg);
+<a name="line684">684: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line685">685: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line686">686: </a>    <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(pep,viewer);
+<a name="line687">687: </a>    PetscViewerPopFormat(viewer);
+<a name="line688">688: </a>    PetscViewerDestroy(&viewer);
+<a name="line689">689: </a>  }
+<a name="line690">690: </a>  incall = PETSC_FALSE;
+<a name="line691">691: </a>  <font color="#4169E1">return</font>(0);
+<a name="line692">692: </a>}
+
+<a name="line696">696: </a><font color="#B22222">/*@C</font>
+<a name="line697">697: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a> - Outputs computed eigenvectors to a viewer.</font>
+
+<a name="line699">699: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line701">701: </a><font color="#B22222">   Parameter:</font>
+<a name="line702">702: </a><font color="#B22222">+  pep    - the eigensolver context</font>
+<a name="line703">703: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line705">705: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line706">706: </a><font color="#B22222">.  -pep_view_vectors - output eigenvectors.</font>
+
+<a name="line708">708: </a><font color="#B22222">   Note:</font>
+<a name="line709">709: </a><font color="#B22222">   If PETSc was configured with real scalars, complex conjugate eigenvectors</font>
+<a name="line710">710: </a><font color="#B22222">   will be viewed as two separate real vectors, one containing the real part</font>
+<a name="line711">711: </a><font color="#B22222">   and another one containing the imaginary part.</font>
+
+<a name="line713">713: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line715">715: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/PEP/PEPSolve.html#PEPSolve">PEPSolve</a>(), <a href="../../../docs/manualpages/PEP/PEPValuesView.html#PEPValuesView">PEPValuesView</a>(), <a href="../../../docs/manualpages/PEP/PEPErrorView.html#PEPErrorView">PEPErrorView</a>()</font>
+<a name="line716">716: </a><font color="#B22222">@*/</font>
+<a name="line717">717: </a><strong><font color="#4169E1"><a name="PEPVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep,PetscViewer viewer)</font></strong>
+<a name="line718">718: </a>{
+<a name="line720">720: </a>  PetscInt       i,k;
+<a name="line721">721: </a>  Vec            x;
+<a name="line722">722: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
+<a name="line723">723: </a>  char           vname[NMLEN];
+<a name="line724">724: </a>  const char     *ename;
+
+<a name="line728">728: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)pep));
+<a name="line731">731: </a>  PEPCheckSolved(pep,1);
+<a name="line732">732: </a>  <font color="#4169E1">if</font> (pep->nconv) {
+<a name="line733">733: </a>    PetscObjectGetName((PetscObject)pep,&ename);
+<a name="line734">734: </a>    PEPComputeVectors(pep);
+<a name="line735">735: </a>    <font color="#4169E1">for</font> (i=0;i<pep->nconv;i++) {
+<a name="line736">736: </a>      k = pep->perm[i];
+<a name="line737">737: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,(int)i,ename);
+<a name="line738">738: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(pep->V,k,&x);
+<a name="line739">739: </a>      PetscObjectSetName((PetscObject)x,vname);
+<a name="line740">740: </a>      VecView(x,viewer);
+<a name="line741">741: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(pep->V,k,&x);
+<a name="line742">742: </a>    }
+<a name="line743">743: </a>  }
+<a name="line744">744: </a>  <font color="#4169E1">return</font>(0);
+<a name="line745">745: </a>}
+
+<a name="line749">749: </a><font color="#B22222">/*@</font>
+<a name="line750">750: </a><font color="#B22222">   <a href="../../../docs/manualpages/PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line751">751: </a><font color="#B22222">   the computed eigenvectors are to be viewed. </font>
+
+<a name="line753">753: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
+
+<a name="line755">755: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line756">756: </a><font color="#B22222">.  pep - the eigensolver context</font>
+
+<a name="line758">758: </a><font color="#B22222">   Level: developer</font>
+<a name="line759">759: </a><font color="#B22222">@*/</font>
+<a name="line760">760: </a><strong><font color="#4169E1"><a name="PEPVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/PEP/PEPVectorsViewFromOptions.html#PEPVectorsViewFromOptions">PEPVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> pep)</font></strong>
+<a name="line761">761: </a>{
+<a name="line762">762: </a>  PetscErrorCode    ierr;
+<a name="line763">763: </a>  PetscViewer       viewer;
+<a name="line764">764: </a>  PetscBool         flg = PETSC_FALSE;
+<a name="line765">765: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line766">766: </a>  PetscViewerFormat format;
+
+<a name="line769">769: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line770">770: </a>  incall = PETSC_TRUE;
+<a name="line771">771: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)pep),((PetscObject)pep)->prefix,<font color="#666666">"-pep_view_vectors"</font>,&viewer,&format,&flg);
+<a name="line772">772: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line773">773: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line774">774: </a>    <a href="../../../docs/manualpages/PEP/PEPVectorsView.html#PEPVectorsView">PEPVectorsView</a>(pep,viewer);
+<a name="line775">775: </a>    PetscViewerPopFormat(viewer);
+<a name="line776">776: </a>    PetscViewerDestroy(&viewer);
+<a name="line777">777: </a>  }
+<a name="line778">778: </a>  incall = PETSC_FALSE;
+<a name="line779">779: </a>  <font color="#4169E1">return</font>(0);
+<a name="line780">780: </a>}
 
 </pre>
 </body>
diff --git a/src/pep/makefile b/src/pep/makefile
index 2456228..29f7221 100644
--- a/src/pep/makefile
+++ b/src/pep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/pep/makefile.html b/src/pep/makefile.html
index 6fa4e1a..caea21d 100644
--- a/src/pep/makefile.html
+++ b/src/pep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/pep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:45+00:00">
+<meta name="date" content="2016-05-16T10:33:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/pep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/pep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/examples/index.html b/src/svd/examples/index.html
index eeaea1b..08ef38b 100644
--- a/src/svd/examples/index.html
+++ b/src/svd/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
 <a href="tutorials/">tutorials/</a><br>
diff --git a/src/svd/examples/makefile b/src/svd/examples/makefile
index 24f77b4..8e11575 100644
--- a/src/svd/examples/makefile
+++ b/src/svd/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/examples/makefile.html b/src/svd/examples/makefile.html
index d00ecc3..20f45c0 100644
--- a/src/svd/examples/makefile.html
+++ b/src/svd/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/examples/tests/index.html b/src/svd/examples/tests/index.html
index 3941fe1..637be46 100644
--- a/src/svd/examples/tests/index.html
+++ b/src/svd/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/examples/tests/makefile b/src/svd/examples/tests/makefile
index a53a664..3ceef75 100644
--- a/src/svd/examples/tests/makefile
+++ b/src/svd/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -55,11 +55,11 @@ EPS = krylovschur arnoldi lanczos gd jd
 runtest1_1:
 	- at touch test1_1.tmp; \
 	for svd in ${SVDEPS} ${SVD}; do \
-	   ${MPIEXEC} -np 1 ./test1 -type $$svd >> test1_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./test1 -type $$svd >> test1_1.tmp 2>&1; \
 	done; \
 	for svd in ${SVDEPS}; do \
 	   for eps in ${EPS}; do \
-	      ${MPIEXEC} -np 1 ./test1 -type $$svd -epstype $$eps >> test1_1.tmp 2>&1; \
+	      ${MPIEXEC} -n 1 ./test1 -type $$svd -epstype $$eps >> test1_1.tmp 2>&1; \
            done; \
 	done; \
 	if (${DIFF} output/test1_1.out test1_1.tmp) then true; \
@@ -70,7 +70,7 @@ runtest2_1:
 	- at touch test2_1.tmp; \
 	for svd in ${SVDEPS} ${SVD}; do \
 	   echo "svd type $$svd" >> test2_1.tmp; \
-	   ${MPIEXEC} -np 1 ./test2 -svd_type $$svd -svd_nsv 7 >> test2_1.tmp 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test2 -svd_type $$svd -svd_nsv 7 >> test2_1.tmp 2>&1;    \
 	done; \
 	if (${GREP} USE_COMPLEX ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
 	  [ x${SAVE_OUTPUT} = xyes ] && cp test2_1.tmp output/test2_1_complex.out; \
@@ -87,8 +87,12 @@ runtest3_1:
 	- at touch test3_1.tmp; \
 	for svd in ${SVDEPS} ${SVD}; do \
 	   echo "svd type $$svd" >> test3_1.tmp; \
-	   ${MPIEXEC} -np 1 ./test3 -svd_type $$svd -svd_nsv 4 >> test3_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./test3 -svd_type $$svd -svd_nsv 4 >> test3_1.tmp 2>&1; \
 	done; \
+	echo "svd type lanczos one-sided" >> test3_1.tmp; \
+	${MPIEXEC} -n 1 ./test3 -svd_type $$svd -svd_nsv 4 -svd_type lanczos -svd_lanczos_oneside >> test3_1.tmp 2>&1; \
+	echo "svd type trlanczos one-sided" >> test3_1.tmp; \
+	${MPIEXEC} -n 1 ./test3 -svd_type $$svd -svd_nsv 4 -svd_type trlanczos -svd_trlanczos_oneside >> test3_1.tmp 2>&1; \
 	[ x${SAVE_OUTPUT} = xyes ] && cp test3_1.tmp output/test3_1.out; \
 	if (${DIFF} output/test3_1.out test3_1.tmp) then true; \
 	else echo "Possible problem with test3_1, diffs above"; fi; \
diff --git a/src/svd/examples/tests/makefile.html b/src/svd/examples/tests/makefile.html
index 3612334..0b985b4 100644
--- a/src/svd/examples/tests/makefile.html
+++ b/src/svd/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -66,11 +66,11 @@ SVDEPS = cross cyclic
 <strong><font color="#FF0000">runtest1_1:</font></strong>
 	- at touch test1_1.tmp; \
 	<font color="#4169E1">for</font> svd in ${SVDEPS} ${<a href="ROOT/docs/manualpages/SVD/SVD.html#SVD">SVD</a>}; <font color="#4169E1">do</font> \
-	   ${MPIEXEC} -np 1 ./test1 -type $$svd >> test1_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./test1 -type $$svd >> test1_1.tmp 2>&1; \
 	done; \
 	<font color="#4169E1">for</font> svd in ${SVDEPS}; <font color="#4169E1">do</font> \
 	   <font color="#4169E1">for</font> eps in ${<a href="ROOT/docs/manualpages/EPS/EPS.html#EPS">EPS</a>}; <font color="#4169E1">do</font> \
-	      ${MPIEXEC} -np 1 ./test1 -type $$svd -epstype $$eps >> test1_1.tmp 2>&1; \
+	      ${MPIEXEC} -n 1 ./test1 -type $$svd -epstype $$eps >> test1_1.tmp 2>&1; \
            done; \
 	done; \
 	<font color="#4169E1">if</font> (${DIFF} output/test1_1.out test1_1.tmp) then true; \
@@ -81,7 +81,7 @@ SVDEPS = cross cyclic
 	- at touch test2_1.tmp; \
 	<font color="#4169E1">for</font> svd in ${SVDEPS} ${<a href="ROOT/docs/manualpages/SVD/SVD.html#SVD">SVD</a>}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"svd type $$svd"</font> >> test2_1.tmp; \
-	   ${MPIEXEC} -np 1 ./test2 -svd_type $$svd -svd_nsv 7 >> test2_1.tmp 2>&1;    \
+	   ${MPIEXEC} -n 1 ./test2 -svd_type $$svd -svd_nsv 7 >> test2_1.tmp 2>&1;    \
 	done; \
 	<font color="#4169E1">if</font> (${GREP} USE_COMPLEX ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
 	  [ x${SAVE_OUTPUT} = xyes ] && cp test2_1.tmp output/test2_1_complex.out; \
@@ -98,8 +98,12 @@ SVDEPS = cross cyclic
 	- at touch test3_1.tmp; \
 	<font color="#4169E1">for</font> svd in ${SVDEPS} ${<a href="ROOT/docs/manualpages/SVD/SVD.html#SVD">SVD</a>}; <font color="#4169E1">do</font> \
 	   echo <font color="#666666">"svd type $$svd"</font> >> test3_1.tmp; \
-	   ${MPIEXEC} -np 1 ./test3 -svd_type $$svd -svd_nsv 4 >> test3_1.tmp 2>&1; \
+	   ${MPIEXEC} -n 1 ./test3 -svd_type $$svd -svd_nsv 4 >> test3_1.tmp 2>&1; \
 	done; \
+	echo <font color="#666666">"svd type lanczos one-sided"</font> >> test3_1.tmp; \
+	${MPIEXEC} -n 1 ./test3 -svd_type $$svd -svd_nsv 4 -svd_type lanczos -svd_lanczos_oneside >> test3_1.tmp 2>&1; \
+	echo <font color="#666666">"svd type trlanczos one-sided"</font> >> test3_1.tmp; \
+	${MPIEXEC} -n 1 ./test3 -svd_type $$svd -svd_nsv 4 -svd_type trlanczos -svd_trlanczos_oneside >> test3_1.tmp 2>&1; \
 	[ x${SAVE_OUTPUT} = xyes ] && cp test3_1.tmp output/test3_1.out; \
 	<font color="#4169E1">if</font> (${DIFF} output/test3_1.out test3_1.tmp) then true; \
 	<font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test3_1, diffs above"</font>; fi; \
diff --git a/src/svd/examples/tests/output/test3_1.out b/src/svd/examples/tests/output/test3_1.out
index 0a5a9f7..f5a5cfd 100644
--- a/src/svd/examples/tests/output/test3_1.out
+++ b/src/svd/examples/tests/output/test3_1.out
@@ -33,3 +33,17 @@ SVD of a rectangular Grcar matrix, 35x30
  All requested singular values computed up to the required tolerance:
      3.22175, 3.21797, 3.16825, 3.15128
 
+svd type lanczos one-sided
+
+SVD of a rectangular Grcar matrix, 35x30
+
+ All requested singular values computed up to the required tolerance:
+     3.22175, 3.21797, 3.16825, 3.15128
+
+svd type trlanczos one-sided
+
+SVD of a rectangular Grcar matrix, 35x30
+
+ All requested singular values computed up to the required tolerance:
+     3.22175, 3.21797, 3.16825, 3.15128
+
diff --git a/src/svd/examples/tests/test1.c b/src/svd/examples/tests/test1.c
index 5f562dc..5bfb39e 100644
--- a/src/svd/examples/tests/test1.c
+++ b/src/svd/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -58,9 +58,9 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&N,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-type",svdtype,30,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-epstype",epstype,30,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&N,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-type",svdtype,30,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-epstype",epstype,30,&flg);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nEstimate the condition number of a Grcar matrix, n=%D",N);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSVD type: %s",svdtype);CHKERRQ(ierr);
   if (flg) {
@@ -179,6 +179,6 @@ int main(int argc,char **argv)
   ierr = SVDDestroy(&svd);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/svd/examples/tests/test1.c.html b/src/svd/examples/tests/test1.c.html
index 0fa5e32..06760e7 100644
--- a/src/svd/examples/tests/test1.c.html
+++ b/src/svd/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -67,9 +67,9 @@
 
 <a name="line59"> 59: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line61"> 61: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&N,NULL);
-<a name="line62"> 62: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-type"</font>,svdtype,30,NULL);
-<a name="line63"> 63: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-epstype"</font>,epstype,30,&flg);
+<a name="line61"> 61: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&N,NULL);
+<a name="line62"> 62: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-type"</font>,svdtype,30,NULL);
+<a name="line63"> 63: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-epstype"</font>,epstype,30,&flg);
 <a name="line64"> 64: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nEstimate the condition number of a Grcar matrix, n=%D"</font>,N);
 <a name="line65"> 65: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSVD type: %s"</font>,svdtype);
 <a name="line66"> 66: </a>  <font color="#4169E1">if</font> (flg) {
@@ -188,7 +188,7 @@
 <a name="line179">179: </a>  <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(&svd);
 <a name="line180">180: </a>  MatDestroy(&A);
 <a name="line181">181: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line182">182: </a>  <font color="#4169E1">return</font> 0;
+<a name="line182">182: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line183">183: </a>}
 
 </pre>
diff --git a/src/svd/examples/tests/test2.c b/src/svd/examples/tests/test2.c
index 5916e70..79b00ee 100644
--- a/src/svd/examples/tests/test2.c
+++ b/src/svd/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -83,6 +83,6 @@ int main(int argc,char **argv)
   ierr = SVDDestroy(&svd);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/svd/examples/tests/test2.c.html b/src/svd/examples/tests/test2.c.html
index 9162d7c..d26f67c 100644
--- a/src/svd/examples/tests/test2.c.html
+++ b/src/svd/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -92,7 +92,7 @@
 <a name="line83"> 83: </a>  <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(&svd);
 <a name="line84"> 84: </a>  MatDestroy(&A);
 <a name="line85"> 85: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line86"> 86: </a>  <font color="#4169E1">return</font> 0;
+<a name="line86"> 86: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line87"> 87: </a>}
 
 </pre>
diff --git a/src/svd/examples/tests/test3.c b/src/svd/examples/tests/test3.c
index 54f7d06..4ab621f 100644
--- a/src/svd/examples/tests/test3.c
+++ b/src/svd/examples/tests/test3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -51,8 +51,8 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&N,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&M,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&N,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&M,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSVD of a rectangular Grcar matrix, %Dx%D\n\n",N,M);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -108,6 +108,6 @@ int main(int argc,char **argv)
   ierr = SVDDestroy(&svd);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/svd/examples/tests/test3.c.html b/src/svd/examples/tests/test3.c.html
index 8f5dbf8..eafd3f5 100644
--- a/src/svd/examples/tests/test3.c.html
+++ b/src/svd/examples/tests/test3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tests/test3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -60,8 +60,8 @@
 <a name="line50"> 50: </a>  PetscScalar    value[] = { -1, 1, 1, 1, 1 };
 
 <a name="line53"> 53: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&N,NULL);
-<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&M,NULL);
+<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&N,NULL);
+<a name="line55"> 55: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&M,NULL);
 <a name="line56"> 56: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSVD of a rectangular Grcar matrix, %Dx%D\n\n"</font>,N,M);
 
 <a name="line58"> 58: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -117,7 +117,7 @@
 <a name="line108">108: </a>  <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(&svd);
 <a name="line109">109: </a>  MatDestroy(&A);
 <a name="line110">110: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line111">111: </a>  <font color="#4169E1">return</font> 0;
+<a name="line111">111: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line112">112: </a>}
 
 </pre>
diff --git a/src/svd/examples/tutorials/ex14.c b/src/svd/examples/tutorials/ex14.c
index a9e5d9a..e61f1b6 100644
--- a/src/svd/examples/tutorials/ex14.c
+++ b/src/svd/examples/tutorials/ex14.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -47,7 +47,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nSingular value problem stored in file.\n\n");CHKERRQ(ierr);
-  ierr = PetscOptionsGetString(NULL,"-file",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-file",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
   if (!flg) SETERRQ(PETSC_COMM_WORLD,1,"Must indicate a file name with the -file option");
 
 #if defined(PETSC_USE_COMPLEX)
@@ -103,7 +103,7 @@ int main(int argc,char **argv)
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /* show detailed info unless -terse option is given by user */
-  ierr = PetscOptionsHasName(NULL,"-terse",&terse);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-terse",&terse);CHKERRQ(ierr);
   if (terse) {
     ierr = SVDErrorView(svd,SVD_ERROR_RELATIVE,NULL);CHKERRQ(ierr);
   } else {
@@ -115,5 +115,5 @@ int main(int argc,char **argv)
   ierr = SVDDestroy(&svd);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/svd/examples/tutorials/ex14.c.html b/src/svd/examples/tutorials/ex14.c.html
index 65b7eb8..530fb16 100644
--- a/src/svd/examples/tutorials/ex14.c.html
+++ b/src/svd/examples/tutorials/ex14.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tutorials/ex14.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:44+00:00">
+<meta name="date" content="2016-05-16T10:33:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tutorials/ex14.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tutorials/ex14.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -56,7 +56,7 @@
 <a name="line47"> 47: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nSingular value problem stored in file.\n\n"</font>);
-<a name="line50"> 50: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-file"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
+<a name="line50"> 50: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-file"</font>,filename,PETSC_MAX_PATH_LEN,&flg);
 <a name="line51"> 51: </a>  <font color="#4169E1">if</font> (!flg) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Must indicate a file name with the -file option"</font>);
 
 <a name="line53"> 53: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
@@ -112,7 +112,7 @@
 <a name="line103">103: </a><font color="#B22222">     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */</font>
 
 <a name="line105">105: </a>  <font color="#B22222">/* show detailed info unless -terse option is given by user */</font>
-<a name="line106">106: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-terse"</font>,&terse);
+<a name="line106">106: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-terse"</font>,&terse);
 <a name="line107">107: </a>  <font color="#4169E1">if</font> (terse) {
 <a name="line108">108: </a>    <a href="../../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_RELATIVE,NULL);
 <a name="line109">109: </a>  } <font color="#4169E1">else</font> {
@@ -124,7 +124,7 @@
 <a name="line115">115: </a>  <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(&svd);
 <a name="line116">116: </a>  MatDestroy(&A);
 <a name="line117">117: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line118">118: </a>  <font color="#4169E1">return</font> 0;
+<a name="line118">118: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line119">119: </a>}
 </pre>
 </body>
diff --git a/src/svd/examples/tutorials/ex15.c b/src/svd/examples/tutorials/ex15.c
index 84e180d..1f26b24 100644
--- a/src/svd/examples/tutorials/ex15.c
+++ b/src/svd/examples/tutorials/ex15.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,8 +40,8 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-mu",&mu,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-mu",&mu,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nLauchli singular value decomposition, (%D x %D) mu=%g\n\n",n+1,n,(double)mu);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -152,5 +152,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&u);CHKERRQ(ierr);
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/svd/examples/tutorials/ex15.c.html b/src/svd/examples/tutorials/ex15.c.html
index 7ffe330..303b9d8 100644
--- a/src/svd/examples/tutorials/ex15.c.html
+++ b/src/svd/examples/tutorials/ex15.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tutorials/ex15.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:44+00:00">
+<meta name="date" content="2016-05-16T10:33:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tutorials/ex15.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tutorials/ex15.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -49,8 +49,8 @@
 
 <a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line44"> 44: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-mu"</font>,&mu,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line44"> 44: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-mu"</font>,&mu,NULL);
 <a name="line45"> 45: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nLauchli singular value decomposition, (%D x %D) mu=%g\n\n"</font>,n+1,n,(double)mu);
 
 <a name="line47"> 47: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -161,7 +161,7 @@
 <a name="line152">152: </a>  VecDestroy(&u);
 <a name="line153">153: </a>  VecDestroy(&v);
 <a name="line154">154: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line155">155: </a>  <font color="#4169E1">return</font> 0;
+<a name="line155">155: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line156">156: </a>}
 </pre>
 </body>
diff --git a/src/svd/examples/tutorials/ex15f.F b/src/svd/examples/tutorials/ex15f.F
index d3143db..ef749d3 100644
--- a/src/svd/examples/tutorials/ex15f.F
+++ b/src/svd/examples/tutorials/ex15f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n ex15f [-help] [-n <n>] [-mu <mu>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./ex15f [-help] [-n <n>] [-mu <mu>] [all SLEPc options] 
 !
 !  Description: Singular value decomposition of the Lauchli matrix. 
 !
@@ -62,9 +62,11 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       n = 100
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',n,flg,ierr)
       mu = PETSC_SQRT_MACHINE_EPSILON
-      call PetscOptionsGetReal(PETSC_NULL_CHARACTER,'-mu',mu,flg,ierr)
+      call PetscOptionsGetReal(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-mu',mu,flg,ierr)
 
       if (rank .eq. 0) then
         write(*,100) n, mu
diff --git a/src/svd/examples/tutorials/ex15f.F.html b/src/svd/examples/tutorials/ex15f.F.html
index a4b970a..9ee1860 100644
--- a/src/svd/examples/tutorials/ex15f.F.html
+++ b/src/svd/examples/tutorials/ex15f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tutorials/ex15f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:44+00:00">
+<meta name="date" content="2016-05-16T10:33:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tutorials/ex15f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tutorials/ex15f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n ex15f [-help] [-n <n>] [-mu <mu>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./ex15f [-help] [-n <n>] [-mu <mu>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Singular value decomposition of the Lauchli matrix. 
 <a name="line23"> 23: </a>!
@@ -74,125 +74,127 @@
 <a name="line62"> 62: </a>      call <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line63"> 63: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line64"> 64: </a>      n = 100
-<a name="line65"> 65: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
-<a name="line66"> 66: </a>      mu = PETSC_SQRT_MACHINE_EPSILON
-<a name="line67"> 67: </a>      call PetscOptionsGetReal(PETSC_NULL_CHARACTER,'-mu',mu,flg,ierr)
+<a name="line65"> 65: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line66"> 66: </a>     &                        '-n',n,flg,ierr)
+<a name="line67"> 67: </a>      mu = PETSC_SQRT_MACHINE_EPSILON
+<a name="line68"> 68: </a>      call PetscOptionsGetReal(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line69"> 69: </a>     &                        '-mu',mu,flg,ierr)
 
-<a name="line69"> 69: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line70"> 70: </a>        write(*,100) n, mu
-<a name="line71"> 71: </a>      endif
-<a name="line72"> 72: </a> 100  format (/'Lauchli <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>, n =',I3,', mu=',E12.4,' (Fortran)')
+<a name="line71"> 71: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line72"> 72: </a>        write(*,100) n, mu
+<a name="line73"> 73: </a>      endif
+<a name="line74"> 74: </a> 100  format (/'Lauchli <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>, n =',I3,', mu=',E12.4,' (Fortran)')
 
-<a name="line74"> 74: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line75"> 75: </a>!     Build the Lauchli matrix
 <a name="line76"> 76: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line77"> 77: </a>!     Build the Lauchli matrix
+<a name="line78"> 78: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line80"> 80: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
+<a name="line81"> 81: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n+1,n,ierr)
+<a name="line82"> 82: </a>      call MatSetFromOptions(A,ierr)
+<a name="line83"> 83: </a>      call MatSetUp(A,ierr)
+
+<a name="line85"> 85: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
+<a name="line86"> 86: </a>      one = 1.0
+<a name="line87"> 87: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
+<a name="line88"> 88: </a>        <font color="#4169E1">if</font> (i .eq. 0) then
+<a name="line89"> 89: </a>          <font color="#4169E1">do</font> j=0,n-1
+<a name="line90"> 90: </a>            call MatSetValue(A,i,j,one,INSERT_VALUES,ierr)
+<a name="line91"> 91: </a>          end <font color="#4169E1">do</font>
+<a name="line92"> 92: </a>        <font color="#4169E1">else</font>
+<a name="line93"> 93: </a>          call MatSetValue(A,i,i-1,mu,INSERT_VALUES,ierr)
+<a name="line94"> 94: </a>        end <font color="#4169E1">if</font>
+<a name="line95"> 95: </a>      enddo
+
+<a name="line97"> 97: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
+<a name="line98"> 98: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
 
-<a name="line78"> 78: </a>      call MatCreate(PETSC_COMM_WORLD,A,ierr)
-<a name="line79"> 79: </a>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n+1,n,ierr)
-<a name="line80"> 80: </a>      call MatSetFromOptions(A,ierr)
-<a name="line81"> 81: </a>      call MatSetUp(A,ierr)
-
-<a name="line83"> 83: </a>      call MatGetOwnershipRange(A,Istart,Iend,ierr)
-<a name="line84"> 84: </a>      one = 1.0
-<a name="line85"> 85: </a>      <font color="#4169E1">do</font> i=Istart,Iend-1
-<a name="line86"> 86: </a>        <font color="#4169E1">if</font> (i .eq. 0) then
-<a name="line87"> 87: </a>          <font color="#4169E1">do</font> j=0,n-1
-<a name="line88"> 88: </a>            call MatSetValue(A,i,j,one,INSERT_VALUES,ierr)
-<a name="line89"> 89: </a>          end <font color="#4169E1">do</font>
-<a name="line90"> 90: </a>        <font color="#4169E1">else</font>
-<a name="line91"> 91: </a>          call MatSetValue(A,i,i-1,mu,INSERT_VALUES,ierr)
-<a name="line92"> 92: </a>        end <font color="#4169E1">if</font>
-<a name="line93"> 93: </a>      enddo
-
-<a name="line95"> 95: </a>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)
-<a name="line96"> 96: </a>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)
-
-<a name="line98"> 98: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line99"> 99: </a>!     Create the singular value solver and display info
 <a name="line100">100: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line101">101: </a>!     Create the singular value solver and display info
+<a name="line102">102: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
-<a name="line102">102: </a>!     ** Create singular value solver context
-<a name="line103">103: </a>      call <a href="../../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>(PETSC_COMM_WORLD,svd,ierr)
+<a name="line104">104: </a>!     ** Create singular value solver context
+<a name="line105">105: </a>      call <a href="../../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>(PETSC_COMM_WORLD,svd,ierr)
 
-<a name="line105">105: </a>!     ** Set operator
-<a name="line106">106: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>(svd,A,ierr)
+<a name="line107">107: </a>!     ** Set operator
+<a name="line108">108: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>(svd,A,ierr)
 
-<a name="line108">108: </a>!     ** Use thick-restart Lanczos as <font color="#4169E1">default</font> solver
-<a name="line109">109: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,SVDTRLANCZOS,ierr)
+<a name="line110">110: </a>!     ** Use thick-restart Lanczos as <font color="#4169E1">default</font> solver
+<a name="line111">111: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,SVDTRLANCZOS,ierr)
 
-<a name="line111">111: </a>!     ** Set solver parameters at runtime
-<a name="line112">112: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>(svd,ierr)
+<a name="line113">113: </a>!     ** Set solver parameters at runtime
+<a name="line114">114: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>(svd,ierr)
 
-<a name="line114">114: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line115">115: </a>!     Solve the singular value system
 <a name="line116">116: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line117">117: </a>!     Solve the singular value system
+<a name="line118">118: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line120">120: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(svd,ierr) 
+<a name="line121">121: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</a>(svd,its,ierr)
+<a name="line122">122: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line123">123: </a>        write(*,110) its
+<a name="line124">124: </a>      endif
+<a name="line125">125: </a> 110  format (/' Number of iterations of the method:',I4)
+
+<a name="line127">127: </a>!     ** Optional: Get some information from the solver and display it
+<a name="line128">128: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a>(svd,tname,ierr)
+<a name="line129">129: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line130">130: </a>        write(*,120) tname
+<a name="line131">131: </a>      endif
+<a name="line132">132: </a> 120  format (' Solution method: ',A)
+<a name="line133">133: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>(svd,nsv,PETSC_NULL_INTEGER,                 &
+<a name="line134">134: </a>     &                      PETSC_NULL_INTEGER,ierr)
+<a name="line135">135: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line136">136: </a>        write(*,130) nsv
+<a name="line137">137: </a>      endif
+<a name="line138">138: </a> 130  format (' Number of requested singular values:',I2)
+<a name="line139">139: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>(svd,tol,maxit,ierr)
+<a name="line140">140: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line141">141: </a>        write(*,140) tol, maxit
+<a name="line142">142: </a>      endif
+<a name="line143">143: </a> 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)
 
-<a name="line118">118: </a>      call <a href="../../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(svd,ierr) 
-<a name="line119">119: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</a>(svd,its,ierr)
-<a name="line120">120: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line121">121: </a>        write(*,110) its
-<a name="line122">122: </a>      endif
-<a name="line123">123: </a> 110  format (/' Number of iterations of the method:',I4)
-
-<a name="line125">125: </a>!     ** Optional: Get some information from the solver and display it
-<a name="line126">126: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a>(svd,tname,ierr)
-<a name="line127">127: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line128">128: </a>        write(*,120) tname
-<a name="line129">129: </a>      endif
-<a name="line130">130: </a> 120  format (' Solution method: ',A)
-<a name="line131">131: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>(svd,nsv,PETSC_NULL_INTEGER,                 &
-<a name="line132">132: </a>     &                      PETSC_NULL_INTEGER,ierr)
-<a name="line133">133: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line134">134: </a>        write(*,130) nsv
-<a name="line135">135: </a>      endif
-<a name="line136">136: </a> 130  format (' Number of requested singular values:',I2)
-<a name="line137">137: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>(svd,tol,maxit,ierr)
-<a name="line138">138: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line139">139: </a>        write(*,140) tol, maxit
-<a name="line140">140: </a>      endif
-<a name="line141">141: </a> 140  format (' Stopping condition: tol=',1P,E10.4,', maxit=',I4)
-
-<a name="line143">143: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line144">144: </a>!     Display solution and clean up
 <a name="line145">145: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line147">147: </a>!     ** Get number of converged singular triplets
-<a name="line148">148: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(svd,nconv,ierr)
-<a name="line149">149: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line150">150: </a>        write(*,150) nconv
-<a name="line151">151: </a>      endif
-<a name="line152">152: </a> 150  format (' Number of converged approximate singular triplets:',I2/)
-
-<a name="line154">154: </a>!     ** Display singular values and relative errors
-<a name="line155">155: </a>      <font color="#4169E1">if</font> (nconv.gt.0) then
-<a name="line156">156: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line157">157: </a>          write(*,*) '       sigma          relative error'
-<a name="line158">158: </a>          write(*,*) ' ----------------- ------------------'
-<a name="line159">159: </a>        endif
-<a name="line160">160: </a>        <font color="#4169E1">do</font> i=0,nconv-1
-<a name="line161">161: </a>!         ** Get converged singular triplet: i-th singular value is stored in sigma
-<a name="line162">162: </a>          call <a href="../../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,sigma,PETSC_NULL_OBJECT,     &
-<a name="line163">163: </a>     &         PETSC_NULL_OBJECT,ierr)
-
-<a name="line165">165: </a>!         ** Compute the relative error associated to each eigenpair
-<a name="line166">166: </a>          call <a href="../../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,SVD_ERROR_RELATIVE,error,ierr)
-<a name="line167">167: </a>          <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line168">168: </a>            write(*,160) sigma, error
-<a name="line169">169: </a>          endif
-<a name="line170">170: </a> 160      format (1P,'   ',E12.4,'       ',E12.4)
-
-<a name="line172">172: </a>        enddo
-<a name="line173">173: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line174">174: </a>          write(*,*)
-<a name="line175">175: </a>        endif
-<a name="line176">176: </a>      endif
-
-<a name="line178">178: </a>!     ** Free work space
-<a name="line179">179: </a>      call <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(svd,ierr)
-<a name="line180">180: </a>      call MatDestroy(A,ierr)
-
-<a name="line182">182: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line183">183: </a>      end
+<a name="line146">146: </a>!     Display solution and clean up
+<a name="line147">147: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line149">149: </a>!     ** Get number of converged singular triplets
+<a name="line150">150: </a>      call <a href="../../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(svd,nconv,ierr)
+<a name="line151">151: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line152">152: </a>        write(*,150) nconv
+<a name="line153">153: </a>      endif
+<a name="line154">154: </a> 150  format (' Number of converged approximate singular triplets:',I2/)
+
+<a name="line156">156: </a>!     ** Display singular values and relative errors
+<a name="line157">157: </a>      <font color="#4169E1">if</font> (nconv.gt.0) then
+<a name="line158">158: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line159">159: </a>          write(*,*) '       sigma          relative error'
+<a name="line160">160: </a>          write(*,*) ' ----------------- ------------------'
+<a name="line161">161: </a>        endif
+<a name="line162">162: </a>        <font color="#4169E1">do</font> i=0,nconv-1
+<a name="line163">163: </a>!         ** Get converged singular triplet: i-th singular value is stored in sigma
+<a name="line164">164: </a>          call <a href="../../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,sigma,PETSC_NULL_OBJECT,     &
+<a name="line165">165: </a>     &         PETSC_NULL_OBJECT,ierr)
+
+<a name="line167">167: </a>!         ** Compute the relative error associated to each eigenpair
+<a name="line168">168: </a>          call <a href="../../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,SVD_ERROR_RELATIVE,error,ierr)
+<a name="line169">169: </a>          <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line170">170: </a>            write(*,160) sigma, error
+<a name="line171">171: </a>          endif
+<a name="line172">172: </a> 160      format (1P,'   ',E12.4,'       ',E12.4)
+
+<a name="line174">174: </a>        enddo
+<a name="line175">175: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line176">176: </a>          write(*,*)
+<a name="line177">177: </a>        endif
+<a name="line178">178: </a>      endif
+
+<a name="line180">180: </a>!     ** Free work space
+<a name="line181">181: </a>      call <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(svd,ierr)
+<a name="line182">182: </a>      call MatDestroy(A,ierr)
+
+<a name="line184">184: </a>      call <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line185">185: </a>      end
 
 </pre>
 </body>
diff --git a/src/svd/examples/tutorials/ex8.c b/src/svd/examples/tutorials/ex8.c
index bc1252b..598151e 100644
--- a/src/svd/examples/tutorials/ex8.c
+++ b/src/svd/examples/tutorials/ex8.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -55,7 +55,7 @@ int main(int argc,char **argv)
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
 
-  ierr = PetscOptionsGetInt(NULL,"-n",&N,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&N,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\nEstimate the condition number of a Grcar matrix, n=%D\n\n",N);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -156,6 +156,6 @@ int main(int argc,char **argv)
   ierr = SVDDestroy(&svd);CHKERRQ(ierr);
   ierr = MatDestroy(&A);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
diff --git a/src/svd/examples/tutorials/ex8.c.html b/src/svd/examples/tutorials/ex8.c.html
index d422ae0..286ab13 100644
--- a/src/svd/examples/tutorials/ex8.c.html
+++ b/src/svd/examples/tutorials/ex8.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tutorials/ex8.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tutorials/ex8.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tutorials/ex8.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -64,7 +64,7 @@
 
 <a name="line56"> 56: </a>  <a href="../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
 
-<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&N,NULL);
+<a name="line58"> 58: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&N,NULL);
 <a name="line59"> 59: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\nEstimate the condition number of a Grcar matrix, n=%D\n\n"</font>,N);
 
 <a name="line61"> 61: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -165,7 +165,7 @@
 <a name="line156">156: </a>  <a href="../../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(&svd);
 <a name="line157">157: </a>  MatDestroy(&A);
 <a name="line158">158: </a>  <a href="../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line159">159: </a>  <font color="#4169E1">return</font> 0;
+<a name="line159">159: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line160">160: </a>}
 
 </pre>
diff --git a/src/svd/examples/tutorials/index.html b/src/svd/examples/tutorials/index.html
index 588e13d..b242095 100644
--- a/src/svd/examples/tutorials/index.html
+++ b/src/svd/examples/tutorials/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tutorials/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/examples/tutorials/makefile b/src/svd/examples/tutorials/makefile
index 6a54815..0a5407b 100644
--- a/src/svd/examples/tutorials/makefile
+++ b/src/svd/examples/tutorials/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -54,7 +54,7 @@ ex15f: ex15f.o chkopts
 DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 
 runex8_1:
-	-@${MPIEXEC} -np 1 ./ex8 > ex8_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex8 > ex8_1.tmp 2>&1; \
 	   if (${DIFF} output/ex8_1.out ex8_1.tmp) then true; \
 	   else echo "Possible problem with ex8_1, diffs above"; fi; \
 	   ${RM} -f ex8_1.tmp
@@ -63,20 +63,20 @@ runex14_1:
 	- at if [ "${PETSC_PRECISION}" != "double" ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
            echo "Skipping ex14 test"; \
          else \
-	   ${MPIEXEC} -np 1 ./ex14 -file ${DATAPATH}/rdb200.petsc -svd_nsv 4 -terse > ex14_1.tmp 2>&1;	  \
+	   ${MPIEXEC} -n 1 ./ex14 -file ${DATAPATH}/rdb200.petsc -svd_nsv 4 -terse > ex14_1.tmp 2>&1;	  \
 	   if (${DIFF} output/ex14_1.out ex14_1.tmp) then true; \
 	   else echo "Possible problem with ex14_1, diffs above"; fi; \
 	   ${RM} -f ex14_1.tmp; \
          fi
 
 runex15_1:
-	-@${MPIEXEC} -np 1 ./ex15 > ex15_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex15 > ex15_1.tmp 2>&1; \
 	   if (${DIFF} output/ex15_1.out ex15_1.tmp) then true; \
 	   else echo "Possible problem with ex15_1, diffs above"; fi; \
 	   ${RM} -f ex15_1.tmp
 
 runex15f_1:
-	-@${MPIEXEC} -np 1 ./ex15f > ex15f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex15f > ex15f_1.tmp 2>&1; \
 	   if (${DIFF} output/ex15f_1.out ex15f_1.tmp) then true; \
 	   else echo "Possible problem with ex15f_1, diffs above"; fi; \
 	   ${RM} -f ex15f_1.tmp
diff --git a/src/svd/examples/tutorials/makefile.html b/src/svd/examples/tutorials/makefile.html
index a17bcf0..42f974d 100644
--- a/src/svd/examples/tutorials/makefile.html
+++ b/src/svd/examples/tutorials/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/examples/tutorials/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:44+00:00">
+<meta name="date" content="2016-05-16T10:33:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/examples/tutorials/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -65,7 +65,7 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 
 <strong><font color="#FF0000">runex8_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex8 > ex8_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex8 > ex8_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex8_1.out ex8_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex8_1, diffs above"</font>; fi; \
 	   ${RM} -f ex8_1.tmp
@@ -74,20 +74,20 @@ DATAPATH = ${SLEPC_DIR}/share/slepc/datafiles/matrices
 	-@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_PRECISION}"</font> != <font color="#666666">"double"</font> ] || (${GREP} USE_64BIT_INDICES ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
            echo <font color="#666666">"Skipping ex14 test"</font>; \
          <font color="#4169E1">else</font> \
-	   ${MPIEXEC} -np 1 ./ex14 -file ${DATAPATH}/rdb200.petsc -svd_nsv 4 -terse > ex14_1.tmp 2>&1;	  \
+	   ${MPIEXEC} -n 1 ./ex14 -file ${DATAPATH}/rdb200.petsc -svd_nsv 4 -terse > ex14_1.tmp 2>&1;	  \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex14_1.out ex14_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex14_1, diffs above"</font>; fi; \
 	   ${RM} -f ex14_1.tmp; \
          fi
 
 <strong><font color="#FF0000">runex15_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex15 > ex15_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex15 > ex15_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex15_1.out ex15_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex15_1, diffs above"</font>; fi; \
 	   ${RM} -f ex15_1.tmp
 
 <strong><font color="#FF0000">runex15f_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./ex15f > ex15f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./ex15f > ex15f_1.tmp 2>&1; \
 	   <font color="#4169E1">if</font> (${DIFF} output/ex15f_1.out ex15f_1.tmp) then true; \
 	   <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with ex15f_1, diffs above"</font>; fi; \
 	   ${RM} -f ex15f_1.tmp
diff --git a/src/svd/f90-mod/index.html b/src/svd/f90-mod/index.html
index c0f0711..015cf4a 100644
--- a/src/svd/f90-mod/index.html
+++ b/src/svd/f90-mod/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/f90-mod/makefile b/src/svd/f90-mod/makefile
index a0802f9..117685c 100644
--- a/src/svd/f90-mod/makefile
+++ b/src/svd/f90-mod/makefile
@@ -1,7 +1,7 @@
 
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/f90-mod/makefile.html b/src/svd/f90-mod/makefile.html
index 2e609f5..79f56d4 100644
--- a/src/svd/f90-mod/makefile.html
+++ b/src/svd/f90-mod/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/f90-mod/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:45+00:00">
+<meta name="date" content="2016-05-16T10:33:44+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80">
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/f90-mod/slepcsvdmod.F b/src/svd/f90-mod/slepcsvdmod.F
index 7c312fc..418dc98 100644
--- a/src/svd/f90-mod/slepcsvdmod.F
+++ b/src/svd/f90-mod/slepcsvdmod.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
diff --git a/src/svd/f90-mod/slepcsvdmod.F.html b/src/svd/f90-mod/slepcsvdmod.F.html
index 051838a..0be0f81 100644
--- a/src/svd/f90-mod/slepcsvdmod.F.html
+++ b/src/svd/f90-mod/slepcsvdmod.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/f90-mod/slepcsvdmod.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:44+00:00">
+<meta name="date" content="2016-05-16T10:33:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/f90-mod/slepcsvdmod.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/f90-mod/slepcsvdmod.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
diff --git a/src/svd/impls/cross/cross.c b/src/svd/impls/cross/cross.c
index 7e971c8..e71e1f6 100644
--- a/src/svd/impls/cross/cross.c
+++ b/src/svd/impls/cross/cross.c
@@ -6,7 +6,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -50,12 +50,31 @@ static PetscErrorCode MatMult_Cross(Mat B,Vec x,Vec y)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "MatCreateVecs_Cross"
+static PetscErrorCode MatCreateVecs_Cross(Mat B,Vec *right,Vec *left)
+{
+  PetscErrorCode ierr;
+  SVD            svd;
+
+  PetscFunctionBegin;
+  ierr = MatShellGetContext(B,(void**)&svd);CHKERRQ(ierr);
+  if (right) {
+    ierr = SVDMatCreateVecs(svd,right,NULL);CHKERRQ(ierr);
+    if (left) { ierr = VecDuplicate(*right,left);CHKERRQ(ierr); }
+  } else {
+    ierr = SVDMatCreateVecs(svd,left,NULL);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "MatGetDiagonal_Cross"
 static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)
 {
   PetscErrorCode    ierr;
   SVD               svd;
   SVD_CROSS         *cross;
+  PetscMPIInt       len;
   PetscInt          N,n,i,j,start,end,ncols;
   PetscScalar       *work1,*work2,*diag;
   const PetscInt    *cols;
@@ -88,7 +107,8 @@ static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)
         ierr = MatRestoreRow(svd->A,i,&ncols,&cols,&vals);CHKERRQ(ierr);
       }
     }
-    ierr = MPI_Allreduce(work1,work2,N,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)svd));CHKERRQ(ierr);
+    ierr = PetscMPIIntCast(N,&len);CHKERRQ(ierr);
+    ierr = MPI_Allreduce(work1,work2,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)svd));CHKERRQ(ierr);
     ierr = VecGetOwnershipRange(cross->diag,&start,&end);CHKERRQ(ierr);
     ierr = VecGetArray(cross->diag,&diag);CHKERRQ(ierr);
     for (i=start;i<end;i++) diag[i-start] = work2[i];
@@ -113,6 +133,7 @@ PetscErrorCode SVDSetUp_Cross(SVD svd)
     ierr = SVDMatGetLocalSize(svd,NULL,&n);CHKERRQ(ierr);
     ierr = MatCreateShell(PetscObjectComm((PetscObject)svd),n,n,PETSC_DETERMINE,PETSC_DETERMINE,svd,&cross->mat);CHKERRQ(ierr);
     ierr = MatShellSetOperation(cross->mat,MATOP_MULT,(void(*)(void))MatMult_Cross);CHKERRQ(ierr);
+    ierr = MatShellSetOperation(cross->mat,MATOP_GET_VECS,(void(*)(void))MatCreateVecs_Cross);CHKERRQ(ierr);
     ierr = MatShellSetOperation(cross->mat,MATOP_GET_DIAGONAL,(void(*)(void))MatGetDiagonal_Cross);CHKERRQ(ierr);
     ierr = SVDMatCreateVecs(svd,NULL,&cross->w);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->mat);CHKERRQ(ierr);
@@ -125,6 +146,15 @@ PetscErrorCode SVDSetUp_Cross(SVD svd)
   ierr = EPSSetWhichEigenpairs(cross->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_REAL);CHKERRQ(ierr);
   ierr = EPSSetDimensions(cross->eps,svd->nsv,svd->ncv?svd->ncv:PETSC_DEFAULT,svd->mpd?svd->mpd:PETSC_DEFAULT);CHKERRQ(ierr);
   ierr = EPSSetTolerances(cross->eps,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:svd->tol,svd->max_it?svd->max_it:PETSC_DEFAULT);CHKERRQ(ierr);
+  switch (svd->conv) {
+  case SVD_CONV_ABS:
+    ierr = EPSSetConvergenceTest(cross->eps,EPS_CONV_ABS);CHKERRQ(ierr);break;
+  case SVD_CONV_REL:
+    ierr = EPSSetConvergenceTest(cross->eps,EPS_CONV_REL);CHKERRQ(ierr);break;
+  case SVD_CONV_USER:
+    SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,"User-defined convergence test not supported in this solver");
+  }
+  if (svd->stop!=SVD_STOP_BASIC) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,"User-defined stopping test not supported in this solver");
   /* Transfer the trackall option from svd to eps */
   ierr = SVDGetTrackAll(svd,&trackall);CHKERRQ(ierr);
   ierr = EPSSetTrackAll(cross->eps,trackall);CHKERRQ(ierr);
@@ -168,8 +198,8 @@ PetscErrorCode SVDSolve_Cross(SVD svd)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "SVDMonitor_Cross"
-static PetscErrorCode SVDMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
+#define __FUNCT__ "EPSMonitor_Cross"
+static PetscErrorCode EPSMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
 {
   PetscInt       i;
   SVD            svd = (SVD)ctx;
@@ -189,7 +219,7 @@ static PetscErrorCode SVDMonitor_Cross(EPS eps,PetscInt its,PetscInt nconv,Petsc
 
 #undef __FUNCT__
 #define __FUNCT__ "SVDSetFromOptions_Cross"
-PetscErrorCode SVDSetFromOptions_Cross(PetscOptions *PetscOptionsObject,SVD svd)
+PetscErrorCode SVDSetFromOptions_Cross(PetscOptionItems *PetscOptionsObject,SVD svd)
 {
   PetscErrorCode ierr;
   SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
@@ -258,11 +288,11 @@ static PetscErrorCode SVDCrossGetEPS_Cross(SVD svd,EPS *eps)
   if (!cross->eps) {
     ierr = EPSCreate(PetscObjectComm((PetscObject)svd),&cross->eps);CHKERRQ(ierr);
     ierr = EPSSetOptionsPrefix(cross->eps,((PetscObject)svd)->prefix);CHKERRQ(ierr);
-    ierr = EPSAppendOptionsPrefix(cross->eps,"svd_");CHKERRQ(ierr);
+    ierr = EPSAppendOptionsPrefix(cross->eps,"svd_cross_");CHKERRQ(ierr);
     ierr = PetscObjectIncrementTabLevel((PetscObject)cross->eps,(PetscObject)svd,1);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->eps);CHKERRQ(ierr);
     ierr = EPSSetWhichEigenpairs(cross->eps,EPS_LARGEST_REAL);CHKERRQ(ierr);
-    ierr = EPSMonitorSet(cross->eps,SVDMonitor_Cross,svd,NULL);CHKERRQ(ierr);
+    ierr = EPSMonitorSet(cross->eps,EPSMonitor_Cross,svd,NULL);CHKERRQ(ierr);
     ierr = EPSGetST(cross->eps,&st);CHKERRQ(ierr);
     ierr = STSetMatMode(st,ST_MATMODE_SHELL);CHKERRQ(ierr);
   }
@@ -295,7 +325,7 @@ PetscErrorCode SVDCrossGetEPS(SVD svd,EPS *eps)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
   PetscValidPointer(eps,2);
-  ierr = PetscTryMethod(svd,"SVDCrossGetEPS_C",(SVD,EPS*),(svd,eps));CHKERRQ(ierr);
+  ierr = PetscUseMethod(svd,"SVDCrossGetEPS_C",(SVD,EPS*),(svd,eps));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -305,12 +335,16 @@ PetscErrorCode SVDView_Cross(SVD svd,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  if (!cross->eps) { ierr = SVDCrossGetEPS(svd,&cross->eps);CHKERRQ(ierr); }
-  ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-  ierr = EPSView(cross->eps,viewer);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!cross->eps) { ierr = SVDCrossGetEPS(svd,&cross->eps);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = EPSView(cross->eps,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/svd/impls/cross/cross.c.html b/src/svd/impls/cross/cross.c.html
index f34c78e..64412f2 100644
--- a/src/svd/impls/cross/cross.c.html
+++ b/src/svd/impls/cross/cross.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/cross/cross.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:40+00:00">
+<meta name="date" content="2016-05-16T10:33:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/cross/cross.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/cross/cross.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc singular value solver: "cross"</font>
@@ -18,7 +18,7 @@
 
 <a name="line7">  7: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line8">  8: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line11"> 11: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -57,266 +57,296 @@
 <a name="line49"> 49: </a>  <font color="#4169E1">return</font>(0);
 <a name="line50"> 50: </a>}
 
-<a name="line54"> 54: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Cross"></a>static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)</font></strong>
+<a name="line54"> 54: </a><strong><font color="#4169E1"><a name="MatCreateVecs_Cross"></a>static PetscErrorCode MatCreateVecs_Cross(Mat B,Vec *right,Vec *left)</font></strong>
 <a name="line55"> 55: </a>{
-<a name="line56"> 56: </a>  PetscErrorCode    ierr;
-<a name="line57"> 57: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>               svd;
-<a name="line58"> 58: </a>  SVD_CROSS         *cross;
-<a name="line59"> 59: </a>  PetscInt          N,n,i,j,start,end,ncols;
-<a name="line60"> 60: </a>  PetscScalar       *work1,*work2,*diag;
-<a name="line61"> 61: </a>  const PetscInt    *cols;
-<a name="line62"> 62: </a>  const PetscScalar *vals;
-
-<a name="line65"> 65: </a>  MatShellGetContext(B,(void**)&svd);
-<a name="line66"> 66: </a>  cross = (SVD_CROSS*)svd->data;
-<a name="line67"> 67: </a>  <font color="#4169E1">if</font> (!cross->diag) {
-<a name="line68"> 68: </a>    <font color="#B22222">/* compute diagonal from rows and store in cross->diag */</font>
-<a name="line69"> 69: </a>    VecDuplicate(d,&cross->diag);
-<a name="line70"> 70: </a>    SVDMatGetSize(svd,NULL,&N);
-<a name="line71"> 71: </a>    SVDMatGetLocalSize(svd,NULL,&n);
-<a name="line72"> 72: </a>    PetscMalloc2(N,&work1,N,&work2);
-<a name="line73"> 73: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) work1[i] = work2[i] = 0.0;
-<a name="line74"> 74: </a>    <font color="#4169E1">if</font> (svd->AT) {
-<a name="line75"> 75: </a>      MatGetOwnershipRange(svd->AT,&start,&end);
-<a name="line76"> 76: </a>      <font color="#4169E1">for</font> (i=start;i<end;i++) {
-<a name="line77"> 77: </a>        MatGetRow(svd->AT,i,&ncols,NULL,&vals);
-<a name="line78"> 78: </a>        <font color="#4169E1">for</font> (j=0;j<ncols;j++)
-<a name="line79"> 79: </a>          work1[i] += vals[j]*vals[j];
-<a name="line80"> 80: </a>        MatRestoreRow(svd->AT,i,&ncols,NULL,&vals);
-<a name="line81"> 81: </a>      }
-<a name="line82"> 82: </a>    } <font color="#4169E1">else</font> {
-<a name="line83"> 83: </a>      MatGetOwnershipRange(svd->A,&start,&end);
-<a name="line84"> 84: </a>      <font color="#4169E1">for</font> (i=start;i<end;i++) {
-<a name="line85"> 85: </a>        MatGetRow(svd->A,i,&ncols,&cols,&vals);
-<a name="line86"> 86: </a>        <font color="#4169E1">for</font> (j=0;j<ncols;j++)
-<a name="line87"> 87: </a>          work1[cols[j]] += vals[j]*vals[j];
-<a name="line88"> 88: </a>        MatRestoreRow(svd->A,i,&ncols,&cols,&vals);
-<a name="line89"> 89: </a>      }
-<a name="line90"> 90: </a>    }
-<a name="line91"> 91: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(work1,work2,N,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)svd));
-<a name="line92"> 92: </a>    VecGetOwnershipRange(cross->diag,&start,&end);
-<a name="line93"> 93: </a>    VecGetArray(cross->diag,&diag);
-<a name="line94"> 94: </a>    <font color="#4169E1">for</font> (i=start;i<end;i++) diag[i-start] = work2[i];
-<a name="line95"> 95: </a>    VecRestoreArray(cross->diag,&diag);
-<a name="line96"> 96: </a>    PetscFree2(work1,work2);
-<a name="line97"> 97: </a>  }
-<a name="line98"> 98: </a>  VecCopy(cross->diag,d);
-<a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);
-<a name="line100">100: </a>}
-
-<a name="line104">104: </a><strong><font color="#4169E1"><a name="SVDSetUp_Cross"></a>PetscErrorCode SVDSetUp_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line105">105: </a>{
-<a name="line107">107: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-<a name="line108">108: </a>  PetscInt       n;
-<a name="line109">109: </a>  PetscBool      trackall;
-
-<a name="line112">112: </a>  <font color="#4169E1">if</font> (!cross->mat) {
-<a name="line113">113: </a>    SVDMatGetLocalSize(svd,NULL,&n);
-<a name="line114">114: </a>    MatCreateShell(PetscObjectComm((PetscObject)svd),n,n,PETSC_DETERMINE,PETSC_DETERMINE,svd,&cross->mat);
-<a name="line115">115: </a>    MatShellSetOperation(cross->mat,MATOP_MULT,(void(*)(void))MatMult_Cross);
-<a name="line116">116: </a>    MatShellSetOperation(cross->mat,MATOP_GET_DIAGONAL,(void(*)(void))MatGetDiagonal_Cross);
-<a name="line117">117: </a>    SVDMatCreateVecs(svd,NULL,&cross->w);
-<a name="line118">118: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->mat);
-<a name="line119">119: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->w);
-<a name="line120">120: </a>  }
-
-<a name="line122">122: </a>  <font color="#4169E1">if</font> (!cross->eps) { <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&cross->eps); }
-<a name="line123">123: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(cross->eps,cross->mat,NULL);
-<a name="line124">124: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(cross->eps,EPS_HEP);
-<a name="line125">125: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cross->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_REAL);
-<a name="line126">126: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(cross->eps,svd->nsv,svd->ncv?svd->ncv:PETSC_DEFAULT,svd->mpd?svd->mpd:PETSC_DEFAULT);
-<a name="line127">127: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(cross->eps,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:svd->tol,svd->max_it?svd->max_it:PETSC_DEFAULT);
-<a name="line128">128: </a>  <font color="#B22222">/* Transfer the trackall option from svd to eps */</font>
-<a name="line129">129: </a>  <a href="../../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(svd,&trackall);
-<a name="line130">130: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(cross->eps,trackall);
-<a name="line131">131: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(cross->eps);
-<a name="line132">132: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(cross->eps,NULL,&svd->ncv,&svd->mpd);
-<a name="line133">133: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(cross->eps,NULL,&svd->max_it);
-<a name="line134">134: </a>  <font color="#4169E1">if</font> (svd->tol==PETSC_DEFAULT) svd->tol = SLEPC_DEFAULT_TOL;
-<a name="line135">135: </a>  <font color="#B22222">/* Transfer the initial space from svd to eps */</font>
-<a name="line136">136: </a>  <font color="#4169E1">if</font> (svd->nini < 0) {
-<a name="line137">137: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(cross->eps,-svd->nini,svd->IS);
-<a name="line138">138: </a>    SlepcBasisDestroy_Private(&svd->nini,&svd->IS);
-<a name="line139">139: </a>  }
-<a name="line140">140: </a>  svd->leftbasis = PETSC_FALSE;
-<a name="line141">141: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,0);
-<a name="line142">142: </a>  <font color="#4169E1">return</font>(0);
-<a name="line143">143: </a>}
-
-<a name="line147">147: </a><strong><font color="#4169E1"><a name="SVDSolve_Cross"></a>PetscErrorCode SVDSolve_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line148">148: </a>{
-<a name="line150">150: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-<a name="line151">151: </a>  PetscInt       i;
-<a name="line152">152: </a>  PetscScalar    sigma;
-<a name="line153">153: </a>  Vec            v;
-
-<a name="line156">156: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(cross->eps);
-<a name="line157">157: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(cross->eps,&svd->nconv);
-<a name="line158">158: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(cross->eps,&svd->its);
-<a name="line159">159: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(cross->eps,(<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)&svd->reason);
-<a name="line160">160: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line161">161: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->V,i,&v);
-<a name="line162">162: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(cross->eps,i,&sigma,NULL,v,NULL);
-<a name="line163">163: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->V,i,&v);
-<a name="line164">164: </a>    <font color="#4169E1">if</font> (PetscRealPart(sigma)<0.0) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"Negative eigenvalue computed by <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>"</font>);
-<a name="line165">165: </a>    svd->sigma[i] = PetscSqrtReal(PetscRealPart(sigma));
-<a name="line166">166: </a>  }
-<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
-<a name="line168">168: </a>}
-
-<a name="line172">172: </a><strong><font color="#4169E1"><a name="SVDMonitor_Cross"></a>static PetscErrorCode SVDMonitor_Cross(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
-<a name="line173">173: </a>{
-<a name="line174">174: </a>  PetscInt       i;
-<a name="line175">175: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>            svd = (<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)ctx;
-<a name="line176">176: </a>  PetscScalar    er,ei;
-
-<a name="line180">180: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(nest,svd->ncv);i++) {
-<a name="line181">181: </a>    er = eigr[i]; ei = eigi[i];
-<a name="line182">182: </a>    <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line183">183: </a>    svd->sigma[i] = PetscSqrtReal(PetscRealPart(er));
-<a name="line184">184: </a>    svd->errest[i] = errest[i];
-<a name="line185">185: </a>  }
-<a name="line186">186: </a>  SVDMonitor(svd,its,nconv,svd->sigma,svd->errest,nest);
-<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
-<a name="line188">188: </a>}
-
-<a name="line192">192: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_Cross"></a>PetscErrorCode SVDSetFromOptions_Cross(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line193">193: </a>{
-<a name="line195">195: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-
-<a name="line198">198: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> Cross Options"</font>);
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (!cross->eps) { <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&cross->eps); }
-<a name="line200">200: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(cross->eps);
-<a name="line201">201: </a>  PetscOptionsTail();
-<a name="line202">202: </a>  <font color="#4169E1">return</font>(0);
-<a name="line203">203: </a>}
-
-<a name="line207">207: </a><strong><font color="#4169E1"><a name="SVDCrossSetEPS_Cross"></a>static PetscErrorCode SVDCrossSetEPS_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line208">208: </a>{
-<a name="line210">210: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-
-<a name="line213">213: </a>  PetscObjectReference((PetscObject)eps);
-<a name="line214">214: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cross->eps);
-<a name="line215">215: </a>  cross->eps = eps;
-<a name="line216">216: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->eps);
-<a name="line217">217: </a>  svd->state = SVD_STATE_INITIAL;
-<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
-<a name="line219">219: </a>}
-
-<a name="line223">223: </a><font color="#B22222">/*@</font>
-<a name="line224">224: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a> - Associate an eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
-<a name="line225">225: </a><font color="#B22222">   singular value solver.</font>
-
-<a name="line227">227: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line229">229: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line230">230: </a><font color="#B22222">+  svd - singular value solver</font>
-<a name="line231">231: </a><font color="#B22222">-  eps - the eigensolver object</font>
-
-<a name="line233">233: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line235">235: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>()</font>
-<a name="line236">236: </a><font color="#B22222">@*/</font>
-<a name="line237">237: </a><strong><font color="#4169E1"><a name="SVDCrossSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line57"> 57: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>            svd;
+
+<a name="line60"> 60: </a>  MatShellGetContext(B,(void**)&svd);
+<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (right) {
+<a name="line62"> 62: </a>    SVDMatCreateVecs(svd,right,NULL);
+<a name="line63"> 63: </a>    <font color="#4169E1">if</font> (left) { VecDuplicate(*right,left); }
+<a name="line64"> 64: </a>  } <font color="#4169E1">else</font> {
+<a name="line65"> 65: </a>    SVDMatCreateVecs(svd,left,NULL);
+<a name="line66"> 66: </a>  }
+<a name="line67"> 67: </a>  <font color="#4169E1">return</font>(0);
+<a name="line68"> 68: </a>}
+
+<a name="line72"> 72: </a><strong><font color="#4169E1"><a name="MatGetDiagonal_Cross"></a>static PetscErrorCode MatGetDiagonal_Cross(Mat B,Vec d)</font></strong>
+<a name="line73"> 73: </a>{
+<a name="line74"> 74: </a>  PetscErrorCode    ierr;
+<a name="line75"> 75: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>               svd;
+<a name="line76"> 76: </a>  SVD_CROSS         *cross;
+<a name="line77"> 77: </a>  PetscMPIInt       len;
+<a name="line78"> 78: </a>  PetscInt          N,n,i,j,start,end,ncols;
+<a name="line79"> 79: </a>  PetscScalar       *work1,*work2,*diag;
+<a name="line80"> 80: </a>  const PetscInt    *cols;
+<a name="line81"> 81: </a>  const PetscScalar *vals;
+
+<a name="line84"> 84: </a>  MatShellGetContext(B,(void**)&svd);
+<a name="line85"> 85: </a>  cross = (SVD_CROSS*)svd->data;
+<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (!cross->diag) {
+<a name="line87"> 87: </a>    <font color="#B22222">/* compute diagonal from rows and store in cross->diag */</font>
+<a name="line88"> 88: </a>    VecDuplicate(d,&cross->diag);
+<a name="line89"> 89: </a>    SVDMatGetSize(svd,NULL,&N);
+<a name="line90"> 90: </a>    SVDMatGetLocalSize(svd,NULL,&n);
+<a name="line91"> 91: </a>    PetscMalloc2(N,&work1,N,&work2);
+<a name="line92"> 92: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) work1[i] = work2[i] = 0.0;
+<a name="line93"> 93: </a>    <font color="#4169E1">if</font> (svd->AT) {
+<a name="line94"> 94: </a>      MatGetOwnershipRange(svd->AT,&start,&end);
+<a name="line95"> 95: </a>      <font color="#4169E1">for</font> (i=start;i<end;i++) {
+<a name="line96"> 96: </a>        MatGetRow(svd->AT,i,&ncols,NULL,&vals);
+<a name="line97"> 97: </a>        <font color="#4169E1">for</font> (j=0;j<ncols;j++)
+<a name="line98"> 98: </a>          work1[i] += vals[j]*vals[j];
+<a name="line99"> 99: </a>        MatRestoreRow(svd->AT,i,&ncols,NULL,&vals);
+<a name="line100">100: </a>      }
+<a name="line101">101: </a>    } <font color="#4169E1">else</font> {
+<a name="line102">102: </a>      MatGetOwnershipRange(svd->A,&start,&end);
+<a name="line103">103: </a>      <font color="#4169E1">for</font> (i=start;i<end;i++) {
+<a name="line104">104: </a>        MatGetRow(svd->A,i,&ncols,&cols,&vals);
+<a name="line105">105: </a>        <font color="#4169E1">for</font> (j=0;j<ncols;j++)
+<a name="line106">106: </a>          work1[cols[j]] += vals[j]*vals[j];
+<a name="line107">107: </a>        MatRestoreRow(svd->A,i,&ncols,&cols,&vals);
+<a name="line108">108: </a>      }
+<a name="line109">109: </a>    }
+<a name="line110">110: </a>    PetscMPIIntCast(N,&len);
+<a name="line111">111: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(work1,work2,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)svd));
+<a name="line112">112: </a>    VecGetOwnershipRange(cross->diag,&start,&end);
+<a name="line113">113: </a>    VecGetArray(cross->diag,&diag);
+<a name="line114">114: </a>    <font color="#4169E1">for</font> (i=start;i<end;i++) diag[i-start] = work2[i];
+<a name="line115">115: </a>    VecRestoreArray(cross->diag,&diag);
+<a name="line116">116: </a>    PetscFree2(work1,work2);
+<a name="line117">117: </a>  }
+<a name="line118">118: </a>  VecCopy(cross->diag,d);
+<a name="line119">119: </a>  <font color="#4169E1">return</font>(0);
+<a name="line120">120: </a>}
+
+<a name="line124">124: </a><strong><font color="#4169E1"><a name="SVDSetUp_Cross"></a>PetscErrorCode SVDSetUp_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line125">125: </a>{
+<a name="line127">127: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+<a name="line128">128: </a>  PetscInt       n;
+<a name="line129">129: </a>  PetscBool      trackall;
+
+<a name="line132">132: </a>  <font color="#4169E1">if</font> (!cross->mat) {
+<a name="line133">133: </a>    SVDMatGetLocalSize(svd,NULL,&n);
+<a name="line134">134: </a>    MatCreateShell(PetscObjectComm((PetscObject)svd),n,n,PETSC_DETERMINE,PETSC_DETERMINE,svd,&cross->mat);
+<a name="line135">135: </a>    MatShellSetOperation(cross->mat,MATOP_MULT,(void(*)(void))MatMult_Cross);
+<a name="line136">136: </a>    MatShellSetOperation(cross->mat,MATOP_GET_VECS,(void(*)(void))MatCreateVecs_Cross);
+<a name="line137">137: </a>    MatShellSetOperation(cross->mat,MATOP_GET_DIAGONAL,(void(*)(void))MatGetDiagonal_Cross);
+<a name="line138">138: </a>    SVDMatCreateVecs(svd,NULL,&cross->w);
+<a name="line139">139: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->mat);
+<a name="line140">140: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->w);
+<a name="line141">141: </a>  }
+
+<a name="line143">143: </a>  <font color="#4169E1">if</font> (!cross->eps) { <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&cross->eps); }
+<a name="line144">144: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(cross->eps,cross->mat,NULL);
+<a name="line145">145: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(cross->eps,EPS_HEP);
+<a name="line146">146: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cross->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_REAL);
+<a name="line147">147: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(cross->eps,svd->nsv,svd->ncv?svd->ncv:PETSC_DEFAULT,svd->mpd?svd->mpd:PETSC_DEFAULT);
+<a name="line148">148: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(cross->eps,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:svd->tol,svd->max_it?svd->max_it:PETSC_DEFAULT);
+<a name="line149">149: </a>  <font color="#4169E1">switch</font> (svd->conv) {
+<a name="line150">150: </a>  <font color="#4169E1">case</font> SVD_CONV_ABS:
+<a name="line151">151: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(cross->eps,EPS_CONV_ABS);<font color="#4169E1">break</font>;
+<a name="line152">152: </a>  <font color="#4169E1">case</font> SVD_CONV_REL:
+<a name="line153">153: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(cross->eps,EPS_CONV_REL);<font color="#4169E1">break</font>;
+<a name="line154">154: </a>  <font color="#4169E1">case</font> SVD_CONV_USER:
+<a name="line155">155: </a>    SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"User-defined convergence test not supported in this solver"</font>);
+<a name="line156">156: </a>  }
+<a name="line157">157: </a>  <font color="#4169E1">if</font> (svd->stop!=SVD_STOP_BASIC) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"User-defined stopping test not supported in this solver"</font>);
+<a name="line158">158: </a>  <font color="#B22222">/* Transfer the trackall option from svd to eps */</font>
+<a name="line159">159: </a>  <a href="../../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(svd,&trackall);
+<a name="line160">160: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(cross->eps,trackall);
+<a name="line161">161: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(cross->eps);
+<a name="line162">162: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(cross->eps,NULL,&svd->ncv,&svd->mpd);
+<a name="line163">163: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(cross->eps,NULL,&svd->max_it);
+<a name="line164">164: </a>  <font color="#4169E1">if</font> (svd->tol==PETSC_DEFAULT) svd->tol = SLEPC_DEFAULT_TOL;
+<a name="line165">165: </a>  <font color="#B22222">/* Transfer the initial space from svd to eps */</font>
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (svd->nini < 0) {
+<a name="line167">167: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(cross->eps,-svd->nini,svd->IS);
+<a name="line168">168: </a>    SlepcBasisDestroy_Private(&svd->nini,&svd->IS);
+<a name="line169">169: </a>  }
+<a name="line170">170: </a>  svd->leftbasis = PETSC_FALSE;
+<a name="line171">171: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,0);
+<a name="line172">172: </a>  <font color="#4169E1">return</font>(0);
+<a name="line173">173: </a>}
+
+<a name="line177">177: </a><strong><font color="#4169E1"><a name="SVDSolve_Cross"></a>PetscErrorCode SVDSolve_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line178">178: </a>{
+<a name="line180">180: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+<a name="line181">181: </a>  PetscInt       i;
+<a name="line182">182: </a>  PetscScalar    sigma;
+<a name="line183">183: </a>  Vec            v;
+
+<a name="line186">186: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(cross->eps);
+<a name="line187">187: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(cross->eps,&svd->nconv);
+<a name="line188">188: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(cross->eps,&svd->its);
+<a name="line189">189: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(cross->eps,(<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)&svd->reason);
+<a name="line190">190: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line191">191: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->V,i,&v);
+<a name="line192">192: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(cross->eps,i,&sigma,NULL,v,NULL);
+<a name="line193">193: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->V,i,&v);
+<a name="line194">194: </a>    <font color="#4169E1">if</font> (PetscRealPart(sigma)<0.0) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"Negative eigenvalue computed by <a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>"</font>);
+<a name="line195">195: </a>    svd->sigma[i] = PetscSqrtReal(PetscRealPart(sigma));
+<a name="line196">196: </a>  }
+<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
+<a name="line198">198: </a>}
+
+<a name="line202">202: </a><strong><font color="#4169E1"><a name="EPSMonitor_Cross"></a>static PetscErrorCode EPSMonitor_Cross(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line203">203: </a>{
+<a name="line204">204: </a>  PetscInt       i;
+<a name="line205">205: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>            svd = (<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)ctx;
+<a name="line206">206: </a>  PetscScalar    er,ei;
+
+<a name="line210">210: </a>  <font color="#4169E1">for</font> (i=0;i<PetscMin(nest,svd->ncv);i++) {
+<a name="line211">211: </a>    er = eigr[i]; ei = eigi[i];
+<a name="line212">212: </a>    <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
+<a name="line213">213: </a>    svd->sigma[i] = PetscSqrtReal(PetscRealPart(er));
+<a name="line214">214: </a>    svd->errest[i] = errest[i];
+<a name="line215">215: </a>  }
+<a name="line216">216: </a>  SVDMonitor(svd,its,nconv,svd->sigma,svd->errest,nest);
+<a name="line217">217: </a>  <font color="#4169E1">return</font>(0);
+<a name="line218">218: </a>}
+
+<a name="line222">222: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_Cross"></a>PetscErrorCode SVDSetFromOptions_Cross(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line223">223: </a>{
+<a name="line225">225: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+
+<a name="line228">228: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> Cross Options"</font>);
+<a name="line229">229: </a>  <font color="#4169E1">if</font> (!cross->eps) { <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&cross->eps); }
+<a name="line230">230: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(cross->eps);
+<a name="line231">231: </a>  PetscOptionsTail();
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a>}
+
+<a name="line237">237: </a><strong><font color="#4169E1"><a name="SVDCrossSetEPS_Cross"></a>static PetscErrorCode SVDCrossSetEPS_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
 <a name="line238">238: </a>{
-
-<a name="line245">245: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCrossSetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(svd,eps));
-<a name="line246">246: </a>  <font color="#4169E1">return</font>(0);
-<a name="line247">247: </a>}
-
-<a name="line251">251: </a><strong><font color="#4169E1"><a name="SVDCrossGetEPS_Cross"></a>static PetscErrorCode SVDCrossGetEPS_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line252">252: </a>{
-<a name="line253">253: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-<a name="line254">254: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-
-<a name="line258">258: </a>  <font color="#4169E1">if</font> (!cross->eps) {
-<a name="line259">259: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)svd),&cross->eps);
-<a name="line260">260: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(cross->eps,((PetscObject)svd)->prefix);
-<a name="line261">261: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(cross->eps,<font color="#666666">"svd_"</font>);
-<a name="line262">262: </a>    PetscObjectIncrementTabLevel((PetscObject)cross->eps,(PetscObject)svd,1);
-<a name="line263">263: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->eps);
-<a name="line264">264: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cross->eps,EPS_LARGEST_REAL);
-<a name="line265">265: </a>    <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(cross->eps,SVDMonitor_Cross,svd,NULL);
-<a name="line266">266: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(cross->eps,&st);
-<a name="line267">267: </a>    <a href="../../../../docs/manualpages/ST/STSetMatMode.html#STSetMatMode">STSetMatMode</a>(st,ST_MATMODE_SHELL);
-<a name="line268">268: </a>  }
-<a name="line269">269: </a>  *eps = cross->eps;
-<a name="line270">270: </a>  <font color="#4169E1">return</font>(0);
-<a name="line271">271: </a>}
-
-<a name="line275">275: </a><font color="#B22222">/*@</font>
-<a name="line276">276: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a> - Retrieve the eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
-<a name="line277">277: </a><font color="#B22222">   to the singular value solver.</font>
-
-<a name="line279">279: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line281">281: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line282">282: </a><font color="#B22222">.  svd - singular value solver</font>
-
-<a name="line284">284: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line285">285: </a><font color="#B22222">.  eps - the eigensolver object</font>
-
-<a name="line287">287: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line289">289: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a>()</font>
-<a name="line290">290: </a><font color="#B22222">@*/</font>
-<a name="line291">291: </a><strong><font color="#4169E1"><a name="SVDCrossGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line292">292: </a>{
-
-<a name="line298">298: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCrossGetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(svd,eps));
-<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
-<a name="line300">300: </a>}
-
-<a name="line304">304: </a><strong><font color="#4169E1"><a name="SVDView_Cross"></a>PetscErrorCode SVDView_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line305">305: </a>{
-<a name="line307">307: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-
-<a name="line310">310: </a>  <font color="#4169E1">if</font> (!cross->eps) { <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&cross->eps); }
-<a name="line311">311: </a>  PetscViewerASCIIPushTab(viewer);
-<a name="line312">312: </a>  <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(cross->eps,viewer);
-<a name="line313">313: </a>  PetscViewerASCIIPopTab(viewer);
-<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
-<a name="line315">315: </a>}
-
-<a name="line319">319: </a><strong><font color="#4169E1"><a name="SVDReset_Cross"></a>PetscErrorCode SVDReset_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line320">320: </a>{
-<a name="line322">322: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-
-<a name="line325">325: </a>  <font color="#4169E1">if</font> (cross->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(cross->eps); }
-<a name="line326">326: </a>  MatDestroy(&cross->mat);
-<a name="line327">327: </a>  VecDestroy(&cross->w);
-<a name="line328">328: </a>  VecDestroy(&cross->diag);
+<a name="line240">240: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+
+<a name="line243">243: </a>  PetscObjectReference((PetscObject)eps);
+<a name="line244">244: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cross->eps);
+<a name="line245">245: </a>  cross->eps = eps;
+<a name="line246">246: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->eps);
+<a name="line247">247: </a>  svd->state = SVD_STATE_INITIAL;
+<a name="line248">248: </a>  <font color="#4169E1">return</font>(0);
+<a name="line249">249: </a>}
+
+<a name="line253">253: </a><font color="#B22222">/*@</font>
+<a name="line254">254: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a> - Associate an eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
+<a name="line255">255: </a><font color="#B22222">   singular value solver.</font>
+
+<a name="line257">257: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line259">259: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line260">260: </a><font color="#B22222">+  svd - singular value solver</font>
+<a name="line261">261: </a><font color="#B22222">-  eps - the eigensolver object</font>
+
+<a name="line263">263: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line265">265: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>()</font>
+<a name="line266">266: </a><font color="#B22222">@*/</font>
+<a name="line267">267: </a><strong><font color="#4169E1"><a name="SVDCrossSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line268">268: </a>{
+
+<a name="line275">275: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCrossSetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(svd,eps));
+<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
+<a name="line277">277: </a>}
+
+<a name="line281">281: </a><strong><font color="#4169E1"><a name="SVDCrossGetEPS_Cross"></a>static PetscErrorCode SVDCrossGetEPS_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line282">282: </a>{
+<a name="line283">283: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+<a name="line284">284: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line288">288: </a>  <font color="#4169E1">if</font> (!cross->eps) {
+<a name="line289">289: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)svd),&cross->eps);
+<a name="line290">290: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(cross->eps,((PetscObject)svd)->prefix);
+<a name="line291">291: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(cross->eps,<font color="#666666">"svd_cross_"</font>);
+<a name="line292">292: </a>    PetscObjectIncrementTabLevel((PetscObject)cross->eps,(PetscObject)svd,1);
+<a name="line293">293: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cross->eps);
+<a name="line294">294: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cross->eps,EPS_LARGEST_REAL);
+<a name="line295">295: </a>    <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(cross->eps,EPSMonitor_Cross,svd,NULL);
+<a name="line296">296: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(cross->eps,&st);
+<a name="line297">297: </a>    <a href="../../../../docs/manualpages/ST/STSetMatMode.html#STSetMatMode">STSetMatMode</a>(st,ST_MATMODE_SHELL);
+<a name="line298">298: </a>  }
+<a name="line299">299: </a>  *eps = cross->eps;
+<a name="line300">300: </a>  <font color="#4169E1">return</font>(0);
+<a name="line301">301: </a>}
+
+<a name="line305">305: </a><font color="#B22222">/*@</font>
+<a name="line306">306: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a> - Retrieve the eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
+<a name="line307">307: </a><font color="#B22222">   to the singular value solver.</font>
+
+<a name="line309">309: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line311">311: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line312">312: </a><font color="#B22222">.  svd - singular value solver</font>
+
+<a name="line314">314: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line315">315: </a><font color="#B22222">.  eps - the eigensolver object</font>
+
+<a name="line317">317: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line319">319: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCrossSetEPS.html#SVDCrossSetEPS">SVDCrossSetEPS</a>()</font>
+<a name="line320">320: </a><font color="#B22222">@*/</font>
+<a name="line321">321: </a><strong><font color="#4169E1"><a name="SVDCrossGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line322">322: </a>{
+
+<a name="line328">328: </a>  PetscUseMethod(svd,<font color="#666666">"SVDCrossGetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(svd,eps));
 <a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
 <a name="line330">330: </a>}
 
-<a name="line334">334: </a><strong><font color="#4169E1"><a name="SVDDestroy_Cross"></a>PetscErrorCode SVDDestroy_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line334">334: </a><strong><font color="#4169E1"><a name="SVDView_Cross"></a>PetscErrorCode SVDView_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
 <a name="line335">335: </a>{
 <a name="line337">337: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
-
-<a name="line340">340: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cross->eps);
-<a name="line341">341: </a>  PetscFree(svd->data);
-<a name="line342">342: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossSetEPS_C"</font>,NULL);
-<a name="line343">343: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossGetEPS_C"</font>,NULL);
-<a name="line344">344: </a>  <font color="#4169E1">return</font>(0);
-<a name="line345">345: </a>}
-
-<a name="line349">349: </a><strong><font color="#4169E1"><a name="SVDCreate_Cross"></a>PETSC_EXTERN PetscErrorCode SVDCreate_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line350">350: </a>{
-<a name="line352">352: </a>  SVD_CROSS      *cross;
-
-<a name="line355">355: </a>  PetscNewLog(svd,&cross);
-<a name="line356">356: </a>  svd->data = (void*)cross;
-
-<a name="line358">358: </a>  svd->ops->solve          = SVDSolve_Cross;
-<a name="line359">359: </a>  svd->ops->setup          = SVDSetUp_Cross;
-<a name="line360">360: </a>  svd->ops->setfromoptions = SVDSetFromOptions_Cross;
-<a name="line361">361: </a>  svd->ops->destroy        = SVDDestroy_Cross;
-<a name="line362">362: </a>  svd->ops->reset          = SVDReset_Cross;
-<a name="line363">363: </a>  svd->ops->view           = SVDView_Cross;
-<a name="line364">364: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossSetEPS_C"</font>,SVDCrossSetEPS_Cross);
-<a name="line365">365: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossGetEPS_C"</font>,SVDCrossGetEPS_Cross);
-<a name="line366">366: </a>  <font color="#4169E1">return</font>(0);
-<a name="line367">367: </a>}
+<a name="line338">338: </a>  PetscBool      isascii;
+
+<a name="line341">341: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line342">342: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line343">343: </a>    <font color="#4169E1">if</font> (!cross->eps) { <a href="../../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&cross->eps); }
+<a name="line344">344: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line345">345: </a>    <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(cross->eps,viewer);
+<a name="line346">346: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line347">347: </a>  }
+<a name="line348">348: </a>  <font color="#4169E1">return</font>(0);
+<a name="line349">349: </a>}
+
+<a name="line353">353: </a><strong><font color="#4169E1"><a name="SVDReset_Cross"></a>PetscErrorCode SVDReset_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line354">354: </a>{
+<a name="line356">356: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+
+<a name="line359">359: </a>  <font color="#4169E1">if</font> (cross->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(cross->eps); }
+<a name="line360">360: </a>  MatDestroy(&cross->mat);
+<a name="line361">361: </a>  VecDestroy(&cross->w);
+<a name="line362">362: </a>  VecDestroy(&cross->diag);
+<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
+<a name="line364">364: </a>}
+
+<a name="line368">368: </a><strong><font color="#4169E1"><a name="SVDDestroy_Cross"></a>PetscErrorCode SVDDestroy_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line369">369: </a>{
+<a name="line371">371: </a>  SVD_CROSS      *cross = (SVD_CROSS*)svd->data;
+
+<a name="line374">374: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cross->eps);
+<a name="line375">375: </a>  PetscFree(svd->data);
+<a name="line376">376: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossSetEPS_C"</font>,NULL);
+<a name="line377">377: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossGetEPS_C"</font>,NULL);
+<a name="line378">378: </a>  <font color="#4169E1">return</font>(0);
+<a name="line379">379: </a>}
+
+<a name="line383">383: </a><strong><font color="#4169E1"><a name="SVDCreate_Cross"></a>PETSC_EXTERN PetscErrorCode SVDCreate_Cross(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line384">384: </a>{
+<a name="line386">386: </a>  SVD_CROSS      *cross;
+
+<a name="line389">389: </a>  PetscNewLog(svd,&cross);
+<a name="line390">390: </a>  svd->data = (void*)cross;
+
+<a name="line392">392: </a>  svd->ops->solve          = SVDSolve_Cross;
+<a name="line393">393: </a>  svd->ops->setup          = SVDSetUp_Cross;
+<a name="line394">394: </a>  svd->ops->setfromoptions = SVDSetFromOptions_Cross;
+<a name="line395">395: </a>  svd->ops->destroy        = SVDDestroy_Cross;
+<a name="line396">396: </a>  svd->ops->reset          = SVDReset_Cross;
+<a name="line397">397: </a>  svd->ops->view           = SVDView_Cross;
+<a name="line398">398: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossSetEPS_C"</font>,SVDCrossSetEPS_Cross);
+<a name="line399">399: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCrossGetEPS_C"</font>,SVDCrossGetEPS_Cross);
+<a name="line400">400: </a>  <font color="#4169E1">return</font>(0);
+<a name="line401">401: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/impls/cross/index.html b/src/svd/impls/cross/index.html
index 33b6fbf..5d2fe08 100644
--- a/src/svd/impls/cross/index.html
+++ b/src/svd/impls/cross/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/cross/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/cross/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/impls/cross/makefile b/src/svd/impls/cross/makefile
index 14b1992..6e15ca9 100644
--- a/src/svd/impls/cross/makefile
+++ b/src/svd/impls/cross/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/impls/cross/makefile.html b/src/svd/impls/cross/makefile.html
index aa12541..b3f59c5 100644
--- a/src/svd/impls/cross/makefile.html
+++ b/src/svd/impls/cross/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/cross/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:40+00:00">
+<meta name="date" content="2016-05-16T10:33:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/cross/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/cross/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/impls/cyclic/cyclic.c b/src/svd/impls/cyclic/cyclic.c
index ec34a2a..132c87f 100644
--- a/src/svd/impls/cyclic/cyclic.c
+++ b/src/svd/impls/cyclic/cyclic.c
@@ -6,7 +6,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -86,11 +86,13 @@ PetscErrorCode SVDSetUp_Cyclic(SVD svd)
   PetscInt          M,N,m,n,i,isl,Istart,Iend;
   const PetscScalar *isa;
   PetscScalar       *va;
-  PetscBool         trackall;
+  PetscBool         trackall,gpu;
   Vec               v;
   Mat               Zm,Zn;
 
   PetscFunctionBegin;
+  ierr = PetscObjectTypeCompareAny((PetscObject)svd->A,&gpu,MATSEQAIJCUSP,MATMPIAIJCUSP,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE,"");CHKERRQ(ierr);
+  if (gpu) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,"Solver not implemented for GPU matrices");
   ierr = SVDMatGetSize(svd,&M,&N);CHKERRQ(ierr);
   ierr = SVDMatGetLocalSize(svd,&m,&n);CHKERRQ(ierr);
   if (!cyclic->mat) {
@@ -147,6 +149,15 @@ PetscErrorCode SVDSetUp_Cyclic(SVD svd)
   }
   ierr = EPSSetDimensions(cyclic->eps,svd->nsv,svd->ncv?svd->ncv:PETSC_DEFAULT,svd->mpd?svd->mpd:PETSC_DEFAULT);CHKERRQ(ierr);
   ierr = EPSSetTolerances(cyclic->eps,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:svd->tol,svd->max_it?svd->max_it:PETSC_DEFAULT);CHKERRQ(ierr);
+  switch (svd->conv) {
+  case SVD_CONV_ABS:
+    ierr = EPSSetConvergenceTest(cyclic->eps,EPS_CONV_ABS);CHKERRQ(ierr);break;
+  case SVD_CONV_REL:
+    ierr = EPSSetConvergenceTest(cyclic->eps,EPS_CONV_REL);CHKERRQ(ierr);break;
+  case SVD_CONV_USER:
+    SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,"User-defined convergence test not supported in this solver");
+  }
+  if (svd->stop!=SVD_STOP_BASIC) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,"User-defined stopping test not supported in this solver");
   /* Transfer the trackall option from svd to eps */
   ierr = SVDGetTrackAll(svd,&trackall);CHKERRQ(ierr);
   ierr = EPSSetTrackAll(cyclic->eps,trackall);CHKERRQ(ierr);
@@ -241,8 +252,8 @@ PetscErrorCode SVDSolve_Cyclic(SVD svd)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "SVDMonitor_Cyclic"
-static PetscErrorCode SVDMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
+#define __FUNCT__ "EPSMonitor_Cyclic"
+static PetscErrorCode EPSMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)
 {
   PetscInt       i,j;
   SVD            svd = (SVD)ctx;
@@ -257,7 +268,7 @@ static PetscErrorCode SVDMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,Pets
     if (PetscRealPart(er) > 0.0) {
       svd->sigma[j] = PetscRealPart(er);
       svd->errest[j] = errest[i];
-      if (errest[i] < svd->tol) nconv++;
+      if (errest[i] && errest[i] < svd->tol) nconv++;
       j++;
     }
   }
@@ -268,7 +279,7 @@ static PetscErrorCode SVDMonitor_Cyclic(EPS eps,PetscInt its,PetscInt nconv,Pets
 
 #undef __FUNCT__
 #define __FUNCT__ "SVDSetFromOptions_Cyclic"
-PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptions *PetscOptionsObject,SVD svd)
+PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptionItems *PetscOptionsObject,SVD svd)
 {
   PetscErrorCode ierr;
   PetscBool      set,val;
@@ -368,7 +379,7 @@ PetscErrorCode SVDCyclicGetExplicitMatrix(SVD svd,PetscBool *explicitmatrix)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
   PetscValidPointer(explicitmatrix,2);
-  ierr = PetscTryMethod(svd,"SVDCyclicGetExplicitMatrix_C",(SVD,PetscBool*),(svd,explicitmatrix));CHKERRQ(ierr);
+  ierr = PetscUseMethod(svd,"SVDCyclicGetExplicitMatrix_C",(SVD,PetscBool*),(svd,explicitmatrix));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -427,11 +438,11 @@ static PetscErrorCode SVDCyclicGetEPS_Cyclic(SVD svd,EPS *eps)
   if (!cyclic->eps) {
     ierr = EPSCreate(PetscObjectComm((PetscObject)svd),&cyclic->eps);CHKERRQ(ierr);
     ierr = EPSSetOptionsPrefix(cyclic->eps,((PetscObject)svd)->prefix);CHKERRQ(ierr);
-    ierr = EPSAppendOptionsPrefix(cyclic->eps,"svd_");CHKERRQ(ierr);
+    ierr = EPSAppendOptionsPrefix(cyclic->eps,"svd_cyclic_");CHKERRQ(ierr);
     ierr = PetscObjectIncrementTabLevel((PetscObject)cyclic->eps,(PetscObject)svd,1);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->eps);CHKERRQ(ierr);
     ierr = EPSSetWhichEigenpairs(cyclic->eps,EPS_LARGEST_REAL);CHKERRQ(ierr);
-    ierr = EPSMonitorSet(cyclic->eps,SVDMonitor_Cyclic,svd,NULL);CHKERRQ(ierr);
+    ierr = EPSMonitorSet(cyclic->eps,EPSMonitor_Cyclic,svd,NULL);CHKERRQ(ierr);
   }
   *eps = cyclic->eps;
   PetscFunctionReturn(0);
@@ -462,7 +473,7 @@ PetscErrorCode SVDCyclicGetEPS(SVD svd,EPS *eps)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
   PetscValidPointer(eps,2);
-  ierr = PetscTryMethod(svd,"SVDCyclicGetEPS_C",(SVD,EPS*),(svd,eps));CHKERRQ(ierr);
+  ierr = PetscUseMethod(svd,"SVDCyclicGetEPS_C",(SVD,EPS*),(svd,eps));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -472,13 +483,17 @@ PetscErrorCode SVDView_Cyclic(SVD svd,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  if (!cyclic->eps) { ierr = SVDCyclicGetEPS(svd,&cyclic->eps);CHKERRQ(ierr); }
-  ierr = PetscViewerASCIIPrintf(viewer,"  Cyclic: %s matrix\n",cyclic->explicitmatrix?"explicit":"implicit");CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
-  ierr = EPSView(cyclic->eps,viewer);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (!cyclic->eps) { ierr = SVDCyclicGetEPS(svd,&cyclic->eps);CHKERRQ(ierr); }
+    ierr = PetscViewerASCIIPrintf(viewer,"  Cyclic: %s matrix\n",cyclic->explicitmatrix?"explicit":"implicit");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPushTab(viewer);CHKERRQ(ierr);
+    ierr = EPSView(cyclic->eps,viewer);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPopTab(viewer);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/svd/impls/cyclic/cyclic.c.html b/src/svd/impls/cyclic/cyclic.c.html
index f177e06..767af9a 100644
--- a/src/svd/impls/cyclic/cyclic.c.html
+++ b/src/svd/impls/cyclic/cyclic.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/cyclic/cyclic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:40+00:00">
+<meta name="date" content="2016-05-16T10:33:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/cyclic/cyclic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/cyclic/cyclic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc singular value solver: "cyclic"</font>
@@ -18,7 +18,7 @@
 
 <a name="line7">  7: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line8">  8: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line11"> 11: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -89,392 +89,407 @@
 <a name="line86"> 86: </a>  PetscInt          M,N,m,n,i,isl,Istart,Iend;
 <a name="line87"> 87: </a>  const PetscScalar *isa;
 <a name="line88"> 88: </a>  PetscScalar       *va;
-<a name="line89"> 89: </a>  PetscBool         trackall;
+<a name="line89"> 89: </a>  PetscBool         trackall,gpu;
 <a name="line90"> 90: </a>  Vec               v;
 <a name="line91"> 91: </a>  Mat               Zm,Zn;
 
-<a name="line94"> 94: </a>  SVDMatGetSize(svd,&M,&N);
-<a name="line95"> 95: </a>  SVDMatGetLocalSize(svd,&m,&n);
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (!cyclic->mat) {
-<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (cyclic->explicitmatrix) {
-<a name="line98"> 98: </a>      <font color="#4169E1">if</font> (!svd->AT) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Cannot use explicit cyclic matrix with implicit transpose"</font>);
-<a name="line99"> 99: </a>      MatCreate(PetscObjectComm((PetscObject)svd),&Zm);
-<a name="line100">100: </a>      MatSetSizes(Zm,m,m,M,M);
-<a name="line101">101: </a>      MatSetFromOptions(Zm);
-<a name="line102">102: </a>      MatSetUp(Zm);
-<a name="line103">103: </a>      MatGetOwnershipRange(Zm,&Istart,&Iend);
-<a name="line104">104: </a>      <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
-<a name="line105">105: </a>        MatSetValue(Zm,i,i,0.0,INSERT_VALUES);
-<a name="line106">106: </a>      }
-<a name="line107">107: </a>      MatAssemblyBegin(Zm,MAT_FINAL_ASSEMBLY);
-<a name="line108">108: </a>      MatAssemblyEnd(Zm,MAT_FINAL_ASSEMBLY);
-<a name="line109">109: </a>      MatCreate(PetscObjectComm((PetscObject)svd),&Zn);
-<a name="line110">110: </a>      MatSetSizes(Zn,n,n,N,N);
-<a name="line111">111: </a>      MatSetFromOptions(Zn);
-<a name="line112">112: </a>      MatSetUp(Zn);
-<a name="line113">113: </a>      MatGetOwnershipRange(Zn,&Istart,&Iend);
-<a name="line114">114: </a>      <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
-<a name="line115">115: </a>        MatSetValue(Zn,i,i,0.0,INSERT_VALUES);
-<a name="line116">116: </a>      }
-<a name="line117">117: </a>      MatAssemblyBegin(Zn,MAT_FINAL_ASSEMBLY);
-<a name="line118">118: </a>      MatAssemblyEnd(Zn,MAT_FINAL_ASSEMBLY);
-<a name="line119">119: </a>      <a href="../../../../docs/manualpages/sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</a>(1.0,Zm,1.0,svd->A,1.0,svd->AT,1.0,Zn,&cyclic->mat);
-<a name="line120">120: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->mat);
-<a name="line121">121: </a>      MatDestroy(&Zm);
-<a name="line122">122: </a>      MatDestroy(&Zn);
-<a name="line123">123: </a>    } <font color="#4169E1">else</font> {
-<a name="line124">124: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,m,M,NULL,&cyclic->x1);
-<a name="line125">125: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,n,N,NULL,&cyclic->x2);
-<a name="line126">126: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,m,M,NULL,&cyclic->y1);
-<a name="line127">127: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,n,N,NULL,&cyclic->y2);
-<a name="line128">128: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->x1);
-<a name="line129">129: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->x2);
-<a name="line130">130: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->y1);
-<a name="line131">131: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->y2);
-<a name="line132">132: </a>      MatCreateShell(PetscObjectComm((PetscObject)svd),m+n,m+n,M+N,M+N,svd,&cyclic->mat);
-<a name="line133">133: </a>      MatShellSetOperation(cyclic->mat,MATOP_MULT,(void(*)(void))MatMult_Cyclic);
-<a name="line134">134: </a>      MatShellSetOperation(cyclic->mat,MATOP_GET_DIAGONAL,(void(*)(void))MatGetDiagonal_Cyclic);
-<a name="line135">135: </a>    }
-<a name="line136">136: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->mat);
-<a name="line137">137: </a>  }
-
-<a name="line139">139: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&cyclic->eps); }
-<a name="line140">140: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(cyclic->eps,cyclic->mat,NULL);
-<a name="line141">141: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(cyclic->eps,EPS_HEP);
-<a name="line142">142: </a>  <font color="#4169E1">if</font> (svd->which == SVD_LARGEST) {
-<a name="line143">143: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cyclic->eps,EPS_LARGEST_REAL);
-<a name="line144">144: </a>  } <font color="#4169E1">else</font> {
-<a name="line145">145: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(cyclic->eps,SlepcCompareSmallestPosReal,NULL);
-<a name="line146">146: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(cyclic->eps,0.0);
-<a name="line147">147: </a>  }
-<a name="line148">148: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(cyclic->eps,svd->nsv,svd->ncv?svd->ncv:PETSC_DEFAULT,svd->mpd?svd->mpd:PETSC_DEFAULT);
-<a name="line149">149: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(cyclic->eps,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:svd->tol,svd->max_it?svd->max_it:PETSC_DEFAULT);
-<a name="line150">150: </a>  <font color="#B22222">/* Transfer the trackall option from svd to eps */</font>
-<a name="line151">151: </a>  <a href="../../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(svd,&trackall);
-<a name="line152">152: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(cyclic->eps,trackall);
-<a name="line153">153: </a>  <font color="#B22222">/* Transfer the initial subspace from svd to eps */</font>
-<a name="line154">154: </a>  <font color="#4169E1">if</font> (svd->nini<0 || svd->ninil<0) {
-<a name="line155">155: </a>    <font color="#4169E1">for</font> (i=0;i<-PetscMin(svd->nini,svd->ninil);i++) {
-<a name="line156">156: </a>      MatCreateVecs(cyclic->mat,&v,NULL);
-<a name="line157">157: </a>      VecGetArray(v,&va);
-<a name="line158">158: </a>      <font color="#4169E1">if</font> (i<-svd->ninil) {
-<a name="line159">159: </a>        VecGetSize(svd->ISL[i],&isl);
-<a name="line160">160: </a>        <font color="#4169E1">if</font> (isl!=m) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Size mismatch for left initial vector"</font>);
-<a name="line161">161: </a>        VecGetArrayRead(svd->ISL[i],&isa);
-<a name="line162">162: </a>        PetscMemcpy(va,isa,<font color="#4169E1">sizeof</font>(PetscScalar)*m);
-<a name="line163">163: </a>        VecRestoreArrayRead(svd->IS[i],&isa);
-<a name="line164">164: </a>      } <font color="#4169E1">else</font> {
-<a name="line165">165: </a>        PetscMemzero(&va,<font color="#4169E1">sizeof</font>(PetscScalar)*m);
-<a name="line166">166: </a>      }
-<a name="line167">167: </a>      <font color="#4169E1">if</font> (i<-svd->nini) {
-<a name="line168">168: </a>        VecGetSize(svd->IS[i],&isl);
-<a name="line169">169: </a>        <font color="#4169E1">if</font> (isl!=n) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Size mismatch for right initial vector"</font>);
-<a name="line170">170: </a>        VecGetArrayRead(svd->IS[i],&isa);
-<a name="line171">171: </a>        PetscMemcpy(va+m,isa,<font color="#4169E1">sizeof</font>(PetscScalar)*n);
-<a name="line172">172: </a>        VecRestoreArrayRead(svd->IS[i],&isa);
-<a name="line173">173: </a>      } <font color="#4169E1">else</font> {
-<a name="line174">174: </a>        PetscMemzero(va+m,<font color="#4169E1">sizeof</font>(PetscScalar)*n);
-<a name="line175">175: </a>      }
-<a name="line176">176: </a>      VecRestoreArray(v,&va);
-<a name="line177">177: </a>      VecDestroy(&svd->IS[i]);
-<a name="line178">178: </a>      svd->IS[i] = v;
-<a name="line179">179: </a>    }
-<a name="line180">180: </a>    svd->nini = PetscMin(svd->nini,svd->ninil);
-<a name="line181">181: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(cyclic->eps,-svd->nini,svd->IS);
-<a name="line182">182: </a>    SlepcBasisDestroy_Private(&svd->nini,&svd->IS);
-<a name="line183">183: </a>    SlepcBasisDestroy_Private(&svd->ninil,&svd->ISL);
-<a name="line184">184: </a>  }
-<a name="line185">185: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(cyclic->eps);
-<a name="line186">186: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(cyclic->eps,NULL,&svd->ncv,&svd->mpd);
-<a name="line187">187: </a>  svd->ncv = PetscMin(svd->ncv,PetscMin(M,N));
-<a name="line188">188: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(cyclic->eps,NULL,&svd->max_it);
-<a name="line189">189: </a>  <font color="#4169E1">if</font> (svd->tol==PETSC_DEFAULT) svd->tol = SLEPC_DEFAULT_TOL;
-
-<a name="line191">191: </a>  svd->leftbasis = PETSC_TRUE;
-<a name="line192">192: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,0);
-<a name="line193">193: </a>  <font color="#4169E1">return</font>(0);
-<a name="line194">194: </a>}
-
-<a name="line198">198: </a><strong><font color="#4169E1"><a name="SVDSolve_Cyclic"></a>PetscErrorCode SVDSolve_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line199">199: </a>{
-<a name="line200">200: </a>  PetscErrorCode    ierr;
-<a name="line201">201: </a>  SVD_CYCLIC        *cyclic = (SVD_CYCLIC*)svd->data;
-<a name="line202">202: </a>  PetscInt          i,j,M,N,m,n;
-<a name="line203">203: </a>  PetscScalar       sigma;
-<a name="line204">204: </a>  const PetscScalar *px;
-<a name="line205">205: </a>  Vec               x,x1,x2;
-
-<a name="line208">208: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(cyclic->eps);
-<a name="line209">209: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(cyclic->eps,&svd->nconv);
-<a name="line210">210: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(cyclic->eps,&svd->its);
-<a name="line211">211: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(cyclic->eps,(<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)&svd->reason);
-
-<a name="line213">213: </a>  MatCreateVecs(cyclic->mat,&x,NULL);
-<a name="line214">214: </a>  SVDMatGetSize(svd,&M,&N);
-<a name="line215">215: </a>  SVDMatGetLocalSize(svd,&m,&n);
-<a name="line216">216: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,m,M,NULL,&x1);
-<a name="line217">217: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,n,N,NULL,&x2);
-<a name="line218">218: </a>  <font color="#4169E1">for</font> (i=0,j=0;i<svd->nconv;i++) {
-<a name="line219">219: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(cyclic->eps,i,&sigma,NULL,x,NULL);
-<a name="line220">220: </a>    <font color="#4169E1">if</font> (PetscRealPart(sigma) > 0.0) {
-<a name="line221">221: </a>      svd->sigma[j] = PetscRealPart(sigma);
-<a name="line222">222: </a>      VecGetArrayRead(x,&px);
-<a name="line223">223: </a>      VecPlaceArray(x1,px);
-<a name="line224">224: </a>      VecPlaceArray(x2,px+m);
-<a name="line225">225: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(svd->U,j,x1);
-<a name="line226">226: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->U,j,1.0/PetscSqrtReal(2.0));
-<a name="line227">227: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(svd->V,j,x2);
-<a name="line228">228: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,j,1.0/PetscSqrtReal(2.0));
-<a name="line229">229: </a>      VecResetArray(x1);
-<a name="line230">230: </a>      VecResetArray(x2);
-<a name="line231">231: </a>      VecRestoreArrayRead(x,&px);
-<a name="line232">232: </a>      j++;
-<a name="line233">233: </a>    }
-<a name="line234">234: </a>  }
-<a name="line235">235: </a>  svd->nconv = j;
-
-<a name="line237">237: </a>  VecDestroy(&x);
-<a name="line238">238: </a>  VecDestroy(&x1);
-<a name="line239">239: </a>  VecDestroy(&x2);
-<a name="line240">240: </a>  <font color="#4169E1">return</font>(0);
-<a name="line241">241: </a>}
-
-<a name="line245">245: </a><strong><font color="#4169E1"><a name="SVDMonitor_Cyclic"></a>static PetscErrorCode SVDMonitor_Cyclic(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
-<a name="line246">246: </a>{
-<a name="line247">247: </a>  PetscInt       i,j;
-<a name="line248">248: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>            svd = (<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)ctx;
-<a name="line249">249: </a>  PetscScalar    er,ei;
-
-<a name="line253">253: </a>  nconv = 0;
-<a name="line254">254: </a>  <font color="#4169E1">for</font> (i=0,j=0;i<PetscMin(nest,svd->ncv);i++) {
-<a name="line255">255: </a>    er = eigr[i]; ei = eigi[i];
-<a name="line256">256: </a>    <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
-<a name="line257">257: </a>    <font color="#4169E1">if</font> (PetscRealPart(er) > 0.0) {
-<a name="line258">258: </a>      svd->sigma[j] = PetscRealPart(er);
-<a name="line259">259: </a>      svd->errest[j] = errest[i];
-<a name="line260">260: </a>      <font color="#4169E1">if</font> (errest[i] < svd->tol) nconv++;
-<a name="line261">261: </a>      j++;
-<a name="line262">262: </a>    }
-<a name="line263">263: </a>  }
-<a name="line264">264: </a>  nest = j;
-<a name="line265">265: </a>  SVDMonitor(svd,its,nconv,svd->sigma,svd->errest,nest);
-<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
-<a name="line267">267: </a>}
-
-<a name="line271">271: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_Cyclic"></a>PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line272">272: </a>{
-<a name="line274">274: </a>  PetscBool      set,val;
-<a name="line275">275: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
-<a name="line276">276: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
-
-<a name="line279">279: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> Cyclic Options"</font>);
-<a name="line280">280: </a>  PetscOptionsBool(<font color="#666666">"-svd_cyclic_explicitmatrix"</font>,<font color="#666666">"Use cyclic explicit matrix"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>"</font>,cyclic->explicitmatrix,&val,&set);
-<a name="line281">281: </a>  <font color="#4169E1">if</font> (set) {
-<a name="line282">282: </a>    <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>(svd,val);
-<a name="line283">283: </a>  }
-<a name="line284">284: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&cyclic->eps); }
-<a name="line285">285: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(cyclic->eps);
-<a name="line286">286: </a>  <font color="#4169E1">if</font> (!cyclic->explicitmatrix) {
-<a name="line287">287: </a>    <font color="#B22222">/* use as default an <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> with shell matrix and Jacobi */</font>
-<a name="line288">288: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(cyclic->eps,&st);
-<a name="line289">289: </a>    <a href="../../../../docs/manualpages/ST/STSetMatMode.html#STSetMatMode">STSetMatMode</a>(st,ST_MATMODE_SHELL);
-<a name="line290">290: </a>  }
-<a name="line291">291: </a>  PetscOptionsTail();
-<a name="line292">292: </a>  <font color="#4169E1">return</font>(0);
-<a name="line293">293: </a>}
-
-<a name="line297">297: </a><strong><font color="#4169E1"><a name="SVDCyclicSetExplicitMatrix_Cyclic"></a>static PetscErrorCode SVDCyclicSetExplicitMatrix_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool explicitmatrix)</font></strong>
-<a name="line298">298: </a>{
-<a name="line299">299: </a>  SVD_CYCLIC *cyclic = (SVD_CYCLIC*)svd->data;
-
-<a name="line302">302: </a>  cyclic->explicitmatrix = explicitmatrix;
+<a name="line94"> 94: </a>  PetscObjectTypeCompareAny((PetscObject)svd->A,&gpu,MATSEQAIJCUSP,MATMPIAIJCUSP,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE,<font color="#666666">""</font>);
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (gpu) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Solver not implemented for GPU matrices"</font>);
+<a name="line96"> 96: </a>  SVDMatGetSize(svd,&M,&N);
+<a name="line97"> 97: </a>  SVDMatGetLocalSize(svd,&m,&n);
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (!cyclic->mat) {
+<a name="line99"> 99: </a>    <font color="#4169E1">if</font> (cyclic->explicitmatrix) {
+<a name="line100">100: </a>      <font color="#4169E1">if</font> (!svd->AT) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Cannot use explicit cyclic matrix with implicit transpose"</font>);
+<a name="line101">101: </a>      MatCreate(PetscObjectComm((PetscObject)svd),&Zm);
+<a name="line102">102: </a>      MatSetSizes(Zm,m,m,M,M);
+<a name="line103">103: </a>      MatSetFromOptions(Zm);
+<a name="line104">104: </a>      MatSetUp(Zm);
+<a name="line105">105: </a>      MatGetOwnershipRange(Zm,&Istart,&Iend);
+<a name="line106">106: </a>      <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line107">107: </a>        MatSetValue(Zm,i,i,0.0,INSERT_VALUES);
+<a name="line108">108: </a>      }
+<a name="line109">109: </a>      MatAssemblyBegin(Zm,MAT_FINAL_ASSEMBLY);
+<a name="line110">110: </a>      MatAssemblyEnd(Zm,MAT_FINAL_ASSEMBLY);
+<a name="line111">111: </a>      MatCreate(PetscObjectComm((PetscObject)svd),&Zn);
+<a name="line112">112: </a>      MatSetSizes(Zn,n,n,N,N);
+<a name="line113">113: </a>      MatSetFromOptions(Zn);
+<a name="line114">114: </a>      MatSetUp(Zn);
+<a name="line115">115: </a>      MatGetOwnershipRange(Zn,&Istart,&Iend);
+<a name="line116">116: </a>      <font color="#4169E1">for</font> (i=Istart;i<Iend;i++) {
+<a name="line117">117: </a>        MatSetValue(Zn,i,i,0.0,INSERT_VALUES);
+<a name="line118">118: </a>      }
+<a name="line119">119: </a>      MatAssemblyBegin(Zn,MAT_FINAL_ASSEMBLY);
+<a name="line120">120: </a>      MatAssemblyEnd(Zn,MAT_FINAL_ASSEMBLY);
+<a name="line121">121: </a>      <a href="../../../../docs/manualpages/sys/SlepcMatTile.html#SlepcMatTile">SlepcMatTile</a>(1.0,Zm,1.0,svd->A,1.0,svd->AT,1.0,Zn,&cyclic->mat);
+<a name="line122">122: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->mat);
+<a name="line123">123: </a>      MatDestroy(&Zm);
+<a name="line124">124: </a>      MatDestroy(&Zn);
+<a name="line125">125: </a>    } <font color="#4169E1">else</font> {
+<a name="line126">126: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,m,M,NULL,&cyclic->x1);
+<a name="line127">127: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,n,N,NULL,&cyclic->x2);
+<a name="line128">128: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,m,M,NULL,&cyclic->y1);
+<a name="line129">129: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,n,N,NULL,&cyclic->y2);
+<a name="line130">130: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->x1);
+<a name="line131">131: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->x2);
+<a name="line132">132: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->y1);
+<a name="line133">133: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->y2);
+<a name="line134">134: </a>      MatCreateShell(PetscObjectComm((PetscObject)svd),m+n,m+n,M+N,M+N,svd,&cyclic->mat);
+<a name="line135">135: </a>      MatShellSetOperation(cyclic->mat,MATOP_MULT,(void(*)(void))MatMult_Cyclic);
+<a name="line136">136: </a>      MatShellSetOperation(cyclic->mat,MATOP_GET_DIAGONAL,(void(*)(void))MatGetDiagonal_Cyclic);
+<a name="line137">137: </a>    }
+<a name="line138">138: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->mat);
+<a name="line139">139: </a>  }
+
+<a name="line141">141: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&cyclic->eps); }
+<a name="line142">142: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetOperators.html#EPSSetOperators">EPSSetOperators</a>(cyclic->eps,cyclic->mat,NULL);
+<a name="line143">143: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetProblemType.html#EPSSetProblemType">EPSSetProblemType</a>(cyclic->eps,EPS_HEP);
+<a name="line144">144: </a>  <font color="#4169E1">if</font> (svd->which == SVD_LARGEST) {
+<a name="line145">145: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cyclic->eps,EPS_LARGEST_REAL);
+<a name="line146">146: </a>  } <font color="#4169E1">else</font> {
+<a name="line147">147: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetEigenvalueComparison.html#EPSSetEigenvalueComparison">EPSSetEigenvalueComparison</a>(cyclic->eps,SlepcCompareSmallestPosReal,NULL);
+<a name="line148">148: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(cyclic->eps,0.0);
+<a name="line149">149: </a>  }
+<a name="line150">150: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetDimensions.html#EPSSetDimensions">EPSSetDimensions</a>(cyclic->eps,svd->nsv,svd->ncv?svd->ncv:PETSC_DEFAULT,svd->mpd?svd->mpd:PETSC_DEFAULT);
+<a name="line151">151: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTolerances.html#EPSSetTolerances">EPSSetTolerances</a>(cyclic->eps,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL/10.0:svd->tol,svd->max_it?svd->max_it:PETSC_DEFAULT);
+<a name="line152">152: </a>  <font color="#4169E1">switch</font> (svd->conv) {
+<a name="line153">153: </a>  <font color="#4169E1">case</font> SVD_CONV_ABS:
+<a name="line154">154: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(cyclic->eps,EPS_CONV_ABS);<font color="#4169E1">break</font>;
+<a name="line155">155: </a>  <font color="#4169E1">case</font> SVD_CONV_REL:
+<a name="line156">156: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetConvergenceTest.html#EPSSetConvergenceTest">EPSSetConvergenceTest</a>(cyclic->eps,EPS_CONV_REL);<font color="#4169E1">break</font>;
+<a name="line157">157: </a>  <font color="#4169E1">case</font> SVD_CONV_USER:
+<a name="line158">158: </a>    SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"User-defined convergence test not supported in this solver"</font>);
+<a name="line159">159: </a>  }
+<a name="line160">160: </a>  <font color="#4169E1">if</font> (svd->stop!=SVD_STOP_BASIC) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"User-defined stopping test not supported in this solver"</font>);
+<a name="line161">161: </a>  <font color="#B22222">/* Transfer the trackall option from svd to eps */</font>
+<a name="line162">162: </a>  <a href="../../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(svd,&trackall);
+<a name="line163">163: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetTrackAll.html#EPSSetTrackAll">EPSSetTrackAll</a>(cyclic->eps,trackall);
+<a name="line164">164: </a>  <font color="#B22222">/* Transfer the initial subspace from svd to eps */</font>
+<a name="line165">165: </a>  <font color="#4169E1">if</font> (svd->nini<0 || svd->ninil<0) {
+<a name="line166">166: </a>    <font color="#4169E1">for</font> (i=0;i<-PetscMin(svd->nini,svd->ninil);i++) {
+<a name="line167">167: </a>      MatCreateVecs(cyclic->mat,&v,NULL);
+<a name="line168">168: </a>      VecGetArray(v,&va);
+<a name="line169">169: </a>      <font color="#4169E1">if</font> (i<-svd->ninil) {
+<a name="line170">170: </a>        VecGetSize(svd->ISL[i],&isl);
+<a name="line171">171: </a>        <font color="#4169E1">if</font> (isl!=m) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Size mismatch for left initial vector"</font>);
+<a name="line172">172: </a>        VecGetArrayRead(svd->ISL[i],&isa);
+<a name="line173">173: </a>        PetscMemcpy(va,isa,<font color="#4169E1">sizeof</font>(PetscScalar)*m);
+<a name="line174">174: </a>        VecRestoreArrayRead(svd->IS[i],&isa);
+<a name="line175">175: </a>      } <font color="#4169E1">else</font> {
+<a name="line176">176: </a>        PetscMemzero(&va,<font color="#4169E1">sizeof</font>(PetscScalar)*m);
+<a name="line177">177: </a>      }
+<a name="line178">178: </a>      <font color="#4169E1">if</font> (i<-svd->nini) {
+<a name="line179">179: </a>        VecGetSize(svd->IS[i],&isl);
+<a name="line180">180: </a>        <font color="#4169E1">if</font> (isl!=n) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"Size mismatch for right initial vector"</font>);
+<a name="line181">181: </a>        VecGetArrayRead(svd->IS[i],&isa);
+<a name="line182">182: </a>        PetscMemcpy(va+m,isa,<font color="#4169E1">sizeof</font>(PetscScalar)*n);
+<a name="line183">183: </a>        VecRestoreArrayRead(svd->IS[i],&isa);
+<a name="line184">184: </a>      } <font color="#4169E1">else</font> {
+<a name="line185">185: </a>        PetscMemzero(va+m,<font color="#4169E1">sizeof</font>(PetscScalar)*n);
+<a name="line186">186: </a>      }
+<a name="line187">187: </a>      VecRestoreArray(v,&va);
+<a name="line188">188: </a>      VecDestroy(&svd->IS[i]);
+<a name="line189">189: </a>      svd->IS[i] = v;
+<a name="line190">190: </a>    }
+<a name="line191">191: </a>    svd->nini = PetscMin(svd->nini,svd->ninil);
+<a name="line192">192: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetInitialSpace.html#EPSSetInitialSpace">EPSSetInitialSpace</a>(cyclic->eps,-svd->nini,svd->IS);
+<a name="line193">193: </a>    SlepcBasisDestroy_Private(&svd->nini,&svd->IS);
+<a name="line194">194: </a>    SlepcBasisDestroy_Private(&svd->ninil,&svd->ISL);
+<a name="line195">195: </a>  }
+<a name="line196">196: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetUp.html#EPSSetUp">EPSSetUp</a>(cyclic->eps);
+<a name="line197">197: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetDimensions.html#EPSGetDimensions">EPSGetDimensions</a>(cyclic->eps,NULL,&svd->ncv,&svd->mpd);
+<a name="line198">198: </a>  svd->ncv = PetscMin(svd->ncv,PetscMin(M,N));
+<a name="line199">199: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetTolerances.html#EPSGetTolerances">EPSGetTolerances</a>(cyclic->eps,NULL,&svd->max_it);
+<a name="line200">200: </a>  <font color="#4169E1">if</font> (svd->tol==PETSC_DEFAULT) svd->tol = SLEPC_DEFAULT_TOL;
+
+<a name="line202">202: </a>  svd->leftbasis = PETSC_TRUE;
+<a name="line203">203: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,0);
+<a name="line204">204: </a>  <font color="#4169E1">return</font>(0);
+<a name="line205">205: </a>}
+
+<a name="line209">209: </a><strong><font color="#4169E1"><a name="SVDSolve_Cyclic"></a>PetscErrorCode SVDSolve_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line210">210: </a>{
+<a name="line211">211: </a>  PetscErrorCode    ierr;
+<a name="line212">212: </a>  SVD_CYCLIC        *cyclic = (SVD_CYCLIC*)svd->data;
+<a name="line213">213: </a>  PetscInt          i,j,M,N,m,n;
+<a name="line214">214: </a>  PetscScalar       sigma;
+<a name="line215">215: </a>  const PetscScalar *px;
+<a name="line216">216: </a>  Vec               x,x1,x2;
+
+<a name="line219">219: </a>  <a href="../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>(cyclic->eps);
+<a name="line220">220: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConverged.html#EPSGetConverged">EPSGetConverged</a>(cyclic->eps,&svd->nconv);
+<a name="line221">221: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetIterationNumber.html#EPSGetIterationNumber">EPSGetIterationNumber</a>(cyclic->eps,&svd->its);
+<a name="line222">222: </a>  <a href="../../../../docs/manualpages/EPS/EPSGetConvergedReason.html#EPSGetConvergedReason">EPSGetConvergedReason</a>(cyclic->eps,(<a href="../../../../docs/manualpages/EPS/EPSConvergedReason.html#EPSConvergedReason">EPSConvergedReason</a>*)&svd->reason);
+
+<a name="line224">224: </a>  MatCreateVecs(cyclic->mat,&x,NULL);
+<a name="line225">225: </a>  SVDMatGetSize(svd,&M,&N);
+<a name="line226">226: </a>  SVDMatGetLocalSize(svd,&m,&n);
+<a name="line227">227: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,m,M,NULL,&x1);
+<a name="line228">228: </a>  VecCreateMPIWithArray(PetscObjectComm((PetscObject)svd),1,n,N,NULL,&x2);
+<a name="line229">229: </a>  <font color="#4169E1">for</font> (i=0,j=0;i<svd->nconv;i++) {
+<a name="line230">230: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetEigenpair.html#EPSGetEigenpair">EPSGetEigenpair</a>(cyclic->eps,i,&sigma,NULL,x,NULL);
+<a name="line231">231: </a>    <font color="#4169E1">if</font> (PetscRealPart(sigma) > 0.0) {
+<a name="line232">232: </a>      svd->sigma[j] = PetscRealPart(sigma);
+<a name="line233">233: </a>      VecGetArrayRead(x,&px);
+<a name="line234">234: </a>      VecPlaceArray(x1,px);
+<a name="line235">235: </a>      VecPlaceArray(x2,px+m);
+<a name="line236">236: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(svd->U,j,x1);
+<a name="line237">237: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->U,j,1.0/PetscSqrtReal(2.0));
+<a name="line238">238: </a>      <a href="../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(svd->V,j,x2);
+<a name="line239">239: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,j,1.0/PetscSqrtReal(2.0));
+<a name="line240">240: </a>      VecResetArray(x1);
+<a name="line241">241: </a>      VecResetArray(x2);
+<a name="line242">242: </a>      VecRestoreArrayRead(x,&px);
+<a name="line243">243: </a>      j++;
+<a name="line244">244: </a>    }
+<a name="line245">245: </a>  }
+<a name="line246">246: </a>  svd->nconv = j;
+
+<a name="line248">248: </a>  VecDestroy(&x);
+<a name="line249">249: </a>  VecDestroy(&x1);
+<a name="line250">250: </a>  VecDestroy(&x2);
+<a name="line251">251: </a>  <font color="#4169E1">return</font>(0);
+<a name="line252">252: </a>}
+
+<a name="line256">256: </a><strong><font color="#4169E1"><a name="EPSMonitor_Cyclic"></a>static PetscErrorCode EPSMonitor_Cyclic(<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps,PetscInt its,PetscInt nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line257">257: </a>{
+<a name="line258">258: </a>  PetscInt       i,j;
+<a name="line259">259: </a>  <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>            svd = (<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>)ctx;
+<a name="line260">260: </a>  PetscScalar    er,ei;
+
+<a name="line264">264: </a>  nconv = 0;
+<a name="line265">265: </a>  <font color="#4169E1">for</font> (i=0,j=0;i<PetscMin(nest,svd->ncv);i++) {
+<a name="line266">266: </a>    er = eigr[i]; ei = eigi[i];
+<a name="line267">267: </a>    <a href="../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(eps->st,1,&er,&ei);
+<a name="line268">268: </a>    <font color="#4169E1">if</font> (PetscRealPart(er) > 0.0) {
+<a name="line269">269: </a>      svd->sigma[j] = PetscRealPart(er);
+<a name="line270">270: </a>      svd->errest[j] = errest[i];
+<a name="line271">271: </a>      <font color="#4169E1">if</font> (errest[i] && errest[i] < svd->tol) nconv++;
+<a name="line272">272: </a>      j++;
+<a name="line273">273: </a>    }
+<a name="line274">274: </a>  }
+<a name="line275">275: </a>  nest = j;
+<a name="line276">276: </a>  SVDMonitor(svd,its,nconv,svd->sigma,svd->errest,nest);
+<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_Cyclic"></a>PetscErrorCode SVDSetFromOptions_Cyclic(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line283">283: </a>{
+<a name="line285">285: </a>  PetscBool      set,val;
+<a name="line286">286: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
+<a name="line287">287: </a>  <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a>             st;
+
+<a name="line290">290: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> Cyclic Options"</font>);
+<a name="line291">291: </a>  PetscOptionsBool(<font color="#666666">"-svd_cyclic_explicitmatrix"</font>,<font color="#666666">"Use cyclic explicit matrix"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>"</font>,cyclic->explicitmatrix,&val,&set);
+<a name="line292">292: </a>  <font color="#4169E1">if</font> (set) {
+<a name="line293">293: </a>    <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>(svd,val);
+<a name="line294">294: </a>  }
+<a name="line295">295: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&cyclic->eps); }
+<a name="line296">296: </a>  <a href="../../../../docs/manualpages/EPS/EPSSetFromOptions.html#EPSSetFromOptions">EPSSetFromOptions</a>(cyclic->eps);
+<a name="line297">297: </a>  <font color="#4169E1">if</font> (!cyclic->explicitmatrix) {
+<a name="line298">298: </a>    <font color="#B22222">/* use as default an <a href="../../../../docs/manualpages/ST/ST.html#ST">ST</a> with shell matrix and Jacobi */</font>
+<a name="line299">299: </a>    <a href="../../../../docs/manualpages/EPS/EPSGetST.html#EPSGetST">EPSGetST</a>(cyclic->eps,&st);
+<a name="line300">300: </a>    <a href="../../../../docs/manualpages/ST/STSetMatMode.html#STSetMatMode">STSetMatMode</a>(st,ST_MATMODE_SHELL);
+<a name="line301">301: </a>  }
+<a name="line302">302: </a>  PetscOptionsTail();
 <a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
 <a name="line304">304: </a>}
 
-<a name="line308">308: </a><font color="#B22222">/*@</font>
-<a name="line309">309: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a> - Indicate if the eigensolver operator</font>
-<a name="line310">310: </a><font color="#B22222">   H(A) = [ 0  A ; A^T 0 ] must be computed explicitly.</font>
+<a name="line308">308: </a><strong><font color="#4169E1"><a name="SVDCyclicSetExplicitMatrix_Cyclic"></a>static PetscErrorCode SVDCyclicSetExplicitMatrix_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool explicitmatrix)</font></strong>
+<a name="line309">309: </a>{
+<a name="line310">310: </a>  SVD_CYCLIC *cyclic = (SVD_CYCLIC*)svd->data;
 
-<a name="line312">312: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+<a name="line313">313: </a>  cyclic->explicitmatrix = explicitmatrix;
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
 
-<a name="line314">314: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line315">315: </a><font color="#B22222">+  svd      - singular value solver</font>
-<a name="line316">316: </a><font color="#B22222">-  explicit - boolean flag indicating if H(A) is built explicitly</font>
+<a name="line319">319: </a><font color="#B22222">/*@</font>
+<a name="line320">320: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a> - Indicate if the eigensolver operator</font>
+<a name="line321">321: </a><font color="#B22222">   H(A) = [ 0  A ; A^T 0 ] must be computed explicitly.</font>
 
-<a name="line318">318: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line319">319: </a><font color="#B22222">.  -svd_cyclic_explicitmatrix <boolean> - Indicates the boolean flag</font>
+<a name="line323">323: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
 
-<a name="line321">321: </a><font color="#B22222">   Level: advanced</font>
+<a name="line325">325: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line326">326: </a><font color="#B22222">+  svd      - singular value solver</font>
+<a name="line327">327: </a><font color="#B22222">-  explicit - boolean flag indicating if H(A) is built explicitly</font>
 
-<a name="line323">323: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a>()</font>
-<a name="line324">324: </a><font color="#B22222">@*/</font>
-<a name="line325">325: </a><strong><font color="#4169E1"><a name="SVDCyclicSetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool explicitmatrix)</font></strong>
-<a name="line326">326: </a>{
+<a name="line329">329: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line330">330: </a><font color="#B22222">.  -svd_cyclic_explicitmatrix <boolean> - Indicates the boolean flag</font>
 
-<a name="line332">332: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCyclicSetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool),(svd,explicitmatrix));
-<a name="line333">333: </a>  <font color="#4169E1">return</font>(0);
-<a name="line334">334: </a>}
+<a name="line332">332: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line338">338: </a><strong><font color="#4169E1"><a name="SVDCyclicGetExplicitMatrix_Cyclic"></a>static PetscErrorCode SVDCyclicGetExplicitMatrix_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *explicitmatrix)</font></strong>
-<a name="line339">339: </a>{
-<a name="line340">340: </a>  SVD_CYCLIC *cyclic = (SVD_CYCLIC*)svd->data;
+<a name="line334">334: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a>()</font>
+<a name="line335">335: </a><font color="#B22222">@*/</font>
+<a name="line336">336: </a><strong><font color="#4169E1"><a name="SVDCyclicSetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool explicitmatrix)</font></strong>
+<a name="line337">337: </a>{
 
-<a name="line343">343: </a>  *explicitmatrix = cyclic->explicitmatrix;
+<a name="line343">343: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCyclicSetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool),(svd,explicitmatrix));
 <a name="line344">344: </a>  <font color="#4169E1">return</font>(0);
 <a name="line345">345: </a>}
 
-<a name="line349">349: </a><font color="#B22222">/*@</font>
-<a name="line350">350: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a> - Returns the flag indicating if H(A) is built explicitly</font>
+<a name="line349">349: </a><strong><font color="#4169E1"><a name="SVDCyclicGetExplicitMatrix_Cyclic"></a>static PetscErrorCode SVDCyclicGetExplicitMatrix_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *explicitmatrix)</font></strong>
+<a name="line350">350: </a>{
+<a name="line351">351: </a>  SVD_CYCLIC *cyclic = (SVD_CYCLIC*)svd->data;
 
-<a name="line352">352: </a><font color="#B22222">   Not Collective</font>
+<a name="line354">354: </a>  *explicitmatrix = cyclic->explicitmatrix;
+<a name="line355">355: </a>  <font color="#4169E1">return</font>(0);
+<a name="line356">356: </a>}
 
-<a name="line354">354: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line355">355: </a><font color="#B22222">.  svd  - singular value solver</font>
+<a name="line360">360: </a><font color="#B22222">/*@</font>
+<a name="line361">361: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a> - Returns the flag indicating if H(A) is built explicitly</font>
 
-<a name="line357">357: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line358">358: </a><font color="#B22222">.  explicit - the mode flag</font>
-
-<a name="line360">360: </a><font color="#B22222">   Level: advanced</font>
+<a name="line363">363: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line362">362: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>()</font>
-<a name="line363">363: </a><font color="#B22222">@*/</font>
-<a name="line364">364: </a><strong><font color="#4169E1"><a name="SVDCyclicGetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *explicitmatrix)</font></strong>
-<a name="line365">365: </a>{
-
-<a name="line371">371: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCyclicGetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*),(svd,explicitmatrix));
-<a name="line372">372: </a>  <font color="#4169E1">return</font>(0);
-<a name="line373">373: </a>}
-
-<a name="line377">377: </a><strong><font color="#4169E1"><a name="SVDCyclicSetEPS_Cyclic"></a>static PetscErrorCode SVDCyclicSetEPS_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line378">378: </a>{
-<a name="line379">379: </a>  PetscErrorCode  ierr;
-<a name="line380">380: </a>  SVD_CYCLIC      *cyclic = (SVD_CYCLIC*)svd->data;
-
-<a name="line383">383: </a>  PetscObjectReference((PetscObject)eps);
-<a name="line384">384: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cyclic->eps);
-<a name="line385">385: </a>  cyclic->eps = eps;
-<a name="line386">386: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->eps);
-<a name="line387">387: </a>  svd->state = SVD_STATE_INITIAL;
-<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
-<a name="line389">389: </a>}
-
-<a name="line393">393: </a><font color="#B22222">/*@</font>
-<a name="line394">394: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a> - Associate an eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
-<a name="line395">395: </a><font color="#B22222">   singular value solver.</font>
-
-<a name="line397">397: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line399">399: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line400">400: </a><font color="#B22222">+  svd - singular value solver</font>
-<a name="line401">401: </a><font color="#B22222">-  eps - the eigensolver object</font>
-
-<a name="line403">403: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line405">405: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>()</font>
-<a name="line406">406: </a><font color="#B22222">@*/</font>
-<a name="line407">407: </a><strong><font color="#4169E1"><a name="SVDCyclicSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
-<a name="line408">408: </a>{
-
-<a name="line415">415: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCyclicSetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(svd,eps));
-<a name="line416">416: </a>  <font color="#4169E1">return</font>(0);
-<a name="line417">417: </a>}
-
-<a name="line421">421: </a><strong><font color="#4169E1"><a name="SVDCyclicGetEPS_Cyclic"></a>static PetscErrorCode SVDCyclicGetEPS_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line422">422: </a>{
-<a name="line424">424: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
-
-<a name="line427">427: </a>  <font color="#4169E1">if</font> (!cyclic->eps) {
-<a name="line428">428: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)svd),&cyclic->eps);
-<a name="line429">429: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(cyclic->eps,((PetscObject)svd)->prefix);
-<a name="line430">430: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(cyclic->eps,<font color="#666666">"svd_"</font>);
-<a name="line431">431: </a>    PetscObjectIncrementTabLevel((PetscObject)cyclic->eps,(PetscObject)svd,1);
-<a name="line432">432: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->eps);
-<a name="line433">433: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cyclic->eps,EPS_LARGEST_REAL);
-<a name="line434">434: </a>    <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(cyclic->eps,SVDMonitor_Cyclic,svd,NULL);
-<a name="line435">435: </a>  }
-<a name="line436">436: </a>  *eps = cyclic->eps;
-<a name="line437">437: </a>  <font color="#4169E1">return</font>(0);
-<a name="line438">438: </a>}
-
-<a name="line442">442: </a><font color="#B22222">/*@</font>
-<a name="line443">443: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a> - Retrieve the eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
-<a name="line444">444: </a><font color="#B22222">   to the singular value solver.</font>
-
-<a name="line446">446: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line448">448: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line449">449: </a><font color="#B22222">.  svd - singular value solver</font>
-
-<a name="line451">451: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line452">452: </a><font color="#B22222">.  eps - the eigensolver object</font>
-
-<a name="line454">454: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line456">456: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a>()</font>
-<a name="line457">457: </a><font color="#B22222">@*/</font>
-<a name="line458">458: </a><strong><font color="#4169E1"><a name="SVDCyclicGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
-<a name="line459">459: </a>{
-
-<a name="line465">465: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCyclicGetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(svd,eps));
-<a name="line466">466: </a>  <font color="#4169E1">return</font>(0);
-<a name="line467">467: </a>}
-
-<a name="line471">471: </a><strong><font color="#4169E1"><a name="SVDView_Cyclic"></a>PetscErrorCode SVDView_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line472">472: </a>{
-<a name="line474">474: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
-
-<a name="line477">477: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&cyclic->eps); }
-<a name="line478">478: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Cyclic: %s matrix\n"</font>,cyclic->explicitmatrix?<font color="#666666">"explicit"</font>:<font color="#666666">"implicit"</font>);
-<a name="line479">479: </a>  PetscViewerASCIIPushTab(viewer);
-<a name="line480">480: </a>  <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(cyclic->eps,viewer);
-<a name="line481">481: </a>  PetscViewerASCIIPopTab(viewer);
-<a name="line482">482: </a>  <font color="#4169E1">return</font>(0);
-<a name="line483">483: </a>}
-
-<a name="line487">487: </a><strong><font color="#4169E1"><a name="SVDReset_Cyclic"></a>PetscErrorCode SVDReset_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line488">488: </a>{
-<a name="line490">490: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
-
-<a name="line493">493: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(cyclic->eps); }
-<a name="line494">494: </a>  MatDestroy(&cyclic->mat);
-<a name="line495">495: </a>  VecDestroy(&cyclic->x1);
-<a name="line496">496: </a>  VecDestroy(&cyclic->x2);
-<a name="line497">497: </a>  VecDestroy(&cyclic->y1);
-<a name="line498">498: </a>  VecDestroy(&cyclic->y2);
-<a name="line499">499: </a>  <font color="#4169E1">return</font>(0);
-<a name="line500">500: </a>}
-
-<a name="line504">504: </a><strong><font color="#4169E1"><a name="SVDDestroy_Cyclic"></a>PetscErrorCode SVDDestroy_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line505">505: </a>{
-<a name="line507">507: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
-
-<a name="line510">510: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cyclic->eps);
-<a name="line511">511: </a>  PetscFree(svd->data);
-<a name="line512">512: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetEPS_C"</font>,NULL);
-<a name="line513">513: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetEPS_C"</font>,NULL);
-<a name="line514">514: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetExplicitMatrix_C"</font>,NULL);
-<a name="line515">515: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetExplicitMatrix_C"</font>,NULL);
-<a name="line516">516: </a>  <font color="#4169E1">return</font>(0);
-<a name="line517">517: </a>}
-
-<a name="line521">521: </a><strong><font color="#4169E1"><a name="SVDCreate_Cyclic"></a>PETSC_EXTERN PetscErrorCode SVDCreate_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line522">522: </a>{
-<a name="line524">524: </a>  SVD_CYCLIC     *cyclic;
-
-<a name="line527">527: </a>  PetscNewLog(svd,&cyclic);
-<a name="line528">528: </a>  svd->data                      = (void*)cyclic;
-<a name="line529">529: </a>  svd->ops->solve                = SVDSolve_Cyclic;
-<a name="line530">530: </a>  svd->ops->setup                = SVDSetUp_Cyclic;
-<a name="line531">531: </a>  svd->ops->setfromoptions       = SVDSetFromOptions_Cyclic;
-<a name="line532">532: </a>  svd->ops->destroy              = SVDDestroy_Cyclic;
-<a name="line533">533: </a>  svd->ops->reset                = SVDReset_Cyclic;
-<a name="line534">534: </a>  svd->ops->view                 = SVDView_Cyclic;
-<a name="line535">535: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetEPS_C"</font>,SVDCyclicSetEPS_Cyclic);
-<a name="line536">536: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetEPS_C"</font>,SVDCyclicGetEPS_Cyclic);
-<a name="line537">537: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetExplicitMatrix_C"</font>,SVDCyclicSetExplicitMatrix_Cyclic);
-<a name="line538">538: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetExplicitMatrix_C"</font>,SVDCyclicGetExplicitMatrix_Cyclic);
-<a name="line539">539: </a>  <font color="#4169E1">return</font>(0);
-<a name="line540">540: </a>}
+<a name="line365">365: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line366">366: </a><font color="#B22222">.  svd  - singular value solver</font>
+
+<a name="line368">368: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line369">369: </a><font color="#B22222">.  explicit - the mode flag</font>
+
+<a name="line371">371: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line373">373: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicSetExplicitMatrix.html#SVDCyclicSetExplicitMatrix">SVDCyclicSetExplicitMatrix</a>()</font>
+<a name="line374">374: </a><font color="#B22222">@*/</font>
+<a name="line375">375: </a><strong><font color="#4169E1"><a name="SVDCyclicGetExplicitMatrix"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicGetExplicitMatrix.html#SVDCyclicGetExplicitMatrix">SVDCyclicGetExplicitMatrix</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *explicitmatrix)</font></strong>
+<a name="line376">376: </a>{
+
+<a name="line382">382: </a>  PetscUseMethod(svd,<font color="#666666">"SVDCyclicGetExplicitMatrix_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*),(svd,explicitmatrix));
+<a name="line383">383: </a>  <font color="#4169E1">return</font>(0);
+<a name="line384">384: </a>}
+
+<a name="line388">388: </a><strong><font color="#4169E1"><a name="SVDCyclicSetEPS_Cyclic"></a>static PetscErrorCode SVDCyclicSetEPS_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line389">389: </a>{
+<a name="line390">390: </a>  PetscErrorCode  ierr;
+<a name="line391">391: </a>  SVD_CYCLIC      *cyclic = (SVD_CYCLIC*)svd->data;
+
+<a name="line394">394: </a>  PetscObjectReference((PetscObject)eps);
+<a name="line395">395: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cyclic->eps);
+<a name="line396">396: </a>  cyclic->eps = eps;
+<a name="line397">397: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->eps);
+<a name="line398">398: </a>  svd->state = SVD_STATE_INITIAL;
+<a name="line399">399: </a>  <font color="#4169E1">return</font>(0);
+<a name="line400">400: </a>}
+
+<a name="line404">404: </a><font color="#B22222">/*@</font>
+<a name="line405">405: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a> - Associate an eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) to the</font>
+<a name="line406">406: </a><font color="#B22222">   singular value solver.</font>
+
+<a name="line408">408: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line410">410: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line411">411: </a><font color="#B22222">+  svd - singular value solver</font>
+<a name="line412">412: </a><font color="#B22222">-  eps - the eigensolver object</font>
+
+<a name="line414">414: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line416">416: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>()</font>
+<a name="line417">417: </a><font color="#B22222">@*/</font>
+<a name="line418">418: </a><strong><font color="#4169E1"><a name="SVDCyclicSetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> eps)</font></strong>
+<a name="line419">419: </a>{
+
+<a name="line426">426: </a>  PetscTryMethod(svd,<font color="#666666">"SVDCyclicSetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>),(svd,eps));
+<a name="line427">427: </a>  <font color="#4169E1">return</font>(0);
+<a name="line428">428: </a>}
+
+<a name="line432">432: </a><strong><font color="#4169E1"><a name="SVDCyclicGetEPS_Cyclic"></a>static PetscErrorCode SVDCyclicGetEPS_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line433">433: </a>{
+<a name="line435">435: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
+
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (!cyclic->eps) {
+<a name="line439">439: </a>    <a href="../../../../docs/manualpages/EPS/EPSCreate.html#EPSCreate">EPSCreate</a>(PetscObjectComm((PetscObject)svd),&cyclic->eps);
+<a name="line440">440: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(cyclic->eps,((PetscObject)svd)->prefix);
+<a name="line441">441: </a>    <a href="../../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(cyclic->eps,<font color="#666666">"svd_cyclic_"</font>);
+<a name="line442">442: </a>    PetscObjectIncrementTabLevel((PetscObject)cyclic->eps,(PetscObject)svd,1);
+<a name="line443">443: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)cyclic->eps);
+<a name="line444">444: </a>    <a href="../../../../docs/manualpages/EPS/EPSSetWhichEigenpairs.html#EPSSetWhichEigenpairs">EPSSetWhichEigenpairs</a>(cyclic->eps,EPS_LARGEST_REAL);
+<a name="line445">445: </a>    <a href="../../../../docs/manualpages/EPS/EPSMonitorSet.html#EPSMonitorSet">EPSMonitorSet</a>(cyclic->eps,EPSMonitor_Cyclic,svd,NULL);
+<a name="line446">446: </a>  }
+<a name="line447">447: </a>  *eps = cyclic->eps;
+<a name="line448">448: </a>  <font color="#4169E1">return</font>(0);
+<a name="line449">449: </a>}
+
+<a name="line453">453: </a><font color="#B22222">/*@</font>
+<a name="line454">454: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a> - Retrieve the eigensolver object (<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>) associated</font>
+<a name="line455">455: </a><font color="#B22222">   to the singular value solver.</font>
+
+<a name="line457">457: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line459">459: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line460">460: </a><font color="#B22222">.  svd - singular value solver</font>
+
+<a name="line462">462: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line463">463: </a><font color="#B22222">.  eps - the eigensolver object</font>
+
+<a name="line465">465: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line467">467: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDCyclicSetEPS.html#SVDCyclicSetEPS">SVDCyclicSetEPS</a>()</font>
+<a name="line468">468: </a><font color="#B22222">@*/</font>
+<a name="line469">469: </a><strong><font color="#4169E1"><a name="SVDCyclicGetEPS"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a> *eps)</font></strong>
+<a name="line470">470: </a>{
+
+<a name="line476">476: </a>  PetscUseMethod(svd,<font color="#666666">"SVDCyclicGetEPS_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,<a href="../../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>*),(svd,eps));
+<a name="line477">477: </a>  <font color="#4169E1">return</font>(0);
+<a name="line478">478: </a>}
+
+<a name="line482">482: </a><strong><font color="#4169E1"><a name="SVDView_Cyclic"></a>PetscErrorCode SVDView_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line483">483: </a>{
+<a name="line485">485: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
+<a name="line486">486: </a>  PetscBool      isascii;
+
+<a name="line489">489: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line490">490: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line491">491: </a>    <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&cyclic->eps); }
+<a name="line492">492: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Cyclic: %s matrix\n"</font>,cyclic->explicitmatrix?<font color="#666666">"explicit"</font>:<font color="#666666">"implicit"</font>);
+<a name="line493">493: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line494">494: </a>    <a href="../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(cyclic->eps,viewer);
+<a name="line495">495: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line496">496: </a>  }
+<a name="line497">497: </a>  <font color="#4169E1">return</font>(0);
+<a name="line498">498: </a>}
+
+<a name="line502">502: </a><strong><font color="#4169E1"><a name="SVDReset_Cyclic"></a>PetscErrorCode SVDReset_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line503">503: </a>{
+<a name="line505">505: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
+
+<a name="line508">508: </a>  <font color="#4169E1">if</font> (!cyclic->eps) { <a href="../../../../docs/manualpages/EPS/EPSReset.html#EPSReset">EPSReset</a>(cyclic->eps); }
+<a name="line509">509: </a>  MatDestroy(&cyclic->mat);
+<a name="line510">510: </a>  VecDestroy(&cyclic->x1);
+<a name="line511">511: </a>  VecDestroy(&cyclic->x2);
+<a name="line512">512: </a>  VecDestroy(&cyclic->y1);
+<a name="line513">513: </a>  VecDestroy(&cyclic->y2);
+<a name="line514">514: </a>  <font color="#4169E1">return</font>(0);
+<a name="line515">515: </a>}
+
+<a name="line519">519: </a><strong><font color="#4169E1"><a name="SVDDestroy_Cyclic"></a>PetscErrorCode SVDDestroy_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line520">520: </a>{
+<a name="line522">522: </a>  SVD_CYCLIC     *cyclic = (SVD_CYCLIC*)svd->data;
+
+<a name="line525">525: </a>  <a href="../../../../docs/manualpages/EPS/EPSDestroy.html#EPSDestroy">EPSDestroy</a>(&cyclic->eps);
+<a name="line526">526: </a>  PetscFree(svd->data);
+<a name="line527">527: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetEPS_C"</font>,NULL);
+<a name="line528">528: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetEPS_C"</font>,NULL);
+<a name="line529">529: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetExplicitMatrix_C"</font>,NULL);
+<a name="line530">530: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetExplicitMatrix_C"</font>,NULL);
+<a name="line531">531: </a>  <font color="#4169E1">return</font>(0);
+<a name="line532">532: </a>}
+
+<a name="line536">536: </a><strong><font color="#4169E1"><a name="SVDCreate_Cyclic"></a>PETSC_EXTERN PetscErrorCode SVDCreate_Cyclic(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line537">537: </a>{
+<a name="line539">539: </a>  SVD_CYCLIC     *cyclic;
+
+<a name="line542">542: </a>  PetscNewLog(svd,&cyclic);
+<a name="line543">543: </a>  svd->data                      = (void*)cyclic;
+<a name="line544">544: </a>  svd->ops->solve                = SVDSolve_Cyclic;
+<a name="line545">545: </a>  svd->ops->setup                = SVDSetUp_Cyclic;
+<a name="line546">546: </a>  svd->ops->setfromoptions       = SVDSetFromOptions_Cyclic;
+<a name="line547">547: </a>  svd->ops->destroy              = SVDDestroy_Cyclic;
+<a name="line548">548: </a>  svd->ops->reset                = SVDReset_Cyclic;
+<a name="line549">549: </a>  svd->ops->view                 = SVDView_Cyclic;
+<a name="line550">550: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetEPS_C"</font>,SVDCyclicSetEPS_Cyclic);
+<a name="line551">551: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetEPS_C"</font>,SVDCyclicGetEPS_Cyclic);
+<a name="line552">552: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicSetExplicitMatrix_C"</font>,SVDCyclicSetExplicitMatrix_Cyclic);
+<a name="line553">553: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDCyclicGetExplicitMatrix_C"</font>,SVDCyclicGetExplicitMatrix_Cyclic);
+<a name="line554">554: </a>  <font color="#4169E1">return</font>(0);
+<a name="line555">555: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/impls/cyclic/index.html b/src/svd/impls/cyclic/index.html
index d664f9a..c2d3f0e 100644
--- a/src/svd/impls/cyclic/index.html
+++ b/src/svd/impls/cyclic/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/cyclic/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/cyclic/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/impls/cyclic/makefile b/src/svd/impls/cyclic/makefile
index 9802f5c..ab7e248 100644
--- a/src/svd/impls/cyclic/makefile
+++ b/src/svd/impls/cyclic/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/impls/cyclic/makefile.html b/src/svd/impls/cyclic/makefile.html
index 4ca5af6..1fb67a4 100644
--- a/src/svd/impls/cyclic/makefile.html
+++ b/src/svd/impls/cyclic/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/cyclic/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:41+00:00">
+<meta name="date" content="2016-05-16T10:33:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/cyclic/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/cyclic/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/impls/index.html b/src/svd/impls/index.html
index f853a5a..f1eb0a9 100644
--- a/src/svd/impls/index.html
+++ b/src/svd/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/impls/lanczos/gklanczos.c b/src/svd/impls/lanczos/gklanczos.c
index c4186d8..01a2acb 100644
--- a/src/svd/impls/lanczos/gklanczos.c
+++ b/src/svd/impls/lanczos/gklanczos.c
@@ -21,7 +21,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -58,7 +58,7 @@ PetscErrorCode SVDSetUp_Lanczos(SVD svd)
   ierr = SVDSetDimensions_Default(svd);CHKERRQ(ierr);
   if (svd->ncv>svd->nsv+svd->mpd) SETERRQ(PetscObjectComm((PetscObject)svd),1,"The value of ncv must not be larger than nev+mpd");
   if (!svd->max_it) svd->max_it = PetscMax(N/svd->ncv,100);
-  svd->leftbasis = (lanczos->oneside)? PETSC_FALSE: PETSC_TRUE;
+  svd->leftbasis = PetscNot(lanczos->oneside);
   ierr = SVDAllocateSolution(svd,1);CHKERRQ(ierr);
   ierr = DSSetType(svd->ds,DSSVD);CHKERRQ(ierr);
   ierr = DSSetCompact(svd->ds,PETSC_TRUE);CHKERRQ(ierr);
@@ -181,7 +181,7 @@ PetscErrorCode SVDSolve_Lanczos(SVD svd)
 {
   PetscErrorCode ierr;
   SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
-  PetscReal      *alpha,*beta,lastbeta,norm;
+  PetscReal      *alpha,*beta,lastbeta,norm,resnorm;
   PetscScalar    *swork,*w,*Q,*PT;
   PetscInt       i,k,j,nv,ld;
   Vec            u=0,u_1=0;
@@ -200,7 +200,7 @@ PetscErrorCode SVDSolve_Lanczos(SVD svd)
 
   /* normalize start vector */
   if (!svd->nini) {
-    ierr = BVSetRandomColumn(svd->V,0,svd->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(svd->V,0);CHKERRQ(ierr);
     ierr = BVNormColumn(svd->V,0,NORM_2,&norm);CHKERRQ(ierr);
     ierr = BVScaleColumn(svd->V,0,1.0/norm);CHKERRQ(ierr);
   }
@@ -234,8 +234,8 @@ PetscErrorCode SVDSolve_Lanczos(SVD svd)
     ierr = DSGetArray(svd->ds,DS_MAT_U,&Q);CHKERRQ(ierr);
     for (i=svd->nconv;i<nv;i++) {
       svd->sigma[i] = PetscRealPart(w[i]);
-      svd->errest[i] = PetscAbsScalar(Q[nv-1+i*ld])*lastbeta;
-      if (svd->sigma[i] > svd->tol) svd->errest[i] /= svd->sigma[i];
+      resnorm = PetscAbsScalar(Q[nv-1+i*ld])*lastbeta;
+      ierr = (*svd->converged)(svd,svd->sigma[i],resnorm,&svd->errest[i],svd->convergedctx);CHKERRQ(ierr);
       if (conv) {
         if (svd->errest[i] < svd->tol) k++;
         else conv = PETSC_FALSE;
@@ -244,8 +244,7 @@ PetscErrorCode SVDSolve_Lanczos(SVD svd)
     ierr = DSRestoreArray(svd->ds,DS_MAT_U,&Q);CHKERRQ(ierr);
 
     /* check convergence */
-    if (svd->its >= svd->max_it) svd->reason = SVD_DIVERGED_ITS;
-    if (svd->nconv+k >= svd->nsv) svd->reason = SVD_CONVERGED_TOL;
+    ierr = (*svd->stopping)(svd,svd->its,svd->max_it,svd->nconv+k,svd->nsv,&svd->reason,svd->stoppingctx);CHKERRQ(ierr);
 
     /* compute restart vector */
     ierr = DSGetArray(svd->ds,DS_MAT_VT,&PT);CHKERRQ(ierr);
@@ -283,7 +282,7 @@ PetscErrorCode SVDSolve_Lanczos(SVD svd)
 
 #undef __FUNCT__
 #define __FUNCT__ "SVDSetFromOptions_Lanczos"
-PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,SVD svd)
+PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,SVD svd)
 {
   PetscErrorCode ierr;
   PetscBool      set,val;
@@ -350,6 +349,17 @@ PetscErrorCode SVDLanczosSetOneSide(SVD svd,PetscBool oneside)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "SVDLanczosGetOneSide_Lanczos"
+static PetscErrorCode SVDLanczosGetOneSide_Lanczos(SVD svd,PetscBool *oneside)
+{
+  SVD_LANCZOS *lanczos = (SVD_LANCZOS*)svd->data;
+
+  PetscFunctionBegin;
+  *oneside = lanczos->oneside;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "SVDLanczosGetOneSide"
 /*@
    SVDLanczosGetOneSide - Gets if the variant of the Lanczos method
@@ -374,18 +384,7 @@ PetscErrorCode SVDLanczosGetOneSide(SVD svd,PetscBool *oneside)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
   PetscValidPointer(oneside,2);
-  ierr = PetscTryMethod(svd,"SVDLanczosGetOneSide_C",(SVD,PetscBool*),(svd,oneside));CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "SVDLanczosGetOneSide_Lanczos"
-static PetscErrorCode SVDLanczosGetOneSide_Lanczos(SVD svd,PetscBool *oneside)
-{
-  SVD_LANCZOS *lanczos = (SVD_LANCZOS*)svd->data;
-
-  PetscFunctionBegin;
-  *oneside = lanczos->oneside;
+  ierr = PetscUseMethod(svd,"SVDLanczosGetOneSide_C",(SVD,PetscBool*),(svd,oneside));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -408,9 +407,13 @@ PetscErrorCode SVDView_Lanczos(SVD svd,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  ierr = PetscViewerASCIIPrintf(viewer,"  Lanczos: %s-sided reorthogonalization\n",lanczos->oneside? "one": "two");CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Lanczos: %s-sided reorthogonalization\n",lanczos->oneside? "one": "two");CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/svd/impls/lanczos/gklanczos.c.html b/src/svd/impls/lanczos/gklanczos.c.html
index b2a47b7..b136186 100644
--- a/src/svd/impls/lanczos/gklanczos.c.html
+++ b/src/svd/impls/lanczos/gklanczos.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/lanczos/gklanczos.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:41+00:00">
+<meta name="date" content="2016-05-16T10:33:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/lanczos/gklanczos.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/lanczos/gklanczos.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc singular value solver: "lanczos"</font>
@@ -33,7 +33,7 @@
 
 <a name="line22"> 22: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line23"> 23: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line26"> 26: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -66,7 +66,7 @@
 <a name="line58"> 58: </a>  SVDSetDimensions_Default(svd);
 <a name="line59"> 59: </a>  <font color="#4169E1">if</font> (svd->ncv>svd->nsv+svd->mpd) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
 <a name="line60"> 60: </a>  <font color="#4169E1">if</font> (!svd->max_it) svd->max_it = PetscMax(N/svd->ncv,100);
-<a name="line61"> 61: </a>  svd->leftbasis = (lanczos->oneside)? PETSC_FALSE: PETSC_TRUE;
+<a name="line61"> 61: </a>  svd->leftbasis = PetscNot(lanczos->oneside);
 <a name="line62"> 62: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,1);
 <a name="line63"> 63: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(svd->ds,DSSVD);
 <a name="line64"> 64: </a>  <a href="../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(svd->ds,PETSC_TRUE);
@@ -178,7 +178,7 @@
 <a name="line180">180: </a><strong><font color="#4169E1"><a name="SVDSolve_Lanczos"></a>PetscErrorCode SVDSolve_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
 <a name="line181">181: </a>{
 <a name="line183">183: </a>  SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
-<a name="line184">184: </a>  PetscReal      *alpha,*beta,lastbeta,norm;
+<a name="line184">184: </a>  PetscReal      *alpha,*beta,lastbeta,norm,resnorm;
 <a name="line185">185: </a>  PetscScalar    *swork,*w,*Q,*PT;
 <a name="line186">186: </a>  PetscInt       i,k,j,nv,ld;
 <a name="line187">187: </a>  Vec            u=0,u_1=0;
@@ -196,7 +196,7 @@
 
 <a name="line201">201: </a>  <font color="#B22222">/* normalize start vector */</font>
 <a name="line202">202: </a>  <font color="#4169E1">if</font> (!svd->nini) {
-<a name="line203">203: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(svd->V,0,svd->rand);
+<a name="line203">203: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(svd->V,0);
 <a name="line204">204: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(svd->V,0,NORM_2,&norm);
 <a name="line205">205: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,0,1.0/norm);
 <a name="line206">206: </a>  }
@@ -230,8 +230,8 @@
 <a name="line234">234: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_U,&Q);
 <a name="line235">235: </a>    <font color="#4169E1">for</font> (i=svd->nconv;i<nv;i++) {
 <a name="line236">236: </a>      svd->sigma[i] = PetscRealPart(w[i]);
-<a name="line237">237: </a>      svd->errest[i] = PetscAbsScalar(Q[nv-1+i*ld])*lastbeta;
-<a name="line238">238: </a>      <font color="#4169E1">if</font> (svd->sigma[i] > svd->tol) svd->errest[i] /= svd->sigma[i];
+<a name="line237">237: </a>      resnorm = PetscAbsScalar(Q[nv-1+i*ld])*lastbeta;
+<a name="line238">238: </a>      (*svd->converged)(svd,svd->sigma[i],resnorm,&svd->errest[i],svd->convergedctx);
 <a name="line239">239: </a>      <font color="#4169E1">if</font> (conv) {
 <a name="line240">240: </a>        <font color="#4169E1">if</font> (svd->errest[i] < svd->tol) k++;
 <a name="line241">241: </a>        <font color="#4169E1">else</font> conv = PETSC_FALSE;
@@ -240,162 +240,165 @@
 <a name="line244">244: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_U,&Q);
 
 <a name="line246">246: </a>    <font color="#B22222">/* check convergence */</font>
-<a name="line247">247: </a>    <font color="#4169E1">if</font> (svd->its >= svd->max_it) svd->reason = SVD_DIVERGED_ITS;
-<a name="line248">248: </a>    <font color="#4169E1">if</font> (svd->nconv+k >= svd->nsv) svd->reason = SVD_CONVERGED_TOL;
-
-<a name="line250">250: </a>    <font color="#B22222">/* compute restart vector */</font>
-<a name="line251">251: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_VT,&PT);
-<a name="line252">252: </a>    <font color="#4169E1">if</font> (svd->reason == SVD_CONVERGED_ITERATING) {
-<a name="line253">253: </a>      <font color="#4169E1">for</font> (j=svd->nconv;j<nv;j++) swork[j-svd->nconv] = PT[k+svd->nconv+j*ld];
-<a name="line254">254: </a>      <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(svd->V,1.0,0.0,nv,swork);
-<a name="line255">255: </a>    }
-<a name="line256">256: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_VT,&PT);
-
-<a name="line258">258: </a>    <font color="#B22222">/* compute converged singular vectors */</font>
-<a name="line259">259: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_VT,&VT);
-<a name="line260">260: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(svd->V,VT,svd->nconv,svd->nconv+k);
-<a name="line261">261: </a>    MatDestroy(&VT);
-<a name="line262">262: </a>    <font color="#4169E1">if</font> (!lanczos->oneside) {
-<a name="line263">263: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_U,&U);
-<a name="line264">264: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(svd->U,U,svd->nconv,svd->nconv+k);
-<a name="line265">265: </a>      MatDestroy(&U);
-<a name="line266">266: </a>    }
-
-<a name="line268">268: </a>    <font color="#B22222">/* copy restart vector from the last column */</font>
-<a name="line269">269: </a>    <font color="#4169E1">if</font> (svd->reason == SVD_CONVERGED_ITERATING) {
-<a name="line270">270: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(svd->V,nv,svd->nconv+k);
-<a name="line271">271: </a>    }
-
-<a name="line273">273: </a>    svd->nconv += k;
-<a name="line274">274: </a>    SVDMonitor(svd,svd->its,svd->nconv,svd->sigma,svd->errest,nv);
-<a name="line275">275: </a>  }
-
-<a name="line277">277: </a>  <font color="#B22222">/* free working space */</font>
-<a name="line278">278: </a>  VecDestroy(&u);
-<a name="line279">279: </a>  VecDestroy(&u_1);
-<a name="line280">280: </a>  PetscFree2(w,swork);
-<a name="line281">281: </a>  <font color="#4169E1">return</font>(0);
-<a name="line282">282: </a>}
-
-<a name="line286">286: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_Lanczos"></a>PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line287">287: </a>{
-<a name="line289">289: </a>  PetscBool      set,val;
-<a name="line290">290: </a>  SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
-
-<a name="line293">293: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> Lanczos Options"</font>);
-<a name="line294">294: </a>  PetscOptionsBool(<font color="#666666">"-svd_lanczos_oneside"</font>,<font color="#666666">"Lanczos one-side reorthogonalization"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>"</font>,lanczos->oneside,&val,&set);
-<a name="line295">295: </a>  <font color="#4169E1">if</font> (set) {
-<a name="line296">296: </a>    <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>(svd,val);
-<a name="line297">297: </a>  }
-<a name="line298">298: </a>  PetscOptionsTail();
-<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
-<a name="line300">300: </a>}
-
-<a name="line304">304: </a><strong><font color="#4169E1"><a name="SVDLanczosSetOneSide_Lanczos"></a>static PetscErrorCode SVDLanczosSetOneSide_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
-<a name="line305">305: </a>{
-<a name="line306">306: </a>  SVD_LANCZOS *lanczos = (SVD_LANCZOS*)svd->data;
-
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (lanczos->oneside != oneside) {
-<a name="line310">310: </a>    lanczos->oneside = oneside;
-<a name="line311">311: </a>    svd->state = SVD_STATE_INITIAL;
-<a name="line312">312: </a>  }
-<a name="line313">313: </a>  <font color="#4169E1">return</font>(0);
-<a name="line314">314: </a>}
-
-<a name="line318">318: </a><font color="#B22222">/*@</font>
-<a name="line319">319: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a> - Indicate if the variant of the Lanczos method</font>
-<a name="line320">320: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
-
-<a name="line322">322: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line324">324: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line325">325: </a><font color="#B22222">+  svd     - singular value solver</font>
-<a name="line326">326: </a><font color="#B22222">-  oneside - boolean flag indicating if the method is one-sided or not</font>
-
-<a name="line328">328: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line329">329: </a><font color="#B22222">.  -svd_lanczos_oneside <boolean> - Indicates the boolean flag</font>
-
-<a name="line331">331: </a><font color="#B22222">   Note:</font>
-<a name="line332">332: </a><font color="#B22222">   By default, a two-sided variant is selected, which is sometimes slightly</font>
-<a name="line333">333: </a><font color="#B22222">   more robust. However, the one-sided variant is faster because it avoids</font>
-<a name="line334">334: </a><font color="#B22222">   the orthogonalization associated to left singular vectors. It also saves</font>
-<a name="line335">335: </a><font color="#B22222">   the memory required for storing such vectors.</font>
-
-<a name="line337">337: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line339">339: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>()</font>
-<a name="line340">340: </a><font color="#B22222">@*/</font>
-<a name="line341">341: </a><strong><font color="#4169E1"><a name="SVDLanczosSetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
-<a name="line342">342: </a>{
-
-<a name="line348">348: </a>  PetscTryMethod(svd,<font color="#666666">"SVDLanczosSetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool),(svd,oneside));
-<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
-<a name="line350">350: </a>}
-
-<a name="line354">354: </a><font color="#B22222">/*@</font>
-<a name="line355">355: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</a> - Gets if the variant of the Lanczos method</font>
-<a name="line356">356: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
-
-<a name="line358">358: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line360">360: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line361">361: </a><font color="#B22222">.  svd     - singular value solver</font>
-
-<a name="line363">363: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line364">364: </a><font color="#B22222">.  oneside - boolean flag indicating if the method is one-sided or not</font>
-
-<a name="line366">366: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line368">368: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>()</font>
-<a name="line369">369: </a><font color="#B22222">@*/</font>
-<a name="line370">370: </a><strong><font color="#4169E1"><a name="SVDLanczosGetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
-<a name="line371">371: </a>{
-
-<a name="line377">377: </a>  PetscTryMethod(svd,<font color="#666666">"SVDLanczosGetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*),(svd,oneside));
-<a name="line378">378: </a>  <font color="#4169E1">return</font>(0);
-<a name="line379">379: </a>}
-
-<a name="line383">383: </a><strong><font color="#4169E1"><a name="SVDLanczosGetOneSide_Lanczos"></a>static PetscErrorCode SVDLanczosGetOneSide_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
-<a name="line384">384: </a>{
-<a name="line385">385: </a>  SVD_LANCZOS *lanczos = (SVD_LANCZOS*)svd->data;
-
-<a name="line388">388: </a>  *oneside = lanczos->oneside;
-<a name="line389">389: </a>  <font color="#4169E1">return</font>(0);
-<a name="line390">390: </a>}
-
-<a name="line394">394: </a><strong><font color="#4169E1"><a name="SVDDestroy_Lanczos"></a>PetscErrorCode SVDDestroy_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line395">395: </a>{
-
-<a name="line399">399: </a>  PetscFree(svd->data);
-<a name="line400">400: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosSetOneSide_C"</font>,NULL);
-<a name="line401">401: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosGetOneSide_C"</font>,NULL);
-<a name="line402">402: </a>  <font color="#4169E1">return</font>(0);
-<a name="line403">403: </a>}
-
-<a name="line407">407: </a><strong><font color="#4169E1"><a name="SVDView_Lanczos"></a>PetscErrorCode SVDView_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line408">408: </a>{
-<a name="line410">410: </a>  SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
-
-<a name="line413">413: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Lanczos: %s-sided reorthogonalization\n"</font>,lanczos->oneside? <font color="#666666">"one"</font>: <font color="#666666">"two"</font>);
-<a name="line414">414: </a>  <font color="#4169E1">return</font>(0);
-<a name="line415">415: </a>}
-
-<a name="line419">419: </a><strong><font color="#4169E1"><a name="SVDCreate_Lanczos"></a>PETSC_EXTERN PetscErrorCode SVDCreate_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line420">420: </a>{
-<a name="line422">422: </a>  SVD_LANCZOS    *ctx;
-
-<a name="line425">425: </a>  PetscNewLog(svd,&ctx);
-<a name="line426">426: </a>  svd->data = (void*)ctx;
-
-<a name="line428">428: </a>  svd->ops->setup          = SVDSetUp_Lanczos;
-<a name="line429">429: </a>  svd->ops->solve          = SVDSolve_Lanczos;
-<a name="line430">430: </a>  svd->ops->destroy        = SVDDestroy_Lanczos;
-<a name="line431">431: </a>  svd->ops->setfromoptions = SVDSetFromOptions_Lanczos;
-<a name="line432">432: </a>  svd->ops->view           = SVDView_Lanczos;
-<a name="line433">433: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosSetOneSide_C"</font>,SVDLanczosSetOneSide_Lanczos);
-<a name="line434">434: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosGetOneSide_C"</font>,SVDLanczosGetOneSide_Lanczos);
-<a name="line435">435: </a>  <font color="#4169E1">return</font>(0);
-<a name="line436">436: </a>}
+<a name="line247">247: </a>    (*svd->stopping)(svd,svd->its,svd->max_it,svd->nconv+k,svd->nsv,&svd->reason,svd->stoppingctx);
+
+<a name="line249">249: </a>    <font color="#B22222">/* compute restart vector */</font>
+<a name="line250">250: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_VT,&PT);
+<a name="line251">251: </a>    <font color="#4169E1">if</font> (svd->reason == SVD_CONVERGED_ITERATING) {
+<a name="line252">252: </a>      <font color="#4169E1">for</font> (j=svd->nconv;j<nv;j++) swork[j-svd->nconv] = PT[k+svd->nconv+j*ld];
+<a name="line253">253: </a>      <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(svd->V,1.0,0.0,nv,swork);
+<a name="line254">254: </a>    }
+<a name="line255">255: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_VT,&PT);
+
+<a name="line257">257: </a>    <font color="#B22222">/* compute converged singular vectors */</font>
+<a name="line258">258: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_VT,&VT);
+<a name="line259">259: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(svd->V,VT,svd->nconv,svd->nconv+k);
+<a name="line260">260: </a>    MatDestroy(&VT);
+<a name="line261">261: </a>    <font color="#4169E1">if</font> (!lanczos->oneside) {
+<a name="line262">262: </a>      <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_U,&U);
+<a name="line263">263: </a>      <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(svd->U,U,svd->nconv,svd->nconv+k);
+<a name="line264">264: </a>      MatDestroy(&U);
+<a name="line265">265: </a>    }
+
+<a name="line267">267: </a>    <font color="#B22222">/* copy restart vector from the last column */</font>
+<a name="line268">268: </a>    <font color="#4169E1">if</font> (svd->reason == SVD_CONVERGED_ITERATING) {
+<a name="line269">269: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(svd->V,nv,svd->nconv+k);
+<a name="line270">270: </a>    }
+
+<a name="line272">272: </a>    svd->nconv += k;
+<a name="line273">273: </a>    SVDMonitor(svd,svd->its,svd->nconv,svd->sigma,svd->errest,nv);
+<a name="line274">274: </a>  }
+
+<a name="line276">276: </a>  <font color="#B22222">/* free working space */</font>
+<a name="line277">277: </a>  VecDestroy(&u);
+<a name="line278">278: </a>  VecDestroy(&u_1);
+<a name="line279">279: </a>  PetscFree2(w,swork);
+<a name="line280">280: </a>  <font color="#4169E1">return</font>(0);
+<a name="line281">281: </a>}
+
+<a name="line285">285: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_Lanczos"></a>PetscErrorCode SVDSetFromOptions_Lanczos(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line286">286: </a>{
+<a name="line288">288: </a>  PetscBool      set,val;
+<a name="line289">289: </a>  SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
+
+<a name="line292">292: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> Lanczos Options"</font>);
+<a name="line293">293: </a>  PetscOptionsBool(<font color="#666666">"-svd_lanczos_oneside"</font>,<font color="#666666">"Lanczos one-side reorthogonalization"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>"</font>,lanczos->oneside,&val,&set);
+<a name="line294">294: </a>  <font color="#4169E1">if</font> (set) {
+<a name="line295">295: </a>    <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>(svd,val);
+<a name="line296">296: </a>  }
+<a name="line297">297: </a>  PetscOptionsTail();
+<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
+<a name="line299">299: </a>}
+
+<a name="line303">303: </a><strong><font color="#4169E1"><a name="SVDLanczosSetOneSide_Lanczos"></a>static PetscErrorCode SVDLanczosSetOneSide_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
+<a name="line304">304: </a>{
+<a name="line305">305: </a>  SVD_LANCZOS *lanczos = (SVD_LANCZOS*)svd->data;
+
+<a name="line308">308: </a>  <font color="#4169E1">if</font> (lanczos->oneside != oneside) {
+<a name="line309">309: </a>    lanczos->oneside = oneside;
+<a name="line310">310: </a>    svd->state = SVD_STATE_INITIAL;
+<a name="line311">311: </a>  }
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
+
+<a name="line317">317: </a><font color="#B22222">/*@</font>
+<a name="line318">318: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a> - Indicate if the variant of the Lanczos method</font>
+<a name="line319">319: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
+
+<a name="line321">321: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line323">323: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line324">324: </a><font color="#B22222">+  svd     - singular value solver</font>
+<a name="line325">325: </a><font color="#B22222">-  oneside - boolean flag indicating if the method is one-sided or not</font>
+
+<a name="line327">327: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line328">328: </a><font color="#B22222">.  -svd_lanczos_oneside <boolean> - Indicates the boolean flag</font>
+
+<a name="line330">330: </a><font color="#B22222">   Note:</font>
+<a name="line331">331: </a><font color="#B22222">   By default, a two-sided variant is selected, which is sometimes slightly</font>
+<a name="line332">332: </a><font color="#B22222">   more robust. However, the one-sided variant is faster because it avoids</font>
+<a name="line333">333: </a><font color="#B22222">   the orthogonalization associated to left singular vectors. It also saves</font>
+<a name="line334">334: </a><font color="#B22222">   the memory required for storing such vectors.</font>
+
+<a name="line336">336: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line338">338: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>()</font>
+<a name="line339">339: </a><font color="#B22222">@*/</font>
+<a name="line340">340: </a><strong><font color="#4169E1"><a name="SVDLanczosSetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
+<a name="line341">341: </a>{
+
+<a name="line347">347: </a>  PetscTryMethod(svd,<font color="#666666">"SVDLanczosSetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool),(svd,oneside));
+<a name="line348">348: </a>  <font color="#4169E1">return</font>(0);
+<a name="line349">349: </a>}
+
+<a name="line353">353: </a><strong><font color="#4169E1"><a name="SVDLanczosGetOneSide_Lanczos"></a>static PetscErrorCode SVDLanczosGetOneSide_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
+<a name="line354">354: </a>{
+<a name="line355">355: </a>  SVD_LANCZOS *lanczos = (SVD_LANCZOS*)svd->data;
+
+<a name="line358">358: </a>  *oneside = lanczos->oneside;
+<a name="line359">359: </a>  <font color="#4169E1">return</font>(0);
+<a name="line360">360: </a>}
+
+<a name="line364">364: </a><font color="#B22222">/*@</font>
+<a name="line365">365: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</a> - Gets if the variant of the Lanczos method</font>
+<a name="line366">366: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
+
+<a name="line368">368: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line370">370: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line371">371: </a><font color="#B22222">.  svd     - singular value solver</font>
+
+<a name="line373">373: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line374">374: </a><font color="#B22222">.  oneside - boolean flag indicating if the method is one-sided or not</font>
+
+<a name="line376">376: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line378">378: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>()</font>
+<a name="line379">379: </a><font color="#B22222">@*/</font>
+<a name="line380">380: </a><strong><font color="#4169E1"><a name="SVDLanczosGetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDLanczosGetOneSide.html#SVDLanczosGetOneSide">SVDLanczosGetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
+<a name="line381">381: </a>{
+
+<a name="line387">387: </a>  PetscUseMethod(svd,<font color="#666666">"SVDLanczosGetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*),(svd,oneside));
+<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
+<a name="line389">389: </a>}
+
+<a name="line393">393: </a><strong><font color="#4169E1"><a name="SVDDestroy_Lanczos"></a>PetscErrorCode SVDDestroy_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line394">394: </a>{
+
+<a name="line398">398: </a>  PetscFree(svd->data);
+<a name="line399">399: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosSetOneSide_C"</font>,NULL);
+<a name="line400">400: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosGetOneSide_C"</font>,NULL);
+<a name="line401">401: </a>  <font color="#4169E1">return</font>(0);
+<a name="line402">402: </a>}
+
+<a name="line406">406: </a><strong><font color="#4169E1"><a name="SVDView_Lanczos"></a>PetscErrorCode SVDView_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line407">407: </a>{
+<a name="line409">409: </a>  SVD_LANCZOS    *lanczos = (SVD_LANCZOS*)svd->data;
+<a name="line410">410: </a>  PetscBool      isascii;
+
+<a name="line413">413: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line414">414: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line415">415: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Lanczos: %s-sided reorthogonalization\n"</font>,lanczos->oneside? <font color="#666666">"one"</font>: <font color="#666666">"two"</font>);
+<a name="line416">416: </a>  }
+<a name="line417">417: </a>  <font color="#4169E1">return</font>(0);
+<a name="line418">418: </a>}
+
+<a name="line422">422: </a><strong><font color="#4169E1"><a name="SVDCreate_Lanczos"></a>PETSC_EXTERN PetscErrorCode SVDCreate_Lanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line423">423: </a>{
+<a name="line425">425: </a>  SVD_LANCZOS    *ctx;
+
+<a name="line428">428: </a>  PetscNewLog(svd,&ctx);
+<a name="line429">429: </a>  svd->data = (void*)ctx;
+
+<a name="line431">431: </a>  svd->ops->setup          = SVDSetUp_Lanczos;
+<a name="line432">432: </a>  svd->ops->solve          = SVDSolve_Lanczos;
+<a name="line433">433: </a>  svd->ops->destroy        = SVDDestroy_Lanczos;
+<a name="line434">434: </a>  svd->ops->setfromoptions = SVDSetFromOptions_Lanczos;
+<a name="line435">435: </a>  svd->ops->view           = SVDView_Lanczos;
+<a name="line436">436: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosSetOneSide_C"</font>,SVDLanczosSetOneSide_Lanczos);
+<a name="line437">437: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDLanczosGetOneSide_C"</font>,SVDLanczosGetOneSide_Lanczos);
+<a name="line438">438: </a>  <font color="#4169E1">return</font>(0);
+<a name="line439">439: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/impls/lanczos/index.html b/src/svd/impls/lanczos/index.html
index 367ce4f..2e0aab1 100644
--- a/src/svd/impls/lanczos/index.html
+++ b/src/svd/impls/lanczos/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/lanczos/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/lanczos/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/impls/lanczos/makefile b/src/svd/impls/lanczos/makefile
index c79a688..bb8262f 100644
--- a/src/svd/impls/lanczos/makefile
+++ b/src/svd/impls/lanczos/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/impls/lanczos/makefile.html b/src/svd/impls/lanczos/makefile.html
index 590f753..2ff6de3 100644
--- a/src/svd/impls/lanczos/makefile.html
+++ b/src/svd/impls/lanczos/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/lanczos/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:42+00:00">
+<meta name="date" content="2016-05-16T10:33:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/lanczos/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/lanczos/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/impls/lapack/index.html b/src/svd/impls/lapack/index.html
index b5f22f3..f9bab39 100644
--- a/src/svd/impls/lapack/index.html
+++ b/src/svd/impls/lapack/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/lapack/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/lapack/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/impls/lapack/makefile b/src/svd/impls/lapack/makefile
index 28d09b2..e33933a 100644
--- a/src/svd/impls/lapack/makefile
+++ b/src/svd/impls/lapack/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/impls/lapack/makefile.html b/src/svd/impls/lapack/makefile.html
index 45c1d16..fea5738 100644
--- a/src/svd/impls/lapack/makefile.html
+++ b/src/svd/impls/lapack/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/lapack/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:41+00:00">
+<meta name="date" content="2016-05-16T10:33:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/lapack/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/lapack/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/impls/lapack/svdlapack.c b/src/svd/impls/lapack/svdlapack.c
index 6e7b82c..410bb32 100644
--- a/src/svd/impls/lapack/svdlapack.c
+++ b/src/svd/impls/lapack/svdlapack.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -34,6 +34,7 @@ PetscErrorCode SVDSetUp_LAPACK(SVD svd)
   ierr = SVDMatGetSize(svd,&M,&N);CHKERRQ(ierr);
   svd->ncv = N;
   if (svd->mpd) { ierr = PetscInfo(svd,"Warning: parameter mpd ignored\n");CHKERRQ(ierr); }
+  if (svd->stop!=SVD_STOP_BASIC) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,"User-defined stopping test not supported in this solver");
   svd->max_it = 1;
   svd->leftbasis = PETSC_TRUE;
   ierr = SVDAllocateSolution(svd,0);CHKERRQ(ierr);
diff --git a/src/svd/impls/lapack/svdlapack.c.html b/src/svd/impls/lapack/svdlapack.c.html
index 1ead1ba..b07a0ea 100644
--- a/src/svd/impls/lapack/svdlapack.c.html
+++ b/src/svd/impls/lapack/svdlapack.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/lapack/svdlapack.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:41+00:00">
+<meta name="date" content="2016-05-16T10:33:40+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/lapack/svdlapack.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/lapack/svdlapack.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This file implements a wrapper to the LAPACK <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> subroutines.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -42,79 +42,80 @@
 <a name="line34"> 34: </a>  SVDMatGetSize(svd,&M,&N);
 <a name="line35"> 35: </a>  svd->ncv = N;
 <a name="line36"> 36: </a>  <font color="#4169E1">if</font> (svd->mpd) { PetscInfo(svd,<font color="#666666">"Warning: parameter mpd ignored\n"</font>); }
-<a name="line37"> 37: </a>  svd->max_it = 1;
-<a name="line38"> 38: </a>  svd->leftbasis = PETSC_TRUE;
-<a name="line39"> 39: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,0);
-<a name="line40"> 40: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(svd->ds,DSSVD);
-<a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(svd->ds,PetscMax(M,N));
-<a name="line42"> 42: </a>  <font color="#4169E1">return</font>(0);
-<a name="line43"> 43: </a>}
-
-<a name="line47"> 47: </a><strong><font color="#4169E1"><a name="SVDSolve_LAPACK"></a>PetscErrorCode SVDSolve_LAPACK(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line48"> 48: </a>{
-<a name="line50"> 50: </a>  PetscInt       M,N,n,i,j,k,ld;
-<a name="line51"> 51: </a>  Mat            mat;
-<a name="line52"> 52: </a>  Vec            u,v;
-<a name="line53"> 53: </a>  PetscScalar    *pU,*pVT,*pmat,*pu,*pv,*A,*w;
-
-<a name="line56"> 56: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(svd->ds,&ld);
-<a name="line57"> 57: </a>  MatConvert(svd->OP,MATSEQDENSE,MAT_INITIAL_MATRIX,&mat);
-<a name="line58"> 58: </a>  MatGetSize(mat,&M,&N);
-<a name="line59"> 59: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(svd->ds,M,N,0,0);
-<a name="line60"> 60: </a>  MatDenseGetArray(mat,&pmat);
-<a name="line61"> 61: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_A,&A);
-<a name="line62"> 62: </a>  <font color="#4169E1">for</font> (i=0;i<M;i++)
-<a name="line63"> 63: </a>    <font color="#4169E1">for</font> (j=0;j<N;j++)
-<a name="line64"> 64: </a>      A[i+j*ld] = pmat[i+j*M];
-<a name="line65"> 65: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_A,&A);
-<a name="line66"> 66: </a>  MatDenseRestoreArray(mat,&pmat);
-<a name="line67"> 67: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(svd->ds,DS_STATE_RAW);
-
-<a name="line69"> 69: </a>  n = PetscMin(M,N);
-<a name="line70"> 70: </a>  PetscMalloc1(n,&w);
-<a name="line71"> 71: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(svd->ds,w,NULL);
-<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(svd->ds,w,NULL,NULL,NULL,NULL);
-
-<a name="line74"> 74: </a>  <font color="#B22222">/* copy singular vectors */</font>
-<a name="line75"> 75: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_U,&pU);
-<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_VT,&pVT);
-<a name="line77"> 77: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line78"> 78: </a>    <font color="#4169E1">if</font> (svd->which == SVD_SMALLEST) k = n - i - 1;
-<a name="line79"> 79: </a>    <font color="#4169E1">else</font> k = i;
-<a name="line80"> 80: </a>    svd->sigma[k] = PetscRealPart(w[i]);
-<a name="line81"> 81: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->U,k,&u);
-<a name="line82"> 82: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->V,k,&v);
-<a name="line83"> 83: </a>    VecGetArray(u,&pu);
-<a name="line84"> 84: </a>    VecGetArray(v,&pv);
-<a name="line85"> 85: </a>    <font color="#4169E1">if</font> (M>=N) {
-<a name="line86"> 86: </a>      <font color="#4169E1">for</font> (j=0;j<M;j++) pu[j] = pU[i*ld+j];
-<a name="line87"> 87: </a>      <font color="#4169E1">for</font> (j=0;j<N;j++) pv[j] = PetscConj(pVT[j*ld+i]);
-<a name="line88"> 88: </a>    } <font color="#4169E1">else</font> {
-<a name="line89"> 89: </a>      <font color="#4169E1">for</font> (j=0;j<N;j++) pu[j] = PetscConj(pVT[j*ld+i]);
-<a name="line90"> 90: </a>      <font color="#4169E1">for</font> (j=0;j<M;j++) pv[j] = pU[i*ld+j];
-<a name="line91"> 91: </a>    }
-<a name="line92"> 92: </a>    VecRestoreArray(u,&pu);
-<a name="line93"> 93: </a>    VecRestoreArray(v,&pv);
-<a name="line94"> 94: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->U,k,&u);
-<a name="line95"> 95: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->V,k,&v);
-<a name="line96"> 96: </a>  }
-<a name="line97"> 97: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_U,&pU);
-<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_VT,&pVT);
-
-<a name="line100">100: </a>  svd->nconv = n;
-<a name="line101">101: </a>  svd->reason = SVD_CONVERGED_TOL;
-
-<a name="line103">103: </a>  MatDestroy(&mat);
-<a name="line104">104: </a>  PetscFree(w);
-<a name="line105">105: </a>  <font color="#4169E1">return</font>(0);
-<a name="line106">106: </a>}
-
-<a name="line110">110: </a><strong><font color="#4169E1"><a name="SVDCreate_LAPACK"></a>PETSC_EXTERN PetscErrorCode SVDCreate_LAPACK(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line111">111: </a>{
-<a name="line113">113: </a>  svd->ops->setup   = SVDSetUp_LAPACK;
-<a name="line114">114: </a>  svd->ops->solve   = SVDSolve_LAPACK;
-<a name="line115">115: </a>  <font color="#4169E1">return</font>(0);
-<a name="line116">116: </a>}
+<a name="line37"> 37: </a>  <font color="#4169E1">if</font> (svd->stop!=SVD_STOP_BASIC) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_SUP,<font color="#666666">"User-defined stopping test not supported in this solver"</font>);
+<a name="line38"> 38: </a>  svd->max_it = 1;
+<a name="line39"> 39: </a>  svd->leftbasis = PETSC_TRUE;
+<a name="line40"> 40: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,0);
+<a name="line41"> 41: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(svd->ds,DSSVD);
+<a name="line42"> 42: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(svd->ds,PetscMax(M,N));
+<a name="line43"> 43: </a>  <font color="#4169E1">return</font>(0);
+<a name="line44"> 44: </a>}
+
+<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="SVDSolve_LAPACK"></a>PetscErrorCode SVDSolve_LAPACK(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line49"> 49: </a>{
+<a name="line51"> 51: </a>  PetscInt       M,N,n,i,j,k,ld;
+<a name="line52"> 52: </a>  Mat            mat;
+<a name="line53"> 53: </a>  Vec            u,v;
+<a name="line54"> 54: </a>  PetscScalar    *pU,*pVT,*pmat,*pu,*pv,*A,*w;
+
+<a name="line57"> 57: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(svd->ds,&ld);
+<a name="line58"> 58: </a>  MatConvert(svd->OP,MATSEQDENSE,MAT_INITIAL_MATRIX,&mat);
+<a name="line59"> 59: </a>  MatGetSize(mat,&M,&N);
+<a name="line60"> 60: </a>  <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(svd->ds,M,N,0,0);
+<a name="line61"> 61: </a>  MatDenseGetArray(mat,&pmat);
+<a name="line62"> 62: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_A,&A);
+<a name="line63"> 63: </a>  <font color="#4169E1">for</font> (i=0;i<M;i++)
+<a name="line64"> 64: </a>    <font color="#4169E1">for</font> (j=0;j<N;j++)
+<a name="line65"> 65: </a>      A[i+j*ld] = pmat[i+j*M];
+<a name="line66"> 66: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_A,&A);
+<a name="line67"> 67: </a>  MatDenseRestoreArray(mat,&pmat);
+<a name="line68"> 68: </a>  <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(svd->ds,DS_STATE_RAW);
+
+<a name="line70"> 70: </a>  n = PetscMin(M,N);
+<a name="line71"> 71: </a>  PetscMalloc1(n,&w);
+<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(svd->ds,w,NULL);
+<a name="line73"> 73: </a>  <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(svd->ds,w,NULL,NULL,NULL,NULL);
+
+<a name="line75"> 75: </a>  <font color="#B22222">/* copy singular vectors */</font>
+<a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_U,&pU);
+<a name="line77"> 77: </a>  <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_VT,&pVT);
+<a name="line78"> 78: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line79"> 79: </a>    <font color="#4169E1">if</font> (svd->which == SVD_SMALLEST) k = n - i - 1;
+<a name="line80"> 80: </a>    <font color="#4169E1">else</font> k = i;
+<a name="line81"> 81: </a>    svd->sigma[k] = PetscRealPart(w[i]);
+<a name="line82"> 82: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->U,k,&u);
+<a name="line83"> 83: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->V,k,&v);
+<a name="line84"> 84: </a>    VecGetArray(u,&pu);
+<a name="line85"> 85: </a>    VecGetArray(v,&pv);
+<a name="line86"> 86: </a>    <font color="#4169E1">if</font> (M>=N) {
+<a name="line87"> 87: </a>      <font color="#4169E1">for</font> (j=0;j<M;j++) pu[j] = pU[i*ld+j];
+<a name="line88"> 88: </a>      <font color="#4169E1">for</font> (j=0;j<N;j++) pv[j] = PetscConj(pVT[j*ld+i]);
+<a name="line89"> 89: </a>    } <font color="#4169E1">else</font> {
+<a name="line90"> 90: </a>      <font color="#4169E1">for</font> (j=0;j<N;j++) pu[j] = PetscConj(pVT[j*ld+i]);
+<a name="line91"> 91: </a>      <font color="#4169E1">for</font> (j=0;j<M;j++) pv[j] = pU[i*ld+j];
+<a name="line92"> 92: </a>    }
+<a name="line93"> 93: </a>    VecRestoreArray(u,&pu);
+<a name="line94"> 94: </a>    VecRestoreArray(v,&pv);
+<a name="line95"> 95: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->U,k,&u);
+<a name="line96"> 96: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->V,k,&v);
+<a name="line97"> 97: </a>  }
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_U,&pU);
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_VT,&pVT);
+
+<a name="line101">101: </a>  svd->nconv = n;
+<a name="line102">102: </a>  svd->reason = SVD_CONVERGED_TOL;
+
+<a name="line104">104: </a>  MatDestroy(&mat);
+<a name="line105">105: </a>  PetscFree(w);
+<a name="line106">106: </a>  <font color="#4169E1">return</font>(0);
+<a name="line107">107: </a>}
+
+<a name="line111">111: </a><strong><font color="#4169E1"><a name="SVDCreate_LAPACK"></a>PETSC_EXTERN PetscErrorCode SVDCreate_LAPACK(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line112">112: </a>{
+<a name="line114">114: </a>  svd->ops->setup   = SVDSetUp_LAPACK;
+<a name="line115">115: </a>  svd->ops->solve   = SVDSolve_LAPACK;
+<a name="line116">116: </a>  <font color="#4169E1">return</font>(0);
+<a name="line117">117: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/impls/makefile b/src/svd/impls/makefile
index 5f36880..56a7650 100644
--- a/src/svd/impls/makefile
+++ b/src/svd/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/impls/makefile.html b/src/svd/impls/makefile.html
index d0cddc3..fae7310 100644
--- a/src/svd/impls/makefile.html
+++ b/src/svd/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:40+00:00">
+<meta name="date" content="2016-05-16T10:33:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/impls/trlanczos/index.html b/src/svd/impls/trlanczos/index.html
index 4496721..16124ad 100644
--- a/src/svd/impls/trlanczos/index.html
+++ b/src/svd/impls/trlanczos/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/trlanczos/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/trlanczos/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/impls/trlanczos/makefile b/src/svd/impls/trlanczos/makefile
index ef6c93b..6d6bdde 100644
--- a/src/svd/impls/trlanczos/makefile
+++ b/src/svd/impls/trlanczos/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/impls/trlanczos/makefile.html b/src/svd/impls/trlanczos/makefile.html
index 9506238..6dbb0c3 100644
--- a/src/svd/impls/trlanczos/makefile.html
+++ b/src/svd/impls/trlanczos/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/trlanczos/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:43+00:00">
+<meta name="date" content="2016-05-16T10:33:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/trlanczos/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/trlanczos/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/svd/impls/trlanczos/trlanczos.c b/src/svd/impls/trlanczos/trlanczos.c
index 0c0b194..95c7463 100644
--- a/src/svd/impls/trlanczos/trlanczos.c
+++ b/src/svd/impls/trlanczos/trlanczos.c
@@ -21,7 +21,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -41,6 +41,17 @@
 
 #include <slepc/private/svdimpl.h>          /*I "slepcsvd.h" I*/
 
+static PetscBool  cited = PETSC_FALSE;
+static const char citation[] =
+  "@Article{slepc-svd,\n"
+  "   author = \"V. Hern{\\'a}ndez and J. E. Rom{\\'a}n and A. Tom{\\'a}s\",\n"
+  "   title = \"A robust and efficient parallel {SVD} solver based on restarted {Lanczos} bidiagonalization\",\n"
+  "   journal = \"Electron. Trans. Numer. Anal.\",\n"
+  "   volume = \"31\",\n"
+  "   pages = \"68--85\",\n"
+  "   year = \"2008\"\n"
+  "}\n";
+
 typedef struct {
   PetscBool oneside;
 } SVD_TRLANCZOS;
@@ -271,7 +282,7 @@ PetscErrorCode SVDSolve_TRLanczos(SVD svd)
 {
   PetscErrorCode ierr;
   SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
-  PetscReal      *alpha,*beta,lastbeta,norm;
+  PetscReal      *alpha,*beta,lastbeta,norm,resnorm;
   PetscScalar    *Q,*swork=NULL,*w;
   PetscInt       i,k,l,nv,ld;
   Mat            U,VT;
@@ -279,6 +290,7 @@ PetscErrorCode SVDSolve_TRLanczos(SVD svd)
   BVOrthogType   orthog;
 
   PetscFunctionBegin;
+  ierr = PetscCitationsRegister(citation,&cited);CHKERRQ(ierr);
   /* allocate working space */
   ierr = DSGetLeadingDimension(svd->ds,&ld);CHKERRQ(ierr);
   ierr = BVGetOrthogonalization(svd->V,&orthog,NULL,NULL,NULL);CHKERRQ(ierr);
@@ -289,7 +301,7 @@ PetscErrorCode SVDSolve_TRLanczos(SVD svd)
 
   /* normalize start vector */
   if (!svd->nini) {
-    ierr = BVSetRandomColumn(svd->V,0,svd->rand);CHKERRQ(ierr);
+    ierr = BVSetRandomColumn(svd->V,0);CHKERRQ(ierr);
     ierr = BVNormColumn(svd->V,0,NORM_2,&norm);CHKERRQ(ierr);
     ierr = BVScaleColumn(svd->V,0,1.0/norm);CHKERRQ(ierr);
   }
@@ -336,8 +348,8 @@ PetscErrorCode SVDSolve_TRLanczos(SVD svd)
     for (i=svd->nconv;i<nv;i++) {
       svd->sigma[i] = PetscRealPart(w[i]);
       beta[i] = PetscRealPart(Q[nv-1+i*ld])*lastbeta;
-      svd->errest[i] = PetscAbsReal(beta[i]);
-      if (svd->sigma[i] > svd->tol) svd->errest[i] /= svd->sigma[i];
+      resnorm = PetscAbsReal(beta[i]);
+      ierr = (*svd->converged)(svd,svd->sigma[i],resnorm,&svd->errest[i],svd->convergedctx);CHKERRQ(ierr);
       if (conv) {
         if (svd->errest[i] < svd->tol) k++;
         else conv = PETSC_FALSE;
@@ -347,8 +359,7 @@ PetscErrorCode SVDSolve_TRLanczos(SVD svd)
     ierr = DSRestoreArray(svd->ds,DS_MAT_U,&Q);CHKERRQ(ierr);
 
     /* check convergence and update l */
-    if (svd->its >= svd->max_it) svd->reason = SVD_DIVERGED_ITS;
-    if (svd->nconv+k >= svd->nsv) svd->reason = SVD_CONVERGED_TOL;
+    ierr = (*svd->stopping)(svd,svd->its,svd->max_it,svd->nconv+k,svd->nsv,&svd->reason,svd->stoppingctx);CHKERRQ(ierr);
     if (svd->reason != SVD_CONVERGED_ITERATING) l = 0;
     else l = PetscMax((nv-svd->nconv-k)/2,0);
 
@@ -385,7 +396,7 @@ PetscErrorCode SVDSolve_TRLanczos(SVD svd)
 
 #undef __FUNCT__
 #define __FUNCT__ "SVDSetFromOptions_TRLanczos"
-PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptions *PetscOptionsObject,SVD svd)
+PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptionItems *PetscOptionsObject,SVD svd)
 {
   PetscErrorCode ierr;
   PetscBool      set,val;
@@ -448,6 +459,17 @@ PetscErrorCode SVDTRLanczosSetOneSide(SVD svd,PetscBool oneside)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "SVDTRLanczosGetOneSide_TRLanczos"
+static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(SVD svd,PetscBool *oneside)
+{
+  SVD_TRLANCZOS *lanczos = (SVD_TRLANCZOS*)svd->data;
+
+  PetscFunctionBegin;
+  *oneside = lanczos->oneside;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "SVDTRLanczosGetOneSide"
 /*@
    SVDTRLanczosGetOneSide - Gets if the variant of the Lanczos method
@@ -472,18 +494,7 @@ PetscErrorCode SVDTRLanczosGetOneSide(SVD svd,PetscBool *oneside)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
   PetscValidPointer(oneside,2);
-  ierr = PetscTryMethod(svd,"SVDTRLanczosGetOneSide_C",(SVD,PetscBool*),(svd,oneside));CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "SVDTRLanczosGetOneSide_TRLanczos"
-static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(SVD svd,PetscBool *oneside)
-{
-  SVD_TRLANCZOS    *lanczos = (SVD_TRLANCZOS*)svd->data;
-
-  PetscFunctionBegin;
-  *oneside = lanczos->oneside;
+  ierr = PetscUseMethod(svd,"SVDTRLanczosGetOneSide_C",(SVD,PetscBool*),(svd,oneside));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -506,9 +517,13 @@ PetscErrorCode SVDView_TRLanczos(SVD svd,PetscViewer viewer)
 {
   PetscErrorCode ierr;
   SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  ierr = PetscViewerASCIIPrintf(viewer,"  TRLanczos: %s-sided reorthogonalization\n",lanczos->oneside? "one": "two");CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  TRLanczos: %s-sided reorthogonalization\n",lanczos->oneside? "one": "two");CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/svd/impls/trlanczos/trlanczos.c.html b/src/svd/impls/trlanczos/trlanczos.c.html
index 7854444..659df5b 100644
--- a/src/svd/impls/trlanczos/trlanczos.c.html
+++ b/src/svd/impls/trlanczos/trlanczos.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/impls/trlanczos/trlanczos.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:42+00:00">
+<meta name="date" content="2016-05-16T10:33:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/impls/trlanczos/trlanczos.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/impls/trlanczos/trlanczos.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   SLEPc singular value solver: "trlanczos"</font>
@@ -33,7 +33,7 @@
 
 <a name="line22"> 22: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line23"> 23: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line24"> 24: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line26"> 26: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -53,444 +53,459 @@
 
 <a name="line42"> 42: </a><font color="#A020F0">#include <slepc/private/svdimpl.h>          </font><font color="#B22222">/*I "slepcsvd.h" I*/</font><font color="#A020F0"></font>
 
-<a name="line44"> 44: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
-<a name="line45"> 45: </a>  PetscBool oneside;
-<a name="line46"> 46: </a>} SVD_TRLANCZOS;
-
-<a name="line50"> 50: </a><strong><font color="#4169E1"><a name="SVDSetUp_TRLanczos"></a>PetscErrorCode SVDSetUp_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line51"> 51: </a>{
-<a name="line53"> 53: </a>  PetscInt       N;
-
-<a name="line56"> 56: </a>  SVDMatGetSize(svd,NULL,&N);
-<a name="line57"> 57: </a>  SVDSetDimensions_Default(svd);
-<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (svd->ncv>svd->nsv+svd->mpd) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
-<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (!svd->max_it) svd->max_it = PetscMax(N/svd->ncv,100);
-<a name="line60"> 60: </a>  svd->leftbasis = PETSC_TRUE;
-<a name="line61"> 61: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,1);
-<a name="line62"> 62: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(svd->ds,DSSVD);
-<a name="line63"> 63: </a>  <a href="../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(svd->ds,PETSC_TRUE);
-<a name="line64"> 64: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(svd->ds,svd->ncv);
-<a name="line65"> 65: </a>  <font color="#4169E1">return</font>(0);
-<a name="line66"> 66: </a>}
-
-<a name="line70"> 70: </a><strong><font color="#4169E1"><a name="SVDOneSideTRLanczosMGS"></a>static PetscErrorCode SVDOneSideTRLanczosMGS(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal *alpha,PetscReal *beta,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)</font></strong>
-<a name="line71"> 71: </a>{
-<a name="line73"> 73: </a>  PetscReal      a,b;
-<a name="line74"> 74: </a>  PetscInt       i,k=nconv+l;
-<a name="line75"> 75: </a>  Vec            ui,ui1,vi;
-
-<a name="line78"> 78: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,k,&vi);
-<a name="line79"> 79: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,k,&ui);
-<a name="line80"> 80: </a>  SVDMatMult(svd,PETSC_FALSE,vi,ui);
-<a name="line81"> 81: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,k,&vi);
-<a name="line82"> 82: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,k,&ui);
-<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (l>0) {
-<a name="line84"> 84: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) work[i]=beta[i+nconv];
-<a name="line85"> 85: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(U,-1.0,1.0,k,work);
-<a name="line86"> 86: </a>  }
-<a name="line87"> 87: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(U,k,NORM_2,&a);
-<a name="line88"> 88: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,k,1.0/a);
-<a name="line89"> 89: </a>  alpha[k] = a;
-
-<a name="line91"> 91: </a>  <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
-<a name="line92"> 92: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
-<a name="line93"> 93: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
-<a name="line94"> 94: </a>    SVDMatMult(svd,PETSC_TRUE,ui1,vi);
-<a name="line95"> 95: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
-<a name="line96"> 96: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
-<a name="line97"> 97: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,i,NULL,&b,NULL);
-<a name="line98"> 98: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,i,1.0/b);
-<a name="line99"> 99: </a>    beta[i-1] = b;
-
-<a name="line101">101: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
-<a name="line102">102: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i,&ui);
-<a name="line103">103: </a>    SVDMatMult(svd,PETSC_FALSE,vi,ui);
-<a name="line104">104: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
-<a name="line105">105: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
-<a name="line106">106: </a>    VecAXPY(ui,-b,ui1);
+<a name="line44"> 44: </a>static PetscBool  cited = PETSC_FALSE;
+<a name="line45"> 45: </a>static const char citation[] =
+<a name="line46"> 46: </a>  <font color="#666666">"@Article{slepc-svd,\n"</font>
+<a name="line47"> 47: </a>  <font color="#666666">"   author = \"V. Hern{\\'a}ndez and J. E. Rom{\\'a}n and A. Tom{\\'a}s\",\n"</font>
+<a name="line48"> 48: </a>  <font color="#666666">"   title = \"A robust and efficient parallel {<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>} solver based on restarted {Lanczos} bidiagonalization\",\n"</font>
+<a name="line49"> 49: </a>  <font color="#666666">"   journal = \"Electron. Trans. Numer. Anal.\",\n"</font>
+<a name="line50"> 50: </a>  <font color="#666666">"   volume = \"31\",\n"</font>
+<a name="line51"> 51: </a>  <font color="#666666">"   pages = \"68--85\",\n"</font>
+<a name="line52"> 52: </a>  <font color="#666666">"   year = \"2008\"\n"</font>
+<a name="line53"> 53: </a>  <font color="#666666">"}\n"</font>;
+
+<a name="line55"> 55: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
+<a name="line56"> 56: </a>  PetscBool oneside;
+<a name="line57"> 57: </a>} SVD_TRLANCZOS;
+
+<a name="line61"> 61: </a><strong><font color="#4169E1"><a name="SVDSetUp_TRLanczos"></a>PetscErrorCode SVDSetUp_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line62"> 62: </a>{
+<a name="line64"> 64: </a>  PetscInt       N;
+
+<a name="line67"> 67: </a>  SVDMatGetSize(svd,NULL,&N);
+<a name="line68"> 68: </a>  SVDSetDimensions_Default(svd);
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (svd->ncv>svd->nsv+svd->mpd) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The value of ncv must not be larger than nev+mpd"</font>);
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (!svd->max_it) svd->max_it = PetscMax(N/svd->ncv,100);
+<a name="line71"> 71: </a>  svd->leftbasis = PETSC_TRUE;
+<a name="line72"> 72: </a>  <a href="../../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(svd,1);
+<a name="line73"> 73: </a>  <a href="../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(svd->ds,DSSVD);
+<a name="line74"> 74: </a>  <a href="../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(svd->ds,PETSC_TRUE);
+<a name="line75"> 75: </a>  <a href="../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(svd->ds,svd->ncv);
+<a name="line76"> 76: </a>  <font color="#4169E1">return</font>(0);
+<a name="line77"> 77: </a>}
+
+<a name="line81"> 81: </a><strong><font color="#4169E1"><a name="SVDOneSideTRLanczosMGS"></a>static PetscErrorCode SVDOneSideTRLanczosMGS(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal *alpha,PetscReal *beta,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)</font></strong>
+<a name="line82"> 82: </a>{
+<a name="line84"> 84: </a>  PetscReal      a,b;
+<a name="line85"> 85: </a>  PetscInt       i,k=nconv+l;
+<a name="line86"> 86: </a>  Vec            ui,ui1,vi;
+
+<a name="line89"> 89: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,k,&vi);
+<a name="line90"> 90: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,k,&ui);
+<a name="line91"> 91: </a>  SVDMatMult(svd,PETSC_FALSE,vi,ui);
+<a name="line92"> 92: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,k,&vi);
+<a name="line93"> 93: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,k,&ui);
+<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (l>0) {
+<a name="line95"> 95: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) work[i]=beta[i+nconv];
+<a name="line96"> 96: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(U,-1.0,1.0,k,work);
+<a name="line97"> 97: </a>  }
+<a name="line98"> 98: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(U,k,NORM_2,&a);
+<a name="line99"> 99: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,k,1.0/a);
+<a name="line100">100: </a>  alpha[k] = a;
+
+<a name="line102">102: </a>  <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
+<a name="line103">103: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
+<a name="line104">104: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
+<a name="line105">105: </a>    SVDMatMult(svd,PETSC_TRUE,ui1,vi);
+<a name="line106">106: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
 <a name="line107">107: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
-<a name="line108">108: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i,&ui);
-<a name="line109">109: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(U,i,NORM_2,&a);
-<a name="line110">110: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,i,1.0/a);
-<a name="line111">111: </a>    alpha[i] = a;
-<a name="line112">112: </a>  }
-
-<a name="line114">114: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,n,&vi);
-<a name="line115">115: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,n-1,&ui1);
-<a name="line116">116: </a>  SVDMatMult(svd,PETSC_TRUE,ui1,vi);
-<a name="line117">117: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,n,&vi);
-<a name="line118">118: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,n-1,&ui1);
-<a name="line119">119: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,n,NULL,&b,NULL);
-<a name="line120">120: </a>  beta[n-1] = b;
-<a name="line121">121: </a>  <font color="#4169E1">return</font>(0);
-<a name="line122">122: </a>}
-
-<a name="line126">126: </a><font color="#B22222">/*</font>
-<a name="line127">127: </a><font color="#B22222">  Custom CGS orthogonalization, preprocess after first orthogonalization</font>
-<a name="line128">128: </a><font color="#B22222">*/</font>
-<a name="line129">129: </a><strong><font color="#4169E1"><a name="SVDOrthogonalizeCGS"></a>static PetscErrorCode SVDOrthogonalizeCGS(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt i,PetscScalar* h,PetscReal a,<a href="../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> refine,PetscReal eta,PetscReal *norm)</font></strong>
-<a name="line130">130: </a>{
-<a name="line132">132: </a>  PetscReal      sum,onorm;
-<a name="line133">133: </a>  PetscScalar    dot;
-<a name="line134">134: </a>  PetscInt       j;
-
-<a name="line137">137: </a>  <font color="#4169E1">switch</font> (refine) {
-<a name="line138">138: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
-<a name="line139">139: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
-<a name="line140">140: </a>    <font color="#4169E1">break</font>;
-<a name="line141">141: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
-<a name="line142">142: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
-<a name="line143">143: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(V,i,h);
-<a name="line144">144: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0,i,h);
-<a name="line145">145: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
-<a name="line146">146: </a>    <font color="#4169E1">break</font>;
-<a name="line147">147: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
-<a name="line148">148: </a>    dot = h[i];
-<a name="line149">149: </a>    onorm = PetscSqrtReal(PetscRealPart(dot)) / a;
-<a name="line150">150: </a>    sum = 0.0;
-<a name="line151">151: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) {
-<a name="line152">152: </a>      sum += PetscRealPart(h[j] * PetscConj(h[j]));
-<a name="line153">153: </a>    }
-<a name="line154">154: </a>    *norm = PetscRealPart(dot)/(a*a) - sum;
-<a name="line155">155: </a>    <font color="#4169E1">if</font> (*norm>0.0) *norm = PetscSqrtReal(*norm);
-<a name="line156">156: </a>    <font color="#4169E1">else</font> {
-<a name="line157">157: </a>      <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
-<a name="line158">158: </a>    }
-<a name="line159">159: </a>    <font color="#4169E1">if</font> (*norm < eta*onorm) {
-<a name="line160">160: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
-<a name="line161">161: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(V,i,h);
-<a name="line162">162: </a>      <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0,i,h);
-<a name="line163">163: </a>      <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
+<a name="line108">108: </a>    <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,i,NULL,&b,NULL);
+<a name="line109">109: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,i,1.0/b);
+<a name="line110">110: </a>    beta[i-1] = b;
+
+<a name="line112">112: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
+<a name="line113">113: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i,&ui);
+<a name="line114">114: </a>    SVDMatMult(svd,PETSC_FALSE,vi,ui);
+<a name="line115">115: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
+<a name="line116">116: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
+<a name="line117">117: </a>    VecAXPY(ui,-b,ui1);
+<a name="line118">118: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
+<a name="line119">119: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i,&ui);
+<a name="line120">120: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(U,i,NORM_2,&a);
+<a name="line121">121: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,i,1.0/a);
+<a name="line122">122: </a>    alpha[i] = a;
+<a name="line123">123: </a>  }
+
+<a name="line125">125: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,n,&vi);
+<a name="line126">126: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,n-1,&ui1);
+<a name="line127">127: </a>  SVDMatMult(svd,PETSC_TRUE,ui1,vi);
+<a name="line128">128: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,n,&vi);
+<a name="line129">129: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,n-1,&ui1);
+<a name="line130">130: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,n,NULL,&b,NULL);
+<a name="line131">131: </a>  beta[n-1] = b;
+<a name="line132">132: </a>  <font color="#4169E1">return</font>(0);
+<a name="line133">133: </a>}
+
+<a name="line137">137: </a><font color="#B22222">/*</font>
+<a name="line138">138: </a><font color="#B22222">  Custom CGS orthogonalization, preprocess after first orthogonalization</font>
+<a name="line139">139: </a><font color="#B22222">*/</font>
+<a name="line140">140: </a><strong><font color="#4169E1"><a name="SVDOrthogonalizeCGS"></a>static PetscErrorCode SVDOrthogonalizeCGS(<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt i,PetscScalar* h,PetscReal a,<a href="../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> refine,PetscReal eta,PetscReal *norm)</font></strong>
+<a name="line141">141: </a>{
+<a name="line143">143: </a>  PetscReal      sum,onorm;
+<a name="line144">144: </a>  PetscScalar    dot;
+<a name="line145">145: </a>  PetscInt       j;
+
+<a name="line148">148: </a>  <font color="#4169E1">switch</font> (refine) {
+<a name="line149">149: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
+<a name="line150">150: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
+<a name="line151">151: </a>    <font color="#4169E1">break</font>;
+<a name="line152">152: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
+<a name="line153">153: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
+<a name="line154">154: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(V,i,h);
+<a name="line155">155: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0,i,h);
+<a name="line156">156: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
+<a name="line157">157: </a>    <font color="#4169E1">break</font>;
+<a name="line158">158: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
+<a name="line159">159: </a>    dot = h[i];
+<a name="line160">160: </a>    onorm = PetscSqrtReal(PetscRealPart(dot)) / a;
+<a name="line161">161: </a>    sum = 0.0;
+<a name="line162">162: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) {
+<a name="line163">163: </a>      sum += PetscRealPart(h[j] * PetscConj(h[j]));
 <a name="line164">164: </a>    }
-<a name="line165">165: </a>    <font color="#4169E1">break</font>;
-<a name="line166">166: </a>  }
-<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
-<a name="line168">168: </a>}
-
-<a name="line172">172: </a><strong><font color="#4169E1"><a name="SVDOneSideTRLanczosCGS"></a>static PetscErrorCode SVDOneSideTRLanczosCGS(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal *alpha,PetscReal *beta,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)</font></strong>
-<a name="line173">173: </a>{
-<a name="line174">174: </a>  PetscErrorCode     ierr;
-<a name="line175">175: </a>  PetscReal          a,b,eta;
-<a name="line176">176: </a>  PetscInt           i,j,k=nconv+l;
-<a name="line177">177: </a>  Vec                ui,ui1,vi;
-<a name="line178">178: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> refine;
-
-<a name="line181">181: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,k,&vi);
-<a name="line182">182: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,k,&ui);
-<a name="line183">183: </a>  SVDMatMult(svd,PETSC_FALSE,vi,ui);
-<a name="line184">184: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,k,&vi);
-<a name="line185">185: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,k,&ui);
-<a name="line186">186: </a>  <font color="#4169E1">if</font> (l>0) {
-<a name="line187">187: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) work[i]=beta[i+nconv];
-<a name="line188">188: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(U,-1.0,1.0,k,work);
-<a name="line189">189: </a>  }
-<a name="line190">190: </a>  <a href="../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(V,NULL,&refine,&eta,NULL);
-
-<a name="line192">192: </a>  <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
-<a name="line193">193: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
-<a name="line194">194: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
-<a name="line195">195: </a>    SVDMatMult(svd,PETSC_TRUE,ui1,vi);
-<a name="line196">196: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
-<a name="line197">197: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
-<a name="line198">198: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(U,i-1,NORM_2,&a);
-<a name="line199">199: </a>    <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
-<a name="line200">200: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i+1);
-<a name="line201">201: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
-<a name="line202">202: </a>      <a href="../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(V,vi,work);
-<a name="line203">203: </a>    } <font color="#4169E1">else</font> {
-<a name="line204">204: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
-<a name="line205">205: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(V,i,work);
-<a name="line206">206: </a>    }
-<a name="line207">207: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(U,i-1,NORM_2,&a);
-<a name="line208">208: </a>    <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
-<a name="line209">209: </a>      <a href="../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(V,vi,work);
-<a name="line210">210: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
-<a name="line211">211: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
-<a name="line212">212: </a>    } <font color="#4169E1">else</font> {
-<a name="line213">213: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(V,i,work);
-<a name="line214">214: </a>    }
-
-<a name="line216">216: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,i-1,1.0/a);
-<a name="line217">217: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) work[j] = work[j] / a;
-<a name="line218">218: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0/a,i,work);
-<a name="line219">219: </a>    SVDOrthogonalizeCGS(V,i,work,a,refine,eta,&b);
-<a name="line220">220: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,i,1.0/b);
-
-<a name="line222">222: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
-<a name="line223">223: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i,&ui);
-<a name="line224">224: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
-<a name="line225">225: </a>    SVDMatMult(svd,PETSC_FALSE,vi,ui);
-<a name="line226">226: </a>    VecAXPY(ui,-b,ui1);
-<a name="line227">227: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
-<a name="line228">228: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i,&ui);
-<a name="line229">229: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
-
-<a name="line231">231: </a>    alpha[i-1] = a;
-<a name="line232">232: </a>    beta[i-1] = b;
-<a name="line233">233: </a>  }
-
-<a name="line235">235: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,n,&vi);
-<a name="line236">236: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,n-1,&ui1);
-<a name="line237">237: </a>  SVDMatMult(svd,PETSC_TRUE,ui1,vi);
-<a name="line238">238: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,n,&vi);
-<a name="line239">239: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,n-1,&ui1);
-
-<a name="line241">241: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(svd->U,n-1,NORM_2,&a);
-<a name="line242">242: </a>  <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
-<a name="line243">243: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,n+1);
-<a name="line244">244: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,n,&vi);
-<a name="line245">245: </a>    <a href="../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(V,vi,work);
-<a name="line246">246: </a>  } <font color="#4169E1">else</font> {
-<a name="line247">247: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,n);
-<a name="line248">248: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(V,n,work);
-<a name="line249">249: </a>  }
-<a name="line250">250: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(svd->U,n-1,NORM_2,&a);
-<a name="line251">251: </a>  <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
-<a name="line252">252: </a>    <a href="../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(V,vi,work);
-<a name="line253">253: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,n,&vi);
-<a name="line254">254: </a>  } <font color="#4169E1">else</font> {
-<a name="line255">255: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(V,n,work);
-<a name="line256">256: </a>  }
-
-<a name="line258">258: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,n-1,1.0/a);
-<a name="line259">259: </a>  <font color="#4169E1">for</font> (j=0;j<n;j++) work[j] = work[j] / a;
-<a name="line260">260: </a>  <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0/a,n,work);
-<a name="line261">261: </a>  SVDOrthogonalizeCGS(V,n,work,a,refine,eta,&b);
-<a name="line262">262: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,nconv,n);
-<a name="line263">263: </a>  alpha[n-1] = a;
-<a name="line264">264: </a>  beta[n-1] = b;
-<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
-<a name="line266">266: </a>}
-
-<a name="line270">270: </a><strong><font color="#4169E1"><a name="SVDSolve_TRLanczos"></a>PetscErrorCode SVDSolve_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line271">271: </a>{
-<a name="line273">273: </a>  SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
-<a name="line274">274: </a>  PetscReal      *alpha,*beta,lastbeta,norm;
-<a name="line275">275: </a>  PetscScalar    *Q,*swork=NULL,*w;
-<a name="line276">276: </a>  PetscInt       i,k,l,nv,ld;
-<a name="line277">277: </a>  Mat            U,VT;
-<a name="line278">278: </a>  PetscBool      conv;
-<a name="line279">279: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>   orthog;
-
-<a name="line282">282: </a>  <font color="#B22222">/* allocate working space */</font>
-<a name="line283">283: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(svd->ds,&ld);
-<a name="line284">284: </a>  <a href="../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(svd->V,&orthog,NULL,NULL,NULL);
-<a name="line285">285: </a>  PetscMalloc1(ld,&w);
-<a name="line286">286: </a>  <font color="#4169E1">if</font> (lanczos->oneside) {
-<a name="line287">287: </a>    PetscMalloc1(svd->ncv+1,&swork);
-<a name="line288">288: </a>  }
-
-<a name="line290">290: </a>  <font color="#B22222">/* normalize start vector */</font>
-<a name="line291">291: </a>  <font color="#4169E1">if</font> (!svd->nini) {
-<a name="line292">292: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(svd->V,0,svd->rand);
-<a name="line293">293: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(svd->V,0,NORM_2,&norm);
-<a name="line294">294: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,0,1.0/norm);
-<a name="line295">295: </a>  }
-
-<a name="line297">297: </a>  l = 0;
-<a name="line298">298: </a>  <font color="#4169E1">while</font> (svd->reason == SVD_CONVERGED_ITERATING) {
-<a name="line299">299: </a>    svd->its++;
-
-<a name="line301">301: </a>    <font color="#B22222">/* inner loop */</font>
-<a name="line302">302: </a>    nv = PetscMin(svd->nconv+svd->mpd,svd->ncv);
-<a name="line303">303: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(svd->V,svd->nconv,nv);
-<a name="line304">304: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(svd->U,svd->nconv,nv);
-<a name="line305">305: </a>    <a href="../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
-<a name="line306">306: </a>    beta = alpha + ld;
-<a name="line307">307: </a>    <font color="#4169E1">if</font> (lanczos->oneside) {
-<a name="line308">308: </a>      <font color="#4169E1">if</font> (orthog == BV_ORTHOG_MGS) {
-<a name="line309">309: </a>        SVDOneSideTRLanczosMGS(svd,alpha,beta,svd->V,svd->U,svd->nconv,l,nv,swork);
-<a name="line310">310: </a>      } <font color="#4169E1">else</font> {
-<a name="line311">311: </a>        SVDOneSideTRLanczosCGS(svd,alpha,beta,svd->V,svd->U,svd->nconv,l,nv,swork);
-<a name="line312">312: </a>      }
-<a name="line313">313: </a>    } <font color="#4169E1">else</font> {
-<a name="line314">314: </a>      SVDTwoSideLanczos(svd,alpha,beta,svd->V,svd->U,svd->nconv+l,nv);
-<a name="line315">315: </a>    }
-<a name="line316">316: </a>    lastbeta = beta[nv-1];
-<a name="line317">317: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
-<a name="line318">318: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,nv,1.0/lastbeta);
-
-<a name="line320">320: </a>    <font color="#B22222">/* compute <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> of general matrix */</font>
-<a name="line321">321: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(svd->ds,nv,nv,svd->nconv,svd->nconv+l);
-<a name="line322">322: </a>    <font color="#4169E1">if</font> (l==0) {
-<a name="line323">323: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(svd->ds,DS_STATE_INTERMEDIATE);
-<a name="line324">324: </a>    } <font color="#4169E1">else</font> {
-<a name="line325">325: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(svd->ds,DS_STATE_RAW);
-<a name="line326">326: </a>    }
-<a name="line327">327: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(svd->ds,w,NULL);
-<a name="line328">328: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(svd->ds,w,NULL,NULL,NULL,NULL);
-
-<a name="line330">330: </a>    <font color="#B22222">/* compute error estimates */</font>
-<a name="line331">331: </a>    k = 0;
-<a name="line332">332: </a>    conv = PETSC_TRUE;
-<a name="line333">333: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_U,&Q);
-<a name="line334">334: </a>    <a href="../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
-<a name="line335">335: </a>    beta = alpha + ld;
-<a name="line336">336: </a>    <font color="#4169E1">for</font> (i=svd->nconv;i<nv;i++) {
-<a name="line337">337: </a>      svd->sigma[i] = PetscRealPart(w[i]);
-<a name="line338">338: </a>      beta[i] = PetscRealPart(Q[nv-1+i*ld])*lastbeta;
-<a name="line339">339: </a>      svd->errest[i] = PetscAbsReal(beta[i]);
-<a name="line340">340: </a>      <font color="#4169E1">if</font> (svd->sigma[i] > svd->tol) svd->errest[i] /= svd->sigma[i];
-<a name="line341">341: </a>      <font color="#4169E1">if</font> (conv) {
-<a name="line342">342: </a>        <font color="#4169E1">if</font> (svd->errest[i] < svd->tol) k++;
-<a name="line343">343: </a>        <font color="#4169E1">else</font> conv = PETSC_FALSE;
-<a name="line344">344: </a>      }
-<a name="line345">345: </a>    }
-<a name="line346">346: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
-<a name="line347">347: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_U,&Q);
-
-<a name="line349">349: </a>    <font color="#B22222">/* check convergence and update l */</font>
-<a name="line350">350: </a>    <font color="#4169E1">if</font> (svd->its >= svd->max_it) svd->reason = SVD_DIVERGED_ITS;
-<a name="line351">351: </a>    <font color="#4169E1">if</font> (svd->nconv+k >= svd->nsv) svd->reason = SVD_CONVERGED_TOL;
-<a name="line352">352: </a>    <font color="#4169E1">if</font> (svd->reason != SVD_CONVERGED_ITERATING) l = 0;
-<a name="line353">353: </a>    <font color="#4169E1">else</font> l = PetscMax((nv-svd->nconv-k)/2,0);
-
-<a name="line355">355: </a>    <font color="#B22222">/* compute converged singular vectors and restart vectors */</font>
-<a name="line356">356: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_VT,&VT);
-<a name="line357">357: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(svd->V,VT,svd->nconv,svd->nconv+k+l);
-<a name="line358">358: </a>    MatDestroy(&VT);
-<a name="line359">359: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_U,&U);
-<a name="line360">360: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(svd->U,U,svd->nconv,svd->nconv+k+l);
-<a name="line361">361: </a>    MatDestroy(&U);
-
-<a name="line363">363: </a>    <font color="#B22222">/* copy the last vector to be the next initial vector */</font>
-<a name="line364">364: </a>    <font color="#4169E1">if</font> (svd->reason == SVD_CONVERGED_ITERATING) {
-<a name="line365">365: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(svd->V,nv,svd->nconv+k+l);
-<a name="line366">366: </a>    }
-
-<a name="line368">368: </a>    svd->nconv += k;
-<a name="line369">369: </a>    SVDMonitor(svd,svd->its,svd->nconv,svd->sigma,svd->errest,nv);
-<a name="line370">370: </a>  }
-
-<a name="line372">372: </a>  <font color="#B22222">/* orthonormalize U columns in one side method */</font>
-<a name="line373">373: </a>  <font color="#4169E1">if</font> (lanczos->oneside) {
-<a name="line374">374: </a>    <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line375">375: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(svd->U,i,NULL,&norm,NULL);
-<a name="line376">376: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->U,i,1.0/norm);
+<a name="line165">165: </a>    *norm = PetscRealPart(dot)/(a*a) - sum;
+<a name="line166">166: </a>    <font color="#4169E1">if</font> (*norm>0.0) *norm = PetscSqrtReal(*norm);
+<a name="line167">167: </a>    <font color="#4169E1">else</font> {
+<a name="line168">168: </a>      <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
+<a name="line169">169: </a>    }
+<a name="line170">170: </a>    <font color="#4169E1">if</font> (*norm < eta*onorm) {
+<a name="line171">171: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
+<a name="line172">172: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(V,i,h);
+<a name="line173">173: </a>      <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0,i,h);
+<a name="line174">174: </a>      <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(V,i,NORM_2,norm);
+<a name="line175">175: </a>    }
+<a name="line176">176: </a>    <font color="#4169E1">break</font>;
+<a name="line177">177: </a>  }
+<a name="line178">178: </a>  <font color="#4169E1">return</font>(0);
+<a name="line179">179: </a>}
+
+<a name="line183">183: </a><strong><font color="#4169E1"><a name="SVDOneSideTRLanczosCGS"></a>static PetscErrorCode SVDOneSideTRLanczosCGS(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal *alpha,PetscReal *beta,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../docs/manualpages/BV/BV.html#BV">BV</a> U,PetscInt nconv,PetscInt l,PetscInt n,PetscScalar* work)</font></strong>
+<a name="line184">184: </a>{
+<a name="line185">185: </a>  PetscErrorCode     ierr;
+<a name="line186">186: </a>  PetscReal          a,b,eta;
+<a name="line187">187: </a>  PetscInt           i,j,k=nconv+l;
+<a name="line188">188: </a>  Vec                ui,ui1,vi;
+<a name="line189">189: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a> refine;
+
+<a name="line192">192: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,k,&vi);
+<a name="line193">193: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,k,&ui);
+<a name="line194">194: </a>  SVDMatMult(svd,PETSC_FALSE,vi,ui);
+<a name="line195">195: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,k,&vi);
+<a name="line196">196: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,k,&ui);
+<a name="line197">197: </a>  <font color="#4169E1">if</font> (l>0) {
+<a name="line198">198: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) work[i]=beta[i+nconv];
+<a name="line199">199: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(U,-1.0,1.0,k,work);
+<a name="line200">200: </a>  }
+<a name="line201">201: </a>  <a href="../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(V,NULL,&refine,&eta,NULL);
+
+<a name="line203">203: </a>  <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
+<a name="line204">204: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
+<a name="line205">205: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
+<a name="line206">206: </a>    SVDMatMult(svd,PETSC_TRUE,ui1,vi);
+<a name="line207">207: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
+<a name="line208">208: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
+<a name="line209">209: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(U,i-1,NORM_2,&a);
+<a name="line210">210: </a>    <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
+<a name="line211">211: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i+1);
+<a name="line212">212: </a>      <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
+<a name="line213">213: </a>      <a href="../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(V,vi,work);
+<a name="line214">214: </a>    } <font color="#4169E1">else</font> {
+<a name="line215">215: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
+<a name="line216">216: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(V,i,work);
+<a name="line217">217: </a>    }
+<a name="line218">218: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(U,i-1,NORM_2,&a);
+<a name="line219">219: </a>    <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
+<a name="line220">220: </a>      <a href="../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(V,vi,work);
+<a name="line221">221: </a>      <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
+<a name="line222">222: </a>      <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,i);
+<a name="line223">223: </a>    } <font color="#4169E1">else</font> {
+<a name="line224">224: </a>      <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(V,i,work);
+<a name="line225">225: </a>    }
+
+<a name="line227">227: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,i-1,1.0/a);
+<a name="line228">228: </a>    <font color="#4169E1">for</font> (j=0;j<i;j++) work[j] = work[j] / a;
+<a name="line229">229: </a>    <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0/a,i,work);
+<a name="line230">230: </a>    SVDOrthogonalizeCGS(V,i,work,a,refine,eta,&b);
+<a name="line231">231: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,i,1.0/b);
+
+<a name="line233">233: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&vi);
+<a name="line234">234: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i,&ui);
+<a name="line235">235: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,i-1,&ui1);
+<a name="line236">236: </a>    SVDMatMult(svd,PETSC_FALSE,vi,ui);
+<a name="line237">237: </a>    VecAXPY(ui,-b,ui1);
+<a name="line238">238: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&vi);
+<a name="line239">239: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i,&ui);
+<a name="line240">240: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,i-1,&ui1);
+
+<a name="line242">242: </a>    alpha[i-1] = a;
+<a name="line243">243: </a>    beta[i-1] = b;
+<a name="line244">244: </a>  }
+
+<a name="line246">246: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,n,&vi);
+<a name="line247">247: </a>  <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(U,n-1,&ui1);
+<a name="line248">248: </a>  SVDMatMult(svd,PETSC_TRUE,ui1,vi);
+<a name="line249">249: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,n,&vi);
+<a name="line250">250: </a>  <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(U,n-1,&ui1);
+
+<a name="line252">252: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(svd->U,n-1,NORM_2,&a);
+<a name="line253">253: </a>  <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
+<a name="line254">254: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,n+1);
+<a name="line255">255: </a>    <a href="../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,n,&vi);
+<a name="line256">256: </a>    <a href="../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(V,vi,work);
+<a name="line257">257: </a>  } <font color="#4169E1">else</font> {
+<a name="line258">258: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,0,n);
+<a name="line259">259: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(V,n,work);
+<a name="line260">260: </a>  }
+<a name="line261">261: </a>  <a href="../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(svd->U,n-1,NORM_2,&a);
+<a name="line262">262: </a>  <font color="#4169E1">if</font> (refine == BV_ORTHOG_REFINE_IFNEEDED) {
+<a name="line263">263: </a>    <a href="../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(V,vi,work);
+<a name="line264">264: </a>    <a href="../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,n,&vi);
+<a name="line265">265: </a>  } <font color="#4169E1">else</font> {
+<a name="line266">266: </a>    <a href="../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(V,n,work);
+<a name="line267">267: </a>  }
+
+<a name="line269">269: </a>  <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(U,n-1,1.0/a);
+<a name="line270">270: </a>  <font color="#4169E1">for</font> (j=0;j<n;j++) work[j] = work[j] / a;
+<a name="line271">271: </a>  <a href="../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(V,-1.0,1.0/a,n,work);
+<a name="line272">272: </a>  SVDOrthogonalizeCGS(V,n,work,a,refine,eta,&b);
+<a name="line273">273: </a>  <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V,nconv,n);
+<a name="line274">274: </a>  alpha[n-1] = a;
+<a name="line275">275: </a>  beta[n-1] = b;
+<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
+<a name="line277">277: </a>}
+
+<a name="line281">281: </a><strong><font color="#4169E1"><a name="SVDSolve_TRLanczos"></a>PetscErrorCode SVDSolve_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line282">282: </a>{
+<a name="line284">284: </a>  SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
+<a name="line285">285: </a>  PetscReal      *alpha,*beta,lastbeta,norm,resnorm;
+<a name="line286">286: </a>  PetscScalar    *Q,*swork=NULL,*w;
+<a name="line287">287: </a>  PetscInt       i,k,l,nv,ld;
+<a name="line288">288: </a>  Mat            U,VT;
+<a name="line289">289: </a>  PetscBool      conv;
+<a name="line290">290: </a>  <a href="../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>   orthog;
+
+<a name="line293">293: </a>  PetscCitationsRegister(citation,&cited);
+<a name="line294">294: </a>  <font color="#B22222">/* allocate working space */</font>
+<a name="line295">295: </a>  <a href="../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(svd->ds,&ld);
+<a name="line296">296: </a>  <a href="../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(svd->V,&orthog,NULL,NULL,NULL);
+<a name="line297">297: </a>  PetscMalloc1(ld,&w);
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (lanczos->oneside) {
+<a name="line299">299: </a>    PetscMalloc1(svd->ncv+1,&swork);
+<a name="line300">300: </a>  }
+
+<a name="line302">302: </a>  <font color="#B22222">/* normalize start vector */</font>
+<a name="line303">303: </a>  <font color="#4169E1">if</font> (!svd->nini) {
+<a name="line304">304: </a>    <a href="../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(svd->V,0);
+<a name="line305">305: </a>    <a href="../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(svd->V,0,NORM_2,&norm);
+<a name="line306">306: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,0,1.0/norm);
+<a name="line307">307: </a>  }
+
+<a name="line309">309: </a>  l = 0;
+<a name="line310">310: </a>  <font color="#4169E1">while</font> (svd->reason == SVD_CONVERGED_ITERATING) {
+<a name="line311">311: </a>    svd->its++;
+
+<a name="line313">313: </a>    <font color="#B22222">/* inner loop */</font>
+<a name="line314">314: </a>    nv = PetscMin(svd->nconv+svd->mpd,svd->ncv);
+<a name="line315">315: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(svd->V,svd->nconv,nv);
+<a name="line316">316: </a>    <a href="../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(svd->U,svd->nconv,nv);
+<a name="line317">317: </a>    <a href="../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
+<a name="line318">318: </a>    beta = alpha + ld;
+<a name="line319">319: </a>    <font color="#4169E1">if</font> (lanczos->oneside) {
+<a name="line320">320: </a>      <font color="#4169E1">if</font> (orthog == BV_ORTHOG_MGS) {
+<a name="line321">321: </a>        SVDOneSideTRLanczosMGS(svd,alpha,beta,svd->V,svd->U,svd->nconv,l,nv,swork);
+<a name="line322">322: </a>      } <font color="#4169E1">else</font> {
+<a name="line323">323: </a>        SVDOneSideTRLanczosCGS(svd,alpha,beta,svd->V,svd->U,svd->nconv,l,nv,swork);
+<a name="line324">324: </a>      }
+<a name="line325">325: </a>    } <font color="#4169E1">else</font> {
+<a name="line326">326: </a>      SVDTwoSideLanczos(svd,alpha,beta,svd->V,svd->U,svd->nconv+l,nv);
+<a name="line327">327: </a>    }
+<a name="line328">328: </a>    lastbeta = beta[nv-1];
+<a name="line329">329: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
+<a name="line330">330: </a>    <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->V,nv,1.0/lastbeta);
+
+<a name="line332">332: </a>    <font color="#B22222">/* compute <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> of general matrix */</font>
+<a name="line333">333: </a>    <a href="../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(svd->ds,nv,nv,svd->nconv,svd->nconv+l);
+<a name="line334">334: </a>    <font color="#4169E1">if</font> (l==0) {
+<a name="line335">335: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(svd->ds,DS_STATE_INTERMEDIATE);
+<a name="line336">336: </a>    } <font color="#4169E1">else</font> {
+<a name="line337">337: </a>      <a href="../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(svd->ds,DS_STATE_RAW);
+<a name="line338">338: </a>    }
+<a name="line339">339: </a>    <a href="../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(svd->ds,w,NULL);
+<a name="line340">340: </a>    <a href="../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(svd->ds,w,NULL,NULL,NULL,NULL);
+
+<a name="line342">342: </a>    <font color="#B22222">/* compute error estimates */</font>
+<a name="line343">343: </a>    k = 0;
+<a name="line344">344: </a>    conv = PETSC_TRUE;
+<a name="line345">345: </a>    <a href="../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(svd->ds,DS_MAT_U,&Q);
+<a name="line346">346: </a>    <a href="../../../../docs/manualpages/DS/DSGetArrayReal.html#DSGetArrayReal">DSGetArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
+<a name="line347">347: </a>    beta = alpha + ld;
+<a name="line348">348: </a>    <font color="#4169E1">for</font> (i=svd->nconv;i<nv;i++) {
+<a name="line349">349: </a>      svd->sigma[i] = PetscRealPart(w[i]);
+<a name="line350">350: </a>      beta[i] = PetscRealPart(Q[nv-1+i*ld])*lastbeta;
+<a name="line351">351: </a>      resnorm = PetscAbsReal(beta[i]);
+<a name="line352">352: </a>      (*svd->converged)(svd,svd->sigma[i],resnorm,&svd->errest[i],svd->convergedctx);
+<a name="line353">353: </a>      <font color="#4169E1">if</font> (conv) {
+<a name="line354">354: </a>        <font color="#4169E1">if</font> (svd->errest[i] < svd->tol) k++;
+<a name="line355">355: </a>        <font color="#4169E1">else</font> conv = PETSC_FALSE;
+<a name="line356">356: </a>      }
+<a name="line357">357: </a>    }
+<a name="line358">358: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArrayReal.html#DSRestoreArrayReal">DSRestoreArrayReal</a>(svd->ds,DS_MAT_T,&alpha);
+<a name="line359">359: </a>    <a href="../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(svd->ds,DS_MAT_U,&Q);
+
+<a name="line361">361: </a>    <font color="#B22222">/* check convergence and update l */</font>
+<a name="line362">362: </a>    (*svd->stopping)(svd,svd->its,svd->max_it,svd->nconv+k,svd->nsv,&svd->reason,svd->stoppingctx);
+<a name="line363">363: </a>    <font color="#4169E1">if</font> (svd->reason != SVD_CONVERGED_ITERATING) l = 0;
+<a name="line364">364: </a>    <font color="#4169E1">else</font> l = PetscMax((nv-svd->nconv-k)/2,0);
+
+<a name="line366">366: </a>    <font color="#B22222">/* compute converged singular vectors and restart vectors */</font>
+<a name="line367">367: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_VT,&VT);
+<a name="line368">368: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(svd->V,VT,svd->nconv,svd->nconv+k+l);
+<a name="line369">369: </a>    MatDestroy(&VT);
+<a name="line370">370: </a>    <a href="../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(svd->ds,DS_MAT_U,&U);
+<a name="line371">371: </a>    <a href="../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(svd->U,U,svd->nconv,svd->nconv+k+l);
+<a name="line372">372: </a>    MatDestroy(&U);
+
+<a name="line374">374: </a>    <font color="#B22222">/* copy the last vector to be the next initial vector */</font>
+<a name="line375">375: </a>    <font color="#4169E1">if</font> (svd->reason == SVD_CONVERGED_ITERATING) {
+<a name="line376">376: </a>      <a href="../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(svd->V,nv,svd->nconv+k+l);
 <a name="line377">377: </a>    }
-<a name="line378">378: </a>  }
-
-<a name="line380">380: </a>  <font color="#B22222">/* free working space */</font>
-<a name="line381">381: </a>  PetscFree(w);
-<a name="line382">382: </a>  <font color="#4169E1">if</font> (swork) { PetscFree(swork); }
-<a name="line383">383: </a>  <font color="#4169E1">return</font>(0);
-<a name="line384">384: </a>}
-
-<a name="line388">388: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_TRLanczos"></a>PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptions *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line389">389: </a>{
-<a name="line391">391: </a>  PetscBool      set,val;
-<a name="line392">392: </a>  SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
-
-<a name="line395">395: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> TRLanczos Options"</font>);
-<a name="line396">396: </a>  PetscOptionsBool(<font color="#666666">"-svd_trlanczos_oneside"</font>,<font color="#666666">"Lanczos one-side reorthogonalization"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>"</font>,lanczos->oneside,&val,&set);
-<a name="line397">397: </a>  <font color="#4169E1">if</font> (set) {
-<a name="line398">398: </a>    <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>(svd,val);
-<a name="line399">399: </a>  }
-<a name="line400">400: </a>  PetscOptionsTail();
-<a name="line401">401: </a>  <font color="#4169E1">return</font>(0);
-<a name="line402">402: </a>}
-
-<a name="line406">406: </a><strong><font color="#4169E1"><a name="SVDTRLanczosSetOneSide_TRLanczos"></a>static PetscErrorCode SVDTRLanczosSetOneSide_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
-<a name="line407">407: </a>{
-<a name="line408">408: </a>  SVD_TRLANCZOS *lanczos = (SVD_TRLANCZOS*)svd->data;
-
-<a name="line411">411: </a>  lanczos->oneside = oneside;
+
+<a name="line379">379: </a>    svd->nconv += k;
+<a name="line380">380: </a>    SVDMonitor(svd,svd->its,svd->nconv,svd->sigma,svd->errest,nv);
+<a name="line381">381: </a>  }
+
+<a name="line383">383: </a>  <font color="#B22222">/* orthonormalize U columns in one side method */</font>
+<a name="line384">384: </a>  <font color="#4169E1">if</font> (lanczos->oneside) {
+<a name="line385">385: </a>    <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line386">386: </a>      <a href="../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(svd->U,i,NULL,&norm,NULL);
+<a name="line387">387: </a>      <a href="../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(svd->U,i,1.0/norm);
+<a name="line388">388: </a>    }
+<a name="line389">389: </a>  }
+
+<a name="line391">391: </a>  <font color="#B22222">/* free working space */</font>
+<a name="line392">392: </a>  PetscFree(w);
+<a name="line393">393: </a>  <font color="#4169E1">if</font> (swork) { PetscFree(swork); }
+<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
+<a name="line395">395: </a>}
+
+<a name="line399">399: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions_TRLanczos"></a>PetscErrorCode SVDSetFromOptions_TRLanczos(PetscOptionItems *PetscOptionsObject,<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line400">400: </a>{
+<a name="line402">402: </a>  PetscBool      set,val;
+<a name="line403">403: </a>  SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
+
+<a name="line406">406: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> TRLanczos Options"</font>);
+<a name="line407">407: </a>  PetscOptionsBool(<font color="#666666">"-svd_trlanczos_oneside"</font>,<font color="#666666">"Lanczos one-side reorthogonalization"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>"</font>,lanczos->oneside,&val,&set);
+<a name="line408">408: </a>  <font color="#4169E1">if</font> (set) {
+<a name="line409">409: </a>    <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>(svd,val);
+<a name="line410">410: </a>  }
+<a name="line411">411: </a>  PetscOptionsTail();
 <a name="line412">412: </a>  <font color="#4169E1">return</font>(0);
 <a name="line413">413: </a>}
 
-<a name="line417">417: </a><font color="#B22222">/*@</font>
-<a name="line418">418: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a> - Indicate if the variant of the Lanczos method</font>
-<a name="line419">419: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
+<a name="line417">417: </a><strong><font color="#4169E1"><a name="SVDTRLanczosSetOneSide_TRLanczos"></a>static PetscErrorCode SVDTRLanczosSetOneSide_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
+<a name="line418">418: </a>{
+<a name="line419">419: </a>  SVD_TRLANCZOS *lanczos = (SVD_TRLANCZOS*)svd->data;
+
+<a name="line422">422: </a>  lanczos->oneside = oneside;
+<a name="line423">423: </a>  <font color="#4169E1">return</font>(0);
+<a name="line424">424: </a>}
+
+<a name="line428">428: </a><font color="#B22222">/*@</font>
+<a name="line429">429: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a> - Indicate if the variant of the Lanczos method</font>
+<a name="line430">430: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
 
-<a name="line421">421: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+<a name="line432">432: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
 
-<a name="line423">423: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line424">424: </a><font color="#B22222">+  svd     - singular value solver</font>
-<a name="line425">425: </a><font color="#B22222">-  oneside - boolean flag indicating if the method is one-sided or not</font>
+<a name="line434">434: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line435">435: </a><font color="#B22222">+  svd     - singular value solver</font>
+<a name="line436">436: </a><font color="#B22222">-  oneside - boolean flag indicating if the method is one-sided or not</font>
 
-<a name="line427">427: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line428">428: </a><font color="#B22222">.  -svd_trlanczos_oneside <boolean> - Indicates the boolean flag</font>
+<a name="line438">438: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line439">439: </a><font color="#B22222">.  -svd_trlanczos_oneside <boolean> - Indicates the boolean flag</font>
 
-<a name="line430">430: </a><font color="#B22222">   Note:</font>
-<a name="line431">431: </a><font color="#B22222">   By default, a two-sided variant is selected, which is sometimes slightly</font>
-<a name="line432">432: </a><font color="#B22222">   more robust. However, the one-sided variant is faster because it avoids</font>
-<a name="line433">433: </a><font color="#B22222">   the orthogonalization associated to left singular vectors.</font>
+<a name="line441">441: </a><font color="#B22222">   Note:</font>
+<a name="line442">442: </a><font color="#B22222">   By default, a two-sided variant is selected, which is sometimes slightly</font>
+<a name="line443">443: </a><font color="#B22222">   more robust. However, the one-sided variant is faster because it avoids</font>
+<a name="line444">444: </a><font color="#B22222">   the orthogonalization associated to left singular vectors.</font>
 
-<a name="line435">435: </a><font color="#B22222">   Level: advanced</font>
+<a name="line446">446: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line437">437: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>()</font>
-<a name="line438">438: </a><font color="#B22222">@*/</font>
-<a name="line439">439: </a><strong><font color="#4169E1"><a name="SVDTRLanczosSetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
-<a name="line440">440: </a>{
+<a name="line448">448: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDLanczosSetOneSide.html#SVDLanczosSetOneSide">SVDLanczosSetOneSide</a>()</font>
+<a name="line449">449: </a><font color="#B22222">@*/</font>
+<a name="line450">450: </a><strong><font color="#4169E1"><a name="SVDTRLanczosSetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool oneside)</font></strong>
+<a name="line451">451: </a>{
 
-<a name="line446">446: </a>  PetscTryMethod(svd,<font color="#666666">"SVDTRLanczosSetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool),(svd,oneside));
-<a name="line447">447: </a>  <font color="#4169E1">return</font>(0);
-<a name="line448">448: </a>}
+<a name="line457">457: </a>  PetscTryMethod(svd,<font color="#666666">"SVDTRLanczosSetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool),(svd,oneside));
+<a name="line458">458: </a>  <font color="#4169E1">return</font>(0);
+<a name="line459">459: </a>}
 
-<a name="line452">452: </a><font color="#B22222">/*@</font>
-<a name="line453">453: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</a> - Gets if the variant of the Lanczos method</font>
-<a name="line454">454: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
+<a name="line463">463: </a><strong><font color="#4169E1"><a name="SVDTRLanczosGetOneSide_TRLanczos"></a>static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
+<a name="line464">464: </a>{
+<a name="line465">465: </a>  SVD_TRLANCZOS *lanczos = (SVD_TRLANCZOS*)svd->data;
 
-<a name="line456">456: </a><font color="#B22222">   Not Collective</font>
+<a name="line468">468: </a>  *oneside = lanczos->oneside;
+<a name="line469">469: </a>  <font color="#4169E1">return</font>(0);
+<a name="line470">470: </a>}
 
-<a name="line458">458: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line459">459: </a><font color="#B22222">.  svd     - singular value solver</font>
+<a name="line474">474: </a><font color="#B22222">/*@</font>
+<a name="line475">475: </a><font color="#B22222">   <a href="../../../../docs/manualpages/SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</a> - Gets if the variant of the Lanczos method</font>
+<a name="line476">476: </a><font color="#B22222">   to be used is one-sided or two-sided.</font>
 
-<a name="line461">461: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line462">462: </a><font color="#B22222">.  oneside - boolean flag indicating if the method is one-sided or not</font>
+<a name="line478">478: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line464">464: </a><font color="#B22222">   Level: advanced</font>
+<a name="line480">480: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line481">481: </a><font color="#B22222">.  svd     - singular value solver</font>
 
-<a name="line466">466: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>()</font>
-<a name="line467">467: </a><font color="#B22222">@*/</font>
-<a name="line468">468: </a><strong><font color="#4169E1"><a name="SVDTRLanczosGetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
-<a name="line469">469: </a>{
+<a name="line483">483: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line484">484: </a><font color="#B22222">.  oneside - boolean flag indicating if the method is one-sided or not</font>
 
-<a name="line475">475: </a>  PetscTryMethod(svd,<font color="#666666">"SVDTRLanczosGetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*),(svd,oneside));
-<a name="line476">476: </a>  <font color="#4169E1">return</font>(0);
-<a name="line477">477: </a>}
+<a name="line486">486: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line481">481: </a><strong><font color="#4169E1"><a name="SVDTRLanczosGetOneSide_TRLanczos"></a>static PetscErrorCode SVDTRLanczosGetOneSide_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
-<a name="line482">482: </a>{
-<a name="line483">483: </a>  SVD_TRLANCZOS    *lanczos = (SVD_TRLANCZOS*)svd->data;
+<a name="line488">488: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/SVD/SVDTRLanczosSetOneSide.html#SVDTRLanczosSetOneSide">SVDTRLanczosSetOneSide</a>()</font>
+<a name="line489">489: </a><font color="#B22222">@*/</font>
+<a name="line490">490: </a><strong><font color="#4169E1"><a name="SVDTRLanczosGetOneSide"></a>PetscErrorCode <a href="../../../../docs/manualpages/SVD/SVDTRLanczosGetOneSide.html#SVDTRLanczosGetOneSide">SVDTRLanczosGetOneSide</a>(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *oneside)</font></strong>
+<a name="line491">491: </a>{
 
-<a name="line486">486: </a>  *oneside = lanczos->oneside;
-<a name="line487">487: </a>  <font color="#4169E1">return</font>(0);
-<a name="line488">488: </a>}
+<a name="line497">497: </a>  PetscUseMethod(svd,<font color="#666666">"SVDTRLanczosGetOneSide_C"</font>,(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscBool*),(svd,oneside));
+<a name="line498">498: </a>  <font color="#4169E1">return</font>(0);
+<a name="line499">499: </a>}
 
-<a name="line492">492: </a><strong><font color="#4169E1"><a name="SVDDestroy_TRLanczos"></a>PetscErrorCode SVDDestroy_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line493">493: </a>{
+<a name="line503">503: </a><strong><font color="#4169E1"><a name="SVDDestroy_TRLanczos"></a>PetscErrorCode SVDDestroy_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line504">504: </a>{
 
-<a name="line497">497: </a>  PetscFree(svd->data);
-<a name="line498">498: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosSetOneSide_C"</font>,NULL);
-<a name="line499">499: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosGetOneSide_C"</font>,NULL);
-<a name="line500">500: </a>  <font color="#4169E1">return</font>(0);
-<a name="line501">501: </a>}
+<a name="line508">508: </a>  PetscFree(svd->data);
+<a name="line509">509: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosSetOneSide_C"</font>,NULL);
+<a name="line510">510: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosGetOneSide_C"</font>,NULL);
+<a name="line511">511: </a>  <font color="#4169E1">return</font>(0);
+<a name="line512">512: </a>}
 
-<a name="line505">505: </a><strong><font color="#4169E1"><a name="SVDView_TRLanczos"></a>PetscErrorCode SVDView_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line506">506: </a>{
-<a name="line508">508: </a>  SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
+<a name="line516">516: </a><strong><font color="#4169E1"><a name="SVDView_TRLanczos"></a>PetscErrorCode SVDView_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line517">517: </a>{
+<a name="line519">519: </a>  SVD_TRLANCZOS  *lanczos = (SVD_TRLANCZOS*)svd->data;
+<a name="line520">520: </a>  PetscBool      isascii;
 
-<a name="line511">511: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  TRLanczos: %s-sided reorthogonalization\n"</font>,lanczos->oneside? <font color="#666666">"one"</font>: <font color="#666666">"two"</font>);
-<a name="line512">512: </a>  <font color="#4169E1">return</font>(0);
-<a name="line513">513: </a>}
+<a name="line523">523: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line524">524: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line525">525: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  TRLanczos: %s-sided reorthogonalization\n"</font>,lanczos->oneside? <font color="#666666">"one"</font>: <font color="#666666">"two"</font>);
+<a name="line526">526: </a>  }
+<a name="line527">527: </a>  <font color="#4169E1">return</font>(0);
+<a name="line528">528: </a>}
 
-<a name="line517">517: </a><strong><font color="#4169E1"><a name="SVDCreate_TRLanczos"></a>PETSC_EXTERN PetscErrorCode SVDCreate_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line518">518: </a>{
-<a name="line520">520: </a>  SVD_TRLANCZOS  *ctx;
+<a name="line532">532: </a><strong><font color="#4169E1"><a name="SVDCreate_TRLanczos"></a>PETSC_EXTERN PetscErrorCode SVDCreate_TRLanczos(<a href="../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line533">533: </a>{
+<a name="line535">535: </a>  SVD_TRLANCZOS  *ctx;
 
-<a name="line523">523: </a>  PetscNewLog(svd,&ctx);
-<a name="line524">524: </a>  svd->data = (void*)ctx;
+<a name="line538">538: </a>  PetscNewLog(svd,&ctx);
+<a name="line539">539: </a>  svd->data = (void*)ctx;
 
-<a name="line526">526: </a>  svd->ops->setup          = SVDSetUp_TRLanczos;
-<a name="line527">527: </a>  svd->ops->solve          = SVDSolve_TRLanczos;
-<a name="line528">528: </a>  svd->ops->destroy        = SVDDestroy_TRLanczos;
-<a name="line529">529: </a>  svd->ops->setfromoptions = SVDSetFromOptions_TRLanczos;
-<a name="line530">530: </a>  svd->ops->view           = SVDView_TRLanczos;
-<a name="line531">531: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosSetOneSide_C"</font>,SVDTRLanczosSetOneSide_TRLanczos);
-<a name="line532">532: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosGetOneSide_C"</font>,SVDTRLanczosGetOneSide_TRLanczos);
-<a name="line533">533: </a>  <font color="#4169E1">return</font>(0);
-<a name="line534">534: </a>}
+<a name="line541">541: </a>  svd->ops->setup          = SVDSetUp_TRLanczos;
+<a name="line542">542: </a>  svd->ops->solve          = SVDSolve_TRLanczos;
+<a name="line543">543: </a>  svd->ops->destroy        = SVDDestroy_TRLanczos;
+<a name="line544">544: </a>  svd->ops->setfromoptions = SVDSetFromOptions_TRLanczos;
+<a name="line545">545: </a>  svd->ops->view           = SVDView_TRLanczos;
+<a name="line546">546: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosSetOneSide_C"</font>,SVDTRLanczosSetOneSide_TRLanczos);
+<a name="line547">547: </a>  PetscObjectComposeFunction((PetscObject)svd,<font color="#666666">"SVDTRLanczosGetOneSide_C"</font>,SVDTRLanczosGetOneSide_TRLanczos);
+<a name="line548">548: </a>  <font color="#4169E1">return</font>(0);
+<a name="line549">549: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/index.html b/src/svd/index.html
index 32607f6..3a8f1c1 100644
--- a/src/svd/index.html
+++ b/src/svd/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
diff --git a/src/svd/interface/dlregissvd.c b/src/svd/interface/dlregissvd.c
index 9764e7c..1b9f92a 100644
--- a/src/svd/interface/dlregissvd.c
+++ b/src/svd/interface/dlregissvd.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -24,7 +24,7 @@
 static PetscBool SVDPackageInitialized = PETSC_FALSE;
 
 const char *SVDErrorTypes[] = {"ABSOLUTE","RELATIVE","SVDErrorType","SVD_ERROR_",0};
-const char *const SVDConvergedReasons_Shifted[] = {"DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","SVDConvergedReason","SVD_",0};
+const char *const SVDConvergedReasons_Shifted[] = {"","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","SVDConvergedReason","SVD_",0};
 const char *const*SVDConvergedReasons = SVDConvergedReasons_Shifted + 4;
 
 #undef __FUNCT__
@@ -77,7 +77,7 @@ PetscErrorCode SVDInitializePackage(void)
   ierr = PetscLogEventRegister("SVDSetUp",SVD_CLASSID,&SVD_SetUp);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("SVDSolve",SVD_CLASSID,&SVD_Solve);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"svd",&className);CHKERRQ(ierr);
     if (className) {
@@ -85,7 +85,7 @@ PetscErrorCode SVDInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"svd",&className);CHKERRQ(ierr);
     if (className) {
diff --git a/src/svd/interface/dlregissvd.c.html b/src/svd/interface/dlregissvd.c.html
index d539135..a949761 100644
--- a/src/svd/interface/dlregissvd.c.html
+++ b/src/svd/interface/dlregissvd.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/dlregissvd.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:39+00:00">
+<meta name="date" content="2016-05-16T10:33:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/dlregissvd.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/dlregissvd.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -36,7 +36,7 @@
 <a name="line24"> 24: </a>static PetscBool SVDPackageInitialized = PETSC_FALSE;
 
 <a name="line26"> 26: </a>const char *SVDErrorTypes[] = {<font color="#666666">"ABSOLUTE"</font>,<font color="#666666">"RELATIVE"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>"</font>,<font color="#666666">"SVD_ERROR_"</font>,0};
-<a name="line27"> 27: </a>const char *const SVDConvergedReasons_Shifted[] = {<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">""</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">""</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>" [...]
+<a name="line27"> 27: </a>const char *const SVDConvergedReasons_Shifted[] = {<font color="#666666">""</font>,<font color="#666666">""</font>,<font color="#666666">"DIVERGED_BREAKDOWN"</font>,<font color="#666666">"DIVERGED_ITS"</font>,<font color="#666666">"CONVERGED_ITERATING"</font>,<font color="#666666">"CONVERGED_TOL"</font>,<font color="#666666">"CONVERGED_USER"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConver [...]
 <a name="line28"> 28: </a>const char *const*SVDConvergedReasons = SVDConvergedReasons_Shifted + 4;
 
 <a name="line32"> 32: </a><font color="#B22222">/*@C</font>
@@ -81,7 +81,7 @@
 <a name="line77"> 77: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>"</font>,SVD_CLASSID,&SVD_SetUp);
 <a name="line78"> 78: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>"</font>,SVD_CLASSID,&SVD_Solve);
 <a name="line79"> 79: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line80"> 80: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line80"> 80: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
 <a name="line81"> 81: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line82"> 82: </a>    PetscStrstr(logList,<font color="#666666">"svd"</font>,&className);
 <a name="line83"> 83: </a>    <font color="#4169E1">if</font> (className) {
@@ -89,7 +89,7 @@
 <a name="line85"> 85: </a>    }
 <a name="line86"> 86: </a>  }
 <a name="line87"> 87: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line88"> 88: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
+<a name="line88"> 88: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
 <a name="line89"> 89: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line90"> 90: </a>    PetscStrstr(logList,<font color="#666666">"svd"</font>,&className);
 <a name="line91"> 91: </a>    <font color="#4169E1">if</font> (className) {
diff --git a/src/svd/interface/ftn-auto/svdoptsf.c b/src/svd/interface/ftn-auto/svdoptsf.c
index 8667679..153d32d 100644
--- a/src/svd/interface/ftn-auto/svdoptsf.c
+++ b/src/svd/interface/ftn-auto/svdoptsf.c
@@ -69,6 +69,26 @@ extern void PetscRmPointer(void*);
 #define svdgetwhichsingulartriplets_ svdgetwhichsingulartriplets
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define svdsetconvergencetest_ SVDSETCONVERGENCETEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define svdsetconvergencetest_ svdsetconvergencetest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define svdgetconvergencetest_ SVDGETCONVERGENCETEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define svdgetconvergencetest_ svdgetconvergencetest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define svdsetstoppingtest_ SVDSETSTOPPINGTEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define svdsetstoppingtest_ svdsetstoppingtest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define svdgetstoppingtest_ SVDGETSTOPPINGTEST
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define svdgetstoppingtest_ svdgetstoppingtest
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define svdsetfromoptions_ SVDSETFROMOPTIONS
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define svdsetfromoptions_ svdsetfromoptions
@@ -121,6 +141,22 @@ PETSC_EXTERN void PETSC_STDCALL  svdgetwhichsingulartriplets_(SVD svd,SVDWhich *
 *__ierr = SVDGetWhichSingularTriplets(
 	(SVD)PetscToPointer((svd) ),which);
 }
+PETSC_EXTERN void PETSC_STDCALL  svdsetconvergencetest_(SVD svd,SVDConv *conv, int *__ierr ){
+*__ierr = SVDSetConvergenceTest(
+	(SVD)PetscToPointer((svd) ),*conv);
+}
+PETSC_EXTERN void PETSC_STDCALL  svdgetconvergencetest_(SVD svd,SVDConv *conv, int *__ierr ){
+*__ierr = SVDGetConvergenceTest(
+	(SVD)PetscToPointer((svd) ),conv);
+}
+PETSC_EXTERN void PETSC_STDCALL  svdsetstoppingtest_(SVD svd,SVDStop *stop, int *__ierr ){
+*__ierr = SVDSetStoppingTest(
+	(SVD)PetscToPointer((svd) ),*stop);
+}
+PETSC_EXTERN void PETSC_STDCALL  svdgetstoppingtest_(SVD svd,SVDStop *stop, int *__ierr ){
+*__ierr = SVDGetStoppingTest(
+	(SVD)PetscToPointer((svd) ),stop);
+}
 PETSC_EXTERN void PETSC_STDCALL  svdsetfromoptions_(SVD svd, int *__ierr ){
 *__ierr = SVDSetFromOptions(
 	(SVD)PetscToPointer((svd) ));
diff --git a/src/svd/interface/ftn-custom/makefile b/src/svd/interface/ftn-custom/makefile
index 996bd16..0e3ee76 100644
--- a/src/svd/interface/ftn-custom/makefile
+++ b/src/svd/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/interface/ftn-custom/zsvdf.c b/src/svd/interface/ftn-custom/zsvdf.c
index 68d1a2a..ca32c5e 100644
--- a/src/svd/interface/ftn-custom/zsvdf.c
+++ b/src/svd/interface/ftn-custom/zsvdf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,6 +40,10 @@
 #define svdsetoptionsprefix_         SVDSETOPTIONSPREFIX
 #define svdappendoptionsprefix_      SVDAPPENDOPTIONSPREFIX
 #define svdgetoptionsprefix_         SVDGETOPTIONSPREFIX
+#define svdconvergedabsolute_        SVDCONVERGEDABSOLUTE
+#define svdconvergedrelative_        SVDCONVERGEDRELATIVE
+#define svdsetconvergencetestfunction_ SVDSETCONVERGENCETESTFUNCTION
+#define svdsetstoppingtestfunction_  SVDSETSTOPPINGTESTFUNCTION
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
 #define svdmonitorall_               svdmonitorall
 #define svdmonitorlg_                svdmonitorlg
@@ -57,40 +61,48 @@
 #define svdsetoptionsprefix_         svdsetoptionsprefix
 #define svdappendoptionsprefix_      svdappendoptionsprefix
 #define svdgetoptionsprefix_         svdgetoptionsprefix
+#define svdconvergedabsolute_        svdconvergedabsolute
+#define svdconvergedrelative_        svdconvergedrelative
+#define svdsetconvergencetestfunction_ svdsetconvergencetestfunction
+#define svdsetstoppingtestfunction_  svdsetstoppingtestfunction
 #endif
 
 /*
    These are not usually called from Fortran but allow Fortran users
    to transparently set these monitors from .F code, hence no STDCALL
 */
-PETSC_EXTERN void svdmonitorall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void svdmonitorall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = SVDMonitorAll(*svd,*it,*nconv,sigma,errest,*nest,ctx);
+  *ierr = SVDMonitorAll(*svd,*it,*nconv,sigma,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void svdmonitorlg_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void svdmonitorconverged_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,SlepcConvMonitor *ctx,PetscErrorCode *ierr)
 {
-  *ierr = SVDMonitorLG(*svd,*it,*nconv,sigma,errest,*nest,ctx);
+  *ierr = SVDMonitorConverged(*svd,*it,*nconv,sigma,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void svdmonitorlgall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void svdmonitorfirst_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,PetscViewerAndFormat **ctx,PetscErrorCode *ierr)
 {
-  *ierr = SVDMonitorLGAll(*svd,*it,*nconv,sigma,errest,*nest,ctx);
+  *ierr = SVDMonitorFirst(*svd,*it,*nconv,sigma,errest,*nest,*ctx);
 }
 
-PETSC_EXTERN void svdmonitorconverged_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void svdmonitorlg_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = SVDMonitorConverged(*svd,*it,*nconv,sigma,errest,*nest,ctx);
+  *ierr = SVDMonitorLG(*svd,*it,*nconv,sigma,errest,*nest,ctx);
 }
 
-PETSC_EXTERN void svdmonitorfirst_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
+PETSC_EXTERN void svdmonitorlgall_(SVD *svd,PetscInt *it,PetscInt *nconv,PetscReal *sigma,PetscReal *errest,PetscInt *nest,void *ctx,PetscErrorCode *ierr)
 {
-  *ierr = SVDMonitorFirst(*svd,*it,*nconv,sigma,errest,*nest,ctx);
+  *ierr = SVDMonitorLGAll(*svd,*it,*nconv,sigma,errest,*nest,ctx);
 }
 
 static struct {
   PetscFortranCallbackId monitor;
   PetscFortranCallbackId monitordestroy;
+  PetscFortranCallbackId convergence;
+  PetscFortranCallbackId convdestroy;
+  PetscFortranCallbackId stopping;
+  PetscFortranCallbackId stopdestroy;
 } _cb;
 
 /* These are not extern C because they are passed into non-extern C user level functions */
@@ -109,6 +121,36 @@ static PetscErrorCode ourdestroy(void** ctx)
   PetscObjectUseFortranCallback(svd,_cb.monitordestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
 }
 
+#undef __FUNCT__
+#define __FUNCT__ "ourconvergence"
+static PetscErrorCode ourconvergence(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)
+{
+  PetscObjectUseFortranCallback(svd,_cb.convergence,(SVD*,PetscReal*,PetscReal*,PetscReal*,void*,PetscErrorCode*),(&svd,&sigma,&res,errest,_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourconvdestroy"
+static PetscErrorCode ourconvdestroy(void *ctx)
+{
+  SVD svd = (SVD)ctx;
+  PetscObjectUseFortranCallback(svd,_cb.convdestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourstopping"
+static PetscErrorCode ourstopping(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)
+{
+  PetscObjectUseFortranCallback(svd,_cb.stopping,(SVD*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,SVDConvergedReason*,void*,PetscErrorCode*),(&svd,&its,&max_it,&nconv,&nsv,reason,_ctx,&ierr));
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "ourstopdestroy"
+static PetscErrorCode ourstopdestroy(void *ctx)
+{
+  SVD svd = (SVD)ctx;
+  PetscObjectUseFortranCallback(svd,_cb.stopdestroy,(void*,PetscErrorCode*),(_ctx,&ierr));
+}
+
 PETSC_EXTERN void PETSC_STDCALL svdview_(SVD *svd,PetscViewer *viewer,PetscErrorCode *ierr)
 {
   PetscViewer v;
@@ -164,28 +206,18 @@ PETSC_EXTERN void PETSC_STDCALL svdgettype_(SVD *svd,CHAR name PETSC_MIXED_LEN(l
 
 PETSC_EXTERN void PETSC_STDCALL svdmonitorset_(SVD *svd,void (PETSC_STDCALL *monitor)(SVD*,PetscInt*,PetscInt*,PetscReal*,PetscReal*,PetscInt*,void*,PetscErrorCode*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,PetscErrorCode*),PetscErrorCode *ierr)
 {
-  SlepcConvMonitor ctx;
-
   CHKFORTRANNULLOBJECT(mctx);
   CHKFORTRANNULLFUNCTION(monitordestroy);
   if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorall_) {
-    *ierr = SVDMonitorSet(*svd,SVDMonitorAll,0,0);
+    *ierr = SVDMonitorSet(*svd,(PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))SVDMonitorAll,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorconverged_) {
+    *ierr = SVDMonitorSet(*svd,(PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))SVDMonitorConverged,*(SlepcConvMonitor*)mctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
+  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorfirst_) {
+    *ierr = SVDMonitorSet(*svd,(PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))SVDMonitorFirst,*(PetscViewerAndFormat**)mctx,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorlg_) {
     *ierr = SVDMonitorSet(*svd,SVDMonitorLG,0,0);
   } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorlgall_) {
     *ierr = SVDMonitorSet(*svd,SVDMonitorLGAll,0,0);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorconverged_) {
-    if (mctx) {
-      PetscError(PetscObjectComm((PetscObject)*svd),__LINE__,"svdmonitorset_",__FILE__,PETSC_ERR_ARG_WRONG,PETSC_ERROR_INITIAL,"Must provide PETSC_NULL_OBJECT as a context in the Fortran interface to SVDMonitorSet");
-      *ierr = 1;
-      return;
-    }
-    *ierr = PetscNew(&ctx);
-    if (*ierr) return;
-    ctx->viewer = NULL;
-    *ierr = SVDMonitorSet(*svd,SVDMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-  } else if ((PetscVoidFunction)monitor == (PetscVoidFunction)svdmonitorfirst_) {
-    *ierr = SVDMonitorSet(*svd,SVDMonitorFirst,0,0);
   } else {
     *ierr = PetscObjectSetFortranCallback((PetscObject)*svd,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.monitor,(PetscVoidFunction)monitor,mctx); if (*ierr) return;
     if (!monitordestroy) {
@@ -223,3 +255,54 @@ PETSC_EXTERN void PETSC_STDCALL svdgetoptionsprefix_(SVD *svd,CHAR prefix PETSC_
   *ierr = PetscStrncpy(prefix,tname,len);
 }
 
+PETSC_EXTERN void PETSC_STDCALL svdconvergedabsolute_(SVD *svd,PetscReal *sigma,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = SVDConvergedAbsolute(*svd,*sigma,*res,errest,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL svdconvergedrelative_(SVD *svd,PetscReal *sigma,PetscReal *res,PetscReal *errest,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = SVDConvergedRelative(*svd,*sigma,*res,errest,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL svdsetconvergencetestfunction_(SVD *svd,void (PETSC_STDCALL *func)(SVD*,PetscReal*,PetscReal*,PetscReal*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  CHKFORTRANNULLFUNCTION(destroy);
+  if ((PetscVoidFunction)func == (PetscVoidFunction)svdconvergedabsolute_) {
+    *ierr = SVDSetConvergenceTest(*svd,SVD_CONV_ABS);
+  } else if ((PetscVoidFunction)func == (PetscVoidFunction)svdconvergedrelative_) {
+    *ierr = SVDSetConvergenceTest(*svd,SVD_CONV_REL);
+  } else {
+    *ierr = PetscObjectSetFortranCallback((PetscObject)*svd,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.convergence,(PetscVoidFunction)func,ctx); if (*ierr) return;
+    if (!destroy) {
+      *ierr = SVDSetConvergenceTestFunction(*svd,ourconvergence,*svd,NULL);
+    } else {
+      *ierr = PetscObjectSetFortranCallback((PetscObject)*svd,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.convdestroy,(PetscVoidFunction)destroy,ctx); if (*ierr) return;
+      *ierr = SVDSetConvergenceTestFunction(*svd,ourconvergence,*svd,ourconvdestroy);
+    }
+  }
+}
+
+PETSC_EXTERN void PETSC_STDCALL svdstoppingbasic_(SVD *svd,PetscInt *its,PetscInt *max_it,PetscInt *nconv,PetscInt *nsv,SVDConvergedReason *reason,void *ctx,PetscErrorCode *ierr)
+{
+  *ierr = SVDStoppingBasic(*svd,*its,*max_it,*nconv,*nsv,reason,ctx);
+}
+
+PETSC_EXTERN void PETSC_STDCALL svdsetstoppingtestfunction_(SVD *svd,void (PETSC_STDCALL *func)(SVD*,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*,PetscErrorCode*),void* ctx,void (PETSC_STDCALL *destroy)(void*,PetscErrorCode*),PetscErrorCode *ierr)
+{
+  CHKFORTRANNULLOBJECT(ctx);
+  CHKFORTRANNULLFUNCTION(destroy);
+  if ((PetscVoidFunction)func == (PetscVoidFunction)svdstoppingbasic_) {
+    *ierr = SVDSetStoppingTest(*svd,SVD_STOP_BASIC);
+  } else {
+    *ierr = PetscObjectSetFortranCallback((PetscObject)*svd,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopping,(PetscVoidFunction)func,ctx); if (*ierr) return;
+    if (!destroy) {
+      *ierr = SVDSetStoppingTestFunction(*svd,ourstopping,*svd,NULL);
+    } else {
+      *ierr = PetscObjectSetFortranCallback((PetscObject)*svd,PETSC_FORTRAN_CALLBACK_CLASS,&_cb.stopdestroy,(PetscVoidFunction)destroy,ctx); if (*ierr) return;
+      *ierr = SVDSetStoppingTestFunction(*svd,ourstopping,*svd,ourstopdestroy);
+    }
+  }
+}
+
diff --git a/src/svd/interface/index.html b/src/svd/interface/index.html
index e9abc46..842e3f0 100644
--- a/src/svd/interface/index.html
+++ b/src/svd/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Singular Value Decomposition Solvers - SVD: <a href="../../../src/svd/examples/tutorials/index.html">Examples</a></h2>
 
@@ -21,6 +21,7 @@ The user interface is very similar to that of EPS, both for the options database
  
 <a href="svdregis.c.html">svdregis.c</a><br>
 <a href="svdbasic.c.html">svdbasic.c</a><br>
+<a href="svddefault.c.html">svddefault.c</a><br>
 <a href="svdview.c.html">svdview.c</a><br>
 <a href="svdopts.c.html">svdopts.c</a><br>
 <a href="svdsetup.c.html">svdsetup.c</a><br>
diff --git a/src/svd/interface/makefile b/src/svd/interface/makefile
index 3869c26..3247adb 100644
--- a/src/svd/interface/makefile
+++ b/src/svd/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -23,7 +23,7 @@ ALL: lib
 
 CFLAGS   =
 FFLAGS   =
-SOURCEC  = svdregis.c svdbasic.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.c
+SOURCEC  = svdregis.c svdbasic.c svddefault.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.c
 SOURCEF  =
 SOURCEH  =
 LIBBASE  = libslepcsvd
diff --git a/src/svd/interface/makefile.html b/src/svd/interface/makefile.html
index ef2e5f1..ba6a1f7 100644
--- a/src/svd/interface/makefile.html
+++ b/src/svd/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:40+00:00">
+<meta name="date" content="2016-05-16T10:33:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -34,7 +34,7 @@
 
 CFLAGS   =
 FFLAGS   =
-SOURCEC  = svdregis.c svdbasic.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.c
+SOURCEC  = svdregis.c svdbasic.c svddefault.c svdview.c svdopts.c svdsetup.c svdsolve.c svdmon.c dlregissvd.c
 SOURCEF  =
 SOURCEH  =
 LIBBASE  = libslepcsvd
diff --git a/src/svd/interface/svdbasic.c b/src/svd/interface/svdbasic.c
index 736b23c..d9a48b6 100644
--- a/src/svd/interface/svdbasic.c
+++ b/src/svd/interface/svdbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -59,43 +59,47 @@ PetscErrorCode SVDCreate(MPI_Comm comm,SVD *outsvd)
   ierr = SVDInitializePackage();CHKERRQ(ierr);
   ierr = SlepcHeaderCreate(svd,SVD_CLASSID,"SVD","Singular Value Decomposition","SVD",comm,SVDDestroy,SVDView);CHKERRQ(ierr);
 
-  svd->OP             = NULL;
-  svd->max_it         = 0;
-  svd->nsv            = 1;
-  svd->ncv            = 0;
-  svd->mpd            = 0;
-  svd->nini           = 0;
-  svd->ninil          = 0;
-  svd->tol            = PETSC_DEFAULT;
-  svd->which          = SVD_LARGEST;
-  svd->impltrans      = PETSC_FALSE;
-  svd->trackall       = PETSC_FALSE;
-
-  svd->numbermonitors = 0;
-
-  svd->ds             = NULL;
-  svd->U              = NULL;
-  svd->V              = NULL;
-  svd->rand           = NULL;
-  svd->A              = NULL;
-  svd->AT             = NULL;
-  svd->IS             = NULL;
-  svd->ISL            = NULL;
-  svd->sigma          = NULL;
-  svd->perm           = NULL;
-  svd->errest         = NULL;
-  svd->data           = NULL;
-
-  svd->state          = SVD_STATE_INITIAL;
-  svd->nconv          = 0;
-  svd->its            = 0;
-  svd->leftbasis      = PETSC_FALSE;
-  svd->reason         = SVD_CONVERGED_ITERATING;
+  svd->OP               = NULL;
+  svd->max_it           = 0;
+  svd->nsv              = 1;
+  svd->ncv              = 0;
+  svd->mpd              = 0;
+  svd->nini             = 0;
+  svd->ninil            = 0;
+  svd->tol              = PETSC_DEFAULT;
+  svd->conv             = SVD_CONV_REL;
+  svd->stop             = SVD_STOP_BASIC;
+  svd->which            = SVD_LARGEST;
+  svd->impltrans        = PETSC_FALSE;
+  svd->trackall         = PETSC_FALSE;
+
+  svd->converged        = SVDConvergedRelative;
+  svd->convergeddestroy = NULL;
+  svd->stopping         = SVDStoppingBasic;
+  svd->stoppingdestroy  = NULL;
+  svd->convergedctx     = NULL;
+  svd->stoppingctx      = NULL;
+  svd->numbermonitors   = 0;
+
+  svd->ds               = NULL;
+  svd->U                = NULL;
+  svd->V                = NULL;
+  svd->A                = NULL;
+  svd->AT               = NULL;
+  svd->IS               = NULL;
+  svd->ISL              = NULL;
+  svd->sigma            = NULL;
+  svd->perm             = NULL;
+  svd->errest           = NULL;
+  svd->data             = NULL;
+
+  svd->state            = SVD_STATE_INITIAL;
+  svd->nconv            = 0;
+  svd->its              = 0;
+  svd->leftbasis        = PETSC_FALSE;
+  svd->reason           = SVD_CONVERGED_ITERATING;
 
   ierr = PetscNewLog(svd,&svd->sc);CHKERRQ(ierr);
-  ierr = PetscRandomCreate(comm,&svd->rand);CHKERRQ(ierr);
-  ierr = PetscRandomSetSeed(svd->rand,0x12345678);CHKERRQ(ierr);
-  ierr = PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->rand);CHKERRQ(ierr);
   *outsvd = svd;
   PetscFunctionReturn(0);
 }
@@ -162,7 +166,6 @@ PetscErrorCode SVDDestroy(SVD *svd)
   ierr = SVDReset(*svd);CHKERRQ(ierr);
   if ((*svd)->ops->destroy) { ierr = (*(*svd)->ops->destroy)(*svd);CHKERRQ(ierr); }
   ierr = DSDestroy(&(*svd)->ds);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&(*svd)->rand);CHKERRQ(ierr);
   ierr = PetscFree((*svd)->sc);CHKERRQ(ierr);
   /* just in case the initial vectors have not been used */
   ierr = SlepcBasisDestroy_Private(&(*svd)->nini,&(*svd)->IS);CHKERRQ(ierr);
diff --git a/src/svd/interface/svdbasic.c.html b/src/svd/interface/svdbasic.c.html
index f5d3be2..eb946e1 100644
--- a/src/svd/interface/svdbasic.c.html
+++ b/src/svd/interface/svdbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:34+00:00">
+<meta name="date" content="2016-05-16T10:33:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The basic <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> routines, Create, Destroy, etc. are here.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -66,339 +66,342 @@
 <a name="line59"> 59: </a>  <a href="../../../docs/manualpages/SVD/SVDInitializePackage.html#SVDInitializePackage">SVDInitializePackage</a>();
 <a name="line60"> 60: </a>  SlepcHeaderCreate(svd,SVD_CLASSID,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>"</font>,<font color="#666666">"Singular Value Decomposition"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>"</font>,comm,<a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>,<a href="../../../docs/manualpages/SVD/SVDView.html#SVDView">SVDView</a>);
 
-<a name="line62"> 62: </a>  svd->OP             = NULL;
-<a name="line63"> 63: </a>  svd->max_it         = 0;
-<a name="line64"> 64: </a>  svd->nsv            = 1;
-<a name="line65"> 65: </a>  svd->ncv            = 0;
-<a name="line66"> 66: </a>  svd->mpd            = 0;
-<a name="line67"> 67: </a>  svd->nini           = 0;
-<a name="line68"> 68: </a>  svd->ninil          = 0;
-<a name="line69"> 69: </a>  svd->tol            = PETSC_DEFAULT;
-<a name="line70"> 70: </a>  svd->which          = SVD_LARGEST;
-<a name="line71"> 71: </a>  svd->impltrans      = PETSC_FALSE;
-<a name="line72"> 72: </a>  svd->trackall       = PETSC_FALSE;
-
-<a name="line74"> 74: </a>  svd->numbermonitors = 0;
-
-<a name="line76"> 76: </a>  svd->ds             = NULL;
-<a name="line77"> 77: </a>  svd->U              = NULL;
-<a name="line78"> 78: </a>  svd->V              = NULL;
-<a name="line79"> 79: </a>  svd->rand           = NULL;
-<a name="line80"> 80: </a>  svd->A              = NULL;
-<a name="line81"> 81: </a>  svd->AT             = NULL;
-<a name="line82"> 82: </a>  svd->IS             = NULL;
-<a name="line83"> 83: </a>  svd->ISL            = NULL;
-<a name="line84"> 84: </a>  svd->sigma          = NULL;
-<a name="line85"> 85: </a>  svd->perm           = NULL;
-<a name="line86"> 86: </a>  svd->errest         = NULL;
-<a name="line87"> 87: </a>  svd->data           = NULL;
-
-<a name="line89"> 89: </a>  svd->state          = SVD_STATE_INITIAL;
-<a name="line90"> 90: </a>  svd->nconv          = 0;
-<a name="line91"> 91: </a>  svd->its            = 0;
-<a name="line92"> 92: </a>  svd->leftbasis      = PETSC_FALSE;
-<a name="line93"> 93: </a>  svd->reason         = SVD_CONVERGED_ITERATING;
-
-<a name="line95"> 95: </a>  PetscNewLog(svd,&svd->sc);
-<a name="line96"> 96: </a>  PetscRandomCreate(comm,&svd->rand);
-<a name="line97"> 97: </a>  PetscRandomSetSeed(svd->rand,0x12345678);
-<a name="line98"> 98: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->rand);
-<a name="line99"> 99: </a>  *outsvd = svd;
-<a name="line100">100: </a>  <font color="#4169E1">return</font>(0);
-<a name="line101">101: </a>}
-
-<a name="line105">105: </a><font color="#B22222">/*@</font>
-<a name="line106">106: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a> - Resets the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> context to the initial state and removes any</font>
-<a name="line107">107: </a><font color="#B22222">   allocated objects.</font>
-
-<a name="line109">109: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line111">111: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line112">112: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-
-<a name="line114">114: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line116">116: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>()</font>
-<a name="line117">117: </a><font color="#B22222">@*/</font>
-<a name="line118">118: </a><strong><font color="#4169E1"><a name="SVDReset"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line119">119: </a>{
-<a name="line121">121: </a>  PetscInt       ncols;
-
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (svd->ops->reset) { (svd->ops->reset)(svd); }
-<a name="line126">126: </a>  <font color="#4169E1">if</font> (svd->ds) { <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(svd->ds); }
-<a name="line127">127: </a>  MatDestroy(&svd->OP);
-<a name="line128">128: </a>  MatDestroy(&svd->A);
-<a name="line129">129: </a>  MatDestroy(&svd->AT);
-<a name="line130">130: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(svd->V,NULL,NULL,&ncols);
-<a name="line131">131: </a>  <font color="#4169E1">if</font> (ncols) {
-<a name="line132">132: </a>    PetscFree3(svd->sigma,svd->perm,svd->errest);
-<a name="line133">133: </a>  }
-<a name="line134">134: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->U);
-<a name="line135">135: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->V);
-<a name="line136">136: </a>  svd->state = SVD_STATE_INITIAL;
-<a name="line137">137: </a>  <font color="#4169E1">return</font>(0);
-<a name="line138">138: </a>}
-
-<a name="line142">142: </a><font color="#B22222">/*@</font>
-<a name="line143">143: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a> - Destroys the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> context.</font>
-
-<a name="line145">145: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line147">147: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line148">148: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-
-<a name="line150">150: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line152">152: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>(), <a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>()</font>
-<a name="line153">153: </a><font color="#B22222">@*/</font>
-<a name="line154">154: </a><strong><font color="#4169E1"><a name="SVDDestroy"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> *svd)</font></strong>
-<a name="line155">155: </a>{
-
-<a name="line159">159: </a>  <font color="#4169E1">if</font> (!*svd) <font color="#4169E1">return</font>(0);
-<a name="line161">161: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*svd))->refct > 0) { *svd = 0; <font color="#4169E1">return</font>(0); }
-<a name="line162">162: </a>  <a href="../../../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a>(*svd);
-<a name="line163">163: </a>  <font color="#4169E1">if</font> ((*svd)->ops->destroy) { (*(*svd)->ops->destroy)(*svd); }
-<a name="line164">164: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&(*svd)->ds);
-<a name="line165">165: </a>  PetscRandomDestroy(&(*svd)->rand);
-<a name="line166">166: </a>  PetscFree((*svd)->sc);
-<a name="line167">167: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
-<a name="line168">168: </a>  SlepcBasisDestroy_Private(&(*svd)->nini,&(*svd)->IS);
-<a name="line169">169: </a>  SlepcBasisDestroy_Private(&(*svd)->ninil,&(*svd)->ISL);
-<a name="line170">170: </a>  <a href="../../../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>(*svd);
-<a name="line171">171: </a>  PetscHeaderDestroy(svd);
-<a name="line172">172: </a>  <font color="#4169E1">return</font>(0);
-<a name="line173">173: </a>}
-
-<a name="line177">177: </a><font color="#B22222">/*@C</font>
-<a name="line178">178: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a> - Selects the particular solver to be used in the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> object.</font>
-
-<a name="line180">180: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line182">182: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line183">183: </a><font color="#B22222">+  svd      - the singular value solver context</font>
-<a name="line184">184: </a><font color="#B22222">-  type     - a known method</font>
-
-<a name="line186">186: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line187">187: </a><font color="#B22222">.  -svd_type <method> - Sets the method; use -help for a list</font>
-<a name="line188">188: </a><font color="#B22222">    of available methods</font>
-
-<a name="line190">190: </a><font color="#B22222">   Notes:</font>
-<a name="line191">191: </a><font color="#B22222">   See "slepc/include/slepcsvd.h" for available methods. The default</font>
-<a name="line192">192: </a><font color="#B22222">   is SVDCROSS.</font>
-
-<a name="line194">194: </a><font color="#B22222">   Normally, it is best to use the <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>() command and</font>
-<a name="line195">195: </a><font color="#B22222">   then set the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> type from the options database rather than by using</font>
-<a name="line196">196: </a><font color="#B22222">   this routine.  Using the options database provides the user with</font>
-<a name="line197">197: </a><font color="#B22222">   maximum flexibility in evaluating the different available methods.</font>
-<a name="line198">198: </a><font color="#B22222">   The <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>() routine is provided for those situations where it</font>
-<a name="line199">199: </a><font color="#B22222">   is necessary to set the iterative solver independently of the command</font>
-<a name="line200">200: </a><font color="#B22222">   line or options database.</font>
-
-<a name="line202">202: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line204">204: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a></font>
-<a name="line205">205: </a><font color="#B22222">@*/</font>
-<a name="line206">206: </a><strong><font color="#4169E1"><a name="SVDSetType"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a> type)</font></strong>
-<a name="line207">207: </a>{
-<a name="line208">208: </a>  PetscErrorCode ierr,(*r)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
-<a name="line209">209: </a>  PetscBool      match;
-
-
-<a name="line215">215: </a>  PetscObjectTypeCompare((PetscObject)svd,type,&match);
-<a name="line216">216: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
-
-<a name="line218">218: </a>  PetscFunctionListFind(SVDList,type,&r);
-<a name="line219">219: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unknown <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> type given: %s"</font>,type);
-
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (svd->ops->destroy) { (*svd->ops->destroy)(svd); }
-<a name="line222">222: </a>  PetscMemzero(svd->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _SVDOps</font>));
-
-<a name="line224">224: </a>  svd->state = SVD_STATE_INITIAL;
-<a name="line225">225: </a>  PetscObjectChangeTypeName((PetscObject)svd,type);
-<a name="line226">226: </a>  (*r)(svd);
-<a name="line227">227: </a>  <font color="#4169E1">return</font>(0);
-<a name="line228">228: </a>}
-
-<a name="line232">232: </a><font color="#B22222">/*@C</font>
-<a name="line233">233: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a> - Gets the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> type as a string from the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> object.</font>
-
-<a name="line235">235: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line237">237: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line238">238: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line240">240: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line241">241: </a><font color="#B22222">.  name - name of <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> method</font>
-
-<a name="line243">243: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line245">245: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>()</font>
-<a name="line246">246: </a><font color="#B22222">@*/</font>
-<a name="line247">247: </a><strong><font color="#4169E1"><a name="SVDGetType"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a> *type)</font></strong>
-<a name="line248">248: </a>{
-<a name="line252">252: </a>  *type = ((PetscObject)svd)->type_name;
-<a name="line253">253: </a>  <font color="#4169E1">return</font>(0);
-<a name="line254">254: </a>}
-
-<a name="line258">258: </a><font color="#B22222">/*@C</font>
-<a name="line259">259: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a> - Adds a method to the singular value solver package.</font>
-
-<a name="line261">261: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line263">263: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line264">264: </a><font color="#B22222">+  name - name of a new user-defined solver</font>
-<a name="line265">265: </a><font color="#B22222">-  function - routine to create the solver context</font>
-
-<a name="line267">267: </a><font color="#B22222">   Notes:</font>
-<a name="line268">268: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>() may be called multiple times to add several user-defined solvers.</font>
-
-<a name="line270">270: </a><font color="#B22222">   Sample usage:</font>
-<a name="line271">271: </a><font color="#B22222">.vb</font>
-<a name="line272">272: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>("my_solver",MySolverCreate);</font>
-<a name="line273">273: </a><font color="#B22222">.ve</font>
-
-<a name="line275">275: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
-<a name="line276">276: </a><font color="#B22222">$     <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,"my_solver")</font>
-<a name="line277">277: </a><font color="#B22222">   or at runtime via the option</font>
-<a name="line278">278: </a><font color="#B22222">$     -svd_type my_solver</font>
-
-<a name="line280">280: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line282">282: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDRegisterAll.html#SVDRegisterAll">SVDRegisterAll</a>()</font>
-<a name="line283">283: </a><font color="#B22222">@*/</font>
-<a name="line284">284: </a><strong><font color="#4169E1"><a name="SVDRegister"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>))</font></strong>
-<a name="line285">285: </a>{
-
-<a name="line289">289: </a>  PetscFunctionListAdd(&SVDList,name,function);
-<a name="line290">290: </a>  <font color="#4169E1">return</font>(0);
-<a name="line291">291: </a>}
-
-<a name="line295">295: </a><font color="#B22222">/*@</font>
-<a name="line296">296: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a> - Associates basis vectors objects to the singular value solver.</font>
-
-<a name="line298">298: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line300">300: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line301">301: </a><font color="#B22222">+  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-<a name="line302">302: </a><font color="#B22222">.  V   - the basis vectors object for right singular vectors</font>
-<a name="line303">303: </a><font color="#B22222">-  U   - the basis vectors object for left singular vectors</font>
-
-<a name="line305">305: </a><font color="#B22222">   Note:</font>
-<a name="line306">306: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>() to retrieve the basis vectors contexts (for example,</font>
-<a name="line307">307: </a><font color="#B22222">   to free them at the end of the computations).</font>
-
-<a name="line309">309: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line311">311: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>()</font>
-<a name="line312">312: </a><font color="#B22222">@*/</font>
-<a name="line313">313: </a><strong><font color="#4169E1"><a name="SVDSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> U)</font></strong>
-<a name="line314">314: </a>{
+<a name="line62"> 62: </a>  svd->OP               = NULL;
+<a name="line63"> 63: </a>  svd->max_it           = 0;
+<a name="line64"> 64: </a>  svd->nsv              = 1;
+<a name="line65"> 65: </a>  svd->ncv              = 0;
+<a name="line66"> 66: </a>  svd->mpd              = 0;
+<a name="line67"> 67: </a>  svd->nini             = 0;
+<a name="line68"> 68: </a>  svd->ninil            = 0;
+<a name="line69"> 69: </a>  svd->tol              = PETSC_DEFAULT;
+<a name="line70"> 70: </a>  svd->conv             = SVD_CONV_REL;
+<a name="line71"> 71: </a>  svd->stop             = SVD_STOP_BASIC;
+<a name="line72"> 72: </a>  svd->which            = SVD_LARGEST;
+<a name="line73"> 73: </a>  svd->impltrans        = PETSC_FALSE;
+<a name="line74"> 74: </a>  svd->trackall         = PETSC_FALSE;
+
+<a name="line76"> 76: </a>  svd->converged        = SVDConvergedRelative;
+<a name="line77"> 77: </a>  svd->convergeddestroy = NULL;
+<a name="line78"> 78: </a>  svd->stopping         = <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>;
+<a name="line79"> 79: </a>  svd->stoppingdestroy  = NULL;
+<a name="line80"> 80: </a>  svd->convergedctx     = NULL;
+<a name="line81"> 81: </a>  svd->stoppingctx      = NULL;
+<a name="line82"> 82: </a>  svd->numbermonitors   = 0;
+
+<a name="line84"> 84: </a>  svd->ds               = NULL;
+<a name="line85"> 85: </a>  svd->U                = NULL;
+<a name="line86"> 86: </a>  svd->V                = NULL;
+<a name="line87"> 87: </a>  svd->A                = NULL;
+<a name="line88"> 88: </a>  svd->AT               = NULL;
+<a name="line89"> 89: </a>  svd->IS               = NULL;
+<a name="line90"> 90: </a>  svd->ISL              = NULL;
+<a name="line91"> 91: </a>  svd->sigma            = NULL;
+<a name="line92"> 92: </a>  svd->perm             = NULL;
+<a name="line93"> 93: </a>  svd->errest           = NULL;
+<a name="line94"> 94: </a>  svd->data             = NULL;
+
+<a name="line96"> 96: </a>  svd->state            = SVD_STATE_INITIAL;
+<a name="line97"> 97: </a>  svd->nconv            = 0;
+<a name="line98"> 98: </a>  svd->its              = 0;
+<a name="line99"> 99: </a>  svd->leftbasis        = PETSC_FALSE;
+<a name="line100">100: </a>  svd->reason           = SVD_CONVERGED_ITERATING;
+
+<a name="line102">102: </a>  PetscNewLog(svd,&svd->sc);
+<a name="line103">103: </a>  *outsvd = svd;
+<a name="line104">104: </a>  <font color="#4169E1">return</font>(0);
+<a name="line105">105: </a>}
+
+<a name="line109">109: </a><font color="#B22222">/*@</font>
+<a name="line110">110: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a> - Resets the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> context to the initial state and removes any</font>
+<a name="line111">111: </a><font color="#B22222">   allocated objects.</font>
+
+<a name="line113">113: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line115">115: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line116">116: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line118">118: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line120">120: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>()</font>
+<a name="line121">121: </a><font color="#B22222">@*/</font>
+<a name="line122">122: </a><strong><font color="#4169E1"><a name="SVDReset"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line123">123: </a>{
+<a name="line125">125: </a>  PetscInt       ncols;
+
+<a name="line129">129: </a>  <font color="#4169E1">if</font> (svd->ops->reset) { (svd->ops->reset)(svd); }
+<a name="line130">130: </a>  <font color="#4169E1">if</font> (svd->ds) { <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(svd->ds); }
+<a name="line131">131: </a>  MatDestroy(&svd->OP);
+<a name="line132">132: </a>  MatDestroy(&svd->A);
+<a name="line133">133: </a>  MatDestroy(&svd->AT);
+<a name="line134">134: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(svd->V,NULL,NULL,&ncols);
+<a name="line135">135: </a>  <font color="#4169E1">if</font> (ncols) {
+<a name="line136">136: </a>    PetscFree3(svd->sigma,svd->perm,svd->errest);
+<a name="line137">137: </a>  }
+<a name="line138">138: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->U);
+<a name="line139">139: </a>  <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->V);
+<a name="line140">140: </a>  svd->state = SVD_STATE_INITIAL;
+<a name="line141">141: </a>  <font color="#4169E1">return</font>(0);
+<a name="line142">142: </a>}
+
+<a name="line146">146: </a><font color="#B22222">/*@</font>
+<a name="line147">147: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a> - Destroys the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> context.</font>
+
+<a name="line149">149: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line151">151: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line152">152: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line154">154: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line156">156: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>(), <a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>()</font>
+<a name="line157">157: </a><font color="#B22222">@*/</font>
+<a name="line158">158: </a><strong><font color="#4169E1"><a name="SVDDestroy"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDDestroy.html#SVDDestroy">SVDDestroy</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> *svd)</font></strong>
+<a name="line159">159: </a>{
+
+<a name="line163">163: </a>  <font color="#4169E1">if</font> (!*svd) <font color="#4169E1">return</font>(0);
+<a name="line165">165: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*svd))->refct > 0) { *svd = 0; <font color="#4169E1">return</font>(0); }
+<a name="line166">166: </a>  <a href="../../../docs/manualpages/SVD/SVDReset.html#SVDReset">SVDReset</a>(*svd);
+<a name="line167">167: </a>  <font color="#4169E1">if</font> ((*svd)->ops->destroy) { (*(*svd)->ops->destroy)(*svd); }
+<a name="line168">168: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&(*svd)->ds);
+<a name="line169">169: </a>  PetscFree((*svd)->sc);
+<a name="line170">170: </a>  <font color="#B22222">/* just in case the initial vectors have not been used */</font>
+<a name="line171">171: </a>  SlepcBasisDestroy_Private(&(*svd)->nini,&(*svd)->IS);
+<a name="line172">172: </a>  SlepcBasisDestroy_Private(&(*svd)->ninil,&(*svd)->ISL);
+<a name="line173">173: </a>  <a href="../../../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>(*svd);
+<a name="line174">174: </a>  PetscHeaderDestroy(svd);
+<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
+<a name="line176">176: </a>}
+
+<a name="line180">180: </a><font color="#B22222">/*@C</font>
+<a name="line181">181: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a> - Selects the particular solver to be used in the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> object.</font>
+
+<a name="line183">183: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line185">185: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line186">186: </a><font color="#B22222">+  svd      - the singular value solver context</font>
+<a name="line187">187: </a><font color="#B22222">-  type     - a known method</font>
+
+<a name="line189">189: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line190">190: </a><font color="#B22222">.  -svd_type <method> - Sets the method; use -help for a list</font>
+<a name="line191">191: </a><font color="#B22222">    of available methods</font>
+
+<a name="line193">193: </a><font color="#B22222">   Notes:</font>
+<a name="line194">194: </a><font color="#B22222">   See "slepc/include/slepcsvd.h" for available methods. The default</font>
+<a name="line195">195: </a><font color="#B22222">   is SVDCROSS.</font>
+
+<a name="line197">197: </a><font color="#B22222">   Normally, it is best to use the <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>() command and</font>
+<a name="line198">198: </a><font color="#B22222">   then set the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> type from the options database rather than by using</font>
+<a name="line199">199: </a><font color="#B22222">   this routine.  Using the options database provides the user with</font>
+<a name="line200">200: </a><font color="#B22222">   maximum flexibility in evaluating the different available methods.</font>
+<a name="line201">201: </a><font color="#B22222">   The <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>() routine is provided for those situations where it</font>
+<a name="line202">202: </a><font color="#B22222">   is necessary to set the iterative solver independently of the command</font>
+<a name="line203">203: </a><font color="#B22222">   line or options database.</font>
+
+<a name="line205">205: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line207">207: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a></font>
+<a name="line208">208: </a><font color="#B22222">@*/</font>
+<a name="line209">209: </a><strong><font color="#4169E1"><a name="SVDSetType"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a> type)</font></strong>
+<a name="line210">210: </a>{
+<a name="line211">211: </a>  PetscErrorCode ierr,(*r)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>);
+<a name="line212">212: </a>  PetscBool      match;
+
+
+<a name="line218">218: </a>  PetscObjectTypeCompare((PetscObject)svd,type,&match);
+<a name="line219">219: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
+
+<a name="line221">221: </a>  PetscFunctionListFind(SVDList,type,&r);
+<a name="line222">222: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unknown <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> type given: %s"</font>,type);
+
+<a name="line224">224: </a>  <font color="#4169E1">if</font> (svd->ops->destroy) { (*svd->ops->destroy)(svd); }
+<a name="line225">225: </a>  PetscMemzero(svd->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _SVDOps</font>));
+
+<a name="line227">227: </a>  svd->state = SVD_STATE_INITIAL;
+<a name="line228">228: </a>  PetscObjectChangeTypeName((PetscObject)svd,type);
+<a name="line229">229: </a>  (*r)(svd);
+<a name="line230">230: </a>  <font color="#4169E1">return</font>(0);
+<a name="line231">231: </a>}
+
+<a name="line235">235: </a><font color="#B22222">/*@C</font>
+<a name="line236">236: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a> - Gets the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> type as a string from the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> object.</font>
+
+<a name="line238">238: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line240">240: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line241">241: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line243">243: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line244">244: </a><font color="#B22222">.  name - name of <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> method</font>
+
+<a name="line246">246: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line248">248: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>()</font>
+<a name="line249">249: </a><font color="#B22222">@*/</font>
+<a name="line250">250: </a><strong><font color="#4169E1"><a name="SVDGetType"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetType.html#SVDGetType">SVDGetType</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDType.html#SVDType">SVDType</a> *type)</font></strong>
+<a name="line251">251: </a>{
+<a name="line255">255: </a>  *type = ((PetscObject)svd)->type_name;
+<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
+<a name="line257">257: </a>}
+
+<a name="line261">261: </a><font color="#B22222">/*@C</font>
+<a name="line262">262: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a> - Adds a method to the singular value solver package.</font>
+
+<a name="line264">264: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line266">266: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line267">267: </a><font color="#B22222">+  name - name of a new user-defined solver</font>
+<a name="line268">268: </a><font color="#B22222">-  function - routine to create the solver context</font>
+
+<a name="line270">270: </a><font color="#B22222">   Notes:</font>
+<a name="line271">271: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>() may be called multiple times to add several user-defined solvers.</font>
+
+<a name="line273">273: </a><font color="#B22222">   Sample usage:</font>
+<a name="line274">274: </a><font color="#B22222">.vb</font>
+<a name="line275">275: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>("my_solver",MySolverCreate);</font>
+<a name="line276">276: </a><font color="#B22222">.ve</font>
+
+<a name="line278">278: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
+<a name="line279">279: </a><font color="#B22222">$     <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,"my_solver")</font>
+<a name="line280">280: </a><font color="#B22222">   or at runtime via the option</font>
+<a name="line281">281: </a><font color="#B22222">$     -svd_type my_solver</font>
+
+<a name="line283">283: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line285">285: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDRegisterAll.html#SVDRegisterAll">SVDRegisterAll</a>()</font>
+<a name="line286">286: </a><font color="#B22222">@*/</font>
+<a name="line287">287: </a><strong><font color="#4169E1"><a name="SVDRegister"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDRegister.html#SVDRegister">SVDRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>))</font></strong>
+<a name="line288">288: </a>{
+
+<a name="line292">292: </a>  PetscFunctionListAdd(&SVDList,name,function);
+<a name="line293">293: </a>  <font color="#4169E1">return</font>(0);
+<a name="line294">294: </a>}
+
+<a name="line298">298: </a><font color="#B22222">/*@</font>
+<a name="line299">299: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a> - Associates basis vectors objects to the singular value solver.</font>
+
+<a name="line301">301: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line303">303: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line304">304: </a><font color="#B22222">+  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line305">305: </a><font color="#B22222">.  V   - the basis vectors object for right singular vectors</font>
+<a name="line306">306: </a><font color="#B22222">-  U   - the basis vectors object for left singular vectors</font>
+
+<a name="line308">308: </a><font color="#B22222">   Note:</font>
+<a name="line309">309: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>() to retrieve the basis vectors contexts (for example,</font>
+<a name="line310">310: </a><font color="#B22222">   to free them at the end of the computations).</font>
+
+<a name="line312">312: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line314">314: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>()</font>
+<a name="line315">315: </a><font color="#B22222">@*/</font>
+<a name="line316">316: </a><strong><font color="#4169E1"><a name="SVDSetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> U)</font></strong>
+<a name="line317">317: </a>{
 
-<a name="line319">319: </a>  <font color="#4169E1">if</font> (V) {
-<a name="line322">322: </a>    PetscObjectReference((PetscObject)V);
-<a name="line323">323: </a>    <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->V);
-<a name="line324">324: </a>    svd->V = V;
-<a name="line325">325: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->V);
-<a name="line326">326: </a>  }
-<a name="line327">327: </a>  <font color="#4169E1">if</font> (U) {
-<a name="line330">330: </a>    PetscObjectReference((PetscObject)U);
-<a name="line331">331: </a>    <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->U);
-<a name="line332">332: </a>    svd->U = U;
-<a name="line333">333: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->U);
-<a name="line334">334: </a>  }
-<a name="line335">335: </a>  <font color="#4169E1">return</font>(0);
-<a name="line336">336: </a>}
-
-<a name="line340">340: </a><font color="#B22222">/*@</font>
-<a name="line341">341: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a> - Obtain the basis vectors objects associated to the singular</font>
-<a name="line342">342: </a><font color="#B22222">   value solver object.</font>
-
-<a name="line344">344: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line346">346: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line347">347: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-
-<a name="line349">349: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line350">350: </a><font color="#B22222">+  V - basis vectors context for right singular vectors</font>
-<a name="line351">351: </a><font color="#B22222">-  U - basis vectors context for left singular vectors</font>
-
-<a name="line353">353: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line355">355: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a>()</font>
-<a name="line356">356: </a><font color="#B22222">@*/</font>
-<a name="line357">357: </a><strong><font color="#4169E1"><a name="SVDGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *V,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *U)</font></strong>
-<a name="line358">358: </a>{
-
-<a name="line363">363: </a>  <font color="#4169E1">if</font> (V) {
-<a name="line364">364: </a>    <font color="#4169E1">if</font> (!svd->V) {
-<a name="line365">365: </a>      <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)svd),&svd->V);
-<a name="line366">366: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->V);
-<a name="line367">367: </a>    }
-<a name="line368">368: </a>    *V = svd->V;
-<a name="line369">369: </a>  }
-<a name="line370">370: </a>  <font color="#4169E1">if</font> (U) {
-<a name="line371">371: </a>    <font color="#4169E1">if</font> (!svd->U) {
-<a name="line372">372: </a>      <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)svd),&svd->U);
-<a name="line373">373: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->U);
-<a name="line374">374: </a>    }
-<a name="line375">375: </a>    *U = svd->U;
-<a name="line376">376: </a>  }
-<a name="line377">377: </a>  <font color="#4169E1">return</font>(0);
-<a name="line378">378: </a>}
-
-<a name="line382">382: </a><font color="#B22222">/*@</font>
-<a name="line383">383: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a> - Associates a direct solver object to the singular value solver.</font>
-
-<a name="line385">385: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line387">387: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line388">388: </a><font color="#B22222">+  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-<a name="line389">389: </a><font color="#B22222">-  ds  - the direct solver object</font>
-
-<a name="line391">391: </a><font color="#B22222">   Note:</font>
-<a name="line392">392: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>() to retrieve the direct solver context (for example,</font>
-<a name="line393">393: </a><font color="#B22222">   to free it at the end of the computations).</font>
-
-<a name="line395">395: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line397">397: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>()</font>
-<a name="line398">398: </a><font color="#B22222">@*/</font>
-<a name="line399">399: </a><strong><font color="#4169E1"><a name="SVDSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line400">400: </a>{
-
-<a name="line407">407: </a>  PetscObjectReference((PetscObject)ds);
-<a name="line408">408: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&svd->ds);
-<a name="line409">409: </a>  svd->ds = ds;
-<a name="line410">410: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->ds);
-<a name="line411">411: </a>  <font color="#4169E1">return</font>(0);
-<a name="line412">412: </a>}
-
-<a name="line416">416: </a><font color="#B22222">/*@</font>
-<a name="line417">417: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a> - Obtain the direct solver object associated to the singular value</font>
-<a name="line418">418: </a><font color="#B22222">   solver object.</font>
-
-<a name="line420">420: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line422">422: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line423">423: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-
-<a name="line425">425: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line426">426: </a><font color="#B22222">.  ds - direct solver context</font>
-
-<a name="line428">428: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line430">430: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a>()</font>
-<a name="line431">431: </a><font color="#B22222">@*/</font>
-<a name="line432">432: </a><strong><font color="#4169E1"><a name="SVDGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
-<a name="line433">433: </a>{
-
-<a name="line439">439: </a>  <font color="#4169E1">if</font> (!svd->ds) {
-<a name="line440">440: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)svd),&svd->ds);
-<a name="line441">441: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->ds);
-<a name="line442">442: </a>  }
-<a name="line443">443: </a>  *ds = svd->ds;
-<a name="line444">444: </a>  <font color="#4169E1">return</font>(0);
-<a name="line445">445: </a>}
+<a name="line322">322: </a>  <font color="#4169E1">if</font> (V) {
+<a name="line325">325: </a>    PetscObjectReference((PetscObject)V);
+<a name="line326">326: </a>    <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->V);
+<a name="line327">327: </a>    svd->V = V;
+<a name="line328">328: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->V);
+<a name="line329">329: </a>  }
+<a name="line330">330: </a>  <font color="#4169E1">if</font> (U) {
+<a name="line333">333: </a>    PetscObjectReference((PetscObject)U);
+<a name="line334">334: </a>    <a href="../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&svd->U);
+<a name="line335">335: </a>    svd->U = U;
+<a name="line336">336: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->U);
+<a name="line337">337: </a>  }
+<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
+<a name="line339">339: </a>}
+
+<a name="line343">343: </a><font color="#B22222">/*@</font>
+<a name="line344">344: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a> - Obtain the basis vectors objects associated to the singular</font>
+<a name="line345">345: </a><font color="#B22222">   value solver object.</font>
+
+<a name="line347">347: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line349">349: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line350">350: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line352">352: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line353">353: </a><font color="#B22222">+  V - basis vectors context for right singular vectors</font>
+<a name="line354">354: </a><font color="#B22222">-  U - basis vectors context for left singular vectors</font>
+
+<a name="line356">356: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line358">358: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetBV.html#SVDSetBV">SVDSetBV</a>()</font>
+<a name="line359">359: </a><font color="#B22222">@*/</font>
+<a name="line360">360: </a><strong><font color="#4169E1"><a name="SVDGetBV"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *V,<a href="../../../docs/manualpages/BV/BV.html#BV">BV</a> *U)</font></strong>
+<a name="line361">361: </a>{
+
+<a name="line366">366: </a>  <font color="#4169E1">if</font> (V) {
+<a name="line367">367: </a>    <font color="#4169E1">if</font> (!svd->V) {
+<a name="line368">368: </a>      <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)svd),&svd->V);
+<a name="line369">369: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->V);
+<a name="line370">370: </a>    }
+<a name="line371">371: </a>    *V = svd->V;
+<a name="line372">372: </a>  }
+<a name="line373">373: </a>  <font color="#4169E1">if</font> (U) {
+<a name="line374">374: </a>    <font color="#4169E1">if</font> (!svd->U) {
+<a name="line375">375: </a>      <a href="../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)svd),&svd->U);
+<a name="line376">376: </a>      PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->U);
+<a name="line377">377: </a>    }
+<a name="line378">378: </a>    *U = svd->U;
+<a name="line379">379: </a>  }
+<a name="line380">380: </a>  <font color="#4169E1">return</font>(0);
+<a name="line381">381: </a>}
+
+<a name="line385">385: </a><font color="#B22222">/*@</font>
+<a name="line386">386: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a> - Associates a direct solver object to the singular value solver.</font>
+
+<a name="line388">388: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line390">390: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line391">391: </a><font color="#B22222">+  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line392">392: </a><font color="#B22222">-  ds  - the direct solver object</font>
+
+<a name="line394">394: </a><font color="#B22222">   Note:</font>
+<a name="line395">395: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>() to retrieve the direct solver context (for example,</font>
+<a name="line396">396: </a><font color="#B22222">   to free it at the end of the computations).</font>
+
+<a name="line398">398: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line400">400: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>()</font>
+<a name="line401">401: </a><font color="#B22222">@*/</font>
+<a name="line402">402: </a><strong><font color="#4169E1"><a name="SVDSetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line403">403: </a>{
+
+<a name="line410">410: </a>  PetscObjectReference((PetscObject)ds);
+<a name="line411">411: </a>  <a href="../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&svd->ds);
+<a name="line412">412: </a>  svd->ds = ds;
+<a name="line413">413: </a>  PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->ds);
+<a name="line414">414: </a>  <font color="#4169E1">return</font>(0);
+<a name="line415">415: </a>}
+
+<a name="line419">419: </a><font color="#B22222">/*@</font>
+<a name="line420">420: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a> - Obtain the direct solver object associated to the singular value</font>
+<a name="line421">421: </a><font color="#B22222">   solver object.</font>
+
+<a name="line423">423: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line425">425: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line426">426: </a><font color="#B22222">.  svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line428">428: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line429">429: </a><font color="#B22222">.  ds - direct solver context</font>
+
+<a name="line431">431: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line433">433: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetDS.html#SVDSetDS">SVDSetDS</a>()</font>
+<a name="line434">434: </a><font color="#B22222">@*/</font>
+<a name="line435">435: </a><strong><font color="#4169E1"><a name="SVDGetDS"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
+<a name="line436">436: </a>{
+
+<a name="line442">442: </a>  <font color="#4169E1">if</font> (!svd->ds) {
+<a name="line443">443: </a>    <a href="../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PetscObjectComm((PetscObject)svd),&svd->ds);
+<a name="line444">444: </a>    PetscLogObjectParent((PetscObject)svd,(PetscObject)svd->ds);
+<a name="line445">445: </a>  }
+<a name="line446">446: </a>  *ds = svd->ds;
+<a name="line447">447: </a>  <font color="#4169E1">return</font>(0);
+<a name="line448">448: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/interface/svddefault.c b/src/svd/interface/svddefault.c
new file mode 100644
index 0000000..fdc814b
--- /dev/null
+++ b/src/svd/interface/svddefault.c
@@ -0,0 +1,99 @@
+/*
+     This file contains some simple default routines for common operations.
+
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+#include <slepc/private/svdimpl.h>      /*I "slepcsvd.h" I*/
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDConvergedRelative"
+/*
+  SVDConvergedRelative - Checks convergence relative to the eigenvalue.
+*/
+PetscErrorCode SVDConvergedRelative(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)
+{
+  PetscFunctionBegin;
+  *errest = res/sigma;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDConvergedAbsolute"
+/*
+  SVDConvergedAbsolute - Checks convergence absolutely.
+*/
+PetscErrorCode SVDConvergedAbsolute(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)
+{
+  PetscFunctionBegin;
+  *errest = res;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDStoppingBasic"
+/*@C
+   SVDStoppingBasic - Default routine to determine whether the outer singular value
+   solver iteration must be stopped.
+
+   Collective on SVD
+
+   Input Parameters:
++  svd    - singular value solver context obtained from SVDCreate()
+.  its    - current number of iterations
+.  max_it - maximum number of iterations
+.  nconv  - number of currently converged singular triplets
+.  nsv    - number of requested singular triplets
+-  ctx    - context (not used here)
+
+   Output Parameter:
+.  reason - result of the stopping test
+
+   Notes:
+   A positive value of reason indicates that the iteration has finished successfully
+   (converged), and a negative value indicates an error condition (diverged). If
+   the iteration needs to be continued, reason must be set to SVD_CONVERGED_ITERATING
+   (zero).
+
+   SVDStoppingBasic() will stop if all requested singular values are converged, or if
+   the maximum number of iterations has been reached.
+
+   Use SVDSetStoppingTest() to provide your own test instead of using this one.
+
+   Level: advanced
+
+.seealso: SVDSetStoppingTest(), SVDConvergedReason, SVDGetConvergedReason()
+@*/
+PetscErrorCode SVDStoppingBasic(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  *reason = SVD_CONVERGED_ITERATING;
+  if (nconv >= nsv) {
+    ierr = PetscInfo2(svd,"Singular value solver finished successfully: %D singular triplets converged at iteration %D\n",nconv,its);CHKERRQ(ierr);
+    *reason = SVD_CONVERGED_TOL;
+  } else if (its >= max_it) {
+    *reason = SVD_DIVERGED_ITS;
+    ierr = PetscInfo1(svd,"Singular value solver iteration reached maximum number of iterations (%D)\n",its);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/svd/interface/svddefault.c.html b/src/svd/interface/svddefault.c.html
new file mode 100644
index 0000000..c8a758b
--- /dev/null
+++ b/src/svd/interface/svddefault.c.html
@@ -0,0 +1,105 @@
+<center><a href="svddefault.c">Actual source code: svddefault.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svddefault.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:33:33+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svddefault.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">     This file contains some simple default routines for common operations.</font>
+
+<a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line10"> 10: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line11"> 11: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line12"> 12: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line14"> 14: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line15"> 15: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line16"> 16: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line17"> 17: </a><font color="#B22222">   more details.</font>
+
+<a name="line19"> 19: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line20"> 20: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line21"> 21: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line22"> 22: </a><font color="#B22222">*/</font>
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/svdimpl.h>      </font><font color="#B22222">/*I "slepcsvd.h" I*/</font><font color="#A020F0"></font>
+
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">  SVDConvergedRelative - Checks convergence relative to the eigenvalue.</font>
+<a name="line30"> 30: </a><font color="#B22222">*/</font>
+<a name="line31"> 31: </a><strong><font color="#4169E1"><a name="SVDConvergedRelative"></a>PetscErrorCode SVDConvergedRelative(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line32"> 32: </a>{
+<a name="line34"> 34: </a>  *errest = res/sigma;
+<a name="line35"> 35: </a>  <font color="#4169E1">return</font>(0);
+<a name="line36"> 36: </a>}
+
+<a name="line40"> 40: </a><font color="#B22222">/*</font>
+<a name="line41"> 41: </a><font color="#B22222">  SVDConvergedAbsolute - Checks convergence absolutely.</font>
+<a name="line42"> 42: </a><font color="#B22222">*/</font>
+<a name="line43"> 43: </a><strong><font color="#4169E1"><a name="SVDConvergedAbsolute"></a>PetscErrorCode SVDConvergedAbsolute(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)</font></strong>
+<a name="line44"> 44: </a>{
+<a name="line46"> 46: </a>  *errest = res;
+<a name="line47"> 47: </a>  <font color="#4169E1">return</font>(0);
+<a name="line48"> 48: </a>}
+
+<a name="line52"> 52: </a><font color="#B22222">/*@C</font>
+<a name="line53"> 53: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a> - Default routine to determine whether the outer singular value</font>
+<a name="line54"> 54: </a><font color="#B22222">   solver iteration must be stopped.</font>
+
+<a name="line56"> 56: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line58"> 58: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line59"> 59: </a><font color="#B22222">+  svd    - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line60"> 60: </a><font color="#B22222">.  its    - current number of iterations</font>
+<a name="line61"> 61: </a><font color="#B22222">.  max_it - maximum number of iterations</font>
+<a name="line62"> 62: </a><font color="#B22222">.  nconv  - number of currently converged singular triplets</font>
+<a name="line63"> 63: </a><font color="#B22222">.  nsv    - number of requested singular triplets</font>
+<a name="line64"> 64: </a><font color="#B22222">-  ctx    - context (not used here)</font>
+
+<a name="line66"> 66: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line67"> 67: </a><font color="#B22222">.  reason - result of the stopping test</font>
+
+<a name="line69"> 69: </a><font color="#B22222">   Notes:</font>
+<a name="line70"> 70: </a><font color="#B22222">   A positive value of reason indicates that the iteration has finished successfully</font>
+<a name="line71"> 71: </a><font color="#B22222">   (converged), and a negative value indicates an error condition (diverged). If</font>
+<a name="line72"> 72: </a><font color="#B22222">   the iteration needs to be continued, reason must be set to SVD_CONVERGED_ITERATING</font>
+<a name="line73"> 73: </a><font color="#B22222">   (zero).</font>
+
+<a name="line75"> 75: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>() will stop if all requested singular values are converged, or if</font>
+<a name="line76"> 76: </a><font color="#B22222">   the maximum number of iterations has been reached.</font>
+
+<a name="line78"> 78: </a><font color="#B22222">   Use <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>() to provide your own test instead of using this one.</font>
+
+<a name="line80"> 80: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line82"> 82: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(), <a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a>, <a href="../../../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>()</font>
+<a name="line83"> 83: </a><font color="#B22222">@*/</font>
+<a name="line84"> 84: </a><strong><font color="#4169E1"><a name="SVDStoppingBasic"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> *reason,void *ctx)</font></strong>
+<a name="line85"> 85: </a>{
+
+<a name="line89"> 89: </a>  *reason = SVD_CONVERGED_ITERATING;
+<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (nconv >= nsv) {
+<a name="line91"> 91: </a>    PetscInfo2(svd,<font color="#666666">"Singular value solver finished successfully: %D singular triplets converged at iteration %D\n"</font>,nconv,its);
+<a name="line92"> 92: </a>    *reason = SVD_CONVERGED_TOL;
+<a name="line93"> 93: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (its >= max_it) {
+<a name="line94"> 94: </a>    *reason = SVD_DIVERGED_ITS;
+<a name="line95"> 95: </a>    PetscInfo1(svd,<font color="#666666">"Singular value solver iteration reached maximum number of iterations (%D)\n"</font>,its);
+<a name="line96"> 96: </a>  }
+<a name="line97"> 97: </a>  <font color="#4169E1">return</font>(0);
+<a name="line98"> 98: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/svd/interface/svdmon.c b/src/svd/interface/svdmon.c
index 78d15a5..64f1817 100644
--- a/src/svd/interface/svdmon.c
+++ b/src/svd/interface/svdmon.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -175,28 +175,37 @@ PetscErrorCode SVDGetMonitorContext(SVD svd,void **ctx)
 .  sigma  - singular values
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: SVDMonitorSet(), SVDMonitorFirst(), SVDMonitorConverged()
 @*/
-PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
   PetscInt       i;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its) {
-    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
-    ierr = PetscViewerASCIIPrintf(viewer,"%3D SVD nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
-    for (i=0;i<nest;i++) {
-      ierr = PetscViewerASCIIPrintf(viewer," %g (%10.8e)",(double)sigma[i],(double)errest[i]);CHKERRQ(ierr);
-    }
-    ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
-    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidPointer(vf,7);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,7);
+  ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
+  if (its==1 && ((PetscObject)svd)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Singular value approximations and residual norms for %s solve.\n",((PetscObject)svd)->prefix);CHKERRQ(ierr);
   }
+  ierr = PetscViewerASCIIPrintf(viewer,"%3D SVD nconv=%D Values (Errors)",its,nconv);CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+  for (i=0;i<nest;i++) {
+    ierr = PetscViewerASCIIPrintf(viewer," %g (%10.8e)",(double)sigma[i],(double)errest[i]);CHKERRQ(ierr);
+  }
+  ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+  ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
+  ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -215,23 +224,34 @@ PetscErrorCode SVDMonitorAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigm
 .  sigma  - singular values
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context (contains viewer, can be NULL)
+-  vf     - viewer and format for monitoring
 
    Level: intermediate
 
 .seealso: SVDMonitorSet(), SVDMonitorAll(), SVDMonitorConverged()
 @*/
-PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)
 {
   PetscErrorCode ierr;
-  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (its && nconv<nest) {
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidPointer(vf,7);
+  viewer = vf->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,7);
+  if (its==1 && ((PetscObject)svd)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Singular value approximations and residual norms for %s solve.\n",((PetscObject)svd)->prefix);CHKERRQ(ierr);
+  }
+  if (nconv<nest) {
+    ierr = PetscViewerPushFormat(viewer,vf->format);CHKERRQ(ierr);
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"%3D SVD nconv=%D first unconverged value (error)",its,nconv);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer," %g (%10.8e)\n",(double)sigma[nconv],(double)errest[nconv]);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -250,117 +270,131 @@ PetscErrorCode SVDMonitorFirst(SVD svd,PetscInt its,PetscInt nconv,PetscReal *si
 .  sigma  - singular values
 .  errest - error estimates
 .  nest   - number of error estimates to display
--  monctx - monitor context
-
-   Note:
-   The monitor context must contain a struct with a PetscViewer and a
-   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.
+-  ctx    - monitor context
 
    Level: intermediate
 
 .seealso: SVDMonitorSet(), SVDMonitorFirst(), SVDMonitorAll()
 @*/
-PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorConverged(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)
 {
-  PetscErrorCode   ierr;
-  PetscInt         i;
-  PetscViewer      viewer;
-  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
+  PetscErrorCode ierr;
+  PetscInt       i;
+  PetscViewer    viewer;
 
   PetscFunctionBegin;
-  if (!monctx) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_WRONG,"Must provide a context for SVDMonitorConverged");
-  if (!its) {
-    ctx->oldnconv = 0;
-  } else {
-    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidPointer(ctx,7);
+  viewer = ctx->viewer;
+  PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,7);
+  if (its==1 && ((PetscObject)svd)->prefix) {
+    ierr = PetscViewerASCIIPrintf(viewer,"  Convergence history for %s solve.\n",((PetscObject)svd)->prefix);CHKERRQ(ierr);
+  }
+  if (its==1) ctx->oldnconv = 0;
+  if (ctx->oldnconv!=nconv) {
+    ierr = PetscViewerPushFormat(viewer,ctx->format);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
     for (i=ctx->oldnconv;i<nconv;i++) {
-      ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%3D SVD converged value (error) #%D",its,i);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer," %g (%10.8e)\n",(double)sigma[i],(double)errest[i]);CHKERRQ(ierr);
-      ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     }
+    ierr = PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
+    ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr);
     ctx->oldnconv = nconv;
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "SVDMonitorLGCreate"
+/*@C
+   SVDMonitorLGCreate - Creates a line graph context for use with
+   SVD to monitor convergence.
+
+   Collective on MPI_Comm
+
+   Input Parameters:
++  comm - communicator context
+.  host - the X display to open, or null for the local machine
+.  label - the title to put in the title bar
+.  x, y - the screen coordinates of the upper left coordinate of
+          the window
+-  m, n - the screen width and height in pixels
+
+   Output Parameter:
+.  lgctx - the drawing context
+
+   Options Database Keys:
++  -svd_monitor_lg - Sets line graph monitor for the first residual
+-  -svd_monitor_lg_all - Sets line graph monitor for all residuals
+
+   Notes:
+   Use PetscDrawLGDestroy() to destroy this line graph.
+
+   Level: intermediate
+
+.seealso: SVDMonitorSet()
+@*/
+PetscErrorCode SVDMonitorLGCreate(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)
+{
+  PetscDraw      draw;
+  PetscDrawLG    lg;
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscDrawCreate(comm,host,label,x,y,m,n,&draw);CHKERRQ(ierr);
+  ierr = PetscDrawSetFromOptions(draw);CHKERRQ(ierr);
+  ierr = PetscDrawLGCreate(draw,1,&lg);CHKERRQ(ierr);
+  ierr = PetscDrawLGSetFromOptions(lg);CHKERRQ(ierr);
+  ierr = PetscDrawDestroy(&draw);CHKERRQ(ierr);
+  *lgctx = lg;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "SVDMonitorLG"
-PetscErrorCode SVDMonitorLG(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorLG(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
-  PetscDraw      draw,draw1;
-  PetscDrawLG    lg,lg1;
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
+  PetscReal      x,y;
   PetscErrorCode ierr;
-  PetscReal      x,y,p;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)svd));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDraw(viewer,1,&draw1);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,1,&lg1);CHKERRQ(ierr);
-
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(svd->tol)-2,0.0);CHKERRQ(ierr);
-
-    ierr = PetscDrawSetTitle(draw1,"Approximate singular values");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw1);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg1,1);CHKERRQ(ierr);
-    ierr = PetscDrawLGReset(lg1);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,1);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(svd->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   x = (PetscReal)its;
-  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]); else y = 0.0;
+  if (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+  else y = 0.0;
   ierr = PetscDrawLGAddPoint(lg,&x,&y);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGAddPoint(lg1,&x,svd->sigma);CHKERRQ(ierr);
-  ierr = PetscDrawGetPause(draw1,&p);CHKERRQ(ierr);
-  ierr = PetscDrawSetPause(draw1,0);CHKERRQ(ierr);
-  ierr = PetscDrawLGDraw(lg1);CHKERRQ(ierr);
-  ierr = PetscDrawSetPause(draw1,p);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || svd->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "SVDMonitorLGAll"
-PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)
+PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)
 {
-  PetscViewer    viewer = (PetscViewer)monctx;
-  PetscDraw      draw,draw1;
-  PetscDrawLG    lg,lg1;
-  PetscErrorCode ierr;
-  PetscReal      *x,*y,p;
+  PetscDrawLG    lg = (PetscDrawLG)ctx;
   PetscInt       i,n = PetscMin(svd->nsv,255);
+  PetscReal      *x,*y;
+  PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)svd));
-  ierr = PetscViewerDrawGetDraw(viewer,0,&draw);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,0,&lg);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDraw(viewer,1,&draw1);CHKERRQ(ierr);
-  ierr = PetscViewerDrawGetDrawLG(viewer,1,&lg1);CHKERRQ(ierr);
-
-  if (!its) {
-    ierr = PetscDrawSetTitle(draw,"Error estimates");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+  PetscValidHeaderSpecific(lg,PETSC_DRAWLG_CLASSID,8);
+  if (its==1) {
     ierr = PetscDrawLGReset(lg);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(svd->tol)-2,0.0);CHKERRQ(ierr);
-
-    ierr = PetscDrawSetTitle(draw1,"Approximate singular values");CHKERRQ(ierr);
-    ierr = PetscDrawSetDoubleBuffer(draw1);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetDimension(lg1,n);CHKERRQ(ierr);
-    ierr = PetscDrawLGReset(lg1);CHKERRQ(ierr);
-    ierr = PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetDimension(lg,n);CHKERRQ(ierr);
+    ierr = PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(svd->tol)-2,0.0);CHKERRQ(ierr);
   }
-
   ierr = PetscMalloc2(n,&x,n,&y);CHKERRQ(ierr);
   for (i=0;i<n;i++) {
     x[i] = (PetscReal)its;
@@ -368,14 +402,11 @@ PetscErrorCode SVDMonitorLGAll(SVD svd,PetscInt its,PetscInt nconv,PetscReal *si
     else y[i] = 0.0;
   }
   ierr = PetscDrawLGAddPoint(lg,x,y);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGAddPoint(lg1,x,svd->sigma);CHKERRQ(ierr);
-  ierr = PetscDrawGetPause(draw1,&p);CHKERRQ(ierr);
-  ierr = PetscDrawSetPause(draw1,0);CHKERRQ(ierr);
-  ierr = PetscDrawLGDraw(lg1);CHKERRQ(ierr);
-  ierr = PetscDrawSetPause(draw1,p);CHKERRQ(ierr);
-
-  ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+  if (its <= 20 || !(its % 5) || svd->reason) {
+    ierr = PetscDrawLGDraw(lg);CHKERRQ(ierr);
+    ierr = PetscDrawLGSave(lg);CHKERRQ(ierr);
+  }
   ierr = PetscFree2(x,y);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
+
diff --git a/src/svd/interface/svdmon.c.html b/src/svd/interface/svdmon.c.html
index 3ca3261..fd002d0 100644
--- a/src/svd/interface/svdmon.c.html
+++ b/src/svd/interface/svdmon.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdmon.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:39+00:00">
+<meta name="date" content="2016-05-16T10:33:37+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdmon.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdmon.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> routines related to monitors.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -168,193 +168,208 @@
 <a name="line175">175: </a><font color="#B22222">.  sigma  - singular values</font>
 <a name="line176">176: </a><font color="#B22222">.  errest - error estimates</font>
 <a name="line177">177: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line178">178: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
+<a name="line178">178: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
 
 <a name="line180">180: </a><font color="#B22222">   Level: intermediate</font>
 
 <a name="line182">182: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>()</font>
 <a name="line183">183: </a><font color="#B22222">@*/</font>
-<a name="line184">184: </a><strong><font color="#4169E1"><a name="SVDMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
+<a name="line184">184: </a><strong><font color="#4169E1"><a name="SVDMonitorAll"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
 <a name="line185">185: </a>{
 <a name="line187">187: </a>  PetscInt       i;
-<a name="line188">188: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
-
-<a name="line191">191: </a>  <font color="#4169E1">if</font> (its) {
-<a name="line192">192: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line193">193: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> nconv=%D Values (Errors)"</font>,its,nconv);
-<a name="line194">194: </a>    <font color="#4169E1">for</font> (i=0;i<nest;i++) {
-<a name="line195">195: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g (%10.8e)"</font>,(double)sigma[i],(double)errest[i]);
-<a name="line196">196: </a>    }
-<a name="line197">197: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line198">198: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line188">188: </a>  PetscViewer    viewer;
+
+<a name="line193">193: </a>  viewer = vf->viewer;
+<a name="line195">195: </a>  PetscViewerPushFormat(viewer,vf->format);
+<a name="line196">196: </a>  PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line197">197: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)svd)->prefix) {
+<a name="line198">198: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Singular value approximations and residual norms for %s solve.\n"</font>,((PetscObject)svd)->prefix);
 <a name="line199">199: </a>  }
-<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
-<a name="line201">201: </a>}
-
-<a name="line205">205: </a><font color="#B22222">/*@C</font>
-<a name="line206">206: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a> - Print the first unconverged approximate values and</font>
-<a name="line207">207: </a><font color="#B22222">   error estimates at each iteration of the singular value solver.</font>
-
-<a name="line209">209: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line211">211: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line212">212: </a><font color="#B22222">+  svd    - singular value solver context</font>
-<a name="line213">213: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line214">214: </a><font color="#B22222">.  nconv  - number of converged singular triplets so far</font>
-<a name="line215">215: </a><font color="#B22222">.  sigma  - singular values</font>
-<a name="line216">216: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line217">217: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line218">218: </a><font color="#B22222">-  monctx - monitor context (contains viewer, can be NULL)</font>
-
-<a name="line220">220: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line222">222: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>()</font>
-<a name="line223">223: </a><font color="#B22222">@*/</font>
-<a name="line224">224: </a><strong><font color="#4169E1"><a name="SVDMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line225">225: </a>{
-<a name="line227">227: </a>  PetscViewer    viewer = monctx? (PetscViewer)monctx: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
-
-<a name="line230">230: </a>  <font color="#4169E1">if</font> (its && nconv<nest) {
-<a name="line231">231: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line232">232: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
-<a name="line233">233: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g (%10.8e)\n"</font>,(double)sigma[nconv],(double)errest[nconv]);
-<a name="line234">234: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line235">235: </a>  }
-<a name="line236">236: </a>  <font color="#4169E1">return</font>(0);
-<a name="line237">237: </a>}
-
-<a name="line241">241: </a><font color="#B22222">/*@C</font>
-<a name="line242">242: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a> - Print the approximate values and error estimates as they converge.</font>
-
-<a name="line244">244: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line246">246: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line247">247: </a><font color="#B22222">+  svd    - singular value solver context</font>
-<a name="line248">248: </a><font color="#B22222">.  its    - iteration number</font>
-<a name="line249">249: </a><font color="#B22222">.  nconv  - number of converged singular triplets so far</font>
-<a name="line250">250: </a><font color="#B22222">.  sigma  - singular values</font>
-<a name="line251">251: </a><font color="#B22222">.  errest - error estimates</font>
-<a name="line252">252: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
-<a name="line253">253: </a><font color="#B22222">-  monctx - monitor context</font>
-
-<a name="line255">255: </a><font color="#B22222">   Note:</font>
-<a name="line256">256: </a><font color="#B22222">   The monitor context must contain a struct with a PetscViewer and a</font>
-<a name="line257">257: </a><font color="#B22222">   PetscInt. In Fortran, pass a PETSC_NULL_OBJECT.</font>
-
-<a name="line259">259: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line261">261: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>()</font>
-<a name="line262">262: </a><font color="#B22222">@*/</font>
-<a name="line263">263: </a><strong><font color="#4169E1"><a name="SVDMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line264">264: </a>{
-<a name="line265">265: </a>  PetscErrorCode   ierr;
-<a name="line266">266: </a>  PetscInt         i;
-<a name="line267">267: </a>  PetscViewer      viewer;
-<a name="line268">268: </a>  SlepcConvMonitor ctx = (SlepcConvMonitor)monctx;
-
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (!monctx) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_WRONG,<font color="#666666">"Must provide a context for <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>"</font>);
-<a name="line272">272: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line273">273: </a>    ctx->oldnconv = 0;
-<a name="line274">274: </a>  } <font color="#4169E1">else</font> {
-<a name="line275">275: </a>    viewer = ctx->viewer? ctx->viewer: PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
-<a name="line276">276: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
-<a name="line277">277: </a>      PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line278">278: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> converged value (error) #%D"</font>,its,i);
-<a name="line279">279: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g (%10.8e)\n"</font>,(double)sigma[i],(double)errest[i]);
-<a name="line280">280: </a>      PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line281">281: </a>    }
-<a name="line282">282: </a>    ctx->oldnconv = nconv;
-<a name="line283">283: </a>  }
-<a name="line284">284: </a>  <font color="#4169E1">return</font>(0);
-<a name="line285">285: </a>}
-
-<a name="line289">289: </a><strong><font color="#4169E1"><a name="SVDMonitorLG"></a>PetscErrorCode SVDMonitorLG(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line290">290: </a>{
-<a name="line291">291: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line292">292: </a>  PetscDraw      draw,draw1;
-<a name="line293">293: </a>  PetscDrawLG    lg,lg1;
-<a name="line295">295: </a>  PetscReal      x,y,p;
-
-<a name="line298">298: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)svd));
-<a name="line299">299: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line300">300: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line301">301: </a>  PetscViewerDrawGetDraw(viewer,1,&draw1);
-<a name="line302">302: </a>  PetscViewerDrawGetDrawLG(viewer,1,&lg1);
-
-<a name="line304">304: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line305">305: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line306">306: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line307">307: </a>    PetscDrawLGSetDimension(lg,1);
-<a name="line308">308: </a>    PetscDrawLGReset(lg);
-<a name="line309">309: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(svd->tol)-2,0.0);
-
-<a name="line311">311: </a>    PetscDrawSetTitle(draw1,<font color="#666666">"Approximate singular values"</font>);
-<a name="line312">312: </a>    PetscDrawSetDoubleBuffer(draw1);
-<a name="line313">313: </a>    PetscDrawLGSetDimension(lg1,1);
-<a name="line314">314: </a>    PetscDrawLGReset(lg1);
-<a name="line315">315: </a>    PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);
-<a name="line316">316: </a>  }
-
-<a name="line318">318: </a>  x = (PetscReal)its;
-<a name="line319">319: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]); <font color="#4169E1">else</font> y = 0.0;
-<a name="line320">320: </a>  PetscDrawLGAddPoint(lg,&x,&y);
-
-<a name="line322">322: </a>  PetscDrawLGAddPoint(lg1,&x,svd->sigma);
-<a name="line323">323: </a>  PetscDrawGetPause(draw1,&p);
-<a name="line324">324: </a>  PetscDrawSetPause(draw1,0);
-<a name="line325">325: </a>  PetscDrawLGDraw(lg1);
-<a name="line326">326: </a>  PetscDrawSetPause(draw1,p);
-
-<a name="line328">328: </a>  PetscDrawLGDraw(lg);
-<a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
-<a name="line330">330: </a>}
-
-<a name="line334">334: </a><strong><font color="#4169E1"><a name="SVDMonitorLGAll"></a>PetscErrorCode SVDMonitorLGAll(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *monctx)</font></strong>
-<a name="line335">335: </a>{
-<a name="line336">336: </a>  PetscViewer    viewer = (PetscViewer)monctx;
-<a name="line337">337: </a>  PetscDraw      draw,draw1;
-<a name="line338">338: </a>  PetscDrawLG    lg,lg1;
-<a name="line340">340: </a>  PetscReal      *x,*y,p;
-<a name="line341">341: </a>  PetscInt       i,n = PetscMin(svd->nsv,255);
-
-<a name="line344">344: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_DRAW_(PetscObjectComm((PetscObject)svd));
-<a name="line345">345: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line346">346: </a>  PetscViewerDrawGetDrawLG(viewer,0,&lg);
-<a name="line347">347: </a>  PetscViewerDrawGetDraw(viewer,1,&draw1);
-<a name="line348">348: </a>  PetscViewerDrawGetDrawLG(viewer,1,&lg1);
-
-<a name="line350">350: </a>  <font color="#4169E1">if</font> (!its) {
-<a name="line351">351: </a>    PetscDrawSetTitle(draw,<font color="#666666">"Error estimates"</font>);
-<a name="line352">352: </a>    PetscDrawSetDoubleBuffer(draw);
-<a name="line353">353: </a>    PetscDrawLGSetDimension(lg,n);
-<a name="line354">354: </a>    PetscDrawLGReset(lg);
-<a name="line355">355: </a>    PetscDrawLGSetLimits(lg,0,1.0,PetscLog10Real(svd->tol)-2,0.0);
-
-<a name="line357">357: </a>    PetscDrawSetTitle(draw1,<font color="#666666">"Approximate singular values"</font>);
-<a name="line358">358: </a>    PetscDrawSetDoubleBuffer(draw1);
-<a name="line359">359: </a>    PetscDrawLGSetDimension(lg1,n);
-<a name="line360">360: </a>    PetscDrawLGReset(lg1);
-<a name="line361">361: </a>    PetscDrawLGSetLimits(lg1,0,1.0,1.e20,-1.e20);
-<a name="line362">362: </a>  }
-
-<a name="line364">364: </a>  PetscMalloc2(n,&x,n,&y);
-<a name="line365">365: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line366">366: </a>    x[i] = (PetscReal)its;
-<a name="line367">367: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
-<a name="line368">368: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
-<a name="line369">369: </a>  }
-<a name="line370">370: </a>  PetscDrawLGAddPoint(lg,x,y);
-
-<a name="line372">372: </a>  PetscDrawLGAddPoint(lg1,x,svd->sigma);
-<a name="line373">373: </a>  PetscDrawGetPause(draw1,&p);
-<a name="line374">374: </a>  PetscDrawSetPause(draw1,0);
-<a name="line375">375: </a>  PetscDrawLGDraw(lg1);
-<a name="line376">376: </a>  PetscDrawSetPause(draw1,p);
-
-<a name="line378">378: </a>  PetscDrawLGDraw(lg);
-<a name="line379">379: </a>  PetscFree2(x,y);
-<a name="line380">380: </a>  <font color="#4169E1">return</font>(0);
-<a name="line381">381: </a>}
+<a name="line200">200: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> nconv=%D Values (Errors)"</font>,its,nconv);
+<a name="line201">201: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line202">202: </a>  <font color="#4169E1">for</font> (i=0;i<nest;i++) {
+<a name="line203">203: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g (%10.8e)"</font>,(double)sigma[i],(double)errest[i]);
+<a name="line204">204: </a>  }
+<a name="line205">205: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line206">206: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line207">207: </a>  PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line208">208: </a>  PetscViewerPopFormat(viewer);
+<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
+<a name="line210">210: </a>}
+
+<a name="line214">214: </a><font color="#B22222">/*@C</font>
+<a name="line215">215: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a> - Print the first unconverged approximate values and</font>
+<a name="line216">216: </a><font color="#B22222">   error estimates at each iteration of the singular value solver.</font>
+
+<a name="line218">218: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line220">220: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line221">221: </a><font color="#B22222">+  svd    - singular value solver context</font>
+<a name="line222">222: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line223">223: </a><font color="#B22222">.  nconv  - number of converged singular triplets so far</font>
+<a name="line224">224: </a><font color="#B22222">.  sigma  - singular values</font>
+<a name="line225">225: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line226">226: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line227">227: </a><font color="#B22222">-  vf     - viewer and format for monitoring</font>
+
+<a name="line229">229: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line231">231: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>()</font>
+<a name="line232">232: </a><font color="#B22222">@*/</font>
+<a name="line233">233: </a><strong><font color="#4169E1"><a name="SVDMonitorFirst"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,PetscViewerAndFormat *vf)</font></strong>
+<a name="line234">234: </a>{
+<a name="line236">236: </a>  PetscViewer    viewer;
+
+<a name="line241">241: </a>  viewer = vf->viewer;
+<a name="line243">243: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)svd)->prefix) {
+<a name="line244">244: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Singular value approximations and residual norms for %s solve.\n"</font>,((PetscObject)svd)->prefix);
+<a name="line245">245: </a>  }
+<a name="line246">246: </a>  <font color="#4169E1">if</font> (nconv<nest) {
+<a name="line247">247: </a>    PetscViewerPushFormat(viewer,vf->format);
+<a name="line248">248: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line249">249: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> nconv=%D first unconverged value (error)"</font>,its,nconv);
+<a name="line250">250: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line251">251: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g (%10.8e)\n"</font>,(double)sigma[nconv],(double)errest[nconv]);
+<a name="line252">252: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line253">253: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line254">254: </a>    PetscViewerPopFormat(viewer);
+<a name="line255">255: </a>  }
+<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
+<a name="line257">257: </a>}
+
+<a name="line261">261: </a><font color="#B22222">/*@C</font>
+<a name="line262">262: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a> - Print the approximate values and error estimates as they converge.</font>
+
+<a name="line264">264: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line266">266: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line267">267: </a><font color="#B22222">+  svd    - singular value solver context</font>
+<a name="line268">268: </a><font color="#B22222">.  its    - iteration number</font>
+<a name="line269">269: </a><font color="#B22222">.  nconv  - number of converged singular triplets so far</font>
+<a name="line270">270: </a><font color="#B22222">.  sigma  - singular values</font>
+<a name="line271">271: </a><font color="#B22222">.  errest - error estimates</font>
+<a name="line272">272: </a><font color="#B22222">.  nest   - number of error estimates to display</font>
+<a name="line273">273: </a><font color="#B22222">-  ctx    - monitor context</font>
+
+<a name="line275">275: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line277">277: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>()</font>
+<a name="line278">278: </a><font color="#B22222">@*/</font>
+<a name="line279">279: </a><strong><font color="#4169E1"><a name="SVDMonitorConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,SlepcConvMonitor ctx)</font></strong>
+<a name="line280">280: </a>{
+<a name="line282">282: </a>  PetscInt       i;
+<a name="line283">283: </a>  PetscViewer    viewer;
+
+<a name="line288">288: </a>  viewer = ctx->viewer;
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (its==1 && ((PetscObject)svd)->prefix) {
+<a name="line291">291: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Convergence history for %s solve.\n"</font>,((PetscObject)svd)->prefix);
+<a name="line292">292: </a>  }
+<a name="line293">293: </a>  <font color="#4169E1">if</font> (its==1) ctx->oldnconv = 0;
+<a name="line294">294: </a>  <font color="#4169E1">if</font> (ctx->oldnconv!=nconv) {
+<a name="line295">295: </a>    PetscViewerPushFormat(viewer,ctx->format);
+<a name="line296">296: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line297">297: </a>    <font color="#4169E1">for</font> (i=ctx->oldnconv;i<nconv;i++) {
+<a name="line298">298: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%3D <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> converged value (error) #%D"</font>,its,i);
+<a name="line299">299: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line300">300: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" %g (%10.8e)\n"</font>,(double)sigma[i],(double)errest[i]);
+<a name="line301">301: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line302">302: </a>    }
+<a name="line303">303: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line304">304: </a>    PetscViewerPopFormat(viewer);
+<a name="line305">305: </a>    ctx->oldnconv = nconv;
+<a name="line306">306: </a>  }
+<a name="line307">307: </a>  <font color="#4169E1">return</font>(0);
+<a name="line308">308: </a>}
+
+<a name="line312">312: </a><font color="#B22222">/*@C</font>
+<a name="line313">313: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDMonitorLGCreate.html#SVDMonitorLGCreate">SVDMonitorLGCreate</a> - Creates a line graph context for use with</font>
+<a name="line314">314: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> to monitor convergence.</font>
+
+<a name="line316">316: </a><font color="#B22222">   Collective on MPI_Comm</font>
+
+<a name="line318">318: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line319">319: </a><font color="#B22222">+  comm - communicator context</font>
+<a name="line320">320: </a><font color="#B22222">.  host - the X display to open, or null for the local machine</font>
+<a name="line321">321: </a><font color="#B22222">.  label - the title to put in the title bar</font>
+<a name="line322">322: </a><font color="#B22222">.  x, y - the screen coordinates of the upper left coordinate of</font>
+<a name="line323">323: </a><font color="#B22222">          the window</font>
+<a name="line324">324: </a><font color="#B22222">-  m, n - the screen width and height in pixels</font>
+
+<a name="line326">326: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line327">327: </a><font color="#B22222">.  lgctx - the drawing context</font>
+
+<a name="line329">329: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line330">330: </a><font color="#B22222">+  -svd_monitor_lg - Sets line graph monitor for the first residual</font>
+<a name="line331">331: </a><font color="#B22222">-  -svd_monitor_lg_all - Sets line graph monitor for all residuals</font>
+
+<a name="line333">333: </a><font color="#B22222">   Notes:</font>
+<a name="line334">334: </a><font color="#B22222">   Use PetscDrawLGDestroy() to destroy this line graph.</font>
+
+<a name="line336">336: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line338">338: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>()</font>
+<a name="line339">339: </a><font color="#B22222">@*/</font>
+<a name="line340">340: </a><strong><font color="#4169E1"><a name="SVDMonitorLGCreate"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorLGCreate.html#SVDMonitorLGCreate">SVDMonitorLGCreate</a>(MPI_Comm comm,const char host[],const char label[],int x,int y,int m,int n,PetscDrawLG *lgctx)</font></strong>
+<a name="line341">341: </a>{
+<a name="line342">342: </a>  PetscDraw      draw;
+<a name="line343">343: </a>  PetscDrawLG    lg;
+
+<a name="line347">347: </a>  PetscDrawCreate(comm,host,label,x,y,m,n,&draw);
+<a name="line348">348: </a>  PetscDrawSetFromOptions(draw);
+<a name="line349">349: </a>  PetscDrawLGCreate(draw,1,&lg);
+<a name="line350">350: </a>  PetscDrawLGSetFromOptions(lg);
+<a name="line351">351: </a>  PetscDrawDestroy(&draw);
+<a name="line352">352: </a>  *lgctx = lg;
+<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
+<a name="line354">354: </a>}
+
+<a name="line358">358: </a><strong><font color="#4169E1"><a name="SVDMonitorLG"></a>PetscErrorCode SVDMonitorLG(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line359">359: </a>{
+<a name="line360">360: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line361">361: </a>  PetscReal      x,y;
+
+<a name="line366">366: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line367">367: </a>    PetscDrawLGReset(lg);
+<a name="line368">368: </a>    PetscDrawLGSetDimension(lg,1);
+<a name="line369">369: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(svd->tol)-2,0.0);
+<a name="line370">370: </a>  }
+<a name="line371">371: </a>  x = (PetscReal)its;
+<a name="line372">372: </a>  <font color="#4169E1">if</font> (errest[nconv] > 0.0) y = PetscLog10Real(errest[nconv]);
+<a name="line373">373: </a>  <font color="#4169E1">else</font> y = 0.0;
+<a name="line374">374: </a>  PetscDrawLGAddPoint(lg,&x,&y);
+<a name="line375">375: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || svd->reason) {
+<a name="line376">376: </a>    PetscDrawLGDraw(lg);
+<a name="line377">377: </a>    PetscDrawLGSave(lg);
+<a name="line378">378: </a>  }
+<a name="line379">379: </a>  <font color="#4169E1">return</font>(0);
+<a name="line380">380: </a>}
+
+<a name="line384">384: </a><strong><font color="#4169E1"><a name="SVDMonitorLGAll"></a>PetscErrorCode SVDMonitorLGAll(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt nconv,PetscReal *sigma,PetscReal *errest,PetscInt nest,void *ctx)</font></strong>
+<a name="line385">385: </a>{
+<a name="line386">386: </a>  PetscDrawLG    lg = (PetscDrawLG)ctx;
+<a name="line387">387: </a>  PetscInt       i,n = PetscMin(svd->nsv,255);
+<a name="line388">388: </a>  PetscReal      *x,*y;
+
+<a name="line393">393: </a>  <font color="#4169E1">if</font> (its==1) {
+<a name="line394">394: </a>    PetscDrawLGReset(lg);
+<a name="line395">395: </a>    PetscDrawLGSetDimension(lg,n);
+<a name="line396">396: </a>    PetscDrawLGSetLimits(lg,1,1.0,PetscLog10Real(svd->tol)-2,0.0);
+<a name="line397">397: </a>  }
+<a name="line398">398: </a>  PetscMalloc2(n,&x,n,&y);
+<a name="line399">399: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line400">400: </a>    x[i] = (PetscReal)its;
+<a name="line401">401: </a>    <font color="#4169E1">if</font> (i < nest && errest[i] > 0.0) y[i] = PetscLog10Real(errest[i]);
+<a name="line402">402: </a>    <font color="#4169E1">else</font> y[i] = 0.0;
+<a name="line403">403: </a>  }
+<a name="line404">404: </a>  PetscDrawLGAddPoint(lg,x,y);
+<a name="line405">405: </a>  <font color="#4169E1">if</font> (its <= 20 || !(its % 5) || svd->reason) {
+<a name="line406">406: </a>    PetscDrawLGDraw(lg);
+<a name="line407">407: </a>    PetscDrawLGSave(lg);
+<a name="line408">408: </a>  }
+<a name="line409">409: </a>  PetscFree2(x,y);
+<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
+<a name="line411">411: </a>}
+
 </pre>
 </body>
 
diff --git a/src/svd/interface/svdopts.c b/src/svd/interface/svdopts.c
index d9b1fb1..7b121af 100644
--- a/src/svd/interface/svdopts.c
+++ b/src/svd/interface/svdopts.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -22,6 +22,7 @@
 */
 
 #include <slepc/private/svdimpl.h>      /*I "slepcsvd.h" I*/
+#include <petscdraw.h>
 
 #undef __FUNCT__
 #define __FUNCT__ "SVDSetImplicitTranspose"
@@ -75,7 +76,7 @@ PetscErrorCode SVDSetImplicitTranspose(SVD svd,PetscBool impl)
    Input Parameter:
 .  svd  - the singular value solver context
 
-   Output paramter:
+   Output Parameter:
 .  impl - how to handle the transpose (implicitly or not)
 
    Level: advanced
@@ -199,7 +200,7 @@ PetscErrorCode SVDGetTolerances(SVD svd,PetscReal *tol,PetscInt *maxits)
    (b) in cases where nsv is large, the user sets mpd.
 
    The value of ncv should always be between nsv and (nsv+mpd), typically
-   ncv=nsv+mpd. If nev is not too large, mpd=nsv is a reasonable choice, otherwise
+   ncv=nsv+mpd. If nsv is not too large, mpd=nsv is a reasonable choice, otherwise
    a smaller value should be used.
 
    Level: intermediate
@@ -342,6 +343,322 @@ PetscErrorCode SVDGetWhichSingularTriplets(SVD svd,SVDWhich *which)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "SVDSetConvergenceTestFunction"
+/*@C
+   SVDSetConvergenceTestFunction - Sets a function to compute the error estimate
+   used in the convergence test.
+
+   Logically Collective on SVD
+
+   Input Parameters:
++  svd     - singular value solver context obtained from SVDCreate()
+.  func    - a pointer to the convergence test function
+.  ctx     - context for private data for the convergence routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
+
+   Calling Sequence of func:
+$   func(SVD svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)
+
++   svd    - singular value solver context obtained from SVDCreate()
+.   sigma  - computed singular value
+.   res    - residual norm associated to the singular triplet
+.   errest - (output) computed error estimate
+-   ctx    - optional context, as set by SVDSetConvergenceTestFunction()
+
+   Note:
+   If the error estimate returned by the convergence test function is less than
+   the tolerance, then the singular value is accepted as converged.
+
+   Level: advanced
+
+.seealso: SVDSetConvergenceTest(), SVDSetTolerances()
+@*/
+PetscErrorCode SVDSetConvergenceTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscReal,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  if (svd->convergeddestroy) {
+    ierr = (*svd->convergeddestroy)(svd->convergedctx);CHKERRQ(ierr);
+  }
+  svd->converged        = func;
+  svd->convergeddestroy = destroy;
+  svd->convergedctx     = ctx;
+  if (func == SVDConvergedRelative) svd->conv = SVD_CONV_REL;
+  else if (func == SVDConvergedAbsolute) svd->conv = SVD_CONV_ABS;
+  else svd->conv = SVD_CONV_USER;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDSetConvergenceTest"
+/*@
+   SVDSetConvergenceTest - Specifies how to compute the error estimate
+   used in the convergence test.
+
+   Logically Collective on SVD
+
+   Input Parameters:
++  svd  - singular value solver context obtained from SVDCreate()
+-  conv - the type of convergence test
+
+   Options Database Keys:
++  -svd_conv_abs  - Sets the absolute convergence test
+.  -svd_conv_rel  - Sets the convergence test relative to the singular value
+-  -svd_conv_user - Selects the user-defined convergence test
+
+   Note:
+   The parameter 'conv' can have one of these values
++     SVD_CONV_ABS  - absolute error ||r||
+.     SVD_CONV_REL  - error relative to the singular value l, ||r||/sigma
+-     SVD_CONV_USER - function set by SVDSetConvergenceTestFunction()
+
+   Level: intermediate
+
+.seealso: SVDGetConvergenceTest(), SVDSetConvergenceTestFunction(), SVDSetStoppingTest(), SVDConv
+@*/
+PetscErrorCode SVDSetConvergenceTest(SVD svd,SVDConv conv)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(svd,conv,2);
+  switch (conv) {
+    case SVD_CONV_ABS:  svd->converged = SVDConvergedAbsolute; break;
+    case SVD_CONV_REL:  svd->converged = SVDConvergedRelative; break;
+    case SVD_CONV_USER: break;
+    default:
+      SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'conv' value");
+  }
+  svd->conv = conv;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDGetConvergenceTest"
+/*@
+   SVDGetConvergenceTest - Gets the method used to compute the error estimate
+   used in the convergence test.
+
+   Not Collective
+
+   Input Parameters:
+.  svd   - singular value solver context obtained from SVDCreate()
+
+   Output Parameters:
+.  conv  - the type of convergence test
+
+   Level: intermediate
+
+.seealso: SVDSetConvergenceTest(), SVDConv
+@*/
+PetscErrorCode SVDGetConvergenceTest(SVD svd,SVDConv *conv)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidPointer(conv,2);
+  *conv = svd->conv;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDSetStoppingTestFunction"
+/*@C
+   SVDSetStoppingTestFunction - Sets a function to decide when to stop the outer
+   iteration of the singular value solver.
+
+   Logically Collective on SVD
+
+   Input Parameters:
++  svd     - singular value solver context obtained from SVDCreate()
+.  func    - pointer to the stopping test function
+.  ctx     - context for private data for the stopping routine (may be null)
+-  destroy - a routine for destroying the context (may be null)
+
+   Calling Sequence of func:
+$   func(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)
+
++   svd    - singular value solver context obtained from SVDCreate()
+.   its    - current number of iterations
+.   max_it - maximum number of iterations
+.   nconv  - number of currently converged singular triplets
+.   nsv    - number of requested singular triplets
+.   reason - (output) result of the stopping test
+-   ctx    - optional context, as set by SVDSetStoppingTestFunction()
+
+   Note:
+   Normal usage is to first call the default routine SVDStoppingBasic() and then
+   set reason to SVD_CONVERGED_USER if some user-defined conditions have been
+   met. To let the singular value solver continue iterating, the result must be
+   left as SVD_CONVERGED_ITERATING.
+
+   Level: advanced
+
+.seealso: SVDSetStoppingTest(), SVDStoppingBasic()
+@*/
+PetscErrorCode SVDSetStoppingTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  if (svd->stoppingdestroy) {
+    ierr = (*svd->stoppingdestroy)(svd->stoppingctx);CHKERRQ(ierr);
+  }
+  svd->stopping        = func;
+  svd->stoppingdestroy = destroy;
+  svd->stoppingctx     = ctx;
+  if (func == SVDStoppingBasic) svd->stop = SVD_STOP_BASIC;
+  else svd->stop = SVD_STOP_USER;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDSetStoppingTest"
+/*@
+   SVDSetStoppingTest - Specifies how to decide the termination of the outer
+   loop of the singular value solver.
+
+   Logically Collective on SVD
+
+   Input Parameters:
++  svd  - singular value solver context obtained from SVDCreate()
+-  stop - the type of stopping test
+
+   Options Database Keys:
++  -svd_stop_basic - Sets the default stopping test
+-  -svd_stop_user  - Selects the user-defined stopping test
+
+   Note:
+   The parameter 'stop' can have one of these values
++     SVD_STOP_BASIC - default stopping test
+-     SVD_STOP_USER  - function set by SVDSetStoppingTestFunction()
+
+   Level: advanced
+
+.seealso: SVDGetStoppingTest(), SVDSetStoppingTestFunction(), SVDSetConvergenceTest(), SVDStop
+@*/
+PetscErrorCode SVDSetStoppingTest(SVD svd,SVDStop stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidLogicalCollectiveEnum(svd,stop,2);
+  switch (stop) {
+    case SVD_STOP_BASIC: svd->stopping = SVDStoppingBasic; break;
+    case SVD_STOP_USER:  break;
+    default:
+      SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'stop' value");
+  }
+  svd->stop = stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDGetStoppingTest"
+/*@
+   SVDGetStoppingTest - Gets the method used to decide the termination of the outer
+   loop of the singular value solver.
+
+   Not Collective
+
+   Input Parameters:
+.  svd   - singular value solver context obtained from SVDCreate()
+
+   Output Parameters:
+.  stop  - the type of stopping test
+
+   Level: advanced
+
+.seealso: SVDSetStoppingTest(), SVDStop
+@*/
+PetscErrorCode SVDGetStoppingTest(SVD svd,SVDStop *stop)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  PetscValidPointer(stop,2);
+  *stop = svd->stop;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDMonitorSetFromOptions"
+/*@C
+   SVDMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user.
+
+   Collective on SVD
+
+   Input Parameters:
++  svd      - the singular value solver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+.  monitor  - the monitor function, whose context is a PetscViewerAndFormat
+-  trackall - whether this monitor tracks all singular values or not
+
+   Level: developer
+
+.seealso: SVDMonitorSet(), SVDSetTrackAll(), SVDConvMonitorSetFromOptions()
+@*/
+PetscErrorCode SVDMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscBool trackall)
+{
+  PetscErrorCode       ierr;
+  PetscBool            flg;
+  PetscViewer          viewer;
+  PetscViewerFormat    format;
+  PetscViewerAndFormat *vf;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = PetscViewerAndFormatCreate(viewer,format,&vf);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = SVDMonitorSet(svd,(PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
+    if (trackall) {
+      ierr = SVDSetTrackAll(svd,PETSC_TRUE);CHKERRQ(ierr);
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "SVDConvMonitorSetFromOptions"
+/*@C
+   SVDConvMonitorSetFromOptions - Sets a monitor function and viewer appropriate for the type
+   indicated by the user (for monitors that only show iteration numbers of convergence).
+
+   Collective on SVD
+
+   Input Parameters:
++  svd      - the singular value solver context
+.  name     - the monitor option name
+.  help     - message indicating what monitoring is done
+.  manual   - manual page for the monitor
+-  monitor  - the monitor function, whose context is a SlepcConvMonitor
+
+   Level: developer
+
+.seealso: SVDMonitorSet(), SVDMonitorSetFromOptions()
+@*/
+PetscErrorCode SVDConvMonitorSetFromOptions(SVD svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,SlepcConvMonitor))
+{
+  PetscErrorCode    ierr;
+  PetscBool         flg;
+  PetscViewer       viewer;
+  PetscViewerFormat format;
+  SlepcConvMonitor  ctx;
+
+  PetscFunctionBegin;
+  ierr = PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,name,&viewer,&format,&flg);CHKERRQ(ierr);
+  if (flg) {
+    ierr = SlepcConvMonitorCreate(viewer,format,&ctx);CHKERRQ(ierr);
+    ierr = PetscObjectDereference((PetscObject)viewer);CHKERRQ(ierr);
+    ierr = SVDMonitorSet(svd,(PetscErrorCode (*)(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "SVDSetFromOptions"
 /*@
    SVDSetFromOptions - Sets SVD options from the options database.
@@ -362,13 +679,12 @@ PetscErrorCode SVDGetWhichSingularTriplets(SVD svd,SVDWhich *which)
 @*/
 PetscErrorCode SVDSetFromOptions(SVD svd)
 {
-  PetscErrorCode   ierr;
-  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-  PetscBool        flg,val,flg1,flg2,flg3;
-  PetscInt         i,j,k;
-  PetscReal        r;
-  PetscViewer      monviewer;
-  SlepcConvMonitor ctx;
+  PetscErrorCode ierr;
+  char           type[256];
+  PetscBool      set,flg,val,flg1,flg2,flg3;
+  PetscInt       i,j,k;
+  PetscReal      r;
+  PetscDrawLG    lg;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
@@ -381,12 +697,12 @@ PetscErrorCode SVDSetFromOptions(SVD svd)
       ierr = SVDSetType(svd,SVDCROSS);CHKERRQ(ierr);
     }
 
-    ierr = PetscOptionsName("-svd_view","Print detailed information on solver used","SVDView",&flg);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-svd_view_vectors","View computed singular vectors","SVDVectorsView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-svd_view_values","View computed singular values","SVDValuesView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-svd_converged_reason","Print reason for convergence, and number of iterations","SVDReasonView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-svd_error_absolute","Print absolute errors of each singular triplet","SVDErrorView",0);CHKERRQ(ierr);
-    ierr = PetscOptionsName("-svd_error_relative","Print relative errors of each singular triplet","SVDErrorView",0);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-svd_view","Print detailed information on solver used","SVDView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-svd_view_vectors","View computed singular vectors","SVDVectorsView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-svd_view_values","View computed singular values","SVDValuesView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-svd_converged_reason","Print reason for convergence, and number of iterations","SVDReasonView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-svd_error_absolute","Print absolute errors of each singular triplet","SVDErrorView",NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsName("-svd_error_relative","Print relative errors of each singular triplet","SVDErrorView",NULL);CHKERRQ(ierr);
 
     ierr = PetscOptionsBool("-svd_implicittranspose","Handle matrix transpose implicitly","SVDSetImplicitTranspose",svd->impltrans,&val,&flg);CHKERRQ(ierr);
     if (flg) {
@@ -401,6 +717,18 @@ PetscErrorCode SVDSetFromOptions(SVD svd)
       ierr = SVDSetTolerances(svd,r,i);CHKERRQ(ierr);
     }
 
+    ierr = PetscOptionsBoolGroupBegin("-svd_conv_rel","Relative error convergence test","SVDSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = SVDSetConvergenceTest(svd,SVD_CONV_REL);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroup("-svd_conv_abs","Absolute error convergence test","SVDSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = SVDSetConvergenceTest(svd,SVD_CONV_ABS);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-svd_conv_user","User-defined convergence test","SVDSetConvergenceTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = SVDSetConvergenceTest(svd,SVD_CONV_USER);CHKERRQ(ierr); }
+
+    ierr = PetscOptionsBoolGroupBegin("-svd_stop_basic","Stop iteration if all singular values converged or max_it reached","SVDSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = SVDSetStoppingTest(svd,SVD_STOP_BASIC);CHKERRQ(ierr); }
+    ierr = PetscOptionsBoolGroupEnd("-svd_stop_user","User-defined stopping test","SVDSetStoppingTest",&flg);CHKERRQ(ierr);
+    if (flg) { ierr = SVDSetStoppingTest(svd,SVD_STOP_USER);CHKERRQ(ierr); }
+
     i = svd->nsv;
     ierr = PetscOptionsInt("-svd_nsv","Number of singular values to compute","SVDSetDimensions",svd->nsv,&i,&flg1);CHKERRQ(ierr);
     j = svd->ncv? svd->ncv: PETSC_DEFAULT;
@@ -420,45 +748,35 @@ PetscErrorCode SVDSetFromOptions(SVD svd)
     /*
       Cancels all monitors hardwired into code before call to SVDSetFromOptions()
     */
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-svd_monitor_cancel","Remove any hardwired monitor routines","SVDMonitorCancel",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
+    ierr = PetscOptionsBool("-svd_monitor_cancel","Remove any hardwired monitor routines","SVDMonitorCancel",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
       ierr = SVDMonitorCancel(svd);CHKERRQ(ierr);
     }
-
-    ierr = PetscOptionsString("-svd_monitor_all","Monitor approximate singular values and error estimates","SVDMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)svd),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = SVDMonitorSet(svd,SVDMonitorAll,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-      ierr = SVDSetTrackAll(svd,PETSC_TRUE);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-svd_monitor_conv","Monitor approximate singular values and error estimates as they converge","SVDMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-        ierr = PetscNew(&ctx);CHKERRQ(ierr);
-        ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)svd),monfilename,&ctx->viewer);CHKERRQ(ierr);
-        ierr = SVDMonitorSet(svd,SVDMonitorConverged,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);CHKERRQ(ierr);
-    }
-    ierr = PetscOptionsString("-svd_monitor","Monitor first unconverged approximate singular value and error estimate","SVDMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);
-    if (flg) {
-      ierr = PetscViewerASCIIOpen(PetscObjectComm((PetscObject)svd),monfilename,&monviewer);CHKERRQ(ierr);
-      ierr = SVDMonitorSet(svd,SVDMonitorFirst,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr);
-    }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-svd_monitor_lg","Monitor first unconverged approximate singular value and error estimate graphically","SVDMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = SVDMonitorSet(svd,SVDMonitorLG,NULL,NULL);CHKERRQ(ierr);
+    /*
+      Text monitors
+    */
+    ierr = SVDMonitorSetFromOptions(svd,"-svd_monitor","Monitor first unconverged approximate singular value and error estimate","SVDMonitorFirst",SVDMonitorFirst,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = SVDConvMonitorSetFromOptions(svd,"-svd_monitor_conv","Monitor approximate singular values and error estimates as they converge","SVDMonitorConverged",SVDMonitorConverged);CHKERRQ(ierr);
+    ierr = SVDMonitorSetFromOptions(svd,"-svd_monitor_all","Monitor approximate singular values and error estimates","SVDMonitorAll",SVDMonitorAll,PETSC_TRUE);CHKERRQ(ierr);
+    /*
+      Line graph monitors
+    */
+    ierr = PetscOptionsBool("-svd_monitor_lg","Monitor first unconverged approximate singular value and error estimate graphically","SVDMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = SVDMonitorLGCreate(PetscObjectComm((PetscObject)svd),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = SVDMonitorSet(svd,SVDMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
     }
-    flg = PETSC_FALSE;
-    ierr = PetscOptionsBool("-svd_monitor_lg_all","Monitor error estimates graphically","SVDMonitorSet",flg,&flg,NULL);CHKERRQ(ierr);
-    if (flg) {
-      ierr = SVDMonitorSet(svd,SVDMonitorLGAll,NULL,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsBool("-svd_monitor_lg_all","Monitor error estimates graphically","SVDMonitorSet",PETSC_FALSE,&flg,&set);CHKERRQ(ierr);
+    if (set && flg) {
+      ierr = SVDMonitorLGCreate(PetscObjectComm((PetscObject)svd),NULL,"Error estimates",PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);CHKERRQ(ierr);
+      ierr = SVDMonitorSet(svd,SVDMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);CHKERRQ(ierr);
       ierr = SVDSetTrackAll(svd,PETSC_TRUE);CHKERRQ(ierr);
     }
 
     if (svd->ops->setfromoptions) {
       ierr = (*svd->ops->setfromoptions)(PetscOptionsObject,svd);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)svd);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)svd);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
 
   if (!svd->V) { ierr = SVDGetBV(svd,&svd->V,&svd->U);CHKERRQ(ierr); }
@@ -466,7 +784,6 @@ PetscErrorCode SVDSetFromOptions(SVD svd)
   ierr = BVSetFromOptions(svd->U);CHKERRQ(ierr);
   if (!svd->ds) { ierr = SVDGetDS(svd,&svd->ds);CHKERRQ(ierr); }
   ierr = DSSetFromOptions(svd->ds);CHKERRQ(ierr);
-  ierr = PetscRandomSetFromOptions(svd->rand);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -650,7 +967,8 @@ PetscErrorCode SVDAppendOptionsPrefix(SVD svd,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
diff --git a/src/svd/interface/svdopts.c.html b/src/svd/interface/svdopts.c.html
index 5f09a9f..9767a45 100644
--- a/src/svd/interface/svdopts.c.html
+++ b/src/svd/interface/svdopts.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdopts.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:36+00:00">
+<meta name="date" content="2016-05-16T10:33:34+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdopts.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdopts.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> routines for setting solver options.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -34,580 +34,861 @@
 <a name="line22"> 22: </a><font color="#B22222">*/</font>
 
 <a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/svdimpl.h>      </font><font color="#B22222">/*I "slepcsvd.h" I*/</font><font color="#A020F0"></font>
+<a name="line25"> 25: </a><font color="#A020F0">#include <petscdraw.h></font>
+
+<a name="line29"> 29: </a><font color="#B22222">/*@</font>
+<a name="line30"> 30: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a> - Indicates how to handle the transpose of the matrix</font>
+<a name="line31"> 31: </a><font color="#B22222">   associated with the singular value problem.</font>
+
+<a name="line33"> 33: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line35"> 35: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line36"> 36: </a><font color="#B22222">+  svd  - the singular value solver context</font>
+<a name="line37"> 37: </a><font color="#B22222">-  impl - how to handle the transpose (implicitly or not)</font>
+
+<a name="line39"> 39: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line40"> 40: </a><font color="#B22222">.  -svd_implicittranspose - Activate the implicit transpose mode.</font>
+
+<a name="line42"> 42: </a><font color="#B22222">   Notes:</font>
+<a name="line43"> 43: </a><font color="#B22222">   By default, the transpose of the matrix is explicitly built (if the matrix</font>
+<a name="line44"> 44: </a><font color="#B22222">   has defined the MatTranspose operation).</font>
+
+<a name="line46"> 46: </a><font color="#B22222">   If this flag is set to true, the solver does not build the transpose, but</font>
+<a name="line47"> 47: </a><font color="#B22222">   handles it implicitly via MatMultTranspose() (or MatMultHermitianTranspose()</font>
+<a name="line48"> 48: </a><font color="#B22222">   in the complex case) operations. This is likely to be more inefficient</font>
+<a name="line49"> 49: </a><font color="#B22222">   than the default behaviour, both in sequential and in parallel, but</font>
+<a name="line50"> 50: </a><font color="#B22222">   requires less storage.</font>
+
+<a name="line52"> 52: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line54"> 54: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>()</font>
+<a name="line55"> 55: </a><font color="#B22222">@*/</font>
+<a name="line56"> 56: </a><strong><font color="#4169E1"><a name="SVDSetImplicitTranspose"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool impl)</font></strong>
+<a name="line57"> 57: </a>{
+<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (svd->impltrans!=impl) {
+<a name="line62"> 62: </a>    svd->impltrans = impl;
+<a name="line63"> 63: </a>    svd->state     = SVD_STATE_INITIAL;
+<a name="line64"> 64: </a>  }
+<a name="line65"> 65: </a>  <font color="#4169E1">return</font>(0);
+<a name="line66"> 66: </a>}
+
+<a name="line70"> 70: </a><font color="#B22222">/*@</font>
+<a name="line71"> 71: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a> - Gets the mode used to handle the transpose</font>
+<a name="line72"> 72: </a><font color="#B22222">   of the matrix associated with the singular value problem.</font>
+
+<a name="line74"> 74: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line76"> 76: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line77"> 77: </a><font color="#B22222">.  svd  - the singular value solver context</font>
+
+<a name="line79"> 79: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line80"> 80: </a><font color="#B22222">.  impl - how to handle the transpose (implicitly or not)</font>
+
+<a name="line82"> 82: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line84"> 84: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>()</font>
+<a name="line85"> 85: </a><font color="#B22222">@*/</font>
+<a name="line86"> 86: </a><strong><font color="#4169E1"><a name="SVDGetImplicitTranspose"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *impl)</font></strong>
+<a name="line87"> 87: </a>{
+<a name="line91"> 91: </a>  *impl = svd->impltrans;
+<a name="line92"> 92: </a>  <font color="#4169E1">return</font>(0);
+<a name="line93"> 93: </a>}
+
+<a name="line97"> 97: </a><font color="#B22222">/*@</font>
+<a name="line98"> 98: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a> - Sets the tolerance and maximum</font>
+<a name="line99"> 99: </a><font color="#B22222">   iteration count used by the default <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> convergence testers.</font>
+
+<a name="line101">101: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line103">103: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line104">104: </a><font color="#B22222">+  svd - the singular value solver context</font>
+<a name="line105">105: </a><font color="#B22222">.  tol - the convergence tolerance</font>
+<a name="line106">106: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
+
+<a name="line108">108: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line109">109: </a><font color="#B22222">+  -svd_tol <tol> - Sets the convergence tolerance</font>
+<a name="line110">110: </a><font color="#B22222">-  -svd_max_it <maxits> - Sets the maximum number of iterations allowed</font>
+<a name="line111">111: </a><font color="#B22222">   (use PETSC_DECIDE to compute an educated guess based on basis and matrix sizes)</font>
+
+<a name="line113">113: </a><font color="#B22222">   Note:</font>
+<a name="line114">114: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
+
+<a name="line116">116: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line118">118: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>()</font>
+<a name="line119">119: </a><font color="#B22222">@*/</font>
+<a name="line120">120: </a><strong><font color="#4169E1"><a name="SVDSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal tol,PetscInt maxits)</font></strong>
+<a name="line121">121: </a>{
+<a name="line126">126: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
+<a name="line127">127: </a>    svd->tol   = PETSC_DEFAULT;
+<a name="line128">128: </a>    svd->state = SVD_STATE_INITIAL;
+<a name="line129">129: </a>  } <font color="#4169E1">else</font> {
+<a name="line130">130: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
+<a name="line131">131: </a>    svd->tol = tol;
+<a name="line132">132: </a>  }
+<a name="line133">133: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
+<a name="line134">134: </a>    svd->max_it = 0;
+<a name="line135">135: </a>    svd->state  = SVD_STATE_INITIAL;
+<a name="line136">136: </a>  } <font color="#4169E1">else</font> {
+<a name="line137">137: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
+<a name="line138">138: </a>    svd->max_it = maxits;
+<a name="line139">139: </a>  }
+<a name="line140">140: </a>  <font color="#4169E1">return</font>(0);
+<a name="line141">141: </a>}
+
+<a name="line145">145: </a><font color="#B22222">/*@</font>
+<a name="line146">146: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a> - Gets the tolerance and maximum</font>
+<a name="line147">147: </a><font color="#B22222">   iteration count used by the default <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> convergence tests.</font>
+
+<a name="line149">149: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line151">151: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line152">152: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line154">154: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line155">155: </a><font color="#B22222">+  tol - the convergence tolerance</font>
+<a name="line156">156: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
+
+<a name="line158">158: </a><font color="#B22222">   Notes:</font>
+<a name="line159">159: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line161">161: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line163">163: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>()</font>
+<a name="line164">164: </a><font color="#B22222">@*/</font>
+<a name="line165">165: </a><strong><font color="#4169E1"><a name="SVDGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal *tol,PetscInt *maxits)</font></strong>
+<a name="line166">166: </a>{
+<a name="line169">169: </a>  <font color="#4169E1">if</font> (tol)    *tol    = svd->tol;
+<a name="line170">170: </a>  <font color="#4169E1">if</font> (maxits) *maxits = svd->max_it;
+<a name="line171">171: </a>  <font color="#4169E1">return</font>(0);
+<a name="line172">172: </a>}
+
+<a name="line176">176: </a><font color="#B22222">/*@</font>
+<a name="line177">177: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a> - Sets the number of singular values to compute</font>
+<a name="line178">178: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line180">180: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line182">182: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line183">183: </a><font color="#B22222">+  svd - the singular value solver context</font>
+<a name="line184">184: </a><font color="#B22222">.  nsv - number of singular values to compute</font>
+<a name="line185">185: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line186">186: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line188">188: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line189">189: </a><font color="#B22222">+  -svd_nsv <nsv> - Sets the number of singular values</font>
+<a name="line190">190: </a><font color="#B22222">.  -svd_ncv <ncv> - Sets the dimension of the subspace</font>
+<a name="line191">191: </a><font color="#B22222">-  -svd_mpd <mpd> - Sets the maximum projected dimension</font>
+
+<a name="line193">193: </a><font color="#B22222">   Notes:</font>
+<a name="line194">194: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
+<a name="line195">195: </a><font color="#B22222">   dependent on the solution method and the number of singular values required.</font>
+
+<a name="line197">197: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
+<a name="line198">198: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
+<a name="line199">199: </a><font color="#B22222">   (a) in cases where nsv is small, the user sets ncv (a reasonable default is 2*nsv); and</font>
+<a name="line200">200: </a><font color="#B22222">   (b) in cases where nsv is large, the user sets mpd.</font>
+
+<a name="line202">202: </a><font color="#B22222">   The value of ncv should always be between nsv and (nsv+mpd), typically</font>
+<a name="line203">203: </a><font color="#B22222">   ncv=nsv+mpd. If nsv is not too large, mpd=nsv is a reasonable choice, otherwise</font>
+<a name="line204">204: </a><font color="#B22222">   a smaller value should be used.</font>
+
+<a name="line206">206: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line208">208: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>()</font>
+<a name="line209">209: </a><font color="#B22222">@*/</font>
+<a name="line210">210: </a><strong><font color="#4169E1"><a name="SVDSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)</font></strong>
+<a name="line211">211: </a>{
+<a name="line217">217: </a>  <font color="#4169E1">if</font> (nsv<1) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nsv. Must be > 0"</font>);
+<a name="line218">218: </a>  svd->nsv = nsv;
+<a name="line219">219: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DEFAULT || ncv == PETSC_DECIDE) {
+<a name="line220">220: </a>    svd->ncv = 0;
+<a name="line221">221: </a>  } <font color="#4169E1">else</font> {
+<a name="line222">222: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
+<a name="line223">223: </a>    svd->ncv = ncv;
+<a name="line224">224: </a>  }
+<a name="line225">225: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
+<a name="line226">226: </a>    svd->mpd = 0;
+<a name="line227">227: </a>  } <font color="#4169E1">else</font> {
+<a name="line228">228: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
+<a name="line229">229: </a>    svd->mpd = mpd;
+<a name="line230">230: </a>  }
+<a name="line231">231: </a>  svd->state = SVD_STATE_INITIAL;
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a>}
+
+<a name="line237">237: </a><font color="#B22222">/*@</font>
+<a name="line238">238: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a> - Gets the number of singular values to compute</font>
+<a name="line239">239: </a><font color="#B22222">   and the dimension of the subspace.</font>
+
+<a name="line241">241: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line243">243: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line244">244: </a><font color="#B22222">.  svd - the singular value context</font>
+
+<a name="line246">246: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line247">247: </a><font color="#B22222">+  nsv - number of singular values to compute</font>
+<a name="line248">248: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
+<a name="line249">249: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
+
+<a name="line251">251: </a><font color="#B22222">   Notes:</font>
+<a name="line252">252: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
+
+<a name="line254">254: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line256">256: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>()</font>
+<a name="line257">257: </a><font color="#B22222">@*/</font>
+<a name="line258">258: </a><strong><font color="#4169E1"><a name="SVDGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)</font></strong>
+<a name="line259">259: </a>{
+<a name="line262">262: </a>  <font color="#4169E1">if</font> (nsv) *nsv = svd->nsv;
+<a name="line263">263: </a>  <font color="#4169E1">if</font> (ncv) *ncv = svd->ncv;
+<a name="line264">264: </a>  <font color="#4169E1">if</font> (mpd) *mpd = svd->mpd;
+<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
+<a name="line266">266: </a>}
+
+<a name="line270">270: </a><font color="#B22222">/*@</font>
+<a name="line271">271: </a><font color="#B22222">    <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a> - Specifies which singular triplets are</font>
+<a name="line272">272: </a><font color="#B22222">    to be sought.</font>
+
+<a name="line274">274: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line276">276: </a><font color="#B22222">    Input Parameter:</font>
+<a name="line277">277: </a><font color="#B22222">.   svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line279">279: </a><font color="#B22222">    Output Parameter:</font>
+<a name="line280">280: </a><font color="#B22222">.   which - which singular triplets are to be sought</font>
+
+<a name="line282">282: </a><font color="#B22222">    Possible values:</font>
+<a name="line283">283: </a><font color="#B22222">    The parameter 'which' can have one of these values:</font>
+
+<a name="line285">285: </a><font color="#B22222">+     SVD_LARGEST  - largest singular values</font>
+<a name="line286">286: </a><font color="#B22222">-     SVD_SMALLEST - smallest singular values</font>
+
+<a name="line288">288: </a><font color="#B22222">    Options Database Keys:</font>
+<a name="line289">289: </a><font color="#B22222">+   -svd_largest  - Sets largest singular values</font>
+<a name="line290">290: </a><font color="#B22222">-   -svd_smallest - Sets smallest singular values</font>
+
+<a name="line292">292: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line294">294: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a>(), <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a></font>
+<a name="line295">295: </a><font color="#B22222">@*/</font>
+<a name="line296">296: </a><strong><font color="#4169E1"><a name="SVDSetWhichSingularTriplets"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a> which)</font></strong>
+<a name="line297">297: </a>{
+<a name="line301">301: </a>  <font color="#4169E1">switch</font> (which) {
+<a name="line302">302: </a>    <font color="#4169E1">case</font> SVD_LARGEST:
+<a name="line303">303: </a>    <font color="#4169E1">case</font> SVD_SMALLEST:
+<a name="line304">304: </a>      <font color="#4169E1">if</font> (svd->which != which) {
+<a name="line305">305: </a>        svd->state = SVD_STATE_INITIAL;
+<a name="line306">306: </a>        svd->which = which;
+<a name="line307">307: </a>      }
+<a name="line308">308: </a>      <font color="#4169E1">break</font>;
+<a name="line309">309: </a><strong><font color="#FF0000">  default:</font></strong>
+<a name="line310">310: </a>    SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' parameter"</font>);
+<a name="line311">311: </a>  }
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
+
+<a name="line317">317: </a><font color="#B22222">/*@</font>
+<a name="line318">318: </a><font color="#B22222">    <a href="../../../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a> - Returns which singular triplets are</font>
+<a name="line319">319: </a><font color="#B22222">    to be sought.</font>
+
+<a name="line321">321: </a><font color="#B22222">    Not Collective</font>
+
+<a name="line323">323: </a><font color="#B22222">    Input Parameter:</font>
+<a name="line324">324: </a><font color="#B22222">.   svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line326">326: </a><font color="#B22222">    Output Parameter:</font>
+<a name="line327">327: </a><font color="#B22222">.   which - which singular triplets are to be sought</font>
+
+<a name="line329">329: </a><font color="#B22222">    Notes:</font>
+<a name="line330">330: </a><font color="#B22222">    See <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>() for possible values of which</font>
+
+<a name="line332">332: </a><font color="#B22222">    Level: intermediate</font>
+
+<a name="line334">334: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(), <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a></font>
+<a name="line335">335: </a><font color="#B22222">@*/</font>
+<a name="line336">336: </a><strong><font color="#4169E1"><a name="SVDGetWhichSingularTriplets"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a> *which)</font></strong>
+<a name="line337">337: </a>{
+<a name="line341">341: </a>  *which = svd->which;
+<a name="line342">342: </a>  <font color="#4169E1">return</font>(0);
+<a name="line343">343: </a>}
 
-<a name="line28"> 28: </a><font color="#B22222">/*@</font>
-<a name="line29"> 29: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a> - Indicates how to handle the transpose of the matrix</font>
-<a name="line30"> 30: </a><font color="#B22222">   associated with the singular value problem.</font>
-
-<a name="line32"> 32: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line34"> 34: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line35"> 35: </a><font color="#B22222">+  svd  - the singular value solver context</font>
-<a name="line36"> 36: </a><font color="#B22222">-  impl - how to handle the transpose (implicitly or not)</font>
-
-<a name="line38"> 38: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line39"> 39: </a><font color="#B22222">.  -svd_implicittranspose - Activate the implicit transpose mode.</font>
-
-<a name="line41"> 41: </a><font color="#B22222">   Notes:</font>
-<a name="line42"> 42: </a><font color="#B22222">   By default, the transpose of the matrix is explicitly built (if the matrix</font>
-<a name="line43"> 43: </a><font color="#B22222">   has defined the MatTranspose operation).</font>
-
-<a name="line45"> 45: </a><font color="#B22222">   If this flag is set to true, the solver does not build the transpose, but</font>
-<a name="line46"> 46: </a><font color="#B22222">   handles it implicitly via MatMultTranspose() (or MatMultHermitianTranspose()</font>
-<a name="line47"> 47: </a><font color="#B22222">   in the complex case) operations. This is likely to be more inefficient</font>
-<a name="line48"> 48: </a><font color="#B22222">   than the default behaviour, both in sequential and in parallel, but</font>
-<a name="line49"> 49: </a><font color="#B22222">   requires less storage.</font>
-
-<a name="line51"> 51: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line53"> 53: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>()</font>
-<a name="line54"> 54: </a><font color="#B22222">@*/</font>
-<a name="line55"> 55: </a><strong><font color="#4169E1"><a name="SVDSetImplicitTranspose"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool impl)</font></strong>
-<a name="line56"> 56: </a>{
-<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (svd->impltrans!=impl) {
-<a name="line61"> 61: </a>    svd->impltrans = impl;
-<a name="line62"> 62: </a>    svd->state     = SVD_STATE_INITIAL;
-<a name="line63"> 63: </a>  }
-<a name="line64"> 64: </a>  <font color="#4169E1">return</font>(0);
-<a name="line65"> 65: </a>}
-
-<a name="line69"> 69: </a><font color="#B22222">/*@</font>
-<a name="line70"> 70: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a> - Gets the mode used to handle the transpose</font>
-<a name="line71"> 71: </a><font color="#B22222">   of the matrix associated with the singular value problem.</font>
-
-<a name="line73"> 73: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line75"> 75: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line76"> 76: </a><font color="#B22222">.  svd  - the singular value solver context</font>
-
-<a name="line78"> 78: </a><font color="#B22222">   Output paramter:</font>
-<a name="line79"> 79: </a><font color="#B22222">.  impl - how to handle the transpose (implicitly or not)</font>
-
-<a name="line81"> 81: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line83"> 83: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a>()</font>
-<a name="line84"> 84: </a><font color="#B22222">@*/</font>
-<a name="line85"> 85: </a><strong><font color="#4169E1"><a name="SVDGetImplicitTranspose"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetImplicitTranspose.html#SVDGetImplicitTranspose">SVDGetImplicitTranspose</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *impl)</font></strong>
-<a name="line86"> 86: </a>{
-<a name="line90"> 90: </a>  *impl = svd->impltrans;
-<a name="line91"> 91: </a>  <font color="#4169E1">return</font>(0);
-<a name="line92"> 92: </a>}
-
-<a name="line96"> 96: </a><font color="#B22222">/*@</font>
-<a name="line97"> 97: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a> - Sets the tolerance and maximum</font>
-<a name="line98"> 98: </a><font color="#B22222">   iteration count used by the default <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> convergence testers.</font>
-
-<a name="line100">100: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line102">102: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line103">103: </a><font color="#B22222">+  svd - the singular value solver context</font>
-<a name="line104">104: </a><font color="#B22222">.  tol - the convergence tolerance</font>
-<a name="line105">105: </a><font color="#B22222">-  maxits - maximum number of iterations to use</font>
-
-<a name="line107">107: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line108">108: </a><font color="#B22222">+  -svd_tol <tol> - Sets the convergence tolerance</font>
-<a name="line109">109: </a><font color="#B22222">-  -svd_max_it <maxits> - Sets the maximum number of iterations allowed</font>
-<a name="line110">110: </a><font color="#B22222">   (use PETSC_DECIDE to compute an educated guess based on basis and matrix sizes)</font>
-
-<a name="line112">112: </a><font color="#B22222">   Note:</font>
-<a name="line113">113: </a><font color="#B22222">   Use PETSC_DEFAULT for either argument to assign a reasonably good value.</font>
-
-<a name="line115">115: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line117">117: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>()</font>
-<a name="line118">118: </a><font color="#B22222">@*/</font>
-<a name="line119">119: </a><strong><font color="#4169E1"><a name="SVDSetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal tol,PetscInt maxits)</font></strong>
-<a name="line120">120: </a>{
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (tol == PETSC_DEFAULT) {
-<a name="line126">126: </a>    svd->tol   = PETSC_DEFAULT;
-<a name="line127">127: </a>    svd->state = SVD_STATE_INITIAL;
-<a name="line128">128: </a>  } <font color="#4169E1">else</font> {
-<a name="line129">129: </a>    <font color="#4169E1">if</font> (tol <= 0.0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of tol. Must be > 0"</font>);
-<a name="line130">130: </a>    svd->tol = tol;
-<a name="line131">131: </a>  }
-<a name="line132">132: </a>  <font color="#4169E1">if</font> (maxits == PETSC_DEFAULT || maxits == PETSC_DECIDE) {
-<a name="line133">133: </a>    svd->max_it = 0;
-<a name="line134">134: </a>    svd->state  = SVD_STATE_INITIAL;
-<a name="line135">135: </a>  } <font color="#4169E1">else</font> {
-<a name="line136">136: </a>    <font color="#4169E1">if</font> (maxits <= 0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of maxits. Must be > 0"</font>);
-<a name="line137">137: </a>    svd->max_it = maxits;
-<a name="line138">138: </a>  }
-<a name="line139">139: </a>  <font color="#4169E1">return</font>(0);
-<a name="line140">140: </a>}
-
-<a name="line144">144: </a><font color="#B22222">/*@</font>
-<a name="line145">145: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a> - Gets the tolerance and maximum</font>
-<a name="line146">146: </a><font color="#B22222">   iteration count used by the default <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> convergence tests.</font>
-
-<a name="line148">148: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line150">150: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line151">151: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line153">153: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line154">154: </a><font color="#B22222">+  tol - the convergence tolerance</font>
-<a name="line155">155: </a><font color="#B22222">-  maxits - maximum number of iterations</font>
-
-<a name="line157">157: </a><font color="#B22222">   Notes:</font>
-<a name="line158">158: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line160">160: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line162">162: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>()</font>
-<a name="line163">163: </a><font color="#B22222">@*/</font>
-<a name="line164">164: </a><strong><font color="#4169E1"><a name="SVDGetTolerances"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetTolerances.html#SVDGetTolerances">SVDGetTolerances</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal *tol,PetscInt *maxits)</font></strong>
-<a name="line165">165: </a>{
-<a name="line168">168: </a>  <font color="#4169E1">if</font> (tol)    *tol    = svd->tol;
-<a name="line169">169: </a>  <font color="#4169E1">if</font> (maxits) *maxits = svd->max_it;
-<a name="line170">170: </a>  <font color="#4169E1">return</font>(0);
-<a name="line171">171: </a>}
-
-<a name="line175">175: </a><font color="#B22222">/*@</font>
-<a name="line176">176: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a> - Sets the number of singular values to compute</font>
-<a name="line177">177: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line179">179: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line181">181: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line182">182: </a><font color="#B22222">+  svd - the singular value solver context</font>
-<a name="line183">183: </a><font color="#B22222">.  nsv - number of singular values to compute</font>
-<a name="line184">184: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line185">185: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line187">187: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line188">188: </a><font color="#B22222">+  -svd_nsv <nsv> - Sets the number of singular values</font>
-<a name="line189">189: </a><font color="#B22222">.  -svd_ncv <ncv> - Sets the dimension of the subspace</font>
-<a name="line190">190: </a><font color="#B22222">-  -svd_mpd <mpd> - Sets the maximum projected dimension</font>
-
-<a name="line192">192: </a><font color="#B22222">   Notes:</font>
-<a name="line193">193: </a><font color="#B22222">   Use PETSC_DEFAULT for ncv and mpd to assign a reasonably good value, which is</font>
-<a name="line194">194: </a><font color="#B22222">   dependent on the solution method and the number of singular values required.</font>
-
-<a name="line196">196: </a><font color="#B22222">   The parameters ncv and mpd are intimately related, so that the user is advised</font>
-<a name="line197">197: </a><font color="#B22222">   to set one of them at most. Normal usage is that</font>
-<a name="line198">198: </a><font color="#B22222">   (a) in cases where nsv is small, the user sets ncv (a reasonable default is 2*nsv); and</font>
-<a name="line199">199: </a><font color="#B22222">   (b) in cases where nsv is large, the user sets mpd.</font>
-
-<a name="line201">201: </a><font color="#B22222">   The value of ncv should always be between nsv and (nsv+mpd), typically</font>
-<a name="line202">202: </a><font color="#B22222">   ncv=nsv+mpd. If nev is not too large, mpd=nsv is a reasonable choice, otherwise</font>
-<a name="line203">203: </a><font color="#B22222">   a smaller value should be used.</font>
-
-<a name="line205">205: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line207">207: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>()</font>
-<a name="line208">208: </a><font color="#B22222">@*/</font>
-<a name="line209">209: </a><strong><font color="#4169E1"><a name="SVDSetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt nsv,PetscInt ncv,PetscInt mpd)</font></strong>
-<a name="line210">210: </a>{
-<a name="line216">216: </a>  <font color="#4169E1">if</font> (nsv<1) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of nsv. Must be > 0"</font>);
-<a name="line217">217: </a>  svd->nsv = nsv;
-<a name="line218">218: </a>  <font color="#4169E1">if</font> (ncv == PETSC_DEFAULT || ncv == PETSC_DECIDE) {
-<a name="line219">219: </a>    svd->ncv = 0;
-<a name="line220">220: </a>  } <font color="#4169E1">else</font> {
-<a name="line221">221: </a>    <font color="#4169E1">if</font> (ncv<1) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of ncv. Must be > 0"</font>);
-<a name="line222">222: </a>    svd->ncv = ncv;
-<a name="line223">223: </a>  }
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (mpd == PETSC_DECIDE || mpd == PETSC_DEFAULT) {
-<a name="line225">225: </a>    svd->mpd = 0;
-<a name="line226">226: </a>  } <font color="#4169E1">else</font> {
-<a name="line227">227: </a>    <font color="#4169E1">if</font> (mpd<1) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of mpd. Must be > 0"</font>);
-<a name="line228">228: </a>    svd->mpd = mpd;
-<a name="line229">229: </a>  }
-<a name="line230">230: </a>  svd->state = SVD_STATE_INITIAL;
-<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
-<a name="line232">232: </a>}
-
-<a name="line236">236: </a><font color="#B22222">/*@</font>
-<a name="line237">237: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a> - Gets the number of singular values to compute</font>
-<a name="line238">238: </a><font color="#B22222">   and the dimension of the subspace.</font>
-
-<a name="line240">240: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line242">242: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line243">243: </a><font color="#B22222">.  svd - the singular value context</font>
-
-<a name="line245">245: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line246">246: </a><font color="#B22222">+  nsv - number of singular values to compute</font>
-<a name="line247">247: </a><font color="#B22222">.  ncv - the maximum dimension of the subspace to be used by the solver</font>
-<a name="line248">248: </a><font color="#B22222">-  mpd - the maximum dimension allowed for the projected problem</font>
-
-<a name="line250">250: </a><font color="#B22222">   Notes:</font>
-<a name="line251">251: </a><font color="#B22222">   The user can specify NULL for any parameter that is not needed.</font>
-
-<a name="line253">253: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line255">255: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>()</font>
-<a name="line256">256: </a><font color="#B22222">@*/</font>
-<a name="line257">257: </a><strong><font color="#4169E1"><a name="SVDGetDimensions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetDimensions.html#SVDGetDimensions">SVDGetDimensions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *nsv,PetscInt *ncv,PetscInt *mpd)</font></strong>
-<a name="line258">258: </a>{
-<a name="line261">261: </a>  <font color="#4169E1">if</font> (nsv) *nsv = svd->nsv;
-<a name="line262">262: </a>  <font color="#4169E1">if</font> (ncv) *ncv = svd->ncv;
-<a name="line263">263: </a>  <font color="#4169E1">if</font> (mpd) *mpd = svd->mpd;
-<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
-<a name="line265">265: </a>}
-
-<a name="line269">269: </a><font color="#B22222">/*@</font>
-<a name="line270">270: </a><font color="#B22222">    <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a> - Specifies which singular triplets are</font>
-<a name="line271">271: </a><font color="#B22222">    to be sought.</font>
-
-<a name="line273">273: </a><font color="#B22222">    Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line275">275: </a><font color="#B22222">    Input Parameter:</font>
-<a name="line276">276: </a><font color="#B22222">.   svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-
-<a name="line278">278: </a><font color="#B22222">    Output Parameter:</font>
-<a name="line279">279: </a><font color="#B22222">.   which - which singular triplets are to be sought</font>
-
-<a name="line281">281: </a><font color="#B22222">    Possible values:</font>
-<a name="line282">282: </a><font color="#B22222">    The parameter 'which' can have one of these values:</font>
-
-<a name="line284">284: </a><font color="#B22222">+     SVD_LARGEST  - largest singular values</font>
-<a name="line285">285: </a><font color="#B22222">-     SVD_SMALLEST - smallest singular values</font>
-
-<a name="line287">287: </a><font color="#B22222">    Options Database Keys:</font>
-<a name="line288">288: </a><font color="#B22222">+   -svd_largest  - Sets largest singular values</font>
-<a name="line289">289: </a><font color="#B22222">-   -svd_smallest - Sets smallest singular values</font>
-
-<a name="line291">291: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line293">293: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a>(), <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a></font>
-<a name="line294">294: </a><font color="#B22222">@*/</font>
-<a name="line295">295: </a><strong><font color="#4169E1"><a name="SVDSetWhichSingularTriplets"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a> which)</font></strong>
-<a name="line296">296: </a>{
-<a name="line300">300: </a>  <font color="#4169E1">switch</font> (which) {
-<a name="line301">301: </a>    <font color="#4169E1">case</font> SVD_LARGEST:
-<a name="line302">302: </a>    <font color="#4169E1">case</font> SVD_SMALLEST:
-<a name="line303">303: </a>      <font color="#4169E1">if</font> (svd->which != which) {
-<a name="line304">304: </a>        svd->state = SVD_STATE_INITIAL;
-<a name="line305">305: </a>        svd->which = which;
-<a name="line306">306: </a>      }
-<a name="line307">307: </a>      <font color="#4169E1">break</font>;
-<a name="line308">308: </a><strong><font color="#FF0000">  default:</font></strong>
-<a name="line309">309: </a>    SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'which' parameter"</font>);
-<a name="line310">310: </a>  }
-<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
-<a name="line312">312: </a>}
-
-<a name="line316">316: </a><font color="#B22222">/*@</font>
-<a name="line317">317: </a><font color="#B22222">    <a href="../../../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a> - Returns which singular triplets are</font>
-<a name="line318">318: </a><font color="#B22222">    to be sought.</font>
-
-<a name="line320">320: </a><font color="#B22222">    Not Collective</font>
-
-<a name="line322">322: </a><font color="#B22222">    Input Parameter:</font>
-<a name="line323">323: </a><font color="#B22222">.   svd - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
-
-<a name="line325">325: </a><font color="#B22222">    Output Parameter:</font>
-<a name="line326">326: </a><font color="#B22222">.   which - which singular triplets are to be sought</font>
-
-<a name="line328">328: </a><font color="#B22222">    Notes:</font>
-<a name="line329">329: </a><font color="#B22222">    See <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>() for possible values of which</font>
-
-<a name="line331">331: </a><font color="#B22222">    Level: intermediate</font>
-
-<a name="line333">333: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(), <a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a></font>
-<a name="line334">334: </a><font color="#B22222">@*/</font>
-<a name="line335">335: </a><strong><font color="#4169E1"><a name="SVDGetWhichSingularTriplets"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetWhichSingularTriplets.html#SVDGetWhichSingularTriplets">SVDGetWhichSingularTriplets</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDWhich.html#SVDWhich">SVDWhich</a> *which)</font></strong>
-<a name="line336">336: </a>{
-<a name="line340">340: </a>  *which = svd->which;
-<a name="line341">341: </a>  <font color="#4169E1">return</font>(0);
-<a name="line342">342: </a>}
-
-<a name="line346">346: </a><font color="#B22222">/*@</font>
-<a name="line347">347: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a> - Sets <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options from the options database.</font>
-<a name="line348">348: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>() if the user is to be</font>
-<a name="line349">349: </a><font color="#B22222">   allowed to set the solver type.</font>
+<a name="line347">347: </a><font color="#B22222">/*@C</font>
+<a name="line348">348: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a> - Sets a function to compute the error estimate</font>
+<a name="line349">349: </a><font color="#B22222">   used in the convergence test.</font>
 
-<a name="line351">351: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+<a name="line351">351: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
 
 <a name="line353">353: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line354">354: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line356">356: </a><font color="#B22222">   Notes:</font>
-<a name="line357">357: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line359">359: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line361">361: </a><font color="#B22222">.seealso:</font>
-<a name="line362">362: </a><font color="#B22222">@*/</font>
-<a name="line363">363: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line364">364: </a>{
-<a name="line365">365: </a>  PetscErrorCode   ierr;
-<a name="line366">366: </a>  char             type[256],monfilename[PETSC_MAX_PATH_LEN];
-<a name="line367">367: </a>  PetscBool        flg,val,flg1,flg2,flg3;
-<a name="line368">368: </a>  PetscInt         i,j,k;
-<a name="line369">369: </a>  PetscReal        r;
-<a name="line370">370: </a>  PetscViewer      monviewer;
-<a name="line371">371: </a>  SlepcConvMonitor ctx;
-
-<a name="line375">375: </a>  <a href="../../../docs/manualpages/SVD/SVDRegisterAll.html#SVDRegisterAll">SVDRegisterAll</a>();
-<a name="line376">376: </a>  PetscObjectOptionsBegin((PetscObject)svd);
-<a name="line377">377: </a>    PetscOptionsFList(<font color="#666666">"-svd_type"</font>,<font color="#666666">"Singular Value Solver method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>"</font>,SVDList,(char*)(((PetscObject)svd)->type_name?((PetscObject)svd)->type_name:SVDCROSS),type,256,&flg);
-<a name="line378">378: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line379">379: </a>      <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,type);
-<a name="line380">380: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!((PetscObject)svd)->type_name) {
-<a name="line381">381: </a>      <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,SVDCROSS);
-<a name="line382">382: </a>    }
-
-<a name="line384">384: </a>    PetscOptionsName(<font color="#666666">"-svd_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDView.html#SVDView">SVDView</a>"</font>,&flg);
-<a name="line385">385: </a>    PetscOptionsName(<font color="#666666">"-svd_view_vectors"</font>,<font color="#666666">"View computed singular vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>"</font>,0);
-<a name="line386">386: </a>    PetscOptionsName(<font color="#666666">"-svd_view_values"</font>,<font color="#666666">"View computed singular values"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>"</font>,0);
-<a name="line387">387: </a>    PetscOptionsName(<font color="#666666">"-svd_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>"</font>,0);
-<a name="line388">388: </a>    PetscOptionsName(<font color="#666666">"-svd_error_absolute"</font>,<font color="#666666">"Print absolute errors of each singular triplet"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>"</font>,0);
-<a name="line389">389: </a>    PetscOptionsName(<font color="#666666">"-svd_error_relative"</font>,<font color="#666666">"Print relative errors of each singular triplet"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>"</font>,0);
-
-<a name="line391">391: </a>    PetscOptionsBool(<font color="#666666">"-svd_implicittranspose"</font>,<font color="#666666">"Handle matrix transpose implicitly"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>"</font>,svd->impltrans,&val,&flg);
-<a name="line392">392: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line393">393: </a>      <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(svd,val);
-<a name="line394">394: </a>    }
-
-<a name="line396">396: </a>    i = svd->max_it? svd->max_it: PETSC_DEFAULT;
-<a name="line397">397: </a>    PetscOptionsInt(<font color="#666666">"-svd_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>"</font>,svd->max_it,&i,&flg1);
-<a name="line398">398: </a>    r = svd->tol;
-<a name="line399">399: </a>    PetscOptionsReal(<font color="#666666">"-svd_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>"</font>,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:svd->tol,&r,&flg2);
-<a name="line400">400: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line401">401: </a>      <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(svd,r,i);
-<a name="line402">402: </a>    }
-
-<a name="line404">404: </a>    i = svd->nsv;
-<a name="line405">405: </a>    PetscOptionsInt(<font color="#666666">"-svd_nsv"</font>,<font color="#666666">"Number of singular values to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>"</font>,svd->nsv,&i,&flg1);
-<a name="line406">406: </a>    j = svd->ncv? svd->ncv: PETSC_DEFAULT;
-<a name="line407">407: </a>    PetscOptionsInt(<font color="#666666">"-svd_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>"</font>,svd->ncv,&j,&flg2);
-<a name="line408">408: </a>    k = svd->mpd? svd->mpd: PETSC_DEFAULT;
-<a name="line409">409: </a>    PetscOptionsInt(<font color="#666666">"-svd_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>"</font>,svd->mpd,&k,&flg3);
-<a name="line410">410: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
-<a name="line411">411: </a>      <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>(svd,i,j,k);
-<a name="line412">412: </a>    }
-
-<a name="line414">414: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-svd_largest"</font>,<font color="#666666">"compute largest singular values"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>"</font>,&flg);
-<a name="line415">415: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(svd,SVD_LARGEST); }
-<a name="line416">416: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-svd_smallest"</font>,<font color="#666666">"compute smallest singular values"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>"</font>,&flg);
-<a name="line417">417: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(svd,SVD_SMALLEST); }
-
-<a name="line419">419: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
-<a name="line420">420: </a>    <font color="#B22222">/*</font>
-<a name="line421">421: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>()</font>
-<a name="line422">422: </a><font color="#B22222">    */</font>
-<a name="line423">423: </a>    flg = PETSC_FALSE;
-<a name="line424">424: </a>    PetscOptionsBool(<font color="#666666">"-svd_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>"</font>,flg,&flg,NULL);
-<a name="line425">425: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line426">426: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>(svd);
-<a name="line427">427: </a>    }
-
-<a name="line429">429: </a>    PetscOptionsString(<font color="#666666">"-svd_monitor_all"</font>,<font color="#666666">"Monitor approximate singular values and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line430">430: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line431">431: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)svd),monfilename,&monviewer);
-<a name="line432">432: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,<a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line433">433: </a>      <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(svd,PETSC_TRUE);
-<a name="line434">434: </a>    }
-<a name="line435">435: </a>    PetscOptionsString(<font color="#666666">"-svd_monitor_conv"</font>,<font color="#666666">"Monitor approximate singular values and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line436">436: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line437">437: </a>        PetscNew(&ctx);
-<a name="line438">438: </a>        PetscViewerASCIIOpen(PetscObjectComm((PetscObject)svd),monfilename,&ctx->viewer);
-<a name="line439">439: </a>        <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,<a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>,ctx,(PetscErrorCode (*)(void**))SlepcConvMonitorDestroy);
-<a name="line440">440: </a>    }
-<a name="line441">441: </a>    PetscOptionsString(<font color="#666666">"-svd_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate singular value and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,<font color="#666666">"stdout"</font>,monfilename,PETSC_MAX_PATH_LEN,&flg);
-<a name="line442">442: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line443">443: </a>      PetscViewerASCIIOpen(PetscObjectComm((PetscObject)svd),monfilename,&monviewer);
-<a name="line444">444: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,<a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);
-<a name="line445">445: </a>    }
-<a name="line446">446: </a>    flg = PETSC_FALSE;
-<a name="line447">447: </a>    PetscOptionsBool(<font color="#666666">"-svd_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate singular value and error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line448">448: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line449">449: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,SVDMonitorLG,NULL,NULL);
-<a name="line450">450: </a>    }
-<a name="line451">451: </a>    flg = PETSC_FALSE;
-<a name="line452">452: </a>    PetscOptionsBool(<font color="#666666">"-svd_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,flg,&flg,NULL);
-<a name="line453">453: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line454">454: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,SVDMonitorLGAll,NULL,NULL);
-<a name="line455">455: </a>      <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(svd,PETSC_TRUE);
-<a name="line456">456: </a>    }
-
-<a name="line458">458: </a>    <font color="#4169E1">if</font> (svd->ops->setfromoptions) {
-<a name="line459">459: </a>      (*svd->ops->setfromoptions)(PetscOptionsObject,svd);
-<a name="line460">460: </a>    }
-<a name="line461">461: </a>    PetscObjectProcessOptionsHandlers((PetscObject)svd);
-<a name="line462">462: </a>  PetscOptionsEnd();
-
-<a name="line464">464: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,&svd->U); }
-<a name="line465">465: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(svd->V);
-<a name="line466">466: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(svd->U);
-<a name="line467">467: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
-<a name="line468">468: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(svd->ds);
-<a name="line469">469: </a>  PetscRandomSetFromOptions(svd->rand);
-<a name="line470">470: </a>  <font color="#4169E1">return</font>(0);
-<a name="line471">471: </a>}
-
-<a name="line475">475: </a><font color="#B22222">/*@</font>
-<a name="line476">476: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a> - Specifies if the solver must compute the residual norm of all</font>
-<a name="line477">477: </a><font color="#B22222">   approximate singular value or not.</font>
-
-<a name="line479">479: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line481">481: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line482">482: </a><font color="#B22222">+  svd      - the singular value solver context</font>
-<a name="line483">483: </a><font color="#B22222">-  trackall - whether to compute all residuals or not</font>
-
-<a name="line485">485: </a><font color="#B22222">   Notes:</font>
-<a name="line486">486: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver computes (or estimates)</font>
-<a name="line487">487: </a><font color="#B22222">   the residual norm for each singular value approximation. Computing the residual is</font>
-<a name="line488">488: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute only the residual</font>
-<a name="line489">489: </a><font color="#B22222">   associated to the first unconverged singular value.</font>
-
-<a name="line491">491: </a><font color="#B22222">   The options '-svd_monitor_all' and '-svd_monitor_lg_all' automatically</font>
-<a name="line492">492: </a><font color="#B22222">   activate this option.</font>
-
-<a name="line494">494: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line496">496: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>()</font>
-<a name="line497">497: </a><font color="#B22222">@*/</font>
-<a name="line498">498: </a><strong><font color="#4169E1"><a name="SVDSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool trackall)</font></strong>
-<a name="line499">499: </a>{
-<a name="line503">503: </a>  svd->trackall = trackall;
-<a name="line504">504: </a>  <font color="#4169E1">return</font>(0);
-<a name="line505">505: </a>}
-
-<a name="line509">509: </a><font color="#B22222">/*@</font>
-<a name="line510">510: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
-<a name="line511">511: </a><font color="#B22222">   be computed or not.</font>
-
-<a name="line513">513: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line515">515: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line516">516: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line518">518: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line519">519: </a><font color="#B22222">.  trackall - the returned flag</font>
-
-<a name="line521">521: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line523">523: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>()</font>
-<a name="line524">524: </a><font color="#B22222">@*/</font>
-<a name="line525">525: </a><strong><font color="#4169E1"><a name="SVDGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *trackall)</font></strong>
-<a name="line526">526: </a>{
-<a name="line530">530: </a>  *trackall = svd->trackall;
-<a name="line531">531: </a>  <font color="#4169E1">return</font>(0);
-<a name="line532">532: </a>}
-
-
-<a name="line537">537: </a><font color="#B22222">/*@C</font>
-<a name="line538">538: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line539">539: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options in the database.</font>
-
-<a name="line541">541: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line543">543: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line544">544: </a><font color="#B22222">+  svd - the singular value solver context</font>
-<a name="line545">545: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> option requests</font>
-
-<a name="line547">547: </a><font color="#B22222">   Notes:</font>
-<a name="line548">548: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line549">549: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line550">550: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line552">552: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
-<a name="line553">553: </a><font color="#B22222">   different <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> contexts, one could call</font>
-<a name="line554">554: </a><font color="#B22222">.vb</font>
-<a name="line555">555: </a><font color="#B22222">      <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(svd1,"svd1_")</font>
-<a name="line556">556: </a><font color="#B22222">      <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(svd2,"svd2_")</font>
-<a name="line557">557: </a><font color="#B22222">.ve</font>
-
-<a name="line559">559: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line561">561: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>()</font>
-<a name="line562">562: </a><font color="#B22222">@*/</font>
-<a name="line563">563: </a><strong><font color="#4169E1"><a name="SVDSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char *prefix)</font></strong>
-<a name="line564">564: </a>{
-<a name="line566">566: </a>  PetscBool      flg1,flg2;
-<a name="line567">567: </a>  <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
-
-<a name="line571">571: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,&svd->U); }
-<a name="line572">572: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->V,prefix);
-<a name="line573">573: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->U,prefix);
-<a name="line574">574: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
-<a name="line575">575: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(svd->ds,prefix);
-<a name="line576">576: </a>  PetscObjectSetOptionsPrefix((PetscObject)svd,prefix);
-<a name="line577">577: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCROSS,&flg1);
-<a name="line578">578: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCYCLIC,&flg2);
-<a name="line579">579: </a>  <font color="#4169E1">if</font> (flg1) {
-<a name="line580">580: </a>    <a href="../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&eps);
-<a name="line581">581: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (flg2) {
-<a name="line582">582: </a>      <a href="../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&eps);
-<a name="line583">583: </a>  }
-<a name="line584">584: </a>  <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line585">585: </a>    <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps,prefix);
-<a name="line586">586: </a>    <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(eps,<font color="#666666">"svd_"</font>);
-<a name="line587">587: </a>  }
-<a name="line588">588: </a>  <font color="#4169E1">return</font>(0);
-<a name="line589">589: </a>}
-
-<a name="line593">593: </a><font color="#B22222">/*@C</font>
-<a name="line594">594: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line595">595: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options in the database.</font>
-
-<a name="line597">597: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line599">599: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line600">600: </a><font color="#B22222">+  svd - the singular value solver context</font>
-<a name="line601">601: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> option requests</font>
-
-<a name="line603">603: </a><font color="#B22222">   Notes:</font>
-<a name="line604">604: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line605">605: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
-
-<a name="line607">607: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line609">609: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>()</font>
-<a name="line610">610: </a><font color="#B22222">@*/</font>
-<a name="line611">611: </a><strong><font color="#4169E1"><a name="SVDAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char *prefix)</font></strong>
-<a name="line612">612: </a>{
-<a name="line614">614: </a>  PetscBool      flg1,flg2;
-<a name="line615">615: </a>  <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
-
-<a name="line619">619: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,&svd->U); }
-<a name="line620">620: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->V,prefix);
-<a name="line621">621: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->U,prefix);
-<a name="line622">622: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
-<a name="line623">623: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(svd->ds,prefix);
-<a name="line624">624: </a>  PetscObjectAppendOptionsPrefix((PetscObject)svd,prefix);
-<a name="line625">625: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCROSS,&flg1);
-<a name="line626">626: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCYCLIC,&flg2);
-<a name="line627">627: </a>  <font color="#4169E1">if</font> (flg1) {
-<a name="line628">628: </a>    <a href="../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&eps);
-<a name="line629">629: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (flg2) {
-<a name="line630">630: </a>    <a href="../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&eps);
-<a name="line631">631: </a>  }
-<a name="line632">632: </a>  <font color="#4169E1">if</font> (flg1 || flg2) {
-<a name="line633">633: </a>    <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps,((PetscObject)svd)->prefix);
-<a name="line634">634: </a>    <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(eps,<font color="#666666">"svd_"</font>);
-<a name="line635">635: </a>  }
-<a name="line636">636: </a>  <font color="#4169E1">return</font>(0);
-<a name="line637">637: </a>}
-
-<a name="line641">641: </a><font color="#B22222">/*@C</font>
-<a name="line642">642: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line643">643: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options in the database.</font>
-
-<a name="line645">645: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line647">647: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line648">648: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line650">650: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line651">651: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
-
-<a name="line653">653: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line654">654: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
-
-<a name="line656">656: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line658">658: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>()</font>
-<a name="line659">659: </a><font color="#B22222">@*/</font>
-<a name="line660">660: </a><strong><font color="#4169E1"><a name="SVDGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char *prefix[])</font></strong>
-<a name="line661">661: </a>{
-
-<a name="line667">667: </a>  PetscObjectGetOptionsPrefix((PetscObject)svd,prefix);
-<a name="line668">668: </a>  <font color="#4169E1">return</font>(0);
-<a name="line669">669: </a>}
+<a name="line354">354: </a><font color="#B22222">+  svd     - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line355">355: </a><font color="#B22222">.  func    - a pointer to the convergence test function</font>
+<a name="line356">356: </a><font color="#B22222">.  ctx     - context for private data for the convergence routine (may be null)</font>
+<a name="line357">357: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line359">359: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line360">360: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscReal sigma,PetscReal res,PetscReal *errest,void *ctx)</font>
+
+<a name="line362">362: </a><font color="#B22222">+   svd    - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line363">363: </a><font color="#B22222">.   sigma  - computed singular value</font>
+<a name="line364">364: </a><font color="#B22222">.   res    - residual norm associated to the singular triplet</font>
+<a name="line365">365: </a><font color="#B22222">.   errest - (output) computed error estimate</font>
+<a name="line366">366: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a>()</font>
+
+<a name="line368">368: </a><font color="#B22222">   Note:</font>
+<a name="line369">369: </a><font color="#B22222">   If the error estimate returned by the convergence test function is less than</font>
+<a name="line370">370: </a><font color="#B22222">   the tolerance, then the singular value is accepted as converged.</font>
+
+<a name="line372">372: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line374">374: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(), <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>()</font>
+<a name="line375">375: </a><font color="#B22222">@*/</font>
+<a name="line376">376: </a><strong><font color="#4169E1"><a name="SVDSetConvergenceTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscErrorCode (*func)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscReal,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))</font> [...]
+<a name="line377">377: </a>{
+
+<a name="line382">382: </a>  <font color="#4169E1">if</font> (svd->convergeddestroy) {
+<a name="line383">383: </a>    (*svd->convergeddestroy)(svd->convergedctx);
+<a name="line384">384: </a>  }
+<a name="line385">385: </a>  svd->converged        = func;
+<a name="line386">386: </a>  svd->convergeddestroy = destroy;
+<a name="line387">387: </a>  svd->convergedctx     = ctx;
+<a name="line388">388: </a>  <font color="#4169E1">if</font> (func == SVDConvergedRelative) svd->conv = SVD_CONV_REL;
+<a name="line389">389: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (func == SVDConvergedAbsolute) svd->conv = SVD_CONV_ABS;
+<a name="line390">390: </a>  <font color="#4169E1">else</font> svd->conv = SVD_CONV_USER;
+<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
+<a name="line392">392: </a>}
+
+<a name="line396">396: </a><font color="#B22222">/*@</font>
+<a name="line397">397: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a> - Specifies how to compute the error estimate</font>
+<a name="line398">398: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line400">400: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line402">402: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line403">403: </a><font color="#B22222">+  svd  - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line404">404: </a><font color="#B22222">-  conv - the type of convergence test</font>
+
+<a name="line406">406: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line407">407: </a><font color="#B22222">+  -svd_conv_abs  - Sets the absolute convergence test</font>
+<a name="line408">408: </a><font color="#B22222">.  -svd_conv_rel  - Sets the convergence test relative to the singular value</font>
+<a name="line409">409: </a><font color="#B22222">-  -svd_conv_user - Selects the user-defined convergence test</font>
+
+<a name="line411">411: </a><font color="#B22222">   Note:</font>
+<a name="line412">412: </a><font color="#B22222">   The parameter 'conv' can have one of these values</font>
+<a name="line413">413: </a><font color="#B22222">+     SVD_CONV_ABS  - absolute error ||r||</font>
+<a name="line414">414: </a><font color="#B22222">.     SVD_CONV_REL  - error relative to the singular value l, ||r||/sigma</font>
+<a name="line415">415: </a><font color="#B22222">-     SVD_CONV_USER - function set by <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a>()</font>
+
+<a name="line417">417: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line419">419: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetConvergenceTest.html#SVDGetConvergenceTest">SVDGetConvergenceTest</a>(), <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTestFunction.html#SVDSetConvergenceTestFunction">SVDSetConvergenceTestFunction</a>(), <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(), <a href="../../../docs/manualpages/SVD/SVDConv.html#SVDConv">SVD [...]
+<a name="line420">420: </a><font color="#B22222">@*/</font>
+<a name="line421">421: </a><strong><font color="#4169E1"><a name="SVDSetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a> conv)</font></strong>
+<a name="line422">422: </a>{
+<a name="line426">426: </a>  <font color="#4169E1">switch</font> (conv) {
+<a name="line427">427: </a>    <font color="#4169E1">case</font> SVD_CONV_ABS:  svd->converged = SVDConvergedAbsolute; <font color="#4169E1">break</font>;
+<a name="line428">428: </a>    <font color="#4169E1">case</font> SVD_CONV_REL:  svd->converged = SVDConvergedRelative; <font color="#4169E1">break</font>;
+<a name="line429">429: </a>    <font color="#4169E1">case</font> SVD_CONV_USER: <font color="#4169E1">break</font>;
+<a name="line430">430: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line431">431: </a>      SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'conv' value"</font>);
+<a name="line432">432: </a>  }
+<a name="line433">433: </a>  svd->conv = conv;
+<a name="line434">434: </a>  <font color="#4169E1">return</font>(0);
+<a name="line435">435: </a>}
+
+<a name="line439">439: </a><font color="#B22222">/*@</font>
+<a name="line440">440: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetConvergenceTest.html#SVDGetConvergenceTest">SVDGetConvergenceTest</a> - Gets the method used to compute the error estimate</font>
+<a name="line441">441: </a><font color="#B22222">   used in the convergence test.</font>
+
+<a name="line443">443: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line445">445: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line446">446: </a><font color="#B22222">.  svd   - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line448">448: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line449">449: </a><font color="#B22222">.  conv  - the type of convergence test</font>
+
+<a name="line451">451: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line453">453: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(), <a href="../../../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a></font>
+<a name="line454">454: </a><font color="#B22222">@*/</font>
+<a name="line455">455: </a><strong><font color="#4169E1"><a name="SVDGetConvergenceTest"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetConvergenceTest.html#SVDGetConvergenceTest">SVDGetConvergenceTest</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDConv.html#SVDConv">SVDConv</a> *conv)</font></strong>
+<a name="line456">456: </a>{
+<a name="line460">460: </a>  *conv = svd->conv;
+<a name="line461">461: </a>  <font color="#4169E1">return</font>(0);
+<a name="line462">462: </a>}
+
+<a name="line466">466: </a><font color="#B22222">/*@C</font>
+<a name="line467">467: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a> - Sets a function to decide when to stop the outer</font>
+<a name="line468">468: </a><font color="#B22222">   iteration of the singular value solver.</font>
+
+<a name="line470">470: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line472">472: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line473">473: </a><font color="#B22222">+  svd     - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line474">474: </a><font color="#B22222">.  func    - pointer to the stopping test function</font>
+<a name="line475">475: </a><font color="#B22222">.  ctx     - context for private data for the stopping routine (may be null)</font>
+<a name="line476">476: </a><font color="#B22222">-  destroy - a routine for destroying the context (may be null)</font>
+
+<a name="line478">478: </a><font color="#B22222">   Calling Sequence of func:</font>
+<a name="line479">479: </a><font color="#B22222">$   func(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> *reason,void *ctx)</font>
+
+<a name="line481">481: </a><font color="#B22222">+   svd    - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line482">482: </a><font color="#B22222">.   its    - current number of iterations</font>
+<a name="line483">483: </a><font color="#B22222">.   max_it - maximum number of iterations</font>
+<a name="line484">484: </a><font color="#B22222">.   nconv  - number of currently converged singular triplets</font>
+<a name="line485">485: </a><font color="#B22222">.   nsv    - number of requested singular triplets</font>
+<a name="line486">486: </a><font color="#B22222">.   reason - (output) result of the stopping test</font>
+<a name="line487">487: </a><font color="#B22222">-   ctx    - optional context, as set by <a href="../../../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a>()</font>
+
+<a name="line489">489: </a><font color="#B22222">   Note:</font>
+<a name="line490">490: </a><font color="#B22222">   Normal usage is to first call the default routine <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>() and then</font>
+<a name="line491">491: </a><font color="#B22222">   set reason to SVD_CONVERGED_USER if some user-defined conditions have been</font>
+<a name="line492">492: </a><font color="#B22222">   met. To let the singular value solver continue iterating, the result must be</font>
+<a name="line493">493: </a><font color="#B22222">   left as SVD_CONVERGED_ITERATING.</font>
+
+<a name="line495">495: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line497">497: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(), <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>()</font>
+<a name="line498">498: </a><font color="#B22222">@*/</font>
+<a name="line499">499: </a><strong><font color="#4169E1"><a name="SVDSetStoppingTestFunction"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscErrorCode (*func)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscInt,PetscInt,<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#S [...]
+<a name="line500">500: </a>{
+
+<a name="line505">505: </a>  <font color="#4169E1">if</font> (svd->stoppingdestroy) {
+<a name="line506">506: </a>    (*svd->stoppingdestroy)(svd->stoppingctx);
+<a name="line507">507: </a>  }
+<a name="line508">508: </a>  svd->stopping        = func;
+<a name="line509">509: </a>  svd->stoppingdestroy = destroy;
+<a name="line510">510: </a>  svd->stoppingctx     = ctx;
+<a name="line511">511: </a>  <font color="#4169E1">if</font> (func == <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>) svd->stop = SVD_STOP_BASIC;
+<a name="line512">512: </a>  <font color="#4169E1">else</font> svd->stop = SVD_STOP_USER;
+<a name="line513">513: </a>  <font color="#4169E1">return</font>(0);
+<a name="line514">514: </a>}
+
+<a name="line518">518: </a><font color="#B22222">/*@</font>
+<a name="line519">519: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a> - Specifies how to decide the termination of the outer</font>
+<a name="line520">520: </a><font color="#B22222">   loop of the singular value solver.</font>
+
+<a name="line522">522: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line524">524: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line525">525: </a><font color="#B22222">+  svd  - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+<a name="line526">526: </a><font color="#B22222">-  stop - the type of stopping test</font>
+
+<a name="line528">528: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line529">529: </a><font color="#B22222">+  -svd_stop_basic - Sets the default stopping test</font>
+<a name="line530">530: </a><font color="#B22222">-  -svd_stop_user  - Selects the user-defined stopping test</font>
+
+<a name="line532">532: </a><font color="#B22222">   Note:</font>
+<a name="line533">533: </a><font color="#B22222">   The parameter 'stop' can have one of these values</font>
+<a name="line534">534: </a><font color="#B22222">+     SVD_STOP_BASIC - default stopping test</font>
+<a name="line535">535: </a><font color="#B22222">-     SVD_STOP_USER  - function set by <a href="../../../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a>()</font>
+
+<a name="line537">537: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line539">539: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetStoppingTest.html#SVDGetStoppingTest">SVDGetStoppingTest</a>(), <a href="../../../docs/manualpages/SVD/SVDSetStoppingTestFunction.html#SVDSetStoppingTestFunction">SVDSetStoppingTestFunction</a>(), <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(), <a href="../../../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a></font>
+<a name="line540">540: </a><font color="#B22222">@*/</font>
+<a name="line541">541: </a><strong><font color="#4169E1"><a name="SVDSetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a> stop)</font></strong>
+<a name="line542">542: </a>{
+<a name="line546">546: </a>  <font color="#4169E1">switch</font> (stop) {
+<a name="line547">547: </a>    <font color="#4169E1">case</font> SVD_STOP_BASIC: svd->stopping = <a href="../../../docs/manualpages/SVD/SVDStoppingBasic.html#SVDStoppingBasic">SVDStoppingBasic</a>; <font color="#4169E1">break</font>;
+<a name="line548">548: </a>    <font color="#4169E1">case</font> SVD_STOP_USER:  <font color="#4169E1">break</font>;
+<a name="line549">549: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line550">550: </a>      SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid 'stop' value"</font>);
+<a name="line551">551: </a>  }
+<a name="line552">552: </a>  svd->stop = stop;
+<a name="line553">553: </a>  <font color="#4169E1">return</font>(0);
+<a name="line554">554: </a>}
+
+<a name="line558">558: </a><font color="#B22222">/*@</font>
+<a name="line559">559: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetStoppingTest.html#SVDGetStoppingTest">SVDGetStoppingTest</a> - Gets the method used to decide the termination of the outer</font>
+<a name="line560">560: </a><font color="#B22222">   loop of the singular value solver.</font>
+
+<a name="line562">562: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line564">564: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line565">565: </a><font color="#B22222">.  svd   - singular value solver context obtained from <a href="../../../docs/manualpages/SVD/SVDCreate.html#SVDCreate">SVDCreate</a>()</font>
+
+<a name="line567">567: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line568">568: </a><font color="#B22222">.  stop  - the type of stopping test</font>
+
+<a name="line570">570: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line572">572: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(), <a href="../../../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a></font>
+<a name="line573">573: </a><font color="#B22222">@*/</font>
+<a name="line574">574: </a><strong><font color="#4169E1"><a name="SVDGetStoppingTest"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetStoppingTest.html#SVDGetStoppingTest">SVDGetStoppingTest</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDStop.html#SVDStop">SVDStop</a> *stop)</font></strong>
+<a name="line575">575: </a>{
+<a name="line579">579: </a>  *stop = svd->stop;
+<a name="line580">580: </a>  <font color="#4169E1">return</font>(0);
+<a name="line581">581: </a>}
+
+<a name="line585">585: </a><font color="#B22222">/*@C</font>
+<a name="line586">586: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line587">587: </a><font color="#B22222">   indicated by the user.</font>
+
+<a name="line589">589: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line591">591: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line592">592: </a><font color="#B22222">+  svd      - the singular value solver context</font>
+<a name="line593">593: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line594">594: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line595">595: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line596">596: </a><font color="#B22222">.  monitor  - the monitor function, whose context is a PetscViewerAndFormat</font>
+<a name="line597">597: </a><font color="#B22222">-  trackall - whether this monitor tracks all singular values or not</font>
+
+<a name="line599">599: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line601">601: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(), <a href="../../../docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html#SVDConvMonitorSetFromOptions">SVDConvMonitorSetFromOptions</a>()</font>
+<a name="line602">602: </a><font color="#B22222">@*/</font>
+<a name="line603">603: </a><strong><font color="#4169E1"><a name="SVDMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt, [...]
+<a name="line604">604: </a>{
+<a name="line605">605: </a>  PetscErrorCode       ierr;
+<a name="line606">606: </a>  PetscBool            flg;
+<a name="line607">607: </a>  PetscViewer          viewer;
+<a name="line608">608: </a>  PetscViewerFormat    format;
+<a name="line609">609: </a>  PetscViewerAndFormat *vf;
+
+<a name="line612">612: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,name,&viewer,&format,&flg);
+<a name="line613">613: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line614">614: </a>    PetscViewerAndFormatCreate(viewer,format,&vf);
+<a name="line615">615: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line616">616: </a>    <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,(PetscErrorCode (*)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);
+<a name="line617">617: </a>    <font color="#4169E1">if</font> (trackall) {
+<a name="line618">618: </a>      <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(svd,PETSC_TRUE);
+<a name="line619">619: </a>    }
+<a name="line620">620: </a>  }
+<a name="line621">621: </a>  <font color="#4169E1">return</font>(0);
+<a name="line622">622: </a>}
+
+<a name="line626">626: </a><font color="#B22222">/*@C</font>
+<a name="line627">627: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html#SVDConvMonitorSetFromOptions">SVDConvMonitorSetFromOptions</a> - Sets a monitor function and viewer appropriate for the type</font>
+<a name="line628">628: </a><font color="#B22222">   indicated by the user (for monitors that only show iteration numbers of convergence).</font>
+
+<a name="line630">630: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line632">632: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line633">633: </a><font color="#B22222">+  svd      - the singular value solver context</font>
+<a name="line634">634: </a><font color="#B22222">.  name     - the monitor option name</font>
+<a name="line635">635: </a><font color="#B22222">.  help     - message indicating what monitoring is done</font>
+<a name="line636">636: </a><font color="#B22222">.  manual   - manual page for the monitor</font>
+<a name="line637">637: </a><font color="#B22222">-  monitor  - the monitor function, whose context is a SlepcConvMonitor</font>
+
+<a name="line639">639: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line641">641: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(), <a href="../../../docs/manualpages/SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</a>()</font>
+<a name="line642">642: </a><font color="#B22222">@*/</font>
+<a name="line643">643: </a><strong><font color="#4169E1"><a name="SVDConvMonitorSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html#SVDConvMonitorSetFromOptions">SVDConvMonitorSetFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char name[],const char help[],const char manual[],PetscErrorCode (*monitor)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,Pets [...]
+<a name="line644">644: </a>{
+<a name="line645">645: </a>  PetscErrorCode    ierr;
+<a name="line646">646: </a>  PetscBool         flg;
+<a name="line647">647: </a>  PetscViewer       viewer;
+<a name="line648">648: </a>  PetscViewerFormat format;
+<a name="line649">649: </a>  SlepcConvMonitor  ctx;
+
+<a name="line652">652: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,name,&viewer,&format,&flg);
+<a name="line653">653: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line654">654: </a>    <a href="../../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(viewer,format,&ctx);
+<a name="line655">655: </a>    PetscObjectDereference((PetscObject)viewer);
+<a name="line656">656: </a>    <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,(PetscErrorCode (*)(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*))monitor,ctx,(PetscErrorCode (*)(void**))<a href="../../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>);
+<a name="line657">657: </a>  }
+<a name="line658">658: </a>  <font color="#4169E1">return</font>(0);
+<a name="line659">659: </a>}
+
+<a name="line663">663: </a><font color="#B22222">/*@</font>
+<a name="line664">664: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a> - Sets <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options from the options database.</font>
+<a name="line665">665: </a><font color="#B22222">   This routine must be called before <a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>() if the user is to be</font>
+<a name="line666">666: </a><font color="#B22222">   allowed to set the solver type.</font>
+
+<a name="line668">668: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line670">670: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line671">671: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line673">673: </a><font color="#B22222">   Notes:</font>
+<a name="line674">674: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line676">676: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line678">678: </a><font color="#B22222">.seealso:</font>
+<a name="line679">679: </a><font color="#B22222">@*/</font>
+<a name="line680">680: </a><strong><font color="#4169E1"><a name="SVDSetFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line681">681: </a>{
+<a name="line683">683: </a>  char           type[256];
+<a name="line684">684: </a>  PetscBool      set,flg,val,flg1,flg2,flg3;
+<a name="line685">685: </a>  PetscInt       i,j,k;
+<a name="line686">686: </a>  PetscReal      r;
+<a name="line687">687: </a>  PetscDrawLG    lg;
+
+<a name="line691">691: </a>  <a href="../../../docs/manualpages/SVD/SVDRegisterAll.html#SVDRegisterAll">SVDRegisterAll</a>();
+<a name="line692">692: </a>  PetscObjectOptionsBegin((PetscObject)svd);
+<a name="line693">693: </a>    PetscOptionsFList(<font color="#666666">"-svd_type"</font>,<font color="#666666">"Singular Value Solver method"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>"</font>,SVDList,(char*)(((PetscObject)svd)->type_name?((PetscObject)svd)->type_name:SVDCROSS),type,256,&flg);
+<a name="line694">694: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line695">695: </a>      <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,type);
+<a name="line696">696: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!((PetscObject)svd)->type_name) {
+<a name="line697">697: </a>      <a href="../../../docs/manualpages/SVD/SVDSetType.html#SVDSetType">SVDSetType</a>(svd,SVDCROSS);
+<a name="line698">698: </a>    }
+
+<a name="line700">700: </a>    PetscOptionsName(<font color="#666666">"-svd_view"</font>,<font color="#666666">"Print detailed information on solver used"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDView.html#SVDView">SVDView</a>"</font>,NULL);
+<a name="line701">701: </a>    PetscOptionsName(<font color="#666666">"-svd_view_vectors"</font>,<font color="#666666">"View computed singular vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>"</font>,NULL);
+<a name="line702">702: </a>    PetscOptionsName(<font color="#666666">"-svd_view_values"</font>,<font color="#666666">"View computed singular values"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>"</font>,NULL);
+<a name="line703">703: </a>    PetscOptionsName(<font color="#666666">"-svd_converged_reason"</font>,<font color="#666666">"Print reason for convergence, and number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>"</font>,NULL);
+<a name="line704">704: </a>    PetscOptionsName(<font color="#666666">"-svd_error_absolute"</font>,<font color="#666666">"Print absolute errors of each singular triplet"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>"</font>,NULL);
+<a name="line705">705: </a>    PetscOptionsName(<font color="#666666">"-svd_error_relative"</font>,<font color="#666666">"Print relative errors of each singular triplet"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>"</font>,NULL);
+
+<a name="line707">707: </a>    PetscOptionsBool(<font color="#666666">"-svd_implicittranspose"</font>,<font color="#666666">"Handle matrix transpose implicitly"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>"</font>,svd->impltrans,&val,&flg);
+<a name="line708">708: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line709">709: </a>      <a href="../../../docs/manualpages/SVD/SVDSetImplicitTranspose.html#SVDSetImplicitTranspose">SVDSetImplicitTranspose</a>(svd,val);
+<a name="line710">710: </a>    }
+
+<a name="line712">712: </a>    i = svd->max_it? svd->max_it: PETSC_DEFAULT;
+<a name="line713">713: </a>    PetscOptionsInt(<font color="#666666">"-svd_max_it"</font>,<font color="#666666">"Maximum number of iterations"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>"</font>,svd->max_it,&i,&flg1);
+<a name="line714">714: </a>    r = svd->tol;
+<a name="line715">715: </a>    PetscOptionsReal(<font color="#666666">"-svd_tol"</font>,<font color="#666666">"Tolerance"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>"</font>,svd->tol==PETSC_DEFAULT?SLEPC_DEFAULT_TOL:svd->tol,&r,&flg2);
+<a name="line716">716: </a>    <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line717">717: </a>      <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(svd,r,i);
+<a name="line718">718: </a>    }
+
+<a name="line720">720: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-svd_conv_rel"</font>,<font color="#666666">"Relative error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>"</font>,&flg);
+<a name="line721">721: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(svd,SVD_CONV_REL); }
+<a name="line722">722: </a>    PetscOptionsBoolGroup(<font color="#666666">"-svd_conv_abs"</font>,<font color="#666666">"Absolute error convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>"</font>,&flg);
+<a name="line723">723: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(svd,SVD_CONV_ABS); }
+<a name="line724">724: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-svd_conv_user"</font>,<font color="#666666">"User-defined convergence test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>"</font>,&flg);
+<a name="line725">725: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetConvergenceTest.html#SVDSetConvergenceTest">SVDSetConvergenceTest</a>(svd,SVD_CONV_USER); }
+
+<a name="line727">727: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-svd_stop_basic"</font>,<font color="#666666">"Stop iteration if all singular values converged or max_it reached"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>"</font>,&flg);
+<a name="line728">728: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(svd,SVD_STOP_BASIC); }
+<a name="line729">729: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-svd_stop_user"</font>,<font color="#666666">"User-defined stopping test"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>"</font>,&flg);
+<a name="line730">730: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetStoppingTest.html#SVDSetStoppingTest">SVDSetStoppingTest</a>(svd,SVD_STOP_USER); }
+
+<a name="line732">732: </a>    i = svd->nsv;
+<a name="line733">733: </a>    PetscOptionsInt(<font color="#666666">"-svd_nsv"</font>,<font color="#666666">"Number of singular values to compute"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>"</font>,svd->nsv,&i,&flg1);
+<a name="line734">734: </a>    j = svd->ncv? svd->ncv: PETSC_DEFAULT;
+<a name="line735">735: </a>    PetscOptionsInt(<font color="#666666">"-svd_ncv"</font>,<font color="#666666">"Number of basis vectors"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>"</font>,svd->ncv,&j,&flg2);
+<a name="line736">736: </a>    k = svd->mpd? svd->mpd: PETSC_DEFAULT;
+<a name="line737">737: </a>    PetscOptionsInt(<font color="#666666">"-svd_mpd"</font>,<font color="#666666">"Maximum dimension of projected problem"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>"</font>,svd->mpd,&k,&flg3);
+<a name="line738">738: </a>    <font color="#4169E1">if</font> (flg1 || flg2 || flg3) {
+<a name="line739">739: </a>      <a href="../../../docs/manualpages/SVD/SVDSetDimensions.html#SVDSetDimensions">SVDSetDimensions</a>(svd,i,j,k);
+<a name="line740">740: </a>    }
+
+<a name="line742">742: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-svd_largest"</font>,<font color="#666666">"compute largest singular values"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>"</font>,&flg);
+<a name="line743">743: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(svd,SVD_LARGEST); }
+<a name="line744">744: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-svd_smallest"</font>,<font color="#666666">"compute smallest singular values"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>"</font>,&flg);
+<a name="line745">745: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>(svd,SVD_SMALLEST); }
+
+<a name="line747">747: </a>    <font color="#B22222">/* -----------------------------------------------------------------------*/</font>
+<a name="line748">748: </a>    <font color="#B22222">/*</font>
+<a name="line749">749: </a><font color="#B22222">      Cancels all monitors hardwired into code before call to <a href="../../../docs/manualpages/SVD/SVDSetFromOptions.html#SVDSetFromOptions">SVDSetFromOptions</a>()</font>
+<a name="line750">750: </a><font color="#B22222">    */</font>
+<a name="line751">751: </a>    PetscOptionsBool(<font color="#666666">"-svd_monitor_cancel"</font>,<font color="#666666">"Remove any hardwired monitor routines"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line752">752: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line753">753: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorCancel.html#SVDMonitorCancel">SVDMonitorCancel</a>(svd);
+<a name="line754">754: </a>    }
+<a name="line755">755: </a>    <font color="#B22222">/*</font>
+<a name="line756">756: </a><font color="#B22222">      Text monitors</font>
+<a name="line757">757: </a><font color="#B22222">    */</font>
+<a name="line758">758: </a>    <a href="../../../docs/manualpages/SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</a>(svd,<font color="#666666">"-svd_monitor"</font>,<font color="#666666">"Monitor first unconverged approximate singular value and error estimate"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorFirst.html#SVDMonitorFirst">SVDMonitorFirst</a>"</font>,<a href="../../../docs/manualpages/SVD/SVDMonitorFirst.htm [...]
+<a name="line759">759: </a>    <a href="../../../docs/manualpages/SVD/SVDConvMonitorSetFromOptions.html#SVDConvMonitorSetFromOptions">SVDConvMonitorSetFromOptions</a>(svd,<font color="#666666">"-svd_monitor_conv"</font>,<font color="#666666">"Monitor approximate singular values and error estimates as they converge"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorConverged.html#SVDMonitorConverged">SVDMonitorConverged</a>"</font>,<a href="../../../docs/manua [...]
+<a name="line760">760: </a>    <a href="../../../docs/manualpages/SVD/SVDMonitorSetFromOptions.html#SVDMonitorSetFromOptions">SVDMonitorSetFromOptions</a>(svd,<font color="#666666">"-svd_monitor_all"</font>,<font color="#666666">"Monitor approximate singular values and error estimates"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVDMonitorAll</a>"</font>,<a href="../../../docs/manualpages/SVD/SVDMonitorAll.html#SVDMonitorAll">SVD [...]
+<a name="line761">761: </a>    <font color="#B22222">/*</font>
+<a name="line762">762: </a><font color="#B22222">      Line graph monitors</font>
+<a name="line763">763: </a><font color="#B22222">    */</font>
+<a name="line764">764: </a>    PetscOptionsBool(<font color="#666666">"-svd_monitor_lg"</font>,<font color="#666666">"Monitor first unconverged approximate singular value and error estimate graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line765">765: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line766">766: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorLGCreate.html#SVDMonitorLGCreate">SVDMonitorLGCreate</a>(PetscObjectComm((PetscObject)svd),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line767">767: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,SVDMonitorLG,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line768">768: </a>    }
+<a name="line769">769: </a>    PetscOptionsBool(<font color="#666666">"-svd_monitor_lg_all"</font>,<font color="#666666">"Monitor error estimates graphically"</font>,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>"</font>,PETSC_FALSE,&flg,&set);
+<a name="line770">770: </a>    <font color="#4169E1">if</font> (set && flg) {
+<a name="line771">771: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorLGCreate.html#SVDMonitorLGCreate">SVDMonitorLGCreate</a>(PetscObjectComm((PetscObject)svd),NULL,<font color="#666666">"Error estimates"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&lg);
+<a name="line772">772: </a>      <a href="../../../docs/manualpages/SVD/SVDMonitorSet.html#SVDMonitorSet">SVDMonitorSet</a>(svd,SVDMonitorLGAll,lg,(PetscErrorCode (*)(void**))PetscDrawLGDestroy);
+<a name="line773">773: </a>      <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(svd,PETSC_TRUE);
+<a name="line774">774: </a>    }
+
+<a name="line776">776: </a>    <font color="#4169E1">if</font> (svd->ops->setfromoptions) {
+<a name="line777">777: </a>      (*svd->ops->setfromoptions)(PetscOptionsObject,svd);
+<a name="line778">778: </a>    }
+<a name="line779">779: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)svd);
+<a name="line780">780: </a>  PetscOptionsEnd();
+
+<a name="line782">782: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,&svd->U); }
+<a name="line783">783: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(svd->V);
+<a name="line784">784: </a>  <a href="../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(svd->U);
+<a name="line785">785: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
+<a name="line786">786: </a>  <a href="../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(svd->ds);
+<a name="line787">787: </a>  <font color="#4169E1">return</font>(0);
+<a name="line788">788: </a>}
+
+<a name="line792">792: </a><font color="#B22222">/*@</font>
+<a name="line793">793: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a> - Specifies if the solver must compute the residual norm of all</font>
+<a name="line794">794: </a><font color="#B22222">   approximate singular value or not.</font>
+
+<a name="line796">796: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line798">798: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line799">799: </a><font color="#B22222">+  svd      - the singular value solver context</font>
+<a name="line800">800: </a><font color="#B22222">-  trackall - whether to compute all residuals or not</font>
+
+<a name="line802">802: </a><font color="#B22222">   Notes:</font>
+<a name="line803">803: </a><font color="#B22222">   If the user sets trackall=PETSC_TRUE then the solver computes (or estimates)</font>
+<a name="line804">804: </a><font color="#B22222">   the residual norm for each singular value approximation. Computing the residual is</font>
+<a name="line805">805: </a><font color="#B22222">   usually an expensive operation and solvers commonly compute only the residual</font>
+<a name="line806">806: </a><font color="#B22222">   associated to the first unconverged singular value.</font>
+
+<a name="line808">808: </a><font color="#B22222">   The options '-svd_monitor_all' and '-svd_monitor_lg_all' automatically</font>
+<a name="line809">809: </a><font color="#B22222">   activate this option.</font>
+
+<a name="line811">811: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line813">813: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>()</font>
+<a name="line814">814: </a><font color="#B22222">@*/</font>
+<a name="line815">815: </a><strong><font color="#4169E1"><a name="SVDSetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool trackall)</font></strong>
+<a name="line816">816: </a>{
+<a name="line820">820: </a>  svd->trackall = trackall;
+<a name="line821">821: </a>  <font color="#4169E1">return</font>(0);
+<a name="line822">822: </a>}
+
+<a name="line826">826: </a><font color="#B22222">/*@</font>
+<a name="line827">827: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a> - Returns the flag indicating whether all residual norms must</font>
+<a name="line828">828: </a><font color="#B22222">   be computed or not.</font>
+
+<a name="line830">830: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line832">832: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line833">833: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line835">835: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line836">836: </a><font color="#B22222">.  trackall - the returned flag</font>
+
+<a name="line838">838: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line840">840: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTrackAll.html#SVDSetTrackAll">SVDSetTrackAll</a>()</font>
+<a name="line841">841: </a><font color="#B22222">@*/</font>
+<a name="line842">842: </a><strong><font color="#4169E1"><a name="SVDGetTrackAll"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetTrackAll.html#SVDGetTrackAll">SVDGetTrackAll</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscBool *trackall)</font></strong>
+<a name="line843">843: </a>{
+<a name="line847">847: </a>  *trackall = svd->trackall;
+<a name="line848">848: </a>  <font color="#4169E1">return</font>(0);
+<a name="line849">849: </a>}
+
+
+<a name="line854">854: </a><font color="#B22222">/*@C</font>
+<a name="line855">855: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line856">856: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options in the database.</font>
+
+<a name="line858">858: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line860">860: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line861">861: </a><font color="#B22222">+  svd - the singular value solver context</font>
+<a name="line862">862: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> option requests</font>
+
+<a name="line864">864: </a><font color="#B22222">   Notes:</font>
+<a name="line865">865: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line866">866: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line867">867: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line869">869: </a><font color="#B22222">   For example, to distinguish between the runtime options for two</font>
+<a name="line870">870: </a><font color="#B22222">   different <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> contexts, one could call</font>
+<a name="line871">871: </a><font color="#B22222">.vb</font>
+<a name="line872">872: </a><font color="#B22222">      <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(svd1,"svd1_")</font>
+<a name="line873">873: </a><font color="#B22222">      <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(svd2,"svd2_")</font>
+<a name="line874">874: </a><font color="#B22222">.ve</font>
+
+<a name="line876">876: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line878">878: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>(), <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>()</font>
+<a name="line879">879: </a><font color="#B22222">@*/</font>
+<a name="line880">880: </a><strong><font color="#4169E1"><a name="SVDSetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char *prefix)</font></strong>
+<a name="line881">881: </a>{
+<a name="line883">883: </a>  PetscBool      flg1,flg2;
+<a name="line884">884: </a>  <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
+
+<a name="line888">888: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,&svd->U); }
+<a name="line889">889: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->V,prefix);
+<a name="line890">890: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->U,prefix);
+<a name="line891">891: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
+<a name="line892">892: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(svd->ds,prefix);
+<a name="line893">893: </a>  PetscObjectSetOptionsPrefix((PetscObject)svd,prefix);
+<a name="line894">894: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCROSS,&flg1);
+<a name="line895">895: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCYCLIC,&flg2);
+<a name="line896">896: </a>  <font color="#4169E1">if</font> (flg1) {
+<a name="line897">897: </a>    <a href="../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&eps);
+<a name="line898">898: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (flg2) {
+<a name="line899">899: </a>      <a href="../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&eps);
+<a name="line900">900: </a>  }
+<a name="line901">901: </a>  <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line902">902: </a>    <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps,prefix);
+<a name="line903">903: </a>    <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(eps,<font color="#666666">"svd_"</font>);
+<a name="line904">904: </a>  }
+<a name="line905">905: </a>  <font color="#4169E1">return</font>(0);
+<a name="line906">906: </a>}
+
+<a name="line910">910: </a><font color="#B22222">/*@C</font>
+<a name="line911">911: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line912">912: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options in the database.</font>
+
+<a name="line914">914: </a><font color="#B22222">   Logically Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line916">916: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line917">917: </a><font color="#B22222">+  svd - the singular value solver context</font>
+<a name="line918">918: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> option requests</font>
+
+<a name="line920">920: </a><font color="#B22222">   Notes:</font>
+<a name="line921">921: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line922">922: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+
+<a name="line924">924: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line926">926: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>()</font>
+<a name="line927">927: </a><font color="#B22222">@*/</font>
+<a name="line928">928: </a><strong><font color="#4169E1"><a name="SVDAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char *prefix)</font></strong>
+<a name="line929">929: </a>{
+<a name="line931">931: </a>  PetscBool      flg1,flg2;
+<a name="line932">932: </a>  <a href="../../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>            eps;
+
+<a name="line936">936: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,&svd->U); }
+<a name="line937">937: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->V,prefix);
+<a name="line938">938: </a>  <a href="../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(svd->U,prefix);
+<a name="line939">939: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
+<a name="line940">940: </a>  <a href="../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(svd->ds,prefix);
+<a name="line941">941: </a>  PetscObjectAppendOptionsPrefix((PetscObject)svd,prefix);
+<a name="line942">942: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCROSS,&flg1);
+<a name="line943">943: </a>  PetscObjectTypeCompare((PetscObject)svd,SVDCYCLIC,&flg2);
+<a name="line944">944: </a>  <font color="#4169E1">if</font> (flg1) {
+<a name="line945">945: </a>    <a href="../../../docs/manualpages/SVD/SVDCrossGetEPS.html#SVDCrossGetEPS">SVDCrossGetEPS</a>(svd,&eps);
+<a name="line946">946: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (flg2) {
+<a name="line947">947: </a>    <a href="../../../docs/manualpages/SVD/SVDCyclicGetEPS.html#SVDCyclicGetEPS">SVDCyclicGetEPS</a>(svd,&eps);
+<a name="line948">948: </a>  }
+<a name="line949">949: </a>  <font color="#4169E1">if</font> (flg1 || flg2) {
+<a name="line950">950: </a>    <a href="../../../docs/manualpages/EPS/EPSSetOptionsPrefix.html#EPSSetOptionsPrefix">EPSSetOptionsPrefix</a>(eps,((PetscObject)svd)->prefix);
+<a name="line951">951: </a>    <a href="../../../docs/manualpages/EPS/EPSAppendOptionsPrefix.html#EPSAppendOptionsPrefix">EPSAppendOptionsPrefix</a>(eps,<font color="#666666">"svd_"</font>);
+<a name="line952">952: </a>  }
+<a name="line953">953: </a>  <font color="#4169E1">return</font>(0);
+<a name="line954">954: </a>}
+
+<a name="line958">958: </a><font color="#B22222">/*@C</font>
+<a name="line959">959: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line960">960: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> options in the database.</font>
+
+<a name="line962">962: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line964">964: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line965">965: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line967">967: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line968">968: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+
+<a name="line970">970: </a><font color="#B22222">   Note:</font>
+<a name="line971">971: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line972">972: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+
+<a name="line974">974: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line976">976: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetOptionsPrefix.html#SVDSetOptionsPrefix">SVDSetOptionsPrefix</a>(), <a href="../../../docs/manualpages/SVD/SVDAppendOptionsPrefix.html#SVDAppendOptionsPrefix">SVDAppendOptionsPrefix</a>()</font>
+<a name="line977">977: </a><font color="#B22222">@*/</font>
+<a name="line978">978: </a><strong><font color="#4169E1"><a name="SVDGetOptionsPrefix"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetOptionsPrefix.html#SVDGetOptionsPrefix">SVDGetOptionsPrefix</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,const char *prefix[])</font></strong>
+<a name="line979">979: </a>{
+
+<a name="line985">985: </a>  PetscObjectGetOptionsPrefix((PetscObject)svd,prefix);
+<a name="line986">986: </a>  <font color="#4169E1">return</font>(0);
+<a name="line987">987: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/interface/svdregis.c b/src/svd/interface/svdregis.c
index 38a3dc6..01024b9 100644
--- a/src/svd/interface/svdregis.c
+++ b/src/svd/interface/svdregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/svd/interface/svdregis.c.html b/src/svd/interface/svdregis.c.html
index 6ac549e..b44e467 100644
--- a/src/svd/interface/svdregis.c.html
+++ b/src/svd/interface/svdregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:34+00:00">
+<meta name="date" content="2016-05-16T10:33:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/svd/interface/svdsetup.c b/src/svd/interface/svdsetup.c
index 16dd98c..c9d5e12 100644
--- a/src/svd/interface/svdsetup.c
+++ b/src/svd/interface/svdsetup.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -121,9 +121,6 @@ PetscErrorCode SVDSetUp(SVD svd)
   }
   if (!svd->ds) { ierr = SVDGetDS(svd,&svd->ds);CHKERRQ(ierr); }
   ierr = DSReset(svd->ds);CHKERRQ(ierr);
-  if (!((PetscObject)svd->rand)->type_name) {
-    ierr = PetscRandomSetFromOptions(svd->rand);CHKERRQ(ierr);
-  }
 
   /* check matrix */
   if (!svd->OP) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_WRONGSTATE,"SVDSetOperator must be called first");
diff --git a/src/svd/interface/svdsetup.c.html b/src/svd/interface/svdsetup.c.html
index 0d844f5..a3685a2 100644
--- a/src/svd/interface/svdsetup.c.html
+++ b/src/svd/interface/svdsetup.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdsetup.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:37+00:00">
+<meta name="date" content="2016-05-16T10:33:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdsetup.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdsetup.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> routines for setting up the solver.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -116,264 +116,261 @@
 <a name="line121">121: </a>  }
 <a name="line122">122: </a>  <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
 <a name="line123">123: </a>  <a href="../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(svd->ds);
-<a name="line124">124: </a>  <font color="#4169E1">if</font> (!((PetscObject)svd->rand)->type_name) {
-<a name="line125">125: </a>    PetscRandomSetFromOptions(svd->rand);
-<a name="line126">126: </a>  }
-
-<a name="line128">128: </a>  <font color="#B22222">/* check matrix */</font>
-<a name="line129">129: </a>  <font color="#4169E1">if</font> (!svd->OP) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a> must be called first"</font>);
-
-<a name="line131">131: </a>  <font color="#B22222">/* determine how to handle the transpose */</font>
-<a name="line132">132: </a>  expltrans = PETSC_TRUE;
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (svd->impltrans) expltrans = PETSC_FALSE;
-<a name="line134">134: </a>  <font color="#4169E1">else</font> {
-<a name="line135">135: </a>    MatHasOperation(svd->OP,MATOP_TRANSPOSE,&flg);
-<a name="line136">136: </a>    <font color="#4169E1">if</font> (!flg) expltrans = PETSC_FALSE;
-<a name="line137">137: </a>    <font color="#4169E1">else</font> {
-<a name="line138">138: </a>      PetscObjectTypeCompare((PetscObject)svd,SVDLAPACK,&flg);
-<a name="line139">139: </a>      <font color="#4169E1">if</font> (flg) expltrans = PETSC_FALSE;
-<a name="line140">140: </a>    }
-<a name="line141">141: </a>  }
-
-<a name="line143">143: </a>  <font color="#B22222">/* build transpose matrix */</font>
-<a name="line144">144: </a>  MatDestroy(&svd->A);
-<a name="line145">145: </a>  MatDestroy(&svd->AT);
-<a name="line146">146: </a>  MatGetSize(svd->OP,&M,&N);
-<a name="line147">147: </a>  PetscObjectReference((PetscObject)svd->OP);
-<a name="line148">148: </a>  <font color="#4169E1">if</font> (expltrans) {
-<a name="line149">149: </a>    <font color="#4169E1">if</font> (M>=N) {
-<a name="line150">150: </a>      svd->A = svd->OP;
-<a name="line151">151: </a>      MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->AT);
-<a name="line152">152: </a>      MatConjugate(svd->AT);
-<a name="line153">153: </a>    } <font color="#4169E1">else</font> {
-<a name="line154">154: </a>      MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->A);
-<a name="line155">155: </a>      MatConjugate(svd->A);
-<a name="line156">156: </a>      svd->AT = svd->OP;
-<a name="line157">157: </a>    }
-<a name="line158">158: </a>  } <font color="#4169E1">else</font> {
-<a name="line159">159: </a>    <font color="#4169E1">if</font> (M>=N) {
-<a name="line160">160: </a>      svd->A = svd->OP;
-<a name="line161">161: </a>      svd->AT = NULL;
-<a name="line162">162: </a>    } <font color="#4169E1">else</font> {
-<a name="line163">163: </a>      svd->A = NULL;
-<a name="line164">164: </a>      svd->AT = svd->OP;
-<a name="line165">165: </a>    }
-<a name="line166">166: </a>  }
-
-<a name="line168">168: </a>  <font color="#B22222">/* swap initial vectors if necessary */</font>
-<a name="line169">169: </a>  <font color="#4169E1">if</font> (M<N) {
-<a name="line170">170: </a>    T=svd->ISL; svd->ISL=svd->IS; svd->IS=T;
-<a name="line171">171: </a>    k=svd->ninil; svd->ninil=svd->nini; svd->nini=k;
-<a name="line172">172: </a>  }
-
-<a name="line174">174: </a>  <font color="#4169E1">if</font> (svd->ncv > PetscMin(M,N)) svd->ncv = PetscMin(M,N);
-<a name="line175">175: </a>  <font color="#4169E1">if</font> (svd->nsv > PetscMin(M,N)) svd->nsv = PetscMin(M,N);
-<a name="line176">176: </a>  <font color="#4169E1">if</font> (svd->ncv && svd->nsv > svd->ncv) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"nsv bigger than ncv"</font>);
-
-<a name="line178">178: </a>  <font color="#B22222">/* call specific solver setup */</font>
-<a name="line179">179: </a>  (*svd->ops->setup)(svd);
-
-<a name="line181">181: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
-<a name="line182">182: </a>  <font color="#4169E1">if</font> (svd->tol==PETSC_DEFAULT) svd->tol = SLEPC_DEFAULT_TOL;
-
-<a name="line184">184: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
-<a name="line185">185: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(svd->ds,&sc);
-<a name="line186">186: </a>  sc->comparison    = (svd->which==SVD_LARGEST)? SlepcCompareLargestReal: SlepcCompareSmallestReal;
-<a name="line187">187: </a>  sc->comparisonctx = NULL;
-<a name="line188">188: </a>  sc->map           = NULL;
-<a name="line189">189: </a>  sc->mapobj        = NULL;
-
-<a name="line191">191: </a>  <font color="#B22222">/* process initial vectors */</font>
-<a name="line192">192: </a>  <font color="#4169E1">if</font> (svd->nini<0) {
-<a name="line193">193: </a>    k = -svd->nini;
-<a name="line194">194: </a>    <font color="#4169E1">if</font> (k>svd->ncv) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
-<a name="line195">195: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(svd->V,0,&k,svd->IS,PETSC_TRUE);
-<a name="line196">196: </a>    SlepcBasisDestroy_Private(&svd->nini,&svd->IS);
-<a name="line197">197: </a>    svd->nini = k;
-<a name="line198">198: </a>  }
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (svd->ninil<0) {
-<a name="line200">200: </a>    k = 0;
-<a name="line201">201: </a>    <font color="#4169E1">if</font> (svd->leftbasis) {
-<a name="line202">202: </a>      k = -svd->ninil;
-<a name="line203">203: </a>      <font color="#4169E1">if</font> (k>svd->ncv) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The number of left initial vectors is larger than ncv"</font>);
-<a name="line204">204: </a>      <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(svd->U,0,&k,svd->ISL,PETSC_TRUE);
-<a name="line205">205: </a>    } <font color="#4169E1">else</font> {
-<a name="line206">206: </a>      PetscInfo(svd,<font color="#666666">"Ignoring initial left vectors\n"</font>);
-<a name="line207">207: </a>    }
-<a name="line208">208: </a>    SlepcBasisDestroy_Private(&svd->ninil,&svd->ISL);
-<a name="line209">209: </a>    svd->ninil = k;
-<a name="line210">210: </a>  }
-
-<a name="line212">212: </a>  PetscLogEventEnd(SVD_SetUp,svd,0,0,0);
-<a name="line213">213: </a>  svd->state = SVD_STATE_SETUP;
-<a name="line214">214: </a>  <font color="#4169E1">return</font>(0);
-<a name="line215">215: </a>}
-
-<a name="line219">219: </a><font color="#B22222">/*@</font>
-<a name="line220">220: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
-<a name="line221">221: </a><font color="#B22222">   (right) space, that is, a rough approximation to the right singular subspace</font>
-<a name="line222">222: </a><font color="#B22222">   from which the solver starts to iterate.</font>
-
-<a name="line224">224: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> and Vec</font>
-
-<a name="line226">226: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line227">227: </a><font color="#B22222">+  svd   - the singular value solver context</font>
-<a name="line228">228: </a><font color="#B22222">.  n     - number of vectors</font>
-<a name="line229">229: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
-
-<a name="line231">231: </a><font color="#B22222">   Notes:</font>
-<a name="line232">232: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
-<a name="line233">233: </a><font color="#B22222">   the other vectors are ignored.</font>
-
-<a name="line235">235: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() call to the other, so the</font>
-<a name="line236">236: </a><font color="#B22222">   initial space should be set every time.</font>
-
-<a name="line238">238: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
-<a name="line239">239: </a><font color="#B22222">   orthonormalized internally.</font>
-
-<a name="line241">241: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
-<a name="line242">242: </a><font color="#B22222">   of the wanted singular space. Then, convergence may be faster.</font>
-
-<a name="line244">244: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line246">246: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a>()</font>
-<a name="line247">247: </a><font color="#B22222">@*/</font>
-<a name="line248">248: </a><strong><font color="#4169E1"><a name="SVDSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt n,Vec *is)</font></strong>
-<a name="line249">249: </a>{
-
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
-<a name="line256">256: </a>  SlepcBasisReference_Private(n,is,&svd->nini,&svd->IS);
-<a name="line257">257: </a>  <font color="#4169E1">if</font> (n>0) svd->state = SVD_STATE_INITIAL;
-<a name="line258">258: </a>  <font color="#4169E1">return</font>(0);
-<a name="line259">259: </a>}
-
-<a name="line263">263: </a><font color="#B22222">/*@</font>
-<a name="line264">264: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a> - Specify a basis of vectors that constitute the initial</font>
-<a name="line265">265: </a><font color="#B22222">   left space, that is, a rough approximation to the left singular subspace</font>
-<a name="line266">266: </a><font color="#B22222">   from which the solver starts to iterate.</font>
-
-<a name="line268">268: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> and Vec</font>
-
-<a name="line270">270: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line271">271: </a><font color="#B22222">+  svd   - the singular value solver context</font>
-<a name="line272">272: </a><font color="#B22222">.  n     - number of vectors</font>
-<a name="line273">273: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
-
-<a name="line275">275: </a><font color="#B22222">   Notes:</font>
-<a name="line276">276: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
-<a name="line277">277: </a><font color="#B22222">   the other vectors are ignored.</font>
-
-<a name="line279">279: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() call to the other, so the</font>
-<a name="line280">280: </a><font color="#B22222">   initial space should be set every time.</font>
-
-<a name="line282">282: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
-<a name="line283">283: </a><font color="#B22222">   orthonormalized internally.</font>
-
-<a name="line285">285: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
-<a name="line286">286: </a><font color="#B22222">   of the wanted singular space. Then, convergence may be faster.</font>
-
-<a name="line288">288: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line290">290: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a>()</font>
-<a name="line291">291: </a><font color="#B22222">@*/</font>
-<a name="line292">292: </a><strong><font color="#4169E1"><a name="SVDSetInitialSpaceLeft"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt n,Vec *is)</font></strong>
-<a name="line293">293: </a>{
-
-<a name="line299">299: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
-<a name="line300">300: </a>  SlepcBasisReference_Private(n,is,&svd->ninil,&svd->ISL);
-<a name="line301">301: </a>  <font color="#4169E1">if</font> (n>0) svd->state = SVD_STATE_INITIAL;
-<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
-<a name="line303">303: </a>}
-
-<a name="line307">307: </a><font color="#B22222">/*</font>
-<a name="line308">308: </a><font color="#B22222">  SVDSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
-<a name="line309">309: </a><font color="#B22222">  by the user. This is called at setup.</font>
-<a name="line310">310: </a><font color="#B22222"> */</font>
-<a name="line311">311: </a><strong><font color="#4169E1"><a name="SVDSetDimensions_Default"></a>PetscErrorCode SVDSetDimensions_Default(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line312">312: </a>{
-<a name="line314">314: </a>  PetscInt       N;
-
-<a name="line317">317: </a>  SVDMatGetSize(svd,NULL,&N);
-<a name="line318">318: </a>  <font color="#4169E1">if</font> (svd->ncv) { <font color="#B22222">/* ncv set */</font>
-<a name="line319">319: </a>    <font color="#4169E1">if</font> (svd->ncv<svd->nsv) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The value of ncv must be at least nsv"</font>);
-<a name="line320">320: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (svd->mpd) { <font color="#B22222">/* mpd set */</font>
-<a name="line321">321: </a>    svd->ncv = PetscMin(N,svd->nsv+svd->mpd);
-<a name="line322">322: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nsv being small or large */</font>
-<a name="line323">323: </a>    <font color="#4169E1">if</font> (svd->nsv<500) svd->ncv = PetscMin(N,PetscMax(2*svd->nsv,10));
-<a name="line324">324: </a>    <font color="#4169E1">else</font> {
-<a name="line325">325: </a>      svd->mpd = 500;
-<a name="line326">326: </a>      svd->ncv = PetscMin(N,svd->nsv+svd->mpd);
-<a name="line327">327: </a>    }
-<a name="line328">328: </a>  }
-<a name="line329">329: </a>  <font color="#4169E1">if</font> (!svd->mpd) svd->mpd = svd->ncv;
-<a name="line330">330: </a>  <font color="#4169E1">return</font>(0);
-<a name="line331">331: </a>}
-
-<a name="line335">335: </a><font color="#B22222">/*@</font>
-<a name="line336">336: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a> - Allocate memory storage for common variables such</font>
-<a name="line337">337: </a><font color="#B22222">   as the singular values and the basis vectors.</font>
-
-<a name="line339">339: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line341">341: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line342">342: </a><font color="#B22222">+  svd   - eigensolver context</font>
-<a name="line343">343: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
-<a name="line344">344: </a><font color="#B22222">           working basis slightly larger than ncv</font>
-
-<a name="line346">346: </a><font color="#B22222">   Developers Notes:</font>
-<a name="line347">347: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-<a name="line348">348: </a><font color="#B22222">   implementations.</font>
-
-<a name="line350">350: </a><font color="#B22222">   This is called at setup after setting the value of ncv and the flag leftbasis.</font>
-
-<a name="line352">352: </a><font color="#B22222">   Level: developer</font>
-<a name="line353">353: </a><font color="#B22222">@*/</font>
-<a name="line354">354: </a><strong><font color="#4169E1"><a name="SVDAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt extra)</font></strong>
-<a name="line355">355: </a>{
-<a name="line357">357: </a>  PetscInt       oldsize,requested;
-<a name="line358">358: </a>  Vec            tr,tl;
-
-<a name="line361">361: </a>  requested = svd->ncv + extra;
-
-<a name="line363">363: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
-<a name="line364">364: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(svd->V,NULL,NULL,&oldsize);
-
-<a name="line366">366: </a>  <font color="#B22222">/* allocate sigma */</font>
-<a name="line367">367: </a>  <font color="#4169E1">if</font> (requested != oldsize || !svd->sigma) {
-<a name="line368">368: </a>    <font color="#4169E1">if</font> (oldsize) {
-<a name="line369">369: </a>      PetscFree3(svd->sigma,svd->perm,svd->errest);
-<a name="line370">370: </a>    }
-<a name="line371">371: </a>    PetscMalloc3(requested,&svd->sigma,requested,&svd->perm,requested,&svd->errest);
-<a name="line372">372: </a>    PetscLogObjectMemory((PetscObject)svd,PetscMax(0,requested-oldsize)*(2*<font color="#4169E1">sizeof</font>(PetscReal)+<font color="#4169E1">sizeof</font>(PetscInt)));
-<a name="line373">373: </a>  }
-<a name="line374">374: </a>  <font color="#B22222">/* allocate V */</font>
-<a name="line375">375: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,NULL); }
-<a name="line376">376: </a>  <font color="#4169E1">if</font> (!oldsize) {
-<a name="line377">377: </a>    <font color="#4169E1">if</font> (!((PetscObject)(svd->V))->type_name) {
-<a name="line378">378: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(svd->V,BVSVEC);
-<a name="line379">379: </a>    }
-<a name="line380">380: </a>    SVDMatCreateVecs(svd,&tr,NULL);
-<a name="line381">381: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(svd->V,tr,requested);
-<a name="line382">382: </a>    VecDestroy(&tr);
-<a name="line383">383: </a>  } <font color="#4169E1">else</font> {
-<a name="line384">384: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(svd->V,requested,PETSC_FALSE);
-<a name="line385">385: </a>  }
-<a name="line386">386: </a>  <font color="#B22222">/* allocate U */</font>
-<a name="line387">387: </a>  <font color="#4169E1">if</font> (svd->leftbasis) {
-<a name="line388">388: </a>    <font color="#4169E1">if</font> (!svd->U) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,NULL,&svd->U); }
-<a name="line389">389: </a>    <font color="#4169E1">if</font> (!oldsize) {
-<a name="line390">390: </a>      <font color="#4169E1">if</font> (!((PetscObject)(svd->U))->type_name) {
-<a name="line391">391: </a>        <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(svd->U,BVSVEC);
-<a name="line392">392: </a>      }
-<a name="line393">393: </a>      SVDMatCreateVecs(svd,NULL,&tl);
-<a name="line394">394: </a>      <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(svd->U,tl,requested);
-<a name="line395">395: </a>      VecDestroy(&tl);
-<a name="line396">396: </a>    } <font color="#4169E1">else</font> {
-<a name="line397">397: </a>      <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(svd->U,requested,PETSC_FALSE);
-<a name="line398">398: </a>    }
-<a name="line399">399: </a>  }
-<a name="line400">400: </a>  <font color="#4169E1">return</font>(0);
-<a name="line401">401: </a>}
+
+<a name="line125">125: </a>  <font color="#B22222">/* check matrix */</font>
+<a name="line126">126: </a>  <font color="#4169E1">if</font> (!svd->OP) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"<a href="../../../docs/manualpages/SVD/SVDSetOperator.html#SVDSetOperator">SVDSetOperator</a> must be called first"</font>);
+
+<a name="line128">128: </a>  <font color="#B22222">/* determine how to handle the transpose */</font>
+<a name="line129">129: </a>  expltrans = PETSC_TRUE;
+<a name="line130">130: </a>  <font color="#4169E1">if</font> (svd->impltrans) expltrans = PETSC_FALSE;
+<a name="line131">131: </a>  <font color="#4169E1">else</font> {
+<a name="line132">132: </a>    MatHasOperation(svd->OP,MATOP_TRANSPOSE,&flg);
+<a name="line133">133: </a>    <font color="#4169E1">if</font> (!flg) expltrans = PETSC_FALSE;
+<a name="line134">134: </a>    <font color="#4169E1">else</font> {
+<a name="line135">135: </a>      PetscObjectTypeCompare((PetscObject)svd,SVDLAPACK,&flg);
+<a name="line136">136: </a>      <font color="#4169E1">if</font> (flg) expltrans = PETSC_FALSE;
+<a name="line137">137: </a>    }
+<a name="line138">138: </a>  }
+
+<a name="line140">140: </a>  <font color="#B22222">/* build transpose matrix */</font>
+<a name="line141">141: </a>  MatDestroy(&svd->A);
+<a name="line142">142: </a>  MatDestroy(&svd->AT);
+<a name="line143">143: </a>  MatGetSize(svd->OP,&M,&N);
+<a name="line144">144: </a>  PetscObjectReference((PetscObject)svd->OP);
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (expltrans) {
+<a name="line146">146: </a>    <font color="#4169E1">if</font> (M>=N) {
+<a name="line147">147: </a>      svd->A = svd->OP;
+<a name="line148">148: </a>      MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->AT);
+<a name="line149">149: </a>      MatConjugate(svd->AT);
+<a name="line150">150: </a>    } <font color="#4169E1">else</font> {
+<a name="line151">151: </a>      MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->A);
+<a name="line152">152: </a>      MatConjugate(svd->A);
+<a name="line153">153: </a>      svd->AT = svd->OP;
+<a name="line154">154: </a>    }
+<a name="line155">155: </a>  } <font color="#4169E1">else</font> {
+<a name="line156">156: </a>    <font color="#4169E1">if</font> (M>=N) {
+<a name="line157">157: </a>      svd->A = svd->OP;
+<a name="line158">158: </a>      svd->AT = NULL;
+<a name="line159">159: </a>    } <font color="#4169E1">else</font> {
+<a name="line160">160: </a>      svd->A = NULL;
+<a name="line161">161: </a>      svd->AT = svd->OP;
+<a name="line162">162: </a>    }
+<a name="line163">163: </a>  }
+
+<a name="line165">165: </a>  <font color="#B22222">/* swap initial vectors if necessary */</font>
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (M<N) {
+<a name="line167">167: </a>    T=svd->ISL; svd->ISL=svd->IS; svd->IS=T;
+<a name="line168">168: </a>    k=svd->ninil; svd->ninil=svd->nini; svd->nini=k;
+<a name="line169">169: </a>  }
+
+<a name="line171">171: </a>  <font color="#4169E1">if</font> (svd->ncv > PetscMin(M,N)) svd->ncv = PetscMin(M,N);
+<a name="line172">172: </a>  <font color="#4169E1">if</font> (svd->nsv > PetscMin(M,N)) svd->nsv = PetscMin(M,N);
+<a name="line173">173: </a>  <font color="#4169E1">if</font> (svd->ncv && svd->nsv > svd->ncv) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"nsv bigger than ncv"</font>);
+
+<a name="line175">175: </a>  <font color="#B22222">/* call specific solver setup */</font>
+<a name="line176">176: </a>  (*svd->ops->setup)(svd);
+
+<a name="line178">178: </a>  <font color="#B22222">/* set tolerance if not yet set */</font>
+<a name="line179">179: </a>  <font color="#4169E1">if</font> (svd->tol==PETSC_DEFAULT) svd->tol = SLEPC_DEFAULT_TOL;
+
+<a name="line181">181: </a>  <font color="#B22222">/* fill sorting criterion context */</font>
+<a name="line182">182: </a>  <a href="../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(svd->ds,&sc);
+<a name="line183">183: </a>  sc->comparison    = (svd->which==SVD_LARGEST)? SlepcCompareLargestReal: SlepcCompareSmallestReal;
+<a name="line184">184: </a>  sc->comparisonctx = NULL;
+<a name="line185">185: </a>  sc->map           = NULL;
+<a name="line186">186: </a>  sc->mapobj        = NULL;
+
+<a name="line188">188: </a>  <font color="#B22222">/* process initial vectors */</font>
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (svd->nini<0) {
+<a name="line190">190: </a>    k = -svd->nini;
+<a name="line191">191: </a>    <font color="#4169E1">if</font> (k>svd->ncv) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The number of initial vectors is larger than ncv"</font>);
+<a name="line192">192: </a>    <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(svd->V,0,&k,svd->IS,PETSC_TRUE);
+<a name="line193">193: </a>    SlepcBasisDestroy_Private(&svd->nini,&svd->IS);
+<a name="line194">194: </a>    svd->nini = k;
+<a name="line195">195: </a>  }
+<a name="line196">196: </a>  <font color="#4169E1">if</font> (svd->ninil<0) {
+<a name="line197">197: </a>    k = 0;
+<a name="line198">198: </a>    <font color="#4169E1">if</font> (svd->leftbasis) {
+<a name="line199">199: </a>      k = -svd->ninil;
+<a name="line200">200: </a>      <font color="#4169E1">if</font> (k>svd->ncv) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The number of left initial vectors is larger than ncv"</font>);
+<a name="line201">201: </a>      <a href="../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(svd->U,0,&k,svd->ISL,PETSC_TRUE);
+<a name="line202">202: </a>    } <font color="#4169E1">else</font> {
+<a name="line203">203: </a>      PetscInfo(svd,<font color="#666666">"Ignoring initial left vectors\n"</font>);
+<a name="line204">204: </a>    }
+<a name="line205">205: </a>    SlepcBasisDestroy_Private(&svd->ninil,&svd->ISL);
+<a name="line206">206: </a>    svd->ninil = k;
+<a name="line207">207: </a>  }
+
+<a name="line209">209: </a>  PetscLogEventEnd(SVD_SetUp,svd,0,0,0);
+<a name="line210">210: </a>  svd->state = SVD_STATE_SETUP;
+<a name="line211">211: </a>  <font color="#4169E1">return</font>(0);
+<a name="line212">212: </a>}
+
+<a name="line216">216: </a><font color="#B22222">/*@</font>
+<a name="line217">217: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a> - Specify a basis of vectors that constitute the initial</font>
+<a name="line218">218: </a><font color="#B22222">   (right) space, that is, a rough approximation to the right singular subspace</font>
+<a name="line219">219: </a><font color="#B22222">   from which the solver starts to iterate.</font>
+
+<a name="line221">221: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> and Vec</font>
+
+<a name="line223">223: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line224">224: </a><font color="#B22222">+  svd   - the singular value solver context</font>
+<a name="line225">225: </a><font color="#B22222">.  n     - number of vectors</font>
+<a name="line226">226: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
+
+<a name="line228">228: </a><font color="#B22222">   Notes:</font>
+<a name="line229">229: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
+<a name="line230">230: </a><font color="#B22222">   the other vectors are ignored.</font>
+
+<a name="line232">232: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() call to the other, so the</font>
+<a name="line233">233: </a><font color="#B22222">   initial space should be set every time.</font>
+
+<a name="line235">235: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
+<a name="line236">236: </a><font color="#B22222">   orthonormalized internally.</font>
+
+<a name="line238">238: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
+<a name="line239">239: </a><font color="#B22222">   of the wanted singular space. Then, convergence may be faster.</font>
+
+<a name="line241">241: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line243">243: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a>()</font>
+<a name="line244">244: </a><font color="#B22222">@*/</font>
+<a name="line245">245: </a><strong><font color="#4169E1"><a name="SVDSetInitialSpace"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt n,Vec *is)</font></strong>
+<a name="line246">246: </a>{
+
+<a name="line252">252: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
+<a name="line253">253: </a>  SlepcBasisReference_Private(n,is,&svd->nini,&svd->IS);
+<a name="line254">254: </a>  <font color="#4169E1">if</font> (n>0) svd->state = SVD_STATE_INITIAL;
+<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
+<a name="line256">256: </a>}
+
+<a name="line260">260: </a><font color="#B22222">/*@</font>
+<a name="line261">261: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a> - Specify a basis of vectors that constitute the initial</font>
+<a name="line262">262: </a><font color="#B22222">   left space, that is, a rough approximation to the left singular subspace</font>
+<a name="line263">263: </a><font color="#B22222">   from which the solver starts to iterate.</font>
+
+<a name="line265">265: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> and Vec</font>
+
+<a name="line267">267: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line268">268: </a><font color="#B22222">+  svd   - the singular value solver context</font>
+<a name="line269">269: </a><font color="#B22222">.  n     - number of vectors</font>
+<a name="line270">270: </a><font color="#B22222">-  is    - set of basis vectors of the initial space</font>
+
+<a name="line272">272: </a><font color="#B22222">   Notes:</font>
+<a name="line273">273: </a><font color="#B22222">   Some solvers start to iterate on a single vector (initial vector). In that case,</font>
+<a name="line274">274: </a><font color="#B22222">   the other vectors are ignored.</font>
+
+<a name="line276">276: </a><font color="#B22222">   These vectors do not persist from one <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() call to the other, so the</font>
+<a name="line277">277: </a><font color="#B22222">   initial space should be set every time.</font>
+
+<a name="line279">279: </a><font color="#B22222">   The vectors do not need to be mutually orthonormal, since they are explicitly</font>
+<a name="line280">280: </a><font color="#B22222">   orthonormalized internally.</font>
+
+<a name="line282">282: </a><font color="#B22222">   Common usage of this function is when the user can provide a rough approximation</font>
+<a name="line283">283: </a><font color="#B22222">   of the wanted singular space. Then, convergence may be faster.</font>
+
+<a name="line285">285: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line287">287: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetInitialSpace.html#SVDSetInitialSpace">SVDSetInitialSpace</a>()</font>
+<a name="line288">288: </a><font color="#B22222">@*/</font>
+<a name="line289">289: </a><strong><font color="#4169E1"><a name="SVDSetInitialSpaceLeft"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDSetInitialSpaceLeft.html#SVDSetInitialSpaceLeft">SVDSetInitialSpaceLeft</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt n,Vec *is)</font></strong>
+<a name="line290">290: </a>{
+
+<a name="line296">296: </a>  <font color="#4169E1">if</font> (n<0) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument n cannot be negative"</font>);
+<a name="line297">297: </a>  SlepcBasisReference_Private(n,is,&svd->ninil,&svd->ISL);
+<a name="line298">298: </a>  <font color="#4169E1">if</font> (n>0) svd->state = SVD_STATE_INITIAL;
+<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
+<a name="line300">300: </a>}
+
+<a name="line304">304: </a><font color="#B22222">/*</font>
+<a name="line305">305: </a><font color="#B22222">  SVDSetDimensions_Default - Set reasonable values for ncv, mpd if not set</font>
+<a name="line306">306: </a><font color="#B22222">  by the user. This is called at setup.</font>
+<a name="line307">307: </a><font color="#B22222"> */</font>
+<a name="line308">308: </a><strong><font color="#4169E1"><a name="SVDSetDimensions_Default"></a>PetscErrorCode SVDSetDimensions_Default(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line309">309: </a>{
+<a name="line311">311: </a>  PetscInt       N;
+
+<a name="line314">314: </a>  SVDMatGetSize(svd,NULL,&N);
+<a name="line315">315: </a>  <font color="#4169E1">if</font> (svd->ncv) { <font color="#B22222">/* ncv set */</font>
+<a name="line316">316: </a>    <font color="#4169E1">if</font> (svd->ncv<svd->nsv) SETERRQ(PetscObjectComm((PetscObject)svd),1,<font color="#666666">"The value of ncv must be at least nsv"</font>);
+<a name="line317">317: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (svd->mpd) { <font color="#B22222">/* mpd set */</font>
+<a name="line318">318: </a>    svd->ncv = PetscMin(N,svd->nsv+svd->mpd);
+<a name="line319">319: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* neither set: defaults depend on nsv being small or large */</font>
+<a name="line320">320: </a>    <font color="#4169E1">if</font> (svd->nsv<500) svd->ncv = PetscMin(N,PetscMax(2*svd->nsv,10));
+<a name="line321">321: </a>    <font color="#4169E1">else</font> {
+<a name="line322">322: </a>      svd->mpd = 500;
+<a name="line323">323: </a>      svd->ncv = PetscMin(N,svd->nsv+svd->mpd);
+<a name="line324">324: </a>    }
+<a name="line325">325: </a>  }
+<a name="line326">326: </a>  <font color="#4169E1">if</font> (!svd->mpd) svd->mpd = svd->ncv;
+<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
+<a name="line328">328: </a>}
+
+<a name="line332">332: </a><font color="#B22222">/*@</font>
+<a name="line333">333: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a> - Allocate memory storage for common variables such</font>
+<a name="line334">334: </a><font color="#B22222">   as the singular values and the basis vectors.</font>
+
+<a name="line336">336: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line338">338: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line339">339: </a><font color="#B22222">+  svd   - eigensolver context</font>
+<a name="line340">340: </a><font color="#B22222">-  extra - number of additional positions, used for methods that require a</font>
+<a name="line341">341: </a><font color="#B22222">           working basis slightly larger than ncv</font>
+
+<a name="line343">343: </a><font color="#B22222">   Developers Notes:</font>
+<a name="line344">344: </a><font color="#B22222">   This is PETSC_EXTERN because it may be required by user plugin <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+<a name="line345">345: </a><font color="#B22222">   implementations.</font>
+
+<a name="line347">347: </a><font color="#B22222">   This is called at setup after setting the value of ncv and the flag leftbasis.</font>
+
+<a name="line349">349: </a><font color="#B22222">   Level: developer</font>
+<a name="line350">350: </a><font color="#B22222">@*/</font>
+<a name="line351">351: </a><strong><font color="#4169E1"><a name="SVDAllocateSolution"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDAllocateSolution.html#SVDAllocateSolution">SVDAllocateSolution</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt extra)</font></strong>
+<a name="line352">352: </a>{
+<a name="line354">354: </a>  PetscInt       oldsize,requested;
+<a name="line355">355: </a>  Vec            tr,tl;
+
+<a name="line358">358: </a>  requested = svd->ncv + extra;
+
+<a name="line360">360: </a>  <font color="#B22222">/* oldsize is zero if this is the first time setup is called */</font>
+<a name="line361">361: </a>  <a href="../../../docs/manualpages/BV/BVGetSizes.html#BVGetSizes">BVGetSizes</a>(svd->V,NULL,NULL,&oldsize);
+
+<a name="line363">363: </a>  <font color="#B22222">/* allocate sigma */</font>
+<a name="line364">364: </a>  <font color="#4169E1">if</font> (requested != oldsize || !svd->sigma) {
+<a name="line365">365: </a>    <font color="#4169E1">if</font> (oldsize) {
+<a name="line366">366: </a>      PetscFree3(svd->sigma,svd->perm,svd->errest);
+<a name="line367">367: </a>    }
+<a name="line368">368: </a>    PetscMalloc3(requested,&svd->sigma,requested,&svd->perm,requested,&svd->errest);
+<a name="line369">369: </a>    PetscLogObjectMemory((PetscObject)svd,PetscMax(0,requested-oldsize)*(2*<font color="#4169E1">sizeof</font>(PetscReal)+<font color="#4169E1">sizeof</font>(PetscInt)));
+<a name="line370">370: </a>  }
+<a name="line371">371: </a>  <font color="#B22222">/* allocate V */</font>
+<a name="line372">372: </a>  <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,NULL); }
+<a name="line373">373: </a>  <font color="#4169E1">if</font> (!oldsize) {
+<a name="line374">374: </a>    <font color="#4169E1">if</font> (!((PetscObject)(svd->V))->type_name) {
+<a name="line375">375: </a>      <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(svd->V,BVSVEC);
+<a name="line376">376: </a>    }
+<a name="line377">377: </a>    SVDMatCreateVecs(svd,&tr,NULL);
+<a name="line378">378: </a>    <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(svd->V,tr,requested);
+<a name="line379">379: </a>    VecDestroy(&tr);
+<a name="line380">380: </a>  } <font color="#4169E1">else</font> {
+<a name="line381">381: </a>    <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(svd->V,requested,PETSC_FALSE);
+<a name="line382">382: </a>  }
+<a name="line383">383: </a>  <font color="#B22222">/* allocate U */</font>
+<a name="line384">384: </a>  <font color="#4169E1">if</font> (svd->leftbasis) {
+<a name="line385">385: </a>    <font color="#4169E1">if</font> (!svd->U) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,NULL,&svd->U); }
+<a name="line386">386: </a>    <font color="#4169E1">if</font> (!oldsize) {
+<a name="line387">387: </a>      <font color="#4169E1">if</font> (!((PetscObject)(svd->U))->type_name) {
+<a name="line388">388: </a>        <a href="../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(svd->U,BVSVEC);
+<a name="line389">389: </a>      }
+<a name="line390">390: </a>      SVDMatCreateVecs(svd,NULL,&tl);
+<a name="line391">391: </a>      <a href="../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(svd->U,tl,requested);
+<a name="line392">392: </a>      VecDestroy(&tl);
+<a name="line393">393: </a>    } <font color="#4169E1">else</font> {
+<a name="line394">394: </a>      <a href="../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(svd->U,requested,PETSC_FALSE);
+<a name="line395">395: </a>    }
+<a name="line396">396: </a>  }
+<a name="line397">397: </a>  <font color="#4169E1">return</font>(0);
+<a name="line398">398: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/interface/svdsolve.c b/src/svd/interface/svdsolve.c
index 393ea5b..9973bb8 100644
--- a/src/svd/interface/svdsolve.c
+++ b/src/svd/interface/svdsolve.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -91,6 +91,7 @@ PetscErrorCode SVDSolve(SVD svd)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(svd,SVD_CLASSID,1);
+  if (svd->state>=SVD_STATE_SOLVED) PetscFunctionReturn(0);
   ierr = PetscLogEventBegin(SVD_Solve,svd,0,0,0);CHKERRQ(ierr);
 
   /* call setup */
@@ -102,7 +103,6 @@ PetscErrorCode SVDSolve(SVD svd)
     svd->errest[i] = 0.0;
     svd->perm[i]   = i;
   }
-  ierr = SVDMonitor(svd,svd->its,svd->nconv,svd->sigma,svd->errest,svd->ncv);CHKERRQ(ierr);
   ierr = SVDViewFromOptions(svd,NULL,"-svd_view_pre");CHKERRQ(ierr);
 
   ierr = (*svd->ops->solve)(svd);CHKERRQ(ierr);
@@ -186,12 +186,14 @@ PetscErrorCode SVDGetIterationNumber(SVD svd,PetscInt *its)
 
    Possible values for reason:
 +  SVD_CONVERGED_TOL - converged up to tolerance
-.  SVD_DIVERGED_ITS - required more than its to reach convergence
+.  SVD_CONVERGED_USER - converged due to a user-defined condition
+.  SVD_DIVERGED_ITS - required more than max_it iterations to reach convergence
 -  SVD_DIVERGED_BREAKDOWN - generic breakdown in method
 
-   Level: intermediate
+   Note:
+   Can only be called after the call to SVDSolve() is complete.
 
-   Notes: Can only be called after the call to SVDSolve() is complete.
+   Level: intermediate
 
 .seealso: SVDSetTolerances(), SVDSolve(), SVDConvergedReason
 @*/
diff --git a/src/svd/interface/svdsolve.c.html b/src/svd/interface/svdsolve.c.html
index 39903d1..c7e42f6 100644
--- a/src/svd/interface/svdsolve.c.html
+++ b/src/svd/interface/svdsolve.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdsolve.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:38+00:00">
+<meta name="date" content="2016-05-16T10:33:37+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdsolve.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdsolve.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> routines related to the solution process.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -94,18 +94,18 @@
 <a name="line88"> 88: </a>{
 <a name="line90"> 90: </a>  PetscInt       i,*workperm;
 
-<a name="line94"> 94: </a>  PetscLogEventBegin(SVD_Solve,svd,0,0,0);
-
-<a name="line96"> 96: </a>  <font color="#B22222">/* call setup */</font>
-<a name="line97"> 97: </a>  <a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>(svd);
-<a name="line98"> 98: </a>  svd->its = 0;
-<a name="line99"> 99: </a>  svd->nconv = 0;
-<a name="line100">100: </a>  <font color="#4169E1">for</font> (i=0;i<svd->ncv;i++) {
-<a name="line101">101: </a>    svd->sigma[i]  = 0.0;
-<a name="line102">102: </a>    svd->errest[i] = 0.0;
-<a name="line103">103: </a>    svd->perm[i]   = i;
-<a name="line104">104: </a>  }
-<a name="line105">105: </a>  SVDMonitor(svd,svd->its,svd->nconv,svd->sigma,svd->errest,svd->ncv);
+<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (svd->state>=SVD_STATE_SOLVED) <font color="#4169E1">return</font>(0);
+<a name="line95"> 95: </a>  PetscLogEventBegin(SVD_Solve,svd,0,0,0);
+
+<a name="line97"> 97: </a>  <font color="#B22222">/* call setup */</font>
+<a name="line98"> 98: </a>  <a href="../../../docs/manualpages/SVD/SVDSetUp.html#SVDSetUp">SVDSetUp</a>(svd);
+<a name="line99"> 99: </a>  svd->its = 0;
+<a name="line100">100: </a>  svd->nconv = 0;
+<a name="line101">101: </a>  <font color="#4169E1">for</font> (i=0;i<svd->ncv;i++) {
+<a name="line102">102: </a>    svd->sigma[i]  = 0.0;
+<a name="line103">103: </a>    svd->errest[i] = 0.0;
+<a name="line104">104: </a>    svd->perm[i]   = i;
+<a name="line105">105: </a>  }
 <a name="line106">106: </a>  SVDViewFromOptions(svd,NULL,<font color="#666666">"-svd_view_pre"</font>);
 
 <a name="line108">108: </a>  (*svd->ops->solve)(svd);
@@ -182,185 +182,187 @@
 
 <a name="line187">187: </a><font color="#B22222">   Possible values for reason:</font>
 <a name="line188">188: </a><font color="#B22222">+  SVD_CONVERGED_TOL - converged up to tolerance</font>
-<a name="line189">189: </a><font color="#B22222">.  SVD_DIVERGED_ITS - required more than its to reach convergence</font>
-<a name="line190">190: </a><font color="#B22222">-  SVD_DIVERGED_BREAKDOWN - generic breakdown in method</font>
-
-<a name="line192">192: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line194">194: </a><font color="#B22222">   Notes: Can only be called after the call to <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() is complete.</font>
-
-<a name="line196">196: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a></font>
-<a name="line197">197: </a><font color="#B22222">@*/</font>
-<a name="line198">198: </a><strong><font color="#4169E1"><a name="SVDGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> *reason)</font></strong>
-<a name="line199">199: </a>{
-<a name="line203">203: </a>  SVDCheckSolved(svd,1);
-<a name="line204">204: </a>  *reason = svd->reason;
-<a name="line205">205: </a>  <font color="#4169E1">return</font>(0);
-<a name="line206">206: </a>}
-
-<a name="line210">210: </a><font color="#B22222">/*@</font>
-<a name="line211">211: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a> - Gets the number of converged singular values.</font>
-
-<a name="line213">213: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line215">215: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line216">216: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line218">218: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line219">219: </a><font color="#B22222">.  nconv - number of converged singular values</font>
-
-<a name="line221">221: </a><font color="#B22222">   Note:</font>
-<a name="line222">222: </a><font color="#B22222">   This function should be called after <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() has finished.</font>
-
-<a name="line224">224: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line226">226: </a><font color="#B22222">@*/</font>
-<a name="line227">227: </a><strong><font color="#4169E1"><a name="SVDGetConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *nconv)</font></strong>
-<a name="line228">228: </a>{
-<a name="line232">232: </a>  SVDCheckSolved(svd,1);
-<a name="line233">233: </a>  *nconv = svd->nconv;
-<a name="line234">234: </a>  <font color="#4169E1">return</font>(0);
-<a name="line235">235: </a>}
-
-<a name="line239">239: </a><font color="#B22222">/*@</font>
-<a name="line240">240: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a> - Gets the i-th triplet of the singular value decomposition</font>
-<a name="line241">241: </a><font color="#B22222">   as computed by <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(). The solution consists in the singular value and its left</font>
-<a name="line242">242: </a><font color="#B22222">   and right singular vectors.</font>
-
-<a name="line244">244: </a><font color="#B22222">   Not Collective, but vectors are shared by all processors that share the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line246">246: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line247">247: </a><font color="#B22222">+  svd - singular value solver context</font>
-<a name="line248">248: </a><font color="#B22222">-  i   - index of the solution</font>
-
-<a name="line250">250: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line251">251: </a><font color="#B22222">+  sigma - singular value</font>
-<a name="line252">252: </a><font color="#B22222">.  u     - left singular vector</font>
-<a name="line253">253: </a><font color="#B22222">-  v     - right singular vector</font>
-
-<a name="line255">255: </a><font color="#B22222">   Note:</font>
-<a name="line256">256: </a><font color="#B22222">   Both U or V can be NULL if singular vectors are not required.</font>
-<a name="line257">257: </a><font color="#B22222">   Otherwise, the caller must provide valid Vec objects, i.e.,</font>
-<a name="line258">258: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
-
-<a name="line260">260: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>()).</font>
-<a name="line261">261: </a><font color="#B22222">   Singular triplets are indexed according to the ordering criterion established</font>
-<a name="line262">262: </a><font color="#B22222">   with <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>().</font>
-
-<a name="line264">264: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line266">266: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(), <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>()</font>
-<a name="line267">267: </a><font color="#B22222">@*/</font>
-<a name="line268">268: </a><strong><font color="#4169E1"><a name="SVDGetSingularTriplet"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)</font></strong>
-<a name="line269">269: </a>{
-<a name="line271">271: </a>  PetscInt       M,N;
-<a name="line272">272: </a>  Vec            w;
-
-<a name="line277">277: </a>  SVDCheckSolved(svd,1);
-<a name="line280">280: </a>  <font color="#4169E1">if</font> (i<0 || i>=svd->nconv) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
-<a name="line281">281: </a>  *sigma = svd->sigma[svd->perm[i]];
-<a name="line282">282: </a>  MatGetSize(svd->OP,&M,&N);
-<a name="line283">283: </a>  <font color="#4169E1">if</font> (M<N) { w = u; u = v; v = w; }
-<a name="line284">284: </a>  <font color="#4169E1">if</font> (u) {
-<a name="line285">285: </a>    SVDComputeVectors(svd);
-<a name="line286">286: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(svd->U,svd->perm[i],u);
-<a name="line287">287: </a>  }
-<a name="line288">288: </a>  <font color="#4169E1">if</font> (v) {
-<a name="line289">289: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(svd->V,svd->perm[i],v);
-<a name="line290">290: </a>  }
-<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
-<a name="line292">292: </a>}
-
-<a name="line296">296: </a><font color="#B22222">/*</font>
-<a name="line297">297: </a><font color="#B22222">   SVDComputeResidualNorms_Private - Computes the norms of the left and</font>
-<a name="line298">298: </a><font color="#B22222">   right residuals associated with the i-th computed singular triplet.</font>
-<a name="line299">299: </a><font color="#B22222">@*/</font>
-<a name="line300">300: </a><strong><font color="#4169E1"><a name="SVDComputeResidualNorms_Private"></a>static PetscErrorCode SVDComputeResidualNorms_Private(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *norm1,PetscReal *norm2)</font></strong>
-<a name="line301">301: </a>{
-<a name="line303">303: </a>  Vec            u,v,x = NULL,y = NULL;
-<a name="line304">304: </a>  PetscReal      sigma;
-<a name="line305">305: </a>  PetscInt       M,N;
-
-<a name="line308">308: </a>  MatCreateVecs(svd->OP,&v,&u);
-<a name="line309">309: </a>  <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,&sigma,u,v);
-<a name="line310">310: </a>  <font color="#B22222">/* norm1 = ||A*v-sigma*u||_2 */</font>
-<a name="line311">311: </a>  <font color="#4169E1">if</font> (norm1) {
-<a name="line312">312: </a>    VecDuplicate(u,&x);
-<a name="line313">313: </a>    MatMult(svd->OP,v,x);
-<a name="line314">314: </a>    VecAXPY(x,-sigma,u);
-<a name="line315">315: </a>    VecNorm(x,NORM_2,norm1);
-<a name="line316">316: </a>  }
-<a name="line317">317: </a>  <font color="#B22222">/* norm2 = ||A^T*u-sigma*v||_2 */</font>
-<a name="line318">318: </a>  <font color="#4169E1">if</font> (norm2) {
-<a name="line319">319: </a>    VecDuplicate(v,&y);
-<a name="line320">320: </a>    <font color="#4169E1">if</font> (svd->A && svd->AT) {
-<a name="line321">321: </a>      MatGetSize(svd->OP,&M,&N);
-<a name="line322">322: </a>      <font color="#4169E1">if</font> (M<N) {
-<a name="line323">323: </a>        MatMult(svd->A,u,y);
-<a name="line324">324: </a>      } <font color="#4169E1">else</font> {
-<a name="line325">325: </a>        MatMult(svd->AT,u,y);
-<a name="line326">326: </a>      }
-<a name="line327">327: </a>    } <font color="#4169E1">else</font> {
-<a name="line328">328: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line329">329: </a>      MatMultHermitianTranspose(svd->OP,u,y);
-<a name="line330">330: </a><font color="#A020F0">#else</font>
-<a name="line331">331: </a>      MatMultTranspose(svd->OP,u,y);
-<a name="line332">332: </a><font color="#A020F0">#endif</font>
-<a name="line333">333: </a>    }
-<a name="line334">334: </a>    VecAXPY(y,-sigma,v);
-<a name="line335">335: </a>    VecNorm(y,NORM_2,norm2);
-<a name="line336">336: </a>  }
-
-<a name="line338">338: </a>  VecDestroy(&v);
-<a name="line339">339: </a>  VecDestroy(&u);
-<a name="line340">340: </a>  VecDestroy(&x);
-<a name="line341">341: </a>  VecDestroy(&y);
-<a name="line342">342: </a>  <font color="#4169E1">return</font>(0);
-<a name="line343">343: </a>}
-
-<a name="line347">347: </a><font color="#B22222">/*@</font>
-<a name="line348">348: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a> - Computes the error (based on the residual norm) associated</font>
-<a name="line349">349: </a><font color="#B22222">   with the i-th singular triplet.</font>
-
-<a name="line351">351: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line353">353: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line354">354: </a><font color="#B22222">+  svd  - the singular value solver context</font>
-<a name="line355">355: </a><font color="#B22222">.  i    - the solution index</font>
-<a name="line356">356: </a><font color="#B22222">-  type - the type of error to compute</font>
-
-<a name="line358">358: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line359">359: </a><font color="#B22222">.  error - the error</font>
-
-<a name="line361">361: </a><font color="#B22222">   Notes:</font>
-<a name="line362">362: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
-<a name="line363">363: </a><font color="#B22222">   norm obtained as sqrt(n1^2+n2^2) with n1 = ||A*v-sigma*u||_2 and</font>
-<a name="line364">364: </a><font color="#B22222">   n2 = ||A^T*u-sigma*v||_2, where sigma is the singular value, u is the left</font>
-<a name="line365">365: </a><font color="#B22222">   singular vector and v is the right singular vector.</font>
-
-<a name="line367">367: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line369">369: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>, <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>()</font>
-<a name="line370">370: </a><font color="#B22222">@*/</font>
-<a name="line371">371: </a><strong><font color="#4169E1"><a name="SVDComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> type,PetscReal *error)</font></strong>
-<a name="line372">372: </a>{
-<a name="line374">374: </a>  PetscReal      sigma,norm1,norm2;
-
-<a name="line381">381: </a>  SVDCheckSolved(svd,1);
-<a name="line382">382: </a>  <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,&sigma,NULL,NULL);
-<a name="line383">383: </a>  SVDComputeResidualNorms_Private(svd,i,&norm1,&norm2);
-<a name="line384">384: </a>  *error = PetscSqrtReal(norm1*norm1+norm2*norm2);
-<a name="line385">385: </a>  <font color="#4169E1">switch</font> (type) {
-<a name="line386">386: </a>    <font color="#4169E1">case</font> SVD_ERROR_ABSOLUTE:
-<a name="line387">387: </a>      <font color="#4169E1">break</font>;
-<a name="line388">388: </a>    <font color="#4169E1">case</font> SVD_ERROR_RELATIVE:
-<a name="line389">389: </a>      *error /= sigma;
-<a name="line390">390: </a>      <font color="#4169E1">break</font>;
-<a name="line391">391: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line392">392: </a>      SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
-<a name="line393">393: </a>  }
-<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
-<a name="line395">395: </a>}
+<a name="line189">189: </a><font color="#B22222">.  SVD_CONVERGED_USER - converged due to a user-defined condition</font>
+<a name="line190">190: </a><font color="#B22222">.  SVD_DIVERGED_ITS - required more than max_it iterations to reach convergence</font>
+<a name="line191">191: </a><font color="#B22222">-  SVD_DIVERGED_BREAKDOWN - generic breakdown in method</font>
+
+<a name="line193">193: </a><font color="#B22222">   Note:</font>
+<a name="line194">194: </a><font color="#B22222">   Can only be called after the call to <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() is complete.</font>
+
+<a name="line196">196: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line198">198: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(), <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a></font>
+<a name="line199">199: </a><font color="#B22222">@*/</font>
+<a name="line200">200: </a><strong><font color="#4169E1"><a name="SVDGetConvergedReason"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetConvergedReason.html#SVDGetConvergedReason">SVDGetConvergedReason</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDConvergedReason.html#SVDConvergedReason">SVDConvergedReason</a> *reason)</font></strong>
+<a name="line201">201: </a>{
+<a name="line205">205: </a>  SVDCheckSolved(svd,1);
+<a name="line206">206: </a>  *reason = svd->reason;
+<a name="line207">207: </a>  <font color="#4169E1">return</font>(0);
+<a name="line208">208: </a>}
+
+<a name="line212">212: </a><font color="#B22222">/*@</font>
+<a name="line213">213: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a> - Gets the number of converged singular values.</font>
+
+<a name="line215">215: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line217">217: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line218">218: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line220">220: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line221">221: </a><font color="#B22222">.  nconv - number of converged singular values</font>
+
+<a name="line223">223: </a><font color="#B22222">   Note:</font>
+<a name="line224">224: </a><font color="#B22222">   This function should be called after <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>() has finished.</font>
+
+<a name="line226">226: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line228">228: </a><font color="#B22222">@*/</font>
+<a name="line229">229: </a><strong><font color="#4169E1"><a name="SVDGetConverged"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt *nconv)</font></strong>
+<a name="line230">230: </a>{
+<a name="line234">234: </a>  SVDCheckSolved(svd,1);
+<a name="line235">235: </a>  *nconv = svd->nconv;
+<a name="line236">236: </a>  <font color="#4169E1">return</font>(0);
+<a name="line237">237: </a>}
+
+<a name="line241">241: </a><font color="#B22222">/*@</font>
+<a name="line242">242: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a> - Gets the i-th triplet of the singular value decomposition</font>
+<a name="line243">243: </a><font color="#B22222">   as computed by <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(). The solution consists in the singular value and its left</font>
+<a name="line244">244: </a><font color="#B22222">   and right singular vectors.</font>
+
+<a name="line246">246: </a><font color="#B22222">   Not Collective, but vectors are shared by all processors that share the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line248">248: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line249">249: </a><font color="#B22222">+  svd - singular value solver context</font>
+<a name="line250">250: </a><font color="#B22222">-  i   - index of the solution</font>
+
+<a name="line252">252: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line253">253: </a><font color="#B22222">+  sigma - singular value</font>
+<a name="line254">254: </a><font color="#B22222">.  u     - left singular vector</font>
+<a name="line255">255: </a><font color="#B22222">-  v     - right singular vector</font>
+
+<a name="line257">257: </a><font color="#B22222">   Note:</font>
+<a name="line258">258: </a><font color="#B22222">   Both U or V can be NULL if singular vectors are not required.</font>
+<a name="line259">259: </a><font color="#B22222">   Otherwise, the caller must provide valid Vec objects, i.e.,</font>
+<a name="line260">260: </a><font color="#B22222">   they must be created by the calling program with e.g. MatCreateVecs().</font>
+
+<a name="line262">262: </a><font color="#B22222">   The index i should be a value between 0 and nconv-1 (see <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>()).</font>
+<a name="line263">263: </a><font color="#B22222">   Singular triplets are indexed according to the ordering criterion established</font>
+<a name="line264">264: </a><font color="#B22222">   with <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>().</font>
+
+<a name="line266">266: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line268">268: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDGetConverged.html#SVDGetConverged">SVDGetConverged</a>(), <a href="../../../docs/manualpages/SVD/SVDSetWhichSingularTriplets.html#SVDSetWhichSingularTriplets">SVDSetWhichSingularTriplets</a>()</font>
+<a name="line269">269: </a><font color="#B22222">@*/</font>
+<a name="line270">270: </a><strong><font color="#4169E1"><a name="SVDGetSingularTriplet"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *sigma,Vec u,Vec v)</font></strong>
+<a name="line271">271: </a>{
+<a name="line273">273: </a>  PetscInt       M,N;
+<a name="line274">274: </a>  Vec            w;
+
+<a name="line279">279: </a>  SVDCheckSolved(svd,1);
+<a name="line282">282: </a>  <font color="#4169E1">if</font> (i<0 || i>=svd->nconv) SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument 2 out of range"</font>);
+<a name="line283">283: </a>  *sigma = svd->sigma[svd->perm[i]];
+<a name="line284">284: </a>  MatGetSize(svd->OP,&M,&N);
+<a name="line285">285: </a>  <font color="#4169E1">if</font> (M<N) { w = u; u = v; v = w; }
+<a name="line286">286: </a>  <font color="#4169E1">if</font> (u) {
+<a name="line287">287: </a>    SVDComputeVectors(svd);
+<a name="line288">288: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(svd->U,svd->perm[i],u);
+<a name="line289">289: </a>  }
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (v) {
+<a name="line291">291: </a>    <a href="../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(svd->V,svd->perm[i],v);
+<a name="line292">292: </a>  }
+<a name="line293">293: </a>  <font color="#4169E1">return</font>(0);
+<a name="line294">294: </a>}
+
+<a name="line298">298: </a><font color="#B22222">/*</font>
+<a name="line299">299: </a><font color="#B22222">   SVDComputeResidualNorms_Private - Computes the norms of the left and</font>
+<a name="line300">300: </a><font color="#B22222">   right residuals associated with the i-th computed singular triplet.</font>
+<a name="line301">301: </a><font color="#B22222">@*/</font>
+<a name="line302">302: </a><strong><font color="#4169E1"><a name="SVDComputeResidualNorms_Private"></a>static PetscErrorCode SVDComputeResidualNorms_Private(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,PetscReal *norm1,PetscReal *norm2)</font></strong>
+<a name="line303">303: </a>{
+<a name="line305">305: </a>  Vec            u,v,x = NULL,y = NULL;
+<a name="line306">306: </a>  PetscReal      sigma;
+<a name="line307">307: </a>  PetscInt       M,N;
+
+<a name="line310">310: </a>  MatCreateVecs(svd->OP,&v,&u);
+<a name="line311">311: </a>  <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,&sigma,u,v);
+<a name="line312">312: </a>  <font color="#B22222">/* norm1 = ||A*v-sigma*u||_2 */</font>
+<a name="line313">313: </a>  <font color="#4169E1">if</font> (norm1) {
+<a name="line314">314: </a>    VecDuplicate(u,&x);
+<a name="line315">315: </a>    MatMult(svd->OP,v,x);
+<a name="line316">316: </a>    VecAXPY(x,-sigma,u);
+<a name="line317">317: </a>    VecNorm(x,NORM_2,norm1);
+<a name="line318">318: </a>  }
+<a name="line319">319: </a>  <font color="#B22222">/* norm2 = ||A^T*u-sigma*v||_2 */</font>
+<a name="line320">320: </a>  <font color="#4169E1">if</font> (norm2) {
+<a name="line321">321: </a>    VecDuplicate(v,&y);
+<a name="line322">322: </a>    <font color="#4169E1">if</font> (svd->A && svd->AT) {
+<a name="line323">323: </a>      MatGetSize(svd->OP,&M,&N);
+<a name="line324">324: </a>      <font color="#4169E1">if</font> (M<N) {
+<a name="line325">325: </a>        MatMult(svd->A,u,y);
+<a name="line326">326: </a>      } <font color="#4169E1">else</font> {
+<a name="line327">327: </a>        MatMult(svd->AT,u,y);
+<a name="line328">328: </a>      }
+<a name="line329">329: </a>    } <font color="#4169E1">else</font> {
+<a name="line330">330: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line331">331: </a>      MatMultHermitianTranspose(svd->OP,u,y);
+<a name="line332">332: </a><font color="#A020F0">#else</font>
+<a name="line333">333: </a>      MatMultTranspose(svd->OP,u,y);
+<a name="line334">334: </a><font color="#A020F0">#endif</font>
+<a name="line335">335: </a>    }
+<a name="line336">336: </a>    VecAXPY(y,-sigma,v);
+<a name="line337">337: </a>    VecNorm(y,NORM_2,norm2);
+<a name="line338">338: </a>  }
+
+<a name="line340">340: </a>  VecDestroy(&v);
+<a name="line341">341: </a>  VecDestroy(&u);
+<a name="line342">342: </a>  VecDestroy(&x);
+<a name="line343">343: </a>  VecDestroy(&y);
+<a name="line344">344: </a>  <font color="#4169E1">return</font>(0);
+<a name="line345">345: </a>}
+
+<a name="line349">349: </a><font color="#B22222">/*@</font>
+<a name="line350">350: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a> - Computes the error (based on the residual norm) associated</font>
+<a name="line351">351: </a><font color="#B22222">   with the i-th singular triplet.</font>
+
+<a name="line353">353: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line355">355: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line356">356: </a><font color="#B22222">+  svd  - the singular value solver context</font>
+<a name="line357">357: </a><font color="#B22222">.  i    - the solution index</font>
+<a name="line358">358: </a><font color="#B22222">-  type - the type of error to compute</font>
+
+<a name="line360">360: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line361">361: </a><font color="#B22222">.  error - the error</font>
+
+<a name="line363">363: </a><font color="#B22222">   Notes:</font>
+<a name="line364">364: </a><font color="#B22222">   The error can be computed in various ways, all of them based on the residual</font>
+<a name="line365">365: </a><font color="#B22222">   norm obtained as sqrt(n1^2+n2^2) with n1 = ||A*v-sigma*u||_2 and</font>
+<a name="line366">366: </a><font color="#B22222">   n2 = ||A^T*u-sigma*v||_2, where sigma is the singular value, u is the left</font>
+<a name="line367">367: </a><font color="#B22222">   singular vector and v is the right singular vector.</font>
+
+<a name="line369">369: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line371">371: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a>, <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>()</font>
+<a name="line372">372: </a><font color="#B22222">@*/</font>
+<a name="line373">373: </a><strong><font color="#4169E1"><a name="SVDComputeError"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscInt i,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> type,PetscReal *error)</font></strong>
+<a name="line374">374: </a>{
+<a name="line376">376: </a>  PetscReal      sigma,norm1,norm2;
+
+<a name="line383">383: </a>  SVDCheckSolved(svd,1);
+<a name="line384">384: </a>  <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,&sigma,NULL,NULL);
+<a name="line385">385: </a>  SVDComputeResidualNorms_Private(svd,i,&norm1,&norm2);
+<a name="line386">386: </a>  *error = PetscSqrtReal(norm1*norm1+norm2*norm2);
+<a name="line387">387: </a>  <font color="#4169E1">switch</font> (type) {
+<a name="line388">388: </a>    <font color="#4169E1">case</font> SVD_ERROR_ABSOLUTE:
+<a name="line389">389: </a>      <font color="#4169E1">break</font>;
+<a name="line390">390: </a>    <font color="#4169E1">case</font> SVD_ERROR_RELATIVE:
+<a name="line391">391: </a>      *error /= sigma;
+<a name="line392">392: </a>      <font color="#4169E1">break</font>;
+<a name="line393">393: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line394">394: </a>      SETERRQ(PetscObjectComm((PetscObject)svd),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid error type"</font>);
+<a name="line395">395: </a>  }
+<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
+<a name="line397">397: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/interface/svdview.c b/src/svd/interface/svdview.c
index 1a06975..191822d 100644
--- a/src/svd/interface/svdview.c
+++ b/src/svd/interface/svdview.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -83,6 +83,17 @@ PetscErrorCode SVDView(SVD svd,PetscViewer viewer)
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum dimension of projected problem (mpd): %D\n",svd->mpd);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  maximum number of iterations: %D\n",svd->max_it);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"  tolerance: %g\n",(double)svd->tol);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  convergence test: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+    switch (svd->conv) {
+    case SVD_CONV_ABS:
+      ierr = PetscViewerASCIIPrintf(viewer,"absolute\n");CHKERRQ(ierr);break;
+    case SVD_CONV_REL:
+      ierr = PetscViewerASCIIPrintf(viewer,"relative to the singular value\n");CHKERRQ(ierr);break;
+    case SVD_CONV_USER:
+      ierr = PetscViewerASCIIPrintf(viewer,"user-defined\n");CHKERRQ(ierr);break;
+    }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     if (svd->nini) {
       ierr = PetscViewerASCIIPrintf(viewer,"  dimension of user-provided initial space: %D\n",PetscAbs(svd->nini));CHKERRQ(ierr);
     }
@@ -134,7 +145,7 @@ PetscErrorCode SVDReasonView(SVD svd,PetscViewer viewer)
   if (isAscii) {
     ierr = PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);CHKERRQ(ierr);
     if (svd->reason > 0) {
-      ierr = PetscViewerASCIIPrintf(viewer,"%s SVD solve converged (%d singular triplet%s) due to %s; iterations %D\n",((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:"",svd->nconv,(svd->nconv>1)?"s":"",SVDConvergedReasons[svd->reason],svd->its);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"%s SVD solve converged (%D singular triplet%s) due to %s; iterations %D\n",((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:"",svd->nconv,(svd->nconv>1)?"s":"",SVDConvergedReasons[svd->reason],svd->its);CHKERRQ(ierr);
     } else {
       ierr = PetscViewerASCIIPrintf(viewer,"%s SVD solve did not converge due to %s; iterations %D\n",((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:"",SVDConvergedReasons[svd->reason],svd->its);CHKERRQ(ierr);
     }
@@ -386,6 +397,7 @@ static PetscErrorCode SVDValuesView_DRAW(SVD svd,PetscViewer viewer)
     ierr = PetscDrawSPAddPoint(drawsp,&re,&im);CHKERRQ(ierr);
   }
   ierr = PetscDrawSPDraw(drawsp,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = PetscDrawSPSave(drawsp);CHKERRQ(ierr);
   ierr = PetscDrawSPDestroy(&drawsp);CHKERRQ(ierr);
   ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -550,12 +562,12 @@ PetscErrorCode SVDVectorsView(SVD svd,PetscViewer viewer)
     ierr = SVDComputeVectors(svd);CHKERRQ(ierr);
     for (i=0;i<svd->nconv;i++) {
       k = svd->perm[i];
-      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",i,ename);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(vname,NMLEN,"V%d_%s",(int)i,ename);CHKERRQ(ierr);
       ierr = BVGetColumn(svd->V,k,&x);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)x,vname);CHKERRQ(ierr);
       ierr = VecView(x,viewer);CHKERRQ(ierr);
       ierr = BVRestoreColumn(svd->V,k,&x);CHKERRQ(ierr);
-      ierr = PetscSNPrintf(vname,NMLEN,"U%d_%s",i,ename);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(vname,NMLEN,"U%d_%s",(int)i,ename);CHKERRQ(ierr);
       ierr = BVGetColumn(svd->U,k,&x);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)x,vname);CHKERRQ(ierr);
       ierr = VecView(x,viewer);CHKERRQ(ierr);
diff --git a/src/svd/interface/svdview.c.html b/src/svd/interface/svdview.c.html
index e6dd78f..02ade59 100644
--- a/src/svd/interface/svdview.c.html
+++ b/src/svd/interface/svdview.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/interface/svdview.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:35+00:00">
+<meta name="date" content="2016-05-16T10:33:33+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/interface/svdview.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/interface/svdview.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   The <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> routines related to various viewers.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -88,463 +88,475 @@
 <a name="line83"> 83: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum dimension of projected problem (mpd): %D\n"</font>,svd->mpd);
 <a name="line84"> 84: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  maximum number of iterations: %D\n"</font>,svd->max_it);
 <a name="line85"> 85: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  tolerance: %g\n"</font>,(double)svd->tol);
-<a name="line86"> 86: </a>    <font color="#4169E1">if</font> (svd->nini) {
-<a name="line87"> 87: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(svd->nini));
-<a name="line88"> 88: </a>    }
-<a name="line89"> 89: </a>    <font color="#4169E1">if</font> (svd->ninil) {
-<a name="line90"> 90: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial left space: %D\n"</font>,PetscAbs(svd->ninil));
-<a name="line91"> 91: </a>    }
-<a name="line92"> 92: </a>  } <font color="#4169E1">else</font> {
-<a name="line93"> 93: </a>    <font color="#4169E1">if</font> (svd->ops->view) {
-<a name="line94"> 94: </a>      (*svd->ops->view)(svd,viewer);
+<a name="line86"> 86: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  convergence test: "</font>);
+<a name="line87"> 87: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line88"> 88: </a>    <font color="#4169E1">switch</font> (svd->conv) {
+<a name="line89"> 89: </a>    <font color="#4169E1">case</font> SVD_CONV_ABS:
+<a name="line90"> 90: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"absolute\n"</font>);<font color="#4169E1">break</font>;
+<a name="line91"> 91: </a>    <font color="#4169E1">case</font> SVD_CONV_REL:
+<a name="line92"> 92: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"relative to the singular value\n"</font>);<font color="#4169E1">break</font>;
+<a name="line93"> 93: </a>    <font color="#4169E1">case</font> SVD_CONV_USER:
+<a name="line94"> 94: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"user-defined\n"</font>);<font color="#4169E1">break</font>;
 <a name="line95"> 95: </a>    }
-<a name="line96"> 96: </a>  }
-<a name="line97"> 97: </a>  PetscObjectTypeCompareAny((PetscObject)svd,&isshell,SVDCROSS,SVDCYCLIC,<font color="#666666">""</font>);
-<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (!isshell) {
-<a name="line99"> 99: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
-<a name="line100">100: </a>    <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,NULL); }
-<a name="line101">101: </a>    <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(svd->V,viewer);
-<a name="line102">102: </a>    <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
-<a name="line103">103: </a>    <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(svd->ds,viewer);
-<a name="line104">104: </a>    PetscViewerPopFormat(viewer);
-<a name="line105">105: </a>  }
-<a name="line106">106: </a>  <font color="#4169E1">return</font>(0);
-<a name="line107">107: </a>}
-
-<a name="line111">111: </a><font color="#B22222">/*@C</font>
-<a name="line112">112: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a> - Displays the reason an <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> solve converged or diverged.</font>
-
-<a name="line114">114: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line116">116: </a><font color="#B22222">   Parameter:</font>
-<a name="line117">117: </a><font color="#B22222">+  svd - the singular value solver context</font>
-<a name="line118">118: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
-
-<a name="line120">120: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line121">121: </a><font color="#B22222">.  -svd_converged_reason - print reason for convergence, and number of iterations</font>
-
-<a name="line123">123: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line125">125: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(), <a href="../../../docs/manualpages/SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</a>()</font>
-<a name="line126">126: </a><font color="#B22222">@*/</font>
-<a name="line127">127: </a><strong><font color="#4169E1"><a name="SVDReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line128">128: </a>{
-<a name="line130">130: </a>  PetscBool      isAscii;
-
-<a name="line133">133: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
-<a name="line134">134: </a>  <font color="#4169E1">if</font> (isAscii) {
-<a name="line135">135: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line136">136: </a>    <font color="#4169E1">if</font> (svd->reason > 0) {
-<a name="line137">137: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> solve converged (%d singular triplet%s) due to %s; iterations %D\n"</font>,((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:<font color="#666666">""</font>,svd->nconv,(svd->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,SVDConvergedReasons[svd->reason],svd->its);
-<a name="line138">138: </a>    } <font color="#4169E1">else</font> {
-<a name="line139">139: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> solve did not converge due to %s; iterations %D\n"</font>,((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:<font color="#666666">""</font>,SVDConvergedReasons[svd->reason],svd->its);
-<a name="line140">140: </a>    }
-<a name="line141">141: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
-<a name="line142">142: </a>  }
-<a name="line143">143: </a>  <font color="#4169E1">return</font>(0);
-<a name="line144">144: </a>}
-
-<a name="line148">148: </a><font color="#B22222">/*@</font>
-<a name="line149">149: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line150">150: </a><font color="#B22222">   the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> converged reason is to be viewed. </font>
-
-<a name="line152">152: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line154">154: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line155">155: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line157">157: </a><font color="#B22222">   Level: developer</font>
-<a name="line158">158: </a><font color="#B22222">@*/</font>
-<a name="line159">159: </a><strong><font color="#4169E1"><a name="SVDReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line160">160: </a>{
-<a name="line161">161: </a>  PetscErrorCode    ierr;
-<a name="line162">162: </a>  PetscViewer       viewer;
-<a name="line163">163: </a>  PetscBool         flg;
-<a name="line164">164: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line165">165: </a>  PetscViewerFormat format;
-
-<a name="line168">168: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line169">169: </a>  incall = PETSC_TRUE;
-<a name="line170">170: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_converged_reason"</font>,&viewer,&format,&flg);
-<a name="line171">171: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line172">172: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line173">173: </a>    <a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>(svd,viewer);
-<a name="line174">174: </a>    PetscViewerPopFormat(viewer);
-<a name="line175">175: </a>    PetscViewerDestroy(&viewer);
-<a name="line176">176: </a>  }
-<a name="line177">177: </a>  incall = PETSC_FALSE;
-<a name="line178">178: </a>  <font color="#4169E1">return</font>(0);
-<a name="line179">179: </a>}
-
-<a name="line183">183: </a><strong><font color="#4169E1"><a name="SVDErrorView_ASCII"></a>static PetscErrorCode SVDErrorView_ASCII(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line184">184: </a>{
-<a name="line185">185: </a>  PetscBool      errok;
-<a name="line186">186: </a>  PetscReal      error,sigma;
-<a name="line187">187: </a>  PetscInt       i,j;
-
-<a name="line191">191: </a>  <font color="#4169E1">if</font> (svd->nconv<svd->nsv) {
-<a name="line192">192: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D singular values converged\n\n"</font>,svd->nsv);
-<a name="line193">193: </a>    <font color="#4169E1">return</font>(0);
-<a name="line194">194: </a>  }
-<a name="line195">195: </a>  errok = PETSC_TRUE;
-<a name="line196">196: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nsv;i++) {
-<a name="line197">197: </a>    <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,etype,&error);
-<a name="line198">198: </a>    errok = (errok && error<5.0*svd->tol)? PETSC_TRUE: PETSC_FALSE;
-<a name="line199">199: </a>  }
-<a name="line200">200: </a>  <font color="#4169E1">if</font> (!errok) {
-<a name="line201">201: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,svd->nsv);
-<a name="line202">202: </a>    <font color="#4169E1">return</font>(0);
-<a name="line203">203: </a>  }
-<a name="line204">204: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested singular values computed up to the required tolerance:"</font>);
-<a name="line205">205: </a>  <font color="#4169E1">for</font> (i=0;i<=(svd->nsv-1)/8;i++) {
-<a name="line206">206: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
-<a name="line207">207: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,svd->nsv-8*i);j++) {
-<a name="line208">208: </a>      <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,8*i+j,&sigma,NULL,NULL);
-<a name="line209">209: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)sigma);
-<a name="line210">210: </a>      <font color="#4169E1">if</font> (8*i+j+1<svd->nsv) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
-<a name="line211">211: </a>    }
-<a name="line212">212: </a>  }
-<a name="line213">213: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
-<a name="line214">214: </a>  <font color="#4169E1">return</font>(0);
-<a name="line215">215: </a>}
-
-<a name="line219">219: </a><strong><font color="#4169E1"><a name="SVDErrorView_DETAIL"></a>static PetscErrorCode SVDErrorView_DETAIL(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line220">220: </a>{
-<a name="line222">222: </a>  PetscReal      error,sigma;
-<a name="line223">223: </a>  PetscInt       i;
-<a name="line224">224: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
-<a name="line225">225: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
-
-<a name="line228">228: </a>  <font color="#4169E1">if</font> (!svd->nconv) <font color="#4169E1">return</font>(0);
-<a name="line229">229: </a>  <font color="#4169E1">switch</font> (etype) {
-<a name="line230">230: </a>    <font color="#4169E1">case</font> SVD_ERROR_ABSOLUTE:
-<a name="line231">231: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">" absolute error"</font>);
-<a name="line232">232: </a>      <font color="#4169E1">break</font>;
-<a name="line233">233: </a>    <font color="#4169E1">case</font> SVD_ERROR_RELATIVE:
-<a name="line234">234: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">" relative error"</font>);
-<a name="line235">235: </a>      <font color="#4169E1">break</font>;
-<a name="line236">236: </a>  }
-<a name="line237">237: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s          sigma           %s\n%s"</font>,sep,ex,sep);
-<a name="line238">238: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line239">239: </a>    <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,&sigma,NULL,NULL);
-<a name="line240">240: </a>    <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,etype,&error);
-<a name="line241">241: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"       % 6f          %12g\n"</font>,(double)sigma,(double)error);
-<a name="line242">242: </a>  }
-<a name="line243">243: </a>  PetscViewerASCIIPrintf(viewer,sep);
-<a name="line244">244: </a>  <font color="#4169E1">return</font>(0);
-<a name="line245">245: </a>}
-
-<a name="line249">249: </a><strong><font color="#4169E1"><a name="SVDErrorView_MATLAB"></a>static PetscErrorCode SVDErrorView_MATLAB(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line250">250: </a>{
-<a name="line252">252: </a>  PetscReal      error;
-<a name="line253">253: </a>  PetscInt       i;
-<a name="line254">254: </a>  const char     *name;
-
-<a name="line257">257: </a>  PetscObjectGetName((PetscObject)svd,&name);
-<a name="line258">258: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
-<a name="line259">259: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line260">260: </a>    <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,etype,&error);
-<a name="line261">261: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
-<a name="line262">262: </a>  }
-<a name="line263">263: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
-<a name="line265">265: </a>}
-
-<a name="line269">269: </a><font color="#B22222">/*@C</font>
-<a name="line270">270: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a> - Displays the errors associated with the computed solution</font>
-<a name="line271">271: </a><font color="#B22222">   (as well as the singular values).</font>
-
-<a name="line273">273: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line275">275: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line276">276: </a><font color="#B22222">+  svd    - the singular value solver context</font>
-<a name="line277">277: </a><font color="#B22222">.  etype  - error type</font>
-<a name="line278">278: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line280">280: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line281">281: </a><font color="#B22222">+  -svd_error_absolute - print absolute errors of each singular triplet</font>
-<a name="line282">282: </a><font color="#B22222">-  -svd_error_relative - print relative errors of each singular triplet</font>
-
-<a name="line284">284: </a><font color="#B22222">   Notes:</font>
-<a name="line285">285: </a><font color="#B22222">   By default, this function checks the error of all singular triplets and prints</font>
-<a name="line286">286: </a><font color="#B22222">   the singular values if all of them are below the requested tolerance.</font>
-<a name="line287">287: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
-<a name="line288">288: </a><font color="#B22222">   singular values and corresponding errors is printed.</font>
-
-<a name="line290">290: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line292">292: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(), <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>()</font>
-<a name="line293">293: </a><font color="#B22222">@*/</font>
-<a name="line294">294: </a><strong><font color="#4169E1"><a name="SVDErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
-<a name="line295">295: </a>{
-<a name="line296">296: </a>  PetscBool         isascii;
-<a name="line297">297: </a>  PetscViewerFormat format;
-<a name="line298">298: </a>  PetscErrorCode    ierr;
-
-<a name="line302">302: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
-<a name="line305">305: </a>  SVDCheckSolved(svd,1);
-<a name="line306">306: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line307">307: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
-
-<a name="line309">309: </a>  PetscViewerGetFormat(viewer,&format);
-<a name="line310">310: </a>  <font color="#4169E1">switch</font> (format) {
-<a name="line311">311: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line312">312: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line313">313: </a>      SVDErrorView_ASCII(svd,etype,viewer);
-<a name="line314">314: </a>      <font color="#4169E1">break</font>;
-<a name="line315">315: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line316">316: </a>      SVDErrorView_DETAIL(svd,etype,viewer);
-<a name="line317">317: </a>      <font color="#4169E1">break</font>;
-<a name="line318">318: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line319">319: </a>      SVDErrorView_MATLAB(svd,etype,viewer);
-<a name="line320">320: </a>      <font color="#4169E1">break</font>;
-<a name="line321">321: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line322">322: </a>      PetscInfo1(svd,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line323">323: </a>  }
-<a name="line324">324: </a>  <font color="#4169E1">return</font>(0);
-<a name="line325">325: </a>}
-
-<a name="line329">329: </a><font color="#B22222">/*@</font>
-<a name="line330">330: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line331">331: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
-
-<a name="line333">333: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line335">335: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line336">336: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line338">338: </a><font color="#B22222">   Level: developer</font>
-<a name="line339">339: </a><font color="#B22222">@*/</font>
-<a name="line340">340: </a><strong><font color="#4169E1"><a name="SVDErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line341">341: </a>{
-<a name="line342">342: </a>  PetscErrorCode    ierr;
-<a name="line343">343: </a>  PetscViewer       viewer;
-<a name="line344">344: </a>  PetscBool         flg;
-<a name="line345">345: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line346">346: </a>  PetscViewerFormat format;
-
-<a name="line349">349: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line350">350: </a>  incall = PETSC_TRUE;
-<a name="line351">351: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_error_absolute"</font>,&viewer,&format,&flg);
-<a name="line352">352: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line353">353: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line354">354: </a>    <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_ABSOLUTE,viewer);
-<a name="line355">355: </a>    PetscViewerPopFormat(viewer);
-<a name="line356">356: </a>    PetscViewerDestroy(&viewer);
-<a name="line357">357: </a>  }
-<a name="line358">358: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_error_relative"</font>,&viewer,&format,&flg);
-<a name="line359">359: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line360">360: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line361">361: </a>    <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_RELATIVE,viewer);
-<a name="line362">362: </a>    PetscViewerPopFormat(viewer);
-<a name="line363">363: </a>    PetscViewerDestroy(&viewer);
-<a name="line364">364: </a>  }
-<a name="line365">365: </a>  incall = PETSC_FALSE;
-<a name="line366">366: </a>  <font color="#4169E1">return</font>(0);
-<a name="line367">367: </a>}
-
-<a name="line371">371: </a><strong><font color="#4169E1"><a name="SVDValuesView_DRAW"></a>static PetscErrorCode SVDValuesView_DRAW(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line372">372: </a>{
-<a name="line374">374: </a>  PetscDraw      draw;
-<a name="line375">375: </a>  PetscDrawSP    drawsp;
-<a name="line376">376: </a>  PetscReal      re,im=0.0;
-<a name="line377">377: </a>  PetscInt       i;
-
-<a name="line380">380: </a>  <font color="#4169E1">if</font> (!svd->nconv) <font color="#4169E1">return</font>(0);
-<a name="line381">381: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed singular values"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
-<a name="line382">382: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
-<a name="line383">383: </a>  PetscDrawSPCreate(draw,1,&drawsp);
-<a name="line384">384: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line385">385: </a>    re = svd->sigma[svd->perm[i]];
-<a name="line386">386: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
-<a name="line387">387: </a>  }
-<a name="line388">388: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
-<a name="line389">389: </a>  PetscDrawSPDestroy(&drawsp);
-<a name="line390">390: </a>  PetscViewerDestroy(&viewer);
-<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
-<a name="line392">392: </a>}
-
-<a name="line396">396: </a><strong><font color="#4169E1"><a name="SVDValuesView_ASCII"></a>static PetscErrorCode SVDValuesView_ASCII(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line397">397: </a>{
-<a name="line398">398: </a>  PetscInt       i;
-
-<a name="line402">402: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Singular values = \n"</font>);
-<a name="line403">403: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line404">404: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)svd->sigma[svd->perm[i]]);
-<a name="line405">405: </a>  }
-<a name="line406">406: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line407">407: </a>  <font color="#4169E1">return</font>(0);
-<a name="line408">408: </a>}
-
-<a name="line412">412: </a><strong><font color="#4169E1"><a name="SVDValuesView_MATLAB"></a>static PetscErrorCode SVDValuesView_MATLAB(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line413">413: </a>{
-<a name="line415">415: </a>  PetscInt       i;
-<a name="line416">416: </a>  const char     *name;
-
-<a name="line419">419: </a>  PetscObjectGetName((PetscObject)svd,&name);
-<a name="line420">420: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Sigma_%s = [\n"</font>,name);
-<a name="line421">421: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line422">422: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)svd->sigma[svd->perm[i]]);
-<a name="line423">423: </a>  }
-<a name="line424">424: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
-<a name="line426">426: </a>}
-
-<a name="line430">430: </a><font color="#B22222">/*@C</font>
-<a name="line431">431: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a> - Displays the computed singular values in a viewer.</font>
-
-<a name="line433">433: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line435">435: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line436">436: </a><font color="#B22222">+  svd    - the singular value solver context</font>
-<a name="line437">437: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line439">439: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line440">440: </a><font color="#B22222">.  -svd_view_values - print computed singular values</font>
-
-<a name="line442">442: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line444">444: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(), <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>()</font>
-<a name="line445">445: </a><font color="#B22222">@*/</font>
-<a name="line446">446: </a><strong><font color="#4169E1"><a name="SVDValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line447">447: </a>{
-<a name="line448">448: </a>  PetscBool         isascii,isdraw;
-<a name="line449">449: </a>  PetscViewerFormat format;
-<a name="line450">450: </a>  PetscErrorCode    ierr;
-
-<a name="line454">454: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
-<a name="line457">457: </a>  SVDCheckSolved(svd,1);
-<a name="line458">458: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
-<a name="line459">459: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line460">460: </a>  <font color="#4169E1">if</font> (isdraw) {
-<a name="line461">461: </a>    SVDValuesView_DRAW(svd,viewer);
-<a name="line462">462: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
-<a name="line463">463: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line464">464: </a>    <font color="#4169E1">switch</font> (format) {
-<a name="line465">465: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
-<a name="line466">466: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
-<a name="line467">467: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
-<a name="line468">468: </a>        SVDValuesView_ASCII(svd,viewer);
-<a name="line469">469: </a>        <font color="#4169E1">break</font>;
-<a name="line470">470: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
-<a name="line471">471: </a>        SVDValuesView_MATLAB(svd,viewer);
-<a name="line472">472: </a>        <font color="#4169E1">break</font>;
-<a name="line473">473: </a><strong><font color="#FF0000">      default:</font></strong>
-<a name="line474">474: </a>        PetscInfo1(svd,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
-<a name="line475">475: </a>    }
-<a name="line476">476: </a>  }
-<a name="line477">477: </a>  <font color="#4169E1">return</font>(0);
-<a name="line478">478: </a>}
-
-<a name="line482">482: </a><font color="#B22222">/*@</font>
-<a name="line483">483: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line484">484: </a><font color="#B22222">   the computed singular values are to be viewed. </font>
-
-<a name="line486">486: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line488">488: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line489">489: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line491">491: </a><font color="#B22222">   Level: developer</font>
-<a name="line492">492: </a><font color="#B22222">@*/</font>
-<a name="line493">493: </a><strong><font color="#4169E1"><a name="SVDValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line494">494: </a>{
-<a name="line495">495: </a>  PetscErrorCode    ierr;
-<a name="line496">496: </a>  PetscViewer       viewer;
-<a name="line497">497: </a>  PetscBool         flg;
-<a name="line498">498: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line499">499: </a>  PetscViewerFormat format;
-
-<a name="line502">502: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line503">503: </a>  incall = PETSC_TRUE;
-<a name="line504">504: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_view_values"</font>,&viewer,&format,&flg);
-<a name="line505">505: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line506">506: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line507">507: </a>    <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(svd,viewer);
-<a name="line508">508: </a>    PetscViewerPopFormat(viewer);
-<a name="line509">509: </a>    PetscViewerDestroy(&viewer);
-<a name="line510">510: </a>  }
-<a name="line511">511: </a>  incall = PETSC_FALSE;
-<a name="line512">512: </a>  <font color="#4169E1">return</font>(0);
-<a name="line513">513: </a>}
-
-<a name="line517">517: </a><font color="#B22222">/*@C</font>
-<a name="line518">518: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a> - Outputs computed singular vectors to a viewer.</font>
-
-<a name="line520">520: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line522">522: </a><font color="#B22222">   Parameter:</font>
-<a name="line523">523: </a><font color="#B22222">+  svd    - the singular value solver context</font>
-<a name="line524">524: </a><font color="#B22222">-  viewer - the viewer</font>
-
-<a name="line526">526: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line527">527: </a><font color="#B22222">.  -svd_view_vectors - output singular vectors</font>
-
-<a name="line529">529: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line531">531: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(), <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>()</font>
-<a name="line532">532: </a><font color="#B22222">@*/</font>
-<a name="line533">533: </a><strong><font color="#4169E1"><a name="SVDVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
-<a name="line534">534: </a>{
-<a name="line536">536: </a>  PetscInt       i,k;
-<a name="line537">537: </a>  Vec            x;
-<a name="line538">538: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
-<a name="line539">539: </a>  char           vname[NMLEN];
-<a name="line540">540: </a>  const char     *ename;
-
-<a name="line544">544: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
-<a name="line547">547: </a>  SVDCheckSolved(svd,1);
-<a name="line548">548: </a>  <font color="#4169E1">if</font> (svd->nconv) {
-<a name="line549">549: </a>    PetscObjectGetName((PetscObject)svd,&ename);
-<a name="line550">550: </a>    SVDComputeVectors(svd);
-<a name="line551">551: </a>    <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
-<a name="line552">552: </a>      k = svd->perm[i];
-<a name="line553">553: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,i,ename);
-<a name="line554">554: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->V,k,&x);
-<a name="line555">555: </a>      PetscObjectSetName((PetscObject)x,vname);
-<a name="line556">556: </a>      VecView(x,viewer);
-<a name="line557">557: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->V,k,&x);
-<a name="line558">558: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"U%d_%s"</font>,i,ename);
-<a name="line559">559: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->U,k,&x);
-<a name="line560">560: </a>      PetscObjectSetName((PetscObject)x,vname);
-<a name="line561">561: </a>      VecView(x,viewer);
-<a name="line562">562: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->U,k,&x);
-<a name="line563">563: </a>    }
-<a name="line564">564: </a>  }
-<a name="line565">565: </a>  <font color="#4169E1">return</font>(0);
-<a name="line566">566: </a>}
-
-<a name="line570">570: </a><font color="#B22222">/*@</font>
-<a name="line571">571: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
-<a name="line572">572: </a><font color="#B22222">   the computed singular vectors are to be viewed. </font>
-
-<a name="line574">574: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
-
-<a name="line576">576: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line577">577: </a><font color="#B22222">.  svd - the singular value solver context</font>
-
-<a name="line579">579: </a><font color="#B22222">   Level: developer</font>
-<a name="line580">580: </a><font color="#B22222">@*/</font>
-<a name="line581">581: </a><strong><font color="#4169E1"><a name="SVDVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
-<a name="line582">582: </a>{
-<a name="line583">583: </a>  PetscErrorCode    ierr;
-<a name="line584">584: </a>  PetscViewer       viewer;
-<a name="line585">585: </a>  PetscBool         flg = PETSC_FALSE;
-<a name="line586">586: </a>  static PetscBool  incall = PETSC_FALSE;
-<a name="line587">587: </a>  PetscViewerFormat format;
-
-<a name="line590">590: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
-<a name="line591">591: </a>  incall = PETSC_TRUE;
-<a name="line592">592: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_view_vectors"</font>,&viewer,&format,&flg);
-<a name="line593">593: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line594">594: </a>    PetscViewerPushFormat(viewer,format);
-<a name="line595">595: </a>    <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(svd,viewer);
-<a name="line596">596: </a>    PetscViewerPopFormat(viewer);
-<a name="line597">597: </a>    PetscViewerDestroy(&viewer);
-<a name="line598">598: </a>  }
-<a name="line599">599: </a>  incall = PETSC_FALSE;
-<a name="line600">600: </a>  <font color="#4169E1">return</font>(0);
-<a name="line601">601: </a>}
+<a name="line96"> 96: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line97"> 97: </a>    <font color="#4169E1">if</font> (svd->nini) {
+<a name="line98"> 98: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial space: %D\n"</font>,PetscAbs(svd->nini));
+<a name="line99"> 99: </a>    }
+<a name="line100">100: </a>    <font color="#4169E1">if</font> (svd->ninil) {
+<a name="line101">101: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimension of user-provided initial left space: %D\n"</font>,PetscAbs(svd->ninil));
+<a name="line102">102: </a>    }
+<a name="line103">103: </a>  } <font color="#4169E1">else</font> {
+<a name="line104">104: </a>    <font color="#4169E1">if</font> (svd->ops->view) {
+<a name="line105">105: </a>      (*svd->ops->view)(svd,viewer);
+<a name="line106">106: </a>    }
+<a name="line107">107: </a>  }
+<a name="line108">108: </a>  PetscObjectTypeCompareAny((PetscObject)svd,&isshell,SVDCROSS,SVDCYCLIC,<font color="#666666">""</font>);
+<a name="line109">109: </a>  <font color="#4169E1">if</font> (!isshell) {
+<a name="line110">110: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
+<a name="line111">111: </a>    <font color="#4169E1">if</font> (!svd->V) { <a href="../../../docs/manualpages/SVD/SVDGetBV.html#SVDGetBV">SVDGetBV</a>(svd,&svd->V,NULL); }
+<a name="line112">112: </a>    <a href="../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(svd->V,viewer);
+<a name="line113">113: </a>    <font color="#4169E1">if</font> (!svd->ds) { <a href="../../../docs/manualpages/SVD/SVDGetDS.html#SVDGetDS">SVDGetDS</a>(svd,&svd->ds); }
+<a name="line114">114: </a>    <a href="../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(svd->ds,viewer);
+<a name="line115">115: </a>    PetscViewerPopFormat(viewer);
+<a name="line116">116: </a>  }
+<a name="line117">117: </a>  <font color="#4169E1">return</font>(0);
+<a name="line118">118: </a>}
+
+<a name="line122">122: </a><font color="#B22222">/*@C</font>
+<a name="line123">123: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a> - Displays the reason an <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> solve converged or diverged.</font>
+
+<a name="line125">125: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line127">127: </a><font color="#B22222">   Parameter:</font>
+<a name="line128">128: </a><font color="#B22222">+  svd - the singular value solver context</font>
+<a name="line129">129: </a><font color="#B22222">-  viewer - the viewer to display the reason</font>
+
+<a name="line131">131: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line132">132: </a><font color="#B22222">.  -svd_converged_reason - print reason for convergence, and number of iterations</font>
+
+<a name="line134">134: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line136">136: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSetTolerances.html#SVDSetTolerances">SVDSetTolerances</a>(), <a href="../../../docs/manualpages/SVD/SVDGetIterationNumber.html#SVDGetIterationNumber">SVDGetIterationNumber</a>()</font>
+<a name="line137">137: </a><font color="#B22222">@*/</font>
+<a name="line138">138: </a><strong><font color="#4169E1"><a name="SVDReasonView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line139">139: </a>{
+<a name="line141">141: </a>  PetscBool      isAscii;
+
+<a name="line144">144: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isAscii);
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (isAscii) {
+<a name="line146">146: </a>    PetscViewerASCIIAddTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line147">147: </a>    <font color="#4169E1">if</font> (svd->reason > 0) {
+<a name="line148">148: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> solve converged (%D singular triplet%s) due to %s; iterations %D\n"</font>,((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:<font color="#666666">""</font>,svd->nconv,(svd->nconv>1)?<font color="#666666">"s"</font>:<font color="#666666">""</font>,SVDConvergedReasons[svd->reason],svd->its);
+<a name="line149">149: </a>    } <font color="#4169E1">else</font> {
+<a name="line150">150: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> solve did not converge due to %s; iterations %D\n"</font>,((PetscObject)svd)->prefix?((PetscObject)svd)->prefix:<font color="#666666">""</font>,SVDConvergedReasons[svd->reason],svd->its);
+<a name="line151">151: </a>    }
+<a name="line152">152: </a>    PetscViewerASCIISubtractTab(viewer,((PetscObject)svd)->tablevel);
+<a name="line153">153: </a>  }
+<a name="line154">154: </a>  <font color="#4169E1">return</font>(0);
+<a name="line155">155: </a>}
+
+<a name="line159">159: </a><font color="#B22222">/*@</font>
+<a name="line160">160: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line161">161: </a><font color="#B22222">   the <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> converged reason is to be viewed. </font>
+
+<a name="line163">163: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line165">165: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line166">166: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line168">168: </a><font color="#B22222">   Level: developer</font>
+<a name="line169">169: </a><font color="#B22222">@*/</font>
+<a name="line170">170: </a><strong><font color="#4169E1"><a name="SVDReasonViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDReasonViewFromOptions.html#SVDReasonViewFromOptions">SVDReasonViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line171">171: </a>{
+<a name="line172">172: </a>  PetscErrorCode    ierr;
+<a name="line173">173: </a>  PetscViewer       viewer;
+<a name="line174">174: </a>  PetscBool         flg;
+<a name="line175">175: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line176">176: </a>  PetscViewerFormat format;
+
+<a name="line179">179: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line180">180: </a>  incall = PETSC_TRUE;
+<a name="line181">181: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_converged_reason"</font>,&viewer,&format,&flg);
+<a name="line182">182: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line183">183: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line184">184: </a>    <a href="../../../docs/manualpages/SVD/SVDReasonView.html#SVDReasonView">SVDReasonView</a>(svd,viewer);
+<a name="line185">185: </a>    PetscViewerPopFormat(viewer);
+<a name="line186">186: </a>    PetscViewerDestroy(&viewer);
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  incall = PETSC_FALSE;
+<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
+<a name="line190">190: </a>}
+
+<a name="line194">194: </a><strong><font color="#4169E1"><a name="SVDErrorView_ASCII"></a>static PetscErrorCode SVDErrorView_ASCII(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line195">195: </a>{
+<a name="line196">196: </a>  PetscBool      errok;
+<a name="line197">197: </a>  PetscReal      error,sigma;
+<a name="line198">198: </a>  PetscInt       i,j;
+
+<a name="line202">202: </a>  <font color="#4169E1">if</font> (svd->nconv<svd->nsv) {
+<a name="line203">203: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: less than %D singular values converged\n\n"</font>,svd->nsv);
+<a name="line204">204: </a>    <font color="#4169E1">return</font>(0);
+<a name="line205">205: </a>  }
+<a name="line206">206: </a>  errok = PETSC_TRUE;
+<a name="line207">207: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nsv;i++) {
+<a name="line208">208: </a>    <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,etype,&error);
+<a name="line209">209: </a>    errok = (errok && error<5.0*svd->tol)? PETSC_TRUE: PETSC_FALSE;
+<a name="line210">210: </a>  }
+<a name="line211">211: </a>  <font color="#4169E1">if</font> (!errok) {
+<a name="line212">212: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">" Problem: some of the first %D relative errors are higher than the tolerance\n\n"</font>,svd->nsv);
+<a name="line213">213: </a>    <font color="#4169E1">return</font>(0);
+<a name="line214">214: </a>  }
+<a name="line215">215: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">" All requested singular values computed up to the required tolerance:"</font>);
+<a name="line216">216: </a>  <font color="#4169E1">for</font> (i=0;i<=(svd->nsv-1)/8;i++) {
+<a name="line217">217: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n     "</font>);
+<a name="line218">218: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(8,svd->nsv-8*i);j++) {
+<a name="line219">219: </a>      <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,8*i+j,&sigma,NULL,NULL);
+<a name="line220">220: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%.5f"</font>,(double)sigma);
+<a name="line221">221: </a>      <font color="#4169E1">if</font> (8*i+j+1<svd->nsv) { PetscViewerASCIIPrintf(viewer,<font color="#666666">", "</font>); }
+<a name="line222">222: </a>    }
+<a name="line223">223: </a>  }
+<a name="line224">224: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n\n"</font>);
+<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
+<a name="line226">226: </a>}
+
+<a name="line230">230: </a><strong><font color="#4169E1"><a name="SVDErrorView_DETAIL"></a>static PetscErrorCode SVDErrorView_DETAIL(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line231">231: </a>{
+<a name="line233">233: </a>  PetscReal      error,sigma;
+<a name="line234">234: </a>  PetscInt       i;
+<a name="line235">235: </a><strong><font color="#228B22">#define EXLEN 30</font></strong>
+<a name="line236">236: </a>  char           ex[EXLEN],sep[]=<font color="#666666">" ---------------------- --------------------\n"</font>;
+
+<a name="line239">239: </a>  <font color="#4169E1">if</font> (!svd->nconv) <font color="#4169E1">return</font>(0);
+<a name="line240">240: </a>  <font color="#4169E1">switch</font> (etype) {
+<a name="line241">241: </a>    <font color="#4169E1">case</font> SVD_ERROR_ABSOLUTE:
+<a name="line242">242: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">" absolute error"</font>);
+<a name="line243">243: </a>      <font color="#4169E1">break</font>;
+<a name="line244">244: </a>    <font color="#4169E1">case</font> SVD_ERROR_RELATIVE:
+<a name="line245">245: </a>      PetscSNPrintf(ex,EXLEN,<font color="#666666">" relative error"</font>);
+<a name="line246">246: </a>      <font color="#4169E1">break</font>;
+<a name="line247">247: </a>  }
+<a name="line248">248: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s          sigma           %s\n%s"</font>,sep,ex,sep);
+<a name="line249">249: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line250">250: </a>    <a href="../../../docs/manualpages/SVD/SVDGetSingularTriplet.html#SVDGetSingularTriplet">SVDGetSingularTriplet</a>(svd,i,&sigma,NULL,NULL);
+<a name="line251">251: </a>    <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,etype,&error);
+<a name="line252">252: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"       % 6f          %12g\n"</font>,(double)sigma,(double)error);
+<a name="line253">253: </a>  }
+<a name="line254">254: </a>  PetscViewerASCIIPrintf(viewer,sep);
+<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
+<a name="line256">256: </a>}
+
+<a name="line260">260: </a><strong><font color="#4169E1"><a name="SVDErrorView_MATLAB"></a>static PetscErrorCode SVDErrorView_MATLAB(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line261">261: </a>{
+<a name="line263">263: </a>  PetscReal      error;
+<a name="line264">264: </a>  PetscInt       i;
+<a name="line265">265: </a>  const char     *name;
+
+<a name="line268">268: </a>  PetscObjectGetName((PetscObject)svd,&name);
+<a name="line269">269: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Error_%s = [\n"</font>,name);
+<a name="line270">270: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line271">271: </a>    <a href="../../../docs/manualpages/SVD/SVDComputeError.html#SVDComputeError">SVDComputeError</a>(svd,i,etype,&error);
+<a name="line272">272: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,error);
+<a name="line273">273: </a>  }
+<a name="line274">274: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
+<a name="line276">276: </a>}
+
+<a name="line280">280: </a><font color="#B22222">/*@C</font>
+<a name="line281">281: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a> - Displays the errors associated with the computed solution</font>
+<a name="line282">282: </a><font color="#B22222">   (as well as the singular values).</font>
+
+<a name="line284">284: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line286">286: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line287">287: </a><font color="#B22222">+  svd    - the singular value solver context</font>
+<a name="line288">288: </a><font color="#B22222">.  etype  - error type</font>
+<a name="line289">289: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line291">291: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line292">292: </a><font color="#B22222">+  -svd_error_absolute - print absolute errors of each singular triplet</font>
+<a name="line293">293: </a><font color="#B22222">-  -svd_error_relative - print relative errors of each singular triplet</font>
+
+<a name="line295">295: </a><font color="#B22222">   Notes:</font>
+<a name="line296">296: </a><font color="#B22222">   By default, this function checks the error of all singular triplets and prints</font>
+<a name="line297">297: </a><font color="#B22222">   the singular values if all of them are below the requested tolerance.</font>
+<a name="line298">298: </a><font color="#B22222">   If the viewer has format=PETSC_VIEWER_ASCII_INFO_DETAIL then a table with</font>
+<a name="line299">299: </a><font color="#B22222">   singular values and corresponding errors is printed.</font>
+
+<a name="line301">301: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line303">303: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(), <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>()</font>
+<a name="line304">304: </a><font color="#B22222">@*/</font>
+<a name="line305">305: </a><strong><font color="#4169E1"><a name="SVDErrorView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,<a href="../../../docs/manualpages/SVD/SVDErrorType.html#SVDErrorType">SVDErrorType</a> etype,PetscViewer viewer)</font></strong>
+<a name="line306">306: </a>{
+<a name="line307">307: </a>  PetscBool         isascii;
+<a name="line308">308: </a>  PetscViewerFormat format;
+<a name="line309">309: </a>  PetscErrorCode    ierr;
+
+<a name="line313">313: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
+<a name="line316">316: </a>  SVDCheckSolved(svd,1);
+<a name="line317">317: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line318">318: </a>  <font color="#4169E1">if</font> (!isascii) <font color="#4169E1">return</font>(0);
+
+<a name="line320">320: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line321">321: </a>  <font color="#4169E1">switch</font> (format) {
+<a name="line322">322: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line323">323: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line324">324: </a>      SVDErrorView_ASCII(svd,etype,viewer);
+<a name="line325">325: </a>      <font color="#4169E1">break</font>;
+<a name="line326">326: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line327">327: </a>      SVDErrorView_DETAIL(svd,etype,viewer);
+<a name="line328">328: </a>      <font color="#4169E1">break</font>;
+<a name="line329">329: </a>    <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line330">330: </a>      SVDErrorView_MATLAB(svd,etype,viewer);
+<a name="line331">331: </a>      <font color="#4169E1">break</font>;
+<a name="line332">332: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line333">333: </a>      PetscInfo1(svd,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line334">334: </a>  }
+<a name="line335">335: </a>  <font color="#4169E1">return</font>(0);
+<a name="line336">336: </a>}
+
+<a name="line340">340: </a><font color="#B22222">/*@</font>
+<a name="line341">341: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line342">342: </a><font color="#B22222">   the errors of the computed solution are to be viewed. </font>
+
+<a name="line344">344: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line346">346: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line347">347: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line349">349: </a><font color="#B22222">   Level: developer</font>
+<a name="line350">350: </a><font color="#B22222">@*/</font>
+<a name="line351">351: </a><strong><font color="#4169E1"><a name="SVDErrorViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDErrorViewFromOptions.html#SVDErrorViewFromOptions">SVDErrorViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line352">352: </a>{
+<a name="line353">353: </a>  PetscErrorCode    ierr;
+<a name="line354">354: </a>  PetscViewer       viewer;
+<a name="line355">355: </a>  PetscBool         flg;
+<a name="line356">356: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line357">357: </a>  PetscViewerFormat format;
+
+<a name="line360">360: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line361">361: </a>  incall = PETSC_TRUE;
+<a name="line362">362: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_error_absolute"</font>,&viewer,&format,&flg);
+<a name="line363">363: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line364">364: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line365">365: </a>    <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_ABSOLUTE,viewer);
+<a name="line366">366: </a>    PetscViewerPopFormat(viewer);
+<a name="line367">367: </a>    PetscViewerDestroy(&viewer);
+<a name="line368">368: </a>  }
+<a name="line369">369: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_error_relative"</font>,&viewer,&format,&flg);
+<a name="line370">370: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line371">371: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line372">372: </a>    <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>(svd,SVD_ERROR_RELATIVE,viewer);
+<a name="line373">373: </a>    PetscViewerPopFormat(viewer);
+<a name="line374">374: </a>    PetscViewerDestroy(&viewer);
+<a name="line375">375: </a>  }
+<a name="line376">376: </a>  incall = PETSC_FALSE;
+<a name="line377">377: </a>  <font color="#4169E1">return</font>(0);
+<a name="line378">378: </a>}
+
+<a name="line382">382: </a><strong><font color="#4169E1"><a name="SVDValuesView_DRAW"></a>static PetscErrorCode SVDValuesView_DRAW(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line383">383: </a>{
+<a name="line385">385: </a>  PetscDraw      draw;
+<a name="line386">386: </a>  PetscDrawSP    drawsp;
+<a name="line387">387: </a>  PetscReal      re,im=0.0;
+<a name="line388">388: </a>  PetscInt       i;
+
+<a name="line391">391: </a>  <font color="#4169E1">if</font> (!svd->nconv) <font color="#4169E1">return</font>(0);
+<a name="line392">392: </a>  PetscViewerDrawOpen(PETSC_COMM_SELF,0,<font color="#666666">"Computed singular values"</font>,PETSC_DECIDE,PETSC_DECIDE,300,300,&viewer);
+<a name="line393">393: </a>  PetscViewerDrawGetDraw(viewer,0,&draw);
+<a name="line394">394: </a>  PetscDrawSPCreate(draw,1,&drawsp);
+<a name="line395">395: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line396">396: </a>    re = svd->sigma[svd->perm[i]];
+<a name="line397">397: </a>    PetscDrawSPAddPoint(drawsp,&re,&im);
+<a name="line398">398: </a>  }
+<a name="line399">399: </a>  PetscDrawSPDraw(drawsp,PETSC_TRUE);
+<a name="line400">400: </a>  PetscDrawSPSave(drawsp);
+<a name="line401">401: </a>  PetscDrawSPDestroy(&drawsp);
+<a name="line402">402: </a>  PetscViewerDestroy(&viewer);
+<a name="line403">403: </a>  <font color="#4169E1">return</font>(0);
+<a name="line404">404: </a>}
+
+<a name="line408">408: </a><strong><font color="#4169E1"><a name="SVDValuesView_ASCII"></a>static PetscErrorCode SVDValuesView_ASCII(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line409">409: </a>{
+<a name="line410">410: </a>  PetscInt       i;
+
+<a name="line414">414: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Singular values = \n"</font>);
+<a name="line415">415: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line416">416: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"   %.5f\n"</font>,(double)svd->sigma[svd->perm[i]]);
+<a name="line417">417: </a>  }
+<a name="line418">418: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line419">419: </a>  <font color="#4169E1">return</font>(0);
+<a name="line420">420: </a>}
+
+<a name="line424">424: </a><strong><font color="#4169E1"><a name="SVDValuesView_MATLAB"></a>static PetscErrorCode SVDValuesView_MATLAB(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line425">425: </a>{
+<a name="line427">427: </a>  PetscInt       i;
+<a name="line428">428: </a>  const char     *name;
+
+<a name="line431">431: </a>  PetscObjectGetName((PetscObject)svd,&name);
+<a name="line432">432: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"Sigma_%s = [\n"</font>,name);
+<a name="line433">433: </a>  <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line434">434: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e\n"</font>,(double)svd->sigma[svd->perm[i]]);
+<a name="line435">435: </a>  }
+<a name="line436">436: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line437">437: </a>  <font color="#4169E1">return</font>(0);
+<a name="line438">438: </a>}
+
+<a name="line442">442: </a><font color="#B22222">/*@C</font>
+<a name="line443">443: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a> - Displays the computed singular values in a viewer.</font>
+
+<a name="line445">445: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line447">447: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line448">448: </a><font color="#B22222">+  svd    - the singular value solver context</font>
+<a name="line449">449: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line451">451: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line452">452: </a><font color="#B22222">.  -svd_view_values - print computed singular values</font>
+
+<a name="line454">454: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line456">456: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(), <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>()</font>
+<a name="line457">457: </a><font color="#B22222">@*/</font>
+<a name="line458">458: </a><strong><font color="#4169E1"><a name="SVDValuesView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line459">459: </a>{
+<a name="line460">460: </a>  PetscBool         isascii,isdraw;
+<a name="line461">461: </a>  PetscViewerFormat format;
+<a name="line462">462: </a>  PetscErrorCode    ierr;
+
+<a name="line466">466: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
+<a name="line469">469: </a>  SVDCheckSolved(svd,1);
+<a name="line470">470: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERDRAW,&isdraw);
+<a name="line471">471: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line472">472: </a>  <font color="#4169E1">if</font> (isdraw) {
+<a name="line473">473: </a>    SVDValuesView_DRAW(svd,viewer);
+<a name="line474">474: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isascii) {
+<a name="line475">475: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line476">476: </a>    <font color="#4169E1">switch</font> (format) {
+<a name="line477">477: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_DEFAULT:
+<a name="line478">478: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO:
+<a name="line479">479: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_INFO_DETAIL:
+<a name="line480">480: </a>        SVDValuesView_ASCII(svd,viewer);
+<a name="line481">481: </a>        <font color="#4169E1">break</font>;
+<a name="line482">482: </a>      <font color="#4169E1">case</font> PETSC_VIEWER_ASCII_MATLAB:
+<a name="line483">483: </a>        SVDValuesView_MATLAB(svd,viewer);
+<a name="line484">484: </a>        <font color="#4169E1">break</font>;
+<a name="line485">485: </a><strong><font color="#FF0000">      default:</font></strong>
+<a name="line486">486: </a>        PetscInfo1(svd,<font color="#666666">"Unsupported viewer format %s\n"</font>,PetscViewerFormats[format]);
+<a name="line487">487: </a>    }
+<a name="line488">488: </a>  }
+<a name="line489">489: </a>  <font color="#4169E1">return</font>(0);
+<a name="line490">490: </a>}
+
+<a name="line494">494: </a><font color="#B22222">/*@</font>
+<a name="line495">495: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line496">496: </a><font color="#B22222">   the computed singular values are to be viewed. </font>
+
+<a name="line498">498: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line500">500: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line501">501: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line503">503: </a><font color="#B22222">   Level: developer</font>
+<a name="line504">504: </a><font color="#B22222">@*/</font>
+<a name="line505">505: </a><strong><font color="#4169E1"><a name="SVDValuesViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDValuesViewFromOptions.html#SVDValuesViewFromOptions">SVDValuesViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line506">506: </a>{
+<a name="line507">507: </a>  PetscErrorCode    ierr;
+<a name="line508">508: </a>  PetscViewer       viewer;
+<a name="line509">509: </a>  PetscBool         flg;
+<a name="line510">510: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line511">511: </a>  PetscViewerFormat format;
+
+<a name="line514">514: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line515">515: </a>  incall = PETSC_TRUE;
+<a name="line516">516: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_view_values"</font>,&viewer,&format,&flg);
+<a name="line517">517: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line518">518: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line519">519: </a>    <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(svd,viewer);
+<a name="line520">520: </a>    PetscViewerPopFormat(viewer);
+<a name="line521">521: </a>    PetscViewerDestroy(&viewer);
+<a name="line522">522: </a>  }
+<a name="line523">523: </a>  incall = PETSC_FALSE;
+<a name="line524">524: </a>  <font color="#4169E1">return</font>(0);
+<a name="line525">525: </a>}
+
+<a name="line529">529: </a><font color="#B22222">/*@C</font>
+<a name="line530">530: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a> - Outputs computed singular vectors to a viewer.</font>
+
+<a name="line532">532: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line534">534: </a><font color="#B22222">   Parameter:</font>
+<a name="line535">535: </a><font color="#B22222">+  svd    - the singular value solver context</font>
+<a name="line536">536: </a><font color="#B22222">-  viewer - the viewer</font>
+
+<a name="line538">538: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line539">539: </a><font color="#B22222">.  -svd_view_vectors - output singular vectors</font>
+
+<a name="line541">541: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line543">543: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/SVD/SVDSolve.html#SVDSolve">SVDSolve</a>(), <a href="../../../docs/manualpages/SVD/SVDValuesView.html#SVDValuesView">SVDValuesView</a>(), <a href="../../../docs/manualpages/SVD/SVDErrorView.html#SVDErrorView">SVDErrorView</a>()</font>
+<a name="line544">544: </a><font color="#B22222">@*/</font>
+<a name="line545">545: </a><strong><font color="#4169E1"><a name="SVDVectorsView"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd,PetscViewer viewer)</font></strong>
+<a name="line546">546: </a>{
+<a name="line548">548: </a>  PetscInt       i,k;
+<a name="line549">549: </a>  Vec            x;
+<a name="line550">550: </a><strong><font color="#228B22">#define NMLEN 30</font></strong>
+<a name="line551">551: </a>  char           vname[NMLEN];
+<a name="line552">552: </a>  const char     *ename;
+
+<a name="line556">556: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)svd));
+<a name="line559">559: </a>  SVDCheckSolved(svd,1);
+<a name="line560">560: </a>  <font color="#4169E1">if</font> (svd->nconv) {
+<a name="line561">561: </a>    PetscObjectGetName((PetscObject)svd,&ename);
+<a name="line562">562: </a>    SVDComputeVectors(svd);
+<a name="line563">563: </a>    <font color="#4169E1">for</font> (i=0;i<svd->nconv;i++) {
+<a name="line564">564: </a>      k = svd->perm[i];
+<a name="line565">565: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"V%d_%s"</font>,(int)i,ename);
+<a name="line566">566: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->V,k,&x);
+<a name="line567">567: </a>      PetscObjectSetName((PetscObject)x,vname);
+<a name="line568">568: </a>      VecView(x,viewer);
+<a name="line569">569: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->V,k,&x);
+<a name="line570">570: </a>      PetscSNPrintf(vname,NMLEN,<font color="#666666">"U%d_%s"</font>,(int)i,ename);
+<a name="line571">571: </a>      <a href="../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(svd->U,k,&x);
+<a name="line572">572: </a>      PetscObjectSetName((PetscObject)x,vname);
+<a name="line573">573: </a>      VecView(x,viewer);
+<a name="line574">574: </a>      <a href="../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(svd->U,k,&x);
+<a name="line575">575: </a>    }
+<a name="line576">576: </a>  }
+<a name="line577">577: </a>  <font color="#4169E1">return</font>(0);
+<a name="line578">578: </a>}
+
+<a name="line582">582: </a><font color="#B22222">/*@</font>
+<a name="line583">583: </a><font color="#B22222">   <a href="../../../docs/manualpages/SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</a> - Processes command line options to determine if/how</font>
+<a name="line584">584: </a><font color="#B22222">   the computed singular vectors are to be viewed. </font>
+
+<a name="line586">586: </a><font color="#B22222">   Collective on <a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a></font>
+
+<a name="line588">588: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line589">589: </a><font color="#B22222">.  svd - the singular value solver context</font>
+
+<a name="line591">591: </a><font color="#B22222">   Level: developer</font>
+<a name="line592">592: </a><font color="#B22222">@*/</font>
+<a name="line593">593: </a><strong><font color="#4169E1"><a name="SVDVectorsViewFromOptions"></a>PetscErrorCode <a href="../../../docs/manualpages/SVD/SVDVectorsViewFromOptions.html#SVDVectorsViewFromOptions">SVDVectorsViewFromOptions</a>(<a href="../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> svd)</font></strong>
+<a name="line594">594: </a>{
+<a name="line595">595: </a>  PetscErrorCode    ierr;
+<a name="line596">596: </a>  PetscViewer       viewer;
+<a name="line597">597: </a>  PetscBool         flg = PETSC_FALSE;
+<a name="line598">598: </a>  static PetscBool  incall = PETSC_FALSE;
+<a name="line599">599: </a>  PetscViewerFormat format;
+
+<a name="line602">602: </a>  <font color="#4169E1">if</font> (incall) <font color="#4169E1">return</font>(0);
+<a name="line603">603: </a>  incall = PETSC_TRUE;
+<a name="line604">604: </a>  PetscOptionsGetViewer(PetscObjectComm((PetscObject)svd),((PetscObject)svd)->prefix,<font color="#666666">"-svd_view_vectors"</font>,&viewer,&format,&flg);
+<a name="line605">605: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line606">606: </a>    PetscViewerPushFormat(viewer,format);
+<a name="line607">607: </a>    <a href="../../../docs/manualpages/SVD/SVDVectorsView.html#SVDVectorsView">SVDVectorsView</a>(svd,viewer);
+<a name="line608">608: </a>    PetscViewerPopFormat(viewer);
+<a name="line609">609: </a>    PetscViewerDestroy(&viewer);
+<a name="line610">610: </a>  }
+<a name="line611">611: </a>  incall = PETSC_FALSE;
+<a name="line612">612: </a>  <font color="#4169E1">return</font>(0);
+<a name="line613">613: </a>}
 
 </pre>
 </body>
diff --git a/src/svd/makefile b/src/svd/makefile
index 729ae92..29b8f8d 100644
--- a/src/svd/makefile
+++ b/src/svd/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/svd/makefile.html b/src/svd/makefile.html
index 344dca4..eccdfbc 100644
--- a/src/svd/makefile.html
+++ b/src/svd/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/svd/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:58:34+00:00">
+<meta name="date" content="2016-05-16T10:33:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/svd/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/svd/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/examples/index.html b/src/sys/classes/bv/examples/index.html
index adf780e..ceafc74 100644
--- a/src/sys/classes/bv/examples/index.html
+++ b/src/sys/classes/bv/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
  
diff --git a/src/sys/classes/bv/examples/makefile b/src/sys/classes/bv/examples/makefile
index 11a0564..bf9ffd4 100644
--- a/src/sys/classes/bv/examples/makefile
+++ b/src/sys/classes/bv/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/examples/makefile.html b/src/sys/classes/bv/examples/makefile.html
index 56e2399..ca731af 100644
--- a/src/sys/classes/bv/examples/makefile.html
+++ b/src/sys/classes/bv/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:30+00:00">
+<meta name="date" content="2016-05-16T10:32:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/examples/tests/index.html b/src/sys/classes/bv/examples/tests/index.html
index c38a058..b5d9b49 100644
--- a/src/sys/classes/bv/examples/tests/index.html
+++ b/src/sys/classes/bv/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
@@ -29,5 +29,6 @@ These routines are usually not needed by application programmers.
 <a href="test9.c.html">test9.c: Test BV matrix projection</a><br>
 <a href="test10.c.html">test10.c: Test split reductions in BV</a><br>
 <a href="test11.c.html">test11.c: Test BV block orthogonalization</a><br>
+<a href="test12.c.html">test12.c: Test block orthogonalization on a rank-deficient BV</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/sys/classes/bv/examples/tests/makefile b/src/sys/classes/bv/examples/tests/makefile
index 68e04ba..f800b4a 100644
--- a/src/sys/classes/bv/examples/tests/makefile
+++ b/src/sys/classes/bv/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,10 +24,10 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/sys/classes/bv/examples/tests/
-EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c
+EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c test12.c
 EXAMPLESF  =
 MANSEC     = BV
-TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
+TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
 
 TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 test1.rm \
                        test2.PETSc runtest2_1 runtest2_2 runtest2_3 runtest2_4 \
@@ -41,7 +41,8 @@ TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 t
                        test9.PETSc runtest9_1 runtest9_2 runtest9_3 runtest9_4 test9.rm \
                        test10.PETSc runtest10_1 runtest10_2 runtest10_3 runtest10_4 test10.rm \
                        test11.PETSc runtest11_1 runtest11_2 runtest11_3 runtest11_4 \
-                       runtest11_5 runtest11_6 runtest11_7 runtest11_8 test11.rm
+                                    runtest11_5 runtest11_6 runtest11_7 runtest11_8 test11.rm \
+                       test12.PETSc runtest12_1 test12.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -89,6 +90,10 @@ test11: test11.o chkopts
 	-${CLINKER} -o test11 test11.o ${SLEPC_SYS_LIB}
 	${RM} test11.o
 
+test12: test12.o chkopts
+	-${CLINKER} -o test12 test12.o ${SLEPC_SYS_LIB}
+	${RM} test12.o
+
 #------------------------------------------------------------------------------------
 
 TESTCODE = \
@@ -99,261 +104,271 @@ TESTCODE = \
 
 runtest1_1:
 	- at test=test1_1; \
-	${MPIEXEC} -np 1 ./test1 -bv_type vecs -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type vecs -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest1_2:
 	- at test=test1_2; \
-	${MPIEXEC} -np 1 ./test1 -bv_type contiguous -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type contiguous -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest1_3:
 	- at test=test1_3; \
-	${MPIEXEC} -np 1 ./test1 -bv_type svec -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type svec -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest1_4:
 	- at test=test1_4; \
-	${MPIEXEC} -np 1 ./test1 -bv_type mat -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type mat -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_1:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type vecs -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type vecs -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_2:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type contiguous -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type contiguous -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_3:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type svec -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type svec -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_4:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type mat -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type mat -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_5:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type vecs -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type vecs -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_6:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type contiguous -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type contiguous -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_7:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type svec -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type svec -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_8:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type mat -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type mat -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_1:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_2:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_3:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_4:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_1:
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_2:
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_3:
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type vecs -trans 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type svec -trans 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_4:
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type mat -trans 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type mat -trans 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest5_1:
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest5_2:
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest5_3:
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest5_4:
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest6_1:
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest6_2:
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest6_3:
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest6_4:
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest7_1:
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest7_2:
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest7_3:
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest7_4:
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest8_1:
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest8_2:
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest8_3:
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest8_4:
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest9_1:
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest9_2:
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest9_3:
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest9_4:
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest10_1:
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest10_2:
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest10_3:
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest10_4:
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_1:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_2:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_3:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_4:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_5:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_6:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_7:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest11_8:
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type mat 2>&1 > $${test}.tmp; \
+	${TESTCODE}
+
+runtest12_1:
+	- at test=test12_1; \
+	${MPIEXEC} -n 1 ./test12 -bv_orthog_block gs mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
+#runtest12_2:
+#	- at test=test12_1; \
+#	${MPIEXEC} -n 1 ./test12 -bv_orthog_block chol mat 2>&1 > $${test}.tmp; \
+#	${TESTCODE}
+
diff --git a/src/sys/classes/bv/examples/tests/makefile.html b/src/sys/classes/bv/examples/tests/makefile.html
index 40ea2de..2d55ea6 100644
--- a/src/sys/classes/bv/examples/tests/makefile.html
+++ b/src/sys/classes/bv/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:33+00:00">
+<meta name="date" content="2016-05-16T10:32:28+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,10 +35,10 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/sys/classes/bv/examples/tests/
-EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c
+EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c test9.c test10.c test11.c test12.c
 EXAMPLESF  =
 MANSEC     = <a href="ROOT/docs/manualpages/BV/BV.html#BV">BV</a>
-TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
+TESTS      = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
 
 TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 test1.rm \
                        test2.PETSc runtest2_1 runtest2_2 runtest2_3 runtest2_4 \
@@ -52,7 +52,8 @@ TESTEXAMPLES_C       = test1.PETSc runtest1_1 runtest1_2 runtest1_3 runtest1_4 t
                        test9.PETSc runtest9_1 runtest9_2 runtest9_3 runtest9_4 test9.rm \
                        test10.PETSc runtest10_1 runtest10_2 runtest10_3 runtest10_4 test10.rm \
                        test11.PETSc runtest11_1 runtest11_2 runtest11_3 runtest11_4 \
-                       runtest11_5 runtest11_6 runtest11_7 runtest11_8 test11.rm
+                                    runtest11_5 runtest11_6 runtest11_7 runtest11_8 test11.rm \
+                       test12.PETSc runtest12_1 test12.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -100,6 +101,10 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o test11 test11.o ${SLEPC_SYS_LIB}
 	${RM} test11.o
 
+<strong><font color="#FF0000">test12:</font></strong> test12.o chkopts
+	-${CLINKER} -o test12 test12.o ${SLEPC_SYS_LIB}
+	${RM} test12.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 
 TESTCODE = \
@@ -110,264 +115,274 @@ TESTCODE = \
 
 <strong><font color="#FF0000">runtest1_1:</font></strong>
 	- at test=test1_1; \
-	${MPIEXEC} -np 1 ./test1 -bv_type vecs -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type vecs -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest1_2:</font></strong>
 	- at test=test1_2; \
-	${MPIEXEC} -np 1 ./test1 -bv_type contiguous -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type contiguous -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest1_3:</font></strong>
 	- at test=test1_3; \
-	${MPIEXEC} -np 1 ./test1 -bv_type svec -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type svec -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest1_4:</font></strong>
 	- at test=test1_4; \
-	${MPIEXEC} -np 1 ./test1 -bv_type mat -verbose 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -bv_type mat -verbose 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_1:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type vecs -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type vecs -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_2:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type contiguous -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type contiguous -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_3:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type svec -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type svec -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_4:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type mat -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type mat -bv_orthog_type cgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_5:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type vecs -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type vecs -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_6:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type contiguous -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type contiguous -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_7:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type svec -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type svec -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_8:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -bv_type mat -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -bv_type mat -bv_orthog_type mgs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_1:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_2:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_3:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_4:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_1:</font></strong>
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_2:</font></strong>
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_3:</font></strong>
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type vecs -trans 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type svec -trans 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_4:</font></strong>
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type mat -trans 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -n 18 -kx 12 -ky 8 -bv_type mat -trans 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest5_1:</font></strong>
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest5_2:</font></strong>
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest5_3:</font></strong>
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest5_4:</font></strong>
 	- at test=test5_1; \
-	${MPIEXEC} -np 1 ./test5 -bv_orthog_refine always -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test5 -bv_orthog_refine always -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest6_1:</font></strong>
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest6_2:</font></strong>
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest6_3:</font></strong>
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest6_4:</font></strong>
 	- at test=test6_1; \
-	${MPIEXEC} -np 1 ./test6 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test6 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest7_1:</font></strong>
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest7_2:</font></strong>
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest7_3:</font></strong>
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest7_4:</font></strong>
 	- at test=test7_1; \
-	${MPIEXEC} -np 1 ./test7 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test7 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest8_1:</font></strong>
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest8_2:</font></strong>
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest8_3:</font></strong>
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest8_4:</font></strong>
 	- at test=test8_1; \
-	${MPIEXEC} -np 1 ./test8 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test8 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest9_1:</font></strong>
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest9_2:</font></strong>
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest9_3:</font></strong>
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest9_4:</font></strong>
 	- at test=test9_1; \
-	${MPIEXEC} -np 1 ./test9 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test9 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest10_1:</font></strong>
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest10_2:</font></strong>
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest10_3:</font></strong>
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest10_4:</font></strong>
 	- at test=test10_1; \
-	${MPIEXEC} -np 2 ./test10 -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test10 -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_1:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_2:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_3:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_4:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block gs -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block gs -bv_type mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_5:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type vecs 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type vecs 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_6:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type contiguous 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type contiguous 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_7:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type svec 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type svec 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest11_8:</font></strong>
 	- at test=test11_1; \
-	${MPIEXEC} -np 2 ./test11 -bv_orthog_block chol -bv_type mat 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 2 ./test11 -bv_orthog_block chol -bv_type mat 2>&1 > $${test}.tmp; \
+	${TESTCODE}
+
+<strong><font color="#FF0000">runtest12_1:</font></strong>
+	- at test=test12_1; \
+	${MPIEXEC} -n 1 ./test12 -bv_orthog_block gs mat 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
+<font color="#A020F0">#runtest12_2:</font>
+<font color="#A020F0">#	- at test=test12_1; \</font>
+<font color="#A020F0">#	${MPIEXEC} -n 1 ./test12 -bv_orthog_block chol mat 2>&1 > $${test}.tmp; \</font>
+<font color="#A020F0">#	${TESTCODE}</font>
+
 </pre>
 </body>
 
diff --git a/src/sys/classes/bv/examples/tests/output/test10_1.out b/src/sys/classes/bv/examples/tests/output/test10_1.out
index 32903f0..3d46a7e 100644
--- a/src/sys/classes/bv/examples/tests/output/test10_1.out
+++ b/src/sys/classes/bv/examples/tests/output/test10_1.out
@@ -1,3 +1,3 @@
 BV split ops (5 columns of dimension 10).
-0
-0
+0.
+0.
diff --git a/src/sys/classes/bv/examples/tests/output/test12_1.out b/src/sys/classes/bv/examples/tests/output/test12_1.out
new file mode 100644
index 0000000..34cba0d
--- /dev/null
+++ b/src/sys/classes/bv/examples/tests/output/test12_1.out
@@ -0,0 +1,3 @@
+Test BV block orthogonalization (length 20, k=8).
+Level of orthogonality < 100*eps
+Residual ||X-QR|| < 100*eps
diff --git a/src/sys/classes/bv/examples/tests/output/test1_1.out b/src/sys/classes/bv/examples/tests/output/test1_1.out
index 567f059..425fe79 100644
--- a/src/sys/classes/bv/examples/tests/output/test1_1.out
+++ b/src/sys/classes/bv/examples/tests/output/test1_1.out
@@ -3,64 +3,64 @@ BV Object:X 1 MPI processes
   type: vecs
   Vec Object:  X_0   1 MPI processes
     type: seq
-  -2
-  1
-  4
-  7
-  0
-  0
-  0
-  0
-  0
-  0
+  -2.
+  1.
+  4.
+  7.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_1   1 MPI processes
     type: seq
-  0
-  -1
-  2
-  5
-  8
-  0
-  0
-  0
-  0
-  0
+  0.
+  -1.
+  2.
+  5.
+  8.
+  0.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_2   1 MPI processes
     type: seq
-  0
-  0
-  0
-  3
-  6
-  9
-  0
-  0
-  0
-  0
+  0.
+  0.
+  0.
+  3.
+  6.
+  9.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_3   1 MPI processes
     type: seq
-  0
-  0
-  0
-  1
-  4
-  7
-  10
-  0
-  0
-  0
+  0.
+  0.
+  0.
+  1.
+  4.
+  7.
+  10.
+  0.
+  0.
+  0.
   Vec Object:  X_4   1 MPI processes
     type: seq
-  0
-  0
-  0
-  0
-  2
-  5
-  8
-  11
-  0
-  0
+  0.
+  0.
+  0.
+  0.
+  2.
+  5.
+  8.
+  11.
+  0.
+  0.
 BV Object:Y 1 MPI processes
   type: vecs
   Vec Object:  Y_0   1 MPI processes
@@ -153,8 +153,8 @@ BV Object:Y 1 MPI processes
   6.25
   -2.75
   -11.75
-  -26
-  -14
+  -26.
+  -14.
   -24.125
   -16.25
   -12.125
@@ -197,69 +197,69 @@ Vec Object:z 1 MPI processes
 -262.75
 -379.125
 -413.375
--412
+-412.
 After BVMultInPlace - - - - -
 BV Object:X 1 MPI processes
   type: vecs
   Vec Object:  X_0   1 MPI processes
     type: seq
-  -4
-  2
-  8
-  14
-  0
-  0
-  0
-  0
-  0
-  0
+  -4.
+  2.
+  8.
+  14.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_1   1 MPI processes
     type: seq
-  -8
-  5
-  14
-  19
-  -20
-  -21
-  -18
-  -11
-  0
-  0
+  -8.
+  5.
+  14.
+  19.
+  -20.
+  -21.
+  -18.
+  -11.
+  0.
+  0.
   Vec Object:  X_2   1 MPI processes
     type: seq
-  -8
-  0
-  24
-  44
-  20
-  -21
-  -18
-  -11
-  0
-  0
+  -8.
+  0.
+  24.
+  44.
+  20.
+  -21.
+  -18.
+  -11.
+  0.
+  0.
   Vec Object:  X_3   1 MPI processes
     type: seq
-  0
-  0
-  0
-  2
-  8
-  14
-  20
-  0
-  0
-  0
+  0.
+  0.
+  0.
+  2.
+  8.
+  14.
+  20.
+  0.
+  0.
+  0.
   Vec Object:  X_4   1 MPI processes
     type: seq
-  0
-  0
-  0
-  0
-  4
-  10
-  16
-  22
-  0
-  0
+  0.
+  0.
+  0.
+  0.
+  4.
+  10.
+  16.
+  22.
+  0.
+  0.
 2-Norm or X[0] = 16.7332
 Frobenius Norm or X = 87.1436
diff --git a/src/sys/classes/bv/examples/tests/output/test1_2.out b/src/sys/classes/bv/examples/tests/output/test1_2.out
index 1b857c9..501c5ac 100644
--- a/src/sys/classes/bv/examples/tests/output/test1_2.out
+++ b/src/sys/classes/bv/examples/tests/output/test1_2.out
@@ -3,64 +3,64 @@ BV Object:X 1 MPI processes
   type: contiguous
   Vec Object:  X_0   1 MPI processes
     type: seq
-  -2
-  1
-  4
-  7
-  0
-  0
-  0
-  0
-  0
-  0
+  -2.
+  1.
+  4.
+  7.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_1   1 MPI processes
     type: seq
-  0
-  -1
-  2
-  5
-  8
-  0
-  0
-  0
-  0
-  0
+  0.
+  -1.
+  2.
+  5.
+  8.
+  0.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_2   1 MPI processes
     type: seq
-  0
-  0
-  0
-  3
-  6
-  9
-  0
-  0
-  0
-  0
+  0.
+  0.
+  0.
+  3.
+  6.
+  9.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_3   1 MPI processes
     type: seq
-  0
-  0
-  0
-  1
-  4
-  7
-  10
-  0
-  0
-  0
+  0.
+  0.
+  0.
+  1.
+  4.
+  7.
+  10.
+  0.
+  0.
+  0.
   Vec Object:  X_4   1 MPI processes
     type: seq
-  0
-  0
-  0
-  0
-  2
-  5
-  8
-  11
-  0
-  0
+  0.
+  0.
+  0.
+  0.
+  2.
+  5.
+  8.
+  11.
+  0.
+  0.
 BV Object:Y 1 MPI processes
   type: contiguous
   Vec Object:  Y_0   1 MPI processes
@@ -153,8 +153,8 @@ BV Object:Y 1 MPI processes
   6.25
   -2.75
   -11.75
-  -26
-  -14
+  -26.
+  -14.
   -24.125
   -16.25
   -12.125
@@ -197,69 +197,69 @@ Vec Object:z 1 MPI processes
 -262.75
 -379.125
 -413.375
--412
+-412.
 After BVMultInPlace - - - - -
 BV Object:X 1 MPI processes
   type: contiguous
   Vec Object:  X_0   1 MPI processes
     type: seq
-  -4
-  2
-  8
-  14
-  0
-  0
-  0
-  0
-  0
-  0
+  -4.
+  2.
+  8.
+  14.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
   Vec Object:  X_1   1 MPI processes
     type: seq
-  -8
-  5
-  14
-  19
-  -20
-  -21
-  -18
-  -11
-  0
-  0
+  -8.
+  5.
+  14.
+  19.
+  -20.
+  -21.
+  -18.
+  -11.
+  0.
+  0.
   Vec Object:  X_2   1 MPI processes
     type: seq
-  -8
-  0
-  24
-  44
-  20
-  -21
-  -18
-  -11
-  0
-  0
+  -8.
+  0.
+  24.
+  44.
+  20.
+  -21.
+  -18.
+  -11.
+  0.
+  0.
   Vec Object:  X_3   1 MPI processes
     type: seq
-  0
-  0
-  0
-  2
-  8
-  14
-  20
-  0
-  0
-  0
+  0.
+  0.
+  0.
+  2.
+  8.
+  14.
+  20.
+  0.
+  0.
+  0.
   Vec Object:  X_4   1 MPI processes
     type: seq
-  0
-  0
-  0
-  0
-  4
-  10
-  16
-  22
-  0
-  0
+  0.
+  0.
+  0.
+  0.
+  4.
+  10.
+  16.
+  22.
+  0.
+  0.
 2-Norm or X[0] = 16.7332
 Frobenius Norm or X = 87.1436
diff --git a/src/sys/classes/bv/examples/tests/output/test1_3.out b/src/sys/classes/bv/examples/tests/output/test1_3.out
index f145ba7..d0562c7 100644
--- a/src/sys/classes/bv/examples/tests/output/test1_3.out
+++ b/src/sys/classes/bv/examples/tests/output/test1_3.out
@@ -3,56 +3,56 @@ BV Object:X 1 MPI processes
   type: svec
   Vec Object:  X_0   1 MPI processes
     type: seq
-  -2
-  1
-  4
-  7
-  0
-  0
-  0
-  0
-  0
-  0
-  0
-  -1
-  2
-  5
-  8
-  0
-  0
-  0
-  0
-  0
-  0
-  0
-  0
-  3
-  6
-  9
-  0
-  0
-  0
-  0
-  0
-  0
-  0
-  1
-  4
-  7
-  10
-  0
-  0
-  0
-  0
-  0
-  0
-  0
-  2
-  5
-  8
-  11
-  0
-  0
+  -2.
+  1.
+  4.
+  7.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  -1.
+  2.
+  5.
+  8.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  3.
+  6.
+  9.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  1.
+  4.
+  7.
+  10.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  2.
+  5.
+  8.
+  11.
+  0.
+  0.
 BV Object:Y 1 MPI processes
   type: svec
   Vec Object:  Y_0   1 MPI processes
@@ -137,8 +137,8 @@ BV Object:Y 1 MPI processes
   6.25
   -2.75
   -11.75
-  -26
-  -14
+  -26.
+  -14.
   -24.125
   -16.25
   -12.125
@@ -177,61 +177,61 @@ Vec Object:z 1 MPI processes
 -262.75
 -379.125
 -413.375
--412
+-412.
 After BVMultInPlace - - - - -
 BV Object:X 1 MPI processes
   type: svec
   Vec Object:  X_0   1 MPI processes
     type: seq
-  -4
-  2
-  8
-  14
-  0
-  0
-  0
-  0
-  0
-  0
-  -8
-  5
-  14
-  19
-  -20
-  -21
-  -18
-  -11
-  0
-  0
-  -8
-  0
-  24
-  44
-  20
-  -21
-  -18
-  -11
-  0
-  0
-  0
-  0
-  0
-  2
-  8
-  14
-  20
-  0
-  0
-  0
-  0
-  0
-  0
-  0
-  4
-  10
-  16
-  22
-  0
-  0
+  -4.
+  2.
+  8.
+  14.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  -8.
+  5.
+  14.
+  19.
+  -20.
+  -21.
+  -18.
+  -11.
+  0.
+  0.
+  -8.
+  0.
+  24.
+  44.
+  20.
+  -21.
+  -18.
+  -11.
+  0.
+  0.
+  0.
+  0.
+  0.
+  2.
+  8.
+  14.
+  20.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  0.
+  4.
+  10.
+  16.
+  22.
+  0.
+  0.
 2-Norm or X[0] = 16.7332
 Frobenius Norm or X = 87.1436
diff --git a/src/sys/classes/bv/examples/tests/output/test1_4.out b/src/sys/classes/bv/examples/tests/output/test1_4.out
index ff675ce..5235849 100644
--- a/src/sys/classes/bv/examples/tests/output/test1_4.out
+++ b/src/sys/classes/bv/examples/tests/output/test1_4.out
@@ -77,7 +77,7 @@ Vec Object:z 1 MPI processes
 -262.75
 -379.125
 -413.375
--412
+-412.
 After BVMultInPlace - - - - -
 BV Object:X 1 MPI processes
   type: mat
diff --git a/src/sys/classes/bv/examples/tests/output/test7_1.out b/src/sys/classes/bv/examples/tests/output/test7_1.out
index b3643ca..f46b71d 100644
--- a/src/sys/classes/bv/examples/tests/output/test7_1.out
+++ b/src/sys/classes/bv/examples/tests/output/test7_1.out
@@ -1,3 +1,3 @@
 Test BVMatMult (n=10, k=5).
-Norm of error: 0
-Norm of error: 0
+Norm of error: 0.
+Norm of error: 0.
diff --git a/src/sys/classes/bv/examples/tests/output/test8_1.out b/src/sys/classes/bv/examples/tests/output/test8_1.out
index 82cf92c..21efb09 100644
--- a/src/sys/classes/bv/examples/tests/output/test8_1.out
+++ b/src/sys/classes/bv/examples/tests/output/test8_1.out
@@ -3,9 +3,9 @@ Orthogonalization coefficients:
 Vec Object:z 1 MPI processes
   type: seq
 0.700933
-0
+0.
 0.846442
-0
+0.
 0.902098
-0
+0.
 0.967361
diff --git a/src/sys/classes/bv/examples/tests/test1.c b/src/sys/classes/bv/examples/tests/test1.c
index ff94f86..a4b131e 100644
--- a/src/sys/classes/bv/examples/tests/test1.c
+++ b/src/sys/classes/bv/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,10 +38,10 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-l",&l,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-l",&l,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV with %D columns of dimension %D.\n",k,n);CHKERRQ(ierr);
 
   /* Create template vector */
@@ -171,5 +171,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test1.c.html b/src/sys/classes/bv/examples/tests/test1.c.html
index ad3c487..ac519e1 100644
--- a/src/sys/classes/bv/examples/tests/test1.c.html
+++ b/src/sys/classes/bv/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:30+00:00">
+<meta name="date" content="2016-05-16T10:32:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,10 +47,10 @@
 <a name="line38"> 38: </a>  PetscBool      verbose;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-l"</font>,&l,NULL);
-<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-l"</font>,&l,NULL);
+<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line45"> 45: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with %D columns of dimension %D.\n"</font>,k,n);
 
 <a name="line47"> 47: </a>  <font color="#B22222">/* Create template vector */</font>
@@ -180,7 +180,7 @@
 <a name="line171">171: </a>  MatDestroy(&M);
 <a name="line172">172: </a>  VecDestroy(&t);
 <a name="line173">173: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line174">174: </a>  <font color="#4169E1">return</font> 0;
+<a name="line174">174: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line175">175: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test10.c b/src/sys/classes/bv/examples/tests/test10.c
index 4443c62..9bc48a8 100644
--- a/src/sys/classes/bv/examples/tests/test10.c
+++ b/src/sys/classes/bv/examples/tests/test10.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -35,8 +35,8 @@ int main(int argc,char **argv)
   PetscReal      nrm;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
   if (k<3) SETERRQ(PETSC_COMM_SELF,1,"Should specify at least k=3 columns");
   ierr = PetscPrintf(PETSC_COMM_WORLD,"BV split ops (%D columns of dimension %D).\n",k,n);CHKERRQ(ierr);
 
@@ -56,7 +56,7 @@ int main(int argc,char **argv)
   /* Fill X entries */
   for (j=0;j<k;j++) {
     ierr = BVGetColumn(X,j,&w);CHKERRQ(ierr);
-    ierr = VecZeroEntries(w);CHKERRQ(ierr);
+    ierr = VecSet(w,0.0);CHKERRQ(ierr);
     for (i=0;i<4;i++) {
       if (i+j<n) {
         ierr = VecSetValue(w,i+j,(PetscScalar)(3*i+j-2),INSERT_VALUES);CHKERRQ(ierr);
@@ -123,5 +123,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&z);CHKERRQ(ierr);
   ierr = VecDestroy(&zsplit);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test10.c.html b/src/sys/classes/bv/examples/tests/test10.c.html
index 03ecdfb..c1042c3 100644
--- a/src/sys/classes/bv/examples/tests/test10.c.html
+++ b/src/sys/classes/bv/examples/tests/test10.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test10.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:33+00:00">
+<meta name="date" content="2016-05-16T10:32:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test10.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test10.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -44,8 +44,8 @@
 <a name="line35"> 35: </a>  PetscReal      nrm;
 
 <a name="line37"> 37: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line38"> 38: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line38"> 38: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
 <a name="line40"> 40: </a>  <font color="#4169E1">if</font> (k<3) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Should specify at least k=3 columns"</font>);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> split ops (%D columns of dimension %D).\n"</font>,k,n);
 
@@ -65,7 +65,7 @@
 <a name="line56"> 56: </a>  <font color="#B22222">/* Fill X entries */</font>
 <a name="line57"> 57: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++) {
 <a name="line58"> 58: </a>    <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&w);
-<a name="line59"> 59: </a>    VecZeroEntries(w);
+<a name="line59"> 59: </a>    VecSet(w,0.0);
 <a name="line60"> 60: </a>    <font color="#4169E1">for</font> (i=0;i<4;i++) {
 <a name="line61"> 61: </a>      <font color="#4169E1">if</font> (i+j<n) {
 <a name="line62"> 62: </a>        VecSetValue(w,i+j,(PetscScalar)(3*i+j-2),INSERT_VALUES);
@@ -132,7 +132,7 @@
 <a name="line123">123: </a>  VecDestroy(&z);
 <a name="line124">124: </a>  VecDestroy(&zsplit);
 <a name="line125">125: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line126">126: </a>  <font color="#4169E1">return</font> 0;
+<a name="line126">126: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line127">127: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test11.c b/src/sys/classes/bv/examples/tests/test11.c
index cc0bcbf..23c765c 100644
--- a/src/sys/classes/bv/examples/tests/test11.c
+++ b/src/sys/classes/bv/examples/tests/test11.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -39,10 +39,10 @@ int main(int argc,char **argv)
   BVOrthogBlockType btype;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-l",&l,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-l",&l,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV block orthogonalization (length %D, l=%D, k=%D).\n",n,l,k);CHKERRQ(ierr);
 
   /* Create template vector */
@@ -156,7 +156,7 @@ int main(int argc,char **argv)
   /* Extract cached BV and check it is equal to B*X */
   ierr = BVGetCachedBV(Y,&cached);CHKERRQ(ierr);
   ierr = BVMatMult(X,B,Z);CHKERRQ(ierr);
-  ierr = BVAXPY(Z,-1.0,cached);CHKERRQ(ierr);
+  ierr = BVMult(Z,-1.0,1.0,cached,NULL);CHKERRQ(ierr);
   ierr = BVNorm(Z,NORM_FROBENIUS,&norm);CHKERRQ(ierr);
   if (norm<100*PETSC_MACHINE_EPSILON) {
     ierr = PetscPrintf(PETSC_COMM_WORLD,"Residual ||cached-BX|| < 100*eps\n");CHKERRQ(ierr);
@@ -183,5 +183,5 @@ int main(int argc,char **argv)
   ierr = BVDestroy(&Z);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test11.c.html b/src/sys/classes/bv/examples/tests/test11.c.html
index 0612e01..7f17ffe 100644
--- a/src/sys/classes/bv/examples/tests/test11.c.html
+++ b/src/sys/classes/bv/examples/tests/test11.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test11.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:33+00:00">
+<meta name="date" content="2016-05-16T10:32:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test11.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test11.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -49,10 +49,10 @@
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a> btype;
 
 <a name="line41"> 41: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-l"</font>,&l,NULL);
-<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line45"> 45: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-l"</font>,&l,NULL);
+<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line45"> 45: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line46"> 46: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> block orthogonalization (length %D, l=%D, k=%D).\n"</font>,n,l,k);
 
 <a name="line48"> 48: </a>  <font color="#B22222">/* Create template vector */</font>
@@ -166,7 +166,7 @@
 <a name="line156">156: </a>  <font color="#B22222">/* Extract cached <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and check it is equal to B*X */</font>
 <a name="line157">157: </a>  <a href="../../../../../../docs/manualpages/BV/BVGetCachedBV.html#BVGetCachedBV">BVGetCachedBV</a>(Y,&cached);
 <a name="line158">158: </a>  <a href="../../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,B,Z);
-<a name="line159">159: </a>  <a href="../../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(Z,-1.0,cached);
+<a name="line159">159: </a>  <a href="../../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(Z,-1.0,1.0,cached,NULL);
 <a name="line160">160: </a>  <a href="../../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(Z,NORM_FROBENIUS,&norm);
 <a name="line161">161: </a>  <font color="#4169E1">if</font> (norm<100*PETSC_MACHINE_EPSILON) {
 <a name="line162">162: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Residual ||cached-BX|| < 100*eps\n"</font>);
@@ -193,7 +193,7 @@
 <a name="line183">183: </a>  <a href="../../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Z);
 <a name="line184">184: </a>  VecDestroy(&t);
 <a name="line185">185: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line186">186: </a>  <font color="#4169E1">return</font> 0;
+<a name="line186">186: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line187">187: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test12.c b/src/sys/classes/bv/examples/tests/test12.c
new file mode 100644
index 0000000..672fe5f
--- /dev/null
+++ b/src/sys/classes/bv/examples/tests/test12.c
@@ -0,0 +1,157 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Test block orthogonalization on a rank-deficient BV.\n\n";
+
+#include <slepcbv.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  PetscErrorCode ierr;
+  BV             X,Z;
+  Mat            M,R;
+  Vec            v,w,t;
+  PetscInt       i,j,n=20,k=8;
+  PetscViewer    view;
+  PetscBool      verbose;
+  PetscReal      norm;
+  PetscScalar    alpha;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV block orthogonalization (length %D, k=%D).\n",n,k);CHKERRQ(ierr);
+  if (k<6) SETERRQ(PETSC_COMM_SELF,1,"k must be at least 6");
+
+  /* Create template vector */
+  ierr = VecCreate(PETSC_COMM_WORLD,&t);CHKERRQ(ierr);
+  ierr = VecSetSizes(t,PETSC_DECIDE,n);CHKERRQ(ierr);
+  ierr = VecSetFromOptions(t);CHKERRQ(ierr);
+
+  /* Create BV object X */
+  ierr = BVCreate(PETSC_COMM_WORLD,&X);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)X,"X");CHKERRQ(ierr);
+  ierr = BVSetSizesFromVec(X,t,k);CHKERRQ(ierr);
+  ierr = BVSetFromOptions(X);CHKERRQ(ierr);
+
+  /* Set up viewer */
+  ierr = PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&view);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = PetscViewerPushFormat(view,PETSC_VIEWER_ASCII_MATLAB);CHKERRQ(ierr);
+  }
+
+  /* Fill X entries (first half) */
+  for (j=0;j<k/2;j++) {
+    ierr = BVGetColumn(X,j,&v);CHKERRQ(ierr);
+    ierr = VecSet(v,0.0);CHKERRQ(ierr);
+    for (i=0;i<=n/2;i++) {
+      if (i+j<n) {
+        alpha = (3.0*i+j-2)/(2*(i+j+1));
+        ierr = VecSetValue(v,i+j,alpha,INSERT_VALUES);CHKERRQ(ierr);
+      }
+    }
+    ierr = VecAssemblyBegin(v);CHKERRQ(ierr);
+    ierr = VecAssemblyEnd(v);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(X,j,&v);CHKERRQ(ierr);
+  }
+
+  /* make middle column linearly dependent wrt columns 0 and 1 */
+  ierr = BVCopyColumn(X,0,j);CHKERRQ(ierr);
+  ierr = BVGetColumn(X,j,&v);CHKERRQ(ierr);
+  ierr = BVGetColumn(X,1,&w);CHKERRQ(ierr);
+  ierr = VecAXPY(v,0.5,w);CHKERRQ(ierr);
+  ierr = BVRestoreColumn(X,1,&w);CHKERRQ(ierr);
+  ierr = BVRestoreColumn(X,j,&v);CHKERRQ(ierr);
+  j++;
+
+  /* Fill X entries (second half) */
+  for (;j<k-1;j++) {
+    ierr = BVGetColumn(X,j,&v);CHKERRQ(ierr);
+    ierr = VecSet(v,0.0);CHKERRQ(ierr);
+    for (i=0;i<=n/2;i++) {
+      if (i+j<n) {
+        alpha = (3.0*i+j-2)/(2*(i+j+1));
+        ierr = VecSetValue(v,i+j,alpha,INSERT_VALUES);CHKERRQ(ierr);
+      }
+    }
+    ierr = VecAssemblyBegin(v);CHKERRQ(ierr);
+    ierr = VecAssemblyEnd(v);CHKERRQ(ierr);
+    ierr = BVRestoreColumn(X,j,&v);CHKERRQ(ierr);
+  }
+
+  /* make middle column linearly dependent wrt columns 1 and k/2+1 */
+  ierr = BVCopyColumn(X,1,j);CHKERRQ(ierr);
+  ierr = BVGetColumn(X,j,&v);CHKERRQ(ierr);
+  ierr = BVGetColumn(X,k/2+1,&w);CHKERRQ(ierr);
+  ierr = VecAXPY(v,-1.2,w);CHKERRQ(ierr);
+  ierr = BVRestoreColumn(X,k/2+1,&w);CHKERRQ(ierr);
+  ierr = BVRestoreColumn(X,j,&v);CHKERRQ(ierr);
+
+  if (verbose) {
+    ierr = BVView(X,view);CHKERRQ(ierr);
+  }
+
+  /* Create a copy on Z */
+  ierr = BVDuplicate(X,&Z);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)Z,"Z");CHKERRQ(ierr);
+  ierr = BVCopy(X,Z);CHKERRQ(ierr);
+
+  /* Test BVOrthogonalize */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&R);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)R,"R");CHKERRQ(ierr);
+  ierr = BVOrthogonalize(X,R);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = BVView(X,view);CHKERRQ(ierr);
+    ierr = MatView(R,view);CHKERRQ(ierr);
+  }
+
+  /* Check orthogonality */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&M);CHKERRQ(ierr);
+  ierr = MatShift(M,1.0);CHKERRQ(ierr);   /* set leading part to identity */
+  ierr = BVDot(X,X,M);CHKERRQ(ierr);
+  ierr = MatShift(M,-1.0);CHKERRQ(ierr);
+  ierr = MatNorm(M,NORM_1,&norm);CHKERRQ(ierr);
+  if (norm<100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Level of orthogonality < 100*eps\n");CHKERRQ(ierr);
+  } else {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Level of orthogonality: %g\n",(double)norm);CHKERRQ(ierr);
+  }
+
+  /* Check residual */
+  ierr = BVMult(Z,-1.0,1.0,X,R);CHKERRQ(ierr);
+  ierr = BVNorm(Z,NORM_FROBENIUS,&norm);CHKERRQ(ierr);
+  if (norm<100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Residual ||X-QR|| < 100*eps\n");CHKERRQ(ierr);
+  } else {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Residual ||X-QR||: %g\n",(double)norm);CHKERRQ(ierr);
+  }
+
+  ierr = MatDestroy(&R);CHKERRQ(ierr);
+  ierr = MatDestroy(&M);CHKERRQ(ierr);
+  ierr = BVDestroy(&X);CHKERRQ(ierr);
+  ierr = BVDestroy(&Z);CHKERRQ(ierr);
+  ierr = VecDestroy(&t);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
diff --git a/src/sys/classes/bv/examples/tests/test12.c.html b/src/sys/classes/bv/examples/tests/test12.c.html
new file mode 100644
index 0000000..a3ab3bf
--- /dev/null
+++ b/src/sys/classes/bv/examples/tests/test12.c.html
@@ -0,0 +1,170 @@
+<center><a href="test12.c">Actual source code: test12.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test12.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:32:27+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test12.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Test block orthogonalization on a rank-deficient <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.\n\n"</font>;
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepcbv.h></font>
+
+<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line29"> 29: </a>{
+<a name="line31"> 31: </a>  <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             X,Z;
+<a name="line32"> 32: </a>  Mat            M,R;
+<a name="line33"> 33: </a>  Vec            v,w,t;
+<a name="line34"> 34: </a>  PetscInt       i,j,n=20,k=8;
+<a name="line35"> 35: </a>  PetscViewer    view;
+<a name="line36"> 36: </a>  PetscBool      verbose;
+<a name="line37"> 37: </a>  PetscReal      norm;
+<a name="line38"> 38: </a>  PetscScalar    alpha;
+
+<a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> block orthogonalization (length %D, k=%D).\n"</font>,n,k);
+<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (k<6) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"k must be at least 6"</font>);
+
+<a name="line47"> 47: </a>  <font color="#B22222">/* Create template vector */</font>
+<a name="line48"> 48: </a>  VecCreate(PETSC_COMM_WORLD,&t);
+<a name="line49"> 49: </a>  VecSetSizes(t,PETSC_DECIDE,n);
+<a name="line50"> 50: </a>  VecSetFromOptions(t);
+
+<a name="line52"> 52: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object X */</font>
+<a name="line53"> 53: </a>  <a href="../../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PETSC_COMM_WORLD,&X);
+<a name="line54"> 54: </a>  PetscObjectSetName((PetscObject)X,<font color="#666666">"X"</font>);
+<a name="line55"> 55: </a>  <a href="../../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(X,t,k);
+<a name="line56"> 56: </a>  <a href="../../../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(X);
+
+<a name="line58"> 58: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line59"> 59: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&view);
+<a name="line60"> 60: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line61"> 61: </a>    PetscViewerPushFormat(view,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line62"> 62: </a>  }
+
+<a name="line64"> 64: </a>  <font color="#B22222">/* Fill X entries (first half) */</font>
+<a name="line65"> 65: </a>  <font color="#4169E1">for</font> (j=0;j<k/2;j++) {
+<a name="line66"> 66: </a>    <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&v);
+<a name="line67"> 67: </a>    VecSet(v,0.0);
+<a name="line68"> 68: </a>    <font color="#4169E1">for</font> (i=0;i<=n/2;i++) {
+<a name="line69"> 69: </a>      <font color="#4169E1">if</font> (i+j<n) {
+<a name="line70"> 70: </a>        alpha = (3.0*i+j-2)/(2*(i+j+1));
+<a name="line71"> 71: </a>        VecSetValue(v,i+j,alpha,INSERT_VALUES);
+<a name="line72"> 72: </a>      }
+<a name="line73"> 73: </a>    }
+<a name="line74"> 74: </a>    VecAssemblyBegin(v);
+<a name="line75"> 75: </a>    VecAssemblyEnd(v);
+<a name="line76"> 76: </a>    <a href="../../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&v);
+<a name="line77"> 77: </a>  }
+
+<a name="line79"> 79: </a>  <font color="#B22222">/* make middle column linearly dependent wrt columns 0 and 1 */</font>
+<a name="line80"> 80: </a>  <a href="../../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(X,0,j);
+<a name="line81"> 81: </a>  <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&v);
+<a name="line82"> 82: </a>  <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,1,&w);
+<a name="line83"> 83: </a>  VecAXPY(v,0.5,w);
+<a name="line84"> 84: </a>  <a href="../../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,1,&w);
+<a name="line85"> 85: </a>  <a href="../../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&v);
+<a name="line86"> 86: </a>  j++;
+
+<a name="line88"> 88: </a>  <font color="#B22222">/* Fill X entries (second half) */</font>
+<a name="line89"> 89: </a>  <font color="#4169E1">for</font> (;j<k-1;j++) {
+<a name="line90"> 90: </a>    <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&v);
+<a name="line91"> 91: </a>    VecSet(v,0.0);
+<a name="line92"> 92: </a>    <font color="#4169E1">for</font> (i=0;i<=n/2;i++) {
+<a name="line93"> 93: </a>      <font color="#4169E1">if</font> (i+j<n) {
+<a name="line94"> 94: </a>        alpha = (3.0*i+j-2)/(2*(i+j+1));
+<a name="line95"> 95: </a>        VecSetValue(v,i+j,alpha,INSERT_VALUES);
+<a name="line96"> 96: </a>      }
+<a name="line97"> 97: </a>    }
+<a name="line98"> 98: </a>    VecAssemblyBegin(v);
+<a name="line99"> 99: </a>    VecAssemblyEnd(v);
+<a name="line100">100: </a>    <a href="../../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&v);
+<a name="line101">101: </a>  }
+
+<a name="line103">103: </a>  <font color="#B22222">/* make middle column linearly dependent wrt columns 1 and k/2+1 */</font>
+<a name="line104">104: </a>  <a href="../../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(X,1,j);
+<a name="line105">105: </a>  <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&v);
+<a name="line106">106: </a>  <a href="../../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,k/2+1,&w);
+<a name="line107">107: </a>  VecAXPY(v,-1.2,w);
+<a name="line108">108: </a>  <a href="../../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,k/2+1,&w);
+<a name="line109">109: </a>  <a href="../../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&v);
+
+<a name="line111">111: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line112">112: </a>    <a href="../../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(X,view);
+<a name="line113">113: </a>  }
+
+<a name="line115">115: </a>  <font color="#B22222">/* Create a copy on Z */</font>
+<a name="line116">116: </a>  <a href="../../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(X,&Z);
+<a name="line117">117: </a>  PetscObjectSetName((PetscObject)Z,<font color="#666666">"Z"</font>);
+<a name="line118">118: </a>  <a href="../../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(X,Z);
+
+<a name="line120">120: </a>  <font color="#B22222">/* Test <a href="../../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a> */</font>
+<a name="line121">121: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&R);
+<a name="line122">122: </a>  PetscObjectSetName((PetscObject)R,<font color="#666666">"R"</font>);
+<a name="line123">123: </a>  <a href="../../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(X,R);
+<a name="line124">124: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line125">125: </a>    <a href="../../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(X,view);
+<a name="line126">126: </a>    MatView(R,view);
+<a name="line127">127: </a>  }
+
+<a name="line129">129: </a>  <font color="#B22222">/* Check orthogonality */</font>
+<a name="line130">130: </a>  MatCreateSeqDense(PETSC_COMM_SELF,k,k,NULL,&M);
+<a name="line131">131: </a>  MatShift(M,1.0);   <font color="#B22222">/* set leading part to identity */</font>
+<a name="line132">132: </a>  <a href="../../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(X,X,M);
+<a name="line133">133: </a>  MatShift(M,-1.0);
+<a name="line134">134: </a>  MatNorm(M,NORM_1,&norm);
+<a name="line135">135: </a>  <font color="#4169E1">if</font> (norm<100*PETSC_MACHINE_EPSILON) {
+<a name="line136">136: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Level of orthogonality < 100*eps\n"</font>);
+<a name="line137">137: </a>  } <font color="#4169E1">else</font> {
+<a name="line138">138: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Level of orthogonality: %g\n"</font>,(double)norm);
+<a name="line139">139: </a>  }
+
+<a name="line141">141: </a>  <font color="#B22222">/* Check residual */</font>
+<a name="line142">142: </a>  <a href="../../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(Z,-1.0,1.0,X,R);
+<a name="line143">143: </a>  <a href="../../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(Z,NORM_FROBENIUS,&norm);
+<a name="line144">144: </a>  <font color="#4169E1">if</font> (norm<100*PETSC_MACHINE_EPSILON) {
+<a name="line145">145: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Residual ||X-QR|| < 100*eps\n"</font>);
+<a name="line146">146: </a>  } <font color="#4169E1">else</font> {
+<a name="line147">147: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Residual ||X-QR||: %g\n"</font>,(double)norm);
+<a name="line148">148: </a>  }
+
+<a name="line150">150: </a>  MatDestroy(&R);
+<a name="line151">151: </a>  MatDestroy(&M);
+<a name="line152">152: </a>  <a href="../../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
+<a name="line153">153: </a>  <a href="../../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&Z);
+<a name="line154">154: </a>  VecDestroy(&t);
+<a name="line155">155: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line156">156: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line157">157: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/bv/examples/tests/test2.c b/src/sys/classes/bv/examples/tests/test2.c
index d529b35..4512a2e 100644
--- a/src/sys/classes/bv/examples/tests/test2.c
+++ b/src/sys/classes/bv/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,9 +38,9 @@ int main(int argc,char **argv)
   PetscScalar    alpha;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV orthogonalization with %D columns of length %D.\n",k,n);CHKERRQ(ierr);
 
   /* Create template vector */
@@ -149,5 +149,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&e);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test2.c.html b/src/sys/classes/bv/examples/tests/test2.c.html
index 6e7a8ea..bbcf664 100644
--- a/src/sys/classes/bv/examples/tests/test2.c.html
+++ b/src/sys/classes/bv/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:30+00:00">
+<meta name="date" content="2016-05-16T10:32:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,9 +47,9 @@
 <a name="line38"> 38: </a>  PetscScalar    alpha;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> orthogonalization with %D columns of length %D.\n"</font>,k,n);
 
 <a name="line46"> 46: </a>  <font color="#B22222">/* Create template vector */</font>
@@ -158,7 +158,7 @@
 <a name="line149">149: </a>  VecDestroy(&e);
 <a name="line150">150: </a>  VecDestroy(&t);
 <a name="line151">151: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line152">152: </a>  <font color="#4169E1">return</font> 0;
+<a name="line152">152: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line153">153: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test3.c b/src/sys/classes/bv/examples/tests/test3.c
index 1d5b4b3..3148dab 100644
--- a/src/sys/classes/bv/examples/tests/test3.c
+++ b/src/sys/classes/bv/examples/tests/test3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,9 +38,9 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV with non-standard inner product (n=%D, k=%D).\n",n,k);CHKERRQ(ierr);
 
   /* Create inner product matrix */
@@ -121,5 +121,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test3.c.html b/src/sys/classes/bv/examples/tests/test3.c.html
index 7d996ae..ab72b12 100644
--- a/src/sys/classes/bv/examples/tests/test3.c.html
+++ b/src/sys/classes/bv/examples/tests/test3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:31+00:00">
+<meta name="date" content="2016-05-16T10:32:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,9 +47,9 @@
 <a name="line38"> 38: </a>  PetscBool      verbose;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with non-standard inner product (n=%D, k=%D).\n"</font>,n,k);
 
 <a name="line46"> 46: </a>  <font color="#B22222">/* Create inner product matrix */</font>
@@ -130,7 +130,7 @@
 <a name="line121">121: </a>  MatDestroy(&B);
 <a name="line122">122: </a>  VecDestroy(&t);
 <a name="line123">123: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line124">124: </a>  <font color="#4169E1">return</font> 0;
+<a name="line124">124: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line125">125: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test4.c b/src/sys/classes/bv/examples/tests/test4.c
index ab4c695..576da2d 100644
--- a/src/sys/classes/bv/examples/tests/test4.c
+++ b/src/sys/classes/bv/examples/tests/test4.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,12 +38,12 @@ int main(int argc,char **argv)
   PetscBool      verbose,trans;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-kx",&kx,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-lx",&lx,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-ky",&ky,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-ly",&ly,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-kx",&kx,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-lx",&lx,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-ky",&ky,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-ly",&ly,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"First BV with %D active columns (%D leading columns) of dimension %D.\n",kx,lx,n);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Second BV with %D active columns (%D leading columns) of dimension %D.\n",ky,ly,n);CHKERRQ(ierr);
 
@@ -155,7 +155,7 @@ int main(int argc,char **argv)
   ierr = PetscFree(z);CHKERRQ(ierr);
 
   /* Test BVMultInPlace and BVScale */
-  ierr = PetscOptionsHasName(NULL,"-trans",&trans);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-trans",&trans);CHKERRQ(ierr);
   if (trans) {
     Mat Qt;
     ierr = MatTranspose(Q,MAT_INITIAL_MATRIX,&Qt);CHKERRQ(ierr);
@@ -182,5 +182,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&M);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test4.c.html b/src/sys/classes/bv/examples/tests/test4.c.html
index c558596..868180e 100644
--- a/src/sys/classes/bv/examples/tests/test4.c.html
+++ b/src/sys/classes/bv/examples/tests/test4.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test4.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:31+00:00">
+<meta name="date" content="2016-05-16T10:32:25+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,12 +47,12 @@
 <a name="line38"> 38: </a>  PetscBool      verbose,trans;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-kx"</font>,&kx,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-lx"</font>,&lx,NULL);
-<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-ky"</font>,&ky,NULL);
-<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-ly"</font>,&ly,NULL);
-<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-kx"</font>,&kx,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-lx"</font>,&lx,NULL);
+<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-ky"</font>,&ky,NULL);
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-ly"</font>,&ly,NULL);
+<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line47"> 47: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"First <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with %D active columns (%D leading columns) of dimension %D.\n"</font>,kx,lx,n);
 <a name="line48"> 48: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Second <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with %D active columns (%D leading columns) of dimension %D.\n"</font>,ky,ly,n);
 
@@ -164,7 +164,7 @@
 <a name="line155">155: </a>  PetscFree(z);
 
 <a name="line157">157: </a>  <font color="#B22222">/* Test <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> and <a href="../../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a> */</font>
-<a name="line158">158: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-trans"</font>,&trans);
+<a name="line158">158: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-trans"</font>,&trans);
 <a name="line159">159: </a>  <font color="#4169E1">if</font> (trans) {
 <a name="line160">160: </a>    Mat Qt;
 <a name="line161">161: </a>    MatTranspose(Q,MAT_INITIAL_MATRIX,&Qt);
@@ -191,7 +191,7 @@
 <a name="line182">182: </a>  MatDestroy(&M);
 <a name="line183">183: </a>  VecDestroy(&t);
 <a name="line184">184: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line185">185: </a>  <font color="#4169E1">return</font> 0;
+<a name="line185">185: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line186">186: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test5.c b/src/sys/classes/bv/examples/tests/test5.c
index 78bbaed..7190e34 100644
--- a/src/sys/classes/bv/examples/tests/test5.c
+++ b/src/sys/classes/bv/examples/tests/test5.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -39,9 +39,9 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV with indefinite inner product (n=%D, k=%D).\n",n,k);CHKERRQ(ierr);
 
   /* Create inner product matrix (standard involutionary permutation) */
@@ -130,5 +130,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test5.c.html b/src/sys/classes/bv/examples/tests/test5.c.html
index a6bfca5..429e090 100644
--- a/src/sys/classes/bv/examples/tests/test5.c.html
+++ b/src/sys/classes/bv/examples/tests/test5.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test5.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:31+00:00">
+<meta name="date" content="2016-05-16T10:32:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,9 +48,9 @@
 <a name="line39"> 39: </a>  PetscBool      verbose;
 
 <a name="line41"> 41: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line45"> 45: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with indefinite inner product (n=%D, k=%D).\n"</font>,n,k);
 
 <a name="line47"> 47: </a>  <font color="#B22222">/* Create inner product matrix (standard involutionary permutation) */</font>
@@ -139,7 +139,7 @@
 <a name="line130">130: </a>  MatDestroy(&B);
 <a name="line131">131: </a>  VecDestroy(&t);
 <a name="line132">132: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line133">133: </a>  <font color="#4169E1">return</font> 0;
+<a name="line133">133: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line134">134: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test6.c b/src/sys/classes/bv/examples/tests/test6.c
index 7a4708c..d8bb0e3 100644
--- a/src/sys/classes/bv/examples/tests/test6.c
+++ b/src/sys/classes/bv/examples/tests/test6.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,10 +38,10 @@ int main(int argc,char **argv)
   PetscScalar    alpha;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-nc",&nc,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-nc",&nc,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV orthogonalization with %D columns + %D constraints, of length %D.\n",k,nc,n);CHKERRQ(ierr);
 
   /* Create template vector */
@@ -118,5 +118,5 @@ int main(int argc,char **argv)
   ierr = BVDestroy(&X);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test6.c.html b/src/sys/classes/bv/examples/tests/test6.c.html
index 8e7ec51..b74125d 100644
--- a/src/sys/classes/bv/examples/tests/test6.c.html
+++ b/src/sys/classes/bv/examples/tests/test6.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test6.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:32+00:00">
+<meta name="date" content="2016-05-16T10:32:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,10 +47,10 @@
 <a name="line38"> 38: </a>  PetscScalar    alpha;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-nc"</font>,&nc,NULL);
-<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-nc"</font>,&nc,NULL);
+<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line45"> 45: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> orthogonalization with %D columns + %D constraints, of length %D.\n"</font>,k,nc,n);
 
 <a name="line47"> 47: </a>  <font color="#B22222">/* Create template vector */</font>
@@ -127,7 +127,7 @@
 <a name="line118">118: </a>  <a href="../../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
 <a name="line119">119: </a>  VecDestroy(&t);
 <a name="line120">120: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line121">121: </a>  <font color="#4169E1">return</font> 0;
+<a name="line121">121: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line122">122: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test7.c b/src/sys/classes/bv/examples/tests/test7.c
index 9337dfd..61020b9 100644
--- a/src/sys/classes/bv/examples/tests/test7.c
+++ b/src/sys/classes/bv/examples/tests/test7.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,9 +38,9 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BVMatMult (n=%D, k=%D).\n",n,k);CHKERRQ(ierr);
 
   /* Create Laplacian matrix */
@@ -122,8 +122,8 @@ int main(int argc,char **argv)
   ierr = BVDuplicate(Z,&Zcopy);CHKERRQ(ierr);
   ierr = BVCopy(Z,Zcopy);CHKERRQ(ierr);
 
-  /* Test BVAXPY, check result of previous operations */
-  ierr = BVAXPY(Z,-1.0,Y);CHKERRQ(ierr);
+  /* Test BVMult, check result of previous operations */
+  ierr = BVMult(Z,-1.0,1.0,Y,NULL);CHKERRQ(ierr);
   ierr = BVNorm(Z,NORM_FROBENIUS,&norm);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error: %g\n",(double)norm);CHKERRQ(ierr);
 
@@ -147,8 +147,8 @@ int main(int argc,char **argv)
     ierr = BVView(Z,view);CHKERRQ(ierr);
   }
 
-  /* Check result again with BVAXPY */
-  ierr = BVAXPY(Z,-1.0,Y);CHKERRQ(ierr);
+  /* Check result again with BVMult */
+  ierr = BVMult(Z,-1.0,1.0,Y,NULL);CHKERRQ(ierr);
   ierr = BVNorm(Z,NORM_FROBENIUS,&norm);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error: %g\n",(double)norm);CHKERRQ(ierr);
 
@@ -159,5 +159,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test7.c.html b/src/sys/classes/bv/examples/tests/test7.c.html
index 6b7ea57..a195b7e 100644
--- a/src/sys/classes/bv/examples/tests/test7.c.html
+++ b/src/sys/classes/bv/examples/tests/test7.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test7.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:32+00:00">
+<meta name="date" content="2016-05-16T10:32:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test7.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test7.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,9 +47,9 @@
 <a name="line38"> 38: </a>  PetscBool      verbose;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a> (n=%D, k=%D).\n"</font>,n,k);
 
 <a name="line46"> 46: </a>  <font color="#B22222">/* Create Laplacian matrix */</font>
@@ -131,8 +131,8 @@
 <a name="line122">122: </a>  <a href="../../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(Z,&Zcopy);
 <a name="line123">123: </a>  <a href="../../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(Z,Zcopy);
 
-<a name="line125">125: </a>  <font color="#B22222">/* Test <a href="../../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>, check result of previous operations */</font>
-<a name="line126">126: </a>  <a href="../../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(Z,-1.0,Y);
+<a name="line125">125: </a>  <font color="#B22222">/* Test <a href="../../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>, check result of previous operations */</font>
+<a name="line126">126: </a>  <a href="../../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(Z,-1.0,1.0,Y,NULL);
 <a name="line127">127: </a>  <a href="../../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(Z,NORM_FROBENIUS,&norm);
 <a name="line128">128: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Norm of error: %g\n"</font>,(double)norm);
 
@@ -156,8 +156,8 @@
 <a name="line147">147: </a>    <a href="../../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(Z,view);
 <a name="line148">148: </a>  }
 
-<a name="line150">150: </a>  <font color="#B22222">/* Check result again with <a href="../../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a> */</font>
-<a name="line151">151: </a>  <a href="../../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(Z,-1.0,Y);
+<a name="line150">150: </a>  <font color="#B22222">/* Check result again with <a href="../../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a> */</font>
+<a name="line151">151: </a>  <a href="../../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(Z,-1.0,1.0,Y,NULL);
 <a name="line152">152: </a>  <a href="../../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(Z,NORM_FROBENIUS,&norm);
 <a name="line153">153: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Norm of error: %g\n"</font>,(double)norm);
 
@@ -168,7 +168,7 @@
 <a name="line159">159: </a>  MatDestroy(&B);
 <a name="line160">160: </a>  VecDestroy(&t);
 <a name="line161">161: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line162">162: </a>  <font color="#4169E1">return</font> 0;
+<a name="line162">162: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line163">163: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test8.c b/src/sys/classes/bv/examples/tests/test8.c
index 73ae5d0..4e17a34 100644
--- a/src/sys/classes/bv/examples/tests/test8.c
+++ b/src/sys/classes/bv/examples/tests/test8.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,9 +37,9 @@ int main(int argc,char **argv)
   PetscScalar    alpha,*pz;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV orthogonalization with selected columns of length %D.\n",n);CHKERRQ(ierr);
 
   /* Create template vector */
@@ -113,5 +113,5 @@ int main(int argc,char **argv)
   ierr = BVDestroy(&X);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test8.c.html b/src/sys/classes/bv/examples/tests/test8.c.html
index aeee164..aefc9fb 100644
--- a/src/sys/classes/bv/examples/tests/test8.c.html
+++ b/src/sys/classes/bv/examples/tests/test8.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test8.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:32+00:00">
+<meta name="date" content="2016-05-16T10:32:26+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,9 +46,9 @@
 <a name="line37"> 37: </a>  PetscScalar    alpha,*pz;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line43"> 43: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> orthogonalization with selected columns of length %D.\n"</font>,n);
 
 <a name="line45"> 45: </a>  <font color="#B22222">/* Create template vector */</font>
@@ -122,7 +122,7 @@
 <a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&X);
 <a name="line114">114: </a>  VecDestroy(&t);
 <a name="line115">115: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line116">116: </a>  <font color="#4169E1">return</font> 0;
+<a name="line116">116: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line117">117: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/examples/tests/test9.c b/src/sys/classes/bv/examples/tests/test9.c
index 01f61d7..ce4e5d2 100644
--- a/src/sys/classes/bv/examples/tests/test9.c
+++ b/src/sys/classes/bv/examples/tests/test9.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,12 +38,12 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-kx",&kx,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-lx",&lx,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-ky",&ky,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-ly",&ly,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-kx",&kx,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-lx",&lx,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-ky",&ky,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-ly",&ly,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Test BV projection (n=%D).\n",n);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"X has %D active columns (%D leading columns).\n",kx,lx);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Y has %D active columns (%D leading columns).\n",ky,ly);CHKERRQ(ierr);
@@ -216,5 +216,5 @@ int main(int argc,char **argv)
   ierr = MatDestroy(&G);CHKERRQ(ierr);
   ierr = VecDestroy(&t);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/bv/examples/tests/test9.c.html b/src/sys/classes/bv/examples/tests/test9.c.html
index abe45d2..f607ad5 100644
--- a/src/sys/classes/bv/examples/tests/test9.c.html
+++ b/src/sys/classes/bv/examples/tests/test9.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/examples/tests/test9.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:32+00:00">
+<meta name="date" content="2016-05-16T10:32:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/examples/tests/test9.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/examples/tests/test9.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,12 +47,12 @@
 <a name="line38"> 38: </a>  PetscBool      verbose;
 
 <a name="line40"> 40: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-kx"</font>,&kx,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-lx"</font>,&lx,NULL);
-<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-ky"</font>,&ky,NULL);
-<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-ly"</font>,&ly,NULL);
-<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-kx"</font>,&kx,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-lx"</font>,&lx,NULL);
+<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-ky"</font>,&ky,NULL);
+<a name="line45"> 45: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-ly"</font>,&ly,NULL);
+<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 <a name="line47"> 47: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Test <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> projection (n=%D).\n"</font>,n);
 <a name="line48"> 48: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"X has %D active columns (%D leading columns).\n"</font>,kx,lx);
 <a name="line49"> 49: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Y has %D active columns (%D leading columns).\n"</font>,ky,ly);
@@ -225,7 +225,7 @@
 <a name="line216">216: </a>  MatDestroy(&G);
 <a name="line217">217: </a>  VecDestroy(&t);
 <a name="line218">218: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line219">219: </a>  <font color="#4169E1">return</font> 0;
+<a name="line219">219: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line220">220: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/bv/impls/contiguous/contig.c b/src/sys/classes/bv/impls/contiguous/contig.c
index 4d4e88b..96767e7 100644
--- a/src/sys/classes/bv/impls/contiguous/contig.c
+++ b/src/sys/classes/bv/impls/contiguous/contig.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -39,10 +39,14 @@ PetscErrorCode BVMult_Contiguous(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Ma
   PetscInt       ldq;
 
   PetscFunctionBegin;
-  ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
-  ierr = BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,x->array+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,y->array+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
-  ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  if (Q) {
+    ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
+    ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
+    ierr = BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,x->array+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,y->array+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
+    ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  } else {
+    ierr = BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,x->array+(X->nc+X->l)*X->n,beta,y->array+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
@@ -96,18 +100,6 @@ PetscErrorCode BVMultInPlaceTranspose_Contiguous(BV V,Mat Q,PetscInt s,PetscInt
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "BVAXPY_Contiguous"
-PetscErrorCode BVAXPY_Contiguous(BV Y,PetscScalar alpha,BV X)
-{
-  PetscErrorCode ierr;
-  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data,*y = (BV_CONTIGUOUS*)Y->data;
-
-  PetscFunctionBegin;
-  ierr = BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,x->array+(X->nc+X->l)*X->n,y->array+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "BVDot_Contiguous"
 PetscErrorCode BVDot_Contiguous(BV X,BV Y,Mat M)
 {
@@ -309,7 +301,7 @@ PetscErrorCode BVResize_Contiguous(BV bv,PetscInt m,PetscBool copy)
   ierr = PetscLogObjectParents(bv,m,newV);CHKERRQ(ierr);
   if (((PetscObject)bv)->name) {
     for (j=0;j<m;j++) {
-      ierr = PetscSNPrintf(str,50,"%s_%D",((PetscObject)bv)->name,j);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(str,50,"%s_%d",((PetscObject)bv)->name,(int)j);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)newV[j],str);CHKERRQ(ierr);
     }
   }
@@ -348,6 +340,17 @@ PetscErrorCode BVGetArray_Contiguous(BV bv,PetscScalar **a)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVGetArrayRead_Contiguous"
+PetscErrorCode BVGetArrayRead_Contiguous(BV bv,const PetscScalar **a)
+{
+  BV_CONTIGUOUS *ctx = (BV_CONTIGUOUS*)bv->data;
+
+  PetscFunctionBegin;
+  *a = ctx->array;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVDestroy_Contiguous"
 PetscErrorCode BVDestroy_Contiguous(BV bv)
 {
@@ -396,7 +399,7 @@ PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(BV bv)
   ierr = PetscLogObjectParents(bv,bv->m,ctx->V);CHKERRQ(ierr);
   if (((PetscObject)bv)->name) {
     for (j=0;j<bv->m;j++) {
-      ierr = PetscSNPrintf(str,50,"%s_%D",((PetscObject)bv)->name,j);CHKERRQ(ierr);
+      ierr = PetscSNPrintf(str,50,"%s_%d",((PetscObject)bv)->name,(int)j);CHKERRQ(ierr);
       ierr = PetscObjectSetName((PetscObject)ctx->V[j],str);CHKERRQ(ierr);
     }
   }
@@ -405,7 +408,6 @@ PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(BV bv)
   bv->ops->multvec          = BVMultVec_Contiguous;
   bv->ops->multinplace      = BVMultInPlace_Contiguous;
   bv->ops->multinplacetrans = BVMultInPlaceTranspose_Contiguous;
-  bv->ops->axpy             = BVAXPY_Contiguous;
   bv->ops->dot              = BVDot_Contiguous;
   bv->ops->dotvec           = BVDotVec_Contiguous;
   bv->ops->dotvec_local     = BVDotVec_Local_Contiguous;
@@ -418,6 +420,7 @@ PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(BV bv)
   bv->ops->resize           = BVResize_Contiguous;
   bv->ops->getcolumn        = BVGetColumn_Contiguous;
   bv->ops->getarray         = BVGetArray_Contiguous;
+  bv->ops->getarrayread     = BVGetArrayRead_Contiguous;
   bv->ops->destroy          = BVDestroy_Contiguous;
   PetscFunctionReturn(0);
 }
diff --git a/src/sys/classes/bv/impls/contiguous/contig.c.html b/src/sys/classes/bv/impls/contiguous/contig.c.html
index ad79410..4404ea7 100644
--- a/src/sys/classes/bv/impls/contiguous/contig.c.html
+++ b/src/sys/classes/bv/impls/contiguous/contig.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/contiguous/contig.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:28+00:00">
+<meta name="date" content="2016-05-16T10:32:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/contiguous/contig.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/contiguous/contig.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> implemented as an array of Vecs sharing a contiguous array for elements</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -47,319 +47,323 @@
 <a name="line38"> 38: </a>  PetscScalar    *q;
 <a name="line39"> 39: </a>  PetscInt       ldq;
 
-<a name="line42"> 42: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line43"> 43: </a>  MatDenseGetArray(Q,&q);
-<a name="line44"> 44: </a>  BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,x->array+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,y->array+(Y->nc+Y->l)*Y->n);
-<a name="line45"> 45: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line46"> 46: </a>  <font color="#4169E1">return</font>(0);
-<a name="line47"> 47: </a>}
-
-<a name="line51"> 51: </a><strong><font color="#4169E1"><a name="BVMultVec_Contiguous"></a>PetscErrorCode BVMultVec_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
-<a name="line52"> 52: </a>{
-<a name="line54"> 54: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data;
-<a name="line55"> 55: </a>  PetscScalar    *py;
-
-<a name="line58"> 58: </a>  VecGetArray(y,&py);
-<a name="line59"> 59: </a>  BVMultVec_BLAS_Private(X,X->n,X->k-X->l,alpha,x->array+(X->nc+X->l)*X->n,q,beta,py);
-<a name="line60"> 60: </a>  VecRestoreArray(y,&py);
-<a name="line61"> 61: </a>  <font color="#4169E1">return</font>(0);
-<a name="line62"> 62: </a>}
-
-<a name="line66"> 66: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Contiguous"></a>PetscErrorCode BVMultInPlace_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line67"> 67: </a>{
-<a name="line69"> 69: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)V->data;
-<a name="line70"> 70: </a>  PetscScalar    *q;
-<a name="line71"> 71: </a>  PetscInt       ldq;
-
-<a name="line74"> 74: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line75"> 75: </a>  MatDenseGetArray(Q,&q);
-<a name="line76"> 76: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,ctx->array+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_FALSE);
-<a name="line77"> 77: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line78"> 78: </a>  <font color="#4169E1">return</font>(0);
-<a name="line79"> 79: </a>}
-
-<a name="line83"> 83: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Contiguous"></a>PetscErrorCode BVMultInPlaceTranspose_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line84"> 84: </a>{
-<a name="line86"> 86: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)V->data;
-<a name="line87"> 87: </a>  PetscScalar    *q;
-<a name="line88"> 88: </a>  PetscInt       ldq;
-
-<a name="line91"> 91: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line92"> 92: </a>  MatDenseGetArray(Q,&q);
-<a name="line93"> 93: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,ctx->array+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_TRUE);
-<a name="line94"> 94: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line95"> 95: </a>  <font color="#4169E1">return</font>(0);
-<a name="line96"> 96: </a>}
-
-<a name="line100">100: </a><strong><font color="#4169E1"><a name="BVAXPY_Contiguous"></a>PetscErrorCode BVAXPY_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X)</font></strong>
-<a name="line101">101: </a>{
-<a name="line103">103: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data,*y = (BV_CONTIGUOUS*)Y->data;
-
-<a name="line106">106: </a>  BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,x->array+(X->nc+X->l)*X->n,y->array+(Y->nc+Y->l)*Y->n);
-<a name="line107">107: </a>  <font color="#4169E1">return</font>(0);
-<a name="line108">108: </a>}
-
-<a name="line112">112: </a><strong><font color="#4169E1"><a name="BVDot_Contiguous"></a>PetscErrorCode BVDot_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
-<a name="line113">113: </a>{
-<a name="line115">115: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data,*y = (BV_CONTIGUOUS*)Y->data;
-<a name="line116">116: </a>  PetscScalar    *m;
-<a name="line117">117: </a>  PetscInt       ldm;
-
-<a name="line120">120: </a>  MatGetSize(M,&ldm,NULL);
-<a name="line121">121: </a>  MatDenseGetArray(M,&m);
-<a name="line122">122: </a>  BVDot_BLAS_Private(X,Y->k-Y->l,X->k-X->l,X->n,ldm,y->array+(Y->nc+Y->l)*Y->n,x->array+(X->nc+X->l)*X->n,m+X->l*ldm+Y->l,x->mpi);
-<a name="line123">123: </a>  MatDenseRestoreArray(M,&m);
-<a name="line124">124: </a>  <font color="#4169E1">return</font>(0);
-<a name="line125">125: </a>}
-
-<a name="line129">129: </a><strong><font color="#4169E1"><a name="BVDotVec_Contiguous"></a>PetscErrorCode BVDotVec_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line130">130: </a>{
-<a name="line131">131: </a>  PetscErrorCode    ierr;
-<a name="line132">132: </a>  BV_CONTIGUOUS     *x = (BV_CONTIGUOUS*)X->data;
-<a name="line133">133: </a>  const PetscScalar *py;
-<a name="line134">134: </a>  Vec               z = y;
-
-<a name="line137">137: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line138">138: </a>    BV_IPMatMult(X,y);
-<a name="line139">139: </a>    z = X->Bx;
-<a name="line140">140: </a>  }
-<a name="line141">141: </a>  VecGetArrayRead(z,&py);
-<a name="line142">142: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,x->array+(X->nc+X->l)*X->n,py,m,x->mpi);
-<a name="line143">143: </a>  VecRestoreArrayRead(z,&py);
-<a name="line144">144: </a>  <font color="#4169E1">return</font>(0);
-<a name="line145">145: </a>}
-
-<a name="line149">149: </a><strong><font color="#4169E1"><a name="BVDotVec_Local_Contiguous"></a>PetscErrorCode BVDotVec_Local_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line150">150: </a>{
-<a name="line152">152: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data;
-<a name="line153">153: </a>  PetscScalar    *py;
-<a name="line154">154: </a>  Vec            z = y;
-
-<a name="line157">157: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line158">158: </a>    BV_IPMatMult(X,y);
-<a name="line159">159: </a>    z = X->Bx;
-<a name="line160">160: </a>  }
-<a name="line161">161: </a>  VecGetArray(z,&py);
-<a name="line162">162: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,x->array+(X->nc+X->l)*X->n,py,m,PETSC_FALSE);
-<a name="line163">163: </a>  VecRestoreArray(z,&py);
-<a name="line164">164: </a>  <font color="#4169E1">return</font>(0);
-<a name="line165">165: </a>}
-
-<a name="line169">169: </a><strong><font color="#4169E1"><a name="BVScale_Contiguous"></a>PetscErrorCode BVScale_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
-<a name="line170">170: </a>{
-<a name="line172">172: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
-
-<a name="line175">175: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line176">176: </a>    BVScale_BLAS_Private(bv,(bv->k-bv->l)*bv->n,ctx->array+(bv->nc+bv->l)*bv->n,alpha);
-<a name="line177">177: </a>  } <font color="#4169E1">else</font> {
-<a name="line178">178: </a>    BVScale_BLAS_Private(bv,bv->n,ctx->array+(bv->nc+j)*bv->n,alpha);
-<a name="line179">179: </a>  }
-<a name="line180">180: </a>  <font color="#4169E1">return</font>(0);
-<a name="line181">181: </a>}
-
-<a name="line185">185: </a><strong><font color="#4169E1"><a name="BVNorm_Contiguous"></a>PetscErrorCode BVNorm_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line186">186: </a>{
-<a name="line188">188: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
-
-<a name="line191">191: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line192">192: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,ctx->array+(bv->nc+bv->l)*bv->n,type,val,ctx->mpi);
-<a name="line193">193: </a>  } <font color="#4169E1">else</font> {
-<a name="line194">194: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,ctx->array+(bv->nc+j)*bv->n,type,val,ctx->mpi);
-<a name="line195">195: </a>  }
-<a name="line196">196: </a>  <font color="#4169E1">return</font>(0);
-<a name="line197">197: </a>}
-
-<a name="line201">201: </a><strong><font color="#4169E1"><a name="BVNorm_Local_Contiguous"></a>PetscErrorCode BVNorm_Local_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line202">202: </a>{
-<a name="line204">204: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
-
-<a name="line207">207: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line208">208: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,ctx->array+(bv->nc+bv->l)*bv->n,type,val,PETSC_FALSE);
-<a name="line209">209: </a>  } <font color="#4169E1">else</font> {
-<a name="line210">210: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,ctx->array+(bv->nc+j)*bv->n,type,val,PETSC_FALSE);
-<a name="line211">211: </a>  }
-<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
-<a name="line213">213: </a>}
-
-<a name="line217">217: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Contiguous"></a>PetscErrorCode BVOrthogonalize_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
-<a name="line218">218: </a>{
-<a name="line220">220: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)V->data;
-<a name="line221">221: </a>  PetscScalar    *r=NULL;
-
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (R) { MatDenseGetArray(R,&r); }
-<a name="line225">225: </a>  BVOrthogonalize_LAPACK_Private(V,V->n,V->k,ctx->array+V->nc*V->n,r,ctx->mpi);
-<a name="line226">226: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
-<a name="line227">227: </a>  <font color="#4169E1">return</font>(0);
-<a name="line228">228: </a>}
-
-<a name="line232">232: </a><strong><font color="#4169E1"><a name="BVMatMult_Contiguous"></a>PetscErrorCode BVMatMult_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line233">233: </a>{
-<a name="line235">235: </a>  BV_CONTIGUOUS  *v = (BV_CONTIGUOUS*)V->data,*w = (BV_CONTIGUOUS*)W->data;
-<a name="line236">236: </a>  PetscScalar    *pb,*pc;
-<a name="line237">237: </a>  PetscInt       j,m;
-<a name="line238">238: </a>  PetscBool      flg;
-
-<a name="line241">241: </a>  MatHasOperation(A,MATOP_MAT_MULT,&flg);
-<a name="line242">242: </a>  <font color="#4169E1">if</font> (V->vmm && flg) {
-<a name="line243">243: </a>    m = V->k-V->l;
-<a name="line244">244: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT_SAVE) {
-<a name="line245">245: </a>      BV_AllocateMatMult(V,A,m);
-<a name="line246">246: </a>      MatDenseGetArray(V->B,&pb);
-<a name="line247">247: </a>      PetscMemcpy(pb,v->array+(V->nc+V->l)*V->n,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line248">248: </a>      MatDenseRestoreArray(V->B,&pb);
-<a name="line249">249: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* BV_MATMULT_MAT */</font>
-<a name="line250">250: </a>      MatCreateDense(PetscObjectComm((PetscObject)V),V->n,PETSC_DECIDE,V->N,m,v->array+(V->nc+V->l)*V->n,&V->B);
-<a name="line251">251: </a>    }
-<a name="line252">252: </a>    <font color="#4169E1">if</font> (!V->C) {
-<a name="line253">253: </a>      MatMatMultSymbolic(A,V->B,PETSC_DEFAULT,&V->C);
+<a name="line42"> 42: </a>  <font color="#4169E1">if</font> (Q) {
+<a name="line43"> 43: </a>    MatGetSize(Q,&ldq,NULL);
+<a name="line44"> 44: </a>    MatDenseGetArray(Q,&q);
+<a name="line45"> 45: </a>    BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,x->array+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,y->array+(Y->nc+Y->l)*Y->n);
+<a name="line46"> 46: </a>    MatDenseRestoreArray(Q,&q);
+<a name="line47"> 47: </a>  } <font color="#4169E1">else</font> {
+<a name="line48"> 48: </a>    BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,x->array+(X->nc+X->l)*X->n,beta,y->array+(Y->nc+Y->l)*Y->n);
+<a name="line49"> 49: </a>  }
+<a name="line50"> 50: </a>  <font color="#4169E1">return</font>(0);
+<a name="line51"> 51: </a>}
+
+<a name="line55"> 55: </a><strong><font color="#4169E1"><a name="BVMultVec_Contiguous"></a>PetscErrorCode BVMultVec_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
+<a name="line56"> 56: </a>{
+<a name="line58"> 58: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data;
+<a name="line59"> 59: </a>  PetscScalar    *py;
+
+<a name="line62"> 62: </a>  VecGetArray(y,&py);
+<a name="line63"> 63: </a>  BVMultVec_BLAS_Private(X,X->n,X->k-X->l,alpha,x->array+(X->nc+X->l)*X->n,q,beta,py);
+<a name="line64"> 64: </a>  VecRestoreArray(y,&py);
+<a name="line65"> 65: </a>  <font color="#4169E1">return</font>(0);
+<a name="line66"> 66: </a>}
+
+<a name="line70"> 70: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Contiguous"></a>PetscErrorCode BVMultInPlace_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line71"> 71: </a>{
+<a name="line73"> 73: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)V->data;
+<a name="line74"> 74: </a>  PetscScalar    *q;
+<a name="line75"> 75: </a>  PetscInt       ldq;
+
+<a name="line78"> 78: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line79"> 79: </a>  MatDenseGetArray(Q,&q);
+<a name="line80"> 80: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,ctx->array+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_FALSE);
+<a name="line81"> 81: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line82"> 82: </a>  <font color="#4169E1">return</font>(0);
+<a name="line83"> 83: </a>}
+
+<a name="line87"> 87: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Contiguous"></a>PetscErrorCode BVMultInPlaceTranspose_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line88"> 88: </a>{
+<a name="line90"> 90: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)V->data;
+<a name="line91"> 91: </a>  PetscScalar    *q;
+<a name="line92"> 92: </a>  PetscInt       ldq;
+
+<a name="line95"> 95: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line96"> 96: </a>  MatDenseGetArray(Q,&q);
+<a name="line97"> 97: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,ctx->array+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_TRUE);
+<a name="line98"> 98: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);
+<a name="line100">100: </a>}
+
+<a name="line104">104: </a><strong><font color="#4169E1"><a name="BVDot_Contiguous"></a>PetscErrorCode BVDot_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
+<a name="line105">105: </a>{
+<a name="line107">107: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data,*y = (BV_CONTIGUOUS*)Y->data;
+<a name="line108">108: </a>  PetscScalar    *m;
+<a name="line109">109: </a>  PetscInt       ldm;
+
+<a name="line112">112: </a>  MatGetSize(M,&ldm,NULL);
+<a name="line113">113: </a>  MatDenseGetArray(M,&m);
+<a name="line114">114: </a>  BVDot_BLAS_Private(X,Y->k-Y->l,X->k-X->l,X->n,ldm,y->array+(Y->nc+Y->l)*Y->n,x->array+(X->nc+X->l)*X->n,m+X->l*ldm+Y->l,x->mpi);
+<a name="line115">115: </a>  MatDenseRestoreArray(M,&m);
+<a name="line116">116: </a>  <font color="#4169E1">return</font>(0);
+<a name="line117">117: </a>}
+
+<a name="line121">121: </a><strong><font color="#4169E1"><a name="BVDotVec_Contiguous"></a>PetscErrorCode BVDotVec_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line122">122: </a>{
+<a name="line123">123: </a>  PetscErrorCode    ierr;
+<a name="line124">124: </a>  BV_CONTIGUOUS     *x = (BV_CONTIGUOUS*)X->data;
+<a name="line125">125: </a>  const PetscScalar *py;
+<a name="line126">126: </a>  Vec               z = y;
+
+<a name="line129">129: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line130">130: </a>    BV_IPMatMult(X,y);
+<a name="line131">131: </a>    z = X->Bx;
+<a name="line132">132: </a>  }
+<a name="line133">133: </a>  VecGetArrayRead(z,&py);
+<a name="line134">134: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,x->array+(X->nc+X->l)*X->n,py,m,x->mpi);
+<a name="line135">135: </a>  VecRestoreArrayRead(z,&py);
+<a name="line136">136: </a>  <font color="#4169E1">return</font>(0);
+<a name="line137">137: </a>}
+
+<a name="line141">141: </a><strong><font color="#4169E1"><a name="BVDotVec_Local_Contiguous"></a>PetscErrorCode BVDotVec_Local_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line142">142: </a>{
+<a name="line144">144: </a>  BV_CONTIGUOUS  *x = (BV_CONTIGUOUS*)X->data;
+<a name="line145">145: </a>  PetscScalar    *py;
+<a name="line146">146: </a>  Vec            z = y;
+
+<a name="line149">149: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line150">150: </a>    BV_IPMatMult(X,y);
+<a name="line151">151: </a>    z = X->Bx;
+<a name="line152">152: </a>  }
+<a name="line153">153: </a>  VecGetArray(z,&py);
+<a name="line154">154: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,x->array+(X->nc+X->l)*X->n,py,m,PETSC_FALSE);
+<a name="line155">155: </a>  VecRestoreArray(z,&py);
+<a name="line156">156: </a>  <font color="#4169E1">return</font>(0);
+<a name="line157">157: </a>}
+
+<a name="line161">161: </a><strong><font color="#4169E1"><a name="BVScale_Contiguous"></a>PetscErrorCode BVScale_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
+<a name="line162">162: </a>{
+<a name="line164">164: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
+
+<a name="line167">167: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line168">168: </a>    BVScale_BLAS_Private(bv,(bv->k-bv->l)*bv->n,ctx->array+(bv->nc+bv->l)*bv->n,alpha);
+<a name="line169">169: </a>  } <font color="#4169E1">else</font> {
+<a name="line170">170: </a>    BVScale_BLAS_Private(bv,bv->n,ctx->array+(bv->nc+j)*bv->n,alpha);
+<a name="line171">171: </a>  }
+<a name="line172">172: </a>  <font color="#4169E1">return</font>(0);
+<a name="line173">173: </a>}
+
+<a name="line177">177: </a><strong><font color="#4169E1"><a name="BVNorm_Contiguous"></a>PetscErrorCode BVNorm_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line178">178: </a>{
+<a name="line180">180: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
+
+<a name="line183">183: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line184">184: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,ctx->array+(bv->nc+bv->l)*bv->n,type,val,ctx->mpi);
+<a name="line185">185: </a>  } <font color="#4169E1">else</font> {
+<a name="line186">186: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,ctx->array+(bv->nc+j)*bv->n,type,val,ctx->mpi);
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
+<a name="line189">189: </a>}
+
+<a name="line193">193: </a><strong><font color="#4169E1"><a name="BVNorm_Local_Contiguous"></a>PetscErrorCode BVNorm_Local_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line194">194: </a>{
+<a name="line196">196: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
+
+<a name="line199">199: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line200">200: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,ctx->array+(bv->nc+bv->l)*bv->n,type,val,PETSC_FALSE);
+<a name="line201">201: </a>  } <font color="#4169E1">else</font> {
+<a name="line202">202: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,ctx->array+(bv->nc+j)*bv->n,type,val,PETSC_FALSE);
+<a name="line203">203: </a>  }
+<a name="line204">204: </a>  <font color="#4169E1">return</font>(0);
+<a name="line205">205: </a>}
+
+<a name="line209">209: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Contiguous"></a>PetscErrorCode BVOrthogonalize_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
+<a name="line210">210: </a>{
+<a name="line212">212: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)V->data;
+<a name="line213">213: </a>  PetscScalar    *r=NULL;
+
+<a name="line216">216: </a>  <font color="#4169E1">if</font> (R) { MatDenseGetArray(R,&r); }
+<a name="line217">217: </a>  BVOrthogonalize_LAPACK_Private(V,V->n,V->k,ctx->array+V->nc*V->n,r,ctx->mpi);
+<a name="line218">218: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
+<a name="line219">219: </a>  <font color="#4169E1">return</font>(0);
+<a name="line220">220: </a>}
+
+<a name="line224">224: </a><strong><font color="#4169E1"><a name="BVMatMult_Contiguous"></a>PetscErrorCode BVMatMult_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line225">225: </a>{
+<a name="line227">227: </a>  BV_CONTIGUOUS  *v = (BV_CONTIGUOUS*)V->data,*w = (BV_CONTIGUOUS*)W->data;
+<a name="line228">228: </a>  PetscScalar    *pb,*pc;
+<a name="line229">229: </a>  PetscInt       j,m;
+<a name="line230">230: </a>  PetscBool      flg;
+
+<a name="line233">233: </a>  MatHasOperation(A,MATOP_MAT_MULT,&flg);
+<a name="line234">234: </a>  <font color="#4169E1">if</font> (V->vmm && flg) {
+<a name="line235">235: </a>    m = V->k-V->l;
+<a name="line236">236: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT_SAVE) {
+<a name="line237">237: </a>      BV_AllocateMatMult(V,A,m);
+<a name="line238">238: </a>      MatDenseGetArray(V->B,&pb);
+<a name="line239">239: </a>      PetscMemcpy(pb,v->array+(V->nc+V->l)*V->n,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line240">240: </a>      MatDenseRestoreArray(V->B,&pb);
+<a name="line241">241: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* BV_MATMULT_MAT */</font>
+<a name="line242">242: </a>      MatCreateDense(PetscObjectComm((PetscObject)V),V->n,PETSC_DECIDE,V->N,m,v->array+(V->nc+V->l)*V->n,&V->B);
+<a name="line243">243: </a>    }
+<a name="line244">244: </a>    <font color="#4169E1">if</font> (!V->C) {
+<a name="line245">245: </a>      MatMatMultSymbolic(A,V->B,PETSC_DEFAULT,&V->C);
+<a name="line246">246: </a>    }
+<a name="line247">247: </a>    MatMatMultNumeric(A,V->B,V->C);
+<a name="line248">248: </a>    MatDenseGetArray(V->C,&pc);
+<a name="line249">249: </a>    PetscMemcpy(w->array+(W->nc+W->l)*W->n,pc,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line250">250: </a>    MatDenseRestoreArray(V->C,&pc);
+<a name="line251">251: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT) {
+<a name="line252">252: </a>      MatDestroy(&V->B);
+<a name="line253">253: </a>      MatDestroy(&V->C);
 <a name="line254">254: </a>    }
-<a name="line255">255: </a>    MatMatMultNumeric(A,V->B,V->C);
-<a name="line256">256: </a>    MatDenseGetArray(V->C,&pc);
-<a name="line257">257: </a>    PetscMemcpy(w->array+(W->nc+W->l)*W->n,pc,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line258">258: </a>    MatDenseRestoreArray(V->C,&pc);
-<a name="line259">259: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT) {
-<a name="line260">260: </a>      MatDestroy(&V->B);
-<a name="line261">261: </a>      MatDestroy(&V->C);
-<a name="line262">262: </a>    }
-<a name="line263">263: </a>  } <font color="#4169E1">else</font> {
-<a name="line264">264: </a>    <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
-<a name="line265">265: </a>      MatMult(A,v->V[V->nc+V->l+j],w->V[W->nc+W->l+j]);
-<a name="line266">266: </a>    }
-<a name="line267">267: </a>  }
-<a name="line268">268: </a>  <font color="#4169E1">return</font>(0);
-<a name="line269">269: </a>}
-
-<a name="line273">273: </a><strong><font color="#4169E1"><a name="BVCopy_Contiguous"></a>PetscErrorCode BVCopy_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line274">274: </a>{
-<a name="line276">276: </a>  BV_CONTIGUOUS  *v = (BV_CONTIGUOUS*)V->data,*w = (BV_CONTIGUOUS*)W->data;
-<a name="line277">277: </a>  PetscScalar    *pvc,*pwc;
-
-<a name="line280">280: </a>  pvc = v->array+(V->nc+V->l)*V->n;
-<a name="line281">281: </a>  pwc = w->array+(W->nc+W->l)*W->n;
-<a name="line282">282: </a>  PetscMemcpy(pwc,pvc,(V->k-V->l)*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line283">283: </a>  <font color="#4169E1">return</font>(0);
-<a name="line284">284: </a>}
-
-<a name="line288">288: </a><strong><font color="#4169E1"><a name="BVResize_Contiguous"></a>PetscErrorCode BVResize_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
-<a name="line289">289: </a>{
-<a name="line291">291: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
-<a name="line292">292: </a>  PetscInt       j,bs;
-<a name="line293">293: </a>  PetscScalar    *newarray;
-<a name="line294">294: </a>  Vec            *newV;
-<a name="line295">295: </a>  char           str[50];
-
-<a name="line298">298: </a>  VecGetBlockSize(bv->t,&bs);
-<a name="line299">299: </a>  PetscMalloc1(m*bv->n,&newarray);
-<a name="line300">300: </a>  PetscMemzero(newarray,m*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line301">301: </a>  PetscMalloc1(m,&newV);
-<a name="line302">302: </a>  <font color="#4169E1">for</font> (j=0;j<m;j++) {
-<a name="line303">303: </a>    <font color="#4169E1">if</font> (ctx->mpi) {
-<a name="line304">304: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,bv->n,PETSC_DECIDE,newarray+j*bv->n,newV+j);
-<a name="line305">305: </a>    } <font color="#4169E1">else</font> {
-<a name="line306">306: </a>      VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,bv->n,newarray+j*bv->n,newV+j);
-<a name="line307">307: </a>    }
-<a name="line308">308: </a>  }
-<a name="line309">309: </a>  PetscLogObjectParents(bv,m,newV);
-<a name="line310">310: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line311">311: </a>    <font color="#4169E1">for</font> (j=0;j<m;j++) {
-<a name="line312">312: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%D"</font>,((PetscObject)bv)->name,j);
-<a name="line313">313: </a>      PetscObjectSetName((PetscObject)newV[j],str);
-<a name="line314">314: </a>    }
-<a name="line315">315: </a>  }
-<a name="line316">316: </a>  <font color="#4169E1">if</font> (copy) {
-<a name="line317">317: </a>    PetscMemcpy(newarray,ctx->array,PetscMin(m,bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line318">318: </a>  }
-<a name="line319">319: </a>  VecDestroyVecs(bv->m,&ctx->V);
-<a name="line320">320: </a>  ctx->V = newV;
-<a name="line321">321: </a>  PetscFree(ctx->array);
-<a name="line322">322: </a>  ctx->array = newarray;
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a>}
-
-<a name="line328">328: </a><strong><font color="#4169E1"><a name="BVGetColumn_Contiguous"></a>PetscErrorCode BVGetColumn_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line329">329: </a>{
-<a name="line330">330: </a>  BV_CONTIGUOUS *ctx = (BV_CONTIGUOUS*)bv->data;
-<a name="line331">331: </a>  PetscInt      l;
-
-<a name="line334">334: </a>  l = BVAvailableVec;
-<a name="line335">335: </a>  bv->cv[l] = ctx->V[bv->nc+j];
-<a name="line336">336: </a>  <font color="#4169E1">return</font>(0);
-<a name="line337">337: </a>}
-
-<a name="line341">341: </a><strong><font color="#4169E1"><a name="BVGetArray_Contiguous"></a>PetscErrorCode BVGetArray_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line342">342: </a>{
-<a name="line343">343: </a>  BV_CONTIGUOUS *ctx = (BV_CONTIGUOUS*)bv->data;
-
-<a name="line346">346: </a>  *a = ctx->array;
-<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
-<a name="line348">348: </a>}
-
-<a name="line352">352: </a><strong><font color="#4169E1"><a name="BVDestroy_Contiguous"></a>PetscErrorCode BVDestroy_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line353">353: </a>{
-<a name="line355">355: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
-
-<a name="line358">358: </a>  VecDestroyVecs(bv->nc+bv->m,&ctx->V);
-<a name="line359">359: </a>  PetscFree(ctx->array);
-<a name="line360">360: </a>  PetscFree(bv->data);
-<a name="line361">361: </a>  <font color="#4169E1">return</font>(0);
-<a name="line362">362: </a>}
-
-<a name="line366">366: </a><strong><font color="#4169E1"><a name="BVCreate_Contiguous"></a>PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line367">367: </a>{
-<a name="line369">369: </a>  BV_CONTIGUOUS  *ctx;
-<a name="line370">370: </a>  PetscInt       j,nloc,bs;
-<a name="line371">371: </a>  PetscBool      seq;
-<a name="line372">372: </a>  char           str[50];
-
-<a name="line375">375: </a>  PetscNewLog(bv,&ctx);
-<a name="line376">376: </a>  bv->data = (void*)ctx;
-
-<a name="line378">378: </a>  PetscObjectTypeCompare((PetscObject)bv->t,VECMPI,&ctx->mpi);
-<a name="line379">379: </a>  <font color="#4169E1">if</font> (!ctx->mpi) {
-<a name="line380">380: </a>    PetscObjectTypeCompare((PetscObject)bv->t,VECSEQ,&seq);
-<a name="line381">381: </a>    <font color="#4169E1">if</font> (!seq) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot create a contiguous <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> from a non-standard template vector"</font>);
-<a name="line382">382: </a>  }
-
-<a name="line384">384: </a>  VecGetLocalSize(bv->t,&nloc);
-<a name="line385">385: </a>  VecGetBlockSize(bv->t,&bs);
-<a name="line386">386: </a>  PetscMalloc1(bv->m*nloc,&ctx->array);
-<a name="line387">387: </a>  PetscMemzero(ctx->array,bv->m*nloc*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line388">388: </a>  PetscMalloc1(bv->m,&ctx->V);
-<a name="line389">389: </a>  <font color="#4169E1">for</font> (j=0;j<bv->m;j++) {
-<a name="line390">390: </a>    <font color="#4169E1">if</font> (ctx->mpi) {
-<a name="line391">391: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,ctx->array+j*nloc,ctx->V+j);
-<a name="line392">392: </a>    } <font color="#4169E1">else</font> {
-<a name="line393">393: </a>      VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,ctx->array+j*nloc,ctx->V+j);
-<a name="line394">394: </a>    }
-<a name="line395">395: </a>  }
-<a name="line396">396: </a>  PetscLogObjectParents(bv,bv->m,ctx->V);
-<a name="line397">397: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line398">398: </a>    <font color="#4169E1">for</font> (j=0;j<bv->m;j++) {
-<a name="line399">399: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%D"</font>,((PetscObject)bv)->name,j);
-<a name="line400">400: </a>      PetscObjectSetName((PetscObject)ctx->V[j],str);
-<a name="line401">401: </a>    }
-<a name="line402">402: </a>  }
-
-<a name="line404">404: </a>  bv->ops->mult             = BVMult_Contiguous;
-<a name="line405">405: </a>  bv->ops->multvec          = BVMultVec_Contiguous;
-<a name="line406">406: </a>  bv->ops->multinplace      = BVMultInPlace_Contiguous;
-<a name="line407">407: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Contiguous;
-<a name="line408">408: </a>  bv->ops->axpy             = BVAXPY_Contiguous;
-<a name="line409">409: </a>  bv->ops->dot              = BVDot_Contiguous;
-<a name="line410">410: </a>  bv->ops->dotvec           = BVDotVec_Contiguous;
-<a name="line411">411: </a>  bv->ops->dotvec_local     = BVDotVec_Local_Contiguous;
-<a name="line412">412: </a>  bv->ops->scale            = BVScale_Contiguous;
-<a name="line413">413: </a>  bv->ops->norm             = BVNorm_Contiguous;
-<a name="line414">414: </a>  bv->ops->norm_local       = BVNorm_Local_Contiguous;
-<a name="line415">415: </a>  <font color="#B22222">/*bv->ops->orthogonalize    = BVOrthogonalize_Contiguous;*/</font>
-<a name="line416">416: </a>  bv->ops->matmult          = BVMatMult_Contiguous;
-<a name="line417">417: </a>  bv->ops->copy             = BVCopy_Contiguous;
-<a name="line418">418: </a>  bv->ops->resize           = BVResize_Contiguous;
-<a name="line419">419: </a>  bv->ops->getcolumn        = BVGetColumn_Contiguous;
-<a name="line420">420: </a>  bv->ops->getarray         = BVGetArray_Contiguous;
-<a name="line421">421: </a>  bv->ops->destroy          = BVDestroy_Contiguous;
-<a name="line422">422: </a>  <font color="#4169E1">return</font>(0);
-<a name="line423">423: </a>}
+<a name="line255">255: </a>  } <font color="#4169E1">else</font> {
+<a name="line256">256: </a>    <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
+<a name="line257">257: </a>      MatMult(A,v->V[V->nc+V->l+j],w->V[W->nc+W->l+j]);
+<a name="line258">258: </a>    }
+<a name="line259">259: </a>  }
+<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
+<a name="line261">261: </a>}
+
+<a name="line265">265: </a><strong><font color="#4169E1"><a name="BVCopy_Contiguous"></a>PetscErrorCode BVCopy_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line266">266: </a>{
+<a name="line268">268: </a>  BV_CONTIGUOUS  *v = (BV_CONTIGUOUS*)V->data,*w = (BV_CONTIGUOUS*)W->data;
+<a name="line269">269: </a>  PetscScalar    *pvc,*pwc;
+
+<a name="line272">272: </a>  pvc = v->array+(V->nc+V->l)*V->n;
+<a name="line273">273: </a>  pwc = w->array+(W->nc+W->l)*W->n;
+<a name="line274">274: </a>  PetscMemcpy(pwc,pvc,(V->k-V->l)*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
+<a name="line276">276: </a>}
+
+<a name="line280">280: </a><strong><font color="#4169E1"><a name="BVResize_Contiguous"></a>PetscErrorCode BVResize_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
+<a name="line281">281: </a>{
+<a name="line283">283: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
+<a name="line284">284: </a>  PetscInt       j,bs;
+<a name="line285">285: </a>  PetscScalar    *newarray;
+<a name="line286">286: </a>  Vec            *newV;
+<a name="line287">287: </a>  char           str[50];
+
+<a name="line290">290: </a>  VecGetBlockSize(bv->t,&bs);
+<a name="line291">291: </a>  PetscMalloc1(m*bv->n,&newarray);
+<a name="line292">292: </a>  PetscMemzero(newarray,m*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line293">293: </a>  PetscMalloc1(m,&newV);
+<a name="line294">294: </a>  <font color="#4169E1">for</font> (j=0;j<m;j++) {
+<a name="line295">295: </a>    <font color="#4169E1">if</font> (ctx->mpi) {
+<a name="line296">296: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,bv->n,PETSC_DECIDE,newarray+j*bv->n,newV+j);
+<a name="line297">297: </a>    } <font color="#4169E1">else</font> {
+<a name="line298">298: </a>      VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,bv->n,newarray+j*bv->n,newV+j);
+<a name="line299">299: </a>    }
+<a name="line300">300: </a>  }
+<a name="line301">301: </a>  PetscLogObjectParents(bv,m,newV);
+<a name="line302">302: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line303">303: </a>    <font color="#4169E1">for</font> (j=0;j<m;j++) {
+<a name="line304">304: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%d"</font>,((PetscObject)bv)->name,(int)j);
+<a name="line305">305: </a>      PetscObjectSetName((PetscObject)newV[j],str);
+<a name="line306">306: </a>    }
+<a name="line307">307: </a>  }
+<a name="line308">308: </a>  <font color="#4169E1">if</font> (copy) {
+<a name="line309">309: </a>    PetscMemcpy(newarray,ctx->array,PetscMin(m,bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line310">310: </a>  }
+<a name="line311">311: </a>  VecDestroyVecs(bv->m,&ctx->V);
+<a name="line312">312: </a>  ctx->V = newV;
+<a name="line313">313: </a>  PetscFree(ctx->array);
+<a name="line314">314: </a>  ctx->array = newarray;
+<a name="line315">315: </a>  <font color="#4169E1">return</font>(0);
+<a name="line316">316: </a>}
+
+<a name="line320">320: </a><strong><font color="#4169E1"><a name="BVGetColumn_Contiguous"></a>PetscErrorCode BVGetColumn_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line321">321: </a>{
+<a name="line322">322: </a>  BV_CONTIGUOUS *ctx = (BV_CONTIGUOUS*)bv->data;
+<a name="line323">323: </a>  PetscInt      l;
+
+<a name="line326">326: </a>  l = BVAvailableVec;
+<a name="line327">327: </a>  bv->cv[l] = ctx->V[bv->nc+j];
+<a name="line328">328: </a>  <font color="#4169E1">return</font>(0);
+<a name="line329">329: </a>}
+
+<a name="line333">333: </a><strong><font color="#4169E1"><a name="BVGetArray_Contiguous"></a>PetscErrorCode BVGetArray_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line334">334: </a>{
+<a name="line335">335: </a>  BV_CONTIGUOUS *ctx = (BV_CONTIGUOUS*)bv->data;
+
+<a name="line338">338: </a>  *a = ctx->array;
+<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>}
+
+<a name="line344">344: </a><strong><font color="#4169E1"><a name="BVGetArrayRead_Contiguous"></a>PetscErrorCode BVGetArrayRead_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line345">345: </a>{
+<a name="line346">346: </a>  BV_CONTIGUOUS *ctx = (BV_CONTIGUOUS*)bv->data;
+
+<a name="line349">349: </a>  *a = ctx->array;
+<a name="line350">350: </a>  <font color="#4169E1">return</font>(0);
+<a name="line351">351: </a>}
+
+<a name="line355">355: </a><strong><font color="#4169E1"><a name="BVDestroy_Contiguous"></a>PetscErrorCode BVDestroy_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line356">356: </a>{
+<a name="line358">358: </a>  BV_CONTIGUOUS  *ctx = (BV_CONTIGUOUS*)bv->data;
+
+<a name="line361">361: </a>  VecDestroyVecs(bv->nc+bv->m,&ctx->V);
+<a name="line362">362: </a>  PetscFree(ctx->array);
+<a name="line363">363: </a>  PetscFree(bv->data);
+<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
+<a name="line365">365: </a>}
+
+<a name="line369">369: </a><strong><font color="#4169E1"><a name="BVCreate_Contiguous"></a>PETSC_EXTERN PetscErrorCode BVCreate_Contiguous(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line370">370: </a>{
+<a name="line372">372: </a>  BV_CONTIGUOUS  *ctx;
+<a name="line373">373: </a>  PetscInt       j,nloc,bs;
+<a name="line374">374: </a>  PetscBool      seq;
+<a name="line375">375: </a>  char           str[50];
+
+<a name="line378">378: </a>  PetscNewLog(bv,&ctx);
+<a name="line379">379: </a>  bv->data = (void*)ctx;
+
+<a name="line381">381: </a>  PetscObjectTypeCompare((PetscObject)bv->t,VECMPI,&ctx->mpi);
+<a name="line382">382: </a>  <font color="#4169E1">if</font> (!ctx->mpi) {
+<a name="line383">383: </a>    PetscObjectTypeCompare((PetscObject)bv->t,VECSEQ,&seq);
+<a name="line384">384: </a>    <font color="#4169E1">if</font> (!seq) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot create a contiguous <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> from a non-standard template vector"</font>);
+<a name="line385">385: </a>  }
+
+<a name="line387">387: </a>  VecGetLocalSize(bv->t,&nloc);
+<a name="line388">388: </a>  VecGetBlockSize(bv->t,&bs);
+<a name="line389">389: </a>  PetscMalloc1(bv->m*nloc,&ctx->array);
+<a name="line390">390: </a>  PetscMemzero(ctx->array,bv->m*nloc*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line391">391: </a>  PetscMalloc1(bv->m,&ctx->V);
+<a name="line392">392: </a>  <font color="#4169E1">for</font> (j=0;j<bv->m;j++) {
+<a name="line393">393: </a>    <font color="#4169E1">if</font> (ctx->mpi) {
+<a name="line394">394: </a>      VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,ctx->array+j*nloc,ctx->V+j);
+<a name="line395">395: </a>    } <font color="#4169E1">else</font> {
+<a name="line396">396: </a>      VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,ctx->array+j*nloc,ctx->V+j);
+<a name="line397">397: </a>    }
+<a name="line398">398: </a>  }
+<a name="line399">399: </a>  PetscLogObjectParents(bv,bv->m,ctx->V);
+<a name="line400">400: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line401">401: </a>    <font color="#4169E1">for</font> (j=0;j<bv->m;j++) {
+<a name="line402">402: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%d"</font>,((PetscObject)bv)->name,(int)j);
+<a name="line403">403: </a>      PetscObjectSetName((PetscObject)ctx->V[j],str);
+<a name="line404">404: </a>    }
+<a name="line405">405: </a>  }
+
+<a name="line407">407: </a>  bv->ops->mult             = BVMult_Contiguous;
+<a name="line408">408: </a>  bv->ops->multvec          = BVMultVec_Contiguous;
+<a name="line409">409: </a>  bv->ops->multinplace      = BVMultInPlace_Contiguous;
+<a name="line410">410: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Contiguous;
+<a name="line411">411: </a>  bv->ops->dot              = BVDot_Contiguous;
+<a name="line412">412: </a>  bv->ops->dotvec           = BVDotVec_Contiguous;
+<a name="line413">413: </a>  bv->ops->dotvec_local     = BVDotVec_Local_Contiguous;
+<a name="line414">414: </a>  bv->ops->scale            = BVScale_Contiguous;
+<a name="line415">415: </a>  bv->ops->norm             = BVNorm_Contiguous;
+<a name="line416">416: </a>  bv->ops->norm_local       = BVNorm_Local_Contiguous;
+<a name="line417">417: </a>  <font color="#B22222">/*bv->ops->orthogonalize    = BVOrthogonalize_Contiguous;*/</font>
+<a name="line418">418: </a>  bv->ops->matmult          = BVMatMult_Contiguous;
+<a name="line419">419: </a>  bv->ops->copy             = BVCopy_Contiguous;
+<a name="line420">420: </a>  bv->ops->resize           = BVResize_Contiguous;
+<a name="line421">421: </a>  bv->ops->getcolumn        = BVGetColumn_Contiguous;
+<a name="line422">422: </a>  bv->ops->getarray         = BVGetArray_Contiguous;
+<a name="line423">423: </a>  bv->ops->getarrayread     = BVGetArrayRead_Contiguous;
+<a name="line424">424: </a>  bv->ops->destroy          = BVDestroy_Contiguous;
+<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
+<a name="line426">426: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/impls/contiguous/index.html b/src/sys/classes/bv/impls/contiguous/index.html
index e94f2aa..01f0a01 100644
--- a/src/sys/classes/bv/impls/contiguous/index.html
+++ b/src/sys/classes/bv/impls/contiguous/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/contiguous/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/contiguous/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/impls/contiguous/makefile b/src/sys/classes/bv/impls/contiguous/makefile
index c808336..e153589 100644
--- a/src/sys/classes/bv/impls/contiguous/makefile
+++ b/src/sys/classes/bv/impls/contiguous/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/impls/contiguous/makefile.html b/src/sys/classes/bv/impls/contiguous/makefile.html
index 42a0a87..9f32c60 100644
--- a/src/sys/classes/bv/impls/contiguous/makefile.html
+++ b/src/sys/classes/bv/impls/contiguous/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/contiguous/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:28+00:00">
+<meta name="date" content="2016-05-16T10:32:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/contiguous/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/contiguous/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/impls/index.html b/src/sys/classes/bv/impls/index.html
index 5b2103e..eaa3924 100644
--- a/src/sys/classes/bv/impls/index.html
+++ b/src/sys/classes/bv/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/impls/makefile b/src/sys/classes/bv/impls/makefile
index 508add9..95fb60d 100644
--- a/src/sys/classes/bv/impls/makefile
+++ b/src/sys/classes/bv/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/impls/makefile.html b/src/sys/classes/bv/impls/makefile.html
index a2efa77..2863974 100644
--- a/src/sys/classes/bv/impls/makefile.html
+++ b/src/sys/classes/bv/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:27+00:00">
+<meta name="date" content="2016-05-16T10:32:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/impls/mat/bvmat.c b/src/sys/classes/bv/impls/mat/bvmat.c
index 0cca8e2..02d56b4 100644
--- a/src/sys/classes/bv/impls/mat/bvmat.c
+++ b/src/sys/classes/bv/impls/mat/bvmat.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,12 +38,16 @@ PetscErrorCode BVMult_Mat(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)
   PetscInt       ldq;
 
   PetscFunctionBegin;
-  ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
   ierr = MatDenseGetArray(x->A,&px);CHKERRQ(ierr);
   ierr = MatDenseGetArray(y->A,&py);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
-  ierr = BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
-  ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  if (Q) {
+    ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
+    ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
+    ierr = BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
+    ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  } else {
+    ierr = BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,beta,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
+  }
   ierr = MatDenseRestoreArray(x->A,&px);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(y->A,&py);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -105,23 +109,6 @@ PetscErrorCode BVMultInPlaceTranspose_Mat(BV V,Mat Q,PetscInt s,PetscInt e)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "BVAXPY_Mat"
-PetscErrorCode BVAXPY_Mat(BV Y,PetscScalar alpha,BV X)
-{
-  PetscErrorCode ierr;
-  BV_MAT         *x = (BV_MAT*)X->data,*y = (BV_MAT*)Y->data;
-  PetscScalar    *px,*py;
-
-  PetscFunctionBegin;
-  ierr = MatDenseGetArray(x->A,&px);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(y->A,&py);CHKERRQ(ierr);
-  ierr = BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
-  ierr = MatDenseRestoreArray(x->A,&px);CHKERRQ(ierr);
-  ierr = MatDenseRestoreArray(y->A,&py);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "BVDot_Mat"
 PetscErrorCode BVDot_Mat(BV X,BV Y,Mat M)
 {
@@ -417,6 +404,30 @@ PetscErrorCode BVRestoreArray_Mat(BV bv,PetscScalar **a)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVGetArrayRead_Mat"
+PetscErrorCode BVGetArrayRead_Mat(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+  PetscFunctionBegin;
+  ierr = MatDenseGetArray(ctx->A,(PetscScalar**)a);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "BVRestoreArrayRead_Mat"
+PetscErrorCode BVRestoreArrayRead_Mat(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+  PetscFunctionBegin;
+  if (a) { ierr = MatDenseRestoreArray(ctx->A,(PetscScalar**)a);CHKERRQ(ierr); }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVView_Mat"
 PetscErrorCode BVView_Mat(BV bv,PetscViewer viewer)
 {
@@ -502,7 +513,6 @@ PETSC_EXTERN PetscErrorCode BVCreate_Mat(BV bv)
   bv->ops->multvec          = BVMultVec_Mat;
   bv->ops->multinplace      = BVMultInPlace_Mat;
   bv->ops->multinplacetrans = BVMultInPlaceTranspose_Mat;
-  bv->ops->axpy             = BVAXPY_Mat;
   bv->ops->dot              = BVDot_Mat;
   bv->ops->dotvec           = BVDotVec_Mat;
   bv->ops->dotvec_local     = BVDotVec_Local_Mat;
@@ -517,6 +527,8 @@ PETSC_EXTERN PetscErrorCode BVCreate_Mat(BV bv)
   bv->ops->restorecolumn    = BVRestoreColumn_Mat;
   bv->ops->getarray         = BVGetArray_Mat;
   bv->ops->restorearray     = BVRestoreArray_Mat;
+  bv->ops->getarrayread     = BVGetArrayRead_Mat;
+  bv->ops->restorearrayread = BVRestoreArrayRead_Mat;
   bv->ops->destroy          = BVDestroy_Mat;
   if (!ctx->mpi) bv->ops->view = BVView_Mat;
   PetscFunctionReturn(0);
diff --git a/src/sys/classes/bv/impls/mat/bvmat.c.html b/src/sys/classes/bv/impls/mat/bvmat.c.html
index e2cd741..3cbd4e4 100644
--- a/src/sys/classes/bv/impls/mat/bvmat.c.html
+++ b/src/sys/classes/bv/impls/mat/bvmat.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/mat/bvmat.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:29+00:00">
+<meta name="date" content="2016-05-16T10:32:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/mat/bvmat.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/mat/bvmat.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> implemented with a dense Mat</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,407 +46,415 @@
 <a name="line37"> 37: </a>  PetscScalar    *px,*py,*q;
 <a name="line38"> 38: </a>  PetscInt       ldq;
 
-<a name="line41"> 41: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line42"> 42: </a>  MatDenseGetArray(x->A,&px);
-<a name="line43"> 43: </a>  MatDenseGetArray(y->A,&py);
-<a name="line44"> 44: </a>  MatDenseGetArray(Q,&q);
-<a name="line45"> 45: </a>  BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);
-<a name="line46"> 46: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line47"> 47: </a>  MatDenseRestoreArray(x->A,&px);
-<a name="line48"> 48: </a>  MatDenseRestoreArray(y->A,&py);
-<a name="line49"> 49: </a>  <font color="#4169E1">return</font>(0);
-<a name="line50"> 50: </a>}
-
-<a name="line54"> 54: </a><strong><font color="#4169E1"><a name="BVMultVec_Mat"></a>PetscErrorCode BVMultVec_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
-<a name="line55"> 55: </a>{
-<a name="line57"> 57: </a>  BV_MAT         *x = (BV_MAT*)X->data;
-<a name="line58"> 58: </a>  PetscScalar    *px,*py;
-
-<a name="line61"> 61: </a>  MatDenseGetArray(x->A,&px);
-<a name="line62"> 62: </a>  VecGetArray(y,&py);
-<a name="line63"> 63: </a>  BVMultVec_BLAS_Private(X,X->n,X->k-X->l,alpha,px+(X->nc+X->l)*X->n,q,beta,py);
-<a name="line64"> 64: </a>  MatDenseRestoreArray(x->A,&px);
-<a name="line65"> 65: </a>  VecRestoreArray(y,&py);
-<a name="line66"> 66: </a>  <font color="#4169E1">return</font>(0);
-<a name="line67"> 67: </a>}
-
-<a name="line71"> 71: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Mat"></a>PetscErrorCode BVMultInPlace_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line72"> 72: </a>{
-<a name="line74"> 74: </a>  BV_MAT         *ctx = (BV_MAT*)V->data;
-<a name="line75"> 75: </a>  PetscScalar    *pv,*q;
-<a name="line76"> 76: </a>  PetscInt       ldq;
-
-<a name="line79"> 79: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line80"> 80: </a>  MatDenseGetArray(ctx->A,&pv);
-<a name="line81"> 81: </a>  MatDenseGetArray(Q,&q);
-<a name="line82"> 82: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_FALSE);
-<a name="line83"> 83: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line84"> 84: </a>  MatDenseRestoreArray(ctx->A,&pv);
-<a name="line85"> 85: </a>  <font color="#4169E1">return</font>(0);
-<a name="line86"> 86: </a>}
-
-<a name="line90"> 90: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Mat"></a>PetscErrorCode BVMultInPlaceTranspose_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line91"> 91: </a>{
-<a name="line93"> 93: </a>  BV_MAT         *ctx = (BV_MAT*)V->data;
-<a name="line94"> 94: </a>  PetscScalar    *pv,*q;
-<a name="line95"> 95: </a>  PetscInt       ldq;
-
-<a name="line98"> 98: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line99"> 99: </a>  MatDenseGetArray(ctx->A,&pv);
-<a name="line100">100: </a>  MatDenseGetArray(Q,&q);
-<a name="line101">101: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_TRUE);
-<a name="line102">102: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line103">103: </a>  MatDenseRestoreArray(ctx->A,&pv);
-<a name="line104">104: </a>  <font color="#4169E1">return</font>(0);
-<a name="line105">105: </a>}
-
-<a name="line109">109: </a><strong><font color="#4169E1"><a name="BVAXPY_Mat"></a>PetscErrorCode BVAXPY_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X)</font></strong>
-<a name="line110">110: </a>{
-<a name="line112">112: </a>  BV_MAT         *x = (BV_MAT*)X->data,*y = (BV_MAT*)Y->data;
-<a name="line113">113: </a>  PetscScalar    *px,*py;
-
-<a name="line116">116: </a>  MatDenseGetArray(x->A,&px);
-<a name="line117">117: </a>  MatDenseGetArray(y->A,&py);
-<a name="line118">118: </a>  BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,py+(Y->nc+Y->l)*Y->n);
-<a name="line119">119: </a>  MatDenseRestoreArray(x->A,&px);
-<a name="line120">120: </a>  MatDenseRestoreArray(y->A,&py);
-<a name="line121">121: </a>  <font color="#4169E1">return</font>(0);
-<a name="line122">122: </a>}
-
-<a name="line126">126: </a><strong><font color="#4169E1"><a name="BVDot_Mat"></a>PetscErrorCode BVDot_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
-<a name="line127">127: </a>{
-<a name="line129">129: </a>  BV_MAT         *x = (BV_MAT*)X->data,*y = (BV_MAT*)Y->data;
-<a name="line130">130: </a>  PetscScalar    *px,*py,*m;
-<a name="line131">131: </a>  PetscInt       ldm;
-
-<a name="line134">134: </a>  MatGetSize(M,&ldm,NULL);
-<a name="line135">135: </a>  MatDenseGetArray(x->A,&px);
-<a name="line136">136: </a>  MatDenseGetArray(y->A,&py);
-<a name="line137">137: </a>  MatDenseGetArray(M,&m);
-<a name="line138">138: </a>  BVDot_BLAS_Private(X,Y->k-Y->l,X->k-X->l,X->n,ldm,py+(Y->nc+Y->l)*Y->n,px+(X->nc+X->l)*X->n,m+X->l*ldm+Y->l,x->mpi);
-<a name="line139">139: </a>  MatDenseRestoreArray(M,&m);
-<a name="line140">140: </a>  MatDenseRestoreArray(x->A,&px);
-<a name="line141">141: </a>  MatDenseRestoreArray(y->A,&py);
-<a name="line142">142: </a>  <font color="#4169E1">return</font>(0);
-<a name="line143">143: </a>}
-
-<a name="line147">147: </a><strong><font color="#4169E1"><a name="BVDotVec_Mat"></a>PetscErrorCode BVDotVec_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line148">148: </a>{
-<a name="line149">149: </a>  PetscErrorCode    ierr;
-<a name="line150">150: </a>  BV_MAT            *x = (BV_MAT*)X->data;
-<a name="line151">151: </a>  PetscScalar       *px;
-<a name="line152">152: </a>  const PetscScalar *py;
-<a name="line153">153: </a>  Vec               z = y;
-
-<a name="line156">156: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line157">157: </a>    BV_IPMatMult(X,y);
-<a name="line158">158: </a>    z = X->Bx;
-<a name="line159">159: </a>  }
-<a name="line160">160: </a>  MatDenseGetArray(x->A,&px);
-<a name="line161">161: </a>  VecGetArrayRead(z,&py);
-<a name="line162">162: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,x->mpi);
-<a name="line163">163: </a>  VecRestoreArrayRead(z,&py);
-<a name="line164">164: </a>  MatDenseRestoreArray(x->A,&px);
-<a name="line165">165: </a>  <font color="#4169E1">return</font>(0);
-<a name="line166">166: </a>}
-
-<a name="line170">170: </a><strong><font color="#4169E1"><a name="BVDotVec_Local_Mat"></a>PetscErrorCode BVDotVec_Local_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line171">171: </a>{
-<a name="line173">173: </a>  BV_MAT         *x = (BV_MAT*)X->data;
-<a name="line174">174: </a>  PetscScalar    *px,*py;
-<a name="line175">175: </a>  Vec            z = y;
-
-<a name="line178">178: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line179">179: </a>    BV_IPMatMult(X,y);
-<a name="line180">180: </a>    z = X->Bx;
-<a name="line181">181: </a>  }
-<a name="line182">182: </a>  MatDenseGetArray(x->A,&px);
-<a name="line183">183: </a>  VecGetArray(z,&py);
-<a name="line184">184: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,PETSC_FALSE);
-<a name="line185">185: </a>  VecRestoreArray(z,&py);
-<a name="line186">186: </a>  MatDenseRestoreArray(x->A,&px);
-<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
-<a name="line188">188: </a>}
-
-<a name="line192">192: </a><strong><font color="#4169E1"><a name="BVScale_Mat"></a>PetscErrorCode BVScale_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
-<a name="line193">193: </a>{
-<a name="line195">195: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-<a name="line196">196: </a>  PetscScalar    *array;
-
-<a name="line199">199: </a>  MatDenseGetArray(ctx->A,&array);
-<a name="line200">200: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line201">201: </a>    BVScale_BLAS_Private(bv,(bv->k-bv->l)*bv->n,array+(bv->nc+bv->l)*bv->n,alpha);
-<a name="line202">202: </a>  } <font color="#4169E1">else</font> {
-<a name="line203">203: </a>    BVScale_BLAS_Private(bv,bv->n,array+(bv->nc+j)*bv->n,alpha);
-<a name="line204">204: </a>  }
-<a name="line205">205: </a>  MatDenseRestoreArray(ctx->A,&array);
-<a name="line206">206: </a>  <font color="#4169E1">return</font>(0);
-<a name="line207">207: </a>}
-
-<a name="line211">211: </a><strong><font color="#4169E1"><a name="BVNorm_Mat"></a>PetscErrorCode BVNorm_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line212">212: </a>{
-<a name="line214">214: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-<a name="line215">215: </a>  PetscScalar    *array;
-
-<a name="line218">218: </a>  MatDenseGetArray(ctx->A,&array);
-<a name="line219">219: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line220">220: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,ctx->mpi);
-<a name="line221">221: </a>  } <font color="#4169E1">else</font> {
-<a name="line222">222: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,ctx->mpi);
-<a name="line223">223: </a>  }
-<a name="line224">224: </a>  MatDenseRestoreArray(ctx->A,&array);
-<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
-<a name="line226">226: </a>}
-
-<a name="line230">230: </a><strong><font color="#4169E1"><a name="BVNorm_Local_Mat"></a>PetscErrorCode BVNorm_Local_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line231">231: </a>{
-<a name="line233">233: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-<a name="line234">234: </a>  PetscScalar    *array;
-
-<a name="line237">237: </a>  MatDenseGetArray(ctx->A,&array);
-<a name="line238">238: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line239">239: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,PETSC_FALSE);
-<a name="line240">240: </a>  } <font color="#4169E1">else</font> {
-<a name="line241">241: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,PETSC_FALSE);
-<a name="line242">242: </a>  }
-<a name="line243">243: </a>  MatDenseRestoreArray(ctx->A,&array);
-<a name="line244">244: </a>  <font color="#4169E1">return</font>(0);
-<a name="line245">245: </a>}
-
-<a name="line249">249: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Mat"></a>PetscErrorCode BVOrthogonalize_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
-<a name="line250">250: </a>{
-<a name="line252">252: </a>  BV_MAT         *ctx = (BV_MAT*)V->data;
-<a name="line253">253: </a>  PetscScalar    *pv,*r=NULL;
-
-<a name="line256">256: </a>  <font color="#4169E1">if</font> (R) { MatDenseGetArray(R,&r); }
-<a name="line257">257: </a>  MatDenseGetArray(ctx->A,&pv);
-<a name="line258">258: </a>  BVOrthogonalize_LAPACK_Private(V,V->n,V->k,pv+V->nc*V->n,r,ctx->mpi);
-<a name="line259">259: </a>  MatDenseRestoreArray(ctx->A,&pv);
-<a name="line260">260: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
-<a name="line261">261: </a>  <font color="#4169E1">return</font>(0);
-<a name="line262">262: </a>}
-
-<a name="line266">266: </a><strong><font color="#4169E1"><a name="BVMatMult_Mat"></a>PetscErrorCode BVMatMult_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line267">267: </a>{
-<a name="line269">269: </a>  BV_MAT         *v = (BV_MAT*)V->data,*w = (BV_MAT*)W->data;
-<a name="line270">270: </a>  PetscScalar    *pv,*pw,*pb,*pc;
-<a name="line271">271: </a>  PetscInt       j,m;
-<a name="line272">272: </a>  PetscBool      flg;
-
-<a name="line275">275: </a>  MatDenseGetArray(v->A,&pv);
-<a name="line276">276: </a>  MatDenseGetArray(w->A,&pw);
-<a name="line277">277: </a>  MatHasOperation(A,MATOP_MAT_MULT,&flg);
-<a name="line278">278: </a>  <font color="#4169E1">if</font> (V->vmm && flg) {
-<a name="line279">279: </a>    m = V->k-V->l;
-<a name="line280">280: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT_SAVE) {
-<a name="line281">281: </a>      BV_AllocateMatMult(V,A,m);
-<a name="line282">282: </a>      MatDenseGetArray(V->B,&pb);
-<a name="line283">283: </a>      PetscMemcpy(pb,pv+(V->nc+V->l)*V->n,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line284">284: </a>      MatDenseRestoreArray(V->B,&pb);
-<a name="line285">285: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* BV_MATMULT_MAT */</font>
-<a name="line286">286: </a>      MatCreateDense(PetscObjectComm((PetscObject)V),V->n,PETSC_DECIDE,V->N,m,pv+(V->nc+V->l)*V->n,&V->B);
-<a name="line287">287: </a>    }
-<a name="line288">288: </a>    <font color="#4169E1">if</font> (!V->C) {
-<a name="line289">289: </a>      MatMatMultSymbolic(A,V->B,PETSC_DEFAULT,&V->C);
-<a name="line290">290: </a>    }
-<a name="line291">291: </a>    MatMatMultNumeric(A,V->B,V->C);
-<a name="line292">292: </a>    MatDenseGetArray(V->C,&pc);
-<a name="line293">293: </a>    PetscMemcpy(pw+(W->nc+W->l)*W->n,pc,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line294">294: </a>    MatDenseRestoreArray(V->C,&pc);
-<a name="line295">295: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT) {
-<a name="line296">296: </a>      MatDestroy(&V->B);
-<a name="line297">297: </a>      MatDestroy(&V->C);
-<a name="line298">298: </a>    }
-<a name="line299">299: </a>  } <font color="#4169E1">else</font> {
-<a name="line300">300: </a>    <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
-<a name="line301">301: </a>      VecPlaceArray(V->cv[1],pv+(V->nc+V->l+j)*V->n);
-<a name="line302">302: </a>      VecPlaceArray(W->cv[1],pw+(W->nc+W->l+j)*W->n);
-<a name="line303">303: </a>      MatMult(A,V->cv[1],W->cv[1]);
-<a name="line304">304: </a>      VecResetArray(V->cv[1]);
-<a name="line305">305: </a>      VecResetArray(W->cv[1]);
-<a name="line306">306: </a>    }
-<a name="line307">307: </a>  }
-<a name="line308">308: </a>  MatDenseRestoreArray(v->A,&pv);
-<a name="line309">309: </a>  MatDenseRestoreArray(w->A,&pw);
-<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>}
-
-<a name="line315">315: </a><strong><font color="#4169E1"><a name="BVCopy_Mat"></a>PetscErrorCode BVCopy_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line316">316: </a>{
-<a name="line318">318: </a>  BV_MAT         *v = (BV_MAT*)V->data,*w = (BV_MAT*)W->data;
-<a name="line319">319: </a>  PetscScalar    *pv,*pw,*pvc,*pwc;
-
-<a name="line322">322: </a>  MatDenseGetArray(v->A,&pv);
-<a name="line323">323: </a>  MatDenseGetArray(w->A,&pw);
-<a name="line324">324: </a>  pvc = pv+(V->nc+V->l)*V->n;
-<a name="line325">325: </a>  pwc = pw+(W->nc+W->l)*W->n;
-<a name="line326">326: </a>  PetscMemcpy(pwc,pvc,(V->k-V->l)*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line327">327: </a>  MatDenseRestoreArray(v->A,&pv);
-<a name="line328">328: </a>  MatDenseRestoreArray(w->A,&pw);
-<a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
-<a name="line330">330: </a>}
-
-<a name="line334">334: </a><strong><font color="#4169E1"><a name="BVResize_Mat"></a>PetscErrorCode BVResize_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
-<a name="line335">335: </a>{
-<a name="line337">337: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-<a name="line338">338: </a>  PetscScalar    *pA,*pnew;
-<a name="line339">339: </a>  Mat            A;
-<a name="line340">340: </a>  char           str[50];
-
-<a name="line343">343: </a>  MatCreateDense(PetscObjectComm((PetscObject)bv->t),bv->n,PETSC_DECIDE,PETSC_DECIDE,m,NULL,&A);
-<a name="line344">344: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
-<a name="line345">345: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
-<a name="line346">346: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)A);
-<a name="line347">347: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line348">348: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
-<a name="line349">349: </a>    PetscObjectSetName((PetscObject)A,str);
-<a name="line350">350: </a>  }
-<a name="line351">351: </a>  <font color="#4169E1">if</font> (copy) {
-<a name="line352">352: </a>    MatDenseGetArray(ctx->A,&pA);
-<a name="line353">353: </a>    MatDenseGetArray(A,&pnew);
-<a name="line354">354: </a>    PetscMemcpy(pnew,pA,PetscMin(m,bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line355">355: </a>    MatDenseRestoreArray(ctx->A,&pA);
-<a name="line356">356: </a>    MatDenseRestoreArray(A,&pnew);
-<a name="line357">357: </a>  }
-<a name="line358">358: </a>  MatDestroy(&ctx->A);
-<a name="line359">359: </a>  ctx->A = A;
-<a name="line360">360: </a>  <font color="#4169E1">return</font>(0);
-<a name="line361">361: </a>}
-
-<a name="line365">365: </a><strong><font color="#4169E1"><a name="BVGetColumn_Mat"></a>PetscErrorCode BVGetColumn_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line366">366: </a>{
-<a name="line368">368: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-<a name="line369">369: </a>  PetscScalar    *pA;
-<a name="line370">370: </a>  PetscInt       l;
-
-<a name="line373">373: </a>  l = BVAvailableVec;
-<a name="line374">374: </a>  MatDenseGetArray(ctx->A,&pA);
-<a name="line375">375: </a>  VecPlaceArray(bv->cv[l],pA+(bv->nc+j)*bv->n);
-<a name="line376">376: </a>  <font color="#4169E1">return</font>(0);
-<a name="line377">377: </a>}
-
-<a name="line381">381: </a><strong><font color="#4169E1"><a name="BVRestoreColumn_Mat"></a>PetscErrorCode BVRestoreColumn_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line382">382: </a>{
-<a name="line384">384: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-<a name="line385">385: </a>  PetscScalar    *pA;
-<a name="line386">386: </a>  PetscInt       l;
-
-<a name="line389">389: </a>  l = (j==bv->ci[0])? 0: 1;
-<a name="line390">390: </a>  VecResetArray(bv->cv[l]);
-<a name="line391">391: </a>  MatDenseRestoreArray(ctx->A,&pA);
-<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
-<a name="line393">393: </a>}
-
-<a name="line397">397: </a><strong><font color="#4169E1"><a name="BVGetArray_Mat"></a>PetscErrorCode BVGetArray_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line398">398: </a>{
-<a name="line400">400: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-
-<a name="line403">403: </a>  MatDenseGetArray(ctx->A,a);
-<a name="line404">404: </a>  <font color="#4169E1">return</font>(0);
-<a name="line405">405: </a>}
-
-<a name="line409">409: </a><strong><font color="#4169E1"><a name="BVRestoreArray_Mat"></a>PetscErrorCode BVRestoreArray_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line410">410: </a>{
-<a name="line412">412: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-
-<a name="line415">415: </a>  <font color="#4169E1">if</font> (a) { MatDenseRestoreArray(ctx->A,a); }
-<a name="line416">416: </a>  <font color="#4169E1">return</font>(0);
-<a name="line417">417: </a>}
-
-<a name="line421">421: </a><strong><font color="#4169E1"><a name="BVView_Mat"></a>PetscErrorCode BVView_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
-<a name="line422">422: </a>{
-<a name="line423">423: </a>  PetscErrorCode    ierr;
-<a name="line424">424: </a>  BV_MAT            *ctx = (BV_MAT*)bv->data;
-<a name="line425">425: </a>  PetscViewerFormat format;
-<a name="line426">426: </a>  PetscBool         isascii;
-<a name="line427">427: </a>  const char        *bvname,*name;
-
-<a name="line430">430: </a>  MatView(ctx->A,viewer);
-<a name="line431">431: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line432">432: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line433">433: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line434">434: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
-<a name="line435">435: </a>      PetscObjectGetName((PetscObject)bv,&bvname);
-<a name="line436">436: </a>      PetscObjectGetName((PetscObject)ctx->A,&name);
-<a name="line437">437: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=%s;clear %s\n"</font>,bvname,name,name);
-<a name="line438">438: </a>      <font color="#4169E1">if</font> (bv->nc) {
-<a name="line439">439: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=%s(:,%D:end);\n"</font>,bvname,bvname,bv->nc+1);
-<a name="line440">440: </a>      }
-<a name="line441">441: </a>    }
-<a name="line442">442: </a>  }
-<a name="line443">443: </a>  <font color="#4169E1">return</font>(0);
-<a name="line444">444: </a>}
-
-<a name="line448">448: </a><strong><font color="#4169E1"><a name="BVDestroy_Mat"></a>PetscErrorCode BVDestroy_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line449">449: </a>{
-<a name="line451">451: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
-
-<a name="line454">454: </a>  MatDestroy(&ctx->A);
-<a name="line455">455: </a>  VecDestroy(&bv->cv[0]);
-<a name="line456">456: </a>  VecDestroy(&bv->cv[1]);
-<a name="line457">457: </a>  PetscFree(bv->data);
-<a name="line458">458: </a>  <font color="#4169E1">return</font>(0);
-<a name="line459">459: </a>}
-
-<a name="line463">463: </a><strong><font color="#4169E1"><a name="BVCreate_Mat"></a>PETSC_EXTERN PetscErrorCode BVCreate_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line464">464: </a>{
-<a name="line466">466: </a>  BV_MAT         *ctx;
-<a name="line467">467: </a>  PetscInt       nloc,bs;
-<a name="line468">468: </a>  PetscBool      seq;
-<a name="line469">469: </a>  char           str[50];
-
-<a name="line472">472: </a>  PetscNewLog(bv,&ctx);
-<a name="line473">473: </a>  bv->data = (void*)ctx;
-
-<a name="line475">475: </a>  PetscObjectTypeCompare((PetscObject)bv->t,VECMPI,&ctx->mpi);
-<a name="line476">476: </a>  <font color="#4169E1">if</font> (!ctx->mpi) {
-<a name="line477">477: </a>    PetscObjectTypeCompare((PetscObject)bv->t,VECSEQ,&seq);
-<a name="line478">478: </a>    <font color="#4169E1">if</font> (!seq) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot create a BVMAT from a non-standard template vector"</font>);
-<a name="line479">479: </a>  }
-
-<a name="line481">481: </a>  VecGetLocalSize(bv->t,&nloc);
-<a name="line482">482: </a>  VecGetBlockSize(bv->t,&bs);
-
-<a name="line484">484: </a>  MatCreateDense(PetscObjectComm((PetscObject)bv->t),nloc,PETSC_DECIDE,PETSC_DECIDE,bv->m,NULL,&ctx->A);
-<a name="line485">485: </a>  MatAssemblyBegin(ctx->A,MAT_FINAL_ASSEMBLY);
-<a name="line486">486: </a>  MatAssemblyEnd(ctx->A,MAT_FINAL_ASSEMBLY);
-<a name="line487">487: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)ctx->A);
-<a name="line488">488: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line489">489: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
-<a name="line490">490: </a>    PetscObjectSetName((PetscObject)ctx->A,str);
-<a name="line491">491: </a>  }
-
-<a name="line493">493: </a>  <font color="#4169E1">if</font> (ctx->mpi) {
-<a name="line494">494: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[0]);
-<a name="line495">495: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[1]);
-<a name="line496">496: </a>  } <font color="#4169E1">else</font> {
-<a name="line497">497: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[0]);
-<a name="line498">498: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[1]);
-<a name="line499">499: </a>  }
-
-<a name="line501">501: </a>  bv->ops->mult             = BVMult_Mat;
-<a name="line502">502: </a>  bv->ops->multvec          = BVMultVec_Mat;
-<a name="line503">503: </a>  bv->ops->multinplace      = BVMultInPlace_Mat;
-<a name="line504">504: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Mat;
-<a name="line505">505: </a>  bv->ops->axpy             = BVAXPY_Mat;
-<a name="line506">506: </a>  bv->ops->dot              = BVDot_Mat;
-<a name="line507">507: </a>  bv->ops->dotvec           = BVDotVec_Mat;
-<a name="line508">508: </a>  bv->ops->dotvec_local     = BVDotVec_Local_Mat;
-<a name="line509">509: </a>  bv->ops->scale            = BVScale_Mat;
-<a name="line510">510: </a>  bv->ops->norm             = BVNorm_Mat;
-<a name="line511">511: </a>  bv->ops->norm_local       = BVNorm_Local_Mat;
-<a name="line512">512: </a>  <font color="#B22222">/*bv->ops->orthogonalize    = BVOrthogonalize_Mat;*/</font>
-<a name="line513">513: </a>  bv->ops->matmult          = BVMatMult_Mat;
-<a name="line514">514: </a>  bv->ops->copy             = BVCopy_Mat;
-<a name="line515">515: </a>  bv->ops->resize           = BVResize_Mat;
-<a name="line516">516: </a>  bv->ops->getcolumn        = BVGetColumn_Mat;
-<a name="line517">517: </a>  bv->ops->restorecolumn    = BVRestoreColumn_Mat;
-<a name="line518">518: </a>  bv->ops->getarray         = BVGetArray_Mat;
-<a name="line519">519: </a>  bv->ops->restorearray     = BVRestoreArray_Mat;
-<a name="line520">520: </a>  bv->ops->destroy          = BVDestroy_Mat;
-<a name="line521">521: </a>  <font color="#4169E1">if</font> (!ctx->mpi) bv->ops->view = BVView_Mat;
-<a name="line522">522: </a>  <font color="#4169E1">return</font>(0);
-<a name="line523">523: </a>}
+<a name="line41"> 41: </a>  MatDenseGetArray(x->A,&px);
+<a name="line42"> 42: </a>  MatDenseGetArray(y->A,&py);
+<a name="line43"> 43: </a>  <font color="#4169E1">if</font> (Q) {
+<a name="line44"> 44: </a>    MatGetSize(Q,&ldq,NULL);
+<a name="line45"> 45: </a>    MatDenseGetArray(Q,&q);
+<a name="line46"> 46: </a>    BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);
+<a name="line47"> 47: </a>    MatDenseRestoreArray(Q,&q);
+<a name="line48"> 48: </a>  } <font color="#4169E1">else</font> {
+<a name="line49"> 49: </a>    BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,beta,py+(Y->nc+Y->l)*Y->n);
+<a name="line50"> 50: </a>  }
+<a name="line51"> 51: </a>  MatDenseRestoreArray(x->A,&px);
+<a name="line52"> 52: </a>  MatDenseRestoreArray(y->A,&py);
+<a name="line53"> 53: </a>  <font color="#4169E1">return</font>(0);
+<a name="line54"> 54: </a>}
+
+<a name="line58"> 58: </a><strong><font color="#4169E1"><a name="BVMultVec_Mat"></a>PetscErrorCode BVMultVec_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
+<a name="line59"> 59: </a>{
+<a name="line61"> 61: </a>  BV_MAT         *x = (BV_MAT*)X->data;
+<a name="line62"> 62: </a>  PetscScalar    *px,*py;
+
+<a name="line65"> 65: </a>  MatDenseGetArray(x->A,&px);
+<a name="line66"> 66: </a>  VecGetArray(y,&py);
+<a name="line67"> 67: </a>  BVMultVec_BLAS_Private(X,X->n,X->k-X->l,alpha,px+(X->nc+X->l)*X->n,q,beta,py);
+<a name="line68"> 68: </a>  MatDenseRestoreArray(x->A,&px);
+<a name="line69"> 69: </a>  VecRestoreArray(y,&py);
+<a name="line70"> 70: </a>  <font color="#4169E1">return</font>(0);
+<a name="line71"> 71: </a>}
+
+<a name="line75"> 75: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Mat"></a>PetscErrorCode BVMultInPlace_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line76"> 76: </a>{
+<a name="line78"> 78: </a>  BV_MAT         *ctx = (BV_MAT*)V->data;
+<a name="line79"> 79: </a>  PetscScalar    *pv,*q;
+<a name="line80"> 80: </a>  PetscInt       ldq;
+
+<a name="line83"> 83: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line84"> 84: </a>  MatDenseGetArray(ctx->A,&pv);
+<a name="line85"> 85: </a>  MatDenseGetArray(Q,&q);
+<a name="line86"> 86: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_FALSE);
+<a name="line87"> 87: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line88"> 88: </a>  MatDenseRestoreArray(ctx->A,&pv);
+<a name="line89"> 89: </a>  <font color="#4169E1">return</font>(0);
+<a name="line90"> 90: </a>}
+
+<a name="line94"> 94: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Mat"></a>PetscErrorCode BVMultInPlaceTranspose_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line95"> 95: </a>{
+<a name="line97"> 97: </a>  BV_MAT         *ctx = (BV_MAT*)V->data;
+<a name="line98"> 98: </a>  PetscScalar    *pv,*q;
+<a name="line99"> 99: </a>  PetscInt       ldq;
+
+<a name="line102">102: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line103">103: </a>  MatDenseGetArray(ctx->A,&pv);
+<a name="line104">104: </a>  MatDenseGetArray(Q,&q);
+<a name="line105">105: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_TRUE);
+<a name="line106">106: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line107">107: </a>  MatDenseRestoreArray(ctx->A,&pv);
+<a name="line108">108: </a>  <font color="#4169E1">return</font>(0);
+<a name="line109">109: </a>}
+
+<a name="line113">113: </a><strong><font color="#4169E1"><a name="BVDot_Mat"></a>PetscErrorCode BVDot_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
+<a name="line114">114: </a>{
+<a name="line116">116: </a>  BV_MAT         *x = (BV_MAT*)X->data,*y = (BV_MAT*)Y->data;
+<a name="line117">117: </a>  PetscScalar    *px,*py,*m;
+<a name="line118">118: </a>  PetscInt       ldm;
+
+<a name="line121">121: </a>  MatGetSize(M,&ldm,NULL);
+<a name="line122">122: </a>  MatDenseGetArray(x->A,&px);
+<a name="line123">123: </a>  MatDenseGetArray(y->A,&py);
+<a name="line124">124: </a>  MatDenseGetArray(M,&m);
+<a name="line125">125: </a>  BVDot_BLAS_Private(X,Y->k-Y->l,X->k-X->l,X->n,ldm,py+(Y->nc+Y->l)*Y->n,px+(X->nc+X->l)*X->n,m+X->l*ldm+Y->l,x->mpi);
+<a name="line126">126: </a>  MatDenseRestoreArray(M,&m);
+<a name="line127">127: </a>  MatDenseRestoreArray(x->A,&px);
+<a name="line128">128: </a>  MatDenseRestoreArray(y->A,&py);
+<a name="line129">129: </a>  <font color="#4169E1">return</font>(0);
+<a name="line130">130: </a>}
+
+<a name="line134">134: </a><strong><font color="#4169E1"><a name="BVDotVec_Mat"></a>PetscErrorCode BVDotVec_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line135">135: </a>{
+<a name="line136">136: </a>  PetscErrorCode    ierr;
+<a name="line137">137: </a>  BV_MAT            *x = (BV_MAT*)X->data;
+<a name="line138">138: </a>  PetscScalar       *px;
+<a name="line139">139: </a>  const PetscScalar *py;
+<a name="line140">140: </a>  Vec               z = y;
+
+<a name="line143">143: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line144">144: </a>    BV_IPMatMult(X,y);
+<a name="line145">145: </a>    z = X->Bx;
+<a name="line146">146: </a>  }
+<a name="line147">147: </a>  MatDenseGetArray(x->A,&px);
+<a name="line148">148: </a>  VecGetArrayRead(z,&py);
+<a name="line149">149: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,x->mpi);
+<a name="line150">150: </a>  VecRestoreArrayRead(z,&py);
+<a name="line151">151: </a>  MatDenseRestoreArray(x->A,&px);
+<a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
+<a name="line153">153: </a>}
+
+<a name="line157">157: </a><strong><font color="#4169E1"><a name="BVDotVec_Local_Mat"></a>PetscErrorCode BVDotVec_Local_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line158">158: </a>{
+<a name="line160">160: </a>  BV_MAT         *x = (BV_MAT*)X->data;
+<a name="line161">161: </a>  PetscScalar    *px,*py;
+<a name="line162">162: </a>  Vec            z = y;
+
+<a name="line165">165: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line166">166: </a>    BV_IPMatMult(X,y);
+<a name="line167">167: </a>    z = X->Bx;
+<a name="line168">168: </a>  }
+<a name="line169">169: </a>  MatDenseGetArray(x->A,&px);
+<a name="line170">170: </a>  VecGetArray(z,&py);
+<a name="line171">171: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,PETSC_FALSE);
+<a name="line172">172: </a>  VecRestoreArray(z,&py);
+<a name="line173">173: </a>  MatDenseRestoreArray(x->A,&px);
+<a name="line174">174: </a>  <font color="#4169E1">return</font>(0);
+<a name="line175">175: </a>}
+
+<a name="line179">179: </a><strong><font color="#4169E1"><a name="BVScale_Mat"></a>PetscErrorCode BVScale_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
+<a name="line180">180: </a>{
+<a name="line182">182: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+<a name="line183">183: </a>  PetscScalar    *array;
+
+<a name="line186">186: </a>  MatDenseGetArray(ctx->A,&array);
+<a name="line187">187: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line188">188: </a>    BVScale_BLAS_Private(bv,(bv->k-bv->l)*bv->n,array+(bv->nc+bv->l)*bv->n,alpha);
+<a name="line189">189: </a>  } <font color="#4169E1">else</font> {
+<a name="line190">190: </a>    BVScale_BLAS_Private(bv,bv->n,array+(bv->nc+j)*bv->n,alpha);
+<a name="line191">191: </a>  }
+<a name="line192">192: </a>  MatDenseRestoreArray(ctx->A,&array);
+<a name="line193">193: </a>  <font color="#4169E1">return</font>(0);
+<a name="line194">194: </a>}
+
+<a name="line198">198: </a><strong><font color="#4169E1"><a name="BVNorm_Mat"></a>PetscErrorCode BVNorm_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line199">199: </a>{
+<a name="line201">201: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+<a name="line202">202: </a>  PetscScalar    *array;
+
+<a name="line205">205: </a>  MatDenseGetArray(ctx->A,&array);
+<a name="line206">206: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line207">207: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,ctx->mpi);
+<a name="line208">208: </a>  } <font color="#4169E1">else</font> {
+<a name="line209">209: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,ctx->mpi);
+<a name="line210">210: </a>  }
+<a name="line211">211: </a>  MatDenseRestoreArray(ctx->A,&array);
+<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
+<a name="line213">213: </a>}
+
+<a name="line217">217: </a><strong><font color="#4169E1"><a name="BVNorm_Local_Mat"></a>PetscErrorCode BVNorm_Local_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line218">218: </a>{
+<a name="line220">220: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+<a name="line221">221: </a>  PetscScalar    *array;
+
+<a name="line224">224: </a>  MatDenseGetArray(ctx->A,&array);
+<a name="line225">225: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line226">226: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,PETSC_FALSE);
+<a name="line227">227: </a>  } <font color="#4169E1">else</font> {
+<a name="line228">228: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,PETSC_FALSE);
+<a name="line229">229: </a>  }
+<a name="line230">230: </a>  MatDenseRestoreArray(ctx->A,&array);
+<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
+<a name="line232">232: </a>}
+
+<a name="line236">236: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Mat"></a>PetscErrorCode BVOrthogonalize_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
+<a name="line237">237: </a>{
+<a name="line239">239: </a>  BV_MAT         *ctx = (BV_MAT*)V->data;
+<a name="line240">240: </a>  PetscScalar    *pv,*r=NULL;
+
+<a name="line243">243: </a>  <font color="#4169E1">if</font> (R) { MatDenseGetArray(R,&r); }
+<a name="line244">244: </a>  MatDenseGetArray(ctx->A,&pv);
+<a name="line245">245: </a>  BVOrthogonalize_LAPACK_Private(V,V->n,V->k,pv+V->nc*V->n,r,ctx->mpi);
+<a name="line246">246: </a>  MatDenseRestoreArray(ctx->A,&pv);
+<a name="line247">247: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
+<a name="line248">248: </a>  <font color="#4169E1">return</font>(0);
+<a name="line249">249: </a>}
+
+<a name="line253">253: </a><strong><font color="#4169E1"><a name="BVMatMult_Mat"></a>PetscErrorCode BVMatMult_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line254">254: </a>{
+<a name="line256">256: </a>  BV_MAT         *v = (BV_MAT*)V->data,*w = (BV_MAT*)W->data;
+<a name="line257">257: </a>  PetscScalar    *pv,*pw,*pb,*pc;
+<a name="line258">258: </a>  PetscInt       j,m;
+<a name="line259">259: </a>  PetscBool      flg;
+
+<a name="line262">262: </a>  MatDenseGetArray(v->A,&pv);
+<a name="line263">263: </a>  MatDenseGetArray(w->A,&pw);
+<a name="line264">264: </a>  MatHasOperation(A,MATOP_MAT_MULT,&flg);
+<a name="line265">265: </a>  <font color="#4169E1">if</font> (V->vmm && flg) {
+<a name="line266">266: </a>    m = V->k-V->l;
+<a name="line267">267: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT_SAVE) {
+<a name="line268">268: </a>      BV_AllocateMatMult(V,A,m);
+<a name="line269">269: </a>      MatDenseGetArray(V->B,&pb);
+<a name="line270">270: </a>      PetscMemcpy(pb,pv+(V->nc+V->l)*V->n,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line271">271: </a>      MatDenseRestoreArray(V->B,&pb);
+<a name="line272">272: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* BV_MATMULT_MAT */</font>
+<a name="line273">273: </a>      MatCreateDense(PetscObjectComm((PetscObject)V),V->n,PETSC_DECIDE,V->N,m,pv+(V->nc+V->l)*V->n,&V->B);
+<a name="line274">274: </a>    }
+<a name="line275">275: </a>    <font color="#4169E1">if</font> (!V->C) {
+<a name="line276">276: </a>      MatMatMultSymbolic(A,V->B,PETSC_DEFAULT,&V->C);
+<a name="line277">277: </a>    }
+<a name="line278">278: </a>    MatMatMultNumeric(A,V->B,V->C);
+<a name="line279">279: </a>    MatDenseGetArray(V->C,&pc);
+<a name="line280">280: </a>    PetscMemcpy(pw+(W->nc+W->l)*W->n,pc,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line281">281: </a>    MatDenseRestoreArray(V->C,&pc);
+<a name="line282">282: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT) {
+<a name="line283">283: </a>      MatDestroy(&V->B);
+<a name="line284">284: </a>      MatDestroy(&V->C);
+<a name="line285">285: </a>    }
+<a name="line286">286: </a>  } <font color="#4169E1">else</font> {
+<a name="line287">287: </a>    <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
+<a name="line288">288: </a>      VecPlaceArray(V->cv[1],pv+(V->nc+V->l+j)*V->n);
+<a name="line289">289: </a>      VecPlaceArray(W->cv[1],pw+(W->nc+W->l+j)*W->n);
+<a name="line290">290: </a>      MatMult(A,V->cv[1],W->cv[1]);
+<a name="line291">291: </a>      VecResetArray(V->cv[1]);
+<a name="line292">292: </a>      VecResetArray(W->cv[1]);
+<a name="line293">293: </a>    }
+<a name="line294">294: </a>  }
+<a name="line295">295: </a>  MatDenseRestoreArray(v->A,&pv);
+<a name="line296">296: </a>  MatDenseRestoreArray(w->A,&pw);
+<a name="line297">297: </a>  <font color="#4169E1">return</font>(0);
+<a name="line298">298: </a>}
+
+<a name="line302">302: </a><strong><font color="#4169E1"><a name="BVCopy_Mat"></a>PetscErrorCode BVCopy_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line303">303: </a>{
+<a name="line305">305: </a>  BV_MAT         *v = (BV_MAT*)V->data,*w = (BV_MAT*)W->data;
+<a name="line306">306: </a>  PetscScalar    *pv,*pw,*pvc,*pwc;
+
+<a name="line309">309: </a>  MatDenseGetArray(v->A,&pv);
+<a name="line310">310: </a>  MatDenseGetArray(w->A,&pw);
+<a name="line311">311: </a>  pvc = pv+(V->nc+V->l)*V->n;
+<a name="line312">312: </a>  pwc = pw+(W->nc+W->l)*W->n;
+<a name="line313">313: </a>  PetscMemcpy(pwc,pvc,(V->k-V->l)*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line314">314: </a>  MatDenseRestoreArray(v->A,&pv);
+<a name="line315">315: </a>  MatDenseRestoreArray(w->A,&pw);
+<a name="line316">316: </a>  <font color="#4169E1">return</font>(0);
+<a name="line317">317: </a>}
+
+<a name="line321">321: </a><strong><font color="#4169E1"><a name="BVResize_Mat"></a>PetscErrorCode BVResize_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
+<a name="line322">322: </a>{
+<a name="line324">324: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+<a name="line325">325: </a>  PetscScalar    *pA,*pnew;
+<a name="line326">326: </a>  Mat            A;
+<a name="line327">327: </a>  char           str[50];
+
+<a name="line330">330: </a>  MatCreateDense(PetscObjectComm((PetscObject)bv->t),bv->n,PETSC_DECIDE,PETSC_DECIDE,m,NULL,&A);
+<a name="line331">331: </a>  MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
+<a name="line332">332: </a>  MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
+<a name="line333">333: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)A);
+<a name="line334">334: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line335">335: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
+<a name="line336">336: </a>    PetscObjectSetName((PetscObject)A,str);
+<a name="line337">337: </a>  }
+<a name="line338">338: </a>  <font color="#4169E1">if</font> (copy) {
+<a name="line339">339: </a>    MatDenseGetArray(ctx->A,&pA);
+<a name="line340">340: </a>    MatDenseGetArray(A,&pnew);
+<a name="line341">341: </a>    PetscMemcpy(pnew,pA,PetscMin(m,bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line342">342: </a>    MatDenseRestoreArray(ctx->A,&pA);
+<a name="line343">343: </a>    MatDenseRestoreArray(A,&pnew);
+<a name="line344">344: </a>  }
+<a name="line345">345: </a>  MatDestroy(&ctx->A);
+<a name="line346">346: </a>  ctx->A = A;
+<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
+<a name="line348">348: </a>}
+
+<a name="line352">352: </a><strong><font color="#4169E1"><a name="BVGetColumn_Mat"></a>PetscErrorCode BVGetColumn_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line353">353: </a>{
+<a name="line355">355: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+<a name="line356">356: </a>  PetscScalar    *pA;
+<a name="line357">357: </a>  PetscInt       l;
+
+<a name="line360">360: </a>  l = BVAvailableVec;
+<a name="line361">361: </a>  MatDenseGetArray(ctx->A,&pA);
+<a name="line362">362: </a>  VecPlaceArray(bv->cv[l],pA+(bv->nc+j)*bv->n);
+<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
+<a name="line364">364: </a>}
+
+<a name="line368">368: </a><strong><font color="#4169E1"><a name="BVRestoreColumn_Mat"></a>PetscErrorCode BVRestoreColumn_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line369">369: </a>{
+<a name="line371">371: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+<a name="line372">372: </a>  PetscScalar    *pA;
+<a name="line373">373: </a>  PetscInt       l;
+
+<a name="line376">376: </a>  l = (j==bv->ci[0])? 0: 1;
+<a name="line377">377: </a>  VecResetArray(bv->cv[l]);
+<a name="line378">378: </a>  MatDenseRestoreArray(ctx->A,&pA);
+<a name="line379">379: </a>  <font color="#4169E1">return</font>(0);
+<a name="line380">380: </a>}
+
+<a name="line384">384: </a><strong><font color="#4169E1"><a name="BVGetArray_Mat"></a>PetscErrorCode BVGetArray_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line385">385: </a>{
+<a name="line387">387: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+<a name="line390">390: </a>  MatDenseGetArray(ctx->A,a);
+<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
+<a name="line392">392: </a>}
+
+<a name="line396">396: </a><strong><font color="#4169E1"><a name="BVRestoreArray_Mat"></a>PetscErrorCode BVRestoreArray_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line397">397: </a>{
+<a name="line399">399: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+<a name="line402">402: </a>  <font color="#4169E1">if</font> (a) { MatDenseRestoreArray(ctx->A,a); }
+<a name="line403">403: </a>  <font color="#4169E1">return</font>(0);
+<a name="line404">404: </a>}
+
+<a name="line408">408: </a><strong><font color="#4169E1"><a name="BVGetArrayRead_Mat"></a>PetscErrorCode BVGetArrayRead_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line409">409: </a>{
+<a name="line411">411: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+<a name="line414">414: </a>  MatDenseGetArray(ctx->A,(PetscScalar**)a);
+<a name="line415">415: </a>  <font color="#4169E1">return</font>(0);
+<a name="line416">416: </a>}
+
+<a name="line420">420: </a><strong><font color="#4169E1"><a name="BVRestoreArrayRead_Mat"></a>PetscErrorCode BVRestoreArrayRead_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line421">421: </a>{
+<a name="line423">423: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+<a name="line426">426: </a>  <font color="#4169E1">if</font> (a) { MatDenseRestoreArray(ctx->A,(PetscScalar**)a); }
+<a name="line427">427: </a>  <font color="#4169E1">return</font>(0);
+<a name="line428">428: </a>}
+
+<a name="line432">432: </a><strong><font color="#4169E1"><a name="BVView_Mat"></a>PetscErrorCode BVView_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
+<a name="line433">433: </a>{
+<a name="line434">434: </a>  PetscErrorCode    ierr;
+<a name="line435">435: </a>  BV_MAT            *ctx = (BV_MAT*)bv->data;
+<a name="line436">436: </a>  PetscViewerFormat format;
+<a name="line437">437: </a>  PetscBool         isascii;
+<a name="line438">438: </a>  const char        *bvname,*name;
+
+<a name="line441">441: </a>  MatView(ctx->A,viewer);
+<a name="line442">442: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line443">443: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line444">444: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line445">445: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
+<a name="line446">446: </a>      PetscObjectGetName((PetscObject)bv,&bvname);
+<a name="line447">447: </a>      PetscObjectGetName((PetscObject)ctx->A,&name);
+<a name="line448">448: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=%s;clear %s\n"</font>,bvname,name,name);
+<a name="line449">449: </a>      <font color="#4169E1">if</font> (bv->nc) {
+<a name="line450">450: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=%s(:,%D:end);\n"</font>,bvname,bvname,bv->nc+1);
+<a name="line451">451: </a>      }
+<a name="line452">452: </a>    }
+<a name="line453">453: </a>  }
+<a name="line454">454: </a>  <font color="#4169E1">return</font>(0);
+<a name="line455">455: </a>}
+
+<a name="line459">459: </a><strong><font color="#4169E1"><a name="BVDestroy_Mat"></a>PetscErrorCode BVDestroy_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line460">460: </a>{
+<a name="line462">462: </a>  BV_MAT         *ctx = (BV_MAT*)bv->data;
+
+<a name="line465">465: </a>  MatDestroy(&ctx->A);
+<a name="line466">466: </a>  VecDestroy(&bv->cv[0]);
+<a name="line467">467: </a>  VecDestroy(&bv->cv[1]);
+<a name="line468">468: </a>  PetscFree(bv->data);
+<a name="line469">469: </a>  <font color="#4169E1">return</font>(0);
+<a name="line470">470: </a>}
+
+<a name="line474">474: </a><strong><font color="#4169E1"><a name="BVCreate_Mat"></a>PETSC_EXTERN PetscErrorCode BVCreate_Mat(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line475">475: </a>{
+<a name="line477">477: </a>  BV_MAT         *ctx;
+<a name="line478">478: </a>  PetscInt       nloc,bs;
+<a name="line479">479: </a>  PetscBool      seq;
+<a name="line480">480: </a>  char           str[50];
+
+<a name="line483">483: </a>  PetscNewLog(bv,&ctx);
+<a name="line484">484: </a>  bv->data = (void*)ctx;
+
+<a name="line486">486: </a>  PetscObjectTypeCompare((PetscObject)bv->t,VECMPI,&ctx->mpi);
+<a name="line487">487: </a>  <font color="#4169E1">if</font> (!ctx->mpi) {
+<a name="line488">488: </a>    PetscObjectTypeCompare((PetscObject)bv->t,VECSEQ,&seq);
+<a name="line489">489: </a>    <font color="#4169E1">if</font> (!seq) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot create a BVMAT from a non-standard template vector"</font>);
+<a name="line490">490: </a>  }
+
+<a name="line492">492: </a>  VecGetLocalSize(bv->t,&nloc);
+<a name="line493">493: </a>  VecGetBlockSize(bv->t,&bs);
+
+<a name="line495">495: </a>  MatCreateDense(PetscObjectComm((PetscObject)bv->t),nloc,PETSC_DECIDE,PETSC_DECIDE,bv->m,NULL,&ctx->A);
+<a name="line496">496: </a>  MatAssemblyBegin(ctx->A,MAT_FINAL_ASSEMBLY);
+<a name="line497">497: </a>  MatAssemblyEnd(ctx->A,MAT_FINAL_ASSEMBLY);
+<a name="line498">498: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)ctx->A);
+<a name="line499">499: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line500">500: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
+<a name="line501">501: </a>    PetscObjectSetName((PetscObject)ctx->A,str);
+<a name="line502">502: </a>  }
+
+<a name="line504">504: </a>  <font color="#4169E1">if</font> (ctx->mpi) {
+<a name="line505">505: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[0]);
+<a name="line506">506: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[1]);
+<a name="line507">507: </a>  } <font color="#4169E1">else</font> {
+<a name="line508">508: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[0]);
+<a name="line509">509: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[1]);
+<a name="line510">510: </a>  }
+
+<a name="line512">512: </a>  bv->ops->mult             = BVMult_Mat;
+<a name="line513">513: </a>  bv->ops->multvec          = BVMultVec_Mat;
+<a name="line514">514: </a>  bv->ops->multinplace      = BVMultInPlace_Mat;
+<a name="line515">515: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Mat;
+<a name="line516">516: </a>  bv->ops->dot              = BVDot_Mat;
+<a name="line517">517: </a>  bv->ops->dotvec           = BVDotVec_Mat;
+<a name="line518">518: </a>  bv->ops->dotvec_local     = BVDotVec_Local_Mat;
+<a name="line519">519: </a>  bv->ops->scale            = BVScale_Mat;
+<a name="line520">520: </a>  bv->ops->norm             = BVNorm_Mat;
+<a name="line521">521: </a>  bv->ops->norm_local       = BVNorm_Local_Mat;
+<a name="line522">522: </a>  <font color="#B22222">/*bv->ops->orthogonalize    = BVOrthogonalize_Mat;*/</font>
+<a name="line523">523: </a>  bv->ops->matmult          = BVMatMult_Mat;
+<a name="line524">524: </a>  bv->ops->copy             = BVCopy_Mat;
+<a name="line525">525: </a>  bv->ops->resize           = BVResize_Mat;
+<a name="line526">526: </a>  bv->ops->getcolumn        = BVGetColumn_Mat;
+<a name="line527">527: </a>  bv->ops->restorecolumn    = BVRestoreColumn_Mat;
+<a name="line528">528: </a>  bv->ops->getarray         = BVGetArray_Mat;
+<a name="line529">529: </a>  bv->ops->restorearray     = BVRestoreArray_Mat;
+<a name="line530">530: </a>  bv->ops->getarrayread     = BVGetArrayRead_Mat;
+<a name="line531">531: </a>  bv->ops->restorearrayread = BVRestoreArrayRead_Mat;
+<a name="line532">532: </a>  bv->ops->destroy          = BVDestroy_Mat;
+<a name="line533">533: </a>  <font color="#4169E1">if</font> (!ctx->mpi) bv->ops->view = BVView_Mat;
+<a name="line534">534: </a>  <font color="#4169E1">return</font>(0);
+<a name="line535">535: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/impls/mat/index.html b/src/sys/classes/bv/impls/mat/index.html
index 8929cec..ed55864 100644
--- a/src/sys/classes/bv/impls/mat/index.html
+++ b/src/sys/classes/bv/impls/mat/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/mat/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/mat/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/impls/mat/makefile b/src/sys/classes/bv/impls/mat/makefile
index fd1197b..e2e6b7e 100644
--- a/src/sys/classes/bv/impls/mat/makefile
+++ b/src/sys/classes/bv/impls/mat/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/impls/mat/makefile.html b/src/sys/classes/bv/impls/mat/makefile.html
index b4e81dd..6c63ebf 100644
--- a/src/sys/classes/bv/impls/mat/makefile.html
+++ b/src/sys/classes/bv/impls/mat/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/mat/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:30+00:00">
+<meta name="date" content="2016-05-16T10:32:24+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/mat/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/mat/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/impls/svec/index.html b/src/sys/classes/bv/impls/svec/index.html
index e79093b..3d04660 100644
--- a/src/sys/classes/bv/impls/svec/index.html
+++ b/src/sys/classes/bv/impls/svec/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/svec/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/svec/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/impls/svec/makefile b/src/sys/classes/bv/impls/svec/makefile
index 92ecc31..8c19c68 100644
--- a/src/sys/classes/bv/impls/svec/makefile
+++ b/src/sys/classes/bv/impls/svec/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/impls/svec/makefile.html b/src/sys/classes/bv/impls/svec/makefile.html
index f951ae7..39b558f 100644
--- a/src/sys/classes/bv/impls/svec/makefile.html
+++ b/src/sys/classes/bv/impls/svec/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/svec/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:29+00:00">
+<meta name="date" content="2016-05-16T10:32:23+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/svec/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/svec/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/impls/svec/svec.c b/src/sys/classes/bv/impls/svec/svec.c
index 0d79e4b..a354961 100644
--- a/src/sys/classes/bv/impls/svec/svec.c
+++ b/src/sys/classes/bv/impls/svec/svec.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -39,12 +39,16 @@ PetscErrorCode BVMult_Svec(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)
   PetscInt          ldq;
 
   PetscFunctionBegin;
-  ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
   ierr = VecGetArrayRead(x->v,&px);CHKERRQ(ierr);
   ierr = VecGetArray(y->v,&py);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
-  ierr = BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
-  ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  if (Q) {
+    ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
+    ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
+    ierr = BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
+    ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  } else {
+    ierr = BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,beta,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
+  }
   ierr = VecRestoreArrayRead(x->v,&px);CHKERRQ(ierr);
   ierr = VecRestoreArray(y->v,&py);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -106,23 +110,6 @@ PetscErrorCode BVMultInPlaceTranspose_Svec(BV V,Mat Q,PetscInt s,PetscInt e)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "BVAXPY_Svec"
-PetscErrorCode BVAXPY_Svec(BV Y,PetscScalar alpha,BV X)
-{
-  PetscErrorCode ierr;
-  BV_SVEC        *x = (BV_SVEC*)X->data,*y = (BV_SVEC*)Y->data;
-  PetscScalar    *px,*py;
-
-  PetscFunctionBegin;
-  ierr = VecGetArray(x->v,&px);CHKERRQ(ierr);
-  ierr = VecGetArray(y->v,&py);CHKERRQ(ierr);
-  ierr = BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,py+(Y->nc+Y->l)*Y->n);CHKERRQ(ierr);
-  ierr = VecRestoreArray(x->v,&px);CHKERRQ(ierr);
-  ierr = VecRestoreArray(y->v,&py);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "BVDot_Svec"
 PetscErrorCode BVDot_Svec(BV X,BV Y,Mat M)
 {
@@ -420,6 +407,30 @@ PetscErrorCode BVRestoreArray_Svec(BV bv,PetscScalar **a)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVGetArrayRead_Svec"
+PetscErrorCode BVGetArrayRead_Svec(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+  PetscFunctionBegin;
+  ierr = VecGetArrayRead(ctx->v,a);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "BVRestoreArrayRead_Svec"
+PetscErrorCode BVRestoreArrayRead_Svec(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+  PetscFunctionBegin;
+  ierr = VecRestoreArrayRead(ctx->v,a);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVView_Svec"
 PetscErrorCode BVView_Svec(BV bv,PetscViewer viewer)
 {
@@ -506,7 +517,6 @@ PETSC_EXTERN PetscErrorCode BVCreate_Svec(BV bv)
   bv->ops->multvec          = BVMultVec_Svec;
   bv->ops->multinplace      = BVMultInPlace_Svec;
   bv->ops->multinplacetrans = BVMultInPlaceTranspose_Svec;
-  bv->ops->axpy             = BVAXPY_Svec;
   bv->ops->dot              = BVDot_Svec;
   bv->ops->dotvec           = BVDotVec_Svec;
   bv->ops->dotvec_local     = BVDotVec_Local_Svec;
@@ -521,6 +531,8 @@ PETSC_EXTERN PetscErrorCode BVCreate_Svec(BV bv)
   bv->ops->restorecolumn    = BVRestoreColumn_Svec;
   bv->ops->getarray         = BVGetArray_Svec;
   bv->ops->restorearray     = BVRestoreArray_Svec;
+  bv->ops->getarrayread     = BVGetArrayRead_Svec;
+  bv->ops->restorearrayread = BVRestoreArrayRead_Svec;
   bv->ops->destroy          = BVDestroy_Svec;
   if (!ctx->mpi) bv->ops->view = BVView_Svec;
   PetscFunctionReturn(0);
diff --git a/src/sys/classes/bv/impls/svec/svec.c.html b/src/sys/classes/bv/impls/svec/svec.c.html
index 7ab9149..97c54f4 100644
--- a/src/sys/classes/bv/impls/svec/svec.c.html
+++ b/src/sys/classes/bv/impls/svec/svec.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/svec/svec.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:28+00:00">
+<meta name="date" content="2016-05-16T10:32:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/svec/svec.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/svec/svec.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> implemented as a single Vec</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,411 +48,419 @@
 <a name="line38"> 38: </a>  PetscScalar       *py,*q;
 <a name="line39"> 39: </a>  PetscInt          ldq;
 
-<a name="line42"> 42: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line43"> 43: </a>  VecGetArrayRead(x->v,&px);
-<a name="line44"> 44: </a>  VecGetArray(y->v,&py);
-<a name="line45"> 45: </a>  MatDenseGetArray(Q,&q);
-<a name="line46"> 46: </a>  BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);
-<a name="line47"> 47: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line48"> 48: </a>  VecRestoreArrayRead(x->v,&px);
-<a name="line49"> 49: </a>  VecRestoreArray(y->v,&py);
-<a name="line50"> 50: </a>  <font color="#4169E1">return</font>(0);
-<a name="line51"> 51: </a>}
-
-<a name="line55"> 55: </a><strong><font color="#4169E1"><a name="BVMultVec_Svec"></a>PetscErrorCode BVMultVec_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
-<a name="line56"> 56: </a>{
-<a name="line58"> 58: </a>  BV_SVEC        *x = (BV_SVEC*)X->data;
-<a name="line59"> 59: </a>  PetscScalar    *px,*py;
-
-<a name="line62"> 62: </a>  VecGetArray(x->v,&px);
-<a name="line63"> 63: </a>  VecGetArray(y,&py);
-<a name="line64"> 64: </a>  BVMultVec_BLAS_Private(X,X->n,X->k-X->l,alpha,px+(X->nc+X->l)*X->n,q,beta,py);
-<a name="line65"> 65: </a>  VecRestoreArray(x->v,&px);
-<a name="line66"> 66: </a>  VecRestoreArray(y,&py);
-<a name="line67"> 67: </a>  <font color="#4169E1">return</font>(0);
-<a name="line68"> 68: </a>}
-
-<a name="line72"> 72: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Svec"></a>PetscErrorCode BVMultInPlace_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line73"> 73: </a>{
-<a name="line75"> 75: </a>  BV_SVEC        *ctx = (BV_SVEC*)V->data;
-<a name="line76"> 76: </a>  PetscScalar    *pv,*q;
-<a name="line77"> 77: </a>  PetscInt       ldq;
-
-<a name="line80"> 80: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line81"> 81: </a>  VecGetArray(ctx->v,&pv);
-<a name="line82"> 82: </a>  MatDenseGetArray(Q,&q);
-<a name="line83"> 83: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_FALSE);
-<a name="line84"> 84: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line85"> 85: </a>  VecRestoreArray(ctx->v,&pv);
-<a name="line86"> 86: </a>  <font color="#4169E1">return</font>(0);
-<a name="line87"> 87: </a>}
-
-<a name="line91"> 91: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Svec"></a>PetscErrorCode BVMultInPlaceTranspose_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line92"> 92: </a>{
-<a name="line94"> 94: </a>  BV_SVEC        *ctx = (BV_SVEC*)V->data;
-<a name="line95"> 95: </a>  PetscScalar    *pv,*q;
-<a name="line96"> 96: </a>  PetscInt       ldq;
-
-<a name="line99"> 99: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line100">100: </a>  VecGetArray(ctx->v,&pv);
-<a name="line101">101: </a>  MatDenseGetArray(Q,&q);
-<a name="line102">102: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_TRUE);
-<a name="line103">103: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line104">104: </a>  VecRestoreArray(ctx->v,&pv);
-<a name="line105">105: </a>  <font color="#4169E1">return</font>(0);
-<a name="line106">106: </a>}
-
-<a name="line110">110: </a><strong><font color="#4169E1"><a name="BVAXPY_Svec"></a>PetscErrorCode BVAXPY_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X)</font></strong>
-<a name="line111">111: </a>{
-<a name="line113">113: </a>  BV_SVEC        *x = (BV_SVEC*)X->data,*y = (BV_SVEC*)Y->data;
-<a name="line114">114: </a>  PetscScalar    *px,*py;
-
-<a name="line117">117: </a>  VecGetArray(x->v,&px);
-<a name="line118">118: </a>  VecGetArray(y->v,&py);
-<a name="line119">119: </a>  BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,py+(Y->nc+Y->l)*Y->n);
-<a name="line120">120: </a>  VecRestoreArray(x->v,&px);
-<a name="line121">121: </a>  VecRestoreArray(y->v,&py);
-<a name="line122">122: </a>  <font color="#4169E1">return</font>(0);
-<a name="line123">123: </a>}
-
-<a name="line127">127: </a><strong><font color="#4169E1"><a name="BVDot_Svec"></a>PetscErrorCode BVDot_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
-<a name="line128">128: </a>{
-<a name="line129">129: </a>  PetscErrorCode    ierr;
-<a name="line130">130: </a>  BV_SVEC           *x = (BV_SVEC*)X->data,*y = (BV_SVEC*)Y->data;
-<a name="line131">131: </a>  const PetscScalar *px,*py;
-<a name="line132">132: </a>  PetscScalar       *m;
-<a name="line133">133: </a>  PetscInt          ldm;
-
-<a name="line136">136: </a>  MatGetSize(M,&ldm,NULL);
-<a name="line137">137: </a>  VecGetArrayRead(x->v,&px);
-<a name="line138">138: </a>  VecGetArrayRead(y->v,&py);
-<a name="line139">139: </a>  MatDenseGetArray(M,&m);
-<a name="line140">140: </a>  BVDot_BLAS_Private(X,Y->k-Y->l,X->k-X->l,X->n,ldm,py+(Y->nc+Y->l)*Y->n,px+(X->nc+X->l)*X->n,m+X->l*ldm+Y->l,x->mpi);
-<a name="line141">141: </a>  MatDenseRestoreArray(M,&m);
-<a name="line142">142: </a>  VecRestoreArrayRead(x->v,&px);
-<a name="line143">143: </a>  VecRestoreArrayRead(y->v,&py);
-<a name="line144">144: </a>  <font color="#4169E1">return</font>(0);
-<a name="line145">145: </a>}
-
-<a name="line149">149: </a><strong><font color="#4169E1"><a name="BVDotVec_Svec"></a>PetscErrorCode BVDotVec_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line150">150: </a>{
-<a name="line151">151: </a>  PetscErrorCode    ierr;
-<a name="line152">152: </a>  BV_SVEC           *x = (BV_SVEC*)X->data;
-<a name="line153">153: </a>  const PetscScalar *px,*py;
-<a name="line154">154: </a>  Vec               z = y;
-
-<a name="line157">157: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line158">158: </a>    BV_IPMatMult(X,y);
-<a name="line159">159: </a>    z = X->Bx;
-<a name="line160">160: </a>  }
-<a name="line161">161: </a>  VecGetArrayRead(x->v,&px);
-<a name="line162">162: </a>  VecGetArrayRead(z,&py);
-<a name="line163">163: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,x->mpi);
-<a name="line164">164: </a>  VecRestoreArrayRead(z,&py);
-<a name="line165">165: </a>  VecRestoreArrayRead(x->v,&px);
-<a name="line166">166: </a>  <font color="#4169E1">return</font>(0);
-<a name="line167">167: </a>}
-
-<a name="line171">171: </a><strong><font color="#4169E1"><a name="BVDotVec_Local_Svec"></a>PetscErrorCode BVDotVec_Local_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line172">172: </a>{
-<a name="line174">174: </a>  BV_SVEC        *x = (BV_SVEC*)X->data;
-<a name="line175">175: </a>  PetscScalar    *px,*py;
-<a name="line176">176: </a>  Vec            z = y;
-
-<a name="line179">179: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line180">180: </a>    BV_IPMatMult(X,y);
-<a name="line181">181: </a>    z = X->Bx;
-<a name="line182">182: </a>  }
-<a name="line183">183: </a>  VecGetArray(x->v,&px);
-<a name="line184">184: </a>  VecGetArray(z,&py);
-<a name="line185">185: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,PETSC_FALSE);
-<a name="line186">186: </a>  VecRestoreArray(z,&py);
-<a name="line187">187: </a>  VecRestoreArray(x->v,&px);
-<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
-<a name="line189">189: </a>}
-
-<a name="line193">193: </a><strong><font color="#4169E1"><a name="BVScale_Svec"></a>PetscErrorCode BVScale_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
-<a name="line194">194: </a>{
-<a name="line196">196: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-<a name="line197">197: </a>  PetscScalar    *array;
-
-<a name="line200">200: </a>  VecGetArray(ctx->v,&array);
-<a name="line201">201: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line202">202: </a>    BVScale_BLAS_Private(bv,(bv->k-bv->l)*bv->n,array+(bv->nc+bv->l)*bv->n,alpha);
-<a name="line203">203: </a>  } <font color="#4169E1">else</font> {
-<a name="line204">204: </a>    BVScale_BLAS_Private(bv,bv->n,array+(bv->nc+j)*bv->n,alpha);
-<a name="line205">205: </a>  }
-<a name="line206">206: </a>  VecRestoreArray(ctx->v,&array);
-<a name="line207">207: </a>  <font color="#4169E1">return</font>(0);
-<a name="line208">208: </a>}
-
-<a name="line212">212: </a><strong><font color="#4169E1"><a name="BVNorm_Svec"></a>PetscErrorCode BVNorm_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line213">213: </a>{
-<a name="line215">215: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-<a name="line216">216: </a>  PetscScalar    *array;
-
-<a name="line219">219: </a>  VecGetArray(ctx->v,&array);
-<a name="line220">220: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line221">221: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,ctx->mpi);
-<a name="line222">222: </a>  } <font color="#4169E1">else</font> {
-<a name="line223">223: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,ctx->mpi);
-<a name="line224">224: </a>  }
-<a name="line225">225: </a>  VecRestoreArray(ctx->v,&array);
-<a name="line226">226: </a>  <font color="#4169E1">return</font>(0);
-<a name="line227">227: </a>}
-
-<a name="line231">231: </a><strong><font color="#4169E1"><a name="BVNorm_Local_Svec"></a>PetscErrorCode BVNorm_Local_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line232">232: </a>{
-<a name="line234">234: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-<a name="line235">235: </a>  PetscScalar    *array;
-
-<a name="line238">238: </a>  VecGetArray(ctx->v,&array);
-<a name="line239">239: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line240">240: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,PETSC_FALSE);
-<a name="line241">241: </a>  } <font color="#4169E1">else</font> {
-<a name="line242">242: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,PETSC_FALSE);
-<a name="line243">243: </a>  }
-<a name="line244">244: </a>  VecRestoreArray(ctx->v,&array);
-<a name="line245">245: </a>  <font color="#4169E1">return</font>(0);
-<a name="line246">246: </a>}
-
-<a name="line250">250: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Svec"></a>PetscErrorCode BVOrthogonalize_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
-<a name="line251">251: </a>{
-<a name="line253">253: </a>  BV_SVEC        *ctx = (BV_SVEC*)V->data;
-<a name="line254">254: </a>  PetscScalar    *pv,*r=NULL;
-
-<a name="line257">257: </a>  <font color="#4169E1">if</font> (R) { MatDenseGetArray(R,&r); }
-<a name="line258">258: </a>  VecGetArray(ctx->v,&pv);
-<a name="line259">259: </a>  BVOrthogonalize_LAPACK_Private(V,V->n,V->k,pv+V->nc*V->n,r,ctx->mpi);
-<a name="line260">260: </a>  VecRestoreArray(ctx->v,&pv);
-<a name="line261">261: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
-<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
-<a name="line263">263: </a>}
-
-<a name="line267">267: </a><strong><font color="#4169E1"><a name="BVMatMult_Svec"></a>PetscErrorCode BVMatMult_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line268">268: </a>{
-<a name="line270">270: </a>  BV_SVEC        *v = (BV_SVEC*)V->data,*w = (BV_SVEC*)W->data;
-<a name="line271">271: </a>  PetscScalar    *pv,*pw,*pb,*pc;
-<a name="line272">272: </a>  PetscInt       j,m;
-<a name="line273">273: </a>  PetscBool      flg;
-
-<a name="line276">276: </a>  VecGetArray(v->v,&pv);
-<a name="line277">277: </a>  VecGetArray(w->v,&pw);
-<a name="line278">278: </a>  MatHasOperation(A,MATOP_MAT_MULT,&flg);
-<a name="line279">279: </a>  <font color="#4169E1">if</font> (V->vmm && flg) {
-<a name="line280">280: </a>    m = V->k-V->l;
-<a name="line281">281: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT_SAVE) {
-<a name="line282">282: </a>      BV_AllocateMatMult(V,A,m);
-<a name="line283">283: </a>      MatDenseGetArray(V->B,&pb);
-<a name="line284">284: </a>      PetscMemcpy(pb,pv+(V->nc+V->l)*V->n,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line285">285: </a>      MatDenseRestoreArray(V->B,&pb);
-<a name="line286">286: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* BV_MATMULT_MAT */</font>
-<a name="line287">287: </a>      MatCreateDense(PetscObjectComm((PetscObject)V),V->n,PETSC_DECIDE,V->N,m,pv+(V->nc+V->l)*V->n,&V->B);
-<a name="line288">288: </a>    }
-<a name="line289">289: </a>    <font color="#4169E1">if</font> (!V->C) {
-<a name="line290">290: </a>      MatMatMultSymbolic(A,V->B,PETSC_DEFAULT,&V->C);
-<a name="line291">291: </a>    }
-<a name="line292">292: </a>    MatMatMultNumeric(A,V->B,V->C);
-<a name="line293">293: </a>    MatDenseGetArray(V->C,&pc);
-<a name="line294">294: </a>    PetscMemcpy(pw+(W->nc+W->l)*W->n,pc,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line295">295: </a>    MatDenseRestoreArray(V->C,&pc);
-<a name="line296">296: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT) {
-<a name="line297">297: </a>      MatDestroy(&V->B);
-<a name="line298">298: </a>      MatDestroy(&V->C);
-<a name="line299">299: </a>    }
-<a name="line300">300: </a>  } <font color="#4169E1">else</font> {
-<a name="line301">301: </a>    <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
-<a name="line302">302: </a>      VecPlaceArray(V->cv[1],pv+(V->nc+V->l+j)*V->n);
-<a name="line303">303: </a>      VecPlaceArray(W->cv[1],pw+(W->nc+W->l+j)*W->n);
-<a name="line304">304: </a>      MatMult(A,V->cv[1],W->cv[1]);
-<a name="line305">305: </a>      VecResetArray(V->cv[1]);
-<a name="line306">306: </a>      VecResetArray(W->cv[1]);
-<a name="line307">307: </a>    }
-<a name="line308">308: </a>  }
-<a name="line309">309: </a>  VecRestoreArray(v->v,&pv);
-<a name="line310">310: </a>  VecRestoreArray(w->v,&pw);
-<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
-<a name="line312">312: </a>}
-
-<a name="line316">316: </a><strong><font color="#4169E1"><a name="BVCopy_Svec"></a>PetscErrorCode BVCopy_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line317">317: </a>{
-<a name="line319">319: </a>  BV_SVEC        *v = (BV_SVEC*)V->data,*w = (BV_SVEC*)W->data;
-<a name="line320">320: </a>  PetscScalar    *pv,*pw,*pvc,*pwc;
-
-<a name="line323">323: </a>  VecGetArray(v->v,&pv);
-<a name="line324">324: </a>  VecGetArray(w->v,&pw);
-<a name="line325">325: </a>  pvc = pv+(V->nc+V->l)*V->n;
-<a name="line326">326: </a>  pwc = pw+(W->nc+W->l)*W->n;
-<a name="line327">327: </a>  PetscMemcpy(pwc,pvc,(V->k-V->l)*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line328">328: </a>  VecRestoreArray(v->v,&pv);
-<a name="line329">329: </a>  VecRestoreArray(w->v,&pw);
-<a name="line330">330: </a>  <font color="#4169E1">return</font>(0);
-<a name="line331">331: </a>}
-
-<a name="line335">335: </a><strong><font color="#4169E1"><a name="BVResize_Svec"></a>PetscErrorCode BVResize_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
-<a name="line336">336: </a>{
-<a name="line338">338: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-<a name="line339">339: </a>  PetscScalar    *pv,*pnew;
-<a name="line340">340: </a>  PetscInt       bs;
-<a name="line341">341: </a>  Vec            vnew;
-<a name="line342">342: </a>  char           str[50];
-
-<a name="line345">345: </a>  VecGetBlockSize(bv->t,&bs);
-<a name="line346">346: </a>  VecCreate(PetscObjectComm((PetscObject)bv->t),&vnew);
-<a name="line347">347: </a>  VecSetType(vnew,((PetscObject)bv->t)->type_name);
-<a name="line348">348: </a>  VecSetSizes(vnew,m*bv->n,PETSC_DECIDE);
-<a name="line349">349: </a>  VecSetBlockSize(vnew,bs);
-<a name="line350">350: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)vnew);
-<a name="line351">351: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line352">352: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
-<a name="line353">353: </a>    PetscObjectSetName((PetscObject)vnew,str);
-<a name="line354">354: </a>  }
-<a name="line355">355: </a>  <font color="#4169E1">if</font> (copy) {
-<a name="line356">356: </a>    VecGetArray(ctx->v,&pv);
-<a name="line357">357: </a>    VecGetArray(vnew,&pnew);
-<a name="line358">358: </a>    PetscMemcpy(pnew,pv,PetscMin(m,bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line359">359: </a>    VecRestoreArray(ctx->v,&pv);
-<a name="line360">360: </a>    VecRestoreArray(vnew,&pnew);
-<a name="line361">361: </a>  }
-<a name="line362">362: </a>  VecDestroy(&ctx->v);
-<a name="line363">363: </a>  ctx->v = vnew;
-<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
-<a name="line365">365: </a>}
-
-<a name="line369">369: </a><strong><font color="#4169E1"><a name="BVGetColumn_Svec"></a>PetscErrorCode BVGetColumn_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line370">370: </a>{
-<a name="line372">372: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-<a name="line373">373: </a>  PetscScalar    *pv;
-<a name="line374">374: </a>  PetscInt       l;
-
-<a name="line377">377: </a>  l = BVAvailableVec;
-<a name="line378">378: </a>  VecGetArray(ctx->v,&pv);
-<a name="line379">379: </a>  VecPlaceArray(bv->cv[l],pv+(bv->nc+j)*bv->n);
-<a name="line380">380: </a>  <font color="#4169E1">return</font>(0);
-<a name="line381">381: </a>}
-
-<a name="line385">385: </a><strong><font color="#4169E1"><a name="BVRestoreColumn_Svec"></a>PetscErrorCode BVRestoreColumn_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line386">386: </a>{
-<a name="line388">388: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-<a name="line389">389: </a>  PetscInt       l;
-
-<a name="line392">392: </a>  l = (j==bv->ci[0])? 0: 1;
-<a name="line393">393: </a>  VecResetArray(bv->cv[l]);
-<a name="line394">394: </a>  VecRestoreArray(ctx->v,NULL);
-<a name="line395">395: </a>  <font color="#4169E1">return</font>(0);
-<a name="line396">396: </a>}
-
-<a name="line400">400: </a><strong><font color="#4169E1"><a name="BVGetArray_Svec"></a>PetscErrorCode BVGetArray_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line401">401: </a>{
-<a name="line403">403: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-
-<a name="line406">406: </a>  VecGetArray(ctx->v,a);
-<a name="line407">407: </a>  <font color="#4169E1">return</font>(0);
-<a name="line408">408: </a>}
-
-<a name="line412">412: </a><strong><font color="#4169E1"><a name="BVRestoreArray_Svec"></a>PetscErrorCode BVRestoreArray_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line413">413: </a>{
-<a name="line415">415: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-
-<a name="line418">418: </a>  VecRestoreArray(ctx->v,a);
-<a name="line419">419: </a>  <font color="#4169E1">return</font>(0);
-<a name="line420">420: </a>}
-
-<a name="line424">424: </a><strong><font color="#4169E1"><a name="BVView_Svec"></a>PetscErrorCode BVView_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
-<a name="line425">425: </a>{
-<a name="line426">426: </a>  PetscErrorCode    ierr;
-<a name="line427">427: </a>  BV_SVEC           *ctx = (BV_SVEC*)bv->data;
-<a name="line428">428: </a>  PetscViewerFormat format;
-<a name="line429">429: </a>  PetscBool         isascii;
-<a name="line430">430: </a>  const char        *bvname,*name;
-
-<a name="line433">433: </a>  VecView(ctx->v,viewer);
-<a name="line434">434: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line435">435: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line436">436: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line437">437: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
-<a name="line438">438: </a>      PetscObjectGetName((PetscObject)bv,&bvname);
-<a name="line439">439: </a>      PetscObjectGetName((PetscObject)ctx->v,&name);
-<a name="line440">440: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=reshape(%s,%D,%D);clear %s\n"</font>,bvname,name,bv->N,bv->nc+bv->m,name);
-<a name="line441">441: </a>      <font color="#4169E1">if</font> (bv->nc) {
-<a name="line442">442: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=%s(:,%D:end);\n"</font>,bvname,bvname,bv->nc+1);
-<a name="line443">443: </a>      }
-<a name="line444">444: </a>    }
-<a name="line445">445: </a>  }
-<a name="line446">446: </a>  <font color="#4169E1">return</font>(0);
-<a name="line447">447: </a>}
-
-<a name="line451">451: </a><strong><font color="#4169E1"><a name="BVDestroy_Svec"></a>PetscErrorCode BVDestroy_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line452">452: </a>{
-<a name="line454">454: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
-
-<a name="line457">457: </a>  VecDestroy(&ctx->v);
-<a name="line458">458: </a>  VecDestroy(&bv->cv[0]);
-<a name="line459">459: </a>  VecDestroy(&bv->cv[1]);
-<a name="line460">460: </a>  PetscFree(bv->data);
-<a name="line461">461: </a>  <font color="#4169E1">return</font>(0);
-<a name="line462">462: </a>}
-
-<a name="line466">466: </a><strong><font color="#4169E1"><a name="BVCreate_Svec"></a>PETSC_EXTERN PetscErrorCode BVCreate_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line467">467: </a>{
-<a name="line469">469: </a>  BV_SVEC        *ctx;
-<a name="line470">470: </a>  PetscInt       nloc,bs;
-<a name="line471">471: </a>  PetscBool      seq;
-<a name="line472">472: </a>  char           str[50];
-
-<a name="line475">475: </a>  PetscNewLog(bv,&ctx);
-<a name="line476">476: </a>  bv->data = (void*)ctx;
-
-<a name="line478">478: </a>  PetscObjectTypeCompare((PetscObject)bv->t,VECMPI,&ctx->mpi);
-<a name="line479">479: </a>  <font color="#4169E1">if</font> (!ctx->mpi) {
-<a name="line480">480: </a>    PetscObjectTypeCompare((PetscObject)bv->t,VECSEQ,&seq);
-<a name="line481">481: </a>    <font color="#4169E1">if</font> (!seq) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot create a BVSVEC from a non-standard template vector"</font>);
-<a name="line482">482: </a>  }
-
-<a name="line484">484: </a>  VecGetLocalSize(bv->t,&nloc);
-<a name="line485">485: </a>  VecGetBlockSize(bv->t,&bs);
-
-<a name="line487">487: </a>  VecCreate(PetscObjectComm((PetscObject)bv->t),&ctx->v);
-<a name="line488">488: </a>  VecSetType(ctx->v,((PetscObject)bv->t)->type_name);
-<a name="line489">489: </a>  VecSetSizes(ctx->v,bv->m*nloc,PETSC_DECIDE);
-<a name="line490">490: </a>  VecSetBlockSize(ctx->v,bs);
-<a name="line491">491: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)ctx->v);
-<a name="line492">492: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line493">493: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
-<a name="line494">494: </a>    PetscObjectSetName((PetscObject)ctx->v,str);
-<a name="line495">495: </a>  }
-
-<a name="line497">497: </a>  <font color="#4169E1">if</font> (ctx->mpi) {
-<a name="line498">498: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[0]);
-<a name="line499">499: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[1]);
-<a name="line500">500: </a>  } <font color="#4169E1">else</font> {
-<a name="line501">501: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[0]);
-<a name="line502">502: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[1]);
-<a name="line503">503: </a>  }
-
-<a name="line505">505: </a>  bv->ops->mult             = BVMult_Svec;
-<a name="line506">506: </a>  bv->ops->multvec          = BVMultVec_Svec;
-<a name="line507">507: </a>  bv->ops->multinplace      = BVMultInPlace_Svec;
-<a name="line508">508: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Svec;
-<a name="line509">509: </a>  bv->ops->axpy             = BVAXPY_Svec;
-<a name="line510">510: </a>  bv->ops->dot              = BVDot_Svec;
-<a name="line511">511: </a>  bv->ops->dotvec           = BVDotVec_Svec;
-<a name="line512">512: </a>  bv->ops->dotvec_local     = BVDotVec_Local_Svec;
-<a name="line513">513: </a>  bv->ops->scale            = BVScale_Svec;
-<a name="line514">514: </a>  bv->ops->norm             = BVNorm_Svec;
-<a name="line515">515: </a>  bv->ops->norm_local       = BVNorm_Local_Svec;
-<a name="line516">516: </a>  <font color="#B22222">/*bv->ops->orthogonalize    = BVOrthogonalize_Svec;*/</font>
-<a name="line517">517: </a>  bv->ops->matmult          = BVMatMult_Svec;
-<a name="line518">518: </a>  bv->ops->copy             = BVCopy_Svec;
-<a name="line519">519: </a>  bv->ops->resize           = BVResize_Svec;
-<a name="line520">520: </a>  bv->ops->getcolumn        = BVGetColumn_Svec;
-<a name="line521">521: </a>  bv->ops->restorecolumn    = BVRestoreColumn_Svec;
-<a name="line522">522: </a>  bv->ops->getarray         = BVGetArray_Svec;
-<a name="line523">523: </a>  bv->ops->restorearray     = BVRestoreArray_Svec;
-<a name="line524">524: </a>  bv->ops->destroy          = BVDestroy_Svec;
-<a name="line525">525: </a>  <font color="#4169E1">if</font> (!ctx->mpi) bv->ops->view = BVView_Svec;
-<a name="line526">526: </a>  <font color="#4169E1">return</font>(0);
-<a name="line527">527: </a>}
+<a name="line42"> 42: </a>  VecGetArrayRead(x->v,&px);
+<a name="line43"> 43: </a>  VecGetArray(y->v,&py);
+<a name="line44"> 44: </a>  <font color="#4169E1">if</font> (Q) {
+<a name="line45"> 45: </a>    MatGetSize(Q,&ldq,NULL);
+<a name="line46"> 46: </a>    MatDenseGetArray(Q,&q);
+<a name="line47"> 47: </a>    BVMult_BLAS_Private(Y,Y->n,Y->k-Y->l,X->k-X->l,ldq,alpha,px+(X->nc+X->l)*X->n,q+Y->l*ldq+X->l,beta,py+(Y->nc+Y->l)*Y->n);
+<a name="line48"> 48: </a>    MatDenseRestoreArray(Q,&q);
+<a name="line49"> 49: </a>  } <font color="#4169E1">else</font> {
+<a name="line50"> 50: </a>    BVAXPY_BLAS_Private(Y,Y->n,Y->k-Y->l,alpha,px+(X->nc+X->l)*X->n,beta,py+(Y->nc+Y->l)*Y->n);
+<a name="line51"> 51: </a>  }
+<a name="line52"> 52: </a>  VecRestoreArrayRead(x->v,&px);
+<a name="line53"> 53: </a>  VecRestoreArray(y->v,&py);
+<a name="line54"> 54: </a>  <font color="#4169E1">return</font>(0);
+<a name="line55"> 55: </a>}
+
+<a name="line59"> 59: </a><strong><font color="#4169E1"><a name="BVMultVec_Svec"></a>PetscErrorCode BVMultVec_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
+<a name="line60"> 60: </a>{
+<a name="line62"> 62: </a>  BV_SVEC        *x = (BV_SVEC*)X->data;
+<a name="line63"> 63: </a>  PetscScalar    *px,*py;
+
+<a name="line66"> 66: </a>  VecGetArray(x->v,&px);
+<a name="line67"> 67: </a>  VecGetArray(y,&py);
+<a name="line68"> 68: </a>  BVMultVec_BLAS_Private(X,X->n,X->k-X->l,alpha,px+(X->nc+X->l)*X->n,q,beta,py);
+<a name="line69"> 69: </a>  VecRestoreArray(x->v,&px);
+<a name="line70"> 70: </a>  VecRestoreArray(y,&py);
+<a name="line71"> 71: </a>  <font color="#4169E1">return</font>(0);
+<a name="line72"> 72: </a>}
+
+<a name="line76"> 76: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Svec"></a>PetscErrorCode BVMultInPlace_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line77"> 77: </a>{
+<a name="line79"> 79: </a>  BV_SVEC        *ctx = (BV_SVEC*)V->data;
+<a name="line80"> 80: </a>  PetscScalar    *pv,*q;
+<a name="line81"> 81: </a>  PetscInt       ldq;
+
+<a name="line84"> 84: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line85"> 85: </a>  VecGetArray(ctx->v,&pv);
+<a name="line86"> 86: </a>  MatDenseGetArray(Q,&q);
+<a name="line87"> 87: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_FALSE);
+<a name="line88"> 88: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line89"> 89: </a>  VecRestoreArray(ctx->v,&pv);
+<a name="line90"> 90: </a>  <font color="#4169E1">return</font>(0);
+<a name="line91"> 91: </a>}
+
+<a name="line95"> 95: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Svec"></a>PetscErrorCode BVMultInPlaceTranspose_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line96"> 96: </a>{
+<a name="line98"> 98: </a>  BV_SVEC        *ctx = (BV_SVEC*)V->data;
+<a name="line99"> 99: </a>  PetscScalar    *pv,*q;
+<a name="line100">100: </a>  PetscInt       ldq;
+
+<a name="line103">103: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line104">104: </a>  VecGetArray(ctx->v,&pv);
+<a name="line105">105: </a>  MatDenseGetArray(Q,&q);
+<a name="line106">106: </a>  BVMultInPlace_BLAS_Private(V,V->n,V->k-V->l,ldq,s-V->l,e-V->l,pv+(V->nc+V->l)*V->n,q+V->l*ldq+V->l,PETSC_TRUE);
+<a name="line107">107: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line108">108: </a>  VecRestoreArray(ctx->v,&pv);
+<a name="line109">109: </a>  <font color="#4169E1">return</font>(0);
+<a name="line110">110: </a>}
+
+<a name="line114">114: </a><strong><font color="#4169E1"><a name="BVDot_Svec"></a>PetscErrorCode BVDot_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
+<a name="line115">115: </a>{
+<a name="line116">116: </a>  PetscErrorCode    ierr;
+<a name="line117">117: </a>  BV_SVEC           *x = (BV_SVEC*)X->data,*y = (BV_SVEC*)Y->data;
+<a name="line118">118: </a>  const PetscScalar *px,*py;
+<a name="line119">119: </a>  PetscScalar       *m;
+<a name="line120">120: </a>  PetscInt          ldm;
+
+<a name="line123">123: </a>  MatGetSize(M,&ldm,NULL);
+<a name="line124">124: </a>  VecGetArrayRead(x->v,&px);
+<a name="line125">125: </a>  VecGetArrayRead(y->v,&py);
+<a name="line126">126: </a>  MatDenseGetArray(M,&m);
+<a name="line127">127: </a>  BVDot_BLAS_Private(X,Y->k-Y->l,X->k-X->l,X->n,ldm,py+(Y->nc+Y->l)*Y->n,px+(X->nc+X->l)*X->n,m+X->l*ldm+Y->l,x->mpi);
+<a name="line128">128: </a>  MatDenseRestoreArray(M,&m);
+<a name="line129">129: </a>  VecRestoreArrayRead(x->v,&px);
+<a name="line130">130: </a>  VecRestoreArrayRead(y->v,&py);
+<a name="line131">131: </a>  <font color="#4169E1">return</font>(0);
+<a name="line132">132: </a>}
+
+<a name="line136">136: </a><strong><font color="#4169E1"><a name="BVDotVec_Svec"></a>PetscErrorCode BVDotVec_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line137">137: </a>{
+<a name="line138">138: </a>  PetscErrorCode    ierr;
+<a name="line139">139: </a>  BV_SVEC           *x = (BV_SVEC*)X->data;
+<a name="line140">140: </a>  const PetscScalar *px,*py;
+<a name="line141">141: </a>  Vec               z = y;
+
+<a name="line144">144: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line145">145: </a>    BV_IPMatMult(X,y);
+<a name="line146">146: </a>    z = X->Bx;
+<a name="line147">147: </a>  }
+<a name="line148">148: </a>  VecGetArrayRead(x->v,&px);
+<a name="line149">149: </a>  VecGetArrayRead(z,&py);
+<a name="line150">150: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,x->mpi);
+<a name="line151">151: </a>  VecRestoreArrayRead(z,&py);
+<a name="line152">152: </a>  VecRestoreArrayRead(x->v,&px);
+<a name="line153">153: </a>  <font color="#4169E1">return</font>(0);
+<a name="line154">154: </a>}
+
+<a name="line158">158: </a><strong><font color="#4169E1"><a name="BVDotVec_Local_Svec"></a>PetscErrorCode BVDotVec_Local_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line159">159: </a>{
+<a name="line161">161: </a>  BV_SVEC        *x = (BV_SVEC*)X->data;
+<a name="line162">162: </a>  PetscScalar    *px,*py;
+<a name="line163">163: </a>  Vec            z = y;
+
+<a name="line166">166: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line167">167: </a>    BV_IPMatMult(X,y);
+<a name="line168">168: </a>    z = X->Bx;
+<a name="line169">169: </a>  }
+<a name="line170">170: </a>  VecGetArray(x->v,&px);
+<a name="line171">171: </a>  VecGetArray(z,&py);
+<a name="line172">172: </a>  BVDotVec_BLAS_Private(X,X->n,X->k-X->l,px+(X->nc+X->l)*X->n,py,m,PETSC_FALSE);
+<a name="line173">173: </a>  VecRestoreArray(z,&py);
+<a name="line174">174: </a>  VecRestoreArray(x->v,&px);
+<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
+<a name="line176">176: </a>}
+
+<a name="line180">180: </a><strong><font color="#4169E1"><a name="BVScale_Svec"></a>PetscErrorCode BVScale_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
+<a name="line181">181: </a>{
+<a name="line183">183: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+<a name="line184">184: </a>  PetscScalar    *array;
+
+<a name="line187">187: </a>  VecGetArray(ctx->v,&array);
+<a name="line188">188: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line189">189: </a>    BVScale_BLAS_Private(bv,(bv->k-bv->l)*bv->n,array+(bv->nc+bv->l)*bv->n,alpha);
+<a name="line190">190: </a>  } <font color="#4169E1">else</font> {
+<a name="line191">191: </a>    BVScale_BLAS_Private(bv,bv->n,array+(bv->nc+j)*bv->n,alpha);
+<a name="line192">192: </a>  }
+<a name="line193">193: </a>  VecRestoreArray(ctx->v,&array);
+<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
+<a name="line195">195: </a>}
+
+<a name="line199">199: </a><strong><font color="#4169E1"><a name="BVNorm_Svec"></a>PetscErrorCode BVNorm_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line200">200: </a>{
+<a name="line202">202: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+<a name="line203">203: </a>  PetscScalar    *array;
+
+<a name="line206">206: </a>  VecGetArray(ctx->v,&array);
+<a name="line207">207: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line208">208: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,ctx->mpi);
+<a name="line209">209: </a>  } <font color="#4169E1">else</font> {
+<a name="line210">210: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,ctx->mpi);
+<a name="line211">211: </a>  }
+<a name="line212">212: </a>  VecRestoreArray(ctx->v,&array);
+<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
+<a name="line214">214: </a>}
+
+<a name="line218">218: </a><strong><font color="#4169E1"><a name="BVNorm_Local_Svec"></a>PetscErrorCode BVNorm_Local_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line219">219: </a>{
+<a name="line221">221: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+<a name="line222">222: </a>  PetscScalar    *array;
+
+<a name="line225">225: </a>  VecGetArray(ctx->v,&array);
+<a name="line226">226: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line227">227: </a>    BVNorm_LAPACK_Private(bv,bv->n,bv->k-bv->l,array+(bv->nc+bv->l)*bv->n,type,val,PETSC_FALSE);
+<a name="line228">228: </a>  } <font color="#4169E1">else</font> {
+<a name="line229">229: </a>    BVNorm_LAPACK_Private(bv,bv->n,1,array+(bv->nc+j)*bv->n,type,val,PETSC_FALSE);
+<a name="line230">230: </a>  }
+<a name="line231">231: </a>  VecRestoreArray(ctx->v,&array);
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a>}
+
+<a name="line237">237: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Svec"></a>PetscErrorCode BVOrthogonalize_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
+<a name="line238">238: </a>{
+<a name="line240">240: </a>  BV_SVEC        *ctx = (BV_SVEC*)V->data;
+<a name="line241">241: </a>  PetscScalar    *pv,*r=NULL;
+
+<a name="line244">244: </a>  <font color="#4169E1">if</font> (R) { MatDenseGetArray(R,&r); }
+<a name="line245">245: </a>  VecGetArray(ctx->v,&pv);
+<a name="line246">246: </a>  BVOrthogonalize_LAPACK_Private(V,V->n,V->k,pv+V->nc*V->n,r,ctx->mpi);
+<a name="line247">247: </a>  VecRestoreArray(ctx->v,&pv);
+<a name="line248">248: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
+<a name="line249">249: </a>  <font color="#4169E1">return</font>(0);
+<a name="line250">250: </a>}
+
+<a name="line254">254: </a><strong><font color="#4169E1"><a name="BVMatMult_Svec"></a>PetscErrorCode BVMatMult_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line255">255: </a>{
+<a name="line257">257: </a>  BV_SVEC        *v = (BV_SVEC*)V->data,*w = (BV_SVEC*)W->data;
+<a name="line258">258: </a>  PetscScalar    *pv,*pw,*pb,*pc;
+<a name="line259">259: </a>  PetscInt       j,m;
+<a name="line260">260: </a>  PetscBool      flg;
+
+<a name="line263">263: </a>  VecGetArray(v->v,&pv);
+<a name="line264">264: </a>  VecGetArray(w->v,&pw);
+<a name="line265">265: </a>  MatHasOperation(A,MATOP_MAT_MULT,&flg);
+<a name="line266">266: </a>  <font color="#4169E1">if</font> (V->vmm && flg) {
+<a name="line267">267: </a>    m = V->k-V->l;
+<a name="line268">268: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT_SAVE) {
+<a name="line269">269: </a>      BV_AllocateMatMult(V,A,m);
+<a name="line270">270: </a>      MatDenseGetArray(V->B,&pb);
+<a name="line271">271: </a>      PetscMemcpy(pb,pv+(V->nc+V->l)*V->n,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line272">272: </a>      MatDenseRestoreArray(V->B,&pb);
+<a name="line273">273: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* BV_MATMULT_MAT */</font>
+<a name="line274">274: </a>      MatCreateDense(PetscObjectComm((PetscObject)V),V->n,PETSC_DECIDE,V->N,m,pv+(V->nc+V->l)*V->n,&V->B);
+<a name="line275">275: </a>    }
+<a name="line276">276: </a>    <font color="#4169E1">if</font> (!V->C) {
+<a name="line277">277: </a>      MatMatMultSymbolic(A,V->B,PETSC_DEFAULT,&V->C);
+<a name="line278">278: </a>    }
+<a name="line279">279: </a>    MatMatMultNumeric(A,V->B,V->C);
+<a name="line280">280: </a>    MatDenseGetArray(V->C,&pc);
+<a name="line281">281: </a>    PetscMemcpy(pw+(W->nc+W->l)*W->n,pc,m*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line282">282: </a>    MatDenseRestoreArray(V->C,&pc);
+<a name="line283">283: </a>    <font color="#4169E1">if</font> (V->vmm==BV_MATMULT_MAT) {
+<a name="line284">284: </a>      MatDestroy(&V->B);
+<a name="line285">285: </a>      MatDestroy(&V->C);
+<a name="line286">286: </a>    }
+<a name="line287">287: </a>  } <font color="#4169E1">else</font> {
+<a name="line288">288: </a>    <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
+<a name="line289">289: </a>      VecPlaceArray(V->cv[1],pv+(V->nc+V->l+j)*V->n);
+<a name="line290">290: </a>      VecPlaceArray(W->cv[1],pw+(W->nc+W->l+j)*W->n);
+<a name="line291">291: </a>      MatMult(A,V->cv[1],W->cv[1]);
+<a name="line292">292: </a>      VecResetArray(V->cv[1]);
+<a name="line293">293: </a>      VecResetArray(W->cv[1]);
+<a name="line294">294: </a>    }
+<a name="line295">295: </a>  }
+<a name="line296">296: </a>  VecRestoreArray(v->v,&pv);
+<a name="line297">297: </a>  VecRestoreArray(w->v,&pw);
+<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
+<a name="line299">299: </a>}
+
+<a name="line303">303: </a><strong><font color="#4169E1"><a name="BVCopy_Svec"></a>PetscErrorCode BVCopy_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line304">304: </a>{
+<a name="line306">306: </a>  BV_SVEC        *v = (BV_SVEC*)V->data,*w = (BV_SVEC*)W->data;
+<a name="line307">307: </a>  PetscScalar    *pv,*pw,*pvc,*pwc;
+
+<a name="line310">310: </a>  VecGetArray(v->v,&pv);
+<a name="line311">311: </a>  VecGetArray(w->v,&pw);
+<a name="line312">312: </a>  pvc = pv+(V->nc+V->l)*V->n;
+<a name="line313">313: </a>  pwc = pw+(W->nc+W->l)*W->n;
+<a name="line314">314: </a>  PetscMemcpy(pwc,pvc,(V->k-V->l)*V->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line315">315: </a>  VecRestoreArray(v->v,&pv);
+<a name="line316">316: </a>  VecRestoreArray(w->v,&pw);
+<a name="line317">317: </a>  <font color="#4169E1">return</font>(0);
+<a name="line318">318: </a>}
+
+<a name="line322">322: </a><strong><font color="#4169E1"><a name="BVResize_Svec"></a>PetscErrorCode BVResize_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
+<a name="line323">323: </a>{
+<a name="line325">325: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+<a name="line326">326: </a>  PetscScalar    *pv,*pnew;
+<a name="line327">327: </a>  PetscInt       bs;
+<a name="line328">328: </a>  Vec            vnew;
+<a name="line329">329: </a>  char           str[50];
+
+<a name="line332">332: </a>  VecGetBlockSize(bv->t,&bs);
+<a name="line333">333: </a>  VecCreate(PetscObjectComm((PetscObject)bv->t),&vnew);
+<a name="line334">334: </a>  VecSetType(vnew,((PetscObject)bv->t)->type_name);
+<a name="line335">335: </a>  VecSetSizes(vnew,m*bv->n,PETSC_DECIDE);
+<a name="line336">336: </a>  VecSetBlockSize(vnew,bs);
+<a name="line337">337: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)vnew);
+<a name="line338">338: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line339">339: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
+<a name="line340">340: </a>    PetscObjectSetName((PetscObject)vnew,str);
+<a name="line341">341: </a>  }
+<a name="line342">342: </a>  <font color="#4169E1">if</font> (copy) {
+<a name="line343">343: </a>    VecGetArray(ctx->v,&pv);
+<a name="line344">344: </a>    VecGetArray(vnew,&pnew);
+<a name="line345">345: </a>    PetscMemcpy(pnew,pv,PetscMin(m,bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line346">346: </a>    VecRestoreArray(ctx->v,&pv);
+<a name="line347">347: </a>    VecRestoreArray(vnew,&pnew);
+<a name="line348">348: </a>  }
+<a name="line349">349: </a>  VecDestroy(&ctx->v);
+<a name="line350">350: </a>  ctx->v = vnew;
+<a name="line351">351: </a>  <font color="#4169E1">return</font>(0);
+<a name="line352">352: </a>}
+
+<a name="line356">356: </a><strong><font color="#4169E1"><a name="BVGetColumn_Svec"></a>PetscErrorCode BVGetColumn_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line357">357: </a>{
+<a name="line359">359: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+<a name="line360">360: </a>  PetscScalar    *pv;
+<a name="line361">361: </a>  PetscInt       l;
+
+<a name="line364">364: </a>  l = BVAvailableVec;
+<a name="line365">365: </a>  VecGetArray(ctx->v,&pv);
+<a name="line366">366: </a>  VecPlaceArray(bv->cv[l],pv+(bv->nc+j)*bv->n);
+<a name="line367">367: </a>  <font color="#4169E1">return</font>(0);
+<a name="line368">368: </a>}
+
+<a name="line372">372: </a><strong><font color="#4169E1"><a name="BVRestoreColumn_Svec"></a>PetscErrorCode BVRestoreColumn_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line373">373: </a>{
+<a name="line375">375: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+<a name="line376">376: </a>  PetscInt       l;
+
+<a name="line379">379: </a>  l = (j==bv->ci[0])? 0: 1;
+<a name="line380">380: </a>  VecResetArray(bv->cv[l]);
+<a name="line381">381: </a>  VecRestoreArray(ctx->v,NULL);
+<a name="line382">382: </a>  <font color="#4169E1">return</font>(0);
+<a name="line383">383: </a>}
+
+<a name="line387">387: </a><strong><font color="#4169E1"><a name="BVGetArray_Svec"></a>PetscErrorCode BVGetArray_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line388">388: </a>{
+<a name="line390">390: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+<a name="line393">393: </a>  VecGetArray(ctx->v,a);
+<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
+<a name="line395">395: </a>}
+
+<a name="line399">399: </a><strong><font color="#4169E1"><a name="BVRestoreArray_Svec"></a>PetscErrorCode BVRestoreArray_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line400">400: </a>{
+<a name="line402">402: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+<a name="line405">405: </a>  VecRestoreArray(ctx->v,a);
+<a name="line406">406: </a>  <font color="#4169E1">return</font>(0);
+<a name="line407">407: </a>}
+
+<a name="line411">411: </a><strong><font color="#4169E1"><a name="BVGetArrayRead_Svec"></a>PetscErrorCode BVGetArrayRead_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line412">412: </a>{
+<a name="line414">414: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+<a name="line417">417: </a>  VecGetArrayRead(ctx->v,a);
+<a name="line418">418: </a>  <font color="#4169E1">return</font>(0);
+<a name="line419">419: </a>}
+
+<a name="line423">423: </a><strong><font color="#4169E1"><a name="BVRestoreArrayRead_Svec"></a>PetscErrorCode BVRestoreArrayRead_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line424">424: </a>{
+<a name="line426">426: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+<a name="line429">429: </a>  VecRestoreArrayRead(ctx->v,a);
+<a name="line430">430: </a>  <font color="#4169E1">return</font>(0);
+<a name="line431">431: </a>}
+
+<a name="line435">435: </a><strong><font color="#4169E1"><a name="BVView_Svec"></a>PetscErrorCode BVView_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
+<a name="line436">436: </a>{
+<a name="line437">437: </a>  PetscErrorCode    ierr;
+<a name="line438">438: </a>  BV_SVEC           *ctx = (BV_SVEC*)bv->data;
+<a name="line439">439: </a>  PetscViewerFormat format;
+<a name="line440">440: </a>  PetscBool         isascii;
+<a name="line441">441: </a>  const char        *bvname,*name;
+
+<a name="line444">444: </a>  VecView(ctx->v,viewer);
+<a name="line445">445: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line446">446: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line447">447: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line448">448: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
+<a name="line449">449: </a>      PetscObjectGetName((PetscObject)bv,&bvname);
+<a name="line450">450: </a>      PetscObjectGetName((PetscObject)ctx->v,&name);
+<a name="line451">451: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=reshape(%s,%D,%D);clear %s\n"</font>,bvname,name,bv->N,bv->nc+bv->m,name);
+<a name="line452">452: </a>      <font color="#4169E1">if</font> (bv->nc) {
+<a name="line453">453: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=%s(:,%D:end);\n"</font>,bvname,bvname,bv->nc+1);
+<a name="line454">454: </a>      }
+<a name="line455">455: </a>    }
+<a name="line456">456: </a>  }
+<a name="line457">457: </a>  <font color="#4169E1">return</font>(0);
+<a name="line458">458: </a>}
+
+<a name="line462">462: </a><strong><font color="#4169E1"><a name="BVDestroy_Svec"></a>PetscErrorCode BVDestroy_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line463">463: </a>{
+<a name="line465">465: </a>  BV_SVEC        *ctx = (BV_SVEC*)bv->data;
+
+<a name="line468">468: </a>  VecDestroy(&ctx->v);
+<a name="line469">469: </a>  VecDestroy(&bv->cv[0]);
+<a name="line470">470: </a>  VecDestroy(&bv->cv[1]);
+<a name="line471">471: </a>  PetscFree(bv->data);
+<a name="line472">472: </a>  <font color="#4169E1">return</font>(0);
+<a name="line473">473: </a>}
+
+<a name="line477">477: </a><strong><font color="#4169E1"><a name="BVCreate_Svec"></a>PETSC_EXTERN PetscErrorCode BVCreate_Svec(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line478">478: </a>{
+<a name="line480">480: </a>  BV_SVEC        *ctx;
+<a name="line481">481: </a>  PetscInt       nloc,bs;
+<a name="line482">482: </a>  PetscBool      seq;
+<a name="line483">483: </a>  char           str[50];
+
+<a name="line486">486: </a>  PetscNewLog(bv,&ctx);
+<a name="line487">487: </a>  bv->data = (void*)ctx;
+
+<a name="line489">489: </a>  PetscObjectTypeCompare((PetscObject)bv->t,VECMPI,&ctx->mpi);
+<a name="line490">490: </a>  <font color="#4169E1">if</font> (!ctx->mpi) {
+<a name="line491">491: </a>    PetscObjectTypeCompare((PetscObject)bv->t,VECSEQ,&seq);
+<a name="line492">492: </a>    <font color="#4169E1">if</font> (!seq) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot create a BVSVEC from a non-standard template vector"</font>);
+<a name="line493">493: </a>  }
+
+<a name="line495">495: </a>  VecGetLocalSize(bv->t,&nloc);
+<a name="line496">496: </a>  VecGetBlockSize(bv->t,&bs);
+
+<a name="line498">498: </a>  VecCreate(PetscObjectComm((PetscObject)bv->t),&ctx->v);
+<a name="line499">499: </a>  VecSetType(ctx->v,((PetscObject)bv->t)->type_name);
+<a name="line500">500: </a>  VecSetSizes(ctx->v,bv->m*nloc,PETSC_DECIDE);
+<a name="line501">501: </a>  VecSetBlockSize(ctx->v,bs);
+<a name="line502">502: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)ctx->v);
+<a name="line503">503: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line504">504: </a>    PetscSNPrintf(str,50,<font color="#666666">"%s_0"</font>,((PetscObject)bv)->name);
+<a name="line505">505: </a>    PetscObjectSetName((PetscObject)ctx->v,str);
+<a name="line506">506: </a>  }
+
+<a name="line508">508: </a>  <font color="#4169E1">if</font> (ctx->mpi) {
+<a name="line509">509: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[0]);
+<a name="line510">510: </a>    VecCreateMPIWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,PETSC_DECIDE,NULL,&bv->cv[1]);
+<a name="line511">511: </a>  } <font color="#4169E1">else</font> {
+<a name="line512">512: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[0]);
+<a name="line513">513: </a>    VecCreateSeqWithArray(PetscObjectComm((PetscObject)bv->t),bs,nloc,NULL,&bv->cv[1]);
+<a name="line514">514: </a>  }
+
+<a name="line516">516: </a>  bv->ops->mult             = BVMult_Svec;
+<a name="line517">517: </a>  bv->ops->multvec          = BVMultVec_Svec;
+<a name="line518">518: </a>  bv->ops->multinplace      = BVMultInPlace_Svec;
+<a name="line519">519: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Svec;
+<a name="line520">520: </a>  bv->ops->dot              = BVDot_Svec;
+<a name="line521">521: </a>  bv->ops->dotvec           = BVDotVec_Svec;
+<a name="line522">522: </a>  bv->ops->dotvec_local     = BVDotVec_Local_Svec;
+<a name="line523">523: </a>  bv->ops->scale            = BVScale_Svec;
+<a name="line524">524: </a>  bv->ops->norm             = BVNorm_Svec;
+<a name="line525">525: </a>  bv->ops->norm_local       = BVNorm_Local_Svec;
+<a name="line526">526: </a>  <font color="#B22222">/*bv->ops->orthogonalize    = BVOrthogonalize_Svec;*/</font>
+<a name="line527">527: </a>  bv->ops->matmult          = BVMatMult_Svec;
+<a name="line528">528: </a>  bv->ops->copy             = BVCopy_Svec;
+<a name="line529">529: </a>  bv->ops->resize           = BVResize_Svec;
+<a name="line530">530: </a>  bv->ops->getcolumn        = BVGetColumn_Svec;
+<a name="line531">531: </a>  bv->ops->restorecolumn    = BVRestoreColumn_Svec;
+<a name="line532">532: </a>  bv->ops->getarray         = BVGetArray_Svec;
+<a name="line533">533: </a>  bv->ops->restorearray     = BVRestoreArray_Svec;
+<a name="line534">534: </a>  bv->ops->getarrayread     = BVGetArrayRead_Svec;
+<a name="line535">535: </a>  bv->ops->restorearrayread = BVRestoreArrayRead_Svec;
+<a name="line536">536: </a>  bv->ops->destroy          = BVDestroy_Svec;
+<a name="line537">537: </a>  <font color="#4169E1">if</font> (!ctx->mpi) bv->ops->view = BVView_Svec;
+<a name="line538">538: </a>  <font color="#4169E1">return</font>(0);
+<a name="line539">539: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/impls/vecs/index.html b/src/sys/classes/bv/impls/vecs/index.html
index 6a4499e..92cab9e 100644
--- a/src/sys/classes/bv/impls/vecs/index.html
+++ b/src/sys/classes/bv/impls/vecs/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/vecs/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/vecs/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/impls/vecs/makefile b/src/sys/classes/bv/impls/vecs/makefile
index 14cba2c..47648ee 100644
--- a/src/sys/classes/bv/impls/vecs/makefile
+++ b/src/sys/classes/bv/impls/vecs/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/impls/vecs/makefile.html b/src/sys/classes/bv/impls/vecs/makefile.html
index 54cd1e0..84c0fed 100644
--- a/src/sys/classes/bv/impls/vecs/makefile.html
+++ b/src/sys/classes/bv/impls/vecs/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/vecs/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:28+00:00">
+<meta name="date" content="2016-05-16T10:32:22+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/vecs/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/vecs/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/impls/vecs/vecs.c b/src/sys/classes/bv/impls/vecs/vecs.c
index 64c4b51..cf89fe7 100644
--- a/src/sys/classes/bv/impls/vecs/vecs.c
+++ b/src/sys/classes/bv/impls/vecs/vecs.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,20 +40,27 @@ PetscErrorCode BVMult_Vecs(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)
   PetscInt       i,j,ldq;
 
   PetscFunctionBegin;
-  ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
-  if (alpha!=1.0) {
-    ierr = BVAllocateWork_Private(Y,X->k-X->l);CHKERRQ(ierr);
-    s = Y->work;
-  }
-  ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
-  for (j=Y->l;j<Y->k;j++) {
-    ierr = VecScale(y->V[Y->nc+j],beta);CHKERRQ(ierr);
+  if (Q) {
+    ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
     if (alpha!=1.0) {
-      for (i=X->l;i<X->k;i++) s[i-X->l] = alpha*q[i+j*ldq];
-    } else s = q+j*ldq+X->l;
-    ierr = VecMAXPY(y->V[Y->nc+j],X->k-X->l,s,x->V+X->nc+X->l);CHKERRQ(ierr);
+      ierr = BVAllocateWork_Private(Y,X->k-X->l);CHKERRQ(ierr);
+      s = Y->work;
+    }
+    ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
+    for (j=Y->l;j<Y->k;j++) {
+      ierr = VecScale(y->V[Y->nc+j],beta);CHKERRQ(ierr);
+      if (alpha!=1.0) {
+        for (i=X->l;i<X->k;i++) s[i-X->l] = alpha*q[i+j*ldq];
+      } else s = q+j*ldq+X->l;
+      ierr = VecMAXPY(y->V[Y->nc+j],X->k-X->l,s,x->V+X->nc+X->l);CHKERRQ(ierr);
+    }
+    ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
+  } else {
+    for (j=0;j<Y->k-Y->l;j++) {
+      ierr = VecScale(y->V[Y->nc+Y->l+j],beta);CHKERRQ(ierr);
+      ierr = VecAXPY(y->V[Y->nc+Y->l+j],alpha,x->V[X->nc+X->l+j]);CHKERRQ(ierr);
+    }
   }
-  ierr = MatDenseRestoreArray(Q,&q);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -101,7 +108,7 @@ PetscErrorCode BVMultInPlace_Vecs_ME(BV V,Mat Q,PetscInt s,PetscInt e)
   ierr = MatGetSize(Q,&ldq,NULL);CHKERRQ(ierr);
   ierr = MatDenseGetArray(Q,&q);CHKERRQ(ierr);
   /* V2 := V2*Q2 */
-  ierr = BVMultInPlace_Vecs_Private(V,V->n,e-s,V->k,ctx->V+V->nc+s,q+s*ldq+s,PETSC_FALSE);CHKERRQ(ierr);
+  ierr = BVMultInPlace_Vecs_Private(V,V->n,e-s,ldq,ctx->V+V->nc+s,q+s*ldq+s,PETSC_FALSE);CHKERRQ(ierr);
   /* V2 += V1*Q1 + V3*Q3 */
   for (i=s;i<e;i++) {
     if (s>V->l) {
@@ -176,21 +183,6 @@ PetscErrorCode BVMultInPlaceTranspose_Vecs(BV V,Mat Q,PetscInt s,PetscInt e)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "BVAXPY_Vecs"
-PetscErrorCode BVAXPY_Vecs(BV Y,PetscScalar alpha,BV X)
-{
-  PetscErrorCode ierr;
-  BV_VECS        *y = (BV_VECS*)Y->data,*x = (BV_VECS*)X->data;
-  PetscInt       j;
-
-  PetscFunctionBegin;
-  for (j=0;j<Y->k-Y->l;j++) {
-    ierr = VecAXPY(y->V[Y->nc+Y->l+j],alpha,x->V[X->nc+X->l+j]);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
 #define __FUNCT__ "BVDot_Vecs"
 PetscErrorCode BVDot_Vecs(BV X,BV Y,Mat M)
 {
@@ -453,8 +445,38 @@ PetscErrorCode BVRestoreArray_Vecs(BV bv,PetscScalar **a)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVGetArrayRead_Vecs"
+PetscErrorCode BVGetArrayRead_Vecs(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode    ierr;
+  BV_VECS           *ctx = (BV_VECS*)bv->data;
+  PetscInt          j;
+  const PetscScalar *p;
+
+  PetscFunctionBegin;
+  ierr = PetscMalloc((bv->nc+bv->m)*bv->n*sizeof(PetscScalar),a);CHKERRQ(ierr);
+  for (j=0;j<bv->nc+bv->m;j++) {
+    ierr = VecGetArrayRead(ctx->V[j],&p);CHKERRQ(ierr);
+    ierr = PetscMemcpy((PetscScalar**)*a+j*bv->n,p,bv->n*sizeof(PetscScalar));CHKERRQ(ierr);
+    ierr = VecRestoreArrayRead(ctx->V[j],&p);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "BVRestoreArrayRead_Vecs"
+PetscErrorCode BVRestoreArrayRead_Vecs(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscFree(*a);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVSetFromOptions_Vecs"
-PetscErrorCode BVSetFromOptions_Vecs(PetscOptions *PetscOptionsObject,BV bv)
+PetscErrorCode BVSetFromOptions_Vecs(PetscOptionItems *PetscOptionsObject,BV bv)
 {
   PetscErrorCode ierr;
   BV_VECS        *ctx = (BV_VECS*)bv->data;
@@ -512,6 +534,35 @@ PetscErrorCode BVDestroy_Vecs(BV bv)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVVecsSetVmip"
+/*
+   Sets the value of vmip flag and resets ops->multinplace accordingly
+ */
+PETSC_STATIC_INLINE PetscErrorCode BVVecsSetVmip(BV bv,PetscInt vmip)
+{
+  typedef PetscErrorCode (*fmultinplace)(BV,Mat,PetscInt,PetscInt);
+  fmultinplace multinplace[2] = {BVMultInPlace_Vecs_ME, BVMultInPlace_Vecs_Alloc};
+  BV_VECS      *ctx = (BV_VECS*)bv->data;
+
+  PetscFunctionBegin;
+  ctx->vmip            = vmip;
+  bv->ops->multinplace = multinplace[vmip];
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "BVDuplicate_Vecs"
+PetscErrorCode BVDuplicate_Vecs(BV V,BV *W)
+{
+  PetscErrorCode ierr;
+  BV_VECS        *ctx = (BV_VECS*)V->data;
+
+  PetscFunctionBegin;
+  ierr = BVVecsSetVmip(*W,ctx->vmip);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVCreate_Vecs"
 PETSC_EXTERN PetscErrorCode BVCreate_Vecs(BV bv)
 {
@@ -520,8 +571,6 @@ PETSC_EXTERN PetscErrorCode BVCreate_Vecs(BV bv)
   PetscInt       j;
   PetscBool      iscusp;
   char           str[50];
-  typedef PetscErrorCode (*fmultinplace)(BV,Mat,PetscInt,PetscInt);
-  fmultinplace   multinplace[2] = {BVMultInPlace_Vecs_ME, BVMultInPlace_Vecs_Alloc};
 
   PetscFunctionBegin;
   ierr = PetscNewLog(bv,&ctx);CHKERRQ(ierr);
@@ -546,12 +595,11 @@ PETSC_EXTERN PetscErrorCode BVCreate_Vecs(BV bv)
     ierr = BVSetFromOptions_Vecs(PetscOptionsObject,bv);CHKERRQ(ierr);
     ierr = PetscOptionsEnd();CHKERRQ(ierr);
   }
+  ierr = BVVecsSetVmip(bv,ctx->vmip);CHKERRQ(ierr);
 
   bv->ops->mult             = BVMult_Vecs;
   bv->ops->multvec          = BVMultVec_Vecs;
-  bv->ops->multinplace      = multinplace[ctx->vmip];
   bv->ops->multinplacetrans = BVMultInPlaceTranspose_Vecs;
-  bv->ops->axpy             = BVAXPY_Vecs;
   bv->ops->dot              = BVDot_Vecs;
   bv->ops->dotvec           = BVDotVec_Vecs;
   bv->ops->dotvec_begin     = BVDotVec_Begin_Vecs;
@@ -566,7 +614,10 @@ PETSC_EXTERN PetscErrorCode BVCreate_Vecs(BV bv)
   bv->ops->getcolumn        = BVGetColumn_Vecs;
   bv->ops->getarray         = BVGetArray_Vecs;
   bv->ops->restorearray     = BVRestoreArray_Vecs;
+  bv->ops->getarrayread     = BVGetArrayRead_Vecs;
+  bv->ops->restorearrayread = BVRestoreArrayRead_Vecs;
   bv->ops->destroy          = BVDestroy_Vecs;
+  bv->ops->duplicate        = BVDuplicate_Vecs;
   bv->ops->setfromoptions   = BVSetFromOptions_Vecs;
   bv->ops->view             = BVView_Vecs;
   PetscFunctionReturn(0);
diff --git a/src/sys/classes/bv/impls/vecs/vecs.c.html b/src/sys/classes/bv/impls/vecs/vecs.c.html
index a2c03eb..443765c 100644
--- a/src/sys/classes/bv/impls/vecs/vecs.c.html
+++ b/src/sys/classes/bv/impls/vecs/vecs.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/impls/vecs/vecs.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:27+00:00">
+<meta name="date" content="2016-05-16T10:32:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/impls/vecs/vecs.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/impls/vecs/vecs.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> implemented as an array of independent Vecs</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,448 +48,489 @@
 <a name="line39"> 39: </a>  PetscScalar    *q,*s=NULL;
 <a name="line40"> 40: </a>  PetscInt       i,j,ldq;
 
-<a name="line43"> 43: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line44"> 44: </a>  <font color="#4169E1">if</font> (alpha!=1.0) {
-<a name="line45"> 45: </a>    BVAllocateWork_Private(Y,X->k-X->l);
-<a name="line46"> 46: </a>    s = Y->work;
-<a name="line47"> 47: </a>  }
-<a name="line48"> 48: </a>  MatDenseGetArray(Q,&q);
-<a name="line49"> 49: </a>  <font color="#4169E1">for</font> (j=Y->l;j<Y->k;j++) {
-<a name="line50"> 50: </a>    VecScale(y->V[Y->nc+j],beta);
-<a name="line51"> 51: </a>    <font color="#4169E1">if</font> (alpha!=1.0) {
-<a name="line52"> 52: </a>      <font color="#4169E1">for</font> (i=X->l;i<X->k;i++) s[i-X->l] = alpha*q[i+j*ldq];
-<a name="line53"> 53: </a>    } <font color="#4169E1">else</font> s = q+j*ldq+X->l;
-<a name="line54"> 54: </a>    VecMAXPY(y->V[Y->nc+j],X->k-X->l,s,x->V+X->nc+X->l);
-<a name="line55"> 55: </a>  }
-<a name="line56"> 56: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line57"> 57: </a>  <font color="#4169E1">return</font>(0);
-<a name="line58"> 58: </a>}
-
-<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="BVMultVec_Vecs"></a>PetscErrorCode BVMultVec_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
-<a name="line63"> 63: </a>{
-<a name="line65"> 65: </a>  BV_VECS        *x = (BV_VECS*)X->data;
-<a name="line66"> 66: </a>  PetscScalar    *s=NULL;
-<a name="line67"> 67: </a>  PetscInt       i;
-
-<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (alpha!=1.0) {
-<a name="line71"> 71: </a>    BVAllocateWork_Private(X,X->k-X->l);
-<a name="line72"> 72: </a>    s = X->work;
-<a name="line73"> 73: </a>  }
-<a name="line74"> 74: </a>  VecScale(y,beta);
-<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (alpha!=1.0) {
-<a name="line76"> 76: </a>    <font color="#4169E1">for</font> (i=0;i<X->k-X->l;i++) s[i] = alpha*q[i];
-<a name="line77"> 77: </a>  } <font color="#4169E1">else</font> s = q;
-<a name="line78"> 78: </a>  VecMAXPY(y,X->k-X->l,s,x->V+X->nc+X->l);
-<a name="line79"> 79: </a>  <font color="#4169E1">return</font>(0);
-<a name="line80"> 80: </a>}
-
-<a name="line84"> 84: </a><font color="#B22222">/*</font>
-<a name="line85"> 85: </a><font color="#B22222">   BVMultInPlace_Vecs_ME - V(:,s:e-1) = V*Q(:,s:e-1) for regular vectors.</font>
-
-<a name="line87"> 87: </a><font color="#B22222">   Memory-efficient version, uses VecGetArray (default in CPU)</font>
-
-<a name="line89"> 89: </a><font color="#B22222">   Writing V = [ V1 V2 V3 ] and Q(:,s:e-1) = [ Q1 Q2 Q3 ]', where V2</font>
-<a name="line90"> 90: </a><font color="#B22222">   corresponds to the columns s:e-1, the computation is done as</font>
-<a name="line91"> 91: </a><font color="#B22222">                  V2 := V2*Q2 + V1*Q1 + V3*Q3</font>
-<a name="line92"> 92: </a><font color="#B22222">*/</font>
-<a name="line93"> 93: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Vecs_ME"></a>PetscErrorCode BVMultInPlace_Vecs_ME(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line94"> 94: </a>{
-<a name="line96"> 96: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
-<a name="line97"> 97: </a>  PetscScalar    *q;
-<a name="line98"> 98: </a>  PetscInt       i,ldq;
-
-<a name="line101">101: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line102">102: </a>  MatDenseGetArray(Q,&q);
-<a name="line103">103: </a>  <font color="#B22222">/* V2 := V2*Q2 */</font>
-<a name="line104">104: </a>  BVMultInPlace_Vecs_Private(V,V->n,e-s,V->k,ctx->V+V->nc+s,q+s*ldq+s,PETSC_FALSE);
-<a name="line105">105: </a>  <font color="#B22222">/* V2 += V1*Q1 + V3*Q3 */</font>
-<a name="line106">106: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
-<a name="line107">107: </a>    <font color="#4169E1">if</font> (s>V->l) {
-<a name="line108">108: </a>      VecMAXPY(ctx->V[V->nc+i],s-V->l,q+i*ldq+V->l,ctx->V+V->nc+V->l);
-<a name="line109">109: </a>    }
-<a name="line110">110: </a>    <font color="#4169E1">if</font> (V->k>e) {
-<a name="line111">111: </a>      VecMAXPY(ctx->V[V->nc+i],V->k-e,q+i*ldq+e,ctx->V+V->nc+e);
-<a name="line112">112: </a>    }
-<a name="line113">113: </a>  }
-<a name="line114">114: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line115">115: </a>  <font color="#4169E1">return</font>(0);
-<a name="line116">116: </a>}
-
-<a name="line120">120: </a><font color="#B22222">/*</font>
-<a name="line121">121: </a><font color="#B22222">   BVMultInPlace_Vecs_Alloc - V(:,s:e-1) = V*Q(:,s:e-1) for regular vectors.</font>
-
-<a name="line123">123: </a><font color="#B22222">   Version that allocates (e-s) work vectors in every call (default in GPU)</font>
-<a name="line124">124: </a><font color="#B22222">*/</font>
-<a name="line125">125: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Vecs_Alloc"></a>PetscErrorCode BVMultInPlace_Vecs_Alloc(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line126">126: </a>{
-<a name="line128">128: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
-<a name="line129">129: </a>  PetscScalar    *q;
-<a name="line130">130: </a>  PetscInt       i,ldq;
-<a name="line131">131: </a>  Vec            *W;
-
-<a name="line134">134: </a>  MatGetSize(Q,&ldq,NULL);
-<a name="line135">135: </a>  MatDenseGetArray(Q,&q);
-<a name="line136">136: </a>  VecDuplicateVecs(V->t,e-s,&W);
-<a name="line137">137: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
-<a name="line138">138: </a>    VecMAXPY(W[i-s],V->k-V->l,q+i*ldq+V->l,ctx->V+V->nc+V->l);
-<a name="line139">139: </a>  }
-<a name="line140">140: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
-<a name="line141">141: </a>    VecCopy(W[i-s],ctx->V[V->nc+i]);
-<a name="line142">142: </a>  }
-<a name="line143">143: </a>  VecDestroyVecs(e-s,&W);
-<a name="line144">144: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line145">145: </a>  <font color="#4169E1">return</font>(0);
-<a name="line146">146: </a>}
-
-<a name="line150">150: </a><font color="#B22222">/*</font>
-<a name="line151">151: </a><font color="#B22222">   BVMultInPlaceTranspose_Vecs - V(:,s:e-1) = V*Q'(:,s:e-1) for regular vectors.</font>
-<a name="line152">152: </a><font color="#B22222">*/</font>
-<a name="line153">153: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Vecs"></a>PetscErrorCode BVMultInPlaceTranspose_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line154">154: </a>{
-<a name="line156">156: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
-<a name="line157">157: </a>  PetscScalar    *q;
-<a name="line158">158: </a>  PetscInt       i,j,ldq,n;
-
-<a name="line161">161: </a>  MatGetSize(Q,&ldq,&n);
-<a name="line162">162: </a>  MatDenseGetArray(Q,&q);
-<a name="line163">163: </a>  <font color="#B22222">/* V2 := V2*Q2' */</font>
-<a name="line164">164: </a>  BVMultInPlace_Vecs_Private(V,V->n,e-s,ldq,ctx->V+V->nc+s,q+s*ldq+s,PETSC_TRUE);
-<a name="line165">165: </a>  <font color="#B22222">/* V2 += V1*Q1' + V3*Q3' */</font>
-<a name="line166">166: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
-<a name="line167">167: </a>    <font color="#4169E1">for</font> (j=V->l;j<s;j++) {
-<a name="line168">168: </a>      VecAXPY(ctx->V[V->nc+i],q[i+j*ldq],ctx->V[V->nc+j]);
-<a name="line169">169: </a>    }
-<a name="line170">170: </a>    <font color="#4169E1">for</font> (j=e;j<n;j++) {
-<a name="line171">171: </a>      VecAXPY(ctx->V[V->nc+i],q[i+j*ldq],ctx->V[V->nc+j]);
-<a name="line172">172: </a>    }
-<a name="line173">173: </a>  }
-<a name="line174">174: </a>  MatDenseRestoreArray(Q,&q);
-<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
-<a name="line176">176: </a>}
-
-<a name="line180">180: </a><strong><font color="#4169E1"><a name="BVAXPY_Vecs"></a>PetscErrorCode BVAXPY_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X)</font></strong>
-<a name="line181">181: </a>{
-<a name="line183">183: </a>  BV_VECS        *y = (BV_VECS*)Y->data,*x = (BV_VECS*)X->data;
-<a name="line184">184: </a>  PetscInt       j;
-
-<a name="line187">187: </a>  <font color="#4169E1">for</font> (j=0;j<Y->k-Y->l;j++) {
-<a name="line188">188: </a>    VecAXPY(y->V[Y->nc+Y->l+j],alpha,x->V[X->nc+X->l+j]);
-<a name="line189">189: </a>  }
-<a name="line190">190: </a>  <font color="#4169E1">return</font>(0);
-<a name="line191">191: </a>}
-
-<a name="line195">195: </a><strong><font color="#4169E1"><a name="BVDot_Vecs"></a>PetscErrorCode BVDot_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
-<a name="line196">196: </a>{
-<a name="line198">198: </a>  BV_VECS        *x = (BV_VECS*)X->data,*y = (BV_VECS*)Y->data;
-<a name="line199">199: </a>  PetscScalar    *m;
-<a name="line200">200: </a>  PetscInt       j,ldm;
-
-<a name="line203">203: </a>  MatGetSize(M,&ldm,NULL);
-<a name="line204">204: </a>  MatDenseGetArray(M,&m);
-<a name="line205">205: </a>  <font color="#4169E1">for</font> (j=X->l;j<X->k;j++) {
-<a name="line206">206: </a>    VecMDot(x->V[X->nc+j],Y->k-Y->l,y->V+Y->nc+Y->l,m+j*ldm+Y->l);
-<a name="line207">207: </a>  }
-<a name="line208">208: </a>  MatDenseRestoreArray(M,&m);
-<a name="line209">209: </a>  <font color="#4169E1">return</font>(0);
-<a name="line210">210: </a>}
-
-<a name="line214">214: </a><strong><font color="#4169E1"><a name="BVDotVec_Vecs"></a>PetscErrorCode BVDotVec_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line215">215: </a>{
-<a name="line217">217: </a>  BV_VECS        *x = (BV_VECS*)X->data;
-<a name="line218">218: </a>  Vec            z = y;
-
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line222">222: </a>    BV_IPMatMult(X,y);
-<a name="line223">223: </a>    z = X->Bx;
-<a name="line224">224: </a>  }
-<a name="line225">225: </a>  VecMDot(z,X->k-X->l,x->V+X->nc+X->l,m);
-<a name="line226">226: </a>  <font color="#4169E1">return</font>(0);
-<a name="line227">227: </a>}
-
-<a name="line231">231: </a><strong><font color="#4169E1"><a name="BVDotVec_Begin_Vecs"></a>PetscErrorCode BVDotVec_Begin_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line232">232: </a>{
-<a name="line234">234: </a>  BV_VECS        *x = (BV_VECS*)X->data;
-<a name="line235">235: </a>  Vec            z = y;
-
-<a name="line238">238: </a>  <font color="#4169E1">if</font> (X->matrix) {
-<a name="line239">239: </a>    BV_IPMatMult(X,y);
-<a name="line240">240: </a>    z = X->Bx;
-<a name="line241">241: </a>  }
-<a name="line242">242: </a>  VecMDotBegin(z,X->k-X->l,x->V+X->nc+X->l,m);
-<a name="line243">243: </a>  <font color="#4169E1">return</font>(0);
-<a name="line244">244: </a>}
-
-<a name="line248">248: </a><strong><font color="#4169E1"><a name="BVDotVec_End_Vecs"></a>PetscErrorCode BVDotVec_End_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line249">249: </a>{
-<a name="line251">251: </a>  BV_VECS        *x = (BV_VECS*)X->data;
-
-<a name="line254">254: </a>  VecMDotEnd(y,X->k-X->l,x->V+X->nc+X->l,m);
-<a name="line255">255: </a>  <font color="#4169E1">return</font>(0);
-<a name="line256">256: </a>}
-
-<a name="line260">260: </a><strong><font color="#4169E1"><a name="BVScale_Vecs"></a>PetscErrorCode BVScale_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
-<a name="line261">261: </a>{
-<a name="line263">263: </a>  PetscInt       i;
-<a name="line264">264: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-
-<a name="line267">267: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line268">268: </a>    <font color="#4169E1">for</font> (i=bv->l;i<bv->k;i++) {
-<a name="line269">269: </a>      VecScale(ctx->V[bv->nc+i],alpha);
-<a name="line270">270: </a>    }
-<a name="line271">271: </a>  } <font color="#4169E1">else</font> {
-<a name="line272">272: </a>    VecScale(ctx->V[bv->nc+j],alpha);
-<a name="line273">273: </a>  }
-<a name="line274">274: </a>  <font color="#4169E1">return</font>(0);
-<a name="line275">275: </a>}
-
-<a name="line279">279: </a><strong><font color="#4169E1"><a name="BVNorm_Vecs"></a>PetscErrorCode BVNorm_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line280">280: </a>{
-<a name="line282">282: </a>  PetscInt       i;
-<a name="line283">283: </a>  PetscReal      nrm;
-<a name="line284">284: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-
-<a name="line287">287: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line288">288: </a>    <font color="#4169E1">switch</font> (type) {
-<a name="line289">289: </a>    <font color="#4169E1">case</font> NORM_FROBENIUS:
-<a name="line290">290: </a>      *val = 0.0;
-<a name="line291">291: </a>      <font color="#4169E1">for</font> (i=bv->l;i<bv->k;i++) {
-<a name="line292">292: </a>        VecNorm(ctx->V[bv->nc+i],NORM_2,&nrm);
-<a name="line293">293: </a>        *val += nrm*nrm;
-<a name="line294">294: </a>      }
-<a name="line295">295: </a>      *val = PetscSqrtReal(*val);
-<a name="line296">296: </a>      <font color="#4169E1">break</font>;
-<a name="line297">297: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line298">298: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Requested norm not implemented in BVVECS"</font>);
-<a name="line299">299: </a>    }
-<a name="line300">300: </a>  } <font color="#4169E1">else</font> {
-<a name="line301">301: </a>    VecNorm(ctx->V[bv->nc+j],type,val);
-<a name="line302">302: </a>  }
-<a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
-<a name="line304">304: </a>}
-
-<a name="line308">308: </a><strong><font color="#4169E1"><a name="BVNorm_Begin_Vecs"></a>PetscErrorCode BVNorm_Begin_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line309">309: </a>{
-<a name="line311">311: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-
-<a name="line314">314: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line315">315: </a>    <font color="#4169E1">switch</font> (type) {
-<a name="line316">316: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line317">317: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Requested norm not implemented in BVVECS"</font>);
-<a name="line318">318: </a>    }
-<a name="line319">319: </a>  } <font color="#4169E1">else</font> {
-<a name="line320">320: </a>    VecNormBegin(ctx->V[bv->nc+j],type,val);
-<a name="line321">321: </a>  }
-<a name="line322">322: </a>  <font color="#4169E1">return</font>(0);
-<a name="line323">323: </a>}
-
-<a name="line327">327: </a><strong><font color="#4169E1"><a name="BVNorm_End_Vecs"></a>PetscErrorCode BVNorm_End_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line328">328: </a>{
-<a name="line330">330: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-
-<a name="line333">333: </a>  <font color="#4169E1">if</font> (j<0) {
-<a name="line334">334: </a>    <font color="#4169E1">switch</font> (type) {
-<a name="line335">335: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line336">336: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Requested norm not implemented in BVVECS"</font>);
-<a name="line337">337: </a>    }
-<a name="line338">338: </a>  } <font color="#4169E1">else</font> {
-<a name="line339">339: </a>    VecNormEnd(ctx->V[bv->nc+j],type,val);
-<a name="line340">340: </a>  }
-<a name="line341">341: </a>  <font color="#4169E1">return</font>(0);
-<a name="line342">342: </a>}
-
-<a name="line346">346: </a><strong><font color="#4169E1"><a name="BVMatMult_Vecs"></a>PetscErrorCode BVMatMult_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line347">347: </a>{
-<a name="line349">349: </a>  BV_VECS        *v = (BV_VECS*)V->data,*w = (BV_VECS*)W->data;
-<a name="line350">350: </a>  PetscInt       j;
-
-<a name="line353">353: </a>  <font color="#4169E1">if</font> (V->vmm) { PetscInfo(V,<font color="#666666">"BVMatMult_Vecs: ignoring method\n"</font>); }
-<a name="line354">354: </a>  <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
-<a name="line355">355: </a>    MatMult(A,v->V[V->nc+V->l+j],w->V[W->nc+W->l+j]);
-<a name="line356">356: </a>  }
-<a name="line357">357: </a>  <font color="#4169E1">return</font>(0);
-<a name="line358">358: </a>}
-
-<a name="line362">362: </a><strong><font color="#4169E1"><a name="BVCopy_Vecs"></a>PetscErrorCode BVCopy_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line363">363: </a>{
-<a name="line365">365: </a>  BV_VECS        *v = (BV_VECS*)V->data,*w = (BV_VECS*)W->data;
-<a name="line366">366: </a>  PetscInt       j;
-
-<a name="line369">369: </a>  <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
-<a name="line370">370: </a>    VecCopy(v->V[V->nc+V->l+j],w->V[W->nc+W->l+j]);
-<a name="line371">371: </a>  }
-<a name="line372">372: </a>  <font color="#4169E1">return</font>(0);
-<a name="line373">373: </a>}
-
-<a name="line377">377: </a><strong><font color="#4169E1"><a name="BVResize_Vecs"></a>PetscErrorCode BVResize_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
-<a name="line378">378: </a>{
-<a name="line380">380: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-<a name="line381">381: </a>  Vec            *newV;
-<a name="line382">382: </a>  PetscInt       j;
-<a name="line383">383: </a>  char           str[50];
-
-<a name="line386">386: </a>  VecDuplicateVecs(bv->t,m,&newV);
-<a name="line387">387: </a>  PetscLogObjectParents(bv,m,newV);
-<a name="line388">388: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line389">389: </a>    <font color="#4169E1">for</font> (j=0;j<m;j++) {
-<a name="line390">390: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%D"</font>,((PetscObject)bv)->name,j);
-<a name="line391">391: </a>      PetscObjectSetName((PetscObject)newV[j],str);
-<a name="line392">392: </a>    }
-<a name="line393">393: </a>  }
-<a name="line394">394: </a>  <font color="#4169E1">if</font> (copy) {
-<a name="line395">395: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(m,bv->m);j++) {
-<a name="line396">396: </a>      VecCopy(ctx->V[j],newV[j]);
-<a name="line397">397: </a>    }
-<a name="line398">398: </a>  }
-<a name="line399">399: </a>  VecDestroyVecs(bv->m,&ctx->V);
-<a name="line400">400: </a>  ctx->V = newV;
-<a name="line401">401: </a>  <font color="#4169E1">return</font>(0);
-<a name="line402">402: </a>}
-
-<a name="line406">406: </a><strong><font color="#4169E1"><a name="BVGetColumn_Vecs"></a>PetscErrorCode BVGetColumn_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line407">407: </a>{
-<a name="line408">408: </a>  BV_VECS  *ctx = (BV_VECS*)bv->data;
-<a name="line409">409: </a>  PetscInt l;
-
-<a name="line412">412: </a>  l = BVAvailableVec;
-<a name="line413">413: </a>  bv->cv[l] = ctx->V[bv->nc+j];
-<a name="line414">414: </a>  <font color="#4169E1">return</font>(0);
-<a name="line415">415: </a>}
-
-<a name="line419">419: </a><strong><font color="#4169E1"><a name="BVGetArray_Vecs"></a>PetscErrorCode BVGetArray_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line420">420: </a>{
-<a name="line421">421: </a>  PetscErrorCode    ierr;
-<a name="line422">422: </a>  BV_VECS           *ctx = (BV_VECS*)bv->data;
-<a name="line423">423: </a>  PetscInt          j;
-<a name="line424">424: </a>  const PetscScalar *p;
-
-<a name="line427">427: </a>  PetscMalloc((bv->nc+bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar),a);
-<a name="line428">428: </a>  <font color="#4169E1">for</font> (j=0;j<bv->nc+bv->m;j++) {
-<a name="line429">429: </a>    VecGetArrayRead(ctx->V[j],&p);
-<a name="line430">430: </a>    PetscMemcpy(*a+j*bv->n,p,bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line431">431: </a>    VecRestoreArrayRead(ctx->V[j],&p);
-<a name="line432">432: </a>  }
-<a name="line433">433: </a>  <font color="#4169E1">return</font>(0);
-<a name="line434">434: </a>}
-
-<a name="line438">438: </a><strong><font color="#4169E1"><a name="BVRestoreArray_Vecs"></a>PetscErrorCode BVRestoreArray_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line439">439: </a>{
-<a name="line441">441: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-<a name="line442">442: </a>  PetscInt       j;
-<a name="line443">443: </a>  PetscScalar    *p;
-
-<a name="line446">446: </a>  <font color="#4169E1">for</font> (j=0;j<bv->nc+bv->m;j++) {
-<a name="line447">447: </a>    VecGetArray(ctx->V[j],&p);
-<a name="line448">448: </a>    PetscMemcpy(p,*a+j*bv->n,bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line449">449: </a>    VecRestoreArray(ctx->V[j],&p);
-<a name="line450">450: </a>  }
-<a name="line451">451: </a>  PetscFree(*a);
-<a name="line452">452: </a>  <font color="#4169E1">return</font>(0);
-<a name="line453">453: </a>}
-
-<a name="line457">457: </a><strong><font color="#4169E1"><a name="BVSetFromOptions_Vecs"></a>PetscErrorCode BVSetFromOptions_Vecs(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line458">458: </a>{
-<a name="line460">460: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-
-<a name="line463">463: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Vecs Options"</font>);
-<a name="line464">464: </a>    PetscOptionsInt(<font color="#666666">"-bv_vecs_vmip"</font>,<font color="#666666">"Version of <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> operation"</font>,<font color="#666666">""</font>,ctx->vmip,&ctx->vmip,NULL);
-<a name="line465">465: </a>    <font color="#4169E1">if</font> (ctx->vmip<0 || ctx->vmip>1) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Wrong version of <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>"</font>);
-<a name="line466">466: </a>  PetscOptionsTail();
-<a name="line467">467: </a>  <font color="#4169E1">return</font>(0);
-<a name="line468">468: </a>}
-
-<a name="line472">472: </a><strong><font color="#4169E1"><a name="BVView_Vecs"></a>PetscErrorCode BVView_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
-<a name="line473">473: </a>{
-<a name="line474">474: </a>  PetscErrorCode    ierr;
-<a name="line475">475: </a>  BV_VECS           *ctx = (BV_VECS*)bv->data;
-<a name="line476">476: </a>  PetscInt          j;
-<a name="line477">477: </a>  PetscViewerFormat format;
-<a name="line478">478: </a>  PetscBool         isascii,ismatlab=PETSC_FALSE;
-<a name="line479">479: </a>  const char        *bvname,*name;
-
-<a name="line482">482: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line483">483: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line484">484: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line485">485: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) ismatlab = PETSC_TRUE;
-<a name="line486">486: </a>  }
-<a name="line487">487: </a>  <font color="#4169E1">if</font> (ismatlab) {
-<a name="line488">488: </a>    PetscObjectGetName((PetscObject)bv,&bvname);
-<a name="line489">489: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[];\n"</font>,bvname);
-<a name="line490">490: </a>  }
-<a name="line491">491: </a>  <font color="#4169E1">for</font> (j=bv->nc;j<bv->nc+bv->m;j++) {
-<a name="line492">492: </a>    VecView(ctx->V[j],viewer);
-<a name="line493">493: </a>    <font color="#4169E1">if</font> (ismatlab) {
-<a name="line494">494: </a>      PetscObjectGetName((PetscObject)ctx->V[j],&name);
-<a name="line495">495: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[%s,%s];clear %s\n"</font>,bvname,bvname,name,name);
-<a name="line496">496: </a>    }
-<a name="line497">497: </a>  }
-<a name="line498">498: </a>  <font color="#4169E1">return</font>(0);
-<a name="line499">499: </a>}
-
-<a name="line503">503: </a><strong><font color="#4169E1"><a name="BVDestroy_Vecs"></a>PetscErrorCode BVDestroy_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line504">504: </a>{
-<a name="line506">506: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
-
-<a name="line509">509: </a>  VecDestroyVecs(bv->nc+bv->m,&ctx->V);
-<a name="line510">510: </a>  PetscFree(bv->data);
-<a name="line511">511: </a>  <font color="#4169E1">return</font>(0);
-<a name="line512">512: </a>}
-
-<a name="line516">516: </a><strong><font color="#4169E1"><a name="BVCreate_Vecs"></a>PETSC_EXTERN PetscErrorCode BVCreate_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line517">517: </a>{
-<a name="line519">519: </a>  BV_VECS        *ctx;
-<a name="line520">520: </a>  PetscInt       j;
-<a name="line521">521: </a>  PetscBool      iscusp;
-<a name="line522">522: </a>  char           str[50];
-<a name="line523">523: </a>  <font color="#4169E1">typedef</font> PetscErrorCode (*fmultinplace)(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt);
-<a name="line524">524: </a>  fmultinplace   multinplace[2] = {BVMultInPlace_Vecs_ME, BVMultInPlace_Vecs_Alloc};
-
-<a name="line527">527: </a>  PetscNewLog(bv,&ctx);
-<a name="line528">528: </a>  bv->data = (void*)ctx;
-
-<a name="line530">530: </a>  VecDuplicateVecs(bv->t,bv->m,&ctx->V);
-<a name="line531">531: </a>  PetscLogObjectParents(bv,bv->m,ctx->V);
-<a name="line532">532: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
-<a name="line533">533: </a>    <font color="#4169E1">for</font> (j=0;j<bv->m;j++) {
-<a name="line534">534: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%D"</font>,((PetscObject)bv)->name,j);
-<a name="line535">535: </a>      PetscObjectSetName((PetscObject)ctx->V[j],str);
-<a name="line536">536: </a>    }
-<a name="line537">537: </a>  }
-
-<a name="line539">539: </a>  <font color="#B22222">/* Default version of <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> */</font>
-<a name="line540">540: </a>  PetscObjectTypeCompareAny((PetscObject)bv->t,&iscusp,VECSEQCUSP,VECMPICUSP,<font color="#666666">""</font>);
-<a name="line541">541: </a>  ctx->vmip = iscusp? 1: 0;
-
-<a name="line543">543: </a>  <font color="#B22222">/* Deferred call to setfromoptions */</font>
-<a name="line544">544: </a>  <font color="#4169E1">if</font> (bv->defersfo) {
-<a name="line545">545: </a>    PetscObjectOptionsBegin((PetscObject)bv);
-<a name="line546">546: </a>    BVSetFromOptions_Vecs(PetscOptionsObject,bv);
-<a name="line547">547: </a>    PetscOptionsEnd();
-<a name="line548">548: </a>  }
-
-<a name="line550">550: </a>  bv->ops->mult             = BVMult_Vecs;
-<a name="line551">551: </a>  bv->ops->multvec          = BVMultVec_Vecs;
-<a name="line552">552: </a>  bv->ops->multinplace      = multinplace[ctx->vmip];
-<a name="line553">553: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Vecs;
-<a name="line554">554: </a>  bv->ops->axpy             = BVAXPY_Vecs;
-<a name="line555">555: </a>  bv->ops->dot              = BVDot_Vecs;
-<a name="line556">556: </a>  bv->ops->dotvec           = BVDotVec_Vecs;
-<a name="line557">557: </a>  bv->ops->dotvec_begin     = BVDotVec_Begin_Vecs;
-<a name="line558">558: </a>  bv->ops->dotvec_end       = BVDotVec_End_Vecs;
-<a name="line559">559: </a>  bv->ops->scale            = BVScale_Vecs;
-<a name="line560">560: </a>  bv->ops->norm             = BVNorm_Vecs;
-<a name="line561">561: </a>  bv->ops->norm_begin       = BVNorm_Begin_Vecs;
-<a name="line562">562: </a>  bv->ops->norm_end         = BVNorm_End_Vecs;
-<a name="line563">563: </a>  bv->ops->matmult          = BVMatMult_Vecs;
-<a name="line564">564: </a>  bv->ops->copy             = BVCopy_Vecs;
-<a name="line565">565: </a>  bv->ops->resize           = BVResize_Vecs;
-<a name="line566">566: </a>  bv->ops->getcolumn        = BVGetColumn_Vecs;
-<a name="line567">567: </a>  bv->ops->getarray         = BVGetArray_Vecs;
-<a name="line568">568: </a>  bv->ops->restorearray     = BVRestoreArray_Vecs;
-<a name="line569">569: </a>  bv->ops->destroy          = BVDestroy_Vecs;
-<a name="line570">570: </a>  bv->ops->setfromoptions   = BVSetFromOptions_Vecs;
-<a name="line571">571: </a>  bv->ops->view             = BVView_Vecs;
-<a name="line572">572: </a>  <font color="#4169E1">return</font>(0);
-<a name="line573">573: </a>}
+<a name="line43"> 43: </a>  <font color="#4169E1">if</font> (Q) {
+<a name="line44"> 44: </a>    MatGetSize(Q,&ldq,NULL);
+<a name="line45"> 45: </a>    <font color="#4169E1">if</font> (alpha!=1.0) {
+<a name="line46"> 46: </a>      BVAllocateWork_Private(Y,X->k-X->l);
+<a name="line47"> 47: </a>      s = Y->work;
+<a name="line48"> 48: </a>    }
+<a name="line49"> 49: </a>    MatDenseGetArray(Q,&q);
+<a name="line50"> 50: </a>    <font color="#4169E1">for</font> (j=Y->l;j<Y->k;j++) {
+<a name="line51"> 51: </a>      VecScale(y->V[Y->nc+j],beta);
+<a name="line52"> 52: </a>      <font color="#4169E1">if</font> (alpha!=1.0) {
+<a name="line53"> 53: </a>        <font color="#4169E1">for</font> (i=X->l;i<X->k;i++) s[i-X->l] = alpha*q[i+j*ldq];
+<a name="line54"> 54: </a>      } <font color="#4169E1">else</font> s = q+j*ldq+X->l;
+<a name="line55"> 55: </a>      VecMAXPY(y->V[Y->nc+j],X->k-X->l,s,x->V+X->nc+X->l);
+<a name="line56"> 56: </a>    }
+<a name="line57"> 57: </a>    MatDenseRestoreArray(Q,&q);
+<a name="line58"> 58: </a>  } <font color="#4169E1">else</font> {
+<a name="line59"> 59: </a>    <font color="#4169E1">for</font> (j=0;j<Y->k-Y->l;j++) {
+<a name="line60"> 60: </a>      VecScale(y->V[Y->nc+Y->l+j],beta);
+<a name="line61"> 61: </a>      VecAXPY(y->V[Y->nc+Y->l+j],alpha,x->V[X->nc+X->l+j]);
+<a name="line62"> 62: </a>    }
+<a name="line63"> 63: </a>  }
+<a name="line64"> 64: </a>  <font color="#4169E1">return</font>(0);
+<a name="line65"> 65: </a>}
+
+<a name="line69"> 69: </a><strong><font color="#4169E1"><a name="BVMultVec_Vecs"></a>PetscErrorCode BVMultVec_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
+<a name="line70"> 70: </a>{
+<a name="line72"> 72: </a>  BV_VECS        *x = (BV_VECS*)X->data;
+<a name="line73"> 73: </a>  PetscScalar    *s=NULL;
+<a name="line74"> 74: </a>  PetscInt       i;
+
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (alpha!=1.0) {
+<a name="line78"> 78: </a>    BVAllocateWork_Private(X,X->k-X->l);
+<a name="line79"> 79: </a>    s = X->work;
+<a name="line80"> 80: </a>  }
+<a name="line81"> 81: </a>  VecScale(y,beta);
+<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (alpha!=1.0) {
+<a name="line83"> 83: </a>    <font color="#4169E1">for</font> (i=0;i<X->k-X->l;i++) s[i] = alpha*q[i];
+<a name="line84"> 84: </a>  } <font color="#4169E1">else</font> s = q;
+<a name="line85"> 85: </a>  VecMAXPY(y,X->k-X->l,s,x->V+X->nc+X->l);
+<a name="line86"> 86: </a>  <font color="#4169E1">return</font>(0);
+<a name="line87"> 87: </a>}
+
+<a name="line91"> 91: </a><font color="#B22222">/*</font>
+<a name="line92"> 92: </a><font color="#B22222">   BVMultInPlace_Vecs_ME - V(:,s:e-1) = V*Q(:,s:e-1) for regular vectors.</font>
+
+<a name="line94"> 94: </a><font color="#B22222">   Memory-efficient version, uses VecGetArray (default in CPU)</font>
+
+<a name="line96"> 96: </a><font color="#B22222">   Writing V = [ V1 V2 V3 ] and Q(:,s:e-1) = [ Q1 Q2 Q3 ]', where V2</font>
+<a name="line97"> 97: </a><font color="#B22222">   corresponds to the columns s:e-1, the computation is done as</font>
+<a name="line98"> 98: </a><font color="#B22222">                  V2 := V2*Q2 + V1*Q1 + V3*Q3</font>
+<a name="line99"> 99: </a><font color="#B22222">*/</font>
+<a name="line100">100: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Vecs_ME"></a>PetscErrorCode BVMultInPlace_Vecs_ME(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line101">101: </a>{
+<a name="line103">103: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
+<a name="line104">104: </a>  PetscScalar    *q;
+<a name="line105">105: </a>  PetscInt       i,ldq;
+
+<a name="line108">108: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line109">109: </a>  MatDenseGetArray(Q,&q);
+<a name="line110">110: </a>  <font color="#B22222">/* V2 := V2*Q2 */</font>
+<a name="line111">111: </a>  BVMultInPlace_Vecs_Private(V,V->n,e-s,ldq,ctx->V+V->nc+s,q+s*ldq+s,PETSC_FALSE);
+<a name="line112">112: </a>  <font color="#B22222">/* V2 += V1*Q1 + V3*Q3 */</font>
+<a name="line113">113: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
+<a name="line114">114: </a>    <font color="#4169E1">if</font> (s>V->l) {
+<a name="line115">115: </a>      VecMAXPY(ctx->V[V->nc+i],s-V->l,q+i*ldq+V->l,ctx->V+V->nc+V->l);
+<a name="line116">116: </a>    }
+<a name="line117">117: </a>    <font color="#4169E1">if</font> (V->k>e) {
+<a name="line118">118: </a>      VecMAXPY(ctx->V[V->nc+i],V->k-e,q+i*ldq+e,ctx->V+V->nc+e);
+<a name="line119">119: </a>    }
+<a name="line120">120: </a>  }
+<a name="line121">121: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line122">122: </a>  <font color="#4169E1">return</font>(0);
+<a name="line123">123: </a>}
+
+<a name="line127">127: </a><font color="#B22222">/*</font>
+<a name="line128">128: </a><font color="#B22222">   BVMultInPlace_Vecs_Alloc - V(:,s:e-1) = V*Q(:,s:e-1) for regular vectors.</font>
+
+<a name="line130">130: </a><font color="#B22222">   Version that allocates (e-s) work vectors in every call (default in GPU)</font>
+<a name="line131">131: </a><font color="#B22222">*/</font>
+<a name="line132">132: </a><strong><font color="#4169E1"><a name="BVMultInPlace_Vecs_Alloc"></a>PetscErrorCode BVMultInPlace_Vecs_Alloc(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line133">133: </a>{
+<a name="line135">135: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
+<a name="line136">136: </a>  PetscScalar    *q;
+<a name="line137">137: </a>  PetscInt       i,ldq;
+<a name="line138">138: </a>  Vec            *W;
+
+<a name="line141">141: </a>  MatGetSize(Q,&ldq,NULL);
+<a name="line142">142: </a>  MatDenseGetArray(Q,&q);
+<a name="line143">143: </a>  VecDuplicateVecs(V->t,e-s,&W);
+<a name="line144">144: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
+<a name="line145">145: </a>    VecMAXPY(W[i-s],V->k-V->l,q+i*ldq+V->l,ctx->V+V->nc+V->l);
+<a name="line146">146: </a>  }
+<a name="line147">147: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
+<a name="line148">148: </a>    VecCopy(W[i-s],ctx->V[V->nc+i]);
+<a name="line149">149: </a>  }
+<a name="line150">150: </a>  VecDestroyVecs(e-s,&W);
+<a name="line151">151: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
+<a name="line153">153: </a>}
+
+<a name="line157">157: </a><font color="#B22222">/*</font>
+<a name="line158">158: </a><font color="#B22222">   BVMultInPlaceTranspose_Vecs - V(:,s:e-1) = V*Q'(:,s:e-1) for regular vectors.</font>
+<a name="line159">159: </a><font color="#B22222">*/</font>
+<a name="line160">160: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose_Vecs"></a>PetscErrorCode BVMultInPlaceTranspose_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line161">161: </a>{
+<a name="line163">163: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
+<a name="line164">164: </a>  PetscScalar    *q;
+<a name="line165">165: </a>  PetscInt       i,j,ldq,n;
+
+<a name="line168">168: </a>  MatGetSize(Q,&ldq,&n);
+<a name="line169">169: </a>  MatDenseGetArray(Q,&q);
+<a name="line170">170: </a>  <font color="#B22222">/* V2 := V2*Q2' */</font>
+<a name="line171">171: </a>  BVMultInPlace_Vecs_Private(V,V->n,e-s,ldq,ctx->V+V->nc+s,q+s*ldq+s,PETSC_TRUE);
+<a name="line172">172: </a>  <font color="#B22222">/* V2 += V1*Q1' + V3*Q3' */</font>
+<a name="line173">173: </a>  <font color="#4169E1">for</font> (i=s;i<e;i++) {
+<a name="line174">174: </a>    <font color="#4169E1">for</font> (j=V->l;j<s;j++) {
+<a name="line175">175: </a>      VecAXPY(ctx->V[V->nc+i],q[i+j*ldq],ctx->V[V->nc+j]);
+<a name="line176">176: </a>    }
+<a name="line177">177: </a>    <font color="#4169E1">for</font> (j=e;j<n;j++) {
+<a name="line178">178: </a>      VecAXPY(ctx->V[V->nc+i],q[i+j*ldq],ctx->V[V->nc+j]);
+<a name="line179">179: </a>    }
+<a name="line180">180: </a>  }
+<a name="line181">181: </a>  MatDenseRestoreArray(Q,&q);
+<a name="line182">182: </a>  <font color="#4169E1">return</font>(0);
+<a name="line183">183: </a>}
+
+<a name="line187">187: </a><strong><font color="#4169E1"><a name="BVDot_Vecs"></a>PetscErrorCode BVDot_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
+<a name="line188">188: </a>{
+<a name="line190">190: </a>  BV_VECS        *x = (BV_VECS*)X->data,*y = (BV_VECS*)Y->data;
+<a name="line191">191: </a>  PetscScalar    *m;
+<a name="line192">192: </a>  PetscInt       j,ldm;
+
+<a name="line195">195: </a>  MatGetSize(M,&ldm,NULL);
+<a name="line196">196: </a>  MatDenseGetArray(M,&m);
+<a name="line197">197: </a>  <font color="#4169E1">for</font> (j=X->l;j<X->k;j++) {
+<a name="line198">198: </a>    VecMDot(x->V[X->nc+j],Y->k-Y->l,y->V+Y->nc+Y->l,m+j*ldm+Y->l);
+<a name="line199">199: </a>  }
+<a name="line200">200: </a>  MatDenseRestoreArray(M,&m);
+<a name="line201">201: </a>  <font color="#4169E1">return</font>(0);
+<a name="line202">202: </a>}
+
+<a name="line206">206: </a><strong><font color="#4169E1"><a name="BVDotVec_Vecs"></a>PetscErrorCode BVDotVec_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line207">207: </a>{
+<a name="line209">209: </a>  BV_VECS        *x = (BV_VECS*)X->data;
+<a name="line210">210: </a>  Vec            z = y;
+
+<a name="line213">213: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line214">214: </a>    BV_IPMatMult(X,y);
+<a name="line215">215: </a>    z = X->Bx;
+<a name="line216">216: </a>  }
+<a name="line217">217: </a>  VecMDot(z,X->k-X->l,x->V+X->nc+X->l,m);
+<a name="line218">218: </a>  <font color="#4169E1">return</font>(0);
+<a name="line219">219: </a>}
+
+<a name="line223">223: </a><strong><font color="#4169E1"><a name="BVDotVec_Begin_Vecs"></a>PetscErrorCode BVDotVec_Begin_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line224">224: </a>{
+<a name="line226">226: </a>  BV_VECS        *x = (BV_VECS*)X->data;
+<a name="line227">227: </a>  Vec            z = y;
+
+<a name="line230">230: </a>  <font color="#4169E1">if</font> (X->matrix) {
+<a name="line231">231: </a>    BV_IPMatMult(X,y);
+<a name="line232">232: </a>    z = X->Bx;
+<a name="line233">233: </a>  }
+<a name="line234">234: </a>  VecMDotBegin(z,X->k-X->l,x->V+X->nc+X->l,m);
+<a name="line235">235: </a>  <font color="#4169E1">return</font>(0);
+<a name="line236">236: </a>}
+
+<a name="line240">240: </a><strong><font color="#4169E1"><a name="BVDotVec_End_Vecs"></a>PetscErrorCode BVDotVec_End_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line241">241: </a>{
+<a name="line243">243: </a>  BV_VECS        *x = (BV_VECS*)X->data;
+
+<a name="line246">246: </a>  VecMDotEnd(y,X->k-X->l,x->V+X->nc+X->l,m);
+<a name="line247">247: </a>  <font color="#4169E1">return</font>(0);
+<a name="line248">248: </a>}
+
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="BVScale_Vecs"></a>PetscErrorCode BVScale_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
+<a name="line253">253: </a>{
+<a name="line255">255: </a>  PetscInt       i;
+<a name="line256">256: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+
+<a name="line259">259: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line260">260: </a>    <font color="#4169E1">for</font> (i=bv->l;i<bv->k;i++) {
+<a name="line261">261: </a>      VecScale(ctx->V[bv->nc+i],alpha);
+<a name="line262">262: </a>    }
+<a name="line263">263: </a>  } <font color="#4169E1">else</font> {
+<a name="line264">264: </a>    VecScale(ctx->V[bv->nc+j],alpha);
+<a name="line265">265: </a>  }
+<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
+<a name="line267">267: </a>}
+
+<a name="line271">271: </a><strong><font color="#4169E1"><a name="BVNorm_Vecs"></a>PetscErrorCode BVNorm_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line272">272: </a>{
+<a name="line274">274: </a>  PetscInt       i;
+<a name="line275">275: </a>  PetscReal      nrm;
+<a name="line276">276: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+
+<a name="line279">279: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line280">280: </a>    <font color="#4169E1">switch</font> (type) {
+<a name="line281">281: </a>    <font color="#4169E1">case</font> NORM_FROBENIUS:
+<a name="line282">282: </a>      *val = 0.0;
+<a name="line283">283: </a>      <font color="#4169E1">for</font> (i=bv->l;i<bv->k;i++) {
+<a name="line284">284: </a>        VecNorm(ctx->V[bv->nc+i],NORM_2,&nrm);
+<a name="line285">285: </a>        *val += nrm*nrm;
+<a name="line286">286: </a>      }
+<a name="line287">287: </a>      *val = PetscSqrtReal(*val);
+<a name="line288">288: </a>      <font color="#4169E1">break</font>;
+<a name="line289">289: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line290">290: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Requested norm not implemented in BVVECS"</font>);
+<a name="line291">291: </a>    }
+<a name="line292">292: </a>  } <font color="#4169E1">else</font> {
+<a name="line293">293: </a>    VecNorm(ctx->V[bv->nc+j],type,val);
+<a name="line294">294: </a>  }
+<a name="line295">295: </a>  <font color="#4169E1">return</font>(0);
+<a name="line296">296: </a>}
+
+<a name="line300">300: </a><strong><font color="#4169E1"><a name="BVNorm_Begin_Vecs"></a>PetscErrorCode BVNorm_Begin_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line301">301: </a>{
+<a name="line303">303: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+
+<a name="line306">306: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line307">307: </a>    <font color="#4169E1">switch</font> (type) {
+<a name="line308">308: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line309">309: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Requested norm not implemented in BVVECS"</font>);
+<a name="line310">310: </a>    }
+<a name="line311">311: </a>  } <font color="#4169E1">else</font> {
+<a name="line312">312: </a>    VecNormBegin(ctx->V[bv->nc+j],type,val);
+<a name="line313">313: </a>  }
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
+
+<a name="line319">319: </a><strong><font color="#4169E1"><a name="BVNorm_End_Vecs"></a>PetscErrorCode BVNorm_End_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line320">320: </a>{
+<a name="line322">322: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+
+<a name="line325">325: </a>  <font color="#4169E1">if</font> (j<0) {
+<a name="line326">326: </a>    <font color="#4169E1">switch</font> (type) {
+<a name="line327">327: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line328">328: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Requested norm not implemented in BVVECS"</font>);
+<a name="line329">329: </a>    }
+<a name="line330">330: </a>  } <font color="#4169E1">else</font> {
+<a name="line331">331: </a>    VecNormEnd(ctx->V[bv->nc+j],type,val);
+<a name="line332">332: </a>  }
+<a name="line333">333: </a>  <font color="#4169E1">return</font>(0);
+<a name="line334">334: </a>}
+
+<a name="line338">338: </a><strong><font color="#4169E1"><a name="BVMatMult_Vecs"></a>PetscErrorCode BVMatMult_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line339">339: </a>{
+<a name="line341">341: </a>  BV_VECS        *v = (BV_VECS*)V->data,*w = (BV_VECS*)W->data;
+<a name="line342">342: </a>  PetscInt       j;
+
+<a name="line345">345: </a>  <font color="#4169E1">if</font> (V->vmm) { PetscInfo(V,<font color="#666666">"BVMatMult_Vecs: ignoring method\n"</font>); }
+<a name="line346">346: </a>  <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
+<a name="line347">347: </a>    MatMult(A,v->V[V->nc+V->l+j],w->V[W->nc+W->l+j]);
+<a name="line348">348: </a>  }
+<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
+<a name="line350">350: </a>}
+
+<a name="line354">354: </a><strong><font color="#4169E1"><a name="BVCopy_Vecs"></a>PetscErrorCode BVCopy_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line355">355: </a>{
+<a name="line357">357: </a>  BV_VECS        *v = (BV_VECS*)V->data,*w = (BV_VECS*)W->data;
+<a name="line358">358: </a>  PetscInt       j;
+
+<a name="line361">361: </a>  <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
+<a name="line362">362: </a>    VecCopy(v->V[V->nc+V->l+j],w->V[W->nc+W->l+j]);
+<a name="line363">363: </a>  }
+<a name="line364">364: </a>  <font color="#4169E1">return</font>(0);
+<a name="line365">365: </a>}
+
+<a name="line369">369: </a><strong><font color="#4169E1"><a name="BVResize_Vecs"></a>PetscErrorCode BVResize_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m,PetscBool copy)</font></strong>
+<a name="line370">370: </a>{
+<a name="line372">372: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+<a name="line373">373: </a>  Vec            *newV;
+<a name="line374">374: </a>  PetscInt       j;
+<a name="line375">375: </a>  char           str[50];
+
+<a name="line378">378: </a>  VecDuplicateVecs(bv->t,m,&newV);
+<a name="line379">379: </a>  PetscLogObjectParents(bv,m,newV);
+<a name="line380">380: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line381">381: </a>    <font color="#4169E1">for</font> (j=0;j<m;j++) {
+<a name="line382">382: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%D"</font>,((PetscObject)bv)->name,j);
+<a name="line383">383: </a>      PetscObjectSetName((PetscObject)newV[j],str);
+<a name="line384">384: </a>    }
+<a name="line385">385: </a>  }
+<a name="line386">386: </a>  <font color="#4169E1">if</font> (copy) {
+<a name="line387">387: </a>    <font color="#4169E1">for</font> (j=0;j<PetscMin(m,bv->m);j++) {
+<a name="line388">388: </a>      VecCopy(ctx->V[j],newV[j]);
+<a name="line389">389: </a>    }
+<a name="line390">390: </a>  }
+<a name="line391">391: </a>  VecDestroyVecs(bv->m,&ctx->V);
+<a name="line392">392: </a>  ctx->V = newV;
+<a name="line393">393: </a>  <font color="#4169E1">return</font>(0);
+<a name="line394">394: </a>}
+
+<a name="line398">398: </a><strong><font color="#4169E1"><a name="BVGetColumn_Vecs"></a>PetscErrorCode BVGetColumn_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line399">399: </a>{
+<a name="line400">400: </a>  BV_VECS  *ctx = (BV_VECS*)bv->data;
+<a name="line401">401: </a>  PetscInt l;
+
+<a name="line404">404: </a>  l = BVAvailableVec;
+<a name="line405">405: </a>  bv->cv[l] = ctx->V[bv->nc+j];
+<a name="line406">406: </a>  <font color="#4169E1">return</font>(0);
+<a name="line407">407: </a>}
+
+<a name="line411">411: </a><strong><font color="#4169E1"><a name="BVGetArray_Vecs"></a>PetscErrorCode BVGetArray_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line412">412: </a>{
+<a name="line413">413: </a>  PetscErrorCode    ierr;
+<a name="line414">414: </a>  BV_VECS           *ctx = (BV_VECS*)bv->data;
+<a name="line415">415: </a>  PetscInt          j;
+<a name="line416">416: </a>  const PetscScalar *p;
+
+<a name="line419">419: </a>  PetscMalloc((bv->nc+bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar),a);
+<a name="line420">420: </a>  <font color="#4169E1">for</font> (j=0;j<bv->nc+bv->m;j++) {
+<a name="line421">421: </a>    VecGetArrayRead(ctx->V[j],&p);
+<a name="line422">422: </a>    PetscMemcpy(*a+j*bv->n,p,bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line423">423: </a>    VecRestoreArrayRead(ctx->V[j],&p);
+<a name="line424">424: </a>  }
+<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
+<a name="line426">426: </a>}
+
+<a name="line430">430: </a><strong><font color="#4169E1"><a name="BVRestoreArray_Vecs"></a>PetscErrorCode BVRestoreArray_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line431">431: </a>{
+<a name="line433">433: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+<a name="line434">434: </a>  PetscInt       j;
+<a name="line435">435: </a>  PetscScalar    *p;
+
+<a name="line438">438: </a>  <font color="#4169E1">for</font> (j=0;j<bv->nc+bv->m;j++) {
+<a name="line439">439: </a>    VecGetArray(ctx->V[j],&p);
+<a name="line440">440: </a>    PetscMemcpy(p,*a+j*bv->n,bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line441">441: </a>    VecRestoreArray(ctx->V[j],&p);
+<a name="line442">442: </a>  }
+<a name="line443">443: </a>  PetscFree(*a);
+<a name="line444">444: </a>  <font color="#4169E1">return</font>(0);
+<a name="line445">445: </a>}
+
+<a name="line449">449: </a><strong><font color="#4169E1"><a name="BVGetArrayRead_Vecs"></a>PetscErrorCode BVGetArrayRead_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line450">450: </a>{
+<a name="line451">451: </a>  PetscErrorCode    ierr;
+<a name="line452">452: </a>  BV_VECS           *ctx = (BV_VECS*)bv->data;
+<a name="line453">453: </a>  PetscInt          j;
+<a name="line454">454: </a>  const PetscScalar *p;
+
+<a name="line457">457: </a>  PetscMalloc((bv->nc+bv->m)*bv->n*<font color="#4169E1">sizeof</font>(PetscScalar),a);
+<a name="line458">458: </a>  <font color="#4169E1">for</font> (j=0;j<bv->nc+bv->m;j++) {
+<a name="line459">459: </a>    VecGetArrayRead(ctx->V[j],&p);
+<a name="line460">460: </a>    PetscMemcpy((PetscScalar**)*a+j*bv->n,p,bv->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line461">461: </a>    VecRestoreArrayRead(ctx->V[j],&p);
+<a name="line462">462: </a>  }
+<a name="line463">463: </a>  <font color="#4169E1">return</font>(0);
+<a name="line464">464: </a>}
+
+<a name="line468">468: </a><strong><font color="#4169E1"><a name="BVRestoreArrayRead_Vecs"></a>PetscErrorCode BVRestoreArrayRead_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line469">469: </a>{
+
+<a name="line473">473: </a>  PetscFree(*a);
+<a name="line474">474: </a>  <font color="#4169E1">return</font>(0);
+<a name="line475">475: </a>}
+
+<a name="line479">479: </a><strong><font color="#4169E1"><a name="BVSetFromOptions_Vecs"></a>PetscErrorCode BVSetFromOptions_Vecs(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line480">480: </a>{
+<a name="line482">482: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+
+<a name="line485">485: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Vecs Options"</font>);
+<a name="line486">486: </a>    PetscOptionsInt(<font color="#666666">"-bv_vecs_vmip"</font>,<font color="#666666">"Version of <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> operation"</font>,<font color="#666666">""</font>,ctx->vmip,&ctx->vmip,NULL);
+<a name="line487">487: </a>    <font color="#4169E1">if</font> (ctx->vmip<0 || ctx->vmip>1) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Wrong version of <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>"</font>);
+<a name="line488">488: </a>  PetscOptionsTail();
+<a name="line489">489: </a>  <font color="#4169E1">return</font>(0);
+<a name="line490">490: </a>}
+
+<a name="line494">494: </a><strong><font color="#4169E1"><a name="BVView_Vecs"></a>PetscErrorCode BVView_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
+<a name="line495">495: </a>{
+<a name="line496">496: </a>  PetscErrorCode    ierr;
+<a name="line497">497: </a>  BV_VECS           *ctx = (BV_VECS*)bv->data;
+<a name="line498">498: </a>  PetscInt          j;
+<a name="line499">499: </a>  PetscViewerFormat format;
+<a name="line500">500: </a>  PetscBool         isascii,ismatlab=PETSC_FALSE;
+<a name="line501">501: </a>  const char        *bvname,*name;
+
+<a name="line504">504: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line505">505: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line506">506: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line507">507: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) ismatlab = PETSC_TRUE;
+<a name="line508">508: </a>  }
+<a name="line509">509: </a>  <font color="#4169E1">if</font> (ismatlab) {
+<a name="line510">510: </a>    PetscObjectGetName((PetscObject)bv,&bvname);
+<a name="line511">511: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[];\n"</font>,bvname);
+<a name="line512">512: </a>  }
+<a name="line513">513: </a>  <font color="#4169E1">for</font> (j=bv->nc;j<bv->nc+bv->m;j++) {
+<a name="line514">514: </a>    VecView(ctx->V[j],viewer);
+<a name="line515">515: </a>    <font color="#4169E1">if</font> (ismatlab) {
+<a name="line516">516: </a>      PetscObjectGetName((PetscObject)ctx->V[j],&name);
+<a name="line517">517: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[%s,%s];clear %s\n"</font>,bvname,bvname,name,name);
+<a name="line518">518: </a>    }
+<a name="line519">519: </a>  }
+<a name="line520">520: </a>  <font color="#4169E1">return</font>(0);
+<a name="line521">521: </a>}
+
+<a name="line525">525: </a><strong><font color="#4169E1"><a name="BVDestroy_Vecs"></a>PetscErrorCode BVDestroy_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line526">526: </a>{
+<a name="line528">528: </a>  BV_VECS        *ctx = (BV_VECS*)bv->data;
+
+<a name="line531">531: </a>  VecDestroyVecs(bv->nc+bv->m,&ctx->V);
+<a name="line532">532: </a>  PetscFree(bv->data);
+<a name="line533">533: </a>  <font color="#4169E1">return</font>(0);
+<a name="line534">534: </a>}
+
+<a name="line538">538: </a><font color="#B22222">/*</font>
+<a name="line539">539: </a><font color="#B22222">   Sets the value of vmip flag and resets ops->multinplace accordingly</font>
+<a name="line540">540: </a><font color="#B22222"> */</font>
+<a name="line541">541: </a><strong><font color="#4169E1"><a name="BVVecsSetVmip"></a>PETSC_STATIC_INLINE PetscErrorCode BVVecsSetVmip(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt vmip)</font></strong>
+<a name="line542">542: </a>{
+<a name="line543">543: </a>  <font color="#4169E1">typedef</font> PetscErrorCode (*fmultinplace)(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a>,Mat,PetscInt,PetscInt);
+<a name="line544">544: </a>  fmultinplace multinplace[2] = {BVMultInPlace_Vecs_ME, BVMultInPlace_Vecs_Alloc};
+<a name="line545">545: </a>  BV_VECS      *ctx = (BV_VECS*)bv->data;
+
+<a name="line548">548: </a>  ctx->vmip            = vmip;
+<a name="line549">549: </a>  bv->ops->multinplace = multinplace[vmip];
+<a name="line550">550: </a>  <font color="#4169E1">return</font>(0);
+<a name="line551">551: </a>}
+
+<a name="line555">555: </a><strong><font color="#4169E1"><a name="BVDuplicate_Vecs"></a>PetscErrorCode BVDuplicate_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *W)</font></strong>
+<a name="line556">556: </a>{
+<a name="line558">558: </a>  BV_VECS        *ctx = (BV_VECS*)V->data;
+
+<a name="line561">561: </a>  BVVecsSetVmip(*W,ctx->vmip);
+<a name="line562">562: </a>  <font color="#4169E1">return</font>(0);
+<a name="line563">563: </a>}
+
+<a name="line567">567: </a><strong><font color="#4169E1"><a name="BVCreate_Vecs"></a>PETSC_EXTERN PetscErrorCode BVCreate_Vecs(<a href="../../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line568">568: </a>{
+<a name="line570">570: </a>  BV_VECS        *ctx;
+<a name="line571">571: </a>  PetscInt       j;
+<a name="line572">572: </a>  PetscBool      iscusp;
+<a name="line573">573: </a>  char           str[50];
+
+<a name="line576">576: </a>  PetscNewLog(bv,&ctx);
+<a name="line577">577: </a>  bv->data = (void*)ctx;
+
+<a name="line579">579: </a>  VecDuplicateVecs(bv->t,bv->m,&ctx->V);
+<a name="line580">580: </a>  PetscLogObjectParents(bv,bv->m,ctx->V);
+<a name="line581">581: </a>  <font color="#4169E1">if</font> (((PetscObject)bv)->name) {
+<a name="line582">582: </a>    <font color="#4169E1">for</font> (j=0;j<bv->m;j++) {
+<a name="line583">583: </a>      PetscSNPrintf(str,50,<font color="#666666">"%s_%D"</font>,((PetscObject)bv)->name,j);
+<a name="line584">584: </a>      PetscObjectSetName((PetscObject)ctx->V[j],str);
+<a name="line585">585: </a>    }
+<a name="line586">586: </a>  }
+
+<a name="line588">588: </a>  <font color="#B22222">/* Default version of <a href="../../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> */</font>
+<a name="line589">589: </a>  PetscObjectTypeCompareAny((PetscObject)bv->t,&iscusp,VECSEQCUSP,VECMPICUSP,<font color="#666666">""</font>);
+<a name="line590">590: </a>  ctx->vmip = iscusp? 1: 0;
+
+<a name="line592">592: </a>  <font color="#B22222">/* Deferred call to setfromoptions */</font>
+<a name="line593">593: </a>  <font color="#4169E1">if</font> (bv->defersfo) {
+<a name="line594">594: </a>    PetscObjectOptionsBegin((PetscObject)bv);
+<a name="line595">595: </a>    BVSetFromOptions_Vecs(PetscOptionsObject,bv);
+<a name="line596">596: </a>    PetscOptionsEnd();
+<a name="line597">597: </a>  }
+<a name="line598">598: </a>  BVVecsSetVmip(bv,ctx->vmip);
+
+<a name="line600">600: </a>  bv->ops->mult             = BVMult_Vecs;
+<a name="line601">601: </a>  bv->ops->multvec          = BVMultVec_Vecs;
+<a name="line602">602: </a>  bv->ops->multinplacetrans = BVMultInPlaceTranspose_Vecs;
+<a name="line603">603: </a>  bv->ops->dot              = BVDot_Vecs;
+<a name="line604">604: </a>  bv->ops->dotvec           = BVDotVec_Vecs;
+<a name="line605">605: </a>  bv->ops->dotvec_begin     = BVDotVec_Begin_Vecs;
+<a name="line606">606: </a>  bv->ops->dotvec_end       = BVDotVec_End_Vecs;
+<a name="line607">607: </a>  bv->ops->scale            = BVScale_Vecs;
+<a name="line608">608: </a>  bv->ops->norm             = BVNorm_Vecs;
+<a name="line609">609: </a>  bv->ops->norm_begin       = BVNorm_Begin_Vecs;
+<a name="line610">610: </a>  bv->ops->norm_end         = BVNorm_End_Vecs;
+<a name="line611">611: </a>  bv->ops->matmult          = BVMatMult_Vecs;
+<a name="line612">612: </a>  bv->ops->copy             = BVCopy_Vecs;
+<a name="line613">613: </a>  bv->ops->resize           = BVResize_Vecs;
+<a name="line614">614: </a>  bv->ops->getcolumn        = BVGetColumn_Vecs;
+<a name="line615">615: </a>  bv->ops->getarray         = BVGetArray_Vecs;
+<a name="line616">616: </a>  bv->ops->restorearray     = BVRestoreArray_Vecs;
+<a name="line617">617: </a>  bv->ops->getarrayread     = BVGetArrayRead_Vecs;
+<a name="line618">618: </a>  bv->ops->restorearrayread = BVRestoreArrayRead_Vecs;
+<a name="line619">619: </a>  bv->ops->destroy          = BVDestroy_Vecs;
+<a name="line620">620: </a>  bv->ops->duplicate        = BVDuplicate_Vecs;
+<a name="line621">621: </a>  bv->ops->setfromoptions   = BVSetFromOptions_Vecs;
+<a name="line622">622: </a>  bv->ops->view             = BVView_Vecs;
+<a name="line623">623: </a>  <font color="#4169E1">return</font>(0);
+<a name="line624">624: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/index.html b/src/sys/classes/bv/index.html
index e8faa1a..eab8ebf 100644
--- a/src/sys/classes/bv/index.html
+++ b/src/sys/classes/bv/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/interface/bvbasic.c b/src/sys/classes/bv/interface/bvbasic.c
index d5b90e0..a47afab 100644
--- a/src/sys/classes/bv/interface/bvbasic.c
+++ b/src/sys/classes/bv/interface/bvbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -597,7 +597,7 @@ PetscErrorCode BVApplyMatrix(BV bv,Vec x,Vec y)
    Neighbor-wise Collective on BV
 
    Input Parameter:
-+  X - the basis vectors context
+.  X - the basis vectors context
 
    Output Parameter:
 .  Y - the basis vectors to store the result (optional)
@@ -750,6 +750,73 @@ PetscErrorCode BVGetSignature(BV bv,Vec omega)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVSetRandomContext"
+/*@
+   BVSetRandomContext - Sets the PetscRandom object associated with the BV,
+   to be used in operations that need random numbers.
+
+   Collective on BV
+
+   Input Parameters:
++  bv   - the basis vectors context
+-  rand - the random number generator context
+
+   Level: advanced
+
+.seealso: BVGetRandomContext(), BVSetRandom(), BVSetRandomColumn()
+@*/
+PetscErrorCode BVSetRandomContext(BV bv,PetscRandom rand)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(bv,BV_CLASSID,1);
+  PetscValidHeaderSpecific(rand,PETSC_RANDOM_CLASSID,2);
+  PetscCheckSameComm(bv,1,rand,2);
+  ierr = PetscObjectReference((PetscObject)rand);CHKERRQ(ierr);
+  ierr = PetscRandomDestroy(&bv->rand);CHKERRQ(ierr);
+  bv->rand = rand;
+  ierr = PetscLogObjectParent((PetscObject)bv,(PetscObject)bv->rand);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "BVGetRandomContext"
+/*@
+   BVGetRandomContext - Gets the PetscRandom object associated with the BV.
+
+   Not Collective
+
+   Input Parameter:
+.  bv - the basis vectors context
+
+   Output Parameter:
+.  rand - the random number generator context
+
+   Level: advanced
+
+.seealso: BVSetRandomContext(), BVSetRandom(), BVSetRandomColumn()
+@*/
+PetscErrorCode BVGetRandomContext(BV bv,PetscRandom* rand)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(bv,BV_CLASSID,1);
+  PetscValidPointer(rand,2);
+  if (!bv->rand) {
+    ierr = PetscRandomCreate(PetscObjectComm((PetscObject)bv),&bv->rand);CHKERRQ(ierr);
+    ierr = PetscLogObjectParent((PetscObject)bv,(PetscObject)bv->rand);CHKERRQ(ierr);
+    if (bv->rrandom) {
+      ierr = PetscRandomSetSeed(bv->rand,0x12345678);CHKERRQ(ierr);
+      ierr = PetscRandomSeed(bv->rand);CHKERRQ(ierr);
+    }
+  }
+  *rand = bv->rand;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVSetFromOptions"
 /*@
    BVSetFromOptions - Sets BV options from the options database.
@@ -767,10 +834,6 @@ PetscErrorCode BVSetFromOptions(BV bv)
   char           type[256];
   PetscBool      flg;
   PetscReal      r;
-  PetscInt       i,j,k;
-  const char     *orth_list[2] = {"cgs","mgs"};
-  const char     *ref_list[3] = {"ifneeded","never","always"};
-  const char     *borth_list[2] = {"gs","chol"};
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(bv,BV_CLASSID,1);
@@ -787,28 +850,26 @@ PetscErrorCode BVSetFromOptions(BV bv)
       ierr = BVSetType(bv,BVSVEC);CHKERRQ(ierr);
     }
 
-    i = bv->orthog_type;
-    ierr = PetscOptionsEList("-bv_orthog_type","Orthogonalization method","BVSetOrthogonalization",orth_list,2,orth_list[i],&i,NULL);CHKERRQ(ierr);
-    j = bv->orthog_ref;
-    ierr = PetscOptionsEList("-bv_orthog_refine","Iterative refinement mode during orthogonalization","BVSetOrthogonalization",ref_list,3,ref_list[j],&j,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsEnum("-bv_orthog_type","Orthogonalization method","BVSetOrthogonalization",BVOrthogTypes,(PetscEnum)bv->orthog_type,(PetscEnum*)&bv->orthog_type,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsEnum("-bv_orthog_refine","Iterative refinement mode during orthogonalization","BVSetOrthogonalization",BVOrthogRefineTypes,(PetscEnum)bv->orthog_ref,(PetscEnum*)&bv->orthog_ref,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsEnum("-bv_orthog_block","Block orthogonalization method","BVSetOrthogonalization",BVOrthogBlockTypes,(PetscEnum)bv->orthog_block,(PetscEnum*)&bv->orthog_block,NULL);CHKERRQ(ierr);
     r = bv->orthog_eta;
     ierr = PetscOptionsReal("-bv_orthog_eta","Parameter of iterative refinement during orthogonalization","BVSetOrthogonalization",r,&r,NULL);CHKERRQ(ierr);
-    k = bv->orthog_block;
-    ierr = PetscOptionsEList("-bv_orthog_block","Block orthogonalization method","BVSetOrthogonalization",borth_list,2,borth_list[k],&k,NULL);CHKERRQ(ierr);
-    ierr = BVSetOrthogonalization(bv,(BVOrthogType)i,(BVOrthogRefineType)j,r,(BVOrthogBlockType)k);CHKERRQ(ierr);
+    ierr = BVSetOrthogonalization(bv,bv->orthog_type,bv->orthog_ref,r,bv->orthog_block);CHKERRQ(ierr);
+
+    ierr = PetscOptionsEnum("-bv_matmult","Method for BVMatMult","BVSetMatMultMethod",BVMatMultTypes,(PetscEnum)bv->vmm,(PetscEnum*)&bv->vmm,NULL);CHKERRQ(ierr);
 
-    ierr = PetscOptionsBoolGroupBegin("-bv_matmult_vecs","Do matmult as matrix-vector products","BVSetMatMultMethod",&flg);CHKERRQ(ierr);
-    if (flg) { ierr = BVSetMatMultMethod(bv,BV_MATMULT_VECS);CHKERRQ(ierr); }
-    ierr = PetscOptionsBoolGroup("-bv_matmult_mat","Do matmult as a single matrix-matrix product","BVSetMatMultMethod",&flg);CHKERRQ(ierr);
-    if (flg) { ierr = BVSetMatMultMethod(bv,BV_MATMULT_MAT);CHKERRQ(ierr); }
-    ierr = PetscOptionsBoolGroupEnd("-bv_matmult_mat_save","Do matmult as a single matrix-matrix product and save auxiliary matrices","BVSetMatMultMethod",&flg);CHKERRQ(ierr);
-    if (flg) { ierr = BVSetMatMultMethod(bv,BV_MATMULT_MAT_SAVE);CHKERRQ(ierr); }
+    if (!bv->rand) { ierr = BVGetRandomContext(bv,&bv->rand);CHKERRQ(ierr); }
+    ierr = PetscRandomSetFromOptions(bv->rand);CHKERRQ(ierr);
+
+    /* undocumented option to generate random vectors that are independent of the number of processes */
+    ierr = PetscOptionsGetBool(NULL,NULL,"-bv_reproducible_random",&bv->rrandom,NULL);CHKERRQ(ierr);
 
     if (bv->ops->create) bv->defersfo = PETSC_TRUE;   /* defer call to setfromoptions */
     else if (bv->ops->setfromoptions) {
       ierr = (*bv->ops->setfromoptions)(PetscOptionsObject,bv);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)bv);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)bv);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -937,16 +998,18 @@ PetscErrorCode BVGetOrthogonalization(BV bv,BVOrthogType *type,BVOrthogRefineTyp
 -  method - the method for the BVMatMult() operation
 
    Options Database Keys:
-+  -bv_matmult_vecs - perform a matrix-vector multiply per each column
-.  -bv_matmult_mat - carry out a MatMatMult() product with a dense matrix
--  -bv_matmult_mat_save - call MatMatMult() and keep auxiliary matrices
+.  -bv_matmult <meth> - choose one of the methods: vecs, mat, mat_save
 
    Note:
+   Allowed values are:
++  BV_MATMULT_VECS - perform a matrix-vector multiply per each column
+.  BV_MATMULT_MAT - carry out a MatMatMult() product with a dense matrix
+-  BV_MATMULT_MAT_SAVE - call MatMatMult() and keep auxiliary matrices
    The default is BV_MATMULT_MAT.
 
    Level: advanced
 
-.seealso: BVGetMatMultMethod(), BVMatMultType
+.seealso: BVMatMult(), BVGetMatMultMethod(), BVMatMultType
 @*/
 PetscErrorCode BVSetMatMultMethod(BV bv,BVMatMultType method)
 {
@@ -980,7 +1043,7 @@ PetscErrorCode BVSetMatMultMethod(BV bv,BVMatMultType method)
 
    Level: advanced
 
-.seealso: BVSetMatMultMethod(), BVMatMultType
+.seealso: BVMatMult(), BVSetMatMultMethod(), BVMatMultType
 @*/
 PetscErrorCode BVGetMatMultMethod(BV bv,BVMatMultType *method)
 {
@@ -1172,6 +1235,75 @@ PetscErrorCode BVRestoreArray(BV bv,PetscScalar **a)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVGetArrayRead"
+/*@C
+   BVGetArrayRead - Returns a read-only pointer to a contiguous array that
+   contains this processor's portion of the BV data.
+
+   Not Collective
+
+   Input Parameters:
+.  bv - the basis vectors context
+
+   Output Parameter:
+.  a  - location to put pointer to the array
+
+   Notes:
+   BVRestoreArrayRead() must be called when access to the array is no
+   longer needed. This operation may imply a data copy, for BV types that
+   do not store data contiguously in memory.
+
+   The pointer will normally point to the first entry of the first column,
+   but if the BV has constraints then these go before the regular columns.
+
+   Level: advanced
+
+.seealso: BVRestoreArray(), BVInsertConstraints()
+@*/
+PetscErrorCode BVGetArrayRead(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(bv,BV_CLASSID,1);
+  PetscValidType(bv,1);
+  BVCheckSizes(bv,1);
+  ierr = (*bv->ops->getarrayread)(bv,a);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "BVRestoreArrayRead"
+/*@C
+   BVRestoreArrayRead - Restore the BV object after BVGetArrayRead() has
+   been called.
+
+   Logically Collective on BV
+
+   Input Parameters:
++  bv - the basis vectors context
+-  a  - location of pointer to array obtained from BVGetArrayRead()
+
+   Level: advanced
+
+.seealso: BVGetColumn()
+@*/
+PetscErrorCode BVRestoreArrayRead(BV bv,const PetscScalar **a)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(bv,BV_CLASSID,1);
+  PetscValidType(bv,1);
+  BVCheckSizes(bv,1);
+  if (bv->ops->restorearrayread) {
+    ierr = (*bv->ops->restorearrayread)(bv,a);CHKERRQ(ierr);
+  }
+  if (a) *a = NULL;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVCreateVec"
 /*@
    BVCreateVec - Creates a new Vec object with the same type and dimensions
@@ -1203,6 +1335,23 @@ PetscErrorCode BVCreateVec(BV bv,Vec *v)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "BVDuplicate_Private"
+PETSC_STATIC_INLINE PetscErrorCode BVDuplicate_Private(BV V,PetscInt m,BV *W)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = BVCreate(PetscObjectComm((PetscObject)V),W);CHKERRQ(ierr);
+  ierr = BVSetSizesFromVec(*W,V->t,m);CHKERRQ(ierr);
+  ierr = BVSetType(*W,((PetscObject)V)->type_name);CHKERRQ(ierr);
+  ierr = BVSetMatrix(*W,V->matrix,V->indef);CHKERRQ(ierr);
+  ierr = BVSetOrthogonalization(*W,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);CHKERRQ(ierr);
+  if (V->ops->duplicate) { ierr = (*V->ops->duplicate)(V,W);CHKERRQ(ierr); }
+  ierr = PetscObjectStateIncrease((PetscObject)*W);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "BVDuplicate"
 /*@
    BVDuplicate - Creates a new basis vector object of the same type and
@@ -1237,12 +1386,7 @@ PetscErrorCode BVDuplicate(BV V,BV *W)
   PetscValidType(V,1);
   BVCheckSizes(V,1);
   PetscValidPointer(W,2);
-  ierr = BVCreate(PetscObjectComm((PetscObject)V),W);CHKERRQ(ierr);
-  ierr = BVSetSizesFromVec(*W,V->t,V->m);CHKERRQ(ierr);
-  ierr = BVSetType(*W,((PetscObject)V)->type_name);CHKERRQ(ierr);
-  ierr = BVSetMatrix(*W,V->matrix,V->indef);CHKERRQ(ierr);
-  ierr = BVSetOrthogonalization(*W,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);CHKERRQ(ierr);
-  ierr = PetscObjectStateIncrease((PetscObject)*W);CHKERRQ(ierr);
+  ierr = BVDuplicate_Private(V,V->m,W);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -1279,12 +1423,7 @@ PetscErrorCode BVDuplicateResize(BV V,PetscInt m,BV *W)
   BVCheckSizes(V,1);
   PetscValidLogicalCollectiveInt(V,m,2);
   PetscValidPointer(W,3);
-  ierr = BVCreate(PetscObjectComm((PetscObject)V),W);CHKERRQ(ierr);
-  ierr = BVSetSizesFromVec(*W,V->t,m);CHKERRQ(ierr);
-  ierr = BVSetType(*W,((PetscObject)V)->type_name);CHKERRQ(ierr);
-  ierr = BVSetMatrix(*W,V->matrix,V->indef);CHKERRQ(ierr);
-  ierr = BVSetOrthogonalization(*W,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);CHKERRQ(ierr);
-  ierr = PetscObjectStateIncrease((PetscObject)*W);CHKERRQ(ierr);
+  ierr = BVDuplicate_Private(V,m,W);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/bv/interface/bvbasic.c.html b/src/sys/classes/bv/interface/bvbasic.c.html
index b20fbca..7783696 100644
--- a/src/sys/classes/bv/interface/bvbasic.c.html
+++ b/src/sys/classes/bv/interface/bvbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:18+00:00">
+<meta name="date" content="2016-05-16T10:32:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Basic <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> routines.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -530,7 +530,7 @@
 <a name="line597">597: </a><font color="#B22222">   Neighbor-wise Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
 
 <a name="line599">599: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line600">600: </a><font color="#B22222">+  X - the basis vectors context</font>
+<a name="line600">600: </a><font color="#B22222">.  X - the basis vectors context</font>
 
 <a name="line602">602: </a><font color="#B22222">   Output Parameter:</font>
 <a name="line603">603: </a><font color="#B22222">.  Y - the basis vectors to store the result (optional)</font>
@@ -661,579 +661,689 @@
 <a name="line750">750: </a>}
 
 <a name="line754">754: </a><font color="#B22222">/*@</font>
-<a name="line755">755: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a> - Sets <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options from the options database.</font>
-
-<a name="line757">757: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line759">759: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line760">760: </a><font color="#B22222">.  bv - the basis vectors context</font>
-
-<a name="line762">762: </a><font color="#B22222">   Level: beginner</font>
-<a name="line763">763: </a><font color="#B22222">@*/</font>
-<a name="line764">764: </a><strong><font color="#4169E1"><a name="BVSetFromOptions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
-<a name="line765">765: </a>{
-<a name="line767">767: </a>  char           type[256];
-<a name="line768">768: </a>  PetscBool      flg;
-<a name="line769">769: </a>  PetscReal      r;
-<a name="line770">770: </a>  PetscInt       i,j,k;
-<a name="line771">771: </a>  const char     *orth_list[2] = {<font color="#666666">"cgs"</font>,<font color="#666666">"mgs"</font>};
-<a name="line772">772: </a>  const char     *ref_list[3] = {<font color="#666666">"ifneeded"</font>,<font color="#666666">"never"</font>,<font color="#666666">"always"</font>};
-<a name="line773">773: </a>  const char     *borth_list[2] = {<font color="#666666">"gs"</font>,<font color="#666666">"chol"</font>};
-
-<a name="line777">777: </a>  <a href="../../../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>();
-<a name="line778">778: </a>  PetscObjectOptionsBegin((PetscObject)bv);
-<a name="line779">779: </a>    PetscOptionsFList(<font color="#666666">"-bv_type"</font>,<font color="#666666">"Basis Vectors type"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>"</font>,BVList,(char*)(((PetscObject)bv)->type_name?((PetscObject)bv)->type_name:BVSVEC),type,256,&flg);
-<a name="line780">780: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line781">781: </a>      <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(bv,type);
-<a name="line782">782: </a>    }
-<a name="line783">783: </a>    <font color="#B22222">/*</font>
-<a name="line784">784: </a><font color="#B22222">      Set the type if it was never set.</font>
-<a name="line785">785: </a><font color="#B22222">    */</font>
-<a name="line786">786: </a>    <font color="#4169E1">if</font> (!((PetscObject)bv)->type_name) {
-<a name="line787">787: </a>      <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(bv,BVSVEC);
-<a name="line788">788: </a>    }
-
-<a name="line790">790: </a>    i = bv->orthog_type;
-<a name="line791">791: </a>    PetscOptionsEList(<font color="#666666">"-bv_orthog_type"</font>,<font color="#666666">"Orthogonalization method"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,orth_list,2,orth_list[i],&i,NULL);
-<a name="line792">792: </a>    j = bv->orthog_ref;
-<a name="line793">793: </a>    PetscOptionsEList(<font color="#666666">"-bv_orthog_refine"</font>,<font color="#666666">"Iterative refinement mode during orthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,ref_list,3,ref_list[j],&j,NULL);
-<a name="line794">794: </a>    r = bv->orthog_eta;
-<a name="line795">795: </a>    PetscOptionsReal(<font color="#666666">"-bv_orthog_eta"</font>,<font color="#666666">"Parameter of iterative refinement during orthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,r,&r,NULL);
-<a name="line796">796: </a>    k = bv->orthog_block;
-<a name="line797">797: </a>    PetscOptionsEList(<font color="#666666">"-bv_orthog_block"</font>,<font color="#666666">"Block orthogonalization method"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,borth_list,2,borth_list[k],&k,NULL);
-<a name="line798">798: </a>    <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(bv,(<a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>)i,(<a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>)j,r,(<a href="../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>)k);
-
-<a name="line800">800: </a>    PetscOptionsBoolGroupBegin(<font color="#666666">"-bv_matmult_vecs"</font>,<font color="#666666">"Do matmult as matrix-vector products"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>"</font>,&flg);
-<a name="line801">801: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(bv,BV_MATMULT_VECS); }
-<a name="line802">802: </a>    PetscOptionsBoolGroup(<font color="#666666">"-bv_matmult_mat"</font>,<font color="#666666">"Do matmult as a single matrix-matrix product"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>"</font>,&flg);
-<a name="line803">803: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(bv,BV_MATMULT_MAT); }
-<a name="line804">804: </a>    PetscOptionsBoolGroupEnd(<font color="#666666">"-bv_matmult_mat_save"</font>,<font color="#666666">"Do matmult as a single matrix-matrix product and save auxiliary matrices"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>"</font>,&flg);
-<a name="line805">805: </a>    <font color="#4169E1">if</font> (flg) { <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(bv,BV_MATMULT_MAT_SAVE); }
-
-<a name="line807">807: </a>    <font color="#4169E1">if</font> (bv->ops->create) bv->defersfo = PETSC_TRUE;   <font color="#B22222">/* defer call to setfromoptions */</font>
-<a name="line808">808: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bv->ops->setfromoptions) {
-<a name="line809">809: </a>      (*bv->ops->setfromoptions)(PetscOptionsObject,bv);
-<a name="line810">810: </a>    }
-<a name="line811">811: </a>    PetscObjectProcessOptionsHandlers((PetscObject)bv);
-<a name="line812">812: </a>  PetscOptionsEnd();
-<a name="line813">813: </a>  <font color="#4169E1">return</font>(0);
-<a name="line814">814: </a>}
-
-<a name="line818">818: </a><font color="#B22222">/*@</font>
-<a name="line819">819: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a> - Specifies the method used for the orthogonalization of</font>
-<a name="line820">820: </a><font color="#B22222">   vectors (classical or modified Gram-Schmidt with or without refinement), and</font>
-<a name="line821">821: </a><font color="#B22222">   for the block-orthogonalization (simultaneous orthogonalization of a set of</font>
-<a name="line822">822: </a><font color="#B22222">   vectors).</font>
-
-<a name="line824">824: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line826">826: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line827">827: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line828">828: </a><font color="#B22222">.  type   - the method of vector orthogonalization</font>
-<a name="line829">829: </a><font color="#B22222">.  refine - type of refinement</font>
-<a name="line830">830: </a><font color="#B22222">.  eta    - parameter for selective refinement</font>
-<a name="line831">831: </a><font color="#B22222">-  block  - the method of block orthogonalization</font>
-
-<a name="line833">833: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line834">834: </a><font color="#B22222">+  -bv_orthog_type <type> - Where <type> is cgs for Classical Gram-Schmidt orthogonalization</font>
-<a name="line835">835: </a><font color="#B22222">                         (default) or mgs for Modified Gram-Schmidt orthogonalization</font>
-<a name="line836">836: </a><font color="#B22222">.  -bv_orthog_refine <ref> - Where <ref> is one of never, ifneeded (default) or always</font>
-<a name="line837">837: </a><font color="#B22222">.  -bv_orthog_eta <eta> -  For setting the value of eta</font>
-<a name="line838">838: </a><font color="#B22222">-  -bv_orthog_block <block> - Where <block> is the block-orthogonalization method</font>
-
-<a name="line840">840: </a><font color="#B22222">   Notes:</font>
-<a name="line841">841: </a><font color="#B22222">   The default settings work well for most problems.</font>
-
-<a name="line843">843: </a><font color="#B22222">   The parameter eta should be a real value between 0 and 1 (or PETSC_DEFAULT).</font>
-<a name="line844">844: </a><font color="#B22222">   The value of eta is used only when the refinement type is "ifneeded".</font>
-
-<a name="line846">846: </a><font color="#B22222">   When using several processors, MGS is likely to result in bad scalability.</font>
-
-<a name="line848">848: </a><font color="#B22222">   If the method set for block orthogonalization is GS, then the computation</font>
-<a name="line849">849: </a><font color="#B22222">   is done column by column with the vector orthogonalization.</font>
-
-<a name="line851">851: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line853">853: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>, <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BV [...]
-<a name="line854">854: </a><font color="#B22222">@*/</font>
-<a name="line855">855: </a><strong><font color="#4169E1"><a name="BVSetOrthogonalization"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a> type,<a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthog [...]
-<a name="line856">856: </a>{
-<a name="line863">863: </a>  <font color="#4169E1">switch</font> (type) {
-<a name="line864">864: </a>    <font color="#4169E1">case</font> BV_ORTHOG_CGS:
-<a name="line865">865: </a>    <font color="#4169E1">case</font> BV_ORTHOG_MGS:
-<a name="line866">866: </a>      bv->orthog_type = type;
-<a name="line867">867: </a>      <font color="#4169E1">break</font>;
-<a name="line868">868: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line869">869: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown orthogonalization type"</font>);
-<a name="line870">870: </a>  }
-<a name="line871">871: </a>  <font color="#4169E1">switch</font> (refine) {
-<a name="line872">872: </a>    <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
-<a name="line873">873: </a>    <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
-<a name="line874">874: </a>    <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
-<a name="line875">875: </a>      bv->orthog_ref = refine;
-<a name="line876">876: </a>      <font color="#4169E1">break</font>;
-<a name="line877">877: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line878">878: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown refinement type"</font>);
-<a name="line879">879: </a>  }
-<a name="line880">880: </a>  <font color="#4169E1">if</font> (eta == PETSC_DEFAULT) {
-<a name="line881">881: </a>    bv->orthog_eta = 0.7071;
-<a name="line882">882: </a>  } <font color="#4169E1">else</font> {
-<a name="line883">883: </a>    <font color="#4169E1">if</font> (eta <= 0.0 || eta > 1.0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid eta value"</font>);
-<a name="line884">884: </a>    bv->orthog_eta = eta;
-<a name="line885">885: </a>  }
-<a name="line886">886: </a>  <font color="#4169E1">switch</font> (block) {
-<a name="line887">887: </a>    <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_GS:
-<a name="line888">888: </a>    <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_CHOL:
-<a name="line889">889: </a>      bv->orthog_block = block;
-<a name="line890">890: </a>      <font color="#4169E1">break</font>;
-<a name="line891">891: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line892">892: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown block orthogonalization type"</font>);
-<a name="line893">893: </a>  }
-<a name="line894">894: </a>  <font color="#4169E1">return</font>(0);
-<a name="line895">895: </a>}
-
-<a name="line899">899: </a><font color="#B22222">/*@</font>
-<a name="line900">900: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a> - Gets the orthogonalization settings from the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object.</font>
-
-<a name="line902">902: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line904">904: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line905">905: </a><font color="#B22222">.  bv - basis vectors context</font>
-
-<a name="line907">907: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line908">908: </a><font color="#B22222">+  type   - the method of vector orthogonalization</font>
-<a name="line909">909: </a><font color="#B22222">.  refine - type of refinement</font>
-<a name="line910">910: </a><font color="#B22222">.  eta    - parameter for selective refinement</font>
-<a name="line911">911: </a><font color="#B22222">-  block  - the method of block orthogonalization</font>
-
-<a name="line913">913: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line915">915: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>, <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BV [...]
-<a name="line916">916: </a><font color="#B22222">@*/</font>
-<a name="line917">917: </a><strong><font color="#4169E1"><a name="BVGetOrthogonalization"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a> *type,<a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrtho [...]
-<a name="line918">918: </a>{
-<a name="line921">921: </a>  <font color="#4169E1">if</font> (type)   *type   = bv->orthog_type;
-<a name="line922">922: </a>  <font color="#4169E1">if</font> (refine) *refine = bv->orthog_ref;
-<a name="line923">923: </a>  <font color="#4169E1">if</font> (eta)    *eta    = bv->orthog_eta;
-<a name="line924">924: </a>  <font color="#4169E1">if</font> (block)  *block  = bv->orthog_block;
-<a name="line925">925: </a>  <font color="#4169E1">return</font>(0);
-<a name="line926">926: </a>}
-
-<a name="line930">930: </a><font color="#B22222">/*@</font>
-<a name="line931">931: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a> - Specifies the method used for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation.</font>
-
-<a name="line933">933: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line935">935: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line936">936: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line937">937: </a><font color="#B22222">-  method - the method for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation</font>
-
-<a name="line939">939: </a><font color="#B22222">   Options Database Keys:</font>
-<a name="line940">940: </a><font color="#B22222">+  -bv_matmult_vecs - perform a matrix-vector multiply per each column</font>
-<a name="line941">941: </a><font color="#B22222">.  -bv_matmult_mat - carry out a MatMatMult() product with a dense matrix</font>
-<a name="line942">942: </a><font color="#B22222">-  -bv_matmult_mat_save - call MatMatMult() and keep auxiliary matrices</font>
-
-<a name="line944">944: </a><font color="#B22222">   Note:</font>
-<a name="line945">945: </a><font color="#B22222">   The default is BV_MATMULT_MAT.</font>
-
-<a name="line947">947: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line949">949: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a></font>
-<a name="line950">950: </a><font color="#B22222">@*/</font>
-<a name="line951">951: </a><strong><font color="#4169E1"><a name="BVSetMatMultMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a> method)</font></strong>
-<a name="line952">952: </a>{
-<a name="line956">956: </a>  <font color="#4169E1">switch</font> (method) {
-<a name="line957">957: </a>    <font color="#4169E1">case</font> BV_MATMULT_VECS:
-<a name="line958">958: </a>    <font color="#4169E1">case</font> BV_MATMULT_MAT:
-<a name="line959">959: </a>    <font color="#4169E1">case</font> BV_MATMULT_MAT_SAVE:
-<a name="line960">960: </a>      bv->vmm = method;
-<a name="line961">961: </a>      <font color="#4169E1">break</font>;
-<a name="line962">962: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line963">963: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown matmult method"</font>);
-<a name="line964">964: </a>  }
-<a name="line965">965: </a>  <font color="#4169E1">return</font>(0);
-<a name="line966">966: </a>}
-
-<a name="line970">970: </a><font color="#B22222">/*@</font>
-<a name="line971">971: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a> - Gets the method used for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation.</font>
-
-<a name="line973">973: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line975">975: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line976">976: </a><font color="#B22222">.  bv - basis vectors context</font>
-
-<a name="line978">978: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line979">979: </a><font color="#B22222">.  method - the method for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation</font>
-
-<a name="line981">981: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line983">983: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a></font>
-<a name="line984">984: </a><font color="#B22222">@*/</font>
-<a name="line985">985: </a><strong><font color="#4169E1"><a name="BVGetMatMultMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a> *method)</font></strong>
-<a name="line986">986: </a>{
-<a name="line990">990: </a>  *method = bv->vmm;
-<a name="line991">991: </a>  <font color="#4169E1">return</font>(0);
-<a name="line992">992: </a>}
-
-<a name="line996">996: </a><font color="#B22222">/*@</font>
-<a name="line997">997: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a> - Returns a Vec object that contains the entries of the</font>
-<a name="line998">998: </a><font color="#B22222">   requested column of the basis vectors object.</font>
-
-<a name="line1000">1000: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1002">1002: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1003">1003: </a><font color="#B22222">+  bv - the basis vectors context</font>
-<a name="line1004">1004: </a><font color="#B22222">-  j  - the index of the requested column</font>
-
-<a name="line1006">1006: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1007">1007: </a><font color="#B22222">.  v  - vector containing the jth column</font>
-
-<a name="line1009">1009: </a><font color="#B22222">   Notes:</font>
-<a name="line1010">1010: </a><font color="#B22222">   The returned Vec must be seen as a reference (not a copy) of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-<a name="line1011">1011: </a><font color="#B22222">   column, that is, modifying the Vec will change the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> entries as well.</font>
-
-<a name="line1013">1013: </a><font color="#B22222">   The returned Vec must not be destroyed. <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>() must be</font>
-<a name="line1014">1014: </a><font color="#B22222">   called when it is no longer needed. At most, two columns can be fetched,</font>
-<a name="line1015">1015: </a><font color="#B22222">   that is, this function can only be called twice before the corresponding</font>
-<a name="line1016">1016: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>() is invoked.</font>
-
-<a name="line1018">1018: </a><font color="#B22222">   A negative index j selects the i-th constraint, where i=-j. Constraints</font>
-<a name="line1019">1019: </a><font color="#B22222">   should not be modified.</font>
-
-<a name="line1021">1021: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line1023">1023: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>()</font>
-<a name="line1024">1024: </a><font color="#B22222">@*/</font>
-<a name="line1025">1025: </a><strong><font color="#4169E1"><a name="BVGetColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line1026">1026: </a>{
-<a name="line1028">1028: </a>  PetscInt       l;
-
-<a name="line1033">1033: </a>  BVCheckSizes(bv,1);
-<a name="line1035">1035: </a>  <font color="#4169E1">if</font> (j<0 && -j>bv->nc) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested constraint %D but only %D are available"</font>,-j,bv->nc);
-<a name="line1036">1036: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested column %D but only %D are available"</font>,j,bv->m);
-<a name="line1037">1037: </a>  <font color="#4169E1">if</font> (j==bv->ci[0] || j==bv->ci[1]) SETERRQ1(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Column %D already fetched in a previous call to <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>,j);
-<a name="line1038">1038: </a>  l = BVAvailableVec;
-<a name="line1039">1039: </a>  <font color="#4169E1">if</font> (l==-1) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Too many requested columns; you must call <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a> for one of the previously fetched columns"</font>);
-<a name="line1040">1040: </a>  (*bv->ops->getcolumn)(bv,j,v);
-<a name="line1041">1041: </a>  bv->ci[l] = j;
-<a name="line1042">1042: </a>  PetscObjectStateGet((PetscObject)bv->cv[l],&bv->st[l]);
-<a name="line1043">1043: </a>  PetscObjectGetId((PetscObject)bv->cv[l],&bv->id[l]);
-<a name="line1044">1044: </a>  *v = bv->cv[l];
-<a name="line1045">1045: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1046">1046: </a>}
-
-<a name="line1050">1050: </a><font color="#B22222">/*@</font>
-<a name="line1051">1051: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a> - Restore a column obtained with <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>().</font>
-
-<a name="line1053">1053: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1055">1055: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1056">1056: </a><font color="#B22222">+  bv - the basis vectors context</font>
-<a name="line1057">1057: </a><font color="#B22222">.  j  - the index of the column</font>
-<a name="line1058">1058: </a><font color="#B22222">-  v  - vector obtained with <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
-
-<a name="line1060">1060: </a><font color="#B22222">   Note:</font>
-<a name="line1061">1061: </a><font color="#B22222">   The arguments must match the corresponding call to <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>().</font>
-
-<a name="line1063">1063: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line1065">1065: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
-<a name="line1066">1066: </a><font color="#B22222">@*/</font>
-<a name="line1067">1067: </a><strong><font color="#4169E1"><a name="BVRestoreColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
-<a name="line1068">1068: </a>{
-<a name="line1069">1069: </a>  PetscErrorCode   ierr;
-<a name="line1070">1070: </a>  PetscObjectId    id;
-<a name="line1071">1071: </a>  PetscObjectState st;
-<a name="line1072">1072: </a>  PetscInt         l;
-
-<a name="line1077">1077: </a>  BVCheckSizes(bv,1);
-<a name="line1081">1081: </a>  <font color="#4169E1">if</font> (j<0 && -j>bv->nc) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested constraint %D but only %D are available"</font>,-j,bv->nc);
-<a name="line1082">1082: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested column %D but only %D are available"</font>,j,bv->m);
-<a name="line1083">1083: </a>  <font color="#4169E1">if</font> (j!=bv->ci[0] && j!=bv->ci[1]) SETERRQ1(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Column %D has not been fetched with a call to <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>,j);
-<a name="line1084">1084: </a>  l = (j==bv->ci[0])? 0: 1;
-<a name="line1085">1085: </a>  PetscObjectGetId((PetscObject)*v,&id);
-<a name="line1086">1086: </a>  <font color="#4169E1">if</font> (id!=bv->id[l]) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Argument 3 is not the same Vec that was obtained with <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>);
-<a name="line1087">1087: </a>  PetscObjectStateGet((PetscObject)*v,&st);
-<a name="line1088">1088: </a>  <font color="#4169E1">if</font> (st!=bv->st[l]) {
-<a name="line1089">1089: </a>    PetscObjectStateIncrease((PetscObject)bv);
-<a name="line1090">1090: </a>  }
-<a name="line1091">1091: </a>  <font color="#4169E1">if</font> (bv->ops->restorecolumn) {
-<a name="line1092">1092: </a>    (*bv->ops->restorecolumn)(bv,j,v);
-<a name="line1093">1093: </a>  } <font color="#4169E1">else</font> bv->cv[l] = NULL;
-<a name="line1094">1094: </a>  bv->ci[l] = -bv->nc-1;
-<a name="line1095">1095: </a>  bv->st[l] = -1;
-<a name="line1096">1096: </a>  bv->id[l] = 0;
-<a name="line1097">1097: </a>  *v = NULL;
-<a name="line1098">1098: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1099">1099: </a>}
-
-<a name="line1103">1103: </a><font color="#B22222">/*@C</font>
-<a name="line1104">1104: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a> - Returns a pointer to a contiguous array that contains this</font>
-<a name="line1105">1105: </a><font color="#B22222">   processor's portion of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> data.</font>
-
-<a name="line1107">1107: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1109">1109: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1110">1110: </a><font color="#B22222">.  bv - the basis vectors context</font>
-
-<a name="line1112">1112: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1113">1113: </a><font color="#B22222">.  a  - location to put pointer to the array</font>
-
-<a name="line1115">1115: </a><font color="#B22222">   Notes:</font>
-<a name="line1116">1116: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>() must be called when access to the array is no longer needed.</font>
-<a name="line1117">1117: </a><font color="#B22222">   This operation may imply a data copy, for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> types that do not store</font>
-<a name="line1118">1118: </a><font color="#B22222">   data contiguously in memory.</font>
-
-<a name="line1120">1120: </a><font color="#B22222">   The pointer will normally point to the first entry of the first column,</font>
-<a name="line1121">1121: </a><font color="#B22222">   but if the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> has constraints then these go before the regular columns.</font>
-
-<a name="line1123">1123: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1125">1125: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>()</font>
-<a name="line1126">1126: </a><font color="#B22222">@*/</font>
-<a name="line1127">1127: </a><strong><font color="#4169E1"><a name="BVGetArray"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line1128">1128: </a>{
-
-<a name="line1134">1134: </a>  BVCheckSizes(bv,1);
-<a name="line1135">1135: </a>  (*bv->ops->getarray)(bv,a);
-<a name="line1136">1136: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1137">1137: </a>}
-
-<a name="line1141">1141: </a><font color="#B22222">/*@C</font>
-<a name="line1142">1142: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a> - Restore the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object after <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>() has been called.</font>
-
-<a name="line1144">1144: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1146">1146: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1147">1147: </a><font color="#B22222">+  bv - the basis vectors context</font>
-<a name="line1148">1148: </a><font color="#B22222">-  a  - location of pointer to array obtained from <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>()</font>
-
-<a name="line1150">1150: </a><font color="#B22222">   Note:</font>
-<a name="line1151">1151: </a><font color="#B22222">   This operation may imply a data copy, for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> types that do not store</font>
-<a name="line1152">1152: </a><font color="#B22222">   data contiguously in memory.</font>
-
-<a name="line1154">1154: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line1156">1156: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
-<a name="line1157">1157: </a><font color="#B22222">@*/</font>
-<a name="line1158">1158: </a><strong><font color="#4169E1"><a name="BVRestoreArray"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
-<a name="line1159">1159: </a>{
-
-<a name="line1165">1165: </a>  BVCheckSizes(bv,1);
-<a name="line1166">1166: </a>  <font color="#4169E1">if</font> (bv->ops->restorearray) {
-<a name="line1167">1167: </a>    (*bv->ops->restorearray)(bv,a);
-<a name="line1168">1168: </a>  }
-<a name="line1169">1169: </a>  <font color="#4169E1">if</font> (a) *a = NULL;
-<a name="line1170">1170: </a>  PetscObjectStateIncrease((PetscObject)bv);
-<a name="line1171">1171: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1172">1172: </a>}
-
-<a name="line1176">1176: </a><font color="#B22222">/*@</font>
-<a name="line1177">1177: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a> - Creates a new Vec object with the same type and dimensions</font>
-<a name="line1178">1178: </a><font color="#B22222">   as the columns of the basis vectors object.</font>
-
-<a name="line1180">1180: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1182">1182: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1183">1183: </a><font color="#B22222">.  bv - the basis vectors context</font>
-
-<a name="line1185">1185: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1186">1186: </a><font color="#B22222">.  v  - the new vector</font>
-
-<a name="line1188">1188: </a><font color="#B22222">   Note:</font>
-<a name="line1189">1189: </a><font color="#B22222">   The user is responsible of destroying the returned vector.</font>
-
-<a name="line1191">1191: </a><font color="#B22222">   Level: beginner</font>
-<a name="line1192">1192: </a><font color="#B22222">@*/</font>
-<a name="line1193">1193: </a><strong><font color="#4169E1"><a name="BVCreateVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec *v)</font></strong>
-<a name="line1194">1194: </a>{
-
-<a name="line1199">1199: </a>  BVCheckSizes(bv,1);
-<a name="line1201">1201: </a>  VecDuplicate(bv->t,v);
-<a name="line1202">1202: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1203">1203: </a>}
-
-<a name="line1207">1207: </a><font color="#B22222">/*@</font>
-<a name="line1208">1208: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a> - Creates a new basis vector object of the same type and</font>
-<a name="line1209">1209: </a><font color="#B22222">   dimensions as an existing one.</font>
-
-<a name="line1211">1211: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1213">1213: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1214">1214: </a><font color="#B22222">.  V - basis vectors context</font>
-
-<a name="line1216">1216: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1217">1217: </a><font color="#B22222">.  W - location to put the new <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+<a name="line755">755: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</a> - Sets the PetscRandom object associated with the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>,</font>
+<a name="line756">756: </a><font color="#B22222">   to be used in operations that need random numbers.</font>
+
+<a name="line758">758: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line760">760: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line761">761: </a><font color="#B22222">+  bv   - the basis vectors context</font>
+<a name="line762">762: </a><font color="#B22222">-  rand - the random number generator context</font>
+
+<a name="line764">764: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line766">766: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(), <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(), <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>()</font>
+<a name="line767">767: </a><font color="#B22222">@*/</font>
+<a name="line768">768: </a><strong><font color="#4169E1"><a name="BVSetRandomContext"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscRandom rand)</font></strong>
+<a name="line769">769: </a>{
+
+<a name="line776">776: </a>  PetscObjectReference((PetscObject)rand);
+<a name="line777">777: </a>  PetscRandomDestroy(&bv->rand);
+<a name="line778">778: </a>  bv->rand = rand;
+<a name="line779">779: </a>  PetscLogObjectParent((PetscObject)bv,(PetscObject)bv->rand);
+<a name="line780">780: </a>  <font color="#4169E1">return</font>(0);
+<a name="line781">781: </a>}
+
+<a name="line785">785: </a><font color="#B22222">/*@</font>
+<a name="line786">786: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a> - Gets the PetscRandom object associated with the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+
+<a name="line788">788: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line790">790: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line791">791: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line793">793: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line794">794: </a><font color="#B22222">.  rand - the random number generator context</font>
+
+<a name="line796">796: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line798">798: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</a>(), <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(), <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>()</font>
+<a name="line799">799: </a><font color="#B22222">@*/</font>
+<a name="line800">800: </a><strong><font color="#4169E1"><a name="BVGetRandomContext"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscRandom* rand)</font></strong>
+<a name="line801">801: </a>{
+
+<a name="line807">807: </a>  <font color="#4169E1">if</font> (!bv->rand) {
+<a name="line808">808: </a>    PetscRandomCreate(PetscObjectComm((PetscObject)bv),&bv->rand);
+<a name="line809">809: </a>    PetscLogObjectParent((PetscObject)bv,(PetscObject)bv->rand);
+<a name="line810">810: </a>    <font color="#4169E1">if</font> (bv->rrandom) {
+<a name="line811">811: </a>      PetscRandomSetSeed(bv->rand,0x12345678);
+<a name="line812">812: </a>      PetscRandomSeed(bv->rand);
+<a name="line813">813: </a>    }
+<a name="line814">814: </a>  }
+<a name="line815">815: </a>  *rand = bv->rand;
+<a name="line816">816: </a>  <font color="#4169E1">return</font>(0);
+<a name="line817">817: </a>}
+
+<a name="line821">821: </a><font color="#B22222">/*@</font>
+<a name="line822">822: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a> - Sets <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options from the options database.</font>
+
+<a name="line824">824: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line826">826: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line827">827: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line829">829: </a><font color="#B22222">   Level: beginner</font>
+<a name="line830">830: </a><font color="#B22222">@*/</font>
+<a name="line831">831: </a><strong><font color="#4169E1"><a name="BVSetFromOptions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetFromOptions.html#BVSetFromOptions">BVSetFromOptions</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line832">832: </a>{
+<a name="line834">834: </a>  char           type[256];
+<a name="line835">835: </a>  PetscBool      flg;
+<a name="line836">836: </a>  PetscReal      r;
+
+<a name="line840">840: </a>  <a href="../../../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>();
+<a name="line841">841: </a>  PetscObjectOptionsBegin((PetscObject)bv);
+<a name="line842">842: </a>    PetscOptionsFList(<font color="#666666">"-bv_type"</font>,<font color="#666666">"Basis Vectors type"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>"</font>,BVList,(char*)(((PetscObject)bv)->type_name?((PetscObject)bv)->type_name:BVSVEC),type,256,&flg);
+<a name="line843">843: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line844">844: </a>      <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(bv,type);
+<a name="line845">845: </a>    }
+<a name="line846">846: </a>    <font color="#B22222">/*</font>
+<a name="line847">847: </a><font color="#B22222">      Set the type if it was never set.</font>
+<a name="line848">848: </a><font color="#B22222">    */</font>
+<a name="line849">849: </a>    <font color="#4169E1">if</font> (!((PetscObject)bv)->type_name) {
+<a name="line850">850: </a>      <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(bv,BVSVEC);
+<a name="line851">851: </a>    }
+
+<a name="line853">853: </a>    PetscOptionsEnum(<font color="#666666">"-bv_orthog_type"</font>,<font color="#666666">"Orthogonalization method"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,BVOrthogTypes,(PetscEnum)bv->orthog_type,(PetscEnum*)&bv->orthog_type,NULL);
+<a name="line854">854: </a>    PetscOptionsEnum(<font color="#666666">"-bv_orthog_refine"</font>,<font color="#666666">"Iterative refinement mode during orthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,BVOrthogRefineTypes,(PetscEnum)bv->orthog_ref,(PetscEnum*)&bv->orthog_ref,NULL);
+<a name="line855">855: </a>    PetscOptionsEnum(<font color="#666666">"-bv_orthog_block"</font>,<font color="#666666">"Block orthogonalization method"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,BVOrthogBlockTypes,(PetscEnum)bv->orthog_block,(PetscEnum*)&bv->orthog_block,NULL);
+<a name="line856">856: </a>    r = bv->orthog_eta;
+<a name="line857">857: </a>    PetscOptionsReal(<font color="#666666">"-bv_orthog_eta"</font>,<font color="#666666">"Parameter of iterative refinement during orthogonalization"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>"</font>,r,&r,NULL);
+<a name="line858">858: </a>    <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(bv,bv->orthog_type,bv->orthog_ref,r,bv->orthog_block);
+
+<a name="line860">860: </a>    PetscOptionsEnum(<font color="#666666">"-bv_matmult"</font>,<font color="#666666">"Method for <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>"</font>,BVMatMultTypes,(PetscEnum)bv->vmm,(PetscEnum*)&bv->vmm,NULL);
+
+<a name="line862">862: </a>    <font color="#4169E1">if</font> (!bv->rand) { <a href="../../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(bv,&bv->rand); }
+<a name="line863">863: </a>    PetscRandomSetFromOptions(bv->rand);
+
+<a name="line865">865: </a>    <font color="#B22222">/* undocumented option to generate random vectors that are independent of the number of processes */</font>
+<a name="line866">866: </a>    PetscOptionsGetBool(NULL,NULL,<font color="#666666">"-bv_reproducible_random"</font>,&bv->rrandom,NULL);
+
+<a name="line868">868: </a>    <font color="#4169E1">if</font> (bv->ops->create) bv->defersfo = PETSC_TRUE;   <font color="#B22222">/* defer call to setfromoptions */</font>
+<a name="line869">869: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bv->ops->setfromoptions) {
+<a name="line870">870: </a>      (*bv->ops->setfromoptions)(PetscOptionsObject,bv);
+<a name="line871">871: </a>    }
+<a name="line872">872: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)bv);
+<a name="line873">873: </a>  PetscOptionsEnd();
+<a name="line874">874: </a>  <font color="#4169E1">return</font>(0);
+<a name="line875">875: </a>}
+
+<a name="line879">879: </a><font color="#B22222">/*@</font>
+<a name="line880">880: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a> - Specifies the method used for the orthogonalization of</font>
+<a name="line881">881: </a><font color="#B22222">   vectors (classical or modified Gram-Schmidt with or without refinement), and</font>
+<a name="line882">882: </a><font color="#B22222">   for the block-orthogonalization (simultaneous orthogonalization of a set of</font>
+<a name="line883">883: </a><font color="#B22222">   vectors).</font>
+
+<a name="line885">885: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line887">887: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line888">888: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line889">889: </a><font color="#B22222">.  type   - the method of vector orthogonalization</font>
+<a name="line890">890: </a><font color="#B22222">.  refine - type of refinement</font>
+<a name="line891">891: </a><font color="#B22222">.  eta    - parameter for selective refinement</font>
+<a name="line892">892: </a><font color="#B22222">-  block  - the method of block orthogonalization</font>
+
+<a name="line894">894: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line895">895: </a><font color="#B22222">+  -bv_orthog_type <type> - Where <type> is cgs for Classical Gram-Schmidt orthogonalization</font>
+<a name="line896">896: </a><font color="#B22222">                         (default) or mgs for Modified Gram-Schmidt orthogonalization</font>
+<a name="line897">897: </a><font color="#B22222">.  -bv_orthog_refine <ref> - Where <ref> is one of never, ifneeded (default) or always</font>
+<a name="line898">898: </a><font color="#B22222">.  -bv_orthog_eta <eta> -  For setting the value of eta</font>
+<a name="line899">899: </a><font color="#B22222">-  -bv_orthog_block <block> - Where <block> is the block-orthogonalization method</font>
+
+<a name="line901">901: </a><font color="#B22222">   Notes:</font>
+<a name="line902">902: </a><font color="#B22222">   The default settings work well for most problems.</font>
+
+<a name="line904">904: </a><font color="#B22222">   The parameter eta should be a real value between 0 and 1 (or PETSC_DEFAULT).</font>
+<a name="line905">905: </a><font color="#B22222">   The value of eta is used only when the refinement type is "ifneeded".</font>
+
+<a name="line907">907: </a><font color="#B22222">   When using several processors, MGS is likely to result in bad scalability.</font>
+
+<a name="line909">909: </a><font color="#B22222">   If the method set for block orthogonalization is GS, then the computation</font>
+<a name="line910">910: </a><font color="#B22222">   is done column by column with the vector orthogonalization.</font>
+
+<a name="line912">912: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line914">914: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>, <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BV [...]
+<a name="line915">915: </a><font color="#B22222">@*/</font>
+<a name="line916">916: </a><strong><font color="#4169E1"><a name="BVSetOrthogonalization"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a> type,<a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthog [...]
+<a name="line917">917: </a>{
+<a name="line924">924: </a>  <font color="#4169E1">switch</font> (type) {
+<a name="line925">925: </a>    <font color="#4169E1">case</font> BV_ORTHOG_CGS:
+<a name="line926">926: </a>    <font color="#4169E1">case</font> BV_ORTHOG_MGS:
+<a name="line927">927: </a>      bv->orthog_type = type;
+<a name="line928">928: </a>      <font color="#4169E1">break</font>;
+<a name="line929">929: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line930">930: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown orthogonalization type"</font>);
+<a name="line931">931: </a>  }
+<a name="line932">932: </a>  <font color="#4169E1">switch</font> (refine) {
+<a name="line933">933: </a>    <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
+<a name="line934">934: </a>    <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
+<a name="line935">935: </a>    <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
+<a name="line936">936: </a>      bv->orthog_ref = refine;
+<a name="line937">937: </a>      <font color="#4169E1">break</font>;
+<a name="line938">938: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line939">939: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown refinement type"</font>);
+<a name="line940">940: </a>  }
+<a name="line941">941: </a>  <font color="#4169E1">if</font> (eta == PETSC_DEFAULT) {
+<a name="line942">942: </a>    bv->orthog_eta = 0.7071;
+<a name="line943">943: </a>  } <font color="#4169E1">else</font> {
+<a name="line944">944: </a>    <font color="#4169E1">if</font> (eta <= 0.0 || eta > 1.0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid eta value"</font>);
+<a name="line945">945: </a>    bv->orthog_eta = eta;
+<a name="line946">946: </a>  }
+<a name="line947">947: </a>  <font color="#4169E1">switch</font> (block) {
+<a name="line948">948: </a>    <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_GS:
+<a name="line949">949: </a>    <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_CHOL:
+<a name="line950">950: </a>      bv->orthog_block = block;
+<a name="line951">951: </a>      <font color="#4169E1">break</font>;
+<a name="line952">952: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line953">953: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown block orthogonalization type"</font>);
+<a name="line954">954: </a>  }
+<a name="line955">955: </a>  <font color="#4169E1">return</font>(0);
+<a name="line956">956: </a>}
+
+<a name="line960">960: </a><font color="#B22222">/*@</font>
+<a name="line961">961: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a> - Gets the orthogonalization settings from the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object.</font>
+
+<a name="line963">963: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line965">965: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line966">966: </a><font color="#B22222">.  bv - basis vectors context</font>
+
+<a name="line968">968: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line969">969: </a><font color="#B22222">+  type   - the method of vector orthogonalization</font>
+<a name="line970">970: </a><font color="#B22222">.  refine - type of refinement</font>
+<a name="line971">971: </a><font color="#B22222">.  eta    - parameter for selective refinement</font>
+<a name="line972">972: </a><font color="#B22222">-  block  - the method of block orthogonalization</font>
+
+<a name="line974">974: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line976">976: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>, <a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BV [...]
+<a name="line977">977: </a><font color="#B22222">@*/</font>
+<a name="line978">978: </a><strong><font color="#4169E1"><a name="BVGetOrthogonalization"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetOrthogonalization.html#BVGetOrthogonalization">BVGetOrthogonalization</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a> *type,<a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrtho [...]
+<a name="line979">979: </a>{
+<a name="line982">982: </a>  <font color="#4169E1">if</font> (type)   *type   = bv->orthog_type;
+<a name="line983">983: </a>  <font color="#4169E1">if</font> (refine) *refine = bv->orthog_ref;
+<a name="line984">984: </a>  <font color="#4169E1">if</font> (eta)    *eta    = bv->orthog_eta;
+<a name="line985">985: </a>  <font color="#4169E1">if</font> (block)  *block  = bv->orthog_block;
+<a name="line986">986: </a>  <font color="#4169E1">return</font>(0);
+<a name="line987">987: </a>}
+
+<a name="line991">991: </a><font color="#B22222">/*@</font>
+<a name="line992">992: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a> - Specifies the method used for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation.</font>
+
+<a name="line994">994: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line996">996: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line997">997: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line998">998: </a><font color="#B22222">-  method - the method for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation</font>
+
+<a name="line1000">1000: </a><font color="#B22222">   Options Database Keys:</font>
+<a name="line1001">1001: </a><font color="#B22222">.  -bv_matmult <meth> - choose one of the methods: vecs, mat, mat_save</font>
+
+<a name="line1003">1003: </a><font color="#B22222">   Note:</font>
+<a name="line1004">1004: </a><font color="#B22222">   Allowed values are:</font>
+<a name="line1005">1005: </a><font color="#B22222">+  BV_MATMULT_VECS - perform a matrix-vector multiply per each column</font>
+<a name="line1006">1006: </a><font color="#B22222">.  BV_MATMULT_MAT - carry out a MatMatMult() product with a dense matrix</font>
+<a name="line1007">1007: </a><font color="#B22222">-  BV_MATMULT_MAT_SAVE - call MatMatMult() and keep auxiliary matrices</font>
+<a name="line1008">1008: </a><font color="#B22222">   The default is BV_MATMULT_MAT.</font>
+
+<a name="line1010">1010: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1012">1012: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(), <a href="../../../../../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a></font>
+<a name="line1013">1013: </a><font color="#B22222">@*/</font>
+<a name="line1014">1014: </a><strong><font color="#4169E1"><a name="BVSetMatMultMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a> method)</font></strong>
+<a name="line1015">1015: </a>{
+<a name="line1019">1019: </a>  <font color="#4169E1">switch</font> (method) {
+<a name="line1020">1020: </a>    <font color="#4169E1">case</font> BV_MATMULT_VECS:
+<a name="line1021">1021: </a>    <font color="#4169E1">case</font> BV_MATMULT_MAT:
+<a name="line1022">1022: </a>    <font color="#4169E1">case</font> BV_MATMULT_MAT_SAVE:
+<a name="line1023">1023: </a>      bv->vmm = method;
+<a name="line1024">1024: </a>      <font color="#4169E1">break</font>;
+<a name="line1025">1025: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line1026">1026: </a>      SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Unknown matmult method"</font>);
+<a name="line1027">1027: </a>  }
+<a name="line1028">1028: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1029">1029: </a>}
+
+<a name="line1033">1033: </a><font color="#B22222">/*@</font>
+<a name="line1034">1034: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a> - Gets the method used for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation.</font>
+
+<a name="line1036">1036: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1038">1038: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1039">1039: </a><font color="#B22222">.  bv - basis vectors context</font>
+
+<a name="line1041">1041: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1042">1042: </a><font color="#B22222">.  method - the method for the <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>() operation</font>
+
+<a name="line1044">1044: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1046">1046: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a></font>
+<a name="line1047">1047: </a><font color="#B22222">@*/</font>
+<a name="line1048">1048: </a><strong><font color="#4169E1"><a name="BVGetMatMultMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetMatMultMethod.html#BVGetMatMultMethod">BVGetMatMultMethod</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,<a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a> *method)</font></strong>
+<a name="line1049">1049: </a>{
+<a name="line1053">1053: </a>  *method = bv->vmm;
+<a name="line1054">1054: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1055">1055: </a>}
+
+<a name="line1059">1059: </a><font color="#B22222">/*@</font>
+<a name="line1060">1060: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a> - Returns a Vec object that contains the entries of the</font>
+<a name="line1061">1061: </a><font color="#B22222">   requested column of the basis vectors object.</font>
+
+<a name="line1063">1063: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1065">1065: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1066">1066: </a><font color="#B22222">+  bv - the basis vectors context</font>
+<a name="line1067">1067: </a><font color="#B22222">-  j  - the index of the requested column</font>
+
+<a name="line1069">1069: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1070">1070: </a><font color="#B22222">.  v  - vector containing the jth column</font>
+
+<a name="line1072">1072: </a><font color="#B22222">   Notes:</font>
+<a name="line1073">1073: </a><font color="#B22222">   The returned Vec must be seen as a reference (not a copy) of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+<a name="line1074">1074: </a><font color="#B22222">   column, that is, modifying the Vec will change the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> entries as well.</font>
+
+<a name="line1076">1076: </a><font color="#B22222">   The returned Vec must not be destroyed. <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>() must be</font>
+<a name="line1077">1077: </a><font color="#B22222">   called when it is no longer needed. At most, two columns can be fetched,</font>
+<a name="line1078">1078: </a><font color="#B22222">   that is, this function can only be called twice before the corresponding</font>
+<a name="line1079">1079: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>() is invoked.</font>
+
+<a name="line1081">1081: </a><font color="#B22222">   A negative index j selects the i-th constraint, where i=-j. Constraints</font>
+<a name="line1082">1082: </a><font color="#B22222">   should not be modified.</font>
+
+<a name="line1084">1084: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line1086">1086: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>()</font>
+<a name="line1087">1087: </a><font color="#B22222">@*/</font>
+<a name="line1088">1088: </a><strong><font color="#4169E1"><a name="BVGetColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line1089">1089: </a>{
+<a name="line1091">1091: </a>  PetscInt       l;
+
+<a name="line1096">1096: </a>  BVCheckSizes(bv,1);
+<a name="line1098">1098: </a>  <font color="#4169E1">if</font> (j<0 && -j>bv->nc) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested constraint %D but only %D are available"</font>,-j,bv->nc);
+<a name="line1099">1099: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested column %D but only %D are available"</font>,j,bv->m);
+<a name="line1100">1100: </a>  <font color="#4169E1">if</font> (j==bv->ci[0] || j==bv->ci[1]) SETERRQ1(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Column %D already fetched in a previous call to <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>,j);
+<a name="line1101">1101: </a>  l = BVAvailableVec;
+<a name="line1102">1102: </a>  <font color="#4169E1">if</font> (l==-1) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Too many requested columns; you must call <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a> for one of the previously fetched columns"</font>);
+<a name="line1103">1103: </a>  (*bv->ops->getcolumn)(bv,j,v);
+<a name="line1104">1104: </a>  bv->ci[l] = j;
+<a name="line1105">1105: </a>  PetscObjectStateGet((PetscObject)bv->cv[l],&bv->st[l]);
+<a name="line1106">1106: </a>  PetscObjectGetId((PetscObject)bv->cv[l],&bv->id[l]);
+<a name="line1107">1107: </a>  *v = bv->cv[l];
+<a name="line1108">1108: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1109">1109: </a>}
+
+<a name="line1113">1113: </a><font color="#B22222">/*@</font>
+<a name="line1114">1114: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a> - Restore a column obtained with <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>().</font>
+
+<a name="line1116">1116: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1118">1118: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1119">1119: </a><font color="#B22222">+  bv - the basis vectors context</font>
+<a name="line1120">1120: </a><font color="#B22222">.  j  - the index of the column</font>
+<a name="line1121">1121: </a><font color="#B22222">-  v  - vector obtained with <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
+
+<a name="line1123">1123: </a><font color="#B22222">   Note:</font>
+<a name="line1124">1124: </a><font color="#B22222">   The arguments must match the corresponding call to <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>().</font>
+
+<a name="line1126">1126: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line1128">1128: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
+<a name="line1129">1129: </a><font color="#B22222">@*/</font>
+<a name="line1130">1130: </a><strong><font color="#4169E1"><a name="BVRestoreColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec *v)</font></strong>
+<a name="line1131">1131: </a>{
+<a name="line1132">1132: </a>  PetscErrorCode   ierr;
+<a name="line1133">1133: </a>  PetscObjectId    id;
+<a name="line1134">1134: </a>  PetscObjectState st;
+<a name="line1135">1135: </a>  PetscInt         l;
+
+<a name="line1140">1140: </a>  BVCheckSizes(bv,1);
+<a name="line1144">1144: </a>  <font color="#4169E1">if</font> (j<0 && -j>bv->nc) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested constraint %D but only %D are available"</font>,-j,bv->nc);
+<a name="line1145">1145: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"You requested column %D but only %D are available"</font>,j,bv->m);
+<a name="line1146">1146: </a>  <font color="#4169E1">if</font> (j!=bv->ci[0] && j!=bv->ci[1]) SETERRQ1(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Column %D has not been fetched with a call to <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>,j);
+<a name="line1147">1147: </a>  l = (j==bv->ci[0])? 0: 1;
+<a name="line1148">1148: </a>  PetscObjectGetId((PetscObject)*v,&id);
+<a name="line1149">1149: </a>  <font color="#4169E1">if</font> (id!=bv->id[l]) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_WRONG,<font color="#666666">"Argument 3 is not the same Vec that was obtained with <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>);
+<a name="line1150">1150: </a>  PetscObjectStateGet((PetscObject)*v,&st);
+<a name="line1151">1151: </a>  <font color="#4169E1">if</font> (st!=bv->st[l]) {
+<a name="line1152">1152: </a>    PetscObjectStateIncrease((PetscObject)bv);
+<a name="line1153">1153: </a>  }
+<a name="line1154">1154: </a>  <font color="#4169E1">if</font> (bv->ops->restorecolumn) {
+<a name="line1155">1155: </a>    (*bv->ops->restorecolumn)(bv,j,v);
+<a name="line1156">1156: </a>  } <font color="#4169E1">else</font> bv->cv[l] = NULL;
+<a name="line1157">1157: </a>  bv->ci[l] = -bv->nc-1;
+<a name="line1158">1158: </a>  bv->st[l] = -1;
+<a name="line1159">1159: </a>  bv->id[l] = 0;
+<a name="line1160">1160: </a>  *v = NULL;
+<a name="line1161">1161: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1162">1162: </a>}
+
+<a name="line1166">1166: </a><font color="#B22222">/*@C</font>
+<a name="line1167">1167: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a> - Returns a pointer to a contiguous array that contains this</font>
+<a name="line1168">1168: </a><font color="#B22222">   processor's portion of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> data.</font>
+
+<a name="line1170">1170: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1172">1172: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1173">1173: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line1175">1175: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1176">1176: </a><font color="#B22222">.  a  - location to put pointer to the array</font>
+
+<a name="line1178">1178: </a><font color="#B22222">   Notes:</font>
+<a name="line1179">1179: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>() must be called when access to the array is no longer needed.</font>
+<a name="line1180">1180: </a><font color="#B22222">   This operation may imply a data copy, for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> types that do not store</font>
+<a name="line1181">1181: </a><font color="#B22222">   data contiguously in memory.</font>
+
+<a name="line1183">1183: </a><font color="#B22222">   The pointer will normally point to the first entry of the first column,</font>
+<a name="line1184">1184: </a><font color="#B22222">   but if the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> has constraints then these go before the regular columns.</font>
+
+<a name="line1186">1186: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1188">1188: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>()</font>
+<a name="line1189">1189: </a><font color="#B22222">@*/</font>
+<a name="line1190">1190: </a><strong><font color="#4169E1"><a name="BVGetArray"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line1191">1191: </a>{
+
+<a name="line1197">1197: </a>  BVCheckSizes(bv,1);
+<a name="line1198">1198: </a>  (*bv->ops->getarray)(bv,a);
+<a name="line1199">1199: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1200">1200: </a>}
+
+<a name="line1204">1204: </a><font color="#B22222">/*@C</font>
+<a name="line1205">1205: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a> - Restore the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object after <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>() has been called.</font>
+
+<a name="line1207">1207: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1209">1209: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1210">1210: </a><font color="#B22222">+  bv - the basis vectors context</font>
+<a name="line1211">1211: </a><font color="#B22222">-  a  - location of pointer to array obtained from <a href="../../../../../docs/manualpages/BV/BVGetArray.html#BVGetArray">BVGetArray</a>()</font>
+
+<a name="line1213">1213: </a><font color="#B22222">   Note:</font>
+<a name="line1214">1214: </a><font color="#B22222">   This operation may imply a data copy, for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> types that do not store</font>
+<a name="line1215">1215: </a><font color="#B22222">   data contiguously in memory.</font>
+
+<a name="line1217">1217: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1219">1219: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
+<a name="line1220">1220: </a><font color="#B22222">@*/</font>
+<a name="line1221">1221: </a><strong><font color="#4169E1"><a name="BVRestoreArray"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar **a)</font></strong>
+<a name="line1222">1222: </a>{
+
+<a name="line1228">1228: </a>  BVCheckSizes(bv,1);
+<a name="line1229">1229: </a>  <font color="#4169E1">if</font> (bv->ops->restorearray) {
+<a name="line1230">1230: </a>    (*bv->ops->restorearray)(bv,a);
+<a name="line1231">1231: </a>  }
+<a name="line1232">1232: </a>  <font color="#4169E1">if</font> (a) *a = NULL;
+<a name="line1233">1233: </a>  PetscObjectStateIncrease((PetscObject)bv);
+<a name="line1234">1234: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1235">1235: </a>}
+
+<a name="line1239">1239: </a><font color="#B22222">/*@C</font>
+<a name="line1240">1240: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a> - Returns a read-only pointer to a contiguous array that</font>
+<a name="line1241">1241: </a><font color="#B22222">   contains this processor's portion of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> data.</font>
+
+<a name="line1243">1243: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line1245">1245: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1246">1246: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line1248">1248: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1249">1249: </a><font color="#B22222">.  a  - location to put pointer to the array</font>
+
+<a name="line1251">1251: </a><font color="#B22222">   Notes:</font>
+<a name="line1252">1252: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</a>() must be called when access to the array is no</font>
+<a name="line1253">1253: </a><font color="#B22222">   longer needed. This operation may imply a data copy, for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> types that</font>
+<a name="line1254">1254: </a><font color="#B22222">   do not store data contiguously in memory.</font>
+
+<a name="line1256">1256: </a><font color="#B22222">   The pointer will normally point to the first entry of the first column,</font>
+<a name="line1257">1257: </a><font color="#B22222">   but if the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> has constraints then these go before the regular columns.</font>
+
+<a name="line1259">1259: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line1261">1261: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRestoreArray.html#BVRestoreArray">BVRestoreArray</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>()</font>
+<a name="line1262">1262: </a><font color="#B22222">@*/</font>
+<a name="line1263">1263: </a><strong><font color="#4169E1"><a name="BVGetArrayRead"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line1264">1264: </a>{
 
-<a name="line1219">1219: </a><font color="#B22222">   Notes:</font>
-<a name="line1220">1220: </a><font color="#B22222">   The new <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> has the same type and dimensions as V, and it shares the same</font>
-<a name="line1221">1221: </a><font color="#B22222">   template vector. Also, the inner product matrix and orthogonalization</font>
-<a name="line1222">1222: </a><font color="#B22222">   options are copied.</font>
+<a name="line1270">1270: </a>  BVCheckSizes(bv,1);
+<a name="line1271">1271: </a>  (*bv->ops->getarrayread)(bv,a);
+<a name="line1272">1272: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1273">1273: </a>}
 
-<a name="line1224">1224: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>() DOES NOT COPY the entries, but rather allocates storage</font>
-<a name="line1225">1225: </a><font color="#B22222">   for the new basis vectors. Use <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>() to copy the contents.</font>
+<a name="line1277">1277: </a><font color="#B22222">/*@C</font>
+<a name="line1278">1278: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</a> - Restore the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object after <a href="../../../../../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a>() has</font>
+<a name="line1279">1279: </a><font color="#B22222">   been called.</font>
 
-<a name="line1227">1227: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line1281">1281: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
 
-<a name="line1229">1229: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(), <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(), <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(), <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>()</font>
-<a name="line1230">1230: </a><font color="#B22222">@*/</font>
-<a name="line1231">1231: </a><strong><font color="#4169E1"><a name="BVDuplicate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *W)</font></strong>
-<a name="line1232">1232: </a>{
+<a name="line1283">1283: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1284">1284: </a><font color="#B22222">+  bv - the basis vectors context</font>
+<a name="line1285">1285: </a><font color="#B22222">-  a  - location of pointer to array obtained from <a href="../../../../../docs/manualpages/BV/BVGetArrayRead.html#BVGetArrayRead">BVGetArrayRead</a>()</font>
 
-<a name="line1238">1238: </a>  BVCheckSizes(V,1);
-<a name="line1240">1240: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)V),W);
-<a name="line1241">1241: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(*W,V->t,V->m);
-<a name="line1242">1242: </a>  <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(*W,((PetscObject)V)->type_name);
-<a name="line1243">1243: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(*W,V->matrix,V->indef);
-<a name="line1244">1244: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(*W,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);
-<a name="line1245">1245: </a>  PetscObjectStateIncrease((PetscObject)*W);
-<a name="line1246">1246: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1247">1247: </a>}
-
-<a name="line1251">1251: </a><font color="#B22222">/*@</font>
-<a name="line1252">1252: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a> - Creates a new basis vector object of the same type and</font>
-<a name="line1253">1253: </a><font color="#B22222">   dimensions as an existing one, but with possibly different number of columns.</font>
+<a name="line1287">1287: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line1255">1255: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+<a name="line1289">1289: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>()</font>
+<a name="line1290">1290: </a><font color="#B22222">@*/</font>
+<a name="line1291">1291: </a><strong><font color="#4169E1"><a name="BVRestoreArrayRead"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRestoreArrayRead.html#BVRestoreArrayRead">BVRestoreArrayRead</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const PetscScalar **a)</font></strong>
+<a name="line1292">1292: </a>{
 
-<a name="line1257">1257: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1258">1258: </a><font color="#B22222">+  V - basis vectors context</font>
-<a name="line1259">1259: </a><font color="#B22222">-  m - the new number of columns</font>
-
-<a name="line1261">1261: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1262">1262: </a><font color="#B22222">.  W - location to put the new <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1264">1264: </a><font color="#B22222">   Note:</font>
-<a name="line1265">1265: </a><font color="#B22222">   This is equivalent of a call to <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>() followed by <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(). The</font>
-<a name="line1266">1266: </a><font color="#B22222">   contents of V are not copied to W.</font>
-
-<a name="line1268">1268: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1270">1270: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(), <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>()</font>
-<a name="line1271">1271: </a><font color="#B22222">@*/</font>
-<a name="line1272">1272: </a><strong><font color="#4169E1"><a name="BVDuplicateResize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt m,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *W)</font></strong>
-<a name="line1273">1273: </a>{
-
-<a name="line1279">1279: </a>  BVCheckSizes(V,1);
-<a name="line1282">1282: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)V),W);
-<a name="line1283">1283: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(*W,V->t,m);
-<a name="line1284">1284: </a>  <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(*W,((PetscObject)V)->type_name);
-<a name="line1285">1285: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(*W,V->matrix,V->indef);
-<a name="line1286">1286: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(*W,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);
-<a name="line1287">1287: </a>  PetscObjectStateIncrease((PetscObject)*W);
-<a name="line1288">1288: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1289">1289: </a>}
+<a name="line1298">1298: </a>  BVCheckSizes(bv,1);
+<a name="line1299">1299: </a>  <font color="#4169E1">if</font> (bv->ops->restorearrayread) {
+<a name="line1300">1300: </a>    (*bv->ops->restorearrayread)(bv,a);
+<a name="line1301">1301: </a>  }
+<a name="line1302">1302: </a>  <font color="#4169E1">if</font> (a) *a = NULL;
+<a name="line1303">1303: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1304">1304: </a>}
 
-<a name="line1293">1293: </a><font color="#B22222">/*@</font>
-<a name="line1294">1294: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a> - Copies a basis vector object into another one, W <- V.</font>
+<a name="line1308">1308: </a><font color="#B22222">/*@</font>
+<a name="line1309">1309: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a> - Creates a new Vec object with the same type and dimensions</font>
+<a name="line1310">1310: </a><font color="#B22222">   as the columns of the basis vectors object.</font>
 
-<a name="line1296">1296: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1298">1298: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1299">1299: </a><font color="#B22222">.  V - basis vectors context</font>
-
-<a name="line1301">1301: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1302">1302: </a><font color="#B22222">.  W - the copy</font>
-
-<a name="line1304">1304: </a><font color="#B22222">   Note:</font>
-<a name="line1305">1305: </a><font color="#B22222">   Both V and W must be distributed in the same manner; local copies are</font>
-<a name="line1306">1306: </a><font color="#B22222">   done. Only active columns (excluding the leading ones) are copied.</font>
-<a name="line1307">1307: </a><font color="#B22222">   In the destination W, columns are overwritten starting from the leading ones.</font>
-<a name="line1308">1308: </a><font color="#B22222">   Constraints are not copied.</font>
-
-<a name="line1310">1310: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line1312">1312: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(), <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line1313">1313: </a><font color="#B22222">@*/</font>
-<a name="line1314">1314: </a><strong><font color="#4169E1"><a name="BVCopy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
-<a name="line1315">1315: </a>{
-
-<a name="line1321">1321: </a>  BVCheckSizes(V,1);
-<a name="line1324">1324: </a>  BVCheckSizes(W,2);
-<a name="line1326">1326: </a>  <font color="#4169E1">if</font> (V->n!=W->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension V %D, W %D"</font>,V->n,W->n);
-<a name="line1327">1327: </a>  <font color="#4169E1">if</font> (V->k-V->l>W->m-W->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"W has %D non-leading columns, not enough to store %D columns"</font>,W->m-W->l,V->k-V->l);
-<a name="line1328">1328: </a>  <font color="#4169E1">if</font> (!V->n) <font color="#4169E1">return</font>(0);
-
-<a name="line1330">1330: </a>  PetscLogEventBegin(BV_Copy,V,W,0,0);
-<a name="line1331">1331: </a>  <font color="#4169E1">if</font> (V->indef && V->matrix && V->indef==W->indef && V->matrix==W->matrix) {
-<a name="line1332">1332: </a>    <font color="#B22222">/* copy signature */</font>
-<a name="line1333">1333: </a>    BV_AllocateSignature(W);
-<a name="line1334">1334: </a>    PetscMemcpy(W->omega+W->nc+W->l,V->omega+V->nc+V->l,(V->k-V->l)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line1335">1335: </a>  }
-<a name="line1336">1336: </a>  (*V->ops->copy)(V,W);
-<a name="line1337">1337: </a>  PetscLogEventEnd(BV_Copy,V,W,0,0);
-<a name="line1338">1338: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1339">1339: </a>}
-
-<a name="line1343">1343: </a><font color="#B22222">/*@</font>
-<a name="line1344">1344: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a> - Copies one of the columns of a basis vectors object into a Vec.</font>
-
-<a name="line1346">1346: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1348">1348: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1349">1349: </a><font color="#B22222">+  V - basis vectors context</font>
-<a name="line1350">1350: </a><font color="#B22222">-  j - the column number to be copied</font>
-
-<a name="line1352">1352: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1353">1353: </a><font color="#B22222">.  w - the copied column</font>
-
-<a name="line1355">1355: </a><font color="#B22222">   Note:</font>
-<a name="line1356">1356: </a><font color="#B22222">   Both V and w must be distributed in the same manner; local copies are done.</font>
-
-<a name="line1358">1358: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line1360">1360: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>()</font>
-<a name="line1361">1361: </a><font color="#B22222">@*/</font>
-<a name="line1362">1362: </a><strong><font color="#4169E1"><a name="BVCopyVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt j,Vec w)</font></strong>
-<a name="line1363">1363: </a>{
-<a name="line1365">1365: </a>  PetscInt       n,N;
-<a name="line1366">1366: </a>  Vec            z;
-
-<a name="line1371">1371: </a>  BVCheckSizes(V,1);
-
-<a name="line1376">1376: </a>  VecGetSize(w,&N);
-<a name="line1377">1377: </a>  VecGetLocalSize(w,&n);
-<a name="line1378">1378: </a>  <font color="#4169E1">if</font> (N!=V->N || n!=V->n) SETERRQ4(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,V->N,V->n);
-
-<a name="line1380">1380: </a>  PetscLogEventBegin(BV_Copy,V,w,0,0);
-<a name="line1381">1381: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&z);
-<a name="line1382">1382: </a>  VecCopy(z,w);
-<a name="line1383">1383: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&z);
-<a name="line1384">1384: </a>  PetscLogEventEnd(BV_Copy,V,w,0,0);
-<a name="line1385">1385: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1386">1386: </a>}
-
-<a name="line1390">1390: </a><font color="#B22222">/*@</font>
-<a name="line1391">1391: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a> - Copies the values from one of the columns to another one.</font>
-
-<a name="line1393">1393: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1395">1395: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line1396">1396: </a><font color="#B22222">+  V - basis vectors context</font>
-<a name="line1397">1397: </a><font color="#B22222">.  j - the number of the source column</font>
-<a name="line1398">1398: </a><font color="#B22222">-  i - the number of the destination column</font>
-
-<a name="line1400">1400: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line1402">1402: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>()</font>
-<a name="line1403">1403: </a><font color="#B22222">@*/</font>
-<a name="line1404">1404: </a><strong><font color="#4169E1"><a name="BVCopyColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt j,PetscInt i)</font></strong>
-<a name="line1405">1405: </a>{
-<a name="line1407">1407: </a>  Vec            z,w;
-
-<a name="line1412">1412: </a>  BVCheckSizes(V,1);
-<a name="line1415">1415: </a>  <font color="#4169E1">if</font> (j==i) <font color="#4169E1">return</font>(0);
-
-<a name="line1417">1417: </a>  PetscLogEventBegin(BV_Copy,V,0,0,0);
-<a name="line1418">1418: </a>  <font color="#4169E1">if</font> (V->omega) V->omega[i] = V->omega[j];
-<a name="line1419">1419: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&z);
-<a name="line1420">1420: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&w);
-<a name="line1421">1421: </a>  VecCopy(z,w);
-<a name="line1422">1422: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&z);
-<a name="line1423">1423: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&w);
-<a name="line1424">1424: </a>  PetscLogEventEnd(BV_Copy,V,0,0,0);
-<a name="line1425">1425: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1426">1426: </a>}
+<a name="line1312">1312: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1314">1314: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1315">1315: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line1317">1317: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1318">1318: </a><font color="#B22222">.  v  - the new vector</font>
+
+<a name="line1320">1320: </a><font color="#B22222">   Note:</font>
+<a name="line1321">1321: </a><font color="#B22222">   The user is responsible of destroying the returned vector.</font>
+
+<a name="line1323">1323: </a><font color="#B22222">   Level: beginner</font>
+<a name="line1324">1324: </a><font color="#B22222">@*/</font>
+<a name="line1325">1325: </a><strong><font color="#4169E1"><a name="BVCreateVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec *v)</font></strong>
+<a name="line1326">1326: </a>{
+
+<a name="line1331">1331: </a>  BVCheckSizes(bv,1);
+<a name="line1333">1333: </a>  VecDuplicate(bv->t,v);
+<a name="line1334">1334: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1335">1335: </a>}
+
+<a name="line1339">1339: </a><strong><font color="#4169E1"><a name="BVDuplicate_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVDuplicate_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt m,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *W)</font></strong>
+<a name="line1340">1340: </a>{
+
+<a name="line1344">1344: </a>  <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(PetscObjectComm((PetscObject)V),W);
+<a name="line1345">1345: </a>  <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(*W,V->t,m);
+<a name="line1346">1346: </a>  <a href="../../../../../docs/manualpages/BV/BVSetType.html#BVSetType">BVSetType</a>(*W,((PetscObject)V)->type_name);
+<a name="line1347">1347: </a>  <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(*W,V->matrix,V->indef);
+<a name="line1348">1348: </a>  <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(*W,V->orthog_type,V->orthog_ref,V->orthog_eta,V->orthog_block);
+<a name="line1349">1349: </a>  <font color="#4169E1">if</font> (V->ops->duplicate) { (*V->ops->duplicate)(V,W); }
+<a name="line1350">1350: </a>  PetscObjectStateIncrease((PetscObject)*W);
+<a name="line1351">1351: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1352">1352: </a>}
+
+<a name="line1356">1356: </a><font color="#B22222">/*@</font>
+<a name="line1357">1357: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a> - Creates a new basis vector object of the same type and</font>
+<a name="line1358">1358: </a><font color="#B22222">   dimensions as an existing one.</font>
+
+<a name="line1360">1360: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1362">1362: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1363">1363: </a><font color="#B22222">.  V - basis vectors context</font>
+
+<a name="line1365">1365: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1366">1366: </a><font color="#B22222">.  W - location to put the new <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1368">1368: </a><font color="#B22222">   Notes:</font>
+<a name="line1369">1369: </a><font color="#B22222">   The new <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> has the same type and dimensions as V, and it shares the same</font>
+<a name="line1370">1370: </a><font color="#B22222">   template vector. Also, the inner product matrix and orthogonalization</font>
+<a name="line1371">1371: </a><font color="#B22222">   options are copied.</font>
+
+<a name="line1373">1373: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>() DOES NOT COPY the entries, but rather allocates storage</font>
+<a name="line1374">1374: </a><font color="#B22222">   for the new basis vectors. Use <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>() to copy the contents.</font>
+
+<a name="line1376">1376: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1378">1378: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(), <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(), <a href="../../../../../docs/manualpages/BV/BVSetSizesFromVec.html#BVSetSizesFromVec">BVSetSizesFromVec</a>(), <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>()</font>
+<a name="line1379">1379: </a><font color="#B22222">@*/</font>
+<a name="line1380">1380: </a><strong><font color="#4169E1"><a name="BVDuplicate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *W)</font></strong>
+<a name="line1381">1381: </a>{
+
+<a name="line1387">1387: </a>  BVCheckSizes(V,1);
+<a name="line1389">1389: </a>  BVDuplicate_Private(V,V->m,W);
+<a name="line1390">1390: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1391">1391: </a>}
+
+<a name="line1395">1395: </a><font color="#B22222">/*@</font>
+<a name="line1396">1396: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a> - Creates a new basis vector object of the same type and</font>
+<a name="line1397">1397: </a><font color="#B22222">   dimensions as an existing one, but with possibly different number of columns.</font>
+
+<a name="line1399">1399: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1401">1401: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1402">1402: </a><font color="#B22222">+  V - basis vectors context</font>
+<a name="line1403">1403: </a><font color="#B22222">-  m - the new number of columns</font>
+
+<a name="line1405">1405: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1406">1406: </a><font color="#B22222">.  W - location to put the new <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1408">1408: </a><font color="#B22222">   Note:</font>
+<a name="line1409">1409: </a><font color="#B22222">   This is equivalent of a call to <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>() followed by <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(). The</font>
+<a name="line1410">1410: </a><font color="#B22222">   contents of V are not copied to W.</font>
+
+<a name="line1412">1412: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1414">1414: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(), <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>()</font>
+<a name="line1415">1415: </a><font color="#B22222">@*/</font>
+<a name="line1416">1416: </a><strong><font color="#4169E1"><a name="BVDuplicateResize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt m,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *W)</font></strong>
+<a name="line1417">1417: </a>{
+
+<a name="line1423">1423: </a>  BVCheckSizes(V,1);
+<a name="line1426">1426: </a>  BVDuplicate_Private(V,m,W);
+<a name="line1427">1427: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1428">1428: </a>}
+
+<a name="line1432">1432: </a><font color="#B22222">/*@</font>
+<a name="line1433">1433: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a> - Copies a basis vector object into another one, W <- V.</font>
+
+<a name="line1435">1435: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1437">1437: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1438">1438: </a><font color="#B22222">.  V - basis vectors context</font>
+
+<a name="line1440">1440: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1441">1441: </a><font color="#B22222">.  W - the copy</font>
+
+<a name="line1443">1443: </a><font color="#B22222">   Note:</font>
+<a name="line1444">1444: </a><font color="#B22222">   Both V and W must be distributed in the same manner; local copies are</font>
+<a name="line1445">1445: </a><font color="#B22222">   done. Only active columns (excluding the leading ones) are copied.</font>
+<a name="line1446">1446: </a><font color="#B22222">   In the destination W, columns are overwritten starting from the leading ones.</font>
+<a name="line1447">1447: </a><font color="#B22222">   Constraints are not copied.</font>
+
+<a name="line1449">1449: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line1451">1451: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(), <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line1452">1452: </a><font color="#B22222">@*/</font>
+<a name="line1453">1453: </a><strong><font color="#4169E1"><a name="BVCopy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> W)</font></strong>
+<a name="line1454">1454: </a>{
+
+<a name="line1460">1460: </a>  BVCheckSizes(V,1);
+<a name="line1463">1463: </a>  BVCheckSizes(W,2);
+<a name="line1465">1465: </a>  <font color="#4169E1">if</font> (V->n!=W->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension V %D, W %D"</font>,V->n,W->n);
+<a name="line1466">1466: </a>  <font color="#4169E1">if</font> (V->k-V->l>W->m-W->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"W has %D non-leading columns, not enough to store %D columns"</font>,W->m-W->l,V->k-V->l);
+<a name="line1467">1467: </a>  <font color="#4169E1">if</font> (!V->n) <font color="#4169E1">return</font>(0);
+
+<a name="line1469">1469: </a>  PetscLogEventBegin(BV_Copy,V,W,0,0);
+<a name="line1470">1470: </a>  <font color="#4169E1">if</font> (V->indef && V->matrix && V->indef==W->indef && V->matrix==W->matrix) {
+<a name="line1471">1471: </a>    <font color="#B22222">/* copy signature */</font>
+<a name="line1472">1472: </a>    BV_AllocateSignature(W);
+<a name="line1473">1473: </a>    PetscMemcpy(W->omega+W->nc+W->l,V->omega+V->nc+V->l,(V->k-V->l)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line1474">1474: </a>  }
+<a name="line1475">1475: </a>  (*V->ops->copy)(V,W);
+<a name="line1476">1476: </a>  PetscLogEventEnd(BV_Copy,V,W,0,0);
+<a name="line1477">1477: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1478">1478: </a>}
+
+<a name="line1482">1482: </a><font color="#B22222">/*@</font>
+<a name="line1483">1483: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a> - Copies one of the columns of a basis vectors object into a Vec.</font>
+
+<a name="line1485">1485: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1487">1487: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1488">1488: </a><font color="#B22222">+  V - basis vectors context</font>
+<a name="line1489">1489: </a><font color="#B22222">-  j - the column number to be copied</font>
+
+<a name="line1491">1491: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1492">1492: </a><font color="#B22222">.  w - the copied column</font>
+
+<a name="line1494">1494: </a><font color="#B22222">   Note:</font>
+<a name="line1495">1495: </a><font color="#B22222">   Both V and w must be distributed in the same manner; local copies are done.</font>
+
+<a name="line1497">1497: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line1499">1499: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>()</font>
+<a name="line1500">1500: </a><font color="#B22222">@*/</font>
+<a name="line1501">1501: </a><strong><font color="#4169E1"><a name="BVCopyVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt j,Vec w)</font></strong>
+<a name="line1502">1502: </a>{
+<a name="line1504">1504: </a>  PetscInt       n,N;
+<a name="line1505">1505: </a>  Vec            z;
+
+<a name="line1510">1510: </a>  BVCheckSizes(V,1);
+
+<a name="line1515">1515: </a>  VecGetSize(w,&N);
+<a name="line1516">1516: </a>  VecGetLocalSize(w,&n);
+<a name="line1517">1517: </a>  <font color="#4169E1">if</font> (N!=V->N || n!=V->n) SETERRQ4(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,V->N,V->n);
+
+<a name="line1519">1519: </a>  PetscLogEventBegin(BV_Copy,V,w,0,0);
+<a name="line1520">1520: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&z);
+<a name="line1521">1521: </a>  VecCopy(z,w);
+<a name="line1522">1522: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&z);
+<a name="line1523">1523: </a>  PetscLogEventEnd(BV_Copy,V,w,0,0);
+<a name="line1524">1524: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1525">1525: </a>}
+
+<a name="line1529">1529: </a><font color="#B22222">/*@</font>
+<a name="line1530">1530: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a> - Copies the values from one of the columns to another one.</font>
+
+<a name="line1532">1532: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1534">1534: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line1535">1535: </a><font color="#B22222">+  V - basis vectors context</font>
+<a name="line1536">1536: </a><font color="#B22222">.  j - the number of the source column</font>
+<a name="line1537">1537: </a><font color="#B22222">-  i - the number of the destination column</font>
+
+<a name="line1539">1539: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line1541">1541: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVCopyVec.html#BVCopyVec">BVCopyVec</a>()</font>
+<a name="line1542">1542: </a><font color="#B22222">@*/</font>
+<a name="line1543">1543: </a><strong><font color="#4169E1"><a name="BVCopyColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCopyColumn.html#BVCopyColumn">BVCopyColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt j,PetscInt i)</font></strong>
+<a name="line1544">1544: </a>{
+<a name="line1546">1546: </a>  Vec            z,w;
+
+<a name="line1551">1551: </a>  BVCheckSizes(V,1);
+<a name="line1554">1554: </a>  <font color="#4169E1">if</font> (j==i) <font color="#4169E1">return</font>(0);
+
+<a name="line1556">1556: </a>  PetscLogEventBegin(BV_Copy,V,0,0,0);
+<a name="line1557">1557: </a>  <font color="#4169E1">if</font> (V->omega) V->omega[i] = V->omega[j];
+<a name="line1558">1558: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&z);
+<a name="line1559">1559: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,i,&w);
+<a name="line1560">1560: </a>  VecCopy(z,w);
+<a name="line1561">1561: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&z);
+<a name="line1562">1562: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,i,&w);
+<a name="line1563">1563: </a>  PetscLogEventEnd(BV_Copy,V,0,0,0);
+<a name="line1564">1564: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1565">1565: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/interface/bvblas.c b/src/sys/classes/bv/interface/bvblas.c
index 030d6b6..3713bcb 100644
--- a/src/sys/classes/bv/interface/bvblas.c
+++ b/src/sys/classes/bv/interface/bvblas.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -182,19 +182,23 @@ PetscErrorCode BVMultInPlace_Vecs_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt
 #undef __FUNCT__
 #define __FUNCT__ "BVAXPY_BLAS_Private"
 /*
-    B := alpha*A + B
+    B := alpha*A + beta*B
 
     A,B are nxk (ld=n)
 */
-PetscErrorCode BVAXPY_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar *B)
+PetscErrorCode BVAXPY_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar beta,PetscScalar *B)
 {
   PetscErrorCode ierr;
   PetscBLASInt   m,one=1;
 
   PetscFunctionBegin;
   ierr = PetscBLASIntCast(n_*k_,&m);CHKERRQ(ierr);
+  if (beta!=(PetscScalar)1.0) {
+    PetscStackCallBLAS("BLASscal",BLASscal_(&m,&beta,B,&one));
+    ierr = PetscLogFlops(m);CHKERRQ(ierr);
+  }
   PetscStackCallBLAS("BLASaxpy",BLASaxpy_(&m,&alpha,A,&one,B,&one));
-  ierr = PetscLogFlops(2.0*n_*k_);CHKERRQ(ierr);
+  ierr = PetscLogFlops(2.0*m);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -209,7 +213,7 @@ PetscErrorCode BVDot_BLAS_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt k_,Pets
 {
   PetscErrorCode ierr;
   PetscScalar    zero=0.0,one=1.0,*CC;
-  PetscBLASInt   m,n,k,ldc,j;
+  PetscBLASInt   m,n,k,ldc,j,len;
 
   PetscFunctionBegin;
   ierr = PetscBLASIntCast(m_,&m);CHKERRQ(ierr);
@@ -221,13 +225,15 @@ PetscErrorCode BVDot_BLAS_Private(BV bv,PetscInt m_,PetscInt n_,PetscInt k_,Pets
       ierr = BVAllocateWork_Private(bv,m*n);CHKERRQ(ierr);
       if (k) PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,bv->work,&ldc));
       else { ierr = PetscMemzero(bv->work,m*n*sizeof(PetscScalar));CHKERRQ(ierr); }
-      ierr = MPI_Allreduce(bv->work,C,m*n,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
+      ierr = PetscMPIIntCast(m*n,&len);CHKERRQ(ierr);
+      ierr = MPI_Allreduce(bv->work,C,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
     } else {
       ierr = BVAllocateWork_Private(bv,2*m*n);CHKERRQ(ierr);
       CC = bv->work+m*n;
       if (k) PetscStackCallBLAS("BLASgemm",BLASgemm_("C","N",&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,bv->work,&m));
       else { ierr = PetscMemzero(bv->work,m*n*sizeof(PetscScalar));CHKERRQ(ierr); }
-      ierr = MPI_Allreduce(bv->work,CC,m*n,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
+      ierr = PetscMPIIntCast(m*n,&len);CHKERRQ(ierr);
+      ierr = MPI_Allreduce(bv->work,CC,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
       for (j=0;j<n;j++) {
         ierr = PetscMemcpy(C+j*ldc,CC+j*m,m*sizeof(PetscScalar));CHKERRQ(ierr);
       }
@@ -250,7 +256,7 @@ PetscErrorCode BVDotVec_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,const PetscSc
 {
   PetscErrorCode ierr;
   PetscScalar    zero=0.0,done=1.0;
-  PetscBLASInt   n,k,one=1;
+  PetscBLASInt   n,k,one=1,len;
 
   PetscFunctionBegin;
   ierr = PetscBLASIntCast(n_,&n);CHKERRQ(ierr);
@@ -262,7 +268,8 @@ PetscErrorCode BVDotVec_BLAS_Private(BV bv,PetscInt n_,PetscInt k_,const PetscSc
     } else {
       ierr = PetscMemzero(bv->work,k*sizeof(PetscScalar));CHKERRQ(ierr);
     }
-    ierr = MPI_Allreduce(bv->work,y,k,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
+    ierr = PetscMPIIntCast(k,&len);CHKERRQ(ierr);
+    ierr = MPI_Allreduce(bv->work,y,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
   } else {
     if (n) PetscStackCallBLAS("BLASgemv",BLASgemv_("C",&n,&k,&done,A,&n,x,&one,&zero,y,&one));
   }
@@ -283,7 +290,7 @@ PetscErrorCode BVScale_BLAS_Private(BV bv,PetscInt n_,PetscScalar *A,PetscScalar
   PetscFunctionBegin;
   if (alpha == (PetscScalar)0.0) {
     ierr = PetscMemzero(A,n_*sizeof(PetscScalar));CHKERRQ(ierr);
-  } else {
+  } else if (alpha!=(PetscScalar)1.0) {
     ierr = PetscBLASIntCast(n_,&n);CHKERRQ(ierr);
     PetscStackCallBLAS("BLASscal",BLASscal_(&n,&alpha,A,&one));
     ierr = PetscLogFlops(n);CHKERRQ(ierr);
@@ -300,6 +307,7 @@ PetscErrorCode BVNorm_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,const PetscSc
 {
   PetscErrorCode ierr;
   PetscBLASInt   m,n,i,j;
+  PetscMPIInt    len;
   PetscReal      lnrm,*rwork=NULL,*rwork2=NULL;
 
   PetscFunctionBegin;
@@ -326,7 +334,9 @@ PetscErrorCode BVNorm_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,const PetscSc
           rwork[j] += PetscAbsScalar(A[i+j*m_]);
         }
       }
-      ierr = MPI_Allreduce(rwork,rwork2,n_,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
+      ierr = PetscMPIIntCast(n_,&len);CHKERRQ(ierr);
+      ierr = MPI_Allreduce(rwork,rwork2,len,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
+      *nrm = 0.0;
       for (j=0;j<n_;j++) if (rwork2[j] > *nrm) *nrm = rwork2[j];
     } else {
       *nrm = LAPACKlange_("O",&m,&n,(PetscScalar*)A,&m,rwork);
@@ -352,14 +362,14 @@ PetscErrorCode BVNorm_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,const PetscSc
 */
 PetscErrorCode BVOrthogonalize_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,PetscScalar *Q,PetscScalar *R,PetscBool mpi)
 {
-#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_ORGQR)
+#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQRF/ORGQR - Lapack routines are unavailable");
 #else
   PetscErrorCode ierr;
   PetscBLASInt   m,n,i,j,k,l,nb,lwork,info;
   PetscScalar    *tau,*work,*Rl=NULL,*A=NULL,*C=NULL,one=1.0,zero=0.0;
-  PetscMPIInt    rank,size;
+  PetscMPIInt    rank,size,len;
 
   PetscFunctionBegin;
   ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
@@ -399,15 +409,16 @@ PetscErrorCode BVOrthogonalize_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,Pets
   }
 
   /* Compute orthogonal matrix in Q */
-  PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&m,&n,&k,Q,&m,tau,work,&lwork,&info));
+  PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&m,&n,&k,Q,&m,tau,work,&lwork,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
 
   if (mpi) {
 
     /* Stack triangular matrices */
     ierr = PetscBLASIntCast(n*size,&l);CHKERRQ(ierr);
+    ierr = PetscMPIIntCast(n,&len);CHKERRQ(ierr);
     for (j=0;j<n;j++) {
-      ierr = MPI_Allgather(Rl+j*n,n,MPIU_SCALAR,A+j*l,n,MPIU_SCALAR,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
+      ierr = MPI_Allgather(Rl+j*n,len,MPIU_SCALAR,A+j*l,len,MPIU_SCALAR,PetscObjectComm((PetscObject)bv));CHKERRQ(ierr);
     }
 
     /* Compute QR */
@@ -423,7 +434,7 @@ PetscErrorCode BVOrthogonalize_LAPACK_Private(BV bv,PetscInt m_,PetscInt n_,Pets
     }
 
     /* Accumulate orthogonal matrix */
-    PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&l,&n,&n,A,&l,tau,work,&lwork,&info));
+    PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&l,&n,&n,A,&l,tau,work,&lwork,&info));
     if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
     PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&m,&n,&n,&one,Q,&m,A+rank*n,&l,&zero,C,&m));
     ierr = PetscMemcpy(Q,C,m*n*sizeof(PetscScalar));CHKERRQ(ierr);
diff --git a/src/sys/classes/bv/interface/bvblas.c.html b/src/sys/classes/bv/interface/bvblas.c.html
index d0dd6c9..e1e8ca7 100644
--- a/src/sys/classes/bv/interface/bvblas.c.html
+++ b/src/sys/classes/bv/interface/bvblas.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvblas.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:25+00:00">
+<meta name="date" content="2016-05-16T10:32:18+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvblas.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvblas.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> private kernels that use the BLAS.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -177,235 +177,246 @@
 <a name="line180">180: </a>}
 
 <a name="line184">184: </a><font color="#B22222">/*</font>
-<a name="line185">185: </a><font color="#B22222">    B := alpha*A + B</font>
+<a name="line185">185: </a><font color="#B22222">    B := alpha*A + beta*B</font>
 
 <a name="line187">187: </a><font color="#B22222">    A,B are nxk (ld=n)</font>
 <a name="line188">188: </a><font color="#B22222">*/</font>
-<a name="line189">189: </a><strong><font color="#4169E1"><a name="BVAXPY_BLAS_Private"></a>PetscErrorCode BVAXPY_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar *B)</font></strong>
+<a name="line189">189: </a><strong><font color="#4169E1"><a name="BVAXPY_BLAS_Private"></a>PetscErrorCode BVAXPY_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt n_,PetscInt k_,PetscScalar alpha,const PetscScalar *A,PetscScalar beta,PetscScalar *B)</font></strong>
 <a name="line190">190: </a>{
 <a name="line192">192: </a>  PetscBLASInt   m,one=1;
 
 <a name="line195">195: </a>  PetscBLASIntCast(n_*k_,&m);
-<a name="line196">196: </a>  PetscStackCallBLAS(<font color="#666666">"BLASaxpy"</font>,BLASaxpy_(&m,&alpha,A,&one,B,&one));
-<a name="line197">197: </a>  PetscLogFlops(2.0*n_*k_);
-<a name="line198">198: </a>  <font color="#4169E1">return</font>(0);
-<a name="line199">199: </a>}
-
-<a name="line203">203: </a><font color="#B22222">/*</font>
-<a name="line204">204: </a><font color="#B22222">    C := A'*B</font>
-
-<a name="line206">206: </a><font color="#B22222">    A' is mxk (ld=k), B is kxn (ld=k), C is mxn (ld=ldc)</font>
-<a name="line207">207: </a><font color="#B22222">*/</font>
-<a name="line208">208: </a><strong><font color="#4169E1"><a name="BVDot_BLAS_Private"></a>PetscErrorCode BVDot_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m_,PetscInt n_,PetscInt k_,PetscInt ldc_,const PetscScalar *A,const PetscScalar *B,PetscScalar *C,PetscBool mpi)</font></strong>
-<a name="line209">209: </a>{
-<a name="line211">211: </a>  PetscScalar    zero=0.0,one=1.0,*CC;
-<a name="line212">212: </a>  PetscBLASInt   m,n,k,ldc,j;
-
-<a name="line215">215: </a>  PetscBLASIntCast(m_,&m);
-<a name="line216">216: </a>  PetscBLASIntCast(n_,&n);
-<a name="line217">217: </a>  PetscBLASIntCast(k_,&k);
-<a name="line218">218: </a>  PetscBLASIntCast(ldc_,&ldc);
-<a name="line219">219: </a>  <font color="#4169E1">if</font> (mpi) {
-<a name="line220">220: </a>    <font color="#4169E1">if</font> (ldc==m) {
-<a name="line221">221: </a>      BVAllocateWork_Private(bv,m*n);
-<a name="line222">222: </a>      <font color="#4169E1">if</font> (k) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,bv->work,&ldc));
-<a name="line223">223: </a>      <font color="#4169E1">else</font> { PetscMemzero(bv->work,m*n*<font color="#4169E1">sizeof</font>(PetscScalar)); }
-<a name="line224">224: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(bv->work,C,m*n,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));
-<a name="line225">225: </a>    } <font color="#4169E1">else</font> {
-<a name="line226">226: </a>      BVAllocateWork_Private(bv,2*m*n);
-<a name="line227">227: </a>      CC = bv->work+m*n;
-<a name="line228">228: </a>      <font color="#4169E1">if</font> (k) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,bv->work,&m));
-<a name="line229">229: </a>      <font color="#4169E1">else</font> { PetscMemzero(bv->work,m*n*<font color="#4169E1">sizeof</font>(PetscScalar)); }
-<a name="line230">230: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(bv->work,CC,m*n,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));
-<a name="line231">231: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++) {
-<a name="line232">232: </a>        PetscMemcpy(C+j*ldc,CC+j*m,m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line233">233: </a>      }
-<a name="line234">234: </a>    }
-<a name="line235">235: </a>  } <font color="#4169E1">else</font> {
-<a name="line236">236: </a>    <font color="#4169E1">if</font> (k) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,C,&ldc));
-<a name="line237">237: </a>  }
-<a name="line238">238: </a>  PetscLogFlops(2.0*m*n*k);
-<a name="line239">239: </a>  <font color="#4169E1">return</font>(0);
-<a name="line240">240: </a>}
-
-<a name="line244">244: </a><font color="#B22222">/*</font>
-<a name="line245">245: </a><font color="#B22222">    y := A'*x</font>
-
-<a name="line247">247: </a><font color="#B22222">    A is nxk (ld=n)</font>
-<a name="line248">248: </a><font color="#B22222">*/</font>
-<a name="line249">249: </a><strong><font color="#4169E1"><a name="BVDotVec_BLAS_Private"></a>PetscErrorCode BVDotVec_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt n_,PetscInt k_,const PetscScalar *A,const PetscScalar *x,PetscScalar *y,PetscBool mpi)</font></strong>
-<a name="line250">250: </a>{
-<a name="line252">252: </a>  PetscScalar    zero=0.0,done=1.0;
-<a name="line253">253: </a>  PetscBLASInt   n,k,one=1;
-
-<a name="line256">256: </a>  PetscBLASIntCast(n_,&n);
-<a name="line257">257: </a>  PetscBLASIntCast(k_,&k);
-<a name="line258">258: </a>  <font color="#4169E1">if</font> (mpi) {
-<a name="line259">259: </a>    BVAllocateWork_Private(bv,k);
-<a name="line260">260: </a>    <font color="#4169E1">if</font> (n) {
-<a name="line261">261: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&k,&done,A,&n,x,&one,&zero,bv->work,&one));
-<a name="line262">262: </a>    } <font color="#4169E1">else</font> {
-<a name="line263">263: </a>      PetscMemzero(bv->work,k*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line264">264: </a>    }
-<a name="line265">265: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(bv->work,y,k,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));
-<a name="line266">266: </a>  } <font color="#4169E1">else</font> {
-<a name="line267">267: </a>    <font color="#4169E1">if</font> (n) PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&k,&done,A,&n,x,&one,&zero,y,&one));
-<a name="line268">268: </a>  }
-<a name="line269">269: </a>  PetscLogFlops(2.0*n*k);
-<a name="line270">270: </a>  <font color="#4169E1">return</font>(0);
-<a name="line271">271: </a>}
-
-<a name="line275">275: </a><font color="#B22222">/*</font>
-<a name="line276">276: </a><font color="#B22222">    Scale n scalars</font>
-<a name="line277">277: </a><font color="#B22222">*/</font>
-<a name="line278">278: </a><strong><font color="#4169E1"><a name="BVScale_BLAS_Private"></a>PetscErrorCode BVScale_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt n_,PetscScalar *A,PetscScalar alpha)</font></strong>
-<a name="line279">279: </a>{
-<a name="line281">281: </a>  PetscBLASInt   n,one=1;
-
-<a name="line284">284: </a>  <font color="#4169E1">if</font> (alpha == (PetscScalar)0.0) {
-<a name="line285">285: </a>    PetscMemzero(A,n_*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line286">286: </a>  } <font color="#4169E1">else</font> {
-<a name="line287">287: </a>    PetscBLASIntCast(n_,&n);
-<a name="line288">288: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&alpha,A,&one));
-<a name="line289">289: </a>    PetscLogFlops(n);
-<a name="line290">290: </a>  }
-<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
-<a name="line292">292: </a>}
-
-<a name="line296">296: </a><font color="#B22222">/*</font>
-<a name="line297">297: </a><font color="#B22222">    Compute ||A|| for an mxn matrix</font>
-<a name="line298">298: </a><font color="#B22222">*/</font>
-<a name="line299">299: </a><strong><font color="#4169E1"><a name="BVNorm_LAPACK_Private"></a>PetscErrorCode BVNorm_LAPACK_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m_,PetscInt n_,const PetscScalar *A,NormType type,PetscReal *nrm,PetscBool mpi)</font></strong>
-<a name="line300">300: </a>{
-<a name="line302">302: </a>  PetscBLASInt   m,n,i,j;
-<a name="line303">303: </a>  PetscReal      lnrm,*rwork=NULL,*rwork2=NULL;
-
-<a name="line306">306: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line307">307: </a>  PetscBLASIntCast(m_,&m);
-<a name="line308">308: </a>  PetscBLASIntCast(n_,&n);
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (type==NORM_FROBENIUS || type==NORM_2) {
-<a name="line310">310: </a>    lnrm = LAPACKlange_(<font color="#666666">"F"</font>,&m,&n,(PetscScalar*)A,&m,rwork);
-<a name="line311">311: </a>    <font color="#4169E1">if</font> (mpi) {
-<a name="line312">312: </a>      lnrm = lnrm*lnrm;
-<a name="line313">313: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&lnrm,nrm,1,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)bv));
-<a name="line314">314: </a>      *nrm = PetscSqrtReal(*nrm);
-<a name="line315">315: </a>    } <font color="#4169E1">else</font> *nrm = lnrm;
-<a name="line316">316: </a>    PetscLogFlops(2.0*m*n);
-<a name="line317">317: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (type==NORM_1) {
-<a name="line318">318: </a>    <font color="#4169E1">if</font> (mpi) {
-<a name="line319">319: </a>      BVAllocateWork_Private(bv,2*n_);
-<a name="line320">320: </a>      rwork = (PetscReal*)bv->work;
-<a name="line321">321: </a>      rwork2 = rwork+n_;
-<a name="line322">322: </a>      PetscMemzero(rwork,n_*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line323">323: </a>      PetscMemzero(rwork2,n_*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line324">324: </a>      <font color="#4169E1">for</font> (j=0;j<n_;j++) {
-<a name="line325">325: </a>        <font color="#4169E1">for</font> (i=0;i<m_;i++) {
-<a name="line326">326: </a>          rwork[j] += PetscAbsScalar(A[i+j*m_]);
-<a name="line327">327: </a>        }
-<a name="line328">328: </a>      }
-<a name="line329">329: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(rwork,rwork2,n_,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)bv));
-<a name="line330">330: </a>      <font color="#4169E1">for</font> (j=0;j<n_;j++) <font color="#4169E1">if</font> (rwork2[j] > *nrm) *nrm = rwork2[j];
-<a name="line331">331: </a>    } <font color="#4169E1">else</font> {
-<a name="line332">332: </a>      *nrm = LAPACKlange_(<font color="#666666">"O"</font>,&m,&n,(PetscScalar*)A,&m,rwork);
-<a name="line333">333: </a>    }
-<a name="line334">334: </a>    PetscLogFlops(1.0*m*n);
-<a name="line335">335: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (type==NORM_INFINITY) {
-<a name="line336">336: </a>    BVAllocateWork_Private(bv,m_);
-<a name="line337">337: </a>    rwork = (PetscReal*)bv->work;
-<a name="line338">338: </a>    lnrm = LAPACKlange_(<font color="#666666">"I"</font>,&m,&n,(PetscScalar*)A,&m,rwork);
-<a name="line339">339: </a>    <font color="#4169E1">if</font> (mpi) {
-<a name="line340">340: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&lnrm,nrm,1,MPIU_REAL,MPIU_MAX,PetscObjectComm((PetscObject)bv));
-<a name="line341">341: </a>    } <font color="#4169E1">else</font> *nrm = lnrm;
-<a name="line342">342: </a>    PetscLogFlops(1.0*m*n);
-<a name="line343">343: </a>  }
-<a name="line344">344: </a>  PetscFPTrapPop();
-<a name="line345">345: </a>  <font color="#4169E1">return</font>(0);
-<a name="line346">346: </a>}
-
-<a name="line350">350: </a><font color="#B22222">/*</font>
-<a name="line351">351: </a><font color="#B22222">    QR factorization of an mxn matrix</font>
-<a name="line352">352: </a><font color="#B22222">*/</font>
-<a name="line353">353: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_LAPACK_Private"></a>PetscErrorCode BVOrthogonalize_LAPACK_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m_,PetscInt n_,PetscScalar *Q,PetscScalar *R,PetscBool mpi)</font></strong>
-<a name="line354">354: </a>{
-<a name="line355">355: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_ORGQR)</font>
-<a name="line357">357: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routines are unavailable"</font>);
-<a name="line358">358: </a><font color="#A020F0">#else</font>
-<a name="line360">360: </a>  PetscBLASInt   m,n,i,j,k,l,nb,lwork,info;
-<a name="line361">361: </a>  PetscScalar    *tau,*work,*Rl=NULL,*A=NULL,*C=NULL,one=1.0,zero=0.0;
-<a name="line362">362: </a>  PetscMPIInt    rank,size;
-
-<a name="line365">365: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line366">366: </a>  PetscBLASIntCast(m_,&m);
-<a name="line367">367: </a>  PetscBLASIntCast(n_,&n);
-<a name="line368">368: </a>  k = PetscMin(m,n);
-<a name="line369">369: </a>  nb = 16;
-<a name="line370">370: </a>  <font color="#4169E1">if</font> (mpi) {
-<a name="line371">371: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)bv),&rank);
-<a name="line372">372: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)bv),&size);
-<a name="line373">373: </a>    BVAllocateWork_Private(bv,k+n*nb+n*n+n*n*size+m*n);
-<a name="line374">374: </a>  } <font color="#4169E1">else</font> {
-<a name="line375">375: </a>    BVAllocateWork_Private(bv,k+n*nb);
-<a name="line376">376: </a>   }
-<a name="line377">377: </a>  tau = bv->work;
-<a name="line378">378: </a>  work = bv->work+k;
-<a name="line379">379: </a>  PetscBLASIntCast(n*nb,&lwork);
+<a name="line196">196: </a>  <font color="#4169E1">if</font> (beta!=(PetscScalar)1.0) {
+<a name="line197">197: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&m,&beta,B,&one));
+<a name="line198">198: </a>    PetscLogFlops(m);
+<a name="line199">199: </a>  }
+<a name="line200">200: </a>  PetscStackCallBLAS(<font color="#666666">"BLASaxpy"</font>,BLASaxpy_(&m,&alpha,A,&one,B,&one));
+<a name="line201">201: </a>  PetscLogFlops(2.0*m);
+<a name="line202">202: </a>  <font color="#4169E1">return</font>(0);
+<a name="line203">203: </a>}
+
+<a name="line207">207: </a><font color="#B22222">/*</font>
+<a name="line208">208: </a><font color="#B22222">    C := A'*B</font>
+
+<a name="line210">210: </a><font color="#B22222">    A' is mxk (ld=k), B is kxn (ld=k), C is mxn (ld=ldc)</font>
+<a name="line211">211: </a><font color="#B22222">*/</font>
+<a name="line212">212: </a><strong><font color="#4169E1"><a name="BVDot_BLAS_Private"></a>PetscErrorCode BVDot_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m_,PetscInt n_,PetscInt k_,PetscInt ldc_,const PetscScalar *A,const PetscScalar *B,PetscScalar *C,PetscBool mpi)</font></strong>
+<a name="line213">213: </a>{
+<a name="line215">215: </a>  PetscScalar    zero=0.0,one=1.0,*CC;
+<a name="line216">216: </a>  PetscBLASInt   m,n,k,ldc,j,len;
+
+<a name="line219">219: </a>  PetscBLASIntCast(m_,&m);
+<a name="line220">220: </a>  PetscBLASIntCast(n_,&n);
+<a name="line221">221: </a>  PetscBLASIntCast(k_,&k);
+<a name="line222">222: </a>  PetscBLASIntCast(ldc_,&ldc);
+<a name="line223">223: </a>  <font color="#4169E1">if</font> (mpi) {
+<a name="line224">224: </a>    <font color="#4169E1">if</font> (ldc==m) {
+<a name="line225">225: </a>      BVAllocateWork_Private(bv,m*n);
+<a name="line226">226: </a>      <font color="#4169E1">if</font> (k) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,bv->work,&ldc));
+<a name="line227">227: </a>      <font color="#4169E1">else</font> { PetscMemzero(bv->work,m*n*<font color="#4169E1">sizeof</font>(PetscScalar)); }
+<a name="line228">228: </a>      PetscMPIIntCast(m*n,&len);
+<a name="line229">229: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(bv->work,C,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));
+<a name="line230">230: </a>    } <font color="#4169E1">else</font> {
+<a name="line231">231: </a>      BVAllocateWork_Private(bv,2*m*n);
+<a name="line232">232: </a>      CC = bv->work+m*n;
+<a name="line233">233: </a>      <font color="#4169E1">if</font> (k) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,bv->work,&m));
+<a name="line234">234: </a>      <font color="#4169E1">else</font> { PetscMemzero(bv->work,m*n*<font color="#4169E1">sizeof</font>(PetscScalar)); }
+<a name="line235">235: </a>      PetscMPIIntCast(m*n,&len);
+<a name="line236">236: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(bv->work,CC,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));
+<a name="line237">237: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line238">238: </a>        PetscMemcpy(C+j*ldc,CC+j*m,m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line239">239: </a>      }
+<a name="line240">240: </a>    }
+<a name="line241">241: </a>  } <font color="#4169E1">else</font> {
+<a name="line242">242: </a>    <font color="#4169E1">if</font> (k) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"C"</font>,<font color="#666666">"N"</font>,&m,&n,&k,&one,(PetscScalar*)A,&k,(PetscScalar*)B,&k,&zero,C,&ldc));
+<a name="line243">243: </a>  }
+<a name="line244">244: </a>  PetscLogFlops(2.0*m*n*k);
+<a name="line245">245: </a>  <font color="#4169E1">return</font>(0);
+<a name="line246">246: </a>}
+
+<a name="line250">250: </a><font color="#B22222">/*</font>
+<a name="line251">251: </a><font color="#B22222">    y := A'*x</font>
+
+<a name="line253">253: </a><font color="#B22222">    A is nxk (ld=n)</font>
+<a name="line254">254: </a><font color="#B22222">*/</font>
+<a name="line255">255: </a><strong><font color="#4169E1"><a name="BVDotVec_BLAS_Private"></a>PetscErrorCode BVDotVec_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt n_,PetscInt k_,const PetscScalar *A,const PetscScalar *x,PetscScalar *y,PetscBool mpi)</font></strong>
+<a name="line256">256: </a>{
+<a name="line258">258: </a>  PetscScalar    zero=0.0,done=1.0;
+<a name="line259">259: </a>  PetscBLASInt   n,k,one=1,len;
+
+<a name="line262">262: </a>  PetscBLASIntCast(n_,&n);
+<a name="line263">263: </a>  PetscBLASIntCast(k_,&k);
+<a name="line264">264: </a>  <font color="#4169E1">if</font> (mpi) {
+<a name="line265">265: </a>    BVAllocateWork_Private(bv,k);
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (n) {
+<a name="line267">267: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&k,&done,A,&n,x,&one,&zero,bv->work,&one));
+<a name="line268">268: </a>    } <font color="#4169E1">else</font> {
+<a name="line269">269: </a>      PetscMemzero(bv->work,k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line270">270: </a>    }
+<a name="line271">271: </a>    PetscMPIIntCast(k,&len);
+<a name="line272">272: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(bv->work,y,len,MPIU_SCALAR,MPIU_SUM,PetscObjectComm((PetscObject)bv));
+<a name="line273">273: </a>  } <font color="#4169E1">else</font> {
+<a name="line274">274: </a>    <font color="#4169E1">if</font> (n) PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&k,&done,A,&n,x,&one,&zero,y,&one));
+<a name="line275">275: </a>  }
+<a name="line276">276: </a>  PetscLogFlops(2.0*n*k);
+<a name="line277">277: </a>  <font color="#4169E1">return</font>(0);
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><font color="#B22222">/*</font>
+<a name="line283">283: </a><font color="#B22222">    Scale n scalars</font>
+<a name="line284">284: </a><font color="#B22222">*/</font>
+<a name="line285">285: </a><strong><font color="#4169E1"><a name="BVScale_BLAS_Private"></a>PetscErrorCode BVScale_BLAS_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt n_,PetscScalar *A,PetscScalar alpha)</font></strong>
+<a name="line286">286: </a>{
+<a name="line288">288: </a>  PetscBLASInt   n,one=1;
+
+<a name="line291">291: </a>  <font color="#4169E1">if</font> (alpha == (PetscScalar)0.0) {
+<a name="line292">292: </a>    PetscMemzero(A,n_*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line293">293: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (alpha!=(PetscScalar)1.0) {
+<a name="line294">294: </a>    PetscBLASIntCast(n_,&n);
+<a name="line295">295: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&alpha,A,&one));
+<a name="line296">296: </a>    PetscLogFlops(n);
+<a name="line297">297: </a>  }
+<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
+<a name="line299">299: </a>}
+
+<a name="line303">303: </a><font color="#B22222">/*</font>
+<a name="line304">304: </a><font color="#B22222">    Compute ||A|| for an mxn matrix</font>
+<a name="line305">305: </a><font color="#B22222">*/</font>
+<a name="line306">306: </a><strong><font color="#4169E1"><a name="BVNorm_LAPACK_Private"></a>PetscErrorCode BVNorm_LAPACK_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m_,PetscInt n_,const PetscScalar *A,NormType type,PetscReal *nrm,PetscBool mpi)</font></strong>
+<a name="line307">307: </a>{
+<a name="line309">309: </a>  PetscBLASInt   m,n,i,j;
+<a name="line310">310: </a>  PetscMPIInt    len;
+<a name="line311">311: </a>  PetscReal      lnrm,*rwork=NULL,*rwork2=NULL;
+
+<a name="line314">314: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line315">315: </a>  PetscBLASIntCast(m_,&m);
+<a name="line316">316: </a>  PetscBLASIntCast(n_,&n);
+<a name="line317">317: </a>  <font color="#4169E1">if</font> (type==NORM_FROBENIUS || type==NORM_2) {
+<a name="line318">318: </a>    lnrm = LAPACKlange_(<font color="#666666">"F"</font>,&m,&n,(PetscScalar*)A,&m,rwork);
+<a name="line319">319: </a>    <font color="#4169E1">if</font> (mpi) {
+<a name="line320">320: </a>      lnrm = lnrm*lnrm;
+<a name="line321">321: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&lnrm,nrm,1,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)bv));
+<a name="line322">322: </a>      *nrm = PetscSqrtReal(*nrm);
+<a name="line323">323: </a>    } <font color="#4169E1">else</font> *nrm = lnrm;
+<a name="line324">324: </a>    PetscLogFlops(2.0*m*n);
+<a name="line325">325: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (type==NORM_1) {
+<a name="line326">326: </a>    <font color="#4169E1">if</font> (mpi) {
+<a name="line327">327: </a>      BVAllocateWork_Private(bv,2*n_);
+<a name="line328">328: </a>      rwork = (PetscReal*)bv->work;
+<a name="line329">329: </a>      rwork2 = rwork+n_;
+<a name="line330">330: </a>      PetscMemzero(rwork,n_*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line331">331: </a>      PetscMemzero(rwork2,n_*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line332">332: </a>      <font color="#4169E1">for</font> (j=0;j<n_;j++) {
+<a name="line333">333: </a>        <font color="#4169E1">for</font> (i=0;i<m_;i++) {
+<a name="line334">334: </a>          rwork[j] += PetscAbsScalar(A[i+j*m_]);
+<a name="line335">335: </a>        }
+<a name="line336">336: </a>      }
+<a name="line337">337: </a>      PetscMPIIntCast(n_,&len);
+<a name="line338">338: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(rwork,rwork2,len,MPIU_REAL,MPIU_SUM,PetscObjectComm((PetscObject)bv));
+<a name="line339">339: </a>      *nrm = 0.0;
+<a name="line340">340: </a>      <font color="#4169E1">for</font> (j=0;j<n_;j++) <font color="#4169E1">if</font> (rwork2[j] > *nrm) *nrm = rwork2[j];
+<a name="line341">341: </a>    } <font color="#4169E1">else</font> {
+<a name="line342">342: </a>      *nrm = LAPACKlange_(<font color="#666666">"O"</font>,&m,&n,(PetscScalar*)A,&m,rwork);
+<a name="line343">343: </a>    }
+<a name="line344">344: </a>    PetscLogFlops(1.0*m*n);
+<a name="line345">345: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (type==NORM_INFINITY) {
+<a name="line346">346: </a>    BVAllocateWork_Private(bv,m_);
+<a name="line347">347: </a>    rwork = (PetscReal*)bv->work;
+<a name="line348">348: </a>    lnrm = LAPACKlange_(<font color="#666666">"I"</font>,&m,&n,(PetscScalar*)A,&m,rwork);
+<a name="line349">349: </a>    <font color="#4169E1">if</font> (mpi) {
+<a name="line350">350: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allreduce.html#MPI_Allreduce">MPI_Allreduce</a>(&lnrm,nrm,1,MPIU_REAL,MPIU_MAX,PetscObjectComm((PetscObject)bv));
+<a name="line351">351: </a>    } <font color="#4169E1">else</font> *nrm = lnrm;
+<a name="line352">352: </a>    PetscLogFlops(1.0*m*n);
+<a name="line353">353: </a>  }
+<a name="line354">354: </a>  PetscFPTrapPop();
+<a name="line355">355: </a>  <font color="#4169E1">return</font>(0);
+<a name="line356">356: </a>}
+
+<a name="line360">360: </a><font color="#B22222">/*</font>
+<a name="line361">361: </a><font color="#B22222">    QR factorization of an mxn matrix</font>
+<a name="line362">362: </a><font color="#B22222">*/</font>
+<a name="line363">363: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_LAPACK_Private"></a>PetscErrorCode BVOrthogonalize_LAPACK_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt m_,PetscInt n_,PetscScalar *Q,PetscScalar *R,PetscBool mpi)</font></strong>
+<a name="line364">364: </a>{
+<a name="line365">365: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)</font>
+<a name="line367">367: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routines are unavailable"</font>);
+<a name="line368">368: </a><font color="#A020F0">#else</font>
+<a name="line370">370: </a>  PetscBLASInt   m,n,i,j,k,l,nb,lwork,info;
+<a name="line371">371: </a>  PetscScalar    *tau,*work,*Rl=NULL,*A=NULL,*C=NULL,one=1.0,zero=0.0;
+<a name="line372">372: </a>  PetscMPIInt    rank,size,len;
+
+<a name="line375">375: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line376">376: </a>  PetscBLASIntCast(m_,&m);
+<a name="line377">377: </a>  PetscBLASIntCast(n_,&n);
+<a name="line378">378: </a>  k = PetscMin(m,n);
+<a name="line379">379: </a>  nb = 16;
 <a name="line380">380: </a>  <font color="#4169E1">if</font> (mpi) {
-<a name="line381">381: </a>    Rl = bv->work+k+n*nb;
-<a name="line382">382: </a>    A  = bv->work+k+n*nb+n*n;
-<a name="line383">383: </a>    C  = bv->work+k+n*nb+n*n+n*n*size;
-<a name="line384">384: </a>  }
-
-<a name="line386">386: </a>  <font color="#B22222">/* Compute QR */</font>
-<a name="line387">387: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&m,&n,Q,&m,tau,work,&lwork,&info));
-<a name="line388">388: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-
-<a name="line390">390: </a>  <font color="#B22222">/* Extract R */</font>
-<a name="line391">391: </a>  <font color="#4169E1">if</font> (R || mpi) {
-<a name="line392">392: </a>    PetscMemzero(mpi? Rl: R,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line393">393: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
-<a name="line394">394: </a>      <font color="#4169E1">for</font> (i=0;i<=j;i++) {
-<a name="line395">395: </a>        <font color="#4169E1">if</font> (mpi) Rl[i+j*n] = Q[i+j*m];
-<a name="line396">396: </a>        <font color="#4169E1">else</font> R[i+j*n] = Q[i+j*m];
-<a name="line397">397: </a>      }
-<a name="line398">398: </a>    }
-<a name="line399">399: </a>  }
-
-<a name="line401">401: </a>  <font color="#B22222">/* Compute orthogonal matrix in Q */</font>
-<a name="line402">402: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKorgqr"</font>,LAPACKorgqr_(&m,&n,&k,Q,&m,tau,work,&lwork,&info));
-<a name="line403">403: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
-
-<a name="line405">405: </a>  <font color="#4169E1">if</font> (mpi) {
-
-<a name="line407">407: </a>    <font color="#B22222">/* Stack triangular matrices */</font>
-<a name="line408">408: </a>    PetscBLASIntCast(n*size,&l);
-<a name="line409">409: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
-<a name="line410">410: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(Rl+j*n,n,MPIU_SCALAR,A+j*l,n,MPIU_SCALAR,PetscObjectComm((PetscObject)bv));
-<a name="line411">411: </a>    }
-
-<a name="line413">413: </a>    <font color="#B22222">/* Compute QR */</font>
-<a name="line414">414: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&l,&n,A,&l,tau,work,&lwork,&info));
-<a name="line415">415: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-
-<a name="line417">417: </a>    <font color="#B22222">/* Extract R */</font>
-<a name="line418">418: </a>    <font color="#4169E1">if</font> (R) {
-<a name="line419">419: </a>      PetscMemzero(R,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line420">420: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++)
-<a name="line421">421: </a>        <font color="#4169E1">for</font> (i=0;i<=j;i++)
-<a name="line422">422: </a>          R[i+j*n] = A[i+j*l];
-<a name="line423">423: </a>    }
-
-<a name="line425">425: </a>    <font color="#B22222">/* Accumulate orthogonal matrix */</font>
-<a name="line426">426: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKorgqr"</font>,LAPACKorgqr_(&l,&n,&n,A,&l,tau,work,&lwork,&info));
-<a name="line427">427: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
-<a name="line428">428: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,&n,&one,Q,&m,A+rank*n,&l,&zero,C,&m));
-<a name="line429">429: </a>    PetscMemcpy(Q,C,m*n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line430">430: </a>  }
-
-<a name="line432">432: </a>  PetscLogFlops(3.0*m*n*n);
-<a name="line433">433: </a>  PetscFPTrapPop();
-<a name="line434">434: </a>  <font color="#4169E1">return</font>(0);
-<a name="line435">435: </a><font color="#A020F0">#endif</font>
-<a name="line436">436: </a>}
+<a name="line381">381: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PetscObjectComm((PetscObject)bv),&rank);
+<a name="line382">382: </a>    <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size">MPI_Comm_size</a>(PetscObjectComm((PetscObject)bv),&size);
+<a name="line383">383: </a>    BVAllocateWork_Private(bv,k+n*nb+n*n+n*n*size+m*n);
+<a name="line384">384: </a>  } <font color="#4169E1">else</font> {
+<a name="line385">385: </a>    BVAllocateWork_Private(bv,k+n*nb);
+<a name="line386">386: </a>   }
+<a name="line387">387: </a>  tau = bv->work;
+<a name="line388">388: </a>  work = bv->work+k;
+<a name="line389">389: </a>  PetscBLASIntCast(n*nb,&lwork);
+<a name="line390">390: </a>  <font color="#4169E1">if</font> (mpi) {
+<a name="line391">391: </a>    Rl = bv->work+k+n*nb;
+<a name="line392">392: </a>    A  = bv->work+k+n*nb+n*n;
+<a name="line393">393: </a>    C  = bv->work+k+n*nb+n*n+n*n*size;
+<a name="line394">394: </a>  }
+
+<a name="line396">396: </a>  <font color="#B22222">/* Compute QR */</font>
+<a name="line397">397: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&m,&n,Q,&m,tau,work,&lwork,&info));
+<a name="line398">398: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+
+<a name="line400">400: </a>  <font color="#B22222">/* Extract R */</font>
+<a name="line401">401: </a>  <font color="#4169E1">if</font> (R || mpi) {
+<a name="line402">402: </a>    PetscMemzero(mpi? Rl: R,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line403">403: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line404">404: </a>      <font color="#4169E1">for</font> (i=0;i<=j;i++) {
+<a name="line405">405: </a>        <font color="#4169E1">if</font> (mpi) Rl[i+j*n] = Q[i+j*m];
+<a name="line406">406: </a>        <font color="#4169E1">else</font> R[i+j*n] = Q[i+j*m];
+<a name="line407">407: </a>      }
+<a name="line408">408: </a>    }
+<a name="line409">409: </a>  }
+
+<a name="line411">411: </a>  <font color="#B22222">/* Compute orthogonal matrix in Q */</font>
+<a name="line412">412: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&m,&n,&k,Q,&m,tau,work,&lwork,&info));
+<a name="line413">413: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+
+<a name="line415">415: </a>  <font color="#4169E1">if</font> (mpi) {
+
+<a name="line417">417: </a>    <font color="#B22222">/* Stack triangular matrices */</font>
+<a name="line418">418: </a>    PetscBLASIntCast(n*size,&l);
+<a name="line419">419: </a>    PetscMPIIntCast(n,&len);
+<a name="line420">420: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line421">421: </a>      <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather">MPI_Allgather</a>(Rl+j*n,len,MPIU_SCALAR,A+j*l,len,MPIU_SCALAR,PetscObjectComm((PetscObject)bv));
+<a name="line422">422: </a>    }
+
+<a name="line424">424: </a>    <font color="#B22222">/* Compute QR */</font>
+<a name="line425">425: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&l,&n,A,&l,tau,work,&lwork,&info));
+<a name="line426">426: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+
+<a name="line428">428: </a>    <font color="#B22222">/* Extract R */</font>
+<a name="line429">429: </a>    <font color="#4169E1">if</font> (R) {
+<a name="line430">430: </a>      PetscMemzero(R,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line431">431: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++)
+<a name="line432">432: </a>        <font color="#4169E1">for</font> (i=0;i<=j;i++)
+<a name="line433">433: </a>          R[i+j*n] = A[i+j*l];
+<a name="line434">434: </a>    }
+
+<a name="line436">436: </a>    <font color="#B22222">/* Accumulate orthogonal matrix */</font>
+<a name="line437">437: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&l,&n,&n,A,&l,tau,work,&lwork,&info));
+<a name="line438">438: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+<a name="line439">439: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&n,&n,&one,Q,&m,A+rank*n,&l,&zero,C,&m));
+<a name="line440">440: </a>    PetscMemcpy(Q,C,m*n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line441">441: </a>  }
+
+<a name="line443">443: </a>  PetscLogFlops(3.0*m*n*n);
+<a name="line444">444: </a>  PetscFPTrapPop();
+<a name="line445">445: </a>  <font color="#4169E1">return</font>(0);
+<a name="line446">446: </a><font color="#A020F0">#endif</font>
+<a name="line447">447: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/interface/bvfunc.c b/src/sys/classes/bv/interface/bvfunc.c
index fd8d334..6322b03 100644
--- a/src/sys/classes/bv/interface/bvfunc.c
+++ b/src/sys/classes/bv/interface/bvfunc.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -24,9 +24,14 @@
 #include <slepc/private/bvimpl.h>            /*I "slepcbv.h" I*/
 
 PetscClassId     BV_CLASSID = 0;
-PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;
+PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;
 static PetscBool BVPackageInitialized = PETSC_FALSE;
 
+const char *BVOrthogTypes[] = {"CGS","MGS","BVOrthogType","BV_ORTHOG_",0};
+const char *BVOrthogRefineTypes[] = {"IFNEEDED","NEVER","ALWAYS","BVOrthogRefineType","BV_ORTHOG_REFINE_",0};
+const char *BVOrthogBlockTypes[] = {"GS","CHOL","BVOrthogBlockType","BV_ORTHOG_BLOCK_",0};
+const char *BVMatMultTypes[] = {"VECS","MAT","MAT_SAVE","BVMatMultType","BV_MATMULT_",0};
+
 #undef __FUNCT__
 #define __FUNCT__ "BVFinalizePackage"
 /*@C
@@ -77,16 +82,21 @@ PetscErrorCode BVInitializePackage(void)
   ierr = PetscLogEventRegister("BVCreate",BV_CLASSID,&BV_Create);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVCopy",BV_CLASSID,&BV_Copy);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVMult",BV_CLASSID,&BV_Mult);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("BVMultVec",BV_CLASSID,&BV_MultVec);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("BVMultInPlace",BV_CLASSID,&BV_MultInPlace);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVDot",BV_CLASSID,&BV_Dot);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("BVDotVec",BV_CLASSID,&BV_DotVec);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVOrthogonalize",BV_CLASSID,&BV_Orthogonalize);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("BVOrthogonalizeV",BV_CLASSID,&BV_OrthogonalizeVec);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVScale",BV_CLASSID,&BV_Scale);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVNorm",BV_CLASSID,&BV_Norm);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("BVNormVec",BV_CLASSID,&BV_NormVec);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVSetRandom",BV_CLASSID,&BV_SetRandom);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVMatMult",BV_CLASSID,&BV_MatMult);CHKERRQ(ierr);
+  ierr = PetscLogEventRegister("BVMatMultVec",BV_CLASSID,&BV_MatMultVec);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("BVMatProject",BV_CLASSID,&BV_MatProject);CHKERRQ(ierr);
-  ierr = PetscLogEventRegister("BVAXPY",BV_CLASSID,&BV_AXPY);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"bv",&className);CHKERRQ(ierr);
     if (className) {
@@ -94,7 +104,7 @@ PetscErrorCode BVInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"bv",&className);CHKERRQ(ierr);
     if (className) {
@@ -137,6 +147,7 @@ PetscErrorCode BVDestroy(BV *bv)
   ierr = PetscFree((*bv)->omega);CHKERRQ(ierr);
   ierr = MatDestroy(&(*bv)->B);CHKERRQ(ierr);
   ierr = MatDestroy(&(*bv)->C);CHKERRQ(ierr);
+  ierr = PetscRandomDestroy(&(*bv)->rand);CHKERRQ(ierr);
   ierr = PetscHeaderDestroy(bv);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -204,6 +215,8 @@ PetscErrorCode BVCreate(MPI_Comm comm,BV *newbv)
   bv->defersfo     = PETSC_FALSE;
   bv->cached       = NULL;
   bv->bvstate      = 0;
+  bv->rand         = NULL;
+  bv->rrandom      = PETSC_FALSE;
   bv->work         = NULL;
   bv->lwork        = 0;
   bv->data         = NULL;
@@ -472,7 +485,8 @@ PetscErrorCode BVAppendOptionsPrefix(BV bv,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used, is returned
 
-   Notes: On the Fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
@@ -511,7 +525,7 @@ static PetscErrorCode BVView_Default(BV bv,PetscViewer viewer)
     ierr = PetscObjectGetName((PetscObject)bv,&bvname);CHKERRQ(ierr);
     ierr = PetscViewerASCIIPrintf(viewer,"%s=[];\n",bvname);CHKERRQ(ierr);
   }
-  for (j=bv->nc;j<bv->nc+bv->m;j++) {
+  for (j=-bv->nc;j<bv->m;j++) {
     ierr = BVGetColumn(bv,j,&v);CHKERRQ(ierr);
     ierr = VecView(v,viewer);CHKERRQ(ierr);
     if (ismatlab) {
@@ -607,6 +621,9 @@ PetscErrorCode BVView(BV bv,PetscViewer viewer)
           ierr = PetscViewerASCIIPrintf(viewer,"doing matmult as a single matrix-matrix product, saving aux matrices\n");CHKERRQ(ierr);
           break;
       }
+      if (bv->rrandom) { 
+        ierr = PetscViewerASCIIPrintf(viewer,"generating random vectors independent of the number of processes\n");CHKERRQ(ierr);
+      }
     } else {
       if (bv->ops->view) { ierr = (*bv->ops->view)(bv,viewer);CHKERRQ(ierr); }
       else { ierr = BVView_Default(bv,viewer);CHKERRQ(ierr); }
diff --git a/src/sys/classes/bv/interface/bvfunc.c.html b/src/sys/classes/bv/interface/bvfunc.c.html
index daf7f49..0c22ed6 100644
--- a/src/sys/classes/bv/interface/bvfunc.c.html
+++ b/src/sys/classes/bv/interface/bvfunc.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvfunc.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:21+00:00">
+<meta name="date" content="2016-05-16T10:32:14+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvfunc.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvfunc.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> (basis vectors) interface routines, callable by users.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -36,560 +36,577 @@
 <a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/bvimpl.h>            </font><font color="#B22222">/*I "slepcbv.h" I*/</font><font color="#A020F0"></font>
 
 <a name="line26"> 26: </a>PetscClassId     BV_CLASSID = 0;
-<a name="line27"> 27: </a>PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_Dot = 0,BV_Orthogonalize = 0,BV_Scale = 0,BV_Norm = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatProject = 0,BV_AXPY = 0;
+<a name="line27"> 27: </a>PetscLogEvent    BV_Create = 0,BV_Copy = 0,BV_Mult = 0,BV_MultVec = 0,BV_MultInPlace = 0,BV_Dot = 0,BV_DotVec = 0,BV_Orthogonalize = 0,BV_OrthogonalizeVec = 0,BV_Scale = 0,BV_Norm = 0,BV_NormVec = 0,BV_SetRandom = 0,BV_MatMult = 0,BV_MatMultVec = 0,BV_MatProject = 0;
 <a name="line28"> 28: </a>static PetscBool BVPackageInitialized = PETSC_FALSE;
 
-<a name="line32"> 32: </a><font color="#B22222">/*@C</font>
-<a name="line33"> 33: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</a> - This function destroys everything in the Slepc interface</font>
-<a name="line34"> 34: </a><font color="#B22222">   to the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> package. It is called from <a href="../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
-
-<a name="line36"> 36: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line38"> 38: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
-<a name="line39"> 39: </a><font color="#B22222">@*/</font>
-<a name="line40"> 40: </a><strong><font color="#4169E1"><a name="BVFinalizePackage"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</a>(void)</font></strong>
-<a name="line41"> 41: </a>{
-
-<a name="line45"> 45: </a>  PetscFunctionListDestroy(&BVList);
-<a name="line46"> 46: </a>  BVPackageInitialized = PETSC_FALSE;
-<a name="line47"> 47: </a>  BVRegisterAllCalled  = PETSC_FALSE;
-<a name="line48"> 48: </a>  <font color="#4169E1">return</font>(0);
-<a name="line49"> 49: </a>}
-
-<a name="line53"> 53: </a><font color="#B22222">/*@C</font>
-<a name="line54"> 54: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</a> - This function initializes everything in the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> package.</font>
-<a name="line55"> 55: </a><font color="#B22222">   It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
-<a name="line56"> 56: </a><font color="#B22222">   on the first call to <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>() when using static libraries.</font>
-
-<a name="line58"> 58: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line60"> 60: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
-<a name="line61"> 61: </a><font color="#B22222">@*/</font>
-<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="BVInitializePackage"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</a>(void)</font></strong>
-<a name="line63"> 63: </a>{
-<a name="line64"> 64: </a>  char           logList[256];
-<a name="line65"> 65: </a>  char           *className;
-<a name="line66"> 66: </a>  PetscBool      opt;
-
-<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (BVPackageInitialized) <font color="#4169E1">return</font>(0);
-<a name="line71"> 71: </a>  BVPackageInitialized = PETSC_TRUE;
-<a name="line72"> 72: </a>  <font color="#B22222">/* Register Classes */</font>
-<a name="line73"> 73: </a>  PetscClassIdRegister(<font color="#666666">"Basis Vectors"</font>,&BV_CLASSID);
-<a name="line74"> 74: </a>  <font color="#B22222">/* Register Constructors */</font>
-<a name="line75"> 75: </a>  <a href="../../../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>();
-<a name="line76"> 76: </a>  <font color="#B22222">/* Register Events */</font>
-<a name="line77"> 77: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>"</font>,BV_CLASSID,&BV_Create);
-<a name="line78"> 78: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>"</font>,BV_CLASSID,&BV_Copy);
-<a name="line79"> 79: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>"</font>,BV_CLASSID,&BV_Mult);
-<a name="line80"> 80: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>"</font>,BV_CLASSID,&BV_Dot);
-<a name="line81"> 81: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>"</font>,BV_CLASSID,&BV_Orthogonalize);
-<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>"</font>,BV_CLASSID,&BV_Scale);
-<a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>"</font>,BV_CLASSID,&BV_Norm);
-<a name="line84"> 84: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>"</font>,BV_CLASSID,&BV_SetRandom);
-<a name="line85"> 85: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>"</font>,BV_CLASSID,&BV_MatMult);
-<a name="line86"> 86: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>"</font>,BV_CLASSID,&BV_MatProject);
-<a name="line87"> 87: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>"</font>,BV_CLASSID,&BV_AXPY);
-<a name="line88"> 88: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line89"> 89: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
-<a name="line90"> 90: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line91"> 91: </a>    PetscStrstr(logList,<font color="#666666">"bv"</font>,&className);
-<a name="line92"> 92: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line93"> 93: </a>      PetscInfoDeactivateClass(BV_CLASSID);
-<a name="line94"> 94: </a>    }
-<a name="line95"> 95: </a>  }
-<a name="line96"> 96: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line97"> 97: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
-<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (opt) {
-<a name="line99"> 99: </a>    PetscStrstr(logList,<font color="#666666">"bv"</font>,&className);
-<a name="line100">100: </a>    <font color="#4169E1">if</font> (className) {
-<a name="line101">101: </a>      PetscLogEventDeactivateClass(BV_CLASSID);
-<a name="line102">102: </a>    }
-<a name="line103">103: </a>  }
-<a name="line104">104: </a>  PetscRegisterFinalize(<a href="../../../../../docs/manualpages/BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</a>);
-<a name="line105">105: </a>  <font color="#4169E1">return</font>(0);
-<a name="line106">106: </a>}
-
-<a name="line110">110: </a><font color="#B22222">/*@</font>
-<a name="line111">111: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a> - Destroys <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> context that was created with <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>().</font>
-
-<a name="line113">113: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line115">115: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line116">116: </a><font color="#B22222">.  bv - the basis vectors context</font>
-
-<a name="line118">118: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line120">120: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>()</font>
-<a name="line121">121: </a><font color="#B22222">@*/</font>
-<a name="line122">122: </a><strong><font color="#4169E1"><a name="BVDestroy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
-<a name="line123">123: </a>{
-
-<a name="line127">127: </a>  <font color="#4169E1">if</font> (!*bv) <font color="#4169E1">return</font>(0);
-<a name="line129">129: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*bv))->refct > 0) { *bv = 0; <font color="#4169E1">return</font>(0); }
-<a name="line130">130: </a>  <font color="#4169E1">if</font> ((*bv)->ops->destroy) { (*(*bv)->ops->destroy)(*bv); }
-<a name="line131">131: </a>  VecDestroy(&(*bv)->t);
-<a name="line132">132: </a>  MatDestroy(&(*bv)->matrix);
-<a name="line133">133: </a>  VecDestroy(&(*bv)->Bx);
-<a name="line134">134: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&(*bv)->cached);
-<a name="line135">135: </a>  PetscFree((*bv)->work);
-<a name="line136">136: </a>  PetscFree2((*bv)->h,(*bv)->c);
-<a name="line137">137: </a>  PetscFree((*bv)->omega);
-<a name="line138">138: </a>  MatDestroy(&(*bv)->B);
-<a name="line139">139: </a>  MatDestroy(&(*bv)->C);
-<a name="line140">140: </a>  PetscHeaderDestroy(bv);
-<a name="line141">141: </a>  <font color="#4169E1">return</font>(0);
-<a name="line142">142: </a>}
-
-<a name="line146">146: </a><font color="#B22222">/*@</font>
-<a name="line147">147: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a> - Creates a basis vectors context.</font>
-
-<a name="line149">149: </a><font color="#B22222">   Collective on MPI_Comm</font>
-
-<a name="line151">151: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line152">152: </a><font color="#B22222">.  comm - MPI communicator</font>
-
-<a name="line154">154: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line155">155: </a><font color="#B22222">.  bv - location to put the basis vectors context</font>
-
-<a name="line157">157: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line159">159: </a><font color="#B22222">.seealso: BVSetUp(), <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(), <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-<a name="line160">160: </a><font color="#B22222">@*/</font>
-<a name="line161">161: </a><strong><font color="#4169E1"><a name="BVCreate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(MPI_Comm comm,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *newbv)</font></strong>
-<a name="line162">162: </a>{
-<a name="line164">164: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             bv;
-
-<a name="line168">168: </a>  *newbv = 0;
-<a name="line169">169: </a>  <a href="../../../../../docs/manualpages/BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</a>();
-<a name="line170">170: </a>  SlepcHeaderCreate(bv,BV_CLASSID,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>"</font>,<font color="#666666">"Basis Vectors"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>"</font>,comm,<a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>,<a href="../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>);
-
-<a name="line172">172: </a>  bv->t            = NULL;
-<a name="line173">173: </a>  bv->n            = -1;
-<a name="line174">174: </a>  bv->N            = -1;
-<a name="line175">175: </a>  bv->m            = 0;
-<a name="line176">176: </a>  bv->l            = 0;
-<a name="line177">177: </a>  bv->k            = 0;
-<a name="line178">178: </a>  bv->nc           = 0;
-<a name="line179">179: </a>  bv->orthog_type  = BV_ORTHOG_CGS;
-<a name="line180">180: </a>  bv->orthog_ref   = BV_ORTHOG_REFINE_IFNEEDED;
-<a name="line181">181: </a>  bv->orthog_eta   = 0.7071;
-<a name="line182">182: </a>  bv->orthog_block = BV_ORTHOG_BLOCK_GS;
-<a name="line183">183: </a>  bv->matrix       = NULL;
-<a name="line184">184: </a>  bv->indef        = PETSC_FALSE;
-<a name="line185">185: </a>  bv->vmm          = BV_MATMULT_MAT;
-
-<a name="line187">187: </a>  bv->Bx           = NULL;
-<a name="line188">188: </a>  bv->xid          = 0;
-<a name="line189">189: </a>  bv->xstate       = 0;
-<a name="line190">190: </a>  bv->cv[0]        = NULL;
-<a name="line191">191: </a>  bv->cv[1]        = NULL;
-<a name="line192">192: </a>  bv->ci[0]        = -1;
-<a name="line193">193: </a>  bv->ci[1]        = -1;
-<a name="line194">194: </a>  bv->st[0]        = -1;
-<a name="line195">195: </a>  bv->st[1]        = -1;
-<a name="line196">196: </a>  bv->id[0]        = 0;
-<a name="line197">197: </a>  bv->id[1]        = 0;
-<a name="line198">198: </a>  bv->h            = NULL;
-<a name="line199">199: </a>  bv->c            = NULL;
-<a name="line200">200: </a>  bv->omega        = NULL;
-<a name="line201">201: </a>  bv->B            = NULL;
-<a name="line202">202: </a>  bv->C            = NULL;
-<a name="line203">203: </a>  bv->Aid          = 0;
-<a name="line204">204: </a>  bv->defersfo     = PETSC_FALSE;
-<a name="line205">205: </a>  bv->cached       = NULL;
-<a name="line206">206: </a>  bv->bvstate      = 0;
-<a name="line207">207: </a>  bv->work         = NULL;
-<a name="line208">208: </a>  bv->lwork        = 0;
-<a name="line209">209: </a>  bv->data         = NULL;
-
-<a name="line211">211: </a>  *newbv = bv;
-<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
-<a name="line213">213: </a>}
-
-<a name="line217">217: </a><font color="#B22222">/*@</font>
-<a name="line218">218: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a> - Insert a vector into the specified column.</font>
-
-<a name="line220">220: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line222">222: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line223">223: </a><font color="#B22222">+  V - basis vectors</font>
-<a name="line224">224: </a><font color="#B22222">.  j - the column of V to be overwritten</font>
-<a name="line225">225: </a><font color="#B22222">-  w - the vector to be copied</font>
-
-<a name="line227">227: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line229">229: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>()</font>
-<a name="line230">230: </a><font color="#B22222">@*/</font>
-<a name="line231">231: </a><strong><font color="#4169E1"><a name="BVInsertVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt j,Vec w)</font></strong>
-<a name="line232">232: </a>{
-<a name="line234">234: </a>  PetscInt       n,N;
-<a name="line235">235: </a>  Vec            v;
-
-<a name="line242">242: </a>  BVCheckSizes(V,1);
-
-<a name="line245">245: </a>  VecGetSize(w,&N);
-<a name="line246">246: </a>  VecGetLocalSize(w,&n);
-<a name="line247">247: </a>  <font color="#4169E1">if</font> (N!=V->N || n!=V->n) SETERRQ4(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,V->N,V->n);
-<a name="line248">248: </a>  <font color="#4169E1">if</font> (j<-V->nc || j>=V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, should be between %D and %D"</font>,j,-V->nc,V->m-1);
-
-<a name="line250">250: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&v);
-<a name="line251">251: </a>  VecCopy(w,v);
-<a name="line252">252: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&v);
-<a name="line253">253: </a>  PetscObjectStateIncrease((PetscObject)V);
-<a name="line254">254: </a>  <font color="#4169E1">return</font>(0);
-<a name="line255">255: </a>}
-
-<a name="line259">259: </a><font color="#B22222">/*@</font>
-<a name="line260">260: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a> - Insert a set of vectors into the specified columns.</font>
-
-<a name="line262">262: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line264">264: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line265">265: </a><font color="#B22222">+  V - basis vectors</font>
-<a name="line266">266: </a><font color="#B22222">.  s - first column of V to be overwritten</font>
-<a name="line267">267: </a><font color="#B22222">.  W - set of vectors to be copied</font>
-<a name="line268">268: </a><font color="#B22222">-  orth - flag indicating if the vectors must be orthogonalized</font>
-
-<a name="line270">270: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line271">271: </a><font color="#B22222">.  m - number of input vectors, on output the number of linearly independent</font>
-<a name="line272">272: </a><font color="#B22222">       vectors</font>
-
-<a name="line274">274: </a><font color="#B22222">   Notes:</font>
-<a name="line275">275: </a><font color="#B22222">   Copies the contents of vectors W to V(:,s:s+n). If the orthogonalization</font>
-<a name="line276">276: </a><font color="#B22222">   flag is set, then the vectors are copied one by one and then orthogonalized</font>
-<a name="line277">277: </a><font color="#B22222">   against the previous ones. If any of them is linearly dependent then it</font>
-<a name="line278">278: </a><font color="#B22222">   is discarded and the value of m is decreased.</font>
-
-<a name="line280">280: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line282">282: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>()</font>
-<a name="line283">283: </a><font color="#B22222">@*/</font>
-<a name="line284">284: </a><strong><font color="#4169E1"><a name="BVInsertVecs"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt s,PetscInt *m,Vec *W,PetscBool orth)</font></strong>
-<a name="line285">285: </a>{
-<a name="line287">287: </a>  PetscInt       n,N,i,ndep;
-<a name="line288">288: </a>  PetscBool      lindep;
-<a name="line289">289: </a>  PetscReal      norm;
-<a name="line290">290: </a>  Vec            v;
-
-<a name="line297">297: </a>  <font color="#4169E1">if</font> (!*m) <font color="#4169E1">return</font>(0);
-<a name="line298">298: </a>  <font color="#4169E1">if</font> (*m<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Number of vectors (given %D) cannot be negative"</font>,*m);
-<a name="line303">303: </a>  BVCheckSizes(V,1);
-
-<a name="line306">306: </a>  VecGetSize(*W,&N);
-<a name="line307">307: </a>  VecGetLocalSize(*W,&n);
-<a name="line308">308: </a>  <font color="#4169E1">if</font> (N!=V->N || n!=V->n) SETERRQ4(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,V->N,V->n);
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (s<0 || s>=V->m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument s has wrong value %D, should be between 0 and %D"</font>,s,V->m-1);
-<a name="line310">310: </a>  <font color="#4169E1">if</font> (s+(*m)>V->m) SETERRQ1(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Too many vectors provided, there is only room for %D"</font>,V->m);
-
-<a name="line312">312: </a>  ndep = 0;
-<a name="line313">313: </a>  <font color="#4169E1">for</font> (i=0;i<*m;i++) {
-<a name="line314">314: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,s+i-ndep,&v);
-<a name="line315">315: </a>    VecCopy(W[i],v);
-<a name="line316">316: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,s+i-ndep,&v);
-<a name="line317">317: </a>    <font color="#4169E1">if</font> (orth) {
-<a name="line318">318: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,s+i-ndep,NULL,&norm,&lindep);
-<a name="line319">319: </a>      <font color="#4169E1">if</font> (norm==0.0 || lindep) {
-<a name="line320">320: </a>        PetscInfo1(V,<font color="#666666">"Removing linearly dependent vector %D\n"</font>,i);
-<a name="line321">321: </a>        ndep++;
-<a name="line322">322: </a>      } <font color="#4169E1">else</font> {
-<a name="line323">323: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,s+i-ndep,1.0/norm);
-<a name="line324">324: </a>      }
-<a name="line325">325: </a>    }
-<a name="line326">326: </a>  }
-<a name="line327">327: </a>  *m -= ndep;
-<a name="line328">328: </a>  PetscObjectStateIncrease((PetscObject)V);
-<a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
-<a name="line330">330: </a>}
-
-<a name="line334">334: </a><font color="#B22222">/*@</font>
-<a name="line335">335: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a> - Insert a set of vectors as constraints.</font>
-
-<a name="line337">337: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line339">339: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line340">340: </a><font color="#B22222">+  V - basis vectors</font>
-<a name="line341">341: </a><font color="#B22222">-  C - set of vectors to be inserted as constraints</font>
-
-<a name="line343">343: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line344">344: </a><font color="#B22222">.  nc - number of input vectors, on output the number of linearly independent</font>
-<a name="line345">345: </a><font color="#B22222">       vectors</font>
-
-<a name="line347">347: </a><font color="#B22222">   Notes:</font>
-<a name="line348">348: </a><font color="#B22222">   The constraints are relevant only during orthogonalization. Constraint</font>
-<a name="line349">349: </a><font color="#B22222">   vectors span a subspace that is deflated in every orthogonalization</font>
-<a name="line350">350: </a><font color="#B22222">   operation, so they are intended for removing those directions from the</font>
-<a name="line351">351: </a><font color="#B22222">   orthogonal basis computed in regular <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> columns.</font>
-
-<a name="line353">353: </a><font color="#B22222">   Constraints are not stored in regular <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> colums, but in a special part of</font>
-<a name="line354">354: </a><font color="#B22222">   the storage. They can be accessed with negative indices in <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>().</font>
-
-<a name="line356">356: </a><font color="#B22222">   This operation is DESTRUCTIVE, meaning that all data contained in the</font>
-<a name="line357">357: </a><font color="#B22222">   columns of V is lost. This is typically invoked just after creating the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
-<a name="line358">358: </a><font color="#B22222">   Once a set of constraints has been set, it is not allowed to call this</font>
-<a name="line359">359: </a><font color="#B22222">   function again.</font>
-
-<a name="line361">361: </a><font color="#B22222">   The vectors are copied one by one and then orthogonalized against the</font>
-<a name="line362">362: </a><font color="#B22222">   previous ones. If any of them is linearly dependent then it is discarded</font>
-<a name="line363">363: </a><font color="#B22222">   and the value of nc is decreased. The behaviour is similar to <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>().</font>
-
-<a name="line365">365: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line367">367: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>()</font>
-<a name="line368">368: </a><font color="#B22222">@*/</font>
-<a name="line369">369: </a><strong><font color="#4169E1"><a name="BVInsertConstraints"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt *nc,Vec *C)</font></strong>
-<a name="line370">370: </a>{
-<a name="line372">372: </a>  PetscInt       msave;
-
-<a name="line378">378: </a>  <font color="#4169E1">if</font> (!*nc) <font color="#4169E1">return</font>(0);
-<a name="line379">379: </a>  <font color="#4169E1">if</font> (*nc<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Number of constraints (given %D) cannot be negative"</font>,*nc);
-<a name="line383">383: </a>  BVCheckSizes(V,1);
-<a name="line385">385: </a>  <font color="#4169E1">if</font> (V->nc) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Constraints already present in this <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object"</font>);
-<a name="line386">386: </a>  <font color="#4169E1">if</font> (V->ci[0]!=-1 || V->ci[1]!=-1) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Cannot call <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a> after <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>);
-
-<a name="line388">388: </a>  msave = V->m;
-<a name="line389">389: </a>  <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(V,*nc+V->m,PETSC_FALSE);
-<a name="line390">390: </a>  <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(V,0,nc,C,PETSC_TRUE);
-<a name="line391">391: </a>  V->nc = *nc;
-<a name="line392">392: </a>  V->m  = msave;
-<a name="line393">393: </a>  V->ci[0] = -V->nc-1;
-<a name="line394">394: </a>  V->ci[1] = -V->nc-1;
-<a name="line395">395: </a>  PetscObjectStateIncrease((PetscObject)V);
-<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
-<a name="line397">397: </a>}
-
-<a name="line401">401: </a><font color="#B22222">/*@C</font>
-<a name="line402">402: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line403">403: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options in the database.</font>
-
-<a name="line405">405: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line407">407: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line408">408: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line409">409: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> option requests</font>
-
-<a name="line411">411: </a><font color="#B22222">   Notes:</font>
-<a name="line412">412: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line413">413: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line414">414: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line416">416: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line418">418: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>()</font>
-<a name="line419">419: </a><font color="#B22222">@*/</font>
-<a name="line420">420: </a><strong><font color="#4169E1"><a name="BVSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const char *prefix)</font></strong>
-<a name="line421">421: </a>{
-
-<a name="line426">426: </a>  PetscObjectSetOptionsPrefix((PetscObject)bv,prefix);
-<a name="line427">427: </a>  <font color="#4169E1">return</font>(0);
-<a name="line428">428: </a>}
-
-<a name="line432">432: </a><font color="#B22222">/*@C</font>
-<a name="line433">433: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line434">434: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options in the database.</font>
-
-<a name="line436">436: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line438">438: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line439">439: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line440">440: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> option requests</font>
-
-<a name="line442">442: </a><font color="#B22222">   Notes:</font>
-<a name="line443">443: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line444">444: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line445">445: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line447">447: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line449">449: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>()</font>
-<a name="line450">450: </a><font color="#B22222">@*/</font>
-<a name="line451">451: </a><strong><font color="#4169E1"><a name="BVAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const char *prefix)</font></strong>
-<a name="line452">452: </a>{
-
-<a name="line457">457: </a>  PetscObjectAppendOptionsPrefix((PetscObject)bv,prefix);
-<a name="line458">458: </a>  <font color="#4169E1">return</font>(0);
-<a name="line459">459: </a>}
-
-<a name="line463">463: </a><font color="#B22222">/*@C</font>
-<a name="line464">464: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line465">465: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options in the database.</font>
-
-<a name="line467">467: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line469">469: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line470">470: </a><font color="#B22222">.  bv - the basis vectors context</font>
-
-<a name="line472">472: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line473">473: </a><font color="#B22222">.  prefix - pointer to the prefix string used, is returned</font>
-
-<a name="line475">475: </a><font color="#B22222">   Notes: On the Fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line476">476: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
-
-<a name="line478">478: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line480">480: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>()</font>
-<a name="line481">481: </a><font color="#B22222">@*/</font>
-<a name="line482">482: </a><strong><font color="#4169E1"><a name="BVGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const char *prefix[])</font></strong>
-<a name="line483">483: </a>{
-
-<a name="line489">489: </a>  PetscObjectGetOptionsPrefix((PetscObject)bv,prefix);
-<a name="line490">490: </a>  <font color="#4169E1">return</font>(0);
-<a name="line491">491: </a>}
-
-<a name="line495">495: </a><strong><font color="#4169E1"><a name="BVView_Default"></a>static PetscErrorCode BVView_Default(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
-<a name="line496">496: </a>{
-<a name="line497">497: </a>  PetscErrorCode    ierr;
-<a name="line498">498: </a>  PetscInt          j;
-<a name="line499">499: </a>  Vec               v;
-<a name="line500">500: </a>  PetscViewerFormat format;
-<a name="line501">501: </a>  PetscBool         isascii,ismatlab=PETSC_FALSE;
-<a name="line502">502: </a>  const char        *bvname,*name;
-
-<a name="line505">505: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line506">506: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line507">507: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line508">508: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) ismatlab = PETSC_TRUE;
-<a name="line509">509: </a>  }
-<a name="line510">510: </a>  <font color="#4169E1">if</font> (ismatlab) {
-<a name="line511">511: </a>    PetscObjectGetName((PetscObject)bv,&bvname);
-<a name="line512">512: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[];\n"</font>,bvname);
-<a name="line513">513: </a>  }
-<a name="line514">514: </a>  <font color="#4169E1">for</font> (j=bv->nc;j<bv->nc+bv->m;j++) {
-<a name="line515">515: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&v);
-<a name="line516">516: </a>    VecView(v,viewer);
-<a name="line517">517: </a>    <font color="#4169E1">if</font> (ismatlab) {
-<a name="line518">518: </a>      PetscObjectGetName((PetscObject)v,&name);
-<a name="line519">519: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[%s,%s];clear %s\n"</font>,bvname,bvname,name,name);
-<a name="line520">520: </a>    }
-<a name="line521">521: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&v);
-<a name="line522">522: </a>  }
-<a name="line523">523: </a>  <font color="#4169E1">return</font>(0);
-<a name="line524">524: </a>}
-
-<a name="line528">528: </a><font color="#B22222">/*@C</font>
-<a name="line529">529: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a> - Prints the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> data structure.</font>
-
-<a name="line531">531: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line533">533: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line534">534: </a><font color="#B22222">+  bv     - the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> context</font>
-<a name="line535">535: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line537">537: </a><font color="#B22222">   Note:</font>
-<a name="line538">538: </a><font color="#B22222">   The available visualization contexts include</font>
-<a name="line539">539: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
-<a name="line540">540: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
-<a name="line541">541: </a><font color="#B22222">         output where only the first processor opens</font>
-<a name="line542">542: </a><font color="#B22222">         the file.  All other processors send their</font>
-<a name="line543">543: </a><font color="#B22222">         data to the first processor to print.</font>
-
-<a name="line545">545: </a><font color="#B22222">   The user can open an alternative visualization contexts with</font>
-<a name="line546">546: </a><font color="#B22222">   PetscViewerASCIIOpen() (output to a specified file).</font>
-
-<a name="line548">548: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line550">550: </a><font color="#B22222">.seealso: PetscViewerASCIIOpen()</font>
-<a name="line551">551: </a><font color="#B22222">@*/</font>
-<a name="line552">552: </a><strong><font color="#4169E1"><a name="BVView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
-<a name="line553">553: </a>{
-<a name="line554">554: </a>  PetscErrorCode    ierr;
-<a name="line555">555: </a>  PetscBool         isascii;
-<a name="line556">556: </a>  PetscViewerFormat format;
-<a name="line557">557: </a>  const char        *orthname[2] = {<font color="#666666">"classical"</font>,<font color="#666666">"modified"</font>};
-<a name="line558">558: </a>  const char        *refname[3] = {<font color="#666666">"if needed"</font>,<font color="#666666">"never"</font>,<font color="#666666">"always"</font>};
-<a name="line559">559: </a>  const char        *borthname[2] = {<font color="#666666">"Gram-Schmidt"</font>,<font color="#666666">"Cholesky"</font>};
-
-<a name="line563">563: </a>  <font color="#4169E1">if</font> (!viewer) {
-<a name="line564">564: </a>    PetscViewerASCIIGetStdout(PetscObjectComm((PetscObject)bv),&viewer);
-<a name="line565">565: </a>  }
-
-<a name="line568">568: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line569">569: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line570">570: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)bv,viewer);
-<a name="line571">571: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line572">572: </a>    PetscViewerASCIIPushTab(viewer);
-<a name="line573">573: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) {
-<a name="line574">574: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D columns of global length %D\n"</font>,bv->m,bv->N);
-<a name="line575">575: </a>      <font color="#4169E1">if</font> (bv->nc>0) {
-<a name="line576">576: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"number of constraints: %D\n"</font>,bv->nc);
-<a name="line577">577: </a>      }
-<a name="line578">578: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"vector orthogonalization method: %s Gram-Schmidt\n"</font>,orthname[bv->orthog_type]);
-<a name="line579">579: </a>      <font color="#4169E1">switch</font> (bv->orthog_ref) {
-<a name="line580">580: </a>        <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
-<a name="line581">581: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"orthogonalization refinement: %s (eta: %g)\n"</font>,refname[bv->orthog_ref],(double)bv->orthog_eta);
-<a name="line582">582: </a>          <font color="#4169E1">break</font>;
-<a name="line583">583: </a>        <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
-<a name="line584">584: </a>        <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
-<a name="line585">585: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"orthogonalization refinement: %s\n"</font>,refname[bv->orthog_ref]);
-<a name="line586">586: </a>          <font color="#4169E1">break</font>;
-<a name="line587">587: </a>      }
-<a name="line588">588: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"block orthogonalization method: %s\n"</font>,borthname[bv->orthog_block]);
-<a name="line589">589: </a>      <font color="#4169E1">if</font> (bv->matrix) {
-<a name="line590">590: </a>        <font color="#4169E1">if</font> (bv->indef) {
-<a name="line591">591: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"indefinite inner product\n"</font>);
-<a name="line592">592: </a>        } <font color="#4169E1">else</font> {
-<a name="line593">593: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"non-standard inner product\n"</font>);
-<a name="line594">594: </a>        }
-<a name="line595">595: </a>        PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
-<a name="line596">596: </a>        MatView(bv->matrix,viewer);
-<a name="line597">597: </a>        PetscViewerPopFormat(viewer);
-<a name="line598">598: </a>      }
-<a name="line599">599: </a>      <font color="#4169E1">switch</font> (bv->vmm) {
-<a name="line600">600: </a>        <font color="#4169E1">case</font> BV_MATMULT_VECS:
-<a name="line601">601: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"doing matmult as matrix-vector products\n"</font>);
-<a name="line602">602: </a>          <font color="#4169E1">break</font>;
-<a name="line603">603: </a>        <font color="#4169E1">case</font> BV_MATMULT_MAT:
-<a name="line604">604: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"doing matmult as a single matrix-matrix product\n"</font>);
-<a name="line605">605: </a>          <font color="#4169E1">break</font>;
-<a name="line606">606: </a>        <font color="#4169E1">case</font> BV_MATMULT_MAT_SAVE:
-<a name="line607">607: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"doing matmult as a single matrix-matrix product, saving aux matrices\n"</font>);
-<a name="line608">608: </a>          <font color="#4169E1">break</font>;
-<a name="line609">609: </a>      }
-<a name="line610">610: </a>    } <font color="#4169E1">else</font> {
-<a name="line611">611: </a>      <font color="#4169E1">if</font> (bv->ops->view) { (*bv->ops->view)(bv,viewer); }
-<a name="line612">612: </a>      <font color="#4169E1">else</font> { BVView_Default(bv,viewer); }
-<a name="line613">613: </a>    }
-<a name="line614">614: </a>    PetscViewerASCIIPopTab(viewer);
-<a name="line615">615: </a>  } <font color="#4169E1">else</font> {
-<a name="line616">616: </a>    (*bv->ops->view)(bv,viewer);
-<a name="line617">617: </a>  }
-<a name="line618">618: </a>  <font color="#4169E1">return</font>(0);
-<a name="line619">619: </a>}
-
-<a name="line623">623: </a><font color="#B22222">/*@C</font>
-<a name="line624">624: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a> - Adds a new storage format to de <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> package.</font>
-
-<a name="line626">626: </a><font color="#B22222">   Not collective</font>
-
-<a name="line628">628: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line629">629: </a><font color="#B22222">+  name     - name of a new user-defined <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-<a name="line630">630: </a><font color="#B22222">-  function - routine to create context</font>
-
-<a name="line632">632: </a><font color="#B22222">   Notes:</font>
-<a name="line633">633: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a>() may be called multiple times to add several user-defined</font>
-<a name="line634">634: </a><font color="#B22222">   basis vectors.</font>
-
-<a name="line636">636: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line638">638: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>()</font>
-<a name="line639">639: </a><font color="#B22222">@*/</font>
-<a name="line640">640: </a><strong><font color="#4169E1"><a name="BVRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>))</font></strong>
-<a name="line641">641: </a>{
-
-<a name="line645">645: </a>  PetscFunctionListAdd(&BVList,name,function);
-<a name="line646">646: </a>  <font color="#4169E1">return</font>(0);
-<a name="line647">647: </a>}
-
-<a name="line651">651: </a><strong><font color="#4169E1"><a name="BVAllocateWork_Private"></a>PetscErrorCode BVAllocateWork_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt s)</font></strong>
-<a name="line652">652: </a>{
-
-<a name="line656">656: </a>  <font color="#4169E1">if</font> (s>bv->lwork) {
-<a name="line657">657: </a>    PetscFree(bv->work);
-<a name="line658">658: </a>    PetscMalloc1(s,&bv->work);
-<a name="line659">659: </a>    PetscLogObjectMemory((PetscObject)bv,(s-bv->lwork)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line660">660: </a>    bv->lwork = s;
-<a name="line661">661: </a>  }
-<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
-<a name="line663">663: </a>}
+<a name="line30"> 30: </a>const char *BVOrthogTypes[] = {<font color="#666666">"CGS"</font>,<font color="#666666">"MGS"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVOrthogType.html#BVOrthogType">BVOrthogType</a>"</font>,<font color="#666666">"BV_ORTHOG_"</font>,0};
+<a name="line31"> 31: </a>const char *BVOrthogRefineTypes[] = {<font color="#666666">"IFNEEDED"</font>,<font color="#666666">"NEVER"</font>,<font color="#666666">"ALWAYS"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVOrthogRefineType.html#BVOrthogRefineType">BVOrthogRefineType</a>"</font>,<font color="#666666">"BV_ORTHOG_REFINE_"</font>,0};
+<a name="line32"> 32: </a>const char *BVOrthogBlockTypes[] = {<font color="#666666">"GS"</font>,<font color="#666666">"CHOL"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVOrthogBlockType.html#BVOrthogBlockType">BVOrthogBlockType</a>"</font>,<font color="#666666">"BV_ORTHOG_BLOCK_"</font>,0};
+<a name="line33"> 33: </a>const char *BVMatMultTypes[] = {<font color="#666666">"VECS"</font>,<font color="#666666">"MAT"</font>,<font color="#666666">"MAT_SAVE"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMatMultType.html#BVMatMultType">BVMatMultType</a>"</font>,<font color="#666666">"BV_MATMULT_"</font>,0};
+
+<a name="line37"> 37: </a><font color="#B22222">/*@C</font>
+<a name="line38"> 38: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</a> - This function destroys everything in the Slepc interface</font>
+<a name="line39"> 39: </a><font color="#B22222">   to the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> package. It is called from <a href="../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>().</font>
+
+<a name="line41"> 41: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line43"> 43: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>()</font>
+<a name="line44"> 44: </a><font color="#B22222">@*/</font>
+<a name="line45"> 45: </a><strong><font color="#4169E1"><a name="BVFinalizePackage"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</a>(void)</font></strong>
+<a name="line46"> 46: </a>{
+
+<a name="line50"> 50: </a>  PetscFunctionListDestroy(&BVList);
+<a name="line51"> 51: </a>  BVPackageInitialized = PETSC_FALSE;
+<a name="line52"> 52: </a>  BVRegisterAllCalled  = PETSC_FALSE;
+<a name="line53"> 53: </a>  <font color="#4169E1">return</font>(0);
+<a name="line54"> 54: </a>}
+
+<a name="line58"> 58: </a><font color="#B22222">/*@C</font>
+<a name="line59"> 59: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</a> - This function initializes everything in the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> package.</font>
+<a name="line60"> 60: </a><font color="#B22222">   It is called from PetscDLLibraryRegister() when using dynamic libraries, and</font>
+<a name="line61"> 61: </a><font color="#B22222">   on the first call to <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>() when using static libraries.</font>
+
+<a name="line63"> 63: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line65"> 65: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
+<a name="line66"> 66: </a><font color="#B22222">@*/</font>
+<a name="line67"> 67: </a><strong><font color="#4169E1"><a name="BVInitializePackage"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</a>(void)</font></strong>
+<a name="line68"> 68: </a>{
+<a name="line69"> 69: </a>  char           logList[256];
+<a name="line70"> 70: </a>  char           *className;
+<a name="line71"> 71: </a>  PetscBool      opt;
+
+<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (BVPackageInitialized) <font color="#4169E1">return</font>(0);
+<a name="line76"> 76: </a>  BVPackageInitialized = PETSC_TRUE;
+<a name="line77"> 77: </a>  <font color="#B22222">/* Register Classes */</font>
+<a name="line78"> 78: </a>  PetscClassIdRegister(<font color="#666666">"Basis Vectors"</font>,&BV_CLASSID);
+<a name="line79"> 79: </a>  <font color="#B22222">/* Register Constructors */</font>
+<a name="line80"> 80: </a>  <a href="../../../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>();
+<a name="line81"> 81: </a>  <font color="#B22222">/* Register Events */</font>
+<a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>"</font>,BV_CLASSID,&BV_Create);
+<a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>"</font>,BV_CLASSID,&BV_Copy);
+<a name="line84"> 84: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>"</font>,BV_CLASSID,&BV_Mult);
+<a name="line85"> 85: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>"</font>,BV_CLASSID,&BV_MultVec);
+<a name="line86"> 86: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>"</font>,BV_CLASSID,&BV_MultInPlace);
+<a name="line87"> 87: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>"</font>,BV_CLASSID,&BV_Dot);
+<a name="line88"> 88: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>"</font>,BV_CLASSID,&BV_DotVec);
+<a name="line89"> 89: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>"</font>,BV_CLASSID,&BV_Orthogonalize);
+<a name="line90"> 90: </a>  PetscLogEventRegister(<font color="#666666">"BVOrthogonalizeV"</font>,BV_CLASSID,&BV_OrthogonalizeVec);
+<a name="line91"> 91: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>"</font>,BV_CLASSID,&BV_Scale);
+<a name="line92"> 92: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>"</font>,BV_CLASSID,&BV_Norm);
+<a name="line93"> 93: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>"</font>,BV_CLASSID,&BV_NormVec);
+<a name="line94"> 94: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>"</font>,BV_CLASSID,&BV_SetRandom);
+<a name="line95"> 95: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>"</font>,BV_CLASSID,&BV_MatMult);
+<a name="line96"> 96: </a>  PetscLogEventRegister(<font color="#666666">"BVMatMultVec"</font>,BV_CLASSID,&BV_MatMultVec);
+<a name="line97"> 97: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>"</font>,BV_CLASSID,&BV_MatProject);
+<a name="line98"> 98: </a>  <font color="#B22222">/* Process info exclusions */</font>
+<a name="line99"> 99: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line100">100: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line101">101: </a>    PetscStrstr(logList,<font color="#666666">"bv"</font>,&className);
+<a name="line102">102: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line103">103: </a>      PetscInfoDeactivateClass(BV_CLASSID);
+<a name="line104">104: </a>    }
+<a name="line105">105: </a>  }
+<a name="line106">106: </a>  <font color="#B22222">/* Process summary exclusions */</font>
+<a name="line107">107: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (opt) {
+<a name="line109">109: </a>    PetscStrstr(logList,<font color="#666666">"bv"</font>,&className);
+<a name="line110">110: </a>    <font color="#4169E1">if</font> (className) {
+<a name="line111">111: </a>      PetscLogEventDeactivateClass(BV_CLASSID);
+<a name="line112">112: </a>    }
+<a name="line113">113: </a>  }
+<a name="line114">114: </a>  PetscRegisterFinalize(<a href="../../../../../docs/manualpages/BV/BVFinalizePackage.html#BVFinalizePackage">BVFinalizePackage</a>);
+<a name="line115">115: </a>  <font color="#4169E1">return</font>(0);
+<a name="line116">116: </a>}
+
+<a name="line120">120: </a><font color="#B22222">/*@</font>
+<a name="line121">121: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a> - Destroys <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> context that was created with <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>().</font>
+
+<a name="line123">123: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line125">125: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line126">126: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line128">128: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line130">130: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>()</font>
+<a name="line131">131: </a><font color="#B22222">@*/</font>
+<a name="line132">132: </a><strong><font color="#4169E1"><a name="BVDestroy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *bv)</font></strong>
+<a name="line133">133: </a>{
+
+<a name="line137">137: </a>  <font color="#4169E1">if</font> (!*bv) <font color="#4169E1">return</font>(0);
+<a name="line139">139: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*bv))->refct > 0) { *bv = 0; <font color="#4169E1">return</font>(0); }
+<a name="line140">140: </a>  <font color="#4169E1">if</font> ((*bv)->ops->destroy) { (*(*bv)->ops->destroy)(*bv); }
+<a name="line141">141: </a>  VecDestroy(&(*bv)->t);
+<a name="line142">142: </a>  MatDestroy(&(*bv)->matrix);
+<a name="line143">143: </a>  VecDestroy(&(*bv)->Bx);
+<a name="line144">144: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&(*bv)->cached);
+<a name="line145">145: </a>  PetscFree((*bv)->work);
+<a name="line146">146: </a>  PetscFree2((*bv)->h,(*bv)->c);
+<a name="line147">147: </a>  PetscFree((*bv)->omega);
+<a name="line148">148: </a>  MatDestroy(&(*bv)->B);
+<a name="line149">149: </a>  MatDestroy(&(*bv)->C);
+<a name="line150">150: </a>  PetscRandomDestroy(&(*bv)->rand);
+<a name="line151">151: </a>  PetscHeaderDestroy(bv);
+<a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
+<a name="line153">153: </a>}
+
+<a name="line157">157: </a><font color="#B22222">/*@</font>
+<a name="line158">158: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a> - Creates a basis vectors context.</font>
+
+<a name="line160">160: </a><font color="#B22222">   Collective on MPI_Comm</font>
+
+<a name="line162">162: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line163">163: </a><font color="#B22222">.  comm - MPI communicator</font>
+
+<a name="line165">165: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line166">166: </a><font color="#B22222">.  bv - location to put the basis vectors context</font>
+
+<a name="line168">168: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line170">170: </a><font color="#B22222">.seealso: BVSetUp(), <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(), <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+<a name="line171">171: </a><font color="#B22222">@*/</font>
+<a name="line172">172: </a><strong><font color="#4169E1"><a name="BVCreate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVCreate.html#BVCreate">BVCreate</a>(MPI_Comm comm,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> *newbv)</font></strong>
+<a name="line173">173: </a>{
+<a name="line175">175: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             bv;
+
+<a name="line179">179: </a>  *newbv = 0;
+<a name="line180">180: </a>  <a href="../../../../../docs/manualpages/BV/BVInitializePackage.html#BVInitializePackage">BVInitializePackage</a>();
+<a name="line181">181: </a>  SlepcHeaderCreate(bv,BV_CLASSID,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>"</font>,<font color="#666666">"Basis Vectors"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>"</font>,comm,<a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>,<a href="../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>);
+
+<a name="line183">183: </a>  bv->t            = NULL;
+<a name="line184">184: </a>  bv->n            = -1;
+<a name="line185">185: </a>  bv->N            = -1;
+<a name="line186">186: </a>  bv->m            = 0;
+<a name="line187">187: </a>  bv->l            = 0;
+<a name="line188">188: </a>  bv->k            = 0;
+<a name="line189">189: </a>  bv->nc           = 0;
+<a name="line190">190: </a>  bv->orthog_type  = BV_ORTHOG_CGS;
+<a name="line191">191: </a>  bv->orthog_ref   = BV_ORTHOG_REFINE_IFNEEDED;
+<a name="line192">192: </a>  bv->orthog_eta   = 0.7071;
+<a name="line193">193: </a>  bv->orthog_block = BV_ORTHOG_BLOCK_GS;
+<a name="line194">194: </a>  bv->matrix       = NULL;
+<a name="line195">195: </a>  bv->indef        = PETSC_FALSE;
+<a name="line196">196: </a>  bv->vmm          = BV_MATMULT_MAT;
+
+<a name="line198">198: </a>  bv->Bx           = NULL;
+<a name="line199">199: </a>  bv->xid          = 0;
+<a name="line200">200: </a>  bv->xstate       = 0;
+<a name="line201">201: </a>  bv->cv[0]        = NULL;
+<a name="line202">202: </a>  bv->cv[1]        = NULL;
+<a name="line203">203: </a>  bv->ci[0]        = -1;
+<a name="line204">204: </a>  bv->ci[1]        = -1;
+<a name="line205">205: </a>  bv->st[0]        = -1;
+<a name="line206">206: </a>  bv->st[1]        = -1;
+<a name="line207">207: </a>  bv->id[0]        = 0;
+<a name="line208">208: </a>  bv->id[1]        = 0;
+<a name="line209">209: </a>  bv->h            = NULL;
+<a name="line210">210: </a>  bv->c            = NULL;
+<a name="line211">211: </a>  bv->omega        = NULL;
+<a name="line212">212: </a>  bv->B            = NULL;
+<a name="line213">213: </a>  bv->C            = NULL;
+<a name="line214">214: </a>  bv->Aid          = 0;
+<a name="line215">215: </a>  bv->defersfo     = PETSC_FALSE;
+<a name="line216">216: </a>  bv->cached       = NULL;
+<a name="line217">217: </a>  bv->bvstate      = 0;
+<a name="line218">218: </a>  bv->rand         = NULL;
+<a name="line219">219: </a>  bv->rrandom      = PETSC_FALSE;
+<a name="line220">220: </a>  bv->work         = NULL;
+<a name="line221">221: </a>  bv->lwork        = 0;
+<a name="line222">222: </a>  bv->data         = NULL;
+
+<a name="line224">224: </a>  *newbv = bv;
+<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
+<a name="line226">226: </a>}
+
+<a name="line230">230: </a><font color="#B22222">/*@</font>
+<a name="line231">231: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a> - Insert a vector into the specified column.</font>
+
+<a name="line233">233: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line235">235: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line236">236: </a><font color="#B22222">+  V - basis vectors</font>
+<a name="line237">237: </a><font color="#B22222">.  j - the column of V to be overwritten</font>
+<a name="line238">238: </a><font color="#B22222">-  w - the vector to be copied</font>
+
+<a name="line240">240: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line242">242: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>()</font>
+<a name="line243">243: </a><font color="#B22222">@*/</font>
+<a name="line244">244: </a><strong><font color="#4169E1"><a name="BVInsertVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt j,Vec w)</font></strong>
+<a name="line245">245: </a>{
+<a name="line247">247: </a>  PetscInt       n,N;
+<a name="line248">248: </a>  Vec            v;
+
+<a name="line255">255: </a>  BVCheckSizes(V,1);
+
+<a name="line258">258: </a>  VecGetSize(w,&N);
+<a name="line259">259: </a>  VecGetLocalSize(w,&n);
+<a name="line260">260: </a>  <font color="#4169E1">if</font> (N!=V->N || n!=V->n) SETERRQ4(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,V->N,V->n);
+<a name="line261">261: </a>  <font color="#4169E1">if</font> (j<-V->nc || j>=V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, should be between %D and %D"</font>,j,-V->nc,V->m-1);
+
+<a name="line263">263: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&v);
+<a name="line264">264: </a>  VecCopy(w,v);
+<a name="line265">265: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&v);
+<a name="line266">266: </a>  PetscObjectStateIncrease((PetscObject)V);
+<a name="line267">267: </a>  <font color="#4169E1">return</font>(0);
+<a name="line268">268: </a>}
+
+<a name="line272">272: </a><font color="#B22222">/*@</font>
+<a name="line273">273: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a> - Insert a set of vectors into the specified columns.</font>
+
+<a name="line275">275: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line277">277: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line278">278: </a><font color="#B22222">+  V - basis vectors</font>
+<a name="line279">279: </a><font color="#B22222">.  s - first column of V to be overwritten</font>
+<a name="line280">280: </a><font color="#B22222">.  W - set of vectors to be copied</font>
+<a name="line281">281: </a><font color="#B22222">-  orth - flag indicating if the vectors must be orthogonalized</font>
+
+<a name="line283">283: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line284">284: </a><font color="#B22222">.  m - number of input vectors, on output the number of linearly independent</font>
+<a name="line285">285: </a><font color="#B22222">       vectors</font>
+
+<a name="line287">287: </a><font color="#B22222">   Notes:</font>
+<a name="line288">288: </a><font color="#B22222">   Copies the contents of vectors W to V(:,s:s+n). If the orthogonalization</font>
+<a name="line289">289: </a><font color="#B22222">   flag is set, then the vectors are copied one by one and then orthogonalized</font>
+<a name="line290">290: </a><font color="#B22222">   against the previous ones. If any of them is linearly dependent then it</font>
+<a name="line291">291: </a><font color="#B22222">   is discarded and the value of m is decreased.</font>
+
+<a name="line293">293: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line295">295: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVInsertVec.html#BVInsertVec">BVInsertVec</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>()</font>
+<a name="line296">296: </a><font color="#B22222">@*/</font>
+<a name="line297">297: </a><strong><font color="#4169E1"><a name="BVInsertVecs"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt s,PetscInt *m,Vec *W,PetscBool orth)</font></strong>
+<a name="line298">298: </a>{
+<a name="line300">300: </a>  PetscInt       n,N,i,ndep;
+<a name="line301">301: </a>  PetscBool      lindep;
+<a name="line302">302: </a>  PetscReal      norm;
+<a name="line303">303: </a>  Vec            v;
+
+<a name="line310">310: </a>  <font color="#4169E1">if</font> (!*m) <font color="#4169E1">return</font>(0);
+<a name="line311">311: </a>  <font color="#4169E1">if</font> (*m<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Number of vectors (given %D) cannot be negative"</font>,*m);
+<a name="line316">316: </a>  BVCheckSizes(V,1);
+
+<a name="line319">319: </a>  VecGetSize(*W,&N);
+<a name="line320">320: </a>  VecGetLocalSize(*W,&n);
+<a name="line321">321: </a>  <font color="#4169E1">if</font> (N!=V->N || n!=V->n) SETERRQ4(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,V->N,V->n);
+<a name="line322">322: </a>  <font color="#4169E1">if</font> (s<0 || s>=V->m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument s has wrong value %D, should be between 0 and %D"</font>,s,V->m-1);
+<a name="line323">323: </a>  <font color="#4169E1">if</font> (s+(*m)>V->m) SETERRQ1(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Too many vectors provided, there is only room for %D"</font>,V->m);
+
+<a name="line325">325: </a>  ndep = 0;
+<a name="line326">326: </a>  <font color="#4169E1">for</font> (i=0;i<*m;i++) {
+<a name="line327">327: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,s+i-ndep,&v);
+<a name="line328">328: </a>    VecCopy(W[i],v);
+<a name="line329">329: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,s+i-ndep,&v);
+<a name="line330">330: </a>    <font color="#4169E1">if</font> (orth) {
+<a name="line331">331: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,s+i-ndep,NULL,&norm,&lindep);
+<a name="line332">332: </a>      <font color="#4169E1">if</font> (norm==0.0 || lindep) {
+<a name="line333">333: </a>        PetscInfo1(V,<font color="#666666">"Removing linearly dependent vector %D\n"</font>,i);
+<a name="line334">334: </a>        ndep++;
+<a name="line335">335: </a>      } <font color="#4169E1">else</font> {
+<a name="line336">336: </a>        <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,s+i-ndep,1.0/norm);
+<a name="line337">337: </a>      }
+<a name="line338">338: </a>    }
+<a name="line339">339: </a>  }
+<a name="line340">340: </a>  *m -= ndep;
+<a name="line341">341: </a>  PetscObjectStateIncrease((PetscObject)V);
+<a name="line342">342: </a>  <font color="#4169E1">return</font>(0);
+<a name="line343">343: </a>}
+
+<a name="line347">347: </a><font color="#B22222">/*@</font>
+<a name="line348">348: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a> - Insert a set of vectors as constraints.</font>
+
+<a name="line350">350: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line352">352: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line353">353: </a><font color="#B22222">+  V - basis vectors</font>
+<a name="line354">354: </a><font color="#B22222">-  C - set of vectors to be inserted as constraints</font>
+
+<a name="line356">356: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line357">357: </a><font color="#B22222">.  nc - number of input vectors, on output the number of linearly independent</font>
+<a name="line358">358: </a><font color="#B22222">       vectors</font>
+
+<a name="line360">360: </a><font color="#B22222">   Notes:</font>
+<a name="line361">361: </a><font color="#B22222">   The constraints are relevant only during orthogonalization. Constraint</font>
+<a name="line362">362: </a><font color="#B22222">   vectors span a subspace that is deflated in every orthogonalization</font>
+<a name="line363">363: </a><font color="#B22222">   operation, so they are intended for removing those directions from the</font>
+<a name="line364">364: </a><font color="#B22222">   orthogonal basis computed in regular <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> columns.</font>
+
+<a name="line366">366: </a><font color="#B22222">   Constraints are not stored in regular <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> colums, but in a special part of</font>
+<a name="line367">367: </a><font color="#B22222">   the storage. They can be accessed with negative indices in <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>().</font>
+
+<a name="line369">369: </a><font color="#B22222">   This operation is DESTRUCTIVE, meaning that all data contained in the</font>
+<a name="line370">370: </a><font color="#B22222">   columns of V is lost. This is typically invoked just after creating the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+<a name="line371">371: </a><font color="#B22222">   Once a set of constraints has been set, it is not allowed to call this</font>
+<a name="line372">372: </a><font color="#B22222">   function again.</font>
+
+<a name="line374">374: </a><font color="#B22222">   The vectors are copied one by one and then orthogonalized against the</font>
+<a name="line375">375: </a><font color="#B22222">   previous ones. If any of them is linearly dependent then it is discarded</font>
+<a name="line376">376: </a><font color="#B22222">   and the value of nc is decreased. The behaviour is similar to <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>().</font>
+
+<a name="line378">378: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line380">380: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>()</font>
+<a name="line381">381: </a><font color="#B22222">@*/</font>
+<a name="line382">382: </a><strong><font color="#4169E1"><a name="BVInsertConstraints"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,PetscInt *nc,Vec *C)</font></strong>
+<a name="line383">383: </a>{
+<a name="line385">385: </a>  PetscInt       msave;
+
+<a name="line391">391: </a>  <font color="#4169E1">if</font> (!*nc) <font color="#4169E1">return</font>(0);
+<a name="line392">392: </a>  <font color="#4169E1">if</font> (*nc<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Number of constraints (given %D) cannot be negative"</font>,*nc);
+<a name="line396">396: </a>  BVCheckSizes(V,1);
+<a name="line398">398: </a>  <font color="#4169E1">if</font> (V->nc) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Constraints already present in this <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> object"</font>);
+<a name="line399">399: </a>  <font color="#4169E1">if</font> (V->ci[0]!=-1 || V->ci[1]!=-1) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Cannot call <a href="../../../../../docs/manualpages/BV/BVInsertConstraints.html#BVInsertConstraints">BVInsertConstraints</a> after <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>"</font>);
+
+<a name="line401">401: </a>  msave = V->m;
+<a name="line402">402: </a>  <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(V,*nc+V->m,PETSC_FALSE);
+<a name="line403">403: </a>  <a href="../../../../../docs/manualpages/BV/BVInsertVecs.html#BVInsertVecs">BVInsertVecs</a>(V,0,nc,C,PETSC_TRUE);
+<a name="line404">404: </a>  V->nc = *nc;
+<a name="line405">405: </a>  V->m  = msave;
+<a name="line406">406: </a>  V->ci[0] = -V->nc-1;
+<a name="line407">407: </a>  V->ci[1] = -V->nc-1;
+<a name="line408">408: </a>  PetscObjectStateIncrease((PetscObject)V);
+<a name="line409">409: </a>  <font color="#4169E1">return</font>(0);
+<a name="line410">410: </a>}
+
+<a name="line414">414: </a><font color="#B22222">/*@C</font>
+<a name="line415">415: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line416">416: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options in the database.</font>
+
+<a name="line418">418: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line420">420: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line421">421: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line422">422: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> option requests</font>
+
+<a name="line424">424: </a><font color="#B22222">   Notes:</font>
+<a name="line425">425: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line426">426: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line427">427: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line429">429: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line431">431: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>()</font>
+<a name="line432">432: </a><font color="#B22222">@*/</font>
+<a name="line433">433: </a><strong><font color="#4169E1"><a name="BVSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const char *prefix)</font></strong>
+<a name="line434">434: </a>{
+
+<a name="line439">439: </a>  PetscObjectSetOptionsPrefix((PetscObject)bv,prefix);
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
+
+<a name="line445">445: </a><font color="#B22222">/*@C</font>
+<a name="line446">446: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line447">447: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options in the database.</font>
+
+<a name="line449">449: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line451">451: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line452">452: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line453">453: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> option requests</font>
+
+<a name="line455">455: </a><font color="#B22222">   Notes:</font>
+<a name="line456">456: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line457">457: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line458">458: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line460">460: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line462">462: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>()</font>
+<a name="line463">463: </a><font color="#B22222">@*/</font>
+<a name="line464">464: </a><strong><font color="#4169E1"><a name="BVAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const char *prefix)</font></strong>
+<a name="line465">465: </a>{
+
+<a name="line470">470: </a>  PetscObjectAppendOptionsPrefix((PetscObject)bv,prefix);
+<a name="line471">471: </a>  <font color="#4169E1">return</font>(0);
+<a name="line472">472: </a>}
+
+<a name="line476">476: </a><font color="#B22222">/*@C</font>
+<a name="line477">477: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line478">478: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> options in the database.</font>
+
+<a name="line480">480: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line482">482: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line483">483: </a><font color="#B22222">.  bv - the basis vectors context</font>
+
+<a name="line485">485: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line486">486: </a><font color="#B22222">.  prefix - pointer to the prefix string used, is returned</font>
+
+<a name="line488">488: </a><font color="#B22222">   Note:</font>
+<a name="line489">489: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line490">490: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+
+<a name="line492">492: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line494">494: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetOptionsPrefix.html#BVSetOptionsPrefix">BVSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/BV/BVAppendOptionsPrefix.html#BVAppendOptionsPrefix">BVAppendOptionsPrefix</a>()</font>
+<a name="line495">495: </a><font color="#B22222">@*/</font>
+<a name="line496">496: </a><strong><font color="#4169E1"><a name="BVGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVGetOptionsPrefix.html#BVGetOptionsPrefix">BVGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,const char *prefix[])</font></strong>
+<a name="line497">497: </a>{
+
+<a name="line503">503: </a>  PetscObjectGetOptionsPrefix((PetscObject)bv,prefix);
+<a name="line504">504: </a>  <font color="#4169E1">return</font>(0);
+<a name="line505">505: </a>}
+
+<a name="line509">509: </a><strong><font color="#4169E1"><a name="BVView_Default"></a>static PetscErrorCode BVView_Default(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
+<a name="line510">510: </a>{
+<a name="line511">511: </a>  PetscErrorCode    ierr;
+<a name="line512">512: </a>  PetscInt          j;
+<a name="line513">513: </a>  Vec               v;
+<a name="line514">514: </a>  PetscViewerFormat format;
+<a name="line515">515: </a>  PetscBool         isascii,ismatlab=PETSC_FALSE;
+<a name="line516">516: </a>  const char        *bvname,*name;
+
+<a name="line519">519: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line520">520: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line521">521: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line522">522: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) ismatlab = PETSC_TRUE;
+<a name="line523">523: </a>  }
+<a name="line524">524: </a>  <font color="#4169E1">if</font> (ismatlab) {
+<a name="line525">525: </a>    PetscObjectGetName((PetscObject)bv,&bvname);
+<a name="line526">526: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[];\n"</font>,bvname);
+<a name="line527">527: </a>  }
+<a name="line528">528: </a>  <font color="#4169E1">for</font> (j=-bv->nc;j<bv->m;j++) {
+<a name="line529">529: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&v);
+<a name="line530">530: </a>    VecView(v,viewer);
+<a name="line531">531: </a>    <font color="#4169E1">if</font> (ismatlab) {
+<a name="line532">532: </a>      PetscObjectGetName((PetscObject)v,&name);
+<a name="line533">533: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s=[%s,%s];clear %s\n"</font>,bvname,bvname,name,name);
+<a name="line534">534: </a>    }
+<a name="line535">535: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&v);
+<a name="line536">536: </a>  }
+<a name="line537">537: </a>  <font color="#4169E1">return</font>(0);
+<a name="line538">538: </a>}
+
+<a name="line542">542: </a><font color="#B22222">/*@C</font>
+<a name="line543">543: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a> - Prints the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> data structure.</font>
+
+<a name="line545">545: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line547">547: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line548">548: </a><font color="#B22222">+  bv     - the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> context</font>
+<a name="line549">549: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line551">551: </a><font color="#B22222">   Note:</font>
+<a name="line552">552: </a><font color="#B22222">   The available visualization contexts include</font>
+<a name="line553">553: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
+<a name="line554">554: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
+<a name="line555">555: </a><font color="#B22222">         output where only the first processor opens</font>
+<a name="line556">556: </a><font color="#B22222">         the file.  All other processors send their</font>
+<a name="line557">557: </a><font color="#B22222">         data to the first processor to print.</font>
+
+<a name="line559">559: </a><font color="#B22222">   The user can open an alternative visualization contexts with</font>
+<a name="line560">560: </a><font color="#B22222">   PetscViewerASCIIOpen() (output to a specified file).</font>
+
+<a name="line562">562: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line564">564: </a><font color="#B22222">.seealso: PetscViewerASCIIOpen()</font>
+<a name="line565">565: </a><font color="#B22222">@*/</font>
+<a name="line566">566: </a><strong><font color="#4169E1"><a name="BVView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVView.html#BVView">BVView</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscViewer viewer)</font></strong>
+<a name="line567">567: </a>{
+<a name="line568">568: </a>  PetscErrorCode    ierr;
+<a name="line569">569: </a>  PetscBool         isascii;
+<a name="line570">570: </a>  PetscViewerFormat format;
+<a name="line571">571: </a>  const char        *orthname[2] = {<font color="#666666">"classical"</font>,<font color="#666666">"modified"</font>};
+<a name="line572">572: </a>  const char        *refname[3] = {<font color="#666666">"if needed"</font>,<font color="#666666">"never"</font>,<font color="#666666">"always"</font>};
+<a name="line573">573: </a>  const char        *borthname[2] = {<font color="#666666">"Gram-Schmidt"</font>,<font color="#666666">"Cholesky"</font>};
+
+<a name="line577">577: </a>  <font color="#4169E1">if</font> (!viewer) {
+<a name="line578">578: </a>    PetscViewerASCIIGetStdout(PetscObjectComm((PetscObject)bv),&viewer);
+<a name="line579">579: </a>  }
+
+<a name="line582">582: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line583">583: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line584">584: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)bv,viewer);
+<a name="line585">585: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line586">586: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line587">587: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) {
+<a name="line588">588: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D columns of global length %D\n"</font>,bv->m,bv->N);
+<a name="line589">589: </a>      <font color="#4169E1">if</font> (bv->nc>0) {
+<a name="line590">590: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"number of constraints: %D\n"</font>,bv->nc);
+<a name="line591">591: </a>      }
+<a name="line592">592: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"vector orthogonalization method: %s Gram-Schmidt\n"</font>,orthname[bv->orthog_type]);
+<a name="line593">593: </a>      <font color="#4169E1">switch</font> (bv->orthog_ref) {
+<a name="line594">594: </a>        <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
+<a name="line595">595: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"orthogonalization refinement: %s (eta: %g)\n"</font>,refname[bv->orthog_ref],(double)bv->orthog_eta);
+<a name="line596">596: </a>          <font color="#4169E1">break</font>;
+<a name="line597">597: </a>        <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
+<a name="line598">598: </a>        <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
+<a name="line599">599: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"orthogonalization refinement: %s\n"</font>,refname[bv->orthog_ref]);
+<a name="line600">600: </a>          <font color="#4169E1">break</font>;
+<a name="line601">601: </a>      }
+<a name="line602">602: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"block orthogonalization method: %s\n"</font>,borthname[bv->orthog_block]);
+<a name="line603">603: </a>      <font color="#4169E1">if</font> (bv->matrix) {
+<a name="line604">604: </a>        <font color="#4169E1">if</font> (bv->indef) {
+<a name="line605">605: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"indefinite inner product\n"</font>);
+<a name="line606">606: </a>        } <font color="#4169E1">else</font> {
+<a name="line607">607: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"non-standard inner product\n"</font>);
+<a name="line608">608: </a>        }
+<a name="line609">609: </a>        PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
+<a name="line610">610: </a>        MatView(bv->matrix,viewer);
+<a name="line611">611: </a>        PetscViewerPopFormat(viewer);
+<a name="line612">612: </a>      }
+<a name="line613">613: </a>      <font color="#4169E1">switch</font> (bv->vmm) {
+<a name="line614">614: </a>        <font color="#4169E1">case</font> BV_MATMULT_VECS:
+<a name="line615">615: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"doing matmult as matrix-vector products\n"</font>);
+<a name="line616">616: </a>          <font color="#4169E1">break</font>;
+<a name="line617">617: </a>        <font color="#4169E1">case</font> BV_MATMULT_MAT:
+<a name="line618">618: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"doing matmult as a single matrix-matrix product\n"</font>);
+<a name="line619">619: </a>          <font color="#4169E1">break</font>;
+<a name="line620">620: </a>        <font color="#4169E1">case</font> BV_MATMULT_MAT_SAVE:
+<a name="line621">621: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"doing matmult as a single matrix-matrix product, saving aux matrices\n"</font>);
+<a name="line622">622: </a>          <font color="#4169E1">break</font>;
+<a name="line623">623: </a>      }
+<a name="line624">624: </a>      <font color="#4169E1">if</font> (bv->rrandom) { 
+<a name="line625">625: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"generating random vectors independent of the number of processes\n"</font>);
+<a name="line626">626: </a>      }
+<a name="line627">627: </a>    } <font color="#4169E1">else</font> {
+<a name="line628">628: </a>      <font color="#4169E1">if</font> (bv->ops->view) { (*bv->ops->view)(bv,viewer); }
+<a name="line629">629: </a>      <font color="#4169E1">else</font> { BVView_Default(bv,viewer); }
+<a name="line630">630: </a>    }
+<a name="line631">631: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line632">632: </a>  } <font color="#4169E1">else</font> {
+<a name="line633">633: </a>    (*bv->ops->view)(bv,viewer);
+<a name="line634">634: </a>  }
+<a name="line635">635: </a>  <font color="#4169E1">return</font>(0);
+<a name="line636">636: </a>}
+
+<a name="line640">640: </a><font color="#B22222">/*@C</font>
+<a name="line641">641: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a> - Adds a new storage format to de <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> package.</font>
+
+<a name="line643">643: </a><font color="#B22222">   Not collective</font>
+
+<a name="line645">645: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line646">646: </a><font color="#B22222">+  name     - name of a new user-defined <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+<a name="line647">647: </a><font color="#B22222">-  function - routine to create context</font>
+
+<a name="line649">649: </a><font color="#B22222">   Notes:</font>
+<a name="line650">650: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a>() may be called multiple times to add several user-defined</font>
+<a name="line651">651: </a><font color="#B22222">   basis vectors.</font>
+
+<a name="line653">653: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line655">655: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVRegisterAll.html#BVRegisterAll">BVRegisterAll</a>()</font>
+<a name="line656">656: </a><font color="#B22222">@*/</font>
+<a name="line657">657: </a><strong><font color="#4169E1"><a name="BVRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVRegister.html#BVRegister">BVRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>))</font></strong>
+<a name="line658">658: </a>{
+
+<a name="line662">662: </a>  PetscFunctionListAdd(&BVList,name,function);
+<a name="line663">663: </a>  <font color="#4169E1">return</font>(0);
+<a name="line664">664: </a>}
+
+<a name="line668">668: </a><strong><font color="#4169E1"><a name="BVAllocateWork_Private"></a>PetscErrorCode BVAllocateWork_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt s)</font></strong>
+<a name="line669">669: </a>{
+
+<a name="line673">673: </a>  <font color="#4169E1">if</font> (s>bv->lwork) {
+<a name="line674">674: </a>    PetscFree(bv->work);
+<a name="line675">675: </a>    PetscMalloc1(s,&bv->work);
+<a name="line676">676: </a>    PetscLogObjectMemory((PetscObject)bv,(s-bv->lwork)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line677">677: </a>    bv->lwork = s;
+<a name="line678">678: </a>  }
+<a name="line679">679: </a>  <font color="#4169E1">return</font>(0);
+<a name="line680">680: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/interface/bvglobal.c b/src/sys/classes/bv/interface/bvglobal.c
index ed9625f..3fe12cf 100644
--- a/src/sys/classes/bv/interface/bvglobal.c
+++ b/src/sys/classes/bv/interface/bvglobal.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -98,6 +98,7 @@ PetscErrorCode BVDot(BV X,BV Y,Mat M)
   PetscErrorCode ierr;
   PetscBool      match;
   PetscInt       m,n;
+  Mat            B;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(X,BV_CLASSID,1);
@@ -120,8 +121,18 @@ PetscErrorCode BVDot(BV X,BV Y,Mat M)
   if (X->l==X->k || Y->l==Y->k) PetscFunctionReturn(0);
 
   ierr = PetscLogEventBegin(BV_Dot,X,Y,0,0);CHKERRQ(ierr);
-  if (X->matrix) { /* non-standard inner product: cast into dotvec ops */
-    ierr = BVDot_Private(X,Y,M);CHKERRQ(ierr);
+  if (X->matrix) { /* non-standard inner product */
+    if (X->vmm==BV_MATMULT_VECS) {
+      /* perform computation column by column */
+      ierr = BVDot_Private(X,Y,M);CHKERRQ(ierr);
+    } else {
+      /* compute BX first */
+      ierr = BV_IPMatMultBV(X);CHKERRQ(ierr);
+      B = X->matrix;
+      X->matrix = NULL;
+      ierr = (*X->ops->dot)(X->cached,Y,M);CHKERRQ(ierr);
+      X->matrix = B;
+    }
   } else {
     ierr = (*X->ops->dot)(X,Y,M);CHKERRQ(ierr);
   }
@@ -176,9 +187,9 @@ PetscErrorCode BVDotVec(BV X,Vec y,PetscScalar *m)
   ierr = VecGetLocalSize(y,&n);CHKERRQ(ierr);
   if (X->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,"Mismatching local dimension X %D, y %D",X->n,n);
 
-  ierr = PetscLogEventBegin(BV_Dot,X,y,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_DotVec,X,y,0,0);CHKERRQ(ierr);
   ierr = (*X->ops->dotvec)(X,y,m);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_Dot,X,y,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_DotVec,X,y,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -231,10 +242,10 @@ PetscErrorCode BVDotVecBegin(BV X,Vec y,PetscScalar *m)
       sr->reducetype[sr->numopsbegin+i] = REDUCE_SUM;
       sr->invecs[sr->numopsbegin+i]     = (void*)X;
     }
-    ierr = PetscLogEventBegin(BV_Dot,X,y,0,0);CHKERRQ(ierr);
+    ierr = PetscLogEventBegin(BV_DotVec,X,y,0,0);CHKERRQ(ierr);
     ierr = (*X->ops->dotvec_local)(X,y,sr->lvalues+sr->numopsbegin);CHKERRQ(ierr);
     sr->numopsbegin += nv;
-    ierr = PetscLogEventEnd(BV_Dot,X,y,0,0);CHKERRQ(ierr);
+    ierr = PetscLogEventEnd(BV_DotVec,X,y,0,0);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -333,14 +344,14 @@ PetscErrorCode BVDotColumn(BV X,PetscInt j,PetscScalar *m)
   if (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,"Index j must be non-negative");
   if (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,"Index j=%D but BV only has %D columns",j,X->m);
 
-  ierr = PetscLogEventBegin(BV_Dot,X,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_DotVec,X,0,0,0);CHKERRQ(ierr);
   ksave = X->k;
   X->k = j;
   ierr = BVGetColumn(X,j,&y);CHKERRQ(ierr);
   ierr = (*X->ops->dotvec)(X,y,m);CHKERRQ(ierr);
   ierr = BVRestoreColumn(X,j,&y);CHKERRQ(ierr);
   X->k = ksave;
-  ierr = PetscLogEventEnd(BV_Dot,X,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_DotVec,X,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -395,10 +406,10 @@ PetscErrorCode BVDotColumnBegin(BV X,PetscInt j,PetscScalar *m)
       sr->reducetype[sr->numopsbegin+i] = REDUCE_SUM;
       sr->invecs[sr->numopsbegin+i]     = (void*)X;
     }
-    ierr = PetscLogEventBegin(BV_Dot,X,0,0,0);CHKERRQ(ierr);
+    ierr = PetscLogEventBegin(BV_DotVec,X,0,0,0);CHKERRQ(ierr);
     ierr = (*X->ops->dotvec_local)(X,y,sr->lvalues+sr->numopsbegin);CHKERRQ(ierr);
     sr->numopsbegin += nv;
-    ierr = PetscLogEventEnd(BV_Dot,X,0,0,0);CHKERRQ(ierr);
+    ierr = PetscLogEventEnd(BV_DotVec,X,0,0,0);CHKERRQ(ierr);
   }
   ierr = BVRestoreColumn(X,j,&y);CHKERRQ(ierr);
   X->k = ksave;
@@ -412,10 +423,10 @@ PetscErrorCode BVDotColumnBegin(BV X,PetscInt j,PetscScalar *m)
 
    Input Parameters:
 +  X - basis vectors
--  j - the column index
+.  j - the column index
 -  m - an array where the result will go
 
-   Note:
+   Notes:
    Each call to BVDotColumnBegin() should be paired with a call to BVDotColumnEnd().
 
    Level: advanced
@@ -594,7 +605,7 @@ PetscErrorCode BVNormVec(BV bv,Vec v,NormType type,PetscReal *val)
 
   if (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,"Requested norm not available");
 
-  ierr = PetscLogEventBegin(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   if (bv->matrix) { /* non-standard inner product */
     ierr = VecGetLocalSize(v,&n);CHKERRQ(ierr);
     if (bv->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,"Mismatching local dimension bv %D, v %D",bv->n,n);
@@ -602,7 +613,7 @@ PetscErrorCode BVNormVec(BV bv,Vec v,NormType type,PetscReal *val)
   } else {
     ierr = VecNorm(v,type,val);CHKERRQ(ierr);
   }
-  ierr = PetscLogEventEnd(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -641,7 +652,7 @@ PetscErrorCode BVNormVecBegin(BV bv,Vec v,NormType type,PetscReal *val)
 
   if (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,"Requested norm not available");
 
-  ierr = PetscLogEventBegin(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   if (bv->matrix) { /* non-standard inner product */
     ierr = VecGetLocalSize(v,&n);CHKERRQ(ierr);
     if (bv->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,"Mismatching local dimension bv %D, v %D",bv->n,n);
@@ -649,7 +660,7 @@ PetscErrorCode BVNormVecBegin(BV bv,Vec v,NormType type,PetscReal *val)
   } else {
     ierr = VecNormBegin(v,type,val);CHKERRQ(ierr);
   }
-  ierr = PetscLogEventEnd(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -733,7 +744,7 @@ PetscErrorCode BVNormColumn(BV bv,PetscInt j,NormType type,PetscReal *val)
   if (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Argument j has wrong value %D, the number of columns is %D",j,bv->m);
   if (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,"Requested norm not available");
 
-  ierr = PetscLogEventBegin(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   if (bv->matrix) { /* non-standard inner product */
     ierr = BVGetColumn(bv,j,&z);CHKERRQ(ierr);
     ierr = BVNorm_Private(bv,z,type,val);CHKERRQ(ierr);
@@ -741,7 +752,7 @@ PetscErrorCode BVNormColumn(BV bv,PetscInt j,NormType type,PetscReal *val)
   } else {
     ierr = (*bv->ops->norm)(bv,j,type,val);CHKERRQ(ierr);
   }
-  ierr = PetscLogEventEnd(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -782,7 +793,7 @@ PetscErrorCode BVNormColumnBegin(BV bv,PetscInt j,NormType type,PetscReal *val)
   if (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Argument j has wrong value %D, the number of columns is %D",j,bv->m);
   if (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,"Requested norm not available");
 
-  ierr = PetscLogEventBegin(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   ierr = BVGetColumn(bv,j,&z);CHKERRQ(ierr);
   if (bv->matrix) { /* non-standard inner product */
     ierr = BVNorm_Begin_Private(bv,z,type,val);CHKERRQ(ierr);
@@ -803,7 +814,7 @@ PetscErrorCode BVNormColumnBegin(BV bv,PetscInt j,NormType type,PetscReal *val)
     sr->lvalues[sr->numopsbegin++] = lresult;
   }
   ierr = BVRestoreColumn(bv,j,&z);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_Norm,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_NormVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/bv/interface/bvglobal.c.html b/src/sys/classes/bv/interface/bvglobal.c.html
index 9cecf7d..1b981af 100644
--- a/src/sys/classes/bv/interface/bvglobal.c.html
+++ b/src/sys/classes/bv/interface/bvglobal.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvglobal.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:23+00:00">
+<meta name="date" content="2016-05-16T10:32:16+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvglobal.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvglobal.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> operations involving global communication.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -103,959 +103,970 @@
 <a name="line97"> 97: </a>{
 <a name="line99"> 99: </a>  PetscBool      match;
 <a name="line100">100: </a>  PetscInt       m,n;
+<a name="line101">101: </a>  Mat            B;
+
+<a name="line108">108: </a>  BVCheckSizes(X,1);
+<a name="line110">110: </a>  BVCheckSizes(Y,2);
+<a name="line113">113: </a>  PetscObjectTypeCompare((PetscObject)M,MATSEQDENSE,&match);
+<a name="line114">114: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
+
+<a name="line116">116: </a>  MatGetSize(M,&m,&n);
+<a name="line117">117: </a>  <font color="#4169E1">if</font> (m<Y->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D rows, should have at least %D"</font>,m,Y->k);
+<a name="line118">118: </a>  <font color="#4169E1">if</font> (n<X->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D columns, should have at least %D"</font>,n,X->k);
+<a name="line119">119: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
+<a name="line120">120: </a>  <font color="#4169E1">if</font> (X->matrix!=Y->matrix) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"X and Y must have the same inner product matrix"</font>);
+<a name="line121">121: </a>  <font color="#4169E1">if</font> (X->l==X->k || Y->l==Y->k) <font color="#4169E1">return</font>(0);
+
+<a name="line123">123: </a>  PetscLogEventBegin(BV_Dot,X,Y,0,0);
+<a name="line124">124: </a>  <font color="#4169E1">if</font> (X->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line125">125: </a>    <font color="#4169E1">if</font> (X->vmm==BV_MATMULT_VECS) {
+<a name="line126">126: </a>      <font color="#B22222">/* perform computation column by column */</font>
+<a name="line127">127: </a>      BVDot_Private(X,Y,M);
+<a name="line128">128: </a>    } <font color="#4169E1">else</font> {
+<a name="line129">129: </a>      <font color="#B22222">/* compute BX first */</font>
+<a name="line130">130: </a>      BV_IPMatMultBV(X);
+<a name="line131">131: </a>      B = X->matrix;
+<a name="line132">132: </a>      X->matrix = NULL;
+<a name="line133">133: </a>      (*X->ops->dot)(X->cached,Y,M);
+<a name="line134">134: </a>      X->matrix = B;
+<a name="line135">135: </a>    }
+<a name="line136">136: </a>  } <font color="#4169E1">else</font> {
+<a name="line137">137: </a>    (*X->ops->dot)(X,Y,M);
+<a name="line138">138: </a>  }
+<a name="line139">139: </a>  PetscLogEventEnd(BV_Dot,X,Y,0,0);
+<a name="line140">140: </a>  <font color="#4169E1">return</font>(0);
+<a name="line141">141: </a>}
+
+<a name="line145">145: </a><font color="#B22222">/*@</font>
+<a name="line146">146: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a> - Computes multiple dot products of a vector against all the</font>
+<a name="line147">147: </a><font color="#B22222">   column vectors of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+
+<a name="line149">149: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and Vec</font>
+
+<a name="line151">151: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line152">152: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line153">153: </a><font color="#B22222">-  y - a vector</font>
+
+<a name="line155">155: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line156">156: </a><font color="#B22222">.  m - an array where the result must be placed</font>
+
+<a name="line158">158: </a><font color="#B22222">   Notes:</font>
+<a name="line159">159: </a><font color="#B22222">   This is analogue to VecMDot(), but using <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to represent a collection</font>
+<a name="line160">160: </a><font color="#B22222">   of vectors. The result is m = X^H*y, so m_i is equal to x_j^H y. Note</font>
+<a name="line161">161: </a><font color="#B22222">   that here X is transposed as opposed to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>().</font>
+
+<a name="line163">163: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
+<a name="line164">164: </a><font color="#B22222">   then the result is m = X^H*B*y.</font>
+
+<a name="line166">166: </a><font color="#B22222">   The length of array m must be equal to the number of active columns of X</font>
+<a name="line167">167: </a><font color="#B22222">   minus the number of leading columns, i.e. the first entry of m is the</font>
+<a name="line168">168: </a><font color="#B22222">   product of the first non-leading column with y.</font>
+
+<a name="line170">170: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line172">172: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
+<a name="line173">173: </a><font color="#B22222">@*/</font>
+<a name="line174">174: </a><strong><font color="#4169E1"><a name="BVDotVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line175">175: </a>{
+<a name="line177">177: </a>  PetscInt       n;
+
+<a name="line183">183: </a>  BVCheckSizes(X,1);
+
+<a name="line187">187: </a>  VecGetLocalSize(y,&n);
+<a name="line188">188: </a>  <font color="#4169E1">if</font> (X->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, y %D"</font>,X->n,n);
+
+<a name="line190">190: </a>  PetscLogEventBegin(BV_DotVec,X,y,0,0);
+<a name="line191">191: </a>  (*X->ops->dotvec)(X,y,m);
+<a name="line192">192: </a>  PetscLogEventEnd(BV_DotVec,X,y,0,0);
+<a name="line193">193: </a>  <font color="#4169E1">return</font>(0);
+<a name="line194">194: </a>}
+
+<a name="line198">198: </a><font color="#B22222">/*@</font>
+<a name="line199">199: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a> - Starts a split phase dot product computation.</font>
+
+<a name="line201">201: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line202">202: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line203">203: </a><font color="#B22222">.  y - a vector</font>
+<a name="line204">204: </a><font color="#B22222">-  m - an array where the result will go (can be NULL)</font>
+
+<a name="line206">206: </a><font color="#B22222">   Note:</font>
+<a name="line207">207: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>().</font>
+
+<a name="line209">209: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line211">211: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>()</font>
+<a name="line212">212: </a><font color="#B22222">@*/</font>
+<a name="line213">213: </a><strong><font color="#4169E1"><a name="BVDotVecBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line214">214: </a>{
+<a name="line215">215: </a>  PetscErrorCode      ierr;
+<a name="line216">216: </a>  PetscInt            i,n,nv;
+<a name="line217">217: </a>  PetscSplitReduction *sr;
+<a name="line218">218: </a>  MPI_Comm            comm;
+
+<a name="line224">224: </a>  BVCheckSizes(X,1);
+
+<a name="line228">228: </a>  VecGetLocalSize(y,&n);
+<a name="line229">229: </a>  <font color="#4169E1">if</font> (X->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, y %D"</font>,X->n,n);
+
+<a name="line231">231: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_begin) {
+<a name="line232">232: </a>    (*X->ops->dotvec_begin)(X,y,m);
+<a name="line233">233: </a>  } <font color="#4169E1">else</font> {
+<a name="line234">234: </a>    nv = X->k-X->l;
+<a name="line235">235: </a>    PetscObjectGetComm((PetscObject)X,&comm);
+<a name="line236">236: </a>    PetscSplitReductionGet(comm,&sr);
+<a name="line237">237: </a>    <font color="#4169E1">if</font> (sr->state != STATE_BEGIN) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,<font color="#666666">"Called before all VecxxxEnd() called"</font>);
+<a name="line238">238: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line239">239: </a>      <font color="#4169E1">if</font> (sr->numopsbegin+i >= sr->maxops) {
+<a name="line240">240: </a>        PetscSplitReductionExtend(sr);
+<a name="line241">241: </a>      }
+<a name="line242">242: </a>      sr->reducetype[sr->numopsbegin+i] = REDUCE_SUM;
+<a name="line243">243: </a>      sr->invecs[sr->numopsbegin+i]     = (void*)X;
+<a name="line244">244: </a>    }
+<a name="line245">245: </a>    PetscLogEventBegin(BV_DotVec,X,y,0,0);
+<a name="line246">246: </a>    (*X->ops->dotvec_local)(X,y,sr->lvalues+sr->numopsbegin);
+<a name="line247">247: </a>    sr->numopsbegin += nv;
+<a name="line248">248: </a>    PetscLogEventEnd(BV_DotVec,X,y,0,0);
+<a name="line249">249: </a>  }
+<a name="line250">250: </a>  <font color="#4169E1">return</font>(0);
+<a name="line251">251: </a>}
+
+<a name="line255">255: </a><font color="#B22222">/*@</font>
+<a name="line256">256: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a> - Ends a split phase dot product computation.</font>
+
+<a name="line258">258: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line259">259: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line260">260: </a><font color="#B22222">.  y - a vector</font>
+<a name="line261">261: </a><font color="#B22222">-  m - an array where the result will go</font>
+
+<a name="line263">263: </a><font color="#B22222">   Note:</font>
+<a name="line264">264: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>().</font>
+
+<a name="line266">266: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line268">268: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>()</font>
+<a name="line269">269: </a><font color="#B22222">@*/</font>
+<a name="line270">270: </a><strong><font color="#4169E1"><a name="BVDotVecEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
+<a name="line271">271: </a>{
+<a name="line272">272: </a>  PetscErrorCode      ierr;
+<a name="line273">273: </a>  PetscInt            i,nv;
+<a name="line274">274: </a>  PetscSplitReduction *sr;
+<a name="line275">275: </a>  MPI_Comm            comm;
+
+<a name="line280">280: </a>  BVCheckSizes(X,1);
+
+<a name="line282">282: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_end) {
+<a name="line283">283: </a>    (*X->ops->dotvec_end)(X,y,m);
+<a name="line284">284: </a>  } <font color="#4169E1">else</font> {
+<a name="line285">285: </a>    nv = X->k-X->l;
+<a name="line286">286: </a>    PetscObjectGetComm((PetscObject)X,&comm);
+<a name="line287">287: </a>    PetscSplitReductionGet(comm,&sr);
+<a name="line288">288: </a>    PetscSplitReductionEnd(sr);
+
+<a name="line290">290: </a>    <font color="#4169E1">if</font> (sr->numopsend >= sr->numopsbegin) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() more times than VecxxxBegin()"</font>);
+<a name="line291">291: </a>    <font color="#4169E1">if</font> ((void*)X != sr->invecs[sr->numopsend]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called BVxxxEnd() in a different order or with a different <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> than BVxxxBegin()"</font>);
+<a name="line292">292: </a>    <font color="#4169E1">if</font> (sr->reducetype[sr->numopsend] != REDUCE_SUM) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Wrong type of reduction"</font>);
+<a name="line293">293: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) m[i] = sr->gvalues[sr->numopsend++];
+
+<a name="line295">295: </a>    <font color="#B22222">/* Finished getting all the results so reset to no outstanding requests */</font>
+<a name="line296">296: </a>    <font color="#4169E1">if</font> (sr->numopsend == sr->numopsbegin) {
+<a name="line297">297: </a>      sr->state       = STATE_BEGIN;
+<a name="line298">298: </a>      sr->numopsend   = 0;
+<a name="line299">299: </a>      sr->numopsbegin = 0;
+<a name="line300">300: </a>    }
+<a name="line301">301: </a>  }
+<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
+<a name="line303">303: </a>}
+
+<a name="line307">307: </a><font color="#B22222">/*@</font>
+<a name="line308">308: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a> - Computes multiple dot products of a column against all the</font>
+<a name="line309">309: </a><font color="#B22222">   previous columns of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+
+<a name="line311">311: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line313">313: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line314">314: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line315">315: </a><font color="#B22222">-  j - the column index</font>
+
+<a name="line317">317: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line318">318: </a><font color="#B22222">.  m - an array where the result must be placed</font>
+
+<a name="line320">320: </a><font color="#B22222">   Notes:</font>
+<a name="line321">321: </a><font color="#B22222">   This operation is equivalent to <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>() but it uses column j of X</font>
+<a name="line322">322: </a><font color="#B22222">   rather than taking a Vec as an argument. The number of active columns of</font>
+<a name="line323">323: </a><font color="#B22222">   X is set to j before the computation, and restored afterwards.</font>
+<a name="line324">324: </a><font color="#B22222">   If X has leading columns specified, then these columns do not participate</font>
+<a name="line325">325: </a><font color="#B22222">   in the computation. Therefore, the length of array m must be equal to j</font>
+<a name="line326">326: </a><font color="#B22222">   minus the number of leading columns.</font>
+
+<a name="line328">328: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line330">330: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
+<a name="line331">331: </a><font color="#B22222">@*/</font>
+<a name="line332">332: </a><strong><font color="#4169E1"><a name="BVDotColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscInt j,PetscScalar *m)</font></strong>
+<a name="line333">333: </a>{
+<a name="line335">335: </a>  PetscInt       ksave;
+<a name="line336">336: </a>  Vec            y;
+
+<a name="line342">342: </a>  BVCheckSizes(X,1);
+
+<a name="line344">344: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line345">345: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
+
+<a name="line347">347: </a>  PetscLogEventBegin(BV_DotVec,X,0,0,0);
+<a name="line348">348: </a>  ksave = X->k;
+<a name="line349">349: </a>  X->k = j;
+<a name="line350">350: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
+<a name="line351">351: </a>  (*X->ops->dotvec)(X,y,m);
+<a name="line352">352: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
+<a name="line353">353: </a>  X->k = ksave;
+<a name="line354">354: </a>  PetscLogEventEnd(BV_DotVec,X,0,0,0);
+<a name="line355">355: </a>  <font color="#4169E1">return</font>(0);
+<a name="line356">356: </a>}
+
+<a name="line360">360: </a><font color="#B22222">/*@</font>
+<a name="line361">361: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a> - Starts a split phase dot product computation.</font>
+
+<a name="line363">363: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line364">364: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line365">365: </a><font color="#B22222">-  j - the column index</font>
+<a name="line366">366: </a><font color="#B22222">-  m - an array where the result will go (can be NULL)</font>
+
+<a name="line368">368: </a><font color="#B22222">   Note:</font>
+<a name="line369">369: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>().</font>
+
+<a name="line371">371: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line373">373: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>()</font>
+<a name="line374">374: </a><font color="#B22222">@*/</font>
+<a name="line375">375: </a><strong><font color="#4169E1"><a name="BVDotColumnBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscInt j,PetscScalar *m)</font></strong>
+<a name="line376">376: </a>{
+<a name="line377">377: </a>  PetscErrorCode      ierr;
+<a name="line378">378: </a>  PetscInt            i,nv,ksave;
+<a name="line379">379: </a>  PetscSplitReduction *sr;
+<a name="line380">380: </a>  MPI_Comm            comm;
+<a name="line381">381: </a>  Vec                 y;
+
+<a name="line387">387: </a>  BVCheckSizes(X,1);
+
+<a name="line389">389: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line390">390: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
+<a name="line391">391: </a>  ksave = X->k;
+<a name="line392">392: </a>  X->k = j;
+<a name="line393">393: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
+
+<a name="line395">395: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_begin) {
+<a name="line396">396: </a>    (*X->ops->dotvec_begin)(X,y,m);
+<a name="line397">397: </a>  } <font color="#4169E1">else</font> {
+<a name="line398">398: </a>    nv = X->k-X->l;
+<a name="line399">399: </a>    PetscObjectGetComm((PetscObject)X,&comm);
+<a name="line400">400: </a>    PetscSplitReductionGet(comm,&sr);
+<a name="line401">401: </a>    <font color="#4169E1">if</font> (sr->state != STATE_BEGIN) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,<font color="#666666">"Called before all VecxxxEnd() called"</font>);
+<a name="line402">402: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line403">403: </a>      <font color="#4169E1">if</font> (sr->numopsbegin+i >= sr->maxops) {
+<a name="line404">404: </a>        PetscSplitReductionExtend(sr);
+<a name="line405">405: </a>      }
+<a name="line406">406: </a>      sr->reducetype[sr->numopsbegin+i] = REDUCE_SUM;
+<a name="line407">407: </a>      sr->invecs[sr->numopsbegin+i]     = (void*)X;
+<a name="line408">408: </a>    }
+<a name="line409">409: </a>    PetscLogEventBegin(BV_DotVec,X,0,0,0);
+<a name="line410">410: </a>    (*X->ops->dotvec_local)(X,y,sr->lvalues+sr->numopsbegin);
+<a name="line411">411: </a>    sr->numopsbegin += nv;
+<a name="line412">412: </a>    PetscLogEventEnd(BV_DotVec,X,0,0,0);
+<a name="line413">413: </a>  }
+<a name="line414">414: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
+<a name="line415">415: </a>  X->k = ksave;
+<a name="line416">416: </a>  <font color="#4169E1">return</font>(0);
+<a name="line417">417: </a>}
+
+<a name="line421">421: </a><font color="#B22222">/*@</font>
+<a name="line422">422: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a> - Ends a split phase dot product computation.</font>
+
+<a name="line424">424: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line425">425: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line426">426: </a><font color="#B22222">.  j - the column index</font>
+<a name="line427">427: </a><font color="#B22222">-  m - an array where the result will go</font>
+
+<a name="line429">429: </a><font color="#B22222">   Notes:</font>
+<a name="line430">430: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>().</font>
+
+<a name="line432">432: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line434">434: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>()</font>
+<a name="line435">435: </a><font color="#B22222">@*/</font>
+<a name="line436">436: </a><strong><font color="#4169E1"><a name="BVDotColumnEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscInt j,PetscScalar *m)</font></strong>
+<a name="line437">437: </a>{
+<a name="line438">438: </a>  PetscErrorCode      ierr;
+<a name="line439">439: </a>  PetscInt            i,nv,ksave;
+<a name="line440">440: </a>  PetscSplitReduction *sr;
+<a name="line441">441: </a>  MPI_Comm            comm;
+<a name="line442">442: </a>  Vec                 y;
+
+<a name="line448">448: </a>  BVCheckSizes(X,1);
+
+<a name="line450">450: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line451">451: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
+<a name="line452">452: </a>  ksave = X->k;
+<a name="line453">453: </a>  X->k = j;
+
+<a name="line455">455: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_end) {
+<a name="line456">456: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
+<a name="line457">457: </a>    (*X->ops->dotvec_end)(X,y,m);
+<a name="line458">458: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
+<a name="line459">459: </a>  } <font color="#4169E1">else</font> {
+<a name="line460">460: </a>    nv = X->k-X->l;
+<a name="line461">461: </a>    PetscObjectGetComm((PetscObject)X,&comm);
+<a name="line462">462: </a>    PetscSplitReductionGet(comm,&sr);
+<a name="line463">463: </a>    PetscSplitReductionEnd(sr);
+
+<a name="line465">465: </a>    <font color="#4169E1">if</font> (sr->numopsend >= sr->numopsbegin) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() more times than VecxxxBegin()"</font>);
+<a name="line466">466: </a>    <font color="#4169E1">if</font> ((void*)X != sr->invecs[sr->numopsend]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called BVxxxEnd() in a different order or with a different <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> than BVxxxBegin()"</font>);
+<a name="line467">467: </a>    <font color="#4169E1">if</font> (sr->reducetype[sr->numopsend] != REDUCE_SUM) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Wrong type of reduction"</font>);
+<a name="line468">468: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) m[i] = sr->gvalues[sr->numopsend++];
+
+<a name="line470">470: </a>    <font color="#B22222">/* Finished getting all the results so reset to no outstanding requests */</font>
+<a name="line471">471: </a>    <font color="#4169E1">if</font> (sr->numopsend == sr->numopsbegin) {
+<a name="line472">472: </a>      sr->state       = STATE_BEGIN;
+<a name="line473">473: </a>      sr->numopsend   = 0;
+<a name="line474">474: </a>      sr->numopsbegin = 0;
+<a name="line475">475: </a>    }
+<a name="line476">476: </a>  }
+<a name="line477">477: </a>  X->k = ksave;
+<a name="line478">478: </a>  <font color="#4169E1">return</font>(0);
+<a name="line479">479: </a>}
+
+<a name="line483">483: </a><strong><font color="#4169E1"><a name="BVNorm_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVNorm_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec z,NormType type,PetscReal *val)</font></strong>
+<a name="line484">484: </a>{
+<a name="line486">486: </a>  PetscScalar    p;
+
+<a name="line489">489: </a>  BV_IPMatMult(bv,z);
+<a name="line490">490: </a>  VecDot(bv->Bx,z,&p);
+<a name="line491">491: </a>  BV_SafeSqrt(bv,p,val);
+<a name="line492">492: </a>  <font color="#4169E1">return</font>(0);
+<a name="line493">493: </a>}
+
+<a name="line497">497: </a><strong><font color="#4169E1"><a name="BVNorm_Begin_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVNorm_Begin_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec z,NormType type,PetscReal *val)</font></strong>
+<a name="line498">498: </a>{
+<a name="line500">500: </a>  PetscScalar    p;
+
+<a name="line503">503: </a>  BV_IPMatMult(bv,z);
+<a name="line504">504: </a>  VecDotBegin(bv->Bx,z,&p);
+<a name="line505">505: </a>  <font color="#4169E1">return</font>(0);
+<a name="line506">506: </a>}
+
+<a name="line510">510: </a><strong><font color="#4169E1"><a name="BVNorm_End_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVNorm_End_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec z,NormType type,PetscReal *val)</font></strong>
+<a name="line511">511: </a>{
+<a name="line513">513: </a>  PetscScalar    p;
+
+<a name="line516">516: </a>  VecDotEnd(bv->Bx,z,&p);
+<a name="line517">517: </a>  BV_SafeSqrt(bv,p,val);
+<a name="line518">518: </a>  <font color="#4169E1">return</font>(0);
+<a name="line519">519: </a>}
+
+<a name="line523">523: </a><font color="#B22222">/*@</font>
+<a name="line524">524: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a> - Computes the matrix norm of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+
+<a name="line526">526: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line528">528: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line529">529: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line530">530: </a><font color="#B22222">-  type - the norm type</font>
+
+<a name="line532">532: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line533">533: </a><font color="#B22222">.  val  - the norm</font>
+
+<a name="line535">535: </a><font color="#B22222">   Notes:</font>
+<a name="line536">536: </a><font color="#B22222">   All active columns (except the leading ones) are considered as a matrix.</font>
+<a name="line537">537: </a><font color="#B22222">   The allowed norms are NORM_1, NORM_FROBENIUS, and NORM_INFINITY.</font>
+
+<a name="line539">539: </a><font color="#B22222">   This operation fails if a non-standard inner product has been</font>
+<a name="line540">540: </a><font color="#B22222">   specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>().</font>
+
+<a name="line542">542: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line544">544: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
+<a name="line545">545: </a><font color="#B22222">@*/</font>
+<a name="line546">546: </a><strong><font color="#4169E1"><a name="BVNorm"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,NormType type,PetscReal *val)</font></strong>
+<a name="line547">547: </a>{
+
+<a name="line555">555: </a>  BVCheckSizes(bv,1);
+
+<a name="line557">557: </a>  <font color="#4169E1">if</font> (type==NORM_2 || type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+<a name="line558">558: </a>  <font color="#4169E1">if</font> (bv->matrix) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Matrix norm not available for non-standard inner product"</font>);
+
+<a name="line560">560: </a>  PetscLogEventBegin(BV_Norm,bv,0,0,0);
+<a name="line561">561: </a>  (*bv->ops->norm)(bv,-1,type,val);
+<a name="line562">562: </a>  PetscLogEventEnd(BV_Norm,bv,0,0,0);
+<a name="line563">563: </a>  <font color="#4169E1">return</font>(0);
+<a name="line564">564: </a>}
+
+<a name="line568">568: </a><font color="#B22222">/*@</font>
+<a name="line569">569: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a> - Computes the norm of a given vector.</font>
+
+<a name="line571">571: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line573">573: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line574">574: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line575">575: </a><font color="#B22222">.  v    - the vector</font>
+<a name="line576">576: </a><font color="#B22222">-  type - the norm type</font>
+
+<a name="line578">578: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line579">579: </a><font color="#B22222">.  val  - the norm</font>
+
+<a name="line581">581: </a><font color="#B22222">   Notes:</font>
+<a name="line582">582: </a><font color="#B22222">   This is the analogue of <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>() but for a vector that is not in the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+<a name="line583">583: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
+<a name="line584">584: </a><font color="#B22222">   then the returned value is sqrt(v'*B*v), where B is the inner product</font>
+<a name="line585">585: </a><font color="#B22222">   matrix (argument 'type' is ignored). Otherwise, VecNorm() is called.</font>
+
+<a name="line587">587: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line589">589: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
+<a name="line590">590: </a><font color="#B22222">@*/</font>
+<a name="line591">591: </a><strong><font color="#4169E1"><a name="BVNormVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,NormType type,PetscReal *val)</font></strong>
+<a name="line592">592: </a>{
+<a name="line594">594: </a>  PetscInt       n;
+
+<a name="line602">602: </a>  BVCheckSizes(bv,1);
+
+<a name="line606">606: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
 
-<a name="line107">107: </a>  BVCheckSizes(X,1);
-<a name="line109">109: </a>  BVCheckSizes(Y,2);
-<a name="line112">112: </a>  PetscObjectTypeCompare((PetscObject)M,MATSEQDENSE,&match);
-<a name="line113">113: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
-
-<a name="line115">115: </a>  MatGetSize(M,&m,&n);
-<a name="line116">116: </a>  <font color="#4169E1">if</font> (m<Y->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D rows, should have at least %D"</font>,m,Y->k);
-<a name="line117">117: </a>  <font color="#4169E1">if</font> (n<X->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D columns, should have at least %D"</font>,n,X->k);
-<a name="line118">118: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
-<a name="line119">119: </a>  <font color="#4169E1">if</font> (X->matrix!=Y->matrix) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"X and Y must have the same inner product matrix"</font>);
-<a name="line120">120: </a>  <font color="#4169E1">if</font> (X->l==X->k || Y->l==Y->k) <font color="#4169E1">return</font>(0);
-
-<a name="line122">122: </a>  PetscLogEventBegin(BV_Dot,X,Y,0,0);
-<a name="line123">123: </a>  <font color="#4169E1">if</font> (X->matrix) { <font color="#B22222">/* non-standard inner product: cast into dotvec ops */</font>
-<a name="line124">124: </a>    BVDot_Private(X,Y,M);
-<a name="line125">125: </a>  } <font color="#4169E1">else</font> {
-<a name="line126">126: </a>    (*X->ops->dot)(X,Y,M);
-<a name="line127">127: </a>  }
-<a name="line128">128: </a>  PetscLogEventEnd(BV_Dot,X,Y,0,0);
-<a name="line129">129: </a>  <font color="#4169E1">return</font>(0);
-<a name="line130">130: </a>}
-
-<a name="line134">134: </a><font color="#B22222">/*@</font>
-<a name="line135">135: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a> - Computes multiple dot products of a vector against all the</font>
-<a name="line136">136: </a><font color="#B22222">   column vectors of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
-
-<a name="line138">138: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and Vec</font>
-
-<a name="line140">140: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line141">141: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line142">142: </a><font color="#B22222">-  y - a vector</font>
-
-<a name="line144">144: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line145">145: </a><font color="#B22222">.  m - an array where the result must be placed</font>
-
-<a name="line147">147: </a><font color="#B22222">   Notes:</font>
-<a name="line148">148: </a><font color="#B22222">   This is analogue to VecMDot(), but using <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to represent a collection</font>
-<a name="line149">149: </a><font color="#B22222">   of vectors. The result is m = X^H*y, so m_i is equal to x_j^H y. Note</font>
-<a name="line150">150: </a><font color="#B22222">   that here X is transposed as opposed to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>().</font>
-
-<a name="line152">152: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
-<a name="line153">153: </a><font color="#B22222">   then the result is m = X^H*B*y.</font>
-
-<a name="line155">155: </a><font color="#B22222">   The length of array m must be equal to the number of active columns of X</font>
-<a name="line156">156: </a><font color="#B22222">   minus the number of leading columns, i.e. the first entry of m is the</font>
-<a name="line157">157: </a><font color="#B22222">   product of the first non-leading column with y.</font>
-
-<a name="line159">159: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line161">161: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
-<a name="line162">162: </a><font color="#B22222">@*/</font>
-<a name="line163">163: </a><strong><font color="#4169E1"><a name="BVDotVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line164">164: </a>{
-<a name="line166">166: </a>  PetscInt       n;
-
-<a name="line172">172: </a>  BVCheckSizes(X,1);
-
-<a name="line176">176: </a>  VecGetLocalSize(y,&n);
-<a name="line177">177: </a>  <font color="#4169E1">if</font> (X->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, y %D"</font>,X->n,n);
-
-<a name="line179">179: </a>  PetscLogEventBegin(BV_Dot,X,y,0,0);
-<a name="line180">180: </a>  (*X->ops->dotvec)(X,y,m);
-<a name="line181">181: </a>  PetscLogEventEnd(BV_Dot,X,y,0,0);
-<a name="line182">182: </a>  <font color="#4169E1">return</font>(0);
-<a name="line183">183: </a>}
-
-<a name="line187">187: </a><font color="#B22222">/*@</font>
-<a name="line188">188: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a> - Starts a split phase dot product computation.</font>
-
-<a name="line190">190: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line191">191: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line192">192: </a><font color="#B22222">.  y - a vector</font>
-<a name="line193">193: </a><font color="#B22222">-  m - an array where the result will go (can be NULL)</font>
-
-<a name="line195">195: </a><font color="#B22222">   Note:</font>
-<a name="line196">196: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>().</font>
-
-<a name="line198">198: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line200">200: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>()</font>
-<a name="line201">201: </a><font color="#B22222">@*/</font>
-<a name="line202">202: </a><strong><font color="#4169E1"><a name="BVDotVecBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line203">203: </a>{
-<a name="line204">204: </a>  PetscErrorCode      ierr;
-<a name="line205">205: </a>  PetscInt            i,n,nv;
-<a name="line206">206: </a>  PetscSplitReduction *sr;
-<a name="line207">207: </a>  MPI_Comm            comm;
-
-<a name="line213">213: </a>  BVCheckSizes(X,1);
-
-<a name="line217">217: </a>  VecGetLocalSize(y,&n);
-<a name="line218">218: </a>  <font color="#4169E1">if</font> (X->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, y %D"</font>,X->n,n);
-
-<a name="line220">220: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_begin) {
-<a name="line221">221: </a>    (*X->ops->dotvec_begin)(X,y,m);
-<a name="line222">222: </a>  } <font color="#4169E1">else</font> {
-<a name="line223">223: </a>    nv = X->k-X->l;
-<a name="line224">224: </a>    PetscObjectGetComm((PetscObject)X,&comm);
-<a name="line225">225: </a>    PetscSplitReductionGet(comm,&sr);
-<a name="line226">226: </a>    <font color="#4169E1">if</font> (sr->state != STATE_BEGIN) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,<font color="#666666">"Called before all VecxxxEnd() called"</font>);
-<a name="line227">227: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line228">228: </a>      <font color="#4169E1">if</font> (sr->numopsbegin+i >= sr->maxops) {
-<a name="line229">229: </a>        PetscSplitReductionExtend(sr);
-<a name="line230">230: </a>      }
-<a name="line231">231: </a>      sr->reducetype[sr->numopsbegin+i] = REDUCE_SUM;
-<a name="line232">232: </a>      sr->invecs[sr->numopsbegin+i]     = (void*)X;
-<a name="line233">233: </a>    }
-<a name="line234">234: </a>    PetscLogEventBegin(BV_Dot,X,y,0,0);
-<a name="line235">235: </a>    (*X->ops->dotvec_local)(X,y,sr->lvalues+sr->numopsbegin);
-<a name="line236">236: </a>    sr->numopsbegin += nv;
-<a name="line237">237: </a>    PetscLogEventEnd(BV_Dot,X,y,0,0);
-<a name="line238">238: </a>  }
-<a name="line239">239: </a>  <font color="#4169E1">return</font>(0);
-<a name="line240">240: </a>}
-
-<a name="line244">244: </a><font color="#B22222">/*@</font>
-<a name="line245">245: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a> - Ends a split phase dot product computation.</font>
-
-<a name="line247">247: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line248">248: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line249">249: </a><font color="#B22222">.  y - a vector</font>
-<a name="line250">250: </a><font color="#B22222">-  m - an array where the result will go</font>
-
-<a name="line252">252: </a><font color="#B22222">   Note:</font>
-<a name="line253">253: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>().</font>
-
-<a name="line255">255: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line257">257: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotVecBegin.html#BVDotVecBegin">BVDotVecBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>()</font>
-<a name="line258">258: </a><font color="#B22222">@*/</font>
-<a name="line259">259: </a><strong><font color="#4169E1"><a name="BVDotVecEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotVecEnd.html#BVDotVecEnd">BVDotVecEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Vec y,PetscScalar *m)</font></strong>
-<a name="line260">260: </a>{
-<a name="line261">261: </a>  PetscErrorCode      ierr;
-<a name="line262">262: </a>  PetscInt            i,nv;
-<a name="line263">263: </a>  PetscSplitReduction *sr;
-<a name="line264">264: </a>  MPI_Comm            comm;
-
-<a name="line269">269: </a>  BVCheckSizes(X,1);
-
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_end) {
-<a name="line272">272: </a>    (*X->ops->dotvec_end)(X,y,m);
-<a name="line273">273: </a>  } <font color="#4169E1">else</font> {
-<a name="line274">274: </a>    nv = X->k-X->l;
-<a name="line275">275: </a>    PetscObjectGetComm((PetscObject)X,&comm);
-<a name="line276">276: </a>    PetscSplitReductionGet(comm,&sr);
-<a name="line277">277: </a>    PetscSplitReductionEnd(sr);
-
-<a name="line279">279: </a>    <font color="#4169E1">if</font> (sr->numopsend >= sr->numopsbegin) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() more times than VecxxxBegin()"</font>);
-<a name="line280">280: </a>    <font color="#4169E1">if</font> ((void*)X != sr->invecs[sr->numopsend]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called BVxxxEnd() in a different order or with a different <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> than BVxxxBegin()"</font>);
-<a name="line281">281: </a>    <font color="#4169E1">if</font> (sr->reducetype[sr->numopsend] != REDUCE_SUM) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Wrong type of reduction"</font>);
-<a name="line282">282: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) m[i] = sr->gvalues[sr->numopsend++];
-
-<a name="line284">284: </a>    <font color="#B22222">/* Finished getting all the results so reset to no outstanding requests */</font>
-<a name="line285">285: </a>    <font color="#4169E1">if</font> (sr->numopsend == sr->numopsbegin) {
-<a name="line286">286: </a>      sr->state       = STATE_BEGIN;
-<a name="line287">287: </a>      sr->numopsend   = 0;
-<a name="line288">288: </a>      sr->numopsbegin = 0;
-<a name="line289">289: </a>    }
-<a name="line290">290: </a>  }
-<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
-<a name="line292">292: </a>}
-
-<a name="line296">296: </a><font color="#B22222">/*@</font>
-<a name="line297">297: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a> - Computes multiple dot products of a column against all the</font>
-<a name="line298">298: </a><font color="#B22222">   previous columns of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
-
-<a name="line300">300: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line302">302: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line303">303: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line304">304: </a><font color="#B22222">-  j - the column index</font>
-
-<a name="line306">306: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line307">307: </a><font color="#B22222">.  m - an array where the result must be placed</font>
-
-<a name="line309">309: </a><font color="#B22222">   Notes:</font>
-<a name="line310">310: </a><font color="#B22222">   This operation is equivalent to <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>() but it uses column j of X</font>
-<a name="line311">311: </a><font color="#B22222">   rather than taking a Vec as an argument. The number of active columns of</font>
-<a name="line312">312: </a><font color="#B22222">   X is set to j before the computation, and restored afterwards.</font>
-<a name="line313">313: </a><font color="#B22222">   If X has leading columns specified, then these columns do not participate</font>
-<a name="line314">314: </a><font color="#B22222">   in the computation. Therefore, the length of array m must be equal to j</font>
-<a name="line315">315: </a><font color="#B22222">   minus the number of leading columns.</font>
-
-<a name="line317">317: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line319">319: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), <a href="../../../../../docs/manualpages/BV/BVDotVec.html#BVDotVec">BVDotVec</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
-<a name="line320">320: </a><font color="#B22222">@*/</font>
-<a name="line321">321: </a><strong><font color="#4169E1"><a name="BVDotColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscInt j,PetscScalar *m)</font></strong>
-<a name="line322">322: </a>{
-<a name="line324">324: </a>  PetscInt       ksave;
-<a name="line325">325: </a>  Vec            y;
-
-<a name="line331">331: </a>  BVCheckSizes(X,1);
-
-<a name="line333">333: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line334">334: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
-
-<a name="line336">336: </a>  PetscLogEventBegin(BV_Dot,X,0,0,0);
-<a name="line337">337: </a>  ksave = X->k;
-<a name="line338">338: </a>  X->k = j;
-<a name="line339">339: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
-<a name="line340">340: </a>  (*X->ops->dotvec)(X,y,m);
-<a name="line341">341: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
-<a name="line342">342: </a>  X->k = ksave;
-<a name="line343">343: </a>  PetscLogEventEnd(BV_Dot,X,0,0,0);
-<a name="line344">344: </a>  <font color="#4169E1">return</font>(0);
-<a name="line345">345: </a>}
-
-<a name="line349">349: </a><font color="#B22222">/*@</font>
-<a name="line350">350: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a> - Starts a split phase dot product computation.</font>
-
-<a name="line352">352: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line353">353: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line354">354: </a><font color="#B22222">-  j - the column index</font>
-<a name="line355">355: </a><font color="#B22222">-  m - an array where the result will go (can be NULL)</font>
-
-<a name="line357">357: </a><font color="#B22222">   Note:</font>
-<a name="line358">358: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>().</font>
-
-<a name="line360">360: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line362">362: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>()</font>
-<a name="line363">363: </a><font color="#B22222">@*/</font>
-<a name="line364">364: </a><strong><font color="#4169E1"><a name="BVDotColumnBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscInt j,PetscScalar *m)</font></strong>
-<a name="line365">365: </a>{
-<a name="line366">366: </a>  PetscErrorCode      ierr;
-<a name="line367">367: </a>  PetscInt            i,nv,ksave;
-<a name="line368">368: </a>  PetscSplitReduction *sr;
-<a name="line369">369: </a>  MPI_Comm            comm;
-<a name="line370">370: </a>  Vec                 y;
-
-<a name="line376">376: </a>  BVCheckSizes(X,1);
-
-<a name="line378">378: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line379">379: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
-<a name="line380">380: </a>  ksave = X->k;
-<a name="line381">381: </a>  X->k = j;
-<a name="line382">382: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
-
-<a name="line384">384: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_begin) {
-<a name="line385">385: </a>    (*X->ops->dotvec_begin)(X,y,m);
-<a name="line386">386: </a>  } <font color="#4169E1">else</font> {
-<a name="line387">387: </a>    nv = X->k-X->l;
-<a name="line388">388: </a>    PetscObjectGetComm((PetscObject)X,&comm);
-<a name="line389">389: </a>    PetscSplitReductionGet(comm,&sr);
-<a name="line390">390: </a>    <font color="#4169E1">if</font> (sr->state != STATE_BEGIN) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,<font color="#666666">"Called before all VecxxxEnd() called"</font>);
-<a name="line391">391: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line392">392: </a>      <font color="#4169E1">if</font> (sr->numopsbegin+i >= sr->maxops) {
-<a name="line393">393: </a>        PetscSplitReductionExtend(sr);
-<a name="line394">394: </a>      }
-<a name="line395">395: </a>      sr->reducetype[sr->numopsbegin+i] = REDUCE_SUM;
-<a name="line396">396: </a>      sr->invecs[sr->numopsbegin+i]     = (void*)X;
-<a name="line397">397: </a>    }
-<a name="line398">398: </a>    PetscLogEventBegin(BV_Dot,X,0,0,0);
-<a name="line399">399: </a>    (*X->ops->dotvec_local)(X,y,sr->lvalues+sr->numopsbegin);
-<a name="line400">400: </a>    sr->numopsbegin += nv;
-<a name="line401">401: </a>    PetscLogEventEnd(BV_Dot,X,0,0,0);
-<a name="line402">402: </a>  }
-<a name="line403">403: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
-<a name="line404">404: </a>  X->k = ksave;
-<a name="line405">405: </a>  <font color="#4169E1">return</font>(0);
-<a name="line406">406: </a>}
-
-<a name="line410">410: </a><font color="#B22222">/*@</font>
-<a name="line411">411: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a> - Ends a split phase dot product computation.</font>
-
-<a name="line413">413: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line414">414: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line415">415: </a><font color="#B22222">-  j - the column index</font>
-<a name="line416">416: </a><font color="#B22222">-  m - an array where the result will go</font>
-
-<a name="line418">418: </a><font color="#B22222">   Note:</font>
-<a name="line419">419: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>().</font>
-
-<a name="line421">421: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line423">423: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDotColumnBegin.html#BVDotColumnBegin">BVDotColumnBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVDotColumn.html#BVDotColumn">BVDotColumn</a>()</font>
-<a name="line424">424: </a><font color="#B22222">@*/</font>
-<a name="line425">425: </a><strong><font color="#4169E1"><a name="BVDotColumnEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVDotColumnEnd.html#BVDotColumnEnd">BVDotColumnEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscInt j,PetscScalar *m)</font></strong>
-<a name="line426">426: </a>{
-<a name="line427">427: </a>  PetscErrorCode      ierr;
-<a name="line428">428: </a>  PetscInt            i,nv,ksave;
-<a name="line429">429: </a>  PetscSplitReduction *sr;
-<a name="line430">430: </a>  MPI_Comm            comm;
-<a name="line431">431: </a>  Vec                 y;
-
-<a name="line437">437: </a>  BVCheckSizes(X,1);
-
-<a name="line439">439: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line440">440: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
-<a name="line441">441: </a>  ksave = X->k;
-<a name="line442">442: </a>  X->k = j;
-
-<a name="line444">444: </a>  <font color="#4169E1">if</font> (X->ops->dotvec_end) {
-<a name="line445">445: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
-<a name="line446">446: </a>    (*X->ops->dotvec_end)(X,y,m);
-<a name="line447">447: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
-<a name="line448">448: </a>  } <font color="#4169E1">else</font> {
-<a name="line449">449: </a>    nv = X->k-X->l;
-<a name="line450">450: </a>    PetscObjectGetComm((PetscObject)X,&comm);
-<a name="line451">451: </a>    PetscSplitReductionGet(comm,&sr);
-<a name="line452">452: </a>    PetscSplitReductionEnd(sr);
-
-<a name="line454">454: </a>    <font color="#4169E1">if</font> (sr->numopsend >= sr->numopsbegin) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() more times than VecxxxBegin()"</font>);
-<a name="line455">455: </a>    <font color="#4169E1">if</font> ((void*)X != sr->invecs[sr->numopsend]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called BVxxxEnd() in a different order or with a different <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> than BVxxxBegin()"</font>);
-<a name="line456">456: </a>    <font color="#4169E1">if</font> (sr->reducetype[sr->numopsend] != REDUCE_SUM) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Wrong type of reduction"</font>);
-<a name="line457">457: </a>    <font color="#4169E1">for</font> (i=0;i<nv;i++) m[i] = sr->gvalues[sr->numopsend++];
-
-<a name="line459">459: </a>    <font color="#B22222">/* Finished getting all the results so reset to no outstanding requests */</font>
-<a name="line460">460: </a>    <font color="#4169E1">if</font> (sr->numopsend == sr->numopsbegin) {
-<a name="line461">461: </a>      sr->state       = STATE_BEGIN;
-<a name="line462">462: </a>      sr->numopsend   = 0;
-<a name="line463">463: </a>      sr->numopsbegin = 0;
-<a name="line464">464: </a>    }
-<a name="line465">465: </a>  }
-<a name="line466">466: </a>  X->k = ksave;
-<a name="line467">467: </a>  <font color="#4169E1">return</font>(0);
-<a name="line468">468: </a>}
-
-<a name="line472">472: </a><strong><font color="#4169E1"><a name="BVNorm_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVNorm_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec z,NormType type,PetscReal *val)</font></strong>
-<a name="line473">473: </a>{
-<a name="line475">475: </a>  PetscScalar    p;
-
-<a name="line478">478: </a>  BV_IPMatMult(bv,z);
-<a name="line479">479: </a>  VecDot(bv->Bx,z,&p);
-<a name="line480">480: </a>  BV_SafeSqrt(bv,p,val);
-<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
-<a name="line482">482: </a>}
-
-<a name="line486">486: </a><strong><font color="#4169E1"><a name="BVNorm_Begin_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVNorm_Begin_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec z,NormType type,PetscReal *val)</font></strong>
-<a name="line487">487: </a>{
-<a name="line489">489: </a>  PetscScalar    p;
-
-<a name="line492">492: </a>  BV_IPMatMult(bv,z);
-<a name="line493">493: </a>  VecDotBegin(bv->Bx,z,&p);
-<a name="line494">494: </a>  <font color="#4169E1">return</font>(0);
-<a name="line495">495: </a>}
-
-<a name="line499">499: </a><strong><font color="#4169E1"><a name="BVNorm_End_Private"></a>PETSC_STATIC_INLINE PetscErrorCode BVNorm_End_Private(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec z,NormType type,PetscReal *val)</font></strong>
-<a name="line500">500: </a>{
-<a name="line502">502: </a>  PetscScalar    p;
-
-<a name="line505">505: </a>  VecDotEnd(bv->Bx,z,&p);
-<a name="line506">506: </a>  BV_SafeSqrt(bv,p,val);
-<a name="line507">507: </a>  <font color="#4169E1">return</font>(0);
-<a name="line508">508: </a>}
-
-<a name="line512">512: </a><font color="#B22222">/*@</font>
-<a name="line513">513: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a> - Computes the matrix norm of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
-
-<a name="line515">515: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line517">517: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line518">518: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line519">519: </a><font color="#B22222">-  type - the norm type</font>
-
-<a name="line521">521: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line522">522: </a><font color="#B22222">.  val  - the norm</font>
-
-<a name="line524">524: </a><font color="#B22222">   Notes:</font>
-<a name="line525">525: </a><font color="#B22222">   All active columns (except the leading ones) are considered as a matrix.</font>
-<a name="line526">526: </a><font color="#B22222">   The allowed norms are NORM_1, NORM_FROBENIUS, and NORM_INFINITY.</font>
-
-<a name="line528">528: </a><font color="#B22222">   This operation fails if a non-standard inner product has been</font>
-<a name="line529">529: </a><font color="#B22222">   specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>().</font>
-
-<a name="line531">531: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line533">533: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
-<a name="line534">534: </a><font color="#B22222">@*/</font>
-<a name="line535">535: </a><strong><font color="#4169E1"><a name="BVNorm"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,NormType type,PetscReal *val)</font></strong>
-<a name="line536">536: </a>{
-
-<a name="line544">544: </a>  BVCheckSizes(bv,1);
-
-<a name="line546">546: </a>  <font color="#4169E1">if</font> (type==NORM_2 || type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
-<a name="line547">547: </a>  <font color="#4169E1">if</font> (bv->matrix) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Matrix norm not available for non-standard inner product"</font>);
-
-<a name="line549">549: </a>  PetscLogEventBegin(BV_Norm,bv,0,0,0);
-<a name="line550">550: </a>  (*bv->ops->norm)(bv,-1,type,val);
-<a name="line551">551: </a>  PetscLogEventEnd(BV_Norm,bv,0,0,0);
-<a name="line552">552: </a>  <font color="#4169E1">return</font>(0);
-<a name="line553">553: </a>}
-
-<a name="line557">557: </a><font color="#B22222">/*@</font>
-<a name="line558">558: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a> - Computes the norm of a given vector.</font>
-
-<a name="line560">560: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line562">562: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line563">563: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line564">564: </a><font color="#B22222">.  v    - the vector</font>
-<a name="line565">565: </a><font color="#B22222">-  type - the norm type</font>
-
-<a name="line567">567: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line568">568: </a><font color="#B22222">.  val  - the norm</font>
-
-<a name="line570">570: </a><font color="#B22222">   Notes:</font>
-<a name="line571">571: </a><font color="#B22222">   This is the analogue of <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>() but for a vector that is not in the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
-<a name="line572">572: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
-<a name="line573">573: </a><font color="#B22222">   then the returned value is sqrt(v'*B*v), where B is the inner product</font>
-<a name="line574">574: </a><font color="#B22222">   matrix (argument 'type' is ignored). Otherwise, VecNorm() is called.</font>
-
-<a name="line576">576: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line578">578: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
-<a name="line579">579: </a><font color="#B22222">@*/</font>
-<a name="line580">580: </a><strong><font color="#4169E1"><a name="BVNormVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,NormType type,PetscReal *val)</font></strong>
-<a name="line581">581: </a>{
-<a name="line583">583: </a>  PetscInt       n;
-
-<a name="line591">591: </a>  BVCheckSizes(bv,1);
-
-<a name="line595">595: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+<a name="line608">608: </a>  PetscLogEventBegin(BV_NormVec,bv,0,0,0);
+<a name="line609">609: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line610">610: </a>    VecGetLocalSize(v,&n);
+<a name="line611">611: </a>    <font color="#4169E1">if</font> (bv->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension bv %D, v %D"</font>,bv->n,n);
+<a name="line612">612: </a>    BVNorm_Private(bv,v,type,val);
+<a name="line613">613: </a>  } <font color="#4169E1">else</font> {
+<a name="line614">614: </a>    VecNorm(v,type,val);
+<a name="line615">615: </a>  }
+<a name="line616">616: </a>  PetscLogEventEnd(BV_NormVec,bv,0,0,0);
+<a name="line617">617: </a>  <font color="#4169E1">return</font>(0);
+<a name="line618">618: </a>}
 
-<a name="line597">597: </a>  PetscLogEventBegin(BV_Norm,bv,0,0,0);
-<a name="line598">598: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
-<a name="line599">599: </a>    VecGetLocalSize(v,&n);
-<a name="line600">600: </a>    <font color="#4169E1">if</font> (bv->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension bv %D, v %D"</font>,bv->n,n);
-<a name="line601">601: </a>    BVNorm_Private(bv,v,type,val);
-<a name="line602">602: </a>  } <font color="#4169E1">else</font> {
-<a name="line603">603: </a>    VecNorm(v,type,val);
-<a name="line604">604: </a>  }
-<a name="line605">605: </a>  PetscLogEventEnd(BV_Norm,bv,0,0,0);
-<a name="line606">606: </a>  <font color="#4169E1">return</font>(0);
-<a name="line607">607: </a>}
+<a name="line622">622: </a><font color="#B22222">/*@</font>
+<a name="line623">623: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a> - Starts a split phase norm computation.</font>
 
-<a name="line611">611: </a><font color="#B22222">/*@</font>
-<a name="line612">612: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a> - Starts a split phase norm computation.</font>
+<a name="line625">625: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line626">626: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line627">627: </a><font color="#B22222">.  v    - the vector</font>
+<a name="line628">628: </a><font color="#B22222">.  type - the norm type</font>
+<a name="line629">629: </a><font color="#B22222">-  val  - the norm</font>
+
+<a name="line631">631: </a><font color="#B22222">   Note:</font>
+<a name="line632">632: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>().</font>
+
+<a name="line634">634: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line614">614: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line615">615: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line616">616: </a><font color="#B22222">.  v    - the vector</font>
-<a name="line617">617: </a><font color="#B22222">.  type - the norm type</font>
-<a name="line618">618: </a><font color="#B22222">-  val  - the norm</font>
-
-<a name="line620">620: </a><font color="#B22222">   Note:</font>
-<a name="line621">621: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>().</font>
-
-<a name="line623">623: </a><font color="#B22222">   Level: advanced</font>
+<a name="line636">636: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>()</font>
+<a name="line637">637: </a><font color="#B22222">@*/</font>
+<a name="line638">638: </a><strong><font color="#4169E1"><a name="BVNormVecBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,NormType type,PetscReal *val)</font></strong>
+<a name="line639">639: </a>{
+<a name="line641">641: </a>  PetscInt       n;
 
-<a name="line625">625: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>()</font>
-<a name="line626">626: </a><font color="#B22222">@*/</font>
-<a name="line627">627: </a><strong><font color="#4169E1"><a name="BVNormVecBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,NormType type,PetscReal *val)</font></strong>
-<a name="line628">628: </a>{
-<a name="line630">630: </a>  PetscInt       n;
-
-<a name="line638">638: </a>  BVCheckSizes(bv,1);
-
-<a name="line642">642: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
-
-<a name="line644">644: </a>  PetscLogEventBegin(BV_Norm,bv,0,0,0);
-<a name="line645">645: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
-<a name="line646">646: </a>    VecGetLocalSize(v,&n);
-<a name="line647">647: </a>    <font color="#4169E1">if</font> (bv->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension bv %D, v %D"</font>,bv->n,n);
-<a name="line648">648: </a>    BVNorm_Begin_Private(bv,v,type,val);
-<a name="line649">649: </a>  } <font color="#4169E1">else</font> {
-<a name="line650">650: </a>    VecNormBegin(v,type,val);
-<a name="line651">651: </a>  }
-<a name="line652">652: </a>  PetscLogEventEnd(BV_Norm,bv,0,0,0);
-<a name="line653">653: </a>  <font color="#4169E1">return</font>(0);
-<a name="line654">654: </a>}
-
-<a name="line658">658: </a><font color="#B22222">/*@</font>
-<a name="line659">659: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a> - Ends a split phase norm computation.</font>
-
-<a name="line661">661: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line662">662: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line663">663: </a><font color="#B22222">.  v    - the vector</font>
-<a name="line664">664: </a><font color="#B22222">.  type - the norm type</font>
-<a name="line665">665: </a><font color="#B22222">-  val  - the norm</font>
-
-<a name="line667">667: </a><font color="#B22222">   Note:</font>
-<a name="line668">668: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>().</font>
-
-<a name="line670">670: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line672">672: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>()</font>
-<a name="line673">673: </a><font color="#B22222">@*/</font>
-<a name="line674">674: </a><strong><font color="#4169E1"><a name="BVNormVecEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,NormType type,PetscReal *val)</font></strong>
-<a name="line675">675: </a>{
-
-<a name="line683">683: </a>  BVCheckSizes(bv,1);
-
-<a name="line685">685: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
-
-<a name="line687">687: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
-<a name="line688">688: </a>    BVNorm_End_Private(bv,v,type,val);
-<a name="line689">689: </a>  } <font color="#4169E1">else</font> {
-<a name="line690">690: </a>    VecNormEnd(v,type,val);
-<a name="line691">691: </a>  }
-<a name="line692">692: </a>  <font color="#4169E1">return</font>(0);
-<a name="line693">693: </a>}
-
-<a name="line697">697: </a><font color="#B22222">/*@</font>
-<a name="line698">698: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a> - Computes the vector norm of a selected column.</font>
-
-<a name="line700">700: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line702">702: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line703">703: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line704">704: </a><font color="#B22222">.  j    - column number to be used</font>
-<a name="line705">705: </a><font color="#B22222">-  type - the norm type</font>
-
-<a name="line707">707: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line708">708: </a><font color="#B22222">.  val  - the norm</font>
-
-<a name="line710">710: </a><font color="#B22222">   Notes:</font>
-<a name="line711">711: </a><font color="#B22222">   The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY).</font>
-<a name="line712">712: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
-<a name="line713">713: </a><font color="#B22222">   then the returned value is sqrt(V[j]'*B*V[j]), </font>
-<a name="line714">714: </a><font color="#B22222">   where B is the inner product matrix (argument 'type' is ignored).</font>
-
-<a name="line716">716: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line718">718: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(), <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
-<a name="line719">719: </a><font color="#B22222">@*/</font>
-<a name="line720">720: </a><strong><font color="#4169E1"><a name="BVNormColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line721">721: </a>{
-<a name="line723">723: </a>  Vec            z;
-
-<a name="line731">731: </a>  BVCheckSizes(bv,1);
-
-<a name="line733">733: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
-<a name="line734">734: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
-
-<a name="line736">736: </a>  PetscLogEventBegin(BV_Norm,bv,0,0,0);
-<a name="line737">737: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
-<a name="line738">738: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&z);
-<a name="line739">739: </a>    BVNorm_Private(bv,z,type,val);
-<a name="line740">740: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&z);
-<a name="line741">741: </a>  } <font color="#4169E1">else</font> {
-<a name="line742">742: </a>    (*bv->ops->norm)(bv,j,type,val);
-<a name="line743">743: </a>  }
-<a name="line744">744: </a>  PetscLogEventEnd(BV_Norm,bv,0,0,0);
-<a name="line745">745: </a>  <font color="#4169E1">return</font>(0);
-<a name="line746">746: </a>}
-
-<a name="line750">750: </a><font color="#B22222">/*@</font>
-<a name="line751">751: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a> - Starts a split phase norm computation.</font>
-
-<a name="line753">753: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line754">754: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line755">755: </a><font color="#B22222">.  j    - column number to be used</font>
-<a name="line756">756: </a><font color="#B22222">.  type - the norm type</font>
-<a name="line757">757: </a><font color="#B22222">-  val  - the norm</font>
-
-<a name="line759">759: </a><font color="#B22222">   Note:</font>
-<a name="line760">760: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>().</font>
-
-<a name="line762">762: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line764">764: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>()</font>
-<a name="line765">765: </a><font color="#B22222">@*/</font>
-<a name="line766">766: </a><strong><font color="#4169E1"><a name="BVNormColumnBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line767">767: </a>{
-<a name="line768">768: </a>  PetscErrorCode      ierr;
-<a name="line769">769: </a>  PetscSplitReduction *sr;
-<a name="line770">770: </a>  PetscReal           lresult;
-<a name="line771">771: </a>  MPI_Comm            comm;
-<a name="line772">772: </a>  Vec                 z;
-
-<a name="line780">780: </a>  BVCheckSizes(bv,1);
-
-<a name="line782">782: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
-<a name="line783">783: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
-
-<a name="line785">785: </a>  PetscLogEventBegin(BV_Norm,bv,0,0,0);
-<a name="line786">786: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&z);
-<a name="line787">787: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
-<a name="line788">788: </a>    BVNorm_Begin_Private(bv,z,type,val);
-<a name="line789">789: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bv->ops->norm_begin) {
-<a name="line790">790: </a>    (*bv->ops->norm_begin)(bv,j,type,val);
-<a name="line791">791: </a>  } <font color="#4169E1">else</font> {
-<a name="line792">792: </a>    PetscObjectGetComm((PetscObject)z,&comm);
-<a name="line793">793: </a>    PetscSplitReductionGet(comm,&sr);
-<a name="line794">794: </a>    <font color="#4169E1">if</font> (sr->state != STATE_BEGIN) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,<font color="#666666">"Called before all VecxxxEnd() called"</font>);
-<a name="line795">795: </a>    <font color="#4169E1">if</font> (sr->numopsbegin >= sr->maxops) {
-<a name="line796">796: </a>      PetscSplitReductionExtend(sr);
-<a name="line797">797: </a>    }
-<a name="line798">798: </a>    sr->invecs[sr->numopsbegin] = (void*)bv;
-<a name="line799">799: </a>    (*bv->ops->norm_local)(bv,j,type,&lresult);
-<a name="line800">800: </a>    <font color="#4169E1">if</font> (type == NORM_2) lresult = lresult*lresult;
-<a name="line801">801: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (type == NORM_MAX) sr->reducetype[sr->numopsbegin] = REDUCE_MAX;
-<a name="line802">802: </a>    <font color="#4169E1">else</font> sr->reducetype[sr->numopsbegin] = REDUCE_SUM;
-<a name="line803">803: </a>    sr->lvalues[sr->numopsbegin++] = lresult;
-<a name="line804">804: </a>  }
-<a name="line805">805: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&z);
-<a name="line806">806: </a>  PetscLogEventEnd(BV_Norm,bv,0,0,0);
-<a name="line807">807: </a>  <font color="#4169E1">return</font>(0);
-<a name="line808">808: </a>}
-
-<a name="line812">812: </a><font color="#B22222">/*@</font>
-<a name="line813">813: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a> - Ends a split phase norm computation.</font>
-
-<a name="line815">815: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line816">816: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line817">817: </a><font color="#B22222">.  j    - column number to be used</font>
-<a name="line818">818: </a><font color="#B22222">.  type - the norm type</font>
-<a name="line819">819: </a><font color="#B22222">-  val  - the norm</font>
-
-<a name="line821">821: </a><font color="#B22222">   Note:</font>
-<a name="line822">822: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>().</font>
-
-<a name="line824">824: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line826">826: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>()</font>
-<a name="line827">827: </a><font color="#B22222">@*/</font>
-<a name="line828">828: </a><strong><font color="#4169E1"><a name="BVNormColumnEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
-<a name="line829">829: </a>{
-<a name="line830">830: </a>  PetscErrorCode      ierr;
-<a name="line831">831: </a>  PetscSplitReduction *sr;
-<a name="line832">832: </a>  MPI_Comm            comm;
-<a name="line833">833: </a>  Vec                 z;
-
-<a name="line841">841: </a>  BVCheckSizes(bv,1);
-
-<a name="line843">843: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
-
-<a name="line845">845: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&z);
-<a name="line846">846: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
-<a name="line847">847: </a>    BVNorm_End_Private(bv,z,type,val);
-<a name="line848">848: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bv->ops->norm_end) {
-<a name="line849">849: </a>    (*bv->ops->norm_end)(bv,j,type,val);
-<a name="line850">850: </a>  } <font color="#4169E1">else</font> {
-<a name="line851">851: </a>    PetscObjectGetComm((PetscObject)z,&comm);
-<a name="line852">852: </a>    PetscSplitReductionGet(comm,&sr);
-<a name="line853">853: </a>    PetscSplitReductionEnd(sr);
-
-<a name="line855">855: </a>    <font color="#4169E1">if</font> (sr->numopsend >= sr->numopsbegin) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() more times then VecxxxBegin()"</font>);
-<a name="line856">856: </a>    <font color="#4169E1">if</font> ((void*)bv != sr->invecs[sr->numopsend]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() in a different order or with a different vector than VecxxxBegin()"</font>);
-<a name="line857">857: </a>    <font color="#4169E1">if</font> (sr->reducetype[sr->numopsend] != REDUCE_MAX && type == NORM_MAX) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called BVNormEnd(,NORM_MAX,) on a reduction started with VecDotBegin() or NORM_1 or NORM_2"</font>);
-<a name="line858">858: </a>    *val = PetscRealPart(sr->gvalues[sr->numopsend++]);
-<a name="line859">859: </a>    <font color="#4169E1">if</font> (type == NORM_2) *val = PetscSqrtReal(*val);
-<a name="line860">860: </a>    <font color="#4169E1">if</font> (sr->numopsend == sr->numopsbegin) {
-<a name="line861">861: </a>      sr->state       = STATE_BEGIN;
-<a name="line862">862: </a>      sr->numopsend   = 0;
-<a name="line863">863: </a>      sr->numopsbegin = 0;
-<a name="line864">864: </a>    }
-<a name="line865">865: </a>  }
-<a name="line866">866: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&z);
-<a name="line867">867: </a>  <font color="#4169E1">return</font>(0);
-<a name="line868">868: </a>}
-
-<a name="line872">872: </a><font color="#B22222">/*</font>
-<a name="line873">873: </a><font color="#B22222">  Compute Y^H*A*X: right part column by column (with MatMult) and bottom</font>
-<a name="line874">874: </a><font color="#B22222">  part row by row (with MatMultHermitianTranspose); result placed in marray[*,ldm]</font>
-<a name="line875">875: </a><font color="#B22222">*/</font>
-<a name="line876">876: </a><strong><font color="#4169E1"><a name="BVMatProject_Vec"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Vec(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)</font></strong>
-<a name="line877">877: </a>{
-<a name="line879">879: </a>  PetscInt       i,j,lx,ly,kx,ky,ulim;
-<a name="line880">880: </a>  Vec            z,f;
-
-<a name="line883">883: </a>  lx = X->l; kx = X->k;
-<a name="line884">884: </a>  ly = Y->l; ky = Y->k;
-<a name="line885">885: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(X,&f);
-<a name="line886">886: </a>  <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
-<a name="line887">887: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&z);
-<a name="line888">888: </a>    MatMult(A,z,f);
-<a name="line889">889: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&z);
-<a name="line890">890: </a>    ulim = PetscMin(ly+(j-lx)+1,ky);
-<a name="line891">891: </a>    Y->l = 0; Y->k = ulim;
-<a name="line892">892: </a>    (*Y->ops->dotvec)(Y,f,marray+j*ldm);
-<a name="line893">893: </a>    <font color="#4169E1">if</font> (symm) {
-<a name="line894">894: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++) marray[j+i*ldm] = PetscConj(marray[i+j*ldm]);
-<a name="line895">895: </a>    }
-<a name="line896">896: </a>  }
-<a name="line897">897: </a>  <font color="#4169E1">if</font> (!symm) {
-<a name="line898">898: </a>    BV_AllocateCoeffs(Y);
-<a name="line899">899: </a>    <font color="#4169E1">for</font> (j=ly;j<ky;j++) {
-<a name="line900">900: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Y,j,&z);
-<a name="line901">901: </a>      MatMultHermitianTranspose(A,z,f);
-<a name="line902">902: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Y,j,&z);
-<a name="line903">903: </a>      ulim = PetscMin(lx+(j-ly),kx);
-<a name="line904">904: </a>      X->l = 0; X->k = ulim;
-<a name="line905">905: </a>      (*X->ops->dotvec)(X,f,Y->h);
-<a name="line906">906: </a>      <font color="#4169E1">for</font> (i=0;i<ulim;i++) marray[j+i*ldm] = PetscConj(Y->h[i]);
-<a name="line907">907: </a>    }
-<a name="line908">908: </a>  }
-<a name="line909">909: </a>  VecDestroy(&f);
-<a name="line910">910: </a>  X->l = lx; X->k = kx;
-<a name="line911">911: </a>  Y->l = ly; Y->k = ky;
-<a name="line912">912: </a>  <font color="#4169E1">return</font>(0);
-<a name="line913">913: </a>}
-
-<a name="line917">917: </a><font color="#B22222">/*</font>
-<a name="line918">918: </a><font color="#B22222">  Compute Y^H*A*X= [   --   | Y0'*W1 ]</font>
-<a name="line919">919: </a><font color="#B22222">                   [ Y1'*W0 | Y1'*W1 ]</font>
-<a name="line920">920: </a><font color="#B22222">  Allocates auxiliary <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to store the result of A*X, then one <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a></font>
-<a name="line921">921: </a><font color="#B22222">  call for top-right part and another one for bottom part;</font>
-<a name="line922">922: </a><font color="#B22222">  result placed in marray[*,ldm]</font>
-<a name="line923">923: </a><font color="#B22222">*/</font>
-<a name="line924">924: </a><strong><font color="#4169E1"><a name="BVMatProject_MatMult"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm)</font></strong>
-<a name="line925">925: </a>{
-<a name="line927">927: </a>  PetscInt       j,lx,ly,kx,ky;
-<a name="line928">928: </a>  PetscScalar    *harray;
-<a name="line929">929: </a>  Mat            H;
-<a name="line930">930: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;
-
-<a name="line933">933: </a>  lx = X->l; kx = X->k;
-<a name="line934">934: </a>  ly = Y->l; ky = Y->k;
-<a name="line935">935: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(X,&W);
-<a name="line936">936: </a>  X->l = 0; X->k = kx;
-<a name="line937">937: </a>  <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,W);
-
-<a name="line939">939: </a>  <font color="#B22222">/* top-right part, Y0'*AX1 */</font>
-<a name="line940">940: </a>  <font color="#4169E1">if</font> (ly>0 && lx<kx) {
-<a name="line941">941: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ly,kx,NULL,&H);
-<a name="line942">942: </a>    W->l = lx; W->k = kx;
-<a name="line943">943: </a>    Y->l = 0;  Y->k = ly;
-<a name="line944">944: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,Y,H);
-<a name="line945">945: </a>    MatDenseGetArray(H,&harray);
-<a name="line946">946: </a>    <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
-<a name="line947">947: </a>      PetscMemcpy(marray+j*ldm,harray+j*ly,ly*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line948">948: </a>    }
-<a name="line949">949: </a>    MatDenseRestoreArray(H,&harray);
-<a name="line950">950: </a>    MatDestroy(&H);
-<a name="line951">951: </a>  }
-
-<a name="line953">953: </a>  <font color="#B22222">/* bottom part, Y1'*AX */</font>
-<a name="line954">954: </a>  <font color="#4169E1">if</font> (kx>0 && ly<ky) {
-<a name="line955">955: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ky,kx,NULL,&H);
-<a name="line956">956: </a>    W->l = 0;  W->k = kx;
-<a name="line957">957: </a>    Y->l = ly; Y->k = ky;
-<a name="line958">958: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,Y,H);
-<a name="line959">959: </a>    MatDenseGetArray(H,&harray);
-<a name="line960">960: </a>    <font color="#4169E1">for</font> (j=0;j<kx;j++) {
-<a name="line961">961: </a>      PetscMemcpy(marray+j*ldm+ly,harray+j*ky+ly,(ky-ly)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line962">962: </a>    }
-<a name="line963">963: </a>    MatDenseRestoreArray(H,&harray);
-<a name="line964">964: </a>    MatDestroy(&H);
-<a name="line965">965: </a>  }
-<a name="line966">966: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&W);
-<a name="line967">967: </a>  X->l = lx; X->k = kx;
-<a name="line968">968: </a>  Y->l = ly; Y->k = ky;
-<a name="line969">969: </a>  <font color="#4169E1">return</font>(0);
-<a name="line970">970: </a>}
-
-<a name="line974">974: </a><font color="#B22222">/*</font>
-<a name="line975">975: </a><font color="#B22222">  Compute Y^H*A*X= [   --   | Y0'*W1 ]</font>
-<a name="line976">976: </a><font color="#B22222">                   [ Y1'*W0 | Y1'*W1 ]</font>
-<a name="line977">977: </a><font color="#B22222">  First stage: allocate auxiliary <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to store A*X1, one <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> for right part;</font>
-<a name="line978">978: </a><font color="#B22222">  Second stage: resize <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to accomodate A'*Y1, then call <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> for transpose of</font>
-<a name="line979">979: </a><font color="#B22222">  bottom-left part; result placed in marray[*,ldm]</font>
-<a name="line980">980: </a><font color="#B22222">*/</font>
-<a name="line981">981: </a><strong><font color="#4169E1"><a name="BVMatProject_MatMult_2"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult_2(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)</font></strong>
-<a name="line982">982: </a>{
-<a name="line984">984: </a>  PetscInt       i,j,lx,ly,kx,ky;
-<a name="line985">985: </a>  PetscScalar    *harray;
-<a name="line986">986: </a>  Mat            H;
-<a name="line987">987: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;
-
-<a name="line990">990: </a>  lx = X->l; kx = X->k;
-<a name="line991">991: </a>  ly = Y->l; ky = Y->k;
-
-<a name="line993">993: </a>  <font color="#B22222">/* right part, Y'*AX1 */</font>
-<a name="line994">994: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(X,kx-lx,&W);
-<a name="line995">995: </a>  <font color="#4169E1">if</font> (ky>0 && lx<kx) {
-<a name="line996">996: </a>    <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,W);
-<a name="line997">997: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ky,kx-lx,NULL,&H);
-<a name="line998">998: </a>    Y->l = 0; Y->k = ky;
-<a name="line999">999: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,Y,H);
-<a name="line1000">1000: </a>    MatDenseGetArray(H,&harray);
-<a name="line1001">1001: </a>    <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
-<a name="line1002">1002: </a>      PetscMemcpy(marray+j*ldm,harray+(j-lx)*ky,ky*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line1003">1003: </a>    }
-<a name="line1004">1004: </a>    MatDenseRestoreArray(H,&harray);
-<a name="line1005">1005: </a>    MatDestroy(&H);
-<a name="line1006">1006: </a>  }
-
-<a name="line1008">1008: </a>  <font color="#B22222">/* bottom-left part, Y1'*AX0 */</font>
-<a name="line1009">1009: </a>  <font color="#4169E1">if</font> (lx>0 && ly<ky) {
-<a name="line1010">1010: </a>    <font color="#4169E1">if</font> (symm) {
-<a name="line1011">1011: </a>      <font color="#B22222">/* do not compute, just copy symmetric elements */</font>
-<a name="line1012">1012: </a>      <font color="#4169E1">for</font> (i=ly;i<ky;i++) {
-<a name="line1013">1013: </a>        <font color="#4169E1">for</font> (j=0;j<lx;j++) marray[i+j*ldm] = PetscConj(marray[j+i*ldm]);
-<a name="line1014">1014: </a>      }
-<a name="line1015">1015: </a>    } <font color="#4169E1">else</font> {
-<a name="line1016">1016: </a>      <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(W,ky-ly,PETSC_FALSE);
-<a name="line1017">1017: </a>      Y->l = ly; Y->k = ky;
-<a name="line1018">1018: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a>(Y,A,W);
-<a name="line1019">1019: </a>      MatCreateSeqDense(PETSC_COMM_SELF,lx,ky-ly,NULL,&H);
-<a name="line1020">1020: </a>      X->l = 0; X->k = lx;
-<a name="line1021">1021: </a>      <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,X,H);
-<a name="line1022">1022: </a>      MatDenseGetArray(H,&harray);
-<a name="line1023">1023: </a>      <font color="#4169E1">for</font> (i=0;i<ky-ly;i++) {
-<a name="line1024">1024: </a>        <font color="#4169E1">for</font> (j=0;j<lx;j++) {
-<a name="line1025">1025: </a>          marray[i+j*ldm+ly] = PetscConj(harray[j+i*(ky-ly)]);
-<a name="line1026">1026: </a>        }
-<a name="line1027">1027: </a>      }
-<a name="line1028">1028: </a>      MatDenseRestoreArray(H,&harray);
-<a name="line1029">1029: </a>      MatDestroy(&H);
-<a name="line1030">1030: </a>    }
-<a name="line1031">1031: </a>  }
-<a name="line1032">1032: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&W);
-<a name="line1033">1033: </a>  X->l = lx; X->k = kx;
-<a name="line1034">1034: </a>  Y->l = ly; Y->k = ky;
-<a name="line1035">1035: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1036">1036: </a>}
-
-<a name="line1040">1040: </a><font color="#B22222">/*</font>
-<a name="line1041">1041: </a><font color="#B22222">  Compute Y^H*X = [   --   | Y0'*X1 ]     (X contains A*X):</font>
-<a name="line1042">1042: </a><font color="#B22222">                  [ Y1'*X0 | Y1'*X1 ]</font>
-<a name="line1043">1043: </a><font color="#B22222">  one <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> call for top-right part and another one for bottom part;</font>
-<a name="line1044">1044: </a><font color="#B22222">  result placed in marray[*,ldm]</font>
-<a name="line1045">1045: </a><font color="#B22222">*/</font>
-<a name="line1046">1046: </a><strong><font color="#4169E1"><a name="BVMatProject_Dot"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Dot(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm)</font></strong>
-<a name="line1047">1047: </a>{
-<a name="line1049">1049: </a>  PetscInt       j,lx,ly,kx,ky;
-<a name="line1050">1050: </a>  PetscScalar    *harray;
-<a name="line1051">1051: </a>  Mat            H;
-
-<a name="line1054">1054: </a>  lx = X->l; kx = X->k;
-<a name="line1055">1055: </a>  ly = Y->l; ky = Y->k;
-
-<a name="line1057">1057: </a>  <font color="#B22222">/* top-right part, Y0'*X1 */</font>
-<a name="line1058">1058: </a>  <font color="#4169E1">if</font> (ly>0 && lx<kx) {
-<a name="line1059">1059: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ly,kx,NULL,&H);
-<a name="line1060">1060: </a>    X->l = lx; X->k = kx;
-<a name="line1061">1061: </a>    Y->l = 0;  Y->k = ly;
-<a name="line1062">1062: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(X,Y,H);
-<a name="line1063">1063: </a>    MatDenseGetArray(H,&harray);
-<a name="line1064">1064: </a>    <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
-<a name="line1065">1065: </a>      PetscMemcpy(marray+j*ldm,harray+j*ly,ly*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line1066">1066: </a>    }
-<a name="line1067">1067: </a>    MatDenseRestoreArray(H,&harray);
-<a name="line1068">1068: </a>    MatDestroy(&H);
-<a name="line1069">1069: </a>  }
-
-<a name="line1071">1071: </a>  <font color="#B22222">/* bottom part, Y1'*X */</font>
-<a name="line1072">1072: </a>  <font color="#4169E1">if</font> (kx>0 && ly<ky) {
-<a name="line1073">1073: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ky,kx,NULL,&H);
-<a name="line1074">1074: </a>    X->l = 0;  X->k = kx;
-<a name="line1075">1075: </a>    Y->l = ly; Y->k = ky;
-<a name="line1076">1076: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(X,Y,H);
-<a name="line1077">1077: </a>    MatDenseGetArray(H,&harray);
-<a name="line1078">1078: </a>    <font color="#4169E1">for</font> (j=0;j<kx;j++) {
-<a name="line1079">1079: </a>      PetscMemcpy(marray+j*ldm+ly,harray+j*ky+ly,(ky-ly)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line1080">1080: </a>    }
-<a name="line1081">1081: </a>    MatDenseRestoreArray(H,&harray);
-<a name="line1082">1082: </a>    MatDestroy(&H);
-<a name="line1083">1083: </a>  }
-<a name="line1084">1084: </a>  X->l = lx; X->k = kx;
-<a name="line1085">1085: </a>  Y->l = ly; Y->k = ky;
-<a name="line1086">1086: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1087">1087: </a>}
-
-<a name="line1091">1091: </a><font color="#B22222">/*@</font>
-<a name="line1092">1092: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a> - Computes the projection of a matrix onto a subspace.</font>
-
-<a name="line1094">1094: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line1096">1096: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line1097">1097: </a><font color="#B22222">+  X - basis vectors</font>
-<a name="line1098">1098: </a><font color="#B22222">.  A - (optional) matrix to be projected</font>
-<a name="line1099">1099: </a><font color="#B22222">.  Y - left basis vectors, can be equal to X</font>
-<a name="line1100">1100: </a><font color="#B22222">-  M - Mat object where the result must be placed</font>
-
-<a name="line1102">1102: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line1103">1103: </a><font color="#B22222">.  M - the resulting matrix</font>
-
-<a name="line1105">1105: </a><font color="#B22222">   Notes:</font>
-<a name="line1106">1106: </a><font color="#B22222">   If A=NULL, then it is assumed that X already contains A*X.</font>
-
-<a name="line1108">1108: </a><font color="#B22222">   This operation is similar to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), with important differences.</font>
-<a name="line1109">1109: </a><font color="#B22222">   The goal is to compute the matrix resulting from the orthogonal projection</font>
-<a name="line1110">1110: </a><font color="#B22222">   of A onto the subspace spanned by the columns of X, M = X^H*A*X, or the</font>
-<a name="line1111">1111: </a><font color="#B22222">   oblique projection onto X along Y, M = Y^H*A*X.</font>
-
-<a name="line1113">1113: </a><font color="#B22222">   A difference with respect to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>() is that the standard inner product</font>
-<a name="line1114">1114: </a><font color="#B22222">   is always used, regardless of a non-standard inner product being specified</font>
-<a name="line1115">1115: </a><font color="#B22222">   with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>().</font>
-
-<a name="line1117">1117: </a><font color="#B22222">   On entry, M must be a sequential dense Mat with dimensions ky,kx at least,</font>
-<a name="line1118">1118: </a><font color="#B22222">   where ky (resp. kx) is the number of active columns of Y (resp. X).</font>
-<a name="line1119">1119: </a><font color="#B22222">   Another difference with respect to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>() is that all entries of M are</font>
-<a name="line1120">1120: </a><font color="#B22222">   computed except the leading ly,lx part, where ly (resp. lx) is the</font>
-<a name="line1121">1121: </a><font color="#B22222">   number of leading columns of Y (resp. X). Hence, the leading columns of</font>
-<a name="line1122">1122: </a><font color="#B22222">   X and Y participate in the computation, as opposed to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>().</font>
-<a name="line1123">1123: </a><font color="#B22222">   The leading part of M is assumed to be already available from previous</font>
-<a name="line1124">1124: </a><font color="#B22222">   computations.</font>
-
-<a name="line1126">1126: </a><font color="#B22222">   In the orthogonal projection case, Y=X, some computation can be saved if</font>
-<a name="line1127">1127: </a><font color="#B22222">   A is real symmetric (or complex Hermitian). In order to exploit this</font>
-<a name="line1128">1128: </a><font color="#B22222">   property, the symmetry flag of A must be set with MatSetOption().</font>
-
-<a name="line1130">1130: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line1132">1132: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
-<a name="line1133">1133: </a><font color="#B22222">@*/</font>
-<a name="line1134">1134: </a><strong><font color="#4169E1"><a name="BVMatProject"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
-<a name="line1135">1135: </a>{
-<a name="line1137">1137: </a>  PetscBool      match,set,flg,symm=PETSC_FALSE;
-<a name="line1138">1138: </a>  PetscInt       m,n;
-<a name="line1139">1139: </a>  PetscScalar    *marray;
-<a name="line1140">1140: </a>  Mat            Xmatrix,Ymatrix;
-<a name="line1141">1141: </a>  PetscObjectId  idx,idy;
-
-<a name="line1149">1149: </a>  BVCheckSizes(X,1);
-<a name="line1150">1150: </a>  <font color="#4169E1">if</font> (A) {
-<a name="line1153">1153: </a>  }
-<a name="line1155">1155: </a>  BVCheckSizes(Y,3);
-<a name="line1158">1158: </a>  PetscObjectTypeCompare((PetscObject)M,MATSEQDENSE,&match);
-<a name="line1159">1159: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_SUP,<font color="#666666">"Matrix M must be of type seqdense"</font>);
-
-<a name="line1161">1161: </a>  MatGetSize(M,&m,&n);
-<a name="line1162">1162: </a>  <font color="#4169E1">if</font> (m<Y->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrix M has %D rows, should have at least %D"</font>,m,Y->k);
-<a name="line1163">1163: </a>  <font color="#4169E1">if</font> (n<X->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrix M has %D columns, should have at least %D"</font>,n,X->k);
-<a name="line1164">1164: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
-
-<a name="line1166">1166: </a>  PetscLogEventBegin(BV_MatProject,X,A,Y,0);
-<a name="line1167">1167: </a>  <font color="#B22222">/* temporarily set standard inner product */</font>
-<a name="line1168">1168: </a>  Xmatrix = X->matrix;
-<a name="line1169">1169: </a>  Ymatrix = Y->matrix;
-<a name="line1170">1170: </a>  X->matrix = Y->matrix = NULL;
-
-<a name="line1172">1172: </a>  PetscObjectGetId((PetscObject)X,&idx);
-<a name="line1173">1173: </a>  PetscObjectGetId((PetscObject)Y,&idy);
-<a name="line1174">1174: </a>  <font color="#4169E1">if</font> (!A && idx==idy) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Cannot set X=Y if A=NULL"</font>);
-
-<a name="line1176">1176: </a>  MatDenseGetArray(M,&marray);
-
-<a name="line1178">1178: </a>  <font color="#4169E1">if</font> (A && idx==idy) { <font color="#B22222">/* check symmetry of M=X'AX */</font>
-<a name="line1179">1179: </a>    MatIsHermitianKnown(A,&set,&flg);
-<a name="line1180">1180: </a>    symm = set? flg: PETSC_FALSE;
-<a name="line1181">1181: </a>  }
-
-<a name="line1183">1183: </a>  <font color="#4169E1">if</font> (A) { 
-<a name="line1184">1184: </a>    <font color="#4169E1">if</font> (X->vmm==BV_MATMULT_VECS) {
-<a name="line1185">1185: </a>      <font color="#B22222">/* perform computation column by column */</font>
-<a name="line1186">1186: </a>      BVMatProject_Vec(X,A,Y,marray,m,symm);
-<a name="line1187">1187: </a>    } <font color="#4169E1">else</font> {
-<a name="line1188">1188: </a>      <font color="#B22222">/* use <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>, then <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> */</font>
-<a name="line1189">1189: </a>      MatHasOperation(A,MATOP_MULT_TRANSPOSE,&flg);
-<a name="line1190">1190: </a>      <font color="#4169E1">if</font> (symm || (flg && X->l>=X->k/2 && Y->l>=Y->k/2)) {
-<a name="line1191">1191: </a>        BVMatProject_MatMult_2(X,A,Y,marray,m,symm);
-<a name="line1192">1192: </a>      } <font color="#4169E1">else</font> {
-<a name="line1193">1193: </a>        BVMatProject_MatMult(X,A,Y,marray,m);
-<a name="line1194">1194: </a>      }
-<a name="line1195">1195: </a>    }
-<a name="line1196">1196: </a>  } <font color="#4169E1">else</font> {
-<a name="line1197">1197: </a>    <font color="#B22222">/* use <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> on subblocks */</font>
-<a name="line1198">1198: </a>    BVMatProject_Dot(X,Y,marray,m);
-<a name="line1199">1199: </a>  }
-
-<a name="line1201">1201: </a>  MatDenseRestoreArray(M,&marray);
-<a name="line1202">1202: </a>  PetscLogEventEnd(BV_MatProject,X,A,Y,0);
-<a name="line1203">1203: </a>  <font color="#B22222">/* restore non-standard inner product */</font>
-<a name="line1204">1204: </a>  X->matrix = Xmatrix;
-<a name="line1205">1205: </a>  Y->matrix = Ymatrix;
-<a name="line1206">1206: </a>  <font color="#4169E1">return</font>(0);
-<a name="line1207">1207: </a>}
+<a name="line649">649: </a>  BVCheckSizes(bv,1);
+
+<a name="line653">653: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+
+<a name="line655">655: </a>  PetscLogEventBegin(BV_NormVec,bv,0,0,0);
+<a name="line656">656: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line657">657: </a>    VecGetLocalSize(v,&n);
+<a name="line658">658: </a>    <font color="#4169E1">if</font> (bv->n!=n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension bv %D, v %D"</font>,bv->n,n);
+<a name="line659">659: </a>    BVNorm_Begin_Private(bv,v,type,val);
+<a name="line660">660: </a>  } <font color="#4169E1">else</font> {
+<a name="line661">661: </a>    VecNormBegin(v,type,val);
+<a name="line662">662: </a>  }
+<a name="line663">663: </a>  PetscLogEventEnd(BV_NormVec,bv,0,0,0);
+<a name="line664">664: </a>  <font color="#4169E1">return</font>(0);
+<a name="line665">665: </a>}
+
+<a name="line669">669: </a><font color="#B22222">/*@</font>
+<a name="line670">670: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a> - Ends a split phase norm computation.</font>
+
+<a name="line672">672: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line673">673: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line674">674: </a><font color="#B22222">.  v    - the vector</font>
+<a name="line675">675: </a><font color="#B22222">.  type - the norm type</font>
+<a name="line676">676: </a><font color="#B22222">-  val  - the norm</font>
+
+<a name="line678">678: </a><font color="#B22222">   Note:</font>
+<a name="line679">679: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>().</font>
+
+<a name="line681">681: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line683">683: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormVecBegin.html#BVNormVecBegin">BVNormVecBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>()</font>
+<a name="line684">684: </a><font color="#B22222">@*/</font>
+<a name="line685">685: </a><strong><font color="#4169E1"><a name="BVNormVecEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormVecEnd.html#BVNormVecEnd">BVNormVecEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,NormType type,PetscReal *val)</font></strong>
+<a name="line686">686: </a>{
+
+<a name="line694">694: </a>  BVCheckSizes(bv,1);
+
+<a name="line696">696: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+
+<a name="line698">698: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line699">699: </a>    BVNorm_End_Private(bv,v,type,val);
+<a name="line700">700: </a>  } <font color="#4169E1">else</font> {
+<a name="line701">701: </a>    VecNormEnd(v,type,val);
+<a name="line702">702: </a>  }
+<a name="line703">703: </a>  <font color="#4169E1">return</font>(0);
+<a name="line704">704: </a>}
+
+<a name="line708">708: </a><font color="#B22222">/*@</font>
+<a name="line709">709: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a> - Computes the vector norm of a selected column.</font>
+
+<a name="line711">711: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line713">713: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line714">714: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line715">715: </a><font color="#B22222">.  j    - column number to be used</font>
+<a name="line716">716: </a><font color="#B22222">-  type - the norm type</font>
+
+<a name="line718">718: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line719">719: </a><font color="#B22222">.  val  - the norm</font>
+
+<a name="line721">721: </a><font color="#B22222">   Notes:</font>
+<a name="line722">722: </a><font color="#B22222">   The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY).</font>
+<a name="line723">723: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
+<a name="line724">724: </a><font color="#B22222">   then the returned value is sqrt(V[j]'*B*V[j]), </font>
+<a name="line725">725: </a><font color="#B22222">   where B is the inner product matrix (argument 'type' is ignored).</font>
+
+<a name="line727">727: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line729">729: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNorm.html#BVNorm">BVNorm</a>(), <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
+<a name="line730">730: </a><font color="#B22222">@*/</font>
+<a name="line731">731: </a><strong><font color="#4169E1"><a name="BVNormColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line732">732: </a>{
+<a name="line734">734: </a>  Vec            z;
+
+<a name="line742">742: </a>  BVCheckSizes(bv,1);
+
+<a name="line744">744: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
+<a name="line745">745: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+
+<a name="line747">747: </a>  PetscLogEventBegin(BV_NormVec,bv,0,0,0);
+<a name="line748">748: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line749">749: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&z);
+<a name="line750">750: </a>    BVNorm_Private(bv,z,type,val);
+<a name="line751">751: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&z);
+<a name="line752">752: </a>  } <font color="#4169E1">else</font> {
+<a name="line753">753: </a>    (*bv->ops->norm)(bv,j,type,val);
+<a name="line754">754: </a>  }
+<a name="line755">755: </a>  PetscLogEventEnd(BV_NormVec,bv,0,0,0);
+<a name="line756">756: </a>  <font color="#4169E1">return</font>(0);
+<a name="line757">757: </a>}
+
+<a name="line761">761: </a><font color="#B22222">/*@</font>
+<a name="line762">762: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a> - Starts a split phase norm computation.</font>
+
+<a name="line764">764: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line765">765: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line766">766: </a><font color="#B22222">.  j    - column number to be used</font>
+<a name="line767">767: </a><font color="#B22222">.  type - the norm type</font>
+<a name="line768">768: </a><font color="#B22222">-  val  - the norm</font>
+
+<a name="line770">770: </a><font color="#B22222">   Note:</font>
+<a name="line771">771: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>().</font>
+
+<a name="line773">773: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line775">775: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>()</font>
+<a name="line776">776: </a><font color="#B22222">@*/</font>
+<a name="line777">777: </a><strong><font color="#4169E1"><a name="BVNormColumnBegin"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line778">778: </a>{
+<a name="line779">779: </a>  PetscErrorCode      ierr;
+<a name="line780">780: </a>  PetscSplitReduction *sr;
+<a name="line781">781: </a>  PetscReal           lresult;
+<a name="line782">782: </a>  MPI_Comm            comm;
+<a name="line783">783: </a>  Vec                 z;
+
+<a name="line791">791: </a>  BVCheckSizes(bv,1);
+
+<a name="line793">793: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
+<a name="line794">794: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+
+<a name="line796">796: </a>  PetscLogEventBegin(BV_NormVec,bv,0,0,0);
+<a name="line797">797: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&z);
+<a name="line798">798: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line799">799: </a>    BVNorm_Begin_Private(bv,z,type,val);
+<a name="line800">800: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bv->ops->norm_begin) {
+<a name="line801">801: </a>    (*bv->ops->norm_begin)(bv,j,type,val);
+<a name="line802">802: </a>  } <font color="#4169E1">else</font> {
+<a name="line803">803: </a>    PetscObjectGetComm((PetscObject)z,&comm);
+<a name="line804">804: </a>    PetscSplitReductionGet(comm,&sr);
+<a name="line805">805: </a>    <font color="#4169E1">if</font> (sr->state != STATE_BEGIN) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,<font color="#666666">"Called before all VecxxxEnd() called"</font>);
+<a name="line806">806: </a>    <font color="#4169E1">if</font> (sr->numopsbegin >= sr->maxops) {
+<a name="line807">807: </a>      PetscSplitReductionExtend(sr);
+<a name="line808">808: </a>    }
+<a name="line809">809: </a>    sr->invecs[sr->numopsbegin] = (void*)bv;
+<a name="line810">810: </a>    (*bv->ops->norm_local)(bv,j,type,&lresult);
+<a name="line811">811: </a>    <font color="#4169E1">if</font> (type == NORM_2) lresult = lresult*lresult;
+<a name="line812">812: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (type == NORM_MAX) sr->reducetype[sr->numopsbegin] = REDUCE_MAX;
+<a name="line813">813: </a>    <font color="#4169E1">else</font> sr->reducetype[sr->numopsbegin] = REDUCE_SUM;
+<a name="line814">814: </a>    sr->lvalues[sr->numopsbegin++] = lresult;
+<a name="line815">815: </a>  }
+<a name="line816">816: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&z);
+<a name="line817">817: </a>  PetscLogEventEnd(BV_NormVec,bv,0,0,0);
+<a name="line818">818: </a>  <font color="#4169E1">return</font>(0);
+<a name="line819">819: </a>}
+
+<a name="line823">823: </a><font color="#B22222">/*@</font>
+<a name="line824">824: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a> - Ends a split phase norm computation.</font>
+
+<a name="line826">826: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line827">827: </a><font color="#B22222">+  bv   - basis vectors</font>
+<a name="line828">828: </a><font color="#B22222">.  j    - column number to be used</font>
+<a name="line829">829: </a><font color="#B22222">.  type - the norm type</font>
+<a name="line830">830: </a><font color="#B22222">-  val  - the norm</font>
+
+<a name="line832">832: </a><font color="#B22222">   Note:</font>
+<a name="line833">833: </a><font color="#B22222">   Each call to <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>() should be paired with a call to <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>().</font>
+
+<a name="line835">835: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line837">837: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVNormColumnBegin.html#BVNormColumnBegin">BVNormColumnBegin</a>(), <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>()</font>
+<a name="line838">838: </a><font color="#B22222">@*/</font>
+<a name="line839">839: </a><strong><font color="#4169E1"><a name="BVNormColumnEnd"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVNormColumnEnd.html#BVNormColumnEnd">BVNormColumnEnd</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,NormType type,PetscReal *val)</font></strong>
+<a name="line840">840: </a>{
+<a name="line841">841: </a>  PetscErrorCode      ierr;
+<a name="line842">842: </a>  PetscSplitReduction *sr;
+<a name="line843">843: </a>  MPI_Comm            comm;
+<a name="line844">844: </a>  Vec                 z;
+
+<a name="line852">852: </a>  BVCheckSizes(bv,1);
+
+<a name="line854">854: </a>  <font color="#4169E1">if</font> (type==NORM_1_AND_2) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Requested norm not available"</font>);
+
+<a name="line856">856: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&z);
+<a name="line857">857: </a>  <font color="#4169E1">if</font> (bv->matrix) { <font color="#B22222">/* non-standard inner product */</font>
+<a name="line858">858: </a>    BVNorm_End_Private(bv,z,type,val);
+<a name="line859">859: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (bv->ops->norm_end) {
+<a name="line860">860: </a>    (*bv->ops->norm_end)(bv,j,type,val);
+<a name="line861">861: </a>  } <font color="#4169E1">else</font> {
+<a name="line862">862: </a>    PetscObjectGetComm((PetscObject)z,&comm);
+<a name="line863">863: </a>    PetscSplitReductionGet(comm,&sr);
+<a name="line864">864: </a>    PetscSplitReductionEnd(sr);
+
+<a name="line866">866: </a>    <font color="#4169E1">if</font> (sr->numopsend >= sr->numopsbegin) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() more times then VecxxxBegin()"</font>);
+<a name="line867">867: </a>    <font color="#4169E1">if</font> ((void*)bv != sr->invecs[sr->numopsend]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called VecxxxEnd() in a different order or with a different vector than VecxxxBegin()"</font>);
+<a name="line868">868: </a>    <font color="#4169E1">if</font> (sr->reducetype[sr->numopsend] != REDUCE_MAX && type == NORM_MAX) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Called BVNormEnd(,NORM_MAX,) on a reduction started with VecDotBegin() or NORM_1 or NORM_2"</font>);
+<a name="line869">869: </a>    *val = PetscRealPart(sr->gvalues[sr->numopsend++]);
+<a name="line870">870: </a>    <font color="#4169E1">if</font> (type == NORM_2) *val = PetscSqrtReal(*val);
+<a name="line871">871: </a>    <font color="#4169E1">if</font> (sr->numopsend == sr->numopsbegin) {
+<a name="line872">872: </a>      sr->state       = STATE_BEGIN;
+<a name="line873">873: </a>      sr->numopsend   = 0;
+<a name="line874">874: </a>      sr->numopsbegin = 0;
+<a name="line875">875: </a>    }
+<a name="line876">876: </a>  }
+<a name="line877">877: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&z);
+<a name="line878">878: </a>  <font color="#4169E1">return</font>(0);
+<a name="line879">879: </a>}
+
+<a name="line883">883: </a><font color="#B22222">/*</font>
+<a name="line884">884: </a><font color="#B22222">  Compute Y^H*A*X: right part column by column (with MatMult) and bottom</font>
+<a name="line885">885: </a><font color="#B22222">  part row by row (with MatMultHermitianTranspose); result placed in marray[*,ldm]</font>
+<a name="line886">886: </a><font color="#B22222">*/</font>
+<a name="line887">887: </a><strong><font color="#4169E1"><a name="BVMatProject_Vec"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Vec(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)</font></strong>
+<a name="line888">888: </a>{
+<a name="line890">890: </a>  PetscInt       i,j,lx,ly,kx,ky,ulim;
+<a name="line891">891: </a>  Vec            z,f;
+
+<a name="line894">894: </a>  lx = X->l; kx = X->k;
+<a name="line895">895: </a>  ly = Y->l; ky = Y->k;
+<a name="line896">896: </a>  <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(X,&f);
+<a name="line897">897: </a>  <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
+<a name="line898">898: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&z);
+<a name="line899">899: </a>    MatMult(A,z,f);
+<a name="line900">900: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&z);
+<a name="line901">901: </a>    ulim = PetscMin(ly+(j-lx)+1,ky);
+<a name="line902">902: </a>    Y->l = 0; Y->k = ulim;
+<a name="line903">903: </a>    (*Y->ops->dotvec)(Y,f,marray+j*ldm);
+<a name="line904">904: </a>    <font color="#4169E1">if</font> (symm) {
+<a name="line905">905: </a>      <font color="#4169E1">for</font> (i=0;i<j;i++) marray[j+i*ldm] = PetscConj(marray[i+j*ldm]);
+<a name="line906">906: </a>    }
+<a name="line907">907: </a>  }
+<a name="line908">908: </a>  <font color="#4169E1">if</font> (!symm) {
+<a name="line909">909: </a>    BV_AllocateCoeffs(Y);
+<a name="line910">910: </a>    <font color="#4169E1">for</font> (j=ly;j<ky;j++) {
+<a name="line911">911: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Y,j,&z);
+<a name="line912">912: </a>      MatMultHermitianTranspose(A,z,f);
+<a name="line913">913: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Y,j,&z);
+<a name="line914">914: </a>      ulim = PetscMin(lx+(j-ly),kx);
+<a name="line915">915: </a>      X->l = 0; X->k = ulim;
+<a name="line916">916: </a>      (*X->ops->dotvec)(X,f,Y->h);
+<a name="line917">917: </a>      <font color="#4169E1">for</font> (i=0;i<ulim;i++) marray[j+i*ldm] = PetscConj(Y->h[i]);
+<a name="line918">918: </a>    }
+<a name="line919">919: </a>  }
+<a name="line920">920: </a>  VecDestroy(&f);
+<a name="line921">921: </a>  X->l = lx; X->k = kx;
+<a name="line922">922: </a>  Y->l = ly; Y->k = ky;
+<a name="line923">923: </a>  <font color="#4169E1">return</font>(0);
+<a name="line924">924: </a>}
+
+<a name="line928">928: </a><font color="#B22222">/*</font>
+<a name="line929">929: </a><font color="#B22222">  Compute Y^H*A*X= [   --   | Y0'*W1 ]</font>
+<a name="line930">930: </a><font color="#B22222">                   [ Y1'*W0 | Y1'*W1 ]</font>
+<a name="line931">931: </a><font color="#B22222">  Allocates auxiliary <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to store the result of A*X, then one <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a></font>
+<a name="line932">932: </a><font color="#B22222">  call for top-right part and another one for bottom part;</font>
+<a name="line933">933: </a><font color="#B22222">  result placed in marray[*,ldm]</font>
+<a name="line934">934: </a><font color="#B22222">*/</font>
+<a name="line935">935: </a><strong><font color="#4169E1"><a name="BVMatProject_MatMult"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm)</font></strong>
+<a name="line936">936: </a>{
+<a name="line938">938: </a>  PetscInt       j,lx,ly,kx,ky;
+<a name="line939">939: </a>  PetscScalar    *harray;
+<a name="line940">940: </a>  Mat            H;
+<a name="line941">941: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;
+
+<a name="line944">944: </a>  lx = X->l; kx = X->k;
+<a name="line945">945: </a>  ly = Y->l; ky = Y->k;
+<a name="line946">946: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicate.html#BVDuplicate">BVDuplicate</a>(X,&W);
+<a name="line947">947: </a>  X->l = 0; X->k = kx;
+<a name="line948">948: </a>  <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,W);
+
+<a name="line950">950: </a>  <font color="#B22222">/* top-right part, Y0'*AX1 */</font>
+<a name="line951">951: </a>  <font color="#4169E1">if</font> (ly>0 && lx<kx) {
+<a name="line952">952: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ly,kx,NULL,&H);
+<a name="line953">953: </a>    W->l = lx; W->k = kx;
+<a name="line954">954: </a>    Y->l = 0;  Y->k = ly;
+<a name="line955">955: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,Y,H);
+<a name="line956">956: </a>    MatDenseGetArray(H,&harray);
+<a name="line957">957: </a>    <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
+<a name="line958">958: </a>      PetscMemcpy(marray+j*ldm,harray+j*ly,ly*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line959">959: </a>    }
+<a name="line960">960: </a>    MatDenseRestoreArray(H,&harray);
+<a name="line961">961: </a>    MatDestroy(&H);
+<a name="line962">962: </a>  }
+
+<a name="line964">964: </a>  <font color="#B22222">/* bottom part, Y1'*AX */</font>
+<a name="line965">965: </a>  <font color="#4169E1">if</font> (kx>0 && ly<ky) {
+<a name="line966">966: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ky,kx,NULL,&H);
+<a name="line967">967: </a>    W->l = 0;  W->k = kx;
+<a name="line968">968: </a>    Y->l = ly; Y->k = ky;
+<a name="line969">969: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,Y,H);
+<a name="line970">970: </a>    MatDenseGetArray(H,&harray);
+<a name="line971">971: </a>    <font color="#4169E1">for</font> (j=0;j<kx;j++) {
+<a name="line972">972: </a>      PetscMemcpy(marray+j*ldm+ly,harray+j*ky+ly,(ky-ly)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line973">973: </a>    }
+<a name="line974">974: </a>    MatDenseRestoreArray(H,&harray);
+<a name="line975">975: </a>    MatDestroy(&H);
+<a name="line976">976: </a>  }
+<a name="line977">977: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&W);
+<a name="line978">978: </a>  X->l = lx; X->k = kx;
+<a name="line979">979: </a>  Y->l = ly; Y->k = ky;
+<a name="line980">980: </a>  <font color="#4169E1">return</font>(0);
+<a name="line981">981: </a>}
+
+<a name="line985">985: </a><font color="#B22222">/*</font>
+<a name="line986">986: </a><font color="#B22222">  Compute Y^H*A*X= [   --   | Y0'*W1 ]</font>
+<a name="line987">987: </a><font color="#B22222">                   [ Y1'*W0 | Y1'*W1 ]</font>
+<a name="line988">988: </a><font color="#B22222">  First stage: allocate auxiliary <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to store A*X1, one <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> for right part;</font>
+<a name="line989">989: </a><font color="#B22222">  Second stage: resize <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to accomodate A'*Y1, then call <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> for transpose of</font>
+<a name="line990">990: </a><font color="#B22222">  bottom-left part; result placed in marray[*,ldm]</font>
+<a name="line991">991: </a><font color="#B22222">*/</font>
+<a name="line992">992: </a><strong><font color="#4169E1"><a name="BVMatProject_MatMult_2"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_MatMult_2(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm,PetscBool symm)</font></strong>
+<a name="line993">993: </a>{
+<a name="line995">995: </a>  PetscInt       i,j,lx,ly,kx,ky;
+<a name="line996">996: </a>  PetscScalar    *harray;
+<a name="line997">997: </a>  Mat            H;
+<a name="line998">998: </a>  <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>             W;
+
+<a name="line1001">1001: </a>  lx = X->l; kx = X->k;
+<a name="line1002">1002: </a>  ly = Y->l; ky = Y->k;
+
+<a name="line1004">1004: </a>  <font color="#B22222">/* right part, Y'*AX1 */</font>
+<a name="line1005">1005: </a>  <a href="../../../../../docs/manualpages/BV/BVDuplicateResize.html#BVDuplicateResize">BVDuplicateResize</a>(X,kx-lx,&W);
+<a name="line1006">1006: </a>  <font color="#4169E1">if</font> (ky>0 && lx<kx) {
+<a name="line1007">1007: </a>    <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(X,A,W);
+<a name="line1008">1008: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ky,kx-lx,NULL,&H);
+<a name="line1009">1009: </a>    Y->l = 0; Y->k = ky;
+<a name="line1010">1010: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,Y,H);
+<a name="line1011">1011: </a>    MatDenseGetArray(H,&harray);
+<a name="line1012">1012: </a>    <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
+<a name="line1013">1013: </a>      PetscMemcpy(marray+j*ldm,harray+(j-lx)*ky,ky*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1014">1014: </a>    }
+<a name="line1015">1015: </a>    MatDenseRestoreArray(H,&harray);
+<a name="line1016">1016: </a>    MatDestroy(&H);
+<a name="line1017">1017: </a>  }
+
+<a name="line1019">1019: </a>  <font color="#B22222">/* bottom-left part, Y1'*AX0 */</font>
+<a name="line1020">1020: </a>  <font color="#4169E1">if</font> (lx>0 && ly<ky) {
+<a name="line1021">1021: </a>    <font color="#4169E1">if</font> (symm) {
+<a name="line1022">1022: </a>      <font color="#B22222">/* do not compute, just copy symmetric elements */</font>
+<a name="line1023">1023: </a>      <font color="#4169E1">for</font> (i=ly;i<ky;i++) {
+<a name="line1024">1024: </a>        <font color="#4169E1">for</font> (j=0;j<lx;j++) marray[i+j*ldm] = PetscConj(marray[j+i*ldm]);
+<a name="line1025">1025: </a>      }
+<a name="line1026">1026: </a>    } <font color="#4169E1">else</font> {
+<a name="line1027">1027: </a>      <a href="../../../../../docs/manualpages/BV/BVResize.html#BVResize">BVResize</a>(W,ky-ly,PETSC_FALSE);
+<a name="line1028">1028: </a>      Y->l = ly; Y->k = ky;
+<a name="line1029">1029: </a>      <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a>(Y,A,W);
+<a name="line1030">1030: </a>      MatCreateSeqDense(PETSC_COMM_SELF,lx,ky-ly,NULL,&H);
+<a name="line1031">1031: </a>      X->l = 0; X->k = lx;
+<a name="line1032">1032: </a>      <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(W,X,H);
+<a name="line1033">1033: </a>      MatDenseGetArray(H,&harray);
+<a name="line1034">1034: </a>      <font color="#4169E1">for</font> (i=0;i<ky-ly;i++) {
+<a name="line1035">1035: </a>        <font color="#4169E1">for</font> (j=0;j<lx;j++) {
+<a name="line1036">1036: </a>          marray[i+j*ldm+ly] = PetscConj(harray[j+i*(ky-ly)]);
+<a name="line1037">1037: </a>        }
+<a name="line1038">1038: </a>      }
+<a name="line1039">1039: </a>      MatDenseRestoreArray(H,&harray);
+<a name="line1040">1040: </a>      MatDestroy(&H);
+<a name="line1041">1041: </a>    }
+<a name="line1042">1042: </a>  }
+<a name="line1043">1043: </a>  <a href="../../../../../docs/manualpages/BV/BVDestroy.html#BVDestroy">BVDestroy</a>(&W);
+<a name="line1044">1044: </a>  X->l = lx; X->k = kx;
+<a name="line1045">1045: </a>  Y->l = ly; Y->k = ky;
+<a name="line1046">1046: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1047">1047: </a>}
+
+<a name="line1051">1051: </a><font color="#B22222">/*</font>
+<a name="line1052">1052: </a><font color="#B22222">  Compute Y^H*X = [   --   | Y0'*X1 ]     (X contains A*X):</font>
+<a name="line1053">1053: </a><font color="#B22222">                  [ Y1'*X0 | Y1'*X1 ]</font>
+<a name="line1054">1054: </a><font color="#B22222">  one <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> call for top-right part and another one for bottom part;</font>
+<a name="line1055">1055: </a><font color="#B22222">  result placed in marray[*,ldm]</font>
+<a name="line1056">1056: </a><font color="#B22222">*/</font>
+<a name="line1057">1057: </a><strong><font color="#4169E1"><a name="BVMatProject_Dot"></a>PETSC_STATIC_INLINE PetscErrorCode BVMatProject_Dot(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar *marray,PetscInt ldm)</font></strong>
+<a name="line1058">1058: </a>{
+<a name="line1060">1060: </a>  PetscInt       j,lx,ly,kx,ky;
+<a name="line1061">1061: </a>  PetscScalar    *harray;
+<a name="line1062">1062: </a>  Mat            H;
+
+<a name="line1065">1065: </a>  lx = X->l; kx = X->k;
+<a name="line1066">1066: </a>  ly = Y->l; ky = Y->k;
+
+<a name="line1068">1068: </a>  <font color="#B22222">/* top-right part, Y0'*X1 */</font>
+<a name="line1069">1069: </a>  <font color="#4169E1">if</font> (ly>0 && lx<kx) {
+<a name="line1070">1070: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ly,kx,NULL,&H);
+<a name="line1071">1071: </a>    X->l = lx; X->k = kx;
+<a name="line1072">1072: </a>    Y->l = 0;  Y->k = ly;
+<a name="line1073">1073: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(X,Y,H);
+<a name="line1074">1074: </a>    MatDenseGetArray(H,&harray);
+<a name="line1075">1075: </a>    <font color="#4169E1">for</font> (j=lx;j<kx;j++) {
+<a name="line1076">1076: </a>      PetscMemcpy(marray+j*ldm,harray+j*ly,ly*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1077">1077: </a>    }
+<a name="line1078">1078: </a>    MatDenseRestoreArray(H,&harray);
+<a name="line1079">1079: </a>    MatDestroy(&H);
+<a name="line1080">1080: </a>  }
+
+<a name="line1082">1082: </a>  <font color="#B22222">/* bottom part, Y1'*X */</font>
+<a name="line1083">1083: </a>  <font color="#4169E1">if</font> (kx>0 && ly<ky) {
+<a name="line1084">1084: </a>    MatCreateSeqDense(PETSC_COMM_SELF,ky,kx,NULL,&H);
+<a name="line1085">1085: </a>    X->l = 0;  X->k = kx;
+<a name="line1086">1086: </a>    Y->l = ly; Y->k = ky;
+<a name="line1087">1087: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(X,Y,H);
+<a name="line1088">1088: </a>    MatDenseGetArray(H,&harray);
+<a name="line1089">1089: </a>    <font color="#4169E1">for</font> (j=0;j<kx;j++) {
+<a name="line1090">1090: </a>      PetscMemcpy(marray+j*ldm+ly,harray+j*ky+ly,(ky-ly)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line1091">1091: </a>    }
+<a name="line1092">1092: </a>    MatDenseRestoreArray(H,&harray);
+<a name="line1093">1093: </a>    MatDestroy(&H);
+<a name="line1094">1094: </a>  }
+<a name="line1095">1095: </a>  X->l = lx; X->k = kx;
+<a name="line1096">1096: </a>  Y->l = ly; Y->k = ky;
+<a name="line1097">1097: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1098">1098: </a>}
+
+<a name="line1102">1102: </a><font color="#B22222">/*@</font>
+<a name="line1103">1103: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a> - Computes the projection of a matrix onto a subspace.</font>
+
+<a name="line1105">1105: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line1107">1107: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line1108">1108: </a><font color="#B22222">+  X - basis vectors</font>
+<a name="line1109">1109: </a><font color="#B22222">.  A - (optional) matrix to be projected</font>
+<a name="line1110">1110: </a><font color="#B22222">.  Y - left basis vectors, can be equal to X</font>
+<a name="line1111">1111: </a><font color="#B22222">-  M - Mat object where the result must be placed</font>
+
+<a name="line1113">1113: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line1114">1114: </a><font color="#B22222">.  M - the resulting matrix</font>
+
+<a name="line1116">1116: </a><font color="#B22222">   Notes:</font>
+<a name="line1117">1117: </a><font color="#B22222">   If A=NULL, then it is assumed that X already contains A*X.</font>
+
+<a name="line1119">1119: </a><font color="#B22222">   This operation is similar to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), with important differences.</font>
+<a name="line1120">1120: </a><font color="#B22222">   The goal is to compute the matrix resulting from the orthogonal projection</font>
+<a name="line1121">1121: </a><font color="#B22222">   of A onto the subspace spanned by the columns of X, M = X^H*A*X, or the</font>
+<a name="line1122">1122: </a><font color="#B22222">   oblique projection onto X along Y, M = Y^H*A*X.</font>
+
+<a name="line1124">1124: </a><font color="#B22222">   A difference with respect to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>() is that the standard inner product</font>
+<a name="line1125">1125: </a><font color="#B22222">   is always used, regardless of a non-standard inner product being specified</font>
+<a name="line1126">1126: </a><font color="#B22222">   with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>().</font>
+
+<a name="line1128">1128: </a><font color="#B22222">   On entry, M must be a sequential dense Mat with dimensions ky,kx at least,</font>
+<a name="line1129">1129: </a><font color="#B22222">   where ky (resp. kx) is the number of active columns of Y (resp. X).</font>
+<a name="line1130">1130: </a><font color="#B22222">   Another difference with respect to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>() is that all entries of M are</font>
+<a name="line1131">1131: </a><font color="#B22222">   computed except the leading ly,lx part, where ly (resp. lx) is the</font>
+<a name="line1132">1132: </a><font color="#B22222">   number of leading columns of Y (resp. X). Hence, the leading columns of</font>
+<a name="line1133">1133: </a><font color="#B22222">   X and Y participate in the computation, as opposed to <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>().</font>
+<a name="line1134">1134: </a><font color="#B22222">   The leading part of M is assumed to be already available from previous</font>
+<a name="line1135">1135: </a><font color="#B22222">   computations.</font>
+
+<a name="line1137">1137: </a><font color="#B22222">   In the orthogonal projection case, Y=X, some computation can be saved if</font>
+<a name="line1138">1138: </a><font color="#B22222">   A is real symmetric (or complex Hermitian). In order to exploit this</font>
+<a name="line1139">1139: </a><font color="#B22222">   property, the symmetry flag of A must be set with MatSetOption().</font>
+
+<a name="line1141">1141: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line1143">1143: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>()</font>
+<a name="line1144">1144: </a><font color="#B22222">@*/</font>
+<a name="line1145">1145: </a><strong><font color="#4169E1"><a name="BVMatProject"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatProject.html#BVMatProject">BVMatProject</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,Mat M)</font></strong>
+<a name="line1146">1146: </a>{
+<a name="line1148">1148: </a>  PetscBool      match,set,flg,symm=PETSC_FALSE;
+<a name="line1149">1149: </a>  PetscInt       m,n;
+<a name="line1150">1150: </a>  PetscScalar    *marray;
+<a name="line1151">1151: </a>  Mat            Xmatrix,Ymatrix;
+<a name="line1152">1152: </a>  PetscObjectId  idx,idy;
+
+<a name="line1160">1160: </a>  BVCheckSizes(X,1);
+<a name="line1161">1161: </a>  <font color="#4169E1">if</font> (A) {
+<a name="line1164">1164: </a>  }
+<a name="line1166">1166: </a>  BVCheckSizes(Y,3);
+<a name="line1169">1169: </a>  PetscObjectTypeCompare((PetscObject)M,MATSEQDENSE,&match);
+<a name="line1170">1170: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_SUP,<font color="#666666">"Matrix M must be of type seqdense"</font>);
+
+<a name="line1172">1172: </a>  MatGetSize(M,&m,&n);
+<a name="line1173">1173: </a>  <font color="#4169E1">if</font> (m<Y->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrix M has %D rows, should have at least %D"</font>,m,Y->k);
+<a name="line1174">1174: </a>  <font color="#4169E1">if</font> (n<X->k) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrix M has %D columns, should have at least %D"</font>,n,X->k);
+<a name="line1175">1175: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
+
+<a name="line1177">1177: </a>  PetscLogEventBegin(BV_MatProject,X,A,Y,0);
+<a name="line1178">1178: </a>  <font color="#B22222">/* temporarily set standard inner product */</font>
+<a name="line1179">1179: </a>  Xmatrix = X->matrix;
+<a name="line1180">1180: </a>  Ymatrix = Y->matrix;
+<a name="line1181">1181: </a>  X->matrix = Y->matrix = NULL;
+
+<a name="line1183">1183: </a>  PetscObjectGetId((PetscObject)X,&idx);
+<a name="line1184">1184: </a>  PetscObjectGetId((PetscObject)Y,&idy);
+<a name="line1185">1185: </a>  <font color="#4169E1">if</font> (!A && idx==idy) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Cannot set X=Y if A=NULL"</font>);
+
+<a name="line1187">1187: </a>  MatDenseGetArray(M,&marray);
+
+<a name="line1189">1189: </a>  <font color="#4169E1">if</font> (A && idx==idy) { <font color="#B22222">/* check symmetry of M=X'AX */</font>
+<a name="line1190">1190: </a>    MatIsHermitianKnown(A,&set,&flg);
+<a name="line1191">1191: </a>    symm = set? flg: PETSC_FALSE;
+<a name="line1192">1192: </a>  }
+
+<a name="line1194">1194: </a>  <font color="#4169E1">if</font> (A) { 
+<a name="line1195">1195: </a>    <font color="#4169E1">if</font> (X->vmm==BV_MATMULT_VECS) {
+<a name="line1196">1196: </a>      <font color="#B22222">/* perform computation column by column */</font>
+<a name="line1197">1197: </a>      BVMatProject_Vec(X,A,Y,marray,m,symm);
+<a name="line1198">1198: </a>    } <font color="#4169E1">else</font> {
+<a name="line1199">1199: </a>      <font color="#B22222">/* use <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>, then <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> */</font>
+<a name="line1200">1200: </a>      MatHasOperation(A,MATOP_MULT_TRANSPOSE,&flg);
+<a name="line1201">1201: </a>      <font color="#4169E1">if</font> (symm || (flg && X->l>=X->k/2 && Y->l>=Y->k/2)) {
+<a name="line1202">1202: </a>        BVMatProject_MatMult_2(X,A,Y,marray,m,symm);
+<a name="line1203">1203: </a>      } <font color="#4169E1">else</font> {
+<a name="line1204">1204: </a>        BVMatProject_MatMult(X,A,Y,marray,m);
+<a name="line1205">1205: </a>      }
+<a name="line1206">1206: </a>    }
+<a name="line1207">1207: </a>  } <font color="#4169E1">else</font> {
+<a name="line1208">1208: </a>    <font color="#B22222">/* use <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a> on subblocks */</font>
+<a name="line1209">1209: </a>    BVMatProject_Dot(X,Y,marray,m);
+<a name="line1210">1210: </a>  }
+
+<a name="line1212">1212: </a>  MatDenseRestoreArray(M,&marray);
+<a name="line1213">1213: </a>  PetscLogEventEnd(BV_MatProject,X,A,Y,0);
+<a name="line1214">1214: </a>  <font color="#B22222">/* restore non-standard inner product */</font>
+<a name="line1215">1215: </a>  X->matrix = Xmatrix;
+<a name="line1216">1216: </a>  Y->matrix = Ymatrix;
+<a name="line1217">1217: </a>  <font color="#4169E1">return</font>(0);
+<a name="line1218">1218: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/interface/bvops.c b/src/sys/classes/bv/interface/bvops.c
index c069548..111ab2b 100644
--- a/src/sys/classes/bv/interface/bvops.c
+++ b/src/sys/classes/bv/interface/bvops.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -33,7 +33,7 @@
    Input Parameters:
 +  Y,X        - basis vectors
 .  alpha,beta - scalars
--  Q          - a sequential dense matrix
+-  Q          - (optional) sequential dense matrix
 
    Output Parameter:
 .  Y          - the modified basis vectors
@@ -42,7 +42,9 @@
    X and Y must be different objects. The case X=Y can be addressed with
    BVMultInPlace().
 
-   The matrix Q must be a sequential dense Mat, with all entries equal on
+   If matrix Q is NULL, then an AXPY operation Y = beta*Y + alpha*X is done
+   (i.e. results as if Q = identity). If provided,
+   the matrix Q must be a sequential dense Mat, with all entries equal on
    all processes (otherwise each process will compute a different update).
    The dimensions of Q must be at least m,n where m is the number of active
    columns of X and n is the number of active columns of Y.
@@ -67,20 +69,21 @@ PetscErrorCode BVMult(BV Y,PetscScalar alpha,PetscScalar beta,BV X,Mat Q)
   PetscValidLogicalCollectiveScalar(Y,alpha,2);
   PetscValidLogicalCollectiveScalar(Y,beta,3);
   PetscValidHeaderSpecific(X,BV_CLASSID,4);
-  PetscValidHeaderSpecific(Q,MAT_CLASSID,5);
+  if (Q) PetscValidHeaderSpecific(Q,MAT_CLASSID,5);
   PetscValidType(Y,1);
   BVCheckSizes(Y,1);
   PetscValidType(X,4);
   BVCheckSizes(X,4);
-  PetscValidType(Q,5);
+  if (Q) PetscValidType(Q,5);
   PetscCheckSameTypeAndComm(Y,1,X,4);
   if (X==Y) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_WRONG,"X and Y arguments must be different");
-  ierr = PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);CHKERRQ(ierr);
-  if (!match) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_SUP,"Mat argument must be of type seqdense");
-
-  ierr = MatGetSize(Q,&m,&n);CHKERRQ(ierr);
-  if (m<X->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,"Mat argument has %D rows, should have at least %D",m,X->k);
-  if (n<Y->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,"Mat argument has %D columns, should have at least %D",n,Y->k);
+  if (Q) {
+    ierr = PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);CHKERRQ(ierr);
+    if (!match) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_SUP,"Mat argument must be of type seqdense");
+    ierr = MatGetSize(Q,&m,&n);CHKERRQ(ierr);
+    if (m<X->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,"Mat argument has %D rows, should have at least %D",m,X->k);
+    if (n<Y->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,"Mat argument has %D columns, should have at least %D",n,Y->k);
+  }
   if (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,"Mismatching local dimension X %D, Y %D",X->n,Y->n);
 
   ierr = PetscLogEventBegin(BV_Mult,X,Y,0,0);CHKERRQ(ierr);
@@ -142,9 +145,9 @@ PetscErrorCode BVMultVec(BV X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScal
   ierr = VecGetLocalSize(y,&n);CHKERRQ(ierr);
   if (N!=X->N || n!=X->n) SETERRQ4(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_INCOMP,"Vec sizes (global %D, local %D) do not match BV sizes (global %D, local %D)",N,n,X->N,X->n);
 
-  ierr = PetscLogEventBegin(BV_Mult,X,y,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_MultVec,X,y,0,0);CHKERRQ(ierr);
   ierr = (*X->ops->multvec)(X,alpha,beta,y,q);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_Mult,X,y,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_MultVec,X,y,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -192,14 +195,14 @@ PetscErrorCode BVMultColumn(BV X,PetscScalar alpha,PetscScalar beta,PetscInt j,P
   if (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,"Index j must be non-negative");
   if (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,"Index j=%D but BV only has %D columns",j,X->m);
 
-  ierr = PetscLogEventBegin(BV_Mult,X,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_MultVec,X,0,0,0);CHKERRQ(ierr);
   ksave = X->k;
   X->k = j;
   ierr = BVGetColumn(X,j,&y);CHKERRQ(ierr);
   ierr = (*X->ops->multvec)(X,alpha,beta,y,q);CHKERRQ(ierr);
   ierr = BVRestoreColumn(X,j,&y);CHKERRQ(ierr);
   X->k = ksave;
-  ierr = PetscLogEventEnd(BV_Mult,X,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_MultVec,X,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -255,9 +258,9 @@ PetscErrorCode BVMultInPlace(BV V,Mat Q,PetscInt s,PetscInt e)
   if (e>n) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,"Mat argument only has %D columns, the requested value of e is larger: %D",n,e);
   if (s>=e) PetscFunctionReturn(0);
 
-  ierr = PetscLogEventBegin(BV_Mult,V,Q,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_MultInPlace,V,Q,0,0);CHKERRQ(ierr);
   ierr = (*V->ops->multinplace)(V,Q,s,e);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_Mult,V,Q,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_MultInPlace,V,Q,0,0);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)V);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -309,9 +312,9 @@ PetscErrorCode BVMultInPlaceTranspose(BV V,Mat Q,PetscInt s,PetscInt e)
   if (e>m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,"Mat argument only has %D rows, the requested value of e is larger: %D",m,e);
   if (s>=e || !V->n) PetscFunctionReturn(0);
 
-  ierr = PetscLogEventBegin(BV_Mult,V,Q,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_MultInPlace,V,Q,0,0);CHKERRQ(ierr);
   ierr = (*V->ops->multinplacetrans)(V,Q,s,e);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_Mult,V,Q,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_MultInPlace,V,Q,0,0);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)V);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -343,10 +346,12 @@ PetscErrorCode BVScale(BV bv,PetscScalar alpha)
   PetscValidLogicalCollectiveScalar(bv,alpha,2);
   PetscValidType(bv,1);
   BVCheckSizes(bv,1);
-  if (!bv->n || alpha == (PetscScalar)1.0) PetscFunctionReturn(0);
+  if (alpha == (PetscScalar)1.0) PetscFunctionReturn(0);
 
   ierr = PetscLogEventBegin(BV_Scale,bv,0,0,0);CHKERRQ(ierr);
-  ierr = (*bv->ops->scale)(bv,-1,alpha);CHKERRQ(ierr);
+  if (bv->n) {
+    ierr = (*bv->ops->scale)(bv,-1,alpha);CHKERRQ(ierr);
+  }
   ierr = PetscLogEventEnd(BV_Scale,bv,0,0,0);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)bv);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -380,10 +385,12 @@ PetscErrorCode BVScaleColumn(BV bv,PetscInt j,PetscScalar alpha)
   BVCheckSizes(bv,1);
 
   if (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Argument j has wrong value %D, the number of columns is %D",j,bv->m);
-  if (!bv->n || alpha == (PetscScalar)1.0) PetscFunctionReturn(0);
+  if (alpha == (PetscScalar)1.0) PetscFunctionReturn(0);
 
   ierr = PetscLogEventBegin(BV_Scale,bv,0,0,0);CHKERRQ(ierr);
-  ierr = (*bv->ops->scale)(bv,j,alpha);CHKERRQ(ierr);
+  if (bv->n) {
+    ierr = (*bv->ops->scale)(bv,j,alpha);CHKERRQ(ierr);
+  }
   ierr = PetscLogEventEnd(BV_Scale,bv,0,0,0);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)bv);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -397,51 +404,45 @@ PetscErrorCode BVScaleColumn(BV bv,PetscInt j,PetscScalar alpha)
    Logically Collective on BV
 
    Input Parameters:
-+  bv   - basis vectors
--  rctx - the random number context, formed by PetscRandomCreate(), or NULL and
-          it will create one internally.
+.  bv - basis vectors
 
    Note:
    All active columns (except the leading ones) are modified.
 
    Level: advanced
 
-.seealso: BVSetRandomColumn(), BVSetActiveColumns()
+.seealso: BVSetRandomContext(), BVSetRandomColumn(), BVSetActiveColumns()
 @*/
-PetscErrorCode BVSetRandom(BV bv,PetscRandom rctx)
+PetscErrorCode BVSetRandom(BV bv)
 {
   PetscErrorCode ierr;
-  PetscRandom    rand=NULL;
   PetscInt       i,low,high,k;
   PetscScalar    *px,t;
   Vec            x;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(bv,BV_CLASSID,1);
-  if (rctx) PetscValidHeaderSpecific(rctx,PETSC_RANDOM_CLASSID,2);
-  else {
-    ierr = PetscRandomCreate(PetscObjectComm((PetscObject)bv),&rand);CHKERRQ(ierr);
-    ierr = PetscRandomSetSeed(rand,0x12345678);CHKERRQ(ierr);
-    ierr = PetscRandomSetFromOptions(rand);CHKERRQ(ierr);
-    rctx = rand;
-  }
   PetscValidType(bv,1);
   BVCheckSizes(bv,1);
 
-  ierr = PetscLogEventBegin(BV_SetRandom,bv,rctx,0,0);CHKERRQ(ierr);
+  ierr = BVGetRandomContext(bv,&bv->rand);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_SetRandom,bv,0,0,0);CHKERRQ(ierr);
   for (k=bv->l;k<bv->k;k++) {
     ierr = BVGetColumn(bv,k,&x);CHKERRQ(ierr);
-    ierr = VecGetOwnershipRange(x,&low,&high);CHKERRQ(ierr);
-    ierr = VecGetArray(x,&px);CHKERRQ(ierr);
-    for (i=0;i<bv->N;i++) {
-      ierr = PetscRandomGetValue(rctx,&t);CHKERRQ(ierr);
-      if (i>=low && i<high) px[i-low] = t;
+    if (bv->rrandom) {  /* generate the same vector irrespective of number of processes */
+      ierr = VecGetOwnershipRange(x,&low,&high);CHKERRQ(ierr);
+      ierr = VecGetArray(x,&px);CHKERRQ(ierr);
+      for (i=0;i<bv->N;i++) {
+        ierr = PetscRandomGetValue(bv->rand,&t);CHKERRQ(ierr);
+        if (i>=low && i<high) px[i-low] = t;
+      }
+      ierr = VecRestoreArray(x,&px);CHKERRQ(ierr);
+    } else {
+      ierr = VecSetRandom(x,bv->rand);CHKERRQ(ierr);
     }
-    ierr = VecRestoreArray(x,&px);CHKERRQ(ierr);
     ierr = BVRestoreColumn(bv,k,&x);CHKERRQ(ierr);
   }
-  ierr = PetscLogEventEnd(BV_SetRandom,bv,rctx,0,0);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&rand);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_SetRandom,bv,0,0,0);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)bv);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -454,25 +455,16 @@ PetscErrorCode BVSetRandom(BV bv,PetscRandom rctx)
    Logically Collective on BV
 
    Input Parameters:
-+  bv   - basis vectors
-.  j    - column number to be set
--  rctx - the random number context, formed by PetscRandomCreate(), or NULL and
-          it will create one internally.
-
-   Note:
-   This operation is analogue to VecSetRandom - the difference is that the
-   generated random vector is the same irrespective of the size of the
-   communicator (if all processes pass a PetscRandom context initialized
-   with the same seed).
++  bv - basis vectors
+-  j  - column number to be set
 
    Level: advanced
 
-.seealso: BVSetRandom(), BVSetActiveColumns()
+.seealso: BVSetRandomContext(), BVSetRandom(), BVSetActiveColumns()
 @*/
-PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j,PetscRandom rctx)
+PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j)
 {
   PetscErrorCode ierr;
-  PetscRandom    rand=NULL;
   PetscInt       i,low,high;
   PetscScalar    *px,t;
   Vec            x;
@@ -480,29 +472,26 @@ PetscErrorCode BVSetRandomColumn(BV bv,PetscInt j,PetscRandom rctx)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(bv,BV_CLASSID,1);
   PetscValidLogicalCollectiveInt(bv,j,2);
-  if (rctx) PetscValidHeaderSpecific(rctx,PETSC_RANDOM_CLASSID,3);
-  else {
-    ierr = PetscRandomCreate(PetscObjectComm((PetscObject)bv),&rand);CHKERRQ(ierr);
-    ierr = PetscRandomSetSeed(rand,0x12345678);CHKERRQ(ierr);
-    ierr = PetscRandomSetFromOptions(rand);CHKERRQ(ierr);
-    rctx = rand;
-  }
   PetscValidType(bv,1);
   BVCheckSizes(bv,1);
   if (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Argument j has wrong value %D, the number of columns is %D",j,bv->m);
 
-  ierr = PetscLogEventBegin(BV_SetRandom,bv,rctx,0,0);CHKERRQ(ierr);
+  ierr = BVGetRandomContext(bv,&bv->rand);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_SetRandom,bv,0,0,0);CHKERRQ(ierr);
   ierr = BVGetColumn(bv,j,&x);CHKERRQ(ierr);
-  ierr = VecGetOwnershipRange(x,&low,&high);CHKERRQ(ierr);
-  ierr = VecGetArray(x,&px);CHKERRQ(ierr);
-  for (i=0;i<bv->N;i++) {
-    ierr = PetscRandomGetValue(rctx,&t);CHKERRQ(ierr);
-    if (i>=low && i<high) px[i-low] = t;
+  if (bv->rrandom) {  /* generate the same vector irrespective of number of processes */
+    ierr = VecGetOwnershipRange(x,&low,&high);CHKERRQ(ierr);
+    ierr = VecGetArray(x,&px);CHKERRQ(ierr);
+    for (i=0;i<bv->N;i++) {
+      ierr = PetscRandomGetValue(bv->rand,&t);CHKERRQ(ierr);
+      if (i>=low && i<high) px[i-low] = t;
+    }
+    ierr = VecRestoreArray(x,&px);CHKERRQ(ierr);
+  } else {
+    ierr = VecSetRandom(x,bv->rand);CHKERRQ(ierr);
   }
-  ierr = VecRestoreArray(x,&px);CHKERRQ(ierr);
   ierr = BVRestoreColumn(bv,j,&x);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_SetRandom,bv,rctx,0,0);CHKERRQ(ierr);
-  ierr = PetscRandomDestroy(&rand);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_SetRandom,bv,0,0,0);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)bv);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -650,61 +639,13 @@ PetscErrorCode BVMatMultColumn(BV V,Mat A,PetscInt j)
   if (j<0) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,"Index j must be non-negative");
   if (j+1>=V->m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,"Result should go in index j+1=%D but BV only has %D columns",j+1,V->m);
 
-  ierr = PetscLogEventBegin(BV_MatMult,V,A,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_MatMultVec,V,A,0,0);CHKERRQ(ierr);
   ierr = BVGetColumn(V,j,&vj);CHKERRQ(ierr);
   ierr = BVGetColumn(V,j+1,&vj1);CHKERRQ(ierr);
   ierr = MatMult(A,vj,vj1);CHKERRQ(ierr);
   ierr = BVRestoreColumn(V,j,&vj);CHKERRQ(ierr);
   ierr = BVRestoreColumn(V,j+1,&vj1);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_MatMult,V,A,0,0);CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef __FUNCT__
-#define __FUNCT__ "BVAXPY"
-/*@C
-   BVAXPY - Computes Y = Y + alpha*X.
-
-   Logically Collective on BV
-
-   Input Parameters:
-+  Y,X   - basis vectors
--  alpha - scalar
-
-   Output Parameter:
-.  Y     - the modified basis vectors
-
-   Notes:
-   X and Y must be different objects, with compatible dimensions.
-   The effect is the same as doing a VecAXPY for each of the active
-   columns (excluding the leading ones).
-
-   Level: intermediate
-
-.seealso: BVMult(), BVSetActiveColumns()
-@*/
-PetscErrorCode BVAXPY(BV Y,PetscScalar alpha,BV X)
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  PetscValidHeaderSpecific(Y,BV_CLASSID,1);
-  PetscValidLogicalCollectiveScalar(Y,alpha,2);
-  PetscValidHeaderSpecific(X,BV_CLASSID,3);
-  PetscValidType(Y,1);
-  BVCheckSizes(Y,1);
-  PetscValidType(X,3);
-  BVCheckSizes(X,3);
-  PetscCheckSameTypeAndComm(Y,1,X,3);
-  if (X==Y) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_WRONG,"X and Y arguments must be different");
-  if (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,"Mismatching local dimension X %D, Y %D",X->n,Y->n);
-  if (X->k-X->l!=Y->k-Y->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,"Y has %D non-leading columns, while X has %D",Y->m-Y->l,X->k-X->l);
-  if (!X->n) PetscFunctionReturn(0);
-
-  ierr = PetscLogEventBegin(BV_AXPY,X,Y,0,0);CHKERRQ(ierr);
-  ierr = (*Y->ops->axpy)(Y,alpha,X);CHKERRQ(ierr);
-  ierr = PetscLogEventEnd(BV_AXPY,X,Y,0,0);CHKERRQ(ierr);
-  ierr = PetscObjectStateIncrease((PetscObject)Y);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_MatMultVec,V,A,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/bv/interface/bvops.c.html b/src/sys/classes/bv/interface/bvops.c.html
index bf27b4d..9a5d493 100644
--- a/src/sys/classes/bv/interface/bvops.c.html
+++ b/src/sys/classes/bv/interface/bvops.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvops.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:22+00:00">
+<meta name="date" content="2016-05-16T10:32:15+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvops.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvops.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> operations, except those involving global communication.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -43,7 +43,7 @@
 <a name="line33"> 33: </a><font color="#B22222">   Input Parameters:</font>
 <a name="line34"> 34: </a><font color="#B22222">+  Y,X        - basis vectors</font>
 <a name="line35"> 35: </a><font color="#B22222">.  alpha,beta - scalars</font>
-<a name="line36"> 36: </a><font color="#B22222">-  Q          - a sequential dense matrix</font>
+<a name="line36"> 36: </a><font color="#B22222">-  Q          - (optional) sequential dense matrix</font>
 
 <a name="line38"> 38: </a><font color="#B22222">   Output Parameter:</font>
 <a name="line39"> 39: </a><font color="#B22222">.  Y          - the modified basis vectors</font>
@@ -52,546 +52,499 @@
 <a name="line42"> 42: </a><font color="#B22222">   X and Y must be different objects. The case X=Y can be addressed with</font>
 <a name="line43"> 43: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>().</font>
 
-<a name="line45"> 45: </a><font color="#B22222">   The matrix Q must be a sequential dense Mat, with all entries equal on</font>
-<a name="line46"> 46: </a><font color="#B22222">   all processes (otherwise each process will compute a different update).</font>
-<a name="line47"> 47: </a><font color="#B22222">   The dimensions of Q must be at least m,n where m is the number of active</font>
-<a name="line48"> 48: </a><font color="#B22222">   columns of X and n is the number of active columns of Y.</font>
-
-<a name="line50"> 50: </a><font color="#B22222">   The leading columns of Y are not modified. Also, if X has leading</font>
-<a name="line51"> 51: </a><font color="#B22222">   columns specified, then these columns do not participate in the computation.</font>
-<a name="line52"> 52: </a><font color="#B22222">   Hence, only rows (resp. columns) of Q starting from lx (resp. ly) are used,</font>
-<a name="line53"> 53: </a><font color="#B22222">   where lx (resp. ly) is the number of leading columns of X (resp. Y).</font>
-
-<a name="line55"> 55: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line57"> 57: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(), <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line58"> 58: </a><font color="#B22222">@*/</font>
-<a name="line59"> 59: </a><strong><font color="#4169E1"><a name="BVMult"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,PetscScalar beta,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat Q)</font></strong>
-<a name="line60"> 60: </a>{
-<a name="line62"> 62: </a>  PetscBool      match;
-<a name="line63"> 63: </a>  PetscInt       m,n;
-
-<a name="line72"> 72: </a>  BVCheckSizes(Y,1);
-<a name="line74"> 74: </a>  BVCheckSizes(X,4);
-<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (X==Y) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_WRONG,<font color="#666666">"X and Y arguments must be different"</font>);
-<a name="line78"> 78: </a>  PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);
-<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
-
-<a name="line81"> 81: </a>  MatGetSize(Q,&m,&n);
-<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (m<X->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D rows, should have at least %D"</font>,m,X->k);
-<a name="line83"> 83: </a>  <font color="#4169E1">if</font> (n<Y->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D columns, should have at least %D"</font>,n,Y->k);
-<a name="line84"> 84: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
-
-<a name="line86"> 86: </a>  PetscLogEventBegin(BV_Mult,X,Y,0,0);
-<a name="line87"> 87: </a>  (*Y->ops->mult)(Y,alpha,beta,X,Q);
-<a name="line88"> 88: </a>  PetscLogEventEnd(BV_Mult,X,Y,0,0);
-<a name="line89"> 89: </a>  PetscObjectStateIncrease((PetscObject)Y);
-<a name="line90"> 90: </a>  <font color="#4169E1">return</font>(0);
-<a name="line91"> 91: </a>}
-
-<a name="line95"> 95: </a><font color="#B22222">/*@</font>
-<a name="line96"> 96: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a> - Computes y = beta*y + alpha*X*q.</font>
-
-<a name="line98"> 98: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and Vec</font>
-
-<a name="line100">100: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line101">101: </a><font color="#B22222">+  X          - a basis vectors object</font>
-<a name="line102">102: </a><font color="#B22222">.  alpha,beta - scalars</font>
-<a name="line103">103: </a><font color="#B22222">.  y          - a vector</font>
-<a name="line104">104: </a><font color="#B22222">-  q          - an array of scalars</font>
-
-<a name="line106">106: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line107">107: </a><font color="#B22222">.  y          - the modified vector</font>
-
-<a name="line109">109: </a><font color="#B22222">   Notes:</font>
-<a name="line110">110: </a><font color="#B22222">   This operation is the analogue of <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>() but with a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and a Vec,</font>
-<a name="line111">111: </a><font color="#B22222">   instead of two <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>. Note that arguments are listed in different order</font>
-<a name="line112">112: </a><font color="#B22222">   with respect to <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>().</font>
-
-<a name="line114">114: </a><font color="#B22222">   If X has leading columns specified, then these columns do not participate</font>
-<a name="line115">115: </a><font color="#B22222">   in the computation.</font>
-
-<a name="line117">117: </a><font color="#B22222">   The length of array q must be equal to the number of active columns of X</font>
-<a name="line118">118: </a><font color="#B22222">   minus the number of leading columns, i.e. the first entry of q multiplies</font>
-<a name="line119">119: </a><font color="#B22222">   the first non-leading column.</font>
-
-<a name="line121">121: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line123">123: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line124">124: </a><font color="#B22222">@*/</font>
-<a name="line125">125: </a><strong><font color="#4169E1"><a name="BVMultVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
-<a name="line126">126: </a>{
-<a name="line128">128: </a>  PetscInt       n,N;
-
-<a name="line137">137: </a>  BVCheckSizes(X,1);
-
-<a name="line141">141: </a>  VecGetSize(y,&N);
-<a name="line142">142: </a>  VecGetLocalSize(y,&n);
-<a name="line143">143: </a>  <font color="#4169E1">if</font> (N!=X->N || n!=X->n) SETERRQ4(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,X->N,X->n);
-
-<a name="line145">145: </a>  PetscLogEventBegin(BV_Mult,X,y,0,0);
-<a name="line146">146: </a>  (*X->ops->multvec)(X,alpha,beta,y,q);
-<a name="line147">147: </a>  PetscLogEventEnd(BV_Mult,X,y,0,0);
-<a name="line148">148: </a>  <font color="#4169E1">return</font>(0);
-<a name="line149">149: </a>}
-
-<a name="line153">153: </a><font color="#B22222">/*@</font>
-<a name="line154">154: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a> - Computes y = beta*y + alpha*X*q, where y is the j-th column</font>
-<a name="line155">155: </a><font color="#B22222">   of X.</font>
-
-<a name="line157">157: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line159">159: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line160">160: </a><font color="#B22222">+  X          - a basis vectors object</font>
-<a name="line161">161: </a><font color="#B22222">.  alpha,beta - scalars</font>
-<a name="line162">162: </a><font color="#B22222">.  j          - the column index</font>
-<a name="line163">163: </a><font color="#B22222">-  q          - an array of scalars</font>
-
-<a name="line165">165: </a><font color="#B22222">   Notes:</font>
-<a name="line166">166: </a><font color="#B22222">   This operation is equivalent to <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>() but it uses column j of X</font>
-<a name="line167">167: </a><font color="#B22222">   rather than taking a Vec as an argument. The number of active columns of</font>
-<a name="line168">168: </a><font color="#B22222">   X is set to j before the computation, and restored afterwards.</font>
-<a name="line169">169: </a><font color="#B22222">   If X has leading columns specified, then these columns do not participate</font>
-<a name="line170">170: </a><font color="#B22222">   in the computation. Therefore, the length of array q must be equal to j</font>
-<a name="line171">171: </a><font color="#B22222">   minus the number of leading columns.</font>
-
-<a name="line173">173: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line175">175: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line176">176: </a><font color="#B22222">@*/</font>
-<a name="line177">177: </a><strong><font color="#4169E1"><a name="BVMultColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,PetscInt j,PetscScalar *q)</font></strong>
-<a name="line178">178: </a>{
-<a name="line180">180: </a>  PetscInt       ksave;
-<a name="line181">181: </a>  Vec            y;
-
-<a name="line190">190: </a>  BVCheckSizes(X,1);
-
-<a name="line192">192: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line193">193: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
-
-<a name="line195">195: </a>  PetscLogEventBegin(BV_Mult,X,0,0,0);
-<a name="line196">196: </a>  ksave = X->k;
-<a name="line197">197: </a>  X->k = j;
-<a name="line198">198: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
-<a name="line199">199: </a>  (*X->ops->multvec)(X,alpha,beta,y,q);
-<a name="line200">200: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
-<a name="line201">201: </a>  X->k = ksave;
-<a name="line202">202: </a>  PetscLogEventEnd(BV_Mult,X,0,0,0);
-<a name="line203">203: </a>  <font color="#4169E1">return</font>(0);
-<a name="line204">204: </a>}
-
-<a name="line208">208: </a><font color="#B22222">/*@</font>
-<a name="line209">209: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> - Update a set of vectors as V(:,s:e-1) = V*Q(:,s:e-1).</font>
-
-<a name="line211">211: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line213">213: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line214">214: </a><font color="#B22222">+  Q - a sequential dense matrix</font>
-<a name="line215">215: </a><font color="#B22222">.  s - first column of V to be overwritten</font>
-<a name="line216">216: </a><font color="#B22222">-  e - first column of V not to be overwritten</font>
-
-<a name="line218">218: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line219">219: </a><font color="#B22222">+  V - basis vectors</font>
-
-<a name="line221">221: </a><font color="#B22222">   Notes:</font>
-<a name="line222">222: </a><font color="#B22222">   The matrix Q must be a sequential dense Mat, with all entries equal on</font>
-<a name="line223">223: </a><font color="#B22222">   all processes (otherwise each process will compute a different update).</font>
-
-<a name="line225">225: </a><font color="#B22222">   This function computes V(:,s:e-1) = V*Q(:,s:e-1), that is, given a set of</font>
-<a name="line226">226: </a><font color="#B22222">   vectors V, columns from s to e-1 are overwritten with columns from s to</font>
-<a name="line227">227: </a><font color="#B22222">   e-1 of the matrix-matrix product V*Q. Only columns s to e-1 of Q are</font>
-<a name="line228">228: </a><font color="#B22222">   referenced.</font>
-
-<a name="line230">230: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line232">232: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line233">233: </a><font color="#B22222">@*/</font>
-<a name="line234">234: </a><strong><font color="#4169E1"><a name="BVMultInPlace"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line235">235: </a>{
-<a name="line237">237: </a>  PetscBool      match;
-<a name="line238">238: </a>  PetscInt       m,n;
-
-<a name="line246">246: </a>  BVCheckSizes(V,1);
-<a name="line248">248: </a>  PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);
-<a name="line249">249: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
-
-<a name="line251">251: </a>  <font color="#4169E1">if</font> (s<V->l || s>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument s has wrong value %D, should be between %D and %D"</font>,s,V->l,V->m);
-<a name="line252">252: </a>  <font color="#4169E1">if</font> (e<V->l || e>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument e has wrong value %D, should be between %D and %D"</font>,e,V->l,V->m);
-<a name="line253">253: </a>  MatGetSize(Q,&m,&n);
-<a name="line254">254: </a>  <font color="#4169E1">if</font> (m<V->k) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D rows, should have at least %D"</font>,m,V->k);
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (e>n) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument only has %D columns, the requested value of e is larger: %D"</font>,n,e);
-<a name="line256">256: </a>  <font color="#4169E1">if</font> (s>=e) <font color="#4169E1">return</font>(0);
-
-<a name="line258">258: </a>  PetscLogEventBegin(BV_Mult,V,Q,0,0);
-<a name="line259">259: </a>  (*V->ops->multinplace)(V,Q,s,e);
-<a name="line260">260: </a>  PetscLogEventEnd(BV_Mult,V,Q,0,0);
-<a name="line261">261: </a>  PetscObjectStateIncrease((PetscObject)V);
-<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
-<a name="line263">263: </a>}
-
-<a name="line267">267: </a><font color="#B22222">/*@</font>
-<a name="line268">268: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a> - Update a set of vectors as V(:,s:e-1) = V*Q'(:,s:e-1).</font>
-
-<a name="line270">270: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line272">272: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line273">273: </a><font color="#B22222">+  Q - a sequential dense matrix</font>
-<a name="line274">274: </a><font color="#B22222">.  s - first column of V to be overwritten</font>
-<a name="line275">275: </a><font color="#B22222">-  e - first column of V not to be overwritten</font>
-
-<a name="line277">277: </a><font color="#B22222">   Input/Output Parameter:</font>
-<a name="line278">278: </a><font color="#B22222">+  V - basis vectors</font>
-
-<a name="line280">280: </a><font color="#B22222">   Notes:</font>
-<a name="line281">281: </a><font color="#B22222">   This is a variant of <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>() where the conjugate transpose</font>
-<a name="line282">282: </a><font color="#B22222">   of Q is used.</font>
-
-<a name="line284">284: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line286">286: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>()</font>
-<a name="line287">287: </a><font color="#B22222">@*/</font>
-<a name="line288">288: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
-<a name="line289">289: </a>{
-<a name="line291">291: </a>  PetscBool      match;
-<a name="line292">292: </a>  PetscInt       m,n;
-
-<a name="line300">300: </a>  BVCheckSizes(V,1);
-<a name="line302">302: </a>  PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);
-<a name="line303">303: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
-
-<a name="line305">305: </a>  <font color="#4169E1">if</font> (s<V->l || s>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument s has wrong value %D, should be between %D and %D"</font>,s,V->l,V->m);
-<a name="line306">306: </a>  <font color="#4169E1">if</font> (e<V->l || e>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument e has wrong value %D, should be between %D and %D"</font>,e,V->l,V->m);
-<a name="line307">307: </a>  MatGetSize(Q,&m,&n);
-<a name="line308">308: </a>  <font color="#4169E1">if</font> (n<V->k) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D columns, should have at least %D"</font>,n,V->k);
-<a name="line309">309: </a>  <font color="#4169E1">if</font> (e>m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument only has %D rows, the requested value of e is larger: %D"</font>,m,e);
-<a name="line310">310: </a>  <font color="#4169E1">if</font> (s>=e || !V->n) <font color="#4169E1">return</font>(0);
-
-<a name="line312">312: </a>  PetscLogEventBegin(BV_Mult,V,Q,0,0);
-<a name="line313">313: </a>  (*V->ops->multinplacetrans)(V,Q,s,e);
-<a name="line314">314: </a>  PetscLogEventEnd(BV_Mult,V,Q,0,0);
-<a name="line315">315: </a>  PetscObjectStateIncrease((PetscObject)V);
-<a name="line316">316: </a>  <font color="#4169E1">return</font>(0);
-<a name="line317">317: </a>}
-
-<a name="line321">321: </a><font color="#B22222">/*@</font>
-<a name="line322">322: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a> - Multiply the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> entries by a scalar value.</font>
-
-<a name="line324">324: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line326">326: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line327">327: </a><font color="#B22222">+  bv    - basis vectors</font>
-<a name="line328">328: </a><font color="#B22222">-  alpha - scaling factor</font>
-
-<a name="line330">330: </a><font color="#B22222">   Note:</font>
-<a name="line331">331: </a><font color="#B22222">   All active columns (except the leading ones) are scaled.</font>
-
-<a name="line333">333: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line335">335: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line336">336: </a><font color="#B22222">@*/</font>
-<a name="line337">337: </a><strong><font color="#4169E1"><a name="BVScale"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar alpha)</font></strong>
-<a name="line338">338: </a>{
-
-<a name="line345">345: </a>  BVCheckSizes(bv,1);
-<a name="line346">346: </a>  <font color="#4169E1">if</font> (!bv->n || alpha == (PetscScalar)1.0) <font color="#4169E1">return</font>(0);
-
-<a name="line348">348: </a>  PetscLogEventBegin(BV_Scale,bv,0,0,0);
-<a name="line349">349: </a>  (*bv->ops->scale)(bv,-1,alpha);
-<a name="line350">350: </a>  PetscLogEventEnd(BV_Scale,bv,0,0,0);
-<a name="line351">351: </a>  PetscObjectStateIncrease((PetscObject)bv);
-<a name="line352">352: </a>  <font color="#4169E1">return</font>(0);
-<a name="line353">353: </a>}
-
-<a name="line357">357: </a><font color="#B22222">/*@</font>
-<a name="line358">358: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a> - Scale one column of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
-
-<a name="line360">360: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line362">362: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line363">363: </a><font color="#B22222">+  bv    - basis vectors</font>
-<a name="line364">364: </a><font color="#B22222">.  j     - column number to be scaled</font>
-<a name="line365">365: </a><font color="#B22222">-  alpha - scaling factor</font>
-
-<a name="line367">367: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line369">369: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line370">370: </a><font color="#B22222">@*/</font>
-<a name="line371">371: </a><strong><font color="#4169E1"><a name="BVScaleColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
-<a name="line372">372: </a>{
-
-<a name="line380">380: </a>  BVCheckSizes(bv,1);
-
-<a name="line382">382: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
-<a name="line383">383: </a>  <font color="#4169E1">if</font> (!bv->n || alpha == (PetscScalar)1.0) <font color="#4169E1">return</font>(0);
-
-<a name="line385">385: </a>  PetscLogEventBegin(BV_Scale,bv,0,0,0);
-<a name="line386">386: </a>  (*bv->ops->scale)(bv,j,alpha);
-<a name="line387">387: </a>  PetscLogEventEnd(BV_Scale,bv,0,0,0);
-<a name="line388">388: </a>  PetscObjectStateIncrease((PetscObject)bv);
-<a name="line389">389: </a>  <font color="#4169E1">return</font>(0);
-<a name="line390">390: </a>}
-
-<a name="line394">394: </a><font color="#B22222">/*@</font>
-<a name="line395">395: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a> - Set the columns of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to random numbers.</font>
-
-<a name="line397">397: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line399">399: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line400">400: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line401">401: </a><font color="#B22222">-  rctx - the random number context, formed by PetscRandomCreate(), or NULL and</font>
-<a name="line402">402: </a><font color="#B22222">          it will create one internally.</font>
-
-<a name="line404">404: </a><font color="#B22222">   Note:</font>
-<a name="line405">405: </a><font color="#B22222">   All active columns (except the leading ones) are modified.</font>
-
-<a name="line407">407: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line409">409: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line410">410: </a><font color="#B22222">@*/</font>
-<a name="line411">411: </a><strong><font color="#4169E1"><a name="BVSetRandom"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscRandom rctx)</font></strong>
-<a name="line412">412: </a>{
-<a name="line414">414: </a>  PetscRandom    rand=NULL;
-<a name="line415">415: </a>  PetscInt       i,low,high,k;
-<a name="line416">416: </a>  PetscScalar    *px,t;
-<a name="line417">417: </a>  Vec            x;
-
-<a name="line422">422: </a>  <font color="#4169E1">else</font> {
-<a name="line423">423: </a>    PetscRandomCreate(PetscObjectComm((PetscObject)bv),&rand);
-<a name="line424">424: </a>    PetscRandomSetSeed(rand,0x12345678);
-<a name="line425">425: </a>    PetscRandomSetFromOptions(rand);
-<a name="line426">426: </a>    rctx = rand;
-<a name="line427">427: </a>  }
-<a name="line429">429: </a>  BVCheckSizes(bv,1);
-
-<a name="line431">431: </a>  PetscLogEventBegin(BV_SetRandom,bv,rctx,0,0);
-<a name="line432">432: </a>  <font color="#4169E1">for</font> (k=bv->l;k<bv->k;k++) {
-<a name="line433">433: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,k,&x);
-<a name="line434">434: </a>    VecGetOwnershipRange(x,&low,&high);
-<a name="line435">435: </a>    VecGetArray(x,&px);
-<a name="line436">436: </a>    <font color="#4169E1">for</font> (i=0;i<bv->N;i++) {
-<a name="line437">437: </a>      PetscRandomGetValue(rctx,&t);
-<a name="line438">438: </a>      <font color="#4169E1">if</font> (i>=low && i<high) px[i-low] = t;
-<a name="line439">439: </a>    }
-<a name="line440">440: </a>    VecRestoreArray(x,&px);
-<a name="line441">441: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,k,&x);
-<a name="line442">442: </a>  }
-<a name="line443">443: </a>  PetscLogEventEnd(BV_SetRandom,bv,rctx,0,0);
-<a name="line444">444: </a>  PetscRandomDestroy(&rand);
-<a name="line445">445: </a>  PetscObjectStateIncrease((PetscObject)bv);
-<a name="line446">446: </a>  <font color="#4169E1">return</font>(0);
-<a name="line447">447: </a>}
-
-<a name="line451">451: </a><font color="#B22222">/*@</font>
-<a name="line452">452: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a> - Set one column of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to random numbers.</font>
-
-<a name="line454">454: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line456">456: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line457">457: </a><font color="#B22222">+  bv   - basis vectors</font>
-<a name="line458">458: </a><font color="#B22222">.  j    - column number to be set</font>
-<a name="line459">459: </a><font color="#B22222">-  rctx - the random number context, formed by PetscRandomCreate(), or NULL and</font>
-<a name="line460">460: </a><font color="#B22222">          it will create one internally.</font>
-
-<a name="line462">462: </a><font color="#B22222">   Note:</font>
-<a name="line463">463: </a><font color="#B22222">   This operation is analogue to VecSetRandom - the difference is that the</font>
-<a name="line464">464: </a><font color="#B22222">   generated random vector is the same irrespective of the size of the</font>
-<a name="line465">465: </a><font color="#B22222">   communicator (if all processes pass a PetscRandom context initialized</font>
-<a name="line466">466: </a><font color="#B22222">   with the same seed).</font>
-
-<a name="line468">468: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line470">470: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line471">471: </a><font color="#B22222">@*/</font>
-<a name="line472">472: </a><strong><font color="#4169E1"><a name="BVSetRandomColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscRandom rctx)</font></strong>
-<a name="line473">473: </a>{
-<a name="line475">475: </a>  PetscRandom    rand=NULL;
-<a name="line476">476: </a>  PetscInt       i,low,high;
-<a name="line477">477: </a>  PetscScalar    *px,t;
-<a name="line478">478: </a>  Vec            x;
-
-<a name="line484">484: </a>  <font color="#4169E1">else</font> {
-<a name="line485">485: </a>    PetscRandomCreate(PetscObjectComm((PetscObject)bv),&rand);
-<a name="line486">486: </a>    PetscRandomSetSeed(rand,0x12345678);
-<a name="line487">487: </a>    PetscRandomSetFromOptions(rand);
-<a name="line488">488: </a>    rctx = rand;
-<a name="line489">489: </a>  }
-<a name="line491">491: </a>  BVCheckSizes(bv,1);
-<a name="line492">492: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
-
-<a name="line494">494: </a>  PetscLogEventBegin(BV_SetRandom,bv,rctx,0,0);
-<a name="line495">495: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&x);
-<a name="line496">496: </a>  VecGetOwnershipRange(x,&low,&high);
-<a name="line497">497: </a>  VecGetArray(x,&px);
-<a name="line498">498: </a>  <font color="#4169E1">for</font> (i=0;i<bv->N;i++) {
-<a name="line499">499: </a>    PetscRandomGetValue(rctx,&t);
-<a name="line500">500: </a>    <font color="#4169E1">if</font> (i>=low && i<high) px[i-low] = t;
-<a name="line501">501: </a>  }
-<a name="line502">502: </a>  VecRestoreArray(x,&px);
-<a name="line503">503: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&x);
-<a name="line504">504: </a>  PetscLogEventEnd(BV_SetRandom,bv,rctx,0,0);
-<a name="line505">505: </a>  PetscRandomDestroy(&rand);
-<a name="line506">506: </a>  PetscObjectStateIncrease((PetscObject)bv);
-<a name="line507">507: </a>  <font color="#4169E1">return</font>(0);
-<a name="line508">508: </a>}
-
-<a name="line512">512: </a><font color="#B22222">/*@</font>
-<a name="line513">513: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a> - Computes the matrix-vector product for each column, Y=A*V.</font>
-
-<a name="line515">515: </a><font color="#B22222">   Neighbor-wise Collective on Mat and <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line517">517: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line518">518: </a><font color="#B22222">+  V - basis vectors context</font>
-<a name="line519">519: </a><font color="#B22222">-  A - the matrix</font>
-
-<a name="line521">521: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line522">522: </a><font color="#B22222">.  Y - the result</font>
-
-<a name="line524">524: </a><font color="#B22222">   Note:</font>
-<a name="line525">525: </a><font color="#B22222">   Both V and Y must be distributed in the same manner. Only active columns</font>
-<a name="line526">526: </a><font color="#B22222">   (excluding the leading ones) are processed.</font>
-<a name="line527">527: </a><font color="#B22222">   In the result Y, columns are overwritten starting from the leading ones.</font>
-
-<a name="line529">529: </a><font color="#B22222">   It is possible to choose whether the computation is done column by column</font>
-<a name="line530">530: </a><font color="#B22222">   or as a Mat-Mat product, see <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>().</font>
-
-<a name="line532">532: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line534">534: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a [...]
-<a name="line535">535: </a><font color="#B22222">@*/</font>
-<a name="line536">536: </a><strong><font color="#4169E1"><a name="BVMatMult"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y)</font></strong>
-<a name="line537">537: </a>{
-
-<a name="line543">543: </a>  BVCheckSizes(V,1);
-<a name="line548">548: </a>  BVCheckSizes(Y,3);
-<a name="line551">551: </a>  <font color="#4169E1">if</font> (V->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension V %D, Y %D"</font>,V->n,Y->n);
-<a name="line552">552: </a>  <font color="#4169E1">if</font> (V->k-V->l>Y->m-Y->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"Y has %D non-leading columns, not enough to store %D columns"</font>,Y->m-Y->l,V->k-V->l);
-
-<a name="line554">554: </a>  PetscLogEventBegin(BV_MatMult,V,A,Y,0);
-<a name="line555">555: </a>  (*V->ops->matmult)(V,A,Y);
-<a name="line556">556: </a>  PetscLogEventEnd(BV_MatMult,V,A,Y,0);
-<a name="line557">557: </a>  <font color="#4169E1">return</font>(0);
-<a name="line558">558: </a>}
-
-<a name="line562">562: </a><font color="#B22222">/*@</font>
-<a name="line563">563: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a> - Computes the matrix-vector product with the</font>
-<a name="line564">564: </a><font color="#B22222">   conjugate transpose of a matrix for each column, Y=A^H*V.</font>
-
-<a name="line566">566: </a><font color="#B22222">   Neighbor-wise Collective on Mat and <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line568">568: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line569">569: </a><font color="#B22222">+  V - basis vectors context</font>
-<a name="line570">570: </a><font color="#B22222">-  A - the matrix</font>
-
-<a name="line572">572: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line573">573: </a><font color="#B22222">.  Y - the result</font>
-
-<a name="line575">575: </a><font color="#B22222">   Note:</font>
-<a name="line576">576: </a><font color="#B22222">   Both V and Y must be distributed in the same manner. Only active columns</font>
-<a name="line577">577: </a><font color="#B22222">   (excluding the leading ones) are processed.</font>
-<a name="line578">578: </a><font color="#B22222">   In the result Y, columns are overwritten starting from the leading ones.</font>
-
-<a name="line580">580: </a><font color="#B22222">   As opposed to <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(), this operation is always done column by column,</font>
-<a name="line581">581: </a><font color="#B22222">   with a sequence of calls to MatMultHermitianTranspose().</font>
-
-<a name="line583">583: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line585">585: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>()</font>
-<a name="line586">586: </a><font color="#B22222">@*/</font>
-<a name="line587">587: </a><strong><font color="#4169E1"><a name="BVMatMultHermitianTranspose"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y)</font></strong>
-<a name="line588">588: </a>{
-<a name="line590">590: </a>  PetscInt       j;
-<a name="line591">591: </a>  Vec            z,f;
-
-<a name="line596">596: </a>  BVCheckSizes(V,1);
-<a name="line601">601: </a>  BVCheckSizes(Y,3);
-<a name="line604">604: </a>  <font color="#4169E1">if</font> (V->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension V %D, Y %D"</font>,V->n,Y->n);
-<a name="line605">605: </a>  <font color="#4169E1">if</font> (V->k-V->l>Y->m-Y->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"Y has %D non-leading columns, not enough to store %D columns"</font>,Y->m-Y->l,V->k-V->l);
-
-<a name="line607">607: </a>  PetscLogEventBegin(BV_MatMult,V,A,Y,0);
-<a name="line608">608: </a>  <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
-<a name="line609">609: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,V->l+j,&z);
-<a name="line610">610: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Y,Y->l+j,&f);
-<a name="line611">611: </a>    MatMultHermitianTranspose(A,z,f);
-<a name="line612">612: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,V->l+j,&z);
-<a name="line613">613: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Y,Y->l+j,&f);
-<a name="line614">614: </a>  }
-<a name="line615">615: </a>  PetscLogEventEnd(BV_MatMult,V,A,Y,0);
-<a name="line616">616: </a>  <font color="#4169E1">return</font>(0);
-<a name="line617">617: </a>}
-
-<a name="line621">621: </a><font color="#B22222">/*@</font>
-<a name="line622">622: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a> - Computes the matrix-vector product for a specified</font>
-<a name="line623">623: </a><font color="#B22222">   column, storing the result in the next column: v_{j+1}=A*v_j.</font>
-
-<a name="line625">625: </a><font color="#B22222">   Neighbor-wise Collective on Mat and <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line627">627: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line628">628: </a><font color="#B22222">+  V - basis vectors context</font>
-<a name="line629">629: </a><font color="#B22222">.  A - the matrix</font>
-<a name="line630">630: </a><font color="#B22222">-  j - the column</font>
-
-<a name="line632">632: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line633">633: </a><font color="#B22222">.  Y - the result</font>
-
-<a name="line635">635: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line637">637: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>()</font>
-<a name="line638">638: </a><font color="#B22222">@*/</font>
-<a name="line639">639: </a><strong><font color="#4169E1"><a name="BVMatMultColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,PetscInt j)</font></strong>
-<a name="line640">640: </a>{
-<a name="line642">642: </a>  Vec            vj,vj1;
-
-<a name="line647">647: </a>  BVCheckSizes(V,1);
-<a name="line650">650: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line651">651: </a>  <font color="#4169E1">if</font> (j+1>=V->m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Result should go in index j+1=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j+1,V->m);
-
-<a name="line653">653: </a>  PetscLogEventBegin(BV_MatMult,V,A,0,0);
-<a name="line654">654: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&vj);
-<a name="line655">655: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j+1,&vj1);
-<a name="line656">656: </a>  MatMult(A,vj,vj1);
-<a name="line657">657: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&vj);
-<a name="line658">658: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j+1,&vj1);
-<a name="line659">659: </a>  PetscLogEventEnd(BV_MatMult,V,A,0,0);
-<a name="line660">660: </a>  <font color="#4169E1">return</font>(0);
-<a name="line661">661: </a>}
-
-<a name="line665">665: </a><font color="#B22222">/*@C</font>
-<a name="line666">666: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a> - Computes Y = Y + alpha*X.</font>
-
-<a name="line668">668: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line670">670: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line671">671: </a><font color="#B22222">+  Y,X   - basis vectors</font>
-<a name="line672">672: </a><font color="#B22222">-  alpha - scalar</font>
-
-<a name="line674">674: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line675">675: </a><font color="#B22222">.  Y     - the modified basis vectors</font>
-
-<a name="line677">677: </a><font color="#B22222">   Notes:</font>
-<a name="line678">678: </a><font color="#B22222">   X and Y must be different objects, with compatible dimensions.</font>
-<a name="line679">679: </a><font color="#B22222">   The effect is the same as doing a VecAXPY for each of the active</font>
-<a name="line680">680: </a><font color="#B22222">   columns (excluding the leading ones).</font>
-
-<a name="line682">682: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line684">684: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line685">685: </a><font color="#B22222">@*/</font>
-<a name="line686">686: </a><strong><font color="#4169E1"><a name="BVAXPY"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVAXPY.html#BVAXPY">BVAXPY</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X)</font></strong>
-<a name="line687">687: </a>{
-
-<a name="line695">695: </a>  BVCheckSizes(Y,1);
-<a name="line697">697: </a>  BVCheckSizes(X,3);
-<a name="line699">699: </a>  <font color="#4169E1">if</font> (X==Y) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_WRONG,<font color="#666666">"X and Y arguments must be different"</font>);
-<a name="line700">700: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
-<a name="line701">701: </a>  <font color="#4169E1">if</font> (X->k-X->l!=Y->k-Y->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"Y has %D non-leading columns, while X has %D"</font>,Y->m-Y->l,X->k-X->l);
-<a name="line702">702: </a>  <font color="#4169E1">if</font> (!X->n) <font color="#4169E1">return</font>(0);
-
-<a name="line704">704: </a>  PetscLogEventBegin(BV_AXPY,X,Y,0,0);
-<a name="line705">705: </a>  (*Y->ops->axpy)(Y,alpha,X);
-<a name="line706">706: </a>  PetscLogEventEnd(BV_AXPY,X,Y,0,0);
-<a name="line707">707: </a>  PetscObjectStateIncrease((PetscObject)Y);
-<a name="line708">708: </a>  <font color="#4169E1">return</font>(0);
-<a name="line709">709: </a>}
+<a name="line45"> 45: </a><font color="#B22222">   If matrix Q is NULL, then an AXPY operation Y = beta*Y + alpha*X is done</font>
+<a name="line46"> 46: </a><font color="#B22222">   (i.e. results as if Q = identity). If provided,</font>
+<a name="line47"> 47: </a><font color="#B22222">   the matrix Q must be a sequential dense Mat, with all entries equal on</font>
+<a name="line48"> 48: </a><font color="#B22222">   all processes (otherwise each process will compute a different update).</font>
+<a name="line49"> 49: </a><font color="#B22222">   The dimensions of Q must be at least m,n where m is the number of active</font>
+<a name="line50"> 50: </a><font color="#B22222">   columns of X and n is the number of active columns of Y.</font>
+
+<a name="line52"> 52: </a><font color="#B22222">   The leading columns of Y are not modified. Also, if X has leading</font>
+<a name="line53"> 53: </a><font color="#B22222">   columns specified, then these columns do not participate in the computation.</font>
+<a name="line54"> 54: </a><font color="#B22222">   Hence, only rows (resp. columns) of Q starting from lx (resp. ly) are used,</font>
+<a name="line55"> 55: </a><font color="#B22222">   where lx (resp. ly) is the number of leading columns of X (resp. Y).</font>
+
+<a name="line57"> 57: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line59"> 59: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(), <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line60"> 60: </a><font color="#B22222">@*/</font>
+<a name="line61"> 61: </a><strong><font color="#4169E1"><a name="BVMult"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y,PetscScalar alpha,PetscScalar beta,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,Mat Q)</font></strong>
+<a name="line62"> 62: </a>{
+<a name="line64"> 64: </a>  PetscBool      match;
+<a name="line65"> 65: </a>  PetscInt       m,n;
+
+<a name="line74"> 74: </a>  BVCheckSizes(Y,1);
+<a name="line76"> 76: </a>  BVCheckSizes(X,4);
+<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (X==Y) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_WRONG,<font color="#666666">"X and Y arguments must be different"</font>);
+<a name="line80"> 80: </a>  <font color="#4169E1">if</font> (Q) {
+<a name="line81"> 81: </a>    PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);
+<a name="line82"> 82: </a>    <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)Y),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
+<a name="line83"> 83: </a>    MatGetSize(Q,&m,&n);
+<a name="line84"> 84: </a>    <font color="#4169E1">if</font> (m<X->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D rows, should have at least %D"</font>,m,X->k);
+<a name="line85"> 85: </a>    <font color="#4169E1">if</font> (n<Y->k) SETERRQ2(PetscObjectComm((PetscObject)Y),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D columns, should have at least %D"</font>,n,Y->k);
+<a name="line86"> 86: </a>  }
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (X->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension X %D, Y %D"</font>,X->n,Y->n);
+
+<a name="line89"> 89: </a>  PetscLogEventBegin(BV_Mult,X,Y,0,0);
+<a name="line90"> 90: </a>  (*Y->ops->mult)(Y,alpha,beta,X,Q);
+<a name="line91"> 91: </a>  PetscLogEventEnd(BV_Mult,X,Y,0,0);
+<a name="line92"> 92: </a>  PetscObjectStateIncrease((PetscObject)Y);
+<a name="line93"> 93: </a>  <font color="#4169E1">return</font>(0);
+<a name="line94"> 94: </a>}
+
+<a name="line98"> 98: </a><font color="#B22222">/*@</font>
+<a name="line99"> 99: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a> - Computes y = beta*y + alpha*X*q.</font>
+
+<a name="line101">101: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and Vec</font>
+
+<a name="line103">103: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line104">104: </a><font color="#B22222">+  X          - a basis vectors object</font>
+<a name="line105">105: </a><font color="#B22222">.  alpha,beta - scalars</font>
+<a name="line106">106: </a><font color="#B22222">.  y          - a vector</font>
+<a name="line107">107: </a><font color="#B22222">-  q          - an array of scalars</font>
+
+<a name="line109">109: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line110">110: </a><font color="#B22222">.  y          - the modified vector</font>
+
+<a name="line112">112: </a><font color="#B22222">   Notes:</font>
+<a name="line113">113: </a><font color="#B22222">   This operation is the analogue of <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>() but with a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> and a Vec,</font>
+<a name="line114">114: </a><font color="#B22222">   instead of two <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>. Note that arguments are listed in different order</font>
+<a name="line115">115: </a><font color="#B22222">   with respect to <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>().</font>
+
+<a name="line117">117: </a><font color="#B22222">   If X has leading columns specified, then these columns do not participate</font>
+<a name="line118">118: </a><font color="#B22222">   in the computation.</font>
+
+<a name="line120">120: </a><font color="#B22222">   The length of array q must be equal to the number of active columns of X</font>
+<a name="line121">121: </a><font color="#B22222">   minus the number of leading columns, i.e. the first entry of q multiplies</font>
+<a name="line122">122: </a><font color="#B22222">   the first non-leading column.</font>
+
+<a name="line124">124: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line126">126: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line127">127: </a><font color="#B22222">@*/</font>
+<a name="line128">128: </a><strong><font color="#4169E1"><a name="BVMultVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,Vec y,PetscScalar *q)</font></strong>
+<a name="line129">129: </a>{
+<a name="line131">131: </a>  PetscInt       n,N;
+
+<a name="line140">140: </a>  BVCheckSizes(X,1);
+
+<a name="line144">144: </a>  VecGetSize(y,&N);
+<a name="line145">145: </a>  VecGetLocalSize(y,&n);
+<a name="line146">146: </a>  <font color="#4169E1">if</font> (N!=X->N || n!=X->n) SETERRQ4(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_INCOMP,<font color="#666666">"Vec sizes (global %D, local %D) do not match <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> sizes (global %D, local %D)"</font>,N,n,X->N,X->n);
+
+<a name="line148">148: </a>  PetscLogEventBegin(BV_MultVec,X,y,0,0);
+<a name="line149">149: </a>  (*X->ops->multvec)(X,alpha,beta,y,q);
+<a name="line150">150: </a>  PetscLogEventEnd(BV_MultVec,X,y,0,0);
+<a name="line151">151: </a>  <font color="#4169E1">return</font>(0);
+<a name="line152">152: </a>}
+
+<a name="line156">156: </a><font color="#B22222">/*@</font>
+<a name="line157">157: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a> - Computes y = beta*y + alpha*X*q, where y is the j-th column</font>
+<a name="line158">158: </a><font color="#B22222">   of X.</font>
+
+<a name="line160">160: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line162">162: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line163">163: </a><font color="#B22222">+  X          - a basis vectors object</font>
+<a name="line164">164: </a><font color="#B22222">.  alpha,beta - scalars</font>
+<a name="line165">165: </a><font color="#B22222">.  j          - the column index</font>
+<a name="line166">166: </a><font color="#B22222">-  q          - an array of scalars</font>
+
+<a name="line168">168: </a><font color="#B22222">   Notes:</font>
+<a name="line169">169: </a><font color="#B22222">   This operation is equivalent to <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>() but it uses column j of X</font>
+<a name="line170">170: </a><font color="#B22222">   rather than taking a Vec as an argument. The number of active columns of</font>
+<a name="line171">171: </a><font color="#B22222">   X is set to j before the computation, and restored afterwards.</font>
+<a name="line172">172: </a><font color="#B22222">   If X has leading columns specified, then these columns do not participate</font>
+<a name="line173">173: </a><font color="#B22222">   in the computation. Therefore, the length of array q must be equal to j</font>
+<a name="line174">174: </a><font color="#B22222">   minus the number of leading columns.</font>
+
+<a name="line176">176: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line178">178: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line179">179: </a><font color="#B22222">@*/</font>
+<a name="line180">180: </a><strong><font color="#4169E1"><a name="BVMultColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultColumn.html#BVMultColumn">BVMultColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> X,PetscScalar alpha,PetscScalar beta,PetscInt j,PetscScalar *q)</font></strong>
+<a name="line181">181: </a>{
+<a name="line183">183: </a>  PetscInt       ksave;
+<a name="line184">184: </a>  Vec            y;
+
+<a name="line193">193: </a>  BVCheckSizes(X,1);
+
+<a name="line195">195: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line196">196: </a>  <font color="#4169E1">if</font> (j>=X->m) SETERRQ2(PetscObjectComm((PetscObject)X),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,X->m);
+
+<a name="line198">198: </a>  PetscLogEventBegin(BV_MultVec,X,0,0,0);
+<a name="line199">199: </a>  ksave = X->k;
+<a name="line200">200: </a>  X->k = j;
+<a name="line201">201: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(X,j,&y);
+<a name="line202">202: </a>  (*X->ops->multvec)(X,alpha,beta,y,q);
+<a name="line203">203: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(X,j,&y);
+<a name="line204">204: </a>  X->k = ksave;
+<a name="line205">205: </a>  PetscLogEventEnd(BV_MultVec,X,0,0,0);
+<a name="line206">206: </a>  <font color="#4169E1">return</font>(0);
+<a name="line207">207: </a>}
+
+<a name="line211">211: </a><font color="#B22222">/*@</font>
+<a name="line212">212: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a> - Update a set of vectors as V(:,s:e-1) = V*Q(:,s:e-1).</font>
+
+<a name="line214">214: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line216">216: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line217">217: </a><font color="#B22222">+  Q - a sequential dense matrix</font>
+<a name="line218">218: </a><font color="#B22222">.  s - first column of V to be overwritten</font>
+<a name="line219">219: </a><font color="#B22222">-  e - first column of V not to be overwritten</font>
+
+<a name="line221">221: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line222">222: </a><font color="#B22222">+  V - basis vectors</font>
+
+<a name="line224">224: </a><font color="#B22222">   Notes:</font>
+<a name="line225">225: </a><font color="#B22222">   The matrix Q must be a sequential dense Mat, with all entries equal on</font>
+<a name="line226">226: </a><font color="#B22222">   all processes (otherwise each process will compute a different update).</font>
+
+<a name="line228">228: </a><font color="#B22222">   This function computes V(:,s:e-1) = V*Q(:,s:e-1), that is, given a set of</font>
+<a name="line229">229: </a><font color="#B22222">   vectors V, columns from s to e-1 are overwritten with columns from s to</font>
+<a name="line230">230: </a><font color="#B22222">   e-1 of the matrix-matrix product V*Q. Only columns s to e-1 of Q are</font>
+<a name="line231">231: </a><font color="#B22222">   referenced.</font>
+
+<a name="line233">233: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line235">235: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMult.html#BVMult">BVMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMultVec.html#BVMultVec">BVMultVec</a>(), <a href="../../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line236">236: </a><font color="#B22222">@*/</font>
+<a name="line237">237: </a><strong><font color="#4169E1"><a name="BVMultInPlace"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line238">238: </a>{
+<a name="line240">240: </a>  PetscBool      match;
+<a name="line241">241: </a>  PetscInt       m,n;
+
+<a name="line249">249: </a>  BVCheckSizes(V,1);
+<a name="line251">251: </a>  PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);
+<a name="line252">252: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
+
+<a name="line254">254: </a>  <font color="#4169E1">if</font> (s<V->l || s>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument s has wrong value %D, should be between %D and %D"</font>,s,V->l,V->m);
+<a name="line255">255: </a>  <font color="#4169E1">if</font> (e<V->l || e>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument e has wrong value %D, should be between %D and %D"</font>,e,V->l,V->m);
+<a name="line256">256: </a>  MatGetSize(Q,&m,&n);
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (m<V->k) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D rows, should have at least %D"</font>,m,V->k);
+<a name="line258">258: </a>  <font color="#4169E1">if</font> (e>n) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument only has %D columns, the requested value of e is larger: %D"</font>,n,e);
+<a name="line259">259: </a>  <font color="#4169E1">if</font> (s>=e) <font color="#4169E1">return</font>(0);
+
+<a name="line261">261: </a>  PetscLogEventBegin(BV_MultInPlace,V,Q,0,0);
+<a name="line262">262: </a>  (*V->ops->multinplace)(V,Q,s,e);
+<a name="line263">263: </a>  PetscLogEventEnd(BV_MultInPlace,V,Q,0,0);
+<a name="line264">264: </a>  PetscObjectStateIncrease((PetscObject)V);
+<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
+<a name="line266">266: </a>}
+
+<a name="line270">270: </a><font color="#B22222">/*@</font>
+<a name="line271">271: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a> - Update a set of vectors as V(:,s:e-1) = V*Q'(:,s:e-1).</font>
+
+<a name="line273">273: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line275">275: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line276">276: </a><font color="#B22222">+  Q - a sequential dense matrix</font>
+<a name="line277">277: </a><font color="#B22222">.  s - first column of V to be overwritten</font>
+<a name="line278">278: </a><font color="#B22222">-  e - first column of V not to be overwritten</font>
+
+<a name="line280">280: </a><font color="#B22222">   Input/Output Parameter:</font>
+<a name="line281">281: </a><font color="#B22222">+  V - basis vectors</font>
+
+<a name="line283">283: </a><font color="#B22222">   Notes:</font>
+<a name="line284">284: </a><font color="#B22222">   This is a variant of <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>() where the conjugate transpose</font>
+<a name="line285">285: </a><font color="#B22222">   of Q is used.</font>
+
+<a name="line287">287: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line289">289: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>()</font>
+<a name="line290">290: </a><font color="#B22222">@*/</font>
+<a name="line291">291: </a><strong><font color="#4169E1"><a name="BVMultInPlaceTranspose"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMultInPlaceTranspose.html#BVMultInPlaceTranspose">BVMultInPlaceTranspose</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Q,PetscInt s,PetscInt e)</font></strong>
+<a name="line292">292: </a>{
+<a name="line294">294: </a>  PetscBool      match;
+<a name="line295">295: </a>  PetscInt       m,n;
+
+<a name="line303">303: </a>  BVCheckSizes(V,1);
+<a name="line305">305: </a>  PetscObjectTypeCompare((PetscObject)Q,MATSEQDENSE,&match);
+<a name="line306">306: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
+
+<a name="line308">308: </a>  <font color="#4169E1">if</font> (s<V->l || s>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument s has wrong value %D, should be between %D and %D"</font>,s,V->l,V->m);
+<a name="line309">309: </a>  <font color="#4169E1">if</font> (e<V->l || e>V->m) SETERRQ3(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument e has wrong value %D, should be between %D and %D"</font>,e,V->l,V->m);
+<a name="line310">310: </a>  MatGetSize(Q,&m,&n);
+<a name="line311">311: </a>  <font color="#4169E1">if</font> (n<V->k) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument has %D columns, should have at least %D"</font>,n,V->k);
+<a name="line312">312: </a>  <font color="#4169E1">if</font> (e>m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument only has %D rows, the requested value of e is larger: %D"</font>,m,e);
+<a name="line313">313: </a>  <font color="#4169E1">if</font> (s>=e || !V->n) <font color="#4169E1">return</font>(0);
+
+<a name="line315">315: </a>  PetscLogEventBegin(BV_MultInPlace,V,Q,0,0);
+<a name="line316">316: </a>  (*V->ops->multinplacetrans)(V,Q,s,e);
+<a name="line317">317: </a>  PetscLogEventEnd(BV_MultInPlace,V,Q,0,0);
+<a name="line318">318: </a>  PetscObjectStateIncrease((PetscObject)V);
+<a name="line319">319: </a>  <font color="#4169E1">return</font>(0);
+<a name="line320">320: </a>}
+
+<a name="line324">324: </a><font color="#B22222">/*@</font>
+<a name="line325">325: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a> - Multiply the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> entries by a scalar value.</font>
+
+<a name="line327">327: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line329">329: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line330">330: </a><font color="#B22222">+  bv    - basis vectors</font>
+<a name="line331">331: </a><font color="#B22222">-  alpha - scaling factor</font>
+
+<a name="line333">333: </a><font color="#B22222">   Note:</font>
+<a name="line334">334: </a><font color="#B22222">   All active columns (except the leading ones) are scaled.</font>
+
+<a name="line336">336: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line338">338: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line339">339: </a><font color="#B22222">@*/</font>
+<a name="line340">340: </a><strong><font color="#4169E1"><a name="BVScale"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscScalar alpha)</font></strong>
+<a name="line341">341: </a>{
+
+<a name="line348">348: </a>  BVCheckSizes(bv,1);
+<a name="line349">349: </a>  <font color="#4169E1">if</font> (alpha == (PetscScalar)1.0) <font color="#4169E1">return</font>(0);
+
+<a name="line351">351: </a>  PetscLogEventBegin(BV_Scale,bv,0,0,0);
+<a name="line352">352: </a>  <font color="#4169E1">if</font> (bv->n) {
+<a name="line353">353: </a>    (*bv->ops->scale)(bv,-1,alpha);
+<a name="line354">354: </a>  }
+<a name="line355">355: </a>  PetscLogEventEnd(BV_Scale,bv,0,0,0);
+<a name="line356">356: </a>  PetscObjectStateIncrease((PetscObject)bv);
+<a name="line357">357: </a>  <font color="#4169E1">return</font>(0);
+<a name="line358">358: </a>}
+
+<a name="line362">362: </a><font color="#B22222">/*@</font>
+<a name="line363">363: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a> - Scale one column of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>.</font>
+
+<a name="line365">365: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line367">367: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line368">368: </a><font color="#B22222">+  bv    - basis vectors</font>
+<a name="line369">369: </a><font color="#B22222">.  j     - column number to be scaled</font>
+<a name="line370">370: </a><font color="#B22222">-  alpha - scaling factor</font>
+
+<a name="line372">372: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line374">374: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVScale.html#BVScale">BVScale</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line375">375: </a><font color="#B22222">@*/</font>
+<a name="line376">376: </a><strong><font color="#4169E1"><a name="BVScaleColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar alpha)</font></strong>
+<a name="line377">377: </a>{
+
+<a name="line385">385: </a>  BVCheckSizes(bv,1);
+
+<a name="line387">387: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
+<a name="line388">388: </a>  <font color="#4169E1">if</font> (alpha == (PetscScalar)1.0) <font color="#4169E1">return</font>(0);
+
+<a name="line390">390: </a>  PetscLogEventBegin(BV_Scale,bv,0,0,0);
+<a name="line391">391: </a>  <font color="#4169E1">if</font> (bv->n) {
+<a name="line392">392: </a>    (*bv->ops->scale)(bv,j,alpha);
+<a name="line393">393: </a>  }
+<a name="line394">394: </a>  PetscLogEventEnd(BV_Scale,bv,0,0,0);
+<a name="line395">395: </a>  PetscObjectStateIncrease((PetscObject)bv);
+<a name="line396">396: </a>  <font color="#4169E1">return</font>(0);
+<a name="line397">397: </a>}
+
+<a name="line401">401: </a><font color="#B22222">/*@</font>
+<a name="line402">402: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a> - Set the columns of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to random numbers.</font>
+
+<a name="line404">404: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line406">406: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line407">407: </a><font color="#B22222">.  bv - basis vectors</font>
+
+<a name="line409">409: </a><font color="#B22222">   Note:</font>
+<a name="line410">410: </a><font color="#B22222">   All active columns (except the leading ones) are modified.</font>
+
+<a name="line412">412: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line414">414: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</a>(), <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line415">415: </a><font color="#B22222">@*/</font>
+<a name="line416">416: </a><strong><font color="#4169E1"><a name="BVSetRandom"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv)</font></strong>
+<a name="line417">417: </a>{
+<a name="line419">419: </a>  PetscInt       i,low,high,k;
+<a name="line420">420: </a>  PetscScalar    *px,t;
+<a name="line421">421: </a>  Vec            x;
+
+<a name="line426">426: </a>  BVCheckSizes(bv,1);
+
+<a name="line428">428: </a>  <a href="../../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(bv,&bv->rand);
+<a name="line429">429: </a>  PetscLogEventBegin(BV_SetRandom,bv,0,0,0);
+<a name="line430">430: </a>  <font color="#4169E1">for</font> (k=bv->l;k<bv->k;k++) {
+<a name="line431">431: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,k,&x);
+<a name="line432">432: </a>    <font color="#4169E1">if</font> (bv->rrandom) {  <font color="#B22222">/* generate the same vector irrespective of number of processes */</font>
+<a name="line433">433: </a>      VecGetOwnershipRange(x,&low,&high);
+<a name="line434">434: </a>      VecGetArray(x,&px);
+<a name="line435">435: </a>      <font color="#4169E1">for</font> (i=0;i<bv->N;i++) {
+<a name="line436">436: </a>        PetscRandomGetValue(bv->rand,&t);
+<a name="line437">437: </a>        <font color="#4169E1">if</font> (i>=low && i<high) px[i-low] = t;
+<a name="line438">438: </a>      }
+<a name="line439">439: </a>      VecRestoreArray(x,&px);
+<a name="line440">440: </a>    } <font color="#4169E1">else</font> {
+<a name="line441">441: </a>      VecSetRandom(x,bv->rand);
+<a name="line442">442: </a>    }
+<a name="line443">443: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,k,&x);
+<a name="line444">444: </a>  }
+<a name="line445">445: </a>  PetscLogEventEnd(BV_SetRandom,bv,0,0,0);
+<a name="line446">446: </a>  PetscObjectStateIncrease((PetscObject)bv);
+<a name="line447">447: </a>  <font color="#4169E1">return</font>(0);
+<a name="line448">448: </a>}
+
+<a name="line452">452: </a><font color="#B22222">/*@</font>
+<a name="line453">453: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a> - Set one column of a <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> to random numbers.</font>
+
+<a name="line455">455: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line457">457: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line458">458: </a><font color="#B22222">+  bv - basis vectors</font>
+<a name="line459">459: </a><font color="#B22222">-  j  - column number to be set</font>
+
+<a name="line461">461: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line463">463: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetRandomContext.html#BVSetRandomContext">BVSetRandomContext</a>(), <a href="../../../../../docs/manualpages/BV/BVSetRandom.html#BVSetRandom">BVSetRandom</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line464">464: </a><font color="#B22222">@*/</font>
+<a name="line465">465: </a><strong><font color="#4169E1"><a name="BVSetRandomColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVSetRandomColumn.html#BVSetRandomColumn">BVSetRandomColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j)</font></strong>
+<a name="line466">466: </a>{
+<a name="line468">468: </a>  PetscInt       i,low,high;
+<a name="line469">469: </a>  PetscScalar    *px,t;
+<a name="line470">470: </a>  Vec            x;
+
+<a name="line476">476: </a>  BVCheckSizes(bv,1);
+<a name="line477">477: </a>  <font color="#4169E1">if</font> (j<0 || j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument j has wrong value %D, the number of columns is %D"</font>,j,bv->m);
+
+<a name="line479">479: </a>  <a href="../../../../../docs/manualpages/BV/BVGetRandomContext.html#BVGetRandomContext">BVGetRandomContext</a>(bv,&bv->rand);
+<a name="line480">480: </a>  PetscLogEventBegin(BV_SetRandom,bv,0,0,0);
+<a name="line481">481: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(bv,j,&x);
+<a name="line482">482: </a>  <font color="#4169E1">if</font> (bv->rrandom) {  <font color="#B22222">/* generate the same vector irrespective of number of processes */</font>
+<a name="line483">483: </a>    VecGetOwnershipRange(x,&low,&high);
+<a name="line484">484: </a>    VecGetArray(x,&px);
+<a name="line485">485: </a>    <font color="#4169E1">for</font> (i=0;i<bv->N;i++) {
+<a name="line486">486: </a>      PetscRandomGetValue(bv->rand,&t);
+<a name="line487">487: </a>      <font color="#4169E1">if</font> (i>=low && i<high) px[i-low] = t;
+<a name="line488">488: </a>    }
+<a name="line489">489: </a>    VecRestoreArray(x,&px);
+<a name="line490">490: </a>  } <font color="#4169E1">else</font> {
+<a name="line491">491: </a>    VecSetRandom(x,bv->rand);
+<a name="line492">492: </a>  }
+<a name="line493">493: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&x);
+<a name="line494">494: </a>  PetscLogEventEnd(BV_SetRandom,bv,0,0,0);
+<a name="line495">495: </a>  PetscObjectStateIncrease((PetscObject)bv);
+<a name="line496">496: </a>  <font color="#4169E1">return</font>(0);
+<a name="line497">497: </a>}
+
+<a name="line501">501: </a><font color="#B22222">/*@</font>
+<a name="line502">502: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a> - Computes the matrix-vector product for each column, Y=A*V.</font>
+
+<a name="line504">504: </a><font color="#B22222">   Neighbor-wise Collective on Mat and <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line506">506: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line507">507: </a><font color="#B22222">+  V - basis vectors context</font>
+<a name="line508">508: </a><font color="#B22222">-  A - the matrix</font>
+
+<a name="line510">510: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line511">511: </a><font color="#B22222">.  Y - the result</font>
+
+<a name="line513">513: </a><font color="#B22222">   Note:</font>
+<a name="line514">514: </a><font color="#B22222">   Both V and Y must be distributed in the same manner. Only active columns</font>
+<a name="line515">515: </a><font color="#B22222">   (excluding the leading ones) are processed.</font>
+<a name="line516">516: </a><font color="#B22222">   In the result Y, columns are overwritten starting from the leading ones.</font>
+
+<a name="line518">518: </a><font color="#B22222">   It is possible to choose whether the computation is done column by column</font>
+<a name="line519">519: </a><font color="#B22222">   or as a Mat-Mat product, see <a href="../../../../../docs/manualpages/BV/BVSetMatMultMethod.html#BVSetMatMultMethod">BVSetMatMultMethod</a>().</font>
+
+<a name="line521">521: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line523">523: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a [...]
+<a name="line524">524: </a><font color="#B22222">@*/</font>
+<a name="line525">525: </a><strong><font color="#4169E1"><a name="BVMatMult"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y)</font></strong>
+<a name="line526">526: </a>{
+
+<a name="line532">532: </a>  BVCheckSizes(V,1);
+<a name="line537">537: </a>  BVCheckSizes(Y,3);
+<a name="line540">540: </a>  <font color="#4169E1">if</font> (V->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension V %D, Y %D"</font>,V->n,Y->n);
+<a name="line541">541: </a>  <font color="#4169E1">if</font> (V->k-V->l>Y->m-Y->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"Y has %D non-leading columns, not enough to store %D columns"</font>,Y->m-Y->l,V->k-V->l);
+
+<a name="line543">543: </a>  PetscLogEventBegin(BV_MatMult,V,A,Y,0);
+<a name="line544">544: </a>  (*V->ops->matmult)(V,A,Y);
+<a name="line545">545: </a>  PetscLogEventEnd(BV_MatMult,V,A,Y,0);
+<a name="line546">546: </a>  <font color="#4169E1">return</font>(0);
+<a name="line547">547: </a>}
+
+<a name="line551">551: </a><font color="#B22222">/*@</font>
+<a name="line552">552: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a> - Computes the matrix-vector product with the</font>
+<a name="line553">553: </a><font color="#B22222">   conjugate transpose of a matrix for each column, Y=A^H*V.</font>
+
+<a name="line555">555: </a><font color="#B22222">   Neighbor-wise Collective on Mat and <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line557">557: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line558">558: </a><font color="#B22222">+  V - basis vectors context</font>
+<a name="line559">559: </a><font color="#B22222">-  A - the matrix</font>
+
+<a name="line561">561: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line562">562: </a><font color="#B22222">.  Y - the result</font>
+
+<a name="line564">564: </a><font color="#B22222">   Note:</font>
+<a name="line565">565: </a><font color="#B22222">   Both V and Y must be distributed in the same manner. Only active columns</font>
+<a name="line566">566: </a><font color="#B22222">   (excluding the leading ones) are processed.</font>
+<a name="line567">567: </a><font color="#B22222">   In the result Y, columns are overwritten starting from the leading ones.</font>
+
+<a name="line569">569: </a><font color="#B22222">   As opposed to <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(), this operation is always done column by column,</font>
+<a name="line570">570: </a><font color="#B22222">   with a sequence of calls to MatMultHermitianTranspose().</font>
+
+<a name="line572">572: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line574">574: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVCopy.html#BVCopy">BVCopy</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>(), <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>()</font>
+<a name="line575">575: </a><font color="#B22222">@*/</font>
+<a name="line576">576: </a><strong><font color="#4169E1"><a name="BVMatMultHermitianTranspose"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatMultHermitianTranspose.html#BVMatMultHermitianTranspose">BVMatMultHermitianTranspose</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> Y)</font></strong>
+<a name="line577">577: </a>{
+<a name="line579">579: </a>  PetscInt       j;
+<a name="line580">580: </a>  Vec            z,f;
+
+<a name="line585">585: </a>  BVCheckSizes(V,1);
+<a name="line590">590: </a>  BVCheckSizes(Y,3);
+<a name="line593">593: </a>  <font color="#4169E1">if</font> (V->n!=Y->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP,<font color="#666666">"Mismatching local dimension V %D, Y %D"</font>,V->n,Y->n);
+<a name="line594">594: </a>  <font color="#4169E1">if</font> (V->k-V->l>Y->m-Y->l) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_SIZ,<font color="#666666">"Y has %D non-leading columns, not enough to store %D columns"</font>,Y->m-Y->l,V->k-V->l);
+
+<a name="line596">596: </a>  PetscLogEventBegin(BV_MatMult,V,A,Y,0);
+<a name="line597">597: </a>  <font color="#4169E1">for</font> (j=0;j<V->k-V->l;j++) {
+<a name="line598">598: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,V->l+j,&z);
+<a name="line599">599: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(Y,Y->l+j,&f);
+<a name="line600">600: </a>    MatMultHermitianTranspose(A,z,f);
+<a name="line601">601: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,V->l+j,&z);
+<a name="line602">602: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(Y,Y->l+j,&f);
+<a name="line603">603: </a>  }
+<a name="line604">604: </a>  PetscLogEventEnd(BV_MatMult,V,A,Y,0);
+<a name="line605">605: </a>  <font color="#4169E1">return</font>(0);
+<a name="line606">606: </a>}
+
+<a name="line610">610: </a><font color="#B22222">/*@</font>
+<a name="line611">611: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a> - Computes the matrix-vector product for a specified</font>
+<a name="line612">612: </a><font color="#B22222">   column, storing the result in the next column: v_{j+1}=A*v_j.</font>
+
+<a name="line614">614: </a><font color="#B22222">   Neighbor-wise Collective on Mat and <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line616">616: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line617">617: </a><font color="#B22222">+  V - basis vectors context</font>
+<a name="line618">618: </a><font color="#B22222">.  A - the matrix</font>
+<a name="line619">619: </a><font color="#B22222">-  j - the column</font>
+
+<a name="line621">621: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line622">622: </a><font color="#B22222">.  Y - the result</font>
+
+<a name="line624">624: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line626">626: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVMatMult.html#BVMatMult">BVMatMult</a>()</font>
+<a name="line627">627: </a><font color="#B22222">@*/</font>
+<a name="line628">628: </a><strong><font color="#4169E1"><a name="BVMatMultColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVMatMultColumn.html#BVMatMultColumn">BVMatMultColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat A,PetscInt j)</font></strong>
+<a name="line629">629: </a>{
+<a name="line631">631: </a>  Vec            vj,vj1;
+
+<a name="line636">636: </a>  BVCheckSizes(V,1);
+<a name="line639">639: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line640">640: </a>  <font color="#4169E1">if</font> (j+1>=V->m) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Result should go in index j+1=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j+1,V->m);
+
+<a name="line642">642: </a>  PetscLogEventBegin(BV_MatMultVec,V,A,0,0);
+<a name="line643">643: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j,&vj);
+<a name="line644">644: </a>  <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,j+1,&vj1);
+<a name="line645">645: </a>  MatMult(A,vj,vj1);
+<a name="line646">646: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j,&vj);
+<a name="line647">647: </a>  <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,j+1,&vj1);
+<a name="line648">648: </a>  PetscLogEventEnd(BV_MatMultVec,V,A,0,0);
+<a name="line649">649: </a>  <font color="#4169E1">return</font>(0);
+<a name="line650">650: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/interface/bvorthog.c b/src/sys/classes/bv/interface/bvorthog.c
index dc31654..24b02e6 100644
--- a/src/sys/classes/bv/interface/bvorthog.c
+++ b/src/sys/classes/bv/interface/bvorthog.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -158,10 +158,7 @@ static PetscErrorCode BVOrthogonalizeMGS(BV bv,PetscInt j,Vec v,PetscBool *which
       ierr = BVOrthogonalizeMGS1(bv,k,w,which,bv->c);CHKERRQ(ierr);
       ierr = BVNormVec(bv,w,NORM_2,&nrm);CHKERRQ(ierr);
     }
-    if (lindep) {
-      if (nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-      else *lindep = PETSC_FALSE;
-    }
+    if (lindep) *lindep = PetscNot(nrm >= bv->orthog_eta*onrm);
     break;
 
   case BV_ORTHOG_REFINE_NEVER:
@@ -171,7 +168,7 @@ static PetscErrorCode BVOrthogonalizeMGS(BV bv,PetscInt j,Vec v,PetscBool *which
       ierr = BVNormVec(bv,w,NORM_2,&nrm);CHKERRQ(ierr);
     }
     /* linear dependence check: just test for exactly zero norm */
-    if (lindep) *lindep = nrm? PETSC_FALSE: PETSC_TRUE;
+    if (lindep) *lindep = PetscNot(nrm);
     break;
 
   case BV_ORTHOG_REFINE_ALWAYS:
@@ -185,10 +182,7 @@ static PetscErrorCode BVOrthogonalizeMGS(BV bv,PetscInt j,Vec v,PetscBool *which
     if (norm || lindep) {
       ierr = BVNormVec(bv,w,NORM_2,&nrm);CHKERRQ(ierr);
     }
-    if (lindep) {
-      if (nrm==0.0 || nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-      else *lindep = PETSC_FALSE;
-    }
+    if (lindep) *lindep = PetscNot(nrm && nrm >= bv->orthog_eta*onrm);
     break;
   }
   if (bv->indef) {
@@ -226,10 +220,7 @@ static PetscErrorCode BVOrthogonalizeCGS(BV bv,PetscInt j,Vec v,PetscScalar *H,P
       for (i=0;i<bv->nc+k;i++) bv->h[i] += bv->c[i];
     }
     if (norm) *norm = nrm;
-    if (lindep) {
-      if (nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-      else *lindep = PETSC_FALSE;
-    }
+    if (lindep) *lindep = PetscNot(nrm >= bv->orthog_eta*onrm);
     break;
 
   case BV_ORTHOG_REFINE_NEVER:
@@ -241,7 +232,7 @@ static PetscErrorCode BVOrthogonalizeCGS(BV bv,PetscInt j,Vec v,PetscScalar *H,P
     }
     if (norm) *norm = nrm;
     /* linear dependence check: just test for exactly zero norm */
-    if (lindep) *lindep = nrm? PETSC_FALSE: PETSC_TRUE;
+    if (lindep) *lindep = PetscNot(nrm);
     break;
 
   case BV_ORTHOG_REFINE_ALWAYS:
@@ -249,8 +240,7 @@ static PetscErrorCode BVOrthogonalizeCGS(BV bv,PetscInt j,Vec v,PetscScalar *H,P
     if (lindep) {
       ierr = BVOrthogonalizeCGS1(bv,k,v,bv->c,&onrm,&nrm);CHKERRQ(ierr);
       if (norm) *norm = nrm;
-      if (nrm==0.0 || nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-      else *lindep = PETSC_FALSE;
+      *lindep = PetscNot(nrm && nrm >= bv->orthog_eta*onrm);
     } else {
       ierr = BVOrthogonalizeCGS1(bv,k,v,bv->c,NULL,norm);CHKERRQ(ierr);
     }
@@ -300,7 +290,7 @@ PetscErrorCode BVOrthogonalizeVec(BV bv,Vec v,PetscScalar *H,PetscReal *norm,Pet
   PetscValidType(v,2);
   PetscCheckSameComm(bv,1,v,2);
 
-  ierr = PetscLogEventBegin(BV_Orthogonalize,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_OrthogonalizeVec,bv,0,0,0);CHKERRQ(ierr);
   ksave = bv->k;
   lsave = bv->l;
   bv->l = -bv->nc;  /* must also orthogonalize against constraints and leading columns */
@@ -317,7 +307,7 @@ PetscErrorCode BVOrthogonalizeVec(BV bv,Vec v,PetscScalar *H,PetscReal *norm,Pet
   bv->k = ksave;
   bv->l = lsave;
   if (H) for (i=bv->l;i<bv->k;i++) H[i-bv->l] = bv->h[bv->nc+i];
-  ierr = PetscLogEventEnd(BV_Orthogonalize,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_OrthogonalizeVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -370,7 +360,7 @@ PetscErrorCode BVOrthogonalizeColumn(BV bv,PetscInt j,PetscScalar *H,PetscReal *
   if (j<0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Index j must be non-negative");
   if (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Index j=%D but BV only has %D columns",j,bv->m);
 
-  ierr = PetscLogEventBegin(BV_Orthogonalize,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_OrthogonalizeVec,bv,0,0,0);CHKERRQ(ierr);
   ksave = bv->k;
   lsave = bv->l;
   bv->l = -bv->nc;  /* must also orthogonalize against constraints and leading columns */
@@ -387,7 +377,7 @@ PetscErrorCode BVOrthogonalizeColumn(BV bv,PetscInt j,PetscScalar *H,PetscReal *
   bv->k = ksave;
   bv->l = lsave;
   if (H) for (i=bv->l;i<j;i++) H[i-bv->l] = bv->h[bv->nc+i];
-  ierr = PetscLogEventEnd(BV_Orthogonalize,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_OrthogonalizeVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -436,7 +426,7 @@ PetscErrorCode BVOrthogonalizeSomeColumn(BV bv,PetscInt j,PetscBool *which,Petsc
   if (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,"Index j=%D but BV only has %D columns",j,bv->m);
   if (bv->orthog_type!=BV_ORTHOG_MGS) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,"Operation only available for MGS orthogonalization");
 
-  ierr = PetscLogEventBegin(BV_Orthogonalize,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventBegin(BV_OrthogonalizeVec,bv,0,0,0);CHKERRQ(ierr);
   ksave = bv->k;
   lsave = bv->l;
   bv->l = -bv->nc;  /* must also orthogonalize against constraints and leading columns */
@@ -446,7 +436,7 @@ PetscErrorCode BVOrthogonalizeSomeColumn(BV bv,PetscInt j,PetscBool *which,Petsc
   bv->k = ksave;
   bv->l = lsave;
   if (H) for (i=bv->l;i<j;i++) H[i-bv->l] = bv->h[bv->nc+i];
-  ierr = PetscLogEventEnd(BV_Orthogonalize,bv,0,0,0);CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(BV_OrthogonalizeVec,bv,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -479,6 +469,7 @@ static PetscErrorCode BVOrthogonalize_GS(BV V,Mat R)
     } else {
       ierr = BVOrthogonalizeColumn(V,j,NULL,&norm,NULL);CHKERRQ(ierr);
     }
+    if (!norm) SETERRQ(PETSC_COMM_SELF,1,"Breakdown in BVOrthogonalize due to a linearly dependent column");
     if (V->matrix) { /* fill cached BV */
       ierr = BVGetColumn(V->cached,j,&v);CHKERRQ(ierr);
       ierr = VecCopy(V->Bx,v);CHKERRQ(ierr);
@@ -497,9 +488,13 @@ static PetscErrorCode BVOrthogonalize_GS(BV V,Mat R)
  */
 static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)
 {
+#if defined(PETSC_MISSING_LAPACK_POTRF) || defined(SLEPC_MISSING_LAPACK_TRTRI)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"POTRF/TRTRI - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
   PetscInt       i,n,m,ld;
-  PetscScalar    *pR,*pS,done=1.0;
+  PetscScalar    *pR,*pS;
   PetscBLASInt   info,n_,l_,m_,ld_;
 
   PetscFunctionBegin;
@@ -514,15 +509,33 @@ static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)
   ierr = MatDenseGetArray(R,&pR);CHKERRQ(ierr);
   ierr = MatDenseGetArray(*S,&pS);CHKERRQ(ierr);
 
+  /* save a copy of matrix in S */
+  for (i=l;i<m;i++) {
+    ierr = PetscMemcpy(pS+i*ld+l,pR+i*ld+l,n*sizeof(PetscScalar));CHKERRQ(ierr);
+  }
+
   /* compute upper Cholesky factor in R */
   PetscStackCallBLAS("LAPACKpotrf",LAPACKpotrf_("U",&n_,pR+l*ld+l,&ld_,&info));
-  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_MAT_CH_ZRPVT,"Error in Cholesky factorization, info=%D",(PetscInt)info);
   ierr = PetscLogFlops((1.0*n*n*n)/3.0);CHKERRQ(ierr);
 
-  /* build identity and compute S = R\I */
+  if (info) {  /* LAPACKpotrf failed, retry on diagonally perturbed matrix */
+    for (i=l;i<m;i++) {
+      ierr = PetscMemcpy(pR+i*ld+l,pS+i*ld+l,n*sizeof(PetscScalar));CHKERRQ(ierr);
+      pR[i+i*ld] += 50.0*PETSC_MACHINE_EPSILON;
+    }
+    PetscStackCallBLAS("LAPACKpotrf",LAPACKpotrf_("U",&n_,pR+l*ld+l,&ld_,&info));
+    if (info) SETERRQ1(PETSC_COMM_SELF,1,"Error in Cholesky factorization, info=%D",(PetscInt)info);
+    ierr = PetscLogFlops((1.0*n*n*n)/3.0);CHKERRQ(ierr);
+  }
+
+  /* compute S = inv(R) */
   ierr = PetscMemzero(pS,m*m*sizeof(PetscScalar));CHKERRQ(ierr);
-  for (i=0;i<m;i++) pS[i+i*ld] = 1.0;
-  PetscStackCallBLAS("BLAStrsm",BLAStrsm_("L","U","N","N",&n_,&n_,&done,pR+l*ld+l,&ld_,pS+l*ld+l,&ld_));
+  for (i=l;i<m;i++) {
+    ierr = PetscMemcpy(pS+i*ld+l,pR+i*ld+l,n*sizeof(PetscScalar));CHKERRQ(ierr);
+  }
+  PetscStackCallBLAS("LAPACKtrtri",LAPACKtrtri_("U","N",&n_,pS+l*ld+l,&ld_,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,1,"Error in xTRTRI, info=%D",(PetscInt)info);
+  ierr = PetscLogFlops(1.0*n*n*n);CHKERRQ(ierr);
 
   /* Zero out entries below the diagonal */
   for (i=l;i<m-1;i++) {
@@ -532,6 +545,7 @@ static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)
   ierr = MatDenseRestoreArray(R,&pR);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(*S,&pS);CHKERRQ(ierr);
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -542,21 +556,13 @@ static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)
 static PetscErrorCode BVOrthogonalize_Chol(BV V,Mat Rin)
 {
   PetscErrorCode ierr;
-  Mat            S,R=Rin,B;
+  Mat            S,R=Rin;
 
   PetscFunctionBegin;
   if (!Rin) {
     ierr = MatCreateSeqDense(PETSC_COMM_SELF,V->k,V->k,NULL,&R);CHKERRQ(ierr);
   }
-  if (V->matrix) {
-    ierr = BV_IPMatMultBV(V);CHKERRQ(ierr);
-    B = V->matrix;
-    V->matrix = NULL;
-    ierr = BVDot(V->cached,V,R);CHKERRQ(ierr);
-    V->matrix = B;
-  } else {
-    ierr = BVDot(V,V,R);CHKERRQ(ierr);
-  }
+  ierr = BVDot(V,V,R);CHKERRQ(ierr);
   ierr = MatCholeskyFactorInvert(R,V->l,&S);CHKERRQ(ierr);
   ierr = BVMultInPlace(V,S,V->l,V->k);CHKERRQ(ierr);
   ierr = MatDestroy(&S);CHKERRQ(ierr);
@@ -595,6 +601,12 @@ static PetscErrorCode BVOrthogonalize_Chol(BV V,Mat Rin)
    BVSetOrthogonalization(). If set to GS, the computation is done column by
    column with successive calls to BVOrthogonalizeColumn().
 
+   If V is rank-deficient or very ill-conditioned, that is, one or more columns are
+   (almost) linearly dependent with respect to the rest, then the algorithm may
+   break down or result in larger numerical error. Linearly dependent columns are
+   essentially replaced by random directions, and the corresponding diagonal entry
+   in R is set to (nearly) zero.
+
    Level: intermediate
 
 .seealso: BVOrthogonalizeColumn(), BVOrthogonalizeVec(), BVSetActiveColumns(), BVSetOrthogonalization(), BVOrthogBlockType
diff --git a/src/sys/classes/bv/interface/bvorthog.c.html b/src/sys/classes/bv/interface/bvorthog.c.html
index 03dee7e..acf32ee 100644
--- a/src/sys/classes/bv/interface/bvorthog.c.html
+++ b/src/sys/classes/bv/interface/bvorthog.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvorthog.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:26+00:00">
+<meta name="date" content="2016-05-16T10:32:19+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvorthog.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvorthog.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> orthogonalization routines.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -158,437 +158,448 @@
 <a name="line158">158: </a>      BVOrthogonalizeMGS1(bv,k,w,which,bv->c);
 <a name="line159">159: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
 <a name="line160">160: </a>    }
-<a name="line161">161: </a>    <font color="#4169E1">if</font> (lindep) {
-<a name="line162">162: </a>      <font color="#4169E1">if</font> (nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-<a name="line163">163: </a>      <font color="#4169E1">else</font> *lindep = PETSC_FALSE;
-<a name="line164">164: </a>    }
-<a name="line165">165: </a>    <font color="#4169E1">break</font>;
-
-<a name="line167">167: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
-<a name="line168">168: </a>    BVOrthogonalizeMGS1(bv,k,w,which,bv->h);
-<a name="line169">169: </a>    <font color="#B22222">/* compute |v| */</font>
-<a name="line170">170: </a>    <font color="#4169E1">if</font> (norm || lindep) {
-<a name="line171">171: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
-<a name="line172">172: </a>    }
-<a name="line173">173: </a>    <font color="#B22222">/* linear dependence check: just test for exactly zero norm */</font>
-<a name="line174">174: </a>    <font color="#4169E1">if</font> (lindep) *lindep = nrm? PETSC_FALSE: PETSC_TRUE;
-<a name="line175">175: </a>    <font color="#4169E1">break</font>;
-
-<a name="line177">177: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
-<a name="line178">178: </a>    <font color="#B22222">/* first step */</font>
-<a name="line179">179: </a>    BVOrthogonalizeMGS1(bv,k,w,which,bv->h);
-<a name="line180">180: </a>    <font color="#4169E1">if</font> (lindep) {
-<a name="line181">181: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&onrm);
-<a name="line182">182: </a>    }
-<a name="line183">183: </a>    <font color="#B22222">/* second step */</font>
-<a name="line184">184: </a>    BVOrthogonalizeMGS1(bv,k,w,which,bv->h);
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (norm || lindep) {
-<a name="line186">186: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
-<a name="line187">187: </a>    }
-<a name="line188">188: </a>    <font color="#4169E1">if</font> (lindep) {
-<a name="line189">189: </a>      <font color="#4169E1">if</font> (nrm==0.0 || nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-<a name="line190">190: </a>      <font color="#4169E1">else</font> *lindep = PETSC_FALSE;
-<a name="line191">191: </a>    }
-<a name="line192">192: </a>    <font color="#4169E1">break</font>;
-<a name="line193">193: </a>  }
-<a name="line194">194: </a>  <font color="#4169E1">if</font> (bv->indef) {
-<a name="line195">195: </a>    <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
-<a name="line196">196: </a>    bv->omega[bv->nc+j] = (nrm<0.0)? -1.0: 1.0;
-<a name="line197">197: </a>  }
-<a name="line198">198: </a>  <font color="#4169E1">if</font> (!v) { <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&w); }
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (norm) *norm = nrm;
-<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
-<a name="line201">201: </a>}
-
-<a name="line205">205: </a><font color="#B22222">/*</font>
-<a name="line206">206: </a><font color="#B22222">  BVOrthogonalizeCGS - Orthogonalize with classical Gram-Schmidt</font>
-<a name="line207">207: </a><font color="#B22222">*/</font>
-<a name="line208">208: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeCGS"></a>static PetscErrorCode BVOrthogonalizeCGS(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
-<a name="line209">209: </a>{
-<a name="line211">211: </a>  PetscReal      onrm,nrm;
-<a name="line212">212: </a>  PetscInt       i,k,l;
-
-<a name="line215">215: </a>  <font color="#4169E1">if</font> (v) k = bv->k;
-<a name="line216">216: </a>  <font color="#4169E1">else</font> k = j;
-<a name="line217">217: </a>  <font color="#4169E1">switch</font> (bv->orthog_ref) {
-
-<a name="line219">219: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
-<a name="line220">220: </a>    BVOrthogonalizeCGS1(bv,k,v,bv->h,&onrm,&nrm);
-<a name="line221">221: </a>    <font color="#B22222">/* ||q|| < eta ||h|| */</font>
-<a name="line222">222: </a>    l = 1;
-<a name="line223">223: </a>    <font color="#4169E1">while</font> (l<3 && nrm && nrm < bv->orthog_eta*onrm) {
-<a name="line224">224: </a>      l++;
-<a name="line225">225: </a>      BVOrthogonalizeCGS1(bv,k,v,bv->c,&onrm,&nrm);
-<a name="line226">226: </a>      <font color="#4169E1">for</font> (i=0;i<bv->nc+k;i++) bv->h[i] += bv->c[i];
-<a name="line227">227: </a>    }
-<a name="line228">228: </a>    <font color="#4169E1">if</font> (norm) *norm = nrm;
-<a name="line229">229: </a>    <font color="#4169E1">if</font> (lindep) {
-<a name="line230">230: </a>      <font color="#4169E1">if</font> (nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-<a name="line231">231: </a>      <font color="#4169E1">else</font> *lindep = PETSC_FALSE;
+<a name="line161">161: </a>    <font color="#4169E1">if</font> (lindep) *lindep = PetscNot(nrm >= bv->orthog_eta*onrm);
+<a name="line162">162: </a>    <font color="#4169E1">break</font>;
+
+<a name="line164">164: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
+<a name="line165">165: </a>    BVOrthogonalizeMGS1(bv,k,w,which,bv->h);
+<a name="line166">166: </a>    <font color="#B22222">/* compute |v| */</font>
+<a name="line167">167: </a>    <font color="#4169E1">if</font> (norm || lindep) {
+<a name="line168">168: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
+<a name="line169">169: </a>    }
+<a name="line170">170: </a>    <font color="#B22222">/* linear dependence check: just test for exactly zero norm */</font>
+<a name="line171">171: </a>    <font color="#4169E1">if</font> (lindep) *lindep = PetscNot(nrm);
+<a name="line172">172: </a>    <font color="#4169E1">break</font>;
+
+<a name="line174">174: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
+<a name="line175">175: </a>    <font color="#B22222">/* first step */</font>
+<a name="line176">176: </a>    BVOrthogonalizeMGS1(bv,k,w,which,bv->h);
+<a name="line177">177: </a>    <font color="#4169E1">if</font> (lindep) {
+<a name="line178">178: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&onrm);
+<a name="line179">179: </a>    }
+<a name="line180">180: </a>    <font color="#B22222">/* second step */</font>
+<a name="line181">181: </a>    BVOrthogonalizeMGS1(bv,k,w,which,bv->h);
+<a name="line182">182: </a>    <font color="#4169E1">if</font> (norm || lindep) {
+<a name="line183">183: </a>      <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
+<a name="line184">184: </a>    }
+<a name="line185">185: </a>    <font color="#4169E1">if</font> (lindep) *lindep = PetscNot(nrm && nrm >= bv->orthog_eta*onrm);
+<a name="line186">186: </a>    <font color="#4169E1">break</font>;
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  <font color="#4169E1">if</font> (bv->indef) {
+<a name="line189">189: </a>    <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,w,NORM_2,&nrm);
+<a name="line190">190: </a>    bv->omega[bv->nc+j] = (nrm<0.0)? -1.0: 1.0;
+<a name="line191">191: </a>  }
+<a name="line192">192: </a>  <font color="#4169E1">if</font> (!v) { <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(bv,j,&w); }
+<a name="line193">193: </a>  <font color="#4169E1">if</font> (norm) *norm = nrm;
+<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
+<a name="line195">195: </a>}
+
+<a name="line199">199: </a><font color="#B22222">/*</font>
+<a name="line200">200: </a><font color="#B22222">  BVOrthogonalizeCGS - Orthogonalize with classical Gram-Schmidt</font>
+<a name="line201">201: </a><font color="#B22222">*/</font>
+<a name="line202">202: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeCGS"></a>static PetscErrorCode BVOrthogonalizeCGS(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
+<a name="line203">203: </a>{
+<a name="line205">205: </a>  PetscReal      onrm,nrm;
+<a name="line206">206: </a>  PetscInt       i,k,l;
+
+<a name="line209">209: </a>  <font color="#4169E1">if</font> (v) k = bv->k;
+<a name="line210">210: </a>  <font color="#4169E1">else</font> k = j;
+<a name="line211">211: </a>  <font color="#4169E1">switch</font> (bv->orthog_ref) {
+
+<a name="line213">213: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_IFNEEDED:
+<a name="line214">214: </a>    BVOrthogonalizeCGS1(bv,k,v,bv->h,&onrm,&nrm);
+<a name="line215">215: </a>    <font color="#B22222">/* ||q|| < eta ||h|| */</font>
+<a name="line216">216: </a>    l = 1;
+<a name="line217">217: </a>    <font color="#4169E1">while</font> (l<3 && nrm && nrm < bv->orthog_eta*onrm) {
+<a name="line218">218: </a>      l++;
+<a name="line219">219: </a>      BVOrthogonalizeCGS1(bv,k,v,bv->c,&onrm,&nrm);
+<a name="line220">220: </a>      <font color="#4169E1">for</font> (i=0;i<bv->nc+k;i++) bv->h[i] += bv->c[i];
+<a name="line221">221: </a>    }
+<a name="line222">222: </a>    <font color="#4169E1">if</font> (norm) *norm = nrm;
+<a name="line223">223: </a>    <font color="#4169E1">if</font> (lindep) *lindep = PetscNot(nrm >= bv->orthog_eta*onrm);
+<a name="line224">224: </a>    <font color="#4169E1">break</font>;
+
+<a name="line226">226: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
+<a name="line227">227: </a>    BVOrthogonalizeCGS1(bv,k,v,bv->h,NULL,NULL);
+<a name="line228">228: </a>    <font color="#B22222">/* compute |v| */</font>
+<a name="line229">229: </a>    <font color="#4169E1">if</font> (norm || lindep) {
+<a name="line230">230: </a>      <font color="#4169E1">if</font> (v) { <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,v,NORM_2,&nrm); }
+<a name="line231">231: </a>      <font color="#4169E1">else</font> { <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(bv,k,NORM_2,&nrm); }
 <a name="line232">232: </a>    }
-<a name="line233">233: </a>    <font color="#4169E1">break</font>;
-
-<a name="line235">235: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_NEVER:
-<a name="line236">236: </a>    BVOrthogonalizeCGS1(bv,k,v,bv->h,NULL,NULL);
-<a name="line237">237: </a>    <font color="#B22222">/* compute |v| */</font>
-<a name="line238">238: </a>    <font color="#4169E1">if</font> (norm || lindep) {
-<a name="line239">239: </a>      <font color="#4169E1">if</font> (v) { <a href="../../../../../docs/manualpages/BV/BVNormVec.html#BVNormVec">BVNormVec</a>(bv,v,NORM_2,&nrm); }
-<a name="line240">240: </a>      <font color="#4169E1">else</font> { <a href="../../../../../docs/manualpages/BV/BVNormColumn.html#BVNormColumn">BVNormColumn</a>(bv,k,NORM_2,&nrm); }
-<a name="line241">241: </a>    }
-<a name="line242">242: </a>    <font color="#4169E1">if</font> (norm) *norm = nrm;
-<a name="line243">243: </a>    <font color="#B22222">/* linear dependence check: just test for exactly zero norm */</font>
-<a name="line244">244: </a>    <font color="#4169E1">if</font> (lindep) *lindep = nrm? PETSC_FALSE: PETSC_TRUE;
-<a name="line245">245: </a>    <font color="#4169E1">break</font>;
-
-<a name="line247">247: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
-<a name="line248">248: </a>    BVOrthogonalizeCGS1(bv,k,v,bv->h,NULL,NULL);
-<a name="line249">249: </a>    <font color="#4169E1">if</font> (lindep) {
-<a name="line250">250: </a>      BVOrthogonalizeCGS1(bv,k,v,bv->c,&onrm,&nrm);
-<a name="line251">251: </a>      <font color="#4169E1">if</font> (norm) *norm = nrm;
-<a name="line252">252: </a>      <font color="#4169E1">if</font> (nrm==0.0 || nrm < bv->orthog_eta*onrm) *lindep = PETSC_TRUE;
-<a name="line253">253: </a>      <font color="#4169E1">else</font> *lindep = PETSC_FALSE;
-<a name="line254">254: </a>    } <font color="#4169E1">else</font> {
-<a name="line255">255: </a>      BVOrthogonalizeCGS1(bv,k,v,bv->c,NULL,norm);
-<a name="line256">256: </a>    }
-<a name="line257">257: </a>    <font color="#4169E1">for</font> (i=0;i<bv->nc+k;i++) bv->h[i] += bv->c[i];
-<a name="line258">258: </a>    <font color="#4169E1">break</font>;
-<a name="line259">259: </a>  }
-<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
-<a name="line261">261: </a>}
-
-<a name="line265">265: </a><font color="#B22222">/*@</font>
-<a name="line266">266: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a> - Orthogonalize a given vector with respect to all</font>
-<a name="line267">267: </a><font color="#B22222">   active columns.</font>
-
-<a name="line269">269: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line271">271: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line272">272: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line273">273: </a><font color="#B22222">-  v      - the vector</font>
-
-<a name="line275">275: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line276">276: </a><font color="#B22222">+  H      - (optional) coefficients computed during orthogonalization</font>
-<a name="line277">277: </a><font color="#B22222">.  norm   - (optional) norm of the vector after being orthogonalized</font>
-<a name="line278">278: </a><font color="#B22222">-  lindep - (optional) flag indicating that refinement did not improve the quality</font>
-<a name="line279">279: </a><font color="#B22222">            of orthogonalization</font>
-
-<a name="line281">281: </a><font color="#B22222">   Notes:</font>
-<a name="line282">282: </a><font color="#B22222">   This function is equivalent to <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>() but orthogonalizes</font>
-<a name="line283">283: </a><font color="#B22222">   a vector as an argument rather than taking one of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> columns. The</font>
-<a name="line284">284: </a><font color="#B22222">   vector is orthogonalized against all active columns.</font>
-
-<a name="line286">286: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line288">288: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
-<a name="line289">289: </a><font color="#B22222">@*/</font>
-<a name="line290">290: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
-<a name="line291">291: </a>{
-<a name="line293">293: </a>  PetscInt       i,ksave,lsave;
-
-<a name="line299">299: </a>  BVCheckSizes(bv,1);
-
-<a name="line303">303: </a>  PetscLogEventBegin(BV_Orthogonalize,bv,0,0,0);
-<a name="line304">304: </a>  ksave = bv->k;
-<a name="line305">305: </a>  lsave = bv->l;
-<a name="line306">306: </a>  bv->l = -bv->nc;  <font color="#B22222">/* must also orthogonalize against constraints and leading columns */</font>
-<a name="line307">307: </a>  BV_AllocateCoeffs(bv);
-<a name="line308">308: </a>  BV_AllocateSignature(bv);
-<a name="line309">309: </a>  <font color="#4169E1">switch</font> (bv->orthog_type) {
-<a name="line310">310: </a>  <font color="#4169E1">case</font> BV_ORTHOG_CGS:
-<a name="line311">311: </a>    BVOrthogonalizeCGS(bv,0,v,H,norm,lindep);
-<a name="line312">312: </a>    <font color="#4169E1">break</font>;
-<a name="line313">313: </a>  <font color="#4169E1">case</font> BV_ORTHOG_MGS:
-<a name="line314">314: </a>    BVOrthogonalizeMGS(bv,0,v,NULL,H,norm,lindep);
-<a name="line315">315: </a>    <font color="#4169E1">break</font>;
-<a name="line316">316: </a>  }
-<a name="line317">317: </a>  bv->k = ksave;
-<a name="line318">318: </a>  bv->l = lsave;
-<a name="line319">319: </a>  <font color="#4169E1">if</font> (H) <font color="#4169E1">for</font> (i=bv->l;i<bv->k;i++) H[i-bv->l] = bv->h[bv->nc+i];
-<a name="line320">320: </a>  PetscLogEventEnd(BV_Orthogonalize,bv,0,0,0);
-<a name="line321">321: </a>  <font color="#4169E1">return</font>(0);
-<a name="line322">322: </a>}
-
-<a name="line326">326: </a><font color="#B22222">/*@</font>
-<a name="line327">327: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a> - Orthogonalize one of the column vectors with respect to</font>
-<a name="line328">328: </a><font color="#B22222">   the previous ones.</font>
-
-<a name="line330">330: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line332">332: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line333">333: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line334">334: </a><font color="#B22222">-  j      - index of column to be orthogonalized</font>
-
-<a name="line336">336: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line337">337: </a><font color="#B22222">+  H      - (optional) coefficients computed during orthogonalization</font>
-<a name="line338">338: </a><font color="#B22222">.  norm   - (optional) norm of the vector after being orthogonalized</font>
-<a name="line339">339: </a><font color="#B22222">-  lindep - (optional) flag indicating that refinement did not improve the quality</font>
-<a name="line340">340: </a><font color="#B22222">            of orthogonalization</font>
-
-<a name="line342">342: </a><font color="#B22222">   Notes:</font>
-<a name="line343">343: </a><font color="#B22222">   This function applies an orthogonal projector to project vector V[j] onto</font>
-<a name="line344">344: </a><font color="#B22222">   the orthogonal complement of the span of the columns of V[0..j-1],</font>
-<a name="line345">345: </a><font color="#B22222">   where V[.] are the vectors of <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>. The columns V[0..j-1] are assumed to be</font>
-<a name="line346">346: </a><font color="#B22222">   mutually orthonormal.</font>
-
-<a name="line348">348: </a><font color="#B22222">   Leading columns V[0..l-1] also participate in the orthogonalization.</font>
-
-<a name="line350">350: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
-<a name="line351">351: </a><font color="#B22222">   then the vector is B-orthogonalized, using the non-standard inner product</font>
-<a name="line352">352: </a><font color="#B22222">   defined by matrix B. The output vector satisfies V[j]'*B*V[0..j-1] = 0.</font>
-
-<a name="line354">354: </a><font color="#B22222">   This routine does not normalize the resulting vector.</font>
-
-<a name="line356">356: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line358">358: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a [...]
-<a name="line359">359: </a><font color="#B22222">@*/</font>
-<a name="line360">360: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
-<a name="line361">361: </a>{
-<a name="line363">363: </a>  PetscInt       i,ksave,lsave;
-
-<a name="line369">369: </a>  BVCheckSizes(bv,1);
-<a name="line370">370: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line371">371: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,bv->m);
-
-<a name="line373">373: </a>  PetscLogEventBegin(BV_Orthogonalize,bv,0,0,0);
-<a name="line374">374: </a>  ksave = bv->k;
-<a name="line375">375: </a>  lsave = bv->l;
-<a name="line376">376: </a>  bv->l = -bv->nc;  <font color="#B22222">/* must also orthogonalize against constraints and leading columns */</font>
-<a name="line377">377: </a>  BV_AllocateCoeffs(bv);
-<a name="line378">378: </a>  BV_AllocateSignature(bv);
-<a name="line379">379: </a>  <font color="#4169E1">switch</font> (bv->orthog_type) {
-<a name="line380">380: </a>  <font color="#4169E1">case</font> BV_ORTHOG_CGS:
-<a name="line381">381: </a>    BVOrthogonalizeCGS(bv,j,NULL,H,norm,lindep);
-<a name="line382">382: </a>    <font color="#4169E1">break</font>;
-<a name="line383">383: </a>  <font color="#4169E1">case</font> BV_ORTHOG_MGS:
-<a name="line384">384: </a>    BVOrthogonalizeMGS(bv,j,NULL,NULL,H,norm,lindep);
-<a name="line385">385: </a>    <font color="#4169E1">break</font>;
-<a name="line386">386: </a>  }
-<a name="line387">387: </a>  bv->k = ksave;
-<a name="line388">388: </a>  bv->l = lsave;
-<a name="line389">389: </a>  <font color="#4169E1">if</font> (H) <font color="#4169E1">for</font> (i=bv->l;i<j;i++) H[i-bv->l] = bv->h[bv->nc+i];
-<a name="line390">390: </a>  PetscLogEventEnd(BV_Orthogonalize,bv,0,0,0);
-<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
-<a name="line392">392: </a>}
-
-<a name="line396">396: </a><font color="#B22222">/*@</font>
-<a name="line397">397: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</a> - Orthogonalize one of the column vectors with</font>
-<a name="line398">398: </a><font color="#B22222">   respect to some of the previous ones.</font>
-
-<a name="line400">400: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line402">402: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line403">403: </a><font color="#B22222">+  bv     - the basis vectors context</font>
-<a name="line404">404: </a><font color="#B22222">.  j      - index of column to be orthogonalized</font>
-<a name="line405">405: </a><font color="#B22222">-  which  - logical array indicating selected columns</font>
-
-<a name="line407">407: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line408">408: </a><font color="#B22222">+  H      - (optional) coefficients computed during orthogonalization</font>
-<a name="line409">409: </a><font color="#B22222">.  norm   - (optional) norm of the vector after being orthogonalized</font>
-<a name="line410">410: </a><font color="#B22222">-  lindep - (optional) flag indicating that refinement did not improve the quality</font>
-<a name="line411">411: </a><font color="#B22222">            of orthogonalization</font>
-
-<a name="line413">413: </a><font color="#B22222">   Notes:</font>
-<a name="line414">414: </a><font color="#B22222">   This function is similar to <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), but V[j] is</font>
-<a name="line415">415: </a><font color="#B22222">   orthogonalized only against columns V[i] having which[i]=PETSC_TRUE.</font>
-<a name="line416">416: </a><font color="#B22222">   The length of array which must be j at least.</font>
-
-<a name="line418">418: </a><font color="#B22222">   The use of this operation is restricted to MGS orthogonalization type.</font>
-
-<a name="line420">420: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line422">422: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>()</font>
-<a name="line423">423: </a><font color="#B22222">@*/</font>
-<a name="line424">424: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeSomeColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
-<a name="line425">425: </a>{
-<a name="line427">427: </a>  PetscInt       i,ksave,lsave;
-
-<a name="line434">434: </a>  BVCheckSizes(bv,1);
-<a name="line435">435: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
-<a name="line436">436: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,bv->m);
-<a name="line437">437: </a>  <font color="#4169E1">if</font> (bv->orthog_type!=BV_ORTHOG_MGS) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Operation only available for MGS orthogonalization"</font>);
-
-<a name="line439">439: </a>  PetscLogEventBegin(BV_Orthogonalize,bv,0,0,0);
-<a name="line440">440: </a>  ksave = bv->k;
-<a name="line441">441: </a>  lsave = bv->l;
-<a name="line442">442: </a>  bv->l = -bv->nc;  <font color="#B22222">/* must also orthogonalize against constraints and leading columns */</font>
-<a name="line443">443: </a>  BV_AllocateCoeffs(bv);
-<a name="line444">444: </a>  BV_AllocateSignature(bv);
-<a name="line445">445: </a>  BVOrthogonalizeMGS(bv,j,NULL,which,H,norm,lindep);
-<a name="line446">446: </a>  bv->k = ksave;
-<a name="line447">447: </a>  bv->l = lsave;
-<a name="line448">448: </a>  <font color="#4169E1">if</font> (H) <font color="#4169E1">for</font> (i=bv->l;i<j;i++) H[i-bv->l] = bv->h[bv->nc+i];
-<a name="line449">449: </a>  PetscLogEventEnd(BV_Orthogonalize,bv,0,0,0);
-<a name="line450">450: </a>  <font color="#4169E1">return</font>(0);
-<a name="line451">451: </a>}
-
-<a name="line455">455: </a><font color="#B22222">/*</font>
-<a name="line456">456: </a><font color="#B22222">   Orthogonalize a set of vectors with Gram-Schmidt, column by column.</font>
-<a name="line457">457: </a><font color="#B22222"> */</font>
-<a name="line458">458: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_GS"></a>static PetscErrorCode BVOrthogonalize_GS(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
-<a name="line459">459: </a>{
-<a name="line461">461: </a>  PetscScalar    *r=NULL;
-<a name="line462">462: </a>  PetscReal      norm;
-<a name="line463">463: </a>  PetscInt       j,ldr;
-<a name="line464">464: </a>  Vec            v;
-
-<a name="line467">467: </a>  <font color="#4169E1">if</font> (R) {
-<a name="line468">468: </a>    MatGetSize(R,&ldr,NULL);
-<a name="line469">469: </a>    MatDenseGetArray(R,&r);
-<a name="line470">470: </a>  }
-<a name="line471">471: </a>  <font color="#4169E1">if</font> (V->matrix) {
-<a name="line472">472: </a>    BV_AllocateCachedBV(V);
-<a name="line473">473: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V->cached,V->l,V->k);
-<a name="line474">474: </a>  }
-<a name="line475">475: </a>  <font color="#4169E1">for</font> (j=V->l;j<V->k;j++) {
-<a name="line476">476: </a>    <font color="#4169E1">if</font> (R) {
-<a name="line477">477: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,j,r+j*ldr+V->l,&norm,NULL);
-<a name="line478">478: </a>      r[j+j*ldr] = norm;
-<a name="line479">479: </a>    } <font color="#4169E1">else</font> {
-<a name="line480">480: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,j,NULL,&norm,NULL);
-<a name="line481">481: </a>    }
-<a name="line482">482: </a>    <font color="#4169E1">if</font> (V->matrix) { <font color="#B22222">/* fill cached <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> */</font>
-<a name="line483">483: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V->cached,j,&v);
-<a name="line484">484: </a>      VecCopy(V->Bx,v);
-<a name="line485">485: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V->cached,j,&v);
-<a name="line486">486: </a>    }
-<a name="line487">487: </a>    <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,j,1.0/norm);
-<a name="line488">488: </a>  }
-<a name="line489">489: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
-<a name="line490">490: </a>  <font color="#4169E1">return</font>(0);
-<a name="line491">491: </a>}
-
-<a name="line495">495: </a><font color="#B22222">/*</font>
-<a name="line496">496: </a><font color="#B22222">   Compute the upper Cholesky factor in R and its inverse in S.</font>
-<a name="line497">497: </a><font color="#B22222"> */</font>
-<a name="line498">498: </a><strong><font color="#4169E1"><a name="MatCholeskyFactorInvert"></a>static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)</font></strong>
-<a name="line499">499: </a>{
-<a name="line501">501: </a>  PetscInt       i,n,m,ld;
-<a name="line502">502: </a>  PetscScalar    *pR,*pS,done=1.0;
-<a name="line503">503: </a>  PetscBLASInt   info,n_,l_,m_,ld_;
-
-<a name="line506">506: </a>  MatGetSize(R,&m,NULL);
-<a name="line507">507: </a>  n = m-l;
-<a name="line508">508: </a>  PetscBLASIntCast(m,&m_);
-<a name="line509">509: </a>  PetscBLASIntCast(l,&l_);
-<a name="line510">510: </a>  PetscBLASIntCast(n,&n_);
-<a name="line511">511: </a>  ld  = m;
-<a name="line512">512: </a>  ld_ = m_;
-<a name="line513">513: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ld,ld,NULL,S);
-<a name="line514">514: </a>  MatDenseGetArray(R,&pR);
-<a name="line515">515: </a>  MatDenseGetArray(*S,&pS);
+<a name="line233">233: </a>    <font color="#4169E1">if</font> (norm) *norm = nrm;
+<a name="line234">234: </a>    <font color="#B22222">/* linear dependence check: just test for exactly zero norm */</font>
+<a name="line235">235: </a>    <font color="#4169E1">if</font> (lindep) *lindep = PetscNot(nrm);
+<a name="line236">236: </a>    <font color="#4169E1">break</font>;
+
+<a name="line238">238: </a>  <font color="#4169E1">case</font> BV_ORTHOG_REFINE_ALWAYS:
+<a name="line239">239: </a>    BVOrthogonalizeCGS1(bv,k,v,bv->h,NULL,NULL);
+<a name="line240">240: </a>    <font color="#4169E1">if</font> (lindep) {
+<a name="line241">241: </a>      BVOrthogonalizeCGS1(bv,k,v,bv->c,&onrm,&nrm);
+<a name="line242">242: </a>      <font color="#4169E1">if</font> (norm) *norm = nrm;
+<a name="line243">243: </a>      *lindep = PetscNot(nrm && nrm >= bv->orthog_eta*onrm);
+<a name="line244">244: </a>    } <font color="#4169E1">else</font> {
+<a name="line245">245: </a>      BVOrthogonalizeCGS1(bv,k,v,bv->c,NULL,norm);
+<a name="line246">246: </a>    }
+<a name="line247">247: </a>    <font color="#4169E1">for</font> (i=0;i<bv->nc+k;i++) bv->h[i] += bv->c[i];
+<a name="line248">248: </a>    <font color="#4169E1">break</font>;
+<a name="line249">249: </a>  }
+<a name="line250">250: </a>  <font color="#4169E1">return</font>(0);
+<a name="line251">251: </a>}
+
+<a name="line255">255: </a><font color="#B22222">/*@</font>
+<a name="line256">256: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a> - Orthogonalize a given vector with respect to all</font>
+<a name="line257">257: </a><font color="#B22222">   active columns.</font>
+
+<a name="line259">259: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line261">261: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line262">262: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line263">263: </a><font color="#B22222">-  v      - the vector</font>
+
+<a name="line265">265: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line266">266: </a><font color="#B22222">+  H      - (optional) coefficients computed during orthogonalization</font>
+<a name="line267">267: </a><font color="#B22222">.  norm   - (optional) norm of the vector after being orthogonalized</font>
+<a name="line268">268: </a><font color="#B22222">-  lindep - (optional) flag indicating that refinement did not improve the quality</font>
+<a name="line269">269: </a><font color="#B22222">            of orthogonalization</font>
+
+<a name="line271">271: </a><font color="#B22222">   Notes:</font>
+<a name="line272">272: </a><font color="#B22222">   This function is equivalent to <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>() but orthogonalizes</font>
+<a name="line273">273: </a><font color="#B22222">   a vector as an argument rather than taking one of the <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> columns. The</font>
+<a name="line274">274: </a><font color="#B22222">   vector is orthogonalized against all active columns.</font>
+
+<a name="line276">276: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line278">278: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>()</font>
+<a name="line279">279: </a><font color="#B22222">@*/</font>
+<a name="line280">280: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,Vec v,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
+<a name="line281">281: </a>{
+<a name="line283">283: </a>  PetscInt       i,ksave,lsave;
+
+<a name="line289">289: </a>  BVCheckSizes(bv,1);
+
+<a name="line293">293: </a>  PetscLogEventBegin(BV_OrthogonalizeVec,bv,0,0,0);
+<a name="line294">294: </a>  ksave = bv->k;
+<a name="line295">295: </a>  lsave = bv->l;
+<a name="line296">296: </a>  bv->l = -bv->nc;  <font color="#B22222">/* must also orthogonalize against constraints and leading columns */</font>
+<a name="line297">297: </a>  BV_AllocateCoeffs(bv);
+<a name="line298">298: </a>  BV_AllocateSignature(bv);
+<a name="line299">299: </a>  <font color="#4169E1">switch</font> (bv->orthog_type) {
+<a name="line300">300: </a>  <font color="#4169E1">case</font> BV_ORTHOG_CGS:
+<a name="line301">301: </a>    BVOrthogonalizeCGS(bv,0,v,H,norm,lindep);
+<a name="line302">302: </a>    <font color="#4169E1">break</font>;
+<a name="line303">303: </a>  <font color="#4169E1">case</font> BV_ORTHOG_MGS:
+<a name="line304">304: </a>    BVOrthogonalizeMGS(bv,0,v,NULL,H,norm,lindep);
+<a name="line305">305: </a>    <font color="#4169E1">break</font>;
+<a name="line306">306: </a>  }
+<a name="line307">307: </a>  bv->k = ksave;
+<a name="line308">308: </a>  bv->l = lsave;
+<a name="line309">309: </a>  <font color="#4169E1">if</font> (H) <font color="#4169E1">for</font> (i=bv->l;i<bv->k;i++) H[i-bv->l] = bv->h[bv->nc+i];
+<a name="line310">310: </a>  PetscLogEventEnd(BV_OrthogonalizeVec,bv,0,0,0);
+<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
+<a name="line312">312: </a>}
+
+<a name="line316">316: </a><font color="#B22222">/*@</font>
+<a name="line317">317: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a> - Orthogonalize one of the column vectors with respect to</font>
+<a name="line318">318: </a><font color="#B22222">   the previous ones.</font>
+
+<a name="line320">320: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line322">322: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line323">323: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line324">324: </a><font color="#B22222">-  j      - index of column to be orthogonalized</font>
+
+<a name="line326">326: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line327">327: </a><font color="#B22222">+  H      - (optional) coefficients computed during orthogonalization</font>
+<a name="line328">328: </a><font color="#B22222">.  norm   - (optional) norm of the vector after being orthogonalized</font>
+<a name="line329">329: </a><font color="#B22222">-  lindep - (optional) flag indicating that refinement did not improve the quality</font>
+<a name="line330">330: </a><font color="#B22222">            of orthogonalization</font>
+
+<a name="line332">332: </a><font color="#B22222">   Notes:</font>
+<a name="line333">333: </a><font color="#B22222">   This function applies an orthogonal projector to project vector V[j] onto</font>
+<a name="line334">334: </a><font color="#B22222">   the orthogonal complement of the span of the columns of V[0..j-1],</font>
+<a name="line335">335: </a><font color="#B22222">   where V[.] are the vectors of <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a>. The columns V[0..j-1] are assumed to be</font>
+<a name="line336">336: </a><font color="#B22222">   mutually orthonormal.</font>
+
+<a name="line338">338: </a><font color="#B22222">   Leading columns V[0..l-1] also participate in the orthogonalization.</font>
+
+<a name="line340">340: </a><font color="#B22222">   If a non-standard inner product has been specified with <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(),</font>
+<a name="line341">341: </a><font color="#B22222">   then the vector is B-orthogonalized, using the non-standard inner product</font>
+<a name="line342">342: </a><font color="#B22222">   defined by matrix B. The output vector satisfies V[j]'*B*V[0..j-1] = 0.</font>
+
+<a name="line344">344: </a><font color="#B22222">   This routine does not normalize the resulting vector.</font>
+
+<a name="line346">346: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line348">348: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(), <a href="../../../../../docs/manualpages/BV/BVSetMatrix.html#BVSetMatrix">BVSetMatrix</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a [...]
+<a name="line349">349: </a><font color="#B22222">@*/</font>
+<a name="line350">350: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
+<a name="line351">351: </a>{
+<a name="line353">353: </a>  PetscInt       i,ksave,lsave;
+
+<a name="line359">359: </a>  BVCheckSizes(bv,1);
+<a name="line360">360: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line361">361: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,bv->m);
+
+<a name="line363">363: </a>  PetscLogEventBegin(BV_OrthogonalizeVec,bv,0,0,0);
+<a name="line364">364: </a>  ksave = bv->k;
+<a name="line365">365: </a>  lsave = bv->l;
+<a name="line366">366: </a>  bv->l = -bv->nc;  <font color="#B22222">/* must also orthogonalize against constraints and leading columns */</font>
+<a name="line367">367: </a>  BV_AllocateCoeffs(bv);
+<a name="line368">368: </a>  BV_AllocateSignature(bv);
+<a name="line369">369: </a>  <font color="#4169E1">switch</font> (bv->orthog_type) {
+<a name="line370">370: </a>  <font color="#4169E1">case</font> BV_ORTHOG_CGS:
+<a name="line371">371: </a>    BVOrthogonalizeCGS(bv,j,NULL,H,norm,lindep);
+<a name="line372">372: </a>    <font color="#4169E1">break</font>;
+<a name="line373">373: </a>  <font color="#4169E1">case</font> BV_ORTHOG_MGS:
+<a name="line374">374: </a>    BVOrthogonalizeMGS(bv,j,NULL,NULL,H,norm,lindep);
+<a name="line375">375: </a>    <font color="#4169E1">break</font>;
+<a name="line376">376: </a>  }
+<a name="line377">377: </a>  bv->k = ksave;
+<a name="line378">378: </a>  bv->l = lsave;
+<a name="line379">379: </a>  <font color="#4169E1">if</font> (H) <font color="#4169E1">for</font> (i=bv->l;i<j;i++) H[i-bv->l] = bv->h[bv->nc+i];
+<a name="line380">380: </a>  PetscLogEventEnd(BV_OrthogonalizeVec,bv,0,0,0);
+<a name="line381">381: </a>  <font color="#4169E1">return</font>(0);
+<a name="line382">382: </a>}
+
+<a name="line386">386: </a><font color="#B22222">/*@</font>
+<a name="line387">387: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</a> - Orthogonalize one of the column vectors with</font>
+<a name="line388">388: </a><font color="#B22222">   respect to some of the previous ones.</font>
+
+<a name="line390">390: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line392">392: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line393">393: </a><font color="#B22222">+  bv     - the basis vectors context</font>
+<a name="line394">394: </a><font color="#B22222">.  j      - index of column to be orthogonalized</font>
+<a name="line395">395: </a><font color="#B22222">-  which  - logical array indicating selected columns</font>
+
+<a name="line397">397: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line398">398: </a><font color="#B22222">+  H      - (optional) coefficients computed during orthogonalization</font>
+<a name="line399">399: </a><font color="#B22222">.  norm   - (optional) norm of the vector after being orthogonalized</font>
+<a name="line400">400: </a><font color="#B22222">-  lindep - (optional) flag indicating that refinement did not improve the quality</font>
+<a name="line401">401: </a><font color="#B22222">            of orthogonalization</font>
+
+<a name="line403">403: </a><font color="#B22222">   Notes:</font>
+<a name="line404">404: </a><font color="#B22222">   This function is similar to <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), but V[j] is</font>
+<a name="line405">405: </a><font color="#B22222">   orthogonalized only against columns V[i] having which[i]=PETSC_TRUE.</font>
+<a name="line406">406: </a><font color="#B22222">   The length of array which must be j at least.</font>
+
+<a name="line408">408: </a><font color="#B22222">   The use of this operation is restricted to MGS orthogonalization type.</font>
+
+<a name="line410">410: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line412">412: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>()</font>
+<a name="line413">413: </a><font color="#B22222">@*/</font>
+<a name="line414">414: </a><strong><font color="#4169E1"><a name="BVOrthogonalizeSomeColumn"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeSomeColumn.html#BVOrthogonalizeSomeColumn">BVOrthogonalizeSomeColumn</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> bv,PetscInt j,PetscBool *which,PetscScalar *H,PetscReal *norm,PetscBool *lindep)</font></strong>
+<a name="line415">415: </a>{
+<a name="line417">417: </a>  PetscInt       i,ksave,lsave;
+
+<a name="line424">424: </a>  BVCheckSizes(bv,1);
+<a name="line425">425: </a>  <font color="#4169E1">if</font> (j<0) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j must be non-negative"</font>);
+<a name="line426">426: </a>  <font color="#4169E1">if</font> (j>=bv->m) SETERRQ2(PetscObjectComm((PetscObject)bv),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Index j=%D but <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> only has %D columns"</font>,j,bv->m);
+<a name="line427">427: </a>  <font color="#4169E1">if</font> (bv->orthog_type!=BV_ORTHOG_MGS) SETERRQ(PetscObjectComm((PetscObject)bv),PETSC_ERR_SUP,<font color="#666666">"Operation only available for MGS orthogonalization"</font>);
+
+<a name="line429">429: </a>  PetscLogEventBegin(BV_OrthogonalizeVec,bv,0,0,0);
+<a name="line430">430: </a>  ksave = bv->k;
+<a name="line431">431: </a>  lsave = bv->l;
+<a name="line432">432: </a>  bv->l = -bv->nc;  <font color="#B22222">/* must also orthogonalize against constraints and leading columns */</font>
+<a name="line433">433: </a>  BV_AllocateCoeffs(bv);
+<a name="line434">434: </a>  BV_AllocateSignature(bv);
+<a name="line435">435: </a>  BVOrthogonalizeMGS(bv,j,NULL,which,H,norm,lindep);
+<a name="line436">436: </a>  bv->k = ksave;
+<a name="line437">437: </a>  bv->l = lsave;
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (H) <font color="#4169E1">for</font> (i=bv->l;i<j;i++) H[i-bv->l] = bv->h[bv->nc+i];
+<a name="line439">439: </a>  PetscLogEventEnd(BV_OrthogonalizeVec,bv,0,0,0);
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
+
+<a name="line445">445: </a><font color="#B22222">/*</font>
+<a name="line446">446: </a><font color="#B22222">   Orthogonalize a set of vectors with Gram-Schmidt, column by column.</font>
+<a name="line447">447: </a><font color="#B22222"> */</font>
+<a name="line448">448: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_GS"></a>static PetscErrorCode BVOrthogonalize_GS(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
+<a name="line449">449: </a>{
+<a name="line451">451: </a>  PetscScalar    *r=NULL;
+<a name="line452">452: </a>  PetscReal      norm;
+<a name="line453">453: </a>  PetscInt       j,ldr;
+<a name="line454">454: </a>  Vec            v;
+
+<a name="line457">457: </a>  <font color="#4169E1">if</font> (R) {
+<a name="line458">458: </a>    MatGetSize(R,&ldr,NULL);
+<a name="line459">459: </a>    MatDenseGetArray(R,&r);
+<a name="line460">460: </a>  }
+<a name="line461">461: </a>  <font color="#4169E1">if</font> (V->matrix) {
+<a name="line462">462: </a>    BV_AllocateCachedBV(V);
+<a name="line463">463: </a>    <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(V->cached,V->l,V->k);
+<a name="line464">464: </a>  }
+<a name="line465">465: </a>  <font color="#4169E1">for</font> (j=V->l;j<V->k;j++) {
+<a name="line466">466: </a>    <font color="#4169E1">if</font> (R) {
+<a name="line467">467: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,j,r+j*ldr+V->l,&norm,NULL);
+<a name="line468">468: </a>      r[j+j*ldr] = norm;
+<a name="line469">469: </a>    } <font color="#4169E1">else</font> {
+<a name="line470">470: </a>      <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(V,j,NULL,&norm,NULL);
+<a name="line471">471: </a>    }
+<a name="line472">472: </a>    <font color="#4169E1">if</font> (!norm) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Breakdown in <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a> due to a linearly dependent column"</font>);
+<a name="line473">473: </a>    <font color="#4169E1">if</font> (V->matrix) { <font color="#B22222">/* fill cached <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> */</font>
+<a name="line474">474: </a>      <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V->cached,j,&v);
+<a name="line475">475: </a>      VecCopy(V->Bx,v);
+<a name="line476">476: </a>      <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V->cached,j,&v);
+<a name="line477">477: </a>    }
+<a name="line478">478: </a>    <a href="../../../../../docs/manualpages/BV/BVScaleColumn.html#BVScaleColumn">BVScaleColumn</a>(V,j,1.0/norm);
+<a name="line479">479: </a>  }
+<a name="line480">480: </a>  <font color="#4169E1">if</font> (R) { MatDenseRestoreArray(R,&r); }
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><font color="#B22222">/*</font>
+<a name="line487">487: </a><font color="#B22222">   Compute the upper Cholesky factor in R and its inverse in S.</font>
+<a name="line488">488: </a><font color="#B22222"> */</font>
+<a name="line489">489: </a><strong><font color="#4169E1"><a name="MatCholeskyFactorInvert"></a>static PetscErrorCode MatCholeskyFactorInvert(Mat R,PetscInt l,Mat *S)</font></strong>
+<a name="line490">490: </a>{
+<a name="line491">491: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_POTRF) || defined(SLEPC_MISSING_LAPACK_TRTRI)</font>
+<a name="line493">493: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"POTRF/TRTRI - Lapack routine is unavailable"</font>);
+<a name="line494">494: </a><font color="#A020F0">#else</font>
+<a name="line496">496: </a>  PetscInt       i,n,m,ld;
+<a name="line497">497: </a>  PetscScalar    *pR,*pS;
+<a name="line498">498: </a>  PetscBLASInt   info,n_,l_,m_,ld_;
+
+<a name="line501">501: </a>  MatGetSize(R,&m,NULL);
+<a name="line502">502: </a>  n = m-l;
+<a name="line503">503: </a>  PetscBLASIntCast(m,&m_);
+<a name="line504">504: </a>  PetscBLASIntCast(l,&l_);
+<a name="line505">505: </a>  PetscBLASIntCast(n,&n_);
+<a name="line506">506: </a>  ld  = m;
+<a name="line507">507: </a>  ld_ = m_;
+<a name="line508">508: </a>  MatCreateSeqDense(PETSC_COMM_SELF,ld,ld,NULL,S);
+<a name="line509">509: </a>  MatDenseGetArray(R,&pR);
+<a name="line510">510: </a>  MatDenseGetArray(*S,&pS);
+
+<a name="line512">512: </a>  <font color="#B22222">/* save a copy of matrix in S */</font>
+<a name="line513">513: </a>  <font color="#4169E1">for</font> (i=l;i<m;i++) {
+<a name="line514">514: </a>    PetscMemcpy(pS+i*ld+l,pR+i*ld+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line515">515: </a>  }
 
 <a name="line517">517: </a>  <font color="#B22222">/* compute upper Cholesky factor in R */</font>
 <a name="line518">518: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKpotrf"</font>,LAPACKpotrf_(<font color="#666666">"U"</font>,&n_,pR+l*ld+l,&ld_,&info));
-<a name="line519">519: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_MAT_CH_ZRPVT,<font color="#666666">"Error in Cholesky factorization, info=%D"</font>,(PetscInt)info);
-<a name="line520">520: </a>  PetscLogFlops((1.0*n*n*n)/3.0);
-
-<a name="line522">522: </a>  <font color="#B22222">/* build identity and compute S = R\I */</font>
-<a name="line523">523: </a>  PetscMemzero(pS,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line524">524: </a>  <font color="#4169E1">for</font> (i=0;i<m;i++) pS[i+i*ld] = 1.0;
-<a name="line525">525: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrsm"</font>,BLAStrsm_(<font color="#666666">"L"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&n_,&done,pR+l*ld+l,&ld_,pS+l*ld+l,&ld_));
-
-<a name="line527">527: </a>  <font color="#B22222">/* Zero out entries below the diagonal */</font>
-<a name="line528">528: </a>  <font color="#4169E1">for</font> (i=l;i<m-1;i++) {
-<a name="line529">529: </a>    PetscMemzero(pR+i*ld+i+1,(m-i-1)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line530">530: </a>    PetscMemzero(pS+i*ld+i+1,(m-i-1)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line531">531: </a>  }
-<a name="line532">532: </a>  MatDenseRestoreArray(R,&pR);
-<a name="line533">533: </a>  MatDenseRestoreArray(*S,&pS);
-<a name="line534">534: </a>  <font color="#4169E1">return</font>(0);
-<a name="line535">535: </a>}
-
-<a name="line539">539: </a><font color="#B22222">/*</font>
-<a name="line540">540: </a><font color="#B22222">   Orthogonalize a set of vectors with Cholesky: R=chol(V'*V), Q=V*inv(R)</font>
-<a name="line541">541: </a><font color="#B22222"> */</font>
-<a name="line542">542: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Chol"></a>static PetscErrorCode BVOrthogonalize_Chol(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Rin)</font></strong>
-<a name="line543">543: </a>{
-<a name="line545">545: </a>  Mat            S,R=Rin,B;
-
-<a name="line548">548: </a>  <font color="#4169E1">if</font> (!Rin) {
-<a name="line549">549: </a>    MatCreateSeqDense(PETSC_COMM_SELF,V->k,V->k,NULL,&R);
-<a name="line550">550: </a>  }
-<a name="line551">551: </a>  <font color="#4169E1">if</font> (V->matrix) {
-<a name="line552">552: </a>    BV_IPMatMultBV(V);
-<a name="line553">553: </a>    B = V->matrix;
-<a name="line554">554: </a>    V->matrix = NULL;
-<a name="line555">555: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(V->cached,V,R);
-<a name="line556">556: </a>    V->matrix = B;
-<a name="line557">557: </a>  } <font color="#4169E1">else</font> {
-<a name="line558">558: </a>    <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(V,V,R);
-<a name="line559">559: </a>  }
-<a name="line560">560: </a>  MatCholeskyFactorInvert(R,V->l,&S);
-<a name="line561">561: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(V,S,V->l,V->k);
-<a name="line562">562: </a>  MatDestroy(&S);
-<a name="line563">563: </a>  <font color="#4169E1">if</font> (!Rin) {
-<a name="line564">564: </a>    MatDestroy(&R);
-<a name="line565">565: </a>  }
-<a name="line566">566: </a>  <font color="#4169E1">return</font>(0);
-<a name="line567">567: </a>}
-
-<a name="line571">571: </a><font color="#B22222">/*@</font>
-<a name="line572">572: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a> - Orthogonalize all columns (except leading ones), that is,</font>
-<a name="line573">573: </a><font color="#B22222">   compute the QR decomposition.</font>
-
-<a name="line575">575: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
-
-<a name="line577">577: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line578">578: </a><font color="#B22222">.  V - basis vectors</font>
-
-<a name="line580">580: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line581">581: </a><font color="#B22222">+  V - the modified basis vectors</font>
-<a name="line582">582: </a><font color="#B22222">-  R - a sequential dense matrix (or NULL)</font>
-
-<a name="line584">584: </a><font color="#B22222">   Notes:</font>
-<a name="line585">585: </a><font color="#B22222">   On input, matrix R must be a sequential dense Mat, with at least as many rows</font>
-<a name="line586">586: </a><font color="#B22222">   and columns as the number of active columns of V. The output satisfies</font>
-<a name="line587">587: </a><font color="#B22222">   V0 = V*R (where V0 represent the input V) and V'*V = I.</font>
-
-<a name="line589">589: </a><font color="#B22222">   If V has leading columns, then they are not modified (are assumed to be already</font>
-<a name="line590">590: </a><font color="#B22222">   orthonormal) and the corresponding part of R is not referenced.</font>
-
-<a name="line592">592: </a><font color="#B22222">   Can pass NULL if R is not required.</font>
-
-<a name="line594">594: </a><font color="#B22222">   The method to be used for block orthogonalization can be set with</font>
-<a name="line595">595: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(). If set to GS, the computation is done column by</font>
-<a name="line596">596: </a><font color="#B22222">   column with successive calls to <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>().</font>
-
-<a name="line598">598: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line600">600: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrtho [...]
-<a name="line601">601: </a><font color="#B22222">@*/</font>
-<a name="line602">602: </a><strong><font color="#4169E1"><a name="BVOrthogonalize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
-<a name="line603">603: </a>{
-<a name="line605">605: </a>  PetscBool      match;
-<a name="line606">606: </a>  PetscInt       m,n;
-
-<a name="line611">611: </a>  BVCheckSizes(V,1);
-<a name="line612">612: </a>  <font color="#4169E1">if</font> (R) {
-<a name="line615">615: </a>    <font color="#4169E1">if</font> (V->l>0 && V->orthog_block==BV_ORTHOG_BLOCK_GS) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Cannot request matrix R in Gram-Schmidt orthogonalization if l>0"</font>);
-<a name="line616">616: </a>    PetscObjectTypeCompare((PetscObject)R,MATSEQDENSE,&match);
-<a name="line617">617: </a>    <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
-<a name="line618">618: </a>    MatGetSize(R,&m,&n);
-<a name="line619">619: </a>    <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument is not square, it has %D rows and %D columns"</font>,m,n);
-<a name="line620">620: </a>    <font color="#4169E1">if</font> (n<V->k) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat size %D is smaller than the number of <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> active columns %D"</font>,n,V->k);
-<a name="line621">621: </a>  }
-<a name="line622">622: </a>  <font color="#4169E1">if</font> (V->nc) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Not implemented for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with constraints, use <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>() instead"</font>);
-
-<a name="line624">624: </a>  PetscLogEventBegin(BV_Orthogonalize,V,R,0,0);
-<a name="line625">625: </a>  <font color="#4169E1">switch</font> (V->orthog_block) {
-<a name="line626">626: </a>  <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_GS: <font color="#B22222">/* proceed column by column with Gram-Schmidt */</font>
-<a name="line627">627: </a>    BVOrthogonalize_GS(V,R);
-<a name="line628">628: </a>    <font color="#4169E1">break</font>;
-<a name="line629">629: </a>  <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_CHOL:
-<a name="line630">630: </a>    BVOrthogonalize_Chol(V,R);
-<a name="line631">631: </a>    <font color="#B22222">/*if (V->ops->orthogonalize) {</font>
-<a name="line632">632: </a><font color="#B22222">      (*V->ops->orthogonalize)(V,R);</font>
-<a name="line633">633: </a><font color="#B22222">    }*/</font>
-<a name="line634">634: </a>    <font color="#4169E1">break</font>;
-<a name="line635">635: </a>  }
-<a name="line636">636: </a>  PetscLogEventEnd(BV_Orthogonalize,V,R,0,0);
-<a name="line637">637: </a>  PetscObjectStateIncrease((PetscObject)V);
-<a name="line638">638: </a>  <font color="#4169E1">return</font>(0);
-<a name="line639">639: </a>}
+<a name="line519">519: </a>  PetscLogFlops((1.0*n*n*n)/3.0);
+
+<a name="line521">521: </a>  <font color="#4169E1">if</font> (info) {  <font color="#B22222">/* LAPACKpotrf failed, retry on diagonally perturbed matrix */</font>
+<a name="line522">522: </a>    <font color="#4169E1">for</font> (i=l;i<m;i++) {
+<a name="line523">523: </a>      PetscMemcpy(pR+i*ld+l,pS+i*ld+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line524">524: </a>      pR[i+i*ld] += 50.0*PETSC_MACHINE_EPSILON;
+<a name="line525">525: </a>    }
+<a name="line526">526: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKpotrf"</font>,LAPACKpotrf_(<font color="#666666">"U"</font>,&n_,pR+l*ld+l,&ld_,&info));
+<a name="line527">527: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,1,<font color="#666666">"Error in Cholesky factorization, info=%D"</font>,(PetscInt)info);
+<a name="line528">528: </a>    PetscLogFlops((1.0*n*n*n)/3.0);
+<a name="line529">529: </a>  }
+
+<a name="line531">531: </a>  <font color="#B22222">/* compute S = inv(R) */</font>
+<a name="line532">532: </a>  PetscMemzero(pS,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line533">533: </a>  <font color="#4169E1">for</font> (i=l;i<m;i++) {
+<a name="line534">534: </a>    PetscMemcpy(pS+i*ld+l,pR+i*ld+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line535">535: </a>  }
+<a name="line536">536: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrtri"</font>,LAPACKtrtri_(<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,&n_,pS+l*ld+l,&ld_,&info));
+<a name="line537">537: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,1,<font color="#666666">"Error in xTRTRI, info=%D"</font>,(PetscInt)info);
+<a name="line538">538: </a>  PetscLogFlops(1.0*n*n*n);
+
+<a name="line540">540: </a>  <font color="#B22222">/* Zero out entries below the diagonal */</font>
+<a name="line541">541: </a>  <font color="#4169E1">for</font> (i=l;i<m-1;i++) {
+<a name="line542">542: </a>    PetscMemzero(pR+i*ld+i+1,(m-i-1)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line543">543: </a>    PetscMemzero(pS+i*ld+i+1,(m-i-1)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line544">544: </a>  }
+<a name="line545">545: </a>  MatDenseRestoreArray(R,&pR);
+<a name="line546">546: </a>  MatDenseRestoreArray(*S,&pS);
+<a name="line547">547: </a>  <font color="#4169E1">return</font>(0);
+<a name="line548">548: </a><font color="#A020F0">#endif</font>
+<a name="line549">549: </a>}
+
+<a name="line553">553: </a><font color="#B22222">/*</font>
+<a name="line554">554: </a><font color="#B22222">   Orthogonalize a set of vectors with Cholesky: R=chol(V'*V), Q=V*inv(R)</font>
+<a name="line555">555: </a><font color="#B22222"> */</font>
+<a name="line556">556: </a><strong><font color="#4169E1"><a name="BVOrthogonalize_Chol"></a>static PetscErrorCode BVOrthogonalize_Chol(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat Rin)</font></strong>
+<a name="line557">557: </a>{
+<a name="line559">559: </a>  Mat            S,R=Rin;
+
+<a name="line562">562: </a>  <font color="#4169E1">if</font> (!Rin) {
+<a name="line563">563: </a>    MatCreateSeqDense(PETSC_COMM_SELF,V->k,V->k,NULL,&R);
+<a name="line564">564: </a>  }
+<a name="line565">565: </a>  <a href="../../../../../docs/manualpages/BV/BVDot.html#BVDot">BVDot</a>(V,V,R);
+<a name="line566">566: </a>  MatCholeskyFactorInvert(R,V->l,&S);
+<a name="line567">567: </a>  <a href="../../../../../docs/manualpages/BV/BVMultInPlace.html#BVMultInPlace">BVMultInPlace</a>(V,S,V->l,V->k);
+<a name="line568">568: </a>  MatDestroy(&S);
+<a name="line569">569: </a>  <font color="#4169E1">if</font> (!Rin) {
+<a name="line570">570: </a>    MatDestroy(&R);
+<a name="line571">571: </a>  }
+<a name="line572">572: </a>  <font color="#4169E1">return</font>(0);
+<a name="line573">573: </a>}
+
+<a name="line577">577: </a><font color="#B22222">/*@</font>
+<a name="line578">578: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a> - Orthogonalize all columns (except leading ones), that is,</font>
+<a name="line579">579: </a><font color="#B22222">   compute the QR decomposition.</font>
+
+<a name="line581">581: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a></font>
+
+<a name="line583">583: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line584">584: </a><font color="#B22222">.  V - basis vectors</font>
+
+<a name="line586">586: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line587">587: </a><font color="#B22222">+  V - the modified basis vectors</font>
+<a name="line588">588: </a><font color="#B22222">-  R - a sequential dense matrix (or NULL)</font>
+
+<a name="line590">590: </a><font color="#B22222">   Notes:</font>
+<a name="line591">591: </a><font color="#B22222">   On input, matrix R must be a sequential dense Mat, with at least as many rows</font>
+<a name="line592">592: </a><font color="#B22222">   and columns as the number of active columns of V. The output satisfies</font>
+<a name="line593">593: </a><font color="#B22222">   V0 = V*R (where V0 represent the input V) and V'*V = I.</font>
+
+<a name="line595">595: </a><font color="#B22222">   If V has leading columns, then they are not modified (are assumed to be already</font>
+<a name="line596">596: </a><font color="#B22222">   orthonormal) and the corresponding part of R is not referenced.</font>
+
+<a name="line598">598: </a><font color="#B22222">   Can pass NULL if R is not required.</font>
+
+<a name="line600">600: </a><font color="#B22222">   The method to be used for block orthogonalization can be set with</font>
+<a name="line601">601: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrthogonalization">BVSetOrthogonalization</a>(). If set to GS, the computation is done column by</font>
+<a name="line602">602: </a><font color="#B22222">   column with successive calls to <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>().</font>
+
+<a name="line604">604: </a><font color="#B22222">   If V is rank-deficient or very ill-conditioned, that is, one or more columns are</font>
+<a name="line605">605: </a><font color="#B22222">   (almost) linearly dependent with respect to the rest, then the algorithm may</font>
+<a name="line606">606: </a><font color="#B22222">   break down or result in larger numerical error. Linearly dependent columns are</font>
+<a name="line607">607: </a><font color="#B22222">   essentially replaced by random directions, and the corresponding diagonal entry</font>
+<a name="line608">608: </a><font color="#B22222">   in R is set to (nearly) zero.</font>
+
+<a name="line610">610: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line612">612: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>(), <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeVec.html#BVOrthogonalizeVec">BVOrthogonalizeVec</a>(), <a href="../../../../../docs/manualpages/BV/BVSetActiveColumns.html#BVSetActiveColumns">BVSetActiveColumns</a>(), <a href="../../../../../docs/manualpages/BV/BVSetOrthogonalization.html#BVSetOrtho [...]
+<a name="line613">613: </a><font color="#B22222">@*/</font>
+<a name="line614">614: </a><strong><font color="#4169E1"><a name="BVOrthogonalize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/BV/BVOrthogonalize.html#BVOrthogonalize">BVOrthogonalize</a>(<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V,Mat R)</font></strong>
+<a name="line615">615: </a>{
+<a name="line617">617: </a>  PetscBool      match;
+<a name="line618">618: </a>  PetscInt       m,n;
+
+<a name="line623">623: </a>  BVCheckSizes(V,1);
+<a name="line624">624: </a>  <font color="#4169E1">if</font> (R) {
+<a name="line627">627: </a>    <font color="#4169E1">if</font> (V->l>0 && V->orthog_block==BV_ORTHOG_BLOCK_GS) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Cannot request matrix R in Gram-Schmidt orthogonalization if l>0"</font>);
+<a name="line628">628: </a>    PetscObjectTypeCompare((PetscObject)R,MATSEQDENSE,&match);
+<a name="line629">629: </a>    <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Mat argument must be of type seqdense"</font>);
+<a name="line630">630: </a>    MatGetSize(R,&m,&n);
+<a name="line631">631: </a>    <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat argument is not square, it has %D rows and %D columns"</font>,m,n);
+<a name="line632">632: </a>    <font color="#4169E1">if</font> (n<V->k) SETERRQ2(PetscObjectComm((PetscObject)V),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat size %D is smaller than the number of <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> active columns %D"</font>,n,V->k);
+<a name="line633">633: </a>  }
+<a name="line634">634: </a>  <font color="#4169E1">if</font> (V->nc) SETERRQ(PetscObjectComm((PetscObject)V),PETSC_ERR_SUP,<font color="#666666">"Not implemented for <a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> with constraints, use <a href="../../../../../docs/manualpages/BV/BVOrthogonalizeColumn.html#BVOrthogonalizeColumn">BVOrthogonalizeColumn</a>() instead"</font>);
+
+<a name="line636">636: </a>  PetscLogEventBegin(BV_Orthogonalize,V,R,0,0);
+<a name="line637">637: </a>  <font color="#4169E1">switch</font> (V->orthog_block) {
+<a name="line638">638: </a>  <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_GS: <font color="#B22222">/* proceed column by column with Gram-Schmidt */</font>
+<a name="line639">639: </a>    BVOrthogonalize_GS(V,R);
+<a name="line640">640: </a>    <font color="#4169E1">break</font>;
+<a name="line641">641: </a>  <font color="#4169E1">case</font> BV_ORTHOG_BLOCK_CHOL:
+<a name="line642">642: </a>    BVOrthogonalize_Chol(V,R);
+<a name="line643">643: </a>    <font color="#B22222">/*if (V->ops->orthogonalize) {</font>
+<a name="line644">644: </a><font color="#B22222">      (*V->ops->orthogonalize)(V,R);</font>
+<a name="line645">645: </a><font color="#B22222">    }*/</font>
+<a name="line646">646: </a>    <font color="#4169E1">break</font>;
+<a name="line647">647: </a>  }
+<a name="line648">648: </a>  PetscLogEventEnd(BV_Orthogonalize,V,R,0,0);
+<a name="line649">649: </a>  PetscObjectStateIncrease((PetscObject)V);
+<a name="line650">650: </a>  <font color="#4169E1">return</font>(0);
+<a name="line651">651: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/bv/interface/bvregis.c b/src/sys/classes/bv/interface/bvregis.c
index 36855d9..edd10d9 100644
--- a/src/sys/classes/bv/interface/bvregis.c
+++ b/src/sys/classes/bv/interface/bvregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/bv/interface/bvregis.c.html b/src/sys/classes/bv/interface/bvregis.c.html
index f2e6c3a..efbc8b9 100644
--- a/src/sys/classes/bv/interface/bvregis.c.html
+++ b/src/sys/classes/bv/interface/bvregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/bvregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:27+00:00">
+<meta name="date" content="2016-05-16T10:32:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/bvregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/bvregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/bv/interface/ftn-auto/bvbasicf.c b/src/sys/classes/bv/interface/ftn-auto/bvbasicf.c
index 38f5c08..bd664ab 100644
--- a/src/sys/classes/bv/interface/ftn-auto/bvbasicf.c
+++ b/src/sys/classes/bv/interface/ftn-auto/bvbasicf.c
@@ -104,6 +104,16 @@ extern void PetscRmPointer(void*);
 #define bvgetsignature_ bvgetsignature
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define bvsetrandomcontext_ BVSETRANDOMCONTEXT
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define bvsetrandomcontext_ bvsetrandomcontext
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define bvgetrandomcontext_ BVGETRANDOMCONTEXT
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define bvgetrandomcontext_ bvgetrandomcontext
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define bvsetfromoptions_ BVSETFROMOPTIONS
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define bvsetfromoptions_ bvsetfromoptions
@@ -241,6 +251,15 @@ PETSC_EXTERN void PETSC_STDCALL  bvgetsignature_(BV bv,Vec omega, int *__ierr ){
 	(BV)PetscToPointer((bv) ),
 	(Vec)PetscToPointer((omega) ));
 }
+PETSC_EXTERN void PETSC_STDCALL  bvsetrandomcontext_(BV bv,PetscRandom rand, int *__ierr ){
+*__ierr = BVSetRandomContext(
+	(BV)PetscToPointer((bv) ),
+	(PetscRandom)PetscToPointer((rand) ));
+}
+PETSC_EXTERN void PETSC_STDCALL  bvgetrandomcontext_(BV bv,PetscRandom* rand, int *__ierr ){
+*__ierr = BVGetRandomContext(
+	(BV)PetscToPointer((bv) ),rand);
+}
 PETSC_EXTERN void PETSC_STDCALL  bvsetfromoptions_(BV bv, int *__ierr ){
 *__ierr = BVSetFromOptions(
 	(BV)PetscToPointer((bv) ));
diff --git a/src/sys/classes/bv/interface/ftn-auto/bvopsf.c b/src/sys/classes/bv/interface/ftn-auto/bvopsf.c
index bc090ae..41160c5 100644
--- a/src/sys/classes/bv/interface/ftn-auto/bvopsf.c
+++ b/src/sys/classes/bv/interface/ftn-auto/bvopsf.c
@@ -127,15 +127,13 @@ PETSC_EXTERN void PETSC_STDCALL  bvscalecolumn_(BV bv,PetscInt *j,PetscScalar *a
 *__ierr = BVScaleColumn(
 	(BV)PetscToPointer((bv) ),*j,*alpha);
 }
-PETSC_EXTERN void PETSC_STDCALL  bvsetrandom_(BV bv,PetscRandom rctx, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  bvsetrandom_(BV bv, int *__ierr ){
 *__ierr = BVSetRandom(
-	(BV)PetscToPointer((bv) ),
-	(PetscRandom)PetscToPointer((rctx) ));
+	(BV)PetscToPointer((bv) ));
 }
-PETSC_EXTERN void PETSC_STDCALL  bvsetrandomcolumn_(BV bv,PetscInt *j,PetscRandom rctx, int *__ierr ){
+PETSC_EXTERN void PETSC_STDCALL  bvsetrandomcolumn_(BV bv,PetscInt *j, int *__ierr ){
 *__ierr = BVSetRandomColumn(
-	(BV)PetscToPointer((bv) ),*j,
-	(PetscRandom)PetscToPointer((rctx) ));
+	(BV)PetscToPointer((bv) ),*j);
 }
 PETSC_EXTERN void PETSC_STDCALL  bvmatmult_(BV V,Mat A,BV Y, int *__ierr ){
 *__ierr = BVMatMult(
diff --git a/src/sys/classes/bv/interface/ftn-custom/makefile b/src/sys/classes/bv/interface/ftn-custom/makefile
index 88250dd..e668213 100644
--- a/src/sys/classes/bv/interface/ftn-custom/makefile
+++ b/src/sys/classes/bv/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/interface/ftn-custom/zbvf.c b/src/sys/classes/bv/interface/ftn-custom/zbvf.c
index addf09b..0e01a65 100644
--- a/src/sys/classes/bv/interface/ftn-custom/zbvf.c
+++ b/src/sys/classes/bv/interface/ftn-custom/zbvf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/bv/interface/index.html b/src/sys/classes/bv/interface/index.html
index d566a57..846c766 100644
--- a/src/sys/classes/bv/interface/index.html
+++ b/src/sys/classes/bv/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Basis Vectors - BV</h2>
 
diff --git a/src/sys/classes/bv/interface/makefile b/src/sys/classes/bv/interface/makefile
index eb4fda4..f296aa2 100644
--- a/src/sys/classes/bv/interface/makefile
+++ b/src/sys/classes/bv/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/interface/makefile.html b/src/sys/classes/bv/interface/makefile.html
index 8f708ca..3a2d3a5 100644
--- a/src/sys/classes/bv/interface/makefile.html
+++ b/src/sys/classes/bv/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:27+00:00">
+<meta name="date" content="2016-05-16T10:32:21+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/bv/makefile b/src/sys/classes/bv/makefile
index 7ef707a..d0aa38f 100644
--- a/src/sys/classes/bv/makefile
+++ b/src/sys/classes/bv/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/bv/makefile.html b/src/sys/classes/bv/makefile.html
index 727ef89..dda331f 100644
--- a/src/sys/classes/bv/makefile.html
+++ b/src/sys/classes/bv/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/bv/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:18+00:00">
+<meta name="date" content="2016-05-16T10:32:12+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/bv/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/bv/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/examples/index.html b/src/sys/classes/ds/examples/index.html
index 3d0b5a5..e737cec 100644
--- a/src/sys/classes/ds/examples/index.html
+++ b/src/sys/classes/ds/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
  
diff --git a/src/sys/classes/ds/examples/makefile b/src/sys/classes/ds/examples/makefile
index fd46f74..597d865 100644
--- a/src/sys/classes/ds/examples/makefile
+++ b/src/sys/classes/ds/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/examples/makefile.html b/src/sys/classes/ds/examples/makefile.html
index 739d560..0422345 100644
--- a/src/sys/classes/ds/examples/makefile.html
+++ b/src/sys/classes/ds/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:00+00:00">
+<meta name="date" content="2016-05-16T10:31:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/examples/tests/index.html b/src/sys/classes/ds/examples/tests/index.html
index 77a2161..091dafe 100644
--- a/src/sys/classes/ds/examples/tests/index.html
+++ b/src/sys/classes/ds/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/examples/tests/makefile b/src/sys/classes/ds/examples/tests/makefile
index 1064a5d..0371863 100644
--- a/src/sys/classes/ds/examples/tests/makefile
+++ b/src/sys/classes/ds/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -102,79 +102,79 @@ test15: test15.o chkopts
 #------------------------------------------------------------------------------------
 
 runtest1_1:
-	-@${MPIEXEC} -np 1 ./test1 > test1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test1 > test1_1.tmp 2>&1; \
 	  if (${DIFF} output/test1_1.out test1_1.tmp) then true; \
 	  else echo "Possible problem with test1_1, diffs above"; fi; \
 	  ${RM} -f test1_1.tmp
 
 runtest2_1:
-	-@${MPIEXEC} -np 1 ./test2 -n 12 > test2_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test2 -n 12 > test2_1.tmp 2>&1; \
 	  if (${DIFF} output/test2_1.out test2_1.tmp) then true; \
 	  else echo "Possible problem with test2_1, diffs above"; fi; \
 	  ${RM} -f test2_1.tmp
 
 runtest3_1:
-	-@${MPIEXEC} -np 1 ./test3 > test3_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test3 > test3_1.tmp 2>&1; \
 	  if (${DIFF} output/test3_1.out test3_1.tmp) then true; \
 	  else echo "Possible problem with test3_1, diffs above"; fi; \
 	  ${RM} -f test3_1.tmp
 
 runtest4_1:
-	-@${MPIEXEC} -np 1 ./test4 > test4_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test4 > test4_1.tmp 2>&1; \
 	  if (${DIFF} output/test4_1.out test4_1.tmp) then true; \
 	  else echo "Possible problem with test4_1, diffs above"; fi; \
 	  ${RM} -f test4_1.tmp
 
 runtest5_1:
-	-@${MPIEXEC} -np 1 ./test5 > test5_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test5 > test5_1.tmp 2>&1; \
 	  if (${DIFF} output/test5_1.out test5_1.tmp) then true; \
 	  else echo "Possible problem with test5_1, diffs above"; fi; \
 	  ${RM} -f test5_1.tmp
 
 runtest6_1:
-	-@${MPIEXEC} -np 1 ./test6 > test6_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test6 > test6_1.tmp 2>&1; \
 	  if (${DIFF} output/test6_1.out test6_1.tmp) then true; \
 	  else echo "Possible problem with test6_1, diffs above"; fi; \
 	  ${RM} -f test6_1.tmp
 
 runtest7_1:
-	-@${MPIEXEC} -np 1 ./test7 > test7_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test7 > test7_1.tmp 2>&1; \
 	  if (${DIFF} output/test7_1.out test7_1.tmp) then true; \
 	  else echo "Possible problem with test7_1, diffs above"; fi; \
 	  ${RM} -f test7_1.tmp
 
 runtest8_1:
-	-@${MPIEXEC} -np 1 ./test8 > test8_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test8 > test8_1.tmp 2>&1; \
 	  if (${DIFF} output/test8_1.out test8_1.tmp) then true; \
 	  else echo "Possible problem with test8_1, diffs above"; fi; \
 	  ${RM} -f test8_1.tmp
 
 runtest9_1:
-	-@${MPIEXEC} -np 1 ./test9 > test9_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test9 > test9_1.tmp 2>&1; \
 	  if (${DIFF} output/test9_1.out test9_1.tmp) then true; \
 	  else echo "Possible problem with test9_1, diffs above"; fi; \
 	  ${RM} -f test9_1.tmp
 
 runtest12_1:
-	-@${MPIEXEC} -np 1 ./test12 > test12_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test12 > test12_1.tmp 2>&1; \
 	  if (${DIFF} output/test12_1.out test12_1.tmp) then true; \
 	  else echo "Possible problem with test12_1, diffs above"; fi; \
 	  ${RM} -f test12_1.tmp
 
 runtest13_1:
-	-@${MPIEXEC} -np 1 ./test13 > test13_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test13 > test13_1.tmp 2>&1; \
 	  if (${DIFF} output/test13_1.out test13_1.tmp) then true; \
 	  else echo "Possible problem with test13_1, diffs above"; fi; \
 	  ${RM} -f test13_1.tmp
 
 runtest14f_1:
-	-@${MPIEXEC} -np 1 ./test14f > test14f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test14f > test14f_1.tmp 2>&1; \
 	  if (${DIFF} output/test14f_1.out test14f_1.tmp) then true; \
 	  else echo "Possible problem with test14f_1, diffs above"; fi; \
 	  ${RM} -f test14f_1.tmp
 
 runtest15_1:
-	-@${MPIEXEC} -np 1 ./test15 > test15_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test15 > test15_1.tmp 2>&1; \
 	  if (${DIFF} output/test15_1.out test15_1.tmp) then true; \
 	  else echo "Possible problem with test15_1, diffs above"; fi; \
 	  ${RM} -f test15_1.tmp
diff --git a/src/sys/classes/ds/examples/tests/makefile.html b/src/sys/classes/ds/examples/tests/makefile.html
index 1dd6649..95ac6ca 100644
--- a/src/sys/classes/ds/examples/tests/makefile.html
+++ b/src/sys/classes/ds/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:03+00:00">
+<meta name="date" content="2016-05-16T10:31:55+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -113,79 +113,79 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 
 <strong><font color="#FF0000">runtest1_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test1 > test1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test1 > test1_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test1_1.out test1_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test1_1, diffs above"</font>; fi; \
 	  ${RM} -f test1_1.tmp
 
 <strong><font color="#FF0000">runtest2_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test2 -n 12 > test2_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test2 -n 12 > test2_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test2_1.out test2_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test2_1, diffs above"</font>; fi; \
 	  ${RM} -f test2_1.tmp
 
 <strong><font color="#FF0000">runtest3_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test3 > test3_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test3 > test3_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test3_1.out test3_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test3_1, diffs above"</font>; fi; \
 	  ${RM} -f test3_1.tmp
 
 <strong><font color="#FF0000">runtest4_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test4 > test4_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test4 > test4_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test4_1.out test4_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test4_1, diffs above"</font>; fi; \
 	  ${RM} -f test4_1.tmp
 
 <strong><font color="#FF0000">runtest5_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test5 > test5_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test5 > test5_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test5_1.out test5_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test5_1, diffs above"</font>; fi; \
 	  ${RM} -f test5_1.tmp
 
 <strong><font color="#FF0000">runtest6_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test6 > test6_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test6 > test6_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test6_1.out test6_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test6_1, diffs above"</font>; fi; \
 	  ${RM} -f test6_1.tmp
 
 <strong><font color="#FF0000">runtest7_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test7 > test7_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test7 > test7_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test7_1.out test7_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test7_1, diffs above"</font>; fi; \
 	  ${RM} -f test7_1.tmp
 
 <strong><font color="#FF0000">runtest8_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test8 > test8_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test8 > test8_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test8_1.out test8_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test8_1, diffs above"</font>; fi; \
 	  ${RM} -f test8_1.tmp
 
 <strong><font color="#FF0000">runtest9_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test9 > test9_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test9 > test9_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test9_1.out test9_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test9_1, diffs above"</font>; fi; \
 	  ${RM} -f test9_1.tmp
 
 <strong><font color="#FF0000">runtest12_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test12 > test12_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test12 > test12_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test12_1.out test12_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test12_1, diffs above"</font>; fi; \
 	  ${RM} -f test12_1.tmp
 
 <strong><font color="#FF0000">runtest13_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test13 > test13_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test13 > test13_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test13_1.out test13_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test13_1, diffs above"</font>; fi; \
 	  ${RM} -f test13_1.tmp
 
 <strong><font color="#FF0000">runtest14f_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test14f > test14f_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test14f > test14f_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test14f_1.out test14f_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test14f_1, diffs above"</font>; fi; \
 	  ${RM} -f test14f_1.tmp
 
 <strong><font color="#FF0000">runtest15_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test15 > test15_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test15 > test15_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test15_1.out test15_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test15_1, diffs above"</font>; fi; \
 	  ${RM} -f test15_1.tmp
diff --git a/src/sys/classes/ds/examples/tests/output/test1_1.out b/src/sys/classes/ds/examples/tests/output/test1_1.out
index 44ecb64..1fc4ecd 100644
--- a/src/sys/classes/ds/examples/tests/output/test1_1.out
+++ b/src/sys/classes/ds/examples/tests/output/test1_1.out
@@ -15,3 +15,5 @@ Computed eigenvalues =
   1.12811-1.27812i
   1.52659+0.40240i
   1.52659-0.40240i
+Value of rnorm for 3rd vector = 0.122
+Norm of 1st vector = 1.000
diff --git a/src/sys/classes/ds/examples/tests/output/test2_1.out b/src/sys/classes/ds/examples/tests/output/test2_1.out
index edc0ba7..bad20b4 100644
--- a/src/sys/classes/ds/examples/tests/output/test2_1.out
+++ b/src/sys/classes/ds/examples/tests/output/test2_1.out
@@ -18,3 +18,5 @@ Computed eigenvalues =
   0.38537
   -0.07673
   -0.05162
+Value of rnorm for 3rd vector = 0.341
+Norm of 1st vector = 1.000
diff --git a/src/sys/classes/ds/examples/tests/output/test4_1.out b/src/sys/classes/ds/examples/tests/output/test4_1.out
index 147d9fb..283eaae 100644
--- a/src/sys/classes/ds/examples/tests/output/test4_1.out
+++ b/src/sys/classes/ds/examples/tests/output/test4_1.out
@@ -15,3 +15,5 @@ Computed eigenvalues =
   1.12811-1.27812i
   1.52659+0.40240i
   1.52659-0.40240i
+Value of rnorm for 3rd vector = 0.122
+Norm of 1st vector = 1.000
diff --git a/src/sys/classes/ds/examples/tests/test1.c b/src/sys/classes/ds/examples/tests/test1.c
index b7ec5ec..1bcd21d 100644
--- a/src/sys/classes/ds/examples/tests/test1.c
+++ b/src/sys/classes/ds/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,17 +30,17 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
   DS             ds;
   SlepcSC        sc;
-  PetscScalar    *A,*wr,*wi;
-  PetscReal      re,im;
+  PetscScalar    *A,*X,*wr,*wi;
+  PetscReal      re,im,rnorm,aux;
   PetscInt       i,j,n=10,ld;
   PetscViewer    viewer;
   PetscBool      verbose,extrarow;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type NHEP - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-extrarow",&extrarow);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-extrarow",&extrarow);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -106,8 +106,33 @@ int main(int argc,char **argv)
     }
   }
 
+  /* Eigenvectors */
+  j = 2;
+  ierr = DSVectors(ds,DS_MAT_X,&j,&rnorm);CHKERRQ(ierr);  /* third eigenvector */
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Value of rnorm for 3rd vector = %.3f\n",(double)rnorm);CHKERRQ(ierr);
+  ierr = DSVectors(ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);  /* all eigenvectors */
+  j = 0;
+  rnorm = 0.0;
+  ierr = DSGetArray(ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  for (i=0;i<n;i++) {
+#if defined(PETSC_USE_COMPLEX)
+    aux = PetscAbsScalar(X[i+j*ld]);
+#else
+    if (PetscAbs(wi[j])==0.0) aux = PetscAbsScalar(X[i+j*ld]);
+    else aux = SlepcAbsEigenvalue(X[i+j*ld],X[i+(j+1)*ld]);
+#endif
+    rnorm += aux*aux;
+  }
+  ierr = DSRestoreArray(ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  rnorm = PetscSqrtReal(rnorm);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of 1st vector = %.3f\n",(double)rnorm);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"After vectors - - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = DSView(ds,viewer);CHKERRQ(ierr);
+  }
+
   ierr = PetscFree2(wr,wi);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test1.c.html b/src/sys/classes/ds/examples/tests/test1.c.html
index 1ba922b..c18df50 100644
--- a/src/sys/classes/ds/examples/tests/test1.c.html
+++ b/src/sys/classes/ds/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:00+00:00">
+<meta name="date" content="2016-05-16T10:31:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,17 +39,17 @@
 <a name="line29"> 29: </a>{
 <a name="line31"> 31: </a>  <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;
 <a name="line32"> 32: </a>  SlepcSC        sc;
-<a name="line33"> 33: </a>  PetscScalar    *A,*wr,*wi;
-<a name="line34"> 34: </a>  PetscReal      re,im;
+<a name="line33"> 33: </a>  PetscScalar    *A,*X,*wr,*wi;
+<a name="line34"> 34: </a>  PetscReal      re,im,rnorm,aux;
 <a name="line35"> 35: </a>  PetscInt       i,j,n=10,ld;
 <a name="line36"> 36: </a>  PetscViewer    viewer;
 <a name="line37"> 37: </a>  PetscBool      verbose,extrarow;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type NHEP - dimension %D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
-<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-extrarow"</font>,&extrarow);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-extrarow"</font>,&extrarow);
 
 <a name="line45"> 45: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line46"> 46: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -115,11 +115,36 @@
 <a name="line106">106: </a>    }
 <a name="line107">107: </a>  }
 
-<a name="line109">109: </a>  PetscFree2(wr,wi);
-<a name="line110">110: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
-<a name="line111">111: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line112">112: </a>  <font color="#4169E1">return</font> 0;
-<a name="line113">113: </a>}
+<a name="line109">109: </a>  <font color="#B22222">/* Eigenvectors */</font>
+<a name="line110">110: </a>  j = 2;
+<a name="line111">111: </a>  <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(ds,DS_MAT_X,&j,&rnorm);  <font color="#B22222">/* third eigenvector */</font>
+<a name="line112">112: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Value of rnorm for 3rd vector = %.3f\n"</font>,(double)rnorm);
+<a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(ds,DS_MAT_X,NULL,NULL);  <font color="#B22222">/* all eigenvectors */</font>
+<a name="line114">114: </a>  j = 0;
+<a name="line115">115: </a>  rnorm = 0.0;
+<a name="line116">116: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,DS_MAT_X,&X);
+<a name="line117">117: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line118">118: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line119">119: </a>    aux = PetscAbsScalar(X[i+j*ld]);
+<a name="line120">120: </a><font color="#A020F0">#else</font>
+<a name="line121">121: </a>    <font color="#4169E1">if</font> (PetscAbs(wi[j])==0.0) aux = PetscAbsScalar(X[i+j*ld]);
+<a name="line122">122: </a>    <font color="#4169E1">else</font> aux = SlepcAbsEigenvalue(X[i+j*ld],X[i+(j+1)*ld]);
+<a name="line123">123: </a><font color="#A020F0">#endif</font>
+<a name="line124">124: </a>    rnorm += aux*aux;
+<a name="line125">125: </a>  }
+<a name="line126">126: </a>  <a href="../../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,DS_MAT_X,&X);
+<a name="line127">127: </a>  rnorm = PetscSqrtReal(rnorm);
+<a name="line128">128: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Norm of 1st vector = %.3f\n"</font>,(double)rnorm);
+<a name="line129">129: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line130">130: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"After vectors - - - - - - - - -\n"</font>);
+<a name="line131">131: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
+<a name="line132">132: </a>  }
+
+<a name="line134">134: </a>  PetscFree2(wr,wi);
+<a name="line135">135: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
+<a name="line136">136: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line137">137: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line138">138: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/ds/examples/tests/test12.c b/src/sys/classes/ds/examples/tests/test12.c
index 289f08f..98da844 100644
--- a/src/sys/classes/ds/examples/tests/test12.c
+++ b/src/sys/classes/ds/examples/tests/test12.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,10 +37,10 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetReal(NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetReal(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type NEP - dimension %D, tau=%g.\n",n,(double)tau);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -137,5 +137,5 @@ int main(int argc,char **argv)
   ierr = FNDestroy(&f3);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test12.c.html b/src/sys/classes/ds/examples/tests/test12.c.html
index c7b5763..9a67c15 100644
--- a/src/sys/classes/ds/examples/tests/test12.c.html
+++ b/src/sys/classes/ds/examples/tests/test12.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test12.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:02+00:00">
+<meta name="date" content="2016-05-16T10:31:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test12.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test12.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,10 +46,10 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line41"> 41: </a>  PetscOptionsGetReal(NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line41"> 41: </a>  PetscOptionsGetReal(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
 <a name="line42"> 42: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type <a href="../../../../../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> - dimension %D, tau=%g.\n"</font>,n,(double)tau);
-<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line45"> 45: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line46"> 46: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -146,7 +146,7 @@
 <a name="line137">137: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f3);
 <a name="line138">138: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line139">139: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line140">140: </a>  <font color="#4169E1">return</font> 0;
+<a name="line140">140: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line141">141: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test13.c b/src/sys/classes/ds/examples/tests/test13.c
index 3213eba..b53878a 100644
--- a/src/sys/classes/ds/examples/tests/test13.c
+++ b/src/sys/classes/ds/examples/tests/test13.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -36,12 +36,12 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-maxbw",&maxbw,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-nblks",&nblks,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-maxbw",&maxbw,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-nblks",&nblks,NULL);CHKERRQ(ierr);
   n = maxbw*nblks;
   bs = maxbw;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a block HEP Dense System - dimension %D (bandwidth=%D, blocks=%D).\n",n,maxbw,nblks);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -98,5 +98,5 @@ int main(int argc,char **argv)
   ierr = PetscFree(eig);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test13.c.html b/src/sys/classes/ds/examples/tests/test13.c.html
index 331df77..3c60baf 100644
--- a/src/sys/classes/ds/examples/tests/test13.c.html
+++ b/src/sys/classes/ds/examples/tests/test13.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test13.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:03+00:00">
+<meta name="date" content="2016-05-16T10:31:55+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test13.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test13.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,12 +45,12 @@
 <a name="line36"> 36: </a>  PetscBool      verbose;
 
 <a name="line38"> 38: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-maxbw"</font>,&maxbw,NULL);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-nblks"</font>,&nblks,NULL);
+<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-maxbw"</font>,&maxbw,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-nblks"</font>,&nblks,NULL);
 <a name="line41"> 41: </a>  n = maxbw*nblks;
 <a name="line42"> 42: </a>  bs = maxbw;
 <a name="line43"> 43: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a block HEP Dense System - dimension %D (bandwidth=%D, blocks=%D).\n"</font>,n,maxbw,nblks);
-<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line46"> 46: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line47"> 47: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -107,7 +107,7 @@
 <a name="line98"> 98: </a>  PetscFree(eig);
 <a name="line99"> 99: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line100">100: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line101">101: </a>  <font color="#4169E1">return</font> 0;
+<a name="line101">101: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line102">102: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test14f.F b/src/sys/classes/ds/examples/tests/test14f.F
index 7b6103a..26d771d 100644
--- a/src/sys/classes/ds/examples/tests/test14f.F
+++ b/src/sys/classes/ds/examples/tests/test14f.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
@@ -17,7 +17,7 @@
 !  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !
-!  Program usage: mpirun -np n test14f [-help] [-n <n>] [all SLEPc options] 
+!  Program usage: mpiexec -n <np> ./test14f [-help] [-n <n>] [all SLEPc options] 
 !
 !  Description: Simple example that tests solving a DSNHEP problem.
 !
@@ -43,7 +43,7 @@
 
       Mat            A
       DS             ds
-      PetscInt       n, i, j, ld, zero
+      PetscInt       n, i, ld, zero
       PetscMPIInt    rank
       PetscErrorCode ierr
       PetscBool      flg
@@ -59,7 +59,8 @@
       call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
       call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
       n = 10
-      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
+      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+     &                        '-n',n,flg,ierr)
       if (n .gt. 100) then
         if (rank .eq. 0) then
           write(*,100) n
diff --git a/src/sys/classes/ds/examples/tests/test14f.F.html b/src/sys/classes/ds/examples/tests/test14f.F.html
index 2280878..f2cbb65 100644
--- a/src/sys/classes/ds/examples/tests/test14f.F.html
+++ b/src/sys/classes/ds/examples/tests/test14f.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test14f.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:03+00:00">
+<meta name="date" content="2016-05-16T10:31:55+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test14f.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test14f.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
@@ -29,7 +29,7 @@
 <a name="line17"> 17: </a>!  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 <a name="line18"> 18: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line19"> 19: </a>!
-<a name="line20"> 20: </a>!  Program usage: <a href="http://www.mcs.anl.gov/mpi/www/www1/mpirun.html#mpirun">mpirun</a> -np n test14f [-help] [-n <n>] [all SLEPc options] 
+<a name="line20"> 20: </a>!  Program usage: mpiexec -n <np> ./test14f [-help] [-n <n>] [all SLEPc options] 
 <a name="line21"> 21: </a>!
 <a name="line22"> 22: </a>!  Description: Simple example that tests solving a DSNHEP problem.
 <a name="line23"> 23: </a>!
@@ -55,7 +55,7 @@
 
 <a name="line44"> 44: </a>      Mat            A
 <a name="line45"> 45: </a>      <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds
-<a name="line46"> 46: </a>      PetscInt       n, i, j, ld, zero
+<a name="line46"> 46: </a>      PetscInt       n, i, ld, zero
 <a name="line47"> 47: </a>      PetscMPIInt    rank
 <a name="line48"> 48: </a>      PetscErrorCode ierr
 <a name="line49"> 49: </a>      PetscBool      flg
@@ -71,91 +71,92 @@
 <a name="line59"> 59: </a>      call <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(PETSC_NULL_CHARACTER,ierr)
 <a name="line60"> 60: </a>      call <a href="http://www.mcs.anl.gov/mpi/www/www3/MPI_Comm_rank.html#MPI_Comm_rank">MPI_Comm_rank</a>(PETSC_COMM_WORLD,rank,ierr)
 <a name="line61"> 61: </a>      n = 10
-<a name="line62"> 62: </a>      call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
-<a name="line63"> 63: </a>      <font color="#4169E1">if</font> (n .gt. 100) then
-<a name="line64"> 64: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line65"> 65: </a>          write(*,100) n
-<a name="line66"> 66: </a>        endif
-<a name="line67"> 67: </a>        SETERRQ(PETSC_COMM_SELF,1,' ',ierr)
-<a name="line68"> 68: </a>      endif
-<a name="line69"> 69: </a> 100  format (/'Program currently limited to n=100, you set n=',I3)
-
-<a name="line71"> 71: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line72"> 72: </a>        write(*,110) n
-<a name="line73"> 73: </a>      endif
-<a name="line74"> 74: </a> 110  format (/'Solve a Dense System of type NHEP, n =',I3,' (Fortran)')
-
-<a name="line76"> 76: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line77"> 77: </a>!     Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object
-<a name="line78"> 78: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line80"> 80: </a>      call <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,ds,ierr)
-<a name="line81"> 81: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(ds,DSNHEP,ierr)
-<a name="line82"> 82: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(ds,ierr)
-<a name="line83"> 83: </a>      ld = n
-<a name="line84"> 84: </a>      call <a href="../../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(ds,ld,ierr)
-<a name="line85"> 85: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(ds,n,zero,zero,zero,ierr)
-
-<a name="line87"> 87: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line88"> 88: </a>!     Fill with Grcar matrix
-<a name="line89"> 89: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line91"> 91: </a>      call <a href="../../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(ds,DS_MAT_A,A,ierr)
-<a name="line92"> 92: </a>      call MatDenseGetArray(A,aa,ia,ierr)
-<a name="line93"> 93: </a>      call FillUpMatrix(n,aa(ia+1))
-<a name="line94"> 94: </a>      call MatDenseRestoreArray(A,aa,ia,ierr)
-<a name="line95"> 95: </a>      call <a href="../../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(ds,DS_MAT_A,A,ierr)
-<a name="line96"> 96: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_INTERMEDIATE,ierr)
-
-<a name="line98"> 98: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-<a name="line99"> 99: </a>!     Solve the problem and show eigenvalues
-<a name="line100">100: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
-<a name="line102">102: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(ds,wr,wi,ierr) 
-<a name="line103">103: </a>!     call <a href="../../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(ds,wr,wi,PETSC_NULL_SCALAR,PETSC_NULL_SCALAR,         &
-<a name="line104">104: </a>!    &            PETSC_NULL_INTEGER,ierr) 
-
-<a name="line106">106: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
-<a name="line107">107: </a>        write(*,*) 'Computed eigenvalues ='
-<a name="line108">108: </a>        <font color="#4169E1">do</font> i=1,n
-<a name="line109">109: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line110">110: </a>          re = PetscRealPart(wr(i))
-<a name="line111">111: </a>          im = PetscImaginaryPart(wr(i))
-<a name="line112">112: </a><font color="#A020F0">#else</font>
-<a name="line113">113: </a>          re = wr(i)
-<a name="line114">114: </a>          im = wi(i)
-<a name="line115">115: </a><font color="#A020F0">#endif</font>
-<a name="line116">116: </a>          <font color="#4169E1">if</font> (abs(im).lt.1.d-10) then
-<a name="line117">117: </a>            write(*,120) re
-<a name="line118">118: </a>          <font color="#4169E1">else</font>
-<a name="line119">119: </a>            write(*,130) re, im
-<a name="line120">120: </a>          endif
-<a name="line121">121: </a>        end <font color="#4169E1">do</font>
-<a name="line122">122: </a>      endif
-<a name="line123">123: </a> 120  format ('  ',F8.5)
-<a name="line124">124: </a> 130  format ('  ',F8.5,SP,F8.5,'i')
-
-<a name="line126">126: </a>!     *** Clean up
-<a name="line127">127: </a>      call <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(ds,ierr)
-<a name="line128">128: </a>      call <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
-<a name="line129">129: </a>      end
-
-<a name="line131">131: </a>! -----------------------------------------------------------------
-
-<a name="line133">133: </a>      subroutine FillUpMatrix(n,X)
-<a name="line134">134: </a>      PetscInt    n,i,j
-<a name="line135">135: </a>      PetscScalar X(n,n)
-
-<a name="line137">137: </a>      <font color="#4169E1">do</font> i=2,n
-<a name="line138">138: </a>        X(i,i-1) = -1.d0
-<a name="line139">139: </a>      end <font color="#4169E1">do</font>
-<a name="line140">140: </a>      <font color="#4169E1">do</font> j=0,3
-<a name="line141">141: </a>        <font color="#4169E1">do</font> i=1,n-j
-<a name="line142">142: </a>          X(i,i+j) = 1.d0
-<a name="line143">143: </a>        end <font color="#4169E1">do</font>
-<a name="line144">144: </a>      end <font color="#4169E1">do</font>
-<a name="line145">145: </a>      <font color="#4169E1">return</font>
-<a name="line146">146: </a>      end
+<a name="line62"> 62: </a>      call PetscOptionsGetInt(PETSC_NULL_OBJECT,PETSC_NULL_CHARACTER,   &
+<a name="line63"> 63: </a>     &                        '-n',n,flg,ierr)
+<a name="line64"> 64: </a>      <font color="#4169E1">if</font> (n .gt. 100) then
+<a name="line65"> 65: </a>        <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line66"> 66: </a>          write(*,100) n
+<a name="line67"> 67: </a>        endif
+<a name="line68"> 68: </a>        SETERRQ(PETSC_COMM_SELF,1,' ',ierr)
+<a name="line69"> 69: </a>      endif
+<a name="line70"> 70: </a> 100  format (/'Program currently limited to n=100, you set n=',I3)
+
+<a name="line72"> 72: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line73"> 73: </a>        write(*,110) n
+<a name="line74"> 74: </a>      endif
+<a name="line75"> 75: </a> 110  format (/'Solve a Dense System of type NHEP, n =',I3,' (Fortran)')
+
+<a name="line77"> 77: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line78"> 78: </a>!     Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object
+<a name="line79"> 79: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line81"> 81: </a>      call <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,ds,ierr)
+<a name="line82"> 82: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(ds,DSNHEP,ierr)
+<a name="line83"> 83: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(ds,ierr)
+<a name="line84"> 84: </a>      ld = n
+<a name="line85"> 85: </a>      call <a href="../../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(ds,ld,ierr)
+<a name="line86"> 86: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(ds,n,zero,zero,zero,ierr)
+
+<a name="line88"> 88: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line89"> 89: </a>!     Fill with Grcar matrix
+<a name="line90"> 90: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line92"> 92: </a>      call <a href="../../../../../../docs/manualpages/DS/DSGetMat.html#DSGetMat">DSGetMat</a>(ds,DS_MAT_A,A,ierr)
+<a name="line93"> 93: </a>      call MatDenseGetArray(A,aa,ia,ierr)
+<a name="line94"> 94: </a>      call FillUpMatrix(n,aa(ia+1))
+<a name="line95"> 95: </a>      call MatDenseRestoreArray(A,aa,ia,ierr)
+<a name="line96"> 96: </a>      call <a href="../../../../../../docs/manualpages/DS/DSRestoreMat.html#DSRestoreMat">DSRestoreMat</a>(ds,DS_MAT_A,A,ierr)
+<a name="line97"> 97: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_INTERMEDIATE,ierr)
+
+<a name="line99"> 99: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+<a name="line100">100: </a>!     Solve the problem and show eigenvalues
+<a name="line101">101: </a>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+<a name="line103">103: </a>      call <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(ds,wr,wi,ierr) 
+<a name="line104">104: </a>!     call <a href="../../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(ds,wr,wi,PETSC_NULL_SCALAR,PETSC_NULL_SCALAR,         &
+<a name="line105">105: </a>!    &            PETSC_NULL_INTEGER,ierr) 
+
+<a name="line107">107: </a>      <font color="#4169E1">if</font> (rank .eq. 0) then
+<a name="line108">108: </a>        write(*,*) 'Computed eigenvalues ='
+<a name="line109">109: </a>        <font color="#4169E1">do</font> i=1,n
+<a name="line110">110: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line111">111: </a>          re = PetscRealPart(wr(i))
+<a name="line112">112: </a>          im = PetscImaginaryPart(wr(i))
+<a name="line113">113: </a><font color="#A020F0">#else</font>
+<a name="line114">114: </a>          re = wr(i)
+<a name="line115">115: </a>          im = wi(i)
+<a name="line116">116: </a><font color="#A020F0">#endif</font>
+<a name="line117">117: </a>          <font color="#4169E1">if</font> (abs(im).lt.1.d-10) then
+<a name="line118">118: </a>            write(*,120) re
+<a name="line119">119: </a>          <font color="#4169E1">else</font>
+<a name="line120">120: </a>            write(*,130) re, im
+<a name="line121">121: </a>          endif
+<a name="line122">122: </a>        end <font color="#4169E1">do</font>
+<a name="line123">123: </a>      endif
+<a name="line124">124: </a> 120  format ('  ',F8.5)
+<a name="line125">125: </a> 130  format ('  ',F8.5,SP,F8.5,'i')
+
+<a name="line127">127: </a>!     *** Clean up
+<a name="line128">128: </a>      call <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(ds,ierr)
+<a name="line129">129: </a>      call <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(ierr)
+<a name="line130">130: </a>      end
+
+<a name="line132">132: </a>! -----------------------------------------------------------------
+
+<a name="line134">134: </a>      subroutine FillUpMatrix(n,X)
+<a name="line135">135: </a>      PetscInt    n,i,j
+<a name="line136">136: </a>      PetscScalar X(n,n)
+
+<a name="line138">138: </a>      <font color="#4169E1">do</font> i=2,n
+<a name="line139">139: </a>        X(i,i-1) = -1.d0
+<a name="line140">140: </a>      end <font color="#4169E1">do</font>
+<a name="line141">141: </a>      <font color="#4169E1">do</font> j=0,3
+<a name="line142">142: </a>        <font color="#4169E1">do</font> i=1,n-j
+<a name="line143">143: </a>          X(i,i+j) = 1.d0
+<a name="line144">144: </a>        end <font color="#4169E1">do</font>
+<a name="line145">145: </a>      end <font color="#4169E1">do</font>
+<a name="line146">146: </a>      <font color="#4169E1">return</font>
+<a name="line147">147: </a>      end
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test15.c b/src/sys/classes/ds/examples/tests/test15.c
index 7926cfc..34222a3 100644
--- a/src/sys/classes/ds/examples/tests/test15.c
+++ b/src/sys/classes/ds/examples/tests/test15.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,9 +37,9 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type PEP - n=%D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -117,5 +117,5 @@ int main(int argc,char **argv)
   ierr = PetscFree2(wr,wi);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test15.c.html b/src/sys/classes/ds/examples/tests/test15.c.html
index e5b9e55..a79f452 100644
--- a/src/sys/classes/ds/examples/tests/test15.c.html
+++ b/src/sys/classes/ds/examples/tests/test15.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test15.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:03+00:00">
+<meta name="date" content="2016-05-16T10:31:55+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test15.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test15.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,9 +46,9 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type <a href="../../../../../../docs/manualpages/PEP/PEP.html#PEP">PEP</a> - n=%D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line44"> 44: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line45"> 45: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -126,7 +126,7 @@
 <a name="line117">117: </a>  PetscFree2(wr,wi);
 <a name="line118">118: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line119">119: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line120">120: </a>  <font color="#4169E1">return</font> 0;
+<a name="line120">120: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line121">121: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test2.c b/src/sys/classes/ds/examples/tests/test2.c
index 645ebb6..9a6a472 100644
--- a/src/sys/classes/ds/examples/tests/test2.c
+++ b/src/sys/classes/ds/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,16 +30,17 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
   DS             ds;
   SlepcSC        sc;
-  PetscScalar    *A,*eig;
+  PetscScalar    *A,*X,*eig;
+  PetscReal      rnorm,aux;
   PetscInt       i,j,n=10,ld;
   PetscViewer    viewer;
   PetscBool      verbose,extrarow;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type HEP - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-extrarow",&extrarow);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-extrarow",&extrarow);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -94,8 +95,28 @@ int main(int argc,char **argv)
     ierr = PetscViewerASCIIPrintf(viewer,"  %.5f\n",(double)PetscRealPart(eig[i]));CHKERRQ(ierr);
   }
 
+  /* Eigenvectors */
+  j = 2;
+  ierr = DSVectors(ds,DS_MAT_X,&j,&rnorm);CHKERRQ(ierr);  /* third eigenvector */
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Value of rnorm for 3rd vector = %.3f\n",(double)rnorm);CHKERRQ(ierr);
+  ierr = DSVectors(ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);  /* all eigenvectors */
+  j = 0;
+  rnorm = 0.0;
+  ierr = DSGetArray(ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  for (i=0;i<n;i++) {
+    aux = PetscAbsScalar(X[i+j*ld]);
+    rnorm += aux*aux;
+  }
+  ierr = DSRestoreArray(ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  rnorm = PetscSqrtReal(rnorm);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of 1st vector = %.3f\n",(double)rnorm);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"After vectors - - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = DSView(ds,viewer);CHKERRQ(ierr);
+  }
+
   ierr = PetscFree(eig);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test2.c.html b/src/sys/classes/ds/examples/tests/test2.c.html
index a6a244c..93e369a 100644
--- a/src/sys/classes/ds/examples/tests/test2.c.html
+++ b/src/sys/classes/ds/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:01+00:00">
+<meta name="date" content="2016-05-16T10:31:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,75 +39,96 @@
 <a name="line29"> 29: </a>{
 <a name="line31"> 31: </a>  <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;
 <a name="line32"> 32: </a>  SlepcSC        sc;
-<a name="line33"> 33: </a>  PetscScalar    *A,*eig;
-<a name="line34"> 34: </a>  PetscInt       i,j,n=10,ld;
-<a name="line35"> 35: </a>  PetscViewer    viewer;
-<a name="line36"> 36: </a>  PetscBool      verbose,extrarow;
-
-<a name="line38"> 38: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line40"> 40: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type HEP - dimension %D.\n"</font>,n);
-<a name="line41"> 41: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-extrarow"</font>,&extrarow);
-
-<a name="line44"> 44: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
-<a name="line45"> 45: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
-<a name="line46"> 46: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(ds,DSHEP);
-<a name="line47"> 47: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(ds);
-<a name="line48"> 48: </a>  ld = n+2;  <font color="#B22222">/* test leading dimension larger than n */</font>
-<a name="line49"> 49: </a>  <a href="../../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(ds,ld);
-<a name="line50"> 50: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(ds,n,0,0,0);
-<a name="line51"> 51: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(ds,extrarow);
-
-<a name="line53"> 53: </a>  <font color="#B22222">/* Set up viewer */</font>
-<a name="line54"> 54: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
-<a name="line55"> 55: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);
-<a name="line56"> 56: </a>  <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
-<a name="line57"> 57: </a>  PetscViewerPopFormat(viewer);
-<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line59"> 59: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
-<a name="line60"> 60: </a>  }
-
-<a name="line62"> 62: </a>  <font color="#B22222">/* Fill with a symmetric Toeplitz matrix */</font>
-<a name="line63"> 63: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,DS_MAT_A,&A);
-<a name="line64"> 64: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[i+i*ld]=2.0;
-<a name="line65"> 65: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
-<a name="line66"> 66: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { A[i+(i+j)*ld]=1.0; A[(i+j)+i*ld]=1.0; }
-<a name="line67"> 67: </a>  }
-<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (extrarow) { A[n+(n-2)*ld]=1.0; A[n+(n-1)*ld]=1.0; }
-<a name="line69"> 69: </a>  <a href="../../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,DS_MAT_A,&A);
-<a name="line70"> 70: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_RAW);
-<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line72"> 72: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Initial - - - - - - - - -\n"</font>);
-<a name="line73"> 73: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
-<a name="line74"> 74: </a>  }
-
-<a name="line76"> 76: </a>  <font color="#B22222">/* Solve */</font>
-<a name="line77"> 77: </a>  PetscMalloc1(n,&eig);
-<a name="line78"> 78: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(ds,&sc);
-<a name="line79"> 79: </a>  sc->comparison    = SlepcCompareLargestMagnitude;
-<a name="line80"> 80: </a>  sc->comparisonctx = NULL;
-<a name="line81"> 81: </a>  sc->map           = NULL;
-<a name="line82"> 82: </a>  sc->mapobj        = NULL;
-<a name="line83"> 83: </a>  <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(ds,eig,NULL);
-<a name="line84"> 84: </a>  <a href="../../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(ds,eig,NULL,NULL,NULL,NULL);
-<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (extrarow) { <a href="../../../../../../docs/manualpages/DS/DSUpdateExtraRow.html#DSUpdateExtraRow">DSUpdateExtraRow</a>(ds); }
-<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line87"> 87: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"After solve - - - - - - - - -\n"</font>);
-<a name="line88"> 88: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
-<a name="line89"> 89: </a>  }
-
-<a name="line91"> 91: </a>  <font color="#B22222">/* Print eigenvalues */</font>
-<a name="line92"> 92: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed eigenvalues =\n"</font>);
-<a name="line93"> 93: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line94"> 94: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  %.5f\n"</font>,(double)PetscRealPart(eig[i]));
-<a name="line95"> 95: </a>  }
-
-<a name="line97"> 97: </a>  PetscFree(eig);
-<a name="line98"> 98: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
-<a name="line99"> 99: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line100">100: </a>  <font color="#4169E1">return</font> 0;
-<a name="line101">101: </a>}
+<a name="line33"> 33: </a>  PetscScalar    *A,*X,*eig;
+<a name="line34"> 34: </a>  PetscReal      rnorm,aux;
+<a name="line35"> 35: </a>  PetscInt       i,j,n=10,ld;
+<a name="line36"> 36: </a>  PetscViewer    viewer;
+<a name="line37"> 37: </a>  PetscBool      verbose,extrarow;
+
+<a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type HEP - dimension %D.\n"</font>,n);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-extrarow"</font>,&extrarow);
+
+<a name="line45"> 45: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
+<a name="line46"> 46: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
+<a name="line47"> 47: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(ds,DSHEP);
+<a name="line48"> 48: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(ds);
+<a name="line49"> 49: </a>  ld = n+2;  <font color="#B22222">/* test leading dimension larger than n */</font>
+<a name="line50"> 50: </a>  <a href="../../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(ds,ld);
+<a name="line51"> 51: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(ds,n,0,0,0);
+<a name="line52"> 52: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(ds,extrarow);
+
+<a name="line54"> 54: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line55"> 55: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line56"> 56: </a>  PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO_DETAIL);
+<a name="line57"> 57: </a>  <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
+<a name="line58"> 58: </a>  PetscViewerPopFormat(viewer);
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line60"> 60: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line61"> 61: </a>  }
+
+<a name="line63"> 63: </a>  <font color="#B22222">/* Fill with a symmetric Toeplitz matrix */</font>
+<a name="line64"> 64: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,DS_MAT_A,&A);
+<a name="line65"> 65: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[i+i*ld]=2.0;
+<a name="line66"> 66: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line67"> 67: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { A[i+(i+j)*ld]=1.0; A[(i+j)+i*ld]=1.0; }
+<a name="line68"> 68: </a>  }
+<a name="line69"> 69: </a>  <font color="#4169E1">if</font> (extrarow) { A[n+(n-2)*ld]=1.0; A[n+(n-1)*ld]=1.0; }
+<a name="line70"> 70: </a>  <a href="../../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,DS_MAT_A,&A);
+<a name="line71"> 71: </a>  <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_RAW);
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line73"> 73: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Initial - - - - - - - - -\n"</font>);
+<a name="line74"> 74: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
+<a name="line75"> 75: </a>  }
+
+<a name="line77"> 77: </a>  <font color="#B22222">/* Solve */</font>
+<a name="line78"> 78: </a>  PetscMalloc1(n,&eig);
+<a name="line79"> 79: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(ds,&sc);
+<a name="line80"> 80: </a>  sc->comparison    = SlepcCompareLargestMagnitude;
+<a name="line81"> 81: </a>  sc->comparisonctx = NULL;
+<a name="line82"> 82: </a>  sc->map           = NULL;
+<a name="line83"> 83: </a>  sc->mapobj        = NULL;
+<a name="line84"> 84: </a>  <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(ds,eig,NULL);
+<a name="line85"> 85: </a>  <a href="../../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>(ds,eig,NULL,NULL,NULL,NULL);
+<a name="line86"> 86: </a>  <font color="#4169E1">if</font> (extrarow) { <a href="../../../../../../docs/manualpages/DS/DSUpdateExtraRow.html#DSUpdateExtraRow">DSUpdateExtraRow</a>(ds); }
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line88"> 88: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"After solve - - - - - - - - -\n"</font>);
+<a name="line89"> 89: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
+<a name="line90"> 90: </a>  }
+
+<a name="line92"> 92: </a>  <font color="#B22222">/* Print eigenvalues */</font>
+<a name="line93"> 93: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed eigenvalues =\n"</font>);
+<a name="line94"> 94: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line95"> 95: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  %.5f\n"</font>,(double)PetscRealPart(eig[i]));
+<a name="line96"> 96: </a>  }
+
+<a name="line98"> 98: </a>  <font color="#B22222">/* Eigenvectors */</font>
+<a name="line99"> 99: </a>  j = 2;
+<a name="line100">100: </a>  <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(ds,DS_MAT_X,&j,&rnorm);  <font color="#B22222">/* third eigenvector */</font>
+<a name="line101">101: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Value of rnorm for 3rd vector = %.3f\n"</font>,(double)rnorm);
+<a name="line102">102: </a>  <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(ds,DS_MAT_X,NULL,NULL);  <font color="#B22222">/* all eigenvectors */</font>
+<a name="line103">103: </a>  j = 0;
+<a name="line104">104: </a>  rnorm = 0.0;
+<a name="line105">105: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,DS_MAT_X,&X);
+<a name="line106">106: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line107">107: </a>    aux = PetscAbsScalar(X[i+j*ld]);
+<a name="line108">108: </a>    rnorm += aux*aux;
+<a name="line109">109: </a>  }
+<a name="line110">110: </a>  <a href="../../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,DS_MAT_X,&X);
+<a name="line111">111: </a>  rnorm = PetscSqrtReal(rnorm);
+<a name="line112">112: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Norm of 1st vector = %.3f\n"</font>,(double)rnorm);
+<a name="line113">113: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line114">114: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"After vectors - - - - - - - - -\n"</font>);
+<a name="line115">115: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
+<a name="line116">116: </a>  }
+
+<a name="line118">118: </a>  PetscFree(eig);
+<a name="line119">119: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
+<a name="line120">120: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line121">121: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line122">122: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/ds/examples/tests/test3.c b/src/sys/classes/ds/examples/tests/test3.c
index 4846da5..36b752e 100644
--- a/src/sys/classes/ds/examples/tests/test3.c
+++ b/src/sys/classes/ds/examples/tests/test3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,13 +37,13 @@ int main(int argc,char **argv)
   PetscBool      verbose,extrarow;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type HEP with compact storage - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-l",&l,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-l",&l,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
   if (l>n || k>n || l>k) SETERRQ(PETSC_COMM_WORLD,1,"Wrong value of dimensions");
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-extrarow",&extrarow);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-extrarow",&extrarow);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -104,5 +104,5 @@ int main(int argc,char **argv)
   ierr = PetscFree(eig);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test3.c.html b/src/sys/classes/ds/examples/tests/test3.c.html
index f04e387..842216e 100644
--- a/src/sys/classes/ds/examples/tests/test3.c.html
+++ b/src/sys/classes/ds/examples/tests/test3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:01+00:00">
+<meta name="date" content="2016-05-16T10:31:53+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,13 +46,13 @@
 <a name="line37"> 37: </a>  PetscBool      verbose,extrarow;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type HEP with compact storage - dimension %D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-l"</font>,&l,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-l"</font>,&l,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
 <a name="line44"> 44: </a>  <font color="#4169E1">if</font> (l>n || k>n || l>k) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Wrong value of dimensions"</font>);
-<a name="line45"> 45: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
-<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-extrarow"</font>,&extrarow);
+<a name="line45"> 45: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-extrarow"</font>,&extrarow);
 
 <a name="line48"> 48: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line49"> 49: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -113,7 +113,7 @@
 <a name="line104">104: </a>  PetscFree(eig);
 <a name="line105">105: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line106">106: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line107">107: </a>  <font color="#4169E1">return</font> 0;
+<a name="line107">107: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line108">108: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test4.c b/src/sys/classes/ds/examples/tests/test4.c
index 7f4ff58..2f9076d 100644
--- a/src/sys/classes/ds/examples/tests/test4.c
+++ b/src/sys/classes/ds/examples/tests/test4.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -30,16 +30,16 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
   DS             ds;
   SlepcSC        sc;
-  PetscScalar    *A,*B,*wr,*wi;
-  PetscReal      re,im;
+  PetscScalar    *A,*B,*X,*wr,*wi;
+  PetscReal      re,im,rnorm,aux;
   PetscInt       i,j,n=10,ld;
   PetscViewer    viewer;
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type GNHEP - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -108,8 +108,33 @@ int main(int argc,char **argv)
     }
   }
 
+  /* Eigenvectors */
+  j = 2;
+  ierr = DSVectors(ds,DS_MAT_X,&j,&rnorm);CHKERRQ(ierr);  /* third eigenvector */
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Value of rnorm for 3rd vector = %.3f\n",(double)rnorm);CHKERRQ(ierr);
+  ierr = DSVectors(ds,DS_MAT_X,NULL,NULL);CHKERRQ(ierr);  /* all eigenvectors */
+  j = 0;
+  rnorm = 0.0;
+  ierr = DSGetArray(ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  for (i=0;i<n;i++) {
+#if defined(PETSC_USE_COMPLEX)
+    aux = PetscAbsScalar(X[i+j*ld]);
+#else
+    if (PetscAbs(wi[j])==0.0) aux = PetscAbsScalar(X[i+j*ld]);
+    else aux = SlepcAbsEigenvalue(X[i+j*ld],X[i+(j+1)*ld]);
+#endif
+    rnorm += aux*aux;
+  }
+  ierr = DSRestoreArray(ds,DS_MAT_X,&X);CHKERRQ(ierr);
+  rnorm = PetscSqrtReal(rnorm);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of 1st vector = %.3f\n",(double)rnorm);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"After vectors - - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = DSView(ds,viewer);CHKERRQ(ierr);
+  }
+
   ierr = PetscFree2(wr,wi);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test4.c.html b/src/sys/classes/ds/examples/tests/test4.c.html
index 231dcbc..3258df4 100644
--- a/src/sys/classes/ds/examples/tests/test4.c.html
+++ b/src/sys/classes/ds/examples/tests/test4.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test4.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:01+00:00">
+<meta name="date" content="2016-05-16T10:31:53+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,16 +39,16 @@
 <a name="line29"> 29: </a>{
 <a name="line31"> 31: </a>  <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>             ds;
 <a name="line32"> 32: </a>  SlepcSC        sc;
-<a name="line33"> 33: </a>  PetscScalar    *A,*B,*wr,*wi;
-<a name="line34"> 34: </a>  PetscReal      re,im;
+<a name="line33"> 33: </a>  PetscScalar    *A,*B,*X,*wr,*wi;
+<a name="line34"> 34: </a>  PetscReal      re,im,rnorm,aux;
 <a name="line35"> 35: </a>  PetscInt       i,j,n=10,ld;
 <a name="line36"> 36: </a>  PetscViewer    viewer;
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type GNHEP - dimension %D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line44"> 44: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line45"> 45: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -117,11 +117,36 @@
 <a name="line108">108: </a>    }
 <a name="line109">109: </a>  }
 
-<a name="line111">111: </a>  PetscFree2(wr,wi);
-<a name="line112">112: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
-<a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line114">114: </a>  <font color="#4169E1">return</font> 0;
-<a name="line115">115: </a>}
+<a name="line111">111: </a>  <font color="#B22222">/* Eigenvectors */</font>
+<a name="line112">112: </a>  j = 2;
+<a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(ds,DS_MAT_X,&j,&rnorm);  <font color="#B22222">/* third eigenvector */</font>
+<a name="line114">114: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Value of rnorm for 3rd vector = %.3f\n"</font>,(double)rnorm);
+<a name="line115">115: </a>  <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(ds,DS_MAT_X,NULL,NULL);  <font color="#B22222">/* all eigenvectors */</font>
+<a name="line116">116: </a>  j = 0;
+<a name="line117">117: </a>  rnorm = 0.0;
+<a name="line118">118: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,DS_MAT_X,&X);
+<a name="line119">119: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line120">120: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line121">121: </a>    aux = PetscAbsScalar(X[i+j*ld]);
+<a name="line122">122: </a><font color="#A020F0">#else</font>
+<a name="line123">123: </a>    <font color="#4169E1">if</font> (PetscAbs(wi[j])==0.0) aux = PetscAbsScalar(X[i+j*ld]);
+<a name="line124">124: </a>    <font color="#4169E1">else</font> aux = SlepcAbsEigenvalue(X[i+j*ld],X[i+(j+1)*ld]);
+<a name="line125">125: </a><font color="#A020F0">#endif</font>
+<a name="line126">126: </a>    rnorm += aux*aux;
+<a name="line127">127: </a>  }
+<a name="line128">128: </a>  <a href="../../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,DS_MAT_X,&X);
+<a name="line129">129: </a>  rnorm = PetscSqrtReal(rnorm);
+<a name="line130">130: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Norm of 1st vector = %.3f\n"</font>,(double)rnorm);
+<a name="line131">131: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line132">132: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"After vectors - - - - - - - - -\n"</font>);
+<a name="line133">133: </a>    <a href="../../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(ds,viewer);
+<a name="line134">134: </a>  }
+
+<a name="line136">136: </a>  PetscFree2(wr,wi);
+<a name="line137">137: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
+<a name="line138">138: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line139">139: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line140">140: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/ds/examples/tests/test5.c b/src/sys/classes/ds/examples/tests/test5.c
index 2e98f04..89aff70 100644
--- a/src/sys/classes/ds/examples/tests/test5.c
+++ b/src/sys/classes/ds/examples/tests/test5.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,9 +37,9 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type GHIEP - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -111,5 +111,5 @@ int main(int argc,char **argv)
   ierr = PetscFree2(eigr,eigi);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test5.c.html b/src/sys/classes/ds/examples/tests/test5.c.html
index 7cfea56..22be1f4 100644
--- a/src/sys/classes/ds/examples/tests/test5.c.html
+++ b/src/sys/classes/ds/examples/tests/test5.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test5.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:01+00:00">
+<meta name="date" content="2016-05-16T10:31:53+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,9 +46,9 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type GHIEP - dimension %D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line44"> 44: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line45"> 45: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -120,7 +120,7 @@
 <a name="line111">111: </a>  PetscFree2(eigr,eigi);
 <a name="line112">112: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line114">114: </a>  <font color="#4169E1">return</font> 0;
+<a name="line114">114: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line115">115: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test6.c b/src/sys/classes/ds/examples/tests/test6.c
index 4067ab6..cead43c 100644
--- a/src/sys/classes/ds/examples/tests/test6.c
+++ b/src/sys/classes/ds/examples/tests/test6.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,12 +37,12 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type GHIEP with compact storage - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-l",&l,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-l",&l,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
   if (l>n || k>n || l>k) SETERRQ(PETSC_COMM_WORLD,1,"Wrong value of dimensions");
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -118,5 +118,5 @@ int main(int argc,char **argv)
   ierr = PetscFree2(eigr,eigi);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test6.c.html b/src/sys/classes/ds/examples/tests/test6.c.html
index 9ddaf4d..dea8269 100644
--- a/src/sys/classes/ds/examples/tests/test6.c.html
+++ b/src/sys/classes/ds/examples/tests/test6.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test6.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:01+00:00">
+<meta name="date" content="2016-05-16T10:31:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,12 +46,12 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type GHIEP with compact storage - dimension %D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-l"</font>,&l,NULL);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line42"> 42: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-l"</font>,&l,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
 <a name="line44"> 44: </a>  <font color="#4169E1">if</font> (l>n || k>n || l>k) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Wrong value of dimensions"</font>);
-<a name="line45"> 45: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line45"> 45: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line47"> 47: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line48"> 48: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -127,7 +127,7 @@
 <a name="line118">118: </a>  PetscFree2(eigr,eigi);
 <a name="line119">119: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line120">120: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line121">121: </a>  <font color="#4169E1">return</font> 0;
+<a name="line121">121: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line122">122: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test7.c b/src/sys/classes/ds/examples/tests/test7.c
index 950c459..4381796 100644
--- a/src/sys/classes/ds/examples/tests/test7.c
+++ b/src/sys/classes/ds/examples/tests/test7.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,11 +37,11 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-m",&m,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-m",&m,NULL);CHKERRQ(ierr);
   k = PetscMin(n,m);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type SVD - dimension %Dx%D.\n",n,m);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -99,5 +99,5 @@ int main(int argc,char **argv)
   ierr = PetscFree(w);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test7.c.html b/src/sys/classes/ds/examples/tests/test7.c.html
index bcd210c..40e1be5 100644
--- a/src/sys/classes/ds/examples/tests/test7.c.html
+++ b/src/sys/classes/ds/examples/tests/test7.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test7.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:02+00:00">
+<meta name="date" content="2016-05-16T10:31:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test7.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test7.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,11 +46,11 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-m"</font>,&m,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line41"> 41: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-m"</font>,&m,NULL);
 <a name="line42"> 42: </a>  k = PetscMin(n,m);
 <a name="line43"> 43: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type <a href="../../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> - dimension %Dx%D.\n"</font>,n,m);
-<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line44"> 44: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line46"> 46: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line47"> 47: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -108,7 +108,7 @@
 <a name="line99"> 99: </a>  PetscFree(w);
 <a name="line100">100: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line101">101: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line102">102: </a>  <font color="#4169E1">return</font> 0;
+<a name="line102">102: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line103">103: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test8.c b/src/sys/classes/ds/examples/tests/test8.c
index 8fffce8..a58736a 100644
--- a/src/sys/classes/ds/examples/tests/test8.c
+++ b/src/sys/classes/ds/examples/tests/test8.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,13 +37,13 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   m = n;
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a Dense System of type SVD with compact storage - dimension %Dx%D.\n",n,m);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-l",&l,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetInt(NULL,"-k",&k,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-l",&l,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-k",&k,NULL);CHKERRQ(ierr);
   if (l>n || k>n || l>k) SETERRQ(PETSC_COMM_WORLD,1,"Wrong value of dimensions");
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -101,5 +101,5 @@ int main(int argc,char **argv)
   ierr = PetscFree(w);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test8.c.html b/src/sys/classes/ds/examples/tests/test8.c.html
index 8e542d7..8557686 100644
--- a/src/sys/classes/ds/examples/tests/test8.c.html
+++ b/src/sys/classes/ds/examples/tests/test8.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test8.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:02+00:00">
+<meta name="date" content="2016-05-16T10:31:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,13 +46,13 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  m = n;
 <a name="line42"> 42: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a Dense System of type <a href="../../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> with compact storage - dimension %Dx%D.\n"</font>,n,m);
-<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-l"</font>,&l,NULL);
-<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-k"</font>,&k,NULL);
+<a name="line43"> 43: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-l"</font>,&l,NULL);
+<a name="line44"> 44: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-k"</font>,&k,NULL);
 <a name="line45"> 45: </a>  <font color="#4169E1">if</font> (l>n || k>n || l>k) SETERRQ(PETSC_COMM_WORLD,1,<font color="#666666">"Wrong value of dimensions"</font>);
-<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line46"> 46: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line48"> 48: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line49"> 49: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -110,7 +110,7 @@
 <a name="line101">101: </a>  PetscFree(w);
 <a name="line102">102: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line103">103: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line104">104: </a>  <font color="#4169E1">return</font> 0;
+<a name="line104">104: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line105">105: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/examples/tests/test9.c b/src/sys/classes/ds/examples/tests/test9.c
index ca3aa94..849303b 100644
--- a/src/sys/classes/ds/examples/tests/test9.c
+++ b/src/sys/classes/ds/examples/tests/test9.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,9 +37,9 @@ int main(int argc,char **argv)
   PetscBool      verbose;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Solve a System of type GHEP - dimension %D.\n",n);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
 
   /* Create DS object */
   ierr = DSCreate(PETSC_COMM_WORLD,&ds);CHKERRQ(ierr);
@@ -99,5 +99,5 @@ int main(int argc,char **argv)
   ierr = PetscFree(eig);CHKERRQ(ierr);
   ierr = DSDestroy(&ds);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/ds/examples/tests/test9.c.html b/src/sys/classes/ds/examples/tests/test9.c.html
index 668af35..890f941 100644
--- a/src/sys/classes/ds/examples/tests/test9.c.html
+++ b/src/sys/classes/ds/examples/tests/test9.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/examples/tests/test9.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:02+00:00">
+<meta name="date" content="2016-05-16T10:31:54+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/examples/tests/test9.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/examples/tests/test9.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,9 +46,9 @@
 <a name="line37"> 37: </a>  PetscBool      verbose;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Solve a System of type GHEP - dimension %D.\n"</font>,n);
-<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line42"> 42: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
 
 <a name="line44"> 44: </a>  <font color="#B22222">/* Create <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object */</font>
 <a name="line45"> 45: </a>  <a href="../../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>(PETSC_COMM_WORLD,&ds);
@@ -108,7 +108,7 @@
 <a name="line99"> 99: </a>  PetscFree(eig);
 <a name="line100">100: </a>  <a href="../../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(&ds);
 <a name="line101">101: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line102">102: </a>  <font color="#4169E1">return</font> 0;
+<a name="line102">102: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line103">103: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/ghep/dsghep.c b/src/sys/classes/ds/impls/ghep/dsghep.c
index 70bf7ac..0ef10ff 100644
--- a/src/sys/classes/ds/impls/ghep/dsghep.c
+++ b/src/sys/classes/ds/impls/ghep/dsghep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/ds/impls/ghep/dsghep.c.html b/src/sys/classes/ds/impls/ghep/dsghep.c.html
index 6fc1b5c..45982f2 100644
--- a/src/sys/classes/ds/impls/ghep/dsghep.c.html
+++ b/src/sys/classes/ds/impls/ghep/dsghep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghep/dsghep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:53+00:00">
+<meta name="date" content="2016-05-16T10:31:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghep/dsghep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghep/dsghep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/ds/impls/ghep/index.html b/src/sys/classes/ds/impls/ghep/index.html
index 7e58672..2df63a6 100644
--- a/src/sys/classes/ds/impls/ghep/index.html
+++ b/src/sys/classes/ds/impls/ghep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/ghep/makefile b/src/sys/classes/ds/impls/ghep/makefile
index a4792f9..8bbe665 100644
--- a/src/sys/classes/ds/impls/ghep/makefile
+++ b/src/sys/classes/ds/impls/ghep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/ghep/makefile.html b/src/sys/classes/ds/impls/ghep/makefile.html
index e885cab..c3b16af 100644
--- a/src/sys/classes/ds/impls/ghep/makefile.html
+++ b/src/sys/classes/ds/impls/ghep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:53+00:00">
+<meta name="date" content="2016-05-16T10:31:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/ghiep/dqds.c b/src/sys/classes/ds/impls/ghiep/dqds.c
index 0ab6e18..887b4ee 100644
--- a/src/sys/classes/ds/impls/ghiep/dqds.c
+++ b/src/sys/classes/ds/impls/ghiep/dqds.c
@@ -12,7 +12,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -94,13 +94,14 @@ static PetscErrorCode ScanJ(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *gl,P
     m        - its multiplicity    (m=0 if there isn't a multiple eigenvalue)
     X        - matrix of generalized eigenvectors
     shift
+    dim(work)=5*n+4
 */
-static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work,PetscReal nw)
+static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work)
 {
 
   PetscErrorCode ierr;
   PetscReal      mu,tol,*a1,*y,*yp,*x,*xp;
-  PetscInt       i,k,nwall=0;
+  PetscInt       i,k;
 
   PetscFunctionBegin;
   *m = 0;
@@ -108,8 +109,6 @@ static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl
   for (i=0;i<n;i++) mu += a[i];
   mu /= n;
   tol = n*PETSC_MACHINE_EPSILON*(gr-gl);
-  nwall = 5*n+4;
-  if (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",9);
   a1 = work; /* size n */
   y = work+n; /* size n+1 */
   yp = y+n+1; /* size n+1. yp is the derivative of y (p for "prime") */
@@ -161,14 +160,12 @@ static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl
 
 #undef __FUNCT__
 #define __FUNCT__ "LUfac"
-static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work,PetscInt nw)
+static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work)
 {
-  PetscInt       nwall,i;
+  PetscInt       i;
   PetscReal      *a1;
 
   PetscFunctionBegin;
-  nwall = n;
-  if (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",11);
   a1 = work;
   for (i=0;i<n;i++) a1[i] = a[i]-shift;
   *fail = 0;
@@ -446,7 +443,7 @@ static PetscErrorCode TridqdsZhuang(PetscInt n,PetscReal *e,PetscReal *q,PetscRe
 
 #undef __FUNCT__
 #define __FUNCT__ "DSGHIEP_Eigen3DQDS"
-static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work,PetscInt nw)
+static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work)
 {
   PetscInt       totalIt=0;       /* Total Number of Iterations  */
   PetscInt       totalFail=0;     /* Total number of failures */
@@ -457,7 +454,7 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
   PetscReal      tolDef=PETSC_MACHINE_EPSILON;  /* Tolerance for deflation eps, 10*eps, 100*eps */
   PetscReal      tolGrowth=100000;
   PetscErrorCode ierr;
-  PetscInt       i,k,nwu=0,nwall,begin,ind,flag,dim,m,*split,lastSplit;
+  PetscInt       i,k,nwu=0,begin,ind,flag,dim,m,*split,lastSplit;
   PetscReal      norm,gr,gl,sigma,delta,meanEig,*U,*L,*U1,*L1;
   PetscReal      acShift,initialShift,shift=0.0,sum,det,disc,prod,x1,x2;
   PetscBool      test1,test2;
@@ -468,8 +465,6 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
   for (i=0;i<n-1;i++) {
     if (PetscAbsReal(b[i])==0.0 || PetscAbsReal(c[i])==0.0) SETERRQ(PETSC_COMM_SELF,1,"Initial tridiagonal matrix is not unreduced");
   }
-  nwall = 9*n+4;
-  if (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",8);
   U = work;
   L = work+n;
   U1 = work+2*n;
@@ -492,7 +487,7 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
   meanEig = 0.0;
   for (i=0;i<n;i++) meanEig += a[i];
   meanEig /= n; /* shift = initial shift = mean of eigenvalues */
-  ierr = Prologue(n,a,b,gl,gr,&m,&shift,work+nwu,nwall-nwu);CHKERRQ(ierr);
+  ierr = Prologue(n,a,b,gl,gr,&m,&shift,work+nwu);CHKERRQ(ierr);
   if (m==n) { /* Multiple eigenvalue, we have the one-point spectrum case */
     for (i=0;i<dim;i++) {
       wr[i] = shift;
@@ -502,7 +497,7 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
   }
   /* Initial LU Factorization */
   if (delta==0.0) shift=0.0;  /* The case when all eigenvalues are pure imaginary */
-  ierr = LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu,nwall-nwu);CHKERRQ(ierr); /* flag=1 failure; flag=0 successful transformation*/
+  ierr = LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu);CHKERRQ(ierr); /* flag=1 failure; flag=0 successful transformation*/
   while (flag==1 && nFail<maxFail) {
     shift=shift+delta;
     if (shift>gr || shift<gl) { /* Successive failures */
@@ -510,7 +505,7 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
       delta=-delta;
     }
     nFail=nFail+1;
-    ierr = LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu,nwall-nwu);CHKERRQ(ierr); /* flag=1 failure; flag=0 successful transformation*/
+    ierr = LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu);CHKERRQ(ierr); /* flag=1 failure; flag=0 successful transformation*/
   }
   if (nFail==maxFail) SETERRQ(PETSC_COMM_SELF,1,"Maximun number of failures reached in Initial LU factorization");
   /* Successful Initial transformation */
@@ -555,8 +550,8 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
           }
           if (disc<=0) {
 #if !defined(PETSC_USE_COMPLEX)
-            wr[--n] = sum+acShift; wi[n] = PetscSqrtReal(-disc);
-            wr[--n] = sum+acShift; wi[n] = -PetscSqrtReal(-disc);
+            wr[--n] = sum+acShift; if (wi) wi[n] = PetscSqrtReal(-disc);
+            wr[--n] = sum+acShift; if (wi) wi[n] = -PetscSqrtReal(-disc);
 #else
             wr[--n] = sum-PETSC_i*PetscSqrtReal(-disc)+acShift; if (wi) wi[n] = 0.0;
             wr[--n] = sum+PETSC_i*PetscSqrtReal(-disc)+acShift; if (wi) wi[n] = 0.0;
@@ -614,8 +609,6 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
         disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
         if ((PetscAbsReal(L[n-2])>tolZero) && (PetscAbsReal(L[n-3])>tolZero)) { /* L's are big */
           shift = 0;
-          sum = 0; /* Needed in case of failure */
-          prod = 0;
           ierr = RealDQDS(n-begin,L+begin,U+begin,0,tolGrowth,norm,L1+begin,U1+begin,&flag);CHKERRQ(ierr);
           if (flag) {  /* Failure */
             ierr = TridqdsZhuang(n-begin,L+begin,U+begin,0.0,0.0,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);CHKERRQ(ierr);
@@ -697,16 +690,16 @@ static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,Pe
     if (n==begin+2) {
       sum = (L[n-2]+U[n-2]+U[n-1])/2;
       disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
-        if (disc<=0)  {  /* Complex case */
+      if (disc<=0) {  /* Complex case */
         /* Deflation 2 */
 #if !defined(PETSC_USE_COMPLEX)
-        wr[--n] = sum+acShift; wi[n] = PetscSqrtReal(-disc);
-        wr[--n] = sum+acShift; wi[n] = -PetscSqrtReal(-disc);
+        wr[--n] = sum+acShift; if (wi) wi[n] = PetscSqrtReal(-disc);
+        wr[--n] = sum+acShift; if (wi) wi[n] = -PetscSqrtReal(-disc);
 #else
         wr[--n] = sum-PETSC_i*PetscSqrtReal(-disc)+acShift; if (wi) wi[n] = 0.0;
         wr[--n] = sum+PETSC_i*PetscSqrtReal(-disc)+acShift; if (wi) wi[n] = 0.0;
 #endif
-      } else  { /* Real case */
+      } else { /* Real case */
         if (sum==0.0) {
           x1 = PetscSqrtReal(disc);
           x2 = -x1;
@@ -765,7 +758,6 @@ PetscErrorCode DSSolve_GHIEP_DQDS_II(DS ds,PetscScalar *wr,PetscScalar *wi)
   Q = ds->mat[DS_MAT_Q];
   d = ds->rmat[DS_MAT_T];
   e = ds->rmat[DS_MAT_T] + ld;
-  c = ds->rmat[DS_MAT_T] + 2*ld;
   s = ds->rmat[DS_MAT_D];
   /* Quick return if possible */
   if (ds->n-ds->l == 1) {
@@ -783,7 +775,7 @@ PetscErrorCode DSSolve_GHIEP_DQDS_II(DS ds,PetscScalar *wr,PetscScalar *wi)
   /* Reduce to pseudotriadiagonal form */
   ierr = DSIntermediate_GHIEP(ds);CHKERRQ(ierr);
 
-  /* Compute Eigenvalues (DQDS)*/
+  /* Compute Eigenvalues (DQDS) */
   /* Form pseudosymmetric tridiagonal */
   a = ds->rwork;
   b = a+ld;
@@ -805,7 +797,7 @@ PetscErrorCode DSSolve_GHIEP_DQDS_II(DS ds,PetscScalar *wr,PetscScalar *wi)
     a[ds->n-1] = PetscRealPart(A[ds->n-1+(ds->n-1)*ld]*B[ds->n-1+(ds->n-1)*ld]);
   }
   vi = (wi)?wi+ds->l:NULL;
-  ierr = DSGHIEP_Eigen3DQDS(ds->n-ds->l,a+ds->l,b+ds->l,c+ds->l,wr+ds->l,vi,ds->rwork+nwu,nwall-nwu);CHKERRQ(ierr);
+  ierr = DSGHIEP_Eigen3DQDS(ds->n-ds->l,a+ds->l,b+ds->l,c+ds->l,wr+ds->l,vi,ds->rwork+nwu);CHKERRQ(ierr);
 
   /* Compute Eigenvectors with Inverse Iteration */
   ierr = DSGHIEPInverseIteration(ds,wr,wi);CHKERRQ(ierr);
diff --git a/src/sys/classes/ds/impls/ghiep/dqds.c.html b/src/sys/classes/ds/impls/ghiep/dqds.c.html
index 85a30de..ac854d6 100644
--- a/src/sys/classes/ds/impls/ghiep/dqds.c.html
+++ b/src/sys/classes/ds/impls/ghiep/dqds.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghiep/dqds.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:56+00:00">
+<meta name="date" content="2016-05-16T10:31:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghiep/dqds.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghiep/dqds.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   DQDS-type dense solver for generalized symmetric-indefinite eigenproblem.</font>
 <a name="line3">  3: </a><font color="#B22222">   Based on Matlab code from Carla Ferreira.</font>
@@ -24,7 +24,7 @@
 
 <a name="line13"> 13: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line14"> 14: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line15"> 15: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line15"> 15: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line17"> 17: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -101,707 +101,699 @@
 <a name="line94"> 94: </a><font color="#B22222">    m        - its multiplicity    (m=0 if there isn't a multiple eigenvalue)</font>
 <a name="line95"> 95: </a><font color="#B22222">    X        - matrix of generalized eigenvectors</font>
 <a name="line96"> 96: </a><font color="#B22222">    shift</font>
-<a name="line97"> 97: </a><font color="#B22222">*/</font>
-<a name="line98"> 98: </a><strong><font color="#4169E1"><a name="Prologue"></a>static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work,PetscReal nw)</font></strong>
-<a name="line99"> 99: </a>{
-
-<a name="line102">102: </a>  PetscReal      mu,tol,*a1,*y,*yp,*x,*xp;
-<a name="line103">103: </a>  PetscInt       i,k,nwall=0;
-
-<a name="line106">106: </a>  *m = 0;
-<a name="line107">107: </a>  mu = 0.0;
-<a name="line108">108: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) mu += a[i];
-<a name="line109">109: </a>  mu /= n;
-<a name="line110">110: </a>  tol = n*PETSC_MACHINE_EPSILON*(gr-gl);
-<a name="line111">111: </a>  nwall = 5*n+4;
-<a name="line112">112: </a>  <font color="#4169E1">if</font> (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,9);
-<a name="line113">113: </a>  a1 = work; <font color="#B22222">/* size n */</font>
-<a name="line114">114: </a>  y = work+n; <font color="#B22222">/* size n+1 */</font>
-<a name="line115">115: </a>  yp = y+n+1; <font color="#B22222">/* size n+1. yp is the derivative of y (p for "prime") */</font>
-<a name="line116">116: </a>  x = yp+n+1; <font color="#B22222">/* size n+1 */</font>
-<a name="line117">117: </a>  xp = x+n+1; <font color="#B22222">/* size n+1 */</font>
-<a name="line118">118: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) a1[i] = mu-a[i];
-<a name="line119">119: </a>  x[0] = 1;
-<a name="line120">120: </a>  xp[0] = 0;
-<a name="line121">121: </a>  x[1] = a1[0];
-<a name="line122">122: </a>  xp[1] = 1;
-<a name="line123">123: </a>  <font color="#4169E1">for</font> (i=1;i<n;i++) {
-<a name="line124">124: </a>    x[i+1]=a1[i]*x[i]-b[i-1]*x[i-1];
-<a name="line125">125: </a>    xp[i+1]=a1[i]*xp[i]+x[i]-b[i-1]*xp[i-1];
-<a name="line126">126: </a>  }
-<a name="line127">127: </a>  *shift = mu;
-<a name="line128">128: </a>  <font color="#4169E1">if</font> (PetscAbsReal(x[n])<tol) {
-<a name="line129">129: </a>    <font color="#B22222">/* mu is an eigenvalue */</font>
-<a name="line130">130: </a>    *m = *m+1;
-<a name="line131">131: </a>    <font color="#4169E1">if</font> (PetscAbsReal(xp[n])<tol) {
-<a name="line132">132: </a>      <font color="#B22222">/* mu is a multiple eigenvalue; Is it the one-point spectrum case? */</font>
-<a name="line133">133: </a>      k = 0;
-<a name="line134">134: </a>      <font color="#4169E1">while</font> (PetscAbsReal(xp[n])<tol && k<n-1) {
-<a name="line135">135: </a>        PetscMemcpy(x,y,(n+1)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line136">136: </a>        PetscMemcpy(xp,yp,(n+1)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line137">137: </a>        x[k] = 0.0;
-<a name="line138">138: </a>        k++;
-<a name="line139">139: </a>        x[k] = 1.0;
-<a name="line140">140: </a>        xp[k] = 0.0;
-<a name="line141">141: </a>        x[k+1] = a1[k] + y[k];
-<a name="line142">142: </a>        xp[k+1] = 1+yp[k];
-<a name="line143">143: </a>        <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
-<a name="line144">144: </a>          x[i+1] = a1[i]*x[i]-b[i-1]*x[i-1]+y[i];
-<a name="line145">145: </a>          xp[i+1]=a1[i]*xp[i]+x[i]-b[i-1]*xp[i-1]+yp[i];
-<a name="line146">146: </a>        }
-<a name="line147">147: </a>        *m = *m+1;
-<a name="line148">148: </a>      }
-<a name="line149">149: </a>    }
-<a name="line150">150: </a>  }
-<a name="line151">151: </a><font color="#B22222">/*</font>
-<a name="line152">152: </a><font color="#B22222">  When mu is not an eigenvalue or it it an eigenvalue but it is not the one-point spectrum case, we will always have shift=mu</font>
-
-<a name="line154">154: </a><font color="#B22222">  Need to check for overflow!</font>
-
-<a name="line156">156: </a><font color="#B22222">  After calling Prologue, eigenComplexdqds and eigen3dqds will test if m==n in which case we have the one-point spectrum case;</font>
-<a name="line157">157: </a><font color="#B22222">  If m!=0, the only output to be used is the shift returned.</font>
-<a name="line158">158: </a><font color="#B22222">*/</font>
-<a name="line159">159: </a>  <font color="#4169E1">return</font>(0);
-<a name="line160">160: </a>}
-
-<a name="line164">164: </a><strong><font color="#4169E1"><a name="LUfac"></a>static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work,PetscInt nw)</font></strong>
-<a name="line165">165: </a>{
-<a name="line166">166: </a>  PetscInt       nwall,i;
-<a name="line167">167: </a>  PetscReal      *a1;
-
-<a name="line170">170: </a>  nwall = n;
-<a name="line171">171: </a>  <font color="#4169E1">if</font> (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,11);
-<a name="line172">172: </a>  a1 = work;
-<a name="line173">173: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) a1[i] = a[i]-shift;
-<a name="line174">174: </a>  *fail = 0;
-<a name="line175">175: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line176">176: </a>    U[i] = a1[i];
-<a name="line177">177: </a>    L[i] = b[i]/U[i];
-<a name="line178">178: </a>    a1[i+1] = a1[i+1]-L[i];
-<a name="line179">179: </a>  }
-<a name="line180">180: </a>  U[n-1] = a1[n-1];
-
-<a name="line182">182: </a>  <font color="#B22222">/* Check if there are NaN values */</font>
-<a name="line183">183: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line184">184: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(L[i])) *fail=1;
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(U[i])) *fail=1;
-<a name="line186">186: </a>  }
-<a name="line187">187: </a>  <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(U[n-1])) *fail=1;
-
-<a name="line189">189: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line190">190: </a>    <font color="#4169E1">if</font> (PetscAbsReal(L[i])>tol*norm) *fail = 1;  <font color="#B22222">/* This demands IEEE arithmetic */</font>
-<a name="line191">191: </a>    <font color="#4169E1">if</font> (PetscAbsReal(U[i])>tol*norm) *fail = 1;
-<a name="line192">192: </a>  }
-<a name="line193">193: </a>  <font color="#4169E1">if</font> (!*fail && PetscAbsReal(U[n-1])>tol*norm) *fail = 1;
-<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
-<a name="line195">195: </a>}
-
-<a name="line199">199: </a><strong><font color="#4169E1"><a name="RealDQDS"></a>static PetscErrorCode RealDQDS(PetscInt n,PetscReal *L,PetscReal *U,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L1,PetscReal *U1,PetscInt *fail)</font></strong>
-<a name="line200">200: </a>{
-<a name="line201">201: </a>  PetscReal d;
-<a name="line202">202: </a>  PetscInt  i;
-
-<a name="line205">205: </a>  *fail = 0;
-<a name="line206">206: </a>  d = U[0]-shift;
-<a name="line207">207: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line208">208: </a>    U1[i] = d+L[i];
-<a name="line209">209: </a>    L1[i] = L[i]*(U[i+1]/U1[i]);
-<a name="line210">210: </a>    d = d*(U[i+1]/U1[i])-shift;
-<a name="line211">211: </a>  }
-<a name="line212">212: </a>  U1[n-1]=d;
-
-<a name="line214">214: </a>  <font color="#B22222">/* The following demands IEEE arithmetic */</font>
-<a name="line215">215: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line216">216: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(L1[i])) *fail=1;
-<a name="line217">217: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(U1[i])) *fail=1;
-<a name="line218">218: </a>  }
-<a name="line219">219: </a>  <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(U1[n-1])) *fail=1;
-<a name="line220">220: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line221">221: </a>    <font color="#4169E1">if</font> (PetscAbsReal(L1[i])>tol*norm) *fail=1;
-<a name="line222">222: </a>    <font color="#4169E1">if</font> (PetscAbsReal(U1[i])>tol*norm) *fail=1;
-<a name="line223">223: </a>  }
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (!*fail && PetscAbsReal(U1[n-1])>tol*norm) *fail=1;
-<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
-<a name="line226">226: </a>}
-
-<a name="line230">230: </a><strong><font color="#4169E1"><a name="TridqdsZhuang3"></a>static PetscErrorCode TridqdsZhuang3(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscInt *fail)</font></strong>
-<a name="line231">231: </a>{
-<a name="line232">232: </a>  PetscReal xl,yl,xr,yr,zr;
-<a name="line233">233: </a>  PetscInt  i;
-
-<a name="line236">236: </a>  *fail = 0;
-<a name="line237">237: </a>  xr = 1.0;
-<a name="line238">238: </a>  yr = e[0];
-<a name="line239">239: </a>  zr = 0.0;
-<a name="line240">240: </a>  <font color="#B22222">/* Step 1 */</font>
-<a name="line241">241: </a>  <font color="#B22222">/* the efect of Z1 */</font>
-<a name="line242">242: </a>  xr = xr*q[0]+yr;
-<a name="line243">243: </a>  <font color="#B22222">/* the inverse of L1 */</font>
-<a name="line244">244: </a>  xl = (q[0]+e[0])*(q[0]+e[0])+q[1]*e[0]-sum*(q[0]+e[0])+prod;
-<a name="line245">245: </a>  yl = -(q[2]*e[1]*q[1]*e[0])/xl;
-<a name="line246">246: </a>  xl = -(q[1]*e[0]*(q[0]+e[0]+q[1]+e[1]-sum))/xl;
-<a name="line247">247: </a>  <font color="#B22222">/* the efect of L1 */</font>
-<a name="line248">248: </a>  q[0] = xr-xl;
-<a name="line249">249: </a>  xr = yr-xl;
-<a name="line250">250: </a>  yr = zr-yl-xl*e[1];
-<a name="line251">251: </a>  <font color="#B22222">/*the inverse of Y1 */</font>
-<a name="line252">252: </a>  xr = xr/q[0];
-<a name="line253">253: </a>  yr = yr/q[0];
-<a name="line254">254: </a>  <font color="#B22222">/*the effect of Y1 inverse */</font>
-<a name="line255">255: </a>  e[0] = xl+yr+xr*q[1];
-<a name="line256">256: </a>  xl = yl+zr+yr*q[2];      <font color="#B22222">/* zr=0  when n=3 */</font>
-<a name="line257">257: </a>  <font color="#B22222">/*the effect of Y1 */</font>
-<a name="line258">258: </a>  xr = 1.0-xr;
-<a name="line259">259: </a>  yr = e[1]-yr;
-
-<a name="line261">261: </a>  <font color="#B22222">/* STEP n-1 */</font>
-
-<a name="line263">263: </a>  <font color="#4169E1">if</font> (PetscAbsReal(e[n-3])>tolDef*PetscAbsReal(xl) || PetscAbsReal(e[n-3])>tolDef*PetscAbsReal(q[n-3])) {
-<a name="line264">264: </a>    <font color="#B22222">/* the efect of Zn-1 */</font>
-<a name="line265">265: </a>    xr = xr*q[n-2]+yr;
-<a name="line266">266: </a>    <font color="#B22222">/* the inverse of Ln-1 */</font>
-<a name="line267">267: </a>    xl = -xl/e[n-3];
-<a name="line268">268: </a>    <font color="#B22222">/* the efect of Ln-1 */</font>
-<a name="line269">269: </a>    q[n-2] = xr-xl;
-<a name="line270">270: </a>    xr = yr-xl;
-<a name="line271">271: </a>    <font color="#B22222">/*the inverse of Yn-1 */</font>
-<a name="line272">272: </a>    xr = xr/q[n-2];
-<a name="line273">273: </a>    <font color="#B22222">/*the effect of the inverse of Yn-1 */</font>
-<a name="line274">274: </a>    e[n-2] = xl+xr*q[n-1];
-<a name="line275">275: </a>    <font color="#B22222">/*the effects of Yn-1 */</font>
-<a name="line276">276: </a>    xr = 1.0-xr;
-<a name="line277">277: </a>    <font color="#B22222">/* STEP n */</font>
-<a name="line278">278: </a>    <font color="#B22222">/*the effect of Zn */</font>
-<a name="line279">279: </a>    xr = xr*q[n-1];
-<a name="line280">280: </a>    <font color="#B22222">/*the inverse of Ln=I */</font>
-<a name="line281">281: </a>    <font color="#B22222">/*the effect of Ln */</font>
-<a name="line282">282: </a>    q[n-1] = xr;
-<a name="line283">283: </a>    <font color="#B22222">/* the inverse of  Yn-1=I */</font>
-
-<a name="line285">285: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* Free deflation */</font>
-<a name="line286">286: </a>    e[n-2] = (e[n-3]+(xr*q[n-2]+yr)+q[n-1])*0.5;       <font color="#B22222">/* Sum=trace/2 */</font>
-<a name="line287">287: </a>    q[n-2] = (e[n-3]+q[n-2]*xr)*q[n-1]-xl;             <font color="#B22222">/* det */</font>
-<a name="line288">288: </a>    q[n-1] = e[n-2]*e[n-2]-q[n-2];
-<a name="line289">289: </a>    *fail = 2;
-<a name="line290">290: </a>  }
-
-<a name="line292">292: </a>  <font color="#B22222">/* The following demands IEEE arithmetic */</font>
-<a name="line293">293: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line294">294: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(e[i])) *fail=1;
-<a name="line295">295: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(q[i])) *fail=1;
-<a name="line296">296: </a>  }
-<a name="line297">297: </a>  <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(q[n-1])) *fail=1;
-<a name="line298">298: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line299">299: </a>    <font color="#4169E1">if</font> (PetscAbsReal(e[i])>tol*norm) *fail=1;
-<a name="line300">300: </a>    <font color="#4169E1">if</font> (PetscAbsReal(q[i])>tol*norm) *fail=1;
-<a name="line301">301: </a>  }
-<a name="line302">302: </a>  <font color="#4169E1">if</font> (!*fail && PetscAbsReal(q[n-1])>tol*norm) *fail=1;
-<a name="line303">303: </a>  <font color="#4169E1">return</font>(0);
-<a name="line304">304: </a>}
-
-<a name="line308">308: </a><strong><font color="#4169E1"><a name="TridqdsZhuang"></a>static PetscErrorCode TridqdsZhuang(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscReal *e1,PetscReal *q1,PetscInt *fail)</font></strong>
-<a name="line309">309: </a>{
-<a name="line311">311: </a>  PetscInt       i;
-<a name="line312">312: </a>  PetscReal      xl,yl,xr,yr,zr;
-
-<a name="line315">315: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line316">316: </a>    e1[i] = e[i];
-<a name="line317">317: </a>    q1[i] = q[i];
-<a name="line318">318: </a>  }
-<a name="line319">319: </a>  q1[n-1] = q[n-1];
-<a name="line320">320: </a>  *fail = 0;
-<a name="line321">321: </a>  <font color="#4169E1">if</font> (n>3) {   <font color="#B22222">/* For n>3 */</font>
-<a name="line322">322: </a>    *fail = 0;
-<a name="line323">323: </a>    xr = 1;
-<a name="line324">324: </a>    yr = e1[0];
-<a name="line325">325: </a>    zr = 0;
-<a name="line326">326: </a>    <font color="#B22222">/* step 1 */</font>
-<a name="line327">327: </a>    <font color="#B22222">/* the efect of Z1 */</font>
-<a name="line328">328: </a>    xr = xr*q1[0]+yr;
-<a name="line329">329: </a>    <font color="#B22222">/* the inverse of L1 */</font>
-<a name="line330">330: </a>    xl = (q1[0]+e1[0])*(q1[0]+e1[0])+q1[1]*e1[0]-sum*(q1[0]+e1[0])+prod;
-<a name="line331">331: </a>    yl = -(q1[2]*e1[1]*q1[1]*e1[0])/xl;
-<a name="line332">332: </a>    xl = -(q1[1]*e1[0]*(q1[0]+e1[0]+q1[1]+e1[1]-sum))/xl;
-<a name="line333">333: </a>    <font color="#B22222">/* the efect of L1 */</font>
-<a name="line334">334: </a>    q1[0] = xr-xl;
-<a name="line335">335: </a>    xr = yr-xl;
-<a name="line336">336: </a>    yr = zr-yl-xl*e1[1];
-<a name="line337">337: </a>    zr = -yl*e1[2];
-<a name="line338">338: </a>    <font color="#B22222">/* the inverse of Y1 */</font>
-<a name="line339">339: </a>    xr = xr/q1[0];
-<a name="line340">340: </a>    yr = yr/q1[0];
-<a name="line341">341: </a>    zr = zr/q1[0];
-<a name="line342">342: </a>    <font color="#B22222">/* the effect of Y1 inverse */</font>
-<a name="line343">343: </a>    e1[0] = xl+yr+xr*q1[1];
-<a name="line344">344: </a>    xl = yl+zr+yr*q1[2];
-<a name="line345">345: </a>    yl = zr*q1[3];
-<a name="line346">346: </a>    <font color="#B22222">/* the effect of Y1 */</font>
-<a name="line347">347: </a>    xr = 1-xr;
-<a name="line348">348: </a>    yr = e1[1]-yr;
-<a name="line349">349: </a>    zr = -zr;
-<a name="line350">350: </a>    <font color="#B22222">/* step i=2,...,n-3 */</font>
-<a name="line351">351: </a>    <font color="#4169E1">for</font> (i=1;i<n-3;i++) {
-<a name="line352">352: </a>      <font color="#B22222">/* the efect of Zi */</font>
-<a name="line353">353: </a>      xr = xr*q1[i]+yr;
-<a name="line354">354: </a>      <font color="#B22222">/* the inverse of Li */</font>
-<a name="line355">355: </a>      xl = -xl/e1[i-1];
-<a name="line356">356: </a>      yl = -yl/e1[i-1];
-<a name="line357">357: </a>      <font color="#B22222">/* the efect of Li */</font>
-<a name="line358">358: </a>      q1[i] = xr-xl;
-<a name="line359">359: </a>      xr = yr-xl;
-<a name="line360">360: </a>      yr = zr-yl-xl*e1[i+1];
-<a name="line361">361: </a>      zr = -yl*e1[i+2];
-<a name="line362">362: </a>      <font color="#B22222">/* the inverse of Yi */</font>
-<a name="line363">363: </a>      xr = xr/q1[i];
-<a name="line364">364: </a>      yr = yr/q1[i];
-<a name="line365">365: </a>      zr = zr/q1[i];
-<a name="line366">366: </a>      <font color="#B22222">/* the effect of the inverse of Yi */</font>
-<a name="line367">367: </a>      e1[i] = xl+yr+xr*q1[i+1];
-<a name="line368">368: </a>      xl = yl+zr+yr*q1[i+2];
-<a name="line369">369: </a>      yl = zr*q1[i+3];
-<a name="line370">370: </a>      <font color="#B22222">/* the effects of Yi */</font>
-<a name="line371">371: </a>      xr = 1.0-xr;
-<a name="line372">372: </a>      yr = e1[i+1]-yr;
-<a name="line373">373: </a>      zr = -zr;
-<a name="line374">374: </a>    }
-
-<a name="line376">376: </a>    <font color="#B22222">/* STEP n-2            zr is no longer needed */</font>
-
-<a name="line378">378: </a>    <font color="#B22222">/* the efect of Zn-2 */</font>
-<a name="line379">379: </a>    xr = xr*q1[n-3]+yr;
-<a name="line380">380: </a>    <font color="#B22222">/* the inverse of Ln-2 */</font>
-<a name="line381">381: </a>    xl = -xl/e1[n-4];
-<a name="line382">382: </a>    yl = -yl/e1[n-4];
-<a name="line383">383: </a>    <font color="#B22222">/* the efect of Ln-2 */</font>
-<a name="line384">384: </a>    q1[n-3] = xr-xl;
-<a name="line385">385: </a>    xr = yr-xl;
-<a name="line386">386: </a>    yr = zr-yl-xl*e1[n-2];
-<a name="line387">387: </a>    <font color="#B22222">/* the inverse of Yn-2 */</font>
-<a name="line388">388: </a>    xr = xr/q1[n-3];
-<a name="line389">389: </a>    yr = yr/q1[n-3];
-<a name="line390">390: </a>    <font color="#B22222">/* the effect of the inverse of Yn-2 */</font>
-<a name="line391">391: </a>    e1[n-3] = xl+yr+xr*q1[n-2];
-<a name="line392">392: </a>    xl = yl+yr*q1[n-1];
-<a name="line393">393: </a>    <font color="#B22222">/* the effect of Yn-2 */</font>
-<a name="line394">394: </a>    xr = 1.0-xr;
-<a name="line395">395: </a>    yr = e1[n-2]-yr;
-
-<a name="line397">397: </a>    <font color="#B22222">/* STEP n-1           yl and yr are no longer needed */</font>
-<a name="line398">398: </a>    <font color="#B22222">/* Testing for EARLY DEFLATION */</font>
-
-<a name="line400">400: </a>    <font color="#4169E1">if</font> (PetscAbsReal(e1[n-3])>tolDef*PetscAbsReal(xl) || PetscAbsReal(e1[n-3])>tolDef*PetscAbsReal(q1[n-3])) {
-<a name="line401">401: </a>      <font color="#B22222">/* the efect of Zn-1 */</font>
-<a name="line402">402: </a>      xr = xr*q1[n-2]+yr;
-<a name="line403">403: </a>      <font color="#B22222">/* the inverse of Ln-1 */</font>
-<a name="line404">404: </a>      xl = -xl/e1[n-3];
-<a name="line405">405: </a>      <font color="#B22222">/* the efect of Ln-1 */</font>
-<a name="line406">406: </a>      q1[n-2] = xr-xl;
-<a name="line407">407: </a>      xr = yr-xl;
-<a name="line408">408: </a>      <font color="#B22222">/*the inverse of Yn-1 */</font>
-<a name="line409">409: </a>      xr = xr/q1[n-2];
-<a name="line410">410: </a>      <font color="#B22222">/*the effect of the inverse of Yn-1 */</font>
-<a name="line411">411: </a>      e1[n-2] = xl+xr*q1[n-1];
-<a name="line412">412: </a>      <font color="#B22222">/*the effects of Yn-1 */</font>
-<a name="line413">413: </a>      xr = 1.0-xr;
-
-<a name="line415">415: </a>      <font color="#B22222">/* STEP n;     xl no longer needed */</font>
-<a name="line416">416: </a>      <font color="#B22222">/* the effect of Zn */</font>
-<a name="line417">417: </a>      xr = xr*q1[n-1];
-<a name="line418">418: </a>      <font color="#B22222">/* the inverse of Ln = I */</font>
-<a name="line419">419: </a>      <font color="#B22222">/* the effect of Ln */</font>
-<a name="line420">420: </a>      q1[n-1] = xr;
-<a name="line421">421: </a>      <font color="#B22222">/* the inverse of  Yn-1=I */</font>
-
-<a name="line423">423: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* FREE DEFLATION */</font>
-<a name="line424">424: </a>      e1[n-2] = (e1[n-3]+xr*q1[n-2]+yr+q1[n-1])*0.5;     <font color="#B22222">/* sum=trace/2 */</font>
-<a name="line425">425: </a>      q1[n-2] = (e1[n-3]+q1[n-2]*xr)*q1[n-1]-xl;         <font color="#B22222">/* det */</font>
-<a name="line426">426: </a>      q1[n-1] = e1[n-2]*e1[n-2]-q1[n-2];
-<a name="line427">427: </a>      *fail = 2;
-<a name="line428">428: </a>    }
-
-<a name="line430">430: </a>    <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line431">431: </a>      <font color="#4169E1">if</font> (PetscIsInfOrNanReal(e1[i])) *fail=1;
-<a name="line432">432: </a>      <font color="#4169E1">if</font> (PetscIsInfOrNanReal(q1[i])) *fail=1;
-<a name="line433">433: </a>    }
-<a name="line434">434: </a>    <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(q1[n-1])) *fail=1;
-<a name="line435">435: </a>    <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
-<a name="line436">436: </a>      <font color="#4169E1">if</font> (PetscAbsReal(e1[i])>tol*norm) *fail = 1;  <font color="#B22222">/* This demands IEEE arithmetic */</font>
-<a name="line437">437: </a>      <font color="#4169E1">if</font> (PetscAbsReal(q1[i])>tol*norm) *fail = 1;
-<a name="line438">438: </a>    }
-<a name="line439">439: </a>    <font color="#4169E1">if</font> (!*fail && PetscAbsReal(q1[n-1])>tol*norm) *fail = 1;
-
-<a name="line441">441: </a>  } <font color="#4169E1">else</font> {  <font color="#B22222">/* The case n=3 */</font>
-<a name="line442">442: </a>    TridqdsZhuang3(n,e1,q1,sum,prod,tol,norm,tolDef,fail);
-<a name="line443">443: </a>  }
-<a name="line444">444: </a>  <font color="#4169E1">return</font>(0);
-<a name="line445">445: </a>}
-
-<a name="line449">449: </a><strong><font color="#4169E1"><a name="DSGHIEP_Eigen3DQDS"></a>static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work,PetscInt nw)</font></strong>
-<a name="line450">450: </a>{
-<a name="line451">451: </a>  PetscInt       totalIt=0;       <font color="#B22222">/* Total Number of Iterations  */</font>
-<a name="line452">452: </a>  PetscInt       totalFail=0;     <font color="#B22222">/* Total number of failures */</font>
-<a name="line453">453: </a>  PetscInt       nFail=0;         <font color="#B22222">/* Number of failures per transformation */</font>
-<a name="line454">454: </a>  PetscReal      tolZero=1.0/16;  <font color="#B22222">/* Tolerance for zero shifts */</font>
-<a name="line455">455: </a>  PetscInt       maxIt=10*n;      <font color="#B22222">/* Maximum number of iterations */</font>
-<a name="line456">456: </a>  PetscInt       maxFail=10*n;    <font color="#B22222">/* Maximum number of failures allowed per each transformation */</font>
-<a name="line457">457: </a>  PetscReal      tolDef=PETSC_MACHINE_EPSILON;  <font color="#B22222">/* Tolerance for deflation eps, 10*eps, 100*eps */</font>
-<a name="line458">458: </a>  PetscReal      tolGrowth=100000;
-<a name="line460">460: </a>  PetscInt       i,k,nwu=0,nwall,begin,ind,flag,dim,m,*split,lastSplit;
-<a name="line461">461: </a>  PetscReal      norm,gr,gl,sigma,delta,meanEig,*U,*L,*U1,*L1;
-<a name="line462">462: </a>  PetscReal      acShift,initialShift,shift=0.0,sum,det,disc,prod,x1,x2;
-<a name="line463">463: </a>  PetscBool      test1,test2;
-
-<a name="line466">466: </a>  dim = n;
-<a name="line467">467: </a>  <font color="#B22222">/* Test if the matrix is unreduced */</font>
-<a name="line468">468: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line469">469: </a>    <font color="#4169E1">if</font> (PetscAbsReal(b[i])==0.0 || PetscAbsReal(c[i])==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Initial tridiagonal matrix is not unreduced"</font>);
-<a name="line470">470: </a>  }
-<a name="line471">471: </a>  nwall = 9*n+4;
-<a name="line472">472: </a>  <font color="#4169E1">if</font> (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,8);
-<a name="line473">473: </a>  U = work;
-<a name="line474">474: </a>  L = work+n;
-<a name="line475">475: </a>  U1 = work+2*n;
-<a name="line476">476: </a>  L1 = work+3*n;
-<a name="line477">477: </a>  nwu = 4*n;
-<a name="line478">478: </a>  <font color="#4169E1">if</font> (wi) {
-<a name="line479">479: </a>    PetscMemzero(wi,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line480">480: </a>  }
-<a name="line481">481: </a>  <font color="#B22222">/* Normalization - the J form of C */</font>
-<a name="line482">482: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) b[i] *= c[i]; <font color="#B22222">/* subdiagonal of the J form */</font>
-
-<a name="line484">484: </a>  <font color="#B22222">/* Scan matrix J  ---- Finding a box of inclusion for the eigenvalues */</font>
-<a name="line485">485: </a>  norm = 0.0;
-<a name="line486">486: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line487">487: </a>    norm = PetscMax(norm,PetscMax(PetscAbsReal(a[i]),PetscAbsReal(b[i])));
-<a name="line488">488: </a>  }
-<a name="line489">489: </a>  norm = PetscMax(norm,PetscMax(1,PetscAbsReal(a[n-1])));
-<a name="line490">490: </a>  ScanJ(n,a,b,&gl,&gr,&sigma);
-<a name="line491">491: </a>  delta = (gr-gl)/n; <font color="#B22222">/* How much to add to the shift, in case of failure (element growth) */</font>
-<a name="line492">492: </a>  meanEig = 0.0;
-<a name="line493">493: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) meanEig += a[i];
-<a name="line494">494: </a>  meanEig /= n; <font color="#B22222">/* shift = initial shift = mean of eigenvalues */</font>
-<a name="line495">495: </a>  Prologue(n,a,b,gl,gr,&m,&shift,work+nwu,nwall-nwu);
-<a name="line496">496: </a>  <font color="#4169E1">if</font> (m==n) { <font color="#B22222">/* Multiple eigenvalue, we have the one-point spectrum case */</font>
-<a name="line497">497: </a>    <font color="#4169E1">for</font> (i=0;i<dim;i++) {
-<a name="line498">498: </a>      wr[i] = shift;
-<a name="line499">499: </a>      <font color="#4169E1">if</font> (wi) wi[i] = 0.0;
-<a name="line500">500: </a>    }
-<a name="line501">501: </a>    <font color="#4169E1">return</font>(0);
-<a name="line502">502: </a>  }
-<a name="line503">503: </a>  <font color="#B22222">/* Initial LU Factorization */</font>
-<a name="line504">504: </a>  <font color="#4169E1">if</font> (delta==0.0) shift=0.0;  <font color="#B22222">/* The case when all eigenvalues are pure imaginary */</font>
-<a name="line505">505: </a>  LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu,nwall-nwu); <font color="#B22222">/* flag=1 failure; flag=0 successful transformation*/</font>
-<a name="line506">506: </a>  <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) {
-<a name="line507">507: </a>    shift=shift+delta;
-<a name="line508">508: </a>    <font color="#4169E1">if</font> (shift>gr || shift<gl) { <font color="#B22222">/* Successive failures */</font>
-<a name="line509">509: </a>      shift=meanEig;
-<a name="line510">510: </a>      delta=-delta;
-<a name="line511">511: </a>    }
-<a name="line512">512: </a>    nFail=nFail+1;
-<a name="line513">513: </a>    LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu,nwall-nwu); <font color="#B22222">/* flag=1 failure; flag=0 successful transformation*/</font>
-<a name="line514">514: </a>  }
-<a name="line515">515: </a>  <font color="#4169E1">if</font> (nFail==maxFail) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Maximun number of failures reached in Initial LU factorization"</font>);
-<a name="line516">516: </a>  <font color="#B22222">/* Successful Initial transformation */</font>
-<a name="line517">517: </a>  totalFail = totalFail+nFail;
-<a name="line518">518: </a>  nFail = 0;
-<a name="line519">519: </a>  acShift = 0;
-<a name="line520">520: </a>  initialShift = shift;
-<a name="line521">521: </a>  shift = 0;
-<a name="line522">522: </a>  begin = 0;
-<a name="line523">523: </a>  lastSplit = 0;
-<a name="line524">524: </a>  PetscMalloc1(n,&split);
-<a name="line525">525: </a>  split[lastSplit] = begin;
-<a name="line526">526: </a>  <font color="#4169E1">while</font> (begin!=-1) {
-<a name="line527">527: </a>    <font color="#4169E1">while</font> (n-begin>2 && totalIt<maxIt) {
-<a name="line528">528: </a>      <font color="#B22222">/* Check for deflation before performing a transformation */</font>
-<a name="line529">529: </a>      test1 = (PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-2])
-<a name="line530">530: </a>            && PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-1]+acShift)
-<a name="line531">531: </a>            && PetscAbsReal(L[n-2]*U[n])<tolDef*PetscAbsReal(acShift+U[n-1])
-<a name="line532">532: </a>            && PetscAbsReal(L[n-2])*(PetscAbsReal(U[n-2])+1)<tolDef*PetscAbsReal(acShift+U[n-1]))? PETSC_TRUE: PETSC_FALSE;
-<a name="line533">533: </a>      <font color="#4169E1">if</font> (flag==2) {  <font color="#B22222">/* Early 2x2 deflation */</font>
-<a name="line534">534: </a>        test2 = PETSC_TRUE;
-<a name="line535">535: </a>      } <font color="#4169E1">else</font> {
-<a name="line536">536: </a>        <font color="#4169E1">if</font> (n-begin>4) {
-<a name="line537">537: </a>          test2 = (PetscAbsReal(L[n-3])<tolDef*PetscAbsReal(U[n-3])
-<a name="line538">538: </a>               && PetscAbsReal(L[n-3]*(U[n-4]+L[n-4]))< tolDef*PetscAbsReal(U[n-4]*(U[n-3]+L[n-3])+L[n-4]*L[n-3]))? PETSC_TRUE: PETSC_FALSE;
-<a name="line539">539: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* n-begin+1=3 */</font>
-<a name="line540">540: </a>          test2 = (PetscAbsReal(L[begin])<tolDef*PetscAbsReal(U[begin]))? PETSC_TRUE: PETSC_FALSE;
-<a name="line541">541: </a>        }
-<a name="line542">542: </a>      }
-<a name="line543">543: </a>      <font color="#4169E1">while</font> (test2 || test1) {
-<a name="line544">544: </a>        <font color="#B22222">/* 2x2 deflation */</font>
-<a name="line545">545: </a>        <font color="#4169E1">if</font> (test2) {
-<a name="line546">546: </a>          <font color="#4169E1">if</font> (flag==2) { <font color="#B22222">/* Early deflation */</font>
-<a name="line547">547: </a>            sum = L[n-2];
-<a name="line548">548: </a>            det = U[n-2];
-<a name="line549">549: </a>            disc = U[n-1];
-<a name="line550">550: </a>            flag = 0;
-<a name="line551">551: </a>          } <font color="#4169E1">else</font> {
-<a name="line552">552: </a>            sum = (L[n-2]+(U[n-2]+U[n-1]))/2;
-<a name="line553">553: </a>            disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
-<a name="line554">554: </a>            det = U[n-2]*U[n-1];
-<a name="line555">555: </a>          }
-<a name="line556">556: </a>          <font color="#4169E1">if</font> (disc<=0) {
-<a name="line557">557: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line558">558: </a>            wr[--n] = sum+acShift; wi[n] = PetscSqrtReal(-disc);
-<a name="line559">559: </a>            wr[--n] = sum+acShift; wi[n] = -PetscSqrtReal(-disc);
-<a name="line560">560: </a><font color="#A020F0">#else</font>
-<a name="line561">561: </a>            wr[--n] = sum-PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
-<a name="line562">562: </a>            wr[--n] = sum+PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
-<a name="line563">563: </a><font color="#A020F0">#endif</font>
-<a name="line564">564: </a>          } <font color="#4169E1">else</font> {
-<a name="line565">565: </a>            <font color="#4169E1">if</font> (sum==0.0) {
-<a name="line566">566: </a>              x1 = PetscSqrtReal(disc);
-<a name="line567">567: </a>              x2 = -x1;
-<a name="line568">568: </a>            } <font color="#4169E1">else</font> {
-<a name="line569">569: </a>              x1 = ((sum>=0.0)?1.0:-1.0)*(PetscAbsReal(sum)+PetscSqrtReal(disc));
-<a name="line570">570: </a>              x2 = det/x1;
-<a name="line571">571: </a>            }
-<a name="line572">572: </a>            wr[--n] = x1+acShift;
-<a name="line573">573: </a>            wr[--n] = x2+acShift;
-<a name="line574">574: </a>          }
-<a name="line575">575: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* test1 -- 1x1 deflation */</font>
-<a name="line576">576: </a>          x1 = U[n-1]+acShift;
-<a name="line577">577: </a>          wr[--n] = x1;
-<a name="line578">578: </a>        }
-
-<a name="line580">580: </a>        <font color="#4169E1">if</font> (n<=begin+2) {
-<a name="line581">581: </a>          <font color="#4169E1">break</font>;
-<a name="line582">582: </a>        } <font color="#4169E1">else</font> {
-<a name="line583">583: </a>          test1 = (PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-2])
-<a name="line584">584: </a>                && PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-1]+acShift)
-<a name="line585">585: </a>                && PetscAbsReal(L[n-2]*U[n-1])<tolDef*PetscAbsReal(acShift+U[n-1])
-<a name="line586">586: </a>                && PetscAbsReal(L[n-2])*(PetscAbsReal(U[n-2])+1)< tolDef*PetscAbsReal(acShift+U[n-1]))? PETSC_TRUE: PETSC_FALSE;
-<a name="line587">587: </a>          <font color="#4169E1">if</font> (n-begin>4) {
-<a name="line588">588: </a>            test2 = (PetscAbsReal(L[n-3])<tolDef*PetscAbsReal(U[n-3])
-<a name="line589">589: </a>                  && PetscAbsReal(L[n-3]*(U[n-4]+L[n-4]))< tolDef*PetscAbsReal(U[n-4]*(U[n-3]+L[n-3])+L[n-4]*L[n-3]))? PETSC_TRUE: PETSC_FALSE;
-<a name="line590">590: </a>          } <font color="#4169E1">else</font> { <font color="#B22222">/* n-begin+1=3 */</font>
-<a name="line591">591: </a>            test2 = (PetscAbsReal(L[begin])<tolDef*PetscAbsReal(U[begin]))? PETSC_TRUE: PETSC_FALSE;
-<a name="line592">592: </a>          }
-<a name="line593">593: </a>        }
-<a name="line594">594: </a>      } <font color="#B22222">/* end "WHILE deflations" */</font>
-<a name="line595">595: </a>      <font color="#B22222">/* After deflation */</font>
-<a name="line596">596: </a>      <font color="#4169E1">if</font> (n>begin+3) {
-<a name="line597">597: </a>        ind = begin;
-<a name="line598">598: </a>        <font color="#4169E1">for</font> (k=n-4;k>=begin+1;k--) {
-<a name="line599">599: </a>          <font color="#4169E1">if</font> (PetscAbsReal(L[k])<tolDef*PetscAbsReal(U[k])
-<a name="line600">600: </a>           && PetscAbsReal(L[k]*U[k+1]*(U[k+2]+L[k+2])*(U[k-1]+L[k-1]))<tolDef*PetscAbsReal((U[k-1]*(U[k]+L[k])+L[k-1]*L[k])*(U[k+1]*(U[k+2]+L[k+2])+L[k+1]*L[k+2]))) {
-<a name="line601">601: </a>            ind=k;
-<a name="line602">602: </a>            <font color="#4169E1">break</font>;
-<a name="line603">603: </a>          }
-<a name="line604">604: </a>        }
-<a name="line605">605: </a>        <font color="#4169E1">if</font> (ind>begin || PetscAbsReal(L[begin]) <tolDef*PetscAbsReal(U[begin])) {
-<a name="line606">606: </a>          lastSplit = lastSplit+1;
-<a name="line607">607: </a>          split[lastSplit] = begin;
-<a name="line608">608: </a>          L[ind] = acShift; <font color="#B22222">/* Use of L[ind] to save acShift */</font>
-<a name="line609">609: </a>          begin = ind+1;
-<a name="line610">610: </a>        }
-<a name="line611">611: </a>      }
-
-<a name="line613">613: </a>      <font color="#4169E1">if</font> (n>begin+2) {
-<a name="line614">614: </a>        disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
-<a name="line615">615: </a>        <font color="#4169E1">if</font> ((PetscAbsReal(L[n-2])>tolZero) && (PetscAbsReal(L[n-3])>tolZero)) { <font color="#B22222">/* L's are big */</font>
-<a name="line616">616: </a>          shift = 0;
-<a name="line617">617: </a>          sum = 0; <font color="#B22222">/* Needed in case of failure */</font>
-<a name="line618">618: </a>          prod = 0;
-<a name="line619">619: </a>          RealDQDS(n-begin,L+begin,U+begin,0,tolGrowth,norm,L1+begin,U1+begin,&flag);
-<a name="line620">620: </a>          <font color="#4169E1">if</font> (flag) {  <font color="#B22222">/* Failure */</font>
-<a name="line621">621: </a>            TridqdsZhuang(n-begin,L+begin,U+begin,0.0,0.0,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);
-<a name="line622">622: </a>            shift = 0.0;
-<a name="line623">623: </a>            <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) {  <font color="#B22222">/* Successive failures */</font>
-<a name="line624">624: </a>              shift = shift+delta;
-<a name="line625">625: </a>              <font color="#4169E1">if</font> (shift>gr-acShift || shift<gl-acShift) {
-<a name="line626">626: </a>                shift = meanEig-acShift;
-<a name="line627">627: </a>                delta = -delta;
-<a name="line628">628: </a>              }
-<a name="line629">629: </a>              nFail++;
-<a name="line630">630: </a>              RealDQDS(n-begin,L+begin,U+begin,0,tolGrowth,norm,L1+begin,U1+begin,&flag);
-<a name="line631">631: </a>            }
-<a name="line632">632: </a>          }
-<a name="line633">633: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* L's are small */</font>
-<a name="line634">634: </a>          <font color="#4169E1">if</font> (disc<0) {  <font color="#B22222">/* disc <0   Complex case; Francis shift; 3dqds */</font>
-<a name="line635">635: </a>            sum = U[n-2]+L[n-2]+U[n-1];
-<a name="line636">636: </a>            prod = U[n-2]*U[n-1];
-<a name="line637">637: </a>            TridqdsZhuang(n-begin,L+begin,U+begin,sum,prod,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);
-<a name="line638">638: </a>            shift = 0.0; <font color="#B22222">/* Restoring transformation */</font>
-<a name="line639">639: </a>            <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) { <font color="#B22222">/* In case of failure */</font>
-<a name="line640">640: </a>              shift = shift+U[n-1];  <font color="#B22222">/* first time shift=0 */</font>
-<a name="line641">641: </a>              RealDQDS(n-begin,L+begin,U+begin,shift,tolGrowth,norm,L1+begin,U1+begin,&flag);
-<a name="line642">642: </a>              nFail++;
-<a name="line643">643: </a>            }
-<a name="line644">644: </a>          } <font color="#4169E1">else</font>  { <font color="#B22222">/* disc >0  Real case; real Wilkinson shift; dqds */</font>
-<a name="line645">645: </a>            sum = (L[n-2]+U[n-2]+U[n-1])/2;
-<a name="line646">646: </a>            <font color="#4169E1">if</font> (sum==0.0) {
-<a name="line647">647: </a>              x1 = PetscSqrtReal(disc);
-<a name="line648">648: </a>              x2 = -x1;
+<a name="line97"> 97: </a><font color="#B22222">    dim(work)=5*n+4</font>
+<a name="line98"> 98: </a><font color="#B22222">*/</font>
+<a name="line99"> 99: </a><strong><font color="#4169E1"><a name="Prologue"></a>static PetscErrorCode Prologue(PetscInt n,PetscReal *a,PetscReal *b,PetscReal gl,PetscReal gr,PetscInt *m,PetscReal *shift,PetscReal *work)</font></strong>
+<a name="line100">100: </a>{
+
+<a name="line103">103: </a>  PetscReal      mu,tol,*a1,*y,*yp,*x,*xp;
+<a name="line104">104: </a>  PetscInt       i,k;
+
+<a name="line107">107: </a>  *m = 0;
+<a name="line108">108: </a>  mu = 0.0;
+<a name="line109">109: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) mu += a[i];
+<a name="line110">110: </a>  mu /= n;
+<a name="line111">111: </a>  tol = n*PETSC_MACHINE_EPSILON*(gr-gl);
+<a name="line112">112: </a>  a1 = work; <font color="#B22222">/* size n */</font>
+<a name="line113">113: </a>  y = work+n; <font color="#B22222">/* size n+1 */</font>
+<a name="line114">114: </a>  yp = y+n+1; <font color="#B22222">/* size n+1. yp is the derivative of y (p for "prime") */</font>
+<a name="line115">115: </a>  x = yp+n+1; <font color="#B22222">/* size n+1 */</font>
+<a name="line116">116: </a>  xp = x+n+1; <font color="#B22222">/* size n+1 */</font>
+<a name="line117">117: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) a1[i] = mu-a[i];
+<a name="line118">118: </a>  x[0] = 1;
+<a name="line119">119: </a>  xp[0] = 0;
+<a name="line120">120: </a>  x[1] = a1[0];
+<a name="line121">121: </a>  xp[1] = 1;
+<a name="line122">122: </a>  <font color="#4169E1">for</font> (i=1;i<n;i++) {
+<a name="line123">123: </a>    x[i+1]=a1[i]*x[i]-b[i-1]*x[i-1];
+<a name="line124">124: </a>    xp[i+1]=a1[i]*xp[i]+x[i]-b[i-1]*xp[i-1];
+<a name="line125">125: </a>  }
+<a name="line126">126: </a>  *shift = mu;
+<a name="line127">127: </a>  <font color="#4169E1">if</font> (PetscAbsReal(x[n])<tol) {
+<a name="line128">128: </a>    <font color="#B22222">/* mu is an eigenvalue */</font>
+<a name="line129">129: </a>    *m = *m+1;
+<a name="line130">130: </a>    <font color="#4169E1">if</font> (PetscAbsReal(xp[n])<tol) {
+<a name="line131">131: </a>      <font color="#B22222">/* mu is a multiple eigenvalue; Is it the one-point spectrum case? */</font>
+<a name="line132">132: </a>      k = 0;
+<a name="line133">133: </a>      <font color="#4169E1">while</font> (PetscAbsReal(xp[n])<tol && k<n-1) {
+<a name="line134">134: </a>        PetscMemcpy(x,y,(n+1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line135">135: </a>        PetscMemcpy(xp,yp,(n+1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line136">136: </a>        x[k] = 0.0;
+<a name="line137">137: </a>        k++;
+<a name="line138">138: </a>        x[k] = 1.0;
+<a name="line139">139: </a>        xp[k] = 0.0;
+<a name="line140">140: </a>        x[k+1] = a1[k] + y[k];
+<a name="line141">141: </a>        xp[k+1] = 1+yp[k];
+<a name="line142">142: </a>        <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
+<a name="line143">143: </a>          x[i+1] = a1[i]*x[i]-b[i-1]*x[i-1]+y[i];
+<a name="line144">144: </a>          xp[i+1]=a1[i]*xp[i]+x[i]-b[i-1]*xp[i-1]+yp[i];
+<a name="line145">145: </a>        }
+<a name="line146">146: </a>        *m = *m+1;
+<a name="line147">147: </a>      }
+<a name="line148">148: </a>    }
+<a name="line149">149: </a>  }
+<a name="line150">150: </a><font color="#B22222">/*</font>
+<a name="line151">151: </a><font color="#B22222">  When mu is not an eigenvalue or it it an eigenvalue but it is not the one-point spectrum case, we will always have shift=mu</font>
+
+<a name="line153">153: </a><font color="#B22222">  Need to check for overflow!</font>
+
+<a name="line155">155: </a><font color="#B22222">  After calling Prologue, eigenComplexdqds and eigen3dqds will test if m==n in which case we have the one-point spectrum case;</font>
+<a name="line156">156: </a><font color="#B22222">  If m!=0, the only output to be used is the shift returned.</font>
+<a name="line157">157: </a><font color="#B22222">*/</font>
+<a name="line158">158: </a>  <font color="#4169E1">return</font>(0);
+<a name="line159">159: </a>}
+
+<a name="line163">163: </a><strong><font color="#4169E1"><a name="LUfac"></a>static PetscErrorCode LUfac(PetscInt n,PetscReal *a,PetscReal *b,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L,PetscReal *U,PetscInt *fail,PetscReal *work)</font></strong>
+<a name="line164">164: </a>{
+<a name="line165">165: </a>  PetscInt       i;
+<a name="line166">166: </a>  PetscReal      *a1;
+
+<a name="line169">169: </a>  a1 = work;
+<a name="line170">170: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) a1[i] = a[i]-shift;
+<a name="line171">171: </a>  *fail = 0;
+<a name="line172">172: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line173">173: </a>    U[i] = a1[i];
+<a name="line174">174: </a>    L[i] = b[i]/U[i];
+<a name="line175">175: </a>    a1[i+1] = a1[i+1]-L[i];
+<a name="line176">176: </a>  }
+<a name="line177">177: </a>  U[n-1] = a1[n-1];
+
+<a name="line179">179: </a>  <font color="#B22222">/* Check if there are NaN values */</font>
+<a name="line180">180: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line181">181: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(L[i])) *fail=1;
+<a name="line182">182: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(U[i])) *fail=1;
+<a name="line183">183: </a>  }
+<a name="line184">184: </a>  <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(U[n-1])) *fail=1;
+
+<a name="line186">186: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line187">187: </a>    <font color="#4169E1">if</font> (PetscAbsReal(L[i])>tol*norm) *fail = 1;  <font color="#B22222">/* This demands IEEE arithmetic */</font>
+<a name="line188">188: </a>    <font color="#4169E1">if</font> (PetscAbsReal(U[i])>tol*norm) *fail = 1;
+<a name="line189">189: </a>  }
+<a name="line190">190: </a>  <font color="#4169E1">if</font> (!*fail && PetscAbsReal(U[n-1])>tol*norm) *fail = 1;
+<a name="line191">191: </a>  <font color="#4169E1">return</font>(0);
+<a name="line192">192: </a>}
+
+<a name="line196">196: </a><strong><font color="#4169E1"><a name="RealDQDS"></a>static PetscErrorCode RealDQDS(PetscInt n,PetscReal *L,PetscReal *U,PetscReal shift,PetscReal tol,PetscReal norm,PetscReal *L1,PetscReal *U1,PetscInt *fail)</font></strong>
+<a name="line197">197: </a>{
+<a name="line198">198: </a>  PetscReal d;
+<a name="line199">199: </a>  PetscInt  i;
+
+<a name="line202">202: </a>  *fail = 0;
+<a name="line203">203: </a>  d = U[0]-shift;
+<a name="line204">204: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line205">205: </a>    U1[i] = d+L[i];
+<a name="line206">206: </a>    L1[i] = L[i]*(U[i+1]/U1[i]);
+<a name="line207">207: </a>    d = d*(U[i+1]/U1[i])-shift;
+<a name="line208">208: </a>  }
+<a name="line209">209: </a>  U1[n-1]=d;
+
+<a name="line211">211: </a>  <font color="#B22222">/* The following demands IEEE arithmetic */</font>
+<a name="line212">212: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line213">213: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(L1[i])) *fail=1;
+<a name="line214">214: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(U1[i])) *fail=1;
+<a name="line215">215: </a>  }
+<a name="line216">216: </a>  <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(U1[n-1])) *fail=1;
+<a name="line217">217: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line218">218: </a>    <font color="#4169E1">if</font> (PetscAbsReal(L1[i])>tol*norm) *fail=1;
+<a name="line219">219: </a>    <font color="#4169E1">if</font> (PetscAbsReal(U1[i])>tol*norm) *fail=1;
+<a name="line220">220: </a>  }
+<a name="line221">221: </a>  <font color="#4169E1">if</font> (!*fail && PetscAbsReal(U1[n-1])>tol*norm) *fail=1;
+<a name="line222">222: </a>  <font color="#4169E1">return</font>(0);
+<a name="line223">223: </a>}
+
+<a name="line227">227: </a><strong><font color="#4169E1"><a name="TridqdsZhuang3"></a>static PetscErrorCode TridqdsZhuang3(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscInt *fail)</font></strong>
+<a name="line228">228: </a>{
+<a name="line229">229: </a>  PetscReal xl,yl,xr,yr,zr;
+<a name="line230">230: </a>  PetscInt  i;
+
+<a name="line233">233: </a>  *fail = 0;
+<a name="line234">234: </a>  xr = 1.0;
+<a name="line235">235: </a>  yr = e[0];
+<a name="line236">236: </a>  zr = 0.0;
+<a name="line237">237: </a>  <font color="#B22222">/* Step 1 */</font>
+<a name="line238">238: </a>  <font color="#B22222">/* the efect of Z1 */</font>
+<a name="line239">239: </a>  xr = xr*q[0]+yr;
+<a name="line240">240: </a>  <font color="#B22222">/* the inverse of L1 */</font>
+<a name="line241">241: </a>  xl = (q[0]+e[0])*(q[0]+e[0])+q[1]*e[0]-sum*(q[0]+e[0])+prod;
+<a name="line242">242: </a>  yl = -(q[2]*e[1]*q[1]*e[0])/xl;
+<a name="line243">243: </a>  xl = -(q[1]*e[0]*(q[0]+e[0]+q[1]+e[1]-sum))/xl;
+<a name="line244">244: </a>  <font color="#B22222">/* the efect of L1 */</font>
+<a name="line245">245: </a>  q[0] = xr-xl;
+<a name="line246">246: </a>  xr = yr-xl;
+<a name="line247">247: </a>  yr = zr-yl-xl*e[1];
+<a name="line248">248: </a>  <font color="#B22222">/*the inverse of Y1 */</font>
+<a name="line249">249: </a>  xr = xr/q[0];
+<a name="line250">250: </a>  yr = yr/q[0];
+<a name="line251">251: </a>  <font color="#B22222">/*the effect of Y1 inverse */</font>
+<a name="line252">252: </a>  e[0] = xl+yr+xr*q[1];
+<a name="line253">253: </a>  xl = yl+zr+yr*q[2];      <font color="#B22222">/* zr=0  when n=3 */</font>
+<a name="line254">254: </a>  <font color="#B22222">/*the effect of Y1 */</font>
+<a name="line255">255: </a>  xr = 1.0-xr;
+<a name="line256">256: </a>  yr = e[1]-yr;
+
+<a name="line258">258: </a>  <font color="#B22222">/* STEP n-1 */</font>
+
+<a name="line260">260: </a>  <font color="#4169E1">if</font> (PetscAbsReal(e[n-3])>tolDef*PetscAbsReal(xl) || PetscAbsReal(e[n-3])>tolDef*PetscAbsReal(q[n-3])) {
+<a name="line261">261: </a>    <font color="#B22222">/* the efect of Zn-1 */</font>
+<a name="line262">262: </a>    xr = xr*q[n-2]+yr;
+<a name="line263">263: </a>    <font color="#B22222">/* the inverse of Ln-1 */</font>
+<a name="line264">264: </a>    xl = -xl/e[n-3];
+<a name="line265">265: </a>    <font color="#B22222">/* the efect of Ln-1 */</font>
+<a name="line266">266: </a>    q[n-2] = xr-xl;
+<a name="line267">267: </a>    xr = yr-xl;
+<a name="line268">268: </a>    <font color="#B22222">/*the inverse of Yn-1 */</font>
+<a name="line269">269: </a>    xr = xr/q[n-2];
+<a name="line270">270: </a>    <font color="#B22222">/*the effect of the inverse of Yn-1 */</font>
+<a name="line271">271: </a>    e[n-2] = xl+xr*q[n-1];
+<a name="line272">272: </a>    <font color="#B22222">/*the effects of Yn-1 */</font>
+<a name="line273">273: </a>    xr = 1.0-xr;
+<a name="line274">274: </a>    <font color="#B22222">/* STEP n */</font>
+<a name="line275">275: </a>    <font color="#B22222">/*the effect of Zn */</font>
+<a name="line276">276: </a>    xr = xr*q[n-1];
+<a name="line277">277: </a>    <font color="#B22222">/*the inverse of Ln=I */</font>
+<a name="line278">278: </a>    <font color="#B22222">/*the effect of Ln */</font>
+<a name="line279">279: </a>    q[n-1] = xr;
+<a name="line280">280: </a>    <font color="#B22222">/* the inverse of  Yn-1=I */</font>
+
+<a name="line282">282: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* Free deflation */</font>
+<a name="line283">283: </a>    e[n-2] = (e[n-3]+(xr*q[n-2]+yr)+q[n-1])*0.5;       <font color="#B22222">/* Sum=trace/2 */</font>
+<a name="line284">284: </a>    q[n-2] = (e[n-3]+q[n-2]*xr)*q[n-1]-xl;             <font color="#B22222">/* det */</font>
+<a name="line285">285: </a>    q[n-1] = e[n-2]*e[n-2]-q[n-2];
+<a name="line286">286: </a>    *fail = 2;
+<a name="line287">287: </a>  }
+
+<a name="line289">289: </a>  <font color="#B22222">/* The following demands IEEE arithmetic */</font>
+<a name="line290">290: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line291">291: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(e[i])) *fail=1;
+<a name="line292">292: </a>    <font color="#4169E1">if</font> (PetscIsInfOrNanReal(q[i])) *fail=1;
+<a name="line293">293: </a>  }
+<a name="line294">294: </a>  <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(q[n-1])) *fail=1;
+<a name="line295">295: </a>  <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line296">296: </a>    <font color="#4169E1">if</font> (PetscAbsReal(e[i])>tol*norm) *fail=1;
+<a name="line297">297: </a>    <font color="#4169E1">if</font> (PetscAbsReal(q[i])>tol*norm) *fail=1;
+<a name="line298">298: </a>  }
+<a name="line299">299: </a>  <font color="#4169E1">if</font> (!*fail && PetscAbsReal(q[n-1])>tol*norm) *fail=1;
+<a name="line300">300: </a>  <font color="#4169E1">return</font>(0);
+<a name="line301">301: </a>}
+
+<a name="line305">305: </a><strong><font color="#4169E1"><a name="TridqdsZhuang"></a>static PetscErrorCode TridqdsZhuang(PetscInt n,PetscReal *e,PetscReal *q,PetscReal sum,PetscReal prod,PetscReal tol,PetscReal norm,PetscReal tolDef,PetscReal *e1,PetscReal *q1,PetscInt *fail)</font></strong>
+<a name="line306">306: </a>{
+<a name="line308">308: </a>  PetscInt       i;
+<a name="line309">309: </a>  PetscReal      xl,yl,xr,yr,zr;
+
+<a name="line312">312: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line313">313: </a>    e1[i] = e[i];
+<a name="line314">314: </a>    q1[i] = q[i];
+<a name="line315">315: </a>  }
+<a name="line316">316: </a>  q1[n-1] = q[n-1];
+<a name="line317">317: </a>  *fail = 0;
+<a name="line318">318: </a>  <font color="#4169E1">if</font> (n>3) {   <font color="#B22222">/* For n>3 */</font>
+<a name="line319">319: </a>    *fail = 0;
+<a name="line320">320: </a>    xr = 1;
+<a name="line321">321: </a>    yr = e1[0];
+<a name="line322">322: </a>    zr = 0;
+<a name="line323">323: </a>    <font color="#B22222">/* step 1 */</font>
+<a name="line324">324: </a>    <font color="#B22222">/* the efect of Z1 */</font>
+<a name="line325">325: </a>    xr = xr*q1[0]+yr;
+<a name="line326">326: </a>    <font color="#B22222">/* the inverse of L1 */</font>
+<a name="line327">327: </a>    xl = (q1[0]+e1[0])*(q1[0]+e1[0])+q1[1]*e1[0]-sum*(q1[0]+e1[0])+prod;
+<a name="line328">328: </a>    yl = -(q1[2]*e1[1]*q1[1]*e1[0])/xl;
+<a name="line329">329: </a>    xl = -(q1[1]*e1[0]*(q1[0]+e1[0]+q1[1]+e1[1]-sum))/xl;
+<a name="line330">330: </a>    <font color="#B22222">/* the efect of L1 */</font>
+<a name="line331">331: </a>    q1[0] = xr-xl;
+<a name="line332">332: </a>    xr = yr-xl;
+<a name="line333">333: </a>    yr = zr-yl-xl*e1[1];
+<a name="line334">334: </a>    zr = -yl*e1[2];
+<a name="line335">335: </a>    <font color="#B22222">/* the inverse of Y1 */</font>
+<a name="line336">336: </a>    xr = xr/q1[0];
+<a name="line337">337: </a>    yr = yr/q1[0];
+<a name="line338">338: </a>    zr = zr/q1[0];
+<a name="line339">339: </a>    <font color="#B22222">/* the effect of Y1 inverse */</font>
+<a name="line340">340: </a>    e1[0] = xl+yr+xr*q1[1];
+<a name="line341">341: </a>    xl = yl+zr+yr*q1[2];
+<a name="line342">342: </a>    yl = zr*q1[3];
+<a name="line343">343: </a>    <font color="#B22222">/* the effect of Y1 */</font>
+<a name="line344">344: </a>    xr = 1-xr;
+<a name="line345">345: </a>    yr = e1[1]-yr;
+<a name="line346">346: </a>    zr = -zr;
+<a name="line347">347: </a>    <font color="#B22222">/* step i=2,...,n-3 */</font>
+<a name="line348">348: </a>    <font color="#4169E1">for</font> (i=1;i<n-3;i++) {
+<a name="line349">349: </a>      <font color="#B22222">/* the efect of Zi */</font>
+<a name="line350">350: </a>      xr = xr*q1[i]+yr;
+<a name="line351">351: </a>      <font color="#B22222">/* the inverse of Li */</font>
+<a name="line352">352: </a>      xl = -xl/e1[i-1];
+<a name="line353">353: </a>      yl = -yl/e1[i-1];
+<a name="line354">354: </a>      <font color="#B22222">/* the efect of Li */</font>
+<a name="line355">355: </a>      q1[i] = xr-xl;
+<a name="line356">356: </a>      xr = yr-xl;
+<a name="line357">357: </a>      yr = zr-yl-xl*e1[i+1];
+<a name="line358">358: </a>      zr = -yl*e1[i+2];
+<a name="line359">359: </a>      <font color="#B22222">/* the inverse of Yi */</font>
+<a name="line360">360: </a>      xr = xr/q1[i];
+<a name="line361">361: </a>      yr = yr/q1[i];
+<a name="line362">362: </a>      zr = zr/q1[i];
+<a name="line363">363: </a>      <font color="#B22222">/* the effect of the inverse of Yi */</font>
+<a name="line364">364: </a>      e1[i] = xl+yr+xr*q1[i+1];
+<a name="line365">365: </a>      xl = yl+zr+yr*q1[i+2];
+<a name="line366">366: </a>      yl = zr*q1[i+3];
+<a name="line367">367: </a>      <font color="#B22222">/* the effects of Yi */</font>
+<a name="line368">368: </a>      xr = 1.0-xr;
+<a name="line369">369: </a>      yr = e1[i+1]-yr;
+<a name="line370">370: </a>      zr = -zr;
+<a name="line371">371: </a>    }
+
+<a name="line373">373: </a>    <font color="#B22222">/* STEP n-2            zr is no longer needed */</font>
+
+<a name="line375">375: </a>    <font color="#B22222">/* the efect of Zn-2 */</font>
+<a name="line376">376: </a>    xr = xr*q1[n-3]+yr;
+<a name="line377">377: </a>    <font color="#B22222">/* the inverse of Ln-2 */</font>
+<a name="line378">378: </a>    xl = -xl/e1[n-4];
+<a name="line379">379: </a>    yl = -yl/e1[n-4];
+<a name="line380">380: </a>    <font color="#B22222">/* the efect of Ln-2 */</font>
+<a name="line381">381: </a>    q1[n-3] = xr-xl;
+<a name="line382">382: </a>    xr = yr-xl;
+<a name="line383">383: </a>    yr = zr-yl-xl*e1[n-2];
+<a name="line384">384: </a>    <font color="#B22222">/* the inverse of Yn-2 */</font>
+<a name="line385">385: </a>    xr = xr/q1[n-3];
+<a name="line386">386: </a>    yr = yr/q1[n-3];
+<a name="line387">387: </a>    <font color="#B22222">/* the effect of the inverse of Yn-2 */</font>
+<a name="line388">388: </a>    e1[n-3] = xl+yr+xr*q1[n-2];
+<a name="line389">389: </a>    xl = yl+yr*q1[n-1];
+<a name="line390">390: </a>    <font color="#B22222">/* the effect of Yn-2 */</font>
+<a name="line391">391: </a>    xr = 1.0-xr;
+<a name="line392">392: </a>    yr = e1[n-2]-yr;
+
+<a name="line394">394: </a>    <font color="#B22222">/* STEP n-1           yl and yr are no longer needed */</font>
+<a name="line395">395: </a>    <font color="#B22222">/* Testing for EARLY DEFLATION */</font>
+
+<a name="line397">397: </a>    <font color="#4169E1">if</font> (PetscAbsReal(e1[n-3])>tolDef*PetscAbsReal(xl) || PetscAbsReal(e1[n-3])>tolDef*PetscAbsReal(q1[n-3])) {
+<a name="line398">398: </a>      <font color="#B22222">/* the efect of Zn-1 */</font>
+<a name="line399">399: </a>      xr = xr*q1[n-2]+yr;
+<a name="line400">400: </a>      <font color="#B22222">/* the inverse of Ln-1 */</font>
+<a name="line401">401: </a>      xl = -xl/e1[n-3];
+<a name="line402">402: </a>      <font color="#B22222">/* the efect of Ln-1 */</font>
+<a name="line403">403: </a>      q1[n-2] = xr-xl;
+<a name="line404">404: </a>      xr = yr-xl;
+<a name="line405">405: </a>      <font color="#B22222">/*the inverse of Yn-1 */</font>
+<a name="line406">406: </a>      xr = xr/q1[n-2];
+<a name="line407">407: </a>      <font color="#B22222">/*the effect of the inverse of Yn-1 */</font>
+<a name="line408">408: </a>      e1[n-2] = xl+xr*q1[n-1];
+<a name="line409">409: </a>      <font color="#B22222">/*the effects of Yn-1 */</font>
+<a name="line410">410: </a>      xr = 1.0-xr;
+
+<a name="line412">412: </a>      <font color="#B22222">/* STEP n;     xl no longer needed */</font>
+<a name="line413">413: </a>      <font color="#B22222">/* the effect of Zn */</font>
+<a name="line414">414: </a>      xr = xr*q1[n-1];
+<a name="line415">415: </a>      <font color="#B22222">/* the inverse of Ln = I */</font>
+<a name="line416">416: </a>      <font color="#B22222">/* the effect of Ln */</font>
+<a name="line417">417: </a>      q1[n-1] = xr;
+<a name="line418">418: </a>      <font color="#B22222">/* the inverse of  Yn-1=I */</font>
+
+<a name="line420">420: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* FREE DEFLATION */</font>
+<a name="line421">421: </a>      e1[n-2] = (e1[n-3]+xr*q1[n-2]+yr+q1[n-1])*0.5;     <font color="#B22222">/* sum=trace/2 */</font>
+<a name="line422">422: </a>      q1[n-2] = (e1[n-3]+q1[n-2]*xr)*q1[n-1]-xl;         <font color="#B22222">/* det */</font>
+<a name="line423">423: </a>      q1[n-1] = e1[n-2]*e1[n-2]-q1[n-2];
+<a name="line424">424: </a>      *fail = 2;
+<a name="line425">425: </a>    }
+
+<a name="line427">427: </a>    <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line428">428: </a>      <font color="#4169E1">if</font> (PetscIsInfOrNanReal(e1[i])) *fail=1;
+<a name="line429">429: </a>      <font color="#4169E1">if</font> (PetscIsInfOrNanReal(q1[i])) *fail=1;
+<a name="line430">430: </a>    }
+<a name="line431">431: </a>    <font color="#4169E1">if</font> (!*fail && PetscIsInfOrNanReal(q1[n-1])) *fail=1;
+<a name="line432">432: </a>    <font color="#4169E1">for</font> (i=0;i<n-1 && !*fail;i++) {
+<a name="line433">433: </a>      <font color="#4169E1">if</font> (PetscAbsReal(e1[i])>tol*norm) *fail = 1;  <font color="#B22222">/* This demands IEEE arithmetic */</font>
+<a name="line434">434: </a>      <font color="#4169E1">if</font> (PetscAbsReal(q1[i])>tol*norm) *fail = 1;
+<a name="line435">435: </a>    }
+<a name="line436">436: </a>    <font color="#4169E1">if</font> (!*fail && PetscAbsReal(q1[n-1])>tol*norm) *fail = 1;
+
+<a name="line438">438: </a>  } <font color="#4169E1">else</font> {  <font color="#B22222">/* The case n=3 */</font>
+<a name="line439">439: </a>    TridqdsZhuang3(n,e1,q1,sum,prod,tol,norm,tolDef,fail);
+<a name="line440">440: </a>  }
+<a name="line441">441: </a>  <font color="#4169E1">return</font>(0);
+<a name="line442">442: </a>}
+
+<a name="line446">446: </a><strong><font color="#4169E1"><a name="DSGHIEP_Eigen3DQDS"></a>static PetscErrorCode DSGHIEP_Eigen3DQDS(PetscInt n,PetscReal *a,PetscReal *b,PetscReal *c,PetscScalar *wr,PetscScalar *wi,PetscReal *work)</font></strong>
+<a name="line447">447: </a>{
+<a name="line448">448: </a>  PetscInt       totalIt=0;       <font color="#B22222">/* Total Number of Iterations  */</font>
+<a name="line449">449: </a>  PetscInt       totalFail=0;     <font color="#B22222">/* Total number of failures */</font>
+<a name="line450">450: </a>  PetscInt       nFail=0;         <font color="#B22222">/* Number of failures per transformation */</font>
+<a name="line451">451: </a>  PetscReal      tolZero=1.0/16;  <font color="#B22222">/* Tolerance for zero shifts */</font>
+<a name="line452">452: </a>  PetscInt       maxIt=10*n;      <font color="#B22222">/* Maximum number of iterations */</font>
+<a name="line453">453: </a>  PetscInt       maxFail=10*n;    <font color="#B22222">/* Maximum number of failures allowed per each transformation */</font>
+<a name="line454">454: </a>  PetscReal      tolDef=PETSC_MACHINE_EPSILON;  <font color="#B22222">/* Tolerance for deflation eps, 10*eps, 100*eps */</font>
+<a name="line455">455: </a>  PetscReal      tolGrowth=100000;
+<a name="line457">457: </a>  PetscInt       i,k,nwu=0,begin,ind,flag,dim,m,*split,lastSplit;
+<a name="line458">458: </a>  PetscReal      norm,gr,gl,sigma,delta,meanEig,*U,*L,*U1,*L1;
+<a name="line459">459: </a>  PetscReal      acShift,initialShift,shift=0.0,sum,det,disc,prod,x1,x2;
+<a name="line460">460: </a>  PetscBool      test1,test2;
+
+<a name="line463">463: </a>  dim = n;
+<a name="line464">464: </a>  <font color="#B22222">/* Test if the matrix is unreduced */</font>
+<a name="line465">465: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line466">466: </a>    <font color="#4169E1">if</font> (PetscAbsReal(b[i])==0.0 || PetscAbsReal(c[i])==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Initial tridiagonal matrix is not unreduced"</font>);
+<a name="line467">467: </a>  }
+<a name="line468">468: </a>  U = work;
+<a name="line469">469: </a>  L = work+n;
+<a name="line470">470: </a>  U1 = work+2*n;
+<a name="line471">471: </a>  L1 = work+3*n;
+<a name="line472">472: </a>  nwu = 4*n;
+<a name="line473">473: </a>  <font color="#4169E1">if</font> (wi) {
+<a name="line474">474: </a>    PetscMemzero(wi,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line475">475: </a>  }
+<a name="line476">476: </a>  <font color="#B22222">/* Normalization - the J form of C */</font>
+<a name="line477">477: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) b[i] *= c[i]; <font color="#B22222">/* subdiagonal of the J form */</font>
+
+<a name="line479">479: </a>  <font color="#B22222">/* Scan matrix J  ---- Finding a box of inclusion for the eigenvalues */</font>
+<a name="line480">480: </a>  norm = 0.0;
+<a name="line481">481: </a>  <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line482">482: </a>    norm = PetscMax(norm,PetscMax(PetscAbsReal(a[i]),PetscAbsReal(b[i])));
+<a name="line483">483: </a>  }
+<a name="line484">484: </a>  norm = PetscMax(norm,PetscMax(1,PetscAbsReal(a[n-1])));
+<a name="line485">485: </a>  ScanJ(n,a,b,&gl,&gr,&sigma);
+<a name="line486">486: </a>  delta = (gr-gl)/n; <font color="#B22222">/* How much to add to the shift, in case of failure (element growth) */</font>
+<a name="line487">487: </a>  meanEig = 0.0;
+<a name="line488">488: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) meanEig += a[i];
+<a name="line489">489: </a>  meanEig /= n; <font color="#B22222">/* shift = initial shift = mean of eigenvalues */</font>
+<a name="line490">490: </a>  Prologue(n,a,b,gl,gr,&m,&shift,work+nwu);
+<a name="line491">491: </a>  <font color="#4169E1">if</font> (m==n) { <font color="#B22222">/* Multiple eigenvalue, we have the one-point spectrum case */</font>
+<a name="line492">492: </a>    <font color="#4169E1">for</font> (i=0;i<dim;i++) {
+<a name="line493">493: </a>      wr[i] = shift;
+<a name="line494">494: </a>      <font color="#4169E1">if</font> (wi) wi[i] = 0.0;
+<a name="line495">495: </a>    }
+<a name="line496">496: </a>    <font color="#4169E1">return</font>(0);
+<a name="line497">497: </a>  }
+<a name="line498">498: </a>  <font color="#B22222">/* Initial LU Factorization */</font>
+<a name="line499">499: </a>  <font color="#4169E1">if</font> (delta==0.0) shift=0.0;  <font color="#B22222">/* The case when all eigenvalues are pure imaginary */</font>
+<a name="line500">500: </a>  LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu); <font color="#B22222">/* flag=1 failure; flag=0 successful transformation*/</font>
+<a name="line501">501: </a>  <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) {
+<a name="line502">502: </a>    shift=shift+delta;
+<a name="line503">503: </a>    <font color="#4169E1">if</font> (shift>gr || shift<gl) { <font color="#B22222">/* Successive failures */</font>
+<a name="line504">504: </a>      shift=meanEig;
+<a name="line505">505: </a>      delta=-delta;
+<a name="line506">506: </a>    }
+<a name="line507">507: </a>    nFail=nFail+1;
+<a name="line508">508: </a>    LUfac(n,a,b,shift,tolGrowth,norm,L,U,&flag,work+nwu); <font color="#B22222">/* flag=1 failure; flag=0 successful transformation*/</font>
+<a name="line509">509: </a>  }
+<a name="line510">510: </a>  <font color="#4169E1">if</font> (nFail==maxFail) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Maximun number of failures reached in Initial LU factorization"</font>);
+<a name="line511">511: </a>  <font color="#B22222">/* Successful Initial transformation */</font>
+<a name="line512">512: </a>  totalFail = totalFail+nFail;
+<a name="line513">513: </a>  nFail = 0;
+<a name="line514">514: </a>  acShift = 0;
+<a name="line515">515: </a>  initialShift = shift;
+<a name="line516">516: </a>  shift = 0;
+<a name="line517">517: </a>  begin = 0;
+<a name="line518">518: </a>  lastSplit = 0;
+<a name="line519">519: </a>  PetscMalloc1(n,&split);
+<a name="line520">520: </a>  split[lastSplit] = begin;
+<a name="line521">521: </a>  <font color="#4169E1">while</font> (begin!=-1) {
+<a name="line522">522: </a>    <font color="#4169E1">while</font> (n-begin>2 && totalIt<maxIt) {
+<a name="line523">523: </a>      <font color="#B22222">/* Check for deflation before performing a transformation */</font>
+<a name="line524">524: </a>      test1 = (PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-2])
+<a name="line525">525: </a>            && PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-1]+acShift)
+<a name="line526">526: </a>            && PetscAbsReal(L[n-2]*U[n])<tolDef*PetscAbsReal(acShift+U[n-1])
+<a name="line527">527: </a>            && PetscAbsReal(L[n-2])*(PetscAbsReal(U[n-2])+1)<tolDef*PetscAbsReal(acShift+U[n-1]))? PETSC_TRUE: PETSC_FALSE;
+<a name="line528">528: </a>      <font color="#4169E1">if</font> (flag==2) {  <font color="#B22222">/* Early 2x2 deflation */</font>
+<a name="line529">529: </a>        test2 = PETSC_TRUE;
+<a name="line530">530: </a>      } <font color="#4169E1">else</font> {
+<a name="line531">531: </a>        <font color="#4169E1">if</font> (n-begin>4) {
+<a name="line532">532: </a>          test2 = (PetscAbsReal(L[n-3])<tolDef*PetscAbsReal(U[n-3])
+<a name="line533">533: </a>               && PetscAbsReal(L[n-3]*(U[n-4]+L[n-4]))< tolDef*PetscAbsReal(U[n-4]*(U[n-3]+L[n-3])+L[n-4]*L[n-3]))? PETSC_TRUE: PETSC_FALSE;
+<a name="line534">534: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* n-begin+1=3 */</font>
+<a name="line535">535: </a>          test2 = (PetscAbsReal(L[begin])<tolDef*PetscAbsReal(U[begin]))? PETSC_TRUE: PETSC_FALSE;
+<a name="line536">536: </a>        }
+<a name="line537">537: </a>      }
+<a name="line538">538: </a>      <font color="#4169E1">while</font> (test2 || test1) {
+<a name="line539">539: </a>        <font color="#B22222">/* 2x2 deflation */</font>
+<a name="line540">540: </a>        <font color="#4169E1">if</font> (test2) {
+<a name="line541">541: </a>          <font color="#4169E1">if</font> (flag==2) { <font color="#B22222">/* Early deflation */</font>
+<a name="line542">542: </a>            sum = L[n-2];
+<a name="line543">543: </a>            det = U[n-2];
+<a name="line544">544: </a>            disc = U[n-1];
+<a name="line545">545: </a>            flag = 0;
+<a name="line546">546: </a>          } <font color="#4169E1">else</font> {
+<a name="line547">547: </a>            sum = (L[n-2]+(U[n-2]+U[n-1]))/2;
+<a name="line548">548: </a>            disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
+<a name="line549">549: </a>            det = U[n-2]*U[n-1];
+<a name="line550">550: </a>          }
+<a name="line551">551: </a>          <font color="#4169E1">if</font> (disc<=0) {
+<a name="line552">552: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line553">553: </a>            wr[--n] = sum+acShift; <font color="#4169E1">if</font> (wi) wi[n] = PetscSqrtReal(-disc);
+<a name="line554">554: </a>            wr[--n] = sum+acShift; <font color="#4169E1">if</font> (wi) wi[n] = -PetscSqrtReal(-disc);
+<a name="line555">555: </a><font color="#A020F0">#else</font>
+<a name="line556">556: </a>            wr[--n] = sum-PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
+<a name="line557">557: </a>            wr[--n] = sum+PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
+<a name="line558">558: </a><font color="#A020F0">#endif</font>
+<a name="line559">559: </a>          } <font color="#4169E1">else</font> {
+<a name="line560">560: </a>            <font color="#4169E1">if</font> (sum==0.0) {
+<a name="line561">561: </a>              x1 = PetscSqrtReal(disc);
+<a name="line562">562: </a>              x2 = -x1;
+<a name="line563">563: </a>            } <font color="#4169E1">else</font> {
+<a name="line564">564: </a>              x1 = ((sum>=0.0)?1.0:-1.0)*(PetscAbsReal(sum)+PetscSqrtReal(disc));
+<a name="line565">565: </a>              x2 = det/x1;
+<a name="line566">566: </a>            }
+<a name="line567">567: </a>            wr[--n] = x1+acShift;
+<a name="line568">568: </a>            wr[--n] = x2+acShift;
+<a name="line569">569: </a>          }
+<a name="line570">570: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* test1 -- 1x1 deflation */</font>
+<a name="line571">571: </a>          x1 = U[n-1]+acShift;
+<a name="line572">572: </a>          wr[--n] = x1;
+<a name="line573">573: </a>        }
+
+<a name="line575">575: </a>        <font color="#4169E1">if</font> (n<=begin+2) {
+<a name="line576">576: </a>          <font color="#4169E1">break</font>;
+<a name="line577">577: </a>        } <font color="#4169E1">else</font> {
+<a name="line578">578: </a>          test1 = (PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-2])
+<a name="line579">579: </a>                && PetscAbsReal(L[n-2])<tolDef*PetscAbsReal(U[n-1]+acShift)
+<a name="line580">580: </a>                && PetscAbsReal(L[n-2]*U[n-1])<tolDef*PetscAbsReal(acShift+U[n-1])
+<a name="line581">581: </a>                && PetscAbsReal(L[n-2])*(PetscAbsReal(U[n-2])+1)< tolDef*PetscAbsReal(acShift+U[n-1]))? PETSC_TRUE: PETSC_FALSE;
+<a name="line582">582: </a>          <font color="#4169E1">if</font> (n-begin>4) {
+<a name="line583">583: </a>            test2 = (PetscAbsReal(L[n-3])<tolDef*PetscAbsReal(U[n-3])
+<a name="line584">584: </a>                  && PetscAbsReal(L[n-3]*(U[n-4]+L[n-4]))< tolDef*PetscAbsReal(U[n-4]*(U[n-3]+L[n-3])+L[n-4]*L[n-3]))? PETSC_TRUE: PETSC_FALSE;
+<a name="line585">585: </a>          } <font color="#4169E1">else</font> { <font color="#B22222">/* n-begin+1=3 */</font>
+<a name="line586">586: </a>            test2 = (PetscAbsReal(L[begin])<tolDef*PetscAbsReal(U[begin]))? PETSC_TRUE: PETSC_FALSE;
+<a name="line587">587: </a>          }
+<a name="line588">588: </a>        }
+<a name="line589">589: </a>      } <font color="#B22222">/* end "WHILE deflations" */</font>
+<a name="line590">590: </a>      <font color="#B22222">/* After deflation */</font>
+<a name="line591">591: </a>      <font color="#4169E1">if</font> (n>begin+3) {
+<a name="line592">592: </a>        ind = begin;
+<a name="line593">593: </a>        <font color="#4169E1">for</font> (k=n-4;k>=begin+1;k--) {
+<a name="line594">594: </a>          <font color="#4169E1">if</font> (PetscAbsReal(L[k])<tolDef*PetscAbsReal(U[k])
+<a name="line595">595: </a>           && PetscAbsReal(L[k]*U[k+1]*(U[k+2]+L[k+2])*(U[k-1]+L[k-1]))<tolDef*PetscAbsReal((U[k-1]*(U[k]+L[k])+L[k-1]*L[k])*(U[k+1]*(U[k+2]+L[k+2])+L[k+1]*L[k+2]))) {
+<a name="line596">596: </a>            ind=k;
+<a name="line597">597: </a>            <font color="#4169E1">break</font>;
+<a name="line598">598: </a>          }
+<a name="line599">599: </a>        }
+<a name="line600">600: </a>        <font color="#4169E1">if</font> (ind>begin || PetscAbsReal(L[begin]) <tolDef*PetscAbsReal(U[begin])) {
+<a name="line601">601: </a>          lastSplit = lastSplit+1;
+<a name="line602">602: </a>          split[lastSplit] = begin;
+<a name="line603">603: </a>          L[ind] = acShift; <font color="#B22222">/* Use of L[ind] to save acShift */</font>
+<a name="line604">604: </a>          begin = ind+1;
+<a name="line605">605: </a>        }
+<a name="line606">606: </a>      }
+
+<a name="line608">608: </a>      <font color="#4169E1">if</font> (n>begin+2) {
+<a name="line609">609: </a>        disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
+<a name="line610">610: </a>        <font color="#4169E1">if</font> ((PetscAbsReal(L[n-2])>tolZero) && (PetscAbsReal(L[n-3])>tolZero)) { <font color="#B22222">/* L's are big */</font>
+<a name="line611">611: </a>          shift = 0;
+<a name="line612">612: </a>          RealDQDS(n-begin,L+begin,U+begin,0,tolGrowth,norm,L1+begin,U1+begin,&flag);
+<a name="line613">613: </a>          <font color="#4169E1">if</font> (flag) {  <font color="#B22222">/* Failure */</font>
+<a name="line614">614: </a>            TridqdsZhuang(n-begin,L+begin,U+begin,0.0,0.0,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);
+<a name="line615">615: </a>            shift = 0.0;
+<a name="line616">616: </a>            <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) {  <font color="#B22222">/* Successive failures */</font>
+<a name="line617">617: </a>              shift = shift+delta;
+<a name="line618">618: </a>              <font color="#4169E1">if</font> (shift>gr-acShift || shift<gl-acShift) {
+<a name="line619">619: </a>                shift = meanEig-acShift;
+<a name="line620">620: </a>                delta = -delta;
+<a name="line621">621: </a>              }
+<a name="line622">622: </a>              nFail++;
+<a name="line623">623: </a>              RealDQDS(n-begin,L+begin,U+begin,0,tolGrowth,norm,L1+begin,U1+begin,&flag);
+<a name="line624">624: </a>            }
+<a name="line625">625: </a>          }
+<a name="line626">626: </a>        } <font color="#4169E1">else</font> { <font color="#B22222">/* L's are small */</font>
+<a name="line627">627: </a>          <font color="#4169E1">if</font> (disc<0) {  <font color="#B22222">/* disc <0   Complex case; Francis shift; 3dqds */</font>
+<a name="line628">628: </a>            sum = U[n-2]+L[n-2]+U[n-1];
+<a name="line629">629: </a>            prod = U[n-2]*U[n-1];
+<a name="line630">630: </a>            TridqdsZhuang(n-begin,L+begin,U+begin,sum,prod,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);
+<a name="line631">631: </a>            shift = 0.0; <font color="#B22222">/* Restoring transformation */</font>
+<a name="line632">632: </a>            <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) { <font color="#B22222">/* In case of failure */</font>
+<a name="line633">633: </a>              shift = shift+U[n-1];  <font color="#B22222">/* first time shift=0 */</font>
+<a name="line634">634: </a>              RealDQDS(n-begin,L+begin,U+begin,shift,tolGrowth,norm,L1+begin,U1+begin,&flag);
+<a name="line635">635: </a>              nFail++;
+<a name="line636">636: </a>            }
+<a name="line637">637: </a>          } <font color="#4169E1">else</font>  { <font color="#B22222">/* disc >0  Real case; real Wilkinson shift; dqds */</font>
+<a name="line638">638: </a>            sum = (L[n-2]+U[n-2]+U[n-1])/2;
+<a name="line639">639: </a>            <font color="#4169E1">if</font> (sum==0.0) {
+<a name="line640">640: </a>              x1 = PetscSqrtReal(disc);
+<a name="line641">641: </a>              x2 = -x1;
+<a name="line642">642: </a>            } <font color="#4169E1">else</font> {
+<a name="line643">643: </a>              x1 = ((sum>=0)?1.0:-1.0)*(PetscAbsReal(sum)+PetscSqrtReal(disc));
+<a name="line644">644: </a>              x2 = U[n-2]*U[n-1]/x1;
+<a name="line645">645: </a>            }
+<a name="line646">646: </a>            <font color="#B22222">/* Take the eigenvalue closest to UL(n,n) */</font>
+<a name="line647">647: </a>            <font color="#4169E1">if</font> (PetscAbsReal(x1-U[n-1])<PetscAbsReal(x2-U[n-1])) {
+<a name="line648">648: </a>              shift = x1;
 <a name="line649">649: </a>            } <font color="#4169E1">else</font> {
-<a name="line650">650: </a>              x1 = ((sum>=0)?1.0:-1.0)*(PetscAbsReal(sum)+PetscSqrtReal(disc));
-<a name="line651">651: </a>              x2 = U[n-2]*U[n-1]/x1;
-<a name="line652">652: </a>            }
-<a name="line653">653: </a>            <font color="#B22222">/* Take the eigenvalue closest to UL(n,n) */</font>
-<a name="line654">654: </a>            <font color="#4169E1">if</font> (PetscAbsReal(x1-U[n-1])<PetscAbsReal(x2-U[n-1])) {
-<a name="line655">655: </a>              shift = x1;
-<a name="line656">656: </a>            } <font color="#4169E1">else</font> {
-<a name="line657">657: </a>              shift = x2;
-<a name="line658">658: </a>            }
-<a name="line659">659: </a>            RealDQDS(n-begin,L+begin,U+begin,shift,tolGrowth,norm,L1+begin,U1+begin,&flag);
-<a name="line660">660: </a>            <font color="#B22222">/* In case of failure */</font>
-<a name="line661">661: </a>            <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) {
-<a name="line662">662: </a>              sum = 2*shift;
-<a name="line663">663: </a>              prod = shift*shift;
-<a name="line664">664: </a>              TridqdsZhuang(n-1-begin,L+begin,U+begin,sum,prod,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);
-<a name="line665">665: </a>              <font color="#B22222">/* In case of successive failures */</font>
-<a name="line666">666: </a>              <font color="#4169E1">if</font> (shift==0.0) {
-<a name="line667">667: </a>                shift = PetscMin(PetscAbsReal(L[n-2]),PetscAbsReal(L[n-3]))*delta;
-<a name="line668">668: </a>              } <font color="#4169E1">else</font> {
-<a name="line669">669: </a>                shift=shift+delta;
+<a name="line650">650: </a>              shift = x2;
+<a name="line651">651: </a>            }
+<a name="line652">652: </a>            RealDQDS(n-begin,L+begin,U+begin,shift,tolGrowth,norm,L1+begin,U1+begin,&flag);
+<a name="line653">653: </a>            <font color="#B22222">/* In case of failure */</font>
+<a name="line654">654: </a>            <font color="#4169E1">while</font> (flag==1 && nFail<maxFail) {
+<a name="line655">655: </a>              sum = 2*shift;
+<a name="line656">656: </a>              prod = shift*shift;
+<a name="line657">657: </a>              TridqdsZhuang(n-1-begin,L+begin,U+begin,sum,prod,tolGrowth,norm,tolDef,L1+begin,U1+begin,&flag);
+<a name="line658">658: </a>              <font color="#B22222">/* In case of successive failures */</font>
+<a name="line659">659: </a>              <font color="#4169E1">if</font> (shift==0.0) {
+<a name="line660">660: </a>                shift = PetscMin(PetscAbsReal(L[n-2]),PetscAbsReal(L[n-3]))*delta;
+<a name="line661">661: </a>              } <font color="#4169E1">else</font> {
+<a name="line662">662: </a>                shift=shift+delta;
+<a name="line663">663: </a>              }
+<a name="line664">664: </a>              <font color="#4169E1">if</font> (shift>gr-acShift || shift<gl-acShift) {
+<a name="line665">665: </a>                shift = meanEig-acShift;
+<a name="line666">666: </a>                delta = -delta;
+<a name="line667">667: </a>              }
+<a name="line668">668: </a>              <font color="#4169E1">if</font> (!flag) { <font color="#B22222">/* We changed from real dqds to 3dqds */</font>
+<a name="line669">669: </a>                shift=0;
 <a name="line670">670: </a>              }
-<a name="line671">671: </a>              <font color="#4169E1">if</font> (shift>gr-acShift || shift<gl-acShift) {
-<a name="line672">672: </a>                shift = meanEig-acShift;
-<a name="line673">673: </a>                delta = -delta;
-<a name="line674">674: </a>              }
-<a name="line675">675: </a>              <font color="#4169E1">if</font> (!flag) { <font color="#B22222">/* We changed from real dqds to 3dqds */</font>
-<a name="line676">676: </a>                shift=0;
-<a name="line677">677: </a>              }
-<a name="line678">678: </a>              nFail++;
-<a name="line679">679: </a>            }
-<a name="line680">680: </a>          }
-<a name="line681">681: </a>        } <font color="#B22222">/* end "if tolZero" */</font>
-<a name="line682">682: </a>        <font color="#4169E1">if</font> (nFail==maxFail) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Maximun number of failures reached. No convergence in DQDS"</font>);
-<a name="line683">683: </a>        <font color="#B22222">/* Successful Transformation; flag==0 */</font>
-<a name="line684">684: </a>        totalIt++;
-<a name="line685">685: </a>        acShift = shift+acShift;
-<a name="line686">686: </a>        <font color="#4169E1">for</font> (i=begin;i<n-1;i++) {
-<a name="line687">687: </a>          L[i] = L1[i];
-<a name="line688">688: </a>          U[i] = U1[i];
-<a name="line689">689: </a>        }
-<a name="line690">690: </a>        U[n-1] = U1[n-1];
-<a name="line691">691: </a>        totalFail = totalFail+nFail;
-<a name="line692">692: </a>        nFail = 0;
-<a name="line693">693: </a>      }  <font color="#B22222">/* end "if n>begin+1" */</font>
-<a name="line694">694: </a>    }  <font color="#B22222">/* end WHILE 1 */</font>
-<a name="line695">695: </a>    <font color="#4169E1">if</font> (totalIt>=maxIt) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Maximun number of iterations reached. No convergence in DQDS"</font>);
-<a name="line696">696: </a>    <font color="#B22222">/* END: n=2 or n=1  % n=begin+1 or n=begin */</font>
-<a name="line697">697: </a>    <font color="#4169E1">if</font> (n==begin+2) {
-<a name="line698">698: </a>      sum = (L[n-2]+U[n-2]+U[n-1])/2;
-<a name="line699">699: </a>      disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
-<a name="line700">700: </a>        <font color="#4169E1">if</font> (disc<=0)  {  <font color="#B22222">/* Complex case */</font>
-<a name="line701">701: </a>        <font color="#B22222">/* Deflation 2 */</font>
-<a name="line702">702: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line703">703: </a>        wr[--n] = sum+acShift; wi[n] = PetscSqrtReal(-disc);
-<a name="line704">704: </a>        wr[--n] = sum+acShift; wi[n] = -PetscSqrtReal(-disc);
-<a name="line705">705: </a><font color="#A020F0">#else</font>
-<a name="line706">706: </a>        wr[--n] = sum-PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
-<a name="line707">707: </a>        wr[--n] = sum+PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
-<a name="line708">708: </a><font color="#A020F0">#endif</font>
-<a name="line709">709: </a>      } <font color="#4169E1">else</font>  { <font color="#B22222">/* Real case */</font>
-<a name="line710">710: </a>        <font color="#4169E1">if</font> (sum==0.0) {
-<a name="line711">711: </a>          x1 = PetscSqrtReal(disc);
-<a name="line712">712: </a>          x2 = -x1;
-<a name="line713">713: </a>        } <font color="#4169E1">else</font> {
-<a name="line714">714: </a>          x1 = ((sum>=0)?1.0:-1.0)*(PetscAbsReal(sum)+PetscSqrtReal(disc));
-<a name="line715">715: </a>          x2 = U[n-2]*U[n-1]/x1;
-<a name="line716">716: </a>        }
-<a name="line717">717: </a>        <font color="#B22222">/* Deflation 2 */</font>
-<a name="line718">718: </a>        wr[--n] = x2+acShift;
-<a name="line719">719: </a>        wr[--n] = x1+acShift;
-<a name="line720">720: </a>      }
-<a name="line721">721: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* n=1   n=begin */</font>
-<a name="line722">722: </a>      <font color="#B22222">/* deflation 1 */</font>
-<a name="line723">723: </a>      x1 = U[n-1]+acShift;
-<a name="line724">724: </a>      wr[--n] = x1;
-<a name="line725">725: </a>    }
-<a name="line726">726: </a>    <font color="#4169E1">switch</font> (n) {
-<a name="line727">727: </a>      <font color="#4169E1">case</font> 0:
-<a name="line728">728: </a>        begin = -1;
-<a name="line729">729: </a>        <font color="#4169E1">break</font>;
-<a name="line730">730: </a>      <font color="#4169E1">case</font> 1:
-<a name="line731">731: </a>        acShift = L[begin-1];
-<a name="line732">732: </a>        begin = split[lastSplit];
-<a name="line733">733: </a>        lastSplit--;
-<a name="line734">734: </a>        <font color="#4169E1">break</font>;
-<a name="line735">735: </a>      <font color="#4169E1">default</font> : <font color="#B22222">/* n>=2 */</font>
-<a name="line736">736: </a>        acShift = L[begin-1];
-<a name="line737">737: </a>        begin = split[lastSplit];
-<a name="line738">738: </a>        lastSplit--;
-<a name="line739">739: </a>    }
-<a name="line740">740: </a>  }<font color="#B22222">/* While begin~=-1 */</font>
-<a name="line741">741: </a>  <font color="#4169E1">for</font> (i=0;i<dim;i++) {
-<a name="line742">742: </a>    wr[i] = wr[i]+initialShift;
-<a name="line743">743: </a>  }
-<a name="line744">744: </a>  PetscFree(split);
-<a name="line745">745: </a>  <font color="#4169E1">return</font>(0);
-<a name="line746">746: </a>}
-
-<a name="line750">750: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_DQDS_II"></a>PetscErrorCode DSSolve_GHIEP_DQDS_II(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line751">751: </a>{
-<a name="line753">753: </a>  PetscInt       i,off,ld,nwall,nwu;
-<a name="line754">754: </a>  PetscScalar    *A,*B,*Q,*vi;
-<a name="line755">755: </a>  PetscReal      *d,*e,*s,*a,*b,*c;
-
-<a name="line758">758: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line760">760: </a><font color="#A020F0">#endif</font>
-<a name="line761">761: </a>  ld = ds->ld;
-<a name="line762">762: </a>  off = ds->l + ds->l*ld;
-<a name="line763">763: </a>  A = ds->mat[DS_MAT_A];
-<a name="line764">764: </a>  B = ds->mat[DS_MAT_B];
-<a name="line765">765: </a>  Q = ds->mat[DS_MAT_Q];
-<a name="line766">766: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line767">767: </a>  e = ds->rmat[DS_MAT_T] + ld;
-<a name="line768">768: </a>  c = ds->rmat[DS_MAT_T] + 2*ld;
-<a name="line769">769: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line770">770: </a>  <font color="#B22222">/* Quick return if possible */</font>
-<a name="line771">771: </a>  <font color="#4169E1">if</font> (ds->n-ds->l == 1) {
-<a name="line772">772: </a>    *(Q+off) = 1;
-<a name="line773">773: </a>    <font color="#4169E1">if</font> (!ds->compact) {
-<a name="line774">774: </a>      d[ds->l] = PetscRealPart(A[off]);
-<a name="line775">775: </a>      s[ds->l] = PetscRealPart(B[off]);
-<a name="line776">776: </a>    }
-<a name="line777">777: </a>    wr[ds->l] = d[ds->l]/s[ds->l];
-<a name="line778">778: </a>    <font color="#4169E1">if</font> (wi) wi[ds->l] = 0.0;
-<a name="line779">779: </a>    <font color="#4169E1">return</font>(0);
-<a name="line780">780: </a>  }
-<a name="line781">781: </a>  nwall = 12*ld+4;
-<a name="line782">782: </a>  DSAllocateWork_Private(ds,0,nwall,0);
-<a name="line783">783: </a>  <font color="#B22222">/* Reduce to pseudotriadiagonal form */</font>
-<a name="line784">784: </a>  DSIntermediate_GHIEP(ds);
-
-<a name="line786">786: </a>  <font color="#B22222">/* Compute Eigenvalues (DQDS)*/</font>
-<a name="line787">787: </a>  <font color="#B22222">/* Form pseudosymmetric tridiagonal */</font>
-<a name="line788">788: </a>  a = ds->rwork;
-<a name="line789">789: </a>  b = a+ld;
-<a name="line790">790: </a>  c = b+ld;
-<a name="line791">791: </a>  nwu = 3*ld;
-<a name="line792">792: </a>  <font color="#4169E1">if</font> (ds->compact) {
-<a name="line793">793: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n-1;i++) {
-<a name="line794">794: </a>      a[i] = d[i]*s[i];
-<a name="line795">795: </a>      b[i] = e[i]*s[i+1];
-<a name="line796">796: </a>      c[i] = e[i]*s[i];
-<a name="line797">797: </a>    }
-<a name="line798">798: </a>    a[ds->n-1] = d[ds->n-1]*s[ds->n-1];
-<a name="line799">799: </a>  } <font color="#4169E1">else</font> {
-<a name="line800">800: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n-1;i++) {
-<a name="line801">801: </a>      a[i] = PetscRealPart(A[i+i*ld]*B[i+i*ld]);
-<a name="line802">802: </a>      b[i] = PetscRealPart(A[i+1+i*ld]*s[i+1]);
-<a name="line803">803: </a>      c[i] = PetscRealPart(A[i+(i+1)*ld]*s[i]);
-<a name="line804">804: </a>    }
-<a name="line805">805: </a>    a[ds->n-1] = PetscRealPart(A[ds->n-1+(ds->n-1)*ld]*B[ds->n-1+(ds->n-1)*ld]);
-<a name="line806">806: </a>  }
-<a name="line807">807: </a>  vi = (wi)?wi+ds->l:NULL;
-<a name="line808">808: </a>  DSGHIEP_Eigen3DQDS(ds->n-ds->l,a+ds->l,b+ds->l,c+ds->l,wr+ds->l,vi,ds->rwork+nwu,nwall-nwu);
-
-<a name="line810">810: </a>  <font color="#B22222">/* Compute Eigenvectors with Inverse Iteration */</font>
-<a name="line811">811: </a>  DSGHIEPInverseIteration(ds,wr,wi);
-
-<a name="line813">813: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
-<a name="line814">814: </a>  DSGHIEPComplexEigs(ds,0,ds->l,wr,wi);
-<a name="line815">815: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line816">816: </a>  <font color="#4169E1">if</font> (wi) {
-<a name="line817">817: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
-<a name="line818">818: </a>  }
-<a name="line819">819: </a><font color="#A020F0">#endif</font>
-<a name="line820">820: </a>  <font color="#4169E1">return</font>(0);
-<a name="line821">821: </a>}
+<a name="line671">671: </a>              nFail++;
+<a name="line672">672: </a>            }
+<a name="line673">673: </a>          }
+<a name="line674">674: </a>        } <font color="#B22222">/* end "if tolZero" */</font>
+<a name="line675">675: </a>        <font color="#4169E1">if</font> (nFail==maxFail) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Maximun number of failures reached. No convergence in DQDS"</font>);
+<a name="line676">676: </a>        <font color="#B22222">/* Successful Transformation; flag==0 */</font>
+<a name="line677">677: </a>        totalIt++;
+<a name="line678">678: </a>        acShift = shift+acShift;
+<a name="line679">679: </a>        <font color="#4169E1">for</font> (i=begin;i<n-1;i++) {
+<a name="line680">680: </a>          L[i] = L1[i];
+<a name="line681">681: </a>          U[i] = U1[i];
+<a name="line682">682: </a>        }
+<a name="line683">683: </a>        U[n-1] = U1[n-1];
+<a name="line684">684: </a>        totalFail = totalFail+nFail;
+<a name="line685">685: </a>        nFail = 0;
+<a name="line686">686: </a>      }  <font color="#B22222">/* end "if n>begin+1" */</font>
+<a name="line687">687: </a>    }  <font color="#B22222">/* end WHILE 1 */</font>
+<a name="line688">688: </a>    <font color="#4169E1">if</font> (totalIt>=maxIt) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Maximun number of iterations reached. No convergence in DQDS"</font>);
+<a name="line689">689: </a>    <font color="#B22222">/* END: n=2 or n=1  % n=begin+1 or n=begin */</font>
+<a name="line690">690: </a>    <font color="#4169E1">if</font> (n==begin+2) {
+<a name="line691">691: </a>      sum = (L[n-2]+U[n-2]+U[n-1])/2;
+<a name="line692">692: </a>      disc = (L[n-2]*(L[n-2]+2*(U[n-2]+U[n-1]))+(U[n-2]-U[n-1])*(U[n-2]-U[n-1]))/4;
+<a name="line693">693: </a>      <font color="#4169E1">if</font> (disc<=0) {  <font color="#B22222">/* Complex case */</font>
+<a name="line694">694: </a>        <font color="#B22222">/* Deflation 2 */</font>
+<a name="line695">695: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line696">696: </a>        wr[--n] = sum+acShift; <font color="#4169E1">if</font> (wi) wi[n] = PetscSqrtReal(-disc);
+<a name="line697">697: </a>        wr[--n] = sum+acShift; <font color="#4169E1">if</font> (wi) wi[n] = -PetscSqrtReal(-disc);
+<a name="line698">698: </a><font color="#A020F0">#else</font>
+<a name="line699">699: </a>        wr[--n] = sum-PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
+<a name="line700">700: </a>        wr[--n] = sum+PETSC_i*PetscSqrtReal(-disc)+acShift; <font color="#4169E1">if</font> (wi) wi[n] = 0.0;
+<a name="line701">701: </a><font color="#A020F0">#endif</font>
+<a name="line702">702: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* Real case */</font>
+<a name="line703">703: </a>        <font color="#4169E1">if</font> (sum==0.0) {
+<a name="line704">704: </a>          x1 = PetscSqrtReal(disc);
+<a name="line705">705: </a>          x2 = -x1;
+<a name="line706">706: </a>        } <font color="#4169E1">else</font> {
+<a name="line707">707: </a>          x1 = ((sum>=0)?1.0:-1.0)*(PetscAbsReal(sum)+PetscSqrtReal(disc));
+<a name="line708">708: </a>          x2 = U[n-2]*U[n-1]/x1;
+<a name="line709">709: </a>        }
+<a name="line710">710: </a>        <font color="#B22222">/* Deflation 2 */</font>
+<a name="line711">711: </a>        wr[--n] = x2+acShift;
+<a name="line712">712: </a>        wr[--n] = x1+acShift;
+<a name="line713">713: </a>      }
+<a name="line714">714: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* n=1   n=begin */</font>
+<a name="line715">715: </a>      <font color="#B22222">/* deflation 1 */</font>
+<a name="line716">716: </a>      x1 = U[n-1]+acShift;
+<a name="line717">717: </a>      wr[--n] = x1;
+<a name="line718">718: </a>    }
+<a name="line719">719: </a>    <font color="#4169E1">switch</font> (n) {
+<a name="line720">720: </a>      <font color="#4169E1">case</font> 0:
+<a name="line721">721: </a>        begin = -1;
+<a name="line722">722: </a>        <font color="#4169E1">break</font>;
+<a name="line723">723: </a>      <font color="#4169E1">case</font> 1:
+<a name="line724">724: </a>        acShift = L[begin-1];
+<a name="line725">725: </a>        begin = split[lastSplit];
+<a name="line726">726: </a>        lastSplit--;
+<a name="line727">727: </a>        <font color="#4169E1">break</font>;
+<a name="line728">728: </a>      <font color="#4169E1">default</font> : <font color="#B22222">/* n>=2 */</font>
+<a name="line729">729: </a>        acShift = L[begin-1];
+<a name="line730">730: </a>        begin = split[lastSplit];
+<a name="line731">731: </a>        lastSplit--;
+<a name="line732">732: </a>    }
+<a name="line733">733: </a>  }<font color="#B22222">/* While begin~=-1 */</font>
+<a name="line734">734: </a>  <font color="#4169E1">for</font> (i=0;i<dim;i++) {
+<a name="line735">735: </a>    wr[i] = wr[i]+initialShift;
+<a name="line736">736: </a>  }
+<a name="line737">737: </a>  PetscFree(split);
+<a name="line738">738: </a>  <font color="#4169E1">return</font>(0);
+<a name="line739">739: </a>}
+
+<a name="line743">743: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_DQDS_II"></a>PetscErrorCode DSSolve_GHIEP_DQDS_II(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line744">744: </a>{
+<a name="line746">746: </a>  PetscInt       i,off,ld,nwall,nwu;
+<a name="line747">747: </a>  PetscScalar    *A,*B,*Q,*vi;
+<a name="line748">748: </a>  PetscReal      *d,*e,*s,*a,*b,*c;
+
+<a name="line751">751: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line753">753: </a><font color="#A020F0">#endif</font>
+<a name="line754">754: </a>  ld = ds->ld;
+<a name="line755">755: </a>  off = ds->l + ds->l*ld;
+<a name="line756">756: </a>  A = ds->mat[DS_MAT_A];
+<a name="line757">757: </a>  B = ds->mat[DS_MAT_B];
+<a name="line758">758: </a>  Q = ds->mat[DS_MAT_Q];
+<a name="line759">759: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line760">760: </a>  e = ds->rmat[DS_MAT_T] + ld;
+<a name="line761">761: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line762">762: </a>  <font color="#B22222">/* Quick return if possible */</font>
+<a name="line763">763: </a>  <font color="#4169E1">if</font> (ds->n-ds->l == 1) {
+<a name="line764">764: </a>    *(Q+off) = 1;
+<a name="line765">765: </a>    <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line766">766: </a>      d[ds->l] = PetscRealPart(A[off]);
+<a name="line767">767: </a>      s[ds->l] = PetscRealPart(B[off]);
+<a name="line768">768: </a>    }
+<a name="line769">769: </a>    wr[ds->l] = d[ds->l]/s[ds->l];
+<a name="line770">770: </a>    <font color="#4169E1">if</font> (wi) wi[ds->l] = 0.0;
+<a name="line771">771: </a>    <font color="#4169E1">return</font>(0);
+<a name="line772">772: </a>  }
+<a name="line773">773: </a>  nwall = 12*ld+4;
+<a name="line774">774: </a>  DSAllocateWork_Private(ds,0,nwall,0);
+<a name="line775">775: </a>  <font color="#B22222">/* Reduce to pseudotriadiagonal form */</font>
+<a name="line776">776: </a>  DSIntermediate_GHIEP(ds);
+
+<a name="line778">778: </a>  <font color="#B22222">/* Compute Eigenvalues (DQDS) */</font>
+<a name="line779">779: </a>  <font color="#B22222">/* Form pseudosymmetric tridiagonal */</font>
+<a name="line780">780: </a>  a = ds->rwork;
+<a name="line781">781: </a>  b = a+ld;
+<a name="line782">782: </a>  c = b+ld;
+<a name="line783">783: </a>  nwu = 3*ld;
+<a name="line784">784: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line785">785: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n-1;i++) {
+<a name="line786">786: </a>      a[i] = d[i]*s[i];
+<a name="line787">787: </a>      b[i] = e[i]*s[i+1];
+<a name="line788">788: </a>      c[i] = e[i]*s[i];
+<a name="line789">789: </a>    }
+<a name="line790">790: </a>    a[ds->n-1] = d[ds->n-1]*s[ds->n-1];
+<a name="line791">791: </a>  } <font color="#4169E1">else</font> {
+<a name="line792">792: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n-1;i++) {
+<a name="line793">793: </a>      a[i] = PetscRealPart(A[i+i*ld]*B[i+i*ld]);
+<a name="line794">794: </a>      b[i] = PetscRealPart(A[i+1+i*ld]*s[i+1]);
+<a name="line795">795: </a>      c[i] = PetscRealPart(A[i+(i+1)*ld]*s[i]);
+<a name="line796">796: </a>    }
+<a name="line797">797: </a>    a[ds->n-1] = PetscRealPart(A[ds->n-1+(ds->n-1)*ld]*B[ds->n-1+(ds->n-1)*ld]);
+<a name="line798">798: </a>  }
+<a name="line799">799: </a>  vi = (wi)?wi+ds->l:NULL;
+<a name="line800">800: </a>  DSGHIEP_Eigen3DQDS(ds->n-ds->l,a+ds->l,b+ds->l,c+ds->l,wr+ds->l,vi,ds->rwork+nwu);
+
+<a name="line802">802: </a>  <font color="#B22222">/* Compute Eigenvectors with Inverse Iteration */</font>
+<a name="line803">803: </a>  DSGHIEPInverseIteration(ds,wr,wi);
+
+<a name="line805">805: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
+<a name="line806">806: </a>  DSGHIEPComplexEigs(ds,0,ds->l,wr,wi);
+<a name="line807">807: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line808">808: </a>  <font color="#4169E1">if</font> (wi) {
+<a name="line809">809: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
+<a name="line810">810: </a>  }
+<a name="line811">811: </a><font color="#A020F0">#endif</font>
+<a name="line812">812: </a>  <font color="#4169E1">return</font>(0);
+<a name="line813">813: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/ghiep/dsghiep.c b/src/sys/classes/ds/impls/ghiep/dsghiep.c
index 9f4a543..5010229 100644
--- a/src/sys/classes/ds/impls/ghiep/dsghiep.c
+++ b/src/sys/classes/ds/impls/ghiep/dsghiep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -178,8 +178,12 @@ PetscErrorCode DSView_GHIEP(DS ds,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_GHIEP_Eigen_Some"
-PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)
+static PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)
 {
+#if defined(SLEPC_MISSING_LAPACK_LAG2)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LAG2 - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
   PetscReal      b[4],M[4],d1,d2,s1,s2,e;
   PetscReal      scal1,scal2,wr1,wr2,wi,ep,norm;
@@ -270,6 +274,7 @@ PetscErrorCode DSVectors_GHIEP_Eigen_Some(DS ds,PetscInt *idx,PetscReal *rnorm)
     }
   }
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -320,6 +325,10 @@ PetscErrorCode DSVectors_GHIEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)
 */
 PetscErrorCode DSGHIEPComplexEigs(DS ds,PetscInt n0,PetscInt n1,PetscScalar *wr,PetscScalar *wi)
 {
+#if defined(SLEPC_MISSING_LAPACK_LAG2)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LAG2 - Lapack routine is unavailable");
+#else
   PetscInt     k,ld;
   PetscBLASInt two=2;
   PetscScalar  *A,*B;
@@ -391,6 +400,7 @@ PetscErrorCode DSGHIEPComplexEigs(DS ds,PetscInt n0,PetscInt n1,PetscScalar *wr,
   }
 #endif
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -446,7 +456,7 @@ PetscErrorCode DSSort_GHIEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *r
 */
 PetscErrorCode DSGHIEPInverseIteration(DS ds,PetscScalar *wr,PetscScalar *wi)
 {
-#if defined(PETSC_MISSING_LAPACK_HSEIN)
+#if defined(SLEPC_MISSING_LAPACK_HSEIN)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"HSEIN - Lapack routine is unavailable");
 #else
@@ -516,8 +526,8 @@ PetscErrorCode DSGHIEPInverseIteration(DS ds,PetscScalar *wr,PetscScalar *wi)
     }
   }
 #endif
-  if (info<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in hsein routine %d",-i);
-  if (info>0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Convergence error in hsein routine %d",i);
+  if (info<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in hsein routine %D",-i);
+  if (info>0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Convergence error in hsein routine %D",i);
   ierr = DSGHIEPOrthogEigenv(ds,DS_MAT_X,wr,wi,PETSC_TRUE);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 #endif
@@ -531,6 +541,10 @@ PetscErrorCode DSGHIEPInverseIteration(DS ds,PetscScalar *wr,PetscScalar *wi)
 */
 PetscErrorCode DSGHIEPRealBlocks(DS ds)
 {
+#if defined(SLEPC_MISSING_LAPACK_LAG2)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LAG2 - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
   PetscInt       i;
   PetscReal      e,d1,d2,s1,s2,ss1,ss2,t,dd,ss;
@@ -642,6 +656,7 @@ PetscErrorCode DSGHIEPRealBlocks(DS ds)
     }
   }
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
diff --git a/src/sys/classes/ds/impls/ghiep/dsghiep.c.html b/src/sys/classes/ds/impls/ghiep/dsghiep.c.html
index 3ab3acb..5194c32 100644
--- a/src/sys/classes/ds/impls/ghiep/dsghiep.c.html
+++ b/src/sys/classes/ds/impls/ghiep/dsghiep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghiep/dsghiep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:53+00:00">
+<meta name="date" content="2016-05-16T10:31:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghiep/dsghiep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghiep/dsghiep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -177,752 +177,764 @@
 <a name="line176">176: </a>  <font color="#4169E1">return</font>(0);
 <a name="line177">177: </a>}
 
-<a name="line181">181: </a><strong><font color="#4169E1"><a name="DSVectors_GHIEP_Eigen_Some"></a>PetscErrorCode DSVectors_GHIEP_Eigen_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *idx,PetscReal *rnorm)</font></strong>
+<a name="line181">181: </a><strong><font color="#4169E1"><a name="DSVectors_GHIEP_Eigen_Some"></a>static PetscErrorCode DSVectors_GHIEP_Eigen_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *idx,PetscReal *rnorm)</font></strong>
 <a name="line182">182: </a>{
-<a name="line184">184: </a>  PetscReal      b[4],M[4],d1,d2,s1,s2,e;
-<a name="line185">185: </a>  PetscReal      scal1,scal2,wr1,wr2,wi,ep,norm;
-<a name="line186">186: </a>  PetscScalar    *Q,*X,Y[4],alpha,zeroS = 0.0;
-<a name="line187">187: </a>  PetscInt       k;
-<a name="line188">188: </a>  PetscBLASInt   two = 2,n_,ld,one=1;
-<a name="line189">189: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line190">190: </a>  PetscBLASInt   four=4;
-<a name="line191">191: </a><font color="#A020F0">#endif</font>
-
-<a name="line194">194: </a>  X = ds->mat[DS_MAT_X];
-<a name="line195">195: </a>  Q = ds->mat[DS_MAT_Q];
-<a name="line196">196: </a>  k = *idx;
-<a name="line197">197: </a>  PetscBLASIntCast(ds->n,&n_);
-<a name="line198">198: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line199">199: </a>  <font color="#4169E1">if</font> (k < ds->n-1) {
-<a name="line200">200: </a>    e = (ds->compact)?*(ds->rmat[DS_MAT_T]+ld+k):PetscRealPart(*(ds->mat[DS_MAT_A]+(k+1)+ld*k));
-<a name="line201">201: </a>  } <font color="#4169E1">else</font> e = 0.0;
-<a name="line202">202: </a>  <font color="#4169E1">if</font> (e == 0.0) {<font color="#B22222">/* Real */</font>
-<a name="line203">203: </a>    <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
-<a name="line204">204: </a>      PetscMemcpy(X+k*ld,Q+k*ld,ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line205">205: </a>    } <font color="#4169E1">else</font> {
-<a name="line206">206: </a>      PetscMemzero(X+k*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line207">207: </a>      X[k+k*ds->ld] = 1.0;
-<a name="line208">208: </a>    }
-<a name="line209">209: </a>    <font color="#4169E1">if</font> (rnorm) {
-<a name="line210">210: </a>      *rnorm = PetscAbsScalar(X[ds->n-1+k*ld]);
-<a name="line211">211: </a>    }
-<a name="line212">212: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* 2x2 block */</font>
-<a name="line213">213: </a>    <font color="#4169E1">if</font> (ds->compact) {
-<a name="line214">214: </a>      s1 = *(ds->rmat[DS_MAT_D]+k);
-<a name="line215">215: </a>      d1 = *(ds->rmat[DS_MAT_T]+k);
-<a name="line216">216: </a>      s2 = *(ds->rmat[DS_MAT_D]+k+1);
-<a name="line217">217: </a>      d2 = *(ds->rmat[DS_MAT_T]+k+1);
-<a name="line218">218: </a>    } <font color="#4169E1">else</font> {
-<a name="line219">219: </a>      s1 = PetscRealPart(*(ds->mat[DS_MAT_B]+k*ld+k));
-<a name="line220">220: </a>      d1 = PetscRealPart(*(ds->mat[DS_MAT_A]+k+k*ld));
-<a name="line221">221: </a>      s2 = PetscRealPart(*(ds->mat[DS_MAT_B]+(k+1)*ld+k+1));
-<a name="line222">222: </a>      d2 = PetscRealPart(*(ds->mat[DS_MAT_A]+k+1+(k+1)*ld));
-<a name="line223">223: </a>    }
-<a name="line224">224: </a>    M[0] = d1; M[1] = e; M[2] = e; M[3]= d2;
-<a name="line225">225: </a>    b[0] = s1; b[1] = 0.0; b[2] = 0.0; b[3] = s2;
-<a name="line226">226: </a>    ep = LAPACKlamch_(<font color="#666666">"S"</font>);
-<a name="line227">227: </a>    <font color="#B22222">/* Compute eigenvalues of the block */</font>
-<a name="line228">228: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(M,&two,b,&two,&ep,&scal1,&scal2,&wr1,&wr2,&wi));
-<a name="line229">229: </a>    <font color="#4169E1">if</font> (wi==0.0)  <font color="#B22222">/* Real eigenvalues */</font>
-<a name="line230">230: </a>      SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Real block in DSVectors_GHIEP"</font>);
-<a name="line231">231: </a>    <font color="#4169E1">else</font> { <font color="#B22222">/* Complex eigenvalues */</font>
-<a name="line232">232: </a>      <font color="#4169E1">if</font> (scal1<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
-<a name="line233">233: </a>      wr1 /= scal1; wi /= scal1;
-<a name="line234">234: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line235">235: </a>      <font color="#4169E1">if</font> (SlepcAbs(s1*d1-wr1,wi)<SlepcAbs(s2*d2-wr1,wi)) {
-<a name="line236">236: </a>        Y[0] = wr1-s2*d2; Y[1] = s2*e; Y[2] = wi; Y[3] = 0.0;
-<a name="line237">237: </a>      } <font color="#4169E1">else</font> {
-<a name="line238">238: </a>        Y[0] = s1*e; Y[1] = wr1-s1*d1; Y[2] = 0.0; Y[3] = wi;
-<a name="line239">239: </a>      }
-<a name="line240">240: </a>      norm = BLASnrm2_(&four,Y,&one);
-<a name="line241">241: </a>      norm = 1/norm;
-<a name="line242">242: </a>      <font color="#4169E1">if</font> (ds->state >= DS_STATE_CONDENSED) {
-<a name="line243">243: </a>        alpha = norm;
-<a name="line244">244: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&two,&two,&alpha,ds->mat[DS_MAT_Q]+k*ld,&ld,Y,&two,&zeroS,X+k*ld,&ld));
-<a name="line245">245: </a>        <font color="#4169E1">if</font> (rnorm) *rnorm = SlepcAbsEigenvalue(X[ds->n-1+k*ld],X[ds->n-1+(k+1)*ld]);
-<a name="line246">246: </a>      } <font color="#4169E1">else</font> {
-<a name="line247">247: </a>        PetscMemzero(X+k*ld,2*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line248">248: </a>        X[k*ld+k] = Y[0]*norm; X[k*ld+k+1] = Y[1]*norm;
-<a name="line249">249: </a>        X[(k+1)*ld+k] = Y[2]*norm; X[(k+1)*ld+k+1] = Y[3]*norm;
-<a name="line250">250: </a>      }
-<a name="line251">251: </a><font color="#A020F0">#else</font>
-<a name="line252">252: </a>      <font color="#4169E1">if</font> (SlepcAbs(s1*d1-wr1,wi)<SlepcAbs(s2*d2-wr1,wi)) {
-<a name="line253">253: </a>        Y[0] = wr1-s2*d2+PETSC_i*wi; Y[1] = s2*e;
-<a name="line254">254: </a>      } <font color="#4169E1">else</font> {
-<a name="line255">255: </a>        Y[0] = s1*e; Y[1] = wr1-s1*d1+PETSC_i*wi;
-<a name="line256">256: </a>      }
-<a name="line257">257: </a>      norm = BLASnrm2_(&two,Y,&one);
-<a name="line258">258: </a>      norm = 1/norm;
-<a name="line259">259: </a>      <font color="#4169E1">if</font> (ds->state >= DS_STATE_CONDENSED) {
-<a name="line260">260: </a>        alpha = norm;
-<a name="line261">261: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&two,&alpha,ds->mat[DS_MAT_Q]+k*ld,&ld,Y,&one,&zeroS,X+k*ld,&one));
-<a name="line262">262: </a>        <font color="#4169E1">if</font> (rnorm) *rnorm = PetscAbsScalar(X[ds->n-1+k*ld]);
-<a name="line263">263: </a>      } <font color="#4169E1">else</font> {
-<a name="line264">264: </a>        PetscMemzero(X+k*ld,2*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line265">265: </a>        X[k*ld+k] = Y[0]*norm; X[k*ld+k+1] = Y[1]*norm;
-<a name="line266">266: </a>      }
-<a name="line267">267: </a>      X[(k+1)*ld+k] = PetscConj(X[k*ld+k]); X[(k+1)*ld+k+1] = PetscConj(X[k*ld+k+1]);
-<a name="line268">268: </a><font color="#A020F0">#endif</font>
-<a name="line269">269: </a>      (*idx)++;
-<a name="line270">270: </a>    }
-<a name="line271">271: </a>  }
-<a name="line272">272: </a>  <font color="#4169E1">return</font>(0);
-<a name="line273">273: </a>}
-
-<a name="line277">277: </a><strong><font color="#4169E1"><a name="DSVectors_GHIEP"></a>PetscErrorCode DSVectors_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *k,PetscReal *rnorm)</font></strong>
-<a name="line278">278: </a>{
-<a name="line279">279: </a>  PetscInt       i;
-<a name="line280">280: </a>  PetscReal      e;
-
-<a name="line284">284: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line285">285: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line286">286: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line287">287: </a>      <font color="#4169E1">if</font> (k) {
-<a name="line288">288: </a>        DSVectors_GHIEP_Eigen_Some(ds,k,rnorm);
-<a name="line289">289: </a>      } <font color="#4169E1">else</font> {
-<a name="line290">290: </a>        <font color="#4169E1">for</font> (i=0; i<ds->n; i++) {
-<a name="line291">291: </a>          e = (ds->compact)?*(ds->rmat[DS_MAT_T]+ds->ld+i):PetscRealPart(*(ds->mat[DS_MAT_A]+(i+1)+ds->ld*i));
-<a name="line292">292: </a>          <font color="#4169E1">if</font> (e == 0.0) {<font color="#B22222">/* real */</font>
-<a name="line293">293: </a>            <font color="#4169E1">if</font> (ds->state >= DS_STATE_CONDENSED) {
-<a name="line294">294: </a>              PetscMemcpy(ds->mat[mat]+i*ds->ld,ds->mat[DS_MAT_Q]+i*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line295">295: </a>            } <font color="#4169E1">else</font> {
-<a name="line296">296: </a>              PetscMemzero(ds->mat[mat]+i*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line297">297: </a>              *(ds->mat[mat]+i+i*ds->ld) = 1.0;
-<a name="line298">298: </a>            }
-<a name="line299">299: </a>          } <font color="#4169E1">else</font> {
-<a name="line300">300: </a>            DSVectors_GHIEP_Eigen_Some(ds,&i,rnorm);
-<a name="line301">301: </a>          }
-<a name="line302">302: </a>        }
-<a name="line303">303: </a>      }
-<a name="line304">304: </a>      <font color="#4169E1">break</font>;
-<a name="line305">305: </a>    <font color="#4169E1">case</font> DS_MAT_U:
-<a name="line306">306: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
-<a name="line307">307: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line308">308: </a>      <font color="#4169E1">break</font>;
-<a name="line309">309: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line310">310: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line311">311: </a>  }
-<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
-<a name="line313">313: </a>}
-
-<a name="line317">317: </a><font color="#B22222">/*</font>
-<a name="line318">318: </a><font color="#B22222">  Extract the eigenvalues contained in the block-diagonal of the indefinite problem.</font>
-<a name="line319">319: </a><font color="#B22222">  Only the index range n0..n1 is processed.</font>
-<a name="line320">320: </a><font color="#B22222">*/</font>
-<a name="line321">321: </a><strong><font color="#4169E1"><a name="DSGHIEPComplexEigs"></a>PetscErrorCode DSGHIEPComplexEigs(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt n0,PetscInt n1,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line322">322: </a>{
-<a name="line323">323: </a>  PetscInt     k,ld;
-<a name="line324">324: </a>  PetscBLASInt two=2;
-<a name="line325">325: </a>  PetscScalar  *A,*B;
-<a name="line326">326: </a>  PetscReal    *D,*T;
-<a name="line327">327: </a>  PetscReal    b[4],M[4],d1,d2,s1,s2,e;
-<a name="line328">328: </a>  PetscReal    scal1,scal2,ep,wr1,wr2,wi1;
-
-<a name="line331">331: </a>  ld = ds->ld;
-<a name="line332">332: </a>  A = ds->mat[DS_MAT_A];
-<a name="line333">333: </a>  B = ds->mat[DS_MAT_B];
-<a name="line334">334: </a>  D = ds->rmat[DS_MAT_D];
-<a name="line335">335: </a>  T = ds->rmat[DS_MAT_T];
-<a name="line336">336: </a>  <font color="#4169E1">for</font> (k=n0;k<n1;k++) {
-<a name="line337">337: </a>    <font color="#4169E1">if</font> (k < n1-1) {
-<a name="line338">338: </a>      e = (ds->compact)?T[ld+k]:PetscRealPart(A[(k+1)+ld*k]);
-<a name="line339">339: </a>    } <font color="#4169E1">else</font> {
-<a name="line340">340: </a>      e = 0.0;
-<a name="line341">341: </a>    }
-<a name="line342">342: </a>    <font color="#4169E1">if</font> (e==0.0) {
-<a name="line343">343: </a>      <font color="#B22222">/* real eigenvalue */</font>
-<a name="line344">344: </a>      wr[k] = (ds->compact)?T[k]/D[k]:A[k+k*ld]/B[k+k*ld];
-<a name="line345">345: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line346">346: </a>      wi[k] = 0.0 ;
-<a name="line347">347: </a><font color="#A020F0">#endif</font>
+<a name="line183">183: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LAG2)</font>
+<a name="line185">185: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LAG2 - Lapack routine is unavailable"</font>);
+<a name="line186">186: </a><font color="#A020F0">#else</font>
+<a name="line188">188: </a>  PetscReal      b[4],M[4],d1,d2,s1,s2,e;
+<a name="line189">189: </a>  PetscReal      scal1,scal2,wr1,wr2,wi,ep,norm;
+<a name="line190">190: </a>  PetscScalar    *Q,*X,Y[4],alpha,zeroS = 0.0;
+<a name="line191">191: </a>  PetscInt       k;
+<a name="line192">192: </a>  PetscBLASInt   two = 2,n_,ld,one=1;
+<a name="line193">193: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line194">194: </a>  PetscBLASInt   four=4;
+<a name="line195">195: </a><font color="#A020F0">#endif</font>
+
+<a name="line198">198: </a>  X = ds->mat[DS_MAT_X];
+<a name="line199">199: </a>  Q = ds->mat[DS_MAT_Q];
+<a name="line200">200: </a>  k = *idx;
+<a name="line201">201: </a>  PetscBLASIntCast(ds->n,&n_);
+<a name="line202">202: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line203">203: </a>  <font color="#4169E1">if</font> (k < ds->n-1) {
+<a name="line204">204: </a>    e = (ds->compact)?*(ds->rmat[DS_MAT_T]+ld+k):PetscRealPart(*(ds->mat[DS_MAT_A]+(k+1)+ld*k));
+<a name="line205">205: </a>  } <font color="#4169E1">else</font> e = 0.0;
+<a name="line206">206: </a>  <font color="#4169E1">if</font> (e == 0.0) {<font color="#B22222">/* Real */</font>
+<a name="line207">207: </a>    <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
+<a name="line208">208: </a>      PetscMemcpy(X+k*ld,Q+k*ld,ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line209">209: </a>    } <font color="#4169E1">else</font> {
+<a name="line210">210: </a>      PetscMemzero(X+k*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line211">211: </a>      X[k+k*ds->ld] = 1.0;
+<a name="line212">212: </a>    }
+<a name="line213">213: </a>    <font color="#4169E1">if</font> (rnorm) {
+<a name="line214">214: </a>      *rnorm = PetscAbsScalar(X[ds->n-1+k*ld]);
+<a name="line215">215: </a>    }
+<a name="line216">216: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* 2x2 block */</font>
+<a name="line217">217: </a>    <font color="#4169E1">if</font> (ds->compact) {
+<a name="line218">218: </a>      s1 = *(ds->rmat[DS_MAT_D]+k);
+<a name="line219">219: </a>      d1 = *(ds->rmat[DS_MAT_T]+k);
+<a name="line220">220: </a>      s2 = *(ds->rmat[DS_MAT_D]+k+1);
+<a name="line221">221: </a>      d2 = *(ds->rmat[DS_MAT_T]+k+1);
+<a name="line222">222: </a>    } <font color="#4169E1">else</font> {
+<a name="line223">223: </a>      s1 = PetscRealPart(*(ds->mat[DS_MAT_B]+k*ld+k));
+<a name="line224">224: </a>      d1 = PetscRealPart(*(ds->mat[DS_MAT_A]+k+k*ld));
+<a name="line225">225: </a>      s2 = PetscRealPart(*(ds->mat[DS_MAT_B]+(k+1)*ld+k+1));
+<a name="line226">226: </a>      d2 = PetscRealPart(*(ds->mat[DS_MAT_A]+k+1+(k+1)*ld));
+<a name="line227">227: </a>    }
+<a name="line228">228: </a>    M[0] = d1; M[1] = e; M[2] = e; M[3]= d2;
+<a name="line229">229: </a>    b[0] = s1; b[1] = 0.0; b[2] = 0.0; b[3] = s2;
+<a name="line230">230: </a>    ep = LAPACKlamch_(<font color="#666666">"S"</font>);
+<a name="line231">231: </a>    <font color="#B22222">/* Compute eigenvalues of the block */</font>
+<a name="line232">232: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(M,&two,b,&two,&ep,&scal1,&scal2,&wr1,&wr2,&wi));
+<a name="line233">233: </a>    <font color="#4169E1">if</font> (wi==0.0)  <font color="#B22222">/* Real eigenvalues */</font>
+<a name="line234">234: </a>      SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Real block in DSVectors_GHIEP"</font>);
+<a name="line235">235: </a>    <font color="#4169E1">else</font> { <font color="#B22222">/* Complex eigenvalues */</font>
+<a name="line236">236: </a>      <font color="#4169E1">if</font> (scal1<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
+<a name="line237">237: </a>      wr1 /= scal1; wi /= scal1;
+<a name="line238">238: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line239">239: </a>      <font color="#4169E1">if</font> (SlepcAbs(s1*d1-wr1,wi)<SlepcAbs(s2*d2-wr1,wi)) {
+<a name="line240">240: </a>        Y[0] = wr1-s2*d2; Y[1] = s2*e; Y[2] = wi; Y[3] = 0.0;
+<a name="line241">241: </a>      } <font color="#4169E1">else</font> {
+<a name="line242">242: </a>        Y[0] = s1*e; Y[1] = wr1-s1*d1; Y[2] = 0.0; Y[3] = wi;
+<a name="line243">243: </a>      }
+<a name="line244">244: </a>      norm = BLASnrm2_(&four,Y,&one);
+<a name="line245">245: </a>      norm = 1/norm;
+<a name="line246">246: </a>      <font color="#4169E1">if</font> (ds->state >= DS_STATE_CONDENSED) {
+<a name="line247">247: </a>        alpha = norm;
+<a name="line248">248: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&two,&two,&alpha,ds->mat[DS_MAT_Q]+k*ld,&ld,Y,&two,&zeroS,X+k*ld,&ld));
+<a name="line249">249: </a>        <font color="#4169E1">if</font> (rnorm) *rnorm = SlepcAbsEigenvalue(X[ds->n-1+k*ld],X[ds->n-1+(k+1)*ld]);
+<a name="line250">250: </a>      } <font color="#4169E1">else</font> {
+<a name="line251">251: </a>        PetscMemzero(X+k*ld,2*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line252">252: </a>        X[k*ld+k] = Y[0]*norm; X[k*ld+k+1] = Y[1]*norm;
+<a name="line253">253: </a>        X[(k+1)*ld+k] = Y[2]*norm; X[(k+1)*ld+k+1] = Y[3]*norm;
+<a name="line254">254: </a>      }
+<a name="line255">255: </a><font color="#A020F0">#else</font>
+<a name="line256">256: </a>      <font color="#4169E1">if</font> (SlepcAbs(s1*d1-wr1,wi)<SlepcAbs(s2*d2-wr1,wi)) {
+<a name="line257">257: </a>        Y[0] = wr1-s2*d2+PETSC_i*wi; Y[1] = s2*e;
+<a name="line258">258: </a>      } <font color="#4169E1">else</font> {
+<a name="line259">259: </a>        Y[0] = s1*e; Y[1] = wr1-s1*d1+PETSC_i*wi;
+<a name="line260">260: </a>      }
+<a name="line261">261: </a>      norm = BLASnrm2_(&two,Y,&one);
+<a name="line262">262: </a>      norm = 1/norm;
+<a name="line263">263: </a>      <font color="#4169E1">if</font> (ds->state >= DS_STATE_CONDENSED) {
+<a name="line264">264: </a>        alpha = norm;
+<a name="line265">265: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n_,&two,&alpha,ds->mat[DS_MAT_Q]+k*ld,&ld,Y,&one,&zeroS,X+k*ld,&one));
+<a name="line266">266: </a>        <font color="#4169E1">if</font> (rnorm) *rnorm = PetscAbsScalar(X[ds->n-1+k*ld]);
+<a name="line267">267: </a>      } <font color="#4169E1">else</font> {
+<a name="line268">268: </a>        PetscMemzero(X+k*ld,2*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line269">269: </a>        X[k*ld+k] = Y[0]*norm; X[k*ld+k+1] = Y[1]*norm;
+<a name="line270">270: </a>      }
+<a name="line271">271: </a>      X[(k+1)*ld+k] = PetscConj(X[k*ld+k]); X[(k+1)*ld+k+1] = PetscConj(X[k*ld+k+1]);
+<a name="line272">272: </a><font color="#A020F0">#endif</font>
+<a name="line273">273: </a>      (*idx)++;
+<a name="line274">274: </a>    }
+<a name="line275">275: </a>  }
+<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
+<a name="line277">277: </a><font color="#A020F0">#endif</font>
+<a name="line278">278: </a>}
+
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="DSVectors_GHIEP"></a>PetscErrorCode DSVectors_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *k,PetscReal *rnorm)</font></strong>
+<a name="line283">283: </a>{
+<a name="line284">284: </a>  PetscInt       i;
+<a name="line285">285: </a>  PetscReal      e;
+
+<a name="line289">289: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line290">290: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line291">291: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line292">292: </a>      <font color="#4169E1">if</font> (k) {
+<a name="line293">293: </a>        DSVectors_GHIEP_Eigen_Some(ds,k,rnorm);
+<a name="line294">294: </a>      } <font color="#4169E1">else</font> {
+<a name="line295">295: </a>        <font color="#4169E1">for</font> (i=0; i<ds->n; i++) {
+<a name="line296">296: </a>          e = (ds->compact)?*(ds->rmat[DS_MAT_T]+ds->ld+i):PetscRealPart(*(ds->mat[DS_MAT_A]+(i+1)+ds->ld*i));
+<a name="line297">297: </a>          <font color="#4169E1">if</font> (e == 0.0) {<font color="#B22222">/* real */</font>
+<a name="line298">298: </a>            <font color="#4169E1">if</font> (ds->state >= DS_STATE_CONDENSED) {
+<a name="line299">299: </a>              PetscMemcpy(ds->mat[mat]+i*ds->ld,ds->mat[DS_MAT_Q]+i*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line300">300: </a>            } <font color="#4169E1">else</font> {
+<a name="line301">301: </a>              PetscMemzero(ds->mat[mat]+i*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line302">302: </a>              *(ds->mat[mat]+i+i*ds->ld) = 1.0;
+<a name="line303">303: </a>            }
+<a name="line304">304: </a>          } <font color="#4169E1">else</font> {
+<a name="line305">305: </a>            DSVectors_GHIEP_Eigen_Some(ds,&i,rnorm);
+<a name="line306">306: </a>          }
+<a name="line307">307: </a>        }
+<a name="line308">308: </a>      }
+<a name="line309">309: </a>      <font color="#4169E1">break</font>;
+<a name="line310">310: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line311">311: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line312">312: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line313">313: </a>      <font color="#4169E1">break</font>;
+<a name="line314">314: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line315">315: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line316">316: </a>  }
+<a name="line317">317: </a>  <font color="#4169E1">return</font>(0);
+<a name="line318">318: </a>}
+
+<a name="line322">322: </a><font color="#B22222">/*</font>
+<a name="line323">323: </a><font color="#B22222">  Extract the eigenvalues contained in the block-diagonal of the indefinite problem.</font>
+<a name="line324">324: </a><font color="#B22222">  Only the index range n0..n1 is processed.</font>
+<a name="line325">325: </a><font color="#B22222">*/</font>
+<a name="line326">326: </a><strong><font color="#4169E1"><a name="DSGHIEPComplexEigs"></a>PetscErrorCode DSGHIEPComplexEigs(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt n0,PetscInt n1,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line327">327: </a>{
+<a name="line328">328: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LAG2)</font>
+<a name="line330">330: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LAG2 - Lapack routine is unavailable"</font>);
+<a name="line331">331: </a><font color="#A020F0">#else</font>
+<a name="line332">332: </a>  PetscInt     k,ld;
+<a name="line333">333: </a>  PetscBLASInt two=2;
+<a name="line334">334: </a>  PetscScalar  *A,*B;
+<a name="line335">335: </a>  PetscReal    *D,*T;
+<a name="line336">336: </a>  PetscReal    b[4],M[4],d1,d2,s1,s2,e;
+<a name="line337">337: </a>  PetscReal    scal1,scal2,ep,wr1,wr2,wi1;
+
+<a name="line340">340: </a>  ld = ds->ld;
+<a name="line341">341: </a>  A = ds->mat[DS_MAT_A];
+<a name="line342">342: </a>  B = ds->mat[DS_MAT_B];
+<a name="line343">343: </a>  D = ds->rmat[DS_MAT_D];
+<a name="line344">344: </a>  T = ds->rmat[DS_MAT_T];
+<a name="line345">345: </a>  <font color="#4169E1">for</font> (k=n0;k<n1;k++) {
+<a name="line346">346: </a>    <font color="#4169E1">if</font> (k < n1-1) {
+<a name="line347">347: </a>      e = (ds->compact)?T[ld+k]:PetscRealPart(A[(k+1)+ld*k]);
 <a name="line348">348: </a>    } <font color="#4169E1">else</font> {
-<a name="line349">349: </a>      <font color="#B22222">/* diagonal block */</font>
-<a name="line350">350: </a>      <font color="#4169E1">if</font> (ds->compact) {
-<a name="line351">351: </a>        s1 = D[k];
-<a name="line352">352: </a>        d1 = T[k];
-<a name="line353">353: </a>        s2 = D[k+1];
-<a name="line354">354: </a>        d2 = T[k+1];
-<a name="line355">355: </a>      } <font color="#4169E1">else</font> {
-<a name="line356">356: </a>        s1 = PetscRealPart(B[k*ld+k]);
-<a name="line357">357: </a>        d1 = PetscRealPart(A[k+k*ld]);
-<a name="line358">358: </a>        s2 = PetscRealPart(B[(k+1)*ld+k+1]);
-<a name="line359">359: </a>        d2 = PetscRealPart(A[k+1+(k+1)*ld]);
-<a name="line360">360: </a>      }
-<a name="line361">361: </a>      M[0] = d1; M[1] = e; M[2] = e; M[3]= d2;
-<a name="line362">362: </a>      b[0] = s1; b[1] = 0.0; b[2] = 0.0; b[3] = s2;
-<a name="line363">363: </a>      ep = LAPACKlamch_(<font color="#666666">"S"</font>);
-<a name="line364">364: </a>      <font color="#B22222">/* Compute eigenvalues of the block */</font>
-<a name="line365">365: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(M,&two,b,&two,&ep,&scal1,&scal2,&wr1,&wr2,&wi1));
-<a name="line366">366: </a>      <font color="#4169E1">if</font> (scal1<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
-<a name="line367">367: </a>      wr[k] = wr1/scal1;
-<a name="line368">368: </a>      <font color="#4169E1">if</font> (wi1==0.0) { <font color="#B22222">/* Real eigenvalues */</font>
-<a name="line369">369: </a>        <font color="#4169E1">if</font> (scal2<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
-<a name="line370">370: </a>        wr[k+1] = wr2/scal2;
-<a name="line371">371: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line372">372: </a>        wi[k] = 0.0;
-<a name="line373">373: </a>        wi[k+1] = 0.0;
-<a name="line374">374: </a><font color="#A020F0">#endif</font>
-<a name="line375">375: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* Complex eigenvalues */</font>
-<a name="line376">376: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line377">377: </a>        wr[k+1] = wr[k];
-<a name="line378">378: </a>        wi[k] = wi1/scal1;
-<a name="line379">379: </a>        wi[k+1] = -wi[k];
-<a name="line380">380: </a><font color="#A020F0">#else</font>
-<a name="line381">381: </a>        wr[k] += PETSC_i*wi1/scal1;
-<a name="line382">382: </a>        wr[k+1] = PetscConj(wr[k]);
+<a name="line349">349: </a>      e = 0.0;
+<a name="line350">350: </a>    }
+<a name="line351">351: </a>    <font color="#4169E1">if</font> (e==0.0) {
+<a name="line352">352: </a>      <font color="#B22222">/* real eigenvalue */</font>
+<a name="line353">353: </a>      wr[k] = (ds->compact)?T[k]/D[k]:A[k+k*ld]/B[k+k*ld];
+<a name="line354">354: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line355">355: </a>      wi[k] = 0.0 ;
+<a name="line356">356: </a><font color="#A020F0">#endif</font>
+<a name="line357">357: </a>    } <font color="#4169E1">else</font> {
+<a name="line358">358: </a>      <font color="#B22222">/* diagonal block */</font>
+<a name="line359">359: </a>      <font color="#4169E1">if</font> (ds->compact) {
+<a name="line360">360: </a>        s1 = D[k];
+<a name="line361">361: </a>        d1 = T[k];
+<a name="line362">362: </a>        s2 = D[k+1];
+<a name="line363">363: </a>        d2 = T[k+1];
+<a name="line364">364: </a>      } <font color="#4169E1">else</font> {
+<a name="line365">365: </a>        s1 = PetscRealPart(B[k*ld+k]);
+<a name="line366">366: </a>        d1 = PetscRealPart(A[k+k*ld]);
+<a name="line367">367: </a>        s2 = PetscRealPart(B[(k+1)*ld+k+1]);
+<a name="line368">368: </a>        d2 = PetscRealPart(A[k+1+(k+1)*ld]);
+<a name="line369">369: </a>      }
+<a name="line370">370: </a>      M[0] = d1; M[1] = e; M[2] = e; M[3]= d2;
+<a name="line371">371: </a>      b[0] = s1; b[1] = 0.0; b[2] = 0.0; b[3] = s2;
+<a name="line372">372: </a>      ep = LAPACKlamch_(<font color="#666666">"S"</font>);
+<a name="line373">373: </a>      <font color="#B22222">/* Compute eigenvalues of the block */</font>
+<a name="line374">374: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(M,&two,b,&two,&ep,&scal1,&scal2,&wr1,&wr2,&wi1));
+<a name="line375">375: </a>      <font color="#4169E1">if</font> (scal1<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
+<a name="line376">376: </a>      wr[k] = wr1/scal1;
+<a name="line377">377: </a>      <font color="#4169E1">if</font> (wi1==0.0) { <font color="#B22222">/* Real eigenvalues */</font>
+<a name="line378">378: </a>        <font color="#4169E1">if</font> (scal2<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
+<a name="line379">379: </a>        wr[k+1] = wr2/scal2;
+<a name="line380">380: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line381">381: </a>        wi[k] = 0.0;
+<a name="line382">382: </a>        wi[k+1] = 0.0;
 <a name="line383">383: </a><font color="#A020F0">#endif</font>
-<a name="line384">384: </a>      }
-<a name="line385">385: </a>      k++;
-<a name="line386">386: </a>    }
-<a name="line387">387: </a>  }
-<a name="line388">388: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line389">389: </a>  <font color="#4169E1">if</font> (wi) {
-<a name="line390">390: </a>    <font color="#4169E1">for</font> (k=n0;k<n1;k++) wi[k] = 0.0;
-<a name="line391">391: </a>  }
+<a name="line384">384: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* Complex eigenvalues */</font>
+<a name="line385">385: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line386">386: </a>        wr[k+1] = wr[k];
+<a name="line387">387: </a>        wi[k] = wi1/scal1;
+<a name="line388">388: </a>        wi[k+1] = -wi[k];
+<a name="line389">389: </a><font color="#A020F0">#else</font>
+<a name="line390">390: </a>        wr[k] += PETSC_i*wi1/scal1;
+<a name="line391">391: </a>        wr[k+1] = PetscConj(wr[k]);
 <a name="line392">392: </a><font color="#A020F0">#endif</font>
-<a name="line393">393: </a>  <font color="#4169E1">return</font>(0);
-<a name="line394">394: </a>}
-
-<a name="line398">398: </a><strong><font color="#4169E1"><a name="DSSort_GHIEP"></a>PetscErrorCode DSSort_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
-<a name="line399">399: </a>{
-<a name="line401">401: </a>  PetscInt       n,i,*perm;
-<a name="line402">402: </a>  PetscReal      *d,*e,*s;
-
-<a name="line405">405: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line407">407: </a><font color="#A020F0">#endif</font>
-<a name="line408">408: </a>  n = ds->n;
-<a name="line409">409: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line410">410: </a>  e = d + ds->ld;
-<a name="line411">411: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line412">412: </a>  DSAllocateWork_Private(ds,ds->ld,ds->ld,0);
-<a name="line413">413: </a>  perm = ds->perm;
-<a name="line414">414: </a>  <font color="#4169E1">if</font> (!rr) {
-<a name="line415">415: </a>    rr = wr;
-<a name="line416">416: </a>    ri = wi;
-<a name="line417">417: </a>  }
-<a name="line418">418: </a>  DSSortEigenvalues_Private(ds,rr,ri,perm,PETSC_TRUE);
-<a name="line419">419: </a>  <font color="#4169E1">if</font> (!ds->compact) { DSSwitchFormat_GHIEP(ds,PETSC_TRUE); }
-<a name="line420">420: </a>  PetscMemcpy(ds->work,wr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line421">421: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) wr[i] = *(ds->work+perm[i]);
-<a name="line422">422: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line423">423: </a>  PetscMemcpy(ds->work,wi,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line424">424: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) wi[i] = *(ds->work+perm[i]);
-<a name="line425">425: </a><font color="#A020F0">#endif</font>
-<a name="line426">426: </a>  PetscMemcpy(ds->rwork,s,n*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line427">427: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) s[i] = *(ds->rwork+perm[i]);
-<a name="line428">428: </a>  PetscMemcpy(ds->rwork,d,n*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line429">429: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) d[i] = *(ds->rwork+perm[i]);
-<a name="line430">430: </a>  PetscMemcpy(ds->rwork,e,(n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line431">431: </a>  PetscMemzero(e+ds->l,(n-1-ds->l)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line432">432: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n-1;i++) {
-<a name="line433">433: </a>    <font color="#4169E1">if</font> (perm[i]<n-1) e[i] = *(ds->rwork+perm[i]);
-<a name="line434">434: </a>  }
-<a name="line435">435: </a>  <font color="#4169E1">if</font> (!ds->compact) { DSSwitchFormat_GHIEP(ds,PETSC_FALSE); }
-<a name="line436">436: </a>  DSPermuteColumns_Private(ds,ds->l,n,DS_MAT_Q,perm);
-<a name="line437">437: </a>  <font color="#4169E1">return</font>(0);
-<a name="line438">438: </a>}
-
-
-<a name="line443">443: </a><font color="#B22222">/*</font>
-<a name="line444">444: </a><font color="#B22222">  Get eigenvectors with inverse iteration.</font>
-<a name="line445">445: </a><font color="#B22222">  The system matrix is in Hessenberg form.</font>
-<a name="line446">446: </a><font color="#B22222">*/</font>
-<a name="line447">447: </a><strong><font color="#4169E1"><a name="DSGHIEPInverseIteration"></a>PetscErrorCode DSGHIEPInverseIteration(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line448">448: </a>{
-<a name="line449">449: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_HSEIN)</font>
-<a name="line451">451: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"HSEIN - Lapack routine is unavailable"</font>);
-<a name="line452">452: </a><font color="#A020F0">#else</font>
-<a name="line454">454: </a>  PetscInt       i,off;
-<a name="line455">455: </a>  PetscBLASInt   *select,*infoC,ld,n1,mout,info;
-<a name="line456">456: </a>  PetscScalar    *A,*B,*H,*X;
-<a name="line457">457: </a>  PetscReal      *s,*d,*e;
-<a name="line458">458: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line459">459: </a>  PetscInt       j;
-<a name="line460">460: </a><font color="#A020F0">#endif</font>
-
-<a name="line463">463: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line464">464: </a>  PetscBLASIntCast(ds->n-ds->l,&n1);
-<a name="line465">465: </a>  DSAllocateWork_Private(ds,ld*ld+2*ld,ld,2*ld);
-<a name="line466">466: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
-<a name="line467">467: </a>  A = ds->mat[DS_MAT_A];
-<a name="line468">468: </a>  B = ds->mat[DS_MAT_B];
-<a name="line469">469: </a>  H = ds->mat[DS_MAT_W];
-<a name="line470">470: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line471">471: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line472">472: </a>  e = d + ld;
-<a name="line473">473: </a>  select = ds->iwork;
-<a name="line474">474: </a>  infoC = ds->iwork + ld;
-<a name="line475">475: </a>  off = ds->l+ds->l*ld;
-<a name="line476">476: </a>  <font color="#4169E1">if</font> (ds->compact) {
-<a name="line477">477: </a>    H[off] = d[ds->l]*s[ds->l];
-<a name="line478">478: </a>    H[off+ld] = e[ds->l]*s[ds->l];
-<a name="line479">479: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
-<a name="line480">480: </a>      H[i+(i-1)*ld] = e[i-1]*s[i];
-<a name="line481">481: </a>      H[i+i*ld] = d[i]*s[i];
-<a name="line482">482: </a>      H[i+(i+1)*ld] = e[i]*s[i];
-<a name="line483">483: </a>    }
-<a name="line484">484: </a>    H[ds->n-1+(ds->n-2)*ld] = e[ds->n-2]*s[ds->n-1];
-<a name="line485">485: </a>    H[ds->n-1+(ds->n-1)*ld] = d[ds->n-1]*s[ds->n-1];
-<a name="line486">486: </a>  } <font color="#4169E1">else</font> {
-<a name="line487">487: </a>    s[ds->l] = PetscRealPart(B[off]);
-<a name="line488">488: </a>    H[off] = A[off]*s[ds->l];
-<a name="line489">489: </a>    H[off+ld] = A[off+ld]*s[ds->l];
-<a name="line490">490: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
-<a name="line491">491: </a>      s[i] = PetscRealPart(B[i+i*ld]);
-<a name="line492">492: </a>      H[i+(i-1)*ld] = A[i+(i-1)*ld]*s[i];
-<a name="line493">493: </a>      H[i+i*ld]     = A[i+i*ld]*s[i];
-<a name="line494">494: </a>      H[i+(i+1)*ld] = A[i+(i+1)*ld]*s[i];
-<a name="line495">495: </a>    }
-<a name="line496">496: </a>    s[ds->n-1] = PetscRealPart(B[ds->n-1+(ds->n-1)*ld]);
-<a name="line497">497: </a>    H[ds->n-1+(ds->n-2)*ld] = A[ds->n-1+(ds->n-2)*ld]*s[ds->n-1];
-<a name="line498">498: </a>    H[ds->n-1+(ds->n-1)*ld] = A[ds->n-1+(ds->n-1)*ld]*s[ds->n-1];
-<a name="line499">499: </a>  }
-<a name="line500">500: </a>  DSAllocateMat_Private(ds,DS_MAT_X);
-<a name="line501">501: </a>  X = ds->mat[DS_MAT_X];
-<a name="line502">502: </a>  <font color="#4169E1">for</font> (i=0;i<n1;i++) select[i] = 1;
-<a name="line503">503: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line504">504: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhsein"</font>,LAPACKhsein_(<font color="#666666">"R"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,select,&n1,H+off,&ld,wr+ds->l,wi+ds->l,NULL,&ld,X+off,&ld,&n1,&mout,ds->work,NULL,infoC,&info));
-<a name="line505">505: </a><font color="#A020F0">#else</font>
-<a name="line506">506: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhsein"</font>,LAPACKhsein_(<font color="#666666">"R"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,select,&n1,H+off,&ld,wr+ds->l,NULL,&ld,X+off,&ld,&n1,&mout,ds->work,ds->rwork,NULL,infoC,&info));
-
-<a name="line508">508: </a>  <font color="#B22222">/* Separate real and imaginary part of complex eigenvectors */</font>
-<a name="line509">509: </a>  <font color="#4169E1">for</font> (j=ds->l;j<ds->n;j++) {
-<a name="line510">510: </a>    <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(wr[j])) > PetscAbsScalar(wr[j])*PETSC_SQRT_MACHINE_EPSILON) {
-<a name="line511">511: </a>      <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) {
-<a name="line512">512: </a>        X[i+(j+1)*ds->ld] = PetscImaginaryPart(X[i+j*ds->ld]);
-<a name="line513">513: </a>        X[i+j*ds->ld] = PetscRealPart(X[i+j*ds->ld]);
-<a name="line514">514: </a>      }
-<a name="line515">515: </a>      j++;
-<a name="line516">516: </a>    }
-<a name="line517">517: </a>  }
-<a name="line518">518: </a><font color="#A020F0">#endif</font>
-<a name="line519">519: </a>  <font color="#4169E1">if</font> (info<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in hsein routine %d"</font>,-i);
-<a name="line520">520: </a>  <font color="#4169E1">if</font> (info>0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Convergence error in hsein routine %d"</font>,i);
-<a name="line521">521: </a>  DSGHIEPOrthogEigenv(ds,DS_MAT_X,wr,wi,PETSC_TRUE);
-<a name="line522">522: </a>  <font color="#4169E1">return</font>(0);
-<a name="line523">523: </a><font color="#A020F0">#endif</font>
-<a name="line524">524: </a>}
-
-
-<a name="line529">529: </a><font color="#B22222">/*</font>
-<a name="line530">530: </a><font color="#B22222">   Undo 2x2 blocks that have real eigenvalues.</font>
-<a name="line531">531: </a><font color="#B22222">*/</font>
-<a name="line532">532: </a><strong><font color="#4169E1"><a name="DSGHIEPRealBlocks"></a>PetscErrorCode DSGHIEPRealBlocks(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line533">533: </a>{
-<a name="line535">535: </a>  PetscInt       i;
-<a name="line536">536: </a>  PetscReal      e,d1,d2,s1,s2,ss1,ss2,t,dd,ss;
-<a name="line537">537: </a>  PetscReal      maxy,ep,scal1,scal2,snorm;
-<a name="line538">538: </a>  PetscReal      *T,*D,b[4],M[4],wr1,wr2,wi;
-<a name="line539">539: </a>  PetscScalar    *A,*B,Y[4],oneS = 1.0,zeroS = 0.0;
-<a name="line540">540: </a>  PetscBLASInt   m,two=2,ld;
-<a name="line541">541: </a>  PetscBool      isreal;
-
-<a name="line544">544: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line545">545: </a>  PetscBLASIntCast(ds->n-ds->l,&m);
-<a name="line546">546: </a>  A = ds->mat[DS_MAT_A];
-<a name="line547">547: </a>  B = ds->mat[DS_MAT_B];
-<a name="line548">548: </a>  T = ds->rmat[DS_MAT_T];
-<a name="line549">549: </a>  D = ds->rmat[DS_MAT_D];
-<a name="line550">550: </a>  DSAllocateWork_Private(ds,2*m,0,0);
-<a name="line551">551: </a>  <font color="#4169E1">for</font> (i=ds->l;i<ds->n-1;i++) {
-<a name="line552">552: </a>    e = (ds->compact)?T[ld+i]:PetscRealPart(A[(i+1)+ld*i]);
-<a name="line553">553: </a>    <font color="#4169E1">if</font> (e != 0.0) { <font color="#B22222">/* 2x2 block */</font>
-<a name="line554">554: </a>      <font color="#4169E1">if</font> (ds->compact) {
-<a name="line555">555: </a>        s1 = D[i];
-<a name="line556">556: </a>        d1 = T[i];
-<a name="line557">557: </a>        s2 = D[i+1];
-<a name="line558">558: </a>        d2 = T[i+1];
-<a name="line559">559: </a>      } <font color="#4169E1">else</font> {
-<a name="line560">560: </a>        s1 = PetscRealPart(B[i*ld+i]);
-<a name="line561">561: </a>        d1 = PetscRealPart(A[i*ld+i]);
-<a name="line562">562: </a>        s2 = PetscRealPart(B[(i+1)*ld+i+1]);
-<a name="line563">563: </a>        d2 = PetscRealPart(A[(i+1)*ld+i+1]);
-<a name="line564">564: </a>      }
-<a name="line565">565: </a>      isreal = PETSC_FALSE;
-<a name="line566">566: </a>      <font color="#4169E1">if</font> (s1==s2) { <font color="#B22222">/* apply a Jacobi rotation to compute the eigendecomposition */</font>
-<a name="line567">567: </a>        dd = d1-d2;
-<a name="line568">568: </a>        <font color="#4169E1">if</font> (2*PetscAbsReal(e) <= dd) {
-<a name="line569">569: </a>          t = 2*e/dd;
-<a name="line570">570: </a>          t = t/(1 + PetscSqrtReal(1+t*t));
-<a name="line571">571: </a>        } <font color="#4169E1">else</font> {
-<a name="line572">572: </a>          t = dd/(2*e);
-<a name="line573">573: </a>          ss = (t>=0)?1.0:-1.0;
-<a name="line574">574: </a>          t = ss/(PetscAbsReal(t)+PetscSqrtReal(1+t*t));
-<a name="line575">575: </a>        }
-<a name="line576">576: </a>        Y[0] = 1/PetscSqrtReal(1 + t*t); Y[3] = Y[0]; <font color="#B22222">/* c */</font>
-<a name="line577">577: </a>        Y[1] = Y[0]*t; Y[2] = -Y[1]; <font color="#B22222">/* s */</font>
-<a name="line578">578: </a>        wr1 = d1+t*e;
-<a name="line579">579: </a>        wr2 = d2-t*e;
-<a name="line580">580: </a>        ss1 = s1; ss2 = s2;
-<a name="line581">581: </a>        isreal = PETSC_TRUE;
-<a name="line582">582: </a>      } <font color="#4169E1">else</font> {
-<a name="line583">583: </a>        ss1 = 1.0; ss2 = 1.0,
-<a name="line584">584: </a>        M[0] = d1; M[1] = e; M[2] = e; M[3]= d2;
-<a name="line585">585: </a>        b[0] = s1; b[1] = 0.0; b[2] = 0.0; b[3] = s2;
-<a name="line586">586: </a>        ep = LAPACKlamch_(<font color="#666666">"S"</font>);
-
-<a name="line588">588: </a>        <font color="#B22222">/* Compute eigenvalues of the block */</font>
-<a name="line589">589: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(M,&two,b,&two,&ep,&scal1,&scal2,&wr1,&wr2,&wi));
-<a name="line590">590: </a>        <font color="#4169E1">if</font> (wi==0.0) { <font color="#B22222">/* Real eigenvalues */</font>
-<a name="line591">591: </a>          isreal = PETSC_TRUE;
-<a name="line592">592: </a>          <font color="#4169E1">if</font> (scal1<ep||scal2<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
-<a name="line593">593: </a>          wr1 /= scal1; wr2 /= scal2;
-<a name="line594">594: </a>          <font color="#4169E1">if</font> (PetscAbsReal(s1*d1-wr1)<PetscAbsReal(s2*d2-wr1)) {
-<a name="line595">595: </a>            Y[0] = wr1-s2*d2;
-<a name="line596">596: </a>            Y[1] = s2*e;
-<a name="line597">597: </a>          } <font color="#4169E1">else</font> {
-<a name="line598">598: </a>            Y[0] = s1*e;
-<a name="line599">599: </a>            Y[1] = wr1-s1*d1;
-<a name="line600">600: </a>          }
-<a name="line601">601: </a>          <font color="#B22222">/* normalize with a signature*/</font>
-<a name="line602">602: </a>          maxy = PetscMax(PetscAbsScalar(Y[0]),PetscAbsScalar(Y[1]));
-<a name="line603">603: </a>          scal1 = PetscRealPart(Y[0])/maxy; scal2 = PetscRealPart(Y[1])/maxy;
-<a name="line604">604: </a>          snorm = scal1*scal1*s1 + scal2*scal2*s2;
-<a name="line605">605: </a>          <font color="#4169E1">if</font> (snorm<0) { ss1 = -1.0; snorm = -snorm; }
-<a name="line606">606: </a>          snorm = maxy*PetscSqrtReal(snorm); Y[0] = Y[0]/snorm; Y[1] = Y[1]/snorm;
-<a name="line607">607: </a>          <font color="#4169E1">if</font> (PetscAbsReal(s1*d1-wr2)<PetscAbsReal(s2*d2-wr2)) {
-<a name="line608">608: </a>            Y[2] = wr2-s2*d2;
-<a name="line609">609: </a>            Y[3] = s2*e;
-<a name="line610">610: </a>          } <font color="#4169E1">else</font> {
-<a name="line611">611: </a>            Y[2] = s1*e;
-<a name="line612">612: </a>            Y[3] = wr2-s1*d1;
-<a name="line613">613: </a>          }
-<a name="line614">614: </a>          maxy = PetscMax(PetscAbsScalar(Y[2]),PetscAbsScalar(Y[3]));
-<a name="line615">615: </a>          scal1 = PetscRealPart(Y[2])/maxy; scal2 = PetscRealPart(Y[3])/maxy;
-<a name="line616">616: </a>          snorm = scal1*scal1*s1 + scal2*scal2*s2;
-<a name="line617">617: </a>          <font color="#4169E1">if</font> (snorm<0) { ss2 = -1.0; snorm = -snorm; }
-<a name="line618">618: </a>          snorm = maxy*PetscSqrtReal(snorm);Y[2] = Y[2]/snorm; Y[3] = Y[3]/snorm;
-<a name="line619">619: </a>        }
-<a name="line620">620: </a>        wr1 *= ss1; wr2 *= ss2;
-<a name="line621">621: </a>      }
-<a name="line622">622: </a>      <font color="#4169E1">if</font> (isreal) {
-<a name="line623">623: </a>        <font color="#4169E1">if</font> (ds->compact) {
-<a name="line624">624: </a>          D[i] = ss1;
-<a name="line625">625: </a>          T[i] = wr1;
-<a name="line626">626: </a>          D[i+1] = ss2;
-<a name="line627">627: </a>          T[i+1] = wr2;
-<a name="line628">628: </a>          T[ld+i] = 0.0;
-<a name="line629">629: </a>        } <font color="#4169E1">else</font> {
-<a name="line630">630: </a>          B[i*ld+i] = ss1;
-<a name="line631">631: </a>          A[i*ld+i] = wr1;
-<a name="line632">632: </a>          B[(i+1)*ld+i+1] = ss2;
-<a name="line633">633: </a>          A[(i+1)*ld+i+1] = wr2;
-<a name="line634">634: </a>          A[(i+1)+ld*i] = 0.0;
-<a name="line635">635: </a>          A[i+ld*(i+1)] = 0.0;
-<a name="line636">636: </a>        }
-<a name="line637">637: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&two,&two,&oneS,ds->mat[DS_MAT_Q]+ds->l+i*ld,&ld,Y,&two,&zeroS,ds->work,&m));
-<a name="line638">638: </a>        PetscMemcpy(ds->mat[DS_MAT_Q]+ds->l+i*ld,ds->work,m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line639">639: </a>        PetscMemcpy(ds->mat[DS_MAT_Q]+ds->l+(i+1)*ld,ds->work+m,m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line640">640: </a>      }
-<a name="line641">641: </a>      i++;
-<a name="line642">642: </a>    }
-<a name="line643">643: </a>  }
-<a name="line644">644: </a>  <font color="#4169E1">return</font>(0);
-<a name="line645">645: </a>}
-
-<a name="line649">649: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_QR_II"></a>PetscErrorCode DSSolve_GHIEP_QR_II(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line650">650: </a>{
-<a name="line651">651: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_HSEQR)</font>
-<a name="line653">653: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"HSEQR - Lapack routine is unavailable"</font>);
-<a name="line654">654: </a><font color="#A020F0">#else</font>
-<a name="line656">656: </a>  PetscInt       i,off;
-<a name="line657">657: </a>  PetscBLASInt   n1,ld,one,info,lwork;
-<a name="line658">658: </a>  PetscScalar    *H,*A,*B,*Q;
-<a name="line659">659: </a>  PetscReal      *d,*e,*s;
-<a name="line660">660: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line661">661: </a>  PetscInt       j;
-<a name="line662">662: </a><font color="#A020F0">#endif</font>
-
-<a name="line665">665: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line667">667: </a><font color="#A020F0">#endif</font>
-<a name="line668">668: </a>  one = 1;
-<a name="line669">669: </a>  PetscBLASIntCast(ds->n-ds->l,&n1);
-<a name="line670">670: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line671">671: </a>  off = ds->l + ds->l*ld;
-<a name="line672">672: </a>  A = ds->mat[DS_MAT_A];
-<a name="line673">673: </a>  B = ds->mat[DS_MAT_B];
-<a name="line674">674: </a>  Q = ds->mat[DS_MAT_Q];
-<a name="line675">675: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line676">676: </a>  e = ds->rmat[DS_MAT_T] + ld;
-<a name="line677">677: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line678">678: </a>  DSAllocateWork_Private(ds,ld*ld,2*ld,ld*2);
-<a name="line679">679: </a>  lwork = ld*ld;
-
-<a name="line681">681: </a>  <font color="#B22222">/* Quick return if possible */</font>
-<a name="line682">682: </a>  <font color="#4169E1">if</font> (n1 == 1) {
-<a name="line683">683: </a>    *(Q+off) = 1;
-<a name="line684">684: </a>    <font color="#4169E1">if</font> (!ds->compact) {
-<a name="line685">685: </a>      d[ds->l] = PetscRealPart(A[off]);
-<a name="line686">686: </a>      s[ds->l] = PetscRealPart(B[off]);
-<a name="line687">687: </a>    }
-<a name="line688">688: </a>    wr[ds->l] = d[ds->l]/s[ds->l];
-<a name="line689">689: </a>    <font color="#4169E1">if</font> (wi) wi[ds->l] = 0.0;
-<a name="line690">690: </a>    <font color="#4169E1">return</font>(0);
-<a name="line691">691: </a>  }
-<a name="line692">692: </a>  <font color="#B22222">/* Reduce to pseudotriadiagonal form */</font>
-<a name="line693">693: </a>  DSIntermediate_GHIEP(ds);
-
-<a name="line695">695: </a>  <font color="#B22222">/* Compute Eigenvalues (QR)*/</font>
-<a name="line696">696: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
-<a name="line697">697: </a>  H = ds->mat[DS_MAT_W];
-<a name="line698">698: </a>  <font color="#4169E1">if</font> (ds->compact) {
-<a name="line699">699: </a>    H[off] = d[ds->l]*s[ds->l];
-<a name="line700">700: </a>    H[off+ld] = e[ds->l]*s[ds->l];
-<a name="line701">701: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
-<a name="line702">702: </a>      H[i+(i-1)*ld] = e[i-1]*s[i];
-<a name="line703">703: </a>      H[i+i*ld]     = d[i]*s[i];
-<a name="line704">704: </a>      H[i+(i+1)*ld] = e[i]*s[i];
-<a name="line705">705: </a>    }
-<a name="line706">706: </a>    H[ds->n-1+(ds->n-2)*ld] = e[ds->n-2]*s[ds->n-1];
-<a name="line707">707: </a>    H[ds->n-1+(ds->n-1)*ld] = d[ds->n-1]*s[ds->n-1];
-<a name="line708">708: </a>  } <font color="#4169E1">else</font> {
-<a name="line709">709: </a>    s[ds->l] = PetscRealPart(B[off]);
-<a name="line710">710: </a>    H[off] = A[off]*s[ds->l];
-<a name="line711">711: </a>    H[off+ld] = A[off+ld]*s[ds->l];
-<a name="line712">712: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
-<a name="line713">713: </a>      s[i] = PetscRealPart(B[i+i*ld]);
-<a name="line714">714: </a>      H[i+(i-1)*ld] = A[i+(i-1)*ld]*s[i];
-<a name="line715">715: </a>      H[i+i*ld]     = A[i+i*ld]*s[i];
-<a name="line716">716: </a>      H[i+(i+1)*ld] = A[i+(i+1)*ld]*s[i];
-<a name="line717">717: </a>    }
-<a name="line718">718: </a>    s[ds->n-1] = PetscRealPart(B[ds->n-1+(ds->n-1)*ld]);
-<a name="line719">719: </a>    H[ds->n-1+(ds->n-2)*ld] = A[ds->n-1+(ds->n-2)*ld]*s[ds->n-1];
-<a name="line720">720: </a>    H[ds->n-1+(ds->n-1)*ld] = A[ds->n-1+(ds->n-1)*ld]*s[ds->n-1];
-<a name="line721">721: </a>  }
-
-<a name="line723">723: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line724">724: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"E"</font>,<font color="#666666">"N"</font>,&n1,&one,&n1,H+off,&ld,wr+ds->l,wi+ds->l,NULL,&ld,ds->work,&lwork,&info));
-<a name="line725">725: </a><font color="#A020F0">#else</font>
-<a name="line726">726: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"E"</font>,<font color="#666666">"N"</font>,&n1,&one,&n1,H+off,&ld,wr+ds->l,NULL,&ld,ds->work,&lwork,&info));
-
-<a name="line728">728: </a>  <font color="#B22222">/* Sort to have consecutive conjugate pairs */</font>
-<a name="line729">729: </a>  <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) {
-<a name="line730">730: </a>      j=i+1;
-<a name="line731">731: </a>      <font color="#4169E1">while</font> (j<ds->n && (PetscAbsScalar(wr[i]-PetscConj(wr[j]))>PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON)) j++;
-<a name="line732">732: </a>      <font color="#4169E1">if</font> (j==ds->n) {
-<a name="line733">733: </a>        <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(wr[i]))<PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON) wr[i]=PetscRealPart(wr[i]);
-<a name="line734">734: </a>        <font color="#4169E1">else</font> SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Found complex without conjugate pair"</font>);
-<a name="line735">735: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* complex eigenvalue */</font>
-<a name="line736">736: </a>        wr[j] = wr[i+1];
-<a name="line737">737: </a>        <font color="#4169E1">if</font> (PetscImaginaryPart(wr[i])<0) wr[i] = PetscConj(wr[i]);
-<a name="line738">738: </a>        wr[i+1] = PetscConj(wr[i]);
-<a name="line739">739: </a>        i++;
-<a name="line740">740: </a>      }
-<a name="line741">741: </a>  }
-<a name="line742">742: </a><font color="#A020F0">#endif</font>
-<a name="line743">743: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xHSEQR %d"</font>,&info);
-<a name="line744">744: </a>  <font color="#B22222">/* Compute Eigenvectors with Inverse Iteration */</font>
-<a name="line745">745: </a>  DSGHIEPInverseIteration(ds,wr,wi);
-
-<a name="line747">747: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
-<a name="line748">748: </a>  DSGHIEPComplexEigs(ds,0,ds->l,wr,wi);
-<a name="line749">749: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line750">750: </a>  <font color="#4169E1">if</font> (wi) {
-<a name="line751">751: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
-<a name="line752">752: </a>  }
-<a name="line753">753: </a><font color="#A020F0">#endif</font>
-<a name="line754">754: </a>  <font color="#4169E1">return</font>(0);
-<a name="line755">755: </a><font color="#A020F0">#endif</font>
-<a name="line756">756: </a>}
-
-<a name="line760">760: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_QR"></a>PetscErrorCode DSSolve_GHIEP_QR(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line761">761: </a>{
-<a name="line762">762: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GEEVX)</font>
-<a name="line764">764: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEEVX - Lapack routine is unavailable"</font>);
-<a name="line765">765: </a><font color="#A020F0">#else</font>
-<a name="line767">767: </a>  PetscInt       i,off,nwu=0,n,lw,lwr,nwru=0;
-<a name="line768">768: </a>  PetscBLASInt   n_,ld,info,lwork,ilo,ihi;
-<a name="line769">769: </a>  PetscScalar    *H,*A,*B,*Q,*X;
-<a name="line770">770: </a>  PetscReal      *d,*s,*scale,nrm,*rcde,*rcdv;
-<a name="line771">771: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line772">772: </a>  PetscInt       j,k;
-<a name="line773">773: </a><font color="#A020F0">#endif</font>
-
-<a name="line776">776: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line778">778: </a><font color="#A020F0">#endif</font>
-<a name="line779">779: </a>  n = ds->n-ds->l;
-<a name="line780">780: </a>  PetscBLASIntCast(n,&n_);
-<a name="line781">781: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line782">782: </a>  off = ds->l + ds->l*ld;
-<a name="line783">783: </a>  A = ds->mat[DS_MAT_A];
-<a name="line784">784: </a>  B = ds->mat[DS_MAT_B];
-<a name="line785">785: </a>  Q = ds->mat[DS_MAT_Q];
-<a name="line786">786: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line787">787: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line788">788: </a>  lw = 14*ld+ld*ld;
-<a name="line789">789: </a>  lwr = 7*ld;
-<a name="line790">790: </a>  DSAllocateWork_Private(ds,lw,lwr,0);
-<a name="line791">791: </a>  scale = ds->rwork+nwru;
-<a name="line792">792: </a>  nwru += ld;
-<a name="line793">793: </a>  rcde = ds->rwork+nwru;
-<a name="line794">794: </a>  nwru += ld;
-<a name="line795">795: </a>  rcdv = ds->rwork+nwru;
-<a name="line796">796: </a>  nwru += ld;
-<a name="line797">797: </a>  <font color="#B22222">/* Quick return if possible */</font>
-<a name="line798">798: </a>  <font color="#4169E1">if</font> (n_ == 1) {
-<a name="line799">799: </a>    *(Q+off) = 1;
-<a name="line800">800: </a>    <font color="#4169E1">if</font> (!ds->compact) {
-<a name="line801">801: </a>      d[ds->l] = PetscRealPart(A[off]);
-<a name="line802">802: </a>      s[ds->l] = PetscRealPart(B[off]);
-<a name="line803">803: </a>    }
-<a name="line804">804: </a>    wr[ds->l] = d[ds->l]/s[ds->l];
-<a name="line805">805: </a>    <font color="#4169E1">if</font> (wi) wi[ds->l] = 0.0;
-<a name="line806">806: </a>    <font color="#4169E1">return</font>(0);
-<a name="line807">807: </a>  }
-
-<a name="line809">809: </a>  <font color="#B22222">/* Form pseudo-symmetric matrix */</font>
-<a name="line810">810: </a>  H =  ds->work+nwu;
-<a name="line811">811: </a>  nwu += n*n;
-<a name="line812">812: </a>  PetscMemzero(H,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line813">813: </a>  <font color="#4169E1">if</font> (ds->compact) {
-<a name="line814">814: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line815">815: </a>      H[i+i*n]     = s[ds->l+i]*d[ds->l+i];
-<a name="line816">816: </a>      H[i+1+i*n]   = s[ds->l+i+1]*d[ld+ds->l+i];
-<a name="line817">817: </a>      H[i+(i+1)*n] = s[ds->l+i]*d[ld+ds->l+i];
+<a name="line393">393: </a>      }
+<a name="line394">394: </a>      k++;
+<a name="line395">395: </a>    }
+<a name="line396">396: </a>  }
+<a name="line397">397: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line398">398: </a>  <font color="#4169E1">if</font> (wi) {
+<a name="line399">399: </a>    <font color="#4169E1">for</font> (k=n0;k<n1;k++) wi[k] = 0.0;
+<a name="line400">400: </a>  }
+<a name="line401">401: </a><font color="#A020F0">#endif</font>
+<a name="line402">402: </a>  <font color="#4169E1">return</font>(0);
+<a name="line403">403: </a><font color="#A020F0">#endif</font>
+<a name="line404">404: </a>}
+
+<a name="line408">408: </a><strong><font color="#4169E1"><a name="DSSort_GHIEP"></a>PetscErrorCode DSSort_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line409">409: </a>{
+<a name="line411">411: </a>  PetscInt       n,i,*perm;
+<a name="line412">412: </a>  PetscReal      *d,*e,*s;
+
+<a name="line415">415: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line417">417: </a><font color="#A020F0">#endif</font>
+<a name="line418">418: </a>  n = ds->n;
+<a name="line419">419: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line420">420: </a>  e = d + ds->ld;
+<a name="line421">421: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line422">422: </a>  DSAllocateWork_Private(ds,ds->ld,ds->ld,0);
+<a name="line423">423: </a>  perm = ds->perm;
+<a name="line424">424: </a>  <font color="#4169E1">if</font> (!rr) {
+<a name="line425">425: </a>    rr = wr;
+<a name="line426">426: </a>    ri = wi;
+<a name="line427">427: </a>  }
+<a name="line428">428: </a>  DSSortEigenvalues_Private(ds,rr,ri,perm,PETSC_TRUE);
+<a name="line429">429: </a>  <font color="#4169E1">if</font> (!ds->compact) { DSSwitchFormat_GHIEP(ds,PETSC_TRUE); }
+<a name="line430">430: </a>  PetscMemcpy(ds->work,wr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line431">431: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) wr[i] = *(ds->work+perm[i]);
+<a name="line432">432: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line433">433: </a>  PetscMemcpy(ds->work,wi,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line434">434: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) wi[i] = *(ds->work+perm[i]);
+<a name="line435">435: </a><font color="#A020F0">#endif</font>
+<a name="line436">436: </a>  PetscMemcpy(ds->rwork,s,n*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line437">437: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) s[i] = *(ds->rwork+perm[i]);
+<a name="line438">438: </a>  PetscMemcpy(ds->rwork,d,n*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line439">439: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n;i++) d[i] = *(ds->rwork+perm[i]);
+<a name="line440">440: </a>  PetscMemcpy(ds->rwork,e,(n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line441">441: </a>  PetscMemzero(e+ds->l,(n-1-ds->l)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line442">442: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n-1;i++) {
+<a name="line443">443: </a>    <font color="#4169E1">if</font> (perm[i]<n-1) e[i] = *(ds->rwork+perm[i]);
+<a name="line444">444: </a>  }
+<a name="line445">445: </a>  <font color="#4169E1">if</font> (!ds->compact) { DSSwitchFormat_GHIEP(ds,PETSC_FALSE); }
+<a name="line446">446: </a>  DSPermuteColumns_Private(ds,ds->l,n,DS_MAT_Q,perm);
+<a name="line447">447: </a>  <font color="#4169E1">return</font>(0);
+<a name="line448">448: </a>}
+
+
+<a name="line453">453: </a><font color="#B22222">/*</font>
+<a name="line454">454: </a><font color="#B22222">  Get eigenvectors with inverse iteration.</font>
+<a name="line455">455: </a><font color="#B22222">  The system matrix is in Hessenberg form.</font>
+<a name="line456">456: </a><font color="#B22222">*/</font>
+<a name="line457">457: </a><strong><font color="#4169E1"><a name="DSGHIEPInverseIteration"></a>PetscErrorCode DSGHIEPInverseIteration(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line458">458: </a>{
+<a name="line459">459: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_HSEIN)</font>
+<a name="line461">461: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"HSEIN - Lapack routine is unavailable"</font>);
+<a name="line462">462: </a><font color="#A020F0">#else</font>
+<a name="line464">464: </a>  PetscInt       i,off;
+<a name="line465">465: </a>  PetscBLASInt   *select,*infoC,ld,n1,mout,info;
+<a name="line466">466: </a>  PetscScalar    *A,*B,*H,*X;
+<a name="line467">467: </a>  PetscReal      *s,*d,*e;
+<a name="line468">468: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line469">469: </a>  PetscInt       j;
+<a name="line470">470: </a><font color="#A020F0">#endif</font>
+
+<a name="line473">473: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line474">474: </a>  PetscBLASIntCast(ds->n-ds->l,&n1);
+<a name="line475">475: </a>  DSAllocateWork_Private(ds,ld*ld+2*ld,ld,2*ld);
+<a name="line476">476: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line477">477: </a>  A = ds->mat[DS_MAT_A];
+<a name="line478">478: </a>  B = ds->mat[DS_MAT_B];
+<a name="line479">479: </a>  H = ds->mat[DS_MAT_W];
+<a name="line480">480: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line481">481: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line482">482: </a>  e = d + ld;
+<a name="line483">483: </a>  select = ds->iwork;
+<a name="line484">484: </a>  infoC = ds->iwork + ld;
+<a name="line485">485: </a>  off = ds->l+ds->l*ld;
+<a name="line486">486: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line487">487: </a>    H[off] = d[ds->l]*s[ds->l];
+<a name="line488">488: </a>    H[off+ld] = e[ds->l]*s[ds->l];
+<a name="line489">489: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
+<a name="line490">490: </a>      H[i+(i-1)*ld] = e[i-1]*s[i];
+<a name="line491">491: </a>      H[i+i*ld] = d[i]*s[i];
+<a name="line492">492: </a>      H[i+(i+1)*ld] = e[i]*s[i];
+<a name="line493">493: </a>    }
+<a name="line494">494: </a>    H[ds->n-1+(ds->n-2)*ld] = e[ds->n-2]*s[ds->n-1];
+<a name="line495">495: </a>    H[ds->n-1+(ds->n-1)*ld] = d[ds->n-1]*s[ds->n-1];
+<a name="line496">496: </a>  } <font color="#4169E1">else</font> {
+<a name="line497">497: </a>    s[ds->l] = PetscRealPart(B[off]);
+<a name="line498">498: </a>    H[off] = A[off]*s[ds->l];
+<a name="line499">499: </a>    H[off+ld] = A[off+ld]*s[ds->l];
+<a name="line500">500: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
+<a name="line501">501: </a>      s[i] = PetscRealPart(B[i+i*ld]);
+<a name="line502">502: </a>      H[i+(i-1)*ld] = A[i+(i-1)*ld]*s[i];
+<a name="line503">503: </a>      H[i+i*ld]     = A[i+i*ld]*s[i];
+<a name="line504">504: </a>      H[i+(i+1)*ld] = A[i+(i+1)*ld]*s[i];
+<a name="line505">505: </a>    }
+<a name="line506">506: </a>    s[ds->n-1] = PetscRealPart(B[ds->n-1+(ds->n-1)*ld]);
+<a name="line507">507: </a>    H[ds->n-1+(ds->n-2)*ld] = A[ds->n-1+(ds->n-2)*ld]*s[ds->n-1];
+<a name="line508">508: </a>    H[ds->n-1+(ds->n-1)*ld] = A[ds->n-1+(ds->n-1)*ld]*s[ds->n-1];
+<a name="line509">509: </a>  }
+<a name="line510">510: </a>  DSAllocateMat_Private(ds,DS_MAT_X);
+<a name="line511">511: </a>  X = ds->mat[DS_MAT_X];
+<a name="line512">512: </a>  <font color="#4169E1">for</font> (i=0;i<n1;i++) select[i] = 1;
+<a name="line513">513: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line514">514: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhsein"</font>,LAPACKhsein_(<font color="#666666">"R"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,select,&n1,H+off,&ld,wr+ds->l,wi+ds->l,NULL,&ld,X+off,&ld,&n1,&mout,ds->work,NULL,infoC,&info));
+<a name="line515">515: </a><font color="#A020F0">#else</font>
+<a name="line516">516: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhsein"</font>,LAPACKhsein_(<font color="#666666">"R"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,select,&n1,H+off,&ld,wr+ds->l,NULL,&ld,X+off,&ld,&n1,&mout,ds->work,ds->rwork,NULL,infoC,&info));
+
+<a name="line518">518: </a>  <font color="#B22222">/* Separate real and imaginary part of complex eigenvectors */</font>
+<a name="line519">519: </a>  <font color="#4169E1">for</font> (j=ds->l;j<ds->n;j++) {
+<a name="line520">520: </a>    <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(wr[j])) > PetscAbsScalar(wr[j])*PETSC_SQRT_MACHINE_EPSILON) {
+<a name="line521">521: </a>      <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) {
+<a name="line522">522: </a>        X[i+(j+1)*ds->ld] = PetscImaginaryPart(X[i+j*ds->ld]);
+<a name="line523">523: </a>        X[i+j*ds->ld] = PetscRealPart(X[i+j*ds->ld]);
+<a name="line524">524: </a>      }
+<a name="line525">525: </a>      j++;
+<a name="line526">526: </a>    }
+<a name="line527">527: </a>  }
+<a name="line528">528: </a><font color="#A020F0">#endif</font>
+<a name="line529">529: </a>  <font color="#4169E1">if</font> (info<0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in hsein routine %D"</font>,-i);
+<a name="line530">530: </a>  <font color="#4169E1">if</font> (info>0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Convergence error in hsein routine %D"</font>,i);
+<a name="line531">531: </a>  DSGHIEPOrthogEigenv(ds,DS_MAT_X,wr,wi,PETSC_TRUE);
+<a name="line532">532: </a>  <font color="#4169E1">return</font>(0);
+<a name="line533">533: </a><font color="#A020F0">#endif</font>
+<a name="line534">534: </a>}
+
+
+<a name="line539">539: </a><font color="#B22222">/*</font>
+<a name="line540">540: </a><font color="#B22222">   Undo 2x2 blocks that have real eigenvalues.</font>
+<a name="line541">541: </a><font color="#B22222">*/</font>
+<a name="line542">542: </a><strong><font color="#4169E1"><a name="DSGHIEPRealBlocks"></a>PetscErrorCode DSGHIEPRealBlocks(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line543">543: </a>{
+<a name="line544">544: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LAG2)</font>
+<a name="line546">546: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LAG2 - Lapack routine is unavailable"</font>);
+<a name="line547">547: </a><font color="#A020F0">#else</font>
+<a name="line549">549: </a>  PetscInt       i;
+<a name="line550">550: </a>  PetscReal      e,d1,d2,s1,s2,ss1,ss2,t,dd,ss;
+<a name="line551">551: </a>  PetscReal      maxy,ep,scal1,scal2,snorm;
+<a name="line552">552: </a>  PetscReal      *T,*D,b[4],M[4],wr1,wr2,wi;
+<a name="line553">553: </a>  PetscScalar    *A,*B,Y[4],oneS = 1.0,zeroS = 0.0;
+<a name="line554">554: </a>  PetscBLASInt   m,two=2,ld;
+<a name="line555">555: </a>  PetscBool      isreal;
+
+<a name="line558">558: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line559">559: </a>  PetscBLASIntCast(ds->n-ds->l,&m);
+<a name="line560">560: </a>  A = ds->mat[DS_MAT_A];
+<a name="line561">561: </a>  B = ds->mat[DS_MAT_B];
+<a name="line562">562: </a>  T = ds->rmat[DS_MAT_T];
+<a name="line563">563: </a>  D = ds->rmat[DS_MAT_D];
+<a name="line564">564: </a>  DSAllocateWork_Private(ds,2*m,0,0);
+<a name="line565">565: </a>  <font color="#4169E1">for</font> (i=ds->l;i<ds->n-1;i++) {
+<a name="line566">566: </a>    e = (ds->compact)?T[ld+i]:PetscRealPart(A[(i+1)+ld*i]);
+<a name="line567">567: </a>    <font color="#4169E1">if</font> (e != 0.0) { <font color="#B22222">/* 2x2 block */</font>
+<a name="line568">568: </a>      <font color="#4169E1">if</font> (ds->compact) {
+<a name="line569">569: </a>        s1 = D[i];
+<a name="line570">570: </a>        d1 = T[i];
+<a name="line571">571: </a>        s2 = D[i+1];
+<a name="line572">572: </a>        d2 = T[i+1];
+<a name="line573">573: </a>      } <font color="#4169E1">else</font> {
+<a name="line574">574: </a>        s1 = PetscRealPart(B[i*ld+i]);
+<a name="line575">575: </a>        d1 = PetscRealPart(A[i*ld+i]);
+<a name="line576">576: </a>        s2 = PetscRealPart(B[(i+1)*ld+i+1]);
+<a name="line577">577: </a>        d2 = PetscRealPart(A[(i+1)*ld+i+1]);
+<a name="line578">578: </a>      }
+<a name="line579">579: </a>      isreal = PETSC_FALSE;
+<a name="line580">580: </a>      <font color="#4169E1">if</font> (s1==s2) { <font color="#B22222">/* apply a Jacobi rotation to compute the eigendecomposition */</font>
+<a name="line581">581: </a>        dd = d1-d2;
+<a name="line582">582: </a>        <font color="#4169E1">if</font> (2*PetscAbsReal(e) <= dd) {
+<a name="line583">583: </a>          t = 2*e/dd;
+<a name="line584">584: </a>          t = t/(1 + PetscSqrtReal(1+t*t));
+<a name="line585">585: </a>        } <font color="#4169E1">else</font> {
+<a name="line586">586: </a>          t = dd/(2*e);
+<a name="line587">587: </a>          ss = (t>=0)?1.0:-1.0;
+<a name="line588">588: </a>          t = ss/(PetscAbsReal(t)+PetscSqrtReal(1+t*t));
+<a name="line589">589: </a>        }
+<a name="line590">590: </a>        Y[0] = 1/PetscSqrtReal(1 + t*t); Y[3] = Y[0]; <font color="#B22222">/* c */</font>
+<a name="line591">591: </a>        Y[1] = Y[0]*t; Y[2] = -Y[1]; <font color="#B22222">/* s */</font>
+<a name="line592">592: </a>        wr1 = d1+t*e;
+<a name="line593">593: </a>        wr2 = d2-t*e;
+<a name="line594">594: </a>        ss1 = s1; ss2 = s2;
+<a name="line595">595: </a>        isreal = PETSC_TRUE;
+<a name="line596">596: </a>      } <font color="#4169E1">else</font> {
+<a name="line597">597: </a>        ss1 = 1.0; ss2 = 1.0,
+<a name="line598">598: </a>        M[0] = d1; M[1] = e; M[2] = e; M[3]= d2;
+<a name="line599">599: </a>        b[0] = s1; b[1] = 0.0; b[2] = 0.0; b[3] = s2;
+<a name="line600">600: </a>        ep = LAPACKlamch_(<font color="#666666">"S"</font>);
+
+<a name="line602">602: </a>        <font color="#B22222">/* Compute eigenvalues of the block */</font>
+<a name="line603">603: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(M,&two,b,&two,&ep,&scal1,&scal2,&wr1,&wr2,&wi));
+<a name="line604">604: </a>        <font color="#4169E1">if</font> (wi==0.0) { <font color="#B22222">/* Real eigenvalues */</font>
+<a name="line605">605: </a>          isreal = PETSC_TRUE;
+<a name="line606">606: </a>          <font color="#4169E1">if</font> (scal1<ep||scal2<ep) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,<font color="#666666">"Nearly infinite eigenvalue"</font>);
+<a name="line607">607: </a>          wr1 /= scal1; wr2 /= scal2;
+<a name="line608">608: </a>          <font color="#4169E1">if</font> (PetscAbsReal(s1*d1-wr1)<PetscAbsReal(s2*d2-wr1)) {
+<a name="line609">609: </a>            Y[0] = wr1-s2*d2;
+<a name="line610">610: </a>            Y[1] = s2*e;
+<a name="line611">611: </a>          } <font color="#4169E1">else</font> {
+<a name="line612">612: </a>            Y[0] = s1*e;
+<a name="line613">613: </a>            Y[1] = wr1-s1*d1;
+<a name="line614">614: </a>          }
+<a name="line615">615: </a>          <font color="#B22222">/* normalize with a signature*/</font>
+<a name="line616">616: </a>          maxy = PetscMax(PetscAbsScalar(Y[0]),PetscAbsScalar(Y[1]));
+<a name="line617">617: </a>          scal1 = PetscRealPart(Y[0])/maxy; scal2 = PetscRealPart(Y[1])/maxy;
+<a name="line618">618: </a>          snorm = scal1*scal1*s1 + scal2*scal2*s2;
+<a name="line619">619: </a>          <font color="#4169E1">if</font> (snorm<0) { ss1 = -1.0; snorm = -snorm; }
+<a name="line620">620: </a>          snorm = maxy*PetscSqrtReal(snorm); Y[0] = Y[0]/snorm; Y[1] = Y[1]/snorm;
+<a name="line621">621: </a>          <font color="#4169E1">if</font> (PetscAbsReal(s1*d1-wr2)<PetscAbsReal(s2*d2-wr2)) {
+<a name="line622">622: </a>            Y[2] = wr2-s2*d2;
+<a name="line623">623: </a>            Y[3] = s2*e;
+<a name="line624">624: </a>          } <font color="#4169E1">else</font> {
+<a name="line625">625: </a>            Y[2] = s1*e;
+<a name="line626">626: </a>            Y[3] = wr2-s1*d1;
+<a name="line627">627: </a>          }
+<a name="line628">628: </a>          maxy = PetscMax(PetscAbsScalar(Y[2]),PetscAbsScalar(Y[3]));
+<a name="line629">629: </a>          scal1 = PetscRealPart(Y[2])/maxy; scal2 = PetscRealPart(Y[3])/maxy;
+<a name="line630">630: </a>          snorm = scal1*scal1*s1 + scal2*scal2*s2;
+<a name="line631">631: </a>          <font color="#4169E1">if</font> (snorm<0) { ss2 = -1.0; snorm = -snorm; }
+<a name="line632">632: </a>          snorm = maxy*PetscSqrtReal(snorm);Y[2] = Y[2]/snorm; Y[3] = Y[3]/snorm;
+<a name="line633">633: </a>        }
+<a name="line634">634: </a>        wr1 *= ss1; wr2 *= ss2;
+<a name="line635">635: </a>      }
+<a name="line636">636: </a>      <font color="#4169E1">if</font> (isreal) {
+<a name="line637">637: </a>        <font color="#4169E1">if</font> (ds->compact) {
+<a name="line638">638: </a>          D[i] = ss1;
+<a name="line639">639: </a>          T[i] = wr1;
+<a name="line640">640: </a>          D[i+1] = ss2;
+<a name="line641">641: </a>          T[i+1] = wr2;
+<a name="line642">642: </a>          T[ld+i] = 0.0;
+<a name="line643">643: </a>        } <font color="#4169E1">else</font> {
+<a name="line644">644: </a>          B[i*ld+i] = ss1;
+<a name="line645">645: </a>          A[i*ld+i] = wr1;
+<a name="line646">646: </a>          B[(i+1)*ld+i+1] = ss2;
+<a name="line647">647: </a>          A[(i+1)*ld+i+1] = wr2;
+<a name="line648">648: </a>          A[(i+1)+ld*i] = 0.0;
+<a name="line649">649: </a>          A[i+ld*(i+1)] = 0.0;
+<a name="line650">650: </a>        }
+<a name="line651">651: </a>        PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&m,&two,&two,&oneS,ds->mat[DS_MAT_Q]+ds->l+i*ld,&ld,Y,&two,&zeroS,ds->work,&m));
+<a name="line652">652: </a>        PetscMemcpy(ds->mat[DS_MAT_Q]+ds->l+i*ld,ds->work,m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line653">653: </a>        PetscMemcpy(ds->mat[DS_MAT_Q]+ds->l+(i+1)*ld,ds->work+m,m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line654">654: </a>      }
+<a name="line655">655: </a>      i++;
+<a name="line656">656: </a>    }
+<a name="line657">657: </a>  }
+<a name="line658">658: </a>  <font color="#4169E1">return</font>(0);
+<a name="line659">659: </a><font color="#A020F0">#endif</font>
+<a name="line660">660: </a>}
+
+<a name="line664">664: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_QR_II"></a>PetscErrorCode DSSolve_GHIEP_QR_II(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line665">665: </a>{
+<a name="line666">666: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_HSEQR)</font>
+<a name="line668">668: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"HSEQR - Lapack routine is unavailable"</font>);
+<a name="line669">669: </a><font color="#A020F0">#else</font>
+<a name="line671">671: </a>  PetscInt       i,off;
+<a name="line672">672: </a>  PetscBLASInt   n1,ld,one,info,lwork;
+<a name="line673">673: </a>  PetscScalar    *H,*A,*B,*Q;
+<a name="line674">674: </a>  PetscReal      *d,*e,*s;
+<a name="line675">675: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line676">676: </a>  PetscInt       j;
+<a name="line677">677: </a><font color="#A020F0">#endif</font>
+
+<a name="line680">680: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line682">682: </a><font color="#A020F0">#endif</font>
+<a name="line683">683: </a>  one = 1;
+<a name="line684">684: </a>  PetscBLASIntCast(ds->n-ds->l,&n1);
+<a name="line685">685: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line686">686: </a>  off = ds->l + ds->l*ld;
+<a name="line687">687: </a>  A = ds->mat[DS_MAT_A];
+<a name="line688">688: </a>  B = ds->mat[DS_MAT_B];
+<a name="line689">689: </a>  Q = ds->mat[DS_MAT_Q];
+<a name="line690">690: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line691">691: </a>  e = ds->rmat[DS_MAT_T] + ld;
+<a name="line692">692: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line693">693: </a>  DSAllocateWork_Private(ds,ld*ld,2*ld,ld*2);
+<a name="line694">694: </a>  lwork = ld*ld;
+
+<a name="line696">696: </a>  <font color="#B22222">/* Quick return if possible */</font>
+<a name="line697">697: </a>  <font color="#4169E1">if</font> (n1 == 1) {
+<a name="line698">698: </a>    *(Q+off) = 1;
+<a name="line699">699: </a>    <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line700">700: </a>      d[ds->l] = PetscRealPart(A[off]);
+<a name="line701">701: </a>      s[ds->l] = PetscRealPart(B[off]);
+<a name="line702">702: </a>    }
+<a name="line703">703: </a>    wr[ds->l] = d[ds->l]/s[ds->l];
+<a name="line704">704: </a>    <font color="#4169E1">if</font> (wi) wi[ds->l] = 0.0;
+<a name="line705">705: </a>    <font color="#4169E1">return</font>(0);
+<a name="line706">706: </a>  }
+<a name="line707">707: </a>  <font color="#B22222">/* Reduce to pseudotriadiagonal form */</font>
+<a name="line708">708: </a>  DSIntermediate_GHIEP(ds);
+
+<a name="line710">710: </a>  <font color="#B22222">/* Compute Eigenvalues (QR)*/</font>
+<a name="line711">711: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line712">712: </a>  H = ds->mat[DS_MAT_W];
+<a name="line713">713: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line714">714: </a>    H[off] = d[ds->l]*s[ds->l];
+<a name="line715">715: </a>    H[off+ld] = e[ds->l]*s[ds->l];
+<a name="line716">716: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
+<a name="line717">717: </a>      H[i+(i-1)*ld] = e[i-1]*s[i];
+<a name="line718">718: </a>      H[i+i*ld]     = d[i]*s[i];
+<a name="line719">719: </a>      H[i+(i+1)*ld] = e[i]*s[i];
+<a name="line720">720: </a>    }
+<a name="line721">721: </a>    H[ds->n-1+(ds->n-2)*ld] = e[ds->n-2]*s[ds->n-1];
+<a name="line722">722: </a>    H[ds->n-1+(ds->n-1)*ld] = d[ds->n-1]*s[ds->n-1];
+<a name="line723">723: </a>  } <font color="#4169E1">else</font> {
+<a name="line724">724: </a>    s[ds->l] = PetscRealPart(B[off]);
+<a name="line725">725: </a>    H[off] = A[off]*s[ds->l];
+<a name="line726">726: </a>    H[off+ld] = A[off+ld]*s[ds->l];
+<a name="line727">727: </a>    <font color="#4169E1">for</font> (i=ds->l+1;i<ds->n-1;i++) {
+<a name="line728">728: </a>      s[i] = PetscRealPart(B[i+i*ld]);
+<a name="line729">729: </a>      H[i+(i-1)*ld] = A[i+(i-1)*ld]*s[i];
+<a name="line730">730: </a>      H[i+i*ld]     = A[i+i*ld]*s[i];
+<a name="line731">731: </a>      H[i+(i+1)*ld] = A[i+(i+1)*ld]*s[i];
+<a name="line732">732: </a>    }
+<a name="line733">733: </a>    s[ds->n-1] = PetscRealPart(B[ds->n-1+(ds->n-1)*ld]);
+<a name="line734">734: </a>    H[ds->n-1+(ds->n-2)*ld] = A[ds->n-1+(ds->n-2)*ld]*s[ds->n-1];
+<a name="line735">735: </a>    H[ds->n-1+(ds->n-1)*ld] = A[ds->n-1+(ds->n-1)*ld]*s[ds->n-1];
+<a name="line736">736: </a>  }
+
+<a name="line738">738: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line739">739: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"E"</font>,<font color="#666666">"N"</font>,&n1,&one,&n1,H+off,&ld,wr+ds->l,wi+ds->l,NULL,&ld,ds->work,&lwork,&info));
+<a name="line740">740: </a><font color="#A020F0">#else</font>
+<a name="line741">741: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"E"</font>,<font color="#666666">"N"</font>,&n1,&one,&n1,H+off,&ld,wr+ds->l,NULL,&ld,ds->work,&lwork,&info));
+
+<a name="line743">743: </a>  <font color="#B22222">/* Sort to have consecutive conjugate pairs */</font>
+<a name="line744">744: </a>  <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) {
+<a name="line745">745: </a>      j=i+1;
+<a name="line746">746: </a>      <font color="#4169E1">while</font> (j<ds->n && (PetscAbsScalar(wr[i]-PetscConj(wr[j]))>PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON)) j++;
+<a name="line747">747: </a>      <font color="#4169E1">if</font> (j==ds->n) {
+<a name="line748">748: </a>        <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(wr[i]))<PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON) wr[i]=PetscRealPart(wr[i]);
+<a name="line749">749: </a>        <font color="#4169E1">else</font> SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Found complex without conjugate pair"</font>);
+<a name="line750">750: </a>      } <font color="#4169E1">else</font> { <font color="#B22222">/* complex eigenvalue */</font>
+<a name="line751">751: </a>        wr[j] = wr[i+1];
+<a name="line752">752: </a>        <font color="#4169E1">if</font> (PetscImaginaryPart(wr[i])<0) wr[i] = PetscConj(wr[i]);
+<a name="line753">753: </a>        wr[i+1] = PetscConj(wr[i]);
+<a name="line754">754: </a>        i++;
+<a name="line755">755: </a>      }
+<a name="line756">756: </a>  }
+<a name="line757">757: </a><font color="#A020F0">#endif</font>
+<a name="line758">758: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xHSEQR %d"</font>,&info);
+<a name="line759">759: </a>  <font color="#B22222">/* Compute Eigenvectors with Inverse Iteration */</font>
+<a name="line760">760: </a>  DSGHIEPInverseIteration(ds,wr,wi);
+
+<a name="line762">762: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
+<a name="line763">763: </a>  DSGHIEPComplexEigs(ds,0,ds->l,wr,wi);
+<a name="line764">764: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line765">765: </a>  <font color="#4169E1">if</font> (wi) {
+<a name="line766">766: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
+<a name="line767">767: </a>  }
+<a name="line768">768: </a><font color="#A020F0">#endif</font>
+<a name="line769">769: </a>  <font color="#4169E1">return</font>(0);
+<a name="line770">770: </a><font color="#A020F0">#endif</font>
+<a name="line771">771: </a>}
+
+<a name="line775">775: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_QR"></a>PetscErrorCode DSSolve_GHIEP_QR(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line776">776: </a>{
+<a name="line777">777: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GEEVX)</font>
+<a name="line779">779: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEEVX - Lapack routine is unavailable"</font>);
+<a name="line780">780: </a><font color="#A020F0">#else</font>
+<a name="line782">782: </a>  PetscInt       i,off,nwu=0,n,lw,lwr,nwru=0;
+<a name="line783">783: </a>  PetscBLASInt   n_,ld,info,lwork,ilo,ihi;
+<a name="line784">784: </a>  PetscScalar    *H,*A,*B,*Q,*X;
+<a name="line785">785: </a>  PetscReal      *d,*s,*scale,nrm,*rcde,*rcdv;
+<a name="line786">786: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line787">787: </a>  PetscInt       j,k;
+<a name="line788">788: </a><font color="#A020F0">#endif</font>
+
+<a name="line791">791: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line793">793: </a><font color="#A020F0">#endif</font>
+<a name="line794">794: </a>  n = ds->n-ds->l;
+<a name="line795">795: </a>  PetscBLASIntCast(n,&n_);
+<a name="line796">796: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line797">797: </a>  off = ds->l + ds->l*ld;
+<a name="line798">798: </a>  A = ds->mat[DS_MAT_A];
+<a name="line799">799: </a>  B = ds->mat[DS_MAT_B];
+<a name="line800">800: </a>  Q = ds->mat[DS_MAT_Q];
+<a name="line801">801: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line802">802: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line803">803: </a>  lw = 14*ld+ld*ld;
+<a name="line804">804: </a>  lwr = 7*ld;
+<a name="line805">805: </a>  DSAllocateWork_Private(ds,lw,lwr,0);
+<a name="line806">806: </a>  scale = ds->rwork+nwru;
+<a name="line807">807: </a>  nwru += ld;
+<a name="line808">808: </a>  rcde = ds->rwork+nwru;
+<a name="line809">809: </a>  nwru += ld;
+<a name="line810">810: </a>  rcdv = ds->rwork+nwru;
+<a name="line811">811: </a>  nwru += ld;
+<a name="line812">812: </a>  <font color="#B22222">/* Quick return if possible */</font>
+<a name="line813">813: </a>  <font color="#4169E1">if</font> (n_ == 1) {
+<a name="line814">814: </a>    *(Q+off) = 1;
+<a name="line815">815: </a>    <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line816">816: </a>      d[ds->l] = PetscRealPart(A[off]);
+<a name="line817">817: </a>      s[ds->l] = PetscRealPart(B[off]);
 <a name="line818">818: </a>    }
-<a name="line819">819: </a>    H[n-1+(n-1)*n] = s[ds->l+n-1]*d[ds->l+n-1];
-<a name="line820">820: </a>    <font color="#4169E1">for</font> (i=0;i<ds->k-ds->l;i++) {
-<a name="line821">821: </a>      H[ds->k-ds->l+i*n] = s[ds->k]*d[2*ld+ds->l+i];
-<a name="line822">822: </a>      H[i+(ds->k-ds->l)*n] = s[i+ds->l]*d[2*ld+ds->l+i];
-<a name="line823">823: </a>    }
-<a name="line824">824: </a>  } <font color="#4169E1">else</font> {
-<a name="line825">825: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line826">826: </a>      H[i+i*n]     = B[off+i+i*ld]*A[off+i+i*ld];
-<a name="line827">827: </a>      H[i+1+i*n]   = B[off+i+1+(i+1)*ld]*A[off+i+1+i*ld];
-<a name="line828">828: </a>      H[i+(i+1)*n] = B[off+i+i*ld]*A[off+i+(i+1)*ld];
-<a name="line829">829: </a>    }
-<a name="line830">830: </a>    H[n-1+(n-1)*n] = B[off+n-1+(n-1)*ld]*A[off+n-1+(n-1)*n];
-<a name="line831">831: </a>    <font color="#4169E1">for</font> (i=0;i<ds->k-ds->l;i++) {
-<a name="line832">832: </a>      H[ds->k-ds->l+i*n] = B[ds->k*(1+ld)]*A[off+ds->k-ds->l+i*ld];
-<a name="line833">833: </a>      H[i+(ds->k-ds->l)*n] = B[(i+ds->l)*(1+ld)]*A[off+i+(ds->k-ds->l)*ld];
-<a name="line834">834: </a>    }
-<a name="line835">835: </a>  }
-<a name="line836">836: </a> 
-<a name="line837">837: </a>  <font color="#B22222">/* Compute eigenpairs */</font>
-<a name="line838">838: </a>  PetscBLASIntCast(lw-nwu,&lwork);  
-<a name="line839">839: </a>  DSAllocateMat_Private(ds,DS_MAT_X);
-<a name="line840">840: </a>  X = ds->mat[DS_MAT_X];
-<a name="line841">841: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line842">842: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeevx"</font>,LAPACKgeevx_(<font color="#666666">"B"</font>,<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,&n_,H,&n_,wr+ds->l,wi+ds->l,NULL,&ld,X+off,&ld,&ilo,&ihi,scale,&nrm,rcde,rcdv,ds->work+nwu,&lwork,NULL,&info));
-<a name="line843">843: </a><font color="#A020F0">#else</font>
-<a name="line844">844: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeevx"</font>,LAPACKgeevx_(<font color="#666666">"B"</font>,<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,&n_,H,&n_,wr+ds->l,NULL,&ld,X+off,&ld,&ilo,&ihi,scale,&nrm,rcde,rcdv,ds->work+nwu,&lwork,ds->rwork+nwru,&info));
-
-<a name="line846">846: </a>  <font color="#B22222">/* Sort to have consecutive conjugate pairs </font>
-<a name="line847">847: </a><font color="#B22222">     Separate real and imaginary part of complex eigenvectors*/</font>
-<a name="line848">848: </a>  <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) {
-<a name="line849">849: </a>    j=i+1;
-<a name="line850">850: </a>    <font color="#4169E1">while</font> (j<ds->n && (PetscAbsScalar(wr[i]-PetscConj(wr[j]))>PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON)) j++;
-<a name="line851">851: </a>    <font color="#4169E1">if</font> (j==ds->n) {
-<a name="line852">852: </a>      <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(wr[i]))<PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON) {
-<a name="line853">853: </a>        wr[i]=PetscRealPart(wr[i]); <font color="#B22222">/* real eigenvalue */</font>
-<a name="line854">854: </a>        <font color="#4169E1">for</font> (k=ds->l;k<ds->n;k++) {
-<a name="line855">855: </a>          X[k+i*ds->ld] = PetscRealPart(X[k+i*ds->ld]);
-<a name="line856">856: </a>        }
-<a name="line857">857: </a>      } <font color="#4169E1">else</font> SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Found complex without conjugate pair"</font>);
-<a name="line858">858: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* complex eigenvalue */</font>
-<a name="line859">859: </a>      <font color="#4169E1">if</font> (j!=i+1) {
-<a name="line860">860: </a>        wr[j] = wr[i+1];
-<a name="line861">861: </a>        PetscMemcpy(X+j*ds->ld,X+(i+1)*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line862">862: </a>      }
-<a name="line863">863: </a>      <font color="#4169E1">if</font> (PetscImaginaryPart(wr[i])<0) {
-<a name="line864">864: </a>        wr[i] = PetscConj(wr[i]);
-<a name="line865">865: </a>        <font color="#4169E1">for</font> (k=ds->l;k<ds->n;k++) {
-<a name="line866">866: </a>          X[k+(i+1)*ds->ld] = -PetscImaginaryPart(X[k+i*ds->ld]);
-<a name="line867">867: </a>          X[k+i*ds->ld] = PetscRealPart(X[k+i*ds->ld]);
-<a name="line868">868: </a>        }
-<a name="line869">869: </a>      } <font color="#4169E1">else</font> {
-<a name="line870">870: </a>        <font color="#4169E1">for</font> (k=ds->l;k<ds->n;k++) {
-<a name="line871">871: </a>          X[k+(i+1)*ds->ld] = PetscImaginaryPart(X[k+i*ds->ld]);
-<a name="line872">872: </a>          X[k+i*ds->ld] = PetscRealPart(X[k+i*ds->ld]);
-<a name="line873">873: </a>        }
-<a name="line874">874: </a>      }
-<a name="line875">875: </a>      wr[i+1] = PetscConj(wr[i]);
-<a name="line876">876: </a>      i++;
-<a name="line877">877: </a>    }
-<a name="line878">878: </a>  }
-<a name="line879">879: </a><font color="#A020F0">#endif</font>
-<a name="line880">880: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xHSEQR %d"</font>,&info);
-
-<a name="line882">882: </a>  <font color="#B22222">/* Compute real s-orthonormal basis */</font>
-<a name="line883">883: </a>  DSGHIEPOrthogEigenv(ds,DS_MAT_X,wr,wi,PETSC_FALSE);
-
-<a name="line885">885: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
-<a name="line886">886: </a>  DSGHIEPComplexEigs(ds,0,ds->l,wr,wi);
-<a name="line887">887: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line888">888: </a>  <font color="#4169E1">if</font> (wi) {
-<a name="line889">889: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
-<a name="line890">890: </a>  }
-<a name="line891">891: </a><font color="#A020F0">#endif</font>
-<a name="line892">892: </a>  <font color="#4169E1">return</font>(0);
-<a name="line893">893: </a><font color="#A020F0">#endif</font>
-<a name="line894">894: </a>}
-
-<a name="line898">898: </a><strong><font color="#4169E1"><a name="DSNormalize_GHIEP"></a>PetscErrorCode DSNormalize_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
-<a name="line899">899: </a>{
-<a name="line901">901: </a>  PetscInt       i,i0,i1;
-<a name="line902">902: </a>  PetscBLASInt   ld,n,one = 1;
-<a name="line903">903: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],norm,*x;
-<a name="line904">904: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line905">905: </a>  PetscScalar    norm0;
+<a name="line819">819: </a>    wr[ds->l] = d[ds->l]/s[ds->l];
+<a name="line820">820: </a>    <font color="#4169E1">if</font> (wi) wi[ds->l] = 0.0;
+<a name="line821">821: </a>    <font color="#4169E1">return</font>(0);
+<a name="line822">822: </a>  }
+
+<a name="line824">824: </a>  <font color="#B22222">/* Form pseudo-symmetric matrix */</font>
+<a name="line825">825: </a>  H =  ds->work+nwu;
+<a name="line826">826: </a>  nwu += n*n;
+<a name="line827">827: </a>  PetscMemzero(H,n*n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line828">828: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line829">829: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line830">830: </a>      H[i+i*n]     = s[ds->l+i]*d[ds->l+i];
+<a name="line831">831: </a>      H[i+1+i*n]   = s[ds->l+i+1]*d[ld+ds->l+i];
+<a name="line832">832: </a>      H[i+(i+1)*n] = s[ds->l+i]*d[ld+ds->l+i];
+<a name="line833">833: </a>    }
+<a name="line834">834: </a>    H[n-1+(n-1)*n] = s[ds->l+n-1]*d[ds->l+n-1];
+<a name="line835">835: </a>    <font color="#4169E1">for</font> (i=0;i<ds->k-ds->l;i++) {
+<a name="line836">836: </a>      H[ds->k-ds->l+i*n] = s[ds->k]*d[2*ld+ds->l+i];
+<a name="line837">837: </a>      H[i+(ds->k-ds->l)*n] = s[i+ds->l]*d[2*ld+ds->l+i];
+<a name="line838">838: </a>    }
+<a name="line839">839: </a>  } <font color="#4169E1">else</font> {
+<a name="line840">840: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line841">841: </a>      H[i+i*n]     = B[off+i+i*ld]*A[off+i+i*ld];
+<a name="line842">842: </a>      H[i+1+i*n]   = B[off+i+1+(i+1)*ld]*A[off+i+1+i*ld];
+<a name="line843">843: </a>      H[i+(i+1)*n] = B[off+i+i*ld]*A[off+i+(i+1)*ld];
+<a name="line844">844: </a>    }
+<a name="line845">845: </a>    H[n-1+(n-1)*n] = B[off+n-1+(n-1)*ld]*A[off+n-1+(n-1)*n];
+<a name="line846">846: </a>    <font color="#4169E1">for</font> (i=0;i<ds->k-ds->l;i++) {
+<a name="line847">847: </a>      H[ds->k-ds->l+i*n] = B[ds->k*(1+ld)]*A[off+ds->k-ds->l+i*ld];
+<a name="line848">848: </a>      H[i+(ds->k-ds->l)*n] = B[(i+ds->l)*(1+ld)]*A[off+i+(ds->k-ds->l)*ld];
+<a name="line849">849: </a>    }
+<a name="line850">850: </a>  }
+<a name="line851">851: </a> 
+<a name="line852">852: </a>  <font color="#B22222">/* Compute eigenpairs */</font>
+<a name="line853">853: </a>  PetscBLASIntCast(lw-nwu,&lwork);  
+<a name="line854">854: </a>  DSAllocateMat_Private(ds,DS_MAT_X);
+<a name="line855">855: </a>  X = ds->mat[DS_MAT_X];
+<a name="line856">856: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line857">857: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeevx"</font>,LAPACKgeevx_(<font color="#666666">"B"</font>,<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,&n_,H,&n_,wr+ds->l,wi+ds->l,NULL,&ld,X+off,&ld,&ilo,&ihi,scale,&nrm,rcde,rcdv,ds->work+nwu,&lwork,NULL,&info));
+<a name="line858">858: </a><font color="#A020F0">#else</font>
+<a name="line859">859: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeevx"</font>,LAPACKgeevx_(<font color="#666666">"B"</font>,<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,&n_,H,&n_,wr+ds->l,NULL,&ld,X+off,&ld,&ilo,&ihi,scale,&nrm,rcde,rcdv,ds->work+nwu,&lwork,ds->rwork+nwru,&info));
+
+<a name="line861">861: </a>  <font color="#B22222">/* Sort to have consecutive conjugate pairs </font>
+<a name="line862">862: </a><font color="#B22222">     Separate real and imaginary part of complex eigenvectors*/</font>
+<a name="line863">863: </a>  <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) {
+<a name="line864">864: </a>    j=i+1;
+<a name="line865">865: </a>    <font color="#4169E1">while</font> (j<ds->n && (PetscAbsScalar(wr[i]-PetscConj(wr[j]))>PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON)) j++;
+<a name="line866">866: </a>    <font color="#4169E1">if</font> (j==ds->n) {
+<a name="line867">867: </a>      <font color="#4169E1">if</font> (PetscAbsReal(PetscImaginaryPart(wr[i]))<PetscAbsScalar(wr[i])*PETSC_SQRT_MACHINE_EPSILON) {
+<a name="line868">868: </a>        wr[i]=PetscRealPart(wr[i]); <font color="#B22222">/* real eigenvalue */</font>
+<a name="line869">869: </a>        <font color="#4169E1">for</font> (k=ds->l;k<ds->n;k++) {
+<a name="line870">870: </a>          X[k+i*ds->ld] = PetscRealPart(X[k+i*ds->ld]);
+<a name="line871">871: </a>        }
+<a name="line872">872: </a>      } <font color="#4169E1">else</font> SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Found complex without conjugate pair"</font>);
+<a name="line873">873: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* complex eigenvalue */</font>
+<a name="line874">874: </a>      <font color="#4169E1">if</font> (j!=i+1) {
+<a name="line875">875: </a>        wr[j] = wr[i+1];
+<a name="line876">876: </a>        PetscMemcpy(X+j*ds->ld,X+(i+1)*ds->ld,ds->ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line877">877: </a>      }
+<a name="line878">878: </a>      <font color="#4169E1">if</font> (PetscImaginaryPart(wr[i])<0) {
+<a name="line879">879: </a>        wr[i] = PetscConj(wr[i]);
+<a name="line880">880: </a>        <font color="#4169E1">for</font> (k=ds->l;k<ds->n;k++) {
+<a name="line881">881: </a>          X[k+(i+1)*ds->ld] = -PetscImaginaryPart(X[k+i*ds->ld]);
+<a name="line882">882: </a>          X[k+i*ds->ld] = PetscRealPart(X[k+i*ds->ld]);
+<a name="line883">883: </a>        }
+<a name="line884">884: </a>      } <font color="#4169E1">else</font> {
+<a name="line885">885: </a>        <font color="#4169E1">for</font> (k=ds->l;k<ds->n;k++) {
+<a name="line886">886: </a>          X[k+(i+1)*ds->ld] = PetscImaginaryPart(X[k+i*ds->ld]);
+<a name="line887">887: </a>          X[k+i*ds->ld] = PetscRealPart(X[k+i*ds->ld]);
+<a name="line888">888: </a>        }
+<a name="line889">889: </a>      }
+<a name="line890">890: </a>      wr[i+1] = PetscConj(wr[i]);
+<a name="line891">891: </a>      i++;
+<a name="line892">892: </a>    }
+<a name="line893">893: </a>  }
+<a name="line894">894: </a><font color="#A020F0">#endif</font>
+<a name="line895">895: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xHSEQR %d"</font>,&info);
+
+<a name="line897">897: </a>  <font color="#B22222">/* Compute real s-orthonormal basis */</font>
+<a name="line898">898: </a>  DSGHIEPOrthogEigenv(ds,DS_MAT_X,wr,wi,PETSC_FALSE);
+
+<a name="line900">900: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
+<a name="line901">901: </a>  DSGHIEPComplexEigs(ds,0,ds->l,wr,wi);
+<a name="line902">902: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line903">903: </a>  <font color="#4169E1">if</font> (wi) {
+<a name="line904">904: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
+<a name="line905">905: </a>  }
 <a name="line906">906: </a><font color="#A020F0">#endif</font>
-
-<a name="line909">909: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line910">910: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line911">911: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line912">912: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
-<a name="line913">913: </a>      <font color="#B22222">/* Supported matrices */</font>
-<a name="line914">914: </a>      <font color="#4169E1">break</font>;
-<a name="line915">915: </a>    <font color="#4169E1">case</font> DS_MAT_U:
-<a name="line916">916: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
-<a name="line917">917: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line918">918: </a>      <font color="#4169E1">break</font>;
-<a name="line919">919: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line920">920: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line921">921: </a>  }
-
-<a name="line923">923: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line924">924: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line925">925: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
-<a name="line926">926: </a>  <font color="#4169E1">if</font> (col < 0) {
-<a name="line927">927: </a>    i0 = 0; i1 = ds->n;
-<a name="line928">928: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (col>0 && A[ds->ld*(col-1)+col] != 0.0) {
-<a name="line929">929: </a>    i0 = col-1; i1 = col+1;
-<a name="line930">930: </a>  } <font color="#4169E1">else</font> {
-<a name="line931">931: </a>    i0 = col; i1 = col+1;
-<a name="line932">932: </a>  }
-<a name="line933">933: </a>  <font color="#4169E1">for</font> (i=i0; i<i1; i++) {
-<a name="line934">934: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line935">935: </a>    <font color="#4169E1">if</font> (i<n-1 && A[ds->ld*i+i+1] != 0.0) {
-<a name="line936">936: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
-<a name="line937">937: </a>      norm0 = BLASnrm2_(&n,&x[ld*(i+1)],&one);
-<a name="line938">938: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
-<a name="line939">939: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
-<a name="line940">940: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*(i+1)],&one));
-<a name="line941">941: </a>      i++;
-<a name="line942">942: </a>    } <font color="#4169E1">else</font>
-<a name="line943">943: </a><font color="#A020F0">#endif</font>
-<a name="line944">944: </a>    {
-<a name="line945">945: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
-<a name="line946">946: </a>      norm = 1.0/norm;
-<a name="line947">947: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
-<a name="line948">948: </a>    }
-<a name="line949">949: </a>  }
-<a name="line950">950: </a>  <font color="#4169E1">return</font>(0);
-<a name="line951">951: </a>}
-
-<a name="line955">955: </a><strong><font color="#4169E1"><a name="DSCreate_GHIEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line956">956: </a>{
-<a name="line958">958: </a>  ds->ops->allocate      = DSAllocate_GHIEP;
-<a name="line959">959: </a>  ds->ops->view          = DSView_GHIEP;
-<a name="line960">960: </a>  ds->ops->vectors       = DSVectors_GHIEP;
-<a name="line961">961: </a>  ds->ops->solve[0]      = DSSolve_GHIEP_HZ;
-<a name="line962">962: </a>  ds->ops->solve[1]      = DSSolve_GHIEP_QR_II;
-<a name="line963">963: </a>  ds->ops->solve[2]      = DSSolve_GHIEP_QR;
-<a name="line964">964: </a>  ds->ops->solve[3]      = DSSolve_GHIEP_DQDS_II;
-<a name="line965">965: </a>  ds->ops->sort          = DSSort_GHIEP;
-<a name="line966">966: </a>  ds->ops->normalize     = DSNormalize_GHIEP;
-<a name="line967">967: </a>  <font color="#4169E1">return</font>(0);
-<a name="line968">968: </a>}
+<a name="line907">907: </a>  <font color="#4169E1">return</font>(0);
+<a name="line908">908: </a><font color="#A020F0">#endif</font>
+<a name="line909">909: </a>}
+
+<a name="line913">913: </a><strong><font color="#4169E1"><a name="DSNormalize_GHIEP"></a>PetscErrorCode DSNormalize_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
+<a name="line914">914: </a>{
+<a name="line916">916: </a>  PetscInt       i,i0,i1;
+<a name="line917">917: </a>  PetscBLASInt   ld,n,one = 1;
+<a name="line918">918: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],norm,*x;
+<a name="line919">919: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line920">920: </a>  PetscScalar    norm0;
+<a name="line921">921: </a><font color="#A020F0">#endif</font>
+
+<a name="line924">924: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line925">925: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line926">926: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line927">927: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
+<a name="line928">928: </a>      <font color="#B22222">/* Supported matrices */</font>
+<a name="line929">929: </a>      <font color="#4169E1">break</font>;
+<a name="line930">930: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line931">931: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line932">932: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line933">933: </a>      <font color="#4169E1">break</font>;
+<a name="line934">934: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line935">935: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line936">936: </a>  }
+
+<a name="line938">938: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line939">939: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line940">940: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
+<a name="line941">941: </a>  <font color="#4169E1">if</font> (col < 0) {
+<a name="line942">942: </a>    i0 = 0; i1 = ds->n;
+<a name="line943">943: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (col>0 && A[ds->ld*(col-1)+col] != 0.0) {
+<a name="line944">944: </a>    i0 = col-1; i1 = col+1;
+<a name="line945">945: </a>  } <font color="#4169E1">else</font> {
+<a name="line946">946: </a>    i0 = col; i1 = col+1;
+<a name="line947">947: </a>  }
+<a name="line948">948: </a>  <font color="#4169E1">for</font> (i=i0; i<i1; i++) {
+<a name="line949">949: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line950">950: </a>    <font color="#4169E1">if</font> (i<n-1 && A[ds->ld*i+i+1] != 0.0) {
+<a name="line951">951: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
+<a name="line952">952: </a>      norm0 = BLASnrm2_(&n,&x[ld*(i+1)],&one);
+<a name="line953">953: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
+<a name="line954">954: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
+<a name="line955">955: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*(i+1)],&one));
+<a name="line956">956: </a>      i++;
+<a name="line957">957: </a>    } <font color="#4169E1">else</font>
+<a name="line958">958: </a><font color="#A020F0">#endif</font>
+<a name="line959">959: </a>    {
+<a name="line960">960: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
+<a name="line961">961: </a>      norm = 1.0/norm;
+<a name="line962">962: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
+<a name="line963">963: </a>    }
+<a name="line964">964: </a>  }
+<a name="line965">965: </a>  <font color="#4169E1">return</font>(0);
+<a name="line966">966: </a>}
+
+<a name="line970">970: </a><strong><font color="#4169E1"><a name="DSCreate_GHIEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line971">971: </a>{
+<a name="line973">973: </a>  ds->ops->allocate      = DSAllocate_GHIEP;
+<a name="line974">974: </a>  ds->ops->view          = DSView_GHIEP;
+<a name="line975">975: </a>  ds->ops->vectors       = DSVectors_GHIEP;
+<a name="line976">976: </a>  ds->ops->solve[0]      = DSSolve_GHIEP_HZ;
+<a name="line977">977: </a>  ds->ops->solve[1]      = DSSolve_GHIEP_QR_II;
+<a name="line978">978: </a>  ds->ops->solve[2]      = DSSolve_GHIEP_QR;
+<a name="line979">979: </a>  ds->ops->solve[3]      = DSSolve_GHIEP_DQDS_II;
+<a name="line980">980: </a>  ds->ops->sort          = DSSort_GHIEP;
+<a name="line981">981: </a>  ds->ops->normalize     = DSNormalize_GHIEP;
+<a name="line982">982: </a>  <font color="#4169E1">return</font>(0);
+<a name="line983">983: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/ghiep/hz.c b/src/sys/classes/ds/impls/ghiep/hz.c
index 0bcba7f..4e6cfa0 100644
--- a/src/sys/classes/ds/impls/ghiep/hz.c
+++ b/src/sys/classes/ds/impls/ghiep/hz.c
@@ -13,7 +13,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -280,9 +280,6 @@ static PetscErrorCode HZIteration(PetscBLASInt nn,PetscBLASInt cgd,PetscReal *aa
           bb[ntop] = 0;
           j2 = nn-cgd;
           PetscStackCallBLAS("BLASrot",BLASrot_(&j2,uu+ntop*ld+cgd,&one,uu+nbot*ld+cgd,&one,&c,&s));
-        } else {
-          dis = PetscSqrtScalar(dis);
-          if (htr < 0) dis = -dis;
         }
       }
       nbot = ntop - 1;
@@ -294,8 +291,7 @@ static PetscErrorCode HZIteration(PetscBLASInt nn,PetscBLASInt cgd,PetscReal *aa
       for (ntry=1;ntry<=6;ntry++) {
         ierr = HZStep(ntop,nbot+1,tr,dt,aa,bb,dd,uu,nn,ld,&flag);CHKERRQ(ierr);
         if (!flag) break;
-        else if (ntry == 6)
-          SETERRQ(PETSC_COMM_SELF,1,"Unable to complete hz step on six tries");
+        else if (ntry == 6) SETERRQ(PETSC_COMM_SELF,1,"Unable to complete hz step on six tries");
         else {
           tr = 0.9*tr; dt = 0.81*dt;
         }
diff --git a/src/sys/classes/ds/impls/ghiep/hz.c.html b/src/sys/classes/ds/impls/ghiep/hz.c.html
index 88603ed..8180f3b 100644
--- a/src/sys/classes/ds/impls/ghiep/hz.c.html
+++ b/src/sys/classes/ds/impls/ghiep/hz.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghiep/hz.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:56+00:00">
+<meta name="date" content="2016-05-16T10:31:47+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghiep/hz.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghiep/hz.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   HZ iteration for generalized symmetric-indefinite eigenproblem.</font>
 <a name="line3">  3: </a><font color="#B22222">   Based on Matlab code from David Watkins.</font>
@@ -25,7 +25,7 @@
 
 <a name="line14"> 14: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line15"> 15: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line16"> 16: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line16"> 16: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line18"> 18: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -281,82 +281,78 @@
 <a name="line280">280: </a>          bb[ntop] = 0;
 <a name="line281">281: </a>          j2 = nn-cgd;
 <a name="line282">282: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&j2,uu+ntop*ld+cgd,&one,uu+nbot*ld+cgd,&one,&c,&s));
-<a name="line283">283: </a>        } <font color="#4169E1">else</font> {
-<a name="line284">284: </a>          dis = PetscSqrtScalar(dis);
-<a name="line285">285: </a>          <font color="#4169E1">if</font> (htr < 0) dis = -dis;
-<a name="line286">286: </a>        }
-<a name="line287">287: </a>      }
-<a name="line288">288: </a>      nbot = ntop - 1;
-<a name="line289">289: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* Do an HZ iteration */</font>
-<a name="line290">290: </a>      its = its + 1;
-<a name="line291">291: </a>      nits = nits + 1;
-<a name="line292">292: </a>      tr = aa[nbot-1]*dd[nbot-1] + aa[nbot]*dd[nbot];
-<a name="line293">293: </a>      dt = dd[nbot-1]*dd[nbot]*(aa[nbot-1]*aa[nbot]-bb[nbot-1]*bb[nbot-1]);
-<a name="line294">294: </a>      <font color="#4169E1">for</font> (ntry=1;ntry<=6;ntry++) {
-<a name="line295">295: </a>        HZStep(ntop,nbot+1,tr,dt,aa,bb,dd,uu,nn,ld,&flag);
-<a name="line296">296: </a>        <font color="#4169E1">if</font> (!flag) <font color="#4169E1">break</font>;
-<a name="line297">297: </a>        <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ntry == 6)
-<a name="line298">298: </a>          SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Unable to complete hz step on six tries"</font>);
-<a name="line299">299: </a>        <font color="#4169E1">else</font> {
-<a name="line300">300: </a>          tr = 0.9*tr; dt = 0.81*dt;
-<a name="line301">301: </a>        }
-<a name="line302">302: </a>      }
-<a name="line303">303: </a>    }
-<a name="line304">304: </a>  }
-<a name="line305">305: </a>  <font color="#4169E1">return</font>(0);
-<a name="line306">306: </a>}
-
-<a name="line310">310: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_HZ"></a>PetscErrorCode DSSolve_GHIEP_HZ(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line311">311: </a>{
-<a name="line313">313: </a>  PetscInt       off;
-<a name="line314">314: </a>  PetscBLASInt   n1,ld;
-<a name="line315">315: </a>  PetscScalar    *A,*B,*Q;
-<a name="line316">316: </a>  PetscReal      *d,*e,*s;
-<a name="line317">317: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line318">318: </a>  PetscInt       i;
-<a name="line319">319: </a><font color="#A020F0">#endif</font>
-
-<a name="line322">322: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line324">324: </a><font color="#A020F0">#endif</font>
-<a name="line325">325: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line326">326: </a>  n1  = ds->n - ds->l;
-<a name="line327">327: </a>  off = ds->l + ds->l*ld;
-<a name="line328">328: </a>  A   = ds->mat[DS_MAT_A];
-<a name="line329">329: </a>  B   = ds->mat[DS_MAT_B];
-<a name="line330">330: </a>  Q   = ds->mat[DS_MAT_Q];
-<a name="line331">331: </a>  d   = ds->rmat[DS_MAT_T];
-<a name="line332">332: </a>  e   = ds->rmat[DS_MAT_T] + ld;
-<a name="line333">333: </a>  s   = ds->rmat[DS_MAT_D];
-<a name="line334">334: </a>  <font color="#B22222">/* Quick return */</font>
-<a name="line335">335: </a>  <font color="#4169E1">if</font> (n1 == 1) {
-<a name="line336">336: </a>    *(Q+off) = 1;
-<a name="line337">337: </a>    <font color="#4169E1">if</font> (ds->compact) {
-<a name="line338">338: </a>      wr[ds->l] = d[ds->l]/s[ds->l]; wi[ds->l] = 0.0;
-<a name="line339">339: </a>    } <font color="#4169E1">else</font> {
-<a name="line340">340: </a>      d[ds->l] = PetscRealPart(A[off]); s[ds->l] = PetscRealPart(B[off]);
-<a name="line341">341: </a>      wr[ds->l] = d[ds->l]/s[ds->l]; wi[ds->l] = 0.0;
-<a name="line342">342: </a>    }
-<a name="line343">343: </a>    <font color="#4169E1">return</font>(0);
-<a name="line344">344: </a>  }
-<a name="line345">345: </a>  <font color="#B22222">/* Reduce to pseudotriadiagonal form */</font>
-<a name="line346">346: </a>  DSIntermediate_GHIEP(ds);
-<a name="line347">347: </a>  HZIteration(ds->n,ds->l,d,e,s,Q,ld);
-<a name="line348">348: </a>  <font color="#4169E1">if</font> (!ds->compact) {
-<a name="line349">349: </a>    DSSwitchFormat_GHIEP(ds,PETSC_FALSE);
-<a name="line350">350: </a>  }
-<a name="line351">351: </a>  <font color="#B22222">/* Undo from diagonal the blocks whith real eigenvalues*/</font>
-<a name="line352">352: </a>  DSGHIEPRealBlocks(ds);
-
-<a name="line354">354: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
-<a name="line355">355: </a>  DSGHIEPComplexEigs(ds,0,ds->n,wr,wi);
-<a name="line356">356: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line357">357: </a>  <font color="#4169E1">if</font> (wi) {
-<a name="line358">358: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
-<a name="line359">359: </a>  }
-<a name="line360">360: </a><font color="#A020F0">#endif</font>
-<a name="line361">361: </a>  ds->t = ds->n;
-<a name="line362">362: </a>  <font color="#4169E1">return</font>(0);
-<a name="line363">363: </a>}
+<a name="line283">283: </a>        }
+<a name="line284">284: </a>      }
+<a name="line285">285: </a>      nbot = ntop - 1;
+<a name="line286">286: </a>    } <font color="#4169E1">else</font> {  <font color="#B22222">/* Do an HZ iteration */</font>
+<a name="line287">287: </a>      its = its + 1;
+<a name="line288">288: </a>      nits = nits + 1;
+<a name="line289">289: </a>      tr = aa[nbot-1]*dd[nbot-1] + aa[nbot]*dd[nbot];
+<a name="line290">290: </a>      dt = dd[nbot-1]*dd[nbot]*(aa[nbot-1]*aa[nbot]-bb[nbot-1]*bb[nbot-1]);
+<a name="line291">291: </a>      <font color="#4169E1">for</font> (ntry=1;ntry<=6;ntry++) {
+<a name="line292">292: </a>        HZStep(ntop,nbot+1,tr,dt,aa,bb,dd,uu,nn,ld,&flag);
+<a name="line293">293: </a>        <font color="#4169E1">if</font> (!flag) <font color="#4169E1">break</font>;
+<a name="line294">294: </a>        <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ntry == 6) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Unable to complete hz step on six tries"</font>);
+<a name="line295">295: </a>        <font color="#4169E1">else</font> {
+<a name="line296">296: </a>          tr = 0.9*tr; dt = 0.81*dt;
+<a name="line297">297: </a>        }
+<a name="line298">298: </a>      }
+<a name="line299">299: </a>    }
+<a name="line300">300: </a>  }
+<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
+<a name="line302">302: </a>}
+
+<a name="line306">306: </a><strong><font color="#4169E1"><a name="DSSolve_GHIEP_HZ"></a>PetscErrorCode DSSolve_GHIEP_HZ(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line307">307: </a>{
+<a name="line309">309: </a>  PetscInt       off;
+<a name="line310">310: </a>  PetscBLASInt   n1,ld;
+<a name="line311">311: </a>  PetscScalar    *A,*B,*Q;
+<a name="line312">312: </a>  PetscReal      *d,*e,*s;
+<a name="line313">313: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line314">314: </a>  PetscInt       i;
+<a name="line315">315: </a><font color="#A020F0">#endif</font>
+
+<a name="line318">318: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line320">320: </a><font color="#A020F0">#endif</font>
+<a name="line321">321: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line322">322: </a>  n1  = ds->n - ds->l;
+<a name="line323">323: </a>  off = ds->l + ds->l*ld;
+<a name="line324">324: </a>  A   = ds->mat[DS_MAT_A];
+<a name="line325">325: </a>  B   = ds->mat[DS_MAT_B];
+<a name="line326">326: </a>  Q   = ds->mat[DS_MAT_Q];
+<a name="line327">327: </a>  d   = ds->rmat[DS_MAT_T];
+<a name="line328">328: </a>  e   = ds->rmat[DS_MAT_T] + ld;
+<a name="line329">329: </a>  s   = ds->rmat[DS_MAT_D];
+<a name="line330">330: </a>  <font color="#B22222">/* Quick return */</font>
+<a name="line331">331: </a>  <font color="#4169E1">if</font> (n1 == 1) {
+<a name="line332">332: </a>    *(Q+off) = 1;
+<a name="line333">333: </a>    <font color="#4169E1">if</font> (ds->compact) {
+<a name="line334">334: </a>      wr[ds->l] = d[ds->l]/s[ds->l]; wi[ds->l] = 0.0;
+<a name="line335">335: </a>    } <font color="#4169E1">else</font> {
+<a name="line336">336: </a>      d[ds->l] = PetscRealPart(A[off]); s[ds->l] = PetscRealPart(B[off]);
+<a name="line337">337: </a>      wr[ds->l] = d[ds->l]/s[ds->l]; wi[ds->l] = 0.0;
+<a name="line338">338: </a>    }
+<a name="line339">339: </a>    <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>  }
+<a name="line341">341: </a>  <font color="#B22222">/* Reduce to pseudotriadiagonal form */</font>
+<a name="line342">342: </a>  DSIntermediate_GHIEP(ds);
+<a name="line343">343: </a>  HZIteration(ds->n,ds->l,d,e,s,Q,ld);
+<a name="line344">344: </a>  <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line345">345: </a>    DSSwitchFormat_GHIEP(ds,PETSC_FALSE);
+<a name="line346">346: </a>  }
+<a name="line347">347: </a>  <font color="#B22222">/* Undo from diagonal the blocks whith real eigenvalues*/</font>
+<a name="line348">348: </a>  DSGHIEPRealBlocks(ds);
+
+<a name="line350">350: </a>  <font color="#B22222">/* Recover eigenvalues from diagonal */</font>
+<a name="line351">351: </a>  DSGHIEPComplexEigs(ds,0,ds->n,wr,wi);
+<a name="line352">352: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line353">353: </a>  <font color="#4169E1">if</font> (wi) {
+<a name="line354">354: </a>    <font color="#4169E1">for</font> (i=ds->l;i<ds->n;i++) wi[i] = 0.0;
+<a name="line355">355: </a>  }
+<a name="line356">356: </a><font color="#A020F0">#endif</font>
+<a name="line357">357: </a>  ds->t = ds->n;
+<a name="line358">358: </a>  <font color="#4169E1">return</font>(0);
+<a name="line359">359: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/ghiep/index.html b/src/sys/classes/ds/impls/ghiep/index.html
index 0049b9b..23edd10 100644
--- a/src/sys/classes/ds/impls/ghiep/index.html
+++ b/src/sys/classes/ds/impls/ghiep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghiep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghiep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/ghiep/invit.c b/src/sys/classes/ds/impls/ghiep/invit.c
index 22317bb..dc269f9 100644
--- a/src/sys/classes/ds/impls/ghiep/invit.c
+++ b/src/sys/classes/ds/impls/ghiep/invit.c
@@ -2,7 +2,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -132,15 +132,15 @@ static PetscErrorCode HRApply(PetscInt n,PetscScalar *x1,PetscInt inc1,PetscScal
     s
     Q s-orthogonal matrix with Q^T*A*Q = T (symmetric tridiagonal matrix)
 */
-static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nwr,PetscBLASInt *iwork,PetscInt nwi)
+static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscReal *rwork,PetscBLASInt *iwork)
 {
-#if defined(PETSC_MISSING_LAPACK_LARFG) || defined(PETSC_MISSING_LAPACK_LARF)
+#if defined(SLEPC_MISSING_LAPACK_LARFG) || defined(SLEPC_MISSING_LAPACK_LARF)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LARFG/LARF - Lapack routines are unavailable");
 #else
   PetscErrorCode ierr;
   PetscInt       i,j,k,*ii,*jj,i0=0,ik=0,tmp,type;
-  PetscInt       nwall,nwu=0,nwallr,nwur=0,nwalli,nwui=0;
+  PetscInt       nwu=0;
   PetscReal      *ss,cond=1.0,cs,sn,r;
   PetscScalar    tau,t,*AA;
   PetscBLASInt   n0,n1,ni,inc=1,m,n_,lda_,ldq_,*perm;
@@ -158,16 +158,8 @@ static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,Pet
   ierr = PetscBLASIntCast(lda,&lda_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ldq,&ldq_);CHKERRQ(ierr);
-  nwall = n*n+n;
-  if (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",12);
-  nwallr = n;
-  if (!rwork || nwr<nwallr) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",14);
   ss = rwork;
-  nwur += n;
-  nwalli = n;
-  if (!iwork || nwi<nwalli) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",16);
   perm = iwork;
-  nwui += n;
   AA = work;
   for (i=0;i<n;i++) {
     ierr = PetscMemcpy(AA+i*n,A+i*lda,n*sizeof(PetscScalar));CHKERRQ(ierr);
@@ -316,15 +308,18 @@ static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,Pet
 
 #undef __FUNCT__
 #define __FUNCT__ "MadeHRtr"
-static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work,PetscInt lw)
+static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work)
 {
+#if defined(SLEPC_MISSING_LAPACK_LARFG) || defined(SLEPC_MISSING_LAPACK_LARF)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LARFG/LARF - Lapack routines are unavailable");
+#else
   PetscErrorCode ierr;
   PetscScalar    *x,*y;
   PetscReal       ncond2;
   PetscBLASInt   n0_,n1_,inc=1;
 
   PetscFunctionBegin;
-  if (lw<n) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",11);
   /* Hyperbolic transformation to make zeros in x */
   x = tr1->data;
   tr1->n[0] = n0;
@@ -390,6 +385,7 @@ static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,
     if (ncond2>*ncond) *ncond = ncond2;
   }
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -400,13 +396,17 @@ static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,
   transformation to H and R, if not, ok=false and it do nothing
   tolE, tolerance to exchange complex pairs to improve conditioning
 */
-static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work,PetscInt nw)
+static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work)
 {
+#if defined(SLEPC_MISSING_LAPACK_LARF)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LARF - Lapack routine is unavailable");
+#else
   PetscErrorCode ierr;
   struct HRtr    *tr1,*tr2,tr1_t,tr2_t,tr1_te,tr2_te;
   PetscScalar    *x,*y;
   PetscReal      ncond,ncond_e;
-  PetscInt       nwu=0,nwall,i,d=1;
+  PetscInt       nwu=0,i,d=1;
   PetscBLASInt   n0_,n1_,inc=1,mh,mr,n_,ldr_,ldh_;
   PetscReal      tolD = 1e+5;
 
@@ -415,8 +415,6 @@ static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,P
   ierr = PetscBLASIntCast(n,&n_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ldr,&ldr_);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ldh,&ldh_);CHKERRQ(ierr);
-  nwall = 5*n;
-  if (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",16);
   x = work+nwu;
   nwu += n;
   ierr = PetscMemcpy(x,R+j*ldr,n*sizeof(PetscScalar));CHKERRQ(ierr);
@@ -425,7 +423,7 @@ static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,P
   tr1_t.data = x;
   if (sz==1) {
     /* Hyperbolic transformation to make zeros in x */
-    ierr = MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,NULL,&ncond,work+nwu,nwall-nwu);CHKERRQ(ierr);
+    ierr = MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,NULL,&ncond,work+nwu);CHKERRQ(ierr);
     /* Check condition number to single column*/
     if (ncond>tolD) {
       *ok = PETSC_FALSE;
@@ -437,7 +435,7 @@ static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,P
     nwu += n;
     ierr = PetscMemcpy(y,R+(j+1)*ldr,n*sizeof(PetscScalar));CHKERRQ(ierr);
     tr2_t.data = y;
-    ierr = MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,&tr2_t,&ncond,work+nwu,nwall-nwu);CHKERRQ(ierr);
+    ierr = MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,&tr2_t,&ncond,work+nwu);CHKERRQ(ierr);
     /* Computing hyperbolic transformations also for exchanged vectors */
     tr1_te.data = work+nwu;
     nwu += n;
@@ -445,7 +443,7 @@ static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,P
     tr2_te.data = work+nwu;
     nwu += n;
     ierr = PetscMemcpy(tr2_te.data,R+j*ldr,n*sizeof(PetscScalar));CHKERRQ(ierr);
-    ierr = MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_te,&tr2_te,&ncond_e,work+nwu,nwall-nwu);CHKERRQ(ierr);
+    ierr = MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_te,&tr2_te,&ncond_e,work+nwu);CHKERRQ(ierr);
     if (ncond > d*ncond_e) {
       *exg = PETSC_TRUE;
       tr1 = &tr1_te;
@@ -543,6 +541,7 @@ static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,P
     }
   }
   PetscFunctionReturn(0);
+#endif
 }
 
 #undef __FUNCT__
@@ -550,17 +549,15 @@ static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,P
 /*
   compute V = HR whit H s-orthogonal and R upper triangular
 */
-static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work,PetscInt nw)
+static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work)
 {
   PetscErrorCode ierr;
-  PetscInt       i,j,n,n0,n1,np,idx0,idx1,sz=1,k=0,t1,t2,nwall,nwu=0;
+  PetscInt       i,j,n,n0,n1,np,idx0,idx1,sz=1,k=0,t1,t2,nwu=0;
   PetscScalar    *col1,*col2;
   PetscBool      exg=PETSC_FALSE,ok=PETSC_FALSE;
 
   PetscFunctionBegin;
   n = *nv;
-  nwall = 7*n;
-  if (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid argument %d",11);
   col1 = work+nwu;
   nwu += n;
   col2 = work+nwu;
@@ -593,11 +590,9 @@ static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,P
   for (i=0;i<n;i++) perm[i] = i;
   j = 0;
   while (j<n-k) {
-    if (cmplxEig) {
-      if (cmplxEig[j]==0) sz=1;
-      else sz=2;
-    }
-    ierr = TryHRIt(n,j,sz,V,ldv,R,ldr,s,&exg,&ok,&n0,&n1,&idx0,&idx1,NULL,work+nwu,nw-nwu);CHKERRQ(ierr);
+    if (cmplxEig[j]==0) sz=1;
+    else sz=2;
+    ierr = TryHRIt(n,j,sz,V,ldv,R,ldr,s,&exg,&ok,&n0,&n1,&idx0,&idx1,NULL,work+nwu);CHKERRQ(ierr);
     if (ok) {
       if (exg) cmplxEig[j] = -cmplxEig[j];
       j = j+sz;
@@ -679,7 +674,6 @@ PetscErrorCode DSGHIEPOrthogEigenv(DS ds,DSMatType mat,PetscScalar *wr,PetscScal
   perm = ds->iwork + nwui;
   nwui += n;
   cmplxEig = ds->iwork+nwui;
-  nwui += n;
   X = ds->mat[mat];
   for (i=0;i<n;i++) {
 #if defined(PETSC_USE_COMPLEX)
@@ -697,10 +691,9 @@ PetscErrorCode DSGHIEPOrthogEigenv(DS ds,DSMatType mat,PetscScalar *wr,PetscScal
   
   /* Perform HR decomposition */
   /* Hyperbolic rotators */
-  ierr = PseudoOrthog_HR(&nv,X+off,ld,s+l,R,ldr,perm,cmplxEig,NULL,ds->work+nwus,lws-nwus);CHKERRQ(ierr);
+  ierr = PseudoOrthog_HR(&nv,X+off,ld,s+l,R,ldr,perm,cmplxEig,NULL,ds->work+nwus);CHKERRQ(ierr);
   /* Sort wr,wi perm */ 
   ts = ds->work+nwus;
-  nwus += n;
   ierr = PetscMemcpy(ts,wr+l,n*sizeof(PetscScalar));CHKERRQ(ierr);
   for (i=0;i<n;i++) wr[i+l] = ts[perm[i]];
 #if !defined(PETSC_USE_COMPLEX)
@@ -757,7 +750,7 @@ PetscErrorCode DSIntermediate_GHIEP(DS ds)
 {
   PetscErrorCode ierr;
   PetscInt       i,ld,off;
-  PetscInt       nwall,nwallr,nwalli,nwu=0,nwur=0,nwui=0;
+  PetscInt       nwall,nwallr,nwalli;
   PetscScalar    *A,*B,*Q;
   PetscReal      *d,*e,*s;
 
@@ -780,14 +773,14 @@ PetscErrorCode DSIntermediate_GHIEP(DS ds)
   if (ds->compact) {
     if (ds->state < DS_STATE_INTERMEDIATE) {
       ierr = DSSwitchFormat_GHIEP(ds,PETSC_FALSE);CHKERRQ(ierr);
-      ierr = TridiagDiag_HHR(ds->k-ds->l+1,A+off,ld,s+ds->l,Q+off,ld,PETSC_TRUE,d+ds->l,e+ds->l,ds->perm,ds->work+nwu,nwall-nwu,ds->rwork+nwur,nwallr-nwur,ds->iwork+nwui,nwalli-nwui);CHKERRQ(ierr);
+      ierr = TridiagDiag_HHR(ds->k-ds->l+1,A+off,ld,s+ds->l,Q+off,ld,PETSC_TRUE,d+ds->l,e+ds->l,ds->perm,ds->work,ds->rwork,ds->iwork);CHKERRQ(ierr);
       ds->k = ds->l;
       ierr = PetscMemzero(d+2*ld+ds->l,(ds->n-ds->l)*sizeof(PetscReal));CHKERRQ(ierr);
     }
   } else {
     if (ds->state < DS_STATE_INTERMEDIATE) {
       for (i=0;i<ds->n;i++) s[i] = PetscRealPart(B[i+i*ld]);
-      ierr = TridiagDiag_HHR(ds->n-ds->l,A+off,ld,s+ds->l,Q+off,ld,PETSC_FALSE,d+ds->l,e+ds->l,ds->perm,ds->work+nwu,nwall-nwu,ds->rwork+nwur,nwallr-nwur,ds->iwork+nwui,nwalli-nwui);CHKERRQ(ierr);
+      ierr = TridiagDiag_HHR(ds->n-ds->l,A+off,ld,s+ds->l,Q+off,ld,PETSC_FALSE,d+ds->l,e+ds->l,ds->perm,ds->work,ds->rwork,ds->iwork);CHKERRQ(ierr);
       ierr = PetscMemzero(d+2*ld,(ds->n)*sizeof(PetscReal));CHKERRQ(ierr);
       ds->k = ds->l;
       ierr = DSSwitchFormat_GHIEP(ds,PETSC_FALSE);CHKERRQ(ierr);
diff --git a/src/sys/classes/ds/impls/ghiep/invit.c.html b/src/sys/classes/ds/impls/ghiep/invit.c.html
index 03b0c8b..3d127b2 100644
--- a/src/sys/classes/ds/impls/ghiep/invit.c.html
+++ b/src/sys/classes/ds/impls/ghiep/invit.c.html
@@ -4,17 +4,17 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghiep/invit.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:54+00:00">
+<meta name="date" content="2016-05-16T10:31:45+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghiep/invit.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghiep/invit.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 
 <a name="line3">  3: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line4">  4: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line5">  5: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line5">  5: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line7">  7: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -136,13 +136,13 @@
 <a name="line132">132: </a><font color="#B22222">    s</font>
 <a name="line133">133: </a><font color="#B22222">    Q s-orthogonal matrix with Q^T*A*Q = T (symmetric tridiagonal matrix)</font>
 <a name="line134">134: </a><font color="#B22222">*/</font>
-<a name="line135">135: </a><strong><font color="#4169E1"><a name="TridiagDiag_HHR"></a>static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscInt nw,PetscReal *rwork,PetscInt nwr,PetscBLASInt *iwork,PetscInt nwi)</font></strong>
+<a name="line135">135: </a><strong><font color="#4169E1"><a name="TridiagDiag_HHR"></a>static PetscErrorCode TridiagDiag_HHR(PetscInt n,PetscScalar *A,PetscInt lda,PetscReal *s,PetscScalar* Q,PetscInt ldq,PetscBool flip,PetscReal *d,PetscReal *e,PetscInt *perm_,PetscScalar *work,PetscReal *rwork,PetscBLASInt *iwork)</font></strong>
 <a name="line136">136: </a>{
-<a name="line137">137: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_LARFG) || defined(PETSC_MISSING_LAPACK_LARF)</font>
+<a name="line137">137: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LARFG) || defined(SLEPC_MISSING_LAPACK_LARF)</font>
 <a name="line139">139: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LARFG/LARF - Lapack routines are unavailable"</font>);
 <a name="line140">140: </a><font color="#A020F0">#else</font>
 <a name="line142">142: </a>  PetscInt       i,j,k,*ii,*jj,i0=0,ik=0,tmp,type;
-<a name="line143">143: </a>  PetscInt       nwall,nwu=0,nwallr,nwur=0,nwalli,nwui=0;
+<a name="line143">143: </a>  PetscInt       nwu=0;
 <a name="line144">144: </a>  PetscReal      *ss,cond=1.0,cs,sn,r;
 <a name="line145">145: </a>  PetscScalar    tau,t,*AA;
 <a name="line146">146: </a>  PetscBLASInt   n0,n1,ni,inc=1,m,n_,lda_,ldq_,*perm;
@@ -159,248 +159,246 @@
 <a name="line158">158: </a>  PetscBLASIntCast(lda,&lda_);
 <a name="line159">159: </a>  PetscBLASIntCast(n,&n_);
 <a name="line160">160: </a>  PetscBLASIntCast(ldq,&ldq_);
-<a name="line161">161: </a>  nwall = n*n+n;
-<a name="line162">162: </a>  <font color="#4169E1">if</font> (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,12);
-<a name="line163">163: </a>  nwallr = n;
-<a name="line164">164: </a>  <font color="#4169E1">if</font> (!rwork || nwr<nwallr) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,14);
-<a name="line165">165: </a>  ss = rwork;
-<a name="line166">166: </a>  nwur += n;
-<a name="line167">167: </a>  nwalli = n;
-<a name="line168">168: </a>  <font color="#4169E1">if</font> (!iwork || nwi<nwalli) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,16);
-<a name="line169">169: </a>  perm = iwork;
-<a name="line170">170: </a>  nwui += n;
-<a name="line171">171: </a>  AA = work;
-<a name="line172">172: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line173">173: </a>    PetscMemcpy(AA+i*n,A+i*lda,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line174">174: </a>  }
-<a name="line175">175: </a>  nwu += n*n;
-<a name="line176">176: </a>  k=0;
-<a name="line177">177: </a>  <font color="#4169E1">while</font> (breakdown && k<n) {
-<a name="line178">178: </a>    breakdown = PETSC_FALSE;
-<a name="line179">179: </a>    <font color="#B22222">/* Classify (and flip) A and s according to sign */</font>
-<a name="line180">180: </a>    <font color="#4169E1">if</font> (flip) {
-<a name="line181">181: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line182">182: </a>        perm[i] = n-1-perm_[i];
-<a name="line183">183: </a>        <font color="#4169E1">if</font> (perm[i]==0) i0 = i;
-<a name="line184">184: </a>        <font color="#4169E1">if</font> (perm[i]==k) ik = i;
-<a name="line185">185: </a>      }
-<a name="line186">186: </a>    } <font color="#4169E1">else</font> {
-<a name="line187">187: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line188">188: </a>        perm[i] = perm_[i];
-<a name="line189">189: </a>        <font color="#4169E1">if</font> (perm[i]==0) i0 = i;
-<a name="line190">190: </a>        <font color="#4169E1">if</font> (perm[i]==k) ik = i;
-<a name="line191">191: </a>      }
-<a name="line192">192: </a>    }
-<a name="line193">193: </a>    perm[ik] = 0;
-<a name="line194">194: </a>    perm[i0] = k;
-<a name="line195">195: </a>    i=1;
-<a name="line196">196: </a>    <font color="#4169E1">while</font> (i<n-1 && s[perm[i-1]]==s[perm[0]]) {
-<a name="line197">197: </a>      <font color="#4169E1">if</font> (s[perm[i]]!=s[perm[0]]) {
-<a name="line198">198: </a>        j=i+1;
-<a name="line199">199: </a>        <font color="#4169E1">while</font> (j<n-1 && s[perm[j]]!=s[perm[0]])j++;
-<a name="line200">200: </a>        tmp = perm[i]; perm[i] = perm[j]; perm[j] = tmp;
-<a name="line201">201: </a>      }
-<a name="line202">202: </a>      i++;
-<a name="line203">203: </a>    }
-<a name="line204">204: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line205">205: </a>      ss[i] = s[perm[i]];
-<a name="line206">206: </a>    }
-<a name="line207">207: </a>    <font color="#4169E1">if</font> (flip) {
-<a name="line208">208: </a>      ii = &j;
-<a name="line209">209: </a>      jj = &i;
-<a name="line210">210: </a>    } <font color="#4169E1">else</font> {
-<a name="line211">211: </a>      ii = &i;
-<a name="line212">212: </a>      jj = &j;
+<a name="line161">161: </a>  ss = rwork;
+<a name="line162">162: </a>  perm = iwork;
+<a name="line163">163: </a>  AA = work;
+<a name="line164">164: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line165">165: </a>    PetscMemcpy(AA+i*n,A+i*lda,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line166">166: </a>  }
+<a name="line167">167: </a>  nwu += n*n;
+<a name="line168">168: </a>  k=0;
+<a name="line169">169: </a>  <font color="#4169E1">while</font> (breakdown && k<n) {
+<a name="line170">170: </a>    breakdown = PETSC_FALSE;
+<a name="line171">171: </a>    <font color="#B22222">/* Classify (and flip) A and s according to sign */</font>
+<a name="line172">172: </a>    <font color="#4169E1">if</font> (flip) {
+<a name="line173">173: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line174">174: </a>        perm[i] = n-1-perm_[i];
+<a name="line175">175: </a>        <font color="#4169E1">if</font> (perm[i]==0) i0 = i;
+<a name="line176">176: </a>        <font color="#4169E1">if</font> (perm[i]==k) ik = i;
+<a name="line177">177: </a>      }
+<a name="line178">178: </a>    } <font color="#4169E1">else</font> {
+<a name="line179">179: </a>      <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line180">180: </a>        perm[i] = perm_[i];
+<a name="line181">181: </a>        <font color="#4169E1">if</font> (perm[i]==0) i0 = i;
+<a name="line182">182: </a>        <font color="#4169E1">if</font> (perm[i]==k) ik = i;
+<a name="line183">183: </a>      }
+<a name="line184">184: </a>    }
+<a name="line185">185: </a>    perm[ik] = 0;
+<a name="line186">186: </a>    perm[i0] = k;
+<a name="line187">187: </a>    i=1;
+<a name="line188">188: </a>    <font color="#4169E1">while</font> (i<n-1 && s[perm[i-1]]==s[perm[0]]) {
+<a name="line189">189: </a>      <font color="#4169E1">if</font> (s[perm[i]]!=s[perm[0]]) {
+<a name="line190">190: </a>        j=i+1;
+<a name="line191">191: </a>        <font color="#4169E1">while</font> (j<n-1 && s[perm[j]]!=s[perm[0]])j++;
+<a name="line192">192: </a>        tmp = perm[i]; perm[i] = perm[j]; perm[j] = tmp;
+<a name="line193">193: </a>      }
+<a name="line194">194: </a>      i++;
+<a name="line195">195: </a>    }
+<a name="line196">196: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line197">197: </a>      ss[i] = s[perm[i]];
+<a name="line198">198: </a>    }
+<a name="line199">199: </a>    <font color="#4169E1">if</font> (flip) {
+<a name="line200">200: </a>      ii = &j;
+<a name="line201">201: </a>      jj = &i;
+<a name="line202">202: </a>    } <font color="#4169E1">else</font> {
+<a name="line203">203: </a>      ii = &i;
+<a name="line204">204: </a>      jj = &j;
+<a name="line205">205: </a>    }
+<a name="line206">206: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
+<a name="line207">207: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++)
+<a name="line208">208: </a>        A[i+j*lda] = AA[perm[*ii]+perm[*jj]*n];
+<a name="line209">209: </a>    <font color="#B22222">/* Initialize Q */</font>
+<a name="line210">210: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line211">211: </a>      PetscMemzero(Q+i*ldq,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line212">212: </a>      Q[perm[i]+i*ldq] = 1.0;
 <a name="line213">213: </a>    }
-<a name="line214">214: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
-<a name="line215">215: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++)
-<a name="line216">216: </a>        A[i+j*lda] = AA[perm[*ii]+perm[*jj]*n];
-<a name="line217">217: </a>    <font color="#B22222">/* Initialize Q */</font>
-<a name="line218">218: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line219">219: </a>      PetscMemzero(Q+i*ldq,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line220">220: </a>      Q[perm[i]+i*ldq] = 1.0;
-<a name="line221">221: </a>    }
-<a name="line222">222: </a>    <font color="#4169E1">for</font> (ni=1;ni<n && ss[ni]==ss[0]; ni++);
-<a name="line223">223: </a>    n0 = ni-1;
-<a name="line224">224: </a>    n1 = n_-ni;
-<a name="line225">225: </a>    <font color="#4169E1">for</font> (j=0;j<n-2;j++) {
-<a name="line226">226: </a>      PetscBLASIntCast(n-j-1,&m);
-<a name="line227">227: </a>      <font color="#B22222">/* Forming and applying reflectors */</font>
-<a name="line228">228: </a>      <font color="#4169E1">if</font> (n0 > 1) {
-<a name="line229">229: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n0,A+ni-n0+j*lda,A+ni-n0+j*lda+1,&inc,&tau));
-<a name="line230">230: </a>        <font color="#B22222">/* Apply reflector */</font>
-<a name="line231">231: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(tau) != 0.0) {
-<a name="line232">232: </a>          t=*(A+ni-n0+j*lda);  *(A+ni-n0+j*lda)=1.0;
-<a name="line233">233: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&m,&n0,A+ni-n0+j*lda,&inc,&tau,A+j+1+(j+1)*lda,&lda_,work+nwu));
-<a name="line234">234: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0,&m,A+ni-n0+j*lda,&inc,&tau,A+j+1+(j+1)*lda,&lda_,work+nwu));
-<a name="line235">235: </a>          <font color="#B22222">/* Update Q */</font>
-<a name="line236">236: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n0,A+ni-n0+j*lda,&inc,&tau,Q+(j+1)*ldq,&ldq_,work+nwu));
-<a name="line237">237: </a>          *(A+ni-n0+j*lda) = t;
-<a name="line238">238: </a>          <font color="#4169E1">for</font> (i=1;i<n0;i++) {
-<a name="line239">239: </a>            *(A+ni-n0+j*lda+i) = 0.0;  *(A+j+(ni-n0+i)*lda) = 0.0;
-<a name="line240">240: </a>          }
-<a name="line241">241: </a>          *(A+j+(ni-n0)*lda) = *(A+ni-n0+j*lda);
-<a name="line242">242: </a>        }
-<a name="line243">243: </a>      }
-<a name="line244">244: </a>      <font color="#4169E1">if</font> (n1 > 1) {
-<a name="line245">245: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n1,A+n-n1+j*lda,A+n-n1+j*lda+1,&inc,&tau));
-<a name="line246">246: </a>        <font color="#B22222">/* Apply reflector */</font>
-<a name="line247">247: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(tau) != 0.0) {
-<a name="line248">248: </a>          t=*(A+n-n1+j*lda);  *(A+n-n1+j*lda)=1.0;
-<a name="line249">249: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&m,&n1,A+n-n1+j*lda,&inc,&tau,A+j+1+(n-n1)*lda,&lda_,work+nwu));
-<a name="line250">250: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1,&m,A+n-n1+j*lda,&inc,&tau,A+n-n1+(j+1)*lda,&lda_,work+nwu));
-<a name="line251">251: </a>          <font color="#B22222">/* Update Q */</font>
-<a name="line252">252: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n1,A+n-n1+j*lda,&inc,&tau,Q+(n-n1)*ldq,&ldq_,work+nwu));
-<a name="line253">253: </a>          *(A+n-n1+j*lda) = t;
-<a name="line254">254: </a>          <font color="#4169E1">for</font> (i=1;i<n1;i++) {
-<a name="line255">255: </a>            *(A+n-n1+i+j*lda) = 0.0;  *(A+j+(n-n1+i)*lda) = 0.0;
-<a name="line256">256: </a>          }
-<a name="line257">257: </a>          *(A+j+(n-n1)*lda) = *(A+n-n1+j*lda);
-<a name="line258">258: </a>        }
-<a name="line259">259: </a>      }
-<a name="line260">260: </a>      <font color="#B22222">/* Hyperbolic rotation */</font>
-<a name="line261">261: </a>      <font color="#4169E1">if</font> (n0 > 0 && n1 > 0) {
-<a name="line262">262: </a>        HRGen(PetscRealPart(A[ni-n0+j*lda]),PetscRealPart(A[n-n1+j*lda]),&type,&cs,&sn,&r,&cond);
-<a name="line263">263: </a>        <font color="#B22222">/* Check condition number */</font>
-<a name="line264">264: </a>        <font color="#4169E1">if</font> (cond > 1.0/(10*PETSC_SQRT_MACHINE_EPSILON)) {
-<a name="line265">265: </a>          breakdown = PETSC_TRUE;
-<a name="line266">266: </a>          k++;
-<a name="line267">267: </a>          <font color="#4169E1">if</font> (k==n || flip)
-<a name="line268">268: </a>            SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Breakdown in construction of hyperbolic transformation"</font>);
-<a name="line269">269: </a>          <font color="#4169E1">break</font>;
-<a name="line270">270: </a>        }
-<a name="line271">271: </a>        A[ni-n0+j*lda] = r; A[n-n1+j*lda] = 0.0;
-<a name="line272">272: </a>        A[j+(ni-n0)*lda] = r; A[j+(n-n1)*lda] = 0.0;
-<a name="line273">273: </a>        <font color="#B22222">/* Apply to A */</font>
-<a name="line274">274: </a>        HRApply(m,A+j+1+(ni-n0)*lda,1,A+j+1+(n-n1)*lda,1,cs,-sn);
-<a name="line275">275: </a>        HRApply(m,A+ni-n0+(j+1)*lda,lda,A+n-n1+(j+1)*lda,lda,cs,-sn);
+<a name="line214">214: </a>    <font color="#4169E1">for</font> (ni=1;ni<n && ss[ni]==ss[0]; ni++);
+<a name="line215">215: </a>    n0 = ni-1;
+<a name="line216">216: </a>    n1 = n_-ni;
+<a name="line217">217: </a>    <font color="#4169E1">for</font> (j=0;j<n-2;j++) {
+<a name="line218">218: </a>      PetscBLASIntCast(n-j-1,&m);
+<a name="line219">219: </a>      <font color="#B22222">/* Forming and applying reflectors */</font>
+<a name="line220">220: </a>      <font color="#4169E1">if</font> (n0 > 1) {
+<a name="line221">221: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n0,A+ni-n0+j*lda,A+ni-n0+j*lda+1,&inc,&tau));
+<a name="line222">222: </a>        <font color="#B22222">/* Apply reflector */</font>
+<a name="line223">223: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(tau) != 0.0) {
+<a name="line224">224: </a>          t=*(A+ni-n0+j*lda);  *(A+ni-n0+j*lda)=1.0;
+<a name="line225">225: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&m,&n0,A+ni-n0+j*lda,&inc,&tau,A+j+1+(j+1)*lda,&lda_,work+nwu));
+<a name="line226">226: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0,&m,A+ni-n0+j*lda,&inc,&tau,A+j+1+(j+1)*lda,&lda_,work+nwu));
+<a name="line227">227: </a>          <font color="#B22222">/* Update Q */</font>
+<a name="line228">228: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n0,A+ni-n0+j*lda,&inc,&tau,Q+(j+1)*ldq,&ldq_,work+nwu));
+<a name="line229">229: </a>          *(A+ni-n0+j*lda) = t;
+<a name="line230">230: </a>          <font color="#4169E1">for</font> (i=1;i<n0;i++) {
+<a name="line231">231: </a>            *(A+ni-n0+j*lda+i) = 0.0;  *(A+j+(ni-n0+i)*lda) = 0.0;
+<a name="line232">232: </a>          }
+<a name="line233">233: </a>          *(A+j+(ni-n0)*lda) = *(A+ni-n0+j*lda);
+<a name="line234">234: </a>        }
+<a name="line235">235: </a>      }
+<a name="line236">236: </a>      <font color="#4169E1">if</font> (n1 > 1) {
+<a name="line237">237: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n1,A+n-n1+j*lda,A+n-n1+j*lda+1,&inc,&tau));
+<a name="line238">238: </a>        <font color="#B22222">/* Apply reflector */</font>
+<a name="line239">239: </a>        <font color="#4169E1">if</font> (PetscAbsScalar(tau) != 0.0) {
+<a name="line240">240: </a>          t=*(A+n-n1+j*lda);  *(A+n-n1+j*lda)=1.0;
+<a name="line241">241: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&m,&n1,A+n-n1+j*lda,&inc,&tau,A+j+1+(n-n1)*lda,&lda_,work+nwu));
+<a name="line242">242: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1,&m,A+n-n1+j*lda,&inc,&tau,A+n-n1+(j+1)*lda,&lda_,work+nwu));
+<a name="line243">243: </a>          <font color="#B22222">/* Update Q */</font>
+<a name="line244">244: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n1,A+n-n1+j*lda,&inc,&tau,Q+(n-n1)*ldq,&ldq_,work+nwu));
+<a name="line245">245: </a>          *(A+n-n1+j*lda) = t;
+<a name="line246">246: </a>          <font color="#4169E1">for</font> (i=1;i<n1;i++) {
+<a name="line247">247: </a>            *(A+n-n1+i+j*lda) = 0.0;  *(A+j+(n-n1+i)*lda) = 0.0;
+<a name="line248">248: </a>          }
+<a name="line249">249: </a>          *(A+j+(n-n1)*lda) = *(A+n-n1+j*lda);
+<a name="line250">250: </a>        }
+<a name="line251">251: </a>      }
+<a name="line252">252: </a>      <font color="#B22222">/* Hyperbolic rotation */</font>
+<a name="line253">253: </a>      <font color="#4169E1">if</font> (n0 > 0 && n1 > 0) {
+<a name="line254">254: </a>        HRGen(PetscRealPart(A[ni-n0+j*lda]),PetscRealPart(A[n-n1+j*lda]),&type,&cs,&sn,&r,&cond);
+<a name="line255">255: </a>        <font color="#B22222">/* Check condition number */</font>
+<a name="line256">256: </a>        <font color="#4169E1">if</font> (cond > 1.0/(10*PETSC_SQRT_MACHINE_EPSILON)) {
+<a name="line257">257: </a>          breakdown = PETSC_TRUE;
+<a name="line258">258: </a>          k++;
+<a name="line259">259: </a>          <font color="#4169E1">if</font> (k==n || flip)
+<a name="line260">260: </a>            SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Breakdown in construction of hyperbolic transformation"</font>);
+<a name="line261">261: </a>          <font color="#4169E1">break</font>;
+<a name="line262">262: </a>        }
+<a name="line263">263: </a>        A[ni-n0+j*lda] = r; A[n-n1+j*lda] = 0.0;
+<a name="line264">264: </a>        A[j+(ni-n0)*lda] = r; A[j+(n-n1)*lda] = 0.0;
+<a name="line265">265: </a>        <font color="#B22222">/* Apply to A */</font>
+<a name="line266">266: </a>        HRApply(m,A+j+1+(ni-n0)*lda,1,A+j+1+(n-n1)*lda,1,cs,-sn);
+<a name="line267">267: </a>        HRApply(m,A+ni-n0+(j+1)*lda,lda,A+n-n1+(j+1)*lda,lda,cs,-sn);
 
-<a name="line277">277: </a>        <font color="#B22222">/* Update Q */</font>
-<a name="line278">278: </a>        HRApply(n,Q+(ni-n0)*ldq,1,Q+(n-n1)*ldq,1,cs,-sn);
-<a name="line279">279: </a>        <font color="#4169E1">if</font> (type==2) {
-<a name="line280">280: </a>          ss[ni-n0] = -ss[ni-n0]; ss[n-n1] = -ss[n-n1];
-<a name="line281">281: </a>          n0++;ni++;n1--;
-<a name="line282">282: </a>        }
-<a name="line283">283: </a>      }
-<a name="line284">284: </a>      <font color="#4169E1">if</font> (n0>0) n0--;
-<a name="line285">285: </a>      <font color="#4169E1">else</font> n1--;
-<a name="line286">286: </a>    }
-<a name="line287">287: </a>  }
+<a name="line269">269: </a>        <font color="#B22222">/* Update Q */</font>
+<a name="line270">270: </a>        HRApply(n,Q+(ni-n0)*ldq,1,Q+(n-n1)*ldq,1,cs,-sn);
+<a name="line271">271: </a>        <font color="#4169E1">if</font> (type==2) {
+<a name="line272">272: </a>          ss[ni-n0] = -ss[ni-n0]; ss[n-n1] = -ss[n-n1];
+<a name="line273">273: </a>          n0++;ni++;n1--;
+<a name="line274">274: </a>        }
+<a name="line275">275: </a>      }
+<a name="line276">276: </a>      <font color="#4169E1">if</font> (n0>0) n0--;
+<a name="line277">277: </a>      <font color="#4169E1">else</font> n1--;
+<a name="line278">278: </a>    }
+<a name="line279">279: </a>  }
 
-<a name="line289">289: </a>  <font color="#B22222">/* flip matrices */</font>
-<a name="line290">290: </a>  <font color="#4169E1">if</font> (flip) {
-<a name="line291">291: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line292">292: </a>      d[i] = PetscRealPart(A[n-i-1+(n-i-1)*lda]);
-<a name="line293">293: </a>      e[i] = PetscRealPart(A[n-i-1+(n-i-2)*lda]);
-<a name="line294">294: </a>      s[i] = ss[n-i-1];
-<a name="line295">295: </a>    }
-<a name="line296">296: </a>    s[n-1] = ss[0];
-<a name="line297">297: </a>    d[n-1] = PetscRealPart(A[0]);
-<a name="line298">298: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line299">299: </a>      ierr=PetscMemcpy(work+i*n,Q+i*ldq,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line300">300: </a>    }
-<a name="line301">301: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
-<a name="line302">302: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++)
-<a name="line303">303: </a>        Q[i+j*ldq] = work[i+(n-j-1)*n];
-<a name="line304">304: </a>  } <font color="#4169E1">else</font> {
-<a name="line305">305: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
-<a name="line306">306: </a>      d[i] = PetscRealPart(A[i+i*lda]);
-<a name="line307">307: </a>      e[i] = PetscRealPart(A[i+1+i*lda]);
-<a name="line308">308: </a>      s[i] = ss[i];
-<a name="line309">309: </a>    }
-<a name="line310">310: </a>    s[n-1] = ss[n-1];
-<a name="line311">311: </a>    d[n-1] = PetscRealPart(A[n-1 + (n-1)*lda]);
-<a name="line312">312: </a>  }
-<a name="line313">313: </a>  <font color="#4169E1">return</font>(0);
-<a name="line314">314: </a><font color="#A020F0">#endif</font>
-<a name="line315">315: </a>}
+<a name="line281">281: </a>  <font color="#B22222">/* flip matrices */</font>
+<a name="line282">282: </a>  <font color="#4169E1">if</font> (flip) {
+<a name="line283">283: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line284">284: </a>      d[i] = PetscRealPart(A[n-i-1+(n-i-1)*lda]);
+<a name="line285">285: </a>      e[i] = PetscRealPart(A[n-i-1+(n-i-2)*lda]);
+<a name="line286">286: </a>      s[i] = ss[n-i-1];
+<a name="line287">287: </a>    }
+<a name="line288">288: </a>    s[n-1] = ss[0];
+<a name="line289">289: </a>    d[n-1] = PetscRealPart(A[0]);
+<a name="line290">290: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line291">291: </a>      ierr=PetscMemcpy(work+i*n,Q+i*ldq,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line292">292: </a>    }
+<a name="line293">293: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
+<a name="line294">294: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++)
+<a name="line295">295: </a>        Q[i+j*ldq] = work[i+(n-j-1)*n];
+<a name="line296">296: </a>  } <font color="#4169E1">else</font> {
+<a name="line297">297: </a>    <font color="#4169E1">for</font> (i=0;i<n-1;i++) {
+<a name="line298">298: </a>      d[i] = PetscRealPart(A[i+i*lda]);
+<a name="line299">299: </a>      e[i] = PetscRealPart(A[i+1+i*lda]);
+<a name="line300">300: </a>      s[i] = ss[i];
+<a name="line301">301: </a>    }
+<a name="line302">302: </a>    s[n-1] = ss[n-1];
+<a name="line303">303: </a>    d[n-1] = PetscRealPart(A[n-1 + (n-1)*lda]);
+<a name="line304">304: </a>  }
+<a name="line305">305: </a>  <font color="#4169E1">return</font>(0);
+<a name="line306">306: </a><font color="#A020F0">#endif</font>
+<a name="line307">307: </a>}
 
-<a name="line319">319: </a><strong><font color="#4169E1"><a name="MadeHRtr"></a>static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work,PetscInt lw)</font></strong>
-<a name="line320">320: </a>{
-<a name="line322">322: </a>  PetscScalar    *x,*y;
-<a name="line323">323: </a>  PetscReal       ncond2;
-<a name="line324">324: </a>  PetscBLASInt   n0_,n1_,inc=1;
+<a name="line311">311: </a><strong><font color="#4169E1"><a name="MadeHRtr"></a>static PetscErrorCode MadeHRtr(PetscInt sz,PetscInt n,PetscInt idx0,PetscInt n0,PetscInt idx1,PetscInt n1,struct HRtr *tr1,struct HRtr *tr2,PetscReal *ncond,PetscScalar *work)</font></strong>
+<a name="line312">312: </a>{
+<a name="line313">313: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LARFG) || defined(SLEPC_MISSING_LAPACK_LARF)</font>
+<a name="line315">315: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LARFG/LARF - Lapack routines are unavailable"</font>);
+<a name="line316">316: </a><font color="#A020F0">#else</font>
+<a name="line318">318: </a>  PetscScalar    *x,*y;
+<a name="line319">319: </a>  PetscReal       ncond2;
+<a name="line320">320: </a>  PetscBLASInt   n0_,n1_,inc=1;
 
-<a name="line327">327: </a>  <font color="#4169E1">if</font> (lw<n) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,11);
-<a name="line328">328: </a>  <font color="#B22222">/* Hyperbolic transformation to make zeros in x */</font>
-<a name="line329">329: </a>  x = tr1->data;
-<a name="line330">330: </a>  tr1->n[0] = n0;
-<a name="line331">331: </a>  tr1->n[1] = n1;
-<a name="line332">332: </a>  tr1->idx[0] = idx0;
-<a name="line333">333: </a>  tr1->idx[1] = idx1;
-<a name="line334">334: </a>  PetscBLASIntCast(tr1->n[0],&n0_);
-<a name="line335">335: </a>  PetscBLASIntCast(tr1->n[1],&n1_);
-<a name="line336">336: </a>  <font color="#4169E1">if</font> (tr1->n[0] > 1) {
-<a name="line337">337: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n0_,x+tr1->idx[0],x+tr1->idx[0]+1,&inc,tr1->tau));
-<a name="line338">338: </a>  }
-<a name="line339">339: </a>  <font color="#4169E1">if</font> (tr1->n[1]> 1) {
-<a name="line340">340: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n1_,x+tr1->idx[1],x+tr1->idx[1]+1,&inc,tr1->tau+1));
-<a name="line341">341: </a>  }
-<a name="line342">342: </a>  <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1]) {
-<a name="line343">343: </a>    HRGen(PetscRealPart(x[tr1->idx[0]]),PetscRealPart(x[tr1->idx[1]]),&(tr1->type),&(tr1->cs),&(tr1->sn),&(tr1->alpha),ncond);  
-<a name="line344">344: </a>  } <font color="#4169E1">else</font> {
-<a name="line345">345: </a>    tr1->alpha = PetscRealPart(x[tr1->idx[0]]);
-<a name="line346">346: </a>    *ncond = 1.0;
-<a name="line347">347: </a>  }
-<a name="line348">348: </a>  <font color="#4169E1">if</font> (sz==2) {
-<a name="line349">349: </a>    y = tr2->data;
-<a name="line350">350: </a>    <font color="#B22222">/* Apply first transformation to second column */</font>
-<a name="line351">351: </a>    <font color="#4169E1">if</font> (tr1->n[0] > 1 && PetscAbsScalar(tr1->tau[0])!=0.0) {
-<a name="line352">352: </a>      x[tr1->idx[0]] = 1.0;
-<a name="line353">353: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0_,&inc,x+tr1->idx[0],&inc,tr1->tau,y+tr1->idx[0],&n0_,work));
-<a name="line354">354: </a>    }
-<a name="line355">355: </a>    <font color="#4169E1">if</font> (tr1->n[1] > 1 && PetscAbsScalar(tr1->tau[1])!=0.0) {
-<a name="line356">356: </a>      x[tr1->idx[1]] = 1.0;
-<a name="line357">357: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1_,&inc,x+tr1->idx[1],&inc,tr1->tau+1,y+tr1->idx[1],&n1_,work));
-<a name="line358">358: </a>    }
-<a name="line359">359: </a>    <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1]) {
-<a name="line360">360: </a>      HRApply(1,y+tr1->idx[0],1,y+tr1->idx[1],1,tr1->cs,-tr1->sn);
-<a name="line361">361: </a>    }
-<a name="line362">362: </a>    tr2->n[0] = tr1->n[0];
-<a name="line363">363: </a>    tr2->n[1] = tr1->n[1];
-<a name="line364">364: </a>    tr2->idx[0] = tr1->idx[0];
-<a name="line365">365: </a>    tr2->idx[1] = tr1->idx[1];
-<a name="line366">366: </a>    <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1] && tr1->type==2) {
-<a name="line367">367: </a>      tr2->idx[1]++; tr2->n[1]--; tr2->n[0]++;
-<a name="line368">368: </a>    }
-<a name="line369">369: </a>    <font color="#4169E1">if</font> (tr2->n[0]>0) {
-<a name="line370">370: </a>      tr2->n[0]--; tr2->idx[0]++;
-<a name="line371">371: </a>      <font color="#4169E1">if</font> (tr2->n[1]==0) tr2->idx[1] = tr2->idx[0];
-<a name="line372">372: </a>    } <font color="#4169E1">else</font> {
-<a name="line373">373: </a>      tr2->n[1]--; tr2->idx[1]++; tr2->idx[0] = tr2->idx[1];
-<a name="line374">374: </a>    }
-<a name="line375">375: </a>    <font color="#B22222">/* Hyperbolic transformation to make zeros in y */</font>
-<a name="line376">376: </a>    PetscBLASIntCast(tr2->n[0],&n0_);
-<a name="line377">377: </a>    PetscBLASIntCast(tr2->n[1],&n1_);
-<a name="line378">378: </a>    <font color="#4169E1">if</font> (tr2->n[0] > 1) {
-<a name="line379">379: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n0_,y+tr2->idx[0],y+tr2->idx[0]+1,&inc,tr2->tau));
-<a name="line380">380: </a>    }
-<a name="line381">381: </a>    <font color="#4169E1">if</font> (tr2->n[1]> 1) {
-<a name="line382">382: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n1_,y+tr2->idx[1],y+tr2->idx[1]+1,&inc,tr2->tau+1));
-<a name="line383">383: </a>    }
-<a name="line384">384: </a>    <font color="#4169E1">if</font> (tr2->idx[0]<tr2->idx[1]) {
-<a name="line385">385: </a>      HRGen(PetscRealPart(y[tr2->idx[0]]),PetscRealPart(y[tr2->idx[1]]),&(tr2->type),&(tr2->cs),&(tr2->sn),&(tr2->alpha),&ncond2);  
-<a name="line386">386: </a>    } <font color="#4169E1">else</font> {
-<a name="line387">387: </a>    tr2->alpha = PetscRealPart(y[tr2->idx[0]]);
-<a name="line388">388: </a>    ncond2 = 1.0;
-<a name="line389">389: </a>    }
-<a name="line390">390: </a>    <font color="#4169E1">if</font> (ncond2>*ncond) *ncond = ncond2;
-<a name="line391">391: </a>  }
-<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
-<a name="line393">393: </a>}
+<a name="line323">323: </a>  <font color="#B22222">/* Hyperbolic transformation to make zeros in x */</font>
+<a name="line324">324: </a>  x = tr1->data;
+<a name="line325">325: </a>  tr1->n[0] = n0;
+<a name="line326">326: </a>  tr1->n[1] = n1;
+<a name="line327">327: </a>  tr1->idx[0] = idx0;
+<a name="line328">328: </a>  tr1->idx[1] = idx1;
+<a name="line329">329: </a>  PetscBLASIntCast(tr1->n[0],&n0_);
+<a name="line330">330: </a>  PetscBLASIntCast(tr1->n[1],&n1_);
+<a name="line331">331: </a>  <font color="#4169E1">if</font> (tr1->n[0] > 1) {
+<a name="line332">332: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n0_,x+tr1->idx[0],x+tr1->idx[0]+1,&inc,tr1->tau));
+<a name="line333">333: </a>  }
+<a name="line334">334: </a>  <font color="#4169E1">if</font> (tr1->n[1]> 1) {
+<a name="line335">335: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n1_,x+tr1->idx[1],x+tr1->idx[1]+1,&inc,tr1->tau+1));
+<a name="line336">336: </a>  }
+<a name="line337">337: </a>  <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1]) {
+<a name="line338">338: </a>    HRGen(PetscRealPart(x[tr1->idx[0]]),PetscRealPart(x[tr1->idx[1]]),&(tr1->type),&(tr1->cs),&(tr1->sn),&(tr1->alpha),ncond);  
+<a name="line339">339: </a>  } <font color="#4169E1">else</font> {
+<a name="line340">340: </a>    tr1->alpha = PetscRealPart(x[tr1->idx[0]]);
+<a name="line341">341: </a>    *ncond = 1.0;
+<a name="line342">342: </a>  }
+<a name="line343">343: </a>  <font color="#4169E1">if</font> (sz==2) {
+<a name="line344">344: </a>    y = tr2->data;
+<a name="line345">345: </a>    <font color="#B22222">/* Apply first transformation to second column */</font>
+<a name="line346">346: </a>    <font color="#4169E1">if</font> (tr1->n[0] > 1 && PetscAbsScalar(tr1->tau[0])!=0.0) {
+<a name="line347">347: </a>      x[tr1->idx[0]] = 1.0;
+<a name="line348">348: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0_,&inc,x+tr1->idx[0],&inc,tr1->tau,y+tr1->idx[0],&n0_,work));
+<a name="line349">349: </a>    }
+<a name="line350">350: </a>    <font color="#4169E1">if</font> (tr1->n[1] > 1 && PetscAbsScalar(tr1->tau[1])!=0.0) {
+<a name="line351">351: </a>      x[tr1->idx[1]] = 1.0;
+<a name="line352">352: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1_,&inc,x+tr1->idx[1],&inc,tr1->tau+1,y+tr1->idx[1],&n1_,work));
+<a name="line353">353: </a>    }
+<a name="line354">354: </a>    <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1]) {
+<a name="line355">355: </a>      HRApply(1,y+tr1->idx[0],1,y+tr1->idx[1],1,tr1->cs,-tr1->sn);
+<a name="line356">356: </a>    }
+<a name="line357">357: </a>    tr2->n[0] = tr1->n[0];
+<a name="line358">358: </a>    tr2->n[1] = tr1->n[1];
+<a name="line359">359: </a>    tr2->idx[0] = tr1->idx[0];
+<a name="line360">360: </a>    tr2->idx[1] = tr1->idx[1];
+<a name="line361">361: </a>    <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1] && tr1->type==2) {
+<a name="line362">362: </a>      tr2->idx[1]++; tr2->n[1]--; tr2->n[0]++;
+<a name="line363">363: </a>    }
+<a name="line364">364: </a>    <font color="#4169E1">if</font> (tr2->n[0]>0) {
+<a name="line365">365: </a>      tr2->n[0]--; tr2->idx[0]++;
+<a name="line366">366: </a>      <font color="#4169E1">if</font> (tr2->n[1]==0) tr2->idx[1] = tr2->idx[0];
+<a name="line367">367: </a>    } <font color="#4169E1">else</font> {
+<a name="line368">368: </a>      tr2->n[1]--; tr2->idx[1]++; tr2->idx[0] = tr2->idx[1];
+<a name="line369">369: </a>    }
+<a name="line370">370: </a>    <font color="#B22222">/* Hyperbolic transformation to make zeros in y */</font>
+<a name="line371">371: </a>    PetscBLASIntCast(tr2->n[0],&n0_);
+<a name="line372">372: </a>    PetscBLASIntCast(tr2->n[1],&n1_);
+<a name="line373">373: </a>    <font color="#4169E1">if</font> (tr2->n[0] > 1) {
+<a name="line374">374: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n0_,y+tr2->idx[0],y+tr2->idx[0]+1,&inc,tr2->tau));
+<a name="line375">375: </a>    }
+<a name="line376">376: </a>    <font color="#4169E1">if</font> (tr2->n[1]> 1) {
+<a name="line377">377: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarfg"</font>,LAPACKlarfg_(&n1_,y+tr2->idx[1],y+tr2->idx[1]+1,&inc,tr2->tau+1));
+<a name="line378">378: </a>    }
+<a name="line379">379: </a>    <font color="#4169E1">if</font> (tr2->idx[0]<tr2->idx[1]) {
+<a name="line380">380: </a>      HRGen(PetscRealPart(y[tr2->idx[0]]),PetscRealPart(y[tr2->idx[1]]),&(tr2->type),&(tr2->cs),&(tr2->sn),&(tr2->alpha),&ncond2);  
+<a name="line381">381: </a>    } <font color="#4169E1">else</font> {
+<a name="line382">382: </a>    tr2->alpha = PetscRealPart(y[tr2->idx[0]]);
+<a name="line383">383: </a>    ncond2 = 1.0;
+<a name="line384">384: </a>    }
+<a name="line385">385: </a>    <font color="#4169E1">if</font> (ncond2>*ncond) *ncond = ncond2;
+<a name="line386">386: </a>  }
+<a name="line387">387: </a>  <font color="#4169E1">return</font>(0);
+<a name="line388">388: </a><font color="#A020F0">#endif</font>
+<a name="line389">389: </a>}
 
-<a name="line397">397: </a><font color="#B22222">/*</font>
-<a name="line398">398: </a><font color="#B22222">  Auxiliary function to try perform one iteration of hr routine,</font>
-<a name="line399">399: </a><font color="#B22222">  checking condition number. If it is < tolD, apply the</font>
-<a name="line400">400: </a><font color="#B22222">  transformation to H and R, if not, ok=false and it do nothing</font>
-<a name="line401">401: </a><font color="#B22222">  tolE, tolerance to exchange complex pairs to improve conditioning</font>
-<a name="line402">402: </a><font color="#B22222">*/</font>
-<a name="line403">403: </a><strong><font color="#4169E1"><a name="TryHRIt"></a>static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work,PetscInt nw)</font></strong>
-<a name="line404">404: </a>{
+<a name="line393">393: </a><font color="#B22222">/*</font>
+<a name="line394">394: </a><font color="#B22222">  Auxiliary function to try perform one iteration of hr routine,</font>
+<a name="line395">395: </a><font color="#B22222">  checking condition number. If it is < tolD, apply the</font>
+<a name="line396">396: </a><font color="#B22222">  transformation to H and R, if not, ok=false and it do nothing</font>
+<a name="line397">397: </a><font color="#B22222">  tolE, tolerance to exchange complex pairs to improve conditioning</font>
+<a name="line398">398: </a><font color="#B22222">*/</font>
+<a name="line399">399: </a><strong><font color="#4169E1"><a name="TryHRIt"></a>static PetscErrorCode TryHRIt(PetscInt n,PetscInt j,PetscInt sz,PetscScalar *H,PetscInt ldh,PetscScalar *R,PetscInt ldr,PetscReal *s,PetscBool *exg,PetscBool *ok,PetscInt *n0,PetscInt *n1,PetscInt *idx0,PetscInt *idx1,PetscReal *cond,PetscScalar *work)</font></strong>
+<a name="line400">400: </a>{
+<a name="line401">401: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LARF)</font>
+<a name="line403">403: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LARF - Lapack routine is unavailable"</font>);
+<a name="line404">404: </a><font color="#A020F0">#else</font>
 <a name="line406">406: </a>  <font color="#4169E1">struct HRtr</font>    *tr1,*tr2,tr1_t,tr2_t,tr1_te,tr2_te;
 <a name="line407">407: </a>  PetscScalar    *x,*y;
 <a name="line408">408: </a>  PetscReal      ncond,ncond_e;
-<a name="line409">409: </a>  PetscInt       nwu=0,nwall,i,d=1;
+<a name="line409">409: </a>  PetscInt       nwu=0,i,d=1;
 <a name="line410">410: </a>  PetscBLASInt   n0_,n1_,inc=1,mh,mr,n_,ldr_,ldh_;
 <a name="line411">411: </a>  PetscReal      tolD = 1e+5;
 
@@ -408,376 +406,369 @@
 <a name="line415">415: </a>  PetscBLASIntCast(n,&n_);
 <a name="line416">416: </a>  PetscBLASIntCast(ldr,&ldr_);
 <a name="line417">417: </a>  PetscBLASIntCast(ldh,&ldh_);
-<a name="line418">418: </a>  nwall = 5*n;
-<a name="line419">419: </a>  <font color="#4169E1">if</font> (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,16);
-<a name="line420">420: </a>  x = work+nwu;
-<a name="line421">421: </a>  nwu += n;
-<a name="line422">422: </a>  PetscMemcpy(x,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line423">423: </a>  *exg = PETSC_FALSE;
-<a name="line424">424: </a>  *ok = PETSC_TRUE;
-<a name="line425">425: </a>  tr1_t.data = x;
-<a name="line426">426: </a>  <font color="#4169E1">if</font> (sz==1) {
-<a name="line427">427: </a>    <font color="#B22222">/* Hyperbolic transformation to make zeros in x */</font>
-<a name="line428">428: </a>    MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,NULL,&ncond,work+nwu,nwall-nwu);
-<a name="line429">429: </a>    <font color="#B22222">/* Check condition number to single column*/</font>
-<a name="line430">430: </a>    <font color="#4169E1">if</font> (ncond>tolD) {
-<a name="line431">431: </a>      *ok = PETSC_FALSE;
-<a name="line432">432: </a>    }
-<a name="line433">433: </a>    tr1 = &tr1_t;
-<a name="line434">434: </a>    tr2 = &tr2_t;    
-<a name="line435">435: </a>  } <font color="#4169E1">else</font> {
-<a name="line436">436: </a>    y = work+nwu;
-<a name="line437">437: </a>    nwu += n;
-<a name="line438">438: </a>    PetscMemcpy(y,R+(j+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line439">439: </a>    tr2_t.data = y;
-<a name="line440">440: </a>    MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,&tr2_t,&ncond,work+nwu,nwall-nwu);
-<a name="line441">441: </a>    <font color="#B22222">/* Computing hyperbolic transformations also for exchanged vectors */</font>
-<a name="line442">442: </a>    tr1_te.data = work+nwu;
-<a name="line443">443: </a>    nwu += n;
-<a name="line444">444: </a>    PetscMemcpy(tr1_te.data,R+(j+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line445">445: </a>    tr2_te.data = work+nwu;
-<a name="line446">446: </a>    nwu += n;
-<a name="line447">447: </a>    PetscMemcpy(tr2_te.data,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line448">448: </a>    MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_te,&tr2_te,&ncond_e,work+nwu,nwall-nwu);
-<a name="line449">449: </a>    <font color="#4169E1">if</font> (ncond > d*ncond_e) {
-<a name="line450">450: </a>      *exg = PETSC_TRUE;
-<a name="line451">451: </a>      tr1 = &tr1_te;
-<a name="line452">452: </a>      tr2 = &tr2_te;
-<a name="line453">453: </a>      ncond = ncond_e;
-<a name="line454">454: </a>    } <font color="#4169E1">else</font> {
-<a name="line455">455: </a>      tr1 = &tr1_t;
-<a name="line456">456: </a>      tr2 = &tr2_t;
-<a name="line457">457: </a>    }
-<a name="line458">458: </a>    <font color="#4169E1">if</font> (ncond>tolD) *ok = PETSC_FALSE;
-<a name="line459">459: </a>  }
-<a name="line460">460: </a>  <font color="#4169E1">if</font> (*ok) {
-<a name="line461">461: </a>    <font color="#B22222">/* Everything is OK, apply transformations to R and H */</font>
-<a name="line462">462: </a>    <font color="#B22222">/* First column */</font>
-<a name="line463">463: </a>    <font color="#4169E1">if</font> (cond && *cond<ncond) *cond = ncond;
-<a name="line464">464: </a>    x = tr1->data;
-<a name="line465">465: </a>    PetscBLASIntCast(tr1->n[0],&n0_);
-<a name="line466">466: </a>    PetscBLASIntCast(tr1->n[1],&n1_); 
-<a name="line467">467: </a>    PetscBLASIntCast(n-j-sz,&mr);
-<a name="line468">468: </a>    <font color="#4169E1">if</font> (tr1->n[0] > 1 && PetscAbsScalar(tr1->tau[0])!=0.0) {
-<a name="line469">469: </a>      x[tr1->idx[0]] = 1.0;
-<a name="line470">470: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0_,&mr,x+tr1->idx[0],&inc,tr1->tau,R+(j+sz)*ldr+tr1->idx[0],&ldr_,work+nwu));
-<a name="line471">471: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n0_,x+tr1->idx[0],&inc,tr1->tau,H+(tr1->idx[0])*ldh,&ldh_,work+nwu));
-<a name="line472">472: </a>    }
-<a name="line473">473: </a>    <font color="#4169E1">if</font> (tr1->n[1] > 1 && PetscAbsScalar(tr1->tau[1])!=0.0) {
-<a name="line474">474: </a>      x[tr1->idx[1]] = 1.0;
-<a name="line475">475: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1_,&mr,x+tr1->idx[1],&inc,tr1->tau+1,R+(j+sz)*ldr+tr1->idx[1],&ldr_,work+nwu));
-<a name="line476">476: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n1_,x+tr1->idx[1],&inc,tr1->tau+1,H+(tr1->idx[1])*ldh,&ldh_,work+nwu));
-<a name="line477">477: </a>    }
-<a name="line478">478: </a>    <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1]) {
-<a name="line479">479: </a>      HRApply(mr,R+(j+sz)*ldr+tr1->idx[0],ldr,R+(j+sz)*ldr+tr1->idx[1],ldr,tr1->cs,-tr1->sn);
-<a name="line480">480: </a>      <font color="#4169E1">if</font> (tr1->type==1) {
-<a name="line481">481: </a>        HRApply(n,H+(tr1->idx[0])*ldh,1,H+(tr1->idx[1])*ldh,1,tr1->cs,tr1->sn);
-<a name="line482">482: </a>      } <font color="#4169E1">else</font> {
-<a name="line483">483: </a>        HRApply(n,H+(tr1->idx[0])*ldh,1,H+(tr1->idx[1])*ldh,1,-tr1->cs,-tr1->sn);
-<a name="line484">484: </a>        s[tr1->idx[0]] = -s[tr1->idx[0]];
-<a name="line485">485: </a>        s[tr1->idx[1]] = -s[tr1->idx[1]];
-<a name="line486">486: </a>      }
-<a name="line487">487: </a>    }
-<a name="line488">488: </a>    <font color="#4169E1">for</font> (i=0;i<tr1->idx[0];i++) *(R+j*ldr+i) = x[i];  
-<a name="line489">489: </a>    <font color="#4169E1">for</font> (i=tr1->idx[0]+1;i<n;i++) *(R+j*ldr+i) = 0.0;
-<a name="line490">490: </a>    *(R+j*ldr+tr1->idx[0]) = tr1->alpha;
-<a name="line491">491: </a>    <font color="#4169E1">if</font> (sz==2) {
-<a name="line492">492: </a>      y = tr2->data;
-<a name="line493">493: </a>      <font color="#B22222">/* Second column */</font>
-<a name="line494">494: </a>      PetscBLASIntCast(tr2->n[0],&n0_);
-<a name="line495">495: </a>      PetscBLASIntCast(tr2->n[1],&n1_); 
-<a name="line496">496: </a>      PetscBLASIntCast(n-j-sz,&mr);
-<a name="line497">497: </a>      PetscBLASIntCast(n-tr2->idx[0],&mh);
-<a name="line498">498: </a>      <font color="#4169E1">if</font> (tr2->n[0] > 1 && PetscAbsScalar(tr2->tau[0])!=0.0) {
-<a name="line499">499: </a>        y[tr2->idx[0]] = 1.0;
-<a name="line500">500: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0_,&mr,y+tr2->idx[0],&inc,tr2->tau,R+(j+2)*ldr+tr2->idx[0],&ldr_,work+nwu));
-<a name="line501">501: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n0_,y+tr2->idx[0],&inc,tr2->tau,H+(tr2->idx[0])*ldh,&ldh_,work+nwu));
-<a name="line502">502: </a>      }
-<a name="line503">503: </a>      <font color="#4169E1">if</font> (tr2->n[1] > 1 && PetscAbsScalar(tr2->tau[1])!=0.0) {
-<a name="line504">504: </a>        y[tr2->idx[1]] = 1.0;
-<a name="line505">505: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1_,&mr,y+tr2->idx[1],&inc,tr2->tau+1,R+(j+2)*ldr+tr2->idx[1],&ldr_,work+nwu));
-<a name="line506">506: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n1_,y+tr2->idx[1],&inc,tr2->tau+1,H+(tr2->idx[1])*ldh,&ldh_,work+nwu));
-<a name="line507">507: </a>      }
-<a name="line508">508: </a>      <font color="#4169E1">if</font> (tr2->idx[0]<tr2->idx[1]) {
-<a name="line509">509: </a>        HRApply(mr,R+(j+2)*ldr+tr2->idx[0],ldr,R+(j+2)*ldr+tr2->idx[1],ldr,tr2->cs,-tr2->sn);
-<a name="line510">510: </a>        <font color="#4169E1">if</font> (tr2->type==1) {
-<a name="line511">511: </a>          HRApply(n,H+(tr2->idx[0])*ldh,1,H+(tr2->idx[1])*ldh,1,tr2->cs,tr2->sn);
-<a name="line512">512: </a>        } <font color="#4169E1">else</font> {
-<a name="line513">513: </a>          HRApply(n,H+(tr2->idx[0])*ldh,1,H+(tr2->idx[1])*ldh,1,-tr2->cs,-tr2->sn);
-<a name="line514">514: </a>          s[tr2->idx[0]] = -s[tr2->idx[0]];
-<a name="line515">515: </a>          s[tr2->idx[1]] = -s[tr2->idx[1]];
-<a name="line516">516: </a>        }
-<a name="line517">517: </a>      }
-<a name="line518">518: </a>      <font color="#4169E1">for</font> (i=0;i<tr2->idx[0]-1;i++) *(R+(j+1)*ldr+i) = y[i];
-<a name="line519">519: </a>      *(R+(j+1)*ldr+tr2->idx[0]-1) = y[tr2->idx[0]-1];
-<a name="line520">520: </a>      <font color="#4169E1">for</font> (i=tr2->idx[0]+1;i<n;i++) *(R+(j+1)*ldr+i) = 0.0;
-<a name="line521">521: </a>      *(R+(j+1)*ldr+tr2->idx[0]) = tr2->alpha;
-<a name="line522">522: </a>      *n0 = tr2->n[0];
-<a name="line523">523: </a>      *n1 = tr2->n[1];
-<a name="line524">524: </a>      *idx0 = tr2->idx[0];
-<a name="line525">525: </a>      *idx1 = tr2->idx[1];
-<a name="line526">526: </a>      <font color="#4169E1">if</font> (tr2->idx[0]<tr2->idx[1] && tr2->type==2) {
-<a name="line527">527: </a>        (*idx1)++; (*n1)--; (*n0)++;
-<a name="line528">528: </a>      }
-<a name="line529">529: </a>    } <font color="#4169E1">else</font> {
-<a name="line530">530: </a>      *n0 = tr1->n[0];
-<a name="line531">531: </a>      *n1 = tr1->n[1];
-<a name="line532">532: </a>      *idx0 = tr1->idx[0];
-<a name="line533">533: </a>      *idx1 = tr1->idx[1];
-<a name="line534">534: </a>      <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1] && tr1->type==2) {
-<a name="line535">535: </a>        (*idx1)++; (*n1)--; (*n0)++;
-<a name="line536">536: </a>      }      
-<a name="line537">537: </a>    }
-<a name="line538">538: </a>    <font color="#4169E1">if</font> (*n0>0) {
-<a name="line539">539: </a>      (*n0)--; (*idx0)++;
-<a name="line540">540: </a>      <font color="#4169E1">if</font> (*n1==0) *idx1 = *idx0;
-<a name="line541">541: </a>    } <font color="#4169E1">else</font> {
-<a name="line542">542: </a>      (*n1)--; (*idx1)++; *idx0 = *idx1;
-<a name="line543">543: </a>    }
-<a name="line544">544: </a>  }
-<a name="line545">545: </a>  <font color="#4169E1">return</font>(0);
-<a name="line546">546: </a>}
+<a name="line418">418: </a>  x = work+nwu;
+<a name="line419">419: </a>  nwu += n;
+<a name="line420">420: </a>  PetscMemcpy(x,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line421">421: </a>  *exg = PETSC_FALSE;
+<a name="line422">422: </a>  *ok = PETSC_TRUE;
+<a name="line423">423: </a>  tr1_t.data = x;
+<a name="line424">424: </a>  <font color="#4169E1">if</font> (sz==1) {
+<a name="line425">425: </a>    <font color="#B22222">/* Hyperbolic transformation to make zeros in x */</font>
+<a name="line426">426: </a>    MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,NULL,&ncond,work+nwu);
+<a name="line427">427: </a>    <font color="#B22222">/* Check condition number to single column*/</font>
+<a name="line428">428: </a>    <font color="#4169E1">if</font> (ncond>tolD) {
+<a name="line429">429: </a>      *ok = PETSC_FALSE;
+<a name="line430">430: </a>    }
+<a name="line431">431: </a>    tr1 = &tr1_t;
+<a name="line432">432: </a>    tr2 = &tr2_t;    
+<a name="line433">433: </a>  } <font color="#4169E1">else</font> {
+<a name="line434">434: </a>    y = work+nwu;
+<a name="line435">435: </a>    nwu += n;
+<a name="line436">436: </a>    PetscMemcpy(y,R+(j+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line437">437: </a>    tr2_t.data = y;
+<a name="line438">438: </a>    MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_t,&tr2_t,&ncond,work+nwu);
+<a name="line439">439: </a>    <font color="#B22222">/* Computing hyperbolic transformations also for exchanged vectors */</font>
+<a name="line440">440: </a>    tr1_te.data = work+nwu;
+<a name="line441">441: </a>    nwu += n;
+<a name="line442">442: </a>    PetscMemcpy(tr1_te.data,R+(j+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line443">443: </a>    tr2_te.data = work+nwu;
+<a name="line444">444: </a>    nwu += n;
+<a name="line445">445: </a>    PetscMemcpy(tr2_te.data,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line446">446: </a>    MadeHRtr(sz,n,*idx0,*n0,*idx1,*n1,&tr1_te,&tr2_te,&ncond_e,work+nwu);
+<a name="line447">447: </a>    <font color="#4169E1">if</font> (ncond > d*ncond_e) {
+<a name="line448">448: </a>      *exg = PETSC_TRUE;
+<a name="line449">449: </a>      tr1 = &tr1_te;
+<a name="line450">450: </a>      tr2 = &tr2_te;
+<a name="line451">451: </a>      ncond = ncond_e;
+<a name="line452">452: </a>    } <font color="#4169E1">else</font> {
+<a name="line453">453: </a>      tr1 = &tr1_t;
+<a name="line454">454: </a>      tr2 = &tr2_t;
+<a name="line455">455: </a>    }
+<a name="line456">456: </a>    <font color="#4169E1">if</font> (ncond>tolD) *ok = PETSC_FALSE;
+<a name="line457">457: </a>  }
+<a name="line458">458: </a>  <font color="#4169E1">if</font> (*ok) {
+<a name="line459">459: </a>    <font color="#B22222">/* Everything is OK, apply transformations to R and H */</font>
+<a name="line460">460: </a>    <font color="#B22222">/* First column */</font>
+<a name="line461">461: </a>    <font color="#4169E1">if</font> (cond && *cond<ncond) *cond = ncond;
+<a name="line462">462: </a>    x = tr1->data;
+<a name="line463">463: </a>    PetscBLASIntCast(tr1->n[0],&n0_);
+<a name="line464">464: </a>    PetscBLASIntCast(tr1->n[1],&n1_); 
+<a name="line465">465: </a>    PetscBLASIntCast(n-j-sz,&mr);
+<a name="line466">466: </a>    <font color="#4169E1">if</font> (tr1->n[0] > 1 && PetscAbsScalar(tr1->tau[0])!=0.0) {
+<a name="line467">467: </a>      x[tr1->idx[0]] = 1.0;
+<a name="line468">468: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0_,&mr,x+tr1->idx[0],&inc,tr1->tau,R+(j+sz)*ldr+tr1->idx[0],&ldr_,work+nwu));
+<a name="line469">469: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n0_,x+tr1->idx[0],&inc,tr1->tau,H+(tr1->idx[0])*ldh,&ldh_,work+nwu));
+<a name="line470">470: </a>    }
+<a name="line471">471: </a>    <font color="#4169E1">if</font> (tr1->n[1] > 1 && PetscAbsScalar(tr1->tau[1])!=0.0) {
+<a name="line472">472: </a>      x[tr1->idx[1]] = 1.0;
+<a name="line473">473: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1_,&mr,x+tr1->idx[1],&inc,tr1->tau+1,R+(j+sz)*ldr+tr1->idx[1],&ldr_,work+nwu));
+<a name="line474">474: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n1_,x+tr1->idx[1],&inc,tr1->tau+1,H+(tr1->idx[1])*ldh,&ldh_,work+nwu));
+<a name="line475">475: </a>    }
+<a name="line476">476: </a>    <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1]) {
+<a name="line477">477: </a>      HRApply(mr,R+(j+sz)*ldr+tr1->idx[0],ldr,R+(j+sz)*ldr+tr1->idx[1],ldr,tr1->cs,-tr1->sn);
+<a name="line478">478: </a>      <font color="#4169E1">if</font> (tr1->type==1) {
+<a name="line479">479: </a>        HRApply(n,H+(tr1->idx[0])*ldh,1,H+(tr1->idx[1])*ldh,1,tr1->cs,tr1->sn);
+<a name="line480">480: </a>      } <font color="#4169E1">else</font> {
+<a name="line481">481: </a>        HRApply(n,H+(tr1->idx[0])*ldh,1,H+(tr1->idx[1])*ldh,1,-tr1->cs,-tr1->sn);
+<a name="line482">482: </a>        s[tr1->idx[0]] = -s[tr1->idx[0]];
+<a name="line483">483: </a>        s[tr1->idx[1]] = -s[tr1->idx[1]];
+<a name="line484">484: </a>      }
+<a name="line485">485: </a>    }
+<a name="line486">486: </a>    <font color="#4169E1">for</font> (i=0;i<tr1->idx[0];i++) *(R+j*ldr+i) = x[i];  
+<a name="line487">487: </a>    <font color="#4169E1">for</font> (i=tr1->idx[0]+1;i<n;i++) *(R+j*ldr+i) = 0.0;
+<a name="line488">488: </a>    *(R+j*ldr+tr1->idx[0]) = tr1->alpha;
+<a name="line489">489: </a>    <font color="#4169E1">if</font> (sz==2) {
+<a name="line490">490: </a>      y = tr2->data;
+<a name="line491">491: </a>      <font color="#B22222">/* Second column */</font>
+<a name="line492">492: </a>      PetscBLASIntCast(tr2->n[0],&n0_);
+<a name="line493">493: </a>      PetscBLASIntCast(tr2->n[1],&n1_); 
+<a name="line494">494: </a>      PetscBLASIntCast(n-j-sz,&mr);
+<a name="line495">495: </a>      PetscBLASIntCast(n-tr2->idx[0],&mh);
+<a name="line496">496: </a>      <font color="#4169E1">if</font> (tr2->n[0] > 1 && PetscAbsScalar(tr2->tau[0])!=0.0) {
+<a name="line497">497: </a>        y[tr2->idx[0]] = 1.0;
+<a name="line498">498: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n0_,&mr,y+tr2->idx[0],&inc,tr2->tau,R+(j+2)*ldr+tr2->idx[0],&ldr_,work+nwu));
+<a name="line499">499: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n0_,y+tr2->idx[0],&inc,tr2->tau,H+(tr2->idx[0])*ldh,&ldh_,work+nwu));
+<a name="line500">500: </a>      }
+<a name="line501">501: </a>      <font color="#4169E1">if</font> (tr2->n[1] > 1 && PetscAbsScalar(tr2->tau[1])!=0.0) {
+<a name="line502">502: </a>        y[tr2->idx[1]] = 1.0;
+<a name="line503">503: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"L"</font>,&n1_,&mr,y+tr2->idx[1],&inc,tr2->tau+1,R+(j+2)*ldr+tr2->idx[1],&ldr_,work+nwu));
+<a name="line504">504: </a>        PetscStackCallBLAS(<font color="#666666">"LAPACKlarf"</font>,LAPACKlarf_(<font color="#666666">"R"</font>,&n_,&n1_,y+tr2->idx[1],&inc,tr2->tau+1,H+(tr2->idx[1])*ldh,&ldh_,work+nwu));
+<a name="line505">505: </a>      }
+<a name="line506">506: </a>      <font color="#4169E1">if</font> (tr2->idx[0]<tr2->idx[1]) {
+<a name="line507">507: </a>        HRApply(mr,R+(j+2)*ldr+tr2->idx[0],ldr,R+(j+2)*ldr+tr2->idx[1],ldr,tr2->cs,-tr2->sn);
+<a name="line508">508: </a>        <font color="#4169E1">if</font> (tr2->type==1) {
+<a name="line509">509: </a>          HRApply(n,H+(tr2->idx[0])*ldh,1,H+(tr2->idx[1])*ldh,1,tr2->cs,tr2->sn);
+<a name="line510">510: </a>        } <font color="#4169E1">else</font> {
+<a name="line511">511: </a>          HRApply(n,H+(tr2->idx[0])*ldh,1,H+(tr2->idx[1])*ldh,1,-tr2->cs,-tr2->sn);
+<a name="line512">512: </a>          s[tr2->idx[0]] = -s[tr2->idx[0]];
+<a name="line513">513: </a>          s[tr2->idx[1]] = -s[tr2->idx[1]];
+<a name="line514">514: </a>        }
+<a name="line515">515: </a>      }
+<a name="line516">516: </a>      <font color="#4169E1">for</font> (i=0;i<tr2->idx[0]-1;i++) *(R+(j+1)*ldr+i) = y[i];
+<a name="line517">517: </a>      *(R+(j+1)*ldr+tr2->idx[0]-1) = y[tr2->idx[0]-1];
+<a name="line518">518: </a>      <font color="#4169E1">for</font> (i=tr2->idx[0]+1;i<n;i++) *(R+(j+1)*ldr+i) = 0.0;
+<a name="line519">519: </a>      *(R+(j+1)*ldr+tr2->idx[0]) = tr2->alpha;
+<a name="line520">520: </a>      *n0 = tr2->n[0];
+<a name="line521">521: </a>      *n1 = tr2->n[1];
+<a name="line522">522: </a>      *idx0 = tr2->idx[0];
+<a name="line523">523: </a>      *idx1 = tr2->idx[1];
+<a name="line524">524: </a>      <font color="#4169E1">if</font> (tr2->idx[0]<tr2->idx[1] && tr2->type==2) {
+<a name="line525">525: </a>        (*idx1)++; (*n1)--; (*n0)++;
+<a name="line526">526: </a>      }
+<a name="line527">527: </a>    } <font color="#4169E1">else</font> {
+<a name="line528">528: </a>      *n0 = tr1->n[0];
+<a name="line529">529: </a>      *n1 = tr1->n[1];
+<a name="line530">530: </a>      *idx0 = tr1->idx[0];
+<a name="line531">531: </a>      *idx1 = tr1->idx[1];
+<a name="line532">532: </a>      <font color="#4169E1">if</font> (tr1->idx[0]<tr1->idx[1] && tr1->type==2) {
+<a name="line533">533: </a>        (*idx1)++; (*n1)--; (*n0)++;
+<a name="line534">534: </a>      }      
+<a name="line535">535: </a>    }
+<a name="line536">536: </a>    <font color="#4169E1">if</font> (*n0>0) {
+<a name="line537">537: </a>      (*n0)--; (*idx0)++;
+<a name="line538">538: </a>      <font color="#4169E1">if</font> (*n1==0) *idx1 = *idx0;
+<a name="line539">539: </a>    } <font color="#4169E1">else</font> {
+<a name="line540">540: </a>      (*n1)--; (*idx1)++; *idx0 = *idx1;
+<a name="line541">541: </a>    }
+<a name="line542">542: </a>  }
+<a name="line543">543: </a>  <font color="#4169E1">return</font>(0);
+<a name="line544">544: </a><font color="#A020F0">#endif</font>
+<a name="line545">545: </a>}
 
-<a name="line550">550: </a><font color="#B22222">/*</font>
-<a name="line551">551: </a><font color="#B22222">  compute V = HR whit H s-orthogonal and R upper triangular</font>
-<a name="line552">552: </a><font color="#B22222">*/</font>
-<a name="line553">553: </a><strong><font color="#4169E1"><a name="PseudoOrthog_HR"></a>static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work,PetscInt nw)</font></strong>
-<a name="line554">554: </a>{
-<a name="line556">556: </a>  PetscInt       i,j,n,n0,n1,np,idx0,idx1,sz=1,k=0,t1,t2,nwall,nwu=0;
-<a name="line557">557: </a>  PetscScalar    *col1,*col2;
-<a name="line558">558: </a>  PetscBool      exg=PETSC_FALSE,ok=PETSC_FALSE;
+<a name="line549">549: </a><font color="#B22222">/*</font>
+<a name="line550">550: </a><font color="#B22222">  compute V = HR whit H s-orthogonal and R upper triangular</font>
+<a name="line551">551: </a><font color="#B22222">*/</font>
+<a name="line552">552: </a><strong><font color="#4169E1"><a name="PseudoOrthog_HR"></a>static PetscErrorCode PseudoOrthog_HR(PetscInt *nv,PetscScalar *V,PetscInt ldv,PetscReal *s,PetscScalar *R,PetscInt ldr,PetscBLASInt *perm,PetscBLASInt *cmplxEig,PetscBool *breakdown,PetscScalar *work)</font></strong>
+<a name="line553">553: </a>{
+<a name="line555">555: </a>  PetscInt       i,j,n,n0,n1,np,idx0,idx1,sz=1,k=0,t1,t2,nwu=0;
+<a name="line556">556: </a>  PetscScalar    *col1,*col2;
+<a name="line557">557: </a>  PetscBool      exg=PETSC_FALSE,ok=PETSC_FALSE;
 
-<a name="line561">561: </a>  n = *nv;
-<a name="line562">562: </a>  nwall = 7*n;
-<a name="line563">563: </a>  <font color="#4169E1">if</font> (!work || nw<nwall) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid argument %d"</font>,11);
-<a name="line564">564: </a>  col1 = work+nwu;
-<a name="line565">565: </a>  nwu += n;
-<a name="line566">566: </a>  col2 = work+nwu;
-<a name="line567">567: </a>  nwu += n;
-<a name="line568">568: </a>  <font color="#B22222">/* Sort R and s according to sing(s) */</font>
-<a name="line569">569: </a>  np = 0;
-<a name="line570">570: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) <font color="#4169E1">if</font> (s[i]>0) np++;
-<a name="line571">571: </a>  <font color="#4169E1">if</font> (s[0]>0) n1 = np;
-<a name="line572">572: </a>  <font color="#4169E1">else</font> n1 = n-np;
-<a name="line573">573: </a>  n0 = 0;
-<a name="line574">574: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line575">575: </a>    <font color="#4169E1">if</font> (s[i]==s[0]) {
-<a name="line576">576: </a>      s[n0] = s[0];
-<a name="line577">577: </a>      perm[n0++] = i;
-<a name="line578">578: </a>    } <font color="#4169E1">else</font> perm[n1++] = i;
-<a name="line579">579: </a>  }
-<a name="line580">580: </a>  <font color="#4169E1">for</font> (i=n0;i<n;i++) s[i] = -s[0];
-<a name="line581">581: </a>  n1 -= n0;
-<a name="line582">582: </a>  idx0 = 0;
-<a name="line583">583: </a>  idx1 = n0;
-<a name="line584">584: </a>  <font color="#4169E1">if</font> (idx1==n) idx1=idx0;
-<a name="line585">585: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line586">586: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) R[j*ldr+i] = V[j*ldv+perm[i]];
-<a name="line587">587: </a>  }
-<a name="line588">588: </a>  <font color="#B22222">/* Initialize H */</font>
-<a name="line589">589: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line590">590: </a>    PetscMemzero(V+i*ldv,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line591">591: </a>    V[perm[i]+i*ldv] = 1.0;
-<a name="line592">592: </a>  }
-<a name="line593">593: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) perm[i] = i;
-<a name="line594">594: </a>  j = 0;
-<a name="line595">595: </a>  <font color="#4169E1">while</font> (j<n-k) {
-<a name="line596">596: </a>    <font color="#4169E1">if</font> (cmplxEig) {
-<a name="line597">597: </a>      <font color="#4169E1">if</font> (cmplxEig[j]==0) sz=1;
-<a name="line598">598: </a>      <font color="#4169E1">else</font> sz=2;
-<a name="line599">599: </a>    }
-<a name="line600">600: </a>    TryHRIt(n,j,sz,V,ldv,R,ldr,s,&exg,&ok,&n0,&n1,&idx0,&idx1,NULL,work+nwu,nw-nwu);
-<a name="line601">601: </a>    <font color="#4169E1">if</font> (ok) {
-<a name="line602">602: </a>      <font color="#4169E1">if</font> (exg) cmplxEig[j] = -cmplxEig[j];
-<a name="line603">603: </a>      j = j+sz;
-<a name="line604">604: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* to be discarded */</font>
-<a name="line605">605: </a>      k = k+1;
-<a name="line606">606: </a>      <font color="#4169E1">if</font> (cmplxEig[j]==0) {
-<a name="line607">607: </a>        <font color="#4169E1">if</font> (j<n) {
-<a name="line608">608: </a>          t1 = perm[j];
-<a name="line609">609: </a>          <font color="#4169E1">for</font> (i=j;i<n-1;i++) perm[i] = perm[i+1];
-<a name="line610">610: </a>          perm[n-1] = t1;
-<a name="line611">611: </a>          t1 = cmplxEig[j];
-<a name="line612">612: </a>          <font color="#4169E1">for</font> (i=j;i<n-1;i++) cmplxEig[i] = cmplxEig[i+1];
-<a name="line613">613: </a>          cmplxEig[n-1] = t1;
-<a name="line614">614: </a>          PetscMemcpy(col1,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line615">615: </a>          <font color="#4169E1">for</font> (i=j;i<n-1;i++) { 
-<a name="line616">616: </a>            PetscMemcpy(R+i*ldr,R+(i+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line617">617: </a>          }
-<a name="line618">618: </a>          PetscMemcpy(R+(n-1)*ldr,col1,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line619">619: </a>        }
-<a name="line620">620: </a>      } <font color="#4169E1">else</font> {
-<a name="line621">621: </a>        k = k+1;
-<a name="line622">622: </a>        <font color="#4169E1">if</font> (j<n-1) {
-<a name="line623">623: </a>          t1 = perm[j];
-<a name="line624">624: </a>          t2 = perm[j+1];
-<a name="line625">625: </a>          <font color="#4169E1">for</font> (i=j;i<n-2;i++) perm[i] = perm[i+2];
-<a name="line626">626: </a>          perm[n-2] = t1;
-<a name="line627">627: </a>          perm[n-1] = t2;
-<a name="line628">628: </a>          t1 = cmplxEig[j];
-<a name="line629">629: </a>          t2 = cmplxEig[j+1];
-<a name="line630">630: </a>          <font color="#4169E1">for</font> (i=j;i<n-2;i++) cmplxEig[i] = cmplxEig[i+2];
-<a name="line631">631: </a>          cmplxEig[n-2] = t1;
-<a name="line632">632: </a>          cmplxEig[n-1] = t2;
-<a name="line633">633: </a>          PetscMemcpy(col1,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line634">634: </a>          PetscMemcpy(col2,R+(j+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line635">635: </a>          <font color="#4169E1">for</font> (i=j;i<n-2;i++) {
-<a name="line636">636: </a>            PetscMemcpy(R+i*ldr,R+(i+2)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line637">637: </a>          }
-<a name="line638">638: </a>          PetscMemcpy(R+(n-2)*ldr,col1,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line639">639: </a>          PetscMemcpy(R+(n-1)*ldr,col2,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line640">640: </a>        }
-<a name="line641">641: </a>      }
-<a name="line642">642: </a>    }
-<a name="line643">643: </a>  }
-<a name="line644">644: </a>  <font color="#4169E1">if</font> (k!=0) {
-<a name="line645">645: </a>    <font color="#4169E1">if</font> (breakdown) *breakdown = PETSC_TRUE;
-<a name="line646">646: </a>    *nv = n-k;
-<a name="line647">647: </a>  }
-<a name="line648">648: </a>  <font color="#4169E1">return</font>(0);
-<a name="line649">649: </a>}
+<a name="line560">560: </a>  n = *nv;
+<a name="line561">561: </a>  col1 = work+nwu;
+<a name="line562">562: </a>  nwu += n;
+<a name="line563">563: </a>  col2 = work+nwu;
+<a name="line564">564: </a>  nwu += n;
+<a name="line565">565: </a>  <font color="#B22222">/* Sort R and s according to sing(s) */</font>
+<a name="line566">566: </a>  np = 0;
+<a name="line567">567: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) <font color="#4169E1">if</font> (s[i]>0) np++;
+<a name="line568">568: </a>  <font color="#4169E1">if</font> (s[0]>0) n1 = np;
+<a name="line569">569: </a>  <font color="#4169E1">else</font> n1 = n-np;
+<a name="line570">570: </a>  n0 = 0;
+<a name="line571">571: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line572">572: </a>    <font color="#4169E1">if</font> (s[i]==s[0]) {
+<a name="line573">573: </a>      s[n0] = s[0];
+<a name="line574">574: </a>      perm[n0++] = i;
+<a name="line575">575: </a>    } <font color="#4169E1">else</font> perm[n1++] = i;
+<a name="line576">576: </a>  }
+<a name="line577">577: </a>  <font color="#4169E1">for</font> (i=n0;i<n;i++) s[i] = -s[0];
+<a name="line578">578: </a>  n1 -= n0;
+<a name="line579">579: </a>  idx0 = 0;
+<a name="line580">580: </a>  idx1 = n0;
+<a name="line581">581: </a>  <font color="#4169E1">if</font> (idx1==n) idx1=idx0;
+<a name="line582">582: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line583">583: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) R[j*ldr+i] = V[j*ldv+perm[i]];
+<a name="line584">584: </a>  }
+<a name="line585">585: </a>  <font color="#B22222">/* Initialize H */</font>
+<a name="line586">586: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line587">587: </a>    PetscMemzero(V+i*ldv,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line588">588: </a>    V[perm[i]+i*ldv] = 1.0;
+<a name="line589">589: </a>  }
+<a name="line590">590: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) perm[i] = i;
+<a name="line591">591: </a>  j = 0;
+<a name="line592">592: </a>  <font color="#4169E1">while</font> (j<n-k) {
+<a name="line593">593: </a>    <font color="#4169E1">if</font> (cmplxEig[j]==0) sz=1;
+<a name="line594">594: </a>    <font color="#4169E1">else</font> sz=2;
+<a name="line595">595: </a>    TryHRIt(n,j,sz,V,ldv,R,ldr,s,&exg,&ok,&n0,&n1,&idx0,&idx1,NULL,work+nwu);
+<a name="line596">596: </a>    <font color="#4169E1">if</font> (ok) {
+<a name="line597">597: </a>      <font color="#4169E1">if</font> (exg) cmplxEig[j] = -cmplxEig[j];
+<a name="line598">598: </a>      j = j+sz;
+<a name="line599">599: </a>    } <font color="#4169E1">else</font> { <font color="#B22222">/* to be discarded */</font>
+<a name="line600">600: </a>      k = k+1;
+<a name="line601">601: </a>      <font color="#4169E1">if</font> (cmplxEig[j]==0) {
+<a name="line602">602: </a>        <font color="#4169E1">if</font> (j<n) {
+<a name="line603">603: </a>          t1 = perm[j];
+<a name="line604">604: </a>          <font color="#4169E1">for</font> (i=j;i<n-1;i++) perm[i] = perm[i+1];
+<a name="line605">605: </a>          perm[n-1] = t1;
+<a name="line606">606: </a>          t1 = cmplxEig[j];
+<a name="line607">607: </a>          <font color="#4169E1">for</font> (i=j;i<n-1;i++) cmplxEig[i] = cmplxEig[i+1];
+<a name="line608">608: </a>          cmplxEig[n-1] = t1;
+<a name="line609">609: </a>          PetscMemcpy(col1,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line610">610: </a>          <font color="#4169E1">for</font> (i=j;i<n-1;i++) { 
+<a name="line611">611: </a>            PetscMemcpy(R+i*ldr,R+(i+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line612">612: </a>          }
+<a name="line613">613: </a>          PetscMemcpy(R+(n-1)*ldr,col1,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line614">614: </a>        }
+<a name="line615">615: </a>      } <font color="#4169E1">else</font> {
+<a name="line616">616: </a>        k = k+1;
+<a name="line617">617: </a>        <font color="#4169E1">if</font> (j<n-1) {
+<a name="line618">618: </a>          t1 = perm[j];
+<a name="line619">619: </a>          t2 = perm[j+1];
+<a name="line620">620: </a>          <font color="#4169E1">for</font> (i=j;i<n-2;i++) perm[i] = perm[i+2];
+<a name="line621">621: </a>          perm[n-2] = t1;
+<a name="line622">622: </a>          perm[n-1] = t2;
+<a name="line623">623: </a>          t1 = cmplxEig[j];
+<a name="line624">624: </a>          t2 = cmplxEig[j+1];
+<a name="line625">625: </a>          <font color="#4169E1">for</font> (i=j;i<n-2;i++) cmplxEig[i] = cmplxEig[i+2];
+<a name="line626">626: </a>          cmplxEig[n-2] = t1;
+<a name="line627">627: </a>          cmplxEig[n-1] = t2;
+<a name="line628">628: </a>          PetscMemcpy(col1,R+j*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line629">629: </a>          PetscMemcpy(col2,R+(j+1)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line630">630: </a>          <font color="#4169E1">for</font> (i=j;i<n-2;i++) {
+<a name="line631">631: </a>            PetscMemcpy(R+i*ldr,R+(i+2)*ldr,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line632">632: </a>          }
+<a name="line633">633: </a>          PetscMemcpy(R+(n-2)*ldr,col1,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line634">634: </a>          PetscMemcpy(R+(n-1)*ldr,col2,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line635">635: </a>        }
+<a name="line636">636: </a>      }
+<a name="line637">637: </a>    }
+<a name="line638">638: </a>  }
+<a name="line639">639: </a>  <font color="#4169E1">if</font> (k!=0) {
+<a name="line640">640: </a>    <font color="#4169E1">if</font> (breakdown) *breakdown = PETSC_TRUE;
+<a name="line641">641: </a>    *nv = n-k;
+<a name="line642">642: </a>  }
+<a name="line643">643: </a>  <font color="#4169E1">return</font>(0);
+<a name="line644">644: </a>}
 
-<a name="line653">653: </a><strong><font color="#4169E1"><a name="DSGHIEPOrthogEigenv"></a>PetscErrorCode DSGHIEPOrthogEigenv(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscScalar *wr,PetscScalar *wi,PetscBool accum)</font></strong>
-<a name="line654">654: </a>{
-<a name="line656">656: </a>  PetscInt       lws,nwus=0,nwui=0,lwi;
-<a name="line657">657: </a>  PetscInt       off,n,nv,ld,i,ldr,l;
-<a name="line658">658: </a>  PetscScalar    *W,*X,*R,*ts,zeroS=0.0,oneS=1.0;
-<a name="line659">659: </a>  PetscReal      *s,vi,vr,tr,*d,*e;
-<a name="line660">660: </a>  PetscBLASInt   ld_,n_,nv_,*perm,*cmplxEig;
+<a name="line648">648: </a><strong><font color="#4169E1"><a name="DSGHIEPOrthogEigenv"></a>PetscErrorCode DSGHIEPOrthogEigenv(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscScalar *wr,PetscScalar *wi,PetscBool accum)</font></strong>
+<a name="line649">649: </a>{
+<a name="line651">651: </a>  PetscInt       lws,nwus=0,nwui=0,lwi;
+<a name="line652">652: </a>  PetscInt       off,n,nv,ld,i,ldr,l;
+<a name="line653">653: </a>  PetscScalar    *W,*X,*R,*ts,zeroS=0.0,oneS=1.0;
+<a name="line654">654: </a>  PetscReal      *s,vi,vr,tr,*d,*e;
+<a name="line655">655: </a>  PetscBLASInt   ld_,n_,nv_,*perm,*cmplxEig;
 
-<a name="line663">663: </a>  l = ds->l;
-<a name="line664">664: </a>  n = ds->n-l;
-<a name="line665">665: </a>  PetscBLASIntCast(n,&n_);
-<a name="line666">666: </a>  ld = ds->ld;
-<a name="line667">667: </a>  PetscBLASIntCast(ld,&ld_);
-<a name="line668">668: </a>  off = l*ld+l;
-<a name="line669">669: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line670">670: </a>  <font color="#4169E1">if</font> (!ds->compact) {
-<a name="line671">671: </a>    <font color="#4169E1">for</font> (i=l;i<ds->n;i++) s[i] = PetscRealPart(*(ds->mat[DS_MAT_B]+i*ld+i));
-<a name="line672">672: </a>  }
-<a name="line673">673: </a>  lws = n*n+7*n;
-<a name="line674">674: </a>  lwi = 2*n;
-<a name="line675">675: </a>  DSAllocateWork_Private(ds,lws,0,lwi);
-<a name="line676">676: </a>  R = ds->work+nwus;
-<a name="line677">677: </a>  nwus += n*n;
-<a name="line678">678: </a>  ldr = n;
-<a name="line679">679: </a>  perm = ds->iwork + nwui;
-<a name="line680">680: </a>  nwui += n;
-<a name="line681">681: </a>  cmplxEig = ds->iwork+nwui;
-<a name="line682">682: </a>  nwui += n;
-<a name="line683">683: </a>  X = ds->mat[mat];
-<a name="line684">684: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line685">685: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line686">686: </a>    vi = PetscImaginaryPart(wr[l+i]);
-<a name="line687">687: </a><font color="#A020F0">#else</font>
-<a name="line688">688: </a>    vi = PetscRealPart(wi[l+i]);
-<a name="line689">689: </a><font color="#A020F0">#endif</font>
-<a name="line690">690: </a>    <font color="#4169E1">if</font> (vi!=0) {
-<a name="line691">691: </a>      cmplxEig[i] = 1;
-<a name="line692">692: </a>      cmplxEig[i+1] = 2;
-<a name="line693">693: </a>      i++;
-<a name="line694">694: </a>    } <font color="#4169E1">else</font> cmplxEig[i] = 0;
-<a name="line695">695: </a>  }
-<a name="line696">696: </a>  nv = n;
-<a name="line697">697: </a>  
-<a name="line698">698: </a>  <font color="#B22222">/* Perform HR decomposition */</font>
-<a name="line699">699: </a>  <font color="#B22222">/* Hyperbolic rotators */</font>
-<a name="line700">700: </a>  PseudoOrthog_HR(&nv,X+off,ld,s+l,R,ldr,perm,cmplxEig,NULL,ds->work+nwus,lws-nwus);
-<a name="line701">701: </a>  <font color="#B22222">/* Sort wr,wi perm */</font> 
-<a name="line702">702: </a>  ts = ds->work+nwus;
-<a name="line703">703: </a>  nwus += n;
-<a name="line704">704: </a>  PetscMemcpy(ts,wr+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line705">705: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wr[i+l] = ts[perm[i]];
-<a name="line706">706: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line707">707: </a>  PetscMemcpy(ts,wi+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line708">708: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wi[i+l] = ts[perm[i]];
-<a name="line709">709: </a><font color="#A020F0">#endif</font>
-<a name="line710">710: </a>  <font color="#B22222">/* Projected Matrix */</font>
-<a name="line711">711: </a>  PetscMemzero(ds->rmat[DS_MAT_T]+2*ld,ld*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line712">712: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line713">713: </a>  e = d+ld;
-<a name="line714">714: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
-<a name="line715">715: </a>    <font color="#4169E1">if</font> (cmplxEig[i]==0) { <font color="#B22222">/* Real */</font>
-<a name="line716">716: </a>      d[l+i] = PetscRealPart(wr[l+i]*s[l+i]);
-<a name="line717">717: </a>      e[l+i] = 0.0;
-<a name="line718">718: </a>    } <font color="#4169E1">else</font> {
-<a name="line719">719: </a>      vr = PetscRealPart(wr[l+i]);
-<a name="line720">720: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line721">721: </a>      vi = PetscImaginaryPart(wr[l+i]);
-<a name="line722">722: </a><font color="#A020F0">#else</font>
-<a name="line723">723: </a>      vi = PetscRealPart(wi[l+i]);
-<a name="line724">724: </a><font color="#A020F0">#endif</font>
-<a name="line725">725: </a>      <font color="#4169E1">if</font> (cmplxEig[i]==-1) vi = -vi;
-<a name="line726">726: </a>      tr = PetscRealPart((R[i+(i+1)*ldr]/R[i+i*ldr]))*vi;
-<a name="line727">727: </a>      d[l+i] = (vr-tr)*s[l+i];
-<a name="line728">728: </a>      d[l+i+1] = (vr+tr)*s[l+i+1];
-<a name="line729">729: </a>      e[l+i] = PetscRealPart(s[l+i]*(R[(i+1)+(i+1)*ldr]/R[i+i*ldr])*vi);
-<a name="line730">730: </a>      e[l+i+1] = 0.0;
-<a name="line731">731: </a>      i++;
-<a name="line732">732: </a>    }
-<a name="line733">733: </a>  }
-<a name="line734">734: </a>  <font color="#B22222">/* accumulate previous Q */</font>
-<a name="line735">735: </a>  <font color="#4169E1">if</font> (accum) {
-<a name="line736">736: </a>    PetscBLASIntCast(nv,&nv_);
-<a name="line737">737: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
-<a name="line738">738: </a>    W = ds->mat[DS_MAT_W];
-<a name="line739">739: </a>    DSCopyMatrix_Private(ds,DS_MAT_W,DS_MAT_Q);
-<a name="line740">740: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&nv_,&n_,&oneS,W+off,&ld_,X+off,&ld_,&zeroS,ds->mat[DS_MAT_Q]+off,&ld_));
-<a name="line741">741: </a>  } <font color="#4169E1">else</font> {
-<a name="line742">742: </a>    PetscMemzero(ds->mat[DS_MAT_Q],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line743">743: </a>    <font color="#4169E1">for</font> (i=0;i<ds->l;i++) *(ds->mat[DS_MAT_Q]+i+i*ld) = 1.0;
-<a name="line744">744: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) { PetscMemcpy(ds->mat[DS_MAT_Q]+off+i*ld,X+off+i*ld,n*<font color="#4169E1">sizeof</font>(PetscScalar)); }
-<a name="line745">745: </a>  }
-<a name="line746">746: </a>  ds->t = nv+l;
-<a name="line747">747: </a>  <font color="#4169E1">if</font> (!ds->compact) { DSSwitchFormat_GHIEP(ds,PETSC_FALSE); }  
-<a name="line748">748: </a>  <font color="#4169E1">return</font>(0);
-<a name="line749">749: </a>}
+<a name="line658">658: </a>  l = ds->l;
+<a name="line659">659: </a>  n = ds->n-l;
+<a name="line660">660: </a>  PetscBLASIntCast(n,&n_);
+<a name="line661">661: </a>  ld = ds->ld;
+<a name="line662">662: </a>  PetscBLASIntCast(ld,&ld_);
+<a name="line663">663: </a>  off = l*ld+l;
+<a name="line664">664: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line665">665: </a>  <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line666">666: </a>    <font color="#4169E1">for</font> (i=l;i<ds->n;i++) s[i] = PetscRealPart(*(ds->mat[DS_MAT_B]+i*ld+i));
+<a name="line667">667: </a>  }
+<a name="line668">668: </a>  lws = n*n+7*n;
+<a name="line669">669: </a>  lwi = 2*n;
+<a name="line670">670: </a>  DSAllocateWork_Private(ds,lws,0,lwi);
+<a name="line671">671: </a>  R = ds->work+nwus;
+<a name="line672">672: </a>  nwus += n*n;
+<a name="line673">673: </a>  ldr = n;
+<a name="line674">674: </a>  perm = ds->iwork + nwui;
+<a name="line675">675: </a>  nwui += n;
+<a name="line676">676: </a>  cmplxEig = ds->iwork+nwui;
+<a name="line677">677: </a>  X = ds->mat[mat];
+<a name="line678">678: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line679">679: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line680">680: </a>    vi = PetscImaginaryPart(wr[l+i]);
+<a name="line681">681: </a><font color="#A020F0">#else</font>
+<a name="line682">682: </a>    vi = PetscRealPart(wi[l+i]);
+<a name="line683">683: </a><font color="#A020F0">#endif</font>
+<a name="line684">684: </a>    <font color="#4169E1">if</font> (vi!=0) {
+<a name="line685">685: </a>      cmplxEig[i] = 1;
+<a name="line686">686: </a>      cmplxEig[i+1] = 2;
+<a name="line687">687: </a>      i++;
+<a name="line688">688: </a>    } <font color="#4169E1">else</font> cmplxEig[i] = 0;
+<a name="line689">689: </a>  }
+<a name="line690">690: </a>  nv = n;
+<a name="line691">691: </a>  
+<a name="line692">692: </a>  <font color="#B22222">/* Perform HR decomposition */</font>
+<a name="line693">693: </a>  <font color="#B22222">/* Hyperbolic rotators */</font>
+<a name="line694">694: </a>  PseudoOrthog_HR(&nv,X+off,ld,s+l,R,ldr,perm,cmplxEig,NULL,ds->work+nwus);
+<a name="line695">695: </a>  <font color="#B22222">/* Sort wr,wi perm */</font> 
+<a name="line696">696: </a>  ts = ds->work+nwus;
+<a name="line697">697: </a>  PetscMemcpy(ts,wr+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line698">698: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wr[i+l] = ts[perm[i]];
+<a name="line699">699: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line700">700: </a>  PetscMemcpy(ts,wi+l,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line701">701: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wi[i+l] = ts[perm[i]];
+<a name="line702">702: </a><font color="#A020F0">#endif</font>
+<a name="line703">703: </a>  <font color="#B22222">/* Projected Matrix */</font>
+<a name="line704">704: </a>  PetscMemzero(ds->rmat[DS_MAT_T]+2*ld,ld*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line705">705: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line706">706: </a>  e = d+ld;
+<a name="line707">707: </a>  <font color="#4169E1">for</font> (i=0;i<nv;i++) {
+<a name="line708">708: </a>    <font color="#4169E1">if</font> (cmplxEig[i]==0) { <font color="#B22222">/* Real */</font>
+<a name="line709">709: </a>      d[l+i] = PetscRealPart(wr[l+i]*s[l+i]);
+<a name="line710">710: </a>      e[l+i] = 0.0;
+<a name="line711">711: </a>    } <font color="#4169E1">else</font> {
+<a name="line712">712: </a>      vr = PetscRealPart(wr[l+i]);
+<a name="line713">713: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line714">714: </a>      vi = PetscImaginaryPart(wr[l+i]);
+<a name="line715">715: </a><font color="#A020F0">#else</font>
+<a name="line716">716: </a>      vi = PetscRealPart(wi[l+i]);
+<a name="line717">717: </a><font color="#A020F0">#endif</font>
+<a name="line718">718: </a>      <font color="#4169E1">if</font> (cmplxEig[i]==-1) vi = -vi;
+<a name="line719">719: </a>      tr = PetscRealPart((R[i+(i+1)*ldr]/R[i+i*ldr]))*vi;
+<a name="line720">720: </a>      d[l+i] = (vr-tr)*s[l+i];
+<a name="line721">721: </a>      d[l+i+1] = (vr+tr)*s[l+i+1];
+<a name="line722">722: </a>      e[l+i] = PetscRealPart(s[l+i]*(R[(i+1)+(i+1)*ldr]/R[i+i*ldr])*vi);
+<a name="line723">723: </a>      e[l+i+1] = 0.0;
+<a name="line724">724: </a>      i++;
+<a name="line725">725: </a>    }
+<a name="line726">726: </a>  }
+<a name="line727">727: </a>  <font color="#B22222">/* accumulate previous Q */</font>
+<a name="line728">728: </a>  <font color="#4169E1">if</font> (accum) {
+<a name="line729">729: </a>    PetscBLASIntCast(nv,&nv_);
+<a name="line730">730: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line731">731: </a>    W = ds->mat[DS_MAT_W];
+<a name="line732">732: </a>    DSCopyMatrix_Private(ds,DS_MAT_W,DS_MAT_Q);
+<a name="line733">733: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n_,&nv_,&n_,&oneS,W+off,&ld_,X+off,&ld_,&zeroS,ds->mat[DS_MAT_Q]+off,&ld_));
+<a name="line734">734: </a>  } <font color="#4169E1">else</font> {
+<a name="line735">735: </a>    PetscMemzero(ds->mat[DS_MAT_Q],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line736">736: </a>    <font color="#4169E1">for</font> (i=0;i<ds->l;i++) *(ds->mat[DS_MAT_Q]+i+i*ld) = 1.0;
+<a name="line737">737: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) { PetscMemcpy(ds->mat[DS_MAT_Q]+off+i*ld,X+off+i*ld,n*<font color="#4169E1">sizeof</font>(PetscScalar)); }
+<a name="line738">738: </a>  }
+<a name="line739">739: </a>  ds->t = nv+l;
+<a name="line740">740: </a>  <font color="#4169E1">if</font> (!ds->compact) { DSSwitchFormat_GHIEP(ds,PETSC_FALSE); }  
+<a name="line741">741: </a>  <font color="#4169E1">return</font>(0);
+<a name="line742">742: </a>}
 
-<a name="line753">753: </a><font color="#B22222">/*</font>
-<a name="line754">754: </a><font color="#B22222">   Reduce to tridiagonal-diagonal pair by means of TridiagDiag_HHR.</font>
-<a name="line755">755: </a><font color="#B22222">*/</font>
-<a name="line756">756: </a><strong><font color="#4169E1"><a name="DSIntermediate_GHIEP"></a>PetscErrorCode DSIntermediate_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line757">757: </a>{
-<a name="line759">759: </a>  PetscInt       i,ld,off;
-<a name="line760">760: </a>  PetscInt       nwall,nwallr,nwalli,nwu=0,nwur=0,nwui=0;
-<a name="line761">761: </a>  PetscScalar    *A,*B,*Q;
-<a name="line762">762: </a>  PetscReal      *d,*e,*s;
+<a name="line746">746: </a><font color="#B22222">/*</font>
+<a name="line747">747: </a><font color="#B22222">   Reduce to tridiagonal-diagonal pair by means of TridiagDiag_HHR.</font>
+<a name="line748">748: </a><font color="#B22222">*/</font>
+<a name="line749">749: </a><strong><font color="#4169E1"><a name="DSIntermediate_GHIEP"></a>PetscErrorCode DSIntermediate_GHIEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line750">750: </a>{
+<a name="line752">752: </a>  PetscInt       i,ld,off;
+<a name="line753">753: </a>  PetscInt       nwall,nwallr,nwalli;
+<a name="line754">754: </a>  PetscScalar    *A,*B,*Q;
+<a name="line755">755: </a>  PetscReal      *d,*e,*s;
 
-<a name="line765">765: </a>  ld = ds->ld;
-<a name="line766">766: </a>  A = ds->mat[DS_MAT_A];
-<a name="line767">767: </a>  B = ds->mat[DS_MAT_B];
-<a name="line768">768: </a>  Q = ds->mat[DS_MAT_Q];
-<a name="line769">769: </a>  d = ds->rmat[DS_MAT_T];
-<a name="line770">770: </a>  e = ds->rmat[DS_MAT_T]+ld;
-<a name="line771">771: </a>  s = ds->rmat[DS_MAT_D];
-<a name="line772">772: </a>  off = ds->l+ds->l*ld;
-<a name="line773">773: </a>  PetscMemzero(Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line774">774: </a>  nwall = ld*ld+ld;
-<a name="line775">775: </a>  nwallr = ld;
-<a name="line776">776: </a>  nwalli = ld;
-<a name="line777">777: </a>  DSAllocateWork_Private(ds,nwall,nwallr,nwalli);
-<a name="line778">778: </a>  <font color="#4169E1">for</font> (i=0;i<ds->n;i++) Q[i+i*ld]=1.0;
-<a name="line779">779: </a>  <font color="#4169E1">for</font> (i=0;i<ds->n-ds->l;i++) *(ds->perm+i)=i;
-<a name="line780">780: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line758">758: </a>  ld = ds->ld;
+<a name="line759">759: </a>  A = ds->mat[DS_MAT_A];
+<a name="line760">760: </a>  B = ds->mat[DS_MAT_B];
+<a name="line761">761: </a>  Q = ds->mat[DS_MAT_Q];
+<a name="line762">762: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line763">763: </a>  e = ds->rmat[DS_MAT_T]+ld;
+<a name="line764">764: </a>  s = ds->rmat[DS_MAT_D];
+<a name="line765">765: </a>  off = ds->l+ds->l*ld;
+<a name="line766">766: </a>  PetscMemzero(Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line767">767: </a>  nwall = ld*ld+ld;
+<a name="line768">768: </a>  nwallr = ld;
+<a name="line769">769: </a>  nwalli = ld;
+<a name="line770">770: </a>  DSAllocateWork_Private(ds,nwall,nwallr,nwalli);
+<a name="line771">771: </a>  <font color="#4169E1">for</font> (i=0;i<ds->n;i++) Q[i+i*ld]=1.0;
+<a name="line772">772: </a>  <font color="#4169E1">for</font> (i=0;i<ds->n-ds->l;i++) *(ds->perm+i)=i;
+<a name="line773">773: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line774">774: </a>    <font color="#4169E1">if</font> (ds->state < DS_STATE_INTERMEDIATE) {
+<a name="line775">775: </a>      DSSwitchFormat_GHIEP(ds,PETSC_FALSE);
+<a name="line776">776: </a>      TridiagDiag_HHR(ds->k-ds->l+1,A+off,ld,s+ds->l,Q+off,ld,PETSC_TRUE,d+ds->l,e+ds->l,ds->perm,ds->work,ds->rwork,ds->iwork);
+<a name="line777">777: </a>      ds->k = ds->l;
+<a name="line778">778: </a>      PetscMemzero(d+2*ld+ds->l,(ds->n-ds->l)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line779">779: </a>    }
+<a name="line780">780: </a>  } <font color="#4169E1">else</font> {
 <a name="line781">781: </a>    <font color="#4169E1">if</font> (ds->state < DS_STATE_INTERMEDIATE) {
-<a name="line782">782: </a>      DSSwitchFormat_GHIEP(ds,PETSC_FALSE);
-<a name="line783">783: </a>      TridiagDiag_HHR(ds->k-ds->l+1,A+off,ld,s+ds->l,Q+off,ld,PETSC_TRUE,d+ds->l,e+ds->l,ds->perm,ds->work+nwu,nwall-nwu,ds->rwork+nwur,nwallr-nwur,ds->iwork+nwui,nwalli-nwui);
-<a name="line784">784: </a>      ds->k = ds->l;
-<a name="line785">785: </a>      PetscMemzero(d+2*ld+ds->l,(ds->n-ds->l)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line786">786: </a>    }
-<a name="line787">787: </a>  } <font color="#4169E1">else</font> {
-<a name="line788">788: </a>    <font color="#4169E1">if</font> (ds->state < DS_STATE_INTERMEDIATE) {
-<a name="line789">789: </a>      <font color="#4169E1">for</font> (i=0;i<ds->n;i++) s[i] = PetscRealPart(B[i+i*ld]);
-<a name="line790">790: </a>      TridiagDiag_HHR(ds->n-ds->l,A+off,ld,s+ds->l,Q+off,ld,PETSC_FALSE,d+ds->l,e+ds->l,ds->perm,ds->work+nwu,nwall-nwu,ds->rwork+nwur,nwallr-nwur,ds->iwork+nwui,nwalli-nwui);
-<a name="line791">791: </a>      PetscMemzero(d+2*ld,(ds->n)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line792">792: </a>      ds->k = ds->l;
-<a name="line793">793: </a>      DSSwitchFormat_GHIEP(ds,PETSC_FALSE);
-<a name="line794">794: </a>    } <font color="#4169E1">else</font> {
-<a name="line795">795: </a>      DSSwitchFormat_GHIEP(ds,PETSC_TRUE);
-<a name="line796">796: </a>    }
-<a name="line797">797: </a>  }
-<a name="line798">798: </a>  <font color="#4169E1">return</font>(0);
-<a name="line799">799: </a>}
+<a name="line782">782: </a>      <font color="#4169E1">for</font> (i=0;i<ds->n;i++) s[i] = PetscRealPart(B[i+i*ld]);
+<a name="line783">783: </a>      TridiagDiag_HHR(ds->n-ds->l,A+off,ld,s+ds->l,Q+off,ld,PETSC_FALSE,d+ds->l,e+ds->l,ds->perm,ds->work,ds->rwork,ds->iwork);
+<a name="line784">784: </a>      PetscMemzero(d+2*ld,(ds->n)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line785">785: </a>      ds->k = ds->l;
+<a name="line786">786: </a>      DSSwitchFormat_GHIEP(ds,PETSC_FALSE);
+<a name="line787">787: </a>    } <font color="#4169E1">else</font> {
+<a name="line788">788: </a>      DSSwitchFormat_GHIEP(ds,PETSC_TRUE);
+<a name="line789">789: </a>    }
+<a name="line790">790: </a>  }
+<a name="line791">791: </a>  <font color="#4169E1">return</font>(0);
+<a name="line792">792: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/ghiep/makefile b/src/sys/classes/ds/impls/ghiep/makefile
index d7ff28a..78bf060 100644
--- a/src/sys/classes/ds/impls/ghiep/makefile
+++ b/src/sys/classes/ds/impls/ghiep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/ghiep/makefile.html b/src/sys/classes/ds/impls/ghiep/makefile.html
index 808b2d9..190b43e 100644
--- a/src/sys/classes/ds/impls/ghiep/makefile.html
+++ b/src/sys/classes/ds/impls/ghiep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/ghiep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:58+00:00">
+<meta name="date" content="2016-05-16T10:31:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/ghiep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/ghiep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/gnhep/dsgnhep.c b/src/sys/classes/ds/impls/gnhep/dsgnhep.c
index 0a5351a..114727d 100644
--- a/src/sys/classes/ds/impls/gnhep/dsgnhep.c
+++ b/src/sys/classes/ds/impls/gnhep/dsgnhep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -82,7 +82,7 @@ PetscErrorCode DSView_GNHEP(DS ds,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_GNHEP_Eigen_Some"
-PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscBool left)
+static PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)
 {
 #if defined(SLEPC_MISSING_LAPACK_TGEVC)
   PetscFunctionBegin;
@@ -90,8 +90,9 @@ PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscBool left)
 #else
   PetscErrorCode ierr;
   PetscInt       i;
-  PetscBLASInt   n,ld,mout,info,*select,mm;
-  PetscScalar    *X,*Y,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],fone=1.0,fzero=0.0;
+  PetscBLASInt   n,ld,mout,info,*select,mm,inc = 1;
+  PetscScalar    *X,*Y,*Z,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],tmp,fone=1.0,fzero=0.0;
+  PetscReal      norm;
   PetscBool      iscomplex = PETSC_FALSE;
   const char     *side;
 
@@ -107,10 +108,10 @@ PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscBool left)
     Y = NULL;
     side = "R";
   }
+  Z = left? Y: X;
   ierr = DSAllocateWork_Private(ds,0,0,ld);CHKERRQ(ierr);
   select = ds->iwork;
-  for (i=0;i<n;i++) select[i] = 0;
-  select[*k] = 1;
+  for (i=0;i<n;i++) select[i] = (PetscBLASInt)PETSC_FALSE;
   if (ds->state <= DS_STATE_INTERMEDIATE) {
     ierr = DSSetIdentity(ds,DS_MAT_Q);CHKERRQ(ierr);
     ierr = DSSetIdentity(ds,DS_MAT_Z);CHKERRQ(ierr);
@@ -119,38 +120,62 @@ PetscErrorCode DSVectors_GNHEP_Eigen_Some(DS ds,PetscInt *k,PetscBool left)
   if (ds->state < DS_STATE_CONDENSED) {
     ierr = DSSetState(ds,DS_STATE_CONDENSED);CHKERRQ(ierr);
   }
+
+  /* compute k-th eigenvector */
+  select[*k] = (PetscBLASInt)PETSC_TRUE;
 #if defined(PETSC_USE_COMPLEX)
   mm = 1;
   ierr = DSAllocateWork_Private(ds,2*ld,2*ld,0);CHKERRQ(ierr);
   PetscStackCallBLAS("LAPACKtgevc",LAPACKtgevc_(side,"S",select,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&mm,&mout,ds->work,ds->rwork,&info));
 #else
   if ((*k)<n-1 && (A[ld*(*k)+(*k)+1] != 0.0 || B[ld*(*k)+(*k)+1] != 0.0)) iscomplex = PETSC_TRUE;
-  mm = iscomplex ? 2 : 1;
+  mm = iscomplex? 2: 1;
   ierr = DSAllocateWork_Private(ds,6*ld,0,0);CHKERRQ(ierr);
   PetscStackCallBLAS("LAPACKtgevc",LAPACKtgevc_(side,"S",select,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&mm,&mout,ds->work,&info));
 #endif
-  if (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,"Error in Lapack xTGEVC %i",info);
-  if (select[(*k)] == 0 || mout != mm) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_SUP,"Unsupported the computation of the second vector in a complex pair");
-  /* Backtransform: (X/Y) <- (Q/Z) * (X/Y) */
-  ierr = PetscMemcpy(ds->work,left?Y:X,mm*ld*sizeof(PetscScalar));CHKERRQ(ierr);
-  PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n,&mm,&n,&fone,ds->mat[left?DS_MAT_Z:DS_MAT_Q],&ld,ds->work,&ld,&fzero,left?Y:X,&ld));
-  /* Update k to the last vector index in the conjugate pair */
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xTGEVC %i",info);
+  if (!select[*k] || mout != mm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Wrong arguments in call to Lapack xTGEVC");
+
+  /* accumulate and normalize eigenvectors */
+  ierr = PetscMemcpy(ds->work,Z,mm*ld*sizeof(PetscScalar));CHKERRQ(ierr);
+  PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n,&mm,&n,&fone,ds->mat[left?DS_MAT_Z:DS_MAT_Q],&ld,ds->work,&ld,&fzero,Z,&ld));
+  norm = BLASnrm2_(&n,Z,&inc);
+#if !defined(PETSC_USE_COMPLEX)
+  if (iscomplex) {
+    tmp = BLASnrm2_(&n,Z+ld,&inc);
+    norm = SlepcAbsEigenvalue(norm,tmp);
+  }
+#endif
+  tmp = 1.0 / norm;
+  PetscStackCallBLAS("BLASscal",BLASscal_(&n,&tmp,Z,&inc));
+#if !defined(PETSC_USE_COMPLEX)
+  if (iscomplex) PetscStackCallBLAS("BLASscal",BLASscal_(&n,&tmp,Z+ld,&inc));
+#endif
+
+  /* set output arguments */
   if (iscomplex) (*k)++;
+  if (rnorm) {
+    if (iscomplex) *rnorm = SlepcAbsEigenvalue(Z[n-1],Z[n-1+ld]);
+    else *rnorm = PetscAbsScalar(Z[n-1]);
+  }
   PetscFunctionReturn(0);
 #endif
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_GNHEP_Eigen_All"
-PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)
+static PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)
 {
 #if defined(SLEPC_MISSING_LAPACK_TGEVC)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TGEVC - Lapack routine is unavailable");
 #else
   PetscErrorCode ierr;
-  PetscBLASInt   n,ld,mout,info;
-  PetscScalar    *X,*Y,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B];
+  PetscInt       i;
+  PetscBLASInt   n,ld,mout,info,inc = 1;
+  PetscBool      iscomplex = PETSC_FALSE;
+  PetscScalar    *X,*Y,*Z,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],tmp;
+  PetscReal      norm;
   const char     *side,*back;
 
   PetscFunctionBegin;
@@ -165,6 +190,7 @@ PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)
     Y = NULL;
     side = "R";
   }
+  Z = left? Y: X;
   if (ds->state <= DS_STATE_INTERMEDIATE) {
     ierr = DSSetIdentity(ds,DS_MAT_Q);CHKERRQ(ierr);
     ierr = DSSetIdentity(ds,DS_MAT_Z);CHKERRQ(ierr);
@@ -186,6 +212,24 @@ PetscErrorCode DSVectors_GNHEP_Eigen_All(DS ds,PetscBool left)
   PetscStackCallBLAS("LAPACKtgevc",LAPACKtgevc_(side,back,NULL,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,&info));
 #endif
   if (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,"Error in Lapack xTGEVC %i",info);
+
+  /* normalize eigenvectors */
+  for (i=0;i<n;i++) {
+    if (i<n-1 && (A[i+1+i*ld]!=0.0 || B[i+1+i*ld]!=0.0)) iscomplex = PETSC_TRUE;
+    norm = BLASnrm2_(&n,Z+i*ld,&inc);
+#if !defined(PETSC_USE_COMPLEX)
+    if (iscomplex) {
+      tmp = BLASnrm2_(&n,Z+(i+1)*ld,&inc);
+      norm = SlepcAbsEigenvalue(norm,tmp);
+    }
+#endif
+    tmp = 1.0 / norm;
+    PetscStackCallBLAS("BLASscal",BLASscal_(&n,&tmp,Z+i*ld,&inc));
+#if !defined(PETSC_USE_COMPLEX)
+    if (iscomplex) PetscStackCallBLAS("BLASscal",BLASscal_(&n,&tmp,Z+(i+1)*ld,&inc));
+#endif
+    if (iscomplex) i++;
+  }
   PetscFunctionReturn(0);
 #endif
 }
@@ -197,12 +241,11 @@ PetscErrorCode DSVectors_GNHEP(DS ds,DSMatType mat,PetscInt *k,PetscReal *rnorm)
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  if (rnorm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Not implemented yet");
   switch (mat) {
     case DS_MAT_X:
     case DS_MAT_Y:
       if (k) {
-        ierr = DSVectors_GNHEP_Eigen_Some(ds,k,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);CHKERRQ(ierr);
+        ierr = DSVectors_GNHEP_Eigen_Some(ds,k,rnorm,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);CHKERRQ(ierr);
       } else {
         ierr = DSVectors_GNHEP_Eigen_All(ds,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);CHKERRQ(ierr);
       }
@@ -273,9 +316,9 @@ PetscErrorCode DSNormalize_GNHEP(DS ds,DSMatType mat,PetscInt col)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSSort_GNHEP_Arbitrary"
-PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)
+static PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)
 {
-#if defined(SLEPC_MISSING_LAPACK_TGSEN)
+#if defined(PETSC_MISSING_LAPACK_TGSEN)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TGSEN - Lapack routine is unavailable");
 #else
@@ -326,7 +369,7 @@ PetscErrorCode DSSort_GNHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,Pets
 
 #undef __FUNCT__
 #define __FUNCT__ "DSSort_GNHEP_Total"
-PetscErrorCode DSSort_GNHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)
+static PetscErrorCode DSSort_GNHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)
 {
 #if defined(SLEPC_MISSING_LAPACK_TGEXC) || !defined(PETSC_USE_COMPLEX) && (defined(SLEPC_MISSING_LAPACK_LAMCH) || defined(SLEPC_MISSING_LAPACK_LAG2))
   PetscFunctionBegin;
diff --git a/src/sys/classes/ds/impls/gnhep/dsgnhep.c.html b/src/sys/classes/ds/impls/gnhep/dsgnhep.c.html
index 5987920..bd0e226 100644
--- a/src/sys/classes/ds/impls/gnhep/dsgnhep.c.html
+++ b/src/sys/classes/ds/impls/gnhep/dsgnhep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/gnhep/dsgnhep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:58+00:00">
+<meta name="date" content="2016-05-16T10:31:48+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/gnhep/dsgnhep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/gnhep/dsgnhep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -84,486 +84,529 @@
 <a name="line80"> 80: </a>  <font color="#4169E1">return</font>(0);
 <a name="line81"> 81: </a>}
 
-<a name="line85"> 85: </a><strong><font color="#4169E1"><a name="DSVectors_GNHEP_Eigen_Some"></a>PetscErrorCode DSVectors_GNHEP_Eigen_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *k,PetscBool left)</font></strong>
+<a name="line85"> 85: </a><strong><font color="#4169E1"><a name="DSVectors_GNHEP_Eigen_Some"></a>static PetscErrorCode DSVectors_GNHEP_Eigen_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *k,PetscReal *rnorm,PetscBool left)</font></strong>
 <a name="line86"> 86: </a>{
 <a name="line87"> 87: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TGEVC)</font>
 <a name="line89"> 89: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGEVC - Lapack routine is unavailable"</font>);
 <a name="line90"> 90: </a><font color="#A020F0">#else</font>
 <a name="line92"> 92: </a>  PetscInt       i;
-<a name="line93"> 93: </a>  PetscBLASInt   n,ld,mout,info,*select,mm;
-<a name="line94"> 94: </a>  PetscScalar    *X,*Y,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],fone=1.0,fzero=0.0;
-<a name="line95"> 95: </a>  PetscBool      iscomplex = PETSC_FALSE;
-<a name="line96"> 96: </a>  const char     *side;
-
-<a name="line99"> 99: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line100">100: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line101">101: </a>  <font color="#4169E1">if</font> (left) {
-<a name="line102">102: </a>    X = NULL;
-<a name="line103">103: </a>    Y = &ds->mat[DS_MAT_Y][ld*(*k)];
-<a name="line104">104: </a>    side = <font color="#666666">"L"</font>;
-<a name="line105">105: </a>  } <font color="#4169E1">else</font> {
-<a name="line106">106: </a>    X = &ds->mat[DS_MAT_X][ld*(*k)];
-<a name="line107">107: </a>    Y = NULL;
-<a name="line108">108: </a>    side = <font color="#666666">"R"</font>;
-<a name="line109">109: </a>  }
-<a name="line110">110: </a>  DSAllocateWork_Private(ds,0,0,ld);
-<a name="line111">111: </a>  select = ds->iwork;
-<a name="line112">112: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) select[i] = 0;
-<a name="line113">113: </a>  select[*k] = 1;
-<a name="line114">114: </a>  <font color="#4169E1">if</font> (ds->state <= DS_STATE_INTERMEDIATE) {
-<a name="line115">115: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Q);
-<a name="line116">116: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Z);
-<a name="line117">117: </a>  }
-<a name="line118">118: </a>  CleanDenseSchur(n,0,A,ld,B,ld,ds->mat[DS_MAT_Q],ld,ds->mat[DS_MAT_Z],ld,PETSC_TRUE);
-<a name="line119">119: </a>  <font color="#4169E1">if</font> (ds->state < DS_STATE_CONDENSED) {
-<a name="line120">120: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_CONDENSED);
-<a name="line121">121: </a>  }
-<a name="line122">122: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line123">123: </a>  mm = 1;
-<a name="line124">124: </a>  DSAllocateWork_Private(ds,2*ld,2*ld,0);
-<a name="line125">125: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,<font color="#666666">"S"</font>,select,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&mm,&mout,ds->work,ds->rwork,&info));
-<a name="line126">126: </a><font color="#A020F0">#else</font>
-<a name="line127">127: </a>  <font color="#4169E1">if</font> ((*k)<n-1 && (A[ld*(*k)+(*k)+1] != 0.0 || B[ld*(*k)+(*k)+1] != 0.0)) iscomplex = PETSC_TRUE;
-<a name="line128">128: </a>  mm = iscomplex ? 2 : 1;
-<a name="line129">129: </a>  DSAllocateWork_Private(ds,6*ld,0,0);
-<a name="line130">130: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,<font color="#666666">"S"</font>,select,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&mm,&mout,ds->work,&info));
-<a name="line131">131: </a><font color="#A020F0">#endif</font>
-<a name="line132">132: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGEVC %i"</font>,info);
-<a name="line133">133: </a>  <font color="#4169E1">if</font> (select[(*k)] == 0 || mout != mm) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_SUP,<font color="#666666">"Unsupported the computation of the second vector in a complex pair"</font>);
-<a name="line134">134: </a>  <font color="#B22222">/* Backtransform: (X/Y) <- (Q/Z) * (X/Y) */</font>
-<a name="line135">135: </a>  PetscMemcpy(ds->work,left?Y:X,mm*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line136">136: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&mm,&n,&fone,ds->mat[left?DS_MAT_Z:DS_MAT_Q],&ld,ds->work,&ld,&fzero,left?Y:X,&ld));
-<a name="line137">137: </a>  <font color="#B22222">/* Update k to the last vector index in the conjugate pair */</font>
-<a name="line138">138: </a>  <font color="#4169E1">if</font> (iscomplex) (*k)++;
-<a name="line139">139: </a>  <font color="#4169E1">return</font>(0);
-<a name="line140">140: </a><font color="#A020F0">#endif</font>
-<a name="line141">141: </a>}
-
-<a name="line145">145: </a><strong><font color="#4169E1"><a name="DSVectors_GNHEP_Eigen_All"></a>PetscErrorCode DSVectors_GNHEP_Eigen_All(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool left)</font></strong>
-<a name="line146">146: </a>{
-<a name="line147">147: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TGEVC)</font>
-<a name="line149">149: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGEVC - Lapack routine is unavailable"</font>);
-<a name="line150">150: </a><font color="#A020F0">#else</font>
-<a name="line152">152: </a>  PetscBLASInt   n,ld,mout,info;
-<a name="line153">153: </a>  PetscScalar    *X,*Y,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B];
-<a name="line154">154: </a>  const char     *side,*back;
-
-<a name="line157">157: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line158">158: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line159">159: </a>  <font color="#4169E1">if</font> (left) {
-<a name="line160">160: </a>    X = NULL;
-<a name="line161">161: </a>    Y = ds->mat[DS_MAT_Y];
-<a name="line162">162: </a>    side = <font color="#666666">"L"</font>;
-<a name="line163">163: </a>  } <font color="#4169E1">else</font> {
-<a name="line164">164: </a>    X = ds->mat[DS_MAT_X];
-<a name="line165">165: </a>    Y = NULL;
-<a name="line166">166: </a>    side = <font color="#666666">"R"</font>;
-<a name="line167">167: </a>  }
-<a name="line168">168: </a>  <font color="#4169E1">if</font> (ds->state <= DS_STATE_INTERMEDIATE) {
-<a name="line169">169: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Q);
-<a name="line170">170: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Z);
-<a name="line171">171: </a>  }
-<a name="line172">172: </a>  CleanDenseSchur(n,0,A,ld,B,ld,ds->mat[DS_MAT_Q],ld,ds->mat[DS_MAT_Z],ld,PETSC_TRUE);
-<a name="line173">173: </a>  <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
-<a name="line174">174: </a>    <font color="#B22222">/* <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>() has been called, backtransform with matrix Q */</font>
-<a name="line175">175: </a>    back = <font color="#666666">"B"</font>;
-<a name="line176">176: </a>    PetscMemcpy(left?Y:X,ds->mat[left?DS_MAT_Z:DS_MAT_Q],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line177">177: </a>  } <font color="#4169E1">else</font> {
-<a name="line178">178: </a>    back = <font color="#666666">"A"</font>;
-<a name="line179">179: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_CONDENSED);
-<a name="line180">180: </a>  }
-<a name="line181">181: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line182">182: </a>  DSAllocateWork_Private(ds,2*ld,2*ld,0);
-<a name="line183">183: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,back,NULL,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,ds->rwork,&info));
-<a name="line184">184: </a><font color="#A020F0">#else</font>
-<a name="line185">185: </a>  DSAllocateWork_Private(ds,6*ld,0,0);
-<a name="line186">186: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,back,NULL,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,&info));
-<a name="line187">187: </a><font color="#A020F0">#endif</font>
-<a name="line188">188: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGEVC %i"</font>,info);
-<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
-<a name="line190">190: </a><font color="#A020F0">#endif</font>
-<a name="line191">191: </a>}
-
-<a name="line195">195: </a><strong><font color="#4169E1"><a name="DSVectors_GNHEP"></a>PetscErrorCode DSVectors_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *k,PetscReal *rnorm)</font></strong>
-<a name="line196">196: </a>{
-
-<a name="line200">200: </a>  <font color="#4169E1">if</font> (rnorm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line201">201: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line202">202: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line203">203: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line204">204: </a>      <font color="#4169E1">if</font> (k) {
-<a name="line205">205: </a>        DSVectors_GNHEP_Eigen_Some(ds,k,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);
-<a name="line206">206: </a>      } <font color="#4169E1">else</font> {
-<a name="line207">207: </a>        DSVectors_GNHEP_Eigen_All(ds,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);
-<a name="line208">208: </a>      }
-<a name="line209">209: </a>      <font color="#4169E1">break</font>;
-<a name="line210">210: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line211">211: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line212">212: </a>  }
-<a name="line213">213: </a>  <font color="#4169E1">return</font>(0);
-<a name="line214">214: </a>}
-
-<a name="line218">218: </a><strong><font color="#4169E1"><a name="DSNormalize_GNHEP"></a>PetscErrorCode DSNormalize_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
-<a name="line219">219: </a>{
-<a name="line221">221: </a>  PetscInt       i,i0,i1;
-<a name="line222">222: </a>  PetscBLASInt   ld,n,one = 1;
-<a name="line223">223: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],norm,*x;
-<a name="line224">224: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line225">225: </a>  PetscScalar    norm0;
-<a name="line226">226: </a><font color="#A020F0">#endif</font>
-
-<a name="line229">229: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line230">230: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line231">231: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line232">232: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
-<a name="line233">233: </a>    <font color="#4169E1">case</font> DS_MAT_Z:
-<a name="line234">234: </a>      <font color="#B22222">/* Supported matrices */</font>
-<a name="line235">235: </a>      <font color="#4169E1">break</font>;
-<a name="line236">236: </a>    <font color="#4169E1">case</font> DS_MAT_U:
-<a name="line237">237: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
-<a name="line238">238: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line239">239: </a>      <font color="#4169E1">break</font>;
-<a name="line240">240: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line241">241: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line242">242: </a>  }
-
-<a name="line244">244: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line245">245: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line246">246: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
-<a name="line247">247: </a>  <font color="#4169E1">if</font> (col < 0) {
-<a name="line248">248: </a>    i0 = 0; i1 = ds->n;
-<a name="line249">249: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (col>0 && (A[ds->ld*(col-1)+col] != 0.0 || (B && B[ds->ld*(col-1)+col] != 0.0))) {
-<a name="line250">250: </a>    i0 = col-1; i1 = col+1;
-<a name="line251">251: </a>  } <font color="#4169E1">else</font> {
-<a name="line252">252: </a>    i0 = col; i1 = col+1;
-<a name="line253">253: </a>  }
-<a name="line254">254: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
-<a name="line255">255: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line256">256: </a>    <font color="#4169E1">if</font> (i<n-1 && (A[ds->ld*i+i+1] != 0.0 || (B && B[ds->ld*i+i+1] != 0.0))) {
-<a name="line257">257: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
-<a name="line258">258: </a>      norm0 = BLASnrm2_(&n,&x[ld*(i+1)],&one);
-<a name="line259">259: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
-<a name="line260">260: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
-<a name="line261">261: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*(i+1)],&one));
-<a name="line262">262: </a>      i++;
-<a name="line263">263: </a>    } <font color="#4169E1">else</font>
-<a name="line264">264: </a><font color="#A020F0">#endif</font>
-<a name="line265">265: </a>    {
-<a name="line266">266: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
-<a name="line267">267: </a>      norm = 1.0/norm;
-<a name="line268">268: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
-<a name="line269">269: </a>    }
-<a name="line270">270: </a>  }
-<a name="line271">271: </a>  <font color="#4169E1">return</font>(0);
-<a name="line272">272: </a>}
-
-<a name="line276">276: </a><strong><font color="#4169E1"><a name="DSSort_GNHEP_Arbitrary"></a>PetscErrorCode DSSort_GNHEP_Arbitrary(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
-<a name="line277">277: </a>{
-<a name="line278">278: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TGSEN)</font>
-<a name="line280">280: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGSEN - Lapack routine is unavailable"</font>);
-<a name="line281">281: </a><font color="#A020F0">#else</font>
-<a name="line283">283: </a>  PetscInt       i;
-<a name="line284">284: </a>  PetscBLASInt   info,n,ld,mout,lwork,liwork,*iwork,*selection,zero_=0,true_=1;
-<a name="line285">285: </a>  PetscScalar    *S = ds->mat[DS_MAT_A],*T = ds->mat[DS_MAT_B],*Q = ds->mat[DS_MAT_Q],*Z = ds->mat[DS_MAT_Z],*work,*beta;
-
-<a name="line288">288: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
-<a name="line289">289: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line290">290: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line291">291: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line292">292: </a>  lwork = 4*n+16;
-<a name="line293">293: </a><font color="#A020F0">#else</font>
-<a name="line294">294: </a>  lwork = 1;
-<a name="line295">295: </a><font color="#A020F0">#endif</font>
-<a name="line296">296: </a>  liwork = 1;
-<a name="line297">297: </a>  DSAllocateWork_Private(ds,lwork+2*n,0,liwork+n);
-<a name="line298">298: </a>  beta      = ds->work;
-<a name="line299">299: </a>  work      = ds->work + n;
-<a name="line300">300: </a>  lwork     = ds->lwork - n;
-<a name="line301">301: </a>  selection = ds->iwork;
-<a name="line302">302: </a>  iwork     = ds->iwork + n;
-<a name="line303">303: </a>  liwork    = ds->liwork - n;
-<a name="line304">304: </a>  <font color="#B22222">/* Compute the selected eigenvalue to be in the leading position */</font>
-<a name="line305">305: </a>  DSSortEigenvalues_Private(ds,rr,ri,ds->perm,PETSC_FALSE);
-<a name="line306">306: </a>  PetscMemzero(selection,n*<font color="#4169E1">sizeof</font>(PetscBLASInt));
-<a name="line307">307: </a>  <font color="#4169E1">for</font> (i=0; i<*k; i++) selection[ds->perm[i]] = 1;
-<a name="line308">308: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line309">309: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgsen"</font>,LAPACKtgsen_(&zero_,&true_,&true_,selection,&n,S,&ld,T,&ld,wr,wi,beta,Z,&ld,Q,&ld,&mout,NULL,NULL,NULL,work,&lwork,iwork,&liwork,&info));
-<a name="line310">310: </a><font color="#A020F0">#else</font>
-<a name="line311">311: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgsen"</font>,LAPACKtgsen_(&zero_,&true_,&true_,selection,&n,S,&ld,T,&ld,wr,beta,Z,&ld,Q,&ld,&mout,NULL,NULL,NULL,work,&lwork,iwork,&liwork,&info));
-<a name="line312">312: </a><font color="#A020F0">#endif</font>
-<a name="line313">313: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGSEN %d"</font>,info);
-<a name="line314">314: </a>  *k = mout;
-<a name="line315">315: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line316">316: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wr[i] = (PetscRealPart(wr[i])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line317">317: </a>    <font color="#4169E1">else</font> wr[i] /= beta[i];
-<a name="line318">318: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line319">319: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wi[i] = (wi[i]>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line320">320: </a>    <font color="#4169E1">else</font> wi[i] /= beta[i];
-<a name="line321">321: </a><font color="#A020F0">#endif</font>
-<a name="line322">322: </a>  }
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a><font color="#A020F0">#endif</font>
-<a name="line325">325: </a>}
-
-<a name="line329">329: </a><strong><font color="#4169E1"><a name="DSSort_GNHEP_Total"></a>PetscErrorCode DSSort_GNHEP_Total(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line330">330: </a>{
-<a name="line331">331: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TGEXC) || !defined(PETSC_USE_COMPLEX) && (defined(SLEPC_MISSING_LAPACK_LAMCH) || defined(SLEPC_MISSING_LAPACK_LAG2))</font>
-<a name="line333">333: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGEXC/LAMCH/LAG2 - Lapack routines are unavailable"</font>);
-<a name="line334">334: </a><font color="#A020F0">#else</font>
-<a name="line336">336: </a>  PetscScalar    re;
-<a name="line337">337: </a>  PetscInt       i,j,pos,result;
-<a name="line338">338: </a>  PetscBLASInt   ifst,ilst,info,n,ld,one=1;
-<a name="line339">339: </a>  PetscScalar    *S = ds->mat[DS_MAT_A],*T = ds->mat[DS_MAT_B],*Z = ds->mat[DS_MAT_Z],*Q = ds->mat[DS_MAT_Q];
-<a name="line340">340: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line341">341: </a>  PetscBLASInt   lwork;
-<a name="line342">342: </a>  PetscScalar    *work,a,safmin,scale1,scale2,im;
-<a name="line343">343: </a><font color="#A020F0">#endif</font>
-
-<a name="line346">346: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
-<a name="line347">347: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line348">348: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line349">349: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line350">350: </a>  lwork = -1;
-<a name="line351">351: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgexc"</font>,LAPACKtgexc_(&one,&one,&ld,NULL,&ld,NULL,&ld,NULL,&ld,NULL,&ld,&one,&one,&a,&lwork,&info));
-<a name="line352">352: </a>  safmin = LAPACKlamch_(<font color="#666666">"S"</font>);
-<a name="line353">353: </a>  PetscBLASIntCast((PetscInt)a,&lwork);
-<a name="line354">354: </a>  DSAllocateWork_Private(ds,lwork,0,0);
-<a name="line355">355: </a>  work = ds->work;
-<a name="line356">356: </a><font color="#A020F0">#endif</font>
-<a name="line357">357: </a>  <font color="#B22222">/* selection sort */</font>
-<a name="line358">358: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n-1;i++) {
-<a name="line359">359: </a>    re = wr[i];
-<a name="line360">360: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line361">361: </a>    im = wi[i];
-<a name="line362">362: </a><font color="#A020F0">#endif</font>
-<a name="line363">363: </a>    pos = 0;
-<a name="line364">364: </a>    j = i+1; <font color="#B22222">/* j points to the next eigenvalue */</font>
-<a name="line365">365: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line366">366: </a>    <font color="#4169E1">if</font> (im != 0) j=i+2;
+<a name="line93"> 93: </a>  PetscBLASInt   n,ld,mout,info,*select,mm,inc = 1;
+<a name="line94"> 94: </a>  PetscScalar    *X,*Y,*Z,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],tmp,fone=1.0,fzero=0.0;
+<a name="line95"> 95: </a>  PetscReal      norm;
+<a name="line96"> 96: </a>  PetscBool      iscomplex = PETSC_FALSE;
+<a name="line97"> 97: </a>  const char     *side;
+
+<a name="line100">100: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line101">101: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line102">102: </a>  <font color="#4169E1">if</font> (left) {
+<a name="line103">103: </a>    X = NULL;
+<a name="line104">104: </a>    Y = &ds->mat[DS_MAT_Y][ld*(*k)];
+<a name="line105">105: </a>    side = <font color="#666666">"L"</font>;
+<a name="line106">106: </a>  } <font color="#4169E1">else</font> {
+<a name="line107">107: </a>    X = &ds->mat[DS_MAT_X][ld*(*k)];
+<a name="line108">108: </a>    Y = NULL;
+<a name="line109">109: </a>    side = <font color="#666666">"R"</font>;
+<a name="line110">110: </a>  }
+<a name="line111">111: </a>  Z = left? Y: X;
+<a name="line112">112: </a>  DSAllocateWork_Private(ds,0,0,ld);
+<a name="line113">113: </a>  select = ds->iwork;
+<a name="line114">114: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) select[i] = (PetscBLASInt)PETSC_FALSE;
+<a name="line115">115: </a>  <font color="#4169E1">if</font> (ds->state <= DS_STATE_INTERMEDIATE) {
+<a name="line116">116: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Q);
+<a name="line117">117: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Z);
+<a name="line118">118: </a>  }
+<a name="line119">119: </a>  CleanDenseSchur(n,0,A,ld,B,ld,ds->mat[DS_MAT_Q],ld,ds->mat[DS_MAT_Z],ld,PETSC_TRUE);
+<a name="line120">120: </a>  <font color="#4169E1">if</font> (ds->state < DS_STATE_CONDENSED) {
+<a name="line121">121: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_CONDENSED);
+<a name="line122">122: </a>  }
+
+<a name="line124">124: </a>  <font color="#B22222">/* compute k-th eigenvector */</font>
+<a name="line125">125: </a>  select[*k] = (PetscBLASInt)PETSC_TRUE;
+<a name="line126">126: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line127">127: </a>  mm = 1;
+<a name="line128">128: </a>  DSAllocateWork_Private(ds,2*ld,2*ld,0);
+<a name="line129">129: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,<font color="#666666">"S"</font>,select,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&mm,&mout,ds->work,ds->rwork,&info));
+<a name="line130">130: </a><font color="#A020F0">#else</font>
+<a name="line131">131: </a>  <font color="#4169E1">if</font> ((*k)<n-1 && (A[ld*(*k)+(*k)+1] != 0.0 || B[ld*(*k)+(*k)+1] != 0.0)) iscomplex = PETSC_TRUE;
+<a name="line132">132: </a>  mm = iscomplex? 2: 1;
+<a name="line133">133: </a>  DSAllocateWork_Private(ds,6*ld,0,0);
+<a name="line134">134: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,<font color="#666666">"S"</font>,select,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&mm,&mout,ds->work,&info));
+<a name="line135">135: </a><font color="#A020F0">#endif</font>
+<a name="line136">136: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGEVC %i"</font>,info);
+<a name="line137">137: </a>  <font color="#4169E1">if</font> (!select[*k] || mout != mm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Wrong arguments in call to Lapack xTGEVC"</font>);
+
+<a name="line139">139: </a>  <font color="#B22222">/* accumulate and normalize eigenvectors */</font>
+<a name="line140">140: </a>  PetscMemcpy(ds->work,Z,mm*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line141">141: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&mm,&n,&fone,ds->mat[left?DS_MAT_Z:DS_MAT_Q],&ld,ds->work,&ld,&fzero,Z,&ld));
+<a name="line142">142: </a>  norm = BLASnrm2_(&n,Z,&inc);
+<a name="line143">143: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line144">144: </a>  <font color="#4169E1">if</font> (iscomplex) {
+<a name="line145">145: </a>    tmp = BLASnrm2_(&n,Z+ld,&inc);
+<a name="line146">146: </a>    norm = SlepcAbsEigenvalue(norm,tmp);
+<a name="line147">147: </a>  }
+<a name="line148">148: </a><font color="#A020F0">#endif</font>
+<a name="line149">149: </a>  tmp = 1.0 / norm;
+<a name="line150">150: </a>  PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z,&inc));
+<a name="line151">151: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line152">152: </a>  <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+ld,&inc));
+<a name="line153">153: </a><font color="#A020F0">#endif</font>
+
+<a name="line155">155: </a>  <font color="#B22222">/* set output arguments */</font>
+<a name="line156">156: </a>  <font color="#4169E1">if</font> (iscomplex) (*k)++;
+<a name="line157">157: </a>  <font color="#4169E1">if</font> (rnorm) {
+<a name="line158">158: </a>    <font color="#4169E1">if</font> (iscomplex) *rnorm = SlepcAbsEigenvalue(Z[n-1],Z[n-1+ld]);
+<a name="line159">159: </a>    <font color="#4169E1">else</font> *rnorm = PetscAbsScalar(Z[n-1]);
+<a name="line160">160: </a>  }
+<a name="line161">161: </a>  <font color="#4169E1">return</font>(0);
+<a name="line162">162: </a><font color="#A020F0">#endif</font>
+<a name="line163">163: </a>}
+
+<a name="line167">167: </a><strong><font color="#4169E1"><a name="DSVectors_GNHEP_Eigen_All"></a>static PetscErrorCode DSVectors_GNHEP_Eigen_All(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool left)</font></strong>
+<a name="line168">168: </a>{
+<a name="line169">169: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TGEVC)</font>
+<a name="line171">171: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGEVC - Lapack routine is unavailable"</font>);
+<a name="line172">172: </a><font color="#A020F0">#else</font>
+<a name="line174">174: </a>  PetscInt       i;
+<a name="line175">175: </a>  PetscBLASInt   n,ld,mout,info,inc = 1;
+<a name="line176">176: </a>  PetscBool      iscomplex = PETSC_FALSE;
+<a name="line177">177: </a>  PetscScalar    *X,*Y,*Z,*A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],tmp;
+<a name="line178">178: </a>  PetscReal      norm;
+<a name="line179">179: </a>  const char     *side,*back;
+
+<a name="line182">182: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line183">183: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line184">184: </a>  <font color="#4169E1">if</font> (left) {
+<a name="line185">185: </a>    X = NULL;
+<a name="line186">186: </a>    Y = ds->mat[DS_MAT_Y];
+<a name="line187">187: </a>    side = <font color="#666666">"L"</font>;
+<a name="line188">188: </a>  } <font color="#4169E1">else</font> {
+<a name="line189">189: </a>    X = ds->mat[DS_MAT_X];
+<a name="line190">190: </a>    Y = NULL;
+<a name="line191">191: </a>    side = <font color="#666666">"R"</font>;
+<a name="line192">192: </a>  }
+<a name="line193">193: </a>  Z = left? Y: X;
+<a name="line194">194: </a>  <font color="#4169E1">if</font> (ds->state <= DS_STATE_INTERMEDIATE) {
+<a name="line195">195: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Q);
+<a name="line196">196: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(ds,DS_MAT_Z);
+<a name="line197">197: </a>  }
+<a name="line198">198: </a>  CleanDenseSchur(n,0,A,ld,B,ld,ds->mat[DS_MAT_Q],ld,ds->mat[DS_MAT_Z],ld,PETSC_TRUE);
+<a name="line199">199: </a>  <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
+<a name="line200">200: </a>    <font color="#B22222">/* <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>() has been called, backtransform with matrix Q */</font>
+<a name="line201">201: </a>    back = <font color="#666666">"B"</font>;
+<a name="line202">202: </a>    PetscMemcpy(left?Y:X,ds->mat[left?DS_MAT_Z:DS_MAT_Q],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line203">203: </a>  } <font color="#4169E1">else</font> {
+<a name="line204">204: </a>    back = <font color="#666666">"A"</font>;
+<a name="line205">205: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_CONDENSED);
+<a name="line206">206: </a>  }
+<a name="line207">207: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line208">208: </a>  DSAllocateWork_Private(ds,2*ld,2*ld,0);
+<a name="line209">209: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,back,NULL,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,ds->rwork,&info));
+<a name="line210">210: </a><font color="#A020F0">#else</font>
+<a name="line211">211: </a>  DSAllocateWork_Private(ds,6*ld,0,0);
+<a name="line212">212: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgevc"</font>,LAPACKtgevc_(side,back,NULL,&n,A,&ld,B,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,&info));
+<a name="line213">213: </a><font color="#A020F0">#endif</font>
+<a name="line214">214: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGEVC %i"</font>,info);
+
+<a name="line216">216: </a>  <font color="#B22222">/* normalize eigenvectors */</font>
+<a name="line217">217: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line218">218: </a>    <font color="#4169E1">if</font> (i<n-1 && (A[i+1+i*ld]!=0.0 || B[i+1+i*ld]!=0.0)) iscomplex = PETSC_TRUE;
+<a name="line219">219: </a>    norm = BLASnrm2_(&n,Z+i*ld,&inc);
+<a name="line220">220: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line221">221: </a>    <font color="#4169E1">if</font> (iscomplex) {
+<a name="line222">222: </a>      tmp = BLASnrm2_(&n,Z+(i+1)*ld,&inc);
+<a name="line223">223: </a>      norm = SlepcAbsEigenvalue(norm,tmp);
+<a name="line224">224: </a>    }
+<a name="line225">225: </a><font color="#A020F0">#endif</font>
+<a name="line226">226: </a>    tmp = 1.0 / norm;
+<a name="line227">227: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+i*ld,&inc));
+<a name="line228">228: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line229">229: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+(i+1)*ld,&inc));
+<a name="line230">230: </a><font color="#A020F0">#endif</font>
+<a name="line231">231: </a>    <font color="#4169E1">if</font> (iscomplex) i++;
+<a name="line232">232: </a>  }
+<a name="line233">233: </a>  <font color="#4169E1">return</font>(0);
+<a name="line234">234: </a><font color="#A020F0">#endif</font>
+<a name="line235">235: </a>}
+
+<a name="line239">239: </a><strong><font color="#4169E1"><a name="DSVectors_GNHEP"></a>PetscErrorCode DSVectors_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *k,PetscReal *rnorm)</font></strong>
+<a name="line240">240: </a>{
+
+<a name="line244">244: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line245">245: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line246">246: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line247">247: </a>      <font color="#4169E1">if</font> (k) {
+<a name="line248">248: </a>        DSVectors_GNHEP_Eigen_Some(ds,k,rnorm,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);
+<a name="line249">249: </a>      } <font color="#4169E1">else</font> {
+<a name="line250">250: </a>        DSVectors_GNHEP_Eigen_All(ds,mat == DS_MAT_Y?PETSC_TRUE:PETSC_FALSE);
+<a name="line251">251: </a>      }
+<a name="line252">252: </a>      <font color="#4169E1">break</font>;
+<a name="line253">253: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line254">254: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line255">255: </a>  }
+<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
+<a name="line257">257: </a>}
+
+<a name="line261">261: </a><strong><font color="#4169E1"><a name="DSNormalize_GNHEP"></a>PetscErrorCode DSNormalize_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
+<a name="line262">262: </a>{
+<a name="line264">264: </a>  PetscInt       i,i0,i1;
+<a name="line265">265: </a>  PetscBLASInt   ld,n,one = 1;
+<a name="line266">266: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],norm,*x;
+<a name="line267">267: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line268">268: </a>  PetscScalar    norm0;
+<a name="line269">269: </a><font color="#A020F0">#endif</font>
+
+<a name="line272">272: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line273">273: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line274">274: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line275">275: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
+<a name="line276">276: </a>    <font color="#4169E1">case</font> DS_MAT_Z:
+<a name="line277">277: </a>      <font color="#B22222">/* Supported matrices */</font>
+<a name="line278">278: </a>      <font color="#4169E1">break</font>;
+<a name="line279">279: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line280">280: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line281">281: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line282">282: </a>      <font color="#4169E1">break</font>;
+<a name="line283">283: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line284">284: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line285">285: </a>  }
+
+<a name="line287">287: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line288">288: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line289">289: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (col < 0) {
+<a name="line291">291: </a>    i0 = 0; i1 = ds->n;
+<a name="line292">292: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (col>0 && (A[ds->ld*(col-1)+col] != 0.0 || (B && B[ds->ld*(col-1)+col] != 0.0))) {
+<a name="line293">293: </a>    i0 = col-1; i1 = col+1;
+<a name="line294">294: </a>  } <font color="#4169E1">else</font> {
+<a name="line295">295: </a>    i0 = col; i1 = col+1;
+<a name="line296">296: </a>  }
+<a name="line297">297: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
+<a name="line298">298: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line299">299: </a>    <font color="#4169E1">if</font> (i<n-1 && (A[ds->ld*i+i+1] != 0.0 || (B && B[ds->ld*i+i+1] != 0.0))) {
+<a name="line300">300: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
+<a name="line301">301: </a>      norm0 = BLASnrm2_(&n,&x[ld*(i+1)],&one);
+<a name="line302">302: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
+<a name="line303">303: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
+<a name="line304">304: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*(i+1)],&one));
+<a name="line305">305: </a>      i++;
+<a name="line306">306: </a>    } <font color="#4169E1">else</font>
+<a name="line307">307: </a><font color="#A020F0">#endif</font>
+<a name="line308">308: </a>    {
+<a name="line309">309: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
+<a name="line310">310: </a>      norm = 1.0/norm;
+<a name="line311">311: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
+<a name="line312">312: </a>    }
+<a name="line313">313: </a>  }
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
+
+<a name="line319">319: </a><strong><font color="#4169E1"><a name="DSSort_GNHEP_Arbitrary"></a>static PetscErrorCode DSSort_GNHEP_Arbitrary(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line320">320: </a>{
+<a name="line321">321: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_TGSEN)</font>
+<a name="line323">323: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGSEN - Lapack routine is unavailable"</font>);
+<a name="line324">324: </a><font color="#A020F0">#else</font>
+<a name="line326">326: </a>  PetscInt       i;
+<a name="line327">327: </a>  PetscBLASInt   info,n,ld,mout,lwork,liwork,*iwork,*selection,zero_=0,true_=1;
+<a name="line328">328: </a>  PetscScalar    *S = ds->mat[DS_MAT_A],*T = ds->mat[DS_MAT_B],*Q = ds->mat[DS_MAT_Q],*Z = ds->mat[DS_MAT_Z],*work,*beta;
+
+<a name="line331">331: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
+<a name="line332">332: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line333">333: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line334">334: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line335">335: </a>  lwork = 4*n+16;
+<a name="line336">336: </a><font color="#A020F0">#else</font>
+<a name="line337">337: </a>  lwork = 1;
+<a name="line338">338: </a><font color="#A020F0">#endif</font>
+<a name="line339">339: </a>  liwork = 1;
+<a name="line340">340: </a>  DSAllocateWork_Private(ds,lwork+2*n,0,liwork+n);
+<a name="line341">341: </a>  beta      = ds->work;
+<a name="line342">342: </a>  work      = ds->work + n;
+<a name="line343">343: </a>  lwork     = ds->lwork - n;
+<a name="line344">344: </a>  selection = ds->iwork;
+<a name="line345">345: </a>  iwork     = ds->iwork + n;
+<a name="line346">346: </a>  liwork    = ds->liwork - n;
+<a name="line347">347: </a>  <font color="#B22222">/* Compute the selected eigenvalue to be in the leading position */</font>
+<a name="line348">348: </a>  DSSortEigenvalues_Private(ds,rr,ri,ds->perm,PETSC_FALSE);
+<a name="line349">349: </a>  PetscMemzero(selection,n*<font color="#4169E1">sizeof</font>(PetscBLASInt));
+<a name="line350">350: </a>  <font color="#4169E1">for</font> (i=0; i<*k; i++) selection[ds->perm[i]] = 1;
+<a name="line351">351: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line352">352: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgsen"</font>,LAPACKtgsen_(&zero_,&true_,&true_,selection,&n,S,&ld,T,&ld,wr,wi,beta,Z,&ld,Q,&ld,&mout,NULL,NULL,NULL,work,&lwork,iwork,&liwork,&info));
+<a name="line353">353: </a><font color="#A020F0">#else</font>
+<a name="line354">354: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgsen"</font>,LAPACKtgsen_(&zero_,&true_,&true_,selection,&n,S,&ld,T,&ld,wr,beta,Z,&ld,Q,&ld,&mout,NULL,NULL,NULL,work,&lwork,iwork,&liwork,&info));
+<a name="line355">355: </a><font color="#A020F0">#endif</font>
+<a name="line356">356: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGSEN %d"</font>,info);
+<a name="line357">357: </a>  *k = mout;
+<a name="line358">358: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line359">359: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wr[i] = (PetscRealPart(wr[i])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line360">360: </a>    <font color="#4169E1">else</font> wr[i] /= beta[i];
+<a name="line361">361: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line362">362: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wi[i] = (wi[i]>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line363">363: </a>    <font color="#4169E1">else</font> wi[i] /= beta[i];
+<a name="line364">364: </a><font color="#A020F0">#endif</font>
+<a name="line365">365: </a>  }
+<a name="line366">366: </a>  <font color="#4169E1">return</font>(0);
 <a name="line367">367: </a><font color="#A020F0">#endif</font>
-<a name="line368">368: </a>    <font color="#B22222">/* find minimum eigenvalue */</font>
-<a name="line369">369: </a>    <font color="#4169E1">for</font> (;j<n;j++) {
-<a name="line370">370: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line371">371: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[j],wi[j],&result);
-<a name="line372">372: </a><font color="#A020F0">#else</font>
-<a name="line373">373: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,wr[j],0.0,&result);
-<a name="line374">374: </a><font color="#A020F0">#endif</font>
-<a name="line375">375: </a>      <font color="#4169E1">if</font> (result > 0) {
-<a name="line376">376: </a>        re = wr[j];
-<a name="line377">377: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line378">378: </a>        im = wi[j];
-<a name="line379">379: </a><font color="#A020F0">#endif</font>
-<a name="line380">380: </a>        pos = j;
-<a name="line381">381: </a>      }
-<a name="line382">382: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line383">383: </a>      <font color="#4169E1">if</font> (wi[j] != 0) j++;
-<a name="line384">384: </a><font color="#A020F0">#endif</font>
-<a name="line385">385: </a>    }
-<a name="line386">386: </a>    <font color="#4169E1">if</font> (pos) {
-<a name="line387">387: </a>      <font color="#B22222">/* interchange blocks */</font>
-<a name="line388">388: </a>      PetscBLASIntCast(pos+1,&ifst);
-<a name="line389">389: </a>      PetscBLASIntCast(i+1,&ilst);
-<a name="line390">390: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line391">391: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtgexc"</font>,LAPACKtgexc_(&one,&one,&n,S,&ld,T,&ld,Z,&ld,Q,&ld,&ifst,&ilst,work,&lwork,&info));
-<a name="line392">392: </a><font color="#A020F0">#else</font>
-<a name="line393">393: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtgexc"</font>,LAPACKtgexc_(&one,&one,&n,S,&ld,T,&ld,Z,&ld,Q,&ld,&ifst,&ilst,&info));
-<a name="line394">394: </a><font color="#A020F0">#endif</font>
-<a name="line395">395: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGEXC %i"</font>,info);
-<a name="line396">396: </a>      <font color="#B22222">/* recover original eigenvalues from T and S matrices */</font>
-<a name="line397">397: </a>      <font color="#4169E1">for</font> (j=i;j<n;j++) {
-<a name="line398">398: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line399">399: </a>        <font color="#4169E1">if</font> (j<n-1 && S[j*ld+j+1] != 0.0) {
-<a name="line400">400: </a>          <font color="#B22222">/* complex conjugate eigenvalue */</font>
-<a name="line401">401: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(S+j*ld+j,&ld,T+j*ld+j,&ld,&safmin,&scale1,&scale2,&re,&a,&im));
-<a name="line402">402: </a>          wr[j] = re / scale1;
-<a name="line403">403: </a>          wi[j] = im / scale1;
-<a name="line404">404: </a>          wr[j+1] = a / scale2;
-<a name="line405">405: </a>          wi[j+1] = -wi[j];
-<a name="line406">406: </a>          j++;
-<a name="line407">407: </a>        } <font color="#4169E1">else</font>
-<a name="line408">408: </a><font color="#A020F0">#endif</font>
-<a name="line409">409: </a>        {
-<a name="line410">410: </a>          <font color="#4169E1">if</font> (T[j*ld+j] == 0.0) wr[j] = (PetscRealPart(S[j*ld+j])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line411">411: </a>          <font color="#4169E1">else</font> wr[j] = S[j*ld+j] / T[j*ld+j];
-<a name="line412">412: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line413">413: </a>          wi[j] = 0.0;
-<a name="line414">414: </a><font color="#A020F0">#endif</font>
-<a name="line415">415: </a>        }
-<a name="line416">416: </a>      }
-<a name="line417">417: </a>    }
-<a name="line418">418: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line419">419: </a>    <font color="#4169E1">if</font> (wi[i] != 0.0) i++;
-<a name="line420">420: </a><font color="#A020F0">#endif</font>
-<a name="line421">421: </a>  }
-<a name="line422">422: </a>  <font color="#4169E1">return</font>(0);
-<a name="line423">423: </a><font color="#A020F0">#endif</font>
-<a name="line424">424: </a>}
-
-<a name="line428">428: </a><strong><font color="#4169E1"><a name="DSSort_GNHEP"></a>PetscErrorCode DSSort_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
-<a name="line429">429: </a>{
-
-<a name="line433">433: </a>  <font color="#4169E1">if</font> (!rr || wr == rr) {
-<a name="line434">434: </a>    DSSort_GNHEP_Total(ds,wr,wi);
-<a name="line435">435: </a>  } <font color="#4169E1">else</font> {
-<a name="line436">436: </a>    DSSort_GNHEP_Arbitrary(ds,wr,wi,rr,ri,k);
-<a name="line437">437: </a>  }
-<a name="line438">438: </a>  <font color="#4169E1">return</font>(0);
-<a name="line439">439: </a>}
-
-<a name="line443">443: </a><font color="#B22222">/*</font>
-<a name="line444">444: </a><font color="#B22222">   Write zeros from the column k to n in the lower triangular part of the</font>
-<a name="line445">445: </a><font color="#B22222">   matrices S and T, and inside 2-by-2 diagonal blocks of T in order to</font>
-<a name="line446">446: </a><font color="#B22222">   make (S,T) a valid Schur decompositon.</font>
-<a name="line447">447: </a><font color="#B22222">*/</font>
-<a name="line448">448: </a><strong><font color="#4169E1"><a name="CleanDenseSchur"></a>static PetscErrorCode CleanDenseSchur(PetscInt n,PetscInt k,PetscScalar *S,PetscInt ldS,PetscScalar *T,PetscInt ldT,PetscScalar *X,PetscInt ldX,PetscScalar *Y,PetscInt ldY,PetscBool doProd)</font></strong>
-<a name="line449">449: </a>{
-<a name="line450">450: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LASV2)</font>
-<a name="line452">452: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LASV2 - Lapack routine is unavailable"</font>);
-<a name="line453">453: </a><font color="#A020F0">#else</font>
-<a name="line454">454: </a>  PetscInt       i,j;
-<a name="line455">455: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line456">456: </a>  PetscScalar    s;
-<a name="line457">457: </a><font color="#A020F0">#else</font>
-<a name="line459">459: </a>  PetscBLASInt   ldS_,ldT_,n_i,n_i_2,one=1,n_,i_2,i_;
-<a name="line460">460: </a>  PetscScalar    b11,b22,sr,cr,sl,cl;
-<a name="line461">461: </a><font color="#A020F0">#endif</font>
-
-<a name="line464">464: </a>  <font color="#4169E1">if</font> (!doProd && X) {
-<a name="line465">465: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) <font color="#4169E1">for</font> (j=0;j<n;j++) X[ldX*i+j] = 0.0;
-<a name="line466">466: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) X[ldX*i+i] = 1.0;
-<a name="line467">467: </a>  }
-<a name="line468">468: </a>  <font color="#4169E1">if</font> (!doProd && Y) {
-<a name="line469">469: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) <font color="#4169E1">for</font> (j=0;j<n;j++) Y[ldY*i+j] = 0.0;
-<a name="line470">470: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) Y[ldX*i+i] = 1.0;
-<a name="line471">471: </a>  }
-
-<a name="line473">473: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line474">474: </a>  <font color="#4169E1">for</font> (i=k; i<n; i++) {
-<a name="line475">475: </a>    <font color="#B22222">/* Some functions need the diagonal elements in T be real */</font>
-<a name="line476">476: </a>    <font color="#4169E1">if</font> (T && PetscImaginaryPart(T[ldT*i+i]) != 0.0) {
-<a name="line477">477: </a>      s = PetscConj(T[ldT*i+i])/PetscAbsScalar(T[ldT*i+i]);
-<a name="line478">478: </a>      <font color="#4169E1">for</font> (j=0;j<=i;j++) {
-<a name="line479">479: </a>        T[ldT*i+j] *= s;
-<a name="line480">480: </a>        S[ldS*i+j] *= s;
-<a name="line481">481: </a>      }
-<a name="line482">482: </a>      T[ldT*i+i] = PetscRealPart(T[ldT*i+i]);
-<a name="line483">483: </a>      <font color="#4169E1">if</font> (X) <font color="#4169E1">for</font> (j=0;j<n;j++) X[ldX*i+j] *= s;
-<a name="line484">484: </a>    }
-<a name="line485">485: </a>    j = i+1;
-<a name="line486">486: </a>    <font color="#4169E1">if</font> (j<n) {
-<a name="line487">487: </a>      S[ldS*i+j] = 0.0;
-<a name="line488">488: </a>      <font color="#4169E1">if</font> (T) T[ldT*i+j] = 0.0;
-<a name="line489">489: </a>    }
-<a name="line490">490: </a>  }
-<a name="line491">491: </a><font color="#A020F0">#else</font>
-<a name="line492">492: </a>  PetscBLASIntCast(ldS,&ldS_);
-<a name="line493">493: </a>  PetscBLASIntCast(ldT,&ldT_);
-<a name="line494">494: </a>  PetscBLASIntCast(n,&n_);
-<a name="line495">495: </a>  <font color="#4169E1">for</font> (i=k;i<n-1;i++) {
-<a name="line496">496: </a>    <font color="#4169E1">if</font> (S[ldS*i+i+1] != 0.0) {
-<a name="line497">497: </a>      <font color="#B22222">/* Check if T(i+1,i) and T(i,i+1) are zero */</font>
-<a name="line498">498: </a>      <font color="#4169E1">if</font> (T[ldT*(i+1)+i] != 0.0 || T[ldT*i+i+1] != 0.0) {
-<a name="line499">499: </a>        <font color="#B22222">/* Check if T(i+1,i) and T(i,i+1) are negligible */</font>
-<a name="line500">500: </a>        <font color="#4169E1">if</font> (PetscAbs(T[ldT*(i+1)+i])+PetscAbs(T[ldT*i+i+1]) < (PetscAbs(T[ldT*i+i])+PetscAbs(T[ldT*(i+1)+i+1]))*PETSC_MACHINE_EPSILON) {
-<a name="line501">501: </a>          T[ldT*i+i+1] = 0.0;
-<a name="line502">502: </a>          T[ldT*(i+1)+i] = 0.0;
-
-<a name="line504">504: </a>        } <font color="#4169E1">else</font> {
-<a name="line505">505: </a>          <font color="#B22222">/* If one of T(i+1,i) or T(i,i+1) is negligible, we make zero the other element */</font>
-<a name="line506">506: </a>          <font color="#4169E1">if</font> (PetscAbs(T[ldT*i+i+1]) < (PetscAbs(T[ldT*i+i])+PetscAbs(T[ldT*(i+1)+i+1])+PetscAbs(T[ldT*(i+1)+i]))*PETSC_MACHINE_EPSILON) {
-<a name="line507">507: </a>            PetscStackCallBLAS(<font color="#666666">"LAPACKlasv2"</font>,LAPACKlasv2_(&T[ldT*i+i],&T[ldT*(i+1)+i],&T[ldT*(i+1)+i+1],&b22,&b11,&sl,&cl,&sr,&cr));
-<a name="line508">508: </a>          } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (PetscAbs(T[ldT*(i+1)+i]) < (PetscAbs(T[ldT*i+i])+PetscAbs(T[ldT*(i+1)+i+1])+PetscAbs(T[ldT*i+i+1]))*PETSC_MACHINE_EPSILON) {
-<a name="line509">509: </a>            PetscStackCallBLAS(<font color="#666666">"LAPACKlasv2"</font>,LAPACKlasv2_(&T[ldT*i+i],&T[ldT*i+i+1],&T[ldT*(i+1)+i+1],&b22,&b11,&sr,&cr,&sl,&cl));
-<a name="line510">510: </a>          } <font color="#4169E1">else</font> {
-<a name="line511">511: </a>            SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Unsupported format. Call <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a> before this function"</font>);
-<a name="line512">512: </a>          }
-<a name="line513">513: </a>          PetscBLASIntCast(n-i,&n_i);
-<a name="line514">514: </a>          n_i_2 = n_i - 2;
-<a name="line515">515: </a>          PetscBLASIntCast(i+2,&i_2);
-<a name="line516">516: </a>          PetscBLASIntCast(i,&i_);
-<a name="line517">517: </a>          <font color="#4169E1">if</font> (b11 < 0.0) {
-<a name="line518">518: </a>            cr  = -cr;
-<a name="line519">519: </a>            sr  = -sr;
-<a name="line520">520: </a>            b11 = -b11;
-<a name="line521">521: </a>            b22 = -b22;
-<a name="line522">522: </a>          }
-<a name="line523">523: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_i,&S[ldS*i+i],&ldS_,&S[ldS*i+i+1],&ldS_,&cl,&sl));
-<a name="line524">524: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&i_2,&S[ldS*i],&one,&S[ldS*(i+1)],&one,&cr,&sr));
-<a name="line525">525: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_i_2,&T[ldT*(i+2)+i],&ldT_,&T[ldT*(i+2)+i+1],&ldT_,&cl,&sl));
-<a name="line526">526: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&i_,&T[ldT*i],&one,&T[ldT*(i+1)],&one,&cr,&sr));
-<a name="line527">527: </a>          <font color="#4169E1">if</font> (X) PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_,&X[ldX*i],&one,&X[ldX*(i+1)],&one,&cr,&sr));
-<a name="line528">528: </a>          <font color="#4169E1">if</font> (Y) PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_,&Y[ldY*i],&one,&Y[ldY*(i+1)],&one,&cl,&sl));
-<a name="line529">529: </a>          T[ldT*i+i] = b11;
-<a name="line530">530: </a>          T[ldT*i+i+1] = 0.0;
-<a name="line531">531: </a>          T[ldT*(i+1)+i] = 0.0;
-<a name="line532">532: </a>          T[ldT*(i+1)+i+1] = b22;
-<a name="line533">533: </a>        }
-<a name="line534">534: </a>      }
-<a name="line535">535: </a>    i++;
-<a name="line536">536: </a>    }
-<a name="line537">537: </a>  }
-<a name="line538">538: </a><font color="#A020F0">#endif</font>
-<a name="line539">539: </a>  <font color="#4169E1">return</font>(0);
-<a name="line540">540: </a><font color="#A020F0">#endif</font>
-<a name="line541">541: </a>}
-
-<a name="line545">545: </a><strong><font color="#4169E1"><a name="DSSolve_GNHEP"></a>PetscErrorCode DSSolve_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line546">546: </a>{
-<a name="line547">547: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GGES)</font>
-<a name="line549">549: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GGES - Lapack routines are unavailable"</font>);
-<a name="line550">550: </a><font color="#A020F0">#else</font>
-<a name="line552">552: </a>  PetscScalar    *work,*beta,a;
-<a name="line553">553: </a>  PetscInt       i;
-<a name="line554">554: </a>  PetscBLASInt   lwork,info,n,ld,iaux;
-<a name="line555">555: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],*Z = ds->mat[DS_MAT_Z],*Q = ds->mat[DS_MAT_Q];
-
-<a name="line558">558: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line560">560: </a><font color="#A020F0">#endif</font>
-<a name="line561">561: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line562">562: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line563">563: </a>  lwork = -1;
-<a name="line564">564: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line565">565: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,wi,NULL,Z,&ld,Q,&ld,&a,&lwork,NULL,&info));
-<a name="line566">566: </a>  PetscBLASIntCast((PetscInt)a,&lwork);
-<a name="line567">567: </a>  DSAllocateWork_Private(ds,lwork+ld,0,0);
-<a name="line568">568: </a>  beta = ds->work;
-<a name="line569">569: </a>  work = beta+ds->n;
-<a name="line570">570: </a>  PetscBLASIntCast(ds->lwork-ds->n,&lwork);
-<a name="line571">571: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,wi,beta,Z,&ld,Q,&ld,work,&lwork,NULL,&info));
-<a name="line572">572: </a><font color="#A020F0">#else</font>
-<a name="line573">573: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,NULL,Z,&ld,Q,&ld,&a,&lwork,NULL,NULL,&info));
-<a name="line574">574: </a>  PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);
-<a name="line575">575: </a>  DSAllocateWork_Private(ds,lwork+ld,8*ld,0);
-<a name="line576">576: </a>  beta = ds->work;
-<a name="line577">577: </a>  work = beta+ds->n;
-<a name="line578">578: </a>  PetscBLASIntCast(ds->lwork-ds->n,&lwork);
-<a name="line579">579: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,beta,Z,&ld,Q,&ld,work,&lwork,ds->rwork,NULL,&info));
-<a name="line580">580: </a><font color="#A020F0">#endif</font>
-<a name="line581">581: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGGES %i"</font>,info);
-<a name="line582">582: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line583">583: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wr[i] = (PetscRealPart(wr[i])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line584">584: </a>    <font color="#4169E1">else</font> wr[i] /= beta[i];
-<a name="line585">585: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line586">586: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wi[i] = (wi[i]>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line587">587: </a>    <font color="#4169E1">else</font> wi[i] /= beta[i];
-<a name="line588">588: </a><font color="#A020F0">#else</font>
-<a name="line589">589: </a>    <font color="#4169E1">if</font> (wi) wi[i] = 0.0;
-<a name="line590">590: </a><font color="#A020F0">#endif</font>
-<a name="line591">591: </a>  }
-<a name="line592">592: </a>  <font color="#4169E1">return</font>(0);
-<a name="line593">593: </a><font color="#A020F0">#endif</font>
-<a name="line594">594: </a>}
-
-<a name="line598">598: </a><strong><font color="#4169E1"><a name="DSCreate_GNHEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line599">599: </a>{
-<a name="line601">601: </a>  ds->ops->allocate      = DSAllocate_GNHEP;
-<a name="line602">602: </a>  ds->ops->view          = DSView_GNHEP;
-<a name="line603">603: </a>  ds->ops->vectors       = DSVectors_GNHEP;
-<a name="line604">604: </a>  ds->ops->solve[0]      = DSSolve_GNHEP;
-<a name="line605">605: </a>  ds->ops->sort          = DSSort_GNHEP;
-<a name="line606">606: </a>  ds->ops->normalize     = DSNormalize_GNHEP;
-<a name="line607">607: </a>  <font color="#4169E1">return</font>(0);
-<a name="line608">608: </a>}
+<a name="line368">368: </a>}
+
+<a name="line372">372: </a><strong><font color="#4169E1"><a name="DSSort_GNHEP_Total"></a>static PetscErrorCode DSSort_GNHEP_Total(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line373">373: </a>{
+<a name="line374">374: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TGEXC) || !defined(PETSC_USE_COMPLEX) && (defined(SLEPC_MISSING_LAPACK_LAMCH) || defined(SLEPC_MISSING_LAPACK_LAG2))</font>
+<a name="line376">376: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TGEXC/LAMCH/LAG2 - Lapack routines are unavailable"</font>);
+<a name="line377">377: </a><font color="#A020F0">#else</font>
+<a name="line379">379: </a>  PetscScalar    re;
+<a name="line380">380: </a>  PetscInt       i,j,pos,result;
+<a name="line381">381: </a>  PetscBLASInt   ifst,ilst,info,n,ld,one=1;
+<a name="line382">382: </a>  PetscScalar    *S = ds->mat[DS_MAT_A],*T = ds->mat[DS_MAT_B],*Z = ds->mat[DS_MAT_Z],*Q = ds->mat[DS_MAT_Q];
+<a name="line383">383: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line384">384: </a>  PetscBLASInt   lwork;
+<a name="line385">385: </a>  PetscScalar    *work,a,safmin,scale1,scale2,im;
+<a name="line386">386: </a><font color="#A020F0">#endif</font>
+
+<a name="line389">389: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
+<a name="line390">390: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line391">391: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line392">392: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line393">393: </a>  lwork = -1;
+<a name="line394">394: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtgexc"</font>,LAPACKtgexc_(&one,&one,&ld,NULL,&ld,NULL,&ld,NULL,&ld,NULL,&ld,&one,&one,&a,&lwork,&info));
+<a name="line395">395: </a>  safmin = LAPACKlamch_(<font color="#666666">"S"</font>);
+<a name="line396">396: </a>  PetscBLASIntCast((PetscInt)a,&lwork);
+<a name="line397">397: </a>  DSAllocateWork_Private(ds,lwork,0,0);
+<a name="line398">398: </a>  work = ds->work;
+<a name="line399">399: </a><font color="#A020F0">#endif</font>
+<a name="line400">400: </a>  <font color="#B22222">/* selection sort */</font>
+<a name="line401">401: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n-1;i++) {
+<a name="line402">402: </a>    re = wr[i];
+<a name="line403">403: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line404">404: </a>    im = wi[i];
+<a name="line405">405: </a><font color="#A020F0">#endif</font>
+<a name="line406">406: </a>    pos = 0;
+<a name="line407">407: </a>    j = i+1; <font color="#B22222">/* j points to the next eigenvalue */</font>
+<a name="line408">408: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line409">409: </a>    <font color="#4169E1">if</font> (im != 0) j=i+2;
+<a name="line410">410: </a><font color="#A020F0">#endif</font>
+<a name="line411">411: </a>    <font color="#B22222">/* find minimum eigenvalue */</font>
+<a name="line412">412: </a>    <font color="#4169E1">for</font> (;j<n;j++) {
+<a name="line413">413: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line414">414: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[j],wi[j],&result);
+<a name="line415">415: </a><font color="#A020F0">#else</font>
+<a name="line416">416: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,wr[j],0.0,&result);
+<a name="line417">417: </a><font color="#A020F0">#endif</font>
+<a name="line418">418: </a>      <font color="#4169E1">if</font> (result > 0) {
+<a name="line419">419: </a>        re = wr[j];
+<a name="line420">420: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line421">421: </a>        im = wi[j];
+<a name="line422">422: </a><font color="#A020F0">#endif</font>
+<a name="line423">423: </a>        pos = j;
+<a name="line424">424: </a>      }
+<a name="line425">425: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line426">426: </a>      <font color="#4169E1">if</font> (wi[j] != 0) j++;
+<a name="line427">427: </a><font color="#A020F0">#endif</font>
+<a name="line428">428: </a>    }
+<a name="line429">429: </a>    <font color="#4169E1">if</font> (pos) {
+<a name="line430">430: </a>      <font color="#B22222">/* interchange blocks */</font>
+<a name="line431">431: </a>      PetscBLASIntCast(pos+1,&ifst);
+<a name="line432">432: </a>      PetscBLASIntCast(i+1,&ilst);
+<a name="line433">433: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line434">434: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtgexc"</font>,LAPACKtgexc_(&one,&one,&n,S,&ld,T,&ld,Z,&ld,Q,&ld,&ifst,&ilst,work,&lwork,&info));
+<a name="line435">435: </a><font color="#A020F0">#else</font>
+<a name="line436">436: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtgexc"</font>,LAPACKtgexc_(&one,&one,&n,S,&ld,T,&ld,Z,&ld,Q,&ld,&ifst,&ilst,&info));
+<a name="line437">437: </a><font color="#A020F0">#endif</font>
+<a name="line438">438: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTGEXC %i"</font>,info);
+<a name="line439">439: </a>      <font color="#B22222">/* recover original eigenvalues from T and S matrices */</font>
+<a name="line440">440: </a>      <font color="#4169E1">for</font> (j=i;j<n;j++) {
+<a name="line441">441: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line442">442: </a>        <font color="#4169E1">if</font> (j<n-1 && S[j*ld+j+1] != 0.0) {
+<a name="line443">443: </a>          <font color="#B22222">/* complex conjugate eigenvalue */</font>
+<a name="line444">444: </a>          PetscStackCallBLAS(<font color="#666666">"LAPACKlag2"</font>,LAPACKlag2_(S+j*ld+j,&ld,T+j*ld+j,&ld,&safmin,&scale1,&scale2,&re,&a,&im));
+<a name="line445">445: </a>          wr[j] = re / scale1;
+<a name="line446">446: </a>          wi[j] = im / scale1;
+<a name="line447">447: </a>          wr[j+1] = a / scale2;
+<a name="line448">448: </a>          wi[j+1] = -wi[j];
+<a name="line449">449: </a>          j++;
+<a name="line450">450: </a>        } <font color="#4169E1">else</font>
+<a name="line451">451: </a><font color="#A020F0">#endif</font>
+<a name="line452">452: </a>        {
+<a name="line453">453: </a>          <font color="#4169E1">if</font> (T[j*ld+j] == 0.0) wr[j] = (PetscRealPart(S[j*ld+j])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line454">454: </a>          <font color="#4169E1">else</font> wr[j] = S[j*ld+j] / T[j*ld+j];
+<a name="line455">455: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line456">456: </a>          wi[j] = 0.0;
+<a name="line457">457: </a><font color="#A020F0">#endif</font>
+<a name="line458">458: </a>        }
+<a name="line459">459: </a>      }
+<a name="line460">460: </a>    }
+<a name="line461">461: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line462">462: </a>    <font color="#4169E1">if</font> (wi[i] != 0.0) i++;
+<a name="line463">463: </a><font color="#A020F0">#endif</font>
+<a name="line464">464: </a>  }
+<a name="line465">465: </a>  <font color="#4169E1">return</font>(0);
+<a name="line466">466: </a><font color="#A020F0">#endif</font>
+<a name="line467">467: </a>}
+
+<a name="line471">471: </a><strong><font color="#4169E1"><a name="DSSort_GNHEP"></a>PetscErrorCode DSSort_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line472">472: </a>{
+
+<a name="line476">476: </a>  <font color="#4169E1">if</font> (!rr || wr == rr) {
+<a name="line477">477: </a>    DSSort_GNHEP_Total(ds,wr,wi);
+<a name="line478">478: </a>  } <font color="#4169E1">else</font> {
+<a name="line479">479: </a>    DSSort_GNHEP_Arbitrary(ds,wr,wi,rr,ri,k);
+<a name="line480">480: </a>  }
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><font color="#B22222">/*</font>
+<a name="line487">487: </a><font color="#B22222">   Write zeros from the column k to n in the lower triangular part of the</font>
+<a name="line488">488: </a><font color="#B22222">   matrices S and T, and inside 2-by-2 diagonal blocks of T in order to</font>
+<a name="line489">489: </a><font color="#B22222">   make (S,T) a valid Schur decompositon.</font>
+<a name="line490">490: </a><font color="#B22222">*/</font>
+<a name="line491">491: </a><strong><font color="#4169E1"><a name="CleanDenseSchur"></a>static PetscErrorCode CleanDenseSchur(PetscInt n,PetscInt k,PetscScalar *S,PetscInt ldS,PetscScalar *T,PetscInt ldT,PetscScalar *X,PetscInt ldX,PetscScalar *Y,PetscInt ldY,PetscBool doProd)</font></strong>
+<a name="line492">492: </a>{
+<a name="line493">493: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LASV2)</font>
+<a name="line495">495: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LASV2 - Lapack routine is unavailable"</font>);
+<a name="line496">496: </a><font color="#A020F0">#else</font>
+<a name="line497">497: </a>  PetscInt       i,j;
+<a name="line498">498: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line499">499: </a>  PetscScalar    s;
+<a name="line500">500: </a><font color="#A020F0">#else</font>
+<a name="line502">502: </a>  PetscBLASInt   ldS_,ldT_,n_i,n_i_2,one=1,n_,i_2,i_;
+<a name="line503">503: </a>  PetscScalar    b11,b22,sr,cr,sl,cl;
+<a name="line504">504: </a><font color="#A020F0">#endif</font>
+
+<a name="line507">507: </a>  <font color="#4169E1">if</font> (!doProd && X) {
+<a name="line508">508: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) <font color="#4169E1">for</font> (j=0;j<n;j++) X[ldX*i+j] = 0.0;
+<a name="line509">509: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) X[ldX*i+i] = 1.0;
+<a name="line510">510: </a>  }
+<a name="line511">511: </a>  <font color="#4169E1">if</font> (!doProd && Y) {
+<a name="line512">512: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) <font color="#4169E1">for</font> (j=0;j<n;j++) Y[ldY*i+j] = 0.0;
+<a name="line513">513: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) Y[ldX*i+i] = 1.0;
+<a name="line514">514: </a>  }
+
+<a name="line516">516: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line517">517: </a>  <font color="#4169E1">for</font> (i=k; i<n; i++) {
+<a name="line518">518: </a>    <font color="#B22222">/* Some functions need the diagonal elements in T be real */</font>
+<a name="line519">519: </a>    <font color="#4169E1">if</font> (T && PetscImaginaryPart(T[ldT*i+i]) != 0.0) {
+<a name="line520">520: </a>      s = PetscConj(T[ldT*i+i])/PetscAbsScalar(T[ldT*i+i]);
+<a name="line521">521: </a>      <font color="#4169E1">for</font> (j=0;j<=i;j++) {
+<a name="line522">522: </a>        T[ldT*i+j] *= s;
+<a name="line523">523: </a>        S[ldS*i+j] *= s;
+<a name="line524">524: </a>      }
+<a name="line525">525: </a>      T[ldT*i+i] = PetscRealPart(T[ldT*i+i]);
+<a name="line526">526: </a>      <font color="#4169E1">if</font> (X) <font color="#4169E1">for</font> (j=0;j<n;j++) X[ldX*i+j] *= s;
+<a name="line527">527: </a>    }
+<a name="line528">528: </a>    j = i+1;
+<a name="line529">529: </a>    <font color="#4169E1">if</font> (j<n) {
+<a name="line530">530: </a>      S[ldS*i+j] = 0.0;
+<a name="line531">531: </a>      <font color="#4169E1">if</font> (T) T[ldT*i+j] = 0.0;
+<a name="line532">532: </a>    }
+<a name="line533">533: </a>  }
+<a name="line534">534: </a><font color="#A020F0">#else</font>
+<a name="line535">535: </a>  PetscBLASIntCast(ldS,&ldS_);
+<a name="line536">536: </a>  PetscBLASIntCast(ldT,&ldT_);
+<a name="line537">537: </a>  PetscBLASIntCast(n,&n_);
+<a name="line538">538: </a>  <font color="#4169E1">for</font> (i=k;i<n-1;i++) {
+<a name="line539">539: </a>    <font color="#4169E1">if</font> (S[ldS*i+i+1] != 0.0) {
+<a name="line540">540: </a>      <font color="#B22222">/* Check if T(i+1,i) and T(i,i+1) are zero */</font>
+<a name="line541">541: </a>      <font color="#4169E1">if</font> (T[ldT*(i+1)+i] != 0.0 || T[ldT*i+i+1] != 0.0) {
+<a name="line542">542: </a>        <font color="#B22222">/* Check if T(i+1,i) and T(i,i+1) are negligible */</font>
+<a name="line543">543: </a>        <font color="#4169E1">if</font> (PetscAbs(T[ldT*(i+1)+i])+PetscAbs(T[ldT*i+i+1]) < (PetscAbs(T[ldT*i+i])+PetscAbs(T[ldT*(i+1)+i+1]))*PETSC_MACHINE_EPSILON) {
+<a name="line544">544: </a>          T[ldT*i+i+1] = 0.0;
+<a name="line545">545: </a>          T[ldT*(i+1)+i] = 0.0;
+
+<a name="line547">547: </a>        } <font color="#4169E1">else</font> {
+<a name="line548">548: </a>          <font color="#B22222">/* If one of T(i+1,i) or T(i,i+1) is negligible, we make zero the other element */</font>
+<a name="line549">549: </a>          <font color="#4169E1">if</font> (PetscAbs(T[ldT*i+i+1]) < (PetscAbs(T[ldT*i+i])+PetscAbs(T[ldT*(i+1)+i+1])+PetscAbs(T[ldT*(i+1)+i]))*PETSC_MACHINE_EPSILON) {
+<a name="line550">550: </a>            PetscStackCallBLAS(<font color="#666666">"LAPACKlasv2"</font>,LAPACKlasv2_(&T[ldT*i+i],&T[ldT*(i+1)+i],&T[ldT*(i+1)+i+1],&b22,&b11,&sl,&cl,&sr,&cr));
+<a name="line551">551: </a>          } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (PetscAbs(T[ldT*(i+1)+i]) < (PetscAbs(T[ldT*i+i])+PetscAbs(T[ldT*(i+1)+i+1])+PetscAbs(T[ldT*i+i+1]))*PETSC_MACHINE_EPSILON) {
+<a name="line552">552: </a>            PetscStackCallBLAS(<font color="#666666">"LAPACKlasv2"</font>,LAPACKlasv2_(&T[ldT*i+i],&T[ldT*i+i+1],&T[ldT*(i+1)+i+1],&b22,&b11,&sr,&cr,&sl,&cl));
+<a name="line553">553: </a>          } <font color="#4169E1">else</font> {
+<a name="line554">554: </a>            SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Unsupported format. Call <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a> before this function"</font>);
+<a name="line555">555: </a>          }
+<a name="line556">556: </a>          PetscBLASIntCast(n-i,&n_i);
+<a name="line557">557: </a>          n_i_2 = n_i - 2;
+<a name="line558">558: </a>          PetscBLASIntCast(i+2,&i_2);
+<a name="line559">559: </a>          PetscBLASIntCast(i,&i_);
+<a name="line560">560: </a>          <font color="#4169E1">if</font> (b11 < 0.0) {
+<a name="line561">561: </a>            cr  = -cr;
+<a name="line562">562: </a>            sr  = -sr;
+<a name="line563">563: </a>            b11 = -b11;
+<a name="line564">564: </a>            b22 = -b22;
+<a name="line565">565: </a>          }
+<a name="line566">566: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_i,&S[ldS*i+i],&ldS_,&S[ldS*i+i+1],&ldS_,&cl,&sl));
+<a name="line567">567: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&i_2,&S[ldS*i],&one,&S[ldS*(i+1)],&one,&cr,&sr));
+<a name="line568">568: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_i_2,&T[ldT*(i+2)+i],&ldT_,&T[ldT*(i+2)+i+1],&ldT_,&cl,&sl));
+<a name="line569">569: </a>          PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&i_,&T[ldT*i],&one,&T[ldT*(i+1)],&one,&cr,&sr));
+<a name="line570">570: </a>          <font color="#4169E1">if</font> (X) PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_,&X[ldX*i],&one,&X[ldX*(i+1)],&one,&cr,&sr));
+<a name="line571">571: </a>          <font color="#4169E1">if</font> (Y) PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&n_,&Y[ldY*i],&one,&Y[ldY*(i+1)],&one,&cl,&sl));
+<a name="line572">572: </a>          T[ldT*i+i] = b11;
+<a name="line573">573: </a>          T[ldT*i+i+1] = 0.0;
+<a name="line574">574: </a>          T[ldT*(i+1)+i] = 0.0;
+<a name="line575">575: </a>          T[ldT*(i+1)+i+1] = b22;
+<a name="line576">576: </a>        }
+<a name="line577">577: </a>      }
+<a name="line578">578: </a>    i++;
+<a name="line579">579: </a>    }
+<a name="line580">580: </a>  }
+<a name="line581">581: </a><font color="#A020F0">#endif</font>
+<a name="line582">582: </a>  <font color="#4169E1">return</font>(0);
+<a name="line583">583: </a><font color="#A020F0">#endif</font>
+<a name="line584">584: </a>}
+
+<a name="line588">588: </a><strong><font color="#4169E1"><a name="DSSolve_GNHEP"></a>PetscErrorCode DSSolve_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line589">589: </a>{
+<a name="line590">590: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GGES)</font>
+<a name="line592">592: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GGES - Lapack routines are unavailable"</font>);
+<a name="line593">593: </a><font color="#A020F0">#else</font>
+<a name="line595">595: </a>  PetscScalar    *work,*beta,a;
+<a name="line596">596: </a>  PetscInt       i;
+<a name="line597">597: </a>  PetscBLASInt   lwork,info,n,ld,iaux;
+<a name="line598">598: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],*B = ds->mat[DS_MAT_B],*Z = ds->mat[DS_MAT_Z],*Q = ds->mat[DS_MAT_Q];
+
+<a name="line601">601: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line603">603: </a><font color="#A020F0">#endif</font>
+<a name="line604">604: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line605">605: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line606">606: </a>  lwork = -1;
+<a name="line607">607: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line608">608: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,wi,NULL,Z,&ld,Q,&ld,&a,&lwork,NULL,&info));
+<a name="line609">609: </a>  PetscBLASIntCast((PetscInt)a,&lwork);
+<a name="line610">610: </a>  DSAllocateWork_Private(ds,lwork+ld,0,0);
+<a name="line611">611: </a>  beta = ds->work;
+<a name="line612">612: </a>  work = beta+ds->n;
+<a name="line613">613: </a>  PetscBLASIntCast(ds->lwork-ds->n,&lwork);
+<a name="line614">614: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,wi,beta,Z,&ld,Q,&ld,work,&lwork,NULL,&info));
+<a name="line615">615: </a><font color="#A020F0">#else</font>
+<a name="line616">616: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,NULL,Z,&ld,Q,&ld,&a,&lwork,NULL,NULL,&info));
+<a name="line617">617: </a>  PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);
+<a name="line618">618: </a>  DSAllocateWork_Private(ds,lwork+ld,8*ld,0);
+<a name="line619">619: </a>  beta = ds->work;
+<a name="line620">620: </a>  work = beta+ds->n;
+<a name="line621">621: </a>  PetscBLASIntCast(ds->lwork-ds->n,&lwork);
+<a name="line622">622: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgges"</font>,LAPACKgges_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,A,&ld,B,&ld,&iaux,wr,beta,Z,&ld,Q,&ld,work,&lwork,ds->rwork,NULL,&info));
+<a name="line623">623: </a><font color="#A020F0">#endif</font>
+<a name="line624">624: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGGES %i"</font>,info);
+<a name="line625">625: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line626">626: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wr[i] = (PetscRealPart(wr[i])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line627">627: </a>    <font color="#4169E1">else</font> wr[i] /= beta[i];
+<a name="line628">628: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line629">629: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wi[i] = (wi[i]>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line630">630: </a>    <font color="#4169E1">else</font> wi[i] /= beta[i];
+<a name="line631">631: </a><font color="#A020F0">#else</font>
+<a name="line632">632: </a>    <font color="#4169E1">if</font> (wi) wi[i] = 0.0;
+<a name="line633">633: </a><font color="#A020F0">#endif</font>
+<a name="line634">634: </a>  }
+<a name="line635">635: </a>  <font color="#4169E1">return</font>(0);
+<a name="line636">636: </a><font color="#A020F0">#endif</font>
+<a name="line637">637: </a>}
+
+<a name="line641">641: </a><strong><font color="#4169E1"><a name="DSCreate_GNHEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_GNHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line642">642: </a>{
+<a name="line644">644: </a>  ds->ops->allocate      = DSAllocate_GNHEP;
+<a name="line645">645: </a>  ds->ops->view          = DSView_GNHEP;
+<a name="line646">646: </a>  ds->ops->vectors       = DSVectors_GNHEP;
+<a name="line647">647: </a>  ds->ops->solve[0]      = DSSolve_GNHEP;
+<a name="line648">648: </a>  ds->ops->sort          = DSSort_GNHEP;
+<a name="line649">649: </a>  ds->ops->normalize     = DSNormalize_GNHEP;
+<a name="line650">650: </a>  <font color="#4169E1">return</font>(0);
+<a name="line651">651: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/gnhep/index.html b/src/sys/classes/ds/impls/gnhep/index.html
index c5cf38a..dcdba44 100644
--- a/src/sys/classes/ds/impls/gnhep/index.html
+++ b/src/sys/classes/ds/impls/gnhep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/gnhep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/gnhep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/gnhep/makefile b/src/sys/classes/ds/impls/gnhep/makefile
index e5c5023..0e6cdab 100644
--- a/src/sys/classes/ds/impls/gnhep/makefile
+++ b/src/sys/classes/ds/impls/gnhep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/gnhep/makefile.html b/src/sys/classes/ds/impls/gnhep/makefile.html
index 683bfb6..95a46ee 100644
--- a/src/sys/classes/ds/impls/gnhep/makefile.html
+++ b/src/sys/classes/ds/impls/gnhep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/gnhep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:58+00:00">
+<meta name="date" content="2016-05-16T10:31:49+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/gnhep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/gnhep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/hep/bdc/dibtdc.c b/src/sys/classes/ds/impls/hep/bdc/dibtdc.c
index e843709..0b724a8 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dibtdc.c
+++ b/src/sys/classes/ds/impls/hep/bdc/dibtdc.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -329,7 +329,7 @@ PetscErrorCode BDC_dibtdc_(const char *jobz,PetscBLASInt n,PetscBLASInt nblks,
 
 /*  ===================================================================== */
 
-#if defined(SLEPC_MISSING_LAPACK_LACPY) || defined(SLEPC_MISSING_LAPACK_SYEV)
+#if defined(SLEPC_MISSING_LAPACK_LACPY) || defined(PETSC_MISSING_LAPACK_SYEV)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"LACPY/SYEV - Lapack routine is unavailable");
 #else
diff --git a/src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html b/src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html
index 27acc50..2df37d7 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html
+++ b/src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:47+00:00">
+<meta name="date" content="2016-05-16T10:31:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/dibtdc.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   BDC - Block-divide and conquer (see description in README file).</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -340,7 +340,7 @@
 
 <a name="line330">330: </a><font color="#B22222">/*  ===================================================================== */</font>
 
-<a name="line332">332: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LACPY) || defined(SLEPC_MISSING_LAPACK_SYEV)</font>
+<a name="line332">332: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LACPY) || defined(PETSC_MISSING_LAPACK_SYEV)</font>
 <a name="line334">334: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LACPY/SYEV - Lapack routine is unavailable"</font>);
 <a name="line335">335: </a><font color="#A020F0">#else</font>
 <a name="line336">336: </a>  PetscBLASInt   i, j, k, np, rp1, ksk, one=1;
diff --git a/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c b/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c
index e1a1c4b..0cd8869 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c
+++ b/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html b/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html
index cccef89..1400181 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html
+++ b/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:48+00:00">
+<meta name="date" content="2016-05-16T10:31:38+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/dlaed3m.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   BDC - Block-divide and conquer (see description in README file).</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/dmerg2.c b/src/sys/classes/ds/impls/hep/bdc/dmerg2.c
index dcd2b88..e569e63 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dmerg2.c
+++ b/src/sys/classes/ds/impls/hep/bdc/dmerg2.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html b/src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html
index 25f3402..64211e8 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html
+++ b/src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:49+00:00">
+<meta name="date" content="2016-05-16T10:31:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/dmerg2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   BDC - Block-divide and conquer (see description in README file).</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c b/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c
index a11591a..bc03762 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c
+++ b/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -267,7 +267,7 @@ PetscErrorCode BDC_dsbtdc_(const char *jobz,const char *jobacc,PetscBLASInt n,
 /*                          NOTE: in the routine DIBTDC, the value */
 /*                                1.D-1 is hardcoded for TOLMAX ! */
 
-#if defined(SLEPC_MISSING_LAPACK_SYEVD) || defined(SLEPC_MISSING_LAPACK_GESVD) || defined(SLEPC_MISSING_LAPACK_LASET) || defined(SLEPC_MISSING_LAPACK_LASCL)
+#if defined(SLEPC_MISSING_LAPACK_SYEVD) || defined(PETSC_MISSING_LAPACK_GESVD) || defined(SLEPC_MISSING_LAPACK_LASET) || defined(SLEPC_MISSING_LAPACK_LASCL)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"SYEVD/GESVD/LASET/LASCL - Lapack routine is unavailable");
 #else
diff --git a/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html b/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html
index af92056..0d8c1ef 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html
+++ b/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:49+00:00">
+<meta name="date" content="2016-05-16T10:31:39+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/dsbtdc.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   BDC - Block-divide and conquer (see description in README file).</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -279,7 +279,7 @@
 <a name="line267">267: </a><font color="#B22222">/*                          NOTE: in the routine DIBTDC, the value */</font>
 <a name="line268">268: </a><font color="#B22222">/*                                1.D-1 is hardcoded for TOLMAX ! */</font>
 
-<a name="line270">270: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_SYEVD) || defined(SLEPC_MISSING_LAPACK_GESVD) || defined(SLEPC_MISSING_LAPACK_LASET) || defined(SLEPC_MISSING_LAPACK_LASCL)</font>
+<a name="line270">270: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_SYEVD) || defined(PETSC_MISSING_LAPACK_GESVD) || defined(SLEPC_MISSING_LAPACK_LASET) || defined(SLEPC_MISSING_LAPACK_LASCL)</font>
 <a name="line272">272: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"SYEVD/GESVD/LASET/LASCL - Lapack routine is unavailable"</font>);
 <a name="line273">273: </a><font color="#A020F0">#else</font>
 <a name="line274">274: </a>  PetscBLASInt   i, j, k, i1, iwspc, lwmin, start;
diff --git a/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c b/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c
index e53d5ef..1a1183f 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c
+++ b/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html b/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html
index 6f8a7fe..3ba2fbd 100644
--- a/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html
+++ b/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:50+00:00">
+<meta name="date" content="2016-05-16T10:31:41+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/dsrtdf.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   BDC - Block-divide and conquer (see description in README file).</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/index.html b/src/sys/classes/ds/impls/hep/bdc/index.html
index aa2e7db..b1183e2 100644
--- a/src/sys/classes/ds/impls/hep/bdc/index.html
+++ b/src/sys/classes/ds/impls/hep/bdc/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/hep/bdc/makefile b/src/sys/classes/ds/impls/hep/bdc/makefile
index ea0cdbc..acdf18e 100644
--- a/src/sys/classes/ds/impls/hep/bdc/makefile
+++ b/src/sys/classes/ds/impls/hep/bdc/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/hep/bdc/makefile.html b/src/sys/classes/ds/impls/hep/bdc/makefile.html
index 2769d11..67895de 100644
--- a/src/sys/classes/ds/impls/hep/bdc/makefile.html
+++ b/src/sys/classes/ds/impls/hep/bdc/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/bdc/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:51+00:00">
+<meta name="date" content="2016-05-16T10:31:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/bdc/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/bdc/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/hep/dshep.c b/src/sys/classes/ds/impls/hep/dshep.c
index 6b2c22b..d0957c6 100644
--- a/src/sys/classes/ds/impls/hep/dshep.c
+++ b/src/sys/classes/ds/impls/hep/dshep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -40,17 +40,17 @@ PetscErrorCode DSAllocate_HEP(DS ds,PetscInt ld)
 
 /*   0       l           k                 n-1
     -----------------------------------------
-    |*       ·           ·                  |
-    |  *     ·           ·                  |
-    |    *   ·           ·                  |
-    |      * ·           ·                  |
-    |· · · · o           o                  |
+    |*       .           .                  |
+    |  *     .           .                  |
+    |    *   .           .                  |
+    |      * .           .                  |
+    |. . . . o           o                  |
     |          o         o                  |
     |            o       o                  |
     |              o     o                  |
     |                o   o                  |
     |                  o o                  |
-    |· · · · o o o o o o o x                |
+    |. . . . o o o o o o o x                |
     |                    x x x              |
     |                      x x x            |
     |                        x x x          |
@@ -202,7 +202,7 @@ PetscErrorCode DSVectors_HEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)
           for (i=0;i<ds->n;i++) *(ds->mat[mat]+i+i*ld) = 1.0;
         }
       }
-      if (rnorm) *rnorm = PetscAbsScalar(Q[ds->n-1+(*j)*ld]);
+      if (rnorm && j) *rnorm = PetscAbsScalar(Q[ds->n-1+(*j)*ld]);
       break;
     case DS_MAT_U:
     case DS_MAT_VT:
@@ -600,9 +600,9 @@ PetscErrorCode DSSolve_HEP_MRRR(DS ds,PetscScalar *wr,PetscScalar *wi)
 #define __FUNCT__ "DSSolve_HEP_DC"
 PetscErrorCode DSSolve_HEP_DC(DS ds,PetscScalar *wr,PetscScalar *wi)
 {
-#if defined(SLEPC_MISSING_LAPACK_STEDC) || defined(SLEPC_MISSING_LAPACK_ORMTR)
+#if defined(SLEPC_MISSING_LAPACK_STEDC)
   PetscFunctionBegin;
-  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"STEDC/ORMTR - Lapack routine is unavailable");
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"STEDC - Lapack routine is unavailable");
 #else
   PetscErrorCode ierr;
   PetscInt       i;
@@ -756,9 +756,9 @@ PetscErrorCode DSTruncate_HEP(DS ds,PetscInt n)
 #define __FUNCT__ "DSCond_HEP"
 PetscErrorCode DSCond_HEP(DS ds,PetscReal *cond)
 {
-#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(SLEPC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE) || defined(SLEPC_MISSING_LAPACK_LANHS)
+#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE)
   PetscFunctionBegin;
-  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GETRF/GETRI/LANGE/LANHS - Lapack routines are unavailable");
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GETRF/GETRI/LANGE - Lapack routines are unavailable");
 #else
   PetscErrorCode ierr;
   PetscScalar    *work;
@@ -802,7 +802,7 @@ PetscErrorCode DSCond_HEP(DS ds,PetscReal *cond)
 #define __FUNCT__ "DSTranslateRKS_HEP"
 PetscErrorCode DSTranslateRKS_HEP(DS ds,PetscScalar alpha)
 {
-#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_ORGQR)
+#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQRF/ORGQR - Lapack routines are unavailable");
 #else
@@ -838,7 +838,7 @@ PetscErrorCode DSTranslateRKS_HEP(DS ds,PetscScalar alpha)
     for (i=0;i<=j;i++)
       R[i+j*ld] = Q[i+j*ld];
   /* Compute orthogonal matrix in Q */
-  PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&n1,&n1,&n0,Q,&ld,tau,work,&lwork,&info));
+  PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&n1,&n1,&n0,Q,&ld,tau,work,&lwork,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
   /* Compute the updated matrix of projected problem */
   for (j=0;j<k;j++)
diff --git a/src/sys/classes/ds/impls/hep/dshep.c.html b/src/sys/classes/ds/impls/hep/dshep.c.html
index 2eac21d..ed4b7f8 100644
--- a/src/sys/classes/ds/impls/hep/dshep.c.html
+++ b/src/sys/classes/ds/impls/hep/dshep.c.html
@@ -1 +1,823 @@
 <center><a href="dshep.c">Actual source code: dshep.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/dshep.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:31:35+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/dshep.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a><font color="#A020F0">#include <slepc/private/dsimpl.h></font>
+<a name="line23"> 23: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line27"> 27: </a><strong><font color="#4169E1"><a name="DSAllocate_HEP"></a>PetscErrorCode DSAllocate_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt ld)</font></strong>
+<a name="line28"> 28: </a>{
+
+<a name="line32"> 32: </a>  DSAllocateMat_Private(ds,DS_MAT_A);
+<a name="line33"> 33: </a>  DSAllocateMat_Private(ds,DS_MAT_Q);
+<a name="line34"> 34: </a>  DSAllocateMatReal_Private(ds,DS_MAT_T);
+<a name="line35"> 35: </a>  PetscFree(ds->perm);
+<a name="line36"> 36: </a>  PetscMalloc1(ld,&ds->perm);
+<a name="line37"> 37: </a>  PetscLogObjectMemory((PetscObject)ds,ld*<font color="#4169E1">sizeof</font>(PetscInt));
+<a name="line38"> 38: </a>  <font color="#4169E1">return</font>(0);
+<a name="line39"> 39: </a>}
+
+<a name="line41"> 41: </a><font color="#B22222">/*   0       l           k                 n-1</font>
+<a name="line42"> 42: </a><font color="#B22222">    -----------------------------------------</font>
+<a name="line43"> 43: </a><font color="#B22222">    |*       .           .                  |</font>
+<a name="line44"> 44: </a><font color="#B22222">    |  *     .           .                  |</font>
+<a name="line45"> 45: </a><font color="#B22222">    |    *   .           .                  |</font>
+<a name="line46"> 46: </a><font color="#B22222">    |      * .           .                  |</font>
+<a name="line47"> 47: </a><font color="#B22222">    |. . . . o           o                  |</font>
+<a name="line48"> 48: </a><font color="#B22222">    |          o         o                  |</font>
+<a name="line49"> 49: </a><font color="#B22222">    |            o       o                  |</font>
+<a name="line50"> 50: </a><font color="#B22222">    |              o     o                  |</font>
+<a name="line51"> 51: </a><font color="#B22222">    |                o   o                  |</font>
+<a name="line52"> 52: </a><font color="#B22222">    |                  o o                  |</font>
+<a name="line53"> 53: </a><font color="#B22222">    |. . . . o o o o o o o x                |</font>
+<a name="line54"> 54: </a><font color="#B22222">    |                    x x x              |</font>
+<a name="line55"> 55: </a><font color="#B22222">    |                      x x x            |</font>
+<a name="line56"> 56: </a><font color="#B22222">    |                        x x x          |</font>
+<a name="line57"> 57: </a><font color="#B22222">    |                          x x x        |</font>
+<a name="line58"> 58: </a><font color="#B22222">    |                            x x x      |</font>
+<a name="line59"> 59: </a><font color="#B22222">    |                              x x x    |</font>
+<a name="line60"> 60: </a><font color="#B22222">    |                                x x x  |</font>
+<a name="line61"> 61: </a><font color="#B22222">    |                                  x x x|</font>
+<a name="line62"> 62: </a><font color="#B22222">    |                                    x x|</font>
+<a name="line63"> 63: </a><font color="#B22222">    -----------------------------------------</font>
+<a name="line64"> 64: </a><font color="#B22222">*/</font>
+
+<a name="line68"> 68: </a><strong><font color="#4169E1"><a name="DSSwitchFormat_HEP"></a>static PetscErrorCode DSSwitchFormat_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool tocompact)</font></strong>
+<a name="line69"> 69: </a>{
+<a name="line71"> 71: </a>  PetscReal      *T = ds->rmat[DS_MAT_T];
+<a name="line72"> 72: </a>  PetscScalar    *A = ds->mat[DS_MAT_A];
+<a name="line73"> 73: </a>  PetscInt       i,n=ds->n,k=ds->k,ld=ds->ld;
+
+<a name="line76"> 76: </a>  <font color="#4169E1">if</font> (tocompact) { <font color="#B22222">/* switch from dense (arrow) to compact storage */</font>
+<a name="line77"> 77: </a>    PetscMemzero(T,3*ld*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line78"> 78: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line79"> 79: </a>      T[i] = PetscRealPart(A[i+i*ld]);
+<a name="line80"> 80: </a>      T[i+ld] = PetscRealPart(A[k+i*ld]);
+<a name="line81"> 81: </a>    }
+<a name="line82"> 82: </a>    <font color="#4169E1">for</font> (i=k;i<n-1;i++) {
+<a name="line83"> 83: </a>      T[i] = PetscRealPart(A[i+i*ld]);
+<a name="line84"> 84: </a>      T[i+ld] = PetscRealPart(A[i+1+i*ld]);
+<a name="line85"> 85: </a>    }
+<a name="line86"> 86: </a>    T[n-1] = PetscRealPart(A[n-1+(n-1)*ld]);
+<a name="line87"> 87: </a>    <font color="#4169E1">if</font> (ds->extrarow) T[n-1+ld] = PetscRealPart(A[n+(n-1)*ld]);
+<a name="line88"> 88: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* switch from compact (arrow) to dense storage */</font>
+<a name="line89"> 89: </a>    PetscMemzero(A,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line90"> 90: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line91"> 91: </a>      A[i+i*ld] = T[i];
+<a name="line92"> 92: </a>      A[k+i*ld] = T[i+ld];
+<a name="line93"> 93: </a>      A[i+k*ld] = T[i+ld];
+<a name="line94"> 94: </a>    }
+<a name="line95"> 95: </a>    A[k+k*ld] = T[k];
+<a name="line96"> 96: </a>    <font color="#4169E1">for</font> (i=k+1;i<n;i++) {
+<a name="line97"> 97: </a>      A[i+i*ld] = T[i];
+<a name="line98"> 98: </a>      A[i-1+i*ld] = T[i-1+ld];
+<a name="line99"> 99: </a>      A[i+(i-1)*ld] = T[i-1+ld];
+<a name="line100">100: </a>    }
+<a name="line101">101: </a>    <font color="#4169E1">if</font> (ds->extrarow) A[n+(n-1)*ld] = T[n-1+ld];
+<a name="line102">102: </a>  }
+<a name="line103">103: </a>  <font color="#4169E1">return</font>(0);
+<a name="line104">104: </a>}
+
+<a name="line108">108: </a><strong><font color="#4169E1"><a name="DSView_HEP"></a>PetscErrorCode DSView_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer)</font></strong>
+<a name="line109">109: </a>{
+<a name="line110">110: </a>  PetscErrorCode    ierr;
+<a name="line111">111: </a>  PetscViewerFormat format;
+<a name="line112">112: </a>  PetscInt          i,j,r,c,rows;
+<a name="line113">113: </a>  PetscReal         value;
+<a name="line114">114: </a>  const char        *methodname[] = {
+<a name="line115">115: </a>                     <font color="#666666">"Implicit QR method (_steqr)"</font>,
+<a name="line116">116: </a>                     <font color="#666666">"Relatively Robust Representations (_stevr)"</font>,
+<a name="line117">117: </a>                     <font color="#666666">"Divide and Conquer method (_stedc)"</font>,
+<a name="line118">118: </a>                     <font color="#666666">"Block Divide and Conquer method (dsbtdc)"</font>
+<a name="line119">119: </a>  };
+<a name="line120">120: </a>  const int         nmeth=<font color="#4169E1">sizeof</font>(methodname)/<font color="#4169E1">sizeof</font>(methodname[0]);
+
+<a name="line123">123: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line124">124: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) {
+<a name="line125">125: </a>    <font color="#4169E1">if</font> (ds->bs>1) {
+<a name="line126">126: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"block size: %D\n"</font>,ds->bs);
+<a name="line127">127: </a>    }
+<a name="line128">128: </a>    <font color="#4169E1">if</font> (ds->method>=nmeth) {
+<a name="line129">129: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"solving the problem with: INVALID METHOD\n"</font>);
+<a name="line130">130: </a>    } <font color="#4169E1">else</font> {
+<a name="line131">131: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"solving the problem with: %s\n"</font>,methodname[ds->method]);
+<a name="line132">132: </a>    }
+<a name="line133">133: </a>    <font color="#4169E1">return</font>(0);
+<a name="line134">134: </a>  }
+<a name="line135">135: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line136">136: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line137">137: </a>    rows = ds->extrarow? ds->n+1: ds->n;
+<a name="line138">138: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
+<a name="line139">139: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%% Size = %D %D\n"</font>,rows,ds->n);
+<a name="line140">140: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"zzz = zeros(%D,3);\n"</font>,3*ds->n);
+<a name="line141">141: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"zzz = [\n"</font>);
+<a name="line142">142: </a>      <font color="#4169E1">for</font> (i=0;i<ds->n;i++) {
+<a name="line143">143: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D %D  %18.16e\n"</font>,i+1,i+1,*(ds->rmat[DS_MAT_T]+i));
+<a name="line144">144: </a>      }
+<a name="line145">145: </a>      <font color="#4169E1">for</font> (i=0;i<rows-1;i++) {
+<a name="line146">146: </a>        r = PetscMax(i+2,ds->k+1);
+<a name="line147">147: </a>        c = i+1;
+<a name="line148">148: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D %D  %18.16e\n"</font>,r,c,*(ds->rmat[DS_MAT_T]+ds->ld+i));
+<a name="line149">149: </a>        <font color="#4169E1">if</font> (i<ds->n-1 && ds->k<ds->n) { <font color="#B22222">/* do not print vertical arrow when k=n */</font>
+<a name="line150">150: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D %D  %18.16e\n"</font>,c,r,*(ds->rmat[DS_MAT_T]+ds->ld+i));
+<a name="line151">151: </a>        }
+<a name="line152">152: </a>      }
+<a name="line153">153: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n%s = spconvert(zzz);\n"</font>,DSMatName[DS_MAT_T]);
+<a name="line154">154: </a>    } <font color="#4169E1">else</font> {
+<a name="line155">155: </a>      <font color="#4169E1">for</font> (i=0;i<rows;i++) {
+<a name="line156">156: </a>        <font color="#4169E1">for</font> (j=0;j<ds->n;j++) {
+<a name="line157">157: </a>          <font color="#4169E1">if</font> (i==j) value = *(ds->rmat[DS_MAT_T]+i);
+<a name="line158">158: </a>          <font color="#4169E1">else</font> <font color="#4169E1">if</font> ((i<ds->k && j==ds->k) || (i==ds->k && j<ds->k)) value = *(ds->rmat[DS_MAT_T]+ds->ld+PetscMin(i,j));
+<a name="line159">159: </a>          <font color="#4169E1">else</font> <font color="#4169E1">if</font> (i==j+1 && i>ds->k) value = *(ds->rmat[DS_MAT_T]+ds->ld+i-1);
+<a name="line160">160: </a>          <font color="#4169E1">else</font> <font color="#4169E1">if</font> (i+1==j && j>ds->k) value = *(ds->rmat[DS_MAT_T]+ds->ld+j-1);
+<a name="line161">161: </a>          <font color="#4169E1">else</font> value = 0.0;
+<a name="line162">162: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">" %18.16e "</font>,value);
+<a name="line163">163: </a>        }
+<a name="line164">164: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line165">165: </a>      }
+<a name="line166">166: </a>    }
+<a name="line167">167: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line168">168: </a>    PetscViewerFlush(viewer);
+<a name="line169">169: </a>  } <font color="#4169E1">else</font> {
+<a name="line170">170: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_A);
+<a name="line171">171: </a>  }
+<a name="line172">172: </a>  <font color="#4169E1">if</font> (ds->state>DS_STATE_INTERMEDIATE) {
+<a name="line173">173: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_Q);
+<a name="line174">174: </a>  }
+<a name="line175">175: </a>  <font color="#4169E1">return</font>(0);
+<a name="line176">176: </a>}
+
+<a name="line180">180: </a><strong><font color="#4169E1"><a name="DSVectors_HEP"></a>PetscErrorCode DSVectors_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *j,PetscReal *rnorm)</font></strong>
+<a name="line181">181: </a>{
+<a name="line182">182: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
+<a name="line183">183: </a>  PetscInt       ld = ds->ld,i;
+
+<a name="line187">187: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line188">188: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line189">189: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line190">190: </a>      <font color="#4169E1">if</font> (j) {
+<a name="line191">191: </a>        <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
+<a name="line192">192: </a>          PetscMemcpy(ds->mat[mat]+(*j)*ld,Q+(*j)*ld,ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line193">193: </a>        } <font color="#4169E1">else</font> {
+<a name="line194">194: </a>          PetscMemzero(ds->mat[mat]+(*j)*ld,ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line195">195: </a>          *(ds->mat[mat]+(*j)+(*j)*ld) = 1.0;
+<a name="line196">196: </a>        }
+<a name="line197">197: </a>      } <font color="#4169E1">else</font> {
+<a name="line198">198: </a>        <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
+<a name="line199">199: </a>          PetscMemcpy(ds->mat[mat],Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line200">200: </a>        } <font color="#4169E1">else</font> {
+<a name="line201">201: </a>          PetscMemzero(ds->mat[mat],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line202">202: </a>          <font color="#4169E1">for</font> (i=0;i<ds->n;i++) *(ds->mat[mat]+i+i*ld) = 1.0;
+<a name="line203">203: </a>        }
+<a name="line204">204: </a>      }
+<a name="line205">205: </a>      <font color="#4169E1">if</font> (rnorm && j) *rnorm = PetscAbsScalar(Q[ds->n-1+(*j)*ld]);
+<a name="line206">206: </a>      <font color="#4169E1">break</font>;
+<a name="line207">207: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line208">208: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line209">209: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line210">210: </a>      <font color="#4169E1">break</font>;
+<a name="line211">211: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line212">212: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line213">213: </a>  }
+<a name="line214">214: </a>  <font color="#4169E1">return</font>(0);
+<a name="line215">215: </a>}
+
+<a name="line219">219: </a><strong><font color="#4169E1"><a name="DSNormalize_HEP"></a>PetscErrorCode DSNormalize_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
+<a name="line220">220: </a>{
+<a name="line222">222: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line223">223: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line224">224: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line225">225: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
+<a name="line226">226: </a>      <font color="#B22222">/* All the matrices resulting from <a href="../../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a> and <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a> are already normalized */</font>
+<a name="line227">227: </a>      <font color="#4169E1">break</font>;
+<a name="line228">228: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line229">229: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line230">230: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line231">231: </a>      <font color="#4169E1">break</font>;
+<a name="line232">232: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line233">233: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line234">234: </a>  }
+<a name="line235">235: </a>  <font color="#4169E1">return</font>(0);
+<a name="line236">236: </a>}
+
+<a name="line240">240: </a><font color="#B22222">/*</font>
+<a name="line241">241: </a><font color="#B22222">  ARROWTRIDIAG reduces a symmetric arrowhead matrix of the form</font>
+
+<a name="line243">243: </a><font color="#B22222">                [ d 0 0 0 e ]</font>
+<a name="line244">244: </a><font color="#B22222">                [ 0 d 0 0 e ]</font>
+<a name="line245">245: </a><font color="#B22222">            A = [ 0 0 d 0 e ]</font>
+<a name="line246">246: </a><font color="#B22222">                [ 0 0 0 d e ]</font>
+<a name="line247">247: </a><font color="#B22222">                [ e e e e d ]</font>
+
+<a name="line249">249: </a><font color="#B22222">  to tridiagonal form</font>
+
+<a name="line251">251: </a><font color="#B22222">                [ d e 0 0 0 ]</font>
+<a name="line252">252: </a><font color="#B22222">                [ e d e 0 0 ]</font>
+<a name="line253">253: </a><font color="#B22222">   T = Q'*A*Q = [ 0 e d e 0 ],</font>
+<a name="line254">254: </a><font color="#B22222">                [ 0 0 e d e ]</font>
+<a name="line255">255: </a><font color="#B22222">                [ 0 0 0 e d ]</font>
+
+<a name="line257">257: </a><font color="#B22222">  where Q is an orthogonal matrix. Rutishauser's algorithm is used to</font>
+<a name="line258">258: </a><font color="#B22222">  perform the reduction, which requires O(n**2) flops. The accumulation</font>
+<a name="line259">259: </a><font color="#B22222">  of the orthogonal factor Q, however, requires O(n**3) flops.</font>
+
+<a name="line261">261: </a><font color="#B22222">  Arguments</font>
+<a name="line262">262: </a><font color="#B22222">  =========</font>
+
+<a name="line264">264: </a><font color="#B22222">  N       (input) INTEGER</font>
+<a name="line265">265: </a><font color="#B22222">          The order of the matrix A.  N >= 0.</font>
+
+<a name="line267">267: </a><font color="#B22222">  D       (input/output) DOUBLE PRECISION array, dimension (N)</font>
+<a name="line268">268: </a><font color="#B22222">          On entry, the diagonal entries of the matrix A to be</font>
+<a name="line269">269: </a><font color="#B22222">          reduced.</font>
+<a name="line270">270: </a><font color="#B22222">          On exit, the diagonal entries of the reduced matrix T.</font>
+
+<a name="line272">272: </a><font color="#B22222">  E       (input/output) DOUBLE PRECISION array, dimension (N-1)</font>
+<a name="line273">273: </a><font color="#B22222">          On entry, the off-diagonal entries of the matrix A to be</font>
+<a name="line274">274: </a><font color="#B22222">          reduced.</font>
+<a name="line275">275: </a><font color="#B22222">          On exit, the subdiagonal entries of the reduced matrix T.</font>
+
+<a name="line277">277: </a><font color="#B22222">  Q       (input/output) DOUBLE PRECISION array, dimension (LDQ, N)</font>
+<a name="line278">278: </a><font color="#B22222">          On exit, the orthogonal matrix Q.</font>
+
+<a name="line280">280: </a><font color="#B22222">  LDQ     (input) INTEGER</font>
+<a name="line281">281: </a><font color="#B22222">          The leading dimension of the array Q.</font>
+
+<a name="line283">283: </a><font color="#B22222">  Note</font>
+<a name="line284">284: </a><font color="#B22222">  ====</font>
+<a name="line285">285: </a><font color="#B22222">  Based on Fortran code contributed by Daniel Kressner</font>
+<a name="line286">286: </a><font color="#B22222">*/</font>
+<a name="line287">287: </a><strong><font color="#4169E1"><a name="ArrowTridiag"></a>static PetscErrorCode ArrowTridiag(PetscBLASInt n,PetscReal *d,PetscReal *e,PetscScalar *Q,PetscBLASInt ld)</font></strong>
+<a name="line288">288: </a>{
+<a name="line289">289: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_LARTG)</font>
+<a name="line291">291: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"LARTG - Lapack routine is unavailable"</font>);
+<a name="line292">292: </a><font color="#A020F0">#else</font>
+<a name="line293">293: </a>  PetscBLASInt i,j,j2,one=1;
+<a name="line294">294: </a>  PetscReal    c,s,p,off,temp;
+
+<a name="line297">297: </a>  <font color="#4169E1">if</font> (n<=2) <font color="#4169E1">return</font>(0);
+
+<a name="line299">299: </a>  <font color="#4169E1">for</font> (j=0;j<n-2;j++) {
+
+<a name="line301">301: </a>    <font color="#B22222">/* Eliminate entry e(j) by a rotation in the planes (j,j+1) */</font>
+<a name="line302">302: </a>    temp = e[j+1];
+<a name="line303">303: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKlartg"</font>,LAPACKlartg_(&temp,&e[j],&c,&s,&e[j+1]));
+<a name="line304">304: </a>    s = -s;
+
+<a name="line306">306: </a>    <font color="#B22222">/* Apply rotation to diagonal elements */</font>
+<a name="line307">307: </a>    temp   = d[j+1];
+<a name="line308">308: </a>    e[j]   = c*s*(temp-d[j]);
+<a name="line309">309: </a>    d[j+1] = s*s*d[j] + c*c*temp;
+<a name="line310">310: </a>    d[j]   = c*c*d[j] + s*s*temp;
+
+<a name="line312">312: </a>    <font color="#B22222">/* Apply rotation to Q */</font>
+<a name="line313">313: </a>    j2 = j+2;
+<a name="line314">314: </a>    PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&j2,Q+j*ld,&one,Q+(j+1)*ld,&one,&c,&s));
+
+<a name="line316">316: </a>    <font color="#B22222">/* Chase newly introduced off-diagonal entry to the top left corner */</font>
+<a name="line317">317: </a>    <font color="#4169E1">for</font> (i=j-1;i>=0;i--) {
+<a name="line318">318: </a>      off  = -s*e[i];
+<a name="line319">319: </a>      e[i] = c*e[i];
+<a name="line320">320: </a>      temp = e[i+1];
+<a name="line321">321: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKlartg"</font>,LAPACKlartg_(&temp,&off,&c,&s,&e[i+1]));
+<a name="line322">322: </a>      s = -s;
+<a name="line323">323: </a>      temp = (d[i]-d[i+1])*s - 2.0*c*e[i];
+<a name="line324">324: </a>      p = s*temp;
+<a name="line325">325: </a>      d[i+1] += p;
+<a name="line326">326: </a>      d[i] -= p;
+<a name="line327">327: </a>      e[i] = -e[i] - c*temp;
+<a name="line328">328: </a>      j2 = j+2;
+<a name="line329">329: </a>      PetscStackCallBLAS(<font color="#666666">"BLASrot"</font>,BLASrot_(&j2,Q+i*ld,&one,Q+(i+1)*ld,&one,&c,&s));
+<a name="line330">330: </a>    }
+<a name="line331">331: </a>  }
+<a name="line332">332: </a>  <font color="#4169E1">return</font>(0);
+<a name="line333">333: </a><font color="#A020F0">#endif</font>
+<a name="line334">334: </a>}
+
+<a name="line338">338: </a><font color="#B22222">/*</font>
+<a name="line339">339: </a><font color="#B22222">   Reduce to tridiagonal form by means of ArrowTridiag.</font>
+<a name="line340">340: </a><font color="#B22222">*/</font>
+<a name="line341">341: </a><strong><font color="#4169E1"><a name="DSIntermediate_HEP"></a>static PetscErrorCode DSIntermediate_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line342">342: </a>{
+<a name="line343">343: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_SYTRD) || defined(SLEPC_MISSING_LAPACK_ORGTR)</font>
+<a name="line345">345: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"SYTRD/ORGTR - Lapack routine is unavailable"</font>);
+<a name="line346">346: </a><font color="#A020F0">#else</font>
+<a name="line348">348: </a>  PetscInt       i;
+<a name="line349">349: </a>  PetscBLASInt   n1,n2,n3,lwork,info,l,n,ld,off;
+<a name="line350">350: </a>  PetscScalar    *A,*Q,*work,*tau;
+<a name="line351">351: </a>  PetscReal      *d,*e;
+
+<a name="line354">354: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line355">355: </a>  PetscBLASIntCast(ds->l,&l);
+<a name="line356">356: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line357">357: </a>  PetscBLASIntCast(ds->k-l+1,&n1); <font color="#B22222">/* size of leading block, excl. locked */</font>
+<a name="line358">358: </a>  PetscBLASIntCast(n-ds->k-1,&n2); <font color="#B22222">/* size of trailing block */</font>
+<a name="line359">359: </a>  n3 = n1+n2;
+<a name="line360">360: </a>  off = l+l*ld;
+<a name="line361">361: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line362">362: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line363">363: </a>  d  = ds->rmat[DS_MAT_T];
+<a name="line364">364: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+<a name="line365">365: </a>  PetscMemzero(Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line366">366: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) Q[i+i*ld] = 1.0;
+
+<a name="line368">368: </a>  <font color="#4169E1">if</font> (ds->compact) {
+
+<a name="line370">370: </a>    <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) ArrowTridiag(n1,d+l,e+l,Q+off,ld);
+
+<a name="line372">372: </a>  } <font color="#4169E1">else</font> {
+
+<a name="line374">374: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) { d[i] = PetscRealPart(A[i+i*ld]); e[i] = 0.0; }
+
+<a name="line376">376: </a>    <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) {
+<a name="line377">377: </a>      DSCopyMatrix_Private(ds,DS_MAT_Q,DS_MAT_A);
+<a name="line378">378: </a>      DSAllocateWork_Private(ds,ld+ld*ld,0,0);
+<a name="line379">379: </a>      tau  = ds->work;
+<a name="line380">380: </a>      work = ds->work+ld;
+<a name="line381">381: </a>      lwork = ld*ld;
+<a name="line382">382: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKsytrd"</font>,LAPACKsytrd_(<font color="#666666">"L"</font>,&n3,Q+off,&ld,d+l,e+l,tau,work,&lwork,&info));
+<a name="line383">383: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xSYTRD %d"</font>,info);
+<a name="line384">384: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKorgtr"</font>,LAPACKorgtr_(<font color="#666666">"L"</font>,&n3,Q+off,&ld,tau,work,&lwork,&info));
+<a name="line385">385: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGTR %d"</font>,info);
+<a name="line386">386: </a>    } <font color="#4169E1">else</font> {
+<a name="line387">387: </a>      <font color="#B22222">/* copy tridiagonal to d,e */</font>
+<a name="line388">388: </a>      <font color="#4169E1">for</font> (i=l;i<n;i++) d[i] = PetscRealPart(A[i+i*ld]);
+<a name="line389">389: </a>      <font color="#4169E1">for</font> (i=l;i<n-1;i++) e[i] = PetscRealPart(A[(i+1)+i*ld]);
+<a name="line390">390: </a>    }
+<a name="line391">391: </a>  }
+<a name="line392">392: </a>  <font color="#4169E1">return</font>(0);
+<a name="line393">393: </a><font color="#A020F0">#endif</font>
+<a name="line394">394: </a>}
+
+<a name="line398">398: </a><strong><font color="#4169E1"><a name="DSSort_HEP"></a>PetscErrorCode DSSort_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line399">399: </a>{
+<a name="line401">401: </a>  PetscInt       n,l,i,*perm,ld=ds->ld;
+<a name="line402">402: </a>  PetscScalar    *A;
+<a name="line403">403: </a>  PetscReal      *d;
+
+<a name="line406">406: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
+<a name="line407">407: </a>  n = ds->n;
+<a name="line408">408: </a>  l = ds->l;
+<a name="line409">409: </a>  A = ds->mat[DS_MAT_A];
+<a name="line410">410: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line411">411: </a>  perm = ds->perm;
+<a name="line412">412: </a>  <font color="#4169E1">if</font> (!rr) {
+<a name="line413">413: </a>    DSSortEigenvaluesReal_Private(ds,d,perm);
+<a name="line414">414: </a>  } <font color="#4169E1">else</font> {
+<a name="line415">415: </a>    DSSortEigenvalues_Private(ds,rr,ri,perm,PETSC_FALSE);
+<a name="line416">416: </a>  }
+<a name="line417">417: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) wr[i] = d[perm[i]];
+<a name="line418">418: </a>  DSPermuteColumns_Private(ds,l,n,DS_MAT_Q,perm);
+<a name="line419">419: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) d[i] = PetscRealPart(wr[i]);
+<a name="line420">420: </a>  <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line421">421: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) A[i+i*ld] = wr[i];
+<a name="line422">422: </a>  }
+<a name="line423">423: </a>  <font color="#4169E1">return</font>(0);
+<a name="line424">424: </a>}
+
+<a name="line428">428: </a><strong><font color="#4169E1"><a name="DSUpdateExtraRow_HEP"></a>PetscErrorCode DSUpdateExtraRow_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line429">429: </a>{
+<a name="line431">431: </a>  PetscInt       i;
+<a name="line432">432: </a>  PetscBLASInt   n,ld,incx=1;
+<a name="line433">433: </a>  PetscScalar    *A,*Q,*x,*y,one=1.0,zero=0.0;
+<a name="line434">434: </a>  PetscReal      *e,beta;
+
+<a name="line437">437: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line438">438: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line439">439: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line440">440: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line441">441: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+
+<a name="line443">443: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line444">444: </a>    beta = e[n-1];   <font color="#B22222">/* in compact, we assume all entries are zero except the last one */</font>
+<a name="line445">445: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) e[i] = PetscRealPart(beta*Q[n-1+i*ld]);
+<a name="line446">446: </a>    ds->k = n;
+<a name="line447">447: </a>  } <font color="#4169E1">else</font> {
+<a name="line448">448: </a>    DSAllocateWork_Private(ds,2*ld,0,0);
+<a name="line449">449: </a>    x = ds->work;
+<a name="line450">450: </a>    y = ds->work+ld;
+<a name="line451">451: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) x[i] = PetscConj(A[n+i*ld]);
+<a name="line452">452: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&n,&one,Q,&ld,x,&incx,&zero,y,&incx));
+<a name="line453">453: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) A[n+i*ld] = PetscConj(y[i]);
+<a name="line454">454: </a>    ds->k = n;
+<a name="line455">455: </a>  }
+<a name="line456">456: </a>  <font color="#4169E1">return</font>(0);
+<a name="line457">457: </a>}
+
+<a name="line461">461: </a><strong><font color="#4169E1"><a name="DSSolve_HEP_QR"></a>PetscErrorCode DSSolve_HEP_QR(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line462">462: </a>{
+<a name="line463">463: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_STEQR)</font>
+<a name="line465">465: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"STEQR - Lapack routine is unavailable"</font>);
+<a name="line466">466: </a><font color="#A020F0">#else</font>
+<a name="line468">468: </a>  PetscInt       i;
+<a name="line469">469: </a>  PetscBLASInt   n1,n2,n3,info,l,n,ld,off;
+<a name="line470">470: </a>  PetscScalar    *Q,*A;
+<a name="line471">471: </a>  PetscReal      *d,*e;
+
+<a name="line474">474: </a>  <font color="#4169E1">if</font> (ds->bs>1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"This method is not prepared for bs>1"</font>);
+<a name="line475">475: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line476">476: </a>  PetscBLASIntCast(ds->l,&l);
+<a name="line477">477: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line478">478: </a>  PetscBLASIntCast(ds->k-l+1,&n1); <font color="#B22222">/* size of leading block, excl. locked */</font>
+<a name="line479">479: </a>  PetscBLASIntCast(n-ds->k-1,&n2); <font color="#B22222">/* size of trailing block */</font>
+<a name="line480">480: </a>  n3 = n1+n2;
+<a name="line481">481: </a>  off = l+l*ld;
+<a name="line482">482: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line483">483: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line484">484: </a>  d  = ds->rmat[DS_MAT_T];
+<a name="line485">485: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+
+<a name="line487">487: </a>  <font color="#B22222">/* Reduce to tridiagonal form */</font>
+<a name="line488">488: </a>  DSIntermediate_HEP(ds);
+
+<a name="line490">490: </a>  <font color="#B22222">/* Solve the tridiagonal eigenproblem */</font>
+<a name="line491">491: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) wr[i] = d[i];
+
+<a name="line493">493: </a>  DSAllocateWork_Private(ds,0,2*ld,0);
+<a name="line494">494: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsteqr"</font>,LAPACKsteqr_(<font color="#666666">"V"</font>,&n3,d+l,e+l,Q+off,&ld,ds->rwork,&info));
+<a name="line495">495: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xSTEQR %d"</font>,info);
+<a name="line496">496: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) wr[i] = d[i];
+
+<a name="line498">498: </a>  <font color="#B22222">/* Create diagonal matrix as a result */</font>
+<a name="line499">499: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line500">500: </a>    PetscMemzero(e,(n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line501">501: </a>  } <font color="#4169E1">else</font> {
+<a name="line502">502: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line503">503: </a>      PetscMemzero(A+l+i*ld,(n-l)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line504">504: </a>    }
+<a name="line505">505: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) A[i+i*ld] = d[i];
+<a name="line506">506: </a>  }
+
+<a name="line508">508: </a>  <font color="#B22222">/* Set zero wi */</font>
+<a name="line509">509: </a>  <font color="#4169E1">if</font> (wi) <font color="#4169E1">for</font> (i=l;i<n;i++) wi[i] = 0.0;
+<a name="line510">510: </a>  <font color="#4169E1">return</font>(0);
+<a name="line511">511: </a><font color="#A020F0">#endif</font>
+<a name="line512">512: </a>}
+
+<a name="line516">516: </a><strong><font color="#4169E1"><a name="DSSolve_HEP_MRRR"></a>PetscErrorCode DSSolve_HEP_MRRR(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line517">517: </a>{
+<a name="line518">518: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_STEVR)</font>
+<a name="line520">520: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"STEVR - Lapack routine is unavailable"</font>);
+<a name="line521">521: </a><font color="#A020F0">#else</font>
+<a name="line523">523: </a>  PetscInt       i;
+<a name="line524">524: </a>  PetscBLASInt   n1,n2,n3,lwork,liwork,info,l,n,m,ld,off,il,iu,*isuppz;
+<a name="line525">525: </a>  PetscScalar    *A,*Q,*W=NULL,one=1.0,zero=0.0;
+<a name="line526">526: </a>  PetscReal      *d,*e,abstol=0.0,vl,vu;
+<a name="line527">527: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line528">528: </a>  PetscInt       j;
+<a name="line529">529: </a>  PetscReal      *ritz;
+<a name="line530">530: </a><font color="#A020F0">#endif</font>
+
+<a name="line533">533: </a>  <font color="#4169E1">if</font> (ds->bs>1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"This method is not prepared for bs>1"</font>);
+<a name="line534">534: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line535">535: </a>  PetscBLASIntCast(ds->l,&l);
+<a name="line536">536: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line537">537: </a>  PetscBLASIntCast(ds->k-l+1,&n1); <font color="#B22222">/* size of leading block, excl. locked */</font>
+<a name="line538">538: </a>  PetscBLASIntCast(n-ds->k-1,&n2); <font color="#B22222">/* size of trailing block */</font>
+<a name="line539">539: </a>  n3 = n1+n2;
+<a name="line540">540: </a>  off = l+l*ld;
+<a name="line541">541: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line542">542: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line543">543: </a>  d  = ds->rmat[DS_MAT_T];
+<a name="line544">544: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+
+<a name="line546">546: </a>  <font color="#B22222">/* Reduce to tridiagonal form */</font>
+<a name="line547">547: </a>  DSIntermediate_HEP(ds);
+
+<a name="line549">549: </a>  <font color="#B22222">/* Solve the tridiagonal eigenproblem */</font>
+<a name="line550">550: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) wr[i] = d[i];
+
+<a name="line552">552: </a>  <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) {  <font color="#B22222">/* Q contains useful info */</font>
+<a name="line553">553: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line554">554: </a>    DSCopyMatrix_Private(ds,DS_MAT_W,DS_MAT_Q);
+<a name="line555">555: </a>    W = ds->mat[DS_MAT_W];
+<a name="line556">556: </a>  }
+<a name="line557">557: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line558">558: </a>  DSAllocateMatReal_Private(ds,DS_MAT_Q);
+<a name="line559">559: </a><font color="#A020F0">#endif</font>
+<a name="line560">560: </a>  lwork = 20*ld;
+<a name="line561">561: </a>  liwork = 10*ld;
+<a name="line562">562: </a>  DSAllocateWork_Private(ds,0,lwork+ld,liwork+2*ld);
+<a name="line563">563: </a>  isuppz = ds->iwork+liwork;
+<a name="line564">564: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line565">565: </a>  ritz = ds->rwork+lwork;
+<a name="line566">566: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKstevr"</font>,LAPACKstevr_(<font color="#666666">"V"</font>,<font color="#666666">"A"</font>,&n3,d+l,e+l,&vl,&vu,&il,&iu,&abstol,&m,ritz+l,ds->rmat[DS_MAT_Q]+off,&ld,isuppz,ds->rwork,&lwork,ds->iwork,&liwork,&info));
+<a name="line567">567: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) wr[i] = ritz[i];
+<a name="line568">568: </a><font color="#A020F0">#else</font>
+<a name="line569">569: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKstevr"</font>,LAPACKstevr_(<font color="#666666">"V"</font>,<font color="#666666">"A"</font>,&n3,d+l,e+l,&vl,&vu,&il,&iu,&abstol,&m,wr+l,Q+off,&ld,isuppz,ds->rwork,&lwork,ds->iwork,&liwork,&info));
+<a name="line570">570: </a><font color="#A020F0">#endif</font>
+<a name="line571">571: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack DSTEVR %d"</font>,info);
+<a name="line572">572: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line573">573: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++)
+<a name="line574">574: </a>    <font color="#4169E1">for</font> (j=l;j<n;j++)
+<a name="line575">575: </a>      Q[i+j*ld] = (ds->rmat[DS_MAT_Q])[i+j*ld];
+<a name="line576">576: </a><font color="#A020F0">#endif</font>
+<a name="line577">577: </a>  <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) {  <font color="#B22222">/* accumulate previous Q */</font>
+<a name="line578">578: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n3,&n3,&n3,&one,W+off,&ld,Q+off,&ld,&zero,A+off,&ld));
+<a name="line579">579: </a>    DSCopyMatrix_Private(ds,DS_MAT_Q,DS_MAT_A);
+<a name="line580">580: </a>  }
+<a name="line581">581: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) d[i] = PetscRealPart(wr[i]);
+
+<a name="line583">583: </a>  <font color="#B22222">/* Create diagonal matrix as a result */</font>
+<a name="line584">584: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line585">585: </a>    PetscMemzero(e,(n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line586">586: </a>  } <font color="#4169E1">else</font> {
+<a name="line587">587: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line588">588: </a>      PetscMemzero(A+l+i*ld,(n-l)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line589">589: </a>    }
+<a name="line590">590: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) A[i+i*ld] = d[i];
+<a name="line591">591: </a>  }
+
+<a name="line593">593: </a>  <font color="#B22222">/* Set zero wi */</font>
+<a name="line594">594: </a>  <font color="#4169E1">if</font> (wi) <font color="#4169E1">for</font> (i=l;i<n;i++) wi[i] = 0.0;
+<a name="line595">595: </a>  <font color="#4169E1">return</font>(0);
+<a name="line596">596: </a><font color="#A020F0">#endif</font>
+<a name="line597">597: </a>}
+
+<a name="line601">601: </a><strong><font color="#4169E1"><a name="DSSolve_HEP_DC"></a>PetscErrorCode DSSolve_HEP_DC(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line602">602: </a>{
+<a name="line603">603: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_STEDC)</font>
+<a name="line605">605: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"STEDC - Lapack routine is unavailable"</font>);
+<a name="line606">606: </a><font color="#A020F0">#else</font>
+<a name="line608">608: </a>  PetscInt       i;
+<a name="line609">609: </a>  PetscBLASInt   n1,info,l,ld,off,lrwork,liwork;
+<a name="line610">610: </a>  PetscScalar    *Q,*A;
+<a name="line611">611: </a>  PetscReal      *d,*e;
+<a name="line612">612: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line613">613: </a>  PetscBLASInt   lwork;
+<a name="line614">614: </a>  PetscInt       j;
+<a name="line615">615: </a><font color="#A020F0">#endif</font>
+
+<a name="line618">618: </a>  <font color="#4169E1">if</font> (ds->bs>1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"This method is not prepared for bs>1"</font>);
+<a name="line619">619: </a>  PetscBLASIntCast(ds->l,&l);
+<a name="line620">620: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line621">621: </a>  PetscBLASIntCast(ds->n-ds->l,&n1);
+<a name="line622">622: </a>  off = l+l*ld;
+<a name="line623">623: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line624">624: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line625">625: </a>  d  = ds->rmat[DS_MAT_T];
+<a name="line626">626: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+
+<a name="line628">628: </a>  <font color="#B22222">/* Reduce to tridiagonal form */</font>
+<a name="line629">629: </a>  DSIntermediate_HEP(ds);
+
+<a name="line631">631: </a>  <font color="#B22222">/* Solve the tridiagonal eigenproblem */</font>
+<a name="line632">632: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) wr[i] = d[i];
+
+<a name="line634">634: </a>  lrwork = 5*n1*n1+3*n1+1;
+<a name="line635">635: </a>  liwork = 5*n1*n1+6*n1+6;
+<a name="line636">636: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line637">637: </a>  DSAllocateWork_Private(ds,0,lrwork,liwork);
+<a name="line638">638: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKstedc"</font>,LAPACKstedc_(<font color="#666666">"V"</font>,&n1,d+l,e+l,Q+off,&ld,ds->rwork,&lrwork,ds->iwork,&liwork,&info));
+<a name="line639">639: </a><font color="#A020F0">#else</font>
+<a name="line640">640: </a>  lwork = ld*ld;
+<a name="line641">641: </a>  DSAllocateWork_Private(ds,lwork,lrwork,liwork);
+<a name="line642">642: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKstedc"</font>,LAPACKstedc_(<font color="#666666">"V"</font>,&n1,d+l,e+l,Q+off,&ld,ds->work,&lwork,ds->rwork,&lrwork,ds->iwork,&liwork,&info));
+<a name="line643">643: </a>  <font color="#B22222">/* Fixing Lapack bug*/</font>
+<a name="line644">644: </a>  <font color="#4169E1">for</font> (j=ds->l;j<ds->n;j++)
+<a name="line645">645: </a>    <font color="#4169E1">for</font> (i=0;i<ds->l;i++) Q[i+j*ld] = 0.0;
+<a name="line646">646: </a><font color="#A020F0">#endif</font>
+<a name="line647">647: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xSTEDC %d"</font>,info);
+<a name="line648">648: </a>  <font color="#4169E1">for</font> (i=l;i<ds->n;i++) wr[i] = d[i];
+
+<a name="line650">650: </a>  <font color="#B22222">/* Create diagonal matrix as a result */</font>
+<a name="line651">651: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line652">652: </a>    PetscMemzero(e,(ds->n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line653">653: </a>  } <font color="#4169E1">else</font> {
+<a name="line654">654: </a>    <font color="#4169E1">for</font> (i=l;i<ds->n;i++) {
+<a name="line655">655: </a>      PetscMemzero(A+l+i*ld,(ds->n-l)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line656">656: </a>    }
+<a name="line657">657: </a>    <font color="#4169E1">for</font> (i=l;i<ds->n;i++) A[i+i*ld] = d[i];
+<a name="line658">658: </a>  }
+
+<a name="line660">660: </a>  <font color="#B22222">/* Set zero wi */</font>
+<a name="line661">661: </a>  <font color="#4169E1">if</font> (wi) <font color="#4169E1">for</font> (i=l;i<ds->n;i++) wi[i] = 0.0;
+<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
+<a name="line663">663: </a><font color="#A020F0">#endif</font>
+<a name="line664">664: </a>}
+
+<a name="line666">666: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line669">669: </a><strong><font color="#4169E1"><a name="DSSolve_HEP_BDC"></a>PetscErrorCode DSSolve_HEP_BDC(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line670">670: </a>{
+<a name="line672">672: </a>  PetscBLASInt   i,j,k,m,n,info,nblks,bs,ld,lde,lrwork,liwork,*ksizes,*iwork,mingapi;
+<a name="line673">673: </a>  PetscScalar    *Q,*A;
+<a name="line674">674: </a>  PetscReal      *D,*E,*d,*e,tol=PETSC_MACHINE_EPSILON/2,tau1=1e-16,tau2=1e-18,*rwork,mingap;
+
+<a name="line677">677: </a>  <font color="#4169E1">if</font> (ds->l>0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"This method is not prepared for l>1"</font>);
+<a name="line678">678: </a>  <font color="#4169E1">if</font> (ds->compact) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented for compact storage"</font>);
+<a name="line679">679: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line680">680: </a>  PetscBLASIntCast(ds->bs,&bs);
+<a name="line681">681: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line682">682: </a>  nblks = n/bs;
+<a name="line683">683: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line684">684: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line685">685: </a>  d  = ds->rmat[DS_MAT_T];
+<a name="line686">686: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+<a name="line687">687: </a>  lrwork = 4*n*n+60*n+1;
+<a name="line688">688: </a>  liwork = 5*n+5*nblks-1;
+<a name="line689">689: </a>  lde = 2*bs+1;
+<a name="line690">690: </a>  DSAllocateWork_Private(ds,bs*n+lde*lde*(nblks-1),lrwork,nblks+liwork);
+<a name="line691">691: </a>  D      = ds->work;
+<a name="line692">692: </a>  E      = ds->work+bs*n;
+<a name="line693">693: </a>  rwork  = ds->rwork;
+<a name="line694">694: </a>  ksizes = ds->iwork;
+<a name="line695">695: </a>  iwork  = ds->iwork+nblks;
+<a name="line696">696: </a>  PetscMemzero(iwork,liwork*<font color="#4169E1">sizeof</font>(PetscBLASInt));
+
+<a name="line698">698: </a>  <font color="#B22222">/* Copy matrix to block tridiagonal format */</font>
+<a name="line699">699: </a>  j=0;
+<a name="line700">700: </a>  <font color="#4169E1">for</font> (i=0;i<nblks;i++) {
+<a name="line701">701: </a>    ksizes[i]=bs;
+<a name="line702">702: </a>    <font color="#4169E1">for</font> (k=0;k<bs;k++)
+<a name="line703">703: </a>      <font color="#4169E1">for</font> (m=0;m<bs;m++)
+<a name="line704">704: </a>        D[k+m*bs+i*bs*bs] = PetscRealPart(A[j+k+(j+m)*n]);
+<a name="line705">705: </a>    j = j + bs;
+<a name="line706">706: </a>  }
+<a name="line707">707: </a>  j=0;
+<a name="line708">708: </a>  <font color="#4169E1">for</font> (i=0;i<nblks-1;i++) {
+<a name="line709">709: </a>    <font color="#4169E1">for</font> (k=0;k<bs;k++)
+<a name="line710">710: </a>      <font color="#4169E1">for</font> (m=0;m<bs;m++)
+<a name="line711">711: </a>        E[k+m*lde+i*lde*lde] = PetscRealPart(A[j+bs+k+(j+m)*n]);
+<a name="line712">712: </a>    j = j + bs;
+<a name="line713">713: </a>  }
+
+<a name="line715">715: </a>  <font color="#B22222">/* Solve the block tridiagonal eigenproblem */</font>
+<a name="line716">716: </a>  BDC_dsbtdc_(<font color="#666666">"D"</font>,<font color="#666666">"A"</font>,n,nblks,ksizes,D,bs,bs,E,lde,lde,tol,tau1,tau2,d,
+<a name="line717">717: </a>           Q,n,rwork,lrwork,iwork,liwork,&mingap,&mingapi,&info,1,1);
+<a name="line718">718: </a>  <font color="#4169E1">for</font> (i=0;i<ds->n;i++) wr[i] = d[i];
+
+<a name="line720">720: </a>  <font color="#B22222">/* Create diagonal matrix as a result */</font>
+<a name="line721">721: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line722">722: </a>    PetscMemzero(e,(ds->n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line723">723: </a>  } <font color="#4169E1">else</font> {
+<a name="line724">724: </a>    <font color="#4169E1">for</font> (i=0;i<ds->n;i++) {
+<a name="line725">725: </a>      PetscMemzero(A+i*ld,ds->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line726">726: </a>    }
+<a name="line727">727: </a>    <font color="#4169E1">for</font> (i=0;i<ds->n;i++) A[i+i*ld] = wr[i];
+<a name="line728">728: </a>  }
+
+<a name="line730">730: </a>  <font color="#B22222">/* Set zero wi */</font>
+<a name="line731">731: </a>  <font color="#4169E1">if</font> (wi) <font color="#4169E1">for</font> (i=0;i<ds->n;i++) wi[i] = 0.0;
+<a name="line732">732: </a>  <font color="#4169E1">return</font>(0);
+<a name="line733">733: </a>}
+<a name="line734">734: </a><font color="#A020F0">#endif</font>
+
+<a name="line738">738: </a><strong><font color="#4169E1"><a name="DSTruncate_HEP"></a>PetscErrorCode DSTruncate_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt n)</font></strong>
+<a name="line739">739: </a>{
+<a name="line740">740: </a>  PetscInt       i,ld=ds->ld,l=ds->l;
+<a name="line741">741: </a>  PetscScalar    *A;
+
+<a name="line744">744: </a>  <font color="#4169E1">if</font> (ds->state==DS_STATE_CONDENSED) ds->t = ds->n;
+<a name="line745">745: </a>  A = ds->mat[DS_MAT_A];
+<a name="line746">746: </a>  <font color="#4169E1">if</font> (!ds->compact && ds->extrarow && ds->k==ds->n) {
+<a name="line747">747: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) A[n+i*ld] = A[ds->n+i*ld];
+<a name="line748">748: </a>  }
+<a name="line749">749: </a>  <font color="#4169E1">if</font> (ds->extrarow) ds->k = n;
+<a name="line750">750: </a>  <font color="#4169E1">else</font> ds->k = 0;
+<a name="line751">751: </a>  ds->n = n;
+<a name="line752">752: </a>  <font color="#4169E1">return</font>(0);
+<a name="line753">753: </a>}
+
+<a name="line757">757: </a><strong><font color="#4169E1"><a name="DSCond_HEP"></a>PetscErrorCode DSCond_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscReal *cond)</font></strong>
+<a name="line758">758: </a>{
+<a name="line759">759: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE)</font>
+<a name="line761">761: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRF/GETRI/LANGE - Lapack routines are unavailable"</font>);
+<a name="line762">762: </a><font color="#A020F0">#else</font>
+<a name="line764">764: </a>  PetscScalar    *work;
+<a name="line765">765: </a>  PetscReal      *rwork;
+<a name="line766">766: </a>  PetscBLASInt   *ipiv;
+<a name="line767">767: </a>  PetscBLASInt   lwork,info,n,ld;
+<a name="line768">768: </a>  PetscReal      hn,hin;
+<a name="line769">769: </a>  PetscScalar    *A;
+
+<a name="line772">772: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line773">773: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line774">774: </a>  lwork = 8*ld;
+<a name="line775">775: </a>  DSAllocateWork_Private(ds,lwork,ld,ld);
+<a name="line776">776: </a>  work  = ds->work;
+<a name="line777">777: </a>  rwork = ds->rwork;
+<a name="line778">778: </a>  ipiv  = ds->iwork;
+<a name="line779">779: </a>  DSSwitchFormat_HEP(ds,PETSC_FALSE);
+
+<a name="line781">781: </a>  <font color="#B22222">/* use workspace matrix W to avoid overwriting A */</font>
+<a name="line782">782: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line783">783: </a>  A = ds->mat[DS_MAT_W];
+<a name="line784">784: </a>  PetscMemcpy(A,ds->mat[DS_MAT_A],<font color="#4169E1">sizeof</font>(PetscScalar)*ds->ld*ds->ld);
+
+<a name="line786">786: </a>  <font color="#B22222">/* norm of A */</font>
+<a name="line787">787: </a>  hn = LAPACKlange_(<font color="#666666">"I"</font>,&n,&n,A,&ld,rwork);
+
+<a name="line789">789: </a>  <font color="#B22222">/* norm of inv(A) */</font>
+<a name="line790">790: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&n,&n,A,&ld,ipiv,&info));
+<a name="line791">791: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGETRF %d"</font>,info);
+<a name="line792">792: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&n,A,&ld,ipiv,work,&lwork,&info));
+<a name="line793">793: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGETRI %d"</font>,info);
+<a name="line794">794: </a>  hin = LAPACKlange_(<font color="#666666">"I"</font>,&n,&n,A,&ld,rwork);
+
+<a name="line796">796: </a>  *cond = hn*hin;
+<a name="line797">797: </a>  <font color="#4169E1">return</font>(0);
+<a name="line798">798: </a><font color="#A020F0">#endif</font>
+<a name="line799">799: </a>}
+
+<a name="line803">803: </a><strong><font color="#4169E1"><a name="DSTranslateRKS_HEP"></a>PetscErrorCode DSTranslateRKS_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar alpha)</font></strong>
+<a name="line804">804: </a>{
+<a name="line805">805: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)</font>
+<a name="line807">807: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routines are unavailable"</font>);
+<a name="line808">808: </a><font color="#A020F0">#else</font>
+<a name="line810">810: </a>  PetscInt       i,j,k=ds->k;
+<a name="line811">811: </a>  PetscScalar    *Q,*A,*R,*tau,*work;
+<a name="line812">812: </a>  PetscBLASInt   ld,n1,n0,lwork,info;
+
+<a name="line815">815: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line816">816: </a>  DSAllocateWork_Private(ds,ld*ld,0,0);
+<a name="line817">817: </a>  tau = ds->work;
+<a name="line818">818: </a>  work = ds->work+ld;
+<a name="line819">819: </a>  PetscBLASIntCast(ld*(ld-1),&lwork);
+<a name="line820">820: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line821">821: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line822">822: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line823">823: </a>  R  = ds->mat[DS_MAT_W];
+<a name="line824">824: </a>  <font color="#B22222">/* Copy I+alpha*A */</font>
+<a name="line825">825: </a>  PetscMemzero(Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line826">826: </a>  PetscMemzero(R,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line827">827: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line828">828: </a>    Q[i+i*ld] = 1.0 + alpha*A[i+i*ld];
+<a name="line829">829: </a>    Q[k+i*ld] = alpha*A[k+i*ld];
+<a name="line830">830: </a>  }
+<a name="line831">831: </a>  <font color="#B22222">/* Compute qr */</font>
+<a name="line832">832: </a>  PetscBLASIntCast(k+1,&n1);
+<a name="line833">833: </a>  PetscBLASIntCast(k,&n0);
+<a name="line834">834: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&n1,&n0,Q,&ld,tau,work,&lwork,&info));
+<a name="line835">835: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line836">836: </a>  <font color="#B22222">/* Copy R from Q */</font>
+<a name="line837">837: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++)
+<a name="line838">838: </a>    <font color="#4169E1">for</font> (i=0;i<=j;i++)
+<a name="line839">839: </a>      R[i+j*ld] = Q[i+j*ld];
+<a name="line840">840: </a>  <font color="#B22222">/* Compute orthogonal matrix in Q */</font>
+<a name="line841">841: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&n1,&n1,&n0,Q,&ld,tau,work,&lwork,&info));
+<a name="line842">842: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+<a name="line843">843: </a>  <font color="#B22222">/* Compute the updated matrix of projected problem */</font>
+<a name="line844">844: </a>  <font color="#4169E1">for</font> (j=0;j<k;j++)
+<a name="line845">845: </a>    <font color="#4169E1">for</font> (i=0;i<k+1;i++)
+<a name="line846">846: </a>      A[j*ld+i] = Q[i*ld+j];
+<a name="line847">847: </a>  alpha = -1.0/alpha;
+<a name="line848">848: </a>  PetscStackCallBLAS(<font color="#666666">"BLAStrsm"</font>,BLAStrsm_(<font color="#666666">"R"</font>,<font color="#666666">"U"</font>,<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n1,&n0,&alpha,R,&ld,A,&ld));
+<a name="line849">849: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++)
+<a name="line850">850: </a>    A[ld*i+i]-=alpha;
+<a name="line851">851: </a>  <font color="#4169E1">return</font>(0);
+<a name="line852">852: </a><font color="#A020F0">#endif</font>
+<a name="line853">853: </a>}
+
+<a name="line857">857: </a><strong><font color="#4169E1"><a name="DSCreate_HEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_HEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line858">858: </a>{
+<a name="line860">860: </a>  ds->ops->allocate      = DSAllocate_HEP;
+<a name="line861">861: </a>  ds->ops->view          = DSView_HEP;
+<a name="line862">862: </a>  ds->ops->vectors       = DSVectors_HEP;
+<a name="line863">863: </a>  ds->ops->solve[0]      = DSSolve_HEP_QR;
+<a name="line864">864: </a>  ds->ops->solve[1]      = DSSolve_HEP_MRRR;
+<a name="line865">865: </a>  ds->ops->solve[2]      = DSSolve_HEP_DC;
+<a name="line866">866: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line867">867: </a>  ds->ops->solve[3]      = DSSolve_HEP_BDC;
+<a name="line868">868: </a><font color="#A020F0">#endif</font>
+<a name="line869">869: </a>  ds->ops->sort          = DSSort_HEP;
+<a name="line870">870: </a>  ds->ops->truncate      = DSTruncate_HEP;
+<a name="line871">871: </a>  ds->ops->update        = DSUpdateExtraRow_HEP;
+<a name="line872">872: </a>  ds->ops->cond          = DSCond_HEP;
+<a name="line873">873: </a>  ds->ops->transrks      = DSTranslateRKS_HEP;
+<a name="line874">874: </a>  ds->ops->normalize     = DSNormalize_HEP;
+<a name="line875">875: </a>  <font color="#4169E1">return</font>(0);
+<a name="line876">876: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/ds/impls/hep/index.html b/src/sys/classes/ds/impls/hep/index.html
index bdf23e5..0ac8633 100644
--- a/src/sys/classes/ds/impls/hep/index.html
+++ b/src/sys/classes/ds/impls/hep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/hep/makefile b/src/sys/classes/ds/impls/hep/makefile
index e09fbbc..d04f20f 100644
--- a/src/sys/classes/ds/impls/hep/makefile
+++ b/src/sys/classes/ds/impls/hep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/hep/makefile.html b/src/sys/classes/ds/impls/hep/makefile.html
index 73ddf53..697f39b 100644
--- a/src/sys/classes/ds/impls/hep/makefile.html
+++ b/src/sys/classes/ds/impls/hep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/hep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:47+00:00">
+<meta name="date" content="2016-05-16T10:31:36+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/hep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/hep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/index.html b/src/sys/classes/ds/impls/index.html
index aa2803c..b24502e 100644
--- a/src/sys/classes/ds/impls/index.html
+++ b/src/sys/classes/ds/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/makefile b/src/sys/classes/ds/impls/makefile
index 588056a..8671c46 100644
--- a/src/sys/classes/ds/impls/makefile
+++ b/src/sys/classes/ds/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/makefile.html b/src/sys/classes/ds/impls/makefile.html
index 92ef6ab..a2bd401 100644
--- a/src/sys/classes/ds/impls/makefile.html
+++ b/src/sys/classes/ds/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:46+00:00">
+<meta name="date" content="2016-05-16T10:31:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/nep/dsnep.c b/src/sys/classes/ds/impls/nep/dsnep.c
index d3c574c..b590dc1 100644
--- a/src/sys/classes/ds/impls/nep/dsnep.c
+++ b/src/sys/classes/ds/impls/nep/dsnep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -249,7 +249,7 @@ PetscErrorCode DSSolve_NEP_SLP(DS ds,PetscScalar *wr,PetscScalar *wi)
     ierr = DSNEPComputeMatrix(ds,lambda,PETSC_FALSE,DS_MAT_A);CHKERRQ(ierr);
     ierr = DSNEPComputeMatrix(ds,lambda,PETSC_TRUE,DS_MAT_B);CHKERRQ(ierr);
 
-    /* % compute eigenvalue correction mu and eigenvector u */
+    /* compute eigenvalue correction mu and eigenvector u */
 #if defined(PETSC_USE_COMPLEX)
     rwork = ds->rwork;
     PetscStackCallBLAS("LAPACKggev",LAPACKggev_("N","V",&n,A,&ld,B,&ld,alpha,beta,NULL,&ld,W,&ld,work,&lwork,rwork,&info));
@@ -381,7 +381,7 @@ static PetscErrorCode DSNEPGetFN_NEP(DS ds,PetscInt k,FN *fn)
   DS_NEP *ctx = (DS_NEP*)ds->data;
 
   PetscFunctionBegin;
-  if (k<0 || k>=ctx->nf) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",ctx->nf-1);
+  if (k<0 || k>=ctx->nf) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",ctx->nf-1);
   *fn = ctx->f[k];
   PetscFunctionReturn(0);
 }
@@ -411,7 +411,7 @@ PetscErrorCode DSNEPGetFN(DS ds,PetscInt k,FN *fn)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(ds,DS_CLASSID,1);
   PetscValidPointer(fn,3);
-  ierr = PetscTryMethod(ds,"DSNEPGetFN_C",(DS,PetscInt,FN*),(ds,k,fn));CHKERRQ(ierr);
+  ierr = PetscUseMethod(ds,"DSNEPGetFN_C",(DS,PetscInt,FN*),(ds,k,fn));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -451,7 +451,7 @@ PetscErrorCode DSNEPGetNumFN(DS ds,PetscInt *n)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(ds,DS_CLASSID,1);
   PetscValidPointer(n,2);
-  ierr = PetscTryMethod(ds,"DSNEPGetNumFN_C",(DS,PetscInt*),(ds,n));CHKERRQ(ierr);
+  ierr = PetscUseMethod(ds,"DSNEPGetNumFN_C",(DS,PetscInt*),(ds,n));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/ds/impls/nep/dsnep.c.html b/src/sys/classes/ds/impls/nep/dsnep.c.html
index 42de6ff..99a7bb1 100644
--- a/src/sys/classes/ds/impls/nep/dsnep.c.html
+++ b/src/sys/classes/ds/impls/nep/dsnep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/nep/dsnep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:59+00:00">
+<meta name="date" content="2016-05-16T10:31:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/nep/dsnep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/nep/dsnep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -234,7 +234,7 @@
 <a name="line249">249: </a>    DSNEPComputeMatrix(ds,lambda,PETSC_FALSE,DS_MAT_A);
 <a name="line250">250: </a>    DSNEPComputeMatrix(ds,lambda,PETSC_TRUE,DS_MAT_B);
 
-<a name="line252">252: </a>    <font color="#B22222">/* % compute eigenvalue correction mu and eigenvector u */</font>
+<a name="line252">252: </a>    <font color="#B22222">/* compute eigenvalue correction mu and eigenvector u */</font>
 <a name="line253">253: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
 <a name="line254">254: </a>    rwork = ds->rwork;
 <a name="line255">255: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKggev"</font>,LAPACKggev_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,&n,A,&ld,B,&ld,alpha,beta,NULL,&ld,W,&ld,work,&lwork,rwork,&info));
@@ -350,7 +350,7 @@
 <a name="line380">380: </a>{
 <a name="line381">381: </a>  DS_NEP *ctx = (DS_NEP*)ds->data;
 
-<a name="line384">384: </a>  <font color="#4169E1">if</font> (k<0 || k>=ctx->nf) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,ctx->nf-1);
+<a name="line384">384: </a>  <font color="#4169E1">if</font> (k<0 || k>=ctx->nf) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,ctx->nf-1);
 <a name="line385">385: </a>  *fn = ctx->f[k];
 <a name="line386">386: </a>  <font color="#4169E1">return</font>(0);
 <a name="line387">387: </a>}
@@ -374,7 +374,7 @@
 <a name="line407">407: </a><strong><font color="#4169E1"><a name="DSNEPGetFN"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/DS/DSNEPGetFN.html#DSNEPGetFN">DSNEPGetFN</a>(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt k,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *fn)</font></strong>
 <a name="line408">408: </a>{
 
-<a name="line414">414: </a>  PetscTryMethod(ds,<font color="#666666">"DSNEPGetFN_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>*),(ds,k,fn));
+<a name="line414">414: </a>  PetscUseMethod(ds,<font color="#666666">"DSNEPGetFN_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>*),(ds,k,fn));
 <a name="line415">415: </a>  <font color="#4169E1">return</font>(0);
 <a name="line416">416: </a>}
 
@@ -405,7 +405,7 @@
 <a name="line447">447: </a><strong><font color="#4169E1"><a name="DSNEPGetNumFN"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/DS/DSNEPGetNumFN.html#DSNEPGetNumFN">DSNEPGetNumFN</a>(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *n)</font></strong>
 <a name="line448">448: </a>{
 
-<a name="line454">454: </a>  PetscTryMethod(ds,<font color="#666666">"DSNEPGetNumFN_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*),(ds,n));
+<a name="line454">454: </a>  PetscUseMethod(ds,<font color="#666666">"DSNEPGetNumFN_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*),(ds,n));
 <a name="line455">455: </a>  <font color="#4169E1">return</font>(0);
 <a name="line456">456: </a>}
 
diff --git a/src/sys/classes/ds/impls/nep/index.html b/src/sys/classes/ds/impls/nep/index.html
index 0c13aa7..730de51 100644
--- a/src/sys/classes/ds/impls/nep/index.html
+++ b/src/sys/classes/ds/impls/nep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/nep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/nep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/nep/makefile b/src/sys/classes/ds/impls/nep/makefile
index 49e8970..3209e4d 100644
--- a/src/sys/classes/ds/impls/nep/makefile
+++ b/src/sys/classes/ds/impls/nep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/nep/makefile.html b/src/sys/classes/ds/impls/nep/makefile.html
index 92be841..66b3d05 100644
--- a/src/sys/classes/ds/impls/nep/makefile.html
+++ b/src/sys/classes/ds/impls/nep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/nep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:00+00:00">
+<meta name="date" content="2016-05-16T10:31:52+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/nep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/nep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/nhep/dsnhep.c b/src/sys/classes/ds/impls/nhep/dsnhep.c
index 6fe6650..e90295b 100644
--- a/src/sys/classes/ds/impls/nhep/dsnhep.c
+++ b/src/sys/classes/ds/impls/nhep/dsnhep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -59,9 +59,9 @@ PetscErrorCode DSView_NHEP(DS ds,PetscViewer viewer)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_NHEP_Refined_Some"
-PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)
+static PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)
 {
-#if defined(SLEPC_MISSING_LAPACK_GESVD)
+#if defined(PETSC_MISSING_LAPACK_GESVD)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESVD - Lapack routine is unavailable");
 #else
@@ -116,7 +116,7 @@ PetscErrorCode DSVectors_NHEP_Refined_Some(DS ds,PetscInt *k,PetscReal *rnorm,Pe
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_NHEP_Refined_All"
-PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)
+static PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)
 {
   PetscErrorCode ierr;
   PetscInt       i;
@@ -130,7 +130,7 @@ PetscErrorCode DSVectors_NHEP_Refined_All(DS ds,PetscBool left)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_NHEP_Eigen_Some"
-PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)
+static PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,PetscBool left)
 {
 #if defined(SLEPC_MISSING_LAPACK_TREVC)
   PetscFunctionBegin;
@@ -138,11 +138,10 @@ PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,Pets
 #else
   PetscErrorCode ierr;
   PetscInt       i;
-  PetscBLASInt   mm=1,mout,info,ld,n,inc = 1;
+  PetscBLASInt   mm=1,mout,info,ld,n,*select,inc = 1;
   PetscScalar    tmp,done=1.0,zero=0.0;
   PetscReal      norm;
   PetscBool      iscomplex = PETSC_FALSE;
-  PetscBLASInt   *select;
   PetscScalar    *A = ds->mat[DS_MAT_A];
   PetscScalar    *Q = ds->mat[DS_MAT_Q];
   PetscScalar    *X = ds->mat[left?DS_MAT_Y:DS_MAT_X];
@@ -155,7 +154,7 @@ PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,Pets
   select = ds->iwork;
   for (i=0;i<n;i++) select[i] = (PetscBLASInt)PETSC_FALSE;
 
-  /* Compute k-th eigenvector Y of A */
+  /* compute k-th eigenvector Y of A */
   Y = X+(*k)*ld;
   select[*k] = (PetscBLASInt)PETSC_TRUE;
 #if !defined(PETSC_USE_COMPLEX)
@@ -204,7 +203,7 @@ PetscErrorCode DSVectors_NHEP_Eigen_Some(DS ds,PetscInt *k,PetscReal *rnorm,Pets
 
 #undef __FUNCT__
 #define __FUNCT__ "DSVectors_NHEP_Eigen_All"
-PetscErrorCode DSVectors_NHEP_Eigen_All(DS ds,PetscBool left)
+static PetscErrorCode DSVectors_NHEP_Eigen_All(DS ds,PetscBool left)
 {
 #if defined(SLEPC_MISSING_LAPACK_TREVC)
   PetscFunctionBegin;
@@ -370,9 +369,9 @@ PetscErrorCode DSNormalize_NHEP(DS ds,DSMatType mat,PetscInt col)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSSort_NHEP_Arbitrary"
-PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)
+static PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)
 {
-#if defined(SLEPC_MISSING_LAPACK_TRSEN)
+#if defined(PETSC_MISSING_LAPACK_TRSEN)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TRSEN - Lapack routine is unavailable");
 #else
@@ -420,7 +419,7 @@ PetscErrorCode DSSort_NHEP_Arbitrary(DS ds,PetscScalar *wr,PetscScalar *wi,Petsc
 
 #undef __FUNCT__
 #define __FUNCT__ "DSSort_NHEP_Total"
-PetscErrorCode DSSort_NHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)
+static PetscErrorCode DSSort_NHEP_Total(DS ds,PetscScalar *wr,PetscScalar *wi)
 {
 #if defined(SLEPC_MISSING_LAPACK_TREXC)
   PetscFunctionBegin;
@@ -654,7 +653,7 @@ PetscErrorCode DSTruncate_NHEP(DS ds,PetscInt n)
 #define __FUNCT__ "DSCond_NHEP"
 PetscErrorCode DSCond_NHEP(DS ds,PetscReal *cond)
 {
-#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(SLEPC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE) || defined(SLEPC_MISSING_LAPACK_LANHS)
+#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE) || defined(SLEPC_MISSING_LAPACK_LANHS)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GETRF/GETRI/LANGE/LANHS - Lapack routines are unavailable");
 #else
diff --git a/src/sys/classes/ds/impls/nhep/dsnhep.c.html b/src/sys/classes/ds/impls/nhep/dsnhep.c.html
index 91474ba..0c53e2c 100644
--- a/src/sys/classes/ds/impls/nhep/dsnhep.c.html
+++ b/src/sys/classes/ds/impls/nhep/dsnhep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/nhep/dsnhep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:51+00:00">
+<meta name="date" content="2016-05-16T10:31:42+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/nhep/dsnhep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/nhep/dsnhep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -61,9 +61,9 @@
 <a name="line57"> 57: </a>  <font color="#4169E1">return</font>(0);
 <a name="line58"> 58: </a>}
 
-<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Refined_Some"></a>PetscErrorCode DSVectors_NHEP_Refined_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *k,PetscReal *rnorm,PetscBool left)</font></strong>
+<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Refined_Some"></a>static PetscErrorCode DSVectors_NHEP_Refined_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *k,PetscReal *rnorm,PetscBool left)</font></strong>
 <a name="line63"> 63: </a>{
-<a name="line64"> 64: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GESVD)</font>
+<a name="line64"> 64: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESVD)</font>
 <a name="line66"> 66: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESVD - Lapack routine is unavailable"</font>);
 <a name="line67"> 67: </a><font color="#A020F0">#else</font>
 <a name="line69"> 69: </a>  PetscInt       i,j;
@@ -113,7 +113,7 @@
 <a name="line114">114: </a><font color="#A020F0">#endif</font>
 <a name="line115">115: </a>}
 
-<a name="line119">119: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Refined_All"></a>PetscErrorCode DSVectors_NHEP_Refined_All(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool left)</font></strong>
+<a name="line119">119: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Refined_All"></a>static PetscErrorCode DSVectors_NHEP_Refined_All(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool left)</font></strong>
 <a name="line120">120: </a>{
 <a name="line122">122: </a>  PetscInt       i;
 
@@ -123,615 +123,614 @@
 <a name="line128">128: </a>  <font color="#4169E1">return</font>(0);
 <a name="line129">129: </a>}
 
-<a name="line133">133: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Eigen_Some"></a>PetscErrorCode DSVectors_NHEP_Eigen_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *k,PetscReal *rnorm,PetscBool left)</font></strong>
+<a name="line133">133: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Eigen_Some"></a>static PetscErrorCode DSVectors_NHEP_Eigen_Some(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *k,PetscReal *rnorm,PetscBool left)</font></strong>
 <a name="line134">134: </a>{
 <a name="line135">135: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TREVC)</font>
 <a name="line137">137: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TREVC - Lapack routine is unavailable"</font>);
 <a name="line138">138: </a><font color="#A020F0">#else</font>
 <a name="line140">140: </a>  PetscInt       i;
-<a name="line141">141: </a>  PetscBLASInt   mm=1,mout,info,ld,n,inc = 1;
+<a name="line141">141: </a>  PetscBLASInt   mm=1,mout,info,ld,n,*select,inc = 1;
 <a name="line142">142: </a>  PetscScalar    tmp,done=1.0,zero=0.0;
 <a name="line143">143: </a>  PetscReal      norm;
 <a name="line144">144: </a>  PetscBool      iscomplex = PETSC_FALSE;
-<a name="line145">145: </a>  PetscBLASInt   *select;
-<a name="line146">146: </a>  PetscScalar    *A = ds->mat[DS_MAT_A];
-<a name="line147">147: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
-<a name="line148">148: </a>  PetscScalar    *X = ds->mat[left?DS_MAT_Y:DS_MAT_X];
-<a name="line149">149: </a>  PetscScalar    *Y;
-
-<a name="line152">152: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line153">153: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line154">154: </a>  DSAllocateWork_Private(ds,0,0,ld);
-<a name="line155">155: </a>  select = ds->iwork;
-<a name="line156">156: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) select[i] = (PetscBLASInt)PETSC_FALSE;
-
-<a name="line158">158: </a>  <font color="#B22222">/* Compute k-th eigenvector Y of A */</font>
-<a name="line159">159: </a>  Y = X+(*k)*ld;
-<a name="line160">160: </a>  select[*k] = (PetscBLASInt)PETSC_TRUE;
-<a name="line161">161: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line162">162: </a>  <font color="#4169E1">if</font> ((*k)<n-1 && A[(*k)+1+(*k)*ld]!=0.0) iscomplex = PETSC_TRUE;
-<a name="line163">163: </a>  mm = iscomplex? 2: 1;
-<a name="line164">164: </a>  <font color="#4169E1">if</font> (iscomplex) select[(*k)+1] = (PetscBLASInt)PETSC_TRUE;
-<a name="line165">165: </a>  DSAllocateWork_Private(ds,3*ld,0,0);
-<a name="line166">166: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(left?<font color="#666666">"L"</font>:<font color="#666666">"R"</font>,<font color="#666666">"S"</font>,select,&n,A,&ld,Y,&ld,Y,&ld,&mm,&mout,ds->work,&info));
-<a name="line167">167: </a><font color="#A020F0">#else</font>
-<a name="line168">168: </a>  DSAllocateWork_Private(ds,2*ld,ld,0);
-<a name="line169">169: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(left?<font color="#666666">"L"</font>:<font color="#666666">"R"</font>,<font color="#666666">"S"</font>,select,&n,A,&ld,Y,&ld,Y,&ld,&mm,&mout,ds->work,ds->rwork,&info));
-<a name="line170">170: </a><font color="#A020F0">#endif</font>
-<a name="line171">171: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTREVC %d"</font>,info);
-<a name="line172">172: </a>  <font color="#4169E1">if</font> (mout != mm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Inconsistent arguments"</font>);
-
-<a name="line174">174: </a>  <font color="#B22222">/* accumulate and normalize eigenvectors */</font>
-<a name="line175">175: </a>  <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
-<a name="line176">176: </a>    PetscMemcpy(ds->work,Y,mout*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line177">177: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&done,Q,&ld,ds->work,&inc,&zero,Y,&inc));
-<a name="line178">178: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line179">179: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&done,Q,&ld,ds->work+ld,&inc,&zero,Y+ld,&inc));
-<a name="line180">180: </a><font color="#A020F0">#endif</font>
-<a name="line181">181: </a>    norm = BLASnrm2_(&n,Y,&inc);
-<a name="line182">182: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line183">183: </a>    <font color="#4169E1">if</font> (iscomplex) {
-<a name="line184">184: </a>      tmp = BLASnrm2_(&n,Y+ld,&inc);
-<a name="line185">185: </a>      norm = SlepcAbsEigenvalue(norm,tmp);
-<a name="line186">186: </a>    }
-<a name="line187">187: </a><font color="#A020F0">#endif</font>
-<a name="line188">188: </a>    tmp = 1.0 / norm;
-<a name="line189">189: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Y,&inc));
-<a name="line190">190: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line191">191: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Y+ld,&inc));
-<a name="line192">192: </a><font color="#A020F0">#endif</font>
-<a name="line193">193: </a>  }
-
-<a name="line195">195: </a>  <font color="#B22222">/* set output arguments */</font>
-<a name="line196">196: </a>  <font color="#4169E1">if</font> (iscomplex) (*k)++;
-<a name="line197">197: </a>  <font color="#4169E1">if</font> (rnorm) {
-<a name="line198">198: </a>    <font color="#4169E1">if</font> (iscomplex) *rnorm = SlepcAbsEigenvalue(Y[n-1],Y[n-1+ld]);
-<a name="line199">199: </a>    <font color="#4169E1">else</font> *rnorm = PetscAbsScalar(Y[n-1]);
-<a name="line200">200: </a>  }
-<a name="line201">201: </a>  <font color="#4169E1">return</font>(0);
-<a name="line202">202: </a><font color="#A020F0">#endif</font>
-<a name="line203">203: </a>}
-
-<a name="line207">207: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Eigen_All"></a>PetscErrorCode DSVectors_NHEP_Eigen_All(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool left)</font></strong>
-<a name="line208">208: </a>{
-<a name="line209">209: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TREVC)</font>
-<a name="line211">211: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TREVC - Lapack routine is unavailable"</font>);
-<a name="line212">212: </a><font color="#A020F0">#else</font>
-<a name="line214">214: </a>  PetscInt       i;
-<a name="line215">215: </a>  PetscBLASInt   n,ld,mout,info,inc = 1;
-<a name="line216">216: </a>  PetscBool      iscomplex = PETSC_FALSE;
-<a name="line217">217: </a>  PetscScalar    *X,*Y,*Z,*A = ds->mat[DS_MAT_A],tmp;
-<a name="line218">218: </a>  PetscReal      norm;
-<a name="line219">219: </a>  const char     *side,*back;
-
-<a name="line222">222: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line223">223: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (left) {
-<a name="line225">225: </a>    X = NULL;
-<a name="line226">226: </a>    Y = ds->mat[DS_MAT_Y];
-<a name="line227">227: </a>    side = <font color="#666666">"L"</font>;
-<a name="line228">228: </a>  } <font color="#4169E1">else</font> {
-<a name="line229">229: </a>    X = ds->mat[DS_MAT_X];
-<a name="line230">230: </a>    Y = NULL;
-<a name="line231">231: </a>    side = <font color="#666666">"R"</font>;
-<a name="line232">232: </a>  }
-<a name="line233">233: </a>  Z = left? Y: X;
-<a name="line234">234: </a>  <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
-<a name="line235">235: </a>    <font color="#B22222">/* <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>() has been called, backtransform with matrix Q */</font>
-<a name="line236">236: </a>    back = <font color="#666666">"B"</font>;
-<a name="line237">237: </a>    PetscMemcpy(Z,ds->mat[DS_MAT_Q],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line238">238: </a>  } <font color="#4169E1">else</font> back = <font color="#666666">"A"</font>;
-<a name="line239">239: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line240">240: </a>  DSAllocateWork_Private(ds,3*ld,0,0);
-<a name="line241">241: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(side,back,NULL,&n,A,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,&info));
-<a name="line242">242: </a><font color="#A020F0">#else</font>
-<a name="line243">243: </a>  DSAllocateWork_Private(ds,2*ld,ld,0);
-<a name="line244">244: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(side,back,NULL,&n,A,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,ds->rwork,&info));
-<a name="line245">245: </a><font color="#A020F0">#endif</font>
-<a name="line246">246: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTREVC %i"</font>,info);
-
-<a name="line248">248: </a>  <font color="#B22222">/* normalize eigenvectors */</font>
-<a name="line249">249: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line250">250: </a>    <font color="#4169E1">if</font> (i<n-1 && A[i+1+i*ld]!=0.0) iscomplex = PETSC_TRUE;
-<a name="line251">251: </a>    norm = BLASnrm2_(&n,Z+i*ld,&inc);
-<a name="line252">252: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line253">253: </a>    <font color="#4169E1">if</font> (iscomplex) {
-<a name="line254">254: </a>      tmp = BLASnrm2_(&n,Z+(i+1)*ld,&inc);
-<a name="line255">255: </a>      norm = SlepcAbsEigenvalue(norm,tmp);
-<a name="line256">256: </a>    }
-<a name="line257">257: </a><font color="#A020F0">#endif</font>
-<a name="line258">258: </a>    tmp = 1.0 / norm;
-<a name="line259">259: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+i*ld,&inc));
-<a name="line260">260: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line261">261: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+(i+1)*ld,&inc));
-<a name="line262">262: </a><font color="#A020F0">#endif</font>
-<a name="line263">263: </a>    <font color="#4169E1">if</font> (iscomplex) i++;
-<a name="line264">264: </a>  }
-<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
-<a name="line266">266: </a><font color="#A020F0">#endif</font>
-<a name="line267">267: </a>}
-
-<a name="line271">271: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP"></a>PetscErrorCode DSVectors_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *j,PetscReal *rnorm)</font></strong>
-<a name="line272">272: </a>{
-
-<a name="line276">276: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line277">277: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line278">278: </a>      <font color="#4169E1">if</font> (ds->refined) {
-<a name="line279">279: </a>        <font color="#4169E1">if</font> (!ds->extrarow) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Refined vectors require activating the extra row"</font>);
-<a name="line280">280: </a>        <font color="#4169E1">if</font> (j) {
-<a name="line281">281: </a>          DSVectors_NHEP_Refined_Some(ds,j,rnorm,PETSC_FALSE);
-<a name="line282">282: </a>        } <font color="#4169E1">else</font> {
-<a name="line283">283: </a>          DSVectors_NHEP_Refined_All(ds,PETSC_FALSE);
-<a name="line284">284: </a>        }
-<a name="line285">285: </a>      } <font color="#4169E1">else</font> {
-<a name="line286">286: </a>        <font color="#4169E1">if</font> (j) {
-<a name="line287">287: </a>          DSVectors_NHEP_Eigen_Some(ds,j,rnorm,PETSC_FALSE);
-<a name="line288">288: </a>        } <font color="#4169E1">else</font> {
-<a name="line289">289: </a>          DSVectors_NHEP_Eigen_All(ds,PETSC_FALSE);
-<a name="line290">290: </a>        }
-<a name="line291">291: </a>      }
-<a name="line292">292: </a>      <font color="#4169E1">break</font>;
-<a name="line293">293: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line294">294: </a>      <font color="#4169E1">if</font> (ds->refined) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line295">295: </a>      <font color="#4169E1">if</font> (j) {
-<a name="line296">296: </a>        DSVectors_NHEP_Eigen_Some(ds,j,rnorm,PETSC_TRUE);
-<a name="line297">297: </a>      } <font color="#4169E1">else</font> {
-<a name="line298">298: </a>        DSVectors_NHEP_Eigen_All(ds,PETSC_TRUE);
-<a name="line299">299: </a>      }
-<a name="line300">300: </a>      <font color="#4169E1">break</font>;
-<a name="line301">301: </a>    <font color="#4169E1">case</font> DS_MAT_U:
-<a name="line302">302: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
-<a name="line303">303: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line304">304: </a>      <font color="#4169E1">break</font>;
-<a name="line305">305: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line306">306: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line307">307: </a>  }
-<a name="line308">308: </a>  <font color="#4169E1">if</font> (ds->state < DS_STATE_CONDENSED) {
-<a name="line309">309: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_CONDENSED);
-<a name="line310">310: </a>  }
-<a name="line311">311: </a>  <font color="#4169E1">return</font>(0);
-<a name="line312">312: </a>}
-
-<a name="line316">316: </a><strong><font color="#4169E1"><a name="DSNormalize_NHEP"></a>PetscErrorCode DSNormalize_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
-<a name="line317">317: </a>{
-<a name="line319">319: </a>  PetscInt       i,i0,i1;
-<a name="line320">320: </a>  PetscBLASInt   ld,n,one = 1;
-<a name="line321">321: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],norm,*x;
-<a name="line322">322: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line323">323: </a>  PetscScalar    norm0;
-<a name="line324">324: </a><font color="#A020F0">#endif</font>
-
-<a name="line327">327: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line328">328: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line329">329: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line330">330: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
-<a name="line331">331: </a>      <font color="#B22222">/* Supported matrices */</font>
-<a name="line332">332: </a>      <font color="#4169E1">break</font>;
-<a name="line333">333: </a>    <font color="#4169E1">case</font> DS_MAT_U:
-<a name="line334">334: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
-<a name="line335">335: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line336">336: </a>      <font color="#4169E1">break</font>;
-<a name="line337">337: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line338">338: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line339">339: </a>  }
-
-<a name="line341">341: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line342">342: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line343">343: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
-<a name="line344">344: </a>  <font color="#4169E1">if</font> (col < 0) {
-<a name="line345">345: </a>    i0 = 0; i1 = ds->n;
-<a name="line346">346: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (col>0 && A[ds->ld*(col-1)+col] != 0.0) {
-<a name="line347">347: </a>    i0 = col-1; i1 = col+1;
-<a name="line348">348: </a>  } <font color="#4169E1">else</font> {
-<a name="line349">349: </a>    i0 = col; i1 = col+1;
-<a name="line350">350: </a>  }
-<a name="line351">351: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
-<a name="line352">352: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line353">353: </a>    <font color="#4169E1">if</font> (i<n-1 && A[ds->ld*i+i+1] != 0.0) {
-<a name="line354">354: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
-<a name="line355">355: </a>      norm0 = BLASnrm2_(&n,&x[ld*(i+1)],&one);
-<a name="line356">356: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
-<a name="line357">357: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
-<a name="line358">358: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*(i+1)],&one));
-<a name="line359">359: </a>      i++;
-<a name="line360">360: </a>    } <font color="#4169E1">else</font>
-<a name="line361">361: </a><font color="#A020F0">#endif</font>
-<a name="line362">362: </a>    {
-<a name="line363">363: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
-<a name="line364">364: </a>      norm = 1.0/norm;
-<a name="line365">365: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
-<a name="line366">366: </a>    }
-<a name="line367">367: </a>  }
-<a name="line368">368: </a>  <font color="#4169E1">return</font>(0);
-<a name="line369">369: </a>}
-
-<a name="line373">373: </a><strong><font color="#4169E1"><a name="DSSort_NHEP_Arbitrary"></a>PetscErrorCode DSSort_NHEP_Arbitrary(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
-<a name="line374">374: </a>{
-<a name="line375">375: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TRSEN)</font>
-<a name="line377">377: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TRSEN - Lapack routine is unavailable"</font>);
-<a name="line378">378: </a><font color="#A020F0">#else</font>
-<a name="line380">380: </a>  PetscInt       i;
-<a name="line381">381: </a>  PetscBLASInt   info,n,ld,mout,lwork,*selection;
-<a name="line382">382: </a>  PetscScalar    *T = ds->mat[DS_MAT_A],*Q = ds->mat[DS_MAT_Q],*work;
-<a name="line383">383: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line384">384: </a>  PetscBLASInt   *iwork,liwork;
-<a name="line385">385: </a><font color="#A020F0">#endif</font>
-
-<a name="line388">388: </a>  <font color="#4169E1">if</font> (!k) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Must supply argument k"</font>);
-<a name="line389">389: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line390">390: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line391">391: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line392">392: </a>  lwork = n;
-<a name="line393">393: </a>  liwork = 1;
-<a name="line394">394: </a>  DSAllocateWork_Private(ds,lwork,0,liwork+n);
-<a name="line395">395: </a>  work = ds->work;
-<a name="line396">396: </a>  lwork = ds->lwork;
-<a name="line397">397: </a>  selection = ds->iwork;
-<a name="line398">398: </a>  iwork = ds->iwork + n;
-<a name="line399">399: </a>  liwork = ds->liwork - n;
-<a name="line400">400: </a><font color="#A020F0">#else</font>
-<a name="line401">401: </a>  lwork = 1;
-<a name="line402">402: </a>  DSAllocateWork_Private(ds,lwork,0,n);
-<a name="line403">403: </a>  work = ds->work;
-<a name="line404">404: </a>  selection = ds->iwork;
-<a name="line405">405: </a><font color="#A020F0">#endif</font>
-<a name="line406">406: </a>  <font color="#B22222">/* Compute the selected eigenvalue to be in the leading position */</font>
-<a name="line407">407: </a>  DSSortEigenvalues_Private(ds,rr,ri,ds->perm,PETSC_FALSE);
-<a name="line408">408: </a>  PetscMemzero(selection,n*<font color="#4169E1">sizeof</font>(PetscBLASInt));
-<a name="line409">409: </a>  <font color="#4169E1">for</font> (i=0;i<*k;i++) selection[ds->perm[i]] = 1;
-<a name="line410">410: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line411">411: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrsen"</font>,LAPACKtrsen_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,selection,&n,T,&ld,Q,&ld,wr,wi,&mout,NULL,NULL,work,&lwork,iwork,&liwork,&info));
-<a name="line412">412: </a><font color="#A020F0">#else</font>
-<a name="line413">413: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrsen"</font>,LAPACKtrsen_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,selection,&n,T,&ld,Q,&ld,wr,&mout,NULL,NULL,work,&lwork,&info));
-<a name="line414">414: </a><font color="#A020F0">#endif</font>
-<a name="line415">415: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTRSEN %d"</font>,info);
-<a name="line416">416: </a>  *k = mout;
-<a name="line417">417: </a>  <font color="#4169E1">return</font>(0);
-<a name="line418">418: </a><font color="#A020F0">#endif</font>
-<a name="line419">419: </a>}
-
-<a name="line423">423: </a><strong><font color="#4169E1"><a name="DSSort_NHEP_Total"></a>PetscErrorCode DSSort_NHEP_Total(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line424">424: </a>{
-<a name="line425">425: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TREXC)</font>
-<a name="line427">427: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TREXC - Lapack routine is unavailable"</font>);
-<a name="line428">428: </a><font color="#A020F0">#else</font>
-<a name="line430">430: </a>  PetscScalar    re;
-<a name="line431">431: </a>  PetscInt       i,j,pos,result;
-<a name="line432">432: </a>  PetscBLASInt   ifst,ilst,info,n,ld;
-<a name="line433">433: </a>  PetscScalar    *T = ds->mat[DS_MAT_A];
-<a name="line434">434: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
-<a name="line435">435: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line436">436: </a>  PetscScalar    *work,im;
-<a name="line437">437: </a><font color="#A020F0">#endif</font>
-
-<a name="line440">440: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line441">441: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line442">442: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line443">443: </a>  DSAllocateWork_Private(ds,ld,0,0);
-<a name="line444">444: </a>  work = ds->work;
-<a name="line445">445: </a><font color="#A020F0">#endif</font>
-<a name="line446">446: </a>  <font color="#B22222">/* selection sort */</font>
-<a name="line447">447: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n-1;i++) {
-<a name="line448">448: </a>    re = wr[i];
-<a name="line449">449: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line450">450: </a>    im = wi[i];
-<a name="line451">451: </a><font color="#A020F0">#endif</font>
-<a name="line452">452: </a>    pos = 0;
-<a name="line453">453: </a>    j=i+1; <font color="#B22222">/* j points to the next eigenvalue */</font>
-<a name="line454">454: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line455">455: </a>    <font color="#4169E1">if</font> (im != 0) j=i+2;
-<a name="line456">456: </a><font color="#A020F0">#endif</font>
-<a name="line457">457: </a>    <font color="#B22222">/* find minimum eigenvalue */</font>
-<a name="line458">458: </a>    <font color="#4169E1">for</font> (;j<n;j++) {
-<a name="line459">459: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line460">460: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[j],wi[j],&result);
-<a name="line461">461: </a><font color="#A020F0">#else</font>
-<a name="line462">462: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,wr[j],0.0,&result);
-<a name="line463">463: </a><font color="#A020F0">#endif</font>
-<a name="line464">464: </a>      <font color="#4169E1">if</font> (result > 0) {
-<a name="line465">465: </a>        re = wr[j];
-<a name="line466">466: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line467">467: </a>        im = wi[j];
-<a name="line468">468: </a><font color="#A020F0">#endif</font>
-<a name="line469">469: </a>        pos = j;
-<a name="line470">470: </a>      }
-<a name="line471">471: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line472">472: </a>      <font color="#4169E1">if</font> (wi[j] != 0) j++;
-<a name="line473">473: </a><font color="#A020F0">#endif</font>
-<a name="line474">474: </a>    }
-<a name="line475">475: </a>    <font color="#4169E1">if</font> (pos) {
-<a name="line476">476: </a>      <font color="#B22222">/* interchange blocks */</font>
-<a name="line477">477: </a>      PetscBLASIntCast(pos+1,&ifst);
-<a name="line478">478: </a>      PetscBLASIntCast(i+1,&ilst);
-<a name="line479">479: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line480">480: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtrexc"</font>,LAPACKtrexc_(<font color="#666666">"V"</font>,&n,T,&ld,Q,&ld,&ifst,&ilst,work,&info));
-<a name="line481">481: </a><font color="#A020F0">#else</font>
-<a name="line482">482: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtrexc"</font>,LAPACKtrexc_(<font color="#666666">"V"</font>,&n,T,&ld,Q,&ld,&ifst,&ilst,&info));
-<a name="line483">483: </a><font color="#A020F0">#endif</font>
-<a name="line484">484: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTREXC %d"</font>,info);
-<a name="line485">485: </a>      <font color="#B22222">/* recover original eigenvalues from T matrix */</font>
-<a name="line486">486: </a>      <font color="#4169E1">for</font> (j=i;j<n;j++) {
-<a name="line487">487: </a>        wr[j] = T[j+j*ld];
-<a name="line488">488: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line489">489: </a>        <font color="#4169E1">if</font> (j<n-1 && T[j+1+j*ld] != 0.0) {
-<a name="line490">490: </a>          <font color="#B22222">/* complex conjugate eigenvalue */</font>
-<a name="line491">491: </a>          wi[j] = PetscSqrtReal(PetscAbsReal(T[j+1+j*ld])) *
-<a name="line492">492: </a>                  PetscSqrtReal(PetscAbsReal(T[j+(j+1)*ld]));
-<a name="line493">493: </a>          wr[j+1] = wr[j];
-<a name="line494">494: </a>          wi[j+1] = -wi[j];
-<a name="line495">495: </a>          j++;
-<a name="line496">496: </a>        } <font color="#4169E1">else</font> {
-<a name="line497">497: </a>          wi[j] = 0.0;
-<a name="line498">498: </a>        }
-<a name="line499">499: </a><font color="#A020F0">#endif</font>
-<a name="line500">500: </a>      }
-<a name="line501">501: </a>    }
-<a name="line502">502: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line503">503: </a>    <font color="#4169E1">if</font> (wi[i] != 0) i++;
-<a name="line504">504: </a><font color="#A020F0">#endif</font>
-<a name="line505">505: </a>  }
-<a name="line506">506: </a>  <font color="#4169E1">return</font>(0);
-<a name="line507">507: </a><font color="#A020F0">#endif</font>
-<a name="line508">508: </a>}
-
-<a name="line512">512: </a><strong><font color="#4169E1"><a name="DSSort_NHEP"></a>PetscErrorCode DSSort_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
-<a name="line513">513: </a>{
-
-<a name="line517">517: </a>  <font color="#4169E1">if</font> (!rr || wr == rr) {
-<a name="line518">518: </a>    DSSort_NHEP_Total(ds,wr,wi);
-<a name="line519">519: </a>  } <font color="#4169E1">else</font> {
-<a name="line520">520: </a>    DSSort_NHEP_Arbitrary(ds,wr,wi,rr,ri,k);
-<a name="line521">521: </a>  }
-<a name="line522">522: </a>  <font color="#4169E1">return</font>(0);
-<a name="line523">523: </a>}
-
-<a name="line527">527: </a><strong><font color="#4169E1"><a name="DSUpdateExtraRow_NHEP"></a>PetscErrorCode DSUpdateExtraRow_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line528">528: </a>{
-<a name="line530">530: </a>  PetscInt       i;
-<a name="line531">531: </a>  PetscBLASInt   n,ld,incx=1;
-<a name="line532">532: </a>  PetscScalar    *A,*Q,*x,*y,one=1.0,zero=0.0;
-
-<a name="line535">535: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line536">536: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line537">537: </a>  A  = ds->mat[DS_MAT_A];
-<a name="line538">538: </a>  Q  = ds->mat[DS_MAT_Q];
-<a name="line539">539: </a>  DSAllocateWork_Private(ds,2*ld,0,0);
-<a name="line540">540: </a>  x = ds->work;
-<a name="line541">541: </a>  y = ds->work+ld;
-<a name="line542">542: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) x[i] = PetscConj(A[n+i*ld]);
-<a name="line543">543: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&n,&one,Q,&ld,x,&incx,&zero,y,&incx));
-<a name="line544">544: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[n+i*ld] = PetscConj(y[i]);
-<a name="line545">545: </a>  ds->k = n;
-<a name="line546">546: </a>  <font color="#4169E1">return</font>(0);
-<a name="line547">547: </a>}
-
-<a name="line551">551: </a><strong><font color="#4169E1"><a name="DSSolve_NHEP"></a>PetscErrorCode DSSolve_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line552">552: </a>{
-<a name="line553">553: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GEHRD) || defined(SLEPC_MISSING_LAPACK_ORGHR) || defined(PETSC_MISSING_LAPACK_HSEQR)</font>
-<a name="line555">555: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEHRD/ORGHR/HSEQR - Lapack routines are unavailable"</font>);
-<a name="line556">556: </a><font color="#A020F0">#else</font>
-<a name="line558">558: </a>  PetscScalar    *work,*tau;
-<a name="line559">559: </a>  PetscInt       i,j;
-<a name="line560">560: </a>  PetscBLASInt   ilo,lwork,info,n,ld;
-<a name="line561">561: </a>  PetscScalar    *A = ds->mat[DS_MAT_A];
-<a name="line562">562: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
-
-<a name="line565">565: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line567">567: </a><font color="#A020F0">#endif</font>
-<a name="line568">568: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line569">569: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line570">570: </a>  PetscBLASIntCast(ds->l+1,&ilo);
-<a name="line571">571: </a>  DSAllocateWork_Private(ds,ld+ld*ld,0,0);
-<a name="line572">572: </a>  tau  = ds->work;
-<a name="line573">573: </a>  work = ds->work+ld;
-<a name="line574">574: </a>  lwork = ld*ld;
-
-<a name="line576">576: </a>  <font color="#B22222">/* initialize orthogonal matrix */</font>
-<a name="line577">577: </a>  PetscMemzero(Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line578">578: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++)
-<a name="line579">579: </a>    Q[i+i*ld] = 1.0;
-<a name="line580">580: </a>  <font color="#4169E1">if</font> (n==1) { <font color="#B22222">/* quick return */</font>
-<a name="line581">581: </a>    wr[0] = A[0];
-<a name="line582">582: </a>    wi[0] = 0.0;
-<a name="line583">583: </a>    <font color="#4169E1">return</font>(0);
-<a name="line584">584: </a>  }
-
-<a name="line586">586: </a>  <font color="#B22222">/* reduce to upper Hessenberg form */</font>
-<a name="line587">587: </a>  <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) {
-<a name="line588">588: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgehrd"</font>,LAPACKgehrd_(&n,&ilo,&n,A,&ld,tau,work,&lwork,&info));
-<a name="line589">589: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEHRD %d"</font>,info);
-<a name="line590">590: </a>    <font color="#4169E1">for</font> (j=0;j<n-1;j++) {
-<a name="line591">591: </a>      <font color="#4169E1">for</font> (i=j+2;i<n;i++) {
-<a name="line592">592: </a>        Q[i+j*ld] = A[i+j*ld];
-<a name="line593">593: </a>        A[i+j*ld] = 0.0;
-<a name="line594">594: </a>      }
-<a name="line595">595: </a>    }
-<a name="line596">596: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKorghr"</font>,LAPACKorghr_(&n,&ilo,&n,Q,&ld,tau,work,&lwork,&info));
-<a name="line597">597: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGHR %d"</font>,info);
-<a name="line598">598: </a>  }
-
-<a name="line600">600: </a>  <font color="#B22222">/* compute the (real) Schur form */</font>
-<a name="line601">601: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line602">602: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"S"</font>,<font color="#666666">"V"</font>,&n,&ilo,&n,A,&ld,wr,wi,Q,&ld,work,&lwork,&info));
-<a name="line603">603: </a>  <font color="#4169E1">for</font> (j=0;j<ds->l;j++) {
-<a name="line604">604: </a>    <font color="#4169E1">if</font> (j==n-1 || A[j+1+j*ld] == 0.0) {
-<a name="line605">605: </a>      <font color="#B22222">/* real eigenvalue */</font>
-<a name="line606">606: </a>      wr[j] = A[j+j*ld];
-<a name="line607">607: </a>      wi[j] = 0.0;
-<a name="line608">608: </a>    } <font color="#4169E1">else</font> {
-<a name="line609">609: </a>      <font color="#B22222">/* complex eigenvalue */</font>
-<a name="line610">610: </a>      wr[j] = A[j+j*ld];
-<a name="line611">611: </a>      wr[j+1] = A[j+j*ld];
-<a name="line612">612: </a>      wi[j] = PetscSqrtReal(PetscAbsReal(A[j+1+j*ld])) *
-<a name="line613">613: </a>              PetscSqrtReal(PetscAbsReal(A[j+(j+1)*ld]));
-<a name="line614">614: </a>      wi[j+1] = -wi[j];
-<a name="line615">615: </a>      j++;
-<a name="line616">616: </a>    }
-<a name="line617">617: </a>  }
-<a name="line618">618: </a><font color="#A020F0">#else</font>
-<a name="line619">619: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"S"</font>,<font color="#666666">"V"</font>,&n,&ilo,&n,A,&ld,wr,Q,&ld,work,&lwork,&info));
-<a name="line620">620: </a>  <font color="#4169E1">if</font> (wi) <font color="#4169E1">for</font> (i=ds->l;i<n;i++) wi[i] = 0.0;
-<a name="line621">621: </a><font color="#A020F0">#endif</font>
-<a name="line622">622: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xHSEQR %d"</font>,info);
-<a name="line623">623: </a>  <font color="#4169E1">return</font>(0);
-<a name="line624">624: </a><font color="#A020F0">#endif</font>
-<a name="line625">625: </a>}
-
-<a name="line629">629: </a><strong><font color="#4169E1"><a name="DSTruncate_NHEP"></a>PetscErrorCode DSTruncate_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt n)</font></strong>
-<a name="line630">630: </a>{
-<a name="line631">631: </a>  PetscInt       i,newn,ld=ds->ld,l=ds->l;
-<a name="line632">632: </a>  PetscScalar    *A;
-
-<a name="line635">635: </a>  <font color="#4169E1">if</font> (ds->state==DS_STATE_CONDENSED) ds->t = ds->n;
-<a name="line636">636: </a>  A = ds->mat[DS_MAT_A];
-<a name="line637">637: </a>  <font color="#B22222">/* be careful not to break a diagonal 2x2 block */</font>
-<a name="line638">638: </a>  <font color="#4169E1">if</font> (A[n+(n-1)*ld]==0.0) newn = n;
-<a name="line639">639: </a>  <font color="#4169E1">else</font> {
-<a name="line640">640: </a>    <font color="#4169E1">if</font> (n<ds->n-1) newn = n+1;
-<a name="line641">641: </a>    <font color="#4169E1">else</font> newn = n-1;
-<a name="line642">642: </a>  }
-<a name="line643">643: </a>  <font color="#4169E1">if</font> (ds->extrarow && ds->k==ds->n) {
-<a name="line644">644: </a>    <font color="#B22222">/* copy entries of extra row to the new position, then clean last row */</font>
-<a name="line645">645: </a>    <font color="#4169E1">for</font> (i=l;i<newn;i++) A[newn+i*ld] = A[ds->n+i*ld];
-<a name="line646">646: </a>    <font color="#4169E1">for</font> (i=l;i<ds->n;i++) A[ds->n+i*ld] = 0.0;
-<a name="line647">647: </a>  }
-<a name="line648">648: </a>  ds->k = 0;
-<a name="line649">649: </a>  ds->n = newn;
-<a name="line650">650: </a>  <font color="#4169E1">return</font>(0);
-<a name="line651">651: </a>}
-
-<a name="line655">655: </a><strong><font color="#4169E1"><a name="DSCond_NHEP"></a>PetscErrorCode DSCond_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscReal *cond)</font></strong>
-<a name="line656">656: </a>{
-<a name="line657">657: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(SLEPC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE) || defined(SLEPC_MISSING_LAPACK_LANHS)</font>
-<a name="line659">659: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRF/GETRI/LANGE/LANHS - Lapack routines are unavailable"</font>);
-<a name="line660">660: </a><font color="#A020F0">#else</font>
-<a name="line662">662: </a>  PetscScalar    *work;
-<a name="line663">663: </a>  PetscReal      *rwork;
-<a name="line664">664: </a>  PetscBLASInt   *ipiv;
-<a name="line665">665: </a>  PetscBLASInt   lwork,info,n,ld;
-<a name="line666">666: </a>  PetscReal      hn,hin;
-<a name="line667">667: </a>  PetscScalar    *A;
-
-<a name="line670">670: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line671">671: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line672">672: </a>  lwork = 8*ld;
-<a name="line673">673: </a>  DSAllocateWork_Private(ds,lwork,ld,ld);
-<a name="line674">674: </a>  work  = ds->work;
-<a name="line675">675: </a>  rwork = ds->rwork;
-<a name="line676">676: </a>  ipiv  = ds->iwork;
-
-<a name="line678">678: </a>  <font color="#B22222">/* use workspace matrix W to avoid overwriting A */</font>
-<a name="line679">679: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
-<a name="line680">680: </a>  A = ds->mat[DS_MAT_W];
-<a name="line681">681: </a>  PetscMemcpy(A,ds->mat[DS_MAT_A],<font color="#4169E1">sizeof</font>(PetscScalar)*ds->ld*ds->ld);
-
-<a name="line683">683: </a>  <font color="#B22222">/* norm of A */</font>
-<a name="line684">684: </a>  <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) hn = LAPACKlange_(<font color="#666666">"I"</font>,&n,&n,A,&ld,rwork);
-<a name="line685">685: </a>  <font color="#4169E1">else</font> hn = LAPACKlanhs_(<font color="#666666">"I"</font>,&n,A,&ld,rwork);
-
-<a name="line687">687: </a>  <font color="#B22222">/* norm of inv(A) */</font>
-<a name="line688">688: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&n,&n,A,&ld,ipiv,&info));
-<a name="line689">689: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGETRF %d"</font>,info);
-<a name="line690">690: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&n,A,&ld,ipiv,work,&lwork,&info));
-<a name="line691">691: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGETRI %d"</font>,info);
-<a name="line692">692: </a>  hin = LAPACKlange_(<font color="#666666">"I"</font>,&n,&n,A,&ld,rwork);
-
-<a name="line694">694: </a>  *cond = hn*hin;
-<a name="line695">695: </a>  <font color="#4169E1">return</font>(0);
-<a name="line696">696: </a><font color="#A020F0">#endif</font>
-<a name="line697">697: </a>}
-
-<a name="line701">701: </a><strong><font color="#4169E1"><a name="DSTranslateHarmonic_NHEP"></a>PetscErrorCode DSTranslateHarmonic_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar tau,PetscReal beta,PetscBool recover,PetscScalar *gin,PetscReal *gamma)</font></strong>
-<a name="line702">702: </a>{
-<a name="line703">703: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRS)</font>
-<a name="line705">705: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRF/GETRS - Lapack routines are unavailable"</font>);
-<a name="line706">706: </a><font color="#A020F0">#else</font>
-<a name="line708">708: </a>  PetscInt       i,j;
-<a name="line709">709: </a>  PetscBLASInt   *ipiv,info,n,ld,one=1,ncol;
-<a name="line710">710: </a>  PetscScalar    *A,*B,*Q,*g=gin,*ghat;
-<a name="line711">711: </a>  PetscScalar    done=1.0,dmone=-1.0,dzero=0.0;
-<a name="line712">712: </a>  PetscReal      gnorm;
-
-<a name="line715">715: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line716">716: </a>  PetscBLASIntCast(ds->ld,&ld);
-<a name="line717">717: </a>  A  = ds->mat[DS_MAT_A];
-
-<a name="line719">719: </a>  <font color="#4169E1">if</font> (!recover) {
-
-<a name="line721">721: </a>    DSAllocateWork_Private(ds,0,0,ld);
-<a name="line722">722: </a>    ipiv = ds->iwork;
-<a name="line723">723: </a>    <font color="#4169E1">if</font> (!g) {
-<a name="line724">724: </a>      DSAllocateWork_Private(ds,ld,0,0);
-<a name="line725">725: </a>      g = ds->work;
-<a name="line726">726: </a>    }
-<a name="line727">727: </a>    <font color="#B22222">/* use workspace matrix W to factor A-tau*eye(n) */</font>
-<a name="line728">728: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
-<a name="line729">729: </a>    B = ds->mat[DS_MAT_W];
-<a name="line730">730: </a>    PetscMemcpy(B,A,<font color="#4169E1">sizeof</font>(PetscScalar)*ld*ld);
-
-<a name="line732">732: </a>    <font color="#B22222">/* Vector g initialy stores b = beta*e_n^T */</font>
-<a name="line733">733: </a>    PetscMemzero(g,n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line734">734: </a>    g[n-1] = beta;
-
-<a name="line736">736: </a>    <font color="#B22222">/* g = (A-tau*eye(n))'\b */</font>
-<a name="line737">737: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
-<a name="line738">738: </a>      B[i+i*ld] -= tau;
-<a name="line739">739: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&n,&n,B,&ld,ipiv,&info));
-<a name="line740">740: </a>    <font color="#4169E1">if</font> (info<0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Bad argument to LU factorization"</font>);
-<a name="line741">741: </a>    <font color="#4169E1">if</font> (info>0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_MAT_LU_ZRPVT,<font color="#666666">"Bad LU factorization"</font>);
-<a name="line742">742: </a>    PetscLogFlops(2.0*n*n*n/3.0);
-<a name="line743">743: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"C"</font>,&n,&one,B,&ld,ipiv,g,&ld,&info));
-<a name="line744">744: </a>    <font color="#4169E1">if</font> (info) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"GETRS - Bad solve"</font>);
-<a name="line745">745: </a>    PetscLogFlops(2.0*n*n-n);
-
-<a name="line747">747: </a>    <font color="#B22222">/* A = A + g*b' */</font>
-<a name="line748">748: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
-<a name="line749">749: </a>      A[i+(n-1)*ld] += g[i]*beta;
-
-<a name="line751">751: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* recover */</font>
-
-<a name="line754">754: </a>    DSAllocateWork_Private(ds,ld,0,0);
-<a name="line755">755: </a>    ghat = ds->work;
-<a name="line756">756: </a>    Q    = ds->mat[DS_MAT_Q];
-
-<a name="line758">758: </a>    <font color="#B22222">/* g^ = -Q(:,idx)'*g */</font>
-<a name="line759">759: </a>    PetscBLASIntCast(ds->l+ds->k,&ncol);
-<a name="line760">760: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&ncol,&dmone,Q,&ld,g,&one,&dzero,ghat,&one));
-
-<a name="line762">762: </a>    <font color="#B22222">/* A = A + g^*b' */</font>
-<a name="line763">763: </a>    <font color="#4169E1">for</font> (i=0;i<ds->l+ds->k;i++)
-<a name="line764">764: </a>      <font color="#4169E1">for</font> (j=ds->l;j<ds->l+ds->k;j++)
-<a name="line765">765: </a>        A[i+j*ld] += ghat[i]*Q[n-1+j*ld]*beta;
-
-<a name="line767">767: </a>    <font color="#B22222">/* g~ = (I-Q(:,idx)*Q(:,idx)')*g = g+Q(:,idx)*g^ */</font>
-<a name="line768">768: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&ncol,&done,Q,&ld,ghat,&one,&done,g,&one));
-<a name="line769">769: </a>  }
-
-<a name="line771">771: </a>  <font color="#B22222">/* Compute gamma factor */</font>
-<a name="line772">772: </a>  <font color="#4169E1">if</font> (gamma) {
-<a name="line773">773: </a>    gnorm = 0.0;
-<a name="line774">774: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
-<a name="line775">775: </a>      gnorm = gnorm + PetscRealPart(g[i]*PetscConj(g[i]));
-<a name="line776">776: </a>    *gamma = PetscSqrtReal(1.0+gnorm);
-<a name="line777">777: </a>  }
-<a name="line778">778: </a>  <font color="#4169E1">return</font>(0);
-<a name="line779">779: </a><font color="#A020F0">#endif</font>
-<a name="line780">780: </a>}
-
-<a name="line784">784: </a><strong><font color="#4169E1"><a name="DSCreate_NHEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line785">785: </a>{
-<a name="line787">787: </a>  ds->ops->allocate      = DSAllocate_NHEP;
-<a name="line788">788: </a>  ds->ops->view          = DSView_NHEP;
-<a name="line789">789: </a>  ds->ops->vectors       = DSVectors_NHEP;
-<a name="line790">790: </a>  ds->ops->solve[0]      = DSSolve_NHEP;
-<a name="line791">791: </a>  ds->ops->sort          = DSSort_NHEP;
-<a name="line792">792: </a>  ds->ops->truncate      = DSTruncate_NHEP;
-<a name="line793">793: </a>  ds->ops->update        = DSUpdateExtraRow_NHEP;
-<a name="line794">794: </a>  ds->ops->cond          = DSCond_NHEP;
-<a name="line795">795: </a>  ds->ops->transharm     = DSTranslateHarmonic_NHEP;
-<a name="line796">796: </a>  ds->ops->normalize     = DSNormalize_NHEP;
-<a name="line797">797: </a>  <font color="#4169E1">return</font>(0);
-<a name="line798">798: </a>}
+<a name="line145">145: </a>  PetscScalar    *A = ds->mat[DS_MAT_A];
+<a name="line146">146: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
+<a name="line147">147: </a>  PetscScalar    *X = ds->mat[left?DS_MAT_Y:DS_MAT_X];
+<a name="line148">148: </a>  PetscScalar    *Y;
+
+<a name="line151">151: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line152">152: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line153">153: </a>  DSAllocateWork_Private(ds,0,0,ld);
+<a name="line154">154: </a>  select = ds->iwork;
+<a name="line155">155: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) select[i] = (PetscBLASInt)PETSC_FALSE;
+
+<a name="line157">157: </a>  <font color="#B22222">/* compute k-th eigenvector Y of A */</font>
+<a name="line158">158: </a>  Y = X+(*k)*ld;
+<a name="line159">159: </a>  select[*k] = (PetscBLASInt)PETSC_TRUE;
+<a name="line160">160: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line161">161: </a>  <font color="#4169E1">if</font> ((*k)<n-1 && A[(*k)+1+(*k)*ld]!=0.0) iscomplex = PETSC_TRUE;
+<a name="line162">162: </a>  mm = iscomplex? 2: 1;
+<a name="line163">163: </a>  <font color="#4169E1">if</font> (iscomplex) select[(*k)+1] = (PetscBLASInt)PETSC_TRUE;
+<a name="line164">164: </a>  DSAllocateWork_Private(ds,3*ld,0,0);
+<a name="line165">165: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(left?<font color="#666666">"L"</font>:<font color="#666666">"R"</font>,<font color="#666666">"S"</font>,select,&n,A,&ld,Y,&ld,Y,&ld,&mm,&mout,ds->work,&info));
+<a name="line166">166: </a><font color="#A020F0">#else</font>
+<a name="line167">167: </a>  DSAllocateWork_Private(ds,2*ld,ld,0);
+<a name="line168">168: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(left?<font color="#666666">"L"</font>:<font color="#666666">"R"</font>,<font color="#666666">"S"</font>,select,&n,A,&ld,Y,&ld,Y,&ld,&mm,&mout,ds->work,ds->rwork,&info));
+<a name="line169">169: </a><font color="#A020F0">#endif</font>
+<a name="line170">170: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTREVC %d"</font>,info);
+<a name="line171">171: </a>  <font color="#4169E1">if</font> (mout != mm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Inconsistent arguments"</font>);
+
+<a name="line173">173: </a>  <font color="#B22222">/* accumulate and normalize eigenvectors */</font>
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
+<a name="line175">175: </a>    PetscMemcpy(ds->work,Y,mout*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line176">176: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&done,Q,&ld,ds->work,&inc,&zero,Y,&inc));
+<a name="line177">177: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line178">178: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&n,&done,Q,&ld,ds->work+ld,&inc,&zero,Y+ld,&inc));
+<a name="line179">179: </a><font color="#A020F0">#endif</font>
+<a name="line180">180: </a>    norm = BLASnrm2_(&n,Y,&inc);
+<a name="line181">181: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line182">182: </a>    <font color="#4169E1">if</font> (iscomplex) {
+<a name="line183">183: </a>      tmp = BLASnrm2_(&n,Y+ld,&inc);
+<a name="line184">184: </a>      norm = SlepcAbsEigenvalue(norm,tmp);
+<a name="line185">185: </a>    }
+<a name="line186">186: </a><font color="#A020F0">#endif</font>
+<a name="line187">187: </a>    tmp = 1.0 / norm;
+<a name="line188">188: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Y,&inc));
+<a name="line189">189: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line190">190: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Y+ld,&inc));
+<a name="line191">191: </a><font color="#A020F0">#endif</font>
+<a name="line192">192: </a>  }
+
+<a name="line194">194: </a>  <font color="#B22222">/* set output arguments */</font>
+<a name="line195">195: </a>  <font color="#4169E1">if</font> (iscomplex) (*k)++;
+<a name="line196">196: </a>  <font color="#4169E1">if</font> (rnorm) {
+<a name="line197">197: </a>    <font color="#4169E1">if</font> (iscomplex) *rnorm = SlepcAbsEigenvalue(Y[n-1],Y[n-1+ld]);
+<a name="line198">198: </a>    <font color="#4169E1">else</font> *rnorm = PetscAbsScalar(Y[n-1]);
+<a name="line199">199: </a>  }
+<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
+<a name="line201">201: </a><font color="#A020F0">#endif</font>
+<a name="line202">202: </a>}
+
+<a name="line206">206: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP_Eigen_All"></a>static PetscErrorCode DSVectors_NHEP_Eigen_All(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool left)</font></strong>
+<a name="line207">207: </a>{
+<a name="line208">208: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TREVC)</font>
+<a name="line210">210: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TREVC - Lapack routine is unavailable"</font>);
+<a name="line211">211: </a><font color="#A020F0">#else</font>
+<a name="line213">213: </a>  PetscInt       i;
+<a name="line214">214: </a>  PetscBLASInt   n,ld,mout,info,inc = 1;
+<a name="line215">215: </a>  PetscBool      iscomplex = PETSC_FALSE;
+<a name="line216">216: </a>  PetscScalar    *X,*Y,*Z,*A = ds->mat[DS_MAT_A],tmp;
+<a name="line217">217: </a>  PetscReal      norm;
+<a name="line218">218: </a>  const char     *side,*back;
+
+<a name="line221">221: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line222">222: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line223">223: </a>  <font color="#4169E1">if</font> (left) {
+<a name="line224">224: </a>    X = NULL;
+<a name="line225">225: </a>    Y = ds->mat[DS_MAT_Y];
+<a name="line226">226: </a>    side = <font color="#666666">"L"</font>;
+<a name="line227">227: </a>  } <font color="#4169E1">else</font> {
+<a name="line228">228: </a>    X = ds->mat[DS_MAT_X];
+<a name="line229">229: </a>    Y = NULL;
+<a name="line230">230: </a>    side = <font color="#666666">"R"</font>;
+<a name="line231">231: </a>  }
+<a name="line232">232: </a>  Z = left? Y: X;
+<a name="line233">233: </a>  <font color="#4169E1">if</font> (ds->state>=DS_STATE_CONDENSED) {
+<a name="line234">234: </a>    <font color="#B22222">/* <a href="../../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>() has been called, backtransform with matrix Q */</font>
+<a name="line235">235: </a>    back = <font color="#666666">"B"</font>;
+<a name="line236">236: </a>    PetscMemcpy(Z,ds->mat[DS_MAT_Q],ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line237">237: </a>  } <font color="#4169E1">else</font> back = <font color="#666666">"A"</font>;
+<a name="line238">238: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line239">239: </a>  DSAllocateWork_Private(ds,3*ld,0,0);
+<a name="line240">240: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(side,back,NULL,&n,A,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,&info));
+<a name="line241">241: </a><font color="#A020F0">#else</font>
+<a name="line242">242: </a>  DSAllocateWork_Private(ds,2*ld,ld,0);
+<a name="line243">243: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrevc"</font>,LAPACKtrevc_(side,back,NULL,&n,A,&ld,Y,&ld,X,&ld,&n,&mout,ds->work,ds->rwork,&info));
+<a name="line244">244: </a><font color="#A020F0">#endif</font>
+<a name="line245">245: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTREVC %i"</font>,info);
+
+<a name="line247">247: </a>  <font color="#B22222">/* normalize eigenvectors */</font>
+<a name="line248">248: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line249">249: </a>    <font color="#4169E1">if</font> (i<n-1 && A[i+1+i*ld]!=0.0) iscomplex = PETSC_TRUE;
+<a name="line250">250: </a>    norm = BLASnrm2_(&n,Z+i*ld,&inc);
+<a name="line251">251: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line252">252: </a>    <font color="#4169E1">if</font> (iscomplex) {
+<a name="line253">253: </a>      tmp = BLASnrm2_(&n,Z+(i+1)*ld,&inc);
+<a name="line254">254: </a>      norm = SlepcAbsEigenvalue(norm,tmp);
+<a name="line255">255: </a>    }
+<a name="line256">256: </a><font color="#A020F0">#endif</font>
+<a name="line257">257: </a>    tmp = 1.0 / norm;
+<a name="line258">258: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+i*ld,&inc));
+<a name="line259">259: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line260">260: </a>    <font color="#4169E1">if</font> (iscomplex) PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&tmp,Z+(i+1)*ld,&inc));
+<a name="line261">261: </a><font color="#A020F0">#endif</font>
+<a name="line262">262: </a>    <font color="#4169E1">if</font> (iscomplex) i++;
+<a name="line263">263: </a>  }
+<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
+<a name="line265">265: </a><font color="#A020F0">#endif</font>
+<a name="line266">266: </a>}
+
+<a name="line270">270: </a><strong><font color="#4169E1"><a name="DSVectors_NHEP"></a>PetscErrorCode DSVectors_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *j,PetscReal *rnorm)</font></strong>
+<a name="line271">271: </a>{
+
+<a name="line275">275: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line276">276: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line277">277: </a>      <font color="#4169E1">if</font> (ds->refined) {
+<a name="line278">278: </a>        <font color="#4169E1">if</font> (!ds->extrarow) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Refined vectors require activating the extra row"</font>);
+<a name="line279">279: </a>        <font color="#4169E1">if</font> (j) {
+<a name="line280">280: </a>          DSVectors_NHEP_Refined_Some(ds,j,rnorm,PETSC_FALSE);
+<a name="line281">281: </a>        } <font color="#4169E1">else</font> {
+<a name="line282">282: </a>          DSVectors_NHEP_Refined_All(ds,PETSC_FALSE);
+<a name="line283">283: </a>        }
+<a name="line284">284: </a>      } <font color="#4169E1">else</font> {
+<a name="line285">285: </a>        <font color="#4169E1">if</font> (j) {
+<a name="line286">286: </a>          DSVectors_NHEP_Eigen_Some(ds,j,rnorm,PETSC_FALSE);
+<a name="line287">287: </a>        } <font color="#4169E1">else</font> {
+<a name="line288">288: </a>          DSVectors_NHEP_Eigen_All(ds,PETSC_FALSE);
+<a name="line289">289: </a>        }
+<a name="line290">290: </a>      }
+<a name="line291">291: </a>      <font color="#4169E1">break</font>;
+<a name="line292">292: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line293">293: </a>      <font color="#4169E1">if</font> (ds->refined) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line294">294: </a>      <font color="#4169E1">if</font> (j) {
+<a name="line295">295: </a>        DSVectors_NHEP_Eigen_Some(ds,j,rnorm,PETSC_TRUE);
+<a name="line296">296: </a>      } <font color="#4169E1">else</font> {
+<a name="line297">297: </a>        DSVectors_NHEP_Eigen_All(ds,PETSC_TRUE);
+<a name="line298">298: </a>      }
+<a name="line299">299: </a>      <font color="#4169E1">break</font>;
+<a name="line300">300: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line301">301: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line302">302: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line303">303: </a>      <font color="#4169E1">break</font>;
+<a name="line304">304: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line305">305: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line306">306: </a>  }
+<a name="line307">307: </a>  <font color="#4169E1">if</font> (ds->state < DS_STATE_CONDENSED) {
+<a name="line308">308: </a>    <a href="../../../../../../docs/manualpages/DS/DSSetState.html#DSSetState">DSSetState</a>(ds,DS_STATE_CONDENSED);
+<a name="line309">309: </a>  }
+<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
+<a name="line311">311: </a>}
+
+<a name="line315">315: </a><strong><font color="#4169E1"><a name="DSNormalize_NHEP"></a>PetscErrorCode DSNormalize_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt col)</font></strong>
+<a name="line316">316: </a>{
+<a name="line318">318: </a>  PetscInt       i,i0,i1;
+<a name="line319">319: </a>  PetscBLASInt   ld,n,one = 1;
+<a name="line320">320: </a>  PetscScalar    *A = ds->mat[DS_MAT_A],norm,*x;
+<a name="line321">321: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line322">322: </a>  PetscScalar    norm0;
+<a name="line323">323: </a><font color="#A020F0">#endif</font>
+
+<a name="line326">326: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line327">327: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line328">328: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line329">329: </a>    <font color="#4169E1">case</font> DS_MAT_Q:
+<a name="line330">330: </a>      <font color="#B22222">/* Supported matrices */</font>
+<a name="line331">331: </a>      <font color="#4169E1">break</font>;
+<a name="line332">332: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line333">333: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line334">334: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line335">335: </a>      <font color="#4169E1">break</font>;
+<a name="line336">336: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line337">337: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line338">338: </a>  }
+
+<a name="line340">340: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line341">341: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line342">342: </a>  <a href="../../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
+<a name="line343">343: </a>  <font color="#4169E1">if</font> (col < 0) {
+<a name="line344">344: </a>    i0 = 0; i1 = ds->n;
+<a name="line345">345: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (col>0 && A[ds->ld*(col-1)+col] != 0.0) {
+<a name="line346">346: </a>    i0 = col-1; i1 = col+1;
+<a name="line347">347: </a>  } <font color="#4169E1">else</font> {
+<a name="line348">348: </a>    i0 = col; i1 = col+1;
+<a name="line349">349: </a>  }
+<a name="line350">350: </a>  <font color="#4169E1">for</font> (i=i0;i<i1;i++) {
+<a name="line351">351: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line352">352: </a>    <font color="#4169E1">if</font> (i<n-1 && A[ds->ld*i+i+1] != 0.0) {
+<a name="line353">353: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
+<a name="line354">354: </a>      norm0 = BLASnrm2_(&n,&x[ld*(i+1)],&one);
+<a name="line355">355: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
+<a name="line356">356: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
+<a name="line357">357: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*(i+1)],&one));
+<a name="line358">358: </a>      i++;
+<a name="line359">359: </a>    } <font color="#4169E1">else</font>
+<a name="line360">360: </a><font color="#A020F0">#endif</font>
+<a name="line361">361: </a>    {
+<a name="line362">362: </a>      norm = BLASnrm2_(&n,&x[ld*i],&one);
+<a name="line363">363: </a>      norm = 1.0/norm;
+<a name="line364">364: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,&x[ld*i],&one));
+<a name="line365">365: </a>    }
+<a name="line366">366: </a>  }
+<a name="line367">367: </a>  <font color="#4169E1">return</font>(0);
+<a name="line368">368: </a>}
+
+<a name="line372">372: </a><strong><font color="#4169E1"><a name="DSSort_NHEP_Arbitrary"></a>static PetscErrorCode DSSort_NHEP_Arbitrary(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line373">373: </a>{
+<a name="line374">374: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_TRSEN)</font>
+<a name="line376">376: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TRSEN - Lapack routine is unavailable"</font>);
+<a name="line377">377: </a><font color="#A020F0">#else</font>
+<a name="line379">379: </a>  PetscInt       i;
+<a name="line380">380: </a>  PetscBLASInt   info,n,ld,mout,lwork,*selection;
+<a name="line381">381: </a>  PetscScalar    *T = ds->mat[DS_MAT_A],*Q = ds->mat[DS_MAT_Q],*work;
+<a name="line382">382: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line383">383: </a>  PetscBLASInt   *iwork,liwork;
+<a name="line384">384: </a><font color="#A020F0">#endif</font>
+
+<a name="line387">387: </a>  <font color="#4169E1">if</font> (!k) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,<font color="#666666">"Must supply argument k"</font>);
+<a name="line388">388: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line389">389: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line390">390: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line391">391: </a>  lwork = n;
+<a name="line392">392: </a>  liwork = 1;
+<a name="line393">393: </a>  DSAllocateWork_Private(ds,lwork,0,liwork+n);
+<a name="line394">394: </a>  work = ds->work;
+<a name="line395">395: </a>  lwork = ds->lwork;
+<a name="line396">396: </a>  selection = ds->iwork;
+<a name="line397">397: </a>  iwork = ds->iwork + n;
+<a name="line398">398: </a>  liwork = ds->liwork - n;
+<a name="line399">399: </a><font color="#A020F0">#else</font>
+<a name="line400">400: </a>  lwork = 1;
+<a name="line401">401: </a>  DSAllocateWork_Private(ds,lwork,0,n);
+<a name="line402">402: </a>  work = ds->work;
+<a name="line403">403: </a>  selection = ds->iwork;
+<a name="line404">404: </a><font color="#A020F0">#endif</font>
+<a name="line405">405: </a>  <font color="#B22222">/* Compute the selected eigenvalue to be in the leading position */</font>
+<a name="line406">406: </a>  DSSortEigenvalues_Private(ds,rr,ri,ds->perm,PETSC_FALSE);
+<a name="line407">407: </a>  PetscMemzero(selection,n*<font color="#4169E1">sizeof</font>(PetscBLASInt));
+<a name="line408">408: </a>  <font color="#4169E1">for</font> (i=0;i<*k;i++) selection[ds->perm[i]] = 1;
+<a name="line409">409: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line410">410: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrsen"</font>,LAPACKtrsen_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,selection,&n,T,&ld,Q,&ld,wr,wi,&mout,NULL,NULL,work,&lwork,iwork,&liwork,&info));
+<a name="line411">411: </a><font color="#A020F0">#else</font>
+<a name="line412">412: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKtrsen"</font>,LAPACKtrsen_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,selection,&n,T,&ld,Q,&ld,wr,&mout,NULL,NULL,work,&lwork,&info));
+<a name="line413">413: </a><font color="#A020F0">#endif</font>
+<a name="line414">414: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTRSEN %d"</font>,info);
+<a name="line415">415: </a>  *k = mout;
+<a name="line416">416: </a>  <font color="#4169E1">return</font>(0);
+<a name="line417">417: </a><font color="#A020F0">#endif</font>
+<a name="line418">418: </a>}
+
+<a name="line422">422: </a><strong><font color="#4169E1"><a name="DSSort_NHEP_Total"></a>static PetscErrorCode DSSort_NHEP_Total(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line423">423: </a>{
+<a name="line424">424: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TREXC)</font>
+<a name="line426">426: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TREXC - Lapack routine is unavailable"</font>);
+<a name="line427">427: </a><font color="#A020F0">#else</font>
+<a name="line429">429: </a>  PetscScalar    re;
+<a name="line430">430: </a>  PetscInt       i,j,pos,result;
+<a name="line431">431: </a>  PetscBLASInt   ifst,ilst,info,n,ld;
+<a name="line432">432: </a>  PetscScalar    *T = ds->mat[DS_MAT_A];
+<a name="line433">433: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
+<a name="line434">434: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line435">435: </a>  PetscScalar    *work,im;
+<a name="line436">436: </a><font color="#A020F0">#endif</font>
+
+<a name="line439">439: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line440">440: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line441">441: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line442">442: </a>  DSAllocateWork_Private(ds,ld,0,0);
+<a name="line443">443: </a>  work = ds->work;
+<a name="line444">444: </a><font color="#A020F0">#endif</font>
+<a name="line445">445: </a>  <font color="#B22222">/* selection sort */</font>
+<a name="line446">446: </a>  <font color="#4169E1">for</font> (i=ds->l;i<n-1;i++) {
+<a name="line447">447: </a>    re = wr[i];
+<a name="line448">448: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line449">449: </a>    im = wi[i];
+<a name="line450">450: </a><font color="#A020F0">#endif</font>
+<a name="line451">451: </a>    pos = 0;
+<a name="line452">452: </a>    j=i+1; <font color="#B22222">/* j points to the next eigenvalue */</font>
+<a name="line453">453: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line454">454: </a>    <font color="#4169E1">if</font> (im != 0) j=i+2;
+<a name="line455">455: </a><font color="#A020F0">#endif</font>
+<a name="line456">456: </a>    <font color="#B22222">/* find minimum eigenvalue */</font>
+<a name="line457">457: </a>    <font color="#4169E1">for</font> (;j<n;j++) {
+<a name="line458">458: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line459">459: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[j],wi[j],&result);
+<a name="line460">460: </a><font color="#A020F0">#else</font>
+<a name="line461">461: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,wr[j],0.0,&result);
+<a name="line462">462: </a><font color="#A020F0">#endif</font>
+<a name="line463">463: </a>      <font color="#4169E1">if</font> (result > 0) {
+<a name="line464">464: </a>        re = wr[j];
+<a name="line465">465: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line466">466: </a>        im = wi[j];
+<a name="line467">467: </a><font color="#A020F0">#endif</font>
+<a name="line468">468: </a>        pos = j;
+<a name="line469">469: </a>      }
+<a name="line470">470: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line471">471: </a>      <font color="#4169E1">if</font> (wi[j] != 0) j++;
+<a name="line472">472: </a><font color="#A020F0">#endif</font>
+<a name="line473">473: </a>    }
+<a name="line474">474: </a>    <font color="#4169E1">if</font> (pos) {
+<a name="line475">475: </a>      <font color="#B22222">/* interchange blocks */</font>
+<a name="line476">476: </a>      PetscBLASIntCast(pos+1,&ifst);
+<a name="line477">477: </a>      PetscBLASIntCast(i+1,&ilst);
+<a name="line478">478: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line479">479: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtrexc"</font>,LAPACKtrexc_(<font color="#666666">"V"</font>,&n,T,&ld,Q,&ld,&ifst,&ilst,work,&info));
+<a name="line480">480: </a><font color="#A020F0">#else</font>
+<a name="line481">481: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtrexc"</font>,LAPACKtrexc_(<font color="#666666">"V"</font>,&n,T,&ld,Q,&ld,&ifst,&ilst,&info));
+<a name="line482">482: </a><font color="#A020F0">#endif</font>
+<a name="line483">483: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTREXC %d"</font>,info);
+<a name="line484">484: </a>      <font color="#B22222">/* recover original eigenvalues from T matrix */</font>
+<a name="line485">485: </a>      <font color="#4169E1">for</font> (j=i;j<n;j++) {
+<a name="line486">486: </a>        wr[j] = T[j+j*ld];
+<a name="line487">487: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line488">488: </a>        <font color="#4169E1">if</font> (j<n-1 && T[j+1+j*ld] != 0.0) {
+<a name="line489">489: </a>          <font color="#B22222">/* complex conjugate eigenvalue */</font>
+<a name="line490">490: </a>          wi[j] = PetscSqrtReal(PetscAbsReal(T[j+1+j*ld])) *
+<a name="line491">491: </a>                  PetscSqrtReal(PetscAbsReal(T[j+(j+1)*ld]));
+<a name="line492">492: </a>          wr[j+1] = wr[j];
+<a name="line493">493: </a>          wi[j+1] = -wi[j];
+<a name="line494">494: </a>          j++;
+<a name="line495">495: </a>        } <font color="#4169E1">else</font> {
+<a name="line496">496: </a>          wi[j] = 0.0;
+<a name="line497">497: </a>        }
+<a name="line498">498: </a><font color="#A020F0">#endif</font>
+<a name="line499">499: </a>      }
+<a name="line500">500: </a>    }
+<a name="line501">501: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line502">502: </a>    <font color="#4169E1">if</font> (wi[i] != 0) i++;
+<a name="line503">503: </a><font color="#A020F0">#endif</font>
+<a name="line504">504: </a>  }
+<a name="line505">505: </a>  <font color="#4169E1">return</font>(0);
+<a name="line506">506: </a><font color="#A020F0">#endif</font>
+<a name="line507">507: </a>}
+
+<a name="line511">511: </a><strong><font color="#4169E1"><a name="DSSort_NHEP"></a>PetscErrorCode DSSort_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line512">512: </a>{
+
+<a name="line516">516: </a>  <font color="#4169E1">if</font> (!rr || wr == rr) {
+<a name="line517">517: </a>    DSSort_NHEP_Total(ds,wr,wi);
+<a name="line518">518: </a>  } <font color="#4169E1">else</font> {
+<a name="line519">519: </a>    DSSort_NHEP_Arbitrary(ds,wr,wi,rr,ri,k);
+<a name="line520">520: </a>  }
+<a name="line521">521: </a>  <font color="#4169E1">return</font>(0);
+<a name="line522">522: </a>}
+
+<a name="line526">526: </a><strong><font color="#4169E1"><a name="DSUpdateExtraRow_NHEP"></a>PetscErrorCode DSUpdateExtraRow_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line527">527: </a>{
+<a name="line529">529: </a>  PetscInt       i;
+<a name="line530">530: </a>  PetscBLASInt   n,ld,incx=1;
+<a name="line531">531: </a>  PetscScalar    *A,*Q,*x,*y,one=1.0,zero=0.0;
+
+<a name="line534">534: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line535">535: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line536">536: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line537">537: </a>  Q  = ds->mat[DS_MAT_Q];
+<a name="line538">538: </a>  DSAllocateWork_Private(ds,2*ld,0,0);
+<a name="line539">539: </a>  x = ds->work;
+<a name="line540">540: </a>  y = ds->work+ld;
+<a name="line541">541: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) x[i] = PetscConj(A[n+i*ld]);
+<a name="line542">542: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&n,&one,Q,&ld,x,&incx,&zero,y,&incx));
+<a name="line543">543: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[n+i*ld] = PetscConj(y[i]);
+<a name="line544">544: </a>  ds->k = n;
+<a name="line545">545: </a>  <font color="#4169E1">return</font>(0);
+<a name="line546">546: </a>}
+
+<a name="line550">550: </a><strong><font color="#4169E1"><a name="DSSolve_NHEP"></a>PetscErrorCode DSSolve_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line551">551: </a>{
+<a name="line552">552: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GEHRD) || defined(SLEPC_MISSING_LAPACK_ORGHR) || defined(PETSC_MISSING_LAPACK_HSEQR)</font>
+<a name="line554">554: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEHRD/ORGHR/HSEQR - Lapack routines are unavailable"</font>);
+<a name="line555">555: </a><font color="#A020F0">#else</font>
+<a name="line557">557: </a>  PetscScalar    *work,*tau;
+<a name="line558">558: </a>  PetscInt       i,j;
+<a name="line559">559: </a>  PetscBLASInt   ilo,lwork,info,n,ld;
+<a name="line560">560: </a>  PetscScalar    *A = ds->mat[DS_MAT_A];
+<a name="line561">561: </a>  PetscScalar    *Q = ds->mat[DS_MAT_Q];
+
+<a name="line564">564: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line566">566: </a><font color="#A020F0">#endif</font>
+<a name="line567">567: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line568">568: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line569">569: </a>  PetscBLASIntCast(ds->l+1,&ilo);
+<a name="line570">570: </a>  DSAllocateWork_Private(ds,ld+ld*ld,0,0);
+<a name="line571">571: </a>  tau  = ds->work;
+<a name="line572">572: </a>  work = ds->work+ld;
+<a name="line573">573: </a>  lwork = ld*ld;
+
+<a name="line575">575: </a>  <font color="#B22222">/* initialize orthogonal matrix */</font>
+<a name="line576">576: </a>  PetscMemzero(Q,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line577">577: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++)
+<a name="line578">578: </a>    Q[i+i*ld] = 1.0;
+<a name="line579">579: </a>  <font color="#4169E1">if</font> (n==1) { <font color="#B22222">/* quick return */</font>
+<a name="line580">580: </a>    wr[0] = A[0];
+<a name="line581">581: </a>    wi[0] = 0.0;
+<a name="line582">582: </a>    <font color="#4169E1">return</font>(0);
+<a name="line583">583: </a>  }
+
+<a name="line585">585: </a>  <font color="#B22222">/* reduce to upper Hessenberg form */</font>
+<a name="line586">586: </a>  <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) {
+<a name="line587">587: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgehrd"</font>,LAPACKgehrd_(&n,&ilo,&n,A,&ld,tau,work,&lwork,&info));
+<a name="line588">588: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEHRD %d"</font>,info);
+<a name="line589">589: </a>    <font color="#4169E1">for</font> (j=0;j<n-1;j++) {
+<a name="line590">590: </a>      <font color="#4169E1">for</font> (i=j+2;i<n;i++) {
+<a name="line591">591: </a>        Q[i+j*ld] = A[i+j*ld];
+<a name="line592">592: </a>        A[i+j*ld] = 0.0;
+<a name="line593">593: </a>      }
+<a name="line594">594: </a>    }
+<a name="line595">595: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKorghr"</font>,LAPACKorghr_(&n,&ilo,&n,Q,&ld,tau,work,&lwork,&info));
+<a name="line596">596: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGHR %d"</font>,info);
+<a name="line597">597: </a>  }
+
+<a name="line599">599: </a>  <font color="#B22222">/* compute the (real) Schur form */</font>
+<a name="line600">600: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line601">601: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"S"</font>,<font color="#666666">"V"</font>,&n,&ilo,&n,A,&ld,wr,wi,Q,&ld,work,&lwork,&info));
+<a name="line602">602: </a>  <font color="#4169E1">for</font> (j=0;j<ds->l;j++) {
+<a name="line603">603: </a>    <font color="#4169E1">if</font> (j==n-1 || A[j+1+j*ld] == 0.0) {
+<a name="line604">604: </a>      <font color="#B22222">/* real eigenvalue */</font>
+<a name="line605">605: </a>      wr[j] = A[j+j*ld];
+<a name="line606">606: </a>      wi[j] = 0.0;
+<a name="line607">607: </a>    } <font color="#4169E1">else</font> {
+<a name="line608">608: </a>      <font color="#B22222">/* complex eigenvalue */</font>
+<a name="line609">609: </a>      wr[j] = A[j+j*ld];
+<a name="line610">610: </a>      wr[j+1] = A[j+j*ld];
+<a name="line611">611: </a>      wi[j] = PetscSqrtReal(PetscAbsReal(A[j+1+j*ld])) *
+<a name="line612">612: </a>              PetscSqrtReal(PetscAbsReal(A[j+(j+1)*ld]));
+<a name="line613">613: </a>      wi[j+1] = -wi[j];
+<a name="line614">614: </a>      j++;
+<a name="line615">615: </a>    }
+<a name="line616">616: </a>  }
+<a name="line617">617: </a><font color="#A020F0">#else</font>
+<a name="line618">618: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKhseqr"</font>,LAPACKhseqr_(<font color="#666666">"S"</font>,<font color="#666666">"V"</font>,&n,&ilo,&n,A,&ld,wr,Q,&ld,work,&lwork,&info));
+<a name="line619">619: </a>  <font color="#4169E1">if</font> (wi) <font color="#4169E1">for</font> (i=ds->l;i<n;i++) wi[i] = 0.0;
+<a name="line620">620: </a><font color="#A020F0">#endif</font>
+<a name="line621">621: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xHSEQR %d"</font>,info);
+<a name="line622">622: </a>  <font color="#4169E1">return</font>(0);
+<a name="line623">623: </a><font color="#A020F0">#endif</font>
+<a name="line624">624: </a>}
+
+<a name="line628">628: </a><strong><font color="#4169E1"><a name="DSTruncate_NHEP"></a>PetscErrorCode DSTruncate_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt n)</font></strong>
+<a name="line629">629: </a>{
+<a name="line630">630: </a>  PetscInt       i,newn,ld=ds->ld,l=ds->l;
+<a name="line631">631: </a>  PetscScalar    *A;
+
+<a name="line634">634: </a>  <font color="#4169E1">if</font> (ds->state==DS_STATE_CONDENSED) ds->t = ds->n;
+<a name="line635">635: </a>  A = ds->mat[DS_MAT_A];
+<a name="line636">636: </a>  <font color="#B22222">/* be careful not to break a diagonal 2x2 block */</font>
+<a name="line637">637: </a>  <font color="#4169E1">if</font> (A[n+(n-1)*ld]==0.0) newn = n;
+<a name="line638">638: </a>  <font color="#4169E1">else</font> {
+<a name="line639">639: </a>    <font color="#4169E1">if</font> (n<ds->n-1) newn = n+1;
+<a name="line640">640: </a>    <font color="#4169E1">else</font> newn = n-1;
+<a name="line641">641: </a>  }
+<a name="line642">642: </a>  <font color="#4169E1">if</font> (ds->extrarow && ds->k==ds->n) {
+<a name="line643">643: </a>    <font color="#B22222">/* copy entries of extra row to the new position, then clean last row */</font>
+<a name="line644">644: </a>    <font color="#4169E1">for</font> (i=l;i<newn;i++) A[newn+i*ld] = A[ds->n+i*ld];
+<a name="line645">645: </a>    <font color="#4169E1">for</font> (i=l;i<ds->n;i++) A[ds->n+i*ld] = 0.0;
+<a name="line646">646: </a>  }
+<a name="line647">647: </a>  ds->k = 0;
+<a name="line648">648: </a>  ds->n = newn;
+<a name="line649">649: </a>  <font color="#4169E1">return</font>(0);
+<a name="line650">650: </a>}
+
+<a name="line654">654: </a><strong><font color="#4169E1"><a name="DSCond_NHEP"></a>PetscErrorCode DSCond_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscReal *cond)</font></strong>
+<a name="line655">655: </a>{
+<a name="line656">656: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRI) || defined(SLEPC_MISSING_LAPACK_LANGE) || defined(SLEPC_MISSING_LAPACK_LANHS)</font>
+<a name="line658">658: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRF/GETRI/LANGE/LANHS - Lapack routines are unavailable"</font>);
+<a name="line659">659: </a><font color="#A020F0">#else</font>
+<a name="line661">661: </a>  PetscScalar    *work;
+<a name="line662">662: </a>  PetscReal      *rwork;
+<a name="line663">663: </a>  PetscBLASInt   *ipiv;
+<a name="line664">664: </a>  PetscBLASInt   lwork,info,n,ld;
+<a name="line665">665: </a>  PetscReal      hn,hin;
+<a name="line666">666: </a>  PetscScalar    *A;
+
+<a name="line669">669: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line670">670: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line671">671: </a>  lwork = 8*ld;
+<a name="line672">672: </a>  DSAllocateWork_Private(ds,lwork,ld,ld);
+<a name="line673">673: </a>  work  = ds->work;
+<a name="line674">674: </a>  rwork = ds->rwork;
+<a name="line675">675: </a>  ipiv  = ds->iwork;
+
+<a name="line677">677: </a>  <font color="#B22222">/* use workspace matrix W to avoid overwriting A */</font>
+<a name="line678">678: </a>  DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line679">679: </a>  A = ds->mat[DS_MAT_W];
+<a name="line680">680: </a>  PetscMemcpy(A,ds->mat[DS_MAT_A],<font color="#4169E1">sizeof</font>(PetscScalar)*ds->ld*ds->ld);
+
+<a name="line682">682: </a>  <font color="#B22222">/* norm of A */</font>
+<a name="line683">683: </a>  <font color="#4169E1">if</font> (ds->state<DS_STATE_INTERMEDIATE) hn = LAPACKlange_(<font color="#666666">"I"</font>,&n,&n,A,&ld,rwork);
+<a name="line684">684: </a>  <font color="#4169E1">else</font> hn = LAPACKlanhs_(<font color="#666666">"I"</font>,&n,A,&ld,rwork);
+
+<a name="line686">686: </a>  <font color="#B22222">/* norm of inv(A) */</font>
+<a name="line687">687: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&n,&n,A,&ld,ipiv,&info));
+<a name="line688">688: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGETRF %d"</font>,info);
+<a name="line689">689: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgetri"</font>,LAPACKgetri_(&n,A,&ld,ipiv,work,&lwork,&info));
+<a name="line690">690: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGETRI %d"</font>,info);
+<a name="line691">691: </a>  hin = LAPACKlange_(<font color="#666666">"I"</font>,&n,&n,A,&ld,rwork);
+
+<a name="line693">693: </a>  *cond = hn*hin;
+<a name="line694">694: </a>  <font color="#4169E1">return</font>(0);
+<a name="line695">695: </a><font color="#A020F0">#endif</font>
+<a name="line696">696: </a>}
+
+<a name="line700">700: </a><strong><font color="#4169E1"><a name="DSTranslateHarmonic_NHEP"></a>PetscErrorCode DSTranslateHarmonic_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar tau,PetscReal beta,PetscBool recover,PetscScalar *gin,PetscReal *gamma)</font></strong>
+<a name="line701">701: </a>{
+<a name="line702">702: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GETRF) || defined(PETSC_MISSING_LAPACK_GETRS)</font>
+<a name="line704">704: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GETRF/GETRS - Lapack routines are unavailable"</font>);
+<a name="line705">705: </a><font color="#A020F0">#else</font>
+<a name="line707">707: </a>  PetscInt       i,j;
+<a name="line708">708: </a>  PetscBLASInt   *ipiv,info,n,ld,one=1,ncol;
+<a name="line709">709: </a>  PetscScalar    *A,*B,*Q,*g=gin,*ghat;
+<a name="line710">710: </a>  PetscScalar    done=1.0,dmone=-1.0,dzero=0.0;
+<a name="line711">711: </a>  PetscReal      gnorm;
+
+<a name="line714">714: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line715">715: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line716">716: </a>  A  = ds->mat[DS_MAT_A];
+
+<a name="line718">718: </a>  <font color="#4169E1">if</font> (!recover) {
+
+<a name="line720">720: </a>    DSAllocateWork_Private(ds,0,0,ld);
+<a name="line721">721: </a>    ipiv = ds->iwork;
+<a name="line722">722: </a>    <font color="#4169E1">if</font> (!g) {
+<a name="line723">723: </a>      DSAllocateWork_Private(ds,ld,0,0);
+<a name="line724">724: </a>      g = ds->work;
+<a name="line725">725: </a>    }
+<a name="line726">726: </a>    <font color="#B22222">/* use workspace matrix W to factor A-tau*eye(n) */</font>
+<a name="line727">727: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line728">728: </a>    B = ds->mat[DS_MAT_W];
+<a name="line729">729: </a>    PetscMemcpy(B,A,<font color="#4169E1">sizeof</font>(PetscScalar)*ld*ld);
+
+<a name="line731">731: </a>    <font color="#B22222">/* Vector g initialy stores b = beta*e_n^T */</font>
+<a name="line732">732: </a>    PetscMemzero(g,n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line733">733: </a>    g[n-1] = beta;
+
+<a name="line735">735: </a>    <font color="#B22222">/* g = (A-tau*eye(n))'\b */</font>
+<a name="line736">736: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
+<a name="line737">737: </a>      B[i+i*ld] -= tau;
+<a name="line738">738: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgetrf"</font>,LAPACKgetrf_(&n,&n,B,&ld,ipiv,&info));
+<a name="line739">739: </a>    <font color="#4169E1">if</font> (info<0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Bad argument to LU factorization"</font>);
+<a name="line740">740: </a>    <font color="#4169E1">if</font> (info>0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_MAT_LU_ZRPVT,<font color="#666666">"Bad LU factorization"</font>);
+<a name="line741">741: </a>    PetscLogFlops(2.0*n*n*n/3.0);
+<a name="line742">742: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgetrs"</font>,LAPACKgetrs_(<font color="#666666">"C"</font>,&n,&one,B,&ld,ipiv,g,&ld,&info));
+<a name="line743">743: </a>    <font color="#4169E1">if</font> (info) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"GETRS - Bad solve"</font>);
+<a name="line744">744: </a>    PetscLogFlops(2.0*n*n-n);
+
+<a name="line746">746: </a>    <font color="#B22222">/* A = A + g*b' */</font>
+<a name="line747">747: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
+<a name="line748">748: </a>      A[i+(n-1)*ld] += g[i]*beta;
+
+<a name="line750">750: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* recover */</font>
+
+<a name="line753">753: </a>    DSAllocateWork_Private(ds,ld,0,0);
+<a name="line754">754: </a>    ghat = ds->work;
+<a name="line755">755: </a>    Q    = ds->mat[DS_MAT_Q];
+
+<a name="line757">757: </a>    <font color="#B22222">/* g^ = -Q(:,idx)'*g */</font>
+<a name="line758">758: </a>    PetscBLASIntCast(ds->l+ds->k,&ncol);
+<a name="line759">759: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"C"</font>,&n,&ncol,&dmone,Q,&ld,g,&one,&dzero,ghat,&one));
+
+<a name="line761">761: </a>    <font color="#B22222">/* A = A + g^*b' */</font>
+<a name="line762">762: </a>    <font color="#4169E1">for</font> (i=0;i<ds->l+ds->k;i++)
+<a name="line763">763: </a>      <font color="#4169E1">for</font> (j=ds->l;j<ds->l+ds->k;j++)
+<a name="line764">764: </a>        A[i+j*ld] += ghat[i]*Q[n-1+j*ld]*beta;
+
+<a name="line766">766: </a>    <font color="#B22222">/* g~ = (I-Q(:,idx)*Q(:,idx)')*g = g+Q(:,idx)*g^ */</font>
+<a name="line767">767: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemv"</font>,BLASgemv_(<font color="#666666">"N"</font>,&n,&ncol,&done,Q,&ld,ghat,&one,&done,g,&one));
+<a name="line768">768: </a>  }
+
+<a name="line770">770: </a>  <font color="#B22222">/* Compute gamma factor */</font>
+<a name="line771">771: </a>  <font color="#4169E1">if</font> (gamma) {
+<a name="line772">772: </a>    gnorm = 0.0;
+<a name="line773">773: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++)
+<a name="line774">774: </a>      gnorm = gnorm + PetscRealPart(g[i]*PetscConj(g[i]));
+<a name="line775">775: </a>    *gamma = PetscSqrtReal(1.0+gnorm);
+<a name="line776">776: </a>  }
+<a name="line777">777: </a>  <font color="#4169E1">return</font>(0);
+<a name="line778">778: </a><font color="#A020F0">#endif</font>
+<a name="line779">779: </a>}
+
+<a name="line783">783: </a><strong><font color="#4169E1"><a name="DSCreate_NHEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_NHEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line784">784: </a>{
+<a name="line786">786: </a>  ds->ops->allocate      = DSAllocate_NHEP;
+<a name="line787">787: </a>  ds->ops->view          = DSView_NHEP;
+<a name="line788">788: </a>  ds->ops->vectors       = DSVectors_NHEP;
+<a name="line789">789: </a>  ds->ops->solve[0]      = DSSolve_NHEP;
+<a name="line790">790: </a>  ds->ops->sort          = DSSort_NHEP;
+<a name="line791">791: </a>  ds->ops->truncate      = DSTruncate_NHEP;
+<a name="line792">792: </a>  ds->ops->update        = DSUpdateExtraRow_NHEP;
+<a name="line793">793: </a>  ds->ops->cond          = DSCond_NHEP;
+<a name="line794">794: </a>  ds->ops->transharm     = DSTranslateHarmonic_NHEP;
+<a name="line795">795: </a>  ds->ops->normalize     = DSNormalize_NHEP;
+<a name="line796">796: </a>  <font color="#4169E1">return</font>(0);
+<a name="line797">797: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/nhep/index.html b/src/sys/classes/ds/impls/nhep/index.html
index 356d57f..064b7e4 100644
--- a/src/sys/classes/ds/impls/nhep/index.html
+++ b/src/sys/classes/ds/impls/nhep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/nhep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/nhep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/nhep/makefile b/src/sys/classes/ds/impls/nhep/makefile
index 82a4b7f..54f5a7b 100644
--- a/src/sys/classes/ds/impls/nhep/makefile
+++ b/src/sys/classes/ds/impls/nhep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/nhep/makefile.html b/src/sys/classes/ds/impls/nhep/makefile.html
index caf1b56..bac3b56 100644
--- a/src/sys/classes/ds/impls/nhep/makefile.html
+++ b/src/sys/classes/ds/impls/nhep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/nhep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:53+00:00">
+<meta name="date" content="2016-05-16T10:31:43+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/nhep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/nhep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/pep/dspep.c b/src/sys/classes/ds/impls/pep/dspep.c
index 06ca3c3..1784c7b 100644
--- a/src/sys/classes/ds/impls/pep/dspep.c
+++ b/src/sys/classes/ds/impls/pep/dspep.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,6 +37,7 @@ PetscErrorCode DSAllocate_PEP(DS ds,PetscInt ld)
   PetscFunctionBegin;
   if (!ctx->d) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"DSPEP requires specifying the polynomial degree via DSPEPSetDegree()");
   ierr = DSAllocateMat_Private(ds,DS_MAT_X);CHKERRQ(ierr);
+  ierr = DSAllocateMat_Private(ds,DS_MAT_Y);CHKERRQ(ierr);
   for (i=0;i<=ctx->d;i++) {
     ierr = DSAllocateMat_Private(ds,DSMatExtra[i]);CHKERRQ(ierr);
   }
@@ -80,7 +81,6 @@ PetscErrorCode DSVectors_PEP(DS ds,DSMatType mat,PetscInt *j,PetscReal *rnorm)
     case DS_MAT_X:
       break;
     case DS_MAT_Y:
-      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Not implemented yet");
       break;
     default:
       SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"Invalid mat parameter");
@@ -97,7 +97,6 @@ PetscErrorCode DSNormalize_PEP(DS ds,DSMatType mat,PetscInt col)
     case DS_MAT_X:
       break;
     case DS_MAT_Y:
-      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Not implemented yet");
       break;
     default:
       SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"Invalid mat parameter");
@@ -112,7 +111,7 @@ PetscErrorCode DSSort_PEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,
   PetscErrorCode ierr;
   DS_PEP         *ctx = (DS_PEP*)ds->data;
   PetscInt       n,i,j,k,p,*perm,told,ld;
-  PetscScalar    *A,*X,rtmp;
+  PetscScalar    *A,*X,*Y,rtmp,rtmp2;
 
   PetscFunctionBegin;
   if (!ds->sc) PetscFunctionReturn(0);
@@ -135,6 +134,7 @@ PetscErrorCode DSSort_PEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,
   /* cannot use DSPermuteColumns_Private() since matrix is not square */
   ld = ds->ld;
   X  = ds->mat[DS_MAT_X];
+  Y  = ds->mat[DS_MAT_Y];
   for (i=0;i<n;i++) {
     p = perm[i];
     if (p != i) {
@@ -143,7 +143,8 @@ PetscErrorCode DSSort_PEP(DS ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,
       perm[j] = p; perm[i] = i;
       /* swap columns i and j */
       for (k=0;k<ds->n;k++) {
-        rtmp = X[k+p*ld]; X[k+p*ld] = X[k+i*ld]; X[k+i*ld] = rtmp;
+        rtmp  = X[k+p*ld]; X[k+p*ld] = X[k+i*ld]; X[k+i*ld] = rtmp;
+        rtmp2 = Y[k+p*ld]; Y[k+p*ld] = Y[k+i*ld]; Y[k+i*ld] = rtmp2;
       }
     }
   }
@@ -161,7 +162,7 @@ PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)
   PetscErrorCode ierr;
   DS_PEP         *ctx = (DS_PEP*)ds->data;
   PetscInt       i,j,off;
-  PetscScalar    *A,*B,*W,*X,*E,*work,*beta,norm;
+  PetscScalar    *A,*B,*W,*X,*U,*Y,*E,*work,*beta,norm;
   PetscBLASInt   info,n,ldd,nd,lrwork=0,lwork,one=1;
 #if defined(PETSC_USE_COMPLEX)
   PetscReal      *rwork;
@@ -179,6 +180,9 @@ PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)
   if (!ds->mat[DS_MAT_W]) {
     ierr = DSAllocateMat_Private(ds,DS_MAT_W);CHKERRQ(ierr);
   }
+  if (!ds->mat[DS_MAT_U]) {
+    ierr = DSAllocateMat_Private(ds,DS_MAT_U);CHKERRQ(ierr);
+  }
   ierr = PetscBLASIntCast(ds->n*ctx->d,&nd);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ds->n,&n);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ds->ld*ctx->d,&ldd);CHKERRQ(ierr);
@@ -195,7 +199,9 @@ PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)
   A = ds->mat[DS_MAT_A];
   B = ds->mat[DS_MAT_B];
   W = ds->mat[DS_MAT_W];
+  U = ds->mat[DS_MAT_U];
   X = ds->mat[DS_MAT_X];
+  Y = ds->mat[DS_MAT_Y];
   E = ds->mat[DSMatExtra[ctx->d]];
 
   /* build matrices A and B of the linearization */
@@ -217,10 +223,10 @@ PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)
   /* solve generalized eigenproblem */
 #if defined(PETSC_USE_COMPLEX)
   rwork = ds->rwork;
-  PetscStackCallBLAS("LAPACKggev",LAPACKggev_("N","V",&nd,A,&ldd,B,&ldd,wr,beta,NULL,&ldd,W,&ldd,work,&lwork,rwork,&info));
+  PetscStackCallBLAS("LAPACKggev",LAPACKggev_("V","V",&nd,A,&ldd,B,&ldd,wr,beta,U,&ldd,W,&ldd,work,&lwork,rwork,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack ZGGEV %d",info);
 #else
-  PetscStackCallBLAS("LAPACKggev",LAPACKggev_("N","V",&nd,A,&ldd,B,&ldd,wr,wi,beta,NULL,&ldd,W,&ldd,work,&lwork,&info));
+  PetscStackCallBLAS("LAPACKggev",LAPACKggev_("V","V",&nd,A,&ldd,B,&ldd,wr,wi,beta,U,&ldd,W,&ldd,work,&lwork,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack DGGEV %d",info);
 #endif
 
@@ -239,6 +245,7 @@ PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)
   /* copy and normalize eigenvectors */
   for (j=0;j<nd;j++) {
     ierr = PetscMemcpy(X+j*ds->ld,W+j*ldd,ds->n*sizeof(PetscScalar));CHKERRQ(ierr);
+    ierr = PetscMemcpy(Y+j*ds->ld,U+ds->n*(ctx->d-1)+j*ldd,ds->n*sizeof(PetscScalar));CHKERRQ(ierr);
   }
   for (j=0;j<nd;j++) {
 #if !defined(PETSC_USE_COMPLEX)
@@ -248,12 +255,19 @@ PetscErrorCode DSSolve_PEP_QZ(DS ds,PetscScalar *wr,PetscScalar *wi)
       norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
       PetscStackCallBLAS("BLASscal",BLASscal_(&n,&norm,X+j*ds->ld,&one));
       PetscStackCallBLAS("BLASscal",BLASscal_(&n,&norm,X+(j+1)*ds->ld,&one));
+      norm = BLASnrm2_(&n,Y+j*ds->ld,&one);
+      norm0 = BLASnrm2_(&n,Y+(j+1)*ds->ld,&one);
+      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
+      PetscStackCallBLAS("BLASscal",BLASscal_(&n,&norm,Y+j*ds->ld,&one));
+      PetscStackCallBLAS("BLASscal",BLASscal_(&n,&norm,Y+(j+1)*ds->ld,&one));
       j++;
     } else
 #endif
     {
       norm = 1.0/BLASnrm2_(&n,X+j*ds->ld,&one);
       PetscStackCallBLAS("BLASscal",BLASscal_(&n,&norm,X+j*ds->ld,&one));
+      norm = 1.0/BLASnrm2_(&n,Y+j*ds->ld,&one);
+      PetscStackCallBLAS("BLASscal",BLASscal_(&n,&norm,Y+j*ds->ld,&one));
     }
   }
   PetscFunctionReturn(0);
@@ -268,7 +282,7 @@ static PetscErrorCode DSPEPSetDegree_PEP(DS ds,PetscInt d)
 
   PetscFunctionBegin;
   if (d<0) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"The degree must be a non-negative integer");
-  if (d>=DS_NUM_EXTRA) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"Only implemented for polynomials of degree at most %d",DS_NUM_EXTRA-1);
+  if (d>=DS_NUM_EXTRA) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,"Only implemented for polynomials of degree at most %D",DS_NUM_EXTRA-1);
   ctx->d = d;
   PetscFunctionReturn(0);
 }
@@ -334,7 +348,7 @@ PetscErrorCode DSPEPGetDegree(DS ds,PetscInt *d)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(ds,DS_CLASSID,1);
   PetscValidPointer(d,2);
-  ierr = PetscTryMethod(ds,"DSPEPGetDegree_C",(DS,PetscInt*),(ds,d));CHKERRQ(ierr);
+  ierr = PetscUseMethod(ds,"DSPEPGetDegree_C",(DS,PetscInt*),(ds,d));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/ds/impls/pep/dspep.c.html b/src/sys/classes/ds/impls/pep/dspep.c.html
index 815220b..77565a1 100644
--- a/src/sys/classes/ds/impls/pep/dspep.c.html
+++ b/src/sys/classes/ds/impls/pep/dspep.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/pep/dspep.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:59+00:00">
+<meta name="date" content="2016-05-16T10:31:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/pep/dspep.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/pep/dspep.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,44 +45,44 @@
 
 <a name="line38"> 38: </a>  <font color="#4169E1">if</font> (!ctx->d) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"DSPEP requires specifying the polynomial degree via <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>()"</font>);
 <a name="line39"> 39: </a>  DSAllocateMat_Private(ds,DS_MAT_X);
-<a name="line40"> 40: </a>  <font color="#4169E1">for</font> (i=0;i<=ctx->d;i++) {
-<a name="line41"> 41: </a>    DSAllocateMat_Private(ds,DSMatExtra[i]);
-<a name="line42"> 42: </a>  }
-<a name="line43"> 43: </a>  PetscFree(ds->perm);
-<a name="line44"> 44: </a>  PetscMalloc1(ld*ctx->d,&ds->perm);
-<a name="line45"> 45: </a>  PetscLogObjectMemory((PetscObject)ds,ld*ctx->d*<font color="#4169E1">sizeof</font>(PetscInt));
-<a name="line46"> 46: </a>  <font color="#4169E1">return</font>(0);
-<a name="line47"> 47: </a>}
-
-<a name="line51"> 51: </a><strong><font color="#4169E1"><a name="DSView_PEP"></a>PetscErrorCode DSView_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer)</font></strong>
-<a name="line52"> 52: </a>{
-<a name="line53"> 53: </a>  PetscErrorCode    ierr;
-<a name="line54"> 54: </a>  DS_PEP            *ctx = (DS_PEP*)ds->data;
-<a name="line55"> 55: </a>  PetscViewerFormat format;
-<a name="line56"> 56: </a>  PetscInt          i;
-
-<a name="line59"> 59: </a>  PetscViewerGetFormat(viewer,&format);
-<a name="line60"> 60: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  polynomial degree: %D\n"</font>,ctx->d);
-<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) <font color="#4169E1">return</font>(0);
-<a name="line62"> 62: </a>  <font color="#4169E1">for</font> (i=0;i<=ctx->d;i++) {
-<a name="line63"> 63: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DSMatExtra[i]);
-<a name="line64"> 64: </a>  }
-<a name="line65"> 65: </a>  <font color="#4169E1">if</font> (ds->state>DS_STATE_INTERMEDIATE) {
-<a name="line66"> 66: </a>    ds->m = ctx->d*ds->n;  <font color="#B22222">/* temporarily set number of columns */</font>
-<a name="line67"> 67: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_X);
-<a name="line68"> 68: </a>    ds->m = 0;
-<a name="line69"> 69: </a>  }
-<a name="line70"> 70: </a>  <font color="#4169E1">return</font>(0);
-<a name="line71"> 71: </a>}
-
-<a name="line75"> 75: </a><strong><font color="#4169E1"><a name="DSVectors_PEP"></a>PetscErrorCode DSVectors_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *j,PetscReal *rnorm)</font></strong>
-<a name="line76"> 76: </a>{
-<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (rnorm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line79"> 79: </a>  <font color="#4169E1">switch</font> (mat) {
-<a name="line80"> 80: </a>    <font color="#4169E1">case</font> DS_MAT_X:
-<a name="line81"> 81: </a>      <font color="#4169E1">break</font>;
-<a name="line82"> 82: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line83"> 83: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line40"> 40: </a>  DSAllocateMat_Private(ds,DS_MAT_Y);
+<a name="line41"> 41: </a>  <font color="#4169E1">for</font> (i=0;i<=ctx->d;i++) {
+<a name="line42"> 42: </a>    DSAllocateMat_Private(ds,DSMatExtra[i]);
+<a name="line43"> 43: </a>  }
+<a name="line44"> 44: </a>  PetscFree(ds->perm);
+<a name="line45"> 45: </a>  PetscMalloc1(ld*ctx->d,&ds->perm);
+<a name="line46"> 46: </a>  PetscLogObjectMemory((PetscObject)ds,ld*ctx->d*<font color="#4169E1">sizeof</font>(PetscInt));
+<a name="line47"> 47: </a>  <font color="#4169E1">return</font>(0);
+<a name="line48"> 48: </a>}
+
+<a name="line52"> 52: </a><strong><font color="#4169E1"><a name="DSView_PEP"></a>PetscErrorCode DSView_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer)</font></strong>
+<a name="line53"> 53: </a>{
+<a name="line54"> 54: </a>  PetscErrorCode    ierr;
+<a name="line55"> 55: </a>  DS_PEP            *ctx = (DS_PEP*)ds->data;
+<a name="line56"> 56: </a>  PetscViewerFormat format;
+<a name="line57"> 57: </a>  PetscInt          i;
+
+<a name="line60"> 60: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line61"> 61: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  polynomial degree: %D\n"</font>,ctx->d);
+<a name="line62"> 62: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) <font color="#4169E1">return</font>(0);
+<a name="line63"> 63: </a>  <font color="#4169E1">for</font> (i=0;i<=ctx->d;i++) {
+<a name="line64"> 64: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DSMatExtra[i]);
+<a name="line65"> 65: </a>  }
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (ds->state>DS_STATE_INTERMEDIATE) {
+<a name="line67"> 67: </a>    ds->m = ctx->d*ds->n;  <font color="#B22222">/* temporarily set number of columns */</font>
+<a name="line68"> 68: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_X);
+<a name="line69"> 69: </a>    ds->m = 0;
+<a name="line70"> 70: </a>  }
+<a name="line71"> 71: </a>  <font color="#4169E1">return</font>(0);
+<a name="line72"> 72: </a>}
+
+<a name="line76"> 76: </a><strong><font color="#4169E1"><a name="DSVectors_PEP"></a>PetscErrorCode DSVectors_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *j,PetscReal *rnorm)</font></strong>
+<a name="line77"> 77: </a>{
+<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (rnorm) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
+<a name="line80"> 80: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line81"> 81: </a>    <font color="#4169E1">case</font> DS_MAT_X:
+<a name="line82"> 82: </a>      <font color="#4169E1">break</font>;
+<a name="line83"> 83: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
 <a name="line84"> 84: </a>      <font color="#4169E1">break</font>;
 <a name="line85"> 85: </a><strong><font color="#FF0000">    default:</font></strong>
 <a name="line86"> 86: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
@@ -96,40 +96,40 @@
 <a name="line97"> 97: </a>    <font color="#4169E1">case</font> DS_MAT_X:
 <a name="line98"> 98: </a>      <font color="#4169E1">break</font>;
 <a name="line99"> 99: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
-<a name="line100">100: </a>      SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Not implemented yet"</font>);
-<a name="line101">101: </a>      <font color="#4169E1">break</font>;
-<a name="line102">102: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line103">103: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
-<a name="line104">104: </a>  }
-<a name="line105">105: </a>  <font color="#4169E1">return</font>(0);
-<a name="line106">106: </a>}
-
-<a name="line110">110: </a><strong><font color="#4169E1"><a name="DSSort_PEP"></a>PetscErrorCode DSSort_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *kout)</font></strong>
-<a name="line111">111: </a>{
-<a name="line113">113: </a>  DS_PEP         *ctx = (DS_PEP*)ds->data;
-<a name="line114">114: </a>  PetscInt       n,i,j,k,p,*perm,told,ld;
-<a name="line115">115: </a>  PetscScalar    *A,*X,rtmp;
-
-<a name="line118">118: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
-<a name="line119">119: </a>  n = ds->n*ctx->d;
-<a name="line120">120: </a>  A  = ds->mat[DS_MAT_A];
-<a name="line121">121: </a>  perm = ds->perm;
-<a name="line122">122: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) perm[i] = i;
-<a name="line123">123: </a>  told = ds->t;
-<a name="line124">124: </a>  ds->t = n;  <font color="#B22222">/* force the sorting routines to consider d*n eigenvalues */</font>
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (rr) {
-<a name="line126">126: </a>    DSSortEigenvalues_Private(ds,rr,ri,perm,PETSC_FALSE);
-<a name="line127">127: </a>  } <font color="#4169E1">else</font> {
-<a name="line128">128: </a>    DSSortEigenvalues_Private(ds,wr,wi,perm,PETSC_FALSE);
-<a name="line129">129: </a>  }
-<a name="line130">130: </a>  ds->t = told;  <font color="#B22222">/* restore value of t */</font>
-<a name="line131">131: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[i]  = wr[perm[i]];
-<a name="line132">132: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wr[i] = A[i];
-<a name="line133">133: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[i]  = wi[perm[i]];
-<a name="line134">134: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wi[i] = A[i];
-<a name="line135">135: </a>  <font color="#B22222">/* cannot use DSPermuteColumns_Private() since matrix is not square */</font>
-<a name="line136">136: </a>  ld = ds->ld;
-<a name="line137">137: </a>  X  = ds->mat[DS_MAT_X];
+<a name="line100">100: </a>      <font color="#4169E1">break</font>;
+<a name="line101">101: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line102">102: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line103">103: </a>  }
+<a name="line104">104: </a>  <font color="#4169E1">return</font>(0);
+<a name="line105">105: </a>}
+
+<a name="line109">109: </a><strong><font color="#4169E1"><a name="DSSort_PEP"></a>PetscErrorCode DSSort_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *kout)</font></strong>
+<a name="line110">110: </a>{
+<a name="line112">112: </a>  DS_PEP         *ctx = (DS_PEP*)ds->data;
+<a name="line113">113: </a>  PetscInt       n,i,j,k,p,*perm,told,ld;
+<a name="line114">114: </a>  PetscScalar    *A,*X,*Y,rtmp,rtmp2;
+
+<a name="line117">117: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
+<a name="line118">118: </a>  n = ds->n*ctx->d;
+<a name="line119">119: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line120">120: </a>  perm = ds->perm;
+<a name="line121">121: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) perm[i] = i;
+<a name="line122">122: </a>  told = ds->t;
+<a name="line123">123: </a>  ds->t = n;  <font color="#B22222">/* force the sorting routines to consider d*n eigenvalues */</font>
+<a name="line124">124: </a>  <font color="#4169E1">if</font> (rr) {
+<a name="line125">125: </a>    DSSortEigenvalues_Private(ds,rr,ri,perm,PETSC_FALSE);
+<a name="line126">126: </a>  } <font color="#4169E1">else</font> {
+<a name="line127">127: </a>    DSSortEigenvalues_Private(ds,wr,wi,perm,PETSC_FALSE);
+<a name="line128">128: </a>  }
+<a name="line129">129: </a>  ds->t = told;  <font color="#B22222">/* restore value of t */</font>
+<a name="line130">130: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[i]  = wr[perm[i]];
+<a name="line131">131: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wr[i] = A[i];
+<a name="line132">132: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) A[i]  = wi[perm[i]];
+<a name="line133">133: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) wi[i] = A[i];
+<a name="line134">134: </a>  <font color="#B22222">/* cannot use DSPermuteColumns_Private() since matrix is not square */</font>
+<a name="line135">135: </a>  ld = ds->ld;
+<a name="line136">136: </a>  X  = ds->mat[DS_MAT_X];
+<a name="line137">137: </a>  Y  = ds->mat[DS_MAT_Y];
 <a name="line138">138: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
 <a name="line139">139: </a>    p = perm[i];
 <a name="line140">140: </a>    <font color="#4169E1">if</font> (p != i) {
@@ -138,205 +138,219 @@
 <a name="line143">143: </a>      perm[j] = p; perm[i] = i;
 <a name="line144">144: </a>      <font color="#B22222">/* swap columns i and j */</font>
 <a name="line145">145: </a>      <font color="#4169E1">for</font> (k=0;k<ds->n;k++) {
-<a name="line146">146: </a>        rtmp = X[k+p*ld]; X[k+p*ld] = X[k+i*ld]; X[k+i*ld] = rtmp;
-<a name="line147">147: </a>      }
-<a name="line148">148: </a>    }
-<a name="line149">149: </a>  }
-<a name="line150">150: </a>  <font color="#4169E1">return</font>(0);
-<a name="line151">151: </a>}
-
-<a name="line155">155: </a><strong><font color="#4169E1"><a name="DSSolve_PEP_QZ"></a>PetscErrorCode DSSolve_PEP_QZ(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
-<a name="line156">156: </a>{
-<a name="line157">157: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GGEV)</font>
-<a name="line159">159: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GGEV - Lapack routine is unavailable"</font>);
-<a name="line160">160: </a><font color="#A020F0">#else</font>
-<a name="line162">162: </a>  DS_PEP         *ctx = (DS_PEP*)ds->data;
-<a name="line163">163: </a>  PetscInt       i,j,off;
-<a name="line164">164: </a>  PetscScalar    *A,*B,*W,*X,*E,*work,*beta,norm;
-<a name="line165">165: </a>  PetscBLASInt   info,n,ldd,nd,lrwork=0,lwork,one=1;
-<a name="line166">166: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line167">167: </a>  PetscReal      *rwork;
-<a name="line168">168: </a><font color="#A020F0">#else</font>
-<a name="line169">169: </a>  PetscScalar    norm0;
-<a name="line170">170: </a><font color="#A020F0">#endif</font>
-
-<a name="line173">173: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_A]) {
-<a name="line174">174: </a>    DSAllocateMat_Private(ds,DS_MAT_A);
-<a name="line175">175: </a>  }
-<a name="line176">176: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_B]) {
-<a name="line177">177: </a>    DSAllocateMat_Private(ds,DS_MAT_B);
-<a name="line178">178: </a>  }
-<a name="line179">179: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_W]) {
-<a name="line180">180: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
-<a name="line181">181: </a>  }
-<a name="line182">182: </a>  PetscBLASIntCast(ds->n*ctx->d,&nd);
-<a name="line183">183: </a>  PetscBLASIntCast(ds->n,&n);
-<a name="line184">184: </a>  PetscBLASIntCast(ds->ld*ctx->d,&ldd);
-<a name="line185">185: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line186">186: </a>  PetscBLASIntCast(nd+2*nd,&lwork);
-<a name="line187">187: </a>  PetscBLASIntCast(8*nd,&lrwork);
-<a name="line188">188: </a><font color="#A020F0">#else</font>
-<a name="line189">189: </a>  PetscBLASIntCast(nd+8*nd,&lwork);
-<a name="line190">190: </a><font color="#A020F0">#endif</font>
-<a name="line191">191: </a>  DSAllocateWork_Private(ds,lwork,lrwork,0);
-<a name="line192">192: </a>  beta = ds->work;
-<a name="line193">193: </a>  work = ds->work + nd;
-<a name="line194">194: </a>  lwork -= nd;
-<a name="line195">195: </a>  A = ds->mat[DS_MAT_A];
-<a name="line196">196: </a>  B = ds->mat[DS_MAT_B];
-<a name="line197">197: </a>  W = ds->mat[DS_MAT_W];
-<a name="line198">198: </a>  X = ds->mat[DS_MAT_X];
-<a name="line199">199: </a>  E = ds->mat[DSMatExtra[ctx->d]];
-
-<a name="line201">201: </a>  <font color="#B22222">/* build matrices A and B of the linearization */</font>
-<a name="line202">202: </a>  PetscMemzero(A,ldd*ldd*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line203">203: </a>  <font color="#4169E1">for</font> (i=0;i<nd-ds->n;i++) A[i+(i+ds->n)*ldd] = -1.0;
-<a name="line204">204: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->d;i++) {
-<a name="line205">205: </a>    off = i*ds->n*ldd+(ctx->d-1)*ds->n;
-<a name="line206">206: </a>    <font color="#4169E1">for</font> (j=0;j<ds->n;j++) {
-<a name="line207">207: </a>      PetscMemcpy(A+off+j*ldd,ds->mat[DSMatExtra[i]]+j*ds->ld,ds->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line208">208: </a>    }
-<a name="line209">209: </a>  }
-<a name="line210">210: </a>  PetscMemzero(B,ldd*ldd*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line211">211: </a>  <font color="#4169E1">for</font> (i=0;i<nd-ds->n;i++) B[i+i*ldd] = -1.0;
-<a name="line212">212: </a>  off = (ctx->d-1)*ds->n*(ldd+1);
-<a name="line213">213: </a>  <font color="#4169E1">for</font> (j=0;j<ds->n;j++) {
-<a name="line214">214: </a>    <font color="#4169E1">for</font> (i=0;i<ds->n;i++) B[off+i+j*ldd] = -E[i+j*ds->ld];
+<a name="line146">146: </a>        rtmp  = X[k+p*ld]; X[k+p*ld] = X[k+i*ld]; X[k+i*ld] = rtmp;
+<a name="line147">147: </a>        rtmp2 = Y[k+p*ld]; Y[k+p*ld] = Y[k+i*ld]; Y[k+i*ld] = rtmp2;
+<a name="line148">148: </a>      }
+<a name="line149">149: </a>    }
+<a name="line150">150: </a>  }
+<a name="line151">151: </a>  <font color="#4169E1">return</font>(0);
+<a name="line152">152: </a>}
+
+<a name="line156">156: </a><strong><font color="#4169E1"><a name="DSSolve_PEP_QZ"></a>PetscErrorCode DSSolve_PEP_QZ(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line157">157: </a>{
+<a name="line158">158: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GGEV)</font>
+<a name="line160">160: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GGEV - Lapack routine is unavailable"</font>);
+<a name="line161">161: </a><font color="#A020F0">#else</font>
+<a name="line163">163: </a>  DS_PEP         *ctx = (DS_PEP*)ds->data;
+<a name="line164">164: </a>  PetscInt       i,j,off;
+<a name="line165">165: </a>  PetscScalar    *A,*B,*W,*X,*U,*Y,*E,*work,*beta,norm;
+<a name="line166">166: </a>  PetscBLASInt   info,n,ldd,nd,lrwork=0,lwork,one=1;
+<a name="line167">167: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line168">168: </a>  PetscReal      *rwork;
+<a name="line169">169: </a><font color="#A020F0">#else</font>
+<a name="line170">170: </a>  PetscScalar    norm0;
+<a name="line171">171: </a><font color="#A020F0">#endif</font>
+
+<a name="line174">174: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_A]) {
+<a name="line175">175: </a>    DSAllocateMat_Private(ds,DS_MAT_A);
+<a name="line176">176: </a>  }
+<a name="line177">177: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_B]) {
+<a name="line178">178: </a>    DSAllocateMat_Private(ds,DS_MAT_B);
+<a name="line179">179: </a>  }
+<a name="line180">180: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_W]) {
+<a name="line181">181: </a>    DSAllocateMat_Private(ds,DS_MAT_W);
+<a name="line182">182: </a>  }
+<a name="line183">183: </a>  <font color="#4169E1">if</font> (!ds->mat[DS_MAT_U]) {
+<a name="line184">184: </a>    DSAllocateMat_Private(ds,DS_MAT_U);
+<a name="line185">185: </a>  }
+<a name="line186">186: </a>  PetscBLASIntCast(ds->n*ctx->d,&nd);
+<a name="line187">187: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line188">188: </a>  PetscBLASIntCast(ds->ld*ctx->d,&ldd);
+<a name="line189">189: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line190">190: </a>  PetscBLASIntCast(nd+2*nd,&lwork);
+<a name="line191">191: </a>  PetscBLASIntCast(8*nd,&lrwork);
+<a name="line192">192: </a><font color="#A020F0">#else</font>
+<a name="line193">193: </a>  PetscBLASIntCast(nd+8*nd,&lwork);
+<a name="line194">194: </a><font color="#A020F0">#endif</font>
+<a name="line195">195: </a>  DSAllocateWork_Private(ds,lwork,lrwork,0);
+<a name="line196">196: </a>  beta = ds->work;
+<a name="line197">197: </a>  work = ds->work + nd;
+<a name="line198">198: </a>  lwork -= nd;
+<a name="line199">199: </a>  A = ds->mat[DS_MAT_A];
+<a name="line200">200: </a>  B = ds->mat[DS_MAT_B];
+<a name="line201">201: </a>  W = ds->mat[DS_MAT_W];
+<a name="line202">202: </a>  U = ds->mat[DS_MAT_U];
+<a name="line203">203: </a>  X = ds->mat[DS_MAT_X];
+<a name="line204">204: </a>  Y = ds->mat[DS_MAT_Y];
+<a name="line205">205: </a>  E = ds->mat[DSMatExtra[ctx->d]];
+
+<a name="line207">207: </a>  <font color="#B22222">/* build matrices A and B of the linearization */</font>
+<a name="line208">208: </a>  PetscMemzero(A,ldd*ldd*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line209">209: </a>  <font color="#4169E1">for</font> (i=0;i<nd-ds->n;i++) A[i+(i+ds->n)*ldd] = -1.0;
+<a name="line210">210: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->d;i++) {
+<a name="line211">211: </a>    off = i*ds->n*ldd+(ctx->d-1)*ds->n;
+<a name="line212">212: </a>    <font color="#4169E1">for</font> (j=0;j<ds->n;j++) {
+<a name="line213">213: </a>      PetscMemcpy(A+off+j*ldd,ds->mat[DSMatExtra[i]]+j*ds->ld,ds->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line214">214: </a>    }
 <a name="line215">215: </a>  }
-
-<a name="line217">217: </a>  <font color="#B22222">/* solve generalized eigenproblem */</font>
-<a name="line218">218: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line219">219: </a>  rwork = ds->rwork;
-<a name="line220">220: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKggev"</font>,LAPACKggev_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,&nd,A,&ldd,B,&ldd,wr,beta,NULL,&ldd,W,&ldd,work,&lwork,rwork,&info));
-<a name="line221">221: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack ZGGEV %d"</font>,info);
-<a name="line222">222: </a><font color="#A020F0">#else</font>
-<a name="line223">223: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKggev"</font>,LAPACKggev_(<font color="#666666">"N"</font>,<font color="#666666">"V"</font>,&nd,A,&ldd,B,&ldd,wr,wi,beta,NULL,&ldd,W,&ldd,work,&lwork,&info));
-<a name="line224">224: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack DGGEV %d"</font>,info);
-<a name="line225">225: </a><font color="#A020F0">#endif</font>
-
-<a name="line227">227: </a>  <font color="#B22222">/* copy eigenvalues */</font>
-<a name="line228">228: </a>  <font color="#4169E1">for</font> (i=0;i<nd;i++) {
-<a name="line229">229: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wr[i] = (PetscRealPart(wr[i])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line230">230: </a>    <font color="#4169E1">else</font> wr[i] /= beta[i];
-<a name="line231">231: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line232">232: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wi[i] = (wi[i]>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
-<a name="line233">233: </a>    <font color="#4169E1">else</font> wi[i] /= beta[i];
-<a name="line234">234: </a><font color="#A020F0">#else</font>
-<a name="line235">235: </a>    <font color="#4169E1">if</font> (wi) wi[i] = 0.0;
-<a name="line236">236: </a><font color="#A020F0">#endif</font>
-<a name="line237">237: </a>  }
-
-<a name="line239">239: </a>  <font color="#B22222">/* copy and normalize eigenvectors */</font>
-<a name="line240">240: </a>  <font color="#4169E1">for</font> (j=0;j<nd;j++) {
-<a name="line241">241: </a>    PetscMemcpy(X+j*ds->ld,W+j*ldd,ds->n*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line242">242: </a>  }
-<a name="line243">243: </a>  <font color="#4169E1">for</font> (j=0;j<nd;j++) {
-<a name="line244">244: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line245">245: </a>    <font color="#4169E1">if</font> (wi[j] != 0.0) {
-<a name="line246">246: </a>      norm = BLASnrm2_(&n,X+j*ds->ld,&one);
-<a name="line247">247: </a>      norm0 = BLASnrm2_(&n,X+(j+1)*ds->ld,&one);
-<a name="line248">248: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
-<a name="line249">249: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,X+j*ds->ld,&one));
-<a name="line250">250: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,X+(j+1)*ds->ld,&one));
-<a name="line251">251: </a>      j++;
-<a name="line252">252: </a>    } <font color="#4169E1">else</font>
-<a name="line253">253: </a><font color="#A020F0">#endif</font>
-<a name="line254">254: </a>    {
-<a name="line255">255: </a>      norm = 1.0/BLASnrm2_(&n,X+j*ds->ld,&one);
+<a name="line216">216: </a>  PetscMemzero(B,ldd*ldd*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line217">217: </a>  <font color="#4169E1">for</font> (i=0;i<nd-ds->n;i++) B[i+i*ldd] = -1.0;
+<a name="line218">218: </a>  off = (ctx->d-1)*ds->n*(ldd+1);
+<a name="line219">219: </a>  <font color="#4169E1">for</font> (j=0;j<ds->n;j++) {
+<a name="line220">220: </a>    <font color="#4169E1">for</font> (i=0;i<ds->n;i++) B[off+i+j*ldd] = -E[i+j*ds->ld];
+<a name="line221">221: </a>  }
+
+<a name="line223">223: </a>  <font color="#B22222">/* solve generalized eigenproblem */</font>
+<a name="line224">224: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line225">225: </a>  rwork = ds->rwork;
+<a name="line226">226: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKggev"</font>,LAPACKggev_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,&nd,A,&ldd,B,&ldd,wr,beta,U,&ldd,W,&ldd,work,&lwork,rwork,&info));
+<a name="line227">227: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack ZGGEV %d"</font>,info);
+<a name="line228">228: </a><font color="#A020F0">#else</font>
+<a name="line229">229: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKggev"</font>,LAPACKggev_(<font color="#666666">"V"</font>,<font color="#666666">"V"</font>,&nd,A,&ldd,B,&ldd,wr,wi,beta,U,&ldd,W,&ldd,work,&lwork,&info));
+<a name="line230">230: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack DGGEV %d"</font>,info);
+<a name="line231">231: </a><font color="#A020F0">#endif</font>
+
+<a name="line233">233: </a>  <font color="#B22222">/* copy eigenvalues */</font>
+<a name="line234">234: </a>  <font color="#4169E1">for</font> (i=0;i<nd;i++) {
+<a name="line235">235: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wr[i] = (PetscRealPart(wr[i])>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line236">236: </a>    <font color="#4169E1">else</font> wr[i] /= beta[i];
+<a name="line237">237: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line238">238: </a>    <font color="#4169E1">if</font> (beta[i]==0.0) wi[i] = (wi[i]>0.0)? PETSC_MAX_REAL: PETSC_MIN_REAL;
+<a name="line239">239: </a>    <font color="#4169E1">else</font> wi[i] /= beta[i];
+<a name="line240">240: </a><font color="#A020F0">#else</font>
+<a name="line241">241: </a>    <font color="#4169E1">if</font> (wi) wi[i] = 0.0;
+<a name="line242">242: </a><font color="#A020F0">#endif</font>
+<a name="line243">243: </a>  }
+
+<a name="line245">245: </a>  <font color="#B22222">/* copy and normalize eigenvectors */</font>
+<a name="line246">246: </a>  <font color="#4169E1">for</font> (j=0;j<nd;j++) {
+<a name="line247">247: </a>    PetscMemcpy(X+j*ds->ld,W+j*ldd,ds->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line248">248: </a>    PetscMemcpy(Y+j*ds->ld,U+ds->n*(ctx->d-1)+j*ldd,ds->n*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line249">249: </a>  }
+<a name="line250">250: </a>  <font color="#4169E1">for</font> (j=0;j<nd;j++) {
+<a name="line251">251: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line252">252: </a>    <font color="#4169E1">if</font> (wi[j] != 0.0) {
+<a name="line253">253: </a>      norm = BLASnrm2_(&n,X+j*ds->ld,&one);
+<a name="line254">254: </a>      norm0 = BLASnrm2_(&n,X+(j+1)*ds->ld,&one);
+<a name="line255">255: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
 <a name="line256">256: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,X+j*ds->ld,&one));
-<a name="line257">257: </a>    }
-<a name="line258">258: </a>  }
-<a name="line259">259: </a>  <font color="#4169E1">return</font>(0);
-<a name="line260">260: </a><font color="#A020F0">#endif</font>
-<a name="line261">261: </a>}
-
-<a name="line265">265: </a><strong><font color="#4169E1"><a name="DSPEPSetDegree_PEP"></a>static PetscErrorCode DSPEPSetDegree_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt d)</font></strong>
-<a name="line266">266: </a>{
-<a name="line267">267: </a>  DS_PEP *ctx = (DS_PEP*)ds->data;
-
-<a name="line270">270: </a>  <font color="#4169E1">if</font> (d<0) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The degree must be a non-negative integer"</font>);
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (d>=DS_NUM_EXTRA) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Only implemented for polynomials of degree at most %d"</font>,DS_NUM_EXTRA-1);
-<a name="line272">272: </a>  ctx->d = d;
+<a name="line257">257: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,X+(j+1)*ds->ld,&one));
+<a name="line258">258: </a>      norm = BLASnrm2_(&n,Y+j*ds->ld,&one);
+<a name="line259">259: </a>      norm0 = BLASnrm2_(&n,Y+(j+1)*ds->ld,&one);
+<a name="line260">260: </a>      norm = 1.0/SlepcAbsEigenvalue(norm,norm0);
+<a name="line261">261: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,Y+j*ds->ld,&one));
+<a name="line262">262: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,Y+(j+1)*ds->ld,&one));
+<a name="line263">263: </a>      j++;
+<a name="line264">264: </a>    } <font color="#4169E1">else</font>
+<a name="line265">265: </a><font color="#A020F0">#endif</font>
+<a name="line266">266: </a>    {
+<a name="line267">267: </a>      norm = 1.0/BLASnrm2_(&n,X+j*ds->ld,&one);
+<a name="line268">268: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,X+j*ds->ld,&one));
+<a name="line269">269: </a>      norm = 1.0/BLASnrm2_(&n,Y+j*ds->ld,&one);
+<a name="line270">270: </a>      PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&n,&norm,Y+j*ds->ld,&one));
+<a name="line271">271: </a>    }
+<a name="line272">272: </a>  }
 <a name="line273">273: </a>  <font color="#4169E1">return</font>(0);
-<a name="line274">274: </a>}
+<a name="line274">274: </a><font color="#A020F0">#endif</font>
+<a name="line275">275: </a>}
+
+<a name="line279">279: </a><strong><font color="#4169E1"><a name="DSPEPSetDegree_PEP"></a>static PetscErrorCode DSPEPSetDegree_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt d)</font></strong>
+<a name="line280">280: </a>{
+<a name="line281">281: </a>  DS_PEP *ctx = (DS_PEP*)ds->data;
+
+<a name="line284">284: </a>  <font color="#4169E1">if</font> (d<0) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The degree must be a non-negative integer"</font>);
+<a name="line285">285: </a>  <font color="#4169E1">if</font> (d>=DS_NUM_EXTRA) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Only implemented for polynomials of degree at most %D"</font>,DS_NUM_EXTRA-1);
+<a name="line286">286: </a>  ctx->d = d;
+<a name="line287">287: </a>  <font color="#4169E1">return</font>(0);
+<a name="line288">288: </a>}
 
-<a name="line278">278: </a><font color="#B22222">/*@</font>
-<a name="line279">279: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a> - Sets the polynomial degree for a DSPEP.</font>
+<a name="line292">292: </a><font color="#B22222">/*@</font>
+<a name="line293">293: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a> - Sets the polynomial degree for a DSPEP.</font>
 
-<a name="line281">281: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line295">295: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line283">283: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line284">284: </a><font color="#B22222">+  ds - the direct solver context</font>
-<a name="line285">285: </a><font color="#B22222">-  d  - the degree</font>
+<a name="line297">297: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line298">298: </a><font color="#B22222">+  ds - the direct solver context</font>
+<a name="line299">299: </a><font color="#B22222">-  d  - the degree</font>
 
-<a name="line287">287: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line301">301: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line289">289: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>()</font>
-<a name="line290">290: </a><font color="#B22222">@*/</font>
-<a name="line291">291: </a><strong><font color="#4169E1"><a name="DSPEPSetDegree"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt d)</font></strong>
-<a name="line292">292: </a>{
+<a name="line303">303: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>()</font>
+<a name="line304">304: </a><font color="#B22222">@*/</font>
+<a name="line305">305: </a><strong><font color="#4169E1"><a name="DSPEPSetDegree"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt d)</font></strong>
+<a name="line306">306: </a>{
 
-<a name="line298">298: </a>  PetscTryMethod(ds,<font color="#666666">"DSPEPSetDegree_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt),(ds,d));
-<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
-<a name="line300">300: </a>}
+<a name="line312">312: </a>  PetscTryMethod(ds,<font color="#666666">"DSPEPSetDegree_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt),(ds,d));
+<a name="line313">313: </a>  <font color="#4169E1">return</font>(0);
+<a name="line314">314: </a>}
 
-<a name="line304">304: </a><strong><font color="#4169E1"><a name="DSPEPGetDegree_PEP"></a>static PetscErrorCode DSPEPGetDegree_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *d)</font></strong>
-<a name="line305">305: </a>{
-<a name="line306">306: </a>  DS_PEP *ctx = (DS_PEP*)ds->data;
+<a name="line318">318: </a><strong><font color="#4169E1"><a name="DSPEPGetDegree_PEP"></a>static PetscErrorCode DSPEPGetDegree_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *d)</font></strong>
+<a name="line319">319: </a>{
+<a name="line320">320: </a>  DS_PEP *ctx = (DS_PEP*)ds->data;
 
-<a name="line309">309: </a>  *d = ctx->d;
-<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>}
+<a name="line323">323: </a>  *d = ctx->d;
+<a name="line324">324: </a>  <font color="#4169E1">return</font>(0);
+<a name="line325">325: </a>}
 
-<a name="line315">315: </a><font color="#B22222">/*@</font>
-<a name="line316">316: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a> - Returns the polynomial degree for a DSPEP.</font>
+<a name="line329">329: </a><font color="#B22222">/*@</font>
+<a name="line330">330: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a> - Returns the polynomial degree for a DSPEP.</font>
 
-<a name="line318">318: </a><font color="#B22222">   Not collective</font>
+<a name="line332">332: </a><font color="#B22222">   Not collective</font>
 
-<a name="line320">320: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line321">321: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line334">334: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line335">335: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line323">323: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line324">324: </a><font color="#B22222">.  d - the degree</font>
+<a name="line337">337: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line338">338: </a><font color="#B22222">.  d - the degree</font>
 
-<a name="line326">326: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line340">340: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line328">328: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>()</font>
-<a name="line329">329: </a><font color="#B22222">@*/</font>
-<a name="line330">330: </a><strong><font color="#4169E1"><a name="DSPEPGetDegree"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *d)</font></strong>
-<a name="line331">331: </a>{
+<a name="line342">342: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/DS/DSPEPSetDegree.html#DSPEPSetDegree">DSPEPSetDegree</a>()</font>
+<a name="line343">343: </a><font color="#B22222">@*/</font>
+<a name="line344">344: </a><strong><font color="#4169E1"><a name="DSPEPGetDegree"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *d)</font></strong>
+<a name="line345">345: </a>{
 
-<a name="line337">337: </a>  PetscTryMethod(ds,<font color="#666666">"DSPEPGetDegree_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*),(ds,d));
-<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
-<a name="line339">339: </a>}
+<a name="line351">351: </a>  PetscUseMethod(ds,<font color="#666666">"DSPEPGetDegree_C"</font>,(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a>,PetscInt*),(ds,d));
+<a name="line352">352: </a>  <font color="#4169E1">return</font>(0);
+<a name="line353">353: </a>}
 
-<a name="line343">343: </a><strong><font color="#4169E1"><a name="DSDestroy_PEP"></a>PetscErrorCode DSDestroy_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line344">344: </a>{
+<a name="line357">357: </a><strong><font color="#4169E1"><a name="DSDestroy_PEP"></a>PetscErrorCode DSDestroy_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line358">358: </a>{
 
-<a name="line348">348: </a>  PetscFree(ds->data);
-<a name="line349">349: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPSetDegree_C"</font>,NULL);
-<a name="line350">350: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPGetDegree_C"</font>,NULL);
-<a name="line351">351: </a>  <font color="#4169E1">return</font>(0);
-<a name="line352">352: </a>}
+<a name="line362">362: </a>  PetscFree(ds->data);
+<a name="line363">363: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPSetDegree_C"</font>,NULL);
+<a name="line364">364: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPGetDegree_C"</font>,NULL);
+<a name="line365">365: </a>  <font color="#4169E1">return</font>(0);
+<a name="line366">366: </a>}
 
-<a name="line356">356: </a><strong><font color="#4169E1"><a name="DSCreate_PEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line357">357: </a>{
-<a name="line358">358: </a>  DS_PEP         *ctx;
+<a name="line370">370: </a><strong><font color="#4169E1"><a name="DSCreate_PEP"></a>PETSC_EXTERN PetscErrorCode DSCreate_PEP(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line371">371: </a>{
+<a name="line372">372: </a>  DS_PEP         *ctx;
 
-<a name="line362">362: </a>  PetscNewLog(ds,&ctx);
-<a name="line363">363: </a>  ds->data = (void*)ctx;
+<a name="line376">376: </a>  PetscNewLog(ds,&ctx);
+<a name="line377">377: </a>  ds->data = (void*)ctx;
 
-<a name="line365">365: </a>  ds->ops->allocate      = DSAllocate_PEP;
-<a name="line366">366: </a>  ds->ops->view          = DSView_PEP;
-<a name="line367">367: </a>  ds->ops->vectors       = DSVectors_PEP;
-<a name="line368">368: </a>  ds->ops->solve[0]      = DSSolve_PEP_QZ;
-<a name="line369">369: </a>  ds->ops->sort          = DSSort_PEP;
-<a name="line370">370: </a>  ds->ops->normalize     = DSNormalize_PEP;
-<a name="line371">371: </a>  ds->ops->destroy       = DSDestroy_PEP;
-<a name="line372">372: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPSetDegree_C"</font>,DSPEPSetDegree_PEP);
-<a name="line373">373: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPGetDegree_C"</font>,DSPEPGetDegree_PEP);
-<a name="line374">374: </a>  <font color="#4169E1">return</font>(0);
-<a name="line375">375: </a>}
+<a name="line379">379: </a>  ds->ops->allocate      = DSAllocate_PEP;
+<a name="line380">380: </a>  ds->ops->view          = DSView_PEP;
+<a name="line381">381: </a>  ds->ops->vectors       = DSVectors_PEP;
+<a name="line382">382: </a>  ds->ops->solve[0]      = DSSolve_PEP_QZ;
+<a name="line383">383: </a>  ds->ops->sort          = DSSort_PEP;
+<a name="line384">384: </a>  ds->ops->normalize     = DSNormalize_PEP;
+<a name="line385">385: </a>  ds->ops->destroy       = DSDestroy_PEP;
+<a name="line386">386: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPSetDegree_C"</font>,DSPEPSetDegree_PEP);
+<a name="line387">387: </a>  PetscObjectComposeFunction((PetscObject)ds,<font color="#666666">"DSPEPGetDegree_C"</font>,DSPEPGetDegree_PEP);
+<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
+<a name="line389">389: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/impls/pep/index.html b/src/sys/classes/ds/impls/pep/index.html
index 25eefd5..ad6a68b 100644
--- a/src/sys/classes/ds/impls/pep/index.html
+++ b/src/sys/classes/ds/impls/pep/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/pep/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/pep/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/pep/makefile b/src/sys/classes/ds/impls/pep/makefile
index 88cff2c..5a1ff58 100644
--- a/src/sys/classes/ds/impls/pep/makefile
+++ b/src/sys/classes/ds/impls/pep/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/pep/makefile.html b/src/sys/classes/ds/impls/pep/makefile.html
index 78a5484..8ccdc1c 100644
--- a/src/sys/classes/ds/impls/pep/makefile.html
+++ b/src/sys/classes/ds/impls/pep/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/pep/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:59+00:00">
+<meta name="date" content="2016-05-16T10:31:51+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/pep/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/pep/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/impls/svd/dssvd.c b/src/sys/classes/ds/impls/svd/dssvd.c
index e300bb6..34a6090 100644
--- a/src/sys/classes/ds/impls/svd/dssvd.c
+++ b/src/sys/classes/ds/impls/svd/dssvd.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -41,10 +41,10 @@ PetscErrorCode DSAllocate_SVD(DS ds,PetscInt ld)
 
 /*   0       l           k                 n-1
     -----------------------------------------
-    |*       ·           ·                  |
-    |  *     ·           ·                  |
-    |    *   ·           ·                  |
-    |      * ·           ·                  |
+    |*       .           .                  |
+    |  *     .           .                  |
+    |    *   .           .                  |
+    |      * .           .                  |
     |        o           o                  |
     |          o         o                  |
     |            o       o                  |
diff --git a/src/sys/classes/ds/impls/svd/dssvd.c.html b/src/sys/classes/ds/impls/svd/dssvd.c.html
index 6fc56c1..f5acd81 100644
--- a/src/sys/classes/ds/impls/svd/dssvd.c.html
+++ b/src/sys/classes/ds/impls/svd/dssvd.c.html
@@ -1 +1,304 @@
 <center><a href="dssvd.c">Actual source code: dssvd.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/svd/dssvd.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:31:49+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/svd/dssvd.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a><font color="#A020F0">#include <slepc/private/dsimpl.h></font>
+<a name="line23"> 23: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line27"> 27: </a><strong><font color="#4169E1"><a name="DSAllocate_SVD"></a>PetscErrorCode DSAllocate_SVD(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt ld)</font></strong>
+<a name="line28"> 28: </a>{
+
+<a name="line32"> 32: </a>  DSAllocateMat_Private(ds,DS_MAT_A);
+<a name="line33"> 33: </a>  DSAllocateMat_Private(ds,DS_MAT_U);
+<a name="line34"> 34: </a>  DSAllocateMat_Private(ds,DS_MAT_VT);
+<a name="line35"> 35: </a>  DSAllocateMatReal_Private(ds,DS_MAT_T);
+<a name="line36"> 36: </a>  PetscFree(ds->perm);
+<a name="line37"> 37: </a>  PetscMalloc1(ld,&ds->perm);
+<a name="line38"> 38: </a>  PetscLogObjectMemory((PetscObject)ds,ld*<font color="#4169E1">sizeof</font>(PetscInt));
+<a name="line39"> 39: </a>  <font color="#4169E1">return</font>(0);
+<a name="line40"> 40: </a>}
+
+<a name="line42"> 42: </a><font color="#B22222">/*   0       l           k                 n-1</font>
+<a name="line43"> 43: </a><font color="#B22222">    -----------------------------------------</font>
+<a name="line44"> 44: </a><font color="#B22222">    |*       .           .                  |</font>
+<a name="line45"> 45: </a><font color="#B22222">    |  *     .           .                  |</font>
+<a name="line46"> 46: </a><font color="#B22222">    |    *   .           .                  |</font>
+<a name="line47"> 47: </a><font color="#B22222">    |      * .           .                  |</font>
+<a name="line48"> 48: </a><font color="#B22222">    |        o           o                  |</font>
+<a name="line49"> 49: </a><font color="#B22222">    |          o         o                  |</font>
+<a name="line50"> 50: </a><font color="#B22222">    |            o       o                  |</font>
+<a name="line51"> 51: </a><font color="#B22222">    |              o     o                  |</font>
+<a name="line52"> 52: </a><font color="#B22222">    |                o   o                  |</font>
+<a name="line53"> 53: </a><font color="#B22222">    |                  o o                  |</font>
+<a name="line54"> 54: </a><font color="#B22222">    |                    o x                |</font>
+<a name="line55"> 55: </a><font color="#B22222">    |                      x x              |</font>
+<a name="line56"> 56: </a><font color="#B22222">    |                        x x            |</font>
+<a name="line57"> 57: </a><font color="#B22222">    |                          x x          |</font>
+<a name="line58"> 58: </a><font color="#B22222">    |                            x x        |</font>
+<a name="line59"> 59: </a><font color="#B22222">    |                              x x      |</font>
+<a name="line60"> 60: </a><font color="#B22222">    |                                x x    |</font>
+<a name="line61"> 61: </a><font color="#B22222">    |                                  x x  |</font>
+<a name="line62"> 62: </a><font color="#B22222">    |                                    x x|</font>
+<a name="line63"> 63: </a><font color="#B22222">    |                                      x|</font>
+<a name="line64"> 64: </a><font color="#B22222">    -----------------------------------------</font>
+<a name="line65"> 65: </a><font color="#B22222">*/</font>
+
+<a name="line69"> 69: </a><strong><font color="#4169E1"><a name="DSSwitchFormat_SVD"></a>static PetscErrorCode DSSwitchFormat_SVD(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool tocompact)</font></strong>
+<a name="line70"> 70: </a>{
+<a name="line72"> 72: </a>  PetscReal      *T = ds->rmat[DS_MAT_T];
+<a name="line73"> 73: </a>  PetscScalar    *A = ds->mat[DS_MAT_A];
+<a name="line74"> 74: </a>  PetscInt       i,m=ds->m,k=ds->k,ld=ds->ld;
+
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (!m) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"m was not set"</font>);
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (tocompact) { <font color="#B22222">/* switch from dense (arrow) to compact storage */</font>
+<a name="line79"> 79: </a>    PetscMemzero(T,3*ld*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line80"> 80: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line81"> 81: </a>      T[i] = PetscRealPart(A[i+i*ld]);
+<a name="line82"> 82: </a>      T[i+ld] = PetscRealPart(A[i+k*ld]);
+<a name="line83"> 83: </a>    }
+<a name="line84"> 84: </a>    <font color="#4169E1">for</font> (i=k;i<m-1;i++) {
+<a name="line85"> 85: </a>      T[i] = PetscRealPart(A[i+i*ld]);
+<a name="line86"> 86: </a>      T[i+ld] = PetscRealPart(A[i+(i+1)*ld]);
+<a name="line87"> 87: </a>    }
+<a name="line88"> 88: </a>    T[m-1] = PetscRealPart(A[m-1+(m-1)*ld]);
+<a name="line89"> 89: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* switch from compact (arrow) to dense storage */</font>
+<a name="line90"> 90: </a>    PetscMemzero(A,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line91"> 91: </a>    <font color="#4169E1">for</font> (i=0;i<k;i++) {
+<a name="line92"> 92: </a>      A[i+i*ld] = T[i];
+<a name="line93"> 93: </a>      A[i+k*ld] = T[i+ld];
+<a name="line94"> 94: </a>    }
+<a name="line95"> 95: </a>    A[k+k*ld] = T[k];
+<a name="line96"> 96: </a>    <font color="#4169E1">for</font> (i=k+1;i<m;i++) {
+<a name="line97"> 97: </a>      A[i+i*ld] = T[i];
+<a name="line98"> 98: </a>      A[i-1+i*ld] = T[i-1+ld];
+<a name="line99"> 99: </a>    }
+<a name="line100">100: </a>  }
+<a name="line101">101: </a>  <font color="#4169E1">return</font>(0);
+<a name="line102">102: </a>}
+
+<a name="line106">106: </a><strong><font color="#4169E1"><a name="DSView_SVD"></a>PetscErrorCode DSView_SVD(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer)</font></strong>
+<a name="line107">107: </a>{
+<a name="line108">108: </a>  PetscErrorCode    ierr;
+<a name="line109">109: </a>  PetscViewerFormat format;
+<a name="line110">110: </a>  PetscInt          i,j,r,c;
+<a name="line111">111: </a>  PetscReal         value;
+
+<a name="line114">114: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line115">115: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) {
+<a name="line116">116: </a>    <font color="#4169E1">return</font>(0);
+<a name="line117">117: </a>  }
+<a name="line118">118: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line119">119: </a>    <font color="#4169E1">if</font> (!ds->m) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"m was not set"</font>);
+<a name="line120">120: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line121">121: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
+<a name="line122">122: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%% Size = %D %D\n"</font>,ds->n,ds->m);
+<a name="line123">123: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"zzz = zeros(%D,3);\n"</font>,2*ds->n);
+<a name="line124">124: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"zzz = [\n"</font>);
+<a name="line125">125: </a>      <font color="#4169E1">for</font> (i=0;i<PetscMin(ds->n,ds->m);i++) {
+<a name="line126">126: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D %D  %18.16e\n"</font>,i+1,i+1,*(ds->rmat[DS_MAT_T]+i));
+<a name="line127">127: </a>      }
+<a name="line128">128: </a>      <font color="#4169E1">for</font> (i=0;i<PetscMin(ds->n,ds->m)-1;i++) {
+<a name="line129">129: </a>        r = PetscMax(i+2,ds->k+1);
+<a name="line130">130: </a>        c = i+1;
+<a name="line131">131: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%D %D  %18.16e\n"</font>,c,r,*(ds->rmat[DS_MAT_T]+ds->ld+i));
+<a name="line132">132: </a>      }
+<a name="line133">133: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n%s = spconvert(zzz);\n"</font>,DSMatName[DS_MAT_T]);
+<a name="line134">134: </a>    } <font color="#4169E1">else</font> {
+<a name="line135">135: </a>      <font color="#4169E1">for</font> (i=0;i<ds->n;i++) {
+<a name="line136">136: </a>        <font color="#4169E1">for</font> (j=0;j<ds->m;j++) {
+<a name="line137">137: </a>          <font color="#4169E1">if</font> (i==j) value = *(ds->rmat[DS_MAT_T]+i);
+<a name="line138">138: </a>          <font color="#4169E1">else</font> <font color="#4169E1">if</font> (i<ds->k && j==ds->k) value = *(ds->rmat[DS_MAT_T]+ds->ld+PetscMin(i,j));
+<a name="line139">139: </a>          <font color="#4169E1">else</font> <font color="#4169E1">if</font> (i==j+1 && i>ds->k) value = *(ds->rmat[DS_MAT_T]+ds->ld+i-1);
+<a name="line140">140: </a>          <font color="#4169E1">else</font> value = 0.0;
+<a name="line141">141: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">" %18.16e "</font>,value);
+<a name="line142">142: </a>        }
+<a name="line143">143: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line144">144: </a>      }
+<a name="line145">145: </a>    }
+<a name="line146">146: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line147">147: </a>    PetscViewerFlush(viewer);
+<a name="line148">148: </a>  } <font color="#4169E1">else</font> {
+<a name="line149">149: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_A);
+<a name="line150">150: </a>  }
+<a name="line151">151: </a>  <font color="#4169E1">if</font> (ds->state>DS_STATE_INTERMEDIATE) {
+<a name="line152">152: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_U);
+<a name="line153">153: </a>    <a href="../../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(ds,viewer,DS_MAT_VT);
+<a name="line154">154: </a>  }
+<a name="line155">155: </a>  <font color="#4169E1">return</font>(0);
+<a name="line156">156: </a>}
+
+<a name="line160">160: </a><strong><font color="#4169E1"><a name="DSVectors_SVD"></a>PetscErrorCode DSVectors_SVD(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *j,PetscReal *rnorm)</font></strong>
+<a name="line161">161: </a>{
+<a name="line163">163: </a>  <font color="#4169E1">switch</font> (mat) {
+<a name="line164">164: </a>    <font color="#4169E1">case</font> DS_MAT_U:
+<a name="line165">165: </a>    <font color="#4169E1">case</font> DS_MAT_VT:
+<a name="line166">166: </a>      <font color="#4169E1">break</font>;
+<a name="line167">167: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line168">168: </a>      SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Invalid mat parameter"</font>);
+<a name="line169">169: </a>  }
+<a name="line170">170: </a>  <font color="#4169E1">return</font>(0);
+<a name="line171">171: </a>}
+
+<a name="line175">175: </a><strong><font color="#4169E1"><a name="DSSort_SVD"></a>PetscErrorCode DSSort_SVD(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscScalar *rr,PetscScalar *ri,PetscInt *k)</font></strong>
+<a name="line176">176: </a>{
+<a name="line178">178: </a>  PetscInt       n,l,i,*perm,ld=ds->ld;
+<a name="line179">179: </a>  PetscScalar    *A;
+<a name="line180">180: </a>  PetscReal      *d;
+
+<a name="line183">183: </a>  <font color="#4169E1">if</font> (!ds->sc) <font color="#4169E1">return</font>(0);
+<a name="line184">184: </a>  l = ds->l;
+<a name="line185">185: </a>  n = PetscMin(ds->n,ds->m);
+<a name="line186">186: </a>  A = ds->mat[DS_MAT_A];
+<a name="line187">187: </a>  d = ds->rmat[DS_MAT_T];
+<a name="line188">188: </a>  perm = ds->perm;
+<a name="line189">189: </a>  <font color="#4169E1">if</font> (!rr) {
+<a name="line190">190: </a>    DSSortEigenvaluesReal_Private(ds,d,perm);
+<a name="line191">191: </a>  } <font color="#4169E1">else</font> {
+<a name="line192">192: </a>    DSSortEigenvalues_Private(ds,rr,ri,perm,PETSC_FALSE);
+<a name="line193">193: </a>  }
+<a name="line194">194: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) wr[i] = d[perm[i]];
+<a name="line195">195: </a>  DSPermuteBoth_Private(ds,l,n,DS_MAT_U,DS_MAT_VT,perm);
+<a name="line196">196: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) d[i] = PetscRealPart(wr[i]);
+<a name="line197">197: </a>  <font color="#4169E1">if</font> (!ds->compact) {
+<a name="line198">198: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) A[i+i*ld] = wr[i];
+<a name="line199">199: </a>  }
+<a name="line200">200: </a>  <font color="#4169E1">return</font>(0);
+<a name="line201">201: </a>}
+
+<a name="line205">205: </a><strong><font color="#4169E1"><a name="DSSolve_SVD_DC"></a>PetscErrorCode DSSolve_SVD_DC(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi)</font></strong>
+<a name="line206">206: </a>{
+<a name="line207">207: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GESDD) || defined(SLEPC_MISSING_LAPACK_BDSDC)</font>
+<a name="line209">209: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESDD/BDSDC - Lapack routines are unavailable"</font>);
+<a name="line210">210: </a><font color="#A020F0">#else</font>
+<a name="line212">212: </a>  PetscInt       i;
+<a name="line213">213: </a>  PetscBLASInt   n1,n2,n3,m2,m3,info,l,n,m,nm,ld,off,lwork;
+<a name="line214">214: </a>  PetscScalar    *A,*U,*VT,qwork;
+<a name="line215">215: </a>  PetscReal      *d,*e,*Ur,*VTr;
+<a name="line216">216: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line217">217: </a>  PetscInt       j;
+<a name="line218">218: </a><font color="#A020F0">#endif</font>
+
+<a name="line221">221: </a>  PetscBLASIntCast(ds->n,&n);
+<a name="line222">222: </a>  PetscBLASIntCast(ds->m,&m);
+<a name="line223">223: </a>  PetscBLASIntCast(ds->l,&l);
+<a name="line224">224: </a>  PetscBLASIntCast(ds->ld,&ld);
+<a name="line225">225: </a>  PetscBLASIntCast(ds->k-l+1,&n1); <font color="#B22222">/* size of leading block, excl. locked */</font>
+<a name="line226">226: </a>  PetscBLASIntCast(n-ds->k-1,&n2); <font color="#B22222">/* size of trailing block */</font>
+<a name="line227">227: </a>  PetscBLASIntCast(m-ds->k-1,&m2);
+<a name="line228">228: </a>  n3 = n1+n2;
+<a name="line229">229: </a>  m3 = n1+m2;
+<a name="line230">230: </a>  off = l+l*ld;
+<a name="line231">231: </a>  A  = ds->mat[DS_MAT_A];
+<a name="line232">232: </a>  U  = ds->mat[DS_MAT_U];
+<a name="line233">233: </a>  VT = ds->mat[DS_MAT_VT];
+<a name="line234">234: </a>  d  = ds->rmat[DS_MAT_T];
+<a name="line235">235: </a>  e  = ds->rmat[DS_MAT_T]+ld;
+<a name="line236">236: </a>  PetscMemzero(U,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line237">237: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) U[i+i*ld] = 1.0;
+<a name="line238">238: </a>  PetscMemzero(VT,ld*ld*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line239">239: </a>  <font color="#4169E1">for</font> (i=0;i<l;i++) VT[i+i*ld] = 1.0;
+
+<a name="line241">241: </a>  <font color="#4169E1">if</font> (ds->state>DS_STATE_RAW) {
+<a name="line242">242: </a>    <font color="#B22222">/* Solve bidiagonal <a href="../../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> problem */</font>
+<a name="line243">243: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) wr[i] = d[i];
+<a name="line244">244: </a>    DSAllocateWork_Private(ds,0,3*ld*ld+4*ld,8*ld);
+<a name="line245">245: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line246">246: </a>    DSAllocateMatReal_Private(ds,DS_MAT_U);
+<a name="line247">247: </a>    DSAllocateMatReal_Private(ds,DS_MAT_VT);
+<a name="line248">248: </a>    Ur  = ds->rmat[DS_MAT_U];
+<a name="line249">249: </a>    VTr = ds->rmat[DS_MAT_VT];
+<a name="line250">250: </a><font color="#A020F0">#else</font>
+<a name="line251">251: </a>    Ur  = U;
+<a name="line252">252: </a>    VTr = VT;
+<a name="line253">253: </a><font color="#A020F0">#endif</font>
+<a name="line254">254: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKbdsdc"</font>,LAPACKbdsdc_(<font color="#666666">"U"</font>,<font color="#666666">"I"</font>,&n3,d+l,e+l,Ur+off,&ld,VTr+off,&ld,NULL,NULL,ds->rwork,ds->iwork,&info));
+<a name="line255">255: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xBDSDC %d"</font>,info);
+<a name="line256">256: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line257">257: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line258">258: </a>      <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line259">259: </a>        U[i+j*ld] = Ur[i+j*ld];
+<a name="line260">260: </a>        VT[i+j*ld] = VTr[i+j*ld];
+<a name="line261">261: </a>      }
+<a name="line262">262: </a>    }
+<a name="line263">263: </a><font color="#A020F0">#endif</font>
+<a name="line264">264: </a>  } <font color="#4169E1">else</font> {
+<a name="line265">265: </a>    <font color="#B22222">/* Solve general rectangular <a href="../../../../../../docs/manualpages/SVD/SVD.html#SVD">SVD</a> problem */</font>
+<a name="line266">266: </a>    <font color="#4169E1">if</font> (ds->compact) { DSSwitchFormat_SVD(ds,PETSC_FALSE); }
+<a name="line267">267: </a>    <font color="#4169E1">for</font> (i=0;i<l;i++) wr[i] = d[i];
+<a name="line268">268: </a>    nm = PetscMin(n,m);
+<a name="line269">269: </a>    DSAllocateWork_Private(ds,0,0,8*nm);
+<a name="line270">270: </a>    lwork = -1;
+<a name="line271">271: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line272">272: </a>    DSAllocateWork_Private(ds,0,5*nm*nm+7*nm,0);
+<a name="line273">273: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesdd"</font>,LAPACKgesdd_(<font color="#666666">"A"</font>,&n3,&m3,A+off,&ld,d+l,U+off,&ld,VT+off,&ld,&qwork,&lwork,ds->rwork,ds->iwork,&info));
+<a name="line274">274: </a><font color="#A020F0">#else</font>
+<a name="line275">275: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesdd"</font>,LAPACKgesdd_(<font color="#666666">"A"</font>,&n3,&m3,A+off,&ld,d+l,U+off,&ld,VT+off,&ld,&qwork,&lwork,ds->iwork,&info));
+<a name="line276">276: </a><font color="#A020F0">#endif</font>
+<a name="line277">277: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESDD %d"</font>,info);
+<a name="line278">278: </a>    PetscBLASIntCast((PetscInt)PetscRealPart(qwork),&lwork);
+<a name="line279">279: </a>    DSAllocateWork_Private(ds,lwork,0,0);
+<a name="line280">280: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line281">281: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesdd"</font>,LAPACKgesdd_(<font color="#666666">"A"</font>,&n3,&m3,A+off,&ld,d+l,U+off,&ld,VT+off,&ld,ds->work,&lwork,ds->rwork,ds->iwork,&info));
+<a name="line282">282: </a><font color="#A020F0">#else</font>
+<a name="line283">283: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesdd"</font>,LAPACKgesdd_(<font color="#666666">"A"</font>,&n3,&m3,A+off,&ld,d+l,U+off,&ld,VT+off,&ld,ds->work,&lwork,ds->iwork,&info));
+<a name="line284">284: </a><font color="#A020F0">#endif</font>
+<a name="line285">285: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESDD %d"</font>,info);
+<a name="line286">286: </a>  }
+<a name="line287">287: </a>  <font color="#4169E1">for</font> (i=l;i<PetscMin(ds->n,ds->m);i++) wr[i] = d[i];
+
+<a name="line289">289: </a>  <font color="#B22222">/* Create diagonal matrix as a result */</font>
+<a name="line290">290: </a>  <font color="#4169E1">if</font> (ds->compact) {
+<a name="line291">291: </a>    PetscMemzero(e,(n-1)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line292">292: </a>  } <font color="#4169E1">else</font> {
+<a name="line293">293: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line294">294: </a>      PetscMemzero(A+l+i*ld,(n-l)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line295">295: </a>    }
+<a name="line296">296: </a>    <font color="#4169E1">for</font> (i=l;i<n;i++) A[i+i*ld] = d[i];
+<a name="line297">297: </a>  }
+<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
+<a name="line299">299: </a><font color="#A020F0">#endif</font>
+<a name="line300">300: </a>}
+
+<a name="line304">304: </a><strong><font color="#4169E1"><a name="DSCreate_SVD"></a>PETSC_EXTERN PetscErrorCode DSCreate_SVD(<a href="../../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line305">305: </a>{
+<a name="line307">307: </a>  ds->ops->allocate      = DSAllocate_SVD;
+<a name="line308">308: </a>  ds->ops->view          = DSView_SVD;
+<a name="line309">309: </a>  ds->ops->vectors       = DSVectors_SVD;
+<a name="line310">310: </a>  ds->ops->solve[0]      = DSSolve_SVD_DC;
+<a name="line311">311: </a>  ds->ops->sort          = DSSort_SVD;
+<a name="line312">312: </a>  <font color="#4169E1">return</font>(0);
+<a name="line313">313: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/ds/impls/svd/index.html b/src/sys/classes/ds/impls/svd/index.html
index ecf5f4f..914b3ba 100644
--- a/src/sys/classes/ds/impls/svd/index.html
+++ b/src/sys/classes/ds/impls/svd/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/svd/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/svd/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/impls/svd/makefile b/src/sys/classes/ds/impls/svd/makefile
index 79d89e4..41af7fe 100644
--- a/src/sys/classes/ds/impls/svd/makefile
+++ b/src/sys/classes/ds/impls/svd/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/impls/svd/makefile.html b/src/sys/classes/ds/impls/svd/makefile.html
index 91e1c2f..ef106fa 100644
--- a/src/sys/classes/ds/impls/svd/makefile.html
+++ b/src/sys/classes/ds/impls/svd/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/impls/svd/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:59+00:00">
+<meta name="date" content="2016-05-16T10:31:50+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/impls/svd/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/impls/svd/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/index.html b/src/sys/classes/ds/index.html
index 0a0b222..aa8e701 100644
--- a/src/sys/classes/ds/index.html
+++ b/src/sys/classes/ds/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/interface/dsbasic.c b/src/sys/classes/ds/interface/dsbasic.c
index 5556f66..a6d51ed 100644
--- a/src/sys/classes/ds/interface/dsbasic.c
+++ b/src/sys/classes/ds/interface/dsbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -82,7 +82,7 @@ PetscErrorCode DSInitializePackage()
   ierr = PetscLogEventRegister("DSVectors",DS_CLASSID,&DS_Vectors);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("DSOther",DS_CLASSID,&DS_Other);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"ds",&className);CHKERRQ(ierr);
     if (className) {
@@ -90,7 +90,7 @@ PetscErrorCode DSInitializePackage()
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"ds",&className);CHKERRQ(ierr);
     if (className) {
@@ -241,7 +241,8 @@ PetscErrorCode DSAppendOptionsPrefix(DS ds,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
@@ -697,7 +698,7 @@ PetscErrorCode DSSetFromOptions(DS ds)
     if (flag) { ierr = DSSetBlockSize(ds,bs);CHKERRQ(ierr); }
     ierr = PetscOptionsInt("-ds_method","Method to be used for the dense system","DSSetMethod",ds->method,&meth,&flag);CHKERRQ(ierr);
     if (flag) { ierr = DSSetMethod(ds,meth);CHKERRQ(ierr); }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)ds);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)ds);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
diff --git a/src/sys/classes/ds/interface/dsbasic.c.html b/src/sys/classes/ds/interface/dsbasic.c.html
index 7434e9c..eedb948 100644
--- a/src/sys/classes/ds/interface/dsbasic.c.html
+++ b/src/sys/classes/ds/interface/dsbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/interface/dsbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:41+00:00">
+<meta name="date" content="2016-05-16T10:31:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/interface/dsbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/interface/dsbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Basic <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> routines</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -87,7 +87,7 @@
 <a name="line82"> 82: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>"</font>,DS_CLASSID,&DS_Vectors);
 <a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"DSOther"</font>,DS_CLASSID,&DS_Other);
 <a name="line84"> 84: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line85"> 85: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line85"> 85: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
 <a name="line86"> 86: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line87"> 87: </a>    PetscStrstr(logList,<font color="#666666">"ds"</font>,&className);
 <a name="line88"> 88: </a>    <font color="#4169E1">if</font> (className) {
@@ -95,7 +95,7 @@
 <a name="line90"> 90: </a>    }
 <a name="line91"> 91: </a>  }
 <a name="line92"> 92: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line93"> 93: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
+<a name="line93"> 93: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
 <a name="line94"> 94: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line95"> 95: </a>    PetscStrstr(logList,<font color="#666666">"ds"</font>,&className);
 <a name="line96"> 96: </a>    <font color="#4169E1">if</font> (className) {
@@ -229,595 +229,596 @@
 <a name="line241">241: </a><font color="#B22222">   Output Parameters:</font>
 <a name="line242">242: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
 
-<a name="line244">244: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line245">245: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+<a name="line244">244: </a><font color="#B22222">   Note:</font>
+<a name="line245">245: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line246">246: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
 
-<a name="line247">247: </a><font color="#B22222">   Level: advanced</font>
+<a name="line248">248: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line249">249: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/DS/DSAppendOptionsPrefix.html#DSAppendOptionsPrefix">DSAppendOptionsPrefix</a>()</font>
-<a name="line250">250: </a><font color="#B22222">@*/</font>
-<a name="line251">251: </a><strong><font color="#4169E1"><a name="DSGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetOptionsPrefix.html#DSGetOptionsPrefix">DSGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,const char *prefix[])</font></strong>
-<a name="line252">252: </a>{
+<a name="line250">250: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetOptionsPrefix.html#DSSetOptionsPrefix">DSSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/DS/DSAppendOptionsPrefix.html#DSAppendOptionsPrefix">DSAppendOptionsPrefix</a>()</font>
+<a name="line251">251: </a><font color="#B22222">@*/</font>
+<a name="line252">252: </a><strong><font color="#4169E1"><a name="DSGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetOptionsPrefix.html#DSGetOptionsPrefix">DSGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,const char *prefix[])</font></strong>
+<a name="line253">253: </a>{
 
-<a name="line258">258: </a>  PetscObjectGetOptionsPrefix((PetscObject)ds,prefix);
-<a name="line259">259: </a>  <font color="#4169E1">return</font>(0);
-<a name="line260">260: </a>}
+<a name="line259">259: </a>  PetscObjectGetOptionsPrefix((PetscObject)ds,prefix);
+<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
+<a name="line261">261: </a>}
 
-<a name="line264">264: </a><font color="#B22222">/*@C</font>
-<a name="line265">265: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a> - Selects the type for the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object.</font>
+<a name="line265">265: </a><font color="#B22222">/*@C</font>
+<a name="line266">266: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a> - Selects the type for the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> object.</font>
 
-<a name="line267">267: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line268">268: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line269">269: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line270">270: </a><font color="#B22222">+  ds   - the direct solver context</font>
-<a name="line271">271: </a><font color="#B22222">-  type - a known type</font>
+<a name="line270">270: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line271">271: </a><font color="#B22222">+  ds   - the direct solver context</font>
+<a name="line272">272: </a><font color="#B22222">-  type - a known type</font>
 
-<a name="line273">273: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line274">274: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line275">275: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetType.html#DSGetType">DSGetType</a>()</font>
-<a name="line276">276: </a><font color="#B22222">@*/</font>
-<a name="line277">277: </a><strong><font color="#4169E1"><a name="DSSetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSType.html#DSType">DSType</a> type)</font></strong>
-<a name="line278">278: </a>{
-<a name="line279">279: </a>  PetscErrorCode ierr,(*r)(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>);
-<a name="line280">280: </a>  PetscBool      match;
+<a name="line276">276: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetType.html#DSGetType">DSGetType</a>()</font>
+<a name="line277">277: </a><font color="#B22222">@*/</font>
+<a name="line278">278: </a><strong><font color="#4169E1"><a name="DSSetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSType.html#DSType">DSType</a> type)</font></strong>
+<a name="line279">279: </a>{
+<a name="line280">280: </a>  PetscErrorCode ierr,(*r)(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>);
+<a name="line281">281: </a>  PetscBool      match;
 
 
-<a name="line286">286: </a>  PetscObjectTypeCompare((PetscObject)ds,type,&match);
-<a name="line287">287: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
+<a name="line287">287: </a>  PetscObjectTypeCompare((PetscObject)ds,type,&match);
+<a name="line288">288: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
 
-<a name="line289">289: </a>   PetscFunctionListFind(DSList,type,&r);
-<a name="line290">290: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unable to find requested <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> type %s"</font>,type);
+<a name="line290">290: </a>   PetscFunctionListFind(DSList,type,&r);
+<a name="line291">291: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unable to find requested <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> type %s"</font>,type);
 
-<a name="line292">292: </a>  PetscMemzero(ds->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _DSOps</font>));
+<a name="line293">293: </a>  PetscMemzero(ds->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _DSOps</font>));
 
-<a name="line294">294: </a>  PetscObjectChangeTypeName((PetscObject)ds,type);
-<a name="line295">295: </a>  (*r)(ds);
-<a name="line296">296: </a>  <font color="#4169E1">return</font>(0);
-<a name="line297">297: </a>}
+<a name="line295">295: </a>  PetscObjectChangeTypeName((PetscObject)ds,type);
+<a name="line296">296: </a>  (*r)(ds);
+<a name="line297">297: </a>  <font color="#4169E1">return</font>(0);
+<a name="line298">298: </a>}
 
-<a name="line301">301: </a><font color="#B22222">/*@C</font>
-<a name="line302">302: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetType.html#DSGetType">DSGetType</a> - Gets the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> type name (as a string) from the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> context.</font>
+<a name="line302">302: </a><font color="#B22222">/*@C</font>
+<a name="line303">303: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetType.html#DSGetType">DSGetType</a> - Gets the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> type name (as a string) from the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> context.</font>
 
-<a name="line304">304: </a><font color="#B22222">   Not Collective</font>
+<a name="line305">305: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line306">306: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line307">307: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line307">307: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line308">308: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line309">309: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line310">310: </a><font color="#B22222">.  name - name of the direct solver</font>
+<a name="line310">310: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line311">311: </a><font color="#B22222">.  name - name of the direct solver</font>
 
-<a name="line312">312: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line313">313: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line314">314: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>()</font>
-<a name="line315">315: </a><font color="#B22222">@*/</font>
-<a name="line316">316: </a><strong><font color="#4169E1"><a name="DSGetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetType.html#DSGetType">DSGetType</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSType.html#DSType">DSType</a> *type)</font></strong>
-<a name="line317">317: </a>{
-<a name="line321">321: </a>  *type = ((PetscObject)ds)->type_name;
-<a name="line322">322: </a>  <font color="#4169E1">return</font>(0);
-<a name="line323">323: </a>}
+<a name="line315">315: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>()</font>
+<a name="line316">316: </a><font color="#B22222">@*/</font>
+<a name="line317">317: </a><strong><font color="#4169E1"><a name="DSGetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetType.html#DSGetType">DSGetType</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSType.html#DSType">DSType</a> *type)</font></strong>
+<a name="line318">318: </a>{
+<a name="line322">322: </a>  *type = ((PetscObject)ds)->type_name;
+<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
+<a name="line324">324: </a>}
 
-<a name="line327">327: </a><font color="#B22222">/*@</font>
-<a name="line328">328: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a> - Selects the method to be used to solve the problem.</font>
+<a name="line328">328: </a><font color="#B22222">/*@</font>
+<a name="line329">329: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a> - Selects the method to be used to solve the problem.</font>
 
-<a name="line330">330: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line331">331: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line332">332: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line333">333: </a><font color="#B22222">+  ds   - the direct solver context</font>
-<a name="line334">334: </a><font color="#B22222">-  meth - an index indentifying the method</font>
+<a name="line333">333: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line334">334: </a><font color="#B22222">+  ds   - the direct solver context</font>
+<a name="line335">335: </a><font color="#B22222">-  meth - an index indentifying the method</font>
 
-<a name="line336">336: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line337">337: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line338">338: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetMethod.html#DSGetMethod">DSGetMethod</a>()</font>
-<a name="line339">339: </a><font color="#B22222">@*/</font>
-<a name="line340">340: </a><strong><font color="#4169E1"><a name="DSSetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt meth)</font></strong>
-<a name="line341">341: </a>{
-<a name="line345">345: </a>  <font color="#4169E1">if</font> (meth<0) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The method must be a non-negative integer"</font>);
-<a name="line346">346: </a>  <font color="#4169E1">if</font> (meth>DS_MAX_SOLVE) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Too large value for the method"</font>);
-<a name="line347">347: </a>  ds->method = meth;
-<a name="line348">348: </a>  <font color="#4169E1">return</font>(0);
-<a name="line349">349: </a>}
+<a name="line339">339: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetMethod.html#DSGetMethod">DSGetMethod</a>()</font>
+<a name="line340">340: </a><font color="#B22222">@*/</font>
+<a name="line341">341: </a><strong><font color="#4169E1"><a name="DSSetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt meth)</font></strong>
+<a name="line342">342: </a>{
+<a name="line346">346: </a>  <font color="#4169E1">if</font> (meth<0) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The method must be a non-negative integer"</font>);
+<a name="line347">347: </a>  <font color="#4169E1">if</font> (meth>DS_MAX_SOLVE) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Too large value for the method"</font>);
+<a name="line348">348: </a>  ds->method = meth;
+<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
+<a name="line350">350: </a>}
 
-<a name="line353">353: </a><font color="#B22222">/*@</font>
-<a name="line354">354: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetMethod.html#DSGetMethod">DSGetMethod</a> - Gets the method currently used in the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>.</font>
+<a name="line354">354: </a><font color="#B22222">/*@</font>
+<a name="line355">355: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetMethod.html#DSGetMethod">DSGetMethod</a> - Gets the method currently used in the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>.</font>
 
-<a name="line356">356: </a><font color="#B22222">   Not Collective</font>
+<a name="line357">357: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line358">358: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line359">359: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line359">359: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line360">360: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line361">361: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line362">362: </a><font color="#B22222">.  meth - identifier of the method</font>
+<a name="line362">362: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line363">363: </a><font color="#B22222">.  meth - identifier of the method</font>
 
-<a name="line364">364: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line365">365: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line366">366: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>()</font>
-<a name="line367">367: </a><font color="#B22222">@*/</font>
-<a name="line368">368: </a><strong><font color="#4169E1"><a name="DSGetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetMethod.html#DSGetMethod">DSGetMethod</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *meth)</font></strong>
-<a name="line369">369: </a>{
-<a name="line373">373: </a>  *meth = ds->method;
-<a name="line374">374: </a>  <font color="#4169E1">return</font>(0);
-<a name="line375">375: </a>}
+<a name="line367">367: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>()</font>
+<a name="line368">368: </a><font color="#B22222">@*/</font>
+<a name="line369">369: </a><strong><font color="#4169E1"><a name="DSGetMethod"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetMethod.html#DSGetMethod">DSGetMethod</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *meth)</font></strong>
+<a name="line370">370: </a>{
+<a name="line374">374: </a>  *meth = ds->method;
+<a name="line375">375: </a>  <font color="#4169E1">return</font>(0);
+<a name="line376">376: </a>}
 
-<a name="line379">379: </a><font color="#B22222">/*@</font>
-<a name="line380">380: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a> - Switch to compact storage of matrices.</font>
+<a name="line380">380: </a><font color="#B22222">/*@</font>
+<a name="line381">381: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a> - Switch to compact storage of matrices.</font>
 
-<a name="line382">382: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line383">383: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line384">384: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line385">385: </a><font color="#B22222">+  ds   - the direct solver context</font>
-<a name="line386">386: </a><font color="#B22222">-  comp - a boolean flag</font>
+<a name="line385">385: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line386">386: </a><font color="#B22222">+  ds   - the direct solver context</font>
+<a name="line387">387: </a><font color="#B22222">-  comp - a boolean flag</font>
 
-<a name="line388">388: </a><font color="#B22222">   Notes:</font>
-<a name="line389">389: </a><font color="#B22222">   Compact storage is used in some <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> types such as DSHEP when the matrix</font>
-<a name="line390">390: </a><font color="#B22222">   is tridiagonal. This flag can be used to indicate whether the user</font>
-<a name="line391">391: </a><font color="#B22222">   provides the matrix entries via the compact form (the tridiagonal DS_MAT_T)</font>
-<a name="line392">392: </a><font color="#B22222">   or the non-compact one (DS_MAT_A).</font>
+<a name="line389">389: </a><font color="#B22222">   Notes:</font>
+<a name="line390">390: </a><font color="#B22222">   Compact storage is used in some <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> types such as DSHEP when the matrix</font>
+<a name="line391">391: </a><font color="#B22222">   is tridiagonal. This flag can be used to indicate whether the user</font>
+<a name="line392">392: </a><font color="#B22222">   provides the matrix entries via the compact form (the tridiagonal DS_MAT_T)</font>
+<a name="line393">393: </a><font color="#B22222">   or the non-compact one (DS_MAT_A).</font>
 
-<a name="line394">394: </a><font color="#B22222">   The default is PETSC_FALSE.</font>
+<a name="line395">395: </a><font color="#B22222">   The default is PETSC_FALSE.</font>
 
-<a name="line396">396: </a><font color="#B22222">   Level: advanced</font>
+<a name="line397">397: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line398">398: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetCompact.html#DSGetCompact">DSGetCompact</a>()</font>
-<a name="line399">399: </a><font color="#B22222">@*/</font>
-<a name="line400">400: </a><strong><font color="#4169E1"><a name="DSSetCompact"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool comp)</font></strong>
-<a name="line401">401: </a>{
-<a name="line405">405: </a>  ds->compact = comp;
-<a name="line406">406: </a>  <font color="#4169E1">return</font>(0);
-<a name="line407">407: </a>}
+<a name="line399">399: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetCompact.html#DSGetCompact">DSGetCompact</a>()</font>
+<a name="line400">400: </a><font color="#B22222">@*/</font>
+<a name="line401">401: </a><strong><font color="#4169E1"><a name="DSSetCompact"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool comp)</font></strong>
+<a name="line402">402: </a>{
+<a name="line406">406: </a>  ds->compact = comp;
+<a name="line407">407: </a>  <font color="#4169E1">return</font>(0);
+<a name="line408">408: </a>}
 
-<a name="line411">411: </a><font color="#B22222">/*@</font>
-<a name="line412">412: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetCompact.html#DSGetCompact">DSGetCompact</a> - Gets the compact storage flag.</font>
+<a name="line412">412: </a><font color="#B22222">/*@</font>
+<a name="line413">413: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetCompact.html#DSGetCompact">DSGetCompact</a> - Gets the compact storage flag.</font>
 
-<a name="line414">414: </a><font color="#B22222">   Not Collective</font>
+<a name="line415">415: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line416">416: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line417">417: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line417">417: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line418">418: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line419">419: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line420">420: </a><font color="#B22222">.  comp - the flag</font>
+<a name="line420">420: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line421">421: </a><font color="#B22222">.  comp - the flag</font>
 
-<a name="line422">422: </a><font color="#B22222">   Level: advanced</font>
+<a name="line423">423: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line424">424: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>()</font>
-<a name="line425">425: </a><font color="#B22222">@*/</font>
-<a name="line426">426: </a><strong><font color="#4169E1"><a name="DSGetCompact"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetCompact.html#DSGetCompact">DSGetCompact</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool *comp)</font></strong>
-<a name="line427">427: </a>{
-<a name="line431">431: </a>  *comp = ds->compact;
-<a name="line432">432: </a>  <font color="#4169E1">return</font>(0);
-<a name="line433">433: </a>}
+<a name="line425">425: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetCompact.html#DSSetCompact">DSSetCompact</a>()</font>
+<a name="line426">426: </a><font color="#B22222">@*/</font>
+<a name="line427">427: </a><strong><font color="#4169E1"><a name="DSGetCompact"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetCompact.html#DSGetCompact">DSGetCompact</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool *comp)</font></strong>
+<a name="line428">428: </a>{
+<a name="line432">432: </a>  *comp = ds->compact;
+<a name="line433">433: </a>  <font color="#4169E1">return</font>(0);
+<a name="line434">434: </a>}
 
-<a name="line437">437: </a><font color="#B22222">/*@</font>
-<a name="line438">438: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a> - Sets a flag to indicate that the matrix has one extra</font>
-<a name="line439">439: </a><font color="#B22222">   row.</font>
+<a name="line438">438: </a><font color="#B22222">/*@</font>
+<a name="line439">439: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a> - Sets a flag to indicate that the matrix has one extra</font>
+<a name="line440">440: </a><font color="#B22222">   row.</font>
 
-<a name="line441">441: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line442">442: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line443">443: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line444">444: </a><font color="#B22222">+  ds  - the direct solver context</font>
-<a name="line445">445: </a><font color="#B22222">-  ext - a boolean flag</font>
+<a name="line444">444: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line445">445: </a><font color="#B22222">+  ds  - the direct solver context</font>
+<a name="line446">446: </a><font color="#B22222">-  ext - a boolean flag</font>
 
-<a name="line447">447: </a><font color="#B22222">   Notes:</font>
-<a name="line448">448: </a><font color="#B22222">   In Krylov methods it is useful that the matrix representing the direct solver</font>
-<a name="line449">449: </a><font color="#B22222">   has one extra row, i.e., has dimension (n+1) x n. If this flag is activated, all</font>
-<a name="line450">450: </a><font color="#B22222">   transformations applied to the right of the matrix also affect this additional</font>
-<a name="line451">451: </a><font color="#B22222">   row. In that case, (n+1) must be less or equal than the leading dimension.</font>
+<a name="line448">448: </a><font color="#B22222">   Notes:</font>
+<a name="line449">449: </a><font color="#B22222">   In Krylov methods it is useful that the matrix representing the direct solver</font>
+<a name="line450">450: </a><font color="#B22222">   has one extra row, i.e., has dimension (n+1) x n. If this flag is activated, all</font>
+<a name="line451">451: </a><font color="#B22222">   transformations applied to the right of the matrix also affect this additional</font>
+<a name="line452">452: </a><font color="#B22222">   row. In that case, (n+1) must be less or equal than the leading dimension.</font>
 
-<a name="line453">453: </a><font color="#B22222">   The default is PETSC_FALSE.</font>
+<a name="line454">454: </a><font color="#B22222">   The default is PETSC_FALSE.</font>
 
-<a name="line455">455: </a><font color="#B22222">   Level: advanced</font>
+<a name="line456">456: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line457">457: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(), <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(), <a href="../../../../../docs/manualpages/DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</a>()</font>
-<a name="line458">458: </a><font color="#B22222">@*/</font>
-<a name="line459">459: </a><strong><font color="#4169E1"><a name="DSSetExtraRow"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool ext)</font></strong>
-<a name="line460">460: </a>{
-<a name="line464">464: </a>  <font color="#4169E1">if</font> (ds->n>0 && ds->n==ds->ld) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ORDER,<font color="#666666">"Cannot set extra row after setting n=ld"</font>);
-<a name="line465">465: </a>  ds->extrarow = ext;
-<a name="line466">466: </a>  <font color="#4169E1">return</font>(0);
-<a name="line467">467: </a>}
+<a name="line458">458: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(), <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(), <a href="../../../../../docs/manualpages/DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</a>()</font>
+<a name="line459">459: </a><font color="#B22222">@*/</font>
+<a name="line460">460: </a><strong><font color="#4169E1"><a name="DSSetExtraRow"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool ext)</font></strong>
+<a name="line461">461: </a>{
+<a name="line465">465: </a>  <font color="#4169E1">if</font> (ds->n>0 && ds->n==ds->ld) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ORDER,<font color="#666666">"Cannot set extra row after setting n=ld"</font>);
+<a name="line466">466: </a>  ds->extrarow = ext;
+<a name="line467">467: </a>  <font color="#4169E1">return</font>(0);
+<a name="line468">468: </a>}
 
-<a name="line471">471: </a><font color="#B22222">/*@</font>
-<a name="line472">472: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</a> - Gets the extra row flag.</font>
+<a name="line472">472: </a><font color="#B22222">/*@</font>
+<a name="line473">473: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</a> - Gets the extra row flag.</font>
 
-<a name="line474">474: </a><font color="#B22222">   Not Collective</font>
+<a name="line475">475: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line476">476: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line477">477: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line477">477: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line478">478: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line479">479: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line480">480: </a><font color="#B22222">.  ext - the flag</font>
+<a name="line480">480: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line481">481: </a><font color="#B22222">.  ext - the flag</font>
 
-<a name="line482">482: </a><font color="#B22222">   Level: advanced</font>
+<a name="line483">483: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line484">484: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>()</font>
-<a name="line485">485: </a><font color="#B22222">@*/</font>
-<a name="line486">486: </a><strong><font color="#4169E1"><a name="DSGetExtraRow"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool *ext)</font></strong>
-<a name="line487">487: </a>{
-<a name="line491">491: </a>  *ext = ds->extrarow;
-<a name="line492">492: </a>  <font color="#4169E1">return</font>(0);
-<a name="line493">493: </a>}
+<a name="line485">485: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>()</font>
+<a name="line486">486: </a><font color="#B22222">@*/</font>
+<a name="line487">487: </a><strong><font color="#4169E1"><a name="DSGetExtraRow"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetExtraRow.html#DSGetExtraRow">DSGetExtraRow</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool *ext)</font></strong>
+<a name="line488">488: </a>{
+<a name="line492">492: </a>  *ext = ds->extrarow;
+<a name="line493">493: </a>  <font color="#4169E1">return</font>(0);
+<a name="line494">494: </a>}
 
-<a name="line497">497: </a><font color="#B22222">/*@</font>
-<a name="line498">498: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetRefined.html#DSSetRefined">DSSetRefined</a> - Sets a flag to indicate that refined vectors must be</font>
-<a name="line499">499: </a><font color="#B22222">   computed.</font>
+<a name="line498">498: </a><font color="#B22222">/*@</font>
+<a name="line499">499: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetRefined.html#DSSetRefined">DSSetRefined</a> - Sets a flag to indicate that refined vectors must be</font>
+<a name="line500">500: </a><font color="#B22222">   computed.</font>
 
-<a name="line501">501: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line502">502: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line503">503: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line504">504: </a><font color="#B22222">+  ds  - the direct solver context</font>
-<a name="line505">505: </a><font color="#B22222">-  ref - a boolean flag</font>
+<a name="line504">504: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line505">505: </a><font color="#B22222">+  ds  - the direct solver context</font>
+<a name="line506">506: </a><font color="#B22222">-  ref - a boolean flag</font>
 
-<a name="line507">507: </a><font color="#B22222">   Notes:</font>
-<a name="line508">508: </a><font color="#B22222">   Normally the vectors returned in DS_MAT_X are eigenvectors of the</font>
-<a name="line509">509: </a><font color="#B22222">   projected matrix. With this flag activated, <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() will return</font>
-<a name="line510">510: </a><font color="#B22222">   the right singular vector of the smallest singular value of matrix</font>
-<a name="line511">511: </a><font color="#B22222">   \tilde{A}-theta*I, where \tilde{A} is the extended (n+1)xn matrix</font>
-<a name="line512">512: </a><font color="#B22222">   and theta is the Ritz value. This is used in the refined Ritz</font>
-<a name="line513">513: </a><font color="#B22222">   approximation.</font>
+<a name="line508">508: </a><font color="#B22222">   Notes:</font>
+<a name="line509">509: </a><font color="#B22222">   Normally the vectors returned in DS_MAT_X are eigenvectors of the</font>
+<a name="line510">510: </a><font color="#B22222">   projected matrix. With this flag activated, <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>() will return</font>
+<a name="line511">511: </a><font color="#B22222">   the right singular vector of the smallest singular value of matrix</font>
+<a name="line512">512: </a><font color="#B22222">   \tilde{A}-theta*I, where \tilde{A} is the extended (n+1)xn matrix</font>
+<a name="line513">513: </a><font color="#B22222">   and theta is the Ritz value. This is used in the refined Ritz</font>
+<a name="line514">514: </a><font color="#B22222">   approximation.</font>
 
-<a name="line515">515: </a><font color="#B22222">   The default is PETSC_FALSE.</font>
+<a name="line516">516: </a><font color="#B22222">   The default is PETSC_FALSE.</font>
 
-<a name="line517">517: </a><font color="#B22222">   Level: advanced</font>
+<a name="line518">518: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line519">519: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(), <a href="../../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a>()</font>
-<a name="line520">520: </a><font color="#B22222">@*/</font>
-<a name="line521">521: </a><strong><font color="#4169E1"><a name="DSSetRefined"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetRefined.html#DSSetRefined">DSSetRefined</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool ref)</font></strong>
-<a name="line522">522: </a>{
-<a name="line526">526: </a>  ds->refined = ref;
-<a name="line527">527: </a>  <font color="#4169E1">return</font>(0);
-<a name="line528">528: </a>}
+<a name="line520">520: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(), <a href="../../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a>()</font>
+<a name="line521">521: </a><font color="#B22222">@*/</font>
+<a name="line522">522: </a><strong><font color="#4169E1"><a name="DSSetRefined"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetRefined.html#DSSetRefined">DSSetRefined</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool ref)</font></strong>
+<a name="line523">523: </a>{
+<a name="line527">527: </a>  ds->refined = ref;
+<a name="line528">528: </a>  <font color="#4169E1">return</font>(0);
+<a name="line529">529: </a>}
 
-<a name="line532">532: </a><font color="#B22222">/*@</font>
-<a name="line533">533: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a> - Gets the refined vectors flag.</font>
+<a name="line533">533: </a><font color="#B22222">/*@</font>
+<a name="line534">534: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a> - Gets the refined vectors flag.</font>
 
-<a name="line535">535: </a><font color="#B22222">   Not Collective</font>
+<a name="line536">536: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line537">537: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line538">538: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line538">538: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line539">539: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line540">540: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line541">541: </a><font color="#B22222">.  ref - the flag</font>
+<a name="line541">541: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line542">542: </a><font color="#B22222">.  ref - the flag</font>
 
-<a name="line543">543: </a><font color="#B22222">   Level: advanced</font>
+<a name="line544">544: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line545">545: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetRefined.html#DSSetRefined">DSSetRefined</a>()</font>
-<a name="line546">546: </a><font color="#B22222">@*/</font>
-<a name="line547">547: </a><strong><font color="#4169E1"><a name="DSGetRefined"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool *ref)</font></strong>
-<a name="line548">548: </a>{
-<a name="line552">552: </a>  *ref = ds->refined;
-<a name="line553">553: </a>  <font color="#4169E1">return</font>(0);
-<a name="line554">554: </a>}
+<a name="line546">546: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetRefined.html#DSSetRefined">DSSetRefined</a>()</font>
+<a name="line547">547: </a><font color="#B22222">@*/</font>
+<a name="line548">548: </a><strong><font color="#4169E1"><a name="DSGetRefined"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetRefined.html#DSGetRefined">DSGetRefined</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscBool *ref)</font></strong>
+<a name="line549">549: </a>{
+<a name="line553">553: </a>  *ref = ds->refined;
+<a name="line554">554: </a>  <font color="#4169E1">return</font>(0);
+<a name="line555">555: </a>}
 
-<a name="line558">558: </a><font color="#B22222">/*@</font>
-<a name="line559">559: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a> - Sets the block size.</font>
+<a name="line559">559: </a><font color="#B22222">/*@</font>
+<a name="line560">560: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a> - Sets the block size.</font>
 
-<a name="line561">561: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line562">562: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
 
-<a name="line563">563: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line564">564: </a><font color="#B22222">+  ds - the direct solver context</font>
-<a name="line565">565: </a><font color="#B22222">-  bs - the block size</font>
+<a name="line564">564: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line565">565: </a><font color="#B22222">+  ds - the direct solver context</font>
+<a name="line566">566: </a><font color="#B22222">-  bs - the block size</font>
 
-<a name="line567">567: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line568">568: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line569">569: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</a>()</font>
-<a name="line570">570: </a><font color="#B22222">@*/</font>
-<a name="line571">571: </a><strong><font color="#4169E1"><a name="DSSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt bs)</font></strong>
-<a name="line572">572: </a>{
-<a name="line576">576: </a>  <font color="#4169E1">if</font> (bs<1) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The block size must be at least one"</font>);
-<a name="line577">577: </a>  ds->bs = bs;
-<a name="line578">578: </a>  <font color="#4169E1">return</font>(0);
-<a name="line579">579: </a>}
-
-<a name="line583">583: </a><font color="#B22222">/*@</font>
-<a name="line584">584: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</a> - Gets the block size.</font>
+<a name="line570">570: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</a>()</font>
+<a name="line571">571: </a><font color="#B22222">@*/</font>
+<a name="line572">572: </a><strong><font color="#4169E1"><a name="DSSetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt bs)</font></strong>
+<a name="line573">573: </a>{
+<a name="line577">577: </a>  <font color="#4169E1">if</font> (bs<1) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"The block size must be at least one"</font>);
+<a name="line578">578: </a>  ds->bs = bs;
+<a name="line579">579: </a>  <font color="#4169E1">return</font>(0);
+<a name="line580">580: </a>}
+
+<a name="line584">584: </a><font color="#B22222">/*@</font>
+<a name="line585">585: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</a> - Gets the block size.</font>
 
-<a name="line586">586: </a><font color="#B22222">   Not Collective</font>
+<a name="line587">587: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line588">588: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line589">589: </a><font color="#B22222">.  ds - the direct solver context</font>
+<a name="line589">589: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line590">590: </a><font color="#B22222">.  ds - the direct solver context</font>
 
-<a name="line591">591: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line592">592: </a><font color="#B22222">.  bs - block size</font>
+<a name="line592">592: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line593">593: </a><font color="#B22222">.  bs - block size</font>
 
-<a name="line594">594: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line595">595: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line596">596: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>()</font>
-<a name="line597">597: </a><font color="#B22222">@*/</font>
-<a name="line598">598: </a><strong><font color="#4169E1"><a name="DSGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *bs)</font></strong>
-<a name="line599">599: </a>{
-<a name="line603">603: </a>  *bs = ds->bs;
-<a name="line604">604: </a>  <font color="#4169E1">return</font>(0);
-<a name="line605">605: </a>}
-
-<a name="line609">609: </a><font color="#B22222">/*@C</font>
-<a name="line610">610: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</a> - Sets the sorting criterion context.</font>
+<a name="line597">597: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>()</font>
+<a name="line598">598: </a><font color="#B22222">@*/</font>
+<a name="line599">599: </a><strong><font color="#4169E1"><a name="DSGetBlockSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetBlockSize.html#DSGetBlockSize">DSGetBlockSize</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt *bs)</font></strong>
+<a name="line600">600: </a>{
+<a name="line604">604: </a>  *bs = ds->bs;
+<a name="line605">605: </a>  <font color="#4169E1">return</font>(0);
+<a name="line606">606: </a>}
+
+<a name="line610">610: </a><font color="#B22222">/*@C</font>
+<a name="line611">611: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</a> - Sets the sorting criterion context.</font>
 
-<a name="line612">612: </a><font color="#B22222">   Not Collective</font>
+<a name="line613">613: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line614">614: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line615">615: </a><font color="#B22222">+  ds - the direct solver context</font>
-<a name="line616">616: </a><font color="#B22222">-  sc - a pointer to the sorting criterion context</font>
-
-<a name="line618">618: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line620">620: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(), <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>()</font>
-<a name="line621">621: </a><font color="#B22222">@*/</font>
-<a name="line622">622: </a><strong><font color="#4169E1"><a name="DSSetSlepcSC"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,SlepcSC sc)</font></strong>
-<a name="line623">623: </a>{
-
-<a name="line629">629: </a>  <font color="#4169E1">if</font> (ds->sc) {
-<a name="line630">630: </a>    PetscFree(ds->sc);
-<a name="line631">631: </a>  }
-<a name="line632">632: </a>  ds->sc = sc;
-<a name="line633">633: </a>  <font color="#4169E1">return</font>(0);
-<a name="line634">634: </a>}
-
-<a name="line638">638: </a><font color="#B22222">/*@C</font>
-<a name="line639">639: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a> - Gets the sorting criterion context.</font>
-
-<a name="line641">641: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line643">643: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line644">644: </a><font color="#B22222">.  ds - the direct solver context</font>
-
-<a name="line646">646: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line647">647: </a><font color="#B22222">.  sc - a pointer to the sorting criterion context</font>
-
-<a name="line649">649: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line651">651: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</a>(), <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>()</font>
-<a name="line652">652: </a><font color="#B22222">@*/</font>
-<a name="line653">653: </a><strong><font color="#4169E1"><a name="DSGetSlepcSC"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,SlepcSC *sc)</font></strong>
-<a name="line654">654: </a>{
-
-<a name="line660">660: </a>  <font color="#4169E1">if</font> (!ds->sc) {
-<a name="line661">661: </a>    PetscNewLog(ds,&ds->sc);
-<a name="line662">662: </a>  }
-<a name="line663">663: </a>  *sc = ds->sc;
-<a name="line664">664: </a>  <font color="#4169E1">return</font>(0);
-<a name="line665">665: </a>}
-
-<a name="line669">669: </a><font color="#B22222">/*@</font>
-<a name="line670">670: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a> - Sets <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> options from the options database.</font>
-
-<a name="line672">672: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line674">674: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line675">675: </a><font color="#B22222">.  ds - the direct solver context</font>
-
-<a name="line677">677: </a><font color="#B22222">   Notes:</font>
-<a name="line678">678: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line680">680: </a><font color="#B22222">   Level: beginner</font>
-<a name="line681">681: </a><font color="#B22222">@*/</font>
-<a name="line682">682: </a><strong><font color="#4169E1"><a name="DSSetFromOptions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line683">683: </a>{
-<a name="line685">685: </a>  PetscInt       bs,meth;
-<a name="line686">686: </a>  PetscBool      flag;
-
-<a name="line690">690: </a>  <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a>();
-<a name="line691">691: </a>  <font color="#B22222">/* Set default type (we do not allow changing it with -ds_type) */</font>
-<a name="line692">692: </a>  <font color="#4169E1">if</font> (!((PetscObject)ds)->type_name) {
-<a name="line693">693: </a>    <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(ds,DSNHEP);
-<a name="line694">694: </a>  }
-<a name="line695">695: </a>  PetscObjectOptionsBegin((PetscObject)ds);
-<a name="line696">696: </a>    PetscOptionsInt(<font color="#666666">"-ds_block_size"</font>,<font color="#666666">"Block size for the dense system solver"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>"</font>,ds->bs,&bs,&flag);
-<a name="line697">697: </a>    <font color="#4169E1">if</font> (flag) { <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>(ds,bs); }
-<a name="line698">698: </a>    PetscOptionsInt(<font color="#666666">"-ds_method"</font>,<font color="#666666">"Method to be used for the dense system"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>"</font>,ds->method,&meth,&flag);
-<a name="line699">699: </a>    <font color="#4169E1">if</font> (flag) { <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>(ds,meth); }
-<a name="line700">700: </a>    PetscObjectProcessOptionsHandlers((PetscObject)ds);
-<a name="line701">701: </a>  PetscOptionsEnd();
-<a name="line702">702: </a>  <font color="#4169E1">return</font>(0);
-<a name="line703">703: </a>}
-
-<a name="line707">707: </a><font color="#B22222">/*@C</font>
-<a name="line708">708: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a> - Prints the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> data structure.</font>
-
-<a name="line710">710: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line712">712: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line713">713: </a><font color="#B22222">+  ds - the direct solver context</font>
-<a name="line714">714: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line716">716: </a><font color="#B22222">   Note:</font>
-<a name="line717">717: </a><font color="#B22222">   The available visualization contexts include</font>
-<a name="line718">718: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
-<a name="line719">719: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
-<a name="line720">720: </a><font color="#B22222">         output where only the first processor opens</font>
-<a name="line721">721: </a><font color="#B22222">         the file.  All other processors send their</font>
-<a name="line722">722: </a><font color="#B22222">         data to the first processor to print.</font>
-
-<a name="line724">724: </a><font color="#B22222">   The user can open an alternative visualization context with</font>
-<a name="line725">725: </a><font color="#B22222">   PetscViewerASCIIOpen() - output to a specified file.</font>
-
-<a name="line727">727: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line729">729: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>()</font>
-<a name="line730">730: </a><font color="#B22222">@*/</font>
-<a name="line731">731: </a><strong><font color="#4169E1"><a name="DSView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer)</font></strong>
-<a name="line732">732: </a>{
-<a name="line733">733: </a>  PetscBool         isascii,issvd;
-<a name="line734">734: </a>  const char        *state;
-<a name="line735">735: </a>  PetscViewerFormat format;
-<a name="line736">736: </a>  PetscErrorCode    ierr;
-
-<a name="line740">740: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)ds));
-<a name="line743">743: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line744">744: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line745">745: </a>    PetscViewerGetFormat(viewer,&format);
-<a name="line746">746: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)ds,viewer);
-<a name="line747">747: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO_DETAIL) {
-<a name="line748">748: </a>      <font color="#4169E1">switch</font> (ds->state) {
-<a name="line749">749: </a>        <font color="#4169E1">case</font> DS_STATE_RAW:          state = <font color="#666666">"raw"</font>; <font color="#4169E1">break</font>;
-<a name="line750">750: </a>        <font color="#4169E1">case</font> DS_STATE_INTERMEDIATE: state = <font color="#666666">"intermediate"</font>; <font color="#4169E1">break</font>;
-<a name="line751">751: </a>        <font color="#4169E1">case</font> DS_STATE_CONDENSED:    state = <font color="#666666">"condensed"</font>; <font color="#4169E1">break</font>;
-<a name="line752">752: </a>        <font color="#4169E1">case</font> DS_STATE_TRUNCATED:    state = <font color="#666666">"truncated"</font>; <font color="#4169E1">break</font>;
-<a name="line753">753: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)ds),1,<font color="#666666">"Wrong value of ds->state"</font>);
-<a name="line754">754: </a>      }
-<a name="line755">755: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  current state: %s\n"</font>,state);
-<a name="line756">756: </a>      PetscObjectTypeCompare((PetscObject)ds,DSSVD,&issvd);
-<a name="line757">757: </a>      <font color="#4169E1">if</font> (issvd) {
-<a name="line758">758: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimensions: ld=%D, n=%D, m=%D, l=%D, k=%D"</font>,ds->ld,ds->n,ds->m,ds->l,ds->k);
-<a name="line759">759: </a>      } <font color="#4169E1">else</font> {
-<a name="line760">760: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimensions: ld=%D, n=%D, l=%D, k=%D"</font>,ds->ld,ds->n,ds->l,ds->k);
-<a name="line761">761: </a>      }
-<a name="line762">762: </a>      <font color="#4169E1">if</font> (ds->state==DS_STATE_TRUNCATED) {
-<a name="line763">763: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">", t=%D\n"</font>,ds->t);
-<a name="line764">764: </a>      } <font color="#4169E1">else</font> {
-<a name="line765">765: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line766">766: </a>      }
-<a name="line767">767: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  flags:%s%s%s\n"</font>,ds->compact?<font color="#666666">" compact"</font>:<font color="#666666">""</font>,ds->extrarow?<font color="#666666">" extrarow"</font>:<font color="#666666">""</font>,ds->refined?<font color="#666666">" refined"</font>:<font color="#666666">""</font>);
-<a name="line768">768: </a>    }
-<a name="line769">769: </a>    <font color="#4169E1">if</font> (ds->ops->view) {
-<a name="line770">770: </a>      PetscViewerASCIIPushTab(viewer);
-<a name="line771">771: </a>      (*ds->ops->view)(ds,viewer);
-<a name="line772">772: </a>      PetscViewerASCIIPopTab(viewer);
-<a name="line773">773: </a>    }
-<a name="line774">774: </a>  }
-<a name="line775">775: </a>  <font color="#4169E1">return</font>(0);
-<a name="line776">776: </a>}
-
-<a name="line780">780: </a><font color="#B22222">/*@</font>
-<a name="line781">781: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a> - Allocates memory for internal storage or matrices in <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>.</font>
-
-<a name="line783">783: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line785">785: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line786">786: </a><font color="#B22222">+  ds - the direct solver context</font>
-<a name="line787">787: </a><font color="#B22222">-  ld - leading dimension (maximum allowed dimension for the matrices, including</font>
-<a name="line788">788: </a><font color="#B22222">        the extra row if present)</font>
-
-<a name="line790">790: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line792">792: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(), <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(), <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>()</font>
-<a name="line793">793: </a><font color="#B22222">@*/</font>
-<a name="line794">794: </a><strong><font color="#4169E1"><a name="DSAllocate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt ld)</font></strong>
-<a name="line795">795: </a>{
-
-<a name="line801">801: </a>  <font color="#4169E1">if</font> (ld<1) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Leading dimension should be at least one"</font>);
-<a name="line802">802: </a>  ds->ld = ld;
-<a name="line803">803: </a>  (*ds->ops->allocate)(ds,ld);
-<a name="line804">804: </a>  <font color="#4169E1">return</font>(0);
-<a name="line805">805: </a>}
-
-<a name="line809">809: </a><font color="#B22222">/*@</font>
-<a name="line810">810: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a> - Resets the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> context to the initial state.</font>
-
-<a name="line812">812: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line814">814: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line815">815: </a><font color="#B22222">.  ds - the direct solver context</font>
-
-<a name="line817">817: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line819">819: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>()</font>
-<a name="line820">820: </a><font color="#B22222">@*/</font>
-<a name="line821">821: </a><strong><font color="#4169E1"><a name="DSReset"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
-<a name="line822">822: </a>{
-<a name="line823">823: </a>  PetscInt       i;
-
-<a name="line828">828: </a>  ds->state    = DS_STATE_RAW;
-<a name="line829">829: </a>  ds->compact  = PETSC_FALSE;
-<a name="line830">830: </a>  ds->refined  = PETSC_FALSE;
-<a name="line831">831: </a>  ds->extrarow = PETSC_FALSE;
-<a name="line832">832: </a>  ds->ld       = 0;
-<a name="line833">833: </a>  ds->l        = 0;
-<a name="line834">834: </a>  ds->n        = 0;
-<a name="line835">835: </a>  ds->m        = 0;
-<a name="line836">836: </a>  ds->k        = 0;
-<a name="line837">837: </a>  <font color="#4169E1">for</font> (i=0;i<DS_NUM_MAT;i++) {
-<a name="line838">838: </a>    PetscFree(ds->mat[i]);
-<a name="line839">839: </a>    PetscFree(ds->rmat[i]);
-<a name="line840">840: </a>    MatDestroy(&ds->omat[i]);
-<a name="line841">841: </a>  }
-<a name="line842">842: </a>  PetscFree(ds->perm);
-<a name="line843">843: </a>  PetscFree(ds->work);
-<a name="line844">844: </a>  PetscFree(ds->rwork);
-<a name="line845">845: </a>  PetscFree(ds->iwork);
-<a name="line846">846: </a>  ds->lwork         = 0;
-<a name="line847">847: </a>  ds->lrwork        = 0;
-<a name="line848">848: </a>  ds->liwork        = 0;
-<a name="line849">849: </a>  <font color="#4169E1">return</font>(0);
-<a name="line850">850: </a>}
-
-<a name="line854">854: </a><font color="#B22222">/*@</font>
-<a name="line855">855: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a> - Destroys <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> context that was created with <a href="../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>().</font>
-
-<a name="line857">857: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line859">859: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line860">860: </a><font color="#B22222">.  ds - the direct solver context</font>
-
-<a name="line862">862: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line864">864: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>()</font>
-<a name="line865">865: </a><font color="#B22222">@*/</font>
-<a name="line866">866: </a><strong><font color="#4169E1"><a name="DSDestroy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
-<a name="line867">867: </a>{
-
-<a name="line871">871: </a>  <font color="#4169E1">if</font> (!*ds) <font color="#4169E1">return</font>(0);
-<a name="line873">873: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*ds))->refct > 0) { *ds = 0; <font color="#4169E1">return</font>(0); }
-<a name="line874">874: </a>  <a href="../../../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(*ds);
-<a name="line875">875: </a>  <font color="#4169E1">if</font> ((*ds)->ops->destroy) { (*(*ds)->ops->destroy)(*ds); }
-<a name="line876">876: </a>  PetscFree((*ds)->sc);
-<a name="line877">877: </a>  PetscHeaderDestroy(ds);
-<a name="line878">878: </a>  <font color="#4169E1">return</font>(0);
-<a name="line879">879: </a>}
-
-<a name="line883">883: </a><font color="#B22222">/*@C</font>
-<a name="line884">884: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a> - Adds a direct solver to the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> package.</font>
-
-<a name="line886">886: </a><font color="#B22222">   Not collective</font>
-
-<a name="line888">888: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line889">889: </a><font color="#B22222">+  name - name of a new user-defined <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-<a name="line890">890: </a><font color="#B22222">-  routine_create - routine to create context</font>
-
-<a name="line892">892: </a><font color="#B22222">   Notes:</font>
-<a name="line893">893: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>() may be called multiple times to add several user-defined</font>
-<a name="line894">894: </a><font color="#B22222">   direct solvers.</font>
-
-<a name="line896">896: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line898">898: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a>()</font>
-<a name="line899">899: </a><font color="#B22222">@*/</font>
-<a name="line900">900: </a><strong><font color="#4169E1"><a name="DSRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>))</font></strong>
-<a name="line901">901: </a>{
-
-<a name="line905">905: </a>  PetscFunctionListAdd(&DSList,name,function);
-<a name="line906">906: </a>  <font color="#4169E1">return</font>(0);
-<a name="line907">907: </a>}
-
-<a name="line909">909: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_HEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line910">910: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_NHEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line911">911: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_GHEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line912">912: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_GHIEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line913">913: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_GNHEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line914">914: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_SVD(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line915">915: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_PEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-<a name="line916">916: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_NEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
-
-<a name="line920">920: </a><font color="#B22222">/*@C</font>
-<a name="line921">921: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a> - Registers all of the direct solvers in the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> package.</font>
-
-<a name="line923">923: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line925">925: </a><font color="#B22222">   Level: advanced</font>
-<a name="line926">926: </a><font color="#B22222">@*/</font>
-<a name="line927">927: </a><strong><font color="#4169E1"><a name="DSRegisterAll"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a>(void)</font></strong>
-<a name="line928">928: </a>{
-
-<a name="line932">932: </a>  <font color="#4169E1">if</font> (DSRegisterAllCalled) <font color="#4169E1">return</font>(0);
-<a name="line933">933: </a>  DSRegisterAllCalled = PETSC_TRUE;
-<a name="line934">934: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSHEP,DSCreate_HEP);
-<a name="line935">935: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSNHEP,DSCreate_NHEP);
-<a name="line936">936: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSGHEP,DSCreate_GHEP);
-<a name="line937">937: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSGHIEP,DSCreate_GHIEP);
-<a name="line938">938: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSGNHEP,DSCreate_GNHEP);
-<a name="line939">939: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSSVD,DSCreate_SVD);
-<a name="line940">940: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSPEP,DSCreate_PEP);
-<a name="line941">941: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSNEP,DSCreate_NEP);
-<a name="line942">942: </a>  <font color="#4169E1">return</font>(0);
-<a name="line943">943: </a>}
+<a name="line615">615: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line616">616: </a><font color="#B22222">+  ds - the direct solver context</font>
+<a name="line617">617: </a><font color="#B22222">-  sc - a pointer to the sorting criterion context</font>
+
+<a name="line619">619: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line621">621: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(), <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>()</font>
+<a name="line622">622: </a><font color="#B22222">@*/</font>
+<a name="line623">623: </a><strong><font color="#4169E1"><a name="DSSetSlepcSC"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,SlepcSC sc)</font></strong>
+<a name="line624">624: </a>{
+
+<a name="line630">630: </a>  <font color="#4169E1">if</font> (ds->sc) {
+<a name="line631">631: </a>    PetscFree(ds->sc);
+<a name="line632">632: </a>  }
+<a name="line633">633: </a>  ds->sc = sc;
+<a name="line634">634: </a>  <font color="#4169E1">return</font>(0);
+<a name="line635">635: </a>}
+
+<a name="line639">639: </a><font color="#B22222">/*@C</font>
+<a name="line640">640: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a> - Gets the sorting criterion context.</font>
+
+<a name="line642">642: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line644">644: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line645">645: </a><font color="#B22222">.  ds - the direct solver context</font>
+
+<a name="line647">647: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line648">648: </a><font color="#B22222">.  sc - a pointer to the sorting criterion context</font>
+
+<a name="line650">650: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line652">652: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSSetSlepcSC.html#DSSetSlepcSC">DSSetSlepcSC</a>(), <a href="../../../../../docs/manualpages/DS/DSSort.html#DSSort">DSSort</a>()</font>
+<a name="line653">653: </a><font color="#B22222">@*/</font>
+<a name="line654">654: </a><strong><font color="#4169E1"><a name="DSGetSlepcSC"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSGetSlepcSC.html#DSGetSlepcSC">DSGetSlepcSC</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,SlepcSC *sc)</font></strong>
+<a name="line655">655: </a>{
+
+<a name="line661">661: </a>  <font color="#4169E1">if</font> (!ds->sc) {
+<a name="line662">662: </a>    PetscNewLog(ds,&ds->sc);
+<a name="line663">663: </a>  }
+<a name="line664">664: </a>  *sc = ds->sc;
+<a name="line665">665: </a>  <font color="#4169E1">return</font>(0);
+<a name="line666">666: </a>}
+
+<a name="line670">670: </a><font color="#B22222">/*@</font>
+<a name="line671">671: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a> - Sets <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> options from the options database.</font>
+
+<a name="line673">673: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line675">675: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line676">676: </a><font color="#B22222">.  ds - the direct solver context</font>
+
+<a name="line678">678: </a><font color="#B22222">   Notes:</font>
+<a name="line679">679: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line681">681: </a><font color="#B22222">   Level: beginner</font>
+<a name="line682">682: </a><font color="#B22222">@*/</font>
+<a name="line683">683: </a><strong><font color="#4169E1"><a name="DSSetFromOptions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetFromOptions.html#DSSetFromOptions">DSSetFromOptions</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line684">684: </a>{
+<a name="line686">686: </a>  PetscInt       bs,meth;
+<a name="line687">687: </a>  PetscBool      flag;
+
+<a name="line691">691: </a>  <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a>();
+<a name="line692">692: </a>  <font color="#B22222">/* Set default type (we do not allow changing it with -ds_type) */</font>
+<a name="line693">693: </a>  <font color="#4169E1">if</font> (!((PetscObject)ds)->type_name) {
+<a name="line694">694: </a>    <a href="../../../../../docs/manualpages/DS/DSSetType.html#DSSetType">DSSetType</a>(ds,DSNHEP);
+<a name="line695">695: </a>  }
+<a name="line696">696: </a>  PetscObjectOptionsBegin((PetscObject)ds);
+<a name="line697">697: </a>    PetscOptionsInt(<font color="#666666">"-ds_block_size"</font>,<font color="#666666">"Block size for the dense system solver"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>"</font>,ds->bs,&bs,&flag);
+<a name="line698">698: </a>    <font color="#4169E1">if</font> (flag) { <a href="../../../../../docs/manualpages/DS/DSSetBlockSize.html#DSSetBlockSize">DSSetBlockSize</a>(ds,bs); }
+<a name="line699">699: </a>    PetscOptionsInt(<font color="#666666">"-ds_method"</font>,<font color="#666666">"Method to be used for the dense system"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>"</font>,ds->method,&meth,&flag);
+<a name="line700">700: </a>    <font color="#4169E1">if</font> (flag) { <a href="../../../../../docs/manualpages/DS/DSSetMethod.html#DSSetMethod">DSSetMethod</a>(ds,meth); }
+<a name="line701">701: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)ds);
+<a name="line702">702: </a>  PetscOptionsEnd();
+<a name="line703">703: </a>  <font color="#4169E1">return</font>(0);
+<a name="line704">704: </a>}
+
+<a name="line708">708: </a><font color="#B22222">/*@C</font>
+<a name="line709">709: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a> - Prints the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> data structure.</font>
+
+<a name="line711">711: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line713">713: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line714">714: </a><font color="#B22222">+  ds - the direct solver context</font>
+<a name="line715">715: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line717">717: </a><font color="#B22222">   Note:</font>
+<a name="line718">718: </a><font color="#B22222">   The available visualization contexts include</font>
+<a name="line719">719: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
+<a name="line720">720: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
+<a name="line721">721: </a><font color="#B22222">         output where only the first processor opens</font>
+<a name="line722">722: </a><font color="#B22222">         the file.  All other processors send their</font>
+<a name="line723">723: </a><font color="#B22222">         data to the first processor to print.</font>
+
+<a name="line725">725: </a><font color="#B22222">   The user can open an alternative visualization context with</font>
+<a name="line726">726: </a><font color="#B22222">   PetscViewerASCIIOpen() - output to a specified file.</font>
+
+<a name="line728">728: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line730">730: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>()</font>
+<a name="line731">731: </a><font color="#B22222">@*/</font>
+<a name="line732">732: </a><strong><font color="#4169E1"><a name="DSView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer)</font></strong>
+<a name="line733">733: </a>{
+<a name="line734">734: </a>  PetscBool         isascii,issvd;
+<a name="line735">735: </a>  const char        *state;
+<a name="line736">736: </a>  PetscViewerFormat format;
+<a name="line737">737: </a>  PetscErrorCode    ierr;
+
+<a name="line741">741: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)ds));
+<a name="line744">744: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line745">745: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line746">746: </a>    PetscViewerGetFormat(viewer,&format);
+<a name="line747">747: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)ds,viewer);
+<a name="line748">748: </a>    <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO_DETAIL) {
+<a name="line749">749: </a>      <font color="#4169E1">switch</font> (ds->state) {
+<a name="line750">750: </a>        <font color="#4169E1">case</font> DS_STATE_RAW:          state = <font color="#666666">"raw"</font>; <font color="#4169E1">break</font>;
+<a name="line751">751: </a>        <font color="#4169E1">case</font> DS_STATE_INTERMEDIATE: state = <font color="#666666">"intermediate"</font>; <font color="#4169E1">break</font>;
+<a name="line752">752: </a>        <font color="#4169E1">case</font> DS_STATE_CONDENSED:    state = <font color="#666666">"condensed"</font>; <font color="#4169E1">break</font>;
+<a name="line753">753: </a>        <font color="#4169E1">case</font> DS_STATE_TRUNCATED:    state = <font color="#666666">"truncated"</font>; <font color="#4169E1">break</font>;
+<a name="line754">754: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)ds),1,<font color="#666666">"Wrong value of ds->state"</font>);
+<a name="line755">755: </a>      }
+<a name="line756">756: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  current state: %s\n"</font>,state);
+<a name="line757">757: </a>      PetscObjectTypeCompare((PetscObject)ds,DSSVD,&issvd);
+<a name="line758">758: </a>      <font color="#4169E1">if</font> (issvd) {
+<a name="line759">759: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimensions: ld=%D, n=%D, m=%D, l=%D, k=%D"</font>,ds->ld,ds->n,ds->m,ds->l,ds->k);
+<a name="line760">760: </a>      } <font color="#4169E1">else</font> {
+<a name="line761">761: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  dimensions: ld=%D, n=%D, l=%D, k=%D"</font>,ds->ld,ds->n,ds->l,ds->k);
+<a name="line762">762: </a>      }
+<a name="line763">763: </a>      <font color="#4169E1">if</font> (ds->state==DS_STATE_TRUNCATED) {
+<a name="line764">764: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">", t=%D\n"</font>,ds->t);
+<a name="line765">765: </a>      } <font color="#4169E1">else</font> {
+<a name="line766">766: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line767">767: </a>      }
+<a name="line768">768: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  flags:%s%s%s\n"</font>,ds->compact?<font color="#666666">" compact"</font>:<font color="#666666">""</font>,ds->extrarow?<font color="#666666">" extrarow"</font>:<font color="#666666">""</font>,ds->refined?<font color="#666666">" refined"</font>:<font color="#666666">""</font>);
+<a name="line769">769: </a>    }
+<a name="line770">770: </a>    <font color="#4169E1">if</font> (ds->ops->view) {
+<a name="line771">771: </a>      PetscViewerASCIIPushTab(viewer);
+<a name="line772">772: </a>      (*ds->ops->view)(ds,viewer);
+<a name="line773">773: </a>      PetscViewerASCIIPopTab(viewer);
+<a name="line774">774: </a>    }
+<a name="line775">775: </a>  }
+<a name="line776">776: </a>  <font color="#4169E1">return</font>(0);
+<a name="line777">777: </a>}
+
+<a name="line781">781: </a><font color="#B22222">/*@</font>
+<a name="line782">782: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a> - Allocates memory for internal storage or matrices in <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>.</font>
+
+<a name="line784">784: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line786">786: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line787">787: </a><font color="#B22222">+  ds - the direct solver context</font>
+<a name="line788">788: </a><font color="#B22222">-  ld - leading dimension (maximum allowed dimension for the matrices, including</font>
+<a name="line789">789: </a><font color="#B22222">        the extra row if present)</font>
+
+<a name="line791">791: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line793">793: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(), <a href="../../../../../docs/manualpages/DS/DSSetDimensions.html#DSSetDimensions">DSSetDimensions</a>(), <a href="../../../../../docs/manualpages/DS/DSSetExtraRow.html#DSSetExtraRow">DSSetExtraRow</a>()</font>
+<a name="line794">794: </a><font color="#B22222">@*/</font>
+<a name="line795">795: </a><strong><font color="#4169E1"><a name="DSAllocate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSAllocate.html#DSAllocate">DSAllocate</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt ld)</font></strong>
+<a name="line796">796: </a>{
+
+<a name="line802">802: </a>  <font color="#4169E1">if</font> (ld<1) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Leading dimension should be at least one"</font>);
+<a name="line803">803: </a>  ds->ld = ld;
+<a name="line804">804: </a>  (*ds->ops->allocate)(ds,ld);
+<a name="line805">805: </a>  <font color="#4169E1">return</font>(0);
+<a name="line806">806: </a>}
+
+<a name="line810">810: </a><font color="#B22222">/*@</font>
+<a name="line811">811: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a> - Resets the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> context to the initial state.</font>
+
+<a name="line813">813: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line815">815: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line816">816: </a><font color="#B22222">.  ds - the direct solver context</font>
+
+<a name="line818">818: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line820">820: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>()</font>
+<a name="line821">821: </a><font color="#B22222">@*/</font>
+<a name="line822">822: </a><strong><font color="#4169E1"><a name="DSReset"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds)</font></strong>
+<a name="line823">823: </a>{
+<a name="line824">824: </a>  PetscInt       i;
+
+<a name="line829">829: </a>  ds->state    = DS_STATE_RAW;
+<a name="line830">830: </a>  ds->compact  = PETSC_FALSE;
+<a name="line831">831: </a>  ds->refined  = PETSC_FALSE;
+<a name="line832">832: </a>  ds->extrarow = PETSC_FALSE;
+<a name="line833">833: </a>  ds->ld       = 0;
+<a name="line834">834: </a>  ds->l        = 0;
+<a name="line835">835: </a>  ds->n        = 0;
+<a name="line836">836: </a>  ds->m        = 0;
+<a name="line837">837: </a>  ds->k        = 0;
+<a name="line838">838: </a>  <font color="#4169E1">for</font> (i=0;i<DS_NUM_MAT;i++) {
+<a name="line839">839: </a>    PetscFree(ds->mat[i]);
+<a name="line840">840: </a>    PetscFree(ds->rmat[i]);
+<a name="line841">841: </a>    MatDestroy(&ds->omat[i]);
+<a name="line842">842: </a>  }
+<a name="line843">843: </a>  PetscFree(ds->perm);
+<a name="line844">844: </a>  PetscFree(ds->work);
+<a name="line845">845: </a>  PetscFree(ds->rwork);
+<a name="line846">846: </a>  PetscFree(ds->iwork);
+<a name="line847">847: </a>  ds->lwork         = 0;
+<a name="line848">848: </a>  ds->lrwork        = 0;
+<a name="line849">849: </a>  ds->liwork        = 0;
+<a name="line850">850: </a>  <font color="#4169E1">return</font>(0);
+<a name="line851">851: </a>}
+
+<a name="line855">855: </a><font color="#B22222">/*@</font>
+<a name="line856">856: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a> - Destroys <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> context that was created with <a href="../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>().</font>
+
+<a name="line858">858: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line860">860: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line861">861: </a><font color="#B22222">.  ds - the direct solver context</font>
+
+<a name="line863">863: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line865">865: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSCreate.html#DSCreate">DSCreate</a>()</font>
+<a name="line866">866: </a><font color="#B22222">@*/</font>
+<a name="line867">867: </a><strong><font color="#4169E1"><a name="DSDestroy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSDestroy.html#DSDestroy">DSDestroy</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> *ds)</font></strong>
+<a name="line868">868: </a>{
+
+<a name="line872">872: </a>  <font color="#4169E1">if</font> (!*ds) <font color="#4169E1">return</font>(0);
+<a name="line874">874: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*ds))->refct > 0) { *ds = 0; <font color="#4169E1">return</font>(0); }
+<a name="line875">875: </a>  <a href="../../../../../docs/manualpages/DS/DSReset.html#DSReset">DSReset</a>(*ds);
+<a name="line876">876: </a>  <font color="#4169E1">if</font> ((*ds)->ops->destroy) { (*(*ds)->ops->destroy)(*ds); }
+<a name="line877">877: </a>  PetscFree((*ds)->sc);
+<a name="line878">878: </a>  PetscHeaderDestroy(ds);
+<a name="line879">879: </a>  <font color="#4169E1">return</font>(0);
+<a name="line880">880: </a>}
+
+<a name="line884">884: </a><font color="#B22222">/*@C</font>
+<a name="line885">885: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a> - Adds a direct solver to the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> package.</font>
+
+<a name="line887">887: </a><font color="#B22222">   Not collective</font>
+
+<a name="line889">889: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line890">890: </a><font color="#B22222">+  name - name of a new user-defined <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+<a name="line891">891: </a><font color="#B22222">-  routine_create - routine to create context</font>
+
+<a name="line893">893: </a><font color="#B22222">   Notes:</font>
+<a name="line894">894: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>() may be called multiple times to add several user-defined</font>
+<a name="line895">895: </a><font color="#B22222">   direct solvers.</font>
+
+<a name="line897">897: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line899">899: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a>()</font>
+<a name="line900">900: </a><font color="#B22222">@*/</font>
+<a name="line901">901: </a><strong><font color="#4169E1"><a name="DSRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>))</font></strong>
+<a name="line902">902: </a>{
+
+<a name="line906">906: </a>  PetscFunctionListAdd(&DSList,name,function);
+<a name="line907">907: </a>  <font color="#4169E1">return</font>(0);
+<a name="line908">908: </a>}
+
+<a name="line910">910: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_HEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line911">911: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_NHEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line912">912: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_GHEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line913">913: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_GHIEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line914">914: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_GNHEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line915">915: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_SVD(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line916">916: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_PEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+<a name="line917">917: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode DSCreate_NEP(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>)</font></strong>;
+
+<a name="line921">921: </a><font color="#B22222">/*@C</font>
+<a name="line922">922: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a> - Registers all of the direct solvers in the <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> package.</font>
+
+<a name="line924">924: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line926">926: </a><font color="#B22222">   Level: advanced</font>
+<a name="line927">927: </a><font color="#B22222">@*/</font>
+<a name="line928">928: </a><strong><font color="#4169E1"><a name="DSRegisterAll"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSRegisterAll.html#DSRegisterAll">DSRegisterAll</a>(void)</font></strong>
+<a name="line929">929: </a>{
+
+<a name="line933">933: </a>  <font color="#4169E1">if</font> (DSRegisterAllCalled) <font color="#4169E1">return</font>(0);
+<a name="line934">934: </a>  DSRegisterAllCalled = PETSC_TRUE;
+<a name="line935">935: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSHEP,DSCreate_HEP);
+<a name="line936">936: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSNHEP,DSCreate_NHEP);
+<a name="line937">937: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSGHEP,DSCreate_GHEP);
+<a name="line938">938: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSGHIEP,DSCreate_GHIEP);
+<a name="line939">939: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSGNHEP,DSCreate_GNHEP);
+<a name="line940">940: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSSVD,DSCreate_SVD);
+<a name="line941">941: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSPEP,DSCreate_PEP);
+<a name="line942">942: </a>  <a href="../../../../../docs/manualpages/DS/DSRegister.html#DSRegister">DSRegister</a>(DSNEP,DSCreate_NEP);
+<a name="line943">943: </a>  <font color="#4169E1">return</font>(0);
+<a name="line944">944: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/ds/interface/dsops.c b/src/sys/classes/ds/interface/dsops.c
index 3ebc5e7..080a568 100644
--- a/src/sys/classes/ds/interface/dsops.c
+++ b/src/sys/classes/ds/interface/dsops.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/ds/interface/dsops.c.html b/src/sys/classes/ds/interface/dsops.c.html
index 7206cbc..17e2c73 100644
--- a/src/sys/classes/ds/interface/dsops.c.html
+++ b/src/sys/classes/ds/interface/dsops.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/interface/dsops.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:42+00:00">
+<meta name="date" content="2016-05-16T10:31:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/interface/dsops.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/interface/dsops.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> operations: <a href="../../../../../docs/manualpages/DS/DSSolve.html#DSSolve">DSSolve</a>(), <a href="../../../../../docs/manualpages/DS/DSVectors.html#DSVectors">DSVectors</a>(), etc</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/ds/interface/dspriv.c b/src/sys/classes/ds/interface/dspriv.c
index 1bb8f72..0152b1e 100644
--- a/src/sys/classes/ds/interface/dspriv.c
+++ b/src/sys/classes/ds/interface/dspriv.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -38,7 +38,7 @@ PetscErrorCode DSAllocateMat_Private(DS ds,DSMatType m)
   if (ispep) {
     ierr = DSPEPGetDegree(ds,&d);CHKERRQ(ierr);
   }
-  if (ispep && (m==DS_MAT_A || m==DS_MAT_B || m==DS_MAT_W || m==DS_MAT_X)) n = d*ds->ld;
+  if (ispep && (m==DS_MAT_A || m==DS_MAT_B || m==DS_MAT_W || m==DS_MAT_U || m==DS_MAT_X || m==DS_MAT_Y)) n = d*ds->ld;
   else n = ds->ld;
   switch (m) {
     case DS_MAT_T:
@@ -50,6 +50,9 @@ PetscErrorCode DSAllocateMat_Private(DS ds,DSMatType m)
     case DS_MAT_X:
       sz = ds->ld*n*sizeof(PetscScalar);
       break;
+    case DS_MAT_Y:
+      sz = ds->ld*n*sizeof(PetscScalar);
+      break;
     default:
       sz = n*n*sizeof(PetscScalar);
   }
@@ -133,9 +136,10 @@ PetscErrorCode DSAllocateWork_Private(DS ds,PetscInt s,PetscInt r,PetscInt i)
 PetscErrorCode DSViewMat(DS ds,PetscViewer viewer,DSMatType m)
 {
   PetscErrorCode    ierr;
-  PetscInt          i,j,rows,cols;
+  PetscInt          i,j,rows,cols,d;
   PetscScalar       *v;
   PetscViewerFormat format;
+  PetscBool         ispep;
 #if defined(PETSC_USE_COMPLEX)
   PetscBool         allreal = PETSC_TRUE;
 #endif
@@ -149,6 +153,11 @@ PetscErrorCode DSViewMat(DS ds,PetscViewer viewer,DSMatType m)
   if (ds->state==DS_STATE_TRUNCATED && m>=DS_MAT_Q) rows = ds->t;
   else rows = (m==DS_MAT_A && ds->extrarow)? ds->n+1: ds->n;
   cols = (ds->m!=0)? ds->m: ds->n;
+  ierr = PetscObjectTypeCompare((PetscObject)ds,DSPEP,&ispep);CHKERRQ(ierr);
+  if (ispep) {
+    ierr = DSPEPGetDegree(ds,&d);CHKERRQ(ierr);
+  }
+  if (ispep && (m==DS_MAT_X || m==DS_MAT_Y)) cols = d*ds->n;
 #if defined(PETSC_USE_COMPLEX)
   /* determine if matrix has all real values */
   v = ds->mat[m];
@@ -411,37 +420,48 @@ PetscErrorCode DSSetIdentity(DS ds,DSMatType mat)
 
 #undef __FUNCT__
 #define __FUNCT__ "DSOrthogonalize"
-/*
+/*@C
    DSOrthogonalize - Orthogonalize the columns of a matrix.
 
+   Logically Collective on DS
+
    Input Parameters:
 +  ds   - the direct solver context
 .  mat  - a matrix
--  cols - number of columns to orthogonalize (starting from the column zero)
+-  cols - number of columns to orthogonalize (starting from column zero)
 
    Output Parameter:
-.  lindcols - number of linearly independent columns of the matrix (can be NULL)
-*/
+.  lindcols - (optional) number of linearly independent columns of the matrix
+
+   Level: developer
+
+.seealso: DSPseudoOrthogonalize()
+@*/
 PetscErrorCode DSOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscInt *lindcols)
 {
-#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_ORGQR)
+#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)
   PetscFunctionBegin;
   SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEQRF/ORGQR - Lapack routine is unavailable");
 #else
-  PetscErrorCode  ierr;
-  PetscInt        n,l,ld;
-  PetscBLASInt    ld_,rA,cA,info,ltau,lw;
-  PetscScalar     *A,*tau,*w,saux;
+  PetscErrorCode ierr;
+  PetscInt       n,l,ld;
+  PetscBLASInt   ld_,rA,cA,info,ltau,lw;
+  PetscScalar    *A,*tau,*w,saux;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(ds,DS_CLASSID,1);
+  DSCheckAlloc(ds,1);
   PetscValidLogicalCollectiveEnum(ds,mat,2);
   PetscValidLogicalCollectiveInt(ds,cols,3);
+
   ierr = DSGetDimensions(ds,&n,NULL,&l,NULL,NULL);CHKERRQ(ierr);
   ierr = DSGetLeadingDimension(ds,&ld);CHKERRQ(ierr);
   n = n - l;
   if (cols > n) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,"Invalid number of columns");
   if (n == 0 || cols == 0) PetscFunctionReturn(0);
+
+  ierr = PetscLogEventBegin(DS_Other,ds,0,0,0);CHKERRQ(ierr);
+  ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
   ierr = DSGetArray(ds,mat,&A);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(PetscMin(cols,n),&ltau);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(ld,&ld_);CHKERRQ(ierr);
@@ -454,17 +474,16 @@ PetscErrorCode DSOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscInt *lindc
   ierr = DSAllocateWork_Private(ds,lw+ltau,0,0);CHKERRQ(ierr);
   tau = ds->work;
   w = &tau[ltau];
-  ierr = PetscLogEventBegin(DS_Other,ds,0,0,0);CHKERRQ(ierr);
-  ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
   PetscStackCallBLAS("LAPACKgeqrf",LAPACKgeqrf_(&rA,&cA,&A[ld*l+l],&ld_,tau,w,&lw,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEQRF %d",info);
-  PetscStackCallBLAS("LAPACKorgqr",LAPACKorgqr_(&rA,&ltau,&ltau,&A[ld*l+l],&ld_,tau,w,&lw,&info));
+  PetscStackCallBLAS("LAPACKungqr",LAPACKungqr_(&rA,&ltau,&ltau,&A[ld*l+l],&ld_,tau,w,&lw,&info));
   if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xORGQR %d",info);
+  if (lindcols) *lindcols = ltau;
+
   ierr = PetscFPTrapPop();CHKERRQ(ierr);
   ierr = PetscLogEventEnd(DS_Other,ds,0,0,0);CHKERRQ(ierr);
   ierr = DSRestoreArray(ds,mat,&A);CHKERRQ(ierr);
   ierr = PetscObjectStateIncrease((PetscObject)ds);CHKERRQ(ierr);
-  if (lindcols) *lindcols = ltau;
   PetscFunctionReturn(0);
 #endif
 }
@@ -519,34 +538,40 @@ static PetscErrorCode SlepcMatDenseMult(PetscScalar *C,PetscInt _ldC,PetscScalar
 
 #undef __FUNCT__
 #define __FUNCT__ "DSPseudoOrthogonalize"
-/*
+/*@C
    DSPseudoOrthogonalize - Orthogonalize the columns of a matrix with Modified
    Gram-Schmidt in an indefinite inner product space defined by a signature.
 
+   Logically Collective on DS
+
    Input Parameters:
 +  ds   - the direct solver context
 .  mat  - the matrix
-.  cols - number of columns to orthogonalize (starting from the column zero)
+.  cols - number of columns to orthogonalize (starting from column zero)
 -  s    - the signature that defines the inner product
 
-   Output Parameter:
-+  lindcols - linear independent columns of the matrix (can be NULL)
--  ns - the new norm of the vectors (can be NULL)
-*/
+   Output Parameters:
++  lindcols - (optional) linearly independent columns of the matrix
+-  ns   - (optional) the new norm of the vectors
+
+   Level: developer
+
+.seealso: DSOrthogonalize()
+@*/
 PetscErrorCode DSPseudoOrthogonalize(DS ds,DSMatType mat,PetscInt cols,PetscReal *s,PetscInt *lindcols,PetscReal *ns)
 {
-  PetscErrorCode  ierr;
-  PetscInt        i,j,k,l,n,ld;
-  PetscBLASInt    one=1,rA_;
-  PetscScalar     alpha,*A,*A_,*m,*h,nr0;
-  PetscReal       nr_o,nr,*ns_;
+  PetscErrorCode ierr;
+  PetscInt       i,j,k,l,n,ld;
+  PetscBLASInt   one=1,rA_;
+  PetscScalar    alpha,*A,*A_,*m,*h,nr0;
+  PetscReal      nr_o,nr,*ns_;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(ds,DS_CLASSID,1);
+  DSCheckAlloc(ds,1);
   PetscValidLogicalCollectiveEnum(ds,mat,2);
   PetscValidLogicalCollectiveInt(ds,cols,3);
-  PetscValidScalarPointer(s,4);
-  if (ns) PetscValidPointer(ns,6);
+  PetscValidRealPointer(s,4);
   ierr = DSGetDimensions(ds,&n,NULL,&l,NULL,NULL);CHKERRQ(ierr);
   ierr = DSGetLeadingDimension(ds,&ld);CHKERRQ(ierr);
   n = n - l;
diff --git a/src/sys/classes/ds/interface/dspriv.c.html b/src/sys/classes/ds/interface/dspriv.c.html
index 80f1e54..28e245e 100644
--- a/src/sys/classes/ds/interface/dspriv.c.html
+++ b/src/sys/classes/ds/interface/dspriv.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/interface/dspriv.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:44+00:00">
+<meta name="date" content="2016-05-16T10:31:34+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/interface/dspriv.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/interface/dspriv.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Private <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> routines</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line38"> 38: </a>  <font color="#4169E1">if</font> (ispep) {
 <a name="line39"> 39: </a>    <a href="../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>(ds,&d);
 <a name="line40"> 40: </a>  }
-<a name="line41"> 41: </a>  <font color="#4169E1">if</font> (ispep && (m==DS_MAT_A || m==DS_MAT_B || m==DS_MAT_W || m==DS_MAT_X)) n = d*ds->ld;
+<a name="line41"> 41: </a>  <font color="#4169E1">if</font> (ispep && (m==DS_MAT_A || m==DS_MAT_B || m==DS_MAT_W || m==DS_MAT_U || m==DS_MAT_X || m==DS_MAT_Y)) n = d*ds->ld;
 <a name="line42"> 42: </a>  <font color="#4169E1">else</font> n = ds->ld;
 <a name="line43"> 43: </a>  <font color="#4169E1">switch</font> (m) {
 <a name="line44"> 44: </a>    <font color="#4169E1">case</font> DS_MAT_T:
@@ -58,491 +58,515 @@
 <a name="line50"> 50: </a>    <font color="#4169E1">case</font> DS_MAT_X:
 <a name="line51"> 51: </a>      sz = ds->ld*n*<font color="#4169E1">sizeof</font>(PetscScalar);
 <a name="line52"> 52: </a>      <font color="#4169E1">break</font>;
-<a name="line53"> 53: </a><strong><font color="#FF0000">    default:</font></strong>
-<a name="line54"> 54: </a>      sz = n*n*<font color="#4169E1">sizeof</font>(PetscScalar);
-<a name="line55"> 55: </a>  }
-<a name="line56"> 56: </a>  <font color="#4169E1">if</font> (ds->mat[m]) {
-<a name="line57"> 57: </a>    PetscFree(ds->mat[m]);
-<a name="line58"> 58: </a>  } <font color="#4169E1">else</font> {
-<a name="line59"> 59: </a>    PetscLogObjectMemory((PetscObject)ds,sz);
-<a name="line60"> 60: </a>  }
-<a name="line61"> 61: </a>  PetscMalloc(sz,&ds->mat[m]);
-<a name="line62"> 62: </a>  PetscMemzero(ds->mat[m],sz);
-<a name="line63"> 63: </a>  <font color="#4169E1">return</font>(0);
-<a name="line64"> 64: </a>}
-
-<a name="line68"> 68: </a><strong><font color="#4169E1"><a name="DSAllocateMatReal_Private"></a>PetscErrorCode DSAllocateMatReal_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> m)</font></strong>
-<a name="line69"> 69: </a>{
-<a name="line70"> 70: </a>  size_t         sz;
-
-<a name="line74"> 74: </a>  <font color="#4169E1">if</font> (m==DS_MAT_T) sz = 3*ds->ld*<font color="#4169E1">sizeof</font>(PetscReal);
-<a name="line75"> 75: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (m==DS_MAT_D) sz = ds->ld*<font color="#4169E1">sizeof</font>(PetscReal);
-<a name="line76"> 76: </a>  <font color="#4169E1">else</font> sz = ds->ld*ds->ld*<font color="#4169E1">sizeof</font>(PetscReal);
-<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (!ds->rmat[m]) {
-<a name="line78"> 78: </a>    PetscLogObjectMemory((PetscObject)ds,sz);
-<a name="line79"> 79: </a>    PetscMalloc(sz,&ds->rmat[m]);
-<a name="line80"> 80: </a>  }
-<a name="line81"> 81: </a>  PetscMemzero(ds->rmat[m],sz);
-<a name="line82"> 82: </a>  <font color="#4169E1">return</font>(0);
-<a name="line83"> 83: </a>}
-
-<a name="line87"> 87: </a><strong><font color="#4169E1"><a name="DSAllocateWork_Private"></a>PetscErrorCode DSAllocateWork_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt s,PetscInt r,PetscInt i)</font></strong>
-<a name="line88"> 88: </a>{
-
-<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (s>ds->lwork) {
-<a name="line93"> 93: </a>    PetscFree(ds->work);
-<a name="line94"> 94: </a>    PetscMalloc1(s,&ds->work);
-<a name="line95"> 95: </a>    PetscLogObjectMemory((PetscObject)ds,(s-ds->lwork)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line96"> 96: </a>    ds->lwork = s;
-<a name="line97"> 97: </a>  }
-<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (r>ds->lrwork) {
-<a name="line99"> 99: </a>    PetscFree(ds->rwork);
-<a name="line100">100: </a>    PetscMalloc1(r,&ds->rwork);
-<a name="line101">101: </a>    PetscLogObjectMemory((PetscObject)ds,(r-ds->lrwork)*<font color="#4169E1">sizeof</font>(PetscReal));
-<a name="line102">102: </a>    ds->lrwork = r;
-<a name="line103">103: </a>  }
-<a name="line104">104: </a>  <font color="#4169E1">if</font> (i>ds->liwork) {
-<a name="line105">105: </a>    PetscFree(ds->iwork);
-<a name="line106">106: </a>    PetscMalloc1(i,&ds->iwork);
-<a name="line107">107: </a>    PetscLogObjectMemory((PetscObject)ds,(i-ds->liwork)*<font color="#4169E1">sizeof</font>(PetscBLASInt));
-<a name="line108">108: </a>    ds->liwork = i;
-<a name="line109">109: </a>  }
-<a name="line110">110: </a>  <font color="#4169E1">return</font>(0);
-<a name="line111">111: </a>}
-
-<a name="line115">115: </a><font color="#B22222">/*@C</font>
-<a name="line116">116: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a> - Prints one of the internal <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> matrices.</font>
-
-<a name="line118">118: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line120">120: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line121">121: </a><font color="#B22222">+  ds     - the direct solver context</font>
-<a name="line122">122: </a><font color="#B22222">.  viewer - visualization context</font>
-<a name="line123">123: </a><font color="#B22222">-  m      - matrix to display</font>
-
-<a name="line125">125: </a><font color="#B22222">   Note:</font>
-<a name="line126">126: </a><font color="#B22222">   Works only for ascii viewers. Set the viewer in Matlab format if</font>
-<a name="line127">127: </a><font color="#B22222">   want to paste into Matlab.</font>
-
-<a name="line129">129: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line131">131: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>()</font>
-<a name="line132">132: </a><font color="#B22222">@*/</font>
-<a name="line133">133: </a><strong><font color="#4169E1"><a name="DSViewMat"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> m)</font></strong>
-<a name="line134">134: </a>{
-<a name="line135">135: </a>  PetscErrorCode    ierr;
-<a name="line136">136: </a>  PetscInt          i,j,rows,cols;
-<a name="line137">137: </a>  PetscScalar       *v;
-<a name="line138">138: </a>  PetscViewerFormat format;
-<a name="line139">139: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line140">140: </a>  PetscBool         allreal = PETSC_TRUE;
-<a name="line141">141: </a><font color="#A020F0">#endif</font>
-
-<a name="line144">144: </a>  <font color="#4169E1">if</font> (m>=DS_NUM_MAT) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid matrix"</font>);
-<a name="line145">145: </a>  <font color="#4169E1">if</font> (!ds->mat[m]) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Requested matrix was not created in this <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>"</font>);
-<a name="line146">146: </a>  PetscViewerGetFormat(viewer,&format);
-<a name="line147">147: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) <font color="#4169E1">return</font>(0);
-<a name="line148">148: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
-<a name="line149">149: </a>  <font color="#4169E1">if</font> (ds->state==DS_STATE_TRUNCATED && m>=DS_MAT_Q) rows = ds->t;
-<a name="line150">150: </a>  <font color="#4169E1">else</font> rows = (m==DS_MAT_A && ds->extrarow)? ds->n+1: ds->n;
-<a name="line151">151: </a>  cols = (ds->m!=0)? ds->m: ds->n;
-<a name="line152">152: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line153">153: </a>  <font color="#B22222">/* determine if matrix has all real values */</font>
-<a name="line154">154: </a>  v = ds->mat[m];
-<a name="line155">155: </a>  <font color="#4169E1">for</font> (i=0;i<rows;i++)
-<a name="line156">156: </a>    <font color="#4169E1">for</font> (j=0;j<cols;j++)
-<a name="line157">157: </a>      <font color="#4169E1">if</font> (PetscImaginaryPart(v[i+j*ds->ld])) { allreal = PETSC_FALSE; <font color="#4169E1">break</font>; }
-<a name="line158">158: </a><font color="#A020F0">#endif</font>
-<a name="line159">159: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
-<a name="line160">160: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%% Size = %D %D\n"</font>,rows,cols);
-<a name="line161">161: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s = [\n"</font>,DSMatName[m]);
-<a name="line162">162: </a>  } <font color="#4169E1">else</font> {
-<a name="line163">163: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"Matrix %s =\n"</font>,DSMatName[m]);
-<a name="line164">164: </a>  }
-
-<a name="line166">166: </a>  <font color="#4169E1">for</font> (i=0;i<rows;i++) {
-<a name="line167">167: </a>    v = ds->mat[m]+i;
-<a name="line168">168: </a>    <font color="#4169E1">for</font> (j=0;j<cols;j++) {
-<a name="line169">169: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line170">170: </a>      <font color="#4169E1">if</font> (allreal) {
-<a name="line171">171: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e "</font>,PetscRealPart(*v));
-<a name="line172">172: </a>      } <font color="#4169E1">else</font> {
-<a name="line173">173: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei "</font>,PetscRealPart(*v),PetscImaginaryPart(*v));
-<a name="line174">174: </a>      }
-<a name="line175">175: </a><font color="#A020F0">#else</font>
-<a name="line176">176: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e "</font>,*v);
-<a name="line177">177: </a><font color="#A020F0">#endif</font>
-<a name="line178">178: </a>      v += ds->ld;
-<a name="line179">179: </a>    }
-<a name="line180">180: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line181">181: </a>  }
-
-<a name="line183">183: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
-<a name="line184">184: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
-<a name="line185">185: </a>  }
-<a name="line186">186: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
-<a name="line187">187: </a>  PetscViewerFlush(viewer);
-<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
-<a name="line189">189: </a>}
-
-<a name="line193">193: </a><strong><font color="#4169E1"><a name="DSSortEigenvalues_Private"></a>PetscErrorCode DSSortEigenvalues_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscInt *perm,PetscBool isghiep)</font></strong>
-<a name="line194">194: </a>{
-<a name="line196">196: </a>  PetscScalar    re,im,wi0;
-<a name="line197">197: </a>  PetscInt       n,i,j,result,tmp1,tmp2=0,d=1;
-
-<a name="line200">200: </a>  n = ds->t;   <font color="#B22222">/* sort only first t pairs if truncated */</font>
-<a name="line201">201: </a>  <font color="#B22222">/* insertion sort */</font>
-<a name="line202">202: </a>  i=ds->l+1;
-<a name="line203">203: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line204">204: </a>  <font color="#4169E1">if</font> (wi && wi[perm[i-1]]!=0.0) i++; <font color="#B22222">/* initial value is complex */</font>
-<a name="line205">205: </a><font color="#A020F0">#else</font>
-<a name="line206">206: </a>  <font color="#4169E1">if</font> (isghiep && PetscImaginaryPart(wr[perm[i-1]])!=0.0) i++;
-<a name="line207">207: </a><font color="#A020F0">#endif</font>
-<a name="line208">208: </a>  <font color="#4169E1">for</font> (;i<n;i+=d) {
-<a name="line209">209: </a>    re = wr[perm[i]];
-<a name="line210">210: </a>    <font color="#4169E1">if</font> (wi) im = wi[perm[i]];
-<a name="line211">211: </a>    <font color="#4169E1">else</font> im = 0.0;
-<a name="line212">212: </a>    tmp1 = perm[i];
-<a name="line213">213: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line214">214: </a>    <font color="#4169E1">if</font> (im!=0.0) { d = 2; tmp2 = perm[i+1]; }
-<a name="line215">215: </a>    <font color="#4169E1">else</font> d = 1;
-<a name="line216">216: </a><font color="#A020F0">#else</font>
-<a name="line217">217: </a>    <font color="#4169E1">if</font> (isghiep && PetscImaginaryPart(re)!=0.0) { d = 2; tmp2 = perm[i+1]; }
-<a name="line218">218: </a>    <font color="#4169E1">else</font> d = 1;
-<a name="line219">219: </a><font color="#A020F0">#endif</font>
-<a name="line220">220: </a>    j = i-1;
-<a name="line221">221: </a>    <font color="#4169E1">if</font> (wi) wi0 = wi[perm[j]];
-<a name="line222">222: </a>    <font color="#4169E1">else</font> wi0 = 0.0;
-<a name="line223">223: </a>    <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[perm[j]],wi0,&result);
-<a name="line224">224: </a>    <font color="#4169E1">while</font> (result<0 && j>=ds->l) {
-<a name="line225">225: </a>      perm[j+d] = perm[j];
-<a name="line226">226: </a>      j--;
-<a name="line227">227: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line228">228: </a>      <font color="#4169E1">if</font> (wi && wi[perm[j+1]]!=0)
-<a name="line229">229: </a><font color="#A020F0">#else</font>
-<a name="line230">230: </a>      <font color="#4169E1">if</font> (isghiep && PetscImaginaryPart(wr[perm[j+1]])!=0)
-<a name="line231">231: </a><font color="#A020F0">#endif</font>
-<a name="line232">232: </a>        { perm[j+d] = perm[j]; j--; }
-
-<a name="line234">234: </a>      <font color="#4169E1">if</font> (j>=ds->l) {
-<a name="line235">235: </a>        <font color="#4169E1">if</font> (wi) wi0 = wi[perm[j]];
-<a name="line236">236: </a>        <font color="#4169E1">else</font> wi0 = 0.0;
-<a name="line237">237: </a>        <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[perm[j]],wi0,&result);
-<a name="line238">238: </a>      }
-<a name="line239">239: </a>    }
-<a name="line240">240: </a>    perm[j+1] = tmp1;
-<a name="line241">241: </a>    <font color="#4169E1">if</font> (d==2) perm[j+2] = tmp2;
-<a name="line242">242: </a>  }
-<a name="line243">243: </a>  <font color="#4169E1">return</font>(0);
-<a name="line244">244: </a>}
-
-<a name="line248">248: </a><strong><font color="#4169E1"><a name="DSSortEigenvaluesReal_Private"></a>PetscErrorCode DSSortEigenvaluesReal_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscReal *eig,PetscInt *perm)</font></strong>
-<a name="line249">249: </a>{
-<a name="line251">251: </a>  PetscScalar    re;
-<a name="line252">252: </a>  PetscInt       i,j,result,tmp,l,n;
-
-<a name="line255">255: </a>  n = ds->t;   <font color="#B22222">/* sort only first t pairs if truncated */</font>
-<a name="line256">256: </a>  l = ds->l;
-<a name="line257">257: </a>  <font color="#B22222">/* insertion sort */</font>
-<a name="line258">258: </a>  <font color="#4169E1">for</font> (i=l+1;i<n;i++) {
-<a name="line259">259: </a>    re = eig[perm[i]];
-<a name="line260">260: </a>    j = i-1;
-<a name="line261">261: </a>    <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,eig[perm[j]],0.0,&result);
-<a name="line262">262: </a>    <font color="#4169E1">while</font> (result<0 && j>=l) {
-<a name="line263">263: </a>      tmp = perm[j]; perm[j] = perm[j+1]; perm[j+1] = tmp; j--;
-<a name="line264">264: </a>      <font color="#4169E1">if</font> (j>=l) {
-<a name="line265">265: </a>        <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,eig[perm[j]],0.0,&result);
-<a name="line266">266: </a>      }
-<a name="line267">267: </a>    }
-<a name="line268">268: </a>  }
-<a name="line269">269: </a>  <font color="#4169E1">return</font>(0);
-<a name="line270">270: </a>}
-
-<a name="line274">274: </a><font color="#B22222">/*</font>
-<a name="line275">275: </a><font color="#B22222">  DSCopyMatrix_Private - Copies the trailing block of a matrix (from</font>
-<a name="line276">276: </a><font color="#B22222">  rows/columns l to n).</font>
-<a name="line277">277: </a><font color="#B22222">*/</font>
-<a name="line278">278: </a><strong><font color="#4169E1"><a name="DSCopyMatrix_Private"></a>PetscErrorCode DSCopyMatrix_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> dst,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> src)</font></strong>
-<a name="line279">279: </a>{
-<a name="line281">281: </a>  PetscInt    j,m,off,ld;
-<a name="line282">282: </a>  PetscScalar *S,*D;
-
-<a name="line285">285: </a>  ld  = ds->ld;
-<a name="line286">286: </a>  m   = ds->n-ds->l;
-<a name="line287">287: </a>  off = ds->l+ds->l*ld;
-<a name="line288">288: </a>  S   = ds->mat[src];
-<a name="line289">289: </a>  D   = ds->mat[dst];
-<a name="line290">290: </a>  <font color="#4169E1">for</font> (j=0;j<m;j++) {
-<a name="line291">291: </a>    PetscMemcpy(D+off+j*ld,S+off+j*ld,m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line292">292: </a>  }
-<a name="line293">293: </a>  <font color="#4169E1">return</font>(0);
-<a name="line294">294: </a>}
-
-<a name="line298">298: </a><strong><font color="#4169E1"><a name="DSPermuteColumns_Private"></a>PetscErrorCode DSPermuteColumns_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt l,PetscInt n,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *perm)</font></strong>
-<a name="line299">299: </a>{
-<a name="line300">300: </a>  PetscInt    i,j,k,p,ld;
-<a name="line301">301: </a>  PetscScalar *Q,rtmp;
-
-<a name="line304">304: </a>  ld = ds->ld;
-<a name="line305">305: </a>  Q  = ds->mat[mat];
-<a name="line306">306: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
-<a name="line307">307: </a>    p = perm[i];
-<a name="line308">308: </a>    <font color="#4169E1">if</font> (p != i) {
-<a name="line309">309: </a>      j = i + 1;
-<a name="line310">310: </a>      <font color="#4169E1">while</font> (perm[j] != i) j++;
-<a name="line311">311: </a>      perm[j] = p; perm[i] = i;
-<a name="line312">312: </a>      <font color="#B22222">/* swap columns i and j */</font>
-<a name="line313">313: </a>      <font color="#4169E1">for</font> (k=0;k<n;k++) {
-<a name="line314">314: </a>        rtmp = Q[k+p*ld]; Q[k+p*ld] = Q[k+i*ld]; Q[k+i*ld] = rtmp;
-<a name="line315">315: </a>      }
-<a name="line316">316: </a>    }
-<a name="line317">317: </a>  }
-<a name="line318">318: </a>  <font color="#4169E1">return</font>(0);
-<a name="line319">319: </a>}
-
-<a name="line323">323: </a><strong><font color="#4169E1"><a name="DSPermuteRows_Private"></a>PetscErrorCode DSPermuteRows_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt l,PetscInt n,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *perm)</font></strong>
-<a name="line324">324: </a>{
-<a name="line325">325: </a>  PetscInt    i,j,m=ds->m,k,p,ld;
-<a name="line326">326: </a>  PetscScalar *Q,rtmp;
-
-<a name="line329">329: </a>  <font color="#4169E1">if</font> (!m) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"m was not set"</font>);
-<a name="line330">330: </a>  ld = ds->ld;
-<a name="line331">331: </a>  Q  = ds->mat[mat];
-<a name="line332">332: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
-<a name="line333">333: </a>    p = perm[i];
-<a name="line334">334: </a>    <font color="#4169E1">if</font> (p != i) {
-<a name="line335">335: </a>      j = i + 1;
-<a name="line336">336: </a>      <font color="#4169E1">while</font> (perm[j] != i) j++;
-<a name="line337">337: </a>      perm[j] = p; perm[i] = i;
-<a name="line338">338: </a>      <font color="#B22222">/* swap rows i and j */</font>
-<a name="line339">339: </a>      <font color="#4169E1">for</font> (k=0;k<m;k++) {
-<a name="line340">340: </a>        rtmp = Q[p+k*ld]; Q[p+k*ld] = Q[i+k*ld]; Q[i+k*ld] = rtmp;
-<a name="line341">341: </a>      }
-<a name="line342">342: </a>    }
-<a name="line343">343: </a>  }
-<a name="line344">344: </a>  <font color="#4169E1">return</font>(0);
-<a name="line345">345: </a>}
-
-<a name="line349">349: </a><strong><font color="#4169E1"><a name="DSPermuteBoth_Private"></a>PetscErrorCode DSPermuteBoth_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt l,PetscInt n,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat1,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat2,PetscInt *perm)</font></strong>
-<a name="line350">350: </a>{
-<a name="line351">351: </a>  PetscInt    i,j,m=ds->m,k,p,ld;
-<a name="line352">352: </a>  PetscScalar *U,*VT,rtmp;
-
-<a name="line355">355: </a>  <font color="#4169E1">if</font> (!m) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"m was not set"</font>);
-<a name="line356">356: </a>  ld = ds->ld;
-<a name="line357">357: </a>  U  = ds->mat[mat1];
-<a name="line358">358: </a>  VT = ds->mat[mat2];
-<a name="line359">359: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
-<a name="line360">360: </a>    p = perm[i];
-<a name="line361">361: </a>    <font color="#4169E1">if</font> (p != i) {
-<a name="line362">362: </a>      j = i + 1;
-<a name="line363">363: </a>      <font color="#4169E1">while</font> (perm[j] != i) j++;
-<a name="line364">364: </a>      perm[j] = p; perm[i] = i;
-<a name="line365">365: </a>      <font color="#B22222">/* swap columns i and j of U */</font>
-<a name="line366">366: </a>      <font color="#4169E1">for</font> (k=0;k<n;k++) {
-<a name="line367">367: </a>        rtmp = U[k+p*ld]; U[k+p*ld] = U[k+i*ld]; U[k+i*ld] = rtmp;
-<a name="line368">368: </a>      }
-<a name="line369">369: </a>      <font color="#B22222">/* swap rows i and j of VT */</font>
-<a name="line370">370: </a>      <font color="#4169E1">for</font> (k=0;k<m;k++) {
-<a name="line371">371: </a>        rtmp = VT[p+k*ld]; VT[p+k*ld] = VT[i+k*ld]; VT[i+k*ld] = rtmp;
-<a name="line372">372: </a>      }
-<a name="line373">373: </a>    }
-<a name="line374">374: </a>  }
-<a name="line375">375: </a>  <font color="#4169E1">return</font>(0);
-<a name="line376">376: </a>}
-
-<a name="line380">380: </a><font color="#B22222">/*@</font>
-<a name="line381">381: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a> - Copy the identity (a diagonal matrix with ones) on the</font>
-<a name="line382">382: </a><font color="#B22222">   active part of a matrix.</font>
-
-<a name="line384">384: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
-
-<a name="line386">386: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line387">387: </a><font color="#B22222">+  ds     - the direct solver context</font>
-<a name="line388">388: </a><font color="#B22222">-  mat    - the matrix to modify</font>
-
-<a name="line390">390: </a><font color="#B22222">   Level: intermediate</font>
-<a name="line391">391: </a><font color="#B22222">@*/</font>
-<a name="line392">392: </a><strong><font color="#4169E1"><a name="DSSetIdentity"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat)</font></strong>
-<a name="line393">393: </a>{
-<a name="line395">395: </a>  PetscScalar    *x;
-<a name="line396">396: </a>  PetscInt       i,ld,n,l;
-
-<a name="line399">399: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(ds,&n,NULL,&l,NULL,NULL);
-<a name="line400">400: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(ds,&ld);
-<a name="line401">401: </a>  PetscLogEventBegin(DS_Other,ds,0,0,0);
-<a name="line402">402: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
-<a name="line403">403: </a>  PetscMemzero(&x[ld*l],ld*(n-l)*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line404">404: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
-<a name="line405">405: </a>    x[ld*i+i] = 1.0;
-<a name="line406">406: </a>  }
-<a name="line407">407: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,mat,&x);
-<a name="line408">408: </a>  PetscLogEventEnd(DS_Other,ds,0,0,0);
-<a name="line409">409: </a>  <font color="#4169E1">return</font>(0);
-<a name="line410">410: </a>}
-
-<a name="line414">414: </a><font color="#B22222">/*</font>
-<a name="line415">415: </a><font color="#B22222">   DSOrthogonalize - Orthogonalize the columns of a matrix.</font>
-
-<a name="line417">417: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line418">418: </a><font color="#B22222">+  ds   - the direct solver context</font>
-<a name="line419">419: </a><font color="#B22222">.  mat  - a matrix</font>
-<a name="line420">420: </a><font color="#B22222">-  cols - number of columns to orthogonalize (starting from the column zero)</font>
-
-<a name="line422">422: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line423">423: </a><font color="#B22222">.  lindcols - number of linearly independent columns of the matrix (can be NULL)</font>
-<a name="line424">424: </a><font color="#B22222">*/</font>
-<a name="line425">425: </a><strong><font color="#4169E1"><a name="DSOrthogonalize"></a>PetscErrorCode DSOrthogonalize(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt cols,PetscInt *lindcols)</font></strong>
-<a name="line426">426: </a>{
-<a name="line427">427: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(SLEPC_MISSING_LAPACK_ORGQR)</font>
-<a name="line429">429: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routine is unavailable"</font>);
-<a name="line430">430: </a><font color="#A020F0">#else</font>
-<a name="line431">431: </a>  PetscErrorCode  ierr;
-<a name="line432">432: </a>  PetscInt        n,l,ld;
-<a name="line433">433: </a>  PetscBLASInt    ld_,rA,cA,info,ltau,lw;
-<a name="line434">434: </a>  PetscScalar     *A,*tau,*w,saux;
-
-<a name="line440">440: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(ds,&n,NULL,&l,NULL,NULL);
-<a name="line441">441: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(ds,&ld);
-<a name="line442">442: </a>  n = n - l;
-<a name="line443">443: </a>  <font color="#4169E1">if</font> (cols > n) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid number of columns"</font>);
-<a name="line444">444: </a>  <font color="#4169E1">if</font> (n == 0 || cols == 0) <font color="#4169E1">return</font>(0);
-<a name="line445">445: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&A);
-<a name="line446">446: </a>  PetscBLASIntCast(PetscMin(cols,n),&ltau);
-<a name="line447">447: </a>  PetscBLASIntCast(ld,&ld_);
-<a name="line448">448: </a>  PetscBLASIntCast(n,&rA);
-<a name="line449">449: </a>  PetscBLASIntCast(cols,&cA);
-<a name="line450">450: </a>  lw = -1;
-<a name="line451">451: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&rA,&cA,A,&ld_,NULL,&saux,&lw,&info));
-<a name="line452">452: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-<a name="line453">453: </a>  lw = (PetscBLASInt)PetscRealPart(saux);
-<a name="line454">454: </a>  DSAllocateWork_Private(ds,lw+ltau,0,0);
-<a name="line455">455: </a>  tau = ds->work;
-<a name="line456">456: </a>  w = &tau[ltau];
-<a name="line457">457: </a>  PetscLogEventBegin(DS_Other,ds,0,0,0);
-<a name="line458">458: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line459">459: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&rA,&cA,&A[ld*l+l],&ld_,tau,w,&lw,&info));
-<a name="line460">460: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
-<a name="line461">461: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKorgqr"</font>,LAPACKorgqr_(&rA,&ltau,&ltau,&A[ld*l+l],&ld_,tau,w,&lw,&info));
-<a name="line462">462: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
-<a name="line463">463: </a>  PetscFPTrapPop();
-<a name="line464">464: </a>  PetscLogEventEnd(DS_Other,ds,0,0,0);
-<a name="line465">465: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,mat,&A);
-<a name="line466">466: </a>  PetscObjectStateIncrease((PetscObject)ds);
-<a name="line467">467: </a>  <font color="#4169E1">if</font> (lindcols) *lindcols = ltau;
-<a name="line468">468: </a>  <font color="#4169E1">return</font>(0);
-<a name="line469">469: </a><font color="#A020F0">#endif</font>
-<a name="line470">470: </a>}
-
-<a name="line474">474: </a><font color="#B22222">/*</font>
-<a name="line475">475: </a><font color="#B22222">  Compute C <- a*A*B + b*C, where</font>
-<a name="line476">476: </a><font color="#B22222">    ldC, the leading dimension of C,</font>
-<a name="line477">477: </a><font color="#B22222">    ldA, the leading dimension of A,</font>
-<a name="line478">478: </a><font color="#B22222">    rA, cA, rows and columns of A,</font>
-<a name="line479">479: </a><font color="#B22222">    At, if true use the transpose of A instead,</font>
-<a name="line480">480: </a><font color="#B22222">    ldB, the leading dimension of B,</font>
-<a name="line481">481: </a><font color="#B22222">    rB, cB, rows and columns of B,</font>
-<a name="line482">482: </a><font color="#B22222">    Bt, if true use the transpose of B instead</font>
-<a name="line483">483: </a><font color="#B22222">*/</font>
-<a name="line484">484: </a><strong><font color="#4169E1"><a name="SlepcMatDenseMult"></a>static PetscErrorCode SlepcMatDenseMult(PetscScalar *C,PetscInt _ldC,PetscScalar b,PetscScalar a,const PetscScalar *A,PetscInt _ldA,PetscInt rA,PetscInt cA,PetscBool At,const PetscScalar *B,PetscInt _ldB,PetscInt rB,PetscInt cB,PetscBool Bt)</font></strong>
-<a name="line485">485: </a>{
-<a name="line487">487: </a>  PetscInt       tmp;
-<a name="line488">488: </a>  PetscBLASInt   m, n, k, ldA = _ldA, ldB = _ldB, ldC = _ldC;
-<a name="line489">489: </a>  const char     *N = <font color="#666666">"N"</font>, *T = <font color="#666666">"C"</font>, *qA = N, *qB = N;
-
-<a name="line492">492: </a>  <font color="#4169E1">if</font> ((rA == 0) || (cB == 0)) <font color="#4169E1">return</font>(0);
-
-<a name="line497">497: </a>  <font color="#B22222">/* Transpose if needed */</font>
-<a name="line498">498: </a>  <font color="#4169E1">if</font> (At) tmp = rA, rA = cA, cA = tmp, qA = T;
-<a name="line499">499: </a>  <font color="#4169E1">if</font> (Bt) tmp = rB, rB = cB, cB = tmp, qB = T;
-
-<a name="line501">501: </a>  <font color="#B22222">/* Check size */</font>
-<a name="line502">502: </a>  <font color="#4169E1">if</font> (cA != rB) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Matrix dimensions do not match"</font>);
-
-<a name="line504">504: </a>  <font color="#B22222">/* Do stub */</font>
-<a name="line505">505: </a>  <font color="#4169E1">if</font> ((rA == 1) && (cA == 1) && (cB == 1)) {
-<a name="line506">506: </a>    <font color="#4169E1">if</font> (!At && !Bt) *C = *A * *B;
-<a name="line507">507: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (At && !Bt) *C = PetscConj(*A) * *B;
-<a name="line508">508: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!At && Bt) *C = *A * PetscConj(*B);
-<a name="line509">509: </a>    <font color="#4169E1">else</font> *C = PetscConj(*A) * PetscConj(*B);
-<a name="line510">510: </a>    m = n = k = 1;
-<a name="line511">511: </a>  } <font color="#4169E1">else</font> {
-<a name="line512">512: </a>    m = rA; n = cB; k = cA;
-<a name="line513">513: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(qA,qB,&m,&n,&k,&a,(PetscScalar*)A,&ldA,(PetscScalar*)B,&ldB,&b,C,&ldC));
-<a name="line514">514: </a>  }
-
-<a name="line516">516: </a>  PetscLogFlops(m*n*2*k);
-<a name="line517">517: </a>  <font color="#4169E1">return</font>(0);
-<a name="line518">518: </a>}
-
-<a name="line522">522: </a><font color="#B22222">/*</font>
-<a name="line523">523: </a><font color="#B22222">   DSPseudoOrthogonalize - Orthogonalize the columns of a matrix with Modified</font>
-<a name="line524">524: </a><font color="#B22222">   Gram-Schmidt in an indefinite inner product space defined by a signature.</font>
-
-<a name="line526">526: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line527">527: </a><font color="#B22222">+  ds   - the direct solver context</font>
-<a name="line528">528: </a><font color="#B22222">.  mat  - the matrix</font>
-<a name="line529">529: </a><font color="#B22222">.  cols - number of columns to orthogonalize (starting from the column zero)</font>
-<a name="line530">530: </a><font color="#B22222">-  s    - the signature that defines the inner product</font>
-
-<a name="line532">532: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line533">533: </a><font color="#B22222">+  lindcols - linear independent columns of the matrix (can be NULL)</font>
-<a name="line534">534: </a><font color="#B22222">-  ns - the new norm of the vectors (can be NULL)</font>
-<a name="line535">535: </a><font color="#B22222">*/</font>
-<a name="line536">536: </a><strong><font color="#4169E1"><a name="DSPseudoOrthogonalize"></a>PetscErrorCode DSPseudoOrthogonalize(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt cols,PetscReal *s,PetscInt *lindcols,PetscReal *ns)</font></strong>
-<a name="line537">537: </a>{
-<a name="line538">538: </a>  PetscErrorCode  ierr;
-<a name="line539">539: </a>  PetscInt        i,j,k,l,n,ld;
-<a name="line540">540: </a>  PetscBLASInt    one=1,rA_;
-<a name="line541">541: </a>  PetscScalar     alpha,*A,*A_,*m,*h,nr0;
-<a name="line542">542: </a>  PetscReal       nr_o,nr,*ns_;
-
-<a name="line550">550: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(ds,&n,NULL,&l,NULL,NULL);
-<a name="line551">551: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(ds,&ld);
-<a name="line552">552: </a>  n = n - l;
-<a name="line553">553: </a>  <font color="#4169E1">if</font> (cols > n) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid number of columns"</font>);
-<a name="line554">554: </a>  <font color="#4169E1">if</font> (n == 0 || cols == 0) <font color="#4169E1">return</font>(0);
-<a name="line555">555: </a>  PetscBLASIntCast(n,&rA_);
-<a name="line556">556: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&A_);
-<a name="line557">557: </a>  A = &A_[ld*l+l];
-<a name="line558">558: </a>  DSAllocateWork_Private(ds,n+cols,ns?0:cols,0);
-<a name="line559">559: </a>  m = ds->work;
-<a name="line560">560: </a>  h = &m[n];
-<a name="line561">561: </a>  ns_ = ns ? ns : ds->rwork;
-<a name="line562">562: </a>  PetscLogEventBegin(DS_Other,ds,0,0,0);
-<a name="line563">563: </a>  <font color="#4169E1">for</font> (i=0; i<cols; i++) {
-<a name="line564">564: </a>    <font color="#B22222">/* m <- diag(s)*A[i] */</font>
-<a name="line565">565: </a>    <font color="#4169E1">for</font> (k=0; k<n; k++) m[k] = s[k]*A[k+i*ld];
-<a name="line566">566: </a>    <font color="#B22222">/* nr_o <- mynorm(A[i]'*m), mynorm(x) = sign(x)*sqrt(|x|) */</font>
-<a name="line567">567: </a>    SlepcMatDenseMult(&nr0,1,0.0,1.0,&A[ld*i],ld,n,1,PETSC_TRUE,m,n,n,1,PETSC_FALSE);
-<a name="line568">568: </a>    nr = nr_o = PetscSign(PetscRealPart(nr0))*PetscSqrtReal(PetscAbsScalar(nr0));
-<a name="line569">569: </a>    <font color="#4169E1">for</font> (j=0; j<3 && i>0; j++) {
-<a name="line570">570: </a>      <font color="#B22222">/* h <- A[0:i-1]'*m */</font>
-<a name="line571">571: </a>      SlepcMatDenseMult(h,i,0.0,1.0,A,ld,n,i,PETSC_TRUE,m,n,n,1,PETSC_FALSE);
-<a name="line572">572: </a>      <font color="#B22222">/* h <- diag(ns)*h */</font>
-<a name="line573">573: </a>      <font color="#4169E1">for</font> (k=0; k<i; k++) h[k] *= ns_[k];
-<a name="line574">574: </a>      <font color="#B22222">/* A[i] <- A[i] - A[0:i-1]*h */</font>
-<a name="line575">575: </a>      SlepcMatDenseMult(&A[ld*i],ld,1.0,-1.0,A,ld,n,i,PETSC_FALSE,h,i,i,1,PETSC_FALSE);
-<a name="line576">576: </a>      <font color="#B22222">/* m <- diag(s)*A[i] */</font>
-<a name="line577">577: </a>      <font color="#4169E1">for</font> (k=0; k<n; k++) m[k] = s[k]*A[k+i*ld];
-<a name="line578">578: </a>      <font color="#B22222">/* nr_o <- mynorm(A[i]'*m) */</font>
-<a name="line579">579: </a>      SlepcMatDenseMult(&nr0,1,0.0,1.0,&A[ld*i],ld,n,1,PETSC_TRUE,m,n,n,1,PETSC_FALSE);
-<a name="line580">580: </a>      nr = PetscSign(PetscRealPart(nr0))*PetscSqrtReal(PetscAbsScalar(nr0));
-<a name="line581">581: </a>      <font color="#4169E1">if</font> (PetscAbs(nr) < PETSC_MACHINE_EPSILON) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Linear dependency detected"</font>);
-<a name="line582">582: </a>      <font color="#4169E1">if</font> (PetscAbs(nr) > 0.7*PetscAbs(nr_o)) <font color="#4169E1">break</font>;
-<a name="line583">583: </a>      nr_o = nr;
-<a name="line584">584: </a>    }
-<a name="line585">585: </a>    ns_[i] = PetscSign(nr);
-<a name="line586">586: </a>    <font color="#B22222">/* A[i] <- A[i]/|nr| */</font>
-<a name="line587">587: </a>    alpha = 1.0/PetscAbs(nr);
-<a name="line588">588: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&rA_,&alpha,&A[i*ld],&one));
-<a name="line589">589: </a>  }
-<a name="line590">590: </a>  PetscLogEventEnd(DS_Other,ds,0,0,0);
-<a name="line591">591: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,mat,&A_);
-<a name="line592">592: </a>  PetscObjectStateIncrease((PetscObject)ds);
-<a name="line593">593: </a>  <font color="#4169E1">if</font> (lindcols) *lindcols = cols;
-<a name="line594">594: </a>  <font color="#4169E1">return</font>(0);
-<a name="line595">595: </a>}
+<a name="line53"> 53: </a>    <font color="#4169E1">case</font> DS_MAT_Y:
+<a name="line54"> 54: </a>      sz = ds->ld*n*<font color="#4169E1">sizeof</font>(PetscScalar);
+<a name="line55"> 55: </a>      <font color="#4169E1">break</font>;
+<a name="line56"> 56: </a><strong><font color="#FF0000">    default:</font></strong>
+<a name="line57"> 57: </a>      sz = n*n*<font color="#4169E1">sizeof</font>(PetscScalar);
+<a name="line58"> 58: </a>  }
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (ds->mat[m]) {
+<a name="line60"> 60: </a>    PetscFree(ds->mat[m]);
+<a name="line61"> 61: </a>  } <font color="#4169E1">else</font> {
+<a name="line62"> 62: </a>    PetscLogObjectMemory((PetscObject)ds,sz);
+<a name="line63"> 63: </a>  }
+<a name="line64"> 64: </a>  PetscMalloc(sz,&ds->mat[m]);
+<a name="line65"> 65: </a>  PetscMemzero(ds->mat[m],sz);
+<a name="line66"> 66: </a>  <font color="#4169E1">return</font>(0);
+<a name="line67"> 67: </a>}
+
+<a name="line71"> 71: </a><strong><font color="#4169E1"><a name="DSAllocateMatReal_Private"></a>PetscErrorCode DSAllocateMatReal_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> m)</font></strong>
+<a name="line72"> 72: </a>{
+<a name="line73"> 73: </a>  size_t         sz;
+
+<a name="line77"> 77: </a>  <font color="#4169E1">if</font> (m==DS_MAT_T) sz = 3*ds->ld*<font color="#4169E1">sizeof</font>(PetscReal);
+<a name="line78"> 78: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (m==DS_MAT_D) sz = ds->ld*<font color="#4169E1">sizeof</font>(PetscReal);
+<a name="line79"> 79: </a>  <font color="#4169E1">else</font> sz = ds->ld*ds->ld*<font color="#4169E1">sizeof</font>(PetscReal);
+<a name="line80"> 80: </a>  <font color="#4169E1">if</font> (!ds->rmat[m]) {
+<a name="line81"> 81: </a>    PetscLogObjectMemory((PetscObject)ds,sz);
+<a name="line82"> 82: </a>    PetscMalloc(sz,&ds->rmat[m]);
+<a name="line83"> 83: </a>  }
+<a name="line84"> 84: </a>  PetscMemzero(ds->rmat[m],sz);
+<a name="line85"> 85: </a>  <font color="#4169E1">return</font>(0);
+<a name="line86"> 86: </a>}
+
+<a name="line90"> 90: </a><strong><font color="#4169E1"><a name="DSAllocateWork_Private"></a>PetscErrorCode DSAllocateWork_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt s,PetscInt r,PetscInt i)</font></strong>
+<a name="line91"> 91: </a>{
+
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (s>ds->lwork) {
+<a name="line96"> 96: </a>    PetscFree(ds->work);
+<a name="line97"> 97: </a>    PetscMalloc1(s,&ds->work);
+<a name="line98"> 98: </a>    PetscLogObjectMemory((PetscObject)ds,(s-ds->lwork)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line99"> 99: </a>    ds->lwork = s;
+<a name="line100">100: </a>  }
+<a name="line101">101: </a>  <font color="#4169E1">if</font> (r>ds->lrwork) {
+<a name="line102">102: </a>    PetscFree(ds->rwork);
+<a name="line103">103: </a>    PetscMalloc1(r,&ds->rwork);
+<a name="line104">104: </a>    PetscLogObjectMemory((PetscObject)ds,(r-ds->lrwork)*<font color="#4169E1">sizeof</font>(PetscReal));
+<a name="line105">105: </a>    ds->lrwork = r;
+<a name="line106">106: </a>  }
+<a name="line107">107: </a>  <font color="#4169E1">if</font> (i>ds->liwork) {
+<a name="line108">108: </a>    PetscFree(ds->iwork);
+<a name="line109">109: </a>    PetscMalloc1(i,&ds->iwork);
+<a name="line110">110: </a>    PetscLogObjectMemory((PetscObject)ds,(i-ds->liwork)*<font color="#4169E1">sizeof</font>(PetscBLASInt));
+<a name="line111">111: </a>    ds->liwork = i;
+<a name="line112">112: </a>  }
+<a name="line113">113: </a>  <font color="#4169E1">return</font>(0);
+<a name="line114">114: </a>}
+
+<a name="line118">118: </a><font color="#B22222">/*@C</font>
+<a name="line119">119: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a> - Prints one of the internal <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> matrices.</font>
+
+<a name="line121">121: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line123">123: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line124">124: </a><font color="#B22222">+  ds     - the direct solver context</font>
+<a name="line125">125: </a><font color="#B22222">.  viewer - visualization context</font>
+<a name="line126">126: </a><font color="#B22222">-  m      - matrix to display</font>
+
+<a name="line128">128: </a><font color="#B22222">   Note:</font>
+<a name="line129">129: </a><font color="#B22222">   Works only for ascii viewers. Set the viewer in Matlab format if</font>
+<a name="line130">130: </a><font color="#B22222">   want to paste into Matlab.</font>
+
+<a name="line132">132: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line134">134: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSView.html#DSView">DSView</a>()</font>
+<a name="line135">135: </a><font color="#B22222">@*/</font>
+<a name="line136">136: </a><strong><font color="#4169E1"><a name="DSViewMat"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSViewMat.html#DSViewMat">DSViewMat</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscViewer viewer,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> m)</font></strong>
+<a name="line137">137: </a>{
+<a name="line138">138: </a>  PetscErrorCode    ierr;
+<a name="line139">139: </a>  PetscInt          i,j,rows,cols,d;
+<a name="line140">140: </a>  PetscScalar       *v;
+<a name="line141">141: </a>  PetscViewerFormat format;
+<a name="line142">142: </a>  PetscBool         ispep;
+<a name="line143">143: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line144">144: </a>  PetscBool         allreal = PETSC_TRUE;
+<a name="line145">145: </a><font color="#A020F0">#endif</font>
+
+<a name="line148">148: </a>  <font color="#4169E1">if</font> (m>=DS_NUM_MAT) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid matrix"</font>);
+<a name="line149">149: </a>  <font color="#4169E1">if</font> (!ds->mat[m]) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"Requested matrix was not created in this <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a>"</font>);
+<a name="line150">150: </a>  PetscViewerGetFormat(viewer,&format);
+<a name="line151">151: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_INFO || format == PETSC_VIEWER_ASCII_INFO_DETAIL) <font color="#4169E1">return</font>(0);
+<a name="line152">152: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (ds->state==DS_STATE_TRUNCATED && m>=DS_MAT_Q) rows = ds->t;
+<a name="line154">154: </a>  <font color="#4169E1">else</font> rows = (m==DS_MAT_A && ds->extrarow)? ds->n+1: ds->n;
+<a name="line155">155: </a>  cols = (ds->m!=0)? ds->m: ds->n;
+<a name="line156">156: </a>  PetscObjectTypeCompare((PetscObject)ds,DSPEP,&ispep);
+<a name="line157">157: </a>  <font color="#4169E1">if</font> (ispep) {
+<a name="line158">158: </a>    <a href="../../../../../docs/manualpages/DS/DSPEPGetDegree.html#DSPEPGetDegree">DSPEPGetDegree</a>(ds,&d);
+<a name="line159">159: </a>  }
+<a name="line160">160: </a>  <font color="#4169E1">if</font> (ispep && (m==DS_MAT_X || m==DS_MAT_Y)) cols = d*ds->n;
+<a name="line161">161: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line162">162: </a>  <font color="#B22222">/* determine if matrix has all real values */</font>
+<a name="line163">163: </a>  v = ds->mat[m];
+<a name="line164">164: </a>  <font color="#4169E1">for</font> (i=0;i<rows;i++)
+<a name="line165">165: </a>    <font color="#4169E1">for</font> (j=0;j<cols;j++)
+<a name="line166">166: </a>      <font color="#4169E1">if</font> (PetscImaginaryPart(v[i+j*ds->ld])) { allreal = PETSC_FALSE; <font color="#4169E1">break</font>; }
+<a name="line167">167: </a><font color="#A020F0">#endif</font>
+<a name="line168">168: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
+<a name="line169">169: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%% Size = %D %D\n"</font>,rows,cols);
+<a name="line170">170: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s = [\n"</font>,DSMatName[m]);
+<a name="line171">171: </a>  } <font color="#4169E1">else</font> {
+<a name="line172">172: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"Matrix %s =\n"</font>,DSMatName[m]);
+<a name="line173">173: </a>  }
+
+<a name="line175">175: </a>  <font color="#4169E1">for</font> (i=0;i<rows;i++) {
+<a name="line176">176: </a>    v = ds->mat[m]+i;
+<a name="line177">177: </a>    <font color="#4169E1">for</font> (j=0;j<cols;j++) {
+<a name="line178">178: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line179">179: </a>      <font color="#4169E1">if</font> (allreal) {
+<a name="line180">180: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e "</font>,PetscRealPart(*v));
+<a name="line181">181: </a>      } <font color="#4169E1">else</font> {
+<a name="line182">182: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e%+18.16ei "</font>,PetscRealPart(*v),PetscImaginaryPart(*v));
+<a name="line183">183: </a>      }
+<a name="line184">184: </a><font color="#A020F0">#else</font>
+<a name="line185">185: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%18.16e "</font>,*v);
+<a name="line186">186: </a><font color="#A020F0">#endif</font>
+<a name="line187">187: </a>      v += ds->ld;
+<a name="line188">188: </a>    }
+<a name="line189">189: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line190">190: </a>  }
+
+<a name="line192">192: </a>  <font color="#4169E1">if</font> (format == PETSC_VIEWER_ASCII_MATLAB) {
+<a name="line193">193: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"];\n"</font>);
+<a name="line194">194: </a>  }
+<a name="line195">195: </a>  PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line196">196: </a>  PetscViewerFlush(viewer);
+<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
+<a name="line198">198: </a>}
+
+<a name="line202">202: </a><strong><font color="#4169E1"><a name="DSSortEigenvalues_Private"></a>PetscErrorCode DSSortEigenvalues_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscScalar *wr,PetscScalar *wi,PetscInt *perm,PetscBool isghiep)</font></strong>
+<a name="line203">203: </a>{
+<a name="line205">205: </a>  PetscScalar    re,im,wi0;
+<a name="line206">206: </a>  PetscInt       n,i,j,result,tmp1,tmp2=0,d=1;
+
+<a name="line209">209: </a>  n = ds->t;   <font color="#B22222">/* sort only first t pairs if truncated */</font>
+<a name="line210">210: </a>  <font color="#B22222">/* insertion sort */</font>
+<a name="line211">211: </a>  i=ds->l+1;
+<a name="line212">212: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line213">213: </a>  <font color="#4169E1">if</font> (wi && wi[perm[i-1]]!=0.0) i++; <font color="#B22222">/* initial value is complex */</font>
+<a name="line214">214: </a><font color="#A020F0">#else</font>
+<a name="line215">215: </a>  <font color="#4169E1">if</font> (isghiep && PetscImaginaryPart(wr[perm[i-1]])!=0.0) i++;
+<a name="line216">216: </a><font color="#A020F0">#endif</font>
+<a name="line217">217: </a>  <font color="#4169E1">for</font> (;i<n;i+=d) {
+<a name="line218">218: </a>    re = wr[perm[i]];
+<a name="line219">219: </a>    <font color="#4169E1">if</font> (wi) im = wi[perm[i]];
+<a name="line220">220: </a>    <font color="#4169E1">else</font> im = 0.0;
+<a name="line221">221: </a>    tmp1 = perm[i];
+<a name="line222">222: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line223">223: </a>    <font color="#4169E1">if</font> (im!=0.0) { d = 2; tmp2 = perm[i+1]; }
+<a name="line224">224: </a>    <font color="#4169E1">else</font> d = 1;
+<a name="line225">225: </a><font color="#A020F0">#else</font>
+<a name="line226">226: </a>    <font color="#4169E1">if</font> (isghiep && PetscImaginaryPart(re)!=0.0) { d = 2; tmp2 = perm[i+1]; }
+<a name="line227">227: </a>    <font color="#4169E1">else</font> d = 1;
+<a name="line228">228: </a><font color="#A020F0">#endif</font>
+<a name="line229">229: </a>    j = i-1;
+<a name="line230">230: </a>    <font color="#4169E1">if</font> (wi) wi0 = wi[perm[j]];
+<a name="line231">231: </a>    <font color="#4169E1">else</font> wi0 = 0.0;
+<a name="line232">232: </a>    <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[perm[j]],wi0,&result);
+<a name="line233">233: </a>    <font color="#4169E1">while</font> (result<0 && j>=ds->l) {
+<a name="line234">234: </a>      perm[j+d] = perm[j];
+<a name="line235">235: </a>      j--;
+<a name="line236">236: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line237">237: </a>      <font color="#4169E1">if</font> (wi && wi[perm[j+1]]!=0)
+<a name="line238">238: </a><font color="#A020F0">#else</font>
+<a name="line239">239: </a>      <font color="#4169E1">if</font> (isghiep && PetscImaginaryPart(wr[perm[j+1]])!=0)
+<a name="line240">240: </a><font color="#A020F0">#endif</font>
+<a name="line241">241: </a>        { perm[j+d] = perm[j]; j--; }
+
+<a name="line243">243: </a>      <font color="#4169E1">if</font> (j>=ds->l) {
+<a name="line244">244: </a>        <font color="#4169E1">if</font> (wi) wi0 = wi[perm[j]];
+<a name="line245">245: </a>        <font color="#4169E1">else</font> wi0 = 0.0;
+<a name="line246">246: </a>        <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,im,wr[perm[j]],wi0,&result);
+<a name="line247">247: </a>      }
+<a name="line248">248: </a>    }
+<a name="line249">249: </a>    perm[j+1] = tmp1;
+<a name="line250">250: </a>    <font color="#4169E1">if</font> (d==2) perm[j+2] = tmp2;
+<a name="line251">251: </a>  }
+<a name="line252">252: </a>  <font color="#4169E1">return</font>(0);
+<a name="line253">253: </a>}
+
+<a name="line257">257: </a><strong><font color="#4169E1"><a name="DSSortEigenvaluesReal_Private"></a>PetscErrorCode DSSortEigenvaluesReal_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscReal *eig,PetscInt *perm)</font></strong>
+<a name="line258">258: </a>{
+<a name="line260">260: </a>  PetscScalar    re;
+<a name="line261">261: </a>  PetscInt       i,j,result,tmp,l,n;
+
+<a name="line264">264: </a>  n = ds->t;   <font color="#B22222">/* sort only first t pairs if truncated */</font>
+<a name="line265">265: </a>  l = ds->l;
+<a name="line266">266: </a>  <font color="#B22222">/* insertion sort */</font>
+<a name="line267">267: </a>  <font color="#4169E1">for</font> (i=l+1;i<n;i++) {
+<a name="line268">268: </a>    re = eig[perm[i]];
+<a name="line269">269: </a>    j = i-1;
+<a name="line270">270: </a>    <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,eig[perm[j]],0.0,&result);
+<a name="line271">271: </a>    <font color="#4169E1">while</font> (result<0 && j>=l) {
+<a name="line272">272: </a>      tmp = perm[j]; perm[j] = perm[j+1]; perm[j+1] = tmp; j--;
+<a name="line273">273: </a>      <font color="#4169E1">if</font> (j>=l) {
+<a name="line274">274: </a>        <a href="../../../../../docs/manualpages/sys/SlepcSCCompare.html#SlepcSCCompare">SlepcSCCompare</a>(ds->sc,re,0.0,eig[perm[j]],0.0,&result);
+<a name="line275">275: </a>      }
+<a name="line276">276: </a>    }
+<a name="line277">277: </a>  }
+<a name="line278">278: </a>  <font color="#4169E1">return</font>(0);
+<a name="line279">279: </a>}
+
+<a name="line283">283: </a><font color="#B22222">/*</font>
+<a name="line284">284: </a><font color="#B22222">  DSCopyMatrix_Private - Copies the trailing block of a matrix (from</font>
+<a name="line285">285: </a><font color="#B22222">  rows/columns l to n).</font>
+<a name="line286">286: </a><font color="#B22222">*/</font>
+<a name="line287">287: </a><strong><font color="#4169E1"><a name="DSCopyMatrix_Private"></a>PetscErrorCode DSCopyMatrix_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> dst,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> src)</font></strong>
+<a name="line288">288: </a>{
+<a name="line290">290: </a>  PetscInt    j,m,off,ld;
+<a name="line291">291: </a>  PetscScalar *S,*D;
+
+<a name="line294">294: </a>  ld  = ds->ld;
+<a name="line295">295: </a>  m   = ds->n-ds->l;
+<a name="line296">296: </a>  off = ds->l+ds->l*ld;
+<a name="line297">297: </a>  S   = ds->mat[src];
+<a name="line298">298: </a>  D   = ds->mat[dst];
+<a name="line299">299: </a>  <font color="#4169E1">for</font> (j=0;j<m;j++) {
+<a name="line300">300: </a>    PetscMemcpy(D+off+j*ld,S+off+j*ld,m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line301">301: </a>  }
+<a name="line302">302: </a>  <font color="#4169E1">return</font>(0);
+<a name="line303">303: </a>}
+
+<a name="line307">307: </a><strong><font color="#4169E1"><a name="DSPermuteColumns_Private"></a>PetscErrorCode DSPermuteColumns_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt l,PetscInt n,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *perm)</font></strong>
+<a name="line308">308: </a>{
+<a name="line309">309: </a>  PetscInt    i,j,k,p,ld;
+<a name="line310">310: </a>  PetscScalar *Q,rtmp;
+
+<a name="line313">313: </a>  ld = ds->ld;
+<a name="line314">314: </a>  Q  = ds->mat[mat];
+<a name="line315">315: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line316">316: </a>    p = perm[i];
+<a name="line317">317: </a>    <font color="#4169E1">if</font> (p != i) {
+<a name="line318">318: </a>      j = i + 1;
+<a name="line319">319: </a>      <font color="#4169E1">while</font> (perm[j] != i) j++;
+<a name="line320">320: </a>      perm[j] = p; perm[i] = i;
+<a name="line321">321: </a>      <font color="#B22222">/* swap columns i and j */</font>
+<a name="line322">322: </a>      <font color="#4169E1">for</font> (k=0;k<n;k++) {
+<a name="line323">323: </a>        rtmp = Q[k+p*ld]; Q[k+p*ld] = Q[k+i*ld]; Q[k+i*ld] = rtmp;
+<a name="line324">324: </a>      }
+<a name="line325">325: </a>    }
+<a name="line326">326: </a>  }
+<a name="line327">327: </a>  <font color="#4169E1">return</font>(0);
+<a name="line328">328: </a>}
+
+<a name="line332">332: </a><strong><font color="#4169E1"><a name="DSPermuteRows_Private"></a>PetscErrorCode DSPermuteRows_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt l,PetscInt n,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt *perm)</font></strong>
+<a name="line333">333: </a>{
+<a name="line334">334: </a>  PetscInt    i,j,m=ds->m,k,p,ld;
+<a name="line335">335: </a>  PetscScalar *Q,rtmp;
+
+<a name="line338">338: </a>  <font color="#4169E1">if</font> (!m) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"m was not set"</font>);
+<a name="line339">339: </a>  ld = ds->ld;
+<a name="line340">340: </a>  Q  = ds->mat[mat];
+<a name="line341">341: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line342">342: </a>    p = perm[i];
+<a name="line343">343: </a>    <font color="#4169E1">if</font> (p != i) {
+<a name="line344">344: </a>      j = i + 1;
+<a name="line345">345: </a>      <font color="#4169E1">while</font> (perm[j] != i) j++;
+<a name="line346">346: </a>      perm[j] = p; perm[i] = i;
+<a name="line347">347: </a>      <font color="#B22222">/* swap rows i and j */</font>
+<a name="line348">348: </a>      <font color="#4169E1">for</font> (k=0;k<m;k++) {
+<a name="line349">349: </a>        rtmp = Q[p+k*ld]; Q[p+k*ld] = Q[i+k*ld]; Q[i+k*ld] = rtmp;
+<a name="line350">350: </a>      }
+<a name="line351">351: </a>    }
+<a name="line352">352: </a>  }
+<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
+<a name="line354">354: </a>}
+
+<a name="line358">358: </a><strong><font color="#4169E1"><a name="DSPermuteBoth_Private"></a>PetscErrorCode DSPermuteBoth_Private(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,PetscInt l,PetscInt n,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat1,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat2,PetscInt *perm)</font></strong>
+<a name="line359">359: </a>{
+<a name="line360">360: </a>  PetscInt    i,j,m=ds->m,k,p,ld;
+<a name="line361">361: </a>  PetscScalar *U,*VT,rtmp;
+
+<a name="line364">364: </a>  <font color="#4169E1">if</font> (!m) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"m was not set"</font>);
+<a name="line365">365: </a>  ld = ds->ld;
+<a name="line366">366: </a>  U  = ds->mat[mat1];
+<a name="line367">367: </a>  VT = ds->mat[mat2];
+<a name="line368">368: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line369">369: </a>    p = perm[i];
+<a name="line370">370: </a>    <font color="#4169E1">if</font> (p != i) {
+<a name="line371">371: </a>      j = i + 1;
+<a name="line372">372: </a>      <font color="#4169E1">while</font> (perm[j] != i) j++;
+<a name="line373">373: </a>      perm[j] = p; perm[i] = i;
+<a name="line374">374: </a>      <font color="#B22222">/* swap columns i and j of U */</font>
+<a name="line375">375: </a>      <font color="#4169E1">for</font> (k=0;k<n;k++) {
+<a name="line376">376: </a>        rtmp = U[k+p*ld]; U[k+p*ld] = U[k+i*ld]; U[k+i*ld] = rtmp;
+<a name="line377">377: </a>      }
+<a name="line378">378: </a>      <font color="#B22222">/* swap rows i and j of VT */</font>
+<a name="line379">379: </a>      <font color="#4169E1">for</font> (k=0;k<m;k++) {
+<a name="line380">380: </a>        rtmp = VT[p+k*ld]; VT[p+k*ld] = VT[i+k*ld]; VT[i+k*ld] = rtmp;
+<a name="line381">381: </a>      }
+<a name="line382">382: </a>    }
+<a name="line383">383: </a>  }
+<a name="line384">384: </a>  <font color="#4169E1">return</font>(0);
+<a name="line385">385: </a>}
+
+<a name="line389">389: </a><font color="#B22222">/*@</font>
+<a name="line390">390: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a> - Copy the identity (a diagonal matrix with ones) on the</font>
+<a name="line391">391: </a><font color="#B22222">   active part of a matrix.</font>
+
+<a name="line393">393: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line395">395: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line396">396: </a><font color="#B22222">+  ds     - the direct solver context</font>
+<a name="line397">397: </a><font color="#B22222">-  mat    - the matrix to modify</font>
+
+<a name="line399">399: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line400">400: </a><font color="#B22222">@*/</font>
+<a name="line401">401: </a><strong><font color="#4169E1"><a name="DSSetIdentity"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSSetIdentity.html#DSSetIdentity">DSSetIdentity</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat)</font></strong>
+<a name="line402">402: </a>{
+<a name="line404">404: </a>  PetscScalar    *x;
+<a name="line405">405: </a>  PetscInt       i,ld,n,l;
+
+<a name="line408">408: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(ds,&n,NULL,&l,NULL,NULL);
+<a name="line409">409: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(ds,&ld);
+<a name="line410">410: </a>  PetscLogEventBegin(DS_Other,ds,0,0,0);
+<a name="line411">411: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&x);
+<a name="line412">412: </a>  PetscMemzero(&x[ld*l],ld*(n-l)*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line413">413: </a>  <font color="#4169E1">for</font> (i=l;i<n;i++) {
+<a name="line414">414: </a>    x[ld*i+i] = 1.0;
+<a name="line415">415: </a>  }
+<a name="line416">416: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,mat,&x);
+<a name="line417">417: </a>  PetscLogEventEnd(DS_Other,ds,0,0,0);
+<a name="line418">418: </a>  <font color="#4169E1">return</font>(0);
+<a name="line419">419: </a>}
+
+<a name="line423">423: </a><font color="#B22222">/*@C</font>
+<a name="line424">424: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a> - Orthogonalize the columns of a matrix.</font>
+
+<a name="line426">426: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line428">428: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line429">429: </a><font color="#B22222">+  ds   - the direct solver context</font>
+<a name="line430">430: </a><font color="#B22222">.  mat  - a matrix</font>
+<a name="line431">431: </a><font color="#B22222">-  cols - number of columns to orthogonalize (starting from column zero)</font>
+
+<a name="line433">433: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line434">434: </a><font color="#B22222">.  lindcols - (optional) number of linearly independent columns of the matrix</font>
+
+<a name="line436">436: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line438">438: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</a>()</font>
+<a name="line439">439: </a><font color="#B22222">@*/</font>
+<a name="line440">440: </a><strong><font color="#4169E1"><a name="DSOrthogonalize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt cols,PetscInt *lindcols)</font></strong>
+<a name="line441">441: </a>{
+<a name="line442">442: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GEQRF) || defined(PETSC_MISSING_LAPACK_ORGQR)</font>
+<a name="line444">444: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEQRF/ORGQR - Lapack routine is unavailable"</font>);
+<a name="line445">445: </a><font color="#A020F0">#else</font>
+<a name="line447">447: </a>  PetscInt       n,l,ld;
+<a name="line448">448: </a>  PetscBLASInt   ld_,rA,cA,info,ltau,lw;
+<a name="line449">449: </a>  PetscScalar    *A,*tau,*w,saux;
+
+<a name="line453">453: </a>  DSCheckAlloc(ds,1);
+
+<a name="line457">457: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(ds,&n,NULL,&l,NULL,NULL);
+<a name="line458">458: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(ds,&ld);
+<a name="line459">459: </a>  n = n - l;
+<a name="line460">460: </a>  <font color="#4169E1">if</font> (cols > n) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid number of columns"</font>);
+<a name="line461">461: </a>  <font color="#4169E1">if</font> (n == 0 || cols == 0) <font color="#4169E1">return</font>(0);
+
+<a name="line463">463: </a>  PetscLogEventBegin(DS_Other,ds,0,0,0);
+<a name="line464">464: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line465">465: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&A);
+<a name="line466">466: </a>  PetscBLASIntCast(PetscMin(cols,n),&ltau);
+<a name="line467">467: </a>  PetscBLASIntCast(ld,&ld_);
+<a name="line468">468: </a>  PetscBLASIntCast(n,&rA);
+<a name="line469">469: </a>  PetscBLASIntCast(cols,&cA);
+<a name="line470">470: </a>  lw = -1;
+<a name="line471">471: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&rA,&cA,A,&ld_,NULL,&saux,&lw,&info));
+<a name="line472">472: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line473">473: </a>  lw = (PetscBLASInt)PetscRealPart(saux);
+<a name="line474">474: </a>  DSAllocateWork_Private(ds,lw+ltau,0,0);
+<a name="line475">475: </a>  tau = ds->work;
+<a name="line476">476: </a>  w = &tau[ltau];
+<a name="line477">477: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgeqrf"</font>,LAPACKgeqrf_(&rA,&cA,&A[ld*l+l],&ld_,tau,w,&lw,&info));
+<a name="line478">478: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEQRF %d"</font>,info);
+<a name="line479">479: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKungqr"</font>,LAPACKungqr_(&rA,&ltau,&ltau,&A[ld*l+l],&ld_,tau,w,&lw,&info));
+<a name="line480">480: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xORGQR %d"</font>,info);
+<a name="line481">481: </a>  <font color="#4169E1">if</font> (lindcols) *lindcols = ltau;
+
+<a name="line483">483: </a>  PetscFPTrapPop();
+<a name="line484">484: </a>  PetscLogEventEnd(DS_Other,ds,0,0,0);
+<a name="line485">485: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,mat,&A);
+<a name="line486">486: </a>  PetscObjectStateIncrease((PetscObject)ds);
+<a name="line487">487: </a>  <font color="#4169E1">return</font>(0);
+<a name="line488">488: </a><font color="#A020F0">#endif</font>
+<a name="line489">489: </a>}
+
+<a name="line493">493: </a><font color="#B22222">/*</font>
+<a name="line494">494: </a><font color="#B22222">  Compute C <- a*A*B + b*C, where</font>
+<a name="line495">495: </a><font color="#B22222">    ldC, the leading dimension of C,</font>
+<a name="line496">496: </a><font color="#B22222">    ldA, the leading dimension of A,</font>
+<a name="line497">497: </a><font color="#B22222">    rA, cA, rows and columns of A,</font>
+<a name="line498">498: </a><font color="#B22222">    At, if true use the transpose of A instead,</font>
+<a name="line499">499: </a><font color="#B22222">    ldB, the leading dimension of B,</font>
+<a name="line500">500: </a><font color="#B22222">    rB, cB, rows and columns of B,</font>
+<a name="line501">501: </a><font color="#B22222">    Bt, if true use the transpose of B instead</font>
+<a name="line502">502: </a><font color="#B22222">*/</font>
+<a name="line503">503: </a><strong><font color="#4169E1"><a name="SlepcMatDenseMult"></a>static PetscErrorCode SlepcMatDenseMult(PetscScalar *C,PetscInt _ldC,PetscScalar b,PetscScalar a,const PetscScalar *A,PetscInt _ldA,PetscInt rA,PetscInt cA,PetscBool At,const PetscScalar *B,PetscInt _ldB,PetscInt rB,PetscInt cB,PetscBool Bt)</font></strong>
+<a name="line504">504: </a>{
+<a name="line506">506: </a>  PetscInt       tmp;
+<a name="line507">507: </a>  PetscBLASInt   m, n, k, ldA = _ldA, ldB = _ldB, ldC = _ldC;
+<a name="line508">508: </a>  const char     *N = <font color="#666666">"N"</font>, *T = <font color="#666666">"C"</font>, *qA = N, *qB = N;
+
+<a name="line511">511: </a>  <font color="#4169E1">if</font> ((rA == 0) || (cB == 0)) <font color="#4169E1">return</font>(0);
+
+<a name="line516">516: </a>  <font color="#B22222">/* Transpose if needed */</font>
+<a name="line517">517: </a>  <font color="#4169E1">if</font> (At) tmp = rA, rA = cA, cA = tmp, qA = T;
+<a name="line518">518: </a>  <font color="#4169E1">if</font> (Bt) tmp = rB, rB = cB, cB = tmp, qB = T;
+
+<a name="line520">520: </a>  <font color="#B22222">/* Check size */</font>
+<a name="line521">521: </a>  <font color="#4169E1">if</font> (cA != rB) SETERRQ(PETSC_COMM_SELF,1, <font color="#666666">"Matrix dimensions do not match"</font>);
+
+<a name="line523">523: </a>  <font color="#B22222">/* Do stub */</font>
+<a name="line524">524: </a>  <font color="#4169E1">if</font> ((rA == 1) && (cA == 1) && (cB == 1)) {
+<a name="line525">525: </a>    <font color="#4169E1">if</font> (!At && !Bt) *C = *A * *B;
+<a name="line526">526: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (At && !Bt) *C = PetscConj(*A) * *B;
+<a name="line527">527: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!At && Bt) *C = *A * PetscConj(*B);
+<a name="line528">528: </a>    <font color="#4169E1">else</font> *C = PetscConj(*A) * PetscConj(*B);
+<a name="line529">529: </a>    m = n = k = 1;
+<a name="line530">530: </a>  } <font color="#4169E1">else</font> {
+<a name="line531">531: </a>    m = rA; n = cB; k = cA;
+<a name="line532">532: </a>    PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(qA,qB,&m,&n,&k,&a,(PetscScalar*)A,&ldA,(PetscScalar*)B,&ldB,&b,C,&ldC));
+<a name="line533">533: </a>  }
+
+<a name="line535">535: </a>  PetscLogFlops(m*n*2*k);
+<a name="line536">536: </a>  <font color="#4169E1">return</font>(0);
+<a name="line537">537: </a>}
+
+<a name="line541">541: </a><font color="#B22222">/*@C</font>
+<a name="line542">542: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</a> - Orthogonalize the columns of a matrix with Modified</font>
+<a name="line543">543: </a><font color="#B22222">   Gram-Schmidt in an indefinite inner product space defined by a signature.</font>
+
+<a name="line545">545: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a></font>
+
+<a name="line547">547: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line548">548: </a><font color="#B22222">+  ds   - the direct solver context</font>
+<a name="line549">549: </a><font color="#B22222">.  mat  - the matrix</font>
+<a name="line550">550: </a><font color="#B22222">.  cols - number of columns to orthogonalize (starting from column zero)</font>
+<a name="line551">551: </a><font color="#B22222">-  s    - the signature that defines the inner product</font>
+
+<a name="line553">553: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line554">554: </a><font color="#B22222">+  lindcols - (optional) linearly independent columns of the matrix</font>
+<a name="line555">555: </a><font color="#B22222">-  ns   - (optional) the new norm of the vectors</font>
+
+<a name="line557">557: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line559">559: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/DS/DSOrthogonalize.html#DSOrthogonalize">DSOrthogonalize</a>()</font>
+<a name="line560">560: </a><font color="#B22222">@*/</font>
+<a name="line561">561: </a><strong><font color="#4169E1"><a name="DSPseudoOrthogonalize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/DS/DSPseudoOrthogonalize.html#DSPseudoOrthogonalize">DSPseudoOrthogonalize</a>(<a href="../../../../../docs/manualpages/DS/DS.html#DS">DS</a> ds,<a href="../../../../../docs/manualpages/DS/DSMatType.html#DSMatType">DSMatType</a> mat,PetscInt cols,PetscReal *s,PetscInt *lindcols,PetscReal *ns)</font></strong>
+<a name="line562">562: </a>{
+<a name="line564">564: </a>  PetscInt       i,j,k,l,n,ld;
+<a name="line565">565: </a>  PetscBLASInt   one=1,rA_;
+<a name="line566">566: </a>  PetscScalar    alpha,*A,*A_,*m,*h,nr0;
+<a name="line567">567: </a>  PetscReal      nr_o,nr,*ns_;
+
+<a name="line571">571: </a>  DSCheckAlloc(ds,1);
+<a name="line575">575: </a>  <a href="../../../../../docs/manualpages/DS/DSGetDimensions.html#DSGetDimensions">DSGetDimensions</a>(ds,&n,NULL,&l,NULL,NULL);
+<a name="line576">576: </a>  <a href="../../../../../docs/manualpages/DS/DSGetLeadingDimension.html#DSGetLeadingDimension">DSGetLeadingDimension</a>(ds,&ld);
+<a name="line577">577: </a>  n = n - l;
+<a name="line578">578: </a>  <font color="#4169E1">if</font> (cols > n) SETERRQ(PetscObjectComm((PetscObject)ds),PETSC_ERR_ARG_WRONG,<font color="#666666">"Invalid number of columns"</font>);
+<a name="line579">579: </a>  <font color="#4169E1">if</font> (n == 0 || cols == 0) <font color="#4169E1">return</font>(0);
+<a name="line580">580: </a>  PetscBLASIntCast(n,&rA_);
+<a name="line581">581: </a>  <a href="../../../../../docs/manualpages/DS/DSGetArray.html#DSGetArray">DSGetArray</a>(ds,mat,&A_);
+<a name="line582">582: </a>  A = &A_[ld*l+l];
+<a name="line583">583: </a>  DSAllocateWork_Private(ds,n+cols,ns?0:cols,0);
+<a name="line584">584: </a>  m = ds->work;
+<a name="line585">585: </a>  h = &m[n];
+<a name="line586">586: </a>  ns_ = ns ? ns : ds->rwork;
+<a name="line587">587: </a>  PetscLogEventBegin(DS_Other,ds,0,0,0);
+<a name="line588">588: </a>  <font color="#4169E1">for</font> (i=0; i<cols; i++) {
+<a name="line589">589: </a>    <font color="#B22222">/* m <- diag(s)*A[i] */</font>
+<a name="line590">590: </a>    <font color="#4169E1">for</font> (k=0; k<n; k++) m[k] = s[k]*A[k+i*ld];
+<a name="line591">591: </a>    <font color="#B22222">/* nr_o <- mynorm(A[i]'*m), mynorm(x) = sign(x)*sqrt(|x|) */</font>
+<a name="line592">592: </a>    SlepcMatDenseMult(&nr0,1,0.0,1.0,&A[ld*i],ld,n,1,PETSC_TRUE,m,n,n,1,PETSC_FALSE);
+<a name="line593">593: </a>    nr = nr_o = PetscSign(PetscRealPart(nr0))*PetscSqrtReal(PetscAbsScalar(nr0));
+<a name="line594">594: </a>    <font color="#4169E1">for</font> (j=0; j<3 && i>0; j++) {
+<a name="line595">595: </a>      <font color="#B22222">/* h <- A[0:i-1]'*m */</font>
+<a name="line596">596: </a>      SlepcMatDenseMult(h,i,0.0,1.0,A,ld,n,i,PETSC_TRUE,m,n,n,1,PETSC_FALSE);
+<a name="line597">597: </a>      <font color="#B22222">/* h <- diag(ns)*h */</font>
+<a name="line598">598: </a>      <font color="#4169E1">for</font> (k=0; k<i; k++) h[k] *= ns_[k];
+<a name="line599">599: </a>      <font color="#B22222">/* A[i] <- A[i] - A[0:i-1]*h */</font>
+<a name="line600">600: </a>      SlepcMatDenseMult(&A[ld*i],ld,1.0,-1.0,A,ld,n,i,PETSC_FALSE,h,i,i,1,PETSC_FALSE);
+<a name="line601">601: </a>      <font color="#B22222">/* m <- diag(s)*A[i] */</font>
+<a name="line602">602: </a>      <font color="#4169E1">for</font> (k=0; k<n; k++) m[k] = s[k]*A[k+i*ld];
+<a name="line603">603: </a>      <font color="#B22222">/* nr_o <- mynorm(A[i]'*m) */</font>
+<a name="line604">604: </a>      SlepcMatDenseMult(&nr0,1,0.0,1.0,&A[ld*i],ld,n,1,PETSC_TRUE,m,n,n,1,PETSC_FALSE);
+<a name="line605">605: </a>      nr = PetscSign(PetscRealPart(nr0))*PetscSqrtReal(PetscAbsScalar(nr0));
+<a name="line606">606: </a>      <font color="#4169E1">if</font> (PetscAbs(nr) < PETSC_MACHINE_EPSILON) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Linear dependency detected"</font>);
+<a name="line607">607: </a>      <font color="#4169E1">if</font> (PetscAbs(nr) > 0.7*PetscAbs(nr_o)) <font color="#4169E1">break</font>;
+<a name="line608">608: </a>      nr_o = nr;
+<a name="line609">609: </a>    }
+<a name="line610">610: </a>    ns_[i] = PetscSign(nr);
+<a name="line611">611: </a>    <font color="#B22222">/* A[i] <- A[i]/|nr| */</font>
+<a name="line612">612: </a>    alpha = 1.0/PetscAbs(nr);
+<a name="line613">613: </a>    PetscStackCallBLAS(<font color="#666666">"BLASscal"</font>,BLASscal_(&rA_,&alpha,&A[i*ld],&one));
+<a name="line614">614: </a>  }
+<a name="line615">615: </a>  PetscLogEventEnd(DS_Other,ds,0,0,0);
+<a name="line616">616: </a>  <a href="../../../../../docs/manualpages/DS/DSRestoreArray.html#DSRestoreArray">DSRestoreArray</a>(ds,mat,&A_);
+<a name="line617">617: </a>  PetscObjectStateIncrease((PetscObject)ds);
+<a name="line618">618: </a>  <font color="#4169E1">if</font> (lindcols) *lindcols = cols;
+<a name="line619">619: </a>  <font color="#4169E1">return</font>(0);
+<a name="line620">620: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/ds/interface/ftn-custom/makefile b/src/sys/classes/ds/interface/ftn-custom/makefile
index e27c590..dff3a90 100644
--- a/src/sys/classes/ds/interface/ftn-custom/makefile
+++ b/src/sys/classes/ds/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/interface/ftn-custom/zdsf.c b/src/sys/classes/ds/interface/ftn-custom/zdsf.c
index 464bbfd..ef37b18 100644
--- a/src/sys/classes/ds/interface/ftn-custom/zdsf.c
+++ b/src/sys/classes/ds/interface/ftn-custom/zdsf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/ds/interface/index.html b/src/sys/classes/ds/interface/index.html
index 4e6943f..1515c32 100644
--- a/src/sys/classes/ds/interface/index.html
+++ b/src/sys/classes/ds/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Direct Solver (or Dense System) - DS</h2>
 
diff --git a/src/sys/classes/ds/interface/makefile b/src/sys/classes/ds/interface/makefile
index 961c094..902c205 100644
--- a/src/sys/classes/ds/interface/makefile
+++ b/src/sys/classes/ds/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/interface/makefile.html b/src/sys/classes/ds/interface/makefile.html
index 5d3da04..d9f80c9 100644
--- a/src/sys/classes/ds/interface/makefile.html
+++ b/src/sys/classes/ds/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:46+00:00">
+<meta name="date" content="2016-05-16T10:31:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/ds/makefile b/src/sys/classes/ds/makefile
index 8f106b0..1e31255 100644
--- a/src/sys/classes/ds/makefile
+++ b/src/sys/classes/ds/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/ds/makefile.html b/src/sys/classes/ds/makefile.html
index 3e41bb9..fa765be 100644
--- a/src/sys/classes/ds/makefile.html
+++ b/src/sys/classes/ds/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/ds/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:41+00:00">
+<meta name="date" content="2016-05-16T10:31:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/ds/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/ds/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/examples/index.html b/src/sys/classes/fn/examples/index.html
index 641ecbd..62c4739 100644
--- a/src/sys/classes/fn/examples/index.html
+++ b/src/sys/classes/fn/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
  
diff --git a/src/sys/classes/fn/examples/makefile b/src/sys/classes/fn/examples/makefile
index 403f14f..a73ec33 100644
--- a/src/sys/classes/fn/examples/makefile
+++ b/src/sys/classes/fn/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/examples/makefile.html b/src/sys/classes/fn/examples/makefile.html
index 340b0c8..2140ca6 100644
--- a/src/sys/classes/fn/examples/makefile.html
+++ b/src/sys/classes/fn/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:07+00:00">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/examples/tests/index.html b/src/sys/classes/fn/examples/tests/index.html
index 2f52592..540a283 100644
--- a/src/sys/classes/fn/examples/tests/index.html
+++ b/src/sys/classes/fn/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
@@ -21,5 +21,7 @@ The FN package provides the functionality to represent a simple mathematical fun
 <a href="test4.c.html">test4.c: Test setting FN parameters from the command line</a><br>
 <a href="test5.c.html">test5.c: Test matrix rational function</a><br>
 <a href="test6.c.html">test6.c: Test combined function</a><br>
+<a href="test7.c.html">test7.c: Test matrix square root</a><br>
+<a href="test8.c.html">test8.c: Test matrix inverse square root</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/sys/classes/fn/examples/tests/makefile b/src/sys/classes/fn/examples/tests/makefile
index 3260e6d..a2df504 100644
--- a/src/sys/classes/fn/examples/tests/makefile
+++ b/src/sys/classes/fn/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -24,17 +24,19 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/sys/classes/fn/examples/tests/
-EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c
+EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c
 EXAMPLESF  =
 MANSEC     = FN
-TESTS      = test1 test2 test3 test4 test5 test6
+TESTS      = test1 test2 test3 test4 test5 test6 test7 test8
 
 TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \
                        test2.PETSc runtest2_1 test2.rm \
-                       test3.PETSc runtest3_1 test3.rm \
+                       test3.PETSc runtest3_1 runtest3_2 test3.rm \
                        test4.PETSc runtest4_1 test4.rm \
-                       test5.PETSc runtest5_1 test5.rm \
-                       test6.PETSc runtest6_1 test6.rm
+                       test5.PETSc runtest5_1 runtest5_2 test5.rm \
+                       test6.PETSc runtest6_1 runtest6_2 test6.rm \
+                       test7.PETSc runtest7_1 runtest7_2 test7.rm \
+                       test8.PETSc runtest8_1 runtest8_2 test8.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -62,41 +64,91 @@ test6: test6.o chkopts
 	-${CLINKER} -o test6 test6.o ${SLEPC_SYS_LIB}
 	${RM} test6.o
 
+test7: test7.o chkopts
+	-${CLINKER} -o test7 test7.o ${SLEPC_SYS_LIB}
+	${RM} test7.o
+
+test8: test8.o chkopts
+	-${CLINKER} -o test8 test8.o ${SLEPC_SYS_LIB}
+	${RM} test8.o
+
 #------------------------------------------------------------------------------------
 
 runtest1_1:
-	-@${MPIEXEC} -np 1 ./test1 > test1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test1 > test1_1.tmp 2>&1; \
 	  if (${DIFF} output/test1_1.out test1_1.tmp) then true; \
 	  else echo "Possible problem with test1_1, diffs above"; fi; \
 	  ${RM} -f test1_1.tmp
 
 runtest2_1:
-	-@${MPIEXEC} -np 1 ./test2 > test2_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test2 > test2_1.tmp 2>&1; \
 	  if (${DIFF} output/test2_1.out test2_1.tmp) then true; \
 	  else echo "Possible problem with test2_1, diffs above"; fi; \
 	  ${RM} -f test2_1.tmp
 
 runtest3_1:
-	-@${MPIEXEC} -np 1 ./test3 > test3_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test3 > test3_1.tmp 2>&1; \
+	  if (${DIFF} output/test3_1.out test3_1.tmp) then true; \
+	  else echo "Possible problem with test3_1, diffs above"; fi; \
+	  ${RM} -f test3_1.tmp
+
+runtest3_2:
+	-@${MPIEXEC} -n 1 ./test3 -inplace > test3_1.tmp 2>&1; \
 	  if (${DIFF} output/test3_1.out test3_1.tmp) then true; \
 	  else echo "Possible problem with test3_1, diffs above"; fi; \
 	  ${RM} -f test3_1.tmp
 
 runtest4_1:
-	-@${MPIEXEC} -np 1 ./test4 -f1_fn_type exp -f1_fn_scale -2.5 -f2_fn_type rational -f2_fn_rational_numerator -1,1 -f2_fn_rational_denominator 1,-6,4 > test4_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test4 -f1_fn_type exp -f1_fn_scale -2.5 -f2_fn_type rational -f2_fn_rational_numerator -1,1 -f2_fn_rational_denominator 1,-6,4 > test4_1.tmp 2>&1; \
 	  if (${DIFF} output/test4_1.out test4_1.tmp) then true; \
 	  else echo "Possible problem with test4_1, diffs above"; fi; \
 	  ${RM} -f test4_1.tmp
 
 runtest5_1:
-	-@${MPIEXEC} -np 1 ./test5 > test5_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test5 > test5_1.tmp 2>&1; \
+	  if (${DIFF} output/test5_1.out test5_1.tmp) then true; \
+	  else echo "Possible problem with test5_1, diffs above"; fi; \
+	  ${RM} -f test5_1.tmp
+
+runtest5_2:
+	-@${MPIEXEC} -n 1 ./test5 -inplace > test5_1.tmp 2>&1; \
 	  if (${DIFF} output/test5_1.out test5_1.tmp) then true; \
 	  else echo "Possible problem with test5_1, diffs above"; fi; \
 	  ${RM} -f test5_1.tmp
 
 runtest6_1:
-	-@${MPIEXEC} -np 1 ./test6 > test6_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test6 > test6_1.tmp 2>&1; \
 	  if (${DIFF} output/test6_1.out test6_1.tmp) then true; \
 	  else echo "Possible problem with test6_1, diffs above"; fi; \
 	  ${RM} -f test6_1.tmp
 
+runtest6_2:
+	-@${MPIEXEC} -n 1 ./test6 -inplace > test6_1.tmp 2>&1; \
+	  if (${DIFF} output/test6_1.out test6_1.tmp) then true; \
+	  else echo "Possible problem with test6_1, diffs above"; fi; \
+	  ${RM} -f test6_1.tmp
+
+runtest7_1:
+	-@${MPIEXEC} -n 1 ./test7 -tau .13 -eta 2 -n 19 > test7_1.tmp 2>&1; \
+	  if (${DIFF} output/test7_1.out test7_1.tmp) then true; \
+	  else echo "Possible problem with test7_1, diffs above"; fi; \
+	  ${RM} -f test7_1.tmp
+
+runtest7_2:
+	-@${MPIEXEC} -n 1 ./test7 -tau .13 -eta 2 -n 19 -inplace > test7_1.tmp 2>&1; \
+	  if (${DIFF} output/test7_1.out test7_1.tmp) then true; \
+	  else echo "Possible problem with test7_1, diffs above"; fi; \
+	  ${RM} -f test7_1.tmp
+
+runtest8_1:
+	-@${MPIEXEC} -n 1 ./test8 -tau 0.9 -eta 0.5 -n 10 > test8_1.tmp 2>&1; \
+	  if (${DIFF} output/test8_1.out test8_1.tmp) then true; \
+	  else echo "Possible problem with test8_1, diffs above"; fi; \
+	  ${RM} -f test8_1.tmp
+
+runtest8_2:
+	-@${MPIEXEC} -n 1 ./test8 -tau 0.9 -eta 0.5 -n 10 -inplace > test8_1.tmp 2>&1; \
+	  if (${DIFF} output/test8_1.out test8_1.tmp) then true; \
+	  else echo "Possible problem with test8_1, diffs above"; fi; \
+	  ${RM} -f test8_1.tmp
+
diff --git a/src/sys/classes/fn/examples/tests/makefile.html b/src/sys/classes/fn/examples/tests/makefile.html
index f023267..f0e595b 100644
--- a/src/sys/classes/fn/examples/tests/makefile.html
+++ b/src/sys/classes/fn/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:09+00:00">
+<meta name="date" content="2016-05-16T10:32:02+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -35,17 +35,19 @@ FFLAGS     =
 CPPFLAGS   =
 FPPFLAGS   =
 LOCDIR     = src/sys/classes/fn/examples/tests/
-EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c
+EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c test7.c test8.c
 EXAMPLESF  =
 MANSEC     = <a href="ROOT/docs/manualpages/FN/FN.html#FN">FN</a>
-TESTS      = test1 test2 test3 test4 test5 test6
+TESTS      = test1 test2 test3 test4 test5 test6 test7 test8
 
 TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \
                        test2.PETSc runtest2_1 test2.rm \
-                       test3.PETSc runtest3_1 test3.rm \
+                       test3.PETSc runtest3_1 runtest3_2 test3.rm \
                        test4.PETSc runtest4_1 test4.rm \
-                       test5.PETSc runtest5_1 test5.rm \
-                       test6.PETSc runtest6_1 test6.rm
+                       test5.PETSc runtest5_1 runtest5_2 test5.rm \
+                       test6.PETSc runtest6_1 runtest6_2 test6.rm \
+                       test7.PETSc runtest7_1 runtest7_2 test7.rm \
+                       test8.PETSc runtest8_1 runtest8_2 test8.rm
 
 include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 
@@ -73,44 +75,94 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 	-${CLINKER} -o test6 test6.o ${SLEPC_SYS_LIB}
 	${RM} test6.o
 
+<strong><font color="#FF0000">test7:</font></strong> test7.o chkopts
+	-${CLINKER} -o test7 test7.o ${SLEPC_SYS_LIB}
+	${RM} test7.o
+
+<strong><font color="#FF0000">test8:</font></strong> test8.o chkopts
+	-${CLINKER} -o test8 test8.o ${SLEPC_SYS_LIB}
+	${RM} test8.o
+
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 
 <strong><font color="#FF0000">runtest1_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test1 > test1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test1 > test1_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test1_1.out test1_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test1_1, diffs above"</font>; fi; \
 	  ${RM} -f test1_1.tmp
 
 <strong><font color="#FF0000">runtest2_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test2 > test2_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test2 > test2_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test2_1.out test2_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test2_1, diffs above"</font>; fi; \
 	  ${RM} -f test2_1.tmp
 
 <strong><font color="#FF0000">runtest3_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test3 > test3_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test3 > test3_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test3_1.out test3_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test3_1, diffs above"</font>; fi; \
+	  ${RM} -f test3_1.tmp
+
+<strong><font color="#FF0000">runtest3_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./test3 -inplace > test3_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test3_1.out test3_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test3_1, diffs above"</font>; fi; \
 	  ${RM} -f test3_1.tmp
 
 <strong><font color="#FF0000">runtest4_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test4 -f1_fn_type exp -f1_fn_scale -2.5 -f2_fn_type rational -f2_fn_rational_numerator -1,1 -f2_fn_rational_denominator 1,-6,4 > test4_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test4 -f1_fn_type exp -f1_fn_scale -2.5 -f2_fn_type rational -f2_fn_rational_numerator -1,1 -f2_fn_rational_denominator 1,-6,4 > test4_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test4_1.out test4_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test4_1, diffs above"</font>; fi; \
 	  ${RM} -f test4_1.tmp
 
 <strong><font color="#FF0000">runtest5_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test5 > test5_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test5 > test5_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test5_1.out test5_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test5_1, diffs above"</font>; fi; \
+	  ${RM} -f test5_1.tmp
+
+<strong><font color="#FF0000">runtest5_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./test5 -inplace > test5_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test5_1.out test5_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test5_1, diffs above"</font>; fi; \
 	  ${RM} -f test5_1.tmp
 
 <strong><font color="#FF0000">runtest6_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test6 > test6_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test6 > test6_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test6_1.out test6_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test6_1, diffs above"</font>; fi; \
 	  ${RM} -f test6_1.tmp
 
+<strong><font color="#FF0000">runtest6_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./test6 -inplace > test6_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test6_1.out test6_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test6_1, diffs above"</font>; fi; \
+	  ${RM} -f test6_1.tmp
+
+<strong><font color="#FF0000">runtest7_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./test7 -tau .13 -eta 2 -n 19 > test7_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test7_1.out test7_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test7_1, diffs above"</font>; fi; \
+	  ${RM} -f test7_1.tmp
+
+<strong><font color="#FF0000">runtest7_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./test7 -tau .13 -eta 2 -n 19 -inplace > test7_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test7_1.out test7_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test7_1, diffs above"</font>; fi; \
+	  ${RM} -f test7_1.tmp
+
+<strong><font color="#FF0000">runtest8_1:</font></strong>
+	-@${MPIEXEC} -n 1 ./test8 -tau 0.9 -eta 0.5 -n 10 > test8_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test8_1.out test8_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test8_1, diffs above"</font>; fi; \
+	  ${RM} -f test8_1.tmp
+
+<strong><font color="#FF0000">runtest8_2:</font></strong>
+	-@${MPIEXEC} -n 1 ./test8 -tau 0.9 -eta 0.5 -n 10 -inplace > test8_1.tmp 2>&1; \
+	  <font color="#4169E1">if</font> (${DIFF} output/test8_1.out test8_1.tmp) then true; \
+	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test8_1, diffs above"</font>; fi; \
+	  ${RM} -f test8_1.tmp
+
 </pre>
 </body>
 
diff --git a/src/sys/classes/fn/examples/tests/output/test1_1.out b/src/sys/classes/fn/examples/tests/output/test1_1.out
index 966e069..b29ec76 100644
--- a/src/sys/classes/fn/examples/tests/output/test1_1.out
+++ b/src/sys/classes/fn/examples/tests/output/test1_1.out
@@ -15,6 +15,6 @@ FN Object: 1 MPI processes
   f'(2.2)=0.0975289
 FN Object: 1 MPI processes
   type: rational
-    Constant: 5
-  f(2.2)=5
-  f'(2.2)=0
+    Constant: 5.
+  f(2.2)=5.
+  f'(2.2)=0.
diff --git a/src/sys/classes/fn/examples/tests/output/test7_1.out b/src/sys/classes/fn/examples/tests/output/test7_1.out
new file mode 100644
index 0000000..2e574af
--- /dev/null
+++ b/src/sys/classes/fn/examples/tests/output/test7_1.out
@@ -0,0 +1,7 @@
+Matrix square root, n=19.
+FN Object: 1 MPI processes
+  type: sqrt
+    Square root: +2  *sqrt(+0.13*x)
+||S*S-A||_F < 100*eps
+||S*S-A||_F < 100*eps
+||S*S-A||_F < 100*eps
diff --git a/src/sys/classes/fn/examples/tests/output/test8_1.out b/src/sys/classes/fn/examples/tests/output/test8_1.out
new file mode 100644
index 0000000..5859233
--- /dev/null
+++ b/src/sys/classes/fn/examples/tests/output/test8_1.out
@@ -0,0 +1,7 @@
+Matrix inverse square root, n=10.
+FN Object: 1 MPI processes
+  type: invsqrt
+    Inverse square root: +0.5  *(+0.9*x)^(-1/2)
+||S*S*A-I||_F < 100*eps
+||S*S*A-I||_F < 100*eps
+||S*S*A-I||_F < 100*eps
diff --git a/src/sys/classes/fn/examples/tests/test1.c b/src/sys/classes/fn/examples/tests/test1.c
index e196801..1e8afc5 100644
--- a/src/sys/classes/fn/examples/tests/test1.c
+++ b/src/sys/classes/fn/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -100,5 +100,5 @@ int main(int argc,char **argv)
 
   ierr = FNDestroy(&fn);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/fn/examples/tests/test1.c.html b/src/sys/classes/fn/examples/tests/test1.c.html
index 9542003..466f6a8 100644
--- a/src/sys/classes/fn/examples/tests/test1.c.html
+++ b/src/sys/classes/fn/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:07+00:00">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -109,7 +109,7 @@
 
 <a name="line101">101: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
 <a name="line102">102: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line103">103: </a>  <font color="#4169E1">return</font> 0;
+<a name="line103">103: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line104">104: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/fn/examples/tests/test2.c b/src/sys/classes/fn/examples/tests/test2.c
index b0ed4bf..378ef41 100644
--- a/src/sys/classes/fn/examples/tests/test2.c
+++ b/src/sys/classes/fn/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -74,5 +74,5 @@ int main(int argc,char **argv)
 
   ierr = FNDestroy(&fn);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/fn/examples/tests/test2.c.html b/src/sys/classes/fn/examples/tests/test2.c.html
index 29786b7..58fd7e4 100644
--- a/src/sys/classes/fn/examples/tests/test2.c.html
+++ b/src/sys/classes/fn/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:08+00:00">
+<meta name="date" content="2016-05-16T10:32:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -83,7 +83,7 @@
 
 <a name="line75"> 75: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
 <a name="line76"> 76: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line77"> 77: </a>  <font color="#4169E1">return</font> 0;
+<a name="line77"> 77: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line78"> 78: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/fn/examples/tests/test3.c b/src/sys/classes/fn/examples/tests/test3.c
index fa9f408..0d211ea 100644
--- a/src/sys/classes/fn/examples/tests/test3.c
+++ b/src/sys/classes/fn/examples/tests/test3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -24,23 +24,74 @@ static char help[] = "Test matrix exponential.\n\n";
 #include <slepcfn.h>
 
 #undef __FUNCT__
+#define __FUNCT__ "TestMatExp"
+/*
+   Compute matrix exponential B = expm(A)
+ */
+PetscErrorCode TestMatExp(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)
+{
+  PetscErrorCode ierr;
+  PetscBool      set,flg;
+  PetscInt       n;
+  Mat            F;
+  Vec            v,f0;
+  PetscReal      nrm;
+
+  PetscFunctionBeginUser;
+  ierr = MatGetSize(A,&n,NULL);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&F);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)F,"F");CHKERRQ(ierr);
+  /* compute square root */
+  if (inplace) {
+    ierr = MatCopy(A,F,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
+    if (set && flg) { ierr = MatSetOption(F,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr); }
+    ierr = FNEvaluateFunctionMat(fn,F,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = FNEvaluateFunctionMat(fn,A,F);CHKERRQ(ierr);
+  }
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(A,viewer);CHKERRQ(ierr);
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed expm(A) - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(F,viewer);CHKERRQ(ierr);
+  }
+  /* print matrix norm for checking */
+  ierr = MatNorm(F,NORM_1,&nrm);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  /* check FNEvaluateFunctionMatVec() */
+  ierr = MatCreateVecs(A,&v,&f0);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(F,f0,0);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMatVec(fn,A,v);CHKERRQ(ierr);
+  ierr = VecAXPY(v,-1.0,f0);CHKERRQ(ierr);
+  ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr);
+  if (nrm>100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Warning: the norm of f(A)*e_1-v is %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&F);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&f0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "main"
 int main(int argc,char **argv)
 {
   PetscErrorCode ierr;
   FN             fn;
-  Mat            A,B;
+  Mat            A;
   PetscInt       i,j,n=10;
-  PetscReal      nrm;
   PetscScalar    *As,tau=1.0,eta=1.0;
   PetscViewer    viewer;
-  PetscBool      verbose;
+  PetscBool      verbose,inplace;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsGetScalar(NULL,"-eta",&eta,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-eta",&eta,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-inplace",&inplace);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix exponential, n=%D.\n",n);CHKERRQ(ierr);
 
   /* Create exponential function eta*exp(tau*x) */
@@ -58,8 +109,6 @@ int main(int argc,char **argv)
   /* Create matrices */
   ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);CHKERRQ(ierr);
   ierr = PetscObjectSetName((PetscObject)A,"A");CHKERRQ(ierr);
-  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&B);CHKERRQ(ierr);
-  ierr = PetscObjectSetName((PetscObject)B,"B");CHKERRQ(ierr);
 
   /* Fill A with a symmetric Toeplitz matrix */
   ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
@@ -69,19 +118,7 @@ int main(int argc,char **argv)
   }
   ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
   ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(A,viewer);CHKERRQ(ierr);
-  }
-
-  /* Compute matrix exponential */
-  ierr = FNEvaluateFunctionMat(fn,A,B);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(B,viewer);CHKERRQ(ierr);
-  }
-  ierr = MatNorm(B,NORM_1,&nrm);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  ierr = TestMatExp(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
 
   /* Repeat with non-symmetric A */
   ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
@@ -90,23 +127,10 @@ int main(int argc,char **argv)
   }
   ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
   ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(A,viewer);CHKERRQ(ierr);
-  }
-
-  /* Compute matrix exponential */
-  ierr = FNEvaluateFunctionMat(fn,A,B);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(B,viewer);CHKERRQ(ierr);
-  }
-  ierr = MatNorm(B,NORM_1,&nrm);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  ierr = TestMatExp(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
 
   ierr = MatDestroy(&A);CHKERRQ(ierr);
-  ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = FNDestroy(&fn);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/fn/examples/tests/test3.c.html b/src/sys/classes/fn/examples/tests/test3.c.html
index fc97e56..5369ac2 100644
--- a/src/sys/classes/fn/examples/tests/test3.c.html
+++ b/src/sys/classes/fn/examples/tests/test3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:08+00:00">
+<meta name="date" content="2016-05-16T10:32:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,90 +35,110 @@
 
 <a name="line24"> 24: </a><font color="#A020F0">#include <slepcfn.h></font>
 
-<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
-<a name="line29"> 29: </a>{
-<a name="line31"> 31: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
-<a name="line32"> 32: </a>  Mat            A,B;
-<a name="line33"> 33: </a>  PetscInt       i,j,n=10;
-<a name="line34"> 34: </a>  PetscReal      nrm;
-<a name="line35"> 35: </a>  PetscScalar    *As,tau=1.0,eta=1.0;
-<a name="line36"> 36: </a>  PetscViewer    viewer;
-<a name="line37"> 37: </a>  PetscBool      verbose;
-
-<a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line41"> 41: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
-<a name="line42"> 42: </a>  PetscOptionsGetScalar(NULL,<font color="#666666">"-eta"</font>,&eta,NULL);
-<a name="line43"> 43: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
-<a name="line44"> 44: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix exponential, n=%D.\n"</font>,n);
-
-<a name="line46"> 46: </a>  <font color="#B22222">/* Create exponential function eta*exp(tau*x) */</font>
-<a name="line47"> 47: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&fn);
-<a name="line48"> 48: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNEXP);
-<a name="line49"> 49: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,tau,eta);
-
-<a name="line51"> 51: </a>  <font color="#B22222">/* Set up viewer */</font>
-<a name="line52"> 52: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
-<a name="line53"> 53: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn,viewer);
-<a name="line54"> 54: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line55"> 55: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
-<a name="line56"> 56: </a>  }
-
-<a name="line58"> 58: </a>  <font color="#B22222">/* Create matrices */</font>
-<a name="line59"> 59: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
-<a name="line60"> 60: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
-<a name="line61"> 61: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&B);
-<a name="line62"> 62: </a>  PetscObjectSetName((PetscObject)B,<font color="#666666">"B"</font>);
-
-<a name="line64"> 64: </a>  <font color="#B22222">/* Fill A with a symmetric Toeplitz matrix */</font>
-<a name="line65"> 65: </a>  MatDenseGetArray(A,&As);
-<a name="line66"> 66: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.0;
-<a name="line67"> 67: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
-<a name="line68"> 68: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
-<a name="line69"> 69: </a>  }
-<a name="line70"> 70: </a>  MatDenseRestoreArray(A,&As);
-<a name="line71"> 71: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
-<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line73"> 73: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
-<a name="line74"> 74: </a>    MatView(A,viewer);
-<a name="line75"> 75: </a>  }
-
-<a name="line77"> 77: </a>  <font color="#B22222">/* Compute matrix exponential */</font>
-<a name="line78"> 78: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,B);
-<a name="line79"> 79: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line80"> 80: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
-<a name="line81"> 81: </a>    MatView(B,viewer);
-<a name="line82"> 82: </a>  }
-<a name="line83"> 83: </a>  MatNorm(B,NORM_1,&nrm);
-<a name="line84"> 84: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
-
-<a name="line86"> 86: </a>  <font color="#B22222">/* Repeat with non-symmetric A */</font>
-<a name="line87"> 87: </a>  MatDenseGetArray(A,&As);
-<a name="line88"> 88: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
-<a name="line89"> 89: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[(i+j)+i*n]=-1.0; }
-<a name="line90"> 90: </a>  }
-<a name="line91"> 91: </a>  MatDenseRestoreArray(A,&As);
-<a name="line92"> 92: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
-<a name="line93"> 93: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line94"> 94: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
-<a name="line95"> 95: </a>    MatView(A,viewer);
-<a name="line96"> 96: </a>  }
-
-<a name="line98"> 98: </a>  <font color="#B22222">/* Compute matrix exponential */</font>
-<a name="line99"> 99: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,B);
-<a name="line100">100: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line101">101: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
-<a name="line102">102: </a>    MatView(B,viewer);
-<a name="line103">103: </a>  }
-<a name="line104">104: </a>  MatNorm(B,NORM_1,&nrm);
-<a name="line105">105: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
-
-<a name="line107">107: </a>  MatDestroy(&A);
-<a name="line108">108: </a>  MatDestroy(&B);
-<a name="line109">109: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
-<a name="line110">110: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line111">111: </a>  <font color="#4169E1">return</font> 0;
-<a name="line112">112: </a>}
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">   Compute matrix exponential B = expm(A)</font>
+<a name="line30"> 30: </a><font color="#B22222"> */</font>
+<a name="line31"> 31: </a><strong><font color="#4169E1"><a name="TestMatExp"></a>PetscErrorCode TestMatExp(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)</font></strong>
+<a name="line32"> 32: </a>{
+<a name="line34"> 34: </a>  PetscBool      set,flg;
+<a name="line35"> 35: </a>  PetscInt       n;
+<a name="line36"> 36: </a>  Mat            F;
+<a name="line37"> 37: </a>  Vec            v,f0;
+<a name="line38"> 38: </a>  PetscReal      nrm;
+
+<a name="line41"> 41: </a>  MatGetSize(A,&n,NULL);
+<a name="line42"> 42: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&F);
+<a name="line43"> 43: </a>  PetscObjectSetName((PetscObject)F,<font color="#666666">"F"</font>);
+<a name="line44"> 44: </a>  <font color="#B22222">/* compute square root */</font>
+<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (inplace) {
+<a name="line46"> 46: </a>    MatCopy(A,F,SAME_NONZERO_PATTERN);
+<a name="line47"> 47: </a>    MatIsHermitianKnown(A,&set,&flg);
+<a name="line48"> 48: </a>    <font color="#4169E1">if</font> (set && flg) { MatSetOption(F,MAT_HERMITIAN,PETSC_TRUE); }
+<a name="line49"> 49: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,F,NULL);
+<a name="line50"> 50: </a>  } <font color="#4169E1">else</font> {
+<a name="line51"> 51: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,F);
+<a name="line52"> 52: </a>  }
+<a name="line53"> 53: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line54"> 54: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
+<a name="line55"> 55: </a>    MatView(A,viewer);
+<a name="line56"> 56: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed expm(A) - - - - - - -\n"</font>);
+<a name="line57"> 57: </a>    MatView(F,viewer);
+<a name="line58"> 58: </a>  }
+<a name="line59"> 59: </a>  <font color="#B22222">/* print matrix norm for checking */</font>
+<a name="line60"> 60: </a>  MatNorm(F,NORM_1,&nrm);
+<a name="line61"> 61: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
+<a name="line62"> 62: </a>  <font color="#B22222">/* check <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>() */</font>
+<a name="line63"> 63: </a>  MatCreateVecs(A,&v,&f0);
+<a name="line64"> 64: </a>  MatGetColumnVector(F,f0,0);
+<a name="line65"> 65: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(fn,A,v);
+<a name="line66"> 66: </a>  VecAXPY(v,-1.0,f0);
+<a name="line67"> 67: </a>  VecNorm(v,NORM_2,&nrm);
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (nrm>100*PETSC_MACHINE_EPSILON) {
+<a name="line69"> 69: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Warning: the norm of f(A)*e_1-v is %g\n"</font>,(double)nrm);
+<a name="line70"> 70: </a>  }
+<a name="line71"> 71: </a>  MatDestroy(&F);
+<a name="line72"> 72: </a>  VecDestroy(&v);
+<a name="line73"> 73: </a>  VecDestroy(&f0);
+<a name="line74"> 74: </a>  <font color="#4169E1">return</font>(0);
+<a name="line75"> 75: </a>}
+
+<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line80"> 80: </a>{
+<a name="line82"> 82: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
+<a name="line83"> 83: </a>  Mat            A;
+<a name="line84"> 84: </a>  PetscInt       i,j,n=10;
+<a name="line85"> 85: </a>  PetscScalar    *As,tau=1.0,eta=1.0;
+<a name="line86"> 86: </a>  PetscViewer    viewer;
+<a name="line87"> 87: </a>  PetscBool      verbose,inplace;
+
+<a name="line89"> 89: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line90"> 90: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line91"> 91: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line92"> 92: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-eta"</font>,&eta,NULL);
+<a name="line93"> 93: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line94"> 94: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-inplace"</font>,&inplace);
+<a name="line95"> 95: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix exponential, n=%D.\n"</font>,n);
+
+<a name="line97"> 97: </a>  <font color="#B22222">/* Create exponential function eta*exp(tau*x) */</font>
+<a name="line98"> 98: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&fn);
+<a name="line99"> 99: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNEXP);
+<a name="line100">100: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,tau,eta);
+
+<a name="line102">102: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line103">103: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line104">104: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn,viewer);
+<a name="line105">105: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line106">106: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line107">107: </a>  }
+
+<a name="line109">109: </a>  <font color="#B22222">/* Create matrices */</font>
+<a name="line110">110: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
+<a name="line111">111: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
+
+<a name="line113">113: </a>  <font color="#B22222">/* Fill A with a symmetric Toeplitz matrix */</font>
+<a name="line114">114: </a>  MatDenseGetArray(A,&As);
+<a name="line115">115: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.0;
+<a name="line116">116: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line117">117: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+<a name="line118">118: </a>  }
+<a name="line119">119: </a>  MatDenseRestoreArray(A,&As);
+<a name="line120">120: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line121">121: </a>  TestMatExp(fn,A,viewer,verbose,inplace);
+
+<a name="line123">123: </a>  <font color="#B22222">/* Repeat with non-symmetric A */</font>
+<a name="line124">124: </a>  MatDenseGetArray(A,&As);
+<a name="line125">125: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line126">126: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[(i+j)+i*n]=-1.0; }
+<a name="line127">127: </a>  }
+<a name="line128">128: </a>  MatDenseRestoreArray(A,&As);
+<a name="line129">129: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line130">130: </a>  TestMatExp(fn,A,viewer,verbose,inplace);
+
+<a name="line132">132: </a>  MatDestroy(&A);
+<a name="line133">133: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
+<a name="line134">134: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line135">135: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line136">136: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/fn/examples/tests/test4.c b/src/sys/classes/fn/examples/tests/test4.c
index de06f90..2b1aef0 100644
--- a/src/sys/classes/fn/examples/tests/test4.c
+++ b/src/sys/classes/fn/examples/tests/test4.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -42,5 +42,5 @@ int main(int argc,char **argv)
   ierr = FNView(fn2,NULL);CHKERRQ(ierr);
   ierr = FNDestroy(&fn2);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/fn/examples/tests/test4.c.html b/src/sys/classes/fn/examples/tests/test4.c.html
index b98e7d8..889e88f 100644
--- a/src/sys/classes/fn/examples/tests/test4.c.html
+++ b/src/sys/classes/fn/examples/tests/test4.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test4.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:08+00:00">
+<meta name="date" content="2016-05-16T10:32:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -51,7 +51,7 @@
 <a name="line42"> 42: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn2,NULL);
 <a name="line43"> 43: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn2);
 <a name="line44"> 44: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line45"> 45: </a>  <font color="#4169E1">return</font> 0;
+<a name="line45"> 45: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line46"> 46: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/fn/examples/tests/test5.c b/src/sys/classes/fn/examples/tests/test5.c
index 9529898..d45118b 100644
--- a/src/sys/classes/fn/examples/tests/test5.c
+++ b/src/sys/classes/fn/examples/tests/test5.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -24,21 +24,72 @@ static char help[] = "Test matrix rational function.\n\n";
 #include <slepcfn.h>
 
 #undef __FUNCT__
+#define __FUNCT__ "TestMatRational"
+/*
+   Compute matrix rational function B = q(A)\p(A)
+ */
+PetscErrorCode TestMatRational(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)
+{
+  PetscErrorCode ierr;
+  PetscBool      set,flg;
+  PetscInt       n;
+  Mat            F;
+  Vec            v,f0;
+  PetscReal      nrm;
+
+  PetscFunctionBeginUser;
+  ierr = MatGetSize(A,&n,NULL);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&F);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)F,"F");CHKERRQ(ierr);
+  /* compute square root */
+  if (inplace) {
+    ierr = MatCopy(A,F,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
+    if (set && flg) { ierr = MatSetOption(F,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr); }
+    ierr = FNEvaluateFunctionMat(fn,F,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = FNEvaluateFunctionMat(fn,A,F);CHKERRQ(ierr);
+  }
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(A,viewer);CHKERRQ(ierr);
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(F,viewer);CHKERRQ(ierr);
+  }
+  /* print matrix norm for checking */
+  ierr = MatNorm(F,NORM_1,&nrm);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  /* check FNEvaluateFunctionMatVec() */
+  ierr = MatCreateVecs(A,&v,&f0);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(F,f0,0);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMatVec(fn,A,v);CHKERRQ(ierr);
+  ierr = VecAXPY(v,-1.0,f0);CHKERRQ(ierr);
+  ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr);
+  if (nrm>100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Warning: the norm of f(A)*e_1-v is %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&F);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&f0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "main"
 int main(int argc,char **argv)
 {
   PetscErrorCode ierr;
   FN             fn;
-  Mat            A,B;
+  Mat            A;
   PetscInt       i,j,n=10,np,nq;
-  PetscReal      nrm;
   PetscScalar    *As,p[10],q[10];
   PetscViewer    viewer;
-  PetscBool      verbose;
+  PetscBool      verbose,inplace;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-inplace",&inplace);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix rational function, n=%D.\n",n);CHKERRQ(ierr);
 
   /* Create rational function r(x)=p(x)/q(x) */
@@ -61,8 +112,6 @@ int main(int argc,char **argv)
   /* Create matrices */
   ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);CHKERRQ(ierr);
   ierr = PetscObjectSetName((PetscObject)A,"A");CHKERRQ(ierr);
-  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&B);CHKERRQ(ierr);
-  ierr = PetscObjectSetName((PetscObject)B,"B");CHKERRQ(ierr);
 
   /* Fill A with a symmetric Toeplitz matrix */
   ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
@@ -72,35 +121,14 @@ int main(int argc,char **argv)
   }
   ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
   ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(A,viewer);CHKERRQ(ierr);
-  }
-
-  /* Evaluate matrix function */
-  ierr = FNEvaluateFunctionMat(fn,A,B);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(B,viewer);CHKERRQ(ierr);
-  }
-  ierr = MatNorm(B,NORM_1,&nrm);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  ierr = TestMatRational(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
 
   /* Repeat with same matrix as non-symmetric */
   ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
-
-  /* Evaluate matrix function */
-  ierr = FNEvaluateFunctionMat(fn,A,B);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(B,viewer);CHKERRQ(ierr);
-  }
-  ierr = MatNorm(B,NORM_1,&nrm);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  ierr = TestMatRational(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
 
   ierr = MatDestroy(&A);CHKERRQ(ierr);
-  ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = FNDestroy(&fn);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/fn/examples/tests/test5.c.html b/src/sys/classes/fn/examples/tests/test5.c.html
index 9e3e55a..5cb321c 100644
--- a/src/sys/classes/fn/examples/tests/test5.c.html
+++ b/src/sys/classes/fn/examples/tests/test5.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test5.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:08+00:00">
+<meta name="date" content="2016-05-16T10:32:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test5.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -35,84 +35,108 @@
 
 <a name="line24"> 24: </a><font color="#A020F0">#include <slepcfn.h></font>
 
-<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
-<a name="line29"> 29: </a>{
-<a name="line31"> 31: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
-<a name="line32"> 32: </a>  Mat            A,B;
-<a name="line33"> 33: </a>  PetscInt       i,j,n=10,np,nq;
-<a name="line34"> 34: </a>  PetscReal      nrm;
-<a name="line35"> 35: </a>  PetscScalar    *As,p[10],q[10];
-<a name="line36"> 36: </a>  PetscViewer    viewer;
-<a name="line37"> 37: </a>  PetscBool      verbose;
-
-<a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line41"> 41: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
-<a name="line42"> 42: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix rational function, n=%D.\n"</font>,n);
-
-<a name="line44"> 44: </a>  <font color="#B22222">/* Create rational function r(x)=p(x)/q(x) */</font>
-<a name="line45"> 45: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&fn);
-<a name="line46"> 46: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNRATIONAL);
-<a name="line47"> 47: </a>  np = 2; nq = 3;
-<a name="line48"> 48: </a>  p[0] = -3.1; p[1] = 1.1;
-<a name="line49"> 49: </a>  q[0] = 1.0; q[1] = -2.0; q[2] = 3.5;
-<a name="line50"> 50: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(fn,np,p);
-<a name="line51"> 51: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(fn,nq,q);
-<a name="line52"> 52: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(fn);
-
-<a name="line54"> 54: </a>  <font color="#B22222">/* Set up viewer */</font>
-<a name="line55"> 55: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
-<a name="line56"> 56: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn,viewer);
-<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line58"> 58: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
-<a name="line59"> 59: </a>  }
-
-<a name="line61"> 61: </a>  <font color="#B22222">/* Create matrices */</font>
-<a name="line62"> 62: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
-<a name="line63"> 63: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
-<a name="line64"> 64: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&B);
-<a name="line65"> 65: </a>  PetscObjectSetName((PetscObject)B,<font color="#666666">"B"</font>);
-
-<a name="line67"> 67: </a>  <font color="#B22222">/* Fill A with a symmetric Toeplitz matrix */</font>
-<a name="line68"> 68: </a>  MatDenseGetArray(A,&As);
-<a name="line69"> 69: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.0;
-<a name="line70"> 70: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
-<a name="line71"> 71: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
-<a name="line72"> 72: </a>  }
-<a name="line73"> 73: </a>  MatDenseRestoreArray(A,&As);
-<a name="line74"> 74: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
-<a name="line75"> 75: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line76"> 76: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
-<a name="line77"> 77: </a>    MatView(A,viewer);
-<a name="line78"> 78: </a>  }
-
-<a name="line80"> 80: </a>  <font color="#B22222">/* Evaluate matrix function */</font>
-<a name="line81"> 81: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,B);
-<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line83"> 83: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
-<a name="line84"> 84: </a>    MatView(B,viewer);
-<a name="line85"> 85: </a>  }
-<a name="line86"> 86: </a>  MatNorm(B,NORM_1,&nrm);
-<a name="line87"> 87: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
-
-<a name="line89"> 89: </a>  <font color="#B22222">/* Repeat with same matrix as non-symmetric */</font>
-<a name="line90"> 90: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
-
-<a name="line92"> 92: </a>  <font color="#B22222">/* Evaluate matrix function */</font>
-<a name="line93"> 93: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,B);
-<a name="line94"> 94: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line95"> 95: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
-<a name="line96"> 96: </a>    MatView(B,viewer);
-<a name="line97"> 97: </a>  }
-<a name="line98"> 98: </a>  MatNorm(B,NORM_1,&nrm);
-<a name="line99"> 99: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
-
-<a name="line101">101: </a>  MatDestroy(&A);
-<a name="line102">102: </a>  MatDestroy(&B);
-<a name="line103">103: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
-<a name="line104">104: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line105">105: </a>  <font color="#4169E1">return</font> 0;
-<a name="line106">106: </a>}
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">   Compute matrix rational function B = q(A)\p(A)</font>
+<a name="line30"> 30: </a><font color="#B22222"> */</font>
+<a name="line31"> 31: </a><strong><font color="#4169E1"><a name="TestMatRational"></a>PetscErrorCode TestMatRational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)</font></strong>
+<a name="line32"> 32: </a>{
+<a name="line34"> 34: </a>  PetscBool      set,flg;
+<a name="line35"> 35: </a>  PetscInt       n;
+<a name="line36"> 36: </a>  Mat            F;
+<a name="line37"> 37: </a>  Vec            v,f0;
+<a name="line38"> 38: </a>  PetscReal      nrm;
+
+<a name="line41"> 41: </a>  MatGetSize(A,&n,NULL);
+<a name="line42"> 42: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&F);
+<a name="line43"> 43: </a>  PetscObjectSetName((PetscObject)F,<font color="#666666">"F"</font>);
+<a name="line44"> 44: </a>  <font color="#B22222">/* compute square root */</font>
+<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (inplace) {
+<a name="line46"> 46: </a>    MatCopy(A,F,SAME_NONZERO_PATTERN);
+<a name="line47"> 47: </a>    MatIsHermitianKnown(A,&set,&flg);
+<a name="line48"> 48: </a>    <font color="#4169E1">if</font> (set && flg) { MatSetOption(F,MAT_HERMITIAN,PETSC_TRUE); }
+<a name="line49"> 49: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,F,NULL);
+<a name="line50"> 50: </a>  } <font color="#4169E1">else</font> {
+<a name="line51"> 51: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,F);
+<a name="line52"> 52: </a>  }
+<a name="line53"> 53: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line54"> 54: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
+<a name="line55"> 55: </a>    MatView(A,viewer);
+<a name="line56"> 56: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
+<a name="line57"> 57: </a>    MatView(F,viewer);
+<a name="line58"> 58: </a>  }
+<a name="line59"> 59: </a>  <font color="#B22222">/* print matrix norm for checking */</font>
+<a name="line60"> 60: </a>  MatNorm(F,NORM_1,&nrm);
+<a name="line61"> 61: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
+<a name="line62"> 62: </a>  <font color="#B22222">/* check <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>() */</font>
+<a name="line63"> 63: </a>  MatCreateVecs(A,&v,&f0);
+<a name="line64"> 64: </a>  MatGetColumnVector(F,f0,0);
+<a name="line65"> 65: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(fn,A,v);
+<a name="line66"> 66: </a>  VecAXPY(v,-1.0,f0);
+<a name="line67"> 67: </a>  VecNorm(v,NORM_2,&nrm);
+<a name="line68"> 68: </a>  <font color="#4169E1">if</font> (nrm>100*PETSC_MACHINE_EPSILON) {
+<a name="line69"> 69: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Warning: the norm of f(A)*e_1-v is %g\n"</font>,(double)nrm);
+<a name="line70"> 70: </a>  }
+<a name="line71"> 71: </a>  MatDestroy(&F);
+<a name="line72"> 72: </a>  VecDestroy(&v);
+<a name="line73"> 73: </a>  VecDestroy(&f0);
+<a name="line74"> 74: </a>  <font color="#4169E1">return</font>(0);
+<a name="line75"> 75: </a>}
+
+<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line80"> 80: </a>{
+<a name="line82"> 82: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
+<a name="line83"> 83: </a>  Mat            A;
+<a name="line84"> 84: </a>  PetscInt       i,j,n=10,np,nq;
+<a name="line85"> 85: </a>  PetscScalar    *As,p[10],q[10];
+<a name="line86"> 86: </a>  PetscViewer    viewer;
+<a name="line87"> 87: </a>  PetscBool      verbose,inplace;
+
+<a name="line89"> 89: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line90"> 90: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line91"> 91: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line92"> 92: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-inplace"</font>,&inplace);
+<a name="line93"> 93: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix rational function, n=%D.\n"</font>,n);
+
+<a name="line95"> 95: </a>  <font color="#B22222">/* Create rational function r(x)=p(x)/q(x) */</font>
+<a name="line96"> 96: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&fn);
+<a name="line97"> 97: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNRATIONAL);
+<a name="line98"> 98: </a>  np = 2; nq = 3;
+<a name="line99"> 99: </a>  p[0] = -3.1; p[1] = 1.1;
+<a name="line100">100: </a>  q[0] = 1.0; q[1] = -2.0; q[2] = 3.5;
+<a name="line101">101: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(fn,np,p);
+<a name="line102">102: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(fn,nq,q);
+<a name="line103">103: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(fn);
+
+<a name="line105">105: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line106">106: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line107">107: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn,viewer);
+<a name="line108">108: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line109">109: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line110">110: </a>  }
+
+<a name="line112">112: </a>  <font color="#B22222">/* Create matrices */</font>
+<a name="line113">113: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
+<a name="line114">114: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
+
+<a name="line116">116: </a>  <font color="#B22222">/* Fill A with a symmetric Toeplitz matrix */</font>
+<a name="line117">117: </a>  MatDenseGetArray(A,&As);
+<a name="line118">118: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.0;
+<a name="line119">119: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line120">120: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+<a name="line121">121: </a>  }
+<a name="line122">122: </a>  MatDenseRestoreArray(A,&As);
+<a name="line123">123: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line124">124: </a>  TestMatRational(fn,A,viewer,verbose,inplace);
+
+<a name="line126">126: </a>  <font color="#B22222">/* Repeat with same matrix as non-symmetric */</font>
+<a name="line127">127: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line128">128: </a>  TestMatRational(fn,A,viewer,verbose,inplace);
+
+<a name="line130">130: </a>  MatDestroy(&A);
+<a name="line131">131: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
+<a name="line132">132: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line133">133: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line134">134: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/fn/examples/tests/test6.c b/src/sys/classes/fn/examples/tests/test6.c
index 42fdb38..605c423 100644
--- a/src/sys/classes/fn/examples/tests/test6.c
+++ b/src/sys/classes/fn/examples/tests/test6.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,22 +37,73 @@ static char help[] = "Test combined function.\n\n";
 #include <slepcfn.h>
 
 #undef __FUNCT__
+#define __FUNCT__ "TestMatCombine"
+/*
+   Compute matrix function B = (I-A^2) exp( -(I+A^2)\A )
+ */
+PetscErrorCode TestMatCombine(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)
+{
+  PetscErrorCode ierr;
+  PetscBool      set,flg;
+  PetscInt       n;
+  Mat            F;
+  Vec            v,f0;
+  PetscReal      nrm;
+
+  PetscFunctionBeginUser;
+  ierr = MatGetSize(A,&n,NULL);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&F);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)F,"F");CHKERRQ(ierr);
+  /* compute square root */
+  if (inplace) {
+    ierr = MatCopy(A,F,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
+    if (set && flg) { ierr = MatSetOption(F,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr); }
+    ierr = FNEvaluateFunctionMat(fn,F,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = FNEvaluateFunctionMat(fn,A,F);CHKERRQ(ierr);
+  }
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(A,viewer);CHKERRQ(ierr);
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed expm(A) - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(F,viewer);CHKERRQ(ierr);
+  }
+  /* print matrix norm for checking */
+  ierr = MatNorm(F,NORM_1,&nrm);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  /* check FNEvaluateFunctionMatVec() */
+  ierr = MatCreateVecs(A,&v,&f0);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(F,f0,0);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMatVec(fn,A,v);CHKERRQ(ierr);
+  ierr = VecAXPY(v,-1.0,f0);CHKERRQ(ierr);
+  ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr);
+  if (nrm>100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Warning: the norm of f(A)*e_1-v is %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&F);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&f0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "main"
 int main(int argc,char **argv)
 {
   PetscErrorCode ierr;
   FN             f,g,h,e,r;
-  Mat            A,B;
+  Mat            A;
   PetscInt       i,j,n=10,np,nq;
-  PetscReal      nrm;
   PetscScalar    x,y,yp,*As,p[10],q[10];
   char           strx[50],str[50];
   PetscViewer    viewer;
-  PetscBool      verbose;
+  PetscBool      verbose,inplace;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsHasName(NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-inplace",&inplace);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"Combined function, n=%D.\n",n);CHKERRQ(ierr);
 
   /* Create function */
@@ -103,8 +154,6 @@ int main(int argc,char **argv)
   /* Create matrices */
   ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);CHKERRQ(ierr);
   ierr = PetscObjectSetName((PetscObject)A,"A");CHKERRQ(ierr);
-  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&B);CHKERRQ(ierr);
-  ierr = PetscObjectSetName((PetscObject)B,"B");CHKERRQ(ierr);
 
   /* Fill A with a symmetric Toeplitz matrix */
   ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
@@ -114,39 +163,18 @@ int main(int argc,char **argv)
   }
   ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
   ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(A,viewer);CHKERRQ(ierr);
-  }
-
-  /* Evaluate matrix function */
-  ierr = FNEvaluateFunctionMat(f,A,B);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(B,viewer);CHKERRQ(ierr);
-  }
-  ierr = MatNorm(B,NORM_1,&nrm);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  ierr = TestMatCombine(f,A,viewer,verbose,inplace);CHKERRQ(ierr);
 
   /* Repeat with same matrix as non-symmetric */
   ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
-
-  /* Evaluate matrix function */
-  ierr = FNEvaluateFunctionMat(f,A,B);CHKERRQ(ierr);
-  if (verbose) {
-    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed f(A) - - - - - - -\n");CHKERRQ(ierr);
-    ierr = MatView(B,viewer);CHKERRQ(ierr);
-  }
-  ierr = MatNorm(B,NORM_1,&nrm);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"The 1-norm of f(A) is %g\n",(double)nrm);CHKERRQ(ierr);
+  ierr = TestMatCombine(f,A,viewer,verbose,inplace);CHKERRQ(ierr);
 
   ierr = MatDestroy(&A);CHKERRQ(ierr);
-  ierr = MatDestroy(&B);CHKERRQ(ierr);
   ierr = FNDestroy(&f);CHKERRQ(ierr);
   ierr = FNDestroy(&g);CHKERRQ(ierr);
   ierr = FNDestroy(&h);CHKERRQ(ierr);
   ierr = FNDestroy(&e);CHKERRQ(ierr);
   ierr = FNDestroy(&r);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/fn/examples/tests/test6.c.html b/src/sys/classes/fn/examples/tests/test6.c.html
index 947c879..903e30d 100644
--- a/src/sys/classes/fn/examples/tests/test6.c.html
+++ b/src/sys/classes/fn/examples/tests/test6.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test6.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:08+00:00">
+<meta name="date" content="2016-05-16T10:32:01+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test6.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -48,117 +48,141 @@
 
 <a name="line37"> 37: </a><font color="#A020F0">#include <slepcfn.h></font>
 
-<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
-<a name="line42"> 42: </a>{
-<a name="line44"> 44: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             f,g,h,e,r;
-<a name="line45"> 45: </a>  Mat            A,B;
-<a name="line46"> 46: </a>  PetscInt       i,j,n=10,np,nq;
-<a name="line47"> 47: </a>  PetscReal      nrm;
-<a name="line48"> 48: </a>  PetscScalar    x,y,yp,*As,p[10],q[10];
-<a name="line49"> 49: </a>  char           strx[50],str[50];
-<a name="line50"> 50: </a>  PetscViewer    viewer;
-<a name="line51"> 51: </a>  PetscBool      verbose;
-
-<a name="line53"> 53: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line54"> 54: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
-<a name="line55"> 55: </a>  PetscOptionsHasName(NULL,<font color="#666666">"-verbose"</font>,&verbose);
-<a name="line56"> 56: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Combined function, n=%D.\n"</font>,n);
-
-<a name="line58"> 58: </a>  <font color="#B22222">/* Create function */</font>
-
-<a name="line60"> 60: </a>  <font color="#B22222">/* e(x) = exp(x) */</font>
-<a name="line61"> 61: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&e);
-<a name="line62"> 62: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(e,FNEXP);
-<a name="line63"> 63: </a>  <font color="#B22222">/* r(x) = x/(1+x^2) */</font>
-<a name="line64"> 64: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&r);
-<a name="line65"> 65: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(r,FNRATIONAL);
-<a name="line66"> 66: </a>  np = 2; nq = 3;
-<a name="line67"> 67: </a>  p[0] = -1.0; p[1] = 0.0;
-<a name="line68"> 68: </a>  q[0] = 1.0; q[1] = 0.0; q[2] = 1.0;
-<a name="line69"> 69: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(r,np,p);
-<a name="line70"> 70: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(r,nq,q);
-<a name="line71"> 71: </a>  <font color="#B22222">/* h(x) */</font>
-<a name="line72"> 72: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&h);
-<a name="line73"> 73: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(h,FNCOMBINE);
-<a name="line74"> 74: </a>  <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(h,FN_COMBINE_COMPOSE,r,e);
-<a name="line75"> 75: </a>  <font color="#B22222">/* g(x) = 1-x^2 */</font>
-<a name="line76"> 76: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&g);
-<a name="line77"> 77: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(g,FNRATIONAL);
-<a name="line78"> 78: </a>  np = 3;
-<a name="line79"> 79: </a>  p[0] = -1.0; p[1] = 0.0; p[2] = 1.0;
-<a name="line80"> 80: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(g,np,p);
-<a name="line81"> 81: </a>  <font color="#B22222">/* f(x) */</font>
-<a name="line82"> 82: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f);
-<a name="line83"> 83: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f,FNCOMBINE);
-<a name="line84"> 84: </a>  <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(f,FN_COMBINE_MULTIPLY,g,h);
-
-<a name="line86"> 86: </a>  <font color="#B22222">/* Set up viewer */</font>
-<a name="line87"> 87: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
-<a name="line88"> 88: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(f,viewer);
-<a name="line89"> 89: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line90"> 90: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
-<a name="line91"> 91: </a>  }
-
-<a name="line93"> 93: </a>  <font color="#B22222">/* Scalar evaluation */</font>
-<a name="line94"> 94: </a>  x = 2.2;
-<a name="line95"> 95: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(strx,50,x,PETSC_FALSE);
-<a name="line96"> 96: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(f,x,&y);
-<a name="line97"> 97: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(f,x,&yp);
-<a name="line98"> 98: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,y,PETSC_FALSE);
-<a name="line99"> 99: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"  f(%s)=%s\n"</font>,strx,str);
-<a name="line100">100: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,yp,PETSC_FALSE);
-<a name="line101">101: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"  f'(%s)=%s\n"</font>,strx,str);
-
-<a name="line103">103: </a>  <font color="#B22222">/* Create matrices */</font>
-<a name="line104">104: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
-<a name="line105">105: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
-<a name="line106">106: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&B);
-<a name="line107">107: </a>  PetscObjectSetName((PetscObject)B,<font color="#666666">"B"</font>);
-
-<a name="line109">109: </a>  <font color="#B22222">/* Fill A with a symmetric Toeplitz matrix */</font>
-<a name="line110">110: </a>  MatDenseGetArray(A,&As);
-<a name="line111">111: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.0;
-<a name="line112">112: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
-<a name="line113">113: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
-<a name="line114">114: </a>  }
-<a name="line115">115: </a>  MatDenseRestoreArray(A,&As);
-<a name="line116">116: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
-<a name="line117">117: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line118">118: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
-<a name="line119">119: </a>    MatView(A,viewer);
-<a name="line120">120: </a>  }
-
-<a name="line122">122: </a>  <font color="#B22222">/* Evaluate matrix function */</font>
-<a name="line123">123: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(f,A,B);
-<a name="line124">124: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line125">125: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
-<a name="line126">126: </a>    MatView(B,viewer);
-<a name="line127">127: </a>  }
-<a name="line128">128: </a>  MatNorm(B,NORM_1,&nrm);
-<a name="line129">129: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
-
-<a name="line131">131: </a>  <font color="#B22222">/* Repeat with same matrix as non-symmetric */</font>
-<a name="line132">132: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
-
-<a name="line134">134: </a>  <font color="#B22222">/* Evaluate matrix function */</font>
-<a name="line135">135: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(f,A,B);
-<a name="line136">136: </a>  <font color="#4169E1">if</font> (verbose) {
-<a name="line137">137: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed f(A) - - - - - - -\n"</font>);
-<a name="line138">138: </a>    MatView(B,viewer);
-<a name="line139">139: </a>  }
-<a name="line140">140: </a>  MatNorm(B,NORM_1,&nrm);
-<a name="line141">141: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
-
-<a name="line143">143: </a>  MatDestroy(&A);
-<a name="line144">144: </a>  MatDestroy(&B);
-<a name="line145">145: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f);
-<a name="line146">146: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&g);
-<a name="line147">147: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&h);
-<a name="line148">148: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&e);
-<a name="line149">149: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&r);
-<a name="line150">150: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line151">151: </a>  <font color="#4169E1">return</font> 0;
-<a name="line152">152: </a>}
+<a name="line41"> 41: </a><font color="#B22222">/*</font>
+<a name="line42"> 42: </a><font color="#B22222">   Compute matrix function B = (I-A^2) exp( -(I+A^2)\A )</font>
+<a name="line43"> 43: </a><font color="#B22222"> */</font>
+<a name="line44"> 44: </a><strong><font color="#4169E1"><a name="TestMatCombine"></a>PetscErrorCode TestMatCombine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)</font></strong>
+<a name="line45"> 45: </a>{
+<a name="line47"> 47: </a>  PetscBool      set,flg;
+<a name="line48"> 48: </a>  PetscInt       n;
+<a name="line49"> 49: </a>  Mat            F;
+<a name="line50"> 50: </a>  Vec            v,f0;
+<a name="line51"> 51: </a>  PetscReal      nrm;
+
+<a name="line54"> 54: </a>  MatGetSize(A,&n,NULL);
+<a name="line55"> 55: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&F);
+<a name="line56"> 56: </a>  PetscObjectSetName((PetscObject)F,<font color="#666666">"F"</font>);
+<a name="line57"> 57: </a>  <font color="#B22222">/* compute square root */</font>
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (inplace) {
+<a name="line59"> 59: </a>    MatCopy(A,F,SAME_NONZERO_PATTERN);
+<a name="line60"> 60: </a>    MatIsHermitianKnown(A,&set,&flg);
+<a name="line61"> 61: </a>    <font color="#4169E1">if</font> (set && flg) { MatSetOption(F,MAT_HERMITIAN,PETSC_TRUE); }
+<a name="line62"> 62: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,F,NULL);
+<a name="line63"> 63: </a>  } <font color="#4169E1">else</font> {
+<a name="line64"> 64: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,F);
+<a name="line65"> 65: </a>  }
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line67"> 67: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
+<a name="line68"> 68: </a>    MatView(A,viewer);
+<a name="line69"> 69: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed expm(A) - - - - - - -\n"</font>);
+<a name="line70"> 70: </a>    MatView(F,viewer);
+<a name="line71"> 71: </a>  }
+<a name="line72"> 72: </a>  <font color="#B22222">/* print matrix norm for checking */</font>
+<a name="line73"> 73: </a>  MatNorm(F,NORM_1,&nrm);
+<a name="line74"> 74: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"The 1-norm of f(A) is %g\n"</font>,(double)nrm);
+<a name="line75"> 75: </a>  <font color="#B22222">/* check <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>() */</font>
+<a name="line76"> 76: </a>  MatCreateVecs(A,&v,&f0);
+<a name="line77"> 77: </a>  MatGetColumnVector(F,f0,0);
+<a name="line78"> 78: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(fn,A,v);
+<a name="line79"> 79: </a>  VecAXPY(v,-1.0,f0);
+<a name="line80"> 80: </a>  VecNorm(v,NORM_2,&nrm);
+<a name="line81"> 81: </a>  <font color="#4169E1">if</font> (nrm>100*PETSC_MACHINE_EPSILON) {
+<a name="line82"> 82: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Warning: the norm of f(A)*e_1-v is %g\n"</font>,(double)nrm);
+<a name="line83"> 83: </a>  }
+<a name="line84"> 84: </a>  MatDestroy(&F);
+<a name="line85"> 85: </a>  VecDestroy(&v);
+<a name="line86"> 86: </a>  VecDestroy(&f0);
+<a name="line87"> 87: </a>  <font color="#4169E1">return</font>(0);
+<a name="line88"> 88: </a>}
+
+<a name="line92"> 92: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line93"> 93: </a>{
+<a name="line95"> 95: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             f,g,h,e,r;
+<a name="line96"> 96: </a>  Mat            A;
+<a name="line97"> 97: </a>  PetscInt       i,j,n=10,np,nq;
+<a name="line98"> 98: </a>  PetscScalar    x,y,yp,*As,p[10],q[10];
+<a name="line99"> 99: </a>  char           strx[50],str[50];
+<a name="line100">100: </a>  PetscViewer    viewer;
+<a name="line101">101: </a>  PetscBool      verbose,inplace;
+
+<a name="line103">103: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line104">104: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line105">105: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line106">106: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-inplace"</font>,&inplace);
+<a name="line107">107: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Combined function, n=%D.\n"</font>,n);
+
+<a name="line109">109: </a>  <font color="#B22222">/* Create function */</font>
+
+<a name="line111">111: </a>  <font color="#B22222">/* e(x) = exp(x) */</font>
+<a name="line112">112: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&e);
+<a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(e,FNEXP);
+<a name="line114">114: </a>  <font color="#B22222">/* r(x) = x/(1+x^2) */</font>
+<a name="line115">115: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&r);
+<a name="line116">116: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(r,FNRATIONAL);
+<a name="line117">117: </a>  np = 2; nq = 3;
+<a name="line118">118: </a>  p[0] = -1.0; p[1] = 0.0;
+<a name="line119">119: </a>  q[0] = 1.0; q[1] = 0.0; q[2] = 1.0;
+<a name="line120">120: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(r,np,p);
+<a name="line121">121: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(r,nq,q);
+<a name="line122">122: </a>  <font color="#B22222">/* h(x) */</font>
+<a name="line123">123: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&h);
+<a name="line124">124: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(h,FNCOMBINE);
+<a name="line125">125: </a>  <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(h,FN_COMBINE_COMPOSE,r,e);
+<a name="line126">126: </a>  <font color="#B22222">/* g(x) = 1-x^2 */</font>
+<a name="line127">127: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&g);
+<a name="line128">128: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(g,FNRATIONAL);
+<a name="line129">129: </a>  np = 3;
+<a name="line130">130: </a>  p[0] = -1.0; p[1] = 0.0; p[2] = 1.0;
+<a name="line131">131: </a>  <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(g,np,p);
+<a name="line132">132: </a>  <font color="#B22222">/* f(x) */</font>
+<a name="line133">133: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&f);
+<a name="line134">134: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(f,FNCOMBINE);
+<a name="line135">135: </a>  <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(f,FN_COMBINE_MULTIPLY,g,h);
+
+<a name="line137">137: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line138">138: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line139">139: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(f,viewer);
+<a name="line140">140: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line141">141: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line142">142: </a>  }
+
+<a name="line144">144: </a>  <font color="#B22222">/* Scalar evaluation */</font>
+<a name="line145">145: </a>  x = 2.2;
+<a name="line146">146: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(strx,50,x,PETSC_FALSE);
+<a name="line147">147: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(f,x,&y);
+<a name="line148">148: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(f,x,&yp);
+<a name="line149">149: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,y,PETSC_FALSE);
+<a name="line150">150: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"  f(%s)=%s\n"</font>,strx,str);
+<a name="line151">151: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,yp,PETSC_FALSE);
+<a name="line152">152: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"  f'(%s)=%s\n"</font>,strx,str);
+
+<a name="line154">154: </a>  <font color="#B22222">/* Create matrices */</font>
+<a name="line155">155: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
+<a name="line156">156: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
+
+<a name="line158">158: </a>  <font color="#B22222">/* Fill A with a symmetric Toeplitz matrix */</font>
+<a name="line159">159: </a>  MatDenseGetArray(A,&As);
+<a name="line160">160: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.0;
+<a name="line161">161: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line162">162: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+<a name="line163">163: </a>  }
+<a name="line164">164: </a>  MatDenseRestoreArray(A,&As);
+<a name="line165">165: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line166">166: </a>  TestMatCombine(f,A,viewer,verbose,inplace);
+
+<a name="line168">168: </a>  <font color="#B22222">/* Repeat with same matrix as non-symmetric */</font>
+<a name="line169">169: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line170">170: </a>  TestMatCombine(f,A,viewer,verbose,inplace);
+
+<a name="line172">172: </a>  MatDestroy(&A);
+<a name="line173">173: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&f);
+<a name="line174">174: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&g);
+<a name="line175">175: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&h);
+<a name="line176">176: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&e);
+<a name="line177">177: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&r);
+<a name="line178">178: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line179">179: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line180">180: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/fn/examples/tests/test7.c b/src/sys/classes/fn/examples/tests/test7.c
new file mode 100644
index 0000000..bdaa996
--- /dev/null
+++ b/src/sys/classes/fn/examples/tests/test7.c
@@ -0,0 +1,169 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Test matrix square root.\n\n";
+
+#include <slepcfn.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "TestMatSqrt"
+/*
+   Compute matrix square root B = sqrtm(A)
+   Check result as norm(B*B-A)
+ */
+PetscErrorCode TestMatSqrt(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)
+{
+  PetscErrorCode ierr;
+  PetscScalar    tau,eta;
+  PetscReal      nrm;
+  PetscBool      set,flg;
+  PetscInt       n;
+  Mat            S,R;
+  Vec            v,f0;
+
+  PetscFunctionBeginUser;
+  ierr = MatGetSize(A,&n,NULL);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&S);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)S,"S");CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&R);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)R,"R");CHKERRQ(ierr);
+  ierr = FNGetScale(fn,&tau,&eta);CHKERRQ(ierr);
+  /* compute square root */
+  if (inplace) {
+    ierr = MatCopy(A,S,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
+    if (set && flg) { ierr = MatSetOption(S,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr); }
+    ierr = FNEvaluateFunctionMat(fn,S,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = FNEvaluateFunctionMat(fn,A,S);CHKERRQ(ierr);
+  }
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(A,viewer);CHKERRQ(ierr);
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed sqrtm(A) - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(S,viewer);CHKERRQ(ierr);
+  }
+  /* check error ||S*S-A||_F */
+  ierr = MatMatMult(S,S,MAT_REUSE_MATRIX,PETSC_DEFAULT,&R);CHKERRQ(ierr);
+  if (eta!=1.0) {
+    ierr = MatScale(R,1.0/(eta*eta));CHKERRQ(ierr);
+  }
+  ierr = MatAXPY(R,-tau,A,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+  ierr = MatNorm(R,NORM_FROBENIUS,&nrm);CHKERRQ(ierr);
+  if (nrm<100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"||S*S-A||_F < 100*eps\n");CHKERRQ(ierr);
+  } else {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"||S*S-A||_F = %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  /* check FNEvaluateFunctionMatVec() */
+  ierr = MatCreateVecs(A,&v,&f0);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(S,f0,0);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMatVec(fn,A,v);CHKERRQ(ierr);
+  ierr = VecAXPY(v,-1.0,f0);CHKERRQ(ierr);
+  ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr);
+  if (nrm>100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Warning: the norm of f(A)*e_1-v is %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&S);CHKERRQ(ierr);
+  ierr = MatDestroy(&R);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&f0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  PetscErrorCode ierr;
+  FN             fn;
+  Mat            A;
+  PetscInt       i,j,n=10;
+  PetscScalar    *As,tau=1.0,eta=1.0;
+  PetscViewer    viewer;
+  PetscBool      verbose,inplace;
+  PetscRandom    myrand;
+  PetscReal      v;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-eta",&eta,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-inplace",&inplace);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix square root, n=%D.\n",n);CHKERRQ(ierr);
+
+  /* Create function eta*sqrt(tau*x) */
+  ierr = FNCreate(PETSC_COMM_WORLD,&fn);CHKERRQ(ierr);
+  ierr = FNSetType(fn,FNSQRT);CHKERRQ(ierr);
+  ierr = FNSetScale(fn,tau,eta);CHKERRQ(ierr);
+
+  /* Set up viewer */
+  ierr = PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);CHKERRQ(ierr);
+  ierr = FNView(fn,viewer);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);CHKERRQ(ierr);
+  }
+
+  /* Create matrix */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)A,"A");CHKERRQ(ierr);
+
+  /* Compute square root of a symmetric matrix A */
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  for (i=0;i<n;i++) As[i+i*n]=2.5;
+  for (j=1;j<3;j++) {
+    for (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+  }
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = TestMatSqrt(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
+
+  /* Repeat with upper triangular A */
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  for (j=1;j<3;j++) {
+    for (i=0;i<n-j;i++) As[(i+j)+i*n]=0.0;
+  }
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
+  ierr = TestMatSqrt(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
+
+  /* Repeat with non-symmetic A */
+  ierr = PetscRandomCreate(PETSC_COMM_WORLD,&myrand);CHKERRQ(ierr);
+  ierr = PetscRandomSetFromOptions(myrand);CHKERRQ(ierr);
+  ierr = PetscRandomSetInterval(myrand,0.0,1.0);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  for (j=1;j<3;j++) {
+    for (i=0;i<n-j;i++) { 
+      ierr = PetscRandomGetValueReal(myrand,&v);CHKERRQ(ierr);
+      As[(i+j)+i*n]=v;
+    }
+  }
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = PetscRandomDestroy(&myrand);CHKERRQ(ierr);
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
+  ierr = TestMatSqrt(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
+
+  ierr = MatDestroy(&A);CHKERRQ(ierr);
+  ierr = FNDestroy(&fn);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
diff --git a/src/sys/classes/fn/examples/tests/test7.c.html b/src/sys/classes/fn/examples/tests/test7.c.html
new file mode 100644
index 0000000..4dbb513
--- /dev/null
+++ b/src/sys/classes/fn/examples/tests/test7.c.html
@@ -0,0 +1,178 @@
+<center><a href="test7.c">Actual source code: test7.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test7.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:32:02+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test7.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Test matrix square root.\n\n"</font>;
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepcfn.h></font>
+
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">   Compute matrix square root B = sqrtm(A)</font>
+<a name="line30"> 30: </a><font color="#B22222">   Check result as norm(B*B-A)</font>
+<a name="line31"> 31: </a><font color="#B22222"> */</font>
+<a name="line32"> 32: </a><strong><font color="#4169E1"><a name="TestMatSqrt"></a>PetscErrorCode TestMatSqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)</font></strong>
+<a name="line33"> 33: </a>{
+<a name="line35"> 35: </a>  PetscScalar    tau,eta;
+<a name="line36"> 36: </a>  PetscReal      nrm;
+<a name="line37"> 37: </a>  PetscBool      set,flg;
+<a name="line38"> 38: </a>  PetscInt       n;
+<a name="line39"> 39: </a>  Mat            S,R;
+<a name="line40"> 40: </a>  Vec            v,f0;
+
+<a name="line43"> 43: </a>  MatGetSize(A,&n,NULL);
+<a name="line44"> 44: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&S);
+<a name="line45"> 45: </a>  PetscObjectSetName((PetscObject)S,<font color="#666666">"S"</font>);
+<a name="line46"> 46: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&R);
+<a name="line47"> 47: </a>  PetscObjectSetName((PetscObject)R,<font color="#666666">"R"</font>);
+<a name="line48"> 48: </a>  <a href="../../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(fn,&tau,&eta);
+<a name="line49"> 49: </a>  <font color="#B22222">/* compute square root */</font>
+<a name="line50"> 50: </a>  <font color="#4169E1">if</font> (inplace) {
+<a name="line51"> 51: </a>    MatCopy(A,S,SAME_NONZERO_PATTERN);
+<a name="line52"> 52: </a>    MatIsHermitianKnown(A,&set,&flg);
+<a name="line53"> 53: </a>    <font color="#4169E1">if</font> (set && flg) { MatSetOption(S,MAT_HERMITIAN,PETSC_TRUE); }
+<a name="line54"> 54: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,S,NULL);
+<a name="line55"> 55: </a>  } <font color="#4169E1">else</font> {
+<a name="line56"> 56: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,S);
+<a name="line57"> 57: </a>  }
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line59"> 59: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
+<a name="line60"> 60: </a>    MatView(A,viewer);
+<a name="line61"> 61: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed sqrtm(A) - - - - - - -\n"</font>);
+<a name="line62"> 62: </a>    MatView(S,viewer);
+<a name="line63"> 63: </a>  }
+<a name="line64"> 64: </a>  <font color="#B22222">/* check error ||S*S-A||_F */</font>
+<a name="line65"> 65: </a>  MatMatMult(S,S,MAT_REUSE_MATRIX,PETSC_DEFAULT,&R);
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (eta!=1.0) {
+<a name="line67"> 67: </a>    MatScale(R,1.0/(eta*eta));
+<a name="line68"> 68: </a>  }
+<a name="line69"> 69: </a>  MatAXPY(R,-tau,A,SAME_NONZERO_PATTERN);
+<a name="line70"> 70: </a>  MatNorm(R,NORM_FROBENIUS,&nrm);
+<a name="line71"> 71: </a>  <font color="#4169E1">if</font> (nrm<100*PETSC_MACHINE_EPSILON) {
+<a name="line72"> 72: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"||S*S-A||_F < 100*eps\n"</font>);
+<a name="line73"> 73: </a>  } <font color="#4169E1">else</font> {
+<a name="line74"> 74: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"||S*S-A||_F = %g\n"</font>,(double)nrm);
+<a name="line75"> 75: </a>  }
+<a name="line76"> 76: </a>  <font color="#B22222">/* check <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>() */</font>
+<a name="line77"> 77: </a>  MatCreateVecs(A,&v,&f0);
+<a name="line78"> 78: </a>  MatGetColumnVector(S,f0,0);
+<a name="line79"> 79: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(fn,A,v);
+<a name="line80"> 80: </a>  VecAXPY(v,-1.0,f0);
+<a name="line81"> 81: </a>  VecNorm(v,NORM_2,&nrm);
+<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (nrm>100*PETSC_MACHINE_EPSILON) {
+<a name="line83"> 83: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Warning: the norm of f(A)*e_1-v is %g\n"</font>,(double)nrm);
+<a name="line84"> 84: </a>  }
+<a name="line85"> 85: </a>  MatDestroy(&S);
+<a name="line86"> 86: </a>  MatDestroy(&R);
+<a name="line87"> 87: </a>  VecDestroy(&v);
+<a name="line88"> 88: </a>  VecDestroy(&f0);
+<a name="line89"> 89: </a>  <font color="#4169E1">return</font>(0);
+<a name="line90"> 90: </a>}
+
+<a name="line94"> 94: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line95"> 95: </a>{
+<a name="line97"> 97: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
+<a name="line98"> 98: </a>  Mat            A;
+<a name="line99"> 99: </a>  PetscInt       i,j,n=10;
+<a name="line100">100: </a>  PetscScalar    *As,tau=1.0,eta=1.0;
+<a name="line101">101: </a>  PetscViewer    viewer;
+<a name="line102">102: </a>  PetscBool      verbose,inplace;
+<a name="line103">103: </a>  PetscRandom    myrand;
+<a name="line104">104: </a>  PetscReal      v;
+
+<a name="line106">106: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line107">107: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line108">108: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line109">109: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-eta"</font>,&eta,NULL);
+<a name="line110">110: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line111">111: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-inplace"</font>,&inplace);
+<a name="line112">112: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix square root, n=%D.\n"</font>,n);
+
+<a name="line114">114: </a>  <font color="#B22222">/* Create function eta*sqrt(tau*x) */</font>
+<a name="line115">115: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&fn);
+<a name="line116">116: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNSQRT);
+<a name="line117">117: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,tau,eta);
+
+<a name="line119">119: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line120">120: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line121">121: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn,viewer);
+<a name="line122">122: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line123">123: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line124">124: </a>  }
+
+<a name="line126">126: </a>  <font color="#B22222">/* Create matrix */</font>
+<a name="line127">127: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
+<a name="line128">128: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
+
+<a name="line130">130: </a>  <font color="#B22222">/* Compute square root of a symmetric matrix A */</font>
+<a name="line131">131: </a>  MatDenseGetArray(A,&As);
+<a name="line132">132: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.5;
+<a name="line133">133: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line134">134: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+<a name="line135">135: </a>  }
+<a name="line136">136: </a>  MatDenseRestoreArray(A,&As);
+<a name="line137">137: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line138">138: </a>  TestMatSqrt(fn,A,viewer,verbose,inplace);
+
+<a name="line140">140: </a>  <font color="#B22222">/* Repeat with upper triangular A */</font>
+<a name="line141">141: </a>  MatDenseGetArray(A,&As);
+<a name="line142">142: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line143">143: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) As[(i+j)+i*n]=0.0;
+<a name="line144">144: </a>  }
+<a name="line145">145: </a>  MatDenseRestoreArray(A,&As);
+<a name="line146">146: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line147">147: </a>  TestMatSqrt(fn,A,viewer,verbose,inplace);
+
+<a name="line149">149: </a>  <font color="#B22222">/* Repeat with non-symmetic A */</font>
+<a name="line150">150: </a>  PetscRandomCreate(PETSC_COMM_WORLD,&myrand);
+<a name="line151">151: </a>  PetscRandomSetFromOptions(myrand);
+<a name="line152">152: </a>  PetscRandomSetInterval(myrand,0.0,1.0);
+<a name="line153">153: </a>  MatDenseGetArray(A,&As);
+<a name="line154">154: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line155">155: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { 
+<a name="line156">156: </a>      PetscRandomGetValueReal(myrand,&v);
+<a name="line157">157: </a>      As[(i+j)+i*n]=v;
+<a name="line158">158: </a>    }
+<a name="line159">159: </a>  }
+<a name="line160">160: </a>  MatDenseRestoreArray(A,&As);
+<a name="line161">161: </a>  PetscRandomDestroy(&myrand);
+<a name="line162">162: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line163">163: </a>  TestMatSqrt(fn,A,viewer,verbose,inplace);
+
+<a name="line165">165: </a>  MatDestroy(&A);
+<a name="line166">166: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
+<a name="line167">167: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line168">168: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line169">169: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/fn/examples/tests/test8.c b/src/sys/classes/fn/examples/tests/test8.c
new file mode 100644
index 0000000..a40519c
--- /dev/null
+++ b/src/sys/classes/fn/examples/tests/test8.c
@@ -0,0 +1,174 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+static char help[] = "Test matrix inverse square root.\n\n";
+
+#include <slepcfn.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "TestMatInvSqrt"
+/*
+   Compute matrix inverse square root B = inv(sqrtm(A))
+   Check result as norm(B*B*A-I)
+ */
+PetscErrorCode TestMatInvSqrt(FN fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)
+{
+  PetscErrorCode ierr;
+  PetscScalar    tau,eta;
+  PetscReal      nrm;
+  PetscBool      set,flg;
+  PetscInt       n;
+  Mat            S,R;
+  Vec            v,f0;
+
+  PetscFunctionBeginUser;
+  ierr = MatGetSize(A,&n,NULL);CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&S);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)S,"S");CHKERRQ(ierr);
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&R);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)R,"R");CHKERRQ(ierr);
+  ierr = FNGetScale(fn,&tau,&eta);CHKERRQ(ierr);
+  /* compute inverse square root */
+  if (inplace) {
+    ierr = MatCopy(A,S,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+    ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
+    if (set && flg) { ierr = MatSetOption(S,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr); }
+    ierr = FNEvaluateFunctionMat(fn,S,NULL);CHKERRQ(ierr);
+  } else {
+    ierr = FNEvaluateFunctionMat(fn,A,S);CHKERRQ(ierr);
+  }
+  if (verbose) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix A - - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(A,viewer);CHKERRQ(ierr);
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Computed inv(sqrtm(A)) - - - - - - -\n");CHKERRQ(ierr);
+    ierr = MatView(S,viewer);CHKERRQ(ierr);
+  }
+  /* check error ||S*S*A-I||_F */
+  ierr = MatMatMult(S,S,MAT_REUSE_MATRIX,PETSC_DEFAULT,&R);CHKERRQ(ierr);
+  if (eta!=1.0) {
+    ierr = MatScale(R,1.0/(eta*eta));CHKERRQ(ierr);
+  }
+  ierr = MatCreateVecs(A,&v,&f0);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(S,f0,0);CHKERRQ(ierr);
+  ierr = MatCopy(R,S,SAME_NONZERO_PATTERN);CHKERRQ(ierr);
+  if (tau!=1.0) {
+    ierr = MatScale(S,tau);CHKERRQ(ierr);
+  }
+  ierr = MatMatMult(S,A,MAT_REUSE_MATRIX,PETSC_DEFAULT,&R);CHKERRQ(ierr);
+  ierr = MatShift(R,-1.0);CHKERRQ(ierr);
+  ierr = MatNorm(R,NORM_FROBENIUS,&nrm);CHKERRQ(ierr);
+  if (nrm<100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"||S*S*A-I||_F < 100*eps\n");CHKERRQ(ierr);
+  } else {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"||S*S*A-I||_F = %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  /* check FNEvaluateFunctionMatVec() */
+  ierr = FNEvaluateFunctionMatVec(fn,A,v);CHKERRQ(ierr);
+  ierr = VecAXPY(v,-1.0,f0);CHKERRQ(ierr);
+  ierr = VecNorm(v,NORM_2,&nrm);CHKERRQ(ierr);
+  if (nrm>100*PETSC_MACHINE_EPSILON) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Warning: the norm of f(A)*e_1-v is %g\n",(double)nrm);CHKERRQ(ierr);
+  }
+  ierr = MatDestroy(&S);CHKERRQ(ierr);
+  ierr = MatDestroy(&R);CHKERRQ(ierr);
+  ierr = VecDestroy(&v);CHKERRQ(ierr);
+  ierr = VecDestroy(&f0);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "main"
+int main(int argc,char **argv)
+{
+  PetscErrorCode ierr;
+  FN             fn;
+  Mat            A;
+  PetscInt       i,j,n=10;
+  PetscScalar    *As,tau=1.0,eta=1.0;
+  PetscViewer    viewer;
+  PetscBool      verbose,inplace;
+  PetscRandom    myrand;
+  PetscReal      v;
+
+  SlepcInitialize(&argc,&argv,(char*)0,help);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-tau",&tau,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetScalar(NULL,NULL,"-eta",&eta,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);CHKERRQ(ierr);
+  ierr = PetscOptionsHasName(NULL,NULL,"-inplace",&inplace);CHKERRQ(ierr);
+  ierr = PetscPrintf(PETSC_COMM_WORLD,"Matrix inverse square root, n=%D.\n",n);CHKERRQ(ierr);
+
+  /* Create function eta*inv(sqrt(tau*x)) */
+  ierr = FNCreate(PETSC_COMM_WORLD,&fn);CHKERRQ(ierr);
+  ierr = FNSetType(fn,FNINVSQRT);CHKERRQ(ierr);
+  ierr = FNSetScale(fn,tau,eta);CHKERRQ(ierr);
+
+  /* Set up viewer */
+  ierr = PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);CHKERRQ(ierr);
+  ierr = FNView(fn,viewer);CHKERRQ(ierr);
+  if (verbose) {
+    ierr = PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);CHKERRQ(ierr);
+  }
+
+  /* Create matrix */
+  ierr = MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);CHKERRQ(ierr);
+  ierr = PetscObjectSetName((PetscObject)A,"A");CHKERRQ(ierr);
+
+  /* Compute square root of a symmetric matrix A */
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  for (i=0;i<n;i++) As[i+i*n]=2.5;
+  for (j=1;j<3;j++) {
+    for (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+  }
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = TestMatInvSqrt(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
+
+  /* Repeat with upper triangular A */
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  for (j=1;j<3;j++) {
+    for (i=0;i<n-j;i++) As[(i+j)+i*n]=0.0;
+  }
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
+  ierr = TestMatInvSqrt(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
+
+  /* Repeat with non-symmetic A */
+  ierr = PetscRandomCreate(PETSC_COMM_WORLD,&myrand);CHKERRQ(ierr);
+  ierr = PetscRandomSetFromOptions(myrand);CHKERRQ(ierr);
+  ierr = PetscRandomSetInterval(myrand,0.0,1.0);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  for (j=1;j<3;j++) {
+    for (i=0;i<n-j;i++) { 
+      ierr = PetscRandomGetValueReal(myrand,&v);CHKERRQ(ierr);
+      As[(i+j)+i*n]=v;
+    }
+  }
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = PetscRandomDestroy(&myrand);CHKERRQ(ierr);
+  ierr = MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);CHKERRQ(ierr);
+  ierr = TestMatInvSqrt(fn,A,viewer,verbose,inplace);CHKERRQ(ierr);
+
+  ierr = MatDestroy(&A);CHKERRQ(ierr);
+  ierr = FNDestroy(&fn);CHKERRQ(ierr);
+  ierr = SlepcFinalize();
+  return ierr;
+}
diff --git a/src/sys/classes/fn/examples/tests/test8.c.html b/src/sys/classes/fn/examples/tests/test8.c.html
new file mode 100644
index 0000000..2e44795
--- /dev/null
+++ b/src/sys/classes/fn/examples/tests/test8.c.html
@@ -0,0 +1,183 @@
+<center><a href="test8.c">Actual source code: test8.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/examples/tests/test8.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:32:02+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/examples/tests/test8.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line8">  8: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line9">  9: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line10"> 10: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line12"> 12: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line13"> 13: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line14"> 14: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line15"> 15: </a><font color="#B22222">   more details.</font>
+
+<a name="line17"> 17: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line18"> 18: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line19"> 19: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line20"> 20: </a><font color="#B22222">*/</font>
+
+<a name="line22"> 22: </a>static char help[] = <font color="#666666">"Test matrix inverse square root.\n\n"</font>;
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepcfn.h></font>
+
+<a name="line28"> 28: </a><font color="#B22222">/*</font>
+<a name="line29"> 29: </a><font color="#B22222">   Compute matrix inverse square root B = inv(sqrtm(A))</font>
+<a name="line30"> 30: </a><font color="#B22222">   Check result as norm(B*B*A-I)</font>
+<a name="line31"> 31: </a><font color="#B22222"> */</font>
+<a name="line32"> 32: </a><strong><font color="#4169E1"><a name="TestMatInvSqrt"></a>PetscErrorCode TestMatInvSqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,PetscViewer viewer,PetscBool verbose,PetscBool inplace)</font></strong>
+<a name="line33"> 33: </a>{
+<a name="line35"> 35: </a>  PetscScalar    tau,eta;
+<a name="line36"> 36: </a>  PetscReal      nrm;
+<a name="line37"> 37: </a>  PetscBool      set,flg;
+<a name="line38"> 38: </a>  PetscInt       n;
+<a name="line39"> 39: </a>  Mat            S,R;
+<a name="line40"> 40: </a>  Vec            v,f0;
+
+<a name="line43"> 43: </a>  MatGetSize(A,&n,NULL);
+<a name="line44"> 44: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&S);
+<a name="line45"> 45: </a>  PetscObjectSetName((PetscObject)S,<font color="#666666">"S"</font>);
+<a name="line46"> 46: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&R);
+<a name="line47"> 47: </a>  PetscObjectSetName((PetscObject)R,<font color="#666666">"R"</font>);
+<a name="line48"> 48: </a>  <a href="../../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(fn,&tau,&eta);
+<a name="line49"> 49: </a>  <font color="#B22222">/* compute inverse square root */</font>
+<a name="line50"> 50: </a>  <font color="#4169E1">if</font> (inplace) {
+<a name="line51"> 51: </a>    MatCopy(A,S,SAME_NONZERO_PATTERN);
+<a name="line52"> 52: </a>    MatIsHermitianKnown(A,&set,&flg);
+<a name="line53"> 53: </a>    <font color="#4169E1">if</font> (set && flg) { MatSetOption(S,MAT_HERMITIAN,PETSC_TRUE); }
+<a name="line54"> 54: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,S,NULL);
+<a name="line55"> 55: </a>  } <font color="#4169E1">else</font> {
+<a name="line56"> 56: </a>    <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(fn,A,S);
+<a name="line57"> 57: </a>  }
+<a name="line58"> 58: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line59"> 59: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix A - - - - - - - -\n"</font>);
+<a name="line60"> 60: </a>    MatView(A,viewer);
+<a name="line61"> 61: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Computed inv(sqrtm(A)) - - - - - - -\n"</font>);
+<a name="line62"> 62: </a>    MatView(S,viewer);
+<a name="line63"> 63: </a>  }
+<a name="line64"> 64: </a>  <font color="#B22222">/* check error ||S*S*A-I||_F */</font>
+<a name="line65"> 65: </a>  MatMatMult(S,S,MAT_REUSE_MATRIX,PETSC_DEFAULT,&R);
+<a name="line66"> 66: </a>  <font color="#4169E1">if</font> (eta!=1.0) {
+<a name="line67"> 67: </a>    MatScale(R,1.0/(eta*eta));
+<a name="line68"> 68: </a>  }
+<a name="line69"> 69: </a>  MatCreateVecs(A,&v,&f0);
+<a name="line70"> 70: </a>  MatGetColumnVector(S,f0,0);
+<a name="line71"> 71: </a>  MatCopy(R,S,SAME_NONZERO_PATTERN);
+<a name="line72"> 72: </a>  <font color="#4169E1">if</font> (tau!=1.0) {
+<a name="line73"> 73: </a>    MatScale(S,tau);
+<a name="line74"> 74: </a>  }
+<a name="line75"> 75: </a>  MatMatMult(S,A,MAT_REUSE_MATRIX,PETSC_DEFAULT,&R);
+<a name="line76"> 76: </a>  MatShift(R,-1.0);
+<a name="line77"> 77: </a>  MatNorm(R,NORM_FROBENIUS,&nrm);
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (nrm<100*PETSC_MACHINE_EPSILON) {
+<a name="line79"> 79: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"||S*S*A-I||_F < 100*eps\n"</font>);
+<a name="line80"> 80: </a>  } <font color="#4169E1">else</font> {
+<a name="line81"> 81: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"||S*S*A-I||_F = %g\n"</font>,(double)nrm);
+<a name="line82"> 82: </a>  }
+<a name="line83"> 83: </a>  <font color="#B22222">/* check <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>() */</font>
+<a name="line84"> 84: </a>  <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(fn,A,v);
+<a name="line85"> 85: </a>  VecAXPY(v,-1.0,f0);
+<a name="line86"> 86: </a>  VecNorm(v,NORM_2,&nrm);
+<a name="line87"> 87: </a>  <font color="#4169E1">if</font> (nrm>100*PETSC_MACHINE_EPSILON) {
+<a name="line88"> 88: </a>    PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Warning: the norm of f(A)*e_1-v is %g\n"</font>,(double)nrm);
+<a name="line89"> 89: </a>  }
+<a name="line90"> 90: </a>  MatDestroy(&S);
+<a name="line91"> 91: </a>  MatDestroy(&R);
+<a name="line92"> 92: </a>  VecDestroy(&v);
+<a name="line93"> 93: </a>  VecDestroy(&f0);
+<a name="line94"> 94: </a>  <font color="#4169E1">return</font>(0);
+<a name="line95"> 95: </a>}
+
+<a name="line99"> 99: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
+<a name="line100">100: </a>{
+<a name="line102">102: </a>  <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>             fn;
+<a name="line103">103: </a>  Mat            A;
+<a name="line104">104: </a>  PetscInt       i,j,n=10;
+<a name="line105">105: </a>  PetscScalar    *As,tau=1.0,eta=1.0;
+<a name="line106">106: </a>  PetscViewer    viewer;
+<a name="line107">107: </a>  PetscBool      verbose,inplace;
+<a name="line108">108: </a>  PetscRandom    myrand;
+<a name="line109">109: </a>  PetscReal      v;
+
+<a name="line111">111: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
+<a name="line112">112: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line113">113: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-tau"</font>,&tau,NULL);
+<a name="line114">114: </a>  PetscOptionsGetScalar(NULL,NULL,<font color="#666666">"-eta"</font>,&eta,NULL);
+<a name="line115">115: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-verbose"</font>,&verbose);
+<a name="line116">116: </a>  PetscOptionsHasName(NULL,NULL,<font color="#666666">"-inplace"</font>,&inplace);
+<a name="line117">117: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"Matrix inverse square root, n=%D.\n"</font>,n);
+
+<a name="line119">119: </a>  <font color="#B22222">/* Create function eta*inv(sqrt(tau*x)) */</font>
+<a name="line120">120: </a>  <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PETSC_COMM_WORLD,&fn);
+<a name="line121">121: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNINVSQRT);
+<a name="line122">122: </a>  <a href="../../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,tau,eta);
+
+<a name="line124">124: </a>  <font color="#B22222">/* Set up viewer */</font>
+<a name="line125">125: </a>  PetscViewerASCIIGetStdout(PETSC_COMM_WORLD,&viewer);
+<a name="line126">126: </a>  <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(fn,viewer);
+<a name="line127">127: </a>  <font color="#4169E1">if</font> (verbose) {
+<a name="line128">128: </a>    PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
+<a name="line129">129: </a>  }
+
+<a name="line131">131: </a>  <font color="#B22222">/* Create matrix */</font>
+<a name="line132">132: </a>  MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
+<a name="line133">133: </a>  PetscObjectSetName((PetscObject)A,<font color="#666666">"A"</font>);
+
+<a name="line135">135: </a>  <font color="#B22222">/* Compute square root of a symmetric matrix A */</font>
+<a name="line136">136: </a>  MatDenseGetArray(A,&As);
+<a name="line137">137: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) As[i+i*n]=2.5;
+<a name="line138">138: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line139">139: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { As[i+(i+j)*n]=1.0; As[(i+j)+i*n]=1.0; }
+<a name="line140">140: </a>  }
+<a name="line141">141: </a>  MatDenseRestoreArray(A,&As);
+<a name="line142">142: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_TRUE);
+<a name="line143">143: </a>  TestMatInvSqrt(fn,A,viewer,verbose,inplace);
+
+<a name="line145">145: </a>  <font color="#B22222">/* Repeat with upper triangular A */</font>
+<a name="line146">146: </a>  MatDenseGetArray(A,&As);
+<a name="line147">147: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line148">148: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) As[(i+j)+i*n]=0.0;
+<a name="line149">149: </a>  }
+<a name="line150">150: </a>  MatDenseRestoreArray(A,&As);
+<a name="line151">151: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line152">152: </a>  TestMatInvSqrt(fn,A,viewer,verbose,inplace);
+
+<a name="line154">154: </a>  <font color="#B22222">/* Repeat with non-symmetic A */</font>
+<a name="line155">155: </a>  PetscRandomCreate(PETSC_COMM_WORLD,&myrand);
+<a name="line156">156: </a>  PetscRandomSetFromOptions(myrand);
+<a name="line157">157: </a>  PetscRandomSetInterval(myrand,0.0,1.0);
+<a name="line158">158: </a>  MatDenseGetArray(A,&As);
+<a name="line159">159: </a>  <font color="#4169E1">for</font> (j=1;j<3;j++) {
+<a name="line160">160: </a>    <font color="#4169E1">for</font> (i=0;i<n-j;i++) { 
+<a name="line161">161: </a>      PetscRandomGetValueReal(myrand,&v);
+<a name="line162">162: </a>      As[(i+j)+i*n]=v;
+<a name="line163">163: </a>    }
+<a name="line164">164: </a>  }
+<a name="line165">165: </a>  MatDenseRestoreArray(A,&As);
+<a name="line166">166: </a>  PetscRandomDestroy(&myrand);
+<a name="line167">167: </a>  MatSetOption(A,MAT_HERMITIAN,PETSC_FALSE);
+<a name="line168">168: </a>  TestMatInvSqrt(fn,A,viewer,verbose,inplace);
+
+<a name="line170">170: </a>  MatDestroy(&A);
+<a name="line171">171: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&fn);
+<a name="line172">172: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
+<a name="line173">173: </a>  <font color="#4169E1">return</font> ierr;
+<a name="line174">174: </a>}
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/fn/impls/combine/fncombine.c b/src/sys/classes/fn/impls/combine/fncombine.c
index b8cb3a1..d15c16d 100644
--- a/src/sys/classes/fn/impls/combine/fncombine.c
+++ b/src/sys/classes/fn/impls/combine/fncombine.c
@@ -9,7 +9,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -56,6 +56,7 @@ PetscErrorCode FNEvaluateFunction_Combine(FN fn,PetscScalar x,PetscScalar *y)
       break;
     case FN_COMBINE_DIVIDE:
       ierr = FNEvaluateFunction(ctx->f2,x,&b);CHKERRQ(ierr);
+      if (b==0.0) SETERRQ(PETSC_COMM_SELF,1,"Function not defined in the requested value");
       *y = a/b;
       break;
     case FN_COMBINE_COMPOSE:
@@ -92,6 +93,7 @@ PetscErrorCode FNEvaluateDerivative_Combine(FN fn,PetscScalar x,PetscScalar *yp)
       ierr = FNEvaluateDerivative(ctx->f2,x,&bp);CHKERRQ(ierr);
       ierr = FNEvaluateFunction(ctx->f1,x,&a);CHKERRQ(ierr);
       ierr = FNEvaluateFunction(ctx->f2,x,&b);CHKERRQ(ierr);
+      if (b==0.0) SETERRQ(PETSC_COMM_SELF,1,"Derivative not defined in the requested value");
       *yp = (ap*b-a*bp)/(b*b);
       break;
     case FN_COMBINE_COMPOSE:
@@ -120,7 +122,7 @@ PetscErrorCode FNEvaluateFunctionMat_Combine(FN fn,Mat A,Mat B)
   Mat            W,Z;
 
   PetscFunctionBegin;
-  ierr = MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&W);CHKERRQ(ierr);
+  ierr = FN_AllocateWorkMat(fn,A,&W);CHKERRQ(ierr);
   ierr = MatDenseGetArray(A,&Aa);CHKERRQ(ierr);
   ierr = MatDenseGetArray(B,&Ba);CHKERRQ(ierr);
   ierr = MatDenseGetArray(W,&Wa);CHKERRQ(ierr);
@@ -136,17 +138,17 @@ PetscErrorCode FNEvaluateFunctionMat_Combine(FN fn,Mat A,Mat B)
       PetscStackCallBLAS("BLASaxpy",BLASaxpy_(&ld2,&one,Wa,&inc,Ba,&inc));
       break;
     case FN_COMBINE_MULTIPLY:
-      ierr = MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&Z);CHKERRQ(ierr);
+      ierr = FN_AllocateWorkMat(fn,A,&Z);CHKERRQ(ierr);
       ierr = MatDenseGetArray(Z,&Za);CHKERRQ(ierr);
       ierr = FNEvaluateFunctionMat(ctx->f1,A,W);CHKERRQ(ierr);
       ierr = FNEvaluateFunctionMat(ctx->f2,A,Z);CHKERRQ(ierr);
       PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n,&n,&n,&one,Wa,&ld,Za,&ld,&zero,Ba,&ld));
       ierr = MatDenseRestoreArray(Z,&Za);CHKERRQ(ierr);
-      ierr = MatDestroy(&Z);CHKERRQ(ierr);
+      ierr = FN_FreeWorkMat(fn,&Z);CHKERRQ(ierr);
       break;
     case FN_COMBINE_DIVIDE:
-      ierr = FNEvaluateFunctionMat(ctx->f1,A,B);CHKERRQ(ierr);
       ierr = FNEvaluateFunctionMat(ctx->f2,A,W);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMat(ctx->f1,A,B);CHKERRQ(ierr);
       ierr = PetscMalloc1(ld,&ipiv);CHKERRQ(ierr);
       PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&n,&n,Wa,&ld,ipiv,Ba,&ld,&info));
       if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESV %d",info);
@@ -161,7 +163,72 @@ PetscErrorCode FNEvaluateFunctionMat_Combine(FN fn,Mat A,Mat B)
   ierr = MatDenseRestoreArray(A,&Aa);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(B,&Ba);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(W,&Wa);CHKERRQ(ierr);
-  ierr = MatDestroy(&W);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&W);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec_Combine"
+PetscErrorCode FNEvaluateFunctionMatVec_Combine(FN fn,Mat A,Vec v)
+{
+#if defined(PETSC_MISSING_LAPACK_GESV)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GESV - Lapack routines are unavailable");
+#else
+  PetscErrorCode ierr;
+  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+  PetscScalar    *va,*Za;
+  PetscBLASInt   n,ld,*ipiv,info,one=1;
+  PetscInt       m;
+  Mat            Z;
+  Vec            w;
+
+  PetscFunctionBegin;
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
+  ld = n;
+
+  switch (ctx->comb) {
+    case FN_COMBINE_ADD:
+      ierr = VecDuplicate(v,&w);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMatVec(ctx->f1,A,w);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMatVec(ctx->f2,A,v);CHKERRQ(ierr);
+      ierr = VecAXPY(v,1.0,w);CHKERRQ(ierr);
+      ierr = VecDestroy(&w);CHKERRQ(ierr);
+      break;
+    case FN_COMBINE_MULTIPLY:
+      ierr = VecDuplicate(v,&w);CHKERRQ(ierr);
+      ierr = FN_AllocateWorkMat(fn,A,&Z);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMat(ctx->f1,A,Z);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMatVec(ctx->f2,A,w);CHKERRQ(ierr);
+      ierr = MatMult(Z,w,v);CHKERRQ(ierr);
+      ierr = FN_FreeWorkMat(fn,&Z);CHKERRQ(ierr);
+      ierr = VecDestroy(&w);CHKERRQ(ierr);
+      break;
+    case FN_COMBINE_DIVIDE:
+      ierr = VecDuplicate(v,&w);CHKERRQ(ierr);
+      ierr = FN_AllocateWorkMat(fn,A,&Z);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMat(ctx->f2,A,Z);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMatVec(ctx->f1,A,v);CHKERRQ(ierr);
+      ierr = PetscMalloc1(ld,&ipiv);CHKERRQ(ierr);
+      ierr = MatDenseGetArray(Z,&Za);CHKERRQ(ierr);
+      ierr = VecGetArray(v,&va);CHKERRQ(ierr);
+      PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&n,&one,Za,&ld,ipiv,va,&ld,&info));
+      if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESV %d",info);
+      ierr = VecRestoreArray(v,&va);CHKERRQ(ierr);
+      ierr = MatDenseRestoreArray(Z,&Za);CHKERRQ(ierr);
+      ierr = PetscFree(ipiv);CHKERRQ(ierr);
+      ierr = FN_FreeWorkMat(fn,&Z);CHKERRQ(ierr);
+      ierr = VecDestroy(&w);CHKERRQ(ierr);
+      break;
+    case FN_COMBINE_COMPOSE:
+      ierr = FN_AllocateWorkMat(fn,A,&Z);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMat(ctx->f1,A,Z);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMatVec(ctx->f2,Z,v);CHKERRQ(ierr);
+      ierr = FN_FreeWorkMat(fn,&Z);CHKERRQ(ierr);
+      break;
+  }
   PetscFunctionReturn(0);
 #endif
 }
@@ -288,7 +355,7 @@ static PetscErrorCode FNCombineGetChildren_Combine(FN fn,FNCombineType *comb,FN
 .  fn   - the math function context
 
    Output Parameters:
--  comb - how to combine the functions (addition, multiplication, division or composition)
++  comb - how to combine the functions (addition, multiplication, division or composition)
 .  f1   - first function
 -  f2   - second function
 
@@ -302,7 +369,7 @@ PetscErrorCode FNCombineGetChildren(FN fn,FNCombineType *comb,FN *f1,FN *f2)
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(fn,FN_CLASSID,1);
-  ierr = PetscTryMethod(fn,"FNCombineGetChildren_C",(FN,FNCombineType*,FN*,FN*),(fn,comb,f1,f2));CHKERRQ(ierr);
+  ierr = PetscUseMethod(fn,"FNCombineGetChildren_C",(FN,FNCombineType*,FN*,FN*),(fn,comb,f1,f2));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -349,12 +416,13 @@ PETSC_EXTERN PetscErrorCode FNCreate_Combine(FN fn)
   ierr = PetscNewLog(fn,&ctx);CHKERRQ(ierr);
   fn->data = (void*)ctx;
 
-  fn->ops->evaluatefunction    = FNEvaluateFunction_Combine;
-  fn->ops->evaluatederivative  = FNEvaluateDerivative_Combine;
-  fn->ops->evaluatefunctionmat = FNEvaluateFunctionMat_Combine;
-  fn->ops->view                = FNView_Combine;
-  fn->ops->duplicate           = FNDuplicate_Combine;
-  fn->ops->destroy             = FNDestroy_Combine;
+  fn->ops->evaluatefunction       = FNEvaluateFunction_Combine;
+  fn->ops->evaluatederivative     = FNEvaluateDerivative_Combine;
+  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Combine;
+  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Combine;
+  fn->ops->view                   = FNView_Combine;
+  fn->ops->duplicate              = FNDuplicate_Combine;
+  fn->ops->destroy                = FNDestroy_Combine;
   ierr = PetscObjectComposeFunction((PetscObject)fn,"FNCombineSetChildren_C",FNCombineSetChildren_Combine);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)fn,"FNCombineGetChildren_C",FNCombineGetChildren_Combine);CHKERRQ(ierr);
   PetscFunctionReturn(0);
diff --git a/src/sys/classes/fn/impls/combine/fncombine.c.html b/src/sys/classes/fn/impls/combine/fncombine.c.html
index 43313db..08b940e 100644
--- a/src/sys/classes/fn/impls/combine/fncombine.c.html
+++ b/src/sys/classes/fn/impls/combine/fncombine.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/combine/fncombine.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:05+00:00">
+<meta name="date" content="2016-05-16T10:31:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/combine/fncombine.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/combine/fncombine.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   A function that is obtained by combining two other functions (either by</font>
 <a name="line3">  3: </a><font color="#B22222">   addition, multiplication, division or composition)</font>
@@ -21,7 +21,7 @@
 
 <a name="line10"> 10: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line11"> 11: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line12"> 12: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line12"> 12: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line14"> 14: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -64,263 +64,326 @@
 <a name="line56"> 56: </a>      <font color="#4169E1">break</font>;
 <a name="line57"> 57: </a>    <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
 <a name="line58"> 58: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,x,&b);
-<a name="line59"> 59: </a>      *y = a/b;
-<a name="line60"> 60: </a>      <font color="#4169E1">break</font>;
-<a name="line61"> 61: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
-<a name="line62"> 62: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,a,y);
-<a name="line63"> 63: </a>      <font color="#4169E1">break</font>;
-<a name="line64"> 64: </a>  }
-<a name="line65"> 65: </a>  <font color="#4169E1">return</font>(0);
-<a name="line66"> 66: </a>}
-
-<a name="line70"> 70: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Combine"></a>PetscErrorCode FNEvaluateDerivative_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *yp)</font></strong>
-<a name="line71"> 71: </a>{
-<a name="line73"> 73: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
-<a name="line74"> 74: </a>  PetscScalar    a,b,ap,bp;
-
-<a name="line77"> 77: </a>  <font color="#4169E1">switch</font> (ctx->comb) {
-<a name="line78"> 78: </a>    <font color="#4169E1">case</font> FN_COMBINE_ADD:
-<a name="line79"> 79: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
-<a name="line80"> 80: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,x,&bp);
-<a name="line81"> 81: </a>      *yp = ap+bp;
-<a name="line82"> 82: </a>      <font color="#4169E1">break</font>;
-<a name="line83"> 83: </a>    <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
-<a name="line84"> 84: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
-<a name="line85"> 85: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,x,&bp);
-<a name="line86"> 86: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f1,x,&a);
-<a name="line87"> 87: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,x,&b);
-<a name="line88"> 88: </a>      *yp = ap*b+a*bp;
-<a name="line89"> 89: </a>      <font color="#4169E1">break</font>;
-<a name="line90"> 90: </a>    <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
-<a name="line91"> 91: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
-<a name="line92"> 92: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,x,&bp);
-<a name="line93"> 93: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f1,x,&a);
-<a name="line94"> 94: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,x,&b);
-<a name="line95"> 95: </a>      *yp = (ap*b-a*bp)/(b*b);
-<a name="line96"> 96: </a>      <font color="#4169E1">break</font>;
-<a name="line97"> 97: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
-<a name="line98"> 98: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f1,x,&a);
-<a name="line99"> 99: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
-<a name="line100">100: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,a,yp);
-<a name="line101">101: </a>      *yp *= ap;
-<a name="line102">102: </a>      <font color="#4169E1">break</font>;
-<a name="line103">103: </a>  }
-<a name="line104">104: </a>  <font color="#4169E1">return</font>(0);
-<a name="line105">105: </a>}
-
-<a name="line109">109: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Combine"></a>PetscErrorCode FNEvaluateFunctionMat_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
-<a name="line110">110: </a>{
-<a name="line111">111: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV)</font>
-<a name="line113">113: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV - Lapack routines are unavailable"</font>);
-<a name="line114">114: </a><font color="#A020F0">#else</font>
-<a name="line116">116: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
-<a name="line117">117: </a>  PetscScalar    *Aa,*Ba,*Wa,*Za,one=1.0,zero=0.0;
-<a name="line118">118: </a>  PetscBLASInt   n,ld,ld2,inc=1,*ipiv,info;
-<a name="line119">119: </a>  PetscInt       m;
-<a name="line120">120: </a>  Mat            W,Z;
-
-<a name="line123">123: </a>  MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&W);
-<a name="line124">124: </a>  MatDenseGetArray(A,&Aa);
-<a name="line125">125: </a>  MatDenseGetArray(B,&Ba);
-<a name="line126">126: </a>  MatDenseGetArray(W,&Wa);
-<a name="line127">127: </a>  MatGetSize(A,&m,NULL);
-<a name="line128">128: </a>  PetscBLASIntCast(m,&n);
-<a name="line129">129: </a>  ld  = n;
-<a name="line130">130: </a>  ld2 = ld*ld;
-
-<a name="line132">132: </a>  <font color="#4169E1">switch</font> (ctx->comb) {
-<a name="line133">133: </a>    <font color="#4169E1">case</font> FN_COMBINE_ADD:
-<a name="line134">134: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,W);
-<a name="line135">135: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,B);
-<a name="line136">136: </a>      PetscStackCallBLAS(<font color="#666666">"BLASaxpy"</font>,BLASaxpy_(&ld2,&one,Wa,&inc,Ba,&inc));
-<a name="line137">137: </a>      <font color="#4169E1">break</font>;
-<a name="line138">138: </a>    <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
-<a name="line139">139: </a>      MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&Z);
-<a name="line140">140: </a>      MatDenseGetArray(Z,&Za);
-<a name="line141">141: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,W);
-<a name="line142">142: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,Z);
-<a name="line143">143: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,Wa,&ld,Za,&ld,&zero,Ba,&ld));
-<a name="line144">144: </a>      MatDenseRestoreArray(Z,&Za);
-<a name="line145">145: </a>      MatDestroy(&Z);
-<a name="line146">146: </a>      <font color="#4169E1">break</font>;
-<a name="line147">147: </a>    <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
-<a name="line148">148: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,B);
-<a name="line149">149: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,W);
-<a name="line150">150: </a>      PetscMalloc1(ld,&ipiv);
-<a name="line151">151: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&n,Wa,&ld,ipiv,Ba,&ld,&info));
-<a name="line152">152: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
-<a name="line153">153: </a>      PetscFree(ipiv);
-<a name="line154">154: </a>      <font color="#4169E1">break</font>;
-<a name="line155">155: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
-<a name="line156">156: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,W);
-<a name="line157">157: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,W,B);
-<a name="line158">158: </a>      <font color="#4169E1">break</font>;
-<a name="line159">159: </a>  }
-
-<a name="line161">161: </a>  MatDenseRestoreArray(A,&Aa);
-<a name="line162">162: </a>  MatDenseRestoreArray(B,&Ba);
-<a name="line163">163: </a>  MatDenseRestoreArray(W,&Wa);
-<a name="line164">164: </a>  MatDestroy(&W);
-<a name="line165">165: </a>  <font color="#4169E1">return</font>(0);
-<a name="line166">166: </a><font color="#A020F0">#endif</font>
-<a name="line167">167: </a>}
-
-<a name="line171">171: </a><strong><font color="#4169E1"><a name="FNView_Combine"></a>PetscErrorCode FNView_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
-<a name="line172">172: </a>{
-<a name="line174">174: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
-<a name="line175">175: </a>  PetscBool      isascii;
-
-<a name="line178">178: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line179">179: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line180">180: </a>    <font color="#4169E1">switch</font> (ctx->comb) {
-<a name="line181">181: </a>      <font color="#4169E1">case</font> FN_COMBINE_ADD:
-<a name="line182">182: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Two added functions f1+f2\n"</font>);
-<a name="line183">183: </a>        <font color="#4169E1">break</font>;
-<a name="line184">184: </a>      <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
-<a name="line185">185: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Two multiplied functions f1*f2\n"</font>);
-<a name="line186">186: </a>        <font color="#4169E1">break</font>;
-<a name="line187">187: </a>      <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
-<a name="line188">188: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  A quotient of two functions f1/f2\n"</font>);
-<a name="line189">189: </a>        <font color="#4169E1">break</font>;
-<a name="line190">190: </a>      <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
-<a name="line191">191: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Two composed functions f2(f1(.))\n"</font>);
-<a name="line192">192: </a>        <font color="#4169E1">break</font>;
-<a name="line193">193: </a>    }
-<a name="line194">194: </a>    PetscViewerASCIIPushTab(viewer);
-<a name="line195">195: </a>    <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(ctx->f1,viewer);
-<a name="line196">196: </a>    <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(ctx->f2,viewer);
-<a name="line197">197: </a>    PetscViewerASCIIPopTab(viewer);
-<a name="line198">198: </a>  }
-<a name="line199">199: </a>  <font color="#4169E1">return</font>(0);
-<a name="line200">200: </a>}
-
-<a name="line204">204: </a><strong><font color="#4169E1"><a name="FNCombineSetChildren_Combine"></a>static PetscErrorCode FNCombineSetChildren_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> f1,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> f2)</font></strong>
-<a name="line205">205: </a>{
-<a name="line207">207: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
-
-<a name="line210">210: </a>  ctx->comb = comb;
-<a name="line211">211: </a>  PetscObjectReference((PetscObject)f1);
-<a name="line212">212: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f1);
-<a name="line213">213: </a>  ctx->f1 = f1;
-<a name="line214">214: </a>  PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f1);
-<a name="line215">215: </a>  PetscObjectReference((PetscObject)f2);
-<a name="line216">216: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f2);
-<a name="line217">217: </a>  ctx->f2 = f2;
-<a name="line218">218: </a>  PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f2);
-<a name="line219">219: </a>  <font color="#4169E1">return</font>(0);
-<a name="line220">220: </a>}
-
-<a name="line224">224: </a><font color="#B22222">/*@</font>
-<a name="line225">225: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a> - Sets the two child functions that constitute this</font>
-<a name="line226">226: </a><font color="#B22222">   combined function, and the way they must be combined.</font>
-
-<a name="line228">228: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line230">230: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line231">231: </a><font color="#B22222">+  fn   - the math function context</font>
-<a name="line232">232: </a><font color="#B22222">.  comb - how to combine the functions (addition, multiplication, division or composition)</font>
-<a name="line233">233: </a><font color="#B22222">.  f1   - first function</font>
-<a name="line234">234: </a><font color="#B22222">-  f2   - second function</font>
-
-<a name="line236">236: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line238">238: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a>()</font>
-<a name="line239">239: </a><font color="#B22222">@*/</font>
-<a name="line240">240: </a><strong><font color="#4169E1"><a name="FNCombineSetChildren"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> f1,<a href="../../../../.. [...]
-<a name="line241">241: </a>{
-
-<a name="line249">249: </a>  PetscTryMethod(fn,<font color="#666666">"FNCombineSetChildren_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>),(fn,comb,f1,f2));
-<a name="line250">250: </a>  <font color="#4169E1">return</font>(0);
-<a name="line251">251: </a>}
-
-<a name="line255">255: </a><strong><font color="#4169E1"><a name="FNCombineGetChildren_Combine"></a>static PetscErrorCode FNCombineGetChildren_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> *comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *f1,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *f2)</font></strong>
-<a name="line256">256: </a>{
-<a name="line258">258: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
-
-<a name="line261">261: </a>  <font color="#4169E1">if</font> (comb) *comb = ctx->comb;
-<a name="line262">262: </a>  <font color="#4169E1">if</font> (f1) {
-<a name="line263">263: </a>    <font color="#4169E1">if</font> (!ctx->f1) {
-<a name="line264">264: </a>      <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PetscObjectComm((PetscObject)fn),&ctx->f1);
-<a name="line265">265: </a>      PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f1);
-<a name="line266">266: </a>    }
-<a name="line267">267: </a>    *f1 = ctx->f1;
-<a name="line268">268: </a>  }
-<a name="line269">269: </a>  <font color="#4169E1">if</font> (f2) {
-<a name="line270">270: </a>    <font color="#4169E1">if</font> (!ctx->f2) {
-<a name="line271">271: </a>      <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PetscObjectComm((PetscObject)fn),&ctx->f2);
-<a name="line272">272: </a>      PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f2);
-<a name="line273">273: </a>    }
-<a name="line274">274: </a>    *f2 = ctx->f2;
-<a name="line275">275: </a>  }
-<a name="line276">276: </a>  <font color="#4169E1">return</font>(0);
-<a name="line277">277: </a>}
-
-<a name="line281">281: </a><font color="#B22222">/*@</font>
-<a name="line282">282: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a> - Gets the two child functions that constitute this</font>
-<a name="line283">283: </a><font color="#B22222">   combined function, and the way they are combined.</font>
-
-<a name="line285">285: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line287">287: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line288">288: </a><font color="#B22222">.  fn   - the math function context</font>
-
-<a name="line290">290: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line291">291: </a><font color="#B22222">-  comb - how to combine the functions (addition, multiplication, division or composition)</font>
-<a name="line292">292: </a><font color="#B22222">.  f1   - first function</font>
-<a name="line293">293: </a><font color="#B22222">-  f2   - second function</font>
-
-<a name="line295">295: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line297">297: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>()</font>
-<a name="line298">298: </a><font color="#B22222">@*/</font>
-<a name="line299">299: </a><strong><font color="#4169E1"><a name="FNCombineGetChildren"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> *comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *f1,<a href="../../../../ [...]
-<a name="line300">300: </a>{
-
-<a name="line305">305: </a>  PetscTryMethod(fn,<font color="#666666">"FNCombineGetChildren_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>*,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>*,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>*),(fn,comb,f1,f2));
-<a name="line306">306: </a>  <font color="#4169E1">return</font>(0);
-<a name="line307">307: </a>}
-
-<a name="line311">311: </a><strong><font color="#4169E1"><a name="FNDuplicate_Combine"></a>PetscErrorCode FNDuplicate_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
-<a name="line312">312: </a>{
-<a name="line314">314: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data,*ctx2;
-
-<a name="line317">317: </a>  PetscNewLog(*newfn,&ctx2);
-<a name="line318">318: </a>  (*newfn)->data = (void*)ctx2;
-<a name="line319">319: </a>  ctx2->comb = ctx->comb;
-<a name="line320">320: </a>  <a href="../../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(ctx->f1,comm,&ctx2->f1);
-<a name="line321">321: </a>  <a href="../../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(ctx->f2,comm,&ctx2->f2);
-<a name="line322">322: </a>  <font color="#4169E1">return</font>(0);
-<a name="line323">323: </a>}
-
-<a name="line327">327: </a><strong><font color="#4169E1"><a name="FNDestroy_Combine"></a>PetscErrorCode FNDestroy_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line328">328: </a>{
-<a name="line330">330: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
-
-<a name="line333">333: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f1);
-<a name="line334">334: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f2);
-<a name="line335">335: </a>  PetscFree(fn->data);
-<a name="line336">336: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineSetChildren_C"</font>,NULL);
-<a name="line337">337: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineGetChildren_C"</font>,NULL);
-<a name="line338">338: </a>  <font color="#4169E1">return</font>(0);
-<a name="line339">339: </a>}
-
-<a name="line343">343: </a><strong><font color="#4169E1"><a name="FNCreate_Combine"></a>PETSC_EXTERN PetscErrorCode FNCreate_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line344">344: </a>{
-<a name="line346">346: </a>  FN_COMBINE     *ctx;
-
-<a name="line349">349: </a>  PetscNewLog(fn,&ctx);
-<a name="line350">350: </a>  fn->data = (void*)ctx;
-
-<a name="line352">352: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Combine;
-<a name="line353">353: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Combine;
-<a name="line354">354: </a>  fn->ops->evaluatefunctionmat = FNEvaluateFunctionMat_Combine;
-<a name="line355">355: </a>  fn->ops->view                = FNView_Combine;
-<a name="line356">356: </a>  fn->ops->duplicate           = FNDuplicate_Combine;
-<a name="line357">357: </a>  fn->ops->destroy             = FNDestroy_Combine;
-<a name="line358">358: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineSetChildren_C"</font>,FNCombineSetChildren_Combine);
-<a name="line359">359: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineGetChildren_C"</font>,FNCombineGetChildren_Combine);
-<a name="line360">360: </a>  <font color="#4169E1">return</font>(0);
-<a name="line361">361: </a>}
+<a name="line59"> 59: </a>      <font color="#4169E1">if</font> (b==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Function not defined in the requested value"</font>);
+<a name="line60"> 60: </a>      *y = a/b;
+<a name="line61"> 61: </a>      <font color="#4169E1">break</font>;
+<a name="line62"> 62: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
+<a name="line63"> 63: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,a,y);
+<a name="line64"> 64: </a>      <font color="#4169E1">break</font>;
+<a name="line65"> 65: </a>  }
+<a name="line66"> 66: </a>  <font color="#4169E1">return</font>(0);
+<a name="line67"> 67: </a>}
+
+<a name="line71"> 71: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Combine"></a>PetscErrorCode FNEvaluateDerivative_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *yp)</font></strong>
+<a name="line72"> 72: </a>{
+<a name="line74"> 74: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+<a name="line75"> 75: </a>  PetscScalar    a,b,ap,bp;
+
+<a name="line78"> 78: </a>  <font color="#4169E1">switch</font> (ctx->comb) {
+<a name="line79"> 79: </a>    <font color="#4169E1">case</font> FN_COMBINE_ADD:
+<a name="line80"> 80: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
+<a name="line81"> 81: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,x,&bp);
+<a name="line82"> 82: </a>      *yp = ap+bp;
+<a name="line83"> 83: </a>      <font color="#4169E1">break</font>;
+<a name="line84"> 84: </a>    <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
+<a name="line85"> 85: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
+<a name="line86"> 86: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,x,&bp);
+<a name="line87"> 87: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f1,x,&a);
+<a name="line88"> 88: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,x,&b);
+<a name="line89"> 89: </a>      *yp = ap*b+a*bp;
+<a name="line90"> 90: </a>      <font color="#4169E1">break</font>;
+<a name="line91"> 91: </a>    <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
+<a name="line92"> 92: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
+<a name="line93"> 93: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,x,&bp);
+<a name="line94"> 94: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f1,x,&a);
+<a name="line95"> 95: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f2,x,&b);
+<a name="line96"> 96: </a>      <font color="#4169E1">if</font> (b==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Derivative not defined in the requested value"</font>);
+<a name="line97"> 97: </a>      *yp = (ap*b-a*bp)/(b*b);
+<a name="line98"> 98: </a>      <font color="#4169E1">break</font>;
+<a name="line99"> 99: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
+<a name="line100">100: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(ctx->f1,x,&a);
+<a name="line101">101: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f1,x,&ap);
+<a name="line102">102: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(ctx->f2,a,yp);
+<a name="line103">103: </a>      *yp *= ap;
+<a name="line104">104: </a>      <font color="#4169E1">break</font>;
+<a name="line105">105: </a>  }
+<a name="line106">106: </a>  <font color="#4169E1">return</font>(0);
+<a name="line107">107: </a>}
+
+<a name="line111">111: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Combine"></a>PetscErrorCode FNEvaluateFunctionMat_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
+<a name="line112">112: </a>{
+<a name="line113">113: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV)</font>
+<a name="line115">115: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV - Lapack routines are unavailable"</font>);
+<a name="line116">116: </a><font color="#A020F0">#else</font>
+<a name="line118">118: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+<a name="line119">119: </a>  PetscScalar    *Aa,*Ba,*Wa,*Za,one=1.0,zero=0.0;
+<a name="line120">120: </a>  PetscBLASInt   n,ld,ld2,inc=1,*ipiv,info;
+<a name="line121">121: </a>  PetscInt       m;
+<a name="line122">122: </a>  Mat            W,Z;
+
+<a name="line125">125: </a>  FN_AllocateWorkMat(fn,A,&W);
+<a name="line126">126: </a>  MatDenseGetArray(A,&Aa);
+<a name="line127">127: </a>  MatDenseGetArray(B,&Ba);
+<a name="line128">128: </a>  MatDenseGetArray(W,&Wa);
+<a name="line129">129: </a>  MatGetSize(A,&m,NULL);
+<a name="line130">130: </a>  PetscBLASIntCast(m,&n);
+<a name="line131">131: </a>  ld  = n;
+<a name="line132">132: </a>  ld2 = ld*ld;
+
+<a name="line134">134: </a>  <font color="#4169E1">switch</font> (ctx->comb) {
+<a name="line135">135: </a>    <font color="#4169E1">case</font> FN_COMBINE_ADD:
+<a name="line136">136: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,W);
+<a name="line137">137: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,B);
+<a name="line138">138: </a>      PetscStackCallBLAS(<font color="#666666">"BLASaxpy"</font>,BLASaxpy_(&ld2,&one,Wa,&inc,Ba,&inc));
+<a name="line139">139: </a>      <font color="#4169E1">break</font>;
+<a name="line140">140: </a>    <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
+<a name="line141">141: </a>      FN_AllocateWorkMat(fn,A,&Z);
+<a name="line142">142: </a>      MatDenseGetArray(Z,&Za);
+<a name="line143">143: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,W);
+<a name="line144">144: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,Z);
+<a name="line145">145: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,Wa,&ld,Za,&ld,&zero,Ba,&ld));
+<a name="line146">146: </a>      MatDenseRestoreArray(Z,&Za);
+<a name="line147">147: </a>      FN_FreeWorkMat(fn,&Z);
+<a name="line148">148: </a>      <font color="#4169E1">break</font>;
+<a name="line149">149: </a>    <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
+<a name="line150">150: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,W);
+<a name="line151">151: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,B);
+<a name="line152">152: </a>      PetscMalloc1(ld,&ipiv);
+<a name="line153">153: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&n,Wa,&ld,ipiv,Ba,&ld,&info));
+<a name="line154">154: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
+<a name="line155">155: </a>      PetscFree(ipiv);
+<a name="line156">156: </a>      <font color="#4169E1">break</font>;
+<a name="line157">157: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
+<a name="line158">158: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,W);
+<a name="line159">159: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,W,B);
+<a name="line160">160: </a>      <font color="#4169E1">break</font>;
+<a name="line161">161: </a>  }
+
+<a name="line163">163: </a>  MatDenseRestoreArray(A,&Aa);
+<a name="line164">164: </a>  MatDenseRestoreArray(B,&Ba);
+<a name="line165">165: </a>  MatDenseRestoreArray(W,&Wa);
+<a name="line166">166: </a>  FN_FreeWorkMat(fn,&W);
+<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
+<a name="line168">168: </a><font color="#A020F0">#endif</font>
+<a name="line169">169: </a>}
+
+<a name="line173">173: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec_Combine"></a>PetscErrorCode FNEvaluateFunctionMatVec_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line174">174: </a>{
+<a name="line175">175: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV)</font>
+<a name="line177">177: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV - Lapack routines are unavailable"</font>);
+<a name="line178">178: </a><font color="#A020F0">#else</font>
+<a name="line180">180: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+<a name="line181">181: </a>  PetscScalar    *va,*Za;
+<a name="line182">182: </a>  PetscBLASInt   n,ld,*ipiv,info,one=1;
+<a name="line183">183: </a>  PetscInt       m;
+<a name="line184">184: </a>  Mat            Z;
+<a name="line185">185: </a>  Vec            w;
+
+<a name="line188">188: </a>  MatGetSize(A,&m,NULL);
+<a name="line189">189: </a>  PetscBLASIntCast(m,&n);
+<a name="line190">190: </a>  ld = n;
+
+<a name="line192">192: </a>  <font color="#4169E1">switch</font> (ctx->comb) {
+<a name="line193">193: </a>    <font color="#4169E1">case</font> FN_COMBINE_ADD:
+<a name="line194">194: </a>      VecDuplicate(v,&w);
+<a name="line195">195: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(ctx->f1,A,w);
+<a name="line196">196: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(ctx->f2,A,v);
+<a name="line197">197: </a>      VecAXPY(v,1.0,w);
+<a name="line198">198: </a>      VecDestroy(&w);
+<a name="line199">199: </a>      <font color="#4169E1">break</font>;
+<a name="line200">200: </a>    <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
+<a name="line201">201: </a>      VecDuplicate(v,&w);
+<a name="line202">202: </a>      FN_AllocateWorkMat(fn,A,&Z);
+<a name="line203">203: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,Z);
+<a name="line204">204: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(ctx->f2,A,w);
+<a name="line205">205: </a>      MatMult(Z,w,v);
+<a name="line206">206: </a>      FN_FreeWorkMat(fn,&Z);
+<a name="line207">207: </a>      VecDestroy(&w);
+<a name="line208">208: </a>      <font color="#4169E1">break</font>;
+<a name="line209">209: </a>    <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
+<a name="line210">210: </a>      VecDuplicate(v,&w);
+<a name="line211">211: </a>      FN_AllocateWorkMat(fn,A,&Z);
+<a name="line212">212: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f2,A,Z);
+<a name="line213">213: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(ctx->f1,A,v);
+<a name="line214">214: </a>      PetscMalloc1(ld,&ipiv);
+<a name="line215">215: </a>      MatDenseGetArray(Z,&Za);
+<a name="line216">216: </a>      VecGetArray(v,&va);
+<a name="line217">217: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&one,Za,&ld,ipiv,va,&ld,&info));
+<a name="line218">218: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
+<a name="line219">219: </a>      VecRestoreArray(v,&va);
+<a name="line220">220: </a>      MatDenseRestoreArray(Z,&Za);
+<a name="line221">221: </a>      PetscFree(ipiv);
+<a name="line222">222: </a>      FN_FreeWorkMat(fn,&Z);
+<a name="line223">223: </a>      VecDestroy(&w);
+<a name="line224">224: </a>      <font color="#4169E1">break</font>;
+<a name="line225">225: </a>    <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
+<a name="line226">226: </a>      FN_AllocateWorkMat(fn,A,&Z);
+<a name="line227">227: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(ctx->f1,A,Z);
+<a name="line228">228: </a>      <a href="../../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(ctx->f2,Z,v);
+<a name="line229">229: </a>      FN_FreeWorkMat(fn,&Z);
+<a name="line230">230: </a>      <font color="#4169E1">break</font>;
+<a name="line231">231: </a>  }
+<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
+<a name="line233">233: </a><font color="#A020F0">#endif</font>
+<a name="line234">234: </a>}
+
+<a name="line238">238: </a><strong><font color="#4169E1"><a name="FNView_Combine"></a>PetscErrorCode FNView_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
+<a name="line239">239: </a>{
+<a name="line241">241: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+<a name="line242">242: </a>  PetscBool      isascii;
+
+<a name="line245">245: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line246">246: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line247">247: </a>    <font color="#4169E1">switch</font> (ctx->comb) {
+<a name="line248">248: </a>      <font color="#4169E1">case</font> FN_COMBINE_ADD:
+<a name="line249">249: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Two added functions f1+f2\n"</font>);
+<a name="line250">250: </a>        <font color="#4169E1">break</font>;
+<a name="line251">251: </a>      <font color="#4169E1">case</font> FN_COMBINE_MULTIPLY:
+<a name="line252">252: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Two multiplied functions f1*f2\n"</font>);
+<a name="line253">253: </a>        <font color="#4169E1">break</font>;
+<a name="line254">254: </a>      <font color="#4169E1">case</font> FN_COMBINE_DIVIDE:
+<a name="line255">255: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  A quotient of two functions f1/f2\n"</font>);
+<a name="line256">256: </a>        <font color="#4169E1">break</font>;
+<a name="line257">257: </a>      <font color="#4169E1">case</font> FN_COMBINE_COMPOSE:
+<a name="line258">258: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Two composed functions f2(f1(.))\n"</font>);
+<a name="line259">259: </a>        <font color="#4169E1">break</font>;
+<a name="line260">260: </a>    }
+<a name="line261">261: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line262">262: </a>    <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(ctx->f1,viewer);
+<a name="line263">263: </a>    <a href="../../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(ctx->f2,viewer);
+<a name="line264">264: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line265">265: </a>  }
+<a name="line266">266: </a>  <font color="#4169E1">return</font>(0);
+<a name="line267">267: </a>}
+
+<a name="line271">271: </a><strong><font color="#4169E1"><a name="FNCombineSetChildren_Combine"></a>static PetscErrorCode FNCombineSetChildren_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> f1,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> f2)</font></strong>
+<a name="line272">272: </a>{
+<a name="line274">274: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+
+<a name="line277">277: </a>  ctx->comb = comb;
+<a name="line278">278: </a>  PetscObjectReference((PetscObject)f1);
+<a name="line279">279: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f1);
+<a name="line280">280: </a>  ctx->f1 = f1;
+<a name="line281">281: </a>  PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f1);
+<a name="line282">282: </a>  PetscObjectReference((PetscObject)f2);
+<a name="line283">283: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f2);
+<a name="line284">284: </a>  ctx->f2 = f2;
+<a name="line285">285: </a>  PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f2);
+<a name="line286">286: </a>  <font color="#4169E1">return</font>(0);
+<a name="line287">287: </a>}
+
+<a name="line291">291: </a><font color="#B22222">/*@</font>
+<a name="line292">292: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a> - Sets the two child functions that constitute this</font>
+<a name="line293">293: </a><font color="#B22222">   combined function, and the way they must be combined.</font>
+
+<a name="line295">295: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line297">297: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line298">298: </a><font color="#B22222">+  fn   - the math function context</font>
+<a name="line299">299: </a><font color="#B22222">.  comb - how to combine the functions (addition, multiplication, division or composition)</font>
+<a name="line300">300: </a><font color="#B22222">.  f1   - first function</font>
+<a name="line301">301: </a><font color="#B22222">-  f2   - second function</font>
+
+<a name="line303">303: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line305">305: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a>()</font>
+<a name="line306">306: </a><font color="#B22222">@*/</font>
+<a name="line307">307: </a><strong><font color="#4169E1"><a name="FNCombineSetChildren"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> f1,<a href="../../../../.. [...]
+<a name="line308">308: </a>{
+
+<a name="line316">316: </a>  PetscTryMethod(fn,<font color="#666666">"FNCombineSetChildren_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>),(fn,comb,f1,f2));
+<a name="line317">317: </a>  <font color="#4169E1">return</font>(0);
+<a name="line318">318: </a>}
+
+<a name="line322">322: </a><strong><font color="#4169E1"><a name="FNCombineGetChildren_Combine"></a>static PetscErrorCode FNCombineGetChildren_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> *comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *f1,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *f2)</font></strong>
+<a name="line323">323: </a>{
+<a name="line325">325: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+
+<a name="line328">328: </a>  <font color="#4169E1">if</font> (comb) *comb = ctx->comb;
+<a name="line329">329: </a>  <font color="#4169E1">if</font> (f1) {
+<a name="line330">330: </a>    <font color="#4169E1">if</font> (!ctx->f1) {
+<a name="line331">331: </a>      <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PetscObjectComm((PetscObject)fn),&ctx->f1);
+<a name="line332">332: </a>      PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f1);
+<a name="line333">333: </a>    }
+<a name="line334">334: </a>    *f1 = ctx->f1;
+<a name="line335">335: </a>  }
+<a name="line336">336: </a>  <font color="#4169E1">if</font> (f2) {
+<a name="line337">337: </a>    <font color="#4169E1">if</font> (!ctx->f2) {
+<a name="line338">338: </a>      <a href="../../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(PetscObjectComm((PetscObject)fn),&ctx->f2);
+<a name="line339">339: </a>      PetscLogObjectParent((PetscObject)fn,(PetscObject)ctx->f2);
+<a name="line340">340: </a>    }
+<a name="line341">341: </a>    *f2 = ctx->f2;
+<a name="line342">342: </a>  }
+<a name="line343">343: </a>  <font color="#4169E1">return</font>(0);
+<a name="line344">344: </a>}
+
+<a name="line348">348: </a><font color="#B22222">/*@</font>
+<a name="line349">349: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a> - Gets the two child functions that constitute this</font>
+<a name="line350">350: </a><font color="#B22222">   combined function, and the way they are combined.</font>
+
+<a name="line352">352: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line354">354: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line355">355: </a><font color="#B22222">.  fn   - the math function context</font>
+
+<a name="line357">357: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line358">358: </a><font color="#B22222">+  comb - how to combine the functions (addition, multiplication, division or composition)</font>
+<a name="line359">359: </a><font color="#B22222">.  f1   - first function</font>
+<a name="line360">360: </a><font color="#B22222">-  f2   - second function</font>
+
+<a name="line362">362: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line364">364: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNCombineSetChildren.html#FNCombineSetChildren">FNCombineSetChildren</a>()</font>
+<a name="line365">365: </a><font color="#B22222">@*/</font>
+<a name="line366">366: </a><strong><font color="#4169E1"><a name="FNCombineGetChildren"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNCombineGetChildren.html#FNCombineGetChildren">FNCombineGetChildren</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a> *comb,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *f1,<a href="../../../../ [...]
+<a name="line367">367: </a>{
+
+<a name="line372">372: </a>  PetscUseMethod(fn,<font color="#666666">"FNCombineGetChildren_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,<a href="../../../../../../docs/manualpages/FN/FNCombineType.html#FNCombineType">FNCombineType</a>*,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>*,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>*),(fn,comb,f1,f2));
+<a name="line373">373: </a>  <font color="#4169E1">return</font>(0);
+<a name="line374">374: </a>}
+
+<a name="line378">378: </a><strong><font color="#4169E1"><a name="FNDuplicate_Combine"></a>PetscErrorCode FNDuplicate_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
+<a name="line379">379: </a>{
+<a name="line381">381: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data,*ctx2;
+
+<a name="line384">384: </a>  PetscNewLog(*newfn,&ctx2);
+<a name="line385">385: </a>  (*newfn)->data = (void*)ctx2;
+<a name="line386">386: </a>  ctx2->comb = ctx->comb;
+<a name="line387">387: </a>  <a href="../../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(ctx->f1,comm,&ctx2->f1);
+<a name="line388">388: </a>  <a href="../../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(ctx->f2,comm,&ctx2->f2);
+<a name="line389">389: </a>  <font color="#4169E1">return</font>(0);
+<a name="line390">390: </a>}
+
+<a name="line394">394: </a><strong><font color="#4169E1"><a name="FNDestroy_Combine"></a>PetscErrorCode FNDestroy_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line395">395: </a>{
+<a name="line397">397: </a>  FN_COMBINE     *ctx = (FN_COMBINE*)fn->data;
+
+<a name="line400">400: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f1);
+<a name="line401">401: </a>  <a href="../../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(&ctx->f2);
+<a name="line402">402: </a>  PetscFree(fn->data);
+<a name="line403">403: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineSetChildren_C"</font>,NULL);
+<a name="line404">404: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineGetChildren_C"</font>,NULL);
+<a name="line405">405: </a>  <font color="#4169E1">return</font>(0);
+<a name="line406">406: </a>}
+
+<a name="line410">410: </a><strong><font color="#4169E1"><a name="FNCreate_Combine"></a>PETSC_EXTERN PetscErrorCode FNCreate_Combine(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line411">411: </a>{
+<a name="line413">413: </a>  FN_COMBINE     *ctx;
+
+<a name="line416">416: </a>  PetscNewLog(fn,&ctx);
+<a name="line417">417: </a>  fn->data = (void*)ctx;
+
+<a name="line419">419: </a>  fn->ops->evaluatefunction       = FNEvaluateFunction_Combine;
+<a name="line420">420: </a>  fn->ops->evaluatederivative     = FNEvaluateDerivative_Combine;
+<a name="line421">421: </a>  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Combine;
+<a name="line422">422: </a>  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Combine;
+<a name="line423">423: </a>  fn->ops->view                   = FNView_Combine;
+<a name="line424">424: </a>  fn->ops->duplicate              = FNDuplicate_Combine;
+<a name="line425">425: </a>  fn->ops->destroy                = FNDestroy_Combine;
+<a name="line426">426: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineSetChildren_C"</font>,FNCombineSetChildren_Combine);
+<a name="line427">427: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNCombineGetChildren_C"</font>,FNCombineGetChildren_Combine);
+<a name="line428">428: </a>  <font color="#4169E1">return</font>(0);
+<a name="line429">429: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/impls/combine/index.html b/src/sys/classes/fn/impls/combine/index.html
index 9b16c6a..d107565 100644
--- a/src/sys/classes/fn/impls/combine/index.html
+++ b/src/sys/classes/fn/impls/combine/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/combine/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/combine/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/impls/combine/makefile b/src/sys/classes/fn/impls/combine/makefile
index 16d27c7..27f6e68 100644
--- a/src/sys/classes/fn/impls/combine/makefile
+++ b/src/sys/classes/fn/impls/combine/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/impls/combine/makefile.html b/src/sys/classes/fn/impls/combine/makefile.html
index a560293..57834e1 100644
--- a/src/sys/classes/fn/impls/combine/makefile.html
+++ b/src/sys/classes/fn/impls/combine/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/combine/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/combine/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/combine/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/impls/exp/fnexp.c b/src/sys/classes/fn/impls/exp/fnexp.c
index 48c0753..0e2c807 100644
--- a/src/sys/classes/fn/impls/exp/fnexp.c
+++ b/src/sys/classes/fn/impls/exp/fnexp.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -164,8 +164,10 @@ PetscErrorCode FNView_Exp(FN fn,PetscViewer viewer)
         ierr = PetscViewerASCIIPrintf(viewer,"  Exponential: %s*exp(x)\n",str);CHKERRQ(ierr);
       } else {
         ierr = PetscViewerASCIIPrintf(viewer,"  Exponential: %s",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
         ierr = SlepcSNPrintfScalar(str,50,fn->alpha,PETSC_TRUE);CHKERRQ(ierr);
         ierr = PetscViewerASCIIPrintf(viewer,"*exp(%s*x)\n",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
       }
     }
   }
diff --git a/src/sys/classes/fn/impls/exp/fnexp.c.html b/src/sys/classes/fn/impls/exp/fnexp.c.html
index bbd6c35..8323ca6 100644
--- a/src/sys/classes/fn/impls/exp/fnexp.c.html
+++ b/src/sys/classes/fn/impls/exp/fnexp.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/exp/fnexp.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/exp/fnexp.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/exp/fnexp.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Exponential function  exp(x)</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -161,22 +161,24 @@
 <a name="line164">164: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Exponential: %s*exp(x)\n"</font>,str);
 <a name="line165">165: </a>      } <font color="#4169E1">else</font> {
 <a name="line166">166: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Exponential: %s"</font>,str);
-<a name="line167">167: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
-<a name="line168">168: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*exp(%s*x)\n"</font>,str);
-<a name="line169">169: </a>      }
-<a name="line170">170: </a>    }
-<a name="line171">171: </a>  }
-<a name="line172">172: </a>  <font color="#4169E1">return</font>(0);
-<a name="line173">173: </a>}
-
-<a name="line177">177: </a><strong><font color="#4169E1"><a name="FNCreate_Exp"></a>PETSC_EXTERN PetscErrorCode FNCreate_Exp(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line178">178: </a>{
-<a name="line180">180: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Exp;
-<a name="line181">181: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Exp;
-<a name="line182">182: </a>  fn->ops->evaluatefunctionmat = FNEvaluateFunctionMat_Exp;
-<a name="line183">183: </a>  fn->ops->view                = FNView_Exp;
-<a name="line184">184: </a>  <font color="#4169E1">return</font>(0);
-<a name="line185">185: </a>}
+<a name="line167">167: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line168">168: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line169">169: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*exp(%s*x)\n"</font>,str);
+<a name="line170">170: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line171">171: </a>      }
+<a name="line172">172: </a>    }
+<a name="line173">173: </a>  }
+<a name="line174">174: </a>  <font color="#4169E1">return</font>(0);
+<a name="line175">175: </a>}
+
+<a name="line179">179: </a><strong><font color="#4169E1"><a name="FNCreate_Exp"></a>PETSC_EXTERN PetscErrorCode FNCreate_Exp(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line180">180: </a>{
+<a name="line182">182: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Exp;
+<a name="line183">183: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Exp;
+<a name="line184">184: </a>  fn->ops->evaluatefunctionmat = FNEvaluateFunctionMat_Exp;
+<a name="line185">185: </a>  fn->ops->view                = FNView_Exp;
+<a name="line186">186: </a>  <font color="#4169E1">return</font>(0);
+<a name="line187">187: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/impls/exp/index.html b/src/sys/classes/fn/impls/exp/index.html
index e2273cd..9824816 100644
--- a/src/sys/classes/fn/impls/exp/index.html
+++ b/src/sys/classes/fn/impls/exp/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/exp/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/exp/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/impls/exp/makefile b/src/sys/classes/fn/impls/exp/makefile
index 1a31a21..3164cf9 100644
--- a/src/sys/classes/fn/impls/exp/makefile
+++ b/src/sys/classes/fn/impls/exp/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/impls/exp/makefile.html b/src/sys/classes/fn/impls/exp/makefile.html
index 830e9f4..a3f50f9 100644
--- a/src/sys/classes/fn/impls/exp/makefile.html
+++ b/src/sys/classes/fn/impls/exp/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/exp/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/exp/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/exp/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/impls/fnutil.c b/src/sys/classes/fn/impls/fnutil.c
new file mode 100644
index 0000000..129c5e3
--- /dev/null
+++ b/src/sys/classes/fn/impls/fnutil.c
@@ -0,0 +1,172 @@
+/*
+   Utility subroutines common to several impls
+
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+#include <slepc/private/fnimpl.h>      /*I "slepcfn.h" I*/
+#include <slepcblaslapack.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "SlepcMatDenseSqrt"
+/*
+   Compute the square root of an upper quasi-triangular matrix T,
+   using Higham's algorithm (LAA 88, 1987). T is overwritten with sqrtm(T).
+ */
+PetscErrorCode SlepcMatDenseSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld)
+{
+#if defined(SLEPC_MISSING_LAPACK_TRSYL)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"TRSYL - Lapack routine unavailable");
+#else
+  PetscScalar  one=1.0,mone=-1.0;
+  PetscReal    done=1.0;
+  PetscBLASInt i,j,si,sj,r,ione=1,info;
+#if !defined(PETSC_USE_COMPLEX)
+  PetscReal    alpha,theta,mu,mu2;
+#endif
+
+  PetscFunctionBegin;
+  for (j=0;j<n;j++) {
+#if defined(PETSC_USE_COMPLEX)
+    sj = 1;
+    T[j+j*ld] = PetscSqrtScalar(T[j+j*ld]);
+#else
+    sj = (j==n-1 || T[j+1+j*ld] == 0.0)? 1: 2;
+    if (sj==1) {
+      if (T[j+j*ld]<0.0) SETERRQ(PETSC_COMM_SELF,1,"Matrix has a real negative eigenvalue, no real primary square root exists");
+      T[j+j*ld] = PetscSqrtReal(T[j+j*ld]);
+    } else {
+      /* square root of 2x2 block */
+      theta = (T[j+j*ld]+T[j+1+(j+1)*ld])/2.0;
+      mu    = (T[j+j*ld]-T[j+1+(j+1)*ld])/2.0;
+      mu2   = -mu*mu-T[j+1+j*ld]*T[j+(j+1)*ld];
+      mu    = PetscSqrtReal(mu2);
+      if (theta>0.0) alpha = PetscSqrtReal((theta+PetscSqrtReal(theta*theta+mu2))/2.0);
+      else alpha = mu/PetscSqrtReal(2.0*(-theta+PetscSqrtReal(theta*theta+mu2)));
+      T[j+j*ld]       /= 2.0*alpha;
+      T[j+1+(j+1)*ld] /= 2.0*alpha;
+      T[j+(j+1)*ld]   /= 2.0*alpha;
+      T[j+1+j*ld]     /= 2.0*alpha;
+      T[j+j*ld]       += alpha-theta/(2.0*alpha);
+      T[j+1+(j+1)*ld] += alpha-theta/(2.0*alpha);
+    }
+#endif
+    for (i=j-1;i>=0;i--) {
+#if defined(PETSC_USE_COMPLEX)
+      si = 1;
+#else
+      si = (i==0 || T[i+(i-1)*ld] == 0.0)? 1: 2;
+      if (si==2) i--;
+#endif
+      /* solve Sylvester equation of order si x sj */
+      r = j-i-si;
+      if (r) PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&si,&sj,&r,&mone,T+i+(i+si)*ld,&ld,T+i+si+j*ld,&ld,&one,T+i+j*ld,&ld));
+      PetscStackCallBLAS("LAPACKtrsyl",LAPACKtrsyl_("N","N",&ione,&si,&sj,T+i+i*ld,&ld,T+j+j*ld,&ld,T+i+j*ld,&ld,&done,&info));
+      if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xTRSYL %d",info);
+    }
+    if (sj==2) j++;
+  }
+  PetscFunctionReturn(0);
+#endif
+}
+
+#define BLOCKSIZE 64
+
+#undef __FUNCT__
+#define __FUNCT__ "SlepcSchurParlettSqrt"
+/*
+   Simplified Schur-Parlett algorithm on an upper quasi-triangular matrix T,
+   particularized for the square root function. T is overwritten with sqrtm(T).
+   If firstonly then only the first column of T will contain relevant values.
+ */
+PetscErrorCode SlepcSchurParlettSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld,PetscBool firstonly)
+{
+#if defined(SLEPC_MISSING_LAPACK_GEES) || defined(SLEPC_MISSING_LAPACK_TRSYL)
+  PetscFunctionBegin;
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"GEES/TRSYL - Lapack routines are unavailable");
+#else
+  PetscErrorCode ierr;
+  PetscBLASInt   i,j,k,r,ione=1,sdim,lwork,*s,*p,info,bs=BLOCKSIZE;
+  PetscScalar    *wr,*W,*Q,*work,one=1.0,zero=0.0,mone=-1.0;
+  PetscInt       m,nblk;
+  PetscReal      done=1.0;
+#if defined(PETSC_USE_COMPLEX)
+  PetscReal      *rwork;
+#else
+  PetscReal      *wi;
+#endif
+
+  PetscFunctionBegin;
+  m     = n;
+  nblk  = (m+bs-1)/bs;
+  lwork = 5*n;
+  k     = firstonly? 1: n;
+
+  /* compute Schur decomposition A*Q = Q*T */
+#if !defined(PETSC_USE_COMPLEX)
+  ierr = PetscMalloc7(m,&wr,m,&wi,m*k,&W,m*m,&Q,lwork,&work,nblk,&s,nblk,&p);CHKERRQ(ierr);
+  PetscStackCallBLAS("LAPACKgees",LAPACKgees_("V","N",NULL,&n,T,&ld,&sdim,wr,wi,Q,&ld,work,&lwork,NULL,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEES %d",info);
+#else
+  ierr = PetscMalloc7(m,&wr,m,&rwork,m*k,&W,m*m,&Q,lwork,&work,nblk,&s,nblk,&p);CHKERRQ(ierr);
+  PetscStackCallBLAS("LAPACKgees",LAPACKgees_("V","N",NULL,&n,T,&ld,&sdim,wr,Q,&ld,work,&lwork,rwork,NULL,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGEES %d",info);
+#endif
+
+  /* determine block sizes and positions, to avoid cutting 2x2 blocks */
+  j = 0;
+  p[j] = 0;
+  do {
+    s[j] = PetscMin(bs,n-p[j]);
+#if !defined(PETSC_USE_COMPLEX)
+    if (p[j]+s[j]!=n && T[p[j]+s[j]+(p[j]+s[j]-1)*ld]!=0.0) s[j]++;
+#endif
+    if (p[j]+s[j]==n) break;
+    j++;
+    p[j] = p[j-1]+s[j-1];
+  } while (1);
+  nblk = j+1;
+
+  for (j=0;j<nblk;j++) {
+    /* evaluate f(T_jj) */
+    ierr = SlepcMatDenseSqrt(s[j],T+p[j]+p[j]*ld,ld);CHKERRQ(ierr);
+    for (i=j-1;i>=0;i--) {
+      /* solve Sylvester equation for block (i,j) */
+      r = p[j]-p[i]-s[i];
+      if (r) PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",s+i,s+j,&r,&mone,T+p[i]+(p[i]+s[i])*ld,&ld,T+p[i]+s[i]+p[j]*ld,&ld,&one,T+p[i]+p[j]*ld,&ld));
+      PetscStackCallBLAS("LAPACKtrsyl",LAPACKtrsyl_("N","N",&ione,s+i,s+j,T+p[i]+p[i]*ld,&ld,T+p[j]+p[j]*ld,&ld,T+p[i]+p[j]*ld,&ld,&done,&info));
+      if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xTRSYL %d",info);
+    }
+  }
+
+  /* backtransform B = Q*T*Q' */
+  PetscStackCallBLAS("BLASgemm",BLASgemm_("N","C",&n,&k,&n,&one,T,&ld,Q,&ld,&zero,W,&ld));
+  PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n,&k,&n,&one,Q,&ld,W,&ld,&zero,T,&ld));
+
+#if !defined(PETSC_USE_COMPLEX)
+  ierr = PetscFree7(wr,wi,W,Q,work,s,p);CHKERRQ(ierr);
+#else
+  ierr = PetscFree7(wr,rwork,W,Q,work,s,p);CHKERRQ(ierr);
+#endif
+  PetscFunctionReturn(0);
+#endif
+}
+
diff --git a/src/sys/classes/fn/impls/fnutil.c.html b/src/sys/classes/fn/impls/fnutil.c.html
new file mode 100644
index 0000000..565538a
--- /dev/null
+++ b/src/sys/classes/fn/impls/fnutil.c.html
@@ -0,0 +1,179 @@
+<center><a href="fnutil.c">Actual source code: fnutil.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/fnutil.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:31:57+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/fnutil.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   Utility subroutines common to several impls</font>
+
+<a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line10"> 10: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line11"> 11: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line12"> 12: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line14"> 14: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line15"> 15: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line16"> 16: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line17"> 17: </a><font color="#B22222">   more details.</font>
+
+<a name="line19"> 19: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line20"> 20: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line21"> 21: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line22"> 22: </a><font color="#B22222">*/</font>
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/fnimpl.h>      </font><font color="#B22222">/*I "slepcfn.h" I*/</font><font color="#A020F0"></font>
+<a name="line25"> 25: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line29"> 29: </a><font color="#B22222">/*</font>
+<a name="line30"> 30: </a><font color="#B22222">   Compute the square root of an upper quasi-triangular matrix T,</font>
+<a name="line31"> 31: </a><font color="#B22222">   using Higham's algorithm (LAA 88, 1987). T is overwritten with sqrtm(T).</font>
+<a name="line32"> 32: </a><font color="#B22222"> */</font>
+<a name="line33"> 33: </a><strong><font color="#4169E1"><a name="SlepcMatDenseSqrt"></a>PetscErrorCode SlepcMatDenseSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld)</font></strong>
+<a name="line34"> 34: </a>{
+<a name="line35"> 35: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_TRSYL)</font>
+<a name="line37"> 37: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"TRSYL - Lapack routine unavailable"</font>);
+<a name="line38"> 38: </a><font color="#A020F0">#else</font>
+<a name="line39"> 39: </a>  PetscScalar  one=1.0,mone=-1.0;
+<a name="line40"> 40: </a>  PetscReal    done=1.0;
+<a name="line41"> 41: </a>  PetscBLASInt i,j,si,sj,r,ione=1,info;
+<a name="line42"> 42: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line43"> 43: </a>  PetscReal    alpha,theta,mu,mu2;
+<a name="line44"> 44: </a><font color="#A020F0">#endif</font>
+
+<a name="line47"> 47: </a>  <font color="#4169E1">for</font> (j=0;j<n;j++) {
+<a name="line48"> 48: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line49"> 49: </a>    sj = 1;
+<a name="line50"> 50: </a>    T[j+j*ld] = PetscSqrtScalar(T[j+j*ld]);
+<a name="line51"> 51: </a><font color="#A020F0">#else</font>
+<a name="line52"> 52: </a>    sj = (j==n-1 || T[j+1+j*ld] == 0.0)? 1: 2;
+<a name="line53"> 53: </a>    <font color="#4169E1">if</font> (sj==1) {
+<a name="line54"> 54: </a>      <font color="#4169E1">if</font> (T[j+j*ld]<0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Matrix has a real negative eigenvalue, no real primary square root exists"</font>);
+<a name="line55"> 55: </a>      T[j+j*ld] = PetscSqrtReal(T[j+j*ld]);
+<a name="line56"> 56: </a>    } <font color="#4169E1">else</font> {
+<a name="line57"> 57: </a>      <font color="#B22222">/* square root of 2x2 block */</font>
+<a name="line58"> 58: </a>      theta = (T[j+j*ld]+T[j+1+(j+1)*ld])/2.0;
+<a name="line59"> 59: </a>      mu    = (T[j+j*ld]-T[j+1+(j+1)*ld])/2.0;
+<a name="line60"> 60: </a>      mu2   = -mu*mu-T[j+1+j*ld]*T[j+(j+1)*ld];
+<a name="line61"> 61: </a>      mu    = PetscSqrtReal(mu2);
+<a name="line62"> 62: </a>      <font color="#4169E1">if</font> (theta>0.0) alpha = PetscSqrtReal((theta+PetscSqrtReal(theta*theta+mu2))/2.0);
+<a name="line63"> 63: </a>      <font color="#4169E1">else</font> alpha = mu/PetscSqrtReal(2.0*(-theta+PetscSqrtReal(theta*theta+mu2)));
+<a name="line64"> 64: </a>      T[j+j*ld]       /= 2.0*alpha;
+<a name="line65"> 65: </a>      T[j+1+(j+1)*ld] /= 2.0*alpha;
+<a name="line66"> 66: </a>      T[j+(j+1)*ld]   /= 2.0*alpha;
+<a name="line67"> 67: </a>      T[j+1+j*ld]     /= 2.0*alpha;
+<a name="line68"> 68: </a>      T[j+j*ld]       += alpha-theta/(2.0*alpha);
+<a name="line69"> 69: </a>      T[j+1+(j+1)*ld] += alpha-theta/(2.0*alpha);
+<a name="line70"> 70: </a>    }
+<a name="line71"> 71: </a><font color="#A020F0">#endif</font>
+<a name="line72"> 72: </a>    <font color="#4169E1">for</font> (i=j-1;i>=0;i--) {
+<a name="line73"> 73: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line74"> 74: </a>      si = 1;
+<a name="line75"> 75: </a><font color="#A020F0">#else</font>
+<a name="line76"> 76: </a>      si = (i==0 || T[i+(i-1)*ld] == 0.0)? 1: 2;
+<a name="line77"> 77: </a>      <font color="#4169E1">if</font> (si==2) i--;
+<a name="line78"> 78: </a><font color="#A020F0">#endif</font>
+<a name="line79"> 79: </a>      <font color="#B22222">/* solve Sylvester equation of order si x sj */</font>
+<a name="line80"> 80: </a>      r = j-i-si;
+<a name="line81"> 81: </a>      <font color="#4169E1">if</font> (r) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&si,&sj,&r,&mone,T+i+(i+si)*ld,&ld,T+i+si+j*ld,&ld,&one,T+i+j*ld,&ld));
+<a name="line82"> 82: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtrsyl"</font>,LAPACKtrsyl_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&ione,&si,&sj,T+i+i*ld,&ld,T+j+j*ld,&ld,T+i+j*ld,&ld,&done,&info));
+<a name="line83"> 83: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTRSYL %d"</font>,info);
+<a name="line84"> 84: </a>    }
+<a name="line85"> 85: </a>    <font color="#4169E1">if</font> (sj==2) j++;
+<a name="line86"> 86: </a>  }
+<a name="line87"> 87: </a>  <font color="#4169E1">return</font>(0);
+<a name="line88"> 88: </a><font color="#A020F0">#endif</font>
+<a name="line89"> 89: </a>}
+
+<a name="line91"> 91: </a><strong><font color="#228B22">#define BLOCKSIZE 64</font></strong>
+
+<a name="line95"> 95: </a><font color="#B22222">/*</font>
+<a name="line96"> 96: </a><font color="#B22222">   Simplified Schur-Parlett algorithm on an upper quasi-triangular matrix T,</font>
+<a name="line97"> 97: </a><font color="#B22222">   particularized for the square root function. T is overwritten with sqrtm(T).</font>
+<a name="line98"> 98: </a><font color="#B22222">   If firstonly then only the first column of T will contain relevant values.</font>
+<a name="line99"> 99: </a><font color="#B22222"> */</font>
+<a name="line100">100: </a><strong><font color="#4169E1"><a name="SlepcSchurParlettSqrt"></a>PetscErrorCode SlepcSchurParlettSqrt(PetscBLASInt n,PetscScalar *T,PetscBLASInt ld,PetscBool firstonly)</font></strong>
+<a name="line101">101: </a>{
+<a name="line102">102: </a><font color="#A020F0">#if defined(SLEPC_MISSING_LAPACK_GEES) || defined(SLEPC_MISSING_LAPACK_TRSYL)</font>
+<a name="line104">104: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GEES/TRSYL - Lapack routines are unavailable"</font>);
+<a name="line105">105: </a><font color="#A020F0">#else</font>
+<a name="line107">107: </a>  PetscBLASInt   i,j,k,r,ione=1,sdim,lwork,*s,*p,info,bs=BLOCKSIZE;
+<a name="line108">108: </a>  PetscScalar    *wr,*W,*Q,*work,one=1.0,zero=0.0,mone=-1.0;
+<a name="line109">109: </a>  PetscInt       m,nblk;
+<a name="line110">110: </a>  PetscReal      done=1.0;
+<a name="line111">111: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line112">112: </a>  PetscReal      *rwork;
+<a name="line113">113: </a><font color="#A020F0">#else</font>
+<a name="line114">114: </a>  PetscReal      *wi;
+<a name="line115">115: </a><font color="#A020F0">#endif</font>
+
+<a name="line118">118: </a>  m     = n;
+<a name="line119">119: </a>  nblk  = (m+bs-1)/bs;
+<a name="line120">120: </a>  lwork = 5*n;
+<a name="line121">121: </a>  k     = firstonly? 1: n;
+
+<a name="line123">123: </a>  <font color="#B22222">/* compute Schur decomposition A*Q = Q*T */</font>
+<a name="line124">124: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line125">125: </a>  PetscMalloc7(m,&wr,m,&wi,m*k,&W,m*m,&Q,lwork,&work,nblk,&s,nblk,&p);
+<a name="line126">126: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgees"</font>,LAPACKgees_(<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,T,&ld,&sdim,wr,wi,Q,&ld,work,&lwork,NULL,&info));
+<a name="line127">127: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEES %d"</font>,info);
+<a name="line128">128: </a><font color="#A020F0">#else</font>
+<a name="line129">129: </a>  PetscMalloc7(m,&wr,m,&rwork,m*k,&W,m*m,&Q,lwork,&work,nblk,&s,nblk,&p);
+<a name="line130">130: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgees"</font>,LAPACKgees_(<font color="#666666">"V"</font>,<font color="#666666">"N"</font>,NULL,&n,T,&ld,&sdim,wr,Q,&ld,work,&lwork,rwork,NULL,&info));
+<a name="line131">131: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGEES %d"</font>,info);
+<a name="line132">132: </a><font color="#A020F0">#endif</font>
+
+<a name="line134">134: </a>  <font color="#B22222">/* determine block sizes and positions, to avoid cutting 2x2 blocks */</font>
+<a name="line135">135: </a>  j = 0;
+<a name="line136">136: </a>  p[j] = 0;
+<a name="line137">137: </a>  <font color="#4169E1">do</font> {
+<a name="line138">138: </a>    s[j] = PetscMin(bs,n-p[j]);
+<a name="line139">139: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line140">140: </a>    <font color="#4169E1">if</font> (p[j]+s[j]!=n && T[p[j]+s[j]+(p[j]+s[j]-1)*ld]!=0.0) s[j]++;
+<a name="line141">141: </a><font color="#A020F0">#endif</font>
+<a name="line142">142: </a>    <font color="#4169E1">if</font> (p[j]+s[j]==n) <font color="#4169E1">break</font>;
+<a name="line143">143: </a>    j++;
+<a name="line144">144: </a>    p[j] = p[j-1]+s[j-1];
+<a name="line145">145: </a>  } <font color="#4169E1">while</font> (1);
+<a name="line146">146: </a>  nblk = j+1;
+
+<a name="line148">148: </a>  <font color="#4169E1">for</font> (j=0;j<nblk;j++) {
+<a name="line149">149: </a>    <font color="#B22222">/* evaluate f(T_jj) */</font>
+<a name="line150">150: </a>    SlepcMatDenseSqrt(s[j],T+p[j]+p[j]*ld,ld);
+<a name="line151">151: </a>    <font color="#4169E1">for</font> (i=j-1;i>=0;i--) {
+<a name="line152">152: </a>      <font color="#B22222">/* solve Sylvester equation for block (i,j) */</font>
+<a name="line153">153: </a>      r = p[j]-p[i]-s[i];
+<a name="line154">154: </a>      <font color="#4169E1">if</font> (r) PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,s+i,s+j,&r,&mone,T+p[i]+(p[i]+s[i])*ld,&ld,T+p[i]+s[i]+p[j]*ld,&ld,&one,T+p[i]+p[j]*ld,&ld));
+<a name="line155">155: </a>      PetscStackCallBLAS(<font color="#666666">"LAPACKtrsyl"</font>,LAPACKtrsyl_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&ione,s+i,s+j,T+p[i]+p[i]*ld,&ld,T+p[j]+p[j]*ld,&ld,T+p[i]+p[j]*ld,&ld,&done,&info));
+<a name="line156">156: </a>      <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xTRSYL %d"</font>,info);
+<a name="line157">157: </a>    }
+<a name="line158">158: </a>  }
+
+<a name="line160">160: </a>  <font color="#B22222">/* backtransform B = Q*T*Q' */</font>
+<a name="line161">161: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"C"</font>,&n,&k,&n,&one,T,&ld,Q,&ld,&zero,W,&ld));
+<a name="line162">162: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&k,&n,&one,Q,&ld,W,&ld,&zero,T,&ld));
+
+<a name="line164">164: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line165">165: </a>  PetscFree7(wr,wi,W,Q,work,s,p);
+<a name="line166">166: </a><font color="#A020F0">#else</font>
+<a name="line167">167: </a>  PetscFree7(wr,rwork,W,Q,work,s,p);
+<a name="line168">168: </a><font color="#A020F0">#endif</font>
+<a name="line169">169: </a>  <font color="#4169E1">return</font>(0);
+<a name="line170">170: </a><font color="#A020F0">#endif</font>
+<a name="line171">171: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/fn/impls/index.html b/src/sys/classes/fn/impls/index.html
index 9510bcc..67f392b 100644
--- a/src/sys/classes/fn/impls/index.html
+++ b/src/sys/classes/fn/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
@@ -21,6 +21,8 @@ The FN package provides the functionality to represent a simple mathematical fun
 <a href="phi/">phi/</a><br>
 <a href="rational/">rational/</a><br>
 <a href="sqrt/">sqrt/</a><br>
+<a href="invsqrt/">invsqrt/</a><br>
  
+<a href="fnutil.c.html">fnutil.c</a><br>
  
 <a href="makefile.html">makefile</a><br>
diff --git a/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c b/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c
new file mode 100644
index 0000000..10e1cd2
--- /dev/null
+++ b/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c
@@ -0,0 +1,157 @@
+/*
+   Inverse square root function  x^(-1/2)
+
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+#include <slepc/private/fnimpl.h>      /*I "slepcfn.h" I*/
+#include <slepcblaslapack.h>
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunction_Invsqrt"
+PetscErrorCode FNEvaluateFunction_Invsqrt(FN fn,PetscScalar x,PetscScalar *y)
+{
+  PetscFunctionBegin;
+  if (x==0.0) SETERRQ(PETSC_COMM_SELF,1,"Function not defined in the requested value");
+  *y = 1.0/PetscSqrtScalar(x);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateDerivative_Invsqrt"
+PetscErrorCode FNEvaluateDerivative_Invsqrt(FN fn,PetscScalar x,PetscScalar *y)
+{
+  PetscFunctionBegin;
+  if (x==0.0) SETERRQ(PETSC_COMM_SELF,1,"Derivative not defined in the requested value");
+  *y = -1.0/(2.0*PetscPowScalarReal(x,1.5));
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMat_Invsqrt"
+PetscErrorCode FNEvaluateFunctionMat_Invsqrt(FN fn,Mat A,Mat B)
+{
+  PetscErrorCode ierr;
+  PetscBLASInt   n,ld,*ipiv,info;
+  PetscScalar    *Ba,*Wa;
+  PetscInt       m;
+  Mat            W;
+
+  PetscFunctionBegin;
+  ierr = FN_AllocateWorkMat(fn,A,&W);CHKERRQ(ierr);
+  if (A!=B) { ierr = MatCopy(A,B,SAME_NONZERO_PATTERN);CHKERRQ(ierr); }
+  ierr = MatDenseGetArray(B,&Ba);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(W,&Wa);CHKERRQ(ierr);
+  /* compute B = sqrtm(A) */
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
+  ld = n;
+  ierr = SlepcSchurParlettSqrt(n,Ba,n,PETSC_FALSE);CHKERRQ(ierr);
+  /* compute B = A\B */
+  ierr = PetscMalloc1(ld,&ipiv);CHKERRQ(ierr);
+  PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&n,&n,Wa,&ld,ipiv,Ba,&ld,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESV %d",info);
+  ierr = PetscFree(ipiv);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(W,&Wa);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(B,&Ba);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&W);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec_Invsqrt"
+PetscErrorCode FNEvaluateFunctionMatVec_Invsqrt(FN fn,Mat A,Vec v)
+{
+  PetscErrorCode ierr;
+  PetscBLASInt   n,ld,*ipiv,info,one=1;
+  PetscScalar    *Ba,*Wa;
+  PetscInt       m;
+  Mat            B,W;
+
+  PetscFunctionBegin;
+  ierr = FN_AllocateWorkMat(fn,A,&B);CHKERRQ(ierr);
+  ierr = FN_AllocateWorkMat(fn,A,&W);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(B,&Ba);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(W,&Wa);CHKERRQ(ierr);
+  /* compute B_1 = sqrtm(A)*e_1 */
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
+  ld = n;
+  ierr = SlepcSchurParlettSqrt(n,Ba,n,PETSC_TRUE);CHKERRQ(ierr);
+  /* compute B_1 = A\B_1 */
+  ierr = PetscMalloc1(ld,&ipiv);CHKERRQ(ierr);
+  PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&n,&one,Wa,&ld,ipiv,Ba,&ld,&info));
+  if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESV %d",info);
+  ierr = PetscFree(ipiv);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(W,&Wa);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(B,&Ba);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(B,v,0);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&W);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&B);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNView_Invsqrt"
+PetscErrorCode FNView_Invsqrt(FN fn,PetscViewer viewer)
+{
+  PetscErrorCode ierr;
+  PetscBool      isascii;
+  char           str[50];
+
+  PetscFunctionBegin;
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    if (fn->beta==(PetscScalar)1.0) {
+      if (fn->alpha==(PetscScalar)1.0) {
+        ierr = PetscViewerASCIIPrintf(viewer,"  Inverse square root: x^(-1/2)\n");CHKERRQ(ierr);
+      } else {
+        ierr = SlepcSNPrintfScalar(str,50,fn->alpha,PETSC_TRUE);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIPrintf(viewer,"  Inverse square root: (%s*x)^(-1/2)\n",str);CHKERRQ(ierr);
+      }
+    } else {
+      ierr = SlepcSNPrintfScalar(str,50,fn->beta,PETSC_TRUE);CHKERRQ(ierr);
+      if (fn->alpha==(PetscScalar)1.0) {
+        ierr = PetscViewerASCIIPrintf(viewer,"  Inverse square root: %s*x^(-1/2)\n",str);CHKERRQ(ierr);
+      } else {
+        ierr = PetscViewerASCIIPrintf(viewer,"  Inverse square root: %s",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
+        ierr = SlepcSNPrintfScalar(str,50,fn->alpha,PETSC_TRUE);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIPrintf(viewer,"*(%s*x)^(-1/2)\n",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
+      }
+    }
+  }
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNCreate_Invsqrt"
+PETSC_EXTERN PetscErrorCode FNCreate_Invsqrt(FN fn)
+{
+  PetscFunctionBegin;
+  fn->ops->evaluatefunction       = FNEvaluateFunction_Invsqrt;
+  fn->ops->evaluatederivative     = FNEvaluateDerivative_Invsqrt;
+  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Invsqrt;
+  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Invsqrt;
+  fn->ops->view                   = FNView_Invsqrt;
+  PetscFunctionReturn(0);
+}
+
diff --git a/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c.html b/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c.html
new file mode 100644
index 0000000..b48870b
--- /dev/null
+++ b/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c.html
@@ -0,0 +1,152 @@
+<center><a href="fninvsqrt.c">Actual source code: fninvsqrt.c</a></center><br>
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/invsqrt/fninvsqrt.c.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/invsqrt/fninvsqrt.c.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
+<a name="line2">  2: </a><font color="#B22222">   Inverse square root function  x^(-1/2)</font>
+
+<a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+
+<a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
+
+<a name="line10"> 10: </a><font color="#B22222">   SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<a name="line11"> 11: </a><font color="#B22222">   terms of version 3 of the GNU Lesser General Public License as published by</font>
+<a name="line12"> 12: </a><font color="#B22222">   the Free Software Foundation.</font>
+
+<a name="line14"> 14: </a><font color="#B22222">   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<a name="line15"> 15: </a><font color="#B22222">   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<a name="line16"> 16: </a><font color="#B22222">   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<a name="line17"> 17: </a><font color="#B22222">   more details.</font>
+
+<a name="line19"> 19: </a><font color="#B22222">   You  should have received a copy of the GNU Lesser General  Public  License</font>
+<a name="line20"> 20: </a><font color="#B22222">   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<a name="line21"> 21: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<a name="line22"> 22: </a><font color="#B22222">*/</font>
+
+<a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/fnimpl.h>      </font><font color="#B22222">/*I "slepcfn.h" I*/</font><font color="#A020F0"></font>
+<a name="line25"> 25: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
+
+<a name="line29"> 29: </a><strong><font color="#4169E1"><a name="FNEvaluateFunction_Invsqrt"></a>PetscErrorCode FNEvaluateFunction_Invsqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
+<a name="line30"> 30: </a>{
+<a name="line32"> 32: </a>  <font color="#4169E1">if</font> (x==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Function not defined in the requested value"</font>);
+<a name="line33"> 33: </a>  *y = 1.0/PetscSqrtScalar(x);
+<a name="line34"> 34: </a>  <font color="#4169E1">return</font>(0);
+<a name="line35"> 35: </a>}
+
+<a name="line39"> 39: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Invsqrt"></a>PetscErrorCode FNEvaluateDerivative_Invsqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
+<a name="line40"> 40: </a>{
+<a name="line42"> 42: </a>  <font color="#4169E1">if</font> (x==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Derivative not defined in the requested value"</font>);
+<a name="line43"> 43: </a>  *y = -1.0/(2.0*PetscPowScalarReal(x,1.5));
+<a name="line44"> 44: </a>  <font color="#4169E1">return</font>(0);
+<a name="line45"> 45: </a>}
+
+<a name="line49"> 49: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Invsqrt"></a>PetscErrorCode FNEvaluateFunctionMat_Invsqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
+<a name="line50"> 50: </a>{
+<a name="line52"> 52: </a>  PetscBLASInt   n,ld,*ipiv,info;
+<a name="line53"> 53: </a>  PetscScalar    *Ba,*Wa;
+<a name="line54"> 54: </a>  PetscInt       m;
+<a name="line55"> 55: </a>  Mat            W;
+
+<a name="line58"> 58: </a>  FN_AllocateWorkMat(fn,A,&W);
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (A!=B) { MatCopy(A,B,SAME_NONZERO_PATTERN); }
+<a name="line60"> 60: </a>  MatDenseGetArray(B,&Ba);
+<a name="line61"> 61: </a>  MatDenseGetArray(W,&Wa);
+<a name="line62"> 62: </a>  <font color="#B22222">/* compute B = sqrtm(A) */</font>
+<a name="line63"> 63: </a>  MatGetSize(A,&m,NULL);
+<a name="line64"> 64: </a>  PetscBLASIntCast(m,&n);
+<a name="line65"> 65: </a>  ld = n;
+<a name="line66"> 66: </a>  SlepcSchurParlettSqrt(n,Ba,n,PETSC_FALSE);
+<a name="line67"> 67: </a>  <font color="#B22222">/* compute B = A\B */</font>
+<a name="line68"> 68: </a>  PetscMalloc1(ld,&ipiv);
+<a name="line69"> 69: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&n,Wa,&ld,ipiv,Ba,&ld,&info));
+<a name="line70"> 70: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
+<a name="line71"> 71: </a>  PetscFree(ipiv);
+<a name="line72"> 72: </a>  MatDenseRestoreArray(W,&Wa);
+<a name="line73"> 73: </a>  MatDenseRestoreArray(B,&Ba);
+<a name="line74"> 74: </a>  FN_FreeWorkMat(fn,&W);
+<a name="line75"> 75: </a>  <font color="#4169E1">return</font>(0);
+<a name="line76"> 76: </a>}
+
+<a name="line80"> 80: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec_Invsqrt"></a>PetscErrorCode FNEvaluateFunctionMatVec_Invsqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line81"> 81: </a>{
+<a name="line83"> 83: </a>  PetscBLASInt   n,ld,*ipiv,info,one=1;
+<a name="line84"> 84: </a>  PetscScalar    *Ba,*Wa;
+<a name="line85"> 85: </a>  PetscInt       m;
+<a name="line86"> 86: </a>  Mat            B,W;
+
+<a name="line89"> 89: </a>  FN_AllocateWorkMat(fn,A,&B);
+<a name="line90"> 90: </a>  FN_AllocateWorkMat(fn,A,&W);
+<a name="line91"> 91: </a>  MatDenseGetArray(B,&Ba);
+<a name="line92"> 92: </a>  MatDenseGetArray(W,&Wa);
+<a name="line93"> 93: </a>  <font color="#B22222">/* compute B_1 = sqrtm(A)*e_1 */</font>
+<a name="line94"> 94: </a>  MatGetSize(A,&m,NULL);
+<a name="line95"> 95: </a>  PetscBLASIntCast(m,&n);
+<a name="line96"> 96: </a>  ld = n;
+<a name="line97"> 97: </a>  SlepcSchurParlettSqrt(n,Ba,n,PETSC_TRUE);
+<a name="line98"> 98: </a>  <font color="#B22222">/* compute B_1 = A\B_1 */</font>
+<a name="line99"> 99: </a>  PetscMalloc1(ld,&ipiv);
+<a name="line100">100: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&one,Wa,&ld,ipiv,Ba,&ld,&info));
+<a name="line101">101: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
+<a name="line102">102: </a>  PetscFree(ipiv);
+<a name="line103">103: </a>  MatDenseRestoreArray(W,&Wa);
+<a name="line104">104: </a>  MatDenseRestoreArray(B,&Ba);
+<a name="line105">105: </a>  MatGetColumnVector(B,v,0);
+<a name="line106">106: </a>  FN_FreeWorkMat(fn,&W);
+<a name="line107">107: </a>  FN_FreeWorkMat(fn,&B);
+<a name="line108">108: </a>  <font color="#4169E1">return</font>(0);
+<a name="line109">109: </a>}
+
+<a name="line113">113: </a><strong><font color="#4169E1"><a name="FNView_Invsqrt"></a>PetscErrorCode FNView_Invsqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
+<a name="line114">114: </a>{
+<a name="line116">116: </a>  PetscBool      isascii;
+<a name="line117">117: </a>  char           str[50];
+
+<a name="line120">120: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line121">121: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line122">122: </a>    <font color="#4169E1">if</font> (fn->beta==(PetscScalar)1.0) {
+<a name="line123">123: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line124">124: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Inverse square root: x^(-1/2)\n"</font>);
+<a name="line125">125: </a>      } <font color="#4169E1">else</font> {
+<a name="line126">126: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line127">127: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Inverse square root: (%s*x)^(-1/2)\n"</font>,str);
+<a name="line128">128: </a>      }
+<a name="line129">129: </a>    } <font color="#4169E1">else</font> {
+<a name="line130">130: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
+<a name="line131">131: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line132">132: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Inverse square root: %s*x^(-1/2)\n"</font>,str);
+<a name="line133">133: </a>      } <font color="#4169E1">else</font> {
+<a name="line134">134: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Inverse square root: %s"</font>,str);
+<a name="line135">135: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line136">136: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line137">137: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*(%s*x)^(-1/2)\n"</font>,str);
+<a name="line138">138: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line139">139: </a>      }
+<a name="line140">140: </a>    }
+<a name="line141">141: </a>  }
+<a name="line142">142: </a>  <font color="#4169E1">return</font>(0);
+<a name="line143">143: </a>}
+
+<a name="line147">147: </a><strong><font color="#4169E1"><a name="FNCreate_Invsqrt"></a>PETSC_EXTERN PetscErrorCode FNCreate_Invsqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line148">148: </a>{
+<a name="line150">150: </a>  fn->ops->evaluatefunction       = FNEvaluateFunction_Invsqrt;
+<a name="line151">151: </a>  fn->ops->evaluatederivative     = FNEvaluateDerivative_Invsqrt;
+<a name="line152">152: </a>  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Invsqrt;
+<a name="line153">153: </a>  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Invsqrt;
+<a name="line154">154: </a>  fn->ops->view                   = FNView_Invsqrt;
+<a name="line155">155: </a>  <font color="#4169E1">return</font>(0);
+<a name="line156">156: </a>}
+
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/fn/impls/invsqrt/index.html b/src/sys/classes/fn/impls/invsqrt/index.html
new file mode 100644
index 0000000..1198633
--- /dev/null
+++ b/src/sys/classes/fn/impls/invsqrt/index.html
@@ -0,0 +1,21 @@
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/invsqrt/index.html" />
+  <link rel="stylesheet" href="/slepc.css" type="text/css">
+  <title>Mathematical Function - FN</title>
+</head>
+
+<body class="manpageindex">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/invsqrt/index.html "><small>Report Typos and Errors</small></a></div>
+
+<h2>Mathematical Function - FN</h2>
+
+<p>
+The FN package provides the functionality to represent a simple mathematical function such as an exponential, a polynomial or a rational function. This is used as a building block for defining the function associated to the nonlinear eigenproblem, as well as for specifying which function to use when computing the action of a matrix function on a vector.
+</p>
+
+<p>
+ 
+<a href="fninvsqrt.c.html">fninvsqrt.c</a><br>
+ 
+<a href="makefile.html">makefile</a><br>
diff --git a/src/sys/classes/fn/impls/invsqrt/makefile b/src/sys/classes/fn/impls/invsqrt/makefile
new file mode 100644
index 0000000..55f702c
--- /dev/null
+++ b/src/sys/classes/fn/impls/invsqrt/makefile
@@ -0,0 +1,35 @@
+#
+#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#  SLEPc - Scalable Library for Eigenvalue Problem Computations
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+#
+#  This file is part of SLEPc.
+#
+#  SLEPc is free software: you can redistribute it and/or modify it under  the
+#  terms of version 3 of the GNU Lesser General Public License as published by
+#  the Free Software Foundation.
+#
+#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+#  more details.
+#
+#  You  should have received a copy of the GNU Lesser General  Public  License
+#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#
+
+ALL: lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = fninvsqrt.c
+SOURCEF  =
+SOURCEH  =
+LIBBASE  = libslepcsys
+DIRS     =
+MANSEC   = FN
+LOCDIR   = src/sys/classes/fn/impls/invsqrt/
+
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
+
diff --git a/src/sys/classes/fn/impls/invsqrt/makefile.html b/src/sys/classes/fn/impls/invsqrt/makefile.html
new file mode 100644
index 0000000..9144eee
--- /dev/null
+++ b/src/sys/classes/fn/impls/invsqrt/makefile.html
@@ -0,0 +1,50 @@
+
+<html>
+<head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/invsqrt/makefile.html" />
+<title></title>
+<meta name="generator" content="c2html 0.9.4">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
+</head>
+
+<body bgcolor="#FFFFFF">
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/invsqrt/makefile.html "><small>Report Typos and Errors</small></a></div>
+<pre width="80"><font color="#A020F0">#</font>
+<font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  This file is part of SLEPc.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  SLEPc is free software: you can redistribute it and/or modify it under  the</font>
+<font color="#A020F0">#  terms of version 3 of the GNU Lesser General Public License as published by</font>
+<font color="#A020F0">#  the Free Software Foundation.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY</font>
+<font color="#A020F0">#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS</font>
+<font color="#A020F0">#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for</font>
+<font color="#A020F0">#  more details.</font>
+<font color="#A020F0">#</font>
+<font color="#A020F0">#  You  should have received a copy of the GNU Lesser General  Public  License</font>
+<font color="#A020F0">#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.</font>
+<font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
+<font color="#A020F0">#</font>
+
+<strong><font color="#FF0000">ALL:</font></strong> lib
+
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = fninvsqrt.c
+SOURCEF  =
+SOURCEH  =
+LIBBASE  = libslepcsys
+DIRS     =
+MANSEC   = <a href="ROOT/docs/manualpages/FN/FN.html#FN">FN</a>
+LOCDIR   = src/sys/classes/fn/impls/invsqrt/
+
+include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
+
+</pre>
+</body>
+
+</html>
diff --git a/src/sys/classes/fn/impls/log/fnlog.c b/src/sys/classes/fn/impls/log/fnlog.c
index dd25398..80bd306 100644
--- a/src/sys/classes/fn/impls/log/fnlog.c
+++ b/src/sys/classes/fn/impls/log/fnlog.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,6 +37,7 @@ PetscErrorCode FNEvaluateFunction_Log(FN fn,PetscScalar x,PetscScalar *y)
 PetscErrorCode FNEvaluateDerivative_Log(FN fn,PetscScalar x,PetscScalar *y)
 {
   PetscFunctionBegin;
+  if (x==0.0) SETERRQ(PETSC_COMM_SELF,1,"Derivative not defined in the requested value");
   *y = 1.0/x;
   PetscFunctionReturn(0);
 }
@@ -65,8 +66,10 @@ PetscErrorCode FNView_Log(FN fn,PetscViewer viewer)
         ierr = PetscViewerASCIIPrintf(viewer,"  Logarithm: %s*log(x)\n",str);CHKERRQ(ierr);
       } else {
         ierr = PetscViewerASCIIPrintf(viewer,"  Logarithm: %s",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
         ierr = SlepcSNPrintfScalar(str,50,fn->alpha,PETSC_TRUE);CHKERRQ(ierr);
         ierr = PetscViewerASCIIPrintf(viewer,"*log(%s*x)\n",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
       }
     }
   }
diff --git a/src/sys/classes/fn/impls/log/fnlog.c.html b/src/sys/classes/fn/impls/log/fnlog.c.html
index 5406628..7e3f94d 100644
--- a/src/sys/classes/fn/impls/log/fnlog.c.html
+++ b/src/sys/classes/fn/impls/log/fnlog.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/log/fnlog.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:59+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/log/fnlog.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/log/fnlog.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Logarithm function  log(x)</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -43,45 +43,48 @@
 
 <a name="line37"> 37: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Log"></a>PetscErrorCode FNEvaluateDerivative_Log(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
 <a name="line38"> 38: </a>{
-<a name="line40"> 40: </a>  *y = 1.0/x;
-<a name="line41"> 41: </a>  <font color="#4169E1">return</font>(0);
-<a name="line42"> 42: </a>}
+<a name="line40"> 40: </a>  <font color="#4169E1">if</font> (x==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Derivative not defined in the requested value"</font>);
+<a name="line41"> 41: </a>  *y = 1.0/x;
+<a name="line42"> 42: </a>  <font color="#4169E1">return</font>(0);
+<a name="line43"> 43: </a>}
 
-<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="FNView_Log"></a>PetscErrorCode FNView_Log(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
-<a name="line47"> 47: </a>{
-<a name="line49"> 49: </a>  PetscBool      isascii;
-<a name="line50"> 50: </a>  char           str[50];
+<a name="line47"> 47: </a><strong><font color="#4169E1"><a name="FNView_Log"></a>PetscErrorCode FNView_Log(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
+<a name="line48"> 48: </a>{
+<a name="line50"> 50: </a>  PetscBool      isascii;
+<a name="line51"> 51: </a>  char           str[50];
 
-<a name="line53"> 53: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line54"> 54: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line55"> 55: </a>    <font color="#4169E1">if</font> (fn->beta==(PetscScalar)1.0) {
-<a name="line56"> 56: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
-<a name="line57"> 57: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: log(x)\n"</font>);
-<a name="line58"> 58: </a>      } <font color="#4169E1">else</font> {
-<a name="line59"> 59: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
-<a name="line60"> 60: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: log(%s*x)\n"</font>,str);
-<a name="line61"> 61: </a>      }
-<a name="line62"> 62: </a>    } <font color="#4169E1">else</font> {
-<a name="line63"> 63: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
-<a name="line64"> 64: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
-<a name="line65"> 65: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: %s*log(x)\n"</font>,str);
-<a name="line66"> 66: </a>      } <font color="#4169E1">else</font> {
-<a name="line67"> 67: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: %s"</font>,str);
-<a name="line68"> 68: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
-<a name="line69"> 69: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*log(%s*x)\n"</font>,str);
-<a name="line70"> 70: </a>      }
-<a name="line71"> 71: </a>    }
-<a name="line72"> 72: </a>  }
-<a name="line73"> 73: </a>  <font color="#4169E1">return</font>(0);
-<a name="line74"> 74: </a>}
+<a name="line54"> 54: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line55"> 55: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line56"> 56: </a>    <font color="#4169E1">if</font> (fn->beta==(PetscScalar)1.0) {
+<a name="line57"> 57: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line58"> 58: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: log(x)\n"</font>);
+<a name="line59"> 59: </a>      } <font color="#4169E1">else</font> {
+<a name="line60"> 60: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line61"> 61: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: log(%s*x)\n"</font>,str);
+<a name="line62"> 62: </a>      }
+<a name="line63"> 63: </a>    } <font color="#4169E1">else</font> {
+<a name="line64"> 64: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
+<a name="line65"> 65: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line66"> 66: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: %s*log(x)\n"</font>,str);
+<a name="line67"> 67: </a>      } <font color="#4169E1">else</font> {
+<a name="line68"> 68: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Logarithm: %s"</font>,str);
+<a name="line69"> 69: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line70"> 70: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line71"> 71: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*log(%s*x)\n"</font>,str);
+<a name="line72"> 72: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line73"> 73: </a>      }
+<a name="line74"> 74: </a>    }
+<a name="line75"> 75: </a>  }
+<a name="line76"> 76: </a>  <font color="#4169E1">return</font>(0);
+<a name="line77"> 77: </a>}
 
-<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="FNCreate_Log"></a>PETSC_EXTERN PetscErrorCode FNCreate_Log(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line79"> 79: </a>{
-<a name="line81"> 81: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Log;
-<a name="line82"> 82: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Log;
-<a name="line83"> 83: </a>  fn->ops->view                = FNView_Log;
-<a name="line84"> 84: </a>  <font color="#4169E1">return</font>(0);
-<a name="line85"> 85: </a>}
+<a name="line81"> 81: </a><strong><font color="#4169E1"><a name="FNCreate_Log"></a>PETSC_EXTERN PetscErrorCode FNCreate_Log(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line82"> 82: </a>{
+<a name="line84"> 84: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Log;
+<a name="line85"> 85: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Log;
+<a name="line86"> 86: </a>  fn->ops->view                = FNView_Log;
+<a name="line87"> 87: </a>  <font color="#4169E1">return</font>(0);
+<a name="line88"> 88: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/impls/log/index.html b/src/sys/classes/fn/impls/log/index.html
index eeb1018..990799a 100644
--- a/src/sys/classes/fn/impls/log/index.html
+++ b/src/sys/classes/fn/impls/log/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/log/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/log/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/impls/log/makefile b/src/sys/classes/fn/impls/log/makefile
index a3b7876..efff9a2 100644
--- a/src/sys/classes/fn/impls/log/makefile
+++ b/src/sys/classes/fn/impls/log/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/impls/log/makefile.html b/src/sys/classes/fn/impls/log/makefile.html
index 4164560..8e6451a 100644
--- a/src/sys/classes/fn/impls/log/makefile.html
+++ b/src/sys/classes/fn/impls/log/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/log/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:59+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/log/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/log/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/impls/makefile b/src/sys/classes/fn/impls/makefile
index 11db40c..e41a685 100644
--- a/src/sys/classes/fn/impls/makefile
+++ b/src/sys/classes/fn/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -21,8 +21,13 @@
 
 ALL: lib
 
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = fnutil.c
+SOURCEF  =
+SOURCEH  =
 LIBBASE  = libslepcsys
-DIRS     = combine exp log phi rational sqrt
+DIRS     = combine exp log phi rational sqrt invsqrt
 LOCDIR   = src/sys/classes/fn/impls/
 MANSEC   = FN
 
diff --git a/src/sys/classes/fn/impls/makefile.html b/src/sys/classes/fn/impls/makefile.html
index 52aa2e6..f12f05b 100644
--- a/src/sys/classes/fn/impls/makefile.html
+++ b/src/sys/classes/fn/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:05+00:00">
+<meta name="date" content="2016-05-16T10:31:58+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -32,8 +32,13 @@
 
 <strong><font color="#FF0000">ALL:</font></strong> lib
 
+CFLAGS   =
+FFLAGS   =
+SOURCEC  = fnutil.c
+SOURCEF  =
+SOURCEH  =
 LIBBASE  = libslepcsys
-DIRS     = combine exp log phi rational sqrt
+DIRS     = combine exp log phi rational sqrt invsqrt
 LOCDIR   = src/sys/classes/fn/impls/
 MANSEC   = <a href="ROOT/docs/manualpages/FN/FN.html#FN">FN</a>
 
diff --git a/src/sys/classes/fn/impls/phi/fnphi.c b/src/sys/classes/fn/impls/phi/fnphi.c
index d095522..bf19c29 100644
--- a/src/sys/classes/fn/impls/phi/fnphi.c
+++ b/src/sys/classes/fn/impls/phi/fnphi.c
@@ -6,7 +6,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -165,7 +165,7 @@ PetscErrorCode FNPhiGetIndex(FN fn,PetscInt *k)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(fn,FN_CLASSID,1);
   PetscValidPointer(k,2);
-  ierr = PetscTryMethod(fn,"FNPhiGetIndex_C",(FN,PetscInt*),(fn,k));CHKERRQ(ierr);
+  ierr = PetscUseMethod(fn,"FNPhiGetIndex_C",(FN,PetscInt*),(fn,k));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -181,7 +181,8 @@ PetscErrorCode FNView_Phi(FN fn,PetscViewer viewer)
   PetscFunctionBegin;
   ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
   if (isascii) {
-    ierr = PetscViewerASCIIPrintf(viewer,"  Phi_%d: ",ctx->k);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  Phi_%D: ",ctx->k);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     if (fn->beta!=(PetscScalar)1.0) {
       ierr = SlepcSNPrintfScalar(str,50,fn->beta,PETSC_TRUE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%s*",str);CHKERRQ(ierr);
@@ -197,15 +198,16 @@ PetscErrorCode FNView_Phi(FN fn,PetscViewer viewer)
     } else if (ctx->k==1) {
       ierr = PetscViewerASCIIPrintf(viewer,"(exp(%s)-1)/%s\n",strx,strx);CHKERRQ(ierr);
     } else {
-      ierr = PetscViewerASCIIPrintf(viewer,"(phi_%d(%s)-1/%d!)/%s\n",ctx->k-1,strx,ctx->k-1,strx);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIPrintf(viewer,"(phi_%D(%s)-1/%D!)/%s\n",ctx->k-1,strx,ctx->k-1,strx);CHKERRQ(ierr);
     }
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "FNSetFromOptions_Phi"
-PetscErrorCode FNSetFromOptions_Phi(PetscOptions *PetscOptionsObject,FN fn)
+PetscErrorCode FNSetFromOptions_Phi(PetscOptionItems *PetscOptionsObject,FN fn)
 {
   PetscErrorCode ierr;
   FN_PHI         *ctx = (FN_PHI*)fn->data;
diff --git a/src/sys/classes/fn/impls/phi/fnphi.c.html b/src/sys/classes/fn/impls/phi/fnphi.c.html
index cb50b42..97a6184 100644
--- a/src/sys/classes/fn/impls/phi/fnphi.c.html
+++ b/src/sys/classes/fn/impls/phi/fnphi.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/phi/fnphi.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:59+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/phi/fnphi.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/phi/fnphi.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Phi functions</font>
 <a name="line3">  3: </a><font color="#B22222">      phi_0(x) = exp(x)</font>
@@ -18,7 +18,7 @@
 
 <a name="line7">  7: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line8">  8: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line9">  9: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line11"> 11: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -153,7 +153,7 @@
 <a name="line161">161: </a><strong><font color="#4169E1"><a name="FNPhiGetIndex"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNPhiGetIndex.html#FNPhiGetIndex">FNPhiGetIndex</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *k)</font></strong>
 <a name="line162">162: </a>{
 
-<a name="line168">168: </a>  PetscTryMethod(fn,<font color="#666666">"FNPhiGetIndex_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*),(fn,k));
+<a name="line168">168: </a>  PetscUseMethod(fn,<font color="#666666">"FNPhiGetIndex_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*),(fn,k));
 <a name="line169">169: </a>  <font color="#4169E1">return</font>(0);
 <a name="line170">170: </a>}
 
@@ -165,80 +165,82 @@
 
 <a name="line182">182: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
 <a name="line183">183: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line184">184: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Phi_%d: "</font>,ctx->k);
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (fn->beta!=(PetscScalar)1.0) {
-<a name="line186">186: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
-<a name="line187">187: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*"</font>,str);
-<a name="line188">188: </a>    }
-<a name="line189">189: </a>    <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
-<a name="line190">190: </a>      PetscSNPrintf(strx,50,<font color="#666666">"x"</font>);
-<a name="line191">191: </a>    } <font color="#4169E1">else</font> {
-<a name="line192">192: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
-<a name="line193">193: </a>      PetscSNPrintf(strx,50,<font color="#666666">"(%s*x)"</font>,str);
-<a name="line194">194: </a>    }
-<a name="line195">195: </a>    <font color="#4169E1">if</font> (!ctx->k) {
-<a name="line196">196: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"exp(%s)\n"</font>,strx);
-<a name="line197">197: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->k==1) {
-<a name="line198">198: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"(exp(%s)-1)/%s\n"</font>,strx,strx);
-<a name="line199">199: </a>    } <font color="#4169E1">else</font> {
-<a name="line200">200: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"(phi_%d(%s)-1/%d!)/%s\n"</font>,ctx->k-1,strx,ctx->k-1,strx);
-<a name="line201">201: </a>    }
-<a name="line202">202: </a>  }
-<a name="line203">203: </a>  <font color="#4169E1">return</font>(0);
-<a name="line204">204: </a>}
-
-<a name="line208">208: </a><strong><font color="#4169E1"><a name="FNSetFromOptions_Phi"></a>PetscErrorCode FNSetFromOptions_Phi(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line209">209: </a>{
-<a name="line211">211: </a>  FN_PHI         *ctx = (FN_PHI*)fn->data;
-<a name="line212">212: </a>  PetscInt       k;
-<a name="line213">213: </a>  PetscBool      flag;
-
-<a name="line216">216: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> Phi Options"</font>);
-<a name="line217">217: </a>    PetscOptionsInt(<font color="#666666">"-fn_phi_index"</font>,<font color="#666666">"Index of the phi-function"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</a>"</font>,ctx->k,&k,&flag);
-<a name="line218">218: </a>    <font color="#4169E1">if</font> (flag) {
-<a name="line219">219: </a>      <a href="../../../../../../docs/manualpages/FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</a>(fn,k);
-<a name="line220">220: </a>    }
-<a name="line221">221: </a>  PetscOptionsTail();
-<a name="line222">222: </a>  <font color="#4169E1">return</font>(0);
-<a name="line223">223: </a>}
-
-<a name="line227">227: </a><strong><font color="#4169E1"><a name="FNDuplicate_Phi"></a>PetscErrorCode FNDuplicate_Phi(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
-<a name="line228">228: </a>{
-<a name="line230">230: </a>  FN_PHI         *ctx = (FN_PHI*)fn->data,*ctx2;
-
-<a name="line233">233: </a>  PetscNewLog(*newfn,&ctx2);
-<a name="line234">234: </a>  (*newfn)->data = (void*)ctx2;
-<a name="line235">235: </a>  ctx2->k = ctx->k;
-<a name="line236">236: </a>  <font color="#4169E1">return</font>(0);
-<a name="line237">237: </a>}
-
-<a name="line241">241: </a><strong><font color="#4169E1"><a name="FNDestroy_Phi"></a>PetscErrorCode FNDestroy_Phi(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line242">242: </a>{
-
-<a name="line246">246: </a>  PetscFree(fn->data);
-<a name="line247">247: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiSetIndex_C"</font>,NULL);
-<a name="line248">248: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiGetIndex_C"</font>,NULL);
-<a name="line249">249: </a>  <font color="#4169E1">return</font>(0);
-<a name="line250">250: </a>}
-
-<a name="line254">254: </a><strong><font color="#4169E1"><a name="FNCreate_Phi"></a>PETSC_EXTERN PetscErrorCode FNCreate_Phi(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line255">255: </a>{
-<a name="line257">257: </a>  FN_PHI         *ctx;
-
-<a name="line260">260: </a>  PetscNewLog(fn,&ctx);
-<a name="line261">261: </a>  fn->data = (void*)ctx;
-<a name="line262">262: </a>  ctx->k   = 1;
-
-<a name="line264">264: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Phi;
-<a name="line265">265: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Phi;
-<a name="line266">266: </a>  fn->ops->setfromoptions      = FNSetFromOptions_Phi;
-<a name="line267">267: </a>  fn->ops->view                = FNView_Phi;
-<a name="line268">268: </a>  fn->ops->duplicate           = FNDuplicate_Phi;
-<a name="line269">269: </a>  fn->ops->destroy             = FNDestroy_Phi;
-<a name="line270">270: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiSetIndex_C"</font>,FNPhiSetIndex_Phi);
-<a name="line271">271: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiGetIndex_C"</font>,FNPhiGetIndex_Phi);
-<a name="line272">272: </a>  <font color="#4169E1">return</font>(0);
-<a name="line273">273: </a>}
+<a name="line184">184: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Phi_%D: "</font>,ctx->k);
+<a name="line185">185: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line186">186: </a>    <font color="#4169E1">if</font> (fn->beta!=(PetscScalar)1.0) {
+<a name="line187">187: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
+<a name="line188">188: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*"</font>,str);
+<a name="line189">189: </a>    }
+<a name="line190">190: </a>    <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line191">191: </a>      PetscSNPrintf(strx,50,<font color="#666666">"x"</font>);
+<a name="line192">192: </a>    } <font color="#4169E1">else</font> {
+<a name="line193">193: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line194">194: </a>      PetscSNPrintf(strx,50,<font color="#666666">"(%s*x)"</font>,str);
+<a name="line195">195: </a>    }
+<a name="line196">196: </a>    <font color="#4169E1">if</font> (!ctx->k) {
+<a name="line197">197: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"exp(%s)\n"</font>,strx);
+<a name="line198">198: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->k==1) {
+<a name="line199">199: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"(exp(%s)-1)/%s\n"</font>,strx,strx);
+<a name="line200">200: </a>    } <font color="#4169E1">else</font> {
+<a name="line201">201: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"(phi_%D(%s)-1/%D!)/%s\n"</font>,ctx->k-1,strx,ctx->k-1,strx);
+<a name="line202">202: </a>    }
+<a name="line203">203: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line204">204: </a>  }
+<a name="line205">205: </a>  <font color="#4169E1">return</font>(0);
+<a name="line206">206: </a>}
+
+<a name="line210">210: </a><strong><font color="#4169E1"><a name="FNSetFromOptions_Phi"></a>PetscErrorCode FNSetFromOptions_Phi(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line211">211: </a>{
+<a name="line213">213: </a>  FN_PHI         *ctx = (FN_PHI*)fn->data;
+<a name="line214">214: </a>  PetscInt       k;
+<a name="line215">215: </a>  PetscBool      flag;
+
+<a name="line218">218: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> Phi Options"</font>);
+<a name="line219">219: </a>    PetscOptionsInt(<font color="#666666">"-fn_phi_index"</font>,<font color="#666666">"Index of the phi-function"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</a>"</font>,ctx->k,&k,&flag);
+<a name="line220">220: </a>    <font color="#4169E1">if</font> (flag) {
+<a name="line221">221: </a>      <a href="../../../../../../docs/manualpages/FN/FNPhiSetIndex.html#FNPhiSetIndex">FNPhiSetIndex</a>(fn,k);
+<a name="line222">222: </a>    }
+<a name="line223">223: </a>  PetscOptionsTail();
+<a name="line224">224: </a>  <font color="#4169E1">return</font>(0);
+<a name="line225">225: </a>}
+
+<a name="line229">229: </a><strong><font color="#4169E1"><a name="FNDuplicate_Phi"></a>PetscErrorCode FNDuplicate_Phi(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
+<a name="line230">230: </a>{
+<a name="line232">232: </a>  FN_PHI         *ctx = (FN_PHI*)fn->data,*ctx2;
+
+<a name="line235">235: </a>  PetscNewLog(*newfn,&ctx2);
+<a name="line236">236: </a>  (*newfn)->data = (void*)ctx2;
+<a name="line237">237: </a>  ctx2->k = ctx->k;
+<a name="line238">238: </a>  <font color="#4169E1">return</font>(0);
+<a name="line239">239: </a>}
+
+<a name="line243">243: </a><strong><font color="#4169E1"><a name="FNDestroy_Phi"></a>PetscErrorCode FNDestroy_Phi(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line244">244: </a>{
+
+<a name="line248">248: </a>  PetscFree(fn->data);
+<a name="line249">249: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiSetIndex_C"</font>,NULL);
+<a name="line250">250: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiGetIndex_C"</font>,NULL);
+<a name="line251">251: </a>  <font color="#4169E1">return</font>(0);
+<a name="line252">252: </a>}
+
+<a name="line256">256: </a><strong><font color="#4169E1"><a name="FNCreate_Phi"></a>PETSC_EXTERN PetscErrorCode FNCreate_Phi(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line257">257: </a>{
+<a name="line259">259: </a>  FN_PHI         *ctx;
+
+<a name="line262">262: </a>  PetscNewLog(fn,&ctx);
+<a name="line263">263: </a>  fn->data = (void*)ctx;
+<a name="line264">264: </a>  ctx->k   = 1;
+
+<a name="line266">266: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Phi;
+<a name="line267">267: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Phi;
+<a name="line268">268: </a>  fn->ops->setfromoptions      = FNSetFromOptions_Phi;
+<a name="line269">269: </a>  fn->ops->view                = FNView_Phi;
+<a name="line270">270: </a>  fn->ops->duplicate           = FNDuplicate_Phi;
+<a name="line271">271: </a>  fn->ops->destroy             = FNDestroy_Phi;
+<a name="line272">272: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiSetIndex_C"</font>,FNPhiSetIndex_Phi);
+<a name="line273">273: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNPhiGetIndex_C"</font>,FNPhiGetIndex_Phi);
+<a name="line274">274: </a>  <font color="#4169E1">return</font>(0);
+<a name="line275">275: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/impls/phi/index.html b/src/sys/classes/fn/impls/phi/index.html
index 54020fd..9c6aedd 100644
--- a/src/sys/classes/fn/impls/phi/index.html
+++ b/src/sys/classes/fn/impls/phi/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/phi/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/phi/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/impls/phi/makefile b/src/sys/classes/fn/impls/phi/makefile
index 217ef2d..510caca 100644
--- a/src/sys/classes/fn/impls/phi/makefile
+++ b/src/sys/classes/fn/impls/phi/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/impls/phi/makefile.html b/src/sys/classes/fn/impls/phi/makefile.html
index 5c25afd..d2f609a 100644
--- a/src/sys/classes/fn/impls/phi/makefile.html
+++ b/src/sys/classes/fn/impls/phi/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/phi/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:06+00:00">
+<meta name="date" content="2016-05-16T10:31:59+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/phi/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/phi/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/impls/rational/fnrational.c b/src/sys/classes/fn/impls/rational/fnrational.c
index 7c8cbb7..822b238 100644
--- a/src/sys/classes/fn/impls/rational/fnrational.c
+++ b/src/sys/classes/fn/impls/rational/fnrational.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -51,14 +51,15 @@ PetscErrorCode FNEvaluateFunction_Rational(FN fn,PetscScalar x,PetscScalar *y)
     q = ctx->qcoeff[0];
     for (i=1;i<ctx->nq;i++)
       q = ctx->qcoeff[i]+x*q;
+    if (q==0.0) SETERRQ(PETSC_COMM_SELF,1,"Function not defined in the requested value");
     *y = p/q;
   }
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "FNEvaluateFunctionMat_Rational"
-PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)
+#define __FUNCT__ "FNEvaluateFunctionMat_Private"
+static PetscErrorCode FNEvaluateFunctionMat_Private(FN fn,PetscScalar *Aa,PetscScalar *Ba,PetscInt m,PetscBool firstonly)
 {
 #if defined(PETSC_MISSING_LAPACK_GESV)
   PetscFunctionBegin;
@@ -66,18 +67,20 @@ PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)
 #else
   PetscErrorCode ierr;
   FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-  PetscBLASInt   n,ld,*ipiv,info;
-  PetscInt       i,j,m;
-  PetscScalar    *Aa,*Ba,*W,*P,*Q,one=1.0,zero=0.0;
+  PetscBLASInt   n,k,ld,*ipiv,info;
+  PetscInt       i,j;
+  PetscScalar    *W,*P,*Q,one=1.0,zero=0.0;
 
   PetscFunctionBegin;
-  ierr = MatDenseGetArray(A,&Aa);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(B,&Ba);CHKERRQ(ierr);
-  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
-  ld  = n;
-  P   = Ba;
-  ierr = PetscMalloc3(m*m,&Q,m*m,&W,ld,&ipiv);CHKERRQ(ierr);
+  ld = n;
+  k  = firstonly? 1: n;
+  if (Aa==Ba) {
+    ierr = PetscMalloc4(m*m,&P,m*m,&Q,m*m,&W,ld,&ipiv);CHKERRQ(ierr);
+  } else {
+    P = Ba;
+    ierr = PetscMalloc3(m*m,&Q,m*m,&W,ld,&ipiv);CHKERRQ(ierr);
+  }
   ierr = PetscMemzero(P,m*m*sizeof(PetscScalar));CHKERRQ(ierr);
   if (!ctx->np) {
     for (i=0;i<m;i++) P[i+i*ld] = 1.0;
@@ -97,14 +100,57 @@ PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)
       ierr = PetscMemcpy(Q,W,m*m*sizeof(PetscScalar));CHKERRQ(ierr);
       for (i=0;i<m;i++) Q[i+i*ld] += ctx->qcoeff[j];
     }
-    PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&n,&n,Q,&ld,ipiv,P,&ld,&info));
+    PetscStackCallBLAS("LAPACKgesv",LAPACKgesv_(&n,&k,Q,&ld,ipiv,P,&ld,&info));
     if (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in Lapack xGESV %d",info);
   }
-  ierr = PetscFree3(Q,W,ipiv);CHKERRQ(ierr);
+  if (Aa==Ba) {
+    ierr = PetscMemcpy(Aa,P,m*k*sizeof(PetscScalar));CHKERRQ(ierr);
+    ierr = PetscFree4(P,Q,W,ipiv);CHKERRQ(ierr);
+  } else {
+    ierr = PetscFree3(Q,W,ipiv);CHKERRQ(ierr);
+  }
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMat_Rational"
+PetscErrorCode FNEvaluateFunctionMat_Rational(FN fn,Mat A,Mat B)
+{
+  PetscErrorCode ierr;
+  PetscInt       m;
+  PetscScalar    *Aa,*Ba;
+
+  PetscFunctionBegin;
+  ierr = MatDenseGetArray(A,&Aa);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(B,&Ba);CHKERRQ(ierr);
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMat_Private(fn,Aa,Ba,m,PETSC_FALSE);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(A,&Aa);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(B,&Ba);CHKERRQ(ierr);
   PetscFunctionReturn(0);
-#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec_Rational"
+PetscErrorCode FNEvaluateFunctionMatVec_Rational(FN fn,Mat A,Vec v)
+{
+  PetscErrorCode ierr;
+  PetscInt       m;
+  PetscScalar    *Aa,*Ba;
+  Mat            B;
+
+  PetscFunctionBegin;
+  ierr = FN_AllocateWorkMat(fn,A,&B);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(A,&Aa);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(B,&Ba);CHKERRQ(ierr);
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMat_Private(fn,Aa,Ba,m,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(A,&Aa);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(B,&Ba);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(B,v,0);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&B);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
@@ -135,6 +181,7 @@ PetscErrorCode FNEvaluateDerivative_Rational(FN fn,PetscScalar x,PetscScalar *yp
       qp = q+x*qp;
       q = ctx->qcoeff[i]+x*q;
     }
+    if (q==0.0) SETERRQ(PETSC_COMM_SELF,1,"Derivative not defined in the requested value");
     *yp = (pp*q-p*qp)/(q*q);
   }
   PetscFunctionReturn(0);
@@ -156,8 +203,10 @@ PetscErrorCode FNView_Rational(FN fn,PetscViewer viewer)
     if (fn->alpha!=(PetscScalar)1.0 || fn->beta!=(PetscScalar)1.0) {
       ierr = SlepcSNPrintfScalar(str,50,fn->alpha,PETSC_FALSE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"  Scale factors: alpha=%s,",str);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       ierr = SlepcSNPrintfScalar(str,50,fn->beta,PETSC_FALSE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer," beta=%s\n",str);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     }
     if (!ctx->nq) {
       if (!ctx->np) {
@@ -167,28 +216,33 @@ PetscErrorCode FNView_Rational(FN fn,PetscViewer viewer)
         ierr = PetscViewerASCIIPrintf(viewer,"  Constant: %s\n",str);CHKERRQ(ierr);
       } else {
         ierr = PetscViewerASCIIPrintf(viewer,"  Polynomial: ");CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
         for (i=0;i<ctx->np-1;i++) {
           ierr = SlepcSNPrintfScalar(str,50,ctx->pcoeff[i],PETSC_TRUE);CHKERRQ(ierr);
           ierr = PetscViewerASCIIPrintf(viewer,"%s*x^%1D",str,ctx->np-i-1);CHKERRQ(ierr);
         }
         ierr = SlepcSNPrintfScalar(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);CHKERRQ(ierr);
         ierr = PetscViewerASCIIPrintf(viewer,"%s\n",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
       }
     } else if (!ctx->np) {
       ierr = PetscViewerASCIIPrintf(viewer,"  Inverse polinomial: 1 / (");CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       for (i=0;i<ctx->nq-1;i++) {
         ierr = SlepcSNPrintfScalar(str,50,ctx->qcoeff[i],PETSC_TRUE);CHKERRQ(ierr);
         ierr = PetscViewerASCIIPrintf(viewer,"%s*x^%1D",str,ctx->nq-i-1);CHKERRQ(ierr);
       }
       ierr = SlepcSNPrintfScalar(str,50,ctx->qcoeff[ctx->nq-1],PETSC_TRUE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%s)\n",str);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     } else {
       ierr = PetscViewerASCIIPrintf(viewer,"  Rational function: (");CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
       for (i=0;i<ctx->np-1;i++) {
         ierr = SlepcSNPrintfScalar(str,50,ctx->pcoeff[i],PETSC_TRUE);CHKERRQ(ierr);
         ierr = PetscViewerASCIIPrintf(viewer,"%s*x^%1D",str,ctx->np-i-1);CHKERRQ(ierr);
       }
-        ierr = SlepcSNPrintfScalar(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);CHKERRQ(ierr);
+      ierr = SlepcSNPrintfScalar(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%s) / (",str);CHKERRQ(ierr);
       for (i=0;i<ctx->nq-1;i++) {
         ierr = SlepcSNPrintfScalar(str,50,ctx->qcoeff[i],PETSC_TRUE);CHKERRQ(ierr);
@@ -196,6 +250,7 @@ PetscErrorCode FNView_Rational(FN fn,PetscViewer viewer)
       }
       ierr = SlepcSNPrintfScalar(str,50,ctx->qcoeff[ctx->nq-1],PETSC_TRUE);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(viewer,"%s)\n",str);CHKERRQ(ierr);
+      ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
     }
   }
   PetscFunctionReturn(0);
@@ -309,7 +364,7 @@ PetscErrorCode FNRationalGetNumerator(FN fn,PetscInt *np,PetscScalar *pcoeff[])
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(fn,FN_CLASSID,1);
-  ierr = PetscTryMethod(fn,"FNRationalGetNumerator_C",(FN,PetscInt*,PetscScalar**),(fn,np,pcoeff));CHKERRQ(ierr);
+  ierr = PetscUseMethod(fn,"FNRationalGetNumerator_C",(FN,PetscInt*,PetscScalar**),(fn,np,pcoeff));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -421,13 +476,13 @@ PetscErrorCode FNRationalGetDenominator(FN fn,PetscInt *nq,PetscScalar *qcoeff[]
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(fn,FN_CLASSID,1);
-  ierr = PetscTryMethod(fn,"FNRationalGetDenominator_C",(FN,PetscInt*,PetscScalar**),(fn,nq,qcoeff));CHKERRQ(ierr);
+  ierr = PetscUseMethod(fn,"FNRationalGetDenominator_C",(FN,PetscInt*,PetscScalar**),(fn,nq,qcoeff));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "FNSetFromOptions_Rational"
-PetscErrorCode FNSetFromOptions_Rational(PetscOptions *PetscOptionsObject,FN fn)
+PetscErrorCode FNSetFromOptions_Rational(PetscOptionItems *PetscOptionsObject,FN fn)
 {
   PetscErrorCode ierr;
 #define PARMAX 10
@@ -511,13 +566,14 @@ PETSC_EXTERN PetscErrorCode FNCreate_Rational(FN fn)
   ierr = PetscNewLog(fn,&ctx);CHKERRQ(ierr);
   fn->data = (void*)ctx;
 
-  fn->ops->evaluatefunction    = FNEvaluateFunction_Rational;
-  fn->ops->evaluatederivative  = FNEvaluateDerivative_Rational;
-  fn->ops->evaluatefunctionmat = FNEvaluateFunctionMat_Rational;
-  fn->ops->setfromoptions      = FNSetFromOptions_Rational;
-  fn->ops->view                = FNView_Rational;
-  fn->ops->duplicate           = FNDuplicate_Rational;
-  fn->ops->destroy             = FNDestroy_Rational;
+  fn->ops->evaluatefunction       = FNEvaluateFunction_Rational;
+  fn->ops->evaluatederivative     = FNEvaluateDerivative_Rational;
+  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Rational;
+  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Rational;
+  fn->ops->setfromoptions         = FNSetFromOptions_Rational;
+  fn->ops->view                   = FNView_Rational;
+  fn->ops->duplicate              = FNDuplicate_Rational;
+  fn->ops->destroy                = FNDestroy_Rational;
   ierr = PetscObjectComposeFunction((PetscObject)fn,"FNRationalSetNumerator_C",FNRationalSetNumerator_Rational);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)fn,"FNRationalGetNumerator_C",FNRationalGetNumerator_Rational);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)fn,"FNRationalSetDenominator_C",FNRationalSetDenominator_Rational);CHKERRQ(ierr);
diff --git a/src/sys/classes/fn/impls/rational/fnrational.c.html b/src/sys/classes/fn/impls/rational/fnrational.c.html
index 5fec099..274d77e 100644
--- a/src/sys/classes/fn/impls/rational/fnrational.c.html
+++ b/src/sys/classes/fn/impls/rational/fnrational.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/rational/fnrational.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:07+00:00">
+<meta name="date" content="2016-05-16T10:31:59+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/rational/fnrational.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/rational/fnrational.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Rational function  r(x) = p(x)/q(x), where p(x) and q(x) are polynomials</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -60,411 +60,459 @@
 <a name="line51"> 51: </a>    q = ctx->qcoeff[0];
 <a name="line52"> 52: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->nq;i++)
 <a name="line53"> 53: </a>      q = ctx->qcoeff[i]+x*q;
-<a name="line54"> 54: </a>    *y = p/q;
-<a name="line55"> 55: </a>  }
-<a name="line56"> 56: </a>  <font color="#4169E1">return</font>(0);
-<a name="line57"> 57: </a>}
-
-<a name="line61"> 61: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Rational"></a>PetscErrorCode FNEvaluateFunctionMat_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
-<a name="line62"> 62: </a>{
-<a name="line63"> 63: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV)</font>
-<a name="line65"> 65: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV - Lapack routines are unavailable"</font>);
-<a name="line66"> 66: </a><font color="#A020F0">#else</font>
-<a name="line68"> 68: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-<a name="line69"> 69: </a>  PetscBLASInt   n,ld,*ipiv,info;
-<a name="line70"> 70: </a>  PetscInt       i,j,m;
-<a name="line71"> 71: </a>  PetscScalar    *Aa,*Ba,*W,*P,*Q,one=1.0,zero=0.0;
-
-<a name="line74"> 74: </a>  MatDenseGetArray(A,&Aa);
-<a name="line75"> 75: </a>  MatDenseGetArray(B,&Ba);
-<a name="line76"> 76: </a>  MatGetSize(A,&m,NULL);
-<a name="line77"> 77: </a>  PetscBLASIntCast(m,&n);
-<a name="line78"> 78: </a>  ld  = n;
-<a name="line79"> 79: </a>  P   = Ba;
-<a name="line80"> 80: </a>  PetscMalloc3(m*m,&Q,m*m,&W,ld,&ipiv);
-<a name="line81"> 81: </a>  PetscMemzero(P,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line82"> 82: </a>  <font color="#4169E1">if</font> (!ctx->np) {
-<a name="line83"> 83: </a>    <font color="#4169E1">for</font> (i=0;i<m;i++) P[i+i*ld] = 1.0;
-<a name="line84"> 84: </a>  } <font color="#4169E1">else</font> {
-<a name="line85"> 85: </a>    <font color="#4169E1">for</font> (i=0;i<m;i++) P[i+i*ld] = ctx->pcoeff[0];
-<a name="line86"> 86: </a>    <font color="#4169E1">for</font> (j=1;j<ctx->np;j++) {
-<a name="line87"> 87: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,P,&ld,Aa,&ld,&zero,W,&ld));
-<a name="line88"> 88: </a>      PetscMemcpy(P,W,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line89"> 89: </a>      <font color="#4169E1">for</font> (i=0;i<m;i++) P[i+i*ld] += ctx->pcoeff[j];
-<a name="line90"> 90: </a>    }
-<a name="line91"> 91: </a>  }
-<a name="line92"> 92: </a>  <font color="#4169E1">if</font> (ctx->nq) {
-<a name="line93"> 93: </a>    PetscMemzero(Q,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line94"> 94: </a>    <font color="#4169E1">for</font> (i=0;i<m;i++) Q[i+i*ld] = ctx->qcoeff[0];
-<a name="line95"> 95: </a>    <font color="#4169E1">for</font> (j=1;j<ctx->nq;j++) {
-<a name="line96"> 96: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,Q,&ld,Aa,&ld,&zero,W,&ld));
-<a name="line97"> 97: </a>      PetscMemcpy(Q,W,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line98"> 98: </a>      <font color="#4169E1">for</font> (i=0;i<m;i++) Q[i+i*ld] += ctx->qcoeff[j];
-<a name="line99"> 99: </a>    }
-<a name="line100">100: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&n,Q,&ld,ipiv,P,&ld,&info));
-<a name="line101">101: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
-<a name="line102">102: </a>  }
-<a name="line103">103: </a>  PetscFree3(Q,W,ipiv);
-<a name="line104">104: </a>  MatDenseRestoreArray(A,&Aa);
-<a name="line105">105: </a>  MatDenseRestoreArray(B,&Ba);
-<a name="line106">106: </a>  <font color="#4169E1">return</font>(0);
-<a name="line107">107: </a><font color="#A020F0">#endif</font>
-<a name="line108">108: </a>}
-
-<a name="line112">112: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Rational"></a>PetscErrorCode FNEvaluateDerivative_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *yp)</font></strong>
-<a name="line113">113: </a>{
-<a name="line114">114: </a>  FN_RATIONAL *ctx = (FN_RATIONAL*)fn->data;
-<a name="line115">115: </a>  PetscInt    i;
-<a name="line116">116: </a>  PetscScalar p,q,pp,qp;
-
-<a name="line119">119: </a>  <font color="#4169E1">if</font> (!ctx->np) {
-<a name="line120">120: </a>    p = 1.0;
-<a name="line121">121: </a>    pp = 0.0;
-<a name="line122">122: </a>  } <font color="#4169E1">else</font> {
-<a name="line123">123: </a>    p = ctx->pcoeff[0];
-<a name="line124">124: </a>    pp = 0.0;
-<a name="line125">125: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->np;i++) {
-<a name="line126">126: </a>      pp = p+x*pp;
-<a name="line127">127: </a>      p = ctx->pcoeff[i]+x*p;
-<a name="line128">128: </a>    }
-<a name="line129">129: </a>  }
-<a name="line130">130: </a>  <font color="#4169E1">if</font> (!ctx->nq) *yp = pp;
-<a name="line131">131: </a>  <font color="#4169E1">else</font> {
-<a name="line132">132: </a>    q = ctx->qcoeff[0];
-<a name="line133">133: </a>    qp = 0.0;
-<a name="line134">134: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->nq;i++) {
-<a name="line135">135: </a>      qp = q+x*qp;
-<a name="line136">136: </a>      q = ctx->qcoeff[i]+x*q;
-<a name="line137">137: </a>    }
-<a name="line138">138: </a>    *yp = (pp*q-p*qp)/(q*q);
-<a name="line139">139: </a>  }
-<a name="line140">140: </a>  <font color="#4169E1">return</font>(0);
-<a name="line141">141: </a>}
-
-<a name="line145">145: </a><strong><font color="#4169E1"><a name="FNView_Rational"></a>PetscErrorCode FNView_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
-<a name="line146">146: </a>{
-<a name="line148">148: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-<a name="line149">149: </a>  PetscBool      isascii;
-<a name="line150">150: </a>  PetscInt       i;
-<a name="line151">151: </a>  char           str[50];
-
-<a name="line154">154: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line155">155: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line156">156: </a>    <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0 || fn->beta!=(PetscScalar)1.0) {
-<a name="line157">157: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_FALSE);
-<a name="line158">158: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Scale factors: alpha=%s,"</font>,str);
-<a name="line159">159: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_FALSE);
-<a name="line160">160: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" beta=%s\n"</font>,str);
-<a name="line161">161: </a>    }
-<a name="line162">162: </a>    <font color="#4169E1">if</font> (!ctx->nq) {
-<a name="line163">163: </a>      <font color="#4169E1">if</font> (!ctx->np) {
-<a name="line164">164: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Constant: 1.0\n"</font>);
-<a name="line165">165: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->np==1) {
-<a name="line166">166: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[0],PETSC_FALSE);
-<a name="line167">167: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Constant: %s\n"</font>,str);
-<a name="line168">168: </a>      } <font color="#4169E1">else</font> {
-<a name="line169">169: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Polynomial: "</font>);
-<a name="line170">170: </a>        <font color="#4169E1">for</font> (i=0;i<ctx->np-1;i++) {
-<a name="line171">171: </a>          <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[i],PETSC_TRUE);
-<a name="line172">172: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->np-i-1);
-<a name="line173">173: </a>        }
-<a name="line174">174: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);
-<a name="line175">175: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s\n"</font>,str);
-<a name="line176">176: </a>      }
-<a name="line177">177: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!ctx->np) {
-<a name="line178">178: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Inverse polinomial: 1 / ("</font>);
-<a name="line179">179: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nq-1;i++) {
-<a name="line180">180: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[i],PETSC_TRUE);
-<a name="line181">181: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->nq-i-1);
-<a name="line182">182: </a>      }
-<a name="line183">183: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[ctx->nq-1],PETSC_TRUE);
-<a name="line184">184: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s)\n"</font>,str);
-<a name="line185">185: </a>    } <font color="#4169E1">else</font> {
-<a name="line186">186: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Rational function: ("</font>);
-<a name="line187">187: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->np-1;i++) {
-<a name="line188">188: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[i],PETSC_TRUE);
-<a name="line189">189: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->np-i-1);
-<a name="line190">190: </a>      }
-<a name="line191">191: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);
-<a name="line192">192: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s) / ("</font>,str);
-<a name="line193">193: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nq-1;i++) {
-<a name="line194">194: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[i],PETSC_TRUE);
-<a name="line195">195: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->nq-i-1);
-<a name="line196">196: </a>      }
-<a name="line197">197: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[ctx->nq-1],PETSC_TRUE);
-<a name="line198">198: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s)\n"</font>,str);
-<a name="line199">199: </a>    }
-<a name="line200">200: </a>  }
-<a name="line201">201: </a>  <font color="#4169E1">return</font>(0);
-<a name="line202">202: </a>}
-
-<a name="line206">206: </a><strong><font color="#4169E1"><a name="FNRationalSetNumerator_Rational"></a>static PetscErrorCode FNRationalSetNumerator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt np,PetscScalar *pcoeff)</font></strong>
-<a name="line207">207: </a>{
-<a name="line209">209: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-<a name="line210">210: </a>  PetscInt       i;
-
-<a name="line213">213: </a>  ctx->np = np;
-<a name="line214">214: </a>  PetscFree(ctx->pcoeff);
-<a name="line215">215: </a>  <font color="#4169E1">if</font> (np) {
-<a name="line216">216: </a>    PetscMalloc1(np,&ctx->pcoeff);
-<a name="line217">217: </a>    PetscLogObjectMemory((PetscObject)fn,np*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line218">218: </a>    <font color="#4169E1">for</font> (i=0;i<np;i++) ctx->pcoeff[i] = pcoeff[i];
-<a name="line219">219: </a>  }
-<a name="line220">220: </a>  <font color="#4169E1">return</font>(0);
-<a name="line221">221: </a>}
-
-<a name="line225">225: </a><font color="#B22222">/*@</font>
-<a name="line226">226: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a> - Sets the parameters defining the numerator of the</font>
-<a name="line227">227: </a><font color="#B22222">   rational function.</font>
-
-<a name="line229">229: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line231">231: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line232">232: </a><font color="#B22222">+  fn     - the math function context</font>
-<a name="line233">233: </a><font color="#B22222">.  np     - number of coefficients</font>
-<a name="line234">234: </a><font color="#B22222">-  pcoeff - coefficients (array of scalar values)</font>
-
-<a name="line236">236: </a><font color="#B22222">   Notes:</font>
-<a name="line237">237: </a><font color="#B22222">   Let the rational function r(x) = p(x)/q(x), where p(x) and q(x) are polynomials.</font>
-<a name="line238">238: </a><font color="#B22222">   This function provides the coefficients of the numerator p(x).</font>
-<a name="line239">239: </a><font color="#B22222">   Hence, p(x) is of degree np-1.</font>
-<a name="line240">240: </a><font color="#B22222">   If np is zero, then the numerator is assumed to be p(x)=1.</font>
-
-<a name="line242">242: </a><font color="#B22222">   In polynomials, high order coefficients are stored in the first positions</font>
-<a name="line243">243: </a><font color="#B22222">   of the array, e.g. to represent x^2-3 use {1,0,-3}.</font>
-
-<a name="line245">245: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line247">247: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(), <a href="../../../../../../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a>()</font>
-<a name="line248">248: </a><font color="#B22222">@*/</font>
-<a name="line249">249: </a><strong><font color="#4169E1"><a name="FNRationalSetNumerator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt np,PetscScalar *pcoeff)</font></strong>
-<a name="line250">250: </a>{
-
-<a name="line256">256: </a>  <font color="#4169E1">if</font> (np<0) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument np cannot be negative"</font>);
-<a name="line258">258: </a>  PetscTryMethod(fn,<font color="#666666">"FNRationalSetNumerator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*),(fn,np,pcoeff));
-<a name="line259">259: </a>  <font color="#4169E1">return</font>(0);
-<a name="line260">260: </a>}
-
-<a name="line264">264: </a><strong><font color="#4169E1"><a name="FNRationalGetNumerator_Rational"></a>static PetscErrorCode FNRationalGetNumerator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *np,PetscScalar *pcoeff[])</font></strong>
-<a name="line265">265: </a>{
-<a name="line267">267: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-<a name="line268">268: </a>  PetscInt       i;
-
-<a name="line271">271: </a>  <font color="#4169E1">if</font> (np) *np = ctx->np;
-<a name="line272">272: </a>  <font color="#4169E1">if</font> (pcoeff) {
-<a name="line273">273: </a>    <font color="#4169E1">if</font> (!ctx->np) *pcoeff = NULL;
-<a name="line274">274: </a>    <font color="#4169E1">else</font> {
-<a name="line275">275: </a>      PetscMalloc1(ctx->np,pcoeff);
-<a name="line276">276: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->np;i++) (*pcoeff)[i] = ctx->pcoeff[i];
-<a name="line277">277: </a>    }
-<a name="line278">278: </a>  }
-<a name="line279">279: </a>  <font color="#4169E1">return</font>(0);
-<a name="line280">280: </a>}
-
-<a name="line284">284: </a><font color="#B22222">/*@</font>
-<a name="line285">285: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a> - Gets the parameters that define the numerator of the</font>
-<a name="line286">286: </a><font color="#B22222">   rational function.</font>
-
-<a name="line288">288: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line290">290: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line291">291: </a><font color="#B22222">.  fn     - the math function context</font>
-
-<a name="line293">293: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line294">294: </a><font color="#B22222">+  np     - number of coefficients</font>
-<a name="line295">295: </a><font color="#B22222">-  pcoeff - coefficients (array of scalar values, length nq)</font>
-
-<a name="line297">297: </a><font color="#B22222">   Notes:</font>
-<a name="line298">298: </a><font color="#B22222">   The values passed by user with <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>() are returned (or null</font>
-<a name="line299">299: </a><font color="#B22222">   pointers otherwise).</font>
-<a name="line300">300: </a><font color="#B22222">   The pcoeff array should be freed by the user when no longer needed.</font>
-
-<a name="line302">302: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line304">304: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>()</font>
-<a name="line305">305: </a><font color="#B22222">@*/</font>
-<a name="line306">306: </a><strong><font color="#4169E1"><a name="FNRationalGetNumerator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *np,PetscScalar *pcoeff[])</font></strong>
-<a name="line307">307: </a>{
-
-<a name="line312">312: </a>  PetscTryMethod(fn,<font color="#666666">"FNRationalGetNumerator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**),(fn,np,pcoeff));
-<a name="line313">313: </a>  <font color="#4169E1">return</font>(0);
-<a name="line314">314: </a>}
-
-<a name="line318">318: </a><strong><font color="#4169E1"><a name="FNRationalSetDenominator_Rational"></a>static PetscErrorCode FNRationalSetDenominator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt nq,PetscScalar *qcoeff)</font></strong>
-<a name="line319">319: </a>{
-<a name="line321">321: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-<a name="line322">322: </a>  PetscInt       i;
-
-<a name="line325">325: </a>  ctx->nq = nq;
-<a name="line326">326: </a>  PetscFree(ctx->qcoeff);
-<a name="line327">327: </a>  <font color="#4169E1">if</font> (nq) {
-<a name="line328">328: </a>    PetscMalloc1(nq,&ctx->qcoeff);
-<a name="line329">329: </a>    PetscLogObjectMemory((PetscObject)fn,nq*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line330">330: </a>    <font color="#4169E1">for</font> (i=0;i<nq;i++) ctx->qcoeff[i] = qcoeff[i];
-<a name="line331">331: </a>  }
-<a name="line332">332: </a>  <font color="#4169E1">return</font>(0);
-<a name="line333">333: </a>}
-
-<a name="line337">337: </a><font color="#B22222">/*@</font>
-<a name="line338">338: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a> - Sets the parameters defining the denominator of the</font>
-<a name="line339">339: </a><font color="#B22222">   rational function.</font>
-
-<a name="line341">341: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line343">343: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line344">344: </a><font color="#B22222">+  fn     - the math function context</font>
-<a name="line345">345: </a><font color="#B22222">.  nq     - number of coefficients</font>
-<a name="line346">346: </a><font color="#B22222">-  qcoeff - coefficients (array of scalar values)</font>
-
-<a name="line348">348: </a><font color="#B22222">   Notes:</font>
-<a name="line349">349: </a><font color="#B22222">   Let the rational function r(x) = p(x)/q(x), where p(x) and q(x) are polynomials.</font>
-<a name="line350">350: </a><font color="#B22222">   This function provides the coefficients of the denominator q(x).</font>
-<a name="line351">351: </a><font color="#B22222">   Hence, q(x) is of degree nq-1.</font>
-<a name="line352">352: </a><font color="#B22222">   If nq is zero, then the function is assumed to be polynomial, r(x) = p(x).</font>
-
-<a name="line354">354: </a><font color="#B22222">   In polynomials, high order coefficients are stored in the first positions</font>
-<a name="line355">355: </a><font color="#B22222">   of the array, e.g. to represent x^2-3 use {1,0,-3}.</font>
+<a name="line54"> 54: </a>    <font color="#4169E1">if</font> (q==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Function not defined in the requested value"</font>);
+<a name="line55"> 55: </a>    *y = p/q;
+<a name="line56"> 56: </a>  }
+<a name="line57"> 57: </a>  <font color="#4169E1">return</font>(0);
+<a name="line58"> 58: </a>}
+
+<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Private"></a>static PetscErrorCode FNEvaluateFunctionMat_Private(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar *Aa,PetscScalar *Ba,PetscInt m,PetscBool firstonly)</font></strong>
+<a name="line63"> 63: </a>{
+<a name="line64"> 64: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_GESV)</font>
+<a name="line66"> 66: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"GESV - Lapack routines are unavailable"</font>);
+<a name="line67"> 67: </a><font color="#A020F0">#else</font>
+<a name="line69"> 69: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+<a name="line70"> 70: </a>  PetscBLASInt   n,k,ld,*ipiv,info;
+<a name="line71"> 71: </a>  PetscInt       i,j;
+<a name="line72"> 72: </a>  PetscScalar    *W,*P,*Q,one=1.0,zero=0.0;
+
+<a name="line75"> 75: </a>  PetscBLASIntCast(m,&n);
+<a name="line76"> 76: </a>  ld = n;
+<a name="line77"> 77: </a>  k  = firstonly? 1: n;
+<a name="line78"> 78: </a>  <font color="#4169E1">if</font> (Aa==Ba) {
+<a name="line79"> 79: </a>    PetscMalloc4(m*m,&P,m*m,&Q,m*m,&W,ld,&ipiv);
+<a name="line80"> 80: </a>  } <font color="#4169E1">else</font> {
+<a name="line81"> 81: </a>    P = Ba;
+<a name="line82"> 82: </a>    PetscMalloc3(m*m,&Q,m*m,&W,ld,&ipiv);
+<a name="line83"> 83: </a>  }
+<a name="line84"> 84: </a>  PetscMemzero(P,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line85"> 85: </a>  <font color="#4169E1">if</font> (!ctx->np) {
+<a name="line86"> 86: </a>    <font color="#4169E1">for</font> (i=0;i<m;i++) P[i+i*ld] = 1.0;
+<a name="line87"> 87: </a>  } <font color="#4169E1">else</font> {
+<a name="line88"> 88: </a>    <font color="#4169E1">for</font> (i=0;i<m;i++) P[i+i*ld] = ctx->pcoeff[0];
+<a name="line89"> 89: </a>    <font color="#4169E1">for</font> (j=1;j<ctx->np;j++) {
+<a name="line90"> 90: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,P,&ld,Aa,&ld,&zero,W,&ld));
+<a name="line91"> 91: </a>      PetscMemcpy(P,W,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line92"> 92: </a>      <font color="#4169E1">for</font> (i=0;i<m;i++) P[i+i*ld] += ctx->pcoeff[j];
+<a name="line93"> 93: </a>    }
+<a name="line94"> 94: </a>  }
+<a name="line95"> 95: </a>  <font color="#4169E1">if</font> (ctx->nq) {
+<a name="line96"> 96: </a>    PetscMemzero(Q,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line97"> 97: </a>    <font color="#4169E1">for</font> (i=0;i<m;i++) Q[i+i*ld] = ctx->qcoeff[0];
+<a name="line98"> 98: </a>    <font color="#4169E1">for</font> (j=1;j<ctx->nq;j++) {
+<a name="line99"> 99: </a>      PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,Q,&ld,Aa,&ld,&zero,W,&ld));
+<a name="line100">100: </a>      PetscMemcpy(Q,W,m*m*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line101">101: </a>      <font color="#4169E1">for</font> (i=0;i<m;i++) Q[i+i*ld] += ctx->qcoeff[j];
+<a name="line102">102: </a>    }
+<a name="line103">103: </a>    PetscStackCallBLAS(<font color="#666666">"LAPACKgesv"</font>,LAPACKgesv_(&n,&k,Q,&ld,ipiv,P,&ld,&info));
+<a name="line104">104: </a>    <font color="#4169E1">if</font> (info) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xGESV %d"</font>,info);
+<a name="line105">105: </a>  }
+<a name="line106">106: </a>  <font color="#4169E1">if</font> (Aa==Ba) {
+<a name="line107">107: </a>    PetscMemcpy(Aa,P,m*k*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line108">108: </a>    PetscFree4(P,Q,W,ipiv);
+<a name="line109">109: </a>  } <font color="#4169E1">else</font> {
+<a name="line110">110: </a>    PetscFree3(Q,W,ipiv);
+<a name="line111">111: </a>  }
+<a name="line112">112: </a>  <font color="#4169E1">return</font>(0);
+<a name="line113">113: </a><font color="#A020F0">#endif</font>
+<a name="line114">114: </a>}
+
+<a name="line118">118: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Rational"></a>PetscErrorCode FNEvaluateFunctionMat_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
+<a name="line119">119: </a>{
+<a name="line121">121: </a>  PetscInt       m;
+<a name="line122">122: </a>  PetscScalar    *Aa,*Ba;
+
+<a name="line125">125: </a>  MatDenseGetArray(A,&Aa);
+<a name="line126">126: </a>  MatDenseGetArray(B,&Ba);
+<a name="line127">127: </a>  MatGetSize(A,&m,NULL);
+<a name="line128">128: </a>  FNEvaluateFunctionMat_Private(fn,Aa,Ba,m,PETSC_FALSE);
+<a name="line129">129: </a>  MatDenseRestoreArray(A,&Aa);
+<a name="line130">130: </a>  MatDenseRestoreArray(B,&Ba);
+<a name="line131">131: </a>  <font color="#4169E1">return</font>(0);
+<a name="line132">132: </a>}
+
+<a name="line136">136: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec_Rational"></a>PetscErrorCode FNEvaluateFunctionMatVec_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line137">137: </a>{
+<a name="line139">139: </a>  PetscInt       m;
+<a name="line140">140: </a>  PetscScalar    *Aa,*Ba;
+<a name="line141">141: </a>  Mat            B;
+
+<a name="line144">144: </a>  FN_AllocateWorkMat(fn,A,&B);
+<a name="line145">145: </a>  MatDenseGetArray(A,&Aa);
+<a name="line146">146: </a>  MatDenseGetArray(B,&Ba);
+<a name="line147">147: </a>  MatGetSize(A,&m,NULL);
+<a name="line148">148: </a>  FNEvaluateFunctionMat_Private(fn,Aa,Ba,m,PETSC_TRUE);
+<a name="line149">149: </a>  MatDenseRestoreArray(A,&Aa);
+<a name="line150">150: </a>  MatDenseRestoreArray(B,&Ba);
+<a name="line151">151: </a>  MatGetColumnVector(B,v,0);
+<a name="line152">152: </a>  FN_FreeWorkMat(fn,&B);
+<a name="line153">153: </a>  <font color="#4169E1">return</font>(0);
+<a name="line154">154: </a>}
+
+<a name="line158">158: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Rational"></a>PetscErrorCode FNEvaluateDerivative_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *yp)</font></strong>
+<a name="line159">159: </a>{
+<a name="line160">160: </a>  FN_RATIONAL *ctx = (FN_RATIONAL*)fn->data;
+<a name="line161">161: </a>  PetscInt    i;
+<a name="line162">162: </a>  PetscScalar p,q,pp,qp;
+
+<a name="line165">165: </a>  <font color="#4169E1">if</font> (!ctx->np) {
+<a name="line166">166: </a>    p = 1.0;
+<a name="line167">167: </a>    pp = 0.0;
+<a name="line168">168: </a>  } <font color="#4169E1">else</font> {
+<a name="line169">169: </a>    p = ctx->pcoeff[0];
+<a name="line170">170: </a>    pp = 0.0;
+<a name="line171">171: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->np;i++) {
+<a name="line172">172: </a>      pp = p+x*pp;
+<a name="line173">173: </a>      p = ctx->pcoeff[i]+x*p;
+<a name="line174">174: </a>    }
+<a name="line175">175: </a>  }
+<a name="line176">176: </a>  <font color="#4169E1">if</font> (!ctx->nq) *yp = pp;
+<a name="line177">177: </a>  <font color="#4169E1">else</font> {
+<a name="line178">178: </a>    q = ctx->qcoeff[0];
+<a name="line179">179: </a>    qp = 0.0;
+<a name="line180">180: </a>    <font color="#4169E1">for</font> (i=1;i<ctx->nq;i++) {
+<a name="line181">181: </a>      qp = q+x*qp;
+<a name="line182">182: </a>      q = ctx->qcoeff[i]+x*q;
+<a name="line183">183: </a>    }
+<a name="line184">184: </a>    <font color="#4169E1">if</font> (q==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Derivative not defined in the requested value"</font>);
+<a name="line185">185: </a>    *yp = (pp*q-p*qp)/(q*q);
+<a name="line186">186: </a>  }
+<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
+<a name="line188">188: </a>}
+
+<a name="line192">192: </a><strong><font color="#4169E1"><a name="FNView_Rational"></a>PetscErrorCode FNView_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
+<a name="line193">193: </a>{
+<a name="line195">195: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+<a name="line196">196: </a>  PetscBool      isascii;
+<a name="line197">197: </a>  PetscInt       i;
+<a name="line198">198: </a>  char           str[50];
+
+<a name="line201">201: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line202">202: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line203">203: </a>    <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0 || fn->beta!=(PetscScalar)1.0) {
+<a name="line204">204: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_FALSE);
+<a name="line205">205: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Scale factors: alpha=%s,"</font>,str);
+<a name="line206">206: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line207">207: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_FALSE);
+<a name="line208">208: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">" beta=%s\n"</font>,str);
+<a name="line209">209: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line210">210: </a>    }
+<a name="line211">211: </a>    <font color="#4169E1">if</font> (!ctx->nq) {
+<a name="line212">212: </a>      <font color="#4169E1">if</font> (!ctx->np) {
+<a name="line213">213: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Constant: 1.0\n"</font>);
+<a name="line214">214: </a>      } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (ctx->np==1) {
+<a name="line215">215: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[0],PETSC_FALSE);
+<a name="line216">216: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Constant: %s\n"</font>,str);
+<a name="line217">217: </a>      } <font color="#4169E1">else</font> {
+<a name="line218">218: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Polynomial: "</font>);
+<a name="line219">219: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line220">220: </a>        <font color="#4169E1">for</font> (i=0;i<ctx->np-1;i++) {
+<a name="line221">221: </a>          <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[i],PETSC_TRUE);
+<a name="line222">222: </a>          PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->np-i-1);
+<a name="line223">223: </a>        }
+<a name="line224">224: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);
+<a name="line225">225: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s\n"</font>,str);
+<a name="line226">226: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line227">227: </a>      }
+<a name="line228">228: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!ctx->np) {
+<a name="line229">229: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Inverse polinomial: 1 / ("</font>);
+<a name="line230">230: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line231">231: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nq-1;i++) {
+<a name="line232">232: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[i],PETSC_TRUE);
+<a name="line233">233: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->nq-i-1);
+<a name="line234">234: </a>      }
+<a name="line235">235: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[ctx->nq-1],PETSC_TRUE);
+<a name="line236">236: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s)\n"</font>,str);
+<a name="line237">237: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line238">238: </a>    } <font color="#4169E1">else</font> {
+<a name="line239">239: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Rational function: ("</font>);
+<a name="line240">240: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line241">241: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->np-1;i++) {
+<a name="line242">242: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[i],PETSC_TRUE);
+<a name="line243">243: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->np-i-1);
+<a name="line244">244: </a>      }
+<a name="line245">245: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->pcoeff[ctx->np-1],PETSC_TRUE);
+<a name="line246">246: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s) / ("</font>,str);
+<a name="line247">247: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nq-1;i++) {
+<a name="line248">248: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[i],PETSC_TRUE);
+<a name="line249">249: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s*x^%1D"</font>,str,ctx->nq-i-1);
+<a name="line250">250: </a>      }
+<a name="line251">251: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->qcoeff[ctx->nq-1],PETSC_TRUE);
+<a name="line252">252: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s)\n"</font>,str);
+<a name="line253">253: </a>      PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line254">254: </a>    }
+<a name="line255">255: </a>  }
+<a name="line256">256: </a>  <font color="#4169E1">return</font>(0);
+<a name="line257">257: </a>}
+
+<a name="line261">261: </a><strong><font color="#4169E1"><a name="FNRationalSetNumerator_Rational"></a>static PetscErrorCode FNRationalSetNumerator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt np,PetscScalar *pcoeff)</font></strong>
+<a name="line262">262: </a>{
+<a name="line264">264: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+<a name="line265">265: </a>  PetscInt       i;
+
+<a name="line268">268: </a>  ctx->np = np;
+<a name="line269">269: </a>  PetscFree(ctx->pcoeff);
+<a name="line270">270: </a>  <font color="#4169E1">if</font> (np) {
+<a name="line271">271: </a>    PetscMalloc1(np,&ctx->pcoeff);
+<a name="line272">272: </a>    PetscLogObjectMemory((PetscObject)fn,np*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line273">273: </a>    <font color="#4169E1">for</font> (i=0;i<np;i++) ctx->pcoeff[i] = pcoeff[i];
+<a name="line274">274: </a>  }
+<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
+<a name="line276">276: </a>}
+
+<a name="line280">280: </a><font color="#B22222">/*@</font>
+<a name="line281">281: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a> - Sets the parameters defining the numerator of the</font>
+<a name="line282">282: </a><font color="#B22222">   rational function.</font>
+
+<a name="line284">284: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line286">286: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line287">287: </a><font color="#B22222">+  fn     - the math function context</font>
+<a name="line288">288: </a><font color="#B22222">.  np     - number of coefficients</font>
+<a name="line289">289: </a><font color="#B22222">-  pcoeff - coefficients (array of scalar values)</font>
+
+<a name="line291">291: </a><font color="#B22222">   Notes:</font>
+<a name="line292">292: </a><font color="#B22222">   Let the rational function r(x) = p(x)/q(x), where p(x) and q(x) are polynomials.</font>
+<a name="line293">293: </a><font color="#B22222">   This function provides the coefficients of the numerator p(x).</font>
+<a name="line294">294: </a><font color="#B22222">   Hence, p(x) is of degree np-1.</font>
+<a name="line295">295: </a><font color="#B22222">   If np is zero, then the numerator is assumed to be p(x)=1.</font>
+
+<a name="line297">297: </a><font color="#B22222">   In polynomials, high order coefficients are stored in the first positions</font>
+<a name="line298">298: </a><font color="#B22222">   of the array, e.g. to represent x^2-3 use {1,0,-3}.</font>
+
+<a name="line300">300: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line302">302: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(), <a href="../../../../../../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a>()</font>
+<a name="line303">303: </a><font color="#B22222">@*/</font>
+<a name="line304">304: </a><strong><font color="#4169E1"><a name="FNRationalSetNumerator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt np,PetscScalar *pcoeff)</font></strong>
+<a name="line305">305: </a>{
+
+<a name="line311">311: </a>  <font color="#4169E1">if</font> (np<0) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument np cannot be negative"</font>);
+<a name="line313">313: </a>  PetscTryMethod(fn,<font color="#666666">"FNRationalSetNumerator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*),(fn,np,pcoeff));
+<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
+<a name="line315">315: </a>}
+
+<a name="line319">319: </a><strong><font color="#4169E1"><a name="FNRationalGetNumerator_Rational"></a>static PetscErrorCode FNRationalGetNumerator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *np,PetscScalar *pcoeff[])</font></strong>
+<a name="line320">320: </a>{
+<a name="line322">322: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+<a name="line323">323: </a>  PetscInt       i;
+
+<a name="line326">326: </a>  <font color="#4169E1">if</font> (np) *np = ctx->np;
+<a name="line327">327: </a>  <font color="#4169E1">if</font> (pcoeff) {
+<a name="line328">328: </a>    <font color="#4169E1">if</font> (!ctx->np) *pcoeff = NULL;
+<a name="line329">329: </a>    <font color="#4169E1">else</font> {
+<a name="line330">330: </a>      PetscMalloc1(ctx->np,pcoeff);
+<a name="line331">331: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->np;i++) (*pcoeff)[i] = ctx->pcoeff[i];
+<a name="line332">332: </a>    }
+<a name="line333">333: </a>  }
+<a name="line334">334: </a>  <font color="#4169E1">return</font>(0);
+<a name="line335">335: </a>}
+
+<a name="line339">339: </a><font color="#B22222">/*@</font>
+<a name="line340">340: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a> - Gets the parameters that define the numerator of the</font>
+<a name="line341">341: </a><font color="#B22222">   rational function.</font>
+
+<a name="line343">343: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line345">345: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line346">346: </a><font color="#B22222">.  fn     - the math function context</font>
+
+<a name="line348">348: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line349">349: </a><font color="#B22222">+  np     - number of coefficients</font>
+<a name="line350">350: </a><font color="#B22222">-  pcoeff - coefficients (array of scalar values, length nq)</font>
+
+<a name="line352">352: </a><font color="#B22222">   Notes:</font>
+<a name="line353">353: </a><font color="#B22222">   The values passed by user with <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>() are returned (or null</font>
+<a name="line354">354: </a><font color="#B22222">   pointers otherwise).</font>
+<a name="line355">355: </a><font color="#B22222">   The pcoeff array should be freed by the user when no longer needed.</font>
 
 <a name="line357">357: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line359">359: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(), <a href="../../../../../../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a>()</font>
+<a name="line359">359: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>()</font>
 <a name="line360">360: </a><font color="#B22222">@*/</font>
-<a name="line361">361: </a><strong><font color="#4169E1"><a name="FNRationalSetDenominator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt nq,PetscScalar *qcoeff)</font></strong>
+<a name="line361">361: </a><strong><font color="#4169E1"><a name="FNRationalGetNumerator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalGetNumerator.html#FNRationalGetNumerator">FNRationalGetNumerator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *np,PetscScalar *pcoeff[])</font></strong>
 <a name="line362">362: </a>{
 
-<a name="line368">368: </a>  <font color="#4169E1">if</font> (nq<0) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument nq cannot be negative"</font>);
-<a name="line370">370: </a>  PetscTryMethod(fn,<font color="#666666">"FNRationalSetDenominator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*),(fn,nq,qcoeff));
-<a name="line371">371: </a>  <font color="#4169E1">return</font>(0);
-<a name="line372">372: </a>}
-
-<a name="line376">376: </a><strong><font color="#4169E1"><a name="FNRationalGetDenominator_Rational"></a>static PetscErrorCode FNRationalGetDenominator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *nq,PetscScalar *qcoeff[])</font></strong>
-<a name="line377">377: </a>{
-<a name="line379">379: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-<a name="line380">380: </a>  PetscInt       i;
-
-<a name="line383">383: </a>  <font color="#4169E1">if</font> (nq) *nq = ctx->nq;
-<a name="line384">384: </a>  <font color="#4169E1">if</font> (qcoeff) {
-<a name="line385">385: </a>    <font color="#4169E1">if</font> (!ctx->nq) *qcoeff = NULL;
-<a name="line386">386: </a>    <font color="#4169E1">else</font> {
-<a name="line387">387: </a>      PetscMalloc1(ctx->nq,qcoeff);
-<a name="line388">388: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nq;i++) (*qcoeff)[i] = ctx->qcoeff[i];
-<a name="line389">389: </a>    }
-<a name="line390">390: </a>  }
-<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
-<a name="line392">392: </a>}
-
-<a name="line396">396: </a><font color="#B22222">/*@</font>
-<a name="line397">397: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a> - Gets the parameters that define the denominator of the</font>
-<a name="line398">398: </a><font color="#B22222">   rational function.</font>
-
-<a name="line400">400: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line402">402: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line403">403: </a><font color="#B22222">.  fn     - the math function context</font>
-
-<a name="line405">405: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line406">406: </a><font color="#B22222">+  nq     - number of coefficients</font>
-<a name="line407">407: </a><font color="#B22222">-  qcoeff - coefficients (array of scalar values, length nq)</font>
-
-<a name="line409">409: </a><font color="#B22222">   Notes:</font>
-<a name="line410">410: </a><font color="#B22222">   The values passed by user with <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>() are returned (or null</font>
-<a name="line411">411: </a><font color="#B22222">   pointers otherwise).</font>
-<a name="line412">412: </a><font color="#B22222">   The qcoeff array should be freed by the user when no longer needed.</font>
-
-<a name="line414">414: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line416">416: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>()</font>
-<a name="line417">417: </a><font color="#B22222">@*/</font>
-<a name="line418">418: </a><strong><font color="#4169E1"><a name="FNRationalGetDenominator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *nq,PetscScalar *qcoeff[])</font></strong>
-<a name="line419">419: </a>{
-
-<a name="line424">424: </a>  PetscTryMethod(fn,<font color="#666666">"FNRationalGetDenominator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**),(fn,nq,qcoeff));
-<a name="line425">425: </a>  <font color="#4169E1">return</font>(0);
-<a name="line426">426: </a>}
-
-<a name="line430">430: </a><strong><font color="#4169E1"><a name="FNSetFromOptions_Rational"></a>PetscErrorCode FNSetFromOptions_Rational(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line431">431: </a>{
-<a name="line433">433: </a><strong><font color="#228B22">#define PARMAX 10</font></strong>
-<a name="line434">434: </a>  PetscScalar    array[PARMAX];
-<a name="line435">435: </a>  PetscInt       i,k;
-<a name="line436">436: </a>  PetscBool      flg;
-
-<a name="line439">439: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> Rational Options"</font>);
-
-<a name="line441">441: </a>  k = PARMAX;
-<a name="line442">442: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
-<a name="line443">443: </a>  PetscOptionsScalarArray(<font color="#666666">"-fn_rational_numerator"</font>,<font color="#666666">"Numerator coefficients (one or more scalar values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>"</font>,array,&k,&flg);
-<a name="line444">444: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line445">445: </a>    <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(fn,k,array);
-<a name="line446">446: </a>  }
-
-<a name="line448">448: </a>  k = PARMAX;
-<a name="line449">449: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
-<a name="line450">450: </a>  PetscOptionsScalarArray(<font color="#666666">"-fn_rational_denominator"</font>,<font color="#666666">"Denominator coefficients (one or more scalar values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>"</font>,array,&k,&flg);
-<a name="line451">451: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line452">452: </a>    <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(fn,k,array);
-<a name="line453">453: </a>  }
-
-<a name="line455">455: </a>  PetscOptionsTail();
-<a name="line456">456: </a>  <font color="#4169E1">return</font>(0);
-<a name="line457">457: </a>}
-
-<a name="line461">461: </a><strong><font color="#4169E1"><a name="FNDuplicate_Rational"></a>PetscErrorCode FNDuplicate_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
-<a name="line462">462: </a>{
-<a name="line464">464: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data,*ctx2;
-<a name="line465">465: </a>  PetscInt       i;
-
-<a name="line468">468: </a>  PetscNewLog(*newfn,&ctx2);
-<a name="line469">469: </a>  (*newfn)->data = (void*)ctx2;
-<a name="line470">470: </a>  ctx2->np = ctx->np;
-<a name="line471">471: </a>  <font color="#4169E1">if</font> (ctx->np) {
-<a name="line472">472: </a>    PetscMalloc1(ctx->np,&ctx2->pcoeff);
-<a name="line473">473: </a>    PetscLogObjectMemory((PetscObject)(*newfn),ctx->np*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line474">474: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->np;i++) ctx2->pcoeff[i] = ctx->pcoeff[i];
-<a name="line475">475: </a>  }
-<a name="line476">476: </a>  ctx2->nq = ctx->nq;
-<a name="line477">477: </a>  <font color="#4169E1">if</font> (ctx->nq) {
-<a name="line478">478: </a>    PetscMalloc1(ctx->nq,&ctx2->qcoeff);
-<a name="line479">479: </a>    PetscLogObjectMemory((PetscObject)(*newfn),ctx->nq*<font color="#4169E1">sizeof</font>(PetscScalar));
-<a name="line480">480: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nq;i++) ctx2->qcoeff[i] = ctx->qcoeff[i];
-<a name="line481">481: </a>  }
-<a name="line482">482: </a>  <font color="#4169E1">return</font>(0);
-<a name="line483">483: </a>}
-
-<a name="line487">487: </a><strong><font color="#4169E1"><a name="FNDestroy_Rational"></a>PetscErrorCode FNDestroy_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line488">488: </a>{
-<a name="line490">490: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
-
-<a name="line493">493: </a>  PetscFree(ctx->pcoeff);
-<a name="line494">494: </a>  PetscFree(ctx->qcoeff);
-<a name="line495">495: </a>  PetscFree(fn->data);
-<a name="line496">496: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetNumerator_C"</font>,NULL);
-<a name="line497">497: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetNumerator_C"</font>,NULL);
-<a name="line498">498: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetDenominator_C"</font>,NULL);
-<a name="line499">499: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetDenominator_C"</font>,NULL);
-<a name="line500">500: </a>  <font color="#4169E1">return</font>(0);
-<a name="line501">501: </a>}
-
-<a name="line505">505: </a><strong><font color="#4169E1"><a name="FNCreate_Rational"></a>PETSC_EXTERN PetscErrorCode FNCreate_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line506">506: </a>{
-<a name="line508">508: </a>  FN_RATIONAL    *ctx;
-
-<a name="line511">511: </a>  PetscNewLog(fn,&ctx);
-<a name="line512">512: </a>  fn->data = (void*)ctx;
-
-<a name="line514">514: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Rational;
-<a name="line515">515: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Rational;
-<a name="line516">516: </a>  fn->ops->evaluatefunctionmat = FNEvaluateFunctionMat_Rational;
-<a name="line517">517: </a>  fn->ops->setfromoptions      = FNSetFromOptions_Rational;
-<a name="line518">518: </a>  fn->ops->view                = FNView_Rational;
-<a name="line519">519: </a>  fn->ops->duplicate           = FNDuplicate_Rational;
-<a name="line520">520: </a>  fn->ops->destroy             = FNDestroy_Rational;
-<a name="line521">521: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetNumerator_C"</font>,FNRationalSetNumerator_Rational);
-<a name="line522">522: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetNumerator_C"</font>,FNRationalGetNumerator_Rational);
-<a name="line523">523: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetDenominator_C"</font>,FNRationalSetDenominator_Rational);
-<a name="line524">524: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetDenominator_C"</font>,FNRationalGetDenominator_Rational);
-<a name="line525">525: </a>  <font color="#4169E1">return</font>(0);
-<a name="line526">526: </a>}
+<a name="line367">367: </a>  PetscUseMethod(fn,<font color="#666666">"FNRationalGetNumerator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**),(fn,np,pcoeff));
+<a name="line368">368: </a>  <font color="#4169E1">return</font>(0);
+<a name="line369">369: </a>}
+
+<a name="line373">373: </a><strong><font color="#4169E1"><a name="FNRationalSetDenominator_Rational"></a>static PetscErrorCode FNRationalSetDenominator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt nq,PetscScalar *qcoeff)</font></strong>
+<a name="line374">374: </a>{
+<a name="line376">376: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+<a name="line377">377: </a>  PetscInt       i;
+
+<a name="line380">380: </a>  ctx->nq = nq;
+<a name="line381">381: </a>  PetscFree(ctx->qcoeff);
+<a name="line382">382: </a>  <font color="#4169E1">if</font> (nq) {
+<a name="line383">383: </a>    PetscMalloc1(nq,&ctx->qcoeff);
+<a name="line384">384: </a>    PetscLogObjectMemory((PetscObject)fn,nq*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line385">385: </a>    <font color="#4169E1">for</font> (i=0;i<nq;i++) ctx->qcoeff[i] = qcoeff[i];
+<a name="line386">386: </a>  }
+<a name="line387">387: </a>  <font color="#4169E1">return</font>(0);
+<a name="line388">388: </a>}
+
+<a name="line392">392: </a><font color="#B22222">/*@</font>
+<a name="line393">393: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a> - Sets the parameters defining the denominator of the</font>
+<a name="line394">394: </a><font color="#B22222">   rational function.</font>
+
+<a name="line396">396: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line398">398: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line399">399: </a><font color="#B22222">+  fn     - the math function context</font>
+<a name="line400">400: </a><font color="#B22222">.  nq     - number of coefficients</font>
+<a name="line401">401: </a><font color="#B22222">-  qcoeff - coefficients (array of scalar values)</font>
+
+<a name="line403">403: </a><font color="#B22222">   Notes:</font>
+<a name="line404">404: </a><font color="#B22222">   Let the rational function r(x) = p(x)/q(x), where p(x) and q(x) are polynomials.</font>
+<a name="line405">405: </a><font color="#B22222">   This function provides the coefficients of the denominator q(x).</font>
+<a name="line406">406: </a><font color="#B22222">   Hence, q(x) is of degree nq-1.</font>
+<a name="line407">407: </a><font color="#B22222">   If nq is zero, then the function is assumed to be polynomial, r(x) = p(x).</font>
+
+<a name="line409">409: </a><font color="#B22222">   In polynomials, high order coefficients are stored in the first positions</font>
+<a name="line410">410: </a><font color="#B22222">   of the array, e.g. to represent x^2-3 use {1,0,-3}.</font>
+
+<a name="line412">412: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line414">414: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(), <a href="../../../../../../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a>()</font>
+<a name="line415">415: </a><font color="#B22222">@*/</font>
+<a name="line416">416: </a><strong><font color="#4169E1"><a name="FNRationalSetDenominator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt nq,PetscScalar *qcoeff)</font></strong>
+<a name="line417">417: </a>{
+
+<a name="line423">423: </a>  <font color="#4169E1">if</font> (nq<0) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Argument nq cannot be negative"</font>);
+<a name="line425">425: </a>  PetscTryMethod(fn,<font color="#666666">"FNRationalSetDenominator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt,PetscScalar*),(fn,nq,qcoeff));
+<a name="line426">426: </a>  <font color="#4169E1">return</font>(0);
+<a name="line427">427: </a>}
+
+<a name="line431">431: </a><strong><font color="#4169E1"><a name="FNRationalGetDenominator_Rational"></a>static PetscErrorCode FNRationalGetDenominator_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *nq,PetscScalar *qcoeff[])</font></strong>
+<a name="line432">432: </a>{
+<a name="line434">434: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+<a name="line435">435: </a>  PetscInt       i;
+
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (nq) *nq = ctx->nq;
+<a name="line439">439: </a>  <font color="#4169E1">if</font> (qcoeff) {
+<a name="line440">440: </a>    <font color="#4169E1">if</font> (!ctx->nq) *qcoeff = NULL;
+<a name="line441">441: </a>    <font color="#4169E1">else</font> {
+<a name="line442">442: </a>      PetscMalloc1(ctx->nq,qcoeff);
+<a name="line443">443: </a>      <font color="#4169E1">for</font> (i=0;i<ctx->nq;i++) (*qcoeff)[i] = ctx->qcoeff[i];
+<a name="line444">444: </a>    }
+<a name="line445">445: </a>  }
+<a name="line446">446: </a>  <font color="#4169E1">return</font>(0);
+<a name="line447">447: </a>}
+
+<a name="line451">451: </a><font color="#B22222">/*@</font>
+<a name="line452">452: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a> - Gets the parameters that define the denominator of the</font>
+<a name="line453">453: </a><font color="#B22222">   rational function.</font>
+
+<a name="line455">455: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line457">457: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line458">458: </a><font color="#B22222">.  fn     - the math function context</font>
+
+<a name="line460">460: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line461">461: </a><font color="#B22222">+  nq     - number of coefficients</font>
+<a name="line462">462: </a><font color="#B22222">-  qcoeff - coefficients (array of scalar values, length nq)</font>
+
+<a name="line464">464: </a><font color="#B22222">   Notes:</font>
+<a name="line465">465: </a><font color="#B22222">   The values passed by user with <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>() are returned (or null</font>
+<a name="line466">466: </a><font color="#B22222">   pointers otherwise).</font>
+<a name="line467">467: </a><font color="#B22222">   The qcoeff array should be freed by the user when no longer needed.</font>
+
+<a name="line469">469: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line471">471: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>()</font>
+<a name="line472">472: </a><font color="#B22222">@*/</font>
+<a name="line473">473: </a><strong><font color="#4169E1"><a name="FNRationalGetDenominator"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/FN/FNRationalGetDenominator.html#FNRationalGetDenominator">FNRationalGetDenominator</a>(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscInt *nq,PetscScalar *qcoeff[])</font></strong>
+<a name="line474">474: </a>{
+
+<a name="line479">479: </a>  PetscUseMethod(fn,<font color="#666666">"FNRationalGetDenominator_C"</font>,(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a>,PetscInt*,PetscScalar**),(fn,nq,qcoeff));
+<a name="line480">480: </a>  <font color="#4169E1">return</font>(0);
+<a name="line481">481: </a>}
+
+<a name="line485">485: </a><strong><font color="#4169E1"><a name="FNSetFromOptions_Rational"></a>PetscErrorCode FNSetFromOptions_Rational(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line486">486: </a>{
+<a name="line488">488: </a><strong><font color="#228B22">#define PARMAX 10</font></strong>
+<a name="line489">489: </a>  PetscScalar    array[PARMAX];
+<a name="line490">490: </a>  PetscInt       i,k;
+<a name="line491">491: </a>  PetscBool      flg;
+
+<a name="line494">494: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> Rational Options"</font>);
+
+<a name="line496">496: </a>  k = PARMAX;
+<a name="line497">497: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
+<a name="line498">498: </a>  PetscOptionsScalarArray(<font color="#666666">"-fn_rational_numerator"</font>,<font color="#666666">"Numerator coefficients (one or more scalar values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>"</font>,array,&k,&flg);
+<a name="line499">499: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line500">500: </a>    <a href="../../../../../../docs/manualpages/FN/FNRationalSetNumerator.html#FNRationalSetNumerator">FNRationalSetNumerator</a>(fn,k,array);
+<a name="line501">501: </a>  }
+
+<a name="line503">503: </a>  k = PARMAX;
+<a name="line504">504: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
+<a name="line505">505: </a>  PetscOptionsScalarArray(<font color="#666666">"-fn_rational_denominator"</font>,<font color="#666666">"Denominator coefficients (one or more scalar values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>"</font>,array,&k,&flg);
+<a name="line506">506: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line507">507: </a>    <a href="../../../../../../docs/manualpages/FN/FNRationalSetDenominator.html#FNRationalSetDenominator">FNRationalSetDenominator</a>(fn,k,array);
+<a name="line508">508: </a>  }
+
+<a name="line510">510: </a>  PetscOptionsTail();
+<a name="line511">511: </a>  <font color="#4169E1">return</font>(0);
+<a name="line512">512: </a>}
+
+<a name="line516">516: </a><strong><font color="#4169E1"><a name="FNDuplicate_Rational"></a>PetscErrorCode FNDuplicate_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
+<a name="line517">517: </a>{
+<a name="line519">519: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data,*ctx2;
+<a name="line520">520: </a>  PetscInt       i;
+
+<a name="line523">523: </a>  PetscNewLog(*newfn,&ctx2);
+<a name="line524">524: </a>  (*newfn)->data = (void*)ctx2;
+<a name="line525">525: </a>  ctx2->np = ctx->np;
+<a name="line526">526: </a>  <font color="#4169E1">if</font> (ctx->np) {
+<a name="line527">527: </a>    PetscMalloc1(ctx->np,&ctx2->pcoeff);
+<a name="line528">528: </a>    PetscLogObjectMemory((PetscObject)(*newfn),ctx->np*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line529">529: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->np;i++) ctx2->pcoeff[i] = ctx->pcoeff[i];
+<a name="line530">530: </a>  }
+<a name="line531">531: </a>  ctx2->nq = ctx->nq;
+<a name="line532">532: </a>  <font color="#4169E1">if</font> (ctx->nq) {
+<a name="line533">533: </a>    PetscMalloc1(ctx->nq,&ctx2->qcoeff);
+<a name="line534">534: </a>    PetscLogObjectMemory((PetscObject)(*newfn),ctx->nq*<font color="#4169E1">sizeof</font>(PetscScalar));
+<a name="line535">535: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->nq;i++) ctx2->qcoeff[i] = ctx->qcoeff[i];
+<a name="line536">536: </a>  }
+<a name="line537">537: </a>  <font color="#4169E1">return</font>(0);
+<a name="line538">538: </a>}
+
+<a name="line542">542: </a><strong><font color="#4169E1"><a name="FNDestroy_Rational"></a>PetscErrorCode FNDestroy_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line543">543: </a>{
+<a name="line545">545: </a>  FN_RATIONAL    *ctx = (FN_RATIONAL*)fn->data;
+
+<a name="line548">548: </a>  PetscFree(ctx->pcoeff);
+<a name="line549">549: </a>  PetscFree(ctx->qcoeff);
+<a name="line550">550: </a>  PetscFree(fn->data);
+<a name="line551">551: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetNumerator_C"</font>,NULL);
+<a name="line552">552: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetNumerator_C"</font>,NULL);
+<a name="line553">553: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetDenominator_C"</font>,NULL);
+<a name="line554">554: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetDenominator_C"</font>,NULL);
+<a name="line555">555: </a>  <font color="#4169E1">return</font>(0);
+<a name="line556">556: </a>}
+
+<a name="line560">560: </a><strong><font color="#4169E1"><a name="FNCreate_Rational"></a>PETSC_EXTERN PetscErrorCode FNCreate_Rational(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line561">561: </a>{
+<a name="line563">563: </a>  FN_RATIONAL    *ctx;
+
+<a name="line566">566: </a>  PetscNewLog(fn,&ctx);
+<a name="line567">567: </a>  fn->data = (void*)ctx;
+
+<a name="line569">569: </a>  fn->ops->evaluatefunction       = FNEvaluateFunction_Rational;
+<a name="line570">570: </a>  fn->ops->evaluatederivative     = FNEvaluateDerivative_Rational;
+<a name="line571">571: </a>  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Rational;
+<a name="line572">572: </a>  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Rational;
+<a name="line573">573: </a>  fn->ops->setfromoptions         = FNSetFromOptions_Rational;
+<a name="line574">574: </a>  fn->ops->view                   = FNView_Rational;
+<a name="line575">575: </a>  fn->ops->duplicate              = FNDuplicate_Rational;
+<a name="line576">576: </a>  fn->ops->destroy                = FNDestroy_Rational;
+<a name="line577">577: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetNumerator_C"</font>,FNRationalSetNumerator_Rational);
+<a name="line578">578: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetNumerator_C"</font>,FNRationalGetNumerator_Rational);
+<a name="line579">579: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalSetDenominator_C"</font>,FNRationalSetDenominator_Rational);
+<a name="line580">580: </a>  PetscObjectComposeFunction((PetscObject)fn,<font color="#666666">"FNRationalGetDenominator_C"</font>,FNRationalGetDenominator_Rational);
+<a name="line581">581: </a>  <font color="#4169E1">return</font>(0);
+<a name="line582">582: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/impls/rational/index.html b/src/sys/classes/fn/impls/rational/index.html
index 130ce7d..d505379 100644
--- a/src/sys/classes/fn/impls/rational/index.html
+++ b/src/sys/classes/fn/impls/rational/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/rational/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/rational/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/impls/rational/makefile b/src/sys/classes/fn/impls/rational/makefile
index c1f22f7..fa57f10 100644
--- a/src/sys/classes/fn/impls/rational/makefile
+++ b/src/sys/classes/fn/impls/rational/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/impls/rational/makefile.html b/src/sys/classes/fn/impls/rational/makefile.html
index 8ebf75d..b7e09f2 100644
--- a/src/sys/classes/fn/impls/rational/makefile.html
+++ b/src/sys/classes/fn/impls/rational/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/rational/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:07+00:00">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/rational/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/rational/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/impls/sqrt/fnsqrt.c b/src/sys/classes/fn/impls/sqrt/fnsqrt.c
index aa7c3b2..a8bc1e1 100644
--- a/src/sys/classes/fn/impls/sqrt/fnsqrt.c
+++ b/src/sys/classes/fn/impls/sqrt/fnsqrt.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -22,6 +22,7 @@
 */
 
 #include <slepc/private/fnimpl.h>      /*I "slepcfn.h" I*/
+#include <slepcblaslapack.h>
 
 #undef __FUNCT__
 #define __FUNCT__ "FNEvaluateFunction_Sqrt"
@@ -37,11 +38,53 @@ PetscErrorCode FNEvaluateFunction_Sqrt(FN fn,PetscScalar x,PetscScalar *y)
 PetscErrorCode FNEvaluateDerivative_Sqrt(FN fn,PetscScalar x,PetscScalar *y)
 {
   PetscFunctionBegin;
+  if (x==0.0) SETERRQ(PETSC_COMM_SELF,1,"Derivative not defined in the requested value");
   *y = 1.0/(2.0*PetscSqrtScalar(x));
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMat_Sqrt"
+PetscErrorCode FNEvaluateFunctionMat_Sqrt(FN fn,Mat A,Mat B)
+{
+  PetscErrorCode ierr;
+  PetscBLASInt   n;
+  PetscScalar    *T;
+  PetscInt       m;
+
+  PetscFunctionBegin;
+  if (A!=B) { ierr = MatCopy(A,B,SAME_NONZERO_PATTERN);CHKERRQ(ierr); }
+  ierr = MatDenseGetArray(B,&T);CHKERRQ(ierr);
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
+  ierr = SlepcSchurParlettSqrt(n,T,n,PETSC_FALSE);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(B,&T);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec_Sqrt"
+PetscErrorCode FNEvaluateFunctionMatVec_Sqrt(FN fn,Mat A,Vec v)
+{
+  PetscErrorCode ierr;
+  PetscBLASInt   n;
+  PetscScalar    *T;
+  PetscInt       m;
+  Mat            B;
+
+  PetscFunctionBegin;
+  ierr = FN_AllocateWorkMat(fn,A,&B);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(B,&T);CHKERRQ(ierr);
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
+  ierr = SlepcSchurParlettSqrt(n,T,n,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(B,&T);CHKERRQ(ierr);
+  ierr = MatGetColumnVector(B,v,0);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&B);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "FNView_Sqrt"
 PetscErrorCode FNView_Sqrt(FN fn,PetscViewer viewer)
 {
@@ -65,8 +108,10 @@ PetscErrorCode FNView_Sqrt(FN fn,PetscViewer viewer)
         ierr = PetscViewerASCIIPrintf(viewer,"  Square root: %s*sqrt(x)\n",str);CHKERRQ(ierr);
       } else {
         ierr = PetscViewerASCIIPrintf(viewer,"  Square root: %s",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
         ierr = SlepcSNPrintfScalar(str,50,fn->alpha,PETSC_TRUE);CHKERRQ(ierr);
         ierr = PetscViewerASCIIPrintf(viewer,"*sqrt(%s*x)\n",str);CHKERRQ(ierr);
+        ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
       }
     }
   }
@@ -78,9 +123,11 @@ PetscErrorCode FNView_Sqrt(FN fn,PetscViewer viewer)
 PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(FN fn)
 {
   PetscFunctionBegin;
-  fn->ops->evaluatefunction    = FNEvaluateFunction_Sqrt;
-  fn->ops->evaluatederivative  = FNEvaluateDerivative_Sqrt;
-  fn->ops->view                = FNView_Sqrt;
+  fn->ops->evaluatefunction       = FNEvaluateFunction_Sqrt;
+  fn->ops->evaluatederivative     = FNEvaluateDerivative_Sqrt;
+  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Sqrt;
+  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Sqrt;
+  fn->ops->view                   = FNView_Sqrt;
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/fn/impls/sqrt/fnsqrt.c.html b/src/sys/classes/fn/impls/sqrt/fnsqrt.c.html
index 31cacb4..7508151 100644
--- a/src/sys/classes/fn/impls/sqrt/fnsqrt.c.html
+++ b/src/sys/classes/fn/impls/sqrt/fnsqrt.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/sqrt/fnsqrt.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:07+00:00">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/sqrt/fnsqrt.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/sqrt/fnsqrt.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Square root function  sqrt(x)</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -34,55 +34,94 @@
 <a name="line22"> 22: </a><font color="#B22222">*/</font>
 
 <a name="line24"> 24: </a><font color="#A020F0">#include <slepc/private/fnimpl.h>      </font><font color="#B22222">/*I "slepcfn.h" I*/</font><font color="#A020F0"></font>
+<a name="line25"> 25: </a><font color="#A020F0">#include <slepcblaslapack.h></font>
 
-<a name="line28"> 28: </a><strong><font color="#4169E1"><a name="FNEvaluateFunction_Sqrt"></a>PetscErrorCode FNEvaluateFunction_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
-<a name="line29"> 29: </a>{
-<a name="line31"> 31: </a>  *y = PetscSqrtScalar(x);
-<a name="line32"> 32: </a>  <font color="#4169E1">return</font>(0);
-<a name="line33"> 33: </a>}
-
-<a name="line37"> 37: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Sqrt"></a>PetscErrorCode FNEvaluateDerivative_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
-<a name="line38"> 38: </a>{
-<a name="line40"> 40: </a>  *y = 1.0/(2.0*PetscSqrtScalar(x));
-<a name="line41"> 41: </a>  <font color="#4169E1">return</font>(0);
-<a name="line42"> 42: </a>}
-
-<a name="line46"> 46: </a><strong><font color="#4169E1"><a name="FNView_Sqrt"></a>PetscErrorCode FNView_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
-<a name="line47"> 47: </a>{
-<a name="line49"> 49: </a>  PetscBool      isascii;
-<a name="line50"> 50: </a>  char           str[50];
-
-<a name="line53"> 53: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line54"> 54: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line55"> 55: </a>    <font color="#4169E1">if</font> (fn->beta==(PetscScalar)1.0) {
-<a name="line56"> 56: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
-<a name="line57"> 57: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: sqrt(x)\n"</font>);
-<a name="line58"> 58: </a>      } <font color="#4169E1">else</font> {
-<a name="line59"> 59: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
-<a name="line60"> 60: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: sqrt(%s*x)\n"</font>,str);
-<a name="line61"> 61: </a>      }
-<a name="line62"> 62: </a>    } <font color="#4169E1">else</font> {
-<a name="line63"> 63: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
-<a name="line64"> 64: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
-<a name="line65"> 65: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: %s*sqrt(x)\n"</font>,str);
-<a name="line66"> 66: </a>      } <font color="#4169E1">else</font> {
-<a name="line67"> 67: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: %s"</font>,str);
-<a name="line68"> 68: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
-<a name="line69"> 69: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*sqrt(%s*x)\n"</font>,str);
-<a name="line70"> 70: </a>      }
-<a name="line71"> 71: </a>    }
-<a name="line72"> 72: </a>  }
-<a name="line73"> 73: </a>  <font color="#4169E1">return</font>(0);
-<a name="line74"> 74: </a>}
-
-<a name="line78"> 78: </a><strong><font color="#4169E1"><a name="FNCreate_Sqrt"></a>PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line79"> 79: </a>{
-<a name="line81"> 81: </a>  fn->ops->evaluatefunction    = FNEvaluateFunction_Sqrt;
-<a name="line82"> 82: </a>  fn->ops->evaluatederivative  = FNEvaluateDerivative_Sqrt;
-<a name="line83"> 83: </a>  fn->ops->view                = FNView_Sqrt;
+<a name="line29"> 29: </a><strong><font color="#4169E1"><a name="FNEvaluateFunction_Sqrt"></a>PetscErrorCode FNEvaluateFunction_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
+<a name="line30"> 30: </a>{
+<a name="line32"> 32: </a>  *y = PetscSqrtScalar(x);
+<a name="line33"> 33: </a>  <font color="#4169E1">return</font>(0);
+<a name="line34"> 34: </a>}
+
+<a name="line38"> 38: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative_Sqrt"></a>PetscErrorCode FNEvaluateDerivative_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
+<a name="line39"> 39: </a>{
+<a name="line41"> 41: </a>  <font color="#4169E1">if</font> (x==0.0) SETERRQ(PETSC_COMM_SELF,1,<font color="#666666">"Derivative not defined in the requested value"</font>);
+<a name="line42"> 42: </a>  *y = 1.0/(2.0*PetscSqrtScalar(x));
+<a name="line43"> 43: </a>  <font color="#4169E1">return</font>(0);
+<a name="line44"> 44: </a>}
+
+<a name="line48"> 48: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Sqrt"></a>PetscErrorCode FNEvaluateFunctionMat_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
+<a name="line49"> 49: </a>{
+<a name="line51"> 51: </a>  PetscBLASInt   n;
+<a name="line52"> 52: </a>  PetscScalar    *T;
+<a name="line53"> 53: </a>  PetscInt       m;
+
+<a name="line56"> 56: </a>  <font color="#4169E1">if</font> (A!=B) { MatCopy(A,B,SAME_NONZERO_PATTERN); }
+<a name="line57"> 57: </a>  MatDenseGetArray(B,&T);
+<a name="line58"> 58: </a>  MatGetSize(A,&m,NULL);
+<a name="line59"> 59: </a>  PetscBLASIntCast(m,&n);
+<a name="line60"> 60: </a>  SlepcSchurParlettSqrt(n,T,n,PETSC_FALSE);
+<a name="line61"> 61: </a>  MatDenseRestoreArray(B,&T);
+<a name="line62"> 62: </a>  <font color="#4169E1">return</font>(0);
+<a name="line63"> 63: </a>}
+
+<a name="line67"> 67: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec_Sqrt"></a>PetscErrorCode FNEvaluateFunctionMatVec_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line68"> 68: </a>{
+<a name="line70"> 70: </a>  PetscBLASInt   n;
+<a name="line71"> 71: </a>  PetscScalar    *T;
+<a name="line72"> 72: </a>  PetscInt       m;
+<a name="line73"> 73: </a>  Mat            B;
+
+<a name="line76"> 76: </a>  FN_AllocateWorkMat(fn,A,&B);
+<a name="line77"> 77: </a>  MatDenseGetArray(B,&T);
+<a name="line78"> 78: </a>  MatGetSize(A,&m,NULL);
+<a name="line79"> 79: </a>  PetscBLASIntCast(m,&n);
+<a name="line80"> 80: </a>  SlepcSchurParlettSqrt(n,T,n,PETSC_TRUE);
+<a name="line81"> 81: </a>  MatDenseRestoreArray(B,&T);
+<a name="line82"> 82: </a>  MatGetColumnVector(B,v,0);
+<a name="line83"> 83: </a>  FN_FreeWorkMat(fn,&B);
 <a name="line84"> 84: </a>  <font color="#4169E1">return</font>(0);
 <a name="line85"> 85: </a>}
 
+<a name="line89"> 89: </a><strong><font color="#4169E1"><a name="FNView_Sqrt"></a>PetscErrorCode FNView_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
+<a name="line90"> 90: </a>{
+<a name="line92"> 92: </a>  PetscBool      isascii;
+<a name="line93"> 93: </a>  char           str[50];
+
+<a name="line96"> 96: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line97"> 97: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line98"> 98: </a>    <font color="#4169E1">if</font> (fn->beta==(PetscScalar)1.0) {
+<a name="line99"> 99: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line100">100: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: sqrt(x)\n"</font>);
+<a name="line101">101: </a>      } <font color="#4169E1">else</font> {
+<a name="line102">102: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line103">103: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: sqrt(%s*x)\n"</font>,str);
+<a name="line104">104: </a>      }
+<a name="line105">105: </a>    } <font color="#4169E1">else</font> {
+<a name="line106">106: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->beta,PETSC_TRUE);
+<a name="line107">107: </a>      <font color="#4169E1">if</font> (fn->alpha==(PetscScalar)1.0) {
+<a name="line108">108: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: %s*sqrt(x)\n"</font>,str);
+<a name="line109">109: </a>      } <font color="#4169E1">else</font> {
+<a name="line110">110: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Square root: %s"</font>,str);
+<a name="line111">111: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line112">112: </a>        <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,fn->alpha,PETSC_TRUE);
+<a name="line113">113: </a>        PetscViewerASCIIPrintf(viewer,<font color="#666666">"*sqrt(%s*x)\n"</font>,str);
+<a name="line114">114: </a>        PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line115">115: </a>      }
+<a name="line116">116: </a>    }
+<a name="line117">117: </a>  }
+<a name="line118">118: </a>  <font color="#4169E1">return</font>(0);
+<a name="line119">119: </a>}
+
+<a name="line123">123: </a><strong><font color="#4169E1"><a name="FNCreate_Sqrt"></a>PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(<a href="../../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line124">124: </a>{
+<a name="line126">126: </a>  fn->ops->evaluatefunction       = FNEvaluateFunction_Sqrt;
+<a name="line127">127: </a>  fn->ops->evaluatederivative     = FNEvaluateDerivative_Sqrt;
+<a name="line128">128: </a>  fn->ops->evaluatefunctionmat    = FNEvaluateFunctionMat_Sqrt;
+<a name="line129">129: </a>  fn->ops->evaluatefunctionmatvec = FNEvaluateFunctionMatVec_Sqrt;
+<a name="line130">130: </a>  fn->ops->view                   = FNView_Sqrt;
+<a name="line131">131: </a>  <font color="#4169E1">return</font>(0);
+<a name="line132">132: </a>}
+
 </pre>
 </body>
 
diff --git a/src/sys/classes/fn/impls/sqrt/index.html b/src/sys/classes/fn/impls/sqrt/index.html
index c6ba82e..539bfef 100644
--- a/src/sys/classes/fn/impls/sqrt/index.html
+++ b/src/sys/classes/fn/impls/sqrt/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/sqrt/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/sqrt/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/impls/sqrt/makefile b/src/sys/classes/fn/impls/sqrt/makefile
index 7342a1f..e89ddad 100644
--- a/src/sys/classes/fn/impls/sqrt/makefile
+++ b/src/sys/classes/fn/impls/sqrt/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/impls/sqrt/makefile.html b/src/sys/classes/fn/impls/sqrt/makefile.html
index ba3cec4..4bca88c 100644
--- a/src/sys/classes/fn/impls/sqrt/makefile.html
+++ b/src/sys/classes/fn/impls/sqrt/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/impls/sqrt/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:07+00:00">
+<meta name="date" content="2016-05-16T10:32:00+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/impls/sqrt/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/impls/sqrt/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/index.html b/src/sys/classes/fn/index.html
index 3c9823f..37b00df 100644
--- a/src/sys/classes/fn/index.html
+++ b/src/sys/classes/fn/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/interface/fnbasic.c b/src/sys/classes/fn/interface/fnbasic.c
index 44f4aac..dccf7cd 100644
--- a/src/sys/classes/fn/interface/fnbasic.c
+++ b/src/sys/classes/fn/interface/fnbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -79,7 +79,7 @@ PetscErrorCode FNInitializePackage(void)
   /* Register Events */
   ierr = PetscLogEventRegister("FNEvaluate",FN_CLASSID,&FN_Evaluate);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"fn",&className);CHKERRQ(ierr);
     if (className) {
@@ -87,7 +87,7 @@ PetscErrorCode FNInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"fn",&className);CHKERRQ(ierr);
     if (className) {
@@ -129,7 +129,8 @@ PetscErrorCode FNCreate(MPI_Comm comm,FN *newfn)
   fn->alpha    = 1.0;
   fn->beta     = 1.0;
 
-  fn->W        = NULL;
+  fn->nw       = 0;
+  fn->cw       = 0;
   fn->data     = NULL;
 
   *newfn = fn;
@@ -211,7 +212,8 @@ PetscErrorCode FNAppendOptionsPrefix(FN fn,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
@@ -442,44 +444,37 @@ PetscErrorCode FNEvaluateDerivative(FN fn,PetscScalar x,PetscScalar *y)
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "FNEvaluateFunctionMat_Sym_Default"
-/*
-   FNEvaluateFunctionMat_Sym_Default - given a symmetric matrix A,
-   compute the matrix function as f(A)=Q*f(D)*Q' where the spectral
-   decomposition of A is A=Q*D*Q' 
-*/
-static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)
+#define __FUNCT__ "FNEvaluateFunctionMat_Sym_Private"
+static PetscErrorCode FNEvaluateFunctionMat_Sym_Private(FN fn,PetscScalar *As,PetscScalar *Bs,PetscInt m,PetscBool firstonly)
 {
-#if defined(PETSC_MISSING_LAPACK_SYEV)
+#if defined(PETSC_MISSING_LAPACK_SYEV) || defined(SLEPC_MISSING_LAPACK_LACPY)
   PetscFunctionBegin;
-  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"SYEV - Lapack routines are unavailable");
+  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"SYEV/LACPY - Lapack routines are unavailable");
 #else
   PetscErrorCode ierr;
-  PetscInt       i,j,m;
-  PetscBLASInt   n,ld,lwork,info;
-  PetscScalar    *As,*Bs,*Q,*W,*work,a,x,y,one=1.0,zero=0.0;
+  PetscInt       i,j;
+  PetscBLASInt   n,k,ld,lwork,info;
+  PetscScalar    *Q,*W,*work,a,x,y,one=1.0,zero=0.0;
   PetscReal      *eig;
 #if defined(PETSC_USE_COMPLEX)
   PetscReal      *rwork;
 #endif
 
   PetscFunctionBegin;
-  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
-  ierr = MatDenseGetArray(B,&Bs);CHKERRQ(ierr);
-  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
   ierr = PetscBLASIntCast(m,&n);CHKERRQ(ierr);
   ld = n;
+  k = firstonly? 1: n;
 
   /* workspace query and memory allocation */
   lwork = -1;
 #if defined(PETSC_USE_COMPLEX)
   PetscStackCallBLAS("LAPACKsyev",LAPACKsyev_("V","L",&n,As,&ld,NULL,&a,&lwork,NULL,&info));
   ierr = PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);CHKERRQ(ierr);
-  ierr = PetscMalloc5(m,&eig,m*m,&Q,m*m,&W,lwork,&work,PetscMax(1,3*m-2),&rwork);CHKERRQ(ierr);
+  ierr = PetscMalloc5(m,&eig,m*m,&Q,m*k,&W,lwork,&work,PetscMax(1,3*m-2),&rwork);CHKERRQ(ierr);
 #else
   PetscStackCallBLAS("LAPACKsyev",LAPACKsyev_("V","L",&n,As,&ld,NULL,&a,&lwork,&info));
   ierr = PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);CHKERRQ(ierr);
-  ierr = PetscMalloc4(m,&eig,m*m,&Q,m*m,&W,lwork,&work);CHKERRQ(ierr);
+  ierr = PetscMalloc4(m,&eig,m*m,&Q,m*k,&W,lwork,&work);CHKERRQ(ierr);
 #endif
 
   /* compute eigendecomposition */
@@ -495,19 +490,40 @@ static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)
   for (i=0;i<n;i++) {
     x = eig[i];
     ierr = (*fn->ops->evaluatefunction)(fn,x,&y);CHKERRQ(ierr);  /* y = f(x) */
-    for (j=0;j<n;j++) W[i+j*ld] = Q[j+i*ld]*y;
+    for (j=0;j<k;j++) W[i+j*ld] = Q[j+i*ld]*y;
   }
   /* Bs = Q*W */
-  PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n,&n,&n,&one,Q,&ld,W,&ld,&zero,Bs,&ld));
+  PetscStackCallBLAS("BLASgemm",BLASgemm_("N","N",&n,&k,&n,&one,Q,&ld,W,&ld,&zero,Bs,&ld));
 #if defined(PETSC_USE_COMPLEX)
   ierr = PetscFree5(eig,Q,W,work,rwork);CHKERRQ(ierr);
 #else
   ierr = PetscFree4(eig,Q,W,work);CHKERRQ(ierr);
 #endif
+  PetscFunctionReturn(0);
+#endif
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMat_Sym_Default"
+/*
+   FNEvaluateFunctionMat_Sym_Default - given a symmetric matrix A,
+   compute the matrix function as f(A)=Q*f(D)*Q' where the spectral
+   decomposition of A is A=Q*D*Q'
+*/
+static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)
+{
+  PetscErrorCode ierr;
+  PetscInt       m;
+  PetscScalar    *As,*Bs;
+
+  PetscFunctionBegin;
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  ierr = MatDenseGetArray(B,&Bs);CHKERRQ(ierr);
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMat_Sym_Private(fn,As,Bs,m,PETSC_FALSE);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
   ierr = MatDenseRestoreArray(B,&Bs);CHKERRQ(ierr);
   PetscFunctionReturn(0);
-#endif
 }
 
 #undef __FUNCT__
@@ -523,13 +539,14 @@ static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)
 -  A  - matrix on which the function must be evaluated
 
    Output Parameter:
-.  B  - matrix resulting from evaluating f(A)
+.  B  - (optional) matrix resulting from evaluating f(A)
 
    Notes:
-   The matrix A must be a sequential dense Mat, with all entries equal on
+   Matrix A must be a square sequential dense Mat, with all entries equal on
    all processes (otherwise each process will compute different results).
-   Matrix B must also be a sequential dense Mat. Both matrices must be
-   square with the same dimensions.
+   If matrix B is provided, it must also be a square sequential dense Mat, and
+   both matrices must have the same dimensions. If B is NULL (or B=A) then the
+   function will perform an in-place computation, overwriting A with f(A).
 
    If A is known to be real symmetric or complex Hermitian then it is
    recommended to set the appropriate flag with MatSetOption(), so that
@@ -540,33 +557,36 @@ static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(FN fn,Mat A,Mat B)
 
    Level: advanced
 
-.seealso: FNEvaluateFunction()
+.seealso: FNEvaluateFunction(), FNEvaluateFunctionMatVec()
 @*/
 PetscErrorCode FNEvaluateFunctionMat(FN fn,Mat A,Mat B)
 {
   PetscErrorCode ierr;
-  PetscBool      match,set,flg,symm=PETSC_FALSE;
+  PetscBool      match,set,flg,symm=PETSC_FALSE,inplace=PETSC_FALSE;
   PetscInt       m,n,n1;
-  Mat            M;
+  Mat            M,F;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(fn,FN_CLASSID,1);
   PetscValidHeaderSpecific(A,MAT_CLASSID,2);
-  PetscValidHeaderSpecific(B,MAT_CLASSID,3);
   PetscValidType(fn,1);
   PetscValidType(A,2);
-  PetscValidType(B,3);
-  if (A==B) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_WRONG,"A and B arguments must be different");
+  if (B) {
+    PetscValidHeaderSpecific(B,MAT_CLASSID,3);
+    PetscValidType(B,3);
+  } else inplace = PETSC_TRUE;
   ierr = PetscObjectTypeCompare((PetscObject)A,MATSEQDENSE,&match);CHKERRQ(ierr);
   if (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Mat A must be of type seqdense");
-  ierr = PetscObjectTypeCompare((PetscObject)B,MATSEQDENSE,&match);CHKERRQ(ierr);
-  if (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Mat B must be of type seqdense");
   ierr = MatGetSize(A,&m,&n);CHKERRQ(ierr);
   if (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Mat A is not square (has %D rows, %D cols)",m,n);
-  n1 = n;
-  ierr = MatGetSize(B,&m,&n);CHKERRQ(ierr);
-  if (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Mat B is not square (has %D rows, %D cols)",m,n);
-  if (n1!=n) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Matrices A and B must have the same dimension");
+  if (!inplace) {
+    ierr = PetscObjectTypeCompare((PetscObject)B,MATSEQDENSE,&match);CHKERRQ(ierr);
+    if (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Mat B must be of type seqdense");
+    n1 = n;
+    ierr = MatGetSize(B,&m,&n);CHKERRQ(ierr);
+    if (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Mat B is not square (has %D rows, %D cols)",m,n);
+    if (n1!=n) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Matrices A and B must have the same dimension");
+  }
 
   /* check symmetry of A */
   ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
@@ -574,30 +594,162 @@ PetscErrorCode FNEvaluateFunctionMat(FN fn,Mat A,Mat B)
 
   /* scale argument */
   if (fn->alpha!=(PetscScalar)1.0) {
-    ierr = FN_AllocateWorkMat(fn,A);CHKERRQ(ierr);
-    M = fn->W;
+    ierr = FN_AllocateWorkMat(fn,A,&M);CHKERRQ(ierr);
     ierr = MatScale(M,fn->alpha);CHKERRQ(ierr);
   } else M = A;
 
+  /* destination matrix */
+  F = inplace? A: B;
+
   /* evaluate matrix function */
   ierr = PetscLogEventBegin(FN_Evaluate,fn,0,0,0);CHKERRQ(ierr);
   ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
   if (symm) {
     if (fn->ops->evaluatefunctionmatsym) {
-      ierr = (*fn->ops->evaluatefunctionmatsym)(fn,M,B);CHKERRQ(ierr);
+      ierr = (*fn->ops->evaluatefunctionmatsym)(fn,M,F);CHKERRQ(ierr);
     } else {
-      ierr = FNEvaluateFunctionMat_Sym_Default(fn,M,B);CHKERRQ(ierr);
+      ierr = FNEvaluateFunctionMat_Sym_Default(fn,M,F);CHKERRQ(ierr);
     }
   } else {
     if (fn->ops->evaluatefunctionmat) {
-      ierr = (*fn->ops->evaluatefunctionmat)(fn,M,B);CHKERRQ(ierr);
-    } else SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Matrix functions not implemented in FN type %s",((PetscObject)fn)->type_name);
+      ierr = (*fn->ops->evaluatefunctionmat)(fn,M,F);CHKERRQ(ierr);
+    } else SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Matrix function not implemented in FN type %s",((PetscObject)fn)->type_name);
+  }
+  ierr = PetscFPTrapPop();CHKERRQ(ierr);
+  ierr = PetscLogEventEnd(FN_Evaluate,fn,0,0,0);CHKERRQ(ierr);
+
+  if (fn->alpha!=(PetscScalar)1.0) {
+    ierr = FN_FreeWorkMat(fn,&M);CHKERRQ(ierr);
+  }
+
+  /* scale result */
+  ierr = MatScale(F,fn->beta);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec_Default"
+/*
+   FNEvaluateFunctionMatVec_Default - computes the full matrix f(A)
+   and then copies the first column.
+*/
+static PetscErrorCode FNEvaluateFunctionMatVec_Default(FN fn,Mat A,Vec v)
+{
+  PetscErrorCode ierr;
+  Mat            F;
+
+  PetscFunctionBegin;
+  ierr = FN_AllocateWorkMat(fn,A,&F);CHKERRQ(ierr);
+  if (fn->ops->evaluatefunctionmat) {
+    ierr = (*fn->ops->evaluatefunctionmat)(fn,A,F);CHKERRQ(ierr);
+  } else SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Matrix function not implemented in FN type %s",((PetscObject)fn)->type_name);
+  ierr = MatGetColumnVector(F,v,0);CHKERRQ(ierr);
+  ierr = FN_FreeWorkMat(fn,&F);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec_Sym_Default"
+/*
+   FNEvaluateFunctionMatVec_Sym_Default - given a symmetric matrix A,
+   compute the matrix function as f(A)=Q*f(D)*Q' where the spectral
+   decomposition of A is A=Q*D*Q'. Only the first column is computed.
+*/
+static PetscErrorCode FNEvaluateFunctionMatVec_Sym_Default(FN fn,Mat A,Vec v)
+{
+  PetscErrorCode ierr;
+  PetscInt       m;
+  PetscScalar    *As,*vs;
+
+  PetscFunctionBegin;
+  ierr = MatDenseGetArray(A,&As);CHKERRQ(ierr);
+  ierr = VecGetArray(v,&vs);CHKERRQ(ierr);
+  ierr = MatGetSize(A,&m,NULL);CHKERRQ(ierr);
+  ierr = FNEvaluateFunctionMat_Sym_Private(fn,As,vs,m,PETSC_TRUE);CHKERRQ(ierr);
+  ierr = MatDenseRestoreArray(A,&As);CHKERRQ(ierr);
+  ierr = VecRestoreArray(v,&vs);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "FNEvaluateFunctionMatVec"
+/*@
+   FNEvaluateFunctionMatVec - Computes the first column of the matrix f(A)
+   for a given matrix A.
+
+   Logically Collective on FN
+
+   Input Parameters:
++  fn - the math function context
+-  A  - matrix on which the function must be evaluated
+
+   Output Parameter:
+.  v  - vector to hold the first column of f(A)
+
+   Notes:
+   This operation is similar to FNEvaluateFunctionMat() but returns only
+   the first column of f(A), hence saving computations in most cases.
+
+   Level: advanced
+
+.seealso: FNEvaluateFunction(), FNEvaluateFunctionMat()
+@*/
+PetscErrorCode FNEvaluateFunctionMatVec(FN fn,Mat A,Vec v)
+{
+  PetscErrorCode ierr;
+  PetscBool      match,set,flg,symm=PETSC_FALSE;
+  PetscInt       m,n;
+  Mat            M;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(fn,FN_CLASSID,1);
+  PetscValidHeaderSpecific(A,MAT_CLASSID,2);
+  PetscValidHeaderSpecific(v,VEC_CLASSID,3);
+  PetscValidType(fn,1);
+  PetscValidType(A,2);
+  PetscValidType(v,3);
+  ierr = PetscObjectTypeCompare((PetscObject)A,MATSEQDENSE,&match);CHKERRQ(ierr);
+  if (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,"Mat A must be of type seqdense");
+  ierr = MatGetSize(A,&m,&n);CHKERRQ(ierr);
+  if (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Mat A is not square (has %D rows, %D cols)",m,n);
+  ierr = VecGetSize(v,&m);CHKERRQ(ierr);
+  if (m!=n) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,"Matrix A and vector v must have the same size");
+
+  /* check symmetry of A */
+  ierr = MatIsHermitianKnown(A,&set,&flg);CHKERRQ(ierr);
+  symm = set? flg: PETSC_FALSE;
+
+  /* scale argument */
+  if (fn->alpha!=(PetscScalar)1.0) {
+    ierr = FN_AllocateWorkMat(fn,A,&M);CHKERRQ(ierr);
+    ierr = MatScale(M,fn->alpha);CHKERRQ(ierr);
+  } else M = A;
+
+  /* evaluate matrix function */
+  ierr = PetscLogEventBegin(FN_Evaluate,fn,0,0,0);CHKERRQ(ierr);
+  ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
+  if (symm) {
+    if (fn->ops->evaluatefunctionmatvecsym) {
+      ierr = (*fn->ops->evaluatefunctionmatvecsym)(fn,M,v);CHKERRQ(ierr);
+    } else {
+      ierr = FNEvaluateFunctionMatVec_Sym_Default(fn,M,v);CHKERRQ(ierr);
+    }
+  } else {
+    if (fn->ops->evaluatefunctionmatvec) {
+      ierr = (*fn->ops->evaluatefunctionmatvec)(fn,M,v);CHKERRQ(ierr);
+    } else {
+      ierr = FNEvaluateFunctionMatVec_Default(fn,M,v);CHKERRQ(ierr);
+    }
   }
   ierr = PetscFPTrapPop();CHKERRQ(ierr);
   ierr = PetscLogEventEnd(FN_Evaluate,fn,0,0,0);CHKERRQ(ierr);
 
+  if (fn->alpha!=(PetscScalar)1.0) {
+    ierr = FN_FreeWorkMat(fn,&M);CHKERRQ(ierr);
+  }
+
   /* scale result */
-  ierr = MatScale(B,fn->beta);CHKERRQ(ierr);
+  ierr = VecScale(v,fn->beta);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -650,7 +802,7 @@ PetscErrorCode FNSetFromOptions(FN fn)
     if (fn->ops->setfromoptions) {
       ierr = (*fn->ops->setfromoptions)(PetscOptionsObject,fn);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)fn);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)fn);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -759,13 +911,16 @@ PetscErrorCode FNDuplicate(FN fn,MPI_Comm comm,FN *newfn)
 PetscErrorCode FNDestroy(FN *fn)
 {
   PetscErrorCode ierr;
+  PetscInt       i;
 
   PetscFunctionBegin;
   if (!*fn) PetscFunctionReturn(0);
   PetscValidHeaderSpecific(*fn,FN_CLASSID,1);
   if (--((PetscObject)(*fn))->refct > 0) { *fn = 0; PetscFunctionReturn(0); }
   if ((*fn)->ops->destroy) { ierr = (*(*fn)->ops->destroy)(*fn);CHKERRQ(ierr); }
-  ierr = MatDestroy(&(*fn)->W);CHKERRQ(ierr);
+  for (i=0;i<(*fn)->nw;i++) {
+    ierr = MatDestroy(&(*fn)->W[i]);CHKERRQ(ierr);
+  }
   ierr = PetscHeaderDestroy(fn);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
diff --git a/src/sys/classes/fn/interface/fnbasic.c.html b/src/sys/classes/fn/interface/fnbasic.c.html
index e59d30f..131b99a 100644
--- a/src/sys/classes/fn/interface/fnbasic.c.html
+++ b/src/sys/classes/fn/interface/fnbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/interface/fnbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:04+00:00">
+<meta name="date" content="2016-05-16T10:31:56+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/interface/fnbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/interface/fnbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">     Basic routines</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -84,7 +84,7 @@
 <a name="line79"> 79: </a>  <font color="#B22222">/* Register Events */</font>
 <a name="line80"> 80: </a>  PetscLogEventRegister(<font color="#666666">"FNEvaluate"</font>,FN_CLASSID,&FN_Evaluate);
 <a name="line81"> 81: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line82"> 82: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line82"> 82: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
 <a name="line83"> 83: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line84"> 84: </a>    PetscStrstr(logList,<font color="#666666">"fn"</font>,&className);
 <a name="line85"> 85: </a>    <font color="#4169E1">if</font> (className) {
@@ -92,7 +92,7 @@
 <a name="line87"> 87: </a>    }
 <a name="line88"> 88: </a>  }
 <a name="line89"> 89: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line90"> 90: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
+<a name="line90"> 90: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
 <a name="line91"> 91: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line92"> 92: </a>    PetscStrstr(logList,<font color="#666666">"fn"</font>,&className);
 <a name="line93"> 93: </a>    <font color="#4169E1">if</font> (className) {
@@ -129,578 +129,711 @@
 <a name="line129">129: </a>  fn->alpha    = 1.0;
 <a name="line130">130: </a>  fn->beta     = 1.0;
 
-<a name="line132">132: </a>  fn->W        = NULL;
-<a name="line133">133: </a>  fn->data     = NULL;
+<a name="line132">132: </a>  fn->nw       = 0;
+<a name="line133">133: </a>  fn->cw       = 0;
+<a name="line134">134: </a>  fn->data     = NULL;
 
-<a name="line135">135: </a>  *newfn = fn;
-<a name="line136">136: </a>  <font color="#4169E1">return</font>(0);
-<a name="line137">137: </a>}
+<a name="line136">136: </a>  *newfn = fn;
+<a name="line137">137: </a>  <font color="#4169E1">return</font>(0);
+<a name="line138">138: </a>}
 
-<a name="line141">141: </a><font color="#B22222">/*@C</font>
-<a name="line142">142: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line143">143: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options in the database.</font>
+<a name="line142">142: </a><font color="#B22222">/*@C</font>
+<a name="line143">143: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line144">144: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options in the database.</font>
 
-<a name="line145">145: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+<a name="line146">146: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
 
-<a name="line147">147: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line148">148: </a><font color="#B22222">+  fn - the math function context</font>
-<a name="line149">149: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> option requests</font>
+<a name="line148">148: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line149">149: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line150">150: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> option requests</font>
 
-<a name="line151">151: </a><font color="#B22222">   Notes:</font>
-<a name="line152">152: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line153">153: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line154">154: </a><font color="#B22222">   hyphen.</font>
+<a name="line152">152: </a><font color="#B22222">   Notes:</font>
+<a name="line153">153: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line154">154: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line155">155: </a><font color="#B22222">   hyphen.</font>
 
-<a name="line156">156: </a><font color="#B22222">   Level: advanced</font>
+<a name="line157">157: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line158">158: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>()</font>
-<a name="line159">159: </a><font color="#B22222">@*/</font>
-<a name="line160">160: </a><strong><font color="#4169E1"><a name="FNSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,const char *prefix)</font></strong>
-<a name="line161">161: </a>{
+<a name="line159">159: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>()</font>
+<a name="line160">160: </a><font color="#B22222">@*/</font>
+<a name="line161">161: </a><strong><font color="#4169E1"><a name="FNSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,const char *prefix)</font></strong>
+<a name="line162">162: </a>{
 
-<a name="line166">166: </a>  PetscObjectSetOptionsPrefix((PetscObject)fn,prefix);
-<a name="line167">167: </a>  <font color="#4169E1">return</font>(0);
-<a name="line168">168: </a>}
+<a name="line167">167: </a>  PetscObjectSetOptionsPrefix((PetscObject)fn,prefix);
+<a name="line168">168: </a>  <font color="#4169E1">return</font>(0);
+<a name="line169">169: </a>}
 
-<a name="line172">172: </a><font color="#B22222">/*@C</font>
-<a name="line173">173: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line174">174: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options in the database.</font>
+<a name="line173">173: </a><font color="#B22222">/*@C</font>
+<a name="line174">174: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line175">175: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options in the database.</font>
 
-<a name="line176">176: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+<a name="line177">177: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
 
-<a name="line178">178: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line179">179: </a><font color="#B22222">+  fn - the math function context</font>
-<a name="line180">180: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> option requests</font>
+<a name="line179">179: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line180">180: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line181">181: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> option requests</font>
 
-<a name="line182">182: </a><font color="#B22222">   Notes:</font>
-<a name="line183">183: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line184">184: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+<a name="line183">183: </a><font color="#B22222">   Notes:</font>
+<a name="line184">184: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line185">185: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
 
-<a name="line186">186: </a><font color="#B22222">   Level: advanced</font>
+<a name="line187">187: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line188">188: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>()</font>
-<a name="line189">189: </a><font color="#B22222">@*/</font>
-<a name="line190">190: </a><strong><font color="#4169E1"><a name="FNAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,const char *prefix)</font></strong>
-<a name="line191">191: </a>{
+<a name="line189">189: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>()</font>
+<a name="line190">190: </a><font color="#B22222">@*/</font>
+<a name="line191">191: </a><strong><font color="#4169E1"><a name="FNAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,const char *prefix)</font></strong>
+<a name="line192">192: </a>{
 
-<a name="line196">196: </a>  PetscObjectAppendOptionsPrefix((PetscObject)fn,prefix);
-<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
-<a name="line198">198: </a>}
+<a name="line197">197: </a>  PetscObjectAppendOptionsPrefix((PetscObject)fn,prefix);
+<a name="line198">198: </a>  <font color="#4169E1">return</font>(0);
+<a name="line199">199: </a>}
 
-<a name="line202">202: </a><font color="#B22222">/*@C</font>
-<a name="line203">203: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line204">204: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options in the database.</font>
+<a name="line203">203: </a><font color="#B22222">/*@C</font>
+<a name="line204">204: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line205">205: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options in the database.</font>
 
-<a name="line206">206: </a><font color="#B22222">   Not Collective</font>
+<a name="line207">207: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line208">208: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line209">209: </a><font color="#B22222">.  fn - the math function context</font>
+<a name="line209">209: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line210">210: </a><font color="#B22222">.  fn - the math function context</font>
 
-<a name="line211">211: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line212">212: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+<a name="line212">212: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line213">213: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
 
-<a name="line214">214: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line215">215: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+<a name="line215">215: </a><font color="#B22222">   Note:</font>
+<a name="line216">216: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line217">217: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
 
-<a name="line217">217: </a><font color="#B22222">   Level: advanced</font>
+<a name="line219">219: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line219">219: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>()</font>
-<a name="line220">220: </a><font color="#B22222">@*/</font>
-<a name="line221">221: </a><strong><font color="#4169E1"><a name="FNGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,const char *prefix[])</font></strong>
-<a name="line222">222: </a>{
+<a name="line221">221: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetOptionsPrefix.html#FNSetOptionsPrefix">FNSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/FN/FNAppendOptionsPrefix.html#FNAppendOptionsPrefix">FNAppendOptionsPrefix</a>()</font>
+<a name="line222">222: </a><font color="#B22222">@*/</font>
+<a name="line223">223: </a><strong><font color="#4169E1"><a name="FNGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNGetOptionsPrefix.html#FNGetOptionsPrefix">FNGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,const char *prefix[])</font></strong>
+<a name="line224">224: </a>{
 
-<a name="line228">228: </a>  PetscObjectGetOptionsPrefix((PetscObject)fn,prefix);
-<a name="line229">229: </a>  <font color="#4169E1">return</font>(0);
-<a name="line230">230: </a>}
+<a name="line230">230: </a>  PetscObjectGetOptionsPrefix((PetscObject)fn,prefix);
+<a name="line231">231: </a>  <font color="#4169E1">return</font>(0);
+<a name="line232">232: </a>}
 
-<a name="line234">234: </a><font color="#B22222">/*@C</font>
-<a name="line235">235: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a> - Selects the type for the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> object.</font>
+<a name="line236">236: </a><font color="#B22222">/*@C</font>
+<a name="line237">237: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a> - Selects the type for the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> object.</font>
 
-<a name="line237">237: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+<a name="line239">239: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
 
-<a name="line239">239: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line240">240: </a><font color="#B22222">+  fn   - the math function context</font>
-<a name="line241">241: </a><font color="#B22222">-  type - a known type</font>
+<a name="line241">241: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line242">242: </a><font color="#B22222">+  fn   - the math function context</font>
+<a name="line243">243: </a><font color="#B22222">-  type - a known type</font>
 
-<a name="line243">243: </a><font color="#B22222">   Notes:</font>
-<a name="line244">244: </a><font color="#B22222">   The default is FNRATIONAL, which includes polynomials as a particular</font>
-<a name="line245">245: </a><font color="#B22222">   case as well as simple functions such as f(x)=x and f(x)=constant.</font>
+<a name="line245">245: </a><font color="#B22222">   Notes:</font>
+<a name="line246">246: </a><font color="#B22222">   The default is FNRATIONAL, which includes polynomials as a particular</font>
+<a name="line247">247: </a><font color="#B22222">   case as well as simple functions such as f(x)=x and f(x)=constant.</font>
 
-<a name="line247">247: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line249">249: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line249">249: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>()</font>
-<a name="line250">250: </a><font color="#B22222">@*/</font>
-<a name="line251">251: </a><strong><font color="#4169E1"><a name="FNSetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../docs/manualpages/FN/FNType.html#FNType">FNType</a> type)</font></strong>
-<a name="line252">252: </a>{
-<a name="line253">253: </a>  PetscErrorCode ierr,(*r)(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>);
-<a name="line254">254: </a>  PetscBool      match;
+<a name="line251">251: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>()</font>
+<a name="line252">252: </a><font color="#B22222">@*/</font>
+<a name="line253">253: </a><strong><font color="#4169E1"><a name="FNSetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../docs/manualpages/FN/FNType.html#FNType">FNType</a> type)</font></strong>
+<a name="line254">254: </a>{
+<a name="line255">255: </a>  PetscErrorCode ierr,(*r)(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>);
+<a name="line256">256: </a>  PetscBool      match;
 
 
-<a name="line260">260: </a>  PetscObjectTypeCompare((PetscObject)fn,type,&match);
-<a name="line261">261: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
+<a name="line262">262: </a>  PetscObjectTypeCompare((PetscObject)fn,type,&match);
+<a name="line263">263: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
 
-<a name="line263">263: </a>   PetscFunctionListFind(FNList,type,&r);
-<a name="line264">264: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unable to find requested <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type %s"</font>,type);
+<a name="line265">265: </a>   PetscFunctionListFind(FNList,type,&r);
+<a name="line266">266: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unable to find requested <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type %s"</font>,type);
 
-<a name="line266">266: </a>  <font color="#4169E1">if</font> (fn->ops->destroy) { (*fn->ops->destroy)(fn); }
-<a name="line267">267: </a>  PetscMemzero(fn->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _FNOps</font>));
+<a name="line268">268: </a>  <font color="#4169E1">if</font> (fn->ops->destroy) { (*fn->ops->destroy)(fn); }
+<a name="line269">269: </a>  PetscMemzero(fn->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _FNOps</font>));
 
-<a name="line269">269: </a>  PetscObjectChangeTypeName((PetscObject)fn,type);
-<a name="line270">270: </a>  (*r)(fn);
-<a name="line271">271: </a>  <font color="#4169E1">return</font>(0);
-<a name="line272">272: </a>}
+<a name="line271">271: </a>  PetscObjectChangeTypeName((PetscObject)fn,type);
+<a name="line272">272: </a>  (*r)(fn);
+<a name="line273">273: </a>  <font color="#4169E1">return</font>(0);
+<a name="line274">274: </a>}
 
-<a name="line276">276: </a><font color="#B22222">/*@C</font>
-<a name="line277">277: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a> - Gets the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type name (as a string) from the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> context.</font>
+<a name="line278">278: </a><font color="#B22222">/*@C</font>
+<a name="line279">279: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a> - Gets the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type name (as a string) from the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> context.</font>
 
-<a name="line279">279: </a><font color="#B22222">   Not Collective</font>
+<a name="line281">281: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line281">281: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line282">282: </a><font color="#B22222">.  fn - the math function context</font>
+<a name="line283">283: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line284">284: </a><font color="#B22222">.  fn - the math function context</font>
 
-<a name="line284">284: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line285">285: </a><font color="#B22222">.  name - name of the math function</font>
+<a name="line286">286: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line287">287: </a><font color="#B22222">.  name - name of the math function</font>
 
-<a name="line287">287: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line289">289: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line289">289: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>()</font>
-<a name="line290">290: </a><font color="#B22222">@*/</font>
-<a name="line291">291: </a><strong><font color="#4169E1"><a name="FNGetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../docs/manualpages/FN/FNType.html#FNType">FNType</a> *type)</font></strong>
-<a name="line292">292: </a>{
-<a name="line296">296: </a>  *type = ((PetscObject)fn)->type_name;
-<a name="line297">297: </a>  <font color="#4169E1">return</font>(0);
-<a name="line298">298: </a>}
+<a name="line291">291: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>()</font>
+<a name="line292">292: </a><font color="#B22222">@*/</font>
+<a name="line293">293: </a><strong><font color="#4169E1"><a name="FNGetType"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,<a href="../../../../../docs/manualpages/FN/FNType.html#FNType">FNType</a> *type)</font></strong>
+<a name="line294">294: </a>{
+<a name="line298">298: </a>  *type = ((PetscObject)fn)->type_name;
+<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
+<a name="line300">300: </a>}
 
-<a name="line302">302: </a><font color="#B22222">/*@</font>
-<a name="line303">303: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a> - Sets the scaling parameters that define the matematical function.</font>
+<a name="line304">304: </a><font color="#B22222">/*@</font>
+<a name="line305">305: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a> - Sets the scaling parameters that define the matematical function.</font>
 
-<a name="line305">305: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+<a name="line307">307: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
 
-<a name="line307">307: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line308">308: </a><font color="#B22222">+  fn    - the math function context</font>
-<a name="line309">309: </a><font color="#B22222">.  alpha - inner scaling (argument)</font>
-<a name="line310">310: </a><font color="#B22222">-  beta  - outer scaling (result)</font>
+<a name="line309">309: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line310">310: </a><font color="#B22222">+  fn    - the math function context</font>
+<a name="line311">311: </a><font color="#B22222">.  alpha - inner scaling (argument)</font>
+<a name="line312">312: </a><font color="#B22222">-  beta  - outer scaling (result)</font>
 
-<a name="line312">312: </a><font color="#B22222">   Notes:</font>
-<a name="line313">313: </a><font color="#B22222">   Given a function f(x) specified by the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type, the scaling parameters can</font>
-<a name="line314">314: </a><font color="#B22222">   be used to realize the function beta*f(alpha*x). So when these values are given,</font>
-<a name="line315">315: </a><font color="#B22222">   the procedure for function evaluation will first multiply the argument by alpha,</font>
-<a name="line316">316: </a><font color="#B22222">   then evaluate the function itself, and finally scale the result by beta.</font>
-<a name="line317">317: </a><font color="#B22222">   Likewise, these values are also considered when evaluating the derivative.</font>
+<a name="line314">314: </a><font color="#B22222">   Notes:</font>
+<a name="line315">315: </a><font color="#B22222">   Given a function f(x) specified by the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type, the scaling parameters can</font>
+<a name="line316">316: </a><font color="#B22222">   be used to realize the function beta*f(alpha*x). So when these values are given,</font>
+<a name="line317">317: </a><font color="#B22222">   the procedure for function evaluation will first multiply the argument by alpha,</font>
+<a name="line318">318: </a><font color="#B22222">   then evaluate the function itself, and finally scale the result by beta.</font>
+<a name="line319">319: </a><font color="#B22222">   Likewise, these values are also considered when evaluating the derivative.</font>
 
-<a name="line319">319: </a><font color="#B22222">   If you want to provide only one of the two scaling factors, set the other</font>
-<a name="line320">320: </a><font color="#B22222">   one to 1.0.</font>
+<a name="line321">321: </a><font color="#B22222">   If you want to provide only one of the two scaling factors, set the other</font>
+<a name="line322">322: </a><font color="#B22222">   one to 1.0.</font>
 
-<a name="line322">322: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line324">324: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line324">324: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(), <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>()</font>
-<a name="line325">325: </a><font color="#B22222">@*/</font>
-<a name="line326">326: </a><strong><font color="#4169E1"><a name="FNSetScale"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar alpha,PetscScalar beta)</font></strong>
-<a name="line327">327: </a>{
-<a name="line332">332: </a>  fn->alpha = alpha;
-<a name="line333">333: </a>  fn->beta  = beta;
-<a name="line334">334: </a>  <font color="#4169E1">return</font>(0);
-<a name="line335">335: </a>}
+<a name="line326">326: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(), <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>()</font>
+<a name="line327">327: </a><font color="#B22222">@*/</font>
+<a name="line328">328: </a><strong><font color="#4169E1"><a name="FNSetScale"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar alpha,PetscScalar beta)</font></strong>
+<a name="line329">329: </a>{
+<a name="line334">334: </a>  fn->alpha = alpha;
+<a name="line335">335: </a>  fn->beta  = beta;
+<a name="line336">336: </a>  <font color="#4169E1">return</font>(0);
+<a name="line337">337: </a>}
 
-<a name="line339">339: </a><font color="#B22222">/*@</font>
-<a name="line340">340: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a> - Gets the scaling parameters that define the matematical function.</font>
-
-<a name="line342">342: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line344">344: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line345">345: </a><font color="#B22222">.  fn    - the math function context</font>
-
-<a name="line347">347: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line348">348: </a><font color="#B22222">+  alpha - inner scaling (argument)</font>
-<a name="line349">349: </a><font color="#B22222">-  beta  - outer scaling (result)</font>
-
-<a name="line351">351: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line353">353: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>()</font>
-<a name="line354">354: </a><font color="#B22222">@*/</font>
-<a name="line355">355: </a><strong><font color="#4169E1"><a name="FNGetScale"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar *alpha,PetscScalar *beta)</font></strong>
-<a name="line356">356: </a>{
-<a name="line359">359: </a>  <font color="#4169E1">if</font> (alpha) *alpha = fn->alpha;
-<a name="line360">360: </a>  <font color="#4169E1">if</font> (beta)  *beta  = fn->beta;
-<a name="line361">361: </a>  <font color="#4169E1">return</font>(0);
-<a name="line362">362: </a>}
-
-<a name="line366">366: </a><font color="#B22222">/*@</font>
-<a name="line367">367: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a> - Computes the value of the function f(x) for a given x.</font>
-
-<a name="line369">369: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line371">371: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line372">372: </a><font color="#B22222">+  fn - the math function context</font>
-<a name="line373">373: </a><font color="#B22222">-  x  - the value where the function must be evaluated</font>
-
-<a name="line375">375: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line376">376: </a><font color="#B22222">.  y  - the result of f(x)</font>
-
-<a name="line378">378: </a><font color="#B22222">   Note:</font>
-<a name="line379">379: </a><font color="#B22222">   Scaling factors are taken into account, so the actual function evaluation</font>
-<a name="line380">380: </a><font color="#B22222">   will return beta*f(alpha*x).</font>
-
-<a name="line382">382: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line384">384: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(), <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(), <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>()</font>
-<a name="line385">385: </a><font color="#B22222">@*/</font>
-<a name="line386">386: </a><strong><font color="#4169E1"><a name="FNEvaluateFunction"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
-<a name="line387">387: </a>{
-<a name="line389">389: </a>  PetscScalar    xf,yf;
-
-<a name="line396">396: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
-<a name="line397">397: </a>  xf = fn->alpha*x;
-<a name="line398">398: </a>  (*fn->ops->evaluatefunction)(fn,xf,&yf);
-<a name="line399">399: </a>  *y = fn->beta*yf;
-<a name="line400">400: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
-<a name="line401">401: </a>  <font color="#4169E1">return</font>(0);
-<a name="line402">402: </a>}
-
-<a name="line406">406: </a><font color="#B22222">/*@</font>
-<a name="line407">407: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a> - Computes the value of the derivative f'(x) for a given x.</font>
-
-<a name="line409">409: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line411">411: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line412">412: </a><font color="#B22222">+  fn - the math function context</font>
-<a name="line413">413: </a><font color="#B22222">-  x  - the value where the derivative must be evaluated</font>
-
-<a name="line415">415: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line416">416: </a><font color="#B22222">.  y  - the result of f'(x)</font>
-
-<a name="line418">418: </a><font color="#B22222">   Note:</font>
-<a name="line419">419: </a><font color="#B22222">   Scaling factors are taken into account, so the actual derivative evaluation will</font>
-<a name="line420">420: </a><font color="#B22222">   return alpha*beta*f'(alpha*x).</font>
-
-<a name="line422">422: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line424">424: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>()</font>
-<a name="line425">425: </a><font color="#B22222">@*/</font>
-<a name="line426">426: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
-<a name="line427">427: </a>{
-<a name="line429">429: </a>  PetscScalar    xf,yf;
-
-<a name="line436">436: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
-<a name="line437">437: </a>  xf = fn->alpha*x;
-<a name="line438">438: </a>  (*fn->ops->evaluatederivative)(fn,xf,&yf);
-<a name="line439">439: </a>  *y = fn->alpha*fn->beta*yf;
-<a name="line440">440: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
-<a name="line441">441: </a>  <font color="#4169E1">return</font>(0);
-<a name="line442">442: </a>}
-
-<a name="line446">446: </a><font color="#B22222">/*</font>
-<a name="line447">447: </a><font color="#B22222">   FNEvaluateFunctionMat_Sym_Default - given a symmetric matrix A,</font>
-<a name="line448">448: </a><font color="#B22222">   compute the matrix function as f(A)=Q*f(D)*Q' where the spectral</font>
-<a name="line449">449: </a><font color="#B22222">   decomposition of A is A=Q*D*Q' </font>
-<a name="line450">450: </a><font color="#B22222">*/</font>
-<a name="line451">451: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Sym_Default"></a>static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
-<a name="line452">452: </a>{
-<a name="line453">453: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_SYEV)</font>
-<a name="line455">455: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"SYEV - Lapack routines are unavailable"</font>);
-<a name="line456">456: </a><font color="#A020F0">#else</font>
-<a name="line458">458: </a>  PetscInt       i,j,m;
-<a name="line459">459: </a>  PetscBLASInt   n,ld,lwork,info;
-<a name="line460">460: </a>  PetscScalar    *As,*Bs,*Q,*W,*work,a,x,y,one=1.0,zero=0.0;
-<a name="line461">461: </a>  PetscReal      *eig;
-<a name="line462">462: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line463">463: </a>  PetscReal      *rwork;
-<a name="line464">464: </a><font color="#A020F0">#endif</font>
-
-<a name="line467">467: </a>  MatDenseGetArray(A,&As);
-<a name="line468">468: </a>  MatDenseGetArray(B,&Bs);
-<a name="line469">469: </a>  MatGetSize(A,&m,NULL);
-<a name="line470">470: </a>  PetscBLASIntCast(m,&n);
-<a name="line471">471: </a>  ld = n;
-
-<a name="line473">473: </a>  <font color="#B22222">/* workspace query and memory allocation */</font>
-<a name="line474">474: </a>  lwork = -1;
-<a name="line475">475: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line476">476: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,As,&ld,NULL,&a,&lwork,NULL,&info));
-<a name="line477">477: </a>  PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);
-<a name="line478">478: </a>  PetscMalloc5(m,&eig,m*m,&Q,m*m,&W,lwork,&work,PetscMax(1,3*m-2),&rwork);
-<a name="line479">479: </a><font color="#A020F0">#else</font>
-<a name="line480">480: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,As,&ld,NULL,&a,&lwork,&info));
-<a name="line481">481: </a>  PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);
-<a name="line482">482: </a>  PetscMalloc4(m,&eig,m*m,&Q,m*m,&W,lwork,&work);
-<a name="line483">483: </a><font color="#A020F0">#endif</font>
-
-<a name="line485">485: </a>  <font color="#B22222">/* compute eigendecomposition */</font>
-<a name="line486">486: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKlacpy"</font>,LAPACKlacpy_(<font color="#666666">"L"</font>,&n,&n,As,&ld,Q,&ld));
-<a name="line487">487: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line488">488: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,Q,&ld,eig,work,&lwork,rwork,&info));
-<a name="line489">489: </a><font color="#A020F0">#else</font>
-<a name="line490">490: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,Q,&ld,eig,work,&lwork,&info));
-<a name="line491">491: </a><font color="#A020F0">#endif</font>
-<a name="line492">492: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xSYEV %i"</font>,info);
-
-<a name="line494">494: </a>  <font color="#B22222">/* W = f(Lambda)*Q' */</font>
-<a name="line495">495: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line496">496: </a>    x = eig[i];
-<a name="line497">497: </a>    (*fn->ops->evaluatefunction)(fn,x,&y);  <font color="#B22222">/* y = f(x) */</font>
-<a name="line498">498: </a>    <font color="#4169E1">for</font> (j=0;j<n;j++) W[i+j*ld] = Q[j+i*ld]*y;
-<a name="line499">499: </a>  }
-<a name="line500">500: </a>  <font color="#B22222">/* Bs = Q*W */</font>
-<a name="line501">501: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&n,&n,&one,Q,&ld,W,&ld,&zero,Bs,&ld));
-<a name="line502">502: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line503">503: </a>  PetscFree5(eig,Q,W,work,rwork);
-<a name="line504">504: </a><font color="#A020F0">#else</font>
-<a name="line505">505: </a>  PetscFree4(eig,Q,W,work);
-<a name="line506">506: </a><font color="#A020F0">#endif</font>
-<a name="line507">507: </a>  MatDenseRestoreArray(A,&As);
-<a name="line508">508: </a>  MatDenseRestoreArray(B,&Bs);
-<a name="line509">509: </a>  <font color="#4169E1">return</font>(0);
-<a name="line510">510: </a><font color="#A020F0">#endif</font>
-<a name="line511">511: </a>}
-
-<a name="line515">515: </a><font color="#B22222">/*@</font>
-<a name="line516">516: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a> - Computes the value of the function f(A) for a given</font>
-<a name="line517">517: </a><font color="#B22222">   matrix A, where the result is also a matrix.</font>
-
-<a name="line519">519: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line521">521: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line522">522: </a><font color="#B22222">+  fn - the math function context</font>
-<a name="line523">523: </a><font color="#B22222">-  A  - matrix on which the function must be evaluated</font>
-
-<a name="line525">525: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line526">526: </a><font color="#B22222">.  B  - matrix resulting from evaluating f(A)</font>
-
-<a name="line528">528: </a><font color="#B22222">   Notes:</font>
-<a name="line529">529: </a><font color="#B22222">   The matrix A must be a sequential dense Mat, with all entries equal on</font>
-<a name="line530">530: </a><font color="#B22222">   all processes (otherwise each process will compute different results).</font>
-<a name="line531">531: </a><font color="#B22222">   Matrix B must also be a sequential dense Mat. Both matrices must be</font>
-<a name="line532">532: </a><font color="#B22222">   square with the same dimensions.</font>
-
-<a name="line534">534: </a><font color="#B22222">   If A is known to be real symmetric or complex Hermitian then it is</font>
-<a name="line535">535: </a><font color="#B22222">   recommended to set the appropriate flag with MatSetOption(), so that</font>
-<a name="line536">536: </a><font color="#B22222">   a different algorithm that exploits symmetry is used.</font>
-
-<a name="line538">538: </a><font color="#B22222">   Scaling factors are taken into account, so the actual function evaluation</font>
-<a name="line539">539: </a><font color="#B22222">   will return beta*f(alpha*A).</font>
-
-<a name="line541">541: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line543">543: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>()</font>
-<a name="line544">544: </a><font color="#B22222">@*/</font>
-<a name="line545">545: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
-<a name="line546">546: </a>{
-<a name="line548">548: </a>  PetscBool      match,set,flg,symm=PETSC_FALSE;
-<a name="line549">549: </a>  PetscInt       m,n,n1;
-<a name="line550">550: </a>  Mat            M;
-
-<a name="line559">559: </a>  <font color="#4169E1">if</font> (A==B) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_WRONG,<font color="#666666">"A and B arguments must be different"</font>);
-<a name="line560">560: </a>  PetscObjectTypeCompare((PetscObject)A,MATSEQDENSE,&match);
-<a name="line561">561: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Mat A must be of type seqdense"</font>);
-<a name="line562">562: </a>  PetscObjectTypeCompare((PetscObject)B,MATSEQDENSE,&match);
-<a name="line563">563: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Mat B must be of type seqdense"</font>);
-<a name="line564">564: </a>  MatGetSize(A,&m,&n);
-<a name="line565">565: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat A is not square (has %D rows, %D cols)"</font>,m,n);
-<a name="line566">566: </a>  n1 = n;
-<a name="line567">567: </a>  MatGetSize(B,&m,&n);
-<a name="line568">568: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat B is not square (has %D rows, %D cols)"</font>,m,n);
-<a name="line569">569: </a>  <font color="#4169E1">if</font> (n1!=n) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrices A and B must have the same dimension"</font>);
-
-<a name="line571">571: </a>  <font color="#B22222">/* check symmetry of A */</font>
-<a name="line572">572: </a>  MatIsHermitianKnown(A,&set,&flg);
-<a name="line573">573: </a>  symm = set? flg: PETSC_FALSE;
-
-<a name="line575">575: </a>  <font color="#B22222">/* scale argument */</font>
-<a name="line576">576: </a>  <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0) {
-<a name="line577">577: </a>    FN_AllocateWorkMat(fn,A);
-<a name="line578">578: </a>    M = fn->W;
-<a name="line579">579: </a>    MatScale(M,fn->alpha);
-<a name="line580">580: </a>  } <font color="#4169E1">else</font> M = A;
-
-<a name="line582">582: </a>  <font color="#B22222">/* evaluate matrix function */</font>
-<a name="line583">583: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
-<a name="line584">584: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
-<a name="line585">585: </a>  <font color="#4169E1">if</font> (symm) {
-<a name="line586">586: </a>    <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmatsym) {
-<a name="line587">587: </a>      (*fn->ops->evaluatefunctionmatsym)(fn,M,B);
-<a name="line588">588: </a>    } <font color="#4169E1">else</font> {
-<a name="line589">589: </a>      FNEvaluateFunctionMat_Sym_Default(fn,M,B);
-<a name="line590">590: </a>    }
-<a name="line591">591: </a>  } <font color="#4169E1">else</font> {
-<a name="line592">592: </a>    <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmat) {
-<a name="line593">593: </a>      (*fn->ops->evaluatefunctionmat)(fn,M,B);
-<a name="line594">594: </a>    } <font color="#4169E1">else</font> SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Matrix functions not implemented in <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type %s"</font>,((PetscObject)fn)->type_name);
-<a name="line595">595: </a>  }
-<a name="line596">596: </a>  PetscFPTrapPop();
-<a name="line597">597: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
-
-<a name="line599">599: </a>  <font color="#B22222">/* scale result */</font>
-<a name="line600">600: </a>  MatScale(B,fn->beta);
-<a name="line601">601: </a>  <font color="#4169E1">return</font>(0);
-<a name="line602">602: </a>}
-
-<a name="line606">606: </a><font color="#B22222">/*@</font>
-<a name="line607">607: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a> - Sets <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options from the options database.</font>
-
-<a name="line609">609: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line611">611: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line612">612: </a><font color="#B22222">.  fn - the math function context</font>
-
-<a name="line614">614: </a><font color="#B22222">   Notes:</font>
-<a name="line615">615: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line617">617: </a><font color="#B22222">   Level: beginner</font>
-<a name="line618">618: </a><font color="#B22222">@*/</font>
-<a name="line619">619: </a><strong><font color="#4169E1"><a name="FNSetFromOptions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
-<a name="line620">620: </a>{
-<a name="line622">622: </a>  char           type[256];
-<a name="line623">623: </a>  PetscScalar    array[2];
-<a name="line624">624: </a>  PetscInt       k;
-<a name="line625">625: </a>  PetscBool      flg;
-
-<a name="line629">629: </a>  <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a>();
-<a name="line630">630: </a>  PetscObjectOptionsBegin((PetscObject)fn);
-<a name="line631">631: </a>    PetscOptionsFList(<font color="#666666">"-fn_type"</font>,<font color="#666666">"Math function type"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>"</font>,FNList,(char*)(((PetscObject)fn)->type_name?((PetscObject)fn)->type_name:FNRATIONAL),type,256,&flg);
-<a name="line632">632: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line633">633: </a>      <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,type);
-<a name="line634">634: </a>    }
-<a name="line635">635: </a>    <font color="#B22222">/*</font>
-<a name="line636">636: </a><font color="#B22222">      Set the type if it was never set.</font>
-<a name="line637">637: </a><font color="#B22222">    */</font>
-<a name="line638">638: </a>    <font color="#4169E1">if</font> (!((PetscObject)fn)->type_name) {
-<a name="line639">639: </a>      <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNRATIONAL);
-<a name="line640">640: </a>    }
-
-<a name="line642">642: </a>    k = 2;
-<a name="line643">643: </a>    array[0] = 0.0; array[1] = 0.0;
-<a name="line644">644: </a>    PetscOptionsScalarArray(<font color="#666666">"-fn_scale"</font>,<font color="#666666">"Scale factors (one or two scalar values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>"</font>,array,&k,&flg);
-<a name="line645">645: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line646">646: </a>      <font color="#4169E1">if</font> (k<2) array[1] = 1.0;
-<a name="line647">647: </a>      <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,array[0],array[1]);
-<a name="line648">648: </a>    }
-
-<a name="line650">650: </a>    <font color="#4169E1">if</font> (fn->ops->setfromoptions) {
-<a name="line651">651: </a>      (*fn->ops->setfromoptions)(PetscOptionsObject,fn);
-<a name="line652">652: </a>    }
-<a name="line653">653: </a>    PetscObjectProcessOptionsHandlers((PetscObject)fn);
-<a name="line654">654: </a>  PetscOptionsEnd();
-<a name="line655">655: </a>  <font color="#4169E1">return</font>(0);
-<a name="line656">656: </a>}
-
-<a name="line660">660: </a><font color="#B22222">/*@C</font>
-<a name="line661">661: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a> - Prints the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> data structure.</font>
-
-<a name="line663">663: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line665">665: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line666">666: </a><font color="#B22222">+  fn - the math function context</font>
-<a name="line667">667: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line669">669: </a><font color="#B22222">   Note:</font>
-<a name="line670">670: </a><font color="#B22222">   The available visualization contexts include</font>
-<a name="line671">671: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
-<a name="line672">672: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
-<a name="line673">673: </a><font color="#B22222">         output where only the first processor opens</font>
-<a name="line674">674: </a><font color="#B22222">         the file.  All other processors send their</font>
-<a name="line675">675: </a><font color="#B22222">         data to the first processor to print.</font>
-
-<a name="line677">677: </a><font color="#B22222">   The user can open an alternative visualization context with</font>
-<a name="line678">678: </a><font color="#B22222">   PetscViewerASCIIOpen() - output to a specified file.</font>
-
-<a name="line680">680: </a><font color="#B22222">   Level: beginner</font>
-<a name="line681">681: </a><font color="#B22222">@*/</font>
-<a name="line682">682: </a><strong><font color="#4169E1"><a name="FNView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
-<a name="line683">683: </a>{
-<a name="line684">684: </a>  PetscBool      isascii;
-
-<a name="line689">689: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fn));
-<a name="line692">692: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line693">693: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line694">694: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)fn,viewer);
-<a name="line695">695: </a>    <font color="#4169E1">if</font> (fn->ops->view) {
-<a name="line696">696: </a>      PetscViewerASCIIPushTab(viewer);
-<a name="line697">697: </a>      (*fn->ops->view)(fn,viewer);
-<a name="line698">698: </a>      PetscViewerASCIIPopTab(viewer);
-<a name="line699">699: </a>    }
-<a name="line700">700: </a>  }
-<a name="line701">701: </a>  <font color="#4169E1">return</font>(0);
-<a name="line702">702: </a>}
-
-<a name="line706">706: </a><font color="#B22222">/*@</font>
-<a name="line707">707: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a> - Duplicates a math function, copying all parameters, possibly with a</font>
-<a name="line708">708: </a><font color="#B22222">   different communicator.</font>
-
-<a name="line710">710: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line712">712: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line713">713: </a><font color="#B22222">+  fn   - the math function context</font>
-<a name="line714">714: </a><font color="#B22222">-  comm - MPI communicator (may be NULL)</font>
-
-<a name="line716">716: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line717">717: </a><font color="#B22222">.  newfn - location to put the new <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> context</font>
-
-<a name="line719">719: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line721">721: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>()</font>
-<a name="line722">722: </a><font color="#B22222">@*/</font>
-<a name="line723">723: </a><strong><font color="#4169E1"><a name="FNDuplicate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
-<a name="line724">724: </a>{
-<a name="line726">726: </a>  <a href="../../../../../docs/manualpages/FN/FNType.html#FNType">FNType</a>         type;
-<a name="line727">727: </a>  PetscScalar    alpha,beta;
-
-<a name="line733">733: </a>  <font color="#4169E1">if</font> (!comm) comm = PetscObjectComm((PetscObject)fn);
-<a name="line734">734: </a>  <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(comm,newfn);
-<a name="line735">735: </a>  <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>(fn,&type);
-<a name="line736">736: </a>  <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(*newfn,type);
-<a name="line737">737: </a>  <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(fn,&alpha,&beta);
-<a name="line738">738: </a>  <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(*newfn,alpha,beta);
-<a name="line739">739: </a>  <font color="#4169E1">if</font> (fn->ops->duplicate) {
-<a name="line740">740: </a>    (*fn->ops->duplicate)(fn,comm,newfn);
-<a name="line741">741: </a>  }
-<a name="line742">742: </a>  <font color="#4169E1">return</font>(0);
-<a name="line743">743: </a>}
-
-<a name="line747">747: </a><font color="#B22222">/*@</font>
-<a name="line748">748: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a> - Destroys <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> context that was created with <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>().</font>
-
-<a name="line750">750: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-
-<a name="line752">752: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line753">753: </a><font color="#B22222">.  fn - the math function context</font>
-
-<a name="line755">755: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line757">757: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>()</font>
-<a name="line758">758: </a><font color="#B22222">@*/</font>
-<a name="line759">759: </a><strong><font color="#4169E1"><a name="FNDestroy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *fn)</font></strong>
-<a name="line760">760: </a>{
-
-<a name="line764">764: </a>  <font color="#4169E1">if</font> (!*fn) <font color="#4169E1">return</font>(0);
-<a name="line766">766: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*fn))->refct > 0) { *fn = 0; <font color="#4169E1">return</font>(0); }
-<a name="line767">767: </a>  <font color="#4169E1">if</font> ((*fn)->ops->destroy) { (*(*fn)->ops->destroy)(*fn); }
-<a name="line768">768: </a>  MatDestroy(&(*fn)->W);
-<a name="line769">769: </a>  PetscHeaderDestroy(fn);
-<a name="line770">770: </a>  <font color="#4169E1">return</font>(0);
-<a name="line771">771: </a>}
-
-<a name="line775">775: </a><font color="#B22222">/*@C</font>
-<a name="line776">776: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a> - See Adds a mathematical function to the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> package.</font>
-
-<a name="line778">778: </a><font color="#B22222">   Not collective</font>
-
-<a name="line780">780: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line781">781: </a><font color="#B22222">+  name - name of a new user-defined <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
-<a name="line782">782: </a><font color="#B22222">-  function - routine to create context</font>
-
-<a name="line784">784: </a><font color="#B22222">   Notes:</font>
-<a name="line785">785: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>() may be called multiple times to add several user-defined inner products.</font>
-
-<a name="line787">787: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line789">789: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a>()</font>
-<a name="line790">790: </a><font color="#B22222">@*/</font>
-<a name="line791">791: </a><strong><font color="#4169E1"><a name="FNRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>))</font></strong>
-<a name="line792">792: </a>{
-
-<a name="line796">796: </a>  PetscFunctionListAdd(&FNList,name,function);
-<a name="line797">797: </a>  <font color="#4169E1">return</font>(0);
-<a name="line798">798: </a>}
+<a name="line341">341: </a><font color="#B22222">/*@</font>
+<a name="line342">342: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a> - Gets the scaling parameters that define the matematical function.</font>
+
+<a name="line344">344: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line346">346: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line347">347: </a><font color="#B22222">.  fn    - the math function context</font>
+
+<a name="line349">349: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line350">350: </a><font color="#B22222">+  alpha - inner scaling (argument)</font>
+<a name="line351">351: </a><font color="#B22222">-  beta  - outer scaling (result)</font>
+
+<a name="line353">353: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line355">355: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>()</font>
+<a name="line356">356: </a><font color="#B22222">@*/</font>
+<a name="line357">357: </a><strong><font color="#4169E1"><a name="FNGetScale"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar *alpha,PetscScalar *beta)</font></strong>
+<a name="line358">358: </a>{
+<a name="line361">361: </a>  <font color="#4169E1">if</font> (alpha) *alpha = fn->alpha;
+<a name="line362">362: </a>  <font color="#4169E1">if</font> (beta)  *beta  = fn->beta;
+<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
+<a name="line364">364: </a>}
+
+<a name="line368">368: </a><font color="#B22222">/*@</font>
+<a name="line369">369: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a> - Computes the value of the function f(x) for a given x.</font>
+
+<a name="line371">371: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line373">373: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line374">374: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line375">375: </a><font color="#B22222">-  x  - the value where the function must be evaluated</font>
+
+<a name="line377">377: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line378">378: </a><font color="#B22222">.  y  - the result of f(x)</font>
+
+<a name="line380">380: </a><font color="#B22222">   Note:</font>
+<a name="line381">381: </a><font color="#B22222">   Scaling factors are taken into account, so the actual function evaluation</font>
+<a name="line382">382: </a><font color="#B22222">   will return beta*f(alpha*x).</font>
+
+<a name="line384">384: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line386">386: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(), <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(), <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>()</font>
+<a name="line387">387: </a><font color="#B22222">@*/</font>
+<a name="line388">388: </a><strong><font color="#4169E1"><a name="FNEvaluateFunction"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
+<a name="line389">389: </a>{
+<a name="line391">391: </a>  PetscScalar    xf,yf;
+
+<a name="line398">398: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
+<a name="line399">399: </a>  xf = fn->alpha*x;
+<a name="line400">400: </a>  (*fn->ops->evaluatefunction)(fn,xf,&yf);
+<a name="line401">401: </a>  *y = fn->beta*yf;
+<a name="line402">402: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
+<a name="line403">403: </a>  <font color="#4169E1">return</font>(0);
+<a name="line404">404: </a>}
+
+<a name="line408">408: </a><font color="#B22222">/*@</font>
+<a name="line409">409: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a> - Computes the value of the derivative f'(x) for a given x.</font>
+
+<a name="line411">411: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line413">413: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line414">414: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line415">415: </a><font color="#B22222">-  x  - the value where the derivative must be evaluated</font>
+
+<a name="line417">417: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line418">418: </a><font color="#B22222">.  y  - the result of f'(x)</font>
+
+<a name="line420">420: </a><font color="#B22222">   Note:</font>
+<a name="line421">421: </a><font color="#B22222">   Scaling factors are taken into account, so the actual derivative evaluation will</font>
+<a name="line422">422: </a><font color="#B22222">   return alpha*beta*f'(alpha*x).</font>
+
+<a name="line424">424: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line426">426: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>()</font>
+<a name="line427">427: </a><font color="#B22222">@*/</font>
+<a name="line428">428: </a><strong><font color="#4169E1"><a name="FNEvaluateDerivative"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateDerivative.html#FNEvaluateDerivative">FNEvaluateDerivative</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar x,PetscScalar *y)</font></strong>
+<a name="line429">429: </a>{
+<a name="line431">431: </a>  PetscScalar    xf,yf;
+
+<a name="line438">438: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
+<a name="line439">439: </a>  xf = fn->alpha*x;
+<a name="line440">440: </a>  (*fn->ops->evaluatederivative)(fn,xf,&yf);
+<a name="line441">441: </a>  *y = fn->alpha*fn->beta*yf;
+<a name="line442">442: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
+<a name="line443">443: </a>  <font color="#4169E1">return</font>(0);
+<a name="line444">444: </a>}
+
+<a name="line448">448: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Sym_Private"></a>static PetscErrorCode FNEvaluateFunctionMat_Sym_Private(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscScalar *As,PetscScalar *Bs,PetscInt m,PetscBool firstonly)</font></strong>
+<a name="line449">449: </a>{
+<a name="line450">450: </a><font color="#A020F0">#if defined(PETSC_MISSING_LAPACK_SYEV) || defined(SLEPC_MISSING_LAPACK_LACPY)</font>
+<a name="line452">452: </a>  SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"SYEV/LACPY - Lapack routines are unavailable"</font>);
+<a name="line453">453: </a><font color="#A020F0">#else</font>
+<a name="line455">455: </a>  PetscInt       i,j;
+<a name="line456">456: </a>  PetscBLASInt   n,k,ld,lwork,info;
+<a name="line457">457: </a>  PetscScalar    *Q,*W,*work,a,x,y,one=1.0,zero=0.0;
+<a name="line458">458: </a>  PetscReal      *eig;
+<a name="line459">459: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line460">460: </a>  PetscReal      *rwork;
+<a name="line461">461: </a><font color="#A020F0">#endif</font>
+
+<a name="line464">464: </a>  PetscBLASIntCast(m,&n);
+<a name="line465">465: </a>  ld = n;
+<a name="line466">466: </a>  k = firstonly? 1: n;
+
+<a name="line468">468: </a>  <font color="#B22222">/* workspace query and memory allocation */</font>
+<a name="line469">469: </a>  lwork = -1;
+<a name="line470">470: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line471">471: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,As,&ld,NULL,&a,&lwork,NULL,&info));
+<a name="line472">472: </a>  PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);
+<a name="line473">473: </a>  PetscMalloc5(m,&eig,m*m,&Q,m*k,&W,lwork,&work,PetscMax(1,3*m-2),&rwork);
+<a name="line474">474: </a><font color="#A020F0">#else</font>
+<a name="line475">475: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,As,&ld,NULL,&a,&lwork,&info));
+<a name="line476">476: </a>  PetscBLASIntCast((PetscInt)PetscRealPart(a),&lwork);
+<a name="line477">477: </a>  PetscMalloc4(m,&eig,m*m,&Q,m*k,&W,lwork,&work);
+<a name="line478">478: </a><font color="#A020F0">#endif</font>
+
+<a name="line480">480: </a>  <font color="#B22222">/* compute eigendecomposition */</font>
+<a name="line481">481: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKlacpy"</font>,LAPACKlacpy_(<font color="#666666">"L"</font>,&n,&n,As,&ld,Q,&ld));
+<a name="line482">482: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line483">483: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,Q,&ld,eig,work,&lwork,rwork,&info));
+<a name="line484">484: </a><font color="#A020F0">#else</font>
+<a name="line485">485: </a>  PetscStackCallBLAS(<font color="#666666">"LAPACKsyev"</font>,LAPACKsyev_(<font color="#666666">"V"</font>,<font color="#666666">"L"</font>,&n,Q,&ld,eig,work,&lwork,&info));
+<a name="line486">486: </a><font color="#A020F0">#endif</font>
+<a name="line487">487: </a>  <font color="#4169E1">if</font> (info) SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_LIB,<font color="#666666">"Error in Lapack xSYEV %i"</font>,info);
+
+<a name="line489">489: </a>  <font color="#B22222">/* W = f(Lambda)*Q' */</font>
+<a name="line490">490: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line491">491: </a>    x = eig[i];
+<a name="line492">492: </a>    (*fn->ops->evaluatefunction)(fn,x,&y);  <font color="#B22222">/* y = f(x) */</font>
+<a name="line493">493: </a>    <font color="#4169E1">for</font> (j=0;j<k;j++) W[i+j*ld] = Q[j+i*ld]*y;
+<a name="line494">494: </a>  }
+<a name="line495">495: </a>  <font color="#B22222">/* Bs = Q*W */</font>
+<a name="line496">496: </a>  PetscStackCallBLAS(<font color="#666666">"BLASgemm"</font>,BLASgemm_(<font color="#666666">"N"</font>,<font color="#666666">"N"</font>,&n,&k,&n,&one,Q,&ld,W,&ld,&zero,Bs,&ld));
+<a name="line497">497: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line498">498: </a>  PetscFree5(eig,Q,W,work,rwork);
+<a name="line499">499: </a><font color="#A020F0">#else</font>
+<a name="line500">500: </a>  PetscFree4(eig,Q,W,work);
+<a name="line501">501: </a><font color="#A020F0">#endif</font>
+<a name="line502">502: </a>  <font color="#4169E1">return</font>(0);
+<a name="line503">503: </a><font color="#A020F0">#endif</font>
+<a name="line504">504: </a>}
+
+<a name="line508">508: </a><font color="#B22222">/*</font>
+<a name="line509">509: </a><font color="#B22222">   FNEvaluateFunctionMat_Sym_Default - given a symmetric matrix A,</font>
+<a name="line510">510: </a><font color="#B22222">   compute the matrix function as f(A)=Q*f(D)*Q' where the spectral</font>
+<a name="line511">511: </a><font color="#B22222">   decomposition of A is A=Q*D*Q'</font>
+<a name="line512">512: </a><font color="#B22222">*/</font>
+<a name="line513">513: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat_Sym_Default"></a>static PetscErrorCode FNEvaluateFunctionMat_Sym_Default(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
+<a name="line514">514: </a>{
+<a name="line516">516: </a>  PetscInt       m;
+<a name="line517">517: </a>  PetscScalar    *As,*Bs;
+
+<a name="line520">520: </a>  MatDenseGetArray(A,&As);
+<a name="line521">521: </a>  MatDenseGetArray(B,&Bs);
+<a name="line522">522: </a>  MatGetSize(A,&m,NULL);
+<a name="line523">523: </a>  FNEvaluateFunctionMat_Sym_Private(fn,As,Bs,m,PETSC_FALSE);
+<a name="line524">524: </a>  MatDenseRestoreArray(A,&As);
+<a name="line525">525: </a>  MatDenseRestoreArray(B,&Bs);
+<a name="line526">526: </a>  <font color="#4169E1">return</font>(0);
+<a name="line527">527: </a>}
+
+<a name="line531">531: </a><font color="#B22222">/*@</font>
+<a name="line532">532: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a> - Computes the value of the function f(A) for a given</font>
+<a name="line533">533: </a><font color="#B22222">   matrix A, where the result is also a matrix.</font>
+
+<a name="line535">535: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line537">537: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line538">538: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line539">539: </a><font color="#B22222">-  A  - matrix on which the function must be evaluated</font>
+
+<a name="line541">541: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line542">542: </a><font color="#B22222">.  B  - (optional) matrix resulting from evaluating f(A)</font>
+
+<a name="line544">544: </a><font color="#B22222">   Notes:</font>
+<a name="line545">545: </a><font color="#B22222">   Matrix A must be a square sequential dense Mat, with all entries equal on</font>
+<a name="line546">546: </a><font color="#B22222">   all processes (otherwise each process will compute different results).</font>
+<a name="line547">547: </a><font color="#B22222">   If matrix B is provided, it must also be a square sequential dense Mat, and</font>
+<a name="line548">548: </a><font color="#B22222">   both matrices must have the same dimensions. If B is NULL (or B=A) then the</font>
+<a name="line549">549: </a><font color="#B22222">   function will perform an in-place computation, overwriting A with f(A).</font>
+
+<a name="line551">551: </a><font color="#B22222">   If A is known to be real symmetric or complex Hermitian then it is</font>
+<a name="line552">552: </a><font color="#B22222">   recommended to set the appropriate flag with MatSetOption(), so that</font>
+<a name="line553">553: </a><font color="#B22222">   a different algorithm that exploits symmetry is used.</font>
+
+<a name="line555">555: </a><font color="#B22222">   Scaling factors are taken into account, so the actual function evaluation</font>
+<a name="line556">556: </a><font color="#B22222">   will return beta*f(alpha*A).</font>
+
+<a name="line558">558: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line560">560: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(), <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>()</font>
+<a name="line561">561: </a><font color="#B22222">@*/</font>
+<a name="line562">562: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMat"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Mat B)</font></strong>
+<a name="line563">563: </a>{
+<a name="line565">565: </a>  PetscBool      match,set,flg,symm=PETSC_FALSE,inplace=PETSC_FALSE;
+<a name="line566">566: </a>  PetscInt       m,n,n1;
+<a name="line567">567: </a>  Mat            M,F;
+
+<a name="line574">574: </a>  <font color="#4169E1">if</font> (B) {
+<a name="line577">577: </a>  } <font color="#4169E1">else</font> inplace = PETSC_TRUE;
+<a name="line578">578: </a>  PetscObjectTypeCompare((PetscObject)A,MATSEQDENSE,&match);
+<a name="line579">579: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Mat A must be of type seqdense"</font>);
+<a name="line580">580: </a>  MatGetSize(A,&m,&n);
+<a name="line581">581: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat A is not square (has %D rows, %D cols)"</font>,m,n);
+<a name="line582">582: </a>  <font color="#4169E1">if</font> (!inplace) {
+<a name="line583">583: </a>    PetscObjectTypeCompare((PetscObject)B,MATSEQDENSE,&match);
+<a name="line584">584: </a>    <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Mat B must be of type seqdense"</font>);
+<a name="line585">585: </a>    n1 = n;
+<a name="line586">586: </a>    MatGetSize(B,&m,&n);
+<a name="line587">587: </a>    <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat B is not square (has %D rows, %D cols)"</font>,m,n);
+<a name="line588">588: </a>    <font color="#4169E1">if</font> (n1!=n) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrices A and B must have the same dimension"</font>);
+<a name="line589">589: </a>  }
+
+<a name="line591">591: </a>  <font color="#B22222">/* check symmetry of A */</font>
+<a name="line592">592: </a>  MatIsHermitianKnown(A,&set,&flg);
+<a name="line593">593: </a>  symm = set? flg: PETSC_FALSE;
+
+<a name="line595">595: </a>  <font color="#B22222">/* scale argument */</font>
+<a name="line596">596: </a>  <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0) {
+<a name="line597">597: </a>    FN_AllocateWorkMat(fn,A,&M);
+<a name="line598">598: </a>    MatScale(M,fn->alpha);
+<a name="line599">599: </a>  } <font color="#4169E1">else</font> M = A;
+
+<a name="line601">601: </a>  <font color="#B22222">/* destination matrix */</font>
+<a name="line602">602: </a>  F = inplace? A: B;
+
+<a name="line604">604: </a>  <font color="#B22222">/* evaluate matrix function */</font>
+<a name="line605">605: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
+<a name="line606">606: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line607">607: </a>  <font color="#4169E1">if</font> (symm) {
+<a name="line608">608: </a>    <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmatsym) {
+<a name="line609">609: </a>      (*fn->ops->evaluatefunctionmatsym)(fn,M,F);
+<a name="line610">610: </a>    } <font color="#4169E1">else</font> {
+<a name="line611">611: </a>      FNEvaluateFunctionMat_Sym_Default(fn,M,F);
+<a name="line612">612: </a>    }
+<a name="line613">613: </a>  } <font color="#4169E1">else</font> {
+<a name="line614">614: </a>    <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmat) {
+<a name="line615">615: </a>      (*fn->ops->evaluatefunctionmat)(fn,M,F);
+<a name="line616">616: </a>    } <font color="#4169E1">else</font> SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Matrix function not implemented in <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type %s"</font>,((PetscObject)fn)->type_name);
+<a name="line617">617: </a>  }
+<a name="line618">618: </a>  PetscFPTrapPop();
+<a name="line619">619: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
+
+<a name="line621">621: </a>  <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0) {
+<a name="line622">622: </a>    FN_FreeWorkMat(fn,&M);
+<a name="line623">623: </a>  }
+
+<a name="line625">625: </a>  <font color="#B22222">/* scale result */</font>
+<a name="line626">626: </a>  MatScale(F,fn->beta);
+<a name="line627">627: </a>  <font color="#4169E1">return</font>(0);
+<a name="line628">628: </a>}
+
+<a name="line632">632: </a><font color="#B22222">/*</font>
+<a name="line633">633: </a><font color="#B22222">   FNEvaluateFunctionMatVec_Default - computes the full matrix f(A)</font>
+<a name="line634">634: </a><font color="#B22222">   and then copies the first column.</font>
+<a name="line635">635: </a><font color="#B22222">*/</font>
+<a name="line636">636: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec_Default"></a>static PetscErrorCode FNEvaluateFunctionMatVec_Default(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line637">637: </a>{
+<a name="line639">639: </a>  Mat            F;
+
+<a name="line642">642: </a>  FN_AllocateWorkMat(fn,A,&F);
+<a name="line643">643: </a>  <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmat) {
+<a name="line644">644: </a>    (*fn->ops->evaluatefunctionmat)(fn,A,F);
+<a name="line645">645: </a>  } <font color="#4169E1">else</font> SETERRQ1(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Matrix function not implemented in <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> type %s"</font>,((PetscObject)fn)->type_name);
+<a name="line646">646: </a>  MatGetColumnVector(F,v,0);
+<a name="line647">647: </a>  FN_FreeWorkMat(fn,&F);
+<a name="line648">648: </a>  <font color="#4169E1">return</font>(0);
+<a name="line649">649: </a>}
+
+<a name="line653">653: </a><font color="#B22222">/*</font>
+<a name="line654">654: </a><font color="#B22222">   FNEvaluateFunctionMatVec_Sym_Default - given a symmetric matrix A,</font>
+<a name="line655">655: </a><font color="#B22222">   compute the matrix function as f(A)=Q*f(D)*Q' where the spectral</font>
+<a name="line656">656: </a><font color="#B22222">   decomposition of A is A=Q*D*Q'. Only the first column is computed.</font>
+<a name="line657">657: </a><font color="#B22222">*/</font>
+<a name="line658">658: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec_Sym_Default"></a>static PetscErrorCode FNEvaluateFunctionMatVec_Sym_Default(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line659">659: </a>{
+<a name="line661">661: </a>  PetscInt       m;
+<a name="line662">662: </a>  PetscScalar    *As,*vs;
+
+<a name="line665">665: </a>  MatDenseGetArray(A,&As);
+<a name="line666">666: </a>  VecGetArray(v,&vs);
+<a name="line667">667: </a>  MatGetSize(A,&m,NULL);
+<a name="line668">668: </a>  FNEvaluateFunctionMat_Sym_Private(fn,As,vs,m,PETSC_TRUE);
+<a name="line669">669: </a>  MatDenseRestoreArray(A,&As);
+<a name="line670">670: </a>  VecRestoreArray(v,&vs);
+<a name="line671">671: </a>  <font color="#4169E1">return</font>(0);
+<a name="line672">672: </a>}
+
+<a name="line676">676: </a><font color="#B22222">/*@</font>
+<a name="line677">677: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a> - Computes the first column of the matrix f(A)</font>
+<a name="line678">678: </a><font color="#B22222">   for a given matrix A.</font>
+
+<a name="line680">680: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line682">682: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line683">683: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line684">684: </a><font color="#B22222">-  A  - matrix on which the function must be evaluated</font>
+
+<a name="line686">686: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line687">687: </a><font color="#B22222">.  v  - vector to hold the first column of f(A)</font>
+
+<a name="line689">689: </a><font color="#B22222">   Notes:</font>
+<a name="line690">690: </a><font color="#B22222">   This operation is similar to <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>() but returns only</font>
+<a name="line691">691: </a><font color="#B22222">   the first column of f(A), hence saving computations in most cases.</font>
+
+<a name="line693">693: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line695">695: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNEvaluateFunction.html#FNEvaluateFunction">FNEvaluateFunction</a>(), <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMat.html#FNEvaluateFunctionMat">FNEvaluateFunctionMat</a>()</font>
+<a name="line696">696: </a><font color="#B22222">@*/</font>
+<a name="line697">697: </a><strong><font color="#4169E1"><a name="FNEvaluateFunctionMatVec"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNEvaluateFunctionMatVec.html#FNEvaluateFunctionMatVec">FNEvaluateFunctionMatVec</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,Mat A,Vec v)</font></strong>
+<a name="line698">698: </a>{
+<a name="line700">700: </a>  PetscBool      match,set,flg,symm=PETSC_FALSE;
+<a name="line701">701: </a>  PetscInt       m,n;
+<a name="line702">702: </a>  Mat            M;
+
+<a name="line711">711: </a>  PetscObjectTypeCompare((PetscObject)A,MATSEQDENSE,&match);
+<a name="line712">712: </a>  <font color="#4169E1">if</font> (!match) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_SUP,<font color="#666666">"Mat A must be of type seqdense"</font>);
+<a name="line713">713: </a>  MatGetSize(A,&m,&n);
+<a name="line714">714: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ2(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Mat A is not square (has %D rows, %D cols)"</font>,m,n);
+<a name="line715">715: </a>  VecGetSize(v,&m);
+<a name="line716">716: </a>  <font color="#4169E1">if</font> (m!=n) SETERRQ(PetscObjectComm((PetscObject)fn),PETSC_ERR_ARG_SIZ,<font color="#666666">"Matrix A and vector v must have the same size"</font>);
+
+<a name="line718">718: </a>  <font color="#B22222">/* check symmetry of A */</font>
+<a name="line719">719: </a>  MatIsHermitianKnown(A,&set,&flg);
+<a name="line720">720: </a>  symm = set? flg: PETSC_FALSE;
+
+<a name="line722">722: </a>  <font color="#B22222">/* scale argument */</font>
+<a name="line723">723: </a>  <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0) {
+<a name="line724">724: </a>    FN_AllocateWorkMat(fn,A,&M);
+<a name="line725">725: </a>    MatScale(M,fn->alpha);
+<a name="line726">726: </a>  } <font color="#4169E1">else</font> M = A;
+
+<a name="line728">728: </a>  <font color="#B22222">/* evaluate matrix function */</font>
+<a name="line729">729: </a>  PetscLogEventBegin(FN_Evaluate,fn,0,0,0);
+<a name="line730">730: </a>  PetscFPTrapPush(PETSC_FP_TRAP_OFF);
+<a name="line731">731: </a>  <font color="#4169E1">if</font> (symm) {
+<a name="line732">732: </a>    <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmatvecsym) {
+<a name="line733">733: </a>      (*fn->ops->evaluatefunctionmatvecsym)(fn,M,v);
+<a name="line734">734: </a>    } <font color="#4169E1">else</font> {
+<a name="line735">735: </a>      FNEvaluateFunctionMatVec_Sym_Default(fn,M,v);
+<a name="line736">736: </a>    }
+<a name="line737">737: </a>  } <font color="#4169E1">else</font> {
+<a name="line738">738: </a>    <font color="#4169E1">if</font> (fn->ops->evaluatefunctionmatvec) {
+<a name="line739">739: </a>      (*fn->ops->evaluatefunctionmatvec)(fn,M,v);
+<a name="line740">740: </a>    } <font color="#4169E1">else</font> {
+<a name="line741">741: </a>      FNEvaluateFunctionMatVec_Default(fn,M,v);
+<a name="line742">742: </a>    }
+<a name="line743">743: </a>  }
+<a name="line744">744: </a>  PetscFPTrapPop();
+<a name="line745">745: </a>  PetscLogEventEnd(FN_Evaluate,fn,0,0,0);
+
+<a name="line747">747: </a>  <font color="#4169E1">if</font> (fn->alpha!=(PetscScalar)1.0) {
+<a name="line748">748: </a>    FN_FreeWorkMat(fn,&M);
+<a name="line749">749: </a>  }
+
+<a name="line751">751: </a>  <font color="#B22222">/* scale result */</font>
+<a name="line752">752: </a>  VecScale(v,fn->beta);
+<a name="line753">753: </a>  <font color="#4169E1">return</font>(0);
+<a name="line754">754: </a>}
+
+<a name="line758">758: </a><font color="#B22222">/*@</font>
+<a name="line759">759: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a> - Sets <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> options from the options database.</font>
+
+<a name="line761">761: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line763">763: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line764">764: </a><font color="#B22222">.  fn - the math function context</font>
+
+<a name="line766">766: </a><font color="#B22222">   Notes:</font>
+<a name="line767">767: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line769">769: </a><font color="#B22222">   Level: beginner</font>
+<a name="line770">770: </a><font color="#B22222">@*/</font>
+<a name="line771">771: </a><strong><font color="#4169E1"><a name="FNSetFromOptions"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNSetFromOptions.html#FNSetFromOptions">FNSetFromOptions</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn)</font></strong>
+<a name="line772">772: </a>{
+<a name="line774">774: </a>  char           type[256];
+<a name="line775">775: </a>  PetscScalar    array[2];
+<a name="line776">776: </a>  PetscInt       k;
+<a name="line777">777: </a>  PetscBool      flg;
+
+<a name="line781">781: </a>  <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a>();
+<a name="line782">782: </a>  PetscObjectOptionsBegin((PetscObject)fn);
+<a name="line783">783: </a>    PetscOptionsFList(<font color="#666666">"-fn_type"</font>,<font color="#666666">"Math function type"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>"</font>,FNList,(char*)(((PetscObject)fn)->type_name?((PetscObject)fn)->type_name:FNRATIONAL),type,256,&flg);
+<a name="line784">784: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line785">785: </a>      <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,type);
+<a name="line786">786: </a>    }
+<a name="line787">787: </a>    <font color="#B22222">/*</font>
+<a name="line788">788: </a><font color="#B22222">      Set the type if it was never set.</font>
+<a name="line789">789: </a><font color="#B22222">    */</font>
+<a name="line790">790: </a>    <font color="#4169E1">if</font> (!((PetscObject)fn)->type_name) {
+<a name="line791">791: </a>      <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(fn,FNRATIONAL);
+<a name="line792">792: </a>    }
+
+<a name="line794">794: </a>    k = 2;
+<a name="line795">795: </a>    array[0] = 0.0; array[1] = 0.0;
+<a name="line796">796: </a>    PetscOptionsScalarArray(<font color="#666666">"-fn_scale"</font>,<font color="#666666">"Scale factors (one or two scalar values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>"</font>,array,&k,&flg);
+<a name="line797">797: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line798">798: </a>      <font color="#4169E1">if</font> (k<2) array[1] = 1.0;
+<a name="line799">799: </a>      <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(fn,array[0],array[1]);
+<a name="line800">800: </a>    }
+
+<a name="line802">802: </a>    <font color="#4169E1">if</font> (fn->ops->setfromoptions) {
+<a name="line803">803: </a>      (*fn->ops->setfromoptions)(PetscOptionsObject,fn);
+<a name="line804">804: </a>    }
+<a name="line805">805: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)fn);
+<a name="line806">806: </a>  PetscOptionsEnd();
+<a name="line807">807: </a>  <font color="#4169E1">return</font>(0);
+<a name="line808">808: </a>}
+
+<a name="line812">812: </a><font color="#B22222">/*@C</font>
+<a name="line813">813: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a> - Prints the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> data structure.</font>
+
+<a name="line815">815: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line817">817: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line818">818: </a><font color="#B22222">+  fn - the math function context</font>
+<a name="line819">819: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line821">821: </a><font color="#B22222">   Note:</font>
+<a name="line822">822: </a><font color="#B22222">   The available visualization contexts include</font>
+<a name="line823">823: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
+<a name="line824">824: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
+<a name="line825">825: </a><font color="#B22222">         output where only the first processor opens</font>
+<a name="line826">826: </a><font color="#B22222">         the file.  All other processors send their</font>
+<a name="line827">827: </a><font color="#B22222">         data to the first processor to print.</font>
+
+<a name="line829">829: </a><font color="#B22222">   The user can open an alternative visualization context with</font>
+<a name="line830">830: </a><font color="#B22222">   PetscViewerASCIIOpen() - output to a specified file.</font>
+
+<a name="line832">832: </a><font color="#B22222">   Level: beginner</font>
+<a name="line833">833: </a><font color="#B22222">@*/</font>
+<a name="line834">834: </a><strong><font color="#4169E1"><a name="FNView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNView.html#FNView">FNView</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,PetscViewer viewer)</font></strong>
+<a name="line835">835: </a>{
+<a name="line836">836: </a>  PetscBool      isascii;
+
+<a name="line841">841: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fn));
+<a name="line844">844: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line845">845: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line846">846: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)fn,viewer);
+<a name="line847">847: </a>    <font color="#4169E1">if</font> (fn->ops->view) {
+<a name="line848">848: </a>      PetscViewerASCIIPushTab(viewer);
+<a name="line849">849: </a>      (*fn->ops->view)(fn,viewer);
+<a name="line850">850: </a>      PetscViewerASCIIPopTab(viewer);
+<a name="line851">851: </a>    }
+<a name="line852">852: </a>  }
+<a name="line853">853: </a>  <font color="#4169E1">return</font>(0);
+<a name="line854">854: </a>}
+
+<a name="line858">858: </a><font color="#B22222">/*@</font>
+<a name="line859">859: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a> - Duplicates a math function, copying all parameters, possibly with a</font>
+<a name="line860">860: </a><font color="#B22222">   different communicator.</font>
+
+<a name="line862">862: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line864">864: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line865">865: </a><font color="#B22222">+  fn   - the math function context</font>
+<a name="line866">866: </a><font color="#B22222">-  comm - MPI communicator (may be NULL)</font>
+
+<a name="line868">868: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line869">869: </a><font color="#B22222">.  newfn - location to put the new <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> context</font>
+
+<a name="line871">871: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line873">873: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>()</font>
+<a name="line874">874: </a><font color="#B22222">@*/</font>
+<a name="line875">875: </a><strong><font color="#4169E1"><a name="FNDuplicate"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNDuplicate.html#FNDuplicate">FNDuplicate</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> fn,MPI_Comm comm,<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *newfn)</font></strong>
+<a name="line876">876: </a>{
+<a name="line878">878: </a>  <a href="../../../../../docs/manualpages/FN/FNType.html#FNType">FNType</a>         type;
+<a name="line879">879: </a>  PetscScalar    alpha,beta;
+
+<a name="line885">885: </a>  <font color="#4169E1">if</font> (!comm) comm = PetscObjectComm((PetscObject)fn);
+<a name="line886">886: </a>  <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>(comm,newfn);
+<a name="line887">887: </a>  <a href="../../../../../docs/manualpages/FN/FNGetType.html#FNGetType">FNGetType</a>(fn,&type);
+<a name="line888">888: </a>  <a href="../../../../../docs/manualpages/FN/FNSetType.html#FNSetType">FNSetType</a>(*newfn,type);
+<a name="line889">889: </a>  <a href="../../../../../docs/manualpages/FN/FNGetScale.html#FNGetScale">FNGetScale</a>(fn,&alpha,&beta);
+<a name="line890">890: </a>  <a href="../../../../../docs/manualpages/FN/FNSetScale.html#FNSetScale">FNSetScale</a>(*newfn,alpha,beta);
+<a name="line891">891: </a>  <font color="#4169E1">if</font> (fn->ops->duplicate) {
+<a name="line892">892: </a>    (*fn->ops->duplicate)(fn,comm,newfn);
+<a name="line893">893: </a>  }
+<a name="line894">894: </a>  <font color="#4169E1">return</font>(0);
+<a name="line895">895: </a>}
+
+<a name="line899">899: </a><font color="#B22222">/*@</font>
+<a name="line900">900: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a> - Destroys <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> context that was created with <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>().</font>
+
+<a name="line902">902: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+
+<a name="line904">904: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line905">905: </a><font color="#B22222">.  fn - the math function context</font>
+
+<a name="line907">907: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line909">909: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNCreate.html#FNCreate">FNCreate</a>()</font>
+<a name="line910">910: </a><font color="#B22222">@*/</font>
+<a name="line911">911: </a><strong><font color="#4169E1"><a name="FNDestroy"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNDestroy.html#FNDestroy">FNDestroy</a>(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> *fn)</font></strong>
+<a name="line912">912: </a>{
+<a name="line914">914: </a>  PetscInt       i;
+
+<a name="line917">917: </a>  <font color="#4169E1">if</font> (!*fn) <font color="#4169E1">return</font>(0);
+<a name="line919">919: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*fn))->refct > 0) { *fn = 0; <font color="#4169E1">return</font>(0); }
+<a name="line920">920: </a>  <font color="#4169E1">if</font> ((*fn)->ops->destroy) { (*(*fn)->ops->destroy)(*fn); }
+<a name="line921">921: </a>  <font color="#4169E1">for</font> (i=0;i<(*fn)->nw;i++) {
+<a name="line922">922: </a>    MatDestroy(&(*fn)->W[i]);
+<a name="line923">923: </a>  }
+<a name="line924">924: </a>  PetscHeaderDestroy(fn);
+<a name="line925">925: </a>  <font color="#4169E1">return</font>(0);
+<a name="line926">926: </a>}
+
+<a name="line930">930: </a><font color="#B22222">/*@C</font>
+<a name="line931">931: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a> - See Adds a mathematical function to the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> package.</font>
+
+<a name="line933">933: </a><font color="#B22222">   Not collective</font>
+
+<a name="line935">935: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line936">936: </a><font color="#B22222">+  name - name of a new user-defined <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a></font>
+<a name="line937">937: </a><font color="#B22222">-  function - routine to create context</font>
+
+<a name="line939">939: </a><font color="#B22222">   Notes:</font>
+<a name="line940">940: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>() may be called multiple times to add several user-defined inner products.</font>
+
+<a name="line942">942: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line944">944: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a>()</font>
+<a name="line945">945: </a><font color="#B22222">@*/</font>
+<a name="line946">946: </a><strong><font color="#4169E1"><a name="FNRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>))</font></strong>
+<a name="line947">947: </a>{
+
+<a name="line951">951: </a>  PetscFunctionListAdd(&FNList,name,function);
+<a name="line952">952: </a>  <font color="#4169E1">return</font>(0);
+<a name="line953">953: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/interface/fnregis.c b/src/sys/classes/fn/interface/fnregis.c
index 4c2b6de..70f4c22 100644
--- a/src/sys/classes/fn/interface/fnregis.c
+++ b/src/sys/classes/fn/interface/fnregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -27,6 +27,7 @@ PETSC_EXTERN PetscErrorCode FNCreate_Exp(FN);
 PETSC_EXTERN PetscErrorCode FNCreate_Log(FN);
 PETSC_EXTERN PetscErrorCode FNCreate_Phi(FN);
 PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(FN);
+PETSC_EXTERN PetscErrorCode FNCreate_Invsqrt(FN);
 
 #undef __FUNCT__
 #define __FUNCT__ "FNRegisterAll"
@@ -50,6 +51,7 @@ PetscErrorCode FNRegisterAll(void)
   ierr = FNRegister(FNLOG,FNCreate_Log);CHKERRQ(ierr);
   ierr = FNRegister(FNPHI,FNCreate_Phi);CHKERRQ(ierr);
   ierr = FNRegister(FNSQRT,FNCreate_Sqrt);CHKERRQ(ierr);
+  ierr = FNRegister(FNINVSQRT,FNCreate_Invsqrt);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/fn/interface/fnregis.c.html b/src/sys/classes/fn/interface/fnregis.c.html
index 1c59d39..f890599 100644
--- a/src/sys/classes/fn/interface/fnregis.c.html
+++ b/src/sys/classes/fn/interface/fnregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/interface/fnregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:05+00:00">
+<meta name="date" content="2016-05-16T10:31:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/interface/fnregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/interface/fnregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,27 +39,29 @@
 <a name="line27"> 27: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode FNCreate_Log(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
 <a name="line28"> 28: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode FNCreate_Phi(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
 <a name="line29"> 29: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode FNCreate_Sqrt(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
+<a name="line30"> 30: </a><strong><font color="#4169E1">PETSC_EXTERN PetscErrorCode FNCreate_Invsqrt(<a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a>)</font></strong>;
 
-<a name="line33"> 33: </a><font color="#B22222">/*@C</font>
-<a name="line34"> 34: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a> - Registers all of the math functions in the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> package.</font>
+<a name="line34"> 34: </a><font color="#B22222">/*@C</font>
+<a name="line35"> 35: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a> - Registers all of the math functions in the <a href="../../../../../docs/manualpages/FN/FN.html#FN">FN</a> package.</font>
 
-<a name="line36"> 36: </a><font color="#B22222">   Not Collective</font>
+<a name="line37"> 37: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line38"> 38: </a><font color="#B22222">   Level: advanced</font>
-<a name="line39"> 39: </a><font color="#B22222">@*/</font>
-<a name="line40"> 40: </a><strong><font color="#4169E1"><a name="FNRegisterAll"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a>(void)</font></strong>
-<a name="line41"> 41: </a>{
+<a name="line39"> 39: </a><font color="#B22222">   Level: advanced</font>
+<a name="line40"> 40: </a><font color="#B22222">@*/</font>
+<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="FNRegisterAll"></a>PetscErrorCode <a href="../../../../../docs/manualpages/FN/FNRegisterAll.html#FNRegisterAll">FNRegisterAll</a>(void)</font></strong>
+<a name="line42"> 42: </a>{
 
-<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (FNRegisterAllCalled) <font color="#4169E1">return</font>(0);
-<a name="line46"> 46: </a>  FNRegisterAllCalled = PETSC_TRUE;
-<a name="line47"> 47: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNCOMBINE,FNCreate_Combine);
-<a name="line48"> 48: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNRATIONAL,FNCreate_Rational);
-<a name="line49"> 49: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNEXP,FNCreate_Exp);
-<a name="line50"> 50: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNLOG,FNCreate_Log);
-<a name="line51"> 51: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNPHI,FNCreate_Phi);
-<a name="line52"> 52: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNSQRT,FNCreate_Sqrt);
-<a name="line53"> 53: </a>  <font color="#4169E1">return</font>(0);
-<a name="line54"> 54: </a>}
+<a name="line46"> 46: </a>  <font color="#4169E1">if</font> (FNRegisterAllCalled) <font color="#4169E1">return</font>(0);
+<a name="line47"> 47: </a>  FNRegisterAllCalled = PETSC_TRUE;
+<a name="line48"> 48: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNCOMBINE,FNCreate_Combine);
+<a name="line49"> 49: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNRATIONAL,FNCreate_Rational);
+<a name="line50"> 50: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNEXP,FNCreate_Exp);
+<a name="line51"> 51: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNLOG,FNCreate_Log);
+<a name="line52"> 52: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNPHI,FNCreate_Phi);
+<a name="line53"> 53: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNSQRT,FNCreate_Sqrt);
+<a name="line54"> 54: </a>  <a href="../../../../../docs/manualpages/FN/FNRegister.html#FNRegister">FNRegister</a>(FNINVSQRT,FNCreate_Invsqrt);
+<a name="line55"> 55: </a>  <font color="#4169E1">return</font>(0);
+<a name="line56"> 56: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/fn/interface/ftn-auto/fnbasicf.c b/src/sys/classes/fn/interface/ftn-auto/fnbasicf.c
index 5a837ac..7183f69 100644
--- a/src/sys/classes/fn/interface/ftn-auto/fnbasicf.c
+++ b/src/sys/classes/fn/interface/ftn-auto/fnbasicf.c
@@ -59,6 +59,11 @@ extern void PetscRmPointer(void*);
 #define fnevaluatefunctionmat_ fnevaluatefunctionmat
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define fnevaluatefunctionmatvec_ FNEVALUATEFUNCTIONMATVEC
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define fnevaluatefunctionmatvec_ fnevaluatefunctionmatvec
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define fnsetfromoptions_ FNSETFROMOPTIONS
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define fnsetfromoptions_ fnsetfromoptions
@@ -105,6 +110,12 @@ PETSC_EXTERN void PETSC_STDCALL  fnevaluatefunctionmat_(FN fn,Mat A,Mat B, int *
 	(Mat)PetscToPointer((A) ),
 	(Mat)PetscToPointer((B) ));
 }
+PETSC_EXTERN void PETSC_STDCALL  fnevaluatefunctionmatvec_(FN fn,Mat A,Vec v, int *__ierr ){
+*__ierr = FNEvaluateFunctionMatVec(
+	(FN)PetscToPointer((fn) ),
+	(Mat)PetscToPointer((A) ),
+	(Vec)PetscToPointer((v) ));
+}
 PETSC_EXTERN void PETSC_STDCALL  fnsetfromoptions_(FN fn, int *__ierr ){
 *__ierr = FNSetFromOptions(
 	(FN)PetscToPointer((fn) ));
diff --git a/src/sys/classes/fn/interface/ftn-custom/makefile b/src/sys/classes/fn/interface/ftn-custom/makefile
index 70b0ab7..50f9f5c 100644
--- a/src/sys/classes/fn/interface/ftn-custom/makefile
+++ b/src/sys/classes/fn/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/interface/ftn-custom/zfnf.c b/src/sys/classes/fn/interface/ftn-custom/zfnf.c
index 1be813d..e3d76fc 100644
--- a/src/sys/classes/fn/interface/ftn-custom/zfnf.c
+++ b/src/sys/classes/fn/interface/ftn-custom/zfnf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/fn/interface/index.html b/src/sys/classes/fn/interface/index.html
index 8a28822..6e8f285 100644
--- a/src/sys/classes/fn/interface/index.html
+++ b/src/sys/classes/fn/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Mathematical Function - FN</h2>
 
diff --git a/src/sys/classes/fn/interface/makefile b/src/sys/classes/fn/interface/makefile
index 69b5f13..1c92878 100644
--- a/src/sys/classes/fn/interface/makefile
+++ b/src/sys/classes/fn/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/interface/makefile.html b/src/sys/classes/fn/interface/makefile.html
index 9241992..56ef849 100644
--- a/src/sys/classes/fn/interface/makefile.html
+++ b/src/sys/classes/fn/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:05+00:00">
+<meta name="date" content="2016-05-16T10:31:57+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/fn/makefile b/src/sys/classes/fn/makefile
index 8ac6a38..acb70b1 100644
--- a/src/sys/classes/fn/makefile
+++ b/src/sys/classes/fn/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/fn/makefile.html b/src/sys/classes/fn/makefile.html
index 1935165..fc6abfb 100644
--- a/src/sys/classes/fn/makefile.html
+++ b/src/sys/classes/fn/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/fn/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:04+00:00">
+<meta name="date" content="2016-05-16T10:31:56+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/fn/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/fn/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/index.html b/src/sys/classes/index.html
index f8f5dd9..010d756 100644
--- a/src/sys/classes/index.html
+++ b/src/sys/classes/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>SLEPc System routines</h2>
 
diff --git a/src/sys/classes/makefile b/src/sys/classes/makefile
index 2562dbb..0085a18 100644
--- a/src/sys/classes/makefile
+++ b/src/sys/classes/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/makefile.html b/src/sys/classes/makefile.html
index 90babd1..58d0a4e 100644
--- a/src/sys/classes/makefile.html
+++ b/src/sys/classes/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:40+00:00">
+<meta name="date" content="2016-05-16T10:31:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/examples/index.html b/src/sys/classes/rg/examples/index.html
index 9217590..fda63a7 100644
--- a/src/sys/classes/rg/examples/index.html
+++ b/src/sys/classes/rg/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
  
diff --git a/src/sys/classes/rg/examples/makefile b/src/sys/classes/rg/examples/makefile
index 51467a8..91fa680 100644
--- a/src/sys/classes/rg/examples/makefile
+++ b/src/sys/classes/rg/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/examples/makefile.html b/src/sys/classes/rg/examples/makefile.html
index 97789e2..cd796db 100644
--- a/src/sys/classes/rg/examples/makefile.html
+++ b/src/sys/classes/rg/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:37+00:00">
+<meta name="date" content="2016-05-16T10:32:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/examples/tests/index.html b/src/sys/classes/rg/examples/tests/index.html
index ec4584b..3e7d468 100644
--- a/src/sys/classes/rg/examples/tests/index.html
+++ b/src/sys/classes/rg/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/examples/tests/makefile b/src/sys/classes/rg/examples/tests/makefile
index c64d478..27f9564 100644
--- a/src/sys/classes/rg/examples/tests/makefile
+++ b/src/sys/classes/rg/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -40,7 +40,7 @@ test1: test1.o chkopts
 #------------------------------------------------------------------------------------
 
 runtest1_1:
-	-@${MPIEXEC} -np 1 ./test1 > test1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test1 > test1_1.tmp 2>&1; \
 	  if (${DIFF} output/test1_1.out test1_1.tmp) then true; \
 	  else echo "Possible problem with test1_1, diffs above"; fi; \
 	  ${RM} -f test1_1.tmp
diff --git a/src/sys/classes/rg/examples/tests/makefile.html b/src/sys/classes/rg/examples/tests/makefile.html
index 56ca0af..f4aec12 100644
--- a/src/sys/classes/rg/examples/tests/makefile.html
+++ b/src/sys/classes/rg/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:37+00:00">
+<meta name="date" content="2016-05-16T10:32:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -51,7 +51,7 @@ include ${SLEPC_DIR}/lib/slepc/conf/slepc_common
 <font color="#A020F0">#------------------------------------------------------------------------------------</font>
 
 <strong><font color="#FF0000">runtest1_1:</font></strong>
-	-@${MPIEXEC} -np 1 ./test1 > test1_1.tmp 2>&1; \
+	-@${MPIEXEC} -n 1 ./test1 > test1_1.tmp 2>&1; \
 	  <font color="#4169E1">if</font> (${DIFF} output/test1_1.out test1_1.tmp) then true; \
 	  <font color="#4169E1">else</font> echo <font color="#666666">"Possible problem with test1_1, diffs above"</font>; fi; \
 	  ${RM} -f test1_1.tmp
diff --git a/src/sys/classes/rg/examples/tests/output/test1_1.out b/src/sys/classes/rg/examples/tests/output/test1_1.out
index 967ea24..a29dff2 100644
--- a/src/sys/classes/rg/examples/tests/output/test1_1.out
+++ b/src/sys/classes/rg/examples/tests/output/test1_1.out
@@ -1,13 +1,13 @@
 RG Object: 1 MPI processes
   type: ellipse
-  center: 1.1, radius: 2, vscale: 0.1
+  center: 1.1, radius: 2., vscale: 0.1
 Point (0.1,0.3) is outside the region
 Contour points: (3,0.0618) (2.28,0.162) (1.1,0.2) (-0.0756,0.162) (-0.802,0.0618) (-0.802,-0.0618) (-0.0756,-0.162) (1.1,-0.2) (2.28,-0.162) (3,-0.0618) 
 RG Object: 1 MPI processes
   type: interval
-  region: [-1,1]x[-0.1,0.1]
-Point (0.2,0) is inside the region
+  region: [-1.,1.]x[-0.1,0.1]
+Point (0.2,0.) is inside the region
 RG Object: 1 MPI processes
   type: polygon
-  vertices:   0+2i,  1+4i,  2+5i,  4+3i,  5+4i,  6+1i,  2  
-Point (5,0.9) is inside the region
+  vertices:   0.+2i,  1.+4i,  2.+5i,  4.+3i,  5.+4i,  6.+1i,  2.
+Point (5.,0.9) is inside the region
diff --git a/src/sys/classes/rg/examples/tests/test1.c b/src/sys/classes/rg/examples/tests/test1.c
index 5e4d265..17223ab 100644
--- a/src/sys/classes/rg/examples/tests/test1.c
+++ b/src/sys/classes/rg/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -111,5 +111,5 @@ int main(int argc,char **argv)
 
   ierr = RGDestroy(&rg);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/rg/examples/tests/test1.c.html b/src/sys/classes/rg/examples/tests/test1.c.html
index 41d8182..c37d90c 100644
--- a/src/sys/classes/rg/examples/tests/test1.c.html
+++ b/src/sys/classes/rg/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:37+00:00">
+<meta name="date" content="2016-05-16T10:32:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -120,7 +120,7 @@
 
 <a name="line112">112: </a>  <a href="../../../../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(&rg);
 <a name="line113">113: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line114">114: </a>  <font color="#4169E1">return</font> 0;
+<a name="line114">114: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line115">115: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/rg/impls/ellipse/index.html b/src/sys/classes/rg/impls/ellipse/index.html
index 6a6fe1b..08bcecf 100644
--- a/src/sys/classes/rg/impls/ellipse/index.html
+++ b/src/sys/classes/rg/impls/ellipse/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/ellipse/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/ellipse/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/impls/ellipse/makefile b/src/sys/classes/rg/impls/ellipse/makefile
index f1f16a5..d455a4a 100644
--- a/src/sys/classes/rg/impls/ellipse/makefile
+++ b/src/sys/classes/rg/impls/ellipse/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/impls/ellipse/makefile.html b/src/sys/classes/rg/impls/ellipse/makefile.html
index c125baa..89bedda 100644
--- a/src/sys/classes/rg/impls/ellipse/makefile.html
+++ b/src/sys/classes/rg/impls/ellipse/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/ellipse/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:35+00:00">
+<meta name="date" content="2016-05-16T10:32:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/ellipse/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/ellipse/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/impls/ellipse/rgellipse.c b/src/sys/classes/rg/impls/ellipse/rgellipse.c
index cb87af0..9a39bee 100644
--- a/src/sys/classes/rg/impls/ellipse/rgellipse.c
+++ b/src/sys/classes/rg/impls/ellipse/rgellipse.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -128,7 +128,7 @@ PetscErrorCode RGEllipseGetParameters(RG rg,PetscScalar *center,PetscReal *radiu
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(rg,RG_CLASSID,1);
-  ierr = PetscTryMethod(rg,"RGEllipseGetParameters_C",(RG,PetscScalar*,PetscReal*,PetscReal*),(rg,center,radius,vscale));CHKERRQ(ierr);
+  ierr = PetscUseMethod(rg,"RGEllipseGetParameters_C",(RG,PetscScalar*,PetscReal*,PetscReal*),(rg,center,radius,vscale));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -157,8 +157,8 @@ PetscErrorCode RGIsTrivial_Ellipse(RG rg,PetscBool *trivial)
   RG_ELLIPSE *ctx = (RG_ELLIPSE*)rg->data;
 
   PetscFunctionBegin;
-  if (rg->complement) *trivial = (ctx->radius==0.0)? PETSC_TRUE: PETSC_FALSE;
-  else *trivial = (ctx->radius>=PETSC_MAX_REAL)? PETSC_TRUE: PETSC_FALSE;
+  if (rg->complement) *trivial = PetscNot(ctx->radius);
+  else *trivial = PetscNot(ctx->radius<PETSC_MAX_REAL);
   PetscFunctionReturn(0);
 }
 
@@ -166,9 +166,9 @@ PetscErrorCode RGIsTrivial_Ellipse(RG rg,PetscBool *trivial)
 #define __FUNCT__ "RGComputeContour_Ellipse"
 PetscErrorCode RGComputeContour_Ellipse(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
 {
-  RG_ELLIPSE  *ctx = (RG_ELLIPSE*)rg->data;
-  PetscReal   theta;
-  PetscInt    i;
+  RG_ELLIPSE *ctx = (RG_ELLIPSE*)rg->data;
+  PetscReal  theta;
+  PetscInt   i;
 
   PetscFunctionBegin;
   for (i=0;i<n;i++) {
@@ -187,8 +187,8 @@ PetscErrorCode RGComputeContour_Ellipse(RG rg,PetscInt n,PetscScalar *cr,PetscSc
 #define __FUNCT__ "RGCheckInside_Ellipse"
 PetscErrorCode RGCheckInside_Ellipse(RG rg,PetscReal px,PetscReal py,PetscInt *inside)
 {
-  RG_ELLIPSE  *ctx = (RG_ELLIPSE*)rg->data;
-  PetscReal   dx,dy,r;
+  RG_ELLIPSE *ctx = (RG_ELLIPSE*)rg->data;
+  PetscReal  dx,dy,r;
 
   PetscFunctionBegin;
 #if defined(PETSC_USE_COMPLEX)
@@ -205,7 +205,7 @@ PetscErrorCode RGCheckInside_Ellipse(RG rg,PetscReal px,PetscReal py,PetscInt *i
 
 #undef __FUNCT__
 #define __FUNCT__ "RGSetFromOptions_Ellipse"
-PetscErrorCode RGSetFromOptions_Ellipse(PetscOptions *PetscOptionsObject,RG rg)
+PetscErrorCode RGSetFromOptions_Ellipse(PetscOptionItems *PetscOptionsObject,RG rg)
 {
   PetscErrorCode ierr;
   PetscScalar    s;
diff --git a/src/sys/classes/rg/impls/ellipse/rgellipse.c.html b/src/sys/classes/rg/impls/ellipse/rgellipse.c.html
index 7bdc5ff..73b13ee 100644
--- a/src/sys/classes/rg/impls/ellipse/rgellipse.c.html
+++ b/src/sys/classes/rg/impls/ellipse/rgellipse.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/ellipse/rgellipse.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:35+00:00">
+<meta name="date" content="2016-05-16T10:32:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/ellipse/rgellipse.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/ellipse/rgellipse.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Region enclosed in an ellipse (aligned with the coordinate axes).</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -121,7 +121,7 @@
 <a name="line125">125: </a><strong><font color="#4169E1"><a name="RGEllipseGetParameters"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/RG/RGEllipseGetParameters.html#RGEllipseGetParameters">RGEllipseGetParameters</a>(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale)</font></strong>
 <a name="line126">126: </a>{
 
-<a name="line131">131: </a>  PetscTryMethod(rg,<font color="#666666">"RGEllipseGetParameters_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*),(rg,center,radius,vscale));
+<a name="line131">131: </a>  PetscUseMethod(rg,<font color="#666666">"RGEllipseGetParameters_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*),(rg,center,radius,vscale));
 <a name="line132">132: </a>  <font color="#4169E1">return</font>(0);
 <a name="line133">133: </a>}
 
@@ -143,16 +143,16 @@
 <a name="line156">156: </a>{
 <a name="line157">157: </a>  RG_ELLIPSE *ctx = (RG_ELLIPSE*)rg->data;
 
-<a name="line160">160: </a>  <font color="#4169E1">if</font> (rg->complement) *trivial = (ctx->radius==0.0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line161">161: </a>  <font color="#4169E1">else</font> *trivial = (ctx->radius>=PETSC_MAX_REAL)? PETSC_TRUE: PETSC_FALSE;
+<a name="line160">160: </a>  <font color="#4169E1">if</font> (rg->complement) *trivial = PetscNot(ctx->radius);
+<a name="line161">161: </a>  <font color="#4169E1">else</font> *trivial = PetscNot(ctx->radius<PETSC_MAX_REAL);
 <a name="line162">162: </a>  <font color="#4169E1">return</font>(0);
 <a name="line163">163: </a>}
 
 <a name="line167">167: </a><strong><font color="#4169E1"><a name="RGComputeContour_Ellipse"></a>PetscErrorCode RGComputeContour_Ellipse(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
 <a name="line168">168: </a>{
-<a name="line169">169: </a>  RG_ELLIPSE  *ctx = (RG_ELLIPSE*)rg->data;
-<a name="line170">170: </a>  PetscReal   theta;
-<a name="line171">171: </a>  PetscInt    i;
+<a name="line169">169: </a>  RG_ELLIPSE *ctx = (RG_ELLIPSE*)rg->data;
+<a name="line170">170: </a>  PetscReal  theta;
+<a name="line171">171: </a>  PetscInt   i;
 
 <a name="line174">174: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
 <a name="line175">175: </a>    theta = 2.0*PETSC_PI*(i+0.5)/n;
@@ -168,8 +168,8 @@
 
 <a name="line188">188: </a><strong><font color="#4169E1"><a name="RGCheckInside_Ellipse"></a>PetscErrorCode RGCheckInside_Ellipse(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal px,PetscReal py,PetscInt *inside)</font></strong>
 <a name="line189">189: </a>{
-<a name="line190">190: </a>  RG_ELLIPSE  *ctx = (RG_ELLIPSE*)rg->data;
-<a name="line191">191: </a>  PetscReal   dx,dy,r;
+<a name="line190">190: </a>  RG_ELLIPSE *ctx = (RG_ELLIPSE*)rg->data;
+<a name="line191">191: </a>  PetscReal  dx,dy,r;
 
 <a name="line194">194: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
 <a name="line195">195: </a>  dx = (px-PetscRealPart(ctx->center))/ctx->radius;
@@ -183,7 +183,7 @@
 <a name="line203">203: </a>  <font color="#4169E1">return</font>(0);
 <a name="line204">204: </a>}
 
-<a name="line208">208: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Ellipse"></a>PetscErrorCode RGSetFromOptions_Ellipse(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line208">208: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Ellipse"></a>PetscErrorCode RGSetFromOptions_Ellipse(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
 <a name="line209">209: </a>{
 <a name="line211">211: </a>  PetscScalar    s;
 <a name="line212">212: </a>  PetscReal      r1,r2;
diff --git a/src/sys/classes/rg/impls/index.html b/src/sys/classes/rg/impls/index.html
index f65903f..363069a 100644
--- a/src/sys/classes/rg/impls/index.html
+++ b/src/sys/classes/rg/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/impls/interval/index.html b/src/sys/classes/rg/impls/interval/index.html
index c865658..a776c6f 100644
--- a/src/sys/classes/rg/impls/interval/index.html
+++ b/src/sys/classes/rg/impls/interval/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/interval/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/interval/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/impls/interval/makefile b/src/sys/classes/rg/impls/interval/makefile
index f9ebad9..d546ccb 100644
--- a/src/sys/classes/rg/impls/interval/makefile
+++ b/src/sys/classes/rg/impls/interval/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/impls/interval/makefile.html b/src/sys/classes/rg/impls/interval/makefile.html
index 50766ae..e268dc1 100644
--- a/src/sys/classes/rg/impls/interval/makefile.html
+++ b/src/sys/classes/rg/impls/interval/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/interval/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:36+00:00">
+<meta name="date" content="2016-05-16T10:32:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/interval/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/interval/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/impls/interval/rginterval.c b/src/sys/classes/rg/impls/interval/rginterval.c
index 7485c8a..c217e38 100644
--- a/src/sys/classes/rg/impls/interval/rginterval.c
+++ b/src/sys/classes/rg/impls/interval/rginterval.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -127,7 +127,7 @@ PetscErrorCode RGIntervalGetEndpoints(RG rg,PetscReal *a,PetscReal *b,PetscReal
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(rg,RG_CLASSID,1);
-  ierr = PetscTryMethod(rg,"RGIntervalGetEndpoints_C",(RG,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,a,b,c,d));CHKERRQ(ierr);
+  ierr = PetscUseMethod(rg,"RGIntervalGetEndpoints_C",(RG,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,a,b,c,d));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -164,10 +164,50 @@ PetscErrorCode RGIsTrivial_Interval(RG rg,PetscBool *trivial)
 PetscErrorCode RGComputeContour_Interval(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
 {
   RG_INTERVAL *ctx = (RG_INTERVAL*)rg->data;
+  PetscInt    i,pt,idx,j;
+  PetscReal   hr[4],hi[4],h,off,d[4];
+  PetscScalar vr[4],vi[4];
 
   PetscFunctionBegin;
   if (!(ctx->a>-PETSC_MAX_REAL && ctx->b<PETSC_MAX_REAL && ctx->c>-PETSC_MAX_REAL && ctx->d<PETSC_MAX_REAL)) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_SUP,"Contour not defined in unbounded regions");
-  SETERRQ(PetscObjectComm((PetscObject)rg),1,"Not implemented yet");
+  if (ctx->a==ctx->b || ctx->c==ctx->d) {
+    if (ctx->a==ctx->b) {hi[0] = (ctx->d-ctx->c)/(n-1); hr[0] = 0.0;}
+    else {hr[0] = (ctx->b-ctx->a)/(n-1); hi[0] = 0.0;}
+    for (i=0;i<n;i++) {
+#if defined(PETSC_USE_COMPLEX)
+      cr[i] = ctx->a+hr[0]*i + (ctx->c+hi[0]*i)*PETSC_i;
+#else
+      cr[i] = ctx->a+hr[0]*i; ci[i] = ctx->c+hi[0]*i;
+#endif
+    }
+  } else {
+    d[1] = d[3] = ctx->d-ctx->c; d[0] = d[2] = ctx->b-ctx->a;
+    h = (2*(d[0]+d[1]))/n;
+    vr[0] = ctx->a; vr[1] = ctx->b; vr[2] = ctx->b; vr[3] = ctx->a;
+    vi[0] = ctx->c; vi[1] = ctx->c; vi[2] = ctx->d; vi[3] = ctx->d;
+    hr[0] = h;   hr[1] = 0.0; hr[2] = -h;  hr[3] = 0.0;
+    hi[0] = 0.0; hi[1] = h;   hi[2] = 0.0; hi[3] = -h;
+    off = 0.0; idx = 0;
+    for (i=0;i<4;i++) {
+      pt = (d[i]-off)/h+1;
+#if defined(PETSC_USE_COMPLEX)
+      cr[idx] = vr[i]+off*(hr[i]/h)+ (vi[i]+off*(hi[i]/h))*PETSC_i; 
+#else
+      cr[idx] = vr[i]+off*(hr[i]/h); ci[idx]=vi[i]+off*(hi[i]/h);
+#endif 
+      idx++;
+      for (j=1;j<pt;j++) {
+#if defined(PETSC_USE_COMPLEX)
+        cr[idx] = cr[idx-1]+(hr[i]+hi[i]*PETSC_i);
+#else
+        cr[idx] = cr[idx-1]+hr[i]; ci[idx] = ci[idx-1]+hi[i];
+#endif
+        idx++;
+      }
+      off = off+pt*h-d[i];
+      if (off>=d[i+1]) {off -= d[i+1]; i++;}
+    }  
+  }
   PetscFunctionReturn(0);
 }
 
@@ -191,7 +231,7 @@ PetscErrorCode RGCheckInside_Interval(RG rg,PetscReal dx,PetscReal dy,PetscInt *
 
 #undef __FUNCT__
 #define __FUNCT__ "RGSetFromOptions_Interval"
-PetscErrorCode RGSetFromOptions_Interval(PetscOptions *PetscOptionsObject,RG rg)
+PetscErrorCode RGSetFromOptions_Interval(PetscOptionItems *PetscOptionsObject,RG rg)
 {
   PetscErrorCode ierr;
   PetscBool      flg;
diff --git a/src/sys/classes/rg/impls/interval/rginterval.c.html b/src/sys/classes/rg/impls/interval/rginterval.c.html
index 816adec..3a27114 100644
--- a/src/sys/classes/rg/impls/interval/rginterval.c.html
+++ b/src/sys/classes/rg/impls/interval/rginterval.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/interval/rginterval.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:35+00:00">
+<meta name="date" content="2016-05-16T10:32:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/interval/rginterval.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/interval/rginterval.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Interval of the real axis or more generally a (possibly open) rectangle</font>
 <a name="line3">  3: </a><font color="#B22222">   of the complex plane.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -119,7 +119,7 @@
 <a name="line124">124: </a><strong><font color="#4169E1"><a name="RGIntervalGetEndpoints"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/RG/RGIntervalGetEndpoints.html#RGIntervalGetEndpoints">RGIntervalGetEndpoints</a>(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal *a,PetscReal *b,PetscReal *c,PetscReal *d)</font></strong>
 <a name="line125">125: </a>{
 
-<a name="line130">130: </a>  PetscTryMethod(rg,<font color="#666666">"RGIntervalGetEndpoints_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,a,b,c,d));
+<a name="line130">130: </a>  PetscUseMethod(rg,<font color="#666666">"RGIntervalGetEndpoints_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,a,b,c,d));
 <a name="line131">131: </a>  <font color="#4169E1">return</font>(0);
 <a name="line132">132: </a>}
 
@@ -147,76 +147,116 @@
 <a name="line164">164: </a><strong><font color="#4169E1"><a name="RGComputeContour_Interval"></a>PetscErrorCode RGComputeContour_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
 <a name="line165">165: </a>{
 <a name="line166">166: </a>  RG_INTERVAL *ctx = (RG_INTERVAL*)rg->data;
-
-<a name="line169">169: </a>  <font color="#4169E1">if</font> (!(ctx->a>-PETSC_MAX_REAL && ctx->b<PETSC_MAX_REAL && ctx->c>-PETSC_MAX_REAL && ctx->d<PETSC_MAX_REAL)) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_SUP,<font color="#666666">"Contour not defined in unbounded regions"</font>);
-<a name="line170">170: </a>  SETERRQ(PetscObjectComm((PetscObject)rg),1,<font color="#666666">"Not implemented yet"</font>);
-<a name="line171">171: </a>  <font color="#4169E1">return</font>(0);
-<a name="line172">172: </a>}
-
-<a name="line176">176: </a><strong><font color="#4169E1"><a name="RGCheckInside_Interval"></a>PetscErrorCode RGCheckInside_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal dx,PetscReal dy,PetscInt *inside)</font></strong>
-<a name="line177">177: </a>{
-<a name="line178">178: </a>  RG_INTERVAL *ctx = (RG_INTERVAL*)rg->data;
-
-<a name="line181">181: </a>  <font color="#4169E1">if</font> (dx>ctx->a && dx<ctx->b) *inside = 1;
-<a name="line182">182: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dx==ctx->a || dx==ctx->b) *inside = 0;
-<a name="line183">183: </a>  <font color="#4169E1">else</font> *inside = -1;
-<a name="line184">184: </a>  <font color="#4169E1">if</font> (*inside>=0) {
-<a name="line185">185: </a>    <font color="#4169E1">if</font> (dy>ctx->c && dy<ctx->d) ;
-<a name="line186">186: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dy==ctx->c || dy==ctx->d) *inside = 0;
-<a name="line187">187: </a>    <font color="#4169E1">else</font> *inside = -1;
-<a name="line188">188: </a>  }
-<a name="line189">189: </a>  <font color="#4169E1">return</font>(0);
-<a name="line190">190: </a>}
-
-<a name="line194">194: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Interval"></a>PetscErrorCode RGSetFromOptions_Interval(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line195">195: </a>{
-<a name="line197">197: </a>  PetscBool      flg;
-<a name="line198">198: </a>  PetscInt       k;
-<a name="line199">199: </a>  PetscReal      array[4]={0,0,0,0};
-
-<a name="line202">202: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> Interval Options"</font>);
-
-<a name="line204">204: </a>  k = 4;
-<a name="line205">205: </a>  PetscOptionsRealArray(<font color="#666666">"-rg_interval_endpoints"</font>,<font color="#666666">"Interval endpoints (four real values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>"</font>,array,&k,&flg);
-<a name="line206">206: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line207">207: </a>    <font color="#4169E1">if</font> (k<2) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_SIZ,<font color="#666666">"Must pass at leat two values in -rg_interval_endpoints (comma-separated without spaces)"</font>);
-<a name="line208">208: </a>    <a href="../../../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,array[0],array[1],array[2],array[3]);
-<a name="line209">209: </a>  }
-
-<a name="line211">211: </a>  PetscOptionsTail();
-<a name="line212">212: </a>  <font color="#4169E1">return</font>(0);
-<a name="line213">213: </a>}
-
-<a name="line217">217: </a><strong><font color="#4169E1"><a name="RGDestroy_Interval"></a>PetscErrorCode RGDestroy_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line218">218: </a>{
-
-<a name="line222">222: </a>  PetscFree(rg->data);
-<a name="line223">223: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalSetEndpoints_C"</font>,NULL);
-<a name="line224">224: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalGetEndpoints_C"</font>,NULL);
-<a name="line225">225: </a>  <font color="#4169E1">return</font>(0);
-<a name="line226">226: </a>}
-
-<a name="line230">230: </a><strong><font color="#4169E1"><a name="RGCreate_Interval"></a>PETSC_EXTERN PetscErrorCode RGCreate_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line231">231: </a>{
-<a name="line232">232: </a>  RG_INTERVAL    *interval;
-
-<a name="line236">236: </a>  PetscNewLog(rg,&interval);
-<a name="line237">237: </a>  interval->a = -PETSC_MAX_REAL;
-<a name="line238">238: </a>  interval->b = PETSC_MAX_REAL;
-<a name="line239">239: </a>  interval->c = -PETSC_MAX_REAL;
-<a name="line240">240: </a>  interval->d = PETSC_MAX_REAL;
-<a name="line241">241: </a>  rg->data = (void*)interval;
-
-<a name="line243">243: </a>  rg->ops->istrivial      = RGIsTrivial_Interval;
-<a name="line244">244: </a>  rg->ops->computecontour = RGComputeContour_Interval;
-<a name="line245">245: </a>  rg->ops->checkinside    = RGCheckInside_Interval;
-<a name="line246">246: </a>  rg->ops->setfromoptions = RGSetFromOptions_Interval;
-<a name="line247">247: </a>  rg->ops->view           = RGView_Interval;
-<a name="line248">248: </a>  rg->ops->destroy        = RGDestroy_Interval;
-<a name="line249">249: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalSetEndpoints_C"</font>,RGIntervalSetEndpoints_Interval);
-<a name="line250">250: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalGetEndpoints_C"</font>,RGIntervalGetEndpoints_Interval);
-<a name="line251">251: </a>  <font color="#4169E1">return</font>(0);
-<a name="line252">252: </a>}
+<a name="line167">167: </a>  PetscInt    i,pt,idx,j;
+<a name="line168">168: </a>  PetscReal   hr[4],hi[4],h,off,d[4];
+<a name="line169">169: </a>  PetscScalar vr[4],vi[4];
+
+<a name="line172">172: </a>  <font color="#4169E1">if</font> (!(ctx->a>-PETSC_MAX_REAL && ctx->b<PETSC_MAX_REAL && ctx->c>-PETSC_MAX_REAL && ctx->d<PETSC_MAX_REAL)) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_SUP,<font color="#666666">"Contour not defined in unbounded regions"</font>);
+<a name="line173">173: </a>  <font color="#4169E1">if</font> (ctx->a==ctx->b || ctx->c==ctx->d) {
+<a name="line174">174: </a>    <font color="#4169E1">if</font> (ctx->a==ctx->b) {hi[0] = (ctx->d-ctx->c)/(n-1); hr[0] = 0.0;}
+<a name="line175">175: </a>    <font color="#4169E1">else</font> {hr[0] = (ctx->b-ctx->a)/(n-1); hi[0] = 0.0;}
+<a name="line176">176: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line177">177: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line178">178: </a>      cr[i] = ctx->a+hr[0]*i + (ctx->c+hi[0]*i)*PETSC_i;
+<a name="line179">179: </a><font color="#A020F0">#else</font>
+<a name="line180">180: </a>      cr[i] = ctx->a+hr[0]*i; ci[i] = ctx->c+hi[0]*i;
+<a name="line181">181: </a><font color="#A020F0">#endif</font>
+<a name="line182">182: </a>    }
+<a name="line183">183: </a>  } <font color="#4169E1">else</font> {
+<a name="line184">184: </a>    d[1] = d[3] = ctx->d-ctx->c; d[0] = d[2] = ctx->b-ctx->a;
+<a name="line185">185: </a>    h = (2*(d[0]+d[1]))/n;
+<a name="line186">186: </a>    vr[0] = ctx->a; vr[1] = ctx->b; vr[2] = ctx->b; vr[3] = ctx->a;
+<a name="line187">187: </a>    vi[0] = ctx->c; vi[1] = ctx->c; vi[2] = ctx->d; vi[3] = ctx->d;
+<a name="line188">188: </a>    hr[0] = h;   hr[1] = 0.0; hr[2] = -h;  hr[3] = 0.0;
+<a name="line189">189: </a>    hi[0] = 0.0; hi[1] = h;   hi[2] = 0.0; hi[3] = -h;
+<a name="line190">190: </a>    off = 0.0; idx = 0;
+<a name="line191">191: </a>    <font color="#4169E1">for</font> (i=0;i<4;i++) {
+<a name="line192">192: </a>      pt = (d[i]-off)/h+1;
+<a name="line193">193: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line194">194: </a>      cr[idx] = vr[i]+off*(hr[i]/h)+ (vi[i]+off*(hi[i]/h))*PETSC_i; 
+<a name="line195">195: </a><font color="#A020F0">#else</font>
+<a name="line196">196: </a>      cr[idx] = vr[i]+off*(hr[i]/h); ci[idx]=vi[i]+off*(hi[i]/h);
+<a name="line197">197: </a><font color="#A020F0">#endif </font>
+<a name="line198">198: </a>      idx++;
+<a name="line199">199: </a>      <font color="#4169E1">for</font> (j=1;j<pt;j++) {
+<a name="line200">200: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line201">201: </a>        cr[idx] = cr[idx-1]+(hr[i]+hi[i]*PETSC_i);
+<a name="line202">202: </a><font color="#A020F0">#else</font>
+<a name="line203">203: </a>        cr[idx] = cr[idx-1]+hr[i]; ci[idx] = ci[idx-1]+hi[i];
+<a name="line204">204: </a><font color="#A020F0">#endif</font>
+<a name="line205">205: </a>        idx++;
+<a name="line206">206: </a>      }
+<a name="line207">207: </a>      off = off+pt*h-d[i];
+<a name="line208">208: </a>      <font color="#4169E1">if</font> (off>=d[i+1]) {off -= d[i+1]; i++;}
+<a name="line209">209: </a>    }  
+<a name="line210">210: </a>  }
+<a name="line211">211: </a>  <font color="#4169E1">return</font>(0);
+<a name="line212">212: </a>}
+
+<a name="line216">216: </a><strong><font color="#4169E1"><a name="RGCheckInside_Interval"></a>PetscErrorCode RGCheckInside_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal dx,PetscReal dy,PetscInt *inside)</font></strong>
+<a name="line217">217: </a>{
+<a name="line218">218: </a>  RG_INTERVAL *ctx = (RG_INTERVAL*)rg->data;
+
+<a name="line221">221: </a>  <font color="#4169E1">if</font> (dx>ctx->a && dx<ctx->b) *inside = 1;
+<a name="line222">222: </a>  <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dx==ctx->a || dx==ctx->b) *inside = 0;
+<a name="line223">223: </a>  <font color="#4169E1">else</font> *inside = -1;
+<a name="line224">224: </a>  <font color="#4169E1">if</font> (*inside>=0) {
+<a name="line225">225: </a>    <font color="#4169E1">if</font> (dy>ctx->c && dy<ctx->d) ;
+<a name="line226">226: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dy==ctx->c || dy==ctx->d) *inside = 0;
+<a name="line227">227: </a>    <font color="#4169E1">else</font> *inside = -1;
+<a name="line228">228: </a>  }
+<a name="line229">229: </a>  <font color="#4169E1">return</font>(0);
+<a name="line230">230: </a>}
+
+<a name="line234">234: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Interval"></a>PetscErrorCode RGSetFromOptions_Interval(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line235">235: </a>{
+<a name="line237">237: </a>  PetscBool      flg;
+<a name="line238">238: </a>  PetscInt       k;
+<a name="line239">239: </a>  PetscReal      array[4]={0,0,0,0};
+
+<a name="line242">242: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> Interval Options"</font>);
+
+<a name="line244">244: </a>  k = 4;
+<a name="line245">245: </a>  PetscOptionsRealArray(<font color="#666666">"-rg_interval_endpoints"</font>,<font color="#666666">"Interval endpoints (four real values separated with a comma without spaces)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>"</font>,array,&k,&flg);
+<a name="line246">246: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line247">247: </a>    <font color="#4169E1">if</font> (k<2) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_SIZ,<font color="#666666">"Must pass at leat two values in -rg_interval_endpoints (comma-separated without spaces)"</font>);
+<a name="line248">248: </a>    <a href="../../../../../../docs/manualpages/RG/RGIntervalSetEndpoints.html#RGIntervalSetEndpoints">RGIntervalSetEndpoints</a>(rg,array[0],array[1],array[2],array[3]);
+<a name="line249">249: </a>  }
+
+<a name="line251">251: </a>  PetscOptionsTail();
+<a name="line252">252: </a>  <font color="#4169E1">return</font>(0);
+<a name="line253">253: </a>}
+
+<a name="line257">257: </a><strong><font color="#4169E1"><a name="RGDestroy_Interval"></a>PetscErrorCode RGDestroy_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line258">258: </a>{
+
+<a name="line262">262: </a>  PetscFree(rg->data);
+<a name="line263">263: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalSetEndpoints_C"</font>,NULL);
+<a name="line264">264: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalGetEndpoints_C"</font>,NULL);
+<a name="line265">265: </a>  <font color="#4169E1">return</font>(0);
+<a name="line266">266: </a>}
+
+<a name="line270">270: </a><strong><font color="#4169E1"><a name="RGCreate_Interval"></a>PETSC_EXTERN PetscErrorCode RGCreate_Interval(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line271">271: </a>{
+<a name="line272">272: </a>  RG_INTERVAL    *interval;
+
+<a name="line276">276: </a>  PetscNewLog(rg,&interval);
+<a name="line277">277: </a>  interval->a = -PETSC_MAX_REAL;
+<a name="line278">278: </a>  interval->b = PETSC_MAX_REAL;
+<a name="line279">279: </a>  interval->c = -PETSC_MAX_REAL;
+<a name="line280">280: </a>  interval->d = PETSC_MAX_REAL;
+<a name="line281">281: </a>  rg->data = (void*)interval;
+
+<a name="line283">283: </a>  rg->ops->istrivial      = RGIsTrivial_Interval;
+<a name="line284">284: </a>  rg->ops->computecontour = RGComputeContour_Interval;
+<a name="line285">285: </a>  rg->ops->checkinside    = RGCheckInside_Interval;
+<a name="line286">286: </a>  rg->ops->setfromoptions = RGSetFromOptions_Interval;
+<a name="line287">287: </a>  rg->ops->view           = RGView_Interval;
+<a name="line288">288: </a>  rg->ops->destroy        = RGDestroy_Interval;
+<a name="line289">289: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalSetEndpoints_C"</font>,RGIntervalSetEndpoints_Interval);
+<a name="line290">290: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGIntervalGetEndpoints_C"</font>,RGIntervalGetEndpoints_Interval);
+<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
+<a name="line292">292: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/rg/impls/makefile b/src/sys/classes/rg/impls/makefile
index 814bddc..6600f78 100644
--- a/src/sys/classes/rg/impls/makefile
+++ b/src/sys/classes/rg/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/impls/makefile.html b/src/sys/classes/rg/impls/makefile.html
index 0e94591..1679ab1 100644
--- a/src/sys/classes/rg/impls/makefile.html
+++ b/src/sys/classes/rg/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:35+00:00">
+<meta name="date" content="2016-05-16T10:32:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/impls/polygon/index.html b/src/sys/classes/rg/impls/polygon/index.html
index cae498c..b895103 100644
--- a/src/sys/classes/rg/impls/polygon/index.html
+++ b/src/sys/classes/rg/impls/polygon/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/polygon/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/polygon/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/impls/polygon/makefile b/src/sys/classes/rg/impls/polygon/makefile
index 7a53f68..43de1ea 100644
--- a/src/sys/classes/rg/impls/polygon/makefile
+++ b/src/sys/classes/rg/impls/polygon/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/impls/polygon/makefile.html b/src/sys/classes/rg/impls/polygon/makefile.html
index be1b9b7..46360f5 100644
--- a/src/sys/classes/rg/impls/polygon/makefile.html
+++ b/src/sys/classes/rg/impls/polygon/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/polygon/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:36+00:00">
+<meta name="date" content="2016-05-16T10:32:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/polygon/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/polygon/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/impls/polygon/rgpolygon.c b/src/sys/classes/rg/impls/polygon/rgpolygon.c
index 258280f..eb8e9fc 100644
--- a/src/sys/classes/rg/impls/polygon/rgpolygon.c
+++ b/src/sys/classes/rg/impls/polygon/rgpolygon.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -148,7 +148,7 @@ PetscErrorCode RGPolygonGetVertices(RG rg,PetscInt *n,PetscScalar **vr,PetscScal
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(rg,RG_CLASSID,1);
-  ierr = PetscTryMethod(rg,"RGPolygonGetVertices_C",(RG,PetscInt*,PetscScalar**,PetscScalar**),(rg,n,vr,vi));CHKERRQ(ierr);
+  ierr = PetscUseMethod(rg,"RGPolygonGetVertices_C",(RG,PetscInt*,PetscScalar**,PetscScalar**),(rg,n,vr,vi));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -166,6 +166,7 @@ PetscErrorCode RGView_Polygon(RG rg,PetscViewer viewer)
   ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
   if (isascii) {
     ierr = PetscViewerASCIIPrintf(viewer,"vertices: ");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);CHKERRQ(ierr);
     for (i=0;i<ctx->n;i++) {
 #if defined(PETSC_USE_COMPLEX)
       ierr = SlepcSNPrintfScalar(str,50,ctx->vr[i],PETSC_FALSE);CHKERRQ(ierr);
@@ -179,6 +180,7 @@ PetscErrorCode RGView_Polygon(RG rg,PetscViewer viewer)
       ierr = PetscViewerASCIIPrintf(viewer,"%s%s",str,(i<ctx->n-1)?",":"");CHKERRQ(ierr);
     }
     ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
+    ierr = PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);CHKERRQ(ierr);
   }
   PetscFunctionReturn(0);
 }
@@ -190,7 +192,7 @@ PetscErrorCode RGIsTrivial_Polygon(RG rg,PetscBool *trivial)
   RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
 
   PetscFunctionBegin;
-  *trivial = (ctx->n)? PETSC_FALSE: PETSC_TRUE;
+  *trivial = PetscNot(ctx->n);
   PetscFunctionReturn(0);
 }
 
@@ -198,11 +200,67 @@ PetscErrorCode RGIsTrivial_Polygon(RG rg,PetscBool *trivial)
 #define __FUNCT__ "RGComputeContour_Polygon"
 PetscErrorCode RGComputeContour_Polygon(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
 {
-  RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
+  RG_POLYGON  *ctx = (RG_POLYGON*)rg->data;
+  PetscReal   length,h,d,rem=0.0;
+  PetscInt    k=1,idx=ctx->n-1,i;
+  PetscBool   ini=PETSC_FALSE;
+  PetscScalar incr;
+#if !defined(PETSC_USE_COMPLEX)
+  PetscScalar inci;
+#endif
 
   PetscFunctionBegin;
   if (!ctx->n) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_WRONGSTATE,"No vertices have been set yet");
-  SETERRQ(PetscObjectComm((PetscObject)rg),1,"Not implemented yet");
+  length = SlepcAbsEigenvalue(ctx->vr[0]-ctx->vr[ctx->n-1],ctx->vi[0]-ctx->vi[ctx->n-1]);
+  for (i=0;i<ctx->n-1;i++) length += SlepcAbsEigenvalue(ctx->vr[i]-ctx->vr[i+1],ctx->vi[i]-ctx->vi[i+1]);
+  h = length/n;
+  cr[0] = ctx->vr[0];
+#if !defined(PETSC_USE_COMPLEX)
+  ci[0] = ctx->vi[0];
+#endif
+  incr = ctx->vr[ctx->n-1]-ctx->vr[0];
+#if !defined(PETSC_USE_COMPLEX)
+  inci = ctx->vi[ctx->n-1]-ctx->vi[0];
+#endif
+  d = SlepcAbsEigenvalue(incr,inci);
+  incr /= d;
+#if !defined(PETSC_USE_COMPLEX)
+  inci /= d;
+#endif
+  while (k<n) {
+    if (ini) {
+      incr = ctx->vr[idx]-ctx->vr[idx+1];
+#if !defined(PETSC_USE_COMPLEX)
+      inci = ctx->vi[idx]-ctx->vi[idx+1];
+#endif
+      d = SlepcAbsEigenvalue(incr,inci);
+      incr /= d;
+#if !defined(PETSC_USE_COMPLEX)
+      inci /= d;
+#endif
+      if (rem+d>h) {
+        cr[k] = ctx->vr[idx+1]+incr*(h-rem);
+#if !defined(PETSC_USE_COMPLEX)
+        ci[k] = ctx->vi[idx+1]+inci*(h-rem);
+#endif
+        k++;
+        ini = PETSC_FALSE;
+      } else {rem += d; idx--;}
+    } else {
+#if !defined(PETSC_USE_COMPLEX)
+      rem = SlepcAbsEigenvalue(ctx->vr[idx]-cr[k-1],ctx->vi[idx]-ci[k-1]);
+#else
+      rem = PetscAbsScalar(ctx->vr[idx]-cr[k-1]);
+#endif
+      if (rem>h) {
+        cr[k] = cr[k-1]+incr*h;
+#if !defined(PETSC_USE_COMPLEX)
+        ci[k] = ci[k-1]+inci*h;
+#endif
+        k++;
+      } else {ini = PETSC_TRUE; idx--;}
+    }
+  }
   PetscFunctionReturn(0);
 }
 
@@ -228,10 +286,10 @@ PetscErrorCode RGCheckInside_Polygon(RG rg,PetscReal px,PetscReal py,PetscInt *i
   *inout = -1;
   for (i=0;i<ctx->n;i++) {
     j = (i+1)%ctx->n;
-    mx = (x[i]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-    nx = (x[j]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-    my = (y[i]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-    ny = (y[j]>=0.0)? PETSC_TRUE: PETSC_FALSE;
+    mx = PetscNot(x[i]<0.0);
+    nx = PetscNot(x[j]<0.0);
+    my = PetscNot(y[i]<0.0);
+    ny = PetscNot(y[j]<0.0);
     if (!((my||ny) && (mx||nx)) || (mx&&nx)) continue;
     if (((my && ny && (mx||nx)) && (!(mx&&nx)))) {
       *inout = -*inout;
@@ -248,7 +306,7 @@ PetscErrorCode RGCheckInside_Polygon(RG rg,PetscReal px,PetscReal py,PetscInt *i
 
 #undef __FUNCT__
 #define __FUNCT__ "RGSetFromOptions_Polygon"
-PetscErrorCode RGSetFromOptions_Polygon(PetscOptions *PetscOptionsObject,RG rg)
+PetscErrorCode RGSetFromOptions_Polygon(PetscOptionItems *PetscOptionsObject,RG rg)
 {
   PetscErrorCode ierr;
   PetscScalar    array[VERTMAX];
@@ -271,7 +329,7 @@ PetscErrorCode RGSetFromOptions_Polygon(PetscOptions *PetscOptionsObject,RG rg)
   ki = VERTMAX;
   for (i=0;i<ki;i++) arrayi[i] = 0;
   ierr = PetscOptionsScalarArray("-rg_polygon_verticesi","Vertices of polygon (imaginary part)","RGPolygonSetVertices",arrayi,&ki,&flgi);CHKERRQ(ierr);
-  if (ki!=k) SETERRQ2(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_SIZ,"The number of real %d and imaginary %d parts do not match",k,ki);
+  if (ki!=k) SETERRQ2(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_SIZ,"The number of real %D and imaginary %D parts do not match",k,ki);
 #endif
   if (flg || flgi) {
     ierr = RGPolygonSetVertices(rg,k,array,arrayi);CHKERRQ(ierr);
diff --git a/src/sys/classes/rg/impls/polygon/rgpolygon.c.html b/src/sys/classes/rg/impls/polygon/rgpolygon.c.html
index d0d8990..a39000e 100644
--- a/src/sys/classes/rg/impls/polygon/rgpolygon.c.html
+++ b/src/sys/classes/rg/impls/polygon/rgpolygon.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/polygon/rgpolygon.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:36+00:00">
+<meta name="date" content="2016-05-16T10:32:31+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/polygon/rgpolygon.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/polygon/rgpolygon.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Region defined by a set of vertices.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -140,7 +140,7 @@
 <a name="line145">145: </a><strong><font color="#4169E1"><a name="RGPolygonGetVertices"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/RG/RGPolygonGetVertices.html#RGPolygonGetVertices">RGPolygonGetVertices</a>(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt *n,PetscScalar **vr,PetscScalar **vi)</font></strong>
 <a name="line146">146: </a>{
 
-<a name="line151">151: </a>  PetscTryMethod(rg,<font color="#666666">"RGPolygonGetVertices_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt*,PetscScalar**,PetscScalar**),(rg,n,vr,vi));
+<a name="line151">151: </a>  PetscUseMethod(rg,<font color="#666666">"RGPolygonGetVertices_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscInt*,PetscScalar**,PetscScalar**),(rg,n,vr,vi));
 <a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
 <a name="line153">153: </a>}
 
@@ -154,141 +154,199 @@
 <a name="line166">166: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
 <a name="line167">167: </a>  <font color="#4169E1">if</font> (isascii) {
 <a name="line168">168: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"vertices: "</font>);
-<a name="line169">169: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->n;i++) {
-<a name="line170">170: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line171">171: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->vr[i],PETSC_FALSE);
-<a name="line172">172: </a><font color="#A020F0">#else</font>
-<a name="line173">173: </a>      <font color="#4169E1">if</font> (ctx->vi[i]!=0.0) {
-<a name="line174">174: </a>        PetscSNPrintf(str,50,<font color="#666666">"%g%+gi"</font>,(double)ctx->vr[i],(double)ctx->vi[i]);
-<a name="line175">175: </a>      } <font color="#4169E1">else</font> {
-<a name="line176">176: </a>        PetscSNPrintf(str,50,<font color="#666666">"%g"</font>,(double)ctx->vr[i]);
-<a name="line177">177: </a>      }
-<a name="line178">178: </a><font color="#A020F0">#endif</font>
-<a name="line179">179: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s%s"</font>,str,(i<ctx->n-1)?<font color="#666666">","</font>:<font color="#666666">""</font>);
-<a name="line180">180: </a>    }
-<a name="line181">181: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
-<a name="line182">182: </a>  }
-<a name="line183">183: </a>  <font color="#4169E1">return</font>(0);
-<a name="line184">184: </a>}
-
-<a name="line188">188: </a><strong><font color="#4169E1"><a name="RGIsTrivial_Polygon"></a>PetscErrorCode RGIsTrivial_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool *trivial)</font></strong>
-<a name="line189">189: </a>{
-<a name="line190">190: </a>  RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
-
-<a name="line193">193: </a>  *trivial = (ctx->n)? PETSC_FALSE: PETSC_TRUE;
-<a name="line194">194: </a>  <font color="#4169E1">return</font>(0);
-<a name="line195">195: </a>}
-
-<a name="line199">199: </a><strong><font color="#4169E1"><a name="RGComputeContour_Polygon"></a>PetscErrorCode RGComputeContour_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
-<a name="line200">200: </a>{
-<a name="line201">201: </a>  RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
-
-<a name="line204">204: </a>  <font color="#4169E1">if</font> (!ctx->n) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"No vertices have been set yet"</font>);
-<a name="line205">205: </a>  SETERRQ(PetscObjectComm((PetscObject)rg),1,<font color="#666666">"Not implemented yet"</font>);
-<a name="line206">206: </a>  <font color="#4169E1">return</font>(0);
-<a name="line207">207: </a>}
-
-<a name="line211">211: </a><strong><font color="#4169E1"><a name="RGCheckInside_Polygon"></a>PetscErrorCode RGCheckInside_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal px,PetscReal py,PetscInt *inout)</font></strong>
-<a name="line212">212: </a>{
-<a name="line213">213: </a>  RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
-<a name="line214">214: </a>  PetscReal  val,x[VERTMAX],y[VERTMAX];
-<a name="line215">215: </a>  PetscBool  mx,my,nx,ny;
-<a name="line216">216: </a>  PetscInt   i,j;
-
-<a name="line219">219: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->n;i++) {
-<a name="line220">220: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line221">221: </a>    x[i] = PetscRealPart(ctx->vr[i])-px;
-<a name="line222">222: </a>    y[i] = PetscImaginaryPart(ctx->vr[i])-py;
-<a name="line223">223: </a><font color="#A020F0">#else</font>
-<a name="line224">224: </a>    x[i] = ctx->vr[i]-px;
-<a name="line225">225: </a>    y[i] = ctx->vi[i]-py;
-<a name="line226">226: </a><font color="#A020F0">#endif</font>
-<a name="line227">227: </a>  }
-<a name="line228">228: </a>  *inout = -1;
-<a name="line229">229: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->n;i++) {
-<a name="line230">230: </a>    j = (i+1)%ctx->n;
-<a name="line231">231: </a>    mx = (x[i]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line232">232: </a>    nx = (x[j]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line233">233: </a>    my = (y[i]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line234">234: </a>    ny = (y[j]>=0.0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line235">235: </a>    <font color="#4169E1">if</font> (!((my||ny) && (mx||nx)) || (mx&&nx)) <font color="#4169E1">continue</font>;
-<a name="line236">236: </a>    <font color="#4169E1">if</font> (((my && ny && (mx||nx)) && (!(mx&&nx)))) {
-<a name="line237">237: </a>      *inout = -*inout;
-<a name="line238">238: </a>      <font color="#4169E1">continue</font>;
-<a name="line239">239: </a>    }
-<a name="line240">240: </a>    val = (y[i]*x[j]-x[i]*y[j])/(x[j]-x[i]);
-<a name="line241">241: </a>    <font color="#4169E1">if</font> (PetscAbs(val)<10*PETSC_MACHINE_EPSILON) {
-<a name="line242">242: </a>      *inout = 0;
-<a name="line243">243: </a>      <font color="#4169E1">return</font>(0);
-<a name="line244">244: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (val>0.0) *inout = -*inout;
-<a name="line245">245: </a>  }
-<a name="line246">246: </a>  <font color="#4169E1">return</font>(0);
-<a name="line247">247: </a>}
-
-<a name="line251">251: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Polygon"></a>PetscErrorCode RGSetFromOptions_Polygon(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line252">252: </a>{
-<a name="line254">254: </a>  PetscScalar    array[VERTMAX];
-<a name="line255">255: </a>  PetscInt       i,k;
-<a name="line256">256: </a>  PetscBool      flg,flgi=PETSC_FALSE;
+<a name="line169">169: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_FALSE);
+<a name="line170">170: </a>    <font color="#4169E1">for</font> (i=0;i<ctx->n;i++) {
+<a name="line171">171: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line172">172: </a>      <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->vr[i],PETSC_FALSE);
+<a name="line173">173: </a><font color="#A020F0">#else</font>
+<a name="line174">174: </a>      <font color="#4169E1">if</font> (ctx->vi[i]!=0.0) {
+<a name="line175">175: </a>        PetscSNPrintf(str,50,<font color="#666666">"%g%+gi"</font>,(double)ctx->vr[i],(double)ctx->vi[i]);
+<a name="line176">176: </a>      } <font color="#4169E1">else</font> {
+<a name="line177">177: </a>        PetscSNPrintf(str,50,<font color="#666666">"%g"</font>,(double)ctx->vr[i]);
+<a name="line178">178: </a>      }
+<a name="line179">179: </a><font color="#A020F0">#endif</font>
+<a name="line180">180: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"%s%s"</font>,str,(i<ctx->n-1)?<font color="#666666">","</font>:<font color="#666666">""</font>);
+<a name="line181">181: </a>    }
+<a name="line182">182: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"\n"</font>);
+<a name="line183">183: </a>    PetscViewerASCIIUseTabs(viewer,PETSC_TRUE);
+<a name="line184">184: </a>  }
+<a name="line185">185: </a>  <font color="#4169E1">return</font>(0);
+<a name="line186">186: </a>}
+
+<a name="line190">190: </a><strong><font color="#4169E1"><a name="RGIsTrivial_Polygon"></a>PetscErrorCode RGIsTrivial_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool *trivial)</font></strong>
+<a name="line191">191: </a>{
+<a name="line192">192: </a>  RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
+
+<a name="line195">195: </a>  *trivial = PetscNot(ctx->n);
+<a name="line196">196: </a>  <font color="#4169E1">return</font>(0);
+<a name="line197">197: </a>}
+
+<a name="line201">201: </a><strong><font color="#4169E1"><a name="RGComputeContour_Polygon"></a>PetscErrorCode RGComputeContour_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
+<a name="line202">202: </a>{
+<a name="line203">203: </a>  RG_POLYGON  *ctx = (RG_POLYGON*)rg->data;
+<a name="line204">204: </a>  PetscReal   length,h,d,rem=0.0;
+<a name="line205">205: </a>  PetscInt    k=1,idx=ctx->n-1,i;
+<a name="line206">206: </a>  PetscBool   ini=PETSC_FALSE;
+<a name="line207">207: </a>  PetscScalar incr;
+<a name="line208">208: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line209">209: </a>  PetscScalar inci;
+<a name="line210">210: </a><font color="#A020F0">#endif</font>
+
+<a name="line213">213: </a>  <font color="#4169E1">if</font> (!ctx->n) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_WRONGSTATE,<font color="#666666">"No vertices have been set yet"</font>);
+<a name="line214">214: </a>  length = SlepcAbsEigenvalue(ctx->vr[0]-ctx->vr[ctx->n-1],ctx->vi[0]-ctx->vi[ctx->n-1]);
+<a name="line215">215: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->n-1;i++) length += SlepcAbsEigenvalue(ctx->vr[i]-ctx->vr[i+1],ctx->vi[i]-ctx->vi[i+1]);
+<a name="line216">216: </a>  h = length/n;
+<a name="line217">217: </a>  cr[0] = ctx->vr[0];
+<a name="line218">218: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line219">219: </a>  ci[0] = ctx->vi[0];
+<a name="line220">220: </a><font color="#A020F0">#endif</font>
+<a name="line221">221: </a>  incr = ctx->vr[ctx->n-1]-ctx->vr[0];
+<a name="line222">222: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line223">223: </a>  inci = ctx->vi[ctx->n-1]-ctx->vi[0];
+<a name="line224">224: </a><font color="#A020F0">#endif</font>
+<a name="line225">225: </a>  d = SlepcAbsEigenvalue(incr,inci);
+<a name="line226">226: </a>  incr /= d;
+<a name="line227">227: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line228">228: </a>  inci /= d;
+<a name="line229">229: </a><font color="#A020F0">#endif</font>
+<a name="line230">230: </a>  <font color="#4169E1">while</font> (k<n) {
+<a name="line231">231: </a>    <font color="#4169E1">if</font> (ini) {
+<a name="line232">232: </a>      incr = ctx->vr[idx]-ctx->vr[idx+1];
+<a name="line233">233: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line234">234: </a>      inci = ctx->vi[idx]-ctx->vi[idx+1];
+<a name="line235">235: </a><font color="#A020F0">#endif</font>
+<a name="line236">236: </a>      d = SlepcAbsEigenvalue(incr,inci);
+<a name="line237">237: </a>      incr /= d;
+<a name="line238">238: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line239">239: </a>      inci /= d;
+<a name="line240">240: </a><font color="#A020F0">#endif</font>
+<a name="line241">241: </a>      <font color="#4169E1">if</font> (rem+d>h) {
+<a name="line242">242: </a>        cr[k] = ctx->vr[idx+1]+incr*(h-rem);
+<a name="line243">243: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line244">244: </a>        ci[k] = ctx->vi[idx+1]+inci*(h-rem);
+<a name="line245">245: </a><font color="#A020F0">#endif</font>
+<a name="line246">246: </a>        k++;
+<a name="line247">247: </a>        ini = PETSC_FALSE;
+<a name="line248">248: </a>      } <font color="#4169E1">else</font> {rem += d; idx--;}
+<a name="line249">249: </a>    } <font color="#4169E1">else</font> {
+<a name="line250">250: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line251">251: </a>      rem = SlepcAbsEigenvalue(ctx->vr[idx]-cr[k-1],ctx->vi[idx]-ci[k-1]);
+<a name="line252">252: </a><font color="#A020F0">#else</font>
+<a name="line253">253: </a>      rem = PetscAbsScalar(ctx->vr[idx]-cr[k-1]);
+<a name="line254">254: </a><font color="#A020F0">#endif</font>
+<a name="line255">255: </a>      <font color="#4169E1">if</font> (rem>h) {
+<a name="line256">256: </a>        cr[k] = cr[k-1]+incr*h;
 <a name="line257">257: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line258">258: </a>  PetscScalar    arrayi[VERTMAX];
-<a name="line259">259: </a>  PetscInt       ki;
-<a name="line260">260: </a><font color="#A020F0">#else</font>
-<a name="line261">261: </a>  PetscScalar    *arrayi=NULL;
-<a name="line262">262: </a><font color="#A020F0">#endif</font>
-
-<a name="line265">265: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> Polygon Options"</font>);
-
-<a name="line267">267: </a>  k = VERTMAX;
-<a name="line268">268: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
-<a name="line269">269: </a>  PetscOptionsScalarArray(<font color="#666666">"-rg_polygon_vertices"</font>,<font color="#666666">"Vertices of polygon"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>"</font>,array,&k,&flg);
-<a name="line270">270: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line271">271: </a>  ki = VERTMAX;
-<a name="line272">272: </a>  <font color="#4169E1">for</font> (i=0;i<ki;i++) arrayi[i] = 0;
-<a name="line273">273: </a>  PetscOptionsScalarArray(<font color="#666666">"-rg_polygon_verticesi"</font>,<font color="#666666">"Vertices of polygon (imaginary part)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>"</font>,arrayi,&ki,&flgi);
-<a name="line274">274: </a>  <font color="#4169E1">if</font> (ki!=k) SETERRQ2(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_SIZ,<font color="#666666">"The number of real %d and imaginary %d parts do not match"</font>,k,ki);
-<a name="line275">275: </a><font color="#A020F0">#endif</font>
-<a name="line276">276: </a>  <font color="#4169E1">if</font> (flg || flgi) {
-<a name="line277">277: </a>    <a href="../../../../../../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>(rg,k,array,arrayi);
-<a name="line278">278: </a>  }
-
-<a name="line280">280: </a>  PetscOptionsTail();
-<a name="line281">281: </a>  <font color="#4169E1">return</font>(0);
-<a name="line282">282: </a>}
-
-<a name="line286">286: </a><strong><font color="#4169E1"><a name="RGDestroy_Polygon"></a>PetscErrorCode RGDestroy_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line287">287: </a>{
-<a name="line289">289: </a>  RG_POLYGON     *ctx = (RG_POLYGON*)rg->data;
-
-<a name="line292">292: </a>  <font color="#4169E1">if</font> (ctx->n) {
-<a name="line293">293: </a>    PetscFree(ctx->vr);
-<a name="line294">294: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line295">295: </a>    PetscFree(ctx->vi);
-<a name="line296">296: </a><font color="#A020F0">#endif</font>
-<a name="line297">297: </a>  }
-<a name="line298">298: </a>  PetscFree(rg->data);
-<a name="line299">299: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonSetVertices_C"</font>,NULL);
-<a name="line300">300: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonGetVertices_C"</font>,NULL);
-<a name="line301">301: </a>  <font color="#4169E1">return</font>(0);
-<a name="line302">302: </a>}
-
-<a name="line306">306: </a><strong><font color="#4169E1"><a name="RGCreate_Polygon"></a>PETSC_EXTERN PetscErrorCode RGCreate_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line307">307: </a>{
-<a name="line308">308: </a>  RG_POLYGON     *polygon;
-
-<a name="line312">312: </a>  PetscNewLog(rg,&polygon);
-<a name="line313">313: </a>  rg->data = (void*)polygon;
-
-<a name="line315">315: </a>  rg->ops->istrivial      = RGIsTrivial_Polygon;
-<a name="line316">316: </a>  rg->ops->computecontour = RGComputeContour_Polygon;
-<a name="line317">317: </a>  rg->ops->checkinside    = RGCheckInside_Polygon;
-<a name="line318">318: </a>  rg->ops->setfromoptions = RGSetFromOptions_Polygon;
-<a name="line319">319: </a>  rg->ops->view           = RGView_Polygon;
-<a name="line320">320: </a>  rg->ops->destroy        = RGDestroy_Polygon;
-<a name="line321">321: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonSetVertices_C"</font>,RGPolygonSetVertices_Polygon);
-<a name="line322">322: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonGetVertices_C"</font>,RGPolygonGetVertices_Polygon);
-<a name="line323">323: </a>  <font color="#4169E1">return</font>(0);
-<a name="line324">324: </a>}
+<a name="line258">258: </a>        ci[k] = ci[k-1]+inci*h;
+<a name="line259">259: </a><font color="#A020F0">#endif</font>
+<a name="line260">260: </a>        k++;
+<a name="line261">261: </a>      } <font color="#4169E1">else</font> {ini = PETSC_TRUE; idx--;}
+<a name="line262">262: </a>    }
+<a name="line263">263: </a>  }
+<a name="line264">264: </a>  <font color="#4169E1">return</font>(0);
+<a name="line265">265: </a>}
+
+<a name="line269">269: </a><strong><font color="#4169E1"><a name="RGCheckInside_Polygon"></a>PetscErrorCode RGCheckInside_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal px,PetscReal py,PetscInt *inout)</font></strong>
+<a name="line270">270: </a>{
+<a name="line271">271: </a>  RG_POLYGON *ctx = (RG_POLYGON*)rg->data;
+<a name="line272">272: </a>  PetscReal  val,x[VERTMAX],y[VERTMAX];
+<a name="line273">273: </a>  PetscBool  mx,my,nx,ny;
+<a name="line274">274: </a>  PetscInt   i,j;
+
+<a name="line277">277: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->n;i++) {
+<a name="line278">278: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line279">279: </a>    x[i] = PetscRealPart(ctx->vr[i])-px;
+<a name="line280">280: </a>    y[i] = PetscImaginaryPart(ctx->vr[i])-py;
+<a name="line281">281: </a><font color="#A020F0">#else</font>
+<a name="line282">282: </a>    x[i] = ctx->vr[i]-px;
+<a name="line283">283: </a>    y[i] = ctx->vi[i]-py;
+<a name="line284">284: </a><font color="#A020F0">#endif</font>
+<a name="line285">285: </a>  }
+<a name="line286">286: </a>  *inout = -1;
+<a name="line287">287: </a>  <font color="#4169E1">for</font> (i=0;i<ctx->n;i++) {
+<a name="line288">288: </a>    j = (i+1)%ctx->n;
+<a name="line289">289: </a>    mx = PetscNot(x[i]<0.0);
+<a name="line290">290: </a>    nx = PetscNot(x[j]<0.0);
+<a name="line291">291: </a>    my = PetscNot(y[i]<0.0);
+<a name="line292">292: </a>    ny = PetscNot(y[j]<0.0);
+<a name="line293">293: </a>    <font color="#4169E1">if</font> (!((my||ny) && (mx||nx)) || (mx&&nx)) <font color="#4169E1">continue</font>;
+<a name="line294">294: </a>    <font color="#4169E1">if</font> (((my && ny && (mx||nx)) && (!(mx&&nx)))) {
+<a name="line295">295: </a>      *inout = -*inout;
+<a name="line296">296: </a>      <font color="#4169E1">continue</font>;
+<a name="line297">297: </a>    }
+<a name="line298">298: </a>    val = (y[i]*x[j]-x[i]*y[j])/(x[j]-x[i]);
+<a name="line299">299: </a>    <font color="#4169E1">if</font> (PetscAbs(val)<10*PETSC_MACHINE_EPSILON) {
+<a name="line300">300: </a>      *inout = 0;
+<a name="line301">301: </a>      <font color="#4169E1">return</font>(0);
+<a name="line302">302: </a>    } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (val>0.0) *inout = -*inout;
+<a name="line303">303: </a>  }
+<a name="line304">304: </a>  <font color="#4169E1">return</font>(0);
+<a name="line305">305: </a>}
+
+<a name="line309">309: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Polygon"></a>PetscErrorCode RGSetFromOptions_Polygon(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line310">310: </a>{
+<a name="line312">312: </a>  PetscScalar    array[VERTMAX];
+<a name="line313">313: </a>  PetscInt       i,k;
+<a name="line314">314: </a>  PetscBool      flg,flgi=PETSC_FALSE;
+<a name="line315">315: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line316">316: </a>  PetscScalar    arrayi[VERTMAX];
+<a name="line317">317: </a>  PetscInt       ki;
+<a name="line318">318: </a><font color="#A020F0">#else</font>
+<a name="line319">319: </a>  PetscScalar    *arrayi=NULL;
+<a name="line320">320: </a><font color="#A020F0">#endif</font>
+
+<a name="line323">323: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> Polygon Options"</font>);
+
+<a name="line325">325: </a>  k = VERTMAX;
+<a name="line326">326: </a>  <font color="#4169E1">for</font> (i=0;i<k;i++) array[i] = 0;
+<a name="line327">327: </a>  PetscOptionsScalarArray(<font color="#666666">"-rg_polygon_vertices"</font>,<font color="#666666">"Vertices of polygon"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>"</font>,array,&k,&flg);
+<a name="line328">328: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line329">329: </a>  ki = VERTMAX;
+<a name="line330">330: </a>  <font color="#4169E1">for</font> (i=0;i<ki;i++) arrayi[i] = 0;
+<a name="line331">331: </a>  PetscOptionsScalarArray(<font color="#666666">"-rg_polygon_verticesi"</font>,<font color="#666666">"Vertices of polygon (imaginary part)"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>"</font>,arrayi,&ki,&flgi);
+<a name="line332">332: </a>  <font color="#4169E1">if</font> (ki!=k) SETERRQ2(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_SIZ,<font color="#666666">"The number of real %D and imaginary %D parts do not match"</font>,k,ki);
+<a name="line333">333: </a><font color="#A020F0">#endif</font>
+<a name="line334">334: </a>  <font color="#4169E1">if</font> (flg || flgi) {
+<a name="line335">335: </a>    <a href="../../../../../../docs/manualpages/RG/RGPolygonSetVertices.html#RGPolygonSetVertices">RGPolygonSetVertices</a>(rg,k,array,arrayi);
+<a name="line336">336: </a>  }
+
+<a name="line338">338: </a>  PetscOptionsTail();
+<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>}
+
+<a name="line344">344: </a><strong><font color="#4169E1"><a name="RGDestroy_Polygon"></a>PetscErrorCode RGDestroy_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line345">345: </a>{
+<a name="line347">347: </a>  RG_POLYGON     *ctx = (RG_POLYGON*)rg->data;
+
+<a name="line350">350: </a>  <font color="#4169E1">if</font> (ctx->n) {
+<a name="line351">351: </a>    PetscFree(ctx->vr);
+<a name="line352">352: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line353">353: </a>    PetscFree(ctx->vi);
+<a name="line354">354: </a><font color="#A020F0">#endif</font>
+<a name="line355">355: </a>  }
+<a name="line356">356: </a>  PetscFree(rg->data);
+<a name="line357">357: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonSetVertices_C"</font>,NULL);
+<a name="line358">358: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonGetVertices_C"</font>,NULL);
+<a name="line359">359: </a>  <font color="#4169E1">return</font>(0);
+<a name="line360">360: </a>}
+
+<a name="line364">364: </a><strong><font color="#4169E1"><a name="RGCreate_Polygon"></a>PETSC_EXTERN PetscErrorCode RGCreate_Polygon(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line365">365: </a>{
+<a name="line366">366: </a>  RG_POLYGON     *polygon;
+
+<a name="line370">370: </a>  PetscNewLog(rg,&polygon);
+<a name="line371">371: </a>  rg->data = (void*)polygon;
+
+<a name="line373">373: </a>  rg->ops->istrivial      = RGIsTrivial_Polygon;
+<a name="line374">374: </a>  rg->ops->computecontour = RGComputeContour_Polygon;
+<a name="line375">375: </a>  rg->ops->checkinside    = RGCheckInside_Polygon;
+<a name="line376">376: </a>  rg->ops->setfromoptions = RGSetFromOptions_Polygon;
+<a name="line377">377: </a>  rg->ops->view           = RGView_Polygon;
+<a name="line378">378: </a>  rg->ops->destroy        = RGDestroy_Polygon;
+<a name="line379">379: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonSetVertices_C"</font>,RGPolygonSetVertices_Polygon);
+<a name="line380">380: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGPolygonGetVertices_C"</font>,RGPolygonGetVertices_Polygon);
+<a name="line381">381: </a>  <font color="#4169E1">return</font>(0);
+<a name="line382">382: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/rg/impls/ring/index.html b/src/sys/classes/rg/impls/ring/index.html
index e7bc6f6..bc6cbe4 100644
--- a/src/sys/classes/rg/impls/ring/index.html
+++ b/src/sys/classes/rg/impls/ring/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/ring/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/ring/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/impls/ring/makefile b/src/sys/classes/rg/impls/ring/makefile
index 13e9e35..4a1b9a0 100644
--- a/src/sys/classes/rg/impls/ring/makefile
+++ b/src/sys/classes/rg/impls/ring/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/impls/ring/makefile.html b/src/sys/classes/rg/impls/ring/makefile.html
index 8ae71eb..2043591 100644
--- a/src/sys/classes/rg/impls/ring/makefile.html
+++ b/src/sys/classes/rg/impls/ring/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/ring/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:37+00:00">
+<meta name="date" content="2016-05-16T10:32:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/ring/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/ring/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/impls/ring/rgring.c b/src/sys/classes/rg/impls/ring/rgring.c
index dd87720..426f73a 100644
--- a/src/sys/classes/rg/impls/ring/rgring.c
+++ b/src/sys/classes/rg/impls/ring/rgring.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -176,7 +176,7 @@ PetscErrorCode RGRingGetParameters(RG rg,PetscScalar *center,PetscReal *radius,P
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(rg,RG_CLASSID,1);
-  ierr = PetscTryMethod(rg,"RGRingGetParameters_C",(RG,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,center,radius,vscale,start_ang,end_ang,width));CHKERRQ(ierr);
+  ierr = PetscUseMethod(rg,"RGRingGetParameters_C",(RG,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,center,radius,vscale,start_ang,end_ang,width));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -205,8 +205,8 @@ PetscErrorCode RGIsTrivial_Ring(RG rg,PetscBool *trivial)
   RG_RING *ctx = (RG_RING*)rg->data;
 
   PetscFunctionBegin;
-  if (rg->complement) *trivial = (ctx->radius==0.0)? PETSC_TRUE: PETSC_FALSE;
-  else *trivial = (ctx->radius>=PETSC_MAX_REAL)? PETSC_TRUE: PETSC_FALSE;
+  if (rg->complement) *trivial = PetscNot(ctx->radius);
+  else *trivial = PetscNot(ctx->radius<PETSC_MAX_REAL);
   PetscFunctionReturn(0);
 }
 
@@ -214,8 +214,30 @@ PetscErrorCode RGIsTrivial_Ring(RG rg,PetscBool *trivial)
 #define __FUNCT__ "RGComputeContour_Ring"
 PetscErrorCode RGComputeContour_Ring(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
 {
+  RG_RING   *ctx = (RG_RING*)rg->data;
+  PetscReal theta;
+  PetscInt  i,n2=n/2;
+
   PetscFunctionBegin;
-  SETERRQ(PetscObjectComm((PetscObject)rg),1,"Not implemented yet");
+  for (i=0;i<n;i++) {
+    if (i < n2) {
+      theta = ((ctx->end_ang-ctx->start_ang)*i/n2 + ctx->start_ang)*2.0*PETSC_PI;
+#if defined(PETSC_USE_COMPLEX)
+      cr[i] = ctx->center + (ctx->radius+ctx->width/2.0)*(PetscCosReal(theta)+ctx->vscale*PetscSinReal(theta)*PETSC_i);
+#else
+      cr[i] = ctx->center + (ctx->radius+ctx->width/2.0)*PetscCosReal(theta);
+      ci[i] = (ctx->radius+ctx->width/2.0)*ctx->vscale*PetscSinReal(theta);
+#endif
+    } else {
+      theta = ((ctx->end_ang-ctx->start_ang)*(n-i)/n2 + ctx->start_ang)*2.0*PETSC_PI;
+#if defined(PETSC_USE_COMPLEX)
+      cr[i] = ctx->center + (ctx->radius-ctx->width/2.0)*(PetscCosReal(theta)+ctx->vscale*PetscSinReal(theta)*PETSC_i);
+#else
+      cr[i] = ctx->center + (ctx->radius-ctx->width/2.0)*PetscCosReal(theta);
+      ci[i] = (ctx->radius-ctx->width/2.0)*ctx->vscale*PetscSinReal(theta);
+#endif
+    }
+  }
   PetscFunctionReturn(0);
 }
 
@@ -265,13 +287,13 @@ PetscErrorCode RGCheckInside_Ring(RG rg,PetscReal px,PetscReal py,PetscInt *insi
     else r = r/(2*PETSC_PI)+1;
   } else r = PetscAtanReal((dy/ctx->vscale)/dx)/(2*PETSC_PI)+0.5;
   if (r>=ctx->start_ang && r<=ctx->end_ang && *inside == 1) *inside = 1;
-  else *inside = 0;
+  else *inside = -1;
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
 #define __FUNCT__ "RGSetFromOptions_Ring"
-PetscErrorCode RGSetFromOptions_Ring(PetscOptions *PetscOptionsObject,RG rg)
+PetscErrorCode RGSetFromOptions_Ring(PetscOptionItems *PetscOptionsObject,RG rg)
 {
   PetscErrorCode ierr;
   PetscScalar    s;
diff --git a/src/sys/classes/rg/impls/ring/rgring.c.html b/src/sys/classes/rg/impls/ring/rgring.c.html
index 265d9b5..561b384 100644
--- a/src/sys/classes/rg/impls/ring/rgring.c.html
+++ b/src/sys/classes/rg/impls/ring/rgring.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/impls/ring/rgring.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:36+00:00">
+<meta name="date" content="2016-05-16T10:32:32+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/impls/ring/rgring.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/impls/ring/rgring.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Ring region, similar to the ellipse but with a start and end angle,</font>
 <a name="line3">  3: </a><font color="#B22222">   together with the width.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -166,7 +166,7 @@
 <a name="line173">173: </a><strong><font color="#4169E1"><a name="RGRingGetParameters"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscScalar *center,PetscReal *radius,PetscReal *vscale,PetscReal *start_ang,PetscReal *end_ang,PetscReal *width)</font></strong>
 <a name="line174">174: </a>{
 
-<a name="line179">179: </a>  PetscTryMethod(rg,<font color="#666666">"RGRingGetParameters_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,center,radius,vscale,start_ang,end_ang,width));
+<a name="line179">179: </a>  PetscUseMethod(rg,<font color="#666666">"RGRingGetParameters_C"</font>,(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a>,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*),(rg,center,radius,vscale,start_ang,end_ang,width));
 <a name="line180">180: </a>  <font color="#4169E1">return</font>(0);
 <a name="line181">181: </a>}
 
@@ -188,119 +188,141 @@
 <a name="line204">204: </a>{
 <a name="line205">205: </a>  RG_RING *ctx = (RG_RING*)rg->data;
 
-<a name="line208">208: </a>  <font color="#4169E1">if</font> (rg->complement) *trivial = (ctx->radius==0.0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line209">209: </a>  <font color="#4169E1">else</font> *trivial = (ctx->radius>=PETSC_MAX_REAL)? PETSC_TRUE: PETSC_FALSE;
+<a name="line208">208: </a>  <font color="#4169E1">if</font> (rg->complement) *trivial = PetscNot(ctx->radius);
+<a name="line209">209: </a>  <font color="#4169E1">else</font> *trivial = PetscNot(ctx->radius<PETSC_MAX_REAL);
 <a name="line210">210: </a>  <font color="#4169E1">return</font>(0);
 <a name="line211">211: </a>}
 
 <a name="line215">215: </a><strong><font color="#4169E1"><a name="RGComputeContour_Ring"></a>PetscErrorCode RGComputeContour_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
 <a name="line216">216: </a>{
-<a name="line218">218: </a>  SETERRQ(PetscObjectComm((PetscObject)rg),1,<font color="#666666">"Not implemented yet"</font>);
-<a name="line219">219: </a>  <font color="#4169E1">return</font>(0);
-<a name="line220">220: </a>}
-
-<a name="line224">224: </a><strong><font color="#4169E1"><a name="RGCheckInside_Ring"></a>PetscErrorCode RGCheckInside_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal px,PetscReal py,PetscInt *inside)</font></strong>
-<a name="line225">225: </a>{
-<a name="line226">226: </a>  RG_RING   *ctx = (RG_RING*)rg->data;
-<a name="line227">227: </a>  PetscReal dx,dy,r;
-
-<a name="line230">230: </a>  <font color="#B22222">/* outer ellipse */</font>
-<a name="line231">231: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line232">232: </a>  dx = (px-PetscRealPart(ctx->center))/(ctx->radius+ctx->width/2.0);
-<a name="line233">233: </a>  dy = (py-PetscImaginaryPart(ctx->center))/(ctx->radius+ctx->width/2.0);
-<a name="line234">234: </a><font color="#A020F0">#else</font>
-<a name="line235">235: </a>  dx = (px-ctx->center)/(ctx->radius+ctx->width/2.0);
-<a name="line236">236: </a>  dy = py/(ctx->radius+ctx->width/2.0);
-<a name="line237">237: </a><font color="#A020F0">#endif</font>
-<a name="line238">238: </a>  r = 1.0-dx*dx-(dy*dy)/(ctx->vscale*ctx->vscale);
-<a name="line239">239: </a>  *inside = PetscSign(r);
-<a name="line240">240: </a>  <font color="#B22222">/* inner ellipse */</font>
-<a name="line241">241: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line242">242: </a>  dx = (px-PetscRealPart(ctx->center))/(ctx->radius-ctx->width/2.0);
-<a name="line243">243: </a>  dy = (py-PetscImaginaryPart(ctx->center))/(ctx->radius-ctx->width/2.0);
-<a name="line244">244: </a><font color="#A020F0">#else</font>
-<a name="line245">245: </a>  dx = (px-ctx->center)/(ctx->radius-ctx->width/2.0);
-<a name="line246">246: </a>  dy = py/(ctx->radius-ctx->width/2.0);
-<a name="line247">247: </a><font color="#A020F0">#endif</font>
-<a name="line248">248: </a>  r = -1.0+dx*dx+(dy*dy)/(ctx->vscale*ctx->vscale);
-<a name="line249">249: </a>  *inside *= PetscSign(r);
-<a name="line250">250: </a>  <font color="#B22222">/* check angles */</font>
-<a name="line251">251: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line252">252: </a>  dx = (px-PetscRealPart(ctx->center));
-<a name="line253">253: </a>  dy = (py-PetscImaginaryPart(ctx->center));
-<a name="line254">254: </a><font color="#A020F0">#else</font>
-<a name="line255">255: </a>  dx = px-ctx->center;
-<a name="line256">256: </a>  dy = py;
-<a name="line257">257: </a><font color="#A020F0">#endif</font>
-<a name="line258">258: </a>  <font color="#4169E1">if</font> (dx == 0) {
-<a name="line259">259: </a>    <font color="#4169E1">if</font> (dy == 0) r = -1;
-<a name="line260">260: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dy > 0) r = 0.25;
-<a name="line261">261: </a>    <font color="#4169E1">else</font> r = 0.75;
-<a name="line262">262: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dx > 0) {
-<a name="line263">263: </a>    r = PetscAtanReal((dy/ctx->vscale)/dx);
-<a name="line264">264: </a>    <font color="#4169E1">if</font> (dy >= 0) r /= 2*PETSC_PI;
-<a name="line265">265: </a>    <font color="#4169E1">else</font> r = r/(2*PETSC_PI)+1;
-<a name="line266">266: </a>  } <font color="#4169E1">else</font> r = PetscAtanReal((dy/ctx->vscale)/dx)/(2*PETSC_PI)+0.5;
-<a name="line267">267: </a>  <font color="#4169E1">if</font> (r>=ctx->start_ang && r<=ctx->end_ang && *inside == 1) *inside = 1;
-<a name="line268">268: </a>  <font color="#4169E1">else</font> *inside = 0;
-<a name="line269">269: </a>  <font color="#4169E1">return</font>(0);
-<a name="line270">270: </a>}
-
-<a name="line274">274: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Ring"></a>PetscErrorCode RGSetFromOptions_Ring(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line275">275: </a>{
-<a name="line277">277: </a>  PetscScalar    s;
-<a name="line278">278: </a>  PetscReal      r1,r2,r3,r4,r5;
-<a name="line279">279: </a>  PetscBool      flg1,flg2,flg3,flg4,flg5,flg6;
-
-<a name="line282">282: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> Ring Options"</font>);
-
-<a name="line284">284: </a>  <a href="../../../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(rg,&s,&r1,&r2,&r3,&r4,&r5);
-<a name="line285">285: </a>  PetscOptionsScalar(<font color="#666666">"-rg_ring_center"</font>,<font color="#666666">"Center of ellipse"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,s,&s,&flg1);
-<a name="line286">286: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_radius"</font>,<font color="#666666">"Radius of ellipse"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r1,&r1,&flg2);
-<a name="line287">287: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_vscale"</font>,<font color="#666666">"Vertical scale of ellipse"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r2,&r2,&flg3);
-<a name="line288">288: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_startangle"</font>,<font color="#666666">"Right-hand side angle"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r3,&r3,&flg4);
-<a name="line289">289: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_endangle"</font>,<font color="#666666">"Left-hand side angle"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r4,&r4,&flg5);
-<a name="line290">290: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_width"</font>,<font color="#666666">"Width of ring"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r5,&r5,&flg6);
-<a name="line291">291: </a>  <font color="#4169E1">if</font> (flg1 || flg2 || flg3 || flg4 || flg5 || flg6) {
-<a name="line292">292: </a>    <a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>(rg,s,r1,r2,r3,r4,r5);
-<a name="line293">293: </a>  }
-
-<a name="line295">295: </a>  PetscOptionsTail();
-<a name="line296">296: </a>  <font color="#4169E1">return</font>(0);
-<a name="line297">297: </a>}
-
-<a name="line301">301: </a><strong><font color="#4169E1"><a name="RGDestroy_Ring"></a>PetscErrorCode RGDestroy_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line302">302: </a>{
-
-<a name="line306">306: </a>  PetscFree(rg->data);
-<a name="line307">307: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingSetParameters_C"</font>,NULL);
-<a name="line308">308: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingGetParameters_C"</font>,NULL);
-<a name="line309">309: </a>  <font color="#4169E1">return</font>(0);
-<a name="line310">310: </a>}
-
-<a name="line314">314: </a><strong><font color="#4169E1"><a name="RGCreate_Ring"></a>PETSC_EXTERN PetscErrorCode RGCreate_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line315">315: </a>{
-<a name="line316">316: </a>  RG_RING        *ring;
-
-<a name="line320">320: </a>  PetscNewLog(rg,&ring);
-<a name="line321">321: </a>  ring->center    = 0.0;
-<a name="line322">322: </a>  ring->radius    = 1.0;
-<a name="line323">323: </a>  ring->vscale    = 1.0;
-<a name="line324">324: </a>  ring->start_ang = 0.0;
-<a name="line325">325: </a>  ring->end_ang   = 1.0;
-<a name="line326">326: </a>  ring->width     = 0.1;
-<a name="line327">327: </a>  rg->data = (void*)ring;
-
-<a name="line329">329: </a>  rg->ops->istrivial      = RGIsTrivial_Ring;
-<a name="line330">330: </a>  rg->ops->computecontour = RGComputeContour_Ring;
-<a name="line331">331: </a>  rg->ops->checkinside    = RGCheckInside_Ring;
-<a name="line332">332: </a>  rg->ops->setfromoptions = RGSetFromOptions_Ring;
-<a name="line333">333: </a>  rg->ops->view           = RGView_Ring;
-<a name="line334">334: </a>  rg->ops->destroy        = RGDestroy_Ring;
-<a name="line335">335: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingSetParameters_C"</font>,RGRingSetParameters_Ring);
-<a name="line336">336: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingGetParameters_C"</font>,RGRingGetParameters_Ring);
-<a name="line337">337: </a>  <font color="#4169E1">return</font>(0);
-<a name="line338">338: </a>}
+<a name="line217">217: </a>  RG_RING   *ctx = (RG_RING*)rg->data;
+<a name="line218">218: </a>  PetscReal theta;
+<a name="line219">219: </a>  PetscInt  i,n2=n/2;
+
+<a name="line222">222: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line223">223: </a>    <font color="#4169E1">if</font> (i < n2) {
+<a name="line224">224: </a>      theta = ((ctx->end_ang-ctx->start_ang)*i/n2 + ctx->start_ang)*2.0*PETSC_PI;
+<a name="line225">225: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line226">226: </a>      cr[i] = ctx->center + (ctx->radius+ctx->width/2.0)*(PetscCosReal(theta)+ctx->vscale*PetscSinReal(theta)*PETSC_i);
+<a name="line227">227: </a><font color="#A020F0">#else</font>
+<a name="line228">228: </a>      cr[i] = ctx->center + (ctx->radius+ctx->width/2.0)*PetscCosReal(theta);
+<a name="line229">229: </a>      ci[i] = (ctx->radius+ctx->width/2.0)*ctx->vscale*PetscSinReal(theta);
+<a name="line230">230: </a><font color="#A020F0">#endif</font>
+<a name="line231">231: </a>    } <font color="#4169E1">else</font> {
+<a name="line232">232: </a>      theta = ((ctx->end_ang-ctx->start_ang)*(n-i)/n2 + ctx->start_ang)*2.0*PETSC_PI;
+<a name="line233">233: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line234">234: </a>      cr[i] = ctx->center + (ctx->radius-ctx->width/2.0)*(PetscCosReal(theta)+ctx->vscale*PetscSinReal(theta)*PETSC_i);
+<a name="line235">235: </a><font color="#A020F0">#else</font>
+<a name="line236">236: </a>      cr[i] = ctx->center + (ctx->radius-ctx->width/2.0)*PetscCosReal(theta);
+<a name="line237">237: </a>      ci[i] = (ctx->radius-ctx->width/2.0)*ctx->vscale*PetscSinReal(theta);
+<a name="line238">238: </a><font color="#A020F0">#endif</font>
+<a name="line239">239: </a>    }
+<a name="line240">240: </a>  }
+<a name="line241">241: </a>  <font color="#4169E1">return</font>(0);
+<a name="line242">242: </a>}
+
+<a name="line246">246: </a><strong><font color="#4169E1"><a name="RGCheckInside_Ring"></a>PetscErrorCode RGCheckInside_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal px,PetscReal py,PetscInt *inside)</font></strong>
+<a name="line247">247: </a>{
+<a name="line248">248: </a>  RG_RING   *ctx = (RG_RING*)rg->data;
+<a name="line249">249: </a>  PetscReal dx,dy,r;
+
+<a name="line252">252: </a>  <font color="#B22222">/* outer ellipse */</font>
+<a name="line253">253: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line254">254: </a>  dx = (px-PetscRealPart(ctx->center))/(ctx->radius+ctx->width/2.0);
+<a name="line255">255: </a>  dy = (py-PetscImaginaryPart(ctx->center))/(ctx->radius+ctx->width/2.0);
+<a name="line256">256: </a><font color="#A020F0">#else</font>
+<a name="line257">257: </a>  dx = (px-ctx->center)/(ctx->radius+ctx->width/2.0);
+<a name="line258">258: </a>  dy = py/(ctx->radius+ctx->width/2.0);
+<a name="line259">259: </a><font color="#A020F0">#endif</font>
+<a name="line260">260: </a>  r = 1.0-dx*dx-(dy*dy)/(ctx->vscale*ctx->vscale);
+<a name="line261">261: </a>  *inside = PetscSign(r);
+<a name="line262">262: </a>  <font color="#B22222">/* inner ellipse */</font>
+<a name="line263">263: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line264">264: </a>  dx = (px-PetscRealPart(ctx->center))/(ctx->radius-ctx->width/2.0);
+<a name="line265">265: </a>  dy = (py-PetscImaginaryPart(ctx->center))/(ctx->radius-ctx->width/2.0);
+<a name="line266">266: </a><font color="#A020F0">#else</font>
+<a name="line267">267: </a>  dx = (px-ctx->center)/(ctx->radius-ctx->width/2.0);
+<a name="line268">268: </a>  dy = py/(ctx->radius-ctx->width/2.0);
+<a name="line269">269: </a><font color="#A020F0">#endif</font>
+<a name="line270">270: </a>  r = -1.0+dx*dx+(dy*dy)/(ctx->vscale*ctx->vscale);
+<a name="line271">271: </a>  *inside *= PetscSign(r);
+<a name="line272">272: </a>  <font color="#B22222">/* check angles */</font>
+<a name="line273">273: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line274">274: </a>  dx = (px-PetscRealPart(ctx->center));
+<a name="line275">275: </a>  dy = (py-PetscImaginaryPart(ctx->center));
+<a name="line276">276: </a><font color="#A020F0">#else</font>
+<a name="line277">277: </a>  dx = px-ctx->center;
+<a name="line278">278: </a>  dy = py;
+<a name="line279">279: </a><font color="#A020F0">#endif</font>
+<a name="line280">280: </a>  <font color="#4169E1">if</font> (dx == 0) {
+<a name="line281">281: </a>    <font color="#4169E1">if</font> (dy == 0) r = -1;
+<a name="line282">282: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dy > 0) r = 0.25;
+<a name="line283">283: </a>    <font color="#4169E1">else</font> r = 0.75;
+<a name="line284">284: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (dx > 0) {
+<a name="line285">285: </a>    r = PetscAtanReal((dy/ctx->vscale)/dx);
+<a name="line286">286: </a>    <font color="#4169E1">if</font> (dy >= 0) r /= 2*PETSC_PI;
+<a name="line287">287: </a>    <font color="#4169E1">else</font> r = r/(2*PETSC_PI)+1;
+<a name="line288">288: </a>  } <font color="#4169E1">else</font> r = PetscAtanReal((dy/ctx->vscale)/dx)/(2*PETSC_PI)+0.5;
+<a name="line289">289: </a>  <font color="#4169E1">if</font> (r>=ctx->start_ang && r<=ctx->end_ang && *inside == 1) *inside = 1;
+<a name="line290">290: </a>  <font color="#4169E1">else</font> *inside = -1;
+<a name="line291">291: </a>  <font color="#4169E1">return</font>(0);
+<a name="line292">292: </a>}
+
+<a name="line296">296: </a><strong><font color="#4169E1"><a name="RGSetFromOptions_Ring"></a>PetscErrorCode RGSetFromOptions_Ring(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line297">297: </a>{
+<a name="line299">299: </a>  PetscScalar    s;
+<a name="line300">300: </a>  PetscReal      r1,r2,r3,r4,r5;
+<a name="line301">301: </a>  PetscBool      flg1,flg2,flg3,flg4,flg5,flg6;
+
+<a name="line304">304: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> Ring Options"</font>);
+
+<a name="line306">306: </a>  <a href="../../../../../../docs/manualpages/RG/RGRingGetParameters.html#RGRingGetParameters">RGRingGetParameters</a>(rg,&s,&r1,&r2,&r3,&r4,&r5);
+<a name="line307">307: </a>  PetscOptionsScalar(<font color="#666666">"-rg_ring_center"</font>,<font color="#666666">"Center of ellipse"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,s,&s,&flg1);
+<a name="line308">308: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_radius"</font>,<font color="#666666">"Radius of ellipse"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r1,&r1,&flg2);
+<a name="line309">309: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_vscale"</font>,<font color="#666666">"Vertical scale of ellipse"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r2,&r2,&flg3);
+<a name="line310">310: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_startangle"</font>,<font color="#666666">"Right-hand side angle"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r3,&r3,&flg4);
+<a name="line311">311: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_endangle"</font>,<font color="#666666">"Left-hand side angle"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r4,&r4,&flg5);
+<a name="line312">312: </a>  PetscOptionsReal(<font color="#666666">"-rg_ring_width"</font>,<font color="#666666">"Width of ring"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>"</font>,r5,&r5,&flg6);
+<a name="line313">313: </a>  <font color="#4169E1">if</font> (flg1 || flg2 || flg3 || flg4 || flg5 || flg6) {
+<a name="line314">314: </a>    <a href="../../../../../../docs/manualpages/RG/RGRingSetParameters.html#RGRingSetParameters">RGRingSetParameters</a>(rg,s,r1,r2,r3,r4,r5);
+<a name="line315">315: </a>  }
+
+<a name="line317">317: </a>  PetscOptionsTail();
+<a name="line318">318: </a>  <font color="#4169E1">return</font>(0);
+<a name="line319">319: </a>}
+
+<a name="line323">323: </a><strong><font color="#4169E1"><a name="RGDestroy_Ring"></a>PetscErrorCode RGDestroy_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line324">324: </a>{
+
+<a name="line328">328: </a>  PetscFree(rg->data);
+<a name="line329">329: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingSetParameters_C"</font>,NULL);
+<a name="line330">330: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingGetParameters_C"</font>,NULL);
+<a name="line331">331: </a>  <font color="#4169E1">return</font>(0);
+<a name="line332">332: </a>}
+
+<a name="line336">336: </a><strong><font color="#4169E1"><a name="RGCreate_Ring"></a>PETSC_EXTERN PetscErrorCode RGCreate_Ring(<a href="../../../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line337">337: </a>{
+<a name="line338">338: </a>  RG_RING        *ring;
+
+<a name="line342">342: </a>  PetscNewLog(rg,&ring);
+<a name="line343">343: </a>  ring->center    = 0.0;
+<a name="line344">344: </a>  ring->radius    = 1.0;
+<a name="line345">345: </a>  ring->vscale    = 1.0;
+<a name="line346">346: </a>  ring->start_ang = 0.0;
+<a name="line347">347: </a>  ring->end_ang   = 1.0;
+<a name="line348">348: </a>  ring->width     = 0.1;
+<a name="line349">349: </a>  rg->data = (void*)ring;
+
+<a name="line351">351: </a>  rg->ops->istrivial      = RGIsTrivial_Ring;
+<a name="line352">352: </a>  rg->ops->computecontour = RGComputeContour_Ring;
+<a name="line353">353: </a>  rg->ops->checkinside    = RGCheckInside_Ring;
+<a name="line354">354: </a>  rg->ops->setfromoptions = RGSetFromOptions_Ring;
+<a name="line355">355: </a>  rg->ops->view           = RGView_Ring;
+<a name="line356">356: </a>  rg->ops->destroy        = RGDestroy_Ring;
+<a name="line357">357: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingSetParameters_C"</font>,RGRingSetParameters_Ring);
+<a name="line358">358: </a>  PetscObjectComposeFunction((PetscObject)rg,<font color="#666666">"RGRingGetParameters_C"</font>,RGRingGetParameters_Ring);
+<a name="line359">359: </a>  <font color="#4169E1">return</font>(0);
+<a name="line360">360: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/rg/index.html b/src/sys/classes/rg/index.html
index 7ce9c2e..c6581b2 100644
--- a/src/sys/classes/rg/index.html
+++ b/src/sys/classes/rg/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/interface/ftn-auto/rgbasicf.c b/src/sys/classes/rg/interface/ftn-auto/rgbasicf.c
index b2673db..7fd1b14 100644
--- a/src/sys/classes/rg/interface/ftn-auto/rgbasicf.c
+++ b/src/sys/classes/rg/interface/ftn-auto/rgbasicf.c
@@ -74,6 +74,16 @@ extern void PetscRmPointer(void*);
 #define rggetscale_ rggetscale
 #endif
 #ifdef PETSC_HAVE_FORTRAN_CAPS
+#define rgpushscale_ RGPUSHSCALE
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define rgpushscale_ rgpushscale
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
+#define rgpopscale_ RGPOPSCALE
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
+#define rgpopscale_ rgpopscale
+#endif
+#ifdef PETSC_HAVE_FORTRAN_CAPS
 #define rgdestroy_ RGDESTROY
 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 #define rgdestroy_ rgdestroy
@@ -120,6 +130,14 @@ PETSC_EXTERN void PETSC_STDCALL  rggetscale_(RG rg,PetscReal *sfactor, int *__ie
 *__ierr = RGGetScale(
 	(RG)PetscToPointer((rg) ),sfactor);
 }
+PETSC_EXTERN void PETSC_STDCALL  rgpushscale_(RG rg,PetscReal *sfactor, int *__ierr ){
+*__ierr = RGPushScale(
+	(RG)PetscToPointer((rg) ),*sfactor);
+}
+PETSC_EXTERN void PETSC_STDCALL  rgpopscale_(RG rg, int *__ierr ){
+*__ierr = RGPopScale(
+	(RG)PetscToPointer((rg) ));
+}
 PETSC_EXTERN void PETSC_STDCALL  rgdestroy_(RG *rg, int *__ierr ){
 *__ierr = RGDestroy(rg);
 }
diff --git a/src/sys/classes/rg/interface/ftn-custom/makefile b/src/sys/classes/rg/interface/ftn-custom/makefile
index b370914..1bc2a60 100644
--- a/src/sys/classes/rg/interface/ftn-custom/makefile
+++ b/src/sys/classes/rg/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/interface/ftn-custom/zrgf.c b/src/sys/classes/rg/interface/ftn-custom/zrgf.c
index 388d03a..49d9569 100644
--- a/src/sys/classes/rg/interface/ftn-custom/zrgf.c
+++ b/src/sys/classes/rg/interface/ftn-custom/zrgf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/rg/interface/index.html b/src/sys/classes/rg/interface/index.html
index c912411..be1432a 100644
--- a/src/sys/classes/rg/interface/index.html
+++ b/src/sys/classes/rg/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Region - RG</h2>
 
diff --git a/src/sys/classes/rg/interface/makefile b/src/sys/classes/rg/interface/makefile
index 8eaae9f..86917f9 100644
--- a/src/sys/classes/rg/interface/makefile
+++ b/src/sys/classes/rg/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/interface/makefile.html b/src/sys/classes/rg/interface/makefile.html
index fee38ec..2d36a53 100644
--- a/src/sys/classes/rg/interface/makefile.html
+++ b/src/sys/classes/rg/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:35+00:00">
+<meta name="date" content="2016-05-16T10:32:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/rg/interface/rgbasic.c b/src/sys/classes/rg/interface/rgbasic.c
index 38b7e8e..bc8ce39 100644
--- a/src/sys/classes/rg/interface/rgbasic.c
+++ b/src/sys/classes/rg/interface/rgbasic.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -75,7 +75,7 @@ PetscErrorCode RGInitializePackage(void)
   /* Register Constructors */
   ierr = RGRegisterAll();CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"rg",&className);CHKERRQ(ierr);
     if (className) {
@@ -83,7 +83,7 @@ PetscErrorCode RGInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"rg",&className);CHKERRQ(ierr);
     if (className) {
@@ -123,6 +123,7 @@ PetscErrorCode RGCreate(MPI_Comm comm,RG *newrg)
   ierr = SlepcHeaderCreate(rg,RG_CLASSID,"RG","Region","RG",comm,RGDestroy,RGView);CHKERRQ(ierr);
   rg->complement = PETSC_FALSE;
   rg->sfactor    = 1.0;
+  rg->osfactor   = 0.0;
   rg->data       = NULL;
 
   *newrg = rg;
@@ -204,7 +205,8 @@ PetscErrorCode RGAppendOptionsPrefix(RG rg,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used is returned
 
-   Notes: On the fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
@@ -306,6 +308,7 @@ PetscErrorCode RGSetFromOptions(RG rg)
   PetscErrorCode ierr;
   char           type[256];
   PetscBool      flg;
+  PetscReal      sfactor;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(rg,RG_CLASSID,1);
@@ -322,12 +325,16 @@ PetscErrorCode RGSetFromOptions(RG rg)
       ierr = RGSetType(rg,RGINTERVAL);CHKERRQ(ierr);
     }
 
-    ierr = PetscOptionsBool("-rg_complement","Whether region is complemented or not","RGSetComplement",rg->complement,&rg->complement,&flg);CHKERRQ(ierr);
+    ierr = PetscOptionsBool("-rg_complement","Whether region is complemented or not","RGSetComplement",rg->complement,&rg->complement,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsReal("-rg_scale","Scaling factor","RGSetScale",1.0,&sfactor,&flg);CHKERRQ(ierr);
+    if (flg) {
+      ierr = RGSetScale(rg,sfactor);CHKERRQ(ierr);
+    }
 
     if (rg->ops->setfromoptions) {
       ierr = (*rg->ops->setfromoptions)(PetscOptionsObject,rg);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)rg);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)rg);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -399,7 +406,7 @@ PetscErrorCode RGView(RG rg,PetscViewer viewer)
              an interval region with all four endpoints unbounded or an
              ellipse with infinite radius.
 
-   Level: basic
+   Level: beginner
 @*/
 PetscErrorCode RGIsTrivial(RG rg,PetscBool *trivial)
 {
@@ -452,7 +459,7 @@ PetscErrorCode RGCheckInside(RG rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,Pe
   PetscValidHeaderSpecific(rg,RG_CLASSID,1);
   PetscValidType(rg,1);
   PetscValidPointer(ar,3);
-#if defined(PETSC_USE_COMPLEX)
+#if !defined(PETSC_USE_COMPLEX)
   PetscValidPointer(ai,4);
 #endif
   PetscValidPointer(inside,5);
@@ -466,8 +473,8 @@ PetscErrorCode RGCheckInside(RG rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,Pe
     py = ai[i];
 #endif
     if (rg->sfactor != 1.0) {
-      px *= rg->sfactor;
-      py *= rg->sfactor;
+      px /= rg->sfactor;
+      py /= rg->sfactor;
     }
     ierr = (*rg->ops->checkinside)(rg,px,py,inside+i);CHKERRQ(ierr);
     if (rg->complement) inside[i] = -inside[i];
@@ -495,6 +502,7 @@ PetscErrorCode RGCheckInside(RG rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,Pe
 @*/
 PetscErrorCode RGComputeContour(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)
 {
+  PetscInt       i;
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
@@ -505,6 +513,10 @@ PetscErrorCode RGComputeContour(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci
   PetscValidPointer(ci,4);
 #endif
   ierr = (*rg->ops->computecontour)(rg,n,cr,ci);CHKERRQ(ierr);
+  for (i=0;i<n;i++) {
+    cr[i] *= rg->sfactor;
+    ci[i] *= rg->sfactor;
+  }
   PetscFunctionReturn(0);
 }
 
@@ -521,7 +533,7 @@ PetscErrorCode RGComputeContour(RG rg,PetscInt n,PetscScalar *cr,PetscScalar *ci
 -  flg - the boolean flag
 
    Options Database Key:
-.  -rg_complement <bool> - Activate/deactivate the complementation of the region.
+.  -rg_complement <bool> - Activate/deactivate the complementation of the region
 
    Level: intermediate
 
@@ -567,7 +579,7 @@ PetscErrorCode RGGetComplement(RG rg,PetscBool *flg)
 #define __FUNCT__ "RGSetScale"
 /*@
    RGSetScale - Sets the scaling factor to be used when checking that a
-   point is inside the region.
+   point is inside the region and when computing the contour.
 
    Logically Collective on RG
 
@@ -575,7 +587,10 @@ PetscErrorCode RGGetComplement(RG rg,PetscBool *flg)
 +  rg      - the region context
 -  sfactor - the scaling factor
 
-   Level: developer
+   Options Database Key:
+.  -rg_scale <real> - Sets the scaling factor
+
+   Level: advanced
 
 .seealso: RGGetScale(), RGCheckInside()
 @*/
@@ -605,7 +620,7 @@ PetscErrorCode RGSetScale(RG rg,PetscReal sfactor)
    Output Parameter:
 .  flg - the flag
 
-   Level: developer
+   Level: advanced
 
 .seealso: RGSetScale()
 @*/
@@ -619,6 +634,64 @@ PetscErrorCode RGGetScale(RG rg,PetscReal *sfactor)
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "RGPushScale"
+/*@
+   RGPushScale - Sets an additional scaling factor, that will multiply the
+   user-defined scaling factor.
+
+   Logically Collective on RG
+
+   Input Parameters:
++  rg      - the region context
+-  sfactor - the scaling factor
+
+   Notes:
+   The current implementation does not allow pushing several scaling factors.
+
+   This is intended for internal use, for instance in polynomial eigensolvers
+   that use parameter scaling.
+
+   Level: developer
+
+.seealso: RGPopScale(), RGSetScale()
+@*/
+PetscErrorCode RGPushScale(RG rg,PetscReal sfactor)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(rg,RG_CLASSID,1);
+  PetscValidLogicalCollectiveReal(rg,sfactor,2);
+  if (sfactor<=0.0) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_OUTOFRANGE,"Illegal value of scaling factor. Must be > 0");
+  if (rg->osfactor) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_SUP,"Current implementation does not allow pushing several scaling factors");
+  rg->osfactor = rg->sfactor;
+  rg->sfactor *= sfactor;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
+#define __FUNCT__ "RGPopScale"
+/*@
+   RGPopScale - Pops the scaling factor set with RGPushScale().
+
+   Not Collective
+
+   Input Parameter:
+.  rg - the region context
+
+   Level: developer
+
+.seealso: RGPushScale()
+@*/
+PetscErrorCode RGPopScale(RG rg)
+{
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(rg,RG_CLASSID,1);
+  if (!rg->osfactor) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ORDER,"Must call RGPushScale first");
+  rg->sfactor  = rg->osfactor;
+  rg->osfactor = 0.0;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "RGDestroy"
 /*@
    RGDestroy - Destroys RG context that was created with RGCreate().
diff --git a/src/sys/classes/rg/interface/rgbasic.c.html b/src/sys/classes/rg/interface/rgbasic.c.html
index 049f8ff..7995513 100644
--- a/src/sys/classes/rg/interface/rgbasic.c.html
+++ b/src/sys/classes/rg/interface/rgbasic.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/interface/rgbasic.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:33+00:00">
+<meta name="date" content="2016-05-16T10:32:29+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/interface/rgbasic.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/interface/rgbasic.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Basic routines</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -80,7 +80,7 @@
 <a name="line75"> 75: </a>  <font color="#B22222">/* Register Constructors */</font>
 <a name="line76"> 76: </a>  <a href="../../../../docs/manualpages/RG/RGRegisterAll.html#RGRegisterAll">RGRegisterAll</a>();
 <a name="line77"> 77: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line78"> 78: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line78"> 78: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
 <a name="line79"> 79: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line80"> 80: </a>    PetscStrstr(logList,<font color="#666666">"rg"</font>,&className);
 <a name="line81"> 81: </a>    <font color="#4169E1">if</font> (className) {
@@ -88,7 +88,7 @@
 <a name="line83"> 83: </a>    }
 <a name="line84"> 84: </a>  }
 <a name="line85"> 85: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
+<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
 <a name="line87"> 87: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line88"> 88: </a>    PetscStrstr(logList,<font color="#666666">"rg"</font>,&className);
 <a name="line89"> 89: </a>    <font color="#4169E1">if</font> (className) {
@@ -123,463 +123,527 @@
 <a name="line123">123: </a>  SlepcHeaderCreate(rg,RG_CLASSID,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>"</font>,<font color="#666666">"Region"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>"</font>,comm,<a href="../../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>,<a href="../../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>);
 <a name="line124">124: </a>  rg->complement = PETSC_FALSE;
 <a name="line125">125: </a>  rg->sfactor    = 1.0;
-<a name="line126">126: </a>  rg->data       = NULL;
+<a name="line126">126: </a>  rg->osfactor   = 0.0;
+<a name="line127">127: </a>  rg->data       = NULL;
 
-<a name="line128">128: </a>  *newrg = rg;
-<a name="line129">129: </a>  <font color="#4169E1">return</font>(0);
-<a name="line130">130: </a>}
+<a name="line129">129: </a>  *newrg = rg;
+<a name="line130">130: </a>  <font color="#4169E1">return</font>(0);
+<a name="line131">131: </a>}
 
-<a name="line134">134: </a><font color="#B22222">/*@C</font>
-<a name="line135">135: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line136">136: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options in the database.</font>
+<a name="line135">135: </a><font color="#B22222">/*@C</font>
+<a name="line136">136: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line137">137: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options in the database.</font>
 
-<a name="line138">138: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+<a name="line139">139: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
 
-<a name="line140">140: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line141">141: </a><font color="#B22222">+  rg     - the region context</font>
-<a name="line142">142: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> option requests</font>
+<a name="line141">141: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line142">142: </a><font color="#B22222">+  rg     - the region context</font>
+<a name="line143">143: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> option requests</font>
 
-<a name="line144">144: </a><font color="#B22222">   Notes:</font>
-<a name="line145">145: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line146">146: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line147">147: </a><font color="#B22222">   hyphen.</font>
+<a name="line145">145: </a><font color="#B22222">   Notes:</font>
+<a name="line146">146: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line147">147: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line148">148: </a><font color="#B22222">   hyphen.</font>
 
-<a name="line149">149: </a><font color="#B22222">   Level: advanced</font>
+<a name="line150">150: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line151">151: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a>()</font>
-<a name="line152">152: </a><font color="#B22222">@*/</font>
-<a name="line153">153: </a><strong><font color="#4169E1"><a name="RGSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,const char *prefix)</font></strong>
-<a name="line154">154: </a>{
+<a name="line152">152: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a>()</font>
+<a name="line153">153: </a><font color="#B22222">@*/</font>
+<a name="line154">154: </a><strong><font color="#4169E1"><a name="RGSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,const char *prefix)</font></strong>
+<a name="line155">155: </a>{
 
-<a name="line159">159: </a>  PetscObjectSetOptionsPrefix((PetscObject)rg,prefix);
-<a name="line160">160: </a>  <font color="#4169E1">return</font>(0);
-<a name="line161">161: </a>}
+<a name="line160">160: </a>  PetscObjectSetOptionsPrefix((PetscObject)rg,prefix);
+<a name="line161">161: </a>  <font color="#4169E1">return</font>(0);
+<a name="line162">162: </a>}
 
-<a name="line165">165: </a><font color="#B22222">/*@C</font>
-<a name="line166">166: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line167">167: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options in the database.</font>
+<a name="line166">166: </a><font color="#B22222">/*@C</font>
+<a name="line167">167: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line168">168: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options in the database.</font>
 
-<a name="line169">169: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+<a name="line170">170: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
 
-<a name="line171">171: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line172">172: </a><font color="#B22222">+  rg     - the region context</font>
-<a name="line173">173: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> option requests</font>
+<a name="line172">172: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line173">173: </a><font color="#B22222">+  rg     - the region context</font>
+<a name="line174">174: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> option requests</font>
 
-<a name="line175">175: </a><font color="#B22222">   Notes:</font>
-<a name="line176">176: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line177">177: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
+<a name="line176">176: </a><font color="#B22222">   Notes:</font>
+<a name="line177">177: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line178">178: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the hyphen.</font>
 
-<a name="line179">179: </a><font color="#B22222">   Level: advanced</font>
+<a name="line180">180: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line181">181: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>()</font>
-<a name="line182">182: </a><font color="#B22222">@*/</font>
-<a name="line183">183: </a><strong><font color="#4169E1"><a name="RGAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,const char *prefix)</font></strong>
-<a name="line184">184: </a>{
+<a name="line182">182: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>()</font>
+<a name="line183">183: </a><font color="#B22222">@*/</font>
+<a name="line184">184: </a><strong><font color="#4169E1"><a name="RGAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,const char *prefix)</font></strong>
+<a name="line185">185: </a>{
 
-<a name="line189">189: </a>  PetscObjectAppendOptionsPrefix((PetscObject)rg,prefix);
-<a name="line190">190: </a>  <font color="#4169E1">return</font>(0);
-<a name="line191">191: </a>}
+<a name="line190">190: </a>  PetscObjectAppendOptionsPrefix((PetscObject)rg,prefix);
+<a name="line191">191: </a>  <font color="#4169E1">return</font>(0);
+<a name="line192">192: </a>}
 
-<a name="line195">195: </a><font color="#B22222">/*@C</font>
-<a name="line196">196: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetOptionsPrefix.html#RGGetOptionsPrefix">RGGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line197">197: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options in the database.</font>
+<a name="line196">196: </a><font color="#B22222">/*@C</font>
+<a name="line197">197: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetOptionsPrefix.html#RGGetOptionsPrefix">RGGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line198">198: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options in the database.</font>
 
-<a name="line199">199: </a><font color="#B22222">   Not Collective</font>
+<a name="line200">200: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line201">201: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line202">202: </a><font color="#B22222">.  rg - the region context</font>
+<a name="line202">202: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line203">203: </a><font color="#B22222">.  rg - the region context</font>
 
-<a name="line204">204: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line205">205: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
+<a name="line205">205: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line206">206: </a><font color="#B22222">.  prefix - pointer to the prefix string used is returned</font>
 
-<a name="line207">207: </a><font color="#B22222">   Notes: On the fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line208">208: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+<a name="line208">208: </a><font color="#B22222">   Note:</font>
+<a name="line209">209: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line210">210: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
 
-<a name="line210">210: </a><font color="#B22222">   Level: advanced</font>
+<a name="line212">212: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line212">212: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(), <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a>()</font>
-<a name="line213">213: </a><font color="#B22222">@*/</font>
-<a name="line214">214: </a><strong><font color="#4169E1"><a name="RGGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetOptionsPrefix.html#RGGetOptionsPrefix">RGGetOptionsPrefix</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,const char *prefix[])</font></strong>
-<a name="line215">215: </a>{
+<a name="line214">214: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetOptionsPrefix.html#RGSetOptionsPrefix">RGSetOptionsPrefix</a>(), <a href="../../../../docs/manualpages/RG/RGAppendOptionsPrefix.html#RGAppendOptionsPrefix">RGAppendOptionsPrefix</a>()</font>
+<a name="line215">215: </a><font color="#B22222">@*/</font>
+<a name="line216">216: </a><strong><font color="#4169E1"><a name="RGGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetOptionsPrefix.html#RGGetOptionsPrefix">RGGetOptionsPrefix</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,const char *prefix[])</font></strong>
+<a name="line217">217: </a>{
 
-<a name="line221">221: </a>  PetscObjectGetOptionsPrefix((PetscObject)rg,prefix);
-<a name="line222">222: </a>  <font color="#4169E1">return</font>(0);
-<a name="line223">223: </a>}
+<a name="line223">223: </a>  PetscObjectGetOptionsPrefix((PetscObject)rg,prefix);
+<a name="line224">224: </a>  <font color="#4169E1">return</font>(0);
+<a name="line225">225: </a>}
 
-<a name="line227">227: </a><font color="#B22222">/*@C</font>
-<a name="line228">228: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a> - Selects the type for the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> object.</font>
+<a name="line229">229: </a><font color="#B22222">/*@C</font>
+<a name="line230">230: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a> - Selects the type for the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> object.</font>
 
-<a name="line230">230: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+<a name="line232">232: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
 
-<a name="line232">232: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line233">233: </a><font color="#B22222">+  rg   - the region context</font>
-<a name="line234">234: </a><font color="#B22222">-  type - a known type</font>
+<a name="line234">234: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line235">235: </a><font color="#B22222">+  rg   - the region context</font>
+<a name="line236">236: </a><font color="#B22222">-  type - a known type</font>
 
-<a name="line236">236: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line238">238: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line238">238: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGGetType.html#RGGetType">RGGetType</a>()</font>
-<a name="line239">239: </a><font color="#B22222">@*/</font>
-<a name="line240">240: </a><strong><font color="#4169E1"><a name="RGSetType"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,<a href="../../../../docs/manualpages/RG/RGType.html#RGType">RGType</a> type)</font></strong>
-<a name="line241">241: </a>{
-<a name="line242">242: </a>  PetscErrorCode ierr,(*r)(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>);
-<a name="line243">243: </a>  PetscBool      match;
+<a name="line240">240: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGGetType.html#RGGetType">RGGetType</a>()</font>
+<a name="line241">241: </a><font color="#B22222">@*/</font>
+<a name="line242">242: </a><strong><font color="#4169E1"><a name="RGSetType"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,<a href="../../../../docs/manualpages/RG/RGType.html#RGType">RGType</a> type)</font></strong>
+<a name="line243">243: </a>{
+<a name="line244">244: </a>  PetscErrorCode ierr,(*r)(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>);
+<a name="line245">245: </a>  PetscBool      match;
 
 
-<a name="line249">249: </a>  PetscObjectTypeCompare((PetscObject)rg,type,&match);
-<a name="line250">250: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
+<a name="line251">251: </a>  PetscObjectTypeCompare((PetscObject)rg,type,&match);
+<a name="line252">252: </a>  <font color="#4169E1">if</font> (match) <font color="#4169E1">return</font>(0);
 
-<a name="line252">252: </a>   PetscFunctionListFind(RGList,type,&r);
-<a name="line253">253: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unable to find requested <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> type %s"</font>,type);
+<a name="line254">254: </a>   PetscFunctionListFind(RGList,type,&r);
+<a name="line255">255: </a>  <font color="#4169E1">if</font> (!r) SETERRQ1(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_UNKNOWN_TYPE,<font color="#666666">"Unable to find requested <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> type %s"</font>,type);
 
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (rg->ops->destroy) { (*rg->ops->destroy)(rg); }
-<a name="line256">256: </a>  PetscMemzero(rg->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _RGOps</font>));
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (rg->ops->destroy) { (*rg->ops->destroy)(rg); }
+<a name="line258">258: </a>  PetscMemzero(rg->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _RGOps</font>));
 
-<a name="line258">258: </a>  PetscObjectChangeTypeName((PetscObject)rg,type);
-<a name="line259">259: </a>  (*r)(rg);
-<a name="line260">260: </a>  <font color="#4169E1">return</font>(0);
-<a name="line261">261: </a>}
+<a name="line260">260: </a>  PetscObjectChangeTypeName((PetscObject)rg,type);
+<a name="line261">261: </a>  (*r)(rg);
+<a name="line262">262: </a>  <font color="#4169E1">return</font>(0);
+<a name="line263">263: </a>}
+
+<a name="line267">267: </a><font color="#B22222">/*@C</font>
+<a name="line268">268: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetType.html#RGGetType">RGGetType</a> - Gets the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> type name (as a string) from the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> context.</font>
+
+<a name="line270">270: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line272">272: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line273">273: </a><font color="#B22222">.  rg - the region context</font>
+
+<a name="line275">275: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line276">276: </a><font color="#B22222">.  name - name of the region</font>
+
+<a name="line278">278: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line280">280: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>()</font>
+<a name="line281">281: </a><font color="#B22222">@*/</font>
+<a name="line282">282: </a><strong><font color="#4169E1"><a name="RGGetType"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetType.html#RGGetType">RGGetType</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,<a href="../../../../docs/manualpages/RG/RGType.html#RGType">RGType</a> *type)</font></strong>
+<a name="line283">283: </a>{
+<a name="line287">287: </a>  *type = ((PetscObject)rg)->type_name;
+<a name="line288">288: </a>  <font color="#4169E1">return</font>(0);
+<a name="line289">289: </a>}
+
+<a name="line293">293: </a><font color="#B22222">/*@</font>
+<a name="line294">294: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a> - Sets <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options from the options database.</font>
+
+<a name="line296">296: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+
+<a name="line298">298: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line299">299: </a><font color="#B22222">.  rg - the region context</font>
+
+<a name="line301">301: </a><font color="#B22222">   Notes:</font>
+<a name="line302">302: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
+
+<a name="line304">304: </a><font color="#B22222">   Level: beginner</font>
+<a name="line305">305: </a><font color="#B22222">@*/</font>
+<a name="line306">306: </a><strong><font color="#4169E1"><a name="RGSetFromOptions"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line307">307: </a>{
+<a name="line309">309: </a>  char           type[256];
+<a name="line310">310: </a>  PetscBool      flg;
+<a name="line311">311: </a>  PetscReal      sfactor;
+
+<a name="line315">315: </a>  <a href="../../../../docs/manualpages/RG/RGRegisterAll.html#RGRegisterAll">RGRegisterAll</a>();
+<a name="line316">316: </a>  PetscObjectOptionsBegin((PetscObject)rg);
+<a name="line317">317: </a>    PetscOptionsFList(<font color="#666666">"-rg_type"</font>,<font color="#666666">"Region type"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>"</font>,RGList,(char*)(((PetscObject)rg)->type_name?((PetscObject)rg)->type_name:RGINTERVAL),type,256,&flg);
+<a name="line318">318: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line319">319: </a>      <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,type);
+<a name="line320">320: </a>    }
+<a name="line321">321: </a>    <font color="#B22222">/*</font>
+<a name="line322">322: </a><font color="#B22222">      Set the type if it was never set.</font>
+<a name="line323">323: </a><font color="#B22222">    */</font>
+<a name="line324">324: </a>    <font color="#4169E1">if</font> (!((PetscObject)rg)->type_name) {
+<a name="line325">325: </a>      <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,RGINTERVAL);
+<a name="line326">326: </a>    }
+
+<a name="line328">328: </a>    PetscOptionsBool(<font color="#666666">"-rg_complement"</font>,<font color="#666666">"Whether region is complemented or not"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>"</font>,rg->complement,&rg->complement,NULL);
+<a name="line329">329: </a>    PetscOptionsReal(<font color="#666666">"-rg_scale"</font>,<font color="#666666">"Scaling factor"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>"</font>,1.0,&sfactor,&flg);
+<a name="line330">330: </a>    <font color="#4169E1">if</font> (flg) {
+<a name="line331">331: </a>      <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(rg,sfactor);
+<a name="line332">332: </a>    }
+
+<a name="line334">334: </a>    <font color="#4169E1">if</font> (rg->ops->setfromoptions) {
+<a name="line335">335: </a>      (*rg->ops->setfromoptions)(PetscOptionsObject,rg);
+<a name="line336">336: </a>    }
+<a name="line337">337: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)rg);
+<a name="line338">338: </a>  PetscOptionsEnd();
+<a name="line339">339: </a>  <font color="#4169E1">return</font>(0);
+<a name="line340">340: </a>}
+
+<a name="line344">344: </a><font color="#B22222">/*@C</font>
+<a name="line345">345: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGView.html#RGView">RGView</a> - Prints the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> data structure.</font>
+
+<a name="line347">347: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+
+<a name="line349">349: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line350">350: </a><font color="#B22222">+  rg - the region context</font>
+<a name="line351">351: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line353">353: </a><font color="#B22222">   Note:</font>
+<a name="line354">354: </a><font color="#B22222">   The available visualization contexts include</font>
+<a name="line355">355: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
+<a name="line356">356: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
+<a name="line357">357: </a><font color="#B22222">         output where only the first processor opens</font>
+<a name="line358">358: </a><font color="#B22222">         the file.  All other processors send their</font>
+<a name="line359">359: </a><font color="#B22222">         data to the first processor to print.</font>
+
+<a name="line361">361: </a><font color="#B22222">   The user can open an alternative visualization context with</font>
+<a name="line362">362: </a><font color="#B22222">   PetscViewerASCIIOpen() - output to a specified file.</font>
+
+<a name="line364">364: </a><font color="#B22222">   Level: beginner</font>
+<a name="line365">365: </a><font color="#B22222">@*/</font>
+<a name="line366">366: </a><strong><font color="#4169E1"><a name="RGView"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscViewer viewer)</font></strong>
+<a name="line367">367: </a>{
+<a name="line368">368: </a>  PetscBool      isascii;
+
+<a name="line373">373: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)rg));
+<a name="line376">376: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line377">377: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line378">378: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)rg,viewer);
+<a name="line379">379: </a>    <font color="#4169E1">if</font> (rg->ops->view) {
+<a name="line380">380: </a>      PetscViewerASCIIPushTab(viewer);
+<a name="line381">381: </a>      (*rg->ops->view)(rg,viewer);
+<a name="line382">382: </a>      PetscViewerASCIIPopTab(viewer);
+<a name="line383">383: </a>    }
+<a name="line384">384: </a>    <font color="#4169E1">if</font> (rg->complement) {
+<a name="line385">385: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected region is the complement of the specified one\n"</font>);
+<a name="line386">386: </a>    }
+<a name="line387">387: </a>    <font color="#4169E1">if</font> (rg->sfactor!=1.0) {
+<a name="line388">388: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  scaling factor = %g\n"</font>,(double)rg->sfactor);
+<a name="line389">389: </a>    }
+<a name="line390">390: </a>  }
+<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
+<a name="line392">392: </a>}
+
+<a name="line396">396: </a><font color="#B22222">/*@</font>
+<a name="line397">397: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a> - Whether it is the trivial region (whole complex plane).</font>
+
+<a name="line399">399: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line401">401: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line402">402: </a><font color="#B22222">.  rg - the region context</font>
+
+<a name="line404">404: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line405">405: </a><font color="#B22222">.  trivial - true if the region is equal to the whole complex plane, e.g.,</font>
+<a name="line406">406: </a><font color="#B22222">             an interval region with all four endpoints unbounded or an</font>
+<a name="line407">407: </a><font color="#B22222">             ellipse with infinite radius.</font>
+
+<a name="line409">409: </a><font color="#B22222">   Level: beginner</font>
+<a name="line410">410: </a><font color="#B22222">@*/</font>
+<a name="line411">411: </a><strong><font color="#4169E1"><a name="RGIsTrivial"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool *trivial)</font></strong>
+<a name="line412">412: </a>{
+
+<a name="line419">419: </a>  <font color="#4169E1">if</font> (rg->ops->istrivial) {
+<a name="line420">420: </a>    (*rg->ops->istrivial)(rg,trivial);
+<a name="line421">421: </a>  } <font color="#4169E1">else</font> *trivial = PETSC_FALSE;
+<a name="line422">422: </a>  <font color="#4169E1">return</font>(0);
+<a name="line423">423: </a>}
+
+<a name="line427">427: </a><font color="#B22222">/*@</font>
+<a name="line428">428: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a> - Determines if a set of given points are inside the region or not.</font>
+
+<a name="line430">430: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line432">432: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line433">433: </a><font color="#B22222">+  rg - the region context</font>
+<a name="line434">434: </a><font color="#B22222">.  n  - number of points to check</font>
+<a name="line435">435: </a><font color="#B22222">.  ar - array of real parts</font>
+<a name="line436">436: </a><font color="#B22222">-  ai - array of imaginary parts</font>
+
+<a name="line438">438: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line439">439: </a><font color="#B22222">.  inside - array of results (1=inside, 0=on the contour, -1=outside)</font>
+
+<a name="line441">441: </a><font color="#B22222">   Note:</font>
+<a name="line442">442: </a><font color="#B22222">   The point a is expressed as a couple of PetscScalar variables ar,ai.</font>
+<a name="line443">443: </a><font color="#B22222">   If built with complex scalars, the point is supposed to be stored in ar,</font>
+<a name="line444">444: </a><font color="#B22222">   otherwise ar,ai contain the real and imaginary parts, respectively.</font>
+
+<a name="line446">446: </a><font color="#B22222">   If a scaling factor was set, the points are scaled before checking.</font>
+
+<a name="line448">448: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line450">450: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(), <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>()</font>
+<a name="line451">451: </a><font color="#B22222">@*/</font>
+<a name="line452">452: </a><strong><font color="#4169E1"><a name="RGCheckInside"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,PetscInt *inside)</font></strong>
+<a name="line453">453: </a>{
+<a name="line455">455: </a>  PetscReal      px,py;
+<a name="line456">456: </a>  PetscInt       i;
+
+<a name="line462">462: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line464">464: </a><font color="#A020F0">#endif</font>
+
+<a name="line467">467: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line468">468: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line469">469: </a>    px = PetscRealPart(ar[i]);
+<a name="line470">470: </a>    py = PetscImaginaryPart(ar[i]);
+<a name="line471">471: </a><font color="#A020F0">#else</font>
+<a name="line472">472: </a>    px = ar[i];
+<a name="line473">473: </a>    py = ai[i];
+<a name="line474">474: </a><font color="#A020F0">#endif</font>
+<a name="line475">475: </a>    <font color="#4169E1">if</font> (rg->sfactor != 1.0) {
+<a name="line476">476: </a>      px /= rg->sfactor;
+<a name="line477">477: </a>      py /= rg->sfactor;
+<a name="line478">478: </a>    }
+<a name="line479">479: </a>    (*rg->ops->checkinside)(rg,px,py,inside+i);
+<a name="line480">480: </a>    <font color="#4169E1">if</font> (rg->complement) inside[i] = -inside[i];
+<a name="line481">481: </a>  }
+<a name="line482">482: </a>  <font color="#4169E1">return</font>(0);
+<a name="line483">483: </a>}
+
+<a name="line487">487: </a><font color="#B22222">/*@</font>
+<a name="line488">488: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a> - Computes the coordinates of several points lying in the</font>
+<a name="line489">489: </a><font color="#B22222">   contour of the region.</font>
+
+<a name="line491">491: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line493">493: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line494">494: </a><font color="#B22222">+  rg - the region context</font>
+<a name="line495">495: </a><font color="#B22222">-  n  - number of points to compute</font>
+
+<a name="line497">497: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line498">498: </a><font color="#B22222">+  cr - location to store real parts</font>
+<a name="line499">499: </a><font color="#B22222">-  ci - location to store imaginary parts</font>
+
+<a name="line501">501: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line502">502: </a><font color="#B22222">@*/</font>
+<a name="line503">503: </a><strong><font color="#4169E1"><a name="RGComputeContour"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
+<a name="line504">504: </a>{
+<a name="line505">505: </a>  PetscInt       i;
+
+<a name="line512">512: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line514">514: </a><font color="#A020F0">#endif</font>
+<a name="line515">515: </a>  (*rg->ops->computecontour)(rg,n,cr,ci);
+<a name="line516">516: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line517">517: </a>    cr[i] *= rg->sfactor;
+<a name="line518">518: </a>    ci[i] *= rg->sfactor;
+<a name="line519">519: </a>  }
+<a name="line520">520: </a>  <font color="#4169E1">return</font>(0);
+<a name="line521">521: </a>}
+
+<a name="line525">525: </a><font color="#B22222">/*@</font>
+<a name="line526">526: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a> - Sets a flag to indicate that the region is the complement</font>
+<a name="line527">527: </a><font color="#B22222">   of the specified one.</font>
+
+<a name="line529">529: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+
+<a name="line531">531: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line532">532: </a><font color="#B22222">+  rg  - the region context</font>
+<a name="line533">533: </a><font color="#B22222">-  flg - the boolean flag</font>
+
+<a name="line535">535: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line536">536: </a><font color="#B22222">.  -rg_complement <bool> - Activate/deactivate the complementation of the region</font>
+
+<a name="line538">538: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line540">540: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>()</font>
+<a name="line541">541: </a><font color="#B22222">@*/</font>
+<a name="line542">542: </a><strong><font color="#4169E1"><a name="RGSetComplement"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool flg)</font></strong>
+<a name="line543">543: </a>{
+<a name="line547">547: </a>  rg->complement = flg;
+<a name="line548">548: </a>  <font color="#4169E1">return</font>(0);
+<a name="line549">549: </a>}
+
+<a name="line553">553: </a><font color="#B22222">/*@</font>
+<a name="line554">554: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a> - Gets a flag that that indicates whether the region</font>
+<a name="line555">555: </a><font color="#B22222">   is complemented or not.</font>
+
+<a name="line557">557: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line559">559: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line560">560: </a><font color="#B22222">.  rg - the region context</font>
+
+<a name="line562">562: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line563">563: </a><font color="#B22222">.  flg - the flag</font>
+
+<a name="line565">565: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line567">567: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>()</font>
+<a name="line568">568: </a><font color="#B22222">@*/</font>
+<a name="line569">569: </a><strong><font color="#4169E1"><a name="RGGetComplement"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool *flg)</font></strong>
+<a name="line570">570: </a>{
+<a name="line574">574: </a>  *flg = rg->complement;
+<a name="line575">575: </a>  <font color="#4169E1">return</font>(0);
+<a name="line576">576: </a>}
+
+<a name="line580">580: </a><font color="#B22222">/*@</font>
+<a name="line581">581: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a> - Sets the scaling factor to be used when checking that a</font>
+<a name="line582">582: </a><font color="#B22222">   point is inside the region and when computing the contour.</font>
+
+<a name="line584">584: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+
+<a name="line586">586: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line587">587: </a><font color="#B22222">+  rg      - the region context</font>
+<a name="line588">588: </a><font color="#B22222">-  sfactor - the scaling factor</font>
+
+<a name="line590">590: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line591">591: </a><font color="#B22222">.  -rg_scale <real> - Sets the scaling factor</font>
+
+<a name="line593">593: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line595">595: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(), <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>()</font>
+<a name="line596">596: </a><font color="#B22222">@*/</font>
+<a name="line597">597: </a><strong><font color="#4169E1"><a name="RGSetScale"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal sfactor)</font></strong>
+<a name="line598">598: </a>{
+<a name="line602">602: </a>  <font color="#4169E1">if</font> (sfactor == PETSC_DEFAULT || sfactor == PETSC_DECIDE) rg->sfactor = 1.0;
+<a name="line603">603: </a>  <font color="#4169E1">else</font> {
+<a name="line604">604: </a>    <font color="#4169E1">if</font> (sfactor<=0.0) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of scaling factor. Must be > 0"</font>);
+<a name="line605">605: </a>    rg->sfactor = sfactor;
+<a name="line606">606: </a>  }
+<a name="line607">607: </a>  <font color="#4169E1">return</font>(0);
+<a name="line608">608: </a>}
 
-<a name="line265">265: </a><font color="#B22222">/*@C</font>
-<a name="line266">266: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetType.html#RGGetType">RGGetType</a> - Gets the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> type name (as a string) from the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> context.</font>
-
-<a name="line268">268: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line270">270: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line271">271: </a><font color="#B22222">.  rg - the region context</font>
-
-<a name="line273">273: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line274">274: </a><font color="#B22222">.  name - name of the region</font>
-
-<a name="line276">276: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line278">278: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>()</font>
-<a name="line279">279: </a><font color="#B22222">@*/</font>
-<a name="line280">280: </a><strong><font color="#4169E1"><a name="RGGetType"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetType.html#RGGetType">RGGetType</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,<a href="../../../../docs/manualpages/RG/RGType.html#RGType">RGType</a> *type)</font></strong>
-<a name="line281">281: </a>{
-<a name="line285">285: </a>  *type = ((PetscObject)rg)->type_name;
-<a name="line286">286: </a>  <font color="#4169E1">return</font>(0);
-<a name="line287">287: </a>}
-
-<a name="line291">291: </a><font color="#B22222">/*@</font>
-<a name="line292">292: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a> - Sets <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> options from the options database.</font>
-
-<a name="line294">294: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
-
-<a name="line296">296: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line297">297: </a><font color="#B22222">.  rg - the region context</font>
-
-<a name="line299">299: </a><font color="#B22222">   Notes:</font>
-<a name="line300">300: </a><font color="#B22222">   To see all options, run your program with the -help option.</font>
-
-<a name="line302">302: </a><font color="#B22222">   Level: beginner</font>
-<a name="line303">303: </a><font color="#B22222">@*/</font>
-<a name="line304">304: </a><strong><font color="#4169E1"><a name="RGSetFromOptions"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetFromOptions.html#RGSetFromOptions">RGSetFromOptions</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
-<a name="line305">305: </a>{
-<a name="line307">307: </a>  char           type[256];
-<a name="line308">308: </a>  PetscBool      flg;
-
-<a name="line312">312: </a>  <a href="../../../../docs/manualpages/RG/RGRegisterAll.html#RGRegisterAll">RGRegisterAll</a>();
-<a name="line313">313: </a>  PetscObjectOptionsBegin((PetscObject)rg);
-<a name="line314">314: </a>    PetscOptionsFList(<font color="#666666">"-rg_type"</font>,<font color="#666666">"Region type"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>"</font>,RGList,(char*)(((PetscObject)rg)->type_name?((PetscObject)rg)->type_name:RGINTERVAL),type,256,&flg);
-<a name="line315">315: </a>    <font color="#4169E1">if</font> (flg) {
-<a name="line316">316: </a>      <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,type);
-<a name="line317">317: </a>    }
-<a name="line318">318: </a>    <font color="#B22222">/*</font>
-<a name="line319">319: </a><font color="#B22222">      Set the type if it was never set.</font>
-<a name="line320">320: </a><font color="#B22222">    */</font>
-<a name="line321">321: </a>    <font color="#4169E1">if</font> (!((PetscObject)rg)->type_name) {
-<a name="line322">322: </a>      <a href="../../../../docs/manualpages/RG/RGSetType.html#RGSetType">RGSetType</a>(rg,RGINTERVAL);
-<a name="line323">323: </a>    }
-
-<a name="line325">325: </a>    PetscOptionsBool(<font color="#666666">"-rg_complement"</font>,<font color="#666666">"Whether region is complemented or not"</font>,<font color="#666666">"<a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>"</font>,rg->complement,&rg->complement,&flg);
-
-<a name="line327">327: </a>    <font color="#4169E1">if</font> (rg->ops->setfromoptions) {
-<a name="line328">328: </a>      (*rg->ops->setfromoptions)(PetscOptionsObject,rg);
-<a name="line329">329: </a>    }
-<a name="line330">330: </a>    PetscObjectProcessOptionsHandlers((PetscObject)rg);
-<a name="line331">331: </a>  PetscOptionsEnd();
-<a name="line332">332: </a>  <font color="#4169E1">return</font>(0);
-<a name="line333">333: </a>}
-
-<a name="line337">337: </a><font color="#B22222">/*@C</font>
-<a name="line338">338: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGView.html#RGView">RGView</a> - Prints the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> data structure.</font>
-
-<a name="line340">340: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
-
-<a name="line342">342: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line343">343: </a><font color="#B22222">+  rg - the region context</font>
-<a name="line344">344: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line346">346: </a><font color="#B22222">   Note:</font>
-<a name="line347">347: </a><font color="#B22222">   The available visualization contexts include</font>
-<a name="line348">348: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
-<a name="line349">349: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
-<a name="line350">350: </a><font color="#B22222">         output where only the first processor opens</font>
-<a name="line351">351: </a><font color="#B22222">         the file.  All other processors send their</font>
-<a name="line352">352: </a><font color="#B22222">         data to the first processor to print.</font>
-
-<a name="line354">354: </a><font color="#B22222">   The user can open an alternative visualization context with</font>
-<a name="line355">355: </a><font color="#B22222">   PetscViewerASCIIOpen() - output to a specified file.</font>
-
-<a name="line357">357: </a><font color="#B22222">   Level: beginner</font>
-<a name="line358">358: </a><font color="#B22222">@*/</font>
-<a name="line359">359: </a><strong><font color="#4169E1"><a name="RGView"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGView.html#RGView">RGView</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscViewer viewer)</font></strong>
-<a name="line360">360: </a>{
-<a name="line361">361: </a>  PetscBool      isascii;
-
-<a name="line366">366: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)rg));
-<a name="line369">369: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line370">370: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line371">371: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)rg,viewer);
-<a name="line372">372: </a>    <font color="#4169E1">if</font> (rg->ops->view) {
-<a name="line373">373: </a>      PetscViewerASCIIPushTab(viewer);
-<a name="line374">374: </a>      (*rg->ops->view)(rg,viewer);
-<a name="line375">375: </a>      PetscViewerASCIIPopTab(viewer);
-<a name="line376">376: </a>    }
-<a name="line377">377: </a>    <font color="#4169E1">if</font> (rg->complement) {
-<a name="line378">378: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  selected region is the complement of the specified one\n"</font>);
-<a name="line379">379: </a>    }
-<a name="line380">380: </a>    <font color="#4169E1">if</font> (rg->sfactor!=1.0) {
-<a name="line381">381: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  scaling factor = %g\n"</font>,(double)rg->sfactor);
-<a name="line382">382: </a>    }
-<a name="line383">383: </a>  }
-<a name="line384">384: </a>  <font color="#4169E1">return</font>(0);
-<a name="line385">385: </a>}
-
-<a name="line389">389: </a><font color="#B22222">/*@</font>
-<a name="line390">390: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a> - Whether it is the trivial region (whole complex plane).</font>
-
-<a name="line392">392: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line394">394: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line395">395: </a><font color="#B22222">.  rg - the region context</font>
-
-<a name="line397">397: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line398">398: </a><font color="#B22222">.  trivial - true if the region is equal to the whole complex plane, e.g.,</font>
-<a name="line399">399: </a><font color="#B22222">             an interval region with all four endpoints unbounded or an</font>
-<a name="line400">400: </a><font color="#B22222">             ellipse with infinite radius.</font>
-
-<a name="line402">402: </a><font color="#B22222">   Level: basic</font>
-<a name="line403">403: </a><font color="#B22222">@*/</font>
-<a name="line404">404: </a><strong><font color="#4169E1"><a name="RGIsTrivial"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGIsTrivial.html#RGIsTrivial">RGIsTrivial</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool *trivial)</font></strong>
-<a name="line405">405: </a>{
-
-<a name="line412">412: </a>  <font color="#4169E1">if</font> (rg->ops->istrivial) {
-<a name="line413">413: </a>    (*rg->ops->istrivial)(rg,trivial);
-<a name="line414">414: </a>  } <font color="#4169E1">else</font> *trivial = PETSC_FALSE;
-<a name="line415">415: </a>  <font color="#4169E1">return</font>(0);
-<a name="line416">416: </a>}
-
-<a name="line420">420: </a><font color="#B22222">/*@</font>
-<a name="line421">421: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a> - Determines if a set of given points are inside the region or not.</font>
-
-<a name="line423">423: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line425">425: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line426">426: </a><font color="#B22222">+  rg - the region context</font>
-<a name="line427">427: </a><font color="#B22222">.  n  - number of points to check</font>
-<a name="line428">428: </a><font color="#B22222">.  ar - array of real parts</font>
-<a name="line429">429: </a><font color="#B22222">-  ai - array of imaginary parts</font>
-
-<a name="line431">431: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line432">432: </a><font color="#B22222">.  inside - array of results (1=inside, 0=on the contour, -1=outside)</font>
-
-<a name="line434">434: </a><font color="#B22222">   Note:</font>
-<a name="line435">435: </a><font color="#B22222">   The point a is expressed as a couple of PetscScalar variables ar,ai.</font>
-<a name="line436">436: </a><font color="#B22222">   If built with complex scalars, the point is supposed to be stored in ar,</font>
-<a name="line437">437: </a><font color="#B22222">   otherwise ar,ai contain the real and imaginary parts, respectively.</font>
-
-<a name="line439">439: </a><font color="#B22222">   If a scaling factor was set, the points are scaled before checking.</font>
-
-<a name="line441">441: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line443">443: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(), <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>()</font>
-<a name="line444">444: </a><font color="#B22222">@*/</font>
-<a name="line445">445: </a><strong><font color="#4169E1"><a name="RGCheckInside"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *ar,PetscScalar *ai,PetscInt *inside)</font></strong>
-<a name="line446">446: </a>{
-<a name="line448">448: </a>  PetscReal      px,py;
-<a name="line449">449: </a>  PetscInt       i;
-
-<a name="line455">455: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line457">457: </a><font color="#A020F0">#endif</font>
-
-<a name="line460">460: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line461">461: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line462">462: </a>    px = PetscRealPart(ar[i]);
-<a name="line463">463: </a>    py = PetscImaginaryPart(ar[i]);
-<a name="line464">464: </a><font color="#A020F0">#else</font>
-<a name="line465">465: </a>    px = ar[i];
-<a name="line466">466: </a>    py = ai[i];
-<a name="line467">467: </a><font color="#A020F0">#endif</font>
-<a name="line468">468: </a>    <font color="#4169E1">if</font> (rg->sfactor != 1.0) {
-<a name="line469">469: </a>      px *= rg->sfactor;
-<a name="line470">470: </a>      py *= rg->sfactor;
-<a name="line471">471: </a>    }
-<a name="line472">472: </a>    (*rg->ops->checkinside)(rg,px,py,inside+i);
-<a name="line473">473: </a>    <font color="#4169E1">if</font> (rg->complement) inside[i] = -inside[i];
-<a name="line474">474: </a>  }
-<a name="line475">475: </a>  <font color="#4169E1">return</font>(0);
-<a name="line476">476: </a>}
-
-<a name="line480">480: </a><font color="#B22222">/*@</font>
-<a name="line481">481: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a> - Computes the coordinates of several points lying in the</font>
-<a name="line482">482: </a><font color="#B22222">   contour of the region.</font>
-
-<a name="line484">484: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line486">486: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line487">487: </a><font color="#B22222">+  rg - the region context</font>
-<a name="line488">488: </a><font color="#B22222">-  n  - number of points to compute</font>
-
-<a name="line490">490: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line491">491: </a><font color="#B22222">+  cr - location to store real parts</font>
-<a name="line492">492: </a><font color="#B22222">-  ci - location to store imaginary parts</font>
-
-<a name="line494">494: </a><font color="#B22222">   Level: intermediate</font>
-<a name="line495">495: </a><font color="#B22222">@*/</font>
-<a name="line496">496: </a><strong><font color="#4169E1"><a name="RGComputeContour"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGComputeContour.html#RGComputeContour">RGComputeContour</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscInt n,PetscScalar *cr,PetscScalar *ci)</font></strong>
-<a name="line497">497: </a>{
-
-<a name="line504">504: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line506">506: </a><font color="#A020F0">#endif</font>
-<a name="line507">507: </a>  (*rg->ops->computecontour)(rg,n,cr,ci);
-<a name="line508">508: </a>  <font color="#4169E1">return</font>(0);
-<a name="line509">509: </a>}
+<a name="line612">612: </a><font color="#B22222">/*@</font>
+<a name="line613">613: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a> - Gets the scaling factor.</font>
 
-<a name="line513">513: </a><font color="#B22222">/*@</font>
-<a name="line514">514: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a> - Sets a flag to indicate that the region is the complement</font>
-<a name="line515">515: </a><font color="#B22222">   of the specified one.</font>
-
-<a name="line517">517: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
-
-<a name="line519">519: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line520">520: </a><font color="#B22222">+  rg  - the region context</font>
-<a name="line521">521: </a><font color="#B22222">-  flg - the boolean flag</font>
-
-<a name="line523">523: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line524">524: </a><font color="#B22222">.  -rg_complement <bool> - Activate/deactivate the complementation of the region.</font>
-
-<a name="line526">526: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line528">528: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>()</font>
-<a name="line529">529: </a><font color="#B22222">@*/</font>
-<a name="line530">530: </a><strong><font color="#4169E1"><a name="RGSetComplement"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool flg)</font></strong>
-<a name="line531">531: </a>{
-<a name="line535">535: </a>  rg->complement = flg;
-<a name="line536">536: </a>  <font color="#4169E1">return</font>(0);
-<a name="line537">537: </a>}
-
-<a name="line541">541: </a><font color="#B22222">/*@</font>
-<a name="line542">542: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a> - Gets a flag that that indicates whether the region</font>
-<a name="line543">543: </a><font color="#B22222">   is complemented or not.</font>
+<a name="line615">615: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line545">545: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line547">547: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line548">548: </a><font color="#B22222">.  rg - the region context</font>
-
-<a name="line550">550: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line551">551: </a><font color="#B22222">.  flg - the flag</font>
-
-<a name="line553">553: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line555">555: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetComplement.html#RGSetComplement">RGSetComplement</a>()</font>
-<a name="line556">556: </a><font color="#B22222">@*/</font>
-<a name="line557">557: </a><strong><font color="#4169E1"><a name="RGGetComplement"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetComplement.html#RGGetComplement">RGGetComplement</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscBool *flg)</font></strong>
-<a name="line558">558: </a>{
-<a name="line562">562: </a>  *flg = rg->complement;
-<a name="line563">563: </a>  <font color="#4169E1">return</font>(0);
-<a name="line564">564: </a>}
-
-<a name="line568">568: </a><font color="#B22222">/*@</font>
-<a name="line569">569: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a> - Sets the scaling factor to be used when checking that a</font>
-<a name="line570">570: </a><font color="#B22222">   point is inside the region.</font>
-
-<a name="line572">572: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
-
-<a name="line574">574: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line575">575: </a><font color="#B22222">+  rg      - the region context</font>
-<a name="line576">576: </a><font color="#B22222">-  sfactor - the scaling factor</font>
-
-<a name="line578">578: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line580">580: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(), <a href="../../../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>()</font>
-<a name="line581">581: </a><font color="#B22222">@*/</font>
-<a name="line582">582: </a><strong><font color="#4169E1"><a name="RGSetScale"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal sfactor)</font></strong>
-<a name="line583">583: </a>{
-<a name="line587">587: </a>  <font color="#4169E1">if</font> (sfactor == PETSC_DEFAULT || sfactor == PETSC_DECIDE) rg->sfactor = 1.0;
-<a name="line588">588: </a>  <font color="#4169E1">else</font> {
-<a name="line589">589: </a>    <font color="#4169E1">if</font> (sfactor<=0.0) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of scaling factor. Must be > 0"</font>);
-<a name="line590">590: </a>    rg->sfactor = sfactor;
-<a name="line591">591: </a>  }
-<a name="line592">592: </a>  <font color="#4169E1">return</font>(0);
-<a name="line593">593: </a>}
+<a name="line617">617: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line618">618: </a><font color="#B22222">.  rg - the region context</font>
 
-<a name="line597">597: </a><font color="#B22222">/*@</font>
-<a name="line598">598: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a> - Gets the scaling factor.</font>
+<a name="line620">620: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line621">621: </a><font color="#B22222">.  flg - the flag</font>
 
-<a name="line600">600: </a><font color="#B22222">   Not Collective</font>
+<a name="line623">623: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line602">602: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line603">603: </a><font color="#B22222">.  rg - the region context</font>
+<a name="line625">625: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>()</font>
+<a name="line626">626: </a><font color="#B22222">@*/</font>
+<a name="line627">627: </a><strong><font color="#4169E1"><a name="RGGetScale"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal *sfactor)</font></strong>
+<a name="line628">628: </a>{
+<a name="line632">632: </a>  *sfactor = rg->sfactor;
+<a name="line633">633: </a>  <font color="#4169E1">return</font>(0);
+<a name="line634">634: </a>}
 
-<a name="line605">605: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line606">606: </a><font color="#B22222">.  flg - the flag</font>
+<a name="line638">638: </a><font color="#B22222">/*@</font>
+<a name="line639">639: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a> - Sets an additional scaling factor, that will multiply the</font>
+<a name="line640">640: </a><font color="#B22222">   user-defined scaling factor.</font>
 
-<a name="line608">608: </a><font color="#B22222">   Level: developer</font>
+<a name="line642">642: </a><font color="#B22222">   Logically Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
 
-<a name="line610">610: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>()</font>
-<a name="line611">611: </a><font color="#B22222">@*/</font>
-<a name="line612">612: </a><strong><font color="#4169E1"><a name="RGGetScale"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGGetScale.html#RGGetScale">RGGetScale</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal *sfactor)</font></strong>
-<a name="line613">613: </a>{
-<a name="line617">617: </a>  *sfactor = rg->sfactor;
-<a name="line618">618: </a>  <font color="#4169E1">return</font>(0);
-<a name="line619">619: </a>}
+<a name="line644">644: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line645">645: </a><font color="#B22222">+  rg      - the region context</font>
+<a name="line646">646: </a><font color="#B22222">-  sfactor - the scaling factor</font>
 
-<a name="line623">623: </a><font color="#B22222">/*@</font>
-<a name="line624">624: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a> - Destroys <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> context that was created with <a href="../../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>().</font>
+<a name="line648">648: </a><font color="#B22222">   Notes:</font>
+<a name="line649">649: </a><font color="#B22222">   The current implementation does not allow pushing several scaling factors.</font>
 
-<a name="line626">626: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+<a name="line651">651: </a><font color="#B22222">   This is intended for internal use, for instance in polynomial eigensolvers</font>
+<a name="line652">652: </a><font color="#B22222">   that use parameter scaling.</font>
 
-<a name="line628">628: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line629">629: </a><font color="#B22222">.  rg - the region context</font>
+<a name="line654">654: </a><font color="#B22222">   Level: developer</font>
 
-<a name="line631">631: </a><font color="#B22222">   Level: beginner</font>
+<a name="line656">656: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(), <a href="../../../../docs/manualpages/RG/RGSetScale.html#RGSetScale">RGSetScale</a>()</font>
+<a name="line657">657: </a><font color="#B22222">@*/</font>
+<a name="line658">658: </a><strong><font color="#4169E1"><a name="RGPushScale"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg,PetscReal sfactor)</font></strong>
+<a name="line659">659: </a>{
+<a name="line663">663: </a>  <font color="#4169E1">if</font> (sfactor<=0.0) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Illegal value of scaling factor. Must be > 0"</font>);
+<a name="line664">664: </a>  <font color="#4169E1">if</font> (rg->osfactor) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_SUP,<font color="#666666">"Current implementation does not allow pushing several scaling factors"</font>);
+<a name="line665">665: </a>  rg->osfactor = rg->sfactor;
+<a name="line666">666: </a>  rg->sfactor *= sfactor;
+<a name="line667">667: </a>  <font color="#4169E1">return</font>(0);
+<a name="line668">668: </a>}
 
-<a name="line633">633: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>()</font>
-<a name="line634">634: </a><font color="#B22222">@*/</font>
-<a name="line635">635: </a><strong><font color="#4169E1"><a name="RGDestroy"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
-<a name="line636">636: </a>{
+<a name="line672">672: </a><font color="#B22222">/*@</font>
+<a name="line673">673: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a> - Pops the scaling factor set with <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>().</font>
 
-<a name="line640">640: </a>  <font color="#4169E1">if</font> (!*rg) <font color="#4169E1">return</font>(0);
-<a name="line642">642: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*rg))->refct > 0) { *rg = 0; <font color="#4169E1">return</font>(0); }
-<a name="line643">643: </a>  <font color="#4169E1">if</font> ((*rg)->ops->destroy) { (*(*rg)->ops->destroy)(*rg); }
-<a name="line644">644: </a>  PetscHeaderDestroy(rg);
-<a name="line645">645: </a>  <font color="#4169E1">return</font>(0);
-<a name="line646">646: </a>}
+<a name="line675">675: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line650">650: </a><font color="#B22222">/*@C</font>
-<a name="line651">651: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a> - See Adds a mathematical function to the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> package.</font>
+<a name="line677">677: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line678">678: </a><font color="#B22222">.  rg - the region context</font>
 
-<a name="line653">653: </a><font color="#B22222">   Not collective</font>
+<a name="line680">680: </a><font color="#B22222">   Level: developer</font>
 
-<a name="line655">655: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line656">656: </a><font color="#B22222">+  name - name of a new user-defined <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
-<a name="line657">657: </a><font color="#B22222">-  function - routine to create context</font>
+<a name="line682">682: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a>()</font>
+<a name="line683">683: </a><font color="#B22222">@*/</font>
+<a name="line684">684: </a><strong><font color="#4169E1"><a name="RGPopScale"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGPopScale.html#RGPopScale">RGPopScale</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> rg)</font></strong>
+<a name="line685">685: </a>{
+<a name="line688">688: </a>  <font color="#4169E1">if</font> (!rg->osfactor) SETERRQ(PetscObjectComm((PetscObject)rg),PETSC_ERR_ORDER,<font color="#666666">"Must call <a href="../../../../docs/manualpages/RG/RGPushScale.html#RGPushScale">RGPushScale</a> first"</font>);
+<a name="line689">689: </a>  rg->sfactor  = rg->osfactor;
+<a name="line690">690: </a>  rg->osfactor = 0.0;
+<a name="line691">691: </a>  <font color="#4169E1">return</font>(0);
+<a name="line692">692: </a>}
 
-<a name="line659">659: </a><font color="#B22222">   Notes:</font>
-<a name="line660">660: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a>() may be called multiple times to add several user-defined inner products.</font>
+<a name="line696">696: </a><font color="#B22222">/*@</font>
+<a name="line697">697: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a> - Destroys <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> context that was created with <a href="../../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>().</font>
 
-<a name="line662">662: </a><font color="#B22222">   Level: advanced</font>
+<a name="line699">699: </a><font color="#B22222">   Collective on <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
 
-<a name="line664">664: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGRegisterAll.html#RGRegisterAll">RGRegisterAll</a>()</font>
-<a name="line665">665: </a><font color="#B22222">@*/</font>
-<a name="line666">666: </a><strong><font color="#4169E1"><a name="RGRegister"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>))</font></strong>
-<a name="line667">667: </a>{
+<a name="line701">701: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line702">702: </a><font color="#B22222">.  rg - the region context</font>
 
-<a name="line671">671: </a>  PetscFunctionListAdd(&RGList,name,function);
-<a name="line672">672: </a>  <font color="#4169E1">return</font>(0);
-<a name="line673">673: </a>}
+<a name="line704">704: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line706">706: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGCreate.html#RGCreate">RGCreate</a>()</font>
+<a name="line707">707: </a><font color="#B22222">@*/</font>
+<a name="line708">708: </a><strong><font color="#4169E1"><a name="RGDestroy"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGDestroy.html#RGDestroy">RGDestroy</a>(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> *rg)</font></strong>
+<a name="line709">709: </a>{
+
+<a name="line713">713: </a>  <font color="#4169E1">if</font> (!*rg) <font color="#4169E1">return</font>(0);
+<a name="line715">715: </a>  <font color="#4169E1">if</font> (--((PetscObject)(*rg))->refct > 0) { *rg = 0; <font color="#4169E1">return</font>(0); }
+<a name="line716">716: </a>  <font color="#4169E1">if</font> ((*rg)->ops->destroy) { (*(*rg)->ops->destroy)(*rg); }
+<a name="line717">717: </a>  PetscHeaderDestroy(rg);
+<a name="line718">718: </a>  <font color="#4169E1">return</font>(0);
+<a name="line719">719: </a>}
+
+<a name="line723">723: </a><font color="#B22222">/*@C</font>
+<a name="line724">724: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a> - See Adds a mathematical function to the <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a> package.</font>
+
+<a name="line726">726: </a><font color="#B22222">   Not collective</font>
+
+<a name="line728">728: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line729">729: </a><font color="#B22222">+  name - name of a new user-defined <a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a></font>
+<a name="line730">730: </a><font color="#B22222">-  function - routine to create context</font>
+
+<a name="line732">732: </a><font color="#B22222">   Notes:</font>
+<a name="line733">733: </a><font color="#B22222">   <a href="../../../../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a>() may be called multiple times to add several user-defined inner products.</font>
+
+<a name="line735">735: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line737">737: </a><font color="#B22222">.seealso: <a href="../../../../docs/manualpages/RG/RGRegisterAll.html#RGRegisterAll">RGRegisterAll</a>()</font>
+<a name="line738">738: </a><font color="#B22222">@*/</font>
+<a name="line739">739: </a><strong><font color="#4169E1"><a name="RGRegister"></a>PetscErrorCode <a href="../../../../docs/manualpages/RG/RGRegister.html#RGRegister">RGRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../docs/manualpages/RG/RG.html#RG">RG</a>))</font></strong>
+<a name="line740">740: </a>{
+
+<a name="line744">744: </a>  PetscFunctionListAdd(&RGList,name,function);
+<a name="line745">745: </a>  <font color="#4169E1">return</font>(0);
+<a name="line746">746: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/rg/interface/rgregis.c b/src/sys/classes/rg/interface/rgregis.c
index b7b271f..168313e 100644
--- a/src/sys/classes/rg/interface/rgregis.c
+++ b/src/sys/classes/rg/interface/rgregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/rg/interface/rgregis.c.html b/src/sys/classes/rg/interface/rgregis.c.html
index d434398..5d585da 100644
--- a/src/sys/classes/rg/interface/rgregis.c.html
+++ b/src/sys/classes/rg/interface/rgregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/interface/rgregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:35+00:00">
+<meta name="date" content="2016-05-16T10:32:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/interface/rgregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/interface/rgregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/rg/makefile b/src/sys/classes/rg/makefile
index e2cc17e..bdd38a4 100644
--- a/src/sys/classes/rg/makefile
+++ b/src/sys/classes/rg/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/rg/makefile.html b/src/sys/classes/rg/makefile.html
index 049756b..db94c30 100644
--- a/src/sys/classes/rg/makefile.html
+++ b/src/sys/classes/rg/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/rg/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:33+00:00">
+<meta name="date" content="2016-05-16T10:32:28+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/rg/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/rg/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/examples/index.html b/src/sys/classes/st/examples/index.html
index a1d1b54..b402741 100644
--- a/src/sys/classes/st/examples/index.html
+++ b/src/sys/classes/st/examples/index.html
@@ -4,8 +4,8 @@
 <title>Generic SLEPc Manual Pages</title>
 </head>
 <body>
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/index.html "><small>Report Typos and Errors</small></a></div>
 <p>
 <a href="tests/">tests/</a><br>
  
diff --git a/src/sys/classes/st/examples/makefile b/src/sys/classes/st/examples/makefile
index 453b9d7..2dfab67 100644
--- a/src/sys/classes/st/examples/makefile
+++ b/src/sys/classes/st/examples/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/examples/makefile.html b/src/sys/classes/st/examples/makefile.html
index d32829b..1817fe3 100644
--- a/src/sys/classes/st/examples/makefile.html
+++ b/src/sys/classes/st/examples/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/examples/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:16+00:00">
+<meta name="date" content="2016-05-16T10:32:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/examples/tests/index.html b/src/sys/classes/st/examples/tests/index.html
index 60b2348..e33afb5 100644
--- a/src/sys/classes/st/examples/tests/index.html
+++ b/src/sys/classes/st/examples/tests/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/tests/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/examples/tests/makefile b/src/sys/classes/st/examples/tests/makefile
index 80e3100..de0f0b0 100644
--- a/src/sys/classes/st/examples/tests/makefile
+++ b/src/sys/classes/st/examples/tests/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -62,61 +62,61 @@ TESTCODE = \
 
 runtest1_1:
 	- at test=test1_1; \
-	${MPIEXEC} -np 1 ./test1 -st_matmode inplace 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -st_matmode inplace 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest1_2:
 	- at test=test1_1; \
-	${MPIEXEC} -np 1 ./test1 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_1:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_2:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -st_matmode inplace 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_matmode inplace 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest2_3:
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_1:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_2:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -st_matmode inplace 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -st_matmode inplace 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest3_3:
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_1:
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -st_transform 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -st_transform 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_2:
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -st_transform -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -st_transform -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_3:
 	- at test=test4_2; \
-	${MPIEXEC} -np 1 ./test4 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 runtest4_4:
 	- at test=test4_2; \
-	${MPIEXEC} -np 1 ./test4 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
diff --git a/src/sys/classes/st/examples/tests/makefile.html b/src/sys/classes/st/examples/tests/makefile.html
index 9a2535e..a2d1600 100644
--- a/src/sys/classes/st/examples/tests/makefile.html
+++ b/src/sys/classes/st/examples/tests/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/examples/tests/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:17+00:00">
+<meta name="date" content="2016-05-16T10:32:11+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/tests/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
@@ -73,62 +73,62 @@ TESTCODE = \
 
 <strong><font color="#FF0000">runtest1_1:</font></strong>
 	- at test=test1_1; \
-	${MPIEXEC} -np 1 ./test1 -st_matmode inplace 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -st_matmode inplace 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest1_2:</font></strong>
 	- at test=test1_1; \
-	${MPIEXEC} -np 1 ./test1 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test1 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_1:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_2:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -st_matmode inplace 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_matmode inplace 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest2_3:</font></strong>
 	- at test=test2_1; \
-	${MPIEXEC} -np 1 ./test2 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test2 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_1:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_2:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -st_matmode inplace 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -st_matmode inplace 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest3_3:</font></strong>
 	- at test=test3_1; \
-	${MPIEXEC} -np 1 ./test3 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test3 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_1:</font></strong>
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -st_transform 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -st_transform 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_2:</font></strong>
 	- at test=test4_1; \
-	${MPIEXEC} -np 1 ./test4 -st_transform -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -st_transform -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_3:</font></strong>
 	- at test=test4_2; \
-	${MPIEXEC} -np 1 ./test4 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 <strong><font color="#FF0000">runtest4_4:</font></strong>
 	- at test=test4_2; \
-	${MPIEXEC} -np 1 ./test4 -st_matmode shell 2>&1 > $${test}.tmp; \
+	${MPIEXEC} -n 1 ./test4 -st_matmode shell 2>&1 > $${test}.tmp; \
 	${TESTCODE}
 
 </pre>
diff --git a/src/sys/classes/st/examples/tests/output/test1_1.out b/src/sys/classes/st/examples/tests/output/test1_1.out
index 28f59a7..e3d1977 100644
--- a/src/sys/classes/st/examples/tests/output/test1_1.out
+++ b/src/sys/classes/st/examples/tests/output/test1_1.out
@@ -4,16 +4,16 @@
 ST type shift
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 With shift=0.1
 Vec Object: 1 MPI processes
   type: seq
diff --git a/src/sys/classes/st/examples/tests/output/test2_1.out b/src/sys/classes/st/examples/tests/output/test2_1.out
index d02297e..a7d0e81 100644
--- a/src/sys/classes/st/examples/tests/output/test2_1.out
+++ b/src/sys/classes/st/examples/tests/output/test2_1.out
@@ -4,16 +4,16 @@
 ST type shift
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 With shift=0.1
 Vec Object: 1 MPI processes
   type: seq
@@ -81,7 +81,7 @@ Vec Object: 1 MPI processes
 -2.89831
 -2.53432
 -0.48258
-With shift=1.1, antishift=-1
+With shift=1.1, antishift=-1.
 Vec Object: 1 MPI processes
   type: seq
 0.93261
@@ -96,13 +96,13 @@ Vec Object: 1 MPI processes
 0.93261
 Vec Object: 1 MPI processes
   type: seq
-0
--1
--1
--1
--1
--1
--1
--1
--1
-0
+0.
+-1.
+-1.
+-1.
+-1.
+-1.
+-1.
+-1.
+-1.
+0.
diff --git a/src/sys/classes/st/examples/tests/output/test3_1.out b/src/sys/classes/st/examples/tests/output/test3_1.out
index 6fcfd11..95ce74a 100644
--- a/src/sys/classes/st/examples/tests/output/test3_1.out
+++ b/src/sys/classes/st/examples/tests/output/test3_1.out
@@ -4,15 +4,15 @@
 ST type shift
 Vec Object: 1 MPI processes
   type: seq
--1
-0
-0
-0
-0
-0
-0
-0
-0
+-1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
 0.111111
 With shift=0.1
 Vec Object: 1 MPI processes
@@ -81,7 +81,7 @@ Vec Object: 1 MPI processes
 -0.995864
 -0.962683
 -1.25789
-With shift=1.1, antishift=-1
+With shift=1.1, antishift=-1.
 Vec Object: 1 MPI processes
   type: seq
 0.91519
@@ -96,13 +96,13 @@ Vec Object: 1 MPI processes
 0.897369
 Vec Object: 1 MPI processes
   type: seq
-2
--1
--2
--3
--4
--5
--6
--7
--8
--8
+2.
+-1.
+-2.
+-3.
+-4.
+-5.
+-6.
+-7.
+-8.
+-8.
diff --git a/src/sys/classes/st/examples/tests/output/test4_1.out b/src/sys/classes/st/examples/tests/output/test4_1.out
index ed258d5..eb44b4f 100644
--- a/src/sys/classes/st/examples/tests/output/test4_1.out
+++ b/src/sys/classes/st/examples/tests/output/test4_1.out
@@ -5,46 +5,46 @@ ST type shift
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 k= 1
 Vec Object: 1 MPI processes
   type: seq
--1
-1
-2
-3
-4
-5
-6
-7
-8
-9
+-1.
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
 k= 2
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 k= 3
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -58,15 +58,15 @@ solve
 Vec Object: 1 MPI processes
   type: seq
 0.1
-10
-5
+10.
+5.
 3.33333
 2.5
-2
+2.
 1.66667
 1.42857
 1.25
-1
+1.
 With shift=0.1
 k= 0
 Vec Object: 1 MPI processes
@@ -110,7 +110,7 @@ Vec Object: 1 MPI processes
 k= 3
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -124,21 +124,21 @@ solve
 Vec Object: 1 MPI processes
   type: seq
 0.1
-10
-5
+10.
+5.
 3.33333
 2.5
-2
+2.
 1.66667
 1.42857
 1.25
-1
+1.
 ST type sinvert
 With shift=0.1
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -204,7 +204,7 @@ With shift=-0.5
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
diff --git a/src/sys/classes/st/examples/tests/output/test4_2.out b/src/sys/classes/st/examples/tests/output/test4_2.out
index fa7d639..d9afbd8 100644
--- a/src/sys/classes/st/examples/tests/output/test4_2.out
+++ b/src/sys/classes/st/examples/tests/output/test4_2.out
@@ -5,46 +5,46 @@ ST type shift
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 k= 1
 Vec Object: 1 MPI processes
   type: seq
--1
-1
-2
-3
-4
-5
-6
-7
-8
-9
+-1.
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
 k= 2
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 k= 3
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -57,60 +57,60 @@ Vec Object: 1 MPI processes
 solve
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 With shift=0.1
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 k= 1
 Vec Object: 1 MPI processes
   type: seq
--1
-1
-2
-3
-4
-5
-6
-7
-8
-9
+-1.
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
 k= 2
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 k= 3
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -123,61 +123,61 @@ Vec Object: 1 MPI processes
 solve
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 ST type sinvert
 With shift=0.1
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 k= 1
 Vec Object: 1 MPI processes
   type: seq
--1
-1
-2
-3
-4
-5
-6
-7
-8
-9
+-1.
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
 k= 2
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 k= 3
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -190,60 +190,60 @@ Vec Object: 1 MPI processes
 solve
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 With shift=-0.5
 k= 0
 Vec Object: 1 MPI processes
   type: seq
-1
-0
-0
-0
-0
-0
-0
-0
-0
-1
+1.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+0.
+1.
 k= 1
 Vec Object: 1 MPI processes
   type: seq
--1
-1
-2
-3
-4
-5
-6
-7
-8
-9
+-1.
+1.
+2.
+3.
+4.
+5.
+6.
+7.
+8.
+9.
 k= 2
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
 k= 3
 Vec Object: 1 MPI processes
   type: seq
-1
+1.
 0.1
 0.2
 0.3
@@ -256,13 +256,13 @@ Vec Object: 1 MPI processes
 solve
 Vec Object: 1 MPI processes
   type: seq
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
+1.
diff --git a/src/sys/classes/st/examples/tests/test1.c b/src/sys/classes/st/examples/tests/test1.c
index 9f4ee84..5407a73 100644
--- a/src/sys/classes/st/examples/tests/test1.c
+++ b/src/sys/classes/st/examples/tests/test1.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -63,7 +63,7 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian with shell matrices, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -149,7 +149,7 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = VecDestroy(&w);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
 
 #undef __FUNCT__
diff --git a/src/sys/classes/st/examples/tests/test1.c.html b/src/sys/classes/st/examples/tests/test1.c.html
index 24ad882..b331ae8 100644
--- a/src/sys/classes/st/examples/tests/test1.c.html
+++ b/src/sys/classes/st/examples/tests/test1.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/examples/tests/test1.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:16+00:00">
+<meta name="date" content="2016-05-16T10:32:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/tests/test1.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -68,7 +68,7 @@
 <a name="line62"> 62: </a>  PetscInt       n=10,i,Istart,Iend;
 
 <a name="line65"> 65: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line66"> 66: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line66"> 66: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line67"> 67: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian with shell matrices, n=%D\n\n"</font>,n);
 
 <a name="line69"> 69: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -154,7 +154,7 @@
 <a name="line149">149: </a>  VecDestroy(&v);
 <a name="line150">150: </a>  VecDestroy(&w);
 <a name="line151">151: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line152">152: </a>  <font color="#4169E1">return</font> 0;
+<a name="line152">152: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line153">153: </a>}
 
 <a name="line157">157: </a><strong><font color="#4169E1"><a name="MatMult_Shell"></a>static PetscErrorCode MatMult_Shell(Mat S,Vec x,Vec y)</font></strong>
diff --git a/src/sys/classes/st/examples/tests/test2.c b/src/sys/classes/st/examples/tests/test2.c
index 7ae74e1..7f94481 100644
--- a/src/sys/classes/st/examples/tests/test2.c
+++ b/src/sys/classes/st/examples/tests/test2.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -36,7 +36,7 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -149,5 +149,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = VecDestroy(&w);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/st/examples/tests/test2.c.html b/src/sys/classes/st/examples/tests/test2.c.html
index 05f8473..1767a18 100644
--- a/src/sys/classes/st/examples/tests/test2.c.html
+++ b/src/sys/classes/st/examples/tests/test2.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/examples/tests/test2.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:16+00:00">
+<meta name="date" content="2016-05-16T10:32:10+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/tests/test2.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,7 +45,7 @@
 <a name="line35"> 35: </a>  PetscInt       n=10,i,Istart,Iend;
 
 <a name="line38"> 38: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line40"> 40: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian, n=%D\n\n"</font>,n);
 
 <a name="line42"> 42: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -158,7 +158,7 @@
 <a name="line149">149: </a>  VecDestroy(&v);
 <a name="line150">150: </a>  VecDestroy(&w);
 <a name="line151">151: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line152">152: </a>  <font color="#4169E1">return</font> 0;
+<a name="line152">152: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line153">153: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/st/examples/tests/test3.c b/src/sys/classes/st/examples/tests/test3.c
index c123633..2cbe871 100644
--- a/src/sys/classes/st/examples/tests/test3.c
+++ b/src/sys/classes/st/examples/tests/test3.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -36,7 +36,7 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian plus diagonal, n=%D\n\n",n);CHKERRQ(ierr);
 
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -163,5 +163,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = VecDestroy(&w);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/st/examples/tests/test3.c.html b/src/sys/classes/st/examples/tests/test3.c.html
index 2f75046..c0d0a35 100644
--- a/src/sys/classes/st/examples/tests/test3.c.html
+++ b/src/sys/classes/st/examples/tests/test3.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/examples/tests/test3.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:16+00:00">
+<meta name="date" content="2016-05-16T10:32:10+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/tests/test3.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -45,7 +45,7 @@
 <a name="line35"> 35: </a>  PetscInt       n=10,i,Istart,Iend;
 
 <a name="line38"> 38: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line39"> 39: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line40"> 40: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian plus diagonal, n=%D\n\n"</font>,n);
 
 <a name="line42"> 42: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
@@ -172,7 +172,7 @@
 <a name="line163">163: </a>  VecDestroy(&v);
 <a name="line164">164: </a>  VecDestroy(&w);
 <a name="line165">165: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line166">166: </a>  <font color="#4169E1">return</font> 0;
+<a name="line166">166: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line167">167: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/st/examples/tests/test4.c b/src/sys/classes/st/examples/tests/test4.c
index 25eb9a8..87965dc 100644
--- a/src/sys/classes/st/examples/tests/test4.c
+++ b/src/sys/classes/st/examples/tests/test4.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -37,7 +37,7 @@ int main(int argc,char **argv)
   PetscErrorCode ierr;
 
   SlepcInitialize(&argc,&argv,(char*)0,help);
-  ierr = PetscOptionsGetInt(NULL,"-n",&n,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr);
   ierr = PetscPrintf(PETSC_COMM_WORLD,"\n1-D Laplacian plus diagonal, n=%D\n\n",n);CHKERRQ(ierr);
   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Compute the operator matrix for the 1-D Laplacian
@@ -175,5 +175,5 @@ int main(int argc,char **argv)
   ierr = VecDestroy(&v);CHKERRQ(ierr);
   ierr = VecDestroy(&w);CHKERRQ(ierr);
   ierr = SlepcFinalize();
-  return 0;
+  return ierr;
 }
diff --git a/src/sys/classes/st/examples/tests/test4.c.html b/src/sys/classes/st/examples/tests/test4.c.html
index a079152..74eb407 100644
--- a/src/sys/classes/st/examples/tests/test4.c.html
+++ b/src/sys/classes/st/examples/tests/test4.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/examples/tests/test4.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:17+00:00">
+<meta name="date" content="2016-05-16T10:32:10+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/examples/tests/test4.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -46,7 +46,7 @@
 <a name="line36"> 36: </a>  PetscInt       n=10,i,Istart,Iend;
 
 <a name="line39"> 39: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&argv,(char*)0,help);
-<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,<font color="#666666">"-n"</font>,&n,NULL);
+<a name="line40"> 40: </a>  PetscOptionsGetInt(NULL,NULL,<font color="#666666">"-n"</font>,&n,NULL);
 <a name="line41"> 41: </a>  PetscPrintf(PETSC_COMM_WORLD,<font color="#666666">"\n1-D Laplacian plus diagonal, n=%D\n\n"</font>,n);
 <a name="line42"> 42: </a>  <font color="#B22222">/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line43"> 43: </a><font color="#B22222">     Compute the operator matrix for the 1-D Laplacian</font>
@@ -184,7 +184,7 @@
 <a name="line175">175: </a>  VecDestroy(&v);
 <a name="line176">176: </a>  VecDestroy(&w);
 <a name="line177">177: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>();
-<a name="line178">178: </a>  <font color="#4169E1">return</font> 0;
+<a name="line178">178: </a>  <font color="#4169E1">return</font> ierr;
 <a name="line179">179: </a>}
 </pre>
 </body>
diff --git a/src/sys/classes/st/impls/cayley/cayley.c b/src/sys/classes/st/impls/cayley/cayley.c
index 78b672f..df2c678 100644
--- a/src/sys/classes/st/impls/cayley/cayley.c
+++ b/src/sys/classes/st/impls/cayley/cayley.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -145,7 +145,7 @@ PetscErrorCode STPostSolve_Cayley(ST st)
       ierr = MatShift(st->A[0],st->sigma);CHKERRQ(ierr);
     }
     st->Astate[0] = ((PetscObject)st->A[0])->state;
-    st->setupcalled = 0;
+    st->state = ST_STATE_INITIAL;
   }
   PetscFunctionReturn(0);
 }
@@ -172,13 +172,14 @@ PetscErrorCode STSetUp_Cayley(ST st)
     ierr = MatShellSetOperation(st->T[0],MATOP_MULT,(void(*)(void))MatMult_Cayley);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)st,(PetscObject)st->T[0]);CHKERRQ(ierr);
   } else {
-    ierr = STMatMAXPY_Private(st,ctx->nu,0.0,0,NULL,PETSC_TRUE,&st->T[0]);CHKERRQ(ierr);
+    ierr = STMatMAXPY_Private(st,ctx->nu,0.0,0,NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[0]);CHKERRQ(ierr);
   }
 
   /* T[1] = A-sigma*B */
-  ierr = STMatMAXPY_Private(st,-st->sigma,0.0,0,NULL,PETSC_TRUE,&st->T[1]);CHKERRQ(ierr);
+  ierr = STMatMAXPY_Private(st,-st->sigma,0.0,0,NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[1]);CHKERRQ(ierr);
+  ierr = PetscObjectReference((PetscObject)st->T[1]);CHKERRQ(ierr);
+  ierr = MatDestroy(&st->P);CHKERRQ(ierr);
   st->P = st->T[1];
-  ierr = PetscObjectReference((PetscObject)st->P);CHKERRQ(ierr);
   if (st->nmat>1) {
     ierr = VecDestroy(&ctx->w2);CHKERRQ(ierr);
     ierr = MatCreateVecs(st->A[1],&ctx->w2,NULL);CHKERRQ(ierr);
@@ -201,9 +202,6 @@ PetscErrorCode STSetShift_Cayley(ST st,PetscScalar newshift)
   PetscFunctionBegin;
   if (newshift==0.0 && (!ctx->nu_set || (ctx->nu_set && ctx->nu==0.0))) SETERRQ(PetscObjectComm((PetscObject)st),1,"Values of shift and antishift cannot be zero simultaneously");
 
-  /* Nothing to be done if STSetUp has not been called yet */
-  if (!st->setupcalled) PetscFunctionReturn(0);
-
   if (!ctx->nu_set) {
     if (st->shift_matrix!=ST_MATMODE_INPLACE) {
       ierr = STMatMAXPY_Private(st,newshift,ctx->nu,0,NULL,PETSC_FALSE,&st->T[0]);CHKERRQ(ierr);
@@ -223,7 +221,7 @@ PetscErrorCode STSetShift_Cayley(ST st,PetscScalar newshift)
 
 #undef __FUNCT__
 #define __FUNCT__ "STSetFromOptions_Cayley"
-PetscErrorCode STSetFromOptions_Cayley(PetscOptions *PetscOptionsObject,ST st)
+PetscErrorCode STSetFromOptions_Cayley(PetscOptionItems *PetscOptionsObject,ST st)
 {
   PetscErrorCode ierr;
   PetscScalar    nu;
@@ -267,7 +265,7 @@ static PetscErrorCode STCayleySetAntishift_Cayley(ST st,PetscScalar newshift)
   ST_CAYLEY *ctx = (ST_CAYLEY*)st->data;
 
   PetscFunctionBegin;
-  if (st->setupcalled && st->shift_matrix!=ST_MATMODE_INPLACE) {
+  if (st->state && st->shift_matrix!=ST_MATMODE_INPLACE) {
     ierr = STMatMAXPY_Private(st,newshift,ctx->nu,0,NULL,PETSC_FALSE,&st->T[0]);CHKERRQ(ierr);
   }
   ctx->nu     = newshift;
@@ -345,7 +343,7 @@ PetscErrorCode STCayleyGetAntishift(ST st,PetscScalar *nu)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   PetscValidScalarPointer(nu,2);
-  ierr = PetscTryMethod(st,"STCayleyGetAntishift_C",(ST,PetscScalar*),(st,nu));CHKERRQ(ierr);
+  ierr = PetscUseMethod(st,"STCayleyGetAntishift_C",(ST,PetscScalar*),(st,nu));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -356,10 +354,14 @@ PetscErrorCode STView_Cayley(ST st,PetscViewer viewer)
   PetscErrorCode ierr;
   char           str[50];
   ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
+  PetscBool      isascii;
 
   PetscFunctionBegin;
-  ierr = SlepcSNPrintfScalar(str,50,ctx->nu,PETSC_FALSE);CHKERRQ(ierr);
-  ierr = PetscViewerASCIIPrintf(viewer,"  Cayley: antishift: %s\n",str);CHKERRQ(ierr);
+  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
+  if (isascii) {
+    ierr = SlepcSNPrintfScalar(str,50,ctx->nu,PETSC_FALSE);CHKERRQ(ierr);
+    ierr = PetscViewerASCIIPrintf(viewer,"  Cayley: antishift: %s\n",str);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/st/impls/cayley/cayley.c.html b/src/sys/classes/st/impls/cayley/cayley.c.html
index aba847f..2e9912c 100644
--- a/src/sys/classes/st/impls/cayley/cayley.c.html
+++ b/src/sys/classes/st/impls/cayley/cayley.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/cayley/cayley.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:15+00:00">
+<meta name="date" content="2016-05-16T10:32:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/cayley/cayley.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/cayley/cayley.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      Implements the Cayley spectral transform.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -134,7 +134,7 @@
 <a name="line145">145: </a>      MatShift(st->A[0],st->sigma);
 <a name="line146">146: </a>    }
 <a name="line147">147: </a>    st->Astate[0] = ((PetscObject)st->A[0])->state;
-<a name="line148">148: </a>    st->setupcalled = 0;
+<a name="line148">148: </a>    st->state = ST_STATE_INITIAL;
 <a name="line149">149: </a>  }
 <a name="line150">150: </a>  <font color="#4169E1">return</font>(0);
 <a name="line151">151: </a>}
@@ -157,206 +157,208 @@
 <a name="line172">172: </a>    MatShellSetOperation(st->T[0],MATOP_MULT,(void(*)(void))MatMult_Cayley);
 <a name="line173">173: </a>    PetscLogObjectParent((PetscObject)st,(PetscObject)st->T[0]);
 <a name="line174">174: </a>  } <font color="#4169E1">else</font> {
-<a name="line175">175: </a>    STMatMAXPY_Private(st,ctx->nu,0.0,0,NULL,PETSC_TRUE,&st->T[0]);
+<a name="line175">175: </a>    STMatMAXPY_Private(st,ctx->nu,0.0,0,NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[0]);
 <a name="line176">176: </a>  }
 
 <a name="line178">178: </a>  <font color="#B22222">/* T[1] = A-sigma*B */</font>
-<a name="line179">179: </a>  STMatMAXPY_Private(st,-st->sigma,0.0,0,NULL,PETSC_TRUE,&st->T[1]);
-<a name="line180">180: </a>  st->P = st->T[1];
-<a name="line181">181: </a>  PetscObjectReference((PetscObject)st->P);
-<a name="line182">182: </a>  <font color="#4169E1">if</font> (st->nmat>1) {
-<a name="line183">183: </a>    VecDestroy(&ctx->w2);
-<a name="line184">184: </a>    MatCreateVecs(st->A[1],&ctx->w2,NULL);
-<a name="line185">185: </a>    PetscLogObjectParent((PetscObject)st,(PetscObject)ctx->w2);
-<a name="line186">186: </a>  }
-<a name="line187">187: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line188">188: </a>  STCheckFactorPackage(st);
-<a name="line189">189: </a>  KSPSetOperators(st->ksp,st->P,st->P);
-<a name="line190">190: </a>  KSPSetUp(st->ksp);
-<a name="line191">191: </a>  <font color="#4169E1">return</font>(0);
-<a name="line192">192: </a>}
-
-<a name="line196">196: </a><strong><font color="#4169E1"><a name="STSetShift_Cayley"></a>PetscErrorCode STSetShift_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
-<a name="line197">197: </a>{
-<a name="line199">199: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
-
-<a name="line202">202: </a>  <font color="#4169E1">if</font> (newshift==0.0 && (!ctx->nu_set || (ctx->nu_set && ctx->nu==0.0))) SETERRQ(PetscObjectComm((PetscObject)st),1,<font color="#666666">"Values of shift and antishift cannot be zero simultaneously"</font>);
-
-<a name="line204">204: </a>  <font color="#B22222">/* Nothing to be done if <a href="../../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a> has not been called yet */</font>
-<a name="line205">205: </a>  <font color="#4169E1">if</font> (!st->setupcalled) <font color="#4169E1">return</font>(0);
-
-<a name="line207">207: </a>  <font color="#4169E1">if</font> (!ctx->nu_set) {
-<a name="line208">208: </a>    <font color="#4169E1">if</font> (st->shift_matrix!=ST_MATMODE_INPLACE) {
-<a name="line209">209: </a>      STMatMAXPY_Private(st,newshift,ctx->nu,0,NULL,PETSC_FALSE,&st->T[0]);
-<a name="line210">210: </a>    }
-<a name="line211">211: </a>    ctx->nu = newshift;
-<a name="line212">212: </a>  }
-<a name="line213">213: </a>  STMatMAXPY_Private(st,-newshift,-st->sigma,0,NULL,PETSC_FALSE,&st->T[1]);
-<a name="line214">214: </a>  <font color="#4169E1">if</font> (st->P!=st->T[1]) {
-<a name="line215">215: </a>    MatDestroy(&st->P);
-<a name="line216">216: </a>    st->P = st->T[1];
-<a name="line217">217: </a>    PetscObjectReference((PetscObject)st->P);
-<a name="line218">218: </a>  }
-<a name="line219">219: </a>  KSPSetOperators(st->ksp,st->P,st->P);
-<a name="line220">220: </a>  KSPSetUp(st->ksp);
-<a name="line221">221: </a>  <font color="#4169E1">return</font>(0);
-<a name="line222">222: </a>}
-
-<a name="line226">226: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Cayley"></a>PetscErrorCode STSetFromOptions_Cayley(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line227">227: </a>{
-<a name="line229">229: </a>  PetscScalar    nu;
-<a name="line230">230: </a>  PetscBool      flg;
-<a name="line231">231: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
-<a name="line232">232: </a>  PC             pc;
-<a name="line233">233: </a>  PCType         pctype;
-<a name="line234">234: </a>  KSPType        ksptype;
-
-<a name="line237">237: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line238">238: </a>  KSPGetPC(st->ksp,&pc);
-<a name="line239">239: </a>  KSPGetType(st->ksp,&ksptype);
-<a name="line240">240: </a>  PCGetType(pc,&pctype);
-<a name="line241">241: </a>  <font color="#4169E1">if</font> (!pctype && !ksptype) {
-<a name="line242">242: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_SHELL) {
-<a name="line243">243: </a>      <font color="#B22222">/* in shell mode use GMRES with Jacobi as the default */</font>
-<a name="line244">244: </a>      KSPSetType(st->ksp,KSPGMRES);
-<a name="line245">245: </a>      PCSetType(pc,PCJACOBI);
-<a name="line246">246: </a>    } <font color="#4169E1">else</font> {
-<a name="line247">247: </a>      <font color="#B22222">/* use direct solver as default */</font>
-<a name="line248">248: </a>      KSPSetType(st->ksp,KSPPREONLY);
-<a name="line249">249: </a>      PCSetType(pc,PCLU);
-<a name="line250">250: </a>    }
-<a name="line251">251: </a>  }
-
-<a name="line253">253: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> Cayley Options"</font>);
-<a name="line254">254: </a>  PetscOptionsScalar(<font color="#666666">"-st_cayley_antishift"</font>,<font color="#666666">"Value of the antishift"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>"</font>,ctx->nu,&nu,&flg);
-<a name="line255">255: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line256">256: </a>    <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>(st,nu);
-<a name="line257">257: </a>  }
-<a name="line258">258: </a>  PetscOptionsTail();
-<a name="line259">259: </a>  <font color="#4169E1">return</font>(0);
-<a name="line260">260: </a>}
-
-<a name="line264">264: </a><strong><font color="#4169E1"><a name="STCayleySetAntishift_Cayley"></a>static PetscErrorCode STCayleySetAntishift_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
-<a name="line265">265: </a>{
-<a name="line267">267: </a>  ST_CAYLEY *ctx = (ST_CAYLEY*)st->data;
-
-<a name="line270">270: </a>  <font color="#4169E1">if</font> (st->setupcalled && st->shift_matrix!=ST_MATMODE_INPLACE) {
-<a name="line271">271: </a>    STMatMAXPY_Private(st,newshift,ctx->nu,0,NULL,PETSC_FALSE,&st->T[0]);
-<a name="line272">272: </a>  }
-<a name="line273">273: </a>  ctx->nu     = newshift;
-<a name="line274">274: </a>  ctx->nu_set = PETSC_TRUE;
-<a name="line275">275: </a>  <font color="#4169E1">return</font>(0);
-<a name="line276">276: </a>}
-
-<a name="line280">280: </a><font color="#B22222">/*@</font>
-<a name="line281">281: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a> - Sets the value of the anti-shift for the Cayley</font>
-<a name="line282">282: </a><font color="#B22222">   spectral transformation.</font>
-
-<a name="line284">284: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line286">286: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line287">287: </a><font color="#B22222">+  st  - the spectral transformation context</font>
-<a name="line288">288: </a><font color="#B22222">-  nu  - the anti-shift</font>
-
-<a name="line290">290: </a><font color="#B22222">   Options Database Key:</font>
-<a name="line291">291: </a><font color="#B22222">.  -st_cayley_antishift - Sets the value of the anti-shift</font>
-
-<a name="line293">293: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line295">295: </a><font color="#B22222">   Note:</font>
-<a name="line296">296: </a><font color="#B22222">   In the generalized Cayley transform, the operator can be expressed as</font>
-<a name="line297">297: </a><font color="#B22222">   OP = inv(A - sigma B)*(A + nu B). This function sets the value of nu.</font>
-<a name="line298">298: </a><font color="#B22222">   Use <a href="../../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>() for setting sigma.</font>
-
-<a name="line300">300: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(), <a href="../../../../../../docs/manualpages/ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</a>()</font>
-<a name="line301">301: </a><font color="#B22222">@*/</font>
-<a name="line302">302: </a><strong><font color="#4169E1"><a name="STCayleySetAntishift"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar nu)</font></strong>
-<a name="line303">303: </a>{
-
-<a name="line309">309: </a>  PetscTryMethod(st,<font color="#666666">"STCayleySetAntishift_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar),(st,nu));
-<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>}
-<a name="line314">314: </a><strong><font color="#4169E1"><a name="STCayleyGetAntishift_Cayley"></a>static PetscErrorCode STCayleyGetAntishift_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar *nu)</font></strong>
-<a name="line315">315: </a>{
-<a name="line316">316: </a>  ST_CAYLEY *ctx = (ST_CAYLEY*)st->data;
-
-<a name="line319">319: </a>  *nu = ctx->nu;
-<a name="line320">320: </a>  <font color="#4169E1">return</font>(0);
-<a name="line321">321: </a>}
-
-<a name="line325">325: </a><font color="#B22222">/*@</font>
-<a name="line326">326: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</a> - Gets the value of the anti-shift used in the Cayley</font>
-<a name="line327">327: </a><font color="#B22222">   spectral transformation.</font>
-
-<a name="line329">329: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line331">331: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line332">332: </a><font color="#B22222">.  st  - the spectral transformation context</font>
-
-<a name="line334">334: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line335">335: </a><font color="#B22222">.  nu  - the anti-shift</font>
-
-<a name="line337">337: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line339">339: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(), <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>()</font>
-<a name="line340">340: </a><font color="#B22222">@*/</font>
-<a name="line341">341: </a><strong><font color="#4169E1"><a name="STCayleyGetAntishift"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar *nu)</font></strong>
-<a name="line342">342: </a>{
-
-<a name="line348">348: </a>  PetscTryMethod(st,<font color="#666666">"STCayleyGetAntishift_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar*),(st,nu));
-<a name="line349">349: </a>  <font color="#4169E1">return</font>(0);
-<a name="line350">350: </a>}
-
-<a name="line354">354: </a><strong><font color="#4169E1"><a name="STView_Cayley"></a>PetscErrorCode STView_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscViewer viewer)</font></strong>
-<a name="line355">355: </a>{
-<a name="line357">357: </a>  char           str[50];
-<a name="line358">358: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
-
-<a name="line361">361: </a>  <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->nu,PETSC_FALSE);
-<a name="line362">362: </a>  PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Cayley: antishift: %s\n"</font>,str);
-<a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
-<a name="line364">364: </a>}
-
-<a name="line368">368: </a><strong><font color="#4169E1"><a name="STReset_Cayley"></a>PetscErrorCode STReset_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line369">369: </a>{
-<a name="line371">371: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
-
-<a name="line374">374: </a>  VecDestroy(&ctx->w2);
-<a name="line375">375: </a>  <font color="#4169E1">return</font>(0);
-<a name="line376">376: </a>}
-
-<a name="line380">380: </a><strong><font color="#4169E1"><a name="STDestroy_Cayley"></a>PetscErrorCode STDestroy_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line381">381: </a>{
-
-<a name="line385">385: </a>  PetscFree(st->data);
-<a name="line386">386: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleySetAntishift_C"</font>,NULL);
-<a name="line387">387: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleyGetAntishift_C"</font>,NULL);
-<a name="line388">388: </a>  <font color="#4169E1">return</font>(0);
-<a name="line389">389: </a>}
-
-<a name="line393">393: </a><strong><font color="#4169E1"><a name="STCreate_Cayley"></a>PETSC_EXTERN PetscErrorCode STCreate_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line394">394: </a>{
-<a name="line396">396: </a>  ST_CAYLEY      *ctx;
-
-<a name="line399">399: </a>  PetscNewLog(st,&ctx);
-<a name="line400">400: </a>  st->data = (void*)ctx;
-
-<a name="line402">402: </a>  st->ops->apply           = STApply_Cayley;
-<a name="line403">403: </a>  st->ops->getbilinearform = STGetBilinearForm_Cayley;
-<a name="line404">404: </a>  st->ops->applytrans      = STApplyTranspose_Cayley;
-<a name="line405">405: </a>  st->ops->postsolve       = STPostSolve_Cayley;
-<a name="line406">406: </a>  st->ops->backtransform   = STBackTransform_Cayley;
-<a name="line407">407: </a>  st->ops->setfromoptions  = STSetFromOptions_Cayley;
-<a name="line408">408: </a>  st->ops->setup           = STSetUp_Cayley;
-<a name="line409">409: </a>  st->ops->setshift        = STSetShift_Cayley;
-<a name="line410">410: </a>  st->ops->destroy         = STDestroy_Cayley;
-<a name="line411">411: </a>  st->ops->reset           = STReset_Cayley;
-<a name="line412">412: </a>  st->ops->view            = STView_Cayley;
-<a name="line413">413: </a>  st->ops->checknullspace  = STCheckNullSpace_Default;
-<a name="line414">414: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleySetAntishift_C"</font>,STCayleySetAntishift_Cayley);
-<a name="line415">415: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleyGetAntishift_C"</font>,STCayleyGetAntishift_Cayley);
-<a name="line416">416: </a>  <font color="#4169E1">return</font>(0);
-<a name="line417">417: </a>}
+<a name="line179">179: </a>  STMatMAXPY_Private(st,-st->sigma,0.0,0,NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[1]);
+<a name="line180">180: </a>  PetscObjectReference((PetscObject)st->T[1]);
+<a name="line181">181: </a>  MatDestroy(&st->P);
+<a name="line182">182: </a>  st->P = st->T[1];
+<a name="line183">183: </a>  <font color="#4169E1">if</font> (st->nmat>1) {
+<a name="line184">184: </a>    VecDestroy(&ctx->w2);
+<a name="line185">185: </a>    MatCreateVecs(st->A[1],&ctx->w2,NULL);
+<a name="line186">186: </a>    PetscLogObjectParent((PetscObject)st,(PetscObject)ctx->w2);
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line189">189: </a>  STCheckFactorPackage(st);
+<a name="line190">190: </a>  KSPSetOperators(st->ksp,st->P,st->P);
+<a name="line191">191: </a>  KSPSetUp(st->ksp);
+<a name="line192">192: </a>  <font color="#4169E1">return</font>(0);
+<a name="line193">193: </a>}
+
+<a name="line197">197: </a><strong><font color="#4169E1"><a name="STSetShift_Cayley"></a>PetscErrorCode STSetShift_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
+<a name="line198">198: </a>{
+<a name="line200">200: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
+
+<a name="line203">203: </a>  <font color="#4169E1">if</font> (newshift==0.0 && (!ctx->nu_set || (ctx->nu_set && ctx->nu==0.0))) SETERRQ(PetscObjectComm((PetscObject)st),1,<font color="#666666">"Values of shift and antishift cannot be zero simultaneously"</font>);
+
+<a name="line205">205: </a>  <font color="#4169E1">if</font> (!ctx->nu_set) {
+<a name="line206">206: </a>    <font color="#4169E1">if</font> (st->shift_matrix!=ST_MATMODE_INPLACE) {
+<a name="line207">207: </a>      STMatMAXPY_Private(st,newshift,ctx->nu,0,NULL,PETSC_FALSE,&st->T[0]);
+<a name="line208">208: </a>    }
+<a name="line209">209: </a>    ctx->nu = newshift;
+<a name="line210">210: </a>  }
+<a name="line211">211: </a>  STMatMAXPY_Private(st,-newshift,-st->sigma,0,NULL,PETSC_FALSE,&st->T[1]);
+<a name="line212">212: </a>  <font color="#4169E1">if</font> (st->P!=st->T[1]) {
+<a name="line213">213: </a>    MatDestroy(&st->P);
+<a name="line214">214: </a>    st->P = st->T[1];
+<a name="line215">215: </a>    PetscObjectReference((PetscObject)st->P);
+<a name="line216">216: </a>  }
+<a name="line217">217: </a>  KSPSetOperators(st->ksp,st->P,st->P);
+<a name="line218">218: </a>  KSPSetUp(st->ksp);
+<a name="line219">219: </a>  <font color="#4169E1">return</font>(0);
+<a name="line220">220: </a>}
+
+<a name="line224">224: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Cayley"></a>PetscErrorCode STSetFromOptions_Cayley(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line225">225: </a>{
+<a name="line227">227: </a>  PetscScalar    nu;
+<a name="line228">228: </a>  PetscBool      flg;
+<a name="line229">229: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
+<a name="line230">230: </a>  PC             pc;
+<a name="line231">231: </a>  PCType         pctype;
+<a name="line232">232: </a>  KSPType        ksptype;
+
+<a name="line235">235: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line236">236: </a>  KSPGetPC(st->ksp,&pc);
+<a name="line237">237: </a>  KSPGetType(st->ksp,&ksptype);
+<a name="line238">238: </a>  PCGetType(pc,&pctype);
+<a name="line239">239: </a>  <font color="#4169E1">if</font> (!pctype && !ksptype) {
+<a name="line240">240: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_SHELL) {
+<a name="line241">241: </a>      <font color="#B22222">/* in shell mode use GMRES with Jacobi as the default */</font>
+<a name="line242">242: </a>      KSPSetType(st->ksp,KSPGMRES);
+<a name="line243">243: </a>      PCSetType(pc,PCJACOBI);
+<a name="line244">244: </a>    } <font color="#4169E1">else</font> {
+<a name="line245">245: </a>      <font color="#B22222">/* use direct solver as default */</font>
+<a name="line246">246: </a>      KSPSetType(st->ksp,KSPPREONLY);
+<a name="line247">247: </a>      PCSetType(pc,PCLU);
+<a name="line248">248: </a>    }
+<a name="line249">249: </a>  }
+
+<a name="line251">251: </a>  PetscOptionsHead(PetscOptionsObject,<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> Cayley Options"</font>);
+<a name="line252">252: </a>  PetscOptionsScalar(<font color="#666666">"-st_cayley_antishift"</font>,<font color="#666666">"Value of the antishift"</font>,<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>"</font>,ctx->nu,&nu,&flg);
+<a name="line253">253: </a>  <font color="#4169E1">if</font> (flg) {
+<a name="line254">254: </a>    <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>(st,nu);
+<a name="line255">255: </a>  }
+<a name="line256">256: </a>  PetscOptionsTail();
+<a name="line257">257: </a>  <font color="#4169E1">return</font>(0);
+<a name="line258">258: </a>}
+
+<a name="line262">262: </a><strong><font color="#4169E1"><a name="STCayleySetAntishift_Cayley"></a>static PetscErrorCode STCayleySetAntishift_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
+<a name="line263">263: </a>{
+<a name="line265">265: </a>  ST_CAYLEY *ctx = (ST_CAYLEY*)st->data;
+
+<a name="line268">268: </a>  <font color="#4169E1">if</font> (st->state && st->shift_matrix!=ST_MATMODE_INPLACE) {
+<a name="line269">269: </a>    STMatMAXPY_Private(st,newshift,ctx->nu,0,NULL,PETSC_FALSE,&st->T[0]);
+<a name="line270">270: </a>  }
+<a name="line271">271: </a>  ctx->nu     = newshift;
+<a name="line272">272: </a>  ctx->nu_set = PETSC_TRUE;
+<a name="line273">273: </a>  <font color="#4169E1">return</font>(0);
+<a name="line274">274: </a>}
+
+<a name="line278">278: </a><font color="#B22222">/*@</font>
+<a name="line279">279: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a> - Sets the value of the anti-shift for the Cayley</font>
+<a name="line280">280: </a><font color="#B22222">   spectral transformation.</font>
+
+<a name="line282">282: </a><font color="#B22222">   Logically Collective on <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line284">284: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line285">285: </a><font color="#B22222">+  st  - the spectral transformation context</font>
+<a name="line286">286: </a><font color="#B22222">-  nu  - the anti-shift</font>
+
+<a name="line288">288: </a><font color="#B22222">   Options Database Key:</font>
+<a name="line289">289: </a><font color="#B22222">.  -st_cayley_antishift - Sets the value of the anti-shift</font>
+
+<a name="line291">291: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line293">293: </a><font color="#B22222">   Note:</font>
+<a name="line294">294: </a><font color="#B22222">   In the generalized Cayley transform, the operator can be expressed as</font>
+<a name="line295">295: </a><font color="#B22222">   OP = inv(A - sigma B)*(A + nu B). This function sets the value of nu.</font>
+<a name="line296">296: </a><font color="#B22222">   Use <a href="../../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>() for setting sigma.</font>
+
+<a name="line298">298: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(), <a href="../../../../../../docs/manualpages/ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</a>()</font>
+<a name="line299">299: </a><font color="#B22222">@*/</font>
+<a name="line300">300: </a><strong><font color="#4169E1"><a name="STCayleySetAntishift"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar nu)</font></strong>
+<a name="line301">301: </a>{
+
+<a name="line307">307: </a>  PetscTryMethod(st,<font color="#666666">"STCayleySetAntishift_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar),(st,nu));
+<a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
+<a name="line309">309: </a>}
+<a name="line312">312: </a><strong><font color="#4169E1"><a name="STCayleyGetAntishift_Cayley"></a>static PetscErrorCode STCayleyGetAntishift_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar *nu)</font></strong>
+<a name="line313">313: </a>{
+<a name="line314">314: </a>  ST_CAYLEY *ctx = (ST_CAYLEY*)st->data;
+
+<a name="line317">317: </a>  *nu = ctx->nu;
+<a name="line318">318: </a>  <font color="#4169E1">return</font>(0);
+<a name="line319">319: </a>}
+
+<a name="line323">323: </a><font color="#B22222">/*@</font>
+<a name="line324">324: </a><font color="#B22222">   <a href="../../../../../../docs/manualpages/ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</a> - Gets the value of the anti-shift used in the Cayley</font>
+<a name="line325">325: </a><font color="#B22222">   spectral transformation.</font>
+
+<a name="line327">327: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line329">329: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line330">330: </a><font color="#B22222">.  st  - the spectral transformation context</font>
+
+<a name="line332">332: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line333">333: </a><font color="#B22222">.  nu  - the anti-shift</font>
+
+<a name="line335">335: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line337">337: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(), <a href="../../../../../../docs/manualpages/ST/STCayleySetAntishift.html#STCayleySetAntishift">STCayleySetAntishift</a>()</font>
+<a name="line338">338: </a><font color="#B22222">@*/</font>
+<a name="line339">339: </a><strong><font color="#4169E1"><a name="STCayleyGetAntishift"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STCayleyGetAntishift.html#STCayleyGetAntishift">STCayleyGetAntishift</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar *nu)</font></strong>
+<a name="line340">340: </a>{
+
+<a name="line346">346: </a>  PetscUseMethod(st,<font color="#666666">"STCayleyGetAntishift_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscScalar*),(st,nu));
+<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
+<a name="line348">348: </a>}
+
+<a name="line352">352: </a><strong><font color="#4169E1"><a name="STView_Cayley"></a>PetscErrorCode STView_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscViewer viewer)</font></strong>
+<a name="line353">353: </a>{
+<a name="line355">355: </a>  char           str[50];
+<a name="line356">356: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
+<a name="line357">357: </a>  PetscBool      isascii;
+
+<a name="line360">360: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line361">361: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line362">362: </a>    <a href="../../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,ctx->nu,PETSC_FALSE);
+<a name="line363">363: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  Cayley: antishift: %s\n"</font>,str);
+<a name="line364">364: </a>  }
+<a name="line365">365: </a>  <font color="#4169E1">return</font>(0);
+<a name="line366">366: </a>}
+
+<a name="line370">370: </a><strong><font color="#4169E1"><a name="STReset_Cayley"></a>PetscErrorCode STReset_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line371">371: </a>{
+<a name="line373">373: </a>  ST_CAYLEY      *ctx = (ST_CAYLEY*)st->data;
+
+<a name="line376">376: </a>  VecDestroy(&ctx->w2);
+<a name="line377">377: </a>  <font color="#4169E1">return</font>(0);
+<a name="line378">378: </a>}
+
+<a name="line382">382: </a><strong><font color="#4169E1"><a name="STDestroy_Cayley"></a>PetscErrorCode STDestroy_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line383">383: </a>{
+
+<a name="line387">387: </a>  PetscFree(st->data);
+<a name="line388">388: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleySetAntishift_C"</font>,NULL);
+<a name="line389">389: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleyGetAntishift_C"</font>,NULL);
+<a name="line390">390: </a>  <font color="#4169E1">return</font>(0);
+<a name="line391">391: </a>}
+
+<a name="line395">395: </a><strong><font color="#4169E1"><a name="STCreate_Cayley"></a>PETSC_EXTERN PetscErrorCode STCreate_Cayley(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line396">396: </a>{
+<a name="line398">398: </a>  ST_CAYLEY      *ctx;
+
+<a name="line401">401: </a>  PetscNewLog(st,&ctx);
+<a name="line402">402: </a>  st->data = (void*)ctx;
+
+<a name="line404">404: </a>  st->ops->apply           = STApply_Cayley;
+<a name="line405">405: </a>  st->ops->getbilinearform = STGetBilinearForm_Cayley;
+<a name="line406">406: </a>  st->ops->applytrans      = STApplyTranspose_Cayley;
+<a name="line407">407: </a>  st->ops->postsolve       = STPostSolve_Cayley;
+<a name="line408">408: </a>  st->ops->backtransform   = STBackTransform_Cayley;
+<a name="line409">409: </a>  st->ops->setfromoptions  = STSetFromOptions_Cayley;
+<a name="line410">410: </a>  st->ops->setup           = STSetUp_Cayley;
+<a name="line411">411: </a>  st->ops->setshift        = STSetShift_Cayley;
+<a name="line412">412: </a>  st->ops->destroy         = STDestroy_Cayley;
+<a name="line413">413: </a>  st->ops->reset           = STReset_Cayley;
+<a name="line414">414: </a>  st->ops->view            = STView_Cayley;
+<a name="line415">415: </a>  st->ops->checknullspace  = STCheckNullSpace_Default;
+<a name="line416">416: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleySetAntishift_C"</font>,STCayleySetAntishift_Cayley);
+<a name="line417">417: </a>  PetscObjectComposeFunction((PetscObject)st,<font color="#666666">"STCayleyGetAntishift_C"</font>,STCayleyGetAntishift_Cayley);
+<a name="line418">418: </a>  <font color="#4169E1">return</font>(0);
+<a name="line419">419: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/st/impls/cayley/index.html b/src/sys/classes/st/impls/cayley/index.html
index abdad6b..406827e 100644
--- a/src/sys/classes/st/impls/cayley/index.html
+++ b/src/sys/classes/st/impls/cayley/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/cayley/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/cayley/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/impls/cayley/makefile b/src/sys/classes/st/impls/cayley/makefile
index a168b5a..358b8e1 100644
--- a/src/sys/classes/st/impls/cayley/makefile
+++ b/src/sys/classes/st/impls/cayley/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/cayley/makefile.html b/src/sys/classes/st/impls/cayley/makefile.html
index 5ca8e38..f6cdba2 100644
--- a/src/sys/classes/st/impls/cayley/makefile.html
+++ b/src/sys/classes/st/impls/cayley/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/cayley/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:15+00:00">
+<meta name="date" content="2016-05-16T10:32:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/cayley/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/cayley/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/impls/index.html b/src/sys/classes/st/impls/index.html
index 5595eb0..37c42ad 100644
--- a/src/sys/classes/st/impls/index.html
+++ b/src/sys/classes/st/impls/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/impls/makefile b/src/sys/classes/st/impls/makefile
index bc9147a..c53f042 100644
--- a/src/sys/classes/st/impls/makefile
+++ b/src/sys/classes/st/impls/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/makefile.html b/src/sys/classes/st/impls/makefile.html
index cf093ea..7fe423c 100644
--- a/src/sys/classes/st/impls/makefile.html
+++ b/src/sys/classes/st/impls/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:13+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/impls/precond/index.html b/src/sys/classes/st/impls/precond/index.html
index c64c835..64a7c3c 100644
--- a/src/sys/classes/st/impls/precond/index.html
+++ b/src/sys/classes/st/impls/precond/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/precond/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/precond/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/impls/precond/makefile b/src/sys/classes/st/impls/precond/makefile
index 9ff33c9..29a1b5f 100644
--- a/src/sys/classes/st/impls/precond/makefile
+++ b/src/sys/classes/st/impls/precond/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/precond/makefile.html b/src/sys/classes/st/impls/precond/makefile.html
index 3f259aa..e83b844 100644
--- a/src/sys/classes/st/impls/precond/makefile.html
+++ b/src/sys/classes/st/impls/precond/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/precond/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:16+00:00">
+<meta name="date" content="2016-05-16T10:32:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/precond/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/precond/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/impls/precond/precond.c b/src/sys/classes/st/impls/precond/precond.c
index c7a4465..dc9f2d6 100644
--- a/src/sys/classes/st/impls/precond/precond.c
+++ b/src/sys/classes/st/impls/precond/precond.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -29,7 +29,7 @@ typedef struct {
 
 #undef __FUNCT__
 #define __FUNCT__ "STSetFromOptions_Precond"
-PetscErrorCode STSetFromOptions_Precond(PetscOptions *PetscOptionsObject,ST st)
+PetscErrorCode STSetFromOptions_Precond(PetscOptionItems *PetscOptionsObject,ST st)
 {
   PetscErrorCode ierr;
   PC             pc;
@@ -150,7 +150,7 @@ PetscErrorCode STSetShift_Precond(ST st,PetscScalar newshift)
 
   PetscFunctionBegin;
   /* Nothing to be done if STSetUp has not been called yet */
-  if (!st->setupcalled) PetscFunctionReturn(0);
+  if (!st->state) PetscFunctionReturn(0);
   st->sigma = newshift;
   if (st->shift_matrix != ST_MATMODE_SHELL) {
     ierr = STSetUp_Precond(st);CHKERRQ(ierr);
@@ -201,7 +201,7 @@ PetscErrorCode STPrecondGetMatForPC(ST st,Mat *mat)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   PetscValidPointer(mat,2);
-  ierr = PetscTryMethod(st,"STPrecondGetMatForPC_C",(ST,Mat*),(st,mat));CHKERRQ(ierr);
+  ierr = PetscUseMethod(st,"STPrecondGetMatForPC_C",(ST,Mat*),(st,mat));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
@@ -346,7 +346,7 @@ PetscErrorCode STPrecondGetKSPHasMat(ST st,PetscBool *setmat)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   PetscValidPointer(setmat,2);
-  ierr = PetscTryMethod(st,"STPrecondGetKSPHasMat_C",(ST,PetscBool*),(st,setmat));CHKERRQ(ierr);
+  ierr = PetscUseMethod(st,"STPrecondGetKSPHasMat_C",(ST,PetscBool*),(st,setmat));CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
diff --git a/src/sys/classes/st/impls/precond/precond.c.html b/src/sys/classes/st/impls/precond/precond.c.html
index 0c77d95..ad12f59 100644
--- a/src/sys/classes/st/impls/precond/precond.c.html
+++ b/src/sys/classes/st/impls/precond/precond.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/precond/precond.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:15+00:00">
+<meta name="date" content="2016-05-16T10:32:09+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/precond/precond.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/precond/precond.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      Implements the <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> class for preconditioned eigenvalue methods.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -39,7 +39,7 @@
 <a name="line27"> 27: </a>  PetscBool setmat;
 <a name="line28"> 28: </a>} ST_PRECOND;
 
-<a name="line32"> 32: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Precond"></a>PetscErrorCode STSetFromOptions_Precond(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line32"> 32: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Precond"></a>PetscErrorCode STSetFromOptions_Precond(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
 <a name="line33"> 33: </a>{
 <a name="line35"> 35: </a>  PC             pc;
 <a name="line36"> 36: </a>  PCType         pctype;
@@ -150,7 +150,7 @@
 <a name="line148">148: </a>{
 
 <a name="line152">152: </a>  <font color="#B22222">/* Nothing to be done if <a href="../../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a> has not been called yet */</font>
-<a name="line153">153: </a>  <font color="#4169E1">if</font> (!st->setupcalled) <font color="#4169E1">return</font>(0);
+<a name="line153">153: </a>  <font color="#4169E1">if</font> (!st->state) <font color="#4169E1">return</font>(0);
 <a name="line154">154: </a>  st->sigma = newshift;
 <a name="line155">155: </a>  <font color="#4169E1">if</font> (st->shift_matrix != ST_MATMODE_SHELL) {
 <a name="line156">156: </a>    STSetUp_Precond(st);
@@ -191,7 +191,7 @@
 <a name="line197">197: </a><strong><font color="#4169E1"><a name="STPrecondGetMatForPC"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STPrecondGetMatForPC.html#STPrecondGetMatForPC">STPrecondGetMatForPC</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Mat *mat)</font></strong>
 <a name="line198">198: </a>{
 
-<a name="line204">204: </a>  PetscTryMethod(st,<font color="#666666">"STPrecondGetMatForPC_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat*),(st,mat));
+<a name="line204">204: </a>  PetscUseMethod(st,<font color="#666666">"STPrecondGetMatForPC_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,Mat*),(st,mat));
 <a name="line205">205: </a>  <font color="#4169E1">return</font>(0);
 <a name="line206">206: </a>}
 
@@ -307,7 +307,7 @@
 <a name="line342">342: </a><strong><font color="#4169E1"><a name="STPrecondGetKSPHasMat"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STPrecondGetKSPHasMat.html#STPrecondGetKSPHasMat">STPrecondGetKSPHasMat</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscBool *setmat)</font></strong>
 <a name="line343">343: </a>{
 
-<a name="line349">349: </a>  PetscTryMethod(st,<font color="#666666">"STPrecondGetKSPHasMat_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscBool*),(st,setmat));
+<a name="line349">349: </a>  PetscUseMethod(st,<font color="#666666">"STPrecondGetKSPHasMat_C"</font>,(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>,PetscBool*),(st,setmat));
 <a name="line350">350: </a>  <font color="#4169E1">return</font>(0);
 <a name="line351">351: </a>}
 
diff --git a/src/sys/classes/st/impls/shell/ftn-custom/makefile b/src/sys/classes/st/impls/shell/ftn-custom/makefile
index 94d8066..6321468 100644
--- a/src/sys/classes/st/impls/shell/ftn-custom/makefile
+++ b/src/sys/classes/st/impls/shell/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/shell/ftn-custom/zshell.c b/src/sys/classes/st/impls/shell/ftn-custom/zshell.c
index b09fd0e..3130dc3 100644
--- a/src/sys/classes/st/impls/shell/ftn-custom/zshell.c
+++ b/src/sys/classes/st/impls/shell/ftn-custom/zshell.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/st/impls/shell/index.html b/src/sys/classes/st/impls/shell/index.html
index 4702b47..7986bb7 100644
--- a/src/sys/classes/st/impls/shell/index.html
+++ b/src/sys/classes/st/impls/shell/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/shell/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/shell/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/impls/shell/makefile b/src/sys/classes/st/impls/shell/makefile
index a2d0904..8c3f313 100644
--- a/src/sys/classes/st/impls/shell/makefile
+++ b/src/sys/classes/st/impls/shell/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/shell/makefile.html b/src/sys/classes/st/impls/shell/makefile.html
index 59ea440..004d1ca 100644
--- a/src/sys/classes/st/impls/shell/makefile.html
+++ b/src/sys/classes/st/impls/shell/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/shell/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:14+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/shell/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/shell/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/impls/shell/shell.c b/src/sys/classes/st/impls/shell/shell.c
index 610aac6..e9b5bcb 100644
--- a/src/sys/classes/st/impls/shell/shell.c
+++ b/src/sys/classes/st/impls/shell/shell.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -79,8 +79,10 @@ PetscErrorCode STShellGetContext(ST st,void **ctx)
 
    Level: advanced
 
-   Fortran Notes: The context can only be an integer or a PetscObject;
-      unfortunately it cannot be a Fortran array or derived type.
+   Fortran Notes:
+   To use this from Fortran you must write a Fortran interface definition
+   for this function that tells Fortran the Fortran derived data type that
+   you are passing in as the ctx argument.
 
 .seealso: STShellGetContext()
 @*/
@@ -93,9 +95,7 @@ PetscErrorCode STShellSetContext(ST st,void *ctx)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   ierr = PetscObjectTypeCompare((PetscObject)st,STSHELL,&flg);CHKERRQ(ierr);
-  if (flg) {
-    shell->ctx = ctx;
-  }
+  if (flg) shell->ctx = ctx;
   PetscFunctionReturn(0);
 }
 
@@ -103,16 +103,19 @@ PetscErrorCode STShellSetContext(ST st,void *ctx)
 #define __FUNCT__ "STApply_Shell"
 PetscErrorCode STApply_Shell(ST st,Vec x,Vec y)
 {
-  PetscErrorCode ierr;
-  ST_SHELL       *shell = (ST_SHELL*)st->data;
+  PetscErrorCode   ierr;
+  ST_SHELL         *shell = (ST_SHELL*)st->data;
+  PetscObjectState instate,outstate;
 
   PetscFunctionBegin;
   if (!shell->apply) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_USER,"No apply() routine provided to Shell ST");
-  PetscStackPush("STSHELL apply() user function");
-  CHKMEMQ;
-  ierr = (*shell->apply)(st,x,y);CHKERRQ(ierr);
-  CHKMEMQ;
-  PetscStackPop;
+  ierr = PetscObjectStateGet((PetscObject)y,&instate);CHKERRQ(ierr);
+  PetscStackCall("STSHELL user function apply()",ierr = (*shell->apply)(st,x,y);CHKERRQ(ierr));
+  ierr = PetscObjectStateGet((PetscObject)y,&outstate);CHKERRQ(ierr);
+  if (instate == outstate) {
+    /* user forgot to increase the state of the output vector */
+    ierr = PetscObjectStateIncrease((PetscObject)y);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
@@ -122,14 +125,17 @@ PetscErrorCode STApplyTranspose_Shell(ST st,Vec x,Vec y)
 {
   PetscErrorCode ierr;
   ST_SHELL       *shell = (ST_SHELL*)st->data;
+  PetscObjectState instate,outstate;
 
   PetscFunctionBegin;
   if (!shell->applytrans) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_USER,"No applytranspose() routine provided to Shell ST");
-  PetscStackPush("STSHELL applytranspose() user function");
-  CHKMEMQ;
-  ierr = (*shell->applytrans)(st,x,y);CHKERRQ(ierr);
-  CHKMEMQ;
-  PetscStackPop;
+  ierr = PetscObjectStateGet((PetscObject)y,&instate);CHKERRQ(ierr);
+  PetscStackCall("STSHELL user function applytrans()",ierr = (*shell->applytrans)(st,x,y);CHKERRQ(ierr));
+  ierr = PetscObjectStateGet((PetscObject)y,&outstate);CHKERRQ(ierr);
+  if (instate == outstate) {
+    /* user forgot to increase the state of the output vector */
+    ierr = PetscObjectStateIncrease((PetscObject)y);CHKERRQ(ierr);
+  }
   PetscFunctionReturn(0);
 }
 
@@ -141,13 +147,7 @@ PetscErrorCode STBackTransform_Shell(ST st,PetscInt n,PetscScalar *eigr,PetscSca
   ST_SHELL       *shell = (ST_SHELL*)st->data;
 
   PetscFunctionBegin;
-  if (shell->backtransform) {
-    PetscStackPush("STSHELL backtransform() user function");
-    CHKMEMQ;
-    ierr = (*shell->backtransform)(st,n,eigr,eigi);CHKERRQ(ierr);
-    CHKMEMQ;
-    PetscStackPop;
-  }
+  if (shell->backtransform) PetscStackCall("STSHELL user function backtransform()",ierr = (*shell->backtransform)(st,n,eigr,eigi);CHKERRQ(ierr));
   PetscFunctionReturn(0);
 }
 
@@ -306,7 +306,7 @@ PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(ST,PetscIn
 
 #undef __FUNCT__
 #define __FUNCT__ "STSetFromOptions_Shell"
-PetscErrorCode STSetFromOptions_Shell(PetscOptions *PetscOptionsObject,ST st)
+PetscErrorCode STSetFromOptions_Shell(PetscOptionItems *PetscOptionsObject,ST st)
 {
   PetscErrorCode ierr;
   PC             pc;
diff --git a/src/sys/classes/st/impls/shell/shell.c.html b/src/sys/classes/st/impls/shell/shell.c.html
index 39e0979..f2f16da 100644
--- a/src/sys/classes/st/impls/shell/shell.c.html
+++ b/src/sys/classes/st/impls/shell/shell.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/shell/shell.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:13+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/shell/shell.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/shell/shell.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   This provides a simple shell interface for programmers to</font>
 <a name="line3">  3: </a><font color="#B22222">   create their own spectral transformations without writing much</font>
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -83,60 +83,61 @@
 
 <a name="line80"> 80: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line82"> 82: </a><font color="#B22222">   Fortran Notes: The context can only be an integer or a PetscObject;</font>
-<a name="line83"> 83: </a><font color="#B22222">      unfortunately it cannot be a Fortran array or derived type.</font>
+<a name="line82"> 82: </a><font color="#B22222">   Fortran Notes:</font>
+<a name="line83"> 83: </a><font color="#B22222">   To use this from Fortran you must write a Fortran interface definition</font>
+<a name="line84"> 84: </a><font color="#B22222">   for this function that tells Fortran the Fortran derived data type that</font>
+<a name="line85"> 85: </a><font color="#B22222">   you are passing in as the ctx argument.</font>
 
-<a name="line85"> 85: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/ST/STShellGetContext.html#STShellGetContext">STShellGetContext</a>()</font>
-<a name="line86"> 86: </a><font color="#B22222">@*/</font>
-<a name="line87"> 87: </a><strong><font color="#4169E1"><a name="STShellSetContext"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STShellSetContext.html#STShellSetContext">STShellSetContext</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,void *ctx)</font></strong>
-<a name="line88"> 88: </a>{
-<a name="line89"> 89: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
-<a name="line91"> 91: </a>  PetscBool      flg;
+<a name="line87"> 87: </a><font color="#B22222">.seealso: <a href="../../../../../../docs/manualpages/ST/STShellGetContext.html#STShellGetContext">STShellGetContext</a>()</font>
+<a name="line88"> 88: </a><font color="#B22222">@*/</font>
+<a name="line89"> 89: </a><strong><font color="#4169E1"><a name="STShellSetContext"></a>PetscErrorCode <a href="../../../../../../docs/manualpages/ST/STShellSetContext.html#STShellSetContext">STShellSetContext</a>(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,void *ctx)</font></strong>
+<a name="line90"> 90: </a>{
+<a name="line91"> 91: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
+<a name="line93"> 93: </a>  PetscBool      flg;
 
-<a name="line95"> 95: </a>  PetscObjectTypeCompare((PetscObject)st,<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>,&flg);
-<a name="line96"> 96: </a>  <font color="#4169E1">if</font> (flg) {
-<a name="line97"> 97: </a>    shell->ctx = ctx;
-<a name="line98"> 98: </a>  }
+<a name="line97"> 97: </a>  PetscObjectTypeCompare((PetscObject)st,<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>,&flg);
+<a name="line98"> 98: </a>  <font color="#4169E1">if</font> (flg) shell->ctx = ctx;
 <a name="line99"> 99: </a>  <font color="#4169E1">return</font>(0);
 <a name="line100">100: </a>}
 
 <a name="line104">104: </a><strong><font color="#4169E1"><a name="STApply_Shell"></a>PetscErrorCode STApply_Shell(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec x,Vec y)</font></strong>
 <a name="line105">105: </a>{
-<a name="line107">107: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
-
-<a name="line110">110: </a>  <font color="#4169E1">if</font> (!shell->apply) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_USER,<font color="#666666">"No apply() routine provided to Shell <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>"</font>);
-<a name="line111">111: </a>  PetscStackPush(<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a> apply() user function"</font>);
-<a name="line112">112: </a>  CHKMEMQ;
-<a name="line113">113: </a>  (*shell->apply)(st,x,y);
-<a name="line114">114: </a>  CHKMEMQ;
-<a name="line115">115: </a>  PetscStackPop;
-<a name="line116">116: </a>  <font color="#4169E1">return</font>(0);
-<a name="line117">117: </a>}
-
-<a name="line121">121: </a><strong><font color="#4169E1"><a name="STApplyTranspose_Shell"></a>PetscErrorCode STApplyTranspose_Shell(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec x,Vec y)</font></strong>
-<a name="line122">122: </a>{
-<a name="line124">124: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
-
-<a name="line127">127: </a>  <font color="#4169E1">if</font> (!shell->applytrans) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_USER,<font color="#666666">"No applytranspose() routine provided to Shell <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>"</font>);
-<a name="line128">128: </a>  PetscStackPush(<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a> applytranspose() user function"</font>);
-<a name="line129">129: </a>  CHKMEMQ;
-<a name="line130">130: </a>  (*shell->applytrans)(st,x,y);
-<a name="line131">131: </a>  CHKMEMQ;
-<a name="line132">132: </a>  PetscStackPop;
-<a name="line133">133: </a>  <font color="#4169E1">return</font>(0);
-<a name="line134">134: </a>}
-
-<a name="line138">138: </a><strong><font color="#4169E1"><a name="STBackTransform_Shell"></a>PetscErrorCode STBackTransform_Shell(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)</font></strong>
-<a name="line139">139: </a>{
-<a name="line141">141: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
-
-<a name="line144">144: </a>  <font color="#4169E1">if</font> (shell->backtransform) {
-<a name="line145">145: </a>    PetscStackPush(<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a> backtransform() user function"</font>);
-<a name="line146">146: </a>    CHKMEMQ;
-<a name="line147">147: </a>    (*shell->backtransform)(st,n,eigr,eigi);
-<a name="line148">148: </a>    CHKMEMQ;
-<a name="line149">149: </a>    PetscStackPop;
-<a name="line150">150: </a>  }
+<a name="line106">106: </a>  PetscErrorCode   ierr;
+<a name="line107">107: </a>  ST_SHELL         *shell = (ST_SHELL*)st->data;
+<a name="line108">108: </a>  PetscObjectState instate,outstate;
+
+<a name="line111">111: </a>  <font color="#4169E1">if</font> (!shell->apply) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_USER,<font color="#666666">"No apply() routine provided to Shell <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>"</font>);
+<a name="line112">112: </a>  PetscObjectStateGet((PetscObject)y,&instate);
+<a name="line113">113: </a>  PetscStackCall(<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a> user function apply()"</font>,(*shell->apply)(st,x,y);CHKERRQ(ierr));
+<a name="line114">114: </a>  PetscObjectStateGet((PetscObject)y,&outstate);
+<a name="line115">115: </a>  <font color="#4169E1">if</font> (instate == outstate) {
+<a name="line116">116: </a>    <font color="#B22222">/* user forgot to increase the state of the output vector */</font>
+<a name="line117">117: </a>    PetscObjectStateIncrease((PetscObject)y);
+<a name="line118">118: </a>  }
+<a name="line119">119: </a>  <font color="#4169E1">return</font>(0);
+<a name="line120">120: </a>}
+
+<a name="line124">124: </a><strong><font color="#4169E1"><a name="STApplyTranspose_Shell"></a>PetscErrorCode STApplyTranspose_Shell(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec x,Vec y)</font></strong>
+<a name="line125">125: </a>{
+<a name="line127">127: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
+<a name="line128">128: </a>  PetscObjectState instate,outstate;
+
+<a name="line131">131: </a>  <font color="#4169E1">if</font> (!shell->applytrans) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_USER,<font color="#666666">"No applytranspose() routine provided to Shell <a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a>"</font>);
+<a name="line132">132: </a>  PetscObjectStateGet((PetscObject)y,&instate);
+<a name="line133">133: </a>  PetscStackCall(<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a> user function applytrans()"</font>,(*shell->applytrans)(st,x,y);CHKERRQ(ierr));
+<a name="line134">134: </a>  PetscObjectStateGet((PetscObject)y,&outstate);
+<a name="line135">135: </a>  <font color="#4169E1">if</font> (instate == outstate) {
+<a name="line136">136: </a>    <font color="#B22222">/* user forgot to increase the state of the output vector */</font>
+<a name="line137">137: </a>    PetscObjectStateIncrease((PetscObject)y);
+<a name="line138">138: </a>  }
+<a name="line139">139: </a>  <font color="#4169E1">return</font>(0);
+<a name="line140">140: </a>}
+
+<a name="line144">144: </a><strong><font color="#4169E1"><a name="STBackTransform_Shell"></a>PetscErrorCode STBackTransform_Shell(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt n,PetscScalar *eigr,PetscScalar *eigi)</font></strong>
+<a name="line145">145: </a>{
+<a name="line147">147: </a>  ST_SHELL       *shell = (ST_SHELL*)st->data;
+
+<a name="line150">150: </a>  <font color="#4169E1">if</font> (shell->backtransform) PetscStackCall(<font color="#666666">"<a href="../../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a> user function backtransform()"</font>,(*shell->backtransform)(st,n,eigr,eigi);CHKERRQ(ierr));
 <a name="line151">151: </a>  <font color="#4169E1">return</font>(0);
 <a name="line152">152: </a>}
 
@@ -265,7 +266,7 @@
 <a name="line304">304: </a>  <font color="#4169E1">return</font>(0);
 <a name="line305">305: </a>}
 
-<a name="line309">309: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Shell"></a>PetscErrorCode STSetFromOptions_Shell(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line309">309: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Shell"></a>PetscErrorCode STSetFromOptions_Shell(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
 <a name="line310">310: </a>{
 <a name="line312">312: </a>  PC             pc;
 <a name="line313">313: </a>  PCType         pctype;
diff --git a/src/sys/classes/st/impls/shift/index.html b/src/sys/classes/st/impls/shift/index.html
index 94d019e..55da951 100644
--- a/src/sys/classes/st/impls/shift/index.html
+++ b/src/sys/classes/st/impls/shift/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/shift/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/shift/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/impls/shift/makefile b/src/sys/classes/st/impls/shift/makefile
index 7549a99..10e13ed 100644
--- a/src/sys/classes/st/impls/shift/makefile
+++ b/src/sys/classes/st/impls/shift/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/shift/makefile.html b/src/sys/classes/st/impls/shift/makefile.html
index 6d2fca4..58e6c7d 100644
--- a/src/sys/classes/st/impls/shift/makefile.html
+++ b/src/sys/classes/st/impls/shift/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/shift/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:14+00:00">
+<meta name="date" content="2016-05-16T10:32:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/shift/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/shift/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/impls/shift/shift.c b/src/sys/classes/st/impls/shift/shift.c
index 5fbb1ae..f62ba9e 100644
--- a/src/sys/classes/st/impls/shift/shift.c
+++ b/src/sys/classes/st/impls/shift/shift.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -87,7 +87,7 @@ PetscErrorCode STPostSolve_Shift(ST st)
       ierr = MatShift(st->A[0],st->sigma);CHKERRQ(ierr);
     }
     st->Astate[0] = ((PetscObject)st->A[0])->state;
-    st->setupcalled = 0;
+    st->state = ST_STATE_INITIAL;
   }
   PetscFunctionReturn(0);
 }
@@ -111,20 +111,23 @@ PetscErrorCode STSetUp_Shift(ST st)
     /* T[n] = A_n */
     k = nmat-1;
     ierr = PetscObjectReference((PetscObject)st->A[k]);CHKERRQ(ierr);
+    ierr = MatDestroy(&st->T[k]);CHKERRQ(ierr);
     st->T[k] = st->A[k];
     for (k=0;k<nmat-1;k++) {
-      ierr = STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,k,coeffs?coeffs+((nmat-k)*(nmat-k-1))/2:NULL,PETSC_TRUE,&st->T[k]);CHKERRQ(ierr);
+      ierr = STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,k,coeffs?coeffs+((nmat-k)*(nmat-k-1))/2:NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[k]);CHKERRQ(ierr);
     }
      if (nmat>2) { ierr = PetscFree(coeffs);CHKERRQ(ierr); }
   } else {
     for (k=0;k<nmat;k++) {
       ierr = PetscObjectReference((PetscObject)st->A[k]);CHKERRQ(ierr);
+      ierr = MatDestroy(&st->T[k]);CHKERRQ(ierr);
       st->T[k] = st->A[k];
     }
   }
   if (nmat>=2 && st->transform) {
+    ierr = PetscObjectReference((PetscObject)st->T[nmat-1]);CHKERRQ(ierr);
+    ierr = MatDestroy(&st->P);CHKERRQ(ierr);
     st->P = st->T[nmat-1];
-    ierr = PetscObjectReference((PetscObject)st->P);CHKERRQ(ierr);
   }
   if (st->P) {
     if (!st->ksp) { ierr = STGetKSP(st,&st->ksp);CHKERRQ(ierr); }
@@ -145,9 +148,6 @@ PetscErrorCode STSetShift_Shift(ST st,PetscScalar newshift)
   PetscScalar    *coeffs=NULL;
 
   PetscFunctionBegin;
-  /* Nothing to be done if STSetUp has not been called yet */
-  if (!st->setupcalled) PetscFunctionReturn(0);
-
   if (st->transform) {
     if (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
       nc = (nmat*(nmat+1))/2;
@@ -167,7 +167,7 @@ PetscErrorCode STSetShift_Shift(ST st,PetscScalar newshift)
 
 #undef __FUNCT__
 #define __FUNCT__ "STSetFromOptions_Shift"
-PetscErrorCode STSetFromOptions_Shift(PetscOptions *PetscOptionsObject,ST st)
+PetscErrorCode STSetFromOptions_Shift(PetscOptionItems *PetscOptionsObject,ST st)
 {
   PetscErrorCode ierr;
   PC             pc;
diff --git a/src/sys/classes/st/impls/shift/shift.c.html b/src/sys/classes/st/impls/shift/shift.c.html
index 4343181..61f4495 100644
--- a/src/sys/classes/st/impls/shift/shift.c.html
+++ b/src/sys/classes/st/impls/shift/shift.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/shift/shift.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:14+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/shift/shift.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/shift/shift.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">    Shift spectral transformation, applies (A + sigma I) as operator, or</font>
 <a name="line3">  3: </a><font color="#B22222">    inv(B)(A + sigma B) for generalized problems</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -84,7 +84,7 @@
 <a name="line87"> 87: </a>      MatShift(st->A[0],st->sigma);
 <a name="line88"> 88: </a>    }
 <a name="line89"> 89: </a>    st->Astate[0] = ((PetscObject)st->A[0])->state;
-<a name="line90"> 90: </a>    st->setupcalled = 0;
+<a name="line90"> 90: </a>    st->state = ST_STATE_INITIAL;
 <a name="line91"> 91: </a>  }
 <a name="line92"> 92: </a>  <font color="#4169E1">return</font>(0);
 <a name="line93"> 93: </a>}
@@ -104,38 +104,38 @@
 <a name="line111">111: </a>    <font color="#B22222">/* T[n] = A_n */</font>
 <a name="line112">112: </a>    k = nmat-1;
 <a name="line113">113: </a>    PetscObjectReference((PetscObject)st->A[k]);
-<a name="line114">114: </a>    st->T[k] = st->A[k];
-<a name="line115">115: </a>    <font color="#4169E1">for</font> (k=0;k<nmat-1;k++) {
-<a name="line116">116: </a>      STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,k,coeffs?coeffs+((nmat-k)*(nmat-k-1))/2:NULL,PETSC_TRUE,&st->T[k]);
-<a name="line117">117: </a>    }
-<a name="line118">118: </a>     <font color="#4169E1">if</font> (nmat>2) { PetscFree(coeffs); }
-<a name="line119">119: </a>  } <font color="#4169E1">else</font> {
-<a name="line120">120: </a>    <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
-<a name="line121">121: </a>      PetscObjectReference((PetscObject)st->A[k]);
-<a name="line122">122: </a>      st->T[k] = st->A[k];
-<a name="line123">123: </a>    }
-<a name="line124">124: </a>  }
-<a name="line125">125: </a>  <font color="#4169E1">if</font> (nmat>=2 && st->transform) {
-<a name="line126">126: </a>    st->P = st->T[nmat-1];
-<a name="line127">127: </a>    PetscObjectReference((PetscObject)st->P);
-<a name="line128">128: </a>  }
-<a name="line129">129: </a>  <font color="#4169E1">if</font> (st->P) {
-<a name="line130">130: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line131">131: </a>    STCheckFactorPackage(st);
-<a name="line132">132: </a>    KSPSetOperators(st->ksp,st->P,st->P);
-<a name="line133">133: </a>    KSPSetErrorIfNotConverged(st->ksp,PETSC_TRUE);
-<a name="line134">134: </a>    KSPSetUp(st->ksp);
-<a name="line135">135: </a>  }
-<a name="line136">136: </a>  <font color="#4169E1">return</font>(0);
-<a name="line137">137: </a>}
-
-<a name="line141">141: </a><strong><font color="#4169E1"><a name="STSetShift_Shift"></a>PetscErrorCode STSetShift_Shift(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
-<a name="line142">142: </a>{
-<a name="line144">144: </a>  PetscInt       k,nc,nmat=PetscMax(st->nmat,2);
-<a name="line145">145: </a>  PetscScalar    *coeffs=NULL;
-
-<a name="line148">148: </a>  <font color="#B22222">/* Nothing to be done if <a href="../../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a> has not been called yet */</font>
-<a name="line149">149: </a>  <font color="#4169E1">if</font> (!st->setupcalled) <font color="#4169E1">return</font>(0);
+<a name="line114">114: </a>    MatDestroy(&st->T[k]);
+<a name="line115">115: </a>    st->T[k] = st->A[k];
+<a name="line116">116: </a>    <font color="#4169E1">for</font> (k=0;k<nmat-1;k++) {
+<a name="line117">117: </a>      STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,k,coeffs?coeffs+((nmat-k)*(nmat-k-1))/2:NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[k]);
+<a name="line118">118: </a>    }
+<a name="line119">119: </a>     <font color="#4169E1">if</font> (nmat>2) { PetscFree(coeffs); }
+<a name="line120">120: </a>  } <font color="#4169E1">else</font> {
+<a name="line121">121: </a>    <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
+<a name="line122">122: </a>      PetscObjectReference((PetscObject)st->A[k]);
+<a name="line123">123: </a>      MatDestroy(&st->T[k]);
+<a name="line124">124: </a>      st->T[k] = st->A[k];
+<a name="line125">125: </a>    }
+<a name="line126">126: </a>  }
+<a name="line127">127: </a>  <font color="#4169E1">if</font> (nmat>=2 && st->transform) {
+<a name="line128">128: </a>    PetscObjectReference((PetscObject)st->T[nmat-1]);
+<a name="line129">129: </a>    MatDestroy(&st->P);
+<a name="line130">130: </a>    st->P = st->T[nmat-1];
+<a name="line131">131: </a>  }
+<a name="line132">132: </a>  <font color="#4169E1">if</font> (st->P) {
+<a name="line133">133: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line134">134: </a>    STCheckFactorPackage(st);
+<a name="line135">135: </a>    KSPSetOperators(st->ksp,st->P,st->P);
+<a name="line136">136: </a>    KSPSetErrorIfNotConverged(st->ksp,PETSC_TRUE);
+<a name="line137">137: </a>    KSPSetUp(st->ksp);
+<a name="line138">138: </a>  }
+<a name="line139">139: </a>  <font color="#4169E1">return</font>(0);
+<a name="line140">140: </a>}
+
+<a name="line144">144: </a><strong><font color="#4169E1"><a name="STSetShift_Shift"></a>PetscErrorCode STSetShift_Shift(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
+<a name="line145">145: </a>{
+<a name="line147">147: </a>  PetscInt       k,nc,nmat=PetscMax(st->nmat,2);
+<a name="line148">148: </a>  PetscScalar    *coeffs=NULL;
 
 <a name="line151">151: </a>  <font color="#4169E1">if</font> (st->transform) {
 <a name="line152">152: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
@@ -154,7 +154,7 @@
 <a name="line165">165: </a>  <font color="#4169E1">return</font>(0);
 <a name="line166">166: </a>}
 
-<a name="line170">170: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Shift"></a>PetscErrorCode STSetFromOptions_Shift(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line170">170: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Shift"></a>PetscErrorCode STSetFromOptions_Shift(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
 <a name="line171">171: </a>{
 <a name="line173">173: </a>  PC             pc;
 <a name="line174">174: </a>  PCType         pctype;
diff --git a/src/sys/classes/st/impls/sinvert/index.html b/src/sys/classes/st/impls/sinvert/index.html
index 8d6c01c..8912d62 100644
--- a/src/sys/classes/st/impls/sinvert/index.html
+++ b/src/sys/classes/st/impls/sinvert/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/sinvert/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/sinvert/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/impls/sinvert/makefile b/src/sys/classes/st/impls/sinvert/makefile
index e932d8c..8125cd4 100644
--- a/src/sys/classes/st/impls/sinvert/makefile
+++ b/src/sys/classes/st/impls/sinvert/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/impls/sinvert/makefile.html b/src/sys/classes/st/impls/sinvert/makefile.html
index eabd349..e2fab26 100644
--- a/src/sys/classes/st/impls/sinvert/makefile.html
+++ b/src/sys/classes/st/impls/sinvert/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/sinvert/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:15+00:00">
+<meta name="date" content="2016-05-16T10:32:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/sinvert/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/sinvert/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/impls/sinvert/sinvert.c b/src/sys/classes/st/impls/sinvert/sinvert.c
index 359f15a..65eb393 100644
--- a/src/sys/classes/st/impls/sinvert/sinvert.c
+++ b/src/sys/classes/st/impls/sinvert/sinvert.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -100,7 +100,7 @@ PetscErrorCode STPostSolve_Sinvert(ST st)
       ierr = MatShift(st->A[0],st->sigma);CHKERRQ(ierr);
     }
     st->Astate[0] = ((PetscObject)st->A[0])->state;
-    st->setupcalled = 0;
+    st->state = ST_STATE_INITIAL;
   }
   PetscFunctionReturn(0);
 }
@@ -126,16 +126,19 @@ PetscErrorCode STSetUp_Sinvert(ST st)
     /* T[0] = A_n */
     k = nmat-1;
     ierr = PetscObjectReference((PetscObject)st->A[k]);CHKERRQ(ierr);
+    ierr = MatDestroy(&st->T[0]);CHKERRQ(ierr);
     st->T[0] = st->A[k];
     for (k=1;k<nmat;k++) {
-      ierr = STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,nmat-k-1,coeffs?coeffs+(k*(k+1))/2:NULL,PETSC_TRUE,&st->T[k]);CHKERRQ(ierr);
+      ierr = STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,nmat-k-1,coeffs?coeffs+(k*(k+1))/2:NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[k]);CHKERRQ(ierr);
     }
     if (nmat>2) { ierr = PetscFree(coeffs);CHKERRQ(ierr); }
+    ierr = PetscObjectReference((PetscObject)st->T[nmat-1]);CHKERRQ(ierr);
+    ierr = MatDestroy(&st->P);CHKERRQ(ierr);
     st->P = st->T[nmat-1];
-    ierr = PetscObjectReference((PetscObject)st->P);CHKERRQ(ierr);
   } else {
     for (k=0;k<nmat;k++) {
       ierr = PetscObjectReference((PetscObject)st->A[k]);CHKERRQ(ierr);
+      ierr = MatDestroy(&st->T[k]);CHKERRQ(ierr);
       st->T[k] = st->A[k];
     }
   } 
@@ -158,8 +161,6 @@ PetscErrorCode STSetShift_Sinvert(ST st,PetscScalar newshift)
   PetscScalar    *coeffs=NULL;
 
   PetscFunctionBegin;
-  /* Nothing to be done if STSetUp has not been called yet */
-  if (!st->setupcalled) PetscFunctionReturn(0);
   if (st->transform) {
     if (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
       nc = (nmat*(nmat+1))/2;
@@ -189,7 +190,7 @@ PetscErrorCode STSetShift_Sinvert(ST st,PetscScalar newshift)
 
 #undef __FUNCT__
 #define __FUNCT__ "STSetFromOptions_Sinvert"
-PetscErrorCode STSetFromOptions_Sinvert(PetscOptions *PetscOptionsObject,ST st)
+PetscErrorCode STSetFromOptions_Sinvert(PetscOptionItems *PetscOptionsObject,ST st)
 {
   PetscErrorCode ierr;
   PC             pc;
diff --git a/src/sys/classes/st/impls/sinvert/sinvert.c.html b/src/sys/classes/st/impls/sinvert/sinvert.c.html
index 1bcfbcb..02cbb3a 100644
--- a/src/sys/classes/st/impls/sinvert/sinvert.c.html
+++ b/src/sys/classes/st/impls/sinvert/sinvert.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/impls/sinvert/sinvert.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:14+00:00">
+<meta name="date" content="2016-05-16T10:32:08+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/impls/sinvert/sinvert.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/impls/sinvert/sinvert.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      Implements the shift-and-invert technique for eigenvalue problems.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -97,7 +97,7 @@
 <a name="line100">100: </a>      MatShift(st->A[0],st->sigma);
 <a name="line101">101: </a>    }
 <a name="line102">102: </a>    st->Astate[0] = ((PetscObject)st->A[0])->state;
-<a name="line103">103: </a>    st->setupcalled = 0;
+<a name="line103">103: </a>    st->state = ST_STATE_INITIAL;
 <a name="line104">104: </a>  }
 <a name="line105">105: </a>  <font color="#4169E1">return</font>(0);
 <a name="line106">106: </a>}
@@ -119,100 +119,101 @@
 <a name="line126">126: </a>    <font color="#B22222">/* T[0] = A_n */</font>
 <a name="line127">127: </a>    k = nmat-1;
 <a name="line128">128: </a>    PetscObjectReference((PetscObject)st->A[k]);
-<a name="line129">129: </a>    st->T[0] = st->A[k];
-<a name="line130">130: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line131">131: </a>      STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,nmat-k-1,coeffs?coeffs+(k*(k+1))/2:NULL,PETSC_TRUE,&st->T[k]);
-<a name="line132">132: </a>    }
-<a name="line133">133: </a>    <font color="#4169E1">if</font> (nmat>2) { PetscFree(coeffs); }
-<a name="line134">134: </a>    st->P = st->T[nmat-1];
-<a name="line135">135: </a>    PetscObjectReference((PetscObject)st->P);
-<a name="line136">136: </a>  } <font color="#4169E1">else</font> {
-<a name="line137">137: </a>    <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
-<a name="line138">138: </a>      PetscObjectReference((PetscObject)st->A[k]);
-<a name="line139">139: </a>      st->T[k] = st->A[k];
-<a name="line140">140: </a>    }
-<a name="line141">141: </a>  } 
-<a name="line142">142: </a>  <font color="#4169E1">if</font> (st->P) {
-<a name="line143">143: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line144">144: </a>    STCheckFactorPackage(st);
-<a name="line145">145: </a>    KSPSetOperators(st->ksp,st->P,st->P);
-<a name="line146">146: </a>    KSPSetErrorIfNotConverged(st->ksp,PETSC_TRUE);
-<a name="line147">147: </a>    KSPSetUp(st->ksp);
-<a name="line148">148: </a>  }
-<a name="line149">149: </a>  <font color="#4169E1">return</font>(0);
-<a name="line150">150: </a>}
-
-<a name="line154">154: </a><strong><font color="#4169E1"><a name="STSetShift_Sinvert"></a>PetscErrorCode STSetShift_Sinvert(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
-<a name="line155">155: </a>{
-<a name="line157">157: </a>  PetscInt       nmat=PetscMax(st->nmat,2),k,nc;
-<a name="line158">158: </a>  PetscScalar    *coeffs=NULL;
-
-<a name="line161">161: </a>  <font color="#B22222">/* Nothing to be done if <a href="../../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a> has not been called yet */</font>
-<a name="line162">162: </a>  <font color="#4169E1">if</font> (!st->setupcalled) <font color="#4169E1">return</font>(0);
-<a name="line163">163: </a>  <font color="#4169E1">if</font> (st->transform) {
-<a name="line164">164: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
-<a name="line165">165: </a>      nc = (nmat*(nmat+1))/2;
-<a name="line166">166: </a>      PetscMalloc(nc*<font color="#4169E1">sizeof</font>(PetscScalar),&coeffs);
-<a name="line167">167: </a>      <font color="#B22222">/* Compute coeffs */</font>
-<a name="line168">168: </a>      STCoeffs_Monomial(st,coeffs);
-<a name="line169">169: </a>    }
-<a name="line170">170: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
-<a name="line171">171: </a>      STMatMAXPY_Private(st,nmat>2?newshift:-newshift,nmat>2?st->sigma:-st->sigma,nmat-k-1,coeffs?coeffs+(k*(k+1))/2:NULL,PETSC_FALSE,&st->T[k]);
-<a name="line172">172: </a>    }
-<a name="line173">173: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
-<a name="line174">174: </a>      PetscFree(coeffs);
-<a name="line175">175: </a>    }
-<a name="line176">176: </a>    <font color="#4169E1">if</font> (st->P!=st->T[nmat-1]) {
-<a name="line177">177: </a>      MatDestroy(&st->P);
-<a name="line178">178: </a>      st->P = st->T[nmat-1];
-<a name="line179">179: </a>      PetscObjectReference((PetscObject)st->P);
-<a name="line180">180: </a>    }
-<a name="line181">181: </a>  }
-<a name="line182">182: </a>  <font color="#4169E1">if</font> (st->P) {
-<a name="line183">183: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line184">184: </a>    KSPSetOperators(st->ksp,st->P,st->P);
-<a name="line185">185: </a>    KSPSetUp(st->ksp);
-<a name="line186">186: </a>  }
-<a name="line187">187: </a>  <font color="#4169E1">return</font>(0);
-<a name="line188">188: </a>}
-
-<a name="line192">192: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Sinvert"></a>PetscErrorCode STSetFromOptions_Sinvert(PetscOptions *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line193">193: </a>{
-<a name="line195">195: </a>  PC             pc;
-<a name="line196">196: </a>  PCType         pctype;
-<a name="line197">197: </a>  KSPType        ksptype;
-
-<a name="line200">200: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line201">201: </a>  KSPGetPC(st->ksp,&pc);
-<a name="line202">202: </a>  KSPGetType(st->ksp,&ksptype);
-<a name="line203">203: </a>  PCGetType(pc,&pctype);
-<a name="line204">204: </a>  <font color="#4169E1">if</font> (!pctype && !ksptype) {
-<a name="line205">205: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_SHELL) {
-<a name="line206">206: </a>      <font color="#B22222">/* in shell mode use GMRES with Jacobi as the default */</font>
-<a name="line207">207: </a>      KSPSetType(st->ksp,KSPGMRES);
-<a name="line208">208: </a>      PCSetType(pc,PCJACOBI);
-<a name="line209">209: </a>    } <font color="#4169E1">else</font> {
-<a name="line210">210: </a>      <font color="#B22222">/* use direct solver as default */</font>
-<a name="line211">211: </a>      KSPSetType(st->ksp,KSPPREONLY);
-<a name="line212">212: </a>      PCSetType(pc,PCLU);
-<a name="line213">213: </a>    }
-<a name="line214">214: </a>  }
-<a name="line215">215: </a>  <font color="#4169E1">return</font>(0);
-<a name="line216">216: </a>}
-
-<a name="line220">220: </a><strong><font color="#4169E1"><a name="STCreate_Sinvert"></a>PETSC_EXTERN PetscErrorCode STCreate_Sinvert(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line221">221: </a>{
-<a name="line223">223: </a>  st->ops->apply           = STApply_Sinvert;
-<a name="line224">224: </a>  st->ops->getbilinearform = STGetBilinearForm_Default;
-<a name="line225">225: </a>  st->ops->applytrans      = STApplyTranspose_Sinvert;
-<a name="line226">226: </a>  st->ops->postsolve       = STPostSolve_Sinvert;
-<a name="line227">227: </a>  st->ops->backtransform   = STBackTransform_Sinvert;
-<a name="line228">228: </a>  st->ops->setup           = STSetUp_Sinvert;
-<a name="line229">229: </a>  st->ops->setshift        = STSetShift_Sinvert;
-<a name="line230">230: </a>  st->ops->setfromoptions  = STSetFromOptions_Sinvert;
-<a name="line231">231: </a>  st->ops->checknullspace  = STCheckNullSpace_Default;
-<a name="line232">232: </a>  <font color="#4169E1">return</font>(0);
-<a name="line233">233: </a>}
+<a name="line129">129: </a>    MatDestroy(&st->T[0]);
+<a name="line130">130: </a>    st->T[0] = st->A[k];
+<a name="line131">131: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line132">132: </a>      STMatMAXPY_Private(st,nmat>2?st->sigma:-st->sigma,0.0,nmat-k-1,coeffs?coeffs+(k*(k+1))/2:NULL,PetscNot(st->state==ST_STATE_UPDATED),&st->T[k]);
+<a name="line133">133: </a>    }
+<a name="line134">134: </a>    <font color="#4169E1">if</font> (nmat>2) { PetscFree(coeffs); }
+<a name="line135">135: </a>    PetscObjectReference((PetscObject)st->T[nmat-1]);
+<a name="line136">136: </a>    MatDestroy(&st->P);
+<a name="line137">137: </a>    st->P = st->T[nmat-1];
+<a name="line138">138: </a>  } <font color="#4169E1">else</font> {
+<a name="line139">139: </a>    <font color="#4169E1">for</font> (k=0;k<nmat;k++) {
+<a name="line140">140: </a>      PetscObjectReference((PetscObject)st->A[k]);
+<a name="line141">141: </a>      MatDestroy(&st->T[k]);
+<a name="line142">142: </a>      st->T[k] = st->A[k];
+<a name="line143">143: </a>    }
+<a name="line144">144: </a>  } 
+<a name="line145">145: </a>  <font color="#4169E1">if</font> (st->P) {
+<a name="line146">146: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line147">147: </a>    STCheckFactorPackage(st);
+<a name="line148">148: </a>    KSPSetOperators(st->ksp,st->P,st->P);
+<a name="line149">149: </a>    KSPSetErrorIfNotConverged(st->ksp,PETSC_TRUE);
+<a name="line150">150: </a>    KSPSetUp(st->ksp);
+<a name="line151">151: </a>  }
+<a name="line152">152: </a>  <font color="#4169E1">return</font>(0);
+<a name="line153">153: </a>}
+
+<a name="line157">157: </a><strong><font color="#4169E1"><a name="STSetShift_Sinvert"></a>PetscErrorCode STSetShift_Sinvert(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar newshift)</font></strong>
+<a name="line158">158: </a>{
+<a name="line160">160: </a>  PetscInt       nmat=PetscMax(st->nmat,2),k,nc;
+<a name="line161">161: </a>  PetscScalar    *coeffs=NULL;
+
+<a name="line164">164: </a>  <font color="#4169E1">if</font> (st->transform) {
+<a name="line165">165: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
+<a name="line166">166: </a>      nc = (nmat*(nmat+1))/2;
+<a name="line167">167: </a>      PetscMalloc(nc*<font color="#4169E1">sizeof</font>(PetscScalar),&coeffs);
+<a name="line168">168: </a>      <font color="#B22222">/* Compute coeffs */</font>
+<a name="line169">169: </a>      STCoeffs_Monomial(st,coeffs);
+<a name="line170">170: </a>    }
+<a name="line171">171: </a>    <font color="#4169E1">for</font> (k=1;k<nmat;k++) {
+<a name="line172">172: </a>      STMatMAXPY_Private(st,nmat>2?newshift:-newshift,nmat>2?st->sigma:-st->sigma,nmat-k-1,coeffs?coeffs+(k*(k+1))/2:NULL,PETSC_FALSE,&st->T[k]);
+<a name="line173">173: </a>    }
+<a name="line174">174: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_COPY && nmat>2) {
+<a name="line175">175: </a>      PetscFree(coeffs);
+<a name="line176">176: </a>    }
+<a name="line177">177: </a>    <font color="#4169E1">if</font> (st->P!=st->T[nmat-1]) {
+<a name="line178">178: </a>      MatDestroy(&st->P);
+<a name="line179">179: </a>      st->P = st->T[nmat-1];
+<a name="line180">180: </a>      PetscObjectReference((PetscObject)st->P);
+<a name="line181">181: </a>    }
+<a name="line182">182: </a>  }
+<a name="line183">183: </a>  <font color="#4169E1">if</font> (st->P) {
+<a name="line184">184: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line185">185: </a>    KSPSetOperators(st->ksp,st->P,st->P);
+<a name="line186">186: </a>    KSPSetUp(st->ksp);
+<a name="line187">187: </a>  }
+<a name="line188">188: </a>  <font color="#4169E1">return</font>(0);
+<a name="line189">189: </a>}
+
+<a name="line193">193: </a><strong><font color="#4169E1"><a name="STSetFromOptions_Sinvert"></a>PetscErrorCode STSetFromOptions_Sinvert(PetscOptionItems *PetscOptionsObject,<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line194">194: </a>{
+<a name="line196">196: </a>  PC             pc;
+<a name="line197">197: </a>  PCType         pctype;
+<a name="line198">198: </a>  KSPType        ksptype;
+
+<a name="line201">201: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line202">202: </a>  KSPGetPC(st->ksp,&pc);
+<a name="line203">203: </a>  KSPGetType(st->ksp,&ksptype);
+<a name="line204">204: </a>  PCGetType(pc,&pctype);
+<a name="line205">205: </a>  <font color="#4169E1">if</font> (!pctype && !ksptype) {
+<a name="line206">206: </a>    <font color="#4169E1">if</font> (st->shift_matrix == ST_MATMODE_SHELL) {
+<a name="line207">207: </a>      <font color="#B22222">/* in shell mode use GMRES with Jacobi as the default */</font>
+<a name="line208">208: </a>      KSPSetType(st->ksp,KSPGMRES);
+<a name="line209">209: </a>      PCSetType(pc,PCJACOBI);
+<a name="line210">210: </a>    } <font color="#4169E1">else</font> {
+<a name="line211">211: </a>      <font color="#B22222">/* use direct solver as default */</font>
+<a name="line212">212: </a>      KSPSetType(st->ksp,KSPPREONLY);
+<a name="line213">213: </a>      PCSetType(pc,PCLU);
+<a name="line214">214: </a>    }
+<a name="line215">215: </a>  }
+<a name="line216">216: </a>  <font color="#4169E1">return</font>(0);
+<a name="line217">217: </a>}
+
+<a name="line221">221: </a><strong><font color="#4169E1"><a name="STCreate_Sinvert"></a>PETSC_EXTERN PetscErrorCode STCreate_Sinvert(<a href="../../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line222">222: </a>{
+<a name="line224">224: </a>  st->ops->apply           = STApply_Sinvert;
+<a name="line225">225: </a>  st->ops->getbilinearform = STGetBilinearForm_Default;
+<a name="line226">226: </a>  st->ops->applytrans      = STApplyTranspose_Sinvert;
+<a name="line227">227: </a>  st->ops->postsolve       = STPostSolve_Sinvert;
+<a name="line228">228: </a>  st->ops->backtransform   = STBackTransform_Sinvert;
+<a name="line229">229: </a>  st->ops->setup           = STSetUp_Sinvert;
+<a name="line230">230: </a>  st->ops->setshift        = STSetShift_Sinvert;
+<a name="line231">231: </a>  st->ops->setfromoptions  = STSetFromOptions_Sinvert;
+<a name="line232">232: </a>  st->ops->checknullspace  = STCheckNullSpace_Default;
+<a name="line233">233: </a>  <font color="#4169E1">return</font>(0);
+<a name="line234">234: </a>}
 </pre>
 </body>
 
diff --git a/src/sys/classes/st/index.html b/src/sys/classes/st/index.html
index 4013ccd..e9004f1 100644
--- a/src/sys/classes/st/index.html
+++ b/src/sys/classes/st/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/interface/ftn-custom/makefile b/src/sys/classes/st/interface/ftn-custom/makefile
index 2564a37..0684a0e 100644
--- a/src/sys/classes/st/interface/ftn-custom/makefile
+++ b/src/sys/classes/st/interface/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/interface/ftn-custom/zstf.c b/src/sys/classes/st/interface/ftn-custom/zstf.c
index 62fb471..5168f6f 100644
--- a/src/sys/classes/st/interface/ftn-custom/zstf.c
+++ b/src/sys/classes/st/interface/ftn-custom/zstf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/st/interface/index.html b/src/sys/classes/st/interface/index.html
index 13ba450..c38c5b9 100644
--- a/src/sys/classes/st/interface/index.html
+++ b/src/sys/classes/st/interface/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>Spectral Transformation - ST</h2>
 
diff --git a/src/sys/classes/st/interface/makefile b/src/sys/classes/st/interface/makefile
index b8539b3..1e03043 100644
--- a/src/sys/classes/st/interface/makefile
+++ b/src/sys/classes/st/interface/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/interface/makefile.html b/src/sys/classes/st/interface/makefile.html
index bbb4353..55d7399 100644
--- a/src/sys/classes/st/interface/makefile.html
+++ b/src/sys/classes/st/interface/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:13+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/classes/st/interface/stfunc.c b/src/sys/classes/st/interface/stfunc.c
index 799e288..ad3eee3 100644
--- a/src/sys/classes/st/interface/stfunc.c
+++ b/src/sys/classes/st/interface/stfunc.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -83,7 +83,7 @@ PetscErrorCode STInitializePackage(void)
   ierr = PetscLogEventRegister("STMatSolve",ST_CLASSID,&ST_MatSolve);CHKERRQ(ierr);
   ierr = PetscLogEventRegister("STMatSolveTranspose",ST_CLASSID,&ST_MatSolveTranspose);CHKERRQ(ierr);
   /* Process info exclusions */
-  ierr = PetscOptionsGetString(NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"st",&className);CHKERRQ(ierr);
     if (className) {
@@ -91,7 +91,7 @@ PetscErrorCode STInitializePackage(void)
     }
   }
   /* Process summary exclusions */
-  ierr = PetscOptionsGetString(NULL,"-log_summary_exclude",logList,256,&opt);CHKERRQ(ierr);
+  ierr = PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);CHKERRQ(ierr);
   if (opt) {
     ierr = PetscStrstr(logList,"st",&className);CHKERRQ(ierr);
     if (className) {
@@ -127,7 +127,7 @@ PetscErrorCode STReset(ST st)
   ierr = MatDestroyMatrices(PetscMax(2,st->nmat),&st->T);CHKERRQ(ierr);
   ierr = VecDestroy(&st->w);CHKERRQ(ierr);
   ierr = VecDestroy(&st->wb);CHKERRQ(ierr);
-  st->setupcalled = 0;
+  st->state = ST_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
@@ -209,7 +209,7 @@ PetscErrorCode STCreate(MPI_Comm comm,ST *newst)
   st->D            = NULL;
   st->wb           = NULL;
   st->data         = NULL;
-  st->setupcalled  = 0;
+  st->state        = ST_STATE_INITIAL;
 
   *newst = st;
   PetscFunctionReturn(0);
@@ -239,6 +239,7 @@ PetscErrorCode STSetOperators(ST st,PetscInt n,Mat A[])
 {
   PetscInt       i;
   PetscErrorCode ierr;
+  PetscBool      same=PETSC_TRUE;
 
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
@@ -246,16 +247,25 @@ PetscErrorCode STSetOperators(ST st,PetscInt n,Mat A[])
   if (n <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Must have one or more matrices, you have %D",n);
   PetscValidPointer(A,3);
   PetscCheckSameComm(st,1,*A,3);
-  if (st->setupcalled) { ierr = STReset(st);CHKERRQ(ierr); }
-  ierr = MatDestroyMatrices(PetscMax(2,st->nmat),&st->A);CHKERRQ(ierr);
-  ierr = PetscMalloc(PetscMax(2,n)*sizeof(Mat),&st->A);CHKERRQ(ierr);
-  ierr = PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*sizeof(Mat));CHKERRQ(ierr);
-  ierr = PetscFree(st->Astate);CHKERRQ(ierr);
-  ierr = PetscMalloc(PetscMax(2,n)*sizeof(PetscObjectState),&st->Astate);CHKERRQ(ierr);
-  ierr = PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*sizeof(PetscInt));CHKERRQ(ierr);
+  if (st->state) {
+    if (n!=st->nmat) same = PETSC_FALSE;
+    for (i=0;same&&i<n;i++) {
+      if (A[i]!=st->A[i]) same = PETSC_FALSE;
+    }
+    if (!same) { ierr = STReset(st);CHKERRQ(ierr); }
+  } else same = PETSC_FALSE;
+  if (!same) {
+    ierr = MatDestroyMatrices(PetscMax(2,st->nmat),&st->A);CHKERRQ(ierr);
+    ierr = PetscCalloc1(PetscMax(2,n),&st->A);CHKERRQ(ierr);
+    ierr = PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*sizeof(Mat));CHKERRQ(ierr);
+    ierr = PetscFree(st->Astate);CHKERRQ(ierr);
+    ierr = PetscMalloc(PetscMax(2,n)*sizeof(PetscObjectState),&st->Astate);CHKERRQ(ierr);
+    ierr = PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*sizeof(PetscInt));CHKERRQ(ierr);
+  }
   for (i=0;i<n;i++) {
     PetscValidHeaderSpecific(A[i],MAT_CLASSID,3);
     ierr = PetscObjectReference((PetscObject)A[i]);CHKERRQ(ierr);
+    ierr = MatDestroy(&st->A[i]);CHKERRQ(ierr);
     st->A[i] = A[i];
     st->Astate[i] = ((PetscObject)A[i])->state;
   }
@@ -264,6 +274,8 @@ PetscErrorCode STSetOperators(ST st,PetscInt n,Mat A[])
     st->Astate[1] = 0;
   }
   st->nmat = n;
+  if (same) st->state = ST_STATE_UPDATED;
+  else st->state = ST_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
@@ -292,7 +304,7 @@ PetscErrorCode STGetOperators(ST st,PetscInt k,Mat *A)
   PetscValidLogicalCollectiveInt(st,k,2);
   PetscValidPointer(A,3);
   STCheckMatrices(st,1);
-  if (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",st->nmat-1);
+  if (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",st->nmat-1);
   if (((PetscObject)st->A[k])->state!=st->Astate[k]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Cannot retrieve original matrices (have been modified)");
   *A = st->A[k];
   PetscFunctionReturn(0);
@@ -323,7 +335,7 @@ PetscErrorCode STGetTOperators(ST st,PetscInt k,Mat *T)
   PetscValidLogicalCollectiveInt(st,k,2);
   PetscValidPointer(T,3);
   STCheckMatrices(st,1);
-  if (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",st->nmat-1);
+  if (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",st->nmat-1);
   if (!st->T) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_POINTER,"There are no transformed matrices");
   *T = st->T[k];
   PetscFunctionReturn(0);
@@ -384,7 +396,7 @@ PetscErrorCode STSetShift(ST st,PetscScalar shift)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   PetscValidLogicalCollectiveScalar(st,shift,2);
-  if (st->sigma != shift) {
+  if (st->state==ST_STATE_SETUP && st->sigma != shift) {
     if (st->ops->setshift) {
       ierr = (*st->ops->setshift)(st,shift);CHKERRQ(ierr);
     }
@@ -505,7 +517,7 @@ PetscErrorCode STSetBalanceMatrix(ST st,Vec D)
   ierr = PetscObjectReference((PetscObject)D);CHKERRQ(ierr);
   ierr = VecDestroy(&st->D);CHKERRQ(ierr);
   st->D = D;
-  st->setupcalled = 0;
+  st->state = ST_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
@@ -698,7 +710,8 @@ PetscErrorCode STAppendOptionsPrefix(ST st,const char *prefix)
    Output Parameters:
 .  prefix - pointer to the prefix string used, is returned
 
-   Notes: On the Fortran side, the user should pass in a string 'prefix' of
+   Note:
+   On the Fortran side, the user should pass in a string 'prefix' of
    sufficient length to hold the prefix.
 
    Level: advanced
diff --git a/src/sys/classes/st/interface/stfunc.c.html b/src/sys/classes/st/interface/stfunc.c.html
index 67ee154..7269d34 100644
--- a/src/sys/classes/st/interface/stfunc.c.html
+++ b/src/sys/classes/st/interface/stfunc.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/stfunc.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:09+00:00">
+<meta name="date" content="2016-05-16T10:32:03+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/stfunc.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/stfunc.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">    The <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> (spectral transformation) interface routines, callable by users.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -87,7 +87,7 @@
 <a name="line83"> 83: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>"</font>,ST_CLASSID,&ST_MatSolve);
 <a name="line84"> 84: </a>  PetscLogEventRegister(<font color="#666666">"<a href="../../../../../docs/manualpages/ST/STMatSolveTranspose.html#STMatSolveTranspose">STMatSolveTranspose</a>"</font>,ST_CLASSID,&ST_MatSolveTranspose);
 <a name="line85"> 85: </a>  <font color="#B22222">/* Process info exclusions */</font>
-<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
+<a name="line86"> 86: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-info_exclude"</font>,logList,256,&opt);
 <a name="line87"> 87: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line88"> 88: </a>    PetscStrstr(logList,<font color="#666666">"st"</font>,&className);
 <a name="line89"> 89: </a>    <font color="#4169E1">if</font> (className) {
@@ -95,7 +95,7 @@
 <a name="line91"> 91: </a>    }
 <a name="line92"> 92: </a>  }
 <a name="line93"> 93: </a>  <font color="#B22222">/* Process summary exclusions */</font>
-<a name="line94"> 94: </a>  PetscOptionsGetString(NULL,<font color="#666666">"-log_summary_exclude"</font>,logList,256,&opt);
+<a name="line94"> 94: </a>  PetscOptionsGetString(NULL,NULL,<font color="#666666">"-log_exclude"</font>,logList,256,&opt);
 <a name="line95"> 95: </a>  <font color="#4169E1">if</font> (opt) {
 <a name="line96"> 96: </a>    PetscStrstr(logList,<font color="#666666">"st"</font>,&className);
 <a name="line97"> 97: </a>    <font color="#4169E1">if</font> (className) {
@@ -126,7 +126,7 @@
 <a name="line127">127: </a>  MatDestroyMatrices(PetscMax(2,st->nmat),&st->T);
 <a name="line128">128: </a>  VecDestroy(&st->w);
 <a name="line129">129: </a>  VecDestroy(&st->wb);
-<a name="line130">130: </a>  st->setupcalled = 0;
+<a name="line130">130: </a>  st->state = ST_STATE_INITIAL;
 <a name="line131">131: </a>  <font color="#4169E1">return</font>(0);
 <a name="line132">132: </a>}
 
@@ -198,7 +198,7 @@
 <a name="line209">209: </a>  st->D            = NULL;
 <a name="line210">210: </a>  st->wb           = NULL;
 <a name="line211">211: </a>  st->data         = NULL;
-<a name="line212">212: </a>  st->setupcalled  = 0;
+<a name="line212">212: </a>  st->state        = ST_STATE_INITIAL;
 
 <a name="line214">214: </a>  *newst = st;
 <a name="line215">215: </a>  <font color="#4169E1">return</font>(0);
@@ -225,514 +225,527 @@
 <a name="line238">238: </a><strong><font color="#4169E1"><a name="STSetOperators"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt n,Mat A[])</font></strong>
 <a name="line239">239: </a>{
 <a name="line240">240: </a>  PetscInt       i;
+<a name="line242">242: </a>  PetscBool      same=PETSC_TRUE;
+
+<a name="line247">247: </a>  <font color="#4169E1">if</font> (n <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Must have one or more matrices, you have %D"</font>,n);
+<a name="line250">250: </a>  <font color="#4169E1">if</font> (st->state) {
+<a name="line251">251: </a>    <font color="#4169E1">if</font> (n!=st->nmat) same = PETSC_FALSE;
+<a name="line252">252: </a>    <font color="#4169E1">for</font> (i=0;same&&i<n;i++) {
+<a name="line253">253: </a>      <font color="#4169E1">if</font> (A[i]!=st->A[i]) same = PETSC_FALSE;
+<a name="line254">254: </a>    }
+<a name="line255">255: </a>    <font color="#4169E1">if</font> (!same) { <a href="../../../../../docs/manualpages/ST/STReset.html#STReset">STReset</a>(st); }
+<a name="line256">256: </a>  } <font color="#4169E1">else</font> same = PETSC_FALSE;
+<a name="line257">257: </a>  <font color="#4169E1">if</font> (!same) {
+<a name="line258">258: </a>    MatDestroyMatrices(PetscMax(2,st->nmat),&st->A);
+<a name="line259">259: </a>    PetscCalloc1(PetscMax(2,n),&st->A);
+<a name="line260">260: </a>    PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*<font color="#4169E1">sizeof</font>(Mat));
+<a name="line261">261: </a>    PetscFree(st->Astate);
+<a name="line262">262: </a>    PetscMalloc(PetscMax(2,n)*<font color="#4169E1">sizeof</font>(PetscObjectState),&st->Astate);
+<a name="line263">263: </a>    PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*<font color="#4169E1">sizeof</font>(PetscInt));
+<a name="line264">264: </a>  }
+<a name="line265">265: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line267">267: </a>    PetscObjectReference((PetscObject)A[i]);
+<a name="line268">268: </a>    MatDestroy(&st->A[i]);
+<a name="line269">269: </a>    st->A[i] = A[i];
+<a name="line270">270: </a>    st->Astate[i] = ((PetscObject)A[i])->state;
+<a name="line271">271: </a>  }
+<a name="line272">272: </a>  <font color="#4169E1">if</font> (n==1) {
+<a name="line273">273: </a>    st->A[1] = NULL;
+<a name="line274">274: </a>    st->Astate[1] = 0;
+<a name="line275">275: </a>  }
+<a name="line276">276: </a>  st->nmat = n;
+<a name="line277">277: </a>  <font color="#4169E1">if</font> (same) st->state = ST_STATE_UPDATED;
+<a name="line278">278: </a>  <font color="#4169E1">else</font> st->state = ST_STATE_INITIAL;
+<a name="line279">279: </a>  <font color="#4169E1">return</font>(0);
+<a name="line280">280: </a>}
+
+<a name="line284">284: </a><font color="#B22222">/*@</font>
+<a name="line285">285: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a> - Gets the matrices associated with the original eigensystem.</font>
+
+<a name="line287">287: </a><font color="#B22222">   Not collective, though parallel Mats are returned if the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> is parallel</font>
+
+<a name="line289">289: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line290">290: </a><font color="#B22222">+  st - the spectral transformation context</font>
+<a name="line291">291: </a><font color="#B22222">-  k  - the index of the requested matrix (starting in 0)</font>
+
+<a name="line293">293: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line294">294: </a><font color="#B22222">.  A - the requested matrix</font>
+
+<a name="line296">296: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line298">298: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(), <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>()</font>
+<a name="line299">299: </a><font color="#B22222">@*/</font>
+<a name="line300">300: </a><strong><font color="#4169E1"><a name="STGetOperators"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt k,Mat *A)</font></strong>
+<a name="line301">301: </a>{
+<a name="line306">306: </a>  STCheckMatrices(st,1);
+<a name="line307">307: </a>  <font color="#4169E1">if</font> (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,st->nmat-1);
+<a name="line308">308: </a>  <font color="#4169E1">if</font> (((PetscObject)st->A[k])->state!=st->Astate[k]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot retrieve original matrices (have been modified)"</font>);
+<a name="line309">309: </a>  *A = st->A[k];
+<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
+<a name="line311">311: </a>}
+
+<a name="line315">315: </a><font color="#B22222">/*@</font>
+<a name="line316">316: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a> - Gets the matrices associated with the transformed eigensystem.</font>
+
+<a name="line318">318: </a><font color="#B22222">   Not collective, though parallel Mats are returned if the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> is parallel</font>
+
+<a name="line320">320: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line321">321: </a><font color="#B22222">+  st - the spectral transformation context</font>
+<a name="line322">322: </a><font color="#B22222">-  k  - the index of the requested matrix (starting in 0)</font>
+
+<a name="line324">324: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line325">325: </a><font color="#B22222">.  T - the requested matrix</font>
+
+<a name="line327">327: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line329">329: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(), <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>()</font>
+<a name="line330">330: </a><font color="#B22222">@*/</font>
+<a name="line331">331: </a><strong><font color="#4169E1"><a name="STGetTOperators"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt k,Mat *T)</font></strong>
+<a name="line332">332: </a>{
+<a name="line337">337: </a>  STCheckMatrices(st,1);
+<a name="line338">338: </a>  <font color="#4169E1">if</font> (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,st->nmat-1);
+<a name="line339">339: </a>  <font color="#4169E1">if</font> (!st->T) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_POINTER,<font color="#666666">"There are no transformed matrices"</font>);
+<a name="line340">340: </a>  *T = st->T[k];
+<a name="line341">341: </a>  <font color="#4169E1">return</font>(0);
+<a name="line342">342: </a>}
+
+<a name="line346">346: </a><font color="#B22222">/*@</font>
+<a name="line347">347: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a> - Returns the number of matrices stored in the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>.</font>
+
+<a name="line349">349: </a><font color="#B22222">   Not collective</font>
+
+<a name="line351">351: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line352">352: </a><font color="#B22222">.  st - the spectral transformation context</font>
+
+<a name="line354">354: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line355">355: </a><font color="#B22222">.  n - the number of matrices passed in <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>()</font>
+
+<a name="line357">357: </a><font color="#B22222">   Level: intermediate</font>
+
+<a name="line359">359: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>()</font>
+<a name="line360">360: </a><font color="#B22222">@*/</font>
+<a name="line361">361: </a><strong><font color="#4169E1"><a name="STGetNumMatrices"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt *n)</font></strong>
+<a name="line362">362: </a>{
+<a name="line366">366: </a>  *n = st->nmat;
+<a name="line367">367: </a>  <font color="#4169E1">return</font>(0);
+<a name="line368">368: </a>}
+
+<a name="line372">372: </a><font color="#B22222">/*@</font>
+<a name="line373">373: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a> - Sets the shift associated with the spectral transformation.</font>
+
+<a name="line375">375: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line377">377: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line378">378: </a><font color="#B22222">+  st - the spectral transformation context</font>
+<a name="line379">379: </a><font color="#B22222">-  shift - the value of the shift</font>
+
+<a name="line381">381: </a><font color="#B22222">   Notes:</font>
+<a name="line382">382: </a><font color="#B22222">   In some spectral transformations, changing the shift may have associated</font>
+<a name="line383">383: </a><font color="#B22222">   a lot of work, for example recomputing a factorization.</font>
+
+<a name="line385">385: </a><font color="#B22222">   This function is normally not directly called by users, since the shift is</font>
+<a name="line386">386: </a><font color="#B22222">   indirectly set by <a href="../../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>().</font>
 
-<a name="line246">246: </a>  <font color="#4169E1">if</font> (n <= 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"Must have one or more matrices, you have %D"</font>,n);
-<a name="line249">249: </a>  <font color="#4169E1">if</font> (st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STReset.html#STReset">STReset</a>(st); }
-<a name="line250">250: </a>  MatDestroyMatrices(PetscMax(2,st->nmat),&st->A);
-<a name="line251">251: </a>  PetscMalloc(PetscMax(2,n)*<font color="#4169E1">sizeof</font>(Mat),&st->A);
-<a name="line252">252: </a>  PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*<font color="#4169E1">sizeof</font>(Mat));
-<a name="line253">253: </a>  PetscFree(st->Astate);
-<a name="line254">254: </a>  PetscMalloc(PetscMax(2,n)*<font color="#4169E1">sizeof</font>(PetscObjectState),&st->Astate);
-<a name="line255">255: </a>  PetscLogObjectMemory((PetscObject)st,PetscMax(2,n)*<font color="#4169E1">sizeof</font>(PetscInt));
-<a name="line256">256: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line258">258: </a>    PetscObjectReference((PetscObject)A[i]);
-<a name="line259">259: </a>    st->A[i] = A[i];
-<a name="line260">260: </a>    st->Astate[i] = ((PetscObject)A[i])->state;
-<a name="line261">261: </a>  }
-<a name="line262">262: </a>  <font color="#4169E1">if</font> (n==1) {
-<a name="line263">263: </a>    st->A[1] = NULL;
-<a name="line264">264: </a>    st->Astate[1] = 0;
-<a name="line265">265: </a>  }
-<a name="line266">266: </a>  st->nmat = n;
-<a name="line267">267: </a>  <font color="#4169E1">return</font>(0);
-<a name="line268">268: </a>}
-
-<a name="line272">272: </a><font color="#B22222">/*@</font>
-<a name="line273">273: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a> - Gets the matrices associated with the original eigensystem.</font>
-
-<a name="line275">275: </a><font color="#B22222">   Not collective, though parallel Mats are returned if the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> is parallel</font>
-
-<a name="line277">277: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line278">278: </a><font color="#B22222">+  st - the spectral transformation context</font>
-<a name="line279">279: </a><font color="#B22222">-  k  - the index of the requested matrix (starting in 0)</font>
-
-<a name="line281">281: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line282">282: </a><font color="#B22222">.  A - the requested matrix</font>
-
-<a name="line284">284: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line286">286: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>(), <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>()</font>
-<a name="line287">287: </a><font color="#B22222">@*/</font>
-<a name="line288">288: </a><strong><font color="#4169E1"><a name="STGetOperators"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt k,Mat *A)</font></strong>
-<a name="line289">289: </a>{
-<a name="line294">294: </a>  STCheckMatrices(st,1);
-<a name="line295">295: </a>  <font color="#4169E1">if</font> (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,st->nmat-1);
-<a name="line296">296: </a>  <font color="#4169E1">if</font> (((PetscObject)st->A[k])->state!=st->Astate[k]) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,<font color="#666666">"Cannot retrieve original matrices (have been modified)"</font>);
-<a name="line297">297: </a>  *A = st->A[k];
-<a name="line298">298: </a>  <font color="#4169E1">return</font>(0);
-<a name="line299">299: </a>}
-
-<a name="line303">303: </a><font color="#B22222">/*@</font>
-<a name="line304">304: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a> - Gets the matrices associated with the transformed eigensystem.</font>
-
-<a name="line306">306: </a><font color="#B22222">   Not collective, though parallel Mats are returned if the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> is parallel</font>
-
-<a name="line308">308: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line309">309: </a><font color="#B22222">+  st - the spectral transformation context</font>
-<a name="line310">310: </a><font color="#B22222">-  k  - the index of the requested matrix (starting in 0)</font>
-
-<a name="line312">312: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line313">313: </a><font color="#B22222">.  T - the requested matrix</font>
-
-<a name="line315">315: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line317">317: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STGetOperators.html#STGetOperators">STGetOperators</a>(), <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>()</font>
-<a name="line318">318: </a><font color="#B22222">@*/</font>
-<a name="line319">319: </a><strong><font color="#4169E1"><a name="STGetTOperators"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetTOperators.html#STGetTOperators">STGetTOperators</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt k,Mat *T)</font></strong>
-<a name="line320">320: </a>{
-<a name="line325">325: </a>  STCheckMatrices(st,1);
-<a name="line326">326: </a>  <font color="#4169E1">if</font> (k<0 || k>=st->nmat) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,st->nmat-1);
-<a name="line327">327: </a>  <font color="#4169E1">if</font> (!st->T) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_POINTER,<font color="#666666">"There are no transformed matrices"</font>);
-<a name="line328">328: </a>  *T = st->T[k];
-<a name="line329">329: </a>  <font color="#4169E1">return</font>(0);
-<a name="line330">330: </a>}
-
-<a name="line334">334: </a><font color="#B22222">/*@</font>
-<a name="line335">335: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a> - Returns the number of matrices stored in the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>.</font>
-
-<a name="line337">337: </a><font color="#B22222">   Not collective</font>
-
-<a name="line339">339: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line340">340: </a><font color="#B22222">.  st - the spectral transformation context</font>
-
-<a name="line342">342: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line343">343: </a><font color="#B22222">.  n - the number of matrices passed in <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>()</font>
-
-<a name="line345">345: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line347">347: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOperators.html#STSetOperators">STSetOperators</a>()</font>
-<a name="line348">348: </a><font color="#B22222">@*/</font>
-<a name="line349">349: </a><strong><font color="#4169E1"><a name="STGetNumMatrices"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetNumMatrices.html#STGetNumMatrices">STGetNumMatrices</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt *n)</font></strong>
-<a name="line350">350: </a>{
-<a name="line354">354: </a>  *n = st->nmat;
-<a name="line355">355: </a>  <font color="#4169E1">return</font>(0);
-<a name="line356">356: </a>}
-
-<a name="line360">360: </a><font color="#B22222">/*@</font>
-<a name="line361">361: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a> - Sets the shift associated with the spectral transformation.</font>
-
-<a name="line363">363: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line365">365: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line366">366: </a><font color="#B22222">+  st - the spectral transformation context</font>
-<a name="line367">367: </a><font color="#B22222">-  shift - the value of the shift</font>
-
-<a name="line369">369: </a><font color="#B22222">   Notes:</font>
-<a name="line370">370: </a><font color="#B22222">   In some spectral transformations, changing the shift may have associated</font>
-<a name="line371">371: </a><font color="#B22222">   a lot of work, for example recomputing a factorization.</font>
-
-<a name="line373">373: </a><font color="#B22222">   This function is normally not directly called by users, since the shift is</font>
-<a name="line374">374: </a><font color="#B22222">   indirectly set by <a href="../../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>().</font>
+<a name="line388">388: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line376">376: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line390">390: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(), <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(), <a href="../../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>()</font>
+<a name="line391">391: </a><font color="#B22222">@*/</font>
+<a name="line392">392: </a><strong><font color="#4169E1"><a name="STSetShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar shift)</font></strong>
+<a name="line393">393: </a>{
 
-<a name="line378">378: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetTarget.html#EPSSetTarget">EPSSetTarget</a>(), <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(), <a href="../../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>()</font>
-<a name="line379">379: </a><font color="#B22222">@*/</font>
-<a name="line380">380: </a><strong><font color="#4169E1"><a name="STSetShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar shift)</font></strong>
-<a name="line381">381: </a>{
+<a name="line399">399: </a>  <font color="#4169E1">if</font> (st->state==ST_STATE_SETUP && st->sigma != shift) {
+<a name="line400">400: </a>    <font color="#4169E1">if</font> (st->ops->setshift) {
+<a name="line401">401: </a>      (*st->ops->setshift)(st,shift);
+<a name="line402">402: </a>    }
+<a name="line403">403: </a>  }
+<a name="line404">404: </a>  st->sigma = shift;
+<a name="line405">405: </a>  st->sigma_set = PETSC_TRUE;
+<a name="line406">406: </a>  <font color="#4169E1">return</font>(0);
+<a name="line407">407: </a>}
 
-<a name="line387">387: </a>  <font color="#4169E1">if</font> (st->sigma != shift) {
-<a name="line388">388: </a>    <font color="#4169E1">if</font> (st->ops->setshift) {
-<a name="line389">389: </a>      (*st->ops->setshift)(st,shift);
-<a name="line390">390: </a>    }
-<a name="line391">391: </a>  }
-<a name="line392">392: </a>  st->sigma = shift;
-<a name="line393">393: </a>  st->sigma_set = PETSC_TRUE;
-<a name="line394">394: </a>  <font color="#4169E1">return</font>(0);
-<a name="line395">395: </a>}
+<a name="line411">411: </a><font color="#B22222">/*@</font>
+<a name="line412">412: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a> - Gets the shift associated with the spectral transformation.</font>
 
-<a name="line399">399: </a><font color="#B22222">/*@</font>
-<a name="line400">400: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a> - Gets the shift associated with the spectral transformation.</font>
+<a name="line414">414: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line402">402: </a><font color="#B22222">   Not Collective</font>
+<a name="line416">416: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line417">417: </a><font color="#B22222">.  st - the spectral transformation context</font>
 
-<a name="line404">404: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line405">405: </a><font color="#B22222">.  st - the spectral transformation context</font>
+<a name="line419">419: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line420">420: </a><font color="#B22222">.  shift - the value of the shift</font>
 
-<a name="line407">407: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line408">408: </a><font color="#B22222">.  shift - the value of the shift</font>
+<a name="line422">422: </a><font color="#B22222">   Level: intermediate</font>
 
-<a name="line410">410: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line424">424: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>()</font>
+<a name="line425">425: </a><font color="#B22222">@*/</font>
+<a name="line426">426: </a><strong><font color="#4169E1"><a name="STGetShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar* shift)</font></strong>
+<a name="line427">427: </a>{
+<a name="line431">431: </a>  *shift = st->sigma;
+<a name="line432">432: </a>  <font color="#4169E1">return</font>(0);
+<a name="line433">433: </a>}
 
-<a name="line412">412: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>()</font>
-<a name="line413">413: </a><font color="#B22222">@*/</font>
-<a name="line414">414: </a><strong><font color="#4169E1"><a name="STGetShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetShift.html#STGetShift">STGetShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar* shift)</font></strong>
-<a name="line415">415: </a>{
-<a name="line419">419: </a>  *shift = st->sigma;
-<a name="line420">420: </a>  <font color="#4169E1">return</font>(0);
-<a name="line421">421: </a>}
+<a name="line437">437: </a><font color="#B22222">/*@</font>
+<a name="line438">438: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a> - Sets the value of the shift that should be employed if</font>
+<a name="line439">439: </a><font color="#B22222">   the user did not specify one.</font>
 
-<a name="line425">425: </a><font color="#B22222">/*@</font>
-<a name="line426">426: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a> - Sets the value of the shift that should be employed if</font>
-<a name="line427">427: </a><font color="#B22222">   the user did not specify one.</font>
+<a name="line441">441: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
 
-<a name="line429">429: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+<a name="line443">443: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line444">444: </a><font color="#B22222">+  st - the spectral transformation context</font>
+<a name="line445">445: </a><font color="#B22222">-  defaultshift - the default value of the shift</font>
 
-<a name="line431">431: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line432">432: </a><font color="#B22222">+  st - the spectral transformation context</font>
-<a name="line433">433: </a><font color="#B22222">-  defaultshift - the default value of the shift</font>
+<a name="line447">447: </a><font color="#B22222">   Level: developer</font>
 
-<a name="line435">435: </a><font color="#B22222">   Level: developer</font>
+<a name="line449">449: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>()</font>
+<a name="line450">450: </a><font color="#B22222">@*/</font>
+<a name="line451">451: </a><strong><font color="#4169E1"><a name="STSetDefaultShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar defaultshift)</font></strong>
+<a name="line452">452: </a>{
+<a name="line456">456: </a>  st->defsigma = defaultshift;
+<a name="line457">457: </a>  <font color="#4169E1">return</font>(0);
+<a name="line458">458: </a>}
 
-<a name="line437">437: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>()</font>
-<a name="line438">438: </a><font color="#B22222">@*/</font>
-<a name="line439">439: </a><strong><font color="#4169E1"><a name="STSetDefaultShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetDefaultShift.html#STSetDefaultShift">STSetDefaultShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar defaultshift)</font></strong>
-<a name="line440">440: </a>{
-<a name="line444">444: </a>  st->defsigma = defaultshift;
-<a name="line445">445: </a>  <font color="#4169E1">return</font>(0);
-<a name="line446">446: </a>}
+<a name="line462">462: </a><font color="#B22222">/*@</font>
+<a name="line463">463: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a> - Multiply the shift with a given factor.</font>
 
-<a name="line450">450: </a><font color="#B22222">/*@</font>
-<a name="line451">451: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a> - Multiply the shift with a given factor.</font>
+<a name="line465">465: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
 
-<a name="line453">453: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+<a name="line467">467: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line468">468: </a><font color="#B22222">+  st     - the spectral transformation context</font>
+<a name="line469">469: </a><font color="#B22222">-  factor - the scaling factor</font>
 
-<a name="line455">455: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line456">456: </a><font color="#B22222">+  st     - the spectral transformation context</font>
-<a name="line457">457: </a><font color="#B22222">-  factor - the scaling factor</font>
+<a name="line471">471: </a><font color="#B22222">   Note:</font>
+<a name="line472">472: </a><font color="#B22222">   This function does not update the transformation matrices, as opposed to</font>
+<a name="line473">473: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>().</font>
 
-<a name="line459">459: </a><font color="#B22222">   Note:</font>
-<a name="line460">460: </a><font color="#B22222">   This function does not update the transformation matrices, as opposed to</font>
-<a name="line461">461: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>().</font>
+<a name="line475">475: </a><font color="#B22222">   Level: developer</font>
 
-<a name="line463">463: </a><font color="#B22222">   Level: developer</font>
+<a name="line477">477: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>()</font>
+<a name="line478">478: </a><font color="#B22222">@*/</font>
+<a name="line479">479: </a><strong><font color="#4169E1"><a name="STScaleShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar factor)</font></strong>
+<a name="line480">480: </a>{
+<a name="line484">484: </a>  st->sigma *= factor;
+<a name="line485">485: </a>  <font color="#4169E1">return</font>(0);
+<a name="line486">486: </a>}
 
-<a name="line465">465: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetShift.html#STSetShift">STSetShift</a>()</font>
-<a name="line466">466: </a><font color="#B22222">@*/</font>
-<a name="line467">467: </a><strong><font color="#4169E1"><a name="STScaleShift"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STScaleShift.html#STScaleShift">STScaleShift</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar factor)</font></strong>
-<a name="line468">468: </a>{
-<a name="line472">472: </a>  st->sigma *= factor;
-<a name="line473">473: </a>  <font color="#4169E1">return</font>(0);
-<a name="line474">474: </a>}
+<a name="line490">490: </a><font color="#B22222">/*@</font>
+<a name="line491">491: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a> - Sets the diagonal matrix to be used for balancing.</font>
 
-<a name="line478">478: </a><font color="#B22222">/*@</font>
-<a name="line479">479: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a> - Sets the diagonal matrix to be used for balancing.</font>
+<a name="line493">493: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> and Vec</font>
 
-<a name="line481">481: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> and Vec</font>
+<a name="line495">495: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line496">496: </a><font color="#B22222">+  st - the spectral transformation context</font>
+<a name="line497">497: </a><font color="#B22222">-  D  - the diagonal matrix (represented as a vector)</font>
 
-<a name="line483">483: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line484">484: </a><font color="#B22222">+  st - the spectral transformation context</font>
-<a name="line485">485: </a><font color="#B22222">-  D  - the diagonal matrix (represented as a vector)</font>
+<a name="line499">499: </a><font color="#B22222">   Notes:</font>
+<a name="line500">500: </a><font color="#B22222">   If this matrix is set, <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a> will effectively apply D*OP*D^{-1}.</font>
 
-<a name="line487">487: </a><font color="#B22222">   Notes:</font>
-<a name="line488">488: </a><font color="#B22222">   If this matrix is set, <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a> will effectively apply D*OP*D^{-1}.</font>
+<a name="line502">502: </a><font color="#B22222">   Balancing is usually set via <a href="../../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>, but the advanced user may use</font>
+<a name="line503">503: </a><font color="#B22222">   this function to bypass the usual balancing methods.</font>
 
-<a name="line490">490: </a><font color="#B22222">   Balancing is usually set via <a href="../../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>, but the advanced user may use</font>
-<a name="line491">491: </a><font color="#B22222">   this function to bypass the usual balancing methods.</font>
+<a name="line505">505: </a><font color="#B22222">   Level: developer</font>
 
-<a name="line493">493: </a><font color="#B22222">   Level: developer</font>
+<a name="line507">507: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(), <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(), <a href="../../../../../docs/manualpages/ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</a>()</font>
+<a name="line508">508: </a><font color="#B22222">@*/</font>
+<a name="line509">509: </a><strong><font color="#4169E1"><a name="STSetBalanceMatrix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec D)</font></strong>
+<a name="line510">510: </a>{
 
-<a name="line495">495: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</a>(), <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a>(), <a href="../../../../../docs/manualpages/ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</a>()</font>
-<a name="line496">496: </a><font color="#B22222">@*/</font>
-<a name="line497">497: </a><strong><font color="#4169E1"><a name="STSetBalanceMatrix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec D)</font></strong>
-<a name="line498">498: </a>{
+<a name="line517">517: </a>  PetscObjectReference((PetscObject)D);
+<a name="line518">518: </a>  VecDestroy(&st->D);
+<a name="line519">519: </a>  st->D = D;
+<a name="line520">520: </a>  st->state = ST_STATE_INITIAL;
+<a name="line521">521: </a>  <font color="#4169E1">return</font>(0);
+<a name="line522">522: </a>}
 
-<a name="line505">505: </a>  PetscObjectReference((PetscObject)D);
-<a name="line506">506: </a>  VecDestroy(&st->D);
-<a name="line507">507: </a>  st->D = D;
-<a name="line508">508: </a>  st->setupcalled = 0;
-<a name="line509">509: </a>  <font color="#4169E1">return</font>(0);
-<a name="line510">510: </a>}
+<a name="line526">526: </a><font color="#B22222">/*@</font>
+<a name="line527">527: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</a> - Gets the balance matrix used by the spectral transformation.</font>
 
-<a name="line514">514: </a><font color="#B22222">/*@</font>
-<a name="line515">515: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</a> - Gets the balance matrix used by the spectral transformation.</font>
+<a name="line529">529: </a><font color="#B22222">   Not collective, but vector is shared by all processors that share the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
 
-<a name="line517">517: </a><font color="#B22222">   Not collective, but vector is shared by all processors that share the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+<a name="line531">531: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line532">532: </a><font color="#B22222">.  st - the spectral transformation context</font>
 
-<a name="line519">519: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line520">520: </a><font color="#B22222">.  st - the spectral transformation context</font>
+<a name="line534">534: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line535">535: </a><font color="#B22222">.  D  - the diagonal matrix (represented as a vector)</font>
 
-<a name="line522">522: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line523">523: </a><font color="#B22222">.  D  - the diagonal matrix (represented as a vector)</font>
+<a name="line537">537: </a><font color="#B22222">   Note:</font>
+<a name="line538">538: </a><font color="#B22222">   If the matrix was not set, a null pointer will be returned.</font>
 
-<a name="line525">525: </a><font color="#B22222">   Note:</font>
-<a name="line526">526: </a><font color="#B22222">   If the matrix was not set, a null pointer will be returned.</font>
+<a name="line540">540: </a><font color="#B22222">   Level: developer</font>
 
-<a name="line528">528: </a><font color="#B22222">   Level: developer</font>
+<a name="line542">542: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>()</font>
+<a name="line543">543: </a><font color="#B22222">@*/</font>
+<a name="line544">544: </a><strong><font color="#4169E1"><a name="STGetBalanceMatrix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec *D)</font></strong>
+<a name="line545">545: </a>{
+<a name="line549">549: </a>  *D = st->D;
+<a name="line550">550: </a>  <font color="#4169E1">return</font>(0);
+<a name="line551">551: </a>}
 
-<a name="line530">530: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</a>()</font>
-<a name="line531">531: </a><font color="#B22222">@*/</font>
-<a name="line532">532: </a><strong><font color="#4169E1"><a name="STGetBalanceMatrix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetBalanceMatrix.html#STGetBalanceMatrix">STGetBalanceMatrix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec *D)</font></strong>
-<a name="line533">533: </a>{
-<a name="line537">537: </a>  *D = st->D;
-<a name="line538">538: </a>  <font color="#4169E1">return</font>(0);
-<a name="line539">539: </a>}
+<a name="line555">555: </a><font color="#B22222">/*@C</font>
+<a name="line556">556: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a> - Get vector(s) compatible with the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices.</font>
 
-<a name="line543">543: </a><font color="#B22222">/*@C</font>
-<a name="line544">544: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a> - Get vector(s) compatible with the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices.</font>
+<a name="line558">558: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
 
-<a name="line546">546: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+<a name="line560">560: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line561">561: </a><font color="#B22222">.  st - the spectral transformation context</font>
 
-<a name="line548">548: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line549">549: </a><font color="#B22222">.  st - the spectral transformation context</font>
+<a name="line563">563: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line564">564: </a><font color="#B22222">+  right - (optional) vector that the matrix can be multiplied against</font>
+<a name="line565">565: </a><font color="#B22222">-  left  - (optional) vector that the matrix vector product can be stored in</font>
 
-<a name="line551">551: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line552">552: </a><font color="#B22222">+  right - (optional) vector that the matrix can be multiplied against</font>
-<a name="line553">553: </a><font color="#B22222">-  left  - (optional) vector that the matrix vector product can be stored in</font>
+<a name="line567">567: </a><font color="#B22222">   Level: developer</font>
+<a name="line568">568: </a><font color="#B22222">@*/</font>
+<a name="line569">569: </a><strong><font color="#4169E1"><a name="STMatCreateVecs"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec *right,Vec *left)</font></strong>
+<a name="line570">570: </a>{
 
-<a name="line555">555: </a><font color="#B22222">   Level: developer</font>
-<a name="line556">556: </a><font color="#B22222">@*/</font>
-<a name="line557">557: </a><strong><font color="#4169E1"><a name="STMatCreateVecs"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatCreateVecs.html#STMatCreateVecs">STMatCreateVecs</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,Vec *right,Vec *left)</font></strong>
-<a name="line558">558: </a>{
+<a name="line574">574: </a>  STCheckMatrices(st,1);
+<a name="line575">575: </a>  MatCreateVecs(st->A[0],right,left);
+<a name="line576">576: </a>  <font color="#4169E1">return</font>(0);
+<a name="line577">577: </a>}
 
-<a name="line562">562: </a>  STCheckMatrices(st,1);
-<a name="line563">563: </a>  MatCreateVecs(st->A[0],right,left);
-<a name="line564">564: </a>  <font color="#4169E1">return</font>(0);
-<a name="line565">565: </a>}
+<a name="line581">581: </a><font color="#B22222">/*@</font>
+<a name="line582">582: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatGetSize.html#STMatGetSize">STMatGetSize</a> - Returns the number of rows and columns of the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices.</font>
 
-<a name="line569">569: </a><font color="#B22222">/*@</font>
-<a name="line570">570: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatGetSize.html#STMatGetSize">STMatGetSize</a> - Returns the number of rows and columns of the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices.</font>
+<a name="line584">584: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line572">572: </a><font color="#B22222">   Not Collective</font>
+<a name="line586">586: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line587">587: </a><font color="#B22222">.  st - the spectral transformation context</font>
 
-<a name="line574">574: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line575">575: </a><font color="#B22222">.  st - the spectral transformation context</font>
+<a name="line589">589: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line590">590: </a><font color="#B22222">+  m - the number of global rows</font>
+<a name="line591">591: </a><font color="#B22222">-  n - the number of global columns</font>
 
-<a name="line577">577: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line578">578: </a><font color="#B22222">+  m - the number of global rows</font>
-<a name="line579">579: </a><font color="#B22222">-  n - the number of global columns</font>
+<a name="line593">593: </a><font color="#B22222">   Level: developer</font>
+<a name="line594">594: </a><font color="#B22222">@*/</font>
+<a name="line595">595: </a><strong><font color="#4169E1"><a name="STMatGetSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatGetSize.html#STMatGetSize">STMatGetSize</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt *m,PetscInt *n)</font></strong>
+<a name="line596">596: </a>{
 
-<a name="line581">581: </a><font color="#B22222">   Level: developer</font>
-<a name="line582">582: </a><font color="#B22222">@*/</font>
-<a name="line583">583: </a><strong><font color="#4169E1"><a name="STMatGetSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatGetSize.html#STMatGetSize">STMatGetSize</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt *m,PetscInt *n)</font></strong>
-<a name="line584">584: </a>{
+<a name="line600">600: </a>  STCheckMatrices(st,1);
+<a name="line601">601: </a>  MatGetSize(st->A[0],m,n);
+<a name="line602">602: </a>  <font color="#4169E1">return</font>(0);
+<a name="line603">603: </a>}
 
-<a name="line588">588: </a>  STCheckMatrices(st,1);
-<a name="line589">589: </a>  MatGetSize(st->A[0],m,n);
-<a name="line590">590: </a>  <font color="#4169E1">return</font>(0);
-<a name="line591">591: </a>}
+<a name="line607">607: </a><font color="#B22222">/*@</font>
+<a name="line608">608: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</a> - Returns the number of local rows and columns of the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices.</font>
 
-<a name="line595">595: </a><font color="#B22222">/*@</font>
-<a name="line596">596: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</a> - Returns the number of local rows and columns of the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> matrices.</font>
+<a name="line610">610: </a><font color="#B22222">   Not Collective</font>
 
-<a name="line598">598: </a><font color="#B22222">   Not Collective</font>
+<a name="line612">612: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line613">613: </a><font color="#B22222">.  st - the spectral transformation context</font>
 
-<a name="line600">600: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line601">601: </a><font color="#B22222">.  st - the spectral transformation context</font>
+<a name="line615">615: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line616">616: </a><font color="#B22222">+  m - the number of local rows</font>
+<a name="line617">617: </a><font color="#B22222">-  n - the number of local columns</font>
 
-<a name="line603">603: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line604">604: </a><font color="#B22222">+  m - the number of local rows</font>
-<a name="line605">605: </a><font color="#B22222">-  n - the number of local columns</font>
+<a name="line619">619: </a><font color="#B22222">   Level: developer</font>
+<a name="line620">620: </a><font color="#B22222">@*/</font>
+<a name="line621">621: </a><strong><font color="#4169E1"><a name="STMatGetLocalSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt *m,PetscInt *n)</font></strong>
+<a name="line622">622: </a>{
 
-<a name="line607">607: </a><font color="#B22222">   Level: developer</font>
-<a name="line608">608: </a><font color="#B22222">@*/</font>
-<a name="line609">609: </a><strong><font color="#4169E1"><a name="STMatGetLocalSize"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatGetLocalSize.html#STMatGetLocalSize">STMatGetLocalSize</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt *m,PetscInt *n)</font></strong>
-<a name="line610">610: </a>{
+<a name="line626">626: </a>  STCheckMatrices(st,1);
+<a name="line627">627: </a>  MatGetLocalSize(st->A[0],m,n);
+<a name="line628">628: </a>  <font color="#4169E1">return</font>(0);
+<a name="line629">629: </a>} 
 
-<a name="line614">614: </a>  STCheckMatrices(st,1);
-<a name="line615">615: </a>  MatGetLocalSize(st->A[0],m,n);
-<a name="line616">616: </a>  <font color="#4169E1">return</font>(0);
-<a name="line617">617: </a>} 
+<a name="line633">633: </a><font color="#B22222">/*@C</font>
+<a name="line634">634: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
+<a name="line635">635: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> options in the database.</font>
 
-<a name="line621">621: </a><font color="#B22222">/*@C</font>
-<a name="line622">622: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a> - Sets the prefix used for searching for all</font>
-<a name="line623">623: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> options in the database.</font>
+<a name="line637">637: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
 
-<a name="line625">625: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+<a name="line639">639: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line640">640: </a><font color="#B22222">+  st     - the spectral transformation context</font>
+<a name="line641">641: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> option requests</font>
 
-<a name="line627">627: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line628">628: </a><font color="#B22222">+  st     - the spectral transformation context</font>
-<a name="line629">629: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> option requests</font>
+<a name="line643">643: </a><font color="#B22222">   Notes:</font>
+<a name="line644">644: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line645">645: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line646">646: </a><font color="#B22222">   hyphen.</font>
 
-<a name="line631">631: </a><font color="#B22222">   Notes:</font>
-<a name="line632">632: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line633">633: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line634">634: </a><font color="#B22222">   hyphen.</font>
+<a name="line648">648: </a><font color="#B22222">   Level: advanced</font>
 
-<a name="line636">636: </a><font color="#B22222">   Level: advanced</font>
+<a name="line650">650: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a>()</font>
+<a name="line651">651: </a><font color="#B22222">@*/</font>
+<a name="line652">652: </a><strong><font color="#4169E1"><a name="STSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,const char *prefix)</font></strong>
+<a name="line653">653: </a>{
 
-<a name="line638">638: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a>()</font>
-<a name="line639">639: </a><font color="#B22222">@*/</font>
-<a name="line640">640: </a><strong><font color="#4169E1"><a name="STSetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,const char *prefix)</font></strong>
-<a name="line641">641: </a>{
+<a name="line658">658: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line659">659: </a>  KSPSetOptionsPrefix(st->ksp,prefix);
+<a name="line660">660: </a>  KSPAppendOptionsPrefix(st->ksp,<font color="#666666">"st_"</font>);
+<a name="line661">661: </a>  PetscObjectSetOptionsPrefix((PetscObject)st,prefix);
+<a name="line662">662: </a>  <font color="#4169E1">return</font>(0);
+<a name="line663">663: </a>}
 
-<a name="line646">646: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line647">647: </a>  KSPSetOptionsPrefix(st->ksp,prefix);
-<a name="line648">648: </a>  KSPAppendOptionsPrefix(st->ksp,<font color="#666666">"st_"</font>);
-<a name="line649">649: </a>  PetscObjectSetOptionsPrefix((PetscObject)st,prefix);
-<a name="line650">650: </a>  <font color="#4169E1">return</font>(0);
-<a name="line651">651: </a>}
-
-<a name="line655">655: </a><font color="#B22222">/*@C</font>
-<a name="line656">656: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
-<a name="line657">657: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> options in the database.</font>
-
-<a name="line659">659: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line661">661: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line662">662: </a><font color="#B22222">+  st     - the spectral transformation context</font>
-<a name="line663">663: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> option requests</font>
-
-<a name="line665">665: </a><font color="#B22222">   Notes:</font>
-<a name="line666">666: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
-<a name="line667">667: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
-<a name="line668">668: </a><font color="#B22222">   hyphen.</font>
-
-<a name="line670">670: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line672">672: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a>()</font>
-<a name="line673">673: </a><font color="#B22222">@*/</font>
-<a name="line674">674: </a><strong><font color="#4169E1"><a name="STAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,const char *prefix)</font></strong>
-<a name="line675">675: </a>{
-
-<a name="line680">680: </a>  PetscObjectAppendOptionsPrefix((PetscObject)st,prefix);
-<a name="line681">681: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line682">682: </a>  KSPSetOptionsPrefix(st->ksp,((PetscObject)st)->prefix);
-<a name="line683">683: </a>  KSPAppendOptionsPrefix(st->ksp,<font color="#666666">"st_"</font>);
-<a name="line684">684: </a>  <font color="#4169E1">return</font>(0);
-<a name="line685">685: </a>}
-
-<a name="line689">689: </a><font color="#B22222">/*@C</font>
-<a name="line690">690: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
-<a name="line691">691: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> options in the database.</font>
-
-<a name="line693">693: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line695">695: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line696">696: </a><font color="#B22222">.  st - the spectral transformation context</font>
-
-<a name="line698">698: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line699">699: </a><font color="#B22222">.  prefix - pointer to the prefix string used, is returned</font>
-
-<a name="line701">701: </a><font color="#B22222">   Notes: On the Fortran side, the user should pass in a string 'prefix' of</font>
-<a name="line702">702: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
-
-<a name="line704">704: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line706">706: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>()</font>
-<a name="line707">707: </a><font color="#B22222">@*/</font>
-<a name="line708">708: </a><strong><font color="#4169E1"><a name="STGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,const char *prefix[])</font></strong>
-<a name="line709">709: </a>{
-
-<a name="line715">715: </a>  PetscObjectGetOptionsPrefix((PetscObject)st,prefix);
-<a name="line716">716: </a>  <font color="#4169E1">return</font>(0);
-<a name="line717">717: </a>}
-
-<a name="line721">721: </a><font color="#B22222">/*@C</font>
-<a name="line722">722: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STView.html#STView">STView</a> - Prints the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> data structure.</font>
-
-<a name="line724">724: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line726">726: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line727">727: </a><font color="#B22222">+  st - the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> context</font>
-<a name="line728">728: </a><font color="#B22222">-  viewer - optional visualization context</font>
-
-<a name="line730">730: </a><font color="#B22222">   Note:</font>
-<a name="line731">731: </a><font color="#B22222">   The available visualization contexts include</font>
-<a name="line732">732: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
-<a name="line733">733: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
-<a name="line734">734: </a><font color="#B22222">         output where only the first processor opens</font>
-<a name="line735">735: </a><font color="#B22222">         the file.  All other processors send their</font>
-<a name="line736">736: </a><font color="#B22222">         data to the first processor to print.</font>
-
-<a name="line738">738: </a><font color="#B22222">   The user can open an alternative visualization contexts with</font>
-<a name="line739">739: </a><font color="#B22222">   PetscViewerASCIIOpen() (output to a specified file).</font>
-
-<a name="line741">741: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line743">743: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(), PetscViewerASCIIOpen()</font>
-<a name="line744">744: </a><font color="#B22222">@*/</font>
-<a name="line745">745: </a><strong><font color="#4169E1"><a name="STView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STView.html#STView">STView</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscViewer viewer)</font></strong>
-<a name="line746">746: </a>{
-<a name="line748">748: </a>  <a href="../../../../../docs/manualpages/ST/STType.html#STType">STType</a>         cstr;
-<a name="line749">749: </a>  const char*    pat;
-<a name="line750">750: </a>  char           str[50];
-<a name="line751">751: </a>  PetscBool      isascii,isstring,flg;
-
-<a name="line755">755: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)st));
-
-<a name="line759">759: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
-<a name="line760">760: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERSTRING,&isstring);
-<a name="line761">761: </a>  <font color="#4169E1">if</font> (isascii) {
-<a name="line762">762: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)st,viewer);
-<a name="line763">763: </a>    <font color="#4169E1">if</font> (st->ops->view) {
-<a name="line764">764: </a>      PetscViewerASCIIPushTab(viewer);
-<a name="line765">765: </a>      (*st->ops->view)(st,viewer);
-<a name="line766">766: </a>      PetscViewerASCIIPopTab(viewer);
-<a name="line767">767: </a>    }
-<a name="line768">768: </a>    <a href="../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,st->sigma,PETSC_FALSE);
-<a name="line769">769: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  shift: %s\n"</font>,str);
-<a name="line770">770: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of matrices: %D\n"</font>,st->nmat);
-<a name="line771">771: </a>    <font color="#4169E1">switch</font> (st->shift_matrix) {
-<a name="line772">772: </a>    <font color="#4169E1">case</font> ST_MATMODE_COPY:
-<a name="line773">773: </a>      <font color="#4169E1">break</font>;
-<a name="line774">774: </a>    <font color="#4169E1">case</font> ST_MATMODE_INPLACE:
-<a name="line775">775: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  shifting the matrix and unshifting at exit\n"</font>);
-<a name="line776">776: </a>      <font color="#4169E1">break</font>;
-<a name="line777">777: </a>    <font color="#4169E1">case</font> ST_MATMODE_SHELL:
-<a name="line778">778: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  using a shell matrix\n"</font>);
-<a name="line779">779: </a>      <font color="#4169E1">break</font>;
+<a name="line667">667: </a><font color="#B22222">/*@C</font>
+<a name="line668">668: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a> - Appends to the prefix used for searching for all</font>
+<a name="line669">669: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> options in the database.</font>
+
+<a name="line671">671: </a><font color="#B22222">   Logically Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line673">673: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line674">674: </a><font color="#B22222">+  st     - the spectral transformation context</font>
+<a name="line675">675: </a><font color="#B22222">-  prefix - the prefix string to prepend to all <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> option requests</font>
+
+<a name="line677">677: </a><font color="#B22222">   Notes:</font>
+<a name="line678">678: </a><font color="#B22222">   A hyphen (-) must NOT be given at the beginning of the prefix name.</font>
+<a name="line679">679: </a><font color="#B22222">   The first character of all runtime options is AUTOMATICALLY the</font>
+<a name="line680">680: </a><font color="#B22222">   hyphen.</font>
+
+<a name="line682">682: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line684">684: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a>()</font>
+<a name="line685">685: </a><font color="#B22222">@*/</font>
+<a name="line686">686: </a><strong><font color="#4169E1"><a name="STAppendOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,const char *prefix)</font></strong>
+<a name="line687">687: </a>{
+
+<a name="line692">692: </a>  PetscObjectAppendOptionsPrefix((PetscObject)st,prefix);
+<a name="line693">693: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line694">694: </a>  KSPSetOptionsPrefix(st->ksp,((PetscObject)st)->prefix);
+<a name="line695">695: </a>  KSPAppendOptionsPrefix(st->ksp,<font color="#666666">"st_"</font>);
+<a name="line696">696: </a>  <font color="#4169E1">return</font>(0);
+<a name="line697">697: </a>}
+
+<a name="line701">701: </a><font color="#B22222">/*@C</font>
+<a name="line702">702: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a> - Gets the prefix used for searching for all</font>
+<a name="line703">703: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> options in the database.</font>
+
+<a name="line705">705: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line707">707: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line708">708: </a><font color="#B22222">.  st - the spectral transformation context</font>
+
+<a name="line710">710: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line711">711: </a><font color="#B22222">.  prefix - pointer to the prefix string used, is returned</font>
+
+<a name="line713">713: </a><font color="#B22222">   Note:</font>
+<a name="line714">714: </a><font color="#B22222">   On the Fortran side, the user should pass in a string 'prefix' of</font>
+<a name="line715">715: </a><font color="#B22222">   sufficient length to hold the prefix.</font>
+
+<a name="line717">717: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line719">719: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STSetOptionsPrefix.html#STSetOptionsPrefix">STSetOptionsPrefix</a>(), <a href="../../../../../docs/manualpages/ST/STAppendOptionsPrefix.html#STAppendOptionsPrefix">STAppendOptionsPrefix</a>()</font>
+<a name="line720">720: </a><font color="#B22222">@*/</font>
+<a name="line721">721: </a><strong><font color="#4169E1"><a name="STGetOptionsPrefix"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetOptionsPrefix.html#STGetOptionsPrefix">STGetOptionsPrefix</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,const char *prefix[])</font></strong>
+<a name="line722">722: </a>{
+
+<a name="line728">728: </a>  PetscObjectGetOptionsPrefix((PetscObject)st,prefix);
+<a name="line729">729: </a>  <font color="#4169E1">return</font>(0);
+<a name="line730">730: </a>}
+
+<a name="line734">734: </a><font color="#B22222">/*@C</font>
+<a name="line735">735: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STView.html#STView">STView</a> - Prints the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> data structure.</font>
+
+<a name="line737">737: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line739">739: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line740">740: </a><font color="#B22222">+  st - the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> context</font>
+<a name="line741">741: </a><font color="#B22222">-  viewer - optional visualization context</font>
+
+<a name="line743">743: </a><font color="#B22222">   Note:</font>
+<a name="line744">744: </a><font color="#B22222">   The available visualization contexts include</font>
+<a name="line745">745: </a><font color="#B22222">+     PETSC_VIEWER_STDOUT_SELF - standard output (default)</font>
+<a name="line746">746: </a><font color="#B22222">-     PETSC_VIEWER_STDOUT_WORLD - synchronized standard</font>
+<a name="line747">747: </a><font color="#B22222">         output where only the first processor opens</font>
+<a name="line748">748: </a><font color="#B22222">         the file.  All other processors send their</font>
+<a name="line749">749: </a><font color="#B22222">         data to the first processor to print.</font>
+
+<a name="line751">751: </a><font color="#B22222">   The user can open an alternative visualization contexts with</font>
+<a name="line752">752: </a><font color="#B22222">   PetscViewerASCIIOpen() (output to a specified file).</font>
+
+<a name="line754">754: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line756">756: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSView.html#EPSView">EPSView</a>(), PetscViewerASCIIOpen()</font>
+<a name="line757">757: </a><font color="#B22222">@*/</font>
+<a name="line758">758: </a><strong><font color="#4169E1"><a name="STView"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STView.html#STView">STView</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscViewer viewer)</font></strong>
+<a name="line759">759: </a>{
+<a name="line761">761: </a>  <a href="../../../../../docs/manualpages/ST/STType.html#STType">STType</a>         cstr;
+<a name="line762">762: </a>  const char*    pat;
+<a name="line763">763: </a>  char           str[50];
+<a name="line764">764: </a>  PetscBool      isascii,isstring,flg;
+
+<a name="line768">768: </a>  <font color="#4169E1">if</font> (!viewer) viewer = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)st));
+
+<a name="line772">772: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);
+<a name="line773">773: </a>  PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERSTRING,&isstring);
+<a name="line774">774: </a>  <font color="#4169E1">if</font> (isascii) {
+<a name="line775">775: </a>    PetscObjectPrintClassNamePrefixType((PetscObject)st,viewer);
+<a name="line776">776: </a>    <font color="#4169E1">if</font> (st->ops->view) {
+<a name="line777">777: </a>      PetscViewerASCIIPushTab(viewer);
+<a name="line778">778: </a>      (*st->ops->view)(st,viewer);
+<a name="line779">779: </a>      PetscViewerASCIIPopTab(viewer);
 <a name="line780">780: </a>    }
-<a name="line781">781: </a>    <font color="#4169E1">if</font> (st->nmat>1 && st->shift_matrix != ST_MATMODE_SHELL) {
-<a name="line782">782: </a>      <font color="#4169E1">switch</font> (st->str) {
-<a name="line783">783: </a>        <font color="#4169E1">case</font> SAME_NONZERO_PATTERN:      pat = <font color="#666666">"same nonzero pattern"</font>;<font color="#4169E1">break</font>;
-<a name="line784">784: </a>        <font color="#4169E1">case</font> DIFFERENT_NONZERO_PATTERN: pat = <font color="#666666">"different nonzero pattern"</font>;<font color="#4169E1">break</font>;
-<a name="line785">785: </a>        <font color="#4169E1">case</font> SUBSET_NONZERO_PATTERN:    pat = <font color="#666666">"subset nonzero pattern"</font>;<font color="#4169E1">break</font>;
-<a name="line786">786: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)st),1,<font color="#666666">"Wrong structure flag"</font>);
-<a name="line787">787: </a>      }
-<a name="line788">788: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  all matrices have %s\n"</font>,pat);
-<a name="line789">789: </a>    }
-<a name="line790">790: </a>    <font color="#4169E1">if</font> (st->transform && st->nmat>2) {
-<a name="line791">791: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computing transformed matrices\n"</font>);
-<a name="line792">792: </a>    }
-<a name="line793">793: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isstring) {
-<a name="line794">794: </a>    <a href="../../../../../docs/manualpages/ST/STGetType.html#STGetType">STGetType</a>(st,&cstr);
-<a name="line795">795: </a>    PetscViewerStringSPrintf(viewer,<font color="#666666">" %-7.7s"</font>,cstr);
-<a name="line796">796: </a>    <font color="#4169E1">if</font> (st->ops->view) { (*st->ops->view)(st,viewer); }
-<a name="line797">797: </a>  }
-<a name="line798">798: </a>  PetscObjectTypeCompare((PetscObject)st,STSHIFT,&flg);
-<a name="line799">799: </a>  <font color="#4169E1">if</font> (st->nmat>1 || !flg) {
-<a name="line800">800: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line801">801: </a>    PetscViewerASCIIPushTab(viewer);
-<a name="line802">802: </a>    KSPView(st->ksp,viewer);
-<a name="line803">803: </a>    PetscViewerASCIIPopTab(viewer);
-<a name="line804">804: </a>  }
-<a name="line805">805: </a>  <font color="#4169E1">return</font>(0);
-<a name="line806">806: </a>}
-
-<a name="line810">810: </a><font color="#B22222">/*@C</font>
-<a name="line811">811: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a> - Adds a method to the spectral transformation package.</font>
-
-<a name="line813">813: </a><font color="#B22222">   Not collective</font>
-
-<a name="line815">815: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line816">816: </a><font color="#B22222">+  name - name of a new user-defined transformation</font>
-<a name="line817">817: </a><font color="#B22222">-  function - routine to create method context</font>
-
-<a name="line819">819: </a><font color="#B22222">   Notes:</font>
-<a name="line820">820: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a>() may be called multiple times to add several user-defined</font>
-<a name="line821">821: </a><font color="#B22222">   spectral transformations.</font>
-
-<a name="line823">823: </a><font color="#B22222">   Sample usage:</font>
-<a name="line824">824: </a><font color="#B22222">.vb</font>
-<a name="line825">825: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a>("my_solver",MySolverCreate);</font>
-<a name="line826">826: </a><font color="#B22222">.ve</font>
-
-<a name="line828">828: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
-<a name="line829">829: </a><font color="#B22222">$     <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,"my_solver")</font>
-<a name="line830">830: </a><font color="#B22222">   or at runtime via the option</font>
-<a name="line831">831: </a><font color="#B22222">$     -st_type my_solver</font>
-
-<a name="line833">833: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line835">835: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STRegisterAll.html#STRegisterAll">STRegisterAll</a>()</font>
-<a name="line836">836: </a><font color="#B22222">@*/</font>
-<a name="line837">837: </a><strong><font color="#4169E1"><a name="STRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>))</font></strong>
-<a name="line838">838: </a>{
-
-<a name="line842">842: </a>  PetscFunctionListAdd(&STList,name,function);
-<a name="line843">843: </a>  <font color="#4169E1">return</font>(0);
-<a name="line844">844: </a>}
+<a name="line781">781: </a>    <a href="../../../../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(str,50,st->sigma,PETSC_FALSE);
+<a name="line782">782: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  shift: %s\n"</font>,str);
+<a name="line783">783: </a>    PetscViewerASCIIPrintf(viewer,<font color="#666666">"  number of matrices: %D\n"</font>,st->nmat);
+<a name="line784">784: </a>    <font color="#4169E1">switch</font> (st->shift_matrix) {
+<a name="line785">785: </a>    <font color="#4169E1">case</font> ST_MATMODE_COPY:
+<a name="line786">786: </a>      <font color="#4169E1">break</font>;
+<a name="line787">787: </a>    <font color="#4169E1">case</font> ST_MATMODE_INPLACE:
+<a name="line788">788: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  shifting the matrix and unshifting at exit\n"</font>);
+<a name="line789">789: </a>      <font color="#4169E1">break</font>;
+<a name="line790">790: </a>    <font color="#4169E1">case</font> ST_MATMODE_SHELL:
+<a name="line791">791: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  using a shell matrix\n"</font>);
+<a name="line792">792: </a>      <font color="#4169E1">break</font>;
+<a name="line793">793: </a>    }
+<a name="line794">794: </a>    <font color="#4169E1">if</font> (st->nmat>1 && st->shift_matrix != ST_MATMODE_SHELL) {
+<a name="line795">795: </a>      <font color="#4169E1">switch</font> (st->str) {
+<a name="line796">796: </a>        <font color="#4169E1">case</font> SAME_NONZERO_PATTERN:      pat = <font color="#666666">"same nonzero pattern"</font>;<font color="#4169E1">break</font>;
+<a name="line797">797: </a>        <font color="#4169E1">case</font> DIFFERENT_NONZERO_PATTERN: pat = <font color="#666666">"different nonzero pattern"</font>;<font color="#4169E1">break</font>;
+<a name="line798">798: </a>        <font color="#4169E1">case</font> SUBSET_NONZERO_PATTERN:    pat = <font color="#666666">"subset nonzero pattern"</font>;<font color="#4169E1">break</font>;
+<a name="line799">799: </a><strong><font color="#FF0000">        default:</font></strong> SETERRQ(PetscObjectComm((PetscObject)st),1,<font color="#666666">"Wrong structure flag"</font>);
+<a name="line800">800: </a>      }
+<a name="line801">801: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  all matrices have %s\n"</font>,pat);
+<a name="line802">802: </a>    }
+<a name="line803">803: </a>    <font color="#4169E1">if</font> (st->transform && st->nmat>2) {
+<a name="line804">804: </a>      PetscViewerASCIIPrintf(viewer,<font color="#666666">"  computing transformed matrices\n"</font>);
+<a name="line805">805: </a>    }
+<a name="line806">806: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (isstring) {
+<a name="line807">807: </a>    <a href="../../../../../docs/manualpages/ST/STGetType.html#STGetType">STGetType</a>(st,&cstr);
+<a name="line808">808: </a>    PetscViewerStringSPrintf(viewer,<font color="#666666">" %-7.7s"</font>,cstr);
+<a name="line809">809: </a>    <font color="#4169E1">if</font> (st->ops->view) { (*st->ops->view)(st,viewer); }
+<a name="line810">810: </a>  }
+<a name="line811">811: </a>  PetscObjectTypeCompare((PetscObject)st,STSHIFT,&flg);
+<a name="line812">812: </a>  <font color="#4169E1">if</font> (st->nmat>1 || !flg) {
+<a name="line813">813: </a>    <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line814">814: </a>    PetscViewerASCIIPushTab(viewer);
+<a name="line815">815: </a>    KSPView(st->ksp,viewer);
+<a name="line816">816: </a>    PetscViewerASCIIPopTab(viewer);
+<a name="line817">817: </a>  }
+<a name="line818">818: </a>  <font color="#4169E1">return</font>(0);
+<a name="line819">819: </a>}
+
+<a name="line823">823: </a><font color="#B22222">/*@C</font>
+<a name="line824">824: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a> - Adds a method to the spectral transformation package.</font>
+
+<a name="line826">826: </a><font color="#B22222">   Not collective</font>
+
+<a name="line828">828: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line829">829: </a><font color="#B22222">+  name - name of a new user-defined transformation</font>
+<a name="line830">830: </a><font color="#B22222">-  function - routine to create method context</font>
+
+<a name="line832">832: </a><font color="#B22222">   Notes:</font>
+<a name="line833">833: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a>() may be called multiple times to add several user-defined</font>
+<a name="line834">834: </a><font color="#B22222">   spectral transformations.</font>
+
+<a name="line836">836: </a><font color="#B22222">   Sample usage:</font>
+<a name="line837">837: </a><font color="#B22222">.vb</font>
+<a name="line838">838: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a>("my_solver",MySolverCreate);</font>
+<a name="line839">839: </a><font color="#B22222">.ve</font>
+
+<a name="line841">841: </a><font color="#B22222">   Then, your solver can be chosen with the procedural interface via</font>
+<a name="line842">842: </a><font color="#B22222">$     <a href="../../../../../docs/manualpages/ST/STSetType.html#STSetType">STSetType</a>(st,"my_solver")</font>
+<a name="line843">843: </a><font color="#B22222">   or at runtime via the option</font>
+<a name="line844">844: </a><font color="#B22222">$     -st_type my_solver</font>
+
+<a name="line846">846: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line848">848: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STRegisterAll.html#STRegisterAll">STRegisterAll</a>()</font>
+<a name="line849">849: </a><font color="#B22222">@*/</font>
+<a name="line850">850: </a><strong><font color="#4169E1"><a name="STRegister"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STRegister.html#STRegister">STRegister</a>(const char *name,PetscErrorCode (*function)(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>))</font></strong>
+<a name="line851">851: </a>{
+
+<a name="line855">855: </a>  PetscFunctionListAdd(&STList,name,function);
+<a name="line856">856: </a>  <font color="#4169E1">return</font>(0);
+<a name="line857">857: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/st/interface/stregis.c b/src/sys/classes/st/interface/stregis.c
index 3812605..88945e4 100644
--- a/src/sys/classes/st/interface/stregis.c
+++ b/src/sys/classes/st/interface/stregis.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/st/interface/stregis.c.html b/src/sys/classes/st/interface/stregis.c.html
index 9b8c829..d72016d 100644
--- a/src/sys/classes/st/interface/stregis.c.html
+++ b/src/sys/classes/st/interface/stregis.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/stregis.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:13+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/stregis.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/stregis.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/st/interface/stset.c b/src/sys/classes/st/interface/stset.c
index 196ceac..aee7624 100644
--- a/src/sys/classes/st/interface/stset.c
+++ b/src/sys/classes/st/interface/stset.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -73,7 +73,7 @@ PetscErrorCode STSetType(ST st,STType type)
   if (st->ops->destroy) { ierr = (*st->ops->destroy)(st);CHKERRQ(ierr); }
   ierr = PetscMemzero(st->ops,sizeof(struct _STOps));CHKERRQ(ierr);
 
-  st->setupcalled = 0;
+  st->state = ST_STATE_INITIAL;
   ierr = PetscObjectChangeTypeName((PetscObject)st,type);CHKERRQ(ierr);
   ierr = (*r)(st);CHKERRQ(ierr);
   PetscFunctionReturn(0);
@@ -167,7 +167,7 @@ PetscErrorCode STSetFromOptions(ST st)
     if (st->ops->setfromoptions) {
       ierr = (*st->ops->setfromoptions)(PetscOptionsObject,st);CHKERRQ(ierr);
     }
-    ierr = PetscObjectProcessOptionsHandlers((PetscObject)st);CHKERRQ(ierr);
+    ierr = PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)st);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
   if (!st->ksp) { ierr = STGetKSP(st,&st->ksp);CHKERRQ(ierr); }
   ierr = KSPSetFromOptions(st->ksp);CHKERRQ(ierr);
@@ -295,7 +295,7 @@ PetscErrorCode STSetMatMode(ST st,STMatMode mode)
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   PetscValidLogicalCollectiveEnum(st,mode,2);
   st->shift_matrix = mode;
-  st->setupcalled = 0;
+  st->state = ST_STATE_INITIAL;
   PetscFunctionReturn(0);
 }
 
@@ -358,7 +358,7 @@ PetscErrorCode STSetTransform(ST st,PetscBool flg)
   PetscValidLogicalCollectiveBool(st,flg,2);
   if (st->transform != flg) {
     st->transform = flg;
-    st->setupcalled = 0;
+    st->state = ST_STATE_INITIAL;
   }
   PetscFunctionReturn(0);
 }
diff --git a/src/sys/classes/st/interface/stset.c.html b/src/sys/classes/st/interface/stset.c.html
index f8c51cb..9d60c96 100644
--- a/src/sys/classes/st/interface/stset.c.html
+++ b/src/sys/classes/st/interface/stset.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/stset.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:10+00:00">
+<meta name="date" content="2016-05-16T10:32:04+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/stset.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/stset.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">    Routines to set <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> methods and options.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -80,7 +80,7 @@
 <a name="line73"> 73: </a>  <font color="#4169E1">if</font> (st->ops->destroy) { (*st->ops->destroy)(st); }
 <a name="line74"> 74: </a>  PetscMemzero(st->ops,<font color="#4169E1">sizeof</font>(<font color="#4169E1">struct _STOps</font>));
 
-<a name="line76"> 76: </a>  st->setupcalled = 0;
+<a name="line76"> 76: </a>  st->state = ST_STATE_INITIAL;
 <a name="line77"> 77: </a>  PetscObjectChangeTypeName((PetscObject)st,type);
 <a name="line78"> 78: </a>  (*r)(st);
 <a name="line79"> 79: </a>  <font color="#4169E1">return</font>(0);
@@ -164,7 +164,7 @@
 <a name="line167">167: </a>    <font color="#4169E1">if</font> (st->ops->setfromoptions) {
 <a name="line168">168: </a>      (*st->ops->setfromoptions)(PetscOptionsObject,st);
 <a name="line169">169: </a>    }
-<a name="line170">170: </a>    PetscObjectProcessOptionsHandlers((PetscObject)st);
+<a name="line170">170: </a>    PetscObjectProcessOptionsHandlers(PetscOptionsObject,(PetscObject)st);
 <a name="line171">171: </a>  PetscOptionsEnd();
 <a name="line172">172: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
 <a name="line173">173: </a>  KSPSetFromOptions(st->ksp);
@@ -277,7 +277,7 @@
 <a name="line292">292: </a><strong><font color="#4169E1"><a name="STSetMatMode"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetMatMode.html#STSetMatMode">STSetMatMode</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,<a href="../../../../../docs/manualpages/ST/STMatMode.html#STMatMode">STMatMode</a> mode)</font></strong>
 <a name="line293">293: </a>{
 <a name="line297">297: </a>  st->shift_matrix = mode;
-<a name="line298">298: </a>  st->setupcalled = 0;
+<a name="line298">298: </a>  st->state = ST_STATE_INITIAL;
 <a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
 <a name="line300">300: </a>}
 
@@ -330,7 +330,7 @@
 <a name="line355">355: </a>{
 <a name="line359">359: </a>  <font color="#4169E1">if</font> (st->transform != flg) {
 <a name="line360">360: </a>    st->transform = flg;
-<a name="line361">361: </a>    st->setupcalled = 0;
+<a name="line361">361: </a>    st->state = ST_STATE_INITIAL;
 <a name="line362">362: </a>  }
 <a name="line363">363: </a>  <font color="#4169E1">return</font>(0);
 <a name="line364">364: </a>}
diff --git a/src/sys/classes/st/interface/stshellmat.c b/src/sys/classes/st/interface/stshellmat.c
index 30c7075..c918f47 100644
--- a/src/sys/classes/st/interface/stshellmat.c
+++ b/src/sys/classes/st/interface/stshellmat.c
@@ -5,7 +5,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/classes/st/interface/stshellmat.c.html b/src/sys/classes/st/interface/stshellmat.c.html
index e85df09..f18d89c 100644
--- a/src/sys/classes/st/interface/stshellmat.c.html
+++ b/src/sys/classes/st/interface/stshellmat.c.html
@@ -4,12 +4,12 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/stshellmat.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:13+00:00">
+<meta name="date" content="2016-05-16T10:32:07+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/stshellmat.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/stshellmat.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">      This file contains the subroutines which implement various operations</font>
 <a name="line3">  3: </a><font color="#B22222">      of the matrix associated to the shift-and-invert technique for eigenvalue</font>
@@ -17,7 +17,7 @@
 
 <a name="line6">  6: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line7">  7: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line8">  8: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line10"> 10: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/classes/st/interface/stsles.c b/src/sys/classes/st/interface/stsles.c
index be9c7d7..89c3f09 100644
--- a/src/sys/classes/st/interface/stsles.c
+++ b/src/sys/classes/st/interface/stsles.c
@@ -4,7 +4,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -54,11 +54,11 @@ PetscErrorCode STMatMult(ST st,PetscInt k,Vec x,Vec y)
   PetscValidHeaderSpecific(x,VEC_CLASSID,3);
   PetscValidHeaderSpecific(y,VEC_CLASSID,4);
   STCheckMatrices(st,1);
-  if (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",st->nmat);
+  if (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",st->nmat);
   if (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,"x and y must be different vectors");
   VecLocked(y,3);
 
-  if (!st->setupcalled) { ierr = STSetUp(st);CHKERRQ(ierr); }
+  if (st->state!=ST_STATE_SETUP) { ierr = STSetUp(st);CHKERRQ(ierr); }
   ierr = VecLockPush(x);CHKERRQ(ierr);
   ierr = PetscLogEventBegin(ST_MatMult,st,x,y,0);CHKERRQ(ierr);
   if (!st->T[k]) {
@@ -102,11 +102,11 @@ PetscErrorCode STMatMultTranspose(ST st,PetscInt k,Vec x,Vec y)
   PetscValidHeaderSpecific(x,VEC_CLASSID,3);
   PetscValidHeaderSpecific(y,VEC_CLASSID,4);
   STCheckMatrices(st,1);
-  if (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %d",st->nmat);
+  if (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"k must be between 0 and %D",st->nmat);
   if (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,"x and y must be different vectors");
   VecLocked(y,3);
 
-  if (!st->setupcalled) { ierr = STSetUp(st);CHKERRQ(ierr); }
+  if (st->state!=ST_STATE_SETUP) { ierr = STSetUp(st);CHKERRQ(ierr); }
   ierr = VecLockPush(x);CHKERRQ(ierr);
   ierr = PetscLogEventBegin(ST_MatMultTranspose,st,x,y,0);CHKERRQ(ierr);
   if (!st->T[k]) {
@@ -153,7 +153,7 @@ PetscErrorCode STMatSolve(ST st,Vec b,Vec x)
   if (x == b) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,"x and b must be different vectors");
   VecLocked(x,3);
 
-  if (!st->setupcalled) { ierr = STSetUp(st);CHKERRQ(ierr); }
+  if (st->state!=ST_STATE_SETUP) { ierr = STSetUp(st);CHKERRQ(ierr); }
   ierr = VecLockPush(b);CHKERRQ(ierr);
   ierr = PetscLogEventBegin(ST_MatSolve,st,b,x,0);CHKERRQ(ierr);
   ierr = PetscObjectTypeCompareAny((PetscObject)st,&flg,STPRECOND,STSHELL,"");CHKERRQ(ierr);
@@ -204,7 +204,7 @@ PetscErrorCode STMatSolveTranspose(ST st,Vec b,Vec x)
   if (x == b) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,"x and b must be different vectors");
   VecLocked(x,3);
 
-  if (!st->setupcalled) { ierr = STSetUp(st);CHKERRQ(ierr); }
+  if (st->state!=ST_STATE_SETUP) { ierr = STSetUp(st);CHKERRQ(ierr); }
   ierr = VecLockPush(b);CHKERRQ(ierr);
   ierr = PetscLogEventBegin(ST_MatSolveTranspose,st,b,x,0);CHKERRQ(ierr);
   ierr = PetscObjectTypeCompareAny((PetscObject)st,&flg,STPRECOND,STSHELL,"");CHKERRQ(ierr);
@@ -289,7 +289,6 @@ PetscErrorCode STCheckFactorPackage(ST st)
 -  ksp  - the linear system context
 
    Level: advanced
-
 @*/
 PetscErrorCode STSetKSP(ST st,KSP ksp)
 {
@@ -320,13 +319,7 @@ PetscErrorCode STSetKSP(ST st,KSP ksp)
    Output Parameter:
 .  ksp  - the linear system context
 
-   Notes:
-   On output, the value of ksp can be NULL if the combination of
-   eigenproblem type and selected transformation does not require to
-   solve a linear system of equations.
-
    Level: intermediate
-
 @*/
 PetscErrorCode STGetKSP(ST st,KSP* ksp)
 {
diff --git a/src/sys/classes/st/interface/stsles.c.html b/src/sys/classes/st/interface/stsles.c.html
index 1e6d15d..339cc1c 100644
--- a/src/sys/classes/st/interface/stsles.c.html
+++ b/src/sys/classes/st/interface/stsles.c.html
@@ -4,19 +4,19 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/stsles.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:12+00:00">
+<meta name="date" content="2016-05-16T10:32:06+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/stsles.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/stsles.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">    The <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> (spectral transformation) interface routines related to the</font>
 <a name="line3">  3: </a><font color="#B22222">    KSP object associated to it.</font>
 
 <a name="line5">  5: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line6">  6: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line7">  7: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line9">  9: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -58,11 +58,11 @@
 <a name="line48"> 48: </a>{
 
 <a name="line56"> 56: </a>  STCheckMatrices(st,1);
-<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,st->nmat);
+<a name="line57"> 57: </a>  <font color="#4169E1">if</font> (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,st->nmat);
 <a name="line58"> 58: </a>  <font color="#4169E1">if</font> (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,<font color="#666666">"x and y must be different vectors"</font>);
 <a name="line59"> 59: </a>  VecLocked(y,3);
 
-<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (!st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
+<a name="line61"> 61: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_SETUP) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
 <a name="line62"> 62: </a>  VecLockPush(x);
 <a name="line63"> 63: </a>  PetscLogEventBegin(ST_MatMult,st,x,y,0);
 <a name="line64"> 64: </a>  <font color="#4169E1">if</font> (!st->T[k]) {
@@ -98,11 +98,11 @@
 <a name="line96"> 96: </a>{
 
 <a name="line104">104: </a>  STCheckMatrices(st,1);
-<a name="line105">105: </a>  <font color="#4169E1">if</font> (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %d"</font>,st->nmat);
+<a name="line105">105: </a>  <font color="#4169E1">if</font> (k<0 || k>=PetscMax(2,st->nmat)) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,<font color="#666666">"k must be between 0 and %D"</font>,st->nmat);
 <a name="line106">106: </a>  <font color="#4169E1">if</font> (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,<font color="#666666">"x and y must be different vectors"</font>);
 <a name="line107">107: </a>  VecLocked(y,3);
 
-<a name="line109">109: </a>  <font color="#4169E1">if</font> (!st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
+<a name="line109">109: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_SETUP) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
 <a name="line110">110: </a>  VecLockPush(x);
 <a name="line111">111: </a>  PetscLogEventBegin(ST_MatMultTranspose,st,x,y,0);
 <a name="line112">112: </a>  <font color="#4169E1">if</font> (!st->T[k]) {
@@ -142,7 +142,7 @@
 <a name="line153">153: </a>  <font color="#4169E1">if</font> (x == b) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,<font color="#666666">"x and b must be different vectors"</font>);
 <a name="line154">154: </a>  VecLocked(x,3);
 
-<a name="line156">156: </a>  <font color="#4169E1">if</font> (!st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
+<a name="line156">156: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_SETUP) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
 <a name="line157">157: </a>  VecLockPush(b);
 <a name="line158">158: </a>  PetscLogEventBegin(ST_MatSolve,st,b,x,0);
 <a name="line159">159: </a>  PetscObjectTypeCompareAny((PetscObject)st,&flg,STPRECOND,<a href="../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>,<font color="#666666">""</font>);
@@ -186,7 +186,7 @@
 <a name="line204">204: </a>  <font color="#4169E1">if</font> (x == b) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,<font color="#666666">"x and b must be different vectors"</font>);
 <a name="line205">205: </a>  VecLocked(x,3);
 
-<a name="line207">207: </a>  <font color="#4169E1">if</font> (!st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
+<a name="line207">207: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_SETUP) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
 <a name="line208">208: </a>  VecLockPush(b);
 <a name="line209">209: </a>  PetscLogEventBegin(ST_MatSolveTranspose,st,b,x,0);
 <a name="line210">210: </a>  PetscObjectTypeCompareAny((PetscObject)st,&flg,STPRECOND,<a href="../../../../../docs/manualpages/ST/STSHELL.html#STSHELL">STSHELL</a>,<font color="#666666">""</font>);
@@ -262,124 +262,117 @@
 <a name="line289">289: </a><font color="#B22222">-  ksp  - the linear system context</font>
 
 <a name="line291">291: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line293">293: </a><font color="#B22222">@*/</font>
-<a name="line294">294: </a><strong><font color="#4169E1"><a name="STSetKSP"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetKSP.html#STSetKSP">STSetKSP</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,KSP ksp)</font></strong>
-<a name="line295">295: </a>{
-
-<a name="line302">302: </a>  PetscObjectReference((PetscObject)ksp);
-<a name="line303">303: </a>  KSPDestroy(&st->ksp);
-<a name="line304">304: </a>  st->ksp = ksp;
-<a name="line305">305: </a>  PetscLogObjectParent((PetscObject)st,(PetscObject)st->ksp);
-<a name="line306">306: </a>  <font color="#4169E1">return</font>(0);
-<a name="line307">307: </a>}
-
-<a name="line311">311: </a><font color="#B22222">/*@</font>
-<a name="line312">312: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a> - Gets the KSP object associated with the spectral</font>
-<a name="line313">313: </a><font color="#B22222">   transformation.</font>
-
-<a name="line315">315: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line317">317: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line318">318: </a><font color="#B22222">.  st - the spectral transformation context</font>
-
-<a name="line320">320: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line321">321: </a><font color="#B22222">.  ksp  - the linear system context</font>
-
-<a name="line323">323: </a><font color="#B22222">   Notes:</font>
-<a name="line324">324: </a><font color="#B22222">   On output, the value of ksp can be NULL if the combination of</font>
-<a name="line325">325: </a><font color="#B22222">   eigenproblem type and selected transformation does not require to</font>
-<a name="line326">326: </a><font color="#B22222">   solve a linear system of equations.</font>
-
-<a name="line328">328: </a><font color="#B22222">   Level: intermediate</font>
-
-<a name="line330">330: </a><font color="#B22222">@*/</font>
-<a name="line331">331: </a><strong><font color="#4169E1"><a name="STGetKSP"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,KSP* ksp)</font></strong>
-<a name="line332">332: </a>{
-
-<a name="line338">338: </a>  <font color="#4169E1">if</font> (!st->ksp) {
-<a name="line339">339: </a>    KSPCreate(PetscObjectComm((PetscObject)st),&st->ksp);
-<a name="line340">340: </a>    KSPSetOptionsPrefix(st->ksp,((PetscObject)st)->prefix);
-<a name="line341">341: </a>    KSPAppendOptionsPrefix(st->ksp,<font color="#666666">"st_"</font>);
-<a name="line342">342: </a>    PetscObjectIncrementTabLevel((PetscObject)st->ksp,(PetscObject)st,1);
-<a name="line343">343: </a>    PetscLogObjectParent((PetscObject)st,(PetscObject)st->ksp);
-<a name="line344">344: </a>    KSPSetTolerances(st->ksp,SLEPC_DEFAULT_TOL,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
-<a name="line345">345: </a>  }
-<a name="line346">346: </a>  *ksp = st->ksp;
-<a name="line347">347: </a>  <font color="#4169E1">return</font>(0);
-<a name="line348">348: </a>}
-
-<a name="line352">352: </a><strong><font color="#4169E1"><a name="STCheckNullSpace_Default"></a>PetscErrorCode STCheckNullSpace_Default(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
-<a name="line353">353: </a>{
-<a name="line355">355: </a>  PetscInt       nc,i,c;
-<a name="line356">356: </a>  PetscReal      norm;
-<a name="line357">357: </a>  Vec            *T,w,vi;
-<a name="line358">358: </a>  Mat            A;
-<a name="line359">359: </a>  PC             pc;
-<a name="line360">360: </a>  MatNullSpace   nullsp;
-
-<a name="line363">363: </a>  <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(V,&nc);
-<a name="line364">364: </a>  PetscMalloc1(nc,&T);
-<a name="line365">365: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line366">366: </a>  KSPGetPC(st->ksp,&pc);
-<a name="line367">367: </a>  PCGetOperators(pc,&A,NULL);
-<a name="line368">368: </a>  MatCreateVecs(A,NULL,&w);
-<a name="line369">369: </a>  c = 0;
-<a name="line370">370: </a>  <font color="#4169E1">for</font> (i=0;i<nc;i++) {
-<a name="line371">371: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,-nc+i,&vi);
-<a name="line372">372: </a>    MatMult(A,vi,w);
-<a name="line373">373: </a>    VecNorm(w,NORM_2,&norm);
-<a name="line374">374: </a>    <font color="#4169E1">if</font> (norm < 1e-8) {
-<a name="line375">375: </a>      PetscInfo2(st,<font color="#666666">"Vector %D norm=%g\n"</font>,i,(double)norm);
-<a name="line376">376: </a>      <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,T+c);
-<a name="line377">377: </a>      VecCopy(vi,T[c]);
-<a name="line378">378: </a>      c++;
-<a name="line379">379: </a>    }
-<a name="line380">380: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,-nc+i,&vi);
-<a name="line381">381: </a>  }
-<a name="line382">382: </a>  VecDestroy(&w);
-<a name="line383">383: </a>  <font color="#4169E1">if</font> (c>0) {
-<a name="line384">384: </a>    MatNullSpaceCreate(PetscObjectComm((PetscObject)st),PETSC_FALSE,c,T,&nullsp);
-<a name="line385">385: </a>    MatSetNullSpace(A,nullsp);
-<a name="line386">386: </a>    MatNullSpaceDestroy(&nullsp);
-<a name="line387">387: </a>    VecDestroyVecs(c,&T);
-<a name="line388">388: </a>  } <font color="#4169E1">else</font> {
-<a name="line389">389: </a>    PetscFree(T);
-<a name="line390">390: </a>  }
-<a name="line391">391: </a>  <font color="#4169E1">return</font>(0);
-<a name="line392">392: </a>}
-
-<a name="line396">396: </a><font color="#B22222">/*@</font>
-<a name="line397">397: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</a> - Given a basis vectors object, this function tests each</font>
-<a name="line398">398: </a><font color="#B22222">   of its constraint vectors to be a nullspace vector of the coefficient</font>
-<a name="line399">399: </a><font color="#B22222">   matrix of the associated KSP object. All these nullspace vectors are passed</font>
-<a name="line400">400: </a><font color="#B22222">   to the KSP object.</font>
-
-<a name="line402">402: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line404">404: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line405">405: </a><font color="#B22222">+  st - the spectral transformation context</font>
-<a name="line406">406: </a><font color="#B22222">-  V  - basis vectors to be checked</font>
-
-<a name="line408">408: </a><font color="#B22222">   Note:</font>
-<a name="line409">409: </a><font color="#B22222">   This function allows to handle singular pencils and to solve some problems</font>
-<a name="line410">410: </a><font color="#B22222">   in which the nullspace is important (see the users guide for details).</font>
-
-<a name="line412">412: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line414">414: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>()</font>
-<a name="line415">415: </a><font color="#B22222">@*/</font>
-<a name="line416">416: </a><strong><font color="#4169E1"><a name="STCheckNullSpace"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
-<a name="line417">417: </a>{
-<a name="line419">419: </a>  PetscInt       nc;
-
-
-<a name="line427">427: </a>  <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(V,&nc);
-<a name="line428">428: </a>  <font color="#4169E1">if</font> (nc && st->ops->checknullspace) {
-<a name="line429">429: </a>    (*st->ops->checknullspace)(st,V);
-<a name="line430">430: </a>  }
-<a name="line431">431: </a>  <font color="#4169E1">return</font>(0);
-<a name="line432">432: </a>}
+<a name="line292">292: </a><font color="#B22222">@*/</font>
+<a name="line293">293: </a><strong><font color="#4169E1"><a name="STSetKSP"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STSetKSP.html#STSetKSP">STSetKSP</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,KSP ksp)</font></strong>
+<a name="line294">294: </a>{
+
+<a name="line301">301: </a>  PetscObjectReference((PetscObject)ksp);
+<a name="line302">302: </a>  KSPDestroy(&st->ksp);
+<a name="line303">303: </a>  st->ksp = ksp;
+<a name="line304">304: </a>  PetscLogObjectParent((PetscObject)st,(PetscObject)st->ksp);
+<a name="line305">305: </a>  <font color="#4169E1">return</font>(0);
+<a name="line306">306: </a>}
+
+<a name="line310">310: </a><font color="#B22222">/*@</font>
+<a name="line311">311: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a> - Gets the KSP object associated with the spectral</font>
+<a name="line312">312: </a><font color="#B22222">   transformation.</font>
+
+<a name="line314">314: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line316">316: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line317">317: </a><font color="#B22222">.  st - the spectral transformation context</font>
+
+<a name="line319">319: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line320">320: </a><font color="#B22222">.  ksp  - the linear system context</font>
+
+<a name="line322">322: </a><font color="#B22222">   Level: intermediate</font>
+<a name="line323">323: </a><font color="#B22222">@*/</font>
+<a name="line324">324: </a><strong><font color="#4169E1"><a name="STGetKSP"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,KSP* ksp)</font></strong>
+<a name="line325">325: </a>{
+
+<a name="line331">331: </a>  <font color="#4169E1">if</font> (!st->ksp) {
+<a name="line332">332: </a>    KSPCreate(PetscObjectComm((PetscObject)st),&st->ksp);
+<a name="line333">333: </a>    KSPSetOptionsPrefix(st->ksp,((PetscObject)st)->prefix);
+<a name="line334">334: </a>    KSPAppendOptionsPrefix(st->ksp,<font color="#666666">"st_"</font>);
+<a name="line335">335: </a>    PetscObjectIncrementTabLevel((PetscObject)st->ksp,(PetscObject)st,1);
+<a name="line336">336: </a>    PetscLogObjectParent((PetscObject)st,(PetscObject)st->ksp);
+<a name="line337">337: </a>    KSPSetTolerances(st->ksp,SLEPC_DEFAULT_TOL,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
+<a name="line338">338: </a>  }
+<a name="line339">339: </a>  *ksp = st->ksp;
+<a name="line340">340: </a>  <font color="#4169E1">return</font>(0);
+<a name="line341">341: </a>}
+
+<a name="line345">345: </a><strong><font color="#4169E1"><a name="STCheckNullSpace_Default"></a>PetscErrorCode STCheckNullSpace_Default(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
+<a name="line346">346: </a>{
+<a name="line348">348: </a>  PetscInt       nc,i,c;
+<a name="line349">349: </a>  PetscReal      norm;
+<a name="line350">350: </a>  Vec            *T,w,vi;
+<a name="line351">351: </a>  Mat            A;
+<a name="line352">352: </a>  PC             pc;
+<a name="line353">353: </a>  MatNullSpace   nullsp;
+
+<a name="line356">356: </a>  <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(V,&nc);
+<a name="line357">357: </a>  PetscMalloc1(nc,&T);
+<a name="line358">358: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line359">359: </a>  KSPGetPC(st->ksp,&pc);
+<a name="line360">360: </a>  PCGetOperators(pc,&A,NULL);
+<a name="line361">361: </a>  MatCreateVecs(A,NULL,&w);
+<a name="line362">362: </a>  c = 0;
+<a name="line363">363: </a>  <font color="#4169E1">for</font> (i=0;i<nc;i++) {
+<a name="line364">364: </a>    <a href="../../../../../docs/manualpages/BV/BVGetColumn.html#BVGetColumn">BVGetColumn</a>(V,-nc+i,&vi);
+<a name="line365">365: </a>    MatMult(A,vi,w);
+<a name="line366">366: </a>    VecNorm(w,NORM_2,&norm);
+<a name="line367">367: </a>    <font color="#4169E1">if</font> (norm < 1e-8) {
+<a name="line368">368: </a>      PetscInfo2(st,<font color="#666666">"Vector %D norm=%g\n"</font>,i,(double)norm);
+<a name="line369">369: </a>      <a href="../../../../../docs/manualpages/BV/BVCreateVec.html#BVCreateVec">BVCreateVec</a>(V,T+c);
+<a name="line370">370: </a>      VecCopy(vi,T[c]);
+<a name="line371">371: </a>      c++;
+<a name="line372">372: </a>    }
+<a name="line373">373: </a>    <a href="../../../../../docs/manualpages/BV/BVRestoreColumn.html#BVRestoreColumn">BVRestoreColumn</a>(V,-nc+i,&vi);
+<a name="line374">374: </a>  }
+<a name="line375">375: </a>  VecDestroy(&w);
+<a name="line376">376: </a>  <font color="#4169E1">if</font> (c>0) {
+<a name="line377">377: </a>    MatNullSpaceCreate(PetscObjectComm((PetscObject)st),PETSC_FALSE,c,T,&nullsp);
+<a name="line378">378: </a>    MatSetNullSpace(A,nullsp);
+<a name="line379">379: </a>    MatNullSpaceDestroy(&nullsp);
+<a name="line380">380: </a>    VecDestroyVecs(c,&T);
+<a name="line381">381: </a>  } <font color="#4169E1">else</font> {
+<a name="line382">382: </a>    PetscFree(T);
+<a name="line383">383: </a>  }
+<a name="line384">384: </a>  <font color="#4169E1">return</font>(0);
+<a name="line385">385: </a>}
+
+<a name="line389">389: </a><font color="#B22222">/*@</font>
+<a name="line390">390: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</a> - Given a basis vectors object, this function tests each</font>
+<a name="line391">391: </a><font color="#B22222">   of its constraint vectors to be a nullspace vector of the coefficient</font>
+<a name="line392">392: </a><font color="#B22222">   matrix of the associated KSP object. All these nullspace vectors are passed</font>
+<a name="line393">393: </a><font color="#B22222">   to the KSP object.</font>
+
+<a name="line395">395: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line397">397: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line398">398: </a><font color="#B22222">+  st - the spectral transformation context</font>
+<a name="line399">399: </a><font color="#B22222">-  V  - basis vectors to be checked</font>
+
+<a name="line401">401: </a><font color="#B22222">   Note:</font>
+<a name="line402">402: </a><font color="#B22222">   This function allows to handle singular pencils and to solve some problems</font>
+<a name="line403">403: </a><font color="#B22222">   in which the nullspace is important (see the users guide for details).</font>
+
+<a name="line405">405: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line407">407: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSetDeflationSpace.html#EPSSetDeflationSpace">EPSSetDeflationSpace</a>()</font>
+<a name="line408">408: </a><font color="#B22222">@*/</font>
+<a name="line409">409: </a><strong><font color="#4169E1"><a name="STCheckNullSpace"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STCheckNullSpace.html#STCheckNullSpace">STCheckNullSpace</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,<a href="../../../../../docs/manualpages/BV/BV.html#BV">BV</a> V)</font></strong>
+<a name="line410">410: </a>{
+<a name="line412">412: </a>  PetscInt       nc;
+
+
+<a name="line420">420: </a>  <a href="../../../../../docs/manualpages/BV/BVGetNumConstraints.html#BVGetNumConstraints">BVGetNumConstraints</a>(V,&nc);
+<a name="line421">421: </a>  <font color="#4169E1">if</font> (nc && st->ops->checknullspace) {
+<a name="line422">422: </a>    (*st->ops->checknullspace)(st,V);
+<a name="line423">423: </a>  }
+<a name="line424">424: </a>  <font color="#4169E1">return</font>(0);
+<a name="line425">425: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/st/interface/stsolve.c b/src/sys/classes/st/interface/stsolve.c
index 4a1b39f..e4ad891 100644
--- a/src/sys/classes/st/interface/stsolve.c
+++ b/src/sys/classes/st/interface/stsolve.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -27,7 +27,7 @@
 #define __FUNCT__ "STApply"
 /*@
    STApply - Applies the spectral transformation operator to a vector, for
-   instance (A - sB)^-1 B in the case of the shift-and-invert tranformation
+   instance (A - sB)^-1 B in the case of the shift-and-invert transformation
    and generalized eigenproblem.
 
    Collective on ST and Vec
@@ -56,7 +56,7 @@ PetscErrorCode STApply(ST st,Vec x,Vec y)
   if (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,"x and y must be different vectors");
   VecLocked(y,3);
 
-  if (!st->setupcalled) { ierr = STSetUp(st);CHKERRQ(ierr); }
+  if (st->state!=ST_STATE_SETUP) { ierr = STSetUp(st);CHKERRQ(ierr); }
 
   if (!st->ops->apply) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_SUP,"ST does not have apply");
   ierr = VecLockPush(x);CHKERRQ(ierr);
@@ -77,7 +77,7 @@ PetscErrorCode STApply(ST st,Vec x,Vec y)
 #define __FUNCT__ "STApplyTranspose"
 /*@
    STApplyTranspose - Applies the transpose of the operator to a vector, for
-   instance B^T(A - sB)^-T in the case of the shift-and-invert tranformation
+   instance B^T(A - sB)^-T in the case of the shift-and-invert transformation
    and generalized eigenproblem.
 
    Collective on ST and Vec
@@ -106,7 +106,7 @@ PetscErrorCode STApplyTranspose(ST st,Vec x,Vec y)
   if (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,"x and y must be different vectors");
   VecLocked(y,3);
 
-  if (!st->setupcalled) { ierr = STSetUp(st);CHKERRQ(ierr); }
+  if (st->state!=ST_STATE_SETUP) { ierr = STSetUp(st);CHKERRQ(ierr); }
 
   if (!st->ops->applytrans) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_SUP,"ST does not have applytrans");
   ierr = VecLockPush(x);CHKERRQ(ierr);
@@ -273,7 +273,7 @@ PetscErrorCode STSetUp(ST st)
   PetscFunctionBegin;
   PetscValidHeaderSpecific(st,ST_CLASSID,1);
   STCheckMatrices(st,1);
-  if (st->setupcalled) PetscFunctionReturn(0);
+  if (st->state==ST_STATE_SETUP) PetscFunctionReturn(0);
   ierr = PetscInfo(st,"Setting up new ST\n");CHKERRQ(ierr);
   ierr = PetscLogEventBegin(ST_SetUp,st,0,0,0);CHKERRQ(ierr);
   if (!((PetscObject)st)->type_name) {
@@ -283,12 +283,12 @@ PetscErrorCode STSetUp(ST st)
     ierr = PetscMalloc(PetscMax(2,st->nmat)*sizeof(Mat),&st->T);CHKERRQ(ierr);
     ierr = PetscLogObjectMemory((PetscObject)st,PetscMax(2,st->nmat)*sizeof(Mat));CHKERRQ(ierr);
     for (i=0;i<PetscMax(2,st->nmat);i++) st->T[i] = NULL;
-  } else {
+  } else if (st->state!=ST_STATE_UPDATED) {
     for (i=0;i<PetscMax(2,st->nmat);i++) {
       ierr = MatDestroy(&st->T[i]);CHKERRQ(ierr);
     }
   }
-  ierr = MatDestroy(&st->P);CHKERRQ(ierr);
+  if (st->state!=ST_STATE_UPDATED) { ierr = MatDestroy(&st->P);CHKERRQ(ierr); }
   if (!st->w) {
     ierr = MatCreateVecs(st->A[0],&st->w,NULL);CHKERRQ(ierr);
     ierr = PetscLogObjectParent((PetscObject)st,(PetscObject)st->w);CHKERRQ(ierr);
@@ -303,7 +303,7 @@ PetscErrorCode STSetUp(ST st)
     }
   }
   if (st->ops->setup) { ierr = (*st->ops->setup)(st);CHKERRQ(ierr); }
-  st->setupcalled = 1;
+  st->state = ST_STATE_SETUP;
   ierr = PetscLogEventEnd(ST_SetUp,st,0,0,0);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -373,6 +373,7 @@ PetscErrorCode STMatMAXPY_Private(ST st,PetscScalar alpha,PetscScalar beta,Petsc
       *S = st->A[k+ini];
     } else {
       if (*S && *S!=st->A[k+ini]) {
+        ierr = MatSetOption(*S,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE);CHKERRQ(ierr);
         ierr = MatCopy(st->A[k+ini],*S,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
       } else {
         ierr = MatDestroy(S);CHKERRQ(ierr);
diff --git a/src/sys/classes/st/interface/stsolve.c.html b/src/sys/classes/st/interface/stsolve.c.html
index aa7aa4c..2db71ce 100644
--- a/src/sys/classes/st/interface/stsolve.c.html
+++ b/src/sys/classes/st/interface/stsolve.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/interface/stsolve.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:11+00:00">
+<meta name="date" content="2016-05-16T10:32:05+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/interface/stsolve.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/interface/stsolve.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">    The <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> (spectral transformation) interface routines, callable by users.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -37,7 +37,7 @@
 
 <a name="line28"> 28: </a><font color="#B22222">/*@</font>
 <a name="line29"> 29: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STApply.html#STApply">STApply</a> - Applies the spectral transformation operator to a vector, for</font>
-<a name="line30"> 30: </a><font color="#B22222">   instance (A - sB)^-1 B in the case of the shift-and-invert tranformation</font>
+<a name="line30"> 30: </a><font color="#B22222">   instance (A - sB)^-1 B in the case of the shift-and-invert transformation</font>
 <a name="line31"> 31: </a><font color="#B22222">   and generalized eigenproblem.</font>
 
 <a name="line33"> 33: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> and Vec</font>
@@ -60,7 +60,7 @@
 <a name="line56"> 56: </a>  <font color="#4169E1">if</font> (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,<font color="#666666">"x and y must be different vectors"</font>);
 <a name="line57"> 57: </a>  VecLocked(y,3);
 
-<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (!st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
+<a name="line59"> 59: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_SETUP) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
 
 <a name="line61"> 61: </a>  <font color="#4169E1">if</font> (!st->ops->apply) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_SUP,<font color="#666666">"<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> does not have apply"</font>);
 <a name="line62"> 62: </a>  VecLockPush(x);
@@ -79,7 +79,7 @@
 
 <a name="line78"> 78: </a><font color="#B22222">/*@</font>
 <a name="line79"> 79: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STApplyTranspose.html#STApplyTranspose">STApplyTranspose</a> - Applies the transpose of the operator to a vector, for</font>
-<a name="line80"> 80: </a><font color="#B22222">   instance B^T(A - sB)^-T in the case of the shift-and-invert tranformation</font>
+<a name="line80"> 80: </a><font color="#B22222">   instance B^T(A - sB)^-T in the case of the shift-and-invert transformation</font>
 <a name="line81"> 81: </a><font color="#B22222">   and generalized eigenproblem.</font>
 
 <a name="line83"> 83: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> and Vec</font>
@@ -102,7 +102,7 @@
 <a name="line106">106: </a>  <font color="#4169E1">if</font> (x == y) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_ARG_IDN,<font color="#666666">"x and y must be different vectors"</font>);
 <a name="line107">107: </a>  VecLocked(y,3);
 
-<a name="line109">109: </a>  <font color="#4169E1">if</font> (!st->setupcalled) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
+<a name="line109">109: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_SETUP) { <a href="../../../../../docs/manualpages/ST/STSetUp.html#STSetUp">STSetUp</a>(st); }
 
 <a name="line111">111: </a>  <font color="#4169E1">if</font> (!st->ops->applytrans) SETERRQ(PetscObjectComm((PetscObject)st),PETSC_ERR_SUP,<font color="#666666">"<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> does not have applytrans"</font>);
 <a name="line112">112: </a>  VecLockPush(x);
@@ -248,7 +248,7 @@
 <a name="line270">270: </a>  PetscInt       i,n,k;
 
 <a name="line275">275: </a>  STCheckMatrices(st,1);
-<a name="line276">276: </a>  <font color="#4169E1">if</font> (st->setupcalled) <font color="#4169E1">return</font>(0);
+<a name="line276">276: </a>  <font color="#4169E1">if</font> (st->state==ST_STATE_SETUP) <font color="#4169E1">return</font>(0);
 <a name="line277">277: </a>  PetscInfo(st,<font color="#666666">"Setting up new <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>\n"</font>);
 <a name="line278">278: </a>  PetscLogEventBegin(ST_SetUp,st,0,0,0);
 <a name="line279">279: </a>  <font color="#4169E1">if</font> (!((PetscObject)st)->type_name) {
@@ -258,12 +258,12 @@
 <a name="line283">283: </a>    PetscMalloc(PetscMax(2,st->nmat)*<font color="#4169E1">sizeof</font>(Mat),&st->T);
 <a name="line284">284: </a>    PetscLogObjectMemory((PetscObject)st,PetscMax(2,st->nmat)*<font color="#4169E1">sizeof</font>(Mat));
 <a name="line285">285: </a>    <font color="#4169E1">for</font> (i=0;i<PetscMax(2,st->nmat);i++) st->T[i] = NULL;
-<a name="line286">286: </a>  } <font color="#4169E1">else</font> {
+<a name="line286">286: </a>  } <font color="#4169E1">else</font> <font color="#4169E1">if</font> (st->state!=ST_STATE_UPDATED) {
 <a name="line287">287: </a>    <font color="#4169E1">for</font> (i=0;i<PetscMax(2,st->nmat);i++) {
 <a name="line288">288: </a>      MatDestroy(&st->T[i]);
 <a name="line289">289: </a>    }
 <a name="line290">290: </a>  }
-<a name="line291">291: </a>  MatDestroy(&st->P);
+<a name="line291">291: </a>  <font color="#4169E1">if</font> (st->state!=ST_STATE_UPDATED) { MatDestroy(&st->P); }
 <a name="line292">292: </a>  <font color="#4169E1">if</font> (!st->w) {
 <a name="line293">293: </a>    MatCreateVecs(st->A[0],&st->w,NULL);
 <a name="line294">294: </a>    PetscLogObjectParent((PetscObject)st,(PetscObject)st->w);
@@ -278,7 +278,7 @@
 <a name="line303">303: </a>    }
 <a name="line304">304: </a>  }
 <a name="line305">305: </a>  <font color="#4169E1">if</font> (st->ops->setup) { (*st->ops->setup)(st); }
-<a name="line306">306: </a>  st->setupcalled = 1;
+<a name="line306">306: </a>  st->state = ST_STATE_SETUP;
 <a name="line307">307: </a>  PetscLogEventEnd(ST_SetUp,st,0,0,0);
 <a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
 <a name="line309">309: </a>}
@@ -344,139 +344,140 @@
 <a name="line373">373: </a>      *S = st->A[k+ini];
 <a name="line374">374: </a>    } <font color="#4169E1">else</font> {
 <a name="line375">375: </a>      <font color="#4169E1">if</font> (*S && *S!=st->A[k+ini]) {
-<a name="line376">376: </a>        MatCopy(st->A[k+ini],*S,DIFFERENT_NONZERO_PATTERN);
-<a name="line377">377: </a>      } <font color="#4169E1">else</font> {
-<a name="line378">378: </a>        MatDestroy(S);
-<a name="line379">379: </a>        MatDuplicate(st->A[k+ini],MAT_COPY_VALUES,S);
-<a name="line380">380: </a>        PetscLogObjectParent((PetscObject)st,(PetscObject)*S);
-<a name="line381">381: </a>      }
-<a name="line382">382: </a>      <font color="#4169E1">if</font> (coeffs && coeffs[ini]!=1.0) {
-<a name="line383">383: </a>        MatScale(*S,coeffs[ini]);
-<a name="line384">384: </a>      }
-<a name="line385">385: </a>      <font color="#4169E1">for</font> (i=ini+k+1;i<PetscMax(2,st->nmat);i++) {
-<a name="line386">386: </a>        t *= alpha;
-<a name="line387">387: </a>        ta = t;
-<a name="line388">388: </a>        <font color="#4169E1">if</font> (coeffs) ta *= coeffs[i-k];
-<a name="line389">389: </a>        <font color="#4169E1">if</font> (ta!=0.0) {
-<a name="line390">390: </a>          <font color="#4169E1">if</font> (st->nmat>1) {
-<a name="line391">391: </a>            MatAXPY(*S,ta,st->A[i],st->str);
-<a name="line392">392: </a>          } <font color="#4169E1">else</font> {
-<a name="line393">393: </a>            MatShift(*S,ta);
-<a name="line394">394: </a>          }
-<a name="line395">395: </a>        }
-<a name="line396">396: </a>      }
-<a name="line397">397: </a>    }
-<a name="line398">398: </a>  }
-<a name="line399">399: </a>  STMatSetHermitian(st,*S);
-<a name="line400">400: </a>  <font color="#4169E1">return</font>(0);
-<a name="line401">401: </a>}
-
-<a name="line405">405: </a><font color="#B22222">/*</font>
-<a name="line406">406: </a><font color="#B22222">   Computes the values of the coefficients required by STMatMAXPY_Private</font>
-<a name="line407">407: </a><font color="#B22222">   for the case of monomial basis.</font>
-<a name="line408">408: </a><font color="#B22222">*/</font>
-<a name="line409">409: </a><strong><font color="#4169E1"><a name="STCoeffs_Monomial"></a>PetscErrorCode STCoeffs_Monomial(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st, PetscScalar *coeffs)</font></strong>
-<a name="line410">410: </a>{
-<a name="line411">411: </a>  PetscInt  k,i,ini,inip;  
-
-<a name="line414">414: </a>  <font color="#B22222">/* Compute binomial coefficients */</font>
-<a name="line415">415: </a>  ini = (st->nmat*(st->nmat-1))/2;
-<a name="line416">416: </a>  <font color="#4169E1">for</font> (i=0;i<st->nmat;i++) coeffs[ini+i]=1.0;
-<a name="line417">417: </a>  <font color="#4169E1">for</font> (k=st->nmat-1;k>=1;k--) {
-<a name="line418">418: </a>    inip = ini+1;
-<a name="line419">419: </a>    ini = (k*(k-1))/2;
-<a name="line420">420: </a>    coeffs[ini] = 1.0;
-<a name="line421">421: </a>    <font color="#4169E1">for</font> (i=1;i<k;i++) coeffs[ini+i] = coeffs[ini+i-1]+coeffs[inip+i-1];
-<a name="line422">422: </a>  }
-<a name="line423">423: </a>  <font color="#4169E1">return</font>(0);
-<a name="line424">424: </a>}
-
-<a name="line428">428: </a><font color="#B22222">/*@</font>
-<a name="line429">429: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STPostSolve.html#STPostSolve">STPostSolve</a> - Optional post-solve phase, intended for any actions that must</font>
-<a name="line430">430: </a><font color="#B22222">   be performed on the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> object after the eigensolver has finished.</font>
-
-<a name="line432">432: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line434">434: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line435">435: </a><font color="#B22222">.  st  - the spectral transformation context</font>
-
-<a name="line437">437: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line439">439: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>()</font>
-<a name="line440">440: </a><font color="#B22222">@*/</font>
-<a name="line441">441: </a><strong><font color="#4169E1"><a name="STPostSolve"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STPostSolve.html#STPostSolve">STPostSolve</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
-<a name="line442">442: </a>{
-
-<a name="line448">448: </a>  <font color="#4169E1">if</font> (st->ops->postsolve) {
-<a name="line449">449: </a>    (*st->ops->postsolve)(st);
-<a name="line450">450: </a>  }
-<a name="line451">451: </a>  <font color="#4169E1">return</font>(0);
-<a name="line452">452: </a>}
-
-<a name="line456">456: </a><font color="#B22222">/*@</font>
-<a name="line457">457: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a> - Back-transformation phase, intended for</font>
-<a name="line458">458: </a><font color="#B22222">   spectral transformations which require to transform the computed</font>
-<a name="line459">459: </a><font color="#B22222">   eigenvalues back to the original eigenvalue problem.</font>
-
-<a name="line461">461: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line463">463: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line464">464: </a><font color="#B22222">   st   - the spectral transformation context</font>
-<a name="line465">465: </a><font color="#B22222">   eigr - real part of a computed eigenvalue</font>
-<a name="line466">466: </a><font color="#B22222">   eigi - imaginary part of a computed eigenvalue</font>
-
-<a name="line468">468: </a><font color="#B22222">   Level: developer</font>
-<a name="line469">469: </a><font color="#B22222">@*/</font>
-<a name="line470">470: </a><strong><font color="#4169E1"><a name="STBackTransform"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)</font></strong>
-<a name="line471">471: </a>{
-
-<a name="line477">477: </a>  <font color="#4169E1">if</font> (st->ops->backtransform) {
-<a name="line478">478: </a>    (*st->ops->backtransform)(st,n,eigr,eigi);
-<a name="line479">479: </a>  }
-<a name="line480">480: </a>  <font color="#4169E1">return</font>(0);
-<a name="line481">481: </a>}
-
-<a name="line485">485: </a><font color="#B22222">/*@</font>
-<a name="line486">486: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a> - Build the preconditioner matrix used in <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>().</font>
-
-<a name="line488">488: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
-
-<a name="line490">490: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line491">491: </a><font color="#B22222">+  st     - the spectral transformation context</font>
-<a name="line492">492: </a><font color="#B22222">.  sigma  - the shift</font>
-<a name="line493">493: </a><font color="#B22222">-  coeffs - the coefficients (may be NULL)</font>
-
-<a name="line495">495: </a><font color="#B22222">   Note:</font>
-<a name="line496">496: </a><font color="#B22222">   This function is not intended to be called by end users, but by SLEPc</font>
-<a name="line497">497: </a><font color="#B22222">   solvers that use <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>. It builds matrix st->P as follows, then calls KSPSetUp().</font>
-<a name="line498">498: </a><font color="#B22222">.vb</font>
-<a name="line499">499: </a><font color="#B22222">    If (coeffs):  st->P = Sum_{i=0:nmat-1} coeffs[i]*sigma^i*A_i.</font>
-<a name="line500">500: </a><font color="#B22222">    else          st->P = Sum_{i=0:nmat-1} sigma^i*A_i</font>
-<a name="line501">501: </a><font color="#B22222">.ve</font>
-
-<a name="line503">503: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line505">505: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>()</font>
-<a name="line506">506: </a><font color="#B22222">@*/</font>
-<a name="line507">507: </a><strong><font color="#4169E1"><a name="STMatSetUp"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar sigma,PetscScalar *coeffs)</font></strong>
-<a name="line508">508: </a>{
-<a name="line510">510: </a>  PetscBool      flg;
-
-<a name="line515">515: </a>  STCheckMatrices(st,1);
-
-<a name="line517">517: </a>  PetscLogEventBegin(ST_MatSetUp,st,0,0,0);
-<a name="line518">518: </a>  STMatMAXPY_Private(st,sigma,0.0,0,coeffs,PETSC_TRUE,&st->P);
-<a name="line519">519: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
-<a name="line520">520: </a>  STCheckFactorPackage(st);
-<a name="line521">521: </a>  KSPSetOperators(st->ksp,st->P,st->P);
-<a name="line522">522: </a>  PetscObjectTypeCompare((PetscObject)st,STPRECOND,&flg);
-<a name="line523">523: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line524">524: </a>    KSPSetErrorIfNotConverged(st->ksp,PETSC_TRUE);
-<a name="line525">525: </a>  }
-<a name="line526">526: </a>  KSPSetUp(st->ksp);
-<a name="line527">527: </a>  PetscLogEventEnd(ST_MatSetUp,st,0,0,0);
-<a name="line528">528: </a>  <font color="#4169E1">return</font>(0);
-<a name="line529">529: </a>}
+<a name="line376">376: </a>        MatSetOption(*S,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE);
+<a name="line377">377: </a>        MatCopy(st->A[k+ini],*S,DIFFERENT_NONZERO_PATTERN);
+<a name="line378">378: </a>      } <font color="#4169E1">else</font> {
+<a name="line379">379: </a>        MatDestroy(S);
+<a name="line380">380: </a>        MatDuplicate(st->A[k+ini],MAT_COPY_VALUES,S);
+<a name="line381">381: </a>        PetscLogObjectParent((PetscObject)st,(PetscObject)*S);
+<a name="line382">382: </a>      }
+<a name="line383">383: </a>      <font color="#4169E1">if</font> (coeffs && coeffs[ini]!=1.0) {
+<a name="line384">384: </a>        MatScale(*S,coeffs[ini]);
+<a name="line385">385: </a>      }
+<a name="line386">386: </a>      <font color="#4169E1">for</font> (i=ini+k+1;i<PetscMax(2,st->nmat);i++) {
+<a name="line387">387: </a>        t *= alpha;
+<a name="line388">388: </a>        ta = t;
+<a name="line389">389: </a>        <font color="#4169E1">if</font> (coeffs) ta *= coeffs[i-k];
+<a name="line390">390: </a>        <font color="#4169E1">if</font> (ta!=0.0) {
+<a name="line391">391: </a>          <font color="#4169E1">if</font> (st->nmat>1) {
+<a name="line392">392: </a>            MatAXPY(*S,ta,st->A[i],st->str);
+<a name="line393">393: </a>          } <font color="#4169E1">else</font> {
+<a name="line394">394: </a>            MatShift(*S,ta);
+<a name="line395">395: </a>          }
+<a name="line396">396: </a>        }
+<a name="line397">397: </a>      }
+<a name="line398">398: </a>    }
+<a name="line399">399: </a>  }
+<a name="line400">400: </a>  STMatSetHermitian(st,*S);
+<a name="line401">401: </a>  <font color="#4169E1">return</font>(0);
+<a name="line402">402: </a>}
+
+<a name="line406">406: </a><font color="#B22222">/*</font>
+<a name="line407">407: </a><font color="#B22222">   Computes the values of the coefficients required by STMatMAXPY_Private</font>
+<a name="line408">408: </a><font color="#B22222">   for the case of monomial basis.</font>
+<a name="line409">409: </a><font color="#B22222">*/</font>
+<a name="line410">410: </a><strong><font color="#4169E1"><a name="STCoeffs_Monomial"></a>PetscErrorCode STCoeffs_Monomial(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st, PetscScalar *coeffs)</font></strong>
+<a name="line411">411: </a>{
+<a name="line412">412: </a>  PetscInt  k,i,ini,inip;  
+
+<a name="line415">415: </a>  <font color="#B22222">/* Compute binomial coefficients */</font>
+<a name="line416">416: </a>  ini = (st->nmat*(st->nmat-1))/2;
+<a name="line417">417: </a>  <font color="#4169E1">for</font> (i=0;i<st->nmat;i++) coeffs[ini+i]=1.0;
+<a name="line418">418: </a>  <font color="#4169E1">for</font> (k=st->nmat-1;k>=1;k--) {
+<a name="line419">419: </a>    inip = ini+1;
+<a name="line420">420: </a>    ini = (k*(k-1))/2;
+<a name="line421">421: </a>    coeffs[ini] = 1.0;
+<a name="line422">422: </a>    <font color="#4169E1">for</font> (i=1;i<k;i++) coeffs[ini+i] = coeffs[ini+i-1]+coeffs[inip+i-1];
+<a name="line423">423: </a>  }
+<a name="line424">424: </a>  <font color="#4169E1">return</font>(0);
+<a name="line425">425: </a>}
+
+<a name="line429">429: </a><font color="#B22222">/*@</font>
+<a name="line430">430: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STPostSolve.html#STPostSolve">STPostSolve</a> - Optional post-solve phase, intended for any actions that must</font>
+<a name="line431">431: </a><font color="#B22222">   be performed on the <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> object after the eigensolver has finished.</font>
+
+<a name="line433">433: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line435">435: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line436">436: </a><font color="#B22222">.  st  - the spectral transformation context</font>
+
+<a name="line438">438: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line440">440: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/EPS/EPSSolve.html#EPSSolve">EPSSolve</a>()</font>
+<a name="line441">441: </a><font color="#B22222">@*/</font>
+<a name="line442">442: </a><strong><font color="#4169E1"><a name="STPostSolve"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STPostSolve.html#STPostSolve">STPostSolve</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st)</font></strong>
+<a name="line443">443: </a>{
+
+<a name="line449">449: </a>  <font color="#4169E1">if</font> (st->ops->postsolve) {
+<a name="line450">450: </a>    (*st->ops->postsolve)(st);
+<a name="line451">451: </a>  }
+<a name="line452">452: </a>  <font color="#4169E1">return</font>(0);
+<a name="line453">453: </a>}
+
+<a name="line457">457: </a><font color="#B22222">/*@</font>
+<a name="line458">458: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a> - Back-transformation phase, intended for</font>
+<a name="line459">459: </a><font color="#B22222">   spectral transformations which require to transform the computed</font>
+<a name="line460">460: </a><font color="#B22222">   eigenvalues back to the original eigenvalue problem.</font>
+
+<a name="line462">462: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line464">464: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line465">465: </a><font color="#B22222">   st   - the spectral transformation context</font>
+<a name="line466">466: </a><font color="#B22222">   eigr - real part of a computed eigenvalue</font>
+<a name="line467">467: </a><font color="#B22222">   eigi - imaginary part of a computed eigenvalue</font>
+
+<a name="line469">469: </a><font color="#B22222">   Level: developer</font>
+<a name="line470">470: </a><font color="#B22222">@*/</font>
+<a name="line471">471: </a><strong><font color="#4169E1"><a name="STBackTransform"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STBackTransform.html#STBackTransform">STBackTransform</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscInt n,PetscScalar* eigr,PetscScalar* eigi)</font></strong>
+<a name="line472">472: </a>{
+
+<a name="line478">478: </a>  <font color="#4169E1">if</font> (st->ops->backtransform) {
+<a name="line479">479: </a>    (*st->ops->backtransform)(st,n,eigr,eigi);
+<a name="line480">480: </a>  }
+<a name="line481">481: </a>  <font color="#4169E1">return</font>(0);
+<a name="line482">482: </a>}
+
+<a name="line486">486: </a><font color="#B22222">/*@</font>
+<a name="line487">487: </a><font color="#B22222">   <a href="../../../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a> - Build the preconditioner matrix used in <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>().</font>
+
+<a name="line489">489: </a><font color="#B22222">   Collective on <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a></font>
+
+<a name="line491">491: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line492">492: </a><font color="#B22222">+  st     - the spectral transformation context</font>
+<a name="line493">493: </a><font color="#B22222">.  sigma  - the shift</font>
+<a name="line494">494: </a><font color="#B22222">-  coeffs - the coefficients (may be NULL)</font>
+
+<a name="line496">496: </a><font color="#B22222">   Note:</font>
+<a name="line497">497: </a><font color="#B22222">   This function is not intended to be called by end users, but by SLEPc</font>
+<a name="line498">498: </a><font color="#B22222">   solvers that use <a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a>. It builds matrix st->P as follows, then calls KSPSetUp().</font>
+<a name="line499">499: </a><font color="#B22222">.vb</font>
+<a name="line500">500: </a><font color="#B22222">    If (coeffs):  st->P = Sum_{i=0:nmat-1} coeffs[i]*sigma^i*A_i.</font>
+<a name="line501">501: </a><font color="#B22222">    else          st->P = Sum_{i=0:nmat-1} sigma^i*A_i</font>
+<a name="line502">502: </a><font color="#B22222">.ve</font>
+
+<a name="line504">504: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line506">506: </a><font color="#B22222">.seealso: <a href="../../../../../docs/manualpages/ST/STMatSolve.html#STMatSolve">STMatSolve</a>()</font>
+<a name="line507">507: </a><font color="#B22222">@*/</font>
+<a name="line508">508: </a><strong><font color="#4169E1"><a name="STMatSetUp"></a>PetscErrorCode <a href="../../../../../docs/manualpages/ST/STMatSetUp.html#STMatSetUp">STMatSetUp</a>(<a href="../../../../../docs/manualpages/ST/ST.html#ST">ST</a> st,PetscScalar sigma,PetscScalar *coeffs)</font></strong>
+<a name="line509">509: </a>{
+<a name="line511">511: </a>  PetscBool      flg;
+
+<a name="line516">516: </a>  STCheckMatrices(st,1);
+
+<a name="line518">518: </a>  PetscLogEventBegin(ST_MatSetUp,st,0,0,0);
+<a name="line519">519: </a>  STMatMAXPY_Private(st,sigma,0.0,0,coeffs,PETSC_TRUE,&st->P);
+<a name="line520">520: </a>  <font color="#4169E1">if</font> (!st->ksp) { <a href="../../../../../docs/manualpages/ST/STGetKSP.html#STGetKSP">STGetKSP</a>(st,&st->ksp); }
+<a name="line521">521: </a>  STCheckFactorPackage(st);
+<a name="line522">522: </a>  KSPSetOperators(st->ksp,st->P,st->P);
+<a name="line523">523: </a>  PetscObjectTypeCompare((PetscObject)st,STPRECOND,&flg);
+<a name="line524">524: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line525">525: </a>    KSPSetErrorIfNotConverged(st->ksp,PETSC_TRUE);
+<a name="line526">526: </a>  }
+<a name="line527">527: </a>  KSPSetUp(st->ksp);
+<a name="line528">528: </a>  PetscLogEventEnd(ST_MatSetUp,st,0,0,0);
+<a name="line529">529: </a>  <font color="#4169E1">return</font>(0);
+<a name="line530">530: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/classes/st/makefile b/src/sys/classes/st/makefile
index ad5761f..bdcf9f1 100644
--- a/src/sys/classes/st/makefile
+++ b/src/sys/classes/st/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/classes/st/makefile.html b/src/sys/classes/st/makefile.html
index 12805cf..b3c4238 100644
--- a/src/sys/classes/st/makefile.html
+++ b/src/sys/classes/st/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/classes/st/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:09+00:00">
+<meta name="date" content="2016-05-16T10:32:03+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/classes/st/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/classes/st/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/dlregisslepc.c b/src/sys/dlregisslepc.c
index ccf0218..88b9f83 100644
--- a/src/sys/dlregisslepc.c
+++ b/src/sys/dlregisslepc.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/dlregisslepc.c.html b/src/sys/dlregisslepc.c.html
index 8881f0b..aba7395 100644
--- a/src/sys/dlregisslepc.c.html
+++ b/src/sys/dlregisslepc.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/dlregisslepc.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:40+00:00">
+<meta name="date" content="2016-05-16T10:31:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/dlregisslepc.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/dlregisslepc.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
diff --git a/src/sys/f90-mod/index.html b/src/sys/f90-mod/index.html
index bf39dd0..a934ea5 100644
--- a/src/sys/f90-mod/index.html
+++ b/src/sys/f90-mod/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/f90-mod/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>SLEPc System routines</h2>
 
diff --git a/src/sys/f90-mod/makefile b/src/sys/f90-mod/makefile
index 03557fe..fa065cd 100644
--- a/src/sys/f90-mod/makefile
+++ b/src/sys/f90-mod/makefile
@@ -1,7 +1,7 @@
 
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/f90-mod/makefile.html b/src/sys/f90-mod/makefile.html
index 53a09cb..f3d3c82 100644
--- a/src/sys/f90-mod/makefile.html
+++ b/src/sys/f90-mod/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/f90-mod/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:40+00:00">
+<meta name="date" content="2016-05-16T10:32:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/f90-mod/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80">
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/f90-mod/slepcsysmod.F b/src/sys/f90-mod/slepcsysmod.F
index 4f2a2b4..f7f1c8d 100644
--- a/src/sys/f90-mod/slepcsysmod.F
+++ b/src/sys/f90-mod/slepcsysmod.F
@@ -1,6 +1,6 @@
 !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 !  SLEPc - Scalable Library for Eigenvalue Problem Computations
-!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 !
 !  This file is part of SLEPc.
 !     
diff --git a/src/sys/f90-mod/slepcsysmod.F.html b/src/sys/f90-mod/slepcsysmod.F.html
index e9d9dfa..a974249 100644
--- a/src/sys/f90-mod/slepcsysmod.F.html
+++ b/src/sys/f90-mod/slepcsysmod.F.html
@@ -4,15 +4,15 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/f90-mod/slepcsysmod.F.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:39+00:00">
+<meta name="date" content="2016-05-16T10:32:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/f90-mod/slepcsysmod.F.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/f90-mod/slepcsysmod.F.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a>!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 <a name="line2">  2: </a>!  SLEPc - Scalable Library <font color="#4169E1">for</font> Eigenvalue Problem Computations
-<a name="line3">  3: </a>!  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+<a name="line3">  3: </a>!  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 <a name="line4">  4: </a>!
 <a name="line5">  5: </a>!  This file is part of SLEPc.
 <a name="line6">  6: </a>!     
diff --git a/src/sys/ftn-custom/makefile b/src/sys/ftn-custom/makefile
index b57fe95..a743ee0 100644
--- a/src/sys/ftn-custom/makefile
+++ b/src/sys/ftn-custom/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
@@ -23,7 +23,7 @@
 ALL: lib
 CFLAGS   = -DSLEPC_LIB_DIR='"${SLEPC_DESTDIR}/lib"'
 FFLAGS   =
-SOURCEC  = zslepc_start.c zslepc_startf.c
+SOURCEC  = zslepcutil.c zslepc_start.c zslepc_startf.c
 SOURCEF  =
 SOURCEH  =
 DIRS     =
diff --git a/src/sys/ftn-custom/zslepc_start.c b/src/sys/ftn-custom/zslepc_start.c
index 76d4ad8..343ac13 100644
--- a/src/sys/ftn-custom/zslepc_start.c
+++ b/src/sys/ftn-custom/zslepc_start.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/ftn-custom/zslepc_startf.c b/src/sys/ftn-custom/zslepc_startf.c
index aeac18f..7cc9e53 100644
--- a/src/sys/ftn-custom/zslepc_startf.c
+++ b/src/sys/ftn-custom/zslepc_startf.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/ftn-custom/zslepcutil.c b/src/sys/ftn-custom/zslepcutil.c
new file mode 100644
index 0000000..c13f381
--- /dev/null
+++ b/src/sys/ftn-custom/zslepcutil.c
@@ -0,0 +1,44 @@
+/*
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+   SLEPc - Scalable Library for Eigenvalue Problem Computations
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
+
+   This file is part of SLEPc.
+
+   SLEPc is free software: you can redistribute it and/or modify it under  the
+   terms of version 3 of the GNU Lesser General Public License as published by
+   the Free Software Foundation.
+
+   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
+   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
+   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
+   more details.
+
+   You  should have received a copy of the GNU Lesser General  Public  License
+   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
+
+#include <slepc/private/slepcimpl.h>
+#include <petsc/private/fortranimpl.h>
+
+#if defined(PETSC_HAVE_FORTRAN_CAPS)
+#define slepcconvmonitorcreate_       SLEPCCONVMONITORCREATE
+#define slepcconvmonitordestroy_      SLEPCCONVMONITORDESTROY
+#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
+#define slepcconvmonitorcreate_       slepcconvmonitorcreate
+#define slepcconvmonitordestroy_      slepcconvmonitordestroy
+#endif
+
+PETSC_EXTERN void PETSC_STDCALL slepcconvmonitorcreate_(PetscViewer *vin,PetscViewerFormat *format,SlepcConvMonitor *ctx,PetscErrorCode *ierr)
+{
+  PetscViewer v;
+  PetscPatchDefaultViewers_Fortran(vin,v);
+  *ierr = SlepcConvMonitorCreate(v,*format,ctx);
+}
+
+PETSC_EXTERN void slepcconvmonitordestroy_(SlepcConvMonitor *ctx,PetscErrorCode *ierr)
+{
+  *ierr = SlepcConvMonitorDestroy(ctx);
+}
+
diff --git a/src/sys/index.html b/src/sys/index.html
index 7b5c3a7..74a22a9 100644
--- a/src/sys/index.html
+++ b/src/sys/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>SLEPc System routines</h2>
 
diff --git a/src/sys/makefile b/src/sys/makefile
index 1090e4d..024bf84 100644
--- a/src/sys/makefile
+++ b/src/sys/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/makefile.html b/src/sys/makefile.html
index a7bad09..6be3541 100644
--- a/src/sys/makefile.html
+++ b/src/sys/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:40+00:00">
+<meta name="date" content="2016-05-16T10:31:30+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/slepcinit.c b/src/sys/slepcinit.c
index 8f0aa4f..d1edecb 100644
--- a/src/sys/slepcinit.c
+++ b/src/sys/slepcinit.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -133,7 +133,7 @@ PetscErrorCode SlepcInitialize_DynamicLibraries(void)
 
   PetscFunctionBegin;
   preload = PETSC_FALSE;
-  ierr = PetscOptionsGetBool(NULL,"-dynamic_library_preload",&preload,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsGetBool(NULL,NULL,"-dynamic_library_preload",&preload,NULL);CHKERRQ(ierr);
   if (preload) {
 #if defined(PETSC_USE_SINGLE_LIBRARY)
     ierr = SlepcLoadDynamicLibrary("",&found);CHKERRQ(ierr);
@@ -184,14 +184,15 @@ PetscErrorCode SlepcCitationsInitialize()
     "   volume = \"31\",\n"
     "   number = \"3\",\n"
     "   pages = \"351--362\",\n"
-    "   year = \"2005\"\n"
+    "   year = \"2005,\"\n"
+    "   doi = \"http://dx.doi.org/10.1145/1089014.1089019\"\n"
     "}\n",NULL);CHKERRQ(ierr);
   ierr = PetscCitationsRegister("@TechReport{slepc-manual,\n"
     "   author = \"J. E. Roman and C. Campos and E. Romero and A. Tomas\",\n"
     "   title = \"{SLEPc} Users Manual\",\n"
-    "   number = \"DSIC-II/24/02 - Revision 3.6\",\n"
+    "   number = \"DSIC-II/24/02 - Revision 3.7\",\n"
     "   institution = \"D. Sistemes Inform\\`atics i Computaci\\'o, Universitat Polit\\`ecnica de Val\\`encia\",\n"
-    "   year = \"2015\"\n"
+    "   year = \"2016\"\n"
     "}\n",NULL);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
@@ -263,15 +264,15 @@ PetscErrorCode SlepcInitialize(int *argc,char ***args,const char file[],const ch
 @*/
 PetscErrorCode SlepcFinalize(void)
 {
-  PetscErrorCode ierr;
+  PetscErrorCode ierr = 0;
 
   PetscFunctionBegin;
   ierr = PetscInfo(0,"SlepcFinalize() called\n");CHKERRQ(ierr);
   if (SlepcBeganPetsc) {
-    ierr = PetscFinalize();CHKERRQ(ierr);
+    ierr = PetscFinalize();
   }
   SlepcInitializeCalled = PETSC_FALSE;
-  PetscFunctionReturn(0);
+  PetscFunctionReturn(ierr);
 }
 
 #undef __FUNCT__
diff --git a/src/sys/slepcinit.c.html b/src/sys/slepcinit.c.html
index ed86f6b..9bf29d6 100644
--- a/src/sys/slepcinit.c.html
+++ b/src/sys/slepcinit.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/slepcinit.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:37+00:00">
+<meta name="date" content="2016-05-16T10:31:27+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/slepcinit.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/slepcinit.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -126,7 +126,7 @@
 <a name="line132">132: </a>  PetscBool      preload;
 
 <a name="line135">135: </a>  preload = PETSC_FALSE;
-<a name="line136">136: </a>  PetscOptionsGetBool(NULL,<font color="#666666">"-dynamic_library_preload"</font>,&preload,NULL);
+<a name="line136">136: </a>  PetscOptionsGetBool(NULL,NULL,<font color="#666666">"-dynamic_library_preload"</font>,&preload,NULL);
 <a name="line137">137: </a>  <font color="#4169E1">if</font> (preload) {
 <a name="line138">138: </a><font color="#A020F0">#if defined(PETSC_USE_SINGLE_LIBRARY)</font>
 <a name="line139">139: </a>    SlepcLoadDynamicLibrary(<font color="#666666">""</font>,&found);
@@ -173,142 +173,144 @@
 <a name="line184">184: </a>    <font color="#666666">"   volume = \"31\",\n"</font>
 <a name="line185">185: </a>    <font color="#666666">"   number = \"3\",\n"</font>
 <a name="line186">186: </a>    <font color="#666666">"   pages = \"351--362\",\n"</font>
-<a name="line187">187: </a>    <font color="#666666">"   year = \"2005\"\n"</font>
-<a name="line188">188: </a>    <font color="#666666">"}\n"</font>,NULL);
-<a name="line189">189: </a>  PetscCitationsRegister(<font color="#666666">"@TechReport{slepc-manual,\n"</font>
-<a name="line190">190: </a>    <font color="#666666">"   author = \"J. E. Roman and C. Campos and E. Romero and A. Tomas\",\n"</font>
-<a name="line191">191: </a>    <font color="#666666">"   title = \"{SLEPc} Users Manual\",\n"</font>
-<a name="line192">192: </a>    <font color="#666666">"   number = \"DSIC-II/24/02 - Revision 3.6\",\n"</font>
-<a name="line193">193: </a>    <font color="#666666">"   institution = \"D. Sistemes Inform\\`atics i Computaci\\'o, Universitat Polit\\`ecnica de Val\\`encia\",\n"</font>
-<a name="line194">194: </a>    <font color="#666666">"   year = \"2015\"\n"</font>
-<a name="line195">195: </a>    <font color="#666666">"}\n"</font>,NULL);
-<a name="line196">196: </a>  <font color="#4169E1">return</font>(0);
-<a name="line197">197: </a>}
-
-<a name="line201">201: </a><font color="#B22222">/*@C</font>
-<a name="line202">202: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a> - Initializes the SLEPc library. <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>() calls</font>
-<a name="line203">203: </a><font color="#B22222">   PetscInitialize() if that has not been called yet, so this routine should</font>
-<a name="line204">204: </a><font color="#B22222">   always be called near the beginning of your program.</font>
-
-<a name="line206">206: </a><font color="#B22222">   Collective on MPI_COMM_WORLD or PETSC_COMM_WORLD if it has been set</font>
-
-<a name="line208">208: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line209">209: </a><font color="#B22222">+  argc - count of number of command line arguments</font>
-<a name="line210">210: </a><font color="#B22222">.  args - the command line arguments</font>
-<a name="line211">211: </a><font color="#B22222">.  file - [optional] PETSc database file, defaults to ~username/.petscrc</font>
-<a name="line212">212: </a><font color="#B22222">          (use NULL for default)</font>
-<a name="line213">213: </a><font color="#B22222">-  help - [optional] Help message to print, use NULL for no message</font>
-
-<a name="line215">215: </a><font color="#B22222">   Fortran Note:</font>
-<a name="line216">216: </a><font color="#B22222">   Fortran syntax is very similar to that of PetscInitialize()</font>
-
-<a name="line218">218: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line220">220: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(), PetscInitialize()</font>
-<a name="line221">221: </a><font color="#B22222">@*/</font>
-<a name="line222">222: </a><strong><font color="#4169E1"><a name="SlepcInitialize"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(int *argc,char ***args,const char file[],const char help[])</font></strong>
-<a name="line223">223: </a>{
-<a name="line225">225: </a>  PetscBool      flg;
-
-<a name="line228">228: </a>  <font color="#4169E1">if</font> (SlepcInitializeCalled) <font color="#4169E1">return</font>(0);
-<a name="line229">229: </a>  PetscSetHelpVersionFunctions(SlepcPrintHelpIntro,SlepcPrintVersion);
-<a name="line230">230: </a>  PetscInitialized(&flg);
-<a name="line231">231: </a>  <font color="#4169E1">if</font> (!flg) {
-<a name="line232">232: </a>    PetscInitialize(argc,args,file,help);
-<a name="line233">233: </a>    SlepcBeganPetsc = PETSC_TRUE;
-<a name="line234">234: </a>  }
-
-<a name="line236">236: </a>  SlepcCitationsInitialize();
-
-<a name="line238">238: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
-<a name="line239">239: </a>  SlepcInitialize_DynamicLibraries();
-<a name="line240">240: </a><font color="#A020F0">#endif</font>
-
-<a name="line242">242: </a><font color="#A020F0">#if defined(PETSC_HAVE_DRAND48)</font>
-<a name="line243">243: </a>  <font color="#B22222">/* work-around for Cygwin drand48() initialization bug */</font>
-<a name="line244">244: </a>  srand48(0);
-<a name="line245">245: </a><font color="#A020F0">#endif</font>
-
-<a name="line247">247: </a>  SlepcInitializeCalled = PETSC_TRUE;
-<a name="line248">248: </a>  PetscInfo(0,<font color="#666666">"SLEPc successfully started\n"</font>);
-<a name="line249">249: </a>  <font color="#4169E1">return</font>(0);
-<a name="line250">250: </a>}
-
-<a name="line254">254: </a><font color="#B22222">/*@</font>
-<a name="line255">255: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a> - Checks for options to be called at the conclusion</font>
-<a name="line256">256: </a><font color="#B22222">   of the SLEPc program and calls PetscFinalize().</font>
-
-<a name="line258">258: </a><font color="#B22222">   Collective on PETSC_COMM_WORLD</font>
-
-<a name="line260">260: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line262">262: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(), PetscFinalize()</font>
-<a name="line263">263: </a><font color="#B22222">@*/</font>
-<a name="line264">264: </a><strong><font color="#4169E1"><a name="SlepcFinalize"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(void)</font></strong>
-<a name="line265">265: </a>{
-
-<a name="line269">269: </a>  PetscInfo(0,<font color="#666666">"<a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>() called\n"</font>);
-<a name="line270">270: </a>  <font color="#4169E1">if</font> (SlepcBeganPetsc) {
-<a name="line271">271: </a>    PetscFinalize();
-<a name="line272">272: </a>  }
-<a name="line273">273: </a>  SlepcInitializeCalled = PETSC_FALSE;
-<a name="line274">274: </a>  <font color="#4169E1">return</font>(0);
-<a name="line275">275: </a>}
-
-<a name="line279">279: </a><font color="#B22222">/*@C</font>
-<a name="line280">280: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</a> - Calls <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>() from C/C++ without</font>
-<a name="line281">281: </a><font color="#B22222">   the command line arguments.</font>
-
-<a name="line283">283: </a><font color="#B22222">   Collective</font>
-
-<a name="line285">285: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line287">287: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(), <a href="../../docs/manualpages/sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</a>()</font>
-<a name="line288">288: </a><font color="#B22222">@*/</font>
-<a name="line289">289: </a><strong><font color="#4169E1"><a name="SlepcInitializeNoArguments"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</a>(void)</font></strong>
-<a name="line290">290: </a>{
-<a name="line292">292: </a>  int            argc = 0;
-<a name="line293">293: </a>  char           **args = 0;
-
-<a name="line296">296: </a>  <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&args,NULL,NULL);
-<a name="line297">297: </a>  PetscFunctionReturn(ierr);
-<a name="line298">298: </a>}
-
-<a name="line302">302: </a><font color="#B22222">/*@</font>
-<a name="line303">303: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</a> - Determine whether SLEPc is initialized.</font>
-
-<a name="line305">305: </a><font color="#B22222">   Level: beginner</font>
-
-<a name="line307">307: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(), <a href="../../docs/manualpages/sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</a>()</font>
-<a name="line308">308: </a><font color="#B22222">@*/</font>
-<a name="line309">309: </a><strong><font color="#4169E1"><a name="SlepcInitialized"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</a>(PetscBool *isInitialized)</font></strong>
-<a name="line310">310: </a>{
-<a name="line313">313: </a>  *isInitialized = SlepcInitializeCalled;
-<a name="line314">314: </a>  <font color="#4169E1">return</font>(0);
-<a name="line315">315: </a>}
-
-<a name="line317">317: </a>PETSC_EXTERN PetscBool PetscBeganMPI;
-
-<a name="line321">321: </a><font color="#B22222">/*</font>
-<a name="line322">322: </a><font color="#B22222">   SlepcInitializeNoPointers - Calls <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>() from C/C++ without the pointers</font>
-<a name="line323">323: </a><font color="#B22222">   to argc and args (analogue to PetscInitializeNoPointers).</font>
-
-<a name="line325">325: </a><font color="#B22222">   Collective</font>
-
-<a name="line327">327: </a><font color="#B22222">   Level: advanced</font>
-
-<a name="line329">329: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
-<a name="line330">330: </a><font color="#B22222">*/</font>
-<a name="line331">331: </a><strong><font color="#4169E1"><a name="SlepcInitializeNoPointers"></a>PetscErrorCode SlepcInitializeNoPointers(int argc,char **args,const char *filename,const char *help)</font></strong>
-<a name="line332">332: </a>{
-<a name="line334">334: </a>  int            myargc = argc;
-<a name="line335">335: </a>  char           **myargs = args;
-
-<a name="line338">338: </a>  <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&myargc,&myargs,filename,help);
-<a name="line339">339: </a>  PetscPopSignalHandler();
-<a name="line340">340: </a>  PetscBeganMPI = PETSC_FALSE;
-<a name="line341">341: </a>  PetscFunctionReturn(ierr);
-<a name="line342">342: </a>}
+<a name="line187">187: </a>    <font color="#666666">"   year = \"2005,\"\n"</font>
+<a name="line188">188: </a>    <font color="#666666">"   doi = \"http://dx.doi.org/10.1145/1089014.1089019\"\n"</font>
+<a name="line189">189: </a>    <font color="#666666">"}\n"</font>,NULL);
+<a name="line190">190: </a>  PetscCitationsRegister(<font color="#666666">"@TechReport{slepc-manual,\n"</font>
+<a name="line191">191: </a>    <font color="#666666">"   author = \"J. E. Roman and C. Campos and E. Romero and A. Tomas\",\n"</font>
+<a name="line192">192: </a>    <font color="#666666">"   title = \"{SLEPc} Users Manual\",\n"</font>
+<a name="line193">193: </a>    <font color="#666666">"   number = \"DSIC-II/24/02 - Revision 3.7\",\n"</font>
+<a name="line194">194: </a>    <font color="#666666">"   institution = \"D. Sistemes Inform\\`atics i Computaci\\'o, Universitat Polit\\`ecnica de Val\\`encia\",\n"</font>
+<a name="line195">195: </a>    <font color="#666666">"   year = \"2016\"\n"</font>
+<a name="line196">196: </a>    <font color="#666666">"}\n"</font>,NULL);
+<a name="line197">197: </a>  <font color="#4169E1">return</font>(0);
+<a name="line198">198: </a>}
+
+<a name="line202">202: </a><font color="#B22222">/*@C</font>
+<a name="line203">203: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a> - Initializes the SLEPc library. <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>() calls</font>
+<a name="line204">204: </a><font color="#B22222">   PetscInitialize() if that has not been called yet, so this routine should</font>
+<a name="line205">205: </a><font color="#B22222">   always be called near the beginning of your program.</font>
+
+<a name="line207">207: </a><font color="#B22222">   Collective on MPI_COMM_WORLD or PETSC_COMM_WORLD if it has been set</font>
+
+<a name="line209">209: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line210">210: </a><font color="#B22222">+  argc - count of number of command line arguments</font>
+<a name="line211">211: </a><font color="#B22222">.  args - the command line arguments</font>
+<a name="line212">212: </a><font color="#B22222">.  file - [optional] PETSc database file, defaults to ~username/.petscrc</font>
+<a name="line213">213: </a><font color="#B22222">          (use NULL for default)</font>
+<a name="line214">214: </a><font color="#B22222">-  help - [optional] Help message to print, use NULL for no message</font>
+
+<a name="line216">216: </a><font color="#B22222">   Fortran Note:</font>
+<a name="line217">217: </a><font color="#B22222">   Fortran syntax is very similar to that of PetscInitialize()</font>
+
+<a name="line219">219: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line221">221: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(), PetscInitialize()</font>
+<a name="line222">222: </a><font color="#B22222">@*/</font>
+<a name="line223">223: </a><strong><font color="#4169E1"><a name="SlepcInitialize"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(int *argc,char ***args,const char file[],const char help[])</font></strong>
+<a name="line224">224: </a>{
+<a name="line226">226: </a>  PetscBool      flg;
+
+<a name="line229">229: </a>  <font color="#4169E1">if</font> (SlepcInitializeCalled) <font color="#4169E1">return</font>(0);
+<a name="line230">230: </a>  PetscSetHelpVersionFunctions(SlepcPrintHelpIntro,SlepcPrintVersion);
+<a name="line231">231: </a>  PetscInitialized(&flg);
+<a name="line232">232: </a>  <font color="#4169E1">if</font> (!flg) {
+<a name="line233">233: </a>    PetscInitialize(argc,args,file,help);
+<a name="line234">234: </a>    SlepcBeganPetsc = PETSC_TRUE;
+<a name="line235">235: </a>  }
+
+<a name="line237">237: </a>  SlepcCitationsInitialize();
+
+<a name="line239">239: </a><font color="#A020F0">#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)</font>
+<a name="line240">240: </a>  SlepcInitialize_DynamicLibraries();
+<a name="line241">241: </a><font color="#A020F0">#endif</font>
+
+<a name="line243">243: </a><font color="#A020F0">#if defined(PETSC_HAVE_DRAND48)</font>
+<a name="line244">244: </a>  <font color="#B22222">/* work-around for Cygwin drand48() initialization bug */</font>
+<a name="line245">245: </a>  srand48(0);
+<a name="line246">246: </a><font color="#A020F0">#endif</font>
+
+<a name="line248">248: </a>  SlepcInitializeCalled = PETSC_TRUE;
+<a name="line249">249: </a>  PetscInfo(0,<font color="#666666">"SLEPc successfully started\n"</font>);
+<a name="line250">250: </a>  <font color="#4169E1">return</font>(0);
+<a name="line251">251: </a>}
+
+<a name="line255">255: </a><font color="#B22222">/*@</font>
+<a name="line256">256: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a> - Checks for options to be called at the conclusion</font>
+<a name="line257">257: </a><font color="#B22222">   of the SLEPc program and calls PetscFinalize().</font>
+
+<a name="line259">259: </a><font color="#B22222">   Collective on PETSC_COMM_WORLD</font>
+
+<a name="line261">261: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line263">263: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(), PetscFinalize()</font>
+<a name="line264">264: </a><font color="#B22222">@*/</font>
+<a name="line265">265: </a><strong><font color="#4169E1"><a name="SlepcFinalize"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>(void)</font></strong>
+<a name="line266">266: </a>{
+<a name="line267">267: </a>  PetscErrorCode 0;
+
+<a name="line270">270: </a>  PetscInfo(0,<font color="#666666">"<a href="../../docs/manualpages/sys/SlepcFinalize.html#SlepcFinalize">SlepcFinalize</a>() called\n"</font>);
+<a name="line271">271: </a>  <font color="#4169E1">if</font> (SlepcBeganPetsc) {
+<a name="line272">272: </a>    PetscFinalize();
+<a name="line273">273: </a>  }
+<a name="line274">274: </a>  SlepcInitializeCalled = PETSC_FALSE;
+<a name="line275">275: </a>  PetscFunctionReturn(ierr);
+<a name="line276">276: </a>}
+
+<a name="line280">280: </a><font color="#B22222">/*@C</font>
+<a name="line281">281: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</a> - Calls <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>() from C/C++ without</font>
+<a name="line282">282: </a><font color="#B22222">   the command line arguments.</font>
+
+<a name="line284">284: </a><font color="#B22222">   Collective</font>
+
+<a name="line286">286: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line288">288: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(), <a href="../../docs/manualpages/sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</a>()</font>
+<a name="line289">289: </a><font color="#B22222">@*/</font>
+<a name="line290">290: </a><strong><font color="#4169E1"><a name="SlepcInitializeNoArguments"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcInitializeNoArguments.html#SlepcInitializeNoArguments">SlepcInitializeNoArguments</a>(void)</font></strong>
+<a name="line291">291: </a>{
+<a name="line293">293: </a>  int            argc = 0;
+<a name="line294">294: </a>  char           **args = 0;
+
+<a name="line297">297: </a>  <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&argc,&args,NULL,NULL);
+<a name="line298">298: </a>  PetscFunctionReturn(ierr);
+<a name="line299">299: </a>}
+
+<a name="line303">303: </a><font color="#B22222">/*@</font>
+<a name="line304">304: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</a> - Determine whether SLEPc is initialized.</font>
+
+<a name="line306">306: </a><font color="#B22222">   Level: beginner</font>
+
+<a name="line308">308: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(), <a href="../../docs/manualpages/sys/SlepcInitializeFortran.html#SlepcInitializeFortran">SlepcInitializeFortran</a>()</font>
+<a name="line309">309: </a><font color="#B22222">@*/</font>
+<a name="line310">310: </a><strong><font color="#4169E1"><a name="SlepcInitialized"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcInitialized.html#SlepcInitialized">SlepcInitialized</a>(PetscBool *isInitialized)</font></strong>
+<a name="line311">311: </a>{
+<a name="line314">314: </a>  *isInitialized = SlepcInitializeCalled;
+<a name="line315">315: </a>  <font color="#4169E1">return</font>(0);
+<a name="line316">316: </a>}
+
+<a name="line318">318: </a>PETSC_EXTERN PetscBool PetscBeganMPI;
+
+<a name="line322">322: </a><font color="#B22222">/*</font>
+<a name="line323">323: </a><font color="#B22222">   SlepcInitializeNoPointers - Calls <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>() from C/C++ without the pointers</font>
+<a name="line324">324: </a><font color="#B22222">   to argc and args (analogue to PetscInitializeNoPointers).</font>
+
+<a name="line326">326: </a><font color="#B22222">   Collective</font>
+
+<a name="line328">328: </a><font color="#B22222">   Level: advanced</font>
+
+<a name="line330">330: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>()</font>
+<a name="line331">331: </a><font color="#B22222">*/</font>
+<a name="line332">332: </a><strong><font color="#4169E1"><a name="SlepcInitializeNoPointers"></a>PetscErrorCode SlepcInitializeNoPointers(int argc,char **args,const char *filename,const char *help)</font></strong>
+<a name="line333">333: </a>{
+<a name="line335">335: </a>  int            myargc = argc;
+<a name="line336">336: </a>  char           **myargs = args;
+
+<a name="line339">339: </a>  <a href="../../docs/manualpages/sys/SlepcInitialize.html#SlepcInitialize">SlepcInitialize</a>(&myargc,&myargs,filename,help);
+<a name="line340">340: </a>  PetscPopSignalHandler();
+<a name="line341">341: </a>  PetscBeganMPI = PETSC_FALSE;
+<a name="line342">342: </a>  PetscFunctionReturn(ierr);
+<a name="line343">343: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/slepcsc.c b/src/sys/slepcsc.c
index 5120bba..2f8c338 100644
--- a/src/sys/slepcsc.c
+++ b/src/sys/slepcsc.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -69,8 +69,8 @@ PetscErrorCode SlepcSCCompare(SlepcSC sc,PetscScalar ar,PetscScalar ai,PetscScal
   }
   if (sc->rg) {
     ierr = RGCheckInside(sc->rg,2,re,im,cin);CHKERRQ(ierr);
-    inside[0] = (cin[0]>0)? PETSC_TRUE: PETSC_FALSE;
-    inside[1] = (cin[1]>0)? PETSC_TRUE: PETSC_FALSE;
+    inside[0] = PetscNot(cin[0]<0);
+    inside[1] = PetscNot(cin[1]<0);
     if (inside[0] && !inside[1]) *res = -1;
     else if (!inside[0] && inside[1]) *res = 1;
     else {
diff --git a/src/sys/slepcsc.c.html b/src/sys/slepcsc.c.html
index 5599f56..5c12d9d 100644
--- a/src/sys/slepcsc.c.html
+++ b/src/sys/slepcsc.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/slepcsc.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:39+00:00">
+<meta name="date" content="2016-05-16T10:31:29+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/slepcsc.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/slepcsc.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -76,8 +76,8 @@
 <a name="line69"> 69: </a>  }
 <a name="line70"> 70: </a>  <font color="#4169E1">if</font> (sc->rg) {
 <a name="line71"> 71: </a>    <a href="../../docs/manualpages/RG/RGCheckInside.html#RGCheckInside">RGCheckInside</a>(sc->rg,2,re,im,cin);
-<a name="line72"> 72: </a>    inside[0] = (cin[0]>0)? PETSC_TRUE: PETSC_FALSE;
-<a name="line73"> 73: </a>    inside[1] = (cin[1]>0)? PETSC_TRUE: PETSC_FALSE;
+<a name="line72"> 72: </a>    inside[0] = PetscNot(cin[0]<0);
+<a name="line73"> 73: </a>    inside[1] = PetscNot(cin[1]<0);
 <a name="line74"> 74: </a>    <font color="#4169E1">if</font> (inside[0] && !inside[1]) *res = -1;
 <a name="line75"> 75: </a>    <font color="#4169E1">else</font> <font color="#4169E1">if</font> (!inside[0] && inside[1]) *res = 1;
 <a name="line76"> 76: </a>    <font color="#4169E1">else</font> {
diff --git a/src/sys/slepcutil.c b/src/sys/slepcutil.c
index abd60a8..e37084d 100644
--- a/src/sys/slepcutil.c
+++ b/src/sys/slepcutil.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -546,11 +546,56 @@ PetscErrorCode SlepcCheckOrthogonality(Vec *V,PetscInt nv,Vec *W,PetscInt nw,Mat
 }
 
 #undef __FUNCT__
+#define __FUNCT__ "SlepcConvMonitorCreate"
+/*@C
+   SlepcConvMonitorCreate - Creates a SlepcConvMonitor context.
+
+   Collective on PetscViewer
+
+   Input Parameters:
++  viewer - the viewer where the monitor must send data
+-  format - the format 
+
+   Output Parameter:
+.  ctx - the created context
+
+   Notes:
+   The created context is used for EPS, SVD, PEP, and NEP monitor functions that just
+   print the iteration numbers at which convergence takes place (XXXMonitorConverged).
+
+   This function increases the reference count of the viewer so you can destroy the
+   viewer object after this call.
+
+   Level: developer
+
+.seealso: SlepcConvMonitorDestroy()
+@*/
+PetscErrorCode SlepcConvMonitorCreate(PetscViewer viewer,PetscViewerFormat format,SlepcConvMonitor *ctx)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  ierr = PetscObjectReference((PetscObject)viewer);CHKERRQ(ierr);
+  ierr = PetscNew(ctx);CHKERRQ(ierr);
+  (*ctx)->viewer = viewer;
+  (*ctx)->format = format;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "SlepcConvMonitorDestroy"
-/*
-  Clean up context used in monitors of type XXXMonitorConverged.
-  This function is shared by EPS, SVD, PEP
-*/
+/*@C
+   SlepcConvMonitorDestroy - Destroys a SlepcConvMonitor context.
+
+   Collective on PetscViewer
+
+   Input Parameters:
+.  ctx - the SlepcConvMonitor context to be destroyed.
+
+   Level: developer
+
+.seealso: SlepcConvMonitorCreate()
+@*/
 PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx)
 {
   PetscErrorCode ierr;
diff --git a/src/sys/slepcutil.c.html b/src/sys/slepcutil.c.html
index ea41c4d..cb857ad 100644
--- a/src/sys/slepcutil.c.html
+++ b/src/sys/slepcutil.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/slepcutil.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:56:38+00:00">
+<meta name="date" content="2016-05-16T10:31:28+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/slepcutil.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/slepcutil.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -518,103 +518,144 @@
 <a name="line545">545: </a>  <font color="#4169E1">return</font>(0);
 <a name="line546">546: </a>}
 
-<a name="line550">550: </a><font color="#B22222">/*</font>
-<a name="line551">551: </a><font color="#B22222">  Clean up context used in monitors of type XXXMonitorConverged.</font>
-<a name="line552">552: </a><font color="#B22222">  This function is shared by <a href="../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>, <a href="../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>, <a href="../../docs/manualpages/PEP/PEP.html#PEP">PEP</a></font>
-<a name="line553">553: </a><font color="#B22222">*/</font>
-<a name="line554">554: </a><strong><font color="#4169E1"><a name="SlepcConvMonitorDestroy"></a>PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx)</font></strong>
-<a name="line555">555: </a>{
-
-<a name="line559">559: </a>  <font color="#4169E1">if</font> (!*ctx) <font color="#4169E1">return</font>(0);
-<a name="line560">560: </a>  PetscViewerDestroy(&(*ctx)->viewer);
-<a name="line561">561: </a>  PetscFree(*ctx);
-<a name="line562">562: </a>  <font color="#4169E1">return</font>(0);
-<a name="line563">563: </a>}
-
-<a name="line567">567: </a><font color="#B22222">/*</font>
-<a name="line568">568: </a><font color="#B22222">   Given n vectors in V, this function gets references of them into W.</font>
-<a name="line569">569: </a><font color="#B22222">   If m<0 then some previous non-processed vectors remain in W and must be freed.</font>
-<a name="line570">570: </a><font color="#B22222"> */</font>
-<a name="line571">571: </a><strong><font color="#4169E1"><a name="SlepcBasisReference_Private"></a>PetscErrorCode SlepcBasisReference_Private(PetscInt n,Vec *V,PetscInt *m,Vec **W)</font></strong>
-<a name="line572">572: </a>{
-<a name="line574">574: </a>  PetscInt       i;
-
-<a name="line577">577: </a>  SlepcBasisDestroy_Private(m,W);
-<a name="line578">578: </a>  <font color="#4169E1">if</font> (n>0) {
-<a name="line579">579: </a>    PetscMalloc1(n,W);
-<a name="line580">580: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line581">581: </a>      PetscObjectReference((PetscObject)V[i]);
-<a name="line582">582: </a>      (*W)[i] = V[i];
-<a name="line583">583: </a>    }
-<a name="line584">584: </a>    *m = -n;
-<a name="line585">585: </a>  }
-<a name="line586">586: </a>  <font color="#4169E1">return</font>(0);
-<a name="line587">587: </a>}
-
-<a name="line591">591: </a><font color="#B22222">/*</font>
-<a name="line592">592: </a><font color="#B22222">   Destroys a set of vectors.</font>
-<a name="line593">593: </a><font color="#B22222">   A negative value of m indicates that W contains vectors to be destroyed.</font>
-<a name="line594">594: </a><font color="#B22222"> */</font>
-<a name="line595">595: </a><strong><font color="#4169E1"><a name="SlepcBasisDestroy_Private"></a>PetscErrorCode SlepcBasisDestroy_Private(PetscInt *m,Vec **W)</font></strong>
-<a name="line596">596: </a>{
-<a name="line598">598: </a>  PetscInt       i;
-
-<a name="line601">601: </a>  <font color="#4169E1">if</font> (*m<0) {
-<a name="line602">602: </a>    <font color="#4169E1">for</font> (i=0;i<-(*m);i++) {
-<a name="line603">603: </a>      VecDestroy(&(*W)[i]);
-<a name="line604">604: </a>    }
-<a name="line605">605: </a>    PetscFree(*W);
-<a name="line606">606: </a>  }
-<a name="line607">607: </a>  *m = 0;
-<a name="line608">608: </a>  <font color="#4169E1">return</font>(0);
-<a name="line609">609: </a>}
-
-<a name="line613">613: </a><font color="#B22222">/*@C</font>
-<a name="line614">614: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a> - Prints a PetscScalar variable to a string of</font>
-<a name="line615">615: </a><font color="#B22222">   given length.</font>
-
-<a name="line617">617: </a><font color="#B22222">   Not Collective</font>
-
-<a name="line619">619: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line620">620: </a><font color="#B22222">+  str - the string to print to</font>
-<a name="line621">621: </a><font color="#B22222">.  len - the length of str</font>
-<a name="line622">622: </a><font color="#B22222">.  val - scalar value to be printed</font>
-<a name="line623">623: </a><font color="#B22222">-  exp - to be used within an expression, print leading sign and parentheses</font>
-<a name="line624">624: </a><font color="#B22222">         in case of nonzero imaginary part</font>
-
-<a name="line626">626: </a><font color="#B22222">   Level: developer</font>
-<a name="line627">627: </a><font color="#B22222">@*/</font>
-<a name="line628">628: </a><strong><font color="#4169E1"><a name="SlepcSNPrintfScalar"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(char *str,size_t len,PetscScalar val,PetscBool exp)</font></strong>
-<a name="line629">629: </a>{
-<a name="line631">631: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
-<a name="line632">632: </a>  PetscReal      re,im;
-<a name="line633">633: </a><font color="#A020F0">#endif</font>
-
-<a name="line636">636: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
-<a name="line637">637: </a>  <font color="#4169E1">if</font> (exp) {
-<a name="line638">638: </a>    PetscSNPrintf(str,len,<font color="#666666">"%+g"</font>,(double)val);
-<a name="line639">639: </a>  } <font color="#4169E1">else</font> {
-<a name="line640">640: </a>    PetscSNPrintf(str,len,<font color="#666666">"%g"</font>,(double)val);
-<a name="line641">641: </a>  }
-<a name="line642">642: </a><font color="#A020F0">#else</font>
-<a name="line643">643: </a>  re = PetscRealPart(val);
-<a name="line644">644: </a>  im = PetscImaginaryPart(val);
-<a name="line645">645: </a>  <font color="#4169E1">if</font> (im!=0.0) {
-<a name="line646">646: </a>    <font color="#4169E1">if</font> (exp) {
-<a name="line647">647: </a>      PetscSNPrintf(str,len,<font color="#666666">"+(%g%+gi)"</font>,(double)re,(double)im);
-<a name="line648">648: </a>    } <font color="#4169E1">else</font> {
-<a name="line649">649: </a>      PetscSNPrintf(str,len,<font color="#666666">"%g%+gi"</font>,(double)re,(double)im);
-<a name="line650">650: </a>    }
-<a name="line651">651: </a>  } <font color="#4169E1">else</font> {
-<a name="line652">652: </a>    <font color="#4169E1">if</font> (exp) {
-<a name="line653">653: </a>      PetscSNPrintf(str,len,<font color="#666666">"%+g"</font>,(double)re);
-<a name="line654">654: </a>    } <font color="#4169E1">else</font> {
-<a name="line655">655: </a>      PetscSNPrintf(str,len,<font color="#666666">"%g"</font>,(double)re);
-<a name="line656">656: </a>    }
-<a name="line657">657: </a>  }
-<a name="line658">658: </a><font color="#A020F0">#endif</font>
-<a name="line659">659: </a>  <font color="#4169E1">return</font>(0);
-<a name="line660">660: </a>}
+<a name="line550">550: </a><font color="#B22222">/*@C</font>
+<a name="line551">551: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a> - Creates a SlepcConvMonitor context.</font>
+
+<a name="line553">553: </a><font color="#B22222">   Collective on PetscViewer</font>
+
+<a name="line555">555: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line556">556: </a><font color="#B22222">+  viewer - the viewer where the monitor must send data</font>
+<a name="line557">557: </a><font color="#B22222">-  format - the format </font>
+
+<a name="line559">559: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line560">560: </a><font color="#B22222">.  ctx - the created context</font>
+
+<a name="line562">562: </a><font color="#B22222">   Notes:</font>
+<a name="line563">563: </a><font color="#B22222">   The created context is used for <a href="../../docs/manualpages/EPS/EPS.html#EPS">EPS</a>, <a href="../../docs/manualpages/SVD/SVD.html#SVD">SVD</a>, <a href="../../docs/manualpages/PEP/PEP.html#PEP">PEP</a>, and <a href="../../docs/manualpages/NEP/NEP.html#NEP">NEP</a> monitor functions that just</font>
+<a name="line564">564: </a><font color="#B22222">   print the iteration numbers at which convergence takes place (XXXMonitorConverged).</font>
+
+<a name="line566">566: </a><font color="#B22222">   This function increases the reference count of the viewer so you can destroy the</font>
+<a name="line567">567: </a><font color="#B22222">   viewer object after this call.</font>
+
+<a name="line569">569: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line571">571: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>()</font>
+<a name="line572">572: </a><font color="#B22222">@*/</font>
+<a name="line573">573: </a><strong><font color="#4169E1"><a name="SlepcConvMonitorCreate"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>(PetscViewer viewer,PetscViewerFormat format,SlepcConvMonitor *ctx)</font></strong>
+<a name="line574">574: </a>{
+
+<a name="line578">578: </a>  PetscObjectReference((PetscObject)viewer);
+<a name="line579">579: </a>  PetscNew(ctx);
+<a name="line580">580: </a>  (*ctx)->viewer = viewer;
+<a name="line581">581: </a>  (*ctx)->format = format;
+<a name="line582">582: </a>  <font color="#4169E1">return</font>(0);
+<a name="line583">583: </a>}
+
+<a name="line587">587: </a><font color="#B22222">/*@C</font>
+<a name="line588">588: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a> - Destroys a SlepcConvMonitor context.</font>
+
+<a name="line590">590: </a><font color="#B22222">   Collective on PetscViewer</font>
+
+<a name="line592">592: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line593">593: </a><font color="#B22222">.  ctx - the SlepcConvMonitor context to be destroyed.</font>
+
+<a name="line595">595: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line597">597: </a><font color="#B22222">.seealso: <a href="../../docs/manualpages/sys/SlepcConvMonitorCreate.html#SlepcConvMonitorCreate">SlepcConvMonitorCreate</a>()</font>
+<a name="line598">598: </a><font color="#B22222">@*/</font>
+<a name="line599">599: </a><strong><font color="#4169E1"><a name="SlepcConvMonitorDestroy"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcConvMonitorDestroy.html#SlepcConvMonitorDestroy">SlepcConvMonitorDestroy</a>(SlepcConvMonitor *ctx)</font></strong>
+<a name="line600">600: </a>{
+
+<a name="line604">604: </a>  <font color="#4169E1">if</font> (!*ctx) <font color="#4169E1">return</font>(0);
+<a name="line605">605: </a>  PetscViewerDestroy(&(*ctx)->viewer);
+<a name="line606">606: </a>  PetscFree(*ctx);
+<a name="line607">607: </a>  <font color="#4169E1">return</font>(0);
+<a name="line608">608: </a>}
+
+<a name="line612">612: </a><font color="#B22222">/*</font>
+<a name="line613">613: </a><font color="#B22222">   Given n vectors in V, this function gets references of them into W.</font>
+<a name="line614">614: </a><font color="#B22222">   If m<0 then some previous non-processed vectors remain in W and must be freed.</font>
+<a name="line615">615: </a><font color="#B22222"> */</font>
+<a name="line616">616: </a><strong><font color="#4169E1"><a name="SlepcBasisReference_Private"></a>PetscErrorCode SlepcBasisReference_Private(PetscInt n,Vec *V,PetscInt *m,Vec **W)</font></strong>
+<a name="line617">617: </a>{
+<a name="line619">619: </a>  PetscInt       i;
+
+<a name="line622">622: </a>  SlepcBasisDestroy_Private(m,W);
+<a name="line623">623: </a>  <font color="#4169E1">if</font> (n>0) {
+<a name="line624">624: </a>    PetscMalloc1(n,W);
+<a name="line625">625: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line626">626: </a>      PetscObjectReference((PetscObject)V[i]);
+<a name="line627">627: </a>      (*W)[i] = V[i];
+<a name="line628">628: </a>    }
+<a name="line629">629: </a>    *m = -n;
+<a name="line630">630: </a>  }
+<a name="line631">631: </a>  <font color="#4169E1">return</font>(0);
+<a name="line632">632: </a>}
+
+<a name="line636">636: </a><font color="#B22222">/*</font>
+<a name="line637">637: </a><font color="#B22222">   Destroys a set of vectors.</font>
+<a name="line638">638: </a><font color="#B22222">   A negative value of m indicates that W contains vectors to be destroyed.</font>
+<a name="line639">639: </a><font color="#B22222"> */</font>
+<a name="line640">640: </a><strong><font color="#4169E1"><a name="SlepcBasisDestroy_Private"></a>PetscErrorCode SlepcBasisDestroy_Private(PetscInt *m,Vec **W)</font></strong>
+<a name="line641">641: </a>{
+<a name="line643">643: </a>  PetscInt       i;
+
+<a name="line646">646: </a>  <font color="#4169E1">if</font> (*m<0) {
+<a name="line647">647: </a>    <font color="#4169E1">for</font> (i=0;i<-(*m);i++) {
+<a name="line648">648: </a>      VecDestroy(&(*W)[i]);
+<a name="line649">649: </a>    }
+<a name="line650">650: </a>    PetscFree(*W);
+<a name="line651">651: </a>  }
+<a name="line652">652: </a>  *m = 0;
+<a name="line653">653: </a>  <font color="#4169E1">return</font>(0);
+<a name="line654">654: </a>}
+
+<a name="line658">658: </a><font color="#B22222">/*@C</font>
+<a name="line659">659: </a><font color="#B22222">   <a href="../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a> - Prints a PetscScalar variable to a string of</font>
+<a name="line660">660: </a><font color="#B22222">   given length.</font>
+
+<a name="line662">662: </a><font color="#B22222">   Not Collective</font>
+
+<a name="line664">664: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line665">665: </a><font color="#B22222">+  str - the string to print to</font>
+<a name="line666">666: </a><font color="#B22222">.  len - the length of str</font>
+<a name="line667">667: </a><font color="#B22222">.  val - scalar value to be printed</font>
+<a name="line668">668: </a><font color="#B22222">-  exp - to be used within an expression, print leading sign and parentheses</font>
+<a name="line669">669: </a><font color="#B22222">         in case of nonzero imaginary part</font>
+
+<a name="line671">671: </a><font color="#B22222">   Level: developer</font>
+<a name="line672">672: </a><font color="#B22222">@*/</font>
+<a name="line673">673: </a><strong><font color="#4169E1"><a name="SlepcSNPrintfScalar"></a>PetscErrorCode <a href="../../docs/manualpages/sys/SlepcSNPrintfScalar.html#SlepcSNPrintfScalar">SlepcSNPrintfScalar</a>(char *str,size_t len,PetscScalar val,PetscBool exp)</font></strong>
+<a name="line674">674: </a>{
+<a name="line676">676: </a><font color="#A020F0">#if defined(PETSC_USE_COMPLEX)</font>
+<a name="line677">677: </a>  PetscReal      re,im;
+<a name="line678">678: </a><font color="#A020F0">#endif</font>
+
+<a name="line681">681: </a><font color="#A020F0">#if !defined(PETSC_USE_COMPLEX)</font>
+<a name="line682">682: </a>  <font color="#4169E1">if</font> (exp) {
+<a name="line683">683: </a>    PetscSNPrintf(str,len,<font color="#666666">"%+g"</font>,(double)val);
+<a name="line684">684: </a>  } <font color="#4169E1">else</font> {
+<a name="line685">685: </a>    PetscSNPrintf(str,len,<font color="#666666">"%g"</font>,(double)val);
+<a name="line686">686: </a>  }
+<a name="line687">687: </a><font color="#A020F0">#else</font>
+<a name="line688">688: </a>  re = PetscRealPart(val);
+<a name="line689">689: </a>  im = PetscImaginaryPart(val);
+<a name="line690">690: </a>  <font color="#4169E1">if</font> (im!=0.0) {
+<a name="line691">691: </a>    <font color="#4169E1">if</font> (exp) {
+<a name="line692">692: </a>      PetscSNPrintf(str,len,<font color="#666666">"+(%g%+gi)"</font>,(double)re,(double)im);
+<a name="line693">693: </a>    } <font color="#4169E1">else</font> {
+<a name="line694">694: </a>      PetscSNPrintf(str,len,<font color="#666666">"%g%+gi"</font>,(double)re,(double)im);
+<a name="line695">695: </a>    }
+<a name="line696">696: </a>  } <font color="#4169E1">else</font> {
+<a name="line697">697: </a>    <font color="#4169E1">if</font> (exp) {
+<a name="line698">698: </a>      PetscSNPrintf(str,len,<font color="#666666">"%+g"</font>,(double)re);
+<a name="line699">699: </a>    } <font color="#4169E1">else</font> {
+<a name="line700">700: </a>      PetscSNPrintf(str,len,<font color="#666666">"%g"</font>,(double)re);
+<a name="line701">701: </a>    }
+<a name="line702">702: </a>  }
+<a name="line703">703: </a><font color="#A020F0">#endif</font>
+<a name="line704">704: </a>  <font color="#4169E1">return</font>(0);
+<a name="line705">705: </a>}
 
 </pre>
 </body>
diff --git a/src/sys/vec/index.html b/src/sys/vec/index.html
index beaa164..a214ed9 100644
--- a/src/sys/vec/index.html
+++ b/src/sys/vec/index.html
@@ -5,8 +5,8 @@
 </head>
 
 <body class="manpageindex">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/vec/index.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/vec/index.html "><small>Report Typos and Errors</small></a></div>
 
 <h2>SLEPc System routines</h2>
 
diff --git a/src/sys/vec/makefile b/src/sys/vec/makefile
index 4dc25e6..70844b2 100644
--- a/src/sys/vec/makefile
+++ b/src/sys/vec/makefile
@@ -1,7 +1,7 @@
 #
 #  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  SLEPc - Scalable Library for Eigenvalue Problem Computations
-#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 #
 #  This file is part of SLEPc.
 #
diff --git a/src/sys/vec/makefile.html b/src/sys/vec/makefile.html
index 42211d9..a98d715 100644
--- a/src/sys/vec/makefile.html
+++ b/src/sys/vec/makefile.html
@@ -3,16 +3,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/vec/makefile.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:39+00:00">
+<meta name="date" content="2016-05-16T10:32:35+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/vec/makefile.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/vec/makefile.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><font color="#A020F0">#</font>
 <font color="#A020F0">#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <font color="#A020F0">#  SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<font color="#A020F0">#  Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<font color="#A020F0">#  Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 <font color="#A020F0">#</font>
 <font color="#A020F0">#  This file is part of SLEPc.</font>
 <font color="#A020F0">#</font>
diff --git a/src/sys/vec/pool.c b/src/sys/vec/pool.c
index 3484ec7..e14b1e2 100644
--- a/src/sys/vec/pool.c
+++ b/src/sys/vec/pool.c
@@ -3,7 +3,7 @@
 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -106,7 +106,7 @@ PetscErrorCode SlepcVecPoolDestroy(VecPool *p)
 +  pool - pool of Vec.
 -  n - number of vectors.
 
-   Output Paramter:
+   Output Parameter:
 .  vecs - vectors
 
    Level: developer
diff --git a/src/sys/vec/pool.c.html b/src/sys/vec/pool.c.html
index a3ba63a..d6d7f07 100644
--- a/src/sys/vec/pool.c.html
+++ b/src/sys/vec/pool.c.html
@@ -4,18 +4,18 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/vec/pool.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:38+00:00">
+<meta name="date" content="2016-05-16T10:32:34+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/vec/pool.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/vec/pool.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   Implementation of a pool of Vec using VecDuplicateVecs.</font>
 
 <a name="line4">  4: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line5">  5: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line6">  6: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line8">  8: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -104,7 +104,7 @@
 <a name="line106">106: </a><font color="#B22222">+  pool - pool of Vec.</font>
 <a name="line107">107: </a><font color="#B22222">-  n - number of vectors.</font>
 
-<a name="line109">109: </a><font color="#B22222">   Output Paramter:</font>
+<a name="line109">109: </a><font color="#B22222">   Output Parameter:</font>
 <a name="line110">110: </a><font color="#B22222">.  vecs - vectors</font>
 
 <a name="line112">112: </a><font color="#B22222">   Level: developer</font>
diff --git a/src/sys/vec/veccomp.c b/src/sys/vec/veccomp.c
index 25e8aaa..ee4392d 100644
--- a/src/sys/vec/veccomp.c
+++ b/src/sys/vec/veccomp.c
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
@@ -286,8 +286,6 @@ static PetscErrorCode VecCreate_Comp_Private(Vec v,Vec *x,PetscInt nx,PetscBool
     n->lN = lN;
     n->friends = 1;
   } else { /* If not, check in the vector in the shared structure */
-    N = n->N;
-    lN = n->lN;
     s->n = n;
     s->n->friends++;
   }
@@ -630,10 +628,13 @@ PetscErrorCode VecMax_Comp(Vec v,PetscInt *idx,PetscReal *z)
 
   if (vs->n->n > 0) {
     ierr = VecMax(vs->x[0],idx?&idxp:NULL,&zp);CHKERRQ(ierr);
+  } else {
+    zp = PETSC_MIN_REAL;
+    if (idx) idxp = -1;
   }
   for (i=1;i<vs->n->n;i++) {
     ierr = VecGetSize(vs->x[i-1],&s0);CHKERRQ(ierr);
-    s+= s0;
+    s += s0;
     ierr = VecMax(vs->x[i],idx?&idxp:NULL,&z0);CHKERRQ(ierr);
     if (zp < z0) {
       if (idx) *idx = s+idxp;
@@ -660,10 +661,13 @@ PetscErrorCode VecMin_Comp(Vec v,PetscInt *idx,PetscReal *z)
 
   if (vs->n->n > 0) {
     ierr = VecMin(vs->x[0],idx?&idxp:NULL,&zp);CHKERRQ(ierr);
+  } else {
+    zp = PETSC_MAX_REAL;
+    if (idx) idxp = -1;
   }
   for (i=1;i<vs->n->n;i++) {
     ierr = VecGetSize(vs->x[i-1],&s0);CHKERRQ(ierr);
-    s+= s0;
+    s += s0;
     ierr = VecMin(vs->x[i],idx?&idxp:NULL,&z0);CHKERRQ(ierr);
     if (zp > z0) {
       if (idx) *idx = s+idxp;
diff --git a/src/sys/vec/veccomp.c.html b/src/sys/vec/veccomp.c.html
index 027ee95..a26d614 100644
--- a/src/sys/vec/veccomp.c.html
+++ b/src/sys/vec/veccomp.c.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/vec/veccomp.c.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:37+00:00">
+<meta name="date" content="2016-05-16T10:32:33+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/vec/veccomp.c.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/vec/veccomp.c.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 
@@ -267,447 +267,451 @@
 <a name="line286">286: </a>    n->lN = lN;
 <a name="line287">287: </a>    n->friends = 1;
 <a name="line288">288: </a>  } <font color="#4169E1">else</font> { <font color="#B22222">/* If not, check in the vector in the shared structure */</font>
-<a name="line289">289: </a>    N = n->N;
-<a name="line290">290: </a>    lN = n->lN;
-<a name="line291">291: </a>    s->n = n;
-<a name="line292">292: </a>    s->n->friends++;
-<a name="line293">293: </a>  }
-
-<a name="line295">295: </a>  <font color="#B22222">/* Set the virtual sizes as the real sizes of the vector */</font>
-<a name="line296">296: </a>  VecSetSizes(v,s->n->lN,s->n->N);
-
-<a name="line298">298: </a>  PetscObjectChangeTypeName((PetscObject)v,VECCOMP);
-<a name="line299">299: </a>  <font color="#4169E1">return</font>(0);
-<a name="line300">300: </a>}
-
-<a name="line304">304: </a><strong><font color="#4169E1"><a name="VecCreate_Comp"></a>PETSC_EXTERN PetscErrorCode VecCreate_Comp(Vec V)</font></strong>
-<a name="line305">305: </a>{
-
-<a name="line309">309: </a>  VecCreate_Comp_Private(V,NULL,0,PETSC_FALSE,NULL);
-<a name="line310">310: </a>  <font color="#4169E1">return</font>(0);
-<a name="line311">311: </a>}
-
-<a name="line315">315: </a><font color="#B22222">/*@C</font>
-<a name="line316">316: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a> - Creates a new vector containing several subvectors,</font>
-<a name="line317">317: </a><font color="#B22222">   each stored separately.</font>
-
-<a name="line319">319: </a><font color="#B22222">   Collective on Vec</font>
-
-<a name="line321">321: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line322">322: </a><font color="#B22222">+  comm - communicator for the new Vec</font>
-<a name="line323">323: </a><font color="#B22222">.  Nx   - array of (initial) global sizes of child vectors</font>
-<a name="line324">324: </a><font color="#B22222">.  n    - number of child vectors</font>
-<a name="line325">325: </a><font color="#B22222">.  t    - type of the child vectors</font>
-<a name="line326">326: </a><font color="#B22222">-  Vparent - (optional) template vector</font>
-
-<a name="line328">328: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line329">329: </a><font color="#B22222">.  V - new vector</font>
-
-<a name="line331">331: </a><font color="#B22222">   Notes:</font>
-<a name="line332">332: </a><font color="#B22222">   This is similar to PETSc's VecNest but customized for SLEPc's needs. In particular,</font>
-<a name="line333">333: </a><font color="#B22222">   the number of child vectors can be modified dynamically, with <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>().</font>
-
-<a name="line335">335: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line337">337: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(), <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>()</font>
-<a name="line338">338: </a><font color="#B22222">@*/</font>
-<a name="line339">339: </a><strong><font color="#4169E1"><a name="VecCreateComp"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)</font></strong>
-<a name="line340">340: </a>{
-<a name="line342">342: </a>  Vec            *x;
-<a name="line343">343: </a>  PetscInt       i;
-
-<a name="line346">346: </a>  VecCreate(comm,V);
-<a name="line347">347: </a>  PetscMalloc1(n,&x);
-<a name="line348">348: </a>  PetscLogObjectMemory((PetscObject)*V,n*<font color="#4169E1">sizeof</font>(Vec));
-<a name="line349">349: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line350">350: </a>    VecCreate(comm,&x[i]);
-<a name="line351">351: </a>    VecSetSizes(x[i],PETSC_DECIDE,Nx[i]);
-<a name="line352">352: </a>    VecSetType(x[i],t);
-<a name="line353">353: </a>  }
-<a name="line354">354: </a>  VecCreate_Comp_Private(*V,x,n,PETSC_TRUE,Vparent?((Vec_Comp*)Vparent->data)->n:NULL);
-<a name="line355">355: </a>  <font color="#4169E1">return</font>(0);
-<a name="line356">356: </a>}
-
-<a name="line360">360: </a><font color="#B22222">/*@C</font>
-<a name="line361">361: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a> - Creates a new vector containing several subvectors,</font>
-<a name="line362">362: </a><font color="#B22222">   each stored separately, from an array of Vecs.</font>
-
-<a name="line364">364: </a><font color="#B22222">   Collective on Vec</font>
-
-<a name="line366">366: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line367">367: </a><font color="#B22222">+  x - array of Vecs</font>
-<a name="line368">368: </a><font color="#B22222">.  n - number of child vectors</font>
-<a name="line369">369: </a><font color="#B22222">-  Vparent - (optional) template vector</font>
-
-<a name="line371">371: </a><font color="#B22222">   Output Parameter:</font>
-<a name="line372">372: </a><font color="#B22222">.  V - new vector</font>
-
-<a name="line374">374: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line376">376: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>()</font>
-<a name="line377">377: </a><font color="#B22222">@*/</font>
-<a name="line378">378: </a><strong><font color="#4169E1"><a name="VecCreateCompWithVecs"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(Vec *x,PetscInt n,Vec Vparent,Vec *V)</font></strong>
-<a name="line379">379: </a>{
-<a name="line381">381: </a>  PetscInt       i;
-
-<a name="line384">384: </a>  VecCreate(PetscObjectComm((PetscObject)x[0]),V);
-<a name="line385">385: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
-<a name="line386">386: </a>    PetscObjectReference((PetscObject)x[i]);
-<a name="line387">387: </a>  }
-<a name="line388">388: </a>  VecCreate_Comp_Private(*V,x,n,PETSC_FALSE,Vparent?((Vec_Comp*)Vparent->data)->n:NULL);
-<a name="line389">389: </a>  <font color="#4169E1">return</font>(0);
-<a name="line390">390: </a>}
-
-<a name="line394">394: </a><strong><font color="#4169E1"><a name="VecDuplicate_Comp"></a>PetscErrorCode VecDuplicate_Comp(Vec win,Vec *V)</font></strong>
-<a name="line395">395: </a>{
-<a name="line397">397: </a>  Vec            *x;
-<a name="line398">398: </a>  PetscInt       i;
-<a name="line399">399: </a>  Vec_Comp       *s = (Vec_Comp*)win->data;
-
-<a name="line402">402: </a>  SlepcValidVecComp(win);
-<a name="line403">403: </a>  VecCreate(PetscObjectComm((PetscObject)win),V);
-<a name="line404">404: </a>  PetscMalloc1(s->nx,&x);
-<a name="line405">405: </a>  PetscLogObjectMemory((PetscObject)*V,s->nx*<font color="#4169E1">sizeof</font>(Vec));
-<a name="line406">406: </a>  <font color="#4169E1">for</font> (i=0;i<s->nx;i++) {
-<a name="line407">407: </a>    <font color="#4169E1">if</font> (s->x[i]) {
-<a name="line408">408: </a>      VecDuplicate(s->x[i],&x[i]);
-<a name="line409">409: </a>    } <font color="#4169E1">else</font> x[i] = NULL;
-<a name="line410">410: </a>  }
-<a name="line411">411: </a>  VecCreate_Comp_Private(*V,x,s->nx,PETSC_TRUE,s->n);
-<a name="line412">412: </a>  <font color="#4169E1">return</font>(0);
-<a name="line413">413: </a>}
-
-<a name="line417">417: </a><font color="#B22222">/*@C</font>
-<a name="line418">418: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCompGetSubVecs.html#VecCompGetSubVecs">VecCompGetSubVecs</a> - Returns the entire array of vectors defining a</font>
-<a name="line419">419: </a><font color="#B22222">   compound vector.</font>
-
-<a name="line421">421: </a><font color="#B22222">   Collective on Vec</font>
-
-<a name="line423">423: </a><font color="#B22222">   Input Parameter:</font>
-<a name="line424">424: </a><font color="#B22222">.  win - compound vector</font>
-
-<a name="line426">426: </a><font color="#B22222">   Output Parameters:</font>
-<a name="line427">427: </a><font color="#B22222">+  n - number of child vectors</font>
-<a name="line428">428: </a><font color="#B22222">-  x - array of child vectors</font>
-
-<a name="line430">430: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line432">432: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>()</font>
-<a name="line433">433: </a><font color="#B22222">@*/</font>
-<a name="line434">434: </a><strong><font color="#4169E1"><a name="VecCompGetSubVecs"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCompGetSubVecs.html#VecCompGetSubVecs">VecCompGetSubVecs</a>(Vec win,PetscInt *n,const Vec **x)</font></strong>
-<a name="line435">435: </a>{
-<a name="line436">436: </a>  Vec_Comp *s = (Vec_Comp*)win->data;
-
-<a name="line439">439: </a>  SlepcValidVecComp(win);
-<a name="line440">440: </a>  <font color="#4169E1">if</font> (x) *x = s->x;
-<a name="line441">441: </a>  <font color="#4169E1">if</font> (n) *n = s->nx;
-<a name="line442">442: </a>  <font color="#4169E1">return</font>(0);
-<a name="line443">443: </a>}
-
-<a name="line447">447: </a><font color="#B22222">/*@C</font>
-<a name="line448">448: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a> - Resets the number of subvectors defining a compound vector,</font>
-<a name="line449">449: </a><font color="#B22222">   of replaces the subvectors.</font>
-
-<a name="line451">451: </a><font color="#B22222">   Collective on Vec</font>
-
-<a name="line453">453: </a><font color="#B22222">   Input Parameters:</font>
-<a name="line454">454: </a><font color="#B22222">+  win - compound vector</font>
-<a name="line455">455: </a><font color="#B22222">.  n - number of child vectors</font>
-<a name="line456">456: </a><font color="#B22222">-  x - array of child vectors</font>
-
-<a name="line458">458: </a><font color="#B22222">   Level: developer</font>
-
-<a name="line460">460: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>()</font>
-<a name="line461">461: </a><font color="#B22222">@*/</font>
-<a name="line462">462: </a><strong><font color="#4169E1"><a name="VecCompSetSubVecs"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>(Vec win,PetscInt n,Vec *x)</font></strong>
-<a name="line463">463: </a>{
-<a name="line464">464: </a>  Vec_Comp       *s = (Vec_Comp*)win->data;
-
-<a name="line468">468: </a>  <font color="#4169E1">if</font> (x) {
-<a name="line469">469: </a>    <font color="#4169E1">if</font> (n > s->nx) {
-<a name="line470">470: </a>      PetscFree(s->x);
-<a name="line471">471: </a>      PetscMalloc(<font color="#4169E1">sizeof</font>(Vec)*n,&s->x);
-<a name="line472">472: </a>    }
-<a name="line473">473: </a>    PetscMemcpy(s->x,x,<font color="#4169E1">sizeof</font>(Vec)*n);
-<a name="line474">474: </a>    s->nx = n;
-<a name="line475">475: </a>  }
-<a name="line476">476: </a>  s->n->n = n;
-<a name="line477">477: </a>  <font color="#4169E1">return</font>(0);
-<a name="line478">478: </a>}
-
-<a name="line482">482: </a><strong><font color="#4169E1"><a name="VecAXPY_Comp"></a>PetscErrorCode VecAXPY_Comp(Vec v,PetscScalar alpha,Vec w)</font></strong>
-<a name="line483">483: </a>{
-<a name="line485">485: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
-<a name="line486">486: </a>  PetscInt       i;
-
-<a name="line489">489: </a>  SlepcValidVecComp(v);
-<a name="line490">490: </a>  SlepcValidVecComp(w);
-<a name="line491">491: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
-<a name="line492">492: </a>    VecAXPY(vs->x[i],alpha,ws->x[i]);
-<a name="line493">493: </a>  }
-<a name="line494">494: </a>  <font color="#4169E1">return</font>(0);
-<a name="line495">495: </a>}
-
-<a name="line499">499: </a><strong><font color="#4169E1"><a name="VecAYPX_Comp"></a>PetscErrorCode VecAYPX_Comp(Vec v,PetscScalar alpha,Vec w)</font></strong>
-<a name="line500">500: </a>{
-<a name="line502">502: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
-<a name="line503">503: </a>  PetscInt       i;
-
-<a name="line506">506: </a>  SlepcValidVecComp(v);
-<a name="line507">507: </a>  SlepcValidVecComp(w);
-<a name="line508">508: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
-<a name="line509">509: </a>    VecAYPX(vs->x[i],alpha,ws->x[i]);
-<a name="line510">510: </a>  }
-<a name="line511">511: </a>  <font color="#4169E1">return</font>(0);
-<a name="line512">512: </a>}
-
-<a name="line516">516: </a><strong><font color="#4169E1"><a name="VecAXPBY_Comp"></a>PetscErrorCode VecAXPBY_Comp(Vec v,PetscScalar alpha,PetscScalar beta,Vec w)</font></strong>
-<a name="line517">517: </a>{
-<a name="line519">519: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
-<a name="line520">520: </a>  PetscInt       i;
-
-<a name="line523">523: </a>  SlepcValidVecComp(v);
-<a name="line524">524: </a>  SlepcValidVecComp(w);
-<a name="line525">525: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
-<a name="line526">526: </a>    VecAXPBY(vs->x[i],alpha,beta,ws->x[i]);
-<a name="line527">527: </a>  }
-<a name="line528">528: </a>  <font color="#4169E1">return</font>(0);
-<a name="line529">529: </a>}
-
-<a name="line533">533: </a><strong><font color="#4169E1"><a name="VecMAXPY_Comp"></a>PetscErrorCode VecMAXPY_Comp(Vec v,PetscInt n,const PetscScalar *alpha,Vec *w)</font></strong>
-<a name="line534">534: </a>{
-<a name="line536">536: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data;
-<a name="line537">537: </a>  Vec            *wx;
-<a name="line538">538: </a>  PetscInt       i,j;
-
-<a name="line541">541: </a>  SlepcValidVecComp(v);
-<a name="line542">542: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) SlepcValidVecComp(w[i]);
-
-<a name="line544">544: </a>  PetscMalloc(<font color="#4169E1">sizeof</font>(Vec)*n,&wx);
-
-<a name="line546">546: </a>  <font color="#4169E1">for</font> (j=0;j<vs->n->n;j++) {
-<a name="line547">547: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) wx[i] = ((Vec_Comp*)w[i]->data)->x[j];
-<a name="line548">548: </a>    VecMAXPY(vs->x[j],n,alpha,wx);
-<a name="line549">549: </a>  }
-
-<a name="line551">551: </a>  PetscFree(wx);
-<a name="line552">552: </a>  <font color="#4169E1">return</font>(0);
-<a name="line553">553: </a>}
-
-<a name="line557">557: </a><strong><font color="#4169E1"><a name="VecWAXPY_Comp"></a>PetscErrorCode VecWAXPY_Comp(Vec v,PetscScalar alpha,Vec w,Vec z)</font></strong>
-<a name="line558">558: </a>{
-<a name="line560">560: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data,*zs = (Vec_Comp*)z->data;
-<a name="line561">561: </a>  PetscInt       i;
-
-<a name="line564">564: </a>  SlepcValidVecComp(v);
-<a name="line565">565: </a>  SlepcValidVecComp(w);
-<a name="line566">566: </a>  SlepcValidVecComp(z);
-<a name="line567">567: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
-<a name="line568">568: </a>    VecWAXPY(vs->x[i],alpha,ws->x[i],zs->x[i]);
-<a name="line569">569: </a>  }
-<a name="line570">570: </a>  <font color="#4169E1">return</font>(0);
-<a name="line571">571: </a>}
-
-<a name="line575">575: </a><strong><font color="#4169E1"><a name="VecAXPBYPCZ_Comp"></a>PetscErrorCode VecAXPBYPCZ_Comp(Vec v,PetscScalar alpha,PetscScalar beta,PetscScalar gamma,Vec w,Vec z)</font></strong>
-<a name="line576">576: </a>{
-<a name="line577">577: </a>  PetscErrorCode  ierr;
-<a name="line578">578: </a>  Vec_Comp        *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data,*zs = (Vec_Comp*)z->data;
-<a name="line579">579: </a>  PetscInt        i;
-
-<a name="line582">582: </a>  SlepcValidVecComp(v);
-<a name="line583">583: </a>  SlepcValidVecComp(w);
-<a name="line584">584: </a>  SlepcValidVecComp(z);
-<a name="line585">585: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
-<a name="line586">586: </a>    VecAXPBYPCZ(vs->x[i],alpha,beta,gamma,ws->x[i],zs->x[i]);
-<a name="line587">587: </a>  }
-<a name="line588">588: </a>  <font color="#4169E1">return</font>(0);
-<a name="line589">589: </a>}
-
-<a name="line593">593: </a><strong><font color="#4169E1"><a name="VecGetSize_Comp"></a>PetscErrorCode VecGetSize_Comp(Vec v,PetscInt *size)</font></strong>
-<a name="line594">594: </a>{
-<a name="line595">595: </a>  Vec_Comp *vs = (Vec_Comp*)v->data;
-
-<a name="line598">598: </a>  SlepcValidVecComp(v);
-<a name="line600">600: </a>  *size = vs->n->N;
-<a name="line601">601: </a>  <font color="#4169E1">return</font>(0);
-<a name="line602">602: </a>}
-
-<a name="line606">606: </a><strong><font color="#4169E1"><a name="VecGetLocalSize_Comp"></a>PetscErrorCode VecGetLocalSize_Comp(Vec v,PetscInt *size)</font></strong>
-<a name="line607">607: </a>{
-<a name="line608">608: </a>  Vec_Comp *vs = (Vec_Comp*)v->data;
-
-<a name="line611">611: </a>  SlepcValidVecComp(v);
-<a name="line613">613: </a>  *size = vs->n->lN;
-<a name="line614">614: </a>  <font color="#4169E1">return</font>(0);
-<a name="line615">615: </a>}
-
-<a name="line619">619: </a><strong><font color="#4169E1"><a name="VecMax_Comp"></a>PetscErrorCode VecMax_Comp(Vec v,PetscInt *idx,PetscReal *z)</font></strong>
-<a name="line620">620: </a>{
-<a name="line622">622: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data;
-<a name="line623">623: </a>  PetscInt       idxp,s=0,s0;
-<a name="line624">624: </a>  PetscReal      zp,z0;
-<a name="line625">625: </a>  PetscInt       i;
-
-<a name="line628">628: </a>  SlepcValidVecComp(v);
-<a name="line629">629: </a>  <font color="#4169E1">if</font> (!idx && !z) <font color="#4169E1">return</font>(0);
-
-<a name="line631">631: </a>  <font color="#4169E1">if</font> (vs->n->n > 0) {
-<a name="line632">632: </a>    VecMax(vs->x[0],idx?&idxp:NULL,&zp);
-<a name="line633">633: </a>  }
-<a name="line634">634: </a>  <font color="#4169E1">for</font> (i=1;i<vs->n->n;i++) {
-<a name="line635">635: </a>    VecGetSize(vs->x[i-1],&s0);
-<a name="line636">636: </a>    s+= s0;
-<a name="line637">637: </a>    VecMax(vs->x[i],idx?&idxp:NULL,&z0);
-<a name="line638">638: </a>    <font color="#4169E1">if</font> (zp < z0) {
-<a name="line639">639: </a>      <font color="#4169E1">if</font> (idx) *idx = s+idxp;
-<a name="line640">640: </a>      zp = z0;
-<a name="line641">641: </a>    }
-<a name="line642">642: </a>  }
-<a name="line643">643: </a>  <font color="#4169E1">if</font> (z) *z = zp;
-<a name="line644">644: </a>  <font color="#4169E1">return</font>(0);
-<a name="line645">645: </a>}
-
-<a name="line649">649: </a><strong><font color="#4169E1"><a name="VecMin_Comp"></a>PetscErrorCode VecMin_Comp(Vec v,PetscInt *idx,PetscReal *z)</font></strong>
-<a name="line650">650: </a>{
-<a name="line652">652: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data;
-<a name="line653">653: </a>  PetscInt       idxp,s=0,s0;
-<a name="line654">654: </a>  PetscReal      zp,z0;
-<a name="line655">655: </a>  PetscInt       i;
-
-<a name="line658">658: </a>  SlepcValidVecComp(v);
-<a name="line659">659: </a>  <font color="#4169E1">if</font> (!idx && !z) <font color="#4169E1">return</font>(0);
-
-<a name="line661">661: </a>  <font color="#4169E1">if</font> (vs->n->n > 0) {
-<a name="line662">662: </a>    VecMin(vs->x[0],idx?&idxp:NULL,&zp);
-<a name="line663">663: </a>  }
-<a name="line664">664: </a>  <font color="#4169E1">for</font> (i=1;i<vs->n->n;i++) {
-<a name="line665">665: </a>    VecGetSize(vs->x[i-1],&s0);
-<a name="line666">666: </a>    s+= s0;
-<a name="line667">667: </a>    VecMin(vs->x[i],idx?&idxp:NULL,&z0);
-<a name="line668">668: </a>    <font color="#4169E1">if</font> (zp > z0) {
-<a name="line669">669: </a>      <font color="#4169E1">if</font> (idx) *idx = s+idxp;
-<a name="line670">670: </a>      zp = z0;
-<a name="line671">671: </a>    }
-<a name="line672">672: </a>  }
-<a name="line673">673: </a>  <font color="#4169E1">if</font> (z) *z = zp;
-<a name="line674">674: </a>  <font color="#4169E1">return</font>(0);
-<a name="line675">675: </a>}
-
-<a name="line679">679: </a><strong><font color="#4169E1"><a name="VecMaxPointwiseDivide_Comp"></a>PetscErrorCode VecMaxPointwiseDivide_Comp(Vec v,Vec w,PetscReal *m)</font></strong>
-<a name="line680">680: </a>{
-<a name="line682">682: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
-<a name="line683">683: </a>  PetscReal      work;
-<a name="line684">684: </a>  PetscInt       i;
-
-<a name="line687">687: </a>  SlepcValidVecComp(v);
-<a name="line688">688: </a>  SlepcValidVecComp(w);
-<a name="line689">689: </a>  <font color="#4169E1">if</font> (!m || vs->n->n == 0) <font color="#4169E1">return</font>(0);
-<a name="line690">690: </a>  VecMaxPointwiseDivide(vs->x[0],ws->x[0],m);
-<a name="line691">691: </a>  <font color="#4169E1">for</font> (i=1;i<vs->n->n;i++) {
-<a name="line692">692: </a>    VecMaxPointwiseDivide(vs->x[i],ws->x[i],&work);
-<a name="line693">693: </a>    *m = PetscMax(*m,work);
-<a name="line694">694: </a>  }
-<a name="line695">695: </a>  <font color="#4169E1">return</font>(0);
-<a name="line696">696: </a>}
-
-
-
-<a name="line704">704: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v) \</font></strong>
-<a name="line705">705: </a><strong><font color="#228B22">{ \</font></strong>
-<a name="line706">706: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
-<a name="line707">707: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data; \</font></strong>
-<a name="line708">708: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
-<a name="line709">709: </a><strong><font color="#228B22">\</font></strong>
-<a name="line711">711: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
-<a name="line712">712: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
-<a name="line713">713: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i]); \</font></strong>
-<a name="line714">714: </a><strong><font color="#228B22">  } \</font></strong>
-<a name="line715">715: </a><strong><font color="#228B22">  return(0);\</font></strong>
-<a name="line716">716: </a><strong><font color="#228B22">}</font></strong>
-
-<a name="line720">720: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Conjugate)</font></strong>
-
-<a name="line724">724: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Reciprocal)</font></strong>
-
-<a name="line728">728: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(SqrtAbs)</font></strong>
-
-<a name="line732">732: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Abs)</font></strong>
-
-<a name="line736">736: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Exp)</font></strong>
-
-<a name="line740">740: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Log)</font></strong>
-
-
-<a name="line744">744: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v,T0 __a) \</font></strong>
-<a name="line745">745: </a><strong><font color="#228B22">{ \</font></strong>
-<a name="line746">746: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
-<a name="line747">747: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data; \</font></strong>
-<a name="line748">748: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
-<a name="line749">749: </a><strong><font color="#228B22">\</font></strong>
-<a name="line751">751: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
-<a name="line752">752: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
-<a name="line753">753: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i],__a); \</font></strong>
-<a name="line754">754: </a><strong><font color="#228B22">  } \</font></strong>
-<a name="line755">755: </a><strong><font color="#228B22">  return(0);\</font></strong>
-<a name="line756">756: </a><strong><font color="#228B22">}</font></strong>
-
-<a name="line760">760: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(Set,PetscScalar)</font></strong>
-
-<a name="line764">764: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(View,PetscViewer)</font></strong>
-
-<a name="line768">768: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(Scale,PetscScalar)</font></strong>
-
-<a name="line772">772: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(SetRandom,PetscRandom)</font></strong>
-
-<a name="line776">776: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(Shift,PetscScalar)</font></strong>
-
-
-<a name="line780">780: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v,Vec w) \</font></strong>
-<a name="line781">781: </a><strong><font color="#228B22">{ \</font></strong>
-<a name="line782">782: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
-<a name="line783">783: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data,\</font></strong>
-<a name="line784">784: </a><strong><font color="#228B22">                  *ws = (Vec_Comp*)w->data; \</font></strong>
-<a name="line785">785: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
-<a name="line786">786: </a><strong><font color="#228B22">\</font></strong>
-<a name="line788">788: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
-<a name="line789">789: </a><strong><font color="#228B22">  SlepcValidVecComp(w); \</font></strong>
-<a name="line790">790: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
-<a name="line791">791: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i],ws->x[i]); \</font></strong>
-<a name="line792">792: </a><strong><font color="#228B22">  } \</font></strong>
-<a name="line793">793: </a><strong><font color="#228B22">  return(0);\</font></strong>
-<a name="line794">794: </a><strong><font color="#228B22">}</font></strong>
-
-<a name="line798">798: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE3__"></a>__FUNC_TEMPLATE3__(Copy)</font></strong>
-
-<a name="line802">802: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE3__"></a>__FUNC_TEMPLATE3__(Swap)</font></strong>
-
-
-<a name="line806">806: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v,Vec w,Vec z) \</font></strong>
-<a name="line807">807: </a><strong><font color="#228B22">{ \</font></strong>
-<a name="line808">808: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
-<a name="line809">809: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data, \</font></strong>
-<a name="line810">810: </a><strong><font color="#228B22">                  *ws = (Vec_Comp*)w->data, \</font></strong>
-<a name="line811">811: </a><strong><font color="#228B22">                  *zs = (Vec_Comp*)z->data; \</font></strong>
-<a name="line812">812: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
-<a name="line813">813: </a><strong><font color="#228B22">\</font></strong>
-<a name="line815">815: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
-<a name="line816">816: </a><strong><font color="#228B22">  SlepcValidVecComp(w); \</font></strong>
-<a name="line817">817: </a><strong><font color="#228B22">  SlepcValidVecComp(z); \</font></strong>
-<a name="line818">818: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
-<a name="line819">819: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i],ws->x[i],zs->x[i]); \</font></strong>
-<a name="line820">820: </a><strong><font color="#228B22">  } \</font></strong>
-<a name="line821">821: </a><strong><font color="#228B22">  return(0);\</font></strong>
-<a name="line822">822: </a><strong><font color="#228B22">}</font></strong>
+<a name="line289">289: </a>    s->n = n;
+<a name="line290">290: </a>    s->n->friends++;
+<a name="line291">291: </a>  }
+
+<a name="line293">293: </a>  <font color="#B22222">/* Set the virtual sizes as the real sizes of the vector */</font>
+<a name="line294">294: </a>  VecSetSizes(v,s->n->lN,s->n->N);
+
+<a name="line296">296: </a>  PetscObjectChangeTypeName((PetscObject)v,VECCOMP);
+<a name="line297">297: </a>  <font color="#4169E1">return</font>(0);
+<a name="line298">298: </a>}
+
+<a name="line302">302: </a><strong><font color="#4169E1"><a name="VecCreate_Comp"></a>PETSC_EXTERN PetscErrorCode VecCreate_Comp(Vec V)</font></strong>
+<a name="line303">303: </a>{
+
+<a name="line307">307: </a>  VecCreate_Comp_Private(V,NULL,0,PETSC_FALSE,NULL);
+<a name="line308">308: </a>  <font color="#4169E1">return</font>(0);
+<a name="line309">309: </a>}
+
+<a name="line313">313: </a><font color="#B22222">/*@C</font>
+<a name="line314">314: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a> - Creates a new vector containing several subvectors,</font>
+<a name="line315">315: </a><font color="#B22222">   each stored separately.</font>
+
+<a name="line317">317: </a><font color="#B22222">   Collective on Vec</font>
+
+<a name="line319">319: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line320">320: </a><font color="#B22222">+  comm - communicator for the new Vec</font>
+<a name="line321">321: </a><font color="#B22222">.  Nx   - array of (initial) global sizes of child vectors</font>
+<a name="line322">322: </a><font color="#B22222">.  n    - number of child vectors</font>
+<a name="line323">323: </a><font color="#B22222">.  t    - type of the child vectors</font>
+<a name="line324">324: </a><font color="#B22222">-  Vparent - (optional) template vector</font>
+
+<a name="line326">326: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line327">327: </a><font color="#B22222">.  V - new vector</font>
+
+<a name="line329">329: </a><font color="#B22222">   Notes:</font>
+<a name="line330">330: </a><font color="#B22222">   This is similar to PETSc's VecNest but customized for SLEPc's needs. In particular,</font>
+<a name="line331">331: </a><font color="#B22222">   the number of child vectors can be modified dynamically, with <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>().</font>
+
+<a name="line333">333: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line335">335: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(), <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>()</font>
+<a name="line336">336: </a><font color="#B22222">@*/</font>
+<a name="line337">337: </a><strong><font color="#4169E1"><a name="VecCreateComp"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>(MPI_Comm comm,PetscInt *Nx,PetscInt n,VecType t,Vec Vparent,Vec *V)</font></strong>
+<a name="line338">338: </a>{
+<a name="line340">340: </a>  Vec            *x;
+<a name="line341">341: </a>  PetscInt       i;
+
+<a name="line344">344: </a>  VecCreate(comm,V);
+<a name="line345">345: </a>  PetscMalloc1(n,&x);
+<a name="line346">346: </a>  PetscLogObjectMemory((PetscObject)*V,n*<font color="#4169E1">sizeof</font>(Vec));
+<a name="line347">347: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line348">348: </a>    VecCreate(comm,&x[i]);
+<a name="line349">349: </a>    VecSetSizes(x[i],PETSC_DECIDE,Nx[i]);
+<a name="line350">350: </a>    VecSetType(x[i],t);
+<a name="line351">351: </a>  }
+<a name="line352">352: </a>  VecCreate_Comp_Private(*V,x,n,PETSC_TRUE,Vparent?((Vec_Comp*)Vparent->data)->n:NULL);
+<a name="line353">353: </a>  <font color="#4169E1">return</font>(0);
+<a name="line354">354: </a>}
+
+<a name="line358">358: </a><font color="#B22222">/*@C</font>
+<a name="line359">359: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a> - Creates a new vector containing several subvectors,</font>
+<a name="line360">360: </a><font color="#B22222">   each stored separately, from an array of Vecs.</font>
+
+<a name="line362">362: </a><font color="#B22222">   Collective on Vec</font>
+
+<a name="line364">364: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line365">365: </a><font color="#B22222">+  x - array of Vecs</font>
+<a name="line366">366: </a><font color="#B22222">.  n - number of child vectors</font>
+<a name="line367">367: </a><font color="#B22222">-  Vparent - (optional) template vector</font>
+
+<a name="line369">369: </a><font color="#B22222">   Output Parameter:</font>
+<a name="line370">370: </a><font color="#B22222">.  V - new vector</font>
+
+<a name="line372">372: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line374">374: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>()</font>
+<a name="line375">375: </a><font color="#B22222">@*/</font>
+<a name="line376">376: </a><strong><font color="#4169E1"><a name="VecCreateCompWithVecs"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCreateCompWithVecs.html#VecCreateCompWithVecs">VecCreateCompWithVecs</a>(Vec *x,PetscInt n,Vec Vparent,Vec *V)</font></strong>
+<a name="line377">377: </a>{
+<a name="line379">379: </a>  PetscInt       i;
+
+<a name="line382">382: </a>  VecCreate(PetscObjectComm((PetscObject)x[0]),V);
+<a name="line383">383: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) {
+<a name="line384">384: </a>    PetscObjectReference((PetscObject)x[i]);
+<a name="line385">385: </a>  }
+<a name="line386">386: </a>  VecCreate_Comp_Private(*V,x,n,PETSC_FALSE,Vparent?((Vec_Comp*)Vparent->data)->n:NULL);
+<a name="line387">387: </a>  <font color="#4169E1">return</font>(0);
+<a name="line388">388: </a>}
+
+<a name="line392">392: </a><strong><font color="#4169E1"><a name="VecDuplicate_Comp"></a>PetscErrorCode VecDuplicate_Comp(Vec win,Vec *V)</font></strong>
+<a name="line393">393: </a>{
+<a name="line395">395: </a>  Vec            *x;
+<a name="line396">396: </a>  PetscInt       i;
+<a name="line397">397: </a>  Vec_Comp       *s = (Vec_Comp*)win->data;
+
+<a name="line400">400: </a>  SlepcValidVecComp(win);
+<a name="line401">401: </a>  VecCreate(PetscObjectComm((PetscObject)win),V);
+<a name="line402">402: </a>  PetscMalloc1(s->nx,&x);
+<a name="line403">403: </a>  PetscLogObjectMemory((PetscObject)*V,s->nx*<font color="#4169E1">sizeof</font>(Vec));
+<a name="line404">404: </a>  <font color="#4169E1">for</font> (i=0;i<s->nx;i++) {
+<a name="line405">405: </a>    <font color="#4169E1">if</font> (s->x[i]) {
+<a name="line406">406: </a>      VecDuplicate(s->x[i],&x[i]);
+<a name="line407">407: </a>    } <font color="#4169E1">else</font> x[i] = NULL;
+<a name="line408">408: </a>  }
+<a name="line409">409: </a>  VecCreate_Comp_Private(*V,x,s->nx,PETSC_TRUE,s->n);
+<a name="line410">410: </a>  <font color="#4169E1">return</font>(0);
+<a name="line411">411: </a>}
+
+<a name="line415">415: </a><font color="#B22222">/*@C</font>
+<a name="line416">416: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCompGetSubVecs.html#VecCompGetSubVecs">VecCompGetSubVecs</a> - Returns the entire array of vectors defining a</font>
+<a name="line417">417: </a><font color="#B22222">   compound vector.</font>
+
+<a name="line419">419: </a><font color="#B22222">   Collective on Vec</font>
+
+<a name="line421">421: </a><font color="#B22222">   Input Parameter:</font>
+<a name="line422">422: </a><font color="#B22222">.  win - compound vector</font>
+
+<a name="line424">424: </a><font color="#B22222">   Output Parameters:</font>
+<a name="line425">425: </a><font color="#B22222">+  n - number of child vectors</font>
+<a name="line426">426: </a><font color="#B22222">-  x - array of child vectors</font>
+
+<a name="line428">428: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line430">430: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>()</font>
+<a name="line431">431: </a><font color="#B22222">@*/</font>
+<a name="line432">432: </a><strong><font color="#4169E1"><a name="VecCompGetSubVecs"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCompGetSubVecs.html#VecCompGetSubVecs">VecCompGetSubVecs</a>(Vec win,PetscInt *n,const Vec **x)</font></strong>
+<a name="line433">433: </a>{
+<a name="line434">434: </a>  Vec_Comp *s = (Vec_Comp*)win->data;
+
+<a name="line437">437: </a>  SlepcValidVecComp(win);
+<a name="line438">438: </a>  <font color="#4169E1">if</font> (x) *x = s->x;
+<a name="line439">439: </a>  <font color="#4169E1">if</font> (n) *n = s->nx;
+<a name="line440">440: </a>  <font color="#4169E1">return</font>(0);
+<a name="line441">441: </a>}
+
+<a name="line445">445: </a><font color="#B22222">/*@C</font>
+<a name="line446">446: </a><font color="#B22222">   <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a> - Resets the number of subvectors defining a compound vector,</font>
+<a name="line447">447: </a><font color="#B22222">   of replaces the subvectors.</font>
+
+<a name="line449">449: </a><font color="#B22222">   Collective on Vec</font>
+
+<a name="line451">451: </a><font color="#B22222">   Input Parameters:</font>
+<a name="line452">452: </a><font color="#B22222">+  win - compound vector</font>
+<a name="line453">453: </a><font color="#B22222">.  n - number of child vectors</font>
+<a name="line454">454: </a><font color="#B22222">-  x - array of child vectors</font>
+
+<a name="line456">456: </a><font color="#B22222">   Level: developer</font>
+
+<a name="line458">458: </a><font color="#B22222">.seealso: <a href="../../../docs/manualpages/sys/VecCreateComp.html#VecCreateComp">VecCreateComp</a>()</font>
+<a name="line459">459: </a><font color="#B22222">@*/</font>
+<a name="line460">460: </a><strong><font color="#4169E1"><a name="VecCompSetSubVecs"></a>PetscErrorCode <a href="../../../docs/manualpages/sys/VecCompSetSubVecs.html#VecCompSetSubVecs">VecCompSetSubVecs</a>(Vec win,PetscInt n,Vec *x)</font></strong>
+<a name="line461">461: </a>{
+<a name="line462">462: </a>  Vec_Comp       *s = (Vec_Comp*)win->data;
+
+<a name="line466">466: </a>  <font color="#4169E1">if</font> (x) {
+<a name="line467">467: </a>    <font color="#4169E1">if</font> (n > s->nx) {
+<a name="line468">468: </a>      PetscFree(s->x);
+<a name="line469">469: </a>      PetscMalloc(<font color="#4169E1">sizeof</font>(Vec)*n,&s->x);
+<a name="line470">470: </a>    }
+<a name="line471">471: </a>    PetscMemcpy(s->x,x,<font color="#4169E1">sizeof</font>(Vec)*n);
+<a name="line472">472: </a>    s->nx = n;
+<a name="line473">473: </a>  }
+<a name="line474">474: </a>  s->n->n = n;
+<a name="line475">475: </a>  <font color="#4169E1">return</font>(0);
+<a name="line476">476: </a>}
+
+<a name="line480">480: </a><strong><font color="#4169E1"><a name="VecAXPY_Comp"></a>PetscErrorCode VecAXPY_Comp(Vec v,PetscScalar alpha,Vec w)</font></strong>
+<a name="line481">481: </a>{
+<a name="line483">483: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
+<a name="line484">484: </a>  PetscInt       i;
+
+<a name="line487">487: </a>  SlepcValidVecComp(v);
+<a name="line488">488: </a>  SlepcValidVecComp(w);
+<a name="line489">489: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
+<a name="line490">490: </a>    VecAXPY(vs->x[i],alpha,ws->x[i]);
+<a name="line491">491: </a>  }
+<a name="line492">492: </a>  <font color="#4169E1">return</font>(0);
+<a name="line493">493: </a>}
+
+<a name="line497">497: </a><strong><font color="#4169E1"><a name="VecAYPX_Comp"></a>PetscErrorCode VecAYPX_Comp(Vec v,PetscScalar alpha,Vec w)</font></strong>
+<a name="line498">498: </a>{
+<a name="line500">500: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
+<a name="line501">501: </a>  PetscInt       i;
+
+<a name="line504">504: </a>  SlepcValidVecComp(v);
+<a name="line505">505: </a>  SlepcValidVecComp(w);
+<a name="line506">506: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
+<a name="line507">507: </a>    VecAYPX(vs->x[i],alpha,ws->x[i]);
+<a name="line508">508: </a>  }
+<a name="line509">509: </a>  <font color="#4169E1">return</font>(0);
+<a name="line510">510: </a>}
+
+<a name="line514">514: </a><strong><font color="#4169E1"><a name="VecAXPBY_Comp"></a>PetscErrorCode VecAXPBY_Comp(Vec v,PetscScalar alpha,PetscScalar beta,Vec w)</font></strong>
+<a name="line515">515: </a>{
+<a name="line517">517: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
+<a name="line518">518: </a>  PetscInt       i;
+
+<a name="line521">521: </a>  SlepcValidVecComp(v);
+<a name="line522">522: </a>  SlepcValidVecComp(w);
+<a name="line523">523: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
+<a name="line524">524: </a>    VecAXPBY(vs->x[i],alpha,beta,ws->x[i]);
+<a name="line525">525: </a>  }
+<a name="line526">526: </a>  <font color="#4169E1">return</font>(0);
+<a name="line527">527: </a>}
+
+<a name="line531">531: </a><strong><font color="#4169E1"><a name="VecMAXPY_Comp"></a>PetscErrorCode VecMAXPY_Comp(Vec v,PetscInt n,const PetscScalar *alpha,Vec *w)</font></strong>
+<a name="line532">532: </a>{
+<a name="line534">534: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data;
+<a name="line535">535: </a>  Vec            *wx;
+<a name="line536">536: </a>  PetscInt       i,j;
+
+<a name="line539">539: </a>  SlepcValidVecComp(v);
+<a name="line540">540: </a>  <font color="#4169E1">for</font> (i=0;i<n;i++) SlepcValidVecComp(w[i]);
+
+<a name="line542">542: </a>  PetscMalloc(<font color="#4169E1">sizeof</font>(Vec)*n,&wx);
+
+<a name="line544">544: </a>  <font color="#4169E1">for</font> (j=0;j<vs->n->n;j++) {
+<a name="line545">545: </a>    <font color="#4169E1">for</font> (i=0;i<n;i++) wx[i] = ((Vec_Comp*)w[i]->data)->x[j];
+<a name="line546">546: </a>    VecMAXPY(vs->x[j],n,alpha,wx);
+<a name="line547">547: </a>  }
+
+<a name="line549">549: </a>  PetscFree(wx);
+<a name="line550">550: </a>  <font color="#4169E1">return</font>(0);
+<a name="line551">551: </a>}
+
+<a name="line555">555: </a><strong><font color="#4169E1"><a name="VecWAXPY_Comp"></a>PetscErrorCode VecWAXPY_Comp(Vec v,PetscScalar alpha,Vec w,Vec z)</font></strong>
+<a name="line556">556: </a>{
+<a name="line558">558: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data,*zs = (Vec_Comp*)z->data;
+<a name="line559">559: </a>  PetscInt       i;
+
+<a name="line562">562: </a>  SlepcValidVecComp(v);
+<a name="line563">563: </a>  SlepcValidVecComp(w);
+<a name="line564">564: </a>  SlepcValidVecComp(z);
+<a name="line565">565: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
+<a name="line566">566: </a>    VecWAXPY(vs->x[i],alpha,ws->x[i],zs->x[i]);
+<a name="line567">567: </a>  }
+<a name="line568">568: </a>  <font color="#4169E1">return</font>(0);
+<a name="line569">569: </a>}
+
+<a name="line573">573: </a><strong><font color="#4169E1"><a name="VecAXPBYPCZ_Comp"></a>PetscErrorCode VecAXPBYPCZ_Comp(Vec v,PetscScalar alpha,PetscScalar beta,PetscScalar gamma,Vec w,Vec z)</font></strong>
+<a name="line574">574: </a>{
+<a name="line575">575: </a>  PetscErrorCode  ierr;
+<a name="line576">576: </a>  Vec_Comp        *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data,*zs = (Vec_Comp*)z->data;
+<a name="line577">577: </a>  PetscInt        i;
+
+<a name="line580">580: </a>  SlepcValidVecComp(v);
+<a name="line581">581: </a>  SlepcValidVecComp(w);
+<a name="line582">582: </a>  SlepcValidVecComp(z);
+<a name="line583">583: </a>  <font color="#4169E1">for</font> (i=0;i<vs->n->n;i++) {
+<a name="line584">584: </a>    VecAXPBYPCZ(vs->x[i],alpha,beta,gamma,ws->x[i],zs->x[i]);
+<a name="line585">585: </a>  }
+<a name="line586">586: </a>  <font color="#4169E1">return</font>(0);
+<a name="line587">587: </a>}
+
+<a name="line591">591: </a><strong><font color="#4169E1"><a name="VecGetSize_Comp"></a>PetscErrorCode VecGetSize_Comp(Vec v,PetscInt *size)</font></strong>
+<a name="line592">592: </a>{
+<a name="line593">593: </a>  Vec_Comp *vs = (Vec_Comp*)v->data;
+
+<a name="line596">596: </a>  SlepcValidVecComp(v);
+<a name="line598">598: </a>  *size = vs->n->N;
+<a name="line599">599: </a>  <font color="#4169E1">return</font>(0);
+<a name="line600">600: </a>}
+
+<a name="line604">604: </a><strong><font color="#4169E1"><a name="VecGetLocalSize_Comp"></a>PetscErrorCode VecGetLocalSize_Comp(Vec v,PetscInt *size)</font></strong>
+<a name="line605">605: </a>{
+<a name="line606">606: </a>  Vec_Comp *vs = (Vec_Comp*)v->data;
+
+<a name="line609">609: </a>  SlepcValidVecComp(v);
+<a name="line611">611: </a>  *size = vs->n->lN;
+<a name="line612">612: </a>  <font color="#4169E1">return</font>(0);
+<a name="line613">613: </a>}
+
+<a name="line617">617: </a><strong><font color="#4169E1"><a name="VecMax_Comp"></a>PetscErrorCode VecMax_Comp(Vec v,PetscInt *idx,PetscReal *z)</font></strong>
+<a name="line618">618: </a>{
+<a name="line620">620: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data;
+<a name="line621">621: </a>  PetscInt       idxp,s=0,s0;
+<a name="line622">622: </a>  PetscReal      zp,z0;
+<a name="line623">623: </a>  PetscInt       i;
+
+<a name="line626">626: </a>  SlepcValidVecComp(v);
+<a name="line627">627: </a>  <font color="#4169E1">if</font> (!idx && !z) <font color="#4169E1">return</font>(0);
+
+<a name="line629">629: </a>  <font color="#4169E1">if</font> (vs->n->n > 0) {
+<a name="line630">630: </a>    VecMax(vs->x[0],idx?&idxp:NULL,&zp);
+<a name="line631">631: </a>  } <font color="#4169E1">else</font> {
+<a name="line632">632: </a>    zp = PETSC_MIN_REAL;
+<a name="line633">633: </a>    <font color="#4169E1">if</font> (idx) idxp = -1;
+<a name="line634">634: </a>  }
+<a name="line635">635: </a>  <font color="#4169E1">for</font> (i=1;i<vs->n->n;i++) {
+<a name="line636">636: </a>    VecGetSize(vs->x[i-1],&s0);
+<a name="line637">637: </a>    s += s0;
+<a name="line638">638: </a>    VecMax(vs->x[i],idx?&idxp:NULL,&z0);
+<a name="line639">639: </a>    <font color="#4169E1">if</font> (zp < z0) {
+<a name="line640">640: </a>      <font color="#4169E1">if</font> (idx) *idx = s+idxp;
+<a name="line641">641: </a>      zp = z0;
+<a name="line642">642: </a>    }
+<a name="line643">643: </a>  }
+<a name="line644">644: </a>  <font color="#4169E1">if</font> (z) *z = zp;
+<a name="line645">645: </a>  <font color="#4169E1">return</font>(0);
+<a name="line646">646: </a>}
+
+<a name="line650">650: </a><strong><font color="#4169E1"><a name="VecMin_Comp"></a>PetscErrorCode VecMin_Comp(Vec v,PetscInt *idx,PetscReal *z)</font></strong>
+<a name="line651">651: </a>{
+<a name="line653">653: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data;
+<a name="line654">654: </a>  PetscInt       idxp,s=0,s0;
+<a name="line655">655: </a>  PetscReal      zp,z0;
+<a name="line656">656: </a>  PetscInt       i;
+
+<a name="line659">659: </a>  SlepcValidVecComp(v);
+<a name="line660">660: </a>  <font color="#4169E1">if</font> (!idx && !z) <font color="#4169E1">return</font>(0);
+
+<a name="line662">662: </a>  <font color="#4169E1">if</font> (vs->n->n > 0) {
+<a name="line663">663: </a>    VecMin(vs->x[0],idx?&idxp:NULL,&zp);
+<a name="line664">664: </a>  } <font color="#4169E1">else</font> {
+<a name="line665">665: </a>    zp = PETSC_MAX_REAL;
+<a name="line666">666: </a>    <font color="#4169E1">if</font> (idx) idxp = -1;
+<a name="line667">667: </a>  }
+<a name="line668">668: </a>  <font color="#4169E1">for</font> (i=1;i<vs->n->n;i++) {
+<a name="line669">669: </a>    VecGetSize(vs->x[i-1],&s0);
+<a name="line670">670: </a>    s += s0;
+<a name="line671">671: </a>    VecMin(vs->x[i],idx?&idxp:NULL,&z0);
+<a name="line672">672: </a>    <font color="#4169E1">if</font> (zp > z0) {
+<a name="line673">673: </a>      <font color="#4169E1">if</font> (idx) *idx = s+idxp;
+<a name="line674">674: </a>      zp = z0;
+<a name="line675">675: </a>    }
+<a name="line676">676: </a>  }
+<a name="line677">677: </a>  <font color="#4169E1">if</font> (z) *z = zp;
+<a name="line678">678: </a>  <font color="#4169E1">return</font>(0);
+<a name="line679">679: </a>}
+
+<a name="line683">683: </a><strong><font color="#4169E1"><a name="VecMaxPointwiseDivide_Comp"></a>PetscErrorCode VecMaxPointwiseDivide_Comp(Vec v,Vec w,PetscReal *m)</font></strong>
+<a name="line684">684: </a>{
+<a name="line686">686: </a>  Vec_Comp       *vs = (Vec_Comp*)v->data,*ws = (Vec_Comp*)w->data;
+<a name="line687">687: </a>  PetscReal      work;
+<a name="line688">688: </a>  PetscInt       i;
+
+<a name="line691">691: </a>  SlepcValidVecComp(v);
+<a name="line692">692: </a>  SlepcValidVecComp(w);
+<a name="line693">693: </a>  <font color="#4169E1">if</font> (!m || vs->n->n == 0) <font color="#4169E1">return</font>(0);
+<a name="line694">694: </a>  VecMaxPointwiseDivide(vs->x[0],ws->x[0],m);
+<a name="line695">695: </a>  <font color="#4169E1">for</font> (i=1;i<vs->n->n;i++) {
+<a name="line696">696: </a>    VecMaxPointwiseDivide(vs->x[i],ws->x[i],&work);
+<a name="line697">697: </a>    *m = PetscMax(*m,work);
+<a name="line698">698: </a>  }
+<a name="line699">699: </a>  <font color="#4169E1">return</font>(0);
+<a name="line700">700: </a>}
+
+
+
+<a name="line708">708: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v) \</font></strong>
+<a name="line709">709: </a><strong><font color="#228B22">{ \</font></strong>
+<a name="line710">710: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
+<a name="line711">711: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data; \</font></strong>
+<a name="line712">712: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
+<a name="line713">713: </a><strong><font color="#228B22">\</font></strong>
+<a name="line715">715: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
+<a name="line716">716: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
+<a name="line717">717: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i]); \</font></strong>
+<a name="line718">718: </a><strong><font color="#228B22">  } \</font></strong>
+<a name="line719">719: </a><strong><font color="#228B22">  return(0);\</font></strong>
+<a name="line720">720: </a><strong><font color="#228B22">}</font></strong>
+
+<a name="line724">724: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Conjugate)</font></strong>
+
+<a name="line728">728: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Reciprocal)</font></strong>
+
+<a name="line732">732: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(SqrtAbs)</font></strong>
+
+<a name="line736">736: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Abs)</font></strong>
+
+<a name="line740">740: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Exp)</font></strong>
+
+<a name="line744">744: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE1__"></a>__FUNC_TEMPLATE1__(Log)</font></strong>
+
+
+<a name="line748">748: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v,T0 __a) \</font></strong>
+<a name="line749">749: </a><strong><font color="#228B22">{ \</font></strong>
+<a name="line750">750: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
+<a name="line751">751: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data; \</font></strong>
+<a name="line752">752: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
+<a name="line753">753: </a><strong><font color="#228B22">\</font></strong>
+<a name="line755">755: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
+<a name="line756">756: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
+<a name="line757">757: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i],__a); \</font></strong>
+<a name="line758">758: </a><strong><font color="#228B22">  } \</font></strong>
+<a name="line759">759: </a><strong><font color="#228B22">  return(0);\</font></strong>
+<a name="line760">760: </a><strong><font color="#228B22">}</font></strong>
+
+<a name="line764">764: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(Set,PetscScalar)</font></strong>
+
+<a name="line768">768: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(View,PetscViewer)</font></strong>
+
+<a name="line772">772: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(Scale,PetscScalar)</font></strong>
+
+<a name="line776">776: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(SetRandom,PetscRandom)</font></strong>
+
+<a name="line780">780: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE2__"></a>__FUNC_TEMPLATE2__(Shift,PetscScalar)</font></strong>
+
+
+<a name="line784">784: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v,Vec w) \</font></strong>
+<a name="line785">785: </a><strong><font color="#228B22">{ \</font></strong>
+<a name="line786">786: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
+<a name="line787">787: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data,\</font></strong>
+<a name="line788">788: </a><strong><font color="#228B22">                  *ws = (Vec_Comp*)w->data; \</font></strong>
+<a name="line789">789: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
+<a name="line790">790: </a><strong><font color="#228B22">\</font></strong>
+<a name="line792">792: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
+<a name="line793">793: </a><strong><font color="#228B22">  SlepcValidVecComp(w); \</font></strong>
+<a name="line794">794: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
+<a name="line795">795: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i],ws->x[i]); \</font></strong>
+<a name="line796">796: </a><strong><font color="#228B22">  } \</font></strong>
+<a name="line797">797: </a><strong><font color="#228B22">  return(0);\</font></strong>
+<a name="line798">798: </a><strong><font color="#228B22">}</font></strong>
+
+<a name="line802">802: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE3__"></a>__FUNC_TEMPLATE3__(Copy)</font></strong>
+
+<a name="line806">806: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE3__"></a>__FUNC_TEMPLATE3__(Swap)</font></strong>
+
+
+<a name="line810">810: </a><strong><font color="#228B22">PetscErrorCode __COMPOSE3__(Vec,NAME,_Comp)(Vec v,Vec w,Vec z) \</font></strong>
+<a name="line811">811: </a><strong><font color="#228B22">{ \</font></strong>
+<a name="line812">812: </a><strong><font color="#228B22">  PetscErrorCode  ierr; \</font></strong>
+<a name="line813">813: </a><strong><font color="#228B22">  Vec_Comp        *vs = (Vec_Comp*)v->data, \</font></strong>
+<a name="line814">814: </a><strong><font color="#228B22">                  *ws = (Vec_Comp*)w->data, \</font></strong>
+<a name="line815">815: </a><strong><font color="#228B22">                  *zs = (Vec_Comp*)z->data; \</font></strong>
+<a name="line816">816: </a><strong><font color="#228B22">  PetscInt        i; \</font></strong>
+<a name="line817">817: </a><strong><font color="#228B22">\</font></strong>
+<a name="line819">819: </a><strong><font color="#228B22">  SlepcValidVecComp(v); \</font></strong>
+<a name="line820">820: </a><strong><font color="#228B22">  SlepcValidVecComp(w); \</font></strong>
+<a name="line821">821: </a><strong><font color="#228B22">  SlepcValidVecComp(z); \</font></strong>
+<a name="line822">822: </a><strong><font color="#228B22">  for (i=0;i<vs->n->n;i++) { \</font></strong>
+<a name="line823">823: </a><strong><font color="#228B22">    __COMPOSE2__(Vec,NAME)(vs->x[i],ws->x[i],zs->x[i]); \</font></strong>
+<a name="line824">824: </a><strong><font color="#228B22">  } \</font></strong>
+<a name="line825">825: </a><strong><font color="#228B22">  return(0);\</font></strong>
+<a name="line826">826: </a><strong><font color="#228B22">}</font></strong>
 
-<a name="line826">826: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMax)</font></strong>
+<a name="line830">830: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMax)</font></strong>
 
-<a name="line830">830: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMaxAbs)</font></strong>
+<a name="line834">834: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMaxAbs)</font></strong>
 
-<a name="line834">834: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMin)</font></strong>
+<a name="line838">838: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMin)</font></strong>
 
-<a name="line838">838: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMult)</font></strong>
+<a name="line842">842: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseMult)</font></strong>
 
-<a name="line842">842: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseDivide)</font></strong>
+<a name="line846">846: </a><strong><font color="#4169E1"><a name="_FUNC_TEMPLATE4__"></a>__FUNC_TEMPLATE4__(PointwiseDivide)</font></strong>
 </pre>
 </body>
 
diff --git a/src/sys/vec/veccomp0.h b/src/sys/vec/veccomp0.h
index 4c31220..6d5b359 100644
--- a/src/sys/vec/veccomp0.h
+++ b/src/sys/vec/veccomp0.h
@@ -1,7 +1,7 @@
 /*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SLEPc - Scalable Library for Eigenvalue Problem Computations
-   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain
+   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain
 
    This file is part of SLEPc.
 
diff --git a/src/sys/vec/veccomp0.h.html b/src/sys/vec/veccomp0.h.html
index f6a3da8..2dcd9ab 100644
--- a/src/sys/vec/veccomp0.h.html
+++ b/src/sys/vec/veccomp0.h.html
@@ -4,16 +4,16 @@
 <head> <link rel="canonical" href="http://slepc.upv.es/documentation/current/src/sys/vec/veccomp0.h.html" />
 <title></title>
 <meta name="generator" content="c2html 0.9.4">
-<meta name="date" content="2016-03-29T14:57:39+00:00">
+<meta name="date" content="2016-05-16T10:32:34+00:00">
 </head>
 
 <body bgcolor="#FFFFFF">
-   <div id="version" align=right><b>slepc-3.6.3 2016-03-29</b></div>
-   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.6.3 v3.6.3 src/sys/vec/veccomp0.h.html "><small>Report Typos and Errors</small></a></div>
+   <div id="version" align=right><b>slepc-3.7.0 2016-05-16</b></div>
+   <div id="bugreport" align=right><a href="mailto:slepc-maint at upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.7.0 v3.7 src/sys/vec/veccomp0.h.html "><small>Report Typos and Errors</small></a></div>
 <pre width="80"><a name="line1">  1: </a><font color="#B22222">/*</font>
 <a name="line2">  2: </a><font color="#B22222">   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font>
 <a name="line3">  3: </a><font color="#B22222">   SLEPc - Scalable Library for Eigenvalue Problem Computations</font>
-<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain</font>
+<a name="line4">  4: </a><font color="#B22222">   Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain</font>
 
 <a name="line6">  6: </a><font color="#B22222">   This file is part of SLEPc.</font>
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/slepc.git



More information about the debian-science-commits mailing list